aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcvs2svn <>2008-12-22 19:45:57 +0000
committercvs2svn <>2008-12-22 19:45:57 +0000
commit0f285615efa16c783821cd87a1fdabe4913da9a7 (patch)
tree0108a4b20fb3c5414c4e221ff251a92050bd104d
parent272fac20e743611550c6fad64f054934da6fd4bc (diff)
downloadnewlib-newlib-1_17_0.zip
newlib-newlib-1_17_0.tar.gz
newlib-newlib-1_17_0.tar.bz2
This commit was manufactured by cvs2svn to create branch 'newlib-newlib-1_17_0
1_17_0-arc'. Sprout from master 2008-12-22 19:45:56 UTC Jeff Johnston <jjohnstn@redhat.com> '' Cherrypick from cygnus 1999-05-03 07:29:06 UTC Richard Henderson <rth@redhat.com> '19990502 sourceware import': README config/mt-d30v config/mt-netware config/mt-ospace etc/add-log.el etc/add-log.vi etc/configbuild.ein etc/configbuild.fig etc/configbuild.jin etc/configbuild.tin etc/configdev.ein etc/configdev.fig etc/configdev.jin etc/configdev.tin makefile.vms Delete: djunpack.bat include/COPYING include/COPYING3 include/ChangeLog include/ChangeLog-9103 include/MAINTAINERS include/alloca-conf.h include/ansidecl.h include/aout/ChangeLog include/aout/adobe.h include/aout/aout64.h include/aout/ar.h include/aout/dynix3.h include/aout/encap.h include/aout/host.h include/aout/hp.h include/aout/hp300hpux.h include/aout/hppa.h include/aout/ranlib.h include/aout/reloc.h include/aout/stab.def include/aout/stab_gnu.h include/aout/sun4.h include/bfdlink.h include/binary-io.h include/bout.h include/coff/ChangeLog include/coff/ChangeLog-9103 include/coff/alpha.h include/coff/apollo.h include/coff/arm.h include/coff/aux-coff.h include/coff/ecoff.h include/coff/external.h include/coff/go32exe.h include/coff/h8300.h include/coff/h8500.h include/coff/i386.h include/coff/i860.h include/coff/i960.h include/coff/ia64.h include/coff/internal.h include/coff/m68k.h include/coff/m88k.h include/coff/maxq.h include/coff/mcore.h include/coff/mips.h include/coff/mipspe.h include/coff/or32.h include/coff/pe.h include/coff/powerpc.h include/coff/rs6000.h include/coff/rs6k64.h include/coff/sh.h include/coff/sparc.h include/coff/sym.h include/coff/symconst.h include/coff/ti.h include/coff/tic30.h include/coff/tic4x.h include/coff/tic54x.h include/coff/tic80.h include/coff/w65.h include/coff/we32k.h include/coff/x86_64.h include/coff/xcoff.h include/coff/z80.h include/coff/z8k.h include/demangle.h include/dis-asm.h include/dyn-string.h include/elf/ChangeLog include/elf/ChangeLog-9103 include/elf/alpha.h include/elf/arc.h include/elf/arm.h include/elf/avr.h include/elf/bfin.h include/elf/common.h include/elf/cr16.h include/elf/cr16c.h include/elf/cris.h include/elf/crx.h include/elf/d10v.h include/elf/d30v.h include/elf/dlx.h include/elf/dwarf.h include/elf/dwarf2.h include/elf/external.h include/elf/fr30.h include/elf/frv.h include/elf/h8.h include/elf/hppa.h include/elf/i370.h include/elf/i386.h include/elf/i860.h include/elf/i960.h include/elf/ia64.h include/elf/internal.h include/elf/ip2k.h include/elf/iq2000.h include/elf/m32c.h include/elf/m32r.h include/elf/m68hc11.h include/elf/m68k.h include/elf/mcore.h include/elf/mep.h include/elf/mips.h include/elf/mmix.h include/elf/mn10200.h include/elf/mn10300.h include/elf/msp430.h include/elf/mt.h include/elf/openrisc.h include/elf/or32.h include/elf/pj.h include/elf/ppc.h include/elf/ppc64.h include/elf/reloc-macros.h include/elf/s390.h include/elf/score.h include/elf/sh.h include/elf/sparc.h include/elf/spu.h include/elf/v850.h include/elf/vax.h include/elf/vxworks.h include/elf/x86-64.h include/elf/xc16x.h include/elf/xstormy16.h include/elf/xtensa.h include/fibheap.h include/filenames.h include/floatformat.h include/fnmatch.h include/fopen-bin.h include/fopen-same.h include/fopen-vms.h include/gdb/ChangeLog include/gdb/callback.h include/gdb/fileio.h include/gdb/remote-sim.h include/gdb/signals.h include/gdb/sim-arm.h include/gdb/sim-cr16.h include/gdb/sim-d10v.h include/gdb/sim-frv.h include/gdb/sim-h8300.h include/gdb/sim-m32c.h include/gdb/sim-ppc.h include/gdb/sim-sh.h include/gdbm.h include/getopt.h include/hashtab.h include/hp-symtab.h include/ieee.h include/libiberty.h include/md5.h include/nlm/ChangeLog include/nlm/alpha-ext.h include/nlm/common.h include/nlm/external.h include/nlm/i386-ext.h include/nlm/internal.h include/nlm/ppc-ext.h include/nlm/sparc32-ext.h include/oasys.h include/objalloc.h include/obstack.h include/opcode/ChangeLog include/opcode/ChangeLog-9103 include/opcode/alpha.h include/opcode/arc.h include/opcode/arm.h include/opcode/avr.h include/opcode/bfin.h include/opcode/cgen-bitset.h include/opcode/cgen.h include/opcode/convex.h include/opcode/cr16.h include/opcode/cris.h include/opcode/crx.h include/opcode/d10v.h include/opcode/d30v.h include/opcode/dlx.h include/opcode/h8300.h include/opcode/hppa.h include/opcode/i370.h include/opcode/i386.h include/opcode/i860.h include/opcode/i960.h include/opcode/ia64.h include/opcode/m68hc11.h include/opcode/m68k.h include/opcode/m88k.h include/opcode/maxq.h include/opcode/mips.h include/opcode/mmix.h include/opcode/mn10200.h include/opcode/mn10300.h include/opcode/msp430.h include/opcode/np1.h include/opcode/ns32k.h include/opcode/or32.h include/opcode/pdp11.h include/opcode/pj.h include/opcode/pn.h include/opcode/ppc.h include/opcode/pyr.h include/opcode/s390.h include/opcode/score-datadep.h include/opcode/score-inst.h include/opcode/sparc.h include/opcode/spu-insns.h include/opcode/spu.h include/opcode/tahoe.h include/opcode/tic30.h include/opcode/tic4x.h include/opcode/tic54x.h include/opcode/tic80.h include/opcode/v850.h include/opcode/vax.h include/os9k.h include/partition.h include/plugin-api.h include/progress.h include/safe-ctype.h include/sha1.h include/sort.h include/splay-tree.h include/symcat.h include/xregex.h include/xregex2.h include/xtensa-config.h include/xtensa-isa-internal.h include/xtensa-isa.h winsup/COPYING winsup/CYGWIN_LICENSE winsup/ChangeLog winsup/Makefile.common winsup/Makefile.in winsup/README winsup/acinclude.m4 winsup/aclocal.m4 winsup/configure winsup/configure.in winsup/cygserver/ChangeLog winsup/cygserver/Makefile.in winsup/cygserver/README winsup/cygserver/aclocal.m4 winsup/cygserver/bsd_helper.cc winsup/cygserver/bsd_helper.h winsup/cygserver/bsd_log.cc winsup/cygserver/bsd_log.h winsup/cygserver/bsd_mutex.cc winsup/cygserver/bsd_mutex.h winsup/cygserver/client.cc winsup/cygserver/configure winsup/cygserver/configure.in winsup/cygserver/cygserver-config winsup/cygserver/cygserver.cc winsup/cygserver/cygserver.conf winsup/cygserver/msg.cc winsup/cygserver/process.cc winsup/cygserver/process.h winsup/cygserver/sem.cc winsup/cygserver/setpwd.cc winsup/cygserver/shm.cc winsup/cygserver/sysv_msg.cc winsup/cygserver/sysv_sem.cc winsup/cygserver/sysv_shm.cc winsup/cygserver/threaded_queue.cc winsup/cygserver/threaded_queue.h winsup/cygserver/transport.cc winsup/cygserver/transport.h winsup/cygserver/transport_pipes.cc winsup/cygserver/transport_pipes.h winsup/cygserver/woutsup.h winsup/cygwin/ChangeLog winsup/cygwin/ChangeLog-1995 winsup/cygwin/ChangeLog-1996 winsup/cygwin/ChangeLog-1997 winsup/cygwin/ChangeLog-1998 winsup/cygwin/ChangeLog-1999 winsup/cygwin/ChangeLog-2000 winsup/cygwin/ChangeLog-2001 winsup/cygwin/ChangeLog-2002 winsup/cygwin/ChangeLog-2003 winsup/cygwin/ChangeLog-2004 winsup/cygwin/ChangeLog-2005 winsup/cygwin/ChangeLog-2006 winsup/cygwin/ChangeLog-2007 winsup/cygwin/Makefile.in winsup/cygwin/ROADMAP winsup/cygwin/acconfig.h winsup/cygwin/aclocal.m4 winsup/cygwin/analyze_sigfe winsup/cygwin/assert.cc winsup/cygwin/autoload.cc winsup/cygwin/automode.c winsup/cygwin/binmode.c winsup/cygwin/child_info.h winsup/cygwin/config.h.in winsup/cygwin/config/i386/profile.h winsup/cygwin/configure winsup/cygwin/configure.in winsup/cygwin/cpuid.h winsup/cygwin/crt0.c winsup/cygwin/ctype.cc winsup/cygwin/cxx.cc winsup/cygwin/cygerrno.h winsup/cygwin/cygheap.cc winsup/cygwin/cygheap.h winsup/cygwin/cyglsa.h winsup/cygwin/cygmagic winsup/cygwin/cygmalloc.h winsup/cygwin/cygserver.h winsup/cygwin/cygserver_ipc.h winsup/cygwin/cygserver_msg.h winsup/cygwin/cygserver_sem.h winsup/cygwin/cygserver_setpwd.h winsup/cygwin/cygserver_shm.h winsup/cygwin/cygthread.cc winsup/cygwin/cygthread.h winsup/cygwin/cygtls.cc winsup/cygwin/cygtls.h winsup/cygwin/cygwin-shilka winsup/cygwin/cygwin.din winsup/cygwin/cygwin.sc winsup/cygwin/cygwin_version.h winsup/cygwin/dcrt0.cc winsup/cygwin/debug.cc winsup/cygwin/debug.h winsup/cygwin/devices.cc winsup/cygwin/devices.h winsup/cygwin/devices.in winsup/cygwin/dir.cc winsup/cygwin/dlfcn.cc winsup/cygwin/dll_init.cc winsup/cygwin/dll_init.h winsup/cygwin/dll_init.sgml winsup/cygwin/dllfixdbg winsup/cygwin/dlmalloc.c winsup/cygwin/dlmalloc.h winsup/cygwin/dtable.cc winsup/cygwin/dtable.h winsup/cygwin/dtable.sgml winsup/cygwin/environ.cc winsup/cygwin/environ.h winsup/cygwin/errno.cc winsup/cygwin/exceptions.cc winsup/cygwin/exec.cc winsup/cygwin/external.cc winsup/cygwin/external.sgml winsup/cygwin/fcntl.cc winsup/cygwin/fhandler.cc winsup/cygwin/fhandler.h winsup/cygwin/fhandler_clipboard.cc winsup/cygwin/fhandler_console.cc winsup/cygwin/fhandler_disk_file.cc winsup/cygwin/fhandler_dsp.cc winsup/cygwin/fhandler_fifo.cc winsup/cygwin/fhandler_floppy.cc winsup/cygwin/fhandler_mailslot.cc winsup/cygwin/fhandler_mem.cc winsup/cygwin/fhandler_netdrive.cc winsup/cygwin/fhandler_nodevice.cc winsup/cygwin/fhandler_proc.cc winsup/cygwin/fhandler_process.cc winsup/cygwin/fhandler_procnet.cc winsup/cygwin/fhandler_random.cc winsup/cygwin/fhandler_raw.cc winsup/cygwin/fhandler_registry.cc winsup/cygwin/fhandler_serial.cc winsup/cygwin/fhandler_socket.cc winsup/cygwin/fhandler_tape.cc winsup/cygwin/fhandler_termios.cc winsup/cygwin/fhandler_tty.cc winsup/cygwin/fhandler_virtual.cc winsup/cygwin/fhandler_windows.cc winsup/cygwin/fhandler_zero.cc winsup/cygwin/flock.cc winsup/cygwin/fork.cc winsup/cygwin/gcrt0.c winsup/cygwin/gendef winsup/cygwin/gendevices winsup/cygwin/gentls_offsets winsup/cygwin/glob.cc winsup/cygwin/gmon.c winsup/cygwin/gmon.h winsup/cygwin/grp.cc winsup/cygwin/heap.cc winsup/cygwin/heap.h winsup/cygwin/hires.h winsup/cygwin/hookapi.cc winsup/cygwin/how-autoload-works.txt winsup/cygwin/how-cygheap-works.txt winsup/cygwin/how-cygtls-works.txt winsup/cygwin/how-fhandlers-work.txt winsup/cygwin/how-signals-work.txt winsup/cygwin/how-spawn-works.txt winsup/cygwin/how-to-debug-cygwin.txt winsup/cygwin/how-vfork-works.txt winsup/cygwin/include/a.out.h winsup/cygwin/include/arpa/ftp.h winsup/cygwin/include/arpa/inet.h winsup/cygwin/include/arpa/nameser.h winsup/cygwin/include/arpa/nameser_compat.h winsup/cygwin/include/arpa/telnet.h winsup/cygwin/include/asm/byteorder.h winsup/cygwin/include/asm/socket.h winsup/cygwin/include/asm/types.h winsup/cygwin/include/attr/xattr.h winsup/cygwin/include/byteswap.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/in6.h winsup/cygwin/include/cygwin/in_systm.h winsup/cygwin/include/cygwin/ipc.h winsup/cygwin/include/cygwin/kd.h winsup/cygwin/include/cygwin/msg.h winsup/cygwin/include/cygwin/mtio.h winsup/cygwin/include/cygwin/rdevio.h winsup/cygwin/include/cygwin/sem.h winsup/cygwin/include/cygwin/shm.h winsup/cygwin/include/cygwin/signal.h winsup/cygwin/include/cygwin/socket.h winsup/cygwin/include/cygwin/sockios.h winsup/cygwin/include/cygwin/stat.h winsup/cygwin/include/cygwin/stdlib.h winsup/cygwin/include/cygwin/sys_time.h winsup/cygwin/include/cygwin/sysproto.h winsup/cygwin/include/cygwin/time.h winsup/cygwin/include/cygwin/types.h winsup/cygwin/include/cygwin/utmp.h winsup/cygwin/include/cygwin/version.h winsup/cygwin/include/cygwin/wait.h winsup/cygwin/include/dlfcn.h winsup/cygwin/include/elf.h winsup/cygwin/include/endian.h winsup/cygwin/include/err.h winsup/cygwin/include/exceptions.h winsup/cygwin/include/fcntl.h winsup/cygwin/include/features.h winsup/cygwin/include/fnmatch.h winsup/cygwin/include/fts.h winsup/cygwin/include/ftw.h winsup/cygwin/include/getopt.h winsup/cygwin/include/glob.h winsup/cygwin/include/icmp.h winsup/cygwin/include/ifaddrs.h winsup/cygwin/include/inttypes.h winsup/cygwin/include/io.h winsup/cygwin/include/lastlog.h winsup/cygwin/include/libgen.h winsup/cygwin/include/limits.h winsup/cygwin/include/machine/stdlib.h winsup/cygwin/include/mapi.h winsup/cygwin/include/memory.h winsup/cygwin/include/mntent.h winsup/cygwin/include/mqueue.h winsup/cygwin/include/net/if.h winsup/cygwin/include/netdb.h winsup/cygwin/include/netinet/in.h winsup/cygwin/include/netinet/in_systm.h winsup/cygwin/include/netinet/ip.h winsup/cygwin/include/netinet/ip_icmp.h winsup/cygwin/include/netinet/tcp.h winsup/cygwin/include/netinet/udp.h winsup/cygwin/include/paths.h winsup/cygwin/include/poll.h winsup/cygwin/include/pthread.h winsup/cygwin/include/pty.h winsup/cygwin/include/resolv.h winsup/cygwin/include/sched.h winsup/cygwin/include/search.h winsup/cygwin/include/semaphore.h winsup/cygwin/include/stdint.h winsup/cygwin/include/strings.h winsup/cygwin/include/sys/acl.h winsup/cygwin/include/sys/copying.dj winsup/cygwin/include/sys/cygwin.h winsup/cygwin/include/sys/dirent.h winsup/cygwin/include/sys/elf32.h winsup/cygwin/include/sys/elf64.h winsup/cygwin/include/sys/elf_common.h winsup/cygwin/include/sys/elf_generic.h winsup/cygwin/include/sys/file.h winsup/cygwin/include/sys/ioctl.h winsup/cygwin/include/sys/ipc.h winsup/cygwin/include/sys/kd.h winsup/cygwin/include/sys/lock.h winsup/cygwin/include/sys/mman.h winsup/cygwin/include/sys/mount.h winsup/cygwin/include/sys/msg.h winsup/cygwin/include/sys/mtio.h winsup/cygwin/include/sys/param.h winsup/cygwin/include/sys/poll.h winsup/cygwin/include/sys/procfs.h winsup/cygwin/include/sys/queue.h winsup/cygwin/include/sys/resource.h winsup/cygwin/include/sys/select.h winsup/cygwin/include/sys/sem.h winsup/cygwin/include/sys/shm.h winsup/cygwin/include/sys/smallprint.h winsup/cygwin/include/sys/socket.h winsup/cygwin/include/sys/soundcard.h winsup/cygwin/include/sys/statfs.h winsup/cygwin/include/sys/statvfs.h winsup/cygwin/include/sys/stdio.h winsup/cygwin/include/sys/strace.h winsup/cygwin/include/sys/syslimits.h winsup/cygwin/include/sys/syslog.h winsup/cygwin/include/sys/sysmacros.h winsup/cygwin/include/sys/sysproto.h winsup/cygwin/include/sys/termio.h winsup/cygwin/include/sys/termios.h winsup/cygwin/include/sys/ttychars.h winsup/cygwin/include/sys/uio.h winsup/cygwin/include/sys/un.h winsup/cygwin/include/sys/utime.h winsup/cygwin/include/sys/utmp.h winsup/cygwin/include/sys/utsname.h winsup/cygwin/include/sys/vfs.h winsup/cygwin/include/sys/wait.h winsup/cygwin/include/sysexits.h winsup/cygwin/include/syslog.h winsup/cygwin/include/termio.h winsup/cygwin/include/tzfile.h winsup/cygwin/include/utmpx.h winsup/cygwin/include/wait.h winsup/cygwin/init.cc winsup/cygwin/ioctl.cc winsup/cygwin/ipc.cc winsup/cygwin/kernel32.cc winsup/cygwin/lib/_cygwin_crt0_common.cc winsup/cygwin/lib/crt0.h winsup/cygwin/lib/cygwin_attach_dll.c winsup/cygwin/lib/cygwin_crt0.c winsup/cygwin/lib/dll_entry.c winsup/cygwin/lib/dll_main.cc winsup/cygwin/lib/libcmain.c winsup/cygwin/lib/premain0.c winsup/cygwin/lib/premain1.c winsup/cygwin/lib/premain2.c winsup/cygwin/lib/premain3.c winsup/cygwin/lib/pseudo-reloc.c winsup/cygwin/libc/bsdlib.cc winsup/cygwin/libc/fnmatch.c winsup/cygwin/libc/fts.c winsup/cygwin/libc/ftw.c winsup/cygwin/libc/getopt.c winsup/cygwin/libc/inet_addr.c winsup/cygwin/libc/inet_network.c winsup/cygwin/libc/minires-os-if.c winsup/cygwin/libc/minires.c winsup/cygwin/libc/minires.h winsup/cygwin/libc/nftw.c winsup/cygwin/libc/rcmd.cc winsup/cygwin/libc/rexec.cc winsup/cygwin/libc/strptime.cc winsup/cygwin/libc/xsique.cc winsup/cygwin/localtime.cc winsup/cygwin/lsearch.cc winsup/cygwin/malloc.cc winsup/cygwin/malloc_wrapper.cc winsup/cygwin/mcount.c winsup/cygwin/miscfuncs.cc winsup/cygwin/miscfuncs.h winsup/cygwin/mktemp.cc winsup/cygwin/mkvers.sh winsup/cygwin/mmap.cc winsup/cygwin/mmap_helper.h winsup/cygwin/mount.cc winsup/cygwin/msg.cc winsup/cygwin/mtinfo.h winsup/cygwin/net.cc winsup/cygwin/netdb.cc winsup/cygwin/newsym winsup/cygwin/nfs.cc winsup/cygwin/nfs.h winsup/cygwin/ntdll.h winsup/cygwin/ntea.cc winsup/cygwin/passwd.cc winsup/cygwin/path.cc winsup/cygwin/path.h winsup/cygwin/path.sgml winsup/cygwin/perprocess.h winsup/cygwin/pinfo.cc winsup/cygwin/pinfo.h winsup/cygwin/pipe.cc winsup/cygwin/poll.cc winsup/cygwin/posix.sgml winsup/cygwin/posix_ipc.cc winsup/cygwin/profil.c winsup/cygwin/profil.h winsup/cygwin/pseudo-reloc.cc winsup/cygwin/pthread.cc winsup/cygwin/pwdgrp.h winsup/cygwin/random.cc winsup/cygwin/regex/COPYRIGHT winsup/cygwin/regex/cclass.h winsup/cygwin/regex/cname.h winsup/cygwin/regex/engine.c winsup/cygwin/regex/engine.ih winsup/cygwin/regex/mkh winsup/cygwin/regex/regcomp.c winsup/cygwin/regex/regcomp.ih winsup/cygwin/regex/regerror.c winsup/cygwin/regex/regerror.ih winsup/cygwin/regex/regex.3 winsup/cygwin/regex/regex.7 winsup/cygwin/regex/regex.h winsup/cygwin/regex/regex2.h winsup/cygwin/regex/regexec.c winsup/cygwin/regex/regfree.c winsup/cygwin/regex/tests winsup/cygwin/regex/utils.h winsup/cygwin/registry.cc winsup/cygwin/registry.h winsup/cygwin/resource.cc winsup/cygwin/rmsym winsup/cygwin/scandir.cc winsup/cygwin/sched.cc winsup/cygwin/sec_acl.cc winsup/cygwin/sec_auth.cc winsup/cygwin/sec_helper.cc winsup/cygwin/security.cc winsup/cygwin/security.h winsup/cygwin/security.sgml winsup/cygwin/select.cc winsup/cygwin/sem.cc winsup/cygwin/setlsapwd.cc winsup/cygwin/shared.cc winsup/cygwin/shared_info.h winsup/cygwin/shm.cc winsup/cygwin/signal.cc winsup/cygwin/sigproc.cc winsup/cygwin/sigproc.h winsup/cygwin/smallprint.cc winsup/cygwin/sortdin winsup/cygwin/spawn.cc winsup/cygwin/speclib winsup/cygwin/stackdump.sgml winsup/cygwin/strace.cc winsup/cygwin/strfuncs.cc winsup/cygwin/string.h winsup/cygwin/strsep.cc winsup/cygwin/strsig.cc winsup/cygwin/sync.cc winsup/cygwin/sync.h winsup/cygwin/syscalls.cc winsup/cygwin/sysconf.cc winsup/cygwin/syslog.cc winsup/cygwin/termios.cc winsup/cygwin/textmode.c winsup/cygwin/textreadmode.c winsup/cygwin/thread.cc winsup/cygwin/thread.h winsup/cygwin/timer.cc winsup/cygwin/times.cc winsup/cygwin/tls_pbuf.cc winsup/cygwin/tls_pbuf.h winsup/cygwin/tlsoffsets.h winsup/cygwin/tty.cc winsup/cygwin/tty.h winsup/cygwin/tz_posixrules.h winsup/cygwin/uinfo.cc winsup/cygwin/uname.cc winsup/cygwin/wait.cc winsup/cygwin/wchar.h winsup/cygwin/winbase.h winsup/cygwin/wincap.cc winsup/cygwin/wincap.h winsup/cygwin/window.cc winsup/cygwin/winf.cc winsup/cygwin/winf.h winsup/cygwin/wininfo.h winsup/cygwin/winsup.h winsup/cygwin/winver.rc winsup/doc/ChangeLog winsup/doc/Makefile.in winsup/doc/README winsup/doc/aclocal.m4 winsup/doc/configure winsup/doc/configure.in winsup/doc/cygserver.sgml winsup/doc/cygwin-api.in.sgml winsup/doc/cygwin-ug-net.in.sgml winsup/doc/cygwin-ug.in.sgml winsup/doc/cygwin.dsl winsup/doc/cygwinenv.sgml winsup/doc/dll.sgml winsup/doc/doctool.c winsup/doc/doctool.txt winsup/doc/effectively.sgml winsup/doc/faq-api.xml winsup/doc/faq-problems.xml winsup/doc/faq-programming.xml winsup/doc/faq-resources.xml winsup/doc/faq-sections.xml winsup/doc/faq-setup.xml winsup/doc/faq-using.xml winsup/doc/faq-what.xml winsup/doc/faq.xml winsup/doc/fhandler-tut.txt winsup/doc/filemodes.sgml winsup/doc/gcc.sgml winsup/doc/gdb.sgml winsup/doc/legal.sgml winsup/doc/ntsec.sgml winsup/doc/overview.sgml winsup/doc/overview2.sgml winsup/doc/pathnames.sgml winsup/doc/programming.sgml winsup/doc/setup-net.sgml winsup/doc/setup.sgml winsup/doc/setup2.sgml winsup/doc/textbinary.sgml winsup/doc/using.sgml winsup/doc/windres.sgml winsup/lsaauth/ChangeLog winsup/lsaauth/Makefile.in winsup/lsaauth/aclocal.m4 winsup/lsaauth/configure winsup/lsaauth/configure.in winsup/lsaauth/cyglsa-config winsup/lsaauth/cyglsa.c winsup/lsaauth/cyglsa.din winsup/lsaauth/cyglsa64.dll winsup/lsaauth/make-64bit-version-with-visual-c.bat winsup/lsaauth/mslsa.def winsup/mingw/CONTRIBUTORS winsup/mingw/CRT_fp10.c winsup/mingw/CRT_fp8.c winsup/mingw/CRT_noglob.c winsup/mingw/CRTfmode.c winsup/mingw/CRTglob.c winsup/mingw/CRTinit.c winsup/mingw/ChangeLog winsup/mingw/DISCLAIMER winsup/mingw/Makefile.in winsup/mingw/README winsup/mingw/TODO winsup/mingw/aclocal.m4 winsup/mingw/binmode.c winsup/mingw/config.guess winsup/mingw/config.sub winsup/mingw/configure winsup/mingw/configure.in winsup/mingw/cpu_features.c winsup/mingw/cpu_features.h winsup/mingw/crt1.c winsup/mingw/crtdll.def winsup/mingw/crtmt.c winsup/mingw/crtst.c winsup/mingw/dllcrt1.c winsup/mingw/dllmain.c winsup/mingw/gccmain.c winsup/mingw/include/_mingw.h winsup/mingw/include/assert.h winsup/mingw/include/complex.h winsup/mingw/include/conio.h winsup/mingw/include/ctype.h winsup/mingw/include/dir.h winsup/mingw/include/direct.h winsup/mingw/include/dirent.h winsup/mingw/include/dos.h winsup/mingw/include/errno.h winsup/mingw/include/excpt.h winsup/mingw/include/fcntl.h winsup/mingw/include/fenv.h winsup/mingw/include/float.h winsup/mingw/include/getopt.h winsup/mingw/include/inttypes.h winsup/mingw/include/io.h winsup/mingw/include/libgen.h winsup/mingw/include/limits.h winsup/mingw/include/locale.h winsup/mingw/include/malloc.h winsup/mingw/include/math.h winsup/mingw/include/mbctype.h winsup/mingw/include/mbstring.h winsup/mingw/include/mem.h winsup/mingw/include/memory.h winsup/mingw/include/process.h winsup/mingw/include/search.h winsup/mingw/include/setjmp.h winsup/mingw/include/share.h winsup/mingw/include/signal.h winsup/mingw/include/stdint.h winsup/mingw/include/stdio.h winsup/mingw/include/stdlib.h winsup/mingw/include/string.h winsup/mingw/include/strings.h winsup/mingw/include/sys/fcntl.h winsup/mingw/include/sys/file.h winsup/mingw/include/sys/locking.h winsup/mingw/include/sys/param.h winsup/mingw/include/sys/stat.h winsup/mingw/include/sys/time.h winsup/mingw/include/sys/timeb.h winsup/mingw/include/sys/types.h winsup/mingw/include/sys/unistd.h winsup/mingw/include/sys/utime.h winsup/mingw/include/tchar.h winsup/mingw/include/time.h winsup/mingw/include/unistd.h winsup/mingw/include/utime.h winsup/mingw/include/values.h winsup/mingw/include/varargs.h winsup/mingw/include/wchar.h winsup/mingw/include/wctype.h winsup/mingw/init.c winsup/mingw/install-sh winsup/mingw/isascii.c winsup/mingw/iscsym.c winsup/mingw/iscsymf.c winsup/mingw/jamfile winsup/mingw/main.c winsup/mingw/man/dirname.man winsup/mingw/mingwex/Makefile.in winsup/mingw/mingwex/_Exit.c winsup/mingw/mingwex/aclocal.m4 winsup/mingw/mingwex/atoll.c winsup/mingw/mingwex/basename.c winsup/mingw/mingwex/btowc.c winsup/mingw/mingwex/complex/cabs.c winsup/mingw/mingwex/complex/cabsf.c winsup/mingw/mingwex/complex/cabsl.c winsup/mingw/mingwex/complex/cacos.c winsup/mingw/mingwex/complex/cacosf.c winsup/mingw/mingwex/complex/cacosh.c winsup/mingw/mingwex/complex/cacoshf.c winsup/mingw/mingwex/complex/cacoshl.c winsup/mingw/mingwex/complex/cacosl.c winsup/mingw/mingwex/complex/carg.c winsup/mingw/mingwex/complex/cargf.c winsup/mingw/mingwex/complex/cargl.c winsup/mingw/mingwex/complex/casin.c winsup/mingw/mingwex/complex/casinf.c winsup/mingw/mingwex/complex/casinh.c winsup/mingw/mingwex/complex/casinhf.c winsup/mingw/mingwex/complex/casinhl.c winsup/mingw/mingwex/complex/casinl.c winsup/mingw/mingwex/complex/catan.c winsup/mingw/mingwex/complex/catanf.c winsup/mingw/mingwex/complex/catanh.c winsup/mingw/mingwex/complex/catanhf.c winsup/mingw/mingwex/complex/catanhl.c winsup/mingw/mingwex/complex/catanl.c winsup/mingw/mingwex/complex/ccos.c winsup/mingw/mingwex/complex/ccosf.c winsup/mingw/mingwex/complex/ccosh.c winsup/mingw/mingwex/complex/ccoshf.c winsup/mingw/mingwex/complex/ccoshl.c winsup/mingw/mingwex/complex/ccosl.c winsup/mingw/mingwex/complex/cexp.c winsup/mingw/mingwex/complex/cexpf.c winsup/mingw/mingwex/complex/cexpl.c winsup/mingw/mingwex/complex/cimag.c winsup/mingw/mingwex/complex/cimagf.c winsup/mingw/mingwex/complex/cimagl.c winsup/mingw/mingwex/complex/clog.c winsup/mingw/mingwex/complex/clogf.c winsup/mingw/mingwex/complex/clogl.c winsup/mingw/mingwex/complex/cpow.c winsup/mingw/mingwex/complex/cpowf.c winsup/mingw/mingwex/complex/cpowl.c winsup/mingw/mingwex/complex/cproj.c winsup/mingw/mingwex/complex/cprojf.c winsup/mingw/mingwex/complex/cprojl.c winsup/mingw/mingwex/complex/creal.c winsup/mingw/mingwex/complex/crealf.c winsup/mingw/mingwex/complex/creall.c winsup/mingw/mingwex/complex/csin.c winsup/mingw/mingwex/complex/csinf.c winsup/mingw/mingwex/complex/csinh.c winsup/mingw/mingwex/complex/csinhf.c winsup/mingw/mingwex/complex/csinhl.c winsup/mingw/mingwex/complex/csinl.c winsup/mingw/mingwex/complex/csqrt.c winsup/mingw/mingwex/complex/csqrtf.c winsup/mingw/mingwex/complex/csqrtl.c winsup/mingw/mingwex/complex/ctan.c winsup/mingw/mingwex/complex/ctanf.c winsup/mingw/mingwex/complex/ctanh.c winsup/mingw/mingwex/complex/ctanhf.c winsup/mingw/mingwex/complex/ctanhl.c winsup/mingw/mingwex/complex/ctanl.c winsup/mingw/mingwex/configure winsup/mingw/mingwex/configure.in winsup/mingw/mingwex/dirent.c winsup/mingw/mingwex/dirname.c winsup/mingw/mingwex/feclearexcept.c winsup/mingw/mingwex/fegetenv.c winsup/mingw/mingwex/fegetexceptflag.c winsup/mingw/mingwex/fegetround.c winsup/mingw/mingwex/feholdexcept.c winsup/mingw/mingwex/feraiseexcept.c winsup/mingw/mingwex/fesetenv.c winsup/mingw/mingwex/fesetexceptflag.c winsup/mingw/mingwex/fesetround.c winsup/mingw/mingwex/fetestexcept.c winsup/mingw/mingwex/feupdateenv.c winsup/mingw/mingwex/ftruncate.c winsup/mingw/mingwex/fwide.c winsup/mingw/mingwex/gdtoa/README winsup/mingw/mingwex/gdtoa/arithchk.c winsup/mingw/mingwex/gdtoa/dmisc.c winsup/mingw/mingwex/gdtoa/dtoa.c winsup/mingw/mingwex/gdtoa/g__fmt.c winsup/mingw/mingwex/gdtoa/g_dfmt.c winsup/mingw/mingwex/gdtoa/g_ffmt.c winsup/mingw/mingwex/gdtoa/g_xfmt.c winsup/mingw/mingwex/gdtoa/gd_arith.h winsup/mingw/mingwex/gdtoa/gd_qnan.h winsup/mingw/mingwex/gdtoa/gdtoa.c winsup/mingw/mingwex/gdtoa/gdtoa.h winsup/mingw/mingwex/gdtoa/gdtoaimp.h winsup/mingw/mingwex/gdtoa/gethex.c winsup/mingw/mingwex/gdtoa/gmisc.c winsup/mingw/mingwex/gdtoa/hd_init.c winsup/mingw/mingwex/gdtoa/hexnan.c winsup/mingw/mingwex/gdtoa/misc.c winsup/mingw/mingwex/gdtoa/qnan.c winsup/mingw/mingwex/gdtoa/smisc.c winsup/mingw/mingwex/gdtoa/strtodg.c winsup/mingw/mingwex/gdtoa/strtodnrp.c winsup/mingw/mingwex/gdtoa/strtof.c winsup/mingw/mingwex/gdtoa/strtopx.c winsup/mingw/mingwex/gdtoa/sum.c winsup/mingw/mingwex/gdtoa/ulp.c winsup/mingw/mingwex/getopt.c winsup/mingw/mingwex/gettimeofday.c winsup/mingw/mingwex/imaxabs.c winsup/mingw/mingwex/imaxdiv.c winsup/mingw/mingwex/isblank.c winsup/mingw/mingwex/iswblank.c winsup/mingw/mingwex/lltoa.c winsup/mingw/mingwex/lltow.c winsup/mingw/mingwex/math/acosf.c winsup/mingw/mingwex/math/acosh.c winsup/mingw/mingwex/math/acoshf.c winsup/mingw/mingwex/math/acoshl.c winsup/mingw/mingwex/math/acosl.c winsup/mingw/mingwex/math/asinf.c winsup/mingw/mingwex/math/asinh.c winsup/mingw/mingwex/math/asinhf.c winsup/mingw/mingwex/math/asinhl.c winsup/mingw/mingwex/math/asinl.c winsup/mingw/mingwex/math/atan2f.c winsup/mingw/mingwex/math/atan2l.c winsup/mingw/mingwex/math/atanf.c winsup/mingw/mingwex/math/atanh.c winsup/mingw/mingwex/math/atanhf.c winsup/mingw/mingwex/math/atanhl.c winsup/mingw/mingwex/math/atanl.c winsup/mingw/mingwex/math/cbrt.c winsup/mingw/mingwex/math/cbrtf.c winsup/mingw/mingwex/math/cbrtl.c winsup/mingw/mingwex/math/ceilf.S winsup/mingw/mingwex/math/ceill.S winsup/mingw/mingwex/math/cephes_mconf.h winsup/mingw/mingwex/math/copysign.S winsup/mingw/mingwex/math/copysignf.S winsup/mingw/mingwex/math/copysignl.S winsup/mingw/mingwex/math/cosf.S winsup/mingw/mingwex/math/coshf.c winsup/mingw/mingwex/math/coshl.c winsup/mingw/mingwex/math/cosl.S winsup/mingw/mingwex/math/erfl.c winsup/mingw/mingwex/math/exp2.S winsup/mingw/mingwex/math/exp2f.S winsup/mingw/mingwex/math/exp2l.S winsup/mingw/mingwex/math/expf.c winsup/mingw/mingwex/math/expl.c winsup/mingw/mingwex/math/expm1.c winsup/mingw/mingwex/math/expm1f.c winsup/mingw/mingwex/math/expm1l.c winsup/mingw/mingwex/math/fabs.c winsup/mingw/mingwex/math/fabsf.c winsup/mingw/mingwex/math/fabsl.c winsup/mingw/mingwex/math/fastmath.h winsup/mingw/mingwex/math/fdim.c winsup/mingw/mingwex/math/fdimf.c winsup/mingw/mingwex/math/fdiml.c winsup/mingw/mingwex/math/floorf.S winsup/mingw/mingwex/math/floorl.S winsup/mingw/mingwex/math/fma.S winsup/mingw/mingwex/math/fmaf.S winsup/mingw/mingwex/math/fmal.c winsup/mingw/mingwex/math/fmax.c winsup/mingw/mingwex/math/fmaxf.c winsup/mingw/mingwex/math/fmaxl.c winsup/mingw/mingwex/math/fmin.c winsup/mingw/mingwex/math/fminf.c winsup/mingw/mingwex/math/fminl.c winsup/mingw/mingwex/math/fmodf.c winsup/mingw/mingwex/math/fmodl.c winsup/mingw/mingwex/math/fp_consts.c winsup/mingw/mingwex/math/fp_consts.h winsup/mingw/mingwex/math/fp_constsf.c winsup/mingw/mingwex/math/fp_constsl.c winsup/mingw/mingwex/math/fpclassify.c winsup/mingw/mingwex/math/fpclassifyf.c winsup/mingw/mingwex/math/fpclassifyl.c winsup/mingw/mingwex/math/frexpf.c winsup/mingw/mingwex/math/frexpl.S winsup/mingw/mingwex/math/fucom.c winsup/mingw/mingwex/math/hypotf.c winsup/mingw/mingwex/math/hypotl.c winsup/mingw/mingwex/math/ilogb.S winsup/mingw/mingwex/math/ilogbf.S winsup/mingw/mingwex/math/ilogbl.S winsup/mingw/mingwex/math/isnan.c winsup/mingw/mingwex/math/isnanf.c winsup/mingw/mingwex/math/isnanl.c winsup/mingw/mingwex/math/ldexpf.c winsup/mingw/mingwex/math/ldexpl.c winsup/mingw/mingwex/math/lgamma.c winsup/mingw/mingwex/math/lgammaf.c winsup/mingw/mingwex/math/lgammal.c winsup/mingw/mingwex/math/llrint.c winsup/mingw/mingwex/math/llrintf.c winsup/mingw/mingwex/math/llrintl.c winsup/mingw/mingwex/math/log10f.S winsup/mingw/mingwex/math/log10l.S winsup/mingw/mingwex/math/log1p.S winsup/mingw/mingwex/math/log1pf.S winsup/mingw/mingwex/math/log1pl.S winsup/mingw/mingwex/math/log2.S winsup/mingw/mingwex/math/log2f.S winsup/mingw/mingwex/math/log2l.S winsup/mingw/mingwex/math/logb.c winsup/mingw/mingwex/math/logbf.c winsup/mingw/mingwex/math/logbl.c winsup/mingw/mingwex/math/logf.S winsup/mingw/mingwex/math/logl.S winsup/mingw/mingwex/math/lrint.c winsup/mingw/mingwex/math/lrintf.c winsup/mingw/mingwex/math/lrintl.c winsup/mingw/mingwex/math/lround_generic.c winsup/mingw/mingwex/math/modff.c winsup/mingw/mingwex/math/modfl.c winsup/mingw/mingwex/math/nearbyint.S winsup/mingw/mingwex/math/nearbyintf.S winsup/mingw/mingwex/math/nearbyintl.S winsup/mingw/mingwex/math/nextafterf.c winsup/mingw/mingwex/math/nextafterl.c winsup/mingw/mingwex/math/nexttoward.c winsup/mingw/mingwex/math/nexttowardf.c winsup/mingw/mingwex/math/pow.c winsup/mingw/mingwex/math/powf.c winsup/mingw/mingwex/math/powi.c winsup/mingw/mingwex/math/powif.c winsup/mingw/mingwex/math/powil.c winsup/mingw/mingwex/math/powl.c winsup/mingw/mingwex/math/remainder.S winsup/mingw/mingwex/math/remainderf.S winsup/mingw/mingwex/math/remainderl.S winsup/mingw/mingwex/math/remquo.S winsup/mingw/mingwex/math/remquof.S winsup/mingw/mingwex/math/remquol.S winsup/mingw/mingwex/math/rint.c winsup/mingw/mingwex/math/rintf.c winsup/mingw/mingwex/math/rintl.c winsup/mingw/mingwex/math/round_generic.c winsup/mingw/mingwex/math/round_internal.h winsup/mingw/mingwex/math/s_erf.c winsup/mingw/mingwex/math/scalbn.S winsup/mingw/mingwex/math/scalbnf.S winsup/mingw/mingwex/math/scalbnl.S winsup/mingw/mingwex/math/sf_erf.c winsup/mingw/mingwex/math/signbit.c winsup/mingw/mingwex/math/signbitf.c winsup/mingw/mingwex/math/signbitl.c winsup/mingw/mingwex/math/sinf.S winsup/mingw/mingwex/math/sinhf.c winsup/mingw/mingwex/math/sinhl.c winsup/mingw/mingwex/math/sinl.S winsup/mingw/mingwex/math/sqrtf.c winsup/mingw/mingwex/math/sqrtl.c winsup/mingw/mingwex/math/tanf.S winsup/mingw/mingwex/math/tanhf.c winsup/mingw/mingwex/math/tanhl.c winsup/mingw/mingwex/math/tanl.S winsup/mingw/mingwex/math/tgamma.c winsup/mingw/mingwex/math/tgammaf.c winsup/mingw/mingwex/math/tgammal.c winsup/mingw/mingwex/math/trunc.c winsup/mingw/mingwex/math/truncf.c winsup/mingw/mingwex/math/truncl.c winsup/mingw/mingwex/mb_wc_common.h winsup/mingw/mingwex/mbrtowc.c winsup/mingw/mingwex/mbsinit.c winsup/mingw/mingwex/mingw-aligned-malloc.c winsup/mingw/mingwex/mingw-fseek.c winsup/mingw/mingwex/sitest.c winsup/mingw/mingwex/stdio/fopen64.c winsup/mingw/mingwex/stdio/fprintf.c winsup/mingw/mingwex/stdio/fseeko64.c winsup/mingw/mingwex/stdio/ftello64.c winsup/mingw/mingwex/stdio/lseek64.c winsup/mingw/mingwex/stdio/pformat.c winsup/mingw/mingwex/stdio/pformat.h winsup/mingw/mingwex/stdio/printf.c winsup/mingw/mingwex/stdio/snprintf.c winsup/mingw/mingwex/stdio/snwprintf.c winsup/mingw/mingwex/stdio/sprintf.c winsup/mingw/mingwex/stdio/vfprintf.c winsup/mingw/mingwex/stdio/vfscanf.c winsup/mingw/mingwex/stdio/vfwscanf.c winsup/mingw/mingwex/stdio/vprintf.c winsup/mingw/mingwex/stdio/vscanf.c winsup/mingw/mingwex/stdio/vsnprintf.c winsup/mingw/mingwex/stdio/vsnwprintf.c winsup/mingw/mingwex/stdio/vsprintf.c winsup/mingw/mingwex/stdio/vsscanf.c winsup/mingw/mingwex/stdio/vswscanf.c winsup/mingw/mingwex/stdio/vwscanf.c winsup/mingw/mingwex/strtoimax.c winsup/mingw/mingwex/strtoumax.c winsup/mingw/mingwex/tdelete.c winsup/mingw/mingwex/testwmem.c winsup/mingw/mingwex/tfind.c winsup/mingw/mingwex/tsearch.c winsup/mingw/mingwex/tst-aligned-malloc.c winsup/mingw/mingwex/twalk.c winsup/mingw/mingwex/ulltoa.c winsup/mingw/mingwex/ulltow.c winsup/mingw/mingwex/usleep.c winsup/mingw/mingwex/wcrtomb.c winsup/mingw/mingwex/wcstof.c winsup/mingw/mingwex/wcstoimax.c winsup/mingw/mingwex/wcstold.c winsup/mingw/mingwex/wcstoumax.c winsup/mingw/mingwex/wctob.c winsup/mingw/mingwex/wctrans.c winsup/mingw/mingwex/wctype.c winsup/mingw/mingwex/wdirent.c winsup/mingw/mingwex/wmemchr.c winsup/mingw/mingwex/wmemcmp.c winsup/mingw/mingwex/wmemcpy.c winsup/mingw/mingwex/wmemmove.c winsup/mingw/mingwex/wmemset.c winsup/mingw/mingwex/wtoll.c winsup/mingw/mkinstalldirs winsup/mingw/moldname.def.in winsup/mingw/msvcrt.def.in winsup/mingw/mthr.c winsup/mingw/mthr_init.c winsup/mingw/mthr_stub.c winsup/mingw/ofmt_stub.s winsup/mingw/profile/COPYING winsup/mingw/profile/CYGWIN_LICENSE winsup/mingw/profile/Makefile.in winsup/mingw/profile/aclocal.m4 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/testsuite/ChangeLog winsup/testsuite/Makefile.in winsup/testsuite/README winsup/testsuite/aclocal.m4 winsup/testsuite/config/default.exp winsup/testsuite/configure winsup/testsuite/configure.in winsup/testsuite/cygrun.c winsup/testsuite/libltp/include/dataascii.h winsup/testsuite/libltp/include/databin.h winsup/testsuite/libltp/include/file_lock.h winsup/testsuite/libltp/include/forker.h winsup/testsuite/libltp/include/open_flags.h winsup/testsuite/libltp/include/pattern.h winsup/testsuite/libltp/include/random_range.h winsup/testsuite/libltp/include/rmobj.h winsup/testsuite/libltp/include/search_path.h winsup/testsuite/libltp/include/str_to_bytes.h winsup/testsuite/libltp/include/string_to_tokens.h winsup/testsuite/libltp/include/test.h winsup/testsuite/libltp/include/tlibio.h winsup/testsuite/libltp/include/usctest.h winsup/testsuite/libltp/include/write_log.h winsup/testsuite/libltp/lib/dataascii.c winsup/testsuite/libltp/lib/databin.c winsup/testsuite/libltp/lib/datapid.c winsup/testsuite/libltp/lib/forker.c winsup/testsuite/libltp/lib/get_high_address.c winsup/testsuite/libltp/lib/libtestsuite.c winsup/testsuite/libltp/lib/open_flags.c winsup/testsuite/libltp/lib/parse_opts.c winsup/testsuite/libltp/lib/pattern.c winsup/testsuite/libltp/lib/rmobj.c winsup/testsuite/libltp/lib/search_path.c winsup/testsuite/libltp/lib/str_to_bytes.c winsup/testsuite/libltp/lib/string_to_tokens.c winsup/testsuite/libltp/lib/tst_res.c winsup/testsuite/libltp/lib/tst_sig.c winsup/testsuite/libltp/lib/tst_tmpdir.c winsup/testsuite/libltp/lib/write_log.c winsup/testsuite/winsup.api/checksignal.c winsup/testsuite/winsup.api/crlf.c winsup/testsuite/winsup.api/cygload.cc winsup/testsuite/winsup.api/cygload.exp winsup/testsuite/winsup.api/cygload.h winsup/testsuite/winsup.api/devdsp.c winsup/testsuite/winsup.api/devdsp_okay.h winsup/testsuite/winsup.api/devzero.c winsup/testsuite/winsup.api/iospeed.c winsup/testsuite/winsup.api/known_bugs.tcl winsup/testsuite/winsup.api/ltp/access01.c winsup/testsuite/winsup.api/ltp/access03.c winsup/testsuite/winsup.api/ltp/access04.c winsup/testsuite/winsup.api/ltp/access05.c winsup/testsuite/winsup.api/ltp/alarm01.c winsup/testsuite/winsup.api/ltp/alarm02.c winsup/testsuite/winsup.api/ltp/alarm03.c winsup/testsuite/winsup.api/ltp/alarm07.c winsup/testsuite/winsup.api/ltp/asyncio02.c winsup/testsuite/winsup.api/ltp/chdir02.c winsup/testsuite/winsup.api/ltp/chdir04.c winsup/testsuite/winsup.api/ltp/chmod01.c winsup/testsuite/winsup.api/ltp/chmod02.c winsup/testsuite/winsup.api/ltp/chown01.c winsup/testsuite/winsup.api/ltp/close01.c winsup/testsuite/winsup.api/ltp/close02.c winsup/testsuite/winsup.api/ltp/close08.c winsup/testsuite/winsup.api/ltp/creat01.c winsup/testsuite/winsup.api/ltp/creat03.c winsup/testsuite/winsup.api/ltp/creat09.c winsup/testsuite/winsup.api/ltp/dup01.c winsup/testsuite/winsup.api/ltp/dup02.c winsup/testsuite/winsup.api/ltp/dup03.c winsup/testsuite/winsup.api/ltp/dup04.c winsup/testsuite/winsup.api/ltp/dup05.c winsup/testsuite/winsup.api/ltp/execl01.c winsup/testsuite/winsup.api/ltp/execle01.c winsup/testsuite/winsup.api/ltp/execlp01.c winsup/testsuite/winsup.api/ltp/execv01.c winsup/testsuite/winsup.api/ltp/execve01.c winsup/testsuite/winsup.api/ltp/execvp01.c winsup/testsuite/winsup.api/ltp/exit01.c winsup/testsuite/winsup.api/ltp/exit02.c winsup/testsuite/winsup.api/ltp/fchdir01.c winsup/testsuite/winsup.api/ltp/fchdir02.c winsup/testsuite/winsup.api/ltp/fchmod01.c winsup/testsuite/winsup.api/ltp/fchown01.c winsup/testsuite/winsup.api/ltp/fcntl02.c winsup/testsuite/winsup.api/ltp/fcntl03.c winsup/testsuite/winsup.api/ltp/fcntl04.c winsup/testsuite/winsup.api/ltp/fcntl05.c winsup/testsuite/winsup.api/ltp/fcntl07.c winsup/testsuite/winsup.api/ltp/fcntl07B.c winsup/testsuite/winsup.api/ltp/fcntl08.c winsup/testsuite/winsup.api/ltp/fcntl09.c winsup/testsuite/winsup.api/ltp/fcntl10.c winsup/testsuite/winsup.api/ltp/fork01.c winsup/testsuite/winsup.api/ltp/fork02.c winsup/testsuite/winsup.api/ltp/fork03.c winsup/testsuite/winsup.api/ltp/fork04.c winsup/testsuite/winsup.api/ltp/fork06.c winsup/testsuite/winsup.api/ltp/fork07.c winsup/testsuite/winsup.api/ltp/fork09.c winsup/testsuite/winsup.api/ltp/fork10.c winsup/testsuite/winsup.api/ltp/fork11.c winsup/testsuite/winsup.api/ltp/fpathconf01.c winsup/testsuite/winsup.api/ltp/fstat01.c winsup/testsuite/winsup.api/ltp/fstat02.c winsup/testsuite/winsup.api/ltp/fstat03.c winsup/testsuite/winsup.api/ltp/fstat04.c winsup/testsuite/winsup.api/ltp/fsync01.c winsup/testsuite/winsup.api/ltp/ftruncate01.c winsup/testsuite/winsup.api/ltp/ftruncate02.c winsup/testsuite/winsup.api/ltp/ftruncate03.c winsup/testsuite/winsup.api/ltp/getegid01.c winsup/testsuite/winsup.api/ltp/geteuid01.c winsup/testsuite/winsup.api/ltp/getgid01.c winsup/testsuite/winsup.api/ltp/getgid02.c winsup/testsuite/winsup.api/ltp/getgid03.c winsup/testsuite/winsup.api/ltp/getgroups01.c winsup/testsuite/winsup.api/ltp/getgroups02.c winsup/testsuite/winsup.api/ltp/gethostid01.c winsup/testsuite/winsup.api/ltp/gethostname01.c winsup/testsuite/winsup.api/ltp/getpgid01.c winsup/testsuite/winsup.api/ltp/getpgid02.c winsup/testsuite/winsup.api/ltp/getpgrp01.c winsup/testsuite/winsup.api/ltp/getpid01.c winsup/testsuite/winsup.api/ltp/getpid02.c winsup/testsuite/winsup.api/ltp/getppid01.c winsup/testsuite/winsup.api/ltp/getppid02.c winsup/testsuite/winsup.api/ltp/getuid01.c winsup/testsuite/winsup.api/ltp/getuid02.c winsup/testsuite/winsup.api/ltp/getuid03.c winsup/testsuite/winsup.api/ltp/kill01.c winsup/testsuite/winsup.api/ltp/kill02.c winsup/testsuite/winsup.api/ltp/kill03.c winsup/testsuite/winsup.api/ltp/kill04.c winsup/testsuite/winsup.api/ltp/kill09.c winsup/testsuite/winsup.api/ltp/link02.c winsup/testsuite/winsup.api/ltp/link03.c winsup/testsuite/winsup.api/ltp/link04.c winsup/testsuite/winsup.api/ltp/link05.c winsup/testsuite/winsup.api/ltp/lseek01.c winsup/testsuite/winsup.api/ltp/lseek02.c winsup/testsuite/winsup.api/ltp/lseek03.c winsup/testsuite/winsup.api/ltp/lseek04.c winsup/testsuite/winsup.api/ltp/lseek05.c winsup/testsuite/winsup.api/ltp/lseek06.c winsup/testsuite/winsup.api/ltp/lseek07.c winsup/testsuite/winsup.api/ltp/lseek08.c winsup/testsuite/winsup.api/ltp/lseek09.c winsup/testsuite/winsup.api/ltp/lseek10.c winsup/testsuite/winsup.api/ltp/lstat02.c winsup/testsuite/winsup.api/ltp/mkdir01.c winsup/testsuite/winsup.api/ltp/mkdir08.c winsup/testsuite/winsup.api/ltp/mknod01.c winsup/testsuite/winsup.api/ltp/mmap001.c winsup/testsuite/winsup.api/ltp/mmap02.c winsup/testsuite/winsup.api/ltp/mmap03.c winsup/testsuite/winsup.api/ltp/mmap04.c winsup/testsuite/winsup.api/ltp/mmap05.c winsup/testsuite/winsup.api/ltp/mmap06.c winsup/testsuite/winsup.api/ltp/mmap07.c winsup/testsuite/winsup.api/ltp/mmap08.c winsup/testsuite/winsup.api/ltp/munmap01.c winsup/testsuite/winsup.api/ltp/munmap02.c winsup/testsuite/winsup.api/ltp/nice05.c winsup/testsuite/winsup.api/ltp/open02.c winsup/testsuite/winsup.api/ltp/open03.c winsup/testsuite/winsup.api/ltp/pathconf01.c winsup/testsuite/winsup.api/ltp/pause01.c winsup/testsuite/winsup.api/ltp/pipe01.c winsup/testsuite/winsup.api/ltp/pipe08.c winsup/testsuite/winsup.api/ltp/pipe09.c winsup/testsuite/winsup.api/ltp/pipe10.c winsup/testsuite/winsup.api/ltp/pipe11.c winsup/testsuite/winsup.api/ltp/poll01.c winsup/testsuite/winsup.api/ltp/read01.c winsup/testsuite/winsup.api/ltp/read04.c winsup/testsuite/winsup.api/ltp/readdir01.c winsup/testsuite/winsup.api/ltp/readlink01.c winsup/testsuite/winsup.api/ltp/readlink02.c winsup/testsuite/winsup.api/ltp/readlink03.c winsup/testsuite/winsup.api/ltp/rename01.c winsup/testsuite/winsup.api/ltp/rename02.c winsup/testsuite/winsup.api/ltp/rename08.c winsup/testsuite/winsup.api/ltp/rename10.c winsup/testsuite/winsup.api/ltp/rmdir01.c winsup/testsuite/winsup.api/ltp/rmdir04.c winsup/testsuite/winsup.api/ltp/rmdir05.c winsup/testsuite/winsup.api/ltp/sbrk01.c winsup/testsuite/winsup.api/ltp/select01.c winsup/testsuite/winsup.api/ltp/select02.c winsup/testsuite/winsup.api/ltp/select03.c winsup/testsuite/winsup.api/ltp/setgid01.c winsup/testsuite/winsup.api/ltp/setgroups01.c winsup/testsuite/winsup.api/ltp/setpgid01.c winsup/testsuite/winsup.api/ltp/setregid01.c winsup/testsuite/winsup.api/ltp/setreuid01.c winsup/testsuite/winsup.api/ltp/setuid01.c winsup/testsuite/winsup.api/ltp/setuid02.c winsup/testsuite/winsup.api/ltp/signal03.c winsup/testsuite/winsup.api/ltp/stat01.c winsup/testsuite/winsup.api/ltp/stat02.c winsup/testsuite/winsup.api/ltp/stat03.c winsup/testsuite/winsup.api/ltp/stat05.c winsup/testsuite/winsup.api/ltp/stat06.c winsup/testsuite/winsup.api/ltp/symlink01.c winsup/testsuite/winsup.api/ltp/symlink02.c winsup/testsuite/winsup.api/ltp/symlink03.c winsup/testsuite/winsup.api/ltp/symlink04.c winsup/testsuite/winsup.api/ltp/symlink05.c winsup/testsuite/winsup.api/ltp/sync01.c winsup/testsuite/winsup.api/ltp/sync02.c winsup/testsuite/winsup.api/ltp/time01.c winsup/testsuite/winsup.api/ltp/time02.c winsup/testsuite/winsup.api/ltp/times01.c winsup/testsuite/winsup.api/ltp/times02.c winsup/testsuite/winsup.api/ltp/times03.c winsup/testsuite/winsup.api/ltp/truncate01.c winsup/testsuite/winsup.api/ltp/truncate02.c winsup/testsuite/winsup.api/ltp/ulimit01.c winsup/testsuite/winsup.api/ltp/umask01.c winsup/testsuite/winsup.api/ltp/umask02.c winsup/testsuite/winsup.api/ltp/umask03.c winsup/testsuite/winsup.api/ltp/uname01.c winsup/testsuite/winsup.api/ltp/unlink05.c winsup/testsuite/winsup.api/ltp/unlink06.c winsup/testsuite/winsup.api/ltp/unlink07.c winsup/testsuite/winsup.api/ltp/unlink08.c winsup/testsuite/winsup.api/ltp/vfork01.c winsup/testsuite/winsup.api/ltp/wait02.c winsup/testsuite/winsup.api/ltp/wait401.c winsup/testsuite/winsup.api/ltp/wait402.c winsup/testsuite/winsup.api/ltp/write01.c winsup/testsuite/winsup.api/ltp/write02.c winsup/testsuite/winsup.api/ltp/write03.c winsup/testsuite/winsup.api/mmaptest01.c winsup/testsuite/winsup.api/mmaptest02.c winsup/testsuite/winsup.api/mmaptest03.c winsup/testsuite/winsup.api/mmaptest04.c winsup/testsuite/winsup.api/msgtest.c winsup/testsuite/winsup.api/nullgetcwd.c winsup/testsuite/winsup.api/pthread/cancel1.c winsup/testsuite/winsup.api/pthread/cancel10.c winsup/testsuite/winsup.api/pthread/cancel11.c winsup/testsuite/winsup.api/pthread/cancel12.c winsup/testsuite/winsup.api/pthread/cancel2.c winsup/testsuite/winsup.api/pthread/cancel3.c winsup/testsuite/winsup.api/pthread/cancel4.c winsup/testsuite/winsup.api/pthread/cancel5.c winsup/testsuite/winsup.api/pthread/cancel6.c winsup/testsuite/winsup.api/pthread/cancel7.c winsup/testsuite/winsup.api/pthread/cancel8.c winsup/testsuite/winsup.api/pthread/cancel9.c winsup/testsuite/winsup.api/pthread/cleanup2.c winsup/testsuite/winsup.api/pthread/cleanup3.c winsup/testsuite/winsup.api/pthread/condvar1.c winsup/testsuite/winsup.api/pthread/condvar2.c winsup/testsuite/winsup.api/pthread/condvar2_1.c winsup/testsuite/winsup.api/pthread/condvar3.c winsup/testsuite/winsup.api/pthread/condvar3_1.c winsup/testsuite/winsup.api/pthread/condvar3_2.c winsup/testsuite/winsup.api/pthread/condvar3_3.c winsup/testsuite/winsup.api/pthread/condvar4.c winsup/testsuite/winsup.api/pthread/condvar5.c winsup/testsuite/winsup.api/pthread/condvar6.c winsup/testsuite/winsup.api/pthread/condvar7.c winsup/testsuite/winsup.api/pthread/condvar8.c winsup/testsuite/winsup.api/pthread/condvar9.c winsup/testsuite/winsup.api/pthread/count1.c winsup/testsuite/winsup.api/pthread/create1.c winsup/testsuite/winsup.api/pthread/create2.c winsup/testsuite/winsup.api/pthread/equal1.c winsup/testsuite/winsup.api/pthread/exit1.c winsup/testsuite/winsup.api/pthread/exit2.c winsup/testsuite/winsup.api/pthread/exit3.c winsup/testsuite/winsup.api/pthread/inherit1.c winsup/testsuite/winsup.api/pthread/join0.c winsup/testsuite/winsup.api/pthread/join1.c winsup/testsuite/winsup.api/pthread/join2.c winsup/testsuite/winsup.api/pthread/mainthreadexits.c winsup/testsuite/winsup.api/pthread/mutex1.c winsup/testsuite/winsup.api/pthread/mutex1d.c winsup/testsuite/winsup.api/pthread/mutex1e.c winsup/testsuite/winsup.api/pthread/mutex1n.c winsup/testsuite/winsup.api/pthread/mutex1r.c winsup/testsuite/winsup.api/pthread/mutex2.c winsup/testsuite/winsup.api/pthread/mutex3.c winsup/testsuite/winsup.api/pthread/mutex4.c winsup/testsuite/winsup.api/pthread/mutex5.c winsup/testsuite/winsup.api/pthread/mutex6d.c winsup/testsuite/winsup.api/pthread/mutex6e.c winsup/testsuite/winsup.api/pthread/mutex6n.c winsup/testsuite/winsup.api/pthread/mutex6r.c winsup/testsuite/winsup.api/pthread/mutex7.c winsup/testsuite/winsup.api/pthread/mutex7d.c winsup/testsuite/winsup.api/pthread/mutex7e.c winsup/testsuite/winsup.api/pthread/mutex7n.c winsup/testsuite/winsup.api/pthread/mutex7r.c winsup/testsuite/winsup.api/pthread/mutex8e.c winsup/testsuite/winsup.api/pthread/mutex8n.c winsup/testsuite/winsup.api/pthread/mutex8r.c winsup/testsuite/winsup.api/pthread/once1.c winsup/testsuite/winsup.api/pthread/priority1.c winsup/testsuite/winsup.api/pthread/priority2.c winsup/testsuite/winsup.api/pthread/rwlock1.c winsup/testsuite/winsup.api/pthread/rwlock2.c winsup/testsuite/winsup.api/pthread/rwlock3.c winsup/testsuite/winsup.api/pthread/rwlock4.c winsup/testsuite/winsup.api/pthread/rwlock5.c winsup/testsuite/winsup.api/pthread/rwlock6.c winsup/testsuite/winsup.api/pthread/rwlock7.c winsup/testsuite/winsup.api/pthread/self1.c winsup/testsuite/winsup.api/pthread/self2.c winsup/testsuite/winsup.api/pthread/test.h winsup/testsuite/winsup.api/pthread/threadidafterfork.c winsup/testsuite/winsup.api/pthread/tsd1.c winsup/testsuite/winsup.api/resethand.c winsup/testsuite/winsup.api/samples/sample-fail.c winsup/testsuite/winsup.api/samples/sample-miscompile.c winsup/testsuite/winsup.api/samples/sample-pass.c winsup/testsuite/winsup.api/semtest.c winsup/testsuite/winsup.api/shmtest.c winsup/testsuite/winsup.api/sigchld.c winsup/testsuite/winsup.api/signal-into-win32-api.c winsup/testsuite/winsup.api/systemcall.c winsup/testsuite/winsup.api/user_malloc.c winsup/testsuite/winsup.api/waitpid.c winsup/testsuite/winsup.api/winsup.exp winsup/utils/COPYING.dumper winsup/utils/ChangeLog winsup/utils/ChangeLog-2000 winsup/utils/Makefile.in winsup/utils/aclocal.m4 winsup/utils/bloda.cc winsup/utils/configure winsup/utils/configure.in winsup/utils/cygcheck.cc winsup/utils/cygpath.cc winsup/utils/dump_setup.cc winsup/utils/dumper.cc winsup/utils/dumper.h winsup/utils/getfacl.c winsup/utils/kill.cc winsup/utils/mingw winsup/utils/mkgroup.c winsup/utils/mkpasswd.c winsup/utils/module_info.cc winsup/utils/mount.cc winsup/utils/parse_pe.cc winsup/utils/passwd.c winsup/utils/path.cc winsup/utils/path.h winsup/utils/ps.cc winsup/utils/regtool.cc winsup/utils/setfacl.c winsup/utils/setmetamode.c winsup/utils/ssp.c winsup/utils/ssp.txt winsup/utils/strace.cc winsup/utils/testsuite.cc winsup/utils/testsuite.h winsup/utils/umount.cc winsup/utils/utils.sgml winsup/w32api/CONTRIBUTIONS winsup/w32api/ChangeLog winsup/w32api/Makefile.in winsup/w32api/README.w32api winsup/w32api/TODO winsup/w32api/aclocal.m4 winsup/w32api/config.guess winsup/w32api/config.sub winsup/w32api/configure winsup/w32api/configure.in winsup/w32api/include/GL/gl.h winsup/w32api/include/GL/glext.h winsup/w32api/include/GL/glu.h winsup/w32api/include/accctrl.h winsup/w32api/include/aclapi.h winsup/w32api/include/aclui.h winsup/w32api/include/adsprop.h winsup/w32api/include/afxres.h winsup/w32api/include/amaudio.h winsup/w32api/include/amvideo.h winsup/w32api/include/audevcod.h winsup/w32api/include/aviriff.h winsup/w32api/include/aygshell.h winsup/w32api/include/basetsd.h winsup/w32api/include/basetyps.h winsup/w32api/include/bdatypes.h winsup/w32api/include/cderr.h winsup/w32api/include/cguid.h winsup/w32api/include/cmnquery.h winsup/w32api/include/comcat.h winsup/w32api/include/commctrl.h winsup/w32api/include/commdlg.h winsup/w32api/include/control.h winsup/w32api/include/cpl.h winsup/w32api/include/cplext.h winsup/w32api/include/custcntl.h winsup/w32api/include/dbt.h winsup/w32api/include/dde.h winsup/w32api/include/ddeml.h winsup/w32api/include/ddk/atm.h winsup/w32api/include/ddk/batclass.h winsup/w32api/include/ddk/cfg.h winsup/w32api/include/ddk/cfgmgr32.h winsup/w32api/include/ddk/d4drvif.h winsup/w32api/include/ddk/d4iface.h winsup/w32api/include/ddk/ddkmapi.h winsup/w32api/include/ddk/hidclass.h winsup/w32api/include/ddk/hidpi.h winsup/w32api/include/ddk/hidsdi.h winsup/w32api/include/ddk/hidusage.h winsup/w32api/include/ddk/kbdmou.h winsup/w32api/include/ddk/mcd.h winsup/w32api/include/ddk/miniport.h winsup/w32api/include/ddk/minitape.h winsup/w32api/include/ddk/mountdev.h winsup/w32api/include/ddk/mountmgr.h winsup/w32api/include/ddk/ndis.h winsup/w32api/include/ddk/ndisguid.h winsup/w32api/include/ddk/ndistapi.h winsup/w32api/include/ddk/ndiswan.h winsup/w32api/include/ddk/netevent.h winsup/w32api/include/ddk/netpnp.h winsup/w32api/include/ddk/newdev.h winsup/w32api/include/ddk/ntapi.h winsup/w32api/include/ddk/ntdd8042.h winsup/w32api/include/ddk/ntddbeep.h winsup/w32api/include/ddk/ntddcdrm.h winsup/w32api/include/ddk/ntddcdvd.h winsup/w32api/include/ddk/ntddchgr.h winsup/w32api/include/ddk/ntdddisk.h winsup/w32api/include/ddk/ntddk.h winsup/w32api/include/ddk/ntddkbd.h winsup/w32api/include/ddk/ntddmou.h winsup/w32api/include/ddk/ntddndis.h winsup/w32api/include/ddk/ntddpar.h winsup/w32api/include/ddk/ntddpcm.h winsup/w32api/include/ddk/ntddscsi.h winsup/w32api/include/ddk/ntddser.h winsup/w32api/include/ddk/ntddstor.h winsup/w32api/include/ddk/ntddtape.h winsup/w32api/include/ddk/ntddtdi.h winsup/w32api/include/ddk/ntddvdeo.h winsup/w32api/include/ddk/ntddvol.h winsup/w32api/include/ddk/ntifs.h winsup/w32api/include/ddk/ntpoapi.h winsup/w32api/include/ddk/ntstatus.h winsup/w32api/include/ddk/parallel.h winsup/w32api/include/ddk/pfhook.h winsup/w32api/include/ddk/poclass.h winsup/w32api/include/ddk/scsi.h winsup/w32api/include/ddk/scsiscan.h winsup/w32api/include/ddk/scsiwmi.h winsup/w32api/include/ddk/smbus.h winsup/w32api/include/ddk/srb.h winsup/w32api/include/ddk/storport.h winsup/w32api/include/ddk/tdi.h winsup/w32api/include/ddk/tdiinfo.h winsup/w32api/include/ddk/tdikrnl.h winsup/w32api/include/ddk/tdistat.h winsup/w32api/include/ddk/tvout.h winsup/w32api/include/ddk/upssvc.h winsup/w32api/include/ddk/usb.h winsup/w32api/include/ddk/usb100.h winsup/w32api/include/ddk/usbcamdi.h winsup/w32api/include/ddk/usbdi.h winsup/w32api/include/ddk/usbioctl.h winsup/w32api/include/ddk/usbiodef.h winsup/w32api/include/ddk/usbscan.h winsup/w32api/include/ddk/usbuser.h winsup/w32api/include/ddk/video.h winsup/w32api/include/ddk/videoagp.h winsup/w32api/include/ddk/win2k.h winsup/w32api/include/ddk/winddi.h winsup/w32api/include/ddk/winddk.h winsup/w32api/include/ddk/winnt4.h winsup/w32api/include/ddk/winxp.h winsup/w32api/include/ddk/ws2san.h winsup/w32api/include/ddk/xfilter.h winsup/w32api/include/devguid.h winsup/w32api/include/dhcpcsdk.h winsup/w32api/include/directx/d3d9.h winsup/w32api/include/directx/d3d9caps.h winsup/w32api/include/directx/d3d9types.h winsup/w32api/include/directx/dxerr8.h winsup/w32api/include/directx/dxerr9.h winsup/w32api/include/dlgs.h winsup/w32api/include/docobj.h winsup/w32api/include/dsadmin.h winsup/w32api/include/dsclient.h winsup/w32api/include/dsgetdc.h winsup/w32api/include/dshow.h winsup/w32api/include/dsquery.h winsup/w32api/include/dsrole.h winsup/w32api/include/dvdevcod.h winsup/w32api/include/dvdmedia.h winsup/w32api/include/edevdefs.h winsup/w32api/include/errorrep.h winsup/w32api/include/errors.h winsup/w32api/include/evcode.h winsup/w32api/include/exdisp.h winsup/w32api/include/exdispid.h winsup/w32api/include/fltdefs.h winsup/w32api/include/httpext.h winsup/w32api/include/icm.h winsup/w32api/include/idispids.h winsup/w32api/include/il21dec.h winsup/w32api/include/imagehlp.h winsup/w32api/include/imm.h winsup/w32api/include/initguid.h winsup/w32api/include/intshcut.h winsup/w32api/include/ipexport.h winsup/w32api/include/iphlpapi.h winsup/w32api/include/ipifcons.h winsup/w32api/include/ipinfoid.h winsup/w32api/include/iprtrmib.h winsup/w32api/include/iptypes.h winsup/w32api/include/ipxconst.h winsup/w32api/include/ipxrtdef.h winsup/w32api/include/ipxtfflt.h winsup/w32api/include/isguids.h winsup/w32api/include/ks.h winsup/w32api/include/ksmedia.h winsup/w32api/include/largeint.h winsup/w32api/include/lm.h winsup/w32api/include/lmaccess.h winsup/w32api/include/lmalert.h winsup/w32api/include/lmapibuf.h winsup/w32api/include/lmat.h winsup/w32api/include/lmaudit.h winsup/w32api/include/lmbrowsr.h winsup/w32api/include/lmchdev.h winsup/w32api/include/lmconfig.h winsup/w32api/include/lmcons.h winsup/w32api/include/lmerr.h winsup/w32api/include/lmerrlog.h winsup/w32api/include/lmmsg.h winsup/w32api/include/lmremutl.h winsup/w32api/include/lmrepl.h winsup/w32api/include/lmserver.h winsup/w32api/include/lmshare.h winsup/w32api/include/lmsname.h winsup/w32api/include/lmstats.h winsup/w32api/include/lmsvc.h winsup/w32api/include/lmuse.h winsup/w32api/include/lmuseflg.h winsup/w32api/include/lmwksta.h winsup/w32api/include/lzexpand.h winsup/w32api/include/mapi.h winsup/w32api/include/mciavi.h winsup/w32api/include/mcx.h winsup/w32api/include/mgm.h winsup/w32api/include/mgmtapi.h winsup/w32api/include/mlang.h winsup/w32api/include/mmreg.h winsup/w32api/include/mmsystem.h winsup/w32api/include/mpegtype.h winsup/w32api/include/mprapi.h winsup/w32api/include/mq.h winsup/w32api/include/msacm.h winsup/w32api/include/mshtml.h winsup/w32api/include/mswsock.h winsup/w32api/include/nb30.h winsup/w32api/include/nddeapi.h winsup/w32api/include/nspapi.h winsup/w32api/include/ntdef.h winsup/w32api/include/ntdll.h winsup/w32api/include/ntdsapi.h winsup/w32api/include/ntdsbcli.h winsup/w32api/include/ntldap.h winsup/w32api/include/ntsecapi.h winsup/w32api/include/ntsecpkg.h winsup/w32api/include/oaidl.h winsup/w32api/include/objbase.h winsup/w32api/include/objfwd.h winsup/w32api/include/objidl.h winsup/w32api/include/objsafe.h winsup/w32api/include/objsel.h winsup/w32api/include/ocidl.h winsup/w32api/include/odbcinst.h winsup/w32api/include/ole.h winsup/w32api/include/ole2.h winsup/w32api/include/ole2ver.h winsup/w32api/include/oleacc.h winsup/w32api/include/oleauto.h winsup/w32api/include/olectl.h winsup/w32api/include/olectlid.h winsup/w32api/include/oledlg.h winsup/w32api/include/oleidl.h winsup/w32api/include/pbt.h winsup/w32api/include/poppack.h winsup/w32api/include/powrprof.h winsup/w32api/include/prsht.h winsup/w32api/include/psapi.h winsup/w32api/include/pshpack1.h winsup/w32api/include/pshpack2.h winsup/w32api/include/pshpack4.h winsup/w32api/include/pshpack8.h winsup/w32api/include/qedit.h winsup/w32api/include/rapi.h winsup/w32api/include/ras.h winsup/w32api/include/rasdlg.h winsup/w32api/include/raserror.h winsup/w32api/include/rassapi.h winsup/w32api/include/reason.h winsup/w32api/include/regstr.h winsup/w32api/include/richedit.h winsup/w32api/include/richole.h winsup/w32api/include/routprot.h winsup/w32api/include/rpc.h winsup/w32api/include/rpcdce.h winsup/w32api/include/rpcdce2.h winsup/w32api/include/rpcdcep.h winsup/w32api/include/rpcndr.h winsup/w32api/include/rpcnsi.h winsup/w32api/include/rpcnsip.h winsup/w32api/include/rpcnterr.h winsup/w32api/include/rpcproxy.h winsup/w32api/include/rtutils.h winsup/w32api/include/schannel.h winsup/w32api/include/schnlsp.h winsup/w32api/include/scrnsave.h winsup/w32api/include/sddl.h winsup/w32api/include/secext.h winsup/w32api/include/security.h winsup/w32api/include/servprov.h winsup/w32api/include/setupapi.h winsup/w32api/include/shellapi.h winsup/w32api/include/shldisp.h winsup/w32api/include/shlguid.h winsup/w32api/include/shlobj.h winsup/w32api/include/shlwapi.h winsup/w32api/include/snmp.h winsup/w32api/include/specstrings.h winsup/w32api/include/sql.h winsup/w32api/include/sqlext.h winsup/w32api/include/sqltypes.h winsup/w32api/include/sqlucode.h winsup/w32api/include/sspi.h winsup/w32api/include/stm.h winsup/w32api/include/strmif.h winsup/w32api/include/subauth.h winsup/w32api/include/svcguid.h winsup/w32api/include/tlhelp32.h winsup/w32api/include/tmschema.h winsup/w32api/include/unknwn.h winsup/w32api/include/userenv.h winsup/w32api/include/usp10.h winsup/w32api/include/uxtheme.h winsup/w32api/include/vfw.h winsup/w32api/include/vidcap.h winsup/w32api/include/vmr9.h winsup/w32api/include/vptype.h winsup/w32api/include/w32api.h winsup/w32api/include/winable.h winsup/w32api/include/winbase.h winsup/w32api/include/winber.h winsup/w32api/include/wincon.h winsup/w32api/include/wincrypt.h winsup/w32api/include/windef.h winsup/w32api/include/windns.h winsup/w32api/include/windows.h winsup/w32api/include/windowsx.h winsup/w32api/include/winerror.h winsup/w32api/include/wingdi.h winsup/w32api/include/wininet.h winsup/w32api/include/winioctl.h winsup/w32api/include/winldap.h winsup/w32api/include/winnetwk.h winsup/w32api/include/winnls.h winsup/w32api/include/winnt.h winsup/w32api/include/winperf.h winsup/w32api/include/winreg.h winsup/w32api/include/winresrc.h winsup/w32api/include/winsnmp.h winsup/w32api/include/winsock.h winsup/w32api/include/winsock2.h winsup/w32api/include/winspool.h winsup/w32api/include/winsvc.h winsup/w32api/include/winuser.h winsup/w32api/include/winver.h winsup/w32api/include/ws2spi.h winsup/w32api/include/ws2tcpip.h winsup/w32api/include/wsahelp.h winsup/w32api/include/wsipx.h winsup/w32api/include/wsnetbs.h winsup/w32api/include/wtsapi32.h winsup/w32api/include/wtypes.h winsup/w32api/include/xprtdefs.h winsup/w32api/include/zmouse.h winsup/w32api/install-sh winsup/w32api/lib/Makefile.in winsup/w32api/lib/aclui.def winsup/w32api/lib/advapi32.def winsup/w32api/lib/ativscp-uuid.c winsup/w32api/lib/avicap32.def winsup/w32api/lib/avifil32.def winsup/w32api/lib/bthprops.def winsup/w32api/lib/cap.def winsup/w32api/lib/cguid-uuid.c winsup/w32api/lib/comcat-uuid.c winsup/w32api/lib/comctl32.def winsup/w32api/lib/comdlg32.def winsup/w32api/lib/crypt32.def winsup/w32api/lib/ctl3d32.def winsup/w32api/lib/ddk/Makefile.in winsup/w32api/lib/ddk/apcups.def winsup/w32api/lib/ddk/cfgmgr32.def winsup/w32api/lib/ddk/dxapi.def winsup/w32api/lib/ddk/hal.def winsup/w32api/lib/ddk/hid.def winsup/w32api/lib/ddk/hidparse.def winsup/w32api/lib/ddk/mcd.def winsup/w32api/lib/ddk/ndis.def winsup/w32api/lib/ddk/newdev.def winsup/w32api/lib/ddk/ntoskrnl.def winsup/w32api/lib/ddk/scsiport.def winsup/w32api/lib/ddk/tdi.def winsup/w32api/lib/ddk/usbcamd.def winsup/w32api/lib/ddk/usbcamd2.def winsup/w32api/lib/ddk/videoprt.def winsup/w32api/lib/ddk/win32k.def winsup/w32api/lib/devguid.c winsup/w32api/lib/dhcpcsvc.def winsup/w32api/lib/directx/Makefile.in winsup/w32api/lib/directx/d3d8.def winsup/w32api/lib/directx/d3d9.def winsup/w32api/lib/directx/d3dim.def winsup/w32api/lib/directx/d3drm.def winsup/w32api/lib/directx/d3dx8d.def winsup/w32api/lib/directx/d3dx9d.def winsup/w32api/lib/directx/d3dxof.def winsup/w32api/lib/directx/ddraw.def winsup/w32api/lib/directx/dinput.def winsup/w32api/lib/directx/dinput8.def winsup/w32api/lib/directx/dinput_joy.c winsup/w32api/lib/directx/dinput_joy2.c winsup/w32api/lib/directx/dinput_kbd.c winsup/w32api/lib/directx/dinput_mouse.c winsup/w32api/lib/directx/dinput_mouse2.c winsup/w32api/lib/directx/dinput_private.h winsup/w32api/lib/directx/dmoguids.c winsup/w32api/lib/directx/dplayx.def winsup/w32api/lib/directx/dpnaddr.def winsup/w32api/lib/directx/dpnet.def winsup/w32api/lib/directx/dpnlobby.def winsup/w32api/lib/directx/dpvoice.def winsup/w32api/lib/directx/dsetup.def winsup/w32api/lib/directx/dsound.def winsup/w32api/lib/directx/dxerr.c winsup/w32api/lib/directx/dxerr8.c winsup/w32api/lib/directx/dxerr8w.c winsup/w32api/lib/directx/dxerr9.c winsup/w32api/lib/directx/dxerr9w.c winsup/w32api/lib/directx/dxguid.c winsup/w32api/lib/directx/ksproxy.def winsup/w32api/lib/directx/ksuser.c winsup/w32api/lib/directx/ksuser.def winsup/w32api/lib/directx/msdmo.def winsup/w32api/lib/directx/strmiids.c winsup/w32api/lib/directx/test.c winsup/w32api/lib/dlcapi.def winsup/w32api/lib/dnsapi.def winsup/w32api/lib/docobj-uuid.c winsup/w32api/lib/exdisp-uuid.c winsup/w32api/lib/extras-uuid.c winsup/w32api/lib/faultrep.def winsup/w32api/lib/gdi32.def winsup/w32api/lib/glaux.def winsup/w32api/lib/glu32.def winsup/w32api/lib/hlguids-uuid.c winsup/w32api/lib/hlink-uuid.c winsup/w32api/lib/icmui.def winsup/w32api/lib/igmpagnt.def winsup/w32api/lib/imagehlp.def winsup/w32api/lib/imm32.def winsup/w32api/lib/iphlpapi.def winsup/w32api/lib/kernel32.def winsup/w32api/lib/largeint.c winsup/w32api/lib/lz32.def winsup/w32api/lib/mapi32.def winsup/w32api/lib/mfcuia32.def winsup/w32api/lib/mgmtapi.def winsup/w32api/lib/mlang-uuid.c winsup/w32api/lib/mpr.def winsup/w32api/lib/mprapi.def winsup/w32api/lib/mqrt.def winsup/w32api/lib/msacm32.def winsup/w32api/lib/mscms.def winsup/w32api/lib/mshtml-uuid.c winsup/w32api/lib/msimg32.def winsup/w32api/lib/msvcp60.def winsup/w32api/lib/msvfw32.def winsup/w32api/lib/mswsock.def winsup/w32api/lib/msxml-uuid.c winsup/w32api/lib/nddeapi.def winsup/w32api/lib/netapi32.def winsup/w32api/lib/ntdll.def winsup/w32api/lib/oaidl-uuid.c winsup/w32api/lib/objidl-uuid.c winsup/w32api/lib/objsafe-uuid.c winsup/w32api/lib/ocidl-uuid.c winsup/w32api/lib/odbc32.def winsup/w32api/lib/odbccp32.def winsup/w32api/lib/ole32.def winsup/w32api/lib/oleacc-uuid.c winsup/w32api/lib/oleacc.def winsup/w32api/lib/oleaut32.def winsup/w32api/lib/olecli32.def winsup/w32api/lib/olectlid-uuid.c winsup/w32api/lib/oledlg.def winsup/w32api/lib/oleidl-uuid.c winsup/w32api/lib/olepro32.def winsup/w32api/lib/olesvr32.def winsup/w32api/lib/opengl32.def winsup/w32api/lib/penwin32.def winsup/w32api/lib/pkpd32.def winsup/w32api/lib/power-uuid.c winsup/w32api/lib/powrprof.def winsup/w32api/lib/psapi.def winsup/w32api/lib/quartz.def winsup/w32api/lib/rapi.def winsup/w32api/lib/rasapi32.def winsup/w32api/lib/rasdlg.def winsup/w32api/lib/res.rc winsup/w32api/lib/rpcdce4.def winsup/w32api/lib/rpcns4.def winsup/w32api/lib/rpcrt4.def winsup/w32api/lib/rtm.def winsup/w32api/lib/rtutils.def winsup/w32api/lib/scrnsave.c winsup/w32api/lib/secur32.def winsup/w32api/lib/servprov-uuid.c winsup/w32api/lib/setupapi.def winsup/w32api/lib/shell32.c winsup/w32api/lib/shell32.def winsup/w32api/lib/shfolder.def winsup/w32api/lib/shlwapi.def winsup/w32api/lib/snmpapi.def winsup/w32api/lib/svrapi.def winsup/w32api/lib/tapi32.def winsup/w32api/lib/test.c winsup/w32api/lib/th32.def winsup/w32api/lib/thunk32.def winsup/w32api/lib/unknwn-uuid.c winsup/w32api/lib/url.def winsup/w32api/lib/urlmon-uuid.c winsup/w32api/lib/user32.def winsup/w32api/lib/userenv.def winsup/w32api/lib/usp10.def winsup/w32api/lib/uxtheme.def winsup/w32api/lib/vdmdbg.def winsup/w32api/lib/version.def winsup/w32api/lib/vfw32.mri winsup/w32api/lib/win32spl.def winsup/w32api/lib/wininet.def winsup/w32api/lib/winmm.def winsup/w32api/lib/winspool.def winsup/w32api/lib/winstrm.def winsup/w32api/lib/wldap32.def winsup/w32api/lib/wow32.def winsup/w32api/lib/ws2_32.c winsup/w32api/lib/ws2_32.def winsup/w32api/lib/wsnmp32.def winsup/w32api/lib/wsock32.def winsup/w32api/lib/wst.def winsup/w32api/lib/wtsapi32.def
-rwxr-xr-xdjunpack.bat52
-rw-r--r--include/COPYING340
-rw-r--r--include/COPYING3674
-rw-r--r--include/ChangeLog910
-rw-r--r--include/ChangeLog-91032682
-rw-r--r--include/MAINTAINERS1
-rw-r--r--include/alloca-conf.h24
-rw-r--r--include/ansidecl.h393
-rw-r--r--include/aout/ChangeLog231
-rw-r--r--include/aout/adobe.h313
-rw-r--r--include/aout/aout64.h519
-rw-r--r--include/aout/ar.h54
-rw-r--r--include/aout/dynix3.h86
-rw-r--r--include/aout/encap.h134
-rw-r--r--include/aout/host.h42
-rw-r--r--include/aout/hp.h82
-rw-r--r--include/aout/hp300hpux.h119
-rw-r--r--include/aout/hppa.h7
-rw-r--r--include/aout/ranlib.h62
-rw-r--r--include/aout/reloc.h66
-rw-r--r--include/aout/stab.def282
-rw-r--r--include/aout/stab_gnu.h54
-rw-r--r--include/aout/sun4.h235
-rw-r--r--include/bfdlink.h779
-rw-r--r--include/binary-io.h62
-rw-r--r--include/bout.h191
-rw-r--r--include/coff/ChangeLog149
-rw-r--r--include/coff/ChangeLog-91031177
-rw-r--r--include/coff/alpha.h385
-rw-r--r--include/coff/apollo.h124
-rw-r--r--include/coff/arm.h128
-rw-r--r--include/coff/aux-coff.h48
-rw-r--r--include/coff/ecoff.h410
-rw-r--r--include/coff/external.h268
-rw-r--r--include/coff/go32exe.h37
-rw-r--r--include/coff/h8300.h54
-rw-r--r--include/coff/h8500.h46
-rw-r--r--include/coff/i386.h71
-rw-r--r--include/coff/i860.h86
-rw-r--r--include/coff/i960.h319
-rw-r--r--include/coff/ia64.h88
-rw-r--r--include/coff/internal.h809
-rw-r--r--include/coff/m68k.h81
-rw-r--r--include/coff/m88k.h196
-rw-r--r--include/coff/maxq.h56
-rw-r--r--include/coff/mcore.h71
-rw-r--r--include/coff/mips.h343
-rw-r--r--include/coff/mipspe.h66
-rw-r--r--include/coff/or32.h287
-rw-r--r--include/coff/pe.h350
-rw-r--r--include/coff/powerpc.h58
-rw-r--r--include/coff/rs6000.h263
-rw-r--r--include/coff/rs6k64.h260
-rw-r--r--include/coff/sh.h147
-rw-r--r--include/coff/sparc.h155
-rw-r--r--include/coff/sym.h484
-rw-r--r--include/coff/symconst.h177
-rw-r--r--include/coff/ti.h544
-rw-r--r--include/coff/tic30.h50
-rw-r--r--include/coff/tic4x.h46
-rw-r--r--include/coff/tic54x.h59
-rw-r--r--include/coff/tic80.h122
-rw-r--r--include/coff/w65.h46
-rw-r--r--include/coff/we32k.h60
-rw-r--r--include/coff/x86_64.h54
-rw-r--r--include/coff/xcoff.h639
-rw-r--r--include/coff/z80.h51
-rw-r--r--include/coff/z8k.h48
-rw-r--r--include/demangle.h610
-rw-r--r--include/dis-asm.h356
-rw-r--r--include/dyn-string.h60
-rw-r--r--include/elf/ChangeLog946
-rw-r--r--include/elf/ChangeLog-91031948
-rw-r--r--include/elf/alpha.h130
-rw-r--r--include/elf/arc.h56
-rw-r--r--include/elf/arm.h294
-rw-r--r--include/elf/avr.h74
-rw-r--r--include/elf/bfin.h92
-rw-r--r--include/elf/common.h831
-rw-r--r--include/elf/cr16.h62
-rw-r--r--include/elf/cr16c.h258
-rw-r--r--include/elf/cris.h193
-rw-r--r--include/elf/crx.h53
-rw-r--r--include/elf/d10v.h38
-rw-r--r--include/elf/d30v.h42
-rw-r--r--include/elf/dlx.h53
-rw-r--r--include/elf/dwarf.h324
-rw-r--r--include/elf/dwarf2.h843
-rw-r--r--include/elf/external.h288
-rw-r--r--include/elf/fr30.h42
-rw-r--r--include/elf/frv.h130
-rw-r--r--include/elf/h8.h100
-rw-r--r--include/elf/hppa.h634
-rw-r--r--include/elf/i370.h68
-rw-r--r--include/elf/i386.h78
-rw-r--r--include/elf/i860.h66
-rw-r--r--include/elf/i960.h37
-rw-r--r--include/elf/ia64.h283
-rw-r--r--include/elf/internal.h333
-rw-r--r--include/elf/ip2k.h62
-rw-r--r--include/elf/iq2000.h58
-rw-r--r--include/elf/m32c.h67
-rw-r--r--include/elf/m32r.h123
-rw-r--r--include/elf/m68hc11.h95
-rw-r--r--include/elf/m68k.h82
-rw-r--r--include/elf/mcore.h46
-rw-r--r--include/elf/mep.h84
-rw-r--r--include/elf/mips.h1045
-rw-r--r--include/elf/mmix.h171
-rw-r--r--include/elf/mn10200.h39
-rw-r--r--include/elf/mn10300.h71
-rw-r--r--include/elf/msp430.h58
-rw-r--r--include/elf/mt.h46
-rw-r--r--include/elf/openrisc.h39
-rw-r--r--include/elf/or32.h62
-rw-r--r--include/elf/pj.h44
-rw-r--r--include/elf/ppc.h196
-rw-r--r--include/elf/ppc64.h156
-rw-r--r--include/elf/reloc-macros.h129
-rw-r--r--include/elf/s390.h125
-rw-r--r--include/elf/score.h123
-rw-r--r--include/elf/sh.h233
-rw-r--r--include/elf/sparc.h186
-rw-r--r--include/elf/spu.h60
-rw-r--r--include/elf/v850.h122
-rw-r--r--include/elf/vax.h51
-rw-r--r--include/elf/vxworks.h33
-rw-r--r--include/elf/x86-64.h87
-rw-r--r--include/elf/xc16x.h41
-rw-r--r--include/elf/xstormy16.h57
-rw-r--r--include/elf/xtensa.h208
-rw-r--r--include/fibheap.h86
-rw-r--r--include/filenames.h60
-rw-r--r--include/floatformat.h149
-rw-r--r--include/fnmatch.h70
-rw-r--r--include/fopen-bin.h27
-rw-r--r--include/fopen-same.h27
-rw-r--r--include/fopen-vms.h24
-rw-r--r--include/gdb/ChangeLog179
-rw-r--r--include/gdb/callback.h326
-rw-r--r--include/gdb/fileio.h144
-rw-r--r--include/gdb/remote-sim.h281
-rw-r--r--include/gdb/signals.h234
-rw-r--r--include/gdb/sim-arm.h112
-rw-r--r--include/gdb/sim-cr16.h106
-rw-r--r--include/gdb/sim-d10v.h141
-rw-r--r--include/gdb/sim-frv.h51
-rw-r--r--include/gdb/sim-h8300.h77
-rw-r--r--include/gdb/sim-m32c.h62
-rw-r--r--include/gdb/sim-ppc.h773
-rw-r--r--include/gdb/sim-sh.h169
-rw-r--r--include/gdbm.h91
-rw-r--r--include/getopt.h144
-rw-r--r--include/hashtab.h206
-rw-r--r--include/hp-symtab.h1866
-rw-r--r--include/ieee.h165
-rw-r--r--include/libiberty.h662
-rw-r--r--include/md5.h149
-rw-r--r--include/nlm/ChangeLog100
-rw-r--r--include/nlm/alpha-ext.h166
-rw-r--r--include/nlm/common.h123
-rw-r--r--include/nlm/external.h174
-rw-r--r--include/nlm/i386-ext.h116
-rw-r--r--include/nlm/internal.h309
-rw-r--r--include/nlm/ppc-ext.h163
-rw-r--r--include/nlm/sparc32-ext.h120
-rw-r--r--include/oasys.h192
-rw-r--r--include/objalloc.h115
-rw-r--r--include/obstack.h545
-rw-r--r--include/opcode/ChangeLog829
-rw-r--r--include/opcode/ChangeLog-91033121
-rw-r--r--include/opcode/alpha.h237
-rw-r--r--include/opcode/arc.h323
-rw-r--r--include/opcode/arm.h212
-rw-r--r--include/opcode/avr.h284
-rwxr-xr-xinclude/opcode/bfin.h1693
-rw-r--r--include/opcode/cgen-bitset.h55
-rw-r--r--include/opcode/cgen.h1473
-rw-r--r--include/opcode/convex.h1707
-rw-r--r--include/opcode/cr16.h438
-rw-r--r--include/opcode/cris.h366
-rw-r--r--include/opcode/crx.h418
-rw-r--r--include/opcode/d10v.h208
-rw-r--r--include/opcode/d30v.h286
-rw-r--r--include/opcode/dlx.h282
-rw-r--r--include/opcode/h8300.h1894
-rw-r--r--include/opcode/hppa.h1090
-rw-r--r--include/opcode/i370.h265
-rw-r--r--include/opcode/i386.h115
-rw-r--r--include/opcode/i860.h507
-rw-r--r--include/opcode/i960.h525
-rw-r--r--include/opcode/ia64.h397
-rw-r--r--include/opcode/m68hc11.h427
-rw-r--r--include/opcode/m68k.h378
-rw-r--r--include/opcode/m88k.h454
-rw-r--r--include/opcode/maxq.h1132
-rw-r--r--include/opcode/mips.h1100
-rw-r--r--include/opcode/mmix.h186
-rw-r--r--include/opcode/mn10200.h110
-rw-r--r--include/opcode/mn10300.h169
-rw-r--r--include/opcode/msp430.h125
-rw-r--r--include/opcode/np1.h422
-rw-r--r--include/opcode/ns32k.h487
-rw-r--r--include/opcode/or32.h180
-rw-r--r--include/opcode/pdp11.h85
-rw-r--r--include/opcode/pj.h49
-rw-r--r--include/opcode/pn.h282
-rw-r--r--include/opcode/ppc.h349
-rw-r--r--include/opcode/pyr.h305
-rw-r--r--include/opcode/s390.h148
-rw-r--r--include/opcode/score-datadep.h282
-rw-r--r--include/opcode/score-inst.h507
-rw-r--r--include/opcode/sparc.h237
-rw-r--r--include/opcode/spu-insns.h417
-rw-r--r--include/opcode/spu.h126
-rw-r--r--include/opcode/tahoe.h213
-rw-r--r--include/opcode/tic30.h691
-rw-r--r--include/opcode/tic4x.h1079
-rw-r--r--include/opcode/tic54x.h163
-rw-r--r--include/opcode/tic80.h282
-rw-r--r--include/opcode/v850.h166
-rw-r--r--include/opcode/vax.h382
-rw-r--r--include/os9k.h181
-rw-r--r--include/partition.h82
-rw-r--r--include/plugin-api.h242
-rw-r--r--include/progress.h37
-rw-r--r--include/safe-ctype.h150
-rw-r--r--include/sha1.h141
-rw-r--r--include/sort.h48
-rw-r--r--include/splay-tree.h152
-rw-r--r--include/symcat.h49
-rw-r--r--include/xregex.h28
-rw-r--r--include/xregex2.h565
-rw-r--r--include/xtensa-config.h172
-rw-r--r--include/xtensa-isa-internal.h234
-rw-r--r--include/xtensa-isa.h813
-rw-r--r--winsup/COPYING340
-rw-r--r--winsup/CYGWIN_LICENSE66
-rw-r--r--winsup/ChangeLog482
-rw-r--r--winsup/Makefile.common195
-rw-r--r--winsup/Makefile.in140
-rw-r--r--winsup/README9
-rw-r--r--winsup/acinclude.m443
-rw-r--r--winsup/aclocal.m476
-rwxr-xr-xwinsup/configure4847
-rwxr-xr-xwinsup/configure.in80
-rw-r--r--winsup/cygserver/ChangeLog583
-rw-r--r--winsup/cygserver/Makefile.in91
-rw-r--r--winsup/cygserver/README230
-rw-r--r--winsup/cygserver/aclocal.m4875
-rw-r--r--winsup/cygserver/bsd_helper.cc691
-rw-r--r--winsup/cygserver/bsd_helper.h66
-rw-r--r--winsup/cygserver/bsd_log.cc95
-rw-r--r--winsup/cygserver/bsd_log.h33
-rw-r--r--winsup/cygserver/bsd_mutex.cc386
-rw-r--r--winsup/cygserver/bsd_mutex.h52
-rw-r--r--winsup/cygserver/client.cc547
-rwxr-xr-xwinsup/cygserver/configure5240
-rw-r--r--winsup/cygserver/configure.in75
-rwxr-xr-xwinsup/cygserver/cygserver-config209
-rw-r--r--winsup/cygserver/cygserver.cc770
-rw-r--r--winsup/cygserver/cygserver.conf147
-rw-r--r--winsup/cygserver/msg.cc117
-rw-r--r--winsup/cygserver/process.cc500
-rw-r--r--winsup/cygserver/process.h179
-rw-r--r--winsup/cygserver/sem.cc107
-rw-r--r--winsup/cygserver/setpwd.cc104
-rw-r--r--winsup/cygserver/shm.cc124
-rw-r--r--winsup/cygserver/sysv_msg.cc1215
-rw-r--r--winsup/cygserver/sysv_sem.cc1389
-rw-r--r--winsup/cygserver/sysv_shm.cc1046
-rw-r--r--winsup/cygserver/threaded_queue.cc410
-rw-r--r--winsup/cygserver/threaded_queue.h127
-rw-r--r--winsup/cygserver/transport.cc49
-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/woutsup.h71
-rw-r--r--winsup/cygwin/ChangeLog3277
-rw-r--r--winsup/cygwin/ChangeLog-1995177
-rw-r--r--winsup/cygwin/ChangeLog-19962031
-rw-r--r--winsup/cygwin/ChangeLog-19972800
-rw-r--r--winsup/cygwin/ChangeLog-19984490
-rw-r--r--winsup/cygwin/ChangeLog-19993562
-rw-r--r--winsup/cygwin/ChangeLog-20004150
-rw-r--r--winsup/cygwin/ChangeLog-20015337
-rw-r--r--winsup/cygwin/ChangeLog-20026655
-rw-r--r--winsup/cygwin/ChangeLog-20035678
-rw-r--r--winsup/cygwin/ChangeLog-20043848
-rw-r--r--winsup/cygwin/ChangeLog-20055813
-rw-r--r--winsup/cygwin/ChangeLog-20063571
-rw-r--r--winsup/cygwin/ChangeLog-20072769
-rw-r--r--winsup/cygwin/Makefile.in478
-rw-r--r--winsup/cygwin/ROADMAP129
-rw-r--r--winsup/cygwin/acconfig.h14
-rw-r--r--winsup/cygwin/aclocal.m4875
-rwxr-xr-xwinsup/cygwin/analyze_sigfe80
-rw-r--r--winsup/cygwin/assert.cc63
-rw-r--r--winsup/cygwin/autoload.cc456
-rw-r--r--winsup/cygwin/automode.c26
-rw-r--r--winsup/cygwin/binmode.c21
-rw-r--r--winsup/cygwin/child_info.h146
-rw-r--r--winsup/cygwin/config.h.in53
-rw-r--r--winsup/cygwin/config/i386/profile.h58
-rwxr-xr-xwinsup/cygwin/configure6807
-rw-r--r--winsup/cygwin/configure.in119
-rw-r--r--winsup/cygwin/cpuid.h35
-rw-r--r--winsup/cygwin/crt0.c55
-rw-r--r--winsup/cygwin/ctype.cc112
-rw-r--r--winsup/cygwin/cxx.cc56
-rw-r--r--winsup/cygwin/cygerrno.h52
-rw-r--r--winsup/cygwin/cygheap.cc450
-rw-r--r--winsup/cygwin/cygheap.h440
-rw-r--r--winsup/cygwin/cyglsa.h213
-rwxr-xr-xwinsup/cygwin/cygmagic34
-rw-r--r--winsup/cygwin/cygmalloc.h36
-rw-r--r--winsup/cygwin/cygserver.h191
-rw-r--r--winsup/cygwin/cygserver_ipc.h84
-rw-r--r--winsup/cygwin/cygserver_msg.h91
-rw-r--r--winsup/cygwin/cygserver_sem.h87
-rw-r--r--winsup/cygwin/cygserver_setpwd.h53
-rw-r--r--winsup/cygwin/cygserver_shm.h98
-rw-r--r--winsup/cygwin/cygthread.cc510
-rw-r--r--winsup/cygwin/cygthread.h57
-rw-r--r--winsup/cygwin/cygtls.cc246
-rw-r--r--winsup/cygwin/cygtls.h307
-rwxr-xr-xwinsup/cygwin/cygwin-shilka8
-rw-r--r--winsup/cygwin/cygwin.din1777
-rw-r--r--winsup/cygwin/cygwin.sc141
-rw-r--r--winsup/cygwin/cygwin_version.h31
-rw-r--r--winsup/cygwin/dcrt0.cc1222
-rw-r--r--winsup/cygwin/debug.cc242
-rw-r--r--winsup/cygwin/debug.h95
-rw-r--r--winsup/cygwin/devices.cc43495
-rw-r--r--winsup/cygwin/devices.h297
-rw-r--r--winsup/cygwin/devices.in200
-rw-r--r--winsup/cygwin/dir.cc331
-rw-r--r--winsup/cygwin/dlfcn.cc162
-rw-r--r--winsup/cygwin/dll_init.cc462
-rw-r--r--winsup/cygwin/dll_init.h93
-rw-r--r--winsup/cygwin/dll_init.sgml11
-rwxr-xr-xwinsup/cygwin/dllfixdbg75
-rw-r--r--winsup/cygwin/dlmalloc.c3815
-rw-r--r--winsup/cygwin/dlmalloc.h93
-rw-r--r--winsup/cygwin/dtable.cc978
-rw-r--r--winsup/cygwin/dtable.h93
-rw-r--r--winsup/cygwin/dtable.sgml20
-rw-r--r--winsup/cygwin/environ.cc1153
-rw-r--r--winsup/cygwin/environ.h49
-rw-r--r--winsup/cygwin/errno.cc363
-rw-r--r--winsup/cygwin/exceptions.cc1434
-rw-r--r--winsup/cygwin/exec.cc93
-rw-r--r--winsup/cygwin/external.cc372
-rw-r--r--winsup/cygwin/external.sgml18
-rw-r--r--winsup/cygwin/fcntl.cc98
-rw-r--r--winsup/cygwin/fhandler.cc1786
-rw-r--r--winsup/cygwin/fhandler.h1427
-rw-r--r--winsup/cygwin/fhandler_clipboard.cc296
-rw-r--r--winsup/cygwin/fhandler_console.cc1932
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc2139
-rw-r--r--winsup/cygwin/fhandler_dsp.cc1374
-rw-r--r--winsup/cygwin/fhandler_fifo.cc189
-rw-r--r--winsup/cygwin/fhandler_floppy.cc537
-rw-r--r--winsup/cygwin/fhandler_mailslot.cc170
-rw-r--r--winsup/cygwin/fhandler_mem.cc282
-rw-r--r--winsup/cygwin/fhandler_netdrive.cc332
-rw-r--r--winsup/cygwin/fhandler_nodevice.cc27
-rw-r--r--winsup/cygwin/fhandler_proc.cc1176
-rw-r--r--winsup/cygwin/fhandler_process.cc957
-rw-r--r--winsup/cygwin/fhandler_procnet.cc302
-rw-r--r--winsup/cygwin/fhandler_random.cc188
-rw-r--r--winsup/cygwin/fhandler_raw.cc201
-rw-r--r--winsup/cygwin/fhandler_registry.cc960
-rw-r--r--winsup/cygwin/fhandler_serial.cc1128
-rw-r--r--winsup/cygwin/fhandler_socket.cc1882
-rw-r--r--winsup/cygwin/fhandler_tape.cc1483
-rw-r--r--winsup/cygwin/fhandler_termios.cc361
-rw-r--r--winsup/cygwin/fhandler_tty.cc1493
-rw-r--r--winsup/cygwin/fhandler_virtual.cc281
-rw-r--r--winsup/cygwin/fhandler_windows.cc144
-rw-r--r--winsup/cygwin/fhandler_zero.cc54
-rw-r--r--winsup/cygwin/flock.cc1504
-rw-r--r--winsup/cygwin/fork.cc777
-rw-r--r--winsup/cygwin/gcrt0.c41
-rwxr-xr-xwinsup/cygwin/gendef463
-rwxr-xr-xwinsup/cygwin/gendevices159
-rwxr-xr-xwinsup/cygwin/gentls_offsets90
-rw-r--r--winsup/cygwin/glob.cc980
-rw-r--r--winsup/cygwin/gmon.c285
-rw-r--r--winsup/cygwin/gmon.h166
-rw-r--r--winsup/cygwin/grp.cc513
-rw-r--r--winsup/cygwin/heap.cc175
-rw-r--r--winsup/cygwin/heap.h20
-rw-r--r--winsup/cygwin/hires.h53
-rw-r--r--winsup/cygwin/hookapi.cc304
-rw-r--r--winsup/cygwin/how-autoload-works.txt66
-rw-r--r--winsup/cygwin/how-cygheap-works.txt120
-rw-r--r--winsup/cygwin/how-cygtls-works.txt75
-rw-r--r--winsup/cygwin/how-fhandlers-work.txt75
-rw-r--r--winsup/cygwin/how-signals-work.txt158
-rw-r--r--winsup/cygwin/how-spawn-works.txt32
-rw-r--r--winsup/cygwin/how-to-debug-cygwin.txt128
-rw-r--r--winsup/cygwin/how-vfork-works.txt36
-rw-r--r--winsup/cygwin/include/a.out.h431
-rw-r--r--winsup/cygwin/include/arpa/ftp.h109
-rw-r--r--winsup/cygwin/include/arpa/inet.h37
-rwxr-xr-xwinsup/cygwin/include/arpa/nameser.h563
-rwxr-xr-xwinsup/cygwin/include/arpa/nameser_compat.h231
-rw-r--r--winsup/cygwin/include/arpa/telnet.h322
-rw-r--r--winsup/cygwin/include/asm/byteorder.h96
-rw-r--r--winsup/cygwin/include/asm/socket.h76
-rw-r--r--winsup/cygwin/include/asm/types.h23
-rw-r--r--winsup/cygwin/include/attr/xattr.h46
-rw-r--r--winsup/cygwin/include/byteswap.h39
-rw-r--r--winsup/cygwin/include/ctype.h79
-rw-r--r--winsup/cygwin/include/cygwin/_types.h16
-rw-r--r--winsup/cygwin/include/cygwin/acl.h98
-rw-r--r--winsup/cygwin/include/cygwin/config.h71
-rw-r--r--winsup/cygwin/include/cygwin/core_dump.h73
-rw-r--r--winsup/cygwin/include/cygwin/cygwin_dll.h94
-rw-r--r--winsup/cygwin/include/cygwin/fs.h20
-rw-r--r--winsup/cygwin/include/cygwin/grp.h48
-rw-r--r--winsup/cygwin/include/cygwin/hdreg.h24
-rw-r--r--winsup/cygwin/include/cygwin/icmp.h1
-rw-r--r--winsup/cygwin/include/cygwin/if.h123
-rw-r--r--winsup/cygwin/include/cygwin/in.h263
-rw-r--r--winsup/cygwin/include/cygwin/in6.h119
-rw-r--r--winsup/cygwin/include/cygwin/in_systm.h34
-rw-r--r--winsup/cygwin/include/cygwin/ipc.h71
-rw-r--r--winsup/cygwin/include/cygwin/kd.h20
-rw-r--r--winsup/cygwin/include/cygwin/msg.h102
-rw-r--r--winsup/cygwin/include/cygwin/mtio.h313
-rw-r--r--winsup/cygwin/include/cygwin/rdevio.h42
-rw-r--r--winsup/cygwin/include/cygwin/sem.h128
-rw-r--r--winsup/cygwin/include/cygwin/shm.h106
-rw-r--r--winsup/cygwin/include/cygwin/signal.h281
-rw-r--r--winsup/cygwin/include/cygwin/socket.h295
-rw-r--r--winsup/cygwin/include/cygwin/sockios.h1
-rw-r--r--winsup/cygwin/include/cygwin/stat.h102
-rw-r--r--winsup/cygwin/include/cygwin/stdlib.h77
-rw-r--r--winsup/cygwin/include/cygwin/sys_time.h27
-rw-r--r--winsup/cygwin/include/cygwin/sysproto.h94
-rw-r--r--winsup/cygwin/include/cygwin/time.h40
-rw-r--r--winsup/cygwin/include/cygwin/types.h252
-rw-r--r--winsup/cygwin/include/cygwin/utmp.h40
-rw-r--r--winsup/cygwin/include/cygwin/version.h415
-rw-r--r--winsup/cygwin/include/cygwin/wait.h34
-rw-r--r--winsup/cygwin/include/dlfcn.h42
-rw-r--r--winsup/cygwin/include/elf.h25
-rw-r--r--winsup/cygwin/include/endian.h40
-rw-r--r--winsup/cygwin/include/err.h33
-rw-r--r--winsup/cygwin/include/exceptions.h115
-rw-r--r--winsup/cygwin/include/fcntl.h42
-rw-r--r--winsup/cygwin/include/features.h35
-rw-r--r--winsup/cygwin/include/fnmatch.h63
-rw-r--r--winsup/cygwin/include/fts.h153
-rw-r--r--winsup/cygwin/include/ftw.h71
-rw-r--r--winsup/cygwin/include/getopt.h92
-rw-r--r--winsup/cygwin/include/glob.h116
-rw-r--r--winsup/cygwin/include/icmp.h1
-rw-r--r--winsup/cygwin/include/ifaddrs.h57
-rw-r--r--winsup/cygwin/include/inttypes.h247
-rw-r--r--winsup/cygwin/include/io.h29
-rw-r--r--winsup/cygwin/include/lastlog.h22
-rw-r--r--winsup/cygwin/include/libgen.h23
-rw-r--r--winsup/cygwin/include/limits.h491
-rw-r--r--winsup/cygwin/include/machine/stdlib.h22
-rw-r--r--winsup/cygwin/include/mapi.h102
-rw-r--r--winsup/cygwin/include/memory.h17
-rw-r--r--winsup/cygwin/include/mntent.h48
-rw-r--r--winsup/cygwin/include/mqueue.h45
-rw-r--r--winsup/cygwin/include/net/if.h16
-rw-r--r--winsup/cygwin/include/netdb.h233
-rw-r--r--winsup/cygwin/include/netinet/in.h28
-rw-r--r--winsup/cygwin/include/netinet/in_systm.h16
-rw-r--r--winsup/cygwin/include/netinet/ip.h202
-rw-r--r--winsup/cygwin/include/netinet/ip_icmp.h16
-rw-r--r--winsup/cygwin/include/netinet/tcp.h144
-rw-r--r--winsup/cygwin/include/netinet/udp.h51
-rw-r--r--winsup/cygwin/include/paths.h30
-rw-r--r--winsup/cygwin/include/poll.h11
-rw-r--r--winsup/cygwin/include/pthread.h202
-rw-r--r--winsup/cygwin/include/pty.h18
-rwxr-xr-xwinsup/cygwin/include/resolv.h461
-rw-r--r--winsup/cygwin/include/sched.h64
-rw-r--r--winsup/cygwin/include/search.h76
-rw-r--r--winsup/cygwin/include/semaphore.h45
-rw-r--r--winsup/cygwin/include/stdint.h182
-rw-r--r--winsup/cygwin/include/strings.h37
-rw-r--r--winsup/cygwin/include/sys/acl.h17
-rw-r--r--winsup/cygwin/include/sys/copying.dj41
-rw-r--r--winsup/cygwin/include/sys/cygwin.h328
-rw-r--r--winsup/cygwin/include/sys/dirent.h111
-rw-r--r--winsup/cygwin/include/sys/elf32.h156
-rw-r--r--winsup/cygwin/include/sys/elf64.h172
-rw-r--r--winsup/cygwin/include/sys/elf_common.h299
-rw-r--r--winsup/cygwin/include/sys/elf_generic.h91
-rw-r--r--winsup/cygwin/include/sys/file.h54
-rw-r--r--winsup/cygwin/include/sys/ioctl.h69
-rw-r--r--winsup/cygwin/include/sys/ipc.h18
-rw-r--r--winsup/cygwin/include/sys/kd.h20
-rw-r--r--winsup/cygwin/include/sys/lock.h54
-rw-r--r--winsup/cygwin/include/sys/mman.h77
-rw-r--r--winsup/cygwin/include/sys/mount.h45
-rw-r--r--winsup/cygwin/include/sys/msg.h18
-rw-r--r--winsup/cygwin/include/sys/mtio.h18
-rw-r--r--winsup/cygwin/include/sys/param.h80
-rw-r--r--winsup/cygwin/include/sys/poll.h45
-rw-r--r--winsup/cygwin/include/sys/procfs.h18
-rw-r--r--winsup/cygwin/include/sys/queue.h512
-rw-r--r--winsup/cygwin/include/sys/resource.h84
-rw-r--r--winsup/cygwin/include/sys/select.h41
-rw-r--r--winsup/cygwin/include/sys/sem.h18
-rw-r--r--winsup/cygwin/include/sys/shm.h18
-rw-r--r--winsup/cygwin/include/sys/smallprint.h27
-rw-r--r--winsup/cygwin/include/sys/socket.h58
-rw-r--r--winsup/cygwin/include/sys/soundcard.h1287
-rw-r--r--winsup/cygwin/include/sys/statfs.h11
-rw-r--r--winsup/cygwin/include/sys/statvfs.h44
-rw-r--r--winsup/cygwin/include/sys/stdio.h44
-rw-r--r--winsup/cygwin/include/sys/strace.h156
-rw-r--r--winsup/cygwin/include/sys/syslimits.h20
-rw-r--r--winsup/cygwin/include/sys/syslog.h143
-rw-r--r--winsup/cygwin/include/sys/sysmacros.h24
-rw-r--r--winsup/cygwin/include/sys/sysproto.h18
-rw-r--r--winsup/cygwin/include/sys/termio.h12
-rw-r--r--winsup/cygwin/include/sys/termios.h352
-rw-r--r--winsup/cygwin/include/sys/ttychars.h1
-rw-r--r--winsup/cygwin/include/sys/uio.h38
-rw-r--r--winsup/cygwin/include/sys/un.h28
-rw-r--r--winsup/cygwin/include/sys/utime.h30
-rw-r--r--winsup/cygwin/include/sys/utmp.h54
-rw-r--r--winsup/cygwin/include/sys/utsname.h33
-rw-r--r--winsup/cygwin/include/sys/vfs.h38
-rw-r--r--winsup/cygwin/include/sys/wait.h55
-rw-r--r--winsup/cygwin/include/sysexits.h118
-rw-r--r--winsup/cygwin/include/syslog.h16
-rw-r--r--winsup/cygwin/include/termio.h16
-rw-r--r--winsup/cygwin/include/tzfile.h51
-rw-r--r--winsup/cygwin/include/utmpx.h55
-rw-r--r--winsup/cygwin/include/wait.h16
-rw-r--r--winsup/cygwin/init.cc161
-rw-r--r--winsup/cygwin/ioctl.cc63
-rw-r--r--winsup/cygwin/ipc.cc91
-rw-r--r--winsup/cygwin/kernel32.cc439
-rw-r--r--winsup/cygwin/lib/_cygwin_crt0_common.cc103
-rw-r--r--winsup/cygwin/lib/crt0.h23
-rw-r--r--winsup/cygwin/lib/cygwin_attach_dll.c27
-rw-r--r--winsup/cygwin/lib/cygwin_crt0.c24
-rw-r--r--winsup/cygwin/lib/dll_entry.c17
-rw-r--r--winsup/cygwin/lib/dll_main.cc41
-rw-r--r--winsup/cygwin/lib/libcmain.c44
-rw-r--r--winsup/cygwin/lib/premain0.c14
-rw-r--r--winsup/cygwin/lib/premain1.c14
-rw-r--r--winsup/cygwin/lib/premain2.c14
-rw-r--r--winsup/cygwin/lib/premain3.c14
-rw-r--r--winsup/cygwin/lib/pseudo-reloc.c46
-rw-r--r--winsup/cygwin/libc/bsdlib.cc303
-rw-r--r--winsup/cygwin/libc/fnmatch.c220
-rw-r--r--winsup/cygwin/libc/fts.c1253
-rw-r--r--winsup/cygwin/libc/ftw.c107
-rw-r--r--winsup/cygwin/libc/getopt.c522
-rw-r--r--winsup/cygwin/libc/inet_addr.c228
-rw-r--r--winsup/cygwin/libc/inet_network.c124
-rw-r--r--winsup/cygwin/libc/minires-os-if.c568
-rw-r--r--winsup/cygwin/libc/minires.c951
-rw-r--r--winsup/cygwin/libc/minires.h68
-rw-r--r--winsup/cygwin/libc/nftw.c126
-rw-r--r--winsup/cygwin/libc/rcmd.cc782
-rw-r--r--winsup/cygwin/libc/rexec.cc416
-rw-r--r--winsup/cygwin/libc/strptime.cc428
-rw-r--r--winsup/cygwin/libc/xsique.cc48
-rw-r--r--winsup/cygwin/localtime.cc2173
-rw-r--r--winsup/cygwin/lsearch.cc51
-rw-r--r--winsup/cygwin/malloc.cc5064
-rw-r--r--winsup/cygwin/malloc_wrapper.cc294
-rw-r--r--winsup/cygwin/mcount.c173
-rw-r--r--winsup/cygwin/miscfuncs.cc546
-rw-r--r--winsup/cygwin/miscfuncs.h39
-rw-r--r--winsup/cygwin/mktemp.cc180
-rwxr-xr-xwinsup/cygwin/mkvers.sh177
-rw-r--r--winsup/cygwin/mmap.cc1833
-rw-r--r--winsup/cygwin/mmap_helper.h91
-rw-r--r--winsup/cygwin/mount.cc1359
-rw-r--r--winsup/cygwin/msg.cc209
-rw-r--r--winsup/cygwin/mtinfo.h137
-rw-r--r--winsup/cygwin/net.cc4105
-rw-r--r--winsup/cygwin/netdb.cc408
-rwxr-xr-xwinsup/cygwin/newsym39
-rw-r--r--winsup/cygwin/nfs.cc18
-rw-r--r--winsup/cygwin/nfs.h55
-rw-r--r--winsup/cygwin/ntdll.h1086
-rw-r--r--winsup/cygwin/ntea.cc491
-rw-r--r--winsup/cygwin/passwd.cc304
-rw-r--r--winsup/cygwin/path.cc3616
-rw-r--r--winsup/cygwin/path.h360
-rw-r--r--winsup/cygwin/path.sgml175
-rw-r--r--winsup/cygwin/perprocess.h28
-rw-r--r--winsup/cygwin/pinfo.cc1276
-rw-r--r--winsup/cygwin/pinfo.h239
-rw-r--r--winsup/cygwin/pipe.cc534
-rw-r--r--winsup/cygwin/poll.cc123
-rw-r--r--winsup/cygwin/posix.sgml1359
-rw-r--r--winsup/cygwin/posix_ipc.cc1061
-rw-r--r--winsup/cygwin/profil.c175
-rw-r--r--winsup/cygwin/profil.h44
-rw-r--r--winsup/cygwin/pseudo-reloc.cc46
-rw-r--r--winsup/cygwin/pthread.cc189
-rw-r--r--winsup/cygwin/pwdgrp.h84
-rw-r--r--winsup/cygwin/random.cc504
-rw-r--r--winsup/cygwin/regex/COPYRIGHT20
-rw-r--r--winsup/cygwin/regex/cclass.h31
-rw-r--r--winsup/cygwin/regex/cname.h102
-rw-r--r--winsup/cygwin/regex/engine.c1019
-rw-r--r--winsup/cygwin/regex/engine.ih35
-rwxr-xr-xwinsup/cygwin/regex/mkh76
-rw-r--r--winsup/cygwin/regex/regcomp.c1546
-rw-r--r--winsup/cygwin/regex/regcomp.ih48
-rw-r--r--winsup/cygwin/regex/regerror.c127
-rw-r--r--winsup/cygwin/regex/regerror.ih12
-rw-r--r--winsup/cygwin/regex/regex.3509
-rw-r--r--winsup/cygwin/regex/regex.7235
-rw-r--r--winsup/cygwin/regex/regex.h76
-rw-r--r--winsup/cygwin/regex/regex2.h134
-rw-r--r--winsup/cygwin/regex/regexec.c141
-rw-r--r--winsup/cygwin/regex/regfree.c38
-rw-r--r--winsup/cygwin/regex/tests477
-rw-r--r--winsup/cygwin/regex/utils.h22
-rw-r--r--winsup/cygwin/registry.cc262
-rw-r--r--winsup/cygwin/registry.h44
-rw-r--r--winsup/cygwin/resource.cc191
-rwxr-xr-xwinsup/cygwin/rmsym9
-rw-r--r--winsup/cygwin/scandir.cc93
-rw-r--r--winsup/cygwin/sched.cc489
-rw-r--r--winsup/cygwin/sec_acl.cc982
-rw-r--r--winsup/cygwin/sec_auth.cc1253
-rw-r--r--winsup/cygwin/sec_helper.cc563
-rw-r--r--winsup/cygwin/security.cc835
-rw-r--r--winsup/cygwin/security.h455
-rw-r--r--winsup/cygwin/security.sgml45
-rw-r--r--winsup/cygwin/select.cc1606
-rw-r--r--winsup/cygwin/sem.cc158
-rw-r--r--winsup/cygwin/setlsapwd.cc95
-rw-r--r--winsup/cygwin/shared.cc431
-rw-r--r--winsup/cygwin/shared_info.h191
-rw-r--r--winsup/cygwin/shm.cc406
-rw-r--r--winsup/cygwin/signal.cc567
-rw-r--r--winsup/cygwin/sigproc.cc1282
-rw-r--r--winsup/cygwin/sigproc.h98
-rw-r--r--winsup/cygwin/smallprint.cc478
-rwxr-xr-xwinsup/cygwin/sortdin35
-rw-r--r--winsup/cygwin/spawn.cc1101
-rwxr-xr-xwinsup/cygwin/speclib52
-rw-r--r--winsup/cygwin/stackdump.sgml13
-rw-r--r--winsup/cygwin/strace.cc469
-rw-r--r--winsup/cygwin/strfuncs.cc146
-rw-r--r--winsup/cygwin/string.h126
-rw-r--r--winsup/cygwin/strsep.cc64
-rw-r--r--winsup/cygwin/strsig.cc97
-rw-r--r--winsup/cygwin/sync.cc152
-rw-r--r--winsup/cygwin/sync.h73
-rw-r--r--winsup/cygwin/syscalls.cc3893
-rw-r--r--winsup/cygwin/sysconf.cc294
-rw-r--r--winsup/cygwin/syslog.cc454
-rw-r--r--winsup/cygwin/termios.cc324
-rw-r--r--winsup/cygwin/textmode.c21
-rw-r--r--winsup/cygwin/textreadmode.c25
-rw-r--r--winsup/cygwin/thread.cc3335
-rw-r--r--winsup/cygwin/thread.h705
-rw-r--r--winsup/cygwin/timer.cc456
-rw-r--r--winsup/cygwin/times.cc786
-rw-r--r--winsup/cygwin/tls_pbuf.cc59
-rw-r--r--winsup/cygwin/tls_pbuf.h27
-rw-r--r--winsup/cygwin/tlsoffsets.h129
-rw-r--r--winsup/cygwin/tty.cc385
-rw-r--r--winsup/cygwin/tty.h154
-rw-r--r--winsup/cygwin/tz_posixrules.h48
-rw-r--r--winsup/cygwin/uinfo.cc589
-rw-r--r--winsup/cygwin/uname.cc104
-rw-r--r--winsup/cygwin/wait.cc119
-rw-r--r--winsup/cygwin/wchar.h39
-rw-r--r--winsup/cygwin/winbase.h67
-rw-r--r--winsup/cygwin/wincap.cc457
-rw-r--r--winsup/cygwin/wincap.h101
-rw-r--r--winsup/cygwin/window.cc133
-rw-r--r--winsup/cygwin/winf.cc154
-rw-r--r--winsup/cygwin/winf.h89
-rw-r--r--winsup/cygwin/wininfo.h25
-rw-r--r--winsup/cygwin/winsup.h387
-rw-r--r--winsup/cygwin/winver.rc50
-rw-r--r--winsup/doc/ChangeLog853
-rw-r--r--winsup/doc/Makefile.in87
-rw-r--r--winsup/doc/README30
-rw-r--r--winsup/doc/aclocal.m4875
-rwxr-xr-xwinsup/doc/configure3291
-rw-r--r--winsup/doc/configure.in22
-rw-r--r--winsup/doc/cygserver.sgml277
-rw-r--r--winsup/doc/cygwin-api.in.sgml37
-rw-r--r--winsup/doc/cygwin-ug-net.in.sgml25
-rw-r--r--winsup/doc/cygwin-ug.in.sgml64
-rw-r--r--winsup/doc/cygwin.dsl16
-rw-r--r--winsup/doc/cygwinenv.sgml243
-rw-r--r--winsup/doc/dll.sgml141
-rw-r--r--winsup/doc/doctool.c622
-rw-r--r--winsup/doc/doctool.txt146
-rw-r--r--winsup/doc/effectively.sgml215
-rw-r--r--winsup/doc/faq-api.xml353
-rw-r--r--winsup/doc/faq-problems.xml32
-rw-r--r--winsup/doc/faq-programming.xml895
-rw-r--r--winsup/doc/faq-resources.xml51
-rw-r--r--winsup/doc/faq-sections.xml82
-rw-r--r--winsup/doc/faq-setup.xml565
-rw-r--r--winsup/doc/faq-using.xml1108
-rw-r--r--winsup/doc/faq-what.xml158
-rw-r--r--winsup/doc/faq.xml78
-rw-r--r--winsup/doc/fhandler-tut.txt94
-rw-r--r--winsup/doc/filemodes.sgml33
-rw-r--r--winsup/doc/gcc.sgml156
-rw-r--r--winsup/doc/gdb.sgml88
-rw-r--r--winsup/doc/legal.sgml30
-rw-r--r--winsup/doc/ntsec.sgml899
-rw-r--r--winsup/doc/overview.sgml121
-rw-r--r--winsup/doc/overview2.sgml422
-rw-r--r--winsup/doc/pathnames.sgml586
-rw-r--r--winsup/doc/programming.sgml11
-rw-r--r--winsup/doc/setup-net.sgml259
-rw-r--r--winsup/doc/setup.sgml47
-rw-r--r--winsup/doc/setup2.sgml207
-rw-r--r--winsup/doc/textbinary.sgml159
-rw-r--r--winsup/doc/using.sgml23
-rw-r--r--winsup/doc/windres.sgml169
-rw-r--r--winsup/lsaauth/ChangeLog70
-rw-r--r--winsup/lsaauth/Makefile.in79
-rw-r--r--winsup/lsaauth/aclocal.m4875
-rwxr-xr-xwinsup/lsaauth/configure4177
-rw-r--r--winsup/lsaauth/configure.in45
-rwxr-xr-xwinsup/lsaauth/cyglsa-config123
-rw-r--r--winsup/lsaauth/cyglsa.c629
-rw-r--r--winsup/lsaauth/cyglsa.din9
-rw-r--r--winsup/lsaauth/cyglsa64.dllbin8704 -> 0 bytes
-rw-r--r--winsup/lsaauth/make-64bit-version-with-visual-c.bat29
-rw-r--r--winsup/lsaauth/mslsa.def9
-rw-r--r--winsup/mingw/CONTRIBUTORS28
-rw-r--r--winsup/mingw/CRT_fp10.c16
-rw-r--r--winsup/mingw/CRT_fp8.c18
-rw-r--r--winsup/mingw/CRT_noglob.c15
-rw-r--r--winsup/mingw/CRTfmode.c19
-rw-r--r--winsup/mingw/CRTglob.c16
-rw-r--r--winsup/mingw/CRTinit.c24
-rw-r--r--winsup/mingw/ChangeLog4136
-rw-r--r--winsup/mingw/DISCLAIMER12
-rw-r--r--winsup/mingw/Makefile.in569
-rw-r--r--winsup/mingw/README10
-rw-r--r--winsup/mingw/TODO1
-rw-r--r--winsup/mingw/aclocal.m4121
-rw-r--r--winsup/mingw/binmode.c5
-rwxr-xr-xwinsup/mingw/config.guess1407
-rwxr-xr-xwinsup/mingw/config.sub1504
-rwxr-xr-xwinsup/mingw/configure5210
-rw-r--r--winsup/mingw/configure.in86
-rwxr-xr-xwinsup/mingw/cpu_features.c105
-rwxr-xr-xwinsup/mingw/cpu_features.h23
-rw-r--r--winsup/mingw/crt1.c290
-rw-r--r--winsup/mingw/crtdll.def695
-rw-r--r--winsup/mingw/crtmt.c14
-rw-r--r--winsup/mingw/crtst.c12
-rw-r--r--winsup/mingw/dllcrt1.c183
-rw-r--r--winsup/mingw/dllmain.c19
-rw-r--r--winsup/mingw/gccmain.c79
-rw-r--r--winsup/mingw/include/_mingw.h240
-rw-r--r--winsup/mingw/include/assert.h51
-rw-r--r--winsup/mingw/include/complex.h200
-rw-r--r--winsup/mingw/include/conio.h53
-rw-r--r--winsup/mingw/include/ctype.h275
-rw-r--r--winsup/mingw/include/dir.h26
-rw-r--r--winsup/mingw/include/direct.h73
-rw-r--r--winsup/mingw/include/dirent.h123
-rw-r--r--winsup/mingw/include/dos.h89
-rw-r--r--winsup/mingw/include/errno.h101
-rw-r--r--winsup/mingw/include/excpt.h102
-rw-r--r--winsup/mingw/include/fcntl.h75
-rw-r--r--winsup/mingw/include/fenv.h107
-rw-r--r--winsup/mingw/include/float.h152
-rw-r--r--winsup/mingw/include/getopt.h100
-rw-r--r--winsup/mingw/include/inttypes.h278
-rw-r--r--winsup/mingw/include/io.h342
-rwxr-xr-xwinsup/mingw/include/libgen.h31
-rw-r--r--winsup/mingw/include/limits.h112
-rw-r--r--winsup/mingw/include/locale.h88
-rw-r--r--winsup/mingw/include/malloc.h103
-rw-r--r--winsup/mingw/include/math.h873
-rw-r--r--winsup/mingw/include/mbctype.h97
-rw-r--r--winsup/mingw/include/mbstring.h132
-rw-r--r--winsup/mingw/include/mem.h6
-rw-r--r--winsup/mingw/include/memory.h7
-rw-r--r--winsup/mingw/include/process.h139
-rw-r--r--winsup/mingw/include/search.h106
-rw-r--r--winsup/mingw/include/setjmp.h56
-rw-r--r--winsup/mingw/include/share.h33
-rw-r--r--winsup/mingw/include/signal.h98
-rw-r--r--winsup/mingw/include/stdint.h206
-rw-r--r--winsup/mingw/include/stdio.h647
-rw-r--r--winsup/mingw/include/stdlib.h558
-rw-r--r--winsup/mingw/include/string.h195
-rw-r--r--winsup/mingw/include/strings.h12
-rw-r--r--winsup/mingw/include/sys/fcntl.h7
-rw-r--r--winsup/mingw/include/sys/file.h7
-rw-r--r--winsup/mingw/include/sys/locking.h31
-rw-r--r--winsup/mingw/include/sys/param.h22
-rw-r--r--winsup/mingw/include/sys/stat.h196
-rw-r--r--winsup/mingw/include/sys/time.h47
-rw-r--r--winsup/mingw/include/sys/timeb.h74
-rw-r--r--winsup/mingw/include/sys/types.h124
-rw-r--r--winsup/mingw/include/sys/unistd.h6
-rw-r--r--winsup/mingw/include/sys/utime.h81
-rw-r--r--winsup/mingw/include/tchar.h420
-rw-r--r--winsup/mingw/include/time.h218
-rw-r--r--winsup/mingw/include/unistd.h52
-rw-r--r--winsup/mingw/include/utime.h1
-rw-r--r--winsup/mingw/include/values.h4
-rw-r--r--winsup/mingw/include/varargs.h7
-rw-r--r--winsup/mingw/include/wchar.h518
-rw-r--r--winsup/mingw/include/wctype.h168
-rw-r--r--winsup/mingw/init.c67
-rwxr-xr-xwinsup/mingw/install-sh253
-rw-r--r--winsup/mingw/isascii.c21
-rw-r--r--winsup/mingw/iscsym.c20
-rw-r--r--winsup/mingw/iscsymf.c21
-rw-r--r--winsup/mingw/jamfile71
-rw-r--r--winsup/mingw/main.c79
-rwxr-xr-xwinsup/mingw/man/dirname.man474
-rw-r--r--winsup/mingw/mingwex/Makefile.in318
-rw-r--r--winsup/mingw/mingwex/_Exit.c3
-rw-r--r--winsup/mingw/mingwex/aclocal.m4831
-rw-r--r--winsup/mingw/mingwex/atoll.c3
-rwxr-xr-xwinsup/mingw/mingwex/basename.c167
-rwxr-xr-xwinsup/mingw/mingwex/btowc.c19
-rw-r--r--winsup/mingw/mingwex/complex/cabs.c7
-rwxr-xr-xwinsup/mingw/mingwex/complex/cabsf.c7
-rwxr-xr-xwinsup/mingw/mingwex/complex/cabsl.c7
-rw-r--r--winsup/mingw/mingwex/complex/cacos.c82
-rwxr-xr-xwinsup/mingw/mingwex/complex/cacosf.c64
-rw-r--r--winsup/mingw/mingwex/complex/cacosh.c37
-rwxr-xr-xwinsup/mingw/mingwex/complex/cacoshf.c37
-rwxr-xr-xwinsup/mingw/mingwex/complex/cacoshl.c39
-rwxr-xr-xwinsup/mingw/mingwex/complex/cacosl.c66
-rwxr-xr-xwinsup/mingw/mingwex/complex/carg.c9
-rwxr-xr-xwinsup/mingw/mingwex/complex/cargf.c9
-rwxr-xr-xwinsup/mingw/mingwex/complex/cargl.c8
-rw-r--r--winsup/mingw/mingwex/complex/casin.c48
-rwxr-xr-xwinsup/mingw/mingwex/complex/casinf.c48
-rw-r--r--winsup/mingw/mingwex/complex/casinh.c23
-rwxr-xr-xwinsup/mingw/mingwex/complex/casinhf.c23
-rwxr-xr-xwinsup/mingw/mingwex/complex/casinhl.c23
-rwxr-xr-xwinsup/mingw/mingwex/complex/casinl.c48
-rw-r--r--winsup/mingw/mingwex/complex/catan.c49
-rwxr-xr-xwinsup/mingw/mingwex/complex/catanf.c49
-rw-r--r--winsup/mingw/mingwex/complex/catanh.c23
-rwxr-xr-xwinsup/mingw/mingwex/complex/catanhf.c23
-rwxr-xr-xwinsup/mingw/mingwex/complex/catanhl.c23
-rwxr-xr-xwinsup/mingw/mingwex/complex/catanl.c53
-rw-r--r--winsup/mingw/mingwex/complex/ccos.c20
-rwxr-xr-xwinsup/mingw/mingwex/complex/ccosf.c20
-rw-r--r--winsup/mingw/mingwex/complex/ccosh.c19
-rwxr-xr-xwinsup/mingw/mingwex/complex/ccoshf.c19
-rwxr-xr-xwinsup/mingw/mingwex/complex/ccoshl.c19
-rwxr-xr-xwinsup/mingw/mingwex/complex/ccosl.c20
-rw-r--r--winsup/mingw/mingwex/complex/cexp.c19
-rwxr-xr-xwinsup/mingw/mingwex/complex/cexpf.c19
-rwxr-xr-xwinsup/mingw/mingwex/complex/cexpl.c19
-rw-r--r--winsup/mingw/mingwex/complex/cimag.c6
-rwxr-xr-xwinsup/mingw/mingwex/complex/cimagf.c6
-rwxr-xr-xwinsup/mingw/mingwex/complex/cimagl.c5
-rw-r--r--winsup/mingw/mingwex/complex/clog.c19
-rwxr-xr-xwinsup/mingw/mingwex/complex/clogf.c19
-rwxr-xr-xwinsup/mingw/mingwex/complex/clogl.c19
-rw-r--r--winsup/mingw/mingwex/complex/cpow.c48
-rwxr-xr-xwinsup/mingw/mingwex/complex/cpowf.c43
-rwxr-xr-xwinsup/mingw/mingwex/complex/cpowl.c43
-rw-r--r--winsup/mingw/mingwex/complex/cproj.c22
-rwxr-xr-xwinsup/mingw/mingwex/complex/cprojf.c22
-rwxr-xr-xwinsup/mingw/mingwex/complex/cprojl.c22
-rw-r--r--winsup/mingw/mingwex/complex/creal.c6
-rwxr-xr-xwinsup/mingw/mingwex/complex/crealf.c6
-rwxr-xr-xwinsup/mingw/mingwex/complex/creall.c5
-rw-r--r--winsup/mingw/mingwex/complex/csin.c21
-rwxr-xr-xwinsup/mingw/mingwex/complex/csinf.c21
-rw-r--r--winsup/mingw/mingwex/complex/csinh.c21
-rwxr-xr-xwinsup/mingw/mingwex/complex/csinhf.c21
-rwxr-xr-xwinsup/mingw/mingwex/complex/csinhl.c20
-rwxr-xr-xwinsup/mingw/mingwex/complex/csinl.c21
-rw-r--r--winsup/mingw/mingwex/complex/csqrt.c56
-rwxr-xr-xwinsup/mingw/mingwex/complex/csqrtf.c49
-rwxr-xr-xwinsup/mingw/mingwex/complex/csqrtl.c55
-rw-r--r--winsup/mingw/mingwex/complex/ctan.c41
-rwxr-xr-xwinsup/mingw/mingwex/complex/ctanf.c41
-rw-r--r--winsup/mingw/mingwex/complex/ctanh.c44
-rwxr-xr-xwinsup/mingw/mingwex/complex/ctanhf.c44
-rwxr-xr-xwinsup/mingw/mingwex/complex/ctanhl.c44
-rwxr-xr-xwinsup/mingw/mingwex/complex/ctanl.c41
-rwxr-xr-xwinsup/mingw/mingwex/configure3127
-rw-r--r--winsup/mingw/mingwex/configure.in55
-rw-r--r--winsup/mingw/mingwex/dirent.c341
-rwxr-xr-xwinsup/mingw/mingwex/dirname.c235
-rw-r--r--winsup/mingw/mingwex/feclearexcept.c24
-rw-r--r--winsup/mingw/mingwex/fegetenv.c20
-rw-r--r--winsup/mingw/mingwex/fegetexceptflag.c15
-rw-r--r--winsup/mingw/mingwex/fegetround.c19
-rw-r--r--winsup/mingw/mingwex/feholdexcept.c30
-rw-r--r--winsup/mingw/mingwex/feraiseexcept.c19
-rw-r--r--winsup/mingw/mingwex/fesetenv.c57
-rw-r--r--winsup/mingw/mingwex/fesetexceptflag.c33
-rw-r--r--winsup/mingw/mingwex/fesetround.c31
-rw-r--r--winsup/mingw/mingwex/fetestexcept.c27
-rw-r--r--winsup/mingw/mingwex/feupdateenv.c26
-rwxr-xr-xwinsup/mingw/mingwex/ftruncate.c5
-rw-r--r--winsup/mingw/mingwex/fwide.c9
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/README336
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/arithchk.c183
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/dmisc.c212
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/dtoa.c753
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/g__fmt.c99
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/g_dfmt.c89
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/g_ffmt.c88
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/g_xfmt.c125
-rw-r--r--winsup/mingw/mingwex/gdtoa/gd_arith.h3
-rw-r--r--winsup/mingw/mingwex/gdtoa/gd_qnan.h12
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/gdtoa.c758
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/gdtoa.h127
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/gdtoaimp.h632
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/gethex.c247
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/gmisc.c86
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/hd_init.c55
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/hexnan.c131
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/misc.c962
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/qnan.c110
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/smisc.c191
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/strtodg.c1012
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/strtodnrp.c87
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/strtof.c77
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/strtopx.c119
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/sum.c98
-rwxr-xr-xwinsup/mingw/mingwex/gdtoa/ulp.c70
-rw-r--r--winsup/mingw/mingwex/getopt.c667
-rwxr-xr-xwinsup/mingw/mingwex/gettimeofday.c49
-rw-r--r--winsup/mingw/mingwex/imaxabs.c17
-rw-r--r--winsup/mingw/mingwex/imaxdiv.c25
-rwxr-xr-xwinsup/mingw/mingwex/isblank.c5
-rwxr-xr-xwinsup/mingw/mingwex/iswblank.c5
-rw-r--r--winsup/mingw/mingwex/lltoa.c3
-rw-r--r--winsup/mingw/mingwex/lltow.c3
-rw-r--r--winsup/mingw/mingwex/math/acosf.c23
-rwxr-xr-xwinsup/mingw/mingwex/math/acosh.c26
-rwxr-xr-xwinsup/mingw/mingwex/math/acoshf.c25
-rwxr-xr-xwinsup/mingw/mingwex/math/acoshl.c27
-rw-r--r--winsup/mingw/mingwex/math/acosl.c25
-rw-r--r--winsup/mingw/mingwex/math/asinf.c20
-rwxr-xr-xwinsup/mingw/mingwex/math/asinh.c28
-rwxr-xr-xwinsup/mingw/mingwex/math/asinhf.c28
-rwxr-xr-xwinsup/mingw/mingwex/math/asinhl.c28
-rw-r--r--winsup/mingw/mingwex/math/asinl.c21
-rw-r--r--winsup/mingw/mingwex/math/atan2f.c15
-rw-r--r--winsup/mingw/mingwex/math/atan2l.c16
-rw-r--r--winsup/mingw/mingwex/math/atanf.c17
-rwxr-xr-xwinsup/mingw/mingwex/math/atanh.c31
-rwxr-xr-xwinsup/mingw/mingwex/math/atanhf.c30
-rwxr-xr-xwinsup/mingw/mingwex/math/atanhl.c29
-rw-r--r--winsup/mingw/mingwex/math/atanl.c19
-rw-r--r--winsup/mingw/mingwex/math/cbrt.c162
-rw-r--r--winsup/mingw/mingwex/math/cbrtf.c147
-rw-r--r--winsup/mingw/mingwex/math/cbrtl.c161
-rw-r--r--winsup/mingw/mingwex/math/ceilf.S31
-rw-r--r--winsup/mingw/mingwex/math/ceill.S33
-rw-r--r--winsup/mingw/mingwex/math/cephes_mconf.h395
-rw-r--r--winsup/mingw/mingwex/math/copysign.S19
-rw-r--r--winsup/mingw/mingwex/math/copysignf.S19
-rw-r--r--winsup/mingw/mingwex/math/copysignl.S20
-rw-r--r--winsup/mingw/mingwex/math/cosf.S29
-rw-r--r--winsup/mingw/mingwex/math/coshf.c3
-rw-r--r--winsup/mingw/mingwex/math/coshl.c110
-rw-r--r--winsup/mingw/mingwex/math/cosl.S30
-rwxr-xr-xwinsup/mingw/mingwex/math/erfl.c299
-rw-r--r--winsup/mingw/mingwex/math/exp2.S39
-rw-r--r--winsup/mingw/mingwex/math/exp2f.S39
-rw-r--r--winsup/mingw/mingwex/math/exp2l.S39
-rw-r--r--winsup/mingw/mingwex/math/expf.c3
-rw-r--r--winsup/mingw/mingwex/math/expl.c71
-rwxr-xr-xwinsup/mingw/mingwex/math/expm1.c28
-rwxr-xr-xwinsup/mingw/mingwex/math/expm1f.c29
-rwxr-xr-xwinsup/mingw/mingwex/math/expm1l.c29
-rw-r--r--winsup/mingw/mingwex/math/fabs.c10
-rw-r--r--winsup/mingw/mingwex/math/fabsf.c9
-rw-r--r--winsup/mingw/mingwex/math/fabsl.c9
-rwxr-xr-xwinsup/mingw/mingwex/math/fastmath.h115
-rw-r--r--winsup/mingw/mingwex/math/fdim.c7
-rw-r--r--winsup/mingw/mingwex/math/fdimf.c7
-rw-r--r--winsup/mingw/mingwex/math/fdiml.c7
-rw-r--r--winsup/mingw/mingwex/math/floorf.S35
-rw-r--r--winsup/mingw/mingwex/math/floorl.S33
-rw-r--r--winsup/mingw/mingwex/math/fma.S12
-rw-r--r--winsup/mingw/mingwex/math/fmaf.S12
-rw-r--r--winsup/mingw/mingwex/math/fmal.c5
-rw-r--r--winsup/mingw/mingwex/math/fmax.c7
-rw-r--r--winsup/mingw/mingwex/math/fmaxf.c7
-rw-r--r--winsup/mingw/mingwex/math/fmaxl.c7
-rw-r--r--winsup/mingw/mingwex/math/fmin.c7
-rw-r--r--winsup/mingw/mingwex/math/fminf.c7
-rw-r--r--winsup/mingw/mingwex/math/fminl.c7
-rw-r--r--winsup/mingw/mingwex/math/fmodf.c23
-rw-r--r--winsup/mingw/mingwex/math/fmodl.c22
-rw-r--r--winsup/mingw/mingwex/math/fp_consts.c14
-rw-r--r--winsup/mingw/mingwex/math/fp_consts.h48
-rw-r--r--winsup/mingw/mingwex/math/fp_constsf.c12
-rw-r--r--winsup/mingw/mingwex/math/fp_constsl.c12
-rw-r--r--winsup/mingw/mingwex/math/fpclassify.c20
-rw-r--r--winsup/mingw/mingwex/math/fpclassifyf.c10
-rw-r--r--winsup/mingw/mingwex/math/fpclassifyl.c10
-rw-r--r--winsup/mingw/mingwex/math/frexpf.c3
-rw-r--r--winsup/mingw/mingwex/math/frexpl.S71
-rw-r--r--winsup/mingw/mingwex/math/fucom.c11
-rw-r--r--winsup/mingw/mingwex/math/hypotf.c4
-rw-r--r--winsup/mingw/mingwex/math/hypotl.c73
-rw-r--r--winsup/mingw/mingwex/math/ilogb.S37
-rw-r--r--winsup/mingw/mingwex/math/ilogbf.S35
-rw-r--r--winsup/mingw/mingwex/math/ilogbl.S36
-rw-r--r--winsup/mingw/mingwex/math/isnan.c14
-rw-r--r--winsup/mingw/mingwex/math/isnanf.c12
-rw-r--r--winsup/mingw/mingwex/math/isnanl.c13
-rw-r--r--winsup/mingw/mingwex/math/ldexpf.c3
-rw-r--r--winsup/mingw/mingwex/math/ldexpl.c19
-rw-r--r--winsup/mingw/mingwex/math/lgamma.c369
-rw-r--r--winsup/mingw/mingwex/math/lgammaf.c253
-rw-r--r--winsup/mingw/mingwex/math/lgammal.c416
-rw-r--r--winsup/mingw/mingwex/math/llrint.c10
-rw-r--r--winsup/mingw/mingwex/math/llrintf.c9
-rw-r--r--winsup/mingw/mingwex/math/llrintl.c10
-rw-r--r--winsup/mingw/mingwex/math/log10f.S48
-rw-r--r--winsup/mingw/mingwex/math/log10l.S52
-rw-r--r--winsup/mingw/mingwex/math/log1p.S47
-rw-r--r--winsup/mingw/mingwex/math/log1pf.S47
-rw-r--r--winsup/mingw/mingwex/math/log1pl.S54
-rw-r--r--winsup/mingw/mingwex/math/log2.S51
-rw-r--r--winsup/mingw/mingwex/math/log2f.S51
-rw-r--r--winsup/mingw/mingwex/math/log2l.S48
-rw-r--r--winsup/mingw/mingwex/math/logb.c16
-rw-r--r--winsup/mingw/mingwex/math/logbf.c16
-rw-r--r--winsup/mingw/mingwex/math/logbl.c17
-rw-r--r--winsup/mingw/mingwex/math/logf.S39
-rw-r--r--winsup/mingw/mingwex/math/logl.S40
-rw-r--r--winsup/mingw/mingwex/math/lrint.c9
-rw-r--r--winsup/mingw/mingwex/math/lrintf.c9
-rw-r--r--winsup/mingw/mingwex/math/lrintl.c10
-rw-r--r--winsup/mingw/mingwex/math/lround_generic.c64
-rw-r--r--winsup/mingw/mingwex/math/modff.c22
-rw-r--r--winsup/mingw/mingwex/math/modfl.c22
-rw-r--r--winsup/mingw/mingwex/math/nearbyint.S30
-rw-r--r--winsup/mingw/mingwex/math/nearbyintf.S29
-rw-r--r--winsup/mingw/mingwex/math/nearbyintl.S30
-rw-r--r--winsup/mingw/mingwex/math/nextafterf.c27
-rwxr-xr-xwinsup/mingw/mingwex/math/nextafterl.c65
-rwxr-xr-xwinsup/mingw/mingwex/math/nexttoward.c42
-rwxr-xr-xwinsup/mingw/mingwex/math/nexttowardf.c38
-rw-r--r--winsup/mingw/mingwex/math/pow.c781
-rw-r--r--winsup/mingw/mingwex/math/powf.c3
-rw-r--r--winsup/mingw/mingwex/math/powi.c200
-rw-r--r--winsup/mingw/mingwex/math/powif.c198
-rw-r--r--winsup/mingw/mingwex/math/powil.c179
-rw-r--r--winsup/mingw/mingwex/math/powl.c804
-rw-r--r--winsup/mingw/mingwex/math/remainder.S19
-rw-r--r--winsup/mingw/mingwex/math/remainderf.S19
-rw-r--r--winsup/mingw/mingwex/math/remainderl.S22
-rw-r--r--winsup/mingw/mingwex/math/remquo.S38
-rw-r--r--winsup/mingw/mingwex/math/remquof.S38
-rw-r--r--winsup/mingw/mingwex/math/remquol.S36
-rw-r--r--winsup/mingw/mingwex/math/rint.c6
-rw-r--r--winsup/mingw/mingwex/math/rintf.c7
-rw-r--r--winsup/mingw/mingwex/math/rintl.c7
-rw-r--r--winsup/mingw/mingwex/math/round_generic.c51
-rw-r--r--winsup/mingw/mingwex/math/round_internal.h155
-rw-r--r--winsup/mingw/mingwex/math/s_erf.c345
-rw-r--r--winsup/mingw/mingwex/math/scalbn.S19
-rw-r--r--winsup/mingw/mingwex/math/scalbnf.S19
-rw-r--r--winsup/mingw/mingwex/math/scalbnl.S20
-rw-r--r--winsup/mingw/mingwex/math/sf_erf.c267
-rw-r--r--winsup/mingw/mingwex/math/signbit.c13
-rw-r--r--winsup/mingw/mingwex/math/signbitf.c10
-rw-r--r--winsup/mingw/mingwex/math/signbitl.c11
-rw-r--r--winsup/mingw/mingwex/math/sinf.S32
-rw-r--r--winsup/mingw/mingwex/math/sinhf.c3
-rw-r--r--winsup/mingw/mingwex/math/sinhl.c172
-rw-r--r--winsup/mingw/mingwex/math/sinl.S32
-rw-r--r--winsup/mingw/mingwex/math/sqrtf.c20
-rw-r--r--winsup/mingw/mingwex/math/sqrtl.c20
-rw-r--r--winsup/mingw/mingwex/math/tanf.S31
-rw-r--r--winsup/mingw/mingwex/math/tanhf.c3
-rw-r--r--winsup/mingw/mingwex/math/tanhl.c151
-rw-r--r--winsup/mingw/mingwex/math/tanl.S33
-rw-r--r--winsup/mingw/mingwex/math/tgamma.c388
-rw-r--r--winsup/mingw/mingwex/math/tgammaf.c265
-rw-r--r--winsup/mingw/mingwex/math/tgammal.c501
-rw-r--r--winsup/mingw/mingwex/math/trunc.c16
-rw-r--r--winsup/mingw/mingwex/math/truncf.c17
-rw-r--r--winsup/mingw/mingwex/math/truncl.c16
-rwxr-xr-xwinsup/mingw/mingwex/mb_wc_common.h7
-rwxr-xr-xwinsup/mingw/mingwex/mbrtowc.c154
-rw-r--r--winsup/mingw/mingwex/mbsinit.c21
-rwxr-xr-xwinsup/mingw/mingwex/mingw-aligned-malloc.c120
-rw-r--r--winsup/mingw/mingwex/mingw-fseek.c106
-rw-r--r--winsup/mingw/mingwex/sitest.c1527
-rwxr-xr-xwinsup/mingw/mingwex/stdio/fopen64.c7
-rw-r--r--winsup/mingw/mingwex/stdio/fprintf.c68
-rwxr-xr-xwinsup/mingw/mingwex/stdio/fseeko64.c30
-rwxr-xr-xwinsup/mingw/mingwex/stdio/ftello64.c11
-rwxr-xr-xwinsup/mingw/mingwex/stdio/lseek64.c8
-rw-r--r--winsup/mingw/mingwex/stdio/pformat.c2516
-rw-r--r--winsup/mingw/mingwex/stdio/pformat.h90
-rw-r--r--winsup/mingw/mingwex/stdio/printf.c68
-rw-r--r--winsup/mingw/mingwex/stdio/snprintf.c44
-rw-r--r--winsup/mingw/mingwex/stdio/snwprintf.c13
-rw-r--r--winsup/mingw/mingwex/stdio/sprintf.c68
-rw-r--r--winsup/mingw/mingwex/stdio/vfprintf.c64
-rw-r--r--winsup/mingw/mingwex/stdio/vfscanf.c40
-rw-r--r--winsup/mingw/mingwex/stdio/vfwscanf.c42
-rw-r--r--winsup/mingw/mingwex/stdio/vprintf.c64
-rw-r--r--winsup/mingw/mingwex/stdio/vscanf.c9
-rw-r--r--winsup/mingw/mingwex/stdio/vsnprintf.c55
-rw-r--r--winsup/mingw/mingwex/stdio/vsnwprintf.c5
-rw-r--r--winsup/mingw/mingwex/stdio/vsprintf.c66
-rw-r--r--winsup/mingw/mingwex/stdio/vsscanf.c41
-rw-r--r--winsup/mingw/mingwex/stdio/vswscanf.c43
-rw-r--r--winsup/mingw/mingwex/stdio/vwscanf.c10
-rw-r--r--winsup/mingw/mingwex/strtoimax.c112
-rw-r--r--winsup/mingw/mingwex/strtoumax.c110
-rwxr-xr-xwinsup/mingw/mingwex/tdelete.c65
-rw-r--r--winsup/mingw/mingwex/testwmem.c104
-rwxr-xr-xwinsup/mingw/mingwex/tfind.c41
-rwxr-xr-xwinsup/mingw/mingwex/tsearch.c51
-rwxr-xr-xwinsup/mingw/mingwex/tst-aligned-malloc.c90
-rwxr-xr-xwinsup/mingw/mingwex/twalk.c48
-rw-r--r--winsup/mingw/mingwex/ulltoa.c3
-rw-r--r--winsup/mingw/mingwex/ulltow.c3
-rwxr-xr-xwinsup/mingw/mingwex/usleep.c40
-rwxr-xr-xwinsup/mingw/mingwex/wcrtomb.c94
-rw-r--r--winsup/mingw/mingwex/wcstof.c64
-rw-r--r--winsup/mingw/mingwex/wcstoimax.c119
-rw-r--r--winsup/mingw/mingwex/wcstold.c65
-rw-r--r--winsup/mingw/mingwex/wcstoumax.c113
-rwxr-xr-xwinsup/mingw/mingwex/wctob.c21
-rwxr-xr-xwinsup/mingw/mingwex/wctrans.c60
-rwxr-xr-xwinsup/mingw/mingwex/wctype.c60
-rw-r--r--winsup/mingw/mingwex/wdirent.c5
-rw-r--r--winsup/mingw/mingwex/wmemchr.c28
-rw-r--r--winsup/mingw/mingwex/wmemcmp.c32
-rw-r--r--winsup/mingw/mingwex/wmemcpy.c32
-rw-r--r--winsup/mingw/mingwex/wmemmove.c43
-rw-r--r--winsup/mingw/mingwex/wmemset.c30
-rw-r--r--winsup/mingw/mingwex/wtoll.c3
-rwxr-xr-xwinsup/mingw/mkinstalldirs36
-rw-r--r--winsup/mingw/moldname.def.in154
-rw-r--r--winsup/mingw/msvcrt.def.in826
-rw-r--r--winsup/mingw/mthr.c197
-rw-r--r--winsup/mingw/mthr_init.c80
-rw-r--r--winsup/mingw/mthr_stub.c44
-rw-r--r--winsup/mingw/ofmt_stub.s40
-rwxr-xr-xwinsup/mingw/profile/COPYING340
-rwxr-xr-xwinsup/mingw/profile/CYGWIN_LICENSE38
-rw-r--r--winsup/mingw/profile/Makefile.in145
-rw-r--r--winsup/mingw/profile/aclocal.m4831
-rwxr-xr-xwinsup/mingw/profile/configure3151
-rw-r--r--winsup/mingw/profile/configure.in75
-rw-r--r--winsup/mingw/profile/gcrt0.c52
-rw-r--r--winsup/mingw/profile/gmon.c290
-rw-r--r--winsup/mingw/profile/gmon.h181
-rw-r--r--winsup/mingw/profile/mcount.c179
-rw-r--r--winsup/mingw/profile/profil.c185
-rw-r--r--winsup/mingw/profile/profil.h51
-rw-r--r--winsup/mingw/profile/profile.h83
-rw-r--r--winsup/mingw/pseudo-reloc-list.c3
-rw-r--r--winsup/mingw/pseudo-reloc.c46
-rw-r--r--winsup/mingw/readme.txt685
-rw-r--r--winsup/mingw/samples/dirent/jamfile3
-rw-r--r--winsup/mingw/samples/dirent/test.c91
-rw-r--r--winsup/mingw/samples/dirent/wtest.c98
-rw-r--r--winsup/mingw/samples/dlltest/dll.c22
-rw-r--r--winsup/mingw/samples/dlltest/dll.def3
-rw-r--r--winsup/mingw/samples/dlltest/dll.h4
-rw-r--r--winsup/mingw/samples/dlltest/exe.c23
-rw-r--r--winsup/mingw/samples/dlltest/exe.exp8
-rw-r--r--winsup/mingw/samples/dlltest/expexe.c17
-rw-r--r--winsup/mingw/samples/dlltest/expexe.def2
-rw-r--r--winsup/mingw/samples/dlltest/jamfile46
-rw-r--r--winsup/mingw/samples/dlltest/loaddll.c40
-rw-r--r--winsup/mingw/samples/dlltest/loadexe.c47
-rw-r--r--winsup/mingw/samples/dlltest/readme.txt39
-rw-r--r--winsup/mingw/samples/dlltest/silly.cpp55
-rw-r--r--winsup/mingw/samples/dlltest/silly.def11
-rw-r--r--winsup/mingw/samples/dlltest/silly.exp8
-rw-r--r--winsup/mingw/samples/dlltest/silly.h27
-rw-r--r--winsup/mingw/samples/dlltest/sillydll.cpp107
-rw-r--r--winsup/mingw/samples/filehand/filehand.c57
-rw-r--r--winsup/mingw/samples/filehand/jamfile3
-rw-r--r--winsup/mingw/samples/filehand/junk.txt1
-rw-r--r--winsup/mingw/samples/fixargv/fixargv.c290
-rw-r--r--winsup/mingw/samples/fixargv/fixargv.h24
-rw-r--r--winsup/mingw/samples/fixargv/readme.txt85
-rw-r--r--winsup/mingw/samples/fmode/all.c49
-rw-r--r--winsup/mingw/samples/fmode/jamfile7
-rw-r--r--winsup/mingw/samples/fmode/readme.txt5
-rw-r--r--winsup/mingw/samples/fmode/test.c32
-rw-r--r--winsup/mingw/samples/fmode/test2.c37
-rw-r--r--winsup/mingw/samples/globbing/glob.c20
-rw-r--r--winsup/mingw/samples/globbing/jamfile11
-rw-r--r--winsup/mingw/samples/globbing/noglob.c22
-rw-r--r--winsup/mingw/samples/globbing/readme.txt14
-rw-r--r--winsup/mingw/samples/print/jamfile9
-rw-r--r--winsup/mingw/samples/print/prntest.c65
-rw-r--r--winsup/mingw/samples/seh/eh3.c112
-rw-r--r--winsup/mingw/samples/seh/exutil.c68
-rw-r--r--winsup/mingw/samples/seh/exutil.def3
-rw-r--r--winsup/mingw/samples/seh/exutil.h23
-rw-r--r--winsup/mingw/samples/seh/jamfile13
-rw-r--r--winsup/mingw/samples/seh/sehfix.c60
-rw-r--r--winsup/mingw/samples/seh/sehsub.c43
-rw-r--r--winsup/mingw/samples/seh/sehtest.c72
-rw-r--r--winsup/mingw/samples/simpledll/dll.c33
-rw-r--r--winsup/mingw/samples/simpledll/dll.cpp44
-rw-r--r--winsup/mingw/samples/simpledll/dll.def2
-rw-r--r--winsup/mingw/samples/simpledll/exe.c13
-rw-r--r--winsup/mingw/samples/simpledll/jamfile14
-rw-r--r--winsup/mingw/samples/simpledll/makedll.bat23
-rw-r--r--winsup/mingw/samples/test/jamfile9
-rw-r--r--winsup/mingw/samples/test/test.c20
-rw-r--r--winsup/mingw/samples/wintest/jamfile8
-rw-r--r--winsup/mingw/samples/wintest/test.c212
-rw-r--r--winsup/mingw/strcasecmp.c21
-rw-r--r--winsup/mingw/strncasecmp.c21
-rw-r--r--winsup/mingw/test_headers.c54
-rw-r--r--winsup/mingw/toascii.c22
-rw-r--r--winsup/mingw/txtmode.c7
-rw-r--r--winsup/mingw/wcscmpi.c21
-rw-r--r--winsup/testsuite/ChangeLog767
-rw-r--r--winsup/testsuite/Makefile.in175
-rw-r--r--winsup/testsuite/README40
-rw-r--r--winsup/testsuite/aclocal.m4831
-rw-r--r--winsup/testsuite/config/default.exp13
-rw-r--r--winsup/testsuite/configure3399
-rwxr-xr-xwinsup/testsuite/configure.in19
-rw-r--r--winsup/testsuite/cygrun.c69
-rw-r--r--winsup/testsuite/libltp/include/dataascii.h65
-rw-r--r--winsup/testsuite/libltp/include/databin.h44
-rw-r--r--winsup/testsuite/libltp/include/file_lock.h40
-rw-r--r--winsup/testsuite/libltp/include/forker.h63
-rw-r--r--winsup/testsuite/libltp/include/open_flags.h73
-rw-r--r--winsup/testsuite/libltp/include/pattern.h90
-rw-r--r--winsup/testsuite/libltp/include/random_range.h45
-rw-r--r--winsup/testsuite/libltp/include/rmobj.h12
-rw-r--r--winsup/testsuite/libltp/include/search_path.h36
-rw-r--r--winsup/testsuite/libltp/include/str_to_bytes.h39
-rw-r--r--winsup/testsuite/libltp/include/string_to_tokens.h48
-rw-r--r--winsup/testsuite/libltp/include/test.h232
-rw-r--r--winsup/testsuite/libltp/include/tlibio.h148
-rw-r--r--winsup/testsuite/libltp/include/usctest.h319
-rw-r--r--winsup/testsuite/libltp/include/write_log.h169
-rw-r--r--winsup/testsuite/libltp/lib/dataascii.c218
-rw-r--r--winsup/testsuite/libltp/lib/databin.c298
-rw-r--r--winsup/testsuite/libltp/lib/datapid.c374
-rw-r--r--winsup/testsuite/libltp/lib/forker.c286
-rw-r--r--winsup/testsuite/libltp/lib/get_high_address.c20
-rw-r--r--winsup/testsuite/libltp/lib/libtestsuite.c70
-rw-r--r--winsup/testsuite/libltp/lib/open_flags.c330
-rw-r--r--winsup/testsuite/libltp/lib/parse_opts.c876
-rw-r--r--winsup/testsuite/libltp/lib/pattern.c168
-rw-r--r--winsup/testsuite/libltp/lib/rmobj.c211
-rw-r--r--winsup/testsuite/libltp/lib/search_path.c249
-rw-r--r--winsup/testsuite/libltp/lib/str_to_bytes.c211
-rw-r--r--winsup/testsuite/libltp/lib/string_to_tokens.c109
-rw-r--r--winsup/testsuite/libltp/lib/tst_res.c960
-rw-r--r--winsup/testsuite/libltp/lib/tst_sig.c220
-rw-r--r--winsup/testsuite/libltp/lib/tst_tmpdir.c347
-rw-r--r--winsup/testsuite/libltp/lib/write_log.c468
-rw-r--r--winsup/testsuite/winsup.api/checksignal.c91
-rw-r--r--winsup/testsuite/winsup.api/crlf.c527
-rw-r--r--winsup/testsuite/winsup.api/cygload.cc628
-rw-r--r--winsup/testsuite/winsup.api/cygload.exp40
-rw-r--r--winsup/testsuite/winsup.api/cygload.h158
-rw-r--r--winsup/testsuite/winsup.api/devdsp.c783
-rw-r--r--winsup/testsuite/winsup.api/devdsp_okay.h531
-rw-r--r--winsup/testsuite/winsup.api/devzero.c115
-rw-r--r--winsup/testsuite/winsup.api/iospeed.c115
-rw-r--r--winsup/testsuite/winsup.api/known_bugs.tcl4
-rw-r--r--winsup/testsuite/winsup.api/ltp/access01.c300
-rw-r--r--winsup/testsuite/winsup.api/ltp/access03.c506
-rw-r--r--winsup/testsuite/winsup.api/ltp/access04.c241
-rw-r--r--winsup/testsuite/winsup.api/ltp/access05.c424
-rw-r--r--winsup/testsuite/winsup.api/ltp/alarm01.c226
-rw-r--r--winsup/testsuite/winsup.api/ltp/alarm02.c240
-rw-r--r--winsup/testsuite/winsup.api/ltp/alarm03.c229
-rw-r--r--winsup/testsuite/winsup.api/ltp/alarm07.c201
-rw-r--r--winsup/testsuite/winsup.api/ltp/asyncio02.c364
-rw-r--r--winsup/testsuite/winsup.api/ltp/chdir02.c219
-rw-r--r--winsup/testsuite/winsup.api/ltp/chdir04.c188
-rw-r--r--winsup/testsuite/winsup.api/ltp/chmod01.c230
-rw-r--r--winsup/testsuite/winsup.api/ltp/chmod02.c260
-rw-r--r--winsup/testsuite/winsup.api/ltp/chown01.c244
-rw-r--r--winsup/testsuite/winsup.api/ltp/close01.c201
-rw-r--r--winsup/testsuite/winsup.api/ltp/close02.c143
-rw-r--r--winsup/testsuite/winsup.api/ltp/close08.c241
-rw-r--r--winsup/testsuite/winsup.api/ltp/creat01.c207
-rw-r--r--winsup/testsuite/winsup.api/ltp/creat03.c154
-rw-r--r--winsup/testsuite/winsup.api/ltp/creat09.c246
-rw-r--r--winsup/testsuite/winsup.api/ltp/dup01.c261
-rw-r--r--winsup/testsuite/winsup.api/ltp/dup02.c246
-rw-r--r--winsup/testsuite/winsup.api/ltp/dup03.c291
-rw-r--r--winsup/testsuite/winsup.api/ltp/dup04.c297
-rw-r--r--winsup/testsuite/winsup.api/ltp/dup05.c266
-rw-r--r--winsup/testsuite/winsup.api/ltp/execl01.c258
-rw-r--r--winsup/testsuite/winsup.api/ltp/execle01.c257
-rw-r--r--winsup/testsuite/winsup.api/ltp/execlp01.c256
-rw-r--r--winsup/testsuite/winsup.api/ltp/execv01.c254
-rw-r--r--winsup/testsuite/winsup.api/ltp/execve01.c258
-rw-r--r--winsup/testsuite/winsup.api/ltp/execvp01.c257
-rw-r--r--winsup/testsuite/winsup.api/ltp/exit01.c165
-rw-r--r--winsup/testsuite/winsup.api/ltp/exit02.c228
-rw-r--r--winsup/testsuite/winsup.api/ltp/fchdir01.c249
-rw-r--r--winsup/testsuite/winsup.api/ltp/fchdir02.c160
-rw-r--r--winsup/testsuite/winsup.api/ltp/fchmod01.c241
-rw-r--r--winsup/testsuite/winsup.api/ltp/fchown01.c234
-rw-r--r--winsup/testsuite/winsup.api/ltp/fcntl02.c244
-rw-r--r--winsup/testsuite/winsup.api/ltp/fcntl03.c240
-rw-r--r--winsup/testsuite/winsup.api/ltp/fcntl04.c239
-rw-r--r--winsup/testsuite/winsup.api/ltp/fcntl05.c249
-rw-r--r--winsup/testsuite/winsup.api/ltp/fcntl07.c423
-rw-r--r--winsup/testsuite/winsup.api/ltp/fcntl07B.c422
-rw-r--r--winsup/testsuite/winsup.api/ltp/fcntl08.c250
-rw-r--r--winsup/testsuite/winsup.api/ltp/fcntl09.c278
-rw-r--r--winsup/testsuite/winsup.api/ltp/fcntl10.c284
-rw-r--r--winsup/testsuite/winsup.api/ltp/fork01.c316
-rw-r--r--winsup/testsuite/winsup.api/ltp/fork02.c139
-rw-r--r--winsup/testsuite/winsup.api/ltp/fork03.c165
-rw-r--r--winsup/testsuite/winsup.api/ltp/fork04.c403
-rw-r--r--winsup/testsuite/winsup.api/ltp/fork06.c153
-rw-r--r--winsup/testsuite/winsup.api/ltp/fork07.c200
-rw-r--r--winsup/testsuite/winsup.api/ltp/fork09.c229
-rw-r--r--winsup/testsuite/winsup.api/ltp/fork10.c216
-rw-r--r--winsup/testsuite/winsup.api/ltp/fork11.c141
-rw-r--r--winsup/testsuite/winsup.api/ltp/fpathconf01.c256
-rw-r--r--winsup/testsuite/winsup.api/ltp/fstat01.c237
-rw-r--r--winsup/testsuite/winsup.api/ltp/fstat02.c244
-rw-r--r--winsup/testsuite/winsup.api/ltp/fstat03.c189
-rw-r--r--winsup/testsuite/winsup.api/ltp/fstat04.c244
-rw-r--r--winsup/testsuite/winsup.api/ltp/fsync01.c248
-rw-r--r--winsup/testsuite/winsup.api/ltp/ftruncate01.c244
-rw-r--r--winsup/testsuite/winsup.api/ltp/ftruncate02.c313
-rw-r--r--winsup/testsuite/winsup.api/ltp/ftruncate03.c324
-rw-r--r--winsup/testsuite/winsup.api/ltp/getegid01.c226
-rw-r--r--winsup/testsuite/winsup.api/ltp/geteuid01.c226
-rw-r--r--winsup/testsuite/winsup.api/ltp/getgid01.c219
-rw-r--r--winsup/testsuite/winsup.api/ltp/getgid02.c159
-rw-r--r--winsup/testsuite/winsup.api/ltp/getgid03.c158
-rw-r--r--winsup/testsuite/winsup.api/ltp/getgroups01.c314
-rw-r--r--winsup/testsuite/winsup.api/ltp/getgroups02.c226
-rw-r--r--winsup/testsuite/winsup.api/ltp/gethostid01.c224
-rw-r--r--winsup/testsuite/winsup.api/ltp/gethostname01.c226
-rw-r--r--winsup/testsuite/winsup.api/ltp/getpgid01.c236
-rw-r--r--winsup/testsuite/winsup.api/ltp/getpgid02.c172
-rw-r--r--winsup/testsuite/winsup.api/ltp/getpgrp01.c219
-rw-r--r--winsup/testsuite/winsup.api/ltp/getpid01.c217
-rw-r--r--winsup/testsuite/winsup.api/ltp/getpid02.c186
-rw-r--r--winsup/testsuite/winsup.api/ltp/getppid01.c219
-rw-r--r--winsup/testsuite/winsup.api/ltp/getppid02.c148
-rw-r--r--winsup/testsuite/winsup.api/ltp/getuid01.c219
-rw-r--r--winsup/testsuite/winsup.api/ltp/getuid02.c137
-rw-r--r--winsup/testsuite/winsup.api/ltp/getuid03.c138
-rw-r--r--winsup/testsuite/winsup.api/ltp/kill01.c162
-rw-r--r--winsup/testsuite/winsup.api/ltp/kill02.c857
-rw-r--r--winsup/testsuite/winsup.api/ltp/kill03.c170
-rw-r--r--winsup/testsuite/winsup.api/ltp/kill04.c181
-rw-r--r--winsup/testsuite/winsup.api/ltp/kill09.c258
-rw-r--r--winsup/testsuite/winsup.api/ltp/link02.c263
-rw-r--r--winsup/testsuite/winsup.api/ltp/link03.c330
-rw-r--r--winsup/testsuite/winsup.api/ltp/link04.c426
-rw-r--r--winsup/testsuite/winsup.api/ltp/link05.c351
-rw-r--r--winsup/testsuite/winsup.api/ltp/lseek01.c255
-rw-r--r--winsup/testsuite/winsup.api/ltp/lseek02.c242
-rw-r--r--winsup/testsuite/winsup.api/ltp/lseek03.c289
-rw-r--r--winsup/testsuite/winsup.api/ltp/lseek04.c256
-rw-r--r--winsup/testsuite/winsup.api/ltp/lseek05.c252
-rw-r--r--winsup/testsuite/winsup.api/ltp/lseek06.c235
-rw-r--r--winsup/testsuite/winsup.api/ltp/lseek07.c286
-rw-r--r--winsup/testsuite/winsup.api/ltp/lseek08.c240
-rw-r--r--winsup/testsuite/winsup.api/ltp/lseek09.c266
-rw-r--r--winsup/testsuite/winsup.api/ltp/lseek10.c344
-rw-r--r--winsup/testsuite/winsup.api/ltp/lstat02.c253
-rw-r--r--winsup/testsuite/winsup.api/ltp/mkdir01.c270
-rw-r--r--winsup/testsuite/winsup.api/ltp/mkdir08.c235
-rw-r--r--winsup/testsuite/winsup.api/ltp/mknod01.c275
-rw-r--r--winsup/testsuite/winsup.api/ltp/mmap001.c203
-rw-r--r--winsup/testsuite/winsup.api/ltp/mmap02.c291
-rw-r--r--winsup/testsuite/winsup.api/ltp/mmap03.c290
-rw-r--r--winsup/testsuite/winsup.api/ltp/mmap04.c291
-rw-r--r--winsup/testsuite/winsup.api/ltp/mmap05.c301
-rw-r--r--winsup/testsuite/winsup.api/ltp/mmap06.c234
-rw-r--r--winsup/testsuite/winsup.api/ltp/mmap07.c233
-rw-r--r--winsup/testsuite/winsup.api/ltp/mmap08.c234
-rw-r--r--winsup/testsuite/winsup.api/ltp/munmap01.c281
-rw-r--r--winsup/testsuite/winsup.api/ltp/munmap02.c306
-rw-r--r--winsup/testsuite/winsup.api/ltp/nice05.c219
-rw-r--r--winsup/testsuite/winsup.api/ltp/open02.c146
-rw-r--r--winsup/testsuite/winsup.api/ltp/open03.c243
-rw-r--r--winsup/testsuite/winsup.api/ltp/pathconf01.c245
-rw-r--r--winsup/testsuite/winsup.api/ltp/pause01.c229
-rw-r--r--winsup/testsuite/winsup.api/ltp/pipe01.c156
-rw-r--r--winsup/testsuite/winsup.api/ltp/pipe08.c158
-rw-r--r--winsup/testsuite/winsup.api/ltp/pipe09.c230
-rw-r--r--winsup/testsuite/winsup.api/ltp/pipe10.c167
-rw-r--r--winsup/testsuite/winsup.api/ltp/pipe11.c227
-rw-r--r--winsup/testsuite/winsup.api/ltp/poll01.c250
-rw-r--r--winsup/testsuite/winsup.api/ltp/read01.c280
-rw-r--r--winsup/testsuite/winsup.api/ltp/read04.c174
-rw-r--r--winsup/testsuite/winsup.api/ltp/readdir01.c350
-rw-r--r--winsup/testsuite/winsup.api/ltp/readlink01.c229
-rw-r--r--winsup/testsuite/winsup.api/ltp/readlink02.c244
-rw-r--r--winsup/testsuite/winsup.api/ltp/readlink03.c360
-rw-r--r--winsup/testsuite/winsup.api/ltp/rename01.c263
-rw-r--r--winsup/testsuite/winsup.api/ltp/rename02.c251
-rw-r--r--winsup/testsuite/winsup.api/ltp/rename08.c205
-rw-r--r--winsup/testsuite/winsup.api/ltp/rename10.c203
-rw-r--r--winsup/testsuite/winsup.api/ltp/rmdir01.c189
-rw-r--r--winsup/testsuite/winsup.api/ltp/rmdir04.c236
-rw-r--r--winsup/testsuite/winsup.api/ltp/rmdir05.c447
-rw-r--r--winsup/testsuite/winsup.api/ltp/sbrk01.c279
-rw-r--r--winsup/testsuite/winsup.api/ltp/select01.c276
-rw-r--r--winsup/testsuite/winsup.api/ltp/select02.c268
-rw-r--r--winsup/testsuite/winsup.api/ltp/select03.c282
-rw-r--r--winsup/testsuite/winsup.api/ltp/setgid01.c219
-rw-r--r--winsup/testsuite/winsup.api/ltp/setgroups01.c228
-rw-r--r--winsup/testsuite/winsup.api/ltp/setpgid01.c238
-rw-r--r--winsup/testsuite/winsup.api/ltp/setregid01.c338
-rw-r--r--winsup/testsuite/winsup.api/ltp/setreuid01.c338
-rw-r--r--winsup/testsuite/winsup.api/ltp/setuid01.c225
-rw-r--r--winsup/testsuite/winsup.api/ltp/setuid02.c240
-rw-r--r--winsup/testsuite/winsup.api/ltp/signal03.c663
-rw-r--r--winsup/testsuite/winsup.api/ltp/stat01.c267
-rw-r--r--winsup/testsuite/winsup.api/ltp/stat02.c276
-rw-r--r--winsup/testsuite/winsup.api/ltp/stat03.c391
-rw-r--r--winsup/testsuite/winsup.api/ltp/stat05.c241
-rw-r--r--winsup/testsuite/winsup.api/ltp/stat06.c377
-rw-r--r--winsup/testsuite/winsup.api/ltp/symlink01.c2032
-rw-r--r--winsup/testsuite/winsup.api/ltp/symlink02.c245
-rw-r--r--winsup/testsuite/winsup.api/ltp/symlink03.c404
-rw-r--r--winsup/testsuite/winsup.api/ltp/symlink04.c238
-rw-r--r--winsup/testsuite/winsup.api/ltp/symlink05.c222
-rw-r--r--winsup/testsuite/winsup.api/ltp/sync01.c216
-rw-r--r--winsup/testsuite/winsup.api/ltp/sync02.c238
-rw-r--r--winsup/testsuite/winsup.api/ltp/time01.c218
-rw-r--r--winsup/testsuite/winsup.api/ltp/time02.c182
-rw-r--r--winsup/testsuite/winsup.api/ltp/times01.c222
-rw-r--r--winsup/testsuite/winsup.api/ltp/times02.c136
-rw-r--r--winsup/testsuite/winsup.api/ltp/times03.c247
-rw-r--r--winsup/testsuite/winsup.api/ltp/truncate01.c262
-rw-r--r--winsup/testsuite/winsup.api/ltp/truncate02.c335
-rw-r--r--winsup/testsuite/winsup.api/ltp/ulimit01.c273
-rw-r--r--winsup/testsuite/winsup.api/ltp/umask01.c220
-rw-r--r--winsup/testsuite/winsup.api/ltp/umask02.c135
-rw-r--r--winsup/testsuite/winsup.api/ltp/umask03.c170
-rw-r--r--winsup/testsuite/winsup.api/ltp/uname01.c221
-rw-r--r--winsup/testsuite/winsup.api/ltp/unlink05.c246
-rw-r--r--winsup/testsuite/winsup.api/ltp/unlink06.c254
-rw-r--r--winsup/testsuite/winsup.api/ltp/unlink07.c328
-rw-r--r--winsup/testsuite/winsup.api/ltp/unlink08.c432
-rw-r--r--winsup/testsuite/winsup.api/ltp/vfork01.c400
-rw-r--r--winsup/testsuite/winsup.api/ltp/wait02.c230
-rw-r--r--winsup/testsuite/winsup.api/ltp/wait401.c188
-rw-r--r--winsup/testsuite/winsup.api/ltp/wait402.c203
-rw-r--r--winsup/testsuite/winsup.api/ltp/write01.c250
-rw-r--r--winsup/testsuite/winsup.api/ltp/write02.c165
-rw-r--r--winsup/testsuite/winsup.api/ltp/write03.c192
-rw-r--r--winsup/testsuite/winsup.api/mmaptest01.c176
-rw-r--r--winsup/testsuite/winsup.api/mmaptest02.c190
-rw-r--r--winsup/testsuite/winsup.api/mmaptest03.c154
-rw-r--r--winsup/testsuite/winsup.api/mmaptest04.c103
-rw-r--r--winsup/testsuite/winsup.api/msgtest.c348
-rw-r--r--winsup/testsuite/winsup.api/nullgetcwd.c17
-rw-r--r--winsup/testsuite/winsup.api/pthread/cancel1.c147
-rw-r--r--winsup/testsuite/winsup.api/pthread/cancel10.c68
-rw-r--r--winsup/testsuite/winsup.api/pthread/cancel11.c74
-rw-r--r--winsup/testsuite/winsup.api/pthread/cancel12.c69
-rw-r--r--winsup/testsuite/winsup.api/pthread/cancel2.c181
-rw-r--r--winsup/testsuite/winsup.api/pthread/cancel3.c166
-rw-r--r--winsup/testsuite/winsup.api/pthread/cancel4.c172
-rw-r--r--winsup/testsuite/winsup.api/pthread/cancel5.c165
-rw-r--r--winsup/testsuite/winsup.api/pthread/cancel6.c62
-rw-r--r--winsup/testsuite/winsup.api/pthread/cancel7.c71
-rw-r--r--winsup/testsuite/winsup.api/pthread/cancel8.c71
-rw-r--r--winsup/testsuite/winsup.api/pthread/cancel9.c81
-rw-r--r--winsup/testsuite/winsup.api/pthread/cleanup2.c157
-rw-r--r--winsup/testsuite/winsup.api/pthread/cleanup3.c160
-rw-r--r--winsup/testsuite/winsup.api/pthread/condvar1.c65
-rw-r--r--winsup/testsuite/winsup.api/pthread/condvar2.c80
-rw-r--r--winsup/testsuite/winsup.api/pthread/condvar2_1.c107
-rw-r--r--winsup/testsuite/winsup.api/pthread/condvar3.c115
-rw-r--r--winsup/testsuite/winsup.api/pthread/condvar3_1.c145
-rw-r--r--winsup/testsuite/winsup.api/pthread/condvar3_2.c139
-rw-r--r--winsup/testsuite/winsup.api/pthread/condvar3_3.c100
-rw-r--r--winsup/testsuite/winsup.api/pthread/condvar4.c137
-rw-r--r--winsup/testsuite/winsup.api/pthread/condvar5.c136
-rw-r--r--winsup/testsuite/winsup.api/pthread/condvar6.c209
-rw-r--r--winsup/testsuite/winsup.api/pthread/condvar7.c227
-rw-r--r--winsup/testsuite/winsup.api/pthread/condvar8.c221
-rw-r--r--winsup/testsuite/winsup.api/pthread/condvar9.c239
-rw-r--r--winsup/testsuite/winsup.api/pthread/count1.c62
-rw-r--r--winsup/testsuite/winsup.api/pthread/create1.c34
-rw-r--r--winsup/testsuite/winsup.api/pthread/create2.c74
-rw-r--r--winsup/testsuite/winsup.api/pthread/equal1.c34
-rw-r--r--winsup/testsuite/winsup.api/pthread/exit1.c18
-rw-r--r--winsup/testsuite/winsup.api/pthread/exit2.c30
-rw-r--r--winsup/testsuite/winsup.api/pthread/exit3.c34
-rw-r--r--winsup/testsuite/winsup.api/pthread/inherit1.c99
-rw-r--r--winsup/testsuite/winsup.api/pthread/join0.c40
-rw-r--r--winsup/testsuite/winsup.api/pthread/join1.c51
-rw-r--r--winsup/testsuite/winsup.api/pthread/join2.c41
-rw-r--r--winsup/testsuite/winsup.api/pthread/mainthreadexits.c48
-rw-r--r--winsup/testsuite/winsup.api/pthread/mutex1.c36
-rw-r--r--winsup/testsuite/winsup.api/pthread/mutex1d.c42
-rw-r--r--winsup/testsuite/winsup.api/pthread/mutex1e.c42
-rw-r--r--winsup/testsuite/winsup.api/pthread/mutex1n.c42
-rw-r--r--winsup/testsuite/winsup.api/pthread/mutex1r.c42
-rw-r--r--winsup/testsuite/winsup.api/pthread/mutex2.c34
-rw-r--r--winsup/testsuite/winsup.api/pthread/mutex3.c43
-rw-r--r--winsup/testsuite/winsup.api/pthread/mutex4.c67
-rw-r--r--winsup/testsuite/winsup.api/pthread/mutex5.c30
-rw-r--r--winsup/testsuite/winsup.api/pthread/mutex6d.c71
-rw-r--r--winsup/testsuite/winsup.api/pthread/mutex6e.c70
-rw-r--r--winsup/testsuite/winsup.api/pthread/mutex6n.c72
-rw-r--r--winsup/testsuite/winsup.api/pthread/mutex6r.c68
-rw-r--r--winsup/testsuite/winsup.api/pthread/mutex7.c50
-rw-r--r--winsup/testsuite/winsup.api/pthread/mutex7d.c51
-rw-r--r--winsup/testsuite/winsup.api/pthread/mutex7e.c70
-rw-r--r--winsup/testsuite/winsup.api/pthread/mutex7n.c61
-rw-r--r--winsup/testsuite/winsup.api/pthread/mutex7r.c68
-rw-r--r--winsup/testsuite/winsup.api/pthread/mutex8e.c35
-rw-r--r--winsup/testsuite/winsup.api/pthread/mutex8n.c60
-rw-r--r--winsup/testsuite/winsup.api/pthread/mutex8r.c37
-rw-r--r--winsup/testsuite/winsup.api/pthread/once1.c45
-rw-r--r--winsup/testsuite/winsup.api/pthread/priority1.c78
-rw-r--r--winsup/testsuite/winsup.api/pthread/priority2.c80
-rw-r--r--winsup/testsuite/winsup.api/pthread/rwlock1.c29
-rw-r--r--winsup/testsuite/winsup.api/pthread/rwlock2.c34
-rw-r--r--winsup/testsuite/winsup.api/pthread/rwlock3.c45
-rw-r--r--winsup/testsuite/winsup.api/pthread/rwlock4.c44
-rw-r--r--winsup/testsuite/winsup.api/pthread/rwlock5.c47
-rw-r--r--winsup/testsuite/winsup.api/pthread/rwlock6.c69
-rw-r--r--winsup/testsuite/winsup.api/pthread/rwlock7.c190
-rw-r--r--winsup/testsuite/winsup.api/pthread/self1.c26
-rw-r--r--winsup/testsuite/winsup.api/pthread/self2.c46
-rw-r--r--winsup/testsuite/winsup.api/pthread/test.h102
-rw-r--r--winsup/testsuite/winsup.api/pthread/threadidafterfork.c50
-rw-r--r--winsup/testsuite/winsup.api/pthread/tsd1.c170
-rw-r--r--winsup/testsuite/winsup.api/resethand.c36
-rw-r--r--winsup/testsuite/winsup.api/samples/sample-fail.c5
-rw-r--r--winsup/testsuite/winsup.api/samples/sample-miscompile.c1
-rw-r--r--winsup/testsuite/winsup.api/samples/sample-pass.c5
-rw-r--r--winsup/testsuite/winsup.api/semtest.c348
-rw-r--r--winsup/testsuite/winsup.api/shmtest.c293
-rw-r--r--winsup/testsuite/winsup.api/sigchld.c22
-rwxr-xr-xwinsup/testsuite/winsup.api/signal-into-win32-api.c58
-rw-r--r--winsup/testsuite/winsup.api/systemcall.c68
-rw-r--r--winsup/testsuite/winsup.api/user_malloc.c216
-rw-r--r--winsup/testsuite/winsup.api/waitpid.c24
-rw-r--r--winsup/testsuite/winsup.api/winsup.exp85
-rw-r--r--winsup/utils/COPYING.dumper340
-rw-r--r--winsup/utils/ChangeLog2643
-rw-r--r--winsup/utils/ChangeLog-2000347
-rw-r--r--winsup/utils/Makefile.in179
-rw-r--r--winsup/utils/aclocal.m4875
-rw-r--r--winsup/utils/bloda.cc409
-rwxr-xr-xwinsup/utils/configure4813
-rw-r--r--winsup/utils/configure.in31
-rw-r--r--winsup/utils/cygcheck.cc2182
-rw-r--r--winsup/utils/cygpath.cc1010
-rw-r--r--winsup/utils/dump_setup.cc510
-rw-r--r--winsup/utils/dumper.cc950
-rw-r--r--winsup/utils/dumper.h142
-rw-r--r--winsup/utils/getfacl.c256
-rw-r--r--winsup/utils/kill.cc302
-rwxr-xr-xwinsup/utils/mingw94
-rw-r--r--winsup/utils/mkgroup.c907
-rw-r--r--winsup/utils/mkpasswd.c887
-rw-r--r--winsup/utils/module_info.cc114
-rw-r--r--winsup/utils/mount.cc499
-rw-r--r--winsup/utils/parse_pe.cc104
-rw-r--r--winsup/utils/passwd.c609
-rw-r--r--winsup/utils/path.cc859
-rw-r--r--winsup/utils/path.h19
-rw-r--r--winsup/utils/ps.cc432
-rw-r--r--winsup/utils/regtool.cc980
-rw-r--r--winsup/utils/setfacl.c573
-rw-r--r--winsup/utils/setmetamode.c82
-rw-r--r--winsup/utils/ssp.c953
-rw-r--r--winsup/utils/ssp.txt125
-rw-r--r--winsup/utils/strace.cc1061
-rw-r--r--winsup/utils/testsuite.cc89
-rw-r--r--winsup/utils/testsuite.h131
-rw-r--r--winsup/utils/umount.cc158
-rw-r--r--winsup/utils/utils.sgml1673
-rw-r--r--winsup/w32api/CONTRIBUTIONS5
-rw-r--r--winsup/w32api/ChangeLog11138
-rw-r--r--winsup/w32api/Makefile.in171
-rw-r--r--winsup/w32api/README.w32api32
-rw-r--r--winsup/w32api/TODO62
-rw-r--r--winsup/w32api/aclocal.m4831
-rwxr-xr-xwinsup/w32api/config.guess1407
-rwxr-xr-xwinsup/w32api/config.sub1504
-rwxr-xr-xwinsup/w32api/configure2939
-rw-r--r--winsup/w32api/configure.in51
-rw-r--r--winsup/w32api/include/GL/gl.h1470
-rw-r--r--winsup/w32api/include/GL/glext.h4623
-rw-r--r--winsup/w32api/include/GL/glu.h289
-rw-r--r--winsup/w32api/include/accctrl.h329
-rw-r--r--winsup/w32api/include/aclapi.h117
-rw-r--r--winsup/w32api/include/aclui.h134
-rw-r--r--winsup/w32api/include/adsprop.h59
-rw-r--r--winsup/w32api/include/afxres.h23
-rw-r--r--winsup/w32api/include/amaudio.h33
-rw-r--r--winsup/w32api/include/amvideo.h179
-rw-r--r--winsup/w32api/include/audevcod.h31
-rw-r--r--winsup/w32api/include/aviriff.h87
-rwxr-xr-xwinsup/w32api/include/aygshell.h49
-rw-r--r--winsup/w32api/include/basetsd.h119
-rw-r--r--winsup/w32api/include/basetyps.h182
-rw-r--r--winsup/w32api/include/bdatypes.h32
-rw-r--r--winsup/w32api/include/cderr.h44
-rw-r--r--winsup/w32api/include/cguid.h83
-rw-r--r--winsup/w32api/include/cmnquery.h81
-rw-r--r--winsup/w32api/include/comcat.h175
-rw-r--r--winsup/w32api/include/commctrl.h3750
-rw-r--r--winsup/w32api/include/commdlg.h609
-rw-r--r--winsup/w32api/include/control.h18
-rw-r--r--winsup/w32api/include/cpl.h61
-rw-r--r--winsup/w32api/include/cplext.h12
-rw-r--r--winsup/w32api/include/custcntl.h102
-rw-r--r--winsup/w32api/include/dbt.h154
-rw-r--r--winsup/w32api/include/dde.h64
-rw-r--r--winsup/w32api/include/ddeml.h314
-rw-r--r--winsup/w32api/include/ddk/atm.h507
-rw-r--r--winsup/w32api/include/ddk/batclass.h298
-rw-r--r--winsup/w32api/include/ddk/cfg.h139
-rw-r--r--winsup/w32api/include/ddk/cfgmgr32.h1533
-rw-r--r--winsup/w32api/include/ddk/d4drvif.h104
-rw-r--r--winsup/w32api/include/ddk/d4iface.h84
-rw-r--r--winsup/w32api/include/ddk/ddkmapi.h334
-rw-r--r--winsup/w32api/include/ddk/hidclass.h153
-rw-r--r--winsup/w32api/include/ddk/hidpi.h604
-rwxr-xr-xwinsup/w32api/include/ddk/hidsdi.h73
-rw-r--r--winsup/w32api/include/ddk/hidusage.h210
-rw-r--r--winsup/w32api/include/ddk/kbdmou.h91
-rw-r--r--winsup/w32api/include/ddk/mcd.h143
-rw-r--r--winsup/w32api/include/ddk/miniport.h77
-rw-r--r--winsup/w32api/include/ddk/minitape.h223
-rw-r--r--winsup/w32api/include/ddk/mountdev.h79
-rw-r--r--winsup/w32api/include/ddk/mountmgr.h139
-rw-r--r--winsup/w32api/include/ddk/ndis.h5317
-rw-r--r--winsup/w32api/include/ddk/ndisguid.h439
-rw-r--r--winsup/w32api/include/ddk/ndistapi.h1308
-rw-r--r--winsup/w32api/include/ddk/ndiswan.h251
-rw-r--r--winsup/w32api/include/ddk/netevent.h42
-rw-r--r--winsup/w32api/include/ddk/netpnp.h69
-rw-r--r--winsup/w32api/include/ddk/newdev.h66
-rw-r--r--winsup/w32api/include/ddk/ntapi.h2906
-rw-r--r--winsup/w32api/include/ddk/ntdd8042.h213
-rw-r--r--winsup/w32api/include/ddk/ntddbeep.h54
-rw-r--r--winsup/w32api/include/ddk/ntddcdrm.h347
-rw-r--r--winsup/w32api/include/ddk/ntddcdvd.h213
-rw-r--r--winsup/w32api/include/ddk/ntddchgr.h353
-rw-r--r--winsup/w32api/include/ddk/ntdddisk.h521
-rw-r--r--winsup/w32api/include/ddk/ntddk.h91
-rw-r--r--winsup/w32api/include/ddk/ntddkbd.h135
-rw-r--r--winsup/w32api/include/ddk/ntddmou.h115
-rw-r--r--winsup/w32api/include/ddk/ntddndis.h188
-rw-r--r--winsup/w32api/include/ddk/ntddpar.h119
-rw-r--r--winsup/w32api/include/ddk/ntddpcm.h165
-rw-r--r--winsup/w32api/include/ddk/ntddscsi.h171
-rw-r--r--winsup/w32api/include/ddk/ntddser.h449
-rw-r--r--winsup/w32api/include/ddk/ntddstor.h333
-rw-r--r--winsup/w32api/include/ddk/ntddtape.h79
-rw-r--r--winsup/w32api/include/ddk/ntddtdi.h61
-rw-r--r--winsup/w32api/include/ddk/ntddvdeo.h440
-rw-r--r--winsup/w32api/include/ddk/ntddvol.h141
-rw-r--r--winsup/w32api/include/ddk/ntifs.h4726
-rw-r--r--winsup/w32api/include/ddk/ntpoapi.h229
-rw-r--r--winsup/w32api/include/ddk/ntstatus.h1105
-rw-r--r--winsup/w32api/include/ddk/parallel.h277
-rw-r--r--winsup/w32api/include/ddk/pfhook.h76
-rw-r--r--winsup/w32api/include/ddk/poclass.h118
-rw-r--r--winsup/w32api/include/ddk/scsi.h1701
-rw-r--r--winsup/w32api/include/ddk/scsiscan.h130
-rw-r--r--winsup/w32api/include/ddk/scsiwmi.h215
-rw-r--r--winsup/w32api/include/ddk/smbus.h190
-rw-r--r--winsup/w32api/include/ddk/srb.h753
-rw-r--r--winsup/w32api/include/ddk/storport.h422
-rw-r--r--winsup/w32api/include/ddk/tdi.h593
-rw-r--r--winsup/w32api/include/ddk/tdiinfo.h110
-rw-r--r--winsup/w32api/include/ddk/tdikrnl.h1162
-rw-r--r--winsup/w32api/include/ddk/tdistat.h83
-rw-r--r--winsup/w32api/include/ddk/tvout.h116
-rw-r--r--winsup/w32api/include/ddk/upssvc.h94
-rw-r--r--winsup/w32api/include/ddk/usb.h471
-rw-r--r--winsup/w32api/include/ddk/usb100.h237
-rw-r--r--winsup/w32api/include/ddk/usbcamdi.h404
-rw-r--r--winsup/w32api/include/ddk/usbdi.h407
-rw-r--r--winsup/w32api/include/ddk/usbioctl.h353
-rw-r--r--winsup/w32api/include/ddk/usbiodef.h106
-rw-r--r--winsup/w32api/include/ddk/usbscan.h158
-rw-r--r--winsup/w32api/include/ddk/usbuser.h328
-rw-r--r--winsup/w32api/include/ddk/video.h1566
-rw-r--r--winsup/w32api/include/ddk/videoagp.h129
-rw-r--r--winsup/w32api/include/ddk/win2k.h106
-rw-r--r--winsup/w32api/include/ddk/winddi.h4258
-rw-r--r--winsup/w32api/include/ddk/winddk.h9240
-rw-r--r--winsup/w32api/include/ddk/winnt4.h623
-rw-r--r--winsup/w32api/include/ddk/winxp.h38
-rw-r--r--winsup/w32api/include/ddk/ws2san.h248
-rw-r--r--winsup/w32api/include/ddk/xfilter.h239
-rw-r--r--winsup/w32api/include/devguid.h65
-rw-r--r--winsup/w32api/include/dhcpcsdk.h42
-rw-r--r--winsup/w32api/include/directx/d3d9.h1288
-rw-r--r--winsup/w32api/include/directx/d3d9caps.h338
-rw-r--r--winsup/w32api/include/directx/d3d9types.h1272
-rw-r--r--winsup/w32api/include/directx/dxerr8.h53
-rw-r--r--winsup/w32api/include/directx/dxerr9.h53
-rw-r--r--winsup/w32api/include/dlgs.h186
-rw-r--r--winsup/w32api/include/docobj.h147
-rw-r--r--winsup/w32api/include/dsadmin.h38
-rw-r--r--winsup/w32api/include/dsclient.h186
-rw-r--r--winsup/w32api/include/dsgetdc.h121
-rw-r--r--winsup/w32api/include/dshow.h108
-rw-r--r--winsup/w32api/include/dsquery.h72
-rw-r--r--winsup/w32api/include/dsrole.h75
-rw-r--r--winsup/w32api/include/dvdevcod.h76
-rw-r--r--winsup/w32api/include/dvdmedia.h101
-rw-r--r--winsup/w32api/include/edevdefs.h346
-rw-r--r--winsup/w32api/include/errorrep.h40
-rw-r--r--winsup/w32api/include/errors.h169
-rw-r--r--winsup/w32api/include/evcode.h68
-rw-r--r--winsup/w32api/include/exdisp.h225
-rw-r--r--winsup/w32api/include/exdispid.h14
-rw-r--r--winsup/w32api/include/fltdefs.h50
-rw-r--r--winsup/w32api/include/httpext.h98
-rwxr-xr-xwinsup/w32api/include/icm.h399
-rw-r--r--winsup/w32api/include/idispids.h10
-rw-r--r--winsup/w32api/include/il21dec.h35
-rw-r--r--winsup/w32api/include/imagehlp.h329
-rw-r--r--winsup/w32api/include/imm.h452
-rw-r--r--winsup/w32api/include/initguid.h12
-rw-r--r--winsup/w32api/include/intshcut.h82
-rw-r--r--winsup/w32api/include/ipexport.h88
-rw-r--r--winsup/w32api/include/iphlpapi.h77
-rw-r--r--winsup/w32api/include/ipifcons.h199
-rw-r--r--winsup/w32api/include/ipinfoid.h43
-rw-r--r--winsup/w32api/include/iprtrmib.h246
-rw-r--r--winsup/w32api/include/iptypes.h229
-rw-r--r--winsup/w32api/include/ipxconst.h36
-rw-r--r--winsup/w32api/include/ipxrtdef.h58
-rw-r--r--winsup/w32api/include/ipxtfflt.h38
-rw-r--r--winsup/w32api/include/isguids.h15
-rw-r--r--winsup/w32api/include/ks.h20
-rw-r--r--winsup/w32api/include/ksmedia.h23
-rw-r--r--winsup/w32api/include/largeint.h112
-rw-r--r--winsup/w32api/include/lm.h27
-rw-r--r--winsup/w32api/include/lmaccess.h654
-rw-r--r--winsup/w32api/include/lmalert.h60
-rw-r--r--winsup/w32api/include/lmapibuf.h18
-rw-r--r--winsup/w32api/include/lmat.h39
-rw-r--r--winsup/w32api/include/lmaudit.h250
-rw-r--r--winsup/w32api/include/lmbrowsr.h74
-rw-r--r--winsup/w32api/include/lmchdev.h61
-rw-r--r--winsup/w32api/include/lmconfig.h21
-rw-r--r--winsup/w32api/include/lmcons.h75
-rw-r--r--winsup/w32api/include/lmerr.h306
-rw-r--r--winsup/w32api/include/lmerrlog.h211
-rw-r--r--winsup/w32api/include/lmmsg.h27
-rw-r--r--winsup/w32api/include/lmremutl.h45
-rw-r--r--winsup/w32api/include/lmrepl.h94
-rw-r--r--winsup/w32api/include/lmserver.h606
-rw-r--r--winsup/w32api/include/lmshare.h147
-rw-r--r--winsup/w32api/include/lmsname.h58
-rw-r--r--winsup/w32api/include/lmstats.h114
-rw-r--r--winsup/w32api/include/lmsvc.h134
-rw-r--r--winsup/w32api/include/lmuse.h60
-rw-r--r--winsup/w32api/include/lmuseflg.h10
-rw-r--r--winsup/w32api/include/lmwksta.h233
-rw-r--r--winsup/w32api/include/lzexpand.h40
-rw-r--r--winsup/w32api/include/mapi.h163
-rw-r--r--winsup/w32api/include/mciavi.h25
-rw-r--r--winsup/w32api/include/mcx.h77
-rw-r--r--winsup/w32api/include/mgm.h75
-rw-r--r--winsup/w32api/include/mgmtapi.h58
-rwxr-xr-xwinsup/w32api/include/mlang.h349
-rw-r--r--winsup/w32api/include/mmreg.h71
-rw-r--r--winsup/w32api/include/mmsystem.h1943
-rw-r--r--winsup/w32api/include/mpegtype.h29
-rw-r--r--winsup/w32api/include/mprapi.h576
-rw-r--r--winsup/w32api/include/mq.h534
-rw-r--r--winsup/w32api/include/msacm.h186
-rw-r--r--winsup/w32api/include/mshtml.h704
-rw-r--r--winsup/w32api/include/mswsock.h113
-rw-r--r--winsup/w32api/include/nb30.h186
-rw-r--r--winsup/w32api/include/nddeapi.h133
-rw-r--r--winsup/w32api/include/nspapi.h126
-rw-r--r--winsup/w32api/include/ntdef.h60
-rw-r--r--winsup/w32api/include/ntdll.h15
-rw-r--r--winsup/w32api/include/ntdsapi.h115
-rw-r--r--winsup/w32api/include/ntdsbcli.h45
-rw-r--r--winsup/w32api/include/ntldap.h60
-rw-r--r--winsup/w32api/include/ntsecapi.h612
-rw-r--r--winsup/w32api/include/ntsecpkg.h431
-rw-r--r--winsup/w32api/include/oaidl.h778
-rw-r--r--winsup/w32api/include/objbase.h203
-rw-r--r--winsup/w32api/include/objfwd.h57
-rw-r--r--winsup/w32api/include/objidl.h1771
-rw-r--r--winsup/w32api/include/objsafe.h26
-rw-r--r--winsup/w32api/include/objsel.h118
-rw-r--r--winsup/w32api/include/ocidl.h837
-rw-r--r--winsup/w32api/include/odbcinst.h148
-rw-r--r--winsup/w32api/include/ole.h308
-rw-r--r--winsup/w32api/include/ole2.h110
-rw-r--r--winsup/w32api/include/ole2ver.h8
-rw-r--r--winsup/w32api/include/oleacc.h219
-rw-r--r--winsup/w32api/include/oleauto.h656
-rw-r--r--winsup/w32api/include/olectl.h323
-rw-r--r--winsup/w32api/include/olectlid.h114
-rw-r--r--winsup/w32api/include/oledlg.h935
-rw-r--r--winsup/w32api/include/oleidl.h575
-rw-r--r--winsup/w32api/include/pbt.h24
-rw-r--r--winsup/w32api/include/poppack.h3
-rw-r--r--winsup/w32api/include/powrprof.h120
-rw-r--r--winsup/w32api/include/prsht.h304
-rw-r--r--winsup/w32api/include/psapi.h105
-rw-r--r--winsup/w32api/include/pshpack1.h3
-rw-r--r--winsup/w32api/include/pshpack2.h3
-rw-r--r--winsup/w32api/include/pshpack4.h3
-rw-r--r--winsup/w32api/include/pshpack8.h3
-rw-r--r--winsup/w32api/include/qedit.h70
-rw-r--r--winsup/w32api/include/rapi.h54
-rw-r--r--winsup/w32api/include/ras.h997
-rw-r--r--winsup/w32api/include/rasdlg.h152
-rw-r--r--winsup/w32api/include/raserror.h210
-rw-r--r--winsup/w32api/include/rassapi.h182
-rw-r--r--winsup/w32api/include/reason.h47
-rw-r--r--winsup/w32api/include/regstr.h769
-rw-r--r--winsup/w32api/include/richedit.h523
-rw-r--r--winsup/w32api/include/richole.h107
-rw-r--r--winsup/w32api/include/routprot.h70
-rw-r--r--winsup/w32api/include/rpc.h65
-rw-r--r--winsup/w32api/include/rpcdce.h396
-rw-r--r--winsup/w32api/include/rpcdce2.h56
-rw-r--r--winsup/w32api/include/rpcdcep.h129
-rw-r--r--winsup/w32api/include/rpcndr.h518
-rw-r--r--winsup/w32api/include/rpcnsi.h122
-rw-r--r--winsup/w32api/include/rpcnsip.h25
-rw-r--r--winsup/w32api/include/rpcnterr.h23
-rw-r--r--winsup/w32api/include/rpcproxy.h204
-rw-r--r--winsup/w32api/include/rtutils.h90
-rw-r--r--winsup/w32api/include/schannel.h90
-rw-r--r--winsup/w32api/include/schnlsp.h14
-rw-r--r--winsup/w32api/include/scrnsave.h81
-rwxr-xr-xwinsup/w32api/include/sddl.h34
-rw-r--r--winsup/w32api/include/secext.h52
-rw-r--r--winsup/w32api/include/security.h42
-rw-r--r--winsup/w32api/include/servprov.h33
-rw-r--r--winsup/w32api/include/setupapi.h1590
-rw-r--r--winsup/w32api/include/shellapi.h366
-rwxr-xr-xwinsup/w32api/include/shldisp.h61
-rw-r--r--winsup/w32api/include/shlguid.h102
-rw-r--r--winsup/w32api/include/shlobj.h1535
-rw-r--r--winsup/w32api/include/shlwapi.h736
-rw-r--r--winsup/w32api/include/snmp.h259
-rw-r--r--winsup/w32api/include/specstrings.h130
-rw-r--r--winsup/w32api/include/sql.h408
-rw-r--r--winsup/w32api/include/sqlext.h1218
-rw-r--r--winsup/w32api/include/sqltypes.h165
-rw-r--r--winsup/w32api/include/sqlucode.h142
-rw-r--r--winsup/w32api/include/sspi.h343
-rw-r--r--winsup/w32api/include/stm.h25
-rw-r--r--winsup/w32api/include/strmif.h1159
-rw-r--r--winsup/w32api/include/subauth.h209
-rw-r--r--winsup/w32api/include/svcguid.h33
-rw-r--r--winsup/w32api/include/tlhelp32.h140
-rw-r--r--winsup/w32api/include/tmschema.h664
-rw-r--r--winsup/w32api/include/unknwn.h76
-rw-r--r--winsup/w32api/include/userenv.h57
-rwxr-xr-xwinsup/w32api/include/usp10.h229
-rw-r--r--winsup/w32api/include/uxtheme.h273
-rw-r--r--winsup/w32api/include/vfw.h1370
-rw-r--r--winsup/w32api/include/vidcap.h23
-rw-r--r--winsup/w32api/include/vmr9.h211
-rw-r--r--winsup/w32api/include/vptype.h55
-rw-r--r--winsup/w32api/include/w32api.h52
-rw-r--r--winsup/w32api/include/winable.h99
-rw-r--r--winsup/w32api/include/winbase.h2456
-rw-r--r--winsup/w32api/include/winber.h67
-rw-r--r--winsup/w32api/include/wincon.h232
-rw-r--r--winsup/w32api/include/wincrypt.h1318
-rw-r--r--winsup/w32api/include/windef.h337
-rw-r--r--winsup/w32api/include/windns.h405
-rw-r--r--winsup/w32api/include/windows.h131
-rw-r--r--winsup/w32api/include/windowsx.h544
-rw-r--r--winsup/w32api/include/winerror.h2283
-rw-r--r--winsup/w32api/include/wingdi.h3228
-rw-r--r--winsup/w32api/include/wininet.h986
-rw-r--r--winsup/w32api/include/winioctl.h554
-rw-r--r--winsup/w32api/include/winldap.h713
-rw-r--r--winsup/w32api/include/winnetwk.h350
-rw-r--r--winsup/w32api/include/winnls.h734
-rw-r--r--winsup/w32api/include/winnt.h3963
-rw-r--r--winsup/w32api/include/winperf.h139
-rw-r--r--winsup/w32api/include/winreg.h175
-rw-r--r--winsup/w32api/include/winresrc.h14
-rw-r--r--winsup/w32api/include/winsnmp.h329
-rw-r--r--winsup/w32api/include/winsock.h536
-rw-r--r--winsup/w32api/include/winsock2.h1303
-rw-r--r--winsup/w32api/include/winspool.h982
-rw-r--r--winsup/w32api/include/winsvc.h313
-rw-r--r--winsup/w32api/include/winuser.h4456
-rw-r--r--winsup/w32api/include/winver.h133
-rw-r--r--winsup/w32api/include/ws2spi.h202
-rw-r--r--winsup/w32api/include/ws2tcpip.h379
-rw-r--r--winsup/w32api/include/wsahelp.h98
-rw-r--r--winsup/w32api/include/wsipx.h28
-rw-r--r--winsup/w32api/include/wsnetbs.h35
-rw-r--r--winsup/w32api/include/wtsapi32.h115
-rw-r--r--winsup/w32api/include/wtypes.h171
-rw-r--r--winsup/w32api/include/xprtdefs.h11
-rw-r--r--winsup/w32api/include/zmouse.h36
-rwxr-xr-xwinsup/w32api/install-sh251
-rw-r--r--winsup/w32api/lib/Makefile.in292
-rw-r--r--winsup/w32api/lib/aclui.def7
-rw-r--r--winsup/w32api/lib/advapi32.def535
-rw-r--r--winsup/w32api/lib/ativscp-uuid.c16
-rw-r--r--winsup/w32api/lib/avicap32.def8
-rw-r--r--winsup/w32api/lib/avifil32.def77
-rw-r--r--winsup/w32api/lib/bthprops.def8
-rw-r--r--winsup/w32api/lib/cap.def6
-rw-r--r--winsup/w32api/lib/cguid-uuid.c20
-rw-r--r--winsup/w32api/lib/comcat-uuid.c30
-rw-r--r--winsup/w32api/lib/comctl32.def133
-rw-r--r--winsup/w32api/lib/comdlg32.def27
-rw-r--r--winsup/w32api/lib/crypt32.def47
-rw-r--r--winsup/w32api/lib/ctl3d32.def27
-rw-r--r--winsup/w32api/lib/ddk/Makefile.in201
-rw-r--r--winsup/w32api/lib/ddk/apcups.def8
-rw-r--r--winsup/w32api/lib/ddk/cfgmgr32.def198
-rw-r--r--winsup/w32api/lib/ddk/dxapi.def9
-rw-r--r--winsup/w32api/lib/ddk/hal.def94
-rw-r--r--winsup/w32api/lib/ddk/hid.def47
-rw-r--r--winsup/w32api/lib/ddk/hidparse.def32
-rw-r--r--winsup/w32api/lib/ddk/mcd.def7
-rw-r--r--winsup/w32api/lib/ddk/ndis.def277
-rw-r--r--winsup/w32api/lib/ddk/newdev.def6
-rw-r--r--winsup/w32api/lib/ddk/ntoskrnl.def1460
-rw-r--r--winsup/w32api/lib/ddk/scsiport.def49
-rw-r--r--winsup/w32api/lib/ddk/tdi.def50
-rw-r--r--winsup/w32api/lib/ddk/usbcamd.def10
-rw-r--r--winsup/w32api/lib/ddk/usbcamd2.def10
-rw-r--r--winsup/w32api/lib/ddk/videoprt.def115
-rw-r--r--winsup/w32api/lib/ddk/win32k.def226
-rw-r--r--winsup/w32api/lib/devguid.c61
-rw-r--r--winsup/w32api/lib/dhcpcsvc.def8
-rw-r--r--winsup/w32api/lib/directx/Makefile.in226
-rw-r--r--winsup/w32api/lib/directx/d3d8.def6
-rw-r--r--winsup/w32api/lib/directx/d3d9.def8
-rw-r--r--winsup/w32api/lib/directx/d3dim.def15
-rw-r--r--winsup/w32api/lib/directx/d3drm.def23
-rw-r--r--winsup/w32api/lib/directx/d3dx8d.def208
-rw-r--r--winsup/w32api/lib/directx/d3dx9d.def269
-rw-r--r--winsup/w32api/lib/directx/d3dxof.def3
-rw-r--r--winsup/w32api/lib/directx/ddraw.def15
-rw-r--r--winsup/w32api/lib/directx/dinput.def5
-rw-r--r--winsup/w32api/lib/directx/dinput8.def3
-rw-r--r--winsup/w32api/lib/directx/dinput_joy.c63
-rw-r--r--winsup/w32api/lib/directx/dinput_joy2.c183
-rw-r--r--winsup/w32api/lib/directx/dinput_kbd.c275
-rw-r--r--winsup/w32api/lib/directx/dinput_mouse.c26
-rw-r--r--winsup/w32api/lib/directx/dinput_mouse2.c30
-rw-r--r--winsup/w32api/lib/directx/dinput_private.h81
-rw-r--r--winsup/w32api/lib/directx/dmoguids.c40
-rw-r--r--winsup/w32api/lib/directx/dplayx.def8
-rw-r--r--winsup/w32api/lib/directx/dpnaddr.def3
-rw-r--r--winsup/w32api/lib/directx/dpnet.def3
-rw-r--r--winsup/w32api/lib/directx/dpnlobby.def3
-rw-r--r--winsup/w32api/lib/directx/dpvoice.def3
-rw-r--r--winsup/w32api/lib/directx/dsetup.def20
-rw-r--r--winsup/w32api/lib/directx/dsound.def12
-rw-r--r--winsup/w32api/lib/directx/dxerr.c773
-rw-r--r--winsup/w32api/lib/directx/dxerr8.c18
-rw-r--r--winsup/w32api/lib/directx/dxerr8w.c21
-rw-r--r--winsup/w32api/lib/directx/dxerr9.c18
-rw-r--r--winsup/w32api/lib/directx/dxerr9w.c21
-rw-r--r--winsup/w32api/lib/directx/dxguid.c607
-rw-r--r--winsup/w32api/lib/directx/ksproxy.def8
-rw-r--r--winsup/w32api/lib/directx/ksuser.c400
-rw-r--r--winsup/w32api/lib/directx/ksuser.def6
-rw-r--r--winsup/w32api/lib/directx/msdmo.def17
-rw-r--r--winsup/w32api/lib/directx/strmiids.c980
-rw-r--r--winsup/w32api/lib/directx/test.c12
-rw-r--r--winsup/w32api/lib/dlcapi.def5
-rw-r--r--winsup/w32api/lib/dnsapi.def31
-rw-r--r--winsup/w32api/lib/docobj-uuid.c15
-rw-r--r--winsup/w32api/lib/exdisp-uuid.c18
-rw-r--r--winsup/w32api/lib/extras-uuid.c42
-rw-r--r--winsup/w32api/lib/faultrep.def5
-rw-r--r--winsup/w32api/lib/gdi32.def348
-rw-r--r--winsup/w32api/lib/glaux.def173
-rw-r--r--winsup/w32api/lib/glu32.def54
-rw-r--r--winsup/w32api/lib/hlguids-uuid.c15
-rw-r--r--winsup/w32api/lib/hlink-uuid.c13
-rw-r--r--winsup/w32api/lib/icmui.def4
-rw-r--r--winsup/w32api/lib/igmpagnt.def6
-rw-r--r--winsup/w32api/lib/imagehlp.def114
-rw-r--r--winsup/w32api/lib/imm32.def78
-rw-r--r--winsup/w32api/lib/iphlpapi.def49
-rw-r--r--winsup/w32api/lib/kernel32.def874
-rw-r--r--winsup/w32api/lib/largeint.c118
-rw-r--r--winsup/w32api/lib/lz32.def14
-rw-r--r--winsup/w32api/lib/mapi32.def164
-rw-r--r--winsup/w32api/lib/mfcuia32.def12
-rw-r--r--winsup/w32api/lib/mgmtapi.def14
-rw-r--r--winsup/w32api/lib/mlang-uuid.c13
-rw-r--r--winsup/w32api/lib/mpr.def72
-rw-r--r--winsup/w32api/lib/mprapi.def123
-rw-r--r--winsup/w32api/lib/mqrt.def40
-rw-r--r--winsup/w32api/lib/msacm32.def46
-rw-r--r--winsup/w32api/lib/mscms.def55
-rw-r--r--winsup/w32api/lib/mshtml-uuid.c147
-rw-r--r--winsup/w32api/lib/msimg32.def7
-rw-r--r--winsup/w32api/lib/msvcp60.def71
-rw-r--r--winsup/w32api/lib/msvfw32.def49
-rw-r--r--winsup/w32api/lib/mswsock.def28
-rwxr-xr-xwinsup/w32api/lib/msxml-uuid.c29
-rw-r--r--winsup/w32api/lib/nddeapi.def30
-rw-r--r--winsup/w32api/lib/netapi32.def249
-rw-r--r--winsup/w32api/lib/ntdll.def1017
-rw-r--r--winsup/w32api/lib/oaidl-uuid.c20
-rw-r--r--winsup/w32api/lib/objidl-uuid.c43
-rw-r--r--winsup/w32api/lib/objsafe-uuid.c9
-rw-r--r--winsup/w32api/lib/ocidl-uuid.c46
-rw-r--r--winsup/w32api/lib/odbc32.def185
-rw-r--r--winsup/w32api/lib/odbccp32.def54
-rw-r--r--winsup/w32api/lib/ole32.def255
-rw-r--r--winsup/w32api/lib/oleacc-uuid.c11
-rw-r--r--winsup/w32api/lib/oleacc.def17
-rw-r--r--winsup/w32api/lib/oleaut32.def355
-rw-r--r--winsup/w32api/lib/olecli32.def57
-rw-r--r--winsup/w32api/lib/olectlid-uuid.c36
-rw-r--r--winsup/w32api/lib/oledlg.def25
-rw-r--r--winsup/w32api/lib/oleidl-uuid.c27
-rw-r--r--winsup/w32api/lib/olepro32.def9
-rw-r--r--winsup/w32api/lib/olesvr32.def13
-rw-r--r--winsup/w32api/lib/opengl32.def369
-rw-r--r--winsup/w32api/lib/penwin32.def101
-rw-r--r--winsup/w32api/lib/pkpd32.def36
-rw-r--r--winsup/w32api/lib/power-uuid.c18
-rw-r--r--winsup/w32api/lib/powrprof.def25
-rw-r--r--winsup/w32api/lib/psapi.def23
-rw-r--r--winsup/w32api/lib/quartz.def7
-rw-r--r--winsup/w32api/lib/rapi.def84
-rw-r--r--winsup/w32api/lib/rasapi32.def146
-rw-r--r--winsup/w32api/lib/rasdlg.def8
-rw-r--r--winsup/w32api/lib/res.rc6
-rw-r--r--winsup/w32api/lib/rpcdce4.def26
-rw-r--r--winsup/w32api/lib/rpcns4.def60
-rw-r--r--winsup/w32api/lib/rpcrt4.def359
-rw-r--r--winsup/w32api/lib/rtm.def18
-rwxr-xr-xwinsup/w32api/lib/rtutils.def54
-rw-r--r--winsup/w32api/lib/scrnsave.c409
-rw-r--r--winsup/w32api/lib/secur32.def41
-rw-r--r--winsup/w32api/lib/servprov-uuid.c9
-rw-r--r--winsup/w32api/lib/setupapi.def460
-rw-r--r--winsup/w32api/lib/shell32.c79
-rw-r--r--winsup/w32api/lib/shell32.def185
-rw-r--r--winsup/w32api/lib/shfolder.def4
-rw-r--r--winsup/w32api/lib/shlwapi.def296
-rw-r--r--winsup/w32api/lib/snmpapi.def40
-rw-r--r--winsup/w32api/lib/svrapi.def22
-rw-r--r--winsup/w32api/lib/tapi32.def116
-rw-r--r--winsup/w32api/lib/test.c127
-rw-r--r--winsup/w32api/lib/th32.def14
-rw-r--r--winsup/w32api/lib/thunk32.def68
-rw-r--r--winsup/w32api/lib/unknwn-uuid.c10
-rw-r--r--winsup/w32api/lib/url.def9
-rw-r--r--winsup/w32api/lib/urlmon-uuid.c14
-rw-r--r--winsup/w32api/lib/user32.def639
-rw-r--r--winsup/w32api/lib/userenv.def11
-rwxr-xr-xwinsup/w32api/lib/usp10.def42
-rw-r--r--winsup/w32api/lib/uxtheme.def50
-rw-r--r--winsup/w32api/lib/vdmdbg.def18
-rw-r--r--winsup/w32api/lib/version.def16
-rw-r--r--winsup/w32api/lib/vfw32.mri6
-rw-r--r--winsup/w32api/lib/win32spl.def16
-rw-r--r--winsup/w32api/lib/wininet.def244
-rw-r--r--winsup/w32api/lib/winmm.def196
-rw-r--r--winsup/w32api/lib/winspool.def133
-rw-r--r--winsup/w32api/lib/winstrm.def9
-rw-r--r--winsup/w32api/lib/wldap32.def257
-rw-r--r--winsup/w32api/lib/wow32.def19
-rwxr-xr-xwinsup/w32api/lib/ws2_32.c6
-rw-r--r--winsup/w32api/lib/ws2_32.def112
-rw-r--r--winsup/w32api/lib/wsnmp32.def48
-rw-r--r--winsup/w32api/lib/wsock32.def75
-rw-r--r--winsup/w32api/lib/wst.def3
-rwxr-xr-xwinsup/w32api/lib/wtsapi32.def35
2111 files changed, 0 insertions, 678202 deletions
diff --git a/djunpack.bat b/djunpack.bat
deleted file mode 100755
index f09f5ed..0000000
--- a/djunpack.bat
+++ /dev/null
@@ -1,52 +0,0 @@
-@echo off
-Rem
-Rem WARNING WARNING WARNING: This file needs to have DOS CRLF end-of-line
-Rem format, or else stock DOS/Windows shells will refuse to run it.
-Rem
-Rem This batch file unpacks the GDB distribution while simultaneously
-Rem renaming some of the files whose names are invalid on DOS or conflict
-Rem with other file names after truncation to DOS 8+3 namespace.
-Rem
-Rem Invoke like this:
-Rem
-Rem djunpack gdb-XYZ.tar
-Rem
-Rem where XYZ is the version number. If the argument includes leading
-Rem directories, it MUST use backslashes, not forward slashes.
-Rem
-Rem The following 2 lines need to be changed with each new GDB release, to
-Rem be identical to the name of the top-level directory where the GDB
-Rem distribution unpacks itself.
-set GDBVER=gdb-5.0
-if "%GDBVER%"=="gdb-5.0" GoTo EnvOk
-Rem If their environment space is too small, re-exec with a larger one
-command.com /e:4096 /c %0 %1
-GoTo End
-:EnvOk
-if not exist %1 GoTo NoArchive
-djtar -x -p -o %GDBVER%/gdb/config/djgpp/fnchange.lst %1 > fnchange.tmp
-Rem The following uses a feature of COPY whereby it does not copy
-Rem empty files. We need that because the previous line will create
-Rem an empty fnchange.tmp even if the command failed for some reason.
-copy fnchange.tmp junk.tmp > nul
-if not exist junk.tmp GoTo NoDjTar
-del junk.tmp
-sed -e 's,@V@,%GDBVER%,g' < fnchange.tmp > fnchange.lst
-Rem See the comment above about the reason for using COPY.
-copy fnchange.lst junk.tmp > nul
-if not exist junk.tmp GoTo NoSed
-del junk.tmp
-djtar -x -n fnchange.lst %1
-GoTo End
-:NoSed
-echo FAIL: Sed is not available.
-GoTo End
-:NoDjTar
-echo FAIL: DJTAR is not available or no fnchange.lst file in %1.
-GoTo End
-:NoArchive
-echo FAIL: the file %1 does not seem to exist.
-echo Remember that %1 cannot use forward slashes, only backslashes.
-GoTo End
-:End
-set GDBVER=
diff --git a/include/COPYING b/include/COPYING
deleted file mode 100644
index 623b625..0000000
--- a/include/COPYING
+++ /dev/null
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/include/COPYING3 b/include/COPYING3
deleted file mode 100644
index 94a9ed0..0000000
--- a/include/COPYING3
+++ /dev/null
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- <program> Copyright (C) <year> <name of author>
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/include/ChangeLog b/include/ChangeLog
deleted file mode 100644
index 73892f5..0000000
--- a/include/ChangeLog
+++ /dev/null
@@ -1,910 +0,0 @@
-2008-12-10 Jason Merrill <jason@redhat.com>
-
- * demangle.h (enum demangle_component_type): Add
- DEMANGLE_COMPONENT_FIXED_TYPE.
-
-2008-12-01 Cary Coutant <ccoutant@google.com>
-
- * plugin-api.h (ld_plugin_message): Change format parameter to const.
-
-2008-12-01 Cary Coutant <ccoutant@google.com>
-
- * plugin-api.h: Fix syntax error when compiling with C++.
-
-2008-11-26 Alan Modra <amodra@bigpond.net.au>
-
- PR 7047
- * bfdlink.h (struct bfd_elf_version_expr): Delete "symbol".
- Add "literal".
-
-2008-11-21 Sterling Augustine <sterling@tensilica.com>
-
- * xtensa-isa-internal.h (XTENSA_STATE_IS_SHARED_OR): New flag.
- * xtensa-isa.h (xtensa_state_is_shared_or): New prototype.
-
-2008-11-19 Bob Wilson <bob.wilson@acm.org>
-
- * xtensa-config.h (XCHAL_HAVE_MUL16, XCHAL_HAVE_MUL32, XCHAL_HAVE_DIV32)
- (XCHAL_HAVE_MINMAX, XCHAL_HAVE_SEXT, XCHAL_HAVE_THREADPTR)
- (XCHAL_HAVE_RELEASE_SYNC, XCHAL_HAVE_S32C1I): Change to 1.
- (XCHAL_NUM_AREGS): Change to 32.
- (XCHAL_ICACHE_SIZE, XCHAL_DCACHE_SIZE): Change to 16K.
- (XCHAL_ICACHE_LINESIZE, XCHAL_DCACHE_LINESIZE): Change to 32.
- (XCHAL_ICACHE_LINEWIDTH, XCHAL_DCACHE_LINEWIDTH): Change to 5.
- (XCHAL_DCACHE_IS_WRITEBACK): Change to 1.
- (XCHAL_DEBUGLEVEL): Change to 6.
-
-2008-11-14 Tristan Gingold <gingold@adacore.com>
-
- * fopen-vms.h (FOPEN_RB): Use a single string to match the
- standard prototype.
- (FOPEN_WB): Ditto.
- (FOPEN_AB): Ditto.
- (FOPEN_RUB): Ditto.
- (FOPEN_WUB): Ditto.
- (FOPEN_AUB): Ditto.
-
-2008-10-21 Alan Modra <amodra@bigpond.net.au>
-
- * obstack.h (obstack_finish <!__GNUC__>): Cast result to void *.
-
-2008-10-06 Jason Merrill <jason@redhat.com>
-
- * demangle.h (enum demangle_component_type): Add
- DEMANGLE_COMPONENT_PACK_EXPANSION.
-
-2008-09-24 Richard Henderson <rth@redhat.com>
-
- * elf/dwarf2.h (DW_OP_GNU_encoded_addr): New.
-
-2008-09-22 Rafael Espindola <espindola@google.com>
-
- * plugin-api.h (ld_plugin_status): Remove comma from the last item.
- Use C style comment.
- (ld_plugin_api_version, ld_plugin_output_file_type,
- ld_plugin_symbol_kind, ld_plugin_symbol_visibility,
- ld_plugin_symbol_resolution, ld_plugin_level, ld_plugin_tag): Remove
- comma from the last item.
-
-2008-09-18 Cary Coutant <ccoutant@google.com>
-
- Add plugin functionality for link-time optimization (LTO).
- * plugin-api.h: New file.
-
-2008-09-09 Jason Merrill <jason@redhat.com>
-
- * demangle.h (enum demangle_component_type): Add
- DEMANGLE_COMPONENT_DECLTYPE.
-
-2008-08-25 Alan Modra <amodra@bigpond.net.au>
-
- * binary-io.h: New file, imported from gnulib, but don't
- #include <fcntl.h> or <stdio.h>.
-
-2008-08-17 Alan Modra <amodra@bigpond.net.au>
-
- * bfdlink.h (bfd_generic_link_read_symbols): Declare.
-
-2008-08-08 Anatoly Sokolov <aesok@post.ru>
-
- * elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
- E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define.
- (EF_AVR_MACH): Redefine to 0x7F.
- * opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove.
- (AVR_ISA_AVR3): Redefine.
- (AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35,
- AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51,
- AVR_ISA_AVR6): Define.
-
-2008-07-12 Jie Zhang <jie.zhang@analog.com>
-
- Revert
- 2008-07-12 Jie Zhang <jie.zhang@analog.com>
- * bfdlink.h (struct bfd_link_info): Add sep_code member
- variable.
- * elf/bfin.h (EF_BFIN_CODE_IN_L1): Define.
- (EF_BFIN_DATA_IN_L1): Define.
-
-2008-07-12 Jie Zhang <jie.zhang@analog.com>
-
- * bfdlink.h (struct bfd_link_info): Add sep_code member
- variable.
- * elf/bfin.h (EF_BFIN_CODE_IN_L1): Define.
- (EF_BFIN_DATA_IN_L1): Define.
-
-2008-07-07 Stan Shebs <stan@codesourcery.com>
-
- * dis-asm.h (struct disassemble_info): Add endian_code field.
-
-2008-07-07 Joel Brobecker <brobecker@adacore.com>
-
- * safe-ctype.h: Add #include of ctype.h before redefining
- the ctype.h macros.
-
-2008-07-04 Joel Brobecker <brobecker@adacore.com>
-
- * safe-ctype.h: Remove #error when detecting that ctype.h has been
- included. Redefine the various macros provided by ctype.h as
- undefined variables.
-
-2008-06-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (XALLOCA, XDUP, XALLOCAVEC, XDUPVEC, XALLOCAVAR,
- XDUPVAR, XOBNEWVEC, XOBNEWVAR): New.
-
-2008-06-06 Alan Modra <amodra@bigpond.net.au>
-
- * bfdlink.h (struct bfd_link_info): Add "path_separator".
-
-2008-04-10 Andreas Krebbel <krebbel1@de.ibm.com>
-
- * dis-asm.h (print_s390_disassembler_options):
- Prototype added.
-
-2008-03-24 Ian Lance Taylor <iant@google.com>
-
- * sha1.h: New file, from gnulib.
-
- * md5.h: Add extern "C" when compiled with C++.
-
-2008-03-24 Ian Lance Taylor <iant@google.com>
-
- * md5.h: Add extern "C" when compiled with C++.
-
-2008-03-21 Ian Lance Taylor <iant@google.com>
-
- * filenames.h: Add extern "C" when compiled with C++.
-
-2008-02-15 Alan Modra <amodra@bigpond.net.au>
-
- * bfdlink.h (struct bfd_link_hash_table): Delete creator field.
- (struct bfd_link_info): Add output_bfd.
-
-2008-02-11 Bob Wilson <bob.wilson@acm.org>
-
- * xtensa-config.h (XCHAL_HAVE_THREADPTR): Redefine to zero.
- (XCHAL_NUM_AREGS, XCHAL_MAX_INSTRUCTION_SIZE): New.
-
-2008-01-26 David Daney <ddaney@avtrex.com>
-
- * demangle.h (demangle_component_type): Add
- DEMANGLE_COMPONENT_JAVA_RESOURCE,
- DEMANGLE_COMPONENT_COMPOUND_NAME, and
- DEMANGLE_COMPONENT_CHARACTER as new enum values.
- (demangle_component): Add struct s_character to union u.
-
-2007-11-07 Joseph Myers <joseph@codesourcery.com>
- Daniel Jacobowitz <dan@codesourcery.com>
-
- * floatformat.h (struct floatformat): Add split_half field.
- (floatformat_ibm_long_double): New.
-
-2007-09-06 Tom Tromey <tromey@redhat.com>
-
- * libiberty.h (pex_free): Document process killing.
-
-2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
-
- * demangle.h (enum demangle_component_type): Add
- DEMANGLE_COMPONENT_RVALUE_REFERENCE.
-
-2007-07-25 Ben Elliston <bje@au.ibm.com>
-
- * ternary.h: Remove.
-
-2007-07-18 Bob Wilson <bob.wilson@acm.org>
-
- * xtensa-config.h (XCHAL_HAVE_THREADPTR): New.
- (XCHAL_HAVE_RELEASE_SYNC, XCHAL_HAVE_S32C1I): New.
-
-2007-07-17 Nick Clifton <nickc@redhat.com>
-
- * COPYING3: New file. Contains version 3 of the GNU General
- Public License.
-
-2007-07-12 Kai Tietz <kai.tietz@onevision.com>
-
- * splay-tree.h (libi_uhostptr_t, libi_shostptr_t): Adjust types
- work-a-round whitespace problem in gcc gengtype.
-
- * splay-tree.h (libi_uhostptr_t, libi_shostptr_t): New types,
- needed for WIN64 when a long is not wide enough for a pointer.
- (splay_tree_key, splay_tree_value): Use the new types.
-
-2007-07-09 Roland McGrath <roland@redhat.com>
-
- * bfdlink.h (struct bfd_link_info): Add member emit_note_gnu_build_id.
-
-2007-07-06 Nick Clifton <nickc@redhat.com>
-
- * bfdlink.h: Update copyright notice to refer to GPLv3.
-
-2007-06-29 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
-
- * dis-asm.h (print_insn_cr16): New prototype.
-
-2007-06-01 Noah Misch <noah@cs.caltech.edu>
- Alan Modra <amodra@bigpond.net.au>
-
- * bfdlink.h (struct bfd_link_info): Add input_bfds_tail.
-
-2007-05-07 Nathan Froyd <froydnj@codesourcery.com>
-
- * libiberty.h (writeargv): Declare.
-
-2007-04-30 Alan Modra <amodra@bigpond.net.au>
-
- * bfdlink.h (struct bfd_link_info): Add "info" and "minfo".
-
-2007-04-25 Mark Mitchell <mark@codesourcery.com>
-
- * demangle.h: Change license to LGPL + exception.
-
-2007-04-10 Richard Henderson <rth@redhat.com>
-
- * bfdlink.h (struct bfd_link_info): Add relax_trip.
-
-2007-03-29 Joel Brobecker <brobecker@adacore.com>
-
- * filenames.h (FILENAME_CMP): Adjust define to call filename_cmp
- regardless of the type of file system.
-
-2007-03-06 Jan Hubicka <jh@suse.cz>
-
- * ansidecl.h (ATTRIBUTE_COLD, ATTRIBUTE_HOT): New.
-
-2007-02-21 Nick Clifton <nickc@redhat.com>
-
- * bfdlink.h (struct bfd_link_callbacks): Add
- override_segment_assignment field.
-
-2007-02-17 Mark Mitchell <mark@codesourcery.com>
- Nathan Sidwell <nathan@codesourcery.com>
- Vladimir Prus <vladimir@codesourcery.com
- Joseph Myers <joseph@codesourcery.com>
-
- * bin-bugs.h: Remove.
-
-2007-02-09 Joseph S. Myers <joseph@codesourcery.com>
-
- * libiberty.h (pex_write_input): Remove prototype.
-
-2007-02-05 Dave Brolley <brolley@redhat.com>
-
- * Contribute the following changes:
- 2001-03-26 Ben Elliston <bje@redhat.com>
-
- * dis-asm.h (print_insn_mep): Declare.
-
-2007-02-02 H.J. Lu <hongjiu.lu@intel.com>
-
- * dis-asm.h (print_i386_disassembler_options): New.
-
-2007-01-31 Vladimir Prus <vladimir@codesourcery.com>
-
- * libiberty.h (PEX_STDERR_TO_PIPE): New define.
- (PEX_BINARY_ERROR): New define.
- (pex_read_err): New function.
-
-2007-01-29 Simon Baldwin <simonb@google.com>
-
- * demangle.h: New cplus_demangle_print_callback,
- cplus_demangle_v3_callback, and java_demangle_v3_callback function
- prototypes, and demangle_callbackref type definition.
-
-2007-01-16 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/3831
- * bfdlink.h (bfd_link_info): Rename dynamic to dynamic_list.
- Add dynamic and dynamic_data.
-
-2006-12-05 Michael Tautschnig <tautschn@model.in.tum.de>
- Nick Clifton <nickc@redhat.com>
-
- * ansidecl.h (ATTRIBUTE_PACKED): Define.
-
-2006-11-30 Andrew Stubbs <andrew.stubbs@st.com>
- J"orn Rennecke <joern.rennecke@st.com>
-
- PR driver/29931
- * libiberty.h (make_relative_prefix_ignore_links): Declare.
-
-2006-11-27 Bob Wilson <bob.wilson@acm.org>
-
- * xtensa-config.h (XSHAL_ABI): New.
- (XTHAL_ABI_WINDOWED, XTHAL_ABI_CALL0): New.
-
-2006-11-27 Bob Wilson <bob.wilson@acm.org>
-
- * xtensa-isa.h (STATIC_LIBISA): Delete.
-
-2006-10-30 Paul Brook <paul@codesourcery.com>
-
- * dis-asm.h (disassemble_info): Add symtab, symtab_pos and
- symtab_size.
-
-2006-10-30 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/3111
- * bfdlink.h (bfd_link_info): Add reduce_memory_overheads.
-
-2006-10-25 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
- Yukishige Shibata <shibata@rd.scei.sony.co.jp>
- Nobuhisa Fujinami <fnami@rd.scei.sony.co.jp>
- Takeaki Fukuoka <fukuoka@rd.scei.sony.co.jp>
- Alan Modra <amodra@bigpond.net.au>
-
- * dis-asm.h (print_insn_spu): Declare.
-
-2006-09-17 Mei Ligang <ligang@sunnorth.com.cn>
-
- * dis-asm.h: Add prototypes for Score disassembler routines.
-
-2006-09-07 H.J. Lu <hongjiu.lu@intel.com>
-
- * bfdlink.h (bfd_elf_dynamic_list): New.
- (bfd_link_info): Add a dynamic field.
-
-2006-08-04 Marcelo Tosatti <marcelo@kvack.org>
-
- * bfdlink.h (struct bfd_link_info): New field: print_gc_sections.
-
-2006-07-10 Jakub Jelinek <jakub@redhat.com>
-
- * bfdlink.h (struct bfd_link_info): Add emit_hash and
- emit_gnu_hash bitfields.
-
-2006-04-11 Jim Blandy <jimb@codesourcery.com>
-
- * libiberty.h (pex_input_file, pex_input_pipe): New declarations.
-
-2006-04-06 H.J. Lu <hongjiu.lu@intel.com>
-
- * bfdlink.h (bfd_link_info): Replace need_relax_finalize with
- relax_pass.
-
-2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
- Anil Paranjape <anilp1@kpitcummins.com>
- Shilin Shakti <shilins@kpitcummins.com>
-
- * dis-asm.h (print_insn_xc16c): New prototype.
-
-2006-01-18 DJ Delorie <dj@redhat.com>
-
- * md5.h: Include ansidecl.h
-
-2006-01-17 Andreas Schwab <schwab@suse.de>
-
- PR binutils/1486
- * dis-asm.h (struct disassemble_info): Add
- disassembler_needs_relocs.
-
-2006-01-09 Bob Wilson <bob.wilson@acm.org>
-
- * xtensa-config.h (XCHAL_HAVE_MUL32_HIGH): Define.
-
-2005-12-30 Bob Wilson <bob.wilson@acm.org>
-
- * xtensa-config.h (XCHAL_HAVE_WIDE_BRANCHES): New.
-
-2005-12-16 Nathan Sidwell <nathan@codesourcery.com>
-
- Second part of ms1 to mt renaming.
- * dis-asm.h (print_insn_mt): Renamed.
-
-2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
-
- PR java/9861
- * demangle.h : Add DMGL_RET_POSTFIX define to enable alternative
- output format for return types
-
-2005-11-03 Alan Modra <amodra@bigpond.net.au>
-
- * bfdlink.h (struct bfd_link_order): Tweak comment.
-
-2005-10-31 Mark Kettenis <kettenis@gnu.org>
-
- * floatformat.h (enum floatformat_byteorders): Add
- floatformat_vax.
- (floatformat_vax_aingle, floatformat_vax_double): Declare.
-
-2005-10-28 Dave Brolley <brolley@redhat.com>
-
- Contribute the following changes:
- 2003-09-29 Dave Brolley <brolley@redhat.com>
-
- * dis-asm.h (disassemble_info): insn_sets now (void *) to allow for
- more exotic underlying types to be used.
-
-2005-10-25 Arnold Metselaar <arnold.metselaar@planet.nl>
-
- disasm.h: Add declaration for print_insn_z80
-
-2005-09-30 Catherine Moore <clm@cm00re.com>
-
- * dis-asm.h (print_insn_bfin): Declare.
-
-2005-09-26 Mark Mitchell <mark@codesourcery.com>
-
- * libiberty.h (expandargv): New function.
-
-2005-08-18 Alan Modra <amodra@bigpond.net.au>
-
- * bfdlink.h: Remove mention of a29k.
- * dis-asm.h: Remove a29k support.
-
-2005-08-17 Mark Kettenis <kettenis@gnu.org>
-
- * floatformat.h (struct floatformat): Change type of large
- argument for is_valid member to `const void *'.
- (floatformat_to_double): Change type of second argument to `const
- void *'.
- (floatformat_from_double): Change type of last argument to `void
- *'.
- (floatformat_is_valid): Change type of last argument to `const
- void *'.
-
-2005-07-14 Jim Blandy <jimb@redhat.com>
-
- * dis-asm.h (print_insn_m32c): New declaration.
-
-2005-07-12 Ben Elliston <bje@au.ibm.com>
-
- * xregex2.h (regexec): Qualify this prototype with __extension__
- when compiling with GNU C.
-
-2005-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * dis-asm.h (fprintf_ftype): Add format attribute.
-
-2005-07-03 Steve Ellcey <sje@cup.hp.com>
-
- PR other/13906
- * ansidecl.h (ATTRIBUTE_ALIGNED_ALIGNOF): New.
- * md5.h (md5_uintptr): New.
- (md5_ctx): Align buffer field.
-
-2005-06-30 Daniel Berlin <dberlin@dberlin.org>
-
- * hashtab.h (HTAB_DELETED_ENTRY): New macro.
- (HTAB_EMPTY_ENTRY): New macro.
-
-2005-06-20 Geoffrey Keating <geoffk@apple.com>
-
- * libiberty.h (strverscmp): Prototype.
-
-2005-06-17 Jakub Jelinek <jakub@redhat.com>
-
- * elf/external.h (GRP_ENTRY_SIZE): Define.
-
-2005-06-08 Zack Weinberg <zack@codesourcery.com>
-
- * dis-asm.h (get_arm_regnames): Update prototype.
-
-2005-06-07 Aldy Hernandez <aldyh@redhat.com>
- Michael Snyder <msnyder@redhat.com>
- Stan Cox <scox@redhat.com>
-
- * dis-asm.h: Externalize print_insn_ms1.
-
-2005-06-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
-
- * libiberty.h (XOBFINISH): New.
-
-2005-06-03 Alan Modra <amodra@bigpond.net.au>
-
- * bfdlink.h (struct bfd_link_callbacks): Add einfo.
-
-2005-06-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (vsnprintf): Add format attribute.
-
-2005-05-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h: Add ATTRIBUTE_FPTR_PRINTF.
-
-2005-05-28 Eli Zaretskii <eliz@gnu.org>
-
- * libiberty.h: (snprintf) [!HAVE_DECL_SNPRINTF]: Declare if
- needed.
- (vsnprintf) [!HAVE_DECL_VSNPRINTF]: Declare if needed.
-
-2005-05-25 Richard Henderson <rth@redhat.com>
-
- * demangle.h (DEMANGLE_COMPONENT_HIDDEN_ALIAS): New.
-
-2005-05-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
-
- * libiberty.h (ACONCAT): Properly cast value of alloca().
-
- * ansidecl.h (ATTRIBUTE_UNUSED_LABEL): Don't define if
- __cplusplus.
-
-2005-05-12 Steve Ellcey <sje@cup.hp.com>
-
- libiberty.h: Do not define empty basename prototype.
-
-2005-05-10 Nick Clifton <nickc@redhat.com>
-
- * Update the address and phone number of the FSF organization in
- the GPL notices in the following files:
- COPYING, ansidecl.h, bfdlink.h, bout.h, demangle.h, dis-asm.h,
- dyn-string.h, fibheap.h, filenames.h, floatformat.h,
- fnmatch.h, gdbm.h, getopt.h, hashtab.h, hp-symtab.h, ieee.h,
- libiberty.h, md5.h, oasys.h, objalloc.h, obstack.h, os9k.h,
- partition.h, progress.h, safe-ctype.h, sort.h, splay-tree.h,
- symcat.h, ternary.h, xregex2.h, xtensa-config.h,
- xtensa-isa-internal.h, xtensa-isa.h
-
-2005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (unlock_std_streams): New.
-
-2005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * hashtab.h, libiberty.h, objalloc.h, splay-tree.h, ternary.h:
- Don't use the PTR macro.
-
- * sort.h: Don't use the PARAMS macro.
-
-2005-04-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (unlock_stream): New.
-
-2005-04-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (fopen_unlocked, fdopen_unlocked, freopen_unlocked):
- Remove parameter names.
-
-2005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (fopen_unlocked, fdopen_unlocked, freopen_unlocked):
- Provide prototypes for new functions.
-
-2005-03-29 Ian Lance Taylor <ian@airs.com>
-
- * libiberty.h: Fix indentation.
-
-2005-03-28 Ian Lance Taylor <ian@airs.com>
-
- * libiberty.h: Include <stdio.h>.
- (PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
- (PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
- (PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
- (pex_init, pex_run, pex_read_output): Declare.
- (pex_get_status, pex_get_times, pex_free, pex_one): Declare.
- (struct pex_time): Define.
-
-2005-03-28 Mark Mitchell <mark@codesourcery.com>
-
- * libiberty.h (ffs): Declare, if necessary.
-
-2005-03-27 Gabriel Dos Reis <gdr@integreable-solutions.net>
-
- * ternary.h: Don't use PARAMS anymore.
-
-2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
-
- * md5.h: Remove definition and uses of __P.
- * dyn-string.h: Remove uses of PARAMS.
- * fibheap.h: Likewise.
- * floatformat.h: Likewise.
- * hashtab.h: Likewise.
-
-2005-03-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
-
- * demangle.h: Remove uses of PARAMS.
-
- * libiberty.h (ANSI_PROTOTYPES): Remove guard since
- ANSI_PROTOTYPES is always assumed.
- Remove uses of PARAMS throughout.
-
-2005-03-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (xstrndup): Declare.
-
-2005-03-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (make_relative_prefix): Add ATTRIBUTE_MALLOC.
-
-2005-03-22 Bob Wilson <bob.wilson@acm.org>
-
- * xtensa-isa.h: Update a comment and whitespace.
-
-2005-03-16 H.J. Lu <hongjiu.lu@intel.com>
-
- * bfdlink.h (bfd_link_info): Add gc_sections.
-
-2005-03-09 Mark Mitchell <mark@codesourcery.com>
-
- * libiberty.h (gettimeofday): Declare.
-
-2005-03-01 Jan Beulich <jbeulich@novell.com>
-
- * libiberty.h: Declare unlink_if_ordinary.
-
-2005-02-21 Alan Modra <amodra@bigpond.net.au>
-
- * xtensa-isa-internal.h (xtensa_length_decode_fn): Warning fix.
- * xtensa-isa.h (xtensa_insnbuf_to_chars): Likewise.
- (xtensa_insnbuf_from_chars, xtensa_isa_length_from_chars): Likewise.
-
-2005-02-14 Paolo Bonzini <bonzini@gnu.org>
-
- PR bootstrap/19818
- * ansidecl.h (PARAMS): Guard from redefinition.
-
-2005-02-03 Alan Modra <amodra@bigpond.net.au>
-
- * bfdlink.h (struct bfd_link_hash_entry): Add u.undef.weak.
-
-2005-02-01 Alan Modra <amodra@bigpond.net.au>
-
- * bfdlink.h (bfd_link_repair_undef_list): Declare.
-
-2005-01-10 Andreas Schwab <schwab@suse.de>
-
- * dis-asm.h (struct disassemble_info): Add skip_zeroes and
- skip_zeroes_at_end.
-
-2004-12-11 Ben Elliston <bje@au.ibm.com>
-
- * fibheap.h (struct fibnode): Only use unsigned long bitfields
- when __GNUC__ is defined and ints are less than 32-bits wide.
-
-2004-11-04 Paul Brook <paul@codesourcery.com>
-
- * bfdlink.h (bfd_link_info): Add default_imported_symver.
-
-2004-11-12 Bob Wilson <bob.wilson@acm.org>
-
- * xtensa-isa-internal.h (xtensa_interface_internal): Add class_id.
- * xtensa-isa.h (xtensa_interface_class_id): New prototype.
-
-2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
- Vineet Sharma <vineets@noida.hcltech.com>
-
- * dis-asm.h: Add prototype for print_insn_maxq_little.
-
-2004-10-26 Paul Brook <paul@codesourcery.com>
-
- * bfdlink.h (struct bfd_link_info): Add create_default_symver.
-
-2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
-
- PR 463
- * bfdlink.h (bfd_link_callbacks): Add a pointer to struct
- bfd_link_hash_entry to reloc_overflow.
-
-2004-10-07 Bob Wilson <bob.wilson@acm.org>
-
- * xtensa-config.h (XSHAL_USE_ABSOLUTE_LITERALS,
- XCHAL_HAVE_PREDICTED_BRANCHES, XCHAL_INST_FETCH_WIDTH): New.
- (XCHAL_EXTRA_SA_SIZE, XCHAL_EXTRA_SA_ALIGN): Delete.
-
- * xtensa-isa-internal.h (ISA_INTERFACE_VERSION): Delete.
- (config_sturct struct): Delete.
- (XTENSA_OPERAND_IS_REGISTER, XTENSA_OPERAND_IS_PCRELATIVE,
- XTENSA_OPERAND_IS_INVISIBLE, XTENSA_OPERAND_IS_UNKNOWN,
- XTENSA_OPCODE_IS_BRANCH, XTENSA_OPCODE_IS_JUMP,
- XTENSA_OPCODE_IS_LOOP, XTENSA_OPCODE_IS_CALL,
- XTENSA_STATE_IS_EXPORTED, XTENSA_INTERFACE_HAS_SIDE_EFFECT): Define.
- (xtensa_format_encode_fn, xtensa_get_slot_fn, xtensa_set_slot_fn): New.
- (xtensa_insn_decode_fn): Rename to ...
- (xtensa_opcode_decode_fn): ... this.
- (xtensa_immed_decode_fn, xtensa_immed_encode_fn, xtensa_do_reloc_fn,
- xtensa_undo_reloc_fn): Update.
- (xtensa_encoding_template_fn): Delete.
- (xtensa_opcode_encode_fn, xtensa_format_decode_fn,
- xtensa_length_decode_fn): New.
- (xtensa_format_internal, xtensa_slot_internal): New types.
- (xtensa_operand_internal): Delete operand_kind, inout, isPCRelative,
- get_field, and set_field fields. Add name, field_id, regfile,
- num_regs, and flags fields.
- (xtensa_arg_internal): New type.
- (xtensa_iclass_internal): Change operands field to array of
- xtensa_arg_internal. Add num_stateOperands, stateOperands,
- num_interfaceOperands, and interfaceOperands fields.
- (xtensa_opcode_internal): Delete length, template, and iclass fields.
- Add iclass_id, flags, encode_fns, num_funcUnit_uses, and funcUnit_uses.
- (opname_lookup_entry): Delete.
- (xtensa_regfile_internal, xtensa_interface_internal,
- xtensa_funcUnit_internal, xtensa_state_internal,
- xtensa_sysreg_internal, xtensa_lookup_entry): New.
- (xtensa_isa_internal): Replace opcode_table field with opcodes field.
- Change type of opname_lookup_table. Delete num_modules,
- module_opcode_base, module_decode_fn, config, and has_density fields.
- Add num_formats, formats, format_decode_fn, length_decode_fn,
- num_slots, slots, num_fields, num_operands, operands, num_iclasses,
- iclasses, num_regfiles, regfiles, num_states, states,
- state_lookup_table, num_sysregs, sysregs, sysreg_lookup_table,
- max_sysreg_num, sysreg_table, num_interfaces, interfaces,
- interface_lookup_table, num_funcUnits, funcUnits and
- funcUnit_lookup_table fields.
- (xtensa_isa_module, xtensa_isa_modules): Delete.
- (xtensa_isa_name_compare): New prototype.
- (xtisa_errno, xtisa_error_msg): New.
- * xtensa-isa.h (XTENSA_ISA_VERSION): Define.
- (xtensa_isa): Change type.
- (xtensa_operand): Delete.
- (xtensa_format, xtensa_regfile, xtensa_state, xtensa_sysreg,
- xtensa_interface, xtensa_funcUnit, xtensa_isa_status,
- xtensa_funcUnit_use): New types.
- (libisa_module_specifier): Delete.
- (xtensa_isa_errno, xtensa_isa_error_msg): New prototypes.
- (xtensa_insnbuf_free, xtensa_insnbuf_to_chars,
- xtensa_insnbuf_from_chars): Update prototypes.
- (xtensa_load_isa, xtensa_extend_isa, xtensa_default_isa,
- xtensa_insn_maxlength, xtensa_num_opcodes, xtensa_decode_insn,
- xtensa_encode_insn, xtensa_insn_length,
- xtensa_insn_length_from_first_byte, xtensa_num_operands,
- xtensa_operand_kind, xtensa_encode_result,
- xtensa_operand_isPCRelative): Delete.
- (xtensa_isa_init, xtensa_operand_inout, xtensa_operand_get_field,
- xtensa_operand_set_field, xtensa_operand_encode,
- xtensa_operand_decode, xtensa_operand_do_reloc,
- xtensa_operand_undo_reloc): Update prototypes.
- (xtensa_isa_maxlength, xtensa_isa_length_from_chars,
- xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
- xtensa_isa_num_opcodes, xtensa_isa_num_regfiles, xtensa_isa_num_states,
- xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
- xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
- xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
- xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
- xtensa_format_get_slot, xtensa_format_set_slot, xtensa_opcode_decode,
- xtensa_opcode_encode, xtensa_opcode_is_branch, xtensa_opcode_is_jump,
- xtensa_opcode_is_loop, xtensa_opcode_is_call,
- xtensa_opcode_num_operands, xtensa_opcode_num_stateOperands,
- xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
- xtensa_opcode_funcUnit_use, xtensa_operand_name,
- xtensa_operand_is_visible, xtensa_operand_is_register,
- xtensa_operand_regfile, xtensa_operand_num_regs,
- xtensa_operand_is_known_reg, xtensa_operand_is_PCrelative,
- xtensa_stateOperand_state, xtensa_stateOperand_inout,
- xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
- xtensa_regfile_lookup_shortname, xtensa_regfile_name,
- xtensa_regfile_shortname, xtensa_regfile_view_parent,
- xtensa_regfile_num_bits, xtensa_regfile_num_entries,
- xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
- xtensa_state_is_exported, xtensa_sysreg_lookup,
- xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
- xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
- xtensa_interface_num_bits, xtensa_interface_inout,
- xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
- xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New prototypes.
-2004-10-07 Jeff Baker <jbaker@qnx.com>
-
- * bfdlink.h (bfd_link_info): Add bitfield: warn_shared_textrel.
-
-2004-09-17 Alan Modra <amodra@bigpond.net.au>
-
- * bfdlink.h (struct bfd_link_hash_entry): Move und_next into elements
- of union.
-
-2004-09-13 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
-
- * libiberty.h (basename): Prototype for __MINGW32__.
-
-2004-09-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h (ATTRIBUTE_SENTINEL): Define.
- * libiberty.h (concat, reconcat, concat_length, concat_copy,
- concat_copy2): Use ATTRIBUTE_SENTINEL.
-
-2004-08-13 Alan Modra <amodra@bigpond.net.au>
-
- * bfdlink.h (struct bfd_link_callbacks): Remove "error_handler".
- (LD_DEFINITION_IN_DISCARDED_SECTION): Delete.
-
-2004-08-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
-
- * libiberty.h (XDELETE, XDELETEVEC, XRESIZEVEC): Remove any
- const-qualification before disposal.
-
-2004-07-24 Bernardo Innocenti <bernie@develer.com>
-
- * ansidecl.h (ARG_UNUSED): New Macro.
-
-2004-07-23 H.J. Lu <hongjiu.lu@intel.com>
-
- * bin-bugs.h (REPORT_BUGS_TO): Set to
- "<URL:http://www.sourceware.org/bugzilla/>".
-
-2004-07-21 Paolo Bonzini <bonzini@gnu.org>
-
- * ansidecl.h (ATTRIBUTE_PURE): New.
-
-2004-07-13 Bernardo Innocenti <bernie@develer.com>
-
- * libiberty.h (XNEW, XCNEW, XNEWVEC, XCNEWVEC, XOBNEW): Move here from
- libcpp/internal.h.
- (XDELETE, XRESIZEVEC, XDELETEVEC, XNEWVAR, XCNEWVAR, XRESIZEVAR): New
- macros.
-
-2004-07-13 Bernardo Innocenti <bernie@develer.com>
-
- * libiberty.h (ASTRDUP): Add casts required for stricter
- type conversion rules of C++.
- * obstack.h (obstack_free): Likewise.
-
-2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
-
- * dis-asm.h (print_insn_crx): Declare.
-
-2004-06-24 Alan Modra <amodra@bigpond.net.au>
-
- * bfdlink.h (struct bfd_link_order): Update comment.
-
-2004-05-11 Jakub Jelinek <jakub@redhat.com>
-
- * bfdlink.h (struct bfd_link_info): Add relro, relro_start and
- relro_end fields.
-
-2004-05-04 Andreas Jaeger <aj@suse.de>
-
- * demangle.h: Do not use C++ reserved keyword typename as
- parameter for cplus_demangle_fill_builtin_type.
-
-2004-04-22 Richard Henderson <rth@redhat.com>
-
- * hashtab.h (struct htab): Add size_prime_index.
-
-2004-04-13 Jeff Law <law@redhat.com>
-
- * hashtab.h (htab_remove_elt_with_hash): Prototype new function.
-
-2004-03-30 Zack Weinberg <zack@codesourcery.com>
-
- * hashtab.h, splay-tree.h: Use new shorter form of GTY markers.
-
-2004-03-25 Stan Shebs <shebs@apple.com>
-
- * mpw/: Remove subdirectory and everything in it.
-
-2004-03-23 Alan Modra <amodra@bigpond.net.au>
-
- PR 51.
- * bfdlink.h (struct bfd_link_info): Add wrap_char.
-
-2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
-
- * bfdlink.h (bfd_link_info): Correct comments for the
- unresolved_syms_in_objects field.
-
-2004-02-24 Ian Lance Taylor <ian@wasabisystems.com>
-
- * dyn-string.h: Update copyright date.
-
-2004-02-23 Ian Lance Taylor <ian@wasabisystems.com>
-
- * dyn-string.h: Remove test of IN_LIBGCC2 and IN_GLIBCPP_V3 and
- the associated #defines.
-
-2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
-
- * demangle.h: Instead of checking ANSI_PROTOTYPES, just include
- "libiberty.h".
-
- * demangle.h: If ANSI_PROTOTYPES is defined, include <stddef.h>.
-
- * demangle.h (enum demangle_component_type): Define.
- (struct demangle_operator_info): Declare.
- (struct demangle_builtin_type_info): Declare.
- (struct demangle_component): Define.
- (cplus_demangle_fill_component): Declare.
- (cplus_demangle_fill_name): Declare.
- (cplus_demangle_fill_builtin_type): Declare.
- (cplus_demangle_fill_operator): Declare.
- (cplus_demangle_fill_extended_operator): Declare.
- (cplus_demangle_fill_ctor, cplus_demangle_fill_dtor): Declare.
- (cplus_demangle_v3_components): Declare.
- (cplus_demangle_print): Declare.
-
-For older changes see ChangeLog-9103
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff --git a/include/ChangeLog-9103 b/include/ChangeLog-9103
deleted file mode 100644
index f4f7aa1..0000000
--- a/include/ChangeLog-9103
+++ /dev/null
@@ -1,2682 +0,0 @@
-2003-12-19 Andreas Tobler <a.tobler@schweiz.ch>
-
- * include/fibheap.h (fibnode): Use __extension__ for
- bit-fields mark and degree if __GNUC__.
-
-2003-12-18 Kazu Hirata <kazu@cs.umass.edu>
-
- * include/fibheap.h (fibnode): Use unsigned long int for
- bit-fields if __GNUC__ is defined.
-
-2003-12-19 Andreas Tobler <a.tobler@schweiz.ch>
-
- * fibheap.h (fibnode): Use __extension__ for
- bit-fields mark and degree if __GNUC__.
-
-2003-12-18 Kazu Hirata <kazu@cs.umass.edu>
-
- * fibheap.h (fibnode): Use unsigned long int for
- bit-fields if __GNUC__ is defined.
-
-2003-12-04 H.J. Lu <hongjiu.lu@intel.com>
-
- * bfdlink.h (bfd_link_info): Change relax_finalizing to
- need_relax_finalize.
-
-2003-12-03 Alan Modra <amodra@bigpond.net.au>
-
- * bfdlink.h (struct bfd_link_hash_entry): Rename "next" to "und_next".
-
-2003-12-02 Alan Modra <amodra@bigpond.net.au>
-
- * bfdlink.h (struct bfd_link_info): Remove mpc860c0 field.
-
-2003-11-14 Nick Clifton <nickc@redhat.com>
-
- * dis-asm.h (struct disassemble_info): Add new field
- 'symbol_is_valid' which is a function which can tell the
- disassembler to skip certain symbols as they should not be
- displayed to the user.
- (arm_symbol_is_valid): New prototype. This is the ARM
- specific function for the symbol_is_valid field.
- (generic_symbol_is_valid): New prototype. This is the default
- function pointed to by the symbol_is_valid field.
-
-2003-11-06 Bruno Rohee <bruno@rohee.com>
-
- * hp-symtab.h: Fix "the the" typo.
-
-2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
-
- * bfdlink.h (bfd_elf_version_expr): Add "symbol" and remove
- "wildcard".
-
-2003-10-22 Joseph S. Myers <jsm@polyomino.org.uk>
-
- * obstack.h: Merge the following change from gnulib:
- 2003-10-21 Paul Eggert <eggert@twinsun.com>
- * obstack.h (obstack_1grow_fast): Properly parenthesize arg.
- (obstack_ptr_grow_fast, obstack_int_grow_fast):
- Don't use lvalue casts, as GCC plans to remove support for them
- in GCC 3.5. Reported by Joseph S. Myers. This bug
- was also present in the non-GCC version, indicating that this
- code had always been buggy and had never been widely used.
- (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
- Use the fast variant of each macro, rather than copying the
- definiens of the fast variant; that way, we'll be more likely to
- catch future bugs in the fast variants.
-
-2003-10-22 Jakub Jelinek <jakub@redhat.com>
-
- * bfdlink.h (struct bfd_elf_version_expr): Remove match field.
- Add wildcard and mask fields.
- (BFD_ELF_VERSION_C_TYPE): Define.
- (BFD_ELF_VERSION_CXX_TYPE): Likewise.
- (BFD_ELF_VERSION_JAVA_TYPE): Likewise.
- (struct bfd_elf_version_expr_head): New.
- (struct bfd_elf_version_tree): Add match field.
- Change type of globals and locals fields
- to struct bfd_elf_version_expr_head.
-
-2003-09-22 Andrew Cagney <cagney@redhat.com>
-
- * floatformat.h (struct floatformat): Add field "is_valid".
-
-2003-09-15 Andrew Cagney <cagney@redhat.com>
-
- * floatformat.h (floatformat_to_double): Make input buffer constant.
- (floatformat_from_double, floatformat_is_valid): Ditto.
-
-2003-09-15 Andrew Cagney <cagney@redhat.com>
-
- * floatformat.h (struct floatformat): Make "exp_bias" signed.
-
-2003-09-15 Daniel Jacobowitz <drow@mvista.com>
-
- * floatformat.h (floatformat_is_valid): Add prototype.
-
-2003-08-27 Andrew Cagney <cagney@redhat.com>
-
- * dis-asm.h (init_disassemble_info): Declare.
- (INIT_DISASSEMBLE_INFO): Redefine as a call to
- init_disassemble_info.
- (INIT_DISASSEMBLE_INFO_NO_ARCH): Ditto.
-
-2003-08-20 Nick Clifton <nickc@redhat.com>
-
- * bfdlink.h (enum report_method): New enum. Describes how to
- report something.
- (struct bfd_link_info): Delete fields 'no_undefined' and
- 'allow_shlib_undefined'. Replace with
- 'unresolved_symbols_in_objects' and
- 'unresolved_symbols_in_shared_libs'.
-
-2003-08-07 Alan Modra <amodra@bigpond.net.au>
-
- * bfdlink.h: Remove PARAMS macro. Replace PTR with void *.
- * dis-asm.h: Likewise.
-
-2003-07-09 Bob Wilson <bob.wilson@acm.org>
-
- * xtensa-config.h: Undef all macros before defining them.
-
-2003-07-06 H.J. Lu <hongjiu.lu@intel.com>
-
- * demangle.h: Support C++.
-
-2003-07-01 Zack Weinberg <zack@codesourcery.com>
-
- * filenames.h: New file imported from binutils.
-
-2003-06-30 Bob Wilson <bob.wilson@acm.org>
-
- * xtensa-config.h: New file imported from binutils.
-
-2003-06-30 Bob Wilson <bob.wilson@acm.org>
-
- * xtensa-config.h (XCHAL_HAVE_CONST16, XCHAL_HAVE_ABS,
- XCHAL_HAVE_ADDX, XCHAL_HAVE_L32R): Define.
-
-2003-06-25 Alan Modra <amodra@bigpond.net.au>
-
- * bfdlink.h: Correct spelling of "relocatable".
-
-2003-06-22 Zack Weinberg <zack@codesourcery.com>
-
- * safe-ctype.h (HC_UNKNOWN, HC_ASCII, HC_EBCDIC): Rename to
- HOST_CHARSET_UNKNOWN, HOST_CHARSET_ASCII, HOST_CHARSET_EBCDIC
- respectively.
-
-2003-06-21 Zack Weinberg <zack@codesourcery.com>
-
- * safe-ctype.h (HC_UNKNOWN, HC_ASCII, HC_EBCDIC, HOST_CHARSET):
- New #defines.
-
-2003-06-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h: Delete HAVE_LONG_DOUBLE GCC bootstrap support.
-
-2003-05-23 Jakub Jelinek <jakub@redhat.com>
-
- * bfdlink.h (struct bfd_link_info): Add execstack and noexecstack.
-
-2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
-
- * bfdlink.h (LD_DEFINITION_IN_DISCARDED_SECTION): New.
-
-2003-05-30 Ulrich Drepper <drepper@redhat.com>
- Jakub Jelinek <jakub@redhat.com>
-
- * bfdlink.h (struct bfd_link_info): Add pie and executable
- bits.
-
-2003-05-21 Nick Clifton <nickc@redhat.com>
-
- * bfdlink.h (struct bfd_link_hash_table): Fix typo in comment.
-
-2003-05-15 Jim Blandy <jimb@redhat.com>
-
- * libiberty.h (hex_value): Make the value an unsigned int, to
- avoid unexpected sign-extension when cast to unsigned types larger
- than int --- like bfd_vma, on some platforms.
- (_hex_value): Update declaration.
-
-2003-05-09 Alan Modra <amodra@bigpond.net.au>
-
- * xtensa-isa-internal.h (xtensa_isa_module_struct): Remove const on
- gen_num_opcodes_fn return type.
-
-2003-05-07 Jason Merrill <jason@redhat.com>
-
- * hashtab.h (iterative_hash): Prototype.
- (iterative_hash_object): New macro.
-
-2003-04-28 H.J. Lu <hjl@gnu.org>
-
- * bfdlink.h (bfd_link_info): Add relax_finalizing.
-
-2003-04-23 H.J. Lu <hjl@gnu.org>
-
- * bfdlink.h (bfd_link_callbacks): Add error_handler.
-
-2003-04-02 Bob Wilson <bob.wilson@acm.org>
-
- * xtensa-config.h: Remove comment indicating that this is a
- generated file.
-
-2003-04-01 Bob Wilson <bob.wilson@acm.org>
-
- * dis-asm.h (print_insn_xtensa): Declare.
- * xtensa-config.h: New file.
- * xtensa-isa-internal.h: Likewise.
- * xtensa-isa.h: Likewise.
-
-2003-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h (ATTRIBUTE_NONNULL, ATTRIBUTE_NULL_PRINTF,
- ATTRIBUTE_NULL_PRINTF_1, ATTRIBUTE_NULL_PRINTF_2,
- ATTRIBUTE_NULL_PRINTF_3, ATTRIBUTE_NULL_PRINTF_4,
- ATTRIBUTE_NULL_PRINTF_5): New.
- (ATTRIBUTE_PRINTF): Add ATTRIBUTE_NONNULL.
-
-2003-03-17 Jan Hubicka <jh@suse.cz>
-
- * hashtab.h (htab_traverse_noresize): Declare.
-
-2003-02-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h: Document return value of physmem routines.
-
-2003-02-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (physmem_total, physmem_available): Prototype.
-
-2003-02-20 Daniel Jacobowitz <drow@mvista.com>
-
- * libiberty.h (lrealpath): Add declaration.
-
-2003-01-31 Grant Grundler <grundler@dsl2.external.hp.com>
-
- * hppa.h (ldwa, ldda): Add ordered opcodes.
-
-2003-01-26 Daniel Jacobowitz <drow@mvista.com>
-
- * hashtab.h (htab_alloc_with_arg, htab_free_with_arg): Add new types.
- (struct htab): Add alloc_arg, alloc_with_arg_f, free_with_arg_f.
- (htab_create_alloc_ex): New prototype.
- (htab_set_functions_ex): New prototype.
-
-2002-07-17 Geoffrey Keating <geoffk@redhat.com>
-
- * splay-tree.h (GTY): Define if undefined.
- (splay_tree_allocate_fn): Return PTR for compatibility, not void *.
- (struct splay_tree_node_s): Support gengtype.
- (struct splay_tree_s): Likewise. Make allocate_data a PTR,
- not a void *.
-
-2002-01-02 Ben Elliston <bje@redhat.com>
-
- * dis-asm.h (print_insn_iq2000): Declare.
-
-2002-12-24 Dmitry Diky <diwil@mail.ru>
-
- * dis-asm.h: Add msp430 disassembler prototype.
-
-2002-12-27 Chris Demetriou <cgd@broadcom.com>
-
- * dis-asm.h (print_mips_disassembler_options): Prototype.
-
-2002-12-23 Alan Modra <amodra@bigpond.net.au>
-
- * bfdlink.h (struct bfd_link_info): Add "strip_discarded".
-
-2002-12-20 Alan Modra <amodra@bigpond.net.au>
-
- * bfdlink.h (struct bfd_link_info): Replace bfd_boolean fields with
- bit-fields. Rearrange to put all like types together.
-
-2002-11-30 Alan Modra <amodra@bigpond.net.au>
-
- * bfdlink.h: Replace boolean with bfd_boolean. Formatting.
-
-2002-11-23 Simon Burge <simonb@wasabisystems.com>
-
- * libiberty.h (basename): Add NetBSD to the list.
-
-2002-11-22 Daniel Jacobowitz <drow@mvista.com>
-
- * libiberty.h (make_relative_prefix): Add prototype.
-
-2002-11-14 Egor Duda <deo@logos-m.ru>
-
- * bfdlink.h (struct bfd_link_info): Add new boolean
- field pei386_runtime_pseudo_reloc.
-
-2002-10-26 Roger Sayle <roger@eyesopen.com>
-
- * partition.h: Close the extern "C" scope when compiling with C++.
-
-2002-10-26 Roger Sayle <roger@eyesopen.com>
- DJ Delorie <dj@redhat.com>
-
- PR bootstrap/8351
- * getopt.h: Avoid prototyping getopt with no arguments in C++.
-
-2002-10-24 Nathan Tallent <eraxxon@alumni.rice.edu>
-
- * ansidecl.h (__STDC__): Add (__alpha && __cplusplus) to the
- list of platform compilers that may look, smell and act
- like __STDC__ but that may not define it.
-
-2002-10-11 David O'Brien <obrien@FreeBSD.org>
-
- * getopt.h: getopt is in unistd.h (based on SUSv2).
-
-2002-09-26 Andrew Cagney <ac131313@redhat.com>
-
- * regs/: Delete directory.
-
-2002-09-19 Alexandre Oliva <aoliva@redhat.com>
-
- * libiberty.h (asprintf, vasprintf): Don't declare them if the
- corresponding HAVE_DECL_ macro is 1.
-
-2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
-
- * dis-asm.h: Remove (errant) trailing semicolon (;) from the
- extern "C" { } declaration.
-
-2002-09-04 Nick Clifton <nickc@redhat.com>
-
- * dis-asm.h (print_ppc_disassembler_options): Prototype.
-
-2002-08-28 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
-
- * dis-asm.h: Add standard disassembler for tic4x.
-
-2002-08-07 H.J. Lu <hjl@gnu.org>
-
- * bfdlink.h (bfd_link_info): Add allow_undefined_version.
- (bfd_elf_version_expr): Add symver and script.
-
-2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
-
- * bfdlink.h (bfd_link_common_skip_ar_symbols): New enum.
- (struct bfd_link_info): Add new field 'common_skip_ar_symbols'.
-
-2002-07-19 Denis Chertykov <denisc@overta.ru>
- Matthew Green <mrg@redhat.com>
-
- * dis-asm.h (print_insn_ip2k): Declare.
-
-2002-07-01 Alan Modra <amodra@bigpond.net.au>
-
- * bfdlink.h (struct bfd_sym_chain): Declare.
- (struct bfd_link_info): Add gc_sym_list. Formatting fixes.
-
-2002-06-25 Alan Modra <amodra@bigpond.net.au>
-
- * demangle.h: #include "ansidecl.h" rather than #include <ansidecl.h>.
- * fibheap.h: Likewise.
- * hashtab.h: Likewise.
- * partition.h: Likewise.
- * sort.h: Likewise.
- * splay-tree.h: Likewise.
-
-2002-06-24 Alan Modra <amodra@bigpond.net.au>
-
- * libiberty.h (basename): Don't declare if HAVE_DECL_BASENAME.
- * getopt.h (getopt): Don't declare if HAVE_DECL_GETOPT.
-
-2002-06-18 Dave Brolley <brolley@redhat.com>
-
- From Catherine Moore:
- * dis-asm.h (print_insn_frv): New prototype.
-
-2002-06-09 Andrew Cagney <cagney@redhat.com>
-
- * remote-sim.h: Move to directory gdb/.
- * callback.h: Move to directory gdb/.
-
-2002-06-07 Charles Wilson <cwilson@ece.gatech.edu>
-
- * bfdlink.h (struct bfd_link_info): Change type of
- pei386_auto_import field to int so that -1 can mean enabled by
- default and 1 can mean enabled by command line switch.
-
-2002-06-06 DJ Delorie <dj@redhat.com>
-
- * hashtab.h (htab): Rearrange new members for backward
- compatibility.
- (htab_create): Don't use a macro that requires other headers.
-
-2002-06-05 Geoffrey Keating <geoffk@redhat.com>
-
- * hashtab.h (htab_create): Restore prototype for backward
- compatibility.
- (htab_try_create): Likewise.
-
-2002-05-22 Geoffrey Keating <geoffk@redhat.com>
-
- * hashtab.h (struct htab): Update for change to length specifier.
-
-2002-05-10 Geoffrey Keating <geoffk@redhat.com>
-
- * hashtab.h (GTY): Define if undefined.
- (htab_alloc): New typedef.
- (htab_free): New typedef.
- (struct htab): Support gengtype; allow user-specified memory
- allocation.
- (htab_create_alloc): New.
- (htab_create): Replace with #define.
- (htab_try_create): Delete.
-
-2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
-
- * dis-asm.h: Prototype print_insn_dlx.
-
-2002-05-23 Andrew Cagney <ac131313@redhat.com>
-
- * sim-d10v.h: Delete file. Moved to include/gdb/.
-
-2002-05-21 H.J. Lu (hjl@gnu.org)
-
- * bfdlink.h (bfd_link_info): Add allow_multiple_definition.
-
-2002-05-17 J"orn Rennecke <joern.rennecke@superh.com>
-
- * dis-asm.h (print_insn_shl, print_insn_sh64l): Remove prototype.
-
-2002-04-16 David S. Miller <davem@redhat.com>
-
- * xregex2.h (__restrict_arr): Define to __restrict on GCC
- 3.1 and later. Do not redefine.
-
-2002-04-01 Phil Edwards <pme@gcc.gnu.org>
-
- * dyn-string.h: Also allow IN_GLIBCPP_V3 to redefine names.
-
-2002-03-10 Daniel Jacobowitz <drow@mvista.com>
-
- * gdb: New directory.
-
-2002-03-06 Andrew Cagney <ac131313@redhat.com>
-
- * floatformat.h (floatformat_arm_ext): Delete declaration.
-
-2002-02-21 Jim Blandy <jimb@redhat.com>
-
- Allow the user to specify functions for allocating memory for
- splay tree roots and nodes.
- * splay-tree.h (splay_tree_allocate_fn, splay_tree_deallocate_fn):
- New types.
- (splay_tree): New fields: `allocate', `deallocate', and
- `allocate_data'.
- (splay_tree_new_with_allocator): New function declaration.
-
-2002-02-15 Alan Modra <amodra@bigpond.net.au>
-
- Support arbitrary length fill patterns.
- * bfdlink.h (enum bfd_link_order_type): Remove bfd_fill_link_order.
- (struct bfd_link_order): Remove fill. Add data.size.
-
-2002-02-08 Alexandre Oliva <aoliva@redhat.com>
-
- Contribute sh64-elf.
- 2000-11-25 Hans-Peter Nilsson <hpn@cygnus.com>
- * dis-asm.h (print_insn_sh64): New prototype.
- (print_insn_sh64l): New prototype.
- (print_insn_sh64x_media): New prototype.
-
-2002-02-05 Frank Ch. Eigler <fche@redhat.com>
-
- * dis-asm.h (disassemble_info): New field `insn_sets'.
- (INIT_DISASSEMBLE_INFO): Clear it.
-
-2002-02-05 Jason Merrill <jason@redhat.com>
-
- * demangle.h (cplus_demangle_v3): Add "options" parm.
- (cplus_demangle_v3_type): Remove prototype.
- (DMGL_VERBOSE): New macro.
- (DMGL_TYPES): New macro.
-
-2002-02-02 H.J. Lu (hjl@gnu.org)
-
- * demangle.h (cplus_demangle_v3_type): New prototype.
-
-2002-01-31 Ivan Guzvinec <ivang@opencores.org>
-
- * dis-asm.h : Add support for or32 targets
-
-2002-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (C_alloca): Add ATTRIBUTE_MALLOC.
-
-2002-01-27 David O'Brien <obrien@FreeBSD.org>
-
- * cgen.h (BFD_VERSION): Use BFD_VERSION_DATE instead.
-
-2001-12-14 Nick Clifton <nickc@cambridge.redhat.com>
-
- * dis-asm.h (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialise the
- disassembler_options field (to NULL).
-
-2001-12-13 Jakub Jelinek <jakub@redhat.com>
-
- * bfdlink.h (struct bfd_link_info): Add eh_frame_hdr field.
-
-2001-12-07 Geoffrey Keating <geoffk@redhat.com>
-
- * dis-asm.h (print_insn_xstormy16): Declare.
-
-2001-12-06 Richard Henderson <rth@redhat.com>
-
- * demangle.h (no_demangling): New.
- (NO_DEMANGLING_STYLE_STRING): New.
-
-2001-11-14 Alan Modra <amodra@bigpond.net.au>
-
- * dis-asm.h (print_insn_i386): Declare.
-
-2001-11-11 Timothy Wall <twall@alum.mit.edu>
-
- * dis-asm.h: Fix comment to refer to octets rather than bytes.
-
-2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
-
- * dis-asm.h (print_insn_mmix): Add prototype.
-
-2001-10-24 Neil Booth <neil@daikokuya.demon.co.uk>
-
- * safe-ctype.h (_sch_isbasic, IS_ISOBASIC): New.
-
-2001-10-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (hex_init): Revert delete.
-
- * libiberty.h (_hex_value): Const-ify.
- (hex_init): Delete.
-
-2001-10-16 Christopher Faylor <cgf@redhat.com>
-
- * filenames.h: Add cygwin to the list of dosish style path systems.
-
-2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * demangle.h (demangler_engine): Const-ify.
- * libiberty.h (buildargv): Likewise.
-
-2001-10-03 Vassili Karpov <malc@pulsesoft.com>
-
- * bfdlink.h (struct bfd_link_info): Add nocopyreloc field.
-
-2001-09-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (reconcat): New function.
-
-2001-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (concat, concat_length, concat_copy, concat_copy2,
- ACONCAT): Improve comments.
-
-2001-09-18 Alan Modra <amodra@bigpond.net.au>
-
- * objalloc.h (OBJALLOC_ALIGN): Define using offsetof.
-
-2001-09-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (concat_length, concat_copy, concat_copy2,
- libiberty_concat_ptr, ACONCAT): New.
-
- * libiberty.h (ASTRDUP): New macro.
- libiberty_optr, libiberty_nptr, libiberty_len): Declare.
-
-2001-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h: Update comments reflecting previous change.
-
-2001-08-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h (VA_OPEN, VA_CLOSE): Allow multiple uses.
-
-2001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
-
- * bfdlink.h (struct bfd_link_info): Change 'spare_dynamic_tags' to
- unsigned to remove a compile time warning message.
-
-2001-08-24 H.J. Lu <hjl@gnu.org>
-
- * bfdlink.h (bfd_link_hash_table_type): New. The linker hash
- table type, bfd_link_generic_hash_table and
- bfd_link_elf_hash_table.
- (bfd_link_hash_table): Add a new field, type, for the linker
- hash table type.
-
-2001-08-23 Jakub Jelinek <jakub@redhat.com>
-
- * bfdlink.h (struct bfd_link_info): Add combreloc and
- spare_dynamic_tags fields.
-
-2001-08-23 Lars Brinkhoff <lars@nocrew.org>
-
- * dyn-string.h, fibheap.h, partition.h, sort.h, splay-tree.h:
- replace "GNU CC" with "GCC".
-
-2001-08-21 Richard Henderson <rth@redhat.com>
-
- * fibheap.h: Tidy formatting.
- (fibnode_t): Limit degree to 31 bits to avoid warning.
-
-2001-08-20 Daniel Berlin <dan@cgsoftware.com>
-
- * fibheap.h: New file. Fibonacci heap.
-
-2001-08-20 Andrew Cagney <ac131313@redhat.com>
-
- * floatformat.h (floatformat_arm_ext): Document as deprecated.
- (floatformat_arm_ext_big, floatformat_arm_ext_littlebyte_bigword)
- (floatformat_ia64_spill_little, floatformat_ia64_quad_little)
- (floatformat_ia64_spill_big, floatformat_ia64_quad_big)
- (floatformat_m88110_harris_ext): Declare.
-
-2001-08-18 Zack Weinberg <zackw@panix.com>
-
- * ansidecl.h: Reorganize for readability, remove documentation
- of obsolete macros, document PARAMS and VPARAMS. Add new
- macros VA_OPEN, VA_CLOSE, and VA_FIXEDARG for nicer variadic
- function implementation.
-
-2001-08-16 Richard Henderson <rth@redhat.com>
-
- * hashtab.h (htab_hash_string): Declare.
-
-2001-08-10 Andrew Cagney <ac131313@redhat.com>
-
- * libiberty.h (lbasename): Change function declaration to return a
- const char pointer.
-
-2001-08-02 Mark Kettenis <kettenis@gnu.org>
-
- * xregex.h (_REGEX_RE_COMP): Define.
- (re_comp): Define to xre_comp.
- (re_exec): Define to xre_exec.
-
-2001-08-02 Charles Wilson <cwilson@ece.gatech.edu>
-
- * bfdlink.h (struct bfd_link_info): add new boolean
- field pei386_auto_import.
-
-2001-07-18 Andreas Jaeger <aj@suse.de>
-
- * xregex2.h: Place under LGPL version 2.1.
-
-2001-07-10 Jeff Johnston <jjohnstn@redhat.com>
-
- * xregex.h: New file to support libiberty regex.
- * xregex2.h: Ditto.
-
-2001-06-15 Hans-Peter Nilsson <hp@axis.com>
-
- * bfdlink.h (struct bfd_link_info): New member export_dynamic.
-
-2001-05-16 Matt Kraai <kraai@alumni.carnegiemellon.edu>
-
- * partition.h: Fix misspelling of `implementation'.
-
-2001-05-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h (NULL_PTR): Delete.
-
-2001-05-07 Zack Weinberg <zackw@stanford.edu>
-
- * demangle.h: Use PARAMS for all prototypes.
- * ternary.h: Use PARAMS for all prototypes. Use PTR, not void *.
- Make arguments constant where possible.
-
-2001-05-07 Mark Mitchell <mark@codesourcery.com>
-
- * splay-tree.h (splay_tree_max): New function.
- (splay_tree_min): Likewise.
-
-2001-04-27 Johan Rydberg <jrydberg@opencores.org>
-
- * dis-asm.h (print_insn_openrisc): Add prototype.
-
-2001-04-15 Daniel Berlin <dan@cgsoftware.com>
-
- * ternary.h: New file - Ternary search tree header.
-
-2001-04-13 Jakub Jelinek <jakub@redhat.com>
-
- * bfdlink.h (bfd_link_discard): Add discard_sec_merge.
-
-2001-04-03 Zack Weinberg <zackw@stanford.edu>
-
- * ansidecl.h: All logic from gcc/gansidecl.h moved here.
-
-2001-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (alloca): Handle setting C_ALLOCA.
-
-2001-03-20 Jim Blandy <jimb@redhat.com>
-
- * demangle.h (enum gnu_v3_constructor_kinds,
- is_gnu_v3_mangled_ctor, enum gnu_v3_destructor_kinds,
- is_gnu_v3_mangled_dtor): New declarations.
-
-2001-03-14 Nick Clifton <nickc@redhat.com>
-
- * ansidecl.h: Fix copyright dates.
- * demangle.h: Fix copyright dates.
- * floatformat.h: Fix copyright dates.
- * fnmatch.h: Fix copyright dates.
- * getopt.h: Fix copyright dates.
- * libiberty.h: Add FSF copyright notice.
- * md5.h: Fix copyright dates.
- * obstack.h: Fix copyright dates.
- * splay-tree.h: Fix copyright dates.
-
-2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
- John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * libiberty.h: Add lbasename.
-
-2001-03-06 Zack Weinberg <zackw@stanford.edu>
-
- * libiberty.h: Prototype C_alloca; define alloca to either
- __builtin_alloca or C_alloca as appropriate.
-
-2001-03-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * safe-ctype.h (_sch_test): Cast enum bit to unsigned short int for pcc
- compatibility.
-
-2001-02-18 lars brinkhoff <lars@nocrew.org>
-
- * dis-asm.h: Add PDP-11 target.
-
-2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
-
- * dis-asm.h: Add linux target for S/390.
-
-2001-01-11 Peter Targett <peter.targett@arccores.com>
-
- * dis-asm.h (arc_get_disassembler): Correct declaration.
-
-2001-01-09 Philip Blundell <philb@gnu.org>
-
- * bin-bugs.h (REPORT_BUGS_TO): Set to `bug-binutils@gnu.org'.
-
-2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
-
- * COPYING: Update to current
- ftp://ftp.gnu.org/pub/gnu/Licenses/COPYING-2.0 (fixes references
- to 19yy as example year in copyright notice).
-
-2000-12-19 Hans-Peter Nilsson <hp@bitrange.com>
-
- * dis-asm.h (struct disassemble_info): New member "section".
- (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialize private_data member.
- Initialize section member.
-
-2000-12-16 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
-
- * safe-ctype.h: Make code work on all targets and not just on
- targets where a char is 8 bits.
-
-2000-12-10 Fred Fish <fnf@be.com>
-
- * bfdlink.h (struct bfd_link_info): Add new allow_shlib_undefined
- member to struct for systems where it is normal to have undefined
- symbols in shared libraries at runtime and the runtime linker
- takes care of redirecting them.
-
-2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
-
- * safe-ctype.h: New file.
-
-2000-12-06 Rodney Brown <RodneyBrown@mynd.com>
-
- * getopt.h obstack.h: Standarize copyright statement.
-
-2000-12-04 Richard Henderson <rth@redhat.com>
-
- * demangle.h: Change "new_abi" to "v3" everywhere.
-
-2000-11-22 Zack Weinberg <zack@wolery.stanford.edu>
-
- * libiberty.h: Move #includes to top. Prototype xmalloc_failed.
-
-2000-11-15 Kenneth Block <kenneth.block@compaq.com>
-
- * demangle.h: Add gnat and java demangle styles.
-
-2000-11-04 Hans-Peter Nilsson <hp@bitrange.com>
-
- * hashtab.h (struct htab): Add member return_allocation_failure.
- (htab_try_create): New prototype. Mention which functions may
- return NULL when this is used.
-
-2000-11-03 Hans-Peter Nilsson <hp@bitrange.com>
-
- * hashtab.h: Change void * to PTR where necessary.
-
-2000-10-11 Mark Mitchell <mark@codesourcery.com>
-
- * splay-tree.h (splay_tree_predecessor): Declare.
-
-2000-09-29 Hans-Peter Nilsson <hp@axis.com>
-
- * dis-asm.h: Declare cris_get_disassembler, not print_insn_cris.
- Fix typo in comment.
-
-2000-09-28 John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * alloca-conf.h: New file (copied from libiberty).
-
-2000-09-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * md5.h (md5_uint32): Choose via INT_MAX instead of UINT_MAX.
-
-2000-09-04 Alex Samuel <samuel@codesourcery.com>
-
- * dyn-string.h: Adjust formatting.
- (dyn_string_insert_char): New macro. New declaration.
-
-2000-08-28 Jason Merrill <jason@redhat.com>
-
- * md5.h: New file.
-
-2000-08-24 Greg McGary <greg@mcgary.org>
-
- * libiberty.h (ARRAY_SIZE): New macro.
-
-2000-07-29 Nick Clifton <nickc@cygnus.com>
-
- * os9k.h: Add copyright notice.
- Fix formatting.
-
-2000-07-22 Jason Eckhardt <jle@cygnus.com>
-
- * dis-asm.h (print_insn_i860): Add prototype.
-
-2000-07-20 H.J. Lu <hjl@gnu.org>
-
- * bfdlink.h (bfd_link_info): Add new_dtags.
-
-2000-07-20 Hans-Peter Nilsson <hp@axis.com>
-
- * dis-asm.h (print_insn_cris): Declare.
-
-2000-07-19 H.J. Lu (hjl@gnu.org)
-
- * bfdlink.h (bfd_link_info): Add flags and flags_1.
-
-2000-06-05 DJ Delorie <dj@redhat.com>
-
- * MAINTAINERS: new
-
-2000-06-21 Alex Samuel <samuel@codesourcery.com>
-
- * dyn-string.h (dyn_string_init, dyn_string_new,
- dyn_string_delete, dyn_string_release, dyn_string_resize,
- dyn_string_clear, dyn_string_copy, dyn_string_copy_cstr,
- dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert,
- dyn_string_insert_cstr, dyn_string_append, dyn_string_append_cstr,
- dyn_string_append_char, dyn_string_substring_dyn_string_eq):
- Define as same name with __cxa_ prepended, if IN_LIBGCC2.
- (dyn_string_init, dyn_string_copy, dyn_string_copy_cstr,
- dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert,
- dyn_string_insert_cstr, dyn_string_append, dyn_string_append_cstr,
- dyn_string_append_char, dyn_string_substring): Change return type
- to int.
-
-2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
-
- * dis-asm.h (print_insn_m68hc12): Define.
- (print_insn_m68hc11): Likewise.
-
-2000-06-18 Nick Clifton <nickc@redhat.com>
-
- * os9k.h: Change values of MODSYNC and CRCCON due to bug report
- from Russ Magee <rmagee@home.com>.
-
-2000-06-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * demangle.h (demangling_styles): Remove trailing comma in enum.
-
- * dyn-string.h (dyn_string_append_char): Change parameter from
- char to int.
-
-2000-06-04 Alex Samuel <samuel@codesourcery.com>
-
- * dyn-string.h: Move here from gcc/dyn-string.h. Add new functions.
-
- * demangle.h (DMGL_GNU_NEW_ABI): New macro.
- (DMGL_STYLE_MASK): Or in DMGL_GNU_NEW_ABI.
- (current_demangling_style): Add gnu_new_abi_demangling.
- (GNU_NEW_ABI_DEMANGLING_STYLE_STRING): New macro.
- (GNU_NEW_ABI_DEMANGLING): Likewise.
- (cplus_demangle_new_abi): New declaration.
-
-Tue May 30 16:53:34 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * floatformat.h (struct floatformat): Add field name.
-
-2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
-
- * filenames.h: New file.
- (HAVE_DOS_BASED_FILE_SYSTEM, IS_DIR_SEPARATOR)
- (IS_ABSOLUTE_PATH, FILENAME_CMP): New macros.
-
-2000-05-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * getopt.h (getopt): Also check HAVE_DECL_* when prototyping.
-
- * libiberty.h (basename): Likewise.
-
-2000-05-17 S. Bharadwaj Yadavalli <sby@scrugs.lkg.dec.com>
- Rick Gorton <gorton@scrugs.lkg.dec.com>
-
- * bfdlink.h (struct bfd_link_info): Add emitrelocations flag.
-
-2000-05-08 Alan Modra <alan@linuxcare.com.au>
-
- * dis-asm.h (print_insn_tic54x): Declare.
-
-2000-05-06 Zack Weinberg <zack@wolery.cumb.org>
-
- * ansidecl.h: #define __extension__ to nothing if
- GCC_VERSION < 2008.
-
-2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * demangle.h (demangler_engine): Constify.
-
-Thu May 4 17:15:26 2000 Philippe De Muyter <phdm@macqel.be>
-
- * sort.h (sys/types.h): File included unconditionnaly.
- (stddef.h): File include only #ifdef __STDC__.
-
-2000-05-03 Zack Weinberg <zack@wolery.cumb.org>
-
- * symcat.h: Remove #endif label.
-
-2000-04-28 Kenneth Block <block@zk3.dec.com>
- Jason Merrill <jason@casey.cygnus.com>
-
- * demangle.h (libiberty_demanglers): new table for different styles.
- (cplus_demangle_set_style): New function for setting style.
- (cplus_demangle_name_to_style): New function to translate name.
-
-2000-04-24 Mark Mitchell <mark@codesourcery.com>
-
- * hashtab.h (hash_pointer): Declare.
- (eq_pointer): Likewise.
-
-2000-04-23 Mark Mitchell <mark@codesourcery.com>
-
- * sort.h: New file.
-
-Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
- David Mosberger <davidm@hpl.hp.com>
-
- * dis-asm.h (print_insn_ia64): Declare.
-
-Tue Apr 18 16:22:30 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
-
- * hashtab.h (enum insert_option): New type.
- (htab_find_slot, htab_find_slot_with_hash): Use it.
-
-2000-04-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * symcat.h: Honor autoconf macro HAVE_STRINGIZE. Add
- comments/caveats with regard to traditional C behavior.
-
-2000-04-05 Richard Henderson <rth@cygnus.com>
-
- * splay-tree.h (splay_tree_remove): Declare.
-
-2000-04-04 Alan Modra <alan@linuxcare.com.au>
-
- * bin-bugs.h (REPORT_BUGS_TO): Remove translated part.
-
-2000-04-03 Alan Modra <alan@linuxcare.com.au>
-
- * bin-bugs.h: New file.
-
-2000-03-30 Mark Mitchell <mark@codesourcery.com>
-
- * hashtab.h (hashval_t): New type.
- (htab_find_with_hash): Use it as an argument.
- (htab_find_slot_with_hash): Likewise.
-
-2000-03-27 Denis Chertykov <denisc@overta.ru>
-
- * dis-asm.h (print_insn_avr): Declare.
-
-2000-03-14 Bernd Schmidt <bernds@cygnus.co.uk>
-
- * hashtab.h (htab_trav): Modify type so that first arg is of type
- void **.
- (htab_find_with_hash, htab_find_slot_with_hash): Declare new
- functions.
-
-2000-03-09 Alex Samuel <samuel@codesourcery.com>
-
- * partition.h: New file.
-
-2000-03-09 Zack Weinberg <zack@wolery.cumb.org>
-
- * hashtab.h (struct htab): Add del_f.
- (htab_del): New type.
- (htab_create): Add fourth argument.
-
-2000-03-08 Zack Weinberg <zack@wolery.cumb.org>
-
- * hashtab.h (hash_table_t): Rename to htab_t.
- (struct hash_table): Rename to struct htab. Shorten element
- names. Reorder elements by size.
- (htab_hash, htab_eq, htab_trav): New typedefs for the callback
- function pointers.
- (hash_table_entry_t): Discard; just use void * for element
- type.
-
-2000-03-01 H.J. Lu <hjl@gnu.org>
-
- * bfdlink.h (bfd_link_callbacks): Add a boolean arg to
- the undefined_symbol callback.
-
-2000-02-23 Linas Vepstas <linas@linas.org>
-
- * dis-asm.h (print_insn_i370): Declare.
-
-Tue Feb 22 15:19:54 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h (sim_trace): Document return values.
- (sim_set_trace): Declare. Deprecate.
-
-2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * dis-asm.h (struct disassemble_info): Change `length' param of
- read_memory_func to unsigned. Change type of `buffer_length' and
- `octets_per_byte' to unsigned.
- (buffer_read_memory): Change `length' param to unsigned.
-
-2000-02-16 Nick Clifton <nickc@cygnus.com>
-
- * dis-asm.h: Add prototypes for ARM register name functions.
-
-Wed Feb 9 18:45:49 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * wait.h: Delete. No longer used by GDB.
-
-Tue Feb 8 17:01:13 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h (sim_resume): Clarify use of SIGGNAL.
- (sim_stop_reason): Clarify meaning of sim_signalled.
-
-2000-02-03 Timothy Wall <twall@redhat.com>
-
- * dis-asm.h (struct disassemble_info): Added octets_per_byte
- field and initialize it to one (1).
-
-2000-01-27 Nick Clifton <nickc@redhat.com>
-
- * dis-asm.h: Add prototype for disassembler_usage().
- Add prototype for arm_disassembler_options().
- Remove prototype for arm_toggle_regnames().
- Add prototype for parse_arm_disassembler_option().
-
-Sat Jan 1 19:06:52 2000 Hans-Peter Nilsson <hp@bitrange.com>
-
- * symcat.h (STRINGX) [!__STDC__ || ALMOST_STDC]: Change "?" to "s"
- to stringify argument s.
-
-Wed Dec 15 11:22:56 1999 Jeffrey A Law (law@cygnus.com)
-
- * hp-symtab.h (HP_LANGUAGE_FORTRAN): New enumeration constant.
- (HP_LANGUAGE_F77): Define using HP_LANGUAGE_FORTRAN.
-
-1999-12-15 Doug Evans <dje@transmeta.com>
-
- * dis-asm.h: Enclose in extern "C" ifdef __cplusplus.
-
-1999-12-05 Mark Mitchell <mark@codesourcery.com>
-
- * splay-tree.h (struct splay_tree_node): Rename to ...
- (struct splay_tree_node_s): ... this.
- (struct splay_tree): Rename to ...
- (struct splay_tree_s): ... this.
-
-1999-11-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h (ATTRIBUTE_MALLOC): New macro.
-
- * libiberty.h (buildargv, dupargv, concat, choose_temp_base,
- make_temp_file, xmalloc, xcalloc, xstrdup, xmemdup): Add
- ATTRIBUTE_MALLOC.
- (xatexit): Remove __GNUC__ check, add ATTRIBUTE_NORETURN.
-
-1999-11-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h: Include stdarg.h when ANSI_PROTOTYPES is defined.
- (asprintf, vasprintf): Provide declarations.
-
-Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
- Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h: Define and test `GCC_VERSION', not `HAVE_GCC_VERSION'.
-
-1999-11-04 Jimmy Guo <guo@cup.hp.com>
-
- * hp-symtab.h (dntt_type_fparam): Add doc_ranges, misc_kind
- fields, change location type to CORE_ADDR from int.
- (dntt_type_const): Name the 5th field location_type.
-
-Sun Oct 24 19:11:32 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * sim-d10v.h (SIM_D10V_TS2_DMAP_REGNUM): Define.
-
-1999-10-23 08:51 -0700 Zack Weinberg <zack@bitmover.com>
-
- * hashtab.h: Give hash_table_t a struct tag. Add prototypes
- for clear_hash_table_slot and traverse_hash_table. Correct
- prototype of all_hash_table_collisions.
-
-Sat Oct 23 19:00:13 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * sim-d10v.h: New file.
-
-Fri Oct 15 01:47:51 1999 Vladimir Makarov <vmakarov@loony.cygnus.com>
-
- * hashtab.h: New file.
-
-1999-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h (HAVE_GCC_VERSION): New macro. Use it instead of
- explicitly testing __GNUC__ and __GNUC_MINOR__.
-
- (ATTRIBUTE_PRINTF): Use `__format__', not `format'.
-
-1999-09-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (make_temp_file): Add a prototype.
-
-Tue Sep 14 00:35:02 1999 Marc Espie <espie@cvs.openbsd.org>
-
- * libiberty.h (basename): OpenBSD has a correct prototype.
- (xrealloc): Remove outdated comment.
-
-1999-09-07 Jeff Garzik <jgarzik@pobox.com>
-
- * libiberty.h (xmemdup): Add prototype for new function.
-
-1999-09-04 Steve Chamberlain <sac@pobox.com>
-
- * dis-asm.h (print_insn_pj): Declare.
-
-1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * obstack.h (obstack_grow, obstack_grow0): Move (char*) casts
- in calls to `_obstack_memcpy' from here ...
-
- (_obstack_memcpy): ... to here, except in the __STDC__ case which
- doesn't need it.
-
-1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h (getpwd): Prototype.
-
-1999-08-01 Mark Mitchell <mark@codesourcery.com>
-
- * splay-tree.h (splay_tree_insert): Return the new node.
-
-1999-07-11 Ian Lance Taylor <ian@zembu.com>
-
- * ansidecl.h: Copy attribute support macros from egcs.
-
-1999-06-22 Mark Mitchell <mark@codesourcery.com>
-
- * bfdlink.h (struct bfd_link_hash_entry): Add init_function and
- fini_function.
-
-1999-06-20 Mark Mitchell <mark@codesourcery.com>
-
- * mips.h (Elf32_Internal_Msym): New structure.
- (Elf32_External_Msym): Likewise.
- (ELF32_MS_REL_INDEX): New macro.
- (ELF32_MS_FLAGS): Likewise.
- (ELF32_MS_INFO): Likewise.
-
-1999-06-14 Nick Clifton <nickc@cygnus.com>
-
- * dis-asm.h (arm_toggle_regnames): New prototype.
- (struct diassemble_info): New field: disassembler_options.
-
-1999-04-11 Richard Henderson <rth@cygnus.com>
-
- * bfdlink.h (bfd_elf_version_expr): Rename `match' to `pattern'.
- Add `match' callback function.
-
-1999-04-10 Richard Henderson <rth@cygnus.com>
-
- * bfdlink.h (bfd_link_info): Add no_undefined.
-
-1999-04-08 Nick Clifton <nickc@cygnus.com>
-
- * dis-asm.h: Add prototype for print_insn_mcore.
-
-1999-04-02 Mark Mitchell <mark@codesourcery.com>
-
- * splay-tree.h (splay_tree_compare_pointers): Declare.
-
-1999-03-30 Mark Mitchell <mark@codesourcery.com>
-
- * splay-tree.h (splay_tree_compare_ints): Declare.
-
-Wed Mar 24 12:46:29 1999 Andrew Cagney <cagney@amy.cygnus.com>
-
- * libiberty.h (basename): Cygwin{,32} should have the prototype.
-
-1999-02-22 Jim Lemke <jlemke@cygnus.com>
-
- * bfdlink.h (bfd_link_info): add field "mpc860c0".
-
-Mon Feb 1 21:05:46 1999 Catherine Moore <clm@cygnus.com>
-
- * dis-asm.h (print_insn_i386_att): Declare.
- (print_insn_i386_intel): Declare.
-
-1998-12-30 Michael Meissner <meissner@cygnus.com>
-
- * dis-asm.h (INIT_DISASSEMBLE_INFO_NO_ARCH): Cast STREAM and
- FPRINTF_FUNC to avoid compiler warnings.
-
-Wed Dec 30 16:07:14 1998 David Taylor <taylor@texas.cygnus.com>
-
- * dis-asm.h: change void * to PTR (two places).
-
-Mon Dec 14 09:53:31 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * demangle.h: Don't check IN_GCC anymore.
- * splay-tree.h: Likewise.
-
-Tue Dec 8 00:30:31 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
-
- The following changes were made by Elena Zannoni
- <ezannoni@kwikemart.cygnus.com> and Edith Epstein
- <eepstein@sophia.cygnus.com> as part of a project to merge in
- changes made by HP; HP did not create ChangeLog entries.
-
- * dis-asm.h (struct disassemble_info): change the type of stream
- from FILE* to void*, for use with gdb's new type GDB_FILE.
- (fprintf_ftype): change FILE* parameter type to void*.
-
- * demangle.h: (DMGL_EDG): new macro for Kuck and Associates
- (DMGL_STYLE_MASK): modify to include Kuck and Assoc style
- (demangling_styles): add new edg_demangling style
- (EDG_DEMANGLING_STYLE_STRING): new macro
- (EDG_DEMANGLING): new macro
- (DMGL_HP): new macro, for HP/aCC compiler.
- (DMGL_STYLE_MASK): modify to include new HP's style.
- (demangling_styles): add new hp_demangling value.
- (HP_DEMANGLING_STYLE_STRING): new macro.
- (ARM_DEMANGLING): coerce to int.
- (HP_DEMANGLING): new macro.
-
- * hp-symtab.h: rewritten, from HP.
- (quick_procedure): change type of language field to unsigned int
- (quick_module): change type of language field to unsigned int
- (struct dntt_type_svar): add field thread_specific.
- (hp_language): add languages modcal and dmpascal.
-
-Fri Nov 20 13:14:00 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * libiberty.h (basename): Add prototype for FreeBSD.
-
-Fri Nov 13 19:19:11 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * libiberty.h: Prototype xcalloc.
-
-Sun Nov 8 17:42:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * ansidecl.h: Wrap problematic macros with !IN_GCC.
-
- * demangle.h: Never define PARAMS().
- * splay-tree.h: Likewise.
-
-Sat Nov 7 18:30:20 1998 Peter Schauer <peter.schauer@regent.e-technik.tu-muenchen.de>
-
- * dis-asm.h (print_insn_vax): Declare.
-
-Sat Nov 7 16:04:03 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * demangle.h: Don't include gansidecl.h.
- * splay-tree.h: Likewise.
-
-1998-10-26 16:03 Ulrich Drepper <drepper@cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Add new field optimize.
-
-Thu Oct 22 19:58:00 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * splay-tree.h: Wrap function pointer parameter declarations in
- PARAMS() macro.
-
-1998-10-21 Mark Mitchell <mark@markmitchell.com>
-
- * splay-tree.h: New file.
-
-Fri Oct 9 00:02:03 1998 Jeffrey A Law (law@cygnus.com)
-
- * Merge devo and egcs include directories.
-
-Sat Sep 5 12:16:33 1998 Jeffrey A Law (law@cygnus.com)
-
- * getopt.h, obstack.h: Updated from gcc.
-
-1998-08-03 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * libiberty.h (xexit): Change decl to use modern GCC attribute
- to indicate exit does not return.
-
-Mon Jun 1 13:48:32 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * obstack.h: Update to latest FSF version.
-
-Tue Feb 24 13:05:02 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * dis-asm.h (disassemble_info): Member `symbol' renamed to `symbols'
- and made an "asymbol **". New member num_symbols.
- (INIT_DISASSEMBLE_INFO_NO_ARCH): Update.
-
-Tue Feb 17 12:32:18 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h (sim_fetch_register, sim_store_register): Add
- register length parameter. Functions return actual length of
- register.
-
-Thu Feb 12 16:29:01 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * getopt.h: Update to latest FSF version.
-
-Wed Feb 11 16:56:06 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * symcat.h: New file.
-
-Mon Feb 2 17:13:31 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU>
-
- * dis-asm.h (print_insn_tic30): Declare.
-
-Thu Jan 22 16:23:59 1998 Fred Fish <fnf@cygnus.com>
-
- * dis-asm.h: Add flag INSN_HAS_RELOC to tell disassembly
- function there is a reloc on this line.
-
-Mon Dec 8 11:22:23 1997 Nick Clifton <nickc@cygnus.com>
-
- * dis-asm.h: Remove prototype of disasm_symaddr() as this function
- no longer exists.
-
-Tue Dec 2 10:20:53 1997 Nick Clifton <nickc@cygnus.com>
-
- * dis-asm.h (disasm_symaddr): New prototype.
-
-Mon Dec 1 11:29:35 1997 Doug Evans <devans@canuck.cygnus.com>
-
- * callback.h (CB_SYSCALL): Comment out arg names in prototypes.
-
-Wed Nov 26 16:47:58 1997 Michael Meissner <meissner@cygnus.com>
-
- * callback.h (CB_SYSCALL): Consistantly use names for prototype
- arguments.
-
-Wed Nov 26 11:39:30 1997 Doug Evans <devans@canuck.cygnus.com>
-
- * callback.h (CB_SYSCALL): Change byte count arguments to
- {read,write}_mem to `int'. New member `magic'.
- (CB_SYSCALL_MAGIC,CB_SYSCALL_INIT): New macros.
-
-Tue Nov 25 01:35:52 1997 Doug Evans <devans@seba.cygnus.com>
-
- * callback.h (struct stat): Move forward decl up.
- (host_callback): Pass stat struct pointer to stat,fstat.
- (CB_SYS_nnn): Reorganize.
- (CB_SYSCALL): New members p1,p2.
- (cb_host_to_target_stat): Delete fourth arg.
-
-Sat Nov 22 23:34:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h (sim_stop_reason): Clarify sim_signalled SIGRC
- argument.
-
-Mon Nov 17 14:00:51 1997 Doug Evans <devans@seba.cygnus.com>
-
- * callback.h (CB_TARGET_DEFS_MAP): Renamed from target_defs_map.
- (host_callback): Add stat, fstat, syscall_map, errno_map, open_map,
- signal_map, stat_map.
- (errn_map,open_map): Renamed to cb_init_foo_map.
- (cb_host_to_target_errno,cb_target_to_host_open): Renamed from
- host_to_target_errno,target_to_host_open.
- (cb_read_target_syscall_maps): Add prototype.
- (cb_target_to_host_syscall): Likewise.
- (cb_host_to_target_stat): Likewise.
- (cb_syscall): Likewise.
- (CB_SYS_{exit,open,close,read,write,lseek,unlink,getpid,kill,fstat,
- argvlen,argv,chdir,stat,chmod,utime,time}): Define.
- (CB_SYSCALL): New type.
- (CB_RC): New enum.
-
-Fri Nov 7 10:34:09 1997 Rob Savoye <rob@darkstar.cygnus.com>
-
- * libiberty.h: Add extern "C" { so it can be used with C++
- programs.
- * remote-sim.h: Add extern "C" { so it can be used with C++
- programs.
-
-Tue Oct 14 16:07:51 1997 Nick Clifton <nickc@cygnus.com>
-
- * dis-asm.h (struct disassemble_info): New field
- 'symbol_at_address_func'.
- (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialise new field with
- generic_symbol_at_address.
-
-Mon Oct 13 10:17:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h: Clarify sim_read, sim_write MEM argument.
-
-Wed Sep 24 18:03:10 1997 Stu Grossman <grossman@babylon-5.cygnus.com>
-
- * remote-sim.h (SIM_RC): Add a bunch of new return codes for
- breakpoint stuff.
- * Add functions to tell the simulator to set/clear/enable/disable
- intrinsic breakpoints.
-
-Thu Aug 28 19:41:42 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * libiberty.h (dupargv): Add prototype.
-
-Tue Aug 26 12:25:49 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h (sim_create_inferior): Add ABFD arg. Document.
-
-Mon Aug 25 10:50:51 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h (sim_open): Add ABFD arg. Document.
-
-Fri Aug 8 16:43:56 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * dis-asm.h (arc_get_disassembler): Declare.
-
-Wed Jul 30 11:39:50 1997 Per Bothner <bothner@deneb.cygnus.com>
-
- * demangle.h (DMGL_JAVA): New option to request Java demangling.
-
-Tue Jul 22 17:59:54 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * libiberty.h (PEXECUTE_*): Define.
- (pexecute, pwait): Declare.
-
-Fri Jun 6 13:02:33 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h (sim_kill): Mark as depreciated.
-
-Fri May 23 13:43:41 1997 Fred Fish <fnf@cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Add task_link member.
-
-Thu May 22 11:32:49 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h: Review documentation. Clarify restrictions on
- when functions can be called.
-
-Wed May 21 16:47:53 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h (sim_set_profile_size): Add prototype, document as
- depreciated.
-
-Tue May 20 09:32:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h (sim_open): Add callback struct.
- (sim_set_callbacks): Drop SIM_DESC argument. Document.
- (sim_size): Remove recently added SIM_DESC argument. Document.
-
-Mon May 19 19:14:44 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h: Pass SD into sim_size.
-
-Thu May 15 01:24:16 1997 Mark Alexander <marka@cygnus.com>
-
- * obstack.h (obstack_specify_allocation_with_arg, obstack_chunkfun,
- obstack_freefun): Eliminate compile warnings in gdb.
-
-Tue Apr 22 10:24:34 1997 Fred Fish <fnf@cygnus.com>
-
- * floatformat.h (floatformat_byteorders): Add comments for previous
- formats and add floatformat_littlebyte_bigword, primarily for ARM.
- Add declaration for floatformat_ieee_double_littlebyte_bigword.
-
-Fri Apr 18 13:04:49 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * remote-sim.h (sim_stop): New interface - asynchronous
- notification of a request to stop / suspend the running
- simulation.
-
- * remote-sim.h (enum sim_stop): Add sim_running and sim_polling as
- states for use internal to simulators.
-
- * callback.h (struct host_callback_strut): Put a magic number at
- the end of the struct to allow basic checking.
- (struct host_callback_struct ): Add poll_quit - so
- that the console etc can be polled at regular intervals.
-
-Thu Apr 17 02:17:12 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * remote-sim.h (struct _bfd): Declare.
- (sim_load): Return SIM_RC. New arg `abfd'.
- (sim_create_inferior): Return SIM_RC. Delete arg `start_address'.
-
-Wed Apr 2 17:09:12 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
-
- * remote-sim.h (sim_trace, sim_size): Make these global. They
- will go away shortly.
-
-Wed Apr 2 15:23:49 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * remote-sim.h (SIM_OPEN_KIND, SIM_RC): New enums.
- (sim_open): New argument `kind'.
-
-Wed Apr 2 14:45:51 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * COPYING: Update FSF address.
-
-Fri Mar 28 15:29:54 1997 Mike Meissner <meissner@cygnus.com>
-
- * callback.h (top level): Include stdarg.h or varargs.h if
- va_start is not defined.
- (host_callback_struct): Make {,e}vprintf_filtered take a va_list
- instead of void *, since va_list might be an array or structure
- type.
-
-Fri Mar 28 15:44:41 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
-
- * libiberty.h (basename): Add prototype for glibc and linux.
-
-Mon Mar 17 19:22:12 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * objalloc.h: New file.
-
-Mon Mar 17 14:57:55 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
-
- * remote-sim.h: New file, copied in from gdb/remote-sim.h. One
- day this will be placed in a directory of its own.
-
-Sat Mar 15 19:00:14 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * obstack.h: Update to current FSF version.
-
-Thu Mar 6 15:46:59 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
-
- * callback.h (struct host_callback_struct): Add callbacks -
- flush_stdout, write_stderr, flush_stderr, vprintf_filtered,
- evprintf_filtered. Delete redundant callbacks - printf_filtered.
-
-Thu Feb 27 23:18:27 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Remove lprefix and lprefix_len
- fields.
-
-Tue Feb 25 00:10:49 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * dis-asm.h (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialize
- bytes_per_chunk and display_endian.
-
-Mon Feb 24 17:47:02 1997 Ian Lance Taylor <ian@cygnus.com>
-
- From Eric Youngdale <eric@andante.jic.com>:
- * bfdlink.h (struct bfd_elf_version_expr): Define.
- (struct bfd_elf_version_deps): Define.
- (struct bfd_elf_version_tree): Define.
-
-Thu Feb 6 14:20:01 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * dis-asm.h: (disassemble_info): Add new fields
- bytes_per_chunk and display_endian to control the
- display of raw instructions.
-
-Fri Dec 27 22:17:37 1996 Fred Fish <fnf@cygnus.com>
-
- * dis-asm.h (print_insn_tic80): Declare.
-
-Sun Dec 8 17:11:12 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * callback.h (host_callback): New member `error'.
-
-Wed Nov 20 00:40:23 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * callback.h: New file, moved here from gdb.
-
-Mon Nov 18 16:34:00 1996 Dawn Perchik <dawn@critters.cygnus.com>
-
- * libiberty.h: Checkin again; last checkin failed due to sticky tag.
-
-Wed Nov 13 08:22:00 1996 Dawn Perchik <dawn@critters.cygnus.com>
-
- * libiberty.h: Revert last commit due to conflicts with hpux
- system headers.
-
-Tue Nov 12 16:31:00 1996 Dawn Perchik <dawn@critters.cygnus.com>
-
- * libiberty.h: Move prototypes from argv.c here.
-
-Thu Oct 31 14:56:18 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * ansidecl.h (VPARAMS,VA_START): Define.
-
-Fri Oct 25 12:08:04 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * dis-asm.h (disassemble_info): Add bytes_per_line field.
- (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialize bytes_per_line field.
-
-Thu Oct 24 17:10:01 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * dis-asm.h (disassemble_info): Add symbol field.
- (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialize symbol field.
-
-Thu Oct 17 11:17:40 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * dis-asm.h (print_insn_m32r): Declare.
-
-Mon Oct 14 23:56:52 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * libiberty.h: Declare parameter types for xmalloc and xrealloc.
-
-Thu Oct 3 13:45:27 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * fnmatch.h: New file.
-
-Thu Oct 3 10:33:14 1996 Jeffrey A Law (law@cygnus.com)
-
- * dis-asm.h (print_insn_mn10x00): Delete declaration.
- (print_insn_mn10200, print_insn_mn10300): Declare.
-
-Wed Oct 2 21:24:43 1996 Jeffrey A Law (law@cygnus.com)
-
- * dis-asm.h (print_insn_mn10x00): Declare.
-
-Mon Sep 30 13:56:11 1996 Fred Fish <fnf@cygnus.com>
-
- * libiberty.h: Remove #ifndef PRIVATE_XMALLOC.
-
-Sat Aug 31 13:27:06 1996 Jeffrey A Law (law@cygnus.com)
-
- * dis-asm.h (print_insn_v850): Declare.
-
-Tue Aug 13 16:10:30 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * obstack.h: Change bcopy to memcpy. Works better on Posix
- systems, which generally lack bcopy.
-
-Mon Aug 12 17:03:18 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * ansidecl.h: Change WIN32 to _WIN32.
-
-Fri Jul 26 13:58:18 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * dis-asm.h: Add flavour field.
- (print_insn_alpha): Declare.
- (print_insn_alpha_osf, print_insn_alpha_vms): Don't declare.
- (INIT_DISASSEMBLE_INFO): Initialize flavour field.
-
-Tue Jul 23 17:37:58 1996 Fred Fish <fnf@cygnus.com>
-
- * libiberty.h (PRIVATE_XMALLOC): Enclose xmalloc/xrealloc
- definitions inside #ifndef so that programs that want to
- can define PRIVATE_XMALLOC and then define xmalloc and
- xrealloc anyway they want.
- (basename): Document in source that we can't declare the
- parameter type because it is declared inconsistently across
- different systems.
-
-Mon Jul 22 13:16:13 1996 Richard Henderson <rth@tamu.edu>
-
- * dis-asm.h (print_insn_alpha): Don't declare.
- (print_insn_alpha_osf, print_insn_alpha_vms): Declare.
-
-Wed Jul 17 14:45:12 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * dis-asm.h: (print_insn_d10v): Declare.
-
-Mon Jul 15 16:55:38 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * dis-asm.h: Get rid of decls for print_insn_i8086,
- print_insn_sparc64 and print_insn_sparclite.
- * (INIT_DISASSEMBLE_INFO): Split into two pieces. One,
- INIT_DISASSEMBLE_INFO_NO_ARCH inits everything except for endian,
- mach, and arch.
-
-Fri Jul 12 10:19:27 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * dis-asm.h (print_insn_i8086): Declare.
-
-Wed Jul 3 16:02:39 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * dis-asm.h (print_insn_sparclite): Declare.
-
-Tue Jun 18 16:02:46 1996 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * dis-asm.h (print_insn_h8300s): Declare.
-
-Tue Jun 18 15:11:33 1996 Klaus Kaempf <kkaempf@progis.de>
-
- * fopen-vms.h: New file.
-
-Tue Jun 4 18:58:16 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Add notice_all field.
-
-Fri Apr 26 10:33:12 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * demangle.h (#ifdef IN_GCC): #include "gansidecl.h".
- (PROTO,PTR,const): Delete.
-
-Mon Apr 22 17:27:42 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Add traditional_format field.
-
-Mon Apr 15 15:16:56 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * libiberty.h (choose_temp_base): Add prototype.
-
-Tue Mar 12 17:29:46 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (bfd_wrapped_link_hash_lookup): Declare.
- (struct bfd_link_info): Add wrap_hash field.
-
-Wed Feb 14 16:49:17 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
-
- * ieee.h (ieee_record_enum_type): Define
- ieee_external_reference_info_enum.
-
-Fri Feb 2 17:09:25 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * dis-asm.h (DISASM_RAW_INSN): Delete.
-
-Tue Jan 23 09:21:47 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * dis-asm.h (INIT_DISASSEMBLE_INFO): Set endian to BFD_ENDIAN_UNKNOWN.
- New argument FPRINTF_FUNC.
-
-Mon Jan 22 16:37:59 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * dis-asm.h (disassemble_info): New members arch, mach, endian.
- (INIT_DISASSEMBLE_INFO): Initialize them.
- (DISASM_RAW_INSN{,FLAG}): Define.
-
-Thu Jan 18 11:32:38 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * demangle.h (cplus_demangle_opname): Change opname parameter to
- const char *.
- (cplus_mangle_opname): Change return type and opname parameter to
- const char *.
-
-Fri Jan 5 00:01:22 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * ieee.h (enum ieee_record): Add ieee_asn_record_enum,
- ieee_at_record_enum, ieee_ty_record_enum, ieee_atn_record_enum,
- ieee_bb_record_enum, and ieee_be_record_enum.
-
-Wed Jan 3 13:12:09 1996 Fred Fish <fnf@cygnus.com>
-
- * obstack.h: Update copyright to 1996.
- (_obstack_memory_used): Declare.
- (obstack_memory_used): Define macro.
-
-Thu Dec 28 11:42:12 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * libiberty.h (xstrdup): Declare.
-
-Thu Dec 21 14:47:17 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * wait.h: Protect all macros with #ifndef.
-
-Tue Oct 24 21:45:40 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Add static_link field.
-
-Tue Sep 12 16:28:04 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_callbacks): Add symbol parameter to
- warning callback.
-
-Fri Sep 1 13:11:51 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_callbacks): Change warning callback
- to take BFD, section, and address arguments.
-
-Thu Aug 31 16:45:12 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Remove PE stuff.
-
-Tue Aug 22 03:18:23 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
-
- * libiberty.h: Declare xstrerror. From Pat Rankin.
-
-Mon Aug 21 18:11:36 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Remove PE stuff.
-
-Wed Aug 2 08:14:12 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * dis-asm.h (print_insn_sparc64): Declare.
-
-Mon Jul 10 13:26:49 1995 Eric Youngdale <eric@aib.com>
-
- * bfdlink.h (struct bfd_link_info): Add new field symbolic.
-
-Sun Jul 2 17:48:40 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Change type of base_file to
- PTR.
-
-Thu Jun 29 00:02:45 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * bfdlink.h (struct bfd_link_info): Added base_file member.
-
-Tue Jun 20 16:40:04 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * ansidecl.h: win32s is ANSI enough.
-
-Thu May 18 04:25:50 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
-
- Wed May 10 14:28:16 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
-
- * dis-asm.h (print_insn_arm): Delete declaration.
- (print_insn_{little,big}_arm): New declarations.
-
- * floatformat.h (floatformat_arm_ext): Declare.
-
-Sat May 13 10:14:08 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * bfdlink.h (subsytem, stack_heap_parameters): New.
-
-Thu May 4 14:36:42 1995 Jason Merrill <jason@phydeaux.cygnus.com>
-
- * demangle.h: Don't include ansidecl.h if IN_GCC.
-
-Tue Feb 21 00:37:28 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * hp-symtab.h: Don't use bitfield enumerations, the HP C compiler
- does not handle them correctly.
-
-Thu Feb 9 14:20:27 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * libiberty.h (basename): Don't declare parameter type; some
- systems have this in their header files.
-
-Wed Feb 8 17:35:38 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (struct bfd_link_hash_entry): Change format of common
- symbol information, to remove restrictions on maximum size and
- alignment power, by using a pointer to a structure instead.
-
-Mon Feb 6 14:55:32 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * bfdlink.h (enum bfd_link_hash_type): Rename bfd_link_hash_weak
- to bfd_link_hash_undefweak. Add bfd_link_hash_defweak.
-
-Mon Jan 16 21:00:23 1995 Stan Shebs <shebs@andros.cygnus.com>
-
- * dis-asm.h (GDB_INIT_DISASSEMBLE_INFO, etc): Remove all
- GDB-specific definitions.
-
-Sun Jan 15 18:39:35 1995 Steve Chamberlain <sac@splat>
-
- * dis-asm.h (print_insn_w65): Declare.
-
-Thu Jan 12 17:51:17 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * libiberty.h (hex_p): Fix sense of test.
-
-Wed Jan 11 22:36:40 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * libiberty.h (_hex_array_size, _hex_bad, _hex_value, hex_init,
- hex_p, hex_value): New macros and declarations, for hex.c.
-
-Fri Jan 6 17:44:14 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * dis-asm.h: Make idempotent.
-
-Wed Dec 14 13:08:43 1994 Stan Shebs <shebs@andros.cygnus.com>
-
- * progress.h: New file, empty definitions for progress macros.
-
-Fri Nov 25 00:14:05 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * hp-symtab.h: New file describing the debug symbols emitted
- by the HP C compilers.
-
-Fri Nov 11 15:48:37 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * bfdlink.h (struct bfd_link_hash_entry): Change u.c.size from 24
- to 26 bits, and change u.c.alignment_power from 8 to 6 bits. 6
- bit in the alignment power is enough for a 64 bit address space.
-
-Mon Oct 31 13:02:51 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * demangle.h (cplus_mangle_opname): Declare.
-
-Tue Oct 25 11:38:02 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * bfdlink.h (struct bfd_link_callbacks): Fix comments for
- multiple_common field.
-
-Sun Sep 04 17:58:10 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org)
-
- * dis-asm.h: Add support for the ARM.
-
-Wed Aug 10 12:51:41 1994 Doug Evans (dje@canuck.cygnus.com)
-
- * libiberty.h (strsignal): Document its existence even if we
- can't declare it.
-
-Tue Aug 2 14:40:03 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * os9k.h: Remove u_int16, u_int32, and owner_id typedefs and
- expand their uses. Those names conflict with Mach headers.
-
-Fri Jul 22 14:17:12 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * bfdlink.h (struct bfd_link_hash_entry): Change u.c.size into a
- bitfield. Add field u.c.alignment_power.
-
-Sun Jul 10 00:26:39 1994 Ian Dall (dall@hfrd.dsto.gov.au)
-
- * dis-asm.h: Add print_insn_ns32k declaration.
-
-Mon Jun 20 17:13:29 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * bfdlink.h (bfd_link_hash_table): Make creator a const pointer.
-
-Sat Jun 18 16:09:32 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * demangle.h (cplus_demangle_opname): Declare.
-
-Thu Jun 16 15:19:03 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfdlink.h (struct bfd_link_info): Add new field shared.
-
-Mon Jun 6 14:39:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfdlink.h (struct bfd_link_hash_entry): Remove written field:
- not needed for all backends.
-
-Thu Apr 28 19:06:50 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * dis-asm.h (disassembler): Declare.
-
-Fri Apr 1 00:38:17 1994 Jim Wilson (wilson@mole.gnu.ai.mit.edu)
-
- * obstack.h: Delete use of IN_GCC to control whether
- stddef.h or gstddef.h is included.
-
-Tue Mar 22 13:06:02 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfdlink.h (enum bfd_link_order_type): Add bfd_data_link_order.
- (struct bfd_link_order): Add data field to union.
-
-Mon Mar 21 18:45:26 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfdlink.h (struct bfd_link_callbacks): Change bitsize argument
- to add_to_set to reloc. Remove bitsize argument from constructor.
- Comment that reloc_overflow, reloc_dangerous and unattached_reloc
- must handle NULL pointers for reloc location.
- (enum bfd_link_order_type): Add bfd_section_reloc_link_order and
- bfd_symbol_reloc_link_order.
- (struct bfd_link_order): Add reloc field to union.
- (struct bfd_link_order_reloc): Define.
-
-Mon Mar 14 12:27:50 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * ieee-float.h: Removed; no longer used.
-
-Tue Mar 1 18:10:49 1994 Kung Hsu (kung@mexican.cygnus.com)
-
- * os9k.h: os9000 target specific header file, the header of the
- object file is used now.
-
-Sun Feb 27 21:52:26 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * floatformat.h: New file, intended to replace ieee-float.h.
-
-Sun Feb 20 17:15:42 1994 Ian Lance Taylor (ian@lisa.cygnus.com)
-
- * ansidecl.h (ANSI_PROTOTYPES): Define if using ANSI prototypes.
-
-Wed Feb 16 01:07:12 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * libiberty.h: Don't declare strsignal, to avoid conflicts with
- Solaris system header files.
-
-Sat Feb 12 22:11:32 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * libiberty.h (xexit): Use __volatile__ to avoid losing if
- compiling with gcc -traditional.
-
-Thu Feb 10 14:05:41 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * libiberty.h: New file. Declares functions provided by
- libiberty.
-
-Tue Feb 8 05:19:52 1994 David J. Mackenzie (djm@thepub.cygnus.com)
-
- Handle obstack_chunk_alloc returning NULL. This allows
- obstacks to be used by libraries, without forcing them
- to call exit or longjmp.
- * obstack.h (struct obstack): Add alloc_failed flag.
- _obstack_begin, _obstack_begin_1): Declare to return int, not void.
- (obstack_finish): If alloc_failed, return NULL.
- (obstack_base, obstack_next_free, objstack_object_size):
- If alloc_failed, return 0.
- (obstack_grow, obstack_grow0, obstack_1grow, obstack_ptr_grow,
- obstack_int_grow, obstack_blank): If alloc_failed, do nothing that
- could corrupt the obstack.
-
-Mon Jan 24 15:06:05 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfdlink.h (struct bfd_link_callbacks): Add name, reloc_name and
- addend argments to reloc_overflow callback.
-
-Fri Jan 21 19:13:12 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * dis-asm.h (print_insn_big_powerpc, print_insn_little_powerpc,
- print_insn_rs6000): Declare.
-
-Thu Jan 6 14:15:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfdlink.h (struct bfd_link_callbacks): Add bitsize argument to
- add_to_set field. Add new callback named constructor.
-
-Thu Dec 30 10:44:06 1993 Ian Lance Taylor (ian@rtl.cygnus.com)
-
- * bfdlink.h: New file for new BFD linker backend routines.
-
-Mon Nov 29 10:43:57 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * dis-asm.h (enum dis_insn_tyupe): Remove non-ANSI trailing comma.
-
-Sat Oct 2 20:42:26 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * dis-asm.h: Move comment to right place.
-
-Mon Aug 9 19:03:35 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * obstack.h (obstack_chunkfun, obstack_freefun): Add defns from
- previous version. Are these Cygnus local changes?
-
-Fri Aug 6 17:05:47 1993 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * getopt.h, obstack.h: Update to latest FSF version.
-
-Mon Aug 2 14:45:29 1993 John Gilmore (gnu@cygnus.com)
-
- * dis-asm.h: Move enum outside of struct defn to avoid warnings.
-
-Mon Aug 2 08:49:30 1993 Stu Grossman (grossman at cygnus.com)
-
- * wait.h (WEXITSTATUS, WSTOPSIG): Mask down to 8 bits. This is
- for systems that store stuff into the high 16 bits of a wait
- status.
-
-Fri Jul 30 18:38:02 1993 John Gilmore (gnu@cygnus.com)
-
- * dis-asm.h: Add new fields insn_info_valid, branch_delay_insns,
- data_size, insn_type, target, target2. These are used to return
- information from the instruction decoders back to the calling
- program. Add comments, make more readable.
-
-Mon Jul 19 22:14:14 1993 Fred Fish (fnf@deneb.cygnus.com)
-
- * nlm: New directory containing NLM/NetWare includes.
-
-Thu Jul 15 12:10:04 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * dis-asm.h (struct disassemble_info): New field application_data.
-
-Thu Jul 15 12:41:15 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * dis-asm.h: Added declaration of print_insn_m88k.
-
-Fri Jul 2 10:31:59 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ansidecl.h: Use ANSI macros if __mips and _SYSTYPE_SVR4 are
- defined, since RISC/OS cc handles ANSI declarations in SVR4 mode
- but does not define __STDC__.
-
-Sun Jun 20 18:27:52 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
-
- * dis-asm.h: Don't need to include ansidecl.h any more.
-
-Fri Jun 18 03:22:10 1993 John Gilmore (gnu@cygnus.com)
-
- * oasys.h: Eliminate "int8_type", "int16_type", "int32_type", and
- their variants. These changes are coordinated with corresponding
- changes in ../bfd/oasys.c.
-
-Wed Jun 16 10:43:08 1993 Fred Fish (fnf@cygnus.com)
-
- * bfd.h: Note that it has been removed.
-
-Tue Jun 8 12:16:03 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
-
- Support for H8/300-H
- * dis-asm.h (print_insn_h8300, print_insn_h8300h): Declare it.
-
-Tue Jun 1 07:35:03 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
-
- * ansidecl.h (const): Don't define it if it's already defined.
-
-Thu May 27 18:19:51 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * dis-asm.h (print_insn_hppa): Declare it.
-
- * bfd.h: Moved to bfd directory. Small stub here includes it
- without requiring "-I../bfd".
-
-Thu Apr 29 12:06:13 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
-
- * bfd.h: Updated with BSF_FUNCTION.
-
-Mon Apr 26 18:15:50 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * bfd.h, dis-asm.h: Updated with Hitachi SH.
-
-Fri Apr 23 18:41:38 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * bfd.h: Updated with alpha changes.
- * dis-asm.h: Added alpha.
-
-Fri Apr 16 17:35:30 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * bfd.h: Update for signed bfd_*get_*.
-
-Thu Apr 15 09:24:21 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * bfd.h: Updated for file_truncated error.
-
-Thu Apr 8 10:53:47 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ansidecl.h: If no ANSI, define const to be empty.
-
-Thu Apr 1 09:00:10 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * dis-asm.h: Declare a29k and i960 print_insn_*.
-
- * dis-asm.h: Add print_address_func and related stuff.
-
- * dis-asm.h (dis_asm_read_memory): Fix prototype.
-
-Wed Mar 31 17:40:16 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * dis-asm.h: Add print_insn_sparc.
-
-Wed Mar 31 17:51:42 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * bfd.h: Updated for BFD_RELOC_MIPS_GPREL and bfd_[gs]et_gp_size
- prototypes.
-
-Wed Mar 31 16:35:12 1993 Stu Grossman (grossman@cygnus.com)
-
- * dis-asm.h: (disassemble_info): Fix typo in prototype of
- dis_asm_memory_error().
-
-Tue Mar 30 19:09:23 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * dis-asm.h (disassembler_info): Add read_memory_func,
- memory_error_func, buffer, and length.
- ({GDB_,}INIT_DISASSEMBLE_INFO): Set them.
- print_insn_*: Remove second argument.
-
-Tue Mar 30 14:48:55 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * bfd.h: Update for lma field of section.
-
-Tue Mar 30 12:22:55 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * ansidecl.h: Use ANSI versions on AIX regardless of __STDC__.
-
-Fri Mar 19 14:49:49 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * dis-asm.h: Add h8500.
-
-Thu Mar 18 13:49:09 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * ieee-float.h: Moved from ../gdb.
- * dis-asm.h: New file. Interface to dis-assembler.
-
-Thu Mar 11 10:52:57 1993 Fred Fish (fnf@cygnus.com)
-
- * demangle.h (DMGL_NO_OPTS): Add define (set to 0) to use
- in place of bare 0, for readability reasons.
-
-Tue Mar 2 17:50:11 1993 Fred Fish (fnf@cygnus.com)
-
- * demangle.h: Replace all references to cfront with ARM.
-
-Tue Feb 23 12:21:14 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * bfd.h: Update for new elements in JUMP_TABLE.
-
-Tue Feb 16 00:51:30 1993 John Gilmore (gnu@cygnus.com)
-
- * bfd.h: Update for BFD_VERSION 2.1.
-
-Tue Jan 26 11:49:20 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * bfd.h: Update for SEC_IS_COMMON flag.
-
-Tue Jan 19 12:25:12 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfd.h: Update for bfd_asymbol_value bug fix.
-
-Fri Jan 8 16:37:18 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * bfd.h: Update to include ECOFF tdata and target_flavour.
-
-Sun Dec 27 17:52:30 1992 Fred Fish (fnf@cygnus.com)
-
- * bfd.h: Add declaration for bfd_get_size().
-
-Tue Dec 22 22:42:46 1992 Fred Fish (fnf@cygnus.com)
-
- * demangle.h: Protect file from multiple inclusions with
- #if !defined(DEMANGLE_H)...#define DEMANGLE_H...#endif.
-
-Mon Dec 21 21:25:50 1992 Stu Grossman (grossman at cygnus.com)
-
- * bfd.h: Update to get hppa_core_struct from bfd.c.
-
-Thu Dec 17 00:42:35 1992 John Gilmore (gnu@cygnus.com)
-
- * bfd.h: Update to get tekhex tdata name change from bfd.
-
-Mon Nov 9 23:55:42 1992 John Gilmore (gnu@cygnus.com)
-
- * ansidecl.h: Update comments to discourage use of EXFUN.
-
-Thu Nov 5 16:35:44 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * bfd.h: Update to bring in SEC_SHARED_LIBRARY.
-
-Thu Nov 5 03:21:32 1992 John Gilmore (gnu@cygnus.com)
-
- * bfd.h: Update to match EXFUN, bfd_seclet_struct, and SDEF
- cleanups in bfd.
-
-Wed Nov 4 07:28:05 1992 Ken Raeburn (raeburn@cygnus.com)
-
- * bout.h (N_CALLNAME, N_BALNAME): Define as char-type values, so
- widening works consistently.
-
-Fri Oct 16 03:17:08 1992 John Gilmore (gnu@cygnus.com)
-
- * getopt.h: Update to Revised Standard FSF Version.
-
-Thu Oct 15 21:43:22 1992 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * getopt.h (struct option): use the provided enum for has_arg.
-
- * demangle.h (AUTO_DEMANGLING, GNU_DEMANGLING,
- LUCID_DEMANGLING): ultrix compilers require enums to be
- enums and ints to be ints and casts where they meet. cast some
- enums into ints.
-
-Thu Oct 15 04:35:51 1992 John Gilmore (gnu@cygnus.com)
-
- * bfd.h: Update after comment changes.
-
-Thu Oct 8 09:03:02 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * bfd.h (bfd_get_symbol_leading_char): new macro for getting in xvec
-
-Thu Sep 3 09:10:50 1992 Stu Grossman (grossman at cygnus.com)
-
- * bfd.h (struct reloc_howto_struct): size needs to be signed if
- it's going to hold negative values.
-
-Sun Aug 30 17:50:27 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * demangle.h: New file, moved from ../gdb. Made independent
- of gdb. Allow demangling style option to be passed as a
- parameter to cplus_demangle(), but using the
- current_demangling_style global as the default.
-
-Sat Aug 29 10:07:55 1992 Fred Fish (fnf@cygnus.com)
-
- * obstack.h: Merge comment change from current FSF version.
-
-Thu Aug 27 12:59:29 1992 Brendan Kehoe (brendan@cygnus.com)
-
- * bfd.h: add we32k
-
-Tue Aug 25 15:07:47 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * bfd.h: new after Z8000 stuff
-
-Mon Aug 17 09:01:23 1992 Ken Raeburn (raeburn@cygnus.com)
-
- * bfd.h: Regenerated after page/segment size changes.
-
-Sat Aug 1 13:46:31 1992 Fred Fish (fnf@cygnus.com)
-
- * obstack.h: Merge changes from current FSF version.
-
-Mon Jul 20 21:06:23 1992 Fred Fish (fnf@cygnus.com)
-
- * obstack.h (area_id, flags): Remove, replace with extra_arg,
- use_extra_arg, and maybe_empty_object.
- * obstack.h (OBSTACK_MAYBE_EMPTY_OBJECT, OBSTACK_MMALLOC_LIKE):
- Remove, replaced by maybe_empty_object and use_extra_arg bitfields.
- * obstack.h (obstack_full_begin, _obstack_begin): Remove area_id
- and flags arguments.
- * obstack.h (obstack_alloc_arg): New macro to set extra_arg.
-
-Thu Jul 16 08:12:44 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * bfd.h: new after adding BFD_IS_RELAXABLE
-
-Sat Jul 4 03:22:23 1992 John Gilmore (gnu at cygnus.com)
-
- * bfd.h: Regen after adding BSF_FILE.
-
-Mon Jun 29 14:18:36 1992 Fred Fish (fnf at sunfish)
-
- * obstack.h: Convert bcopy() use to memcpy(), which is more
- portable, more standard, and can take advantage of gcc's builtin
- functions for increased performance.
-
-Thu Jun 25 04:46:08 1992 John Gilmore (gnu at cygnus.com)
-
- * ansidecl.h (PARAMS): Incorporate this macro from gdb's defs.h.
- It's a cleaner way to forward-declare function prototypes.
-
-Fri Jun 19 15:46:32 1992 Stu Grossman (grossman at cygnus.com)
-
- * bfd.h: HPPA merge.
-
-Tue Jun 16 21:30:56 1992 K. Richard Pixley (rich@cygnus.com)
-
- * getopt.h: gratuitous white space changes merged from other prep
- releases.
-
-Thu Jun 11 01:10:55 1992 John Gilmore (gnu at cygnus.com)
-
- * bfd.h: Regen'd from bfd.c after removing elf_core_tdata_struct.
-
-Mon May 18 17:29:03 1992 K. Richard Pixley (rich@cygnus.com)
-
- * getopt.h: merged changes from make-3.62.11.
-
- * getopt.h: merged changes from grep-1.6 (alpha).
-
-Fri May 8 14:53:32 1992 K. Richard Pixley (rich@cygnus.com)
-
- * getopt.h: merged changes from bison-1.18.
-
-Sat Mar 14 17:25:20 1992 Fred Fish (fnf@cygnus.com)
-
- * obstack.h: Add "area_id" and "flags" members to obstack
- structure. Add obstack_chunkfun() and obstack_freefun() to
- set functions explicitly. Convert maybe_empty_object to
- a bit in "flags".
-
-Thu Feb 27 22:01:02 1992 Per Bothner (bothner@cygnus.com)
-
- * wait.h (WIFSTOPPED): Add IBM rs6000-specific version.
-
-Fri Feb 21 20:49:20 1992 John Gilmore (gnu at cygnus.com)
-
- * obstack.h: Add obstack_full_begin.
- * bfd.h, obstack.h: Protolint.
-
-Thu Jan 30 01:18:42 1992 John Gilmore (gnu at cygnus.com)
-
- * bfd.h: Remove comma from enum declaration.
-
-Mon Jan 27 22:01:13 1992 Steve Chamberlain (sac at cygnus.com)
-
- * bfd.h : new target entr, bfd_relax_section
-
-Wed Dec 18 17:19:44 1991 Stu Grossman (grossman at cygnus.com)
-
- * bfd.h, ieee.h: ANSIfy enums.
-
-Thu Dec 12 20:59:56 1991 John Gilmore (gnu at cygnus.com)
-
- * fopen-same.h, fopen-bin.h: New files for configuring
- whether fopen distinguishes binary files or not. For use
- by host-dependent config files.
-
-Sat Nov 30 20:46:43 1991 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * bfd.h: change the documentation format.
-
- * created coff, elf and opcode and aout directories. Moved:
-
- aout64.h ==> aout/aout64.h
- ar.h ==> aout/ar.h
- a.out.encap.h ==> aout/encap.h
- a.out.host.h ==> aout/host.h
- a.out.hp.h ==> aout/hp.h
- a.out.sun4.h ==> aout/sun4.h
- ranlib.h ==> aout/ranlib.h
- reloc.h ==> aout/reloc.h
- stab.def ==> aout/stab.def
- stab.gnu.h ==> aout/stab_gnu.h
-
- coff-a29k.h ==> coff/a29k.h
- coff-h8300.h ==> coff/h8300.h
- coff-i386.h ==> coff/i386.h
- coff-i960.h ==> coff/i960.h
- internalcoff.h ==> coff/internal.h
- coff-m68k.h ==> coff/m68k.h
- coff-m88k.h ==> coff/m88k.h
- coff-mips.h ==> coff/mips.h
- coff-rs6000.h ==> coff/rs6000.h
-
- elf-common.h ==> elf/common.h
- dwarf.h ==> elf/dwarf.h
- elf-external.h ==> elf/external.h
- elf-internal.h ==> elf/internal.h
-
- a29k-opcode.h ==> opcode/a29k.h
- arm-opcode.h ==> opcode/arm.h
- h8300-opcode.h ==> opcode/h8300.h
- i386-opcode.h ==> opcode/i386.h
- i860-opcode.h ==> opcode/i860.h
- i960-opcode.h ==> opcode/i960.h
- m68k-opcode.h ==> opcode/m68k.h
- m88k-opcode.h ==> opcode/m88k.h
- mips-opcode.h ==> opcode/mips.h
- np1-opcode.h ==> opcode/np1.h
- ns32k-opcode.h ==> opcode/ns32k.h
- pn-opcode.h ==> opcode/pn.h
- pyr-opcode.h ==> opcode/pyr.h
- sparc-opcode.h ==> opcode/sparc.h
- tahoe-opcode.h ==> opcode/tahoe.h
- vax-opcode.h ==> opcode/vax.h
-
-
-
-Wed Nov 27 10:38:31 1991 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * internalcoff.h: (internal_scnhdr) took out #def dependency, now
- s_nreloc and s_nlnno are always long. (internal_reloc): allways
- has an offset field now.
-
-Fri Nov 22 08:12:58 1991 John Gilmore (gnu at cygnus.com)
-
- * coff-rs6000.h: Lint; use unsigned chars for external fields.
- * internalcoff.h: Lint; cast storage classes to signed char.
-
-Thu Nov 21 21:01:05 1991 Per Bothner (bothner at cygnus.com)
-
- * stab.def: Remove the GNU extended type codes (e.g. N_SETT).
- * aout64.h: The heuristic for distinguishing between
- sunos-style and bsd-style ZMAGIC files (wrt. where the
- text segment starts) is moved into (the default definition of)
- the macro N_HEADER_IN_TEXT. This definition is only used
- if no other definition is used - e.g. bfd/newsos3.c defines
- N_HEADER_IN_TEXT(x) to be always 0 (as before).
-
-Thu Nov 21 11:53:03 1991 John Gilmore (gnu at cygnus.com)
-
- * aout64.h (N_TXTADDR, N_TXTOFF, N_TXTSIZE): New definitions
- that should handle all uses. LOGICAL_ versions deleted.
- Eliminate N_HEADER_IN_TEXT, using a_entry to determine which
- kind of zmagic a.out file we are looking at.
- * coff-rs6000.h: Typo.
-
-Tue Nov 19 18:43:37 1991 Per Bothner (bothner at cygnus.com)
-
- (Note: This is a revised entry, as was aout64.h.)
- * aout64.h: Some cleanups of N_TXTADDR and N_TXTOFF:
- Will now work for both old- and new-style ZMAGIC files,
- depending on N_HEADER_IN_TEXT macro.
- Add LOGICAL_TXTADDR, LOICAL_TXTOFF and LOGICAL_TXTSIZE
- that don't count the exec header as part
- of the text segment, to be consistent with bfd.
- * a.out.sun4.h: Simplified/fixed for previous change.
-
-Mon Nov 18 00:02:06 1991 Fred Fish (fnf at cygnus.com)
-
- * dwarf.h: Update to DWARF draft 5 version from gcc2.
-
-Thu Nov 14 19:44:59 1991 Per Bothner (bothner at cygnus.com)
-
- * stab.def: Added defs for extended GNU symbol types,
- such as N_SETT. These are normally ifdef'd out (because
- of conflicts with a.out.gnu.h), but are used by bfb_stab_name().
-
-Thu Nov 14 19:17:03 1991 Fred Fish (fnf at cygnus.com)
-
- * elf-common.h: Add defines to support ELF symbol table code.
-
-Mon Nov 11 19:01:06 1991 Fred Fish (fnf at cygnus.com)
-
- * elf-internal.h, elf-external.h, elf-common.h: Add support for
- note sections, which are used in ELF core files to hold copies
- of various /proc structures.
-
-Thu Nov 7 08:58:26 1991 Steve Chamberlain (sac at cygnus.com)
-
- * internalcoff.h: took out the M88 dependency in the lineno
- struct.
- * coff-m88k.h: defines GET_LINENO_LNNO and PUT_LINENO_LNNO to use
- 32bit linno entries.
- * a29k-opcode.h: fixed encoding of mtacc
-
-Sun Nov 3 11:54:22 1991 Per Bothner (bothner at cygnus.com)
-
- * bfd.h: Updated from ../bfd/bfd-in.h (q.v).
-
-Fri Nov 1 11:13:53 1991 John Gilmore (gnu at cygnus.com)
-
- * internalcoff.h: Add x_csect defines.
-
-Fri Oct 25 03:18:20 1991 John Gilmore (gnu at cygnus.com)
-
- * Rename COFF-related files in `coff-ARCH.h' form.
- coff-a29k.h, coff-i386.h, coff-i960.h, coff-m68k.h, coff-m88k.h,
- coff-mips.h, coff-rs6000.h to be exact.
-
-Thu Oct 24 22:11:11 1991 John Gilmore (gnu at cygnus.com)
-
- RS/6000 support, by Metin G. Ozisik, Mimi Phûông-Thåo Võ, and
- John Gilmore.
-
- * a.out.gnu.h: Update slightly.
- * bfd.h: Add new error code, fix doc, add bfd_arch_rs6000.
- * internalcoff.h: Add more F_ codes for filehdr. Add
- rs/6000-dependent fields to aouthdr. Add storage classes
- to syments. Add 6000-specific auxent. Add r_size in reloc.
- * rs6000coff.c: New file.
-
-Thu Oct 24 04:13:20 1991 Fred Fish (fnf at cygnus.com)
-
- * dwarf.h: New file for dwarf support. Copied from gcc2
- distribution.
-
-Wed Oct 16 13:31:45 1991 John Gilmore (gnu at cygnus.com)
-
- * aout64.h: Remove PAGE_SIZE defines; they are target-dependent.
- Add N_FN_SEQ for N_FN symbol type used on Sequent machines.
- * stab.def: Include N_FN_SEQ in table.
- * bout.h: External formats of structures use unsigned chars.
-
-Fri Oct 11 12:40:43 1991 Steve Chamberlain (steve at cygnus.com)
-
- * bfd.h:upgrade from bfd.c
- * internalcoff.h: add n_name, n_zeroes and n_offset macros
- * amdcoff.h: Define OMAGIC and AOUTHDRSZ.
-
-Fri Oct 11 10:58:06 1991 Per Bothner (bothner at cygnus.com)
-
- * a.out.host.h: Change SEGMENT_SIZE to 0x1000 for Sony.
- * bfd.h (align_power): Add (actually move) comment.
-
-Tue Oct 8 15:29:32 1991 Per Bothner (bothner at cygnus.com)
-
- * sys/h-rtbsd.h: Define MISSING_VFPRINT (for binutils/bucomm.c).
-
-Sun Oct 6 19:24:39 1991 John Gilmore (gnu at cygnus.com)
-
- * aout64.h: Move struct internal_exec to ../bfd/libaout.h so
- it can be shared by all `a.out-family' code. Rename
- EXTERNAL_LIST_SIZE to EXTERNAL_NLIST_SIZE. Use basic types
- for nlist members, and make strx integral rather than pointer.
- More commentary on n_type values.
- * bout.h: Provide a struct external_exec rather than an
- internal_exec.
- * m68kcoff.h: Remove `tagentries' which snuck in from the i960
- COFF port.
-
-Fri Oct 4 01:25:59 1991 John Gilmore (gnu at cygnus.com)
-
- * h8300-opcode.h: Remove `_enum' from the typedef for an enum.
- * bfd.h: Update to match bfd changes.
-
- * sys/h-i386mach.h, sysdep.h: Add 386 Mach host support.
-
-Tue Oct 1 04:58:42 1991 John Gilmore (gnu at cygnus.com)
-
- * bfd.h, elf-common.h, elf-external.h, elf-internal.h:
- Add preliminary ELF support, sufficient for GDB, from Fred Fish.
- * sysdep.h, sys/h-amix.h: Support Amiga SVR4.
-
- * sys/h-vaxult.h: Make it work. (David Taylor <taylor@think.com>)
- * a.out.vax.h: Remove unused and confusing file.
-
-Mon Sep 30 12:52:35 1991 Per Bothner (bothner at cygnus.com)
-
- * sysdep.h: Define NEWSOS3_SYS, and use it.
-
-Fri Sep 20 13:38:21 1991 John Gilmore (gnu at cygnus.com)
-
- * a.out.gnu.h (N_FN): Its value *really is* 0x1F.
- Fix it, and add comments warning about or-ing N_EXT with it
- and/or N_WARNING.
- * aout64.h (N_FN): Fix value, add comments about N_EXT.
- * stab.def (table at end): Update to show all the type
- values <0x20, including low order bits. Move N_FN to
- its rightful place.
-
-Tue Sep 17 17:41:37 1991 Stu Grossman (grossman at cygnus.com)
-
- * sys/h-irix3.h: sgi/irix support.
-
-Tue Sep 17 07:52:59 1991 John Gilmore (gnu at cygint.cygnus.com)
-
- * stab.def (N_DEFD): Add GNU Modula-2 debug stab, from Andrew
- Beers.
-
-Thu Sep 12 14:12:59 1991 John Gilmore (gnu at cygint.cygnus.com)
-
- * internalcoff.h (SYMNMLEN, FILNMLEN, DIMNUM): Define these
- for internalcoff, separately from the various external coff's.
- * amdcoff.h, bcs88kcoff.h, i386coff.h, intel-coff.h, m68kcoff.h,
- m88k-bcs.h: Prefix SYMNMLEN, FILNMLEN, and DIMNUM with E_'s for
- the external struct definitions.
- * ecoff.h: Remove these #define's, kludge no longer needed.
-
- * sys/h-ultra3.h: Add new Ultracomputer host.
- * sysdep.h: Add ULTRA3_SYM1_SYS and use it.
-
-Tue Sep 10 10:11:46 1991 John Gilmore (gnu at cygint.cygnus.com)
-
- * i386coff.h (LINESZ): Always 6, not based on sizeof().
- (Fix from Peter Schauer <pes@regent.e-technik.tu-muenchen.de>.)
-
-Wed Sep 4 08:58:37 1991 John Gilmore (gnu at cygint.cygnus.com)
-
- * a.out.gnu.h, aout64.h: Add N_WARNING. Change N_FN to 0x0E,
- to match SunOS and BSD. Add N_COMM as 0x12 for SunOS shared lib
- support.
- * stab.def: Add N_COMM to table, fix overlap comment.
-
-Tue Sep 3 06:29:20 1991 John Gilmore (gnu at cygint.cygnus.com)
-
- Merge with latest FSF versions of these files.
-
- * stab.gnu.h: Add LAST_UNUSED_STAB_CODE.
- * stab.def: Update to GPL2. Move N_WARNING out, since not a
- debug symbol. Change comments, and reorder table to numeric
- order. Update final table comment.
- (N_DSLINE, N_BSLINE): Renumber from 0x66 and 0x68, to 0x46 and 0x48.
-
- * obstack.h: GPL2. Merge.
-
-Fri Aug 23 01:54:23 1991 John Gilmore (gnu at cygint.cygnus.com)
-
- * a.out.gnu.h, a.out.sun4.h: Make SEGMENT_SIZE able to depend
- on the particular a.out being examined.
- * a.out.sun4.h: Define segment sizes for Sun-3's and Sun-4's.
- * FIXME: a.out.gnu.h is almost obsolete.
- * FIXME: a.out.sun4.h should be renamed a.out.sun.h now.
-
-Wed Aug 21 20:32:13 1991 John Gilmore (gnu at cygint.cygnus.com)
-
- * Start a ChangeLog for the includes directory.
-
- * a.out.gnu.h (N_FN): Fix value -- was 15, should be 0x1E.
- * stab.def: Update allocation table in comments at end,
- to reflect reality as I know it.
-
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff --git a/include/MAINTAINERS b/include/MAINTAINERS
deleted file mode 100644
index d59a3bd..0000000
--- a/include/MAINTAINERS
+++ /dev/null
@@ -1 +0,0 @@
-See ../binutils/MAINTAINERS
diff --git a/include/alloca-conf.h b/include/alloca-conf.h
deleted file mode 100644
index 9c3eea3..0000000
--- a/include/alloca-conf.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#include "config.h"
-
-#if defined(__GNUC__) && !defined(C_ALLOCA)
-# ifndef alloca
-# define alloca __builtin_alloca
-# endif
-#else /* ! defined (__GNUC__) */
-# ifdef _AIX
- #pragma alloca
-# else
-# if defined(HAVE_ALLOCA_H) && !defined(C_ALLOCA)
-# include <alloca.h>
-# else /* ! defined (HAVE_ALLOCA_H) */
-# ifdef __STDC__
-extern PTR alloca (size_t);
-# else /* ! defined (__STDC__) */
-extern PTR alloca ();
-# endif /* ! defined (__STDC__) */
-# endif /* ! defined (HAVE_ALLOCA_H) */
-# ifdef _WIN32
-# include <malloc.h>
-# endif
-# endif /* ! defined (_AIX) */
-#endif /* ! defined (__GNUC__) */
diff --git a/include/ansidecl.h b/include/ansidecl.h
deleted file mode 100644
index c19955a..0000000
--- a/include/ansidecl.h
+++ /dev/null
@@ -1,393 +0,0 @@
-/* ANSI and traditional C compatability macros
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* ANSI and traditional C compatibility macros
-
- ANSI C is assumed if __STDC__ is #defined.
-
- Macro ANSI C definition Traditional C definition
- ----- ---- - ---------- ----------- - ----------
- ANSI_PROTOTYPES 1 not defined
- PTR `void *' `char *'
- PTRCONST `void *const' `char *'
- LONG_DOUBLE `long double' `double'
- const not defined `'
- volatile not defined `'
- signed not defined `'
- VA_START(ap, var) va_start(ap, var) va_start(ap)
-
- Note that it is safe to write "void foo();" indicating a function
- with no return value, in all K+R compilers we have been able to test.
-
- For declaring functions with prototypes, we also provide these:
-
- PARAMS ((prototype))
- -- for functions which take a fixed number of arguments. Use this
- when declaring the function. When defining the function, write a
- K+R style argument list. For example:
-
- char *strcpy PARAMS ((char *dest, char *source));
- ...
- char *
- strcpy (dest, source)
- char *dest;
- char *source;
- { ... }
-
-
- VPARAMS ((prototype, ...))
- -- for functions which take a variable number of arguments. Use
- PARAMS to declare the function, VPARAMS to define it. For example:
-
- int printf PARAMS ((const char *format, ...));
- ...
- int
- printf VPARAMS ((const char *format, ...))
- {
- ...
- }
-
- For writing functions which take variable numbers of arguments, we
- also provide the VA_OPEN, VA_CLOSE, and VA_FIXEDARG macros. These
- hide the differences between K+R <varargs.h> and C89 <stdarg.h> more
- thoroughly than the simple VA_START() macro mentioned above.
-
- VA_OPEN and VA_CLOSE are used *instead of* va_start and va_end.
- Immediately after VA_OPEN, put a sequence of VA_FIXEDARG calls
- corresponding to the list of fixed arguments. Then use va_arg
- normally to get the variable arguments, or pass your va_list object
- around. You do not declare the va_list yourself; VA_OPEN does it
- for you.
-
- Here is a complete example:
-
- int
- printf VPARAMS ((const char *format, ...))
- {
- int result;
-
- VA_OPEN (ap, format);
- VA_FIXEDARG (ap, const char *, format);
-
- result = vfprintf (stdout, format, ap);
- VA_CLOSE (ap);
-
- return result;
- }
-
-
- You can declare variables either before or after the VA_OPEN,
- VA_FIXEDARG sequence. Also, VA_OPEN and VA_CLOSE are the beginning
- and end of a block. They must appear at the same nesting level,
- and any variables declared after VA_OPEN go out of scope at
- VA_CLOSE. Unfortunately, with a K+R compiler, that includes the
- argument list. You can have multiple instances of VA_OPEN/VA_CLOSE
- pairs in a single function in case you need to traverse the
- argument list more than once.
-
- For ease of writing code which uses GCC extensions but needs to be
- portable to other compilers, we provide the GCC_VERSION macro that
- simplifies testing __GNUC__ and __GNUC_MINOR__ together, and various
- wrappers around __attribute__. Also, __extension__ will be #defined
- to nothing if it doesn't work. See below.
-
- This header also defines a lot of obsolete macros:
- CONST, VOLATILE, SIGNED, PROTO, EXFUN, DEFUN, DEFUN_VOID,
- AND, DOTS, NOARGS. Don't use them. */
-
-#ifndef _ANSIDECL_H
-#define _ANSIDECL_H 1
-
-/* Every source file includes this file,
- so they will all get the switch for lint. */
-/* LINTLIBRARY */
-
-/* Using MACRO(x,y) in cpp #if conditionals does not work with some
- older preprocessors. Thus we can't define something like this:
-
-#define HAVE_GCC_VERSION(MAJOR, MINOR) \
- (__GNUC__ > (MAJOR) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR)))
-
-and then test "#if HAVE_GCC_VERSION(2,7)".
-
-So instead we use the macro below and test it against specific values. */
-
-/* This macro simplifies testing whether we are using gcc, and if it
- is of a particular minimum version. (Both major & minor numbers are
- significant.) This macro will evaluate to 0 if we are not using
- gcc at all. */
-#ifndef GCC_VERSION
-#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
-#endif /* GCC_VERSION */
-
-#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32) || (defined(__alpha) && defined(__cplusplus))
-/* All known AIX compilers implement these things (but don't always
- define __STDC__). The RISC/OS MIPS compiler defines these things
- in SVR4 mode, but does not define __STDC__. */
-/* eraxxon@alumni.rice.edu: The Compaq C++ compiler, unlike many other
- C++ compilers, does not define __STDC__, though it acts as if this
- was so. (Verified versions: 5.7, 6.2, 6.3, 6.5) */
-
-#define ANSI_PROTOTYPES 1
-#define PTR void *
-#define PTRCONST void *const
-#define LONG_DOUBLE long double
-
-/* PARAMS is often defined elsewhere (e.g. by libintl.h), so wrap it in
- a #ifndef. */
-#ifndef PARAMS
-#define PARAMS(ARGS) ARGS
-#endif
-
-#define VPARAMS(ARGS) ARGS
-#define VA_START(VA_LIST, VAR) va_start(VA_LIST, VAR)
-
-/* variadic function helper macros */
-/* "struct Qdmy" swallows the semicolon after VA_OPEN/VA_FIXEDARG's
- use without inhibiting further decls and without declaring an
- actual variable. */
-#define VA_OPEN(AP, VAR) { va_list AP; va_start(AP, VAR); { struct Qdmy
-#define VA_CLOSE(AP) } va_end(AP); }
-#define VA_FIXEDARG(AP, T, N) struct Qdmy
-
-#undef const
-#undef volatile
-#undef signed
-
-/* inline requires special treatment; it's in C99, and GCC >=2.7 supports
- it too, but it's not in C89. */
-#undef inline
-#if __STDC_VERSION__ > 199901L
-/* it's a keyword */
-#else
-# if GCC_VERSION >= 2007
-# define inline __inline__ /* __inline__ prevents -pedantic warnings */
-# else
-# define inline /* nothing */
-# endif
-#endif
-
-/* These are obsolete. Do not use. */
-#ifndef IN_GCC
-#define CONST const
-#define VOLATILE volatile
-#define SIGNED signed
-
-#define PROTO(type, name, arglist) type name arglist
-#define EXFUN(name, proto) name proto
-#define DEFUN(name, arglist, args) name(args)
-#define DEFUN_VOID(name) name(void)
-#define AND ,
-#define DOTS , ...
-#define NOARGS void
-#endif /* ! IN_GCC */
-
-#else /* Not ANSI C. */
-
-#undef ANSI_PROTOTYPES
-#define PTR char *
-#define PTRCONST PTR
-#define LONG_DOUBLE double
-
-#define PARAMS(args) ()
-#define VPARAMS(args) (va_alist) va_dcl
-#define VA_START(va_list, var) va_start(va_list)
-
-#define VA_OPEN(AP, VAR) { va_list AP; va_start(AP); { struct Qdmy
-#define VA_CLOSE(AP) } va_end(AP); }
-#define VA_FIXEDARG(AP, TYPE, NAME) TYPE NAME = va_arg(AP, TYPE)
-
-/* some systems define these in header files for non-ansi mode */
-#undef const
-#undef volatile
-#undef signed
-#undef inline
-#define const
-#define volatile
-#define signed
-#define inline
-
-#ifndef IN_GCC
-#define CONST
-#define VOLATILE
-#define SIGNED
-
-#define PROTO(type, name, arglist) type name ()
-#define EXFUN(name, proto) name()
-#define DEFUN(name, arglist, args) name arglist args;
-#define DEFUN_VOID(name) name()
-#define AND ;
-#define DOTS
-#define NOARGS
-#endif /* ! IN_GCC */
-
-#endif /* ANSI C. */
-
-/* Define macros for some gcc attributes. This permits us to use the
- macros freely, and know that they will come into play for the
- version of gcc in which they are supported. */
-
-#if (GCC_VERSION < 2007)
-# define __attribute__(x)
-#endif
-
-/* Attribute __malloc__ on functions was valid as of gcc 2.96. */
-#ifndef ATTRIBUTE_MALLOC
-# if (GCC_VERSION >= 2096)
-# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
-# else
-# define ATTRIBUTE_MALLOC
-# endif /* GNUC >= 2.96 */
-#endif /* ATTRIBUTE_MALLOC */
-
-/* Attributes on labels were valid as of gcc 2.93. */
-#ifndef ATTRIBUTE_UNUSED_LABEL
-# if (!defined (__cplusplus) && GCC_VERSION >= 2093)
-# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED
-# else
-# define ATTRIBUTE_UNUSED_LABEL
-# endif /* !__cplusplus && GNUC >= 2.93 */
-#endif /* ATTRIBUTE_UNUSED_LABEL */
-
-#ifndef ATTRIBUTE_UNUSED
-#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
-#endif /* ATTRIBUTE_UNUSED */
-
-/* Before GCC 3.4, the C++ frontend couldn't parse attributes placed after the
- identifier name. */
-#if ! defined(__cplusplus) || (GCC_VERSION >= 3004)
-# define ARG_UNUSED(NAME) NAME ATTRIBUTE_UNUSED
-#else /* !__cplusplus || GNUC >= 3.4 */
-# define ARG_UNUSED(NAME) NAME
-#endif /* !__cplusplus || GNUC >= 3.4 */
-
-#ifndef ATTRIBUTE_NORETURN
-#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
-#endif /* ATTRIBUTE_NORETURN */
-
-/* Attribute `nonnull' was valid as of gcc 3.3. */
-#ifndef ATTRIBUTE_NONNULL
-# if (GCC_VERSION >= 3003)
-# define ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m)))
-# else
-# define ATTRIBUTE_NONNULL(m)
-# endif /* GNUC >= 3.3 */
-#endif /* ATTRIBUTE_NONNULL */
-
-/* Attribute `pure' was valid as of gcc 3.0. */
-#ifndef ATTRIBUTE_PURE
-# if (GCC_VERSION >= 3000)
-# define ATTRIBUTE_PURE __attribute__ ((__pure__))
-# else
-# define ATTRIBUTE_PURE
-# endif /* GNUC >= 3.0 */
-#endif /* ATTRIBUTE_PURE */
-
-/* Use ATTRIBUTE_PRINTF when the format specifier must not be NULL.
- This was the case for the `printf' format attribute by itself
- before GCC 3.3, but as of 3.3 we need to add the `nonnull'
- attribute to retain this behavior. */
-#ifndef ATTRIBUTE_PRINTF
-#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) ATTRIBUTE_NONNULL(m)
-#define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
-#define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
-#define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
-#define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5)
-#define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
-#endif /* ATTRIBUTE_PRINTF */
-
-/* Use ATTRIBUTE_FPTR_PRINTF when the format attribute is to be set on
- a function pointer. Format attributes were allowed on function
- pointers as of gcc 3.1. */
-#ifndef ATTRIBUTE_FPTR_PRINTF
-# if (GCC_VERSION >= 3001)
-# define ATTRIBUTE_FPTR_PRINTF(m, n) ATTRIBUTE_PRINTF(m, n)
-# else
-# define ATTRIBUTE_FPTR_PRINTF(m, n)
-# endif /* GNUC >= 3.1 */
-# define ATTRIBUTE_FPTR_PRINTF_1 ATTRIBUTE_FPTR_PRINTF(1, 2)
-# define ATTRIBUTE_FPTR_PRINTF_2 ATTRIBUTE_FPTR_PRINTF(2, 3)
-# define ATTRIBUTE_FPTR_PRINTF_3 ATTRIBUTE_FPTR_PRINTF(3, 4)
-# define ATTRIBUTE_FPTR_PRINTF_4 ATTRIBUTE_FPTR_PRINTF(4, 5)
-# define ATTRIBUTE_FPTR_PRINTF_5 ATTRIBUTE_FPTR_PRINTF(5, 6)
-#endif /* ATTRIBUTE_FPTR_PRINTF */
-
-/* Use ATTRIBUTE_NULL_PRINTF when the format specifier may be NULL. A
- NULL format specifier was allowed as of gcc 3.3. */
-#ifndef ATTRIBUTE_NULL_PRINTF
-# if (GCC_VERSION >= 3003)
-# define ATTRIBUTE_NULL_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
-# else
-# define ATTRIBUTE_NULL_PRINTF(m, n)
-# endif /* GNUC >= 3.3 */
-# define ATTRIBUTE_NULL_PRINTF_1 ATTRIBUTE_NULL_PRINTF(1, 2)
-# define ATTRIBUTE_NULL_PRINTF_2 ATTRIBUTE_NULL_PRINTF(2, 3)
-# define ATTRIBUTE_NULL_PRINTF_3 ATTRIBUTE_NULL_PRINTF(3, 4)
-# define ATTRIBUTE_NULL_PRINTF_4 ATTRIBUTE_NULL_PRINTF(4, 5)
-# define ATTRIBUTE_NULL_PRINTF_5 ATTRIBUTE_NULL_PRINTF(5, 6)
-#endif /* ATTRIBUTE_NULL_PRINTF */
-
-/* Attribute `sentinel' was valid as of gcc 3.5. */
-#ifndef ATTRIBUTE_SENTINEL
-# if (GCC_VERSION >= 3005)
-# define ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__))
-# else
-# define ATTRIBUTE_SENTINEL
-# endif /* GNUC >= 3.5 */
-#endif /* ATTRIBUTE_SENTINEL */
-
-
-#ifndef ATTRIBUTE_ALIGNED_ALIGNOF
-# if (GCC_VERSION >= 3000)
-# define ATTRIBUTE_ALIGNED_ALIGNOF(m) __attribute__ ((__aligned__ (__alignof__ (m))))
-# else
-# define ATTRIBUTE_ALIGNED_ALIGNOF(m)
-# endif /* GNUC >= 3.0 */
-#endif /* ATTRIBUTE_ALIGNED_ALIGNOF */
-
-/* Useful for structures whose layout must much some binary specification
- regardless of the alignment and padding qualities of the compiler. */
-#ifndef ATTRIBUTE_PACKED
-# define ATTRIBUTE_PACKED __attribute__ ((packed))
-#endif
-
-/* Attribute `hot' and `cold' was valid as of gcc 4.3. */
-#ifndef ATTRIBUTE_COLD
-# if (GCC_VERSION >= 4003)
-# define ATTRIBUTE_COLD __attribute__ ((__cold__))
-# else
-# define ATTRIBUTE_COLD
-# endif /* GNUC >= 4.3 */
-#endif /* ATTRIBUTE_COLD */
-#ifndef ATTRIBUTE_HOT
-# if (GCC_VERSION >= 4003)
-# define ATTRIBUTE_HOT __attribute__ ((__hot__))
-# else
-# define ATTRIBUTE_HOT
-# endif /* GNUC >= 4.3 */
-#endif /* ATTRIBUTE_HOT */
-
-/* We use __extension__ in some places to suppress -pedantic warnings
- about GCC extensions. This feature didn't work properly before
- gcc 2.8. */
-#if GCC_VERSION < 2008
-#define __extension__
-#endif
-
-#endif /* ansidecl.h */
diff --git a/include/aout/ChangeLog b/include/aout/ChangeLog
deleted file mode 100644
index 493b215..0000000
--- a/include/aout/ChangeLog
+++ /dev/null
@@ -1,231 +0,0 @@
-2008-08-28 Tristan Gingold <gingold@adacore.com>
-
- * stab.def: Add BNSYM, ENSYM, OSO for darwin.
-
-2008-03-27 Cary Coutant <ccoutant@google.com>
-
- * ar.h (ARMAGT): New magic string for thin archives.
-
-2005-08-18 Alan Modra <amodra@bigpond.net.au>
-
- * encap.h: Remove a29k support.
-
-2005-05-10 Nick Clifton <nickc@redhat.com>
-
- * Update the address and phone number of the FSF organization in
- the GPL notices in the following files:
- adobe.h, aout64.h, ar.h, dynix3.h, encap.h, host.h, hp.h,
- ranlib.h, reloc.h, stab.def, stab_gnu.h, sun4.h
-
-2004-01-06 Mark Kettenis <kettenis@gnu.org>
-
- * stab.def: Add N_PATCH to DO definition.
-
-2003-03-06 Elias Athanasopoulos <elathan@phys.uoa.gr>
-
- * aout64.h (BYTES_IN_WORD): Define if necessary.
-
-2001-09-18 Alan Modra <amodra@bigpond.net.au>
-
- * aout64.h: Formatting fixes.
- (N_TXTADDR): Evaluate to a bfd_vma.
- (N_DATADDR): Avoid negative unsigned warning.
- * hp300hpux.h: Formatting fixes.
- (N_DATADDR): Avoid negative unsigned warning.
-
-2000-04-03 Hans-Peter Nilsson <hp@axis.com>
-
- * aout64.h (RELOC_EXT_BITS_EXTERN_BIG): Wrap definition in #ifndef.
- (RELOC_EXT_BITS_EXTERN_LITTLE): Ditto.
- (RELOC_EXT_BITS_TYPE_BIG): Ditto.
- (RELOC_EXT_BITS_TYPE_SH_BIG): Ditto.
- (RELOC_EXT_BITS_TYPE_LITTLE): Ditto.
- (RELOC_EXT_BITS_TYPE_SH_LITTLE): Ditto.
-
-1999-07-12 Ian Lance Taylor <ian@zembu.com>
-
- * aout64.h (N_SHARED_LIB): Define as 0 if TEXT_START_ADDR is
- defined as 0.
-
-1998-06-28 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
-
- * stab.def: Add N_ALIAS from SunPro F77.
-
-1996-03-11 Ian Lance Taylor <ian@cygnus.com>
-
- * stab.def: Use __define_stab_duplicate rather than __define_stab
- for duplicate entries N_BROWS and N_MOD2.
- * stab_gnu.h (__define_stab_duplicate): Define before including
- stab.def.
-
-1995-10-27 Niklas Hallqvist <niklas@appli.se>
-
- * aout64.h, host.h, hp300hpux.h, sun4.h: Changed PAGE_SIZE to
- TARGET_PAGE_SIZE.
-
-1995-09-12 Ian Lance Taylor <ian@cygnus.com>
-
- * sun4.h (struct internal_sun4_dynamic_link): Change all fields
- from long to unsigned long.
-
-1995-07-12 Ken Raeburn <raeburn@kr-pc.cygnus.com>
-
- * sun4.h (PAGE_SIZE): Undefine before defining.
-
-1994-09-04 Richard Earnshaw (rwe@pegasus.esprit.ec.org)
-
- * aout64.h: Only define QMAGIC if it isn't already defined.
-
-1994-06-16 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * aout64.h (BMAGIC): Define.
-
-1994-06-11 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- Add weak symbols as an extension to a.out.
- * aout64.h (N_WEAKU, N_WEAKA, N_WEAKT, N_WEAKD, N_WEAKB): Define.
- * stab.def: Update symbol value table.
-
-1994-06-02 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * sun4.h (EXTERNAL_SUN4_DYNAMIC_DEBUGGER_SIZE): Correct from 28 to
- 24. Fix up ld_got comment.
-
-1994-03-30 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * dynix3.h: Cleanup, adapt to current bfd version.
-
-1994-02-26 Ian Lance Taylor (ian@cygnus.com)
-
- * aout64.h: Add casts to avoid warnings from SVR4 cc.
-
-1994-02-11 Stan Shebs (shebs@andros.cygnus.com)
-
- * ar.h (ARMAG, ARMAGB, ARFMAG): Change '\n' to '\012', for greater
- portability.
-
-1994-01-21 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * sun4.h: Added information about SunOS shared libraries.
-
-1994-01-07 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * aout64.h (N_TXTADDR): Add comment regarding OMAGIC and NMAGIC.
-
-1993-12-25 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * aout64.h (N_DATOFF): Don't pad (revert change of 8 Jul 1993).
-
-1993-11-16 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * aout64.h: New macros ZMAGIC_DISK_BLOCK_SIZE and N_DISK_BLOCK_SIZE
- for Linux ZMAGIC.
- (N_TXTOFF, N_DATOFF): Use them.
-
-1993-11-04 Ken Raeburn (raeburn@kr-pc.cygnus.com)
-
- * aout64.h (RELOC_STD_BITS_RELATIVE_LITTLE): Fixed value to match
- sun3 system; used to overlap other fields.
- (RELOC_STD_BITS_JMPTABLE_LITTLE): Likewise.
-
-1993-11-03 David J. Mackenzie (djm@thepub.cygnus.com)
-
- * aout64.h (RELOC_STD_BITS_BASEREL_LITTLE): Make it 0x10 (Ken's
- suggestion) to avoid conflict with RELOC_STD_BITS_EXTERN_LITTLE.
-
-1993-10-29 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * hp300hpux.h (N_SHARED_LIB): Define to be 0.
-
-1993-09-13 John Gilmore (gnu@cygnus.com)
-
- * ar.h (ARMAP_TIME_OFFSET): Add and describe.
-
-Mon Aug 23 Sean Fagan (sef@cygnus.com)
-
- * aout64.h [ARCH_SIZE != 64]: Allow N_BADMAG to be overridden.
-
-1993-08-16 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * stab_gnu.h: Include aout/stab.def not just stab.def.
-
-1993-07-18 Jim Kingdon (kingdon@rtl.cygnus.com)
-
- * dynix3.h: New, for symmetry running dynix.
-
-1993-07-08 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * aout64.h (N_BADMAG): Recognize QMAGIC.
- N_TXTOFF, N_TXTADDR, N_TXTSIZE: Special code for QMAGIC.
- N_DATOFF: Pad text size if we need to.
-
-1993-06-18 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * stab.def (N_ECOML): Fix comment.
-
-1993-05-31 Jim Kingdon (kingdon@cygnus.com)
-
- * stab.def: Remove Solaris information on N_FUN stabstring grammar;
- I've transferred it to gdb/doc/stabs.texinfo, where it belongs.
-
-1993-05-10 Ken Raeburn (raeburn@kr-pc.cygnus.com)
-
- * hp300hpux.h: Patch from Glenn Engel for linker problem and
- compatibility fix:
- (OMAGIC, NMAGIC): New definitions.
- (SHAREMAGIC): Deleted.
- (HPUX_DOT_O_MAGIC): New macro.
- (_N_BADMAG): Adjusted.
- (N_HEADER_IN_TEXT, N_DATADDR): New macros.
-
-1993-04-29 Ken Raeburn (raeburn@deneb.cygnus.com)
-
- * hp300hpux.h: New file from Glenn Engel, glenne@lsid.hp.com.
-
-1993-04-27 Ken Raeburn (raeburn@kr-pc.cygnus.com)
-
- * aout64.h (struct external_exec, *MAGIC, N_BADMAG): Don't define
- if `external_exec' is already defined as a macro.
- (N_DATOFF, N_TRELOFF, N_DRELOFF, N_SYMOFF, N_STROFF): Don't define
- if already defined.
- (struct external_nlist, EXTERNAL_NLIST_SIZE): Don't define if
- `external_nlist' is already defined as a macro.
-
-1992-08-15 John Gilmore (gnu@cygnus.com)
-
- * adobe.h: Add description of a.out.adobe format.
-
-1992-07-03 John Gilmore (gnu at cygnus.com)
-
- * stab.def: Update more Solaris definitions.
- * stab_gnu.h: Add N_SO language types, and Solaris basic float types.
-
-1992-06-14 John Gilmore (gnu at cygnus.com)
-
- * stab.def: Update descriptions of Solaris-2 stabs; add N_UNDF.
-
-1992-06-11 John Gilmore (gnu at cygnus.com)
-
- * stab.def: Add N_OBJ and N_OPT from Solaris-2.
-
-1992-01-30 John Gilmore (gnu at cygnus.com)
-
- * aout64.h: N_TXTSIZE needs some more parentheses.
- I don't trust C precedence.
-
-1991-12-18 Per Bothner (bothner at cygnus.com)
-
- * aout64.h: Move common sunos-specific test
- to recognize shared libraries into new macro N_SHARED_LIB.
- Use it to simplify & reformat N_TXTADDR, N_TXTOFF, N_TXTSIZE.
-
-1991-11-30 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * aout64.h, ar.h, encap.h, host.h, hp.h, ranlib.h, reloc.h,
- stab.def, stab_gnu.h, sun4.h: All moved from the devo/include
- directory.
-
-
-Local Variables:
-version-control: never
-End:
diff --git a/include/aout/adobe.h b/include/aout/adobe.h
deleted file mode 100644
index 2e81240..0000000
--- a/include/aout/adobe.h
+++ /dev/null
@@ -1,313 +0,0 @@
-/* `a.out.adobe' differences from standard a.out files
-
- Copyright 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef __A_OUT_ADOBE_H__
-#define __A_OUT_ADOBE_H__
-
-#define BYTES_IN_WORD 4
-
-/* Struct external_exec is the same. */
-
-/* This is the layout on disk of the 32-bit or 64-bit exec header. */
-
-struct external_exec
-{
- bfd_byte e_info[4]; /* magic number and stuff */
- bfd_byte e_text[BYTES_IN_WORD]; /* length of text section in bytes */
- bfd_byte e_data[BYTES_IN_WORD]; /* length of data section in bytes */
- bfd_byte e_bss[BYTES_IN_WORD]; /* length of bss area in bytes */
- bfd_byte e_syms[BYTES_IN_WORD]; /* length of symbol table in bytes */
- bfd_byte e_entry[BYTES_IN_WORD]; /* start address */
- bfd_byte e_trsize[BYTES_IN_WORD]; /* length of text relocation info */
- bfd_byte e_drsize[BYTES_IN_WORD]; /* length of data relocation info */
-};
-
-#define EXEC_BYTES_SIZE (4 + BYTES_IN_WORD * 7)
-
-/* Magic numbers for a.out files */
-
-#undef ZMAGIC
-#define ZMAGIC 0xAD0BE /* Cute, eh? */
-#undef OMAGIC
-#undef NMAGIC
-
-#define N_BADMAG(x) ((x).a_info != ZMAGIC)
-
-/* By default, segment size is constant. But some machines override this
- to be a function of the a.out header (e.g. machine type). */
-#ifndef N_SEGSIZE
-#define N_SEGSIZE(x) SEGMENT_SIZE
-#endif
-#undef N_SEGSIZE /* FIXMEXXXX */
-
-/* Segment information for the a.out.Adobe format is specified after the
- file header. It contains N segment descriptors, followed by one with
- a type of zero.
-
- The actual text of the segments starts at N_TXTOFF in the file,
- regardless of how many or how few segment headers there are. */
-
-struct external_segdesc {
- unsigned char e_type[1];
- unsigned char e_size[3];
- unsigned char e_virtbase[4];
- unsigned char e_filebase[4];
-};
-
-struct internal_segdesc {
- unsigned int a_type:8; /* Segment type N_TEXT, N_DATA, 0 */
- unsigned int a_size:24; /* Segment size */
- bfd_vma a_virtbase; /* Virtual address */
- unsigned int a_filebase; /* Base address in object file */
-};
-
-#define N_TXTADDR(x) \
-
-/* This is documented to be at 1024, but appears to really be at 2048.
- FIXME?! */
-#define N_TXTOFF(x) 2048
-
-#define N_TXTSIZE(x) ((x).a_text)
-
-#define N_DATADDR(x)
-
-#define N_BSSADDR(x)
-
-/* Offsets of the various portions of the file after the text segment. */
-
-#define N_DATOFF(x) ( N_TXTOFF(x) + N_TXTSIZE(x) )
-#define N_TRELOFF(x) ( N_DATOFF(x) + (x).a_data )
-#define N_DRELOFF(x) ( N_TRELOFF(x) + (x).a_trsize )
-#define N_SYMOFF(x) ( N_DRELOFF(x) + (x).a_drsize )
-#define N_STROFF(x) ( N_SYMOFF(x) + (x).a_syms )
-
-/* Symbols */
-struct external_nlist {
- bfd_byte e_strx[BYTES_IN_WORD]; /* index into string table of name */
- bfd_byte e_type[1]; /* type of symbol */
- bfd_byte e_other[1]; /* misc info (usually empty) */
- bfd_byte e_desc[2]; /* description field */
- bfd_byte e_value[BYTES_IN_WORD]; /* value of symbol */
-};
-
-#define EXTERNAL_NLIST_SIZE (BYTES_IN_WORD+4+BYTES_IN_WORD)
-
-struct internal_nlist {
- unsigned long n_strx; /* index into string table of name */
- unsigned char n_type; /* type of symbol */
- unsigned char n_other; /* misc info (usually empty) */
- unsigned short n_desc; /* description field */
- bfd_vma n_value; /* value of symbol */
-};
-
-/* The n_type field is the symbol type, containing: */
-
-#define N_UNDF 0 /* Undefined symbol */
-#define N_ABS 2 /* Absolute symbol -- defined at particular addr */
-#define N_TEXT 4 /* Text sym -- defined at offset in text seg */
-#define N_DATA 6 /* Data sym -- defined at offset in data seg */
-#define N_BSS 8 /* BSS sym -- defined at offset in zero'd seg */
-#define N_COMM 0x12 /* Common symbol (visible after shared lib dynlink) */
-#define N_FN 0x1f /* File name of .o file */
-#define N_FN_SEQ 0x0C /* N_FN from Sequent compilers (sigh) */
-/* Note: N_EXT can only be usefully OR-ed with N_UNDF, N_ABS, N_TEXT,
- N_DATA, or N_BSS. When the low-order bit of other types is set,
- (e.g. N_WARNING versus N_FN), they are two different types. */
-#define N_EXT 1 /* External symbol (as opposed to local-to-this-file) */
-#define N_TYPE 0x1e
-#define N_STAB 0xe0 /* If any of these bits are on, it's a debug symbol */
-
-#define N_INDR 0x0a
-
-/* The following symbols refer to set elements.
- All the N_SET[ATDB] symbols with the same name form one set.
- Space is allocated for the set in the text section, and each set
- elements value is stored into one word of the space.
- The first word of the space is the length of the set (number of elements).
-
- The address of the set is made into an N_SETV symbol
- whose name is the same as the name of the set.
- This symbol acts like a N_DATA global symbol
- in that it can satisfy undefined external references. */
-
-/* These appear as input to LD, in a .o file. */
-#define N_SETA 0x14 /* Absolute set element symbol */
-#define N_SETT 0x16 /* Text set element symbol */
-#define N_SETD 0x18 /* Data set element symbol */
-#define N_SETB 0x1A /* Bss set element symbol */
-
-/* This is output from LD. */
-#define N_SETV 0x1C /* Pointer to set vector in data area. */
-
-/* Warning symbol. The text gives a warning message, the next symbol
- in the table will be undefined. When the symbol is referenced, the
- message is printed. */
-
-#define N_WARNING 0x1e
-
-/* Relocations
-
- There are two types of relocation flavours for a.out systems,
- standard and extended. The standard form is used on systems where the
- instruction has room for all the bits of an offset to the operand, whilst
- the extended form is used when an address operand has to be split over n
- instructions. Eg, on the 68k, each move instruction can reference
- the target with a displacement of 16 or 32 bits. On the sparc, move
- instructions use an offset of 14 bits, so the offset is stored in
- the reloc field, and the data in the section is ignored.
-*/
-
-/* This structure describes a single relocation to be performed.
- The text-relocation section of the file is a vector of these structures,
- all of which apply to the text section.
- Likewise, the data-relocation section applies to the data section. */
-
-struct reloc_std_external {
- bfd_byte r_address[BYTES_IN_WORD]; /* offset of of data to relocate */
- bfd_byte r_index[3]; /* symbol table index of symbol */
- bfd_byte r_type[1]; /* relocation type */
-};
-
-#define RELOC_STD_BITS_PCREL_BIG 0x80
-#define RELOC_STD_BITS_PCREL_LITTLE 0x01
-
-#define RELOC_STD_BITS_LENGTH_BIG 0x60
-#define RELOC_STD_BITS_LENGTH_SH_BIG 5 /* To shift to units place */
-#define RELOC_STD_BITS_LENGTH_LITTLE 0x06
-#define RELOC_STD_BITS_LENGTH_SH_LITTLE 1
-
-#define RELOC_STD_BITS_EXTERN_BIG 0x10
-#define RELOC_STD_BITS_EXTERN_LITTLE 0x08
-
-#define RELOC_STD_BITS_BASEREL_BIG 0x08
-#define RELOC_STD_BITS_BASEREL_LITTLE 0x08
-
-#define RELOC_STD_BITS_JMPTABLE_BIG 0x04
-#define RELOC_STD_BITS_JMPTABLE_LITTLE 0x04
-
-#define RELOC_STD_BITS_RELATIVE_BIG 0x02
-#define RELOC_STD_BITS_RELATIVE_LITTLE 0x02
-
-#define RELOC_STD_SIZE (BYTES_IN_WORD + 3 + 1) /* Bytes per relocation entry */
-
-struct reloc_std_internal
-{
- bfd_vma r_address; /* Address (within segment) to be relocated. */
- /* The meaning of r_symbolnum depends on r_extern. */
- unsigned int r_symbolnum:24;
- /* Nonzero means value is a pc-relative offset
- and it should be relocated for changes in its own address
- as well as for changes in the symbol or section specified. */
- unsigned int r_pcrel:1;
- /* Length (as exponent of 2) of the field to be relocated.
- Thus, a value of 2 indicates 1<<2 bytes. */
- unsigned int r_length:2;
- /* 1 => relocate with value of symbol.
- r_symbolnum is the index of the symbol
- in files the symbol table.
- 0 => relocate with the address of a segment.
- r_symbolnum is N_TEXT, N_DATA, N_BSS or N_ABS
- (the N_EXT bit may be set also, but signifies nothing). */
- unsigned int r_extern:1;
- /* The next three bits are for SunOS shared libraries, and seem to
- be undocumented. */
- unsigned int r_baserel:1; /* Linkage table relative */
- unsigned int r_jmptable:1; /* pc-relative to jump table */
- unsigned int r_relative:1; /* "relative relocation" */
- /* unused */
- unsigned int r_pad:1; /* Padding -- set to zero */
-};
-
-
-/* EXTENDED RELOCS */
-
-struct reloc_ext_external {
- bfd_byte r_address[BYTES_IN_WORD]; /* offset of of data to relocate */
- bfd_byte r_index[3]; /* symbol table index of symbol */
- bfd_byte r_type[1]; /* relocation type */
- bfd_byte r_addend[BYTES_IN_WORD]; /* datum addend */
-};
-
-#define RELOC_EXT_BITS_EXTERN_BIG 0x80
-#define RELOC_EXT_BITS_EXTERN_LITTLE 0x01
-
-#define RELOC_EXT_BITS_TYPE_BIG 0x1F
-#define RELOC_EXT_BITS_TYPE_SH_BIG 0
-#define RELOC_EXT_BITS_TYPE_LITTLE 0xF8
-#define RELOC_EXT_BITS_TYPE_SH_LITTLE 3
-
-/* Bytes per relocation entry */
-#define RELOC_EXT_SIZE (BYTES_IN_WORD + 3 + 1 + BYTES_IN_WORD)
-
-enum reloc_type
-{
- /* simple relocations */
- RELOC_8, /* data[0:7] = addend + sv */
- RELOC_16, /* data[0:15] = addend + sv */
- RELOC_32, /* data[0:31] = addend + sv */
- /* pc-rel displacement */
- RELOC_DISP8, /* data[0:7] = addend - pc + sv */
- RELOC_DISP16, /* data[0:15] = addend - pc + sv */
- RELOC_DISP32, /* data[0:31] = addend - pc + sv */
- /* Special */
- RELOC_WDISP30, /* data[0:29] = (addend + sv - pc)>>2 */
- RELOC_WDISP22, /* data[0:21] = (addend + sv - pc)>>2 */
- RELOC_HI22, /* data[0:21] = (addend + sv)>>10 */
- RELOC_22, /* data[0:21] = (addend + sv) */
- RELOC_13, /* data[0:12] = (addend + sv) */
- RELOC_LO10, /* data[0:9] = (addend + sv) */
- RELOC_SFA_BASE,
- RELOC_SFA_OFF13,
- /* P.I.C. (base-relative) */
- RELOC_BASE10, /* Not sure - maybe we can do this the */
- RELOC_BASE13, /* right way now */
- RELOC_BASE22,
- /* for some sort of pc-rel P.I.C. (?) */
- RELOC_PC10,
- RELOC_PC22,
- /* P.I.C. jump table */
- RELOC_JMP_TBL,
- /* reputedly for shared libraries somehow */
- RELOC_SEGOFF16,
- RELOC_GLOB_DAT,
- RELOC_JMP_SLOT,
- RELOC_RELATIVE,
-
- RELOC_11,
- RELOC_WDISP2_14,
- RELOC_WDISP19,
- RELOC_HHI22, /* data[0:21] = (addend + sv) >> 42 */
- RELOC_HLO10, /* data[0:9] = (addend + sv) >> 32 */
-
- /* 29K relocation types */
- RELOC_JUMPTARG,
- RELOC_CONST,
- RELOC_CONSTH,
-
- NO_RELOC
- };
-
-
-struct reloc_internal {
- bfd_vma r_address; /* offset of of data to relocate */
- long r_index; /* symbol table index of symbol */
- enum reloc_type r_type; /* relocation type */
- bfd_vma r_addend; /* datum addend */
-};
-
-#endif /* __A_OUT_ADOBE_H__ */
diff --git a/include/aout/aout64.h b/include/aout/aout64.h
deleted file mode 100644
index 2e289b3..0000000
--- a/include/aout/aout64.h
+++ /dev/null
@@ -1,519 +0,0 @@
-/* `a.out' object-file definitions, including extensions to 64-bit fields
-
- Copyright 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef __A_OUT_64_H__
-#define __A_OUT_64_H__
-
-#ifndef BYTES_IN_WORD
-#define BYTES_IN_WORD 4
-#endif
-
-/* This is the layout on disk of the 32-bit or 64-bit exec header. */
-
-#ifndef external_exec
-struct external_exec
-{
- bfd_byte e_info[4]; /* Magic number and stuff. */
- bfd_byte e_text[BYTES_IN_WORD]; /* Length of text section in bytes. */
- bfd_byte e_data[BYTES_IN_WORD]; /* Length of data section in bytes. */
- bfd_byte e_bss[BYTES_IN_WORD]; /* Length of bss area in bytes. */
- bfd_byte e_syms[BYTES_IN_WORD]; /* Length of symbol table in bytes. */
- bfd_byte e_entry[BYTES_IN_WORD]; /* Start address. */
- bfd_byte e_trsize[BYTES_IN_WORD]; /* Length of text relocation info. */
- bfd_byte e_drsize[BYTES_IN_WORD]; /* Length of data relocation info. */
-};
-
-#define EXEC_BYTES_SIZE (4 + BYTES_IN_WORD * 7)
-
-/* Magic numbers for a.out files. */
-
-#if ARCH_SIZE==64
-#define OMAGIC 0x1001 /* Code indicating object file. */
-#define ZMAGIC 0x1002 /* Code indicating demand-paged executable. */
-#define NMAGIC 0x1003 /* Code indicating pure executable. */
-
-/* There is no 64-bit QMAGIC as far as I know. */
-
-#define N_BADMAG(x) (N_MAGIC(x) != OMAGIC \
- && N_MAGIC(x) != NMAGIC \
- && N_MAGIC(x) != ZMAGIC)
-#else
-#define OMAGIC 0407 /* Object file or impure executable. */
-#define NMAGIC 0410 /* Code indicating pure executable. */
-#define ZMAGIC 0413 /* Code indicating demand-paged executable. */
-#define BMAGIC 0415 /* Used by a b.out object. */
-
-/* This indicates a demand-paged executable with the header in the text.
- It is used by 386BSD (and variants) and Linux, at least. */
-#ifndef QMAGIC
-#define QMAGIC 0314
-#endif
-# ifndef N_BADMAG
-# define N_BADMAG(x) (N_MAGIC(x) != OMAGIC \
- && N_MAGIC(x) != NMAGIC \
- && N_MAGIC(x) != ZMAGIC \
- && N_MAGIC(x) != QMAGIC)
-# endif /* N_BADMAG */
-#endif
-
-#endif
-
-#ifdef QMAGIC
-#define N_IS_QMAGIC(x) (N_MAGIC (x) == QMAGIC)
-#else
-#define N_IS_QMAGIC(x) (0)
-#endif
-
-/* The difference between TARGET_PAGE_SIZE and N_SEGSIZE is that TARGET_PAGE_SIZE is
- the finest granularity at which you can page something, thus it
- controls the padding (if any) before the text segment of a ZMAGIC
- file. N_SEGSIZE is the resolution at which things can be marked as
- read-only versus read/write, so it controls the padding between the
- text segment and the data segment (in memory; on disk the padding
- between them is TARGET_PAGE_SIZE). TARGET_PAGE_SIZE and N_SEGSIZE are the same
- for most machines, but different for sun3. */
-
-/* By default, segment size is constant. But some machines override this
- to be a function of the a.out header (e.g. machine type). */
-
-#ifndef N_SEGSIZE
-#define N_SEGSIZE(x) SEGMENT_SIZE
-#endif
-
-/* Virtual memory address of the text section.
- This is getting very complicated. A good reason to discard a.out format
- for something that specifies these fields explicitly. But til then...
-
- * OMAGIC and NMAGIC files:
- (object files: text for "relocatable addr 0" right after the header)
- start at 0, offset is EXEC_BYTES_SIZE, size as stated.
- * The text address, offset, and size of ZMAGIC files depend
- on the entry point of the file:
- * entry point below TEXT_START_ADDR:
- (hack for SunOS shared libraries)
- start at 0, offset is 0, size as stated.
- * If N_HEADER_IN_TEXT(x) is true (which defaults to being the
- case when the entry point is EXEC_BYTES_SIZE or further into a page):
- no padding is needed; text can start after exec header. Sun
- considers the text segment of such files to include the exec header;
- for BFD's purposes, we don't, which makes more work for us.
- start at TEXT_START_ADDR + EXEC_BYTES_SIZE, offset is EXEC_BYTES_SIZE,
- size as stated minus EXEC_BYTES_SIZE.
- * If N_HEADER_IN_TEXT(x) is false (which defaults to being the case when
- the entry point is less than EXEC_BYTES_SIZE into a page (e.g. page
- aligned)): (padding is needed so that text can start at a page boundary)
- start at TEXT_START_ADDR, offset TARGET_PAGE_SIZE, size as stated.
-
- Specific configurations may want to hardwire N_HEADER_IN_TEXT,
- for efficiency or to allow people to play games with the entry point.
- In that case, you would #define N_HEADER_IN_TEXT(x) as 1 for sunos,
- and as 0 for most other hosts (Sony News, Vax Ultrix, etc).
- (Do this in the appropriate bfd target file.)
- (The default is a heuristic that will break if people try changing
- the entry point, perhaps with the ld -e flag.)
-
- * QMAGIC is always like a ZMAGIC for which N_HEADER_IN_TEXT is true,
- and for which the starting address is TARGET_PAGE_SIZE (or should this be
- SEGMENT_SIZE?) (TEXT_START_ADDR only applies to ZMAGIC, not to QMAGIC). */
-
-/* This macro is only relevant for ZMAGIC files; QMAGIC always has the header
- in the text. */
-#ifndef N_HEADER_IN_TEXT
-#define N_HEADER_IN_TEXT(x) \
- (((x).a_entry & (TARGET_PAGE_SIZE-1)) >= EXEC_BYTES_SIZE)
-#endif
-
-/* Sun shared libraries, not linux. This macro is only relevant for ZMAGIC
- files. */
-#ifndef N_SHARED_LIB
-#if defined (TEXT_START_ADDR) && TEXT_START_ADDR == 0
-#define N_SHARED_LIB(x) (0)
-#else
-#define N_SHARED_LIB(x) ((x).a_entry < TEXT_START_ADDR)
-#endif
-#endif
-
-/* Returning 0 not TEXT_START_ADDR for OMAGIC and NMAGIC is based on
- the assumption that we are dealing with a .o file, not an
- executable. This is necessary for OMAGIC (but means we don't work
- right on the output from ld -N); more questionable for NMAGIC. */
-
-#ifndef N_TXTADDR
-#define N_TXTADDR(x) \
- (/* The address of a QMAGIC file is always one page in, \
- with the header in the text. */ \
- N_IS_QMAGIC (x) \
- ? (bfd_vma) TARGET_PAGE_SIZE + EXEC_BYTES_SIZE \
- : (N_MAGIC (x) != ZMAGIC \
- ? (bfd_vma) 0 /* Object file or NMAGIC. */ \
- : (N_SHARED_LIB (x) \
- ? (bfd_vma) 0 \
- : (N_HEADER_IN_TEXT (x) \
- ? (bfd_vma) TEXT_START_ADDR + EXEC_BYTES_SIZE \
- : (bfd_vma) TEXT_START_ADDR))))
-#endif
-
-/* If N_HEADER_IN_TEXT is not true for ZMAGIC, there is some padding
- to make the text segment start at a certain boundary. For most
- systems, this boundary is TARGET_PAGE_SIZE. But for Linux, in the
- time-honored tradition of crazy ZMAGIC hacks, it is 1024 which is
- not what TARGET_PAGE_SIZE needs to be for QMAGIC. */
-
-#ifndef ZMAGIC_DISK_BLOCK_SIZE
-#define ZMAGIC_DISK_BLOCK_SIZE TARGET_PAGE_SIZE
-#endif
-
-#define N_DISK_BLOCK_SIZE(x) \
- (N_MAGIC(x) == ZMAGIC ? ZMAGIC_DISK_BLOCK_SIZE : TARGET_PAGE_SIZE)
-
-/* Offset in an a.out of the start of the text section. */
-#ifndef N_TXTOFF
-#define N_TXTOFF(x) \
- (/* For {O,N,Q}MAGIC, no padding. */ \
- N_MAGIC (x) != ZMAGIC \
- ? EXEC_BYTES_SIZE \
- : (N_SHARED_LIB (x) \
- ? 0 \
- : (N_HEADER_IN_TEXT (x) \
- ? EXEC_BYTES_SIZE /* No padding. */ \
- : ZMAGIC_DISK_BLOCK_SIZE /* A page of padding. */)))
-#endif
-/* Size of the text section. It's always as stated, except that we
- offset it to `undo' the adjustment to N_TXTADDR and N_TXTOFF
- for ZMAGIC files that nominally include the exec header
- as part of the first page of text. (BFD doesn't consider the
- exec header to be part of the text segment.) */
-#ifndef N_TXTSIZE
-#define N_TXTSIZE(x) \
- (/* For QMAGIC, we don't consider the header part of the text section. */\
- N_IS_QMAGIC (x) \
- ? (x).a_text - EXEC_BYTES_SIZE \
- : ((N_MAGIC (x) != ZMAGIC || N_SHARED_LIB (x)) \
- ? (x).a_text \
- : (N_HEADER_IN_TEXT (x) \
- ? (x).a_text - EXEC_BYTES_SIZE /* No padding. */ \
- : (x).a_text /* A page of padding. */ )))
-#endif
-/* The address of the data segment in virtual memory.
- It is the text segment address, plus text segment size, rounded
- up to a N_SEGSIZE boundary for pure or pageable files. */
-#ifndef N_DATADDR
-#define N_DATADDR(x) \
- (N_MAGIC (x) == OMAGIC \
- ? (N_TXTADDR (x) + N_TXTSIZE (x)) \
- : (N_SEGSIZE (x) + ((N_TXTADDR (x) + N_TXTSIZE (x) - 1) \
- & ~ (bfd_vma) (N_SEGSIZE (x) - 1))))
-#endif
-/* The address of the BSS segment -- immediately after the data segment. */
-
-#define N_BSSADDR(x) (N_DATADDR (x) + (x).a_data)
-
-/* Offsets of the various portions of the file after the text segment. */
-
-/* For {Q,Z}MAGIC, there is padding to make the data segment start on
- a page boundary. Most of the time the a_text field (and thus
- N_TXTSIZE) already contains this padding. It is possible that for
- BSDI and/or 386BSD it sometimes doesn't contain the padding, and
- perhaps we should be adding it here. But this seems kind of
- questionable and probably should be BSDI/386BSD-specific if we do
- do it.
-
- For NMAGIC (at least for hp300 BSD, probably others), there is
- padding in memory only, not on disk, so we must *not* ever pad here
- for NMAGIC. */
-
-#ifndef N_DATOFF
-#define N_DATOFF(x) (N_TXTOFF (x) + N_TXTSIZE (x))
-#endif
-#ifndef N_TRELOFF
-#define N_TRELOFF(x) (N_DATOFF (x) + (x).a_data)
-#endif
-#ifndef N_DRELOFF
-#define N_DRELOFF(x) (N_TRELOFF (x) + (x).a_trsize)
-#endif
-#ifndef N_SYMOFF
-#define N_SYMOFF(x) (N_DRELOFF (x) + (x).a_drsize)
-#endif
-#ifndef N_STROFF
-#define N_STROFF(x) (N_SYMOFF (x) + (x).a_syms)
-#endif
-
-/* Symbols */
-#ifndef external_nlist
-struct external_nlist
-{
- bfd_byte e_strx[BYTES_IN_WORD]; /* Index into string table of name. */
- bfd_byte e_type[1]; /* Type of symbol. */
- bfd_byte e_other[1]; /* Misc info (usually empty). */
- bfd_byte e_desc[2]; /* Description field. */
- bfd_byte e_value[BYTES_IN_WORD]; /* Value of symbol. */
-};
-#define EXTERNAL_NLIST_SIZE (BYTES_IN_WORD+4+BYTES_IN_WORD)
-#endif
-
-struct internal_nlist
-{
- unsigned long n_strx; /* Index into string table of name. */
- unsigned char n_type; /* Type of symbol. */
- unsigned char n_other; /* Misc info (usually empty). */
- unsigned short n_desc; /* Description field. */
- bfd_vma n_value; /* Value of symbol. */
-};
-
-/* The n_type field is the symbol type, containing: */
-
-#define N_UNDF 0 /* Undefined symbol. */
-#define N_ABS 2 /* Absolute symbol -- defined at particular addr. */
-#define N_TEXT 4 /* Text sym -- defined at offset in text seg. */
-#define N_DATA 6 /* Data sym -- defined at offset in data seg. */
-#define N_BSS 8 /* BSS sym -- defined at offset in zero'd seg. */
-#define N_COMM 0x12 /* Common symbol (visible after shared lib dynlink). */
-#define N_FN 0x1f /* File name of .o file. */
-#define N_FN_SEQ 0x0C /* N_FN from Sequent compilers (sigh). */
-/* Note: N_EXT can only be usefully OR-ed with N_UNDF, N_ABS, N_TEXT,
- N_DATA, or N_BSS. When the low-order bit of other types is set,
- (e.g. N_WARNING versus N_FN), they are two different types. */
-#define N_EXT 1 /* External symbol (as opposed to local-to-this-file). */
-#define N_TYPE 0x1e
-#define N_STAB 0xe0 /* If any of these bits are on, it's a debug symbol. */
-
-#define N_INDR 0x0a
-
-/* The following symbols refer to set elements.
- All the N_SET[ATDB] symbols with the same name form one set.
- Space is allocated for the set in the text section, and each set
- elements value is stored into one word of the space.
- The first word of the space is the length of the set (number of elements).
-
- The address of the set is made into an N_SETV symbol
- whose name is the same as the name of the set.
- This symbol acts like a N_DATA global symbol
- in that it can satisfy undefined external references. */
-
-/* These appear as input to LD, in a .o file. */
-#define N_SETA 0x14 /* Absolute set element symbol. */
-#define N_SETT 0x16 /* Text set element symbol. */
-#define N_SETD 0x18 /* Data set element symbol. */
-#define N_SETB 0x1A /* Bss set element symbol. */
-
-/* This is output from LD. */
-#define N_SETV 0x1C /* Pointer to set vector in data area. */
-
-/* Warning symbol. The text gives a warning message, the next symbol
- in the table will be undefined. When the symbol is referenced, the
- message is printed. */
-
-#define N_WARNING 0x1e
-
-/* Weak symbols. These are a GNU extension to the a.out format. The
- semantics are those of ELF weak symbols. Weak symbols are always
- externally visible. The N_WEAK? values are squeezed into the
- available slots. The value of a N_WEAKU symbol is 0. The values
- of the other types are the definitions. */
-#define N_WEAKU 0x0d /* Weak undefined symbol. */
-#define N_WEAKA 0x0e /* Weak absolute symbol. */
-#define N_WEAKT 0x0f /* Weak text symbol. */
-#define N_WEAKD 0x10 /* Weak data symbol. */
-#define N_WEAKB 0x11 /* Weak bss symbol. */
-
-/* Relocations
-
- There are two types of relocation flavours for a.out systems,
- standard and extended. The standard form is used on systems where the
- instruction has room for all the bits of an offset to the operand, whilst
- the extended form is used when an address operand has to be split over n
- instructions. Eg, on the 68k, each move instruction can reference
- the target with a displacement of 16 or 32 bits. On the sparc, move
- instructions use an offset of 14 bits, so the offset is stored in
- the reloc field, and the data in the section is ignored. */
-
-/* This structure describes a single relocation to be performed.
- The text-relocation section of the file is a vector of these structures,
- all of which apply to the text section.
- Likewise, the data-relocation section applies to the data section. */
-
-struct reloc_std_external
-{
- bfd_byte r_address[BYTES_IN_WORD]; /* Offset of of data to relocate. */
- bfd_byte r_index[3]; /* Symbol table index of symbol. */
- bfd_byte r_type[1]; /* Relocation type. */
-};
-
-#define RELOC_STD_BITS_PCREL_BIG ((unsigned int) 0x80)
-#define RELOC_STD_BITS_PCREL_LITTLE ((unsigned int) 0x01)
-
-#define RELOC_STD_BITS_LENGTH_BIG ((unsigned int) 0x60)
-#define RELOC_STD_BITS_LENGTH_SH_BIG 5
-#define RELOC_STD_BITS_LENGTH_LITTLE ((unsigned int) 0x06)
-#define RELOC_STD_BITS_LENGTH_SH_LITTLE 1
-
-#define RELOC_STD_BITS_EXTERN_BIG ((unsigned int) 0x10)
-#define RELOC_STD_BITS_EXTERN_LITTLE ((unsigned int) 0x08)
-
-#define RELOC_STD_BITS_BASEREL_BIG ((unsigned int) 0x08)
-#define RELOC_STD_BITS_BASEREL_LITTLE ((unsigned int) 0x10)
-
-#define RELOC_STD_BITS_JMPTABLE_BIG ((unsigned int) 0x04)
-#define RELOC_STD_BITS_JMPTABLE_LITTLE ((unsigned int) 0x20)
-
-#define RELOC_STD_BITS_RELATIVE_BIG ((unsigned int) 0x02)
-#define RELOC_STD_BITS_RELATIVE_LITTLE ((unsigned int) 0x40)
-
-#define RELOC_STD_SIZE (BYTES_IN_WORD + 3 + 1) /* Bytes per relocation entry. */
-
-struct reloc_std_internal
-{
- bfd_vma r_address; /* Address (within segment) to be relocated. */
- /* The meaning of r_symbolnum depends on r_extern. */
- unsigned int r_symbolnum:24;
- /* Nonzero means value is a pc-relative offset
- and it should be relocated for changes in its own address
- as well as for changes in the symbol or section specified. */
- unsigned int r_pcrel:1;
- /* Length (as exponent of 2) of the field to be relocated.
- Thus, a value of 2 indicates 1<<2 bytes. */
- unsigned int r_length:2;
- /* 1 => relocate with value of symbol.
- r_symbolnum is the index of the symbol
- in files the symbol table.
- 0 => relocate with the address of a segment.
- r_symbolnum is N_TEXT, N_DATA, N_BSS or N_ABS
- (the N_EXT bit may be set also, but signifies nothing). */
- unsigned int r_extern:1;
- /* The next three bits are for SunOS shared libraries, and seem to
- be undocumented. */
- unsigned int r_baserel:1; /* Linkage table relative. */
- unsigned int r_jmptable:1; /* pc-relative to jump table. */
- unsigned int r_relative:1; /* "relative relocation". */
- /* unused */
- unsigned int r_pad:1; /* Padding -- set to zero. */
-};
-
-
-/* EXTENDED RELOCS. */
-
-struct reloc_ext_external
-{
- bfd_byte r_address[BYTES_IN_WORD]; /* Offset of of data to relocate. */
- bfd_byte r_index[3]; /* Symbol table index of symbol. */
- bfd_byte r_type[1]; /* Relocation type. */
- bfd_byte r_addend[BYTES_IN_WORD]; /* Datum addend. */
-};
-
-#ifndef RELOC_EXT_BITS_EXTERN_BIG
-#define RELOC_EXT_BITS_EXTERN_BIG ((unsigned int) 0x80)
-#endif
-
-#ifndef RELOC_EXT_BITS_EXTERN_LITTLE
-#define RELOC_EXT_BITS_EXTERN_LITTLE ((unsigned int) 0x01)
-#endif
-
-#ifndef RELOC_EXT_BITS_TYPE_BIG
-#define RELOC_EXT_BITS_TYPE_BIG ((unsigned int) 0x1F)
-#endif
-
-#ifndef RELOC_EXT_BITS_TYPE_SH_BIG
-#define RELOC_EXT_BITS_TYPE_SH_BIG 0
-#endif
-
-#ifndef RELOC_EXT_BITS_TYPE_LITTLE
-#define RELOC_EXT_BITS_TYPE_LITTLE ((unsigned int) 0xF8)
-#endif
-
-#ifndef RELOC_EXT_BITS_TYPE_SH_LITTLE
-#define RELOC_EXT_BITS_TYPE_SH_LITTLE 3
-#endif
-
-/* Bytes per relocation entry. */
-#define RELOC_EXT_SIZE (BYTES_IN_WORD + 3 + 1 + BYTES_IN_WORD)
-
-enum reloc_type
-{
- /* Simple relocations. */
- RELOC_8, /* data[0:7] = addend + sv */
- RELOC_16, /* data[0:15] = addend + sv */
- RELOC_32, /* data[0:31] = addend + sv */
- /* PC-rel displacement. */
- RELOC_DISP8, /* data[0:7] = addend - pc + sv */
- RELOC_DISP16, /* data[0:15] = addend - pc + sv */
- RELOC_DISP32, /* data[0:31] = addend - pc + sv */
- /* Special. */
- RELOC_WDISP30, /* data[0:29] = (addend + sv - pc)>>2 */
- RELOC_WDISP22, /* data[0:21] = (addend + sv - pc)>>2 */
- RELOC_HI22, /* data[0:21] = (addend + sv)>>10 */
- RELOC_22, /* data[0:21] = (addend + sv) */
- RELOC_13, /* data[0:12] = (addend + sv) */
- RELOC_LO10, /* data[0:9] = (addend + sv) */
- RELOC_SFA_BASE,
- RELOC_SFA_OFF13,
- /* P.I.C. (base-relative). */
- RELOC_BASE10, /* Not sure - maybe we can do this the */
- RELOC_BASE13, /* right way now */
- RELOC_BASE22,
- /* For some sort of pc-rel P.I.C. (?) */
- RELOC_PC10,
- RELOC_PC22,
- /* P.I.C. jump table. */
- RELOC_JMP_TBL,
- /* Reputedly for shared libraries somehow. */
- RELOC_SEGOFF16,
- RELOC_GLOB_DAT,
- RELOC_JMP_SLOT,
- RELOC_RELATIVE,
-
- RELOC_11,
- RELOC_WDISP2_14,
- RELOC_WDISP19,
- RELOC_HHI22, /* data[0:21] = (addend + sv) >> 42 */
- RELOC_HLO10, /* data[0:9] = (addend + sv) >> 32 */
-
- /* 29K relocation types. */
- RELOC_JUMPTARG,
- RELOC_CONST,
- RELOC_CONSTH,
-
- /* All the new ones I can think of, for sparc v9. */
- RELOC_64, /* data[0:63] = addend + sv */
- RELOC_DISP64, /* data[0:63] = addend - pc + sv */
- RELOC_WDISP21, /* data[0:20] = (addend + sv - pc)>>2 */
- RELOC_DISP21, /* data[0:20] = addend - pc + sv */
- RELOC_DISP14, /* data[0:13] = addend - pc + sv */
- /* Q .
- What are the other ones,
- Since this is a clean slate, can we throw away the ones we dont
- understand ? Should we sort the values ? What about using a
- microcode format like the 68k ? */
- NO_RELOC
- };
-
-
-struct reloc_internal
-{
- bfd_vma r_address; /* Offset of of data to relocate. */
- long r_index; /* Symbol table index of symbol. */
- enum reloc_type r_type; /* Relocation type. */
- bfd_vma r_addend; /* Datum addend. */
-};
-
-/* Q.
- Should the length of the string table be 4 bytes or 8 bytes ?
-
- Q.
- What about archive indexes ? */
-
-#endif /* __A_OUT_64_H__ */
diff --git a/include/aout/ar.h b/include/aout/ar.h
deleted file mode 100644
index 7b77997..0000000
--- a/include/aout/ar.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* archive file definition for GNU software
-
- Copyright 2001, 2008 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* So far this is correct for BSDish archives. Don't forget that
- files must begin on an even byte boundary. */
-
-#ifndef __GNU_AR_H__
-#define __GNU_AR_H__
-
-/* Note that the usual '\n' in magic strings may translate to different
- characters, as allowed by ANSI. '\012' has a fixed value, and remains
- compatible with existing BSDish archives. */
-
-#define ARMAG "!<arch>\012" /* For COFF and a.out archives. */
-#define ARMAGB "!<bout>\012" /* For b.out archives. */
-#define ARMAGT "!<thin>\012" /* For thin archives. */
-#define SARMAG 8
-#define ARFMAG "`\012"
-
-/* The ar_date field of the armap (__.SYMDEF) member of an archive
- must be greater than the modified date of the entire file, or
- BSD-derived linkers complain. We originally write the ar_date with
- this offset from the real file's mod-time. After finishing the
- file, we rewrite ar_date if it's not still greater than the mod date. */
-
-#define ARMAP_TIME_OFFSET 60
-
-struct ar_hdr
-{
- char ar_name[16]; /* Name of this member. */
- char ar_date[12]; /* File mtime. */
- char ar_uid[6]; /* Owner uid; printed as decimal. */
- char ar_gid[6]; /* Owner gid; printed as decimal. */
- char ar_mode[8]; /* File mode, printed as octal. */
- char ar_size[10]; /* File size, printed as decimal. */
- char ar_fmag[2]; /* Should contain ARFMAG. */
-};
-
-#endif /* __GNU_AR_H__ */
diff --git a/include/aout/dynix3.h b/include/aout/dynix3.h
deleted file mode 100644
index e7c5110..0000000
--- a/include/aout/dynix3.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* a.out specifics for Sequent Symmetry running Dynix 3.x
-
- Copyright 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef A_OUT_DYNIX3_H
-#define A_OUT_DYNIX3_H
-
-#define external_exec dynix_external_exec
-
-/* struct exec for Dynix 3
-
- a_gdtbl and a_bootstrap are only for standalone binaries.
- Shared data fields are not supported by the kernel as of Dynix 3.1,
- but are supported by Dynix compiler programs. */
-struct dynix_external_exec
- {
- unsigned char e_info[4];
- unsigned char e_text[4];
- unsigned char e_data[4];
- unsigned char e_bss[4];
- unsigned char e_syms[4];
- unsigned char e_entry[4];
- unsigned char e_trsize[4];
- unsigned char e_drsize[4];
- unsigned char e_g_code[8];
- unsigned char e_g_data[8];
- unsigned char e_g_desc[8];
- unsigned char e_shdata[4];
- unsigned char e_shbss[4];
- unsigned char e_shdrsize[4];
- unsigned char e_bootstrap[44];
- unsigned char e_reserved[12];
- unsigned char e_version[4];
- };
-
-#define EXEC_BYTES_SIZE (128)
-
-/* All executables under Dynix are demand paged with read-only text,
- Thus no NMAGIC.
-
- ZMAGIC has a page of 0s at virtual 0,
- XMAGIC has an invalid page at virtual 0. */
-#define OMAGIC 0x12eb /* .o */
-#define ZMAGIC 0x22eb /* zero @ 0, demand load */
-#define XMAGIC 0x32eb /* invalid @ 0, demand load */
-#define SMAGIC 0x42eb /* standalone, not supported here */
-
-#define N_BADMAG(x) ((OMAGIC != N_MAGIC(x)) && \
- (ZMAGIC != N_MAGIC(x)) && \
- (XMAGIC != N_MAGIC(x)) && \
- (SMAGIC != N_MAGIC(x)))
-
-#define N_ADDRADJ(x) ((ZMAGIC == N_MAGIC(x) || XMAGIC == N_MAGIC(x)) ? 0x1000 : 0)
-
-#define N_TXTOFF(x) (EXEC_BYTES_SIZE)
-#define N_DATOFF(x) (N_TXTOFF(x) + N_TXTSIZE(x))
-#define N_SHDATOFF(x) (N_DATOFF(x) + (x).a_data)
-#define N_TRELOFF(x) (N_SHDATOFF(x) + (x).a_shdata)
-#define N_DRELOFF(x) (N_TRELOFF(x) + (x).a_trsize)
-#define N_SHDRELOFF(x) (N_DRELOFF(x) + (x).a_drsize)
-#define N_SYMOFF(x) (N_SHDRELOFF(x) + (x).a_shdrsize)
-#define N_STROFF(x) (N_SYMOFF(x) + (x).a_syms)
-
-#define N_TXTADDR(x) \
- (((OMAGIC == N_MAGIC(x)) || (SMAGIC == N_MAGIC(x))) ? 0 \
- : TEXT_START_ADDR + EXEC_BYTES_SIZE)
-
-#define N_TXTSIZE(x) \
- (((OMAGIC == N_MAGIC(x)) || (SMAGIC == N_MAGIC(x))) ? ((x).a_text) \
- : ((x).a_text - N_ADDRADJ(x) - EXEC_BYTES_SIZE))
-
-#endif /* A_OUT_DYNIX3_H */
diff --git a/include/aout/encap.h b/include/aout/encap.h
deleted file mode 100644
index be8e88c..0000000
--- a/include/aout/encap.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/* Yet Another Try at encapsulating bsd object files in coff.
- Copyright 1988, 1989, 1991 Free Software Foundation, Inc.
- Written by Pace Willisson 12/9/88
-
- This file is obsolete. It needs to be converted to just define a bunch
- of stuff that BFD can use to do coff-encapsulated files. --gnu@cygnus.com
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/*
- * We only use the coff headers to tell the kernel
- * how to exec the file. Therefore, the only fields that need to
- * be filled in are the scnptr and vaddr for the text and data
- * sections, and the vaddr for the bss. As far as coff is concerned,
- * there is no symbol table, relocation, or line numbers.
- *
- * A normal bsd header (struct exec) is placed after the coff headers,
- * and before the real text. I defined a the new fields 'a_machtype'
- * and a_flags. If a_machtype is M_386, and a_flags & A_ENCAP is
- * true, then the bsd header is preceeded by a coff header. Macros
- * like N_TXTOFF and N_TXTADDR use this field to find the bsd header.
- *
- * The only problem is to track down the bsd exec header. The
- * macros HEADER_OFFSET, etc do this.
- */
-
-#define N_FLAGS_COFF_ENCAPSULATE 0x20 /* coff header precedes bsd header */
-
-/* Describe the COFF header used for encapsulation. */
-
-struct coffheader
-{
- /* filehdr */
- unsigned short f_magic;
- unsigned short f_nscns;
- long f_timdat;
- long f_symptr;
- long f_nsyms;
- unsigned short f_opthdr;
- unsigned short f_flags;
- /* aouthdr */
- short magic;
- short vstamp;
- long tsize;
- long dsize;
- long bsize;
- long entry;
- long text_start;
- long data_start;
- struct coffscn
- {
- char s_name[8];
- long s_paddr;
- long s_vaddr;
- long s_size;
- long s_scnptr;
- long s_relptr;
- long s_lnnoptr;
- unsigned short s_nreloc;
- unsigned short s_nlnno;
- long s_flags;
- } scns[3];
-};
-
-/* Describe some of the parameters of the encapsulation,
- including how to find the encapsulated BSD header. */
-
-/* FIXME, this is dumb. The same tools can't handle a.outs for different
- architectures, just because COFF_MAGIC is different; so you need a
- separate GNU nm for every architecture!!? Unfortunately, it needs to
- be this way, since the COFF_MAGIC value is determined by the kernel
- we're trying to fool here. */
-
-#define COFF_MAGIC_I386 0514 /* I386MAGIC */
-#define COFF_MAGIC_M68K 0520 /* MC68MAGIC */
-
-#ifdef COFF_MAGIC
-short __header_offset_temp;
-#define HEADER_OFFSET(f) \
- (__header_offset_temp = 0, \
- fread ((char *)&__header_offset_temp, sizeof (short), 1, (f)), \
- fseek ((f), -sizeof (short), 1), \
- __header_offset_temp==COFF_MAGIC ? sizeof(struct coffheader) : 0)
-#else
-#define HEADER_OFFSET(f) 0
-#endif
-
-#define HEADER_SEEK(f) (fseek ((f), HEADER_OFFSET((f)), 1))
-
-/* Describe the characteristics of the BSD header
- that appears inside the encapsulation. */
-
-/* Encapsulated coff files that are linked ZMAGIC have a text segment
- offset just past the header (and a matching TXTADDR), excluding
- the headers from the text segment proper but keeping the physical
- layout and the virtual memory layout page-aligned.
-
- Non-encapsulated a.out files that are linked ZMAGIC have a text
- segment that starts at 0 and an N_TXTADR similarly offset to 0.
- They too are page-aligned with each other, but they include the
- a.out header as part of the text.
-
- The _N_HDROFF gets sizeof struct exec added to it, so we have
- to compensate here. See <a.out.gnu.h>. */
-
-#undef _N_HDROFF
-#undef N_TXTADDR
-#undef N_DATADDR
-
-#define _N_HDROFF(x) ((N_FLAGS(x) & N_FLAGS_COFF_ENCAPSULATE) ? \
- sizeof (struct coffheader) : 0)
-
-/* Address of text segment in memory after it is loaded. */
-#define N_TXTADDR(x) \
- ((N_FLAGS(x) & N_FLAGS_COFF_ENCAPSULATE) ? \
- sizeof (struct coffheader) + sizeof (struct exec) : 0)
-#define SEGMENT_SIZE 0x400000
-
-#define N_DATADDR(x) \
- ((N_FLAGS(x) & N_FLAGS_COFF_ENCAPSULATE) ? \
- (SEGMENT_SIZE + ((N_TXTADDR(x)+(x).a_text-1) & ~(SEGMENT_SIZE-1))) : \
- (N_TXTADDR(x)+(x).a_text))
diff --git a/include/aout/host.h b/include/aout/host.h
deleted file mode 100644
index 8807108..0000000
--- a/include/aout/host.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* host.h - Parameters about the a.out format, based on the host system
- on which the program is compiled.
-
- Copyright 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* Address of data segment in memory after it is loaded.
- It is up to you to define SEGMENT_SIZE on machines not listed here. */
-#ifndef SEGMENT_SIZE
-
-#if defined(hp300) || defined(pyr)
-#define SEGMENT_SIZE page_size
-#endif
-
-#ifdef sony
-#define SEGMENT_SIZE 0x1000
-#endif /* Sony. */
-
-#ifdef is68k
-#define SEGMENT_SIZE 0x20000
-#endif
-
-#if defined(m68k) && defined(PORTAR)
-#define TARGET_PAGE_SIZE 0x400
-#define SEGMENT_SIZE TARGET_PAGE_SIZE
-#endif
-
-#endif /*!defined(SEGMENT_SIZE)*/
-
diff --git a/include/aout/hp.h b/include/aout/hp.h
deleted file mode 100644
index 96471c7..0000000
--- a/include/aout/hp.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* Special version of <a.out.h> for use under hp-ux.
- Copyright 1988, 1991 Free Software Foundation, Inc.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* THIS FILE IS OBSOLETE. It needs to be revised as a variant "external"
- a.out format for use with BFD. */
-
-/* The `exec' structure and overall layout must be close to HP's when
- we are running on an HP system, otherwise we will not be able to
- execute the resulting file. */
-
-/* Allow this file to be included twice. */
-#ifndef __GNU_EXEC_MACROS__
-
-struct exec
-{
- unsigned short a_machtype; /* machine type */
- unsigned short a_magic; /* magic number */
- unsigned long a_spare1;
- unsigned long a_spare2;
- unsigned long a_text; /* length of text, in bytes */
- unsigned long a_data; /* length of data, in bytes */
- unsigned long a_bss; /* length of uninitialized data area for file, in bytes */
- unsigned long a_trsize; /* length of relocation info for text, in bytes */
- unsigned long a_drsize; /* length of relocation info for data, in bytes */
- unsigned long a_spare3; /* HP = pascal interface size */
- unsigned long a_spare4; /* HP = symbol table size */
- unsigned long a_spare5; /* HP = debug name table size */
- unsigned long a_entry; /* start address */
- unsigned long a_spare6; /* HP = source line table size */
- unsigned long a_spare7; /* HP = value table size */
- unsigned long a_syms; /* length of symbol table data in file, in bytes */
- unsigned long a_spare8;
-};
-
-/* Tell a.out.gnu.h not to define `struct exec'. */
-#define __STRUCT_EXEC_OVERRIDE__
-
-#include "../a.out.gnu.h"
-
-#undef N_MAGIC
-#undef N_MACHTYPE
-#undef N_FLAGS
-#undef N_SET_INFO
-#undef N_SET_MAGIC
-#undef N_SET_MACHTYPE
-#undef N_SET_FLAGS
-
-#define N_MAGIC(exec) ((exec) . a_magic)
-#define N_MACHTYPE(exec) ((exec) . a_machtype)
-#define N_SET_MAGIC(exec, magic) (((exec) . a_magic) = (magic))
-#define N_SET_MACHTYPE(exec, machtype) (((exec) . a_machtype) = (machtype))
-
-#undef N_BADMAG
-#define N_BADMAG(x) ((_N_BADMAG (x)) || (_N_BADMACH (x)))
-
-#define _N_BADMACH(x) \
-(((N_MACHTYPE (x)) != HP9000S200_ID) && \
- ((N_MACHTYPE (x)) != HP98x6_ID))
-
-#define HP98x6_ID 0x20A
-#define HP9000S200_ID 0x20C
-
-#undef _N_HDROFF
-#define _N_HDROFF(x) (SEGMENT_SIZE - (sizeof (struct exec)))
-
-#define SEGMENT_SIZE 0x1000
-
-#endif /* __GNU_EXEC_MACROS__ */
diff --git a/include/aout/hp300hpux.h b/include/aout/hp300hpux.h
deleted file mode 100644
index 1174761..0000000
--- a/include/aout/hp300hpux.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/* Special version of <a.out.h> for use under hp-ux.
- Copyright 1988, 1993, 1995, 2001 Free Software Foundation, Inc. */
-
-struct hp300hpux_exec_bytes
-{
- unsigned char e_info[4]; /* a_machtype/a_magic */
- unsigned char e_spare1[4];
- unsigned char e_spare2[4];
- unsigned char e_text[4]; /* length of text, in bytes */
- unsigned char e_data[4]; /* length of data, in bytes */
- unsigned char e_bss[4]; /* length of uninitialized data area , in bytes */
- unsigned char e_trsize[4]; /* length of relocation info for text, in bytes*/
- unsigned char e_drsize[4]; /* length of relocation info for data, in bytes*/
- unsigned char e_passize[4];/* HP = pascal interface size */
- unsigned char e_syms[4]; /* HP = symbol table size */
- unsigned char e_spare5[4]; /* HP = debug name table size */
- unsigned char e_entry[4]; /* start address */
- unsigned char e_spare6[4]; /* HP = source line table size */
- unsigned char e_supsize[4];/* HP = value table size */
- unsigned char e_drelocs[4];
- unsigned char e_extension[4]; /* file offset of extension */
-};
-#define EXEC_BYTES_SIZE 64
-
-struct hp300hpux_nlist_bytes
- {
- unsigned char e_value[4];
- unsigned char e_type[1];
- unsigned char e_length[1]; /* length of ascii symbol name */
- unsigned char e_almod[2]; /* alignment mod */
- unsigned char e_shlib[2]; /* info about dynamic linking */
- };
-#define EXTERNAL_NLIST_SIZE 10
-
-struct hp300hpux_reloc
- {
- unsigned char r_address[4];/* offset of of data to relocate */
- unsigned char r_index[2]; /* symbol table index of symbol */
- unsigned char r_type[1]; /* relocation type */
- unsigned char r_length[1]; /* length of item to reloc */
- };
-
-struct hp300hpux_header_extension
-{
- unsigned char e_syms[4];
- unsigned char unique_headers[12*4];
- unsigned char e_header[2]; /* type of header */
- unsigned char e_version[2]; /* version */
- unsigned char e_size[4]; /* bytes following*/
- unsigned char e_extension[4];/* file offset of next extension */
-};
-#define EXTERNAL_EXTENSION_HEADER_SIZE (16*4)
-
-/* hpux separates object files (0x106) and impure executables (0x107) */
-/* but the bfd code does not distinguish between them. Since we want to*/
-/* read hpux .o files, we add an special define and use it below in */
-/* offset and address calculations. */
-
-#define HPUX_DOT_O_MAGIC 0x106
-#define OMAGIC 0x107 /* object file or impure executable. */
-#define NMAGIC 0x108 /* Code indicating pure executable. */
-#define ZMAGIC 0x10B /* demand-paged executable. */
-
-#define N_HEADER_IN_TEXT(x) 0
-
-#if 0 /* libaout.h only uses the lower 8 bits */
-#define HP98x6_ID 0x20A
-#define HP9000S200_ID 0x20C
-#endif
-#define HP98x6_ID 0x0A
-#define HP9000S200_ID 0x0C
-
-#define N_BADMAG(x) ((_N_BADMAG (x)) || (_N_BADMACH (x)))
-
-#define N_DATADDR(x) \
- ((N_MAGIC (x) == OMAGIC || N_MAGIC (x) == HPUX_DOT_O_MAGIC) \
- ? (N_TXTADDR (x) + N_TXTSIZE (x)) \
- : (N_SEGSIZE (x) + ((N_TXTADDR (x) + N_TXTSIZE (x) - 1) \
- & ~ (bfd_vma) (N_SEGSIZE (x) - 1))))
-
-#define _N_BADMACH(x) \
- (((N_MACHTYPE (x)) != HP9000S200_ID) && ((N_MACHTYPE (x)) != HP98x6_ID))
-
-#define _N_BADMAG(x) (N_MAGIC(x) != HPUX_DOT_O_MAGIC \
- && N_MAGIC(x) != OMAGIC \
- && N_MAGIC(x) != NMAGIC \
- && N_MAGIC(x) != ZMAGIC )
-
-#undef _N_HDROFF
-#define _N_HDROFF(x) (SEGMENT_SIZE - (sizeof (struct exec)))
-
-#undef N_DATOFF
-#undef N_PASOFF
-#undef N_SYMOFF
-#undef N_SUPOFF
-#undef N_TRELOFF
-#undef N_DRELOFF
-#undef N_STROFF
-
-#define N_DATOFF(x) ( N_TXTOFF(x) + N_TXTSIZE(x) )
-#define N_PASOFF(x) ( N_DATOFF(x) + (x).a_data)
-#define N_SYMOFF(x) ( N_PASOFF(x) /* + (x).a_passize*/ )
-#define N_SUPOFF(x) ( N_SYMOFF(x) + (x).a_syms )
-#define N_TRELOFF(x) ( N_SUPOFF(x) /* + 0 (x).a_supsize*/ )
-#define N_DRELOFF(x) ( N_TRELOFF(x) + (x).a_trsize )
-#define N_EXTHOFF(x) ( N_DRELOFF(x) /* + 0 (x).a_drsize */)
-#define N_STROFF(x) ( 0 /* no string table */ )
-
-/* use these when the file has gnu symbol tables */
-#define N_GNU_TRELOFF(x) (N_DATOFF(x) + (x).a_data)
-#define N_GNU_DRELOFF(x) (N_GNU_TRELOFF(x) + (x).a_trsize)
-#define N_GNU_SYMOFF(x) (N_GNU_DRELOFF(x) + (x).a_drsize)
-
-#define TARGET_PAGE_SIZE 0x1000
-#define SEGMENT_SIZE 0x1000
-#define TEXT_START_ADDR 0
-
-#undef N_SHARED_LIB
-#define N_SHARED_LIB(x) ( 0 /* no shared libraries */ )
diff --git a/include/aout/hppa.h b/include/aout/hppa.h
deleted file mode 100644
index 7e185de..0000000
--- a/include/aout/hppa.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "filehdr.h"
-#include "aouthdr.h"
-#include "scnhdr.h"
-#include "spacehdr.h"
-#include "syms.h"
-
-
diff --git a/include/aout/ranlib.h b/include/aout/ranlib.h
deleted file mode 100644
index 8695b05..0000000
--- a/include/aout/ranlib.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* ranlib.h -- archive library index member definition for GNU.
- Copyright 1990, 1991 Free Software Foundation, Inc.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* The Symdef member of an archive contains two things:
- a table that maps symbol-string offsets to file offsets,
- and a symbol-string table. All the symbol names are
- run together (each with trailing null) in the symbol-string
- table. There is a single longword bytecount on the front
- of each of these tables. Thus if we have two symbols,
- "foo" and "_bar", that are in archive members at offsets
- 200 and 900, it would look like this:
- 16 ; byte count of index table
- 0 ; offset of "foo" in string table
- 200 ; offset of foo-module in file
- 4 ; offset of "bar" in string table
- 900 ; offset of bar-module in file
- 9 ; byte count of string table
- "foo\0_bar\0" ; string table */
-
-#define RANLIBMAG "__.SYMDEF" /* Archive file name containing index */
-#define RANLIBSKEW 3 /* Creation time offset */
-
-/* Format of __.SYMDEF:
- First, a longword containing the size of the 'symdef' data that follows.
- Second, zero or more 'symdef' structures.
- Third, a longword containing the length of symbol name strings.
- Fourth, zero or more symbol name strings (each followed by a null). */
-
-struct symdef
- {
- union
- {
- unsigned long string_offset; /* In the file */
- char *name; /* In memory, sometimes */
- } s;
- /* this points to the front of the file header (AKA member header --
- a struct ar_hdr), not to the front of the file or into the file).
- in other words it only tells you which file to read */
- unsigned long file_offset;
- };
-
-/* Compatability with BSD code */
-
-#define ranlib symdef
-#define ran_un s
-#define ran_strx string_offset
-#define ran_name name
-#define ran_off file_offset
diff --git a/include/aout/reloc.h b/include/aout/reloc.h
deleted file mode 100644
index c4ce1c4..0000000
--- a/include/aout/reloc.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* reloc.h -- Header file for relocation information.
- Copyright 1989, 1990, 1991 Free Software Foundation, Inc.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* Relocation types for a.out files using reloc_info_extended
- (SPARC and AMD 29000). */
-
-#ifndef _RELOC_H_READ_
-#define _RELOC_H_READ_ 1
-
-enum reloc_type
- {
- RELOC_8, RELOC_16, RELOC_32, /* simple relocations */
- RELOC_DISP8, RELOC_DISP16, RELOC_DISP32, /* pc-rel displacement */
- RELOC_WDISP30, RELOC_WDISP22,
- RELOC_HI22, RELOC_22,
- RELOC_13, RELOC_LO10,
- RELOC_SFA_BASE, RELOC_SFA_OFF13,
- RELOC_BASE10, RELOC_BASE13, RELOC_BASE22, /* P.I.C. (base-relative) */
- RELOC_PC10, RELOC_PC22, /* for some sort of pc-rel P.I.C. (?) */
- RELOC_JMP_TBL, /* P.I.C. jump table */
- RELOC_SEGOFF16, /* reputedly for shared libraries somehow */
- RELOC_GLOB_DAT, RELOC_JMP_SLOT, RELOC_RELATIVE,
- RELOC_11,
- RELOC_WDISP2_14,
- RELOC_WDISP19,
- RELOC_HHI22,
- RELOC_HLO10,
-
- /* 29K relocation types */
- RELOC_JUMPTARG, RELOC_CONST, RELOC_CONSTH,
-
- RELOC_WDISP14, RELOC_WDISP21,
-
- NO_RELOC
- };
-
-#define RELOC_TYPE_NAMES \
-"8", "16", "32", "DISP8", \
-"DISP16", "DISP32", "WDISP30", "WDISP22", \
-"HI22", "22", "13", "LO10", \
-"SFA_BASE", "SFAOFF13", "BASE10", "BASE13", \
-"BASE22", "PC10", "PC22", "JMP_TBL", \
-"SEGOFF16", "GLOB_DAT", "JMP_SLOT", "RELATIVE", \
-"11", "WDISP2_14", "WDISP19", "HHI22", \
-"HLO10", \
-"JUMPTARG", "CONST", "CONSTH", "WDISP14", \
-"WDISP21", \
-"NO_RELOC"
-
-#endif /* _RELOC_H_READ_ */
-
-/* end of reloc.h */
diff --git a/include/aout/stab.def b/include/aout/stab.def
deleted file mode 100644
index 3fe8084..0000000
--- a/include/aout/stab.def
+++ /dev/null
@@ -1,282 +0,0 @@
-/* Table of DBX symbol codes for the GNU system.
- Copyright 1988, 1991, 1992, 1993, 1994, 1996, 1998, 2004
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* New stab from Solaris 2. This uses an n_type of 0, which in a.out files
- overlaps the N_UNDF used for ordinary symbols. In ELF files, the
- debug information is in a different file section, so there is no conflict.
- This symbol's n_value gives the size of the string section associated
- with this file. The symbol's n_strx (relative to the just-updated
- string section start address) gives the name of the source file,
- e.g. "foo.c", without any path information. The symbol's n_desc gives
- the count of upcoming symbols associated with this file (not including
- this one). */
-/* __define_stab (N_UNDF, 0x00, "UNDF") */
-
-/* Global variable. Only the name is significant.
- To find the address, look in the corresponding external symbol. */
-__define_stab (N_GSYM, 0x20, "GSYM")
-
-/* Function name for BSD Fortran. Only the name is significant.
- To find the address, look in the corresponding external symbol. */
-__define_stab (N_FNAME, 0x22, "FNAME")
-
-/* Function name or text-segment variable for C. Value is its address.
- Desc is supposedly starting line number, but GCC doesn't set it
- and DBX seems not to miss it. */
-__define_stab (N_FUN, 0x24, "FUN")
-
-/* Data-segment variable with internal linkage. Value is its address.
- "Static Sym". */
-__define_stab (N_STSYM, 0x26, "STSYM")
-
-/* BSS-segment variable with internal linkage. Value is its address. */
-__define_stab (N_LCSYM, 0x28, "LCSYM")
-
-/* Name of main routine. Only the name is significant. */
-__define_stab (N_MAIN, 0x2a, "MAIN")
-
-/* Solaris2: Read-only data symbols. */
-__define_stab (N_ROSYM, 0x2c, "ROSYM")
-
-/* MacOS X:
- The beginning of a relocatable function block - including stabs. */
-__define_stab (N_BNSYM, 0x2e, "BNSYM")
-
-/* Global symbol in Pascal.
- Supposedly the value is its line number; I'm skeptical. */
-__define_stab (N_PC, 0x30, "PC")
-
-/* Number of symbols: 0, files,,funcs,lines according to Ultrix V4.0. */
-__define_stab (N_NSYMS, 0x32, "NSYMS")
-
-/* "No DST map for sym: name, ,0,type,ignored" according to Ultrix V4.0. */
-__define_stab (N_NOMAP, 0x34, "NOMAP")
-
-/* New stab from Solaris 2. Like N_SO, but for the object file. Two in
- a row provide the build directory and the relative path of the .o from it.
- Solaris2 uses this to avoid putting the stabs info into the linked
- executable; this stab goes into the ".stab.index" section, and the debugger
- reads the real stabs directly from the .o files instead. */
-__define_stab (N_OBJ, 0x38, "OBJ")
-
-/* New stab from Solaris 2. Options for the debugger, related to the
- source language for this module. E.g. whether to use ANSI
- integral promotions or traditional integral promotions. */
-__define_stab (N_OPT, 0x3c, "OPT")
-
-/* Register variable. Value is number of register. */
-__define_stab (N_RSYM, 0x40, "RSYM")
-
-/* Modula-2 compilation unit. Can someone say what info it contains? */
-__define_stab (N_M2C, 0x42, "M2C")
-
-/* Line number in text segment. Desc is the line number;
- value is corresponding address. On Solaris2, the line number is
- relative to the start of the current function. */
-__define_stab (N_SLINE, 0x44, "SLINE")
-
-/* Similar, for data segment. */
-__define_stab (N_DSLINE, 0x46, "DSLINE")
-
-/* Similar, for bss segment. */
-__define_stab (N_BSLINE, 0x48, "BSLINE")
-
-/* Sun's source-code browser stabs. ?? Don't know what the fields are.
- Supposedly the field is "path to associated .cb file". THIS VALUE
- OVERLAPS WITH N_BSLINE! */
-__define_stab_duplicate (N_BROWS, 0x48, "BROWS")
-
-/* GNU Modula-2 definition module dependency. Value is the modification time
- of the definition file. Other is non-zero if it is imported with the
- GNU M2 keyword %INITIALIZE. Perhaps N_M2C can be used if there
- are enough empty fields? */
-__define_stab(N_DEFD, 0x4a, "DEFD")
-
-/* New in Solaris2. Function start/body/end line numbers. */
-__define_stab(N_FLINE, 0x4C, "FLINE")
-
-/* MacOS X: This tells the end of a relocatable function + debugging info. */
-__define_stab(N_ENSYM, 0x4E, "ENSYM")
-
-/* THE FOLLOWING TWO STAB VALUES CONFLICT. Happily, one is for Modula-2
- and one is for C++. Still,... */
-/* GNU C++ exception variable. Name is variable name. */
-__define_stab (N_EHDECL, 0x50, "EHDECL")
-/* Modula2 info "for imc": name,,0,0,0 according to Ultrix V4.0. */
-__define_stab_duplicate (N_MOD2, 0x50, "MOD2")
-
-/* GNU C++ `catch' clause. Value is its address. Desc is nonzero if
- this entry is immediately followed by a CAUGHT stab saying what exception
- was caught. Multiple CAUGHT stabs means that multiple exceptions
- can be caught here. If Desc is 0, it means all exceptions are caught
- here. */
-__define_stab (N_CATCH, 0x54, "CATCH")
-
-/* Structure or union element. Value is offset in the structure. */
-__define_stab (N_SSYM, 0x60, "SSYM")
-
-/* Solaris2: Last stab emitted for module. */
-__define_stab (N_ENDM, 0x62, "ENDM")
-
-/* Name of main source file.
- Value is starting text address of the compilation.
- If multiple N_SO's appear, the first to contain a trailing / is the
- compilation directory. The first to not contain a trailing / is the
- source file name, relative to the compilation directory. Others (perhaps
- resulting from cfront) are ignored.
- On Solaris2, value is undefined, but desc is a source-language code. */
-
-__define_stab (N_SO, 0x64, "SO")
-
-/* Apple: This is the stab that associated the .o file with the
- N_SO stab, in the case where debug info is mostly stored in the .o file. */
-__define_stab (N_OSO, 0x66, "OSO")
-
-/* SunPro F77: Name of alias. */
-__define_stab (N_ALIAS, 0x6c, "ALIAS")
-
-/* Automatic variable in the stack. Value is offset from frame pointer.
- Also used for type descriptions. */
-__define_stab (N_LSYM, 0x80, "LSYM")
-
-/* Beginning of an include file. Only Sun uses this.
- In an object file, only the name is significant.
- The Sun linker puts data into some of the other fields. */
-__define_stab (N_BINCL, 0x82, "BINCL")
-
-/* Name of sub-source file (#include file).
- Value is starting text address of the compilation. */
-__define_stab (N_SOL, 0x84, "SOL")
-
-/* Parameter variable. Value is offset from argument pointer.
- (On most machines the argument pointer is the same as the frame pointer. */
-__define_stab (N_PSYM, 0xa0, "PSYM")
-
-/* End of an include file. No name.
- This and N_BINCL act as brackets around the file's output.
- In an object file, there is no significant data in this entry.
- The Sun linker puts data into some of the fields. */
-__define_stab (N_EINCL, 0xa2, "EINCL")
-
-/* Alternate entry point. Value is its address. */
-__define_stab (N_ENTRY, 0xa4, "ENTRY")
-
-/* Beginning of lexical block.
- The desc is the nesting level in lexical blocks.
- The value is the address of the start of the text for the block.
- The variables declared inside the block *precede* the N_LBRAC symbol.
- On Solaris2, the value is relative to the start of the current function. */
-__define_stab (N_LBRAC, 0xc0, "LBRAC")
-
-/* Place holder for deleted include file. Replaces a N_BINCL and everything
- up to the corresponding N_EINCL. The Sun linker generates these when
- it finds multiple identical copies of the symbols from an include file.
- This appears only in output from the Sun linker. */
-__define_stab (N_EXCL, 0xc2, "EXCL")
-
-/* Modula-2 scope information. Can someone say what info it contains? */
-__define_stab (N_SCOPE, 0xc4, "SCOPE")
-
-/* Solaris2: Patch Run Time Checker. */
-__define_stab (N_PATCH, 0xd0, "PATCH")
-
-/* End of a lexical block. Desc matches the N_LBRAC's desc.
- The value is the address of the end of the text for the block.
- On Solaris2, the value is relative to the start of the current function. */
-__define_stab (N_RBRAC, 0xe0, "RBRAC")
-
-/* Begin named common block. Only the name is significant. */
-__define_stab (N_BCOMM, 0xe2, "BCOMM")
-
-/* End named common block. Only the name is significant
- (and it should match the N_BCOMM). */
-__define_stab (N_ECOMM, 0xe4, "ECOMM")
-
-/* Member of a common block; value is offset within the common block.
- This should occur within a BCOMM/ECOMM pair. */
-__define_stab (N_ECOML, 0xe8, "ECOML")
-
-/* Solaris2: Pascal "with" statement: type,,0,0,offset */
-__define_stab (N_WITH, 0xea, "WITH")
-
-/* These STAB's are used on Gould systems for Non-Base register symbols
- or something like that. FIXME. I have assigned the values at random
- since I don't have a Gould here. Fixups from Gould folk welcome... */
-__define_stab (N_NBTEXT, 0xF0, "NBTEXT")
-__define_stab (N_NBDATA, 0xF2, "NBDATA")
-__define_stab (N_NBBSS, 0xF4, "NBBSS")
-__define_stab (N_NBSTS, 0xF6, "NBSTS")
-__define_stab (N_NBLCS, 0xF8, "NBLCS")
-
-/* Second symbol entry containing a length-value for the preceding entry.
- The value is the length. */
-__define_stab (N_LENG, 0xfe, "LENG")
-
-/* The above information, in matrix format.
-
- STAB MATRIX
- _________________________________________________
- | 00 - 1F are not dbx stab symbols |
- | In most cases, the low bit is the EXTernal bit|
-
- | 00 UNDEF | 02 ABS | 04 TEXT | 06 DATA |
- | 01 |EXT | 03 |EXT | 05 |EXT | 07 |EXT |
-
- | 08 BSS | 0A INDR | 0C FN_SEQ | 0E WEAKA |
- | 09 |EXT | 0B | 0D WEAKU | 0F WEAKT |
-
- | 10 WEAKD | 12 COMM | 14 SETA | 16 SETT |
- | 11 WEAKB | 13 | 15 | 17 |
-
- | 18 SETD | 1A SETB | 1C SETV | 1E WARNING|
- | 19 | 1B | 1D | 1F FN |
-
- |_______________________________________________|
- | Debug entries with bit 01 set are unused. |
- | 20 GSYM | 22 FNAME | 24 FUN | 26 STSYM |
- | 28 LCSYM | 2A MAIN | 2C ROSYM | 2E |
- | 30 PC | 32 NSYMS | 34 NOMAP | 36 |
- | 38 OBJ | 3A | 3C OPT | 3E |
- | 40 RSYM | 42 M2C | 44 SLINE | 46 DSLINE |
- | 48 BSLINE*| 4A DEFD | 4C FLINE | 4E |
- | 50 EHDECL*| 52 | 54 CATCH | 56 |
- | 58 | 5A | 5C | 5E |
- | 60 SSYM | 62 ENDM | 64 SO | 66 |
- | 68 | 6A | 6C ALIAS | 6E |
- | 70 | 72 | 74 | 76 |
- | 78 | 7A | 7C | 7E |
- | 80 LSYM | 82 BINCL | 84 SOL | 86 |
- | 88 | 8A | 8C | 8E |
- | 90 | 92 | 94 | 96 |
- | 98 | 9A | 9C | 9E |
- | A0 PSYM | A2 EINCL | A4 ENTRY | A6 |
- | A8 | AA | AC | AE |
- | B0 | B2 | B4 | B6 |
- | B8 | BA | BC | BE |
- | C0 LBRAC | C2 EXCL | C4 SCOPE | C6 |
- | C8 | CA | CC | CE |
- | D0 PATCH | D2 | D4 | D6 |
- | D8 | DA | DC | DE |
- | E0 RBRAC | E2 BCOMM | E4 ECOMM | E6 |
- | E8 ECOML | EA WITH | EC | EE |
- | F0 | F2 | F4 | F6 |
- | F8 | FA | FC | FE LENG |
- +-----------------------------------------------+
- * 50 EHDECL is also MOD2.
- * 48 BSLINE is also BROWS.
- */
diff --git a/include/aout/stab_gnu.h b/include/aout/stab_gnu.h
deleted file mode 100644
index 29dc990..0000000
--- a/include/aout/stab_gnu.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* gnu_stab.h Definitions for GNU extensions to STABS
-
- Copyright 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#ifndef __GNU_STAB__
-
-/* Indicate the GNU stab.h is in use. */
-
-#define __GNU_STAB__
-
-#define __define_stab(NAME, CODE, STRING) NAME=CODE,
-#define __define_stab_duplicate(NAME, CODE, STRING) NAME=CODE,
-
-enum __stab_debug_code
-{
-#include "aout/stab.def"
-LAST_UNUSED_STAB_CODE
-};
-
-#undef __define_stab
-
-/* Definitions of "desc" field for N_SO stabs in Solaris2. */
-
-#define N_SO_AS 1
-#define N_SO_C 2
-#define N_SO_ANSI_C 3
-#define N_SO_CC 4 /* C++ */
-#define N_SO_FORTRAN 5
-#define N_SO_PASCAL 6
-
-/* Solaris2: Floating point type values in basic types. */
-
-#define NF_NONE 0
-#define NF_SINGLE 1 /* IEEE 32-bit */
-#define NF_DOUBLE 2 /* IEEE 64-bit */
-#define NF_COMPLEX 3 /* Fortran complex */
-#define NF_COMPLEX16 4 /* Fortran double complex */
-#define NF_COMPLEX32 5 /* Fortran complex*16 */
-#define NF_LDOUBLE 6 /* Long double (whatever that is) */
-
-#endif /* __GNU_STAB_ */
diff --git a/include/aout/sun4.h b/include/aout/sun4.h
deleted file mode 100644
index 8cf0517..0000000
--- a/include/aout/sun4.h
+++ /dev/null
@@ -1,235 +0,0 @@
-/* SPARC-specific values for a.out files
-
- Copyright 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* Some systems, e.g., AIX, may have defined this in header files already
- included. */
-#undef TARGET_PAGE_SIZE
-#define TARGET_PAGE_SIZE 0x2000 /* 8K. aka NBPG in <sys/param.h> */
-/* Note that some SPARCs have 4K pages, some 8K, some others. */
-
-#define SEG_SIZE_SPARC TARGET_PAGE_SIZE
-#define SEG_SIZE_SUN3 0x20000 /* Resolution of r/w protection hw */
-
-#define TEXT_START_ADDR TARGET_PAGE_SIZE /* Location 0 is not accessible */
-#define N_HEADER_IN_TEXT(x) 1
-
-/* Non-default definitions of the accessor macros... */
-
-/* Segment size varies on Sun-3 versus Sun-4. */
-
-#define N_SEGSIZE(x) (N_MACHTYPE(x) == M_SPARC? SEG_SIZE_SPARC: \
- N_MACHTYPE(x) == M_68020? SEG_SIZE_SUN3: \
- /* Guess? */ TARGET_PAGE_SIZE)
-
-/* Virtual Address of text segment from the a.out file. For OMAGIC,
- (almost always "unlinked .o's" these days), should be zero.
- Sun added a kludge so that shared libraries linked ZMAGIC get
- an address of zero if a_entry (!!!) is lower than the otherwise
- expected text address. These kludges have gotta go!
- For linked files, should reflect reality if we know it. */
-
-/* This differs from the version in aout64.h (which we override by defining
- it here) only for NMAGIC (we return TEXT_START_ADDR+EXEC_BYTES_SIZE;
- they return 0). */
-
-#define N_TXTADDR(x) \
- (N_MAGIC(x)==OMAGIC? 0 \
- : (N_MAGIC(x) == ZMAGIC && (x).a_entry < TEXT_START_ADDR)? 0 \
- : TEXT_START_ADDR+EXEC_BYTES_SIZE)
-
-/* When a file is linked against a shared library on SunOS 4, the
- dynamic bit in the exec header is set, and the first symbol in the
- symbol table is __DYNAMIC. Its value is the address of the
- following structure. */
-
-struct external_sun4_dynamic
-{
- /* The version number of the structure. SunOS 4.1.x creates files
- with version number 3, which is what this structure is based on.
- According to gdb, version 2 is similar. I believe that version 2
- used a different type of procedure linkage table, and there may
- have been other differences. */
- bfd_byte ld_version[4];
- /* The virtual address of a 28 byte structure used in debugging.
- The contents are filled in at run time by ld.so. */
- bfd_byte ldd[4];
- /* The virtual address of another structure with information about
- how to relocate the executable at run time. */
- bfd_byte ld[4];
-};
-
-/* The size of the debugging structure pointed to by the debugger
- field of __DYNAMIC. */
-#define EXTERNAL_SUN4_DYNAMIC_DEBUGGER_SIZE (24)
-
-/* The structure pointed to by the linker field of __DYNAMIC. As far
- as I can tell, most of the addresses in this structure are offsets
- within the file, but some are actually virtual addresses. */
-
-struct internal_sun4_dynamic_link
-{
- /* Linked list of loaded objects. This is filled in at runtime by
- ld.so and probably by dlopen. */
- unsigned long ld_loaded;
-
- /* The address of the list of names of shared objects which must be
- included at runtime. Each entry in the list is 16 bytes: the 4
- byte address of the string naming the object (e.g., for -lc this
- is "c"); 4 bytes of flags--the high bit is whether to search for
- the object using the library path; the 2 byte major version
- number; the 2 byte minor version number; the 4 byte address of
- the next entry in the list (zero if this is the last entry). The
- version numbers seem to only be non-zero when doing library
- searching. */
- unsigned long ld_need;
-
- /* The address of the path to search for the shared objects which
- must be included. This points to a string in PATH format which
- is generated from the -L arguments to the linker. According to
- the man page, ld.so implicitly adds ${LD_LIBRARY_PATH} to the
- beginning of this string and /lib:/usr/lib:/usr/local/lib to the
- end. The string is terminated by a null byte. This field is
- zero if there is no additional path. */
- unsigned long ld_rules;
-
- /* The address of the global offset table. This appears to be a
- virtual address, not a file offset. The first entry in the
- global offset table seems to be the virtual address of the
- sun4_dynamic structure (the same value as the __DYNAMIC symbol).
- The global offset table is used for PIC code to hold the
- addresses of variables. A dynamically linked file which does not
- itself contain PIC code has a four byte global offset table. */
- unsigned long ld_got;
-
- /* The address of the procedure linkage table. This appears to be a
- virtual address, not a file offset.
-
- On a SPARC, the table is composed of 12 byte entries, each of
- which consists of three instructions. The first entry is
- sethi %hi(0),%g1
- jmp %g1
- nop
- These instructions are changed by ld.so into a jump directly into
- ld.so itself. Each subsequent entry is
- save %sp, -96, %sp
- call <address of first entry in procedure linkage table>
- <reloc_number | 0x01000000>
- The reloc_number is the number of the reloc to use to resolve
- this entry. The reloc will be a JMP_SLOT reloc against some
- symbol that is not defined in this object file but should be
- defined in a shared object (if it is not, ld.so will report a
- runtime error and exit). The constant 0x010000000 turns the
- reloc number into a sethi of %g0, which does nothing since %g0 is
- hardwired to zero.
-
- When one of these entries is executed, it winds up calling into
- ld.so. ld.so looks at the reloc number, available via the return
- address, to determine which entry this is. It then looks at the
- reloc and patches up the entry in the table into a sethi and jmp
- to the real address followed by a nop. This means that the reloc
- lookup only has to happen once, and it also means that the
- relocation only needs to be done if the function is actually
- called. The relocation is expensive because ld.so must look up
- the symbol by name.
-
- The size of the procedure linkage table is given by the ld_plt_sz
- field. */
- unsigned long ld_plt;
-
- /* The address of the relocs. These are in the same format as
- ordinary relocs. Symbol index numbers refer to the symbols
- pointed to by ld_stab. I think the only way to determine the
- number of relocs is to assume that all the bytes from ld_rel to
- ld_hash contain reloc entries. */
- unsigned long ld_rel;
-
- /* The address of a hash table of symbols. The hash table has
- roughly the same number of entries as there are dynamic symbols;
- I think the only way to get the exact size is to assume that
- every byte from ld_hash to ld_stab is devoted to the hash table.
-
- Each entry in the hash table is eight bytes. The first four
- bytes are a symbol index into the dynamic symbols. The second
- four bytes are the index of the next hash table entry in the
- bucket. The ld_buckets field gives the number of buckets, say B.
- The first B entries in the hash table each start a bucket which
- is chained through the second four bytes of each entry. A value
- of zero ends the chain.
-
- The hash function is simply
- h = 0;
- while (*string != '\0')
- h = (h << 1) + *string++;
- h &= 0x7fffffff;
-
- To look up a symbol, compute the hash value of the name. Take
- the modulos of hash value and the number of buckets. Start at
- that entry in the hash table. See if the symbol (from the first
- four bytes of the hash table entry) has the name you are looking
- for. If not, use the chain field (the second four bytes of the
- hash table entry) to move on to the next entry in this bucket.
- If the chain field is zero you have reached the end of the
- bucket, and the symbol is not in the hash table. */
- unsigned long ld_hash;
-
- /* The address of the symbol table. This is a list of
- external_nlist structures. The string indices are relative to
- the ld_symbols field. I think the only way to determine the
- number of symbols is to assume that all the bytes between ld_stab
- and ld_symbols are external_nlist structures. */
- unsigned long ld_stab;
-
- /* I don't know what this is for. It seems to always be zero. */
- unsigned long ld_stab_hash;
-
- /* The number of buckets in the hash table. */
- unsigned long ld_buckets;
-
- /* The address of the symbol string table. The first string in this
- string table need not be the empty string. */
- unsigned long ld_symbols;
-
- /* The size in bytes of the symbol string table. */
- unsigned long ld_symb_size;
-
- /* The size in bytes of the text segment. */
- unsigned long ld_text;
-
- /* The size in bytes of the procedure linkage table. */
- unsigned long ld_plt_sz;
-};
-
-/* The external form of the structure. */
-
-struct external_sun4_dynamic_link
-{
- bfd_byte ld_loaded[4];
- bfd_byte ld_need[4];
- bfd_byte ld_rules[4];
- bfd_byte ld_got[4];
- bfd_byte ld_plt[4];
- bfd_byte ld_rel[4];
- bfd_byte ld_hash[4];
- bfd_byte ld_stab[4];
- bfd_byte ld_stab_hash[4];
- bfd_byte ld_buckets[4];
- bfd_byte ld_symbols[4];
- bfd_byte ld_symb_size[4];
- bfd_byte ld_text[4];
- bfd_byte ld_plt_sz[4];
-};
diff --git a/include/bfdlink.h b/include/bfdlink.h
deleted file mode 100644
index 51c5b15..0000000
--- a/include/bfdlink.h
+++ /dev/null
@@ -1,779 +0,0 @@
-/* bfdlink.h -- header file for BFD link routines
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
- Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
- MA 02110-1301, USA. */
-
-#ifndef BFDLINK_H
-#define BFDLINK_H
-
-/* Which symbols to strip during a link. */
-enum bfd_link_strip
-{
- strip_none, /* Don't strip any symbols. */
- strip_debugger, /* Strip debugging symbols. */
- strip_some, /* keep_hash is the list of symbols to keep. */
- strip_all /* Strip all symbols. */
-};
-
-/* Which local symbols to discard during a link. This is irrelevant
- if strip_all is used. */
-enum bfd_link_discard
-{
- discard_sec_merge, /* Discard local temporary symbols in SEC_MERGE
- sections. */
- discard_none, /* Don't discard any locals. */
- discard_l, /* Discard local temporary symbols. */
- discard_all /* Discard all locals. */
-};
-
-/* Describes the type of hash table entry structure being used.
- Different hash table structure have different fields and so
- support different linking features. */
-enum bfd_link_hash_table_type
- {
- bfd_link_generic_hash_table,
- bfd_link_elf_hash_table
- };
-
-/* These are the possible types of an entry in the BFD link hash
- table. */
-
-enum bfd_link_hash_type
-{
- bfd_link_hash_new, /* Symbol is new. */
- bfd_link_hash_undefined, /* Symbol seen before, but undefined. */
- bfd_link_hash_undefweak, /* Symbol is weak and undefined. */
- bfd_link_hash_defined, /* Symbol is defined. */
- bfd_link_hash_defweak, /* Symbol is weak and defined. */
- bfd_link_hash_common, /* Symbol is common. */
- bfd_link_hash_indirect, /* Symbol is an indirect link. */
- bfd_link_hash_warning /* Like indirect, but warn if referenced. */
-};
-
-enum bfd_link_common_skip_ar_aymbols
-{
- bfd_link_common_skip_none,
- bfd_link_common_skip_text,
- bfd_link_common_skip_data,
- bfd_link_common_skip_all
-};
-
-/* The linking routines use a hash table which uses this structure for
- its elements. */
-
-struct bfd_link_hash_entry
-{
- /* Base hash table entry structure. */
- struct bfd_hash_entry root;
-
- /* Type of this entry. */
- enum bfd_link_hash_type type;
-
- /* A union of information depending upon the type. */
- union
- {
- /* Nothing is kept for bfd_hash_new. */
- /* bfd_link_hash_undefined, bfd_link_hash_undefweak. */
- struct
- {
- /* Undefined and common symbols are kept in a linked list through
- this field. This field is present in all of the union element
- so that we don't need to remove entries from the list when we
- change their type. Removing entries would either require the
- list to be doubly linked, which would waste more memory, or
- require a traversal. When an undefined or common symbol is
- created, it should be added to this list, the head of which is in
- the link hash table itself. As symbols are defined, they need
- not be removed from the list; anything which reads the list must
- doublecheck the symbol type.
-
- Weak symbols are not kept on this list.
-
- Defined and defweak symbols use this field as a reference marker.
- If the field is not NULL, or this structure is the tail of the
- undefined symbol list, the symbol has been referenced. If the
- symbol is undefined and becomes defined, this field will
- automatically be non-NULL since the symbol will have been on the
- undefined symbol list. */
- struct bfd_link_hash_entry *next;
- bfd *abfd; /* BFD symbol was found in. */
- bfd *weak; /* BFD weak symbol was found in. */
- } undef;
- /* bfd_link_hash_defined, bfd_link_hash_defweak. */
- struct
- {
- struct bfd_link_hash_entry *next;
- asection *section; /* Symbol section. */
- bfd_vma value; /* Symbol value. */
- } def;
- /* bfd_link_hash_indirect, bfd_link_hash_warning. */
- struct
- {
- struct bfd_link_hash_entry *next;
- struct bfd_link_hash_entry *link; /* Real symbol. */
- const char *warning; /* Warning (bfd_link_hash_warning only). */
- } i;
- /* bfd_link_hash_common. */
- struct
- {
- struct bfd_link_hash_entry *next;
- /* The linker needs to know three things about common
- symbols: the size, the alignment, and the section in
- which the symbol should be placed. We store the size
- here, and we allocate a small structure to hold the
- section and the alignment. The alignment is stored as a
- power of two. We don't store all the information
- directly because we don't want to increase the size of
- the union; this structure is a major space user in the
- linker. */
- struct bfd_link_hash_common_entry
- {
- unsigned int alignment_power; /* Alignment. */
- asection *section; /* Symbol section. */
- } *p;
- bfd_size_type size; /* Common symbol size. */
- } c;
- } u;
-};
-
-/* This is the link hash table. It is a derived class of
- bfd_hash_table. */
-
-struct bfd_link_hash_table
-{
- /* The hash table itself. */
- struct bfd_hash_table table;
- /* A linked list of undefined and common symbols, linked through the
- next field in the bfd_link_hash_entry structure. */
- struct bfd_link_hash_entry *undefs;
- /* Entries are added to the tail of the undefs list. */
- struct bfd_link_hash_entry *undefs_tail;
- /* The type of the link hash table. */
- enum bfd_link_hash_table_type type;
-};
-
-/* Look up an entry in a link hash table. If FOLLOW is TRUE, this
- follows bfd_link_hash_indirect and bfd_link_hash_warning links to
- the real symbol. */
-extern struct bfd_link_hash_entry *bfd_link_hash_lookup
- (struct bfd_link_hash_table *, const char *, bfd_boolean create,
- bfd_boolean copy, bfd_boolean follow);
-
-/* Look up an entry in the main linker hash table if the symbol might
- be wrapped. This should only be used for references to an
- undefined symbol, not for definitions of a symbol. */
-
-extern struct bfd_link_hash_entry *bfd_wrapped_link_hash_lookup
- (bfd *, struct bfd_link_info *, const char *, bfd_boolean,
- bfd_boolean, bfd_boolean);
-
-/* Traverse a link hash table. */
-extern void bfd_link_hash_traverse
- (struct bfd_link_hash_table *,
- bfd_boolean (*) (struct bfd_link_hash_entry *, void *),
- void *);
-
-/* Add an entry to the undefs list. */
-extern void bfd_link_add_undef
- (struct bfd_link_hash_table *, struct bfd_link_hash_entry *);
-
-/* Remove symbols from the undefs list that don't belong there. */
-extern void bfd_link_repair_undef_list
- (struct bfd_link_hash_table *table);
-
-/* Read symbols and cache symbol pointer array in outsymbols. */
-extern bfd_boolean bfd_generic_link_read_symbols (bfd *);
-
-struct bfd_sym_chain
-{
- struct bfd_sym_chain *next;
- const char *name;
-};
-
-/* How to handle unresolved symbols.
- There are four possibilities which are enumerated below: */
-enum report_method
-{
- /* This is the initial value when then link_info structure is created.
- It allows the various stages of the linker to determine whether they
- allowed to set the value. */
- RM_NOT_YET_SET = 0,
- RM_IGNORE,
- RM_GENERATE_WARNING,
- RM_GENERATE_ERROR
-};
-
-struct bfd_elf_dynamic_list;
-
-/* This structure holds all the information needed to communicate
- between BFD and the linker when doing a link. */
-
-struct bfd_link_info
-{
- /* TRUE if BFD should generate a relocatable object file. */
- unsigned int relocatable: 1;
-
- /* TRUE if BFD should generate relocation information in the final
- executable. */
- unsigned int emitrelocations: 1;
-
- /* TRUE if BFD should generate a "task linked" object file,
- similar to relocatable but also with globals converted to
- statics. */
- unsigned int task_link: 1;
-
- /* TRUE if BFD should generate a shared object. */
- unsigned int shared: 1;
-
- /* TRUE if BFD should pre-bind symbols in a shared object. */
- unsigned int symbolic: 1;
-
- /* TRUE if BFD should export all symbols in the dynamic symbol table
- of an executable, rather than only those used. */
- unsigned int export_dynamic: 1;
-
- /* TRUE if shared objects should be linked directly, not shared. */
- unsigned int static_link: 1;
-
- /* TRUE if the output file should be in a traditional format. This
- is equivalent to the setting of the BFD_TRADITIONAL_FORMAT flag
- on the output file, but may be checked when reading the input
- files. */
- unsigned int traditional_format: 1;
-
- /* TRUE if we want to produced optimized output files. This might
- need much more time and therefore must be explicitly selected. */
- unsigned int optimize: 1;
-
- /* TRUE if ok to have multiple definition. */
- unsigned int allow_multiple_definition: 1;
-
- /* TRUE if ok to have version with no definition. */
- unsigned int allow_undefined_version: 1;
-
- /* TRUE if a default symbol version should be created and used for
- exported symbols. */
- unsigned int create_default_symver: 1;
-
- /* TRUE if a default symbol version should be created and used for
- imported symbols. */
- unsigned int default_imported_symver: 1;
-
- /* TRUE if symbols should be retained in memory, FALSE if they
- should be freed and reread. */
- unsigned int keep_memory: 1;
-
- /* TRUE if every symbol should be reported back via the notice
- callback. */
- unsigned int notice_all: 1;
-
- /* TRUE if executable should not contain copy relocs.
- Setting this true may result in a non-sharable text segment. */
- unsigned int nocopyreloc: 1;
-
- /* TRUE if the new ELF dynamic tags are enabled. */
- unsigned int new_dtags: 1;
-
- /* TRUE if non-PLT relocs should be merged into one reloc section
- and sorted so that relocs against the same symbol come together. */
- unsigned int combreloc: 1;
-
- /* TRUE if .eh_frame_hdr section and PT_GNU_EH_FRAME ELF segment
- should be created. */
- unsigned int eh_frame_hdr: 1;
-
- /* TRUE if global symbols in discarded sections should be stripped. */
- unsigned int strip_discarded: 1;
-
- /* TRUE if generating a position independent executable. */
- unsigned int pie: 1;
-
- /* TRUE if generating an executable, position independent or not. */
- unsigned int executable : 1;
-
- /* TRUE if PT_GNU_STACK segment should be created with PF_R|PF_W|PF_X
- flags. */
- unsigned int execstack: 1;
-
- /* TRUE if PT_GNU_STACK segment should be created with PF_R|PF_W
- flags. */
- unsigned int noexecstack: 1;
-
- /* TRUE if PT_GNU_RELRO segment should be created. */
- unsigned int relro: 1;
-
- /* TRUE if we should warn when adding a DT_TEXTREL to a shared object. */
- unsigned int warn_shared_textrel: 1;
-
- /* TRUE if unreferenced sections should be removed. */
- unsigned int gc_sections: 1;
-
- /* TRUE if user shoudl be informed of removed unreferenced sections. */
- unsigned int print_gc_sections: 1;
-
- /* TRUE if .hash section should be created. */
- unsigned int emit_hash: 1;
-
- /* TRUE if .gnu.hash section should be created. */
- unsigned int emit_gnu_hash: 1;
-
- /* If TRUE reduce memory overheads, at the expense of speed. This will
- cause map file generation to use an O(N^2) algorithm and disable
- caching ELF symbol buffer. */
- unsigned int reduce_memory_overheads: 1;
-
- /* TRUE if all data symbols should be dynamic. */
- unsigned int dynamic_data: 1;
-
- /* TRUE if some symbols have to be dynamic, controlled by
- --dynamic-list command line options. */
- unsigned int dynamic: 1;
-
- /* Non-NULL if .note.gnu.build-id section should be created. */
- char *emit_note_gnu_build_id;
-
- /* What to do with unresolved symbols in an object file.
- When producing executables the default is GENERATE_ERROR.
- When producing shared libraries the default is IGNORE. The
- assumption with shared libraries is that the reference will be
- resolved at load/execution time. */
- enum report_method unresolved_syms_in_objects;
-
- /* What to do with unresolved symbols in a shared library.
- The same defaults apply. */
- enum report_method unresolved_syms_in_shared_libs;
-
- /* Which symbols to strip. */
- enum bfd_link_strip strip;
-
- /* Which local symbols to discard. */
- enum bfd_link_discard discard;
-
- /* Criteria for skipping symbols when detemining
- whether to include an object from an archive. */
- enum bfd_link_common_skip_ar_aymbols common_skip_ar_aymbols;
-
- /* Char that may appear as the first char of a symbol, but should be
- skipped (like symbol_leading_char) when looking up symbols in
- wrap_hash. Used by PowerPC Linux for 'dot' symbols. */
- char wrap_char;
-
- /* Separator between archive and filename in linker script filespecs. */
- char path_separator;
-
- /* Function callbacks. */
- const struct bfd_link_callbacks *callbacks;
-
- /* Hash table handled by BFD. */
- struct bfd_link_hash_table *hash;
-
- /* Hash table of symbols to keep. This is NULL unless strip is
- strip_some. */
- struct bfd_hash_table *keep_hash;
-
- /* Hash table of symbols to report back via the notice callback. If
- this is NULL, and notice_all is FALSE, then no symbols are
- reported back. */
- struct bfd_hash_table *notice_hash;
-
- /* Hash table of symbols which are being wrapped (the --wrap linker
- option). If this is NULL, no symbols are being wrapped. */
- struct bfd_hash_table *wrap_hash;
-
- /* The output BFD. */
- bfd *output_bfd;
-
- /* The list of input BFD's involved in the link. These are chained
- together via the link_next field. */
- bfd *input_bfds;
- bfd **input_bfds_tail;
-
- /* If a symbol should be created for each input BFD, this is section
- where those symbols should be placed. It must be a section in
- the output BFD. It may be NULL, in which case no such symbols
- will be created. This is to support CREATE_OBJECT_SYMBOLS in the
- linker command language. */
- asection *create_object_symbols_section;
-
- /* List of global symbol names that are starting points for marking
- sections against garbage collection. */
- struct bfd_sym_chain *gc_sym_list;
-
- /* If a base output file is wanted, then this points to it */
- void *base_file;
-
- /* The function to call when the executable or shared object is
- loaded. */
- const char *init_function;
-
- /* The function to call when the executable or shared object is
- unloaded. */
- const char *fini_function;
-
- /* Number of relaxation passes. Usually only one relaxation pass
- is needed. But a backend can have as many relaxation passes as
- necessary. During bfd_relax_section call, it is set to the
- current pass, starting from 0. */
- int relax_pass;
-
- /* Number of relaxation trips. This number is incremented every
- time the relaxation pass is restarted due to a previous
- relaxation returning true in *AGAIN. */
- int relax_trip;
-
- /* Non-zero if auto-import thunks for DATA items in pei386 DLLs
- should be generated/linked against. Set to 1 if this feature
- is explicitly requested by the user, -1 if enabled by default. */
- int pei386_auto_import;
-
- /* Non-zero if runtime relocs for DATA items with non-zero addends
- in pei386 DLLs should be generated. Set to 1 if this feature
- is explicitly requested by the user, -1 if enabled by default. */
- int pei386_runtime_pseudo_reloc;
-
- /* How many spare .dynamic DT_NULL entries should be added? */
- unsigned int spare_dynamic_tags;
-
- /* May be used to set DT_FLAGS for ELF. */
- bfd_vma flags;
-
- /* May be used to set DT_FLAGS_1 for ELF. */
- bfd_vma flags_1;
-
- /* Start and end of RELRO region. */
- bfd_vma relro_start, relro_end;
-
- /* List of symbols should be dynamic. */
- struct bfd_elf_dynamic_list *dynamic_list;
-};
-
-/* This structures holds a set of callback functions. These are called
- by the BFD linker routines. Except for the info functions, the first
- argument to each callback function is the bfd_link_info structure
- being used and each function returns a boolean value. If the
- function returns FALSE, then the BFD function which called it should
- return with a failure indication. */
-
-struct bfd_link_callbacks
-{
- /* A function which is called when an object is added from an
- archive. ABFD is the archive element being added. NAME is the
- name of the symbol which caused the archive element to be pulled
- in. */
- bfd_boolean (*add_archive_element)
- (struct bfd_link_info *, bfd *abfd, const char *name);
- /* A function which is called when a symbol is found with multiple
- definitions. NAME is the symbol which is defined multiple times.
- OBFD is the old BFD, OSEC is the old section, OVAL is the old
- value, NBFD is the new BFD, NSEC is the new section, and NVAL is
- the new value. OBFD may be NULL. OSEC and NSEC may be
- bfd_com_section or bfd_ind_section. */
- bfd_boolean (*multiple_definition)
- (struct bfd_link_info *, const char *name,
- bfd *obfd, asection *osec, bfd_vma oval,
- bfd *nbfd, asection *nsec, bfd_vma nval);
- /* A function which is called when a common symbol is defined
- multiple times. NAME is the symbol appearing multiple times.
- OBFD is the BFD of the existing symbol; it may be NULL if this is
- not known. OTYPE is the type of the existing symbol, which may
- be bfd_link_hash_defined, bfd_link_hash_defweak,
- bfd_link_hash_common, or bfd_link_hash_indirect. If OTYPE is
- bfd_link_hash_common, OSIZE is the size of the existing symbol.
- NBFD is the BFD of the new symbol. NTYPE is the type of the new
- symbol, one of bfd_link_hash_defined, bfd_link_hash_common, or
- bfd_link_hash_indirect. If NTYPE is bfd_link_hash_common, NSIZE
- is the size of the new symbol. */
- bfd_boolean (*multiple_common)
- (struct bfd_link_info *, const char *name,
- bfd *obfd, enum bfd_link_hash_type otype, bfd_vma osize,
- bfd *nbfd, enum bfd_link_hash_type ntype, bfd_vma nsize);
- /* A function which is called to add a symbol to a set. ENTRY is
- the link hash table entry for the set itself (e.g.,
- __CTOR_LIST__). RELOC is the relocation to use for an entry in
- the set when generating a relocatable file, and is also used to
- get the size of the entry when generating an executable file.
- ABFD, SEC and VALUE identify the value to add to the set. */
- bfd_boolean (*add_to_set)
- (struct bfd_link_info *, struct bfd_link_hash_entry *entry,
- bfd_reloc_code_real_type reloc, bfd *abfd, asection *sec, bfd_vma value);
- /* A function which is called when the name of a g++ constructor or
- destructor is found. This is only called by some object file
- formats. CONSTRUCTOR is TRUE for a constructor, FALSE for a
- destructor. This will use BFD_RELOC_CTOR when generating a
- relocatable file. NAME is the name of the symbol found. ABFD,
- SECTION and VALUE are the value of the symbol. */
- bfd_boolean (*constructor)
- (struct bfd_link_info *, bfd_boolean constructor, const char *name,
- bfd *abfd, asection *sec, bfd_vma value);
- /* A function which is called to issue a linker warning. For
- example, this is called when there is a reference to a warning
- symbol. WARNING is the warning to be issued. SYMBOL is the name
- of the symbol which triggered the warning; it may be NULL if
- there is none. ABFD, SECTION and ADDRESS identify the location
- which trigerred the warning; either ABFD or SECTION or both may
- be NULL if the location is not known. */
- bfd_boolean (*warning)
- (struct bfd_link_info *, const char *warning, const char *symbol,
- bfd *abfd, asection *section, bfd_vma address);
- /* A function which is called when a relocation is attempted against
- an undefined symbol. NAME is the symbol which is undefined.
- ABFD, SECTION and ADDRESS identify the location from which the
- reference is made. FATAL indicates whether an undefined symbol is
- a fatal error or not. In some cases SECTION may be NULL. */
- bfd_boolean (*undefined_symbol)
- (struct bfd_link_info *, const char *name, bfd *abfd,
- asection *section, bfd_vma address, bfd_boolean fatal);
- /* A function which is called when a reloc overflow occurs. ENTRY is
- the link hash table entry for the symbol the reloc is against.
- NAME is the name of the local symbol or section the reloc is
- against, RELOC_NAME is the name of the relocation, and ADDEND is
- any addend that is used. ABFD, SECTION and ADDRESS identify the
- location at which the overflow occurs; if this is the result of a
- bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
- ABFD will be NULL. */
- bfd_boolean (*reloc_overflow)
- (struct bfd_link_info *, struct bfd_link_hash_entry *entry,
- const char *name, const char *reloc_name, bfd_vma addend,
- bfd *abfd, asection *section, bfd_vma address);
- /* A function which is called when a dangerous reloc is performed.
- MESSAGE is an appropriate message.
- ABFD, SECTION and ADDRESS identify the location at which the
- problem occurred; if this is the result of a
- bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
- ABFD will be NULL. */
- bfd_boolean (*reloc_dangerous)
- (struct bfd_link_info *, const char *message,
- bfd *abfd, asection *section, bfd_vma address);
- /* A function which is called when a reloc is found to be attached
- to a symbol which is not being written out. NAME is the name of
- the symbol. ABFD, SECTION and ADDRESS identify the location of
- the reloc; if this is the result of a
- bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
- ABFD will be NULL. */
- bfd_boolean (*unattached_reloc)
- (struct bfd_link_info *, const char *name,
- bfd *abfd, asection *section, bfd_vma address);
- /* A function which is called when a symbol in notice_hash is
- defined or referenced. NAME is the symbol. ABFD, SECTION and
- ADDRESS are the value of the symbol. If SECTION is
- bfd_und_section, this is a reference. */
- bfd_boolean (*notice)
- (struct bfd_link_info *, const char *name,
- bfd *abfd, asection *section, bfd_vma address);
- /* Error or warning link info message. */
- void (*einfo)
- (const char *fmt, ...);
- /* General link info message. */
- void (*info)
- (const char *fmt, ...);
- /* Message to be printed in linker map file. */
- void (*minfo)
- (const char *fmt, ...);
- /* This callback provides a chance for users of the BFD library to
- override its decision about whether to place two adjacent sections
- into the same segment. */
- bfd_boolean (*override_segment_assignment)
- (struct bfd_link_info *, bfd * abfd,
- asection * current_section, asection * previous_section,
- bfd_boolean new_segment);
-};
-
-/* The linker builds link_order structures which tell the code how to
- include input data in the output file. */
-
-/* These are the types of link_order structures. */
-
-enum bfd_link_order_type
-{
- bfd_undefined_link_order, /* Undefined. */
- bfd_indirect_link_order, /* Built from a section. */
- bfd_data_link_order, /* Set to explicit data. */
- bfd_section_reloc_link_order, /* Relocate against a section. */
- bfd_symbol_reloc_link_order /* Relocate against a symbol. */
-};
-
-/* This is the link_order structure itself. These form a chain
- attached to the output section whose contents they are describing. */
-
-struct bfd_link_order
-{
- /* Next link_order in chain. */
- struct bfd_link_order *next;
- /* Type of link_order. */
- enum bfd_link_order_type type;
- /* Offset within output section. */
- bfd_vma offset;
- /* Size within output section. */
- bfd_size_type size;
- /* Type specific information. */
- union
- {
- struct
- {
- /* Section to include. If this is used, then
- section->output_section must be the section the
- link_order is attached to, section->output_offset must
- equal the link_order offset field, and section->size
- must equal the link_order size field. Maybe these
- restrictions should be relaxed someday. */
- asection *section;
- } indirect;
- struct
- {
- /* Size of contents, or zero when contents size == size
- within output section.
- A non-zero value allows filling of the output section
- with an arbitrary repeated pattern. */
- unsigned int size;
- /* Data to put into file. */
- bfd_byte *contents;
- } data;
- struct
- {
- /* Description of reloc to generate. Used for
- bfd_section_reloc_link_order and
- bfd_symbol_reloc_link_order. */
- struct bfd_link_order_reloc *p;
- } reloc;
- } u;
-};
-
-/* A linker order of type bfd_section_reloc_link_order or
- bfd_symbol_reloc_link_order means to create a reloc against a
- section or symbol, respectively. This is used to implement -Ur to
- generate relocs for the constructor tables. The
- bfd_link_order_reloc structure describes the reloc that BFD should
- create. It is similar to a arelent, but I didn't use arelent
- because the linker does not know anything about most symbols, and
- any asymbol structure it creates will be partially meaningless.
- This information could logically be in the bfd_link_order struct,
- but I didn't want to waste the space since these types of relocs
- are relatively rare. */
-
-struct bfd_link_order_reloc
-{
- /* Reloc type. */
- bfd_reloc_code_real_type reloc;
-
- union
- {
- /* For type bfd_section_reloc_link_order, this is the section
- the reloc should be against. This must be a section in the
- output BFD, not any of the input BFDs. */
- asection *section;
- /* For type bfd_symbol_reloc_link_order, this is the name of the
- symbol the reloc should be against. */
- const char *name;
- } u;
-
- /* Addend to use. The object file should contain zero. The BFD
- backend is responsible for filling in the contents of the object
- file correctly. For some object file formats (e.g., COFF) the
- addend must be stored into in the object file, and for some
- (e.g., SPARC a.out) it is kept in the reloc. */
- bfd_vma addend;
-};
-
-/* Allocate a new link_order for a section. */
-extern struct bfd_link_order *bfd_new_link_order (bfd *, asection *);
-
-/* These structures are used to describe version information for the
- ELF linker. These structures could be manipulated entirely inside
- BFD, but it would be a pain. Instead, the regular linker sets up
- these structures, and then passes them into BFD. */
-
-/* Glob pattern for a version. */
-
-struct bfd_elf_version_expr
-{
- /* Next glob pattern for this version. */
- struct bfd_elf_version_expr *next;
- /* Glob pattern. */
- const char *pattern;
- /* Set if pattern is not a glob. */
- unsigned int literal : 1;
- /* Defined by ".symver". */
- unsigned int symver : 1;
- /* Defined by version script. */
- unsigned int script : 1;
- /* Pattern type. */
-#define BFD_ELF_VERSION_C_TYPE 1
-#define BFD_ELF_VERSION_CXX_TYPE 2
-#define BFD_ELF_VERSION_JAVA_TYPE 4
- unsigned int mask : 3;
-};
-
-struct bfd_elf_version_expr_head
-{
- /* List of all patterns, both wildcards and non-wildcards. */
- struct bfd_elf_version_expr *list;
- /* Hash table for non-wildcards. */
- void *htab;
- /* Remaining patterns. */
- struct bfd_elf_version_expr *remaining;
- /* What kind of pattern types are present in list (bitmask). */
- unsigned int mask;
-};
-
-/* Version dependencies. */
-
-struct bfd_elf_version_deps
-{
- /* Next dependency for this version. */
- struct bfd_elf_version_deps *next;
- /* The version which this version depends upon. */
- struct bfd_elf_version_tree *version_needed;
-};
-
-/* A node in the version tree. */
-
-struct bfd_elf_version_tree
-{
- /* Next version. */
- struct bfd_elf_version_tree *next;
- /* Name of this version. */
- const char *name;
- /* Version number. */
- unsigned int vernum;
- /* Regular expressions for global symbols in this version. */
- struct bfd_elf_version_expr_head globals;
- /* Regular expressions for local symbols in this version. */
- struct bfd_elf_version_expr_head locals;
- /* List of versions which this version depends upon. */
- struct bfd_elf_version_deps *deps;
- /* Index of the version name. This is used within BFD. */
- unsigned int name_indx;
- /* Whether this version tree was used. This is used within BFD. */
- int used;
- /* Matching hook. */
- struct bfd_elf_version_expr *(*match)
- (struct bfd_elf_version_expr_head *head,
- struct bfd_elf_version_expr *prev, const char *sym);
-};
-
-struct bfd_elf_dynamic_list
-{
- struct bfd_elf_version_expr_head head;
- struct bfd_elf_version_expr *(*match)
- (struct bfd_elf_version_expr_head *head,
- struct bfd_elf_version_expr *prev, const char *sym);
-};
-
-#endif
diff --git a/include/binary-io.h b/include/binary-io.h
deleted file mode 100644
index 2984271..0000000
--- a/include/binary-io.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Binary mode I/O.
- Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#ifndef _BINARY_H
-#define _BINARY_H
-
-/* Include this header after <fcntl.h> and <stdio.h>, because
- systems that distinguish between text and binary I/O usually
- define O_BINARY in <fcntl.h>, and the MSVC7 <stdio.h> doesn't
- like to be included after '#define fileno ...'
-
- We don't include <fcntl.h> here because not all systems have
- that header. */
-
-#if !defined O_BINARY && defined _O_BINARY
- /* For MSC-compatible compilers. */
-# define O_BINARY _O_BINARY
-# define O_TEXT _O_TEXT
-#endif
-#ifdef __BEOS__
- /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
-# undef O_BINARY
-# undef O_TEXT
-#endif
-#if O_BINARY
-# if defined __EMX__ || defined __DJGPP__ || defined __CYGWIN__
-# include <io.h> /* declares setmode() */
-# else
-# define setmode _setmode
-# undef fileno
-# define fileno _fileno
-# endif
-# ifdef __DJGPP__
-# include <unistd.h> /* declares isatty() */
-# /* Avoid putting stdin/stdout in binary mode if it is connected to the
-# console, because that would make it impossible for the user to
-# interrupt the program through Ctrl-C or Ctrl-Break. */
-# define SET_BINARY(fd) (!isatty (fd) ? (setmode (fd, O_BINARY), 0) : 0)
-# else
-# define SET_BINARY(fd) setmode (fd, O_BINARY)
-# endif
-#else
- /* On reasonable systems, binary I/O is the default. */
-# undef O_BINARY
-# define O_BINARY 0
-# define SET_BINARY(fd) /* nothing */
-#endif
-
-#endif /* _BINARY_H */
diff --git a/include/bout.h b/include/bout.h
deleted file mode 100644
index 66a7bcf..0000000
--- a/include/bout.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/* This file is a modified version of 'a.out.h'. It is to be used in all
- GNU tools modified to support the i80960 (or tools that operate on
- object files created by such tools).
-
- Copyright 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* All i80960 development is done in a CROSS-DEVELOPMENT environment. I.e.,
- object code is generated on, and executed under the direction of a symbolic
- debugger running on, a host system. We do not want to be subject to the
- vagaries of which host it is or whether it supports COFF or a.out format,
- or anything else. We DO want to:
-
- o always generate the same format object files, regardless of host.
-
- o have an 'a.out' header that we can modify for our own purposes
- (the 80960 is typically an embedded processor and may require
- enhanced linker support that the normal a.out.h header can't
- accommodate).
-
- As for byte-ordering, the following rules apply:
-
- o Text and data that is actually downloaded to the target is always
- in i80960 (little-endian) order.
-
- o All other numbers (in the header, symbols, relocation directives)
- are in host byte-order: object files CANNOT be lifted from a
- little-end host and used on a big-endian (or vice versa) without
- modification.
- ==> THIS IS NO LONGER TRUE USING BFD. WE CAN GENERATE ANY BYTE ORDER
- FOR THE HEADER, AND READ ANY BYTE ORDER. PREFERENCE WOULD BE TO
- USE LITTLE-ENDIAN BYTE ORDER THROUGHOUT, REGARDLESS OF HOST. <==
-
- o The downloader ('comm960') takes care to generate a pseudo-header
- with correct (i80960) byte-ordering before shipping text and data
- off to the NINDY monitor in the target systems. Symbols and
- relocation info are never sent to the target. */
-
-#define BMAGIC 0415
-/* We don't accept the following (see N_BADMAG macro).
- They're just here so GNU code will compile. */
-#define OMAGIC 0407 /* old impure format */
-#define NMAGIC 0410 /* read-only text */
-#define ZMAGIC 0413 /* demand load format */
-
-/* FILE HEADER
- All 'lengths' are given as a number of bytes.
- All 'alignments' are for relinkable files only; an alignment of
- 'n' indicates the corresponding segment must begin at an
- address that is a multiple of (2**n). */
-struct external_exec
- {
- /* Standard stuff */
- unsigned char e_info[4]; /* Identifies this as a b.out file */
- unsigned char e_text[4]; /* Length of text */
- unsigned char e_data[4]; /* Length of data */
- unsigned char e_bss[4]; /* Length of uninitialized data area */
- unsigned char e_syms[4]; /* Length of symbol table */
- unsigned char e_entry[4]; /* Runtime start address */
- unsigned char e_trsize[4]; /* Length of text relocation info */
- unsigned char e_drsize[4]; /* Length of data relocation info */
-
- /* Added for i960 */
- unsigned char e_tload[4]; /* Text runtime load address */
- unsigned char e_dload[4]; /* Data runtime load address */
- unsigned char e_talign[1]; /* Alignment of text segment */
- unsigned char e_dalign[1]; /* Alignment of data segment */
- unsigned char e_balign[1]; /* Alignment of bss segment */
- unsigned char e_relaxable[1];/* Assembled with enough info to allow linker to relax */
- };
-
-#define EXEC_BYTES_SIZE (sizeof (struct external_exec))
-
-/* These macros use the a_xxx field names, since they operate on the exec
- structure after it's been byte-swapped and realigned on the host machine. */
-#define N_BADMAG(x) (((x).a_info)!=BMAGIC)
-#define N_TXTOFF(x) EXEC_BYTES_SIZE
-#define N_DATOFF(x) ( N_TXTOFF(x) + (x).a_text )
-#define N_TROFF(x) ( N_DATOFF(x) + (x).a_data )
-#define N_TRELOFF N_TROFF
-#define N_DROFF(x) ( N_TROFF(x) + (x).a_trsize )
-#define N_DRELOFF N_DROFF
-#define N_SYMOFF(x) ( N_DROFF(x) + (x).a_drsize )
-#define N_STROFF(x) ( N_SYMOFF(x) + (x).a_syms )
-#define N_DATADDR(x) ( (x).a_dload )
-
-/* Address of text segment in memory after it is loaded. */
-#if !defined (N_TXTADDR)
-#define N_TXTADDR(x) 0
-#endif
-
-/* A single entry in the symbol table. */
-struct nlist
- {
- union
- {
- char* n_name;
- struct nlist * n_next;
- long n_strx; /* Index into string table */
- } n_un;
-
- unsigned char n_type; /* See below */
- char n_other; /* Used in i80960 support -- see below */
- short n_desc;
- unsigned long n_value;
- };
-
-
-/* Legal values of n_type. */
-#define N_UNDF 0 /* Undefined symbol */
-#define N_ABS 2 /* Absolute symbol */
-#define N_TEXT 4 /* Text symbol */
-#define N_DATA 6 /* Data symbol */
-#define N_BSS 8 /* BSS symbol */
-#define N_FN 31 /* Filename symbol */
-
-#define N_EXT 1 /* External symbol (OR'd in with one of above) */
-#define N_TYPE 036 /* Mask for all the type bits */
-#define N_STAB 0340 /* Mask for all bits used for SDB entries */
-
-/* MEANING OF 'n_other'
-
- If non-zero, the 'n_other' fields indicates either a leaf procedure or
- a system procedure, as follows:
-
- 1 <= n_other <= 32 :
- The symbol is the entry point to a system procedure.
- 'n_value' is the address of the entry, as for any other
- procedure. The system procedure number (which can be used in
- a 'calls' instruction) is (n_other-1). These entries come from
- '.sysproc' directives.
-
- n_other == N_CALLNAME
- the symbol is the 'call' entry point to a leaf procedure.
- The *next* symbol in the symbol table must be the corresponding
- 'bal' entry point to the procedure (see following). These
- entries come from '.leafproc' directives in which two different
- symbols are specified (the first one is represented here).
-
-
- n_other == N_BALNAME
- the symbol is the 'bal' entry point to a leaf procedure.
- These entries result from '.leafproc' directives in which only
- one symbol is specified, or in which the same symbol is
- specified twice.
-
- Note that an N_CALLNAME entry *must* have a corresponding N_BALNAME entry,
- but not every N_BALNAME entry must have an N_CALLNAME entry. */
-#define N_CALLNAME ((char)-1)
-#define N_BALNAME ((char)-2)
-#define IS_CALLNAME(x) (N_CALLNAME == (x))
-#define IS_BALNAME(x) (N_BALNAME == (x))
-#define IS_OTHER(x) ((x)>0 && (x) <=32)
-
-#define b_out_relocation_info relocation_info
-struct relocation_info
- {
- int r_address; /* File address of item to be relocated. */
- unsigned
-#define r_index r_symbolnum
- r_symbolnum:24, /* Index of symbol on which relocation is based,
- if r_extern is set. Otherwise set to
- either N_TEXT, N_DATA, or N_BSS to
- indicate section on which relocation is
- based. */
- r_pcrel:1, /* 1 => relocate PC-relative; else absolute
- On i960, pc-relative implies 24-bit
- address, absolute implies 32-bit. */
- r_length:2, /* Number of bytes to relocate:
- 0 => 1 byte
- 1 => 2 bytes -- used for 13 bit pcrel
- 2 => 4 bytes. */
- r_extern:1,
- r_bsr:1, /* Something for the GNU NS32K assembler. */
- r_disp:1, /* Something for the GNU NS32K assembler. */
- r_callj:1, /* 1 if relocation target is an i960 'callj'. */
- r_relaxable:1; /* 1 if enough info is left to relax the data. */
-};
diff --git a/include/coff/ChangeLog b/include/coff/ChangeLog
deleted file mode 100644
index ef5852a..0000000
--- a/include/coff/ChangeLog
+++ /dev/null
@@ -1,149 +0,0 @@
-2008-06-17 Nick Clifton <nickc@redhat.com>
-
- * ti.h (GET_SCNHDR_NLNNO): Provide an alternative version of this
- macro which does not trigger an array bounds warning in gcc.
- (PUT_SCNHDR_NLNNO): Likewise.
- (GET_SCNHDR_FLAGS): Likewise.
- (PUT_SCNHDR_FLAGS): Likewise.
- (GET_SCNHDR_PAGE): Likewise.
- (PUT_SCNHDR_PAGE): Likewise.
-
-2007-11-05 Danny Smith <dannysmith@users.sourceforge.net>
-
- * pe.h (COFF_ENCODE_ALIGNMENT) Define.
-
-2007-08-02 H.J. Lu <hongjiu.lu@intel.com>
-
- * pe.h (IMAGE_SCN_ALIGN_POWER_BIT_POS): New.
- (IMAGE_SCN_ALIGN_POWER_BIT_MASK): Likewise.
- (IMAGE_SCN_ALIGN_POWER_NUM): Likewise.
- (IMAGE_SCN_ALIGN_POWER_CONST): Likewise.
- (IMAGE_SCN_ALIGN_128BYTES): Likewise.
- (IMAGE_SCN_ALIGN_256BYTES): Likewise.
- (IMAGE_SCN_ALIGN_512BYTES): Likewise.
- (IMAGE_SCN_ALIGN_1024BYTES): Likewise.
- (IMAGE_SCN_ALIGN_2048BYTES): Likewise.
- (IMAGE_SCN_ALIGN_4096BYTES): Likewise.
- (IMAGE_SCN_ALIGN_8192BYTES): Likewise.
- (IMAGE_SCN_ALIGN_1BYTES): Redefined with
- IMAGE_SCN_ALIGN_POWER_CONST.
- (IMAGE_SCN_ALIGN_2BYTES): Likewise.
- (IMAGE_SCN_ALIGN_4BYTES): Likewise.
- (IMAGE_SCN_ALIGN_8BYTES): Likewise.
- (IMAGE_SCN_ALIGN_16BYTES): Likewise.
- (IMAGE_SCN_ALIGN_32BYTES): Likewise.
- (IMAGE_SCN_ALIGN_64BYTES): Likewise.
-
-2007-07-12 Kai Tietz <kai.tietz@onevision.com>
-
- * internal.h (struct internal_syment): Use bfd_hostptr_t for
- _n_zeroes and _n_offset fields.
-
-2007-04-27 Alan Modra <amodra@bigpond.net.au>
-
- * rs6000.h: Write Mimi's name in ASCII.
-
-2007-03-19 H.J. Lu <hongjiu.lu@intel.com>
-
- * internal.h (internal_extra_pe_aouthdr): Add Magic,
- MajorLinkerVersion, MinorLinkerVersion, SizeOfCode,
- SizeOfInitializedData, SizeOfUninitializedData,
- AddressOfEntryPoint, BaseOfCode and BaseOfData.
-
-2006-12-05 Michael Tautschnig <tautschn@model.in.tum.de>
- Nick Clifton <nickc@redhat.com>
-
- * external.h (struct external_aouthdr): Add ATTRIBUTE_PACKED.
- (struct external_syment): Likewise.
- (union external_auxent): Likewise.
-
-2006-11-14 Phil Lello <phil.lello@homecall.co.uk>
-
- * pe.h: Added defines for IMAGE_SUBSYSTEM_EFI_ROM and
- IMAGE_SUBSYSTEM_XBOX.
- * internal.h: Added defines for PE directory entry types.
- NB: in internal.h because IMAGE_NUMBEROF_DIRECTORY_ENTRYIES is in
- pe.h
-
-2006-09-20 Kai Tietz <Kai.Tietz@onevision.com>
-
- * external.h: Add proper external_aouthdr64 structure (without
- data_start member).
- (AOUTHDRSZ64): Set according structure size.
- (AOUTHDR64): As typedef of external_aouthdr64 structure.
- * internal.h: Add relocation identifiers for coff.
- * pe.h: Add define IMAGE_FILE_MACHINE_AMD64 the coff signature.
- (PEPAOUTHDR): Adjust structure to have proper size (using AOUTHDR64).
- (PEPAOUTSZ): Calculated size of 240.
- * x86_64.h: Coff information for x86_64 (AMD64).
-
-2006-02-05 Arnold Metselaar <arnold.metselaar@planet.nl>
-
- * internal.h: Add relocation number R_IMM24 for Z80.
-
-2005-10-25 Arnold Metselaar <arnold.metselaar@planet.nl>
-
- * internal.h: Add relocation number for Z80
- * z80.h: New file.
-
-2005-08-18 Alan Modra <amodra@bigpond.net.au>
-
- * a29k.h: Delete.
-
-2005-07-14 Daniel Marques <marques@cs.cornell.edu>
-
- * alpha.h (ALPHA_ECOFF_COMPRESSEDMAG): Define.
- * ecoff.h (ALPHA_MAGIC_COMPRESSED): Define.
-
-2005-05-10 Nick Clifton <nickc@redhat.com>
-
- * Update the address and phone number of the FSF organization in
- the GPL notices in the following files:
- a29k.h, alpha.h, apollo.h, arm.h, aux-coff.h, ecoff.h, external.h,
- go32exe.h, h8300.h, h8500.h, i386.h, i860.h, i960.h, ia64.h,
- internal.h, m68k.h, m88k.h, maxq.h, mcore.h, mips.h, mipspe.h,
- or32.h, pe.h, powerpc.h, rs6k64.h, sh.h, sparc.h, ti.h, tic30.h,
- tic4x.h, tic54x.h, tic80.h, w65.h, we32k.h, xcoff.h, z8k.h
-
-2005-02-21 Alan Modra <amodra@bigpond.net.au>
-
- * xcoff.h (struct xcoff_loader_info): Warning fix.
-
-2005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
-
- * maxq.h (F_MAXQ10, F_MAXQ20): Define.
-
-2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
- Vineet Sharma <vineets@noida.hcltech.com>
-
- * maxq.h: New file: Defintions for the maxq port.
-
-2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
-
- * pe.h (IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY): Define.
- (IMAGE_WEAK_EXTERN_SEARCH_LIBRARY): Same.
- (IMAGE_WEAK_EXTERN_SEARCH_ALIAS): Same.
-
-2004-08-13 Mark Kettenis <kettenis@gnu.org>
-
- * symconst.h (langMax): Fix typo in comment.
-
-2004-04-23 Chris Demetriou <cgd@broadcom.com>
-
- * mips.h (MIPS_R_RELHI, MIPS_R_RELLO, MIPS_R_SWITCH): Remove
- (MIPS_R_PCREL16): Update comment.
- * ecoff.h (struct ecoff_value_adjust): Remove structure.
- (struct ecoff_debug_info): Remove 'adjust' member.
-
-2004-04-20 DJ Delorie <dj@redhat.com>
-
- * internal.h (R_SECREL32): Add.
-
-For older changes see ChangeLog-9103
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff --git a/include/coff/ChangeLog-9103 b/include/coff/ChangeLog-9103
deleted file mode 100644
index 98a7784..0000000
--- a/include/coff/ChangeLog-9103
+++ /dev/null
@@ -1,1177 +0,0 @@
-2005-04-13 H.J. Lu <hongjiu.lu@intel.com>
-
- Moved from ../ChangeLog
-
- 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
- * tic4x.h: Namespace cleanup. Replace s/c4x/tic4x
- and s/c3x/tic3x/
-
- 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
- * tic4x.h (TICOFF_TARGET_MACHINE_GET): Fixed define bug
- * ti.h (TICOFF_TARGET_MACHINE_GET): Added macros
-
- 2002-08-28 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
- * internal.h: Add new relocation types.
- * ti.h: Add file-header flags for tic4x code.
- * tic4x.h: New file
-
-2003-12-02 Graham Reed <grahamr@algorithmics.com>
-
- * internal.h (C_WEAKEXT): Add alternative value for AIX 5.2
- based targets.
-
-2003-08-23 Jason Eckhardt <jle@rice.edu>
-
- * coff/i860.h (COFF860_R_PAIR, COFF860_R_LOW0, COFF860_R_LOW1,
- COFF860_R_LOW2, COFF860_R_LOW3, COFF860_R_LOW4, COFF860_R_SPLIT0,
- COFF860_R_SPLIT1, COFF860_R_SPLIT2, COFF860_R_HIGHADJ,
- COFF860_R_BRADDR): Define new relocation constants and document.
- Minor formatting adjustments.
-
-2003-08-07 Alan Modra <amodra@bigpond.net.au>
-
- * ti.h (GET_SCNHDR_NRELOC): Rename PTR param to LOC.
- (PUT_SCNHDR_NRELOC, GET_SCNHDR_NLNNO, PUT_SCNHDR_NLNNO): Likewise.
- (GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Likewise.
- (GET_SCNHDR_PAGE, PUT_SCNHDR_PAGE): Likewise.
-
-2003-07-17 Jeff Muizelaar <muizelaar@rogers.com>
-
- * pe.h: (IMAGE_FILE_NET_RUN_FROM_SWAP): Define.
- (IMAGE_FILE_MACHINE_WCEMIPSV2): Define.
- (IMAGE_FILE_MACHINE_SH3DSP): Define.
- (IMAGE_FILE_MACHINE_SH3E): Define.
- (IMAGE_FILE_MACHINE_SH5): Define.
- (IMAGE_FILE_MACHINE_AM33): Define.
- (IMAGE_FILE_MACHINE_POWERPCFP): Define.
- (IMAGE_FILE_MACHINE_AXP64): Define.
- (IMAGE_FILE_MACHINE_TRICORE): Define.
- (IMAGE_FILE_MACHINE_CEF): Define.
- (IMAGE_FILE_MACHINE_EBC): Define.
- (IMAGE_FILE_MACHINE_AMD64): Define.
- (IMAGE_FILE_MACHINE_M32R): Define.
- (IMAGE_FILE_MACHINE_CEE): Define.
-
-2003-07-14 Christian Groessler <chris@groessler.org>
-
- * i860.h (AOUTSZ): Define for i860 coff.
-
-2003-06-29 Andreas Jaeger <aj@suse.de>
-
- * xcoff.h (struct __rtinit ): Convert to ISO C90 prototypes.
-
- * ecoff.h: Convert to ISO C90 prototypes. Replace PTR by void *.
-
-2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
-
- * coff/h8300.h (H8300HNMAGIC, H8300SNMAGIC): New.
- (H8300HNBADMAG, H8300SNBADMAG): New.
-
-2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
-
- * sh.h: Replace occurrances of 'Hitachi' with 'Renesas'.
- * h8300.h: Likewise.
- * h8500.h: Likewise.
-
-2003-03-25 Stan Cox <scox@redhat.com>
- Nick Clifton <nickc@redhat.com>
-
- Contribute support for Intel's iWMMXt chip - an ARM variant:
-
- * arm.h (ARM_NOTE_SECTION): Define.
-
-2002-11-30 Alan Modra <amodra@bigpond.net.au>
-
- * ecoff.h: Replace boolean with bfd_boolean.
- * xcoff.h: Likewise.
-
-2002-03-18 Tom Rix <trix@redhat.com>
-
- * rs6k64.h: Add U64_TOCMAGIC, AIX 5 64 bit magic number.
-
-2002-02-01 Tom Rix <trix@redhat.com>
-
- * xcoff.h: Conditionally support <aiaff> for pre AIX 4.3.
-
-2002-01-31 Ivan Guzvinec <ivang@opencores.org>
-
- * or32.h: New file.
-
-2001-12-24 Tom Rix <trix@redhat.com>
-
- * xcoff.h (xcoff_big_format_p): Make <bigaf> the default archive
- format.
- (XCOFFARMAG_ELEMENT_SIZE, XCOFFARMAGBIG_ELEMENT_SIZE): Define for
- archive header ascii elements.
-
-2001-12-17 Tom Rix <trix@redhat.com>
-
- * xcoff.h : Add .except and .typchk section string and styp flags.
- Fix xcoff_big_format_p macro.
-
-2001-12-16 Tom Rix <trix@redhat.com>
-
- * xcoff.h : Clean up formatting.
-
-2002-01-15 Richard Earnshaw <rearnsha@arm.com>
-
- * arm.h (F_VFP_FLOAT): Define.
-
-2001-11-11 Timothy Wall <twall@alum.mit.edu>
-
- * ti.h: Move arch-specific stuff from here...
- (COFF_ADJUST_SYM_IN/OUT): Optionally put page flag into symbol
- value.
- * tic54x.h: ...to here.
-
-2001-10-26 Christian Groessler <cpg@aladdin.de>
-
- * external.h (GET_LINENO_LNNO): Fix usage of H_GET_32/16.
- (PUT_LINENO_LNNO): Likewise with H_PUT_32/16.
-
-2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
-
- * ti.h (GET_SCNHDR_PAGE): Fix compile time warning.
-
-2001-09-18 Alan Modra <amodra@bigpond.net.au>
-
- * external.h (GET_LINENO_LNNO): Use H_GET_32/16.
- (PUT_LINENO_LNNO): Use H_PUT_32/16.
- * m88k.h (GET_LNSZ_SIZE, GET_LNSZ_LNNO, GET_SCN_NRELOC,
- GET_SCN_NLINNO): Use H_GET_32.
- (PUT_LNSZ_LNNO, PUT_LNSZ_SIZE, PUT_SCN_NRELOC, PUT_SCN_NLINNO):
- Use H_PUT_32.
- * ti.h: Formatting fixes. Make use of H_GET_* and H_PUT_* throughout.
- * xcoff.h: White space changes.
-
-2001-09-05 Tom Rix <trix@redhat.com>
-
- * xcoff.h : Add XCOFF_SYSCALL32 and XCOFF_SYSCALL64 hash table flags.
-
-2001-08-27 Andreas Jaeger <aj@suse.de>
-
- * xcoff.h (struct __rtinit): Make proper prototype for rtl.
-
-Fri Aug 24 01:18:51 2001 J"orn Rennecke <amylaar@redhat.com>
-
- * internal.h (R_JMP2, R_JMPL2, R_MOVL2): Comment spelling fix.
-
-2001-04-05 Tom Rix <trix@redhat.com>
-
- * rs6000.h : move xcoff32 external structures from xcofflink.
- * rs6k64.h : move xcoff64 external structures from xcofflink.
- * internal.h : promote 32 bit structure elements to 64 bit
- for xcoff64 support
- * xcoff.h : New file.
-
-2001-03-23 Nick Clifton <nickc@redhat.com>
-
- * a29k.h: Fix compile time warning.
- * external.h: Fix compile time warning.
- * m88k.h: Fix compile time warning.
-
-2001-03-13 Nick Clifton <nickc@redhat.com>
-
- * external.h: New file. Common structure definitions found in
- other COFF header files.
-
- * a29k.h: Use external.h.
- * apollo.h: Use external.h.
- * arm.h: Use external.h.
- * h8300.h: Use external.h.
- * h8500.h: Use external.h.
- * i386.h: Use external.h.
- * i860.h: Use external.h.
- * ia64.h: Use external.h.
- * m68k.h: Use external.h.
- * m88k.h: Use external.h.
- * mcore.h: Use external.h.
- * mips.h: Use external.h.
- * mipspe.h: Use external.h.
- * powerpc.h: Use external.h.
- * rs6000.h: Use external.h.
- * rs6k64.h: Use external.h.
- * sh.h: Use external.h.
- * sparc.h: Use external.h.
- * tic30.h: Use external.h.
- * tic80.h: Use external.h.
- * w65.h: Use external.h.
- * we32k.h: Use external.h.
- * z8k.h: Use external.h.
-
-2001-02-09 David Mosberger <davidm@hpl.hp.com>
-
- * pe.h (PEPAOUTSZ): Rename from PEP64AOUTSZ.
- Rename from PEPAOUTHDR.
-
-2001-01-23 H.J. Lu <hjl@gnu.org>
-
- * pe.h (struct external_PEI_DOS_hdr): New.
- (struct external_PEI_IMAGE_hdr): New.
-
-2000-12-11 Alan Modra <alan@linuxcare.com.au>
-
- * ti.h (OCTETS_PER_BYTE_POWER): Change #warning to #error.
-
-2000-12-08 Alan Modra <alan@linuxcare.com.au>
-
- * ti.h (OCTETS_PER_BYTE_POWER): Change #warn to #warning.
-
-2000-06-30 DJ Delorie <dj@cygnus.com>
-
- * pe.h: Clarify a comment.
-
-2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
-
- * rs6k64.h (U802TOC64MAGIC): Change to U803XTOCMAGIC.
-
-2000-04-24 Clinton Popetz <cpopetz@cygnus.com>
-
- * rs6k64.h: New file.
-
-2000-04-17 Timothy Wall <twall@cygnus.com>
-
- * ti.h: Load page cleanup.
- * intental.h: Add load page field.
-
-Mon Apr 17 16:44:01 2000 David Mosberger <davidm@hpl.hp.com>
-
- * pe.h (PEP64AOUTHDR): New header for PE+.
- (PEP64AOUTSZ): New macro.
- (IMAGE_SUBSYSTEM_UNKNOWN): New macro.
- (IMAGE_SUBSYSTEM_NATIVE): Ditto.
- (IMAGE_SUBSYSTEM_WINDOWS_GUI): Ditto.
- (IMAGE_SUBSYSTEM_WINDOWS_CUI): Ditto.
- (IMAGE_SUBSYSTEM_POSIX_CUI): Ditto.
- (IMAGE_SUBSYSTEM_WINDOWS_CE_GUI): Ditto.
- (IMAGE_SUBSYSTEM_EFI_APPLICATION): Ditto.
- (IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER): Ditto.
- (IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER): Ditto.
- * internal.h (PE_DEF_FILE_ALIGNMENT): Define only if not defined
- already.
- * ia64.h: New file.
-
-2000-04-13 Alan Modra <alan@linuxcare.com.au>
-
- * ti.h (ADDR_MASK): Don't use ul suffix on constants.
- (PG_MASK): Ditto.
-
-2000-04-11 Timothy Wall <twall@cygnus.com>
-
- * ti.h: Remove load page references until load pages are
- reimplemented.
- * tic54x.h: Ditto.
-
-2000-04-07 Timothy Wall <twall@cygnus.com>
-
- * internal.h: Fix some comments related to TI COFF (instead of tic80).
- * ti.h: New.
- * tic54x.h: New.
-
-Wed Apr 5 22:08:41 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * sh.h (R_SH_LOOP_START, R_SH_LOOP_END): Define.
-
-2000-03-15 Kazu Hirata <kazu@hxi.com>
-
- * internal.h: Fix a typo in the comment for R_MOVL2.
-
-2000-02-28 Nick Clifton <nickc@cygnus.com>
-
- * mipspe.h (MIPS_PE_MAGIC): Define.
- * sh.h (SH_PE_MAGIC): Define.
-
-2000-02-22 Nick Clifton <nickc@cygnus.com> DJ Delorie <dj@cygnus.com>
-
- * sh.h: Add Windows CE definitions.
- * arm.h: Add Windows CE definitions.
- * mipspe.h: New file: Windows CE definitions for MIPS.
- * pe.h: Add constants for ILF support.
-
-2000-01-05 Nick Clifton <nickc@cygnus.com>
-
- * pe.h: Fix formatting of comments.
- (IMAGE_FILE_AGGRESSIVE_WS_TRIM): Define.
- (IMAGE_FILE_LARGE_ADDRESS_AWARE): Define.
- (IMAGE_FILE_16BIT_MACHINE): Define.
- (IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP): Define.
- (IMAGE_FILE_UP_SYSTEM_ONLY): Define.
- (IMAGE_FILE_MACHINE_UNKNOWN): Define.
- (IMAGE_FILE_MACHINE_ALPHA): Define.
- (IMAGE_FILE_MACHINE_ALPHA64): Define.
- (IMAGE_FILE_MACHINE_I386): Define.
- (IMAGE_FILE_MACHINE_IA64): Define.
- (IMAGE_FILE_MACHINE_M68K): Define.
- (IMAGE_FILE_MACHINE_MIPS16): Define.
- (IMAGE_FILE_MACHINE_MIPSFPU): Define.
- (IMAGE_FILE_MACHINE_MIPSFPU16): Define.
- (IMAGE_FILE_MACHINE_POWERPC): Define.
- (IMAGE_FILE_MACHINE_R3000): Define.
- (IMAGE_FILE_MACHINE_R4000): Define.
- (IMAGE_FILE_MACHINE_R10000): Define.
- (IMAGE_FILE_MACHINE_SH3): Define.
- (IMAGE_FILE_MACHINE_SH4): Define.
- (IMAGE_FILE_MACHINE_THUMB): Define.
-
-1999-09-20 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * internal.h: Delete bogus R_PCLONG, duplicate R_RELBYTE and
- R_RELWORD, and rewrite some R_* as decimal.
-
-1999-09-06 Donn Terry <donn@interix.com>
-
- * internal.h (DTYPE): Define.
- * pe.h (struct external_PEI_filehdr): Rename from
- external_PE_filehdr. Define even if COFF_IMAGE_WITH_PE is not
- defined.
-
-1999-07-17 Nick Clifton <nickc@cygnus.com>
-
- * arm.h (F_SOFT_FLOAT): Rename from F_SOFTFLOAT.
-
-1999-06-21 Philip Blundell <pb@nexus.co.uk>
-
- * arm.h (F_SOFTFLOAT): Define.
-
-1999-07-05 Nick Clifton <nickc@cygnus.com>
-
- * arm.h (F_ARM_5): Define.
-
-Wed Jun 2 18:08:18 1999 Richard Henderson <rth@cygnus.com>
-
- * internal.h (BEOS_EXE_IMAGE_BASE, BEOS_DLL_IMAGE_BASE): New.
-
-Mon May 17 13:35:35 1999 Stan Cox <scox@cygnus.com>
-
- * arm.h (F_PIC, F_ARM_2, F_ARM_2a, F_ARM_3, F_ARM_3M,
- F_ARM_4, F_ARM_4T, F_APCS26): Changed values to distinguish
- F_ARM_2a, F_ARM_3M, F_ARM_4T.
-
-1999-05-15 Nick Clifton <nickc@cygnus.com>
-
- * mcore.h (IMAGE_REL_MCORE_RVA): Define.
-
-1999-04-21 Nick Clifton <nickc@cygnus.com>
-
- * mcore.h (GET_LINENO_LNNO): New macro.
- (PUT_LINENO_LNNO): New macro.
-
-1999-04-08 Nick Clifton <nickc@cygnus.com>
-
- * mcore.h: New header file. Defines for Motorola's MCore
- processor.
-
-Sun Dec 6 21:36:37 1998 Mark Elbrecht <snowball3@usa.net>
-
- * internal.h (C_WEAKEXT): Define.
-
-Wed Jan 27 13:35:35 1999 Stan Cox <scox@cygnus.com>
-
- * arm.h (F_PIC_INT, F_ARM_2, F_ARM_3, F_ARM_4, F_APCS26):
- Changed values to avoid clashing with IMAGE_FILE_* coff header
- flag values.
-
-Wed Apr 1 16:06:15 1998 Nick Clifton <nickc@cygnus.com>
-
- * internal.h: Document numbers associated with Thumb symbol
- types.
-
-Fri Mar 27 17:16:57 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * internal.h (ISPTR, ISFCN, ISARY): Add casts to unsigned long.
-
-Mon Feb 2 17:10:38 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU>
-
- * tic30.h: New file.
-
-Fri Dec 12 11:49:07 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80.h (R_MPPCR15W): New relocation type, for 15 bit PC relative
- offsets.
-
-Tue Dec 2 10:21:40 1997 Nick Clifton <nickc@cygnus.com>
-
- * arm.h (COFFARM): New define.
-
-Mon Dec 1 20:24:18 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * sh.h (R_SH_SWITCH8): New.
-
-Sat Nov 22 15:10:14 1997 Nick Clifton <nickc@cygnus.com>
-
- * internal.h (C_THUMBEXTFUNC, C_THUMBSTATFUNC): Constants to
- define static and external functions.
-
- * arm.h: Add bits to support PIC and APCS-FLOAT type binaries,
- when implemented.
-
-Fri Oct 3 14:25:17 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80.h (R_PPL16B): Make constant uppercase for consistency.
-
-Tue Jul 22 18:18:58 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
-
- * go32exe.h: New file.
-
-Tue Jul 8 12:23:55 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80.h (TIC80_TARGET_ID): Add define.
- * internal.h (struct internal_filehdr): Add f_target_id field.
-
-Tue Jun 3 16:44:18 1997 Nick Clifton <nickc@cygnus.com>
-
- * internal.h: Add storage classes for Thumb symbols
-
-Mon May 26 14:07:55 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * tic80.h (R_PPL16B): Correct value.
-
-Tue May 13 10:21:14 1997 Nick Clifton <nickc@cygnus.com>
-
- * arm.h (constants): Added new flag bits F_APCS_26 and
- F_APCS_SET for the f_flags field of the filehdr structure. Added new
- flags: F_APCS26, F_ARM_2, F_ARM_3, F_ARM_7, F_ARM_7T to store
- information in the flags field of the internal_f structure used by BFD
- routines.
-
-Sat May 3 08:24:59 1997 Fred Fish <fnf@cygnus.com>
-
- * internal.h (C_UEXT, C_STATLAB, C_EXTLAB, C_SYSTEM):
- New storage classes for TIc80.
-
-Fri Apr 18 11:52:55 1997 Niklas Hallqvist <niklas@appli.se>
-
- * alpha.h (ALPHA_ECOFF_BADMAG): Recognize *BSD/alpha magic too.
- (ALPHA_R_LITERALSLEAZY): Define.
- * ecoff.h (ALPHA_MAGIC_BSD): Define.
-
-Wed Jan 29 11:31:51 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * i960.h (R_IPR13, R_ALIGN): Define.
-
-Mon Jan 27 13:34:30 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * internal.h (R_IPRMED, R_OPTCALL, R_OPTCALLX): Move definitions
- from here...
- * i960.h (R_IPRMED, R_OPTCALL, R_OPTCALLX): ...to here.
-
-Wed Jan 22 20:10:47 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80.h (TIC80MAGIC): Renamed to TIC80_AOUTHDR_MAGIC.
-
-Fri Dec 27 22:05:45 1996 Fred Fish <fnf@cygnus.com>
-
- * tic80.h: New file for TIc80 support.
-
-Thu Dec 19 16:18:11 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * arm.h (_LIT): Define.
-
-Fri Jun 28 12:54:38 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * pe.h (FILHSZ): Define.
-
-Wed Jun 26 16:24:26 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * All files: Define FILHSZ, AOUTSZ, AOUTHDRSZ, SCNHSZ, SYMESZ,
- AUXESZ, LINESZ, RELSZ as numeric constants rather than uses of
- sizeof. Define AOUTHDRSZ in all files.
- * pe.h (AOUTSZ): Define by adding to AOUTHDRSZ.
-
-Fri Jun 21 11:17:46 1996 Richard Henderson <rth@tamu.edu>
-
- * alpha.h: Add declarations for relocation types added for Alpha
- OSF/1 3.0.
-
-Tue Jun 18 16:04:29 1996 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * h8300.h (H8300SMAGIC): Define.
- (H8300SBADMAG): Define.
-
-Mon Jun 10 11:53:28 1996 Jeffrey A Law (law@cygnus.com)
-
- * internal.h (R_BCC_INV, R_JMP_DEL): New relocations for
- relaxing in the H8/300 series.
-
-Thu May 16 15:49:22 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * sh.h (R_SH_CODE, R_SH_DATA, R_SH_LABEL): Define.
-
-Tue May 7 00:36:39 1996 Jeffrey A Law (law@cygnus.com)
-
- * internal.h (R_JMPL2): Renamed from R_JMPL_B8 to be
- consistent with other similar relocs.
-
- * internal.h (H8/300 specific relocs): Add comments better
- explaining what each reloc is used for.
- (R_MOV16B1, R_MOV16B2): Renamed from R_MOVB1 and R_MOVB2.
- (R_MOV24B1, R_MOV24B2): Renamed from R_MOVLB1 and R_MOVLB2.
- (R_MOVL1, R_MOVL2): New relocs.
-
-Fri May 3 13:01:12 1996 Jeffrey A Law (law@cygnus.com)
-
- * internal.h (R_PCRWORD_B): Define for the h8300 relaxing
- linker.
-
-Wed May 1 19:21:03 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * internal.h (SCNNMLEN): Define.
- (struct internal_scnhdr): Use SCNNMLEN for s_name field.
-
-Fri Mar 29 13:41:25 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * pe.h: Define IMAGE_COMDAT codes.
-
-Wed Mar 27 17:29:42 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * arm.h (union external_auxent): Add x_checksum, x_associated, and
- x_comdat fields to x_scn struct.
- * i386.h (union external_auxent): Likewise.
- * powerpc.h (union external_auxent): Likewise.
- * internal.h (union internal_auxent): Likewise.
-
-Thu Mar 21 16:25:57 1996 David Mosberger-Tang <davidm@azstarnet.com>
-
- * ecoff.h (struct ecoff_find_line): Add caching fields.
-
-Thu Mar 14 15:22:44 1996 Jeffrey A Law (law@cygnus.com)
-
- * internal.h (R_MEM_INDIRECT): New reloc for the h8300.
-
-Fri Feb 9 10:44:11 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * aux-coff.h: Rename from aux.h, to avoid problems on hapless DOS
- systems which think that aux is a com port.
-
-Mon Feb 5 18:35:00 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * i960.h (F_I960HX): Define.
-
-Wed Jan 31 13:11:54 1996 Richard Henderson <rth@tamu.edu>
-
- * aux.h: New file.
- * internal.h, m68k.h: Protect against multiple inclusion.
-
-Wed Nov 22 13:48:39 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ecoff.h (_RCONST, STYP_RCONST, RELOC_SECTION_RCONST): Define.
- (NUM_RELOC_SECTIONS): Update.
- * symconst.h (scRConst): Define.
-
-Tue Nov 14 18:54:29 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * internal.h (C_NT_WEAK): Define.
-
-Thu Nov 9 14:08:30 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * rs6000.h (STYP_OVRFLO): Define.
-
-Tue Nov 7 14:38:45 1995 Kim Knuttila <krk@cygnus.com>
-
- * powerpc.h (IMAGE_NT_OPTIONAL_HDR_MAGIC): Added define.
- * pe.h: Added defines for file level flags
-
-Mon Nov 6 17:28:01 1995 Harry Dolan <dolan@ssd.intel.com>
-
- * i860.h: New file, based on i386.h.
-
-Wed Nov 1 15:25:18 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
-
- * m68k.h (PAGEMAGICEXECSWAPPED): Define.
- (PAGEMAGICPEXECSWAPPED): Define.
- (PAGEMAGICPEXECTSHLIB): Define.
- (PAGEMAGICPEXECPAGED): Define.
- (_COMMENT): DEFINE.
- * m88k.h (_COMMENT): Define.
-
-Wed Oct 18 18:36:19 1995 Geoffrey Noer <noer@cygnus.com>
-
- * sym.h: #if 0'd out runtime_pdr struct because it chokes
- Visual C++ and there aren't any references to it elsewhere in gdb.
-
-Mon Oct 16 11:12:24 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * rs6000.h (SMALL_AOUTSZ): Define.
-
- * internal.h (XMC_TD): Define.
-
-Tue Oct 10 18:41:03 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * internal.h (struct internal_aouthdr): Add o_cputype field.
- * rs6000.h (AOUTHDR): Rename o_resv1 to o_cputype.
-
-Mon Oct 9 14:45:46 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * rs6000.h (AOUTHDR): Add o_maxdata field. Add comments.
- (_PAD, _LOADER): Define.
- (STYP_LOADER): Define.
- * internal.h (struct internal_aouthdr): Add o_maxdata field.
-
-Thu Oct 5 10:02:57 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ecoff.h: Define section name macros and STYP macros for various
- Alpha sections: .got, .hash, .dynsym, .dynstr, .rel.dyn, .conflic,
- .comment, .liblist, .dynamic.
-
-Wed Oct 4 10:56:35 1995 Kim Knuttila <krk@cygnus.com>
-
- * pe.h: Moved DOSMAGIC and NT_SIGNATURE defines here
- * powerpc.h: removed DOSMAGIC, NT_SIGNATURE, and DEFAULT_* defines
- Also removed other unused defines (various MAGIC ones)
- * i386.h: removed DOSMAGIC, NT_SIGNATURE, and DEFAULT_* defines
- * arm.h: removed DOSMAGIC, NT_SIGNATURE, and DEFAULT_* defines
- * apollo.h: removed unused DEFAULT_* defines
- * alpha.h: removed unused DEFAULT_* defines
- * h8500.h: removed unused DEFAULT_* defines
- * h8300.h: removed unused DEFAULT_* defines
- * i960.h: removed unused DEFAULT_* defines
- * m88k.h: removed unused DEFAULT_* defines
- * we32k.h: removed unused DEFAULT_* defines
- * rs6000.h: removed unused DEFAULT_* defines
- * mips.h: removed unused DEFAULT_* defines
- * m68k.h: removed unused DEFAULT_* defines
- * z8k.h: removed unused DEFAULT_* defines
- * w65.h: removed unused DEFAULT_* defines
- * sparc.h: removed unused DEFAULT_* defines
- * sh.h: removed unused DEFAULT_* defines
-
-Fri Sep 29 08:40:08 1995 Kim Knuttila <krk@cygnus.com>
-
- * powerpc.h: Reformatted to GNU coding conventions.
-
-Wed Sep 27 06:50:50 1995 Kim Knuttila <krk@nellie>
-
- * pe.h: added defines for more section characteristics
- * powerpc.h (new file): base coff definitions for ppc PE
-
-Tue Sep 12 12:08:20 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * internal.h (struct internal_syment): Change n_numaux field from
- char to unsigned char.
-
-Fri Sep 1 15:39:36 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
-
- * mips.h (struct rpdr_ext): Define.
-
-Thu Aug 31 16:51:50 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * internal.h (internal_aouthdr, internal_filehdr):
- don't indirect the pe stuff.
-
-Tue Aug 29 14:16:07 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * i386.h (NT_DEF_RESERVE, NT_DEF_COMMIT): Make the same
- as 'the other' compiler.
- * internal.h (NT_IMAGE_BASE): Deleted.
- (NT_EXE_IMAGE_BASE, NT_DLL_IMAGE_BASE): New.
- (PE_DEF_SECTION_ALIGNMENT, PE_DEF_FILE_ALIGNMENT): New.
- (R_IMAGEBASE): New.
-
-Mon Aug 21 18:12:19 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * internal.h: (internal_filehdr): Moved PE stuff into
- internal_extra_pe_filehdr.
- (internal_aouthdr): Moved PE stuff into
- interanl_extra_pe_aouthdr.
-
-Mon Jul 24 14:05:39 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * internal.h: Move R_SH_* relocs from here...
- * sh.h: ...to here.
- (R_SH_SWITCH16, R_SH_SWITCH32): Define.
- (R_SH_USES, R_SH_COUNT, R_SH_ALIGN): Define.
-
-Thu Jun 29 00:04:25 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * internal.h (NT_DEF_RESERVE, NT_DEF_COMMIT): Increase a lot.
-
-Tue May 16 15:08:20 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * internal.h (NT_subsystem, NT_stack_heap): Delete
-
-Tue May 16 15:08:20 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * internal.h (NT_subsystem, NT_stack_heap): Now extern.
-
-Sat May 13 10:14:08 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * pe.h: New file.
- * i386.h (NT_SECTION_ALIGNMENT, NT_FILE_ALIGNMENT,
- NT_DEF_RESERVE, NT_DEF_COMMIT): New.
- * internal.h (internal_filehdr): New fields for PE.
- (IMAGE_DATA_DIRECTORY): New.
- (internal_aouthdr): New fields for PE.
-
-Tue Feb 14 17:59:37 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * ecoff.h (struct ecoff_fdrtab_entry): Define.
- (struct ecoff_find_line): Define.
-
-Sat Feb 4 14:38:03 1995 David Mosberger-Tang <davidm@piston.cs.arizona.edu>
-
- * sym.h (struct pdr): field "prof" added.
-
- * alpha.h (PDR_BITS1_PROF_*): added, macros for PDR_BITS*_RESERVED_*
- updated accordingly.
-
-Sun Jan 15 18:38:33 1995 Steve Chamberlain <sac@splat>
-
- * w65.h: New file.
-
-Wed Nov 23 22:43:38 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * sh.h (SH_ARCH_MAGIC_BIG, SH_ARCH_MAGIC_LITTLE): New.
- (SHBADMAG): Changed to suit.
-
-Tue Jul 26 17:46:08 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * i960.h (F_I960JX): New macro.
-
-Wed Jul 6 00:48:57 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * alpha.h: Add definitions for alpha file header flags, encoding
- the object type of the file.
-
-Mon Jun 20 13:47:01 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * ecoff.h (ecoff_swap_tir_in): Remove declaration.
- (ecoff_swap_tir_out): Likewise.
- (ecoff_swap_rndx_in, ecoff_swap_rndx_out): Likewise.
- (struct ecoff_debug_swap): Add new fields: swap_tir_in,
- swap_rndx_in, swap_tir_out, swap_rndx_out, read_debug_info.
-
-Sun Jun 12 03:51:52 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * symconst.h: Pick up SGI define for stIndirect.
-
-Fri Apr 22 13:05:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ecoff.h (REGINFO): Don't define.
- (struct ecoff_reginfo): Don't define.
-
- * sh.h (SH_ARCH_MAGIC): Rename from SHMAGIC. SHMAGIC is used by
- several targets to mean a shared library.
- (SHBADMAG): Corresponding change.
-
-Thu Apr 14 13:00:53 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h (RELOC_BITS3_TYPE_BIG): Changed from 0x1e to 0x3e.
- (RELOC_BITS3_TYPEHI_LITTLE): Define.
- (RELOC_BITS3_TYPEHI_SH_LITTLE): Define.
- (MIPS_R_PCREL16): Change value from 8 to 12 to match Irix 4.
- (MIPS_R_RELHI): Define.
- (MIPS_R_RELLO): Define.
- (MIPS_R_SWITCH): Change value from 9 to 22.
-
-Thu Apr 7 14:19:35 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h (MIPS_R_SWITCH): Define.
-
-Thu Mar 31 19:28:33 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * internal.h (internal_aouthdr): Added comments for Apollo fields.
-
-Thu Mar 31 16:28:02 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ecoff.h (STYP_ECOFF_LIB): Define as used on Irix 4.
-
-Fri Mar 25 17:16:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ecoff.h (struct ecoff_debug_info): Add adjust field.
- (struct ecoff_value_adjust): Define.
-
-Tue Mar 22 13:22:47 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h (MIPS_R_PCREL16): Define.
-
-Sat Feb 26 10:26:38 1994 Ian Lance Taylor (ian@cygnus.com)
-
- * ecoff.h: Add casts to avoid warnings from SVR4 cc.
-
-Mon Feb 21 09:48:46 1994 Ian Lance Taylor (ian@lisa.cygnus.com)
-
- * sym.h (struct runtime_pdr): Make field adr bfd_vma, not unsigned
- long.
- (SYMR): Make field value bfd_vma, not long.
-
-Fri Feb 4 23:35:53 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * rs6000.h (STYP_DEBUG): Define.
-
-Wed Feb 2 14:31:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * internal.h (union internal_auxent): Change x_csect.x_scnlen into
- a union of a long and a pointer to a symbol. XCOFF sometimes uses
- this field as a symbol index.
-
-Mon Jan 10 23:54:25 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ecoff.h (ecoff_debug_info): Remove fields line_end,
- external_dnr_end, external_pdr_end, external_sym_end,
- external_opt_end, external_aux_end, ss_end, external_fdr_end.
- Replace ifdbase with ifdmap.
-
-Wed Jan 5 17:05:36 1994 Ken Raeburn (raeburn@deneb.cygnus.com)
-
- * ecoff.h (STYP_EXTENDESC, STYP_COMMENT, STYP_XDATA, STYP_PDATA):
- Define.
-
-Wed Jan 5 16:58:24 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ecoff.h (NUM_RELOC_SECTIONS): Define.
-
-Tue Dec 21 09:24:56 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
-
- * sparc.h (struct external_reloc): Rename field r_addend to
- r_offset.
-
-Sat Dec 11 16:12:32 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * internal.h (R_DISP7, R_SH_IMM16): New reloc types.
-
-Tue Nov 23 14:23:19 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ecoff.h (struct ecoff_debug_swap): Added *_end fields for all
- the symbolic information pointers.
-
- * sym.h: Named the EXTR structure ecoff_extr.
-
-Fri Nov 19 08:21:18 1993 Ken Raeburn (raeburn@rover.cygnus.com)
-
- * sparc.h (RELSZ): Use correct size.
-
-Wed Nov 17 17:18:16 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h (struct ecoff_debug_info): Define.
-
-Tue Nov 2 17:56:57 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ecoff.h (struct ecoff_debug_swap): Define.
-
-Thu Oct 28 17:07:50 1993 Stan Shebs (shebs@rtl.cygnus.com)
-
- * i386.h (I386LYNXMAGIC): Rename to LYNXCOFFMAGIC.
- * m68k.h (LYNXCOFFMAGIC): Define.
- * sparc.h: New file.
-
-Tue Oct 19 15:34:50 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * alpha.h (external_aouthdr): Split four byte padding field into
- two byte bldrev field and two byte padding field.
-
- * ecoff.h (_LITA, _PDATA, _XDATA, STYP_LITA): Defined.
-
-Wed Oct 13 15:52:34 1993 Ken Raeburn (raeburn@cygnus.com)
-
- Sun Oct 10 17:27:10 1993 Troy Rollo (troy@cbme.unsw.edu.au)
-
- * internal.h: Added o_sri, o_inlib and o_vid for Apollos as well
- as R_DIR16.
-
- * apollo.h: New file
-
-Mon Oct 11 17:16:48 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ecoff.h (REGINFO, struct ecoff_reginfo): Define.
-
-Tue Oct 5 10:52:53 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * rs6000.h: Change non-ASCII characters in comment to octal
- escapes.
-
-Tue Sep 28 03:27:04 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * ecoff.h (_FINI, STYP_ECOFF_FINI): Add to support .fini section.
-
-Fri Sep 24 11:53:53 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h (BADMAG): Recognize MIPS_MAGIC_LITTLE3 and MIPS_MAGIC_BIG3.
- * ecoff.h: Define MIPS_MAGIC_LITTLE3 and MIPS_MAGIC_BIG3.
-
-Thu Sep 23 21:07:14 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * mips.h (BADMAG): Recognize MIPS_MAGIC_LITTLE2 and MIPS_MAGIC_BIG2.
- * ecoff.h: Define MIPS_MAGIC_LITTLE2 and MIPS_MAGIC_BIG2.
-
-Thu Sep 16 20:27:21 1993 Jim Kingdon (kingdon@cirdan.cygnus.com)
-
- * sym.h, symconst.h: Add comment stating these files are not part
- of GDB, GAS, etc. In 1991, when we asked rms whether we could
- include these files in GDB (although they are copyrighted by
- someone besides the FSF), he said it was OK if they were not
- considered part of GDB.
-
-Fri Sep 10 17:40:35 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ecoff.h (AUX_PUT_ANY): Cast val argument to bfd_vma.
-
- * alpha.c (external_aouthdr): Need four bytes of padding between
- vstamp and tsize.
-
-Tue Sep 7 14:20:43 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ecoff.h (AUX_GET_ANY, AUX_PUT_ANY): Changed to reflect further
- change in bfd swapping routine names.
-
-Tue Sep 7 10:15:17 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * ecoff.h (AUX_GET_ANY): Change name of _do_getb32 to reflect bfd
- changes.
-
-Fri Aug 13 14:30:32 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ecoff.h (RELOC_SECTION_NONE): Define.
-
-Thu Aug 12 11:24:42 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * alpha.h (struct external_reloc): Add r_symndx field.
- (RELSZ): Correct.
- (RELOC_BITS*): Correct.
- (ALPHA_R_*): Define.
- * ecoff.h (RELOC_SECTION_{XDATA,PDATA,FINI,LITA,ABS}): Define.
- (r_extern): Undefine.
- * internal.h (struct internal_reloc): Make r_vaddr bfd_vma rather
- than long. Add r_extern field.
-
- * alpha.h (PDR_BITS*): Define.
- * sym.h (PDR): Give correct names to new fields.
-
- * ecoff.h: Moved MIPS reloc definitions from here...
- * mips.h: to here.
-
-Mon Aug 2 16:37:14 1993 Stu Grossman (grossman at cygnus.com)
-
- * i386.h: Add Lynx magic number.
-
-Tue Aug 3 11:17:53 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * alpha.h: Corrected external symbolic debugging structures to
- match actual usage.
- * internal.h (internal_filehdr, internal_aouthdr,
- internal_scnhdr): Changed type of some fields to bfd_vma so they
- can hold 64 bits.
- * sym.h (HDRR, FDR, PDR, EXTR): Likewise.
- (PDR): Added new fields found on Alpha.
- * symconst.h (magicSym2): Define; new value found on Alpha.
-
- * ecoff.h: New file.
- * alpha.h, mips.h: Moved common information into ecoff.h. Moved
- external structure definitions in from ecoff-ext.h.
- * ecoff-ext.h: Removed; information now in alpha.h and mips.h.
-
-Sun Jul 18 21:43:59 1993 Jim Kingdon (kingdon@rtl.cygnus.com)
-
- * i386.h: Recognize I386PTXMAGIC.
-
-Fri Jul 16 09:54:35 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips.h (MIPS_AOUT_{OZ}MAGIC): Renamed from {OZ}MAGIC.
-
-Thu Jul 15 12:23:55 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * m88k.h (union external_auxent): Move x_fcn back inside x_fcnary.
- ({GET,PUT}_FCN_{LNNOPTR,ENDNDX}): Adjust accordingly.
-
-Sun Jul 11 18:00:18 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * m68k.h: Define MC68KBCSMAGIC.
-
-Thu Jun 10 11:46:28 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips.h (_INIT, STYP_MIPS_INIT): Define (used on Irix4).
- (STYP_OTHER_LOAD): Define as STYP_MIPS_INIT.
-
-Wed Jun 9 15:09:09 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips.h (OMAGIC): Define.
-
-Tue Jun 8 12:16:03 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
-
- Support for H8/300-H
- * h8300.h: New magic number.
- * internal.h: New relocations.
-
-Mon Apr 26 18:04:47 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * internal.h, sh.h: Support for SH.
-
-Sat Apr 24 21:34:59 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * a29k.h: Define _LIT.
-
-Fri Apr 23 18:41:23 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * alpha.h: New file.
-
-Thu Apr 8 12:36:34 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * internal.h (C_SHADOW, C_VERSION): Copied in from m88k.h.
- * m88k.h, i386.h, we32k.h: Don't define all the storage classes;
- they're already in internal.h.
-
-Wed Apr 7 11:51:24 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * internal.h: Change n_sclass to unsigned char.
- Change C_EFCN to 0xff, change RS/6000 dbx symbols
- to no longer be signed.
-
-Fri Mar 19 14:52:56 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * internal.h: Add H8/500 reloc types.
-
-Wed Mar 17 09:46:03 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ecoff-ext.h (AUX_PUT_ANY): Don't use void values in branches of
- conditional expression.
-
-Thu Mar 4 14:12:06 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * ecoff-ext.h (AUX_GET_*): Rewrote to use new macro AUX_GET_ANY.
- (AUX_PUT_*): New macros corresponding to the AUX_GET macros.
- (ecoff_swap_tir_out): Added prototype.
-
- * mips.h (N_BTMASK, N_TMASK, N_BTSHFT, N_TSHIFT): Define; these
- are needed to interpret gcc debugging output.
-
-Tue Feb 9 07:43:27 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * we32k.h (BTYPE, ISPTR, ISFCN, ISARY, DECREF): Removed
- more definitions duplicated in internal.h.
-
-Wed Feb 3 09:18:24 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips.h (RELOC_BITS3_TYPE_*): Correct for big endian machines.
-
-Mon Jan 25 11:35:51 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * internal.h (internal_aouthdr): Added additional fields used only
- by MIPS ECOFF.
-
-Thu Jan 21 10:28:38 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips.h (AOUTHDR): Added additional fields used by ECOFF.
-
-Tue Jan 19 12:21:19 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * i386.h, we32k.h (N_*, T_*, DT_*): Removed still more definitions
- duplicated in internal.h.
-
- * mips.h (RELOC_SECTION_*, ECOFF_R_*): Defined constants for ECOFF
- relocs.
-
-Fri Jan 15 18:17:00 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ecoff-ext.h: Added prototypes for new ECOFF swapping functions.
- (opt_ext): New structure.
- * mips.h (ZMAGIC): Defined to be 0413.
- (_LIB): Defined to be ".lib"
- (external_reloc): MIPS ECOFF relocs are only 8 bytes. Added
- macros to aid in swapping.
-
-Fri Jan 8 16:19:26 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ecoff-ext.h: Added prototypes for ECOFF swapping functions.
- * internal.h (internal_scnhdr): Always provide s_align field, not
- just on i960.
- (internal_reloc): Always provide r_size field, not just on
- RS/6000.
- * mips.h (_RDATA, _SDATA, _SBSS, _LIT4, _LIT8, STYP_RDATA,
- STYP_SDATA, STYP_SBSS, STYP_LIT4, STYP_LIT8): Defined.
- (CODE_MASK, MIPS_IS_STAB, MIPS_MARK_STAB, MIPS_UNMARK_STAB,
- STABS_SYMBOL): Moved in from gdb/mipsread.c.
-
-Wed Jan 6 14:01:46 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * i386.h, we32k.h: removed STYP_* defines, since they duplicated
- those in internal.h.
-
-Tue Dec 29 15:40:07 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * i386.h: define I386AIXMAGIC for Danbury AIX PS/2 compiler.
-
-Sat Dec 12 16:07:57 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * i386.h: don't define BTYPE, ISPTR, ISFCN, ISARY, DECREF: they
- are defined in internal.h.
-
-Thu Nov 12 09:52:01 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * internal.h: (internal_reloc): r_offset is now a long.
- * z8k.h: slight comment enhancement
-
-Wed Sep 30 07:46:08 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * internal.h: changed z8k reloc types
-
-Fri Aug 28 10:16:31 1992 Brendan Kehoe (brendan@cygnus.com)
-
- * we32k.h: new file
-
-Thu Aug 27 13:00:01 1992 Brendan Kehoe (brendan@cygnus.com)
-
- * symconst.h: comment out cruft at the end of #endif
-
-Tue Aug 25 15:06:49 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * internal.h: added #define for STYP_LIT, removed from a29k and
- h8300.
-
- * z8k.h: added z8000 support
-
-Thu Jul 16 16:32:00 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * internal.h: added R_RELLONG_NEG reloc type
-
-Fri Jun 12 20:11:04 1992 John Gilmore (gnu at cygnus.com)
-
- * symconst.h: Fix unterminated comment.
-
-Wed Jun 10 07:57:49 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * i386.h: a.out magic numbers from
- mohring@informatik.tu-muenchen.de
-
-Mon Jun 8 20:13:33 1992 John Gilmore (gnu at cygnus.com)
-
- * ecoff-ext.h, mips.h: Use unsigned chars everywhere.
- (Suggested by Antti Miettinen.)
-
-Tue Apr 14 15:18:44 1992 John Gilmore (gnu at cygnus.com)
-
- * sym.h: Add comments.
- * symconst.h: Merge with Fred's changes.
-
-Tue Apr 14 14:30:05 1992 Fred Fish (fnf@cygnus.com)
-
- * symconst.h: Pick up SGI defines for stStruct, stUnion, stEnum,
- langCplusplus, and langCplusplusV2.
-
-Thu Apr 2 19:47:43 1992 John Gilmore (gnu at cygnus.com)
-
- * sym.h, symconst.h: MIPS has provided redistributable versions
- of these files. Thanks!
- * ecoff-ext.h: Add weakext bit to match new sym.h.
-
-Fri Mar 6 00:10:46 1992 John Gilmore (gnu at cygnus.com)
-
- * ecoff-ext.h: Add relative file descriptors.
-
-Thu Feb 27 11:53:04 1992 John Gilmore (gnu at cygnus.com)
-
- * ecoff-ext.h: New file for external (in-file) form of ecoff
- symbol structures.
-
-Thu Feb 6 11:33:32 1992 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * h8300.h: made the external_lineno l_lnno field 4 bytes wide.
- andded GET/PUT_LINENO_LNNO macros
-
-Sat Nov 30 20:38:35 1991 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * a29k.h, h8300.h, i386.h, i960.h, internal.h, m68k.h, m88k.h,
- mips.h, rs6000.h: Move from above coff-<foo>.h.
-
-
-Local Variables:
-version-control: never
-End:
diff --git a/include/coff/alpha.h b/include/coff/alpha.h
deleted file mode 100644
index 7433938..0000000
--- a/include/coff/alpha.h
+++ /dev/null
@@ -1,385 +0,0 @@
-/* ECOFF support on Alpha machines.
- coff/ecoff.h must be included before this file.
-
- Copyright 2001, 2005 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr
-{
- unsigned char f_magic[2]; /* magic number */
- unsigned char f_nscns[2]; /* number of sections */
- unsigned char f_timdat[4]; /* time & date stamp */
- unsigned char f_symptr[8]; /* file pointer to symtab */
- unsigned char f_nsyms[4]; /* number of symtab entries */
- unsigned char f_opthdr[2]; /* sizeof(optional hdr) */
- unsigned char f_flags[2]; /* flags */
-};
-
-/* Magic numbers are defined in coff/ecoff.h. */
-#define ALPHA_ECOFF_BADMAG(x) \
- ((x).f_magic != ALPHA_MAGIC && (x).f_magic != ALPHA_MAGIC_BSD)
-
-#define ALPHA_ECOFF_COMPRESSEDMAG(x) \
- ((x).f_magic == ALPHA_MAGIC_COMPRESSED)
-
-/* The object type is encoded in the f_flags. */
-#define F_ALPHA_OBJECT_TYPE_MASK 0x3000
-#define F_ALPHA_NO_SHARED 0x1000
-#define F_ALPHA_SHARABLE 0x2000
-#define F_ALPHA_CALL_SHARED 0x3000
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 24
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-typedef struct external_aouthdr
-{
- unsigned char magic[2]; /* type of file */
- unsigned char vstamp[2]; /* version stamp */
- unsigned char bldrev[2]; /* ?? */
- unsigned char padding[2]; /* pad to quadword boundary */
- unsigned char tsize[8]; /* text size in bytes */
- unsigned char dsize[8]; /* initialized data " " */
- unsigned char bsize[8]; /* uninitialized data " " */
- unsigned char entry[8]; /* entry pt. */
- unsigned char text_start[8]; /* base of text used for this file */
- unsigned char data_start[8]; /* base of data used for this file */
- unsigned char bss_start[8]; /* base of bss used for this file */
- unsigned char gprmask[4]; /* bitmask of general registers used */
- unsigned char fprmask[4]; /* bitmask of floating point registers used */
- unsigned char gp_value[8]; /* value for gp register */
-} AOUTHDR;
-
-/* compute size of a header */
-
-#define AOUTSZ 80
-#define AOUTHDRSZ 80
-
-/********************** SECTION HEADER **********************/
-
-struct external_scnhdr
-{
- unsigned char s_name[8]; /* section name */
- unsigned char s_paddr[8]; /* physical address, aliased s_nlib */
- unsigned char s_vaddr[8]; /* virtual address */
- unsigned char s_size[8]; /* section size */
- unsigned char s_scnptr[8]; /* file ptr to raw data for section */
- unsigned char s_relptr[8]; /* file ptr to relocation */
- unsigned char s_lnnoptr[8]; /* file ptr to line numbers */
- unsigned char s_nreloc[2]; /* number of relocation entries */
- unsigned char s_nlnno[2]; /* number of line number entries*/
- unsigned char s_flags[4]; /* flags */
-};
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ 64
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct external_reloc
-{
- unsigned char r_vaddr[8];
- unsigned char r_symndx[4];
- unsigned char r_bits[4];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 16
-
-/* Constants to unpack the r_bits field. The Alpha seems to always be
- little endian, so I haven't bothered to define big endian variants
- of these. */
-
-#define RELOC_BITS0_TYPE_LITTLE 0xff
-#define RELOC_BITS0_TYPE_SH_LITTLE 0
-
-#define RELOC_BITS1_EXTERN_LITTLE 0x01
-
-#define RELOC_BITS1_OFFSET_LITTLE 0x7e
-#define RELOC_BITS1_OFFSET_SH_LITTLE 1
-
-#define RELOC_BITS1_RESERVED_LITTLE 0x80
-#define RELOC_BITS1_RESERVED_SH_LITTLE 7
-#define RELOC_BITS2_RESERVED_LITTLE 0xff
-#define RELOC_BITS2_RESERVED_SH_LEFT_LITTLE 1
-#define RELOC_BITS3_RESERVED_LITTLE 0x03
-#define RELOC_BITS3_RESERVED_SH_LEFT_LITTLE 9
-
-#define RELOC_BITS3_SIZE_LITTLE 0xfc
-#define RELOC_BITS3_SIZE_SH_LITTLE 2
-
-/* The r_type field in a reloc is one of the following values. */
-#define ALPHA_R_IGNORE 0
-#define ALPHA_R_REFLONG 1
-#define ALPHA_R_REFQUAD 2
-#define ALPHA_R_GPREL32 3
-#define ALPHA_R_LITERAL 4
-#define ALPHA_R_LITUSE 5
-#define ALPHA_R_GPDISP 6
-#define ALPHA_R_BRADDR 7
-#define ALPHA_R_HINT 8
-#define ALPHA_R_SREL16 9
-#define ALPHA_R_SREL32 10
-#define ALPHA_R_SREL64 11
-#define ALPHA_R_OP_PUSH 12
-#define ALPHA_R_OP_STORE 13
-#define ALPHA_R_OP_PSUB 14
-#define ALPHA_R_OP_PRSHIFT 15
-#define ALPHA_R_GPVALUE 16
-#define ALPHA_R_GPRELHIGH 17
-#define ALPHA_R_GPRELLOW 18
-#define ALPHA_R_IMMED 19
-
-/* Overloaded reloc value used by Net- and OpenBSD. */
-#define ALPHA_R_LITERALSLEAZY 17
-
-/* With ALPHA_R_LITUSE, the r_size field is one of the following values. */
-#define ALPHA_R_LU_BASE 1
-#define ALPHA_R_LU_BYTOFF 2
-#define ALPHA_R_LU_JSR 3
-
-/* With ALPHA_R_IMMED, the r_size field is one of the following values. */
-#define ALPHA_R_IMMED_GP_16 1
-#define ALPHA_R_IMMED_GP_HI32 2
-#define ALPHA_R_IMMED_SCN_HI32 3
-#define ALPHA_R_IMMED_BR_HI32 4
-#define ALPHA_R_IMMED_LO32 5
-
-/********************** SYMBOLIC INFORMATION **********************/
-
-/* Written by John Gilmore. */
-
-/* ECOFF uses COFF-like section structures, but its own symbol format.
- This file defines the symbol format in fields whose size and alignment
- will not vary on different host systems. */
-
-/* File header as a set of bytes */
-
-struct hdr_ext
-{
- unsigned char h_magic[2];
- unsigned char h_vstamp[2];
- unsigned char h_ilineMax[4];
- unsigned char h_idnMax[4];
- unsigned char h_ipdMax[4];
- unsigned char h_isymMax[4];
- unsigned char h_ioptMax[4];
- unsigned char h_iauxMax[4];
- unsigned char h_issMax[4];
- unsigned char h_issExtMax[4];
- unsigned char h_ifdMax[4];
- unsigned char h_crfd[4];
- unsigned char h_iextMax[4];
- unsigned char h_cbLine[8];
- unsigned char h_cbLineOffset[8];
- unsigned char h_cbDnOffset[8];
- unsigned char h_cbPdOffset[8];
- unsigned char h_cbSymOffset[8];
- unsigned char h_cbOptOffset[8];
- unsigned char h_cbAuxOffset[8];
- unsigned char h_cbSsOffset[8];
- unsigned char h_cbSsExtOffset[8];
- unsigned char h_cbFdOffset[8];
- unsigned char h_cbRfdOffset[8];
- unsigned char h_cbExtOffset[8];
-};
-
-/* File descriptor external record */
-
-struct fdr_ext
-{
- unsigned char f_adr[8];
- unsigned char f_cbLineOffset[8];
- unsigned char f_cbLine[8];
- unsigned char f_cbSs[8];
- unsigned char f_rss[4];
- unsigned char f_issBase[4];
- unsigned char f_isymBase[4];
- unsigned char f_csym[4];
- unsigned char f_ilineBase[4];
- unsigned char f_cline[4];
- unsigned char f_ioptBase[4];
- unsigned char f_copt[4];
- unsigned char f_ipdFirst[4];
- unsigned char f_cpd[4];
- unsigned char f_iauxBase[4];
- unsigned char f_caux[4];
- unsigned char f_rfdBase[4];
- unsigned char f_crfd[4];
- unsigned char f_bits1[1];
- unsigned char f_bits2[3];
- unsigned char f_padding[4];
-};
-
-#define FDR_BITS1_LANG_BIG 0xF8
-#define FDR_BITS1_LANG_SH_BIG 3
-#define FDR_BITS1_LANG_LITTLE 0x1F
-#define FDR_BITS1_LANG_SH_LITTLE 0
-
-#define FDR_BITS1_FMERGE_BIG 0x04
-#define FDR_BITS1_FMERGE_LITTLE 0x20
-
-#define FDR_BITS1_FREADIN_BIG 0x02
-#define FDR_BITS1_FREADIN_LITTLE 0x40
-
-#define FDR_BITS1_FBIGENDIAN_BIG 0x01
-#define FDR_BITS1_FBIGENDIAN_LITTLE 0x80
-
-#define FDR_BITS2_GLEVEL_BIG 0xC0
-#define FDR_BITS2_GLEVEL_SH_BIG 6
-#define FDR_BITS2_GLEVEL_LITTLE 0x03
-#define FDR_BITS2_GLEVEL_SH_LITTLE 0
-
-/* We ignore the `reserved' field in bits2. */
-
-/* Procedure descriptor external record */
-
-struct pdr_ext {
- unsigned char p_adr[8];
- unsigned char p_cbLineOffset[8];
- unsigned char p_isym[4];
- unsigned char p_iline[4];
- unsigned char p_regmask[4];
- unsigned char p_regoffset[4];
- unsigned char p_iopt[4];
- unsigned char p_fregmask[4];
- unsigned char p_fregoffset[4];
- unsigned char p_frameoffset[4];
- unsigned char p_lnLow[4];
- unsigned char p_lnHigh[4];
- unsigned char p_gp_prologue[1];
- unsigned char p_bits1[1];
- unsigned char p_bits2[1];
- unsigned char p_localoff[1];
- unsigned char p_framereg[2];
- unsigned char p_pcreg[2];
-};
-
-#define PDR_BITS1_GP_USED_BIG 0x80
-#define PDR_BITS1_REG_FRAME_BIG 0x40
-#define PDR_BITS1_PROF_BIG 0x20
-#define PDR_BITS1_RESERVED_BIG 0x1f
-#define PDR_BITS1_RESERVED_SH_LEFT_BIG 8
-#define PDR_BITS2_RESERVED_BIG 0xff
-#define PDR_BITS2_RESERVED_SH_BIG 0
-
-#define PDR_BITS1_GP_USED_LITTLE 0x01
-#define PDR_BITS1_REG_FRAME_LITTLE 0x02
-#define PDR_BITS1_PROF_LITTLE 0x04
-#define PDR_BITS1_RESERVED_LITTLE 0xf8
-#define PDR_BITS1_RESERVED_SH_LITTLE 3
-#define PDR_BITS2_RESERVED_LITTLE 0xff
-#define PDR_BITS2_RESERVED_SH_LEFT_LITTLE 5
-
-/* Line numbers */
-
-struct line_ext {
- unsigned char l_line[4];
-};
-
-/* Symbol external record */
-
-struct sym_ext {
- unsigned char s_value[8];
- unsigned char s_iss[4];
- unsigned char s_bits1[1];
- unsigned char s_bits2[1];
- unsigned char s_bits3[1];
- unsigned char s_bits4[1];
-};
-
-#define SYM_BITS1_ST_BIG 0xFC
-#define SYM_BITS1_ST_SH_BIG 2
-#define SYM_BITS1_ST_LITTLE 0x3F
-#define SYM_BITS1_ST_SH_LITTLE 0
-
-#define SYM_BITS1_SC_BIG 0x03
-#define SYM_BITS1_SC_SH_LEFT_BIG 3
-#define SYM_BITS1_SC_LITTLE 0xC0
-#define SYM_BITS1_SC_SH_LITTLE 6
-
-#define SYM_BITS2_SC_BIG 0xE0
-#define SYM_BITS2_SC_SH_BIG 5
-#define SYM_BITS2_SC_LITTLE 0x07
-#define SYM_BITS2_SC_SH_LEFT_LITTLE 2
-
-#define SYM_BITS2_RESERVED_BIG 0x10
-#define SYM_BITS2_RESERVED_LITTLE 0x08
-
-#define SYM_BITS2_INDEX_BIG 0x0F
-#define SYM_BITS2_INDEX_SH_LEFT_BIG 16
-#define SYM_BITS2_INDEX_LITTLE 0xF0
-#define SYM_BITS2_INDEX_SH_LITTLE 4
-
-#define SYM_BITS3_INDEX_SH_LEFT_BIG 8
-#define SYM_BITS3_INDEX_SH_LEFT_LITTLE 4
-
-#define SYM_BITS4_INDEX_SH_LEFT_BIG 0
-#define SYM_BITS4_INDEX_SH_LEFT_LITTLE 12
-
-/* External symbol external record */
-
-struct ext_ext {
- struct sym_ext es_asym;
- unsigned char es_bits1[1];
- unsigned char es_bits2[3];
- unsigned char es_ifd[4];
-};
-
-#define EXT_BITS1_JMPTBL_BIG 0x80
-#define EXT_BITS1_JMPTBL_LITTLE 0x01
-
-#define EXT_BITS1_COBOL_MAIN_BIG 0x40
-#define EXT_BITS1_COBOL_MAIN_LITTLE 0x02
-
-#define EXT_BITS1_WEAKEXT_BIG 0x20
-#define EXT_BITS1_WEAKEXT_LITTLE 0x04
-
-/* Dense numbers external record */
-
-struct dnr_ext {
- unsigned char d_rfd[4];
- unsigned char d_index[4];
-};
-
-/* Relative file descriptor */
-
-struct rfd_ext {
- unsigned char rfd[4];
-};
-
-/* Optimizer symbol external record */
-
-struct opt_ext {
- unsigned char o_bits1[1];
- unsigned char o_bits2[1];
- unsigned char o_bits3[1];
- unsigned char o_bits4[1];
- struct rndx_ext o_rndx;
- unsigned char o_offset[4];
-};
-
-#define OPT_BITS2_VALUE_SH_LEFT_BIG 16
-#define OPT_BITS2_VALUE_SH_LEFT_LITTLE 0
-
-#define OPT_BITS3_VALUE_SH_LEFT_BIG 8
-#define OPT_BITS3_VALUE_SH_LEFT_LITTLE 8
-
-#define OPT_BITS4_VALUE_SH_LEFT_BIG 0
-#define OPT_BITS4_VALUE_SH_LEFT_LITTLE 16
diff --git a/include/coff/apollo.h b/include/coff/apollo.h
deleted file mode 100644
index 963c0be..0000000
--- a/include/coff/apollo.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/* coff information for Apollo M68K
-
- Copyright 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#define DO_NOT_DEFINE_AOUTHDR
-#define L_LNNO_SIZE 2
-#include "coff/external.h"
-
-/* Motorola 68000/68008/68010/68020 */
-#define MC68MAGIC 0520
-#define MC68KWRMAGIC 0520 /* writeable text segments */
-#define MC68TVMAGIC 0521
-#define MC68KROMAGIC 0521 /* readonly shareable text segments */
-#define MC68KPGMAGIC 0522 /* demand paged text segments */
-#define M68MAGIC 0210
-#define M68TVMAGIC 0211
-
-/* Apollo 68000-based machines have a different magic number. This comes
- * from /usr/include/apollo/filehdr.h
- */
-#define APOLLOM68KMAGIC 0627
-
-#define OMAGIC M68MAGIC
-#define M68KBADMAG(x) (((x).f_magic!=MC68MAGIC) && ((x).f_magic!=MC68KWRMAGIC) && ((x).f_magic!=MC68TVMAGIC) && \
- ((x).f_magic!=MC68KROMAGIC) && ((x).f_magic!=MC68KPGMAGIC) && ((x).f_magic!=M68MAGIC) && ((x).f_magic!=M68TVMAGIC) && \
- ((x).f_magic!=APOLLOM68KMAGIC) )
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-typedef struct
-{
- char magic[2]; /* type of file */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes, padded to FW bdry*/
- char dsize[4]; /* initialized data " " */
- char bsize[4]; /* uninitialized data " " */
- char entry[4]; /* entry pt. */
- char text_start[4]; /* base of text used for this file */
- char data_start[4]; /* base of data used for this file */
- char o_sri[4]; /* Apollo specific - .sri data pointer */
- char o_inlib[4]; /* Apollo specific - .inlib data pointer */
- char vid[8]; /* Apollo specific - 64 bit version ID */
-}
-AOUTHDR;
-
-#define APOLLO_COFF_VERSION_NUMBER 1 /* the value of the aouthdr magic */
-#define AOUTHDRSZ 44
-#define AOUTSZ 44
-
-/* Apollo allowa for larger section names by allowing
- them to be in the string table. */
-
-/* If s_zeores is all zeroes, s_offset gives the real
- location of the name in the string table. */
-
-#define s_zeroes section_name.s_name
-#define s_offset (section_name.s_name+4)
-
-/* More names of "special" sections. */
-#define _TV ".tv"
-#define _INIT ".init"
-#define _FINI ".fini"
-#define _LINES ".lines"
-#define _BLOCKS ".blocks"
-#define _SRI ".sri" /* Static Resource Information (systype,
- et al.) */
-#define _MIR ".mir" /* Module Information Records */
-#define _APTV ".aptv" /* Apollo-style transfer vectors. */
-#define _INLIB ".inlib" /* Shared Library information */
-#define _RWDI ".rwdi" /* Read/write data initialization directives for
- compressed sections */
-#define _UNWIND ".unwind" /* Stack unwind information */
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
-#ifdef M68K_COFF_OFFSET
- char r_offset[4];
-#endif
-
-};
-
-#define RELOC struct external_reloc
-
-#ifdef M68K_COFF_OFFSET
-#define RELSZ 14
-#else
-#define RELSZ 10
-#endif
-
-/* Apollo specific STYP flags */
-
-#define STYP_RELOCATED_NOT_LOADED 0x00010000 /* Section is relocated normally during linking, but need
- not be loaded during program execution */
-#define STYP_DEBUG 0x00020000 /* debug section */
-#define STYP_OVERLAY 0x00040000 /* Section is overlayed */
-#define STYP_INSTRUCTION 0x00200000 /* Section contains executable code */
-
-#define STYP_ZERO 0x00800000 /* Section is initialized to zero */
-#define STYP_INSTALLED 0x02000000 /* Section should be installable in KGT */
-#define STYP_LOOK_INSTALLED 0x04000000 /* Look for section in KGT */
-#define STYP_SECALIGN1 0x08000000 /* Specially aligned section */
-#define STYP_SECALIGN2 0x10000000 /* " " " */
-#define STYP_COMPRESSED 0x20000000 /* No section data per se (s_scnptr = 0), but there are
- initialization directives for it in .rwdi section
- (used in conjunction with STYP_BSS) */
diff --git a/include/coff/arm.h b/include/coff/arm.h
deleted file mode 100644
index 750f7f2..0000000
--- a/include/coff/arm.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/* ARM COFF support for BFD.
- Copyright 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#define COFFARM 1
-
-#define L_LNNO_SIZE 2
-#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
-#include "coff/external.h"
-
-/* Bits for f_flags:
- F_RELFLG relocation info stripped from file
- F_EXEC file is executable (no unresolved external references)
- F_LNNO line numbers stripped from file
- F_LSYMS local symbols stripped from file
- F_INTERWORK file supports switching between ARM and Thumb instruction sets
- F_INTERWORK_SET the F_INTERWORK bit is valid
- F_APCS_FLOAT code passes float arguments in float registers
- F_PIC code is reentrant/position-independent
- F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax)
- F_APCS_26 file uses 26 bit ARM Procedure Calling Standard
- F_APCS_SET the F_APCS_26, F_APCS_FLOAT and F_PIC bits have been initialised
- F_SOFT_FLOAT code does not use floating point instructions. */
-
-#define F_RELFLG (0x0001)
-#define F_EXEC (0x0002)
-#define F_LNNO (0x0004)
-#define F_LSYMS (0x0008)
-#define F_INTERWORK (0x0010)
-#define F_INTERWORK_SET (0x0020)
-#define F_APCS_FLOAT (0x0040)
-#undef F_AR16WR
-#define F_PIC (0x0080)
-#define F_AR32WR (0x0100)
-#define F_APCS_26 (0x0400)
-#define F_APCS_SET (0x0800)
-#define F_SOFT_FLOAT (0x2000)
-#define F_VFP_FLOAT (0x4000)
-
-/* Bits stored in flags field of the internal_f structure */
-
-#define F_INTERWORK (0x0010)
-#define F_APCS_FLOAT (0x0040)
-#define F_PIC (0x0080)
-#define F_APCS26 (0x1000)
-#define F_ARM_ARCHITECTURE_MASK (0x4000+0x0800+0x0400)
-#define F_ARM_2 (0x0400)
-#define F_ARM_2a (0x0800)
-#define F_ARM_3 (0x0c00)
-#define F_ARM_3M (0x4000)
-#define F_ARM_4 (0x4400)
-#define F_ARM_4T (0x4800)
-#define F_ARM_5 (0x4c00)
-
-/*
- ARMMAGIC ought to encoded the procesor type,
- but it is too late to change it now, instead
- the flags field of the internal_f structure
- is used as shown above.
-
- XXX - NC 5/6/97. */
-
-#define ARMMAGIC 0xa00 /* I just made this up */
-
-#define ARMBADMAG(x) (((x).f_magic != ARMMAGIC))
-
-#define ARMPEMAGIC 0x1c0
-#define THUMBPEMAGIC 0x1c2
-
-#undef ARMBADMAG
-#define ARMBADMAG(x) (((x).f_magic != ARMMAGIC) && ((x).f_magic != ARMPEMAGIC) && ((x).f_magic != THUMBPEMAGIC))
-
-#define OMAGIC 0404 /* object files, eg as output */
-#define ZMAGIC 0413 /* demand load format, eg normal ld output */
-#define STMAGIC 0401 /* target shlib */
-#define SHMAGIC 0443 /* host shlib */
-
-/* define some NT default values */
-/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
-#define NT_SECTION_ALIGNMENT 0x1000
-#define NT_FILE_ALIGNMENT 0x200
-#define NT_DEF_RESERVE 0x100000
-#define NT_DEF_COMMIT 0x1000
-
-/* We use the .rdata section to hold read only data. */
-#define _LIT ".rdata"
-
-/********************** RELOCATION DIRECTIVES **********************/
-#ifdef ARM_WINCE
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 10
-
-#else
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
- char r_offset[4];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 14
-#endif
-
-#define ARM_NOTE_SECTION ".note"
diff --git a/include/coff/aux-coff.h b/include/coff/aux-coff.h
deleted file mode 100644
index 5199f2c..0000000
--- a/include/coff/aux-coff.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Modifications of internal.h and m68k.h needed by A/UX
-
- Copyright 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-
- Suggested by Ian Lance Taylor <ian@cygnus.com> */
-
-#ifndef GNU_COFF_AUX_H
-#define GNU_COFF_AUX_H 1
-
-#include "coff/internal.h"
-#include "coff/m68k.h"
-
-/* Section contains 64-byte padded pathnames of shared libraries */
-#undef STYP_LIB
-#define STYP_LIB 0x200
-
-/* Section contains shared library initialization code */
-#undef STYP_INIT
-#define STYP_INIT 0x400
-
-/* Section contains .ident information */
-#undef STYP_IDENT
-#define STYP_IDENT 0x800
-
-/* Section types used by bfd and gas not defined (directly) by A/UX */
-#undef STYP_OVER
-#define STYP_OVER 0
-#undef STYP_INFO
-#define STYP_INFO STYP_IDENT
-
-/* Traditional name of the section tagged with STYP_LIB */
-#define _LIB ".lib"
-
-#endif /* GNU_COFF_AUX_H */
diff --git a/include/coff/ecoff.h b/include/coff/ecoff.h
deleted file mode 100644
index d4d3fa5..0000000
--- a/include/coff/ecoff.h
+++ /dev/null
@@ -1,410 +0,0 @@
-/* Generic ECOFF support.
- This does not include symbol information, found in sym.h and
- symconst.h.
-
- Copyright 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef ECOFF_H
-#define ECOFF_H
-
-/* Mips magic numbers used in filehdr. MIPS_MAGIC_LITTLE is used on
- little endian machines. MIPS_MAGIC_BIG is used on big endian
- machines. Where is MIPS_MAGIC_1 from? */
-#define MIPS_MAGIC_1 0x0180
-#define MIPS_MAGIC_LITTLE 0x0162
-#define MIPS_MAGIC_BIG 0x0160
-
-/* These are the magic numbers used for MIPS code compiled at ISA
- level 2. */
-#define MIPS_MAGIC_LITTLE2 0x0166
-#define MIPS_MAGIC_BIG2 0x0163
-
-/* These are the magic numbers used for MIPS code compiled at ISA
- level 3. */
-#define MIPS_MAGIC_LITTLE3 0x142
-#define MIPS_MAGIC_BIG3 0x140
-
-/* Alpha magic numbers used in filehdr. */
-#define ALPHA_MAGIC 0x183
-#define ALPHA_MAGIC_BSD 0x185
-/* A compressed version of an ALPHA_MAGIC file created by DEC's tools. */
-#define ALPHA_MAGIC_COMPRESSED 0x188
-
-/* Magic numbers used in a.out header. */
-#define ECOFF_AOUT_OMAGIC 0407 /* not demand paged (ld -N). */
-#define ECOFF_AOUT_ZMAGIC 0413 /* demand load format, eg normal ld output */
-
-/* Names of special sections. */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _RDATA ".rdata"
-#define _SDATA ".sdata"
-#define _SBSS ".sbss"
-#define _LITA ".lita"
-#define _LIT4 ".lit4"
-#define _LIT8 ".lit8"
-#define _LIB ".lib"
-#define _INIT ".init"
-#define _FINI ".fini"
-#define _PDATA ".pdata"
-#define _XDATA ".xdata"
-#define _GOT ".got"
-#define _HASH ".hash"
-#define _DYNSYM ".dynsym"
-#define _DYNSTR ".dynstr"
-#define _RELDYN ".rel.dyn"
-#define _CONFLIC ".conflic"
-#define _COMMENT ".comment"
-#define _LIBLIST ".liblist"
-#define _DYNAMIC ".dynamic"
-#define _RCONST ".rconst"
-
-/* ECOFF uses some additional section flags. */
-#define STYP_RDATA 0x100
-#define STYP_SDATA 0x200
-#define STYP_SBSS 0x400
-#define STYP_GOT 0x1000
-#define STYP_DYNAMIC 0x2000
-#define STYP_DYNSYM 0x4000
-#define STYP_RELDYN 0x8000
-#define STYP_DYNSTR 0x10000
-#define STYP_HASH 0x20000
-#define STYP_LIBLIST 0x40000
-#define STYP_CONFLIC 0x100000
-#define STYP_ECOFF_FINI 0x1000000
-#define STYP_EXTENDESC 0x2000000 /* 0x02FFF000 bits => scn type, rest clr */
-#define STYP_LITA 0x4000000
-#define STYP_LIT8 0x8000000
-#define STYP_LIT4 0x10000000
-#define STYP_ECOFF_LIB 0x40000000
-#define STYP_ECOFF_INIT 0x80000000
-#define STYP_OTHER_LOAD (STYP_ECOFF_INIT | STYP_ECOFF_FINI)
-
-/* extended section types */
-#define STYP_COMMENT 0x2100000
-#define STYP_RCONST 0x2200000
-#define STYP_XDATA 0x2400000
-#define STYP_PDATA 0x2800000
-
-/* The linker needs a section to hold small common variables while
- linking. There is no convenient way to create it when the linker
- needs it, so we always create one for each BFD. We then avoid
- writing it out. */
-#define SCOMMON ".scommon"
-
-/* If the extern bit in a reloc is 1, then r_symndx is an index into
- the external symbol table. If the extern bit is 0, then r_symndx
- indicates a section, and is one of the following values. */
-#define RELOC_SECTION_NONE 0
-#define RELOC_SECTION_TEXT 1
-#define RELOC_SECTION_RDATA 2
-#define RELOC_SECTION_DATA 3
-#define RELOC_SECTION_SDATA 4
-#define RELOC_SECTION_SBSS 5
-#define RELOC_SECTION_BSS 6
-#define RELOC_SECTION_INIT 7
-#define RELOC_SECTION_LIT8 8
-#define RELOC_SECTION_LIT4 9
-#define RELOC_SECTION_XDATA 10
-#define RELOC_SECTION_PDATA 11
-#define RELOC_SECTION_FINI 12
-#define RELOC_SECTION_LITA 13
-#define RELOC_SECTION_ABS 14
-#define RELOC_SECTION_RCONST 15
-
-#define NUM_RELOC_SECTIONS 16
-
-/********************** STABS **********************/
-
-/* gcc uses mips-tfile to output type information in special stabs
- entries. These must match the corresponding definition in
- gcc/config/mips.h. At some point, these should probably go into a
- shared include file, but currently gcc and gdb do not share any
- directories. */
-#define CODE_MASK 0x8F300
-#define ECOFF_IS_STAB(sym) (((sym)->index & 0xFFF00) == CODE_MASK)
-#define ECOFF_MARK_STAB(code) ((code)+CODE_MASK)
-#define ECOFF_UNMARK_STAB(code) ((code)-CODE_MASK)
-#define STABS_SYMBOL "@stabs"
-
-/********************** COFF **********************/
-
-/* gcc also uses mips-tfile to output COFF debugging information.
- These are the values it uses when outputting the .type directive.
- These should also be in a shared include file. */
-#define N_BTMASK (017)
-#define N_TMASK (060)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-/********************** AUX **********************/
-
-/* The auxiliary type information is the same on all known ECOFF
- targets. I can't see any reason that it would ever change, so I am
- going to gamble and define the external structures here, in the
- target independent ECOFF header file. The internal forms are
- defined in coff/sym.h, which was originally donated by MIPS
- Computer Systems. */
-
-/* Type information external record */
-
-struct tir_ext {
- unsigned char t_bits1[1];
- unsigned char t_tq45[1];
- unsigned char t_tq01[1];
- unsigned char t_tq23[1];
-};
-
-#define TIR_BITS1_FBITFIELD_BIG ((unsigned int) 0x80)
-#define TIR_BITS1_FBITFIELD_LITTLE ((unsigned int) 0x01)
-
-#define TIR_BITS1_CONTINUED_BIG ((unsigned int) 0x40)
-#define TIR_BITS1_CONTINUED_LITTLE ((unsigned int) 0x02)
-
-#define TIR_BITS1_BT_BIG ((unsigned int) 0x3F)
-#define TIR_BITS1_BT_SH_BIG 0
-#define TIR_BITS1_BT_LITTLE ((unsigned int) 0xFC)
-#define TIR_BITS1_BT_SH_LITTLE 2
-
-#define TIR_BITS_TQ4_BIG ((unsigned int) 0xF0)
-#define TIR_BITS_TQ4_SH_BIG 4
-#define TIR_BITS_TQ5_BIG ((unsigned int) 0x0F)
-#define TIR_BITS_TQ5_SH_BIG 0
-#define TIR_BITS_TQ4_LITTLE ((unsigned int) 0x0F)
-#define TIR_BITS_TQ4_SH_LITTLE 0
-#define TIR_BITS_TQ5_LITTLE ((unsigned int) 0xF0)
-#define TIR_BITS_TQ5_SH_LITTLE 4
-
-#define TIR_BITS_TQ0_BIG ((unsigned int) 0xF0)
-#define TIR_BITS_TQ0_SH_BIG 4
-#define TIR_BITS_TQ1_BIG ((unsigned int) 0x0F)
-#define TIR_BITS_TQ1_SH_BIG 0
-#define TIR_BITS_TQ0_LITTLE ((unsigned int) 0x0F)
-#define TIR_BITS_TQ0_SH_LITTLE 0
-#define TIR_BITS_TQ1_LITTLE ((unsigned int) 0xF0)
-#define TIR_BITS_TQ1_SH_LITTLE 4
-
-#define TIR_BITS_TQ2_BIG ((unsigned int) 0xF0)
-#define TIR_BITS_TQ2_SH_BIG 4
-#define TIR_BITS_TQ3_BIG ((unsigned int) 0x0F)
-#define TIR_BITS_TQ3_SH_BIG 0
-#define TIR_BITS_TQ2_LITTLE ((unsigned int) 0x0F)
-#define TIR_BITS_TQ2_SH_LITTLE 0
-#define TIR_BITS_TQ3_LITTLE ((unsigned int) 0xF0)
-#define TIR_BITS_TQ3_SH_LITTLE 4
-
-/* Relative symbol external record */
-
-struct rndx_ext {
- unsigned char r_bits[4];
-};
-
-#define RNDX_BITS0_RFD_SH_LEFT_BIG 4
-#define RNDX_BITS1_RFD_BIG ((unsigned int) 0xF0)
-#define RNDX_BITS1_RFD_SH_BIG 4
-
-#define RNDX_BITS0_RFD_SH_LEFT_LITTLE 0
-#define RNDX_BITS1_RFD_LITTLE ((unsigned int) 0x0F)
-#define RNDX_BITS1_RFD_SH_LEFT_LITTLE 8
-
-#define RNDX_BITS1_INDEX_BIG ((unsigned int) 0x0F)
-#define RNDX_BITS1_INDEX_SH_LEFT_BIG 16
-#define RNDX_BITS2_INDEX_SH_LEFT_BIG 8
-#define RNDX_BITS3_INDEX_SH_LEFT_BIG 0
-
-#define RNDX_BITS1_INDEX_LITTLE ((unsigned int) 0xF0)
-#define RNDX_BITS1_INDEX_SH_LITTLE 4
-#define RNDX_BITS2_INDEX_SH_LEFT_LITTLE 4
-#define RNDX_BITS3_INDEX_SH_LEFT_LITTLE 12
-
-/* Auxiliary symbol information external record */
-
-union aux_ext {
- struct tir_ext a_ti;
- struct rndx_ext a_rndx;
- unsigned char a_dnLow[4];
- unsigned char a_dnHigh[4];
- unsigned char a_isym[4];
- unsigned char a_iss[4];
- unsigned char a_width[4];
- unsigned char a_count[4];
-};
-
-#define AUX_GET_ANY(bigend, ax, field) \
- ((bigend) ? bfd_getb32 ((ax)->field) : bfd_getl32 ((ax)->field))
-
-#define AUX_GET_DNLOW(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_dnLow)
-#define AUX_GET_DNHIGH(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_dnHigh)
-#define AUX_GET_ISYM(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_isym)
-#define AUX_GET_ISS(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_iss)
-#define AUX_GET_WIDTH(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_width)
-#define AUX_GET_COUNT(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_count)
-
-#define AUX_PUT_ANY(bigend, val, ax, field) \
- ((bigend) \
- ? (bfd_putb32 ((bfd_vma) (val), (ax)->field), 0) \
- : (bfd_putl32 ((bfd_vma) (val), (ax)->field), 0))
-
-#define AUX_PUT_DNLOW(bigend, val, ax) \
- AUX_PUT_ANY ((bigend), (val), (ax), a_dnLow)
-#define AUX_PUT_DNHIGH(bigend, val, ax) \
- AUX_PUT_ANY ((bigend), (val), (ax), a_dnHigh)
-#define AUX_PUT_ISYM(bigend, val, ax) \
- AUX_PUT_ANY ((bigend), (val), (ax), a_isym)
-#define AUX_PUT_ISS(bigend, val, ax) \
- AUX_PUT_ANY ((bigend), (val), (ax), a_iss)
-#define AUX_PUT_WIDTH(bigend, val, ax) \
- AUX_PUT_ANY ((bigend), (val), (ax), a_width)
-#define AUX_PUT_COUNT(bigend, val, ax) \
- AUX_PUT_ANY ((bigend), (val), (ax), a_count)
-
-/********************** SYMBOLS **********************/
-
-/* For efficiency, gdb deals directly with the unswapped symbolic
- information (that way it only takes the time to swap information
- that it really needs to read). gdb originally retrieved the
- information directly from the BFD backend information, but that
- strategy, besides being sort of ugly, does not work for MIPS ELF,
- which also uses ECOFF debugging information. This structure holds
- pointers to the (mostly) unswapped symbolic information. */
-
-struct ecoff_debug_info
-{
- /* The swapped ECOFF symbolic header. */
- HDRR symbolic_header;
-
- /* Pointers to the unswapped symbolic information. Note that the
- pointers to external structures point to different sorts of
- information on different ECOFF targets. The ecoff_debug_swap
- structure provides the sizes of the structures and the functions
- needed to swap the information in and out. These pointers are
- all pointers to arrays, not single structures. They will be NULL
- if there are no instances of the relevant structure. These
- fields are also used by the assembler to output ECOFF debugging
- information. */
- unsigned char *line;
- void *external_dnr; /* struct dnr_ext */
- void *external_pdr; /* struct pdr_ext */
- void *external_sym; /* struct sym_ext */
- void *external_opt; /* struct opt_ext */
- union aux_ext *external_aux;
- char *ss;
- char *ssext;
- void *external_fdr; /* struct fdr_ext */
- void *external_rfd; /* struct rfd_ext */
- void *external_ext; /* struct ext_ext */
-
- /* These fields are used when linking. They may disappear at some
- point. */
- char *ssext_end;
- void *external_ext_end;
-
- /* When linking, this field holds a mapping from the input FDR
- numbers to the output numbers, and is used when writing out the
- external symbols. It is NULL if no mapping is required. */
- RFDT *ifdmap;
-
- /* The swapped FDR information. Currently this is never NULL, but
- code using this structure should probably double-check in case
- this changes in the future. This is a pointer to an array, not a
- single structure. */
- FDR *fdr;
-};
-
-/* These structures are used by the ECOFF find_nearest_line function. */
-
-struct ecoff_fdrtab_entry
-{
- /* Base address in .text of this FDR. */
- bfd_vma base_addr;
- FDR *fdr;
-};
-
-struct ecoff_find_line
-{
- /* Allocated memory to hold function and file names. */
- char *find_buffer;
-
- /* FDR table, sorted by address: */
- long fdrtab_len;
- struct ecoff_fdrtab_entry *fdrtab;
-
- /* Cache entry for most recently found line information. The sect
- field is NULL if this cache does not contain valid information. */
- struct
- {
- asection *sect;
- bfd_vma start;
- bfd_vma stop;
- const char *filename;
- const char *functionname;
- unsigned int line_num;
- } cache;
-};
-
-/********************** SWAPPING **********************/
-
-/* The generic ECOFF code needs to be able to swap debugging
- information in and out in the specific format used by a particular
- ECOFF implementation. This structure provides the information
- needed to do this. */
-
-struct ecoff_debug_swap
-{
- /* Symbol table magic number. */
- int sym_magic;
- /* Alignment of debugging information. E.g., 4. */
- bfd_size_type debug_align;
- /* Sizes of external symbolic information. */
- bfd_size_type external_hdr_size;
- bfd_size_type external_dnr_size;
- bfd_size_type external_pdr_size;
- bfd_size_type external_sym_size;
- bfd_size_type external_opt_size;
- bfd_size_type external_fdr_size;
- bfd_size_type external_rfd_size;
- bfd_size_type external_ext_size;
- /* Functions to swap in external symbolic data. */
- void (*swap_hdr_in) (bfd *, void *, HDRR *);
- void (*swap_dnr_in) (bfd *, void *, DNR *);
- void (*swap_pdr_in) (bfd *, void *, PDR *);
- void (*swap_sym_in) (bfd *, void *, SYMR *);
- void (*swap_opt_in) (bfd *, void *, OPTR *);
- void (*swap_fdr_in) (bfd *, void *, FDR *);
- void (*swap_rfd_in) (bfd *, void *, RFDT *);
- void (*swap_ext_in) (bfd *, void *, EXTR *);
- void (*swap_tir_in) (int, const struct tir_ext *, TIR *);
- void (*swap_rndx_in) (int, const struct rndx_ext *, RNDXR *);
- /* Functions to swap out external symbolic data. */
- void (*swap_hdr_out) (bfd *, const HDRR *, void *);
- void (*swap_dnr_out) (bfd *, const DNR *, void *);
- void (*swap_pdr_out) (bfd *, const PDR *, void *);
- void (*swap_sym_out) (bfd *, const SYMR *, void *);
- void (*swap_opt_out) (bfd *, const OPTR *, void *);
- void (*swap_fdr_out) (bfd *, const FDR *, void *);
- void (*swap_rfd_out) (bfd *, const RFDT *, void *);
- void (*swap_ext_out) (bfd *, const EXTR *, void *);
- void (*swap_tir_out) (int, const TIR *, struct tir_ext *);
- void (*swap_rndx_out) (int, const RNDXR *, struct rndx_ext *);
- /* Function to read symbol data and set up pointers in
- ecoff_debug_info structure. The section argument is used for
- ELF, not straight ECOFF. */
- bfd_boolean (*read_debug_info) (bfd *, asection *, struct ecoff_debug_info *);
-};
-
-#endif /* ! defined (ECOFF_H) */
diff --git a/include/coff/external.h b/include/coff/external.h
deleted file mode 100644
index 8dabc8a..0000000
--- a/include/coff/external.h
+++ /dev/null
@@ -1,268 +0,0 @@
-/* external.h -- External COFF structures
-
- Copyright 2001, 2006 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef COFF_EXTERNAL_H
-#define COFF_EXTERNAL_H
-
-#ifndef DO_NOT_DEFINE_FILHDR
-/********************** FILE HEADER **********************/
-
-struct external_filehdr
- {
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
- };
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-#endif
-
-#ifndef DO_NOT_DEFINE_AOUTHDR
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-typedef struct external_aouthdr
- {
- char magic[2]; /* type of file */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes, padded to FW bdry*/
- char dsize[4]; /* initialized data " " */
- char bsize[4]; /* uninitialized data " " */
- char entry[4]; /* entry pt. */
- char text_start[4]; /* base of text used for this file */
- char data_start[4]; /* base of data used for this file */
- } ATTRIBUTE_PACKED
-AOUTHDR;
-
-#define AOUTHDRSZ 28
-#define AOUTSZ 28
-
-typedef struct external_aouthdr64
-{
- char magic[2]; /* Type of file. */
- char vstamp[2]; /* Version stamp. */
- char tsize[4]; /* Text size in bytes, padded to FW bdry*/
- char dsize[4]; /* Initialized data " ". */
- char bsize[4]; /* Uninitialized data " ". */
- char entry[4]; /* Entry pt. */
- char text_start[4]; /* Base of text used for this file. */
-}
-AOUTHDR64;
-#define AOUTHDRSZ64 24
-
-#endif /* not DO_NOT_DEFINE_AOUTHDR */
-
-#ifndef DO_NOT_DEFINE_SCNHDR
-/********************** SECTION HEADER **********************/
-
-struct external_scnhdr
- {
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[2]; /* number of relocation entries */
- char s_nlnno[2]; /* number of line number entries */
- char s_flags[4]; /* flags */
- };
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ 40
-
-/* Names of "special" sections. */
-
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _COMMENT ".comment"
-#define _LIB ".lib"
-#endif /* not DO_NOT_DEFINE_SCNHDR */
-
-#ifndef DO_NOT_DEFINE_LINENO
-
-/********************** LINE NUMBERS **********************/
-
-#ifndef L_LNNO_SIZE
-#error L_LNNO_SIZE needs to be defined
-#endif
-
-/* 1 line number entry for every "breakpointable" source line in a section.
- Line numbers are grouped on a per function basis; first entry in a function
- grouping will have l_lnno = 0 and in place of physical address will be the
- symbol table index of the function name. */
-struct external_lineno
-{
- union
- {
- char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
- char l_paddr[4]; /* (physical) address of line number */
- } l_addr;
-
- char l_lnno[L_LNNO_SIZE]; /* line number */
-};
-
-#define LINENO struct external_lineno
-#define LINESZ (4 + L_LNNO_SIZE)
-
-#if L_LNNO_SIZE == 4
-#define GET_LINENO_LNNO(abfd, ext) H_GET_32 (abfd, (ext->l_lnno))
-#define PUT_LINENO_LNNO(abfd, val, ext) H_PUT_32 (abfd, val, (ext->l_lnno))
-#endif
-#if L_LNNO_SIZE == 2
-#define GET_LINENO_LNNO(abfd, ext) H_GET_16 (abfd, (ext->l_lnno))
-#define PUT_LINENO_LNNO(abfd, val, ext) H_PUT_16 (abfd, val, (ext->l_lnno))
-#endif
-
-#endif /* not DO_NOT_DEFINE_LINENO */
-
-#ifndef DO_NOT_DEFINE_SYMENT
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#ifndef E_FILNMLEN
-#define E_FILNMLEN 14
-#endif
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- union
- {
- char e_name[E_SYMNMLEN];
-
- struct
- {
- char e_zeroes[4];
- char e_offset[4];
- } e;
- } e;
-
- char e_value[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
-} ATTRIBUTE_PACKED ;
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-
-#ifndef N_BTMASK
-#define N_BTMASK 0xf
-#endif
-
-#ifndef N_TMASK
-#define N_TMASK 0x30
-#endif
-
-#ifndef N_BTSHFT
-#define N_BTSHFT 4
-#endif
-
-#ifndef N_TSHIFT
-#define N_TSHIFT 2
-#endif
-
-#endif /* not DO_NOT_DEFINE_SYMENT */
-
-#ifndef DO_NOT_DEFINE_AUXENT
-
-union external_auxent
-{
- struct
- {
- char x_tagndx[4]; /* str, un, or enum tag indx */
-
- union
- {
- struct
- {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
-
- char x_fsize[4]; /* size of function */
-
- } x_misc;
-
- union
- {
- struct /* if ISFCN, tag, or .bb */
- {
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
-
- struct /* if ISARY, up to 4 dimen. */
- {
- char x_dimen[E_DIMNUM][2];
- } x_ary;
-
- } x_fcnary;
-
- char x_tvndx[2]; /* tv index */
-
- } x_sym;
-
- union
- {
- char x_fname[E_FILNMLEN];
-
- struct
- {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
-
- } x_file;
-
- struct
- {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
-#ifdef INCLUDE_COMDAT_FIELDS_IN_AUXENT
- char x_checksum[4]; /* section COMDAT checksum */
- char x_associated[2]; /* COMDAT associated section index */
- char x_comdat[1]; /* COMDAT selection number */
-#endif
- } x_scn;
-
- struct
- {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-} ATTRIBUTE_PACKED ;
-
-#define AUXENT union external_auxent
-#define AUXESZ 18
-
-#define _ETEXT "etext"
-
-#endif /* not DO_NOT_DEFINE_AUXENT */
-
-#endif /* COFF_EXTERNAL_H */
diff --git a/include/coff/go32exe.h b/include/coff/go32exe.h
deleted file mode 100644
index c85da0c..0000000
--- a/include/coff/go32exe.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* COFF information for PC running go32.
-
- Copyright 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#define STUBSIZE 2048
-
-struct external_filehdr_go32_exe
- {
- char stub[STUBSIZE];/* the stub to load the image */
- /* the standard COFF header */
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
- };
-
-#undef FILHDR
-#define FILHDR struct external_filehdr_go32_exe
-#undef FILHSZ
-#define FILHSZ STUBSIZE+20
diff --git a/include/coff/h8300.h b/include/coff/h8300.h
deleted file mode 100644
index 93be6ef..0000000
--- a/include/coff/h8300.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* coff information for Renesas H8/300 and H8/300-H
-
- Copyright 2001, 2003 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#define L_LNNO_SIZE 4
-#include "coff/external.h"
-
-#define H8300MAGIC 0x8300
-#define H8300HMAGIC 0x8301
-#define H8300SMAGIC 0x8302
-#define H8300HNMAGIC 0x8303
-#define H8300SNMAGIC 0x8304
-
-#define H8300BADMAG(x) (((x).f_magic != H8300MAGIC))
-#define H8300HBADMAG(x) (((x).f_magic != H8300HMAGIC))
-#define H8300SBADMAG(x) (((x).f_magic != H8300SMAGIC))
-#define H8300HNBADMAG(x) (((x).f_magic != H8300HNMAGIC))
-#define H8300SNBADMAG(x) (((x).f_magic != H8300SNMAGIC))
-
-/* Relocation directives. */
-
-/* The external reloc has an offset field, because some of the reloc
- types on the h8 don't have room in the instruction for the entire
- offset - eg the strange jump and high page addressing modes. */
-
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_offset[4];
- char r_type[2];
- char r_stuff[2];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 16
-
-
-
-
diff --git a/include/coff/h8500.h b/include/coff/h8500.h
deleted file mode 100644
index 8d4e411..0000000
--- a/include/coff/h8500.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* coff information for Renesas H8/500
-
- Copyright 2001, 2003 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#define L_LNNO_SIZE 4
-#include "coff/external.h"
-
-#define H8500MAGIC 0x8500
-
-#define H8500BADMAG(x) ((0xffff && ((x).f_magic) != H8500MAGIC))
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-/* The external reloc has an offset field, because some of the reloc
- types on the h8 don't have room in the instruction for the entire
- offset - eg the strange jump and high page addressing modes. */
-
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_offset[4];
- char r_type[2];
- char r_stuff[2];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 16
-
-
-
-
diff --git a/include/coff/i386.h b/include/coff/i386.h
deleted file mode 100644
index 023b302..0000000
--- a/include/coff/i386.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* coff information for Intel 386/486.
-
- Copyright 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#define L_LNNO_SIZE 2
-#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
-#include "coff/external.h"
-
-/* Bits for f_flags:
- F_RELFLG relocation info stripped from file
- F_EXEC file is executable (no unresolved external references)
- F_LNNO line numbers stripped from file
- F_LSYMS local symbols stripped from file
- F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax). */
-
-#define F_RELFLG (0x0001)
-#define F_EXEC (0x0002)
-#define F_LNNO (0x0004)
-#define F_LSYMS (0x0008)
-
-#define I386MAGIC 0x14c
-#define I386PTXMAGIC 0x154
-#define I386AIXMAGIC 0x175
-
-/* This is Lynx's all-platform magic number for executables. */
-
-#define LYNXCOFFMAGIC 0415
-
-#define I386BADMAG(x) ( ((x).f_magic != I386MAGIC) \
- && (x).f_magic != I386AIXMAGIC \
- && (x).f_magic != I386PTXMAGIC \
- && (x).f_magic != LYNXCOFFMAGIC)
-
-#define OMAGIC 0404 /* object files, eg as output */
-#define ZMAGIC 0413 /* demand load format, eg normal ld output */
-#define STMAGIC 0401 /* target shlib */
-#define SHMAGIC 0443 /* host shlib */
-
-/* define some NT default values */
-/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
-#define NT_SECTION_ALIGNMENT 0x1000
-#define NT_FILE_ALIGNMENT 0x200
-#define NT_DEF_RESERVE 0x100000
-#define NT_DEF_COMMIT 0x1000
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 10
-
diff --git a/include/coff/i860.h b/include/coff/i860.h
deleted file mode 100644
index 6e8d1b4..0000000
--- a/include/coff/i860.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* COFF information for the Intel i860.
-
- Copyright 2001, 2003 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* This file was hacked from i386.h [dolan@ssd.intel.com] */
-
-#define L_LNNO_SIZE 2
-#include "coff/external.h"
-
-/* Bits for f_flags:
- F_RELFLG relocation info stripped from file
- F_EXEC file is executable (no unresolved external references)
- F_LNNO line numbers stripped from file
- F_LSYMS local symbols stripped from file
- F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax). */
-
-#define F_RELFLG (0x0001)
-#define F_EXEC (0x0002)
-#define F_LNNO (0x0004)
-#define F_LSYMS (0x0008)
-
-#define I860MAGIC 0x14d
-
-#define I860BADMAG(x) ((x).f_magic != I860MAGIC)
-
-#undef AOUTSZ
-#define AOUTSZ 36
-
-/* FIXME: What are the a.out magic numbers? */
-
-#define _ETEXT "etext"
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 10
-
-/* The relocation directory entry types.
- PAIR : The low half that follows relates to the preceeding HIGH[ADJ].
- HIGH : The high half of a 32-bit constant.
- LOWn : The low half, insn bits 15..(n-1), 2^n-byte aligned.
- SPLITn : The low half, insn bits 20..16 and 10..(n-1), 2^n-byte aligned.
- HIGHADJ: Similar to HIGH, but with adjustment.
- BRADDR : 26-bit branch displacement.
-
- Note: The Intel assembler manual lists LOW4 as one of the
- relocation types, but it appears to be useless for the i860.
- We will recognize it anyway, just in case it actually appears in
- any object files. */
-
-enum {
- COFF860_R_PAIR = 0x1c,
- COFF860_R_HIGH = 0x1e,
- COFF860_R_LOW0 = 0x1f,
- COFF860_R_LOW1 = 0x20,
- COFF860_R_LOW2 = 0x21,
- COFF860_R_LOW3 = 0x22,
- COFF860_R_LOW4 = 0x23,
- COFF860_R_SPLIT0 = 0x24,
- COFF860_R_SPLIT1 = 0x25,
- COFF860_R_SPLIT2 = 0x26,
- COFF860_R_HIGHADJ = 0x27,
- COFF860_R_BRADDR = 0x28
-};
-
diff --git a/include/coff/i960.h b/include/coff/i960.h
deleted file mode 100644
index b5ff6a5..0000000
--- a/include/coff/i960.h
+++ /dev/null
@@ -1,319 +0,0 @@
-/* coff information for 80960. Origins: Intel corp, natch.
-
- Copyright 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* NOTE: Tagentries (cf TAGBITS) are no longer used by the 960 */
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr
-{
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
-};
-
-#define OMAGIC (0407) /* old impure format. data immediately
- follows text. both sections are rw. */
-#define NMAGIC (0410) /* split i&d, read-only text */
-
-/*
-* Intel 80960 (I960) processor flags.
-* F_I960TYPE == mask for processor type field.
-*/
-
-#define F_I960TYPE (0xf000)
-#define F_I960CORE (0x1000)
-#define F_I960KB (0x2000)
-#define F_I960SB (0x2000)
-#define F_I960MC (0x3000)
-#define F_I960XA (0x4000)
-#define F_I960CA (0x5000)
-#define F_I960KA (0x6000)
-#define F_I960SA (0x6000)
-#define F_I960JX (0x7000)
-#define F_I960HX (0x8000)
-
-
-/** i80960 Magic Numbers
-*/
-
-#define I960ROMAGIC (0x160) /* read-only text segments */
-#define I960RWMAGIC (0x161) /* read-write text segments */
-
-#define I960BADMAG(x) (((x).f_magic!=I960ROMAGIC) && ((x).f_magic!=I960RWMAGIC))
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-typedef struct
-{
- unsigned long phys_addr;
- unsigned long bitarray;
-} TAGBITS;
-
-typedef struct
-{
- char magic[2]; /* type of file */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes, padded to FW bdry*/
- char dsize[4]; /* initialized data " " */
- char bsize[4]; /* uninitialized data " " */
- char entry[4]; /* entry pt. */
- char text_start[4]; /* base of text used for this file */
- char data_start[4]; /* base of data used for this file */
- char tagentries[4]; /* number of tag entries to follow */
-}
-AOUTHDR;
-
-/* return a pointer to the tag bits array */
-
-#define TAGPTR(aout) ((TAGBITS *) (&(aout.tagentries)+1))
-
-/* compute size of a header */
-
-/*#define AOUTSZ(aout) (sizeof(AOUTHDR)+(aout.tagentries*sizeof(TAGBITS)))*/
-#define AOUTSZ 32
-#define AOUTHDRSZ 32
-
-
-/********************** SECTION HEADER **********************/
-
-struct external_scnhdr
-{
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[2]; /* number of relocation entries */
- char s_nlnno[2]; /* number of line number entries*/
- char s_flags[4]; /* flags */
- char s_align[4]; /* section alignment */
-};
-
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ 44
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-
-/********************** LINE NUMBERS **********************/
-
-/* 1 line number entry for every "breakpointable" source line in a section.
- * Line numbers are grouped on a per function basis; first entry in a function
- * grouping will have l_lnno = 0 and in place of physical address will be the
- * symbol table index of the function name.
- */
-struct external_lineno
-{
- union
- {
- char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
- char l_paddr[4]; /* (physical) address of line number */
- } l_addr;
-
- char l_lnno[2]; /* line number */
- char padding[2]; /* force alignment */
-};
-
-
-#define LINENO struct external_lineno
-#define LINESZ 8
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- union
- {
- char e_name[E_SYMNMLEN];
-
- struct
- {
- char e_zeroes[4];
- char e_offset[4];
- } e;
- } e;
-
- char e_value[4];
- char e_scnum[2];
- char e_flags[2];
- char e_type[4];
- char e_sclass[1];
- char e_numaux[1];
- char pad2[2];
-};
-
-#define N_BTMASK (0x1f)
-#define N_TMASK (0x60)
-#define N_BTSHFT (5)
-#define N_TSHIFT (2)
-
-union external_auxent
-{
- struct
- {
- char x_tagndx[4]; /* str, un, or enum tag indx */
-
- union
- {
- struct
- {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
-
- char x_fsize[4]; /* size of function */
-
- } x_misc;
-
- union
- {
- struct /* if ISFCN, tag, or .bb */
- {
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
-
- struct /* if ISARY, up to 4 dimen. */
- {
- char x_dimen[E_DIMNUM][2];
- } x_ary;
-
- } x_fcnary;
-
- char x_tvndx[2]; /* tv index */
-
- } x_sym;
-
- union
- {
- char x_fname[E_FILNMLEN];
-
- struct
- {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
-
- } x_file;
-
- struct
- {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
-
- } x_scn;
-
- struct
- {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
-
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-
- /******************************************
- * I960-specific *2nd* aux. entry formats
- ******************************************/
- struct
- {
- /* This is a very old typo that keeps getting propagated. */
-#define x_stdindx x_stindx
- char x_stindx[4]; /* sys. table entry */
- } x_sc; /* system call entry */
-
- struct
- {
- char x_balntry[4]; /* BAL entry point */
- } x_bal; /* BAL-callable function */
-
- struct
- {
- char x_timestamp[4]; /* time stamp */
- char x_idstring[20]; /* producer identity string */
-
- } x_ident; /* Producer ident info */
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 24
-#define AUXENT union external_auxent
-#define AUXESZ 24
-
-# define _ETEXT "_etext"
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
- char pad[2];
-};
-
-/* r_type values for the i960. */
-
-/* The i960 uses R_RELLONG, which is defined in internal.h as 0x11.
- It is an absolute 32 bit relocation. */
-
-#define R_IPRMED (0x19) /* 24-bit ip-relative relocation */
-#define R_OPTCALL (0x1b) /* 32-bit optimizable call (leafproc/sysproc) */
-#define R_OPTCALLX (0x1c) /* 64-bit optimizable call (leafproc/sysproc) */
-
-/* The following relocation types are defined use by relaxing linkers,
- which convert 32 bit calls (which require a 64 bit instruction)
- into 24 bit calls (which require a 32 bit instruction) when
- possible. It will be possible whenever the target of the call is
- within a 24 bit range of the call instruction.
-
- It is always safe to ignore these relocations. They only serve to
- mark points which the relaxing linker will have to consider. The
- assembler must ensure that the correct code is generated even if
- the relocations are ignored. In particular, this means that the
- R_IPR13 relocation may not appear with an external symbol. */
-
-#define R_IPR13 (0x1d) /* 13 bit ip-relative branch */
-#define R_ALIGN (0x1e) /* alignment marker. This has no
- associated symbol. Instead, the
- r_symndx field indicates the
- require alignment at this point in
- the file. It must be a power of 2. */
-
-#define RELOC struct external_reloc
-#define RELSZ 12
-
diff --git a/include/coff/ia64.h b/include/coff/ia64.h
deleted file mode 100644
index dd04f62..0000000
--- a/include/coff/ia64.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* coff information for HP/Intel IA-64.
-
- Copyright 2000 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#define DO_NOT_DEFINE_AOUTHDR
-#define L_LNNO_SIZE 2
-#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
-#include "coff/external.h"
-
-#define IA64MAGIC 0x200
-
-#define IA64BADMAG(x) (((x).f_magic != IA64MAGIC))
-
-/* Bits for f_flags:
- * F_RELFLG relocation info stripped from file
- * F_EXEC file is executable (no unresolved external references)
- * F_LNNO line numbers stripped from file
- * F_LSYMS local symbols stripped from file
- * F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax)
- */
-
-#define F_RELFLG (0x0001)
-#define F_EXEC (0x0002)
-#define F_LNNO (0x0004)
-#define F_LSYMS (0x0008)
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-typedef struct
-{
- char magic[2]; /* type of file */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes, padded to FW bdry*/
- char dsize[4]; /* initialized data " " */
- char bsize[4]; /* uninitialized data " " */
- char entry[4]; /* entry pt. */
- char text_start[4]; /* base of text used for this file */
-#ifndef BFD64
- char data_start[4]; /* base of data used for this file */
-#endif
-}
-AOUTHDR;
-
-#define PE32MAGIC 0x10b /* 32-bit image */
-#define PE32PMAGIC 0x20b /* 32-bit image inside 64-bit address space */
-
-#define PE32PBADMAG(x) (((x).f_magic != PE32PMAGIC))
-
-#define AOUTSZ 108
-#define AOUTHDRSZ 108
-
-#define OMAGIC 0404 /* object files, eg as output */
-#define ZMAGIC 0413 /* demand load format, eg normal ld output */
-#define STMAGIC 0401 /* target shlib */
-#define SHMAGIC 0443 /* host shlib */
-
-/* define some NT default values */
-/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
-#define NT_SECTION_ALIGNMENT 0x1000
-#define NT_FILE_ALIGNMENT 0x200
-#define NT_DEF_RESERVE 0x100000
-#define NT_DEF_COMMIT 0x1000
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 10
-
diff --git a/include/coff/internal.h b/include/coff/internal.h
deleted file mode 100644
index 4c4eab9..0000000
--- a/include/coff/internal.h
+++ /dev/null
@@ -1,809 +0,0 @@
-/* Internal format of COFF object file data structures, for GNU BFD.
- This file is part of BFD, the Binary File Descriptor library.
-
- Copyright 1999, 2000, 2001, 2002, 2003, 2004. 2005, 2006, 2007
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef GNU_COFF_INTERNAL_H
-#define GNU_COFF_INTERNAL_H 1
-
-/* First, make "signed char" work, even on old compilers. */
-#ifndef signed
-#ifndef __STDC__
-#define signed /**/
-#endif
-#endif
-
-/********************** FILE HEADER **********************/
-
-/* extra stuff in a PE header. */
-
-struct internal_extra_pe_filehdr
-{
- /* DOS header data follows for PE stuff */
- unsigned short e_magic; /* Magic number, 0x5a4d */
- unsigned short e_cblp; /* Bytes on last page of file, 0x90 */
- unsigned short e_cp; /* Pages in file, 0x3 */
- unsigned short e_crlc; /* Relocations, 0x0 */
- unsigned short e_cparhdr; /* Size of header in paragraphs, 0x4 */
- unsigned short e_minalloc; /* Minimum extra paragraphs needed, 0x0 */
- unsigned short e_maxalloc; /* Maximum extra paragraphs needed, 0xFFFF */
- unsigned short e_ss; /* Initial (relative) SS value, 0x0 */
- unsigned short e_sp; /* Initial SP value, 0xb8 */
- unsigned short e_csum; /* Checksum, 0x0 */
- unsigned short e_ip; /* Initial IP value, 0x0 */
- unsigned short e_cs; /* Initial (relative) CS value, 0x0 */
- unsigned short e_lfarlc; /* File address of relocation table, 0x40 */
- unsigned short e_ovno; /* Overlay number, 0x0 */
- unsigned short e_res[4]; /* Reserved words, all 0x0 */
- unsigned short e_oemid; /* OEM identifier (for e_oeminfo), 0x0 */
- unsigned short e_oeminfo; /* OEM information; e_oemid specific, 0x0 */
- unsigned short e_res2[10]; /* Reserved words, all 0x0 */
- bfd_vma e_lfanew; /* File address of new exe header, 0x80 */
- unsigned long dos_message[16]; /* text which always follows dos header */
- bfd_vma nt_signature; /* required NT signature, 0x4550 */
-};
-
-struct internal_filehdr
-{
- struct internal_extra_pe_filehdr pe;
-
- /* Standard coff internal info. */
- unsigned short f_magic; /* magic number */
- unsigned short f_nscns; /* number of sections */
- long f_timdat; /* time & date stamp */
- bfd_vma f_symptr; /* file pointer to symtab */
- long f_nsyms; /* number of symtab entries */
- unsigned short f_opthdr; /* sizeof(optional hdr) */
- unsigned short f_flags; /* flags */
- unsigned short f_target_id; /* (TI COFF specific) */
-};
-
-
-/* Bits for f_flags:
- F_RELFLG relocation info stripped from file
- F_EXEC file is executable (no unresolved external references)
- F_LNNO line numbers stripped from file
- F_LSYMS local symbols stripped from file
- F_AR16WR file is 16-bit little-endian
- F_AR32WR file is 32-bit little-endian
- F_AR32W file is 32-bit big-endian
- F_DYNLOAD rs/6000 aix: dynamically loadable w/imports & exports
- F_SHROBJ rs/6000 aix: file is a shared object
- F_DLL PE format DLL. */
-
-#define F_RELFLG (0x0001)
-#define F_EXEC (0x0002)
-#define F_LNNO (0x0004)
-#define F_LSYMS (0x0008)
-#define F_AR16WR (0x0080)
-#define F_AR32WR (0x0100)
-#define F_AR32W (0x0200)
-#define F_DYNLOAD (0x1000)
-#define F_SHROBJ (0x2000)
-#define F_DLL (0x2000)
-
-/* Extra structure which is used in the optional header. */
-typedef struct _IMAGE_DATA_DIRECTORY
-{
- bfd_vma VirtualAddress;
- long Size;
-} IMAGE_DATA_DIRECTORY;
-#define PE_EXPORT_TABLE 0
-#define PE_IMPORT_TABLE 1
-#define PE_RESOURCE_TABLE 2
-#define PE_EXCEPTION_TABLE 3
-#define PE_CERTIFICATE_TABLE 4
-#define PE_BASE_RELOCATION_TABLE 5
-#define PE_DEBUG_DATA 6
-#define PE_ARCHITECTURE 7
-#define PE_GLOBAL_PTR 8
-#define PE_TLS_TABLE 9
-#define PE_LOAD_CONFIG_TABLE 10
-#define PE_BOUND_IMPORT_TABLE 11
-#define PE_IMPORT_ADDRESS_TABLE 12
-#define PE_DELAY_IMPORT_DESCRIPTOR 13
-#define PE_CLR_RUNTIME_HEADER 14
-/* DataDirectory[15] is currently reserved, so no define. */
-#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
-
-/* Default image base for NT. */
-#define NT_EXE_IMAGE_BASE 0x400000
-#define NT_DLL_IMAGE_BASE 0x10000000
-
-/* Default image base for BeOS. */
-#define BEOS_EXE_IMAGE_BASE 0x80000000
-#define BEOS_DLL_IMAGE_BASE 0x10000000
-
-/* Extra stuff in a PE aouthdr */
-
-#define PE_DEF_SECTION_ALIGNMENT 0x1000
-#ifndef PE_DEF_FILE_ALIGNMENT
-# define PE_DEF_FILE_ALIGNMENT 0x200
-#endif
-
-struct internal_extra_pe_aouthdr
-{
- /* FIXME: The following entries are in AOUTHDR. But they aren't
- available internally in bfd. We add them here so that objdump
- can dump them. */
- /* The state of the image file */
- short Magic;
- /* Linker major version number */
- char MajorLinkerVersion;
- /* Linker minor version number */
- char MinorLinkerVersion;
- /* Total size of all code sections */
- long SizeOfCode;
- /* Total size of all initialized data sections */
- long SizeOfInitializedData;
- /* Total size of all uninitialized data sections */
- long SizeOfUninitializedData;
- /* Address of entry point relative to image base. */
- bfd_vma AddressOfEntryPoint;
- /* Address of the first code section relative to image base. */
- bfd_vma BaseOfCode;
- /* Address of the first data section relative to image base. */
- bfd_vma BaseOfData;
-
- /* PE stuff */
- bfd_vma ImageBase; /* address of specific location in memory that
- file is located, NT default 0x10000 */
-
- bfd_vma SectionAlignment; /* section alignment default 0x1000 */
- bfd_vma FileAlignment; /* file alignment default 0x200 */
- short MajorOperatingSystemVersion; /* minimum version of the operating */
- short MinorOperatingSystemVersion; /* system req'd for exe, default to 1*/
- short MajorImageVersion; /* user defineable field to store version of */
- short MinorImageVersion; /* exe or dll being created, default to 0 */
- short MajorSubsystemVersion; /* minimum subsystem version required to */
- short MinorSubsystemVersion; /* run exe; default to 3.1 */
- long Reserved1; /* seems to be 0 */
- long SizeOfImage; /* size of memory to allocate for prog */
- long SizeOfHeaders; /* size of PE header and section table */
- long CheckSum; /* set to 0 */
- short Subsystem;
-
- /* type of subsystem exe uses for user interface,
- possible values:
- 1 - NATIVE Doesn't require a subsystem
- 2 - WINDOWS_GUI runs in Windows GUI subsystem
- 3 - WINDOWS_CUI runs in Windows char sub. (console app)
- 5 - OS2_CUI runs in OS/2 character subsystem
- 7 - POSIX_CUI runs in Posix character subsystem */
- short DllCharacteristics; /* flags for DLL init, use 0 */
- bfd_vma SizeOfStackReserve; /* amount of memory to reserve */
- bfd_vma SizeOfStackCommit; /* amount of memory initially committed for
- initial thread's stack, default is 0x1000 */
- bfd_vma SizeOfHeapReserve; /* amount of virtual memory to reserve and */
- bfd_vma SizeOfHeapCommit; /* commit, don't know what to defaut it to */
- long LoaderFlags; /* can probably set to 0 */
- long NumberOfRvaAndSizes; /* number of entries in next entry, 16 */
- IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
-};
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-struct internal_aouthdr
-{
- short magic; /* type of file */
- short vstamp; /* version stamp */
- bfd_vma tsize; /* text size in bytes, padded to FW bdry*/
- bfd_vma dsize; /* initialized data " " */
- bfd_vma bsize; /* uninitialized data " " */
- bfd_vma entry; /* entry pt. */
- bfd_vma text_start; /* base of text used for this file */
- bfd_vma data_start; /* base of data used for this file */
-
- /* i960 stuff */
- unsigned long tagentries; /* number of tag entries to follow */
-
- /* RS/6000 stuff */
- bfd_vma o_toc; /* address of TOC */
- short o_snentry; /* section number for entry point */
- short o_sntext; /* section number for text */
- short o_sndata; /* section number for data */
- short o_sntoc; /* section number for toc */
- short o_snloader; /* section number for loader section */
- short o_snbss; /* section number for bss */
- short o_algntext; /* max alignment for text */
- short o_algndata; /* max alignment for data */
- short o_modtype; /* Module type field, 1R,RE,RO */
- short o_cputype; /* Encoded CPU type */
- bfd_vma o_maxstack; /* max stack size allowed. */
- bfd_vma o_maxdata; /* max data size allowed. */
-
- /* ECOFF stuff */
- bfd_vma bss_start; /* Base of bss section. */
- bfd_vma gp_value; /* GP register value. */
- unsigned long gprmask; /* General registers used. */
- unsigned long cprmask[4]; /* Coprocessor registers used. */
- unsigned long fprmask; /* Floating pointer registers used. */
-
- /* Apollo stuff */
- long o_inlib; /* inlib data */
- long o_sri; /* Static Resource Information */
- long vid[2]; /* Version id */
-
- struct internal_extra_pe_aouthdr pe;
-};
-
-/********************** STORAGE CLASSES **********************/
-
-/* This used to be defined as -1, but now n_sclass is unsigned. */
-#define C_EFCN 0xff /* physical end of function */
-#define C_NULL 0
-#define C_AUTO 1 /* automatic variable */
-#define C_EXT 2 /* external symbol */
-#define C_STAT 3 /* static */
-#define C_REG 4 /* register variable */
-#define C_EXTDEF 5 /* external definition */
-#define C_LABEL 6 /* label */
-#define C_ULABEL 7 /* undefined label */
-#define C_MOS 8 /* member of structure */
-#define C_ARG 9 /* function argument */
-#define C_STRTAG 10 /* structure tag */
-#define C_MOU 11 /* member of union */
-#define C_UNTAG 12 /* union tag */
-#define C_TPDEF 13 /* type definition */
-#define C_USTATIC 14 /* undefined static */
-#define C_ENTAG 15 /* enumeration tag */
-#define C_MOE 16 /* member of enumeration */
-#define C_REGPARM 17 /* register parameter */
-#define C_FIELD 18 /* bit field */
-#define C_AUTOARG 19 /* auto argument */
-#define C_LASTENT 20 /* dummy entry (end of block) */
-#define C_BLOCK 100 /* ".bb" or ".eb" */
-#define C_FCN 101 /* ".bf" or ".ef" */
-#define C_EOS 102 /* end of structure */
-#define C_FILE 103 /* file name */
-#define C_LINE 104 /* line # reformatted as symbol table entry */
-#define C_ALIAS 105 /* duplicate tag */
-#define C_HIDDEN 106 /* ext symbol in dmert public lib */
-
-#if defined _AIX52 || defined AIX_WEAK_SUPPORT
-#define C_WEAKEXT 111 /* weak symbol -- AIX standard. */
-#else
-#define C_WEAKEXT 127 /* weak symbol -- GNU extension. */
-#endif
-
-/* New storage classes for TI COFF */
-#define C_UEXT 19 /* Tentative external definition */
-#define C_STATLAB 20 /* Static load time label */
-#define C_EXTLAB 21 /* External load time label */
-#define C_SYSTEM 23 /* System Wide variable */
-
-/* New storage classes for WINDOWS_NT */
-#define C_SECTION 104 /* section name */
-#define C_NT_WEAK 105 /* weak external */
-
- /* New storage classes for 80960 */
-
-/* C_LEAFPROC is obsolete. Use C_LEAFEXT or C_LEAFSTAT */
-#define C_LEAFPROC 108 /* Leaf procedure, "call" via BAL */
-
-#define C_SCALL 107 /* Procedure reachable via system call */
-#define C_LEAFEXT 108 /* External leaf */
-#define C_LEAFSTAT 113 /* Static leaf */
-#define C_OPTVAR 109 /* Optimized variable */
-#define C_DEFINE 110 /* Preprocessor #define */
-#define C_PRAGMA 111 /* Advice to compiler or linker */
-#define C_SEGMENT 112 /* 80960 segment name */
-
- /* Storage classes for m88k */
-#define C_SHADOW 107 /* shadow symbol */
-#define C_VERSION 108 /* coff version symbol */
-
- /* New storage classes for RS/6000 */
-#define C_HIDEXT 107 /* Un-named external symbol */
-#define C_BINCL 108 /* Marks beginning of include file */
-#define C_EINCL 109 /* Marks ending of include file */
-
- /* storage classes for stab symbols for RS/6000 */
-#define C_GSYM (0x80)
-#define C_LSYM (0x81)
-#define C_PSYM (0x82)
-#define C_RSYM (0x83)
-#define C_RPSYM (0x84)
-#define C_STSYM (0x85)
-#define C_TCSYM (0x86)
-#define C_BCOMM (0x87)
-#define C_ECOML (0x88)
-#define C_ECOMM (0x89)
-#define C_DECL (0x8c)
-#define C_ENTRY (0x8d)
-#define C_FUN (0x8e)
-#define C_BSTAT (0x8f)
-#define C_ESTAT (0x90)
-
-/* Storage classes for Thumb symbols */
-#define C_THUMBEXT (128 + C_EXT) /* 130 */
-#define C_THUMBSTAT (128 + C_STAT) /* 131 */
-#define C_THUMBLABEL (128 + C_LABEL) /* 134 */
-#define C_THUMBEXTFUNC (C_THUMBEXT + 20) /* 150 */
-#define C_THUMBSTATFUNC (C_THUMBSTAT + 20) /* 151 */
-
-/********************** SECTION HEADER **********************/
-
-#define SCNNMLEN (8)
-
-struct internal_scnhdr
-{
- char s_name[SCNNMLEN]; /* section name */
-
- /* Physical address, aliased s_nlib.
- In the pei format, this field is the virtual section size
- (the size of the section after being loaded int memory),
- NOT the physical address. */
- bfd_vma s_paddr;
-
- bfd_vma s_vaddr; /* virtual address */
- bfd_vma s_size; /* section size */
- bfd_vma s_scnptr; /* file ptr to raw data for section */
- bfd_vma s_relptr; /* file ptr to relocation */
- bfd_vma s_lnnoptr; /* file ptr to line numbers */
- unsigned long s_nreloc; /* number of relocation entries */
- unsigned long s_nlnno; /* number of line number entries*/
- long s_flags; /* flags */
- long s_align; /* used on I960 */
- unsigned char s_page; /* TI COFF load page */
-};
-
-/* s_flags "type". */
-#define STYP_REG (0x0000) /* "regular": allocated, relocated, loaded */
-#define STYP_DSECT (0x0001) /* "dummy": relocated only*/
-#define STYP_NOLOAD (0x0002) /* "noload": allocated, relocated, not loaded */
-#define STYP_GROUP (0x0004) /* "grouped": formed of input sections */
-#define STYP_PAD (0x0008) /* "padding": not allocated, not relocated, loaded */
-#define STYP_COPY (0x0010) /* "copy": for decision function used by field update; not allocated, not relocated,
- loaded; reloc & lineno entries processed normally */
-#define STYP_TEXT (0x0020) /* section contains text only */
-#define S_SHRSEG (0x0020) /* In 3b Update files (output of ogen), sections which appear in SHARED segments of the Pfile
- will have the S_SHRSEG flag set by ogen, to inform dufr that updating 1 copy of the proc. will
- update all process invocations. */
-#define STYP_DATA (0x0040) /* section contains data only */
-#define STYP_BSS (0x0080) /* section contains bss only */
-#define S_NEWFCN (0x0100) /* In a minimal file or an update file, a new function (as compared with a replaced function) */
-#define STYP_INFO (0x0200) /* comment: not allocated not relocated, not loaded */
-#define STYP_OVER (0x0400) /* overlay: relocated not allocated or loaded */
-#define STYP_LIB (0x0800) /* for .lib: same as INFO */
-#define STYP_MERGE (0x2000) /* merge section -- combines with text, data or bss sections only */
-#define STYP_REVERSE_PAD (0x4000) /* section will be padded with no-op instructions
- wherever padding is necessary and there is a
- word of contiguous bytes beginning on a word
- boundary. */
-
-#define STYP_LIT 0x8020 /* Literal data (like STYP_TEXT) */
-
-
-/********************** LINE NUMBERS **********************/
-
-/* 1 line number entry for every "breakpointable" source line in a section.
- Line numbers are grouped on a per function basis; first entry in a function
- grouping will have l_lnno = 0 and in place of physical address will be the
- symbol table index of the function name. */
-
-struct internal_lineno
-{
- union
- {
- bfd_signed_vma l_symndx; /* function name symbol index, iff l_lnno == 0*/
- bfd_signed_vma l_paddr; /* (physical) address of line number */
- } l_addr;
- unsigned long l_lnno; /* line number */
-};
-
-/********************** SYMBOLS **********************/
-
-#define SYMNMLEN 8 /* # characters in a symbol name */
-#define FILNMLEN 14 /* # characters in a file name */
-#define DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-struct internal_syment
-{
- union
- {
- char _n_name[SYMNMLEN]; /* old COFF version */
- struct
- {
- bfd_hostptr_t _n_zeroes; /* new == 0 */
- bfd_hostptr_t _n_offset; /* offset into string table */
- } _n_n;
- char *_n_nptr[2]; /* allows for overlaying */
- } _n;
- bfd_vma n_value; /* value of symbol */
- short n_scnum; /* section number */
- unsigned short n_flags; /* copy of flags from filhdr */
- unsigned short n_type; /* type and derived type */
- unsigned char n_sclass; /* storage class */
- unsigned char n_numaux; /* number of aux. entries */
-};
-
-#define n_name _n._n_name
-#define n_zeroes _n._n_n._n_zeroes
-#define n_offset _n._n_n._n_offset
-
-/* Relocatable symbols have number of the section in which they are defined,
- or one of the following: */
-
-#define N_UNDEF ((short)0) /* undefined symbol */
-#define N_ABS ((short)-1) /* value of symbol is absolute */
-#define N_DEBUG ((short)-2) /* debugging symbol -- value is meaningless */
-#define N_TV ((short)-3) /* indicates symbol needs preload transfer vector */
-#define P_TV ((short)-4) /* indicates symbol needs postload transfer vector*/
-
-/* Type of a symbol, in low N bits of the word. */
-
-#define T_NULL 0
-#define T_VOID 1 /* function argument (only used by compiler) */
-#define T_CHAR 2 /* character */
-#define T_SHORT 3 /* short integer */
-#define T_INT 4 /* integer */
-#define T_LONG 5 /* long integer */
-#define T_FLOAT 6 /* floating point */
-#define T_DOUBLE 7 /* double word */
-#define T_STRUCT 8 /* structure */
-#define T_UNION 9 /* union */
-#define T_ENUM 10 /* enumeration */
-#define T_MOE 11 /* member of enumeration*/
-#define T_UCHAR 12 /* unsigned character */
-#define T_USHORT 13 /* unsigned short */
-#define T_UINT 14 /* unsigned integer */
-#define T_ULONG 15 /* unsigned long */
-#define T_LNGDBL 16 /* long double */
-
-/* Derived types, in n_type. */
-
-#define DT_NON (0) /* no derived type */
-#define DT_PTR (1) /* pointer */
-#define DT_FCN (2) /* function */
-#define DT_ARY (3) /* array */
-
-#define BTYPE(x) ((x) & N_BTMASK)
-#define DTYPE(x) (((x) & N_TMASK) >> N_BTSHFT)
-
-#define ISPTR(x) \
- (((unsigned long) (x) & N_TMASK) == ((unsigned long) DT_PTR << N_BTSHFT))
-#define ISFCN(x) \
- (((unsigned long) (x) & N_TMASK) == ((unsigned long) DT_FCN << N_BTSHFT))
-#define ISARY(x) \
- (((unsigned long) (x) & N_TMASK) == ((unsigned long) DT_ARY << N_BTSHFT))
-#define ISTAG(x) \
- ((x) == C_STRTAG || (x) == C_UNTAG || (x) == C_ENTAG)
-#define DECREF(x) \
- ((((x) >> N_TSHIFT) & ~ N_BTMASK) | ((x) & N_BTMASK))
-
-union internal_auxent
-{
- struct
- {
-
- union
- {
- long l; /* str, un, or enum tag indx */
- struct coff_ptr_struct *p;
- } x_tagndx;
-
- union
- {
- struct
- {
- unsigned short x_lnno; /* declaration line number */
- unsigned short x_size; /* str/union/array size */
- } x_lnsz;
- long x_fsize; /* size of function */
- } x_misc;
-
- union
- {
- struct
- { /* if ISFCN, tag, or .bb */
- bfd_signed_vma x_lnnoptr; /* ptr to fcn line # */
- union
- { /* entry ndx past block end */
- long l;
- struct coff_ptr_struct *p;
- } x_endndx;
- } x_fcn;
-
- struct
- { /* if ISARY, up to 4 dimen. */
- unsigned short x_dimen[DIMNUM];
- } x_ary;
- } x_fcnary;
-
- unsigned short x_tvndx; /* tv index */
- } x_sym;
-
- union
- {
- char x_fname[FILNMLEN];
- struct
- {
- long x_zeroes;
- long x_offset;
- } x_n;
- } x_file;
-
- struct
- {
- long x_scnlen; /* section length */
- unsigned short x_nreloc; /* # relocation entries */
- unsigned short x_nlinno; /* # line numbers */
- unsigned long x_checksum; /* section COMDAT checksum for PE */
- unsigned short x_associated; /* COMDAT associated section index for PE */
- unsigned char x_comdat; /* COMDAT selection number for PE */
- } x_scn;
-
- struct
- {
- long x_tvfill; /* tv fill value */
- unsigned short x_tvlen; /* length of .tv */
- unsigned short x_tvran[2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-
- /******************************************
- * RS/6000-specific auxent - last auxent for every external symbol
- ******************************************/
- struct
- {
- union
- { /* csect length or enclosing csect */
- bfd_signed_vma l;
- struct coff_ptr_struct *p;
- } x_scnlen;
- long x_parmhash; /* parm type hash index */
- unsigned short x_snhash; /* sect num with parm hash */
- unsigned char x_smtyp; /* symbol align and type */
- /* 0-4 - Log 2 of alignment */
- /* 5-7 - symbol type */
- unsigned char x_smclas; /* storage mapping class */
- long x_stab; /* dbx stab info index */
- unsigned short x_snstab; /* sect num with dbx stab */
- } x_csect; /* csect definition information */
-
-/* x_smtyp values: */
-
-#define SMTYP_ALIGN(x) ((x) >> 3) /* log2 of alignment */
-#define SMTYP_SMTYP(x) ((x) & 0x7) /* symbol type */
-/* Symbol type values: */
-#define XTY_ER 0 /* External reference */
-#define XTY_SD 1 /* Csect definition */
-#define XTY_LD 2 /* Label definition */
-#define XTY_CM 3 /* .BSS */
-#define XTY_EM 4 /* Error message */
-#define XTY_US 5 /* "Reserved for internal use" */
-
-/* x_smclas values: */
-
-#define XMC_PR 0 /* Read-only program code */
-#define XMC_RO 1 /* Read-only constant */
-#define XMC_DB 2 /* Read-only debug dictionary table */
-#define XMC_TC 3 /* Read-write general TOC entry */
-#define XMC_UA 4 /* Read-write unclassified */
-#define XMC_RW 5 /* Read-write data */
-#define XMC_GL 6 /* Read-only global linkage */
-#define XMC_XO 7 /* Read-only extended operation */
-#define XMC_SV 8 /* Read-only supervisor call */
-#define XMC_BS 9 /* Read-write BSS */
-#define XMC_DS 10 /* Read-write descriptor csect */
-#define XMC_UC 11 /* Read-write unnamed Fortran common */
-#define XMC_TI 12 /* Read-only traceback index csect */
-#define XMC_TB 13 /* Read-only traceback table csect */
-/* 14 ??? */
-#define XMC_TC0 15 /* Read-write TOC anchor */
-#define XMC_TD 16 /* Read-write data in TOC */
-
- /******************************************
- * I960-specific *2nd* aux. entry formats
- ******************************************/
- struct
- {
- /* This is a very old typo that keeps getting propagated. */
-#define x_stdindx x_stindx
- long x_stindx; /* sys. table entry */
- } x_sc; /* system call entry */
-
- struct
- {
- unsigned long x_balntry; /* BAL entry point */
- } x_bal; /* BAL-callable function */
-
- struct
- {
- unsigned long x_timestamp; /* time stamp */
- char x_idstring[20]; /* producer identity string */
- } x_ident; /* Producer ident info */
-
-};
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct internal_reloc
-{
- bfd_vma r_vaddr; /* Virtual address of reference */
- long r_symndx; /* Index into symbol table */
- unsigned short r_type; /* Relocation type */
- unsigned char r_size; /* Used by RS/6000 and ECOFF */
- unsigned char r_extern; /* Used by ECOFF */
- unsigned long r_offset; /* Used by Alpha ECOFF, SPARC, others */
-};
-
-/* X86-64 relocations. */
-#define R_AMD64_ABS 0 /* Reference is absolute, no relocation is necessary. */
-#define R_AMD64_DIR64 1 /* 64-bit address (VA). */
-#define R_AMD64_DIR32 2 /* 32-bit address (VA) R_DIR32. */
-#define R_AMD64_IMAGEBASE 3 /* 32-bit absolute ref w/o base R_IMAGEBASE. */
-#define R_AMD64_PCRLONG 4 /* 32-bit relative address from byte following reloc R_PCRLONG. */
-#define R_AMD64_PCRLONG_1 5 /* 32-bit relative address from byte distance 1 from reloc. */
-#define R_AMD64_PCRLONG_2 6 /* 32-bit relative address from byte distance 2 from reloc. */
-#define R_AMD64_PCRLONG_3 7 /* 32-bit relative address from byte distance 3 from reloc. */
-#define R_AMD64_PCRLONG_4 8 /* 32-bit relative address from byte distance 4 from reloc. */
-#define R_AMD64_PCRLONG_5 9 /* 32-bit relative address from byte distance 5 from reloc. */
-#define R_AMD64_SECTION 10 /* Section index. */
-#define R_AMD64_SECREL 11 /* 32 bit offset from base of section containing target R_SECREL. */
-#define R_AMD64_SECREL7 12 /* 7 bit unsigned offset from base of section containing target. */
-#define R_AMD64_TOKEN 13 /* 32 bit metadata token. */
-#define R_AMD64_PCRQUAD 14 /* Pseude PC64 relocation - Note: not specified by MS/AMD but need for gas pc-relative 64bit wide relocation generated by ELF. */
-
-/* i386 Relocations. */
-
-#define R_DIR16 1
-#define R_REL24 5
-#define R_DIR32 6
-#define R_IMAGEBASE 7
-#define R_SECREL32 11
-#define R_RELBYTE 15
-#define R_RELWORD 16
-#define R_RELLONG 17
-#define R_PCRBYTE 18
-#define R_PCRWORD 19
-#define R_PCRLONG 20
-#define R_PCR24 21
-#define R_IPRSHORT 24
-#define R_IPRLONG 26
-#define R_GETSEG 29
-#define R_GETPA 30
-#define R_TAGWORD 31
-#define R_JUMPTARG 32 /* strange 29k 00xx00xx reloc */
-#define R_PARTLS16 32
-#define R_PARTMS8 33
-
-#define R_PCR16L 128
-#define R_PCR26L 129
-#define R_VRT16 130
-#define R_HVRT16 131
-#define R_LVRT16 132
-#define R_VRT32 133
-
-
-/* This reloc identifies mov.b instructions with a 16bit absolute
- address. The linker tries to turn insns with this reloc into
- an absolute 8-bit address. */
-#define R_MOV16B1 0x41
-
-/* This reloc identifies mov.b instructions which had a 16bit
- absolute address which have been shortened into a 8-bit
- absolute address. */
-#define R_MOV16B2 0x42
-
-/* This reloc identifies jmp insns with a 16bit target address;
- the linker tries to turn these insns into bra insns with
- an 8bit pc-relative target. */
-#define R_JMP1 0x43
-
-/* This reloc identifies a bra with an 8-bit pc-relative
- target that was formerly a jmp insn with a 16bit target. */
-#define R_JMP2 0x44
-
-/* ??? */
-#define R_RELLONG_NEG 0x45
-
-/* This reloc identifies jmp insns with a 24bit target address;
- the linker tries to turn these insns into bra insns with
- an 8bit pc-relative target. */
-#define R_JMPL1 0x46
-
-/* This reloc identifies a bra with an 8-bit pc-relative
- target that was formerly a jmp insn with a 24bit target. */
-#define R_JMPL2 0x47
-
-/* This reloc identifies mov.b instructions with a 24bit absolute
- address. The linker tries to turn insns with this reloc into
- an absolute 8-bit address. */
-
-#define R_MOV24B1 0x48
-
-/* This reloc identifies mov.b instructions which had a 24bit
- absolute address which have been shortened into a 8-bit
- absolute address. */
-#define R_MOV24B2 0x49
-
-/* An h8300 memory indirect jump/call. Forces the address of the jump/call
- target into the function vector (in page zero), and the address of the
- vector entry to be placed in the jump/call instruction. */
-#define R_MEM_INDIRECT 0x4a
-
-/* This reloc identifies a 16bit pc-relative branch target which was
- shortened into an 8bit pc-relative branch target. */
-#define R_PCRWORD_B 0x4b
-
-/* This reloc identifies mov.[wl] instructions with a 32/24 bit
- absolute address; the linker may turn this into a mov.[wl]
- insn with a 16bit absolute address. */
-#define R_MOVL1 0x4c
-
-/* This reloc identifies mov.[wl] insns which formerly had
- a 32/24bit absolute address and now have a 16bit absolute address. */
-#define R_MOVL2 0x4d
-
-/* This reloc identifies a bCC:8 which will have it's condition
- inverted and its target redirected to the target of the branch
- in the following insn. */
-#define R_BCC_INV 0x4e
-
-/* This reloc identifies a jmp instruction that has been deleted. */
-#define R_JMP_DEL 0x4f
-
-/* Z8k modes */
-#define R_IMM16 0x01 /* 16 bit abs */
-#define R_JR 0x02 /* jr 8 bit disp */
-#define R_IMM4L 0x23 /* low nibble */
-#define R_IMM8 0x22 /* 8 bit abs */
-#define R_IMM32 R_RELLONG /* 32 bit abs */
-#define R_CALL R_DA /* Absolute address which could be a callr */
-#define R_JP R_DA /* Absolute address which could be a jp */
-#define R_REL16 0x04 /* 16 bit PC rel */
-#define R_CALLR 0x05 /* callr 12 bit disp */
-#define R_SEG 0x10 /* set if in segmented mode */
-#define R_IMM4H 0x24 /* high nibble */
-#define R_DISP7 0x25 /* djnz displacement */
-
-/* Z80 modes */
-#define R_OFF8 0x32 /* 8 bit signed abs, for (i[xy]+d) */
-#define R_IMM24 0x33 /* 24 bit abs */
-/* R_JR, R_IMM8, R_IMM16, R_IMM32 - as for Z8k */
-
-/* H8500 modes */
-
-#define R_H8500_IMM8 1 /* 8 bit immediate */
-#define R_H8500_IMM16 2 /* 16 bit immediate */
-#define R_H8500_PCREL8 3 /* 8 bit pcrel */
-#define R_H8500_PCREL16 4 /* 16 bit pcrel */
-#define R_H8500_HIGH8 5 /* high 8 bits of 24 bit address */
-#define R_H8500_LOW16 7 /* low 16 bits of 24 bit immediate */
-#define R_H8500_IMM24 6 /* 24 bit immediate */
-#define R_H8500_IMM32 8 /* 32 bit immediate */
-#define R_H8500_HIGH16 9 /* high 16 bits of 32 bit immediate */
-
-/* W65 modes */
-
-#define R_W65_ABS8 1 /* addr & 0xff */
-#define R_W65_ABS16 2 /* addr & 0xffff */
-#define R_W65_ABS24 3 /* addr & 0xffffff */
-
-#define R_W65_ABS8S8 4 /* (addr >> 8) & 0xff */
-#define R_W65_ABS8S16 5 /* (addr >> 16) & 0xff */
-
-#define R_W65_ABS16S8 6 /* (addr >> 8) & 0ffff */
-#define R_W65_ABS16S16 7 /* (addr >> 16) & 0ffff */
-
-#define R_W65_PCR8 8
-#define R_W65_PCR16 9
-
-#define R_W65_DP 10 /* direct page 8 bits only */
-
-#endif /* GNU_COFF_INTERNAL_H */
diff --git a/include/coff/m68k.h b/include/coff/m68k.h
deleted file mode 100644
index 4e88cea..0000000
--- a/include/coff/m68k.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* coff information for M68K
-
- Copyright 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef GNU_COFF_M68K_H
-#define GNU_COFF_M68K_H 1
-
-#define L_LNNO_SIZE 2
-#include "coff/external.h"
-
-/* Motorola 68000/68008/68010/68020 */
-#define MC68MAGIC 0520
-#define MC68KWRMAGIC 0520 /* writeable text segments */
-#define MC68TVMAGIC 0521
-#define MC68KROMAGIC 0521 /* readonly shareable text segments */
-#define MC68KPGMAGIC 0522 /* demand paged text segments */
-#define M68MAGIC 0210
-#define M68TVMAGIC 0211
-
-/* This is the magic of the Bull dpx/2 */
-#define MC68KBCSMAGIC 0526
-
-/* This is Lynx's all-platform magic number for executables. */
-
-#define LYNXCOFFMAGIC 0415
-
-#define OMAGIC M68MAGIC
-
-/* This intentionally does not include MC68KBCSMAGIC; it only includes
- magic numbers which imply that names do not have underscores. */
-#define M68KBADMAG(x) (((x).f_magic != MC68MAGIC) \
- && ((x).f_magic != MC68KWRMAGIC) \
- && ((x).f_magic != MC68TVMAGIC) \
- && ((x).f_magic != MC68KROMAGIC) \
- && ((x).f_magic != MC68KPGMAGIC) \
- && ((x).f_magic != M68MAGIC) \
- && ((x).f_magic != M68TVMAGIC) \
- && ((x).f_magic != LYNXCOFFMAGIC))
-
-/* Magic numbers for the a.out header. */
-
-#define PAGEMAGICEXECSWAPPED 0407 /* executable (swapped) */
-#define PAGEMAGICPEXECSWAPPED 0410 /* pure executable (swapped) */
-#define PAGEMAGICPEXECTSHLIB 0443 /* pure executable (target shared library) */
-#define PAGEMAGICPEXECPAGED 0413 /* pure executable (paged) */
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
-#ifdef M68K_COFF_OFFSET
- char r_offset[4];
-#endif
-};
-
-#define RELOC struct external_reloc
-
-#ifdef M68K_COFF_OFFSET
-#define RELSZ 14
-#else
-#define RELSZ 10
-#endif
-
-#endif /* GNU_COFF_M68K_H */
diff --git a/include/coff/m88k.h b/include/coff/m88k.h
deleted file mode 100644
index 9aeff1e..0000000
--- a/include/coff/m88k.h
+++ /dev/null
@@ -1,196 +0,0 @@
-/* coff information for 88k bcs
-
- Copyright 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#define DO_NOT_DEFINE_SCNHDR
-#define L_LNNO_SIZE 4
-#define DO_NOT_DEFINE_SYMENT
-#define DO_NOT_DEFINE_AUXENT
-#include "coff/external.h"
-
-#define MC88MAGIC 0540 /* 88k BCS executable */
-#define MC88DMAGIC 0541 /* DG/UX executable */
-#define MC88OMAGIC 0555 /* Object file */
-
-#define MC88BADMAG(x) (((x).f_magic != MC88MAGIC) \
- && ((x).f_magic != MC88DMAGIC) \
- && ((x).f_magic != MC88OMAGIC))
-
-#define PAGEMAGIC3 0414 /* Split i&d, zero mapped */
-#define PAGEMAGICBCS 0413
-
-/********************** SECTION HEADER **********************/
-
-struct external_scnhdr
-{
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[4]; /* number of relocation entries */
- char s_nlnno[4]; /* number of line number entries*/
- char s_flags[4]; /* flags */
-};
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ 44
-
-/* Names of "special" sections. */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _COMMENT ".comment"
-
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- union
- {
- char e_name[E_SYMNMLEN];
-
- struct
- {
- char e_zeroes[4];
- char e_offset[4];
- } e;
-
- } e;
-
- char e_value[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
- char pad2[2];
-};
-
-#define N_BTMASK 017
-#define N_TMASK 060
-#define N_BTSHFT 4
-#define N_TSHIFT 2
-
-/* Note that this isn't the same shape as other coffs */
-union external_auxent
-{
- struct
- {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- /* 4 */
-
- union
- {
- char x_fsize[4]; /* size of function */
-
- struct
- {
- char x_lnno[4]; /* declaration line number */
- char x_size[4]; /* str/union/array size */
- } x_lnsz;
-
- } x_misc;
-
- /* 12 */
- union
- {
- struct /* if ISFCN, tag, or .bb */
- {
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
-
- struct /* if ISARY, up to 4 dimen. */
- {
- char x_dimen[E_DIMNUM][2];
- } x_ary;
-
- } x_fcnary;
- /* 20 */
-
- } x_sym;
-
- union
- {
- char x_fname[E_FILNMLEN];
-
- struct
- {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
-
- } x_file;
-
- struct
- {
- char x_scnlen[4]; /* section length */
- char x_nreloc[4]; /* # relocation entries */
- char x_nlinno[4]; /* # line numbers */
- } x_scn;
-
- struct
- {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-};
-
-#define GET_LNSZ_SIZE(abfd, ext) \
- H_GET_32 (abfd, ext->x_sym.x_misc.x_lnsz.x_size)
-#define GET_LNSZ_LNNO(abfd, ext) \
- H_GET_32 (abfd, ext->x_sym.x_misc.x_lnsz.x_lnno)
-#define PUT_LNSZ_LNNO(abfd, in, ext) \
- H_PUT_32 (abfd, in, ext->x_sym.x_misc.x_lnsz.x_lnno)
-#define PUT_LNSZ_SIZE(abfd, in, ext) \
- H_PUT_32 (abfd, in, ext->x_sym.x_misc.x_lnsz.x_size)
-#define GET_SCN_NRELOC(abfd, ext) \
- H_GET_32 (abfd, ext->x_scn.x_nreloc)
-#define GET_SCN_NLINNO(abfd, ext) \
- H_GET_32 (abfd, ext->x_scn.x_nlinno)
-#define PUT_SCN_NRELOC(abfd, in, ext) \
- H_PUT_32 (abfd, in, ext->x_scn.x_nreloc)
-#define PUT_SCN_NLINNO(abfd, in, ext) \
- H_PUT_32 (abfd,in, ext->x_scn.x_nlinno)
-
-#define SYMENT struct external_syment
-#define SYMESZ 20
-#define AUXENT union external_auxent
-#define AUXESZ 20
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
- char r_offset[2];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 12
-
-#define NO_TVNDX
diff --git a/include/coff/maxq.h b/include/coff/maxq.h
deleted file mode 100644
index a8e3c40..0000000
--- a/include/coff/maxq.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* COFF spec for MAXQ
-
- Copyright 2004, 2005 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation; either version 2 of the License, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-
- Contributed by Vineet Sharma(vineets@noida.hcltech.com) Inderpreet
- S.(inderpreetb@noida.hcltech.com) HCL Technologies Ltd. */
-
-#define L_LNNO_SIZE 2
-
-#include "coff/external.h"
-
-/* Bits for f_flags: F_RELFLG relocation info stripped from file F_EXEC file
- is executable (no unresolved external references) F_LNNO line numbers
- stripped from file F_LSYMS local symbols stripped from file. */
-
-#define F_RELFLG (0x0001)
-#define F_EXEC (0x0002)
-#define F_LNNO (0x0004)
-#define F_LSYMS (0x0008)
-
-/* Variant Specific Flags for MAXQ10 and MAXQ20. */
-#define F_MAXQ10 (0x0030)
-#define F_MAXQ20 (0x0040)
-
-#define F_MACHMASK (0x00F0)
-
-/* Magic numbers for maxq. */
-#define MAXQ20MAGIC 0xa0
-#define MAXQ20BADMAG(x) (((x).f_magic != MAXQ20MAGIC))
-#define BADMAG(x) MAXQ20BADMAG (x)
-
-/* Relocation information declaration and related definitions. */
-struct external_reloc
-{
- char r_vaddr[4]; /* (Virtual) address of reference. */
- char r_symndx[4]; /* Index into symbol table. */
- char r_type[2]; /* Relocation type. */
- char r_offset[2]; /* Addend. */
-};
-
-#define RELOC struct external_reloc
-#define RELSZ (10 + 2) /* sizeof (RELOC) */
diff --git a/include/coff/mcore.h b/include/coff/mcore.h
deleted file mode 100644
index 42c694c..0000000
--- a/include/coff/mcore.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Motorola MCore support for BFD.
- Copyright 1999, 2000 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* This file holds definitions specific to the MCore COFF/PE ABI. */
-
-#ifndef _COFF_MORE_H
-#define _COFF_MORE_H
-
-#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
-#define L_LNNO_SIZE 2
-#include "coff/external.h"
-
-#define MCOREMAGIC 0xb00 /* I just made this up */
-
-#define MCOREBADMAG(x) (((x).f_magic != MCOREMAGIC))
-
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-#define IMAGE_REL_MCORE_ABSOLUTE 0x0000
-#define IMAGE_REL_MCORE_ADDR32 0x0001
-#define IMAGE_REL_MCORE_PCREL_IMM8BY4 0x0002
-#define IMAGE_REL_MCORE_PCREL_IMM11BY2 0x0003
-#define IMAGE_REL_MCORE_PCREL_IMM4BY2 0x0004
-#define IMAGE_REL_MCORE_PCREL_32 0x0005
-#define IMAGE_REL_MCORE_PCREL_JSR_IMM11BY2 0x0006
-#define IMAGE_REL_MCORE_RVA 0x0007
-
-#define PEMCORE
-
-#define OMAGIC 0404 /* object files, eg as output */
-#define ZMAGIC 0413 /* demand load format, eg normal ld output */
-#define STMAGIC 0401 /* target shlib */
-#define SHMAGIC 0443 /* host shlib */
-
-/* From winnt.h */
-#define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b
-
-/* Define some NT default values. */
-#define NT_SECTION_ALIGNMENT 0x1000
-#define NT_FILE_ALIGNMENT 0x200
-#define NT_DEF_RESERVE 0x100000
-#define NT_DEF_COMMIT 0x1000
-
-struct external_reloc
-{
- char r_vaddr [4];
- char r_symndx [4];
- char r_type [2];
- char r_offset [4];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 14
-
-#endif /* __COFF_MCORE_H */
diff --git a/include/coff/mips.h b/include/coff/mips.h
deleted file mode 100644
index feb2652..0000000
--- a/include/coff/mips.h
+++ /dev/null
@@ -1,343 +0,0 @@
-/* ECOFF support on MIPS machines.
- coff/ecoff.h must be included before this file.
-
- Copyright 1999, 2004 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#define DO_NOT_DEFINE_AOUTHDR
-#define L_LNNO_SIZE 4
-#include "coff/external.h"
-
-/* Magic numbers are defined in coff/ecoff.h. */
-#define MIPS_ECOFF_BADMAG(x) (((x).f_magic!=MIPS_MAGIC_1) && \
- ((x).f_magic!=MIPS_MAGIC_LITTLE) &&\
- ((x).f_magic!=MIPS_MAGIC_BIG) && \
- ((x).f_magic!=MIPS_MAGIC_LITTLE2) && \
- ((x).f_magic!=MIPS_MAGIC_BIG2) && \
- ((x).f_magic!=MIPS_MAGIC_LITTLE3) && \
- ((x).f_magic!=MIPS_MAGIC_BIG3))
-
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-typedef struct external_aouthdr
-{
- unsigned char magic[2]; /* type of file */
- unsigned char vstamp[2]; /* version stamp */
- unsigned char tsize[4]; /* text size in bytes, padded to FW bdry*/
- unsigned char dsize[4]; /* initialized data " " */
- unsigned char bsize[4]; /* uninitialized data " " */
- unsigned char entry[4]; /* entry pt. */
- unsigned char text_start[4]; /* base of text used for this file */
- unsigned char data_start[4]; /* base of data used for this file */
- unsigned char bss_start[4]; /* base of bss used for this file */
- unsigned char gprmask[4]; /* ?? */
- unsigned char cprmask[4][4]; /* ?? */
- unsigned char gp_value[4]; /* value for gp register */
-} AOUTHDR;
-
-/* compute size of a header */
-
-#define AOUTSZ 56
-#define AOUTHDRSZ 56
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct external_reloc
- {
- unsigned char r_vaddr[4];
- unsigned char r_bits[4];
- };
-
-#define RELOC struct external_reloc
-#define RELSZ 8
-
-/* MIPS ECOFF uses a packed 8 byte format for relocs. These constants
- are used to unpack the r_bits field. */
-
-#define RELOC_BITS0_SYMNDX_SH_LEFT_BIG 16
-#define RELOC_BITS0_SYMNDX_SH_LEFT_LITTLE 0
-
-#define RELOC_BITS1_SYMNDX_SH_LEFT_BIG 8
-#define RELOC_BITS1_SYMNDX_SH_LEFT_LITTLE 8
-
-#define RELOC_BITS2_SYMNDX_SH_LEFT_BIG 0
-#define RELOC_BITS2_SYMNDX_SH_LEFT_LITTLE 16
-
-/* Originally, ECOFF used four bits for the reloc type and had three
- reserved bits. Irix 4 added another bit for the reloc type, which
- was easy because it was big endian and one of the spare bits became
- the new most significant bit. To make this also work for little
- endian ECOFF, we need to wrap one of the reserved bits around to
- become the most significant bit of the reloc type. */
-#define RELOC_BITS3_TYPE_BIG 0x3E
-#define RELOC_BITS3_TYPE_SH_BIG 1
-#define RELOC_BITS3_TYPE_LITTLE 0x78
-#define RELOC_BITS3_TYPE_SH_LITTLE 3
-#define RELOC_BITS3_TYPEHI_LITTLE 0x04
-#define RELOC_BITS3_TYPEHI_SH_LITTLE 2
-
-#define RELOC_BITS3_EXTERN_BIG 0x01
-#define RELOC_BITS3_EXTERN_LITTLE 0x80
-
-/* The r_type field in a reloc is one of the following values. I
- don't know if any other values can appear. These seem to be all
- that occur in the Ultrix 4.2 libraries. */
-#define MIPS_R_IGNORE 0
-#define MIPS_R_REFHALF 1
-#define MIPS_R_REFWORD 2
-#define MIPS_R_JMPADDR 3
-#define MIPS_R_REFHI 4
-#define MIPS_R_REFLO 5
-#define MIPS_R_GPREL 6
-#define MIPS_R_LITERAL 7
-
-/* FIXME: This relocation is used (internally only) to represent branches
- when assembling. It should never appear in output files, and
- be removed. (It used to be used for embedded-PIC support.) */
-#define MIPS_R_PCREL16 12
-
-/********************** STABS **********************/
-
-#define MIPS_IS_STAB ECOFF_IS_STAB
-#define MIPS_MARK_STAB ECOFF_MARK_STAB
-#define MIPS_UNMARK_STAB ECOFF_UNMARK_STAB
-
-/********************** SYMBOLIC INFORMATION **********************/
-
-/* Written by John Gilmore. */
-
-/* ECOFF uses COFF-like section structures, but its own symbol format.
- This file defines the symbol format in fields whose size and alignment
- will not vary on different host systems. */
-
-/* File header as a set of bytes */
-
-struct hdr_ext
-{
- unsigned char h_magic[2];
- unsigned char h_vstamp[2];
- unsigned char h_ilineMax[4];
- unsigned char h_cbLine[4];
- unsigned char h_cbLineOffset[4];
- unsigned char h_idnMax[4];
- unsigned char h_cbDnOffset[4];
- unsigned char h_ipdMax[4];
- unsigned char h_cbPdOffset[4];
- unsigned char h_isymMax[4];
- unsigned char h_cbSymOffset[4];
- unsigned char h_ioptMax[4];
- unsigned char h_cbOptOffset[4];
- unsigned char h_iauxMax[4];
- unsigned char h_cbAuxOffset[4];
- unsigned char h_issMax[4];
- unsigned char h_cbSsOffset[4];
- unsigned char h_issExtMax[4];
- unsigned char h_cbSsExtOffset[4];
- unsigned char h_ifdMax[4];
- unsigned char h_cbFdOffset[4];
- unsigned char h_crfd[4];
- unsigned char h_cbRfdOffset[4];
- unsigned char h_iextMax[4];
- unsigned char h_cbExtOffset[4];
-};
-
-/* File descriptor external record */
-
-struct fdr_ext
-{
- unsigned char f_adr[4];
- unsigned char f_rss[4];
- unsigned char f_issBase[4];
- unsigned char f_cbSs[4];
- unsigned char f_isymBase[4];
- unsigned char f_csym[4];
- unsigned char f_ilineBase[4];
- unsigned char f_cline[4];
- unsigned char f_ioptBase[4];
- unsigned char f_copt[4];
- unsigned char f_ipdFirst[2];
- unsigned char f_cpd[2];
- unsigned char f_iauxBase[4];
- unsigned char f_caux[4];
- unsigned char f_rfdBase[4];
- unsigned char f_crfd[4];
- unsigned char f_bits1[1];
- unsigned char f_bits2[3];
- unsigned char f_cbLineOffset[4];
- unsigned char f_cbLine[4];
-};
-
-#define FDR_BITS1_LANG_BIG 0xF8
-#define FDR_BITS1_LANG_SH_BIG 3
-#define FDR_BITS1_LANG_LITTLE 0x1F
-#define FDR_BITS1_LANG_SH_LITTLE 0
-
-#define FDR_BITS1_FMERGE_BIG 0x04
-#define FDR_BITS1_FMERGE_LITTLE 0x20
-
-#define FDR_BITS1_FREADIN_BIG 0x02
-#define FDR_BITS1_FREADIN_LITTLE 0x40
-
-#define FDR_BITS1_FBIGENDIAN_BIG 0x01
-#define FDR_BITS1_FBIGENDIAN_LITTLE 0x80
-
-#define FDR_BITS2_GLEVEL_BIG 0xC0
-#define FDR_BITS2_GLEVEL_SH_BIG 6
-#define FDR_BITS2_GLEVEL_LITTLE 0x03
-#define FDR_BITS2_GLEVEL_SH_LITTLE 0
-
-/* We ignore the `reserved' field in bits2. */
-
-/* Procedure descriptor external record */
-
-struct pdr_ext
-{
- unsigned char p_adr[4];
- unsigned char p_isym[4];
- unsigned char p_iline[4];
- unsigned char p_regmask[4];
- unsigned char p_regoffset[4];
- unsigned char p_iopt[4];
- unsigned char p_fregmask[4];
- unsigned char p_fregoffset[4];
- unsigned char p_frameoffset[4];
- unsigned char p_framereg[2];
- unsigned char p_pcreg[2];
- unsigned char p_lnLow[4];
- unsigned char p_lnHigh[4];
- unsigned char p_cbLineOffset[4];
-};
-
-/* Runtime procedure table */
-
-struct rpdr_ext
-{
- unsigned char p_adr[4];
- unsigned char p_regmask[4];
- unsigned char p_regoffset[4];
- unsigned char p_fregmask[4];
- unsigned char p_fregoffset[4];
- unsigned char p_frameoffset[4];
- unsigned char p_framereg[2];
- unsigned char p_pcreg[2];
- unsigned char p_irpss[4];
- unsigned char p_reserved[4];
- unsigned char p_exception_info[4];
-};
-
-/* Line numbers */
-
-struct line_ext
-{
- unsigned char l_line[4];
-};
-
-/* Symbol external record */
-
-struct sym_ext
-{
- unsigned char s_iss[4];
- unsigned char s_value[4];
- unsigned char s_bits1[1];
- unsigned char s_bits2[1];
- unsigned char s_bits3[1];
- unsigned char s_bits4[1];
-};
-
-#define SYM_BITS1_ST_BIG 0xFC
-#define SYM_BITS1_ST_SH_BIG 2
-#define SYM_BITS1_ST_LITTLE 0x3F
-#define SYM_BITS1_ST_SH_LITTLE 0
-
-#define SYM_BITS1_SC_BIG 0x03
-#define SYM_BITS1_SC_SH_LEFT_BIG 3
-#define SYM_BITS1_SC_LITTLE 0xC0
-#define SYM_BITS1_SC_SH_LITTLE 6
-
-#define SYM_BITS2_SC_BIG 0xE0
-#define SYM_BITS2_SC_SH_BIG 5
-#define SYM_BITS2_SC_LITTLE 0x07
-#define SYM_BITS2_SC_SH_LEFT_LITTLE 2
-
-#define SYM_BITS2_RESERVED_BIG 0x10
-#define SYM_BITS2_RESERVED_LITTLE 0x08
-
-#define SYM_BITS2_INDEX_BIG 0x0F
-#define SYM_BITS2_INDEX_SH_LEFT_BIG 16
-#define SYM_BITS2_INDEX_LITTLE 0xF0
-#define SYM_BITS2_INDEX_SH_LITTLE 4
-
-#define SYM_BITS3_INDEX_SH_LEFT_BIG 8
-#define SYM_BITS3_INDEX_SH_LEFT_LITTLE 4
-
-#define SYM_BITS4_INDEX_SH_LEFT_BIG 0
-#define SYM_BITS4_INDEX_SH_LEFT_LITTLE 12
-
-/* External symbol external record */
-
-struct ext_ext
-{
- unsigned char es_bits1[1];
- unsigned char es_bits2[1];
- unsigned char es_ifd[2];
- struct sym_ext es_asym;
-};
-
-#define EXT_BITS1_JMPTBL_BIG 0x80
-#define EXT_BITS1_JMPTBL_LITTLE 0x01
-
-#define EXT_BITS1_COBOL_MAIN_BIG 0x40
-#define EXT_BITS1_COBOL_MAIN_LITTLE 0x02
-
-#define EXT_BITS1_WEAKEXT_BIG 0x20
-#define EXT_BITS1_WEAKEXT_LITTLE 0x04
-
-/* Dense numbers external record */
-
-struct dnr_ext
-{
- unsigned char d_rfd[4];
- unsigned char d_index[4];
-};
-
-/* Relative file descriptor */
-
-struct rfd_ext
-{
- unsigned char rfd[4];
-};
-
-/* Optimizer symbol external record */
-
-struct opt_ext
-{
- unsigned char o_bits1[1];
- unsigned char o_bits2[1];
- unsigned char o_bits3[1];
- unsigned char o_bits4[1];
- struct rndx_ext o_rndx;
- unsigned char o_offset[4];
-};
-
-#define OPT_BITS2_VALUE_SH_LEFT_BIG 16
-#define OPT_BITS2_VALUE_SH_LEFT_LITTLE 0
-
-#define OPT_BITS3_VALUE_SH_LEFT_BIG 8
-#define OPT_BITS3_VALUE_SH_LEFT_LITTLE 8
-
-#define OPT_BITS4_VALUE_SH_LEFT_BIG 0
-#define OPT_BITS4_VALUE_SH_LEFT_LITTLE 16
diff --git a/include/coff/mipspe.h b/include/coff/mipspe.h
deleted file mode 100644
index c1c2efa..0000000
--- a/include/coff/mipspe.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* coff information for Windows CE with MIPS VR4111
-
- Copyright 2000 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#define L_LNNO_SIZE 2
-#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
-#include "coff/external.h"
-
-#define MIPS_ARCH_MAGIC_WINCE 0x0166 /* Windows CE - little endian */
-#define MIPS_PE_MAGIC 0x010b
-
-#define MIPSBADMAG(x) ((x).f_magic != MIPS_ARCH_MAGIC_WINCE)
-
-/* define some NT default values */
-/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
-#define NT_SECTION_ALIGNMENT 0x1000
-#define NT_FILE_ALIGNMENT 0x200
-#define NT_DEF_RESERVE 0x100000
-#define NT_DEF_COMMIT 0x1000
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-/* The external reloc has an offset field, because some of the reloc
- types on the h8 don't have room in the instruction for the entire
- offset - eg the strange jump and high page addressing modes. */
-
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 10
-
-/* MIPS PE relocation types. */
-
-#define MIPS_R_ABSOLUTE 0 /* ignored */
-#define MIPS_R_REFHALF 1
-#define MIPS_R_REFWORD 2
-#define MIPS_R_JMPADDR 3
-#define MIPS_R_REFHI 4 /* PAIR follows */
-#define MIPS_R_REFLO 5
-#define MIPS_R_GPREL 6
-#define MIPS_R_LITERAL 7 /* same as GPREL */
-#define MIPS_R_SECTION 10
-#define MIPS_R_SECREL 11
-#define MIPS_R_SECRELLO 12
-#define MIPS_R_SECRELHI 13 /* PAIR follows */
-#define MIPS_R_RVA 34 /* 0x22 */
-#define MIPS_R_PAIR 37 /* 0x25 - symndx is really a signed 16-bit addend */
diff --git a/include/coff/or32.h b/include/coff/or32.h
deleted file mode 100644
index 65495fb..0000000
--- a/include/coff/or32.h
+++ /dev/null
@@ -1,287 +0,0 @@
-/* COFF specification for OpenRISC 1000.
- Copyright (C) 1993-2000, 2002 Free Software Foundation, Inc.
- Contributed by David Wood @ New York University.
- Modified by Johan Rydberg, <johan.rydberg@netinsight.se>
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef OR32
-# define OR32
-#endif
-
-/* File Header and related definitions. */
-struct external_filehdr
-{
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
-};
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-/* Magic numbers for OpenRISC 1000. As it is know we use the
- numbers for Am29000.
-
- (AT&T will assign the "real" magic number). */
-#define SIPFBOMAGIC 0572 /* Am29000 (Byte 0 is MSB). */
-#define SIPRBOMAGIC 0573 /* Am29000 (Byte 0 is LSB). */
-
-#define OR32_MAGIC_BIG SIPFBOMAGIC
-#define OR32_MAGIC_LITTLE SIPRBOMAGIC
-#define OR32BADMAG(x) (((x).f_magic!=OR32_MAGIC_BIG) && \
- ((x).f_magic!=OR32_MAGIC_LITTLE))
-
-#define OMAGIC OR32_MAGIC_BIG
-
-/* Optional (a.out) header. */
-typedef struct external_aouthdr
-{
- char magic[2]; /* type of file */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes, padded to FW bdry */
- char dsize[4]; /* initialized data " " */
- char bsize[4]; /* uninitialized data " " */
- char entry[4]; /* entry pt. */
- char text_start[4]; /* base of text used for this file */
- char data_start[4]; /* base of data used for this file */
-} AOUTHDR;
-
-#define AOUTSZ 28
-#define AOUTHDRSZ 28
-
-/* aouthdr magic numbers. */
-#define NMAGIC 0410 /* separate i/d executable. */
-#define SHMAGIC 0406 /* NYU/Ultra3 shared data executable
- (writable text). */
-
-#define _ETEXT "_etext"
-
-/* Section header and related definitions. */
-struct external_scnhdr
-{
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[2]; /* number of relocation entries */
- char s_nlnno[2]; /* number of line number entries */
- char s_flags[4]; /* flags */
-};
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ 40
-
-/* Names of "special" sections: */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _LIT ".lit"
-
-/* Section types - with additional section type for global
- registers which will be relocatable for the OpenRISC 1000.
-
- In instances where it is necessary for a linker to produce an
- output file which contains text or data not based at virtual
- address 0, e.g. for a ROM, then the linker should accept
- address base information as command input and use PAD sections
- to skip over unused addresses. */
-#define STYP_BSSREG 0x1200 /* Global register area (like STYP_INFO) */
-#define STYP_ENVIR 0x2200 /* Environment (like STYP_INFO) */
-#define STYP_ABS 0x4000 /* Absolute (allocated, not reloc, loaded) */
-
-/* Relocation information declaration and related definitions: */
-struct external_reloc
-{
- char r_vaddr[4]; /* (virtual) address of reference */
- char r_symndx[4]; /* index into symbol table */
- char r_type[2]; /* relocation type */
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 10 /* sizeof (RELOC) */
-
-/* Relocation types for the OpenRISC 1000: */
-
-#define R_ABS 0 /* reference is absolute */
-#define R_IREL 030 /* instruction relative (jmp/call) */
-#define R_IABS 031 /* instruction absolute (jmp/call) */
-#define R_ILOHALF 032 /* instruction low half (const) */
-#define R_IHIHALF 033 /* instruction high half (consth) part 1 */
-#define R_IHCONST 034 /* instruction high half (consth) part 2 */
- /* constant offset of R_IHIHALF relocation */
-#define R_BYTE 035 /* relocatable byte value */
-#define R_HWORD 036 /* relocatable halfword value */
-#define R_WORD 037 /* relocatable word value */
-
-#define R_IGLBLRC 040 /* instruction global register RC */
-#define R_IGLBLRA 041 /* instruction global register RA */
-#define R_IGLBLRB 042 /* instruction global register RB */
-
-/*
- NOTE:
- All the "I" forms refer to 29000 instruction formats. The linker is
- expected to know how the numeric information is split and/or aligned
- within the instruction word(s). R_BYTE works for instructions, too.
-
- If the parameter to a CONSTH instruction is a relocatable type, two
- relocation records are written. The first has an r_type of R_IHIHALF
- (33 octal) and a normal r_vaddr and r_symndx. The second relocation
- record has an r_type of R_IHCONST (34 octal), a normal r_vaddr (which
- is redundant), and an r_symndx containing the 32-bit constant offset
- to the relocation instead of the actual symbol table index. This
- second record is always written, even if the constant offset is zero.
- The constant fields of the instruction are set to zero. */
-
-/* Line number entry declaration and related definitions: */
-struct external_lineno
-{
- union
- {
- char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
- char l_paddr[4]; /* (physical) address of line number */
- }
- l_addr;
-
- char l_lnno[2]; /* line number */
-};
-
-#define LINENO struct external_lineno
-#define LINESZ 6 /* sizeof (LINENO) */
-
-/* Symbol entry declaration and related definitions: */
-#define E_SYMNMLEN 8 /* Number of characters in a symbol name */
-
-struct external_syment
-{
- union
- {
- char e_name[E_SYMNMLEN];
- struct
- {
- char e_zeroes[4];
- char e_offset[4];
- }
- e;
- }
- e;
-
- char e_value[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-
-/* Storage class definitions - new classes for global registers: */
-#define C_GLBLREG 19 /* global register */
-#define C_EXTREG 20 /* external global register */
-#define C_DEFREG 21 /* ext. def. of global register */
-
-/* Derived symbol mask/shifts: */
-#define N_BTMASK (0xf)
-#define N_BTSHFT (4)
-#define N_TMASK (0x30)
-#define N_TSHIFT (2)
-
-/* Auxiliary symbol table entry declaration and related
- definitions. */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-union external_auxent
-{
- struct
- {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union
- {
- struct
- {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- }
- x_lnsz;
-
- char x_fsize[4]; /* size of function */
- }
- x_misc;
-
- union
- {
- struct /* if ISFCN, tag, or .bb */
- {
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- }
- x_fcn;
-
- struct /* if ISARY, up to 4 dimen. */
- {
- char x_dimen[E_DIMNUM][2];
- }
- x_ary;
- }
- x_fcnary;
-
- char x_tvndx[2]; /* tv index */
- }
- x_sym;
-
- union
- {
- char x_fname[E_FILNMLEN];
-
- struct
- {
- char x_zeroes[4];
- char x_offset[4];
- }
- x_n;
- }
- x_file;
-
- struct
- {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- }
- x_scn;
-
- struct
- {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- }
- x_tv; /* info about .tv section
- (in auxent of symbol .tv)) */
-};
-
-#define AUXENT union external_auxent
-#define AUXESZ 18
diff --git a/include/coff/pe.h b/include/coff/pe.h
deleted file mode 100644
index 734b11a..0000000
--- a/include/coff/pe.h
+++ /dev/null
@@ -1,350 +0,0 @@
-/* pe.h - PE COFF header information
-
- Copyright 1999, 2000, 2001, 2003, 2004, 2006 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#ifndef _PE_H
-#define _PE_H
-
-/* NT specific file attributes. */
-#define IMAGE_FILE_RELOCS_STRIPPED 0x0001
-#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002
-#define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004
-#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008
-#define IMAGE_FILE_AGGRESSIVE_WS_TRIM 0x0010
-#define IMAGE_FILE_LARGE_ADDRESS_AWARE 0x0020
-#define IMAGE_FILE_16BIT_MACHINE 0x0040
-#define IMAGE_FILE_BYTES_REVERSED_LO 0x0080
-#define IMAGE_FILE_32BIT_MACHINE 0x0100
-#define IMAGE_FILE_DEBUG_STRIPPED 0x0200
-#define IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP 0x0400
-#define IMAGE_FILE_NET_RUN_FROM_SWAP 0x0800
-#define IMAGE_FILE_SYSTEM 0x1000
-#define IMAGE_FILE_DLL 0x2000
-#define IMAGE_FILE_UP_SYSTEM_ONLY 0x4000
-#define IMAGE_FILE_BYTES_REVERSED_HI 0x8000
-
-/* Additional flags to be set for section headers to allow the NT loader to
- read and write to the section data (to replace the addresses of data in
- dlls for one thing); also to execute the section in .text's case. */
-#define IMAGE_SCN_MEM_DISCARDABLE 0x02000000
-#define IMAGE_SCN_MEM_EXECUTE 0x20000000
-#define IMAGE_SCN_MEM_READ 0x40000000
-#define IMAGE_SCN_MEM_WRITE 0x80000000
-
-/* Section characteristics added for ppc-nt. */
-
-#define IMAGE_SCN_TYPE_NO_PAD 0x00000008 /* Reserved. */
-
-#define IMAGE_SCN_CNT_CODE 0x00000020 /* Section contains code. */
-#define IMAGE_SCN_CNT_INITIALIZED_DATA 0x00000040 /* Section contains initialized data. */
-#define IMAGE_SCN_CNT_UNINITIALIZED_DATA 0x00000080 /* Section contains uninitialized data. */
-
-#define IMAGE_SCN_LNK_OTHER 0x00000100 /* Reserved. */
-#define IMAGE_SCN_LNK_INFO 0x00000200 /* Section contains comments or some other type of information. */
-#define IMAGE_SCN_LNK_REMOVE 0x00000800 /* Section contents will not become part of image. */
-#define IMAGE_SCN_LNK_COMDAT 0x00001000 /* Section contents comdat. */
-
-#define IMAGE_SCN_MEM_FARDATA 0x00008000
-
-#define IMAGE_SCN_MEM_PURGEABLE 0x00020000
-#define IMAGE_SCN_MEM_16BIT 0x00020000
-#define IMAGE_SCN_MEM_LOCKED 0x00040000
-#define IMAGE_SCN_MEM_PRELOAD 0x00080000
-
-/* Bit position in the s_flags field where the alignment values start. */
-#define IMAGE_SCN_ALIGN_POWER_BIT_POS 20
-#define IMAGE_SCN_ALIGN_POWER_BIT_MASK 0x00f00000
-#define IMAGE_SCN_ALIGN_POWER_NUM(val) \
- (((val) >> IMAGE_SCN_ALIGN_POWER_BIT_POS) - 1)
-#define IMAGE_SCN_ALIGN_POWER_CONST(val) \
- (((val) + 1) << IMAGE_SCN_ALIGN_POWER_BIT_POS)
-
-#define IMAGE_SCN_ALIGN_1BYTES IMAGE_SCN_ALIGN_POWER_CONST (0)
-#define IMAGE_SCN_ALIGN_2BYTES IMAGE_SCN_ALIGN_POWER_CONST (1)
-#define IMAGE_SCN_ALIGN_4BYTES IMAGE_SCN_ALIGN_POWER_CONST (2)
-#define IMAGE_SCN_ALIGN_8BYTES IMAGE_SCN_ALIGN_POWER_CONST (3)
-/* Default alignment if no others are specified. */
-#define IMAGE_SCN_ALIGN_16BYTES IMAGE_SCN_ALIGN_POWER_CONST (4)
-#define IMAGE_SCN_ALIGN_32BYTES IMAGE_SCN_ALIGN_POWER_CONST (5)
-#define IMAGE_SCN_ALIGN_64BYTES IMAGE_SCN_ALIGN_POWER_CONST (6)
-#define IMAGE_SCN_ALIGN_128BYTES IMAGE_SCN_ALIGN_POWER_CONST (7)
-#define IMAGE_SCN_ALIGN_256BYTES IMAGE_SCN_ALIGN_POWER_CONST (8)
-#define IMAGE_SCN_ALIGN_512BYTES IMAGE_SCN_ALIGN_POWER_CONST (9)
-#define IMAGE_SCN_ALIGN_1024BYTES IMAGE_SCN_ALIGN_POWER_CONST (10)
-#define IMAGE_SCN_ALIGN_2048BYTES IMAGE_SCN_ALIGN_POWER_CONST (11)
-#define IMAGE_SCN_ALIGN_4096BYTES IMAGE_SCN_ALIGN_POWER_CONST (12)
-#define IMAGE_SCN_ALIGN_8192BYTES IMAGE_SCN_ALIGN_POWER_CONST (13)
-
-/* Encode alignment power into IMAGE_SCN_ALIGN bits of s_flags */
-#define COFF_ENCODE_ALIGNMENT(SECTION, ALIGNMENT_POWER) \
- ((SECTION).s_flags |= IMAGE_SCN_ALIGN_POWER_CONST ((ALIGNMENT_POWER)))
-
-#define IMAGE_SCN_LNK_NRELOC_OVFL 0x01000000 /* Section contains extended relocations. */
-#define IMAGE_SCN_MEM_NOT_CACHED 0x04000000 /* Section is not cachable. */
-#define IMAGE_SCN_MEM_NOT_PAGED 0x08000000 /* Section is not pageable. */
-#define IMAGE_SCN_MEM_SHARED 0x10000000 /* Section is shareable. */
-
-/* COMDAT selection codes. */
-
-#define IMAGE_COMDAT_SELECT_NODUPLICATES (1) /* Warn if duplicates. */
-#define IMAGE_COMDAT_SELECT_ANY (2) /* No warning. */
-#define IMAGE_COMDAT_SELECT_SAME_SIZE (3) /* Warn if different size. */
-#define IMAGE_COMDAT_SELECT_EXACT_MATCH (4) /* Warn if different. */
-#define IMAGE_COMDAT_SELECT_ASSOCIATIVE (5) /* Base on other section. */
-
-/* Machine numbers. */
-
-#define IMAGE_FILE_MACHINE_UNKNOWN 0x0000
-#define IMAGE_FILE_MACHINE_ALPHA 0x0184
-#define IMAGE_FILE_MACHINE_ALPHA64 0x0284
-#define IMAGE_FILE_MACHINE_AM33 0x01d3
-#define IMAGE_FILE_MACHINE_AMD64 0x8664
-#define IMAGE_FILE_MACHINE_ARM 0x01c0
-#define IMAGE_FILE_MACHINE_AXP64 IMAGE_FILE_MACHINE_ALPHA64
-#define IMAGE_FILE_MACHINE_CEE 0xc0ee
-#define IMAGE_FILE_MACHINE_CEF 0x0cef
-#define IMAGE_FILE_MACHINE_EBC 0x0ebc
-#define IMAGE_FILE_MACHINE_I386 0x014c
-#define IMAGE_FILE_MACHINE_IA64 0x0200
-#define IMAGE_FILE_MACHINE_M32R 0x9041
-#define IMAGE_FILE_MACHINE_M68K 0x0268
-#define IMAGE_FILE_MACHINE_MIPS16 0x0266
-#define IMAGE_FILE_MACHINE_MIPSFPU 0x0366
-#define IMAGE_FILE_MACHINE_MIPSFPU16 0x0466
-#define IMAGE_FILE_MACHINE_POWERPC 0x01f0
-#define IMAGE_FILE_MACHINE_POWERPCFP 0x01f1
-#define IMAGE_FILE_MACHINE_R10000 0x0168
-#define IMAGE_FILE_MACHINE_R3000 0x0162
-#define IMAGE_FILE_MACHINE_R4000 0x0166
-#define IMAGE_FILE_MACHINE_SH3 0x01a2
-#define IMAGE_FILE_MACHINE_SH3DSP 0x01a3
-#define IMAGE_FILE_MACHINE_SH3E 0x01a4
-#define IMAGE_FILE_MACHINE_SH4 0x01a6
-#define IMAGE_FILE_MACHINE_SH5 0x01a8
-#define IMAGE_FILE_MACHINE_THUMB 0x01c2
-#define IMAGE_FILE_MACHINE_TRICORE 0x0520
-#define IMAGE_FILE_MACHINE_WCEMIPSV2 0x0169
-#define IMAGE_FILE_MACHINE_AMD64 0x8664
-
-#define IMAGE_SUBSYSTEM_UNKNOWN 0
-#define IMAGE_SUBSYSTEM_NATIVE 1
-#define IMAGE_SUBSYSTEM_WINDOWS_GUI 2
-#define IMAGE_SUBSYSTEM_WINDOWS_CUI 3
-#define IMAGE_SUBSYSTEM_POSIX_CUI 7
-#define IMAGE_SUBSYSTEM_WINDOWS_CE_GUI 9
-#define IMAGE_SUBSYSTEM_EFI_APPLICATION 10
-#define IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11
-#define IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12
-#define IMAGE_SUBSYSTEM_EFI_ROM 13
-#define IMAGE_SUBSYSTEM_XBOX 14
-
-/* Magic values that are true for all dos/nt implementations. */
-#define DOSMAGIC 0x5a4d
-#define NT_SIGNATURE 0x00004550
-
-/* NT allows long filenames, we want to accommodate this.
- This may break some of the bfd functions. */
-#undef FILNMLEN
-#define FILNMLEN 18 /* # characters in a file name. */
-
-struct external_PEI_DOS_hdr
-{
- /* DOS header fields - always at offset zero in the EXE file. */
- char e_magic[2]; /* Magic number, 0x5a4d. */
- char e_cblp[2]; /* Bytes on last page of file, 0x90. */
- char e_cp[2]; /* Pages in file, 0x3. */
- char e_crlc[2]; /* Relocations, 0x0. */
- char e_cparhdr[2]; /* Size of header in paragraphs, 0x4. */
- char e_minalloc[2]; /* Minimum extra paragraphs needed, 0x0. */
- char e_maxalloc[2]; /* Maximum extra paragraphs needed, 0xFFFF. */
- char e_ss[2]; /* Initial (relative) SS value, 0x0. */
- char e_sp[2]; /* Initial SP value, 0xb8. */
- char e_csum[2]; /* Checksum, 0x0. */
- char e_ip[2]; /* Initial IP value, 0x0. */
- char e_cs[2]; /* Initial (relative) CS value, 0x0. */
- char e_lfarlc[2]; /* File address of relocation table, 0x40. */
- char e_ovno[2]; /* Overlay number, 0x0. */
- char e_res[4][2]; /* Reserved words, all 0x0. */
- char e_oemid[2]; /* OEM identifier (for e_oeminfo), 0x0. */
- char e_oeminfo[2]; /* OEM information; e_oemid specific, 0x0. */
- char e_res2[10][2]; /* Reserved words, all 0x0. */
- char e_lfanew[4]; /* File address of new exe header, usually 0x80. */
- char dos_message[16][4]; /* Other stuff, always follow DOS header. */
-};
-
-struct external_PEI_IMAGE_hdr
-{
- char nt_signature[4]; /* required NT signature, 0x4550. */
-
- /* From standard header. */
- char f_magic[2]; /* Magic number. */
- char f_nscns[2]; /* Number of sections. */
- char f_timdat[4]; /* Time & date stamp. */
- char f_symptr[4]; /* File pointer to symtab. */
- char f_nsyms[4]; /* Number of symtab entries. */
- char f_opthdr[2]; /* Sizeof(optional hdr). */
- char f_flags[2]; /* Flags. */
-};
-
-struct external_PEI_filehdr
-{
- /* DOS header fields - always at offset zero in the EXE file. */
- char e_magic[2]; /* Magic number, 0x5a4d. */
- char e_cblp[2]; /* Bytes on last page of file, 0x90. */
- char e_cp[2]; /* Pages in file, 0x3. */
- char e_crlc[2]; /* Relocations, 0x0. */
- char e_cparhdr[2]; /* Size of header in paragraphs, 0x4. */
- char e_minalloc[2]; /* Minimum extra paragraphs needed, 0x0. */
- char e_maxalloc[2]; /* Maximum extra paragraphs needed, 0xFFFF. */
- char e_ss[2]; /* Initial (relative) SS value, 0x0. */
- char e_sp[2]; /* Initial SP value, 0xb8. */
- char e_csum[2]; /* Checksum, 0x0. */
- char e_ip[2]; /* Initial IP value, 0x0. */
- char e_cs[2]; /* Initial (relative) CS value, 0x0. */
- char e_lfarlc[2]; /* File address of relocation table, 0x40. */
- char e_ovno[2]; /* Overlay number, 0x0. */
- char e_res[4][2]; /* Reserved words, all 0x0. */
- char e_oemid[2]; /* OEM identifier (for e_oeminfo), 0x0. */
- char e_oeminfo[2]; /* OEM information; e_oemid specific, 0x0. */
- char e_res2[10][2]; /* Reserved words, all 0x0. */
- char e_lfanew[4]; /* File address of new exe header, usually 0x80. */
- char dos_message[16][4]; /* Other stuff, always follow DOS header. */
-
- /* Note: additional bytes may be inserted before the signature. Use
- the e_lfanew field to find the actual location of the NT signature. */
-
- char nt_signature[4]; /* required NT signature, 0x4550. */
-
- /* From standard header. */
- char f_magic[2]; /* Magic number. */
- char f_nscns[2]; /* Number of sections. */
- char f_timdat[4]; /* Time & date stamp. */
- char f_symptr[4]; /* File pointer to symtab. */
- char f_nsyms[4]; /* Number of symtab entries. */
- char f_opthdr[2]; /* Sizeof(optional hdr). */
- char f_flags[2]; /* Flags. */
-};
-
-#ifdef COFF_IMAGE_WITH_PE
-
-/* The filehdr is only weird in images. */
-
-#undef FILHDR
-#define FILHDR struct external_PEI_filehdr
-#undef FILHSZ
-#define FILHSZ 152
-
-#endif /* COFF_IMAGE_WITH_PE */
-
-/* 32-bit PE a.out header: */
-
-typedef struct
-{
- AOUTHDR standard;
-
- /* NT extra fields; see internal.h for descriptions. */
- char ImageBase[4];
- char SectionAlignment[4];
- char FileAlignment[4];
- char MajorOperatingSystemVersion[2];
- char MinorOperatingSystemVersion[2];
- char MajorImageVersion[2];
- char MinorImageVersion[2];
- char MajorSubsystemVersion[2];
- char MinorSubsystemVersion[2];
- char Reserved1[4];
- char SizeOfImage[4];
- char SizeOfHeaders[4];
- char CheckSum[4];
- char Subsystem[2];
- char DllCharacteristics[2];
- char SizeOfStackReserve[4];
- char SizeOfStackCommit[4];
- char SizeOfHeapReserve[4];
- char SizeOfHeapCommit[4];
- char LoaderFlags[4];
- char NumberOfRvaAndSizes[4];
- /* IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; */
- char DataDirectory[16][2][4]; /* 16 entries, 2 elements/entry, 4 chars. */
-} PEAOUTHDR;
-
-#undef AOUTSZ
-#define AOUTSZ (AOUTHDRSZ + 196)
-
-/* Like PEAOUTHDR, except that the "standard" member has no BaseOfData
- (aka data_start) member and that some of the members are 8 instead
- of just 4 bytes long. */
-typedef struct
-{
-#ifdef AOUTHDRSZ64
- AOUTHDR64 standard;
-#else
- AOUTHDR standard;
-#endif
- /* NT extra fields; see internal.h for descriptions. */
- char ImageBase[8];
- char SectionAlignment[4];
- char FileAlignment[4];
- char MajorOperatingSystemVersion[2];
- char MinorOperatingSystemVersion[2];
- char MajorImageVersion[2];
- char MinorImageVersion[2];
- char MajorSubsystemVersion[2];
- char MinorSubsystemVersion[2];
- char Reserved1[4];
- char SizeOfImage[4];
- char SizeOfHeaders[4];
- char CheckSum[4];
- char Subsystem[2];
- char DllCharacteristics[2];
- char SizeOfStackReserve[8];
- char SizeOfStackCommit[8];
- char SizeOfHeapReserve[8];
- char SizeOfHeapCommit[8];
- char LoaderFlags[4];
- char NumberOfRvaAndSizes[4];
- /* IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; */
- char DataDirectory[16][2][4]; /* 16 entries, 2 elements/entry, 4 chars. */
-} PEPAOUTHDR;
-
-#ifdef AOUTHDRSZ64
-#define PEPAOUTSZ (AOUTHDRSZ64 + 196 + 5 * 4) /* = 240 */
-#else
-#define PEPAOUTSZ 240
-#endif
-
-#undef E_FILNMLEN
-#define E_FILNMLEN 18 /* # characters in a file name. */
-
-/* Import Tyoes fot ILF format object files.. */
-#define IMPORT_CODE 0
-#define IMPORT_DATA 1
-#define IMPORT_CONST 2
-
-/* Import Name Tyoes for ILF format object files. */
-#define IMPORT_ORDINAL 0
-#define IMPORT_NAME 1
-#define IMPORT_NAME_NOPREFIX 2
-#define IMPORT_NAME_UNDECORATE 3
-
-/* Weak external characteristics. */
-#define IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY 1
-#define IMAGE_WEAK_EXTERN_SEARCH_LIBRARY 2
-#define IMAGE_WEAK_EXTERN_SEARCH_ALIAS 3
-
-#endif /* _PE_H */
diff --git a/include/coff/powerpc.h b/include/coff/powerpc.h
deleted file mode 100644
index 0b11055..0000000
--- a/include/coff/powerpc.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Basic coff information for the PowerPC
- Based on coff/rs6000.h, coff/i386.h and others.
-
- Copyright 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-
- Initial release: Kim Knuttila (krk@cygnus.com) */
-#define L_LNNO_SIZE 2
-#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
-#include "coff/external.h"
-
-/* Bits for f_flags:
- F_RELFLG relocation info stripped from file
- F_EXEC file is executable (no unresolved external references)
- F_LNNO line numbers stripped from file
- F_LSYMS local symbols stripped from file
- F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax). */
-
-#define F_RELFLG (0x0001)
-#define F_EXEC (0x0002)
-#define F_LNNO (0x0004)
-#define F_LSYMS (0x0008)
-
-/* extra NT defines */
-#define PPCMAGIC 0760 /* peeked on aa PowerPC Windows NT box */
-#define DOSMAGIC 0x5a4d /* from arm.h, i386.h */
-#define NT_SIGNATURE 0x00004550 /* from arm.h, i386.h */
-
-/* from winnt.h */
-#define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b
-
-#define PPCBADMAG(x) ((x).f_magic != PPCMAGIC)
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 10
-
diff --git a/include/coff/rs6000.h b/include/coff/rs6000.h
deleted file mode 100644
index a4e6eb5..0000000
--- a/include/coff/rs6000.h
+++ /dev/null
@@ -1,263 +0,0 @@
-/* IBM RS/6000 "XCOFF" file definitions for BFD.
- Copyright (C) 1990, 1991, 2001 Free Software Foundation, Inc.
- Written by Mimi Phuong-Thao Vo of IBM
- and John Gilmore of Cygnus Support. */
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr {
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
-};
-
- /* IBM RS/6000 */
-#define U802WRMAGIC 0730 /* writeable text segments **chh** */
-#define U802ROMAGIC 0735 /* readonly sharable text segments */
-#define U802TOCMAGIC 0737 /* readonly text segments and TOC */
-
-#define BADMAG(x) \
- ((x).f_magic != U802ROMAGIC && (x).f_magic != U802WRMAGIC && \
- (x).f_magic != U802TOCMAGIC)
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-
-typedef struct
-{
- unsigned char magic[2]; /* type of file */
- unsigned char vstamp[2]; /* version stamp */
- unsigned char tsize[4]; /* text size in bytes, padded to FW bdry */
- unsigned char dsize[4]; /* initialized data " " */
- unsigned char bsize[4]; /* uninitialized data " " */
- unsigned char entry[4]; /* entry pt. */
- unsigned char text_start[4]; /* base of text used for this file */
- unsigned char data_start[4]; /* base of data used for this file */
- unsigned char o_toc[4]; /* address of TOC */
- unsigned char o_snentry[2]; /* section number of entry point */
- unsigned char o_sntext[2]; /* section number of .text section */
- unsigned char o_sndata[2]; /* section number of .data section */
- unsigned char o_sntoc[2]; /* section number of TOC */
- unsigned char o_snloader[2]; /* section number of .loader section */
- unsigned char o_snbss[2]; /* section number of .bss section */
- unsigned char o_algntext[2]; /* .text alignment */
- unsigned char o_algndata[2]; /* .data alignment */
- unsigned char o_modtype[2]; /* module type (??) */
- unsigned char o_cputype[2]; /* cpu type */
- unsigned char o_maxstack[4]; /* max stack size (??) */
- unsigned char o_maxdata[4]; /* max data size (??) */
- unsigned char o_resv2[12]; /* reserved */
-}
-AOUTHDR;
-
-#define AOUTSZ 72
-#define SMALL_AOUTSZ (28)
-#define AOUTHDRSZ 72
-
-/********************** SECTION HEADER **********************/
-
-
-struct external_scnhdr {
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[2]; /* number of relocation entries */
- char s_nlnno[2]; /* number of line number entries*/
- char s_flags[4]; /* flags */
-};
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ 40
-
-/********************** LINE NUMBERS **********************/
-
-/* 1 line number entry for every "breakpointable" source line in a section.
- * Line numbers are grouped on a per function basis; first entry in a function
- * grouping will have l_lnno = 0 and in place of physical address will be the
- * symbol table index of the function name.
- */
-struct external_lineno {
- union {
- char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
- char l_paddr[4]; /* (physical) address of line number */
- } l_addr;
- char l_lnno[2]; /* line number */
-};
-
-
-#define LINENO struct external_lineno
-#define LINESZ 6
-
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- union {
- char e_name[E_SYMNMLEN];
- struct {
- char e_zeroes[4];
- char e_offset[4];
- } e;
- } e;
- char e_value[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
-};
-
-
-
-#define N_BTMASK (017)
-#define N_TMASK (060)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-
-union external_auxent {
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union {
- struct {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- char x_fsize[4]; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- char x_tvndx[2]; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- } x_scn;
-
- struct {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-
- struct {
- unsigned char x_scnlen[4];
- unsigned char x_parmhash[4];
- unsigned char x_snhash[2];
- unsigned char x_smtyp[1];
- unsigned char x_smclas[1];
- unsigned char x_stab[4];
- unsigned char x_snstab[2];
- } x_csect;
-
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-#define AUXENT union external_auxent
-#define AUXESZ 18
-#define DBXMASK 0x80 /* for dbx storage mask */
-#define SYMNAME_IN_DEBUG(symptr) ((symptr)->n_sclass & DBXMASK)
-
-
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-
-struct external_reloc {
- char r_vaddr[4];
- char r_symndx[4];
- char r_size[1];
- char r_type[1];
-};
-
-
-#define RELOC struct external_reloc
-#define RELSZ 10
-
-#define DEFAULT_DATA_SECTION_ALIGNMENT 4
-#define DEFAULT_BSS_SECTION_ALIGNMENT 4
-#define DEFAULT_TEXT_SECTION_ALIGNMENT 4
-/* For new sections we havn't heard of before */
-#define DEFAULT_SECTION_ALIGNMENT 4
-
-/* The ldhdr structure. This appears at the start of the .loader
- section. */
-
-struct external_ldhdr
-{
- bfd_byte l_version[4];
- bfd_byte l_nsyms[4];
- bfd_byte l_nreloc[4];
- bfd_byte l_istlen[4];
- bfd_byte l_nimpid[4];
- bfd_byte l_impoff[4];
- bfd_byte l_stlen[4];
- bfd_byte l_stoff[4];
-};
-
-#define LDHDRSZ (8 * 4)
-
-struct external_ldsym
-{
- union
- {
- bfd_byte _l_name[SYMNMLEN];
- struct
- {
- bfd_byte _l_zeroes[4];
- bfd_byte _l_offset[4];
- } _l_l;
- } _l;
- bfd_byte l_value[4];
- bfd_byte l_scnum[2];
- bfd_byte l_smtype[1];
- bfd_byte l_smclas[1];
- bfd_byte l_ifile[4];
- bfd_byte l_parm[4];
-};
-
-#define LDSYMSZ (8 + 3 * 4 + 2 + 2)
-
-struct external_ldrel
-{
- bfd_byte l_vaddr[4];
- bfd_byte l_symndx[4];
- bfd_byte l_rtype[2];
- bfd_byte l_rsecnm[2];
-};
-
-#define LDRELSZ (2 * 4 + 2 * 2)
diff --git a/include/coff/rs6k64.h b/include/coff/rs6k64.h
deleted file mode 100644
index 388818d..0000000
--- a/include/coff/rs6k64.h
+++ /dev/null
@@ -1,260 +0,0 @@
-/* IBM RS/6000 "XCOFF64" file definitions for BFD.
- Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr
-{
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[8]; /* file pointer to symtab */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
- char f_nsyms[4]; /* number of symtab entries */
-};
-
-/* IBM RS/6000. */
-#define U803XTOCMAGIC 0757 /* Aix 4.3 64-bit XCOFF */
-#define U64_TOCMAGIC 0767 /* AIX 5+ 64-bit XCOFF */
-#define BADMAG(x) ((x).f_magic != U803XTOCMAGIC && (x).f_magic != U64_TOCMAGIC)
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 24
-
-/********************** AOUT "OPTIONAL HEADER" **********************/
-
-typedef struct
-{
- unsigned char magic[2]; /* type of file */
- unsigned char vstamp[2]; /* version stamp */
- unsigned char o_debugger[4]; /* reserved */
- unsigned char text_start[8]; /* base of text used for this file */
- unsigned char data_start[8]; /* base of data used for this file */
- unsigned char o_toc[8]; /* address of TOC */
- unsigned char o_snentry[2]; /* section number of entry point */
- unsigned char o_sntext[2]; /* section number of .text section */
- unsigned char o_sndata[2]; /* section number of .data section */
- unsigned char o_sntoc[2]; /* section number of TOC */
- unsigned char o_snloader[2]; /* section number of .loader section */
- unsigned char o_snbss[2]; /* section number of .bss section */
- unsigned char o_algntext[2]; /* .text alignment */
- unsigned char o_algndata[2]; /* .data alignment */
- unsigned char o_modtype[2]; /* module type (??) */
- unsigned char o_cputype[2]; /* cpu type */
- unsigned char o_resv2[4]; /* reserved */
- unsigned char tsize[8]; /* text size bytes, padded to FW bdry */
- unsigned char dsize[8]; /* initialized data " " */
- unsigned char bsize[8]; /* uninitialized data " " */
- unsigned char entry[8]; /* entry pt. */
- unsigned char o_maxstack[8]; /* max stack size (??) */
- unsigned char o_maxdata[8]; /* max data size (??) */
- unsigned char o_resv3[16]; /* reserved */
-}
-AOUTHDR;
-
-#define AOUTSZ 120
-#define SMALL_AOUTSZ (0)
-#define AOUTHDRSZ 72
-
-/********************** SECTION HEADER **********************/
-
-struct external_scnhdr
-{
- char s_name[8]; /* section name */
- char s_paddr[8]; /* physical address, aliased s_nlib */
- char s_vaddr[8]; /* virtual address */
- char s_size[8]; /* section size */
- char s_scnptr[8]; /* file ptr to raw data for section */
- char s_relptr[8]; /* file ptr to relocation */
- char s_lnnoptr[8]; /* file ptr to line numbers */
- char s_nreloc[4]; /* number of relocation entries */
- char s_nlnno[4]; /* number of line number entries*/
- char s_flags[4]; /* flags */
- char s_pad[4]; /* padding */
-};
-
-#define SCNHDR struct external_scnhdr
-
-#define SCNHSZ 72
-
-/********************** LINE NUMBERS **********************/
-
-/* 1 line number entry for every "breakpointable" source line in a section.
- Line numbers are grouped on a per function basis; first entry in a function
- grouping will have l_lnno = 0 and in place of physical address will be the
- symbol table index of the function name. */
-
-struct external_lineno
-{
- union
- {
- char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
- char l_paddr[8]; /* (physical) address of line number */
- } l_addr;
-
- char l_lnno[4]; /* line number */
-};
-
-#define LINENO struct external_lineno
-
-#define LINESZ 12
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- char e_value[8];
- char e_offset[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
-};
-
-#define N_BTMASK (017)
-#define N_TMASK (060)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-union external_auxent
-{
- struct {
- union {
- struct {
- char x_lnno[4]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- struct {
- char x_lnnoptr[8];/* ptr to fcn line */
- char x_fsize[4]; /* size of function */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- } x_fcnary;
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- char x_pad[6];
- unsigned char x_ftype[1];
- unsigned char x_resv[2];
- } x_n;
- } x_file;
-
- struct {
- char x_exptr[8];
- char x_fsize[4];
- char x_endndx[4];
- char x_pad[1];
- } x_except;
-
- struct {
- unsigned char x_scnlen_lo[4];
- unsigned char x_parmhash[4];
- unsigned char x_snhash[2];
- unsigned char x_smtyp[1];
- unsigned char x_smclas[1];
- unsigned char x_scnlen_hi[4];
- unsigned char x_pad[1];
- } x_csect;
-
- struct {
- char x_pad[17];
- char x_auxtype[1];
- } x_auxtype;
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-#define AUXENT union external_auxent
-#define AUXESZ 18
-#define DBXMASK 0x80 /* for dbx storage mask */
-#define SYMNAME_IN_DEBUG(symptr) ((symptr)->n_sclass & DBXMASK)
-
-/* Values for auxtype field in XCOFF64, taken from AIX 4.3 sym.h. */
-#define _AUX_EXCEPT 255
-#define _AUX_FCN 254
-#define _AUX_SYM 253
-#define _AUX_FILE 252
-#define _AUX_CSECT 251
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct external_reloc
-{
- char r_vaddr[8];
- char r_symndx[4];
- char r_size[1];
- char r_type[1];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 14
-
-#define DEFAULT_DATA_SECTION_ALIGNMENT 4
-#define DEFAULT_BSS_SECTION_ALIGNMENT 4
-#define DEFAULT_TEXT_SECTION_ALIGNMENT 4
-/* For new sections we havn't heard of before */
-#define DEFAULT_SECTION_ALIGNMENT 4
-
-/* The ldhdr structure. This appears at the start of the .loader
- section. */
-
-struct external_ldhdr
-{
- bfd_byte l_version[4];
- bfd_byte l_nsyms[4];
- bfd_byte l_nreloc[4];
- bfd_byte l_istlen[4];
- bfd_byte l_nimpid[4];
- bfd_byte l_stlen[4];
- bfd_byte l_impoff[8];
- bfd_byte l_stoff[8];
- bfd_byte l_symoff[8];
- bfd_byte l_rldoff[8];
-};
-#define LDHDRSZ (56)
-
-struct external_ldsym
-{
- bfd_byte l_value[8];
- bfd_byte l_offset[4];
- bfd_byte l_scnum[2];
- bfd_byte l_smtype[1];
- bfd_byte l_smclas[1];
- bfd_byte l_ifile[4];
- bfd_byte l_parm[4];
-};
-
-#define LDSYMSZ (24)
-
-struct external_ldrel
-{
- bfd_byte l_vaddr[8];
- bfd_byte l_rtype[2];
- bfd_byte l_rsecnm[2];
- bfd_byte l_symndx[4];
-};
-
-#define LDRELSZ (16)
diff --git a/include/coff/sh.h b/include/coff/sh.h
deleted file mode 100644
index 5349a10..0000000
--- a/include/coff/sh.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/* coff information for Renesas SH
-
- Copyright 2000, 2003 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifdef COFF_WITH_PE
-#define L_LNNO_SIZE 2
-#else
-#define L_LNNO_SIZE 4
-#endif
-#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
-#include "coff/external.h"
-
-#define SH_ARCH_MAGIC_BIG 0x0500
-#define SH_ARCH_MAGIC_LITTLE 0x0550 /* Little endian SH */
-#define SH_ARCH_MAGIC_WINCE 0x01a2 /* Windows CE - little endian */
-#define SH_PE_MAGIC 0x010b
-
-#define SHBADMAG(x) \
- (((x).f_magic != SH_ARCH_MAGIC_BIG) && \
- ((x).f_magic != SH_ARCH_MAGIC_WINCE) && \
- ((x).f_magic != SH_ARCH_MAGIC_LITTLE))
-
-/* Define some NT default values. */
-/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
-#define NT_SECTION_ALIGNMENT 0x1000
-#define NT_FILE_ALIGNMENT 0x200
-#define NT_DEF_RESERVE 0x100000
-#define NT_DEF_COMMIT 0x1000
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-/* The external reloc has an offset field, because some of the reloc
- types on the h8 don't have room in the instruction for the entire
- offset - eg the strange jump and high page addressing modes. */
-
-#ifndef COFF_WITH_PE
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_offset[4];
- char r_type[2];
- char r_stuff[2];
-};
-#else
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
-};
-#endif
-
-#define RELOC struct external_reloc
-#ifdef COFF_WITH_PE
-#define RELSZ 10
-#else
-#define RELSZ 16
-#endif
-
-/* SH relocation types. Not all of these are actually used. */
-
-#define R_SH_UNUSED 0 /* only used internally */
-#define R_SH_IMM32CE 2 /* 32 bit immediate for WinCE */
-#define R_SH_PCREL8 3 /* 8 bit pcrel */
-#define R_SH_PCREL16 4 /* 16 bit pcrel */
-#define R_SH_HIGH8 5 /* high 8 bits of 24 bit address */
-#define R_SH_LOW16 7 /* low 16 bits of 24 bit immediate */
-#define R_SH_IMM24 6 /* 24 bit immediate */
-#define R_SH_PCDISP8BY4 9 /* PC rel 8 bits *4 +ve */
-#define R_SH_PCDISP8BY2 10 /* PC rel 8 bits *2 +ve */
-#define R_SH_PCDISP8 11 /* 8 bit branch */
-#define R_SH_PCDISP 12 /* 12 bit branch */
-#define R_SH_IMM32 14 /* 32 bit immediate */
-#define R_SH_IMM8 16 /* 8 bit immediate */
-#define R_SH_IMAGEBASE 16 /* Windows CE */
-#define R_SH_IMM8BY2 17 /* 8 bit immediate *2 */
-#define R_SH_IMM8BY4 18 /* 8 bit immediate *4 */
-#define R_SH_IMM4 19 /* 4 bit immediate */
-#define R_SH_IMM4BY2 20 /* 4 bit immediate *2 */
-#define R_SH_IMM4BY4 21 /* 4 bit immediate *4 */
-#define R_SH_PCRELIMM8BY2 22 /* PC rel 8 bits *2 unsigned */
-#define R_SH_PCRELIMM8BY4 23 /* PC rel 8 bits *4 unsigned */
-#define R_SH_IMM16 24 /* 16 bit immediate */
-
-/* The switch table reloc types are used for relaxing. They are
- generated for expressions such as
- .word L1 - L2
- The r_offset field holds the difference between the reloc address
- and L2. */
-#define R_SH_SWITCH8 33 /* 8 bit switch table entry */
-#define R_SH_SWITCH16 25 /* 16 bit switch table entry */
-#define R_SH_SWITCH32 26 /* 32 bit switch table entry */
-
-/* The USES reloc type is used for relaxing. The compiler will
- generate .uses pseudo-ops when it finds a function call which it
- can relax. The r_offset field of the USES reloc holds the PC
- relative offset to the instruction which loads the register used in
- the function call. */
-#define R_SH_USES 27 /* .uses pseudo-op */
-
-/* The COUNT reloc type is used for relaxing. The assembler will
- generate COUNT relocs for addresses referred to by the register
- loads associated with USES relocs. The r_offset field of the COUNT
- reloc holds the number of times the address is referenced in the
- object file. */
-#define R_SH_COUNT 28 /* Count of constant pool uses */
-
-/* The ALIGN reloc type is used for relaxing. The r_offset field is
- the power of two to which subsequent portions of the object file
- must be aligned. */
-#define R_SH_ALIGN 29 /* .align pseudo-op */
-
-/* The CODE and DATA reloc types are used for aligning load and store
- instructions. The assembler will generate a CODE reloc before a
- block of instructions. It will generate a DATA reloc before data.
- A section should be processed assuming it contains data, unless a
- CODE reloc is seen. The only relevant pieces of information in the
- CODE and DATA relocs are the section and the address. The symbol
- and offset are meaningless. */
-#define R_SH_CODE 30 /* start of code */
-#define R_SH_DATA 31 /* start of data */
-
-/* The LABEL reloc type is used for aligning load and store
- instructions. The assembler will generate a LABEL reloc for each
- label within a block of instructions. This permits the linker to
- avoid swapping instructions which are the targets of branches. */
-#define R_SH_LABEL 32 /* label */
-
-/* NB: R_SH_SWITCH8 is 33 */
-
-#define R_SH_LOOP_START 34
-#define R_SH_LOOP_END 35
diff --git a/include/coff/sparc.h b/include/coff/sparc.h
deleted file mode 100644
index fb475f1..0000000
--- a/include/coff/sparc.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/* coff information for Sparc.
-
- Copyright 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* This file is an amalgamation of several standard include files that
- define coff format, such as filehdr.h, aouthdr.h, and so forth. In
- addition, all datatypes have been translated into character arrays of
- (presumed) equivalent size. This is necessary so that this file can
- be used with different systems while still yielding the same results. */
-
-#define L_LNNO_SIZE 2
-#define DO_NOT_DEFINE_SYMENT
-#define DO_NOT_DEFINE_AUXENT
-#include "coff/external.h"
-
-#define F_RELFLG (0x0001) /* relocation info stripped */
-#define F_EXEC (0x0002) /* file is executable */
-#define F_LNNO (0x0004) /* line numbers stripped */
-#define F_LSYMS (0x0008) /* local symbols stripped */
-
-#define SPARCMAGIC (0540)
-
-/* This is Lynx's all-platform magic number for executables. */
-
-#define LYNXCOFFMAGIC (0415)
-
-#define OMAGIC 0404 /* object files, eg as output */
-#define ZMAGIC 0413 /* demand load format, eg normal ld output */
-#define STMAGIC 0401 /* target shlib */
-#define SHMAGIC 0443 /* host shlib */
-
-/* More names of "special" sections. */
-
-#define _TV ".tv"
-#define _INIT ".init"
-#define _FINI ".fini"
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN (8) /* # characters in a symbol name */
-#define E_FILNMLEN (14) /* # characters in a file name */
-#define E_DIMNUM (4) /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- union {
- char e_name[E_SYMNMLEN];
- struct {
- char e_zeroes[4];
- char e_offset[4];
- } e;
-#if 0 /* of doubtful value */
- char e_nptr[2][4];
- struct {
- char e_leading_zero[1];
- char e_dbx_type[1];
- char e_dbx_desc[2];
- } e_dbx;
-#endif
- } e;
-
- char e_value[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
- char padding[2];
-};
-
-#define N_BTMASK (0xf)
-#define N_TMASK (0x30)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-union external_auxent
-{
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union {
- struct {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- char x_fsize[4]; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- char x_tvndx[2]; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- } x_scn;
-
- struct {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* .tv section info (in auxent of sym .tv)) */
-
- char x_fill[20]; /* forces to 20-byte size */
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 20
-#define AUXENT union external_auxent
-#define AUXESZ 20
-
-#define _ETEXT "etext"
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
- char r_spare[2];
- char r_offset[4];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 16
-
diff --git a/include/coff/sym.h b/include/coff/sym.h
deleted file mode 100644
index 76204af..0000000
--- a/include/coff/sym.h
+++ /dev/null
@@ -1,484 +0,0 @@
-/* Declarations of internal format of MIPS ECOFF symbols.
- Originally contributed by MIPS Computer Systems and Third Eye Software.
- Changes contributed by Cygnus Support are in the public domain.
-
- This file is just aggregated with the files that make up the GNU
- release; it is not considered part of GAS, GDB, or other GNU
- programs. */
-
-/*
- * |-----------------------------------------------------------|
- * | Copyright (c) 1992, 1991, 1990 MIPS Computer Systems, Inc.|
- * | MIPS Computer Systems, Inc. grants reproduction and use |
- * | rights to all parties, PROVIDED that this comment is |
- * | maintained in the copy. |
- * |-----------------------------------------------------------|
- */
-#ifndef _SYM_H
-#define _SYM_H
-
-/* (C) Copyright 1984 by Third Eye Software, Inc.
- *
- * Third Eye Software, Inc. grants reproduction and use rights to
- * all parties, PROVIDED that this comment is maintained in the copy.
- *
- * Third Eye makes no claims about the applicability of this
- * symbol table to a particular use.
- */
-
-/*
- * This file contains the definition of the Third Eye Symbol Table.
- *
- * Symbols are assumed to be in 'encounter order' - i.e. the order that
- * the things they represent were encountered by the compiler/assembler/loader.
- * EXCEPT for globals! These are assumed to be bunched together,
- * probably right after the last 'normal' symbol. Globals ARE sorted
- * in ascending order.
- *
- * -----------------------------------------------------------------------
- * A brief word about Third Eye naming/use conventions:
- *
- * All arrays and index's are 0 based.
- * All "ifooMax" values are the highest legal value PLUS ONE. This makes
- * them good for allocating arrays, etc. All checks are "ifoo < ifooMax".
- *
- * "isym" Index into the SYMbol table.
- * "ipd" Index into the Procedure Descriptor array.
- * "ifd" Index into the File Descriptor array.
- * "iss" Index into String Space.
- * "cb" Count of Bytes.
- * "rgPd" array whose domain is "0..ipdMax-1" and RanGe is PDR.
- * "rgFd" array whose domain is "0..ifdMax-1" and RanGe is FDR.
- */
-
-
-/*
- * Symbolic Header (HDR) structure.
- * As long as all the pointers are set correctly,
- * we don't care WHAT order the various sections come out in!
- *
- * A file produced solely for the use of CDB will probably NOT have
- * any instructions or data areas in it, as these are available
- * in the original.
- */
-
-typedef struct {
- short magic; /* to verify validity of the table */
- short vstamp; /* version stamp */
- long ilineMax; /* number of line number entries */
- bfd_vma cbLine; /* number of bytes for line number entries */
- bfd_vma cbLineOffset; /* offset to start of line number entries*/
- long idnMax; /* max index into dense number table */
- bfd_vma cbDnOffset; /* offset to start dense number table */
- long ipdMax; /* number of procedures */
- bfd_vma cbPdOffset; /* offset to procedure descriptor table */
- long isymMax; /* number of local symbols */
- bfd_vma cbSymOffset; /* offset to start of local symbols*/
- long ioptMax; /* max index into optimization symbol entries */
- bfd_vma cbOptOffset; /* offset to optimization symbol entries */
- long iauxMax; /* number of auxillary symbol entries */
- bfd_vma cbAuxOffset; /* offset to start of auxillary symbol entries*/
- long issMax; /* max index into local strings */
- bfd_vma cbSsOffset; /* offset to start of local strings */
- long issExtMax; /* max index into external strings */
- bfd_vma cbSsExtOffset; /* offset to start of external strings */
- long ifdMax; /* number of file descriptor entries */
- bfd_vma cbFdOffset; /* offset to file descriptor table */
- long crfd; /* number of relative file descriptor entries */
- bfd_vma cbRfdOffset; /* offset to relative file descriptor table */
- long iextMax; /* max index into external symbols */
- bfd_vma cbExtOffset; /* offset to start of external symbol entries*/
- /* If you add machine dependent fields, add them here */
- } HDRR, *pHDRR;
-#define cbHDRR sizeof(HDRR)
-#define hdrNil ((pHDRR)0)
-
-/*
- * The FDR and PDR structures speed mapping of address <-> name.
- * They are sorted in ascending memory order and are kept in
- * memory by CDB at runtime.
- */
-
-/*
- * File Descriptor
- *
- * There is one of these for EVERY FILE, whether compiled with
- * full debugging symbols or not. The name of a file should be
- * the path name given to the compiler. This allows the user
- * to simply specify the names of the directories where the COMPILES
- * were done, and we will be able to find their files.
- * A field whose comment starts with "R - " indicates that it will be
- * setup at runtime.
- */
-typedef struct fdr {
- bfd_vma adr; /* memory address of beginning of file */
- long rss; /* file name (of source, if known) */
- long issBase; /* file's string space */
- bfd_vma cbSs; /* number of bytes in the ss */
- long isymBase; /* beginning of symbols */
- long csym; /* count file's of symbols */
- long ilineBase; /* file's line symbols */
- long cline; /* count of file's line symbols */
- long ioptBase; /* file's optimization entries */
- long copt; /* count of file's optimization entries */
- unsigned short ipdFirst;/* start of procedures for this file */
- short cpd; /* count of procedures for this file */
- long iauxBase; /* file's auxiliary entries */
- long caux; /* count of file's auxiliary entries */
- long rfdBase; /* index into the file indirect table */
- long crfd; /* count file indirect entries */
- unsigned lang: 5; /* language for this file */
- unsigned fMerge : 1; /* whether this file can be merged */
- unsigned fReadin : 1; /* true if it was read in (not just created) */
- unsigned fBigendian : 1;/* if set, was compiled on big endian machine */
- /* aux's will be in compile host's sex */
- unsigned glevel : 2; /* level this file was compiled with */
- unsigned reserved : 22; /* reserved for future use */
- bfd_vma cbLineOffset; /* byte offset from header for this file ln's */
- bfd_vma cbLine; /* size of lines for this file */
- } FDR, *pFDR;
-#define cbFDR sizeof(FDR)
-#define fdNil ((pFDR)0)
-#define ifdNil -1
-#define ifdTemp 0
-#define ilnNil -1
-
-
-/*
- * Procedure Descriptor
- *
- * There is one of these for EVERY TEXT LABEL.
- * If a procedure is in a file with full symbols, then isym
- * will point to the PROC symbols, else it will point to the
- * global symbol for the label.
- */
-
-typedef struct pdr {
- bfd_vma adr; /* memory address of start of procedure */
- long isym; /* start of local symbol entries */
- long iline; /* start of line number entries*/
- long regmask; /* save register mask */
- long regoffset; /* save register offset */
- long iopt; /* start of optimization symbol entries*/
- long fregmask; /* save floating point register mask */
- long fregoffset; /* save floating point register offset */
- long frameoffset; /* frame size */
- short framereg; /* frame pointer register */
- short pcreg; /* offset or reg of return pc */
- long lnLow; /* lowest line in the procedure */
- long lnHigh; /* highest line in the procedure */
- bfd_vma cbLineOffset; /* byte offset for this procedure from the fd base */
- /* These fields are new for 64 bit ECOFF. */
- unsigned gp_prologue : 8; /* byte size of GP prologue */
- unsigned gp_used : 1; /* true if the procedure uses GP */
- unsigned reg_frame : 1; /* true if register frame procedure */
- unsigned prof : 1; /* true if compiled with -pg */
- unsigned reserved : 13; /* reserved: must be zero */
- unsigned localoff : 8; /* offset of local variables from vfp */
- } PDR, *pPDR;
-#define cbPDR sizeof(PDR)
-#define pdNil ((pPDR) 0)
-#define ipdNil -1
-
-/*
- * The structure of the runtime procedure descriptor created by the loader
- * for use by the static exception system.
- */
-/*
- * If 0'd out because exception_info chokes Visual C++ and because there
- * don't seem to be any references to this structure elsewhere in gdb.
- */
-#if 0
-typedef struct runtime_pdr {
- bfd_vma adr; /* memory address of start of procedure */
- long regmask; /* save register mask */
- long regoffset; /* save register offset */
- long fregmask; /* save floating point register mask */
- long fregoffset; /* save floating point register offset */
- long frameoffset; /* frame size */
- short framereg; /* frame pointer register */
- short pcreg; /* offset or reg of return pc */
- long irpss; /* index into the runtime string table */
- long reserved;
- struct exception_info *exception_info;/* pointer to exception array */
-} RPDR, *pRPDR;
-#define cbRPDR sizeof(RPDR)
-#define rpdNil ((pRPDR) 0)
-#endif
-
-/*
- * Line Numbers
- *
- * Line Numbers are segregated from the normal symbols because they
- * are [1] smaller , [2] are of no interest to your
- * average loader, and [3] are never needed in the middle of normal
- * scanning and therefore slow things down.
- *
- * By definition, the first LINER for any given procedure will have
- * the first line of a procedure and represent the first address.
- */
-
-typedef long LINER, *pLINER;
-#define lineNil ((pLINER)0)
-#define cbLINER sizeof(LINER)
-#define ilineNil -1
-
-
-
-/*
- * The Symbol Structure (GFW, to those who Know!)
- */
-
-typedef struct {
- long iss; /* index into String Space of name */
- bfd_vma value; /* value of symbol */
- unsigned st : 6; /* symbol type */
- unsigned sc : 5; /* storage class - text, data, etc */
- unsigned reserved : 1; /* reserved */
- unsigned index : 20; /* index into sym/aux table */
- } SYMR, *pSYMR;
-#define symNil ((pSYMR)0)
-#define cbSYMR sizeof(SYMR)
-#define isymNil -1
-#define indexNil 0xfffff
-#define issNil -1
-#define issNull 0
-
-
-/* The following converts a memory resident string to an iss.
- * This hack is recognized in SbFIss, in sym.c of the debugger.
- */
-#define IssFSb(sb) (0x80000000 | ((unsigned long)(sb)))
-
-/* E X T E R N A L S Y M B O L R E C O R D
- *
- * Same as the SYMR except it contains file context to determine where
- * the index is.
- */
-typedef struct ecoff_extr {
- unsigned jmptbl:1; /* symbol is a jump table entry for shlibs */
- unsigned cobol_main:1; /* symbol is a cobol main procedure */
- unsigned weakext:1; /* symbol is weak external */
- unsigned reserved:13; /* reserved for future use */
- int ifd; /* where the iss and index fields point into */
- SYMR asym; /* symbol for the external */
- } EXTR, *pEXTR;
-#define extNil ((pEXTR)0)
-#define cbEXTR sizeof(EXTR)
-
-
-/* A U X I L L A R Y T Y P E I N F O R M A T I O N */
-
-/*
- * Type Information Record
- */
-typedef struct {
- unsigned fBitfield : 1; /* set if bit width is specified */
- unsigned continued : 1; /* indicates additional TQ info in next AUX */
- unsigned bt : 6; /* basic type */
- unsigned tq4 : 4;
- unsigned tq5 : 4;
- /* ---- 16 bit boundary ---- */
- unsigned tq0 : 4;
- unsigned tq1 : 4; /* 6 type qualifiers - tqPtr, etc. */
- unsigned tq2 : 4;
- unsigned tq3 : 4;
- } TIR, *pTIR;
-#define cbTIR sizeof(TIR)
-#define tiNil ((pTIR)0)
-#define itqMax 6
-
-/*
- * Relative symbol record
- *
- * If the rfd field is 4095, the index field indexes into the global symbol
- * table.
- */
-
-typedef struct {
- unsigned rfd : 12; /* index into the file indirect table */
- unsigned index : 20; /* index int sym/aux/iss tables */
- } RNDXR, *pRNDXR;
-#define cbRNDXR sizeof(RNDXR)
-#define rndxNil ((pRNDXR)0)
-
-/* dense numbers or sometimes called block numbers are stored in this type,
- * a rfd of 0xffffffff is an index into the global table.
- */
-typedef struct {
- unsigned long rfd; /* index into the file table */
- unsigned long index; /* index int sym/aux/iss tables */
- } DNR, *pDNR;
-#define cbDNR sizeof(DNR)
-#define dnNil ((pDNR)0)
-
-
-
-/*
- * Auxillary information occurs only if needed.
- * It ALWAYS occurs in this order when present.
-
- isymMac used by stProc only
- TIR type info
- TIR additional TQ info (if first TIR was not enough)
- rndx if (bt == btStruct,btUnion,btEnum,btSet,btRange,
- btTypedef):
- rsym.index == iaux for btSet or btRange
- else rsym.index == isym
- dimLow btRange, btSet
- dimMac btRange, btSet
- rndx0 As many as there are tq arrays
- dimLow0
- dimHigh0
- ...
- rndxMax-1
- dimLowMax-1
- dimHighMax-1
- width in bits if (bit field), width in bits.
- */
-#define cAuxMax (6 + (idimMax*3))
-
-/* a union of all possible info in the AUX universe */
-typedef union {
- TIR ti; /* type information record */
- RNDXR rndx; /* relative index into symbol table */
- long dnLow; /* low dimension */
- long dnHigh; /* high dimension */
- long isym; /* symbol table index (end of proc) */
- long iss; /* index into string space (not used) */
- long width; /* width for non-default sized struc fields */
- long count; /* count of ranges for variant arm */
- } AUXU, *pAUXU;
-#define cbAUXU sizeof(AUXU)
-#define auxNil ((pAUXU)0)
-#define iauxNil -1
-
-
-/*
- * Optimization symbols
- *
- * Optimization symbols contain some overlap information with the normal
- * symbol table. In particular, the proc information
- * is somewhat redundant but necessary to easily find the other information
- * present.
- *
- * All of the offsets are relative to the beginning of the last otProc
- */
-
-typedef struct {
- unsigned ot: 8; /* optimization type */
- unsigned value: 24; /* address where we are moving it to */
- RNDXR rndx; /* points to a symbol or opt entry */
- unsigned long offset; /* relative offset this occured */
- } OPTR, *pOPTR;
-#define optNil ((pOPTR) 0)
-#define cbOPTR sizeof(OPTR)
-#define ioptNil -1
-
-/*
- * File Indirect
- *
- * When a symbol is referenced across files the following procedure is used:
- * 1) use the file index to get the File indirect entry.
- * 2) use the file indirect entry to get the File descriptor.
- * 3) add the sym index to the base of that file's sym table
- *
- */
-
-typedef long RFDT, *pRFDT;
-#define cbRFDT sizeof(RFDT)
-#define rfdNil -1
-
-/*
- * The file indirect table in the mips loader is known as an array of FITs.
- * This is done to keep the code in the loader readable in the area where
- * these tables are merged. Note this is only a name change.
- */
-typedef long FIT, *pFIT;
-#define cbFIT sizeof(FIT)
-#define ifiNil -1
-#define fiNil ((pFIT) 0)
-
-#ifdef _LANGUAGE_PASCAL
-#define ifdNil -1
-#define ilnNil -1
-#define ipdNil -1
-#define ilineNil -1
-#define isymNil -1
-#define indexNil 16#fffff
-#define issNil -1
-#define issNull 0
-#define itqMax 6
-#define iauxNil -1
-#define ioptNil -1
-#define rfdNil -1
-#define ifiNil -1
-#endif /* _LANGUAGE_PASCAL */
-
-
-/* Dense numbers
- *
- * Rather than use file index, symbol index pairs to represent symbols
- * and globals, we use dense number so that they can be easily embeded
- * in intermediate code and the programs that process them can
- * use direct access tabls instead of hash table (which would be
- * necesary otherwise because of the sparse name space caused by
- * file index, symbol index pairs. Dense number are represented
- * by RNDXRs.
- */
-
-/*
- * The following table defines the meaning of each SYM field as
- * a function of the "st". (scD/B == scData OR scBss)
- *
- * Note: the value "isymMac" is used by symbols that have the concept
- * of enclosing a block of related information. This value is the
- * isym of the first symbol AFTER the end associated with the primary
- * symbol. For example if a procedure was at isym==90 and had an
- * isymMac==155, the associated end would be at isym==154, and the
- * symbol at 155 would probably (although not necessarily) be the
- * symbol for the next procedure. This allows rapid skipping over
- * internal information of various sorts. "stEnd"s ALWAYS have the
- * isym of the primary symbol that started the block.
- *
-
-ST SC VALUE INDEX
--------- ------ -------- ------
-stFile scText address isymMac
-stLabel scText address ---
-stGlobal scD/B address iaux
-stStatic scD/B address iaux
-stParam scAbs offset iaux
-stLocal scAbs offset iaux
-stProc scText address iaux (isymMac is first AUX)
-stStaticProc scText address iaux (isymMac is first AUX)
-
-stMember scNil ordinal --- (if member of enum)
- (mipsread thinks the case below has a bit, not byte, offset.)
-stMember scNil byte offset iaux (if member of struct/union)
-stMember scBits bit offset iaux (bit field spec)
-
-stBlock scText address isymMac (text block)
- (the code seems to think that rather than scNil, we see scInfo for
- the two cases below.)
-stBlock scNil cb isymMac (struct/union member define)
-stBlock scNil cMembers isymMac (enum member define)
-
- (New types added by SGI to simplify things:)
-stStruct scInfo cb isymMac (struct type define)
-stUnion scInfo cb isymMac (union type define)
-stEnum scInfo cMembers isymMac (enum type define)
-
-stEnd scText address isymStart
-stEnd scNil ------- isymStart (struct/union/enum)
-
-stTypedef scNil ------- iaux
-stRegReloc sc??? value old register number
-stForward sc??? new address isym to original symbol
-
-stConstant scInfo value --- (scalar)
-stConstant scInfo iss --- (complex, e.g. string)
-
- *
- */
-#endif
diff --git a/include/coff/symconst.h b/include/coff/symconst.h
deleted file mode 100644
index 3e45705..0000000
--- a/include/coff/symconst.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/* Declarations of constants for internal format of MIPS ECOFF symbols.
- Originally contributed by MIPS Computer Systems and Third Eye Software.
- Changes contributed by Cygnus Support are in the public domain.
-
- This file is just aggregated with the files that make up the GNU
- release; it is not considered part of GAS, GDB, or other GNU
- programs. */
-
-/*
- * |-----------------------------------------------------------|
- * | Copyright (c) 1992, 1991, 1990 MIPS Computer Systems, Inc.|
- * | MIPS Computer Systems, Inc. grants reproduction and use |
- * | rights to all parties, PROVIDED that this comment is |
- * | maintained in the copy. |
- * |-----------------------------------------------------------|
- */
-
-/* (C) Copyright 1984 by Third Eye Software, Inc.
- *
- * Third Eye Software, Inc. grants reproduction and use rights to
- * all parties, PROVIDED that this comment is maintained in the copy.
- *
- * Third Eye makes no claims about the applicability of this
- * symbol table to a particular use.
- */
-
-/* glevels for field in FDR */
-#define GLEVEL_0 2
-#define GLEVEL_1 1
-#define GLEVEL_2 0 /* for upward compat reasons. */
-#define GLEVEL_3 3
-
-/* magic number fo symheader */
-#define magicSym 0x7009
-/* The Alpha uses this value instead, for some reason. */
-#define magicSym2 0x1992
-
-/* Language codes */
-#define langC 0
-#define langPascal 1
-#define langFortran 2
-#define langAssembler 3 /* one Assembley inst might map to many mach */
-#define langMachine 4
-#define langNil 5
-#define langAda 6
-#define langPl1 7
-#define langCobol 8
-#define langStdc 9 /* FIXME: Collides with SGI langCplusplus */
-#define langCplusplus 9 /* FIXME: Collides with langStdc */
-#define langCplusplusV2 10 /* SGI addition */
-#define langMax 11 /* maximum allowed 32 -- 5 bits */
-
-/* The following are value definitions for the fields in the SYMR */
-
-/*
- * Storage Classes
- */
-
-#define scNil 0
-#define scText 1 /* text symbol */
-#define scData 2 /* initialized data symbol */
-#define scBss 3 /* un-initialized data symbol */
-#define scRegister 4 /* value of symbol is register number */
-#define scAbs 5 /* value of symbol is absolute */
-#define scUndefined 6 /* who knows? */
-#define scCdbLocal 7 /* variable's value is IN se->va.?? */
-#define scBits 8 /* this is a bit field */
-#define scCdbSystem 9 /* variable's value is IN CDB's address space */
-#define scDbx 9 /* overlap dbx internal use */
-#define scRegImage 10 /* register value saved on stack */
-#define scInfo 11 /* symbol contains debugger information */
-#define scUserStruct 12 /* address in struct user for current process */
-#define scSData 13 /* load time only small data */
-#define scSBss 14 /* load time only small common */
-#define scRData 15 /* load time only read only data */
-#define scVar 16 /* Var parameter (fortran,pascal) */
-#define scCommon 17 /* common variable */
-#define scSCommon 18 /* small common */
-#define scVarRegister 19 /* Var parameter in a register */
-#define scVariant 20 /* Variant record */
-#define scSUndefined 21 /* small undefined(external) data */
-#define scInit 22 /* .init section symbol */
-#define scBasedVar 23 /* Fortran or PL/1 ptr based var */
-#define scXData 24 /* exception handling data */
-#define scPData 25 /* Procedure section */
-#define scFini 26 /* .fini section */
-#define scRConst 27 /* .rconst section */
-#define scMax 32
-
-
-/*
- * Symbol Types
- */
-
-#define stNil 0 /* Nuthin' special */
-#define stGlobal 1 /* external symbol */
-#define stStatic 2 /* static */
-#define stParam 3 /* procedure argument */
-#define stLocal 4 /* local variable */
-#define stLabel 5 /* label */
-#define stProc 6 /* " " Procedure */
-#define stBlock 7 /* beginnning of block */
-#define stEnd 8 /* end (of anything) */
-#define stMember 9 /* member (of anything - struct/union/enum */
-#define stTypedef 10 /* type definition */
-#define stFile 11 /* file name */
-#define stRegReloc 12 /* register relocation */
-#define stForward 13 /* forwarding address */
-#define stStaticProc 14 /* load time only static procs */
-#define stConstant 15 /* const */
-#define stStaParam 16 /* Fortran static parameters */
- /* These new symbol types have been recently added to SGI machines. */
-#define stStruct 26 /* Beginning of block defining a struct type */
-#define stUnion 27 /* Beginning of block defining a union type */
-#define stEnum 28 /* Beginning of block defining an enum type */
-#define stIndirect 34 /* Indirect type specification */
- /* Pseudo-symbols - internal to debugger */
-#define stStr 60 /* string */
-#define stNumber 61 /* pure number (ie. 4 NOR 2+2) */
-#define stExpr 62 /* 2+2 vs. 4 */
-#define stType 63 /* post-coersion SER */
-#define stMax 64
-
-/* definitions for fields in TIR */
-
-/* type qualifiers for ti.tq0 -> ti.(itqMax-1) */
-#define tqNil 0 /* bt is what you see */
-#define tqPtr 1 /* pointer */
-#define tqProc 2 /* procedure */
-#define tqArray 3 /* duh */
-#define tqFar 4 /* longer addressing - 8086/8 land */
-#define tqVol 5 /* volatile */
-#define tqConst 6 /* const */
-#define tqMax 8
-
-/* basic types as seen in ti.bt */
-#define btNil 0 /* undefined (also, enum members) */
-#define btAdr 1 /* address - integer same size as pointer */
-#define btChar 2 /* character */
-#define btUChar 3 /* unsigned character */
-#define btShort 4 /* short */
-#define btUShort 5 /* unsigned short */
-#define btInt 6 /* int */
-#define btUInt 7 /* unsigned int */
-#define btLong 8 /* long */
-#define btULong 9 /* unsigned long */
-#define btFloat 10 /* float (real) */
-#define btDouble 11 /* Double (real) */
-#define btStruct 12 /* Structure (Record) */
-#define btUnion 13 /* Union (variant) */
-#define btEnum 14 /* Enumerated */
-#define btTypedef 15 /* defined via a typedef, isymRef points */
-#define btRange 16 /* subrange of int */
-#define btSet 17 /* pascal sets */
-#define btComplex 18 /* fortran complex */
-#define btDComplex 19 /* fortran double complex */
-#define btIndirect 20 /* forward or unnamed typedef */
-#define btFixedDec 21 /* Fixed Decimal */
-#define btFloatDec 22 /* Float Decimal */
-#define btString 23 /* Varying Length Character String */
-#define btBit 24 /* Aligned Bit String */
-#define btPicture 25 /* Picture */
-#define btVoid 26 /* void */
-#define btLongLong 27 /* long long */
-#define btULongLong 28 /* unsigned long long */
-#define btMax 64
-
-#if (_MFG == _MIPS)
-/* optimization type codes */
-#define otNil 0
-#define otReg 1 /* move var to reg */
-#define otBlock 2 /* begin basic block */
-#define otProc 3 /* procedure */
-#define otInline 4 /* inline procedure */
-#define otEnd 5 /* whatever you started */
-#define otMax 6 /* KEEP UP TO DATE */
-#endif /* (_MFG == _MIPS) */
diff --git a/include/coff/ti.h b/include/coff/ti.h
deleted file mode 100644
index 86f7a13..0000000
--- a/include/coff/ti.h
+++ /dev/null
@@ -1,544 +0,0 @@
-/* COFF information for TI COFF support. Definitions in this file should be
- customized in a target-specific file, and then this file included (see
- tic54x.h for an example).
-
- Copyright 2000, 2001, 2002, 2003, 2008 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#ifndef COFF_TI_H
-#define COFF_TI_H
-
-/* Note "coff/external.h is not used because TI adds extra fields to the structures. */
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr
- {
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
- char f_target_id[2]; /* magic no. (TI COFF-specific) */
- };
-
-/* COFF0 has magic number in f_magic, and omits f_target_id from the file
- header; for later versions, f_magic is 0xC1 for COFF1 and 0xC2 for COFF2
- and the target-specific magic number is found in f_target_id */
-
-#define TICOFF0MAGIC TI_TARGET_ID
-#define TICOFF1MAGIC 0x00C1
-#define TICOFF2MAGIC 0x00C2
-#define TICOFF_AOUT_MAGIC 0x0108 /* magic number in optional header */
-#define TICOFF 1 /* customize coffcode.h */
-
-/* The target_id field changes depending on the particular CPU target */
-/* for COFF0, the target id appeared in f_magic, where COFFX magic is now */
-#ifndef TI_TARGET_ID
-#error "TI_TARGET_ID needs to be defined for your CPU"
-#endif
-
-/* Which bfd_arch to use... */
-#ifndef TICOFF_TARGET_ARCH
-#error "TICOFF_TARGET_ARCH needs to be defined for your CPU"
-#endif
-
-#ifndef TICOFF_TARGET_MACHINE_GET
-#define TICOFF_TARGET_MACHINE_GET(FLAGS) 0
-#endif
-
-#ifndef TICOFF_TARGET_MACHINE_SET
-#define TICOFF_TARGET_MACHINE_SET(FLAGSP, MACHINE)
-#endif
-
-/* Default to COFF2 for file output */
-#ifndef TICOFF_DEFAULT_MAGIC
-#define TICOFF_DEFAULT_MAGIC TICOFF2MAGIC
-#endif
-
-/* This value is made available in the rare case where a bfd is unavailable */
-#ifndef OCTETS_PER_BYTE_POWER
-#error "OCTETS_PER_BYTE_POWER not defined for this CPU"
-#else
-#define OCTETS_PER_BYTE (1<<OCTETS_PER_BYTE_POWER)
-#endif
-
-/* default alignment is on a byte (not octet!) boundary */
-#ifndef COFF_DEFAULT_SECTION_ALIGNMENT_POWER
-#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER 0
-#endif
-
-/* TI COFF encodes the section alignment in the section header flags */
-#define COFF_ALIGN_IN_SECTION_HEADER 1
-#define COFF_ALIGN_IN_S_FLAGS 1
-/* requires a power-of-two argument */
-#define COFF_ENCODE_ALIGNMENT(S,X) ((S).s_flags |= (((unsigned)(X)&0xF)<<8))
-/* result is a power of two */
-#define COFF_DECODE_ALIGNMENT(X) (((X)>>8)&0xF)
-
-#define COFF0_P(ABFD) (bfd_coff_filhsz(ABFD) == FILHSZ_V0)
-#define COFF2_P(ABFD) (bfd_coff_scnhsz(ABFD) != SCNHSZ_V01)
-
-#define COFF0_BADMAG(x) ((x).f_magic != TICOFF0MAGIC)
-#define COFF1_BADMAG(x) ((x).f_magic != TICOFF1MAGIC || (x).f_target_id != TI_TARGET_ID)
-#define COFF2_BADMAG(x) ((x).f_magic != TICOFF2MAGIC || (x).f_target_id != TI_TARGET_ID)
-
-/* we need to read/write an extra field in the coff file header */
-#ifndef COFF_ADJUST_FILEHDR_IN_POST
-#define COFF_ADJUST_FILEHDR_IN_POST(abfd, src, dst) \
- do \
- { \
- ((struct internal_filehdr *)(dst))->f_target_id = \
- H_GET_16 (abfd, ((FILHDR *)(src))->f_target_id); \
- } \
- while (0)
-#endif
-
-#ifndef COFF_ADJUST_FILEHDR_OUT_POST
-#define COFF_ADJUST_FILEHDR_OUT_POST(abfd, src, dst) \
- do \
- { \
- H_PUT_16 (abfd, ((struct internal_filehdr *)(src))->f_target_id, \
- ((FILHDR *)(dst))->f_target_id); \
- } \
- while (0)
-#endif
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 22
-#define FILHSZ_V0 20 /* COFF0 omits target_id field */
-
-/* File header flags */
-#define F_RELFLG (0x0001)
-#define F_EXEC (0x0002)
-#define F_LNNO (0x0004)
-#define F_VERS (0x0010) /* TMS320C4x code */
-/* F_LSYMS needs to be redefined in your source file */
-#define F_LSYMS_TICOFF (0x0010) /* normal COFF is 0x8 */
-
-#define F_10 0x00 /* file built for TMS320C1x devices */
-#define F_20 0x10 /* file built for TMS320C2x devices */
-#define F_25 0x20 /* file built for TMS320C2x/C5x devices */
-#define F_LENDIAN 0x0100 /* 16 bits/word, LSB first */
-#define F_SYMMERGE 0x1000 /* duplicate symbols were removed */
-
-/********************** OPTIONAL HEADER **********************/
-
-
-typedef struct
-{
- char magic[2]; /* type of file (0x108) */
- char vstamp[2]; /* version stamp */
- char tsize[4]; /* text size in bytes, padded to FW bdry*/
- char dsize[4]; /* initialized data " " */
- char bsize[4]; /* uninitialized data " " */
- char entry[4]; /* entry pt. */
- char text_start[4]; /* base of text used for this file */
- char data_start[4]; /* base of data used for this file */
-}
-AOUTHDR;
-
-
-#define AOUTHDRSZ 28
-#define AOUTSZ 28
-
-
-/********************** SECTION HEADER **********************/
-/* COFF0, COFF1 */
-struct external_scnhdr_v01 {
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size (in WORDS) */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[2]; /* number of relocation entries */
- char s_nlnno[2]; /* number of line number entries*/
- char s_flags[2]; /* flags */
- char s_reserved[1]; /* reserved */
- char s_page[1]; /* section page number (LOAD) */
-};
-
-/* COFF2 */
-struct external_scnhdr {
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size (in WORDS) */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[4]; /* number of relocation entries */
- char s_nlnno[4]; /* number of line number entries*/
- char s_flags[4]; /* flags */
- char s_reserved[2]; /* reserved */
- char s_page[2]; /* section page number (LOAD) */
-};
-
-/*
- * Special section flags
- */
-
-/* TI COFF defines these flags;
- STYP_CLINK: the section should be excluded from the final
- linker output if there are no references found to any symbol in the section
- STYP_BLOCK: the section should be blocked, i.e. if the section would cross
- a page boundary, it is started at a page boundary instead.
- TI COFF puts the section alignment power of two in the section flags
- e.g. 2**N is alignment, flags |= (N & 0xF) << 8
-*/
-#define STYP_CLINK (0x4000)
-#define STYP_BLOCK (0x1000)
-#define STYP_ALIGN (0x0F00) /* TI COFF stores section alignment here */
-
-#define SCNHDR_V01 struct external_scnhdr_v01
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ_V01 40 /* for v0 and v1 */
-#define SCNHSZ 48
-
-/* COFF2 changes the offsets and sizes of these fields
- Assume we're dealing with the COFF2 scnhdr structure, and adjust
- accordingly. Note: The GNU C versions of some of these macros
- are necessary in order to avoid compile time warnings triggered
- gcc's array bounds checking. The PUT_SCNHDR_PAGE macro also has
- the advantage on not evaluating LOC twice. */
-
-#define GET_SCNHDR_NRELOC(ABFD, LOC) \
- (COFF2_P (ABFD) ? H_GET_32 (ABFD, LOC) : H_GET_16 (ABFD, LOC))
-#define PUT_SCNHDR_NRELOC(ABFD, VAL, LOC) \
- (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, LOC) : H_PUT_16 (ABFD, VAL, LOC))
-#ifdef __GNUC__
-#define GET_SCNHDR_NLNNO(ABFD, LOC) \
- ({ \
- int nlnno; \
- char * ptr = (LOC); \
- if (COFF2_P (ABFD)) \
- nlnno = H_GET_32 (ABFD, ptr); \
- else \
- nlnno = H_GET_16 (ABFD, ptr - 2); \
- nlnno; \
- })
-#define PUT_SCNHDR_NLNNO(ABFD, VAL, LOC) \
- do \
- { \
- char * ptr = (LOC); \
- if (COFF2_P (ABFD)) \
- H_PUT_32 (ABFD, VAL, ptr); \
- else \
- H_PUT_16 (ABFD, VAL, ptr - 2); \
- } \
- while (0)
-#define GET_SCNHDR_FLAGS(ABFD, LOC) \
- ({ \
- int flags; \
- char * ptr = (LOC); \
- if (COFF2_P (ABFD)) \
- flags = H_GET_32 (ABFD, ptr); \
- else \
- flags = H_GET_16 (ABFD, ptr - 4); \
- flags; \
- })
-#define PUT_SCNHDR_FLAGS(ABFD, VAL, LOC) \
- do \
- { \
- char * ptr = (LOC); \
- if (COFF2_P (ABFD)) \
- H_PUT_32 (ABFD, VAL, ptr); \
- else \
- H_PUT_16 (ABFD, VAL, ptr - 4); \
- } \
- while (0)
-#define GET_SCNHDR_PAGE(ABFD, LOC) \
- ({ \
- unsigned page; \
- char * ptr = (LOC); \
- if (COFF2_P (ABFD)) \
- page = H_GET_16 (ABFD, ptr); \
- else \
- page = (unsigned) H_GET_8 (ABFD, ptr - 7); \
- page; \
- })
-/* On output, make sure that the "reserved" field is zero. */
-#define PUT_SCNHDR_PAGE(ABFD, VAL, LOC) \
- do \
- { \
- char * ptr = (LOC); \
- if (COFF2_P (ABFD)) \
- H_PUT_16 (ABFD, VAL, ptr); \
- else \
- { \
- H_PUT_8 (ABFD, VAL, ptr - 7); \
- H_PUT_8 (ABFD, 0, ptr - 8); \
- } \
- } \
- while (0)
-#else
-#define GET_SCNHDR_NLNNO(ABFD, LOC) \
- (COFF2_P (ABFD) ? H_GET_32 (ABFD, LOC) : H_GET_16 (ABFD, (LOC) - 2))
-#define PUT_SCNHDR_NLNNO(ABFD, VAL, LOC) \
- (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, LOC) : H_PUT_16 (ABFD, VAL, (LOC) - 2))
-#define GET_SCNHDR_FLAGS(ABFD, LOC) \
- (COFF2_P (ABFD) ? H_GET_32 (ABFD, LOC) : H_GET_16 (ABFD, (LOC) - 4))
-#define PUT_SCNHDR_FLAGS(ABFD, VAL, LOC) \
- (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, LOC) : H_PUT_16 (ABFD, VAL, (LOC) - 4))
-#define GET_SCNHDR_PAGE(ABFD, LOC) \
- (COFF2_P (ABFD) ? H_GET_16 (ABFD, LOC) : (unsigned) H_GET_8 (ABFD, (LOC) - 7))
-/* On output, make sure that the "reserved" field is zero. */
-#define PUT_SCNHDR_PAGE(ABFD, VAL, LOC) \
- (COFF2_P (ABFD) \
- ? H_PUT_16 (ABFD, VAL, LOC) \
- : H_PUT_8 (ABFD, VAL, (LOC) - 7), H_PUT_8 (ABFD, 0, (LOC) - 8))
-#endif
-
-
-/* TI COFF stores section size as number of bytes (address units, not octets),
- so adjust to be number of octets, which is what BFD expects */
-#define GET_SCNHDR_SIZE(ABFD, SZP) \
- (H_GET_32 (ABFD, SZP) * bfd_octets_per_byte (ABFD))
-#define PUT_SCNHDR_SIZE(ABFD, SZ, SZP) \
- H_PUT_32 (ABFD, (SZ) / bfd_octets_per_byte (ABFD), SZP)
-
-#define COFF_ADJUST_SCNHDR_IN_POST(ABFD, EXT, INT) \
- do \
- { \
- ((struct internal_scnhdr *)(INT))->s_page = \
- GET_SCNHDR_PAGE (ABFD, ((SCNHDR *)(EXT))->s_page); \
- } \
- while (0)
-
-/* The line number and reloc overflow checking in coff_swap_scnhdr_out in
- coffswap.h doesn't use PUT_X for s_nlnno and s_nreloc.
- Due to different sized v0/v1/v2 section headers, we have to re-write these
- fields.
- */
-#define COFF_ADJUST_SCNHDR_OUT_POST(ABFD, INT, EXT) \
- do \
- { \
- PUT_SCNHDR_NLNNO (ABFD, ((struct internal_scnhdr *)(INT))->s_nlnno, \
- ((SCNHDR *)(EXT))->s_nlnno); \
- PUT_SCNHDR_NRELOC (ABFD, ((struct internal_scnhdr *)(INT))->s_nreloc,\
- ((SCNHDR *)(EXT))->s_nreloc); \
- PUT_SCNHDR_FLAGS (ABFD, ((struct internal_scnhdr *)(INT))->s_flags, \
- ((SCNHDR *)(EXT))->s_flags); \
- PUT_SCNHDR_PAGE (ABFD, ((struct internal_scnhdr *)(INT))->s_page, \
- ((SCNHDR *)(EXT))->s_page); \
- } \
- while (0)
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _CINIT ".cinit" /* initialized C data */
-#define _SCONST ".const" /* constants */
-#define _SWITCH ".switch" /* switch tables */
-#define _STACK ".stack" /* C stack */
-#define _SYSMEM ".sysmem" /* used for malloc et al. syscalls */
-
-/********************** LINE NUMBERS **********************/
-
-/* 1 line number entry for every "breakpointable" source line in a section.
- * Line numbers are grouped on a per function basis; first entry in a function
- * grouping will have l_lnno = 0 and in place of physical address will be the
- * symbol table index of the function name.
- */
-struct external_lineno {
- union {
- char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
- char l_paddr[4]; /* (physical) address of line number */
- } l_addr;
- char l_lnno[2]; /* line number */
-};
-
-#define LINENO struct external_lineno
-#define LINESZ 6
-
-
-/********************** SYMBOLS **********************/
-
-/* NOTE: this is what a local label looks like in assembly source; what it
- looks like in COFF output is undefined */
-#define TICOFF_LOCAL_LABEL_P(NAME) \
-((NAME[0] == '$' && NAME[1] >= '0' && NAME[1] <= '9' && NAME[2] == '\0') \
- || NAME[strlen(NAME)-1] == '?')
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- union {
- char e_name[E_SYMNMLEN];
- struct {
- char e_zeroes[4];
- char e_offset[4];
- } e;
- } e;
- char e_value[4];
- char e_scnum[2];
- char e_type[2];
- char e_sclass[1];
- char e_numaux[1];
-};
-
-
-#define N_BTMASK (017)
-#define N_TMASK (060)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-
-union external_auxent {
- struct {
- char x_tagndx[4]; /* str, un, or enum tag indx */
- union {
- struct {
- char x_lnno[2]; /* declaration line number */
- char x_size[2]; /* str/union/array size */
- } x_lnsz;
- char x_fsize[4]; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- char x_lnnoptr[4]; /* ptr to fcn line # */
- char x_endndx[4]; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- char x_tvndx[2]; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- } x_n;
- } x_file;
-
- struct {
- char x_scnlen[4]; /* section length */
- char x_nreloc[2]; /* # relocation entries */
- char x_nlinno[2]; /* # line numbers */
- } x_scn;
-
- struct {
- char x_tvfill[4]; /* tv fill value */
- char x_tvlen[2]; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-
-
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-#define AUXENT union external_auxent
-#define AUXESZ 18
-
-/* section lengths are in target bytes (not host bytes) */
-#define GET_SCN_SCNLEN(ABFD, EXT) \
- (H_GET_32 (ABFD, (EXT)->x_scn.x_scnlen) * bfd_octets_per_byte (ABFD))
-#define PUT_SCN_SCNLEN(ABFD, INT, EXT) \
- H_PUT_32 (ABFD, (INT) / bfd_octets_per_byte (ABFD), (EXT)->x_scn.x_scnlen)
-
-/* lnsz size is in bits in COFF file, in bytes in BFD */
-#define GET_LNSZ_SIZE(abfd, ext) \
- (H_GET_16 (abfd, ext->x_sym.x_misc.x_lnsz.x_size) / (class != C_FIELD ? 8 : 1))
-
-#define PUT_LNSZ_SIZE(abfd, in, ext) \
- H_PUT_16 (abfd, ((class != C_FIELD) ? (in) * 8 : (in)), \
- ext->x_sym.x_misc.x_lnsz.x_size)
-
-/* TI COFF stores offsets for MOS and MOU in bits; BFD expects bytes
- Also put the load page flag of the section into the symbol value if it's an
- address. */
-#ifndef NEEDS_PAGE
-#define NEEDS_PAGE(X) 0
-#define PAGE_MASK 0
-#endif
-#define COFF_ADJUST_SYM_IN_POST(ABFD, EXT, INT) \
- do \
- { \
- struct internal_syment *dst = (struct internal_syment *)(INT); \
- if (dst->n_sclass == C_MOS || dst->n_sclass == C_MOU) \
- dst->n_value /= 8; \
- else if (NEEDS_PAGE (dst->n_sclass)) { \
- asection *scn = coff_section_from_bfd_index (abfd, dst->n_scnum); \
- dst->n_value |= (scn->lma & PAGE_MASK); \
- } \
- } \
- while (0)
-
-#define COFF_ADJUST_SYM_OUT_POST(ABFD, INT, EXT) \
- do \
- { \
- struct internal_syment *src = (struct internal_syment *)(INT); \
- SYMENT *dst = (SYMENT *)(EXT); \
- if (src->n_sclass == C_MOU || src->n_sclass == C_MOS) \
- H_PUT_32 (abfd, src->n_value * 8, dst->e_value); \
- else if (NEEDS_PAGE (src->n_sclass)) { \
- H_PUT_32 (abfd, src->n_value &= ~PAGE_MASK, dst->e_value); \
- } \
- } \
- while (0)
-
-/* Detect section-relative absolute symbols so they get flagged with a sym
- index of -1.
-*/
-#define SECTION_RELATIVE_ABSOLUTE_SYMBOL_P(RELOC, SECT) \
- ((*(RELOC)->sym_ptr_ptr)->section->output_section == (SECT) \
- && (RELOC)->howto->name[0] == 'A')
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct external_reloc_v0
-{
- char r_vaddr[4];
- char r_symndx[2];
- char r_reserved[2];
- char r_type[2];
-};
-
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_reserved[2]; /* extended pmad byte for COFF2 */
- char r_type[2];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ_V0 10 /* FIXME -- coffcode.h needs fixing */
-#define RELSZ 12 /* for COFF1/2 */
-
-/* various relocation types. */
-#define R_ABS 0x0000 /* no relocation */
-#define R_REL13 0x002A /* 13-bit direct reference (???) */
-#define R_PARTLS7 0x0028 /* 7 LSBs of an address */
-#define R_PARTMS9 0x0029 /* 9MSBs of an address */
-#define R_EXTWORD 0x002B /* 23-bit direct reference */
-#define R_EXTWORD16 0x002C /* 16-bit direct reference to 23-bit addr*/
-#define R_EXTWORDMS7 0x002D /* upper 7 bits of 23-bit address */
-
-#endif /* COFF_TI_H */
diff --git a/include/coff/tic30.h b/include/coff/tic30.h
deleted file mode 100644
index 0da61d7..0000000
--- a/include/coff/tic30.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* coff information for Texas Instruments TMS320C3X
-
- Copyright 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#define L_LNNO_SIZE 4
-#include "coff/external.h"
-
-#define TIC30MAGIC 0xC000
-
-#define TIC30BADMAG(x) (((x).f_magic != TIC30MAGIC))
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-/* The external reloc has an offset field, because some of the reloc
- types on the z8k don't have room in the instruction for the entire
- offset - eg with segments */
-
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_offset[4];
- char r_type[2];
- char r_stuff[2];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 16
-
-/* TMS320C30 relocation types. */
-
-#define R_TIC30_ABS16 0x100 /* 16 bit absolute. */
-#define R_TIC30_ABS24 0x101 /* 24 bit absolute. */
-#define R_TIC30_ABS32 0x102 /* 32 bit absolute. */
-#define R_TIC30_LDP 0x103 /* LDP bits 23-16 to 7-0. */
-#define R_TIC30_PC16 0x104 /* 16 bit pc relative. */
diff --git a/include/coff/tic4x.h b/include/coff/tic4x.h
deleted file mode 100644
index 433590e..0000000
--- a/include/coff/tic4x.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* TI COFF information for Texas Instruments TMS320C4X/C3X.
- This file customizes the settings in coff/ti.h.
-
- Copyright 2002, 2003 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef COFF_TIC4X_H
-#define COFF_TIC4X_H
-
-#define TIC4X_TARGET_ID 0x0093
-/* Octets per byte, as a power of two. */
-#define TI_TARGET_ID TIC4X_TARGET_ID
-#define OCTETS_PER_BYTE_POWER 2
-/* Add to howto to get absolute/sect-relative version. */
-#define HOWTO_BANK 6
-#define TICOFF_TARGET_ARCH bfd_arch_tic4x
-/* We use COFF2. */
-#define TICOFF_DEFAULT_MAGIC TICOFF2MAGIC
-
-#define TICOFF_TARGET_MACHINE_GET(FLAGS) \
- (((FLAGS) & F_VERS) ? bfd_mach_tic4x : bfd_mach_tic3x)
-
-#define TICOFF_TARGET_MACHINE_SET(FLAGSP, MACHINE) \
- do \
- { \
- if ((MACHINE) == bfd_mach_tic4x) \
- *(FLAGSP) |= F_VERS; \
- } \
- while (0)
-
-#include "coff/ti.h"
-
-#endif /* COFF_TIC4X_H */
diff --git a/include/coff/tic54x.h b/include/coff/tic54x.h
deleted file mode 100644
index a65511b..0000000
--- a/include/coff/tic54x.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* TI COFF information for Texas Instruments TMS320C54X.
- This file customizes the settings in coff/ti.h.
-
- Copyright 2000, 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef COFF_TIC54X_H
-#define COFF_TIC54X_H
-
-#define TIC54X_TARGET_ID 0x98
-#define TIC54XALGMAGIC 0x009B /* c54x algebraic assembler output */
-#define TIC5X_TARGET_ID 0x92
-#define TI_TARGET_ID TIC54X_TARGET_ID
-#define OCTETS_PER_BYTE_POWER 1 /* octets per byte, as a power of two */
-#define HOWTO_BANK 6 /* add to howto to get absolute/sect-relative version */
-#define TICOFF_TARGET_ARCH bfd_arch_tic54x
-#define TICOFF_DEFAULT_MAGIC TICOFF1MAGIC /* we use COFF1 for compatibility */
-
-/* Page macros
-
- The first GDB port requires flags in its remote memory access commands to
- distinguish between data/prog space. Hopefully we can make this go away
- eventually. Stuff the page in the upper bits of a 32-bit address, since
- the c5x family only uses 16 or 23 bits.
-
- c2x, c5x and most c54x devices have 16-bit addresses, but the c548 has
- 23-bit program addresses. Make sure the page flags don't interfere.
- These flags are used by GDB to identify the destination page for
- addresses.
-*/
-
-/* Recognized load pages (by common convention). */
-#define PG_PROG 0x0 /* PROG page */
-#define PG_DATA 0x1 /* DATA page */
-#define PG_IO 0x2 /* I/O page */
-
-/** Indicate whether the given storage class requires a page flag. */
-#define NEEDS_PAGE(X) ((X)==C_EXT)
-#define PAGE_MASK 0xFF000000
-#define ADDR_MASK 0x00FFFFFF
-#define PG_TO_FLAG(p) (((unsigned long)(p) & 0xFF) << 24)
-#define FLAG_TO_PG(f) (((f) >> 24) & 0xFF)
-
-#include "coff/ti.h"
-
-#endif /* COFF_TIC54X_H */
diff --git a/include/coff/tic80.h b/include/coff/tic80.h
deleted file mode 100644
index ed4b5c8..0000000
--- a/include/coff/tic80.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/* coff information for TI TMS320C80 (MVP)
-
- Copyright 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#define DO_NOT_DEFINE_FILHDR
-#define DO_NOT_DEFINE_SCNHDR
-#define L_LNNO_SIZE 2
-#include "coff/external.h"
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr
- {
- char f_magic[2]; /* magic number */
- char f_nscns[2]; /* number of sections */
- char f_timdat[4]; /* time & date stamp */
- char f_symptr[4]; /* file pointer to symtab */
- char f_nsyms[4]; /* number of symtab entries */
- char f_opthdr[2]; /* sizeof(optional hdr) */
- char f_flags[2]; /* flags */
- char f_target_id[2];/* target id (TIc80 specific) */
-};
-
-#define TIC80_ARCH_MAGIC 0x0C1 /* Goes in the file header magic number field */
-#define TIC80_TARGET_ID 0x95 /* Goes in the target id field */
-
-#define TIC80BADMAG(x) ((x).f_magic != TIC80_ARCH_MAGIC)
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 22
-
-#define TIC80_AOUTHDR_MAGIC 0x108 /* Goes in the optional file header magic number field */
-
-/********************** SECTION HEADER **********************/
-
-struct external_scnhdr
-{
- char s_name[8]; /* section name */
- char s_paddr[4]; /* physical address, aliased s_nlib */
- char s_vaddr[4]; /* virtual address */
- char s_size[4]; /* section size */
- char s_scnptr[4]; /* file ptr to raw data for section */
- char s_relptr[4]; /* file ptr to relocation */
- char s_lnnoptr[4]; /* file ptr to line numbers */
- char s_nreloc[2]; /* number of relocation entries */
- char s_nlnno[2]; /* number of line number entries*/
- char s_flags[2]; /* flags */
- char s_reserved[1]; /* reserved (TIc80 specific) */
- char s_mempage[1]; /* memory page number (TIc80) */
-};
-
-/* Names of "special" sections. */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _CINIT ".cinit"
-#define _CONST ".const"
-#define _SWITCH ".switch"
-#define _STACK ".stack"
-#define _SYSMEM ".sysmem"
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ 40
-
-/* FIXME - need to correlate external_auxent with
- TIc80 Code Generation Tools User's Guide, CG:A-25 */
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-/* The external reloc has an offset field, because some of the reloc
- types on the h8 don't have room in the instruction for the entire
- offset - eg the strange jump and high page addressing modes. */
-
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_reserved[2];
- char r_type[2];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 12
-
-/* TIc80 relocation types. */
-
-#define R_ABS 0x00 /* Absolute address - no relocation */
-#define R_RELLONGX 0x11 /* PP: 32 bits, direct */
-#define R_PPBASE 0x34 /* PP: Global base address type */
-#define R_PPLBASE 0x35 /* PP: Local base address type */
-#define R_PP15 0x38 /* PP: Global 15 bit offset */
-#define R_PP15W 0x39 /* PP: Global 15 bit offset divided by 4 */
-#define R_PP15H 0x3A /* PP: Global 15 bit offset divided by 2 */
-#define R_PP16B 0x3B /* PP: Global 16 bit offset for bytes */
-#define R_PPL15 0x3C /* PP: Local 15 bit offset */
-#define R_PPL15W 0x3D /* PP: Local 15 bit offset divided by 4 */
-#define R_PPL15H 0x3E /* PP: Local 15 bit offset divided by 2 */
-#define R_PPL16B 0x3F /* PP: Local 16 bit offset for bytes */
-#define R_PPN15 0x40 /* PP: Global 15 bit negative offset */
-#define R_PPN15W 0x41 /* PP: Global 15 bit negative offset divided by 4 */
-#define R_PPN15H 0x42 /* PP: Global 15 bit negative offset divided by 2 */
-#define R_PPN16B 0x43 /* PP: Global 16 bit negative byte offset */
-#define R_PPLN15 0x44 /* PP: Local 15 bit negative offset */
-#define R_PPLN15W 0x45 /* PP: Local 15 bit negative offset divided by 4 */
-#define R_PPLN15H 0x46 /* PP: Local 15 bit negative offset divided by 2 */
-#define R_PPLN16B 0x47 /* PP: Local 16 bit negative byte offset */
-#define R_MPPCR15W 0x4E /* MP: 15 bit PC-relative divided by 4 */
-#define R_MPPCR 0x4F /* MP: 32 bit PC-relative divided by 4 */
diff --git a/include/coff/w65.h b/include/coff/w65.h
deleted file mode 100644
index 8132970..0000000
--- a/include/coff/w65.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* coff information for WDC 65816
-
- Copyright 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#define L_LNNO_SIZE 4
-#include "coff/external.h"
-
-#define W65MAGIC 0x6500
-
-#define W65BADMAG(x) (((x).f_magic != W65MAGIC))
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-/* The external reloc has an offset field, because some of the reloc
- types on the w65 don't have room in the instruction for the entire
- offset - eg the strange jump and high page addressing modes */
-
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_offset[4];
- char r_type[2];
- char r_stuff[2];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 16
-
-
-
-
diff --git a/include/coff/we32k.h b/include/coff/we32k.h
deleted file mode 100644
index 933307f..0000000
--- a/include/coff/we32k.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* coff information for we32k
-
- Copyright 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#define L_LNNO_SIZE 2
-#include "coff/external.h"
-
-/* Bits for f_flags:
- F_RELFLG relocation info stripped from file
- F_EXEC file is executable (no unresolved external references)
- F_LNNO line numbers stripped from file
- F_LSYMS local symbols stripped from file
- F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax). */
-
-#define F_RELFLG (0x0001)
-#define F_EXEC (0x0002)
-#define F_LNNO (0x0004)
-#define F_LSYMS (0x0008)
-#define F_BM32B (0020000)
-#define F_BM32MAU (0040000)
-
-#define WE32KMAGIC 0x170 /* we32k sans transfer vector */
-#define FBOMAGIC 0x170 /* we32k sans transfer vector */
-#define MTVMAGIC 0x171 /* we32k with transfer vector */
-#define RBOMAGIC 0x172 /* reserved */
-#define WE32KBADMAG(x) ( ((x).f_magic != WE32KMAGIC) \
- && ((x).f_magic != FBOMAGIC) \
- && ((x).f_magic != RBOMAGIC) \
- && ((x).f_magic != MTVMAGIC))
-
-/* More names of "special" sections. */
-#define _TV ".tv"
-#define _INIT ".init"
-#define _FINI ".fini"
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 10
-
diff --git a/include/coff/x86_64.h b/include/coff/x86_64.h
deleted file mode 100644
index b58dd2f..0000000
--- a/include/coff/x86_64.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* COFF information for AMD 64.
- Copyright 2006 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-
- Written by Kai Tietz, OneVision Software GmbH&CoKg. */
-
-#define L_LNNO_SIZE 2
-#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
-
-#include "coff/external.h"
-
-#define AMD64MAGIC 0x8664
-
-#define AMD64BADMAG(x) ((x).f_magic != AMD64MAGIC)
-#define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b
-
-#define OMAGIC 0404 /* Object files, eg as output. */
-#define ZMAGIC IMAGE_NT_OPTIONAL_HDR64_MAGIC /* Demand load format, eg normal ld output 0x10b. */
-#define STMAGIC 0401 /* Target shlib. */
-#define SHMAGIC 0443 /* Host shlib. */
-
-/* Define some NT default values. */
-/* #define NT_IMAGE_BASE 0x400000 moved to internal.h. */
-#define NT_SECTION_ALIGNMENT 0x1000
-#define NT_FILE_ALIGNMENT 0x200
-#define NT_DEF_RESERVE 0x100000
-#define NT_DEF_COMMIT 0x1000
-
-/* Relocation directives. */
-
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 10
diff --git a/include/coff/xcoff.h b/include/coff/xcoff.h
deleted file mode 100644
index 7c1eef5..0000000
--- a/include/coff/xcoff.h
+++ /dev/null
@@ -1,639 +0,0 @@
-/* Internal format of XCOFF object file data structures for BFD.
-
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
- Free Software Foundation, Inc.
- Written by Ian Lance Taylor <ian@cygnus.com>, Cygnus Support.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _INTERNAL_XCOFF_H
-#define _INTERNAL_XCOFF_H
-
-/* Linker */
-
-/* Names of "special" sections. */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _PAD ".pad"
-#define _LOADER ".loader"
-#define _EXCEPT ".except"
-#define _TYPCHK ".typchk"
-
-/* XCOFF uses a special .loader section with type STYP_LOADER. */
-#define STYP_LOADER 0x1000
-
-/* XCOFF uses a special .debug section with type STYP_DEBUG. */
-#define STYP_DEBUG 0x2000
-
-/* XCOFF handles line number or relocation overflow by creating
- another section header with STYP_OVRFLO set. */
-#define STYP_OVRFLO 0x8000
-
-/* Specifies an exception section. A section of this type provides
- information to identify the reason that a trap or ececptin occured within
- and executable object program */
-#define STYP_EXCEPT 0x0100
-
-/* Specifies a type check section. A section of this type contains parameter
- argument type check strings used by the AIX binder. */
-#define STYP_TYPCHK 0x4000
-
-#define RS6K_AOUTHDR_OMAGIC 0x0107 /* old: text & data writeable */
-#define RS6K_AOUTHDR_NMAGIC 0x0108 /* new: text r/o, data r/w */
-#define RS6K_AOUTHDR_ZMAGIC 0x010B /* paged: text r/o, both page-aligned */
-
-/* XCOFF relocation types.
- The relocations are described in the function
- xcoff[64]_ppc_relocate_section in coff64-rs6000.c and coff-rs6000.c */
-
-#define R_POS (0x00)
-#define R_NEG (0x01)
-#define R_REL (0x02)
-#define R_TOC (0x03)
-#define R_RTB (0x04)
-#define R_GL (0x05)
-#define R_TCL (0x06)
-#define R_BA (0x08)
-#define R_BR (0x0a)
-#define R_RL (0x0c)
-#define R_RLA (0x0d)
-#define R_REF (0x0f)
-#define R_TRL (0x12)
-#define R_TRLA (0x13)
-#define R_RRTBI (0x14)
-#define R_RRTBA (0x15)
-#define R_CAI (0x16)
-#define R_CREL (0x17)
-#define R_RBA (0x18)
-#define R_RBAC (0x19)
-#define R_RBR (0x1a)
-#define R_RBRC (0x1b)
-
-/* Storage class #defines, from /usr/include/storclass.h that are not already
- defined in internal.h */
-
-/* Comment string in .info section */
-#define C_INFO 110
-
-/* Auxillary Symbol Entries */
-
-/* x_smtyp values: */
-#define SMTYP_ALIGN(x) ((x) >> 3) /* log2 of alignment */
-#define SMTYP_SMTYP(x) ((x) & 0x7) /* symbol type */
-/* Symbol type values: */
-#define XTY_ER 0 /* External reference */
-#define XTY_SD 1 /* Csect definition */
-#define XTY_LD 2 /* Label definition */
-#define XTY_CM 3 /* .BSS */
-#define XTY_EM 4 /* Error message */
-#define XTY_US 5 /* "Reserved for internal use" */
-
-/* x_smclas values: */
-#define XMC_PR 0 /* Read-only program code */
-#define XMC_RO 1 /* Read-only constant */
-#define XMC_DB 2 /* Read-only debug dictionary table */
-#define XMC_TC 3 /* Read-write general TOC entry */
-#define XMC_UA 4 /* Read-write unclassified */
-#define XMC_RW 5 /* Read-write data */
-#define XMC_GL 6 /* Read-only global linkage */
-#define XMC_XO 7 /* Read-only extended operation */
-#define XMC_SV 8 /* Read-only supervisor call */
-#define XMC_BS 9 /* Read-write BSS */
-#define XMC_DS 10 /* Read-write descriptor csect */
-#define XMC_UC 11 /* Read-write unnamed Fortran common */
-#define XMC_TI 12 /* Read-only traceback index csect */
-#define XMC_TB 13 /* Read-only traceback table csect */
-/* 14 ??? */
-#define XMC_TC0 15 /* Read-write TOC anchor */
-#define XMC_TD 16 /* Read-write data in TOC */
-#define XMC_SV64 17 /* Read-only 64 bit supervisor call */
-#define XMC_SV3264 18 /* Read-only 32 or 64 bit supervisor call */
-
-/* The ldhdr structure. This appears at the start of the .loader
- section. */
-
-struct internal_ldhdr
-{
- /* The version number:
- 1 : 32 bit
- 2 : 64 bit */
- unsigned long l_version;
-
- /* The number of symbol table entries. */
- bfd_size_type l_nsyms;
-
- /* The number of relocation table entries. */
- bfd_size_type l_nreloc;
-
- /* The length of the import file string table. */
- bfd_size_type l_istlen;
-
- /* The number of import files. */
- bfd_size_type l_nimpid;
-
- /* The offset from the start of the .loader section to the first
- entry in the import file table. */
- bfd_size_type l_impoff;
-
- /* The length of the string table. */
- bfd_size_type l_stlen;
-
- /* The offset from the start of the .loader section to the first
- entry in the string table. */
- bfd_size_type l_stoff;
-
- /* The offset to start of the symbol table, only in XCOFF64 */
- bfd_vma l_symoff;
-
- /* The offset to the start of the relocation table, only in XCOFF64 */
- bfd_vma l_rldoff;
-};
-
-/* The ldsym structure. This is used to represent a symbol in the
- .loader section. */
-
-struct internal_ldsym
-{
- union
- {
- /* The symbol name if <= SYMNMLEN characters. */
- char _l_name[SYMNMLEN];
- struct
- {
- /* Zero if the symbol name is more than SYMNMLEN characters. */
- long _l_zeroes;
-
- /* The offset in the string table if the symbol name is more
- than SYMNMLEN characters. */
- long _l_offset;
- }
- _l_l;
- }
- _l;
-
- /* The symbol value. */
- bfd_vma l_value;
-
- /* The symbol section number. */
- short l_scnum;
-
- /* The symbol type and flags. */
- char l_smtype;
-
- /* The symbol storage class. */
- char l_smclas;
-
- /* The import file ID. */
- bfd_size_type l_ifile;
-
- /* Offset to the parameter type check string. */
- bfd_size_type l_parm;
-};
-
-/* These flags are for the l_smtype field (the lower three bits are an
- XTY_* value). */
-
-/* Imported symbol. */
-#define L_IMPORT (0x40)
-/* Entry point. */
-#define L_ENTRY (0x20)
-/* Exported symbol. */
-#define L_EXPORT (0x10)
-
-/* The ldrel structure. This is used to represent a reloc in the
- .loader section. */
-
-struct internal_ldrel
-{
- /* The reloc address. */
- bfd_vma l_vaddr;
-
- /* The symbol table index in the .loader section symbol table. */
- bfd_size_type l_symndx;
-
- /* The relocation type and size. */
- short l_rtype;
-
- /* The section number this relocation applies to. */
- short l_rsecnm;
-};
-
-/* An entry in the XCOFF linker hash table. */
-struct xcoff_link_hash_entry
-{
- struct bfd_link_hash_entry root;
-
- /* Symbol index in output file. Set to -1 initially. Set to -2 if
- there is a reloc against this symbol. */
- long indx;
-
- /* If we have created a TOC entry for this symbol, this is the .tc
- section which holds it. */
- asection *toc_section;
-
- union
- {
- /* If we have created a TOC entry (the XCOFF_SET_TOC flag is
- set), this is the offset in toc_section. */
- bfd_vma toc_offset;
-
- /* If the TOC entry comes from an input file, this is set to the
- symbol index of the C_HIDEXT XMC_TC or XMC_TD symbol. */
- long toc_indx;
- }
- u;
-
- /* If this symbol is a function entry point which is called, this
- field holds a pointer to the function descriptor. If this symbol
- is a function descriptor, this field holds a pointer to the
- function entry point. */
- struct xcoff_link_hash_entry *descriptor;
-
- /* The .loader symbol table entry, if there is one. */
- struct internal_ldsym *ldsym;
-
- /* If XCOFF_BUILT_LDSYM is set, this is the .loader symbol table
- index. If XCOFF_BUILD_LDSYM is clear, and XCOFF_IMPORT is set,
- this is the l_ifile value. */
- long ldindx;
-
- /* Some linker flags. */
- unsigned long flags;
-
- /* The storage mapping class. */
- unsigned char smclas;
-};
-
-/* Flags for xcoff_link_hash_entry. */
-
-/* Symbol is referenced by a regular object. */
-#define XCOFF_REF_REGULAR 0x00000001
-/* Symbol is defined by a regular object. */
-#define XCOFF_DEF_REGULAR 0x00000002
-/* Symbol is defined by a dynamic object. */
-#define XCOFF_DEF_DYNAMIC 0x00000004
-/* Symbol is used in a reloc being copied into the .loader section. */
-#define XCOFF_LDREL 0x00000008
-/* Symbol is the entry point. */
-#define XCOFF_ENTRY 0x00000010
-/* Symbol is called; this is, it appears in a R_BR reloc. */
-#define XCOFF_CALLED 0x00000020
-/* Symbol needs the TOC entry filled in. */
-#define XCOFF_SET_TOC 0x00000040
-/* Symbol is explicitly imported. */
-#define XCOFF_IMPORT 0x00000080
-/* Symbol is explicitly exported. */
-#define XCOFF_EXPORT 0x00000100
-/* Symbol has been processed by xcoff_build_ldsyms. */
-#define XCOFF_BUILT_LDSYM 0x00000200
-/* Symbol is mentioned by a section which was not garbage collected. */
-#define XCOFF_MARK 0x00000400
-/* Symbol size is recorded in size_list list from hash table. */
-#define XCOFF_HAS_SIZE 0x00000800
-/* Symbol is a function descriptor. */
-#define XCOFF_DESCRIPTOR 0x00001000
-/* Multiple definitions have been for the symbol. */
-#define XCOFF_MULTIPLY_DEFINED 0x00002000
-/* Symbol is the __rtinit symbol. */
-#define XCOFF_RTINIT 0x00004000
-/* Symbol is an imported 32 bit syscall. */
-#define XCOFF_SYSCALL32 0x00008000
-/* Symbol is an imported 64 bit syscall. */
-#define XCOFF_SYSCALL64 0x00010000
-
-/* The XCOFF linker hash table. */
-
-#define XCOFF_NUMBER_OF_SPECIAL_SECTIONS 6
-#define XCOFF_SPECIAL_SECTION_TEXT 0
-#define XCOFF_SPECIAL_SECTION_ETEXT 1
-#define XCOFF_SPECIAL_SECTION_DATA 2
-#define XCOFF_SPECIAL_SECTION_EDATA 3
-#define XCOFF_SPECIAL_SECTION_END 4
-#define XCOFF_SPECIAL_SECTION_END2 5
-
-struct xcoff_link_hash_table
-{
- struct bfd_link_hash_table root;
-
- /* The .debug string hash table. We need to compute this while
- reading the input files, so that we know how large the .debug
- section will be before we assign section positions. */
- struct bfd_strtab_hash *debug_strtab;
-
- /* The .debug section we will use for the final output. */
- asection *debug_section;
-
- /* The .loader section we will use for the final output. */
- asection *loader_section;
-
- /* A count of non TOC relative relocs which will need to be
- allocated in the .loader section. */
- size_t ldrel_count;
-
- /* The .loader section header. */
- struct internal_ldhdr ldhdr;
-
- /* The .gl section we use to hold global linkage code. */
- asection *linkage_section;
-
- /* The .tc section we use to hold toc entries we build for global
- linkage code. */
- asection *toc_section;
-
- /* The .ds section we use to hold function descriptors which we
- create for exported symbols. */
- asection *descriptor_section;
-
- /* The list of import files. */
- struct xcoff_import_file *imports;
-
- /* Required alignment of sections within the output file. */
- unsigned long file_align;
-
- /* Whether the .text section must be read-only. */
- bfd_boolean textro;
-
- /* Whether garbage collection was done. */
- bfd_boolean gc;
-
- /* A linked list of symbols for which we have size information. */
- struct xcoff_link_size_list
- {
- struct xcoff_link_size_list *next;
- struct xcoff_link_hash_entry *h;
- bfd_size_type size;
- }
- *size_list;
-
- /* Magic sections: _text, _etext, _data, _edata, _end, end. */
- asection *special_sections[XCOFF_NUMBER_OF_SPECIAL_SECTIONS];
-};
-
-
-/* This structure is used to pass information through
- xcoff_link_hash_traverse. */
-
-struct xcoff_loader_info
-{
- /* Set if a problem occurred. */
- bfd_boolean failed;
-
- /* Output BFD. */
- bfd *output_bfd;
-
- /* Link information structure. */
- struct bfd_link_info *info;
-
- /* Whether all defined symbols should be exported. */
- bfd_boolean export_defineds;
-
- /* Number of ldsym structures. */
- size_t ldsym_count;
-
- /* Size of string table. */
- size_t string_size;
-
- /* String table. */
- char *strings;
-
- /* Allocated size of string table. */
- size_t string_alc;
-};
-
-/* In case we're on a 32-bit machine, construct a 64-bit "-1" value
- from smaller values. Start with zero, widen, *then* decrement. */
-#define MINUS_ONE (((bfd_vma) 0) - 1)
-
-/* __rtinit, from /usr/include/rtinit.h. */
-struct __rtinit
-{
- /* Pointer to runtime linker.
- XXX: Is the parameter really void? */
- int (*rtl) (void);
-
- /* Offset to array of init functions, 0 if none. */
- int init_offset;
-
- /* Offset to array of fini functions, 0 if none. */
- int fini_offset;
-
- /* Size of __RTINIT_DESCRIPTOR. This value should be used instead of
- sizeof(__RTINIT_DESCRIPTOR). */
- int __rtinit_descriptor_size;
-};
-
-#define RTINIT_DESCRIPTOR_SIZE (12)
-
-struct __rtinit_descriptor
-{
- /* Init/fini function. */
- int f;
-
- /* Offset, relative to the start of the __rtinit symbol, to name of the
- function. */
-
- int name_offset;
-
- /* Flags */
- unsigned char flags;
-};
-
-/* Archive */
-
-#define XCOFFARMAG "<aiaff>\012"
-#define XCOFFARMAGBIG "<bigaf>\012"
-#define SXCOFFARMAG 8
-
-/* The size of the ascii archive elements */
-#define XCOFFARMAG_ELEMENT_SIZE 12
-#define XCOFFARMAGBIG_ELEMENT_SIZE 20
-
-/* This terminates an XCOFF archive member name. */
-
-#define XCOFFARFMAG "`\012"
-#define SXCOFFARFMAG 2
-
-/* XCOFF archives start with this (printable) structure. */
-
-struct xcoff_ar_file_hdr
-{
- /* Magic string. */
- char magic[SXCOFFARMAG];
-
- /* Offset of the member table (decimal ASCII string). */
- char memoff[XCOFFARMAG_ELEMENT_SIZE];
-
- /* Offset of the global symbol table (decimal ASCII string). */
- char symoff[XCOFFARMAG_ELEMENT_SIZE];
-
- /* Offset of the first member in the archive (decimal ASCII string). */
- char firstmemoff[XCOFFARMAG_ELEMENT_SIZE];
-
- /* Offset of the last member in the archive (decimal ASCII string). */
- char lastmemoff[XCOFFARMAG_ELEMENT_SIZE];
-
- /* Offset of the first member on the free list (decimal ASCII
- string). */
- char freeoff[XCOFFARMAG_ELEMENT_SIZE];
-};
-
-#define SIZEOF_AR_FILE_HDR (SXCOFFARMAG + 5 * XCOFFARMAG_ELEMENT_SIZE)
-
-/* This is the equivalent data structure for the big archive format. */
-
-struct xcoff_ar_file_hdr_big
-{
- /* Magic string. */
- char magic[SXCOFFARMAG];
-
- /* Offset of the member table (decimal ASCII string). */
- char memoff[XCOFFARMAGBIG_ELEMENT_SIZE];
-
- /* Offset of the global symbol table for 32-bit objects (decimal ASCII
- string). */
- char symoff[XCOFFARMAGBIG_ELEMENT_SIZE];
-
- /* Offset of the global symbol table for 64-bit objects (decimal ASCII
- string). */
- char symoff64[XCOFFARMAGBIG_ELEMENT_SIZE];
-
- /* Offset of the first member in the archive (decimal ASCII string). */
- char firstmemoff[XCOFFARMAGBIG_ELEMENT_SIZE];
-
- /* Offset of the last member in the archive (decimal ASCII string). */
- char lastmemoff[XCOFFARMAGBIG_ELEMENT_SIZE];
-
- /* Offset of the first member on the free list (decimal ASCII
- string). */
- char freeoff[XCOFFARMAGBIG_ELEMENT_SIZE];
-};
-
-#define SIZEOF_AR_FILE_HDR_BIG (SXCOFFARMAG + 6 * XCOFFARMAGBIG_ELEMENT_SIZE)
-
-/* Each XCOFF archive member starts with this (printable) structure. */
-
-struct xcoff_ar_hdr
-{
- /* File size not including the header (decimal ASCII string). */
- char size[XCOFFARMAG_ELEMENT_SIZE];
-
- /* File offset of next archive member (decimal ASCII string). */
- char nextoff[XCOFFARMAG_ELEMENT_SIZE];
-
- /* File offset of previous archive member (decimal ASCII string). */
- char prevoff[XCOFFARMAG_ELEMENT_SIZE];
-
- /* File mtime (decimal ASCII string). */
- char date[12];
-
- /* File UID (decimal ASCII string). */
- char uid[12];
-
- /* File GID (decimal ASCII string). */
- char gid[12];
-
- /* File mode (octal ASCII string). */
- char mode[12];
-
- /* Length of file name (decimal ASCII string). */
- char namlen[4];
-
- /* This structure is followed by the file name. The length of the
- name is given in the namlen field. If the length of the name is
- odd, the name is followed by a null byte. The name and optional
- null byte are followed by XCOFFARFMAG, which is not included in
- namlen. The contents of the archive member follow; the number of
- bytes is given in the size field. */
-};
-
-#define SIZEOF_AR_HDR (3 * XCOFFARMAG_ELEMENT_SIZE + 4 * 12 + 4)
-
-/* The equivalent for the big archive format. */
-
-struct xcoff_ar_hdr_big
-{
- /* File size not including the header (decimal ASCII string). */
- char size[XCOFFARMAGBIG_ELEMENT_SIZE];
-
- /* File offset of next archive member (decimal ASCII string). */
- char nextoff[XCOFFARMAGBIG_ELEMENT_SIZE];
-
- /* File offset of previous archive member (decimal ASCII string). */
- char prevoff[XCOFFARMAGBIG_ELEMENT_SIZE];
-
- /* File mtime (decimal ASCII string). */
- char date[12];
-
- /* File UID (decimal ASCII string). */
- char uid[12];
-
- /* File GID (decimal ASCII string). */
- char gid[12];
-
- /* File mode (octal ASCII string). */
- char mode[12];
-
- /* Length of file name (decimal ASCII string). */
- char namlen[4];
-
- /* This structure is followed by the file name. The length of the
- name is given in the namlen field. If the length of the name is
- odd, the name is followed by a null byte. The name and optional
- null byte are followed by XCOFFARFMAG, which is not included in
- namlen. The contents of the archive member follow; the number of
- bytes is given in the size field. */
-};
-
-#define SIZEOF_AR_HDR_BIG (3 * XCOFFARMAGBIG_ELEMENT_SIZE + 4 * 12 + 4)
-
-/* We often have to distinguish between the old and big file format.
- Make it a bit cleaner. We can use `xcoff_ardata' here because the
- `hdr' member has the same size and position in both formats.
- <bigaf> is the default format, return TRUE even when xcoff_ardata is
- NULL. */
-#ifndef SMALL_ARCHIVE
-/* Creates big archives by default */
-#define xcoff_big_format_p(abfd) \
- ((NULL != bfd_ardata (abfd) && NULL == xcoff_ardata (abfd)) || \
- ((NULL != bfd_ardata (abfd)) && \
- (NULL != xcoff_ardata (abfd)) && \
- (xcoff_ardata (abfd)->magic[1] == 'b')))
-#else
-/* Creates small archives by default. */
-#define xcoff_big_format_p(abfd) \
- (((NULL != bfd_ardata (abfd)) && \
- (NULL != xcoff_ardata (abfd)) && \
- (xcoff_ardata (abfd)->magic[1] == 'b')))
-#endif
-
-/* We store a copy of the xcoff_ar_file_hdr in the tdata field of the
- artdata structure. Similar for the big archive. */
-#define xcoff_ardata(abfd) \
- ((struct xcoff_ar_file_hdr *) bfd_ardata (abfd)->tdata)
-#define xcoff_ardata_big(abfd) \
- ((struct xcoff_ar_file_hdr_big *) bfd_ardata (abfd)->tdata)
-
-/* We store a copy of the xcoff_ar_hdr in the arelt_data field of an
- archive element. Similar for the big archive. */
-#define arch_eltdata(bfd) ((struct areltdata *) ((bfd)->arelt_data))
-#define arch_xhdr(bfd) \
- ((struct xcoff_ar_hdr *) arch_eltdata (bfd)->arch_header)
-#define arch_xhdr_big(bfd) \
- ((struct xcoff_ar_hdr_big *) arch_eltdata (bfd)->arch_header)
-
-#endif /* _INTERNAL_XCOFF_H */
diff --git a/include/coff/z80.h b/include/coff/z80.h
deleted file mode 100644
index 3c72c10..0000000
--- a/include/coff/z80.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* coff information for Zilog Z80
- Copyright 2005 Free Software Foundation, Inc.
- Contributed by Arnold Metselaar <arnold_m@operamail.com>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#define L_LNNO_SIZE 4
-#include "coff/external.h"
-
-/* z80 backend does not use dots in section names. */
-#undef _TEXT
-#define _TEXT "text"
-#undef _DATA
-#define _DATA "data"
-#undef _BSS
-#define _BSS "bss"
-
-/* Type of cpu is stored in flags. */
-#define F_MACHMASK 0xF000
-
-#define Z80MAGIC 0x805A
-
-#define Z80BADMAG(x) (((x).f_magic != Z80MAGIC))
-
-/* Relocation directives. */
-
-/* This format actually has more bits than we need. */
-
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_offset[4];
- char r_type[2];
- char r_stuff[2];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 16
diff --git a/include/coff/z8k.h b/include/coff/z8k.h
deleted file mode 100644
index cfd5f04..0000000
--- a/include/coff/z8k.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* coff information for Zilog Z800N
-
- Copyright 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#define L_LNNO_SIZE 4
-#include "coff/external.h"
-
-/* Type of cpu is stored in flags */
-#define F_Z8001 0x1000
-#define F_Z8002 0x2000
-#define F_MACHMASK 0xf000
-
-#define Z8KMAGIC 0x8000
-
-#define Z8KBADMAG(x) (((x).f_magic != Z8KMAGIC))
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-/* The external reloc has an offset field, because some of the reloc
- types on the z8k don't have room in the instruction for the entire
- offset - eg with segments. */
-
-struct external_reloc
-{
- char r_vaddr[4];
- char r_symndx[4];
- char r_offset[4];
- char r_type[2];
- char r_stuff[2];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 16
-
diff --git a/include/demangle.h b/include/demangle.h
deleted file mode 100644
index 28c69f5..0000000
--- a/include/demangle.h
+++ /dev/null
@@ -1,610 +0,0 @@
-/* Defs for interface to demanglers.
- Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002,
- 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License
- as published by the Free Software Foundation; either version 2, or
- (at your option) any later version.
-
- In addition to the permissions in the GNU Library General Public
- License, the Free Software Foundation gives you unlimited
- permission to link the compiled version of this file into
- combinations with other programs, and to distribute those
- combinations without any restriction coming from the use of this
- file. (The Library Public License restrictions do apply in other
- respects; for example, they cover modification of the file, and
- distribution when not linked into a combined executable.)
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-
-#if !defined (DEMANGLE_H)
-#define DEMANGLE_H
-
-#include "libiberty.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/* Options passed to cplus_demangle (in 2nd parameter). */
-
-#define DMGL_NO_OPTS 0 /* For readability... */
-#define DMGL_PARAMS (1 << 0) /* Include function args */
-#define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */
-#define DMGL_JAVA (1 << 2) /* Demangle as Java rather than C++. */
-#define DMGL_VERBOSE (1 << 3) /* Include implementation details. */
-#define DMGL_TYPES (1 << 4) /* Also try to demangle type encodings. */
-#define DMGL_RET_POSTFIX (1 << 5) /* Print function return types (when
- present) after function signature */
-
-#define DMGL_AUTO (1 << 8)
-#define DMGL_GNU (1 << 9)
-#define DMGL_LUCID (1 << 10)
-#define DMGL_ARM (1 << 11)
-#define DMGL_HP (1 << 12) /* For the HP aCC compiler;
- same as ARM except for
- template arguments, etc. */
-#define DMGL_EDG (1 << 13)
-#define DMGL_GNU_V3 (1 << 14)
-#define DMGL_GNAT (1 << 15)
-
-/* If none of these are set, use 'current_demangling_style' as the default. */
-#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG|DMGL_GNU_V3|DMGL_JAVA|DMGL_GNAT)
-
-/* Enumeration of possible demangling styles.
-
- Lucid and ARM styles are still kept logically distinct, even though
- they now both behave identically. The resulting style is actual the
- union of both. I.E. either style recognizes both "__pt__" and "__rf__"
- for operator "->", even though the first is lucid style and the second
- is ARM style. (FIXME?) */
-
-extern enum demangling_styles
-{
- no_demangling = -1,
- unknown_demangling = 0,
- auto_demangling = DMGL_AUTO,
- gnu_demangling = DMGL_GNU,
- lucid_demangling = DMGL_LUCID,
- arm_demangling = DMGL_ARM,
- hp_demangling = DMGL_HP,
- edg_demangling = DMGL_EDG,
- gnu_v3_demangling = DMGL_GNU_V3,
- java_demangling = DMGL_JAVA,
- gnat_demangling = DMGL_GNAT
-} current_demangling_style;
-
-/* Define string names for the various demangling styles. */
-
-#define NO_DEMANGLING_STYLE_STRING "none"
-#define AUTO_DEMANGLING_STYLE_STRING "auto"
-#define GNU_DEMANGLING_STYLE_STRING "gnu"
-#define LUCID_DEMANGLING_STYLE_STRING "lucid"
-#define ARM_DEMANGLING_STYLE_STRING "arm"
-#define HP_DEMANGLING_STYLE_STRING "hp"
-#define EDG_DEMANGLING_STYLE_STRING "edg"
-#define GNU_V3_DEMANGLING_STYLE_STRING "gnu-v3"
-#define JAVA_DEMANGLING_STYLE_STRING "java"
-#define GNAT_DEMANGLING_STYLE_STRING "gnat"
-
-/* Some macros to test what demangling style is active. */
-
-#define CURRENT_DEMANGLING_STYLE current_demangling_style
-#define AUTO_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_AUTO)
-#define GNU_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU)
-#define LUCID_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_LUCID)
-#define ARM_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_ARM)
-#define HP_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_HP)
-#define EDG_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_EDG)
-#define GNU_V3_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU_V3)
-#define JAVA_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_JAVA)
-#define GNAT_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNAT)
-
-/* Provide information about the available demangle styles. This code is
- pulled from gdb into libiberty because it is useful to binutils also. */
-
-extern const struct demangler_engine
-{
- const char *const demangling_style_name;
- const enum demangling_styles demangling_style;
- const char *const demangling_style_doc;
-} libiberty_demanglers[];
-
-extern char *
-cplus_demangle (const char *mangled, int options);
-
-extern int
-cplus_demangle_opname (const char *opname, char *result, int options);
-
-extern const char *
-cplus_mangle_opname (const char *opname, int options);
-
-/* Note: This sets global state. FIXME if you care about multi-threading. */
-
-extern void
-set_cplus_marker_for_demangling (int ch);
-
-extern enum demangling_styles
-cplus_demangle_set_style (enum demangling_styles style);
-
-extern enum demangling_styles
-cplus_demangle_name_to_style (const char *name);
-
-/* Callback typedef for allocation-less demangler interfaces. */
-typedef void (*demangle_callbackref) (const char *, size_t, void *);
-
-/* V3 ABI demangling entry points, defined in cp-demangle.c. Callback
- variants return non-zero on success, zero on error. char* variants
- return a string allocated by malloc on success, NULL on error. */
-extern int
-cplus_demangle_v3_callback (const char *mangled, int options,
- demangle_callbackref callback, void *opaque);
-
-extern char*
-cplus_demangle_v3 (const char *mangled, int options);
-
-extern int
-java_demangle_v3_callback (const char *mangled,
- demangle_callbackref callback, void *opaque);
-
-extern char*
-java_demangle_v3 (const char *mangled);
-
-enum gnu_v3_ctor_kinds {
- gnu_v3_complete_object_ctor = 1,
- gnu_v3_base_object_ctor,
- gnu_v3_complete_object_allocating_ctor
-};
-
-/* Return non-zero iff NAME is the mangled form of a constructor name
- in the G++ V3 ABI demangling style. Specifically, return an `enum
- gnu_v3_ctor_kinds' value indicating what kind of constructor
- it is. */
-extern enum gnu_v3_ctor_kinds
- is_gnu_v3_mangled_ctor (const char *name);
-
-
-enum gnu_v3_dtor_kinds {
- gnu_v3_deleting_dtor = 1,
- gnu_v3_complete_object_dtor,
- gnu_v3_base_object_dtor
-};
-
-/* Return non-zero iff NAME is the mangled form of a destructor name
- in the G++ V3 ABI demangling style. Specifically, return an `enum
- gnu_v3_dtor_kinds' value, indicating what kind of destructor
- it is. */
-extern enum gnu_v3_dtor_kinds
- is_gnu_v3_mangled_dtor (const char *name);
-
-/* The V3 demangler works in two passes. The first pass builds a tree
- representation of the mangled name, and the second pass turns the
- tree representation into a demangled string. Here we define an
- interface to permit a caller to build their own tree
- representation, which they can pass to the demangler to get a
- demangled string. This can be used to canonicalize user input into
- something which the demangler might output. It could also be used
- by other demanglers in the future. */
-
-/* These are the component types which may be found in the tree. Many
- component types have one or two subtrees, referred to as left and
- right (a component type with only one subtree puts it in the left
- subtree). */
-
-enum demangle_component_type
-{
- /* A name, with a length and a pointer to a string. */
- DEMANGLE_COMPONENT_NAME,
- /* A qualified name. The left subtree is a class or namespace or
- some such thing, and the right subtree is a name qualified by
- that class. */
- DEMANGLE_COMPONENT_QUAL_NAME,
- /* A local name. The left subtree describes a function, and the
- right subtree is a name which is local to that function. */
- DEMANGLE_COMPONENT_LOCAL_NAME,
- /* A typed name. The left subtree is a name, and the right subtree
- describes that name as a function. */
- DEMANGLE_COMPONENT_TYPED_NAME,
- /* A template. The left subtree is a template name, and the right
- subtree is a template argument list. */
- DEMANGLE_COMPONENT_TEMPLATE,
- /* A template parameter. This holds a number, which is the template
- parameter index. */
- DEMANGLE_COMPONENT_TEMPLATE_PARAM,
- /* A constructor. This holds a name and the kind of
- constructor. */
- DEMANGLE_COMPONENT_CTOR,
- /* A destructor. This holds a name and the kind of destructor. */
- DEMANGLE_COMPONENT_DTOR,
- /* A vtable. This has one subtree, the type for which this is a
- vtable. */
- DEMANGLE_COMPONENT_VTABLE,
- /* A VTT structure. This has one subtree, the type for which this
- is a VTT. */
- DEMANGLE_COMPONENT_VTT,
- /* A construction vtable. The left subtree is the type for which
- this is a vtable, and the right subtree is the derived type for
- which this vtable is built. */
- DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE,
- /* A typeinfo structure. This has one subtree, the type for which
- this is the tpeinfo structure. */
- DEMANGLE_COMPONENT_TYPEINFO,
- /* A typeinfo name. This has one subtree, the type for which this
- is the typeinfo name. */
- DEMANGLE_COMPONENT_TYPEINFO_NAME,
- /* A typeinfo function. This has one subtree, the type for which
- this is the tpyeinfo function. */
- DEMANGLE_COMPONENT_TYPEINFO_FN,
- /* A thunk. This has one subtree, the name for which this is a
- thunk. */
- DEMANGLE_COMPONENT_THUNK,
- /* A virtual thunk. This has one subtree, the name for which this
- is a virtual thunk. */
- DEMANGLE_COMPONENT_VIRTUAL_THUNK,
- /* A covariant thunk. This has one subtree, the name for which this
- is a covariant thunk. */
- DEMANGLE_COMPONENT_COVARIANT_THUNK,
- /* A Java class. This has one subtree, the type. */
- DEMANGLE_COMPONENT_JAVA_CLASS,
- /* A guard variable. This has one subtree, the name for which this
- is a guard variable. */
- DEMANGLE_COMPONENT_GUARD,
- /* A reference temporary. This has one subtree, the name for which
- this is a temporary. */
- DEMANGLE_COMPONENT_REFTEMP,
- /* A hidden alias. This has one subtree, the encoding for which it
- is providing alternative linkage. */
- DEMANGLE_COMPONENT_HIDDEN_ALIAS,
- /* A standard substitution. This holds the name of the
- substitution. */
- DEMANGLE_COMPONENT_SUB_STD,
- /* The restrict qualifier. The one subtree is the type which is
- being qualified. */
- DEMANGLE_COMPONENT_RESTRICT,
- /* The volatile qualifier. The one subtree is the type which is
- being qualified. */
- DEMANGLE_COMPONENT_VOLATILE,
- /* The const qualifier. The one subtree is the type which is being
- qualified. */
- DEMANGLE_COMPONENT_CONST,
- /* The restrict qualifier modifying a member function. The one
- subtree is the type which is being qualified. */
- DEMANGLE_COMPONENT_RESTRICT_THIS,
- /* The volatile qualifier modifying a member function. The one
- subtree is the type which is being qualified. */
- DEMANGLE_COMPONENT_VOLATILE_THIS,
- /* The const qualifier modifying a member function. The one subtree
- is the type which is being qualified. */
- DEMANGLE_COMPONENT_CONST_THIS,
- /* A vendor qualifier. The left subtree is the type which is being
- qualified, and the right subtree is the name of the
- qualifier. */
- DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL,
- /* A pointer. The one subtree is the type which is being pointed
- to. */
- DEMANGLE_COMPONENT_POINTER,
- /* A reference. The one subtree is the type which is being
- referenced. */
- DEMANGLE_COMPONENT_REFERENCE,
- /* C++0x: An rvalue reference. The one subtree is the type which is
- being referenced. */
- DEMANGLE_COMPONENT_RVALUE_REFERENCE,
- /* A complex type. The one subtree is the base type. */
- DEMANGLE_COMPONENT_COMPLEX,
- /* An imaginary type. The one subtree is the base type. */
- DEMANGLE_COMPONENT_IMAGINARY,
- /* A builtin type. This holds the builtin type information. */
- DEMANGLE_COMPONENT_BUILTIN_TYPE,
- /* A vendor's builtin type. This holds the name of the type. */
- DEMANGLE_COMPONENT_VENDOR_TYPE,
- /* A function type. The left subtree is the return type. The right
- subtree is a list of ARGLIST nodes. Either or both may be
- NULL. */
- DEMANGLE_COMPONENT_FUNCTION_TYPE,
- /* An array type. The left subtree is the dimension, which may be
- NULL, or a string (represented as DEMANGLE_COMPONENT_NAME), or an
- expression. The right subtree is the element type. */
- DEMANGLE_COMPONENT_ARRAY_TYPE,
- /* A pointer to member type. The left subtree is the class type,
- and the right subtree is the member type. CV-qualifiers appear
- on the latter. */
- DEMANGLE_COMPONENT_PTRMEM_TYPE,
- /* A fixed-point type. */
- DEMANGLE_COMPONENT_FIXED_TYPE,
- /* An argument list. The left subtree is the current argument, and
- the right subtree is either NULL or another ARGLIST node. */
- DEMANGLE_COMPONENT_ARGLIST,
- /* A template argument list. The left subtree is the current
- template argument, and the right subtree is either NULL or
- another TEMPLATE_ARGLIST node. */
- DEMANGLE_COMPONENT_TEMPLATE_ARGLIST,
- /* An operator. This holds information about a standard
- operator. */
- DEMANGLE_COMPONENT_OPERATOR,
- /* An extended operator. This holds the number of arguments, and
- the name of the extended operator. */
- DEMANGLE_COMPONENT_EXTENDED_OPERATOR,
- /* A typecast, represented as a unary operator. The one subtree is
- the type to which the argument should be cast. */
- DEMANGLE_COMPONENT_CAST,
- /* A unary expression. The left subtree is the operator, and the
- right subtree is the single argument. */
- DEMANGLE_COMPONENT_UNARY,
- /* A binary expression. The left subtree is the operator, and the
- right subtree is a BINARY_ARGS. */
- DEMANGLE_COMPONENT_BINARY,
- /* Arguments to a binary expression. The left subtree is the first
- argument, and the right subtree is the second argument. */
- DEMANGLE_COMPONENT_BINARY_ARGS,
- /* A trinary expression. The left subtree is the operator, and the
- right subtree is a TRINARY_ARG1. */
- DEMANGLE_COMPONENT_TRINARY,
- /* Arguments to a trinary expression. The left subtree is the first
- argument, and the right subtree is a TRINARY_ARG2. */
- DEMANGLE_COMPONENT_TRINARY_ARG1,
- /* More arguments to a trinary expression. The left subtree is the
- second argument, and the right subtree is the third argument. */
- DEMANGLE_COMPONENT_TRINARY_ARG2,
- /* A literal. The left subtree is the type, and the right subtree
- is the value, represented as a DEMANGLE_COMPONENT_NAME. */
- DEMANGLE_COMPONENT_LITERAL,
- /* A negative literal. Like LITERAL, but the value is negated.
- This is a minor hack: the NAME used for LITERAL points directly
- to the mangled string, but since negative numbers are mangled
- using 'n' instead of '-', we want a way to indicate a negative
- number which involves neither modifying the mangled string nor
- allocating a new copy of the literal in memory. */
- DEMANGLE_COMPONENT_LITERAL_NEG,
- /* A libgcj compiled resource. The left subtree is the name of the
- resource. */
- DEMANGLE_COMPONENT_JAVA_RESOURCE,
- /* A name formed by the concatenation of two parts. The left
- subtree is the first part and the right subtree the second. */
- DEMANGLE_COMPONENT_COMPOUND_NAME,
- /* A name formed by a single character. */
- DEMANGLE_COMPONENT_CHARACTER,
- /* A decltype type. */
- DEMANGLE_COMPONENT_DECLTYPE,
- /* A pack expansion. */
- DEMANGLE_COMPONENT_PACK_EXPANSION
-};
-
-/* Types which are only used internally. */
-
-struct demangle_operator_info;
-struct demangle_builtin_type_info;
-
-/* A node in the tree representation is an instance of a struct
- demangle_component. Note that the field names of the struct are
- not well protected against macros defined by the file including
- this one. We can fix this if it ever becomes a problem. */
-
-struct demangle_component
-{
- /* The type of this component. */
- enum demangle_component_type type;
-
- union
- {
- /* For DEMANGLE_COMPONENT_NAME. */
- struct
- {
- /* A pointer to the name (which need not NULL terminated) and
- its length. */
- const char *s;
- int len;
- } s_name;
-
- /* For DEMANGLE_COMPONENT_OPERATOR. */
- struct
- {
- /* Operator. */
- const struct demangle_operator_info *op;
- } s_operator;
-
- /* For DEMANGLE_COMPONENT_EXTENDED_OPERATOR. */
- struct
- {
- /* Number of arguments. */
- int args;
- /* Name. */
- struct demangle_component *name;
- } s_extended_operator;
-
- /* For DEMANGLE_COMPONENT_FIXED_TYPE. */
- struct
- {
- /* The length, indicated by a C integer type name. */
- struct demangle_component *length;
- /* _Accum or _Fract? */
- short accum;
- /* Saturating or not? */
- short sat;
- } s_fixed;
-
- /* For DEMANGLE_COMPONENT_CTOR. */
- struct
- {
- /* Kind of constructor. */
- enum gnu_v3_ctor_kinds kind;
- /* Name. */
- struct demangle_component *name;
- } s_ctor;
-
- /* For DEMANGLE_COMPONENT_DTOR. */
- struct
- {
- /* Kind of destructor. */
- enum gnu_v3_dtor_kinds kind;
- /* Name. */
- struct demangle_component *name;
- } s_dtor;
-
- /* For DEMANGLE_COMPONENT_BUILTIN_TYPE. */
- struct
- {
- /* Builtin type. */
- const struct demangle_builtin_type_info *type;
- } s_builtin;
-
- /* For DEMANGLE_COMPONENT_SUB_STD. */
- struct
- {
- /* Standard substitution string. */
- const char* string;
- /* Length of string. */
- int len;
- } s_string;
-
- /* For DEMANGLE_COMPONENT_TEMPLATE_PARAM. */
- struct
- {
- /* Template parameter index. */
- long number;
- } s_number;
-
- /* For DEMANGLE_COMPONENT_CHARACTER. */
- struct
- {
- int character;
- } s_character;
-
- /* For other types. */
- struct
- {
- /* Left (or only) subtree. */
- struct demangle_component *left;
- /* Right subtree. */
- struct demangle_component *right;
- } s_binary;
-
- } u;
-};
-
-/* People building mangled trees are expected to allocate instances of
- struct demangle_component themselves. They can then call one of
- the following functions to fill them in. */
-
-/* Fill in most component types with a left subtree and a right
- subtree. Returns non-zero on success, zero on failure, such as an
- unrecognized or inappropriate component type. */
-
-extern int
-cplus_demangle_fill_component (struct demangle_component *fill,
- enum demangle_component_type,
- struct demangle_component *left,
- struct demangle_component *right);
-
-/* Fill in a DEMANGLE_COMPONENT_NAME. Returns non-zero on success,
- zero for bad arguments. */
-
-extern int
-cplus_demangle_fill_name (struct demangle_component *fill,
- const char *, int);
-
-/* Fill in a DEMANGLE_COMPONENT_BUILTIN_TYPE, using the name of the
- builtin type (e.g., "int", etc.). Returns non-zero on success,
- zero if the type is not recognized. */
-
-extern int
-cplus_demangle_fill_builtin_type (struct demangle_component *fill,
- const char *type_name);
-
-/* Fill in a DEMANGLE_COMPONENT_OPERATOR, using the name of the
- operator and the number of arguments which it takes (the latter is
- used to disambiguate operators which can be both binary and unary,
- such as '-'). Returns non-zero on success, zero if the operator is
- not recognized. */
-
-extern int
-cplus_demangle_fill_operator (struct demangle_component *fill,
- const char *opname, int args);
-
-/* Fill in a DEMANGLE_COMPONENT_EXTENDED_OPERATOR, providing the
- number of arguments and the name. Returns non-zero on success,
- zero for bad arguments. */
-
-extern int
-cplus_demangle_fill_extended_operator (struct demangle_component *fill,
- int numargs,
- struct demangle_component *nm);
-
-/* Fill in a DEMANGLE_COMPONENT_CTOR. Returns non-zero on success,
- zero for bad arguments. */
-
-extern int
-cplus_demangle_fill_ctor (struct demangle_component *fill,
- enum gnu_v3_ctor_kinds kind,
- struct demangle_component *name);
-
-/* Fill in a DEMANGLE_COMPONENT_DTOR. Returns non-zero on success,
- zero for bad arguments. */
-
-extern int
-cplus_demangle_fill_dtor (struct demangle_component *fill,
- enum gnu_v3_dtor_kinds kind,
- struct demangle_component *name);
-
-/* This function translates a mangled name into a struct
- demangle_component tree. The first argument is the mangled name.
- The second argument is DMGL_* options. This returns a pointer to a
- tree on success, or NULL on failure. On success, the third
- argument is set to a block of memory allocated by malloc. This
- block should be passed to free when the tree is no longer
- needed. */
-
-extern struct demangle_component *
-cplus_demangle_v3_components (const char *mangled, int options, void **mem);
-
-/* This function takes a struct demangle_component tree and returns
- the corresponding demangled string. The first argument is DMGL_*
- options. The second is the tree to demangle. The third is a guess
- at the length of the demangled string, used to initially allocate
- the return buffer. The fourth is a pointer to a size_t. On
- success, this function returns a buffer allocated by malloc(), and
- sets the size_t pointed to by the fourth argument to the size of
- the allocated buffer (not the length of the returned string). On
- failure, this function returns NULL, and sets the size_t pointed to
- by the fourth argument to 0 for an invalid tree, or to 1 for a
- memory allocation error. */
-
-extern char *
-cplus_demangle_print (int options,
- const struct demangle_component *tree,
- int estimated_length,
- size_t *p_allocated_size);
-
-/* This function takes a struct demangle_component tree and passes back
- a demangled string in one or more calls to a callback function.
- The first argument is DMGL_* options. The second is the tree to
- demangle. The third is a pointer to a callback function; on each call
- this receives an element of the demangled string, its length, and an
- opaque value. The fourth is the opaque value passed to the callback.
- The callback is called once or more to return the full demangled
- string. The demangled element string is always nul-terminated, though
- its length is also provided for convenience. In contrast to
- cplus_demangle_print(), this function does not allocate heap memory
- to grow output strings (except perhaps where alloca() is implemented
- by malloc()), and so is normally safe for use where the heap has been
- corrupted. On success, this function returns 1; on failure, 0. */
-
-extern int
-cplus_demangle_print_callback (int options,
- const struct demangle_component *tree,
- demangle_callbackref callback, void *opaque);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* DEMANGLE_H */
diff --git a/include/dis-asm.h b/include/dis-asm.h
deleted file mode 100644
index db74d85..0000000
--- a/include/dis-asm.h
+++ /dev/null
@@ -1,356 +0,0 @@
-/* Interface between the opcode library and its callers.
-
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor,
- Boston, MA 02110-1301, USA.
-
- Written by Cygnus Support, 1993.
-
- The opcode library (libopcodes.a) provides instruction decoders for
- a large variety of instruction sets, callable with an identical
- interface, for making instruction-processing programs more independent
- of the instruction set being processed. */
-
-#ifndef DIS_ASM_H
-#define DIS_ASM_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdio.h>
-#include "bfd.h"
-
- typedef int (*fprintf_ftype) (void *, const char*, ...) /*ATTRIBUTE_FPTR_PRINTF_2*/;
-
-enum dis_insn_type
-{
- dis_noninsn, /* Not a valid instruction */
- dis_nonbranch, /* Not a branch instruction */
- dis_branch, /* Unconditional branch */
- dis_condbranch, /* Conditional branch */
- dis_jsr, /* Jump to subroutine */
- dis_condjsr, /* Conditional jump to subroutine */
- dis_dref, /* Data reference instruction */
- dis_dref2 /* Two data references in instruction */
-};
-
-/* This struct is passed into the instruction decoding routine,
- and is passed back out into each callback. The various fields are used
- for conveying information from your main routine into your callbacks,
- for passing information into the instruction decoders (such as the
- addresses of the callback functions), or for passing information
- back from the instruction decoders to their callers.
-
- It must be initialized before it is first passed; this can be done
- by hand, or using one of the initialization macros below. */
-
-typedef struct disassemble_info
-{
- fprintf_ftype fprintf_func;
- void *stream;
- void *application_data;
-
- /* Target description. We could replace this with a pointer to the bfd,
- but that would require one. There currently isn't any such requirement
- so to avoid introducing one we record these explicitly. */
- /* The bfd_flavour. This can be bfd_target_unknown_flavour. */
- enum bfd_flavour flavour;
- /* The bfd_arch value. */
- enum bfd_architecture arch;
- /* The bfd_mach value. */
- unsigned long mach;
- /* Endianness (for bi-endian cpus). Mono-endian cpus can ignore this. */
- enum bfd_endian endian;
- /* Endianness of code, for mixed-endian situations such as ARM BE8. */
- enum bfd_endian endian_code;
- /* An arch/mach-specific bitmask of selected instruction subsets, mainly
- for processors with run-time-switchable instruction sets. The default,
- zero, means that there is no constraint. CGEN-based opcodes ports
- may use ISA_foo masks. */
- void *insn_sets;
-
- /* Some targets need information about the current section to accurately
- display insns. If this is NULL, the target disassembler function
- will have to make its best guess. */
- asection *section;
-
- /* An array of pointers to symbols either at the location being disassembled
- or at the start of the function being disassembled. The array is sorted
- so that the first symbol is intended to be the one used. The others are
- present for any misc. purposes. This is not set reliably, but if it is
- not NULL, it is correct. */
- asymbol **symbols;
- /* Number of symbols in array. */
- int num_symbols;
-
- /* Symbol table provided for targets that want to look at it. This is
- used on Arm to find mapping symbols and determine Arm/Thumb code. */
- asymbol **symtab;
- int symtab_pos;
- int symtab_size;
-
- /* For use by the disassembler.
- The top 16 bits are reserved for public use (and are documented here).
- The bottom 16 bits are for the internal use of the disassembler. */
- unsigned long flags;
-#define INSN_HAS_RELOC 0x80000000
- void *private_data;
-
- /* Function used to get bytes to disassemble. MEMADDR is the
- address of the stuff to be disassembled, MYADDR is the address to
- put the bytes in, and LENGTH is the number of bytes to read.
- INFO is a pointer to this struct.
- Returns an errno value or 0 for success. */
- int (*read_memory_func)
- (bfd_vma memaddr, bfd_byte *myaddr, unsigned int length,
- struct disassemble_info *info);
-
- /* Function which should be called if we get an error that we can't
- recover from. STATUS is the errno value from read_memory_func and
- MEMADDR is the address that we were trying to read. INFO is a
- pointer to this struct. */
- void (*memory_error_func)
- (int status, bfd_vma memaddr, struct disassemble_info *info);
-
- /* Function called to print ADDR. */
- void (*print_address_func)
- (bfd_vma addr, struct disassemble_info *info);
-
- /* Function called to determine if there is a symbol at the given ADDR.
- If there is, the function returns 1, otherwise it returns 0.
- This is used by ports which support an overlay manager where
- the overlay number is held in the top part of an address. In
- some circumstances we want to include the overlay number in the
- address, (normally because there is a symbol associated with
- that address), but sometimes we want to mask out the overlay bits. */
- int (* symbol_at_address_func)
- (bfd_vma addr, struct disassemble_info * info);
-
- /* Function called to check if a SYMBOL is can be displayed to the user.
- This is used by some ports that want to hide special symbols when
- displaying debugging outout. */
- bfd_boolean (* symbol_is_valid)
- (asymbol *, struct disassemble_info * info);
-
- /* These are for buffer_read_memory. */
- bfd_byte *buffer;
- bfd_vma buffer_vma;
- unsigned int buffer_length;
-
- /* This variable may be set by the instruction decoder. It suggests
- the number of bytes objdump should display on a single line. If
- the instruction decoder sets this, it should always set it to
- the same value in order to get reasonable looking output. */
- int bytes_per_line;
-
- /* The next two variables control the way objdump displays the raw data. */
- /* For example, if bytes_per_line is 8 and bytes_per_chunk is 4, the */
- /* output will look like this:
- 00: 00000000 00000000
- with the chunks displayed according to "display_endian". */
- int bytes_per_chunk;
- enum bfd_endian display_endian;
-
- /* Number of octets per incremented target address
- Normally one, but some DSPs have byte sizes of 16 or 32 bits. */
- unsigned int octets_per_byte;
-
- /* The number of zeroes we want to see at the end of a section before we
- start skipping them. */
- unsigned int skip_zeroes;
-
- /* The number of zeroes to skip at the end of a section. If the number
- of zeroes at the end is between SKIP_ZEROES_AT_END and SKIP_ZEROES,
- they will be disassembled. If there are fewer than
- SKIP_ZEROES_AT_END, they will be skipped. This is a heuristic
- attempt to avoid disassembling zeroes inserted by section
- alignment. */
- unsigned int skip_zeroes_at_end;
-
- /* Whether the disassembler always needs the relocations. */
- bfd_boolean disassembler_needs_relocs;
-
- /* Results from instruction decoders. Not all decoders yet support
- this information. This info is set each time an instruction is
- decoded, and is only valid for the last such instruction.
-
- To determine whether this decoder supports this information, set
- insn_info_valid to 0, decode an instruction, then check it. */
-
- char insn_info_valid; /* Branch info has been set. */
- char branch_delay_insns; /* How many sequential insn's will run before
- a branch takes effect. (0 = normal) */
- char data_size; /* Size of data reference in insn, in bytes */
- enum dis_insn_type insn_type; /* Type of instruction */
- bfd_vma target; /* Target address of branch or dref, if known;
- zero if unknown. */
- bfd_vma target2; /* Second target address for dref2 */
-
- /* Command line options specific to the target disassembler. */
- char * disassembler_options;
-
-} disassemble_info;
-
-
-/* Standard disassemblers. Disassemble one instruction at the given
- target address. Return number of octets processed. */
-typedef int (*disassembler_ftype) (bfd_vma, disassemble_info *);
-
-extern int print_insn_alpha (bfd_vma, disassemble_info *);
-extern int print_insn_avr (bfd_vma, disassemble_info *);
-extern int print_insn_bfin (bfd_vma, disassemble_info *);
-extern int print_insn_big_arm (bfd_vma, disassemble_info *);
-extern int print_insn_big_mips (bfd_vma, disassemble_info *);
-extern int print_insn_big_or32 (bfd_vma, disassemble_info *);
-extern int print_insn_big_powerpc (bfd_vma, disassemble_info *);
-extern int print_insn_big_score (bfd_vma, disassemble_info *);
-extern int print_insn_cr16 (bfd_vma, disassemble_info *);
-extern int print_insn_crx (bfd_vma, disassemble_info *);
-extern int print_insn_d10v (bfd_vma, disassemble_info *);
-extern int print_insn_d30v (bfd_vma, disassemble_info *);
-extern int print_insn_dlx (bfd_vma, disassemble_info *);
-extern int print_insn_fr30 (bfd_vma, disassemble_info *);
-extern int print_insn_frv (bfd_vma, disassemble_info *);
-extern int print_insn_h8300 (bfd_vma, disassemble_info *);
-extern int print_insn_h8300h (bfd_vma, disassemble_info *);
-extern int print_insn_h8300s (bfd_vma, disassemble_info *);
-extern int print_insn_h8500 (bfd_vma, disassemble_info *);
-extern int print_insn_hppa (bfd_vma, disassemble_info *);
-extern int print_insn_i370 (bfd_vma, disassemble_info *);
-extern int print_insn_i386 (bfd_vma, disassemble_info *);
-extern int print_insn_i386_att (bfd_vma, disassemble_info *);
-extern int print_insn_i386_intel (bfd_vma, disassemble_info *);
-extern int print_insn_i860 (bfd_vma, disassemble_info *);
-extern int print_insn_i960 (bfd_vma, disassemble_info *);
-extern int print_insn_ia64 (bfd_vma, disassemble_info *);
-extern int print_insn_ip2k (bfd_vma, disassemble_info *);
-extern int print_insn_iq2000 (bfd_vma, disassemble_info *);
-extern int print_insn_little_arm (bfd_vma, disassemble_info *);
-extern int print_insn_little_mips (bfd_vma, disassemble_info *);
-extern int print_insn_little_or32 (bfd_vma, disassemble_info *);
-extern int print_insn_little_powerpc (bfd_vma, disassemble_info *);
-extern int print_insn_little_score (bfd_vma, disassemble_info *);
-extern int print_insn_m32c (bfd_vma, disassemble_info *);
-extern int print_insn_m32r (bfd_vma, disassemble_info *);
-extern int print_insn_m68hc11 (bfd_vma, disassemble_info *);
-extern int print_insn_m68hc12 (bfd_vma, disassemble_info *);
-extern int print_insn_m68k (bfd_vma, disassemble_info *);
-extern int print_insn_m88k (bfd_vma, disassemble_info *);
-extern int print_insn_maxq_big (bfd_vma, disassemble_info *);
-extern int print_insn_maxq_little (bfd_vma, disassemble_info *);
-extern int print_insn_mcore (bfd_vma, disassemble_info *);
-extern int print_insn_mep (bfd_vma, disassemble_info *);
-extern int print_insn_mmix (bfd_vma, disassemble_info *);
-extern int print_insn_mn10200 (bfd_vma, disassemble_info *);
-extern int print_insn_mn10300 (bfd_vma, disassemble_info *);
-extern int print_insn_msp430 (bfd_vma, disassemble_info *);
-extern int print_insn_mt (bfd_vma, disassemble_info *);
-extern int print_insn_ns32k (bfd_vma, disassemble_info *);
-extern int print_insn_openrisc (bfd_vma, disassemble_info *);
-extern int print_insn_pdp11 (bfd_vma, disassemble_info *);
-extern int print_insn_pj (bfd_vma, disassemble_info *);
-extern int print_insn_rs6000 (bfd_vma, disassemble_info *);
-extern int print_insn_s390 (bfd_vma, disassemble_info *);
-extern int print_insn_sh (bfd_vma, disassemble_info *);
-extern int print_insn_sh64 (bfd_vma, disassemble_info *);
-extern int print_insn_sh64x_media (bfd_vma, disassemble_info *);
-extern int print_insn_sparc (bfd_vma, disassemble_info *);
-extern int print_insn_spu (bfd_vma, disassemble_info *);
-extern int print_insn_tic30 (bfd_vma, disassemble_info *);
-extern int print_insn_tic4x (bfd_vma, disassemble_info *);
-extern int print_insn_tic54x (bfd_vma, disassemble_info *);
-extern int print_insn_tic80 (bfd_vma, disassemble_info *);
-extern int print_insn_v850 (bfd_vma, disassemble_info *);
-extern int print_insn_vax (bfd_vma, disassemble_info *);
-extern int print_insn_w65 (bfd_vma, disassemble_info *);
-extern int print_insn_xc16x (bfd_vma, disassemble_info *);
-extern int print_insn_xstormy16 (bfd_vma, disassemble_info *);
-extern int print_insn_xtensa (bfd_vma, disassemble_info *);
-extern int print_insn_z80 (bfd_vma, disassemble_info *);
-extern int print_insn_z8001 (bfd_vma, disassemble_info *);
-extern int print_insn_z8002 (bfd_vma, disassemble_info *);
-
-extern disassembler_ftype arc_get_disassembler (void *);
-extern disassembler_ftype cris_get_disassembler (bfd *);
-
-extern void print_i386_disassembler_options (FILE *);
-extern void print_mips_disassembler_options (FILE *);
-extern void print_ppc_disassembler_options (FILE *);
-extern void print_arm_disassembler_options (FILE *);
-extern void parse_arm_disassembler_option (char *);
-extern void print_s390_disassembler_options (FILE *);
-extern int get_arm_regname_num_options (void);
-extern int set_arm_regname_option (int);
-extern int get_arm_regnames (int, const char **, const char **, const char *const **);
-extern bfd_boolean arm_symbol_is_valid (asymbol *, struct disassemble_info *);
-
-/* Fetch the disassembler for a given BFD, if that support is available. */
-extern disassembler_ftype disassembler (bfd *);
-
-/* Amend the disassemble_info structure as necessary for the target architecture.
- Should only be called after initialising the info->arch field. */
-extern void disassemble_init_for_target (struct disassemble_info * info);
-
-/* Document any target specific options available from the disassembler. */
-extern void disassembler_usage (FILE *);
-
-
-/* This block of definitions is for particular callers who read instructions
- into a buffer before calling the instruction decoder. */
-
-/* Here is a function which callers may wish to use for read_memory_func.
- It gets bytes from a buffer. */
-extern int buffer_read_memory
- (bfd_vma, bfd_byte *, unsigned int, struct disassemble_info *);
-
-/* This function goes with buffer_read_memory.
- It prints a message using info->fprintf_func and info->stream. */
-extern void perror_memory (int, bfd_vma, struct disassemble_info *);
-
-
-/* Just print the address in hex. This is included for completeness even
- though both GDB and objdump provide their own (to print symbolic
- addresses). */
-extern void generic_print_address
- (bfd_vma, struct disassemble_info *);
-
-/* Always true. */
-extern int generic_symbol_at_address
- (bfd_vma, struct disassemble_info *);
-
-/* Also always true. */
-extern bfd_boolean generic_symbol_is_valid
- (asymbol *, struct disassemble_info *);
-
-/* Method to initialize a disassemble_info struct. This should be
- called by all applications creating such a struct. */
-extern void init_disassemble_info (struct disassemble_info *info, void *stream,
- fprintf_ftype fprintf_func);
-
-/* For compatibility with existing code. */
-#define INIT_DISASSEMBLE_INFO(INFO, STREAM, FPRINTF_FUNC) \
- init_disassemble_info (&(INFO), (STREAM), (fprintf_ftype) (FPRINTF_FUNC))
-#define INIT_DISASSEMBLE_INFO_NO_ARCH(INFO, STREAM, FPRINTF_FUNC) \
- init_disassemble_info (&(INFO), (STREAM), (fprintf_ftype) (FPRINTF_FUNC))
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ! defined (DIS_ASM_H) */
diff --git a/include/dyn-string.h b/include/dyn-string.h
deleted file mode 100644
index 44e33de..0000000
--- a/include/dyn-string.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* An abstract string datatype.
- Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc.
- Contributed by Mark Mitchell (mark@markmitchell.com).
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING. If not, write to
-the Free Software Foundation, 51 Franklin Street - Fifth Floor,
-Boston, MA 02110-1301, USA. */
-
-
-typedef struct dyn_string
-{
- int allocated; /* The amount of space allocated for the string. */
- int length; /* The actual length of the string. */
- char *s; /* The string itself, NUL-terminated. */
-}* dyn_string_t;
-
-/* The length STR, in bytes, not including the terminating NUL. */
-#define dyn_string_length(STR) \
- ((STR)->length)
-
-/* The NTBS in which the contents of STR are stored. */
-#define dyn_string_buf(STR) \
- ((STR)->s)
-
-/* Compare DS1 to DS2 with strcmp. */
-#define dyn_string_compare(DS1, DS2) \
- (strcmp ((DS1)->s, (DS2)->s))
-
-
-extern int dyn_string_init (struct dyn_string *, int);
-extern dyn_string_t dyn_string_new (int);
-extern void dyn_string_delete (dyn_string_t);
-extern char *dyn_string_release (dyn_string_t);
-extern dyn_string_t dyn_string_resize (dyn_string_t, int);
-extern void dyn_string_clear (dyn_string_t);
-extern int dyn_string_copy (dyn_string_t, dyn_string_t);
-extern int dyn_string_copy_cstr (dyn_string_t, const char *);
-extern int dyn_string_prepend (dyn_string_t, dyn_string_t);
-extern int dyn_string_prepend_cstr (dyn_string_t, const char *);
-extern int dyn_string_insert (dyn_string_t, int, dyn_string_t);
-extern int dyn_string_insert_cstr (dyn_string_t, int, const char *);
-extern int dyn_string_insert_char (dyn_string_t, int, int);
-extern int dyn_string_append (dyn_string_t, dyn_string_t);
-extern int dyn_string_append_cstr (dyn_string_t, const char *);
-extern int dyn_string_append_char (dyn_string_t, int);
-extern int dyn_string_substring (dyn_string_t, dyn_string_t, int, int);
-extern int dyn_string_eq (dyn_string_t, dyn_string_t);
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
deleted file mode 100644
index b4025b1..0000000
--- a/include/elf/ChangeLog
+++ /dev/null
@@ -1,946 +0,0 @@
-2008-12-20 Hans-Peter Nilsson <hp@axis.com>
-
- * cris.h (R_CRIS_32_IE): New relocation.
-
-2008-12-03 Nick Clifton <nickc@redhat.com>
-
- * common.h (STT_IFUNC): Define.
-
-2008-11-27 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
-
- * cr16.h (R_CR16_GOT_REGREL20, R_CR16_GOTC_REGREL20 and
- R_CR16_GLOB_DAT): New relocations.
-
-2008-11-25 Hans-Peter Nilsson <hp@axis.com>
-
- * cris.h (R_CRIS_32_TPREL): Correct comment.
- (R_CRIS_DTPMOD): Open up for use elsewhere than the fourth GOT entry.
-
-2008-11-18 Catherine Moore <clm@codesourcery.com>
-
- * arm.h (Tag_ABI_FP_16bit_format): Define.
-
-2008-11-14 Nathan Sidwell <nathan@codesourcery.com>
-
- * internal.h (struct elf_segment_map): Add header_size field.
-
-2008-10-13 Ulrich Weigand <uweigand@de.ibm.com>
-
- * common.h (AT_BASE_PLATFORM, AT_EXECFN): Define.
-
-2008-10-10 Nathan Froyd <froydnj@codesourcery.com>
-
- * ppc.h: Add Tag_GNU_Power_ABI_Struct_Return.
-
-2008-10-04 Hans-Peter Nilsson <hp@axis.com>
-
- * cris.h (R_CRIS_32_GOT_GD, R_CRIS_16_GOT_GD, R_CRIS_32_GD)
- (R_CRIS_DTP, R_CRIS_32_DTPREL, R_CRIS_16_DTPREL, R_CRIS_DTPMOD)
- (R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL, R_CRIS_32_TPREL)
- (R_CRIS_16_TPREL): New relocations.
-
-2008-08-20 Bob Wilson <bob.wilson@acm.org>
-
- * xtensa.h (R_XTENSA_TLSDESC_FN, R_XTENSA_TLSDESC_ARG)
- (R_XTENSA_TLS_DTPOFF, R_XTENSA_TLS_TPOFF, R_XTENSA_TLS_FUNC)
- (R_XTENSA_TLS_ARG, R_XTENSA_TLS_CALL): New.
-
-2008-08-08 Richard Sandiford <rdsandiford@googlemail.com>
- Daniel Jacobowitz <dan@codesourcery.com>
- Catherine Moore <clm@codesourcery.com>
- Mark Shinwell <shinwell@codesourcery.com>
-
- * mips.h (STO_MIPS_PLT, ELF_ST_IS_MIPS_PLT, ELF_ST_SET_MIPS_PLT)
- (STO_MIPS_PIC, DT_MIPS_PLTGOT, DT_MIPS_RWPLT): New macros.
-
-2008-08-04 Markus Weiss <weissms@aros.org>
-
- * common.h (ELFOSABI_AROS): Update comment.
-
-2008-07-26 Michael Eager <eager@eagercon.com>
-
- * ppc.h: Add description of single-precision.
-
-2008-07-21 Luis Machado <luisgpm@br.ibm.com>
-
- * common.h: Define NT_PPC_VSX.
-
-2008-07-10 Richard Sandiford <rdsandiford@googlemail.com>
-
- * mips.h (ELF_ST_IS_MIPS16, ELF_ST_SET_MIPS16): New macros.
-
-2008-06-18 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
-
- * common.h (EM_CR16): Correct value.
- (EM_CR16): Rename to EM_CR16_OLD.
-
-2008-06-12 DJ Delorie <dj@redhat.com>
-
- * common.h (EM_M32C_NEW): Rename to EM_M32C.
- (EM_M32C): Rename to EM_M32C_OLD.
-
-2008-06-12 Joseph Myers <joseph@codesourcery.com>
-
- * common.h: Update e_machine table.
-
-2008-06-09 Takashi Yoshii <yoshii.takashi@renesas.com>
-
- * sh.h (EF_SH_BFD_TABLE): Set bfd_mach_sh for EF_SH_UNKNOWN.
-
-2008-06-09 Joseph Myers <joseph@codesourcery.com>
-
- * common.h: Change registry@caldera.com to registry@sco.com.
-
-2008-05-21 Nick Clifton <nickc@redhat.com>
-
- * reloc-macros.h: Add a comment about the use of the
- END_RELOC_NUMBERS symbol as a sentinel value.
-
-2008-05-15 Christophe Lyon <christophe.lyon@st.com>
-
- * arm.h (END_RELOC_NUMBERS): Provide a maximum value.
-
-2008-04-16 David S. Miller <davem@davemloft.net>
-
- * elf/sparc.h (R_SPARC_GOTDATA_HIX22,
- R_SPARC_GOTDATA_LOX10, R_SPARC_GOTDATA_OP_HIX22,
- R_SPARC_GOTDATA_OP_LOX10, R_SPARC_GOTDATA_OP,
- R_SPARC_H34, R_SPARC_SIZE32, R_SPARC_SIZE64): New relocs.
-
-2008-03-24 Ian Lance Taylor <iant@google.com>
-
- * common.h (NT_GNU_GOLD_VERSION): Define.
-
-2008-03-13 Alan Modra <amodra@bigpond.net.au>
-
- * internal.h (Elf_Internal_Shdr): Change sh_link and sh_info from
- unsigned long to unsigned int. Change sh_addralign to bfd_vma.
- Order struct as for external version.
-
-2008-03-12 Alan Modra <amodra@bigpond.net.au>
-
- PR 5900
- * common.h (SHN_BAD): Delete.
- (SHN_LORESERVE .. SHN_HIRESERVE): Move to..
- * external.h: ..here.
- * internal.h (SHN_LORESERVE, SHN_HIRESERVE): Define.
- (SHN_LOPROC, SHN_HIPROC, SHN_LOOS, SHN_HIOS): Define.
- (SHN_ABS, SHN_COMMON, SHN_XINDEX, SHN_BAD): Define.
-
-2008-03-12 Alan Modra <amodra@bigpond.net.au>
-
- * cr16c.h (SHN_CR16C_FCOMMON): Define using SHN_LORESERVE.
- (SHN_CR16C_NCOMMON): Likewise.
- * hppa.h (SHN_PARISC_ANSI_COMMON): Likewise.
- (SHN_PARISC_HUGE_COMMON): Likewise.
- * ia64.h (SHN_IA_64_ANSI_COMMON): Likewise.
- (SHN_IA_64_VMS_SYMVEC): Define using SHN_LOOS.
- * m32r.h (SHN_M32R_SCOMMON): Define using SHN_LORESERVE.
- * mips.h (SHN_MIPS_ACOMMON, SHN_MIPS_TEXT): Likewise.
- (SHN_MIPS_DATA, SHN_MIPS_SCOMMON, SHN_MIPS_SUNDEFINED): Likewise.
- * score.h (SHN_SCORE_TEXT, SHN_SCORE_DATA): Likewise.
- (SHN_SCORE_SCOMMON): Likewise.
- * sparc.h (SHN_BEFORE, SHN_AFTER): Likewise.
- * v850.h (SHN_V850_SCOMMON, SHN_V850_TCOMMON): Likewise.
- (SHN_V850_ZCOMMON): Likewise.
- * x86-64.h (SHN_X86_64_LCOMMON): Likewise.
-
-2008-03-03 Pallavi Tambay <pallavi.tambay@amd.com>
-
- * dwarf2.h: (enum dwarf_location_atom): Add new DW_OP:
- DW_OP_PGI_omp_thread_num.
-
-2008-02-04 Adam Nemet <anemet@caviumnetworks.com>
-
- * mips.h: Update copyright.
- (E_MIPS_MACH_OCTEON): New macro.
-
-2008-01-30 Tristan Gingold <gingold@adacore.com>
-
- Add OpenVMS extensions.
- * ia64.h (SHF_IA_64_VMS_GLOBAL, SHF_IA_64_VMS_OVERLAID)
- (SHF_IA_64_VMS_SHARED, SHF_IA_64_VMS_VECTOR)
- (SHF_IA_64_VMS_ALLOC_64BIT, SHF_IA_64_VMS_PROTECTED)
- (SHT_IA_64_VMS_TRACE, SHT_IA_64_VMS_TIE_SIGNATURES)
- (SHT_IA_64_VMS_DEBUG, SHT_IA_64_VMS_DEBUG_STR)
- (SHT_IA_64_VMS_LINKAGES, SHT_IA_64_VMS_SYMBOL_VECTOR)
- (SHT_IA_64_VMS_FIXUP, DT_IA_64_VMS_SUBTYPE)
- (DT_IA_64_VMS_IMGIOCNT, DT_IA_64_VMS_LNKFLAGS)
- (DT_IA_64_VMS_VIR_MEM_BLK_SIZ, DT_IA_64_VMS_IDENT)
- (DT_IA_64_VMS_NEEDED_IDENT, DT_IA_64_VMS_IMG_RELA_CNT)
- (DT_IA_64_VMS_SEG_RELA_CNT, DT_IA_64_VMS_FIXUP_RELA_CNT)
- (DT_IA_64_VMS_FIXUP_NEEDED, DT_IA_64_VMS_SYMVEC_CNT)
- (DT_IA_64_VMS_XLATED, DT_IA_64_VMS_STACKSIZE)
- (DT_IA_64_VMS_UNWINDSZ, DT_IA_64_VMS_UNWIND_CODSEG)
- (DT_IA_64_VMS_UNWIND_INFOSEG, DT_IA_64_VMS_LINKTIME)
- (DT_IA_64_VMS_SEG_NO, DT_IA_64_VMS_SYMVEC_OFFSET)
- (DT_IA_64_VMS_SYMVEC_SEG, DT_IA_64_VMS_UNWIND_OFFSET)
- (DT_IA_64_VMS_UNWIND_SEG, DT_IA_64_VMS_STRTAB_OFFSET)
- (DT_IA_64_VMS_SYSVER_OFFSET, DT_IA_64_VMS_IMG_RELA_OFF)
- (DT_IA_64_VMS_SEG_RELA_OFF, DT_IA_64_VMS_FIXUP_RELA_OFF)
- (DT_IA_64_VMS_PLTGOT_OFFSET, DT_IA_64_VMS_PLTGOT_SEG)
- (DT_IA_64_VMS_FPMODE, SHN_IA_64_VMS_SYMVEC): Define
-
-2008-01-16 Mark Kettenis <kettenis@gnu.org>
-
- * common.h (AT_SUN_AUXFLAGS): Define.
-
-2007-12-11 Daniel Jacobowitz <dan@codesourcery.com>
-
- * dwarf2.h (DW_AT_hi_user): Correct value.
-
-2007-12-07 Bob Wilson <bob.wilson@acm.org>
-
- * xtensa.h (R_XTENSA_32_PCREL): New.
-
-2007-11-29 Mark Shinwell <shinwell@codesourcery.com>
-
- * mips.h (E_MIPS_MACH_LS2E): New.
- (E_MIPS_MACH_LS2F): New.
-
-2007-11-28 Nathan Sidwell <nathan@codesourcery.com>
-
- * internal.h (ELF_IS_SECTION_IN_SEGMENT): Adjust to cope with
- segments at the end of memory.
-
-2007-11-17 Thiemo Seufer <ths@mips.com>
-
- * mips.h (Tag_GNU_MIPS_ABI_FP): Mention -mips32r2 -mfp64 variant
- in comment.
-
-2007-11-16 Nick Clifton <nickc@redhat.com>
-
- * dwarf2.h: Mention the location of the DWARF3 spec on the web.
- (DW_AT_stride_size): Rename to DW_AT_bit_stride.
- (DW_AT_stride): Rename to DW_AT_byte_stride.
-
-2007-11-08 Nathan Sidwell <nathan@codesourcery.com>
-
- * vxworks.h: New.
-
-2007-10-30 Nick Clifton <nickc@redhat.com>
-
- * mn10300.h (R_MN10300_ALIGN): Define.
-
-2007-10-25 Daniel Jacobowitz <dan@codesourcery.com>
-
- * ppc.h (Tag_GNU_Power_ABI_Vector): New.
-
-2007-10-19 Nick Clifton <nickc@redhat.com>
-
- * mn10300.h: Add R_MN10300_SYM_DIFF reloc.
-
-2007-10-18 Roland McGrath <roland@redhat.com>
-
- * common.h (NT_PPC_VMX): New macro.
-
-2007-10-01 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
-
- * cr16.h: Updated with new relocaction macros.
-
-2007-09-17 H.J. Lu <hongjiu.lu@intel.com>
-
- PR binutils/3281
- PR binutils/5037
- * internal.h (elf_segment_map): Add p_size and p_size_valid.
- (ELF_IS_SECTION_IN_SEGMENT): Allow SHF_TLS sections in
- PT_GNU_RELRO segments.
-
-2007-09-11 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k.h (EF_M68K_CF_ISA_C_NODIV): New.
-
-2007-08-25 Ulrich Weigand <uweigand@de.ibm.com>
-
- * common.h (NT_SPU): Define.
-
-2007-08-16 H.J. Lu <hongjiu.lu@intel.com>
-
- * common.h: Revert last change.
-
-2007-08-16 H.J. Lu <hongjiu.lu@intel.com>
-
- * common.h (PT_GNU_STACK): Renamed to ...
- (PT_GNU_ATTR): This.
- (PT_GNU_STACK): New. Make an alias of PT_GNU_ATTR.
-
-2007-07-09 Roland McGrath <roland@redhat.com>
-
- * common.h (NT_GNU_HWCAP, NT_GNU_BUILD_ID): New macros.
-
-2007-06-29 Joseph Myers <joseph@codesourcery.com>
-
- * ppc.h (Tag_GNU_Power_ABI_FP): Define.
-
-2007-06-29 Joseph Myers <joseph@codesourcery.com>
-
- * mips.h (Tag_GNU_MIPS_ABI_FP): Define.
-
-2007-06-29 Joseph Myers <joseph@codesourcery.com>
-
- * arm.h (elf32_arm_add_eabi_attr_int,
- elf32_arm_add_eabi_attr_string, elf32_arm_add_eabi_attr_compat,
- elf32_arm_get_eabi_attr_int, elf32_arm_set_eabi_attr_contents,
- elf32_arm_eabi_attr_size, Tag_NULL, Tag_File, Tag_Section,
- Tag_Symbol, Tag_compatibility): Remove.
- * common.h (SHT_GNU_ATTRIBUTES): Define.
-
-2007-06-29 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
-
- * common.h (EM_CR16): New entry for CR16 cpu.
- * cr16.h: New file.
-
-2007-06-11 Sterling Augustine <sterling@tensilica.com>
- Bob Wilson <bob.wilson@acm.org>
-
- * xtensa.h (XTENSA_PROP_INSN_NO_TRANSFORM): Renamed to...
- (XTENSA_PROP_NO_TRANSFORM): ...this.
-
-2007-05-18 Caroline Tice <ctice@apple.com>
-
- * dwarf2.h: (enum dwarf_location_atom): Add new DW_OP,
- DW_OP_GNU_uninit.
-
-2007-05-12 Alan Modra <amodra@bigpond.net.au>
-
- * spu.h (R_SPU_ADDR16X): Define.
- (R_SPU_PPU32, R_SPU_PPU64): Renumber.
-
-2007-05-11 Alan Modra <amodra@bigpond.net.au>
-
- * spu.h (R_SPU_PPU32, R_SPU_PPU64): Define.
-
-2007-05-02 Alan Modra <amodra@bigpond.net.au>
-
- * internal.h (ELF_IS_SECTION_IN_SEGMENT): Check both file offset
- and vma for appropriate sections.
-
-2007-04-26 Jan Beulich <jbeulich@novell.com>
-
- * common.h (DT_ENCODING): Correct value (back to spec mandated
- value).
-
-2007-03-08 Alan Modra <amodra@bigpond.net.au>
-
- * v850.h (V850_OTHER_TDA_BYTE): Delete.
- (V850_OTHER_SDA, V850_OTHER_ZDA, V850_OTHER_TDA): Assign bits
- that don't clash with visibility bits.
-
-2007-03-07 Alan Modra <amodra@bigpond.net.au>
-
- * common.h (ELF_ST_VISIBILITY): Comment typo fix.
-
-2007-02-05 Dave Brolley <brolley@redhat.com>
- Richard Sandiford <rsandifo@redhat.com>
- Richard Henderson <rth@redhat.com>
- DJ Delorie <dj@redhat.com>
- Ben Elliston <bje@redhat.com>
-
- * mep.h: New file.
- * common.h (EM_CYGNUS_MEP): Define.
-
-2007-02-15 Dave Brolley <brolley@redhat.com>
-
- From Graydon Hoare <graydon@redhat.com>:
- * common.h (STT_RELC, STT_SRELC, R_RELC): New macros.
-
-2007-01-08 Kazu Hirata <kazu@codesourcery.com>
-
- * m68k.h (EF_M68K_FIDO): New.
- (EF_M68K_ARCH_MASK): OR EF_M68K_FIDO.
- (EF_M68K_CPU32_FIDO_A, EF_M68K_CPU32_MASK): Remove.
-
-2006-12-25 Kazu Hirata <kazu@codesourcery.com>
-
- * m68k.h (EF_M68K_CPU32_FIDO_A, EF_M68K_CPU32_MASK): New.
-
-2006-12-19 Kazu Hirata <kazu@codesourcery.com>
-
- * m68k.h (EF_M68K_ARCH_MASK): New.
-
-2006-12-19 Nathan Sidwell <nathan@codesourcery.com>
-
- * internal.h (struct elf_segment_map): Add p_vaddr_offset field.
-
-2006-12-07 Kazu Hirata <kazu@codesourcery.com>
-
- * m68k.h (EF_M68K_ISA_MASK, EF_M68K_ISA_A_NODIV,
- EF_M68K_ISA_A, EF_M68K_ISA_A_PLUS, EF_M68K_ISA_B_NOUSP,
- EF_M68K_ISA_B, EF_M68K_ISA_C, EF_M68K_MAC_MASK, EF_M68K_MAC,
- EF_M68K_EMAC, EF_M68K_EMAC_B, EF_M68K_FLOAT): Rename to
- EF_M68K_CF_ISA_MASK, EF_M68K_CF_ISA_A_NODIV, EF_M68K_CF_ISA_A,
- EF_M68K_CF_ISA_A_PLUS, EF_M68K_CF_ISA_B_NOUSP,
- EF_M68K_CF_ISA_B, EF_M68K_CF_ISA_C, EF_M68K_CF_MAC_MASK,
- EF_M68K_CF_MAC, EF_M68K_CF_EMAC, EF_M68K_CF_EMAC_B,
- EF_M68K_CF_FLOAT, respectively.
-
-2006-12-05 Michael Tautschnig <tautschn@model.in.tum.de>
- Nick Clifton <nickc@redhat.com>
-
- * external.h (struct Elf_External_Versym): Use ATTRIBUTE_PACKED.
-
-2006-10-28 Richard Sandiford <richard@codesourcery.com>
-
- * mips.h (R_MIPS_GLOB_DAT): Define
- (R_MIPS_max): Bump by 1.
-
-2006-10-25 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
- Yukishige Shibata <shibata@rd.scei.sony.co.jp>
- Nobuhisa Fujinami <fnami@rd.scei.sony.co.jp>
- Takeaki Fukuoka <fukuoka@rd.scei.sony.co.jp>
- Alan Modra <amodra@bigpond.net.au>
-
- * common.h (EM_SPU): Define.
- * spu.h: New file.
-
-2006-10-19 Mei Ligang <ligang@sunnorth.com.cn>
-
- * score.h (EF_SCORE_PIC): Redefine EF_SCORE_PIC as 0x80000000.
- (EF_SCORE_FIXDEP): Redefine EF_SCORE_FIXDEP as 0x40000000.
- (EF_SCORE_HASENTRY): Delete.
-
-2006-10-17 Mark Shinwell <shinwell@codesourcery.com>
-
- * arm.h: Define TAG_CPU_ARCH_* constants.
-
-2006-09-17 Mei Ligang <ligang@sunnorth.com.cn>
-
- * score.h: New file.
- * common.h: Add Score machine number.
-
-2006-07-10 Jakub Jelinek <jakub@redhat.com>
-
- * common.h (SHT_GNU_HASH, DT_GNU_HASH): Define.
-
-2006-05-31 H.J. Lu <hongjiu.lu@intel.com>
-
- * internal.h (ELF_SECTION_SIZE): New.
- (ELF_IS_SECTION_IN_SEGMENT): Likewise.
- (ELF_IS_SECTION_IN_SEGMENT_FILE): Updated.
- (ELF_IS_SECTION_IN_SEGMENT_MEMORY): Likewise.
-
-2006-05-27 H.J. Lu <hongjiu.lu@intel.com>
-
- * internal.h (struct elf_segment_map): Add p_align and p_align_valid.
-
-2006-05-24 Carlos O'Donell <carlos@systemhalted.org>
- Randolph Chung <randolph@tausq.org>
- * hppa.h (R_PARISC_TLS_GD21L, R_PARISC_TLS_GD14R, R_PARISC_TLS_GDCALL,
- R_PARISC_TLS_LDM21L, R_PARISC_TLS_LDM14R, R_PARISC_TLS_LDMCALL,
- R_PARISC_TLS_LDO21L, R_PARISC_TLS_LDO14R, R_PARISC_TLS_DTPMOD32,
- R_PARISC_TLS_DTPMOD64, R_PARISC_TLS_DTPOFF32, R_PARISC_TLS_DTPOFF64):
- New TLS relocs.
- (R_PARISC_TLS_LE21L, R_PARISC_TLS_LE14R, R_PARISC_TLS_IE21L,
- R_PARISC_TLS_IE14R, R_PARISC_TLS_TPREL32, R_PARISC_TLS_TPREL64):
- Define TLS relocs using existing equivalents.
-
-2006-05-24 Bjoern Haase <bjoern.m.haase@web.de>
-
- * avr.h: Add E_AVR_MACH_AVR6, R_AVR_LO8_LDI_GS and R_AVR_HI8_LDI_GS.
-
-2006-03-25 Bernd Schmidt <bernd.schmidt@analog.com>
-
- * bfin.h (R_BFIN_GOT17M4, R_BFIN_GOTHI, R_BFIN_GOTLO,
- R_BFIN_FUNCDESC, R_BFIN_FUNCDESC_GOT17M4, R_BFIN_FUNCDESC_GOTHI,
- R_BFIN_FUNCDESC_GOTLO, R_BFIN_FUNCDESC_VALUE,
- R_BFIN_FUNCDESC_GOTOFF17M4, R_BFIN_FUNCDESC_GOTOFFHI,
- R_BFIN_FUNCDESC_GOTOFFLO, R_BFIN_GOTOFF17M4, R_BFIN_GOTOFFHI,
- R_BFIN_GOTOFFLO): New relocs.
- (EF_BFIN_PIC, EF_BFIN_FDPIC, EF_BFIN_PIC_FLAGS): New macros.
-
-2006-03-23 Michael Matz <matz@suse.de>
-
- * x86-64.h: Add the new relocations with their official
- numbers.
-
-2006-03-22 Richard Sandiford <richard@codesourcery.com>
- Daniel Jacobowitz <dan@codesourcery.com>
- Phil Edwards <phil@codesourcery.com>
- Zack Weinberg <zack@codesourcery.com>
- Mark Mitchell <mark@codesourcery.com>
- Nathan Sidwell <nathan@codesourcery.com>
-
- * mips.h (R_MIPS_COPY, R_MIPS_JUMP_SLOT): New relocs.
-
-2006-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * hppa.h (SHF_HP_TLS, SHF_HP_NEAR_SHARED, SHF_HP_FAR_SHARED,
- SHF_HP_COMDAT, SHF_HP_CONST, SHN_TLS_COMMON, SHN_NS_COMMON,
- SHN_NS_UNDEF, SHN_FS_UNDEF, SHN_HP_EXTERN, SHN_HP_EXTHINT,
- SHN_HP_UNDEF_BIND_IMM, SHT_HP_OVLBITS, SHT_HP_DLKM, SHT_HP_COMDAT,
- SHT_HP_OBJDICT, SHT_HP_ANNOT, STB_HP_ALIAS): Define.
-
-2006-03-10 Paul Brook <paul@codesourcery.com>
-
- * arm.h (EF_ARM_EABI_VER5): Define.
-
-2006-03-06 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k.h (EF_M68K_ISA_MASK, EF_M68K_ISA_A,
- EF_M68K_ISA_A_PLUS, EF_M68K_ISA_B, EF_M68K_ISA_C): Adjust.
- (EF_M68K_ISA_A_NODIV, EF_M68K_ISA_B_NOUSP): New.
- (EF_M68K_HW_DIV, EF_M68K_USP): Remove.
- (EF_M68K_MAC, EF_M68K_EMAC, EF_M68K_FLOAT): Adjust.
- (EF_M68K_EMAC_B): New.
-
-2006-03-03 Bjoern Haase <bjoern.m.haase@web.de>
-
- * avr.h (R_AVR_MS8_LDI,R_AVR_MS8_LDI_NEG): Add.
- (EF_AVR_LINKRELAX_PREPARED): Add.
-
-2006-03-02 Ben Elliston <bje@au.ibm.com>
-
- Import from the GCC tree:
- 2006-03-01 Jakub Jelinek <jakub@redhat.com>
-
- * dwarf2.h (DW_TAG_condition, DW_TAG_shared_type): New constants
- from DWARF 3.
- (DW_AT_description, DW_AT_binary_scale, DW_AT_decimal_scale,
- DW_AT_small, DW_AT_decimal_sign, DW_AT_digit_count,
- DW_AT_picture_string, DW_AT_mutable, DW_AT_threads_scaled,
- DW_AT_explicit, DW_AT_object_pointer, DW_AT_endianity,
- DW_AT_elemental, DW_AT_pure, DW_AT_recursive): New.
- (DW_OP_form_tls_address, DW_OP_call_frame_cfa, DW_OP_bit_piece): New.
- (DW_ATE_packed_decimal, DW_ATE_numeric_string, DW_ATE_edited,
- DW_ATE_signed_fixed, DW_ATE_unsigned_fixed): New.
- (DW_DS_unsigned, DW_DS_leading_overpunch, DW_DS_trailing_overpunch,
- DW_DS_leading_separate, DW_DS_trailing_separate): New.
- (DW_END_default, DW_END_big, DW_END_little): New.
- (DW_END_lo_user, DW_END_hi_user): Define.
- (DW_LNE_lo_user, DW_LNE_hi_user): Define.
- (DW_CFA_val_offset, DW_CFA_val_offset_sf, DW_CFA_val_expression): New.
- (DW_LANG_PLI, DW_LANG_ObjC, DW_LANG_ObjC_plus_plus, DW_LANG_UPC,
- DW_LANG_D): New.
-
-2006-02-06 Steve Ellcey <sje@cup.hp.com>
-
- * ia64.h (SHF_IA_64_HP_TLS): New.
-
-2006-02-24 DJ Delorie <dj@redhat.com>
-
- * m32c.h: Add relax relocs.
-
-2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
- Anil Paranjape <anilp1@kpitcummins.com>
- Shilin Shakti <shilins@kpitcummins.com>
-
- * common.h (EM_XC16X): New entry for xc16x cpu.
- Sort other EM_* numbers into numerical order.
- * xc16x.h: New file.
-
-2006-02-10 H.J. Lu <hongjiu.lu@intel.com>
-
- PR binutils/2258
- * internal.h (ELF_IS_SECTION_IN_SEGMENT_FILE): New.
- (ELF_IS_SECTION_IN_SEGMENT_MEMORY): Likewise.
-
-2006-02-07 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k.h (EF_CPU32, EF_M68000, EF_CFV4E): Rename to ...
- (EF_M68K_CPU32, EF_M68K_M68000, EF_M68K_CFV4E): ... here.
- (EF_M68K_ISA_MASK, EF_M68K_ISA_A, EF_M68K_M68K_ISA_A_PLUS,
- EF_M68K_ISA_B, EF_M68K_HW_DIV, EF_M68K_MAC_MASK, EF_M68K_MAC,
- EF_M68K_EMAC, EF_M68K_USP, EF_M68K_FLOAT): New.
-
-2006-02-06 Steve Ellcey <sje@cup.hp.com>
-
- * ia64.h (SHF_IA_64_HP_TLS): New.
-
-2006-01-18 Alexandre Oliva <aoliva@redhat.com>
-
- Introduce TLS descriptors for i386 and x86_64.
- * common.h (DT_TLSDESC_GOT, DT_TLSDESC_PLT): New.
- * i386.h (R_386_TLS_GOTDESC, R_386_TLS_DESC_CALL, R_386_TLS_DESC):
- New.
- * x86-64.h (R_X86_64_GOTPC32_TLSDESC, R_X86_64_TLSDESC_CALL,
- R_X86_64_TLSDESC): New.
-
-2006-01-09 Mike Frysinger <vapier@gentoo.org>:
-
- * common.h (EM_ALTERA_NIOS2, EM_NIOS32) Define.
-
-2005-12-16 Nathan Sidwell <nathan@codesourcery.com>
-
- Second part of ms1 to mt renaming.
- * common.h (EM_MT): Renamed.
- * mt.h: Rename relocs, cpu & other defines.
-
-2005-12-12 Nathan Sidwell <nathan@codesourcery.com>
-
- * mt.h: Renamed from ms1.h
-
-2005-12-12 Paul Brook <paul@codesourcery.com>
-
- * arm.h (elf32_arm_get_eabi_attr_int): Add prototype.
-
-2005-11-11 Nick Clifton <nickc@redhat.com>
-
- PR 1150
- * mips.h (STO_OPTIONAL): Define.
- (ELF_MIPS_IS_OPTIONAL): Define.
-
-2005-11-07 Nathan Sidwell <nathan@codesourcery.com>
-
- Add ms2.
- * ms1.h (EF_MS1_CPU_MS2): New.
-
-2005-11-06 John David Anglin <dave.anglin@nrc-crnc.gc.ca>
-
- * hppa.h (R_PARISC_DIR64WR, R_PARISC_DIR64DR): Remove relocs.
-
-2005-09-30 Catherine Moore <clm@cm00re.com>
-
- * bfin.h: New file.
- * common.h (EM_BLACKFIN): Define.
-
-2005-10-08 Paul Brook <paul@codesourcery.com>
-
- * arm.h: Add prototypes for BFD object attribute routines.
-
-2005-09-09 Richard Earnshaw <richard.earnshaw@arm.com>
-
- * arm.h (SHT_ARM_PREEMPTMAP, SHT_ARM_ATTRIBUTES): New defines.
-
-2005-08-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * hppa.h (SHT_PARISC_DLKM, SHF_PARISC_WEAKORDER, PT_PARISC_WEAKORDER):
- New defines.
-
-2005-08-04 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * hppa.h (PF_HP_CODE, PF_HP_MODIFY, PF_HP_LAZYSWAP): Revise defines.
- (PF_HP_CODE_DEPR, PF_HP_MODIFY_DEPR, PF_HP_LAZYSWAP_DEPR): New
- deprecated defines.
- (DT_HP_EPLTREL, DT_HP_EPLTRELSZ, DT_HP_FILTERED, DT_HP_FILTER_TLS,
- DT_HP_COMPAT_FILTERED, DT_HP_LAZYLOAD, DT_HP_BIND_NOW_COUNT, DT_PLT,
- DT_PLT_SIZE, DT_DLT, DT_DLT_SIZE, DT_HP_BIND_DEPTH_FIRST, DT_HP_GST,
- DT_HP_SHLIB_FIXED, DT_HP_MERGE_SHLIB_SEG, DT_HP_NODELETE, DT_HP_GROUP,
- DT_HP_PROTECT_LINKAGE_TABLE, PT_HP_OPT_ANNOT, PT_HP_HSL_ANNOT,
- PT_HP_STACK, PT_HP_CORE_UTSNAME, NT_HP_COMPILER, NT_HP_COPYRIGHT,
- NT_HP_VERSION, NT_HP_SRCFILE_INFO, NT_HP_LINKER, NT_HP_INSTRUMENTED,
- NT_HP_UX_OPTIONS): Define.
-
-2005-07-25 DJ Delorie <dj@redhat.com>
-
- * m32c.h: Add R_M32C_8, R_M32C_LO16, R_M32C_HI8, and R_M32C_HI16.
-
-2005-07-25 Jan Hubicka <jh@suse.cz>
-
- * x86-64.h (SHN_X86_64_LCOMMON): New.
- (SHF_X86_64_LARGE): New.
-
-2005-07-20 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
-
- * m32r.h (R_M32R_REL32): Added.
-
-2005-07-18 Ben Elliston <bje@au.ibm.com>
-
- * dwarf2.h (enum dwarf_type): Remove DW_AT_GNU_decimal_float.
- Replace with DW_ATE_decimal_float (now in DWARF 3).
-
-2005-07-14 Jim Blandy <jimb@redhat.com>
-
- Add support for Renesas M32C and M16C.
- * common.h (EM_M32C): New machine number.
- * m32c.h: New file.
-
-2005-06-17 Jakub Jelinek <jakub@redhat.com>
-
- * external.h (GRP_ENTRY_SIZE): Define.
-
-2005-06-17 Jan Beulich <jbeulich@novell.com>
-
- * x86-64.h (elf_x86_64_reloc_type): Adjust comment for
- R_X86_64_GOTPCREL. Add R_X86_64_PC64, R_X86_64_GOTOFF64, and
- R_X86_64_GOTPC32.
-
-2005-06-07 Aldy Hernandez <aldyh@redhat.com>
- Michael Snyder <msnyder@redhat.com>
- Stan Cox <scox@redhat.com>
-
- * common.h (EM_MS1): Define.
-
- * ms1.h: New file.
-
-2005-05-31 Richard Henderson <rth@redhat.com>
-
- * alpha.h (LITUSE_ALPHA_JSRDIRECT): New.
-
-2005-05-29 Richard Henderson <rth@redhat.com>
-
- * alpha.h (DT_ALPHA_PLTRO): New.
-
-2005-05-19 Ben Elliston <bje@au.ibm.com>
-
- * dwarf2.h (enum dwarf_type): Assign DW_ATE_GNU_decimal_float from
- the user-defined encoding space pending inclusion in the standard.
-
-2005-05-18 Zack Weinberg <zack@codesourcery.com>
-
- * arm.h: Make all #ifndef OLD_ARM_ABI blocks
- unconditional, delete all #ifdef OLD_ARM_ABI blocks.
-
-2005-05-17 Zack Weinberg <zack@codesourcery.com>
-
- * arm.h: Import complete list of official relocation names
- and numbers from AAELF. Define FAKE_RELOCs for old names.
- Remove a few old names no longer used anywhere.
-
-2005-05-14 Alan Modra <amodra@bigpond.net.au>
-
- * ppc.h (DT_PPC_GOT): Rename from DT_PPC_GLINK.
-
-2005-05-11 Alan Modra <amodra@bigpond.net.au>
-
- * ppc.h (R_PPC_RELAX32, R_PPC_RELAX32PC, R_PPC_RELAX32_PLT,
- R_PPC_RELAX32PC_PLT) Adjust.
- (R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI, R_PPC_REL16_HA): Define.
- (DT_PPC_GLINK): Define.
-
-2005-05-10 Nick Clifton <nickc@redhat.com>
-
- * Update the address and phone number of the FSF organization in
- the GPL notices in the following files:
- alpha.h, arc.h, arm.h, avr.h, common.h, cr16c.h, cris.h, crx.h,
- d10v.h, d30v.h, dlx.h, dwarf.h, dwarf2.h, external.h, fr30.h,
- frv.h, h8.h, hppa.h, i370.h, i386.h, i860.h, i960.h, ia64.h,
- internal.h, ip2k.h, iq2000.h, m32r.h, m68hc11.h, m68k.h, mcore.h,
- mips.h, mmix.h, mn10200.h, mn10300.h, msp430.h, openrisc.h,
- or32.h, pj.h, ppc.h, ppc64.h, reloc-macros.h, s390.h, sh.h,
- sparc.h, v850.h, vax.h, x86-64.h, xstormy16.h, xtensa.h
-
-2005-04-13 H.J. Lu <hongjiu.lu@intel.com>
-
- Moved from ../ChangeLog
-
- 2004-10-27 Richard Earnshaw <rearnsha@arm.com>
- * arm.h: Add R_ARM_CALL and R_ARM_JUMP32.
-
- 2004-10-12 Paul Brook <paul@codesourcery.com>
- * arm.h (EF_ARM_EABI_VER4): Define.
-
- 2004-10-08 Daniel Jacobowitz <dan@debian.org>
-
- * common.h (PT_SUNW_EH_FRAME): Define.
- * x86-64.h (SHT_X86_64_UNWIND): Define.
-
- 2004-10-07 Bob Wilson <bob.wilson@acm.org>
- * xtensa.h (R_XTENSA_DIFF8, R_XTENSA_DIFF16, R_XTENSA_DIFF32,
- R_XTENSA_SLOT*_OP, R_XTENSA_SLOT*_ALT): New relocations.
- (XTENSA_PROP_SEC_NAME): Define.
- (property_table_entry): Add flags field.
- (XTENSA_PROP_*, GET_XTENSA_PROP_*, SET_XTENSA_PROP_*): Define.
-
- 2004-09-17 Paul Brook <paul@codesourcery.com>
- * arm.h: Remove R_ARM_STKCHK and R_ARM_THM_STKCHK.
- Add R_ARM_TARGET2, R_ARM_PREL31, R_ARM_GOT_ABS, R_ARM_GOT_PREL,
- R_ARM_GOT_BREL12, R_ARM_GOTOFF12 and R_ARM_GOTRELAX.
-
- 2004-09-13 Paul Brook <paul@codesourcery.com>
- * arm.h: Rename RELABS to TARGET1.
-
- 2004-05-11 Jakub Jelinek <jakub@redhat.com>
- * common.h (PT_GNU_EH_FRAME, PT_GNU_STACK): Add comments.
- (PT_GNU_RELRO): Define.
-
-2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
- Phil Blundell <philb@gnu.org>
-
- * arm.h: Add TLS relocations.
-
-2005-03-23 Ben Elliston <bje@au.ibm.com>
-
- * dwarf.h: Merge with GCC's dwarf.h.
-
-2005-03-18 C Jaipraash <cjaiprakash@noida.hcltech.com>
-
- * m68k.h (EF_CFV4E): Define.
-
-2005-03-17 Paul Brook <paul@codesourcery.com>
- Dan Jacobowitz <dan@codesourcery.com>
- Mark Mitchell <mark@codesourcery.com>
-
- * arm.h (PT_ARM_EXIDX): Define.
-
-2005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
- Joseph Myers <joseph@codesourcery.com>
-
- * mips.h: Define MIPS TLS relocations.
-
-2005-02-15 Nigel Stephens <nigel@mips.com>
- Maciej W. Rozycki <macro@mips.com>
-
- * mips.h (R_MIPS16_GOT16): New reloc code.
- (R_MIPS16_CALL16): Likewise.
- (R_MIPS16_HI16): Likewise.
- (R_MIPS16_LO16): Likewise.
- (R_MIPS16_min): New fake reloc code.
- (R_MIPS16_max): Likewise.
-
-2005-02-11 Maciej W. Rozycki <macro@mips.com>
-
- * mips.h (R_MIPS_max): Use FAKE_RELOC to define.
-
-2005-01-25 Alexandre Oliva <aoliva@redhat.com>
-
- 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
- * frv.h: Add R_FRV_TLSMOFF.
- 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
- * frv.h: Add TLS relocations.
-
-2005-01-17 Nick Clifton <nickc@redhat.com>
-
- * sh.h (EF_SH2A_SH4_NOFPU, EF_SH2A_SH3_NOFPU, EF_SH2A_SH4,
- EF_SH2A_SH3E): New flags.
- (EF_SH_BFD_TABLE): Add these new flags to the table.
-
-2005-01-12 Alan Modra <amodra@bigpond.net.au>
-
- * ppc.h (R_PPC_RELAX32_PLT, R_PPC_RELAX32PC_PLT): Define.
- (R_PPC_RELAX32, R_PPC_RELAX32PC): Adjust value.
-
-2004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
-
- * avr.h (R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW): New relocs.
-
-2004-12-16 Richard Sandiford <rsandifo@redhat.com>
-
- * v850.h (R_V850_LO16_SPLIT_OFFSET): New reloc.
-
-2004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
-
- * mips.h (E_MIPS_MACH_9000): Define.
-
-2004-11-04 Hans-Peter Nilsson <hp@axis.com>
-
- * cris.h (EF_CRIS_VARIANT_MASK, EF_CRIS_VARIANT_ANY_V0_V10)
- (EF_CRIS_VARIANT_V32, EF_CRIS_VARIANT_COMMON_V10_V32): New
- macros.
-
-2004-10-06 Eric Christopher <echristo@redhat.com>
-
- * dwarf2.h: Sync with gcc dwarf2.h. Fix typo.
-
-2004-10-01 Paul Brook <paul@codesourcery.com>
-
- * arm.h (SHT_ARM_EXIDX): Define.
- (ELF_STRING_ARM_unwind, ELF_STRING_ARM_unwind,
- ELF_STRING_ARM_unwind_once, ELF_STRING_ARM_unwind_info_once):
- Define.
-
-2004-08-25 Dmitry Diky <diwil@spec.ru>
-
- * msp430.h: Add new relocs.
-
-2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h (R_386_USED_BY_INTEL_200): New.
-
-2004-07-29 Alexandre Oliva <aoliva@redhat.com>
-
- Introduce SH2a support.
- 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
- * sh.h (EF_SH2A_NOFPU): New.
- 2003-12-01 Michael Snyder <msnyder@redhat.com>
- * sh.h (EF_SH2A): New.
-
-2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
-
- * crx.h: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
- BFD_RELOC_CRX_SWITCH32.
-
-2004-07-06 Tomer Levi <Tomer.Levi@nsc.com>
-
- * common.h (EM_CRX): Define.
- * crx.h: New file.
-
-2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
-
- * m32r.h: Add defintions of R_M32R_GOTOFF_HI_ULO,
- R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
-
-2004-06-19 Alan Modra <amodra@bigpond.net.au>
-
- * common.h (ELF64_R_INFO): Warning fix.
-
-2004-06-14 Chris Demetriou <cgd@broadcom.com>
-
- * mips.h (R_MIPS_PC32): Add back (undoing removal on 2004-04-24),
- with an updated comment.
-
-2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
-
- * sh.h (EF_SH_HAS_DSP): Remove.
- (EF_SH_HAS_FP): Remove.
- (EF_SH_MERGE_MACH): Remove.
- (EF_SH4_NOFPU): Convert to decimal.
- (EF_SH4A_NOFPU): Likewise.
- (EF_SH4_NOMMU_NOFPU): Likewise.
- (EF_SH3_NOMMU): Add new macro.
- (EF_SH_BFD_TABLE): Likewise.
- (sh_find_elf_flags): Add prototype.
- (sh_elf_get_flags_from_mach): Likewise.
-
-2004-04-24 Chris Demetriou <cgd@broadcom.com>
-
- * mips.h (R_MIPS_PC32, R_MIPS_PC64, R_MIPS_GNU_REL_LO16)
- (R_MIPS_GNU_REL_HI16): Remove.
- (R_MIPS_GNU_REL16_S2): Update comment.
-
-2004-30-30 Galit Heller <Galit.Heller@nsc.com>
- Tomer Levi <Tomer.Levi@nsc.com>
-
- * common.h (EM_CR): Define.
- * cr16c.h: New file.
-
-2004-03-23 Paul Brook <paul@codesourcery.com>
-
- * arm.h (EF_ERM_BE8, EF_ARM_LE8, EF_ARM_EABI_VER3): Add.
-
-2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
-
- * sh.h: Add EF_SH4_NOMMU_NOFPU.
-
-2004-03-01 Richard Sandiford <rsandifo@redhat.com>
-
- * frv.h (EF_FRV_CPU_FR405, EF_FRV_CPU_FR450): Define.
-
-2004-01-28 Roland McGrath <roland@redhat.com>
-
- * common.h (AT_SECURE): New macro.
-
-2004-01-21 Roland McGrath <roland@redhat.com>
-
- * common.h (AT_SUN_UID, AT_SUN_RUID, AT_SUN_GID): New macros.
- (AT_SUN_RGID, AT_SUN_LDELF, AT_SUN_LDSHDR, AT_SUN_LDNAME,
- AT_SUN_LPAGESZ, AT_SUN_PLATFORM, AT_SUN_HWCAP, AT_SUN_IFLUSH,
- AT_SUN_CPU, AT_SUN_EMUL_ENTRY, AT_SUN_EMUL_EXECFD,
- AT_SUN_EXECNAME) AT_SUN_MMU, AT_SUN_LDDATA): Likewise.
-
-2004-01-17 Mark Kettenis <kettenis@gnu.org>
-
- * common.h (NT_OPENBSD_IDENT): Define.
-
-2004-01-06 Alexandre Oliva <aoliva@redhat.com>
-
- 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
- * frv.h (EF_FRV_FDPIC): New macro.
- (EF_FRV_PIC_FLAGS): Adjust.
- 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
- * frv.h (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
- R_FRV_FUNCDESC_GOTOFFLO, R_FRV_FUNCDESC_GOTOFFHI, R_FRV_GOTOFF12,
- R_FRV_GOTOFFLO, R_FRV_GOTOFFHI): New.
- 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
- * frv.h (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO, R_FRV_FUNCDESC,
- R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI, R_FRV_FUNCDESC_GOTLO):
- New.
-
-
-For older changes see ChangeLog-9103
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff --git a/include/elf/ChangeLog-9103 b/include/elf/ChangeLog-9103
deleted file mode 100644
index 93632ef..0000000
--- a/include/elf/ChangeLog-9103
+++ /dev/null
@@ -1,1948 +0,0 @@
-2005-04-13 H.J. Lu <hongjiu.lu@intel.com>
-
- Moved from ../ChangeLog
-
- 2003-10-14 Bob Wilson <bob.wilson@acm.org>
- * xtensa.h: Formatting. Fix comments about property section
- names for linkonce sections.
-
- 2003-05-23 Jakub Jelinek <jakub@redhat.com>
- * common.h (PT_GNU_STACK): Define.
-
- 2003-01-25 Jakub Jelinek <jakub@redhat.com>
- * sparc.h: Add TLS relocs. Move R_SPARC_REV32 to 252.
-
- 2002-09-26 Jakub Jelinek <jakub@redhat.com>
- * x86-64.h: Add TLS relocs.
-
- 2002-09-19 Jakub Jelinek <jakub@redhat.com>
- * i386.h (R_386_TLS_TPOFF, R_386_TLS_IE, R_386_TLS_GOTIE):
- Define.
-
- 2002-07-10 Jakub Jelinek <jakub@redhat.com>
- * common.h (SHT_GNU_LIBLIST, DT_GNU_PRELINKED,
- DT_GNU_CONFLICT*, DT_GNU_LIBLIST*): Define.
-
- 2002-05-31 Michal Ludvig <mludvig@suse.cz>
- * dwarf2.h (DW_CFA_low_user, DW_CFA_high_user): Renamed
- to DW_CFA_lo_user, DW_CFA_hi_user respectively.
-
- 2002-05-23 Jakub Jelinek <jakub@redhat.com>
- * common.h (PT_TLS, SHF_TLS, STT_TLS, DF_STATIC_TLS): Define.
- * ia64.h (R_IA64_LTOFF_TPREL22): Renamed from R_IA64_LTOFF_TP22.
- * i386.h: Add TLS relocs.
-
-2003-12-19 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
-
- * m32r.h : Added m32r-linux and PIC support. Add new ABI that
- uses RELA.
- (R_M32R_16_RELA, R_M32R_32_RELA, R_M32R_24_RELA,
- R_M32R_10_PCREL_RELA, R_M32R_18_PCREL_RELA,
- R_M32R_26_PCREL_RELA, R_M32R_HI16_ULO_RELA,
- R_M32R_HI16_SLO_RELA, R_M32R_LO16_RELA,
- R_M32R_SDA16_RELA, R_M32R_RELA_GNU_VTINHERIT,
- R_M32R_RELA_GNU_VTENTRY, R_M32R_GOT24,
- R_M32R_26_PLTREL, R_M32R_COPY, R_M32R_GLOB_DAT,
- R_M32R_JMP_SLOT, R_M32R_RELATIVE, R_M32R_GOTOFF,
- R_M32R_GOTPC24, R_M32R_GOT16_HI_ULO,
- R_M32R_GOT16_HI_SLO, R_M32R_GOT16_LO,
- R_M32R_GOTPC_HI_ULO, R_M32R_GOTPC_HI_SLO,
- R_M32R_GOTPC_LO): New relocs.
-
-2003-12-06 Alan Modra <amodra@bigpond.net.au>
-
- From Jan Beulich <JBeulich@novell.com>
- * common.h (DT_HIOS): Correct value.
-
-2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
-
- * m32r.h: Add new machine type m32r2 and instruction modes.
-
-2003-11-06 Alan Modra <amodra@bigpond.net.au>
-
- * ppc.h (R_PPC_RELAX32PC): Define.
-
-2003-10-22 Alexandre Oliva <aoliva@redhat.com>,
- Michael Snyder <msnyder@redhat.com>
-
- * sh.h (EF_SH4A, EF_SH4AL_DSP, EF_SH4_NOFPU, EF_SH4A_NOFPU): New.
- (EF_SH_MERGE_MACH): Combine them.
-
-2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
-
- * mmix.h (R_MMIX_PUSHJ_STUBBABLE): New reloc number.
- (_bfd_mmix_before_linker_allocation): Rename from
- _bfd_mmix_prepare_linker_allocated_gregs.
- (_bfd_mmix_after_linker_allocation): Rename from
- _bfd_mmix_finalize_linker_allocated_gregs.
-
-2003-10-06 Dave Brolley <brolley@redhat.com>
-
- * frv.h (EF_FRV_CPU_FR550): New macro.
-
-2003-09-30 Chris Demetriou <cgd@broadcom.com>
-
- * mips.h (E_MIPS_ARCH_64R2): New define.
-
-2003-09-23 DJ Delorie <dj@redhat.com>
-
- * sh.h (R_SH_SWITCH8, R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
- R_SH_LOOP_START,R_SH_LOOP_END): Move to "reserved" spaces.
- (R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
- R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
- R_SH_PSHA, R_SH_PSHL): New.
-
-2003-09-11 James Cownie <jcownie@etnus.com>
-
- * dwarf2.h: Add HP dwarf extensions from their hacked gdb
- header files (ftp://ftp.hp.com/pub/lang/tools/WDB/wdb-4.0.tar.gz).
-
-2003-09-04 Nick Clifton <nickc@redhat.com>
-
- * v850.h (E_V850E1_ARCH): Define.
-
-2003-08-21 James Cownie <jcownie@etnus.com>
-
- * dwarf2.h: Add PGI dwarf extensions.
-
-2003-08-08 Dmitry Diky <diwil@mail.ru>
-
- * msp430.h: Add xW42 and xE42 parts. Sort MPU list according to
- gcc order.
-
-2003-08-07 Alan Modra <amodra@bigpond.net.au>
-
- * reloc-macros.h (START_RELOC_NUMBERS) : Remove PARAMS macro. Use
- C90 function definition. Formatting.
- (RELOC_NUMBER): Remove !__STDC__ code.
-
-2003-07-28 Eric Christopher <echristo@redhat.com>
-
- * ppc.h (R_PPC_RELAX32): New. Fake relocation.
-
-2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
-
- * v850.h (SHF_V850_GPREL): New.
- (SHF_V850_EPREL): Likewise.
- (SHF_V850_R0REL): Likewise.
-
-2003-07-09 Alexandre Oliva <aoliva@redhat.com>
-
- 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
- * mn10300.h: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
- PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
- Renumbered all relocs.
- 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
- * mn10300.h (R_MN10300_GOTPC, R_MN10300_GOTOFF,
- R_MN10300_PLT32, R_MN10300_GOT32, R_MN10300_GOT24,
- R_MN10300_GOT16, R_MN10300_COPY, R_MN10300_GLOB_DAT,
- R_MN10300_JMP_SLOT, R_MN10300_RELATIVE): New relocs.
-
-2003-07-09 Alexandre Oliva <aoliva@redhat.com>
-
- 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
- * mn10300.h (E_MN10300_MACH_AM33_2): Renamed from
- E_MN10300_MACH_AM332.
- 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
- * mn10300.h (E_MN10300_MACH_AM332): Defined.
-
-2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
-
- * s390.h (elf_s390_reloc_type): Add long displacement relocations
- R_390_20, R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
-
-2003-06-29 Andreas Jaeger <aj@suse.de>
-
- * mmix.h: Convert to ISO C90 prototypes.
- * mips.h: Likewise.
-
-2003-06-13 Robert Millan <zeratul2@wanadoo.es>
-
- * common.h (GNU_ABI_TAG_NETBSD): New tag.
- (GNU_ABI_TAG_FREEBSD): New tag.
-
-2003-06-10 Richard Sandiford <rsandifo@redhat.com>
-
- * h8.h (E_H8_MACH_H8300SXN): New flag.
-
-2003-06-03 Nick Clifton <nickc@redhat.com>
-
- * v850.h (R_V850_32): Rename to R_V850_ABS32.
- Add R_V850_REL32.
-
-2003-05-15 Roland McGrath <roland@redhat.com>
-
- * common.h (NT_AUXV, AT_*): New macros.
- * external.h (Elf32_External_Auxv, Elf64_External_Auxv): New types.
- * internal.h (Elf_Internal_Auxv): New type.
-
-2003-05-14 Michael Snyder <msnyder@redhat.com>
- From Bernd Schmidt <bernds@redhat.com>
- * h8.h (E_H8_MACH_H8300SX): New.
-
-2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
-
- * h8.h (E_H8_MACH_H8300HN, E_H8_MACH_H8300SN): New
-
-2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
-
- * common.h (EM_SH): Amend comment to refer to SuperH.
-
-2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
-
- * common.h: Replace references to Mitsubishi M32R with
- references to Renesas M32R.
-
-2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
-
- * common.h: Replace occurrances of 'Hitachi' with 'Renesas'.
-
-2003-04-01 Bob Wilson <bob.wilson@acm.org>
-
- * common.h (EM_XTENSA_OLD): Define.
- * xtensa.h: New file.
-
-2003-04-01 Nick Clifton <nickc@redhat.com>
-
- * arm.h (ARM_NOTE_SECTION): Include .gnu in the string.
-
-2003-03-25 Stan Cox <scox@redhat.com>
- Nick Clifton <nickc@redhat.com>
-
- Contribute support for Intel's iWMMXt chip - an ARM variant:
-
- * arm.h (ARM_NOTE_SECTION): Define.
-
-2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
-
- * sh.h (EF_SH_MERGE_MACH): Make sure SH2E & SH3/SH3E merge to SH3E,
- and SH2E & SH4 merge to SH4, not SH2E.
-
-2003-02-21 Ian Wienand <ianw@gelato.unsw.edu.au>
-
- * ia64.h (SHT_IA_64_LOPSREG, SHT_IA_64_HIPSREG,
- SHT_IA_64_PRIORITY_INIT): Define.
-
-2003-02-18 Alan Modra <amodra@bigpond.net.au>
-
- * ppc64.h (IS_PPC64_TLS_RELOC): Rename from IS_TLS_RELOC.
-
- * ppc.h: Replace DTPMOD64, TPREL64, DTPREL64 with DTPMOD32 etc.
- (IS_PPC_TLS_RELOC): Define.
-
-2003-02-10 Nick Clifton <nickc@redhat.com>
-
- * arm.h (EF_ARM_MAVERICK_FLOAT): Define.
-
-2003-02-05 Alan Modra <amodra@bigpond.net.au>
-
- * ppc.h: Add TLS relocs. Format.
- * ppc64.h: Likewise.
-
-2003-01-27 Alexandre Oliva <aoliva@redhat.com>
-
- * mips.h (EF_MIPS_XGOT): Define.
-
-2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
-
- * s390.h: Add s390 TLS relocations.
-
-2003-01-23 Nick Clifton <nickc@redhat.com>
-
- * Add sh2e support:
-
- 2002-04-02 Alexandre Oliva <aoliva@redhat.com>
-
- * sh.h (EF_SH_MERGE_MACH): Handle SH2E.
-
- 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
-
- * sh.h (EF_SH2E): New.
-
-2003-01-23 Alan Modra <amodra@bigpond.net.au>
-
- * sh.h: Split out various bits to bfd/elf32-sh64.h.
-
-2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
-
- * s390.h: Rename R_390_GOTOFF to R_390_GOTOFF32. Add new gotoff,
- gotplt and pltoff relocations.
-
-2003-01-17 Alan Modra <amodra@bigpond.net.au>
-
- * common.h: Formatting, typo fixes.
- (DT_ENCODING): Correct value.
-
-2003-01-17 Fabio Alemagna <falemagn@aros.org>
-
- * common.h (ELFOSABI_AROS): Define.
- (ELFOSABI_OPENVMS): Likewise.
- (ELFOSABI_NSK): Likewise.
-
-2003-01-16 Alan Modra <amodra@bigpond.net.au>
-
- * ppc.h: Split out ppc64 definitions to..
- * pcc64.h: ..here. New file.
- (R_PPC64_REL30): Rename from R_PPC64_ADDR30.
-
-2003-01-13 Dmitry Diky <diwil@mail.ru>
-
- * elf/common.h (EM_MSP430): Change e_machine value to officially
- assigned.
-
-2003-01-02 Ben Elliston <bje@redhat.com>
-
- * common.h (EM_IQ2000): Define.
- * iq2000.h: New file.
-
-2002-12-30 Chris Demetriou <cgd@broadcom.com>
-
- * mips.h (E_MIPS_ARCH_32R2): New define.
-
-2002-12-24 Dmitry Diky <diwil@mail.ru>
-
- * common.h: Define msp430 machine numbers.
- * msp430.h: New file. Define msp430 relocs.
-
-2002-12-20 DJ Delorie <dj@redhat.com>
-
- * xstormy16.h: Add XSTORMY16_12.
-
-2002-12-16 Andrew MacLeod <amacleod@redhat.com>
-
- * xstormy16.h (START_RELOC_NUMBERS) Add relocation numbers
- for R_XSTORMY16_LO16 and R_XSTORMY16_HI16.
-
-2002-12-10 James Cownie <jcownie@etnus.com>
-
- * dwarf2.h (DW_TAG_upc_shared_type, DW_TAG_upc_strict_type,
- DW_TAG_upc_relaxed_type, DW_AT_upc_threads_scaled, DW_LANG_Upc):
- Define.
-
-2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
-
- * m68hc11.h (EF_M68HC12_MACH, EF_M68HCS12_MACH): Define.
- (EF_M68HC11_MACH_MASK, EF_M68HC11_MACH): Define.
- (EF_M68HC11_MERGE_MACH, EF_M68HC11_CAN_MERGE_MACH): Define.
-
-2002-11-30 Alan Modra <amodra@bigpond.net.au>
-
- * mmix.h: Replace boolean with bfd_boolean.
- * sh.h: Likewise.
-
-2002-11-28 Alan Modra <amodra@bigpond.net.au>
-
- * internal.h (elf32_internal_ehdr, Elf32_Internal_Ehdr,
- elf64_internal_ehdr, Elf64_Internal_Ehdr, elf32_internal_phdr,
- Elf32_Internal_Phdr, elf64_internal_phdr, Elf64_Internal_Phdr,
- elf32_internal_shdr, Elf32_Internal_Shdr, elf64_internal_shdr,
- Elf64_Internal_Shdr, elf32_internal_sym, elf64_internal_sym,
- Elf32_Internal_Sym, Elf64_Internal_Sym, Elf32_Internal_Note,
- elf32_internal_note, elf32_internal_rel, Elf32_Internal_Rel,
- elf64_internal_rel, Elf64_Internal_Rel, elf32_internal_rela,
- elf64_internal_rela, Elf32_Internal_Rela, Elf64_Internal_Rela,
- elf32_internal_dyn, elf64_internal_dyn, Elf32_Internal_Dyn,
- Elf64_Internal_Dyn, elf32_internal_verdef, elf64_internal_verdef,
- elf32_internal_verdaux, elf64_internal_verdaux, elf32_internal_verneed,
- elf64_internal_verneed, elf32_internal_vernaux, elf64_internal_vernaux,
- elf32_internal_versym, elf64_internal_versym, Elf32_Internal_Verdef,
- Elf64_Internal_Verdef, Elf32_Internal_Verdaux, Elf64_Internal_Verdaux,
- Elf32_Internal_Verneed, Elf64_Internal_Verneed, Elf32_Internal_Vernaux,
- Elf64_Internal_Vernaux, Elf32_Internal_Versym, Elf64_Internal_Versym,
- Elf32_Internal_Syminfo, Elf64_Internal_Syminfo): Delete.
- (Elf_Internal_Rel): Delete.
-
-2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
-
- * sh.h: Add SH TLS relocs.
-
-2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
- Ken Raeburn <raeburn@cygnus.com>
- Aldy Hernandez <aldyh@redhat.com>
- Eric Christopher <echristo@redhat.com>
- Richard Sandiford <rsandifo@redhat.com>
-
- * mips.h (E_MIPS_MACH_4120, E_MIPS_MACH_5400, E_MIPS_MACH_5500): New.
-
-2002-09-12 Roland McGrath <roland@redhat.com>
-
- * dwarf2.h: Updates from GCC version of thie file:
- (enum dwarf_location_atom): DW_OP_calli -> DW_OP_call_ref.
- Add DW_OP_GNU_push_tls_address.
- (DW_OP_lo_user): Change to 0xe0.
-
-2002-08-28 Catherine Moore <clm@redhat.com>
-
- * v850.h (R_V850_LONGCALL, R_V850_ALIGN,
- R_V850_LONGJUMP): New relocations.
-
-2002-08-15 Alan Modra <amodra@bigpond.net.au>
-
- * i370.h: Define relocs using reloc-macros.h.
-
-2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
-
- * m68hc11.h (E_M68HC12_BANKS, E_M68HC11_I32, E_M68HC11_F64,
- EF_M68HC11_ABI): Define for ABI specification.
- (STO_M68HC12_FAR, STO_M68HC12_INTERRUPT): Symbol flags for
- linker and debugger.
- (R_M68HC11_24, R_M68HC11_LO16, R_M68HC11_PAGE): New relocs.
- (R_M68HC11_RL_JUMP, R_M68HC11_RL_GROUP): New reloc for linker
- relaxation.
-
-2002-07-15 Denis Chertykov <denisc@overta.ru>
- Frank Ch. Eigler <fche@redhat.com>
- Ben Elliston <bje@redhat.com>
- Alan Lehotsky <alehotsky@cygnus.com>
- John Healy <jhealy@redhat.com>
- Graham Stott <grahams@redhat.com>
- Jeff Johnston <jjohnstn@redhat.com>
-
- * common.h (EM_IP2K): New macro.
- (EM_IP2K_OLD): New macro.
- * ip2k.h: New file.
-
-2002-07-01 Matt Thomas <matt@3am-software.com>
-
- * vax.h: Rename EF_* to EF_VAX_*.
-
-2002-06-18 Dave Brolley <brolley@redhat.com>
-
- From Catherine Moore, Michael Meissner, Dave Brolley:
- * common.h (EM_CYGNUS_FRV): New macro.
- * frv.h: New file.
-
-2002-06-06 Lars Brinkhoff <lars@nocrew.org>
-
- * common.h: Change registry@sco.com to registry@caldera.com.
- (EM_PDP10, EM_PDP11): Define.
-
-2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
-
- * sh.h (_bfd_sh64_crange_qsort_cmpb, _bfd_sh64_crange_qsort_cmpl)
- (_bfd_sh64_crange_bsearch_cmpb, _bfd_sh64_crange_bsearch_cmpl): New
- prototypes.
-
-2002-06-01 Richard Henderson <rth@redhat.com>
-
- * alpha.h (LITUSE_ALPHA_ADDR, LITUSE_ALPHA_BASE, LITUSE_ALPHA_BYTOFF,
- LITUSE_ALPHA_JSR, LITUSE_ALPHA_TLSGD, LITUSE_ALPHA_TLSLDM): New.
-
-2002-05-30 Richard Henderson <rth@redhat.com>
-
- * alpha.h (R_ALPHA_TLSGD, R_ALPHA_TLSLDM, R_ALPHA_DTPMOD64,
- R_ALPHA_GOTDTPREL, R_ALPHA_DTPREL64, R_ALPHA_DTPRELHI,
- R_ALPHA_DTPRELLO, R_ALPHA_DTPREL16, R_ALPHA_GOTTPREL, R_ALPHA_TPREL64,
- R_ALPHA_TPRELHI, R_ALPHA_TPRELLO, R_ALPHA_TPREL16): New.
-
-2002-05-29 Matt Thomas <matt@3am-software.com>
-
- * vax.h: New file
-
-2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
-
- * common.h (EM_DLX): Define.
- * dlx.h: New file.
-
-2002-05-08 Jason Thorpe <thorpej@wasabisystems.com>
-
- * common.h (NT_GNU_ABI_TAG): Define.
- (GNU_ABI_TAG_LINUX): Define.
- (GNU_ABI_TAG_HURD): Define.
- (GNU_ABI_TAG_SOLARIS): Define.
- (NT_NETBSD_IDENT): Define.
- (NT_FREEBSD_ABI_TAG): Define.
-
-2002-04-24 Elena Zannoni <ezannoni@redhat.com>
-
- * dwarf2.h: Add DW_AT_GNU_vector.
-
-2002-02-13 Matt Fredette <fredette@netbsd.org>
-
- * m68k.h (EF_M68000): Define.
-
-2002-02-12 Alan Modra <amodra@bigpond.net.au>
-
- * ppc.h (DT_PPC64_OPD, DT_PPC64_OPDSZ): Define.
-
-2002-02-09 Richard Henderson <rth@redhat.com>
-
- * alpha.h (R_ALPHA_BRSGP): New.
-
-2002-02-08 Alexandre Oliva <aoliva@redhat.com>
-
- Contribute sh64-elf.
- 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
- * sh.h (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
- R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
- R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
- R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
- R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
- R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
- R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
- R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8,
- R_SH_GOTPLT10BY8, R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64,
- R_SH_RELATIVE64): New relocs.
- (R_SH_FIRST_INVALID_RELOC_4): Adjust.
- 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
- * sh.h: Renumbered and renamed some SH5 relocations to match
- official numbers and names; moved unmaching ones to the range
- 0xf2-0xff.
- 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
- * sh.h (sh64_get_contents_type): Declare.
- (sh64_address_is_shmedia): Likewise.
- 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
- * sh.h (sh64_elf_crange): New type.
- (struct sh64_section_data): New.
- (sh64_elf_section_data): New macro.
- (EF_SH5): Rename back from EF_SH64.
- 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
- * sh.h (SHF_SH5_ISA32_MIXED, SHT_SH5_CR_SORTED,
- SH64_CRANGES_SECTION_NAME, SH64_CRANGE_SIZE,
- SH64_CRANGE_CR_ADDR_OFFSET, SH64_CRANGE_CR_SIZE_OFFSET,
- SH64_CRANGE_CR_TYPE_OFFSET): New macros.
- 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
- * sh.h (EF_SH64): Don't define EF_SH64_ABI64.
- 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
- * sh.h (EF_SH64_32BIT_ABI, EF_SH64_64BIT_ABI): Delete.
- (EF_SH64_ABI64): New.
- 2000-11-23 Hans-Peter Nilsson <hpn@cygnus.com>
- * sh.h (EF_SH64): Rename from EF_SH5.
- (EF_SH64_32BIT_ABI): New.
- (EF_SH64_64BIT_ABI): New.
- (R_SH_PT_16, R_SH_SHMEDIA_CODE
- R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
- R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
- R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
- R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
- R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL): New
- relocs.
- 2000-09-01 Ben Elliston <bje@redhat.com>
- * sh.h (EF_SH5): Define.
-
-2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
-
- * mmix.h: Tweak comments.
- (MMIX_LD_ALLOCATED_REG_CONTENTS_SECTION_NAME): New.
- [BFD_ARCH_SIZE] (_bfd_mmix_prepare_linker_allocated_gregs,
- _bfd_mmix_finalize_linker_allocated_gregs,
- _bfd_mmix_check_all_relocs): Provide prototypes.
-
-2002-01-31 Ivan Guzvinec <ivang@opencores.org>
-
- * or32.h: New file.
- * common.h: Add support for or32 targets.
-
-2002-01-28 Jason Merrill <jason@redhat.com>
-
- * dwarf2.h: Sync with gcc version.
-
-2002-01-16 Alan Modra <amodra@bigpond.net.au>
-
- * ppc.h (DT_PPC64_GLINK): Define.
-
-2002-01-15 Richard Earnshaw <rearnsha@arm.com>
-
- * arm.h (F_VFP_FLOAT, EF_ARM_VFP_FLOAT): Define.
-
-2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
-
- * common.h: Update copyright years.
- (NT_NETBSDCORE_PROCINFO): Define.
- (NT_NETBSDCORE_FIRSTMACH): Define.
-
-2002-01-06 Steve Ellcey <sje@cup.hp.com>
-
- * ia64.h (ELF_STRING_ia64_unwind_hdr): New Macro for HP-UX.
- (SHT_IA_64_HP_OPT_ANOT): Ditto
- (PT_IA_64_HP_OPT_ANOT): Ditto
- (PT_IA_64_HP_HSL_ANOT): Ditto
- (PT_IA_64_HP_STACK): Ditto
- (SHN_IA_64_ANSI_COMMON): Ditto
-
-2001-12-17 Alan Modra <amodra@bigpond.net.au>
-
- * external.h (Elf_External_Sym_Shndx): Declare.
- * internal.h (struct elf_internal_sym <st_shndx>): Make it an
- unsigned int.
- * common.h (SHN_BAD): Define.
-
-2001-12-13 Jakub Jelinek <jakub@redhat.com>
-
- * common.h (PT_GNU_EH_FRAME): Define.
-
-2001-12-11 Alan Modra <amodra@bigpond.net.au>
-
- * common.h (SHN_XINDEX): Comment typo fix.
- * internal.h (Elf_Internal_Ehdr): Change existing "unsigned short"
- size, count and index fields to "unsigned int".
-
-2001-12-07 Geoffrey Keating <geoffk@redhat.com>
- Richard Henderson <rth@redhat.com>
-
- * common.h (EM_XSTORMY16): Define.
- * xstormy16.h: New file.
-
-2001-11-15 Alan Modra <amodra@bigpond.net.au>
-
- * common.h (NT_ARCH): Define. Remove incorrect comment.
-
-2001-11-11 Geoffrey Keating <geoffk@redhat.com>
-
- * dwarf2.h (dwarf_line_number_ops): Add DWARF 3 opcodes.
-
-2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
-
- * mmix.h: New file.
-
-2001-10-23 Alan Modra <amodra@bigpond.net.au>
-
- * internal.h: White space changes to keep lines under 80 chars.
-
-2001-10-16 Jeff Holcomb <jeffh@redhat.com>
-
- * internal.h (elf_internal_shdr): Make contents a unsigned char *.
-
-2001-09-18 Alan Modra <amodra@bigpond.net.au>
-
- * internal.h (elf_internal_rela): Make r_addend a bfd_vma.
-
-2001-09-13 Alexandre Oliva <aoliva@redhat.com>
-
- * common.h (EM_OPENRISC_OLD): Renamed the old EM_OPENRISC entry.
-
-2001-09-12 Alexandre Oliva <aoliva@redhat.com>
-
- * common.h (EM_AVR_OLD): Renamed from...
- (EM_AVR): this, redefined as in the current ELF standard.
- (EM_PJ_OLD): Renamed from...
- (EM_PJ): this, redefined as in the current ELF standard.
- (EM_R30, EM_D10V, EM_D30V, EM_V850, EM_M32R, EM_MN10300,
- EM_MN10200, EM_OPENRISC, EM_ARC_A5, EM_XTENSA): Defined as in
- the current ELF standard.
- (EM_CYGNUS_ARC): Removed, unused for a long time.
-
-2001-09-04 Richard Henderson <rth@redhat.com>
-
- * alpha.h (R_ALPHA_OP*, R_ALPHA_IMMED*, R_ALPHA_GPVALUE): Remove.
- (R_ALPHA_GPREL16): Rename from R_ALPHA_IMMED_GP_16.
-
-2001-08-30 Eric Christopher <echristo@redhat.com>
-
- * mips.h: Remove E_MIPS_MACH_MIPS32_4K.
-
-2001-08-29 Jeff Law <law@redhat.com>
-
- * h8.h (EF_H8_MACH): New mask for encoded machine type.
- (E_H8_MACH_H8300, E_H8_MACH_H8300H, E_H8_MACH_H8300S): New
- machine types.
-
-2001-08-26 J"orn Rennecke <amylaar@redhat.com>
-
- * h8.h: New file.
-
-2001-08-27 Staffan Ulfberg <staffanu@swox.se>
-
- * ppc.h: Add relocs from the 64-bit PowerPC ELF ABI revision 1.2.
-
-2001-06-30 Daniel Berlin <dan@cgsoftware.com>
-
- * dwarf2.h: Remerge with gcc version,
- including all new DWARF 2.1 extensions.
-
-2001-06-29 James Cownie <jcownie@etnus.com>
-
- * dwarf2.h: Add DWARF 2.1 attribues.
-
-2001-06-15 Per Bothner <per@bothner.com>
-
- * dwarf2.h: Partial merge with gcc version.
- (enum dwarf_descrim_list): Fix typo -> dwarf_discrim_list.
- (DW_LANG_Java): Use value from dwarf 2.1 draft (also used in gcc).
-
-2001-05-15 Ralf Baechle <ralf@gnu.org>
-
- * common.h: Remove definition of EM_MIPS_RS4_BE. The constant was
- never in active use and is used otherwise by the ABI.
-
-2001-05-11 Jakub Jelinek <jakub@redhat.com>
-
- * ia64.h (ELF_STRING_ia64_unwind_once): Define.
- (ELF_STRING_ia64_unwind_info_once): Define.
-
-2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
-
- * external.h: Fix typo.
- * mips.h: Add/Extend many comments with reference to the MIPS ELF64
- spec v. 2.4, available at e.g.
- ftp://oss.sgi.com/pub/linux/mips/doc/ABI/ELF64.ps.
- (EF_MIPS_UCODE): Define.
- (EF_MIPS_OPTIONS_FIRST): Define.
- (EF_MIPS_ARCH_ASE): Define.
- (EF_MIPS_ARCH_ASE_MDMX): Define.
- (EF_MIPS_ARCH_ASE_M16): Define.
- (SHF_MIPS_ADDR): Renamed SHF_MIPS_ADDR32.
- (SHF_MIPS_STRING): Renamed SHF_MIPS_ADDR64.
- (SHF_MIPS_NODUPES): Define.
- (ELF64_MIPS_R_SSYM): New MIPS ELF 64 relocation info access macro.
- (ELF64_MIPS_R_TYPE3): Likewise.
- (ELF64_MIPS_R_TYPE2): Likewise.
- (ELF64_MIPS_R_TYPE): Likewise.
- (OHW_R10KLDL): Define.
-
-2001-04-24 Todd Fries <todd@fries.net>
-
- * sparc.h: Fix typo.
-
-2001-04-20 Johan Rydberg <jrydberg@opencores.org>
-
- * openrisc.h: New file.
- * common.h (EM_OPENRISC): New constant.
-
-2001-04-23 Bo Thorsen <bo@suse.de>
-
- * x86-64.h: Add vtable support.
-
-2001-03-23 Nick Clifton <nickc@redhat.com>
-
- * mips.h: Remove extraneous whitespace.
-
-2001-03-22 Hans-Peter Nilsson <hp@axis.com>
-
- * cris.h: Add leading comment about PC-relative location.
- (R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
- R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
- R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL):
- New relocs.
-
-2001-02-27 Philip Blundell <pb@futuretv.com>
-
- * arm.h: Add new definitions from ARM document SWS ESPC 0003 B-01.
- (EF_PIC, et al.): Rename to EF_ARM_xx.
-
-2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
-
- * common.h: Add linux target for S/390.
- * s390.h: New file.
-
-2001-01-11 Peter Targett <peter.targett@arccores.com>
-
- * arc.h (E_ARC_MACH_ARC5, E_ARC_MACH_ARC6, E_ARC_MACH_ARC7,
- E_ARC_MACH_ARC8): New definitions for cpu types.
-
- * common.h (EM_ARC): Change comment.
-
-2000-12-12 Nick Clifton <nickc@redhat.com>
-
- * mips.h: Fix formatting.
-
-2000-12-11 Jeffrey A Law (law@cygnus.com)
-
- * hppa.h (DT_HP_*): Define relative to OLD_DT_LOOS for hpux
- compatibility.
-
-2000-10-16 Chris Demetriou <cgd@sibyte.com>
-
- * mips.h (E_MIPS_ARCH_32): New constant.
- (E_MIPS_MACH_MIPS32, E_MIPS_MACH_MIPS32_4K): Replace the
- former with the latter.
-
- * mips.h (E_MIPS_ARCH_5, E_MIPS_ARCH_64): New definitions.
-
- * mips.h (E_MIPS_MACH_SB1): New constant.
-
-2000-11-30 Jan Hubicka <jh@suse.cz>
-
- * common.h (EM_X86_64): New macro.
- * x86-64.h: New file.
-
-2000-11-27 Hans-Peter Nilsson <hp@axis.com>
-
- * common.h (e_machine numbers): Clarify comments to describe how
- EM_* constants are assigned. Move EM_PJ from official section to
- ad-hoc section.
- (EM_CRIS): Correct comment to match official description.
- (EM_MMIX): Ditto.
-
-2000-11-22 Nick Clifton <nickc@redhat.com>
-
- * common.h (EM_JAVELIN): New machine number.
- (EM_FIREPATH): New machine number.
- (EM_ZSP): New machine number.
- (EM_MMIX): New machine number.
- (EM_HUANY): New machine number.
- (EM_PRISM): New machine number.
- (SHT_GROUP): New section type.
- (SHT_SYMTAB_SHNDX): New section type.
- (SHF_GROUP): New section flag.
- (SHN_XINDEX): New section index.
- (GRP_COMDAT): New section group flag.
-
-2000-11-20 H.J. Lu <hjl@gnu.org>
-
- * common.h (ELFOSABI_MONTEREY): Renamed to ...
- (ELFOSABI_AIX): This.
-
-2000-11-16 Richard Henderson <rth@redhat.com>
-
- Update relocations per August psABI docs.
- * ia64.h (R_IA64_SEGBASE): Remove.
- (R_IA64_LTV*): Renumber to 0x74 to 0x77.
- (R_IA64_EPLTMSB, R_IA64_EPLTLSB): Remove.
- (R_IA64_TPREL14, R_IA64_TPREL64I): New.
- (R_IA64_DTPMOD*): New.
- (R_IA64_DTPREL*): New.
-
-2000-09-29 Hans-Peter Nilsson <hp@axis.com>
-
- * cris.h (EF_CRIS_UNDERSCORE): New.
-
-2000-09-27 Alan Modra <alan@linuxcare.com.au>
-
- * hppa.h (R_PARISC_DIR14F): Add.
-
-2000-09-14 Alexandre Oliva <aoliva@redhat.com>
-
- * sh.h (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
- R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): Change
- numbers to the range from 160 to 167.
- (R_SH_FIRST_INVALID_RELOC): Adjust.
- (R_SH_FIRST_INVALID_RELOC_2, R_SH_LAST_INVALID_RELOC_2):
- New relocs to fill in the gap.
-
-2000-09-13 Anders Norlander <anorland@acc.umu.se>
-
- * mips.h (E_MIPS_MACH_4K): New define.
-
-2000-09-05 Alan Modra <alan@linuxcare.com.au>
-
- * hppa.h: Fix a comment.
- (R_PARISC_PCREL12F): Define.
- (R_PARISC_GNU_VTENTRY): Define.
- (R_PARISC_GNU_VTINHERIT): Define.
-
-2000-09-01 Alexandre Oliva <aoliva@redhat.com>
-
- * sh.h (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
- R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New relocs.
- (R_SH_FIRST_INVALID_RELOC): Adjust.
-
-2000-08-14 Jim Wilson <wilson@cygnus.com>
-
- * ia64.h (EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP,
- EF_IA_64_NOFUNCDESC_CONS_GP, EF_IA_64_ABSOLUTE): Define.
-
-2000-08-07 Nick Clifton <nickc@cygnus.com>
-
- * ppc.h: Remove spurious CYGNUS LOCAL comments.
- * v850.h: Likewise.
-
-2000-07-22 Jason Eckhardt <jle@cygnus.com>
-
- * i860.h: New file.
- (elf_i860_reloc_type): Defined ELF32 i860 relocations.
-
-2000-07-20 Hans-Peter Nilsson <hp@axis.com>
-
- common.h (EM_CRIS): New machine number.
- cris.h: New file.
-
-2000-07-19 H.J. Lu <hjl@gnu.org>
-
- * common.h (DF_1_NODEFLIB): Renamed from DF_1_NODEPLIB.
-
-2000-07-19 H.J. Lu <hjl@gnu.org>
-
- * common.h (DT_CHECKSUM): Set to 0x6ffffdf8.
- (DTF_1_CONFEXP): It is 0x00000002 as suspected.
-
-2000-07-19 H.J. Lu <hjl@gnu.org>
-
- * common.h (DT_FEATURE): Renamed from DT_FEATURE_1.
- (DT_CONFIG): New. From Solaris 8.
- (DT_DEPAUDIT): Likewise.
- (DT_AUDIT): Likewise.
- (DT_PLTPAD): Likewise.
- (DT_MOVETAB): Likewise.
- (DF_1_NODEPLIB): Likewise.
- (DF_1_NODUMP): Likewise.
- (DF_1_CONLFAT): Likewise.
- (DT_CHECKSUM): Likewise. FIXME. Check the value on Solaris 8.
- (DTF_1_CONFEXP): Likewise.
-
-2000-07-18 H.J. Lu <hjl@gnu.org>
-
- * common.h (DT_FLAGS_1): Renamed from DT_1_FLAGS.
-
-2000-07-12 Alan Modra <alan@linuxcare.com.au>
-
- * internal.h (struct elf_internal_sym): Update comment for st_other.
-
-2000-07-10 Alan Modra <alan@linuxcare.com.au>
-
- * hppa.h: Add comments to all the relocs.
-
-2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
-
- * avr.h (E_AVR_MACH_AVR5): Define.
-
-2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
-
- * m68hc11.h: New file, definitions for the Motorola 68hc11.
-
-2000-06-06 Alan Modra <alan@linuxcare.com.au>
-
- * reloc-macros.h (START_RELOC_NUMBERS): Don't define initial dummy
- -1 valued enum.
- (RELOC_NUMBER, FAKE_RELOC, EMPTY_RELOC): Append rather than
- prepend comma.
- (END_RELOC_NUMBERS): Give macro an arg to define as last enum.
-
- * alpha.h (R_ALPHA_max): Define via END_RELOC_NUMBERS rather than
- with EMPTY_RELOC.
- * arc.h (R_ARC_max): Likewise.
- * avr.h (R_AVR_max): Likewise.
- * fr30.h (R_FR30_max): Likewise.
- * hppa.h (R_PARISC_UNIMPLEMENTED): Likewise.
- * i960.h (R_960_max): Likewise.
- * m32r.h (R_M32R_max): Likewise.
- * m68k.h (R_68K_max): Likewise.
- * mcore.h (R_MCORE_max): Likewise.
- * mn10300.h (R_MN10300_MAX): Likewise.
- * pj.h (R_PJ_max): Likewise.
- * ppc.h (R_PPC_max): Likewise.
- * sh.h (R_SH_max): Likewise.
- * sparc.h (R_SPARC_max): Likewise.
- * v850.h (R_V850_max): Likewise.
-
- * arm.h (R_ARM_max): Define via END_RELOC_NUMBERS.
- * d10v.h (R_D10V_max): Likewise.
- * d30v.h (R_D30V_max): Likewise.
- * ia64.h (R_IA64_max): Likewise.
- * mips.h (R_MIPS_maxext): Likewise.
- * mn10200.h (R_MN10200_max): Likewise.
-
- * i386.h (R_386_max): Remove old RELOC_NUMBER definition, and
- define via END_RELOC_NUMBERS.
-
-2000-06-03 Alan Modra <alan@linuxcare.com.au>
-
- * reloc-macros.h (START_RELOC_NUMBERS): Fix name clash for
- !__STDC__ case.
- (RELOC_NUMBER): Use ansi stringify if ALMOST_STDC defined.
-
-2000-05-22 Richard Henderson <rth@cygnus.com>
-
- * ia64.h (R_IA64_PCREL60B, R_IA64_PCREL21BI): New.
- (R_IA64_PCREL22, R_IA64_PCREL64I): New.
-
-2000-05-02 H.J. Lu <hjl@gnu.org>
-
- * common.h (ELFOSABI_NONE): Renamed from ELFOSABI_SYSV.
- (ELFOSABI_MODESTO): Defined.
- (ELFOSABI_OPENBSD): Likewise.
-
-2000-04-21 Richard Henderson <rth@cygnus.com>
- David Mosberger <davidm@hpl.hp.com>
-
- * ia64.h: New file.
-
-2000-04-14 H.J. Lu <hjl@gnu.org>
-
- * common.h (ELFOSABI_TRUE64): Renamed to ELFOSABI_TRU64.
-
-2000-04-14 H.J. Lu <hjl@gnu.org>
-
- * common.h (ELFOSABI_NETBSD): Defined.
- (ELFOSABI_HURD): Likewise.
- (ELFOSABI_SOLARIS): Likewise.
- (ELFOSABI_MONTEREY): Likewise.
- (ELFOSABI_IRIX): Likewise.
- (ELFOSABI_FREEBSD): Likewise.
- (ELFOSABI_TRUE64): Likewise.
-
-2000-04-07 Nick Clifton <nickc@cygnus.com>
-
- * arm-oabi.h: Delete.
- * arm.h: Merge in definitions of old reloc numbers from
- arm-oabi.h.
-
-2000-04-06 Nick Clifton <nickc@cygnus.com>
-
- * arm.h (EF_ARM_SYMSARESORTED): Define.
- (EF_ARM_EABIMASK): Define.
- (EF_ARM_EABI_VERSION): Define.
- (EF_ARM_EABI_UNKNOWN): Define.
- (EF_ARM_EABI_VER1): Define.
- (PF_ARM_PI): Define.
- (PF_ARM_ABS): Define.
-
-2000-04-05 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * sh.h (R_SH_LOOP_START, R_SH_LOOP_END): New RELOC_NUMBERs.
-
-2000-03-27 Denis Chertykov <denisc@overta.ru>
-
- * avr.h: New file. AVR ELF support for BFD.
- * common.h: Add AVR magic number.
-
-2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
-
- * mips.h: Add R_MIPS_GNU_REL_HI16, R_MIPS_GNU_REL_LO16,
- R_MIPS_GNU_REL16_S2, R_MIPS_PC64 and R_MIPS_PC32 relocation
- numbers.
-
-2000-02-23 Linas Vepstas <linas@linas.org>
-
- * i370.h: New file.
-
-2000-02-22 Nick Clifton <nickc@cygnus.com>
-
- * common.h (ELF_ST_OTHER): Remove definition.
- (ELF32_ST_OTHER): Remove definition.
- (ELF64_ST_OTHER): Remove definition.
-
-2000-02-22 H.J. Lu <hjl@gnu.org>
-
- * common.h (ELFOSABI_LINUX): Define.
-
-2000-02-17 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * sh.h: (EF_SH_MACH_MASK, EF_SH_UNKNOWN, EF_SH1, EF_SH2): New macros.
- (EF_SH3, EF_SH_HAS_DSP, EF_SH_DSP, EF_SH3_DSP): Likewise.
- (EF_SH_HAS_FP, EF_SH3E, EF_SH4, EF_SH_MERGE_MACH): Likewise.
-
-2000-02-03 H.J. Lu <hjl@gnu.org>
-
- * arm-oabi.h: Duplicate changes made to arm.h on Jan. 27,
- 2000 by Thomas de Lellis <tdel@windriver.com>.
-
-2000-01-27 Thomas de Lellis <tdel@windriver.com>
-
- * arm.h (STT_ARM_TFUNC): Define in terms of STT_LOPROC.
- (STT_ARM_16BIT): New flag. Denotes a label that was defined in
- Thumb block but was does not identify a function.
-
-2000-01-20 Nick Clifton <nickc@cygnus.com>
-
- * common.h (EM_MCORE): Fix spelling of Motorola.
- * mcore.h (EM_MCORE): Fix spelling of Motorola.
-
-2000-01-13 Nick Clifton <nickc@cygnus.com>
-
- * common.h (EM_S370): Change comment - this is now the IBM
- System/370.
- (EM_IA_64): Change comment - this is now the IA-64.
-
-2000-01-11 Nick Clifton <nickc@cygnus.com>
-
- * common.h (DT_ENCODING): Fix definition of this value.
- (DT_LOOS): Fix definition of this value.
- (DT_HIOS): Fix definition of this value.
- (OLD_DT_LOOS): Value of DT_LOOS before Oct 4, 1999 draft
- of ELF spec changed it.
- (OLD_DT_HIOS): Value of DT_HIOS before Oct 4, 1999 draft
- of ELF spec changed it.
-
-2000-01-10 Egor Duda <deo@logos-m.ru>
-
- * common.h (NT_WIN32PSTATUS): Define. (cygwin elf core dumps).
-
-1999-12-28 Nick Clifton <nickc@cygnus.com>
-
- * mips.h (STO_*): Redefine in terms of STV_* values now in
- common.h.
-
-1999-12-27 Nick Clifton <nickc@cygnus.com>
-
- * common.h: Upgrade to match Oct4, 1999 Draft ELF ABI Spec.
- (EM_MIPS_RS3_LE): New machine number.
- (EM_RCE): New machine number.
- (EM_MMA): New machine number.
- (EM_PCP): New machine number.
- (EM_NCPU): New machine number.
- (EM_NDR1): New machine number.
- (EM_STARCORE): New machine number.
- (EM_ME16): New machine number.
- (EM_ST100): New machine number.
- (EM_TINYJ): New machine number.
- (EM_FX66): New machine number.
- (EM_ST9PLUS): New machine number.
- (EM_ST7): New machine number.
- (EM_68HC16): New machine number.
- (EM_68HC11): New machine number.
- (EM_68HC08): New machine number.
- (EM_68HC05): New machine number.
- (EM_SVX): New machine number.
- (EM_VAX): New machine number.
- (PF_MASKOS): Change value.
- (SHT_INIT_ARRAY): New value for sh_type field.
- (SHT_FINI_ARRAY): New value for sh_type field.
- (SHT_PREINIT_ARRAY): New value for sh_type field.
- (SHT_HIUSER): Change value.
- (SHF_MERGE): New valye for sh_flags field.
- (SHF_STRINGS): New valye for sh_flags field.
- (SHF_INFO_LINK): New valye for sh_flags field.
- (SHF_OS_NONCONFORMING): New valye for sh_flags field.
- (SHF_MASKOS): Change value.
- (ELF_ST_VISIBILITY): New macro.
- (ELF_ST_OTHER): New macro.
- (STT_COMMON): New symbol type.
- (STV_DEFAULT): Value for symbol visibility.
- (STV_INTERNAL): Value for symbol visibility.
- (STV_HIDDEN): Value for symbol visibility.
- (STV_PROTECTED): Value for symbol visibility.
- (DT_RUNPATH): New dynamic section tag.
- (DT_FLAGS): New dynamic section tag.
- (DT_ENCODING): New dynamic section tag.
- (DT_PREINIT_ARRAY): New dynamic section tag.
- (DT_PREINIT_ARRAYSZ): New dynamic section tag.
- (DT_LOPROC): New dynamic section tag index.
- (DT_HIPROC): New dynamic section tag index.
- (DF_ORIGIN): Value for dynamic section flag.
- (DF_SYMBOLIC): Value for dynamic section flag.
- (DF_TEXTREL): Value for dynamic section flag.
- (DF_BIND_NOW): Value for dynamic section flag.
-
-1999-12-09 Fred Fish <fnf@cygnus.com>
-
- * i960.h (reloc-macros.h): Include using relative dir elf/.
- * i386.h (reloc-macros.h): Include using relative dir elf/.
- * hppa.h (reloc-macros.h): Include using relative dir elf/.
-
-1999-12-07 Jim Blandy <jimb@cygnus.com>
-
- * common.h (NT_PRXFPREG): New definition.
-
-Wed Dec 1 03:02:15 1999 Jeffrey A Law (law@cygnus.com)
-
- * mn10300.h (E_MN10300_MACH_AM33): Define.
-
-Mon Oct 11 22:42:37 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa.h (PF_HP_PAGE_SIZE): Define.
- (PF_HP_FAR_SHARED, PF_HP_NEAR_SHARED, PF_HP_CODE): Likewise.
- (PF_HP_MODIFY, PF_HP_LAZYSWAP, PF_HP_SBP): Likewise.
-
-Mon Oct 4 17:42:38 1999 Doug Evans <devans@canuck.cygnus.com>
-
- * m32r.h (E_M32RX_ARCH): Define.
-
-1999-09-15 Ulrich Drepper <drepper@cygnus.com>
-
- * hppa.h: Add DT_HP_GST_SIZE, DT_HP_GST_VERSION, and DT_HP_GST_HASHVAL.
-
-1999-09-04 Steve Chamberlain <sac@pobox.com>
-
- * pj.h: New file.
- * common.h (EM_PJ): Define.
-
-1999-09-02 Ulrich Drepper <drepper@cygnus.com>
-
- * hppa.h: Add HPUX specific symbol type definitions.
-
- * hppa.h: Add HPUX specific dynamic and program header table
- specific definitions.
-
-1999-08-31 Scott Bambrough <scottb@netwinder.org>
-
- * common.h (NT_TASKSTRUCT): Define.
-
-1999-07-16 Jakub Jelinek <jj@ultra.linux.cz>
-
- * sparc.h (EF_SPARC_SUN_US3): Define in Cheetah extensions
- flag (as per SCD2.4.1).
-
-1999-07-16 Jakub Jelinek <jj@ultra.linux.cz>
-
- * sparc.h (ELF64_R_TYPE_DATA): Only use ELF64_R_TYPE bits, not
- ELF64_R_SYM bits.
-
-1999-06-21 Philip Blundell <pb@nexus.co.uk>
-
- * arm.h (EF_SOFT_FLOAT, F_SOFT_FLOAT): Define.
-
-1999-07-13 Andreas Schwab <schwab@suse.de>
-
- * m68k.h (EF_CPU32): Move definition inside multiple inclusion
- guard.
-
-1999-07-08 Richard Henderson <rth@cygnus.com>
-
- * sparc.h (ELF64_R_TYPE_DATA): Sign extend the value.
- (ELF64_R_TYPE_INFO): Mask out all but low 24 bits of data.
- (DT_SPARC_PLTFMT): Delete.
- Based on a patch from Jakub Jelinek.
-
-Mon Jun 21 16:36:02 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa.h (elf_hppa_reloc_type): Renamed from elf32_hppa_reloc_type.
-
-1999-06-10 Jakub Jelinek <jj@ultra.linux.cz>
-
- * sparc.h (R_SPARC_max_std): Define.
-
-Wed Jun 9 15:16:34 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa.h: Update with various changes from newest PA ELF
- specifications.
-
-1999-06-03 Ian Lance Taylor <ian@zembu.com>
-
- * common.h (EM_PPC64): Define.
-
-1999-06-02 Stu Grossman <grossman@babylon-5.cygnus.com>
-
- * dwarf.h: Add LANG_JAVA.
- * dwarf2.h: Add DW_LANG_Java.
-
-1999-05-29 Nick Clifton <nickc@cygnus.com>
-
- * common.h (ELFOSABI_ARM): Define.
-
-1999-05-28 Nick Clifton <nickc@cygnus.com>
-
- * reloc-macros.h: Update comment.
-
-1999-05-28 Ian Lance Taylor <ian@zembu.com>
-
- * i960.h: New file.
-
-1999-05-16 Nick Clifton <nickc@cygnus.com>
-
- * mcore.h (R_MCORE_COPY): Define.
- (R_MCORE_GLOB_DAT): Define.
- (R_MCORE_JUMP_SLOT): Define.
-
-1999-05-15 Nick Clifton <nickc@cygnus.com>
-
- * mcore.h (R_MCORE_RELATIVE): Define.
-
-1999-05-05 Catherine Moore <clm@cygnus.com>
-
- * m68k.h (EF_CPU32): Define.
-
-1999-04-21 Nick Clifton <nickc@cygnus.com>
-
- * reloc-macros.h (START_RELOC_NUMBERS): Prepend an underscore to
- fake reloc entry name (if possible), in order to avoid conflicts
- with typedefs of the same name.
-
-1999-04-16 Gavin Romig-Koch <gavin@cygnus.com>
-
- * mips.h (EF_MIPS_32BITMODE): New.
-
-1999-04-08 Nick Clifton <nickc@cygnus.com>
-
- * mcore.h: New header file. Defines for Motorola's MCore
- processor.
-
-1999-04-08 Nick Clifton <nickc@cygnus.com>
-
- * common.h: Add new constants defined in: "System V Application
- Binary Interface - DRAFT - April 29, 1998" found at the web site:
- http://www.sco.com/developer/gabi/contents.html
-
- (EM_MMA): Removed. Replaced with EM_MCORE as Motorolla own this
- value.
-
-1999-03-31 Nick Clifton <nickc@cygnus.com>
-
- * reloc-macros.h: Fixed to not generate an enum with a trailing
- comma.
-
-1999-03-16 Gavin Romig-Koch <gavin@cygnus.com>
-
- * mips.h (E_MIPS_MACH_5000): New.
-
-1999-03-10 Ulrich Drepper <drepper@cygnus.com>
-
- * common.h: Add definitions for a few more Solaris ELF extensions.
-
-Thu Feb 18 18:58:26 1999 Ian Lance Taylor <ian@cygnus.com>
-
- * external.h: Only use attribute if __GNUC__ is defined.
-
-1999-02-17 Nick Clifton <nickc@cygnus.com>
-
- Patch submitted by: Scott Bambrough <scottb@corelcomputer.com>
-
- * external.h: struct Elf_External_Versym must be packed on
- ARM. Code uses sizeof(Elf_External_Versym) and assumes it is
- equal to sizeof(char[2]). Reported by Jim Pick <jim@jimpick.com>
-
-1999-02-02 Nick Clifton <nickc@cygnus.com>
-
- * dwarf2.h (DWARF2_External_ARange): New structure.
- (DWARF2_Internal_ARange): New structure.
-
-Mon Feb 1 11:33:56 1999 Catherine Moore <clm@cygnus.com>
-
- * arm.h: Renumber relocs to conform to standard.
- (EF_NEW_ABI): Define.
- (EF_OLD_ABI): Define.
- * arm-oabi.h: New file.
-
-1999-01-28 Nick Clifton <nickc@cygnus.com>
-
- * fr30.h: Add R_FR30_GNU_VT{INHERIT,ENTRY} relocs.
-
-1999-01-27 Nick Clifton <nickc@cygnus.com>
-
- * dwarf2.h: Add typedefs for structures found in dwarf2 sections.
-
-1998-12-16 Gavin Romig-Koch <gavin@cygnus.com>
-
- * mips.h (E_MIPS_MACH_4111): New.
-
-1998-12-15 Gavin Romig-Koch <gavin@cygnus.com>
-
- * mips.h (EF_MIPS_ABI,E_MIPS_ABI_O32,E_MIPS_ABI_O64,
- E_MIPS_ABI_EABI32,E_MIPS_ABI_EABI64):
-
-1998-12-03 Nick Clifton <nickc@cygnus.com>
-
- * fr30.h: Add R_FR30_48 reloc.
-
-1998-12-02 Ulrich Drepper <drepper@cygnus.com>
-
- * mips.h: Add external data type for conflict section.
-
- * mips.h: Add more LL_* options from Irix 6.5.
-
- * mips.h: Add R_MIPS_JALR and adjust R_MIPS_max appropriately.
-
-Mon Nov 30 15:25:58 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * sh.h (elf_sh_reloc_type): Add R_SH_FIRST_INVALID_RELOC,
- R_SH_LAST_INVALID_RELOC, R_SH_SWITCH8 and R_SH_max.
-
-Tue Nov 10 15:12:28 1998 Nick Clifton <nickc@cygnus.com>
-
- * common.h (EM_CYGNUS_FR30): Reduce to a 16 bit value.
-
-Tue Nov 10 15:17:28 1998 Catherine Moore <clm@cygnus.com>
-
- * d10v.h: Add vtable relocs.
-
-Wed Nov 4 15:56:50 1998 Nick Clifton <nickc@cygnus.com>
-
- * common.h (EM_CYGNUS_FR30): New machine number.
-
- * fr30.h: New file: Definitions for the FR30.
-
-Fri Oct 30 11:54:15 1998 Catherine Moore <clm@cygnus.com>
-
- From Philip Blundell <pb@nexus.co.uk>:
- * arm.h (R_ARM_COPY, et al.): New relocs, used by Linux for PIC.
- (EF_ALIGN8): New flag.
-
-Tue Oct 20 11:19:50 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * common.h (NT_LWPSTATUS): Close comment accidentally left open.
-
-Mon Oct 19 20:24:11 1998 Catherine Moore <clm@cygnus.com>
-
- * sh.h: Add vtable relocs.
-
-Mon Oct 19 01:44:42 1998 Felix Lee <flee@cygnus.com>
-
- * common.h (NT_PSTATUS, NT_FPREGS, NT_PSINFO,
- NT_LWPSTATUS,NT_LWPSINFO): added.
- * internal.h (Elf_Internal_Note): new structure members.
-
-Fri Oct 16 14:11:25 1998 Catherine Moore <clm@cygnus.com>
-
- * m32r.h: Add vtable relocs.
-
-Tue Oct 6 09:22:22 1998 Catherine Moore <clm@cygnus.com>
-
- * sparc.h: Add vtable relocs.
-
-Mon Oct 5 09:39:22 1998 Catherine Moore <clm@cygnus.com>
-
- * v850.h: Add vtable relocs.
-
-Sun Oct 4 21:17:51 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * i386.h (R_386_max): Change from 252 to 24.
-
-Mon Sep 21 12:24:44 1998 Catherine Moore <clm@cygnus.com>
-
- * i386.h: Change vtable reloc numbers.
-
-Sun Sep 20 00:54:22 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * m68k.h: Add vtable relocs and R_68K_max.
-
-Tue Sep 15 09:56:49 CDT 1998 Catherine Moore <clm@cygnus.com>
-
- * arm.h: Add vtable relocs.
-
-Mon Aug 31 11:25:27 1998 Catherine Moore <clm@cygnus.com>
-
- * arm.h: Define STT_ARM_TFUNC. Remove ST_THUMB_xxxx
- definitions.
-
-Sat Aug 29 22:25:51 1998 Richard Henderson <rth@cygnus.com>
-
- * i386.h: Add vtable relocs.
-
-1998-08-25 16:42 Ulrich Drepper <drepper@cygnus.com>
-
- * common.h: Add SYMINFO_* macros to access Elf*_Syminfo information.
-
- * external.h: Add Elf_External_Syminfo definition.
-
- * internal.h: Add Elf_Internal_Syminfo, Elf32_Internal_Syminfo,
- and Elf64_Syminfo definitions.
-
-Sun Aug 9 20:26:49 CDT 1998 Catherine Moore <clm@cygnus.com>
-
- * arm.h: Add ST_THUMB definitions.
-
-Wed Aug 5 15:52:35 1998 Nick Clifton <nickc@cygnus.com>
-
- * arm.h: Add ELF header flags to specify compile time optins:
- EF_INTERWORK: New flag.
- EF_APCS_26: New flag.
- EF_APCS_FLOAT: New flag.
- EF_PIC: New flag.
-
-1998-07-31 21:28 Ulrich Drepper <drepper@cygnus.com>
-
- * mips.h: Add missing RHF_* constants.
-
-Fri Jul 31 10:01:40 1998 Catherine Moore <clm@cygnus.com>
-
- * arm.h: Add R_ARM_THM_PC9 relocation.
-
-1998-07-30 16:25 Ulrich Drepper <drepper@cygnus.com>
-
- * common.h: Add new DT_* entries and there flag macros from Solaris.
-
-Tue Jul 28 18:14:07 1998 Stan Cox <scox@equinox.cygnus.com>
-
- * sparc.h: (R_SPARC_REV32): Added for little endian data e.g. sparc 86x.
-
-Fri Jul 24 11:22:06 1998 Jeffrey A Law (law@cygnus.com)
-
- * mn10300.h: Add R_MN10300_24 relocation.
-
-1998-07-24 Ulrich Drepper <drepper@cygnus.com>
-
- * mips.h: Add MIPS64 relocation names and values.
-
-Wed Jul 22 19:29:00 Catherine Moore <clm@cygnus.com>
-
- * arm.h: Rename relocations.
-
-1998-07-22 Ulrich Drepper <drepper@cygnus.com>
-
- * ppc.h: Define enum as elf_ppc_reloc_type.
-
-Wed Jul 22 16:22:11 1998 Nick Clifton <nickc@cygnus.com>
-
- * reloc-macros.h: New file. Provides relocation macros:
- START_RELOC_NUMBERS, RELOC_NUMBER, FAKE_RELOC, EMPTY_RELOC and
- END_RELOC_NUMBERS used by other elf header files.
-
- * alpha.h: Use reloc-macros.h.
- * arc.h: Use reloc-macros.h.
- * arm.h: Use reloc-macros.h.
- * d10v.h: Use reloc-macros.h.
- * d30v.h: Use reloc-macros.h.
- * hppa.h: Use reloc-macros.h.
- * i386.h: Use reloc-macros.h.
- * m32r.h: Use reloc-macros.h.
- * m68k.h: Use reloc-macros.h.
- * mips.h: Use reloc-macros.h.
- * mn10200.h: Use reloc-macros.h.
- * mn10300.h: Use reloc-macros.h.
- * ppc.h: Use reloc-macros.h.
- * sh.h: Use reloc-macros.h.
- * sparc.h: Use reloc-macros.h.
- * v850.h: Use reloc-macros.h.
-
-1998-07-22 13:07 Ulrich Drepper <drepper@cygnus.com>
-
- * mn10300.h: Rewrite relocation definition using macros.
- * mips.h: Likewise.
- * ppc.h: Likewise.
- * alpha.h: Likewise.
- * arm.h: Likewise.
- * d10v.h: Likewise.
- * d30v.h: Likewise.
- * m32r.h: Likewise.
- * m68k.h: Likewise.
- * mn10200.h: Likewise.
- * sh.h: Likewise.
- * sparc.h: Likewise.
-
-1998-07-21 13:07 Ulrich Drepper <drepper@cygnus.com>
-
- * arm.h: New file.
- * d10v.h: New file.
- * d30v.h: New file.
- * i386.h: New file.
- * m68k.h: New file.
- * mn10200.h: New file.
- * sh.h: New file.
-
- * mips.h: Add R_MIPS_* and SHT_MIPS_* entries.
-
- * mn10300.h: Add R_MN10300_* entries.
-
- * ppc.h: Add R_PPC_* entries.
-
-1998-07-20 07:11 Ulrich Drepper <drepper@cygnus.com>
-
- * mips.h: Add ODK_*, OEX_*, OPAD_*, OHW_*, and OGP_* constants.
- Define Elf32_External_Lib.
-
-1998-07-19 15:24 Ulrich Drepper <drepper@cygnus.com>
-
- * mips.h (PT_MIPS_OPTIONS): New symbol.
- Add lots of DT_MIPS_* symbols.
-
-Fri Jun 26 10:46:35 1998 Jeffrey A Law (law@cygnus.com)
-
- * mn10300.h: New file.
-
-Thu Jun 18 19:27:56 1998 Nick Clifton <nickc@cygnus.com>
-
- * common.h (EM_960, EM_V800, EM_FR20, EM_RH32, EM_MMA,
- EM_OLD_ALPHA): Add these constants.
-
-Thu Jun 11 17:59:01 1998 Nick Clifton <nickc@cygnus.com>
-
- * common.h (EM_486, EM_S370): Add these constants.
-
-Tue Jun 9 09:35:29 1998 Nick Clifton <nickc@cygnus.com>
-
- * common.h (EM_ARM): Add this constant.
-
-Wed May 6 09:45:30 1998 Gavin Koch <gavin@cygnus.com>
-
- * mips.h (EF_MIPS_MACH,E_MIPS_MACH_*): Added.
-
-Sat Apr 25 18:35:06 1998 Richard Henderson <rth@cygnus.com>
-
- * alpha.h (STO_ALPHA_NOPV, STO_ALPHA_STD_GPLOAD): New.
-
-Wed Apr 15 15:42:45 1998 Richard Henderson <rth@cygnus.com>
-
- * common.h (EM_SPARC64): Move and rename to EM_OLD_SPARCV9.
- (EM_SPARCV9): New. This is the official ABI name and number.
-
-Sat Feb 28 17:04:41 1998 Richard Henderson <rth@cygnus.com>
-
- * alpha.h (EF_ALPHA_32BIT, EF_ALPHA_CANRELAX): New.
-
-Mon Dec 15 15:07:49 1997 Nick Clifton <nickc@cygnus.com>
-
- * m32r.h (EF_M32R_ARCH, E_M32R_ARCH): New flags to
- specify machine architecture.
-
-Fri Dec 5 11:20:08 1997 Nick Clifton <nickc@cygnus.com>
-
- * v850.h: New constants: SHN_V850_SCOMMON, SHN_V850_TCOMMON,
- SHN_V850_ZCOMMON, SHT_V850_SCOMMON, SHT_V850_TCOMMON,
- SHT_V850_ZCOMMON to handle v850 common sections.
- enum reloc_type renamed to v850_reloc_type to avoid name
- conflict.
-
-Thu Oct 23 13:55:24 1997 Richard Henderson <rth@cygnus.com>
-
- * sparc.h (enum elf_sparc_reloc_type): Add UA64 & UA16.
-
-Thu Oct 23 00:42:04 1997 Richard Henderson <rth@dot.cygnus.com>
-
- * sparc.h (DT_SPARC_REGISTER): New macro.
- (DT_SPARC_PLTFMT): In support of old sparc64-linux .plts; will
- go away soon.
-
-Tue Sep 30 13:26:58 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc.h (EF_SPARC_HAL_R1, EF_SPARC_EXT_MASK): New macros.
- (EF_SPARCV9_{MM,TSO,PSO,RMO}): New macros.
- (SHN_BEFORE,SHN_AFTER): New macros.
- (SHF_EXCLUDE,SHF_ORDERED): New macros.
- (STT_REGISTER): New macro.
- (R_SPARC_GLOB_JMP): Deleted, but slot reserved.
- (R_SPARC_{DISP64,PLT64,HIX22,LOX10}): New relocations.
- (R_SPARC_{H44,M44,L44,REGISTER}): New relocations.
- (ELF64_R_TYPE_{DATA,ID,INFO}): New macros.
-
-Wed Sep 17 16:41:42 1997 Nick Clifton <nickc@cygnus.com>
-
- * v850.h: Add R_V850_CALLT_6_7_OFFSET and R_V850_CALLT_16_16_OFFSET.
-
-Tue Sep 16 14:16:17 1997 Nick Clifton <nickc@cygnus.com>
-
- * v850.h (reloc_type): Add R_V850_TDA_16_16_OFFSET.
-
-Wed Sep 3 15:11:14 1997 Richard Henderson <rth@cygnus.com>
-
- * mips.h: Correct typo in comment.
-
-Wed Sep 3 11:25:57 1997 Nick Clifton <nickc@cygnus.com>
-
- * v850.h (reloc_type): Remove R_V850_16_PCREL.
-
-Tue Sep 2 17:41:05 1997 Nick Clifton <nickc@cygnus.com>
-
- * common.h: Remove magic number for V850E.
- * common.h: Remove magic number for V850EA.
- * v850.h: Add new flags for e_flags field in elf header.
-
-Mon Aug 25 16:06:47 1997 Nick Clifton <nickc@cygnus.com>
-
- * common.h (EM_CYGNUS_V850E): backend magic number for v850e.
- * common.h (EM_CYGNUS_V850EA): backend magic number for v850ea.
-
-Mon Aug 18 11:05:23 1997 Nick Clifton <nickc@cygnus.com>
-
- * v850.h (reloc_type): Add 16 bit PC relative relocation.
-
-Fri Aug 15 05:10:09 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * arc.h (enum reloc): Move here from elf32-arc.c.
-
-Fri Aug 8 17:05:29 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * arc.h: New file.
- * common.h (EM_CYGNUS_ARC): Define.
-
-Mon Jun 16 14:46:12 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * internal.h (Elf_Internal_Ehdr): Change e_phoff and e_shoff from
- bfd_signed_vma to bfd_size_type, as they are not signed.
-
-Wed Mar 5 15:35:26 1997 Doug Evans <dje@seba.cygnus.com>
-
- * m32r.h (SHF_M32R_CAN_RELAX): Define.
-
-Mon Feb 24 17:49:01 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * external.h: Dump the 32/64 bit specific forms of the version
- structures, and just define them as size independent.
-
- * common.h (VERSYM_HIDDEN, VERSYM_VERSION): Define.
-
-Fri Feb 21 13:00:34 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * m32r.h (enum reloc_type): Add R_M32R_SDA16.
- (SHN_M32R_SCOMMON): Define.
-
-Wed Feb 19 15:35:31 1997 Ian Lance Taylor <ian@cygnus.com>
-
- From Eric Youngdale <eric@andante.jic.com>:
- * external.h, internal.h, common.h: Added new structures and
- definitions for ELF versions.
-
-Tue Feb 18 17:40:36 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * common.h (EM_CYGNUS_D30V): Define.
-
-Mon Jan 27 11:54:44 1997 Doug Evans <dje@seba.cygnus.com>
-
- * m32r.h (enum reloc_type): Add R_M32R_HI16_[SU]LO,R_M32R_LO16.
-
-Fri Jan 3 11:32:51 1997 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * v850.h (V850_OTHER_{TDA_BYTE,ERROR}): New bits for the st_other
- field.
- (SHN_V850_*): Remove v850 specific section indexes, which are not
- needed.
- (enum reloc_type): Move the v850 relocations here from
- elf32-v850.c
-
-Thu Jan 2 19:30:23 1997 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * v850.h: New file, provide V850 specific definitions.
-
-Tue Dec 31 14:44:32 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * common.h (DT_AUXILIARY): Define.
- (DT_FILTER): Define.
-
-Wed Dec 4 05:03:37 1996 Jason Merrill <jason@yorick.cygnus.com>
-
- * dwarf2.h: Update.
-
-Tue Nov 26 10:44:47 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * mips.h (STO_MIPS16): Define.
-
-Tue Nov 12 15:45:42 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v.h: Remove empty file.
-
-Tue Oct 8 11:31:24 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * mips.h (EF_MIPS_ABI2): Define.
-
-Thu Oct 3 10:01:40 1996 Jeffrey A Law (law@cygnus.com)
-
- * common.h: Break mn10x00 support into mn10200 and mn10300.
-
-Wed Oct 2 21:26:43 1996 Jeffrey A Law (law@cygnus.com)
-
- * common.h (EM_CYGNUS_MN10x00): Define.
-
-Mon Sep 23 09:18:04 1996 Doug Evans <dje@seba.cygnus.com>
-
- * m32r.h: New file.
-
-Fri Aug 30 17:06:21 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * common.h (EM_SH): Define.
-
-Tue Aug 20 14:47:54 1996 J.T. Conklin <jtc@hippo.cygnus.com>
-
- * common.h (EM_CYGNUS_V850): Define.
-
-Mon Aug 19 10:59:10 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * common.h (EM_CYGNUS_M32R): Define.
-
-Mon Jul 22 18:59:55 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * mips.h (SHT_MIPS_IFACE, SHT_MIPS_CONTENT): Define.
- (SHT_MIPS_SYMBOL_LIB): Define.
- (SHF_MIPS_MERGE, SHF_MIPS_ADDR32, SHF_MIPS_ADDR64): Define.
- (SHF_MIPS_NOSTRIP, SHF_MIPS_LOCAL, SHF_MIPS_NAMES): Define.
-
-Thu Jul 18 19:12:15 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * dwarf2.h: New file.
-
-Jul 18 13:20:39 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * common.h (EM_CYGNUS_D10V): Define.
- * d10v.h: New file.
-
-Fri Jun 21 12:33:24 1996 Richard Henderson <rth@tamu.edu>
-
- * alpha.h: New file.
- * common.h (EM_ALPHA): Define.
-
-Fri May 31 17:28:05 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * mips.h (Elf_External_Options, Elf_Internal_Options): Define.
- (bfd_mips_elf_swap_options_in): Declare.
- (bfd_mips_elf_swap_options_out): Declare.
- (ODK_*): Define.
- (Elf64_External_RegInfo, Elf64_Internal_RegInfo): Define.
- (bfd_mips_elf64_swap_reginfo_in): Declare.
- (bfd_mips_elf64_swap_reginfo_out): Declare.
-
-Thu May 30 12:35:57 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * mips.h (E_MIPS_ARCH_4): Define.
-
-Wed May 29 15:35:33 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * mips.h (Elf64_Mips_External_Rel): Define.
- (Elf64_Mips_Internal_Rel): Define.
- (Elf64_Mips_External_Rela, Elf64_Mips_Internal_Rela): Define.
- (RSS_*): Define.
-
-Mon Apr 22 18:26:30 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc.h (R_SPARC_[56]): Always define.
-
-Mon Feb 19 01:55:56 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * sparc.h (R_SPARC_{PLT32,HIPLT22,LOPLT10,PCPLT32,PCPLT22,
- PCPLT10,5,6}): Don't define ifdef SPARC64_OLD_RELOCS.
-
-Tue Feb 6 11:33:58 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * sparc.h (enum sparc_elf_reloc_type): Define.
-
-Wed Jan 17 09:09:16 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * common.h: Define EM_SPARC32PLUS.
- * sparc.h: New file.
-
-Thu Jan 11 16:27:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * ppc.h (SHF_EXCLUDE, SHT_ORDERED): New fields from the abi.
-
-Thu Nov 30 16:47:18 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * internal.h (struct elf_segment_map): Add includes_filehdr and
- includes_phdrs fields.
-
-Tue Nov 28 16:58:10 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * internal.h (struct elf_segment_map): Define.
-
-Tue Oct 31 15:19:36 1995 Fred Fish <fnf@cygnus.com>
-
- * common.h, dwarf.h, external.h, hppa.h, internal.h,
- mips.h, ppc.h: Protect against multiple inclusions.
-
-Thu Sep 21 13:51:58 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * ppc.h (EF_PPC_RELOCATABLE_LIB): Add new flag bit.
-
-Fri Sep 1 15:32:17 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
-
- * mips.h: Add some definitions used on Irix 5.
-
-Tue Jun 20 10:18:28 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * hppa.h (CPU_PA_RISC1_0): Protect from redefinitions.
- (CPU_PA_RISC1_1): Likewise.
-
-Wed Mar 8 18:14:37 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * ppc.h: New file for PowerPC support.
-
-Tue Feb 14 13:59:13 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * common.h (EM_PPC): Use offical value of 20, not 17.
- (EM_PPC_OLD): Define this to be the old value of EM_PPC.
-
-Tue Jan 24 09:40:59 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * common.h (EM_PPC): New macro, PowerPC machine id.
-
-Tue Jan 17 10:51:38 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * mips.h (SHT_MIPS_MSYM, SHT_MIPS_DWARF, SHT_MIPS_EVENTS): Define.
-
-Mon Oct 17 13:43:59 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * internal.h (Elf_Internal_Shdr): Remove rawdata and size fields.
- Add bfd_section field.
-
-Tue May 24 16:11:50 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h (Elf32_External_gptab): Define.
-
-Mon May 16 13:22:04 1994 Jeff Law (law@snake.cs.utah.edu)
-
- * common.h (EM_HPPA): Delete.
- (EM_PARISC): Add.
- * hppa.h: New file.
-
-Mon May 9 13:27:03 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * common.h (SHN_LORESERVE): Rename from SHN_LORESERV.
- (ELF32_R_TYPE, ELF32_R_INFO): Don't rely on size of unsigned char.
- (ELF64_R_TYPE): Don't rely on size of unsigned long.
-
-Mon Apr 25 15:53:09 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * internal.h (Elf_Internal_Shdr): Use PTR, not void *.
-
-Fri Mar 11 00:34:59 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * mips.h (SHN_MIPS_TEXT, SHN_MIPS_DATA): Define.
-
-Sat Mar 5 14:08:54 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
-
- * internal.h: Remove Elf32_*, Elf64_* typedefs. These names
- cause conflicts with system headers, e.g. link.h in gdb/solib.c.
- Combine 32- and 64-bit versions of *_Internal_Dyn.
- * common.h: Replace uses of Elf64_Word, Elf64_Xword typedefs
- by their expansion.
- * mips.h: Replace uses of Elf32_Word, Elf32_Sword, Elf32_Addr
- typedefs by their expansion. Add DT_MIPS_RLD_MAP definition.
-
-Fri Feb 18 10:39:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * common.h (EM_CYGNUS_POWERPC): Define. This may be temporary,
- depending upon how quickly I can find a real PowerPC ABI.
-
-Mon Feb 7 08:27:13 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * internal.h: Change HOST_64_BIT to BFD_HOST_64_BIT.
-
-Wed Feb 2 14:12:18 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * common.h: Add comments regarding value of EM_HPPA and how to
- pick an unofficial value.
-
-Wed Nov 17 17:14:26 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h (SHT_MIPS_OPTIONS): Define.
-
-Mon Nov 8 17:57:00 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h: Added some more MIPS ABI macro definitions.
-
-Wed Nov 3 22:07:17 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
-
- * common.h (EM_MIPS_RS4_BE): New macro.
-
-Tue Oct 12 07:28:18 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips.h: New file. MIPS ABI specific information.
-
-Mon Jun 21 13:13:43 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
-
- * internal.h: Combined 32- and 64-bit versions of all structures
- except *_Internal_Dyn. This will simply the assembler interface,
- and some bfd code.
-
-Tue May 25 02:00:16 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * external.h, internal.h, common.h: Added 64-bit versions of some
- structures and macros. Renamed old versions to put "32" in the
- name. Some are unchanged.
-
-Thu Apr 29 12:12:20 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
-
- * common.h (EM_HPPA, NT_VERSION, STN_UNDEF, DT_*): New macros.
- * external.h (Elf_External_Dyn): New type.
-
- * internal.h (Elf_Intenral_Shdr): New field `size'.
- (Elf_Internal_Dyn): New type.
-
-Tue Apr 20 16:03:45 1993 Fred Fish (fnf@cygnus.com)
-
- * dwarf.h (LANG_CHILL): Change value to one randomly picked in
- the user defined range, to reduce probability of collisions.
-
-Sun Nov 15 09:34:02 1992 Fred Fish (fnf@cygnus.com)
-
- * dwarf.h (AT_src_coords): Whitespace change only.
- * dwarf.h (AT_body_begin, AT_body_end, LANG_MODULA2):
- Add from latest gcc.
- * dwarf.h (LANG_CHILL): Add as GNU extension.
-
-Sat Aug 1 13:46:53 1992 Fred Fish (fnf@cygnus.com)
-
- * dwarf.h: Replace with current version from gcc distribution.
-
-Fri Jun 19 19:05:09 1992 John Gilmore (gnu at cygnus.com)
-
- * internal.h: Add real struct tags to all the Type_Defs, so they
- can be used in prototypes where the Type_Defs are not known.
-
-Fri Apr 3 20:58:58 1992 Mark Eichin (eichin at cygnus.com)
-
- * common.h: added ELF_R_{SYM,TYPE,INFO} for handling relocation
- info
- added EM_MIPS, and corrected value of EM_860 based on System V ABI
- manual.
-
- * external.h: added Elf_External_{Rel,Rela}.
-
- * internal.h: added Elf_Internal_{Rel,Rela}.
- added rawdata to Elf_Internal_Shdr.
-
-Sat Nov 30 20:43:59 1991 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * common.h, dwarf.h, external.h, internal.h, ChangeLog; moved from
- ../elf-<foo>
-
-
-Local Variables:
-version-control: never
-End:
diff --git a/include/elf/alpha.h b/include/elf/alpha.h
deleted file mode 100644
index e53202c..0000000
--- a/include/elf/alpha.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/* ALPHA ELF support for BFD.
- Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
-
- By Eric Youngdale, <eric@aib.com>. No processor supplement available
- for this platform.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* This file holds definitions specific to the ALPHA ELF ABI. Note
- that most of this is not actually implemented by BFD. */
-
-#ifndef _ELF_ALPHA_H
-#define _ELF_ALPHA_H
-
-/* Processor specific flags for the ELF header e_flags field. */
-
-/* All addresses must be below 2GB. */
-#define EF_ALPHA_32BIT 0x00000001
-
-/* All relocations needed for relaxation with code movement are present. */
-#define EF_ALPHA_CANRELAX 0x00000002
-
-/* Processor specific section flags. */
-
-/* This section must be in the global data area. */
-#define SHF_ALPHA_GPREL 0x10000000
-
-/* Section contains some sort of debugging information. The exact
- format is unspecified. It's probably ECOFF symbols. */
-#define SHT_ALPHA_DEBUG 0x70000001
-
-/* Section contains register usage information. */
-#define SHT_ALPHA_REGINFO 0x70000002
-
-/* A section of type SHT_MIPS_REGINFO contains the following
- structure. */
-typedef struct
-{
- /* Mask of general purpose registers used. */
- unsigned long ri_gprmask;
- /* Mask of co-processor registers used. */
- unsigned long ri_cprmask[4];
- /* GP register value for this object file. */
- long ri_gp_value;
-} Elf64_RegInfo;
-
-/* Special values for the st_other field in the symbol table. */
-
-#define STO_ALPHA_NOPV 0x80
-#define STO_ALPHA_STD_GPLOAD 0x88
-
-/* Special values for Elf64_Dyn tag. */
-#define DT_ALPHA_PLTRO DT_LOPROC
-
-#include "elf/reloc-macros.h"
-
-/* Alpha relocs. */
-START_RELOC_NUMBERS (elf_alpha_reloc_type)
- RELOC_NUMBER (R_ALPHA_NONE, 0) /* No reloc */
- RELOC_NUMBER (R_ALPHA_REFLONG, 1) /* Direct 32 bit */
- RELOC_NUMBER (R_ALPHA_REFQUAD, 2) /* Direct 64 bit */
- RELOC_NUMBER (R_ALPHA_GPREL32, 3) /* GP relative 32 bit */
- RELOC_NUMBER (R_ALPHA_LITERAL, 4) /* GP relative 16 bit w/optimization */
- RELOC_NUMBER (R_ALPHA_LITUSE, 5) /* Optimization hint for LITERAL */
- RELOC_NUMBER (R_ALPHA_GPDISP, 6) /* Add displacement to GP */
- RELOC_NUMBER (R_ALPHA_BRADDR, 7) /* PC+4 relative 23 bit shifted */
- RELOC_NUMBER (R_ALPHA_HINT, 8) /* PC+4 relative 16 bit shifted */
- RELOC_NUMBER (R_ALPHA_SREL16, 9) /* PC relative 16 bit */
- RELOC_NUMBER (R_ALPHA_SREL32, 10) /* PC relative 32 bit */
- RELOC_NUMBER (R_ALPHA_SREL64, 11) /* PC relative 64 bit */
-
- /* Skip 12 - 16; deprecated ECOFF relocs. */
-
- RELOC_NUMBER (R_ALPHA_GPRELHIGH, 17) /* GP relative 32 bit, high 16 bits */
- RELOC_NUMBER (R_ALPHA_GPRELLOW, 18) /* GP relative 32 bit, low 16 bits */
- RELOC_NUMBER (R_ALPHA_GPREL16, 19) /* GP relative 16 bit */
-
- /* Skip 20 - 23; deprecated ECOFF relocs. */
-
- /* These relocations are specific to shared libraries. */
- RELOC_NUMBER (R_ALPHA_COPY, 24) /* Copy symbol at runtime */
- RELOC_NUMBER (R_ALPHA_GLOB_DAT, 25) /* Create GOT entry */
- RELOC_NUMBER (R_ALPHA_JMP_SLOT, 26) /* Create PLT entry */
- RELOC_NUMBER (R_ALPHA_RELATIVE, 27) /* Adjust by program base */
-
- /* Like BRADDR, but assert that the source and target object file
- share the same GP value, and adjust the target address for
- STO_ALPHA_STD_GPLOAD. */
- RELOC_NUMBER (R_ALPHA_BRSGP, 28)
-
- /* Thread-Local Storage. */
- RELOC_NUMBER (R_ALPHA_TLSGD, 29)
- RELOC_NUMBER (R_ALPHA_TLSLDM, 30)
- RELOC_NUMBER (R_ALPHA_DTPMOD64, 31)
- RELOC_NUMBER (R_ALPHA_GOTDTPREL, 32)
- RELOC_NUMBER (R_ALPHA_DTPREL64, 33)
- RELOC_NUMBER (R_ALPHA_DTPRELHI, 34)
- RELOC_NUMBER (R_ALPHA_DTPRELLO, 35)
- RELOC_NUMBER (R_ALPHA_DTPREL16, 36)
- RELOC_NUMBER (R_ALPHA_GOTTPREL, 37)
- RELOC_NUMBER (R_ALPHA_TPREL64, 38)
- RELOC_NUMBER (R_ALPHA_TPRELHI, 39)
- RELOC_NUMBER (R_ALPHA_TPRELLO, 40)
- RELOC_NUMBER (R_ALPHA_TPREL16, 41)
-
-END_RELOC_NUMBERS (R_ALPHA_max)
-
-#define LITUSE_ALPHA_ADDR 0
-#define LITUSE_ALPHA_BASE 1
-#define LITUSE_ALPHA_BYTOFF 2
-#define LITUSE_ALPHA_JSR 3
-#define LITUSE_ALPHA_TLSGD 4
-#define LITUSE_ALPHA_TLSLDM 5
-#define LITUSE_ALPHA_JSRDIRECT 6
-
-#endif /* _ELF_ALPHA_H */
diff --git a/include/elf/arc.h b/include/elf/arc.h
deleted file mode 100644
index e2f4f41..0000000
--- a/include/elf/arc.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* ARC ELF support for BFD.
- Copyright 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
- Contributed by Doug Evans, (dje@cygnus.com)
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* This file holds definitions specific to the ARC ELF ABI. */
-
-#ifndef _ELF_ARC_H
-#define _ELF_ARC_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocations. */
-
-START_RELOC_NUMBERS (elf_arc_reloc_type)
- RELOC_NUMBER (R_ARC_NONE, 0)
- RELOC_NUMBER (R_ARC_32, 1)
- RELOC_NUMBER (R_ARC_B26, 2)
- RELOC_NUMBER (R_ARC_B22_PCREL, 3)
-END_RELOC_NUMBERS (R_ARC_max)
-
-/* Processor specific flags for the ELF header e_flags field. */
-
-/* Four bit ARC machine type field. */
-
-#define EF_ARC_MACH 0x0000000f
-
-/* Various CPU types. */
-
-#define E_ARC_MACH_ARC5 0
-#define E_ARC_MACH_ARC6 1
-#define E_ARC_MACH_ARC7 2
-#define E_ARC_MACH_ARC8 3
-
-/* Leave bits 0xf0 alone in case we ever have more than 16 cpu types. */
-
-/* File contains position independent code. */
-
-#define EF_ARC_PIC 0x00000100
-
-#endif /* _ELF_ARC_H */
diff --git a/include/elf/arm.h b/include/elf/arm.h
deleted file mode 100644
index ade479c..0000000
--- a/include/elf/arm.h
+++ /dev/null
@@ -1,294 +0,0 @@
-/* ARM ELF support for BFD.
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
- Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_ARM_H
-#define _ELF_ARM_H
-
-#include "elf/reloc-macros.h"
-
-/* Processor specific flags for the ELF header e_flags field. */
-#define EF_ARM_RELEXEC 0x01
-#define EF_ARM_HASENTRY 0x02
-#define EF_ARM_INTERWORK 0x04
-#define EF_ARM_APCS_26 0x08
-#define EF_ARM_APCS_FLOAT 0x10
-#define EF_ARM_PIC 0x20
-#define EF_ARM_ALIGN8 0x40 /* 8-bit structure alignment is in use. */
-#define EF_ARM_NEW_ABI 0x80
-#define EF_ARM_OLD_ABI 0x100
-#define EF_ARM_SOFT_FLOAT 0x200
-#define EF_ARM_VFP_FLOAT 0x400
-#define EF_ARM_MAVERICK_FLOAT 0x800
-
-/* Frame unwind information */
-#define PT_ARM_EXIDX (PT_LOPROC + 1)
-
-/* Other constants defined in the ARM ELF spec. version B-01. */
-#define EF_ARM_SYMSARESORTED 0x04 /* NB conflicts with EF_INTERWORK */
-#define EF_ARM_DYNSYMSUSESEGIDX 0x08 /* NB conflicts with EF_APCS26 */
-#define EF_ARM_MAPSYMSFIRST 0x10 /* NB conflicts with EF_APCS_FLOAT */
-#define EF_ARM_EABIMASK 0xFF000000
-
-/* Constants defined in AAELF. */
-#define EF_ARM_BE8 0x00800000
-#define EF_ARM_LE8 0x00400000
-
-#define EF_ARM_EABI_VERSION(flags) ((flags) & EF_ARM_EABIMASK)
-#define EF_ARM_EABI_UNKNOWN 0x00000000
-#define EF_ARM_EABI_VER1 0x01000000
-#define EF_ARM_EABI_VER2 0x02000000
-#define EF_ARM_EABI_VER3 0x03000000
-#define EF_ARM_EABI_VER4 0x04000000
-#define EF_ARM_EABI_VER5 0x05000000
-
-/* Local aliases for some flags to match names used by COFF port. */
-#define F_INTERWORK EF_ARM_INTERWORK
-#define F_APCS26 EF_ARM_APCS_26
-#define F_APCS_FLOAT EF_ARM_APCS_FLOAT
-#define F_PIC EF_ARM_PIC
-#define F_SOFT_FLOAT EF_ARM_SOFT_FLOAT
-#define F_VFP_FLOAT EF_ARM_VFP_FLOAT
-
-/* Additional symbol types for Thumb. */
-#define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */
-#define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */
-
-/* Additional section types. */
-#define SHT_ARM_EXIDX 0x70000001 /* Section holds ARM unwind info. */
-#define SHT_ARM_PREEMPTMAP 0x70000002 /* Section pre-emption details. */
-#define SHT_ARM_ATTRIBUTES 0x70000003 /* Section holds attributes. */
-
-/* ARM-specific values for sh_flags. */
-#define SHF_ENTRYSECT 0x10000000 /* Section contains an entry point. */
-#define SHF_COMDEF 0x80000000 /* Section may be multiply defined in the input to a link step. */
-
-/* ARM-specific program header flags. */
-#define PF_ARM_SB 0x10000000 /* Segment contains the location addressed by the static base. */
-#define PF_ARM_PI 0x20000000 /* Segment is position-independent. */
-#define PF_ARM_ABS 0x40000000 /* Segment must be loaded at its base address. */
-
-/* Values for the Tag_CPU_arch EABI attribute. */
-#define TAG_CPU_ARCH_PRE_V4 0
-#define TAG_CPU_ARCH_V4 1
-#define TAG_CPU_ARCH_V4T 2
-#define TAG_CPU_ARCH_V5T 3
-#define TAG_CPU_ARCH_V5TE 4
-#define TAG_CPU_ARCH_V5TEJ 5
-#define TAG_CPU_ARCH_V6 6
-#define TAG_CPU_ARCH_V6KZ 7
-#define TAG_CPU_ARCH_V6T2 8
-#define TAG_CPU_ARCH_V6K 9
-#define TAG_CPU_ARCH_V7 10
-
-/* Relocation types. */
-
-START_RELOC_NUMBERS (elf_arm_reloc_type)
-/* AAELF official names and numbers. */
- RELOC_NUMBER (R_ARM_NONE, 0)
- RELOC_NUMBER (R_ARM_PC24, 1) /* deprecated */
- RELOC_NUMBER (R_ARM_ABS32, 2)
- RELOC_NUMBER (R_ARM_REL32, 3)
- RELOC_NUMBER (R_ARM_LDR_PC_G0, 4)
- RELOC_NUMBER (R_ARM_ABS16, 5)
- RELOC_NUMBER (R_ARM_ABS12, 6)
- RELOC_NUMBER (R_ARM_THM_ABS5, 7)
- RELOC_NUMBER (R_ARM_ABS8, 8)
- RELOC_NUMBER (R_ARM_SBREL32, 9)
- RELOC_NUMBER (R_ARM_THM_CALL, 10)
- RELOC_NUMBER (R_ARM_THM_PC8, 11)
- RELOC_NUMBER (R_ARM_BREL_ADJ, 12)
- RELOC_NUMBER (R_ARM_SWI24, 13) /* obsolete */
- RELOC_NUMBER (R_ARM_THM_SWI8, 14) /* obsolete */
- RELOC_NUMBER (R_ARM_XPC25, 15) /* obsolete */
- RELOC_NUMBER (R_ARM_THM_XPC22, 16) /* obsolete */
- RELOC_NUMBER (R_ARM_TLS_DTPMOD32, 17)
- RELOC_NUMBER (R_ARM_TLS_DTPOFF32, 18)
- RELOC_NUMBER (R_ARM_TLS_TPOFF32, 19)
- RELOC_NUMBER (R_ARM_COPY, 20) /* Copy symbol at runtime. */
- RELOC_NUMBER (R_ARM_GLOB_DAT, 21) /* Create GOT entry. */
- RELOC_NUMBER (R_ARM_JUMP_SLOT, 22) /* Create PLT entry. */
- RELOC_NUMBER (R_ARM_RELATIVE, 23) /* Adjust by program base. */
- RELOC_NUMBER (R_ARM_GOTOFF32, 24) /* 32 bit offset to GOT. */
- RELOC_NUMBER (R_ARM_BASE_PREL, 25) /* 32 bit PC relative offset to GOT. */
- RELOC_NUMBER (R_ARM_GOT_BREL, 26) /* 32 bit GOT entry. */
- RELOC_NUMBER (R_ARM_PLT32, 27) /* deprecated - 32 bit PLT address. */
- RELOC_NUMBER (R_ARM_CALL, 28)
- RELOC_NUMBER (R_ARM_JUMP24, 29)
- RELOC_NUMBER (R_ARM_THM_JUMP24, 30)
- RELOC_NUMBER (R_ARM_BASE_ABS, 31)
- RELOC_NUMBER (R_ARM_ALU_PCREL7_0, 32) /* obsolete */
- RELOC_NUMBER (R_ARM_ALU_PCREL15_8, 33) /* obsolete */
- RELOC_NUMBER (R_ARM_ALU_PCREL23_15, 34) /* obsolete */
- RELOC_NUMBER (R_ARM_LDR_SBREL_11_0, 35) /* deprecated, should have _NC suffix */
- RELOC_NUMBER (R_ARM_ALU_SBREL_19_12, 36) /* deprecated, should have _NC suffix */
- RELOC_NUMBER (R_ARM_ALU_SBREL_27_20, 37) /* deprecated, should have _CK suffix */
- RELOC_NUMBER (R_ARM_TARGET1, 38)
- RELOC_NUMBER (R_ARM_SBREL31, 39) /* deprecated */
- RELOC_NUMBER (R_ARM_V4BX, 40)
- RELOC_NUMBER (R_ARM_TARGET2, 41)
- RELOC_NUMBER (R_ARM_PREL31, 42)
- RELOC_NUMBER (R_ARM_MOVW_ABS_NC, 43)
- RELOC_NUMBER (R_ARM_MOVT_ABS, 44)
- RELOC_NUMBER (R_ARM_MOVW_PREL_NC, 45)
- RELOC_NUMBER (R_ARM_MOVT_PREL, 46)
- RELOC_NUMBER (R_ARM_THM_MOVW_ABS_NC, 47)
- RELOC_NUMBER (R_ARM_THM_MOVT_ABS, 48)
- RELOC_NUMBER (R_ARM_THM_MOVW_PREL_NC, 49)
- RELOC_NUMBER (R_ARM_THM_MOVT_PREL, 50)
- RELOC_NUMBER (R_ARM_THM_JUMP19, 51)
- RELOC_NUMBER (R_ARM_THM_JUMP6, 52)
- RELOC_NUMBER (R_ARM_THM_ALU_PREL_11_0, 53)
- RELOC_NUMBER (R_ARM_THM_PC12, 54)
- RELOC_NUMBER (R_ARM_ABS32_NOI, 55)
- RELOC_NUMBER (R_ARM_REL32_NOI, 56)
- RELOC_NUMBER (R_ARM_ALU_PC_G0_NC, 57)
- RELOC_NUMBER (R_ARM_ALU_PC_G0, 58)
- RELOC_NUMBER (R_ARM_ALU_PC_G1_NC, 59)
- RELOC_NUMBER (R_ARM_ALU_PC_G1, 60)
- RELOC_NUMBER (R_ARM_ALU_PC_G2, 61)
- RELOC_NUMBER (R_ARM_LDR_PC_G1, 62)
- RELOC_NUMBER (R_ARM_LDR_PC_G2, 63)
- RELOC_NUMBER (R_ARM_LDRS_PC_G0, 64)
- RELOC_NUMBER (R_ARM_LDRS_PC_G1, 65)
- RELOC_NUMBER (R_ARM_LDRS_PC_G2, 66)
- RELOC_NUMBER (R_ARM_LDC_PC_G0, 67)
- RELOC_NUMBER (R_ARM_LDC_PC_G1, 68)
- RELOC_NUMBER (R_ARM_LDC_PC_G2, 69)
- RELOC_NUMBER (R_ARM_ALU_SB_G0_NC, 70)
- RELOC_NUMBER (R_ARM_ALU_SB_G0, 71)
- RELOC_NUMBER (R_ARM_ALU_SB_G1_NC, 72)
- RELOC_NUMBER (R_ARM_ALU_SB_G1, 73)
- RELOC_NUMBER (R_ARM_ALU_SB_G2, 74)
- RELOC_NUMBER (R_ARM_LDR_SB_G0, 75)
- RELOC_NUMBER (R_ARM_LDR_SB_G1, 76)
- RELOC_NUMBER (R_ARM_LDR_SB_G2, 77)
- RELOC_NUMBER (R_ARM_LDRS_SB_G0, 78)
- RELOC_NUMBER (R_ARM_LDRS_SB_G1, 79)
- RELOC_NUMBER (R_ARM_LDRS_SB_G2, 80)
- RELOC_NUMBER (R_ARM_LDC_SB_G0, 81)
- RELOC_NUMBER (R_ARM_LDC_SB_G1, 82)
- RELOC_NUMBER (R_ARM_LDC_SB_G2, 83)
- RELOC_NUMBER (R_ARM_MOVW_BREL_NC, 84)
- RELOC_NUMBER (R_ARM_MOVT_BREL, 85)
- RELOC_NUMBER (R_ARM_MOVW_BREL, 86)
- RELOC_NUMBER (R_ARM_THM_MOVW_BREL_NC, 87)
- RELOC_NUMBER (R_ARM_THM_MOVT_BREL, 88)
- RELOC_NUMBER (R_ARM_THM_MOVW_BREL, 89)
- /* 90-93 unallocated */
- RELOC_NUMBER (R_ARM_PLT32_ABS, 94)
- RELOC_NUMBER (R_ARM_GOT_ABS, 95)
- RELOC_NUMBER (R_ARM_GOT_PREL, 96)
- RELOC_NUMBER (R_ARM_GOT_BREL12, 97)
- RELOC_NUMBER (R_ARM_GOTOFF12, 98)
- RELOC_NUMBER (R_ARM_GOTRELAX, 99)
- RELOC_NUMBER (R_ARM_GNU_VTENTRY, 100) /* deprecated - old C++ abi */
- RELOC_NUMBER (R_ARM_GNU_VTINHERIT, 101) /* deprecated - old C++ abi */
- RELOC_NUMBER (R_ARM_THM_JUMP11, 102)
- RELOC_NUMBER (R_ARM_THM_JUMP8, 103)
- RELOC_NUMBER (R_ARM_TLS_GD32, 104)
- RELOC_NUMBER (R_ARM_TLS_LDM32, 105)
- RELOC_NUMBER (R_ARM_TLS_LDO32, 106)
- RELOC_NUMBER (R_ARM_TLS_IE32, 107)
- RELOC_NUMBER (R_ARM_TLS_LE32, 108)
- RELOC_NUMBER (R_ARM_TLS_LDO12, 109)
- RELOC_NUMBER (R_ARM_TLS_LE12, 110)
- RELOC_NUMBER (R_ARM_TLS_IE12GP, 111)
- /* 112 - 127 private range */
- RELOC_NUMBER (R_ARM_ME_TOO, 128) /* obsolete */
-
- /* Extensions? R=read-only? */
- RELOC_NUMBER (R_ARM_RXPC25, 249)
- RELOC_NUMBER (R_ARM_RSBREL32, 250)
- RELOC_NUMBER (R_ARM_THM_RPC22, 251)
- RELOC_NUMBER (R_ARM_RREL32, 252)
- RELOC_NUMBER (R_ARM_RABS32, 253)
- RELOC_NUMBER (R_ARM_RPC24, 254)
- RELOC_NUMBER (R_ARM_RBASE, 255)
-
- /* Unofficial names for some of the relocs. */
- FAKE_RELOC (R_ARM_GOTOFF, R_ARM_GOTOFF32) /* 32 bit offset to GOT. */
- FAKE_RELOC (R_ARM_THM_PC22, R_ARM_THM_CALL)
- FAKE_RELOC (R_ARM_THM_PC11, R_ARM_THM_JUMP11)
- FAKE_RELOC (R_ARM_THM_PC9, R_ARM_THM_JUMP8)
-
- /* Relocs with both a different name, and (apparently) different meaning in
- GNU usage. */
- FAKE_RELOC (R_ARM_GOTPC, R_ARM_BASE_PREL) /* 32 bit PC relative offset to GOT. */
- FAKE_RELOC (R_ARM_GOT32, R_ARM_GOT_BREL) /* 32 bit GOT entry. */
- FAKE_RELOC (R_ARM_ROSEGREL32, R_ARM_SBREL31) /* ??? */
- FAKE_RELOC (R_ARM_AMP_VCALL9, R_ARM_BREL_ADJ) /* Thumb-something. Not used. */
-
-END_RELOC_NUMBERS (R_ARM_max = 256)
-
-#ifdef BFD_ARCH_SIZE
-/* EABI object attributes. */
-
-enum
-{
- /* 0-3 are generic. */
- Tag_CPU_raw_name = 4,
- Tag_CPU_name,
- Tag_CPU_arch,
- Tag_CPU_arch_profile,
- Tag_ARM_ISA_use,
- Tag_THUMB_ISA_use,
- Tag_VFP_arch,
- Tag_WMMX_arch,
- Tag_NEON_arch,
- Tag_PCS_config,
- Tag_ABI_PCS_R9_use,
- Tag_ABI_PCS_RW_data,
- Tag_ABI_PCS_RO_data,
- Tag_ABI_PCS_GOT_use,
- Tag_ABI_PCS_wchar_t,
- Tag_ABI_FP_rounding,
- Tag_ABI_FP_denormal,
- Tag_ABI_FP_exceptions,
- Tag_ABI_FP_user_exceptions,
- Tag_ABI_FP_number_model,
- Tag_ABI_align8_needed,
- Tag_ABI_align8_preserved,
- Tag_ABI_enum_size,
- Tag_ABI_HardFP_use,
- Tag_ABI_VFP_args,
- Tag_ABI_WMMX_args,
- Tag_ABI_optimization_goals,
- Tag_ABI_FP_optimization_goals,
- /* 32 is generic. */
- Tag_undefined33 = 33,
- Tag_CPU_unaligned_access,
- Tag_undefined35,
- Tag_VFP_HP_extension,
- Tag_undefined37,
- Tag_ABI_FP_16bit_format = 38,
-};
-
-#endif
-
-/* The name of the note section used to identify arm variants. */
-#define ARM_NOTE_SECTION ".note.gnu.arm.ident"
-
-/* Special section names. */
-#define ELF_STRING_ARM_unwind ".ARM.exidx"
-#define ELF_STRING_ARM_unwind_info ".ARM.extab"
-#define ELF_STRING_ARM_unwind_once ".gnu.linkonce.armexidx."
-#define ELF_STRING_ARM_unwind_info_once ".gnu.linkonce.armextab."
-
-#endif /* _ELF_ARM_H */
diff --git a/include/elf/avr.h b/include/elf/avr.h
deleted file mode 100644
index 627dc35..0000000
--- a/include/elf/avr.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* AVR ELF support for BFD.
- Copyright 1999, 2000, 2004, 2006 Free Software Foundation, Inc.
- Contributed by Denis Chertykov <denisc@overta.ru>
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_AVR_H
-#define _ELF_AVR_H
-
-#include "elf/reloc-macros.h"
-
-/* Processor specific flags for the ELF header e_flags field. */
-#define EF_AVR_MACH 0x7F
-
-/* If bit #7 is set, it is assumed that the elf file uses local symbols
- as reference for the relocations so that linker relaxation is possible. */
-#define EF_AVR_LINKRELAX_PREPARED 0x80
-
-#define E_AVR_MACH_AVR1 1
-#define E_AVR_MACH_AVR2 2
-#define E_AVR_MACH_AVR25 25
-#define E_AVR_MACH_AVR3 3
-#define E_AVR_MACH_AVR31 31
-#define E_AVR_MACH_AVR35 35
-#define E_AVR_MACH_AVR4 4
-#define E_AVR_MACH_AVR5 5
-#define E_AVR_MACH_AVR51 51
-#define E_AVR_MACH_AVR6 6
-
-/* Relocations. */
-START_RELOC_NUMBERS (elf_avr_reloc_type)
- RELOC_NUMBER (R_AVR_NONE, 0)
- RELOC_NUMBER (R_AVR_32, 1)
- RELOC_NUMBER (R_AVR_7_PCREL, 2)
- RELOC_NUMBER (R_AVR_13_PCREL, 3)
- RELOC_NUMBER (R_AVR_16, 4)
- RELOC_NUMBER (R_AVR_16_PM, 5)
- RELOC_NUMBER (R_AVR_LO8_LDI, 6)
- RELOC_NUMBER (R_AVR_HI8_LDI, 7)
- RELOC_NUMBER (R_AVR_HH8_LDI, 8)
- RELOC_NUMBER (R_AVR_LO8_LDI_NEG, 9)
- RELOC_NUMBER (R_AVR_HI8_LDI_NEG, 10)
- RELOC_NUMBER (R_AVR_HH8_LDI_NEG, 11)
- RELOC_NUMBER (R_AVR_LO8_LDI_PM, 12)
- RELOC_NUMBER (R_AVR_HI8_LDI_PM, 13)
- RELOC_NUMBER (R_AVR_HH8_LDI_PM, 14)
- RELOC_NUMBER (R_AVR_LO8_LDI_PM_NEG, 15)
- RELOC_NUMBER (R_AVR_HI8_LDI_PM_NEG, 16)
- RELOC_NUMBER (R_AVR_HH8_LDI_PM_NEG, 17)
- RELOC_NUMBER (R_AVR_CALL, 18)
- RELOC_NUMBER (R_AVR_LDI, 19)
- RELOC_NUMBER (R_AVR_6, 20)
- RELOC_NUMBER (R_AVR_6_ADIW, 21)
- RELOC_NUMBER (R_AVR_MS8_LDI, 22)
- RELOC_NUMBER (R_AVR_MS8_LDI_NEG, 23)
- RELOC_NUMBER (R_AVR_LO8_LDI_GS, 24)
- RELOC_NUMBER (R_AVR_HI8_LDI_GS, 25)
-END_RELOC_NUMBERS (R_AVR_max)
-
-#endif /* _ELF_AVR_H */
diff --git a/include/elf/bfin.h b/include/elf/bfin.h
deleted file mode 100644
index 3c07cd1..0000000
--- a/include/elf/bfin.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/* Blackfin ELF support for BFD.
- Copyright (C) 2005 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software Foundation, Inc.,
-51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_BFIN_H
-#define _ELF_BFIN_H
-
-#include "elf/reloc-macros.h"
-
-START_RELOC_NUMBERS (elf_bfin_reloc_type)
- RELOC_NUMBER (R_unused0, 0x00) /* relocation type 0 is not defined*/
- RELOC_NUMBER (R_pcrel5m2, 0x01) /*LSETUP part a*/
- RELOC_NUMBER (R_unused1, 0x02) /* relocation type 2 is not defined*/
- RELOC_NUMBER (R_pcrel10, 0x03) /* type 3, 0x00) if cc jump <target> */
- RELOC_NUMBER (R_pcrel12_jump, 0x04) /* type 4, 0x00) jump <target> */
- RELOC_NUMBER (R_rimm16, 0x05) /* type 0x5, 0x00) rN = <target> */
- RELOC_NUMBER (R_luimm16, 0x06) /* # 0x6, 0x00) preg.l=<target> Load imm 16 to lower half */
- RELOC_NUMBER (R_huimm16, 0x07) /* # 0x7, 0x00) preg.h=<target> Load imm 16 to upper half*/
- RELOC_NUMBER (R_pcrel12_jump_s, 0x08) /* # 0x8 jump.s <target> */
- RELOC_NUMBER (R_pcrel24_jump_x, 0x09) /* # 0x9 jump.x <target> */
- RELOC_NUMBER (R_pcrel24, 0x0a) /* # 0xa call <target> , 0x00) not expandable*/
- RELOC_NUMBER (R_unusedb, 0x0b) /* # 0xb not generated */
- RELOC_NUMBER (R_unusedc, 0x0c) /* # 0xc not used */
- RELOC_NUMBER (R_pcrel24_jump_l, 0x0d) /*0xd jump.l <target>*/
- RELOC_NUMBER (R_pcrel24_call_x, 0x0e) /* 0xE, 0x00) call.x <target> if <target> is above 24 bit limit call through P1 */
- RELOC_NUMBER (R_var_eq_symb, 0x0f) /* 0xf, 0x00) linker should treat it same as 0x12 */
- RELOC_NUMBER (R_byte_data, 0x10) /* 0x10, 0x00) .byte var = symbol */
- RELOC_NUMBER (R_byte2_data, 0x11) /* 0x11, 0x00) .byte2 var = symbol */
- RELOC_NUMBER (R_byte4_data, 0x12) /* 0x12, 0x00) .byte4 var = symbol and .var var=symbol */
- RELOC_NUMBER (R_pcrel11, 0x13) /* 0x13, 0x00) lsetup part b */
- RELOC_NUMBER (R_BFIN_GOT17M4, 0x14)
- RELOC_NUMBER (R_BFIN_GOTHI, 0x15)
- RELOC_NUMBER (R_BFIN_GOTLO, 0x16)
- RELOC_NUMBER (R_BFIN_FUNCDESC, 0x17)
- RELOC_NUMBER (R_BFIN_FUNCDESC_GOT17M4, 0x18)
- RELOC_NUMBER (R_BFIN_FUNCDESC_GOTHI, 0x19)
- RELOC_NUMBER (R_BFIN_FUNCDESC_GOTLO, 0x1a)
- RELOC_NUMBER (R_BFIN_FUNCDESC_VALUE, 0x1b)
- RELOC_NUMBER (R_BFIN_FUNCDESC_GOTOFF17M4, 0x1c)
- RELOC_NUMBER (R_BFIN_FUNCDESC_GOTOFFHI, 0x1d)
- RELOC_NUMBER (R_BFIN_FUNCDESC_GOTOFFLO, 0x1e)
- RELOC_NUMBER (R_BFIN_GOTOFF17M4, 0x1f)
- RELOC_NUMBER (R_BFIN_GOTOFFHI, 0x20)
- RELOC_NUMBER (R_BFIN_GOTOFFLO, 0x21)
-
- RELOC_NUMBER (R_push, 0xE0)
- RELOC_NUMBER (R_const, 0xE1)
- RELOC_NUMBER (R_add, 0xE2)
- RELOC_NUMBER (R_sub, 0xE3)
- RELOC_NUMBER (R_mult, 0xE4)
- RELOC_NUMBER (R_div, 0xE5)
- RELOC_NUMBER (R_mod, 0xE6)
- RELOC_NUMBER (R_lshift, 0xE7)
- RELOC_NUMBER (R_rshift, 0xE8)
- RELOC_NUMBER (R_and, 0xE9)
- RELOC_NUMBER (R_or, 0xEA)
- RELOC_NUMBER (R_xor, 0xEB)
- RELOC_NUMBER (R_land, 0xEC)
- RELOC_NUMBER (R_lor, 0xED)
- RELOC_NUMBER (R_len, 0xEE)
- RELOC_NUMBER (R_neg, 0xEF)
- RELOC_NUMBER (R_comp, 0xF0)
- RELOC_NUMBER (R_page, 0xF1)
- RELOC_NUMBER (R_hwpage, 0xF2)
- RELOC_NUMBER (R_addr, 0xF3)
- RELOC_NUMBER (R_pltpc, 0x40) /* PLT gnu only relocation */
- RELOC_NUMBER (R_got, 0x41) /* GOT gnu only relocation */
- RELOC_NUMBER (R_BFIN_GNU_VTINHERIT, 0x42) /* C++, gnu only */
- RELOC_NUMBER (R_BFIN_GNU_VTENTRY, 0x43) /* C++, gnu only */
-END_RELOC_NUMBERS (R_max)
-
-/* Processor specific flags for the ELF header e_flags field. */
-#define EF_BFIN_PIC 0x00000001 /* -fpic */
-#define EF_BFIN_FDPIC 0x00000002 /* -mfdpic */
-
-#define EF_BFIN_PIC_FLAGS (EF_BFIN_PIC | EF_BFIN_FDPIC)
-#endif /* _ELF_BFIN_H */
diff --git a/include/elf/common.h b/include/elf/common.h
deleted file mode 100644
index 2424e64..0000000
--- a/include/elf/common.h
+++ /dev/null
@@ -1,831 +0,0 @@
-/* ELF support for BFD.
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
- Free Software Foundation, Inc.
-
- Written by Fred Fish @ Cygnus Support, from information published
- in "UNIX System V Release 4, Programmers Guide: ANSI C and
- Programming Support Tools".
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-
-/* This file is part of ELF support for BFD, and contains the portions
- that are common to both the internal and external representations.
- For example, ELFMAG0 is the byte 0x7F in both the internal (in-memory)
- and external (in-file) representations. */
-
-#ifndef _ELF_COMMON_H
-#define _ELF_COMMON_H
-
-/* Fields in e_ident[]. */
-
-#define EI_MAG0 0 /* File identification byte 0 index */
-#define ELFMAG0 0x7F /* Magic number byte 0 */
-
-#define EI_MAG1 1 /* File identification byte 1 index */
-#define ELFMAG1 'E' /* Magic number byte 1 */
-
-#define EI_MAG2 2 /* File identification byte 2 index */
-#define ELFMAG2 'L' /* Magic number byte 2 */
-
-#define EI_MAG3 3 /* File identification byte 3 index */
-#define ELFMAG3 'F' /* Magic number byte 3 */
-
-#define EI_CLASS 4 /* File class */
-#define ELFCLASSNONE 0 /* Invalid class */
-#define ELFCLASS32 1 /* 32-bit objects */
-#define ELFCLASS64 2 /* 64-bit objects */
-
-#define EI_DATA 5 /* Data encoding */
-#define ELFDATANONE 0 /* Invalid data encoding */
-#define ELFDATA2LSB 1 /* 2's complement, little endian */
-#define ELFDATA2MSB 2 /* 2's complement, big endian */
-
-#define EI_VERSION 6 /* File version */
-
-#define EI_OSABI 7 /* Operating System/ABI indication */
-#define ELFOSABI_NONE 0 /* UNIX System V ABI */
-#define ELFOSABI_HPUX 1 /* HP-UX operating system */
-#define ELFOSABI_NETBSD 2 /* NetBSD */
-#define ELFOSABI_LINUX 3 /* GNU/Linux */
-#define ELFOSABI_HURD 4 /* GNU/Hurd */
-#define ELFOSABI_SOLARIS 6 /* Solaris */
-#define ELFOSABI_AIX 7 /* AIX */
-#define ELFOSABI_IRIX 8 /* IRIX */
-#define ELFOSABI_FREEBSD 9 /* FreeBSD */
-#define ELFOSABI_TRU64 10 /* TRU64 UNIX */
-#define ELFOSABI_MODESTO 11 /* Novell Modesto */
-#define ELFOSABI_OPENBSD 12 /* OpenBSD */
-#define ELFOSABI_OPENVMS 13 /* OpenVMS */
-#define ELFOSABI_NSK 14 /* Hewlett-Packard Non-Stop Kernel */
-#define ELFOSABI_AROS 15 /* AROS */
-#define ELFOSABI_ARM 97 /* ARM */
-#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
-
-#define EI_ABIVERSION 8 /* ABI version */
-
-#define EI_PAD 9 /* Start of padding bytes */
-
-
-/* Values for e_type, which identifies the object file type. */
-
-#define ET_NONE 0 /* No file type */
-#define ET_REL 1 /* Relocatable file */
-#define ET_EXEC 2 /* Executable file */
-#define ET_DYN 3 /* Shared object file */
-#define ET_CORE 4 /* Core file */
-#define ET_LOOS 0xFE00 /* Operating system-specific */
-#define ET_HIOS 0xFEFF /* Operating system-specific */
-#define ET_LOPROC 0xFF00 /* Processor-specific */
-#define ET_HIPROC 0xFFFF /* Processor-specific */
-
-/* Values for e_machine, which identifies the architecture. These numbers
- are officially assigned by registry@sco.com. See below for a list of
- ad-hoc numbers used during initial development. */
-
-#define EM_NONE 0 /* No machine */
-#define EM_M32 1 /* AT&T WE 32100 */
-#define EM_SPARC 2 /* SUN SPARC */
-#define EM_386 3 /* Intel 80386 */
-#define EM_68K 4 /* Motorola m68k family */
-#define EM_88K 5 /* Motorola m88k family */
-#define EM_486 6 /* Intel 80486 *//* Reserved for future use */
-#define EM_860 7 /* Intel 80860 */
-#define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */
-#define EM_S370 9 /* IBM System/370 */
-#define EM_MIPS_RS3_LE 10 /* MIPS R3000 little-endian (Oct 4 1999 Draft) Deprecated */
-
-#define EM_PARISC 15 /* HPPA */
-
-#define EM_VPP550 17 /* Fujitsu VPP500 */
-#define EM_SPARC32PLUS 18 /* Sun's "v8plus" */
-#define EM_960 19 /* Intel 80960 */
-#define EM_PPC 20 /* PowerPC */
-#define EM_PPC64 21 /* 64-bit PowerPC */
-#define EM_S390 22 /* IBM S/390 */
-#define EM_SPU 23 /* Sony/Toshiba/IBM SPU */
-
-#define EM_V800 36 /* NEC V800 series */
-#define EM_FR20 37 /* Fujitsu FR20 */
-#define EM_RH32 38 /* TRW RH32 */
-#define EM_MCORE 39 /* Motorola M*Core */ /* May also be taken by Fujitsu MMA */
-#define EM_RCE 39 /* Old name for MCore */
-#define EM_ARM 40 /* ARM */
-#define EM_OLD_ALPHA 41 /* Digital Alpha */
-#define EM_SH 42 /* Renesas (formerly Hitachi) / SuperH SH */
-#define EM_SPARCV9 43 /* SPARC v9 64-bit */
-#define EM_TRICORE 44 /* Siemens Tricore embedded processor */
-#define EM_ARC 45 /* ARC Cores */
-#define EM_H8_300 46 /* Renesas (formerly Hitachi) H8/300 */
-#define EM_H8_300H 47 /* Renesas (formerly Hitachi) H8/300H */
-#define EM_H8S 48 /* Renesas (formerly Hitachi) H8S */
-#define EM_H8_500 49 /* Renesas (formerly Hitachi) H8/500 */
-#define EM_IA_64 50 /* Intel IA-64 Processor */
-#define EM_MIPS_X 51 /* Stanford MIPS-X */
-#define EM_COLDFIRE 52 /* Motorola Coldfire */
-#define EM_68HC12 53 /* Motorola M68HC12 */
-#define EM_MMA 54 /* Fujitsu Multimedia Accelerator */
-#define EM_PCP 55 /* Siemens PCP */
-#define EM_NCPU 56 /* Sony nCPU embedded RISC processor */
-#define EM_NDR1 57 /* Denso NDR1 microprocesspr */
-#define EM_STARCORE 58 /* Motorola Star*Core processor */
-#define EM_ME16 59 /* Toyota ME16 processor */
-#define EM_ST100 60 /* STMicroelectronics ST100 processor */
-#define EM_TINYJ 61 /* Advanced Logic Corp. TinyJ embedded processor */
-#define EM_X86_64 62 /* Advanced Micro Devices X86-64 processor */
-#define EM_PDSP 63 /* Sony DSP Processor */
-#define EM_PDP10 64 /* Digital Equipment Corp. PDP-10 */
-#define EM_PDP11 65 /* Digital Equipment Corp. PDP-11 */
-#define EM_FX66 66 /* Siemens FX66 microcontroller */
-#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 bit microcontroller */
-#define EM_ST7 68 /* STMicroelectronics ST7 8-bit microcontroller */
-#define EM_68HC16 69 /* Motorola MC68HC16 Microcontroller */
-#define EM_68HC11 70 /* Motorola MC68HC11 Microcontroller */
-#define EM_68HC08 71 /* Motorola MC68HC08 Microcontroller */
-#define EM_68HC05 72 /* Motorola MC68HC05 Microcontroller */
-#define EM_SVX 73 /* Silicon Graphics SVx */
-#define EM_ST19 74 /* STMicroelectronics ST19 8-bit cpu */
-#define EM_VAX 75 /* Digital VAX */
-#define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */
-#define EM_JAVELIN 77 /* Infineon Technologies 32-bit embedded cpu */
-#define EM_FIREPATH 78 /* Element 14 64-bit DSP processor */
-#define EM_ZSP 79 /* LSI Logic's 16-bit DSP processor */
-#define EM_MMIX 80 /* Donald Knuth's educational 64-bit processor */
-#define EM_HUANY 81 /* Harvard's machine-independent format */
-#define EM_PRISM 82 /* SiTera Prism */
-#define EM_AVR 83 /* Atmel AVR 8-bit microcontroller */
-#define EM_FR30 84 /* Fujitsu FR30 */
-#define EM_D10V 85 /* Mitsubishi D10V */
-#define EM_D30V 86 /* Mitsubishi D30V */
-#define EM_V850 87 /* NEC v850 */
-#define EM_M32R 88 /* Renesas M32R (formerly Mitsubishi M32R) */
-#define EM_MN10300 89 /* Matsushita MN10300 */
-#define EM_MN10200 90 /* Matsushita MN10200 */
-#define EM_PJ 91 /* picoJava */
-#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */
-#define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */
-#define EM_XTENSA 94 /* Tensilica Xtensa Architecture */
-#define EM_VIDEOCORE 95 /* Alphamosaic VideoCore processor */
-#define EM_TMM_GPP 96 /* Thompson Multimedia General Purpose Processor */
-#define EM_NS32K 97 /* National Semiconductor 32000 series */
-#define EM_TPC 98 /* Tenor Network TPC processor */
-#define EM_SNP1K 99 /* Trebia SNP 1000 processor */
-#define EM_ST200 100 /* STMicroelectronics ST200 microcontroller */
-#define EM_IP2K 101 /* Ubicom IP2022 micro controller */
-#define EM_MAX 102 /* MAX Processor */
-#define EM_CR 103 /* National Semiconductor CompactRISC */
-#define EM_F2MC16 104 /* Fujitsu F2MC16 */
-#define EM_MSP430 105 /* TI msp430 micro controller */
-#define EM_BLACKFIN 106 /* ADI Blackfin */
-#define EM_SE_C33 107 /* S1C33 Family of Seiko Epson processors */
-#define EM_SEP 108 /* Sharp embedded microprocessor */
-#define EM_ARCA 109 /* Arca RISC Microprocessor */
-#define EM_UNICORE 110 /* Microprocessor series from PKU-Unity Ltd. and MPRC of Peking University */
-#define EM_EXCESS 111 /* eXcess: 16/32/64-bit configurable embedded CPU */
-#define EM_DXP 112 /* Icera Semiconductor Inc. Deep Execution Processor */
-#define EM_ALTERA_NIOS2 113 /* Altera Nios II soft-core processor */
-#define EM_CRX 114 /* National Semiconductor CRX */
-#define EM_XGATE 115 /* Motorola XGATE embedded processor */
-#define EM_C166 116 /* Infineon C16x/XC16x processor */
-#define EM_M16C 117 /* Renesas M16C series microprocessors */
-#define EM_DSPIC30F 118 /* Microchip Technology dsPIC30F Digital Signal Controller */
-#define EM_CE 119 /* Freescale Communication Engine RISC core */
-#define EM_M32C 120 /* Renesas M32C series microprocessors */
-
-#define EM_TSK3000 131 /* Altium TSK3000 core */
-#define EM_RS08 132 /* Freescale RS08 embedded processor */
-
-#define EM_ECOG2 134 /* Cyan Technology eCOG2 microprocessor */
-#define EM_SCORE 135 /* Sunplus Score */
-#define EM_DSP24 136 /* New Japan Radio (NJR) 24-bit DSP Processor */
-#define EM_VIDEOCORE3 137 /* Broadcom VideoCore III processor */
-#define EM_LATTICEMICO32 138 /* RISC processor for Lattice FPGA architecture */
-#define EM_SE_C17 139 /* Seiko Epson C17 family */
-
-#define EM_MMDSP_PLUS 160 /* STMicroelectronics 64bit VLIW Data Signal Processor */
-#define EM_CYPRESS_M8C 161 /* Cypress M8C microprocessor */
-#define EM_R32C 162 /* Renesas R32C series microprocessors */
-#define EM_TRIMEDIA 163 /* NXP Semiconductors TriMedia architecture family */
-#define EM_QDSP6 164 /* QUALCOMM DSP6 Processor */
-#define EM_8051 165 /* Intel 8051 and variants */
-#define EM_STXP7X 166 /* STMicroelectronics STxP7x family */
-#define EM_NDS32 167 /* Andes Technology compact code size embedded RISC processor family */
-#define EM_ECOG1 168 /* Cyan Technology eCOG1X family */
-#define EM_ECOG1X 168 /* Cyan Technology eCOG1X family */
-#define EM_MAXQ30 169 /* Dallas Semiconductor MAXQ30 Core Micro-controllers */
-#define EM_XIMO16 170 /* New Japan Radio (NJR) 16-bit DSP Processor */
-#define EM_MANIK 171 /* M2000 Reconfigurable RISC Microprocessor */
-#define EM_CRAYNV2 172 /* Cray Inc. NV2 vector architecture */
-#define EM_RX 173 /* Renesas RX family */
-#define EM_METAG 174 /* Imagination Technologies META processor architecture */
-#define EM_MCST_ELBRUS 175 /* MCST Elbrus general purpose hardware architecture */
-#define EM_ECOG16 176 /* Cyan Technology eCOG16 family */
-#define EM_CR16 177 /* National Semiconductor CompactRISC 16-bit processor */
-
-/* If it is necessary to assign new unofficial EM_* values, please pick large
- random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision
- with official or non-GNU unofficial values.
-
- NOTE: Do not just increment the most recent number by one.
- Somebody else somewhere will do exactly the same thing, and you
- will have a collision. Instead, pick a random number.
-
- Normally, each entity or maintainer responsible for a machine with an
- unofficial e_machine number should eventually ask registry@sco.com for
- an officially blessed number to be added to the list above. */
-
-/* Old version of Sparc v9, from before the ABI;
- This should be removed shortly. */
-#define EM_OLD_SPARCV9 11
-
-/* Old version of PowerPC, this should be removed shortly. */
-#define EM_PPC_OLD 17
-
-/* picoJava */
-#define EM_PJ_OLD 99
-
-/* Old, unofficial value for National Semiconductor CompactRISC - CR16 */
-#define EM_CR16_OLD 115
-
-/* AVR magic number. Written in the absense of an ABI. */
-#define EM_AVR_OLD 0x1057
-
-/* MSP430 magic number. Written in the absense of everything. */
-#define EM_MSP430_OLD 0x1059
-
-/* Morpho MT. Written in the absense of an ABI. */
-#define EM_MT 0x2530
-
-/* FR30 magic number - no EABI available. */
-#define EM_CYGNUS_FR30 0x3330
-
-/* OpenRISC magic number. Written in the absense of an ABI. */
-#define EM_OPENRISC_OLD 0x3426
-
-/* DLX magic number. Written in the absense of an ABI. */
-#define EM_DLX 0x5aa5
-
-/* FRV magic number - no EABI available??. */
-#define EM_CYGNUS_FRV 0x5441
-
-/* Infineon Technologies 16-bit microcontroller with C166-V2 core. */
-#define EM_XC16X 0x4688
-
-/* D10V backend magic number. Written in the absence of an ABI. */
-#define EM_CYGNUS_D10V 0x7650
-
-/* D30V backend magic number. Written in the absence of an ABI. */
-#define EM_CYGNUS_D30V 0x7676
-
-/* Ubicom IP2xxx; Written in the absense of an ABI. */
-#define EM_IP2K_OLD 0x8217
-
-/* (Deprecated) Temporary number for the OpenRISC processor. */
-#define EM_OR32 0x8472
-
-/* Cygnus PowerPC ELF backend. Written in the absence of an ABI. */
-#define EM_CYGNUS_POWERPC 0x9025
-
-/* Alpha backend magic number. Written in the absence of an ABI. */
-#define EM_ALPHA 0x9026
-
-/* Cygnus M32R ELF backend. Written in the absence of an ABI. */
-#define EM_CYGNUS_M32R 0x9041
-
-/* V850 backend magic number. Written in the absense of an ABI. */
-#define EM_CYGNUS_V850 0x9080
-
-/* old S/390 backend magic number. Written in the absence of an ABI. */
-#define EM_S390_OLD 0xa390
-
-/* Old, unofficial value for Xtensa. */
-#define EM_XTENSA_OLD 0xabc7
-
-#define EM_XSTORMY16 0xad45
-
-/* mn10200 and mn10300 backend magic numbers.
- Written in the absense of an ABI. */
-#define EM_CYGNUS_MN10300 0xbeef
-#define EM_CYGNUS_MN10200 0xdead
-
-/* Renesas M32C and M16C. */
-#define EM_M32C_OLD 0xFEB0
-
-/* Vitesse IQ2000. */
-#define EM_IQ2000 0xFEBA
-
-/* NIOS magic number - no EABI available. */
-#define EM_NIOS32 0xFEBB
-
-#define EM_CYGNUS_MEP 0xF00D /* Toshiba MeP */
-
-/* See the above comment before you add a new EM_* value here. */
-
-/* Values for e_version. */
-
-#define EV_NONE 0 /* Invalid ELF version */
-#define EV_CURRENT 1 /* Current version */
-
-/* Values for program header, p_type field. */
-
-#define PT_NULL 0 /* Program header table entry unused */
-#define PT_LOAD 1 /* Loadable program segment */
-#define PT_DYNAMIC 2 /* Dynamic linking information */
-#define PT_INTERP 3 /* Program interpreter */
-#define PT_NOTE 4 /* Auxiliary information */
-#define PT_SHLIB 5 /* Reserved, unspecified semantics */
-#define PT_PHDR 6 /* Entry for header table itself */
-#define PT_TLS 7 /* Thread local storage segment */
-#define PT_LOOS 0x60000000 /* OS-specific */
-#define PT_HIOS 0x6fffffff /* OS-specific */
-#define PT_LOPROC 0x70000000 /* Processor-specific */
-#define PT_HIPROC 0x7FFFFFFF /* Processor-specific */
-
-#define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550) /* Frame unwind information */
-#define PT_SUNW_EH_FRAME PT_GNU_EH_FRAME /* Solaris uses the same value */
-#define PT_GNU_STACK (PT_LOOS + 0x474e551) /* Stack flags */
-#define PT_GNU_RELRO (PT_LOOS + 0x474e552) /* Read-only after relocation */
-
-/* Program segment permissions, in program header p_flags field. */
-
-#define PF_X (1 << 0) /* Segment is executable */
-#define PF_W (1 << 1) /* Segment is writable */
-#define PF_R (1 << 2) /* Segment is readable */
-/* #define PF_MASKOS 0x0F000000 *//* OS-specific reserved bits */
-#define PF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */
-#define PF_MASKPROC 0xF0000000 /* Processor-specific reserved bits */
-
-/* Values for section header, sh_type field. */
-
-#define SHT_NULL 0 /* Section header table entry unused */
-#define SHT_PROGBITS 1 /* Program specific (private) data */
-#define SHT_SYMTAB 2 /* Link editing symbol table */
-#define SHT_STRTAB 3 /* A string table */
-#define SHT_RELA 4 /* Relocation entries with addends */
-#define SHT_HASH 5 /* A symbol hash table */
-#define SHT_DYNAMIC 6 /* Information for dynamic linking */
-#define SHT_NOTE 7 /* Information that marks file */
-#define SHT_NOBITS 8 /* Section occupies no space in file */
-#define SHT_REL 9 /* Relocation entries, no addends */
-#define SHT_SHLIB 10 /* Reserved, unspecified semantics */
-#define SHT_DYNSYM 11 /* Dynamic linking symbol table */
-
-#define SHT_INIT_ARRAY 14 /* Array of ptrs to init functions */
-#define SHT_FINI_ARRAY 15 /* Array of ptrs to finish functions */
-#define SHT_PREINIT_ARRAY 16 /* Array of ptrs to pre-init funcs */
-#define SHT_GROUP 17 /* Section contains a section group */
-#define SHT_SYMTAB_SHNDX 18 /* Indicies for SHN_XINDEX entries */
-
-#define SHT_LOOS 0x60000000 /* First of OS specific semantics */
-#define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */
-
-#define SHT_GNU_ATTRIBUTES 0x6ffffff5 /* Object attributes */
-#define SHT_GNU_HASH 0x6ffffff6 /* GNU style symbol hash table */
-#define SHT_GNU_LIBLIST 0x6ffffff7 /* List of prelink dependencies */
-
-/* The next three section types are defined by Solaris, and are named
- SHT_SUNW*. We use them in GNU code, so we also define SHT_GNU*
- versions. */
-#define SHT_SUNW_verdef 0x6ffffffd /* Versions defined by file */
-#define SHT_SUNW_verneed 0x6ffffffe /* Versions needed by file */
-#define SHT_SUNW_versym 0x6fffffff /* Symbol versions */
-
-#define SHT_GNU_verdef SHT_SUNW_verdef
-#define SHT_GNU_verneed SHT_SUNW_verneed
-#define SHT_GNU_versym SHT_SUNW_versym
-
-#define SHT_LOPROC 0x70000000 /* Processor-specific semantics, lo */
-#define SHT_HIPROC 0x7FFFFFFF /* Processor-specific semantics, hi */
-#define SHT_LOUSER 0x80000000 /* Application-specific semantics */
-/* #define SHT_HIUSER 0x8FFFFFFF *//* Application-specific semantics */
-#define SHT_HIUSER 0xFFFFFFFF /* New value, defined in Oct 4, 1999 Draft */
-
-/* Values for section header, sh_flags field. */
-
-#define SHF_WRITE (1 << 0) /* Writable data during execution */
-#define SHF_ALLOC (1 << 1) /* Occupies memory during execution */
-#define SHF_EXECINSTR (1 << 2) /* Executable machine instructions */
-#define SHF_MERGE (1 << 4) /* Data in this section can be merged */
-#define SHF_STRINGS (1 << 5) /* Contains null terminated character strings */
-#define SHF_INFO_LINK (1 << 6) /* sh_info holds section header table index */
-#define SHF_LINK_ORDER (1 << 7) /* Preserve section ordering when linking */
-#define SHF_OS_NONCONFORMING (1 << 8) /* OS specific processing required */
-#define SHF_GROUP (1 << 9) /* Member of a section group */
-#define SHF_TLS (1 << 10) /* Thread local storage section */
-
-/* #define SHF_MASKOS 0x0F000000 *//* OS-specific semantics */
-#define SHF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */
-#define SHF_MASKPROC 0xF0000000 /* Processor-specific semantics */
-
-/* Values of note segment descriptor types for core files. */
-
-#define NT_PRSTATUS 1 /* Contains copy of prstatus struct */
-#define NT_FPREGSET 2 /* Contains copy of fpregset struct */
-#define NT_PRPSINFO 3 /* Contains copy of prpsinfo struct */
-#define NT_TASKSTRUCT 4 /* Contains copy of task struct */
-#define NT_AUXV 6 /* Contains copy of Elfxx_auxv_t */
-#define NT_PRXFPREG 0x46e62b7f /* Contains a user_xfpregs_struct; */
- /* note name must be "LINUX". */
-#define NT_PPC_VMX 0x100 /* PowerPC Altivec/VMX registers */
- /* note name must be "LINUX". */
-#define NT_PPC_VSX 0x102 /* PowerPC VSX registers */
- /* note name must be "LINUX". */
-
-/* Note segments for core files on dir-style procfs systems. */
-
-#define NT_PSTATUS 10 /* Has a struct pstatus */
-#define NT_FPREGS 12 /* Has a struct fpregset */
-#define NT_PSINFO 13 /* Has a struct psinfo */
-#define NT_LWPSTATUS 16 /* Has a struct lwpstatus_t */
-#define NT_LWPSINFO 17 /* Has a struct lwpsinfo_t */
-#define NT_WIN32PSTATUS 18 /* Has a struct win32_pstatus */
-
-
-/* Note segments for core files on NetBSD systems. Note name
- must start with "NetBSD-CORE". */
-
-#define NT_NETBSDCORE_PROCINFO 1 /* Has a struct procinfo */
-#define NT_NETBSDCORE_FIRSTMACH 32 /* start of machdep note types */
-
-/* Note segments for core files on SPU systems. Note name
- must start with "SPU/". */
-
-#define NT_SPU 1
-
-/* Values of note segment descriptor types for object files. */
-
-#define NT_VERSION 1 /* Contains a version string. */
-#define NT_ARCH 2 /* Contains an architecture string. */
-
-/* Values for notes in non-core files using name "GNU". */
-
-#define NT_GNU_ABI_TAG 1
-#define NT_GNU_HWCAP 2 /* Used by ld.so and kernel vDSO. */
-#define NT_GNU_BUILD_ID 3 /* Generated by ld --build-id. */
-#define NT_GNU_GOLD_VERSION 4 /* Generated by gold. */
-
-/* Values used in GNU .note.ABI-tag notes (NT_GNU_ABI_TAG). */
-#define GNU_ABI_TAG_LINUX 0
-#define GNU_ABI_TAG_HURD 1
-#define GNU_ABI_TAG_SOLARIS 2
-#define GNU_ABI_TAG_FREEBSD 3
-#define GNU_ABI_TAG_NETBSD 4
-
-/* Values for NetBSD .note.netbsd.ident notes. Note name is "NetBSD". */
-
-#define NT_NETBSD_IDENT 1
-
-/* Values for OpenBSD .note.openbsd.ident notes. Note name is "OpenBSD". */
-
-#define NT_OPENBSD_IDENT 1
-
-/* Values for FreeBSD .note.ABI-tag notes. Note name is "FreeBSD". */
-
-#define NT_FREEBSD_ABI_TAG 1
-
-/* These three macros disassemble and assemble a symbol table st_info field,
- which contains the symbol binding and symbol type. The STB_ and STT_
- defines identify the binding and type. */
-
-#define ELF_ST_BIND(val) (((unsigned int)(val)) >> 4)
-#define ELF_ST_TYPE(val) ((val) & 0xF)
-#define ELF_ST_INFO(bind,type) (((bind) << 4) + ((type) & 0xF))
-
-/* The 64bit and 32bit versions of these macros are identical, but
- the ELF spec defines them, so here they are. */
-#define ELF32_ST_BIND ELF_ST_BIND
-#define ELF32_ST_TYPE ELF_ST_TYPE
-#define ELF32_ST_INFO ELF_ST_INFO
-#define ELF64_ST_BIND ELF_ST_BIND
-#define ELF64_ST_TYPE ELF_ST_TYPE
-#define ELF64_ST_INFO ELF_ST_INFO
-
-/* This macro disassembles and assembles a symbol's visibility into
- the st_other field. The STV_ defines specify the actual visibility. */
-
-#define ELF_ST_VISIBILITY(v) ((v) & 0x3)
-/* The remaining bits in the st_other field are not currently used.
- They should be set to zero. */
-
-#define ELF32_ST_VISIBILITY ELF_ST_VISIBILITY
-#define ELF64_ST_VISIBILITY ELF_ST_VISIBILITY
-
-
-#define STN_UNDEF 0 /* Undefined symbol index */
-
-#define STB_LOCAL 0 /* Symbol not visible outside obj */
-#define STB_GLOBAL 1 /* Symbol visible outside obj */
-#define STB_WEAK 2 /* Like globals, lower precedence */
-#define STB_LOOS 10 /* OS-specific semantics */
-#define STB_HIOS 12 /* OS-specific semantics */
-#define STB_LOPROC 13 /* Application-specific semantics */
-#define STB_HIPROC 15 /* Application-specific semantics */
-
-#define STT_NOTYPE 0 /* Symbol type is unspecified */
-#define STT_OBJECT 1 /* Symbol is a data object */
-#define STT_FUNC 2 /* Symbol is a code object */
-#define STT_SECTION 3 /* Symbol associated with a section */
-#define STT_FILE 4 /* Symbol gives a file name */
-#define STT_COMMON 5 /* An uninitialised common block */
-#define STT_TLS 6 /* Thread local data object */
-#define STT_RELC 8 /* Complex relocation expression */
-#define STT_SRELC 9 /* Signed Complex relocation expression */
-#define STT_LOOS 10 /* OS-specific semantics */
-#define STT_IFUNC 10 /* Symbol is an indirect code object */
-#define STT_HIOS 12 /* OS-specific semantics */
-#define STT_LOPROC 13 /* Application-specific semantics */
-#define STT_HIPROC 15 /* Application-specific semantics */
-
-/* The following constants control how a symbol may be accessed once it has
- become part of an executable or shared library. */
-
-#define STV_DEFAULT 0 /* Visibility is specified by binding type */
-#define STV_INTERNAL 1 /* OS specific version of STV_HIDDEN */
-#define STV_HIDDEN 2 /* Can only be seen inside currect component */
-#define STV_PROTECTED 3 /* Treat as STB_LOCAL inside current component */
-
-/* Relocation info handling macros. */
-
-#define ELF32_R_SYM(i) ((i) >> 8)
-#define ELF32_R_TYPE(i) ((i) & 0xff)
-#define ELF32_R_INFO(s,t) (((s) << 8) + ((t) & 0xff))
-
-#define ELF64_R_SYM(i) ((i) >> 32)
-#define ELF64_R_TYPE(i) ((i) & 0xffffffff)
-#define ELF64_R_INFO(s,t) (((bfd_vma) (s) << 31 << 1) + (bfd_vma) (t))
-
-/* Dynamic section tags. */
-
-#define DT_NULL 0
-#define DT_NEEDED 1
-#define DT_PLTRELSZ 2
-#define DT_PLTGOT 3
-#define DT_HASH 4
-#define DT_STRTAB 5
-#define DT_SYMTAB 6
-#define DT_RELA 7
-#define DT_RELASZ 8
-#define DT_RELAENT 9
-#define DT_STRSZ 10
-#define DT_SYMENT 11
-#define DT_INIT 12
-#define DT_FINI 13
-#define DT_SONAME 14
-#define DT_RPATH 15
-#define DT_SYMBOLIC 16
-#define DT_REL 17
-#define DT_RELSZ 18
-#define DT_RELENT 19
-#define DT_PLTREL 20
-#define DT_DEBUG 21
-#define DT_TEXTREL 22
-#define DT_JMPREL 23
-#define DT_BIND_NOW 24
-#define DT_INIT_ARRAY 25
-#define DT_FINI_ARRAY 26
-#define DT_INIT_ARRAYSZ 27
-#define DT_FINI_ARRAYSZ 28
-#define DT_RUNPATH 29
-#define DT_FLAGS 30
-#define DT_ENCODING 32
-#define DT_PREINIT_ARRAY 32
-#define DT_PREINIT_ARRAYSZ 33
-
-/* Note, the Oct 4, 1999 draft of the ELF ABI changed the values
- for DT_LOOS and DT_HIOS. Some implementations however, use
- values outside of the new range (see below). */
-#define OLD_DT_LOOS 0x60000000
-#define DT_LOOS 0x6000000d
-#define DT_HIOS 0x6ffff000
-#define OLD_DT_HIOS 0x6fffffff
-
-#define DT_LOPROC 0x70000000
-#define DT_HIPROC 0x7fffffff
-
-/* The next four dynamic tags are used on Solaris. We support them
- everywhere. Note these values lie outside of the (new) range for
- OS specific values. This is a deliberate special case and we
- maintain it for backwards compatability. */
-#define DT_VALRNGLO 0x6ffffd00
-#define DT_GNU_PRELINKED 0x6ffffdf5
-#define DT_GNU_CONFLICTSZ 0x6ffffdf6
-#define DT_GNU_LIBLISTSZ 0x6ffffdf7
-#define DT_CHECKSUM 0x6ffffdf8
-#define DT_PLTPADSZ 0x6ffffdf9
-#define DT_MOVEENT 0x6ffffdfa
-#define DT_MOVESZ 0x6ffffdfb
-#define DT_FEATURE 0x6ffffdfc
-#define DT_POSFLAG_1 0x6ffffdfd
-#define DT_SYMINSZ 0x6ffffdfe
-#define DT_SYMINENT 0x6ffffdff
-#define DT_VALRNGHI 0x6ffffdff
-
-#define DT_ADDRRNGLO 0x6ffffe00
-#define DT_GNU_HASH 0x6ffffef5
-#define DT_TLSDESC_PLT 0x6ffffef6
-#define DT_TLSDESC_GOT 0x6ffffef7
-#define DT_GNU_CONFLICT 0x6ffffef8
-#define DT_GNU_LIBLIST 0x6ffffef9
-#define DT_CONFIG 0x6ffffefa
-#define DT_DEPAUDIT 0x6ffffefb
-#define DT_AUDIT 0x6ffffefc
-#define DT_PLTPAD 0x6ffffefd
-#define DT_MOVETAB 0x6ffffefe
-#define DT_SYMINFO 0x6ffffeff
-#define DT_ADDRRNGHI 0x6ffffeff
-
-#define DT_RELACOUNT 0x6ffffff9
-#define DT_RELCOUNT 0x6ffffffa
-#define DT_FLAGS_1 0x6ffffffb
-#define DT_VERDEF 0x6ffffffc
-#define DT_VERDEFNUM 0x6ffffffd
-#define DT_VERNEED 0x6ffffffe
-#define DT_VERNEEDNUM 0x6fffffff
-
-/* This tag is a GNU extension to the Solaris version scheme. */
-#define DT_VERSYM 0x6ffffff0
-
-#define DT_LOPROC 0x70000000
-#define DT_HIPROC 0x7fffffff
-
-/* These section tags are used on Solaris. We support them
- everywhere, and hope they do not conflict. */
-
-#define DT_AUXILIARY 0x7ffffffd
-#define DT_USED 0x7ffffffe
-#define DT_FILTER 0x7fffffff
-
-
-/* Values used in DT_FEATURE .dynamic entry. */
-#define DTF_1_PARINIT 0x00000001
-/* From
-
- http://docs.sun.com:80/ab2/coll.45.13/LLM/@Ab2PageView/21165?Ab2Lang=C&Ab2Enc=iso-8859-1
-
- DTF_1_CONFEXP is the same as DTF_1_PARINIT. It is a typo. The value
- defined here is the same as the one in <sys/link.h> on Solaris 8. */
-#define DTF_1_CONFEXP 0x00000002
-
-/* Flag values used in the DT_POSFLAG_1 .dynamic entry. */
-#define DF_P1_LAZYLOAD 0x00000001
-#define DF_P1_GROUPPERM 0x00000002
-
-/* Flag value in in the DT_FLAGS_1 .dynamic entry. */
-#define DF_1_NOW 0x00000001
-#define DF_1_GLOBAL 0x00000002
-#define DF_1_GROUP 0x00000004
-#define DF_1_NODELETE 0x00000008
-#define DF_1_LOADFLTR 0x00000010
-#define DF_1_INITFIRST 0x00000020
-#define DF_1_NOOPEN 0x00000040
-#define DF_1_ORIGIN 0x00000080
-#define DF_1_DIRECT 0x00000100
-#define DF_1_TRANS 0x00000200
-#define DF_1_INTERPOSE 0x00000400
-#define DF_1_NODEFLIB 0x00000800
-#define DF_1_NODUMP 0x00001000
-#define DF_1_CONLFAT 0x00002000
-
-/* Flag values for the DT_FLAGS entry. */
-#define DF_ORIGIN (1 << 0)
-#define DF_SYMBOLIC (1 << 1)
-#define DF_TEXTREL (1 << 2)
-#define DF_BIND_NOW (1 << 3)
-#define DF_STATIC_TLS (1 << 4)
-
-/* These constants are used for the version number of a Elf32_Verdef
- structure. */
-
-#define VER_DEF_NONE 0
-#define VER_DEF_CURRENT 1
-
-/* These constants appear in the vd_flags field of a Elf32_Verdef
- structure. */
-
-#define VER_FLG_BASE 0x1
-#define VER_FLG_WEAK 0x2
-
-/* These special constants can be found in an Elf32_Versym field. */
-
-#define VER_NDX_LOCAL 0
-#define VER_NDX_GLOBAL 1
-
-/* These constants are used for the version number of a Elf32_Verneed
- structure. */
-
-#define VER_NEED_NONE 0
-#define VER_NEED_CURRENT 1
-
-/* This flag appears in a Versym structure. It means that the symbol
- is hidden, and is only visible with an explicit version number.
- This is a GNU extension. */
-
-#define VERSYM_HIDDEN 0x8000
-
-/* This is the mask for the rest of the Versym information. */
-
-#define VERSYM_VERSION 0x7fff
-
-/* This is a special token which appears as part of a symbol name. It
- indictes that the rest of the name is actually the name of a
- version node, and is not part of the actual name. This is a GNU
- extension. For example, the symbol name `stat@ver2' is taken to
- mean the symbol `stat' in version `ver2'. */
-
-#define ELF_VER_CHR '@'
-
-/* Possible values for si_boundto. */
-
-#define SYMINFO_BT_SELF 0xffff /* Symbol bound to self */
-#define SYMINFO_BT_PARENT 0xfffe /* Symbol bound to parent */
-#define SYMINFO_BT_LOWRESERVE 0xff00 /* Beginning of reserved entries */
-
-/* Possible bitmasks for si_flags. */
-
-#define SYMINFO_FLG_DIRECT 0x0001 /* Direct bound symbol */
-#define SYMINFO_FLG_PASSTHRU 0x0002 /* Pass-thru symbol for translator */
-#define SYMINFO_FLG_COPY 0x0004 /* Symbol is a copy-reloc */
-#define SYMINFO_FLG_LAZYLOAD 0x0008 /* Symbol bound to object to be lazy loaded */
-
-/* Syminfo version values. */
-
-#define SYMINFO_NONE 0
-#define SYMINFO_CURRENT 1
-#define SYMINFO_NUM 2
-
-/* Section Group Flags. */
-
-#define GRP_COMDAT 0x1 /* A COMDAT group */
-
-/* Auxv a_type values. */
-
-#define AT_NULL 0 /* End of vector */
-#define AT_IGNORE 1 /* Entry should be ignored */
-#define AT_EXECFD 2 /* File descriptor of program */
-#define AT_PHDR 3 /* Program headers for program */
-#define AT_PHENT 4 /* Size of program header entry */
-#define AT_PHNUM 5 /* Number of program headers */
-#define AT_PAGESZ 6 /* System page size */
-#define AT_BASE 7 /* Base address of interpreter */
-#define AT_FLAGS 8 /* Flags */
-#define AT_ENTRY 9 /* Entry point of program */
-#define AT_NOTELF 10 /* Program is not ELF */
-#define AT_UID 11 /* Real uid */
-#define AT_EUID 12 /* Effective uid */
-#define AT_GID 13 /* Real gid */
-#define AT_EGID 14 /* Effective gid */
-#define AT_CLKTCK 17 /* Frequency of times() */
-#define AT_PLATFORM 15 /* String identifying platform. */
-#define AT_HWCAP 16 /* Machine dependent hints about
- processor capabilities. */
-#define AT_FPUCW 18 /* Used FPU control word. */
-#define AT_DCACHEBSIZE 19 /* Data cache block size. */
-#define AT_ICACHEBSIZE 20 /* Instruction cache block size. */
-#define AT_UCACHEBSIZE 21 /* Unified cache block size. */
-#define AT_IGNOREPPC 22 /* Entry should be ignored */
-#define AT_SECURE 23 /* Boolean, was exec setuid-like? */
-#define AT_BASE_PLATFORM 24 /* String identifying real platform,
- may differ from AT_PLATFORM. */
-#define AT_EXECFN 31 /* Filename of executable. */
-/* Pointer to the global system page used for system calls and other
- nice things. */
-#define AT_SYSINFO 32
-#define AT_SYSINFO_EHDR 33 /* Pointer to ELF header of system-supplied DSO. */
-
-#define AT_SUN_UID 2000 /* Effective user ID. */
-#define AT_SUN_RUID 2001 /* Real user ID. */
-#define AT_SUN_GID 2002 /* Effective group ID. */
-#define AT_SUN_RGID 2003 /* Real group ID. */
-#define AT_SUN_LDELF 2004 /* Dynamic linker's ELF header. */
-#define AT_SUN_LDSHDR 2005 /* Dynamic linker's section headers. */
-#define AT_SUN_LDNAME 2006 /* String giving name of dynamic linker. */
-#define AT_SUN_LPAGESZ 2007 /* Large pagesize. */
-#define AT_SUN_PLATFORM 2008 /* Platform name string. */
-#define AT_SUN_HWCAP 2009 /* Machine dependent hints about
- processor capabilities. */
-#define AT_SUN_IFLUSH 2010 /* Should flush icache? */
-#define AT_SUN_CPU 2011 /* CPU name string. */
-#define AT_SUN_EMUL_ENTRY 2012 /* COFF entry point address. */
-#define AT_SUN_EMUL_EXECFD 2013 /* COFF executable file descriptor. */
-#define AT_SUN_EXECNAME 2014 /* Canonicalized file name given to execve. */
-#define AT_SUN_MMU 2015 /* String for name of MMU module. */
-#define AT_SUN_LDDATA 2016 /* Dynamic linker's data segment address. */
-#define AT_SUN_AUXFLAGS 2017 /* AF_SUN_ flags passed from the kernel. */
-
-
-#endif /* _ELF_COMMON_H */
diff --git a/include/elf/cr16.h b/include/elf/cr16.h
deleted file mode 100644
index c48c372..0000000
--- a/include/elf/cr16.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* CR16 ELF support for BFD.
- Copyright 2007 Free Software Foundation, Inc.
- Contributed by M R Swami Reddy.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_CR16_H
-#define _ELF_CR16_H
-
-#include "elf/reloc-macros.h"
-
-/* Creating indices for reloc_map_index array. */
-START_RELOC_NUMBERS(elf_cr16_reloc_type)
- RELOC_NUMBER (R_CR16_NONE, 0)
- RELOC_NUMBER (R_CR16_NUM8, 1)
- RELOC_NUMBER (R_CR16_NUM16, 2)
- RELOC_NUMBER (R_CR16_NUM32, 3)
- RELOC_NUMBER (R_CR16_NUM32a, 4)
- RELOC_NUMBER (R_CR16_REGREL4, 5)
- RELOC_NUMBER (R_CR16_REGREL4a, 6)
- RELOC_NUMBER (R_CR16_REGREL14, 7)
- RELOC_NUMBER (R_CR16_REGREL14a, 8)
- RELOC_NUMBER (R_CR16_REGREL16, 9)
- RELOC_NUMBER (R_CR16_REGREL20, 10)
- RELOC_NUMBER (R_CR16_REGREL20a, 11)
- RELOC_NUMBER (R_CR16_ABS20, 12)
- RELOC_NUMBER (R_CR16_ABS24, 13)
- RELOC_NUMBER (R_CR16_IMM4, 14)
- RELOC_NUMBER (R_CR16_IMM8, 15)
- RELOC_NUMBER (R_CR16_IMM16, 16)
- RELOC_NUMBER (R_CR16_IMM20, 17)
- RELOC_NUMBER (R_CR16_IMM24, 18)
- RELOC_NUMBER (R_CR16_IMM32, 19)
- RELOC_NUMBER (R_CR16_IMM32a, 20)
- RELOC_NUMBER (R_CR16_DISP4, 21)
- RELOC_NUMBER (R_CR16_DISP8, 22)
- RELOC_NUMBER (R_CR16_DISP16, 23)
- RELOC_NUMBER (R_CR16_DISP24, 24)
- RELOC_NUMBER (R_CR16_DISP24a, 25)
- RELOC_NUMBER (R_CR16_SWITCH8, 26)
- RELOC_NUMBER (R_CR16_SWITCH16, 27)
- RELOC_NUMBER (R_CR16_SWITCH32, 28)
- RELOC_NUMBER (R_CR16_GOT_REGREL20, 29)
- RELOC_NUMBER (R_CR16_GOTC_REGREL20, 30)
- RELOC_NUMBER (R_CR16_GLOB_DAT, 31)
-END_RELOC_NUMBERS(R_CR16_MAX)
-
-#endif /* _ELF_CR16_H */
diff --git a/include/elf/cr16c.h b/include/elf/cr16c.h
deleted file mode 100644
index 863fea6..0000000
--- a/include/elf/cr16c.h
+++ /dev/null
@@ -1,258 +0,0 @@
-/* CR16C ELF support for BFD.
- Copyright 2004, 2008 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_CR16C_H
-#define _ELF_CR16C_H
-
-#include "bfd.h"
-#include "elf/reloc-macros.h"
-
-/* Creating indices for reloc_map_index array. */
-START_RELOC_NUMBERS (elf_cr16c_reloc_type)
- RELOC_NUMBER (RINDEX_16C_NUM08, 0)
- RELOC_NUMBER (RINDEX_16C_NUM08_C, 1)
- RELOC_NUMBER (RINDEX_16C_NUM16, 2)
- RELOC_NUMBER (RINDEX_16C_NUM16_C, 3)
- RELOC_NUMBER (RINDEX_16C_NUM32, 4)
- RELOC_NUMBER (RINDEX_16C_NUM32_C, 5)
- RELOC_NUMBER (RINDEX_16C_DISP04, 6)
- RELOC_NUMBER (RINDEX_16C_DISP04_C, 7)
- RELOC_NUMBER (RINDEX_16C_DISP08, 8)
- RELOC_NUMBER (RINDEX_16C_DISP08_C, 9)
- RELOC_NUMBER (RINDEX_16C_DISP16, 10)
- RELOC_NUMBER (RINDEX_16C_DISP16_C, 11)
- RELOC_NUMBER (RINDEX_16C_DISP24, 12)
- RELOC_NUMBER (RINDEX_16C_DISP24_C, 13)
- RELOC_NUMBER (RINDEX_16C_DISP24a, 14)
- RELOC_NUMBER (RINDEX_16C_DISP24a_C, 15)
- RELOC_NUMBER (RINDEX_16C_REG04, 16)
- RELOC_NUMBER (RINDEX_16C_REG04_C, 17)
- RELOC_NUMBER (RINDEX_16C_REG04a, 18)
- RELOC_NUMBER (RINDEX_16C_REG04a_C, 19)
- RELOC_NUMBER (RINDEX_16C_REG14, 20)
- RELOC_NUMBER (RINDEX_16C_REG14_C, 21)
- RELOC_NUMBER (RINDEX_16C_REG16, 22)
- RELOC_NUMBER (RINDEX_16C_REG16_C, 23)
- RELOC_NUMBER (RINDEX_16C_REG20, 24)
- RELOC_NUMBER (RINDEX_16C_REG20_C, 25)
- RELOC_NUMBER (RINDEX_16C_ABS20, 26)
- RELOC_NUMBER (RINDEX_16C_ABS20_C, 27)
- RELOC_NUMBER (RINDEX_16C_ABS24, 28)
- RELOC_NUMBER (RINDEX_16C_ABS24_C, 29)
- RELOC_NUMBER (RINDEX_16C_IMM04, 30)
- RELOC_NUMBER (RINDEX_16C_IMM04_C, 31)
- RELOC_NUMBER (RINDEX_16C_IMM16, 32)
- RELOC_NUMBER (RINDEX_16C_IMM16_C, 33)
- RELOC_NUMBER (RINDEX_16C_IMM20, 34)
- RELOC_NUMBER (RINDEX_16C_IMM20_C, 35)
- RELOC_NUMBER (RINDEX_16C_IMM24, 36)
- RELOC_NUMBER (RINDEX_16C_IMM24_C, 37)
- RELOC_NUMBER (RINDEX_16C_IMM32, 38)
- RELOC_NUMBER (RINDEX_16C_IMM32_C, 39)
-END_RELOC_NUMBERS (RINDEX_16C_MAX)
-
-/* CR16C Relocation Types ('cr_reloc_type' entry in the reloc_map structure).
- The relocation constant name is determined as follows :
-
- R_16C_<format><size>[_C]
-
- Where :
-
- <format> is one of the following:
- NUM - R_NUMBER mnemonic,
- DISP - R_16C_DISPL mnemonic,
- REG - R_16C_REGREL mnemonic,
- ABS - R_16C_ABS mnemonic,
- IMM - R_16C_IMMED mnemonic,
- <size> stands for R_S_16C_<size>
- _C means 'code label' and is only added when R_ADDRTYPE subfield
- is of type R_CODE_ADDR. */
-
-/* The table below shows what the hex digits in the definition of the
- relocation type constants correspond to.
- ------------------------------------------------------------------
- R_SIZESP R_FORMAT R_RELTO R_ADDRTYPE
- ------------------------------------------------------------------ */
-/* R_S_16C_08 R_NUMBER R_ABS R_ADDRESS */
-#define R_16C_NUM08 0X0001
-
-/* R_S_16C_08 R_NUMBER R_ABS R_CODE_ADDR */
-#define R_16C_NUM08_C 0X0006
-
-/* R_S_16C_16 R_NUMBER R_ABS R_ADDRESS */
-#define R_16C_NUM16 0X1001
-
-/* R_S_16C_16 R_NUMBER R_ABS R_CODE_ADDR */
-#define R_16C_NUM16_C 0X1006
-
-/* R_S_16C_32 R_NUMBER R_ABS R_ADDRESS */
-#define R_16C_NUM32 0X2001
-
-/* R_S_16C_32 R_NUMBER R_ABS R_CODE_ADDR */
-#define R_16C_NUM32_C 0X2006
-
-/* R_S_16C_04 R_16C_DISPL R_PCREL R_ADDRESS */
-#define R_16C_DISP04 0X5411
-
-/* R_S_16C_04 R_16C_DISPL R_PCREL R_CODE_ADDR */
-#define R_16C_DISP04_C 0X5416
-
-/* R_S_16C_08 R_16C_DISPL R_PCREL R_ADDRESS */
-#define R_16C_DISP08 0X0411
-
-/* R_S_16C_08 R_16C_DISPL R_PCREL R_CODE_ADDR */
-#define R_16C_DISP08_C 0X0416
-
-/* R_S_16C_16 R_16C_DISPL R_PCREL R_ADDRESS */
-#define R_16C_DISP16 0X1411
-
-/* R_S_16C_16 R_16C_DISPL R_PCREL R_CODE_ADDR */
-#define R_16C_DISP16_C 0X1416
-
-/* R_S_16C_24 R_16C_DISPL R_PCREL R_ADDRESS */
-#define R_16C_DISP24 0X7411
-
-/* R_S_16C_24 R_16C_DISPL R_PCREL R_CODE_ADDR */
-#define R_16C_DISP24_C 0X7416
-
-/* R_S_16C_24a R_16C_DISPL R_PCREL R_ADDRESS */
-#define R_16C_DISP24a 0X6411
-
-/* R_S_16C_24a R_16C_DISPL R_PCREL R_CODE_ADDR */
-#define R_16C_DISP24a_C 0X6416
-
-/* R_S_16C_04 R_16C_REGREL R_ABS R_ADDRESS */
-#define R_16C_REG04 0X5201
-
-/* R_S_16C_04 R_16C_REGREL R_ABS R_CODE_ADDR */
-#define R_16C_REG04_C 0X5206
-
-/* R_S_16C_04_a R_16C_REGREL R_ABS R_ADDRESS */
-#define R_16C_REG04a 0X4201
-
-/* R_S_16C_04_a R_16C_REGREL R_ABS R_CODE_ADDR */
-#define R_16C_REG04a_C 0X4206
-
-/* R_S_16C_14 R_16C_REGREL R_ABS R_ADDRESS */
-#define R_16C_REG14 0X3201
-
-/* R_S_16C_14 R_16C_REGREL R_ABS R_CODE_ADDR */
-#define R_16C_REG14_C 0X3206
-
-/* R_S_16C_16 R_16C_REGREL R_ABS R_ADDRESS */
-#define R_16C_REG16 0X1201
-
-/* R_S_16C_16 R_16C_REGREL R_ABS R_CODE_ADDR */
-#define R_16C_REG16_C 0X1206
-
-/* R_S_16C_20 R_16C_REGREL R_ABS R_ADDRESS */
-#define R_16C_REG20 0X8201
-
-/* R_S_16C_20 R_16C_REGREL R_ABS R_CODE_ADDR */
-#define R_16C_REG20_C 0X8206
-
-/* R_S_16C_20 R_16C_ABS R_ABS R_ADDRESS */
-#define R_16C_ABS20 0X8101
-
-/* R_S_16C_20 R_16C_ABS R_ABS R_CODE_ADDR */
-#define R_16C_ABS20_C 0X8106
-
-/* R_S_16C_24 R_16C_ABS R_ABS R_ADDRESS */
-#define R_16C_ABS24 0X7101
-
-/* R_S_16C_24 R_16C_ABS R_ABS R_CODE_ADDR */
-#define R_16C_ABS24_C 0X7106
-
-/* R_S_16C_04 R_16C_IMMED R_ABS R_ADDRESS */
-#define R_16C_IMM04 0X5301
-
-/* R_S_16C_04 R_16C_IMMED R_ABS R_CODE_ADDR */
-#define R_16C_IMM04_C 0X5306
-
-/* R_S_16C_16 R_16C_IMMED R_ABS R_ADDRESS */
-#define R_16C_IMM16 0X1301
-
-/* R_S_16C_16 R_16C_IMMED R_ABS R_CODE_ADDR */
-#define R_16C_IMM16_C 0X1306
-
-/* R_S_16C_20 R_16C_IMMED R_ABS R_ADDRESS */
-#define R_16C_IMM20 0X8301
-
-/* R_S_16C_20 R_16C_IMMED R_ABS R_CODE_ADDR */
-#define R_16C_IMM20_C 0X8306
-
-/* R_S_16C_24 R_16C_IMMED R_ABS R_ADDRESS */
-#define R_16C_IMM24 0X7301
-
-/* R_S_16C_24 R_16C_IMMED R_ABS R_CODE_ADDR */
-#define R_16C_IMM24_C 0X7306
-
-/* R_S_16C_32 R_16C_IMMED R_ABS R_ADDRESS */
-#define R_16C_IMM32 0X2301
-
-/* R_S_16C_32 R_16C_IMMED R_ABS R_CODE_ADDR */
-#define R_16C_IMM32_C 0X2306
-
-
-/* Relocation item type. */
-#define R_ADDRTYPE 0x000f
-#define R_ADDRESS 0x0001 /* Take address of symbol. */
-#define R_CODE_ADDR 0x0006 /* Take address of symbol divided by 2. */
-
-/* Relocation action. */
-#define R_RELTO 0x00f0
-#define R_ABS 0x0000 /* Keep symbol's address as such. */
-#define R_PCREL 0x0010 /* Subtract the pc address of hole. */
-
-/* Relocation item data format. */
-#define R_FORMAT 0x0f00
-#define R_NUMBER 0x0000 /* Retain as two's complement value. */
-#define R_16C_DISPL 0x0400 /* CR16C displacement type. */
-#define R_16C_ABS 0x0100 /* CR16C absolute type. */
-#define R_16C_REGREL 0x0200 /* CR16C register-relative type. */
-#define R_16C_IMMED 0x0300 /* CR16C immediate type. */
-
-/* Relocation item size. */
-#define R_SIZESP 0xf000
-#define R_S_16C_04 0x5000
-#define R_S_16C_04_a 0x4000
-#define R_S_16C_08 0x0000
-#define R_S_16C_14 0x3000
-#define R_S_16C_16 0x1000
-#define R_S_16C_20 0x8000
-#define R_S_16C_24_a 0x6000
-#define R_S_16C_24 0x7000
-#define R_S_16C_32 0x2000
-
-
-/* Processor specific section indices. These sections do not actually
- exist. Symbols with a st_shndx field corresponding to one of these
- values have a special meaning. */
-
-/* Far common symbol. */
-#define SHN_CR16C_FCOMMON SHN_LORESERVE
-#define SHN_CR16C_NCOMMON (SHN_LORESERVE + 1)
-
-typedef struct reloc_map
-{
- unsigned short cr_reloc_type; /* CR relocation type. */
- bfd_reloc_code_real_type bfd_reloc_enum; /* BFD relocation enum. */
-} RELOC_MAP;
-
-#endif /* _ELF_CR16C_H */
diff --git a/include/elf/cris.h b/include/elf/cris.h
deleted file mode 100644
index 30e75b2..0000000
--- a/include/elf/cris.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/* CRIS ELF support for BFD.
- Copyright 2000, 2001, 2004 Free Software Foundation, Inc.
- Contributed by Axis Communications AB, Lund, Sweden.
- Written by Hans-Peter Nilsson.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software Foundation, Inc.,
-51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_CRIS_H
-#define _ELF_CRIS_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocations. */
-START_RELOC_NUMBERS (elf_cris_reloc_type)
- RELOC_NUMBER (R_CRIS_NONE, 0)
- RELOC_NUMBER (R_CRIS_8, 1)
- RELOC_NUMBER (R_CRIS_16, 2)
- RELOC_NUMBER (R_CRIS_32, 3)
-
- /* The "PC" position is the location right after the relocation. */
- RELOC_NUMBER (R_CRIS_8_PCREL, 4)
- RELOC_NUMBER (R_CRIS_16_PCREL, 5)
- RELOC_NUMBER (R_CRIS_32_PCREL, 6)
-
- RELOC_NUMBER (R_CRIS_GNU_VTINHERIT, 7)
- RELOC_NUMBER (R_CRIS_GNU_VTENTRY, 8)
-
- /* Copy contents at dynlinking. Generated by the linker.
- The BFD equivalent is BFD_RELOC_CRIS_COPY. */
- RELOC_NUMBER (R_CRIS_COPY, 9)
-
- /* Create GOT entry. Generated by the linker.
- The BFD equivalent is BFD_RELOC_CRIS_GLOB_DAT. */
- RELOC_NUMBER (R_CRIS_GLOB_DAT, 10)
-
- /* Create PLT entry. Generated by the linker.
- The BFD equivalent is BFD_RELOC_CRIS_JUMP_SLOT. */
- RELOC_NUMBER (R_CRIS_JUMP_SLOT, 11)
-
- /* Adjust by program base. Generated by the linker.
- The BFD equivalent is BFD_RELOC_CRIS_RELATIVE. */
- RELOC_NUMBER (R_CRIS_RELATIVE, 12)
-
- /* A 16-bit offset to entry in GOT and request to create GOT entry for
- that symbol.
- The BFD equivalent is BFD_RELOC_CRIS_16_GOT. */
- RELOC_NUMBER (R_CRIS_16_GOT, 13)
-
- /* A 32-bit offset to entry in GOT and request to create GOT entry for
- that symbol.
- The BFD equivalent is BFD_RELOC_CRIS_32_GOT. */
- RELOC_NUMBER (R_CRIS_32_GOT, 14)
-
- /* A 16-bit offset to entry in PLT part of GOT and request to create PLT
- entry for that symbol.
- The BFD equivalent is BFD_RELOC_CRIS_16_GOTPLT. */
- RELOC_NUMBER (R_CRIS_16_GOTPLT, 15)
-
- /* A 32-bit offset to entry in PLT part of GOT and request to create PLT
- entry for that symbol.
- The BFD equivalent is BFD_RELOC_CRIS_32_GOTPLT. */
- RELOC_NUMBER (R_CRIS_32_GOTPLT, 16)
-
- /* A 32-bit offset from GOT to (local) symbol: no GOT entry should be
- necessary.
- The BFD equivalent is BFD_RELOC_CRIS_32_GOTREL. */
- RELOC_NUMBER (R_CRIS_32_GOTREL, 17)
-
- /* A 32-bit offset from GOT to entry for this symbol in PLT and request
- to create PLT entry for symbol.
- The BFD equivalent is BFD_RELOC_CRIS_32_GOTREL. */
- RELOC_NUMBER (R_CRIS_32_PLT_GOTREL, 18)
-
- /* A 32-bit offset from location after this relocation (addend specifies
- offset) to entry for this symbol in PLT and request to create PLT
- entry for symbol.
- The BFD equivalent is BFD_RELOC_CRIS_32_PLT_PCREL. */
- RELOC_NUMBER (R_CRIS_32_PLT_PCREL, 19)
-
- /* An assembler-generated-only relocation, instructing the linker to
- reserve two GOT slots, carrying the R_CRIS_DTP relocation for the
- symbol (pointing to the first slot, the relocation fills in
- both). The value is a 32-bit-value, relative to the start of the
- GOT. Assembly syntax: "sym:GDGOTREL". */
- RELOC_NUMBER (R_CRIS_32_GOT_GD, 20)
-
- /* Similar to R_CRIS_32_GOT_GD, but the value is a 16-bit unsigned
- number, limiting access to 65536/4 global symbols per module (or
- 65536/8 thread variables; loosely speaking G*4+T*8 < 65536, where
- T is the number of thread variables and G is the number of other
- external global variables and functions). Assembly syntax:
- "sym:GDGOTREL16". */
- RELOC_NUMBER (R_CRIS_16_GOT_GD, 21)
-
- /* Similar to R_CRIS_32_GOT_GD, but the value is the absolute
- address of the GOT entry. Disallowed in DSOs created with
- -shared. Assembly syntax: "sym:GD". */
- RELOC_NUMBER (R_CRIS_32_GD, 22)
-
- /* A linker-generated-only relocation, instructing the dynamic
- linker to fill in the module ID and module-relative-TLS-block
- offset of the symbol in question, used for GOT entries. Note
- that this relocation instructs to fill in two 32-bit values. */
- RELOC_NUMBER (R_CRIS_DTP, 23)
-
- /* An assembler-generated-only relocation, instructing the linker to
- reserve the first two GOT slots, and attach the R_CRIS_DTPMOD
- relocation(*) for the module to the first slot, the second
- containing zero. The value is 32 bits, the offset from the start
- of the TLS block of the module to the thread-local symbol
- mentioned in the relocation. This relocation must only be applied
- to module-local symbols. Assembly syntax: "expr:DTPREL". */
- RELOC_NUMBER (R_CRIS_32_DTPREL, 24)
-
- /* Similar to R_CRIS_32_DTPREL, but the value is a 16-bit signed
- number, limiting the size of thread-variables of the DSO to 32768
- bytes. (Note: matches both model 1 and 2 and allows use of addo.w
- as the instruction where this relocation is used.) Assembly
- syntax: "expr:DTPREL16". */
- RELOC_NUMBER (R_CRIS_16_DTPREL, 25)
-
- /* An assembler-generated-only relocation, instructing the linker to
- reserve a GOT slot and attach the R_CRIS_32_TPREL relocation for
- the symbol in question. The value is 32 bits, which is the
- GOT-relative offset of the slot. Assembly syntax:
- "sym:TPOFFGOT". */
- RELOC_NUMBER (R_CRIS_32_GOT_TPREL, 26)
-
- /* Similar to R_CRIS_32_TPREL, but the value is a 16-bit positive
- number, limiting the number of thread- and global variables of
- the DSO to 32768/4. Assembly syntax: "sym:TPOFFGOT16". */
- RELOC_NUMBER (R_CRIS_16_GOT_TPREL, 27)
-
- /* An assembler- and linker-generated relocation, instructing to
- resolve the symbol in question yielding the TLS offset of the
- thread variable, relative to the global TLS block. Not allowed
- as input when generating a DSO. Assembly syntax:
- "expr:TPOFF". */
- RELOC_NUMBER (R_CRIS_32_TPREL, 28)
-
- /* Similar to R_CRIS_32_TPREL, but only applicable to executables
- compiled with -msmall-tls. Not allowed in a DSO. The value is a
- 16-bit signed number, limiting the size of thread-variables of
- the executable to 32768 bytes. (Note: being signed makes it match
- both model 1 and 2 and allows use of addo.w as the instruction
- where this relocation is applied.) Assembly syntax:
- "expr:TPOFF16". */
- RELOC_NUMBER (R_CRIS_16_TPREL, 29)
-
- /* A linker-generated-only relocation, instructing the dynamic
- linker to fill in the current module ID, used for GOT entries
- (usually the fourth one). */
- RELOC_NUMBER (R_CRIS_DTPMOD, 30)
-
- /* Similar to R_CRIS_32_GOT_TPREL, but the value is the absolute
- address of the GOT entry. Disallowed in DSOs created with
- -shared. Assembly syntax: "sym:IE". */
- RELOC_NUMBER (R_CRIS_32_IE, 31)
-
- /* No other relocs must be visible outside the assembler. */
-
-END_RELOC_NUMBERS (R_CRIS_max)
-
-/* User symbols in this file have a leading underscore. */
-#define EF_CRIS_UNDERSCORE 0x00000001
-
-/* This is a mask for different incompatible machine variants. */
-#define EF_CRIS_VARIANT_MASK 0x0000000e
-
-/* Variant 0; may contain v0..10 object. */
-#define EF_CRIS_VARIANT_ANY_V0_V10 0x00000000
-
-/* Variant 1; contains v32 object. */
-#define EF_CRIS_VARIANT_V32 0x00000002
-
-/* Variant 2; contains object compatible with v32 and v10. */
-#define EF_CRIS_VARIANT_COMMON_V10_V32 0x00000004
-
-#endif /* _ELF_CRIS_H */
diff --git a/include/elf/crx.h b/include/elf/crx.h
deleted file mode 100644
index 4893d48..0000000
--- a/include/elf/crx.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* CRX ELF support for BFD.
- Copyright 2004 Free Software Foundation, Inc.
- Contributed by Tomer Levi, NSC, Israel.
- Originally written for GAS 2.12 by Tomer Levi, NSC, Israel.
- Updates, BFDizing, GNUifying and ELF support by Tomer Levi.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_CRX_H
-#define _ELF_CRX_H
-
-#include "elf/reloc-macros.h"
-
-/* Creating indices for reloc_map_index array. */
-START_RELOC_NUMBERS(elf_crx_reloc_type)
- RELOC_NUMBER (R_CRX_NONE, 0)
- RELOC_NUMBER (R_CRX_REL4, 1)
- RELOC_NUMBER (R_CRX_REL8, 2)
- RELOC_NUMBER (R_CRX_REL8_CMP, 3)
- RELOC_NUMBER (R_CRX_REL16, 4)
- RELOC_NUMBER (R_CRX_REL24, 5)
- RELOC_NUMBER (R_CRX_REL32, 6)
- RELOC_NUMBER (R_CRX_REGREL12, 7)
- RELOC_NUMBER (R_CRX_REGREL22, 8)
- RELOC_NUMBER (R_CRX_REGREL28, 9)
- RELOC_NUMBER (R_CRX_REGREL32, 10)
- RELOC_NUMBER (R_CRX_ABS16, 11)
- RELOC_NUMBER (R_CRX_ABS32, 12)
- RELOC_NUMBER (R_CRX_NUM8, 13)
- RELOC_NUMBER (R_CRX_NUM16, 14)
- RELOC_NUMBER (R_CRX_NUM32, 15)
- RELOC_NUMBER (R_CRX_IMM16, 16)
- RELOC_NUMBER (R_CRX_IMM32, 17)
- RELOC_NUMBER (R_CRX_SWITCH8, 18)
- RELOC_NUMBER (R_CRX_SWITCH16, 19)
- RELOC_NUMBER (R_CRX_SWITCH32, 20)
-END_RELOC_NUMBERS(R_CRX_MAX)
-
-#endif /* _ELF_CRX_H */
diff --git a/include/elf/d10v.h b/include/elf/d10v.h
deleted file mode 100644
index bc32d8e..0000000
--- a/include/elf/d10v.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* d10v ELF support for BFD.
- Copyright 1998, 2000 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_D10V_H
-#define _ELF_D10V_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocation types. */
-START_RELOC_NUMBERS (elf_d10v_reloc_type)
- RELOC_NUMBER (R_D10V_NONE, 0)
- RELOC_NUMBER (R_D10V_10_PCREL_R, 1)
- RELOC_NUMBER (R_D10V_10_PCREL_L, 2)
- RELOC_NUMBER (R_D10V_16, 3)
- RELOC_NUMBER (R_D10V_18, 4)
- RELOC_NUMBER (R_D10V_18_PCREL, 5)
- RELOC_NUMBER (R_D10V_32, 6)
- RELOC_NUMBER (R_D10V_GNU_VTINHERIT, 7)
- RELOC_NUMBER (R_D10V_GNU_VTENTRY, 8)
-END_RELOC_NUMBERS (R_D10V_max)
-
-#endif
diff --git a/include/elf/d30v.h b/include/elf/d30v.h
deleted file mode 100644
index 8483a78..0000000
--- a/include/elf/d30v.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* d30v ELF support for BFD.
- Copyright 1998, 2000 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_D30V_H
-#define _ELF_D30V_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocations. */
-START_RELOC_NUMBERS (elf_d30v_reloc_type)
- RELOC_NUMBER (R_D30V_NONE, 0)
- RELOC_NUMBER (R_D30V_6, 1)
- RELOC_NUMBER (R_D30V_9_PCREL, 2)
- RELOC_NUMBER (R_D30V_9_PCREL_R, 3)
- RELOC_NUMBER (R_D30V_15, 4)
- RELOC_NUMBER (R_D30V_15_PCREL, 5)
- RELOC_NUMBER (R_D30V_15_PCREL_R, 6)
- RELOC_NUMBER (R_D30V_21, 7)
- RELOC_NUMBER (R_D30V_21_PCREL, 8)
- RELOC_NUMBER (R_D30V_21_PCREL_R, 9)
- RELOC_NUMBER (R_D30V_32, 10)
- RELOC_NUMBER (R_D30V_32_PCREL, 11)
- RELOC_NUMBER (R_D30V_32_NORMAL, 12)
-END_RELOC_NUMBERS (R_D30V_max)
-
-#endif
diff --git a/include/elf/dlx.h b/include/elf/dlx.h
deleted file mode 100644
index eea5b80..0000000
--- a/include/elf/dlx.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* DLX support for BFD.
- Copyright 2002 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_DLX_H
-#define _ELF_DLX_H
-
-#include "elf/reloc-macros.h"
-
-#if 0
-START_RELOC_NUMBERS (elf_dlx_reloc_type)
- RELOC_NUMBER (R_DLX_NONE, 0)
- RELOC_NUMBER (R_DLX_RELOC_16, 1)
- RELOC_NUMBER (R_DLX_RELOC_26, 2)
- RELOC_NUMBER (R_DLX_RELOC_32, 3)
- RELOC_NUMBER (R_DLX_GNU_VTINHERIT, 4)
- RELOC_NUMBER (R_DLX_GNU_VTENTRY, 5)
- RELOC_NUMBER (R_DLX_RELOC_16_HI, 6)
- RELOC_NUMBER (R_DLX_RELOC_16_LO, 7)
- RELOC_NUMBER (R_DLX_RELOC_16_PCREL, 8)
- RELOC_NUMBER (R_DLX_RELOC_26_PCREL, 9)
-END_RELOC_NUMBERS (R_DLX_max)
-#else
-START_RELOC_NUMBERS (elf_dlx_reloc_type)
- RELOC_NUMBER (R_DLX_NONE, 0)
- RELOC_NUMBER (R_DLX_RELOC_8, 1)
- RELOC_NUMBER (R_DLX_RELOC_16, 2)
- RELOC_NUMBER (R_DLX_RELOC_32, 3)
- RELOC_NUMBER (R_DLX_GNU_VTINHERIT, 4)
- RELOC_NUMBER (R_DLX_GNU_VTENTRY, 5)
- RELOC_NUMBER (R_DLX_RELOC_16_HI, 6)
- RELOC_NUMBER (R_DLX_RELOC_16_LO, 7)
- RELOC_NUMBER (R_DLX_RELOC_16_PCREL, 8)
- RELOC_NUMBER (R_DLX_RELOC_26_PCREL, 9)
-END_RELOC_NUMBERS (R_DLX_max)
-#endif /* 0 */
-
-#endif /* _ELF_DLX_H */
diff --git a/include/elf/dwarf.h b/include/elf/dwarf.h
deleted file mode 100644
index 6f1bca3..0000000
--- a/include/elf/dwarf.h
+++ /dev/null
@@ -1,324 +0,0 @@
-/* Declarations and definitions of codes relating to the DWARF symbolic
- debugging information format.
-
- Written by Ron Guilmette (rfg@netcom.com)
-
-Copyright 1992, 1993, 1995, 1999, 2005 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-GCC is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING. If not, write to the Free
-Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
-02110-1301, USA. */
-
-/* This file is derived from the DWARF specification (a public document)
- Revision 1.0.1 (April 8, 1992) developed by the UNIX International
- Programming Languages Special Interest Group (UI/PLSIG) and distributed
- by UNIX International. Copies of this specification are available from
- UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054.
-*/
-
-#ifndef _ELF_DWARF_H
-#define _ELF_DWARF_H
-
-/* Tag names and codes. */
-
-enum dwarf_tag {
- TAG_padding = 0x0000,
- TAG_array_type = 0x0001,
- TAG_class_type = 0x0002,
- TAG_entry_point = 0x0003,
- TAG_enumeration_type = 0x0004,
- TAG_formal_parameter = 0x0005,
- TAG_global_subroutine = 0x0006,
- TAG_global_variable = 0x0007,
- /* 0x0008 -- reserved */
- /* 0x0009 -- reserved */
- TAG_label = 0x000a,
- TAG_lexical_block = 0x000b,
- TAG_local_variable = 0x000c,
- TAG_member = 0x000d,
- /* 0x000e -- reserved */
- TAG_pointer_type = 0x000f,
- TAG_reference_type = 0x0010,
- TAG_compile_unit = 0x0011,
- TAG_string_type = 0x0012,
- TAG_structure_type = 0x0013,
- TAG_subroutine = 0x0014,
- TAG_subroutine_type = 0x0015,
- TAG_typedef = 0x0016,
- TAG_union_type = 0x0017,
- TAG_unspecified_parameters = 0x0018,
- TAG_variant = 0x0019,
- TAG_common_block = 0x001a,
- TAG_common_inclusion = 0x001b,
- TAG_inheritance = 0x001c,
- TAG_inlined_subroutine = 0x001d,
- TAG_module = 0x001e,
- TAG_ptr_to_member_type = 0x001f,
- TAG_set_type = 0x0020,
- TAG_subrange_type = 0x0021,
- TAG_with_stmt = 0x0022,
-
- /* GNU extensions */
-
- TAG_format_label = 0x8000, /* for FORTRAN 77 and Fortran 90 */
- TAG_namelist = 0x8001, /* For Fortran 90 */
- TAG_function_template = 0x8002, /* for C++ */
- TAG_class_template = 0x8003 /* for C++ */
-};
-
-#define TAG_lo_user 0x8000 /* implementation-defined range start */
-#define TAG_hi_user 0xffff /* implementation-defined range end */
-#define TAG_source_file TAG_compile_unit /* for backward compatibility */
-
-/* Form names and codes. */
-
-enum dwarf_form {
- FORM_ADDR = 0x1,
- FORM_REF = 0x2,
- FORM_BLOCK2 = 0x3,
- FORM_BLOCK4 = 0x4,
- FORM_DATA2 = 0x5,
- FORM_DATA4 = 0x6,
- FORM_DATA8 = 0x7,
- FORM_STRING = 0x8
-};
-
-/* Attribute names and codes. */
-
-enum dwarf_attribute {
- AT_sibling = (0x0010|FORM_REF),
- AT_location = (0x0020|FORM_BLOCK2),
- AT_name = (0x0030|FORM_STRING),
- AT_fund_type = (0x0050|FORM_DATA2),
- AT_mod_fund_type = (0x0060|FORM_BLOCK2),
- AT_user_def_type = (0x0070|FORM_REF),
- AT_mod_u_d_type = (0x0080|FORM_BLOCK2),
- AT_ordering = (0x0090|FORM_DATA2),
- AT_subscr_data = (0x00a0|FORM_BLOCK2),
- AT_byte_size = (0x00b0|FORM_DATA4),
- AT_bit_offset = (0x00c0|FORM_DATA2),
- AT_bit_size = (0x00d0|FORM_DATA4),
- /* (0x00e0|FORM_xxxx) -- reserved */
- AT_element_list = (0x00f0|FORM_BLOCK4),
- AT_stmt_list = (0x0100|FORM_DATA4),
- AT_low_pc = (0x0110|FORM_ADDR),
- AT_high_pc = (0x0120|FORM_ADDR),
- AT_language = (0x0130|FORM_DATA4),
- AT_member = (0x0140|FORM_REF),
- AT_discr = (0x0150|FORM_REF),
- AT_discr_value = (0x0160|FORM_BLOCK2),
- /* (0x0170|FORM_xxxx) -- reserved */
- /* (0x0180|FORM_xxxx) -- reserved */
- AT_string_length = (0x0190|FORM_BLOCK2),
- AT_common_reference = (0x01a0|FORM_REF),
- AT_comp_dir = (0x01b0|FORM_STRING),
- AT_const_value_string = (0x01c0|FORM_STRING),
- AT_const_value_data2 = (0x01c0|FORM_DATA2),
- AT_const_value_data4 = (0x01c0|FORM_DATA4),
- AT_const_value_data8 = (0x01c0|FORM_DATA8),
- AT_const_value_block2 = (0x01c0|FORM_BLOCK2),
- AT_const_value_block4 = (0x01c0|FORM_BLOCK4),
- AT_containing_type = (0x01d0|FORM_REF),
- AT_default_value_addr = (0x01e0|FORM_ADDR),
- AT_default_value_data2 = (0x01e0|FORM_DATA2),
- AT_default_value_data4 = (0x01e0|FORM_DATA4),
- AT_default_value_data8 = (0x01e0|FORM_DATA8),
- AT_default_value_string = (0x01e0|FORM_STRING),
- AT_friends = (0x01f0|FORM_BLOCK2),
- AT_inline = (0x0200|FORM_STRING),
- AT_is_optional = (0x0210|FORM_STRING),
- AT_lower_bound_ref = (0x0220|FORM_REF),
- AT_lower_bound_data2 = (0x0220|FORM_DATA2),
- AT_lower_bound_data4 = (0x0220|FORM_DATA4),
- AT_lower_bound_data8 = (0x0220|FORM_DATA8),
- AT_private = (0x0240|FORM_STRING),
- AT_producer = (0x0250|FORM_STRING),
- AT_program = (0x0230|FORM_STRING),
- AT_protected = (0x0260|FORM_STRING),
- AT_prototyped = (0x0270|FORM_STRING),
- AT_public = (0x0280|FORM_STRING),
- AT_pure_virtual = (0x0290|FORM_STRING),
- AT_return_addr = (0x02a0|FORM_BLOCK2),
- AT_abstract_origin = (0x02b0|FORM_REF),
- AT_start_scope = (0x02c0|FORM_DATA4),
- AT_stride_size = (0x02e0|FORM_DATA4),
- AT_upper_bound_ref = (0x02f0|FORM_REF),
- AT_upper_bound_data2 = (0x02f0|FORM_DATA2),
- AT_upper_bound_data4 = (0x02f0|FORM_DATA4),
- AT_upper_bound_data8 = (0x02f0|FORM_DATA8),
- AT_virtual = (0x0300|FORM_STRING),
-
- /* GNU extensions. */
-
- AT_sf_names = (0x8000|FORM_DATA4),
- AT_src_info = (0x8010|FORM_DATA4),
- AT_mac_info = (0x8020|FORM_DATA4),
- AT_src_coords = (0x8030|FORM_DATA4),
- AT_body_begin = (0x8040|FORM_ADDR),
- AT_body_end = (0x8050|FORM_ADDR)
-};
-
-#define AT_lo_user 0x2000 /* implementation-defined range start */
-#define AT_hi_user 0x3ff0 /* implementation-defined range end */
-
-/* Location atom names and codes. */
-
-enum dwarf_location_atom {
- OP_REG = 0x01,
- OP_BASEREG = 0x02,
- OP_ADDR = 0x03,
- OP_CONST = 0x04,
- OP_DEREF2 = 0x05,
- OP_DEREF4 = 0x06,
- OP_ADD = 0x07,
-
- /* GNU extensions. */
-
- OP_MULT = 0x80
-};
-
-#define OP_LO_USER 0x80 /* implementation-defined range start */
-#define OP_HI_USER 0xff /* implementation-defined range end */
-
-/* Fundamental type names and codes. */
-
-enum dwarf_fundamental_type {
- FT_char = 0x0001,
- FT_signed_char = 0x0002,
- FT_unsigned_char = 0x0003,
- FT_short = 0x0004,
- FT_signed_short = 0x0005,
- FT_unsigned_short = 0x0006,
- FT_integer = 0x0007,
- FT_signed_integer = 0x0008,
- FT_unsigned_integer = 0x0009,
- FT_long = 0x000a,
- FT_signed_long = 0x000b,
- FT_unsigned_long = 0x000c,
- FT_pointer = 0x000d, /* an alias for (void *) */
- FT_float = 0x000e,
- FT_dbl_prec_float = 0x000f,
- FT_ext_prec_float = 0x0010, /* breaks "classic" svr4 SDB */
- FT_complex = 0x0011, /* breaks "classic" svr4 SDB */
- FT_dbl_prec_complex = 0x0012, /* breaks "classic" svr4 SDB */
- /* 0x0013 -- reserved */
- FT_void = 0x0014,
- FT_boolean = 0x0015, /* breaks "classic" svr4 SDB */
- FT_ext_prec_complex = 0x0016, /* breaks "classic" svr4 SDB */
- FT_label = 0x0017,
-
- /* GNU extensions
- The low order byte must indicate the size (in bytes) for the type.
- All of these types will probably break "classic" svr4 SDB. */
-
- FT_long_long = 0x8008,
- FT_signed_long_long = 0x8108,
- FT_unsigned_long_long = 0x8208,
-
- FT_int8 = 0x9001,
- FT_signed_int8 = 0x9101,
- FT_unsigned_int8 = 0x9201,
- FT_int16 = 0x9302,
- FT_signed_int16 = 0x9402,
- FT_unsigned_int16 = 0x9502,
- FT_int32 = 0x9604,
- FT_signed_int32 = 0x9704,
- FT_unsigned_int32 = 0x9804,
- FT_int64 = 0x9908,
- FT_signed_int64 = 0x9a08,
- FT_unsigned_int64 = 0x9b08,
- FT_int128 = 0x9c10,
- FT_signed_int128 = 0x9d10,
- FT_unsigned_int128 = 0x9e10,
-
- FT_real32 = 0xa004,
- FT_real64 = 0xa108,
- FT_real96 = 0xa20c,
- FT_real128 = 0xa310
-};
-
-#define FT_lo_user 0x8000 /* implementation-defined range start */
-#define FT_hi_user 0xffff /* implementation defined range end */
-
-/* Type modifier names and codes. */
-
-enum dwarf_type_modifier {
- MOD_pointer_to = 0x01,
- MOD_reference_to = 0x02,
- MOD_const = 0x03,
- MOD_volatile = 0x04
-};
-
-#define MOD_lo_user 0x80 /* implementation-defined range start */
-#define MOD_hi_user 0xff /* implementation-defined range end */
-
-/* Array ordering names and codes. */
-
-enum dwarf_array_dim_ordering {
- ORD_row_major = 0,
- ORD_col_major = 1
-};
-
-/* Array subscript format names and codes. */
-
-enum dwarf_subscr_data_formats {
- FMT_FT_C_C = 0x0,
- FMT_FT_C_X = 0x1,
- FMT_FT_X_C = 0x2,
- FMT_FT_X_X = 0x3,
- FMT_UT_C_C = 0x4,
- FMT_UT_C_X = 0x5,
- FMT_UT_X_C = 0x6,
- FMT_UT_X_X = 0x7,
- FMT_ET = 0x8
-};
-
-/* Derived from above for ease of use. */
-
-#define FMT_CODE(_FUNDAMENTAL_TYPE_P, _LB_CONST_P, _UB_CONST_P) \
- (((_FUNDAMENTAL_TYPE_P) ? 0 : 4) \
- | ((_LB_CONST_P) ? 0 : 2) \
- | ((_UB_CONST_P) ? 0 : 1))
-
-/* Source language names and codes. */
-
-enum dwarf_source_language {
- LANG_C89 = 0x00000001,
- LANG_C = 0x00000002,
- LANG_ADA83 = 0x00000003,
- LANG_C_PLUS_PLUS = 0x00000004,
- LANG_COBOL74 = 0x00000005,
- LANG_COBOL85 = 0x00000006,
- LANG_FORTRAN77 = 0x00000007,
- LANG_FORTRAN90 = 0x00000008,
- LANG_PASCAL83 = 0x00000009,
- LANG_MODULA2 = 0x0000000a,
- LANG_JAVA = 0x0000000b
-};
-
-#define LANG_lo_user 0x00008000 /* implementation-defined range start */
-#define LANG_hi_user 0x0000ffff /* implementation-defined range end */
-
-/* Names and codes for GNU "macinfo" extension. */
-
-enum dwarf_macinfo_record_type {
- MACINFO_start = 's',
- MACINFO_resume = 'r',
- MACINFO_define = 'd',
- MACINFO_undef = 'u'
-};
-
-#endif /* _ELF_DWARF_H */
diff --git a/include/elf/dwarf2.h b/include/elf/dwarf2.h
deleted file mode 100644
index f8d010b..0000000
--- a/include/elf/dwarf2.h
+++ /dev/null
@@ -1,843 +0,0 @@
-/* Declarations and definitions of codes relating to the DWARF2 and
- DWARF3 symbolic debugging information formats.
- Copyright (C) 1992, 1993, 1995, 1996, 1997, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006, 2008 Free Software Foundation, Inc.
-
- Written by Gary Funck (gary@intrepid.com) The Ada Joint Program
- Office (AJPO), Florida State University and Silicon Graphics Inc.
- provided support for this effort -- June 21, 1995.
-
- Derived from the DWARF 1 implementation written by Ron Guilmette
- (rfg@netcom.com), November 1990.
-
- This file is part of GCC.
-
- GCC is free software; you can redistribute it and/or modify it under
- the terms of the GNU General Public License as published by the Free
- Software Foundation; either version 2, or (at your option) any later
- version.
-
- GCC is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
- License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GCC; see the file COPYING. If not, write to the Free
- Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-/* This file is derived from the DWARF specification (a public document)
- Revision 2.0.0 (July 27, 1993) developed by the UNIX International
- Programming Languages Special Interest Group (UI/PLSIG) and distributed
- by UNIX International. Copies of this specification are available from
- UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054.
-
- This file also now contains definitions from the DWARF 3 specification
- published Dec 20, 2005, available from: http://dwarf.freestandards.org. */
-
-/* This file is shared between GCC and GDB, and should not contain
- prototypes. */
-
-#ifndef _ELF_DWARF2_H
-#define _ELF_DWARF2_H
-
-/* Structure found in the .debug_line section. */
-typedef struct
-{
- unsigned char li_length [4];
- unsigned char li_version [2];
- unsigned char li_prologue_length [4];
- unsigned char li_min_insn_length [1];
- unsigned char li_default_is_stmt [1];
- unsigned char li_line_base [1];
- unsigned char li_line_range [1];
- unsigned char li_opcode_base [1];
-}
-DWARF2_External_LineInfo;
-
-typedef struct
-{
- unsigned long li_length;
- unsigned short li_version;
- unsigned int li_prologue_length;
- unsigned char li_min_insn_length;
- unsigned char li_default_is_stmt;
- int li_line_base;
- unsigned char li_line_range;
- unsigned char li_opcode_base;
-}
-DWARF2_Internal_LineInfo;
-
-/* Structure found in .debug_pubnames section. */
-typedef struct
-{
- unsigned char pn_length [4];
- unsigned char pn_version [2];
- unsigned char pn_offset [4];
- unsigned char pn_size [4];
-}
-DWARF2_External_PubNames;
-
-typedef struct
-{
- unsigned long pn_length;
- unsigned short pn_version;
- unsigned long pn_offset;
- unsigned long pn_size;
-}
-DWARF2_Internal_PubNames;
-
-/* Structure found in .debug_info section. */
-typedef struct
-{
- unsigned char cu_length [4];
- unsigned char cu_version [2];
- unsigned char cu_abbrev_offset [4];
- unsigned char cu_pointer_size [1];
-}
-DWARF2_External_CompUnit;
-
-typedef struct
-{
- unsigned long cu_length;
- unsigned short cu_version;
- unsigned long cu_abbrev_offset;
- unsigned char cu_pointer_size;
-}
-DWARF2_Internal_CompUnit;
-
-typedef struct
-{
- unsigned char ar_length [4];
- unsigned char ar_version [2];
- unsigned char ar_info_offset [4];
- unsigned char ar_pointer_size [1];
- unsigned char ar_segment_size [1];
-}
-DWARF2_External_ARange;
-
-typedef struct
-{
- unsigned long ar_length;
- unsigned short ar_version;
- unsigned long ar_info_offset;
- unsigned char ar_pointer_size;
- unsigned char ar_segment_size;
-}
-DWARF2_Internal_ARange;
-
-
-/* Tag names and codes. */
-enum dwarf_tag
- {
- DW_TAG_padding = 0x00,
- DW_TAG_array_type = 0x01,
- DW_TAG_class_type = 0x02,
- DW_TAG_entry_point = 0x03,
- DW_TAG_enumeration_type = 0x04,
- DW_TAG_formal_parameter = 0x05,
- DW_TAG_imported_declaration = 0x08,
- DW_TAG_label = 0x0a,
- DW_TAG_lexical_block = 0x0b,
- DW_TAG_member = 0x0d,
- DW_TAG_pointer_type = 0x0f,
- DW_TAG_reference_type = 0x10,
- DW_TAG_compile_unit = 0x11,
- DW_TAG_string_type = 0x12,
- DW_TAG_structure_type = 0x13,
- DW_TAG_subroutine_type = 0x15,
- DW_TAG_typedef = 0x16,
- DW_TAG_union_type = 0x17,
- DW_TAG_unspecified_parameters = 0x18,
- DW_TAG_variant = 0x19,
- DW_TAG_common_block = 0x1a,
- DW_TAG_common_inclusion = 0x1b,
- DW_TAG_inheritance = 0x1c,
- DW_TAG_inlined_subroutine = 0x1d,
- DW_TAG_module = 0x1e,
- DW_TAG_ptr_to_member_type = 0x1f,
- DW_TAG_set_type = 0x20,
- DW_TAG_subrange_type = 0x21,
- DW_TAG_with_stmt = 0x22,
- DW_TAG_access_declaration = 0x23,
- DW_TAG_base_type = 0x24,
- DW_TAG_catch_block = 0x25,
- DW_TAG_const_type = 0x26,
- DW_TAG_constant = 0x27,
- DW_TAG_enumerator = 0x28,
- DW_TAG_file_type = 0x29,
- DW_TAG_friend = 0x2a,
- DW_TAG_namelist = 0x2b,
- DW_TAG_namelist_item = 0x2c,
- DW_TAG_packed_type = 0x2d,
- DW_TAG_subprogram = 0x2e,
- DW_TAG_template_type_param = 0x2f,
- DW_TAG_template_value_param = 0x30,
- DW_TAG_thrown_type = 0x31,
- DW_TAG_try_block = 0x32,
- DW_TAG_variant_part = 0x33,
- DW_TAG_variable = 0x34,
- DW_TAG_volatile_type = 0x35,
- /* DWARF 3. */
- DW_TAG_dwarf_procedure = 0x36,
- DW_TAG_restrict_type = 0x37,
- DW_TAG_interface_type = 0x38,
- DW_TAG_namespace = 0x39,
- DW_TAG_imported_module = 0x3a,
- DW_TAG_unspecified_type = 0x3b,
- DW_TAG_partial_unit = 0x3c,
- DW_TAG_imported_unit = 0x3d,
- DW_TAG_condition = 0x3f,
- DW_TAG_shared_type = 0x40,
- /* SGI/MIPS Extensions. */
- DW_TAG_MIPS_loop = 0x4081,
- /* HP extensions. See: ftp://ftp.hp.com/pub/lang/tools/WDB/wdb-4.0.tar.gz . */
- DW_TAG_HP_array_descriptor = 0x4090,
- /* GNU extensions. */
- DW_TAG_format_label = 0x4101, /* For FORTRAN 77 and Fortran 90. */
- DW_TAG_function_template = 0x4102, /* For C++. */
- DW_TAG_class_template = 0x4103, /* For C++. */
- DW_TAG_GNU_BINCL = 0x4104,
- DW_TAG_GNU_EINCL = 0x4105,
- /* Extensions for UPC. See: http://upc.gwu.edu/~upc. */
- DW_TAG_upc_shared_type = 0x8765,
- DW_TAG_upc_strict_type = 0x8766,
- DW_TAG_upc_relaxed_type = 0x8767,
- /* PGI (STMicroelectronics) extensions. No documentation available. */
- DW_TAG_PGI_kanji_type = 0xA000,
- DW_TAG_PGI_interface_block = 0xA020
- };
-
-#define DW_TAG_lo_user 0x4080
-#define DW_TAG_hi_user 0xffff
-
-/* Flag that tells whether entry has a child or not. */
-#define DW_children_no 0
-#define DW_children_yes 1
-
-/* Form names and codes. */
-enum dwarf_form
- {
- DW_FORM_addr = 0x01,
- DW_FORM_block2 = 0x03,
- DW_FORM_block4 = 0x04,
- DW_FORM_data2 = 0x05,
- DW_FORM_data4 = 0x06,
- DW_FORM_data8 = 0x07,
- DW_FORM_string = 0x08,
- DW_FORM_block = 0x09,
- DW_FORM_block1 = 0x0a,
- DW_FORM_data1 = 0x0b,
- DW_FORM_flag = 0x0c,
- DW_FORM_sdata = 0x0d,
- DW_FORM_strp = 0x0e,
- DW_FORM_udata = 0x0f,
- DW_FORM_ref_addr = 0x10,
- DW_FORM_ref1 = 0x11,
- DW_FORM_ref2 = 0x12,
- DW_FORM_ref4 = 0x13,
- DW_FORM_ref8 = 0x14,
- DW_FORM_ref_udata = 0x15,
- DW_FORM_indirect = 0x16
- };
-
-/* Attribute names and codes. */
-enum dwarf_attribute
- {
- DW_AT_sibling = 0x01,
- DW_AT_location = 0x02,
- DW_AT_name = 0x03,
- DW_AT_ordering = 0x09,
- DW_AT_subscr_data = 0x0a,
- DW_AT_byte_size = 0x0b,
- DW_AT_bit_offset = 0x0c,
- DW_AT_bit_size = 0x0d,
- DW_AT_element_list = 0x0f,
- DW_AT_stmt_list = 0x10,
- DW_AT_low_pc = 0x11,
- DW_AT_high_pc = 0x12,
- DW_AT_language = 0x13,
- DW_AT_member = 0x14,
- DW_AT_discr = 0x15,
- DW_AT_discr_value = 0x16,
- DW_AT_visibility = 0x17,
- DW_AT_import = 0x18,
- DW_AT_string_length = 0x19,
- DW_AT_common_reference = 0x1a,
- DW_AT_comp_dir = 0x1b,
- DW_AT_const_value = 0x1c,
- DW_AT_containing_type = 0x1d,
- DW_AT_default_value = 0x1e,
- DW_AT_inline = 0x20,
- DW_AT_is_optional = 0x21,
- DW_AT_lower_bound = 0x22,
- DW_AT_producer = 0x25,
- DW_AT_prototyped = 0x27,
- DW_AT_return_addr = 0x2a,
- DW_AT_start_scope = 0x2c,
- DW_AT_bit_stride = 0x2e,
-#define DW_AT_stride_size DW_AT_bit_stride /* Note: The use of DW_AT_stride_size is deprecated. */
- DW_AT_upper_bound = 0x2f,
- DW_AT_abstract_origin = 0x31,
- DW_AT_accessibility = 0x32,
- DW_AT_address_class = 0x33,
- DW_AT_artificial = 0x34,
- DW_AT_base_types = 0x35,
- DW_AT_calling_convention = 0x36,
- DW_AT_count = 0x37,
- DW_AT_data_member_location = 0x38,
- DW_AT_decl_column = 0x39,
- DW_AT_decl_file = 0x3a,
- DW_AT_decl_line = 0x3b,
- DW_AT_declaration = 0x3c,
- DW_AT_discr_list = 0x3d,
- DW_AT_encoding = 0x3e,
- DW_AT_external = 0x3f,
- DW_AT_frame_base = 0x40,
- DW_AT_friend = 0x41,
- DW_AT_identifier_case = 0x42,
- DW_AT_macro_info = 0x43,
- DW_AT_namelist_items = 0x44,
- DW_AT_priority = 0x45,
- DW_AT_segment = 0x46,
- DW_AT_specification = 0x47,
- DW_AT_static_link = 0x48,
- DW_AT_type = 0x49,
- DW_AT_use_location = 0x4a,
- DW_AT_variable_parameter = 0x4b,
- DW_AT_virtuality = 0x4c,
- DW_AT_vtable_elem_location = 0x4d,
- /* DWARF 3 values. */
- DW_AT_allocated = 0x4e,
- DW_AT_associated = 0x4f,
- DW_AT_data_location = 0x50,
- DW_AT_byte_stride = 0x51,
-#define DW_AT_stride DW_AT_byte_stride /* Note: The use of DW_AT_stride is deprecated. */
- DW_AT_entry_pc = 0x52,
- DW_AT_use_UTF8 = 0x53,
- DW_AT_extension = 0x54,
- DW_AT_ranges = 0x55,
- DW_AT_trampoline = 0x56,
- DW_AT_call_column = 0x57,
- DW_AT_call_file = 0x58,
- DW_AT_call_line = 0x59,
- DW_AT_description = 0x5a,
- DW_AT_binary_scale = 0x5b,
- DW_AT_decimal_scale = 0x5c,
- DW_AT_small = 0x5d,
- DW_AT_decimal_sign = 0x5e,
- DW_AT_digit_count = 0x5f,
- DW_AT_picture_string = 0x60,
- DW_AT_mutable = 0x61,
- DW_AT_threads_scaled = 0x62,
- DW_AT_explicit = 0x63,
- DW_AT_object_pointer = 0x64,
- DW_AT_endianity = 0x65,
- DW_AT_elemental = 0x66,
- DW_AT_pure = 0x67,
- DW_AT_recursive = 0x68,
- /* SGI/MIPS extensions. */
- DW_AT_MIPS_fde = 0x2001,
- DW_AT_MIPS_loop_begin = 0x2002,
- DW_AT_MIPS_tail_loop_begin = 0x2003,
- DW_AT_MIPS_epilog_begin = 0x2004,
- DW_AT_MIPS_loop_unroll_factor = 0x2005,
- DW_AT_MIPS_software_pipeline_depth = 0x2006,
- DW_AT_MIPS_linkage_name = 0x2007,
- DW_AT_MIPS_stride = 0x2008,
- DW_AT_MIPS_abstract_name = 0x2009,
- DW_AT_MIPS_clone_origin = 0x200a,
- DW_AT_MIPS_has_inlines = 0x200b,
- /* HP extensions. */
- DW_AT_HP_block_index = 0x2000,
- DW_AT_HP_unmodifiable = 0x2001, /* Same as DW_AT_MIPS_fde. */
- DW_AT_HP_actuals_stmt_list = 0x2010,
- DW_AT_HP_proc_per_section = 0x2011,
- DW_AT_HP_raw_data_ptr = 0x2012,
- DW_AT_HP_pass_by_reference = 0x2013,
- DW_AT_HP_opt_level = 0x2014,
- DW_AT_HP_prof_version_id = 0x2015,
- DW_AT_HP_opt_flags = 0x2016,
- DW_AT_HP_cold_region_low_pc = 0x2017,
- DW_AT_HP_cold_region_high_pc = 0x2018,
- DW_AT_HP_all_variables_modifiable = 0x2019,
- DW_AT_HP_linkage_name = 0x201a,
- DW_AT_HP_prof_flags = 0x201b, /* In comp unit of procs_info for -g. */
- /* GNU extensions. */
- DW_AT_sf_names = 0x2101,
- DW_AT_src_info = 0x2102,
- DW_AT_mac_info = 0x2103,
- DW_AT_src_coords = 0x2104,
- DW_AT_body_begin = 0x2105,
- DW_AT_body_end = 0x2106,
- DW_AT_GNU_vector = 0x2107,
- /* VMS extensions. */
- DW_AT_VMS_rtnbeg_pd_address = 0x2201,
- /* UPC extension. */
- DW_AT_upc_threads_scaled = 0x3210,
- /* PGI (STMicroelectronics) extensions. */
- DW_AT_PGI_lbase = 0x3a00,
- DW_AT_PGI_soffset = 0x3a01,
- DW_AT_PGI_lstride = 0x3a02
- };
-
-#define DW_AT_lo_user 0x2000 /* Implementation-defined range start. */
-#define DW_AT_hi_user 0x3fff /* Implementation-defined range end. */
-
-/* Location atom names and codes. */
-enum dwarf_location_atom
- {
- DW_OP_addr = 0x03,
- DW_OP_deref = 0x06,
- DW_OP_const1u = 0x08,
- DW_OP_const1s = 0x09,
- DW_OP_const2u = 0x0a,
- DW_OP_const2s = 0x0b,
- DW_OP_const4u = 0x0c,
- DW_OP_const4s = 0x0d,
- DW_OP_const8u = 0x0e,
- DW_OP_const8s = 0x0f,
- DW_OP_constu = 0x10,
- DW_OP_consts = 0x11,
- DW_OP_dup = 0x12,
- DW_OP_drop = 0x13,
- DW_OP_over = 0x14,
- DW_OP_pick = 0x15,
- DW_OP_swap = 0x16,
- DW_OP_rot = 0x17,
- DW_OP_xderef = 0x18,
- DW_OP_abs = 0x19,
- DW_OP_and = 0x1a,
- DW_OP_div = 0x1b,
- DW_OP_minus = 0x1c,
- DW_OP_mod = 0x1d,
- DW_OP_mul = 0x1e,
- DW_OP_neg = 0x1f,
- DW_OP_not = 0x20,
- DW_OP_or = 0x21,
- DW_OP_plus = 0x22,
- DW_OP_plus_uconst = 0x23,
- DW_OP_shl = 0x24,
- DW_OP_shr = 0x25,
- DW_OP_shra = 0x26,
- DW_OP_xor = 0x27,
- DW_OP_bra = 0x28,
- DW_OP_eq = 0x29,
- DW_OP_ge = 0x2a,
- DW_OP_gt = 0x2b,
- DW_OP_le = 0x2c,
- DW_OP_lt = 0x2d,
- DW_OP_ne = 0x2e,
- DW_OP_skip = 0x2f,
- DW_OP_lit0 = 0x30,
- DW_OP_lit1 = 0x31,
- DW_OP_lit2 = 0x32,
- DW_OP_lit3 = 0x33,
- DW_OP_lit4 = 0x34,
- DW_OP_lit5 = 0x35,
- DW_OP_lit6 = 0x36,
- DW_OP_lit7 = 0x37,
- DW_OP_lit8 = 0x38,
- DW_OP_lit9 = 0x39,
- DW_OP_lit10 = 0x3a,
- DW_OP_lit11 = 0x3b,
- DW_OP_lit12 = 0x3c,
- DW_OP_lit13 = 0x3d,
- DW_OP_lit14 = 0x3e,
- DW_OP_lit15 = 0x3f,
- DW_OP_lit16 = 0x40,
- DW_OP_lit17 = 0x41,
- DW_OP_lit18 = 0x42,
- DW_OP_lit19 = 0x43,
- DW_OP_lit20 = 0x44,
- DW_OP_lit21 = 0x45,
- DW_OP_lit22 = 0x46,
- DW_OP_lit23 = 0x47,
- DW_OP_lit24 = 0x48,
- DW_OP_lit25 = 0x49,
- DW_OP_lit26 = 0x4a,
- DW_OP_lit27 = 0x4b,
- DW_OP_lit28 = 0x4c,
- DW_OP_lit29 = 0x4d,
- DW_OP_lit30 = 0x4e,
- DW_OP_lit31 = 0x4f,
- DW_OP_reg0 = 0x50,
- DW_OP_reg1 = 0x51,
- DW_OP_reg2 = 0x52,
- DW_OP_reg3 = 0x53,
- DW_OP_reg4 = 0x54,
- DW_OP_reg5 = 0x55,
- DW_OP_reg6 = 0x56,
- DW_OP_reg7 = 0x57,
- DW_OP_reg8 = 0x58,
- DW_OP_reg9 = 0x59,
- DW_OP_reg10 = 0x5a,
- DW_OP_reg11 = 0x5b,
- DW_OP_reg12 = 0x5c,
- DW_OP_reg13 = 0x5d,
- DW_OP_reg14 = 0x5e,
- DW_OP_reg15 = 0x5f,
- DW_OP_reg16 = 0x60,
- DW_OP_reg17 = 0x61,
- DW_OP_reg18 = 0x62,
- DW_OP_reg19 = 0x63,
- DW_OP_reg20 = 0x64,
- DW_OP_reg21 = 0x65,
- DW_OP_reg22 = 0x66,
- DW_OP_reg23 = 0x67,
- DW_OP_reg24 = 0x68,
- DW_OP_reg25 = 0x69,
- DW_OP_reg26 = 0x6a,
- DW_OP_reg27 = 0x6b,
- DW_OP_reg28 = 0x6c,
- DW_OP_reg29 = 0x6d,
- DW_OP_reg30 = 0x6e,
- DW_OP_reg31 = 0x6f,
- DW_OP_breg0 = 0x70,
- DW_OP_breg1 = 0x71,
- DW_OP_breg2 = 0x72,
- DW_OP_breg3 = 0x73,
- DW_OP_breg4 = 0x74,
- DW_OP_breg5 = 0x75,
- DW_OP_breg6 = 0x76,
- DW_OP_breg7 = 0x77,
- DW_OP_breg8 = 0x78,
- DW_OP_breg9 = 0x79,
- DW_OP_breg10 = 0x7a,
- DW_OP_breg11 = 0x7b,
- DW_OP_breg12 = 0x7c,
- DW_OP_breg13 = 0x7d,
- DW_OP_breg14 = 0x7e,
- DW_OP_breg15 = 0x7f,
- DW_OP_breg16 = 0x80,
- DW_OP_breg17 = 0x81,
- DW_OP_breg18 = 0x82,
- DW_OP_breg19 = 0x83,
- DW_OP_breg20 = 0x84,
- DW_OP_breg21 = 0x85,
- DW_OP_breg22 = 0x86,
- DW_OP_breg23 = 0x87,
- DW_OP_breg24 = 0x88,
- DW_OP_breg25 = 0x89,
- DW_OP_breg26 = 0x8a,
- DW_OP_breg27 = 0x8b,
- DW_OP_breg28 = 0x8c,
- DW_OP_breg29 = 0x8d,
- DW_OP_breg30 = 0x8e,
- DW_OP_breg31 = 0x8f,
- DW_OP_regx = 0x90,
- DW_OP_fbreg = 0x91,
- DW_OP_bregx = 0x92,
- DW_OP_piece = 0x93,
- DW_OP_deref_size = 0x94,
- DW_OP_xderef_size = 0x95,
- DW_OP_nop = 0x96,
- /* DWARF 3 extensions. */
- DW_OP_push_object_address = 0x97,
- DW_OP_call2 = 0x98,
- DW_OP_call4 = 0x99,
- DW_OP_call_ref = 0x9a,
- DW_OP_form_tls_address = 0x9b,
- DW_OP_call_frame_cfa = 0x9c,
- DW_OP_bit_piece = 0x9d,
- /* GNU extensions. */
- DW_OP_GNU_push_tls_address = 0xe0,
- DW_OP_GNU_uninit = 0xf0,
- DW_OP_GNU_encoded_addr = 0xf1,
- /* HP extensions. */
- DW_OP_HP_unknown = 0xe0, /* Ouch, the same as GNU_push_tls_address. */
- DW_OP_HP_is_value = 0xe1,
- DW_OP_HP_fltconst4 = 0xe2,
- DW_OP_HP_fltconst8 = 0xe3,
- DW_OP_HP_mod_range = 0xe4,
- DW_OP_HP_unmod_range = 0xe5,
- DW_OP_HP_tls = 0xe6,
- /* PGI (STMicroelectronics) extensions. */
- DW_OP_PGI_omp_thread_num = 0xf8
- };
-
-#define DW_OP_lo_user 0xe0 /* Implementation-defined range start. */
-#define DW_OP_hi_user 0xff /* Implementation-defined range end. */
-
-/* Type encodings. */
-enum dwarf_type
- {
- DW_ATE_void = 0x0,
- DW_ATE_address = 0x1,
- DW_ATE_boolean = 0x2,
- DW_ATE_complex_float = 0x3,
- DW_ATE_float = 0x4,
- DW_ATE_signed = 0x5,
- DW_ATE_signed_char = 0x6,
- DW_ATE_unsigned = 0x7,
- DW_ATE_unsigned_char = 0x8,
- /* DWARF 3. */
- DW_ATE_imaginary_float = 0x9,
- DW_ATE_packed_decimal = 0xa,
- DW_ATE_numeric_string = 0xb,
- DW_ATE_edited = 0xc,
- DW_ATE_signed_fixed = 0xd,
- DW_ATE_unsigned_fixed = 0xe,
- DW_ATE_decimal_float = 0xf,
- /* HP extensions. */
- DW_ATE_HP_float80 = 0x80, /* Floating-point (80 bit). */
- DW_ATE_HP_complex_float80 = 0x81, /* Complex floating-point (80 bit). */
- DW_ATE_HP_float128 = 0x82, /* Floating-point (128 bit). */
- DW_ATE_HP_complex_float128 = 0x83, /* Complex floating-point (128 bit). */
- DW_ATE_HP_floathpintel = 0x84, /* Floating-point (82 bit IA64). */
- DW_ATE_HP_imaginary_float80 = 0x85,
- DW_ATE_HP_imaginary_float128 = 0x86
- };
-
-#define DW_ATE_lo_user 0x80
-#define DW_ATE_hi_user 0xff
-
-/* Decimal sign encodings. */
-enum dwarf_decimal_sign_encoding
- {
- /* DWARF 3. */
- DW_DS_unsigned = 0x01,
- DW_DS_leading_overpunch = 0x02,
- DW_DS_trailing_overpunch = 0x03,
- DW_DS_leading_separate = 0x04,
- DW_DS_trailing_separate = 0x05
- };
-
-/* Endianity encodings. */
-enum dwarf_endianity_encoding
- {
- /* DWARF 3. */
- DW_END_default = 0x00,
- DW_END_big = 0x01,
- DW_END_little = 0x02
- };
-
-#define DW_END_lo_user 0x40
-#define DW_END_hi_user 0xff
-
-/* Array ordering names and codes. */
-enum dwarf_array_dim_ordering
- {
- DW_ORD_row_major = 0,
- DW_ORD_col_major = 1
- };
-
-/* Access attribute. */
-enum dwarf_access_attribute
- {
- DW_ACCESS_public = 1,
- DW_ACCESS_protected = 2,
- DW_ACCESS_private = 3
- };
-
-/* Visibility. */
-enum dwarf_visibility_attribute
- {
- DW_VIS_local = 1,
- DW_VIS_exported = 2,
- DW_VIS_qualified = 3
- };
-
-/* Virtuality. */
-enum dwarf_virtuality_attribute
- {
- DW_VIRTUALITY_none = 0,
- DW_VIRTUALITY_virtual = 1,
- DW_VIRTUALITY_pure_virtual = 2
- };
-
-/* Case sensitivity. */
-enum dwarf_id_case
- {
- DW_ID_case_sensitive = 0,
- DW_ID_up_case = 1,
- DW_ID_down_case = 2,
- DW_ID_case_insensitive = 3
- };
-
-/* Calling convention. */
-enum dwarf_calling_convention
- {
- DW_CC_normal = 0x1,
- DW_CC_program = 0x2,
- DW_CC_nocall = 0x3,
- DW_CC_GNU_renesas_sh = 0x40
- };
-
-#define DW_CC_lo_user 0x40
-#define DW_CC_hi_user 0xff
-
-/* Inline attribute. */
-enum dwarf_inline_attribute
- {
- DW_INL_not_inlined = 0,
- DW_INL_inlined = 1,
- DW_INL_declared_not_inlined = 2,
- DW_INL_declared_inlined = 3
- };
-
-/* Discriminant lists. */
-enum dwarf_discrim_list
- {
- DW_DSC_label = 0,
- DW_DSC_range = 1
- };
-
-/* Line number opcodes. */
-enum dwarf_line_number_ops
- {
- DW_LNS_extended_op = 0,
- DW_LNS_copy = 1,
- DW_LNS_advance_pc = 2,
- DW_LNS_advance_line = 3,
- DW_LNS_set_file = 4,
- DW_LNS_set_column = 5,
- DW_LNS_negate_stmt = 6,
- DW_LNS_set_basic_block = 7,
- DW_LNS_const_add_pc = 8,
- DW_LNS_fixed_advance_pc = 9,
- /* DWARF 3. */
- DW_LNS_set_prologue_end = 10,
- DW_LNS_set_epilogue_begin = 11,
- DW_LNS_set_isa = 12
- };
-
-/* Line number extended opcodes. */
-enum dwarf_line_number_x_ops
- {
- DW_LNE_end_sequence = 1,
- DW_LNE_set_address = 2,
- DW_LNE_define_file = 3,
- /* HP extensions. */
- DW_LNE_HP_negate_is_UV_update = 0x11,
- DW_LNE_HP_push_context = 0x12,
- DW_LNE_HP_pop_context = 0x13,
- DW_LNE_HP_set_file_line_column = 0x14,
- DW_LNE_HP_set_routine_name = 0x15,
- DW_LNE_HP_set_sequence = 0x16,
- DW_LNE_HP_negate_post_semantics = 0x17,
- DW_LNE_HP_negate_function_exit = 0x18,
- DW_LNE_HP_negate_front_end_logical = 0x19,
- DW_LNE_HP_define_proc = 0x20
- };
-
-#define DW_LNE_lo_user 0x80
-#define DW_LNE_hi_user 0xff
-
-/* Call frame information. */
-enum dwarf_call_frame_info
- {
- DW_CFA_advance_loc = 0x40,
- DW_CFA_offset = 0x80,
- DW_CFA_restore = 0xc0,
- DW_CFA_nop = 0x00,
- DW_CFA_set_loc = 0x01,
- DW_CFA_advance_loc1 = 0x02,
- DW_CFA_advance_loc2 = 0x03,
- DW_CFA_advance_loc4 = 0x04,
- DW_CFA_offset_extended = 0x05,
- DW_CFA_restore_extended = 0x06,
- DW_CFA_undefined = 0x07,
- DW_CFA_same_value = 0x08,
- DW_CFA_register = 0x09,
- DW_CFA_remember_state = 0x0a,
- DW_CFA_restore_state = 0x0b,
- DW_CFA_def_cfa = 0x0c,
- DW_CFA_def_cfa_register = 0x0d,
- DW_CFA_def_cfa_offset = 0x0e,
- /* DWARF 3. */
- DW_CFA_def_cfa_expression = 0x0f,
- DW_CFA_expression = 0x10,
- DW_CFA_offset_extended_sf = 0x11,
- DW_CFA_def_cfa_sf = 0x12,
- DW_CFA_def_cfa_offset_sf = 0x13,
- DW_CFA_val_offset = 0x14,
- DW_CFA_val_offset_sf = 0x15,
- DW_CFA_val_expression = 0x16,
- /* SGI/MIPS specific. */
- DW_CFA_MIPS_advance_loc8 = 0x1d,
- /* GNU extensions. */
- DW_CFA_GNU_window_save = 0x2d,
- DW_CFA_GNU_args_size = 0x2e,
- DW_CFA_GNU_negative_offset_extended = 0x2f
- };
-
-#define DW_CIE_ID 0xffffffff
-#define DW_CIE_VERSION 1
-
-#define DW_CFA_extended 0
-#define DW_CFA_lo_user 0x1c
-#define DW_CFA_hi_user 0x3f
-
-#define DW_CHILDREN_no 0x00
-#define DW_CHILDREN_yes 0x01
-
-#define DW_ADDR_none 0
-
-/* Source language names and codes. */
-enum dwarf_source_language
- {
- DW_LANG_C89 = 0x0001,
- DW_LANG_C = 0x0002,
- DW_LANG_Ada83 = 0x0003,
- DW_LANG_C_plus_plus = 0x0004,
- DW_LANG_Cobol74 = 0x0005,
- DW_LANG_Cobol85 = 0x0006,
- DW_LANG_Fortran77 = 0x0007,
- DW_LANG_Fortran90 = 0x0008,
- DW_LANG_Pascal83 = 0x0009,
- DW_LANG_Modula2 = 0x000a,
- /* DWARF 3. */
- DW_LANG_Java = 0x000b,
- DW_LANG_C99 = 0x000c,
- DW_LANG_Ada95 = 0x000d,
- DW_LANG_Fortran95 = 0x000e,
- DW_LANG_PLI = 0x000f,
- DW_LANG_ObjC = 0x0010,
- DW_LANG_ObjC_plus_plus = 0x0011,
- DW_LANG_UPC = 0x0012,
- DW_LANG_D = 0x0013,
- /* MIPS. */
- DW_LANG_Mips_Assembler = 0x8001,
- /* UPC. */
- DW_LANG_Upc = 0x8765
- };
-
-#define DW_LANG_lo_user 0x8000 /* Implementation-defined range start. */
-#define DW_LANG_hi_user 0xffff /* Implementation-defined range start. */
-
-/* Names and codes for macro information. */
-enum dwarf_macinfo_record_type
- {
- DW_MACINFO_define = 1,
- DW_MACINFO_undef = 2,
- DW_MACINFO_start_file = 3,
- DW_MACINFO_end_file = 4,
- DW_MACINFO_vendor_ext = 255
- };
-
-/* @@@ For use with GNU frame unwind information. */
-
-#define DW_EH_PE_absptr 0x00
-#define DW_EH_PE_omit 0xff
-
-#define DW_EH_PE_uleb128 0x01
-#define DW_EH_PE_udata2 0x02
-#define DW_EH_PE_udata4 0x03
-#define DW_EH_PE_udata8 0x04
-#define DW_EH_PE_sleb128 0x09
-#define DW_EH_PE_sdata2 0x0A
-#define DW_EH_PE_sdata4 0x0B
-#define DW_EH_PE_sdata8 0x0C
-#define DW_EH_PE_signed 0x08
-
-#define DW_EH_PE_pcrel 0x10
-#define DW_EH_PE_textrel 0x20
-#define DW_EH_PE_datarel 0x30
-#define DW_EH_PE_funcrel 0x40
-#define DW_EH_PE_aligned 0x50
-
-#define DW_EH_PE_indirect 0x80
-
-#endif /* _ELF_DWARF2_H */
diff --git a/include/elf/external.h b/include/elf/external.h
deleted file mode 100644
index 3d4ba79..0000000
--- a/include/elf/external.h
+++ /dev/null
@@ -1,288 +0,0 @@
-/* ELF support for BFD.
- Copyright 1991, 1992, 1993, 1995, 1997, 1998, 1999, 2001, 2003, 2005,
- 2008 Free Software Foundation, Inc.
-
- Written by Fred Fish @ Cygnus Support, from information published
- in "UNIX System V Release 4, Programmers Guide: ANSI C and
- Programming Support Tools".
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-
-/* This file is part of ELF support for BFD, and contains the portions
- that describe how ELF is represented externally by the BFD library.
- I.E. it describes the in-file representation of ELF. It requires
- the elf/common.h file which contains the portions that are common to
- both the internal and external representations. */
-
-/* The 64-bit stuff is kind of random. Perhaps someone will publish a
- spec someday. */
-
-#ifndef _ELF_EXTERNAL_H
-#define _ELF_EXTERNAL_H
-
-/* Special section indices, which may show up in st_shndx fields, among
- other places. */
-
-#define SHN_LORESERVE 0xFF00 /* Begin range of reserved indices */
-#define SHN_LOPROC 0xFF00 /* Begin range of appl-specific */
-#define SHN_HIPROC 0xFF1F /* End range of appl-specific */
-#define SHN_LOOS 0xFF20 /* OS specific semantics, lo */
-#define SHN_HIOS 0xFF3F /* OS specific semantics, hi */
-#define SHN_ABS 0xFFF1 /* Associated symbol is absolute */
-#define SHN_COMMON 0xFFF2 /* Associated symbol is in common */
-#define SHN_XINDEX 0xFFFF /* Section index is held elsewhere */
-#define SHN_HIRESERVE 0xFFFF /* End range of reserved indices */
-
-/* ELF Header (32-bit implementations) */
-
-typedef struct {
- unsigned char e_ident[16]; /* ELF "magic number" */
- unsigned char e_type[2]; /* Identifies object file type */
- unsigned char e_machine[2]; /* Specifies required architecture */
- unsigned char e_version[4]; /* Identifies object file version */
- unsigned char e_entry[4]; /* Entry point virtual address */
- unsigned char e_phoff[4]; /* Program header table file offset */
- unsigned char e_shoff[4]; /* Section header table file offset */
- unsigned char e_flags[4]; /* Processor-specific flags */
- unsigned char e_ehsize[2]; /* ELF header size in bytes */
- unsigned char e_phentsize[2]; /* Program header table entry size */
- unsigned char e_phnum[2]; /* Program header table entry count */
- unsigned char e_shentsize[2]; /* Section header table entry size */
- unsigned char e_shnum[2]; /* Section header table entry count */
- unsigned char e_shstrndx[2]; /* Section header string table index */
-} Elf32_External_Ehdr;
-
-typedef struct {
- unsigned char e_ident[16]; /* ELF "magic number" */
- unsigned char e_type[2]; /* Identifies object file type */
- unsigned char e_machine[2]; /* Specifies required architecture */
- unsigned char e_version[4]; /* Identifies object file version */
- unsigned char e_entry[8]; /* Entry point virtual address */
- unsigned char e_phoff[8]; /* Program header table file offset */
- unsigned char e_shoff[8]; /* Section header table file offset */
- unsigned char e_flags[4]; /* Processor-specific flags */
- unsigned char e_ehsize[2]; /* ELF header size in bytes */
- unsigned char e_phentsize[2]; /* Program header table entry size */
- unsigned char e_phnum[2]; /* Program header table entry count */
- unsigned char e_shentsize[2]; /* Section header table entry size */
- unsigned char e_shnum[2]; /* Section header table entry count */
- unsigned char e_shstrndx[2]; /* Section header string table index */
-} Elf64_External_Ehdr;
-
-/* Program header */
-
-typedef struct {
- unsigned char p_type[4]; /* Identifies program segment type */
- unsigned char p_offset[4]; /* Segment file offset */
- unsigned char p_vaddr[4]; /* Segment virtual address */
- unsigned char p_paddr[4]; /* Segment physical address */
- unsigned char p_filesz[4]; /* Segment size in file */
- unsigned char p_memsz[4]; /* Segment size in memory */
- unsigned char p_flags[4]; /* Segment flags */
- unsigned char p_align[4]; /* Segment alignment, file & memory */
-} Elf32_External_Phdr;
-
-typedef struct {
- unsigned char p_type[4]; /* Identifies program segment type */
- unsigned char p_flags[4]; /* Segment flags */
- unsigned char p_offset[8]; /* Segment file offset */
- unsigned char p_vaddr[8]; /* Segment virtual address */
- unsigned char p_paddr[8]; /* Segment physical address */
- unsigned char p_filesz[8]; /* Segment size in file */
- unsigned char p_memsz[8]; /* Segment size in memory */
- unsigned char p_align[8]; /* Segment alignment, file & memory */
-} Elf64_External_Phdr;
-
-/* Section header */
-
-typedef struct {
- unsigned char sh_name[4]; /* Section name, index in string tbl */
- unsigned char sh_type[4]; /* Type of section */
- unsigned char sh_flags[4]; /* Miscellaneous section attributes */
- unsigned char sh_addr[4]; /* Section virtual addr at execution */
- unsigned char sh_offset[4]; /* Section file offset */
- unsigned char sh_size[4]; /* Size of section in bytes */
- unsigned char sh_link[4]; /* Index of another section */
- unsigned char sh_info[4]; /* Additional section information */
- unsigned char sh_addralign[4]; /* Section alignment */
- unsigned char sh_entsize[4]; /* Entry size if section holds table */
-} Elf32_External_Shdr;
-
-typedef struct {
- unsigned char sh_name[4]; /* Section name, index in string tbl */
- unsigned char sh_type[4]; /* Type of section */
- unsigned char sh_flags[8]; /* Miscellaneous section attributes */
- unsigned char sh_addr[8]; /* Section virtual addr at execution */
- unsigned char sh_offset[8]; /* Section file offset */
- unsigned char sh_size[8]; /* Size of section in bytes */
- unsigned char sh_link[4]; /* Index of another section */
- unsigned char sh_info[4]; /* Additional section information */
- unsigned char sh_addralign[8]; /* Section alignment */
- unsigned char sh_entsize[8]; /* Entry size if section holds table */
-} Elf64_External_Shdr;
-
-/* Symbol table entry */
-
-typedef struct {
- unsigned char st_name[4]; /* Symbol name, index in string tbl */
- unsigned char st_value[4]; /* Value of the symbol */
- unsigned char st_size[4]; /* Associated symbol size */
- unsigned char st_info[1]; /* Type and binding attributes */
- unsigned char st_other[1]; /* No defined meaning, 0 */
- unsigned char st_shndx[2]; /* Associated section index */
-} Elf32_External_Sym;
-
-typedef struct {
- unsigned char st_name[4]; /* Symbol name, index in string tbl */
- unsigned char st_info[1]; /* Type and binding attributes */
- unsigned char st_other[1]; /* No defined meaning, 0 */
- unsigned char st_shndx[2]; /* Associated section index */
- unsigned char st_value[8]; /* Value of the symbol */
- unsigned char st_size[8]; /* Associated symbol size */
-} Elf64_External_Sym;
-
-typedef struct {
- unsigned char est_shndx[4]; /* Section index */
-} Elf_External_Sym_Shndx;
-
-/* Note segments */
-
-typedef struct {
- unsigned char namesz[4]; /* Size of entry's owner string */
- unsigned char descsz[4]; /* Size of the note descriptor */
- unsigned char type[4]; /* Interpretation of the descriptor */
- char name[1]; /* Start of the name+desc data */
-} Elf_External_Note;
-
-/* Relocation Entries */
-typedef struct {
- unsigned char r_offset[4]; /* Location at which to apply the action */
- unsigned char r_info[4]; /* index and type of relocation */
-} Elf32_External_Rel;
-
-typedef struct {
- unsigned char r_offset[4]; /* Location at which to apply the action */
- unsigned char r_info[4]; /* index and type of relocation */
- unsigned char r_addend[4]; /* Constant addend used to compute value */
-} Elf32_External_Rela;
-
-typedef struct {
- unsigned char r_offset[8]; /* Location at which to apply the action */
- unsigned char r_info[8]; /* index and type of relocation */
-} Elf64_External_Rel;
-
-typedef struct {
- unsigned char r_offset[8]; /* Location at which to apply the action */
- unsigned char r_info[8]; /* index and type of relocation */
- unsigned char r_addend[8]; /* Constant addend used to compute value */
-} Elf64_External_Rela;
-
-/* dynamic section structure */
-
-typedef struct {
- unsigned char d_tag[4]; /* entry tag value */
- union {
- unsigned char d_val[4];
- unsigned char d_ptr[4];
- } d_un;
-} Elf32_External_Dyn;
-
-typedef struct {
- unsigned char d_tag[8]; /* entry tag value */
- union {
- unsigned char d_val[8];
- unsigned char d_ptr[8];
- } d_un;
-} Elf64_External_Dyn;
-
-/* The version structures are currently size independent. They are
- named without a 32 or 64. If that ever changes, these structures
- will need to be renamed. */
-
-/* This structure appears in a SHT_GNU_verdef section. */
-
-typedef struct {
- unsigned char vd_version[2];
- unsigned char vd_flags[2];
- unsigned char vd_ndx[2];
- unsigned char vd_cnt[2];
- unsigned char vd_hash[4];
- unsigned char vd_aux[4];
- unsigned char vd_next[4];
-} Elf_External_Verdef;
-
-/* This structure appears in a SHT_GNU_verdef section. */
-
-typedef struct {
- unsigned char vda_name[4];
- unsigned char vda_next[4];
-} Elf_External_Verdaux;
-
-/* This structure appears in a SHT_GNU_verneed section. */
-
-typedef struct {
- unsigned char vn_version[2];
- unsigned char vn_cnt[2];
- unsigned char vn_file[4];
- unsigned char vn_aux[4];
- unsigned char vn_next[4];
-} Elf_External_Verneed;
-
-/* This structure appears in a SHT_GNU_verneed section. */
-
-typedef struct {
- unsigned char vna_hash[4];
- unsigned char vna_flags[2];
- unsigned char vna_other[2];
- unsigned char vna_name[4];
- unsigned char vna_next[4];
-} Elf_External_Vernaux;
-
-/* This structure appears in a SHT_GNU_versym section. This is not a
- standard ELF structure; ELF just uses Elf32_Half. */
-
-typedef struct {
- unsigned char vs_vers[2];
-} ATTRIBUTE_PACKED Elf_External_Versym;
-
-/* Structure for syminfo section. */
-typedef struct
-{
- unsigned char si_boundto[2];
- unsigned char si_flags[2];
-} Elf_External_Syminfo;
-
-
-/* This structure appears on the stack and in NT_AUXV core file notes. */
-typedef struct
-{
- unsigned char a_type[4];
- unsigned char a_val[4];
-} Elf32_External_Auxv;
-
-typedef struct
-{
- unsigned char a_type[8];
- unsigned char a_val[8];
-} Elf64_External_Auxv;
-
-/* Size of SHT_GROUP section entry. */
-
-#define GRP_ENTRY_SIZE 4
-
-#endif /* _ELF_EXTERNAL_H */
diff --git a/include/elf/fr30.h b/include/elf/fr30.h
deleted file mode 100644
index eb2b937..0000000
--- a/include/elf/fr30.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* FR30 ELF support for BFD.
- Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software Foundation, Inc.,
-51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_FR30_H
-#define _ELF_FR30_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocations. */
-START_RELOC_NUMBERS (elf_fr30_reloc_type)
- RELOC_NUMBER (R_FR30_NONE, 0)
- RELOC_NUMBER (R_FR30_8, 1)
- RELOC_NUMBER (R_FR30_20, 2)
- RELOC_NUMBER (R_FR30_32, 3)
- RELOC_NUMBER (R_FR30_48, 4)
- RELOC_NUMBER (R_FR30_6_IN_4, 5)
- RELOC_NUMBER (R_FR30_8_IN_8, 6)
- RELOC_NUMBER (R_FR30_9_IN_8, 7)
- RELOC_NUMBER (R_FR30_10_IN_8, 8)
- RELOC_NUMBER (R_FR30_9_PCREL, 9)
- RELOC_NUMBER (R_FR30_12_PCREL, 10)
- RELOC_NUMBER (R_FR30_GNU_VTINHERIT, 11)
- RELOC_NUMBER (R_FR30_GNU_VTENTRY, 12)
-END_RELOC_NUMBERS (R_FR30_max)
-
-#endif /* _ELF_FR30_H */
diff --git a/include/elf/frv.h b/include/elf/frv.h
deleted file mode 100644
index f2b1097..0000000
--- a/include/elf/frv.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/* FRV ELF support for BFD.
- Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software Foundation, Inc.,
-51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_FRV_H
-#define _ELF_FRV_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocations. */
-START_RELOC_NUMBERS (elf_frv_reloc_type)
- RELOC_NUMBER (R_FRV_NONE, 0)
- RELOC_NUMBER (R_FRV_32, 1)
- RELOC_NUMBER (R_FRV_LABEL16, 2)
- RELOC_NUMBER (R_FRV_LABEL24, 3)
- RELOC_NUMBER (R_FRV_LO16, 4)
- RELOC_NUMBER (R_FRV_HI16, 5)
- RELOC_NUMBER (R_FRV_GPREL12, 6)
- RELOC_NUMBER (R_FRV_GPRELU12, 7)
- RELOC_NUMBER (R_FRV_GPREL32, 8)
- RELOC_NUMBER (R_FRV_GPRELHI, 9)
- RELOC_NUMBER (R_FRV_GPRELLO, 10)
- RELOC_NUMBER (R_FRV_GOT12, 11)
- RELOC_NUMBER (R_FRV_GOTHI, 12)
- RELOC_NUMBER (R_FRV_GOTLO, 13)
- RELOC_NUMBER (R_FRV_FUNCDESC, 14)
- RELOC_NUMBER (R_FRV_FUNCDESC_GOT12, 15)
- RELOC_NUMBER (R_FRV_FUNCDESC_GOTHI, 16)
- RELOC_NUMBER (R_FRV_FUNCDESC_GOTLO, 17)
- RELOC_NUMBER (R_FRV_FUNCDESC_VALUE, 18)
- RELOC_NUMBER (R_FRV_FUNCDESC_GOTOFF12, 19)
- RELOC_NUMBER (R_FRV_FUNCDESC_GOTOFFHI, 20)
- RELOC_NUMBER (R_FRV_FUNCDESC_GOTOFFLO, 21)
- RELOC_NUMBER (R_FRV_GOTOFF12, 22)
- RELOC_NUMBER (R_FRV_GOTOFFHI, 23)
- RELOC_NUMBER (R_FRV_GOTOFFLO, 24)
- RELOC_NUMBER (R_FRV_GETTLSOFF, 25)
- RELOC_NUMBER (R_FRV_TLSDESC_VALUE, 26)
- RELOC_NUMBER (R_FRV_GOTTLSDESC12, 27)
- RELOC_NUMBER (R_FRV_GOTTLSDESCHI, 28)
- RELOC_NUMBER (R_FRV_GOTTLSDESCLO, 29)
- RELOC_NUMBER (R_FRV_TLSMOFF12, 30)
- RELOC_NUMBER (R_FRV_TLSMOFFHI, 31)
- RELOC_NUMBER (R_FRV_TLSMOFFLO, 32)
- RELOC_NUMBER (R_FRV_GOTTLSOFF12, 33)
- RELOC_NUMBER (R_FRV_GOTTLSOFFHI, 34)
- RELOC_NUMBER (R_FRV_GOTTLSOFFLO, 35)
- RELOC_NUMBER (R_FRV_TLSOFF, 36)
- RELOC_NUMBER (R_FRV_TLSDESC_RELAX, 37)
- RELOC_NUMBER (R_FRV_GETTLSOFF_RELAX, 38)
- RELOC_NUMBER (R_FRV_TLSOFF_RELAX, 39)
- RELOC_NUMBER (R_FRV_TLSMOFF, 40)
- RELOC_NUMBER (R_FRV_GNU_VTINHERIT, 200)
- RELOC_NUMBER (R_FRV_GNU_VTENTRY, 201)
-END_RELOC_NUMBERS(R_FRV_max)
-
-/* Processor specific flags for the ELF header e_flags field. */
- /* gpr support */
-#define EF_FRV_GPR_MASK 0x00000003 /* mask for # of gprs */
-#define EF_FRV_GPR_32 0x00000001 /* -mgpr-32 */
-#define EF_FRV_GPR_64 0x00000002 /* -mgpr-64 */
-
- /* fpr support */
-#define EF_FRV_FPR_MASK 0x0000000c /* mask for # of fprs */
-#define EF_FRV_FPR_32 0x00000004 /* -mfpr-32 */
-#define EF_FRV_FPR_64 0x00000008 /* -mfpr-64 */
-#define EF_FRV_FPR_NONE 0x0000000c /* -msoft-float */
-
- /* double word support */
-#define EF_FRV_DWORD_MASK 0x00000030 /* mask for dword support */
-#define EF_FRV_DWORD_YES 0x00000010 /* use double word insns */
-#define EF_FRV_DWORD_NO 0x00000020 /* don't use double word insn*/
-
-#define EF_FRV_DOUBLE 0x00000040 /* -mdouble */
-#define EF_FRV_MEDIA 0x00000080 /* -mmedia */
-
-#define EF_FRV_PIC 0x00000100 /* -fpic */
-#define EF_FRV_NON_PIC_RELOCS 0x00000200 /* used non pic safe relocs */
-
-#define EF_FRV_MULADD 0x00000400 /* -mmuladd */
-#define EF_FRV_BIGPIC 0x00000800 /* -fPIC */
-#define EF_FRV_LIBPIC 0x00001000 /* -mlibrary-pic */
-#define EF_FRV_G0 0x00002000 /* -G 0, no small data ptr */
-#define EF_FRV_NOPACK 0x00004000 /* -mnopack */
-#define EF_FRV_FDPIC 0x00008000 /* -mfdpic */
-
-#define EF_FRV_CPU_MASK 0xff000000 /* specific cpu bits */
-#define EF_FRV_CPU_GENERIC 0x00000000 /* generic FRV */
-#define EF_FRV_CPU_FR500 0x01000000 /* FRV500 */
-#define EF_FRV_CPU_FR300 0x02000000 /* FRV300 */
-#define EF_FRV_CPU_SIMPLE 0x03000000 /* SIMPLE */
-#define EF_FRV_CPU_TOMCAT 0x04000000 /* Tomcat, FR500 prototype */
-#define EF_FRV_CPU_FR400 0x05000000 /* FRV400 */
-#define EF_FRV_CPU_FR550 0x06000000 /* FRV550 */
-#define EF_FRV_CPU_FR405 0x07000000
-#define EF_FRV_CPU_FR450 0x08000000
-
- /* Mask of PIC related bits */
-#define EF_FRV_PIC_FLAGS (EF_FRV_PIC | EF_FRV_LIBPIC | EF_FRV_BIGPIC \
- | EF_FRV_FDPIC)
-
- /* Mask of all flags */
-#define EF_FRV_ALL_FLAGS (EF_FRV_GPR_MASK | \
- EF_FRV_FPR_MASK | \
- EF_FRV_DWORD_MASK | \
- EF_FRV_DOUBLE | \
- EF_FRV_MEDIA | \
- EF_FRV_PIC_FLAGS | \
- EF_FRV_NON_PIC_RELOCS | \
- EF_FRV_MULADD | \
- EF_FRV_G0 | \
- EF_FRV_NOPACK | \
- EF_FRV_CPU_MASK)
-
-#endif /* _ELF_FRV_H */
diff --git a/include/elf/h8.h b/include/elf/h8.h
deleted file mode 100644
index 1a115ad..0000000
--- a/include/elf/h8.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* H8300/h8500 ELF support for BFD.
- Copyright 2001, 2003 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_H8_H
-#define _ELF_H8_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocations. */
-/* Relocations 59..63 are GNU extensions. */
-START_RELOC_NUMBERS (elf_h8_reloc_type)
- RELOC_NUMBER (R_H8_NONE, 0)
- RELOC_NUMBER (R_H8_DIR32, 1)
- RELOC_NUMBER (R_H8_DIR32_28, 2)
- RELOC_NUMBER (R_H8_DIR32_24, 3)
- RELOC_NUMBER (R_H8_DIR32_16, 4)
- RELOC_NUMBER (R_H8_DIR32U, 6)
- RELOC_NUMBER (R_H8_DIR32U_28, 7)
- RELOC_NUMBER (R_H8_DIR32U_24, 8)
- RELOC_NUMBER (R_H8_DIR32U_20, 9)
- RELOC_NUMBER (R_H8_DIR32U_16, 10)
- RELOC_NUMBER (R_H8_DIR24, 11)
- RELOC_NUMBER (R_H8_DIR24_20, 12)
- RELOC_NUMBER (R_H8_DIR24_16, 13)
- RELOC_NUMBER (R_H8_DIR24U, 14)
- RELOC_NUMBER (R_H8_DIR24U_20, 15)
- RELOC_NUMBER (R_H8_DIR24U_16, 16)
- RELOC_NUMBER (R_H8_DIR16, 17)
- RELOC_NUMBER (R_H8_DIR16U, 18)
- RELOC_NUMBER (R_H8_DIR16S_32, 19)
- RELOC_NUMBER (R_H8_DIR16S_28, 20)
- RELOC_NUMBER (R_H8_DIR16S_24, 21)
- RELOC_NUMBER (R_H8_DIR16S_20, 22)
- RELOC_NUMBER (R_H8_DIR16S, 23)
- RELOC_NUMBER (R_H8_DIR8, 24)
- RELOC_NUMBER (R_H8_DIR8U, 25)
- RELOC_NUMBER (R_H8_DIR8Z_32, 26)
- RELOC_NUMBER (R_H8_DIR8Z_28, 27)
- RELOC_NUMBER (R_H8_DIR8Z_24, 28)
- RELOC_NUMBER (R_H8_DIR8Z_20, 29)
- RELOC_NUMBER (R_H8_DIR8Z_16, 30)
- RELOC_NUMBER (R_H8_PCREL16, 31)
- RELOC_NUMBER (R_H8_PCREL8, 32)
- RELOC_NUMBER (R_H8_BPOS, 33)
- FAKE_RELOC (R_H8_FIRST_INVALID_DIR_RELOC, 34)
- FAKE_RELOC (R_H8_LAST_INVALID_DIR_RELOC, 58)
- RELOC_NUMBER (R_H8_DIR16A8, 59)
- RELOC_NUMBER (R_H8_DIR16R8, 60)
- RELOC_NUMBER (R_H8_DIR24A8, 61)
- RELOC_NUMBER (R_H8_DIR24R8, 62)
- RELOC_NUMBER (R_H8_DIR32A16, 63)
- RELOC_NUMBER (R_H8_ABS32, 65)
- RELOC_NUMBER (R_H8_ABS32A16, 127)
- RELOC_NUMBER (R_H8_SYM, 128)
- RELOC_NUMBER (R_H8_OPneg, 129)
- RELOC_NUMBER (R_H8_OPadd, 130)
- RELOC_NUMBER (R_H8_OPsub, 131)
- RELOC_NUMBER (R_H8_OPmul, 132)
- RELOC_NUMBER (R_H8_OPdiv, 133)
- RELOC_NUMBER (R_H8_OPshla, 134)
- RELOC_NUMBER (R_H8_OPshra, 135)
- RELOC_NUMBER (R_H8_OPsctsize, 136)
- RELOC_NUMBER (R_H8_OPhword, 137)
- RELOC_NUMBER (R_H8_OPlword, 138)
- RELOC_NUMBER (R_H8_OPhigh, 139)
- RELOC_NUMBER (R_H8_OPlow, 140)
- RELOC_NUMBER (R_H8_OPscttop, 141)
-END_RELOC_NUMBERS (R_H8_max)
-
-/* Machine variant if we know it. This field was invented at Cygnus,
- but it is hoped that other vendors will adopt it. If some standard
- is developed, this code should be changed to follow it. */
-
-#define EF_H8_MACH 0x00FF0000
-
-#define E_H8_MACH_H8300 0x00800000
-#define E_H8_MACH_H8300H 0x00810000
-#define E_H8_MACH_H8300S 0x00820000
-#define E_H8_MACH_H8300HN 0x00830000
-#define E_H8_MACH_H8300SN 0x00840000
-#define E_H8_MACH_H8300SX 0x00850000
-#define E_H8_MACH_H8300SXN 0x00860000
-
-#endif
diff --git a/include/elf/hppa.h b/include/elf/hppa.h
deleted file mode 100644
index a4ec28f..0000000
--- a/include/elf/hppa.h
+++ /dev/null
@@ -1,634 +0,0 @@
-/* HPPA ELF support for BFD.
- Copyright 1993, 1994, 1995, 1998, 1999, 2000, 2005, 2006, 2008
- Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* This file holds definitions specific to the HPPA ELF ABI. Note
- that most of this is not actually implemented by BFD. */
-
-#ifndef _ELF_HPPA_H
-#define _ELF_HPPA_H
-
-/* Processor specific flags for the ELF header e_flags field. */
-
-/* Trap null address dereferences. */
-#define EF_PARISC_TRAPNIL 0x00010000
-
-/* .PARISC.archext section is present. */
-#define EF_PARISC_EXT 0x00020000
-
-/* Program expects little-endian mode. */
-#define EF_PARISC_LSB 0x00040000
-
-/* Program expects wide mode. */
-#define EF_PARISC_WIDE 0x00080000
-
-/* Do not allow kernel-assisted branch prediction. */
-#define EF_PARISC_NO_KABP 0x00100000
-
-/* Allow lazy swap for dynamically allocated program segments. */
-#define EF_PARISC_LAZYSWAP 0x00400000
-
-/* Architecture version */
-#define EF_PARISC_ARCH 0x0000ffff
-
-#define EFA_PARISC_1_0 0x020b
-#define EFA_PARISC_1_1 0x0210
-#define EFA_PARISC_2_0 0x0214
-
-/* Special section indices. */
-/* A symbol that has been declared as a tentative definition in an ANSI C
- compilation. */
-#define SHN_PARISC_ANSI_COMMON SHN_LORESERVE
-
-/* A symbol that has been declared as a common block using the
- huge memory model. */
-#define SHN_PARISC_HUGE_COMMON (SHN_LORESERVE + 1)
-
-/* Processor specific section types. */
-
-/* Section contains product specific extension bits. */
-#define SHT_PARISC_EXT 0x70000000
-
-/* Section contains unwind table entries. */
-#define SHT_PARISC_UNWIND 0x70000001
-
-/* Section contains debug information for optimized code. */
-#define SHT_PARISC_DOC 0x70000002
-
-/* Section contains code annotations. */
-#define SHT_PARISC_ANNOT 0x70000003
-
-/* DLKM special section. */
-#define SHT_PARISC_DLKM 0x70000004
-
-/* These are strictly for compatibility with the older elf32-hppa
- implementation. Hopefully we can eliminate them in the future. */
-/* Optional section holding argument location/relocation info. */
-#define SHT_PARISC_SYMEXTN SHT_LOPROC + 8
-
-/* Option section for linker stubs. */
-#define SHT_PARISC_STUBS SHT_LOPROC + 9
-
-/* Processor specific section flags. */
-
-/* Section contains code compiled for static branch prediction. */
-#define SHF_PARISC_SBP 0x80000000
-
-/* Section should be allocated from from GP. */
-#define SHF_PARISC_HUGE 0x40000000
-
-/* Section should go near GP. */
-#define SHF_PARISC_SHORT 0x20000000
-
-/* Section is weak ordered. */
-#define SHF_PARISC_WEAKORDER 0x10000000
-
-/* Identifies the entry point of a millicode routine. */
-#define STT_PARISC_MILLI 13
-
-/* ELF/HPPA relocation types */
-
-/* Note: PA-ELF is defined to use only RELA relocations. */
-#include "elf/reloc-macros.h"
-
-START_RELOC_NUMBERS (elf_hppa_reloc_type)
-RELOC_NUMBER (R_PARISC_NONE, 0) /* No reloc */
-
-/* Data / Inst. Format Relocation Expression */
-
-RELOC_NUMBER (R_PARISC_DIR32, 1)
-/* 32-bit word symbol + addend */
-
-RELOC_NUMBER (R_PARISC_DIR21L, 2)
-/* long immediate (7) LR(symbol, addend) */
-
-RELOC_NUMBER (R_PARISC_DIR17R, 3)
-/* branch external (19) RR(symbol, addend) */
-
-RELOC_NUMBER (R_PARISC_DIR17F, 4)
-/* branch external (19) symbol + addend */
-
-RELOC_NUMBER (R_PARISC_DIR14R, 6)
-/* load/store (1) RR(symbol, addend) */
-
-RELOC_NUMBER (R_PARISC_DIR14F, 7)
-/* load/store (1) symbol, addend */
-
-/* PC-relative relocation types
- Typically used for calls.
- Note PCREL17C and PCREL17F differ only in overflow handling.
- PCREL17C never reports a relocation error.
-
- When supporting argument relocations, function calls must be
- accompanied by parameter relocation information. This information is
- carried in the ten high-order bits of the addend field. The remaining
- 22 bits of of the addend field are sign-extended to form the Addend.
-
- Note the code to build argument relocations depends on the
- addend being zero. A consequence of this limitation is GAS
- can not perform relocation reductions for function symbols. */
-
-RELOC_NUMBER (R_PARISC_PCREL12F, 8)
-/* op & branch (17) symbol - PC - 8 + addend */
-
-RELOC_NUMBER (R_PARISC_PCREL32, 9)
-/* 32-bit word symbol - PC - 8 + addend */
-
-RELOC_NUMBER (R_PARISC_PCREL21L, 10)
-/* long immediate (7) L(symbol - PC - 8 + addend) */
-
-RELOC_NUMBER (R_PARISC_PCREL17R, 11)
-/* branch external (19) R(symbol - PC - 8 + addend) */
-
-RELOC_NUMBER (R_PARISC_PCREL17F, 12)
-/* branch (20) symbol - PC - 8 + addend */
-
-RELOC_NUMBER (R_PARISC_PCREL17C, 13)
-/* branch (20) symbol - PC - 8 + addend */
-
-RELOC_NUMBER (R_PARISC_PCREL14R, 14)
-/* load/store (1) R(symbol - PC - 8 + addend) */
-
-RELOC_NUMBER (R_PARISC_PCREL14F, 15)
-/* load/store (1) symbol - PC - 8 + addend */
-
-
-/* DP-relative relocation types. */
-RELOC_NUMBER (R_PARISC_DPREL21L, 18)
-/* long immediate (7) LR(symbol - GP, addend) */
-
-RELOC_NUMBER (R_PARISC_DPREL14WR, 19)
-/* load/store mod. comp. (2) RR(symbol - GP, addend) */
-
-RELOC_NUMBER (R_PARISC_DPREL14DR, 20)
-/* load/store doubleword (3) RR(symbol - GP, addend) */
-
-RELOC_NUMBER (R_PARISC_DPREL14R, 22)
-/* load/store (1) RR(symbol - GP, addend) */
-
-RELOC_NUMBER (R_PARISC_DPREL14F, 23)
-/* load/store (1) symbol - GP + addend */
-
-
-/* Data linkage table (DLT) relocation types
-
- SOM DLT_REL fixup requests are used to for static data references
- from position-independent code within shared libraries. They are
- similar to the GOT relocation types in some SVR4 implementations. */
-
-RELOC_NUMBER (R_PARISC_DLTREL21L, 26)
-/* long immediate (7) LR(symbol - GP, addend) */
-
-RELOC_NUMBER (R_PARISC_DLTREL14R, 30)
-/* load/store (1) RR(symbol - GP, addend) */
-
-RELOC_NUMBER (R_PARISC_DLTREL14F, 31)
-/* load/store (1) symbol - GP + addend */
-
-
-/* DLT indirect relocation types */
-RELOC_NUMBER (R_PARISC_DLTIND21L, 34)
-/* long immediate (7) L(ltoff(symbol + addend)) */
-
-RELOC_NUMBER (R_PARISC_DLTIND14R, 38)
-/* load/store (1) R(ltoff(symbol + addend)) */
-
-RELOC_NUMBER (R_PARISC_DLTIND14F, 39)
-/* load/store (1) ltoff(symbol + addend) */
-
-
-/* Base relative relocation types. Ugh. These imply lots of state */
-RELOC_NUMBER (R_PARISC_SETBASE, 40)
-/* none no reloc; base := sym */
-
-RELOC_NUMBER (R_PARISC_SECREL32, 41)
-/* 32-bit word symbol - SECT + addend */
-
-RELOC_NUMBER (R_PARISC_BASEREL21L, 42)
-/* long immediate (7) LR(symbol - base, addend) */
-
-RELOC_NUMBER (R_PARISC_BASEREL17R, 43)
-/* branch external (19) RR(symbol - base, addend) */
-
-RELOC_NUMBER (R_PARISC_BASEREL17F, 44)
-/* branch external (19) symbol - base + addend */
-
-RELOC_NUMBER (R_PARISC_BASEREL14R, 46)
-/* load/store (1) RR(symbol - base, addend) */
-
-RELOC_NUMBER (R_PARISC_BASEREL14F, 47)
-/* load/store (1) symbol - base, addend */
-
-
-/* Segment relative relocation types. */
-RELOC_NUMBER (R_PARISC_SEGBASE, 48)
-/* none no relocation; SB := sym */
-
-RELOC_NUMBER (R_PARISC_SEGREL32, 49)
-/* 32-bit word symbol - SB + addend */
-
-
-/* Offsets from the PLT. */
-RELOC_NUMBER (R_PARISC_PLTOFF21L, 50)
-/* long immediate (7) LR(pltoff(symbol), addend) */
-
-RELOC_NUMBER (R_PARISC_PLTOFF14R, 54)
-/* load/store (1) RR(pltoff(symbol), addend) */
-
-RELOC_NUMBER (R_PARISC_PLTOFF14F, 55)
-/* load/store (1) pltoff(symbol) + addend */
-
-
-RELOC_NUMBER (R_PARISC_LTOFF_FPTR32, 57)
-/* 32-bit word ltoff(fptr(symbol+addend)) */
-
-RELOC_NUMBER (R_PARISC_LTOFF_FPTR21L, 58)
-/* long immediate (7) L(ltoff(fptr(symbol+addend))) */
-
-RELOC_NUMBER (R_PARISC_LTOFF_FPTR14R, 62)
-/* load/store (1) R(ltoff(fptr(symbol+addend))) */
-
-
-RELOC_NUMBER (R_PARISC_FPTR64, 64)
-/* 64-bit doubleword fptr(symbol+addend) */
-
-
-/* Plabel relocation types. */
-RELOC_NUMBER (R_PARISC_PLABEL32, 65)
-/* 32-bit word fptr(symbol) */
-
-RELOC_NUMBER (R_PARISC_PLABEL21L, 66)
-/* long immediate (7) L(fptr(symbol)) */
-
-RELOC_NUMBER (R_PARISC_PLABEL14R, 70)
-/* load/store (1) R(fptr(symbol)) */
-
-
-/* PCREL relocations. */
-RELOC_NUMBER (R_PARISC_PCREL64, 72)
-/* 64-bit doubleword symbol - PC - 8 + addend */
-
-RELOC_NUMBER (R_PARISC_PCREL22C, 73)
-/* branch & link (21) symbol - PC - 8 + addend */
-
-RELOC_NUMBER (R_PARISC_PCREL22F, 74)
-/* branch & link (21) symbol - PC - 8 + addend */
-
-RELOC_NUMBER (R_PARISC_PCREL14WR, 75)
-/* load/store mod. comp. (2) R(symbol - PC - 8 + addend) */
-
-RELOC_NUMBER (R_PARISC_PCREL14DR, 76)
-/* load/store doubleword (3) R(symbol - PC - 8 + addend) */
-
-RELOC_NUMBER (R_PARISC_PCREL16F, 77)
-/* load/store (1) symbol - PC - 8 + addend */
-
-RELOC_NUMBER (R_PARISC_PCREL16WF, 78)
-/* load/store mod. comp. (2) symbol - PC - 8 + addend */
-
-RELOC_NUMBER (R_PARISC_PCREL16DF, 79)
-/* load/store doubleword (3) symbol - PC - 8 + addend */
-
-
-RELOC_NUMBER (R_PARISC_DIR64, 80)
-/* 64-bit doubleword symbol + addend */
-
-RELOC_NUMBER (R_PARISC_DIR14WR, 83)
-/* load/store mod. comp. (2) RR(symbol, addend) */
-
-RELOC_NUMBER (R_PARISC_DIR14DR, 84)
-/* load/store doubleword (3) RR(symbol, addend) */
-
-RELOC_NUMBER (R_PARISC_DIR16F, 85)
-/* load/store (1) symbol + addend */
-
-RELOC_NUMBER (R_PARISC_DIR16WF, 86)
-/* load/store mod. comp. (2) symbol + addend */
-
-RELOC_NUMBER (R_PARISC_DIR16DF, 87)
-/* load/store doubleword (3) symbol + addend */
-
-RELOC_NUMBER (R_PARISC_GPREL64, 88)
-/* 64-bit doubleword symbol - GP + addend */
-
-RELOC_NUMBER (R_PARISC_DLTREL14WR, 91)
-/* load/store mod. comp. (2) RR(symbol - GP, addend) */
-
-RELOC_NUMBER (R_PARISC_DLTREL14DR, 92)
-/* load/store doubleword (3) RR(symbol - GP, addend) */
-
-RELOC_NUMBER (R_PARISC_GPREL16F, 93)
-/* load/store (1) symbol - GP + addend */
-
-RELOC_NUMBER (R_PARISC_GPREL16WF, 94)
-/* load/store mod. comp. (2) symbol - GP + addend */
-
-RELOC_NUMBER (R_PARISC_GPREL16DF, 95)
-/* load/store doubleword (3) symbol - GP + addend */
-
-
-RELOC_NUMBER (R_PARISC_LTOFF64, 96)
-/* 64-bit doubleword ltoff(symbol + addend) */
-
-RELOC_NUMBER (R_PARISC_DLTIND14WR, 99)
-/* load/store mod. comp. (2) R(ltoff(symbol + addend)) */
-
-RELOC_NUMBER (R_PARISC_DLTIND14DR, 100)
-/* load/store doubleword (3) R(ltoff(symbol + addend)) */
-
-RELOC_NUMBER (R_PARISC_LTOFF16F, 101)
-/* load/store (1) ltoff(symbol + addend) */
-
-RELOC_NUMBER (R_PARISC_LTOFF16WF, 102)
-/* load/store mod. comp. (2) ltoff(symbol + addend) */
-
-RELOC_NUMBER (R_PARISC_LTOFF16DF, 103)
-/* load/store doubleword (3) ltoff(symbol + addend) */
-
-
-RELOC_NUMBER (R_PARISC_SECREL64, 104)
-/* 64-bit doubleword symbol - SECT + addend */
-
-RELOC_NUMBER (R_PARISC_BASEREL14WR, 107)
-/* load/store mod. comp. (2) RR(symbol - base, addend) */
-
-RELOC_NUMBER (R_PARISC_BASEREL14DR, 108)
-/* load/store doubleword (3) RR(symbol - base, addend) */
-
-
-RELOC_NUMBER (R_PARISC_SEGREL64, 112)
-/* 64-bit doubleword symbol - SB + addend */
-
-RELOC_NUMBER (R_PARISC_PLTOFF14WR, 115)
-/* load/store mod. comp. (2) RR(pltoff(symbol), addend) */
-
-RELOC_NUMBER (R_PARISC_PLTOFF14DR, 116)
-/* load/store doubleword (3) RR(pltoff(symbol), addend) */
-
-RELOC_NUMBER (R_PARISC_PLTOFF16F, 117)
-/* load/store (1) pltoff(symbol) + addend */
-
-RELOC_NUMBER (R_PARISC_PLTOFF16WF, 118)
-/* load/store mod. comp. (2) pltoff(symbol) + addend */
-
-RELOC_NUMBER (R_PARISC_PLTOFF16DF, 119)
-/* load/store doubleword (3) pltoff(symbol) + addend */
-
-
-RELOC_NUMBER (R_PARISC_LTOFF_FPTR64, 120)
-/* 64-bit doubleword ltoff(fptr(symbol+addend)) */
-
-RELOC_NUMBER (R_PARISC_LTOFF_FPTR14WR, 123)
-/* load/store mod. comp. (2) R(ltoff(fptr(symbol+addend))) */
-
-RELOC_NUMBER (R_PARISC_LTOFF_FPTR14DR, 124)
-/* load/store doubleword (3) R(ltoff(fptr(symbol+addend))) */
-
-RELOC_NUMBER (R_PARISC_LTOFF_FPTR16F, 125)
-/* load/store (1) ltoff(fptr(symbol+addend)) */
-
-RELOC_NUMBER (R_PARISC_LTOFF_FPTR16WF, 126)
-/* load/store mod. comp. (2) ltoff(fptr(symbol+addend)) */
-
-RELOC_NUMBER (R_PARISC_LTOFF_FPTR16DF, 127)
-/* load/store doubleword (3) ltoff(fptr(symbol+addend)) */
-
-
-RELOC_NUMBER (R_PARISC_COPY, 128)
-/* data Dynamic relocations only */
-
-RELOC_NUMBER (R_PARISC_IPLT, 129)
-/* plt */
-
-RELOC_NUMBER (R_PARISC_EPLT, 130)
-/* plt */
-
-
-RELOC_NUMBER (R_PARISC_TPREL32, 153)
-/* 32-bit word symbol - TP + addend */
-
-RELOC_NUMBER (R_PARISC_TPREL21L, 154)
-/* long immediate (7) LR(symbol - TP, addend) */
-
-RELOC_NUMBER (R_PARISC_TPREL14R, 158)
-/* load/store (1) RR(symbol - TP, addend) */
-
-
-RELOC_NUMBER (R_PARISC_LTOFF_TP21L, 162)
-/* long immediate (7) L(ltoff(symbol - TP + addend)) */
-
-RELOC_NUMBER (R_PARISC_LTOFF_TP14R, 166)
-/* load/store (1) R(ltoff(symbol - TP + addend)) */
-
-RELOC_NUMBER (R_PARISC_LTOFF_TP14F, 167)
-/* load/store (1) ltoff(symbol - TP + addend) */
-
-
-RELOC_NUMBER (R_PARISC_TPREL64, 216)
-/* 64-bit word symbol - TP + addend */
-
-RELOC_NUMBER (R_PARISC_TPREL14WR, 219)
-/* load/store mod. comp. (2) RR(symbol - TP, addend) */
-
-RELOC_NUMBER (R_PARISC_TPREL14DR, 220)
-/* load/store doubleword (3) RR(symbol - TP, addend) */
-
-RELOC_NUMBER (R_PARISC_TPREL16F, 221)
-/* load/store (1) symbol - TP + addend */
-
-RELOC_NUMBER (R_PARISC_TPREL16WF, 222)
-/* load/store mod. comp. (2) symbol - TP + addend */
-
-RELOC_NUMBER (R_PARISC_TPREL16DF, 223)
-/* load/store doubleword (3) symbol - TP + addend */
-
-
-RELOC_NUMBER (R_PARISC_LTOFF_TP64, 224)
-/* 64-bit doubleword ltoff(symbol - TP + addend) */
-
-RELOC_NUMBER (R_PARISC_LTOFF_TP14WR, 227)
-/* load/store mod. comp. (2) R(ltoff(symbol - TP + addend)) */
-
-RELOC_NUMBER (R_PARISC_LTOFF_TP14DR, 228)
-/* load/store doubleword (3) R(ltoff(symbol - TP + addend)) */
-
-RELOC_NUMBER (R_PARISC_LTOFF_TP16F, 229)
-/* load/store (1) ltoff(symbol - TP + addend) */
-
-RELOC_NUMBER (R_PARISC_LTOFF_TP16WF, 230)
-/* load/store mod. comp. (2) ltoff(symbol - TP + addend) */
-
-RELOC_NUMBER (R_PARISC_LTOFF_TP16DF, 231)
-/* load/store doubleword (3) ltoff(symbol - TP + addend) */
-
-RELOC_NUMBER (R_PARISC_GNU_VTENTRY, 232)
-RELOC_NUMBER (R_PARISC_GNU_VTINHERIT, 233)
-
-RELOC_NUMBER (R_PARISC_TLS_GD21L, 234)
-RELOC_NUMBER (R_PARISC_TLS_GD14R, 235)
-RELOC_NUMBER (R_PARISC_TLS_GDCALL, 236)
-RELOC_NUMBER (R_PARISC_TLS_LDM21L, 237)
-RELOC_NUMBER (R_PARISC_TLS_LDM14R, 238)
-RELOC_NUMBER (R_PARISC_TLS_LDMCALL, 239)
-RELOC_NUMBER (R_PARISC_TLS_LDO21L, 240)
-RELOC_NUMBER (R_PARISC_TLS_LDO14R, 241)
-RELOC_NUMBER (R_PARISC_TLS_DTPMOD32, 242)
-RELOC_NUMBER (R_PARISC_TLS_DTPMOD64, 243)
-RELOC_NUMBER (R_PARISC_TLS_DTPOFF32, 244)
-RELOC_NUMBER (R_PARISC_TLS_DTPOFF64, 245)
-
-END_RELOC_NUMBERS (R_PARISC_UNIMPLEMENTED)
-
-#define R_PARISC_TLS_LE21L R_PARISC_TPREL21L
-#define R_PARISC_TLS_LE14R R_PARISC_TPREL14R
-#define R_PARISC_TLS_IE21L R_PARISC_LTOFF_TP21L
-#define R_PARISC_TLS_IE14R R_PARISC_LTOFF_TP14R
-#define R_PARISC_TLS_TPREL32 R_PARISC_TPREL32
-#define R_PARISC_TLS_TPREL64 R_PARISC_TPREL64
-
-#ifndef RELOC_MACROS_GEN_FUNC
-typedef enum elf_hppa_reloc_type elf_hppa_reloc_type;
-#endif
-
-#define PT_PARISC_ARCHEXT 0x70000000
-#define PT_PARISC_UNWIND 0x70000001
-#define PT_PARISC_WEAKORDER 0x70000002
-
-/* Flag bits in sh_flags of ElfXX_Shdr. */
-#define SHF_HP_TLS 0x01000000
-#define SHF_HP_NEAR_SHARED 0x02000000
-#define SHF_HP_FAR_SHARED 0x04000000
-#define SHF_HP_COMDAT 0x08000000
-#define SHF_HP_CONST 0x00800000
-
-/* Reserved section header indices. */
-#define SHN_TLS_COMMON (SHN_LOOS + 0x0)
-#define SHN_NS_COMMON (SHN_LOOS + 0x1)
-#define SHN_FS_COMMON (SHN_LOOS + 0x2)
-#define SHN_NS_UNDEF (SHN_LOOS + 0x3)
-#define SHN_FS_UNDEF (SHN_LOOS + 0x4)
-#define SHN_HP_EXTERN (SHN_LOOS + 0x5)
-#define SHN_HP_EXTHINT (SHN_LOOS + 0x6)
-#define SHN_HP_UNDEF_BIND_IMM (SHN_LOOS + 0x7)
-
-/* Values of sh_type in ElfXX_Shdr. */
-#define SHT_HP_OVLBITS (SHT_LOOS + 0x0)
-#define SHT_HP_DLKM (SHT_LOOS + 0x1)
-#define SHT_HP_COMDAT (SHT_LOOS + 0x2)
-#define SHT_HP_OBJDICT (SHT_LOOS + 0x3)
-#define SHT_HP_ANNOT (SHT_LOOS + 0x4)
-
-/* Flag bits in p_flags of ElfXX_Phdr. */
-#define PF_HP_CODE 0x00040000
-#define PF_HP_MODIFY 0x00080000
-#define PF_HP_PAGE_SIZE 0x00100000
-#define PF_HP_FAR_SHARED 0x00200000
-#define PF_HP_NEAR_SHARED 0x00400000
-#define PF_HP_LAZYSWAP 0x00800000
-#define PF_HP_CODE_DEPR 0x01000000
-#define PF_HP_MODIFY_DEPR 0x02000000
-#define PF_HP_LAZYSWAP_DEPR 0x04000000
-#define PF_PARISC_SBP 0x08000000
-#define PF_HP_SBP 0x08000000
-
-
-/* Processor specific dynamic array tags. */
-
-/* Arggh. HP's tools define these symbols based on the
- old value of DT_LOOS. So we must do the same to be
- compatible. */
-#define DT_HP_LOAD_MAP (OLD_DT_LOOS + 0x0)
-#define DT_HP_DLD_FLAGS (OLD_DT_LOOS + 0x1)
-#define DT_HP_DLD_HOOK (OLD_DT_LOOS + 0x2)
-#define DT_HP_UX10_INIT (OLD_DT_LOOS + 0x3)
-#define DT_HP_UX10_INITSZ (OLD_DT_LOOS + 0x4)
-#define DT_HP_PREINIT (OLD_DT_LOOS + 0x5)
-#define DT_HP_PREINITSZ (OLD_DT_LOOS + 0x6)
-#define DT_HP_NEEDED (OLD_DT_LOOS + 0x7)
-#define DT_HP_TIME_STAMP (OLD_DT_LOOS + 0x8)
-#define DT_HP_CHECKSUM (OLD_DT_LOOS + 0x9)
-#define DT_HP_GST_SIZE (OLD_DT_LOOS + 0xa)
-#define DT_HP_GST_VERSION (OLD_DT_LOOS + 0xb)
-#define DT_HP_GST_HASHVAL (OLD_DT_LOOS + 0xc)
-#define DT_HP_EPLTREL (OLD_DT_LOOS + 0xd)
-#define DT_HP_EPLTRELSZ (OLD_DT_LOOS + 0xe)
-#define DT_HP_FILTERED (OLD_DT_LOOS + 0xf)
-#define DT_HP_FILTER_TLS (OLD_DT_LOOS + 0x10)
-#define DT_HP_COMPAT_FILTERED (OLD_DT_LOOS + 0x11)
-#define DT_HP_LAZYLOAD (OLD_DT_LOOS + 0x12)
-#define DT_HP_BIND_NOW_COUNT (OLD_DT_LOOS + 0x13)
-#define DT_PLT (OLD_DT_LOOS + 0x14)
-#define DT_PLT_SIZE (OLD_DT_LOOS + 0x15)
-#define DT_DLT (OLD_DT_LOOS + 0x16)
-#define DT_DLT_SIZE (OLD_DT_LOOS + 0x17)
-
-/* Values for DT_HP_DLD_FLAGS. */
-#define DT_HP_DEBUG_PRIVATE 0x00001 /* Map text private */
-#define DT_HP_DEBUG_CALLBACK 0x00002 /* Callback */
-#define DT_HP_DEBUG_CALLBACK_BOR 0x00004 /* BOR callback */
-#define DT_HP_NO_ENVVAR 0x00008 /* No env var */
-#define DT_HP_BIND_NOW 0x00010 /* Bind now */
-#define DT_HP_BIND_NONFATAL 0x00020 /* Bind non-fatal */
-#define DT_HP_BIND_VERBOSE 0x00040 /* Bind verbose */
-#define DT_HP_BIND_RESTRICTED 0x00080 /* Bind restricted */
-#define DT_HP_BIND_SYMBOLIC 0x00100 /* Bind symbolic */
-#define DT_HP_RPATH_FIRST 0x00200 /* RPATH first */
-#define DT_HP_BIND_DEPTH_FIRST 0x00400 /* Bind depth-first */
-#define DT_HP_GST 0x00800 /* Dld global sym table */
-#define DT_HP_SHLIB_FIXED 0x01000 /* shared vtable support */
-#define DT_HP_MERGE_SHLIB_SEG 0x02000 /* merge shlib data segs */
-#define DT_HP_NODELETE 0x04000 /* never unload */
-#define DT_HP_GROUP 0x08000 /* bind only within group */
-#define DT_HP_PROTECT_LINKAGE_TABLE 0x10000 /* protected linkage table */
-
-/* Program header extensions. */
-#define PT_HP_TLS (PT_LOOS + 0x0)
-#define PT_HP_CORE_NONE (PT_LOOS + 0x1)
-#define PT_HP_CORE_VERSION (PT_LOOS + 0x2)
-#define PT_HP_CORE_KERNEL (PT_LOOS + 0x3)
-#define PT_HP_CORE_COMM (PT_LOOS + 0x4)
-#define PT_HP_CORE_PROC (PT_LOOS + 0x5)
-#define PT_HP_CORE_LOADABLE (PT_LOOS + 0x6)
-#define PT_HP_CORE_STACK (PT_LOOS + 0x7)
-#define PT_HP_CORE_SHM (PT_LOOS + 0x8)
-#define PT_HP_CORE_MMF (PT_LOOS + 0x9)
-#define PT_HP_PARALLEL (PT_LOOS + 0x10)
-#define PT_HP_FASTBIND (PT_LOOS + 0x11)
-#define PT_HP_OPT_ANNOT (PT_LOOS + 0x12)
-#define PT_HP_HSL_ANNOT (PT_LOOS + 0x13)
-#define PT_HP_STACK (PT_LOOS + 0x14)
-#define PT_HP_CORE_UTSNAME (PT_LOOS + 0x15)
-
-/* Binding information. */
-#define STB_HP_ALIAS (STB_LOOS + 0x0)
-
-/* Additional symbol types. */
-#define STT_HP_OPAQUE (STT_LOOS + 0x1)
-#define STT_HP_STUB (STT_LOOS + 0x2)
-
-/* Note types. */
-#define NT_HP_COMPILER 1
-#define NT_HP_COPYRIGHT 2
-#define NT_HP_VERSION 3
-#define NT_HP_SRCFILE_INFO 4
-#define NT_HP_LINKER 5
-#define NT_HP_INSTRUMENTED 6
-#define NT_HP_UX_OPTIONS 7
-
-#endif /* _ELF_HPPA_H */
diff --git a/include/elf/i370.h b/include/elf/i370.h
deleted file mode 100644
index 27bfdcc..0000000
--- a/include/elf/i370.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* i370 ELF support for BFD.
- Copyright 2000, 2002 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* This file holds definitions specific to the i370 ELF ABI. Note
- that most of this is not actually implemented by BFD. */
-
-#ifndef _ELF_I370_H
-#define _ELF_I370_H
-
-#include "elf/reloc-macros.h"
-
-/* Processor specific section headers, sh_type field */
-
-#define SHT_ORDERED SHT_HIPROC /* Link editor is to sort the \
- entries in this section \
- based on the address \
- specified in the associated \
- symbol table entry. */
-
-#define EF_I370_RELOCATABLE 0x00010000 /* i370 -mrelocatable flag */
-#define EF_I370_RELOCATABLE_LIB 0x00008000 /* i370 -mrelocatable-lib flag */
-/* Processor specific section flags, sh_flags field */
-
-#define SHF_EXCLUDE 0x80000000 /* Link editor is to exclude \
- this section from executable \
- and shared objects that it \
- builds when those objects \
- are not to be furhter \
- relocated. */
-
-/* i370 relocations
- Note that there is really just one relocation that we currently
- support (and only one that we seem to need, at the moment), and
- that is the 31-bit address relocation. Note that the 370/390
- only supports a 31-bit (2GB) address space. */
-
-START_RELOC_NUMBERS (i370_reloc_type)
- RELOC_NUMBER (R_I370_NONE, 0)
- RELOC_NUMBER (R_I370_ADDR31, 1)
- RELOC_NUMBER (R_I370_ADDR32, 2)
- RELOC_NUMBER (R_I370_ADDR16, 3)
- RELOC_NUMBER (R_I370_REL31, 4)
- RELOC_NUMBER (R_I370_REL32, 5)
- RELOC_NUMBER (R_I370_ADDR12, 6)
- RELOC_NUMBER (R_I370_REL12, 7)
- RELOC_NUMBER (R_I370_ADDR8, 8)
- RELOC_NUMBER (R_I370_REL8, 9)
- RELOC_NUMBER (R_I370_COPY, 10)
- RELOC_NUMBER (R_I370_RELATIVE, 11)
-END_RELOC_NUMBERS (R_I370_max)
-
-#endif /* _ELF_I370_H */
diff --git a/include/elf/i386.h b/include/elf/i386.h
deleted file mode 100644
index e167871..0000000
--- a/include/elf/i386.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/* ix86 ELF support for BFD.
- Copyright 1998, 1999, 2000, 2002, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_I386_H
-#define _ELF_I386_H
-
-#include "elf/reloc-macros.h"
-
-START_RELOC_NUMBERS (elf_i386_reloc_type)
- RELOC_NUMBER (R_386_NONE, 0) /* No reloc */
- RELOC_NUMBER (R_386_32, 1) /* Direct 32 bit */
- RELOC_NUMBER (R_386_PC32, 2) /* PC relative 32 bit */
- RELOC_NUMBER (R_386_GOT32, 3) /* 32 bit GOT entry */
- RELOC_NUMBER (R_386_PLT32, 4) /* 32 bit PLT address */
- RELOC_NUMBER (R_386_COPY, 5) /* Copy symbol at runtime */
- RELOC_NUMBER (R_386_GLOB_DAT, 6) /* Create GOT entry */
- RELOC_NUMBER (R_386_JUMP_SLOT, 7) /* Create PLT entry */
- RELOC_NUMBER (R_386_RELATIVE, 8) /* Adjust by program base */
- RELOC_NUMBER (R_386_GOTOFF, 9) /* 32 bit offset to GOT */
- RELOC_NUMBER (R_386_GOTPC, 10) /* 32 bit PC relative offset to GOT */
- RELOC_NUMBER (R_386_32PLT, 11) /* Used by Sun */
- FAKE_RELOC (FIRST_INVALID_RELOC, 12)
- FAKE_RELOC (LAST_INVALID_RELOC, 13)
- RELOC_NUMBER (R_386_TLS_TPOFF,14)
- RELOC_NUMBER (R_386_TLS_IE, 15)
- RELOC_NUMBER (R_386_TLS_GOTIE,16)
- RELOC_NUMBER (R_386_TLS_LE, 17)
- RELOC_NUMBER (R_386_TLS_GD, 18)
- RELOC_NUMBER (R_386_TLS_LDM, 19)
- RELOC_NUMBER (R_386_16, 20)
- RELOC_NUMBER (R_386_PC16, 21)
- RELOC_NUMBER (R_386_8, 22)
- RELOC_NUMBER (R_386_PC8, 23)
- RELOC_NUMBER (R_386_TLS_GD_32, 24)
- RELOC_NUMBER (R_386_TLS_GD_PUSH, 25)
- RELOC_NUMBER (R_386_TLS_GD_CALL, 26)
- RELOC_NUMBER (R_386_TLS_GD_POP, 27)
- RELOC_NUMBER (R_386_TLS_LDM_32, 28)
- RELOC_NUMBER (R_386_TLS_LDM_PUSH, 29)
- RELOC_NUMBER (R_386_TLS_LDM_CALL, 30)
- RELOC_NUMBER (R_386_TLS_LDM_POP, 31)
- RELOC_NUMBER (R_386_TLS_LDO_32, 32)
- RELOC_NUMBER (R_386_TLS_IE_32, 33)
- RELOC_NUMBER (R_386_TLS_LE_32, 34)
- RELOC_NUMBER (R_386_TLS_DTPMOD32, 35)
- RELOC_NUMBER (R_386_TLS_DTPOFF32, 36)
- RELOC_NUMBER (R_386_TLS_TPOFF32, 37)
-/* 38 */
- RELOC_NUMBER (R_386_TLS_GOTDESC, 39)
- RELOC_NUMBER (R_386_TLS_DESC_CALL,40)
- RELOC_NUMBER (R_386_TLS_DESC, 41)
-
- /* Used by Intel. */
- RELOC_NUMBER (R_386_USED_BY_INTEL_200, 200)
-
- /* These are GNU extensions to enable C++ vtable garbage collection. */
- RELOC_NUMBER (R_386_GNU_VTINHERIT, 250)
- RELOC_NUMBER (R_386_GNU_VTENTRY, 251)
-END_RELOC_NUMBERS (R_386_max)
-
-#endif
diff --git a/include/elf/i860.h b/include/elf/i860.h
deleted file mode 100644
index 9e76dcd..0000000
--- a/include/elf/i860.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* i860 ELF support for BFD.
- Copyright 2000 Free Software Foundation, Inc.
-
- Contributed by Jason Eckhardt <jle@cygnus.com>.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_I860_H
-#define _ELF_I860_H
-
-/* Note: i860 ELF is defined to use only RELA relocations. */
-
-#include "elf/reloc-macros.h"
-
-START_RELOC_NUMBERS (elf_i860_reloc_type)
- RELOC_NUMBER (R_860_NONE, 0x00) /* No reloc */
- RELOC_NUMBER (R_860_32, 0x01) /* S+A */
- RELOC_NUMBER (R_860_COPY, 0x02) /* No calculation */
- RELOC_NUMBER (R_860_GLOB_DAT, 0x03) /* S, Create GOT entry */
- RELOC_NUMBER (R_860_JUMP_SLOT, 0x04) /* S+A, Create PLT entry */
- RELOC_NUMBER (R_860_RELATIVE, 0x05) /* B+A, Adj by program base */
- RELOC_NUMBER (R_860_PC26, 0x30) /* (S+A-P) >> 2 */
- RELOC_NUMBER (R_860_PLT26, 0x31) /* (L+A-P) >> 2 */
- RELOC_NUMBER (R_860_PC16, 0x32) /* (S+A-P) >> 2 */
- RELOC_NUMBER (R_860_LOW0, 0x40) /* S+A */
- RELOC_NUMBER (R_860_SPLIT0, 0x42) /* S+A */
- RELOC_NUMBER (R_860_LOW1, 0x44) /* S+A */
- RELOC_NUMBER (R_860_SPLIT1, 0x46) /* S+A */
- RELOC_NUMBER (R_860_LOW2, 0x48) /* S+A */
- RELOC_NUMBER (R_860_SPLIT2, 0x4A) /* S+A */
- RELOC_NUMBER (R_860_LOW3, 0x4C) /* S+A */
- RELOC_NUMBER (R_860_LOGOT0, 0x50) /* G */
- RELOC_NUMBER (R_860_SPGOT0, 0x52) /* G */
- RELOC_NUMBER (R_860_LOGOT1, 0x54) /* G */
- RELOC_NUMBER (R_860_SPGOT1, 0x56) /* G */
- RELOC_NUMBER (R_860_LOGOTOFF0, 0x60) /* O */
- RELOC_NUMBER (R_860_SPGOTOFF0, 0x62) /* O */
- RELOC_NUMBER (R_860_LOGOTOFF1, 0x64) /* O */
- RELOC_NUMBER (R_860_SPGOTOFF1, 0x66) /* O */
- RELOC_NUMBER (R_860_LOGOTOFF2, 0x68) /* O */
- RELOC_NUMBER (R_860_LOGOTOFF3, 0x6C) /* O */
- RELOC_NUMBER (R_860_LOPC, 0x70) /* (S+A-P) >> 2 */
- RELOC_NUMBER (R_860_HIGHADJ, 0x80) /* hiadj(S+A) */
- RELOC_NUMBER (R_860_HAGOT, 0x90) /* hiadj(G) */
- RELOC_NUMBER (R_860_HAGOTOFF, 0xA0) /* hiadj(O) */
- RELOC_NUMBER (R_860_HAPC, 0xB0) /* hiadj((S+A-P) >> 2) */
- RELOC_NUMBER (R_860_HIGH, 0xC0) /* (S+A) >> 16 */
- RELOC_NUMBER (R_860_HIGOT, 0xD0) /* G >> 16 */
- RELOC_NUMBER (R_860_HIGOTOFF, 0xE0) /* O */
-END_RELOC_NUMBERS (R_860_max)
-
-#endif
diff --git a/include/elf/i960.h b/include/elf/i960.h
deleted file mode 100644
index b96aae9..0000000
--- a/include/elf/i960.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Intel 960 ELF support for BFD.
- Copyright 1999, 2000 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_I960_H
-#define _ELF_I960_H
-
-#include "elf/reloc-macros.h"
-
-
-START_RELOC_NUMBERS (elf_i960_reloc_type)
- RELOC_NUMBER (R_960_NONE, 0)
- RELOC_NUMBER (R_960_12, 1)
- RELOC_NUMBER (R_960_32, 2)
- RELOC_NUMBER (R_960_IP24, 3)
- RELOC_NUMBER (R_960_SUB, 4)
- RELOC_NUMBER (R_960_OPTCALL, 5)
- RELOC_NUMBER (R_960_OPTCALLX, 6)
- RELOC_NUMBER (R_960_OPTCALLXA, 7)
-END_RELOC_NUMBERS (R_960_max)
-
-#endif /* _ELF_I960_H */
diff --git a/include/elf/ia64.h b/include/elf/ia64.h
deleted file mode 100644
index d86d630..0000000
--- a/include/elf/ia64.h
+++ /dev/null
@@ -1,283 +0,0 @@
-/* IA-64 ELF support for BFD.
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2008
- Free Software Foundation, Inc.
- Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_IA64_H
-#define _ELF_IA64_H
-
-/* Bits in the e_flags field of the Elf64_Ehdr: */
-
-#define EF_IA_64_MASKOS 0x0000000f /* OS-specific flags. */
-#define EF_IA_64_ARCH 0xff000000 /* Arch. version mask. */
-
-/* ??? These four definitions are not part of the SVR4 ABI.
- They were present in David's initial code drop, so it is probable
- that they are used by HP/UX. */
-#define EF_IA_64_TRAPNIL (1 << 0) /* Trap NIL pointer dereferences. */
-#define EF_IA_64_EXT (1 << 2) /* Program uses arch. extensions. */
-#define EF_IA_64_BE (1 << 3) /* PSR BE bit set (big-endian). */
-#define EFA_IA_64_EAS2_3 0x23000000 /* IA64 EAS 2.3. */
-
-#define EF_IA_64_ABI64 (1 << 4) /* 64-bit ABI. */
-/* Not used yet. */
-#define EF_IA_64_REDUCEDFP (1 << 5) /* Only FP6-FP11 used. */
-#define EF_IA_64_CONS_GP (1 << 6) /* gp as program wide constant. */
-#define EF_IA_64_NOFUNCDESC_CONS_GP (1 << 7) /* And no function descriptors. */
-/* Not used yet. */
-#define EF_IA_64_ABSOLUTE (1 << 8) /* Load at absolute addresses. */
-
-#define ELF_STRING_ia64_archext ".IA_64.archext"
-#define ELF_STRING_ia64_pltoff ".IA_64.pltoff"
-#define ELF_STRING_ia64_unwind ".IA_64.unwind"
-#define ELF_STRING_ia64_unwind_info ".IA_64.unwind_info"
-#define ELF_STRING_ia64_unwind_once ".gnu.linkonce.ia64unw."
-#define ELF_STRING_ia64_unwind_info_once ".gnu.linkonce.ia64unwi."
-/* .IA_64.unwind_hdr is only used by HP-UX. */
-#define ELF_STRING_ia64_unwind_hdr ".IA_64.unwind_hdr"
-
-/* Bits in the sh_flags field of Elf64_Shdr: */
-
-#define SHF_IA_64_SHORT 0x10000000 /* Section near gp. */
-#define SHF_IA_64_NORECOV 0x20000000 /* Spec insns w/o recovery. */
-
-#define SHF_IA_64_HP_TLS 0x01000000 /* HP specific TLS flag. */
-
-#define SHF_IA_64_VMS_GLOBAL 0x0100000000ULL /* Global for clustering. */
-#define SHF_IA_64_VMS_OVERLAID 0x0200000000ULL /* To be overlaid. */
-#define SHF_IA_64_VMS_SHARED 0x0400000000ULL /* Shared btw processes. */
-#define SHF_IA_64_VMS_VECTOR 0x0800000000ULL /* Priv change mode vect. */
-#define SHF_IA_64_VMS_ALLOC_64BIT 0x1000000000ULL /* Allocate beyond 2GB. */
-#define SHF_IA_64_VMS_PROTECTED 0x2000000000ULL /* Export from sharable. */
-
-/* Possible values for sh_type in Elf64_Shdr: */
-
-#define SHT_IA_64_EXT (SHT_LOPROC + 0) /* Extension bits. */
-#define SHT_IA_64_UNWIND (SHT_LOPROC + 1) /* Unwind bits. */
-#define SHT_IA_64_LOPSREG (SHT_LOPROC + 0x8000000)
-/* ABI says (SHT_LOPROC + 0xfffffff) but I think it's a typo -- this makes sense. */
-#define SHT_IA_64_HIPSREG (SHT_LOPROC + 0x8ffffff)
-#define SHT_IA_64_PRIORITY_INIT (SHT_LOPROC + 0x9000000)
-
-/* SHT_IA_64_HP_OPT_ANOT is only generated by HPUX compilers for its
- optimization annotation section. GCC does not generate it but we
- want readelf to know what they are. Do not use two capital Ns in
- annotate or sed will turn it into 32 or 64 during the build. */
-#define SHT_IA_64_HP_OPT_ANOT 0x60000004
-
-/* OpenVMS section types. */
-/* The section contains PC-to-source correlation information for use by the
- VMS RTL's traceback facility. */
-#define SHT_IA_64_VMS_TRACE 0x60000000
-/* The section contains routine signature information for use by the
- translated image executive. */
-#define SHT_IA_64_VMS_TIE_SIGNATURES 0x60000001
-/* The section contains dwarf-3 information. */
-#define SHT_IA_64_VMS_DEBUG 0x60000002
-/* The section contains the dwarf-3 string table. */
-#define SHT_IA_64_VMS_DEBUG_STR 0x60000003
-/* The section contains linkage information to perform consistency checking
- accross object modules. */
-#define SHT_IA_64_VMS_LINKAGES 0x60000004
-/* The section allows the symbol vector in an image to be location through
- the section table. */
-#define SHT_IA_64_VMS_SYMBOL_VECTOR 0x60000005
-/* The section contains inter-image fixups. */
-#define SHT_IA_64_VMS_FIXUP 0x60000006
-
-/* Bits in the p_flags field of Elf64_Phdr: */
-
-#define PF_IA_64_NORECOV 0x80000000
-
-/* Possible values for p_type in Elf64_Phdr: */
-
-#define PT_IA_64_ARCHEXT (PT_LOPROC + 0) /* Arch extension bits, */
-#define PT_IA_64_UNWIND (PT_LOPROC + 1) /* IA64 unwind bits. */
-
-/* HP-UX specific values for p_type in Elf64_Phdr.
- These values are currently just used to make
- readelf more usable on HP-UX. */
-
-#define PT_IA_64_HP_OPT_ANOT (PT_LOOS + 0x12)
-#define PT_IA_64_HP_HSL_ANOT (PT_LOOS + 0x13)
-#define PT_IA_64_HP_STACK (PT_LOOS + 0x14)
-
-/* Possible values for d_tag in Elf64_Dyn: */
-
-#define DT_IA_64_PLT_RESERVE (DT_LOPROC + 0)
-
-/* VMS specific values for d_tag in Elf64_Dyn: */
-
-#define DT_IA_64_VMS_SUBTYPE (DT_LOOS + 0)
-#define DT_IA_64_VMS_IMGIOCNT (DT_LOOS + 2)
-#define DT_IA_64_VMS_LNKFLAGS (DT_LOOS + 8)
-#define DT_IA_64_VMS_VIR_MEM_BLK_SIZ (DT_LOOS + 10)
-#define DT_IA_64_VMS_IDENT (DT_LOOS + 12)
-#define DT_IA_64_VMS_NEEDED_IDENT (DT_LOOS + 16)
-#define DT_IA_64_VMS_IMG_RELA_CNT (DT_LOOS + 18)
-#define DT_IA_64_VMS_SEG_RELA_CNT (DT_LOOS + 20)
-#define DT_IA_64_VMS_FIXUP_RELA_CNT (DT_LOOS + 22)
-#define DT_IA_64_VMS_FIXUP_NEEDED (DT_LOOS + 24)
-#define DT_IA_64_VMS_SYMVEC_CNT (DT_LOOS + 26)
-#define DT_IA_64_VMS_XLATED (DT_LOOS + 30)
-#define DT_IA_64_VMS_STACKSIZE (DT_LOOS + 32)
-#define DT_IA_64_VMS_UNWINDSZ (DT_LOOS + 34)
-#define DT_IA_64_VMS_UNWIND_CODSEG (DT_LOOS + 36)
-#define DT_IA_64_VMS_UNWIND_INFOSEG (DT_LOOS + 38)
-#define DT_IA_64_VMS_LINKTIME (DT_LOOS + 40)
-#define DT_IA_64_VMS_SEG_NO (DT_LOOS + 42)
-#define DT_IA_64_VMS_SYMVEC_OFFSET (DT_LOOS + 44)
-#define DT_IA_64_VMS_SYMVEC_SEG (DT_LOOS + 46)
-#define DT_IA_64_VMS_UNWIND_OFFSET (DT_LOOS + 48)
-#define DT_IA_64_VMS_UNWIND_SEG (DT_LOOS + 50)
-#define DT_IA_64_VMS_STRTAB_OFFSET (DT_LOOS + 52)
-#define DT_IA_64_VMS_SYSVER_OFFSET (DT_LOOS + 54)
-#define DT_IA_64_VMS_IMG_RELA_OFF (DT_LOOS + 56)
-#define DT_IA_64_VMS_SEG_RELA_OFF (DT_LOOS + 58)
-#define DT_IA_64_VMS_FIXUP_RELA_OFF (DT_LOOS + 60)
-#define DT_IA_64_VMS_PLTGOT_OFFSET (DT_LOOS + 62)
-#define DT_IA_64_VMS_PLTGOT_SEG (DT_LOOS + 64)
-#define DT_IA_64_VMS_FPMODE (DT_LOOS + 66)
-
-/* This section only used by HP-UX, The HP linker gives weak symbols
- precedence over regular common symbols. We want common to override
- weak. Using this common instead of SHN_COMMON does that. */
-#define SHN_IA_64_ANSI_COMMON SHN_LORESERVE
-
-/* This section is only used by OpenVMS. Symbol is defined in the symbol
- vector (only possible for image files). */
-#define SHN_IA_64_VMS_SYMVEC SHN_LOOS
-
-/* IA64-specific relocation types: */
-
-/* Relocs apply to specific instructions within a bundle. The least
- significant 2 bits of the address indicate which instruction in the
- bundle the reloc refers to (0=first slot, 1=second slow, 2=third
- slot, 3=undefined) and the remaining bits give the address of the
- bundle (16 byte aligned).
-
- The top 5 bits of the reloc code specifies the expression type, the
- low 3 bits the format of the data word being relocated. */
-
-#include "elf/reloc-macros.h"
-
-START_RELOC_NUMBERS (elf_ia64_reloc_type)
- RELOC_NUMBER (R_IA64_NONE, 0x00) /* none */
-
- RELOC_NUMBER (R_IA64_IMM14, 0x21) /* symbol + addend, add imm14 */
- RELOC_NUMBER (R_IA64_IMM22, 0x22) /* symbol + addend, add imm22 */
- RELOC_NUMBER (R_IA64_IMM64, 0x23) /* symbol + addend, mov imm64 */
- RELOC_NUMBER (R_IA64_DIR32MSB, 0x24) /* symbol + addend, data4 MSB */
- RELOC_NUMBER (R_IA64_DIR32LSB, 0x25) /* symbol + addend, data4 LSB */
- RELOC_NUMBER (R_IA64_DIR64MSB, 0x26) /* symbol + addend, data8 MSB */
- RELOC_NUMBER (R_IA64_DIR64LSB, 0x27) /* symbol + addend, data8 LSB */
-
- RELOC_NUMBER (R_IA64_GPREL22, 0x2a) /* @gprel(sym+add), add imm22 */
- RELOC_NUMBER (R_IA64_GPREL64I, 0x2b) /* @gprel(sym+add), mov imm64 */
- RELOC_NUMBER (R_IA64_GPREL32MSB, 0x2c) /* @gprel(sym+add), data4 MSB */
- RELOC_NUMBER (R_IA64_GPREL32LSB, 0x2d) /* @gprel(sym+add), data4 LSB */
- RELOC_NUMBER (R_IA64_GPREL64MSB, 0x2e) /* @gprel(sym+add), data8 MSB */
- RELOC_NUMBER (R_IA64_GPREL64LSB, 0x2f) /* @gprel(sym+add), data8 LSB */
-
- RELOC_NUMBER (R_IA64_LTOFF22, 0x32) /* @ltoff(sym+add), add imm22 */
- RELOC_NUMBER (R_IA64_LTOFF64I, 0x33) /* @ltoff(sym+add), mov imm64 */
-
- RELOC_NUMBER (R_IA64_PLTOFF22, 0x3a) /* @pltoff(sym+add), add imm22 */
- RELOC_NUMBER (R_IA64_PLTOFF64I, 0x3b) /* @pltoff(sym+add), mov imm64 */
- RELOC_NUMBER (R_IA64_PLTOFF64MSB, 0x3e) /* @pltoff(sym+add), data8 MSB */
- RELOC_NUMBER (R_IA64_PLTOFF64LSB, 0x3f) /* @pltoff(sym+add), data8 LSB */
-
- RELOC_NUMBER (R_IA64_FPTR64I, 0x43) /* @fptr(sym+add), mov imm64 */
- RELOC_NUMBER (R_IA64_FPTR32MSB, 0x44) /* @fptr(sym+add), data4 MSB */
- RELOC_NUMBER (R_IA64_FPTR32LSB, 0x45) /* @fptr(sym+add), data4 LSB */
- RELOC_NUMBER (R_IA64_FPTR64MSB, 0x46) /* @fptr(sym+add), data8 MSB */
- RELOC_NUMBER (R_IA64_FPTR64LSB, 0x47) /* @fptr(sym+add), data8 LSB */
-
- RELOC_NUMBER (R_IA64_PCREL60B, 0x48) /* @pcrel(sym+add), brl */
- RELOC_NUMBER (R_IA64_PCREL21B, 0x49) /* @pcrel(sym+add), ptb, call */
- RELOC_NUMBER (R_IA64_PCREL21M, 0x4a) /* @pcrel(sym+add), chk.s */
- RELOC_NUMBER (R_IA64_PCREL21F, 0x4b) /* @pcrel(sym+add), fchkf */
- RELOC_NUMBER (R_IA64_PCREL32MSB, 0x4c) /* @pcrel(sym+add), data4 MSB */
- RELOC_NUMBER (R_IA64_PCREL32LSB, 0x4d) /* @pcrel(sym+add), data4 LSB */
- RELOC_NUMBER (R_IA64_PCREL64MSB, 0x4e) /* @pcrel(sym+add), data8 MSB */
- RELOC_NUMBER (R_IA64_PCREL64LSB, 0x4f) /* @pcrel(sym+add), data8 LSB */
-
- RELOC_NUMBER (R_IA64_LTOFF_FPTR22, 0x52) /* @ltoff(@fptr(s+a)), imm22 */
- RELOC_NUMBER (R_IA64_LTOFF_FPTR64I, 0x53) /* @ltoff(@fptr(s+a)), imm64 */
- RELOC_NUMBER (R_IA64_LTOFF_FPTR32MSB, 0x54) /* @ltoff(@fptr(s+a)), 4 MSB */
- RELOC_NUMBER (R_IA64_LTOFF_FPTR32LSB, 0x55) /* @ltoff(@fptr(s+a)), 4 LSB */
- RELOC_NUMBER (R_IA64_LTOFF_FPTR64MSB, 0x56) /* @ltoff(@fptr(s+a)), 8 MSB */
- RELOC_NUMBER (R_IA64_LTOFF_FPTR64LSB, 0x57) /* @ltoff(@fptr(s+a)), 8 LSB */
-
- RELOC_NUMBER (R_IA64_SEGREL32MSB, 0x5c) /* @segrel(sym+add), data4 MSB */
- RELOC_NUMBER (R_IA64_SEGREL32LSB, 0x5d) /* @segrel(sym+add), data4 LSB */
- RELOC_NUMBER (R_IA64_SEGREL64MSB, 0x5e) /* @segrel(sym+add), data8 MSB */
- RELOC_NUMBER (R_IA64_SEGREL64LSB, 0x5f) /* @segrel(sym+add), data8 LSB */
-
- RELOC_NUMBER (R_IA64_SECREL32MSB, 0x64) /* @secrel(sym+add), data4 MSB */
- RELOC_NUMBER (R_IA64_SECREL32LSB, 0x65) /* @secrel(sym+add), data4 LSB */
- RELOC_NUMBER (R_IA64_SECREL64MSB, 0x66) /* @secrel(sym+add), data8 MSB */
- RELOC_NUMBER (R_IA64_SECREL64LSB, 0x67) /* @secrel(sym+add), data8 LSB */
-
- RELOC_NUMBER (R_IA64_REL32MSB, 0x6c) /* data 4 + REL */
- RELOC_NUMBER (R_IA64_REL32LSB, 0x6d) /* data 4 + REL */
- RELOC_NUMBER (R_IA64_REL64MSB, 0x6e) /* data 8 + REL */
- RELOC_NUMBER (R_IA64_REL64LSB, 0x6f) /* data 8 + REL */
-
- RELOC_NUMBER (R_IA64_LTV32MSB, 0x74) /* symbol + addend, data4 MSB */
- RELOC_NUMBER (R_IA64_LTV32LSB, 0x75) /* symbol + addend, data4 LSB */
- RELOC_NUMBER (R_IA64_LTV64MSB, 0x76) /* symbol + addend, data8 MSB */
- RELOC_NUMBER (R_IA64_LTV64LSB, 0x77) /* symbol + addend, data8 LSB */
-
- RELOC_NUMBER (R_IA64_PCREL21BI, 0x79) /* @pcrel(sym+add), ptb, call */
- RELOC_NUMBER (R_IA64_PCREL22, 0x7a) /* @pcrel(sym+add), imm22 */
- RELOC_NUMBER (R_IA64_PCREL64I, 0x7b) /* @pcrel(sym+add), imm64 */
-
- RELOC_NUMBER (R_IA64_IPLTMSB, 0x80) /* dynamic reloc, imported PLT, MSB */
- RELOC_NUMBER (R_IA64_IPLTLSB, 0x81) /* dynamic reloc, imported PLT, LSB */
- RELOC_NUMBER (R_IA64_COPY, 0x84) /* dynamic reloc, data copy */
- RELOC_NUMBER (R_IA64_LTOFF22X, 0x86) /* LTOFF22, relaxable. */
- RELOC_NUMBER (R_IA64_LDXMOV, 0x87) /* Use of LTOFF22X. */
-
- RELOC_NUMBER (R_IA64_TPREL14, 0x91) /* @tprel(sym+add), add imm14 */
- RELOC_NUMBER (R_IA64_TPREL22, 0x92) /* @tprel(sym+add), add imm22 */
- RELOC_NUMBER (R_IA64_TPREL64I, 0x93) /* @tprel(sym+add), add imm64 */
- RELOC_NUMBER (R_IA64_TPREL64MSB, 0x96) /* @tprel(sym+add), data8 MSB */
- RELOC_NUMBER (R_IA64_TPREL64LSB, 0x97) /* @tprel(sym+add), data8 LSB */
-
- RELOC_NUMBER (R_IA64_LTOFF_TPREL22, 0x9a) /* @ltoff(@tprel(s+a)), add imm22 */
-
- RELOC_NUMBER (R_IA64_DTPMOD64MSB, 0xa6) /* @dtpmod(sym+add), data8 MSB */
- RELOC_NUMBER (R_IA64_DTPMOD64LSB, 0xa7) /* @dtpmod(sym+add), data8 LSB */
- RELOC_NUMBER (R_IA64_LTOFF_DTPMOD22, 0xaa) /* @ltoff(@dtpmod(s+a)), imm22 */
-
- RELOC_NUMBER (R_IA64_DTPREL14, 0xb1) /* @dtprel(sym+add), imm14 */
- RELOC_NUMBER (R_IA64_DTPREL22, 0xb2) /* @dtprel(sym+add), imm22 */
- RELOC_NUMBER (R_IA64_DTPREL64I, 0xb3) /* @dtprel(sym+add), imm64 */
- RELOC_NUMBER (R_IA64_DTPREL32MSB, 0xb4) /* @dtprel(sym+add), data4 MSB */
- RELOC_NUMBER (R_IA64_DTPREL32LSB, 0xb5) /* @dtprel(sym+add), data4 LSB */
- RELOC_NUMBER (R_IA64_DTPREL64MSB, 0xb6) /* @dtprel(sym+add), data8 MSB */
- RELOC_NUMBER (R_IA64_DTPREL64LSB, 0xb7) /* @dtprel(sym+add), data8 LSB */
-
- RELOC_NUMBER (R_IA64_LTOFF_DTPREL22, 0xba) /* @ltoff(@dtprel(s+a)), imm22 */
-
- FAKE_RELOC (R_IA64_MAX_RELOC_CODE, 0xba)
-END_RELOC_NUMBERS (R_IA64_max)
-
-#endif /* _ELF_IA64_H */
diff --git a/include/elf/internal.h b/include/elf/internal.h
deleted file mode 100644
index 9ea175c..0000000
--- a/include/elf/internal.h
+++ /dev/null
@@ -1,333 +0,0 @@
-/* ELF support for BFD.
- Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001, 2002,
- 2003, 2006, 2007, 2008 Free Software Foundation, Inc.
-
- Written by Fred Fish @ Cygnus Support, from information published
- in "UNIX System V Release 4, Programmers Guide: ANSI C and
- Programming Support Tools".
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-
-/* This file is part of ELF support for BFD, and contains the portions
- that describe how ELF is represented internally in the BFD library.
- I.E. it describes the in-memory representation of ELF. It requires
- the elf-common.h file which contains the portions that are common to
- both the internal and external representations. */
-
-
-/* NOTE that these structures are not kept in the same order as they appear
- in the object file. In some cases they've been reordered for more optimal
- packing under various circumstances. */
-
-#ifndef _ELF_INTERNAL_H
-#define _ELF_INTERNAL_H
-
-/* Special section indices, which may show up in st_shndx fields, among
- other places. */
-
-#undef SHN_UNDEF
-#undef SHN_LORESERVE
-#undef SHN_LOPROC
-#undef SHN_HIPROC
-#undef SHN_LOOS
-#undef SHN_HIOS
-#undef SHN_ABS
-#undef SHN_COMMON
-#undef SHN_XINDEX
-#undef SHN_HIRESERVE
-#define SHN_UNDEF 0 /* Undefined section reference */
-#define SHN_LORESERVE (-0x100u) /* Begin range of reserved indices */
-#define SHN_LOPROC (-0x100u) /* Begin range of appl-specific */
-#define SHN_HIPROC (-0xE1u) /* End range of appl-specific */
-#define SHN_LOOS (-0xE0u) /* OS specific semantics, lo */
-#define SHN_HIOS (-0xC1u) /* OS specific semantics, hi */
-#define SHN_ABS (-0xFu) /* Associated symbol is absolute */
-#define SHN_COMMON (-0xEu) /* Associated symbol is in common */
-#define SHN_XINDEX (-0x1u) /* Section index is held elsewhere */
-#define SHN_HIRESERVE (-0x1u) /* End range of reserved indices */
-#define SHN_BAD (-0x101u) /* Used internally by bfd */
-
-/* ELF Header */
-
-#define EI_NIDENT 16 /* Size of e_ident[] */
-
-typedef struct elf_internal_ehdr {
- unsigned char e_ident[EI_NIDENT]; /* ELF "magic number" */
- bfd_vma e_entry; /* Entry point virtual address */
- bfd_size_type e_phoff; /* Program header table file offset */
- bfd_size_type e_shoff; /* Section header table file offset */
- unsigned long e_version; /* Identifies object file version */
- unsigned long e_flags; /* Processor-specific flags */
- unsigned short e_type; /* Identifies object file type */
- unsigned short e_machine; /* Specifies required architecture */
- unsigned int e_ehsize; /* ELF header size in bytes */
- unsigned int e_phentsize; /* Program header table entry size */
- unsigned int e_phnum; /* Program header table entry count */
- unsigned int e_shentsize; /* Section header table entry size */
- unsigned int e_shnum; /* Section header table entry count */
- unsigned int e_shstrndx; /* Section header string table index */
-} Elf_Internal_Ehdr;
-
-/* Program header */
-
-struct elf_internal_phdr {
- unsigned long p_type; /* Identifies program segment type */
- unsigned long p_flags; /* Segment flags */
- bfd_vma p_offset; /* Segment file offset */
- bfd_vma p_vaddr; /* Segment virtual address */
- bfd_vma p_paddr; /* Segment physical address */
- bfd_vma p_filesz; /* Segment size in file */
- bfd_vma p_memsz; /* Segment size in memory */
- bfd_vma p_align; /* Segment alignment, file & memory */
-};
-
-typedef struct elf_internal_phdr Elf_Internal_Phdr;
-
-/* Section header */
-
-typedef struct elf_internal_shdr {
- unsigned int sh_name; /* Section name, index in string tbl */
- unsigned int sh_type; /* Type of section */
- bfd_vma sh_flags; /* Miscellaneous section attributes */
- bfd_vma sh_addr; /* Section virtual addr at execution */
- file_ptr sh_offset; /* Section file offset */
- bfd_size_type sh_size; /* Size of section in bytes */
- unsigned int sh_link; /* Index of another section */
- unsigned int sh_info; /* Additional section information */
- bfd_vma sh_addralign; /* Section alignment */
- bfd_size_type sh_entsize; /* Entry size if section holds table */
-
- /* The internal rep also has some cached info associated with it. */
- asection * bfd_section; /* Associated BFD section. */
- unsigned char *contents; /* Section contents. */
-} Elf_Internal_Shdr;
-
-/* Symbol table entry */
-
-struct elf_internal_sym {
- bfd_vma st_value; /* Value of the symbol */
- bfd_vma st_size; /* Associated symbol size */
- unsigned long st_name; /* Symbol name, index in string tbl */
- unsigned char st_info; /* Type and binding attributes */
- unsigned char st_other; /* Visibilty, and target specific */
- unsigned int st_shndx; /* Associated section index */
-};
-
-typedef struct elf_internal_sym Elf_Internal_Sym;
-
-/* Note segments */
-
-typedef struct elf_internal_note {
- unsigned long namesz; /* Size of entry's owner string */
- unsigned long descsz; /* Size of the note descriptor */
- unsigned long type; /* Interpretation of the descriptor */
- char * namedata; /* Start of the name+desc data */
- char * descdata; /* Start of the desc data */
- bfd_vma descpos; /* File offset of the descdata */
-} Elf_Internal_Note;
-
-/* Relocation Entries */
-
-typedef struct elf_internal_rela {
- bfd_vma r_offset; /* Location at which to apply the action */
- bfd_vma r_info; /* Index and Type of relocation */
- bfd_vma r_addend; /* Constant addend used to compute value */
-} Elf_Internal_Rela;
-
-/* dynamic section structure */
-
-typedef struct elf_internal_dyn {
- /* This needs to support 64-bit values in elf64. */
- bfd_vma d_tag; /* entry tag value */
- union {
- /* This needs to support 64-bit values in elf64. */
- bfd_vma d_val;
- bfd_vma d_ptr;
- } d_un;
-} Elf_Internal_Dyn;
-
-/* This structure appears in a SHT_GNU_verdef section. */
-
-typedef struct elf_internal_verdef {
- unsigned short vd_version; /* Version number of structure. */
- unsigned short vd_flags; /* Flags (VER_FLG_*). */
- unsigned short vd_ndx; /* Version index. */
- unsigned short vd_cnt; /* Number of verdaux entries. */
- unsigned long vd_hash; /* Hash of name. */
- unsigned long vd_aux; /* Offset to verdaux entries. */
- unsigned long vd_next; /* Offset to next verdef. */
-
- /* These fields are set up when BFD reads in the structure. FIXME:
- It would be cleaner to store these in a different structure. */
- bfd *vd_bfd; /* BFD. */
- const char *vd_nodename; /* Version name. */
- struct elf_internal_verdef *vd_nextdef; /* vd_next as pointer. */
- struct elf_internal_verdaux *vd_auxptr; /* vd_aux as pointer. */
- unsigned int vd_exp_refno; /* Used by the linker. */
-} Elf_Internal_Verdef;
-
-/* This structure appears in a SHT_GNU_verdef section. */
-
-typedef struct elf_internal_verdaux {
- unsigned long vda_name; /* String table offset of name. */
- unsigned long vda_next; /* Offset to next verdaux. */
-
- /* These fields are set up when BFD reads in the structure. FIXME:
- It would be cleaner to store these in a different structure. */
- const char *vda_nodename; /* vda_name as pointer. */
- struct elf_internal_verdaux *vda_nextptr; /* vda_next as pointer. */
-} Elf_Internal_Verdaux;
-
-/* This structure appears in a SHT_GNU_verneed section. */
-
-typedef struct elf_internal_verneed {
- unsigned short vn_version; /* Version number of structure. */
- unsigned short vn_cnt; /* Number of vernaux entries. */
- unsigned long vn_file; /* String table offset of library name. */
- unsigned long vn_aux; /* Offset to vernaux entries. */
- unsigned long vn_next; /* Offset to next verneed. */
-
- /* These fields are set up when BFD reads in the structure. FIXME:
- It would be cleaner to store these in a different structure. */
- bfd *vn_bfd; /* BFD. */
- const char *vn_filename; /* vn_file as pointer. */
- struct elf_internal_vernaux *vn_auxptr; /* vn_aux as pointer. */
- struct elf_internal_verneed *vn_nextref; /* vn_nextref as pointer. */
-} Elf_Internal_Verneed;
-
-/* This structure appears in a SHT_GNU_verneed section. */
-
-typedef struct elf_internal_vernaux {
- unsigned long vna_hash; /* Hash of dependency name. */
- unsigned short vna_flags; /* Flags (VER_FLG_*). */
- unsigned short vna_other; /* Unused. */
- unsigned long vna_name; /* String table offset to version name. */
- unsigned long vna_next; /* Offset to next vernaux. */
-
- /* These fields are set up when BFD reads in the structure. FIXME:
- It would be cleaner to store these in a different structure. */
- const char *vna_nodename; /* vna_name as pointer. */
- struct elf_internal_vernaux *vna_nextptr; /* vna_next as pointer. */
-} Elf_Internal_Vernaux;
-
-/* This structure appears in a SHT_GNU_versym section. This is not a
- standard ELF structure; ELF just uses Elf32_Half. */
-
-typedef struct elf_internal_versym {
- unsigned short vs_vers;
-} Elf_Internal_Versym;
-
-/* Structure for syminfo section. */
-typedef struct
-{
- unsigned short int si_boundto;
- unsigned short int si_flags;
-} Elf_Internal_Syminfo;
-
-/* This structure appears on the stack and in NT_AUXV core file notes. */
-typedef struct
-{
- bfd_vma a_type;
- bfd_vma a_val;
-} Elf_Internal_Auxv;
-
-
-/* This structure is used to describe how sections should be assigned
- to program segments. */
-
-struct elf_segment_map
-{
- /* Next program segment. */
- struct elf_segment_map *next;
- /* Program segment type. */
- unsigned long p_type;
- /* Program segment flags. */
- unsigned long p_flags;
- /* Program segment physical address. */
- bfd_vma p_paddr;
- /* Program segment virtual address offset from section vma. */
- bfd_vma p_vaddr_offset;
- /* Program segment alignment. */
- bfd_vma p_align;
- /* Segment size in file and memory */
- bfd_vma p_size;
- /* Required size of filehdr + phdrs, if non-zero */
- bfd_vma header_size;
- /* Whether the p_flags field is valid; if not, the flags are based
- on the section flags. */
- unsigned int p_flags_valid : 1;
- /* Whether the p_paddr field is valid; if not, the physical address
- is based on the section lma values. */
- unsigned int p_paddr_valid : 1;
- /* Whether the p_align field is valid; if not, PT_LOAD segment
- alignment is based on the default maximum page size. */
- unsigned int p_align_valid : 1;
- /* Whether the p_size field is valid; if not, the size are based
- on the section sizes. */
- unsigned int p_size_valid : 1;
- /* Whether this segment includes the file header. */
- unsigned int includes_filehdr : 1;
- /* Whether this segment includes the program headers. */
- unsigned int includes_phdrs : 1;
- /* Number of sections (may be 0). */
- unsigned int count;
- /* Sections. Actual number of elements is in count field. */
- asection *sections[1];
-};
-
-/* .tbss is special. It doesn't contribute memory space to normal
- segments and it doesn't take file space in normal segments. */
-#define ELF_SECTION_SIZE(sec_hdr, segment) \
- (((sec_hdr->sh_flags & SHF_TLS) == 0 \
- || sec_hdr->sh_type != SHT_NOBITS \
- || segment->p_type == PT_TLS) ? sec_hdr->sh_size : 0)
-
-/* Decide if the given sec_hdr is in the given segment. PT_TLS segment
- contains only SHF_TLS sections. Only PT_LOAD, PT_GNU_RELRO and
- and PT_TLS segments can contain SHF_TLS sections. */
-#define ELF_IS_SECTION_IN_SEGMENT(sec_hdr, segment) \
- (((((sec_hdr->sh_flags & SHF_TLS) != 0) \
- && (segment->p_type == PT_TLS \
- || segment->p_type == PT_GNU_RELRO \
- || segment->p_type == PT_LOAD)) \
- || ((sec_hdr->sh_flags & SHF_TLS) == 0 \
- && segment->p_type != PT_TLS)) \
- /* Any section besides one of type SHT_NOBITS must have a file \
- offset within the segment. */ \
- && (sec_hdr->sh_type == SHT_NOBITS \
- || ((bfd_vma) sec_hdr->sh_offset >= segment->p_offset \
- && (sec_hdr->sh_offset + ELF_SECTION_SIZE(sec_hdr, segment) \
- <= segment->p_offset + segment->p_filesz))) \
- /* SHF_ALLOC sections must have VMAs within the segment. Be \
- careful about segments right at the end of memory. */ \
- && ((sec_hdr->sh_flags & SHF_ALLOC) == 0 \
- || (sec_hdr->sh_addr >= segment->p_vaddr \
- && (sec_hdr->sh_addr - segment->p_vaddr \
- + ELF_SECTION_SIZE(sec_hdr, segment) <= segment->p_memsz))))
-
-/* Decide if the given sec_hdr is in the given segment in file. */
-#define ELF_IS_SECTION_IN_SEGMENT_FILE(sec_hdr, segment) \
- (sec_hdr->sh_size > 0 \
- && ELF_IS_SECTION_IN_SEGMENT (sec_hdr, segment))
-
-/* Decide if the given sec_hdr is in the given segment in memory. */
-#define ELF_IS_SECTION_IN_SEGMENT_MEMORY(sec_hdr, segment) \
- (ELF_SECTION_SIZE(sec_hdr, segment) > 0 \
- && ELF_IS_SECTION_IN_SEGMENT (sec_hdr, segment))
-
-#endif /* _ELF_INTERNAL_H */
diff --git a/include/elf/ip2k.h b/include/elf/ip2k.h
deleted file mode 100644
index 83fe1d4..0000000
--- a/include/elf/ip2k.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* IP2xxx ELF support for BFD.
- Copyright (C) 2000, 2002 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_IP2K_H
-#define _ELF_IP2K_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocations. */
-START_RELOC_NUMBERS (elf_ip2k_reloc_type)
- RELOC_NUMBER (R_IP2K_NONE, 0)
- RELOC_NUMBER (R_IP2K_16, 1)
- RELOC_NUMBER (R_IP2K_32, 2)
- RELOC_NUMBER (R_IP2K_FR9, 3)
- RELOC_NUMBER (R_IP2K_BANK, 4)
- RELOC_NUMBER (R_IP2K_ADDR16CJP, 5)
- RELOC_NUMBER (R_IP2K_PAGE3, 6)
- RELOC_NUMBER (R_IP2K_LO8DATA, 7)
- RELOC_NUMBER (R_IP2K_HI8DATA, 8)
- RELOC_NUMBER (R_IP2K_LO8INSN, 9)
- RELOC_NUMBER (R_IP2K_HI8INSN, 10)
- RELOC_NUMBER (R_IP2K_PC_SKIP, 11)
- RELOC_NUMBER (R_IP2K_TEXT, 12)
- RELOC_NUMBER (R_IP2K_FR_OFFSET, 13)
- RELOC_NUMBER (R_IP2K_EX8DATA, 14)
-END_RELOC_NUMBERS(R_IP2K_max)
-
-
-/* Define the data & instruction memory discriminator. In a linked
- executable, an symbol should be deemed to point to an instruction
- if ((address & IP2K_INSN_MASK) == IP2K_INSN_VALUE), and similarly
- for the data space. See also `ld/emulparams/elf32ip2k.sh'. */
-/* ??? Consider extending the _MASK values to include all the
- intermediate bits that must be zero due to the limited physical
- memory size on the IP2K. */
-
-#define IP2K_DATA_MASK 0xff000000
-#define IP2K_DATA_VALUE 0x01000000
-#define IP2K_INSN_MASK 0xff000000
-#define IP2K_INSN_VALUE 0x02000000
-
-/* The location of the memory mapped hardware stack. */
-#define IP2K_STACK_VALUE 0x0f000000
-#define IP2K_STACK_SIZE 0x20
-
-#endif /* _ELF_IP2K_H */
diff --git a/include/elf/iq2000.h b/include/elf/iq2000.h
deleted file mode 100644
index 012f253..0000000
--- a/include/elf/iq2000.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* IQ2000 ELF support for BFD.
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software Foundation, Inc.,
-51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_IQ2000_H
-#define _ELF_IQ2000_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocations. */
-START_RELOC_NUMBERS (elf_iq2000_reloc_type)
- RELOC_NUMBER (R_IQ2000_NONE, 0)
- RELOC_NUMBER (R_IQ2000_16, 1)
- RELOC_NUMBER (R_IQ2000_32, 2)
- RELOC_NUMBER (R_IQ2000_26, 3)
- RELOC_NUMBER (R_IQ2000_PC16, 4)
- RELOC_NUMBER (R_IQ2000_HI16, 5)
- RELOC_NUMBER (R_IQ2000_LO16, 6)
- RELOC_NUMBER (R_IQ2000_OFFSET_16, 7)
- RELOC_NUMBER (R_IQ2000_OFFSET_21, 8)
- RELOC_NUMBER (R_IQ2000_UHI16, 9)
- RELOC_NUMBER (R_IQ2000_32_DEBUG, 10)
- RELOC_NUMBER (R_IQ2000_GNU_VTINHERIT, 200)
- RELOC_NUMBER (R_IQ2000_GNU_VTENTRY, 201)
-END_RELOC_NUMBERS(R_IQ2000_max)
-
-#define EF_IQ2000_CPU_IQ2000 0x00000001 /* default */
-#define EF_IQ2000_CPU_IQ10 0x00000002 /* IQ10 */
-#define EF_IQ2000_CPU_MASK 0x00000003 /* specific cpu bits */
-#define EF_IQ2000_ALL_FLAGS (EF_IQ2000_CPU_MASK)
-
-/* Define the data & instruction memory discriminator. In a linked
- executable, an symbol should be deemed to point to an instruction
- if ((address & IQ2000_INSN_MASK) == IQ2000_INSN_VALUE), and similarly
- for the data space. */
-
-#define IQ2000_DATA_MASK 0x80000000
-#define IQ2000_DATA_VALUE 0x00000000
-#define IQ2000_INSN_MASK 0x80000000
-#define IQ2000_INSN_VALUE 0x80000000
-
-
-#endif /* _ELF_IQ2000_H */
diff --git a/include/elf/m32c.h b/include/elf/m32c.h
deleted file mode 100644
index 143773b..0000000
--- a/include/elf/m32c.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* M32C ELF support for BFD.
- Copyright (C) 2004 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifndef _ELF_M32C_H
-#define _ELF_M32C_H
-
-#include "elf/reloc-macros.h"
-
- /* Relocations. */
- START_RELOC_NUMBERS (elf_m32c_reloc_type)
- RELOC_NUMBER (R_M32C_NONE, 0)
- RELOC_NUMBER (R_M32C_16, 1)
- RELOC_NUMBER (R_M32C_24, 2)
- RELOC_NUMBER (R_M32C_32, 3)
- RELOC_NUMBER (R_M32C_8_PCREL, 4)
- RELOC_NUMBER (R_M32C_16_PCREL, 5)
-
- /* 8 bit unsigned address, used for dsp8[a0] etc */
- RELOC_NUMBER (R_M32C_8, 6)
- /* Bits 0..15 of an address, for SMOVF's A0, A1A0, etc. */
- RELOC_NUMBER (R_M32C_LO16, 7)
- /* Bits 16..23 of an address, for SMOVF's R1H etc. */
- RELOC_NUMBER (R_M32C_HI8, 8)
- /* Bits 16..31 of an address, for LDE's A1A0 etc. */
- RELOC_NUMBER (R_M32C_HI16, 9)
-
- /* These are relocs we need when relaxing. */
- /* Marks various jump opcodes. */
- RELOC_NUMBER (R_M32C_RL_JUMP, 10)
- /* Marks standard one-address form. */
- RELOC_NUMBER (R_M32C_RL_1ADDR, 11)
- /* Marks standard two-address form. */
- RELOC_NUMBER (R_M32C_RL_2ADDR, 12)
-
- END_RELOC_NUMBERS (R_M32C_max)
-
-#define EF_M32C_CPU_M16C 0x00000075 /* default */
-#define EF_M32C_CPU_M32C 0x00000078 /* m32c */
-#define EF_M32C_CPU_MASK 0x0000007F /* specific cpu bits */
-#define EF_M32C_ALL_FLAGS (EF_M32C_CPU_MASK)
-
-/* Define the data & instruction memory discriminator. In a linked
- executable, an symbol should be deemed to point to an instruction
- if ((address & M16C_INSN_MASK) == M16C_INSN_VALUE), and similarly
- for the data space. See also `ld/emulparams/elf32m32c.sh'. */
-#define M32C_DATA_MASK 0xffc00000
-#define M32C_DATA_VALUE 0x00000000
-#define M32C_INSN_MASK 0xffc00000
-#define M32C_INSN_VALUE 0x00400000
-
-#endif /* _ELF_M32C_H */
diff --git a/include/elf/m32r.h b/include/elf/m32r.h
deleted file mode 100644
index 209dab6..0000000
--- a/include/elf/m32r.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/* M32R ELF support for BFD.
- Copyright 1996, 1997, 1998, 1999, 2000, 2003, 2004, 2008
- Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_M32R_H
-#define _ELF_M32R_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocations. */
-START_RELOC_NUMBERS (elf_m32r_reloc_type)
- RELOC_NUMBER (R_M32R_NONE, 0)
- /* REL relocations */
- RELOC_NUMBER (R_M32R_16, 1) /* For backwards compatibility. */
- RELOC_NUMBER (R_M32R_32, 2) /* For backwards compatibility. */
- RELOC_NUMBER (R_M32R_24, 3) /* For backwards compatibility. */
- RELOC_NUMBER (R_M32R_10_PCREL, 4) /* For backwards compatibility. */
- RELOC_NUMBER (R_M32R_18_PCREL, 5) /* For backwards compatibility. */
- RELOC_NUMBER (R_M32R_26_PCREL, 6) /* For backwards compatibility. */
- RELOC_NUMBER (R_M32R_HI16_ULO, 7) /* For backwards compatibility. */
- RELOC_NUMBER (R_M32R_HI16_SLO, 8) /* For backwards compatibility. */
- RELOC_NUMBER (R_M32R_LO16, 9) /* For backwards compatibility. */
- RELOC_NUMBER (R_M32R_SDA16, 10) /* For backwards compatibility. */
- RELOC_NUMBER (R_M32R_GNU_VTINHERIT, 11)/* For backwards compatibility. */
- RELOC_NUMBER (R_M32R_GNU_VTENTRY, 12) /* For backwards compatibility. */
-
- /* RELA relocations */
- RELOC_NUMBER (R_M32R_16_RELA, 33)
- RELOC_NUMBER (R_M32R_32_RELA, 34)
- RELOC_NUMBER (R_M32R_24_RELA, 35)
- RELOC_NUMBER (R_M32R_10_PCREL_RELA, 36)
- RELOC_NUMBER (R_M32R_18_PCREL_RELA, 37)
- RELOC_NUMBER (R_M32R_26_PCREL_RELA, 38)
- RELOC_NUMBER (R_M32R_HI16_ULO_RELA, 39)
- RELOC_NUMBER (R_M32R_HI16_SLO_RELA, 40)
- RELOC_NUMBER (R_M32R_LO16_RELA, 41)
- RELOC_NUMBER (R_M32R_SDA16_RELA, 42)
- RELOC_NUMBER (R_M32R_RELA_GNU_VTINHERIT, 43)
- RELOC_NUMBER (R_M32R_RELA_GNU_VTENTRY, 44)
-
- RELOC_NUMBER (R_M32R_REL32, 45)
-
- RELOC_NUMBER (R_M32R_GOT24, 48)
- RELOC_NUMBER (R_M32R_26_PLTREL, 49)
- RELOC_NUMBER (R_M32R_COPY, 50)
- RELOC_NUMBER (R_M32R_GLOB_DAT, 51)
- RELOC_NUMBER (R_M32R_JMP_SLOT, 52)
- RELOC_NUMBER (R_M32R_RELATIVE, 53)
- RELOC_NUMBER (R_M32R_GOTOFF, 54)
- RELOC_NUMBER (R_M32R_GOTPC24, 55)
- RELOC_NUMBER (R_M32R_GOT16_HI_ULO, 56)
- RELOC_NUMBER (R_M32R_GOT16_HI_SLO, 57)
- RELOC_NUMBER (R_M32R_GOT16_LO, 58)
- RELOC_NUMBER (R_M32R_GOTPC_HI_ULO, 59)
- RELOC_NUMBER (R_M32R_GOTPC_HI_SLO, 60)
- RELOC_NUMBER (R_M32R_GOTPC_LO, 61)
- RELOC_NUMBER (R_M32R_GOTOFF_HI_ULO, 62)
- RELOC_NUMBER (R_M32R_GOTOFF_HI_SLO, 63)
- RELOC_NUMBER (R_M32R_GOTOFF_LO, 64)
-
-END_RELOC_NUMBERS (R_M32R_max)
-
-/* Processor specific section indices. These sections do not actually
- exist. Symbols with a st_shndx field corresponding to one of these
- values have a special meaning. */
-
-/* Small common symbol. */
-#define SHN_M32R_SCOMMON SHN_LORESERVE
-
-/* Processor specific section flags. */
-
-/* This section contains sufficient relocs to be relaxed.
- When relaxing, even relocs of branch instructions the assembler could
- complete must be present because relaxing may cause the branch target to
- move. */
-#define SHF_M32R_CAN_RELAX 0x10000000
-
-/* Processor specific flags for the ELF header e_flags field. */
-
-/* Two bit m32r architecture field. */
-#define EF_M32R_ARCH 0x30000000
-
-/* m32r code. */
-#define E_M32R_ARCH 0x00000000
-/* m32rx code. */
-#define E_M32RX_ARCH 0x10000000
-/* m32r2 code. */
-#define E_M32R2_ARCH 0x20000000
-
-/* 12 bit m32r new instructions field. */
-#define EF_M32R_INST 0x0FFF0000
-/* Parallel instructions. */
-#define E_M32R_HAS_PARALLEL 0x00010000
-/* Hidden instructions for m32rx:
- jc, jnc, macwhi-a, macwlo-a, mulwhi-a, mulwlo-a, sth+, shb+, sat, pcmpbz,
- sc, snc. */
-#define E_M32R_HAS_HIDDEN_INST 0x00020000
-/* New bit instructions:
- clrpsw, setpsw, bset, bclr, btst. */
-#define E_M32R_HAS_BIT_INST 0x00040000
-/* Floating point instructions. */
-#define E_M32R_HAS_FLOAT_INST 0x00080000
-
-/* 4 bit m32r ignore to check field. */
-#define EF_M32R_IGNORE 0x0000000F
-
-#endif
diff --git a/include/elf/m68hc11.h b/include/elf/m68hc11.h
deleted file mode 100644
index 1cd4600..0000000
--- a/include/elf/m68hc11.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/* m68hc11 & m68hc12 ELF support for BFD.
- Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_M68HC11_H
-#define _ELF_M68HC11_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocation types. */
-START_RELOC_NUMBERS (elf_m68hc11_reloc_type)
- RELOC_NUMBER (R_M68HC11_NONE, 0)
- RELOC_NUMBER (R_M68HC11_8, 1)
- RELOC_NUMBER (R_M68HC11_HI8, 2)
- RELOC_NUMBER (R_M68HC11_LO8, 3)
- RELOC_NUMBER (R_M68HC11_PCREL_8, 4)
- RELOC_NUMBER (R_M68HC11_16, 5)
- RELOC_NUMBER (R_M68HC11_32, 6)
- RELOC_NUMBER (R_M68HC11_3B, 7)
- RELOC_NUMBER (R_M68HC11_PCREL_16, 8)
-
- /* These are GNU extensions to enable C++ vtable garbage collection. */
- RELOC_NUMBER (R_M68HC11_GNU_VTINHERIT, 9)
- RELOC_NUMBER (R_M68HC11_GNU_VTENTRY, 10)
-
- RELOC_NUMBER (R_M68HC11_24, 11)
- RELOC_NUMBER (R_M68HC11_LO16, 12)
- RELOC_NUMBER (R_M68HC11_PAGE, 13)
-
- /* GNU extension for linker relaxation.
- Mark beginning of a jump instruction (any form). */
- RELOC_NUMBER (R_M68HC11_RL_JUMP, 20)
-
- /* Mark beginning of Gcc relaxation group instruction. */
- RELOC_NUMBER (R_M68HC11_RL_GROUP, 21)
-END_RELOC_NUMBERS (R_M68HC11_max)
-
-/* Processor specific flags for the ELF header e_flags field. */
-
-/* ABI identification. */
-#define EF_M68HC11_ABI 0x00000000F
-
-/* Integers are 32-bit long. */
-#define E_M68HC11_I32 0x000000001
-
-/* Doubles are 64-bit long. */
-#define E_M68HC11_F64 0x000000002
-
-/* Uses 68HC12 memory banks. */
-#define E_M68HC12_BANKS 0x000000004
-
-#define EF_M68HC11_MACH_MASK 0xF0
-#define EF_M68HC11_GENERIC 0x00 /* Generic 68HC12/backward compatibility. */
-#define EF_M68HC12_MACH 0x10 /* 68HC12 microcontroller. */
-#define EF_M68HCS12_MACH 0x20 /* 68HCS12 microcontroller. */
-#define EF_M68HC11_MACH(mach) ((mach) & EF_M68HC11_MACH_MASK)
-
-/* True if we can merge machines. A generic HC12 can work on any proc
- but once we have specific code, merge is not possible. */
-#define EF_M68HC11_CAN_MERGE_MACH(mach1, mach2) \
- ((EF_M68HC11_MACH (mach1) == EF_M68HC11_MACH (mach2)) \
- || (EF_M68HC11_MACH (mach1) == EF_M68HC11_GENERIC) \
- || (EF_M68HC11_MACH (mach2) == EF_M68HC11_GENERIC))
-
-#define EF_M68HC11_MERGE_MACH(mach1, mach2) \
- (((EF_M68HC11_MACH (mach1) == EF_M68HC11_MACH (mach2)) \
- || (EF_M68HC11_MACH (mach1) == EF_M68HC11_GENERIC)) ? \
- EF_M68HC11_MACH (mach2) : EF_M68HC11_MACH (mach1))
-
-
-/* Special values for the st_other field in the symbol table. These
- are used for 68HC12 to identify far functions (must be called with
- 'call' and returns with 'rtc'). */
-#define STO_M68HC12_FAR 0x80
-
-/* Identify interrupt handlers. This is used by the debugger to
- correctly compute the stack frame. */
-#define STO_M68HC12_INTERRUPT 0x40
-
-#endif
diff --git a/include/elf/m68k.h b/include/elf/m68k.h
deleted file mode 100644
index 23b269a..0000000
--- a/include/elf/m68k.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* MC68k ELF support for BFD.
- Copyright 1998, 1999, 2000, 2002, 2005, 2006 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_M68K_H
-#define _ELF_M68K_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocation types. */
-START_RELOC_NUMBERS (elf_m68k_reloc_type)
- RELOC_NUMBER (R_68K_NONE, 0) /* No reloc */
- RELOC_NUMBER (R_68K_32, 1) /* Direct 32 bit */
- RELOC_NUMBER (R_68K_16, 2) /* Direct 16 bit */
- RELOC_NUMBER (R_68K_8, 3) /* Direct 8 bit */
- RELOC_NUMBER (R_68K_PC32, 4) /* PC relative 32 bit */
- RELOC_NUMBER (R_68K_PC16, 5) /* PC relative 16 bit */
- RELOC_NUMBER (R_68K_PC8, 6) /* PC relative 8 bit */
- RELOC_NUMBER (R_68K_GOT32, 7) /* 32 bit PC relative GOT entry */
- RELOC_NUMBER (R_68K_GOT16, 8) /* 16 bit PC relative GOT entry */
- RELOC_NUMBER (R_68K_GOT8, 9) /* 8 bit PC relative GOT entry */
- RELOC_NUMBER (R_68K_GOT32O, 10) /* 32 bit GOT offset */
- RELOC_NUMBER (R_68K_GOT16O, 11) /* 16 bit GOT offset */
- RELOC_NUMBER (R_68K_GOT8O, 12) /* 8 bit GOT offset */
- RELOC_NUMBER (R_68K_PLT32, 13) /* 32 bit PC relative PLT address */
- RELOC_NUMBER (R_68K_PLT16, 14) /* 16 bit PC relative PLT address */
- RELOC_NUMBER (R_68K_PLT8, 15) /* 8 bit PC relative PLT address */
- RELOC_NUMBER (R_68K_PLT32O, 16) /* 32 bit PLT offset */
- RELOC_NUMBER (R_68K_PLT16O, 17) /* 16 bit PLT offset */
- RELOC_NUMBER (R_68K_PLT8O, 18) /* 8 bit PLT offset */
- RELOC_NUMBER (R_68K_COPY, 19) /* Copy symbol at runtime */
- RELOC_NUMBER (R_68K_GLOB_DAT, 20) /* Create GOT entry */
- RELOC_NUMBER (R_68K_JMP_SLOT, 21) /* Create PLT entry */
- RELOC_NUMBER (R_68K_RELATIVE, 22) /* Adjust by program base */
- /* These are GNU extensions to enable C++ vtable garbage collection. */
- RELOC_NUMBER (R_68K_GNU_VTINHERIT, 23)
- RELOC_NUMBER (R_68K_GNU_VTENTRY, 24)
-END_RELOC_NUMBERS (R_68K_max)
-
-/* We use the top 24 bits to encode information about the
- architecture variant. */
-#define EF_M68K_CPU32 0x00810000
-#define EF_M68K_M68000 0x01000000
-#define EF_M68K_CFV4E 0x00008000
-#define EF_M68K_FIDO 0x02000000
-#define EF_M68K_ARCH_MASK \
- (EF_M68K_M68000 | EF_M68K_CPU32 | EF_M68K_CFV4E | EF_M68K_FIDO)
-
-/* We use the bottom 8 bits to encode information about the
- coldfire variant. If we use any of these bits, the top 24 bits are
- either 0 or EF_M68K_CFV4E. */
-#define EF_M68K_CF_ISA_MASK 0x0F /* Which ISA */
-#define EF_M68K_CF_ISA_A_NODIV 0x01 /* ISA A except for div */
-#define EF_M68K_CF_ISA_A 0x02
-#define EF_M68K_CF_ISA_A_PLUS 0x03
-#define EF_M68K_CF_ISA_B_NOUSP 0x04 /* ISA_B except for USP */
-#define EF_M68K_CF_ISA_B 0x05
-#define EF_M68K_CF_ISA_C 0x06
-#define EF_M68K_CF_ISA_C_NODIV 0x07 /* ISA C except for div */
-#define EF_M68K_CF_MAC_MASK 0x30
-#define EF_M68K_CF_MAC 0x10 /* MAC */
-#define EF_M68K_CF_EMAC 0x20 /* EMAC */
-#define EF_M68K_CF_EMAC_B 0x30 /* EMAC_B */
-#define EF_M68K_CF_FLOAT 0x40 /* Has float insns */
-#define EF_M68K_CF_MASK 0xFF
-
-#endif
diff --git a/include/elf/mcore.h b/include/elf/mcore.h
deleted file mode 100644
index 5600df7..0000000
--- a/include/elf/mcore.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Motorola MCore support for BFD.
- Copyright 1995, 1999, 2000 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* This file holds definitions specific to the MCore ELF ABI. */
-#ifndef _ELF_MORE_H
-#define _ELF_MORE_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocations. */
-START_RELOC_NUMBERS (elf_mcore_reloc_type)
- RELOC_NUMBER (R_MCORE_NONE, 0)
- RELOC_NUMBER (R_MCORE_ADDR32, 1)
- RELOC_NUMBER (R_MCORE_PCRELIMM8BY4, 2)
- RELOC_NUMBER (R_MCORE_PCRELIMM11BY2, 3)
- RELOC_NUMBER (R_MCORE_PCRELIMM4BY2, 4)
- RELOC_NUMBER (R_MCORE_PCREL32, 5)
- RELOC_NUMBER (R_MCORE_PCRELJSR_IMM11BY2, 6)
- RELOC_NUMBER (R_MCORE_GNU_VTINHERIT, 7)
- RELOC_NUMBER (R_MCORE_GNU_VTENTRY, 8)
- RELOC_NUMBER (R_MCORE_RELATIVE, 9)
- RELOC_NUMBER (R_MCORE_COPY, 10)
- RELOC_NUMBER (R_MCORE_GLOB_DAT, 11)
- RELOC_NUMBER (R_MCORE_JUMP_SLOT, 12)
-END_RELOC_NUMBERS (R_MCORE_max)
-
-/* Section Attributes. */
-#define SHF_MCORE_NOREAD 0x80000000
-
-#endif /* _ELF_MCORE_H */
diff --git a/include/elf/mep.h b/include/elf/mep.h
deleted file mode 100644
index 51eb8d0..0000000
--- a/include/elf/mep.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Toshiba MeP ELF support for BFD.
- Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifndef _ELF_MEP_H
-#define _ELF_MEP_H
-
-/* Bits in the sh_flags field of Elf32_Shdr: */
-
-#define SHF_MEP_VLIW 0x10000000 /* contains vliw code */
-
-/* This bit is reserved by BFD for processor specific stuff. Name
- it properly so that we can easily stay consistent elsewhere. */
-#define SEC_MEP_VLIW SEC_TIC54X_BLOCK
-
-#include "elf/reloc-macros.h"
-
-/* Note: The comments in this file are used by bfd/mep-relocs.pl to
- build parts of bfd/elf32-mep.c. */
-
-/* Relocations. */
-START_RELOC_NUMBERS (elf_mep_reloc_type)
-
- /* These two must appear first so that they are not processed by bfd/mep-relocs.pl. */
- RELOC_NUMBER (R_MEP_NONE, 0)
- RELOC_NUMBER (R_RELC, 1)
-
- RELOC_NUMBER (R_MEP_8, 2) /* 7654 3210 U */
- RELOC_NUMBER (R_MEP_16, 3) /* fedc ba98 7654 3210 U */
- RELOC_NUMBER (R_MEP_32, 4) /* vuts rqpo nmlk jihg fedc ba98 7654 3210 U */
-
- RELOC_NUMBER (R_MEP_PCREL8A2, 5) /* ---- ---- 7654 321- S PC-REL */
- RELOC_NUMBER (R_MEP_PCREL12A2, 6) /* ---- ba98 7654 321- S PC-REL */
- RELOC_NUMBER (R_MEP_PCREL17A2, 7) /* ---- ---- ---- ---- gfed cba9 8765 4321 S PC-REL */
- RELOC_NUMBER (R_MEP_PCREL24A2, 8) /* ---- -765 4321 ---- nmlk jihg fedc ba98 S PC-REL */
- RELOC_NUMBER (R_MEP_PCABS24A2, 9) /* ---- -765 4321 ---- nmlk jihg fedc ba98 U */
-
- RELOC_NUMBER (R_MEP_LOW16, 10) /* ---- ---- ---- ---- fedc ba98 7654 3210 U no-overflow */
- RELOC_NUMBER (R_MEP_HI16U, 11) /* ---- ---- ---- ---- vuts rqpo nmlk jihg U no-overflow */
- RELOC_NUMBER (R_MEP_HI16S, 12) /* ---- ---- ---- ---- vuts rqpo nmlk jihg S no-overflow */
- RELOC_NUMBER (R_MEP_GPREL, 13) /* ---- ---- ---- ---- fedc ba98 7654 3210 S GP-REL*/
- RELOC_NUMBER (R_MEP_TPREL, 14) /* ---- ---- ---- ---- fedc ba98 7654 3210 S TP-REL*/
-
- RELOC_NUMBER (R_MEP_TPREL7, 15) /* ---- ---- -654 3210 U TP-REL */
- RELOC_NUMBER (R_MEP_TPREL7A2, 16) /* ---- ---- -654 321- U TP-REL */
- RELOC_NUMBER (R_MEP_TPREL7A4, 17) /* ---- ---- -654 32-- U TP-REL */
-
- RELOC_NUMBER (R_MEP_UIMM24, 18) /* ---- ---- 7654 3210 nmlk jihg fedc ba98 U */
- RELOC_NUMBER (R_MEP_ADDR24A4, 19) /* ---- ---- 7654 32-- nmlk jihg fedc ba98 U */
-
- RELOC_NUMBER (R_MEP_GNU_VTINHERIT, 20) /* ---- ---- ---- ---- U no-overflow */
- RELOC_NUMBER (R_MEP_GNU_VTENTRY, 21) /* ---- ---- ---- ---- U no-overflow */
-
-END_RELOC_NUMBERS(R_MEP_max)
-
-#define EF_MEP_CPU_MASK 0xff000000 /* specific cpu bits */
-#define EF_MEP_CPU_MEP 0x00000000 /* generic MEP */
-#define EF_MEP_CPU_C2 0x01000000 /* MEP c2 */
-#define EF_MEP_CPU_C3 0x02000000 /* MEP c3 */
-#define EF_MEP_CPU_C4 0x04000000 /* MEP c4 */
-#define EF_MEP_CPU_H1 0x10000000 /* MEP h1 */
-
-#define EF_MEP_LIBRARY 0x00000100 /* Built as a library */
-
-#define EF_MEP_INDEX_MASK 0x000000ff /* Configuration index */
-
-#define EF_MEP_ALL_FLAGS 0xff0001ff
-
-#endif /* _ELF_MEP_H */
diff --git a/include/elf/mips.h b/include/elf/mips.h
deleted file mode 100644
index 4ec7816..0000000
--- a/include/elf/mips.h
+++ /dev/null
@@ -1,1045 +0,0 @@
-/* MIPS ELF support for BFD.
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2008
- Free Software Foundation, Inc.
-
- By Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>, from
- information in the System V Application Binary Interface, MIPS
- Processor Supplement.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* This file holds definitions specific to the MIPS ELF ABI. Note
- that most of this is not actually implemented by BFD. */
-
-#ifndef _ELF_MIPS_H
-#define _ELF_MIPS_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocation types. */
-START_RELOC_NUMBERS (elf_mips_reloc_type)
- RELOC_NUMBER (R_MIPS_NONE, 0)
- RELOC_NUMBER (R_MIPS_16, 1)
- RELOC_NUMBER (R_MIPS_32, 2) /* In Elf 64: alias R_MIPS_ADD */
- RELOC_NUMBER (R_MIPS_REL32, 3) /* In Elf 64: alias R_MIPS_REL */
- RELOC_NUMBER (R_MIPS_26, 4)
- RELOC_NUMBER (R_MIPS_HI16, 5)
- RELOC_NUMBER (R_MIPS_LO16, 6)
- RELOC_NUMBER (R_MIPS_GPREL16, 7) /* In Elf 64: alias R_MIPS_GPREL */
- RELOC_NUMBER (R_MIPS_LITERAL, 8)
- RELOC_NUMBER (R_MIPS_GOT16, 9) /* In Elf 64: alias R_MIPS_GOT */
- RELOC_NUMBER (R_MIPS_PC16, 10)
- RELOC_NUMBER (R_MIPS_CALL16, 11) /* In Elf 64: alias R_MIPS_CALL */
- RELOC_NUMBER (R_MIPS_GPREL32, 12)
- /* The remaining relocs are defined on Irix, although they are not
- in the MIPS ELF ABI. */
- RELOC_NUMBER (R_MIPS_UNUSED1, 13)
- RELOC_NUMBER (R_MIPS_UNUSED2, 14)
- RELOC_NUMBER (R_MIPS_UNUSED3, 15)
- RELOC_NUMBER (R_MIPS_SHIFT5, 16)
- RELOC_NUMBER (R_MIPS_SHIFT6, 17)
- RELOC_NUMBER (R_MIPS_64, 18)
- RELOC_NUMBER (R_MIPS_GOT_DISP, 19)
- RELOC_NUMBER (R_MIPS_GOT_PAGE, 20)
- RELOC_NUMBER (R_MIPS_GOT_OFST, 21)
- RELOC_NUMBER (R_MIPS_GOT_HI16, 22)
- RELOC_NUMBER (R_MIPS_GOT_LO16, 23)
- RELOC_NUMBER (R_MIPS_SUB, 24)
- RELOC_NUMBER (R_MIPS_INSERT_A, 25)
- RELOC_NUMBER (R_MIPS_INSERT_B, 26)
- RELOC_NUMBER (R_MIPS_DELETE, 27)
- RELOC_NUMBER (R_MIPS_HIGHER, 28)
- RELOC_NUMBER (R_MIPS_HIGHEST, 29)
- RELOC_NUMBER (R_MIPS_CALL_HI16, 30)
- RELOC_NUMBER (R_MIPS_CALL_LO16, 31)
- RELOC_NUMBER (R_MIPS_SCN_DISP, 32)
- RELOC_NUMBER (R_MIPS_REL16, 33)
- RELOC_NUMBER (R_MIPS_ADD_IMMEDIATE, 34)
- RELOC_NUMBER (R_MIPS_PJUMP, 35)
- RELOC_NUMBER (R_MIPS_RELGOT, 36)
- RELOC_NUMBER (R_MIPS_JALR, 37)
- /* TLS relocations. */
- RELOC_NUMBER (R_MIPS_TLS_DTPMOD32, 38)
- RELOC_NUMBER (R_MIPS_TLS_DTPREL32, 39)
- RELOC_NUMBER (R_MIPS_TLS_DTPMOD64, 40)
- RELOC_NUMBER (R_MIPS_TLS_DTPREL64, 41)
- RELOC_NUMBER (R_MIPS_TLS_GD, 42)
- RELOC_NUMBER (R_MIPS_TLS_LDM, 43)
- RELOC_NUMBER (R_MIPS_TLS_DTPREL_HI16, 44)
- RELOC_NUMBER (R_MIPS_TLS_DTPREL_LO16, 45)
- RELOC_NUMBER (R_MIPS_TLS_GOTTPREL, 46)
- RELOC_NUMBER (R_MIPS_TLS_TPREL32, 47)
- RELOC_NUMBER (R_MIPS_TLS_TPREL64, 48)
- RELOC_NUMBER (R_MIPS_TLS_TPREL_HI16, 49)
- RELOC_NUMBER (R_MIPS_TLS_TPREL_LO16, 50)
- RELOC_NUMBER (R_MIPS_GLOB_DAT, 51)
- FAKE_RELOC (R_MIPS_max, 52)
- /* These relocs are used for the mips16. */
- FAKE_RELOC (R_MIPS16_min, 100)
- RELOC_NUMBER (R_MIPS16_26, 100)
- RELOC_NUMBER (R_MIPS16_GPREL, 101)
- RELOC_NUMBER (R_MIPS16_GOT16, 102)
- RELOC_NUMBER (R_MIPS16_CALL16, 103)
- RELOC_NUMBER (R_MIPS16_HI16, 104)
- RELOC_NUMBER (R_MIPS16_LO16, 105)
- FAKE_RELOC (R_MIPS16_max, 106)
- /* These relocations are specific to VxWorks. */
- RELOC_NUMBER (R_MIPS_COPY, 126)
- RELOC_NUMBER (R_MIPS_JUMP_SLOT, 127)
- /* This was a GNU extension used by embedded-PIC. It was co-opted by
- mips-linux for exception-handling data. It is no longer used, but
- should continue to be supported by the linker for backward
- compatibility. (GCC stopped using it in May, 2004.) */
- RELOC_NUMBER (R_MIPS_PC32, 248)
- /* FIXME: this relocation is used internally by gas. */
- RELOC_NUMBER (R_MIPS_GNU_REL16_S2, 250)
- /* These are GNU extensions to enable C++ vtable garbage collection. */
- RELOC_NUMBER (R_MIPS_GNU_VTINHERIT, 253)
- RELOC_NUMBER (R_MIPS_GNU_VTENTRY, 254)
-END_RELOC_NUMBERS (R_MIPS_maxext)
-
-/* Processor specific flags for the ELF header e_flags field. */
-
-/* At least one .noreorder directive appears in the source. */
-#define EF_MIPS_NOREORDER 0x00000001
-
-/* File contains position independent code. */
-#define EF_MIPS_PIC 0x00000002
-
-/* Code in file uses the standard calling sequence for calling
- position independent code. */
-#define EF_MIPS_CPIC 0x00000004
-
-/* ??? Unknown flag, set in IRIX 6's BSDdup2.o in libbsd.a. */
-#define EF_MIPS_XGOT 0x00000008
-
-/* Code in file uses UCODE (obsolete) */
-#define EF_MIPS_UCODE 0x00000010
-
-/* Code in file uses new ABI (-n32 on Irix 6). */
-#define EF_MIPS_ABI2 0x00000020
-
-/* Process the .MIPS.options section first by ld */
-#define EF_MIPS_OPTIONS_FIRST 0x00000080
-
-/* Architectural Extensions used by this file */
-#define EF_MIPS_ARCH_ASE 0x0f000000
-
-/* Use MDMX multimedia extensions */
-#define EF_MIPS_ARCH_ASE_MDMX 0x08000000
-
-/* Use MIPS-16 ISA extensions */
-#define EF_MIPS_ARCH_ASE_M16 0x04000000
-
-/* Indicates code compiled for a 64-bit machine in 32-bit mode.
- (regs are 32-bits wide.) */
-#define EF_MIPS_32BITMODE 0x00000100
-
-/* Four bit MIPS architecture field. */
-#define EF_MIPS_ARCH 0xf0000000
-
-/* -mips1 code. */
-#define E_MIPS_ARCH_1 0x00000000
-
-/* -mips2 code. */
-#define E_MIPS_ARCH_2 0x10000000
-
-/* -mips3 code. */
-#define E_MIPS_ARCH_3 0x20000000
-
-/* -mips4 code. */
-#define E_MIPS_ARCH_4 0x30000000
-
-/* -mips5 code. */
-#define E_MIPS_ARCH_5 0x40000000
-
-/* -mips32 code. */
-#define E_MIPS_ARCH_32 0x50000000
-
-/* -mips64 code. */
-#define E_MIPS_ARCH_64 0x60000000
-
-/* -mips32r2 code. */
-#define E_MIPS_ARCH_32R2 0x70000000
-
-/* -mips64r2 code. */
-#define E_MIPS_ARCH_64R2 0x80000000
-
-/* The ABI of the file. Also see EF_MIPS_ABI2 above. */
-#define EF_MIPS_ABI 0x0000F000
-
-/* The original o32 abi. */
-#define E_MIPS_ABI_O32 0x00001000
-
-/* O32 extended to work on 64 bit architectures */
-#define E_MIPS_ABI_O64 0x00002000
-
-/* EABI in 32 bit mode */
-#define E_MIPS_ABI_EABI32 0x00003000
-
-/* EABI in 64 bit mode */
-#define E_MIPS_ABI_EABI64 0x00004000
-
-
-/* Machine variant if we know it. This field was invented at Cygnus,
- but it is hoped that other vendors will adopt it. If some standard
- is developed, this code should be changed to follow it. */
-
-#define EF_MIPS_MACH 0x00FF0000
-
-/* Cygnus is choosing values between 80 and 9F;
- 00 - 7F should be left for a future standard;
- the rest are open. */
-
-#define E_MIPS_MACH_3900 0x00810000
-#define E_MIPS_MACH_4010 0x00820000
-#define E_MIPS_MACH_4100 0x00830000
-#define E_MIPS_MACH_4650 0x00850000
-#define E_MIPS_MACH_4120 0x00870000
-#define E_MIPS_MACH_4111 0x00880000
-#define E_MIPS_MACH_SB1 0x008a0000
-#define E_MIPS_MACH_OCTEON 0x008b0000
-#define E_MIPS_MACH_5400 0x00910000
-#define E_MIPS_MACH_5500 0x00980000
-#define E_MIPS_MACH_9000 0x00990000
-#define E_MIPS_MACH_LS2E 0x00A00000
-#define E_MIPS_MACH_LS2F 0x00A10000
-
-/* Processor specific section indices. These sections do not actually
- exist. Symbols with a st_shndx field corresponding to one of these
- values have a special meaning. */
-
-/* Defined and allocated common symbol. Value is virtual address. If
- relocated, alignment must be preserved. */
-#define SHN_MIPS_ACOMMON SHN_LORESERVE
-
-/* Defined and allocated text symbol. Value is virtual address.
- Occur in the dynamic symbol table of Alpha OSF/1 and Irix 5 executables. */
-#define SHN_MIPS_TEXT (SHN_LORESERVE + 1)
-
-/* Defined and allocated data symbol. Value is virtual address.
- Occur in the dynamic symbol table of Alpha OSF/1 and Irix 5 executables. */
-#define SHN_MIPS_DATA (SHN_LORESERVE + 2)
-
-/* Small common symbol. */
-#define SHN_MIPS_SCOMMON (SHN_LORESERVE + 3)
-
-/* Small undefined symbol. */
-#define SHN_MIPS_SUNDEFINED (SHN_LORESERVE + 4)
-
-/* Processor specific section types. */
-
-/* Section contains the set of dynamic shared objects used when
- statically linking. */
-#define SHT_MIPS_LIBLIST 0x70000000
-
-/* I'm not sure what this is, but it's used on Irix 5. */
-#define SHT_MIPS_MSYM 0x70000001
-
-/* Section contains list of symbols whose definitions conflict with
- symbols defined in shared objects. */
-#define SHT_MIPS_CONFLICT 0x70000002
-
-/* Section contains the global pointer table. */
-#define SHT_MIPS_GPTAB 0x70000003
-
-/* Section contains microcode information. The exact format is
- unspecified. */
-#define SHT_MIPS_UCODE 0x70000004
-
-/* Section contains some sort of debugging information. The exact
- format is unspecified. It's probably ECOFF symbols. */
-#define SHT_MIPS_DEBUG 0x70000005
-
-/* Section contains register usage information. */
-#define SHT_MIPS_REGINFO 0x70000006
-
-/* ??? */
-#define SHT_MIPS_PACKAGE 0x70000007
-
-/* ??? */
-#define SHT_MIPS_PACKSYM 0x70000008
-
-/* ??? */
-#define SHT_MIPS_RELD 0x70000009
-
-/* Section contains interface information. */
-#define SHT_MIPS_IFACE 0x7000000b
-
-/* Section contains description of contents of another section. */
-#define SHT_MIPS_CONTENT 0x7000000c
-
-/* Section contains miscellaneous options. */
-#define SHT_MIPS_OPTIONS 0x7000000d
-
-/* ??? */
-#define SHT_MIPS_SHDR 0x70000010
-
-/* ??? */
-#define SHT_MIPS_FDESC 0x70000011
-
-/* ??? */
-#define SHT_MIPS_EXTSYM 0x70000012
-
-/* ??? */
-#define SHT_MIPS_DENSE 0x70000013
-
-/* ??? */
-#define SHT_MIPS_PDESC 0x70000014
-
-/* ??? */
-#define SHT_MIPS_LOCSYM 0x70000015
-
-/* ??? */
-#define SHT_MIPS_AUXSYM 0x70000016
-
-/* ??? */
-#define SHT_MIPS_OPTSYM 0x70000017
-
-/* ??? */
-#define SHT_MIPS_LOCSTR 0x70000018
-
-/* ??? */
-#define SHT_MIPS_LINE 0x70000019
-
-/* ??? */
-#define SHT_MIPS_RFDESC 0x7000001a
-
-/* Delta C++: symbol table */
-#define SHT_MIPS_DELTASYM 0x7000001b
-
-/* Delta C++: instance table */
-#define SHT_MIPS_DELTAINST 0x7000001c
-
-/* Delta C++: class table */
-#define SHT_MIPS_DELTACLASS 0x7000001d
-
-/* DWARF debugging section. */
-#define SHT_MIPS_DWARF 0x7000001e
-
-/* Delta C++: declarations */
-#define SHT_MIPS_DELTADECL 0x7000001f
-
-/* List of libraries the binary depends on. Includes a time stamp, version
- number. */
-#define SHT_MIPS_SYMBOL_LIB 0x70000020
-
-/* Events section. */
-#define SHT_MIPS_EVENTS 0x70000021
-
-/* ??? */
-#define SHT_MIPS_TRANSLATE 0x70000022
-
-/* Special pixie sections */
-#define SHT_MIPS_PIXIE 0x70000023
-
-/* Address translation table (for debug info) */
-#define SHT_MIPS_XLATE 0x70000024
-
-/* SGI internal address translation table (for debug info) */
-#define SHT_MIPS_XLATE_DEBUG 0x70000025
-
-/* Intermediate code */
-#define SHT_MIPS_WHIRL 0x70000026
-
-/* C++ exception handling region info */
-#define SHT_MIPS_EH_REGION 0x70000027
-
-/* Obsolete address translation table (for debug info) */
-#define SHT_MIPS_XLATE_OLD 0x70000028
-
-/* Runtime procedure descriptor table exception information (ucode) ??? */
-#define SHT_MIPS_PDR_EXCEPTION 0x70000029
-
-
-/* A section of type SHT_MIPS_LIBLIST contains an array of the
- following structure. The sh_link field is the section index of the
- string table. The sh_info field is the number of entries in the
- section. */
-typedef struct
-{
- /* String table index for name of shared object. */
- unsigned long l_name;
- /* Time stamp. */
- unsigned long l_time_stamp;
- /* Checksum of symbol names and common sizes. */
- unsigned long l_checksum;
- /* String table index for version. */
- unsigned long l_version;
- /* Flags. */
- unsigned long l_flags;
-} Elf32_Lib;
-
-/* The external version of Elf32_Lib. */
-typedef struct
-{
- unsigned char l_name[4];
- unsigned char l_time_stamp[4];
- unsigned char l_checksum[4];
- unsigned char l_version[4];
- unsigned char l_flags[4];
-} Elf32_External_Lib;
-
-/* The l_flags field of an Elf32_Lib structure may contain the
- following flags. */
-
-/* Require an exact match at runtime. */
-#define LL_EXACT_MATCH 0x00000001
-
-/* Ignore version incompatibilities at runtime. */
-#define LL_IGNORE_INT_VER 0x00000002
-
-/* Require matching minor version number. */
-#define LL_REQUIRE_MINOR 0x00000004
-
-/* ??? */
-#define LL_EXPORTS 0x00000008
-
-/* Delay loading of this library until really needed. */
-#define LL_DELAY_LOAD 0x00000010
-
-/* ??? Delta C++ stuff ??? */
-#define LL_DELTA 0x00000020
-
-
-/* A section of type SHT_MIPS_CONFLICT is an array of indices into the
- .dynsym section. Each element has the following type. */
-typedef unsigned long Elf32_Conflict;
-typedef unsigned char Elf32_External_Conflict[4];
-
-typedef unsigned long Elf64_Conflict;
-typedef unsigned char Elf64_External_Conflict[8];
-
-/* A section of type SHT_MIPS_GPTAB contains information about how
- much GP space would be required for different -G arguments. This
- information is only used so that the linker can provide informative
- suggestions as to the best -G value to use. The sh_info field is
- the index of the section for which this information applies. The
- contents of the section are an array of the following union. The
- first element uses the gt_header field. The remaining elements use
- the gt_entry field. */
-typedef union
-{
- struct
- {
- /* -G value actually used for this object file. */
- unsigned long gt_current_g_value;
- /* Unused. */
- unsigned long gt_unused;
- } gt_header;
- struct
- {
- /* If this -G argument has been used... */
- unsigned long gt_g_value;
- /* ...this many GP section bytes would be required. */
- unsigned long gt_bytes;
- } gt_entry;
-} Elf32_gptab;
-
-/* The external version of Elf32_gptab. */
-
-typedef union
-{
- struct
- {
- unsigned char gt_current_g_value[4];
- unsigned char gt_unused[4];
- } gt_header;
- struct
- {
- unsigned char gt_g_value[4];
- unsigned char gt_bytes[4];
- } gt_entry;
-} Elf32_External_gptab;
-
-/* A section of type SHT_MIPS_REGINFO contains the following
- structure. */
-typedef struct
-{
- /* Mask of general purpose registers used. */
- unsigned long ri_gprmask;
- /* Mask of co-processor registers used. */
- unsigned long ri_cprmask[4];
- /* GP register value for this object file. */
- long ri_gp_value;
-} Elf32_RegInfo;
-
-/* The external version of the Elf_RegInfo structure. */
-typedef struct
-{
- unsigned char ri_gprmask[4];
- unsigned char ri_cprmask[4][4];
- unsigned char ri_gp_value[4];
-} Elf32_External_RegInfo;
-
-/* MIPS ELF .reginfo swapping routines. */
-extern void bfd_mips_elf32_swap_reginfo_in
- (bfd *, const Elf32_External_RegInfo *, Elf32_RegInfo *);
-extern void bfd_mips_elf32_swap_reginfo_out
- (bfd *, const Elf32_RegInfo *, Elf32_External_RegInfo *);
-
-/* Processor specific section flags. */
-
-/* This section must be in the global data area. */
-#define SHF_MIPS_GPREL 0x10000000
-
-/* This section should be merged. */
-#define SHF_MIPS_MERGE 0x20000000
-
-/* This section contains address data of size implied by section
- element size. */
-#define SHF_MIPS_ADDR 0x40000000
-
-/* This section contains string data. */
-#define SHF_MIPS_STRING 0x80000000
-
-/* This section may not be stripped. */
-#define SHF_MIPS_NOSTRIP 0x08000000
-
-/* This section is local to threads. */
-#define SHF_MIPS_LOCAL 0x04000000
-
-/* Linker should generate implicit weak names for this section. */
-#define SHF_MIPS_NAMES 0x02000000
-
-/* Section contais text/data which may be replicated in other sections.
- Linker should retain only one copy. */
-#define SHF_MIPS_NODUPES 0x01000000
-
-/* Processor specific program header types. */
-
-/* Register usage information. Identifies one .reginfo section. */
-#define PT_MIPS_REGINFO 0x70000000
-
-/* Runtime procedure table. */
-#define PT_MIPS_RTPROC 0x70000001
-
-/* .MIPS.options section. */
-#define PT_MIPS_OPTIONS 0x70000002
-
-/* Processor specific dynamic array tags. */
-
-/* 32 bit version number for runtime linker interface. */
-#define DT_MIPS_RLD_VERSION 0x70000001
-
-/* Time stamp. */
-#define DT_MIPS_TIME_STAMP 0x70000002
-
-/* Checksum of external strings and common sizes. */
-#define DT_MIPS_ICHECKSUM 0x70000003
-
-/* Index of version string in string table. */
-#define DT_MIPS_IVERSION 0x70000004
-
-/* 32 bits of flags. */
-#define DT_MIPS_FLAGS 0x70000005
-
-/* Base address of the segment. */
-#define DT_MIPS_BASE_ADDRESS 0x70000006
-
-/* ??? */
-#define DT_MIPS_MSYM 0x70000007
-
-/* Address of .conflict section. */
-#define DT_MIPS_CONFLICT 0x70000008
-
-/* Address of .liblist section. */
-#define DT_MIPS_LIBLIST 0x70000009
-
-/* Number of local global offset table entries. */
-#define DT_MIPS_LOCAL_GOTNO 0x7000000a
-
-/* Number of entries in the .conflict section. */
-#define DT_MIPS_CONFLICTNO 0x7000000b
-
-/* Number of entries in the .liblist section. */
-#define DT_MIPS_LIBLISTNO 0x70000010
-
-/* Number of entries in the .dynsym section. */
-#define DT_MIPS_SYMTABNO 0x70000011
-
-/* Index of first external dynamic symbol not referenced locally. */
-#define DT_MIPS_UNREFEXTNO 0x70000012
-
-/* Index of first dynamic symbol in global offset table. */
-#define DT_MIPS_GOTSYM 0x70000013
-
-/* Number of page table entries in global offset table. */
-#define DT_MIPS_HIPAGENO 0x70000014
-
-/* Address of run time loader map, used for debugging. */
-#define DT_MIPS_RLD_MAP 0x70000016
-
-/* Delta C++ class definition. */
-#define DT_MIPS_DELTA_CLASS 0x70000017
-
-/* Number of entries in DT_MIPS_DELTA_CLASS. */
-#define DT_MIPS_DELTA_CLASS_NO 0x70000018
-
-/* Delta C++ class instances. */
-#define DT_MIPS_DELTA_INSTANCE 0x70000019
-
-/* Number of entries in DT_MIPS_DELTA_INSTANCE. */
-#define DT_MIPS_DELTA_INSTANCE_NO 0x7000001a
-
-/* Delta relocations. */
-#define DT_MIPS_DELTA_RELOC 0x7000001b
-
-/* Number of entries in DT_MIPS_DELTA_RELOC. */
-#define DT_MIPS_DELTA_RELOC_NO 0x7000001c
-
-/* Delta symbols that Delta relocations refer to. */
-#define DT_MIPS_DELTA_SYM 0x7000001d
-
-/* Number of entries in DT_MIPS_DELTA_SYM. */
-#define DT_MIPS_DELTA_SYM_NO 0x7000001e
-
-/* Delta symbols that hold class declarations. */
-#define DT_MIPS_DELTA_CLASSSYM 0x70000020
-
-/* Number of entries in DT_MIPS_DELTA_CLASSSYM. */
-#define DT_MIPS_DELTA_CLASSSYM_NO 0x70000021
-
-/* Flags indicating information about C++ flavor. */
-#define DT_MIPS_CXX_FLAGS 0x70000022
-
-/* Pixie information (???). */
-#define DT_MIPS_PIXIE_INIT 0x70000023
-
-/* Address of .MIPS.symlib */
-#define DT_MIPS_SYMBOL_LIB 0x70000024
-
-/* The GOT index of the first PTE for a segment */
-#define DT_MIPS_LOCALPAGE_GOTIDX 0x70000025
-
-/* The GOT index of the first PTE for a local symbol */
-#define DT_MIPS_LOCAL_GOTIDX 0x70000026
-
-/* The GOT index of the first PTE for a hidden symbol */
-#define DT_MIPS_HIDDEN_GOTIDX 0x70000027
-
-/* The GOT index of the first PTE for a protected symbol */
-#define DT_MIPS_PROTECTED_GOTIDX 0x70000028
-
-/* Address of `.MIPS.options'. */
-#define DT_MIPS_OPTIONS 0x70000029
-
-/* Address of `.interface'. */
-#define DT_MIPS_INTERFACE 0x7000002a
-
-/* ??? */
-#define DT_MIPS_DYNSTR_ALIGN 0x7000002b
-
-/* Size of the .interface section. */
-#define DT_MIPS_INTERFACE_SIZE 0x7000002c
-
-/* Size of rld_text_resolve function stored in the GOT. */
-#define DT_MIPS_RLD_TEXT_RESOLVE_ADDR 0x7000002d
-
-/* Default suffix of DSO to be added by rld on dlopen() calls. */
-#define DT_MIPS_PERF_SUFFIX 0x7000002e
-
-/* Size of compact relocation section (O32). */
-#define DT_MIPS_COMPACT_SIZE 0x7000002f
-
-/* GP value for auxiliary GOTs. */
-#define DT_MIPS_GP_VALUE 0x70000030
-
-/* Address of auxiliary .dynamic. */
-#define DT_MIPS_AUX_DYNAMIC 0x70000031
-
-/* Address of the base of the PLTGOT. */
-#define DT_MIPS_PLTGOT 0x70000032
-
-/* Points to the base of a writable PLT. */
-#define DT_MIPS_RWPLT 0x70000034
-
-/* Flags which may appear in a DT_MIPS_FLAGS entry. */
-
-/* No flags. */
-#define RHF_NONE 0x00000000
-
-/* Uses shortcut pointers. */
-#define RHF_QUICKSTART 0x00000001
-
-/* Hash size is not a power of two. */
-#define RHF_NOTPOT 0x00000002
-
-/* Ignore LD_LIBRARY_PATH. */
-#define RHS_NO_LIBRARY_REPLACEMENT 0x00000004
-
-/* DSO address may not be relocated. */
-#define RHF_NO_MOVE 0x00000008
-
-/* SGI specific features. */
-#define RHF_SGI_ONLY 0x00000010
-
-/* Guarantee that .init will finish executing before any non-init
- code in DSO is called. */
-#define RHF_GUARANTEE_INIT 0x00000020
-
-/* Contains Delta C++ code. */
-#define RHF_DELTA_C_PLUS_PLUS 0x00000040
-
-/* Guarantee that .init will start executing before any non-init
- code in DSO is called. */
-#define RHF_GUARANTEE_START_INIT 0x00000080
-
-/* Generated by pixie. */
-#define RHF_PIXIE 0x00000100
-
-/* Delay-load DSO by default. */
-#define RHF_DEFAULT_DELAY_LOAD 0x00000200
-
-/* Object may be requickstarted */
-#define RHF_REQUICKSTART 0x00000400
-
-/* Object has been requickstarted */
-#define RHF_REQUICKSTARTED 0x00000800
-
-/* Generated by cord. */
-#define RHF_CORD 0x00001000
-
-/* Object contains no unresolved undef symbols. */
-#define RHF_NO_UNRES_UNDEF 0x00002000
-
-/* Symbol table is in a safe order. */
-#define RHF_RLD_ORDER_SAFE 0x00004000
-
-/* Special values for the st_other field in the symbol table. These
- are used in an Irix 5 dynamic symbol table. */
-
-#define STO_DEFAULT STV_DEFAULT
-#define STO_INTERNAL STV_INTERNAL
-#define STO_HIDDEN STV_HIDDEN
-#define STO_PROTECTED STV_PROTECTED
-
-/* The MIPS psABI was updated in 2008 with support for PLTs and copy
- relocs. There are therefore two types of nonzero SHN_UNDEF functions:
- PLT entries and traditional MIPS lazy binding stubs. We mark the former
- with STO_MIPS_PLT to distinguish them from the latter. */
-#define STO_MIPS_PLT 0x8
-
-/* This value is used to mark PIC functions in an object that mixes
- PIC and non-PIC. */
-#define STO_MIPS_PIC 0x20
-#define ELF_ST_IS_MIPS_PIC(OTHER) \
- (((OTHER) & ~ELF_ST_VISIBILITY (-1)) == STO_MIPS_PIC)
-#define ELF_ST_SET_MIPS_PIC(OTHER) \
- (STO_MIPS_PIC | ELF_ST_VISIBILITY (OTHER))
-
-/* This value is used for a mips16 .text symbol. */
-#define STO_MIPS16 0xf0
-#define ELF_ST_IS_MIPS16(OTHER) (((OTHER) & 0xf0) == STO_MIPS16)
-#define ELF_ST_SET_MIPS16(OTHER) (((OTHER) & ~0xf0) | STO_MIPS16)
-
-/* This bit is used on Irix to indicate a symbol whose definition
- is optional - if, at final link time, it cannot be found, no
- error message should be produced. */
-#define STO_OPTIONAL (1 << 2)
-/* A macro to examine the STO_OPTIONAL bit. */
-#define ELF_MIPS_IS_OPTIONAL(other) ((other) & STO_OPTIONAL)
-
-/* The 64-bit MIPS ELF ABI uses an unusual reloc format. Each
- relocation entry specifies up to three actual relocations, all at
- the same address. The first relocation which required a symbol
- uses the symbol in the r_sym field. The second relocation which
- requires a symbol uses the symbol in the r_ssym field. If all
- three relocations require a symbol, the third one uses a zero
- value. */
-
-/* An entry in a 64 bit SHT_REL section. */
-
-typedef struct
-{
- /* Address of relocation. */
- unsigned char r_offset[8];
- /* Symbol index. */
- unsigned char r_sym[4];
- /* Special symbol. */
- unsigned char r_ssym[1];
- /* Third relocation. */
- unsigned char r_type3[1];
- /* Second relocation. */
- unsigned char r_type2[1];
- /* First relocation. */
- unsigned char r_type[1];
-} Elf64_Mips_External_Rel;
-
-typedef struct
-{
- /* Address of relocation. */
- bfd_vma r_offset;
- /* Symbol index. */
- unsigned long r_sym;
- /* Special symbol. */
- unsigned char r_ssym;
- /* Third relocation. */
- unsigned char r_type3;
- /* Second relocation. */
- unsigned char r_type2;
- /* First relocation. */
- unsigned char r_type;
-} Elf64_Mips_Internal_Rel;
-
-/* An entry in a 64 bit SHT_RELA section. */
-
-typedef struct
-{
- /* Address of relocation. */
- unsigned char r_offset[8];
- /* Symbol index. */
- unsigned char r_sym[4];
- /* Special symbol. */
- unsigned char r_ssym[1];
- /* Third relocation. */
- unsigned char r_type3[1];
- /* Second relocation. */
- unsigned char r_type2[1];
- /* First relocation. */
- unsigned char r_type[1];
- /* Addend. */
- unsigned char r_addend[8];
-} Elf64_Mips_External_Rela;
-
-typedef struct
-{
- /* Address of relocation. */
- bfd_vma r_offset;
- /* Symbol index. */
- unsigned long r_sym;
- /* Special symbol. */
- unsigned char r_ssym;
- /* Third relocation. */
- unsigned char r_type3;
- /* Second relocation. */
- unsigned char r_type2;
- /* First relocation. */
- unsigned char r_type;
- /* Addend. */
- bfd_signed_vma r_addend;
-} Elf64_Mips_Internal_Rela;
-
-/* MIPS ELF 64 relocation info access macros. */
-#define ELF64_MIPS_R_SSYM(i) (((i) >> 24) & 0xff)
-#define ELF64_MIPS_R_TYPE3(i) (((i) >> 16) & 0xff)
-#define ELF64_MIPS_R_TYPE2(i) (((i) >> 8) & 0xff)
-#define ELF64_MIPS_R_TYPE(i) ((i) & 0xff)
-
-/* Values found in the r_ssym field of a relocation entry. */
-
-/* No relocation. */
-#define RSS_UNDEF 0
-
-/* Value of GP. */
-#define RSS_GP 1
-
-/* Value of GP in object being relocated. */
-#define RSS_GP0 2
-
-/* Address of location being relocated. */
-#define RSS_LOC 3
-
-/* A SHT_MIPS_OPTIONS section contains a series of options, each of
- which starts with this header. */
-
-typedef struct
-{
- /* Type of option. */
- unsigned char kind[1];
- /* Size of option descriptor, including header. */
- unsigned char size[1];
- /* Section index of affected section, or 0 for global option. */
- unsigned char section[2];
- /* Information specific to this kind of option. */
- unsigned char info[4];
-} Elf_External_Options;
-
-typedef struct
-{
- /* Type of option. */
- unsigned char kind;
- /* Size of option descriptor, including header. */
- unsigned char size;
- /* Section index of affected section, or 0 for global option. */
- unsigned short section;
- /* Information specific to this kind of option. */
- unsigned long info;
-} Elf_Internal_Options;
-
-/* MIPS ELF option header swapping routines. */
-extern void bfd_mips_elf_swap_options_in
- (bfd *, const Elf_External_Options *, Elf_Internal_Options *);
-extern void bfd_mips_elf_swap_options_out
- (bfd *, const Elf_Internal_Options *, Elf_External_Options *);
-
-/* Values which may appear in the kind field of an Elf_Options
- structure. */
-
-/* Undefined. */
-#define ODK_NULL 0
-
-/* Register usage and GP value. */
-#define ODK_REGINFO 1
-
-/* Exception processing information. */
-#define ODK_EXCEPTIONS 2
-
-/* Section padding information. */
-#define ODK_PAD 3
-
-/* Hardware workarounds performed. */
-#define ODK_HWPATCH 4
-
-/* Fill value used by the linker. */
-#define ODK_FILL 5
-
-/* Reserved space for desktop tools. */
-#define ODK_TAGS 6
-
-/* Hardware workarounds, AND bits when merging. */
-#define ODK_HWAND 7
-
-/* Hardware workarounds, OR bits when merging. */
-#define ODK_HWOR 8
-
-/* GP group to use for text/data sections. */
-#define ODK_GP_GROUP 9
-
-/* ID information. */
-#define ODK_IDENT 10
-
-/* In the 32 bit ABI, an ODK_REGINFO option is just a Elf32_RegInfo
- structure. In the 64 bit ABI, it is the following structure. The
- info field of the options header is not used. */
-
-typedef struct
-{
- /* Mask of general purpose registers used. */
- unsigned char ri_gprmask[4];
- /* Padding. */
- unsigned char ri_pad[4];
- /* Mask of co-processor registers used. */
- unsigned char ri_cprmask[4][4];
- /* GP register value for this object file. */
- unsigned char ri_gp_value[8];
-} Elf64_External_RegInfo;
-
-typedef struct
-{
- /* Mask of general purpose registers used. */
- unsigned long ri_gprmask;
- /* Padding. */
- unsigned long ri_pad;
- /* Mask of co-processor registers used. */
- unsigned long ri_cprmask[4];
- /* GP register value for this object file. */
- bfd_vma ri_gp_value;
-} Elf64_Internal_RegInfo;
-
-typedef struct
-{
- /* The hash value computed from the name of the corresponding
- dynamic symbol. */
- unsigned char ms_hash_value[4];
- /* Contains both the dynamic relocation index and the symbol flags
- field. The macros ELF32_MS_REL_INDEX and ELF32_MS_FLAGS are used
- to access the individual values. The dynamic relocation index
- identifies the first entry in the .rel.dyn section that
- references the dynamic symbol corresponding to this msym entry.
- If the index is 0, no dynamic relocations are associated with the
- symbol. The symbol flags field is reserved for future use. */
- unsigned char ms_info[4];
-} Elf32_External_Msym;
-
-typedef struct
-{
- /* The hash value computed from the name of the corresponding
- dynamic symbol. */
- unsigned long ms_hash_value;
- /* Contains both the dynamic relocation index and the symbol flags
- field. The macros ELF32_MS_REL_INDEX and ELF32_MS_FLAGS are used
- to access the individual values. The dynamic relocation index
- identifies the first entry in the .rel.dyn section that
- references the dynamic symbol corresponding to this msym entry.
- If the index is 0, no dynamic relocations are associated with the
- symbol. The symbol flags field is reserved for future use. */
- unsigned long ms_info;
-} Elf32_Internal_Msym;
-
-#define ELF32_MS_REL_INDEX(i) ((i) >> 8)
-#define ELF32_MS_FLAGS(i) (i) & 0xff)
-#define ELF32_MS_INFO(r, f) (((r) << 8) + ((f) & 0xff))
-
-/* MIPS ELF reginfo swapping routines. */
-extern void bfd_mips_elf64_swap_reginfo_in
- (bfd *, const Elf64_External_RegInfo *, Elf64_Internal_RegInfo *);
-extern void bfd_mips_elf64_swap_reginfo_out
- (bfd *, const Elf64_Internal_RegInfo *, Elf64_External_RegInfo *);
-
-/* Masks for the info work of an ODK_EXCEPTIONS descriptor. */
-#define OEX_FPU_MIN 0x1f /* FPEs which must be enabled. */
-#define OEX_FPU_MAX 0x1f00 /* FPEs which may be enabled. */
-#define OEX_PAGE0 0x10000 /* Page zero must be mapped. */
-#define OEX_SMM 0x20000 /* Force sequential memory mode. */
-#define OEX_FPDBUG 0x40000 /* Force precise floating-point
- exceptions (debug mode). */
-#define OEX_DISMISS 0x80000 /* Dismiss invalid address faults. */
-
-/* Masks of the FP exceptions for OEX_FPU_MIN and OEX_FPU_MAX. */
-#define OEX_FPU_INVAL 0x10 /* Invalid operation exception. */
-#define OEX_FPU_DIV0 0x08 /* Division by zero exception. */
-#define OEX_FPU_OFLO 0x04 /* Overflow exception. */
-#define OEX_FPU_UFLO 0x02 /* Underflow exception. */
-#define OEX_FPU_INEX 0x01 /* Inexact exception. */
-
-/* Masks for the info word of an ODK_PAD descriptor. */
-#define OPAD_PREFIX 0x01
-#define OPAD_POSTFIX 0x02
-#define OPAD_SYMBOL 0x04
-
-/* Masks for the info word of an ODK_HWPATCH descriptor. */
-#define OHW_R4KEOP 0x00000001 /* R4000 end-of-page patch. */
-#define OHW_R8KPFETCH 0x00000002 /* May need R8000 prefetch patch. */
-#define OHW_R5KEOP 0x00000004 /* R5000 end-of-page patch. */
-#define OHW_R5KCVTL 0x00000008 /* R5000 cvt.[ds].l bug
- (clean == 1). */
-#define OHW_R10KLDL 0x00000010 /* Needs R10K misaligned
- load patch. */
-
-/* Masks for the info word of an ODK_IDENT/ODK_GP_GROUP descriptor. */
-#define OGP_GROUP 0x0000ffff /* GP group number. */
-#define OGP_SELF 0xffff0000 /* Self-contained GP groups. */
-
-/* Masks for the info word of an ODK_HWAND/ODK_HWOR descriptor. */
-#define OHWA0_R4KEOP_CHECKED 0x00000001
-#define OHWA0_R4KEOP_CLEAN 0x00000002
-
-
-/* Object attribute tags. */
-enum
-{
- /* 0-3 are generic. */
- Tag_GNU_MIPS_ABI_FP = 4, /* Value 1 for hard-float -mdouble-float, 2
- for hard-float -msingle-float, 3 for
- soft-float, 4 for -mips32r2 -mfp64; 0 for
- not tagged or not using any ABIs affected
- by the differences. */
-};
-
-#endif /* _ELF_MIPS_H */
diff --git a/include/elf/mmix.h b/include/elf/mmix.h
deleted file mode 100644
index 9661e87..0000000
--- a/include/elf/mmix.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/* MMIX support for BFD.
- Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* This file holds definitions specific to the MMIX ELF ABI. */
-#ifndef ELF_MMIX_H
-#define ELF_MMIX_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocations. See the reloc table in bfd/elf64-mmix.c for details. */
-START_RELOC_NUMBERS (elf_mmix_reloc_type)
- RELOC_NUMBER (R_MMIX_NONE, 0)
-
- /* Standard absolute relocations. */
- RELOC_NUMBER (R_MMIX_8, 1)
- RELOC_NUMBER (R_MMIX_16, 2)
- RELOC_NUMBER (R_MMIX_24, 3)
- RELOC_NUMBER (R_MMIX_32, 4)
- RELOC_NUMBER (R_MMIX_64, 5)
-
- /* Standard relative relocations. */
- RELOC_NUMBER (R_MMIX_PC_8, 6)
- RELOC_NUMBER (R_MMIX_PC_16, 7)
- RELOC_NUMBER (R_MMIX_PC_24, 8)
- RELOC_NUMBER (R_MMIX_PC_32, 9)
- RELOC_NUMBER (R_MMIX_PC_64, 10)
-
- /* GNU extensions for C++ vtables. */
- RELOC_NUMBER (R_MMIX_GNU_VTINHERIT, 11)
- RELOC_NUMBER (R_MMIX_GNU_VTENTRY, 12)
-
- /* A GETA instruction. */
- RELOC_NUMBER (R_MMIX_GETA, 13)
- RELOC_NUMBER (R_MMIX_GETA_1, 14)
- RELOC_NUMBER (R_MMIX_GETA_2, 15)
- RELOC_NUMBER (R_MMIX_GETA_3, 16)
-
- /* A conditional branch instruction. */
- RELOC_NUMBER (R_MMIX_CBRANCH, 17)
- RELOC_NUMBER (R_MMIX_CBRANCH_J, 18)
- RELOC_NUMBER (R_MMIX_CBRANCH_1, 19)
- RELOC_NUMBER (R_MMIX_CBRANCH_2, 20)
- RELOC_NUMBER (R_MMIX_CBRANCH_3, 21)
-
- /* A PUSHJ instruction. */
- RELOC_NUMBER (R_MMIX_PUSHJ, 22)
- RELOC_NUMBER (R_MMIX_PUSHJ_1, 23)
- RELOC_NUMBER (R_MMIX_PUSHJ_2, 24)
- RELOC_NUMBER (R_MMIX_PUSHJ_3, 25)
-
- /* A JMP instruction. */
- RELOC_NUMBER (R_MMIX_JMP, 26)
- RELOC_NUMBER (R_MMIX_JMP_1, 27)
- RELOC_NUMBER (R_MMIX_JMP_2, 28)
- RELOC_NUMBER (R_MMIX_JMP_3, 29)
-
- /* A relative address such as in a GETA or a branch. */
- RELOC_NUMBER (R_MMIX_ADDR19, 30)
-
- /* A relative address such as in a JMP (only). */
- RELOC_NUMBER (R_MMIX_ADDR27, 31)
-
- /* A general register or a number 0..255. */
- RELOC_NUMBER (R_MMIX_REG_OR_BYTE, 32)
-
- /* A general register. */
- RELOC_NUMBER (R_MMIX_REG, 33)
-
- /* A global register and an offset, the global register (allocated at
- link time) contents plus the offset made equivalent to the relocation
- expression at link time. The relocation must point at the Y field of
- an instruction. */
- RELOC_NUMBER (R_MMIX_BASE_PLUS_OFFSET, 34)
-
- /* A LOCAL assertion. */
- RELOC_NUMBER (R_MMIX_LOCAL, 35)
-
- /* A PUSHJ instruction, generating a stub if it does not reach. */
- RELOC_NUMBER (R_MMIX_PUSHJ_STUBBABLE, 36)
-END_RELOC_NUMBERS (R_MMIX_max)
-
-
-/* Section Attributes. */
-/* A section containing necessary information for relaxation. */
-#define SHF_MMIX_CANRELAX 0x80000000
-
-/* Symbol attributes. */
-/* A symbol with this section-index is a register. */
-#define SHN_REGISTER SHN_LOPROC
-
-/* This section holds contents for each initialized register, at VMA
- regno*8. A symbol relative to this section will be transformed to an
- absolute symbol with the value corresponding to the register number at
- final link time. A symbol with a value outside the inclusive range
- 32*8 .. 254*8 is an error. It is highly recommended to only use an
- upper bound of 253*8 or lower as specified in the (currently
- unspecified) ABI. */
-#define MMIX_REG_CONTENTS_SECTION_NAME ".MMIX.reg_contents"
-
-/* At link time, a section by this name is created, expected to be
- included in MMIX_REG_CONTENTS_SECTION_NAME in the output. */
-#define MMIX_LD_ALLOCATED_REG_CONTENTS_SECTION_NAME \
- ".MMIX.reg_contents.linker_allocated"
-
-/* This is a faked section holding symbols with SHN_REGISTER. Don't
- confuse it with MMIX_REG_CONTENTS_SECTION_NAME; this one has no
- contents, just values. It is an error for a value in this section to
- be outside the range 32..255 and it must never become an actual section
- in an object file. */
-#define MMIX_REG_SECTION_NAME "*REG*"
-
-/* Appended with a number N=0..65535, this is a representation of the
- mmixal "BSPEC N" ... "ESPEC" directive pair; the contents go into an
- ELF section by name ".MMIX.spec_data.N". */
-#define MMIX_OTHER_SPEC_SECTION_PREFIX ".MMIX.spec_data."
-
-/* A section SECNAME is noted to start at "__.MMIX.start.SECNAME" by the
- presence of this symbol. Currently only implemented for ".text"
- through the symbol "__.MMIX.start..text". */
-#define MMIX_LOC_SECTION_START_SYMBOL_PREFIX "__.MMIX.start."
-
-/* This symbol is always a function. */
-#define MMIX_START_SYMBOL_NAME "Main"
-
-
-/* We smuggle in a few MMO specifics here. We don't make a specific MMO
- file, since we can't reasonably support MMO without ELF; we have to
- include this file anyway. */
-
-#define MMO_TEXT_SECTION_NAME ".text"
-#define MMO_DATA_SECTION_NAME ".data"
-
-/* A definition for the flags we put in spec data in files. A copy of our
- own of some flags to keep immune to BFD flag changes. See section.c of
- 2001-07-18 for flag documentation. */
-#define MMO_SEC_ALLOC 0x001
-#define MMO_SEC_LOAD 0x002
-#define MMO_SEC_RELOC 0x004
-#define MMO_SEC_READONLY 0x010
-#define MMO_SEC_CODE 0x020
-#define MMO_SEC_DATA 0x040
-#define MMO_SEC_NEVER_LOAD 0x400
-#define MMO_SEC_IS_COMMON 0x8000
-#define MMO_SEC_DEBUGGING 0x10000
-
-#ifdef BFD_ARCH_SIZE
-extern bfd_boolean _bfd_mmix_before_linker_allocation
- (bfd *, struct bfd_link_info *);
-extern bfd_boolean _bfd_mmix_after_linker_allocation
- (bfd *, struct bfd_link_info *);
-extern bfd_boolean _bfd_mmix_check_all_relocs
- (bfd *, struct bfd_link_info *);
-#endif
-
-#endif /* ELF_MMIX_H */
diff --git a/include/elf/mn10200.h b/include/elf/mn10200.h
deleted file mode 100644
index 8461588..0000000
--- a/include/elf/mn10200.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* MN10200 ELF support for BFD.
- Copyright 1998, 2000 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* This file holds definitions specific to the MN10200 ELF ABI. */
-
-#ifndef _ELF_MN10200_H
-#define _ELF_MN10200_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocations. */
-START_RELOC_NUMBERS (elf_mn10200_reloc_type)
- RELOC_NUMBER (R_MN10200_NONE, 0)
- RELOC_NUMBER (R_MN10200_32, 1)
- RELOC_NUMBER (R_MN10200_16, 2)
- RELOC_NUMBER (R_MN10200_8, 3)
- RELOC_NUMBER (R_MN10200_24, 4)
- RELOC_NUMBER (R_MN10200_PCREL8, 5)
- RELOC_NUMBER (R_MN10200_PCREL16, 6)
- RELOC_NUMBER (R_MN10200_PCREL24, 7)
-END_RELOC_NUMBERS (R_MN10200_max)
-
-#endif /* _ELF_MN10200_H */
diff --git a/include/elf/mn10300.h b/include/elf/mn10300.h
deleted file mode 100644
index 444787b..0000000
--- a/include/elf/mn10300.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* MN10300 ELF support for BFD.
- Copyright 1998, 1999, 2000, 2003, 2007 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
- MA 02110-1301, USA. */
-
-/* This file holds definitions specific to the MN10300 ELF ABI. */
-
-#ifndef _ELF_MN10300_H
-#define _ELF_MN10300_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocations. */
-START_RELOC_NUMBERS (elf_mn10300_reloc_type)
- RELOC_NUMBER (R_MN10300_NONE, 0)
- RELOC_NUMBER (R_MN10300_32, 1)
- RELOC_NUMBER (R_MN10300_16, 2)
- RELOC_NUMBER (R_MN10300_8, 3)
- RELOC_NUMBER (R_MN10300_PCREL32, 4)
- RELOC_NUMBER (R_MN10300_PCREL16, 5)
- RELOC_NUMBER (R_MN10300_PCREL8, 6)
- RELOC_NUMBER (R_MN10300_GNU_VTINHERIT, 7)
- RELOC_NUMBER (R_MN10300_GNU_VTENTRY, 8)
- RELOC_NUMBER (R_MN10300_24, 9)
- RELOC_NUMBER (R_MN10300_GOTPC32, 10)
- RELOC_NUMBER (R_MN10300_GOTPC16, 11)
- RELOC_NUMBER (R_MN10300_GOTOFF32, 12)
- RELOC_NUMBER (R_MN10300_GOTOFF24, 13)
- RELOC_NUMBER (R_MN10300_GOTOFF16, 14)
- RELOC_NUMBER (R_MN10300_PLT32, 15)
- RELOC_NUMBER (R_MN10300_PLT16, 16)
- RELOC_NUMBER (R_MN10300_GOT32, 17)
- RELOC_NUMBER (R_MN10300_GOT24, 18)
- RELOC_NUMBER (R_MN10300_GOT16, 19)
- RELOC_NUMBER (R_MN10300_COPY, 20)
- RELOC_NUMBER (R_MN10300_GLOB_DAT, 21)
- RELOC_NUMBER (R_MN10300_JMP_SLOT, 22)
- RELOC_NUMBER (R_MN10300_RELATIVE, 23)
- RELOC_NUMBER (R_MN10300_SYM_DIFF, 33)
- RELOC_NUMBER (R_MN10300_ALIGN, 34)
-END_RELOC_NUMBERS (R_MN10300_MAX)
-
-/* Machine variant if we know it. This field was invented at Cygnus,
- but it is hoped that other vendors will adopt it. If some standard
- is developed, this code should be changed to follow it. */
-
-#define EF_MN10300_MACH 0x00FF0000
-
-/* Cygnus is choosing values between 80 and 9F;
- 00 - 7F should be left for a future standard;
- the rest are open. */
-
-#define E_MN10300_MACH_MN10300 0x00810000
-#define E_MN10300_MACH_AM33 0x00820000
-#define E_MN10300_MACH_AM33_2 0x00830000
-#endif /* _ELF_MN10300_H */
diff --git a/include/elf/msp430.h b/include/elf/msp430.h
deleted file mode 100644
index ff16ba2..0000000
--- a/include/elf/msp430.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* MSP430 ELF support for BFD.
- Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
- Contributed by Dmitry Diky <diwil@mail.ru>
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_MSP430_H
-#define _ELF_MSP430_H
-
-#include "elf/reloc-macros.h"
-
-/* Processor specific flags for the ELF header e_flags field. */
-#define EF_MSP430_MACH 0xff
-
-#define E_MSP430_MACH_MSP430x11 11
-#define E_MSP430_MACH_MSP430x11x1 110
-#define E_MSP430_MACH_MSP430x12 12
-#define E_MSP430_MACH_MSP430x13 13
-#define E_MSP430_MACH_MSP430x14 14
-#define E_MSP430_MACH_MSP430x15 15
-#define E_MSP430_MACH_MSP430x16 16
-#define E_MSP430_MACH_MSP430x31 31
-#define E_MSP430_MACH_MSP430x32 32
-#define E_MSP430_MACH_MSP430x33 33
-#define E_MSP430_MACH_MSP430x41 41
-#define E_MSP430_MACH_MSP430x42 42
-#define E_MSP430_MACH_MSP430x43 43
-#define E_MSP430_MACH_MSP430x44 44
-
-/* Relocations. */
-START_RELOC_NUMBERS (elf_msp430_reloc_type)
- RELOC_NUMBER (R_MSP430_NONE, 0)
- RELOC_NUMBER (R_MSP430_32, 1)
- RELOC_NUMBER (R_MSP430_10_PCREL, 2)
- RELOC_NUMBER (R_MSP430_16, 3)
- RELOC_NUMBER (R_MSP430_16_PCREL, 4)
- RELOC_NUMBER (R_MSP430_16_BYTE, 5)
- RELOC_NUMBER (R_MSP430_16_PCREL_BYTE, 6)
- RELOC_NUMBER (R_MSP430_2X_PCREL, 7)
- RELOC_NUMBER (R_MSP430_RL_PCREL, 8)
-
-END_RELOC_NUMBERS (R_MSP430_max)
-
-#endif /* _ELF_MSP430_H */
diff --git a/include/elf/mt.h b/include/elf/mt.h
deleted file mode 100644
index 974c2de..0000000
--- a/include/elf/mt.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* MS1 ELF support for BFD.
- Copyright (C) 2000, 2005 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifndef _ELF_MT_H
-#define _ELF_MT_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocations. */
-START_RELOC_NUMBERS (elf_mt_reloc_type)
- RELOC_NUMBER (R_MT_NONE, 0)
- RELOC_NUMBER (R_MT_16, 1)
- RELOC_NUMBER (R_MT_32, 2)
- RELOC_NUMBER (R_MT_32_PCREL, 3)
- RELOC_NUMBER (R_MT_PC16, 4)
- RELOC_NUMBER (R_MT_HI16, 5)
- RELOC_NUMBER (R_MT_LO16, 6)
-END_RELOC_NUMBERS(R_MT_max)
-
-#define EF_MT_CPU_MRISC 0x00000001 /* default */
-#define EF_MT_CPU_MRISC2 0x00000002 /* MRISC2 */
-#define EF_MT_CPU_MS2 0x00000003 /* MS2 */
-#define EF_MT_CPU_MASK 0x00000003 /* specific cpu bits */
-#define EF_MT_ALL_FLAGS (EF_MT_CPU_MASK)
-
-/* The location of the memory mapped hardware stack. */
-#define MT_STACK_VALUE 0x0f000000
-#define MT_STACK_SIZE 0x20
-
-#endif /* _ELF_MT_H */
diff --git a/include/elf/openrisc.h b/include/elf/openrisc.h
deleted file mode 100644
index 326834e..0000000
--- a/include/elf/openrisc.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* OpenRISC ELF support for BFD.
- Copyright 2001 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software Foundation, Inc.,
-51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_OPENRISC_H
-#define _ELF_OPENRISC_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocations. */
-START_RELOC_NUMBERS (elf_openrisc_reloc_type)
- RELOC_NUMBER (R_OPENRISC_NONE, 0)
- RELOC_NUMBER (R_OPENRISC_INSN_REL_26, 1)
- RELOC_NUMBER (R_OPENRISC_INSN_ABS_26, 2)
- RELOC_NUMBER (R_OPENRISC_LO_16_IN_INSN, 3)
- RELOC_NUMBER (R_OPENRISC_HI_16_IN_INSN, 4)
- RELOC_NUMBER (R_OPENRISC_8, 5)
- RELOC_NUMBER (R_OPENRISC_16, 6)
- RELOC_NUMBER (R_OPENRISC_32, 7)
- RELOC_NUMBER (R_OPENRISC_GNU_VTINHERIT, 8)
- RELOC_NUMBER (R_OPENRISC_GNU_VTENTRY, 9)
-END_RELOC_NUMBERS (R_OPENRISC_max)
-
-#endif /* _ELF_OPENRISC_H */
diff --git a/include/elf/or32.h b/include/elf/or32.h
deleted file mode 100644
index bc308e7..0000000
--- a/include/elf/or32.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* OR1K ELF support for BFD. Derived from ppc.h.
- Copyright (C) 2002 Free Software Foundation, Inc.
- Contributed by Ivan Guzvinec <ivang@opencores.org>
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_OR1K_H
-#define _ELF_OR1K_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocations. */
-START_RELOC_NUMBERS (elf_or32_reloc_type)
- RELOC_NUMBER (R_OR32_NONE, 0)
- RELOC_NUMBER (R_OR32_32, 1)
- RELOC_NUMBER (R_OR32_16, 2)
- RELOC_NUMBER (R_OR32_8, 3)
- RELOC_NUMBER (R_OR32_CONST, 4)
- RELOC_NUMBER (R_OR32_CONSTH, 5)
- RELOC_NUMBER (R_OR32_JUMPTARG, 6)
- RELOC_NUMBER (R_OR32_GNU_VTENTRY, 7)
- RELOC_NUMBER (R_OR32_GNU_VTINHERIT, 8)
-END_RELOC_NUMBERS (R_OR32_max)
-
-/* Four bit OR32 machine type field. */
-#define EF_OR32_MACH 0x0000000f
-
-/* Various CPU types. */
-#define E_OR32_MACH_BASE 0x00000000
-#define E_OR32_MACH_UNUSED1 0x00000001
-#define E_OR32_MACH_UNUSED2 0x00000002
-#define E_OR32_MACH_UNUSED4 0x00000003
-
-/* Processor specific section headers, sh_type field */
-#define SHT_ORDERED SHT_HIPROC /* Link editor is to sort the \
- entries in this section \
- based on the address \
- specified in the associated \
- symbol table entry. */
-
-/* Processor specific section flags, sh_flags field */
-#define SHF_EXCLUDE 0x80000000 /* Link editor is to exclude \
- this section from executable \
- and shared objects that it \
- builds when those objects \
- are not to be furhter \
- relocated. */
-#endif /* _ELF_OR1K_H */
diff --git a/include/elf/pj.h b/include/elf/pj.h
deleted file mode 100644
index 45cc7b3..0000000
--- a/include/elf/pj.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* picoJava ELF support for BFD.
- Copyright 1999, 2000 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_PJ_H
-#define _ELF_PJ_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocations. */
-
-START_RELOC_NUMBERS (elf_pj_reloc_type)
- RELOC_NUMBER (R_PJ_NONE, 0)
- RELOC_NUMBER (R_PJ_DATA_DIR32, 1)
- RELOC_NUMBER (R_PJ_CODE_REL32, 2)
- RELOC_NUMBER (R_PJ_CODE_REL16, 3)
- RELOC_NUMBER (R_PJ_CODE_DIR32, 6)
- RELOC_NUMBER (R_PJ_CODE_DIR16, 7)
- RELOC_NUMBER (R_PJ_CODE_LO16, 13)
- RELOC_NUMBER (R_PJ_CODE_HI16, 14)
- RELOC_NUMBER (R_PJ_GNU_VTINHERIT, 15)
- RELOC_NUMBER (R_PJ_GNU_VTENTRY, 16)
-END_RELOC_NUMBERS (R_PJ_max)
-
-#define EF_PICOJAVA_ARCH 0x0000000f
-#define EF_PICOJAVA_NEWCALLS 0x00000010
-#define EF_PICOJAVA_GNUCALLS 0x00000020 /* The (currently) non standard GNU calling convention */
-
-#endif
diff --git a/include/elf/ppc.h b/include/elf/ppc.h
deleted file mode 100644
index a0c16f1..0000000
--- a/include/elf/ppc.h
+++ /dev/null
@@ -1,196 +0,0 @@
-/* PPC ELF support for BFD.
- Copyright 1995, 1996, 1998, 2000, 2001, 2002, 2003, 2005, 2007, 2008
- Free Software Foundation, Inc.
-
- By Michael Meissner, Cygnus Support, <meissner@cygnus.com>, from information
- in the System V Application Binary Interface, PowerPC Processor Supplement
- and the PowerPC Embedded Application Binary Interface (eabi).
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* This file holds definitions specific to the PPC ELF ABI. Note
- that most of this is not actually implemented by BFD. */
-
-#ifndef _ELF_PPC_H
-#define _ELF_PPC_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocations. */
-START_RELOC_NUMBERS (elf_ppc_reloc_type)
- RELOC_NUMBER (R_PPC_NONE, 0)
- RELOC_NUMBER (R_PPC_ADDR32, 1)
- RELOC_NUMBER (R_PPC_ADDR24, 2)
- RELOC_NUMBER (R_PPC_ADDR16, 3)
- RELOC_NUMBER (R_PPC_ADDR16_LO, 4)
- RELOC_NUMBER (R_PPC_ADDR16_HI, 5)
- RELOC_NUMBER (R_PPC_ADDR16_HA, 6)
- RELOC_NUMBER (R_PPC_ADDR14, 7)
- RELOC_NUMBER (R_PPC_ADDR14_BRTAKEN, 8)
- RELOC_NUMBER (R_PPC_ADDR14_BRNTAKEN, 9)
- RELOC_NUMBER (R_PPC_REL24, 10)
- RELOC_NUMBER (R_PPC_REL14, 11)
- RELOC_NUMBER (R_PPC_REL14_BRTAKEN, 12)
- RELOC_NUMBER (R_PPC_REL14_BRNTAKEN, 13)
- RELOC_NUMBER (R_PPC_GOT16, 14)
- RELOC_NUMBER (R_PPC_GOT16_LO, 15)
- RELOC_NUMBER (R_PPC_GOT16_HI, 16)
- RELOC_NUMBER (R_PPC_GOT16_HA, 17)
- RELOC_NUMBER (R_PPC_PLTREL24, 18)
- RELOC_NUMBER (R_PPC_COPY, 19)
- RELOC_NUMBER (R_PPC_GLOB_DAT, 20)
- RELOC_NUMBER (R_PPC_JMP_SLOT, 21)
- RELOC_NUMBER (R_PPC_RELATIVE, 22)
- RELOC_NUMBER (R_PPC_LOCAL24PC, 23)
- RELOC_NUMBER (R_PPC_UADDR32, 24)
- RELOC_NUMBER (R_PPC_UADDR16, 25)
- RELOC_NUMBER (R_PPC_REL32, 26)
- RELOC_NUMBER (R_PPC_PLT32, 27)
- RELOC_NUMBER (R_PPC_PLTREL32, 28)
- RELOC_NUMBER (R_PPC_PLT16_LO, 29)
- RELOC_NUMBER (R_PPC_PLT16_HI, 30)
- RELOC_NUMBER (R_PPC_PLT16_HA, 31)
- RELOC_NUMBER (R_PPC_SDAREL16, 32)
- RELOC_NUMBER (R_PPC_SECTOFF, 33)
- RELOC_NUMBER (R_PPC_SECTOFF_LO, 34)
- RELOC_NUMBER (R_PPC_SECTOFF_HI, 35)
- RELOC_NUMBER (R_PPC_SECTOFF_HA, 36)
- RELOC_NUMBER (R_PPC_ADDR30, 37)
-
- /* Relocs added to support TLS. */
- RELOC_NUMBER (R_PPC_TLS, 67)
- RELOC_NUMBER (R_PPC_DTPMOD32, 68)
- RELOC_NUMBER (R_PPC_TPREL16, 69)
- RELOC_NUMBER (R_PPC_TPREL16_LO, 70)
- RELOC_NUMBER (R_PPC_TPREL16_HI, 71)
- RELOC_NUMBER (R_PPC_TPREL16_HA, 72)
- RELOC_NUMBER (R_PPC_TPREL32, 73)
- RELOC_NUMBER (R_PPC_DTPREL16, 74)
- RELOC_NUMBER (R_PPC_DTPREL16_LO, 75)
- RELOC_NUMBER (R_PPC_DTPREL16_HI, 76)
- RELOC_NUMBER (R_PPC_DTPREL16_HA, 77)
- RELOC_NUMBER (R_PPC_DTPREL32, 78)
- RELOC_NUMBER (R_PPC_GOT_TLSGD16, 79)
- RELOC_NUMBER (R_PPC_GOT_TLSGD16_LO, 80)
- RELOC_NUMBER (R_PPC_GOT_TLSGD16_HI, 81)
- RELOC_NUMBER (R_PPC_GOT_TLSGD16_HA, 82)
- RELOC_NUMBER (R_PPC_GOT_TLSLD16, 83)
- RELOC_NUMBER (R_PPC_GOT_TLSLD16_LO, 84)
- RELOC_NUMBER (R_PPC_GOT_TLSLD16_HI, 85)
- RELOC_NUMBER (R_PPC_GOT_TLSLD16_HA, 86)
- RELOC_NUMBER (R_PPC_GOT_TPREL16, 87)
- RELOC_NUMBER (R_PPC_GOT_TPREL16_LO, 88)
- RELOC_NUMBER (R_PPC_GOT_TPREL16_HI, 89)
- RELOC_NUMBER (R_PPC_GOT_TPREL16_HA, 90)
- RELOC_NUMBER (R_PPC_GOT_DTPREL16, 91)
- RELOC_NUMBER (R_PPC_GOT_DTPREL16_LO, 92)
- RELOC_NUMBER (R_PPC_GOT_DTPREL16_HI, 93)
- RELOC_NUMBER (R_PPC_GOT_DTPREL16_HA, 94)
-
-/* The remaining relocs are from the Embedded ELF ABI, and are not
- in the SVR4 ELF ABI. */
- RELOC_NUMBER (R_PPC_EMB_NADDR32, 101)
- RELOC_NUMBER (R_PPC_EMB_NADDR16, 102)
- RELOC_NUMBER (R_PPC_EMB_NADDR16_LO, 103)
- RELOC_NUMBER (R_PPC_EMB_NADDR16_HI, 104)
- RELOC_NUMBER (R_PPC_EMB_NADDR16_HA, 105)
- RELOC_NUMBER (R_PPC_EMB_SDAI16, 106)
- RELOC_NUMBER (R_PPC_EMB_SDA2I16, 107)
- RELOC_NUMBER (R_PPC_EMB_SDA2REL, 108)
- RELOC_NUMBER (R_PPC_EMB_SDA21, 109)
- RELOC_NUMBER (R_PPC_EMB_MRKREF, 110)
- RELOC_NUMBER (R_PPC_EMB_RELSEC16, 111)
- RELOC_NUMBER (R_PPC_EMB_RELST_LO, 112)
- RELOC_NUMBER (R_PPC_EMB_RELST_HI, 113)
- RELOC_NUMBER (R_PPC_EMB_RELST_HA, 114)
- RELOC_NUMBER (R_PPC_EMB_BIT_FLD, 115)
- RELOC_NUMBER (R_PPC_EMB_RELSDA, 116)
-
-/* Fake relocations for branch stubs, only used internally by ld. */
-#define R_PPC_RELAX32 245
-#define R_PPC_RELAX32PC 246
-#define R_PPC_RELAX32_PLT 247
-#define R_PPC_RELAX32PC_PLT 248
-
-/* These are GNU extensions used in PIC code sequences. */
- RELOC_NUMBER (R_PPC_REL16, 249)
- RELOC_NUMBER (R_PPC_REL16_LO, 250)
- RELOC_NUMBER (R_PPC_REL16_HI, 251)
- RELOC_NUMBER (R_PPC_REL16_HA, 252)
-
-/* These are GNU extensions to enable C++ vtable garbage collection. */
- RELOC_NUMBER (R_PPC_GNU_VTINHERIT, 253)
- RELOC_NUMBER (R_PPC_GNU_VTENTRY, 254)
-
-/* This is a phony reloc to handle any old fashioned TOC16 references
- that may still be in object files. */
- RELOC_NUMBER (R_PPC_TOC16, 255)
-
-END_RELOC_NUMBERS (R_PPC_max)
-
-#define IS_PPC_TLS_RELOC(R) \
- ((R) >= R_PPC_TLS && (R) <= R_PPC_GOT_DTPREL16_HA)
-
-/* Specify the value of _GLOBAL_OFFSET_TABLE_. */
-#define DT_PPC_GOT DT_LOPROC
-
-/* Processor specific flags for the ELF header e_flags field. */
-
-#define EF_PPC_EMB 0x80000000 /* PowerPC embedded flag. */
-
-#define EF_PPC_RELOCATABLE 0x00010000 /* PowerPC -mrelocatable flag. */
-#define EF_PPC_RELOCATABLE_LIB 0x00008000 /* PowerPC -mrelocatable-lib flag. */
-
-/* Processor specific section headers, sh_type field. */
-
-#define SHT_ORDERED SHT_HIPROC /* Link editor is to sort the \
- entries in this section \
- based on the address \
- specified in the associated \
- symbol table entry. */
-
-/* Processor specific section flags, sh_flags field. */
-
-#define SHF_EXCLUDE 0x80000000 /* Link editor is to exclude \
- this section from executable \
- and shared objects that it \
- builds when those objects \
- are not to be furhter \
- relocated. */
-
-/* Object attribute tags. */
-enum
-{
- /* 0-3 are generic. */
- Tag_GNU_Power_ABI_FP = 4, /* Value 1 for hard-float, 2 for
- soft-float, 3 for single=precision
- hard-float; 0 for not tagged or not
- using any ABIs affected by the
- differences. */
-
- /* Value 1 for general purpose registers only, 2 for AltiVec
- registers, 3 for SPE registers; 0 for not tagged or not using any
- ABIs affected by the differences. */
- Tag_GNU_Power_ABI_Vector = 8,
-
- /* Value 1 for ABIs using r3/r4 for returning structures <= 8 bytes,
- 2 for ABIs using memory; 0 for not tagged or not using any ABIs
- affected by the differences. */
- Tag_GNU_Power_ABI_Struct_Return = 12
-};
-
-#endif /* _ELF_PPC_H */
diff --git a/include/elf/ppc64.h b/include/elf/ppc64.h
deleted file mode 100644
index 4aab2ec..0000000
--- a/include/elf/ppc64.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/* PPC64 ELF support for BFD.
- Copyright 2003 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_PPC64_H
-#define _ELF_PPC64_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocations. */
-START_RELOC_NUMBERS (elf_ppc64_reloc_type)
- RELOC_NUMBER (R_PPC64_NONE, 0)
- RELOC_NUMBER (R_PPC64_ADDR32, 1)
- RELOC_NUMBER (R_PPC64_ADDR24, 2)
- RELOC_NUMBER (R_PPC64_ADDR16, 3)
- RELOC_NUMBER (R_PPC64_ADDR16_LO, 4)
- RELOC_NUMBER (R_PPC64_ADDR16_HI, 5)
- RELOC_NUMBER (R_PPC64_ADDR16_HA, 6)
- RELOC_NUMBER (R_PPC64_ADDR14, 7)
- RELOC_NUMBER (R_PPC64_ADDR14_BRTAKEN, 8)
- RELOC_NUMBER (R_PPC64_ADDR14_BRNTAKEN, 9)
- RELOC_NUMBER (R_PPC64_REL24, 10)
- RELOC_NUMBER (R_PPC64_REL14, 11)
- RELOC_NUMBER (R_PPC64_REL14_BRTAKEN, 12)
- RELOC_NUMBER (R_PPC64_REL14_BRNTAKEN, 13)
- RELOC_NUMBER (R_PPC64_GOT16, 14)
- RELOC_NUMBER (R_PPC64_GOT16_LO, 15)
- RELOC_NUMBER (R_PPC64_GOT16_HI, 16)
- RELOC_NUMBER (R_PPC64_GOT16_HA, 17)
- /* 18 unused. 32-bit reloc is R_PPC_PLTREL24. */
- RELOC_NUMBER (R_PPC64_COPY, 19)
- RELOC_NUMBER (R_PPC64_GLOB_DAT, 20)
- RELOC_NUMBER (R_PPC64_JMP_SLOT, 21)
- RELOC_NUMBER (R_PPC64_RELATIVE, 22)
- /* 23 unused. 32-bit reloc is R_PPC_LOCAL24PC. */
- RELOC_NUMBER (R_PPC64_UADDR32, 24)
- RELOC_NUMBER (R_PPC64_UADDR16, 25)
- RELOC_NUMBER (R_PPC64_REL32, 26)
- RELOC_NUMBER (R_PPC64_PLT32, 27)
- RELOC_NUMBER (R_PPC64_PLTREL32, 28)
- RELOC_NUMBER (R_PPC64_PLT16_LO, 29)
- RELOC_NUMBER (R_PPC64_PLT16_HI, 30)
- RELOC_NUMBER (R_PPC64_PLT16_HA, 31)
- /* 32 unused. 32-bit reloc is R_PPC_SDAREL16. */
- RELOC_NUMBER (R_PPC64_SECTOFF, 33)
- RELOC_NUMBER (R_PPC64_SECTOFF_LO, 34)
- RELOC_NUMBER (R_PPC64_SECTOFF_HI, 35)
- RELOC_NUMBER (R_PPC64_SECTOFF_HA, 36)
- RELOC_NUMBER (R_PPC64_REL30, 37)
- RELOC_NUMBER (R_PPC64_ADDR64, 38)
- RELOC_NUMBER (R_PPC64_ADDR16_HIGHER, 39)
- RELOC_NUMBER (R_PPC64_ADDR16_HIGHERA, 40)
- RELOC_NUMBER (R_PPC64_ADDR16_HIGHEST, 41)
- RELOC_NUMBER (R_PPC64_ADDR16_HIGHESTA, 42)
- RELOC_NUMBER (R_PPC64_UADDR64, 43)
- RELOC_NUMBER (R_PPC64_REL64, 44)
- RELOC_NUMBER (R_PPC64_PLT64, 45)
- RELOC_NUMBER (R_PPC64_PLTREL64, 46)
- RELOC_NUMBER (R_PPC64_TOC16, 47)
- RELOC_NUMBER (R_PPC64_TOC16_LO, 48)
- RELOC_NUMBER (R_PPC64_TOC16_HI, 49)
- RELOC_NUMBER (R_PPC64_TOC16_HA, 50)
- RELOC_NUMBER (R_PPC64_TOC, 51)
- RELOC_NUMBER (R_PPC64_PLTGOT16, 52)
- RELOC_NUMBER (R_PPC64_PLTGOT16_LO, 53)
- RELOC_NUMBER (R_PPC64_PLTGOT16_HI, 54)
- RELOC_NUMBER (R_PPC64_PLTGOT16_HA, 55)
-
- /* The following relocs were added in the 64-bit PowerPC ELF ABI
- revision 1.2. */
- RELOC_NUMBER (R_PPC64_ADDR16_DS, 56)
- RELOC_NUMBER (R_PPC64_ADDR16_LO_DS, 57)
- RELOC_NUMBER (R_PPC64_GOT16_DS, 58)
- RELOC_NUMBER (R_PPC64_GOT16_LO_DS, 59)
- RELOC_NUMBER (R_PPC64_PLT16_LO_DS, 60)
- RELOC_NUMBER (R_PPC64_SECTOFF_DS, 61)
- RELOC_NUMBER (R_PPC64_SECTOFF_LO_DS, 62)
- RELOC_NUMBER (R_PPC64_TOC16_DS, 63)
- RELOC_NUMBER (R_PPC64_TOC16_LO_DS, 64)
- RELOC_NUMBER (R_PPC64_PLTGOT16_DS, 65)
- RELOC_NUMBER (R_PPC64_PLTGOT16_LO_DS, 66)
-
- /* Relocs added to support TLS. PowerPC64 ELF ABI revision 1.5. */
- RELOC_NUMBER (R_PPC64_TLS, 67)
- RELOC_NUMBER (R_PPC64_DTPMOD64, 68)
- RELOC_NUMBER (R_PPC64_TPREL16, 69)
- RELOC_NUMBER (R_PPC64_TPREL16_LO, 70)
- RELOC_NUMBER (R_PPC64_TPREL16_HI, 71)
- RELOC_NUMBER (R_PPC64_TPREL16_HA, 72)
- RELOC_NUMBER (R_PPC64_TPREL64, 73)
- RELOC_NUMBER (R_PPC64_DTPREL16, 74)
- RELOC_NUMBER (R_PPC64_DTPREL16_LO, 75)
- RELOC_NUMBER (R_PPC64_DTPREL16_HI, 76)
- RELOC_NUMBER (R_PPC64_DTPREL16_HA, 77)
- RELOC_NUMBER (R_PPC64_DTPREL64, 78)
- RELOC_NUMBER (R_PPC64_GOT_TLSGD16, 79)
- RELOC_NUMBER (R_PPC64_GOT_TLSGD16_LO, 80)
- RELOC_NUMBER (R_PPC64_GOT_TLSGD16_HI, 81)
- RELOC_NUMBER (R_PPC64_GOT_TLSGD16_HA, 82)
- RELOC_NUMBER (R_PPC64_GOT_TLSLD16, 83)
- RELOC_NUMBER (R_PPC64_GOT_TLSLD16_LO, 84)
- RELOC_NUMBER (R_PPC64_GOT_TLSLD16_HI, 85)
- RELOC_NUMBER (R_PPC64_GOT_TLSLD16_HA, 86)
- RELOC_NUMBER (R_PPC64_GOT_TPREL16_DS, 87)
- RELOC_NUMBER (R_PPC64_GOT_TPREL16_LO_DS, 88)
- RELOC_NUMBER (R_PPC64_GOT_TPREL16_HI, 89)
- RELOC_NUMBER (R_PPC64_GOT_TPREL16_HA, 90)
- RELOC_NUMBER (R_PPC64_GOT_DTPREL16_DS, 91)
- RELOC_NUMBER (R_PPC64_GOT_DTPREL16_LO_DS, 92)
- RELOC_NUMBER (R_PPC64_GOT_DTPREL16_HI, 93)
- RELOC_NUMBER (R_PPC64_GOT_DTPREL16_HA, 94)
- RELOC_NUMBER (R_PPC64_TPREL16_DS, 95)
- RELOC_NUMBER (R_PPC64_TPREL16_LO_DS, 96)
- RELOC_NUMBER (R_PPC64_TPREL16_HIGHER, 97)
- RELOC_NUMBER (R_PPC64_TPREL16_HIGHERA, 98)
- RELOC_NUMBER (R_PPC64_TPREL16_HIGHEST, 99)
- RELOC_NUMBER (R_PPC64_TPREL16_HIGHESTA, 100)
- RELOC_NUMBER (R_PPC64_DTPREL16_DS, 101)
- RELOC_NUMBER (R_PPC64_DTPREL16_LO_DS, 102)
- RELOC_NUMBER (R_PPC64_DTPREL16_HIGHER, 103)
- RELOC_NUMBER (R_PPC64_DTPREL16_HIGHERA, 104)
- RELOC_NUMBER (R_PPC64_DTPREL16_HIGHEST, 105)
- RELOC_NUMBER (R_PPC64_DTPREL16_HIGHESTA, 106)
-
- /* These are GNU extensions to enable C++ vtable garbage collection. */
- RELOC_NUMBER (R_PPC64_GNU_VTINHERIT, 253)
- RELOC_NUMBER (R_PPC64_GNU_VTENTRY, 254)
-
-END_RELOC_NUMBERS (R_PPC64_max)
-
-#define IS_PPC64_TLS_RELOC(R) \
- ((R) >= R_PPC64_TLS && (R) <= R_PPC64_DTPREL16_HIGHESTA)
-
-/* Specify the start of the .glink section. */
-#define DT_PPC64_GLINK DT_LOPROC
-
-/* Specify the start and size of the .opd section. */
-#define DT_PPC64_OPD (DT_LOPROC + 1)
-#define DT_PPC64_OPDSZ (DT_LOPROC + 2)
-
-#endif /* _ELF_PPC64_H */
diff --git a/include/elf/reloc-macros.h b/include/elf/reloc-macros.h
deleted file mode 100644
index aefb85f..0000000
--- a/include/elf/reloc-macros.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/* Generic relocation support for BFD.
- Copyright 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* These macros are used by the various *.h target specific header
- files to either generate an enum containing all the known relocations
- for that target, or if RELOC_MACROS_GEN_FUNC is defined, a recognition
- function is generated instead. (This is used by binutils/readelf.c)
-
- Given a header file like this:
-
- START_RELOC_NUMBERS (foo)
- RELOC_NUMBER (R_foo_NONE, 0)
- RELOC_NUMBER (R_foo_32, 1)
- EMPTY_RELOC (R_foo_good)
- FAKE_RELOC (R_foo_illegal, 9)
- END_RELOC_NUMBERS (R_foo_count)
-
- Then the following will be produced by default (ie if
- RELOC_MACROS_GEN_FUNC is *not* defined).
-
- enum foo
- {
- R_foo_NONE = 0,
- R_foo_32 = 1,
- R_foo_good,
- R_foo_illegal = 9,
- R_foo_count
- };
-
- Note: The value of the symbol defined in the END_RELOC_NUMBERS
- macro (R_foo_count in the case of the example above) will be
- set to the value of the whichever *_RELOC macro preceeds it plus
- one. Therefore if you intend to use the symbol as a sentinel for
- the highest valid macro value you should make sure that the
- preceeding *_RELOC macro is the highest valid number. ie a
- declaration like this:
-
- START_RELOC_NUMBERS (foo)
- RELOC_NUMBER (R_foo_NONE, 0)
- RELOC_NUMBER (R_foo_32, 1)
- FAKE_RELOC (R_foo_illegal, 9)
- FAKE_RELOC (R_foo_synonym, 0)
- END_RELOC_NUMBERS (R_foo_count)
-
- will result in R_foo_count having a value of 1 (R_foo_synonym + 1)
- rather than 10 or 2 as might be expected.
-
- Alternatively you can assign a value to END_RELOC_NUMBERS symbol
- explicitly, like this:
-
- START_RELOC_NUMBERS (foo)
- RELOC_NUMBER (R_foo_NONE, 0)
- RELOC_NUMBER (R_foo_32, 1)
- FAKE_RELOC (R_foo_illegal, 9)
- FAKE_RELOC (R_foo_synonym, 0)
- END_RELOC_NUMBERS (R_foo_count = 2)
-
- If RELOC_MACROS_GEN_FUNC *is* defined, then instead the
- following function will be generated:
-
- static const char *foo (unsigned long rtype);
- static const char *
- foo (unsigned long rtype)
- {
- switch (rtype)
- {
- case 0: return "R_foo_NONE";
- case 1: return "R_foo_32";
- default: return NULL;
- }
- }
- */
-
-#ifndef _RELOC_MACROS_H
-#define _RELOC_MACROS_H
-
-#ifdef RELOC_MACROS_GEN_FUNC
-
-/* This function takes the relocation number and returns the
- string version name of the name of that relocation. If
- the relocation is not recognised, NULL is returned. */
-
-#define START_RELOC_NUMBERS(name) \
-static const char *name (unsigned long rtype); \
-static const char * \
-name (unsigned long rtype) \
-{ \
- switch (rtype) \
- {
-
-#define RELOC_NUMBER(name, number) \
- case number: return #name;
-
-#define FAKE_RELOC(name, number)
-#define EMPTY_RELOC(name)
-
-#define END_RELOC_NUMBERS(name) \
- default: return NULL; \
- } \
-}
-
-
-#else /* Default to generating enum. */
-
-#define START_RELOC_NUMBERS(name) enum name {
-#define RELOC_NUMBER(name, number) name = number,
-#define FAKE_RELOC(name, number) name = number,
-#define EMPTY_RELOC(name) name,
-#define END_RELOC_NUMBERS(name) name };
-
-#endif
-
-#endif /* _RELOC_MACROS_H */
diff --git a/include/elf/s390.h b/include/elf/s390.h
deleted file mode 100644
index c62b110..0000000
--- a/include/elf/s390.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/* 390 ELF support for BFD.
- Copyright 2000, 2001, 2003 Free Software Foundation, Inc.
- Contributed by Carl B. Pedersen and Martin Schwidefsky.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-#ifndef _ELF_390_H
-#define _ELF_390_H
-
-/* Processor specific flags for the ELF header e_flags field. */
-
-/* Symbol types. */
-
-#define STACK_REG 15 /* Global Stack reg */
-#define BACKL_REG 14 /* Global Backlink reg */
-#define BASE_REG 13 /* Global Base reg */
-#define GOT_REG 12 /* Holds addr of GOT */
-
-#include "elf/reloc-macros.h"
-
-/* Relocation types. */
-
-START_RELOC_NUMBERS (elf_s390_reloc_type)
- RELOC_NUMBER (R_390_NONE, 0) /* No reloc. */
- RELOC_NUMBER (R_390_8, 1) /* Direct 8 bit. */
- RELOC_NUMBER (R_390_12, 2) /* Direct 12 bit. */
- RELOC_NUMBER (R_390_16, 3) /* Direct 16 bit. */
- RELOC_NUMBER (R_390_32, 4) /* Direct 32 bit. */
- RELOC_NUMBER (R_390_PC32, 5) /* PC relative 32 bit. */
- RELOC_NUMBER (R_390_GOT12, 6) /* 12 bit GOT offset. */
- RELOC_NUMBER (R_390_GOT32, 7) /* 32 bit GOT offset. */
- RELOC_NUMBER (R_390_PLT32, 8) /* 32 bit PC relative PLT address. */
- RELOC_NUMBER (R_390_COPY, 9) /* Copy symbol at runtime. */
- RELOC_NUMBER (R_390_GLOB_DAT, 10) /* Create GOT entry. */
- RELOC_NUMBER (R_390_JMP_SLOT, 11) /* Create PLT entry. */
- RELOC_NUMBER (R_390_RELATIVE, 12) /* Adjust by program base. */
- RELOC_NUMBER (R_390_GOTOFF32, 13) /* 32 bit offset to GOT. */
- RELOC_NUMBER (R_390_GOTPC, 14) /* 32 bit PC relative offset to GOT. */
- RELOC_NUMBER (R_390_GOT16, 15) /* 16 bit GOT offset. */
- RELOC_NUMBER (R_390_PC16, 16) /* PC relative 16 bit. */
- RELOC_NUMBER (R_390_PC16DBL, 17) /* PC relative 16 bit shifted by 1. */
- RELOC_NUMBER (R_390_PLT16DBL, 18) /* 16 bit PC rel. PLT shifted by 1. */
- RELOC_NUMBER (R_390_PC32DBL, 19) /* PC relative 32 bit shifted by 1. */
- RELOC_NUMBER (R_390_PLT32DBL, 20) /* 32 bit PC rel. PLT shifted by 1. */
- RELOC_NUMBER (R_390_GOTPCDBL, 21) /* 32 bit PC rel. GOT shifted by 1. */
- RELOC_NUMBER (R_390_64, 22) /* Direct 64 bit. */
- RELOC_NUMBER (R_390_PC64, 23) /* PC relative 64 bit. */
- RELOC_NUMBER (R_390_GOT64, 24) /* 64 bit GOT offset. */
- RELOC_NUMBER (R_390_PLT64, 25) /* 64 bit PC relative PLT address. */
- RELOC_NUMBER (R_390_GOTENT, 26) /* 32 bit PC rel. to GOT entry >> 1. */
- RELOC_NUMBER (R_390_GOTOFF16, 27) /* 16 bit offset to GOT. */
- RELOC_NUMBER (R_390_GOTOFF64, 28) /* 64 bit offset to GOT. */
- RELOC_NUMBER (R_390_GOTPLT12, 29) /* 12 bit offset to jump slot. */
- RELOC_NUMBER (R_390_GOTPLT16, 30) /* 16 bit offset to jump slot. */
- RELOC_NUMBER (R_390_GOTPLT32, 31) /* 32 bit offset to jump slot. */
- RELOC_NUMBER (R_390_GOTPLT64, 32) /* 64 bit offset to jump slot. */
- RELOC_NUMBER (R_390_GOTPLTENT, 33) /* 32 bit rel. offset to jump slot. */
- RELOC_NUMBER (R_390_PLTOFF16, 34) /* 16 bit offset from GOT to PLT. */
- RELOC_NUMBER (R_390_PLTOFF32, 35) /* 32 bit offset from GOT to PLT. */
- RELOC_NUMBER (R_390_PLTOFF64, 36) /* 16 bit offset from GOT to PLT. */
- RELOC_NUMBER (R_390_TLS_LOAD, 37) /* Tag for load insn in TLS code. */
- RELOC_NUMBER (R_390_TLS_GDCALL, 38) /* Tag for function call in general
- dynamic TLS code. */
- RELOC_NUMBER (R_390_TLS_LDCALL, 39) /* Tag for function call in local
- dynamic TLS code. */
- RELOC_NUMBER (R_390_TLS_GD32, 40) /* Direct 32 bit for general dynamic
- thread local data. */
- RELOC_NUMBER (R_390_TLS_GD64, 41) /* Direct 64 bit for general dynamic
- thread local data. */
- RELOC_NUMBER (R_390_TLS_GOTIE12, 42)/* 12 bit GOT offset for static TLS
- block offset. */
- RELOC_NUMBER (R_390_TLS_GOTIE32, 43)/* 32 bit GOT offset for static TLS
- block offset. */
- RELOC_NUMBER (R_390_TLS_GOTIE64, 44)/* 64 bit GOT offset for static TLS
- block offset. */
- RELOC_NUMBER (R_390_TLS_LDM32, 45) /* Direct 32 bit for local dynamic
- thread local data in LD code. */
- RELOC_NUMBER (R_390_TLS_LDM64, 46) /* Direct 64 bit for local dynamic
- thread local data in LD code. */
- RELOC_NUMBER (R_390_TLS_IE32, 47) /* 32 bit address of GOT entry for
- negated static TLS block offset. */
- RELOC_NUMBER (R_390_TLS_IE64, 48) /* 64 bit address of GOT entry for
- negated static TLS block offset. */
- RELOC_NUMBER (R_390_TLS_IEENT, 49) /* 32 bit rel. offset to GOT entry for
- negated static TLS block offset. */
- RELOC_NUMBER (R_390_TLS_LE32, 50) /* 32 bit negated offset relative to
- static TLS block. */
- RELOC_NUMBER (R_390_TLS_LE64, 51) /* 64 bit negated offset relative to
- static TLS block. */
- RELOC_NUMBER (R_390_TLS_LDO32, 52) /* 32 bit offset relative to TLS
- block. */
- RELOC_NUMBER (R_390_TLS_LDO64, 53) /* 64 bit offset relative to TLS
- block. */
- RELOC_NUMBER (R_390_TLS_DTPMOD, 54) /* ID of module containing symbol. */
- RELOC_NUMBER (R_390_TLS_DTPOFF, 55) /* Offset in TLS block. */
- RELOC_NUMBER (R_390_TLS_TPOFF, 56) /* Negate offset in static TLS
- block. */
- RELOC_NUMBER (R_390_20, 57) /* Direct 20 bit. */
- RELOC_NUMBER (R_390_GOT20, 58) /* 20 bit GOT offset. */
- RELOC_NUMBER (R_390_GOTPLT20, 59) /* 20 bit offset to jump slot. */
- RELOC_NUMBER (R_390_TLS_GOTIE20, 60)/* 20 bit GOT offset for statis TLS
- block offset. */
- /* These are GNU extensions to enable C++ vtable garbage collection. */
- RELOC_NUMBER (R_390_GNU_VTINHERIT, 250)
- RELOC_NUMBER (R_390_GNU_VTENTRY, 251)
-END_RELOC_NUMBERS (R_390_max)
-
-#endif /* _ELF_390_H */
-
-
diff --git a/include/elf/score.h b/include/elf/score.h
deleted file mode 100644
index 72ada05..0000000
--- a/include/elf/score.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/* Score ELF support for BFD.
- Copyright 2006, 2008 Free Software Foundation, Inc.
- Contributed by
- Mei Ligang (ligang@sunnorth.com.cn)
- Pei-Lin Tsai (pltsai@sunplus.com)
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_SCORE_H
-#define _ELF_SCORE_H
-
-#include "elf/reloc-macros.h"
-
-#define SCORE_SIMULATOR_ACTIVE 1
-#define OPC_PTMASK 0xc0000000 /* Parity-bit Mask. */
-#define OPC16_PTMASK 0x00008000
-/* The parity-bit denotes. */
-#define OPC_32 0xc0000000 /* Denotes 32b instruction, (default). */
-#define OPC_16 0x00000000 /* Denotes 16b instruction. */
-#define OPC_PE 0x8000 /* Denotes parallel-execution instructions. */
-#define GP_DISP_LABEL "_gp_disp"
-
-/* Processor specific flags for the ELF header e_flags field: */
-
-/* File contains position independent code. */
-#define EF_SCORE_PIC 0x80000000
-
-/* Fix data dependency. */
-#define EF_SCORE_FIXDEP 0x40000000
-
-/* Defined and allocated common symbol. Value is virtual address. If
- relocated, alignment must be preserved. */
-#define SHN_SCORE_TEXT (SHN_LORESERVE + 1)
-#define SHN_SCORE_DATA (SHN_LORESERVE + 2)
-/* Small common symbol. */
-#define SHN_SCORE_SCOMMON (SHN_LORESERVE + 3)
-
-/* Processor specific section flags. */
-
-/* This section must be in the global data area. */
-#define SHF_SCORE_GPREL 0x10000000
-
-/* This section should be merged. */
-#define SHF_SCORE_MERGE 0x20000000
-
-/* This section contains address data of size implied by section
- element size. */
-#define SHF_SCORE_ADDR 0x40000000
-
-/* This section contains string data. */
-#define SHF_SCORE_STRING 0x80000000
-
-/* This section may not be stripped. */
-#define SHF_SCORE_NOSTRIP 0x08000000
-
-/* This section is local to threads. */
-#define SHF_SCORE_LOCAL 0x04000000
-
-/* Linker should generate implicit weak names for this section. */
-#define SHF_SCORE_NAMES 0x02000000
-
-/* Section contais text/data which may be replicated in other sections.
- Linker should retain only one copy. */
-#define SHF_SCORE_NODUPES 0x01000000
-
-/* Processor specific dynamic array tags. */
-
-/* Base address of the segment. */
-#define DT_SCORE_BASE_ADDRESS 0x70000001
-/* Number of local global offset table entries. */
-#define DT_SCORE_LOCAL_GOTNO 0x70000002
-/* Number of entries in the .dynsym section. */
-#define DT_SCORE_SYMTABNO 0x70000003
-/* Index of first dynamic symbol in global offset table. */
-#define DT_SCORE_GOTSYM 0x70000004
-/* Index of first external dynamic symbol not referenced locally. */
-#define DT_SCORE_UNREFEXTNO 0x70000005
-/* Number of page table entries in global offset table. */
-#define DT_SCORE_HIPAGENO 0x70000006
-
-
-/* Processor specific section types. */
-
-
-/* Relocation types. */
-START_RELOC_NUMBERS (elf_score_reloc_type)
- RELOC_NUMBER (R_SCORE_NONE, 0)
- RELOC_NUMBER (R_SCORE_HI16, 1)
- RELOC_NUMBER (R_SCORE_LO16, 2)
- RELOC_NUMBER (R_SCORE_DUMMY1, 3)
- RELOC_NUMBER (R_SCORE_24, 4)
- RELOC_NUMBER (R_SCORE_PC19, 5)
- RELOC_NUMBER (R_SCORE16_11, 6)
- RELOC_NUMBER (R_SCORE16_PC8, 7)
- RELOC_NUMBER (R_SCORE_ABS32, 8)
- RELOC_NUMBER (R_SCORE_ABS16, 9)
- RELOC_NUMBER (R_SCORE_DUMMY2, 10)
- RELOC_NUMBER (R_SCORE_GP15, 11)
- RELOC_NUMBER (R_SCORE_GNU_VTINHERIT, 12)
- RELOC_NUMBER (R_SCORE_GNU_VTENTRY, 13)
- RELOC_NUMBER (R_SCORE_GOT15, 14)
- RELOC_NUMBER (R_SCORE_GOT_LO16, 15)
- RELOC_NUMBER (R_SCORE_CALL15, 16)
- RELOC_NUMBER (R_SCORE_GPREL32, 17)
- RELOC_NUMBER (R_SCORE_REL32, 18)
- RELOC_NUMBER (R_SCORE_DUMMY_HI16, 19)
-END_RELOC_NUMBERS (R_SCORE_max)
-
-#endif /* _ELF_SCORE_H */
diff --git a/include/elf/sh.h b/include/elf/sh.h
deleted file mode 100644
index 4969116..0000000
--- a/include/elf/sh.h
+++ /dev/null
@@ -1,233 +0,0 @@
-/* SH ELF support for BFD.
- Copyright 1998, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_SH_H
-#define _ELF_SH_H
-
-/* Processor specific flags for the ELF header e_flags field. */
-
-#define EF_SH_MACH_MASK 0x1f
-#define EF_SH_UNKNOWN 0 /* For backwards compatibility. */
-#define EF_SH1 1
-#define EF_SH2 2
-#define EF_SH3 3
-#define EF_SH_DSP 4
-#define EF_SH3_DSP 5
-#define EF_SH4AL_DSP 6
-#define EF_SH3E 8
-#define EF_SH4 9
-#define EF_SH2E 11
-#define EF_SH4A 12
-#define EF_SH2A 13
-
-#define EF_SH4_NOFPU 16
-#define EF_SH4A_NOFPU 17
-#define EF_SH4_NOMMU_NOFPU 18
-#define EF_SH2A_NOFPU 19
-#define EF_SH3_NOMMU 20
-
-#define EF_SH2A_SH4_NOFPU 21
-#define EF_SH2A_SH3_NOFPU 22
-#define EF_SH2A_SH4 23
-#define EF_SH2A_SH3E 24
-
-/* This one can only mix in objects from other EF_SH5 objects. */
-#define EF_SH5 10
-
-/* Define the mapping from ELF to bfd mach numbers.
- bfd_mach_* are defined in bfd_in2.h (generated from
- archures.c). */
-#define EF_SH_BFD_TABLE \
-/* EF_SH_UNKNOWN */ bfd_mach_sh , \
-/* EF_SH1 */ bfd_mach_sh , \
-/* EF_SH2 */ bfd_mach_sh2 , \
-/* EF_SH3 */ bfd_mach_sh3 , \
-/* EF_SH_DSP */ bfd_mach_sh_dsp , \
-/* EF_SH3_DSP */ bfd_mach_sh3_dsp , \
-/* EF_SHAL_DSP */ bfd_mach_sh4al_dsp , \
-/* 7 */ 0, \
-/* EF_SH3E */ bfd_mach_sh3e , \
-/* EF_SH4 */ bfd_mach_sh4 , \
-/* EF_SH5 */ 0, \
-/* EF_SH2E */ bfd_mach_sh2e , \
-/* EF_SH4A */ bfd_mach_sh4a , \
-/* EF_SH2A */ bfd_mach_sh2a , \
-/* 14, 15 */ 0, 0, \
-/* EF_SH4_NOFPU */ bfd_mach_sh4_nofpu , \
-/* EF_SH4A_NOFPU */ bfd_mach_sh4a_nofpu , \
-/* EF_SH4_NOMMU_NOFPU */ bfd_mach_sh4_nommu_nofpu, \
-/* EF_SH2A_NOFPU */ bfd_mach_sh2a_nofpu , \
-/* EF_SH3_NOMMU */ bfd_mach_sh3_nommu , \
-/* EF_SH2A_SH4_NOFPU */ bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu, \
-/* EF_SH2A_SH3_NOFPU */ bfd_mach_sh2a_nofpu_or_sh3_nommu, \
-/* EF_SH2A_SH4 */ bfd_mach_sh2a_or_sh4 , \
-/* EF_SH2A_SH3E */ bfd_mach_sh2a_or_sh3e
-
-/* Convert arch_sh* into EF_SH*. */
-int sh_find_elf_flags (unsigned int arch_set);
-
-/* Convert bfd_mach_* into EF_SH*. */
-int sh_elf_get_flags_from_mach (unsigned long mach);
-
-/* Flags for the st_other symbol field.
- Keep away from the STV_ visibility flags (bit 0..1). */
-
-/* A reference to this symbol should by default add 1. */
-#define STO_SH5_ISA32 (1 << 2)
-
-/* Section contains only SHmedia code (no SHcompact code). */
-#define SHF_SH5_ISA32 0x40000000
-
-/* Section contains both SHmedia and SHcompact code, and possibly also
- constants. */
-#define SHF_SH5_ISA32_MIXED 0x20000000
-
-/* If applied to a .cranges section, marks that the section is sorted by
- increasing cr_addr values. */
-#define SHT_SH5_CR_SORTED 0x80000001
-
-/* Symbol should be handled as DataLabel (attached to global SHN_UNDEF
- symbols). */
-#define STT_DATALABEL STT_LOPROC
-
-#include "elf/reloc-macros.h"
-
-/* Relocations. */
-/* Relocations 10-32 and 128-255 are GNU extensions.
- 25..32 and 10 are used for relaxation. */
-START_RELOC_NUMBERS (elf_sh_reloc_type)
- RELOC_NUMBER (R_SH_NONE, 0)
- RELOC_NUMBER (R_SH_DIR32, 1)
- RELOC_NUMBER (R_SH_REL32, 2)
- RELOC_NUMBER (R_SH_DIR8WPN, 3)
- RELOC_NUMBER (R_SH_IND12W, 4)
- RELOC_NUMBER (R_SH_DIR8WPL, 5)
- RELOC_NUMBER (R_SH_DIR8WPZ, 6)
- RELOC_NUMBER (R_SH_DIR8BP, 7)
- RELOC_NUMBER (R_SH_DIR8W, 8)
- RELOC_NUMBER (R_SH_DIR8L, 9)
-
- RELOC_NUMBER (R_SH_LOOP_START, 10)
- RELOC_NUMBER (R_SH_LOOP_END, 11)
-
- FAKE_RELOC (R_SH_FIRST_INVALID_RELOC, 12)
- FAKE_RELOC (R_SH_LAST_INVALID_RELOC, 21)
-
- RELOC_NUMBER (R_SH_GNU_VTINHERIT, 22)
- RELOC_NUMBER (R_SH_GNU_VTENTRY, 23)
- RELOC_NUMBER (R_SH_SWITCH8, 24)
- RELOC_NUMBER (R_SH_SWITCH16, 25)
- RELOC_NUMBER (R_SH_SWITCH32, 26)
- RELOC_NUMBER (R_SH_USES, 27)
- RELOC_NUMBER (R_SH_COUNT, 28)
- RELOC_NUMBER (R_SH_ALIGN, 29)
- RELOC_NUMBER (R_SH_CODE, 30)
- RELOC_NUMBER (R_SH_DATA, 31)
- RELOC_NUMBER (R_SH_LABEL, 32)
-
- RELOC_NUMBER (R_SH_DIR16, 33)
- RELOC_NUMBER (R_SH_DIR8, 34)
- RELOC_NUMBER (R_SH_DIR8UL, 35)
- RELOC_NUMBER (R_SH_DIR8UW, 36)
- RELOC_NUMBER (R_SH_DIR8U, 37)
- RELOC_NUMBER (R_SH_DIR8SW, 38)
- RELOC_NUMBER (R_SH_DIR8S, 39)
- RELOC_NUMBER (R_SH_DIR4UL, 40)
- RELOC_NUMBER (R_SH_DIR4UW, 41)
- RELOC_NUMBER (R_SH_DIR4U, 42)
- RELOC_NUMBER (R_SH_PSHA, 43)
- RELOC_NUMBER (R_SH_PSHL, 44)
- RELOC_NUMBER (R_SH_DIR5U, 45)
- RELOC_NUMBER (R_SH_DIR6U, 46)
- RELOC_NUMBER (R_SH_DIR6S, 47)
- RELOC_NUMBER (R_SH_DIR10S, 48)
- RELOC_NUMBER (R_SH_DIR10SW, 49)
- RELOC_NUMBER (R_SH_DIR10SL, 50)
- RELOC_NUMBER (R_SH_DIR10SQ, 51)
- FAKE_RELOC (R_SH_FIRST_INVALID_RELOC_2, 52)
- FAKE_RELOC (R_SH_LAST_INVALID_RELOC_2, 52)
- RELOC_NUMBER (R_SH_DIR16S, 53)
- FAKE_RELOC (R_SH_FIRST_INVALID_RELOC_3, 54)
- FAKE_RELOC (R_SH_LAST_INVALID_RELOC_3, 143)
- RELOC_NUMBER (R_SH_TLS_GD_32, 144)
- RELOC_NUMBER (R_SH_TLS_LD_32, 145)
- RELOC_NUMBER (R_SH_TLS_LDO_32, 146)
- RELOC_NUMBER (R_SH_TLS_IE_32, 147)
- RELOC_NUMBER (R_SH_TLS_LE_32, 148)
- RELOC_NUMBER (R_SH_TLS_DTPMOD32, 149)
- RELOC_NUMBER (R_SH_TLS_DTPOFF32, 150)
- RELOC_NUMBER (R_SH_TLS_TPOFF32, 151)
- FAKE_RELOC (R_SH_FIRST_INVALID_RELOC_4, 152)
- FAKE_RELOC (R_SH_LAST_INVALID_RELOC_4, 159)
- RELOC_NUMBER (R_SH_GOT32, 160)
- RELOC_NUMBER (R_SH_PLT32, 161)
- RELOC_NUMBER (R_SH_COPY, 162)
- RELOC_NUMBER (R_SH_GLOB_DAT, 163)
- RELOC_NUMBER (R_SH_JMP_SLOT, 164)
- RELOC_NUMBER (R_SH_RELATIVE, 165)
- RELOC_NUMBER (R_SH_GOTOFF, 166)
- RELOC_NUMBER (R_SH_GOTPC, 167)
- RELOC_NUMBER (R_SH_GOTPLT32, 168)
- RELOC_NUMBER (R_SH_GOT_LOW16, 169)
- RELOC_NUMBER (R_SH_GOT_MEDLOW16, 170)
- RELOC_NUMBER (R_SH_GOT_MEDHI16, 171)
- RELOC_NUMBER (R_SH_GOT_HI16, 172)
- RELOC_NUMBER (R_SH_GOTPLT_LOW16, 173)
- RELOC_NUMBER (R_SH_GOTPLT_MEDLOW16, 174)
- RELOC_NUMBER (R_SH_GOTPLT_MEDHI16, 175)
- RELOC_NUMBER (R_SH_GOTPLT_HI16, 176)
- RELOC_NUMBER (R_SH_PLT_LOW16, 177)
- RELOC_NUMBER (R_SH_PLT_MEDLOW16, 178)
- RELOC_NUMBER (R_SH_PLT_MEDHI16, 179)
- RELOC_NUMBER (R_SH_PLT_HI16, 180)
- RELOC_NUMBER (R_SH_GOTOFF_LOW16, 181)
- RELOC_NUMBER (R_SH_GOTOFF_MEDLOW16, 182)
- RELOC_NUMBER (R_SH_GOTOFF_MEDHI16, 183)
- RELOC_NUMBER (R_SH_GOTOFF_HI16, 184)
- RELOC_NUMBER (R_SH_GOTPC_LOW16, 185)
- RELOC_NUMBER (R_SH_GOTPC_MEDLOW16, 186)
- RELOC_NUMBER (R_SH_GOTPC_MEDHI16, 187)
- RELOC_NUMBER (R_SH_GOTPC_HI16, 188)
- RELOC_NUMBER (R_SH_GOT10BY4, 189)
- RELOC_NUMBER (R_SH_GOTPLT10BY4, 190)
- RELOC_NUMBER (R_SH_GOT10BY8, 191)
- RELOC_NUMBER (R_SH_GOTPLT10BY8, 192)
- RELOC_NUMBER (R_SH_COPY64, 193)
- RELOC_NUMBER (R_SH_GLOB_DAT64, 194)
- RELOC_NUMBER (R_SH_JMP_SLOT64, 195)
- RELOC_NUMBER (R_SH_RELATIVE64, 196)
- FAKE_RELOC (R_SH_FIRST_INVALID_RELOC_5, 197)
- FAKE_RELOC (R_SH_LAST_INVALID_RELOC_5, 241)
- RELOC_NUMBER (R_SH_SHMEDIA_CODE, 242)
- RELOC_NUMBER (R_SH_PT_16, 243)
- RELOC_NUMBER (R_SH_IMMS16, 244)
- RELOC_NUMBER (R_SH_IMMU16, 245)
- RELOC_NUMBER (R_SH_IMM_LOW16, 246)
- RELOC_NUMBER (R_SH_IMM_LOW16_PCREL, 247)
- RELOC_NUMBER (R_SH_IMM_MEDLOW16, 248)
- RELOC_NUMBER (R_SH_IMM_MEDLOW16_PCREL, 249)
- RELOC_NUMBER (R_SH_IMM_MEDHI16, 250)
- RELOC_NUMBER (R_SH_IMM_MEDHI16_PCREL, 251)
- RELOC_NUMBER (R_SH_IMM_HI16, 252)
- RELOC_NUMBER (R_SH_IMM_HI16_PCREL, 253)
- RELOC_NUMBER (R_SH_64, 254)
- RELOC_NUMBER (R_SH_64_PCREL, 255)
-END_RELOC_NUMBERS (R_SH_max)
-
-#endif
diff --git a/include/elf/sparc.h b/include/elf/sparc.h
deleted file mode 100644
index 22b4477..0000000
--- a/include/elf/sparc.h
+++ /dev/null
@@ -1,186 +0,0 @@
-/* SPARC ELF support for BFD.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2008
- Free Software Foundation, Inc.
- By Doug Evans, Cygnus Support, <dje@cygnus.com>.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_SPARC_H
-#define _ELF_SPARC_H
-
-/* Processor specific flags for the ELF header e_flags field. */
-
-/* These are defined by Sun. */
-
-#define EF_SPARC_32PLUS_MASK 0xffff00 /* bits indicating V8+ type */
-#define EF_SPARC_32PLUS 0x000100 /* generic V8+ features */
-#define EF_SPARC_SUN_US1 0x000200 /* Sun UltraSPARC1 extensions */
-#define EF_SPARC_HAL_R1 0x000400 /* HAL R1 extensions */
-#define EF_SPARC_SUN_US3 0x000800 /* Sun UltraSPARCIII extensions */
-
-#define EF_SPARC_LEDATA 0x800000 /* little endian data */
-
-/* This name is used in the V9 ABI. */
-#define EF_SPARC_EXT_MASK 0xffff00 /* reserved for vendor extensions */
-
-/* V9 memory models */
-#define EF_SPARCV9_MM 0x3 /* memory model mask */
-#define EF_SPARCV9_TSO 0x0 /* total store ordering */
-#define EF_SPARCV9_PSO 0x1 /* partial store ordering */
-#define EF_SPARCV9_RMO 0x2 /* relaxed store ordering */
-
-/* Section indices. */
-
-#define SHN_BEFORE SHN_LORESERVE /* used with SHF_ORDERED */
-#define SHN_AFTER (SHN_LORESERVE + 1) /* used with SHF_ORDERED */
-
-/* Section flags. */
-
-#define SHF_EXCLUDE 0x80000000 /* exclude from linking */
-#define SHF_ORDERED 0x40000000 /* treat sh_link,sh_info specially */
-
-/* Symbol types. */
-
-#define STT_REGISTER 13 /* global reg reserved to app. */
-
-#include "elf/reloc-macros.h"
-
-/* Relocation types. */
-START_RELOC_NUMBERS (elf_sparc_reloc_type)
- RELOC_NUMBER (R_SPARC_NONE, 0)
- RELOC_NUMBER (R_SPARC_8, 1)
- RELOC_NUMBER (R_SPARC_16, 2)
- RELOC_NUMBER (R_SPARC_32, 3)
- RELOC_NUMBER (R_SPARC_DISP8, 4)
- RELOC_NUMBER (R_SPARC_DISP16, 5)
- RELOC_NUMBER (R_SPARC_DISP32, 6)
- RELOC_NUMBER (R_SPARC_WDISP30, 7)
- RELOC_NUMBER (R_SPARC_WDISP22, 8)
- RELOC_NUMBER (R_SPARC_HI22, 9)
- RELOC_NUMBER (R_SPARC_22, 10)
- RELOC_NUMBER (R_SPARC_13, 11)
- RELOC_NUMBER (R_SPARC_LO10, 12)
- RELOC_NUMBER (R_SPARC_GOT10, 13)
- RELOC_NUMBER (R_SPARC_GOT13, 14)
- RELOC_NUMBER (R_SPARC_GOT22, 15)
- RELOC_NUMBER (R_SPARC_PC10, 16)
- RELOC_NUMBER (R_SPARC_PC22, 17)
- RELOC_NUMBER (R_SPARC_WPLT30, 18)
- RELOC_NUMBER (R_SPARC_COPY, 19)
- RELOC_NUMBER (R_SPARC_GLOB_DAT, 20)
- RELOC_NUMBER (R_SPARC_JMP_SLOT, 21)
- RELOC_NUMBER (R_SPARC_RELATIVE, 22)
- RELOC_NUMBER (R_SPARC_UA32, 23)
-
- /* ??? These 6 relocs are new but not currently used. For binary
- compatibility in the sparc64-elf toolchain, we leave them out.
- A non-binary upward compatible change is expected for sparc64-elf. */
-#ifndef SPARC64_OLD_RELOCS
- /* ??? New relocs on the UltraSPARC. Not sure what they're for yet. */
- RELOC_NUMBER (R_SPARC_PLT32, 24)
- RELOC_NUMBER (R_SPARC_HIPLT22, 25)
- RELOC_NUMBER (R_SPARC_LOPLT10, 26)
- RELOC_NUMBER (R_SPARC_PCPLT32, 27)
- RELOC_NUMBER (R_SPARC_PCPLT22, 28)
- RELOC_NUMBER (R_SPARC_PCPLT10, 29)
-#endif
-
- /* v9 relocs */
- RELOC_NUMBER (R_SPARC_10, 30)
- RELOC_NUMBER (R_SPARC_11, 31)
- RELOC_NUMBER (R_SPARC_64, 32)
- RELOC_NUMBER (R_SPARC_OLO10, 33)
- RELOC_NUMBER (R_SPARC_HH22, 34)
- RELOC_NUMBER (R_SPARC_HM10, 35)
- RELOC_NUMBER (R_SPARC_LM22, 36)
- RELOC_NUMBER (R_SPARC_PC_HH22, 37)
- RELOC_NUMBER (R_SPARC_PC_HM10, 38)
- RELOC_NUMBER (R_SPARC_PC_LM22, 39)
- RELOC_NUMBER (R_SPARC_WDISP16, 40)
- RELOC_NUMBER (R_SPARC_WDISP19, 41)
- RELOC_NUMBER (R_SPARC_UNUSED_42, 42)
- RELOC_NUMBER (R_SPARC_7, 43)
- RELOC_NUMBER (R_SPARC_5, 44)
- RELOC_NUMBER (R_SPARC_6, 45)
- RELOC_NUMBER (R_SPARC_DISP64, 46)
- RELOC_NUMBER (R_SPARC_PLT64, 47)
- RELOC_NUMBER (R_SPARC_HIX22, 48)
- RELOC_NUMBER (R_SPARC_LOX10, 49)
- RELOC_NUMBER (R_SPARC_H44, 50)
- RELOC_NUMBER (R_SPARC_M44, 51)
- RELOC_NUMBER (R_SPARC_L44, 52)
- RELOC_NUMBER (R_SPARC_REGISTER, 53)
- RELOC_NUMBER (R_SPARC_UA64, 54)
- RELOC_NUMBER (R_SPARC_UA16, 55)
-
- RELOC_NUMBER (R_SPARC_TLS_GD_HI22, 56)
- RELOC_NUMBER (R_SPARC_TLS_GD_LO10, 57)
- RELOC_NUMBER (R_SPARC_TLS_GD_ADD, 58)
- RELOC_NUMBER (R_SPARC_TLS_GD_CALL, 59)
- RELOC_NUMBER (R_SPARC_TLS_LDM_HI22, 60)
- RELOC_NUMBER (R_SPARC_TLS_LDM_LO10, 61)
- RELOC_NUMBER (R_SPARC_TLS_LDM_ADD, 62)
- RELOC_NUMBER (R_SPARC_TLS_LDM_CALL, 63)
- RELOC_NUMBER (R_SPARC_TLS_LDO_HIX22, 64)
- RELOC_NUMBER (R_SPARC_TLS_LDO_LOX10, 65)
- RELOC_NUMBER (R_SPARC_TLS_LDO_ADD, 66)
- RELOC_NUMBER (R_SPARC_TLS_IE_HI22, 67)
- RELOC_NUMBER (R_SPARC_TLS_IE_LO10, 68)
- RELOC_NUMBER (R_SPARC_TLS_IE_LD, 69)
- RELOC_NUMBER (R_SPARC_TLS_IE_LDX, 70)
- RELOC_NUMBER (R_SPARC_TLS_IE_ADD, 71)
- RELOC_NUMBER (R_SPARC_TLS_LE_HIX22, 72)
- RELOC_NUMBER (R_SPARC_TLS_LE_LOX10, 73)
- RELOC_NUMBER (R_SPARC_TLS_DTPMOD32, 74)
- RELOC_NUMBER (R_SPARC_TLS_DTPMOD64, 75)
- RELOC_NUMBER (R_SPARC_TLS_DTPOFF32, 76)
- RELOC_NUMBER (R_SPARC_TLS_DTPOFF64, 77)
- RELOC_NUMBER (R_SPARC_TLS_TPOFF32, 78)
- RELOC_NUMBER (R_SPARC_TLS_TPOFF64, 79)
-
- RELOC_NUMBER (R_SPARC_GOTDATA_HIX22, 80)
- RELOC_NUMBER (R_SPARC_GOTDATA_LOX10, 81)
- RELOC_NUMBER (R_SPARC_GOTDATA_OP_HIX22, 82)
- RELOC_NUMBER (R_SPARC_GOTDATA_OP_LOX10, 83)
- RELOC_NUMBER (R_SPARC_GOTDATA_OP, 84)
-
- RELOC_NUMBER (R_SPARC_H34, 85)
- RELOC_NUMBER (R_SPARC_SIZE32, 86)
- RELOC_NUMBER (R_SPARC_SIZE64, 87)
-
- EMPTY_RELOC (R_SPARC_max_std)
-
- RELOC_NUMBER (R_SPARC_GNU_VTINHERIT, 250)
- RELOC_NUMBER (R_SPARC_GNU_VTENTRY, 251)
- RELOC_NUMBER (R_SPARC_REV32, 252)
-
-END_RELOC_NUMBERS (R_SPARC_max)
-
-/* Relocation macros. */
-
-#define ELF64_R_TYPE_DATA(info) \
- (((bfd_signed_vma)(ELF64_R_TYPE(info) >> 8) ^ 0x800000) - 0x800000)
-#define ELF64_R_TYPE_ID(info) \
- ((info) & 0xff)
-#define ELF64_R_TYPE_INFO(data, type) \
- (((bfd_vma) ((data) & 0xffffff) << 8) | (bfd_vma) (type))
-
-/* Values for Elf64_Dyn.d_tag. */
-
-#define DT_SPARC_REGISTER 0x70000001
-
-#endif /* _ELF_SPARC_H */
diff --git a/include/elf/spu.h b/include/elf/spu.h
deleted file mode 100644
index ef94980..0000000
--- a/include/elf/spu.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* SPU ELF support for BFD.
-
- Copyright 2006, 2007 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_SPU_H
-#define _ELF_SPU_H
-
-#include "elf/reloc-macros.h"
-
-/* elf32-spu.c depends on these being consecutive. */
-START_RELOC_NUMBERS (elf_spu_reloc_type)
- RELOC_NUMBER (R_SPU_NONE, 0)
- RELOC_NUMBER (R_SPU_ADDR10, 1)
- RELOC_NUMBER (R_SPU_ADDR16, 2)
- RELOC_NUMBER (R_SPU_ADDR16_HI, 3)
- RELOC_NUMBER (R_SPU_ADDR16_LO, 4)
- RELOC_NUMBER (R_SPU_ADDR18, 5)
- RELOC_NUMBER (R_SPU_ADDR32, 6)
- RELOC_NUMBER (R_SPU_REL16, 7)
- RELOC_NUMBER (R_SPU_ADDR7, 8)
- RELOC_NUMBER (R_SPU_REL9, 9)
- RELOC_NUMBER (R_SPU_REL9I, 10)
- RELOC_NUMBER (R_SPU_ADDR10I, 11)
- RELOC_NUMBER (R_SPU_ADDR16I, 12)
- RELOC_NUMBER (R_SPU_REL32, 13)
- RELOC_NUMBER (R_SPU_ADDR16X, 14)
- RELOC_NUMBER (R_SPU_PPU32, 15)
- RELOC_NUMBER (R_SPU_PPU64, 16)
-END_RELOC_NUMBERS (R_SPU_max)
-
-/* Program header extensions */
-
-/* Mark a PT_LOAD segment as containing an overlay which should not
- initially be loaded. */
-#define PF_OVERLAY (1 << 27)
-
-/* SPU Dynamic Object Information. */
-#define PT_SPU_INFO 0x70000000
-
-/* SPU plugin information */
-#define SPU_PLUGIN_NAME "SPUNAME"
-#define SPU_PTNOTE_SPUNAME ".note.spu_name"
-
-#endif /* _ELF_SPU_H */
diff --git a/include/elf/v850.h b/include/elf/v850.h
deleted file mode 100644
index 9f4bc01..0000000
--- a/include/elf/v850.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/* V850 ELF support for BFD.
- Copyright 1997, 1998, 2000, 2002, 2003, 2004, 2007, 2008
- Free Software Foundation, Inc.
- Created by Michael Meissner, Cygnus Support <meissner@cygnus.com>
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* This file holds definitions specific to the MIPS ELF ABI. Note
- that most of this is not actually implemented by BFD. */
-
-#ifndef _ELF_V850_H
-#define _ELF_V850_H
-
-/* Processor specific flags for the ELF header e_flags field. */
-
-/* Four bit V850 architecture field. */
-#define EF_V850_ARCH 0xf0000000
-
-/* v850 code. */
-#define E_V850_ARCH 0x00000000
-
-/* v850e code. */
-#define E_V850E_ARCH 0x10000000
-
-/* v850e1 code. */
-#define E_V850E1_ARCH 0x20000000
-
-
-/* Flags for the st_other field. */
-#define V850_OTHER_SDA 0x10 /* Symbol had SDA relocations. */
-#define V850_OTHER_ZDA 0x20 /* Symbol had ZDA relocations. */
-#define V850_OTHER_TDA 0x40 /* Symbol had TDA relocations. */
-#define V850_OTHER_ERROR 0x80 /* Symbol had an error reported. */
-
-/* V850 relocations. */
-#include "elf/reloc-macros.h"
-
-START_RELOC_NUMBERS (v850_reloc_type)
- RELOC_NUMBER (R_V850_NONE, 0)
- RELOC_NUMBER (R_V850_9_PCREL, 1)
- RELOC_NUMBER (R_V850_22_PCREL, 2)
- RELOC_NUMBER (R_V850_HI16_S, 3)
- RELOC_NUMBER (R_V850_HI16, 4)
- RELOC_NUMBER (R_V850_LO16, 5)
- RELOC_NUMBER (R_V850_ABS32, 6)
- RELOC_NUMBER (R_V850_16, 7)
- RELOC_NUMBER (R_V850_8, 8)
- RELOC_NUMBER( R_V850_SDA_16_16_OFFSET, 9) /* For ld.b, st.b, set1, clr1, not1, tst1, movea, movhi */
- RELOC_NUMBER( R_V850_SDA_15_16_OFFSET, 10) /* For ld.w, ld.h, ld.hu, st.w, st.h */
- RELOC_NUMBER( R_V850_ZDA_16_16_OFFSET, 11) /* For ld.b, st.b, set1, clr1, not1, tst1, movea, movhi */
- RELOC_NUMBER( R_V850_ZDA_15_16_OFFSET, 12) /* For ld.w, ld.h, ld.hu, st.w, st.h */
- RELOC_NUMBER( R_V850_TDA_6_8_OFFSET, 13) /* For sst.w, sld.w */
- RELOC_NUMBER( R_V850_TDA_7_8_OFFSET, 14) /* For sst.h, sld.h */
- RELOC_NUMBER( R_V850_TDA_7_7_OFFSET, 15) /* For sst.b, sld.b */
- RELOC_NUMBER( R_V850_TDA_16_16_OFFSET, 16) /* For set1, clr1, not1, tst1, movea, movhi */
- RELOC_NUMBER( R_V850_TDA_4_5_OFFSET, 17) /* For sld.hu */
- RELOC_NUMBER( R_V850_TDA_4_4_OFFSET, 18) /* For sld.bu */
- RELOC_NUMBER( R_V850_SDA_16_16_SPLIT_OFFSET, 19) /* For ld.bu */
- RELOC_NUMBER( R_V850_ZDA_16_16_SPLIT_OFFSET, 20) /* For ld.bu */
- RELOC_NUMBER( R_V850_CALLT_6_7_OFFSET, 21) /* For callt */
- RELOC_NUMBER( R_V850_CALLT_16_16_OFFSET, 22) /* For callt */
- RELOC_NUMBER (R_V850_GNU_VTINHERIT, 23)
- RELOC_NUMBER (R_V850_GNU_VTENTRY, 24)
- RELOC_NUMBER (R_V850_LONGCALL, 25)
- RELOC_NUMBER (R_V850_LONGJUMP, 26)
- RELOC_NUMBER (R_V850_ALIGN, 27)
- RELOC_NUMBER (R_V850_REL32, 28)
- RELOC_NUMBER (R_V850_LO16_SPLIT_OFFSET, 29) /* For ld.bu */
-END_RELOC_NUMBERS (R_V850_max)
-
-
-/* Processor specific section indices. These sections do not actually
- exist. Symbols with a st_shndx field corresponding to one of these
- values have a special meaning. */
-
-/* Small data area common symbol. */
-#define SHN_V850_SCOMMON SHN_LORESERVE
-
-/* Tiny data area common symbol. */
-#define SHN_V850_TCOMMON (SHN_LORESERVE + 1)
-
-/* Zero data area common symbol. */
-#define SHN_V850_ZCOMMON (SHN_LORESERVE + 2)
-
-
-/* Processor specific section types. */
-
-/* Section contains the .scommon data. */
-#define SHT_V850_SCOMMON 0x70000000
-
-/* Section contains the .scommon data. */
-#define SHT_V850_TCOMMON 0x70000001
-
-/* Section contains the .scommon data. */
-#define SHT_V850_ZCOMMON 0x70000002
-
-/* Processor specific section flags. */
-
-/* This section must be in the small data area (pointed to by GP). */
-#define SHF_V850_GPREL 0x10000000
-
-/* This section must be in the tiny data area (pointed to by EP). */
-#define SHF_V850_EPREL 0x20000000
-
-/* This section must be in the zero data area (pointed to by R0). */
-#define SHF_V850_R0REL 0x40000000
-
-#endif /* _ELF_V850_H */
diff --git a/include/elf/vax.h b/include/elf/vax.h
deleted file mode 100644
index 8cc5a11..0000000
--- a/include/elf/vax.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* VAX ELF support for BFD.
- Copyright (C) 2002 Free Software Foundation, Inc.
- Contributed by Matt Thomas <matt@3am-software.com>.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_VAX_H
-#define _ELF_VAX_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocation types. */
-START_RELOC_NUMBERS (elf_vax_reloc_type)
- RELOC_NUMBER (R_VAX_NONE, 0) /* No reloc */
- RELOC_NUMBER (R_VAX_32, 1) /* Direct 32 bit */
- RELOC_NUMBER (R_VAX_16, 2) /* Direct 16 bit */
- RELOC_NUMBER (R_VAX_8, 3) /* Direct 8 bit */
- RELOC_NUMBER (R_VAX_PC32, 4) /* PC relative 32 bit */
- RELOC_NUMBER (R_VAX_PC16, 5) /* PC relative 16 bit */
- RELOC_NUMBER (R_VAX_PC8, 6) /* PC relative 8 bit */
- RELOC_NUMBER (R_VAX_GOT32, 7) /* 32 bit PC relative GOT entry */
- RELOC_NUMBER (R_VAX_PLT32, 13) /* 32 bit PC relative PLT address */
- RELOC_NUMBER (R_VAX_COPY, 19) /* Copy symbol at runtime */
- RELOC_NUMBER (R_VAX_GLOB_DAT, 20) /* Create GOT entry */
- RELOC_NUMBER (R_VAX_JMP_SLOT, 21) /* Create PLT entry */
- RELOC_NUMBER (R_VAX_RELATIVE, 22) /* Adjust by program base */
- /* These are GNU extensions to enable C++ vtable garbage collection. */
- RELOC_NUMBER (R_VAX_GNU_VTINHERIT, 23)
- RELOC_NUMBER (R_VAX_GNU_VTENTRY, 24)
-END_RELOC_NUMBERS (R_VAX_max)
-
-/* Processor specific flags for the ELF header e_flags field. */
-#define EF_VAX_NONPIC 0x0001 /* Object contains non-PIC code */
-#define EF_VAX_DFLOAT 0x0100 /* Object contains D-Float insn. */
-#define EF_VAX_GFLOAT 0x0200 /* Object contains G-Float insn. */
-
-#endif
diff --git a/include/elf/vxworks.h b/include/elf/vxworks.h
deleted file mode 100644
index 394de30..0000000
--- a/include/elf/vxworks.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* VxWorks ELF support for BFD.
- Copyright 2007
- Free Software Foundation, Inc.
-
- Contributed by Nathan Sidwell <nathan@codesourcery.com>
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
-MA 02110-1301, USA. */
-
-#ifndef _ELF_VXWORKS_H
-#define _ELF_VXWORKS_H
-
-#define DT_VX_WRS_TLS_DATA_START 0x60000010
-#define DT_VX_WRS_TLS_DATA_SIZE 0x60000011
-#define DT_VX_WRS_TLS_DATA_ALIGN 0x60000015
-#define DT_VX_WRS_TLS_VARS_START 0x60000012
-#define DT_VX_WRS_TLS_VARS_SIZE 0x60000013
-
-#endif /* _ELF_VXWORKS_H */
diff --git a/include/elf/x86-64.h b/include/elf/x86-64.h
deleted file mode 100644
index 97b5394..0000000
--- a/include/elf/x86-64.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* x86_64 ELF support for BFD.
- Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006, 2008
- Free Software Foundation, Inc.
- Contributed by Jan Hubicka <jh@suse.cz>
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_X86_64_H
-#define _ELF_X86_64_H
-
-#include "elf/reloc-macros.h"
-
-START_RELOC_NUMBERS (elf_x86_64_reloc_type)
- RELOC_NUMBER (R_X86_64_NONE, 0) /* No reloc */
- RELOC_NUMBER (R_X86_64_64, 1) /* Direct 64 bit */
- RELOC_NUMBER (R_X86_64_PC32, 2) /* PC relative 32 bit signed */
- RELOC_NUMBER (R_X86_64_GOT32, 3) /* 32 bit GOT entry */
- RELOC_NUMBER (R_X86_64_PLT32, 4) /* 32 bit PLT address */
- RELOC_NUMBER (R_X86_64_COPY, 5) /* Copy symbol at runtime */
- RELOC_NUMBER (R_X86_64_GLOB_DAT, 6) /* Create GOT entry */
- RELOC_NUMBER (R_X86_64_JUMP_SLOT,7) /* Create PLT entry */
- RELOC_NUMBER (R_X86_64_RELATIVE, 8) /* Adjust by program base */
- RELOC_NUMBER (R_X86_64_GOTPCREL, 9) /* 32 bit signed pc relative
- offset to GOT entry */
- RELOC_NUMBER (R_X86_64_32, 10) /* Direct 32 bit zero extended */
- RELOC_NUMBER (R_X86_64_32S, 11) /* Direct 32 bit sign extended */
- RELOC_NUMBER (R_X86_64_16, 12) /* Direct 16 bit zero extended */
- RELOC_NUMBER (R_X86_64_PC16, 13) /* 16 bit sign extended pc relative*/
- RELOC_NUMBER (R_X86_64_8, 14) /* Direct 8 bit sign extended */
- RELOC_NUMBER (R_X86_64_PC8, 15) /* 8 bit sign extended pc relative*/
- RELOC_NUMBER (R_X86_64_DTPMOD64, 16) /* ID of module containing symbol */
- RELOC_NUMBER (R_X86_64_DTPOFF64, 17) /* Offset in TLS block */
- RELOC_NUMBER (R_X86_64_TPOFF64, 18) /* Offset in initial TLS block */
- RELOC_NUMBER (R_X86_64_TLSGD, 19) /* PC relative offset to GD GOT block */
- RELOC_NUMBER (R_X86_64_TLSLD, 20) /* PC relative offset to LD GOT block */
- RELOC_NUMBER (R_X86_64_DTPOFF32, 21) /* Offset in TLS block */
- RELOC_NUMBER (R_X86_64_GOTTPOFF, 22) /* PC relative offset to IE GOT entry */
- RELOC_NUMBER (R_X86_64_TPOFF32, 23) /* Offset in initial TLS block */
- RELOC_NUMBER (R_X86_64_PC64, 24) /* PC relative 64 bit */
- RELOC_NUMBER (R_X86_64_GOTOFF64, 25) /* 64 bit offset to GOT */
- RELOC_NUMBER (R_X86_64_GOTPC32, 26) /* 32 bit signed pc relative
- offset to GOT */
- RELOC_NUMBER (R_X86_64_GOT64, 27) /* 64 bit GOT entry offset */
- RELOC_NUMBER (R_X86_64_GOTPCREL64, 28) /* 64 bit signed pc relative
- offset to GOT entry */
- RELOC_NUMBER (R_X86_64_GOTPC64, 29) /* 64 bit signed pc relative
- offset to GOT */
- RELOC_NUMBER (R_X86_64_GOTPLT64, 30) /* like GOT64, but indicates
- that PLT entry is needed */
- RELOC_NUMBER (R_X86_64_PLTOFF64, 31) /* 64 bit GOT relative offset
- to PLT entry */
- /* 32 .. 33 */
- RELOC_NUMBER (R_X86_64_GOTPC32_TLSDESC, 34)
- /* 32 bit signed pc relative
- offset to TLS descriptor
- in the GOT. */
- RELOC_NUMBER (R_X86_64_TLSDESC_CALL, 35) /* Relaxable call through TLS
- descriptor. */
- RELOC_NUMBER (R_X86_64_TLSDESC, 36) /* 2x64-bit TLS descriptor. */
- RELOC_NUMBER (R_X86_64_GNU_VTINHERIT, 250) /* GNU C++ hack */
- RELOC_NUMBER (R_X86_64_GNU_VTENTRY, 251) /* GNU C++ hack */
-END_RELOC_NUMBERS (R_X86_64_max)
-
-/* Processor specific section types. */
-
-#define SHT_X86_64_UNWIND 0x70000001 /* unwind information */
-
-/* Like SHN_COMMON but the symbol will be allocated in the .lbss
- section. */
-#define SHN_X86_64_LCOMMON (SHN_LORESERVE + 2)
-
-#define SHF_X86_64_LARGE 0x10000000
-#endif
diff --git a/include/elf/xc16x.h b/include/elf/xc16x.h
deleted file mode 100644
index bc64899..0000000
--- a/include/elf/xc16x.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Infineon XC16X ELF support for BFD.
- Copyright 2006 Free Software Foundation, Inc.
- Contributed by KPIT Cummins Infosystems
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-
-#ifndef _ELF_XC16X_H
-#define _ELF_XC16X_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocations. */
-START_RELOC_NUMBERS (elf_xc16x_reloc_type)
- RELOC_NUMBER (R_XC16X_NONE, 0)
- RELOC_NUMBER (R_XC16X_ABS_8, 1)
- RELOC_NUMBER (R_XC16X_ABS_16, 2)
- RELOC_NUMBER (R_XC16X_ABS_32, 3)
- RELOC_NUMBER (R_XC16X_8_PCREL, 4)
- RELOC_NUMBER (R_XC16X_PAG, 5)
- RELOC_NUMBER (R_XC16X_POF, 6)
- RELOC_NUMBER (R_XC16X_SEG, 7)
- RELOC_NUMBER (R_XC16X_SOF, 8)
-
-END_RELOC_NUMBERS (R_XC16X_max)
-
-#endif /* _ELF_XC16X_H */
diff --git a/include/elf/xstormy16.h b/include/elf/xstormy16.h
deleted file mode 100644
index 2442b27..0000000
--- a/include/elf/xstormy16.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* XSTORMY16 ELF support for BFD.
- Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software Foundation, Inc.,
-51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _ELF_XSTORMY16_H
-#define _ELF_XSTORMY16_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocations. */
-START_RELOC_NUMBERS (elf_xstormy16_reloc_type)
- RELOC_NUMBER (R_XSTORMY16_NONE, 0)
-
- RELOC_NUMBER (R_XSTORMY16_32, 1)
- RELOC_NUMBER (R_XSTORMY16_16, 2)
- RELOC_NUMBER (R_XSTORMY16_8, 3)
- RELOC_NUMBER (R_XSTORMY16_PC32, 4)
- RELOC_NUMBER (R_XSTORMY16_PC16, 5)
- RELOC_NUMBER (R_XSTORMY16_PC8, 6)
-
- RELOC_NUMBER (R_XSTORMY16_REL_12, 7)
- RELOC_NUMBER (R_XSTORMY16_24, 8)
- RELOC_NUMBER (R_XSTORMY16_FPTR16, 9)
-
- RELOC_NUMBER (R_XSTORMY16_LO16, 10)
- RELOC_NUMBER (R_XSTORMY16_HI16, 11)
- RELOC_NUMBER (R_XSTORMY16_12, 12)
-
- RELOC_NUMBER (R_XSTORMY16_GNU_VTINHERIT, 128)
- RELOC_NUMBER (R_XSTORMY16_GNU_VTENTRY, 129)
-END_RELOC_NUMBERS (R_XSTORMY16_max)
-
-/* Define the data & instruction memory discriminator. In a linked
- executable, an symbol should be deemed to point to an instruction
- if ((address & XSTORMY16_INSN_MASK) == XSTORMY16_INSN_VALUE), and similarly
- for the data space. See also `ld/emulparams/elf32xstormy16.sh'. */
-#define XSTORMY16_DATA_MASK 0xffc00000
-#define XSTORMY16_DATA_VALUE 0x00000000
-#define XSTORMY16_INSN_MASK 0xffc00000
-#define XSTORMY16_INSN_VALUE 0x00400000
-
-#endif /* _ELF_XSTORMY16_H */
diff --git a/include/elf/xtensa.h b/include/elf/xtensa.h
deleted file mode 100644
index 400bc17..0000000
--- a/include/elf/xtensa.h
+++ /dev/null
@@ -1,208 +0,0 @@
-/* Xtensa ELF support for BFD.
- Copyright 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
- Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
- USA. */
-
-/* This file holds definitions specific to the Xtensa ELF ABI. */
-
-#ifndef _ELF_XTENSA_H
-#define _ELF_XTENSA_H
-
-#include "elf/reloc-macros.h"
-
-/* Relocations. */
-START_RELOC_NUMBERS (elf_xtensa_reloc_type)
- RELOC_NUMBER (R_XTENSA_NONE, 0)
- RELOC_NUMBER (R_XTENSA_32, 1)
- RELOC_NUMBER (R_XTENSA_RTLD, 2)
- RELOC_NUMBER (R_XTENSA_GLOB_DAT, 3)
- RELOC_NUMBER (R_XTENSA_JMP_SLOT, 4)
- RELOC_NUMBER (R_XTENSA_RELATIVE, 5)
- RELOC_NUMBER (R_XTENSA_PLT, 6)
- RELOC_NUMBER (R_XTENSA_OP0, 8)
- RELOC_NUMBER (R_XTENSA_OP1, 9)
- RELOC_NUMBER (R_XTENSA_OP2, 10)
- RELOC_NUMBER (R_XTENSA_ASM_EXPAND, 11)
- RELOC_NUMBER (R_XTENSA_ASM_SIMPLIFY, 12)
- RELOC_NUMBER (R_XTENSA_32_PCREL, 14)
- RELOC_NUMBER (R_XTENSA_GNU_VTINHERIT, 15)
- RELOC_NUMBER (R_XTENSA_GNU_VTENTRY, 16)
- RELOC_NUMBER (R_XTENSA_DIFF8, 17)
- RELOC_NUMBER (R_XTENSA_DIFF16, 18)
- RELOC_NUMBER (R_XTENSA_DIFF32, 19)
- RELOC_NUMBER (R_XTENSA_SLOT0_OP, 20)
- RELOC_NUMBER (R_XTENSA_SLOT1_OP, 21)
- RELOC_NUMBER (R_XTENSA_SLOT2_OP, 22)
- RELOC_NUMBER (R_XTENSA_SLOT3_OP, 23)
- RELOC_NUMBER (R_XTENSA_SLOT4_OP, 24)
- RELOC_NUMBER (R_XTENSA_SLOT5_OP, 25)
- RELOC_NUMBER (R_XTENSA_SLOT6_OP, 26)
- RELOC_NUMBER (R_XTENSA_SLOT7_OP, 27)
- RELOC_NUMBER (R_XTENSA_SLOT8_OP, 28)
- RELOC_NUMBER (R_XTENSA_SLOT9_OP, 29)
- RELOC_NUMBER (R_XTENSA_SLOT10_OP, 30)
- RELOC_NUMBER (R_XTENSA_SLOT11_OP, 31)
- RELOC_NUMBER (R_XTENSA_SLOT12_OP, 32)
- RELOC_NUMBER (R_XTENSA_SLOT13_OP, 33)
- RELOC_NUMBER (R_XTENSA_SLOT14_OP, 34)
- RELOC_NUMBER (R_XTENSA_SLOT0_ALT, 35)
- RELOC_NUMBER (R_XTENSA_SLOT1_ALT, 36)
- RELOC_NUMBER (R_XTENSA_SLOT2_ALT, 37)
- RELOC_NUMBER (R_XTENSA_SLOT3_ALT, 38)
- RELOC_NUMBER (R_XTENSA_SLOT4_ALT, 39)
- RELOC_NUMBER (R_XTENSA_SLOT5_ALT, 40)
- RELOC_NUMBER (R_XTENSA_SLOT6_ALT, 41)
- RELOC_NUMBER (R_XTENSA_SLOT7_ALT, 42)
- RELOC_NUMBER (R_XTENSA_SLOT8_ALT, 43)
- RELOC_NUMBER (R_XTENSA_SLOT9_ALT, 44)
- RELOC_NUMBER (R_XTENSA_SLOT10_ALT, 45)
- RELOC_NUMBER (R_XTENSA_SLOT11_ALT, 46)
- RELOC_NUMBER (R_XTENSA_SLOT12_ALT, 47)
- RELOC_NUMBER (R_XTENSA_SLOT13_ALT, 48)
- RELOC_NUMBER (R_XTENSA_SLOT14_ALT, 49)
- RELOC_NUMBER (R_XTENSA_TLSDESC_FN, 50)
- RELOC_NUMBER (R_XTENSA_TLSDESC_ARG, 51)
- RELOC_NUMBER (R_XTENSA_TLS_DTPOFF, 52)
- RELOC_NUMBER (R_XTENSA_TLS_TPOFF, 53)
- RELOC_NUMBER (R_XTENSA_TLS_FUNC, 54)
- RELOC_NUMBER (R_XTENSA_TLS_ARG, 55)
- RELOC_NUMBER (R_XTENSA_TLS_CALL, 56)
-END_RELOC_NUMBERS (R_XTENSA_max)
-
-/* Processor-specific flags for the ELF header e_flags field. */
-
-/* Four-bit Xtensa machine type field. */
-#define EF_XTENSA_MACH 0x0000000f
-
-/* Various CPU types. */
-#define E_XTENSA_MACH 0x00000000
-
-/* Leave bits 0xf0 alone in case we ever have more than 16 cpu types.
- Highly unlikely, but what the heck. */
-
-#define EF_XTENSA_XT_INSN 0x00000100
-#define EF_XTENSA_XT_LIT 0x00000200
-
-
-/* Processor-specific dynamic array tags. */
-
-/* Offset of the table that records the GOT location(s). */
-#define DT_XTENSA_GOT_LOC_OFF 0x70000000
-
-/* Number of entries in the GOT location table. */
-#define DT_XTENSA_GOT_LOC_SZ 0x70000001
-
-
-/* Definitions for instruction and literal property tables. The
- tables for ".gnu.linkonce.*" sections are placed in the following
- sections:
-
- instruction tables: .gnu.linkonce.x.*
- literal tables: .gnu.linkonce.p.*
-*/
-
-#define XTENSA_INSN_SEC_NAME ".xt.insn"
-#define XTENSA_LIT_SEC_NAME ".xt.lit"
-#define XTENSA_PROP_SEC_NAME ".xt.prop"
-
-typedef struct property_table_entry_t
-{
- bfd_vma address;
- bfd_vma size;
- flagword flags;
-} property_table_entry;
-
-/* Flags in the property tables to specify whether blocks of memory are
- literals, instructions, data, or unreachable. For instructions,
- blocks that begin loop targets and branch targets are designated.
- Blocks that do not allow density instructions, instruction reordering
- or transformation are also specified. Finally, for branch targets,
- branch target alignment priority is included. Alignment of the next
- block is specified in the current block and the size of the current
- block does not include any fill required to align to the next
- block. */
-
-#define XTENSA_PROP_LITERAL 0x00000001
-#define XTENSA_PROP_INSN 0x00000002
-#define XTENSA_PROP_DATA 0x00000004
-#define XTENSA_PROP_UNREACHABLE 0x00000008
-/* Instruction-only properties at beginning of code. */
-#define XTENSA_PROP_INSN_LOOP_TARGET 0x00000010
-#define XTENSA_PROP_INSN_BRANCH_TARGET 0x00000020
-/* Instruction-only properties about code. */
-#define XTENSA_PROP_INSN_NO_DENSITY 0x00000040
-#define XTENSA_PROP_INSN_NO_REORDER 0x00000080
-/* Historically, NO_TRANSFORM was a property of instructions,
- but it should apply to literals under certain circumstances. */
-#define XTENSA_PROP_NO_TRANSFORM 0x00000100
-
-/* Branch target alignment information. This transmits information
- to the linker optimization about the priority of aligning a
- particular block for branch target alignment: None, low priority,
- high priority, or required. These only need to be checked in
- instruction blocks marked as XTENSA_PROP_INSN_BRANCH_TARGET.
- Common usage is:
-
- switch (GET_XTENSA_PROP_BT_ALIGN(flags))
- case XTENSA_PROP_BT_ALIGN_NONE:
- case XTENSA_PROP_BT_ALIGN_LOW:
- case XTENSA_PROP_BT_ALIGN_HIGH:
- case XTENSA_PROP_BT_ALIGN_REQUIRE:
-*/
-#define XTENSA_PROP_BT_ALIGN_MASK 0x00000600
-
-/* No branch target alignment. */
-#define XTENSA_PROP_BT_ALIGN_NONE 0x0
-/* Low priority branch target alignment. */
-#define XTENSA_PROP_BT_ALIGN_LOW 0x1
-/* High priority branch target alignment. */
-#define XTENSA_PROP_BT_ALIGN_HIGH 0x2
-/* Required branch target alignment. */
-#define XTENSA_PROP_BT_ALIGN_REQUIRE 0x3
-
-#define GET_XTENSA_PROP_BT_ALIGN(flag) \
- (((unsigned)((flag) & (XTENSA_PROP_BT_ALIGN_MASK))) >> 9)
-#define SET_XTENSA_PROP_BT_ALIGN(flag, align) \
- (((flag) & (~XTENSA_PROP_BT_ALIGN_MASK)) | \
- (((align) << 9) & XTENSA_PROP_BT_ALIGN_MASK))
-
-/* Alignment is specified in the block BEFORE the one that needs
- alignment. Up to 5 bits. Use GET_XTENSA_PROP_ALIGNMENT(flags) to
- get the required alignment specified as a power of 2. Use
- SET_XTENSA_PROP_ALIGNMENT(flags, pow2) to set the required
- alignment. Be careful of side effects since the SET will evaluate
- flags twice. Also, note that the SIZE of a block in the property
- table does not include the alignment size, so the alignment fill
- must be calculated to determine if two blocks are contiguous.
- TEXT_ALIGN is not currently implemented but is a placeholder for a
- possible future implementation. */
-
-#define XTENSA_PROP_ALIGN 0x00000800
-
-#define XTENSA_PROP_ALIGNMENT_MASK 0x0001f000
-
-#define GET_XTENSA_PROP_ALIGNMENT(flag) \
- (((unsigned)((flag) & (XTENSA_PROP_ALIGNMENT_MASK))) >> 12)
-#define SET_XTENSA_PROP_ALIGNMENT(flag, align) \
- (((flag) & (~XTENSA_PROP_ALIGNMENT_MASK)) | \
- (((align) << 12) & XTENSA_PROP_ALIGNMENT_MASK))
-
-#define XTENSA_PROP_INSN_ABSLIT 0x00020000
-
-#endif /* _ELF_XTENSA_H */
diff --git a/include/fibheap.h b/include/fibheap.h
deleted file mode 100644
index 348c4ae..0000000
--- a/include/fibheap.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* A Fibonacci heap datatype.
- Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
- Contributed by Daniel Berlin (dan@cgsoftware.com).
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING. If not, write to
-the Free Software Foundation, 51 Franklin Street - Fifth Floor,
-Boston, MA 02110-1301, USA. */
-
-/* Fibonacci heaps are somewhat complex, but, there's an article in
- DDJ that explains them pretty well:
-
- http://www.ddj.com/articles/1997/9701/9701o/9701o.htm?topic=algoritms
-
- Introduction to algorithms by Corman and Rivest also goes over them.
-
- The original paper that introduced them is "Fibonacci heaps and their
- uses in improved network optimization algorithms" by Tarjan and
- Fredman (JACM 34(3), July 1987).
-
- Amortized and real worst case time for operations:
-
- ExtractMin: O(lg n) amortized. O(n) worst case.
- DecreaseKey: O(1) amortized. O(lg n) worst case.
- Insert: O(2) amortized. O(1) actual.
- Union: O(1) amortized. O(1) actual. */
-
-#ifndef _FIBHEAP_H_
-#define _FIBHEAP_H_
-
-#include "ansidecl.h"
-
-typedef long fibheapkey_t;
-
-typedef struct fibheap
-{
- size_t nodes;
- struct fibnode *min;
- struct fibnode *root;
-} *fibheap_t;
-
-typedef struct fibnode
-{
- struct fibnode *parent;
- struct fibnode *child;
- struct fibnode *left;
- struct fibnode *right;
- fibheapkey_t key;
- void *data;
-#if defined (__GNUC__) && (!defined (SIZEOF_INT) || SIZEOF_INT < 4)
- __extension__ unsigned long int degree : 31;
- __extension__ unsigned long int mark : 1;
-#else
- unsigned int degree : 31;
- unsigned int mark : 1;
-#endif
-} *fibnode_t;
-
-extern fibheap_t fibheap_new (void);
-extern fibnode_t fibheap_insert (fibheap_t, fibheapkey_t, void *);
-extern int fibheap_empty (fibheap_t);
-extern fibheapkey_t fibheap_min_key (fibheap_t);
-extern fibheapkey_t fibheap_replace_key (fibheap_t, fibnode_t,
- fibheapkey_t);
-extern void *fibheap_replace_key_data (fibheap_t, fibnode_t,
- fibheapkey_t, void *);
-extern void *fibheap_extract_min (fibheap_t);
-extern void *fibheap_min (fibheap_t);
-extern void *fibheap_replace_data (fibheap_t, fibnode_t, void *);
-extern void *fibheap_delete_node (fibheap_t, fibnode_t);
-extern void fibheap_delete (fibheap_t);
-extern fibheap_t fibheap_union (fibheap_t, fibheap_t);
-
-#endif /* _FIBHEAP_H_ */
diff --git a/include/filenames.h b/include/filenames.h
deleted file mode 100644
index 0d411cc..0000000
--- a/include/filenames.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Macros for taking apart, interpreting and processing file names.
-
- These are here because some non-Posix (a.k.a. DOSish) systems have
- drive letter brain-damage at the beginning of an absolute file name,
- use forward- and back-slash in path names interchangeably, and
- some of them have case-insensitive file names.
-
- Copyright 2000, 2001, 2007 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef FILENAMES_H
-#define FILENAMES_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__)
-
-#ifndef HAVE_DOS_BASED_FILE_SYSTEM
-#define HAVE_DOS_BASED_FILE_SYSTEM 1
-#endif
-
-#define IS_DIR_SEPARATOR(c) ((c) == '/' || (c) == '\\')
-/* Note that IS_ABSOLUTE_PATH accepts d:foo as well, although it is
- only semi-absolute. This is because the users of IS_ABSOLUTE_PATH
- want to know whether to prepend the current working directory to
- a file name, which should not be done with a name like d:foo. */
-#define IS_ABSOLUTE_PATH(f) (IS_DIR_SEPARATOR((f)[0]) || (((f)[0]) && ((f)[1] == ':')))
-
-#else /* not DOSish */
-
-#define IS_DIR_SEPARATOR(c) ((c) == '/')
-#define IS_ABSOLUTE_PATH(f) (IS_DIR_SEPARATOR((f)[0]))
-
-#endif /* not DOSish */
-
-extern int filename_cmp (const char *s1, const char *s2);
-#define FILENAME_CMP(s1, s2) filename_cmp(s1, s2)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* FILENAMES_H */
diff --git a/include/floatformat.h b/include/floatformat.h
deleted file mode 100644
index c5f60a3..0000000
--- a/include/floatformat.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/* IEEE floating point support declarations, for GDB, the GNU Debugger.
- Copyright 1991, 1994, 1995, 1997, 2000, 2003, 2005
- Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#if !defined (FLOATFORMAT_H)
-#define FLOATFORMAT_H 1
-
-#include "ansidecl.h"
-
-/* A floatformat consists of a sign bit, an exponent and a mantissa. Once the
- bytes are concatenated according to the byteorder flag, then each of those
- fields is contiguous. We number the bits with 0 being the most significant
- (i.e. BITS_BIG_ENDIAN type numbering), and specify which bits each field
- contains with the *_start and *_len fields. */
-
-/* What is the order of the bytes? */
-
-enum floatformat_byteorders {
- /* Standard little endian byte order.
- EX: 1.2345678e10 => 00 00 80 c5 e0 fe 06 42 */
- floatformat_little,
-
- /* Standard big endian byte order.
- EX: 1.2345678e10 => 42 06 fe e0 c5 80 00 00 */
- floatformat_big,
-
- /* Little endian byte order but big endian word order.
- EX: 1.2345678e10 => e0 fe 06 42 00 00 80 c5 */
- floatformat_littlebyte_bigword,
-
- /* VAX byte order. Little endian byte order with 16-bit words. The
- following example is an illustration of the byte order only; VAX
- doesn't have a fully IEEE compliant floating-point format.
- EX: 1.2345678e10 => 80 c5 00 00 06 42 e0 fe */
- floatformat_vax
-};
-
-enum floatformat_intbit { floatformat_intbit_yes, floatformat_intbit_no };
-
-struct floatformat
-{
- enum floatformat_byteorders byteorder;
- unsigned int totalsize; /* Total size of number in bits */
-
- /* Sign bit is always one bit long. 1 means negative, 0 means positive. */
- unsigned int sign_start;
-
- unsigned int exp_start;
- unsigned int exp_len;
- /* Bias added to a "true" exponent to form the biased exponent. It
- is intentionally signed as, otherwize, -exp_bias can turn into a
- very large number (e.g., given the exp_bias of 0x3fff and a 64
- bit long, the equation (long)(1 - exp_bias) evaluates to
- 4294950914) instead of -16382). */
- int exp_bias;
- /* Exponent value which indicates NaN. This is the actual value stored in
- the float, not adjusted by the exp_bias. This usually consists of all
- one bits. */
- unsigned int exp_nan;
-
- unsigned int man_start;
- unsigned int man_len;
-
- /* Is the integer bit explicit or implicit? */
- enum floatformat_intbit intbit;
-
- /* Internal name for debugging. */
- const char *name;
-
- /* Validator method. */
- int (*is_valid) (const struct floatformat *fmt, const void *from);
-
- /* Is the format actually the sum of two smaller floating point
- formats (IBM long double, as described in
- gcc/config/rs6000/darwin-ldouble-format)? If so, this is the
- smaller format in question, and the fields sign_start through
- intbit describe the first half. If not, this is NULL. */
- const struct floatformat *split_half;
-};
-
-/* floatformats for IEEE single and double, big and little endian. */
-
-extern const struct floatformat floatformat_ieee_single_big;
-extern const struct floatformat floatformat_ieee_single_little;
-extern const struct floatformat floatformat_ieee_double_big;
-extern const struct floatformat floatformat_ieee_double_little;
-
-/* floatformat for ARM IEEE double, little endian bytes and big endian words */
-
-extern const struct floatformat floatformat_ieee_double_littlebyte_bigword;
-
-/* floatformats for VAX. */
-
-extern const struct floatformat floatformat_vax_f;
-extern const struct floatformat floatformat_vax_d;
-extern const struct floatformat floatformat_vax_g;
-
-/* floatformats for various extendeds. */
-
-extern const struct floatformat floatformat_i387_ext;
-extern const struct floatformat floatformat_m68881_ext;
-extern const struct floatformat floatformat_i960_ext;
-extern const struct floatformat floatformat_m88110_ext;
-extern const struct floatformat floatformat_m88110_harris_ext;
-extern const struct floatformat floatformat_arm_ext_big;
-extern const struct floatformat floatformat_arm_ext_littlebyte_bigword;
-/* IA-64 Floating Point register spilt into memory. */
-extern const struct floatformat floatformat_ia64_spill_big;
-extern const struct floatformat floatformat_ia64_spill_little;
-extern const struct floatformat floatformat_ia64_quad_big;
-extern const struct floatformat floatformat_ia64_quad_little;
-/* IBM long double (double+double). */
-extern const struct floatformat floatformat_ibm_long_double;
-
-/* Convert from FMT to a double.
- FROM is the address of the extended float.
- Store the double in *TO. */
-
-extern void
-floatformat_to_double (const struct floatformat *, const void *, double *);
-
-/* The converse: convert the double *FROM to FMT
- and store where TO points. */
-
-extern void
-floatformat_from_double (const struct floatformat *, const double *, void *);
-
-/* Return non-zero iff the data at FROM is a valid number in format FMT. */
-
-extern int
-floatformat_is_valid (const struct floatformat *fmt, const void *from);
-
-#endif /* defined (FLOATFORMAT_H) */
diff --git a/include/fnmatch.h b/include/fnmatch.h
deleted file mode 100644
index 5b9953c..0000000
--- a/include/fnmatch.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Copyright 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
-
-NOTE: The canonical source of this file is maintained with the GNU C Library.
-Bugs can be reported to bug-glibc@prep.ai.mit.edu.
-
-This program is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 2, or (at your option) any
-later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, 51 Franklin Street - Fifth Floor,
-Boston, MA 02110-1301, USA. */
-
-#ifndef _FNMATCH_H
-
-#define _FNMATCH_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if defined (__cplusplus) || (defined (__STDC__) && __STDC__)
-#undef __P
-#define __P(args) args
-#else /* Not C++ or ANSI C. */
-#undef __P
-#define __P(args) ()
-/* We can get away without defining `const' here only because in this file
- it is used only inside the prototype for `fnmatch', which is elided in
- non-ANSI C where `const' is problematical. */
-#endif /* C++ or ANSI C. */
-
-
-/* We #undef these before defining them because some losing systems
- (HP-UX A.08.07 for example) define these in <unistd.h>. */
-#undef FNM_PATHNAME
-#undef FNM_NOESCAPE
-#undef FNM_PERIOD
-
-/* Bits set in the FLAGS argument to `fnmatch'. */
-#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
-#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
-#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
-
-#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE)
-#define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
-#define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
-#define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
-#endif
-
-/* Value returned by `fnmatch' if STRING does not match PATTERN. */
-#define FNM_NOMATCH 1
-
-/* Match STRING against the filename pattern PATTERN,
- returning zero if it matches, FNM_NOMATCH if not. */
-extern int fnmatch __P ((const char *__pattern, const char *__string,
- int __flags));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* fnmatch.h */
diff --git a/include/fopen-bin.h b/include/fopen-bin.h
deleted file mode 100644
index b868f63..0000000
--- a/include/fopen-bin.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Macros for the 'type' part of an fopen, freopen or fdopen.
-
- <Read|Write>[Update]<Binary file|text file>
-
- This version is for "binary" systems, where text and binary files are
- different. An example is Mess-Dose. Many Unix systems could also
- cope with a "b" in the string, indicating binary files, but some reject this
- (and thereby don't conform to ANSI C, but what else is new?).
-
- This file is designed for inclusion by host-dependent .h files. No
- user application should include it directly, since that would make
- the application unable to be configured for both "same" and "binary"
- variant systems. */
-
-#define FOPEN_RB "rb"
-#define FOPEN_WB "wb"
-#define FOPEN_AB "ab"
-#define FOPEN_RUB "r+b"
-#define FOPEN_WUB "w+b"
-#define FOPEN_AUB "a+b"
-
-#define FOPEN_RT "r"
-#define FOPEN_WT "w"
-#define FOPEN_AT "a"
-#define FOPEN_RUT "r+"
-#define FOPEN_WUT "w+"
-#define FOPEN_AUT "a+"
diff --git a/include/fopen-same.h b/include/fopen-same.h
deleted file mode 100644
index 0f37529..0000000
--- a/include/fopen-same.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Macros for the 'type' part of an fopen, freopen or fdopen.
-
- <Read|Write>[Update]<Binary file|text file>
-
- This version is for "same" systems, where text and binary files are
- the same. An example is Unix. Many Unix systems could also add a
- "b" to the string, indicating binary files, but some reject this
- (and thereby don't conform to ANSI C, but what else is new?).
-
- This file is designed for inclusion by host-dependent .h files. No
- user application should include it directly, since that would make
- the application unable to be configured for both "same" and "binary"
- variant systems. */
-
-#define FOPEN_RB "r"
-#define FOPEN_WB "w"
-#define FOPEN_AB "a"
-#define FOPEN_RUB "r+"
-#define FOPEN_WUB "w+"
-#define FOPEN_AUB "a+"
-
-#define FOPEN_RT "r"
-#define FOPEN_WT "w"
-#define FOPEN_AT "a"
-#define FOPEN_RUT "r+"
-#define FOPEN_WUT "w+"
-#define FOPEN_AUT "a+"
diff --git a/include/fopen-vms.h b/include/fopen-vms.h
deleted file mode 100644
index dde22ba..0000000
--- a/include/fopen-vms.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Macros for the 'type' part of an fopen, freopen or fdopen.
-
- <Read|Write>[Update]<Binary file|text file>
-
- This version is for VMS systems, where text and binary files are
- different.
- This file is designed for inclusion by host-dependent .h files. No
- user application should include it directly, since that would make
- the application unable to be configured for both "same" and "binary"
- variant systems. */
-
-#define FOPEN_RB "rb,rfm=var"
-#define FOPEN_WB "wb,rfm=var"
-#define FOPEN_AB "ab,rfm=var"
-#define FOPEN_RUB "r+b,rfm=var"
-#define FOPEN_WUB "w+b,rfm=var"
-#define FOPEN_AUB "a+b,rfm=var"
-
-#define FOPEN_RT "r"
-#define FOPEN_WT "w"
-#define FOPEN_AT "a"
-#define FOPEN_RUT "r+"
-#define FOPEN_WUT "w+"
-#define FOPEN_AUT "a+"
diff --git a/include/gdb/ChangeLog b/include/gdb/ChangeLog
deleted file mode 100644
index 368f719..0000000
--- a/include/gdb/ChangeLog
+++ /dev/null
@@ -1,179 +0,0 @@
-2008-02-12 M Ranga Swami Reddy <MR.Swami.Reddy@nsc.com>
-
- * sim-cr16.h: New file.
-
-2008-01-01 Daniel Jacobowitz <dan@codesourcery.com>
-
- Updated copyright notices for most files.
-
-2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
-
- * sim-ppc.h (sim_spr_register_name): New prototype.
-
-2007-10-11 Jesper Nilsson <jesper.nilsson@axis.com>
-
- * callback.h (cb_is_stdin, cb_is_stdout, cb_is_stderr): Add prototypes.
-
-2007-08-23 Joel Brobecker <brobecker@adacore.com>
-
- Switch the license of all .h files to GPLv3.
-
-2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
-
- Updated copyright notices for most files.
-
-2005-07-08 Ben Elliston <bje@au.ibm.com>
-
- * callback.h: Remove ANSI_PROTOTYPES conditional code.
-
-2005-01-28 Hans-Peter Nilsson <hp@axis.com>
-
- * callback.h (struct host_callback_struct): New members pipe,
- pipe_empty, pipe_nonempty, ispipe, pipe_buffer and
- target_sizeof_int.
- (CB_SYS_pipe): New macro.
-
- * callback.h: Include "bfd.h".
- (struct host_callback_struct): New member target_endian.
- (cb_store_target_endian): Declare.
-
-2004-12-15 Hans-Peter Nilsson <hp@axis.com>
-
- * callback.h (CB_SYS_truncate, CB_SYS_ftruncate): New macros.
-
-2004-12-13 Hans-Peter Nilsson <hp@axis.com>
-
- * callback.h (struct host_callback_struct): New member lstat.
- (CB_SYS_lstat): New macro.
- (CB_SYS_rename): New macro.
-
-2004-09-08 Michael Snyder <msnyder@redhat.com>
-
- Commited by Corinna Vinschen <vinschen@redhat.com>
- * sim-sh.h: Add new sh2a banked registers.
-
-2004-08-04 Andrew Cagney <cagney@gnu.org>
-
- * sim-ppc.h: Add extern "C" wrapper.
- (enum sim_ppc_regnum): Add full list of SPRs.
-
-2004-08-04 Jim Blandy <jimb@redhat.com>
-
- * sim-ppc.h: New file.
-
-2004-06-25 J"orn Rennecke <joern.rennecke@superh.com>
-
- * callback.h (host_callback_struct): Replace members fdopen and
- alwaysopen with fd_buddy.
- [sim/common: * callback.c: Changed all users. ]
-
-2003-10-31 Kevin Buettner <kevin@redhat.com>
-
- * sim-frv.h: New file.
-
-2003-10-15 J"orn Rennecke <joern.rennecke@superh.com>
-
- * callback.h (struct host_callback_struct): New members ftruncate
- and truncate.
-
-2003-06-10 Corinna Vinschen <vinschen@redhat.com>
-
- * gdb/fileio.h: New file.
-
-2003-05-07 Andrew Cagney <cagney@redhat.com>
-
- * sim-d10v.h (sim_d10v_translate_addr): Add regcache parameter.
- (sim_d10v_translate_imap_addr): Add regcache parameter.
- (sim_d10v_translate_dmap_addr): Ditto.
-
-2003-03-27 Nick Clifton <nickc@redhat.com>
-
- * sim-arm.h (sim_arm_regs): Add iWMMXt registers.
-
-2003-03-20 Nick Clifton <nickc@redhat.com>
-
- * sim-arm.h (sim_arm_regs): Add Maverick co-processor
- registers.
-
-2003-02-27 Andrew Cagney <cagney@redhat.com>
-
- * remote-sim.h (sim_open, sim_load, sim_create_inferior): Rename
- _bfd to bfd.
-
-2003-02-20 Andrew Cagney <ac131313@redhat.com>
-
- * remote-sim.h (SIM_RC): Delete unused SIM_RC_UNKNOWN_BREAKPOINT,
- SIM_RC_INSUFFICIENT_RESOURCES and SIM_RC_DUPLICATE_BREAKPOINT.
- (sim_set_breakpoint, sim_clear_breakpoint): Delete declarations.
- (sim_clear_all_breakpoints, sim_enable_breakpoint): Ditto.
- (sim_enable_all_breakpoints, sim_disable_breakpoint): Ditto.
- (sim_disable_all_breakpoints): Ditto.
-
-2002-12-26 Kazu Hirata <kazu@cs.umass.edu>
-
- * sim-h8300.h: Remove ^M.
-
-2002-07-29 Andrey Volkov <avolkov@transas.com>
-
- * sim-h8300.h: Rename all enums from H8300_ to SIM_H8300_
- prefix.
-
-2002-07-23 Andrey Volkov <avolkov@transas.com>
-
- * sim-h8300.h: New file.
-
-2002-07-17 Andrew Cagney <cagney@redhat.com>
-
- * remote-sim.h: Update copyright.
- (sim_set_callbacks, sim_size, sim_trace)
- (sim_set_trace, sim_set_profile_size, sim_kill): Delete. Moved to
- "sim/common/run-sim.h".
-
-Wed Jul 17 19:36:38 2002 J"orn Rennecke <joern.rennecke@superh.com>
-
- * sim-sh.h: Add enum constants for sh[1-4], sh3e, sh3?-dsp,
- renumbering the sh-dsp registers to use distinct numbers.
-
-2002-06-15 Andrew Cagney <ac131313@redhat.com>
-
- * sim-arm.h (enum sim_arm_regs): Rename sim_arm_regnum.
-
-2002-06-12 Andrew Cagney <ac131313@redhat.com>
-
- * sim-arm.h: New file.
-
-2002-06-08 Andrew Cagney <cagney@redhat.com>
-
- * callback.h: Copy to here from directory above.
- * remote-sim.h: Copy to here from directory above.
-
-2002-06-01 Andrew Cagney <ac131313@redhat.com>
-
- * sim-d10v.h (sim_d10v_regs): Expand to include all registers.
- Update copyright.
-
-2002-05-23 Andrew Cagney <ac131313@redhat.com>
-
- * sim-d10v.h: New file. Moved from include/sim-d10v.h.
-
-2002-05-10 Elena Zannoni <ezannoni@redhat.com>
-
- * sim-sh.h: New file, for sh gdb<->sim interface.
-
-2002-05-09 Daniel Jacobowitz <drow@mvista.com>
-
- * signals.h: Update comments.
- (enum target_signal): Remove conditional compilation around
- Mach-specific signals. Move them to after TARGET_SIGNAL_DEFAULT.
-
-2002-03-10 Daniel Jacobowitz <drow@mvista.com>
-
- * signals.h: New file, from gdb/defs.h.
-
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff --git a/include/gdb/callback.h b/include/gdb/callback.h
deleted file mode 100644
index 5ae1d00..0000000
--- a/include/gdb/callback.h
+++ /dev/null
@@ -1,326 +0,0 @@
-/* Remote target system call callback support.
- Copyright 1997, 2007, 2008 Free Software Foundation, Inc.
- Contributed by Cygnus Solutions.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-/* This interface isn't intended to be specific to any particular kind
- of remote (hardware, simulator, whatever). As such, support for it
- (e.g. sim/common/callback.c) should *not* live in the simulator source
- tree, nor should it live in the gdb source tree. */
-
-/* There are various ways to handle system calls:
-
- 1) Have a simulator intercept the appropriate trap instruction and
- directly perform the system call on behalf of the target program.
- This is the typical way of handling system calls for embedded targets.
- [Handling system calls for embedded targets isn't that much of an
- oxymoron as running compiler testsuites make use of the capability.]
-
- This method of system call handling is done when STATE_ENVIRONMENT
- is ENVIRONMENT_USER.
-
- 2) Have a simulator emulate the hardware as much as possible.
- If the program running on the real hardware communicates with some sort
- of target manager, one would want to be able to run this program on the
- simulator as well.
-
- This method of system call handling is done when STATE_ENVIRONMENT
- is ENVIRONMENT_OPERATING.
-*/
-
-#ifndef CALLBACK_H
-#define CALLBACK_H
-
-/* ??? The reason why we check for va_start here should be documented. */
-
-#ifndef va_start
-#include <ansidecl.h>
-#include <stdarg.h>
-#endif
-/* Needed for enum bfd_endian. */
-#include "bfd.h"
-
-/* Mapping of host/target values. */
-/* ??? For debugging purposes, one might want to add a string of the
- name of the symbol. */
-
-typedef struct {
- int host_val;
- int target_val;
-} CB_TARGET_DEFS_MAP;
-
-#define MAX_CALLBACK_FDS 10
-
-/* Forward decl for stat/fstat. */
-struct stat;
-
-typedef struct host_callback_struct host_callback;
-
-struct host_callback_struct
-{
- int (*close) PARAMS ((host_callback *,int));
- int (*get_errno) PARAMS ((host_callback *));
- int (*isatty) PARAMS ((host_callback *, int));
- int (*lseek) PARAMS ((host_callback *, int, long , int));
- int (*open) PARAMS ((host_callback *, const char*, int mode));
- int (*read) PARAMS ((host_callback *,int, char *, int));
- int (*read_stdin) PARAMS (( host_callback *, char *, int));
- int (*rename) PARAMS ((host_callback *, const char *, const char *));
- int (*system) PARAMS ((host_callback *, const char *));
- long (*time) PARAMS ((host_callback *, long *));
- int (*unlink) PARAMS ((host_callback *, const char *));
- int (*write) PARAMS ((host_callback *,int, const char *, int));
- int (*write_stdout) PARAMS ((host_callback *, const char *, int));
- void (*flush_stdout) PARAMS ((host_callback *));
- int (*write_stderr) PARAMS ((host_callback *, const char *, int));
- void (*flush_stderr) PARAMS ((host_callback *));
- int (*stat) PARAMS ((host_callback *, const char *, struct stat *));
- int (*fstat) PARAMS ((host_callback *, int, struct stat *));
- int (*lstat) PARAMS ((host_callback *, const char *, struct stat *));
- int (*ftruncate) PARAMS ((host_callback *, int, long));
- int (*truncate) PARAMS ((host_callback *, const char *, long));
- int (*pipe) PARAMS ((host_callback *, int *));
-
- /* Called by the framework when a read call has emptied a pipe buffer. */
- void (*pipe_empty) PARAMS ((host_callback *, int read_fd, int write_fd));
-
- /* Called by the framework when a write call makes a pipe buffer
- non-empty. */
- void (*pipe_nonempty) PARAMS ((host_callback *, int read_fd, int write_fd));
-
- /* When present, call to the client to give it the oportunity to
- poll any io devices for a request to quit (indicated by a nonzero
- return value). */
- int (*poll_quit) PARAMS ((host_callback *));
-
- /* Used when the target has gone away, so we can close open
- handles and free memory etc etc. */
- int (*shutdown) PARAMS ((host_callback *));
- int (*init) PARAMS ((host_callback *));
-
- /* depreciated, use vprintf_filtered - Talk to the user on a console. */
- void (*printf_filtered) PARAMS ((host_callback *, const char *, ...));
-
- /* Talk to the user on a console. */
- void (*vprintf_filtered) PARAMS ((host_callback *, const char *, va_list));
-
- /* Same as vprintf_filtered but to stderr. */
- void (*evprintf_filtered) PARAMS ((host_callback *, const char *, va_list));
-
- /* Print an error message and "exit".
- In the case of gdb "exiting" means doing a longjmp back to the main
- command loop. */
- void (*error) PARAMS ((host_callback *, const char *, ...));
-
- int last_errno; /* host format */
-
- int fdmap[MAX_CALLBACK_FDS];
- /* fd_buddy is used to contruct circular lists of target fds that point to
- the same host fd. A uniquely mapped fd points to itself; for a closed
- one, fd_buddy has the value -1. The host file descriptors for stdin /
- stdout / stderr are never closed by the simulators, so they are put
- in a special fd_buddy circular list which also has MAX_CALLBACK_FDS
- as a member. */
- /* ??? We don't have a callback entry for dup, although it is trival to
- implement now. */
- short fd_buddy[MAX_CALLBACK_FDS+1];
-
- /* 0 = none, >0 = reader (index of writer),
- <0 = writer (negative index of reader).
- If abs (ispipe[N]) == N, then N is an end of a pipe whose other
- end is closed. */
- short ispipe[MAX_CALLBACK_FDS];
-
- /* A writer stores the buffer at its index. Consecutive writes
- realloc the buffer and add to the size. The reader indicates the
- read part in its .size, until it has consumed it all, at which
- point it deallocates the buffer and zeroes out both sizes. */
- struct pipe_write_buffer
- {
- int size;
- char *buffer;
- } pipe_buffer[MAX_CALLBACK_FDS];
-
- /* System call numbers. */
- CB_TARGET_DEFS_MAP *syscall_map;
- /* Errno values. */
- CB_TARGET_DEFS_MAP *errno_map;
- /* Flags to the open system call. */
- CB_TARGET_DEFS_MAP *open_map;
- /* Signal numbers. */
- CB_TARGET_DEFS_MAP *signal_map;
- /* Layout of `stat' struct.
- The format is a series of "name,length" pairs separated by colons.
- Empty space is indicated with a `name' of "space".
- All padding must be explicitly mentioned.
- Lengths are in bytes. If this needs to be extended to bits,
- use "name.bits".
- Example: "st_dev,4:st_ino,4:st_mode,4:..." */
- const char *stat_map;
-
- enum bfd_endian target_endian;
-
- /* Size of an "int" on the target (for syscalls whose ABI uses "int").
- This must include padding, and only padding-at-higher-address is
- supported. For example, a 64-bit target with 32-bit int:s which
- are padded to 64 bits when in an array, should supposedly set this
- to 8. The default is 4 which matches ILP32 targets and 64-bit
- targets with 32-bit ints and no padding. */
- int target_sizeof_int;
-
- /* Marker for those wanting to do sanity checks.
- This should remain the last member of this struct to help catch
- miscompilation errors. */
-#define HOST_CALLBACK_MAGIC 4705 /* teds constant */
- int magic;
-};
-
-extern host_callback default_callback;
-
-/* Canonical versions of system call numbers.
- It's not intended to willy-nilly throw every system call ever heard
- of in here. Only include those that have an important use.
- ??? One can certainly start a discussion over the ones that are currently
- here, but that will always be true. */
-
-/* These are used by the ANSI C support of libc. */
-#define CB_SYS_exit 1
-#define CB_SYS_open 2
-#define CB_SYS_close 3
-#define CB_SYS_read 4
-#define CB_SYS_write 5
-#define CB_SYS_lseek 6
-#define CB_SYS_unlink 7
-#define CB_SYS_getpid 8
-#define CB_SYS_kill 9
-#define CB_SYS_fstat 10
-/*#define CB_SYS_sbrk 11 - not currently a system call, but reserved. */
-
-/* ARGV support. */
-#define CB_SYS_argvlen 12
-#define CB_SYS_argv 13
-
-/* These are extras added for one reason or another. */
-#define CB_SYS_chdir 14
-#define CB_SYS_stat 15
-#define CB_SYS_chmod 16
-#define CB_SYS_utime 17
-#define CB_SYS_time 18
-
-/* More standard syscalls. */
-#define CB_SYS_lstat 19
-#define CB_SYS_rename 20
-#define CB_SYS_truncate 21
-#define CB_SYS_ftruncate 22
-#define CB_SYS_pipe 23
-
-/* Struct use to pass and return information necessary to perform a
- system call. */
-/* FIXME: Need to consider target word size. */
-
-typedef struct cb_syscall {
- /* The target's value of what system call to perform. */
- int func;
- /* The arguments to the syscall. */
- long arg1, arg2, arg3, arg4;
-
- /* The result. */
- long result;
- /* Some system calls have two results. */
- long result2;
- /* The target's errno value, or 0 if success.
- This is converted to the target's value with host_to_target_errno. */
- int errcode;
-
- /* Working space to be used by memory read/write callbacks. */
- PTR p1;
- PTR p2;
- long x1,x2;
-
- /* Callbacks for reading/writing memory (e.g. for read/write syscalls).
- ??? long or unsigned long might be better to use for the `count'
- argument here. We mimic sim_{read,write} for now. Be careful to
- test any changes with -Wall -Werror, mixed signed comparisons
- will get you. */
- int (*read_mem) PARAMS ((host_callback * /*cb*/, struct cb_syscall * /*sc*/,
- unsigned long /*taddr*/, char * /*buf*/,
- int /*bytes*/));
- int (*write_mem) PARAMS ((host_callback * /*cb*/, struct cb_syscall * /*sc*/,
- unsigned long /*taddr*/, const char * /*buf*/,
- int /*bytes*/));
-
- /* For sanity checking, should be last entry. */
- int magic;
-} CB_SYSCALL;
-
-/* Magic number sanity checker. */
-#define CB_SYSCALL_MAGIC 0x12344321
-
-/* Macro to initialize CB_SYSCALL. Called first, before filling in
- any fields. */
-#define CB_SYSCALL_INIT(sc) \
-do { \
- memset ((sc), 0, sizeof (*(sc))); \
- (sc)->magic = CB_SYSCALL_MAGIC; \
-} while (0)
-
-/* Return codes for various interface routines. */
-
-typedef enum {
- CB_RC_OK = 0,
- /* generic error */
- CB_RC_ERR,
- /* either file not found or no read access */
- CB_RC_ACCESS,
- CB_RC_NO_MEM
-} CB_RC;
-
-/* Read in target values for system call numbers, errno values, signals. */
-CB_RC cb_read_target_syscall_maps PARAMS ((host_callback *, const char *));
-
-/* Translate target to host syscall function numbers. */
-int cb_target_to_host_syscall PARAMS ((host_callback *, int));
-
-/* Translate host to target errno value. */
-int cb_host_to_target_errno PARAMS ((host_callback *, int));
-
-/* Translate target to host open flags. */
-int cb_target_to_host_open PARAMS ((host_callback *, int));
-
-/* Translate target signal number to host. */
-int cb_target_to_host_signal PARAMS ((host_callback *, int));
-
-/* Translate host signal number to target. */
-int cb_host_to_target_signal PARAMS ((host_callback *, int));
-
-/* Translate host stat struct to target.
- If stat struct ptr is NULL, just compute target stat struct size.
- Result is size of target stat struct or 0 if error. */
-int cb_host_to_target_stat PARAMS ((host_callback *, const struct stat *, PTR));
-
-/* Translate a value to target endian. */
-void cb_store_target_endian PARAMS ((host_callback *, char *, int, long));
-
-/* Tests for special fds. */
-int cb_is_stdin PARAMS ((host_callback *, int));
-int cb_is_stdout PARAMS ((host_callback *, int));
-int cb_is_stderr PARAMS ((host_callback *, int));
-
-/* Perform a system call. */
-CB_RC cb_syscall PARAMS ((host_callback *, CB_SYSCALL *));
-
-#endif
diff --git a/include/gdb/fileio.h b/include/gdb/fileio.h
deleted file mode 100644
index a661c22..0000000
--- a/include/gdb/fileio.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/* Hosted File I/O interface definitions, for GDB, the GNU Debugger.
-
- Copyright 2003, 2007, 2008 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#ifndef GDB_FILEIO_H_
-#define GDB_FILEIO_H_
-
-/* The following flags are defined to be independent of the host
- as well as the target side implementation of these constants.
- All constants are defined with a leading FILEIO_ in the name
- to allow the usage of these constants together with the
- corresponding implementation dependent constants in one module. */
-
-/* open(2) flags */
-#define FILEIO_O_RDONLY 0x0
-#define FILEIO_O_WRONLY 0x1
-#define FILEIO_O_RDWR 0x2
-#define FILEIO_O_APPEND 0x8
-#define FILEIO_O_CREAT 0x200
-#define FILEIO_O_TRUNC 0x400
-#define FILEIO_O_EXCL 0x800
-#define FILEIO_O_SUPPORTED (FILEIO_O_RDONLY | FILEIO_O_WRONLY| \
- FILEIO_O_RDWR | FILEIO_O_APPEND| \
- FILEIO_O_CREAT | FILEIO_O_TRUNC| \
- FILEIO_O_EXCL)
-
-/* mode_t bits */
-#define FILEIO_S_IFREG 0100000
-#define FILEIO_S_IFDIR 040000
-#define FILEIO_S_IFCHR 020000
-#define FILEIO_S_IRUSR 0400
-#define FILEIO_S_IWUSR 0200
-#define FILEIO_S_IXUSR 0100
-#define FILEIO_S_IRWXU 0700
-#define FILEIO_S_IRGRP 040
-#define FILEIO_S_IWGRP 020
-#define FILEIO_S_IXGRP 010
-#define FILEIO_S_IRWXG 070
-#define FILEIO_S_IROTH 04
-#define FILEIO_S_IWOTH 02
-#define FILEIO_S_IXOTH 01
-#define FILEIO_S_IRWXO 07
-#define FILEIO_S_SUPPORTED (FILEIO_S_IFREG|FILEIO_S_IFDIR| \
- FILEIO_S_IRWXU|FILEIO_S_IRWXG| \
- FILEIO_S_IRWXO)
-
-/* lseek(2) flags */
-#define FILEIO_SEEK_SET 0
-#define FILEIO_SEEK_CUR 1
-#define FILEIO_SEEK_END 2
-
-/* errno values */
-#define FILEIO_EPERM 1
-#define FILEIO_ENOENT 2
-#define FILEIO_EINTR 4
-#define FILEIO_EIO 5
-#define FILEIO_EBADF 9
-#define FILEIO_EACCES 13
-#define FILEIO_EFAULT 14
-#define FILEIO_EBUSY 16
-#define FILEIO_EEXIST 17
-#define FILEIO_ENODEV 19
-#define FILEIO_ENOTDIR 20
-#define FILEIO_EISDIR 21
-#define FILEIO_EINVAL 22
-#define FILEIO_ENFILE 23
-#define FILEIO_EMFILE 24
-#define FILEIO_EFBIG 27
-#define FILEIO_ENOSPC 28
-#define FILEIO_ESPIPE 29
-#define FILEIO_EROFS 30
-#define FILEIO_ENOSYS 88
-#define FILEIO_ENAMETOOLONG 91
-#define FILEIO_EUNKNOWN 9999
-
-/* limits */
-#define FILEIO_INT_MIN -2147483648L
-#define FILEIO_INT_MAX 2147483647L
-#define FILEIO_UINT_MAX 4294967295UL
-#define FILEIO_LONG_MIN -9223372036854775808LL
-#define FILEIO_LONG_MAX 9223372036854775807LL
-#define FILEIO_ULONG_MAX 18446744073709551615ULL
-
-/* Integral types as used in protocol. */
-#if 0
-typedef __int32_t fio_int_t;
-typedef __uint32_t fio_uint_t, fio_mode_t, fio_time_t;
-typedef __int64_t fio_long_t;
-typedef __uint64_t fio_ulong_t;
-#endif
-
-#define FIO_INT_LEN 4
-#define FIO_UINT_LEN 4
-#define FIO_MODE_LEN 4
-#define FIO_TIME_LEN 4
-#define FIO_LONG_LEN 8
-#define FIO_ULONG_LEN 8
-
-typedef char fio_int_t[FIO_INT_LEN];
-typedef char fio_uint_t[FIO_UINT_LEN];
-typedef char fio_mode_t[FIO_MODE_LEN];
-typedef char fio_time_t[FIO_TIME_LEN];
-typedef char fio_long_t[FIO_LONG_LEN];
-typedef char fio_ulong_t[FIO_ULONG_LEN];
-
-/* Struct stat as used in protocol. For complete independence
- of host/target systems, it's defined as an array with offsets
- to the members. */
-
-struct fio_stat {
- fio_uint_t fst_dev;
- fio_uint_t fst_ino;
- fio_mode_t fst_mode;
- fio_uint_t fst_nlink;
- fio_uint_t fst_uid;
- fio_uint_t fst_gid;
- fio_uint_t fst_rdev;
- fio_ulong_t fst_size;
- fio_ulong_t fst_blksize;
- fio_ulong_t fst_blocks;
- fio_time_t fst_atime;
- fio_time_t fst_mtime;
- fio_time_t fst_ctime;
-};
-
-struct fio_timeval {
- fio_time_t ftv_sec;
- fio_long_t ftv_usec;
-};
-
-#endif /* GDB_FILEIO_H_ */
diff --git a/include/gdb/remote-sim.h b/include/gdb/remote-sim.h
deleted file mode 100644
index 54f6106..0000000
--- a/include/gdb/remote-sim.h
+++ /dev/null
@@ -1,281 +0,0 @@
-/* This file defines the interface between the simulator and gdb.
-
- Copyright 1993, 1994, 1996, 1997, 1998, 2000, 2002, 2007, 2008
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#if !defined (REMOTE_SIM_H)
-#define REMOTE_SIM_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* This file is used when building stand-alone simulators, so isolate this
- file from gdb. */
-
-/* Pick up CORE_ADDR_TYPE if defined (from gdb), otherwise use same value as
- gdb does (unsigned int - from defs.h). */
-
-#ifndef CORE_ADDR_TYPE
-typedef unsigned int SIM_ADDR;
-#else
-typedef CORE_ADDR_TYPE SIM_ADDR;
-#endif
-
-
-/* Semi-opaque type used as result of sim_open and passed back to all
- other routines. "desc" is short for "descriptor".
- It is up to each simulator to define `sim_state'. */
-
-typedef struct sim_state *SIM_DESC;
-
-
-/* Values for `kind' arg to sim_open. */
-
-typedef enum {
- SIM_OPEN_STANDALONE, /* simulator used standalone (run.c) */
- SIM_OPEN_DEBUG /* simulator used by debugger (gdb) */
-} SIM_OPEN_KIND;
-
-
-/* Return codes from various functions. */
-
-typedef enum {
- SIM_RC_FAIL = 0,
- SIM_RC_OK = 1
-} SIM_RC;
-
-
-/* The bfd struct, as an opaque type. */
-
-struct bfd;
-
-
-/* Main simulator entry points. */
-
-
-/* Create a fully initialized simulator instance.
-
- (This function is called when the simulator is selected from the
- gdb command line.)
-
- KIND specifies how the simulator shall be used. Currently there
- are only two kinds: stand-alone and debug.
-
- CALLBACK specifies a standard host callback (defined in callback.h).
-
- ABFD, when non NULL, designates a target program. The program is
- not loaded.
-
- ARGV is a standard ARGV pointer such as that passed from the
- command line. The syntax of the argument list is is assumed to be
- ``SIM-PROG { SIM-OPTION } [ TARGET-PROGRAM { TARGET-OPTION } ]''.
- The trailing TARGET-PROGRAM and args are only valid for a
- stand-alone simulator.
-
- On success, the result is a non NULL descriptor that shall be
- passed to the other sim_foo functions. While the simulator
- configuration can be parameterized by (in decreasing precedence)
- ARGV's SIM-OPTION, ARGV's TARGET-PROGRAM and the ABFD argument, the
- successful creation of the simulator shall not dependent on the
- presence of any of these arguments/options.
-
- Hardware simulator: The created simulator shall be sufficiently
- initialized to handle, with out restrictions any client requests
- (including memory reads/writes, register fetch/stores and a
- resume).
-
- Process simulator: that process is not created until a call to
- sim_create_inferior. FIXME: What should the state of the simulator
- be? */
-
-SIM_DESC sim_open PARAMS ((SIM_OPEN_KIND kind, struct host_callback_struct *callback, struct bfd *abfd, char **argv));
-
-
-/* Destory a simulator instance.
-
- QUITTING is non-zero if we cannot hang on errors.
-
- This may involve freeing target memory and closing any open files
- and mmap'd areas. You cannot assume sim_kill has already been
- called. */
-
-void sim_close PARAMS ((SIM_DESC sd, int quitting));
-
-
-/* Load program PROG into the simulators memory.
-
- If ABFD is non-NULL, the bfd for the file has already been opened.
- The result is a return code indicating success.
-
- Hardware simulator: Normally, each program section is written into
- memory according to that sections LMA using physical (direct)
- addressing. The exception being systems, such as PPC/CHRP, which
- support more complicated program loaders. A call to this function
- should not effect the state of the processor registers. Multiple
- calls to this function are permitted and have an accumulative
- effect.
-
- Process simulator: Calls to this function may be ignored.
-
- FIXME: Most hardware simulators load the image at the VMA using
- virtual addressing.
-
- FIXME: For some hardware targets, before a loaded program can be
- executed, it requires the manipulation of VM registers and tables.
- Such manipulation should probably (?) occure in
- sim_create_inferior. */
-
-SIM_RC sim_load PARAMS ((SIM_DESC sd, char *prog, struct bfd *abfd, int from_tty));
-
-
-/* Prepare to run the simulated program.
-
- ABFD, if not NULL, provides initial processor state information.
- ARGV and ENV, if non NULL, are NULL terminated lists of pointers.
-
- Hardware simulator: This function shall initialize the processor
- registers to a known value. The program counter and possibly stack
- pointer shall be set using information obtained from ABFD (or
- hardware reset defaults). ARGV and ENV, dependant on the target
- ABI, may be written to memory.
-
- Process simulator: After a call to this function, a new process
- instance shall exist. The TEXT, DATA, BSS and stack regions shall
- all be initialized, ARGV and ENV shall be written to process
- address space (according to the applicable ABI) and the program
- counter and stack pointer set accordingly. */
-
-SIM_RC sim_create_inferior PARAMS ((SIM_DESC sd, struct bfd *abfd, char **argv, char **env));
-
-
-/* Fetch LENGTH bytes of the simulated program's memory. Start fetch
- at virtual address MEM and store in BUF. Result is number of bytes
- read, or zero if error. */
-
-int sim_read PARAMS ((SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length));
-
-
-/* Store LENGTH bytes from BUF into the simulated program's
- memory. Store bytes starting at virtual address MEM. Result is
- number of bytes write, or zero if error. */
-
-int sim_write PARAMS ((SIM_DESC sd, SIM_ADDR mem, unsigned char *buf, int length));
-
-
-/* Fetch register REGNO storing its raw (target endian) value in the
- LENGTH byte buffer BUF. Return the actual size of the register or
- zero if REGNO is not applicable.
-
- Legacy implementations ignore LENGTH and always return -1.
-
- If LENGTH does not match the size of REGNO no data is transfered
- (the actual register size is still returned). */
-
-int sim_fetch_register PARAMS ((SIM_DESC sd, int regno, unsigned char *buf, int length));
-
-
-/* Store register REGNO from the raw (target endian) value in BUF.
- Return the actual size of the register or zero if REGNO is not
- applicable.
-
- Legacy implementations ignore LENGTH and always return -1.
-
- If LENGTH does not match the size of REGNO no data is transfered
- (the actual register size is still returned). */
-
-int sim_store_register PARAMS ((SIM_DESC sd, int regno, unsigned char *buf, int length));
-
-
-/* Print whatever statistics the simulator has collected.
-
- VERBOSE is currently unused and must always be zero. */
-
-void sim_info PARAMS ((SIM_DESC sd, int verbose));
-
-
-/* Run (or resume) the simulated program.
-
- STEP, when non-zero indicates that only a single simulator cycle
- should be emulated.
-
- SIGGNAL, if non-zero is a (HOST) SIGRC value indicating the type of
- event (hardware interrupt, signal) to be delivered to the simulated
- program.
-
- Hardware simulator: If the SIGRC value returned by
- sim_stop_reason() is passed back to the simulator via SIGGNAL then
- the hardware simulator shall correctly deliver the hardware event
- indicated by that signal. If a value of zero is passed in then the
- simulation will continue as if there were no outstanding signal.
- The effect of any other SIGGNAL value is is implementation
- dependant.
-
- Process simulator: If SIGRC is non-zero then the corresponding
- signal is delivered to the simulated program and execution is then
- continued. A zero SIGRC value indicates that the program should
- continue as normal. */
-
-void sim_resume PARAMS ((SIM_DESC sd, int step, int siggnal));
-
-
-/* Asynchronous request to stop the simulation.
- A nonzero return indicates that the simulator is able to handle
- the request */
-
-int sim_stop PARAMS ((SIM_DESC sd));
-
-
-/* Fetch the REASON why the program stopped.
-
- SIM_EXITED: The program has terminated. SIGRC indicates the target
- dependant exit status.
-
- SIM_STOPPED: The program has stopped. SIGRC uses the host's signal
- numbering as a way of identifying the reaon: program interrupted by
- user via a sim_stop request (SIGINT); a breakpoint instruction
- (SIGTRAP); a completed single step (SIGTRAP); an internal error
- condition (SIGABRT); an illegal instruction (SIGILL); Access to an
- undefined memory region (SIGSEGV); Mis-aligned memory access
- (SIGBUS). For some signals information in addition to the signal
- number may be retained by the simulator (e.g. offending address),
- that information is not directly accessable via this interface.
-
- SIM_SIGNALLED: The program has been terminated by a signal. The
- simulator has encountered target code that causes the the program
- to exit with signal SIGRC.
-
- SIM_RUNNING, SIM_POLLING: The return of one of these values
- indicates a problem internal to the simulator. */
-
-enum sim_stop { sim_running, sim_polling, sim_exited, sim_stopped, sim_signalled };
-
-void sim_stop_reason PARAMS ((SIM_DESC sd, enum sim_stop *reason, int *sigrc));
-
-
-/* Passthru for other commands that the simulator might support.
- Simulators should be prepared to deal with any combination of NULL
- or empty CMD. */
-
-void sim_do_command PARAMS ((SIM_DESC sd, char *cmd));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !defined (REMOTE_SIM_H) */
diff --git a/include/gdb/signals.h b/include/gdb/signals.h
deleted file mode 100644
index 3a0f89e..0000000
--- a/include/gdb/signals.h
+++ /dev/null
@@ -1,234 +0,0 @@
-/* Target signal numbers for GDB and the GDB remote protocol.
- Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#ifndef GDB_SIGNALS_H
-#define GDB_SIGNALS_H
-
-/* The numbering of these signals is chosen to match traditional unix
- signals (insofar as various unices use the same numbers, anyway).
- It is also the numbering of the GDB remote protocol. Other remote
- protocols, if they use a different numbering, should make sure to
- translate appropriately.
-
- Since these numbers have actually made it out into other software
- (stubs, etc.), you mustn't disturb the assigned numbering. If you
- need to add new signals here, add them to the end of the explicitly
- numbered signals, at the comment marker. Add them unconditionally,
- not within any #if or #ifdef.
-
- This is based strongly on Unix/POSIX signals for several reasons:
- (1) This set of signals represents a widely-accepted attempt to
- represent events of this sort in a portable fashion, (2) we want a
- signal to make it from wait to child_wait to the user intact, (3) many
- remote protocols use a similar encoding. However, it is
- recognized that this set of signals has limitations (such as not
- distinguishing between various kinds of SIGSEGV, or not
- distinguishing hitting a breakpoint from finishing a single step).
- So in the future we may get around this either by adding additional
- signals for breakpoint, single-step, etc., or by adding signal
- codes; the latter seems more in the spirit of what BSD, System V,
- etc. are doing to address these issues. */
-
-/* For an explanation of what each signal means, see
- target_signal_to_string. */
-
-enum target_signal
- {
- /* Used some places (e.g. stop_signal) to record the concept that
- there is no signal. */
- TARGET_SIGNAL_0 = 0,
- TARGET_SIGNAL_FIRST = 0,
- TARGET_SIGNAL_HUP = 1,
- TARGET_SIGNAL_INT = 2,
- TARGET_SIGNAL_QUIT = 3,
- TARGET_SIGNAL_ILL = 4,
- TARGET_SIGNAL_TRAP = 5,
- TARGET_SIGNAL_ABRT = 6,
- TARGET_SIGNAL_EMT = 7,
- TARGET_SIGNAL_FPE = 8,
- TARGET_SIGNAL_KILL = 9,
- TARGET_SIGNAL_BUS = 10,
- TARGET_SIGNAL_SEGV = 11,
- TARGET_SIGNAL_SYS = 12,
- TARGET_SIGNAL_PIPE = 13,
- TARGET_SIGNAL_ALRM = 14,
- TARGET_SIGNAL_TERM = 15,
- TARGET_SIGNAL_URG = 16,
- TARGET_SIGNAL_STOP = 17,
- TARGET_SIGNAL_TSTP = 18,
- TARGET_SIGNAL_CONT = 19,
- TARGET_SIGNAL_CHLD = 20,
- TARGET_SIGNAL_TTIN = 21,
- TARGET_SIGNAL_TTOU = 22,
- TARGET_SIGNAL_IO = 23,
- TARGET_SIGNAL_XCPU = 24,
- TARGET_SIGNAL_XFSZ = 25,
- TARGET_SIGNAL_VTALRM = 26,
- TARGET_SIGNAL_PROF = 27,
- TARGET_SIGNAL_WINCH = 28,
- TARGET_SIGNAL_LOST = 29,
- TARGET_SIGNAL_USR1 = 30,
- TARGET_SIGNAL_USR2 = 31,
- TARGET_SIGNAL_PWR = 32,
- /* Similar to SIGIO. Perhaps they should have the same number. */
- TARGET_SIGNAL_POLL = 33,
- TARGET_SIGNAL_WIND = 34,
- TARGET_SIGNAL_PHONE = 35,
- TARGET_SIGNAL_WAITING = 36,
- TARGET_SIGNAL_LWP = 37,
- TARGET_SIGNAL_DANGER = 38,
- TARGET_SIGNAL_GRANT = 39,
- TARGET_SIGNAL_RETRACT = 40,
- TARGET_SIGNAL_MSG = 41,
- TARGET_SIGNAL_SOUND = 42,
- TARGET_SIGNAL_SAK = 43,
- TARGET_SIGNAL_PRIO = 44,
- TARGET_SIGNAL_REALTIME_33 = 45,
- TARGET_SIGNAL_REALTIME_34 = 46,
- TARGET_SIGNAL_REALTIME_35 = 47,
- TARGET_SIGNAL_REALTIME_36 = 48,
- TARGET_SIGNAL_REALTIME_37 = 49,
- TARGET_SIGNAL_REALTIME_38 = 50,
- TARGET_SIGNAL_REALTIME_39 = 51,
- TARGET_SIGNAL_REALTIME_40 = 52,
- TARGET_SIGNAL_REALTIME_41 = 53,
- TARGET_SIGNAL_REALTIME_42 = 54,
- TARGET_SIGNAL_REALTIME_43 = 55,
- TARGET_SIGNAL_REALTIME_44 = 56,
- TARGET_SIGNAL_REALTIME_45 = 57,
- TARGET_SIGNAL_REALTIME_46 = 58,
- TARGET_SIGNAL_REALTIME_47 = 59,
- TARGET_SIGNAL_REALTIME_48 = 60,
- TARGET_SIGNAL_REALTIME_49 = 61,
- TARGET_SIGNAL_REALTIME_50 = 62,
- TARGET_SIGNAL_REALTIME_51 = 63,
- TARGET_SIGNAL_REALTIME_52 = 64,
- TARGET_SIGNAL_REALTIME_53 = 65,
- TARGET_SIGNAL_REALTIME_54 = 66,
- TARGET_SIGNAL_REALTIME_55 = 67,
- TARGET_SIGNAL_REALTIME_56 = 68,
- TARGET_SIGNAL_REALTIME_57 = 69,
- TARGET_SIGNAL_REALTIME_58 = 70,
- TARGET_SIGNAL_REALTIME_59 = 71,
- TARGET_SIGNAL_REALTIME_60 = 72,
- TARGET_SIGNAL_REALTIME_61 = 73,
- TARGET_SIGNAL_REALTIME_62 = 74,
- TARGET_SIGNAL_REALTIME_63 = 75,
-
- /* Used internally by Solaris threads. See signal(5) on Solaris. */
- TARGET_SIGNAL_CANCEL = 76,
-
- /* Yes, this pains me, too. But LynxOS didn't have SIG32, and now
- GNU/Linux does, and we can't disturb the numbering, since it's
- part of the remote protocol. Note that in some GDB's
- TARGET_SIGNAL_REALTIME_32 is number 76. */
- TARGET_SIGNAL_REALTIME_32,
- /* Yet another pain, IRIX 6 has SIG64. */
- TARGET_SIGNAL_REALTIME_64,
- /* Yet another pain, GNU/Linux MIPS might go up to 128. */
- TARGET_SIGNAL_REALTIME_65,
- TARGET_SIGNAL_REALTIME_66,
- TARGET_SIGNAL_REALTIME_67,
- TARGET_SIGNAL_REALTIME_68,
- TARGET_SIGNAL_REALTIME_69,
- TARGET_SIGNAL_REALTIME_70,
- TARGET_SIGNAL_REALTIME_71,
- TARGET_SIGNAL_REALTIME_72,
- TARGET_SIGNAL_REALTIME_73,
- TARGET_SIGNAL_REALTIME_74,
- TARGET_SIGNAL_REALTIME_75,
- TARGET_SIGNAL_REALTIME_76,
- TARGET_SIGNAL_REALTIME_77,
- TARGET_SIGNAL_REALTIME_78,
- TARGET_SIGNAL_REALTIME_79,
- TARGET_SIGNAL_REALTIME_80,
- TARGET_SIGNAL_REALTIME_81,
- TARGET_SIGNAL_REALTIME_82,
- TARGET_SIGNAL_REALTIME_83,
- TARGET_SIGNAL_REALTIME_84,
- TARGET_SIGNAL_REALTIME_85,
- TARGET_SIGNAL_REALTIME_86,
- TARGET_SIGNAL_REALTIME_87,
- TARGET_SIGNAL_REALTIME_88,
- TARGET_SIGNAL_REALTIME_89,
- TARGET_SIGNAL_REALTIME_90,
- TARGET_SIGNAL_REALTIME_91,
- TARGET_SIGNAL_REALTIME_92,
- TARGET_SIGNAL_REALTIME_93,
- TARGET_SIGNAL_REALTIME_94,
- TARGET_SIGNAL_REALTIME_95,
- TARGET_SIGNAL_REALTIME_96,
- TARGET_SIGNAL_REALTIME_97,
- TARGET_SIGNAL_REALTIME_98,
- TARGET_SIGNAL_REALTIME_99,
- TARGET_SIGNAL_REALTIME_100,
- TARGET_SIGNAL_REALTIME_101,
- TARGET_SIGNAL_REALTIME_102,
- TARGET_SIGNAL_REALTIME_103,
- TARGET_SIGNAL_REALTIME_104,
- TARGET_SIGNAL_REALTIME_105,
- TARGET_SIGNAL_REALTIME_106,
- TARGET_SIGNAL_REALTIME_107,
- TARGET_SIGNAL_REALTIME_108,
- TARGET_SIGNAL_REALTIME_109,
- TARGET_SIGNAL_REALTIME_110,
- TARGET_SIGNAL_REALTIME_111,
- TARGET_SIGNAL_REALTIME_112,
- TARGET_SIGNAL_REALTIME_113,
- TARGET_SIGNAL_REALTIME_114,
- TARGET_SIGNAL_REALTIME_115,
- TARGET_SIGNAL_REALTIME_116,
- TARGET_SIGNAL_REALTIME_117,
- TARGET_SIGNAL_REALTIME_118,
- TARGET_SIGNAL_REALTIME_119,
- TARGET_SIGNAL_REALTIME_120,
- TARGET_SIGNAL_REALTIME_121,
- TARGET_SIGNAL_REALTIME_122,
- TARGET_SIGNAL_REALTIME_123,
- TARGET_SIGNAL_REALTIME_124,
- TARGET_SIGNAL_REALTIME_125,
- TARGET_SIGNAL_REALTIME_126,
- TARGET_SIGNAL_REALTIME_127,
-
- TARGET_SIGNAL_INFO,
-
- /* Some signal we don't know about. */
- TARGET_SIGNAL_UNKNOWN,
-
- /* Use whatever signal we use when one is not specifically specified
- (for passing to proceed and so on). */
- TARGET_SIGNAL_DEFAULT,
-
- /* Mach exceptions. In versions of GDB before 5.2, these were just before
- TARGET_SIGNAL_INFO if you were compiling on a Mach host (and missing
- otherwise). */
- TARGET_EXC_BAD_ACCESS,
- TARGET_EXC_BAD_INSTRUCTION,
- TARGET_EXC_ARITHMETIC,
- TARGET_EXC_EMULATION,
- TARGET_EXC_SOFTWARE,
- TARGET_EXC_BREAKPOINT,
-
- /* If you are adding a new signal, add it just above this comment. */
-
- /* Last and unused enum value, for sizing arrays, etc. */
- TARGET_SIGNAL_LAST
- };
-
-#endif /* #ifndef GDB_SIGNALS_H */
diff --git a/include/gdb/sim-arm.h b/include/gdb/sim-arm.h
deleted file mode 100644
index eca0988..0000000
--- a/include/gdb/sim-arm.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/* This file defines the interface between the Arm simulator and GDB.
-
- Copyright 2002, 2003, 2007, 2008 Free Software Foundation, Inc.
-
- Contributed by Red Hat.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#if !defined (SIM_ARM_H)
-#define SIM_ARM_H
-
-#ifdef __cplusplus
-extern "C" { // }
-#endif
-
-enum sim_arm_regs
-{
- SIM_ARM_R0_REGNUM,
- SIM_ARM_R1_REGNUM,
- SIM_ARM_R2_REGNUM,
- SIM_ARM_R3_REGNUM,
- SIM_ARM_R4_REGNUM,
- SIM_ARM_R5_REGNUM,
- SIM_ARM_R6_REGNUM,
- SIM_ARM_R7_REGNUM,
- SIM_ARM_R8_REGNUM,
- SIM_ARM_R9_REGNUM,
- SIM_ARM_R10_REGNUM,
- SIM_ARM_R11_REGNUM,
- SIM_ARM_R12_REGNUM,
- SIM_ARM_R13_REGNUM,
- SIM_ARM_R14_REGNUM,
- SIM_ARM_R15_REGNUM, /* PC */
- SIM_ARM_FP0_REGNUM,
- SIM_ARM_FP1_REGNUM,
- SIM_ARM_FP2_REGNUM,
- SIM_ARM_FP3_REGNUM,
- SIM_ARM_FP4_REGNUM,
- SIM_ARM_FP5_REGNUM,
- SIM_ARM_FP6_REGNUM,
- SIM_ARM_FP7_REGNUM,
- SIM_ARM_FPS_REGNUM,
- SIM_ARM_PS_REGNUM,
- SIM_ARM_MAVERIC_COP0R0_REGNUM,
- SIM_ARM_MAVERIC_COP0R1_REGNUM,
- SIM_ARM_MAVERIC_COP0R2_REGNUM,
- SIM_ARM_MAVERIC_COP0R3_REGNUM,
- SIM_ARM_MAVERIC_COP0R4_REGNUM,
- SIM_ARM_MAVERIC_COP0R5_REGNUM,
- SIM_ARM_MAVERIC_COP0R6_REGNUM,
- SIM_ARM_MAVERIC_COP0R7_REGNUM,
- SIM_ARM_MAVERIC_COP0R8_REGNUM,
- SIM_ARM_MAVERIC_COP0R9_REGNUM,
- SIM_ARM_MAVERIC_COP0R10_REGNUM,
- SIM_ARM_MAVERIC_COP0R11_REGNUM,
- SIM_ARM_MAVERIC_COP0R12_REGNUM,
- SIM_ARM_MAVERIC_COP0R13_REGNUM,
- SIM_ARM_MAVERIC_COP0R14_REGNUM,
- SIM_ARM_MAVERIC_COP0R15_REGNUM,
- SIM_ARM_MAVERIC_DSPSC_REGNUM,
- SIM_ARM_IWMMXT_COP0R0_REGNUM,
- SIM_ARM_IWMMXT_COP0R1_REGNUM,
- SIM_ARM_IWMMXT_COP0R2_REGNUM,
- SIM_ARM_IWMMXT_COP0R3_REGNUM,
- SIM_ARM_IWMMXT_COP0R4_REGNUM,
- SIM_ARM_IWMMXT_COP0R5_REGNUM,
- SIM_ARM_IWMMXT_COP0R6_REGNUM,
- SIM_ARM_IWMMXT_COP0R7_REGNUM,
- SIM_ARM_IWMMXT_COP0R8_REGNUM,
- SIM_ARM_IWMMXT_COP0R9_REGNUM,
- SIM_ARM_IWMMXT_COP0R10_REGNUM,
- SIM_ARM_IWMMXT_COP0R11_REGNUM,
- SIM_ARM_IWMMXT_COP0R12_REGNUM,
- SIM_ARM_IWMMXT_COP0R13_REGNUM,
- SIM_ARM_IWMMXT_COP0R14_REGNUM,
- SIM_ARM_IWMMXT_COP0R15_REGNUM,
- SIM_ARM_IWMMXT_COP1R0_REGNUM,
- SIM_ARM_IWMMXT_COP1R1_REGNUM,
- SIM_ARM_IWMMXT_COP1R2_REGNUM,
- SIM_ARM_IWMMXT_COP1R3_REGNUM,
- SIM_ARM_IWMMXT_COP1R4_REGNUM,
- SIM_ARM_IWMMXT_COP1R5_REGNUM,
- SIM_ARM_IWMMXT_COP1R6_REGNUM,
- SIM_ARM_IWMMXT_COP1R7_REGNUM,
- SIM_ARM_IWMMXT_COP1R8_REGNUM,
- SIM_ARM_IWMMXT_COP1R9_REGNUM,
- SIM_ARM_IWMMXT_COP1R10_REGNUM,
- SIM_ARM_IWMMXT_COP1R11_REGNUM,
- SIM_ARM_IWMMXT_COP1R12_REGNUM,
- SIM_ARM_IWMMXT_COP1R13_REGNUM,
- SIM_ARM_IWMMXT_COP1R14_REGNUM,
- SIM_ARM_IWMMXT_COP1R15_REGNUM
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/gdb/sim-cr16.h b/include/gdb/sim-cr16.h
deleted file mode 100644
index 9ea2731..0000000
--- a/include/gdb/sim-cr16.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/* This file defines the interface between the cr16 simulator and gdb.
-
- Copyright 2008 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, see <http://www.gnu.org/licenses/>. */
-
-#if !defined (SIM_CR16_H)
-#define SIM_CR16_H
-
-#ifdef __cplusplus
-extern "C" { // }
-#endif
-
-enum
- {
- SIM_CR16_MEMORY_UNIFIED = 0x00000000,
- SIM_CR16_MEMORY_INSN = 0x10000000,
- SIM_CR16_MEMORY_DATA = 0x10000000,
- SIM_CR16_MEMORY_DMAP = 0x10000000,
- SIM_CR16_MEMORY_IMAP = 0x10000000
- };
-
-extern unsigned long sim_cr16_translate_dmap_addr
- (unsigned long offset,
- int nr_bytes,
- unsigned long *phys,
- void *regcache,
- unsigned long (*dmap_register) (void *regcache, int reg_nr));
-
-extern unsigned long sim_cr16_translate_imap_addr
- (unsigned long offset,
- int nr_bytes,
- unsigned long *phys,
- void *regcache,
- unsigned long (*imap_register) (void *regcache, int reg_nr));
-
-extern unsigned long sim_cr16_translate_addr
- (unsigned long vaddr,
- int nr_bytes,
- unsigned long *phys,
- void *regcache,
- unsigned long (*dmap_register) (void *regcache, int reg_nr),
- unsigned long (*imap_register) (void *regcache, int reg_nr));
-
-
-/* The simulator makes use of the following register information. */
-
-enum sim_cr16_regs
-{
- SIM_CR16_R0_REGNUM,
- SIM_CR16_R1_REGNUM,
- SIM_CR16_R2_REGNUM,
- SIM_CR16_R3_REGNUM,
- SIM_CR16_R4_REGNUM,
- SIM_CR16_R5_REGNUM,
- SIM_CR16_R6_REGNUM,
- SIM_CR16_R7_REGNUM,
- SIM_CR16_R8_REGNUM,
- SIM_CR16_R9_REGNUM,
- SIM_CR16_R10_REGNUM,
- SIM_CR16_R11_REGNUM,
- SIM_CR16_R12_REGNUM,
- SIM_CR16_R13_REGNUM,
- SIM_CR16_R14_REGNUM,
- SIM_CR16_R15_REGNUM,
-
- SIM_CR16_PC_REGNUM,
- SIM_CR16_ISP_REGNUM,
- SIM_CR16_USP_REGNUM,
- SIM_CR16_INTBASE_REGNUM,
- SIM_CR16_PSR_REGNUM,
- SIM_CR16_CFG_REGNUM,
- SIM_CR16_DBS_REGNUM,
- SIM_CR16_DCR_REGNUM,
- SIM_CR16_DSR_REGNUM,
- SIM_CR16_CAR0_REGNUM,
- SIM_CR16_CAR1_REGNUM
-};
-
-enum
-{
- SIM_CR16_NR_R_REGS = 16,
- SIM_CR16_NR_A_REGS = 2,
- SIM_CR16_NR_IMAP_REGS = 2,
- SIM_CR16_NR_DMAP_REGS = 4,
- SIM_CR16_NR_CR_REGS = 11
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/gdb/sim-d10v.h b/include/gdb/sim-d10v.h
deleted file mode 100644
index 73e5e00..0000000
--- a/include/gdb/sim-d10v.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/* This file defines the interface between the d10v simulator and gdb.
-
- Copyright 1999, 2002, 2007, 2008 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#if !defined (SIM_D10V_H)
-#define SIM_D10V_H
-
-#ifdef __cplusplus
-extern "C" { // }
-#endif
-
-/* GDB interprets addresses as:
-
- 0x00xxxxxx: Physical unified memory segment (Unified memory)
- 0x01xxxxxx: Physical instruction memory segment (On-chip insn memory)
- 0x02xxxxxx: Physical data memory segment (On-chip data memory)
- 0x10xxxxxx: Logical data address segment (DMAP translated memory)
- 0x11xxxxxx: Logical instruction address segment (IMAP translated memory)
-
- The remote d10v board interprets addresses as:
-
- 0x00xxxxxx: Physical unified memory segment (Unified memory)
- 0x01xxxxxx: Physical instruction memory segment (On-chip insn memory)
- 0x02xxxxxx: Physical data memory segment (On-chip data memory)
-
- The following translate a virtual DMAP/IMAP offset into a physical
- memory segment assigning the translated address to PHYS. Since a
- memory access may cross a page boundrary the number of bytes for
- which the translation is applicable (or 0 for an invalid virtual
- offset) is returned. */
-
-enum
- {
- SIM_D10V_MEMORY_UNIFIED = 0x00000000,
- SIM_D10V_MEMORY_INSN = 0x01000000,
- SIM_D10V_MEMORY_DATA = 0x02000000,
- SIM_D10V_MEMORY_DMAP = 0x10000000,
- SIM_D10V_MEMORY_IMAP = 0x11000000
- };
-
-extern unsigned long sim_d10v_translate_dmap_addr
- (unsigned long offset,
- int nr_bytes,
- unsigned long *phys,
- void *regcache,
- unsigned long (*dmap_register) (void *regcache, int reg_nr));
-
-extern unsigned long sim_d10v_translate_imap_addr
- (unsigned long offset,
- int nr_bytes,
- unsigned long *phys,
- void *regcache,
- unsigned long (*imap_register) (void *regcache, int reg_nr));
-
-extern unsigned long sim_d10v_translate_addr
- (unsigned long vaddr,
- int nr_bytes,
- unsigned long *phys,
- void *regcache,
- unsigned long (*dmap_register) (void *regcache, int reg_nr),
- unsigned long (*imap_register) (void *regcache, int reg_nr));
-
-
-/* The simulator makes use of the following register information. */
-
-enum sim_d10v_regs
-{
- SIM_D10V_R0_REGNUM,
- SIM_D10V_R1_REGNUM,
- SIM_D10V_R2_REGNUM,
- SIM_D10V_R3_REGNUM,
- SIM_D10V_R4_REGNUM,
- SIM_D10V_R5_REGNUM,
- SIM_D10V_R6_REGNUM,
- SIM_D10V_R7_REGNUM,
- SIM_D10V_R8_REGNUM,
- SIM_D10V_R9_REGNUM,
- SIM_D10V_R10_REGNUM,
- SIM_D10V_R11_REGNUM,
- SIM_D10V_R12_REGNUM,
- SIM_D10V_R13_REGNUM,
- SIM_D10V_R14_REGNUM,
- SIM_D10V_R15_REGNUM,
- SIM_D10V_CR0_REGNUM,
- SIM_D10V_CR1_REGNUM,
- SIM_D10V_CR2_REGNUM,
- SIM_D10V_CR3_REGNUM,
- SIM_D10V_CR4_REGNUM,
- SIM_D10V_CR5_REGNUM,
- SIM_D10V_CR6_REGNUM,
- SIM_D10V_CR7_REGNUM,
- SIM_D10V_CR8_REGNUM,
- SIM_D10V_CR9_REGNUM,
- SIM_D10V_CR10_REGNUM,
- SIM_D10V_CR11_REGNUM,
- SIM_D10V_CR12_REGNUM,
- SIM_D10V_CR13_REGNUM,
- SIM_D10V_CR14_REGNUM,
- SIM_D10V_CR15_REGNUM,
- SIM_D10V_A0_REGNUM,
- SIM_D10V_A1_REGNUM,
- SIM_D10V_SPI_REGNUM,
- SIM_D10V_SPU_REGNUM,
- SIM_D10V_IMAP0_REGNUM,
- SIM_D10V_IMAP1_REGNUM,
- SIM_D10V_DMAP0_REGNUM,
- SIM_D10V_DMAP1_REGNUM,
- SIM_D10V_DMAP2_REGNUM,
- SIM_D10V_DMAP3_REGNUM,
- SIM_D10V_TS2_DMAP_REGNUM
-};
-
-enum
-{
- SIM_D10V_NR_R_REGS = 16,
- SIM_D10V_NR_A_REGS = 2,
- SIM_D10V_NR_IMAP_REGS = 2,
- SIM_D10V_NR_DMAP_REGS = 4,
- SIM_D10V_NR_CR_REGS = 16
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/gdb/sim-frv.h b/include/gdb/sim-frv.h
deleted file mode 100644
index 1017f20..0000000
--- a/include/gdb/sim-frv.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* This file defines the interface between the FR-V simulator and GDB.
-
- Copyright 2003, 2007, 2008 Free Software Foundation, Inc.
-
- Contributed by Red Hat.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#if !defined (SIM_FRV_H)
-#define SIM_FRV_H
-
-#ifdef __cplusplus
-extern "C" { // }
-#endif
-
-enum sim_frv_regs
-{
- SIM_FRV_GR0_REGNUM = 0,
- SIM_FRV_GR63_REGNUM = 63,
- SIM_FRV_FR0_REGNUM = 64,
- SIM_FRV_FR63_REGNUM = 127,
- SIM_FRV_PC_REGNUM = 128,
-
- /* An FR-V architecture may have up to 4096 special purpose registers
- (SPRs). In order to determine a specific constant used to access
- a particular SPR, one of the H_SPR_ prefixed offsets defined in
- opcodes/frv-desc.h should be added to SIM_FRV_SPR0_REGNUM. So,
- for example, the number that GDB uses to fetch the link register
- from the simulator is (SIM_FRV_SPR0_REGNUM + H_SPR_LR). */
- SIM_FRV_SPR0_REGNUM = 129,
- SIM_FRV_SPR4095_REGNUM = SIM_FRV_SPR0_REGNUM + 4095
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/gdb/sim-h8300.h b/include/gdb/sim-h8300.h
deleted file mode 100644
index 6483642..0000000
--- a/include/gdb/sim-h8300.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* This file defines the interface between the h8300 simulator and gdb.
- Copyright (C) 2002, 2007, 2008 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#if !defined (SIM_H8300_H)
-#define SIM_H8300_H
-
-#ifdef __cplusplus
-extern "C" { //}
-#endif
-
-/* The simulator makes use of the following register information. */
-
- enum sim_h8300_regs
- {
- /* Registers common to all the H8 variants. */
- /* Start here: */
- SIM_H8300_R0_REGNUM,
- SIM_H8300_R1_REGNUM,
- SIM_H8300_R2_REGNUM,
- SIM_H8300_R3_REGNUM,
- SIM_H8300_R4_REGNUM,
- SIM_H8300_R5_REGNUM,
- SIM_H8300_R6_REGNUM,
- SIM_H8300_R7_REGNUM,
-
- SIM_H8300_CCR_REGNUM, /* Contains processor status */
- SIM_H8300_PC_REGNUM, /* Contains program counter */
- /* End here */
-
- SIM_H8300_EXR_REGNUM, /* Contains extended processor status
- H8S and higher */
- SIM_H8300_MACL_REGNUM, /* Lower part of MAC register (26xx only)*/
- SIM_H8300_MACH_REGNUM, /* High part of MAC register (26xx only) */
-
- SIM_H8300_CYCLE_REGNUM,
- SIM_H8300_INST_REGNUM,
- SIM_H8300_TICK_REGNUM
- };
-
- enum
- {
- SIM_H8300_ARG_FIRST_REGNUM = SIM_H8300_R0_REGNUM, /* first reg in which an arg
- may be passed */
- SIM_H8300_ARG_LAST_REGNUM = SIM_H8300_R3_REGNUM, /* last reg in which an arg
- may be passed */
- SIM_H8300_FP_REGNUM = SIM_H8300_R6_REGNUM, /* Contain address of executing
- stack frame */
- SIM_H8300_SP_REGNUM = SIM_H8300_R7_REGNUM /* Contains address of top of stack */
- };
-
- enum
- {
- SIM_H8300_NUM_COMMON_REGS = 10,
- SIM_H8300_S_NUM_REGS = 13,
- SIM_H8300_NUM_REGS = 16
- };
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* SIM_H8300_H */
diff --git a/include/gdb/sim-m32c.h b/include/gdb/sim-m32c.h
deleted file mode 100644
index 829a251..0000000
--- a/include/gdb/sim-m32c.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* This file defines the interface between the m32c simulator and gdb.
- Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#ifndef SIM_M32C_H
-#define SIM_M32C_H
-
-enum m32c_sim_reg {
- m32c_sim_reg_r0_bank0,
- m32c_sim_reg_r1_bank0,
- m32c_sim_reg_r2_bank0,
- m32c_sim_reg_r3_bank0,
- m32c_sim_reg_a0_bank0,
- m32c_sim_reg_a1_bank0,
- m32c_sim_reg_fb_bank0,
- m32c_sim_reg_sb_bank0,
- m32c_sim_reg_r0_bank1,
- m32c_sim_reg_r1_bank1,
- m32c_sim_reg_r2_bank1,
- m32c_sim_reg_r3_bank1,
- m32c_sim_reg_a0_bank1,
- m32c_sim_reg_a1_bank1,
- m32c_sim_reg_fb_bank1,
- m32c_sim_reg_sb_bank1,
- m32c_sim_reg_usp,
- m32c_sim_reg_isp,
- m32c_sim_reg_pc,
- m32c_sim_reg_intb,
- m32c_sim_reg_flg,
- m32c_sim_reg_svf,
- m32c_sim_reg_svp,
- m32c_sim_reg_vct,
- m32c_sim_reg_dmd0,
- m32c_sim_reg_dmd1,
- m32c_sim_reg_dct0,
- m32c_sim_reg_dct1,
- m32c_sim_reg_drc0,
- m32c_sim_reg_drc1,
- m32c_sim_reg_dma0,
- m32c_sim_reg_dma1,
- m32c_sim_reg_dsa0,
- m32c_sim_reg_dsa1,
- m32c_sim_reg_dra0,
- m32c_sim_reg_dra1,
- m32c_sim_reg_num_regs
-};
-
-#endif /* SIM_M32C_H */
diff --git a/include/gdb/sim-ppc.h b/include/gdb/sim-ppc.h
deleted file mode 100644
index a180803..0000000
--- a/include/gdb/sim-ppc.h
+++ /dev/null
@@ -1,773 +0,0 @@
-/* sim-ppc.h --- interface between PowerPC simulator and GDB.
-
- Copyright 2004, 2007, 2008 Free Software Foundation, Inc.
-
- Contributed by Red Hat.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#if !defined (SIM_PPC_H)
-#define SIM_PPC_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* The register access functions, sim_fetch_register and
- sim_store_register, use the following numbering for PowerPC
- registers. */
-
-enum sim_ppc_regnum
- {
- /* General-purpose registers, r0 -- r31. */
- sim_ppc_r0_regnum,
- sim_ppc_r1_regnum,
- sim_ppc_r2_regnum,
- sim_ppc_r3_regnum,
- sim_ppc_r4_regnum,
- sim_ppc_r5_regnum,
- sim_ppc_r6_regnum,
- sim_ppc_r7_regnum,
- sim_ppc_r8_regnum,
- sim_ppc_r9_regnum,
- sim_ppc_r10_regnum,
- sim_ppc_r11_regnum,
- sim_ppc_r12_regnum,
- sim_ppc_r13_regnum,
- sim_ppc_r14_regnum,
- sim_ppc_r15_regnum,
- sim_ppc_r16_regnum,
- sim_ppc_r17_regnum,
- sim_ppc_r18_regnum,
- sim_ppc_r19_regnum,
- sim_ppc_r20_regnum,
- sim_ppc_r21_regnum,
- sim_ppc_r22_regnum,
- sim_ppc_r23_regnum,
- sim_ppc_r24_regnum,
- sim_ppc_r25_regnum,
- sim_ppc_r26_regnum,
- sim_ppc_r27_regnum,
- sim_ppc_r28_regnum,
- sim_ppc_r29_regnum,
- sim_ppc_r30_regnum,
- sim_ppc_r31_regnum,
-
- /* Floating-point registers, f0 -- f31. */
- sim_ppc_f0_regnum,
- sim_ppc_f1_regnum,
- sim_ppc_f2_regnum,
- sim_ppc_f3_regnum,
- sim_ppc_f4_regnum,
- sim_ppc_f5_regnum,
- sim_ppc_f6_regnum,
- sim_ppc_f7_regnum,
- sim_ppc_f8_regnum,
- sim_ppc_f9_regnum,
- sim_ppc_f10_regnum,
- sim_ppc_f11_regnum,
- sim_ppc_f12_regnum,
- sim_ppc_f13_regnum,
- sim_ppc_f14_regnum,
- sim_ppc_f15_regnum,
- sim_ppc_f16_regnum,
- sim_ppc_f17_regnum,
- sim_ppc_f18_regnum,
- sim_ppc_f19_regnum,
- sim_ppc_f20_regnum,
- sim_ppc_f21_regnum,
- sim_ppc_f22_regnum,
- sim_ppc_f23_regnum,
- sim_ppc_f24_regnum,
- sim_ppc_f25_regnum,
- sim_ppc_f26_regnum,
- sim_ppc_f27_regnum,
- sim_ppc_f28_regnum,
- sim_ppc_f29_regnum,
- sim_ppc_f30_regnum,
- sim_ppc_f31_regnum,
-
- /* Altivec vector registers, vr0 -- vr31. */
- sim_ppc_vr0_regnum,
- sim_ppc_vr1_regnum,
- sim_ppc_vr2_regnum,
- sim_ppc_vr3_regnum,
- sim_ppc_vr4_regnum,
- sim_ppc_vr5_regnum,
- sim_ppc_vr6_regnum,
- sim_ppc_vr7_regnum,
- sim_ppc_vr8_regnum,
- sim_ppc_vr9_regnum,
- sim_ppc_vr10_regnum,
- sim_ppc_vr11_regnum,
- sim_ppc_vr12_regnum,
- sim_ppc_vr13_regnum,
- sim_ppc_vr14_regnum,
- sim_ppc_vr15_regnum,
- sim_ppc_vr16_regnum,
- sim_ppc_vr17_regnum,
- sim_ppc_vr18_regnum,
- sim_ppc_vr19_regnum,
- sim_ppc_vr20_regnum,
- sim_ppc_vr21_regnum,
- sim_ppc_vr22_regnum,
- sim_ppc_vr23_regnum,
- sim_ppc_vr24_regnum,
- sim_ppc_vr25_regnum,
- sim_ppc_vr26_regnum,
- sim_ppc_vr27_regnum,
- sim_ppc_vr28_regnum,
- sim_ppc_vr29_regnum,
- sim_ppc_vr30_regnum,
- sim_ppc_vr31_regnum,
-
- /* SPE APU GPR upper halves. These are the upper 32 bits of the
- gprs; there is one upper-half register for each gpr, so it is
- appropriate to use sim_ppc_num_gprs for iterating through
- these. */
- sim_ppc_rh0_regnum,
- sim_ppc_rh1_regnum,
- sim_ppc_rh2_regnum,
- sim_ppc_rh3_regnum,
- sim_ppc_rh4_regnum,
- sim_ppc_rh5_regnum,
- sim_ppc_rh6_regnum,
- sim_ppc_rh7_regnum,
- sim_ppc_rh8_regnum,
- sim_ppc_rh9_regnum,
- sim_ppc_rh10_regnum,
- sim_ppc_rh11_regnum,
- sim_ppc_rh12_regnum,
- sim_ppc_rh13_regnum,
- sim_ppc_rh14_regnum,
- sim_ppc_rh15_regnum,
- sim_ppc_rh16_regnum,
- sim_ppc_rh17_regnum,
- sim_ppc_rh18_regnum,
- sim_ppc_rh19_regnum,
- sim_ppc_rh20_regnum,
- sim_ppc_rh21_regnum,
- sim_ppc_rh22_regnum,
- sim_ppc_rh23_regnum,
- sim_ppc_rh24_regnum,
- sim_ppc_rh25_regnum,
- sim_ppc_rh26_regnum,
- sim_ppc_rh27_regnum,
- sim_ppc_rh28_regnum,
- sim_ppc_rh29_regnum,
- sim_ppc_rh30_regnum,
- sim_ppc_rh31_regnum,
-
- /* SPE APU GPR full registers. Each of these registers is the
- 64-bit concatenation of a 32-bit GPR (providing the lower bits)
- and a 32-bit upper-half register (providing the higher bits).
- As for the upper-half registers, it is appropriate to use
- sim_ppc_num_gprs with these. */
- sim_ppc_ev0_regnum,
- sim_ppc_ev1_regnum,
- sim_ppc_ev2_regnum,
- sim_ppc_ev3_regnum,
- sim_ppc_ev4_regnum,
- sim_ppc_ev5_regnum,
- sim_ppc_ev6_regnum,
- sim_ppc_ev7_regnum,
- sim_ppc_ev8_regnum,
- sim_ppc_ev9_regnum,
- sim_ppc_ev10_regnum,
- sim_ppc_ev11_regnum,
- sim_ppc_ev12_regnum,
- sim_ppc_ev13_regnum,
- sim_ppc_ev14_regnum,
- sim_ppc_ev15_regnum,
- sim_ppc_ev16_regnum,
- sim_ppc_ev17_regnum,
- sim_ppc_ev18_regnum,
- sim_ppc_ev19_regnum,
- sim_ppc_ev20_regnum,
- sim_ppc_ev21_regnum,
- sim_ppc_ev22_regnum,
- sim_ppc_ev23_regnum,
- sim_ppc_ev24_regnum,
- sim_ppc_ev25_regnum,
- sim_ppc_ev26_regnum,
- sim_ppc_ev27_regnum,
- sim_ppc_ev28_regnum,
- sim_ppc_ev29_regnum,
- sim_ppc_ev30_regnum,
- sim_ppc_ev31_regnum,
-
- /* Segment registers, sr0 -- sr15. */
- sim_ppc_sr0_regnum,
- sim_ppc_sr1_regnum,
- sim_ppc_sr2_regnum,
- sim_ppc_sr3_regnum,
- sim_ppc_sr4_regnum,
- sim_ppc_sr5_regnum,
- sim_ppc_sr6_regnum,
- sim_ppc_sr7_regnum,
- sim_ppc_sr8_regnum,
- sim_ppc_sr9_regnum,
- sim_ppc_sr10_regnum,
- sim_ppc_sr11_regnum,
- sim_ppc_sr12_regnum,
- sim_ppc_sr13_regnum,
- sim_ppc_sr14_regnum,
- sim_ppc_sr15_regnum,
-
- /* Miscellaneous --- but non-SPR --- registers. */
- sim_ppc_pc_regnum,
- sim_ppc_ps_regnum,
- sim_ppc_cr_regnum,
- sim_ppc_fpscr_regnum,
- sim_ppc_acc_regnum,
- sim_ppc_vscr_regnum,
-
- /* Special-purpose registers. */
- sim_ppc_spr0_regnum, sim_ppc_spr1_regnum,
- sim_ppc_spr2_regnum, sim_ppc_spr3_regnum,
- sim_ppc_spr4_regnum, sim_ppc_spr5_regnum,
- sim_ppc_spr6_regnum, sim_ppc_spr7_regnum,
- sim_ppc_spr8_regnum, sim_ppc_spr9_regnum,
- sim_ppc_spr10_regnum, sim_ppc_spr11_regnum,
- sim_ppc_spr12_regnum, sim_ppc_spr13_regnum,
- sim_ppc_spr14_regnum, sim_ppc_spr15_regnum,
- sim_ppc_spr16_regnum, sim_ppc_spr17_regnum,
- sim_ppc_spr18_regnum, sim_ppc_spr19_regnum,
- sim_ppc_spr20_regnum, sim_ppc_spr21_regnum,
- sim_ppc_spr22_regnum, sim_ppc_spr23_regnum,
- sim_ppc_spr24_regnum, sim_ppc_spr25_regnum,
- sim_ppc_spr26_regnum, sim_ppc_spr27_regnum,
- sim_ppc_spr28_regnum, sim_ppc_spr29_regnum,
- sim_ppc_spr30_regnum, sim_ppc_spr31_regnum,
- sim_ppc_spr32_regnum, sim_ppc_spr33_regnum,
- sim_ppc_spr34_regnum, sim_ppc_spr35_regnum,
- sim_ppc_spr36_regnum, sim_ppc_spr37_regnum,
- sim_ppc_spr38_regnum, sim_ppc_spr39_regnum,
- sim_ppc_spr40_regnum, sim_ppc_spr41_regnum,
- sim_ppc_spr42_regnum, sim_ppc_spr43_regnum,
- sim_ppc_spr44_regnum, sim_ppc_spr45_regnum,
- sim_ppc_spr46_regnum, sim_ppc_spr47_regnum,
- sim_ppc_spr48_regnum, sim_ppc_spr49_regnum,
- sim_ppc_spr50_regnum, sim_ppc_spr51_regnum,
- sim_ppc_spr52_regnum, sim_ppc_spr53_regnum,
- sim_ppc_spr54_regnum, sim_ppc_spr55_regnum,
- sim_ppc_spr56_regnum, sim_ppc_spr57_regnum,
- sim_ppc_spr58_regnum, sim_ppc_spr59_regnum,
- sim_ppc_spr60_regnum, sim_ppc_spr61_regnum,
- sim_ppc_spr62_regnum, sim_ppc_spr63_regnum,
- sim_ppc_spr64_regnum, sim_ppc_spr65_regnum,
- sim_ppc_spr66_regnum, sim_ppc_spr67_regnum,
- sim_ppc_spr68_regnum, sim_ppc_spr69_regnum,
- sim_ppc_spr70_regnum, sim_ppc_spr71_regnum,
- sim_ppc_spr72_regnum, sim_ppc_spr73_regnum,
- sim_ppc_spr74_regnum, sim_ppc_spr75_regnum,
- sim_ppc_spr76_regnum, sim_ppc_spr77_regnum,
- sim_ppc_spr78_regnum, sim_ppc_spr79_regnum,
- sim_ppc_spr80_regnum, sim_ppc_spr81_regnum,
- sim_ppc_spr82_regnum, sim_ppc_spr83_regnum,
- sim_ppc_spr84_regnum, sim_ppc_spr85_regnum,
- sim_ppc_spr86_regnum, sim_ppc_spr87_regnum,
- sim_ppc_spr88_regnum, sim_ppc_spr89_regnum,
- sim_ppc_spr90_regnum, sim_ppc_spr91_regnum,
- sim_ppc_spr92_regnum, sim_ppc_spr93_regnum,
- sim_ppc_spr94_regnum, sim_ppc_spr95_regnum,
- sim_ppc_spr96_regnum, sim_ppc_spr97_regnum,
- sim_ppc_spr98_regnum, sim_ppc_spr99_regnum,
- sim_ppc_spr100_regnum, sim_ppc_spr101_regnum,
- sim_ppc_spr102_regnum, sim_ppc_spr103_regnum,
- sim_ppc_spr104_regnum, sim_ppc_spr105_regnum,
- sim_ppc_spr106_regnum, sim_ppc_spr107_regnum,
- sim_ppc_spr108_regnum, sim_ppc_spr109_regnum,
- sim_ppc_spr110_regnum, sim_ppc_spr111_regnum,
- sim_ppc_spr112_regnum, sim_ppc_spr113_regnum,
- sim_ppc_spr114_regnum, sim_ppc_spr115_regnum,
- sim_ppc_spr116_regnum, sim_ppc_spr117_regnum,
- sim_ppc_spr118_regnum, sim_ppc_spr119_regnum,
- sim_ppc_spr120_regnum, sim_ppc_spr121_regnum,
- sim_ppc_spr122_regnum, sim_ppc_spr123_regnum,
- sim_ppc_spr124_regnum, sim_ppc_spr125_regnum,
- sim_ppc_spr126_regnum, sim_ppc_spr127_regnum,
- sim_ppc_spr128_regnum, sim_ppc_spr129_regnum,
- sim_ppc_spr130_regnum, sim_ppc_spr131_regnum,
- sim_ppc_spr132_regnum, sim_ppc_spr133_regnum,
- sim_ppc_spr134_regnum, sim_ppc_spr135_regnum,
- sim_ppc_spr136_regnum, sim_ppc_spr137_regnum,
- sim_ppc_spr138_regnum, sim_ppc_spr139_regnum,
- sim_ppc_spr140_regnum, sim_ppc_spr141_regnum,
- sim_ppc_spr142_regnum, sim_ppc_spr143_regnum,
- sim_ppc_spr144_regnum, sim_ppc_spr145_regnum,
- sim_ppc_spr146_regnum, sim_ppc_spr147_regnum,
- sim_ppc_spr148_regnum, sim_ppc_spr149_regnum,
- sim_ppc_spr150_regnum, sim_ppc_spr151_regnum,
- sim_ppc_spr152_regnum, sim_ppc_spr153_regnum,
- sim_ppc_spr154_regnum, sim_ppc_spr155_regnum,
- sim_ppc_spr156_regnum, sim_ppc_spr157_regnum,
- sim_ppc_spr158_regnum, sim_ppc_spr159_regnum,
- sim_ppc_spr160_regnum, sim_ppc_spr161_regnum,
- sim_ppc_spr162_regnum, sim_ppc_spr163_regnum,
- sim_ppc_spr164_regnum, sim_ppc_spr165_regnum,
- sim_ppc_spr166_regnum, sim_ppc_spr167_regnum,
- sim_ppc_spr168_regnum, sim_ppc_spr169_regnum,
- sim_ppc_spr170_regnum, sim_ppc_spr171_regnum,
- sim_ppc_spr172_regnum, sim_ppc_spr173_regnum,
- sim_ppc_spr174_regnum, sim_ppc_spr175_regnum,
- sim_ppc_spr176_regnum, sim_ppc_spr177_regnum,
- sim_ppc_spr178_regnum, sim_ppc_spr179_regnum,
- sim_ppc_spr180_regnum, sim_ppc_spr181_regnum,
- sim_ppc_spr182_regnum, sim_ppc_spr183_regnum,
- sim_ppc_spr184_regnum, sim_ppc_spr185_regnum,
- sim_ppc_spr186_regnum, sim_ppc_spr187_regnum,
- sim_ppc_spr188_regnum, sim_ppc_spr189_regnum,
- sim_ppc_spr190_regnum, sim_ppc_spr191_regnum,
- sim_ppc_spr192_regnum, sim_ppc_spr193_regnum,
- sim_ppc_spr194_regnum, sim_ppc_spr195_regnum,
- sim_ppc_spr196_regnum, sim_ppc_spr197_regnum,
- sim_ppc_spr198_regnum, sim_ppc_spr199_regnum,
- sim_ppc_spr200_regnum, sim_ppc_spr201_regnum,
- sim_ppc_spr202_regnum, sim_ppc_spr203_regnum,
- sim_ppc_spr204_regnum, sim_ppc_spr205_regnum,
- sim_ppc_spr206_regnum, sim_ppc_spr207_regnum,
- sim_ppc_spr208_regnum, sim_ppc_spr209_regnum,
- sim_ppc_spr210_regnum, sim_ppc_spr211_regnum,
- sim_ppc_spr212_regnum, sim_ppc_spr213_regnum,
- sim_ppc_spr214_regnum, sim_ppc_spr215_regnum,
- sim_ppc_spr216_regnum, sim_ppc_spr217_regnum,
- sim_ppc_spr218_regnum, sim_ppc_spr219_regnum,
- sim_ppc_spr220_regnum, sim_ppc_spr221_regnum,
- sim_ppc_spr222_regnum, sim_ppc_spr223_regnum,
- sim_ppc_spr224_regnum, sim_ppc_spr225_regnum,
- sim_ppc_spr226_regnum, sim_ppc_spr227_regnum,
- sim_ppc_spr228_regnum, sim_ppc_spr229_regnum,
- sim_ppc_spr230_regnum, sim_ppc_spr231_regnum,
- sim_ppc_spr232_regnum, sim_ppc_spr233_regnum,
- sim_ppc_spr234_regnum, sim_ppc_spr235_regnum,
- sim_ppc_spr236_regnum, sim_ppc_spr237_regnum,
- sim_ppc_spr238_regnum, sim_ppc_spr239_regnum,
- sim_ppc_spr240_regnum, sim_ppc_spr241_regnum,
- sim_ppc_spr242_regnum, sim_ppc_spr243_regnum,
- sim_ppc_spr244_regnum, sim_ppc_spr245_regnum,
- sim_ppc_spr246_regnum, sim_ppc_spr247_regnum,
- sim_ppc_spr248_regnum, sim_ppc_spr249_regnum,
- sim_ppc_spr250_regnum, sim_ppc_spr251_regnum,
- sim_ppc_spr252_regnum, sim_ppc_spr253_regnum,
- sim_ppc_spr254_regnum, sim_ppc_spr255_regnum,
- sim_ppc_spr256_regnum, sim_ppc_spr257_regnum,
- sim_ppc_spr258_regnum, sim_ppc_spr259_regnum,
- sim_ppc_spr260_regnum, sim_ppc_spr261_regnum,
- sim_ppc_spr262_regnum, sim_ppc_spr263_regnum,
- sim_ppc_spr264_regnum, sim_ppc_spr265_regnum,
- sim_ppc_spr266_regnum, sim_ppc_spr267_regnum,
- sim_ppc_spr268_regnum, sim_ppc_spr269_regnum,
- sim_ppc_spr270_regnum, sim_ppc_spr271_regnum,
- sim_ppc_spr272_regnum, sim_ppc_spr273_regnum,
- sim_ppc_spr274_regnum, sim_ppc_spr275_regnum,
- sim_ppc_spr276_regnum, sim_ppc_spr277_regnum,
- sim_ppc_spr278_regnum, sim_ppc_spr279_regnum,
- sim_ppc_spr280_regnum, sim_ppc_spr281_regnum,
- sim_ppc_spr282_regnum, sim_ppc_spr283_regnum,
- sim_ppc_spr284_regnum, sim_ppc_spr285_regnum,
- sim_ppc_spr286_regnum, sim_ppc_spr287_regnum,
- sim_ppc_spr288_regnum, sim_ppc_spr289_regnum,
- sim_ppc_spr290_regnum, sim_ppc_spr291_regnum,
- sim_ppc_spr292_regnum, sim_ppc_spr293_regnum,
- sim_ppc_spr294_regnum, sim_ppc_spr295_regnum,
- sim_ppc_spr296_regnum, sim_ppc_spr297_regnum,
- sim_ppc_spr298_regnum, sim_ppc_spr299_regnum,
- sim_ppc_spr300_regnum, sim_ppc_spr301_regnum,
- sim_ppc_spr302_regnum, sim_ppc_spr303_regnum,
- sim_ppc_spr304_regnum, sim_ppc_spr305_regnum,
- sim_ppc_spr306_regnum, sim_ppc_spr307_regnum,
- sim_ppc_spr308_regnum, sim_ppc_spr309_regnum,
- sim_ppc_spr310_regnum, sim_ppc_spr311_regnum,
- sim_ppc_spr312_regnum, sim_ppc_spr313_regnum,
- sim_ppc_spr314_regnum, sim_ppc_spr315_regnum,
- sim_ppc_spr316_regnum, sim_ppc_spr317_regnum,
- sim_ppc_spr318_regnum, sim_ppc_spr319_regnum,
- sim_ppc_spr320_regnum, sim_ppc_spr321_regnum,
- sim_ppc_spr322_regnum, sim_ppc_spr323_regnum,
- sim_ppc_spr324_regnum, sim_ppc_spr325_regnum,
- sim_ppc_spr326_regnum, sim_ppc_spr327_regnum,
- sim_ppc_spr328_regnum, sim_ppc_spr329_regnum,
- sim_ppc_spr330_regnum, sim_ppc_spr331_regnum,
- sim_ppc_spr332_regnum, sim_ppc_spr333_regnum,
- sim_ppc_spr334_regnum, sim_ppc_spr335_regnum,
- sim_ppc_spr336_regnum, sim_ppc_spr337_regnum,
- sim_ppc_spr338_regnum, sim_ppc_spr339_regnum,
- sim_ppc_spr340_regnum, sim_ppc_spr341_regnum,
- sim_ppc_spr342_regnum, sim_ppc_spr343_regnum,
- sim_ppc_spr344_regnum, sim_ppc_spr345_regnum,
- sim_ppc_spr346_regnum, sim_ppc_spr347_regnum,
- sim_ppc_spr348_regnum, sim_ppc_spr349_regnum,
- sim_ppc_spr350_regnum, sim_ppc_spr351_regnum,
- sim_ppc_spr352_regnum, sim_ppc_spr353_regnum,
- sim_ppc_spr354_regnum, sim_ppc_spr355_regnum,
- sim_ppc_spr356_regnum, sim_ppc_spr357_regnum,
- sim_ppc_spr358_regnum, sim_ppc_spr359_regnum,
- sim_ppc_spr360_regnum, sim_ppc_spr361_regnum,
- sim_ppc_spr362_regnum, sim_ppc_spr363_regnum,
- sim_ppc_spr364_regnum, sim_ppc_spr365_regnum,
- sim_ppc_spr366_regnum, sim_ppc_spr367_regnum,
- sim_ppc_spr368_regnum, sim_ppc_spr369_regnum,
- sim_ppc_spr370_regnum, sim_ppc_spr371_regnum,
- sim_ppc_spr372_regnum, sim_ppc_spr373_regnum,
- sim_ppc_spr374_regnum, sim_ppc_spr375_regnum,
- sim_ppc_spr376_regnum, sim_ppc_spr377_regnum,
- sim_ppc_spr378_regnum, sim_ppc_spr379_regnum,
- sim_ppc_spr380_regnum, sim_ppc_spr381_regnum,
- sim_ppc_spr382_regnum, sim_ppc_spr383_regnum,
- sim_ppc_spr384_regnum, sim_ppc_spr385_regnum,
- sim_ppc_spr386_regnum, sim_ppc_spr387_regnum,
- sim_ppc_spr388_regnum, sim_ppc_spr389_regnum,
- sim_ppc_spr390_regnum, sim_ppc_spr391_regnum,
- sim_ppc_spr392_regnum, sim_ppc_spr393_regnum,
- sim_ppc_spr394_regnum, sim_ppc_spr395_regnum,
- sim_ppc_spr396_regnum, sim_ppc_spr397_regnum,
- sim_ppc_spr398_regnum, sim_ppc_spr399_regnum,
- sim_ppc_spr400_regnum, sim_ppc_spr401_regnum,
- sim_ppc_spr402_regnum, sim_ppc_spr403_regnum,
- sim_ppc_spr404_regnum, sim_ppc_spr405_regnum,
- sim_ppc_spr406_regnum, sim_ppc_spr407_regnum,
- sim_ppc_spr408_regnum, sim_ppc_spr409_regnum,
- sim_ppc_spr410_regnum, sim_ppc_spr411_regnum,
- sim_ppc_spr412_regnum, sim_ppc_spr413_regnum,
- sim_ppc_spr414_regnum, sim_ppc_spr415_regnum,
- sim_ppc_spr416_regnum, sim_ppc_spr417_regnum,
- sim_ppc_spr418_regnum, sim_ppc_spr419_regnum,
- sim_ppc_spr420_regnum, sim_ppc_spr421_regnum,
- sim_ppc_spr422_regnum, sim_ppc_spr423_regnum,
- sim_ppc_spr424_regnum, sim_ppc_spr425_regnum,
- sim_ppc_spr426_regnum, sim_ppc_spr427_regnum,
- sim_ppc_spr428_regnum, sim_ppc_spr429_regnum,
- sim_ppc_spr430_regnum, sim_ppc_spr431_regnum,
- sim_ppc_spr432_regnum, sim_ppc_spr433_regnum,
- sim_ppc_spr434_regnum, sim_ppc_spr435_regnum,
- sim_ppc_spr436_regnum, sim_ppc_spr437_regnum,
- sim_ppc_spr438_regnum, sim_ppc_spr439_regnum,
- sim_ppc_spr440_regnum, sim_ppc_spr441_regnum,
- sim_ppc_spr442_regnum, sim_ppc_spr443_regnum,
- sim_ppc_spr444_regnum, sim_ppc_spr445_regnum,
- sim_ppc_spr446_regnum, sim_ppc_spr447_regnum,
- sim_ppc_spr448_regnum, sim_ppc_spr449_regnum,
- sim_ppc_spr450_regnum, sim_ppc_spr451_regnum,
- sim_ppc_spr452_regnum, sim_ppc_spr453_regnum,
- sim_ppc_spr454_regnum, sim_ppc_spr455_regnum,
- sim_ppc_spr456_regnum, sim_ppc_spr457_regnum,
- sim_ppc_spr458_regnum, sim_ppc_spr459_regnum,
- sim_ppc_spr460_regnum, sim_ppc_spr461_regnum,
- sim_ppc_spr462_regnum, sim_ppc_spr463_regnum,
- sim_ppc_spr464_regnum, sim_ppc_spr465_regnum,
- sim_ppc_spr466_regnum, sim_ppc_spr467_regnum,
- sim_ppc_spr468_regnum, sim_ppc_spr469_regnum,
- sim_ppc_spr470_regnum, sim_ppc_spr471_regnum,
- sim_ppc_spr472_regnum, sim_ppc_spr473_regnum,
- sim_ppc_spr474_regnum, sim_ppc_spr475_regnum,
- sim_ppc_spr476_regnum, sim_ppc_spr477_regnum,
- sim_ppc_spr478_regnum, sim_ppc_spr479_regnum,
- sim_ppc_spr480_regnum, sim_ppc_spr481_regnum,
- sim_ppc_spr482_regnum, sim_ppc_spr483_regnum,
- sim_ppc_spr484_regnum, sim_ppc_spr485_regnum,
- sim_ppc_spr486_regnum, sim_ppc_spr487_regnum,
- sim_ppc_spr488_regnum, sim_ppc_spr489_regnum,
- sim_ppc_spr490_regnum, sim_ppc_spr491_regnum,
- sim_ppc_spr492_regnum, sim_ppc_spr493_regnum,
- sim_ppc_spr494_regnum, sim_ppc_spr495_regnum,
- sim_ppc_spr496_regnum, sim_ppc_spr497_regnum,
- sim_ppc_spr498_regnum, sim_ppc_spr499_regnum,
- sim_ppc_spr500_regnum, sim_ppc_spr501_regnum,
- sim_ppc_spr502_regnum, sim_ppc_spr503_regnum,
- sim_ppc_spr504_regnum, sim_ppc_spr505_regnum,
- sim_ppc_spr506_regnum, sim_ppc_spr507_regnum,
- sim_ppc_spr508_regnum, sim_ppc_spr509_regnum,
- sim_ppc_spr510_regnum, sim_ppc_spr511_regnum,
- sim_ppc_spr512_regnum, sim_ppc_spr513_regnum,
- sim_ppc_spr514_regnum, sim_ppc_spr515_regnum,
- sim_ppc_spr516_regnum, sim_ppc_spr517_regnum,
- sim_ppc_spr518_regnum, sim_ppc_spr519_regnum,
- sim_ppc_spr520_regnum, sim_ppc_spr521_regnum,
- sim_ppc_spr522_regnum, sim_ppc_spr523_regnum,
- sim_ppc_spr524_regnum, sim_ppc_spr525_regnum,
- sim_ppc_spr526_regnum, sim_ppc_spr527_regnum,
- sim_ppc_spr528_regnum, sim_ppc_spr529_regnum,
- sim_ppc_spr530_regnum, sim_ppc_spr531_regnum,
- sim_ppc_spr532_regnum, sim_ppc_spr533_regnum,
- sim_ppc_spr534_regnum, sim_ppc_spr535_regnum,
- sim_ppc_spr536_regnum, sim_ppc_spr537_regnum,
- sim_ppc_spr538_regnum, sim_ppc_spr539_regnum,
- sim_ppc_spr540_regnum, sim_ppc_spr541_regnum,
- sim_ppc_spr542_regnum, sim_ppc_spr543_regnum,
- sim_ppc_spr544_regnum, sim_ppc_spr545_regnum,
- sim_ppc_spr546_regnum, sim_ppc_spr547_regnum,
- sim_ppc_spr548_regnum, sim_ppc_spr549_regnum,
- sim_ppc_spr550_regnum, sim_ppc_spr551_regnum,
- sim_ppc_spr552_regnum, sim_ppc_spr553_regnum,
- sim_ppc_spr554_regnum, sim_ppc_spr555_regnum,
- sim_ppc_spr556_regnum, sim_ppc_spr557_regnum,
- sim_ppc_spr558_regnum, sim_ppc_spr559_regnum,
- sim_ppc_spr560_regnum, sim_ppc_spr561_regnum,
- sim_ppc_spr562_regnum, sim_ppc_spr563_regnum,
- sim_ppc_spr564_regnum, sim_ppc_spr565_regnum,
- sim_ppc_spr566_regnum, sim_ppc_spr567_regnum,
- sim_ppc_spr568_regnum, sim_ppc_spr569_regnum,
- sim_ppc_spr570_regnum, sim_ppc_spr571_regnum,
- sim_ppc_spr572_regnum, sim_ppc_spr573_regnum,
- sim_ppc_spr574_regnum, sim_ppc_spr575_regnum,
- sim_ppc_spr576_regnum, sim_ppc_spr577_regnum,
- sim_ppc_spr578_regnum, sim_ppc_spr579_regnum,
- sim_ppc_spr580_regnum, sim_ppc_spr581_regnum,
- sim_ppc_spr582_regnum, sim_ppc_spr583_regnum,
- sim_ppc_spr584_regnum, sim_ppc_spr585_regnum,
- sim_ppc_spr586_regnum, sim_ppc_spr587_regnum,
- sim_ppc_spr588_regnum, sim_ppc_spr589_regnum,
- sim_ppc_spr590_regnum, sim_ppc_spr591_regnum,
- sim_ppc_spr592_regnum, sim_ppc_spr593_regnum,
- sim_ppc_spr594_regnum, sim_ppc_spr595_regnum,
- sim_ppc_spr596_regnum, sim_ppc_spr597_regnum,
- sim_ppc_spr598_regnum, sim_ppc_spr599_regnum,
- sim_ppc_spr600_regnum, sim_ppc_spr601_regnum,
- sim_ppc_spr602_regnum, sim_ppc_spr603_regnum,
- sim_ppc_spr604_regnum, sim_ppc_spr605_regnum,
- sim_ppc_spr606_regnum, sim_ppc_spr607_regnum,
- sim_ppc_spr608_regnum, sim_ppc_spr609_regnum,
- sim_ppc_spr610_regnum, sim_ppc_spr611_regnum,
- sim_ppc_spr612_regnum, sim_ppc_spr613_regnum,
- sim_ppc_spr614_regnum, sim_ppc_spr615_regnum,
- sim_ppc_spr616_regnum, sim_ppc_spr617_regnum,
- sim_ppc_spr618_regnum, sim_ppc_spr619_regnum,
- sim_ppc_spr620_regnum, sim_ppc_spr621_regnum,
- sim_ppc_spr622_regnum, sim_ppc_spr623_regnum,
- sim_ppc_spr624_regnum, sim_ppc_spr625_regnum,
- sim_ppc_spr626_regnum, sim_ppc_spr627_regnum,
- sim_ppc_spr628_regnum, sim_ppc_spr629_regnum,
- sim_ppc_spr630_regnum, sim_ppc_spr631_regnum,
- sim_ppc_spr632_regnum, sim_ppc_spr633_regnum,
- sim_ppc_spr634_regnum, sim_ppc_spr635_regnum,
- sim_ppc_spr636_regnum, sim_ppc_spr637_regnum,
- sim_ppc_spr638_regnum, sim_ppc_spr639_regnum,
- sim_ppc_spr640_regnum, sim_ppc_spr641_regnum,
- sim_ppc_spr642_regnum, sim_ppc_spr643_regnum,
- sim_ppc_spr644_regnum, sim_ppc_spr645_regnum,
- sim_ppc_spr646_regnum, sim_ppc_spr647_regnum,
- sim_ppc_spr648_regnum, sim_ppc_spr649_regnum,
- sim_ppc_spr650_regnum, sim_ppc_spr651_regnum,
- sim_ppc_spr652_regnum, sim_ppc_spr653_regnum,
- sim_ppc_spr654_regnum, sim_ppc_spr655_regnum,
- sim_ppc_spr656_regnum, sim_ppc_spr657_regnum,
- sim_ppc_spr658_regnum, sim_ppc_spr659_regnum,
- sim_ppc_spr660_regnum, sim_ppc_spr661_regnum,
- sim_ppc_spr662_regnum, sim_ppc_spr663_regnum,
- sim_ppc_spr664_regnum, sim_ppc_spr665_regnum,
- sim_ppc_spr666_regnum, sim_ppc_spr667_regnum,
- sim_ppc_spr668_regnum, sim_ppc_spr669_regnum,
- sim_ppc_spr670_regnum, sim_ppc_spr671_regnum,
- sim_ppc_spr672_regnum, sim_ppc_spr673_regnum,
- sim_ppc_spr674_regnum, sim_ppc_spr675_regnum,
- sim_ppc_spr676_regnum, sim_ppc_spr677_regnum,
- sim_ppc_spr678_regnum, sim_ppc_spr679_regnum,
- sim_ppc_spr680_regnum, sim_ppc_spr681_regnum,
- sim_ppc_spr682_regnum, sim_ppc_spr683_regnum,
- sim_ppc_spr684_regnum, sim_ppc_spr685_regnum,
- sim_ppc_spr686_regnum, sim_ppc_spr687_regnum,
- sim_ppc_spr688_regnum, sim_ppc_spr689_regnum,
- sim_ppc_spr690_regnum, sim_ppc_spr691_regnum,
- sim_ppc_spr692_regnum, sim_ppc_spr693_regnum,
- sim_ppc_spr694_regnum, sim_ppc_spr695_regnum,
- sim_ppc_spr696_regnum, sim_ppc_spr697_regnum,
- sim_ppc_spr698_regnum, sim_ppc_spr699_regnum,
- sim_ppc_spr700_regnum, sim_ppc_spr701_regnum,
- sim_ppc_spr702_regnum, sim_ppc_spr703_regnum,
- sim_ppc_spr704_regnum, sim_ppc_spr705_regnum,
- sim_ppc_spr706_regnum, sim_ppc_spr707_regnum,
- sim_ppc_spr708_regnum, sim_ppc_spr709_regnum,
- sim_ppc_spr710_regnum, sim_ppc_spr711_regnum,
- sim_ppc_spr712_regnum, sim_ppc_spr713_regnum,
- sim_ppc_spr714_regnum, sim_ppc_spr715_regnum,
- sim_ppc_spr716_regnum, sim_ppc_spr717_regnum,
- sim_ppc_spr718_regnum, sim_ppc_spr719_regnum,
- sim_ppc_spr720_regnum, sim_ppc_spr721_regnum,
- sim_ppc_spr722_regnum, sim_ppc_spr723_regnum,
- sim_ppc_spr724_regnum, sim_ppc_spr725_regnum,
- sim_ppc_spr726_regnum, sim_ppc_spr727_regnum,
- sim_ppc_spr728_regnum, sim_ppc_spr729_regnum,
- sim_ppc_spr730_regnum, sim_ppc_spr731_regnum,
- sim_ppc_spr732_regnum, sim_ppc_spr733_regnum,
- sim_ppc_spr734_regnum, sim_ppc_spr735_regnum,
- sim_ppc_spr736_regnum, sim_ppc_spr737_regnum,
- sim_ppc_spr738_regnum, sim_ppc_spr739_regnum,
- sim_ppc_spr740_regnum, sim_ppc_spr741_regnum,
- sim_ppc_spr742_regnum, sim_ppc_spr743_regnum,
- sim_ppc_spr744_regnum, sim_ppc_spr745_regnum,
- sim_ppc_spr746_regnum, sim_ppc_spr747_regnum,
- sim_ppc_spr748_regnum, sim_ppc_spr749_regnum,
- sim_ppc_spr750_regnum, sim_ppc_spr751_regnum,
- sim_ppc_spr752_regnum, sim_ppc_spr753_regnum,
- sim_ppc_spr754_regnum, sim_ppc_spr755_regnum,
- sim_ppc_spr756_regnum, sim_ppc_spr757_regnum,
- sim_ppc_spr758_regnum, sim_ppc_spr759_regnum,
- sim_ppc_spr760_regnum, sim_ppc_spr761_regnum,
- sim_ppc_spr762_regnum, sim_ppc_spr763_regnum,
- sim_ppc_spr764_regnum, sim_ppc_spr765_regnum,
- sim_ppc_spr766_regnum, sim_ppc_spr767_regnum,
- sim_ppc_spr768_regnum, sim_ppc_spr769_regnum,
- sim_ppc_spr770_regnum, sim_ppc_spr771_regnum,
- sim_ppc_spr772_regnum, sim_ppc_spr773_regnum,
- sim_ppc_spr774_regnum, sim_ppc_spr775_regnum,
- sim_ppc_spr776_regnum, sim_ppc_spr777_regnum,
- sim_ppc_spr778_regnum, sim_ppc_spr779_regnum,
- sim_ppc_spr780_regnum, sim_ppc_spr781_regnum,
- sim_ppc_spr782_regnum, sim_ppc_spr783_regnum,
- sim_ppc_spr784_regnum, sim_ppc_spr785_regnum,
- sim_ppc_spr786_regnum, sim_ppc_spr787_regnum,
- sim_ppc_spr788_regnum, sim_ppc_spr789_regnum,
- sim_ppc_spr790_regnum, sim_ppc_spr791_regnum,
- sim_ppc_spr792_regnum, sim_ppc_spr793_regnum,
- sim_ppc_spr794_regnum, sim_ppc_spr795_regnum,
- sim_ppc_spr796_regnum, sim_ppc_spr797_regnum,
- sim_ppc_spr798_regnum, sim_ppc_spr799_regnum,
- sim_ppc_spr800_regnum, sim_ppc_spr801_regnum,
- sim_ppc_spr802_regnum, sim_ppc_spr803_regnum,
- sim_ppc_spr804_regnum, sim_ppc_spr805_regnum,
- sim_ppc_spr806_regnum, sim_ppc_spr807_regnum,
- sim_ppc_spr808_regnum, sim_ppc_spr809_regnum,
- sim_ppc_spr810_regnum, sim_ppc_spr811_regnum,
- sim_ppc_spr812_regnum, sim_ppc_spr813_regnum,
- sim_ppc_spr814_regnum, sim_ppc_spr815_regnum,
- sim_ppc_spr816_regnum, sim_ppc_spr817_regnum,
- sim_ppc_spr818_regnum, sim_ppc_spr819_regnum,
- sim_ppc_spr820_regnum, sim_ppc_spr821_regnum,
- sim_ppc_spr822_regnum, sim_ppc_spr823_regnum,
- sim_ppc_spr824_regnum, sim_ppc_spr825_regnum,
- sim_ppc_spr826_regnum, sim_ppc_spr827_regnum,
- sim_ppc_spr828_regnum, sim_ppc_spr829_regnum,
- sim_ppc_spr830_regnum, sim_ppc_spr831_regnum,
- sim_ppc_spr832_regnum, sim_ppc_spr833_regnum,
- sim_ppc_spr834_regnum, sim_ppc_spr835_regnum,
- sim_ppc_spr836_regnum, sim_ppc_spr837_regnum,
- sim_ppc_spr838_regnum, sim_ppc_spr839_regnum,
- sim_ppc_spr840_regnum, sim_ppc_spr841_regnum,
- sim_ppc_spr842_regnum, sim_ppc_spr843_regnum,
- sim_ppc_spr844_regnum, sim_ppc_spr845_regnum,
- sim_ppc_spr846_regnum, sim_ppc_spr847_regnum,
- sim_ppc_spr848_regnum, sim_ppc_spr849_regnum,
- sim_ppc_spr850_regnum, sim_ppc_spr851_regnum,
- sim_ppc_spr852_regnum, sim_ppc_spr853_regnum,
- sim_ppc_spr854_regnum, sim_ppc_spr855_regnum,
- sim_ppc_spr856_regnum, sim_ppc_spr857_regnum,
- sim_ppc_spr858_regnum, sim_ppc_spr859_regnum,
- sim_ppc_spr860_regnum, sim_ppc_spr861_regnum,
- sim_ppc_spr862_regnum, sim_ppc_spr863_regnum,
- sim_ppc_spr864_regnum, sim_ppc_spr865_regnum,
- sim_ppc_spr866_regnum, sim_ppc_spr867_regnum,
- sim_ppc_spr868_regnum, sim_ppc_spr869_regnum,
- sim_ppc_spr870_regnum, sim_ppc_spr871_regnum,
- sim_ppc_spr872_regnum, sim_ppc_spr873_regnum,
- sim_ppc_spr874_regnum, sim_ppc_spr875_regnum,
- sim_ppc_spr876_regnum, sim_ppc_spr877_regnum,
- sim_ppc_spr878_regnum, sim_ppc_spr879_regnum,
- sim_ppc_spr880_regnum, sim_ppc_spr881_regnum,
- sim_ppc_spr882_regnum, sim_ppc_spr883_regnum,
- sim_ppc_spr884_regnum, sim_ppc_spr885_regnum,
- sim_ppc_spr886_regnum, sim_ppc_spr887_regnum,
- sim_ppc_spr888_regnum, sim_ppc_spr889_regnum,
- sim_ppc_spr890_regnum, sim_ppc_spr891_regnum,
- sim_ppc_spr892_regnum, sim_ppc_spr893_regnum,
- sim_ppc_spr894_regnum, sim_ppc_spr895_regnum,
- sim_ppc_spr896_regnum, sim_ppc_spr897_regnum,
- sim_ppc_spr898_regnum, sim_ppc_spr899_regnum,
- sim_ppc_spr900_regnum, sim_ppc_spr901_regnum,
- sim_ppc_spr902_regnum, sim_ppc_spr903_regnum,
- sim_ppc_spr904_regnum, sim_ppc_spr905_regnum,
- sim_ppc_spr906_regnum, sim_ppc_spr907_regnum,
- sim_ppc_spr908_regnum, sim_ppc_spr909_regnum,
- sim_ppc_spr910_regnum, sim_ppc_spr911_regnum,
- sim_ppc_spr912_regnum, sim_ppc_spr913_regnum,
- sim_ppc_spr914_regnum, sim_ppc_spr915_regnum,
- sim_ppc_spr916_regnum, sim_ppc_spr917_regnum,
- sim_ppc_spr918_regnum, sim_ppc_spr919_regnum,
- sim_ppc_spr920_regnum, sim_ppc_spr921_regnum,
- sim_ppc_spr922_regnum, sim_ppc_spr923_regnum,
- sim_ppc_spr924_regnum, sim_ppc_spr925_regnum,
- sim_ppc_spr926_regnum, sim_ppc_spr927_regnum,
- sim_ppc_spr928_regnum, sim_ppc_spr929_regnum,
- sim_ppc_spr930_regnum, sim_ppc_spr931_regnum,
- sim_ppc_spr932_regnum, sim_ppc_spr933_regnum,
- sim_ppc_spr934_regnum, sim_ppc_spr935_regnum,
- sim_ppc_spr936_regnum, sim_ppc_spr937_regnum,
- sim_ppc_spr938_regnum, sim_ppc_spr939_regnum,
- sim_ppc_spr940_regnum, sim_ppc_spr941_regnum,
- sim_ppc_spr942_regnum, sim_ppc_spr943_regnum,
- sim_ppc_spr944_regnum, sim_ppc_spr945_regnum,
- sim_ppc_spr946_regnum, sim_ppc_spr947_regnum,
- sim_ppc_spr948_regnum, sim_ppc_spr949_regnum,
- sim_ppc_spr950_regnum, sim_ppc_spr951_regnum,
- sim_ppc_spr952_regnum, sim_ppc_spr953_regnum,
- sim_ppc_spr954_regnum, sim_ppc_spr955_regnum,
- sim_ppc_spr956_regnum, sim_ppc_spr957_regnum,
- sim_ppc_spr958_regnum, sim_ppc_spr959_regnum,
- sim_ppc_spr960_regnum, sim_ppc_spr961_regnum,
- sim_ppc_spr962_regnum, sim_ppc_spr963_regnum,
- sim_ppc_spr964_regnum, sim_ppc_spr965_regnum,
- sim_ppc_spr966_regnum, sim_ppc_spr967_regnum,
- sim_ppc_spr968_regnum, sim_ppc_spr969_regnum,
- sim_ppc_spr970_regnum, sim_ppc_spr971_regnum,
- sim_ppc_spr972_regnum, sim_ppc_spr973_regnum,
- sim_ppc_spr974_regnum, sim_ppc_spr975_regnum,
- sim_ppc_spr976_regnum, sim_ppc_spr977_regnum,
- sim_ppc_spr978_regnum, sim_ppc_spr979_regnum,
- sim_ppc_spr980_regnum, sim_ppc_spr981_regnum,
- sim_ppc_spr982_regnum, sim_ppc_spr983_regnum,
- sim_ppc_spr984_regnum, sim_ppc_spr985_regnum,
- sim_ppc_spr986_regnum, sim_ppc_spr987_regnum,
- sim_ppc_spr988_regnum, sim_ppc_spr989_regnum,
- sim_ppc_spr990_regnum, sim_ppc_spr991_regnum,
- sim_ppc_spr992_regnum, sim_ppc_spr993_regnum,
- sim_ppc_spr994_regnum, sim_ppc_spr995_regnum,
- sim_ppc_spr996_regnum, sim_ppc_spr997_regnum,
- sim_ppc_spr998_regnum, sim_ppc_spr999_regnum,
- sim_ppc_spr1000_regnum, sim_ppc_spr1001_regnum,
- sim_ppc_spr1002_regnum, sim_ppc_spr1003_regnum,
- sim_ppc_spr1004_regnum, sim_ppc_spr1005_regnum,
- sim_ppc_spr1006_regnum, sim_ppc_spr1007_regnum,
- sim_ppc_spr1008_regnum, sim_ppc_spr1009_regnum,
- sim_ppc_spr1010_regnum, sim_ppc_spr1011_regnum,
- sim_ppc_spr1012_regnum, sim_ppc_spr1013_regnum,
- sim_ppc_spr1014_regnum, sim_ppc_spr1015_regnum,
- sim_ppc_spr1016_regnum, sim_ppc_spr1017_regnum,
- sim_ppc_spr1018_regnum, sim_ppc_spr1019_regnum,
- sim_ppc_spr1020_regnum, sim_ppc_spr1021_regnum,
- sim_ppc_spr1022_regnum, sim_ppc_spr1023_regnum
- };
-
-
-/* Sizes of various register sets. */
-enum
- {
- sim_ppc_num_gprs = 32,
- sim_ppc_num_fprs = 32,
- sim_ppc_num_vrs = 32,
- sim_ppc_num_srs = 16,
- sim_ppc_num_sprs = 1024,
- };
-
-
-/* Return the register name for the supplied SPR number if any, or
- NULL if none. */
-extern const char *sim_spr_register_name (int);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* SIM_PPC_H */
diff --git a/include/gdb/sim-sh.h b/include/gdb/sim-sh.h
deleted file mode 100644
index 0c2b6fa..0000000
--- a/include/gdb/sim-sh.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/* This file defines the interface between the sh simulator and gdb.
- Copyright (C) 2000, 2002, 2004, 2007, 2008 Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#if !defined (SIM_SH_H)
-#define SIM_SH_H
-
-#ifdef __cplusplus
-extern "C" { // }
-#endif
-
-/* The simulator makes use of the following register information. */
-
-enum
-{
- SIM_SH_R0_REGNUM = 0,
- SIM_SH_R1_REGNUM,
- SIM_SH_R2_REGNUM,
- SIM_SH_R3_REGNUM,
- SIM_SH_R4_REGNUM,
- SIM_SH_R5_REGNUM,
- SIM_SH_R6_REGNUM,
- SIM_SH_R7_REGNUM,
- SIM_SH_R8_REGNUM,
- SIM_SH_R9_REGNUM,
- SIM_SH_R10_REGNUM,
- SIM_SH_R11_REGNUM,
- SIM_SH_R12_REGNUM,
- SIM_SH_R13_REGNUM,
- SIM_SH_R14_REGNUM,
- SIM_SH_R15_REGNUM,
- SIM_SH_PC_REGNUM,
- SIM_SH_PR_REGNUM,
- SIM_SH_GBR_REGNUM,
- SIM_SH_VBR_REGNUM,
- SIM_SH_MACH_REGNUM,
- SIM_SH_MACL_REGNUM,
- SIM_SH_SR_REGNUM,
- SIM_SH_FPUL_REGNUM,
- SIM_SH_FPSCR_REGNUM,
- SIM_SH_FR0_REGNUM, /* FRn registers: sh3e / sh4 */
- SIM_SH_FR1_REGNUM,
- SIM_SH_FR2_REGNUM,
- SIM_SH_FR3_REGNUM,
- SIM_SH_FR4_REGNUM,
- SIM_SH_FR5_REGNUM,
- SIM_SH_FR6_REGNUM,
- SIM_SH_FR7_REGNUM,
- SIM_SH_FR8_REGNUM,
- SIM_SH_FR9_REGNUM,
- SIM_SH_FR10_REGNUM,
- SIM_SH_FR11_REGNUM,
- SIM_SH_FR12_REGNUM,
- SIM_SH_FR13_REGNUM,
- SIM_SH_FR14_REGNUM,
- SIM_SH_FR15_REGNUM,
- SIM_SH_SSR_REGNUM, /* sh3{,e,-dsp}, sh4 */
- SIM_SH_SPC_REGNUM, /* sh3{,e,-dsp}, sh4 */
- SIM_SH_R0_BANK0_REGNUM, /* SIM_SH_Rn_BANKm_REGNUM: sh3[e] / sh4 */
- SIM_SH_R1_BANK0_REGNUM,
- SIM_SH_R2_BANK0_REGNUM,
- SIM_SH_R3_BANK0_REGNUM,
- SIM_SH_R4_BANK0_REGNUM,
- SIM_SH_R5_BANK0_REGNUM,
- SIM_SH_R6_BANK0_REGNUM,
- SIM_SH_R7_BANK0_REGNUM,
- SIM_SH_R0_BANK1_REGNUM,
- SIM_SH_R1_BANK1_REGNUM,
- SIM_SH_R2_BANK1_REGNUM,
- SIM_SH_R3_BANK1_REGNUM,
- SIM_SH_R4_BANK1_REGNUM,
- SIM_SH_R5_BANK1_REGNUM,
- SIM_SH_R6_BANK1_REGNUM,
- SIM_SH_R7_BANK1_REGNUM,
- SIM_SH_XF0_REGNUM,
- SIM_SH_XF1_REGNUM,
- SIM_SH_XF2_REGNUM,
- SIM_SH_XF3_REGNUM,
- SIM_SH_XF4_REGNUM,
- SIM_SH_XF5_REGNUM,
- SIM_SH_XF6_REGNUM,
- SIM_SH_XF7_REGNUM,
- SIM_SH_XF8_REGNUM,
- SIM_SH_XF9_REGNUM,
- SIM_SH_XF10_REGNUM,
- SIM_SH_XF11_REGNUM,
- SIM_SH_XF12_REGNUM,
- SIM_SH_XF13_REGNUM,
- SIM_SH_XF14_REGNUM,
- SIM_SH_XF15_REGNUM,
- SIM_SH_SGR_REGNUM,
- SIM_SH_DBR_REGNUM,
- SIM_SH4_NUM_REGS, /* 77 */
-
- /* sh[3]-dsp */
- SIM_SH_DSR_REGNUM,
- SIM_SH_A0G_REGNUM,
- SIM_SH_A0_REGNUM,
- SIM_SH_A1G_REGNUM,
- SIM_SH_A1_REGNUM,
- SIM_SH_M0_REGNUM,
- SIM_SH_M1_REGNUM,
- SIM_SH_X0_REGNUM,
- SIM_SH_X1_REGNUM,
- SIM_SH_Y0_REGNUM,
- SIM_SH_Y1_REGNUM,
- SIM_SH_MOD_REGNUM,
- SIM_SH_RS_REGNUM,
- SIM_SH_RE_REGNUM,
- SIM_SH_R0_BANK_REGNUM,
- SIM_SH_R1_BANK_REGNUM,
- SIM_SH_R2_BANK_REGNUM,
- SIM_SH_R3_BANK_REGNUM,
- SIM_SH_R4_BANK_REGNUM,
- SIM_SH_R5_BANK_REGNUM,
- SIM_SH_R6_BANK_REGNUM,
- SIM_SH_R7_BANK_REGNUM,
- /* 109..127: room for expansion. */
- SIM_SH_TBR_REGNUM,
- SIM_SH_IBNR_REGNUM,
- SIM_SH_IBCR_REGNUM,
- SIM_SH_BANK_REGNUM,
- SIM_SH_BANK_MACL_REGNUM,
- SIM_SH_BANK_GBR_REGNUM,
- SIM_SH_BANK_PR_REGNUM,
- SIM_SH_BANK_IVN_REGNUM,
- SIM_SH_BANK_MACH_REGNUM
-};
-
-enum
-{
- SIM_SH64_R0_REGNUM = 0,
- SIM_SH64_SP_REGNUM = 15,
- SIM_SH64_PC_REGNUM = 64,
- SIM_SH64_SR_REGNUM = 65,
- SIM_SH64_SSR_REGNUM = 66,
- SIM_SH64_SPC_REGNUM = 67,
- SIM_SH64_TR0_REGNUM = 68,
- SIM_SH64_FPCSR_REGNUM = 76,
- SIM_SH64_FR0_REGNUM = 77
-};
-
-enum
-{
- SIM_SH64_NR_REGS = 141, /* total number of architectural registers */
- SIM_SH64_NR_R_REGS = 64, /* number of general registers */
- SIM_SH64_NR_TR_REGS = 8, /* number of target registers */
- SIM_SH64_NR_FP_REGS = 64 /* number of floating point registers */
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/gdbm.h b/include/gdbm.h
deleted file mode 100644
index d2a6006..0000000
--- a/include/gdbm.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* GNU DBM - DataBase Manager include file
- Copyright 1989, 1991 Free Software Foundation, Inc.
- Written by Philip A. Nelson.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* You may contact the author by:
- e-mail: phil@wwu.edu
- us-mail: Philip A. Nelson
- Computer Science Department
- Western Washington University
- Bellingham, WA 98226
- phone: (206) 676-3035
-
-*************************************************************************/
-
-/* Parameters to gdbm_open for READERS, WRITERS, and WRITERS who
- can create the database. */
-#define GDBM_READER 0
-#define GDBM_WRITER 1
-#define GDBM_WRCREAT 2
-#define GDBM_NEWDB 3
-
-/* Parameters to gdbm_store for simple insertion or replacement. */
-#define GDBM_INSERT 0
-#define GDBM_REPLACE 1
-
-
-/* The data and key structure. This structure is defined for compatibility. */
-typedef struct {
- char *dptr;
- int dsize;
- } datum;
-
-
-/* The file information header. This is good enough for most applications. */
-typedef struct {int dummy[10];} *GDBM_FILE;
-
-
-/* These are the routines! */
-
-extern GDBM_FILE gdbm_open ();
-
-extern void gdbm_close ();
-
-extern datum gdbm_fetch ();
-
-extern int gdbm_store ();
-
-extern int gdbm_delete ();
-
-extern datum gdbm_firstkey ();
-
-extern datum gdbm_nextkey ();
-
-extern int gdbm_reorganize ();
-
-
-/* gdbm sends back the following error codes in the variable gdbm_errno. */
-typedef enum { NO_ERROR,
- MALLOC_ERROR,
- BLOCK_SIZE_ERROR,
- FILE_OPEN_ERROR,
- FILE_WRITE_ERROR,
- FILE_SEEK_ERROR,
- FILE_READ_ERROR,
- BAD_MAGIC_NUMBER,
- EMPTY_DATABASE,
- CANT_BE_READER,
- CANT_BE_WRITER,
- READER_CANT_RECOVER,
- READER_CANT_DELETE,
- READER_CANT_STORE,
- READER_CANT_REORGANIZE,
- UNKNOWN_UPDATE,
- ITEM_NOT_FOUND,
- REORGANIZE_FAILED,
- CANNOT_REPLACE}
- gdbm_error;
diff --git a/include/getopt.h b/include/getopt.h
deleted file mode 100644
index 5421cab..0000000
--- a/include/getopt.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/* Declarations for getopt.
- Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, 2000,
- 2002 Free Software Foundation, Inc.
-
- NOTE: The canonical source of this file is maintained with the GNU C Library.
- Bugs can be reported to bug-glibc@gnu.org.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
- USA. */
-
-#ifndef _GETOPT_H
-#define _GETOPT_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* For communication from `getopt' to the caller.
- When `getopt' finds an option that takes an argument,
- the argument value is returned here.
- Also, when `ordering' is RETURN_IN_ORDER,
- each non-option ARGV-element is returned here. */
-
-extern char *optarg;
-
-/* Index in ARGV of the next element to be scanned.
- This is used for communication to and from the caller
- and for communication between successive calls to `getopt'.
-
- On entry to `getopt', zero means this is the first call; initialize.
-
- When `getopt' returns -1, this is the index of the first of the
- non-option elements that the caller should itself scan.
-
- Otherwise, `optind' communicates from one call to the next
- how much of ARGV has been scanned so far. */
-
-extern int optind;
-
-/* Callers store zero here to inhibit the error message `getopt' prints
- for unrecognized options. */
-
-extern int opterr;
-
-/* Set to an option character which was unrecognized. */
-
-extern int optopt;
-
-/* Describe the long-named options requested by the application.
- The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
- of `struct option' terminated by an element containing a name which is
- zero.
-
- The field `has_arg' is:
- no_argument (or 0) if the option does not take an argument,
- required_argument (or 1) if the option requires an argument,
- optional_argument (or 2) if the option takes an optional argument.
-
- If the field `flag' is not NULL, it points to a variable that is set
- to the value given in the field `val' when the option is found, but
- left unchanged if the option is not found.
-
- To have a long-named option do something other than set an `int' to
- a compiled-in constant, such as set a value from `optarg', set the
- option's `flag' field to zero and its `val' field to a nonzero
- value (the equivalent single-letter option character, if there is
- one). For long options that have a zero `flag' field, `getopt'
- returns the contents of the `val' field. */
-
-struct option
-{
-#if defined (__STDC__) && __STDC__
- const char *name;
-#else
- char *name;
-#endif
- /* has_arg can't be an enum because some compilers complain about
- type mismatches in all the code that assumes it is an int. */
- int has_arg;
- int *flag;
- int val;
-};
-
-/* Names for the values of the `has_arg' field of `struct option'. */
-
-#define no_argument 0
-#define required_argument 1
-#define optional_argument 2
-
-#if defined (__STDC__) && __STDC__
-/* HAVE_DECL_* is a three-state macro: undefined, 0 or 1. If it is
- undefined, we haven't run the autoconf check so provide the
- declaration without arguments. If it is 0, we checked and failed
- to find the declaration so provide a fully prototyped one. If it
- is 1, we found it so don't provide any declaration at all. */
-#if !HAVE_DECL_GETOPT
-#if defined (__GNU_LIBRARY__) || defined (HAVE_DECL_GETOPT)
-/* Many other libraries have conflicting prototypes for getopt, with
- differences in the consts, in unistd.h. To avoid compilation
- errors, only prototype getopt for the GNU C library. */
-extern int getopt (int argc, char *const *argv, const char *shortopts);
-#else
-#ifndef __cplusplus
-extern int getopt ();
-#endif /* __cplusplus */
-#endif
-#endif /* !HAVE_DECL_GETOPT */
-
-extern int getopt_long (int argc, char *const *argv, const char *shortopts,
- const struct option *longopts, int *longind);
-extern int getopt_long_only (int argc, char *const *argv,
- const char *shortopts,
- const struct option *longopts, int *longind);
-
-/* Internal only. Users should not call this directly. */
-extern int _getopt_internal (int argc, char *const *argv,
- const char *shortopts,
- const struct option *longopts, int *longind,
- int long_only);
-#else /* not __STDC__ */
-extern int getopt ();
-extern int getopt_long ();
-extern int getopt_long_only ();
-
-extern int _getopt_internal ();
-#endif /* __STDC__ */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* getopt.h */
diff --git a/include/hashtab.h b/include/hashtab.h
deleted file mode 100644
index 77eee14..0000000
--- a/include/hashtab.h
+++ /dev/null
@@ -1,206 +0,0 @@
-/* An expandable hash tables datatype.
- Copyright (C) 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
- Contributed by Vladimir Makarov (vmakarov@cygnus.com).
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* This package implements basic hash table functionality. It is possible
- to search for an entry, create an entry and destroy an entry.
-
- Elements in the table are generic pointers.
-
- The size of the table is not fixed; if the occupancy of the table
- grows too high the hash table will be expanded.
-
- The abstract data implementation is based on generalized Algorithm D
- from Knuth's book "The art of computer programming". Hash table is
- expanded by creation of new hash table and transferring elements from
- the old table to the new table. */
-
-#ifndef __HASHTAB_H__
-#define __HASHTAB_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include "ansidecl.h"
-
-#ifndef GTY
-#define GTY(X)
-#endif
-
-/* The type for a hash code. */
-typedef unsigned int hashval_t;
-
-/* Callback function pointer types. */
-
-/* Calculate hash of a table entry. */
-typedef hashval_t (*htab_hash) (const void *);
-
-/* Compare a table entry with a possible entry. The entry already in
- the table always comes first, so the second element can be of a
- different type (but in this case htab_find and htab_find_slot
- cannot be used; instead the variants that accept a hash value
- must be used). */
-typedef int (*htab_eq) (const void *, const void *);
-
-/* Cleanup function called whenever a live element is removed from
- the hash table. */
-typedef void (*htab_del) (void *);
-
-/* Function called by htab_traverse for each live element. The first
- arg is the slot of the element (which can be passed to htab_clear_slot
- if desired), the second arg is the auxiliary pointer handed to
- htab_traverse. Return 1 to continue scan, 0 to stop. */
-typedef int (*htab_trav) (void **, void *);
-
-/* Memory-allocation function, with the same functionality as calloc().
- Iff it returns NULL, the hash table implementation will pass an error
- code back to the user, so if your code doesn't handle errors,
- best if you use xcalloc instead. */
-typedef void *(*htab_alloc) (size_t, size_t);
-
-/* We also need a free() routine. */
-typedef void (*htab_free) (void *);
-
-/* Memory allocation and deallocation; variants which take an extra
- argument. */
-typedef void *(*htab_alloc_with_arg) (void *, size_t, size_t);
-typedef void (*htab_free_with_arg) (void *, void *);
-
-/* This macro defines reserved value for empty table entry. */
-
-#define HTAB_EMPTY_ENTRY ((PTR) 0)
-
-/* This macro defines reserved value for table entry which contained
- a deleted element. */
-
-#define HTAB_DELETED_ENTRY ((PTR) 1)
-
-/* Hash tables are of the following type. The structure
- (implementation) of this type is not needed for using the hash
- tables. All work with hash table should be executed only through
- functions mentioned below. The size of this structure is subject to
- change. */
-
-struct htab GTY(())
-{
- /* Pointer to hash function. */
- htab_hash hash_f;
-
- /* Pointer to comparison function. */
- htab_eq eq_f;
-
- /* Pointer to cleanup function. */
- htab_del del_f;
-
- /* Table itself. */
- void ** GTY ((use_param, length ("%h.size"))) entries;
-
- /* Current size (in entries) of the hash table. */
- size_t size;
-
- /* Current number of elements including also deleted elements. */
- size_t n_elements;
-
- /* Current number of deleted elements in the table. */
- size_t n_deleted;
-
- /* The following member is used for debugging. Its value is number
- of all calls of `htab_find_slot' for the hash table. */
- unsigned int searches;
-
- /* The following member is used for debugging. Its value is number
- of collisions fixed for time of work with the hash table. */
- unsigned int collisions;
-
- /* Pointers to allocate/free functions. */
- htab_alloc alloc_f;
- htab_free free_f;
-
- /* Alternate allocate/free functions, which take an extra argument. */
- void * GTY((skip)) alloc_arg;
- htab_alloc_with_arg alloc_with_arg_f;
- htab_free_with_arg free_with_arg_f;
-
- /* Current size (in entries) of the hash table, as an index into the
- table of primes. */
- unsigned int size_prime_index;
-};
-
-typedef struct htab *htab_t;
-
-/* An enum saying whether we insert into the hash table or not. */
-enum insert_option {NO_INSERT, INSERT};
-
-/* The prototypes of the package functions. */
-
-extern htab_t htab_create_alloc (size_t, htab_hash,
- htab_eq, htab_del,
- htab_alloc, htab_free);
-
-extern htab_t htab_create_alloc_ex (size_t, htab_hash,
- htab_eq, htab_del,
- void *, htab_alloc_with_arg,
- htab_free_with_arg);
-
-/* Backward-compatibility functions. */
-extern htab_t htab_create (size_t, htab_hash, htab_eq, htab_del);
-extern htab_t htab_try_create (size_t, htab_hash, htab_eq, htab_del);
-
-extern void htab_set_functions_ex (htab_t, htab_hash,
- htab_eq, htab_del,
- void *, htab_alloc_with_arg,
- htab_free_with_arg);
-
-extern void htab_delete (htab_t);
-extern void htab_empty (htab_t);
-
-extern void * htab_find (htab_t, const void *);
-extern void ** htab_find_slot (htab_t, const void *, enum insert_option);
-extern void * htab_find_with_hash (htab_t, const void *, hashval_t);
-extern void ** htab_find_slot_with_hash (htab_t, const void *,
- hashval_t, enum insert_option);
-extern void htab_clear_slot (htab_t, void **);
-extern void htab_remove_elt (htab_t, void *);
-extern void htab_remove_elt_with_hash (htab_t, void *, hashval_t);
-
-extern void htab_traverse (htab_t, htab_trav, void *);
-extern void htab_traverse_noresize (htab_t, htab_trav, void *);
-
-extern size_t htab_size (htab_t);
-extern size_t htab_elements (htab_t);
-extern double htab_collisions (htab_t);
-
-/* A hash function for pointers. */
-extern htab_hash htab_hash_pointer;
-
-/* An equality function for pointers. */
-extern htab_eq htab_eq_pointer;
-
-/* A hash function for null-terminated strings. */
-extern hashval_t htab_hash_string (const void *);
-
-/* An iterative hash function for arbitrary data. */
-extern hashval_t iterative_hash (const void *, size_t, hashval_t);
-/* Shorthand for hashing something with an intrinsic size. */
-#define iterative_hash_object(OB,INIT) iterative_hash (&OB, sizeof (OB), INIT)
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __HASHTAB_H */
diff --git a/include/hp-symtab.h b/include/hp-symtab.h
deleted file mode 100644
index 361473f..0000000
--- a/include/hp-symtab.h
+++ /dev/null
@@ -1,1866 +0,0 @@
-/* Definitions and structures for reading debug symbols from the
- native HP C compiler.
-
- Written by the Center for Software Science at the University of Utah
- and by Cygnus Support.
-
- Copyright 1994, 1995, 1998, 1999, 2003 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef HP_SYMTAB_INCLUDED
-#define HP_SYMTAB_INCLUDED
-
-/* General information:
-
- This header file defines and describes only the data structures
- necessary to read debug symbols produced by the HP C compiler,
- HP ANSI C++ compiler, and HP FORTRAN 90 compiler using the
- SOM object file format.
- (For a full description of the debug format, ftp hpux-symtab.h from
- jaguar.cs.utah.edu:/dist).
-
- Additional notes (Rich Title)
- This file is a reverse-engineered version of a file called
- "symtab.h" which exists internal to HP's Computer Languages Organization
- in /CLO/Components/DDE/obj/som/symtab.h. Because HP's version of
- the file is copyrighted and not distributed, it is necessary for
- GDB to use the reverse-engineered version that follows.
- Work was done by Cygnus to reverse-engineer the C subset of symtab.h.
- The WDB project has extended this to also contain the C++
- symbol definitions, the F90 symbol definitions,
- and the DOC (debugging-optimized-code) symbol definitions.
- In some cases (the C++ symbol definitions)
- I have added internal documentation here that
- goes beyond what is supplied in HP's symtab.h. If we someday
- unify these files again, the extra comments should be merged back
- into HP's symtab.h.
-
- -------------------------------------------------------------------
-
- Debug symbols are contained entirely within an unloadable space called
- $DEBUG$. $DEBUG$ contains several subspaces which group related
- debug symbols.
-
- $GNTT$ contains information for global variables, types and contants.
-
- $LNTT$ contains information for procedures (including nesting), scoping
- information, local variables, types, and constants.
-
- $SLT$ contains source line information so that code addresses may be
- mapped to source lines.
-
- $VT$ contains various strings and constants for named objects (variables,
- typedefs, functions, etc). Strings are stored as null-terminated character
- lists. Constants always begin on word boundaries. The first byte of
- the VT must be zero (a null string).
-
- $XT$ is not currently used by GDB.
-
- Many structures within the subspaces point to other structures within
- the same subspace, or to structures within a different subspace. These
- pointers are represented as a structure index from the beginning of
- the appropriate subspace. */
-
-/* Used to describe where a constant is stored. */
-enum location_type
-{
- LOCATION_IMMEDIATE,
- LOCATION_PTR,
- LOCATION_VT,
-};
-
-/* Languages supported by this debug format. Within the data structures
- this type is limited to 4 bits for a maximum of 16 languages. */
-enum hp_language
-{
- HP_LANGUAGE_UNKNOWN,
- HP_LANGUAGE_C,
- HP_LANGUAGE_FORTRAN,
- HP_LANGUAGE_F77 = HP_LANGUAGE_FORTRAN,
- HP_LANGUAGE_PASCAL,
- HP_LANGUAGE_MODCAL,
- HP_LANGUAGE_COBOL,
- HP_LANGUAGE_BASIC,
- HP_LANGUAGE_ADA,
- HP_LANGUAGE_CPLUSPLUS,
- HP_LANGUAGE_DMPASCAL
-};
-
-
-/* Basic data types available in this debug format. Within the data
- structures this type is limited to 5 bits for a maximum of 32 basic
- data types. */
-enum hp_type
-{
- HP_TYPE_UNDEFINED, /* 0 */
- HP_TYPE_BOOLEAN, /* 1 */
- HP_TYPE_CHAR, /* 2 */
- HP_TYPE_INT, /* 3 */
- HP_TYPE_UNSIGNED_INT, /* 4 */
- HP_TYPE_REAL, /* 5 */
- HP_TYPE_COMPLEX, /* 6 */
- HP_TYPE_STRING200, /* 7 */
- HP_TYPE_LONGSTRING200, /* 8 */
- HP_TYPE_TEXT, /* 9 */
- HP_TYPE_FLABEL, /* 10 */
- HP_TYPE_FTN_STRING_SPEC, /* 11 */
- HP_TYPE_MOD_STRING_SPEC, /* 12 */
- HP_TYPE_PACKED_DECIMAL, /* 13 */
- HP_TYPE_REAL_3000, /* 14 */
- HP_TYPE_MOD_STRING_3000, /* 15 */
- HP_TYPE_ANYPOINTER, /* 16 */
- HP_TYPE_GLOBAL_ANYPOINTER, /* 17 */
- HP_TYPE_LOCAL_ANYPOINTER, /* 18 */
- HP_TYPE_COMPLEXS3000, /* 19 */
- HP_TYPE_FTN_STRING_S300_COMPAT, /* 20 */
- HP_TYPE_FTN_STRING_VAX_COMPAT, /* 21 */
- HP_TYPE_BOOLEAN_S300_COMPAT, /* 22 */
- HP_TYPE_BOOLEAN_VAX_COMPAT, /* 23 */
- HP_TYPE_WIDE_CHAR, /* 24 */
- HP_TYPE_LONG, /* 25 */
- HP_TYPE_UNSIGNED_LONG, /* 26 */
- HP_TYPE_DOUBLE, /* 27 */
- HP_TYPE_TEMPLATE_ARG, /* 28 */
- HP_TYPE_VOID /* 29 */
-};
-
-/* An immediate name and type table entry.
-
- extension and immediate will always be one.
- global will always be zero.
- hp_type is the basic type this entry describes.
- bitlength is the length in bits for the basic type. */
-struct dnttp_immediate
-{
- unsigned int extension: 1;
- unsigned int immediate: 1;
- unsigned int global: 1;
- unsigned int type: 5;
- unsigned int bitlength: 24;
-};
-
-/* A nonimmediate name and type table entry.
-
- extension will always be one.
- immediate will always be zero.
- if global is zero, this entry points into the LNTT
- if global is one, this entry points into the GNTT
- index is the index within the GNTT or LNTT for this entry. */
-struct dnttp_nonimmediate
-{
- unsigned int extension: 1;
- unsigned int immediate: 1;
- unsigned int global: 1;
- unsigned int index: 29;
-};
-
-/* A pointer to an entry in the GNTT and LNTT tables. It has two
- forms depending on the type being described.
-
- The immediate form is used for simple entries and is one
- word.
-
- The nonimmediate form is used for complex entries and contains
- an index into the LNTT or GNTT which describes the entire type.
-
- If a dnttpointer is -1, then it is a NIL entry. */
-
-#define DNTTNIL (-1)
-typedef union dnttpointer
-{
- struct dnttp_immediate dntti;
- struct dnttp_nonimmediate dnttp;
- int word;
-} dnttpointer;
-
-/* An index into the source line table. As with dnttpointers, a sltpointer
- of -1 indicates a NIL entry. */
-#define SLTNIL (-1)
-typedef int sltpointer;
-
-/* Index into DOC (= "Debugging Optimized Code") line table. */
-#define LTNIL (-1)
-typedef int ltpointer;
-
-/* Index into context table. */
-#define CTXTNIL (-1)
-typedef int ctxtpointer;
-
-/* Unsigned byte offset into the VT. */
-typedef unsigned int vtpointer;
-
-/* A DNTT entry (used within the GNTT and LNTT).
-
- DNTT entries are variable sized objects, but are always a multiple
- of 3 words (we call each group of 3 words a "block").
-
- The first bit in each block is an extension bit. This bit is zero
- for the first block of a DNTT entry. If the entry requires more
- than one block, then this bit is set to one in all blocks after
- the first one. */
-
-/* Each DNTT entry describes a particular debug symbol (beginning of
- a source file, a function, variables, structures, etc.
-
- The type of the DNTT entry is stored in the "kind" field within the
- DNTT entry itself. */
-
-enum dntt_entry_type
-{
- DNTT_TYPE_NIL = -1,
- DNTT_TYPE_SRCFILE,
- DNTT_TYPE_MODULE,
- DNTT_TYPE_FUNCTION,
- DNTT_TYPE_ENTRY,
- DNTT_TYPE_BEGIN,
- DNTT_TYPE_END,
- DNTT_TYPE_IMPORT,
- DNTT_TYPE_LABEL,
- DNTT_TYPE_FPARAM,
- DNTT_TYPE_SVAR,
- DNTT_TYPE_DVAR,
- DNTT_TYPE_HOLE1,
- DNTT_TYPE_CONST,
- DNTT_TYPE_TYPEDEF,
- DNTT_TYPE_TAGDEF,
- DNTT_TYPE_POINTER,
- DNTT_TYPE_ENUM,
- DNTT_TYPE_MEMENUM,
- DNTT_TYPE_SET,
- DNTT_TYPE_SUBRANGE,
- DNTT_TYPE_ARRAY,
- DNTT_TYPE_STRUCT,
- DNTT_TYPE_UNION,
- DNTT_TYPE_FIELD,
- DNTT_TYPE_VARIANT,
- DNTT_TYPE_FILE,
- DNTT_TYPE_FUNCTYPE,
- DNTT_TYPE_WITH,
- DNTT_TYPE_COMMON,
- DNTT_TYPE_COBSTRUCT,
- DNTT_TYPE_XREF,
- DNTT_TYPE_SA,
- DNTT_TYPE_MACRO,
- DNTT_TYPE_BLOCKDATA,
- DNTT_TYPE_CLASS_SCOPE,
- DNTT_TYPE_REFERENCE,
- DNTT_TYPE_PTRMEM,
- DNTT_TYPE_PTRMEMFUNC,
- DNTT_TYPE_CLASS,
- DNTT_TYPE_GENFIELD,
- DNTT_TYPE_VFUNC,
- DNTT_TYPE_MEMACCESS,
- DNTT_TYPE_INHERITANCE,
- DNTT_TYPE_FRIEND_CLASS,
- DNTT_TYPE_FRIEND_FUNC,
- DNTT_TYPE_MODIFIER,
- DNTT_TYPE_OBJECT_ID,
- DNTT_TYPE_MEMFUNC,
- DNTT_TYPE_TEMPLATE,
- DNTT_TYPE_TEMPLATE_ARG,
- DNTT_TYPE_FUNC_TEMPLATE,
- DNTT_TYPE_LINK,
- DNTT_TYPE_DYN_ARRAY_DESC,
- DNTT_TYPE_DESC_SUBRANGE,
- DNTT_TYPE_BEGIN_EXT,
- DNTT_TYPE_INLN,
- DNTT_TYPE_INLN_LIST,
- DNTT_TYPE_ALIAS,
- DNTT_TYPE_DOC_FUNCTION,
- DNTT_TYPE_DOC_MEMFUNC,
- DNTT_TYPE_MAX
-};
-
-/* DNTT_TYPE_SRCFILE:
-
- One DNTT_TYPE_SRCFILE symbol is output for the start of each source
- file and at the begin and end of an included file. A DNTT_TYPE_SRCFILE
- entry is also output before each DNTT_TYPE_FUNC symbol so that debuggers
- can determine what file a function was defined in.
-
- LANGUAGE describes the source file's language.
-
- NAME points to an VT entry providing the source file's name.
-
- Note the name used for DNTT_TYPE_SRCFILE entries are exactly as seen
- by the compiler (ie they may be relative or absolute). C include files
- via <> inclusion must use absolute paths.
-
- ADDRESS points to an SLT entry from which line number and code locations
- may be determined. */
-
-struct dntt_type_srcfile
-{
- unsigned int extension: 1;
- unsigned int kind: 10; /* DNTT_TYPE_SRCFILE */
- unsigned int language: 4;
- unsigned int unused: 17;
- vtpointer name;
- sltpointer address;
-};
-
-/* DNTT_TYPE_MODULE:
-
- A DNTT_TYPE_MODULE symbol is emitted for the start of a pascal
- module or C source file. A module indicates a compilation unit
- for name-scoping purposes; in that regard there should be
- a 1-1 correspondence between GDB "symtab"'s and MODULE symbol records.
-
- Each DNTT_TYPE_MODULE must have an associated DNTT_TYPE_END symbol.
-
- NAME points to a VT entry providing the module's name. Note C
- source files are considered nameless modules.
-
- ALIAS point to a VT entry providing a secondary name.
-
- ADDRESS points to an SLT entry from which line number and code locations
- may be determined. */
-
-struct dntt_type_module
-{
- unsigned int extension: 1;
- unsigned int kind: 10; /* DNTT_TYPE_MODULE */
- unsigned int unused: 21;
- vtpointer name;
- vtpointer alias;
- dnttpointer unused2;
- sltpointer address;
-};
-
-/* DNTT_TYPE_FUNCTION,
- DNTT_TYPE_ENTRY,
- DNTT_TYPE_BLOCKDATA,
- DNTT_TYPE_MEMFUNC:
-
- A DNTT_TYPE_FUNCTION symbol is emitted for each function definition;
- a DNTT_TYPE_ENTRY symbols is used for secondary entry points. Both
- symbols used the dntt_type_function structure.
- A DNTT_TYPE_BLOCKDATA symbol is emitted ...?
- A DNTT_TYPE_MEMFUNC symbol is emitted for inlined member functions (C++).
-
- Each of DNTT_TYPE_FUNCTION must have a matching DNTT_TYPE_END.
-
- GLOBAL is nonzero if the function has global scope.
-
- LANGUAGE describes the function's source language.
-
- OPT_LEVEL describes the optimization level the function was compiled
- with.
-
- VARARGS is nonzero if the function uses varargs.
-
- NAME points to a VT entry providing the function's name.
-
- ALIAS points to a VT entry providing a secondary name for the function.
-
- FIRSTPARAM points to a LNTT entry which describes the parameter list.
-
- ADDRESS points to an SLT entry from which line number and code locations
- may be determined.
-
- ENTRYADDR is the memory address corresponding the function's entry point
-
- RETVAL points to a LNTT entry describing the function's return value.
-
- LOWADDR is the lowest memory address associated with this function.
-
- HIADDR is the highest memory address associated with this function. */
-
-struct dntt_type_function
-{
- unsigned int extension: 1;
- unsigned int kind: 10; /* DNTT_TYPE_FUNCTION,
- DNTT_TYPE_ENTRY,
- DNTT_TYPE_BLOCKDATA
- or DNTT_TYPE_MEMFUNC */
- unsigned int global: 1;
- unsigned int language: 4;
- unsigned int nest_level: 5;
- unsigned int opt_level: 2;
- unsigned int varargs: 1;
- unsigned int lang_info: 4;
- unsigned int inlined: 1;
- unsigned int localalloc: 1;
- unsigned int expansion: 1;
- unsigned int unused: 1;
- vtpointer name;
- vtpointer alias;
- dnttpointer firstparam;
- sltpointer address;
- CORE_ADDR entryaddr;
- dnttpointer retval;
- CORE_ADDR lowaddr;
- CORE_ADDR hiaddr;
-};
-
-/* DNTT_TYPE_BEGIN:
-
- A DNTT_TYPE_BEGIN symbol is emitted to begin a new nested scope.
- Every DNTT_TYPE_BEGIN symbol must have a matching DNTT_TYPE_END symbol.
-
- CLASSFLAG is nonzero if this is the beginning of a c++ class definition.
-
- ADDRESS points to an SLT entry from which line number and code locations
- may be determined. */
-
-struct dntt_type_begin
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int classflag: 1;
- unsigned int unused: 20;
- sltpointer address;
-};
-
-/* DNTT_TYPE_END:
-
- A DNTT_TYPE_END symbol is emitted when closing a scope started by
- a DNTT_TYPE_MODULE, DNTT_TYPE_FUNCTION, DNTT_TYPE_WITH,
- DNTT_TYPE_COMMON, DNTT_TYPE_BEGIN, and DNTT_TYPE_CLASS_SCOPE symbols.
-
- ENDKIND describes what type of scope the DNTT_TYPE_END is closing
- (one of the above 6 kinds).
-
- CLASSFLAG is nonzero if this is the end of a c++ class definition.
-
- ADDRESS points to an SLT entry from which line number and code locations
- may be determined.
-
- BEGINSCOPE points to the LNTT entry which opened the scope. */
-
-struct dntt_type_end
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int endkind: 10;
- unsigned int classflag: 1;
- unsigned int unused: 10;
- sltpointer address;
- dnttpointer beginscope;
-};
-
-/* DNTT_TYPE_IMPORT is unused by GDB. */
-/* DNTT_TYPE_LABEL is unused by GDB. */
-
-/* DNTT_TYPE_FPARAM:
-
- A DNTT_TYPE_FPARAM symbol is emitted for a function argument. When
- chained together the symbols represent an argument list for a function.
-
- REGPARAM is nonzero if this parameter was passed in a register.
-
- INDIRECT is nonzero if this parameter is a pointer to the parameter
- (pass by reference or pass by value for large items).
-
- LONGADDR is nonzero if the parameter is a 64bit pointer.
-
- NAME is a pointer into the VT for the parameter's name.
-
- LOCATION describes where the parameter is stored. Depending on the
- parameter type LOCATION could be a register number, or an offset
- from the stack pointer.
-
- TYPE points to a NTT entry describing the type of this parameter.
-
- NEXTPARAM points to the LNTT entry describing the next parameter. */
-
-struct dntt_type_fparam
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int regparam: 1;
- unsigned int indirect: 1;
- unsigned int longaddr: 1;
- unsigned int copyparam: 1;
- unsigned int dflt: 1;
- unsigned int doc_ranges: 1;
- unsigned int misc_kind: 1;
- unsigned int unused: 14;
- vtpointer name;
- CORE_ADDR location;
- dnttpointer type;
- dnttpointer nextparam;
- int misc;
-};
-
-/* DNTT_TYPE_SVAR:
-
- A DNTT_TYPE_SVAR is emitted to describe a variable in static storage.
-
- GLOBAL is nonzero if the variable has global scope.
-
- INDIRECT is nonzero if the variable is a pointer to an object.
-
- LONGADDR is nonzero if the variable is in long pointer space.
-
- STATICMEM is nonzero if the variable is a member of a class.
-
- A_UNION is nonzero if the variable is an anonymous union member.
-
- NAME is a pointer into the VT for the variable's name.
-
- LOCATION provides the memory address for the variable.
-
- TYPE is a pointer into either the GNTT or LNTT which describes
- the type of this variable. */
-
-struct dntt_type_svar
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int global: 1;
- unsigned int indirect: 1;
- unsigned int longaddr: 1;
- unsigned int staticmem: 1;
- unsigned int a_union: 1;
- unsigned int unused1: 1;
- unsigned int thread_specific: 1;
- unsigned int unused2: 14;
- vtpointer name;
- CORE_ADDR location;
- dnttpointer type;
- unsigned int offset;
- unsigned int displacement;
-};
-
-/* DNTT_TYPE_DVAR:
-
- A DNTT_TYPE_DVAR is emitted to describe automatic variables and variables
- held in registers.
-
- GLOBAL is nonzero if the variable has global scope.
-
- INDIRECT is nonzero if the variable is a pointer to an object.
-
- REGVAR is nonzero if the variable is in a register.
-
- A_UNION is nonzero if the variable is an anonymous union member.
-
- NAME is a pointer into the VT for the variable's name.
-
- LOCATION provides the memory address or register number for the variable.
-
- TYPE is a pointer into either the GNTT or LNTT which describes
- the type of this variable. */
-
-struct dntt_type_dvar
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int global: 1;
- unsigned int indirect: 1;
- unsigned int regvar: 1;
- unsigned int a_union: 1;
- unsigned int unused: 17;
- vtpointer name;
- int location;
- dnttpointer type;
- unsigned int offset;
-};
-
-/* DNTT_TYPE_CONST:
-
- A DNTT_TYPE_CONST symbol is emitted for program constants.
-
- GLOBAL is nonzero if the constant has global scope.
-
- INDIRECT is nonzero if the constant is a pointer to an object.
-
- LOCATION_TYPE describes where to find the constant's value
- (in the VT, memory, or embedded in an instruction).
-
- CLASSMEM is nonzero if the constant is a member of a class.
-
- NAME is a pointer into the VT for the constant's name.
-
- LOCATION provides the memory address, register number or pointer
- into the VT for the constant's value.
-
- TYPE is a pointer into either the GNTT or LNTT which describes
- the type of this variable. */
-
-struct dntt_type_const
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int global: 1;
- unsigned int indirect: 1;
- unsigned int location_type: 3;
- unsigned int classmem: 1;
- unsigned int unused: 15;
- vtpointer name;
- CORE_ADDR location;
- dnttpointer type;
- unsigned int offset;
- unsigned int displacement;
-};
-
-/* DNTT_TYPE_TYPEDEF and DNTT_TYPE_TAGDEF:
-
- The same structure is used to describe typedefs and tagdefs.
-
- DNTT_TYPE_TYPEDEFS are associated with C "typedefs".
-
- DNTT_TYPE_TAGDEFs are associated with C "struct", "union", and "enum"
- tags, which may have the same name as a typedef in the same scope.
- Also they are associated with C++ "class" tags, which implicitly have
- the same name as the class type.
-
- GLOBAL is nonzero if the typedef/tagdef has global scope.
-
- TYPEINFO is used to determine if full type information is available
- for a tag. (usually 1, but can be zero for opaque types in C).
-
- NAME is a pointer into the VT for the constant's name.
-
- TYPE points to the underlying type for the typedef/tagdef in the
- GNTT or LNTT. */
-
-struct dntt_type_type
-{
- unsigned int extension: 1;
- unsigned int kind: 10; /* DNTT_TYPE_TYPEDEF or
- DNTT_TYPE_TAGDEF. */
- unsigned int global: 1;
- unsigned int typeinfo: 1;
- unsigned int unused: 19;
- vtpointer name;
- dnttpointer type; /* Underlying type, which for TAGDEF's may be
- DNTT_TYPE_STRUCT, DNTT_TYPE_UNION,
- DNTT_TYPE_ENUM, or DNTT_TYPE_CLASS.
- For TYPEDEF's other underlying types
- are also possible. */
-};
-
-/* DNTT_TYPE_POINTER:
-
- Used to describe a pointer to an underlying type.
-
- POINTSTO is a pointer into the GNTT or LNTT for the type which this
- pointer points to.
-
- BITLENGTH is the length of the pointer (not the underlying type). */
-
-struct dntt_type_pointer
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int unused: 21;
- dnttpointer pointsto;
- unsigned int bitlength;
-};
-
-
-/* DNTT_TYPE_ENUM:
-
- Used to describe enumerated types.
-
- FIRSTMEM is a pointer to a DNTT_TYPE_MEMENUM in the GNTT/LNTT which
- describes the first member (and contains a pointer to the chain of
- members).
-
- BITLENGTH is the number of bits used to hold the values of the enum's
- members. */
-
-struct dntt_type_enum
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int unused: 21;
- dnttpointer firstmem;
- unsigned int bitlength;
-};
-
-/* DNTT_TYPE_MEMENUM
-
- Used to describe members of an enumerated type.
-
- CLASSMEM is nonzero if this member is part of a class.
-
- NAME points into the VT for the name of this member.
-
- VALUE is the value of this enumeration member.
-
- NEXTMEM points to the next DNTT_TYPE_MEMENUM in the chain. */
-
-struct dntt_type_memenum
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int classmem: 1;
- unsigned int unused: 20;
- vtpointer name;
- unsigned int value;
- dnttpointer nextmem;
-};
-
-/* DNTT_TYPE_SET
-
- Used to describe PASCAL "set" type.
-
- DECLARATION describes the bitpacking of the set.
-
- SUBTYPE points to a DNTT entry describing the type of the members.
-
- BITLENGTH is the size of the set. */
-
-struct dntt_type_set
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int declaration: 2;
- unsigned int unused: 19;
- dnttpointer subtype;
- unsigned int bitlength;
-};
-
-/* DNTT_TYPE_SUBRANGE
-
- Used to describe subrange type.
-
- DYN_LOW describes the lower bound of the subrange:
-
- 00 for a constant lower bound (found in LOWBOUND).
-
- 01 for a dynamic lower bound with the lower bound found in the
- memory address pointed to by LOWBOUND.
-
- 10 for a dynamic lower bound described by an variable found in the
- DNTT/LNTT (LOWBOUND would be a pointer into the DNTT/LNTT).
-
- DYN_HIGH is similar to DYN_LOW, except it describes the upper bound.
-
- SUBTYPE points to the type of the subrange.
-
- BITLENGTH is the length in bits needed to describe the subrange's
- values. */
-
-struct dntt_type_subrange
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int dyn_low: 2;
- unsigned int dyn_high: 2;
- unsigned int unused: 17;
- int lowbound;
- int highbound;
- dnttpointer subtype;
- unsigned int bitlength;
-};
-
-/* DNTT_TYPE_ARRAY
-
- Used to describe an array type.
-
- DECLARATION describes the bit packing used in the array.
-
- ARRAYISBYTES is nonzero if the field in arraylength describes the
- length in bytes rather than in bits. A value of zero is used to
- describe an array with size 2**32.
-
- ELEMISBYTES is nonzero if the length if each element in the array
- is describes in bytes rather than bits. A value of zero is used
- to an element with size 2**32.
-
- ELEMORDER is nonzero if the elements are indexed in increasing order.
-
- JUSTIFIED if the elements are left justified to index zero.
-
- ARRAYLENGTH is the length of the array.
-
- INDEXTYPE is a DNTT pointer to the type used to index the array.
-
- ELEMTYPE is a DNTT pointer to the type for the array elements.
-
- ELEMLENGTH is the length of each element in the array (including
- any padding).
-
- Multi-dimensional arrays are represented by ELEMTYPE pointing to
- another DNTT_TYPE_ARRAY. */
-
-struct dntt_type_array
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int declaration: 2;
- unsigned int dyn_low: 2;
- unsigned int dyn_high: 2;
- unsigned int arrayisbytes: 1;
- unsigned int elemisbytes: 1;
- unsigned int elemorder: 1;
- unsigned int justified: 1;
- unsigned int unused: 11;
- unsigned int arraylength;
- dnttpointer indextype;
- dnttpointer elemtype;
- unsigned int elemlength;
-};
-
-/* DNTT_TYPE_STRUCT
-
- DNTT_TYPE_STRUCT is used to describe a C structure.
-
- DECLARATION describes the bitpacking used.
-
- FIRSTFIELD is a DNTT pointer to the first field of the structure
- (each field contains a pointer to the next field, walk the list
- to access all fields of the structure).
-
- VARTAGFIELD and VARLIST are used for Pascal variant records.
-
- BITLENGTH is the size of the structure in bits. */
-
-struct dntt_type_struct
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int declaration: 2;
- unsigned int unused: 19;
- dnttpointer firstfield;
- dnttpointer vartagfield;
- dnttpointer varlist;
- unsigned int bitlength;
-};
-
-/* DNTT_TYPE_UNION
-
- DNTT_TYPE_UNION is used to describe a C union.
-
- FIRSTFIELD is a DNTT pointer to the beginning of the field chain.
-
- BITLENGTH is the size of the union in bits. */
-
-struct dntt_type_union
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int unused: 21;
- dnttpointer firstfield;
- unsigned int bitlength;
-};
-
-/* DNTT_TYPE_FIELD
-
- DNTT_TYPE_FIELD describes one field in a structure or union
- or C++ class.
-
- VISIBILITY is used to describe the visibility of the field
- (for c++. public = 0, protected = 1, private = 2).
-
- A_UNION is nonzero if this field is a member of an anonymous union.
-
- STATICMEM is nonzero if this field is a static member of a template.
-
- NAME is a pointer into the VT for the name of the field.
-
- BITOFFSET gives the offset of this field in bits from the beginning
- of the structure or union this field is a member of.
-
- TYPE is a DNTT pointer to the type describing this field.
-
- BITLENGTH is the size of the entry in bits.
-
- NEXTFIELD is a DNTT pointer to the next field in the chain. */
-
-struct dntt_type_field
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int visibility: 2;
- unsigned int a_union: 1;
- unsigned int staticmem: 1;
- unsigned int unused: 17;
- vtpointer name;
- unsigned int bitoffset;
- dnttpointer type;
- unsigned int bitlength;
- dnttpointer nextfield;
-};
-
-/* DNTT_TYPE_VARIANT is unused by GDB. */
-/* DNTT_TYPE_FILE is unused by GDB. */
-
-/* DNTT_TYPE_FUNCTYPE
-
- I think this is used to describe a function type (e.g., would
- be emitted as part of a function-pointer description).
-
- VARARGS is nonzero if this function uses varargs.
-
- FIRSTPARAM is a DNTT pointer to the first entry in the parameter
- chain.
-
- RETVAL is a DNTT pointer to the type of the return value. */
-
-struct dntt_type_functype
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int varargs: 1;
- unsigned int info: 4;
- unsigned int unused: 16;
- unsigned int bitlength;
- dnttpointer firstparam;
- dnttpointer retval;
-};
-
-/* DNTT_TYPE_WITH is emitted by C++ to indicate "with" scoping semantics.
- (Probably also emitted by PASCAL to support "with"...).
-
- C++ example: Say "memfunc" is a method of class "c", and say
- "m" is a data member of class "c". Then from within "memfunc",
- it is legal to reference "m" directly (e.g. you don't have to
- say "this->m". The symbol table indicates
- this by emitting a DNTT_TYPE_WITH symbol within the function "memfunc",
- pointing to the type symbol for class "c".
-
- In GDB, this symbol record is unnecessary,
- because GDB's symbol lookup algorithm
- infers the "with" semantics when it sees a "this" argument to the member
- function. So GDB can safely ignore the DNTT_TYPE_WITH record.
-
- A DNTT_TYPE_WITH has a matching DNTT_TYPE_END symbol. */
-
-struct dntt_type_with
-{
- unsigned int extension: 1; /* always zero */
- unsigned int kind: 10; /* always DNTT_TYPE_WITH */
- unsigned int addrtype: 2; /* 0 => STATTYPE */
- /* 1 => DYNTYPE */
- /* 2 => REGTYPE */
- unsigned int indirect: 1; /* 1 => pointer to object */
- unsigned int longaddr: 1; /* 1 => in long pointer space */
- unsigned int nestlevel: 6; /* # of nesting levels back */
- unsigned int doc_ranges: 1; /* 1 => location is range list */
- unsigned int unused: 10;
- long location; /* where stored (allocated) */
- sltpointer address;
- dnttpointer type; /* type of with expression */
- vtpointer name; /* name of with expression */
- unsigned long offset; /* byte offset from location */
-};
-
-/* DNTT_TYPE_COMMON is unsupported by GDB. */
-/* A DNTT_TYPE_COMMON symbol must have a matching DNTT_TYPE_END symbol */
-
-/* DNTT_TYPE_COBSTRUCT is unsupported by GDB. */
-/* DNTT_TYPE_XREF is unsupported by GDB. */
-/* DNTT_TYPE_SA is unsupported by GDB. */
-/* DNTT_TYPE_MACRO is unsupported by GDB */
-
-/* DNTT_TYPE_BLOCKDATA has the same structure as DNTT_TYPE_FUNCTION */
-
-/* The following are the C++ specific SOM records */
-
-/* The purpose of the DNTT_TYPE_CLASS_SCOPE is to bracket C++ methods
- and indicate the method name belongs in the "class scope" rather
- than in the module they are being defined in. For example:
-
- class c {
- ...
- void memfunc(); // member function
- };
-
- void c::memfunc() // definition of class c's "memfunc"
- {
- ...
- }
-
- main()
- {
- ...
- }
-
- In the above, the name "memfunc" is not directly visible from "main".
- I.e., you have to say "break c::memfunc".
- If it were a normal function (not a method), it would be visible
- via the simple "break memfunc". Since "memfunc" otherwise looks
- like a normal FUNCTION in the symbol table, the bracketing
- CLASS_SCOPE is what is used to indicate it is really a method.
-
-
- A DNTT_TYPE_CLASS_SCOPE symbol must have a matching DNTT_TYPE_END symbol. */
-
-struct dntt_type_class_scope
-{
- unsigned int extension: 1; /* Always zero. */
- unsigned int kind: 10; /* Always DNTT_TYPE_CLASS_SCOPE. */
- unsigned int unused: 21;
- sltpointer address ; /* Pointer to SLT entry. */
- dnttpointer type ; /* Pointer to class type DNTT. */
-};
-
-/* C++ reference parameter.
- The structure of this record is the same as DNTT_TYPE_POINTER -
- refer to struct dntt_type_pointer. */
-
-/* The next two describe C++ pointer-to-data-member type, and
- pointer-to-member-function type, respectively.
- DNTT_TYPE_PTRMEM and DNTT_TYPE_PTRMEMFUNC have the same structure. */
-
-struct dntt_type_ptrmem
-{
- unsigned int extension: 1; /* Always zero. */
- unsigned int kind: 10; /* Always DNTT_TYPE_PTRMEM. */
- unsigned int unused: 21;
- dnttpointer pointsto ; /* Pointer to class DNTT. */
- dnttpointer memtype ; /* Type of member. */
-};
-
-struct dntt_type_ptrmemfunc
-{
- unsigned int extension: 1; /* Always zero. */
- unsigned int kind: 10; /* Always DNTT_TYPE_PTRMEMFUNC. */
- unsigned int unused: 21;
- dnttpointer pointsto ; /* Pointer to class DNTT. */
- dnttpointer memtype ; /* Type of member. */
-};
-
-/* The DNTT_TYPE_CLASS symbol is emitted to describe a class type.
- "memberlist" points to a chained list of FIELD or GENFIELD records
- indicating the class members. "parentlist" points to a chained list
- of INHERITANCE records indicating classes from which we inherit
- fields. */
-
-struct dntt_type_class
-{
- unsigned int extension: 1; /* Always zero. */
- unsigned int kind: 10; /* Always DNTT_TYPE_CLASS. */
- unsigned int abstract: 1; /* Is this an abstract class? */
- unsigned int class_decl: 2; /* 0=class,1=union,2=struct. */
- unsigned int expansion: 1; /* 1=template expansion. */
- unsigned int unused: 17;
- dnttpointer memberlist ; /* Ptr to chain of [GEN]FIELDs. */
- unsigned long vtbl_loc ; /* Offset in obj of ptr to vtbl. */
- dnttpointer parentlist ; /* Ptr to K_INHERITANCE list. */
- unsigned long bitlength ; /* Total at this level. */
- dnttpointer identlist ; /* Ptr to chain of class ident's. */
- dnttpointer friendlist ; /* Ptr to K_FRIEND list. */
- dnttpointer templateptr ; /* Ptr to template. */
- dnttpointer nextexp ; /* Ptr to next expansion. */
-};
-
-/* Class members are indicated via either the FIELD record (for
- data members, same as for C struct fields), or by the GENFIELD record
- (for member functions). */
-
-struct dntt_type_genfield
-{
- unsigned int extension: 1; /* Always zero. */
- unsigned int kind: 10; /* Always DNTT_TYPE_GENFIELD. */
- unsigned int visibility: 2; /* Pub = 0, prot = 1, priv = 2. */
- unsigned int a_union: 1; /* 1 => anonymous union member. */
- unsigned int unused: 18;
- dnttpointer field ; /* Pointer to field or qualifier. */
- dnttpointer nextfield ; /* Pointer to next field. */
-};
-
-/* C++ virtual functions. */
-
-struct dntt_type_vfunc
-{
- unsigned int extension: 1; /* always zero */
- unsigned int kind: 10; /* always DNTT_TYPE_VFUNC */
- unsigned int pure: 1; /* pure virtual function ? */
- unsigned int unused: 20;
- dnttpointer funcptr ; /* points to FUNCTION symbol */
- unsigned long vtbl_offset ; /* offset into vtbl for virtual */
-};
-
-/* Not precisely sure what this is intended for - DDE ignores it. */
-
-struct dntt_type_memaccess
-{
- unsigned int extension: 1; /* always zero */
- unsigned int kind: 10; /* always DNTT_TYPE_MEMACCESS */
- unsigned int unused: 21;
- dnttpointer classptr ; /* pointer to base class */
- dnttpointer field ; /* pointer field */
-};
-
-/* The DNTT_TYPE_INHERITANCE record describes derived classes.
- In particular, the "parentlist" field of the CLASS record points
- to a list of INHERITANCE records for classes from which we
- inherit members. */
-
-struct dntt_type_inheritance
-{
- unsigned int extension: 1; /* always zero */
- unsigned int kind: 10; /* always DNTT_TYPE_INHERITANCE */
- unsigned int Virtual: 1; /* virtual base class ? */
- unsigned int visibility: 2; /* pub = 0, prot = 1, priv = 2 */
- unsigned int unused: 18;
- dnttpointer classname ; /* first parent class, if any */
- unsigned long offset ; /* offset to start of base class */
- dnttpointer next ; /* pointer to next K_INHERITANCE */
- unsigned long future[2] ; /* padding to 3-word block end */
-};
-
-/* C++ "friend" classes ... */
-
-struct dntt_type_friend_class
-{
- unsigned int extension: 1; /* always zero */
- unsigned int kind: 10; /* always DNTT_TYPE_FRIEND_CLASS */
- unsigned int unused: 21;
- dnttpointer classptr ; /* pointer to class DNTT */
- dnttpointer next ; /* next DNTT_FRIEND */
-};
-
-struct dntt_type_friend_func
-{
- unsigned int extension: 1; /* always zero */
- unsigned int kind: 10; /* always DNTT_TYPE_FRIEND_FUNC */
- unsigned int unused: 21;
- dnttpointer funcptr ; /* pointer to function */
- dnttpointer classptr ; /* pointer to class DNTT */
- dnttpointer next ; /* next DNTT_FRIEND */
- unsigned long future[2] ; /* padding to 3-word block end */
-};
-
-/* DDE appears to ignore the DNTT_TYPE_MODIFIER record.
- It could perhaps be used to give better "ptype" output in GDB;
- otherwise it is probably safe for GDB to ignore it also. */
-
-struct dntt_type_modifier
-{
- unsigned int extension: 1; /* always zero */
- unsigned int kind: 10; /* always DNTT_TYPE_MODIFIER */
- unsigned int m_const: 1; /* const */
- unsigned int m_static: 1; /* static */
- unsigned int m_void: 1; /* void */
- unsigned int m_volatile: 1; /* volatile */
- unsigned int m_duplicate: 1; /* duplicate */
- unsigned int unused: 16;
- dnttpointer type ; /* subtype */
- unsigned long future ; /* padding to 3-word block end */
-};
-
-/* I'm not sure what this was intended for - DDE ignores it. */
-
-struct dntt_type_object_id
-{
- unsigned int extension: 1; /* always zero */
- unsigned int kind: 10; /* always DNTT_TYPE_OBJECT_ID */
- unsigned int indirect: 1; /* Is object_ident addr of addr? */
- unsigned int unused: 20;
- unsigned long object_ident ; /* object identifier */
- unsigned long offset ; /* offset to start of base class */
- dnttpointer next ; /* pointer to next K_OBJECT_ID */
- unsigned long segoffset ; /* for linker fixup */
- unsigned long future ; /* padding to 3-word block end */
-};
-
-/* No separate dntt_type_memfunc; same as dntt_type_func */
-
-/* Symbol records to support templates. These only get used
- in DDE's "describe" output (like GDB's "ptype"). */
-
-/* The TEMPLATE record is the header for a template-class.
- Like the CLASS record, a TEMPLATE record has a memberlist that
- points to a list of template members. It also has an arglist
- pointing to a list of TEMPLATE_ARG records. */
-
-struct dntt_type_template
-{
- unsigned int extension: 1; /* always zero */
- unsigned int kind: 10; /* always DNTT_TYPE_TEMPLATE */
- unsigned int abstract: 1; /* is this an abstract class? */
- unsigned int class_decl: 2; /* 0=class,1=union,2=struct */
- unsigned int unused: 18;
- dnttpointer memberlist ; /* ptr to chain of K_[GEN]FIELDs */
- long unused2 ; /* offset in obj of ptr to vtbl */
- dnttpointer parentlist ; /* ptr to K_INHERITANCE list */
- unsigned long bitlength ; /* total at this level */
- dnttpointer identlist ; /* ptr to chain of class ident's */
- dnttpointer friendlist ; /* ptr to K_FRIEND list */
- dnttpointer arglist ; /* ptr to argument list */
- dnttpointer expansions ; /* ptr to expansion list */
-};
-
-/* Template-class arguments are a list of TEMPL_ARG records
- chained together. The "name" field is the name of the formal.
- E.g.:
-
- template <class T> class q { ... };
-
- Then "T" is the name of the formal argument. */
-
-struct dntt_type_templ_arg
-{
- unsigned int extension: 1; /* always zero */
- unsigned int kind: 10; /* always DNTT_TYPE_TEMPL_ARG */
- unsigned int usagetype: 1; /* 0 type-name 1 expression */
- unsigned int unused: 20;
- vtpointer name ; /* name of argument */
- dnttpointer type ; /* for non type arguments */
- dnttpointer nextarg ; /* Next argument if any */
- long future[2] ; /* padding to 3-word block end */
-};
-
-/* FUNC_TEMPLATE records are sort of like FUNCTION, but are emitted
- for template member functions. E.g.,
-
- template <class T> class q
- {
- ...
- void f();
- ...
- };
-
- Within the list of FIELDs/GENFIELDs defining the member list
- of the template "q", "f" would appear as a FUNC_TEMPLATE.
- We'll also see instances of FUNCTION "f" records for each
- instantiation of the template. */
-
-struct dntt_type_func_template
-{
- unsigned int extension: 1; /* always zero */
- unsigned int kind: 10; /* always DNTT_TYPE_FUNC_TEMPLATE */
- unsigned int public: 1; /* 1 => globally visible */
- unsigned int language: 4; /* type of language */
- unsigned int level: 5; /* nesting level (top level = 0)*/
- unsigned int optimize: 2; /* level of optimization */
- unsigned int varargs: 1; /* ellipses. Pascal/800 later */
- unsigned int info: 4; /* lang-specific stuff; F_xxxx */
- unsigned int inlined: 1;
- unsigned int localloc: 1; /* 0 at top, 1 at end of block */
- unsigned int unused: 2;
- vtpointer name ; /* name of function */
- vtpointer alias ; /* alternate name, if any */
- dnttpointer firstparam ; /* first FPARAM, if any */
- dnttpointer retval ; /* return type, if any */
- dnttpointer arglist ; /* ptr to argument list */
-};
-
-/* LINK is apparently intended to link together function template
- definitions with their instantiations. However, it is not clear
- why this would be needed, except to provide the information on
- a "ptype" command. And as far as I can tell, aCC does not
- generate this record. */
-
-struct dntt_type_link
-{
- unsigned int extension: 1; /* always zero */
- unsigned int kind: 10; /* always DNTT_TYPE_LINK */
- unsigned int linkKind: 4; /* always LINK_UNKNOWN */
- unsigned int unused: 17;
- long future1 ; /* expansion */
- dnttpointer ptr1 ; /* link from template */
- dnttpointer ptr2 ; /* to expansion */
- long future[2] ; /* padding to 3-word block end */
-};
-
-/* end of C++ specific SOM's. */
-
-/* DNTT_TYPE_DYN_ARRAY_DESC is unused by GDB */
-/* DNTT_TYPE_DESC_SUBRANGE is unused by GDB */
-/* DNTT_TYPE_BEGIN_EXT is unused by GDB */
-/* DNTT_TYPE_INLN is unused by GDB */
-/* DNTT_TYPE_INLN_LIST is unused by GDB */
-/* DNTT_TYPE_ALIAS is unused by GDB */
-
-struct dntt_type_doc_function
-{
- unsigned int extension: 1; /* always zero */
- unsigned int kind: 10; /* K_DOC_FUNCTION or */
- /* K_DOC_MEMFUNC */
- unsigned int global: 1; /* 1 => globally visible */
- unsigned int language: 4; /* type of language */
- unsigned int level: 5; /* nesting level (top level = 0)*/
- unsigned int optimize: 2; /* level of optimization */
- unsigned int varargs: 1; /* ellipses. Pascal/800 later */
- unsigned int info: 4; /* lang-specific stuff; F_xxxx */
- unsigned int inlined: 1;
- unsigned int localloc: 1; /* 0 at top, 1 at end of block */
- unsigned int expansion: 1; /* 1 = function expansion */
- unsigned int doc_clone: 1;
- vtpointer name; /* name of function */
- vtpointer alias; /* alternate name, if any */
- dnttpointer firstparam; /* first FPARAM, if any */
- sltpointer address; /* code and text locations */
- CORE_ADDR entryaddr; /* address of entry point */
- dnttpointer retval; /* return type, if any */
- CORE_ADDR lowaddr; /* lowest address of function */
- CORE_ADDR hiaddr; /* highest address of function */
- dnttpointer inline_list; /* pointer to first inline */
- ltpointer lt_offset; /* start of frag/cp line table */
- ctxtpointer ctxt_offset; /* start of context table for this routine */
-};
-
-/* DNTT_TYPE_DOC_MEMFUNC is unused by GDB */
-
-/* DNTT_TYPE_GENERIC and DNTT_TYPE_BLOCK are convience structures
- so we can examine a DNTT entry in a generic fashion. */
-struct dntt_type_generic
-{
- unsigned int word[9];
-};
-
-struct dntt_type_block
-{
- unsigned int extension: 1;
- unsigned int kind: 10;
- unsigned int unused: 21;
- unsigned int word[2];
-};
-
-/* One entry in a DNTT (either the LNTT or GNTT).
- This is a union of the above 60 or so structure definitions. */
-
-union dnttentry
-{
- struct dntt_type_srcfile dsfile;
- struct dntt_type_module dmodule;
- struct dntt_type_function dfunc;
- struct dntt_type_function dentry;
- struct dntt_type_begin dbegin;
- struct dntt_type_end dend;
- struct dntt_type_fparam dfparam;
- struct dntt_type_svar dsvar;
- struct dntt_type_dvar ddvar;
- struct dntt_type_const dconst;
- struct dntt_type_type dtype;
- struct dntt_type_type dtag;
- struct dntt_type_pointer dptr;
- struct dntt_type_enum denum;
- struct dntt_type_memenum dmember;
- struct dntt_type_set dset;
- struct dntt_type_subrange dsubr;
- struct dntt_type_array darray;
- struct dntt_type_struct dstruct;
- struct dntt_type_union dunion;
- struct dntt_type_field dfield;
- struct dntt_type_functype dfunctype;
- struct dntt_type_with dwith;
- struct dntt_type_function dblockdata;
- struct dntt_type_class_scope dclass_scope;
- struct dntt_type_pointer dreference;
- struct dntt_type_ptrmem dptrmem;
- struct dntt_type_ptrmemfunc dptrmemfunc;
- struct dntt_type_class dclass;
- struct dntt_type_genfield dgenfield;
- struct dntt_type_vfunc dvfunc;
- struct dntt_type_memaccess dmemaccess;
- struct dntt_type_inheritance dinheritance;
- struct dntt_type_friend_class dfriend_class;
- struct dntt_type_friend_func dfriend_func;
- struct dntt_type_modifier dmodifier;
- struct dntt_type_object_id dobject_id;
- struct dntt_type_template dtemplate;
- struct dntt_type_templ_arg dtempl_arg;
- struct dntt_type_func_template dfunc_template;
- struct dntt_type_link dlink;
- struct dntt_type_doc_function ddocfunc;
- struct dntt_type_generic dgeneric;
- struct dntt_type_block dblock;
-};
-
-/* Source line entry types. */
-enum slttype
-{
- SLT_NORMAL,
- SLT_SRCFILE,
- SLT_MODULE,
- SLT_FUNCTION,
- SLT_ENTRY,
- SLT_BEGIN,
- SLT_END,
- SLT_WITH,
- SLT_EXIT,
- SLT_ASSIST,
- SLT_MARKER,
- SLT_CLASS_SCOPE,
- SLT_INLN,
- SLT_NORMAL_OFFSET,
-};
-
-/* A normal source line entry. Simply provides a mapping of a source
- line number to a code address.
-
- SLTDESC will always be SLT_NORMAL or SLT_EXIT. */
-
-struct slt_normal
-{
- unsigned int sltdesc: 4;
- unsigned int line: 28;
- CORE_ADDR address;
-};
-
-struct slt_normal_off
-{
- unsigned int sltdesc: 4;
- unsigned int offset: 6;
- unsigned int line: 22;
- CORE_ADDR address;
-};
-
-/* A special source line entry. Provides a mapping of a declaration
- to a line number. These entries point back into the DNTT which
- references them. */
-
-struct slt_special
-{
- unsigned int sltdesc: 4;
- unsigned int line: 28;
- dnttpointer backptr;
-};
-
-/* Used to describe nesting.
-
- For nested languages, an slt_assist entry must follow each SLT_FUNC
- entry in the SLT. The address field will point forward to the
- first slt_normal entry within the function's scope. */
-
-struct slt_assist
-{
- unsigned int sltdesc: 4;
- unsigned int unused: 28;
- sltpointer address;
-};
-
-struct slt_generic
-{
- unsigned int word[2];
-};
-
-union sltentry
-{
- struct slt_normal snorm;
- struct slt_normal_off snormoff;
- struct slt_special sspec;
- struct slt_assist sasst;
- struct slt_generic sgeneric;
-};
-
-/* $LINES$ declarations
- This is the line table used for optimized code, which is only present
- in the new $PROGRAM_INFO$ debug space. */
-
-#define DST_LN_ESCAPE_FLAG1 15
-#define DST_LN_ESCAPE_FLAG2 14
-#define DST_LN_CTX_SPEC1 13
-#define DST_LN_CTX_SPEC2 12
-
-/* Escape function codes: */
-
-typedef enum
-{
- dst_ln_pad, /* pad byte */
- dst_ln_escape_1, /* reserved */
- dst_ln_dpc1_dln1, /* 1 byte line delta, 1 byte pc delta */
- dst_ln_dpc2_dln2, /* 2 bytes line delta, 2 bytes pc delta */
- dst_ln_pc4_ln4, /* 4 bytes ABSOLUTE line number, 4 bytes ABSOLUTE pc */
- dst_ln_dpc0_dln1, /* 1 byte line delta, pc delta = 0 */
- dst_ln_ln_off_1, /* statement escape, stmt # = 1 (2nd stmt on line) */
- dst_ln_ln_off, /* statement escape, stmt # = next byte */
- dst_ln_entry, /* entry escape, next byte is entry number */
- dst_ln_exit, /* exit escape */
- dst_ln_stmt_end, /* gap escape, 4 bytes pc delta */
- dst_ln_stmt_cp, /* current stmt is a critical point */
- dst_ln_escape_12, /* reserved */
- dst_ln_escape_13, /* this is an exception site record */
- dst_ln_nxt_byte, /* next byte contains the real escape code */
- dst_ln_end, /* end escape, final entry follows */
- dst_ln_escape1_END_OF_ENUM
-}
-dst_ln_escape1_t;
-
-typedef enum
-{
- dst_ln_ctx_1, /* next byte describes context switch with 5-bit */
- /* index into the image table and 3-bit run length. */
- /* If run length is 0, end with another cxt specifier or ctx_end */
- dst_ln_ctx_2, /* next 2 bytes switch context: 13 bit index, 3 bit run length */
- dst_ln_ctx_4, /* next 4 bytes switch context: 29 bit index, 3 bit run length */
- dst_ln_ctx_end, /* end current context */
- dst_ln_col_run_1, /* next byte is column position of start of next statement, */
- /* following byte is length of statement */
- dst_ln_col_run_2, /* next 2 bytes is column position of start of next statement, */
- /* following 2 bytes is length of statement */
- dst_ln_init_base1, /* next 4 bytes are absolute PC, followed by 1 byte of line number */
- dst_ln_init_base2, /* next 4 bytes are absolute PC, followed by 2 bytes of line number */
- dst_ln_init_base3, /* next 4 bytes are absolute PC, followed by 3 bytes of line number */
- dst_ln_escape2_END_OF_ENUM
-}
-dst_ln_escape2_t;
-
-typedef union
-{
- struct
- {
- unsigned int pc_delta : 4; /* 4 bit pc delta */
- int ln_delta : 4; /* 4 bit line number delta */
- }
- delta;
-
- struct
- {
- unsigned int esc_flag : 4; /* alias for pc_delta */
- unsigned int esc_code : 4; /* escape function code (dst_ln_escape1_t, or ...2_t */
- }
- esc;
-
- struct
- {
- unsigned int esc_flag : 4; /* dst_ln_ctx_spec1, or dst_ln_ctx_spec2 */
- unsigned int run_length : 2;
- unsigned int ctx_index : 2; /* ...spec2 contains index; ...spec1, index - 4 */
- }
- ctx_spec;
-
- char sdata; /* signed data byte */
- unsigned char udata; /* unsigned data byte */
-}
-dst_ln_entry_t,
- * dst_ln_entry_ptr_t;
-
-/* Warning: although the above union occupies only 1 byte the compiler treats
- it as having size 2 (the minimum size of a struct). Therefore a sequence of
- dst_ln_entry_t's cannot be described as an array, and walking through such a
- sequence requires convoluted code such as
- ln_ptr = (dst_ln_entry_ptr_t) (char*) ln_ptr + 1
- We regret the inconvenience. */
-
-/* Structure for interpreting the byte following a dst_ln_ctx1 entry. */
-typedef struct
-{
- unsigned int ctx1_index : 5; /* 5 bit index into context table */
- unsigned int ctx1_run_length : 3; /* 3 bit run length */
-} dst_ln_ctx1_t,
- *dst_ln_ctx1_ptr_t;
-
-/* Structure for interpreting the bytes following a dst_ln_ctx2 entry. */
-typedef struct
-{
- unsigned int ctx2_index : 13; /* 13 bit index into context table */
- unsigned int ctx2_run_length : 3; /* 3 bit run length */
-} dst_ln_ctx2_t,
- *dst_ln_ctx2_ptr_t;
-
-/* Structure for interpreting the bytes following a dst_ln_ctx4 entry. */
-typedef struct
-{
- unsigned int ctx4_index : 29; /* 29 bit index into context table */
- unsigned int ctx4_run_length : 3; /* 3 bit run length */
-} dst_ln_ctx4_t,
- *dst_ln_ctx4_ptr_t;
-
-
-/* PXDB definitions.
-
- PXDB is a post-processor which takes the executable file
- and massages the debug information so that the debugger may
- start up and run more efficiently. Some of the tasks
- performed by PXDB are:
-
- o Remove duplicate global type and variable information
- from the GNTT,
-
- o Append the GNTT onto the end of the LNTT and place both
- back in the LNTT section,
-
- o Build quick look-up tables (description follows) for
- files, procedures, modules, and paragraphs (for Cobol),
- placing these in the GNTT section,
-
- o Reconstruct the header appearing in the header section
- to access this information.
-
- The "quick look-up" tables are in the $GNTT$ sub-space, in
- the following order:
-
- Procedures -sorted by address
- Source files -sorted by address (of the
- generated code from routines)
- Modules -sorted by address
- Classes -<unsorted?>
- Address Alias -sorted by index <?>
- Object IDs -sorted by object identifier
-
- Most quick entries have (0-based) indices into the LNTT tables to
- the full entries for the item it describes.
-
- The post-PXDB header is in the $HEADER$ sub-space. Alas, it
- occurs in different forms, depending on the optimization level
- in the compilation step and whether PXDB was run or not. The
- worst part is the forms aren't self-describing, so we'll have
- to grovel in the bits to figure out what kind we're looking at
- (see hp_get_header in hp-psymtab-read.c). */
-
-/* PXDB versions. */
-
-#define PXDB_VERSION_CPLUSPLUS 1
-#define PXDB_VERSION_7_4 2
-#define PXDB_VERSION_CPP_30 3
-#define PXDB_VERSION_DDE_3_2A 4
-#define PXDB_VERSION_DDE_3_2 5
-#define PXDB_VERSION_DDE_4_0 6
-
-#define PXDB_VERSION_2_1 1
-
-/* Header version for the case that there is no DOC info
- but the executable has been processed by pxdb (the easy
- case, from "cc -g"). */
-
-typedef struct PXDB_struct
-{
- int pd_entries; /* # of entries in function look-up table */
- int fd_entries; /* # of entries in file look-up table */
- int md_entries; /* # of entries in module look-up table */
- unsigned int pxdbed : 1; /* 1 => file has been preprocessed */
- unsigned int bighdr : 1; /* 1 => this header contains 'time' word */
- unsigned int sa_header : 1;/* 1 => created by SA version of pxdb */
- /* used for version check in xdb */
- unsigned int inlined: 1; /* one or more functions have been inlined */
- unsigned int spare:12;
- short version; /* pxdb header version */
- int globals; /* index into the DNTT where GNTT begins */
- unsigned int time; /* modify time of file before being pxdbed */
- int pg_entries; /* # of entries in label look-up table */
- int functions; /* actual number of functions */
- int files; /* actual number of files */
- int cd_entries; /* # of entries in class look-up table */
- int aa_entries; /* # of entries in addr alias look-up table */
- int oi_entries; /* # of entries in object id look-up table */
-} PXDB_header, *PXDB_header_ptr;
-
-/* Header version for the case that there is no DOC info and the
- executable has NOT been processed by pxdb. */
-
-typedef struct XDB_header_struct
-{
- long gntt_length;
- long lntt_length;
- long slt_length;
- long vt_length;
- long xt_length;
-} XDB_header;
-
-/* Header version for the case that there is DOC info and the
- executable has been processed by pxdb. */
-
-typedef struct DOC_info_PXDB_header_struct
-{
- unsigned int xdb_header: 1; /* bit set if this is post-3.1 xdb */
- unsigned int doc_header: 1; /* bit set if this is doc-style header */
- unsigned int version: 8; /* version of pxdb see defines
- PXDB_VERSION_* in this file. */
- unsigned int reserved_for_flags: 16;/* for future use; -- must be
- set to zero. */
- unsigned int has_aux_pd_table: 1; /* $GNTT$ has aux PD table */
- unsigned int has_expr_table: 1; /* space has $EXPR$ */
- unsigned int has_range_table: 1; /* space has $RANGE$ */
- unsigned int has_context_table: 1; /* space has $SRC_CTXT$ */
- unsigned int has_lines_table: 1; /* space contains a $LINES$
- subspace for line tables. */
- unsigned int has_lt_offset_map: 1; /* space contains an lt_offset
- subspace for line table mapping. */
- /* The following fields are the same as those in the PXDB_header in $DEBUG$ */
- int pd_entries; /* # of entries in function look-up table */
- int fd_entries; /* # of entries in file look-up table */
- int md_entries; /* # of entries in module look-up table */
- unsigned int pxdbed : 1; /* 1 => file has been preprocessed */
- unsigned int bighdr : 1; /* 1 => this header contains 'time' word */
- unsigned int sa_header : 1;/* 1 => created by SA version of pxdb */
- /* used for version check in xdb */
- unsigned int inlined: 1; /* one or more functions have been inlined */
- unsigned int spare : 28;
- int globals; /* index into the DNTT where GNTT begins */
- unsigned int time; /* modify time of file before being pxdbed */
- int pg_entries; /* # of entries in label look-up table */
- int functions; /* actual number of functions */
- int files; /* actual number of files */
- int cd_entries; /* # of entries in class look-up table */
- int aa_entries; /* # of entries in addr alias look-up table */
- int oi_entries; /* # of entries in object id look-up table */
-} DOC_info_PXDB_header;
-
-/* Header version for the case that there is DOC info and the
- executable has NOT been processed by pxdb. */
-
-typedef struct DOC_info_header_struct
-{
- unsigned int xdb_header: 1; /* bit set if this is post-3.1 xdb */
- unsigned int doc_header: 1; /* bit set if this is doc-style header*/
- unsigned int version: 8; /* version of debug/header
- format. For 10.0 the value
- will be 1. For "Davis" the value is 2. */
- unsigned int reserved_for_flags: 18; /* for future use; -- must be set to zero. */
- unsigned int has_range_table: 1; /* space contains a $RANGE$ subspace for variable ranges. */
- unsigned int has_context_table: 1; /* space contains a $CTXT$ subspace for context/inline table. */
- unsigned int has_lines_table: 1; /* space contains a $LINES$ subspace for line tables. */
- unsigned int has_lt_offset_map: 1; /* space contains an lt_offset subspace for line table mapping. */
-
- long gntt_length; /* same as old header */
- long lntt_length; /* same as old header */
- long slt_length; /* same as old header */
- long vt_length; /* same as old header */
- long xt_length; /* same as old header */
- long ctxt_length; /* present only if version >= 2 */
- long range_length; /* present only if version >= 2 */
- long expr_length; /* present only if version >= 2 */
-
-} DOC_info_header;
-
-typedef union GenericDebugHeader_union
-{
- PXDB_header no_doc;
- DOC_info_PXDB_header doc;
- XDB_header no_pxdb_no_doc;
- DOC_info_header no_pxdb_doc;
-} GenericDebugHeader;
-
-
-/* Procedure Descriptor:
- An element of the procedure quick look-up table. */
-
-typedef struct quick_procedure
-{
- long isym; /* 0-based index of first symbol
- for procedure in $LNTT$,
- i.e. the procedure itself. */
- CORE_ADDR adrStart; /* memory adr of start of proc */
- CORE_ADDR adrEnd; /* memory adr of end of proc */
- char *sbAlias; /* alias name of procedure */
- char *sbProc; /* real name of procedure */
- CORE_ADDR adrBp; /* address of entry breakpoint */
- CORE_ADDR adrExitBp; /* address of exit breakpoint */
- int icd; /* member of this class (index) */
- unsigned int ipd; /* index of template for this */
- /* function (index) */
- unsigned int unused: 5;
- unsigned int no_lt_offset: 1;/* no entry in lt_offset table */
- unsigned int fTemplate: 1; /* function template */
- unsigned int fExpansion: 1; /* function expansion */
- unsigned int linked : 1; /* linked with other expansions */
- unsigned int duplicate: 1; /* clone of another procedure */
- unsigned int overloaded:1; /* overloaded function */
- unsigned int member: 1; /* class member function */
- unsigned int constructor:1; /* constructor function */
- unsigned int destructor:1; /* destructor function */
- unsigned int Static: 1; /* static function */
- unsigned int Virtual: 1; /* virtual function */
- unsigned int constant: 1; /* constant function */
- unsigned int pure: 1; /* pure (virtual) function */
- unsigned int language: 4; /* procedure's language */
- unsigned int inlined: 1; /* function has been inlined */
- unsigned int Operator: 1; /* operator function */
- unsigned int stub: 1; /* bodyless function */
- unsigned int optimize: 2; /* optimization level */
- unsigned int level: 5; /* nesting level (top=0) */
-} quick_procedure_entry, *quick_procedure_entry_ptr;
-
-/* Source File Descriptor:
- An element of the source file quick look-up table. */
-
-typedef struct quick_source
-{
- long isym; /* 0-based index in $LNTT$ of
- first symbol for this file. */
- CORE_ADDR adrStart; /* mem adr of start of file's code */
- CORE_ADDR adrEnd; /* mem adr of end of file's code */
- char *sbFile; /* name of source file */
- unsigned int fHasDecl: 1; /* do we have a .d file? */
- unsigned int fWarned: 1; /* have warned about age problems? */
- unsigned int fSrcfile: 1; /* 0 => include 1=> source */
- unsigned short ilnMac; /* lines in file (0 if don't know) */
- int ipd; /* 0-based index of first procedure
- in this file, in the quick
- look-up table of procedures. */
- unsigned int *rgLn; /* line pointer array, if any */
-} quick_file_entry, *quick_file_entry_ptr;
-
-/* Module Descriptor:
- An element of the module quick reference table. */
-
-typedef struct quick_module
-{
- long isym; /* 0-based index of first
- symbol for module. */
- CORE_ADDR adrStart; /* adr of start of mod. */
- CORE_ADDR adrEnd; /* adr of end of mod. */
- char *sbAlias; /* alias name of module */
- char *sbMod; /* real name of module */
- unsigned int imports: 1; /* module have any imports? */
- unsigned int vars_in_front: 1; /* module globals in front? */
- unsigned int vars_in_gaps: 1; /* module globals in gaps? */
- unsigned int language: 4; /* type of language */
- unsigned int unused : 25;
- unsigned int unused2; /* space for future stuff */
-} quick_module_entry, *quick_module_entry_ptr;
-
-/* Auxiliary Procedure Descriptor:
- An element of the auxiliary procedure quick look-up table. */
-
-typedef struct quick_aux_procedure
-{
- long isym_inln; /* start on inline list for proc */
- long spare;
-} quick_aux_procedure_entry, *quick_aux_procedure_entry_ptr;
-
-/* Paragraph Descriptor:
- An element of the paragraph quick look-up table. */
-
-typedef struct quick_paragraph
-{
- long isym; /* first symbol for label (index) */
- CORE_ADDR adrStart; /* memory adr of start of label */
- CORE_ADDR adrEnd; /* memory adr of end of label */
- char *sbLab; /* name of label */
- unsigned int inst; /* Used in xdb to store inst @ bp */
- unsigned int sect: 1; /* true = section, false = parag. */
- unsigned int unused: 31; /* future use */
-} quick_paragraph_entry, *quick_paragraph_entry_ptr;
-
-/* Class Descriptor:
- An element of the class quick look-up table. */
-
-typedef struct quick_class
-{
- char *sbClass; /* name of class */
- long isym; /* class symbol (tag) */
- unsigned int type : 2; /* 0=class, 1=union, 2=struct */
- unsigned int fTemplate : 1;/* class template */
- unsigned int expansion : 1;/* template expansion */
- unsigned int unused :28;
- sltpointer lowscope; /* beginning of defined scope */
- sltpointer hiscope; /* end of defined scope */
-} quick_class_entry, *quick_class_entry_ptr;
-
-/* Address Alias Entry
- An element of the address alias quick look-up table. */
-
-typedef struct quick_alias
-{
- CORE_ADDR low;
- CORE_ADDR high;
- int index;
- unsigned int unused : 31;
- unsigned int alternate : 1; /* alternate unnamed aliases? */
-} quick_alias_entry, *quick_alias_entry_ptr;
-
-/* Object Identification Entry
- An element of the object identification quick look-up table. */
-
-typedef struct quick_obj_ID
-{
- CORE_ADDR obj_ident; /* class identifier */
- long isym; /* class symbol */
- long offset; /* offset to object start */
-} quick_obj_ID_entry, *quick_obj_ID_entry_ptr;
-
-#endif /* HP_SYMTAB_INCLUDED */
diff --git a/include/ieee.h b/include/ieee.h
deleted file mode 100644
index 72fcad4..0000000
--- a/include/ieee.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/* IEEE Standard 695-1980 "Universal Format for Object Modules" header file
-
- Copyright 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor,
- Boston, MA 02110-1301, USA.
-
- Contributed by Cygnus Support. */
-
-#define N_W_VARIABLES 8
-#define Module_Beginning 0xe0
-
-typedef struct ieee_module
- {
- char *processor;
- char *module_name;
- }
-ieee_module_begin_type;
-
-#define Address_Descriptor 0xec
-typedef struct ieee_address
- {
- bfd_vma number_of_bits_mau;
- bfd_vma number_of_maus_in_address;
-
- unsigned char byte_order;
-#define IEEE_LITTLE 0xcc
-#define IEEE_BIG 0xcd
- }
-ieee_address_descriptor_type;
-
-typedef union ieee_w_variable
- {
- file_ptr offset[N_W_VARIABLES];
-
- struct
- {
- file_ptr extension_record;
- file_ptr environmental_record;
- file_ptr section_part;
- file_ptr external_part;
- file_ptr debug_information_part;
- file_ptr data_part;
- file_ptr trailer_part;
- file_ptr me_record;
- }
- r;
- }
-ieee_w_variable_type;
-
-typedef enum ieee_record
- {
- ieee_number_start_enum = 0x00,
- ieee_number_end_enum=0x7f,
- ieee_number_repeat_start_enum = 0x80,
- ieee_number_repeat_end_enum = 0x88,
- ieee_number_repeat_4_enum = 0x84,
- ieee_number_repeat_3_enum = 0x83,
- ieee_number_repeat_2_enum = 0x82,
- ieee_number_repeat_1_enum = 0x81,
- ieee_module_beginning_enum = 0xe0,
- ieee_module_end_enum = 0xe1,
- ieee_extension_length_1_enum = 0xde,
- ieee_extension_length_2_enum = 0xdf,
- ieee_section_type_enum = 0xe6,
- ieee_section_alignment_enum = 0xe7,
- ieee_external_symbol_enum = 0xe8,
- ieee_comma = 0x90,
- ieee_external_reference_enum = 0xe9,
- ieee_set_current_section_enum = 0xe5,
- ieee_address_descriptor_enum = 0xec,
- ieee_load_constant_bytes_enum = 0xed,
- ieee_load_with_relocation_enum = 0xe4,
-
- ieee_variable_A_enum = 0xc1,
- ieee_variable_B_enum = 0xc2,
- ieee_variable_C_enum = 0xc3,
- ieee_variable_D_enum = 0xc4,
- ieee_variable_E_enum = 0xc5,
- ieee_variable_F_enum = 0xc6,
- ieee_variable_G_enum = 0xc7,
- ieee_variable_H_enum = 0xc8,
- ieee_variable_I_enum = 0xc9,
- ieee_variable_J_enum = 0xca,
- ieee_variable_K_enum = 0xcb,
- ieee_variable_L_enum = 0xcc,
- ieee_variable_M_enum = 0xcd,
- ieee_variable_N_enum = 0xce,
- ieee_variable_O_enum = 0xcf,
- ieee_variable_P_enum = 0xd0,
- ieee_variable_Q_enum = 0xd1,
- ieee_variable_R_enum = 0xd2,
- ieee_variable_S_enum = 0xd3,
- ieee_variable_T_enum = 0xd4,
- ieee_variable_U_enum = 0xd5,
- ieee_variable_V_enum = 0xd6,
- ieee_variable_W_enum = 0xd7,
- ieee_variable_X_enum = 0xd8,
- ieee_variable_Y_enum = 0xd9,
- ieee_variable_Z_enum = 0xda,
- ieee_function_plus_enum = 0xa5,
- ieee_function_minus_enum = 0xa6,
- ieee_function_signed_open_b_enum = 0xba,
- ieee_function_signed_close_b_enum = 0xbb,
-
- ieee_function_unsigned_open_b_enum = 0xbc,
- ieee_function_unsigned_close_b_enum = 0xbd,
-
- ieee_function_either_open_b_enum = 0xbe,
- ieee_function_either_close_b_enum = 0xbf,
- ieee_record_seperator_enum = 0xdb,
-
- ieee_e2_first_byte_enum = 0xe2,
- ieee_section_size_enum = 0xe2d3,
- ieee_physical_region_size_enum = 0xe2c1,
- ieee_region_base_address_enum = 0xe2c2,
- ieee_mau_size_enum = 0xe2c6,
- ieee_m_value_enum = 0xe2cd,
- ieee_section_base_address_enum = 0xe2cc,
- ieee_asn_record_enum = 0xe2ce,
- ieee_section_offset_enum = 0xe2d2,
- ieee_value_starting_address_enum = 0xe2c7,
- ieee_assign_value_to_variable_enum = 0xe2d7,
- ieee_set_current_pc_enum = 0xe2d0,
- ieee_value_record_enum = 0xe2c9,
- ieee_nn_record = 0xf0,
- ieee_at_record_enum = 0xf1,
- ieee_ty_record_enum = 0xf2,
- ieee_attribute_record_enum = 0xf1c9,
- ieee_atn_record_enum = 0xf1ce,
- ieee_external_reference_info_record_enum = 0xf1d8,
- ieee_weak_external_reference_enum= 0xf4,
- ieee_repeat_data_enum = 0xf7,
- ieee_bb_record_enum = 0xf8,
- ieee_be_record_enum = 0xf9
- }
-ieee_record_enum_type;
-
-typedef struct ieee_section
- {
- unsigned int section_index;
- unsigned int section_type;
- char * section_name;
- unsigned int parent_section_index;
- unsigned int sibling_section_index;
- unsigned int context_index;
- }
-ieee_section_type;
-
-#define IEEE_REFERENCE_BASE 11
-#define IEEE_PUBLIC_BASE 32
-#define IEEE_SECTION_NUMBER_BASE 1
-
diff --git a/include/libiberty.h b/include/libiberty.h
deleted file mode 100644
index e3eca9d..0000000
--- a/include/libiberty.h
+++ /dev/null
@@ -1,662 +0,0 @@
-/* Function declarations for libiberty.
-
- Copyright 2001, 2002, 2005, 2007 Free Software Foundation, Inc.
-
- Note - certain prototypes declared in this header file are for
- functions whoes implementation copyright does not belong to the
- FSF. Those prototypes are present in this file for reference
- purposes only and their presence in this file should not construed
- as an indication of ownership by the FSF of the implementation of
- those functions in any way or form whatsoever.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor,
- Boston, MA 02110-1301, USA.
-
- Written by Cygnus Support, 1994.
-
- The libiberty library provides a number of functions which are
- missing on some operating systems. We do not declare those here,
- to avoid conflicts with the system header files on operating
- systems that do support those functions. In this file we only
- declare those functions which are specific to libiberty. */
-
-#ifndef LIBIBERTY_H
-#define LIBIBERTY_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ansidecl.h"
-
-/* Get a definition for size_t. */
-#include <stddef.h>
-/* Get a definition for va_list. */
-#include <stdarg.h>
-
-#include <stdio.h>
-
-/* If the OS supports it, ensure that the supplied stream is setup to
- avoid any multi-threaded locking. Otherwise leave the FILE pointer
- unchanged. If the stream is NULL do nothing. */
-
-extern void unlock_stream (FILE *);
-
-/* If the OS supports it, ensure that the standard I/O streams, stdin,
- stdout and stderr are setup to avoid any multi-threaded locking.
- Otherwise do nothing. */
-
-extern void unlock_std_streams (void);
-
-/* Open and return a FILE pointer. If the OS supports it, ensure that
- the stream is setup to avoid any multi-threaded locking. Otherwise
- return the FILE pointer unchanged. */
-
-extern FILE *fopen_unlocked (const char *, const char *);
-extern FILE *fdopen_unlocked (int, const char *);
-extern FILE *freopen_unlocked (const char *, const char *, FILE *);
-
-/* Build an argument vector from a string. Allocates memory using
- malloc. Use freeargv to free the vector. */
-
-extern char **buildargv (const char *) ATTRIBUTE_MALLOC;
-
-/* Free a vector returned by buildargv. */
-
-extern void freeargv (char **);
-
-/* Duplicate an argument vector. Allocates memory using malloc. Use
- freeargv to free the vector. */
-
-extern char **dupargv (char **) ATTRIBUTE_MALLOC;
-
-/* Expand "@file" arguments in argv. */
-
-extern void expandargv PARAMS ((int *, char ***));
-
-/* Write argv to an @-file, inserting necessary quoting. */
-
-extern int writeargv PARAMS ((char **, FILE *));
-
-/* Return the last component of a path name. Note that we can't use a
- prototype here because the parameter is declared inconsistently
- across different systems, sometimes as "char *" and sometimes as
- "const char *" */
-
-/* HAVE_DECL_* is a three-state macro: undefined, 0 or 1. If it is
- undefined, we haven't run the autoconf check so provide the
- declaration without arguments. If it is 0, we checked and failed
- to find the declaration so provide a fully prototyped one. If it
- is 1, we found it so don't provide any declaration at all. */
-#if !HAVE_DECL_BASENAME
-#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (__MINGW32__) || defined (HAVE_DECL_BASENAME)
-extern char *basename (const char *);
-#else
-/* Do not allow basename to be used if there is no prototype seen. We
- either need to use the above prototype or have one from
- autoconf which would result in HAVE_DECL_BASENAME being set. */
-#define basename basename_cannot_be_used_without_a_prototype
-#endif
-#endif
-
-/* A well-defined basename () that is always compiled in. */
-
-extern const char *lbasename (const char *);
-
-/* A well-defined realpath () that is always compiled in. */
-
-extern char *lrealpath (const char *);
-
-/* Concatenate an arbitrary number of strings. You must pass NULL as
- the last argument of this function, to terminate the list of
- strings. Allocates memory using xmalloc. */
-
-extern char *concat (const char *, ...) ATTRIBUTE_MALLOC ATTRIBUTE_SENTINEL;
-
-/* Concatenate an arbitrary number of strings. You must pass NULL as
- the last argument of this function, to terminate the list of
- strings. Allocates memory using xmalloc. The first argument is
- not one of the strings to be concatenated, but if not NULL is a
- pointer to be freed after the new string is created, similar to the
- way xrealloc works. */
-
-extern char *reconcat (char *, const char *, ...) ATTRIBUTE_MALLOC ATTRIBUTE_SENTINEL;
-
-/* Determine the length of concatenating an arbitrary number of
- strings. You must pass NULL as the last argument of this function,
- to terminate the list of strings. */
-
-extern unsigned long concat_length (const char *, ...) ATTRIBUTE_SENTINEL;
-
-/* Concatenate an arbitrary number of strings into a SUPPLIED area of
- memory. You must pass NULL as the last argument of this function,
- to terminate the list of strings. The supplied memory is assumed
- to be large enough. */
-
-extern char *concat_copy (char *, const char *, ...) ATTRIBUTE_SENTINEL;
-
-/* Concatenate an arbitrary number of strings into a GLOBAL area of
- memory. You must pass NULL as the last argument of this function,
- to terminate the list of strings. The supplied memory is assumed
- to be large enough. */
-
-extern char *concat_copy2 (const char *, ...) ATTRIBUTE_SENTINEL;
-
-/* This is the global area used by concat_copy2. */
-
-extern char *libiberty_concat_ptr;
-
-/* Concatenate an arbitrary number of strings. You must pass NULL as
- the last argument of this function, to terminate the list of
- strings. Allocates memory using alloca. The arguments are
- evaluated twice! */
-#define ACONCAT(ACONCAT_PARAMS) \
- (libiberty_concat_ptr = (char *) alloca (concat_length ACONCAT_PARAMS + 1), \
- concat_copy2 ACONCAT_PARAMS)
-
-/* Check whether two file descriptors refer to the same file. */
-
-extern int fdmatch (int fd1, int fd2);
-
-/* Return the position of the first bit set in the argument. */
-/* Prototypes vary from system to system, so we only provide a
- prototype on systems where we know that we need it. */
-#if defined (HAVE_DECL_FFS) && !HAVE_DECL_FFS
-extern int ffs(int);
-#endif
-
-/* Get the working directory. The result is cached, so don't call
- chdir() between calls to getpwd(). */
-
-extern char * getpwd (void);
-
-/* Get the current time. */
-/* Prototypes vary from system to system, so we only provide a
- prototype on systems where we know that we need it. */
-#ifdef __MINGW32__
-/* Forward declaration to avoid #include <sys/time.h>. */
-struct timeval;
-extern int gettimeofday (struct timeval *, void *);
-#endif
-
-/* Get the amount of time the process has run, in microseconds. */
-
-extern long get_run_time (void);
-
-/* Generate a relocated path to some installation directory. Allocates
- return value using malloc. */
-
-extern char *make_relative_prefix (const char *, const char *,
- const char *) ATTRIBUTE_MALLOC;
-
-/* Generate a relocated path to some installation directory without
- attempting to follow any soft links. Allocates
- return value using malloc. */
-
-extern char *make_relative_prefix_ignore_links (const char *, const char *,
- const char *) ATTRIBUTE_MALLOC;
-
-/* Choose a temporary directory to use for scratch files. */
-
-extern char *choose_temp_base (void) ATTRIBUTE_MALLOC;
-
-/* Return a temporary file name or NULL if unable to create one. */
-
-extern char *make_temp_file (const char *) ATTRIBUTE_MALLOC;
-
-/* Remove a link to a file unless it is special. */
-
-extern int unlink_if_ordinary (const char *);
-
-/* Allocate memory filled with spaces. Allocates using malloc. */
-
-extern const char *spaces (int count);
-
-/* Return the maximum error number for which strerror will return a
- string. */
-
-extern int errno_max (void);
-
-/* Return the name of an errno value (e.g., strerrno (EINVAL) returns
- "EINVAL"). */
-
-extern const char *strerrno (int);
-
-/* Given the name of an errno value, return the value. */
-
-extern int strtoerrno (const char *);
-
-/* ANSI's strerror(), but more robust. */
-
-extern char *xstrerror (int);
-
-/* Return the maximum signal number for which strsignal will return a
- string. */
-
-extern int signo_max (void);
-
-/* Return a signal message string for a signal number
- (e.g., strsignal (SIGHUP) returns something like "Hangup"). */
-/* This is commented out as it can conflict with one in system headers.
- We still document its existence though. */
-
-/*extern const char *strsignal (int);*/
-
-/* Return the name of a signal number (e.g., strsigno (SIGHUP) returns
- "SIGHUP"). */
-
-extern const char *strsigno (int);
-
-/* Given the name of a signal, return its number. */
-
-extern int strtosigno (const char *);
-
-/* Register a function to be run by xexit. Returns 0 on success. */
-
-extern int xatexit (void (*fn) (void));
-
-/* Exit, calling all the functions registered with xatexit. */
-
-extern void xexit (int status) ATTRIBUTE_NORETURN;
-
-/* Set the program name used by xmalloc. */
-
-extern void xmalloc_set_program_name (const char *);
-
-/* Report an allocation failure. */
-extern void xmalloc_failed (size_t) ATTRIBUTE_NORETURN;
-
-/* Allocate memory without fail. If malloc fails, this will print a
- message to stderr (using the name set by xmalloc_set_program_name,
- if any) and then call xexit. */
-
-extern void *xmalloc (size_t) ATTRIBUTE_MALLOC;
-
-/* Reallocate memory without fail. This works like xmalloc. Note,
- realloc type functions are not suitable for attribute malloc since
- they may return the same address across multiple calls. */
-
-extern void *xrealloc (void *, size_t);
-
-/* Allocate memory without fail and set it to zero. This works like
- xmalloc. */
-
-extern void *xcalloc (size_t, size_t) ATTRIBUTE_MALLOC;
-
-/* Copy a string into a memory buffer without fail. */
-
-extern char *xstrdup (const char *) ATTRIBUTE_MALLOC;
-
-/* Copy at most N characters from string into a buffer without fail. */
-
-extern char *xstrndup (const char *, size_t) ATTRIBUTE_MALLOC;
-
-/* Copy an existing memory buffer to a new memory buffer without fail. */
-
-extern void *xmemdup (const void *, size_t, size_t) ATTRIBUTE_MALLOC;
-
-/* Physical memory routines. Return values are in BYTES. */
-extern double physmem_total (void);
-extern double physmem_available (void);
-
-
-/* These macros provide a K&R/C89/C++-friendly way of allocating structures
- with nice encapsulation. The XDELETE*() macros are technically
- superfluous, but provided here for symmetry. Using them consistently
- makes it easier to update client code to use different allocators such
- as new/delete and new[]/delete[]. */
-
-/* Scalar allocators. */
-
-#define XALLOCA(T) ((T *) alloca (sizeof (T)))
-#define XNEW(T) ((T *) xmalloc (sizeof (T)))
-#define XCNEW(T) ((T *) xcalloc (1, sizeof (T)))
-#define XDUP(T, P) ((T *) xmemdup ((P), sizeof (T), sizeof (T)))
-#define XDELETE(P) free ((void*) (P))
-
-/* Array allocators. */
-
-#define XALLOCAVEC(T, N) ((T *) alloca (sizeof (T) * (N)))
-#define XNEWVEC(T, N) ((T *) xmalloc (sizeof (T) * (N)))
-#define XCNEWVEC(T, N) ((T *) xcalloc ((N), sizeof (T)))
-#define XDUPVEC(T, P, N) ((T *) xmemdup ((P), sizeof (T) * (N), sizeof (T) * (N)))
-#define XRESIZEVEC(T, P, N) ((T *) xrealloc ((void *) (P), sizeof (T) * (N)))
-#define XDELETEVEC(P) free ((void*) (P))
-
-/* Allocators for variable-sized structures and raw buffers. */
-
-#define XALLOCAVAR(T, S) ((T *) alloca ((S)))
-#define XNEWVAR(T, S) ((T *) xmalloc ((S)))
-#define XCNEWVAR(T, S) ((T *) xcalloc (1, (S)))
-#define XDUPVAR(T, P, S1, S2) ((T *) xmemdup ((P), (S1), (S2)))
-#define XRESIZEVAR(T, P, S) ((T *) xrealloc ((P), (S)))
-
-/* Type-safe obstack allocator. */
-
-#define XOBNEW(O, T) ((T *) obstack_alloc ((O), sizeof (T)))
-#define XOBNEWVEC(O, T, N) ((T *) obstack_alloc ((O), sizeof (T) * (N)))
-#define XOBNEWVAR(O, T, S) ((T *) obstack_alloc ((O), (S)))
-#define XOBFINISH(O, T) ((T) obstack_finish ((O)))
-
-/* hex character manipulation routines */
-
-#define _hex_array_size 256
-#define _hex_bad 99
-extern const unsigned char _hex_value[_hex_array_size];
-extern void hex_init (void);
-#define hex_p(c) (hex_value (c) != _hex_bad)
-/* If you change this, note well: Some code relies on side effects in
- the argument being performed exactly once. */
-#define hex_value(c) ((unsigned int) _hex_value[(unsigned char) (c)])
-
-/* Flags for pex_init. These are bits to be or'ed together. */
-
-/* Record subprocess times, if possible. */
-#define PEX_RECORD_TIMES 0x1
-
-/* Use pipes for communication between processes, if possible. */
-#define PEX_USE_PIPES 0x2
-
-/* Save files used for communication between processes. */
-#define PEX_SAVE_TEMPS 0x4
-
-/* Prepare to execute one or more programs, with standard output of
- each program fed to standard input of the next.
- FLAGS As above.
- PNAME The name of the program to report in error messages.
- TEMPBASE A base name to use for temporary files; may be NULL to
- use a random name.
- Returns NULL on error. */
-
-extern struct pex_obj *pex_init (int flags, const char *pname,
- const char *tempbase);
-
-/* Flags for pex_run. These are bits to be or'ed together. */
-
-/* Last program in pipeline. Standard output of program goes to
- OUTNAME, or, if OUTNAME is NULL, to standard output of caller. Do
- not set this if you want to call pex_read_output. After this is
- set, pex_run may no longer be called with the same struct
- pex_obj. */
-#define PEX_LAST 0x1
-
-/* Search for program in executable search path. */
-#define PEX_SEARCH 0x2
-
-/* OUTNAME is a suffix. */
-#define PEX_SUFFIX 0x4
-
-/* Send program's standard error to standard output. */
-#define PEX_STDERR_TO_STDOUT 0x8
-
-/* Input file should be opened in binary mode. This flag is ignored
- on Unix. */
-#define PEX_BINARY_INPUT 0x10
-
-/* Output file should be opened in binary mode. This flag is ignored
- on Unix. For proper behaviour PEX_BINARY_INPUT and
- PEX_BINARY_OUTPUT have to match appropriately--i.e., a call using
- PEX_BINARY_OUTPUT should be followed by a call using
- PEX_BINARY_INPUT. */
-#define PEX_BINARY_OUTPUT 0x20
-
-/* Capture stderr to a pipe. The output can be read by
- calling pex_read_err and reading from the returned
- FILE object. This flag may be specified only for
- the last program in a pipeline.
-
- This flag is supported only on Unix and Windows. */
-#define PEX_STDERR_TO_PIPE 0x40
-
-/* Capture stderr in binary mode. This flag is ignored
- on Unix. */
-#define PEX_BINARY_ERROR 0x80
-
-
-/* Execute one program. Returns NULL on success. On error returns an
- error string (typically just the name of a system call); the error
- string is statically allocated.
-
- OBJ Returned by pex_init.
-
- FLAGS As above.
-
- EXECUTABLE The program to execute.
-
- ARGV NULL terminated array of arguments to pass to the program.
-
- OUTNAME Sets the output file name as follows:
-
- PEX_SUFFIX set (OUTNAME may not be NULL):
- TEMPBASE parameter to pex_init not NULL:
- Output file name is the concatenation of TEMPBASE
- and OUTNAME.
- TEMPBASE is NULL:
- Output file name is a random file name ending in
- OUTNAME.
- PEX_SUFFIX not set:
- OUTNAME not NULL:
- Output file name is OUTNAME.
- OUTNAME NULL, TEMPBASE not NULL:
- Output file name is randomly chosen using
- TEMPBASE.
- OUTNAME NULL, TEMPBASE NULL:
- Output file name is randomly chosen.
-
- If PEX_LAST is not set, the output file name is the
- name to use for a temporary file holding stdout, if
- any (there will not be a file if PEX_USE_PIPES is set
- and the system supports pipes). If a file is used, it
- will be removed when no longer needed unless
- PEX_SAVE_TEMPS is set.
-
- If PEX_LAST is set, and OUTNAME is not NULL, standard
- output is written to the output file name. The file
- will not be removed. If PEX_LAST and PEX_SUFFIX are
- both set, TEMPBASE may not be NULL.
-
- ERRNAME If not NULL, this is the name of a file to which
- standard error is written. If NULL, standard error of
- the program is standard error of the caller.
-
- ERR On an error return, *ERR is set to an errno value, or
- to 0 if there is no relevant errno.
-*/
-
-extern const char *pex_run (struct pex_obj *obj, int flags,
- const char *executable, char * const *argv,
- const char *outname, const char *errname,
- int *err);
-
-/* As for pex_run (), but takes an extra parameter to enable the
- environment for the child process to be specified.
-
- ENV The environment for the child process, specified as
- an array of character pointers. Each element of the
- array should point to a string of the form VAR=VALUE,
- with the exception of the last element which must be
- a null pointer.
-*/
-
-extern const char *pex_run_in_environment (struct pex_obj *obj, int flags,
- const char *executable,
- char * const *argv,
- char * const *env,
- const char *outname,
- const char *errname, int *err);
-
-/* Return a stream for a temporary file to pass to the first program
- in the pipeline as input. The file name is chosen as for pex_run.
- pex_run closes the file automatically; don't close it yourself. */
-
-extern FILE *pex_input_file (struct pex_obj *obj, int flags,
- const char *in_name);
-
-/* Return a stream for a pipe connected to the standard input of the
- first program in the pipeline. You must have passed
- `PEX_USE_PIPES' to `pex_init'. Close the returned stream
- yourself. */
-
-extern FILE *pex_input_pipe (struct pex_obj *obj, int binary);
-
-/* Read the standard output of the last program to be executed.
- pex_run can not be called after this. BINARY should be non-zero if
- the file should be opened in binary mode; this is ignored on Unix.
- Returns NULL on error. Don't call fclose on the returned FILE; it
- will be closed by pex_free. */
-
-extern FILE *pex_read_output (struct pex_obj *, int binary);
-
-/* Read the standard error of the last program to be executed.
- pex_run can not be called after this. BINARY should be non-zero if
- the file should be opened in binary mode; this is ignored on Unix.
- Returns NULL on error. Don't call fclose on the returned FILE; it
- will be closed by pex_free. */
-
-extern FILE *pex_read_err (struct pex_obj *, int binary);
-
-/* Return exit status of all programs in VECTOR. COUNT indicates the
- size of VECTOR. The status codes in the vector are in the order of
- the calls to pex_run. Returns 0 on error, 1 on success. */
-
-extern int pex_get_status (struct pex_obj *, int count, int *vector);
-
-/* Return times of all programs in VECTOR. COUNT indicates the size
- of VECTOR. struct pex_time is really just struct timeval, but that
- is not portable to all systems. Returns 0 on error, 1 on
- success. */
-
-struct pex_time
-{
- unsigned long user_seconds;
- unsigned long user_microseconds;
- unsigned long system_seconds;
- unsigned long system_microseconds;
-};
-
-extern int pex_get_times (struct pex_obj *, int count,
- struct pex_time *vector);
-
-/* Clean up a pex_obj. If you have not called pex_get_times or
- pex_get_status, this will try to kill the subprocesses. */
-
-extern void pex_free (struct pex_obj *);
-
-/* Just execute one program. Return value is as for pex_run.
- FLAGS Combination of PEX_SEARCH and PEX_STDERR_TO_STDOUT.
- EXECUTABLE As for pex_run.
- ARGV As for pex_run.
- PNAME As for pex_init.
- OUTNAME As for pex_run when PEX_LAST is set.
- ERRNAME As for pex_run.
- STATUS Set to exit status on success.
- ERR As for pex_run.
-*/
-
-extern const char *pex_one (int flags, const char *executable,
- char * const *argv, const char *pname,
- const char *outname, const char *errname,
- int *status, int *err);
-
-/* pexecute and pwait are the old pexecute interface, still here for
- backward compatibility. Don't use these for new code. Instead,
- use pex_init/pex_run/pex_get_status/pex_free, or pex_one. */
-
-/* Definitions used by the pexecute routine. */
-
-#define PEXECUTE_FIRST 1
-#define PEXECUTE_LAST 2
-#define PEXECUTE_ONE (PEXECUTE_FIRST + PEXECUTE_LAST)
-#define PEXECUTE_SEARCH 4
-#define PEXECUTE_VERBOSE 8
-
-/* Execute a program. */
-
-extern int pexecute (const char *, char * const *, const char *,
- const char *, char **, char **, int);
-
-/* Wait for pexecute to finish. */
-
-extern int pwait (int, int *, int);
-
-#if !HAVE_DECL_ASPRINTF
-/* Like sprintf but provides a pointer to malloc'd storage, which must
- be freed by the caller. */
-
-extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2;
-#endif
-
-#if !HAVE_DECL_VASPRINTF
-/* Like vsprintf but provides a pointer to malloc'd storage, which
- must be freed by the caller. */
-
-extern int vasprintf (char **, const char *, va_list) ATTRIBUTE_PRINTF(2,0);
-#endif
-
-#if defined(HAVE_DECL_SNPRINTF) && !HAVE_DECL_SNPRINTF
-/* Like sprintf but prints at most N characters. */
-extern int snprintf (char *, size_t, const char *, ...) ATTRIBUTE_PRINTF_3;
-#endif
-
-#if defined(HAVE_DECL_VSNPRINTF) && !HAVE_DECL_VSNPRINTF
-/* Like vsprintf but prints at most N characters. */
-extern int vsnprintf (char *, size_t, const char *, va_list) ATTRIBUTE_PRINTF(3,0);
-#endif
-
-#if defined(HAVE_DECL_STRVERSCMP) && !HAVE_DECL_STRVERSCMP
-/* Compare version strings. */
-extern int strverscmp (const char *, const char *);
-#endif
-
-#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
-
-/* Drastically simplified alloca configurator. If we're using GCC,
- we use __builtin_alloca; otherwise we use the C alloca. The C
- alloca is always available. You can override GCC by defining
- USE_C_ALLOCA yourself. The canonical autoconf macro C_ALLOCA is
- also set/unset as it is often used to indicate whether code needs
- to call alloca(0). */
-extern void *C_alloca (size_t) ATTRIBUTE_MALLOC;
-#undef alloca
-#if GCC_VERSION >= 2000 && !defined USE_C_ALLOCA
-# define alloca(x) __builtin_alloca(x)
-# undef C_ALLOCA
-# define ASTRDUP(X) \
- (__extension__ ({ const char *const libiberty_optr = (X); \
- const unsigned long libiberty_len = strlen (libiberty_optr) + 1; \
- char *const libiberty_nptr = (char *const) alloca (libiberty_len); \
- (char *) memcpy (libiberty_nptr, libiberty_optr, libiberty_len); }))
-#else
-# define alloca(x) C_alloca(x)
-# undef USE_C_ALLOCA
-# define USE_C_ALLOCA 1
-# undef C_ALLOCA
-# define C_ALLOCA 1
-extern const char *libiberty_optr;
-extern char *libiberty_nptr;
-extern unsigned long libiberty_len;
-# define ASTRDUP(X) \
- (libiberty_optr = (X), \
- libiberty_len = strlen (libiberty_optr) + 1, \
- libiberty_nptr = (char *) alloca (libiberty_len), \
- (char *) memcpy (libiberty_nptr, libiberty_optr, libiberty_len))
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* ! defined (LIBIBERTY_H) */
diff --git a/include/md5.h b/include/md5.h
deleted file mode 100644
index b3ff4e1..0000000
--- a/include/md5.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/* md5.h - Declaration of functions and data types used for MD5 sum
- computing library functions.
- Copyright 1995, 1996, 2000 Free Software Foundation, Inc.
- NOTE: The canonical source of this file is maintained with the GNU C
- Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _MD5_H
-#define _MD5_H 1
-
-#include <stdio.h>
-
-#if defined HAVE_LIMITS_H || _LIBC
-# include <limits.h>
-#endif
-
-#include "ansidecl.h"
-
-/* The following contortions are an attempt to use the C preprocessor
- to determine an unsigned integral type that is 32 bits wide. An
- alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
- doing that would require that the configure script compile and *run*
- the resulting executable. Locally running cross-compiled executables
- is usually not possible. */
-
-#ifdef _LIBC
-# include <sys/types.h>
-typedef u_int32_t md5_uint32;
-typedef uintptr_t md5_uintptr;
-#else
-# define INT_MAX_32_BITS 2147483647
-
-/* If UINT_MAX isn't defined, assume it's a 32-bit type.
- This should be valid for all systems GNU cares about because
- that doesn't include 16-bit systems, and only modern systems
- (that certainly have <limits.h>) have 64+-bit integral types. */
-
-# ifndef INT_MAX
-# define INT_MAX INT_MAX_32_BITS
-# endif
-
-# if INT_MAX == INT_MAX_32_BITS
- typedef unsigned int md5_uint32;
-# else
-# if SHRT_MAX == INT_MAX_32_BITS
- typedef unsigned short md5_uint32;
-# else
-# if LONG_MAX == INT_MAX_32_BITS
- typedef unsigned long md5_uint32;
-# else
- /* The following line is intended to evoke an error.
- Using #error is not portable enough. */
- "Cannot determine unsigned 32-bit data type."
-# endif
-# endif
-# endif
-/* We have to make a guess about the integer type equivalent in size
- to pointers which should always be correct. */
-typedef unsigned long int md5_uintptr;
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Structure to save state of computation between the single steps. */
-struct md5_ctx
-{
- md5_uint32 A;
- md5_uint32 B;
- md5_uint32 C;
- md5_uint32 D;
-
- md5_uint32 total[2];
- md5_uint32 buflen;
- char buffer[128] ATTRIBUTE_ALIGNED_ALIGNOF(md5_uint32);
-};
-
-/*
- * The following three functions are build up the low level used in
- * the functions `md5_stream' and `md5_buffer'.
- */
-
-/* Initialize structure containing state of computation.
- (RFC 1321, 3.3: Step 3) */
-extern void md5_init_ctx (struct md5_ctx *ctx);
-
-/* Starting with the result of former calls of this function (or the
- initialization function update the context for the next LEN bytes
- starting at BUFFER.
- It is necessary that LEN is a multiple of 64!!! */
-extern void md5_process_block (const void *buffer, size_t len,
- struct md5_ctx *ctx);
-
-/* Starting with the result of former calls of this function (or the
- initialization function update the context for the next LEN bytes
- starting at BUFFER.
- It is NOT required that LEN is a multiple of 64. */
-extern void md5_process_bytes (const void *buffer, size_t len,
- struct md5_ctx *ctx);
-
-/* Process the remaining bytes in the buffer and put result from CTX
- in first 16 bytes following RESBUF. The result is always in little
- endian byte order, so that a byte-wise output yields to the wanted
- ASCII representation of the message digest.
-
- IMPORTANT: On some systems it is required that RESBUF is correctly
- aligned for a 32 bits value. */
-extern void *md5_finish_ctx (struct md5_ctx *ctx, void *resbuf);
-
-
-/* Put result from CTX in first 16 bytes following RESBUF. The result is
- always in little endian byte order, so that a byte-wise output yields
- to the wanted ASCII representation of the message digest.
-
- IMPORTANT: On some systems it is required that RESBUF is correctly
- aligned for a 32 bits value. */
-extern void *md5_read_ctx (const struct md5_ctx *ctx, void *resbuf);
-
-
-/* Compute MD5 message digest for bytes read from STREAM. The
- resulting message digest number will be written into the 16 bytes
- beginning at RESBLOCK. */
-extern int md5_stream (FILE *stream, void *resblock);
-
-/* Compute MD5 message digest for LEN bytes beginning at BUFFER. The
- result is always in little endian byte order, so that a byte-wise
- output yields to the wanted ASCII representation of the message
- digest. */
-extern void *md5_buffer (const char *buffer, size_t len, void *resblock);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/nlm/ChangeLog b/include/nlm/ChangeLog
deleted file mode 100644
index a4b527d..0000000
--- a/include/nlm/ChangeLog
+++ /dev/null
@@ -1,100 +0,0 @@
-2005-05-10 Nick Clifton <nickc@redhat.com>
-
- * Update the address and phone number of the FSF organization in
- the GPL notices in the following files:
- alpha-ext.h, common.h, external.h, i386-ext.h, internal.h,
- ppc-ext.h, sparc32-ext.h
-
-2003-08-07 Alan Modra <amodra@bigpond.net.au>
-
- * internal.h (Nlm_Internal_Custom_Header): Replace PTR with void *.
-
-2001-10-02 Alan Modra <amodra@bigpond.net.au>
-
- * common.h (NLM_CAT, NLM_CAT3): Don't define.
- (NLM_CAT4): Update conditions under which this is defined. Document
- why CONCAT4 can't be used.
-
-1994-05-06 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * external.h (nlmNAME(External_Custom_Header)): Add length,
- dataOffset, and dataStamp field.
- (nlmNAME(External_Cygnus_Ext_Header)): Remove.
- * internal.h (Nlm_Internal_Custom_Header): Add hdrLength,
- dataOffset, dataStamp and hdr fields.
-
-1994-04-22 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * external.h (struct nlmNAME(external_cygnus_ext_header)): Rename
- from nlmNAME(external_cygnus_section_header). Change stamp field
- to 8 bytes. Add bytes field.
- * internal.h (nlm_internal_cygnus_ext_header): Rename from
- nlm_internal_cygnus_section_header. Change stamp field to 8
- bytes.
-
-1994-04-21 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * internal.h (struct nlm_internal_cygnus_section_header): Define.
- * external.h (struct nlmNAME(external_cygnus_section_header):
- Define.
-
-1994-04-20 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * internal.h (struct nlm_internal_custom_header): Remove
- debugRecOffset and debugRecLength fields. Add data field.
- * external.h (struct nlmNAME(external_custom_header)): Remove
- debugRecOffset and debugRecLength fields.
-
-1994-02-07 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * internal.h: Change HOST_64_BIT to BFD_HOST_64_BIT.
-
-1993-12-02 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * alpha-ext.h: New file describing formats of information in Alpha
- NetWare files.
- * common.h: Define some non-external Alpha information.
-
-1993-11-17 Sean Eric Fagan (sef@cygnus.com)
-
- * external.h: Don't define external_fixed_header here.
- * i386-ext.h, sparc32-ext.h: New header files to define
- external_fixed_header for particular CPU's.
-
-1993-10-27 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * internal.h (Nlm_Internal_Extended_Header): Added fields
- sharedDebugRecordOffset and sharedDebugRecordCount.
- * external.h (NlmNAME(External_Extended_Header)): Likewise.
-
- * common.h (NLM_SIGNATURE): Do not define (it's different for each
- backend).
-
-1993-08-31 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * internal.h: Change length fields of type char to type unsigned
- char.
-
-1993-07-31 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * common.h (NLM_HIBIT, NLM_HEADER_VERSION): Define.
-
-1993-07-22 Fred Fish (fnf@deneb.cygnus.com)
-
- * common.h (NLM_CAT*, NLM_ARCH_SIZE, NLM_TARGET_LONG_SIZE,
- NLM_TARGET_ADDRESS_SIZE, NLM_NAME, NlmNAME, nlmNAME): New
- macros.
- * external.h (TARGET_LONG_SIZE, TARGET_ADDRESS_SIZE): Remove
- macros, convert usages to NLM_ equivalents.
- * external.h: Use nlmNAME and NlmNAME macros to derive both
- 32 and 64 bit versions.
-
-1993-07-20 Fred Fish (fnf@deneb.cygnus.com)
-
- * (common.h, external.h, internal.h): New files for NLM/NetWare
- support.
-
-
-Local Variables:
-version-control: never
-End:
diff --git a/include/nlm/alpha-ext.h b/include/nlm/alpha-ext.h
deleted file mode 100644
index eea56ef..0000000
--- a/include/nlm/alpha-ext.h
+++ /dev/null
@@ -1,166 +0,0 @@
-/* Alpha NLM (NetWare Loadable Module) support for BFD.
- Copyright 1993 Free Software Foundation, Inc.
- By Ian Lance Taylor, Cygnus Support
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* An Alpha NLM starts with an instance of this structure. */
-
-struct nlm32_alpha_external_prefix_header
-{
- /* Magic number. Must be NLM32_ALPHA_MAGIC. */
- unsigned char magic[4];
- /* Format descriptor. Current value is 2. */
- unsigned char format[4];
- /* Size of prefix header. */
- unsigned char size[4];
- /* Padding. */
- unsigned char pad1[4];
- /* More fields may be added later, supposedly. */
-};
-
-/* The external format of an Alpha NLM reloc. This is the same as an
- Alpha ECOFF reloc. */
-
-struct nlm32_alpha_external_reloc
-{
- unsigned char r_vaddr[8];
- unsigned char r_symndx[4];
- unsigned char r_bits[4];
-};
-
-/* Constants to unpack the r_bits field of a reloc. */
-
-#define RELOC_BITS0_TYPE_LITTLE 0xff
-#define RELOC_BITS0_TYPE_SH_LITTLE 0
-
-#define RELOC_BITS1_EXTERN_LITTLE 0x01
-
-#define RELOC_BITS1_OFFSET_LITTLE 0x7e
-#define RELOC_BITS1_OFFSET_SH_LITTLE 1
-
-#define RELOC_BITS1_RESERVED_LITTLE 0x80
-#define RELOC_BITS1_RESERVED_SH_LITTLE 7
-#define RELOC_BITS2_RESERVED_LITTLE 0xff
-#define RELOC_BITS2_RESERVED_SH_LEFT_LITTLE 1
-#define RELOC_BITS3_RESERVED_LITTLE 0x03
-#define RELOC_BITS3_RESERVED_SH_LEFT_LITTLE 9
-
-#define RELOC_BITS3_SIZE_LITTLE 0xfc
-#define RELOC_BITS3_SIZE_SH_LITTLE 2
-
-/* The external format of the fixed header. */
-
-typedef struct nlm32_alpha_external_fixed_header
-{
-
- /* The signature field identifies the file as an NLM. It must contain
- the signature string, which depends upon the NLM target. */
-
- unsigned char signature[24];
-
- /* The version of the header. At this time, the highest version number
- is 4. */
-
- unsigned char version[4];
-
- /* The name of the module, which must be a DOS name (1-8 characters followed
- by a period and a 1-3 character extension). The first byte is the byte
- length of the name and the last byte is a null terminator byte. This
- field is fixed length, and any unused bytes should be null bytes. The
- value is set by the OUTPUT keyword to NLMLINK. */
-
- unsigned char moduleName[14];
-
- /* Padding to make it come out correct. */
-
- unsigned char pad1[2];
-
- /* The byte offset of the code image from the start of the file. */
-
- unsigned char codeImageOffset[4];
-
- /* The size of the code image, in bytes. */
-
- unsigned char codeImageSize[4];
-
- /* The byte offset of the data image from the start of the file. */
-
- unsigned char dataImageOffset[4];
-
- /* The size of the data image, in bytes. */
-
- unsigned char dataImageSize[4];
-
- /* The size of the uninitialized data region that the loader is to be
- allocated at load time. Uninitialized data follows the initialized
- data in the NLM address space. */
-
- unsigned char uninitializedDataSize[4];
-
- /* The byte offset of the custom data from the start of the file. The
- custom data is set by the CUSTOM keyword to NLMLINK. It is possible
- for this to be EOF if there is no custom data. */
-
- unsigned char customDataOffset[4];
-
- /* The size of the custom data, in bytes. */
-
- unsigned char customDataSize[4];
-
- /* The byte offset of the module dependencies from the start of the file.
- The module dependencies are determined by the MODULE keyword in
- NLMLINK. */
-
- unsigned char moduleDependencyOffset[4];
-
- /* The number of module dependencies at the moduleDependencyOffset. */
-
- unsigned char numberOfModuleDependencies[4];
-
- /* The byte offset of the relocation fixup data from the start of the file */
-
- unsigned char relocationFixupOffset[4];
-
- unsigned char numberOfRelocationFixups[4];
-
- unsigned char externalReferencesOffset[4];
-
- unsigned char numberOfExternalReferences[4];
-
- unsigned char publicsOffset[4];
-
- unsigned char numberOfPublics[4];
-
- /* The byte offset of the internal debug info from the start of the file.
- It is possible for this to be EOF if there is no debug info. */
-
- unsigned char debugInfoOffset[4];
-
- unsigned char numberOfDebugRecords[4];
-
- unsigned char codeStartOffset[4];
-
- unsigned char exitProcedureOffset[4];
-
- unsigned char checkUnloadProcedureOffset[4];
-
- unsigned char moduleType[4];
-
- unsigned char flags[4];
-
-} Nlm32_alpha_External_Fixed_Header;
diff --git a/include/nlm/common.h b/include/nlm/common.h
deleted file mode 100644
index c6df3fd..0000000
--- a/include/nlm/common.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/* NLM (NetWare Loadable Module) support for BFD.
- Copyright 1993, 2001 Free Software Foundation, Inc.
-
- Written by Fred Fish @ Cygnus Support
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-
-/* This file is part of NLM support for BFD, and contains the portions
- that are common to both the internal and external representations. */
-
-/* If NLM_ARCH_SIZE is not defined, default to 32. NLM_ARCH_SIZE is
- optionally defined by the application. */
-
-#ifndef NLM_ARCH_SIZE
-# define NLM_ARCH_SIZE 32
-#endif
-
-/* Due to horrible details of ANSI macro expansion, we can't use CONCAT4
- for NLM_NAME. CONCAT2 is used in BFD_JUMP_TABLE macros, and some of
- them will expand to tokens that themselves are macros defined in terms
- of NLM_NAME. If NLM_NAME were defined using CONCAT4 (which is itself
- defined in bfd-in.h using CONCAT2), ANSI preprocessor rules say that
- the CONCAT2 within NLM_NAME should not be expanded.
- So use another name. */
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#ifdef SABER
-#define NLM_CAT4(a,b,c,d) a##b##c##d
-#else
-/* This hack is to avoid a problem with some strict ANSI C preprocessors.
- The problem is, "32_" is not a valid preprocessing token, and we don't
- want extra underscores (e.g., "nlm_32_"). The NLM_XCAT2 macro will
- cause the inner CAT2 macros to be evaluated first, producing
- still-valid pp-tokens. Then the final concatenation can be done. */
-#define NLM_CAT2(a,b) a##b
-#define NLM_XCAT2(a,b) NLM_CAT2(a,b)
-#define NLM_CAT4(a,b,c,d) NLM_XCAT2(NLM_CAT2(a,b),NLM_CAT2(c,d))
-#endif
-#else
-#define NLM_CAT4(a,b,c,d) a/**/b/**/c/**/d
-#endif
-
-#if NLM_ARCH_SIZE == 32
-# define NLM_TARGET_LONG_SIZE 4
-# define NLM_TARGET_ADDRESS_SIZE 4
-# define NLM_NAME(x,y) NLM_CAT4(x,32,_,y)
-# define NLM_HIBIT (((bfd_vma) 1) << 31)
-#endif
-#if NLM_ARCH_SIZE == 64
-# define NLM_TARGET_LONG_SIZE 8
-# define NLM_TARGET_ADDRESS_SIZE 8
-# define NLM_NAME(x,y) NLM_CAT4(x,64,_,y)
-# define NLM_HIBIT (((bfd_vma) 1) << 63)
-#endif
-
-#define NlmNAME(X) NLM_NAME(Nlm,X)
-#define nlmNAME(X) NLM_NAME(nlm,X)
-
-/* Give names to things that should not change. */
-
-#define NLM_MAX_DESCRIPTION_LENGTH 127
-#define NLM_MAX_SCREEN_NAME_LENGTH 71
-#define NLM_MAX_THREAD_NAME_LENGTH 71
-#define NLM_MAX_COPYRIGHT_MESSAGE_LENGTH 255
-#define NLM_OTHER_DATA_LENGTH 400 /* FIXME */
-#define NLM_OLD_THREAD_NAME_LENGTH 5
-#define NLM_SIGNATURE_SIZE 24
-#define NLM_HEADER_VERSION 4
-#define NLM_MODULE_NAME_SIZE 14
-#define NLM_DEFAULT_STACKSIZE (8 * 1024)
-
-/* Alpha information. This should probably be in a separate Alpha
- header file, but it can't go in alpha-ext.h because some of it is
- needed by nlmconv.c. */
-
-/* Magic number in Alpha prefix header. */
-#define NLM32_ALPHA_MAGIC (0x83561840)
-
-/* The r_type field in an Alpha reloc is one of the following values. */
-#define ALPHA_R_IGNORE 0
-#define ALPHA_R_REFLONG 1
-#define ALPHA_R_REFQUAD 2
-#define ALPHA_R_GPREL32 3
-#define ALPHA_R_LITERAL 4
-#define ALPHA_R_LITUSE 5
-#define ALPHA_R_GPDISP 6
-#define ALPHA_R_BRADDR 7
-#define ALPHA_R_HINT 8
-#define ALPHA_R_SREL16 9
-#define ALPHA_R_SREL32 10
-#define ALPHA_R_SREL64 11
-#define ALPHA_R_OP_PUSH 12
-#define ALPHA_R_OP_STORE 13
-#define ALPHA_R_OP_PSUB 14
-#define ALPHA_R_OP_PRSHIFT 15
-#define ALPHA_R_GPVALUE 16
-#define ALPHA_R_NW_RELOC 250
-
-/* A local reloc, other than ALPHA_R_GPDISP or ALPHA_R_IGNORE, must be
- against one of these symbol indices. */
-#define ALPHA_RELOC_SECTION_TEXT 1
-#define ALPHA_RELOC_SECTION_DATA 3
-
-/* An ALPHA_R_NW_RELOC has one of these values in the size field. If
- it is SETGP, the r_vaddr field holds the GP value to use. If it is
- LITA, the r_vaddr field holds the address of the .lita section and
- the r_symndx field holds the size of the .lita section. */
-#define ALPHA_R_NW_RELOC_SETGP 1
-#define ALPHA_R_NW_RELOC_LITA 2
diff --git a/include/nlm/external.h b/include/nlm/external.h
deleted file mode 100644
index 66003b3..0000000
--- a/include/nlm/external.h
+++ /dev/null
@@ -1,174 +0,0 @@
-/* NLM (NetWare Loadable Module) support for BFD.
- Copyright 1993, 1994 Free Software Foundation, Inc.
-
- Written by Fred Fish @ Cygnus Support
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-
-/* This file is part of NLM support for BFD, and contains the portions
- that describe how NLM is represented externally by the BFD library.
- I.E. it describes the in-file representation of NLM. It requires
- the nlm/common.h file which contains the portions that are common to
- both the internal and external representations.
-
- Note that an NLM header consists of three parts:
-
- (1) A fixed length header that has specific fields of known length,
- at specific offsets in the file.
-
- (2) A variable length header that has specific fields in a specific
- order, but some fields may be variable length.
-
- (3) A auxiliary header that has various optional fields in no specific
- order. There is no way to identify the end of the auxiliary headers
- except by finding a header without a recognized 'stamp'.
-
- The exact format of the fixed length header unfortunately varies
- from one NLM target to another, due to padding. Each target
- defines the correct external format in a separate header file.
-
-*/
-
-/* NLM Header */
-
-/* The version header is one of the optional auxiliary headers and
- follows the fixed length and variable length NLM headers. */
-
-typedef struct nlmNAME(external_version_header)
-{
-
- /* The header is recognized by "VeRsIoN#" in the stamp field. */
- char stamp[8];
-
- unsigned char majorVersion[NLM_TARGET_LONG_SIZE];
-
- unsigned char minorVersion[NLM_TARGET_LONG_SIZE];
-
- unsigned char revision[NLM_TARGET_LONG_SIZE];
-
- unsigned char year[NLM_TARGET_LONG_SIZE];
-
- unsigned char month[NLM_TARGET_LONG_SIZE];
-
- unsigned char day[NLM_TARGET_LONG_SIZE];
-
-} NlmNAME(External_Version_Header);
-
-
-typedef struct nlmNAME(external_copyright_header)
-{
-
- /* The header is recognized by "CoPyRiGhT=" in the stamp field. */
-
- char stamp[10];
-
- unsigned char copyrightMessageLength[1];
-
- /* There is a variable length field here called 'copyrightMessage'
- that is the length specified by copyrightMessageLength. */
-
-} NlmNAME(External_Copyright_Header);
-
-
-typedef struct nlmNAME(external_extended_header)
-{
-
- /* The header is recognized by "MeSsAgEs" in the stamp field. */
-
- char stamp[8];
-
- unsigned char languageID[NLM_TARGET_LONG_SIZE];
-
- unsigned char messageFileOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char messageFileLength[NLM_TARGET_LONG_SIZE];
-
- unsigned char messageCount[NLM_TARGET_LONG_SIZE];
-
- unsigned char helpFileOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char helpFileLength[NLM_TARGET_LONG_SIZE];
-
- unsigned char RPCDataOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char RPCDataLength[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedCodeOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedCodeLength[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedDataOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedDataLength[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedRelocationFixupOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedRelocationFixupCount[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedExternalReferenceOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedExternalReferenceCount[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedPublicsOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedPublicsCount[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedDebugRecordOffset[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedDebugRecordCount[NLM_TARGET_LONG_SIZE];
-
- unsigned char sharedInitializationOffset[NLM_TARGET_ADDRESS_SIZE];
-
- unsigned char SharedExitProcedureOffset[NLM_TARGET_ADDRESS_SIZE];
-
- unsigned char productID[NLM_TARGET_LONG_SIZE];
-
- unsigned char reserved0[NLM_TARGET_LONG_SIZE];
-
- unsigned char reserved1[NLM_TARGET_LONG_SIZE];
-
- unsigned char reserved2[NLM_TARGET_LONG_SIZE];
-
- unsigned char reserved3[NLM_TARGET_LONG_SIZE];
-
- unsigned char reserved4[NLM_TARGET_LONG_SIZE];
-
- unsigned char reserved5[NLM_TARGET_LONG_SIZE];
-
-} NlmNAME(External_Extended_Header);
-
-
-typedef struct nlmNAME(external_custom_header)
-{
-
- /* The header is recognized by "CuStHeAd" in the stamp field. */
- char stamp[8];
-
- /* Length of this header. */
- unsigned char length[NLM_TARGET_LONG_SIZE];
-
- /* Offset to data. */
- unsigned char dataOffset[NLM_TARGET_LONG_SIZE];
-
- /* Length of data. */
- unsigned char dataLength[NLM_TARGET_LONG_SIZE];
-
- /* Stamp for this customer header--we recognize "CyGnUsEx". */
- char dataStamp[8];
-
-} NlmNAME(External_Custom_Header);
diff --git a/include/nlm/i386-ext.h b/include/nlm/i386-ext.h
deleted file mode 100644
index ecb1cc2..0000000
--- a/include/nlm/i386-ext.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/* i386 NLM (NetWare Loadable Module) support for BFD.
- Copyright 1993 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* The external format of the fixed header. */
-
-typedef struct nlm32_i386_external_fixed_header
-{
-
- /* The signature field identifies the file as an NLM. It must contain
- the signature string, which depends upon the NLM target. */
-
- unsigned char signature[24];
-
- /* The version of the header. At this time, the highest version number
- is 4. */
-
- unsigned char version[4];
-
- /* The name of the module, which must be a DOS name (1-8 characters followed
- by a period and a 1-3 character extension). The first byte is the byte
- length of the name and the last byte is a null terminator byte. This
- field is fixed length, and any unused bytes should be null bytes. The
- value is set by the OUTPUT keyword to NLMLINK. */
-
- unsigned char moduleName[14];
-
- /* The byte offset of the code image from the start of the file. */
-
- unsigned char codeImageOffset[4];
-
- /* The size of the code image, in bytes. */
-
- unsigned char codeImageSize[4];
-
- /* The byte offset of the data image from the start of the file. */
-
- unsigned char dataImageOffset[4];
-
- /* The size of the data image, in bytes. */
-
- unsigned char dataImageSize[4];
-
- /* The size of the uninitialized data region that the loader is to be
- allocated at load time. Uninitialized data follows the initialized
- data in the NLM address space. */
-
- unsigned char uninitializedDataSize[4];
-
- /* The byte offset of the custom data from the start of the file. The
- custom data is set by the CUSTOM keyword to NLMLINK. It is possible
- for this to be EOF if there is no custom data. */
-
- unsigned char customDataOffset[4];
-
- /* The size of the custom data, in bytes. */
-
- unsigned char customDataSize[4];
-
- /* The byte offset of the module dependencies from the start of the file.
- The module dependencies are determined by the MODULE keyword in
- NLMLINK. */
-
- unsigned char moduleDependencyOffset[4];
-
- /* The number of module dependencies at the moduleDependencyOffset. */
-
- unsigned char numberOfModuleDependencies[4];
-
- /* The byte offset of the relocation fixup data from the start of the file */
-
- unsigned char relocationFixupOffset[4];
-
- unsigned char numberOfRelocationFixups[4];
-
- unsigned char externalReferencesOffset[4];
-
- unsigned char numberOfExternalReferences[4];
-
- unsigned char publicsOffset[4];
-
- unsigned char numberOfPublics[4];
-
- /* The byte offset of the internal debug info from the start of the file.
- It is possible for this to be EOF if there is no debug info. */
-
- unsigned char debugInfoOffset[4];
-
- unsigned char numberOfDebugRecords[4];
-
- unsigned char codeStartOffset[4];
-
- unsigned char exitProcedureOffset[4];
-
- unsigned char checkUnloadProcedureOffset[4];
-
- unsigned char moduleType[4];
-
- unsigned char flags[4];
-
-} Nlm32_i386_External_Fixed_Header;
diff --git a/include/nlm/internal.h b/include/nlm/internal.h
deleted file mode 100644
index 59f8ff1..0000000
--- a/include/nlm/internal.h
+++ /dev/null
@@ -1,309 +0,0 @@
-/* NLM (NetWare Loadable Module) support for BFD.
- Copyright 1993, 1994, 2003 Free Software Foundation, Inc.
-
- Written by Fred Fish @ Cygnus Support.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-
-/* This file is part of NLM support for BFD, and contains the portions
- that describe how NLM is represented internally in the BFD library.
- I.E. it describes the in-memory representation of NLM. It requires
- the nlm/common.h file which contains the portions that are common to
- both the internal and external representations. */
-
-#if 0
-
-/* Types used by various structures, functions, etc. */
-
-typedef unsigned long Nlm32_Addr; /* Unsigned program address */
-typedef unsigned long Nlm32_Off; /* Unsigned file offset */
-typedef long Nlm32_Sword; /* Signed large integer */
-typedef unsigned long Nlm32_Word; /* Unsigned large integer */
-typedef unsigned short Nlm32_Half; /* Unsigned medium integer */
-typedef unsigned char Nlm32_Char; /* Unsigned tiny integer */
-
-#ifdef BFD_HOST_64_BIT
-typedef unsigned BFD_HOST_64_BIT Nlm64_Addr;
-typedef unsigned BFD_HOST_64_BIT Nlm64_Off;
-typedef BFD_HOST_64_BIT Nlm64_Sxword;
-typedef unsigned BFD_HOST_64_BIT Nlm64_Xword;
-#endif
-typedef long Nlm64_Sword;
-typedef unsigned long Nlm64_Word;
-typedef unsigned short Nlm64_Half;
-
-#endif /* 0 */
-
-/* This structure contains the internal form of the portion of the NLM
- header that is fixed length. */
-
-typedef struct nlm_internal_fixed_header
-{
- /* The signature field identifies the file as an NLM. It must contain
- the signature string, which depends upon the NLM target. */
-
- char signature[NLM_SIGNATURE_SIZE];
-
- /* The version of the header. At this time, the highest version number
- is 4. */
-
- long version;
-
- /* The name of the module, which must be a DOS name (1-8 characters followed
- by a period and a 1-3 character extension. The first byte is the byte
- length of the name and the last byte is a null terminator byte. This
- field is fixed length, and any unused bytes should be null bytes. The
- value is set by the OUTPUT keyword to NLMLINK. */
-
- char moduleName[NLM_MODULE_NAME_SIZE];
-
- /* The byte offset of the code image from the start of the file. */
-
- file_ptr codeImageOffset;
-
- /* The size of the code image, in bytes. */
-
- bfd_size_type codeImageSize;
-
- /* The byte offset of the data image from the start of the file. */
-
- file_ptr dataImageOffset;
-
- /* The size of the data image, in bytes. */
-
- bfd_size_type dataImageSize;
-
- /* The size of the uninitialized data region that the loader is to be
- allocated at load time. Uninitialized data follows the initialized
- data in the NLM address space. */
-
- bfd_size_type uninitializedDataSize;
-
- /* The byte offset of the custom data from the start of the file. The
- custom data is set by the CUSTOM keyword to NLMLINK. */
-
- file_ptr customDataOffset;
-
- /* The size of the custom data, in bytes. */
-
- bfd_size_type customDataSize;
-
- /* The byte offset of the module dependencies from the start of the file.
- The module dependencies are determined by the MODULE keyword in
- NLMLINK. */
-
- file_ptr moduleDependencyOffset;
-
- /* The number of module dependencies at the moduleDependencyOffset. */
-
- long numberOfModuleDependencies;
-
- /* The byte offset of the relocation fixup data from the start of the file */
-
- file_ptr relocationFixupOffset;
- long numberOfRelocationFixups;
- file_ptr externalReferencesOffset;
- long numberOfExternalReferences;
- file_ptr publicsOffset;
- long numberOfPublics;
- file_ptr debugInfoOffset;
- long numberOfDebugRecords;
- file_ptr codeStartOffset;
- file_ptr exitProcedureOffset;
- file_ptr checkUnloadProcedureOffset;
- long moduleType;
- long flags;
-} Nlm_Internal_Fixed_Header;
-
-#define nlm32_internal_fixed_header nlm_internal_fixed_header
-#define Nlm32_Internal_Fixed_Header Nlm_Internal_Fixed_Header
-#define nlm64_internal_fixed_header nlm_internal_fixed_header
-#define Nlm64_Internal_Fixed_Header Nlm_Internal_Fixed_Header
-
-/* This structure contains the portions of the NLM header that are either
- variable in size in the external representation, or else are not at a
- fixed offset relative to the start of the NLM header due to preceding
- variable sized fields.
-
- Note that all the fields must exist in the external header, and in
- the order used here (the same order is used in the internal form
- for consistency, not out of necessity). */
-
-typedef struct nlm_internal_variable_header
-{
-
- /* The descriptionLength field contains the length of the text in
- descriptionText, excluding the null terminator. The descriptionText
- field contains the NLM description obtained from the DESCRIPTION
- keyword in NLMLINK plus the null byte terminator. The descriptionText
- can be up to NLM_MAX_DESCRIPTION_LENGTH characters. */
-
- unsigned char descriptionLength;
- char descriptionText[NLM_MAX_DESCRIPTION_LENGTH + 1];
-
- /* The stackSize field contains the size of the stack in bytes, as
- specified by the STACK or STACKSIZE keyword in NLMLINK. If no size
- is specified, the default is NLM_DEFAULT_STACKSIZE. */
-
- long stackSize;
-
- /* The reserved field is included only for completeness. It should contain
- zero. */
-
- long reserved;
-
- /* This field is fixed length, should contain " LONG" (note leading
- space), and is unused. */
-
- char oldThreadName[NLM_OLD_THREAD_NAME_LENGTH];
-
- /* The screenNameLength field contains the length of the actual text stored
- in the screenName field, excluding the null byte terminator. The
- screenName field contains the screen name as specified by the SCREENNAME
- keyword in NLMLINK, and can be up to NLM_MAX_SCREEN_NAME_LENGTH
- characters. */
-
- unsigned char screenNameLength;
- char screenName[NLM_MAX_SCREEN_NAME_LENGTH + 1];
-
- /* The threadNameLength field contains the length of the actual text stored
- in the threadName field, excluding the null byte terminator. The
- threadName field contains the thread name as specified by the THREADNAME
- keyword in NLMLINK, and can be up to NLM_MAX_THREAD_NAME_LENGTH
- characters. */
-
- unsigned char threadNameLength;
- char threadName[NLM_MAX_THREAD_NAME_LENGTH + 1];
-
-} Nlm_Internal_Variable_Header;
-
-#define nlm32_internal_variable_header nlm_internal_variable_header
-#define Nlm32_Internal_Variable_Header Nlm_Internal_Variable_Header
-#define nlm64_internal_variable_header nlm_internal_variable_header
-#define Nlm64_Internal_Variable_Header Nlm_Internal_Variable_Header
-
-/* The version header is one of the optional auxiliary headers and
- follows the fixed length and variable length NLM headers. */
-
-typedef struct nlm_internal_version_header
-{
- /* The header is recognized by "VeRsIoN#" in the stamp field. */
- char stamp[8];
- long majorVersion;
- long minorVersion;
- long revision;
- long year;
- long month;
- long day;
-} Nlm_Internal_Version_Header;
-
-#define nlm32_internal_version_header nlm_internal_version_header
-#define Nlm32_Internal_Version_Header Nlm_Internal_Version_Header
-#define nlm64_internal_version_header nlm_internal_version_header
-#define Nlm64_Internal_Version_Header Nlm_Internal_Version_Header
-
-typedef struct nlm_internal_copyright_header
-{
- /* The header is recognized by "CoPyRiGhT=" in the stamp field. */
- char stamp[10];
- unsigned char copyrightMessageLength;
- char copyrightMessage[NLM_MAX_COPYRIGHT_MESSAGE_LENGTH];
-} Nlm_Internal_Copyright_Header;
-
-#define nlm32_internal_copyright_header nlm_internal_copyright_header
-#define Nlm32_Internal_Copyright_Header Nlm_Internal_Copyright_Header
-#define nlm64_internal_copyright_header nlm_internal_copyright_header
-#define Nlm64_Internal_Copyright_Header Nlm_Internal_Copyright_Header
-
-typedef struct nlm_internal_extended_header
-{
- /* The header is recognized by "MeSsAgEs" in the stamp field. */
- char stamp[8];
- long languageID;
- file_ptr messageFileOffset;
- bfd_size_type messageFileLength;
- long messageCount;
- file_ptr helpFileOffset;
- bfd_size_type helpFileLength;
- file_ptr RPCDataOffset;
- bfd_size_type RPCDataLength;
- file_ptr sharedCodeOffset;
- bfd_size_type sharedCodeLength;
- file_ptr sharedDataOffset;
- bfd_size_type sharedDataLength;
- file_ptr sharedRelocationFixupOffset;
- long sharedRelocationFixupCount;
- file_ptr sharedExternalReferenceOffset;
- long sharedExternalReferenceCount;
- file_ptr sharedPublicsOffset;
- long sharedPublicsCount;
- file_ptr sharedDebugRecordOffset;
- long sharedDebugRecordCount;
- bfd_vma SharedInitializationOffset;
- bfd_vma SharedExitProcedureOffset;
- long productID;
- long reserved0;
- long reserved1;
- long reserved2;
- long reserved3;
- long reserved4;
- long reserved5;
-} Nlm_Internal_Extended_Header;
-
-#define nlm32_internal_extended_header nlm_internal_extended_header
-#define Nlm32_Internal_Extended_Header Nlm_Internal_Extended_Header
-#define nlm64_internal_extended_header nlm_internal_extended_header
-#define Nlm64_Internal_Extended_Header Nlm_Internal_Extended_Header
-
-/* The format of a custom header as stored internally is different
- from the external format. This is how we store a custom header
- which we do not recognize. */
-
-typedef struct nlm_internal_custom_header
-{
- /* The header is recognized by "CuStHeAd" in the stamp field. */
- char stamp[8];
- bfd_size_type hdrLength;
- file_ptr dataOffset;
- bfd_size_type dataLength;
- char dataStamp[8];
- void *hdr;
-} Nlm_Internal_Custom_Header;
-
-#define nlm32_internal_custom_header nlm_internal_custom_header
-#define Nlm32_Internal_Custom_Header Nlm_Internal_Custom_Header
-#define nlm64_internal_custom_header nlm_internal_custom_header
-#define Nlm64_Internal_Custom_Header Nlm_Internal_Custom_Header
-
-/* The internal Cygnus header is written out externally as a custom
- header. We don't try to replicate that structure here. */
-
-typedef struct nlm_internal_cygnus_ext_header
-{
- /* The header is recognized by "CyGnUsEx" in the stamp field. */
- char stamp[8];
- /* File location of debugging information. */
- file_ptr offset;
- /* Length of debugging information. */
- bfd_size_type length;
-} Nlm_Internal_Cygnus_Ext_Header;
-
-#define nlm32_internal_cygnus_ext_header nlm_internal_cygnus_ext_header
-#define Nlm32_Internal_Cygnus_Ext_Header Nlm_Internal_Cygnus_Ext_Header
-#define nlm64_internal_cygnus_ext_header nlm_internal_cygnus_ext_header
-#define Nlm64_Internal_Cygnus_Ext_Header Nlm_Internal_Cygnus_Ext_Header
diff --git a/include/nlm/ppc-ext.h b/include/nlm/ppc-ext.h
deleted file mode 100644
index 9f3a974..0000000
--- a/include/nlm/ppc-ext.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/* PowerPC NLM (NetWare Loadable Module) support for BFD.
- Copyright (C) 1994 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifdef OLDFORMAT
-
-/* The format of a PowerPC NLM changed. These structures are only
- used in the old format. */
-
-/* A PowerPC NLM starts with an instance of this structure. */
-
-struct nlm32_powerpc_external_prefix_header
-{
- /* Signature. Must be "AppleNLM". */
- char signature[8];
- /* Version number. Current value is 1. */
- unsigned char headerVersion[4];
- /* ??. Should be set to 0. */
- unsigned char origins[4];
- /* File creation date in standard Unix time format (seconds since
- 1/1/70). */
- unsigned char date[4];
-};
-
-#define NLM32_POWERPC_SIGNATURE "AppleNLM"
-#define NLM32_POWERPC_HEADER_VERSION 1
-
-/* The external format of a PowerPC NLM reloc. This is the same as an
- XCOFF dynamic reloc. */
-
-struct nlm32_powerpc_external_reloc
-{
- /* Address. */
- unsigned char l_vaddr[4];
- /* Symbol table index. This is 0 for .text and 1 for .data. 2
- means .bss, but I don't know if it is used. In XCOFF, larger
- numbers are indices into the dynamic symbol table, but they are
- presumably not used in an NLM. */
- unsigned char l_symndx[4];
- /* Relocation type. */
- unsigned char l_rtype[2];
- /* Section number being relocated. */
- unsigned char l_rsecnm[2];
-};
-
-#endif /* OLDFORMAT */
-
-/* The external format of the fixed header. */
-
-typedef struct nlm32_powerpc_external_fixed_header
-{
-
- /* The signature field identifies the file as an NLM. It must contain
- the signature string, which depends upon the NLM target. */
-
- unsigned char signature[24];
-
- /* The version of the header. At this time, the highest version number
- is 4. */
-
- unsigned char version[4];
-
- /* The name of the module, which must be a DOS name (1-8 characters followed
- by a period and a 1-3 character extension). The first byte is the byte
- length of the name and the last byte is a null terminator byte. This
- field is fixed length, and any unused bytes should be null bytes. The
- value is set by the OUTPUT keyword to NLMLINK. */
-
- unsigned char moduleName[14];
-
- /* Padding to make it come out correct. */
-
- unsigned char pad1[2];
-
- /* The byte offset of the code image from the start of the file. */
-
- unsigned char codeImageOffset[4];
-
- /* The size of the code image, in bytes. */
-
- unsigned char codeImageSize[4];
-
- /* The byte offset of the data image from the start of the file. */
-
- unsigned char dataImageOffset[4];
-
- /* The size of the data image, in bytes. */
-
- unsigned char dataImageSize[4];
-
- /* The size of the uninitialized data region that the loader is to be
- allocated at load time. Uninitialized data follows the initialized
- data in the NLM address space. */
-
- unsigned char uninitializedDataSize[4];
-
- /* The byte offset of the custom data from the start of the file. The
- custom data is set by the CUSTOM keyword to NLMLINK. It is possible
- for this to be EOF if there is no custom data. */
-
- unsigned char customDataOffset[4];
-
- /* The size of the custom data, in bytes. */
-
- unsigned char customDataSize[4];
-
- /* The byte offset of the module dependencies from the start of the file.
- The module dependencies are determined by the MODULE keyword in
- NLMLINK. */
-
- unsigned char moduleDependencyOffset[4];
-
- /* The number of module dependencies at the moduleDependencyOffset. */
-
- unsigned char numberOfModuleDependencies[4];
-
- /* The byte offset of the relocation fixup data from the start of the file */
-
- unsigned char relocationFixupOffset[4];
-
- unsigned char numberOfRelocationFixups[4];
-
- unsigned char externalReferencesOffset[4];
-
- unsigned char numberOfExternalReferences[4];
-
- unsigned char publicsOffset[4];
-
- unsigned char numberOfPublics[4];
-
- /* The byte offset of the internal debug info from the start of the file.
- It is possible for this to be EOF if there is no debug info. */
-
- unsigned char debugInfoOffset[4];
-
- unsigned char numberOfDebugRecords[4];
-
- unsigned char codeStartOffset[4];
-
- unsigned char exitProcedureOffset[4];
-
- unsigned char checkUnloadProcedureOffset[4];
-
- unsigned char moduleType[4];
-
- unsigned char flags[4];
-
-} Nlm32_powerpc_External_Fixed_Header;
diff --git a/include/nlm/sparc32-ext.h b/include/nlm/sparc32-ext.h
deleted file mode 100644
index 79b1cc4..0000000
--- a/include/nlm/sparc32-ext.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/* SPARC NLM (NetWare Loadable Module) support for BFD.
- Copyright 1993 Free Software Foundation, Inc.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* The external format of the fixed header. */
-
-typedef struct nlm32_sparc_external_fixed_header
-{
-
- /* The signature field identifies the file as an NLM. It must contain
- the signature string, which depends upon the NLM target. */
-
- unsigned char signature[24];
-
- /* The version of the header. At this time, the highest version number
- is 4. */
-
- unsigned char version[4];
-
- /* The name of the module, which must be a DOS name (1-8 characters followed
- by a period and a 1-3 character extension). The first byte is the byte
- length of the name and the last byte is a null terminator byte. This
- field is fixed length, and any unused bytes should be null bytes. The
- value is set by the OUTPUT keyword to NLMLINK. */
-
- unsigned char moduleName[14];
-
- /* Padding to make it come out correct. */
-
- unsigned char pad1[2];
-
- /* The byte offset of the code image from the start of the file. */
-
- unsigned char codeImageOffset[4];
-
- /* The size of the code image, in bytes. */
-
- unsigned char codeImageSize[4];
-
- /* The byte offset of the data image from the start of the file. */
-
- unsigned char dataImageOffset[4];
-
- /* The size of the data image, in bytes. */
-
- unsigned char dataImageSize[4];
-
- /* The size of the uninitialized data region that the loader is to be
- allocated at load time. Uninitialized data follows the initialized
- data in the NLM address space. */
-
- unsigned char uninitializedDataSize[4];
-
- /* The byte offset of the custom data from the start of the file. The
- custom data is set by the CUSTOM keyword to NLMLINK. It is possible
- for this to be EOF if there is no custom data. */
-
- unsigned char customDataOffset[4];
-
- /* The size of the custom data, in bytes. */
-
- unsigned char customDataSize[4];
-
- /* The byte offset of the module dependencies from the start of the file.
- The module dependencies are determined by the MODULE keyword in
- NLMLINK. */
-
- unsigned char moduleDependencyOffset[4];
-
- /* The number of module dependencies at the moduleDependencyOffset. */
-
- unsigned char numberOfModuleDependencies[4];
-
- /* The byte offset of the relocation fixup data from the start of the file */
-
- unsigned char relocationFixupOffset[4];
-
- unsigned char numberOfRelocationFixups[4];
-
- unsigned char externalReferencesOffset[4];
-
- unsigned char numberOfExternalReferences[4];
-
- unsigned char publicsOffset[4];
-
- unsigned char numberOfPublics[4];
-
- /* The byte offset of the internal debug info from the start of the file.
- It is possible for this to be EOF if there is no debug info. */
-
- unsigned char debugInfoOffset[4];
-
- unsigned char numberOfDebugRecords[4];
-
- unsigned char codeStartOffset[4];
-
- unsigned char exitProcedureOffset[4];
-
- unsigned char checkUnloadProcedureOffset[4];
-
- unsigned char moduleType[4];
-
- unsigned char flags[4];
-
-} Nlm32_sparc_External_Fixed_Header;
diff --git a/include/oasys.h b/include/oasys.h
deleted file mode 100644
index 25672c7..0000000
--- a/include/oasys.h
+++ /dev/null
@@ -1,192 +0,0 @@
-/* Oasys object format header file for BFD.
-
- Copyright 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor,
- Boston, MA 02110-1301, USA.
-
- Contributed by Cygnus Support. */
-
-#define OASYS_MAX_SEC_COUNT 16
-/* **** */
-
-typedef struct oasys_archive_header
- {
- unsigned int version;
- char create_date[12];
- char revision_date[12];
- unsigned int mod_count;
- file_ptr mod_tbl_offset;
- unsigned int sym_tbl_size;
- unsigned int sym_count;
- file_ptr sym_tbl_offset;
- unsigned int xref_count;
- file_ptr xref_lst_offset;
- }
-oasys_archive_header_type;
-
-typedef struct oasys_extarchive_header
- {
- bfd_byte version[4];
- bfd_byte create_date[12];
- bfd_byte revision_date[12];
- bfd_byte mod_count[4];
- bfd_byte mod_tbl_offset[4];
- bfd_byte sym_tbl_size[4];
- bfd_byte sym_count[4];
- bfd_byte sym_tbl_offset[4];
- bfd_byte xref_count[4];
- bfd_byte xref_lst_offset[4];
- }
-oasys_extarchive_header_type;
-
-typedef struct oasys_module_table
- {
- int mod_number;
- char mod_date[12];
- unsigned int mod_size;
- unsigned int dep_count;
- unsigned int depee_count;
- file_ptr file_offset;
- unsigned int sect_count;
- char *module_name;
- unsigned int module_name_size;
- }
-oasys_module_table_type;
-
-typedef struct oasys_extmodule_table_a
- {
- bfd_byte mod_number[4];
- bfd_byte mod_date[12];
- bfd_byte mod_size[4];
- bfd_byte dep_count[4];
- bfd_byte depee_count[4];
- bfd_byte sect_count[4];
- bfd_byte file_offset[4];
- bfd_byte mod_name[32];
- }
-oasys_extmodule_table_type_a_type;
-
-typedef struct oasys_extmodule_table_b
- {
- bfd_byte mod_number[4];
- bfd_byte mod_date[12];
- bfd_byte mod_size[4];
- bfd_byte dep_count[4];
- bfd_byte depee_count[4];
- bfd_byte sect_count[4];
- bfd_byte file_offset[4];
- bfd_byte mod_name_length[4];
- }
-oasys_extmodule_table_type_b_type;
-
-typedef enum oasys_record
- {
- oasys_record_is_end_enum = 0,
- oasys_record_is_data_enum = 1,
- oasys_record_is_symbol_enum = 2,
- oasys_record_is_header_enum = 3,
- oasys_record_is_named_section_enum = 4,
- oasys_record_is_com_enum = 5,
- oasys_record_is_debug_enum = 6,
- oasys_record_is_section_enum = 7,
- oasys_record_is_debug_file_enum = 8,
- oasys_record_is_module_enum = 9,
- oasys_record_is_local_enum = 10
- }
-oasys_record_enum_type;
-
-typedef struct oasys_record_header
- {
- unsigned char length;
- unsigned char check_sum;
- unsigned char type;
- unsigned char fill;
- }
-oasys_record_header_type;
-
-typedef struct oasys_data_record
- {
- oasys_record_header_type header;
- unsigned char relb;
- bfd_byte addr[4];
- /* maximum total size of data record is 255 bytes */
- bfd_byte data[246];
- }
-oasys_data_record_type;
-
-typedef struct oasys_header_record
- {
- oasys_record_header_type header;
- unsigned char version_number;
- unsigned char rev_number;
- char module_name[26-6];
- char description[64-26];
- }
-oasys_header_record_type;
-
-#define OASYS_VERSION_NUMBER 0
-#define OASYS_REV_NUMBER 0
-
-typedef struct oasys_symbol_record
- {
- oasys_record_header_type header;
- unsigned char relb;
- bfd_byte value[4];
- bfd_byte refno[2];
- char name[64];
- }
-oasys_symbol_record_type;
-
-#define RELOCATION_PCREL_BIT 0x80
-#define RELOCATION_32BIT_BIT 0x40
-#define RELOCATION_TYPE_BITS 0x30
-#define RELOCATION_TYPE_ABS 0x00
-#define RELOCATION_TYPE_REL 0x10
-#define RELOCATION_TYPE_UND 0x20
-#define RELOCATION_TYPE_COM 0x30
-#define RELOCATION_SECT_BITS 0x0f
-
-typedef struct oasys_section_record
- {
- oasys_record_header_type header;
- unsigned char relb;
- bfd_byte value[4];
- bfd_byte vma[4];
- bfd_byte fill[3];
- }
-oasys_section_record_type;
-
-typedef struct oasys_end_record
- {
- oasys_record_header_type header;
- unsigned char relb;
- bfd_byte entry[4];
- bfd_byte fill[2];
- bfd_byte zero;
- }
-oasys_end_record_type;
-
-typedef union oasys_record_union
- {
- oasys_record_header_type header;
- oasys_data_record_type data;
- oasys_section_record_type section;
- oasys_symbol_record_type symbol;
- oasys_header_record_type first;
- oasys_end_record_type end;
- bfd_byte pad[256];
- }
-oasys_record_union_type;
diff --git a/include/objalloc.h b/include/objalloc.h
deleted file mode 100644
index 36772d1..0000000
--- a/include/objalloc.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* objalloc.h -- routines to allocate memory for objects
- Copyright 1997, 2001 Free Software Foundation, Inc.
- Written by Ian Lance Taylor, Cygnus Solutions.
-
-This program is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 2, or (at your option) any
-later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, 51 Franklin Street - Fifth Floor,
-Boston, MA 02110-1301, USA. */
-
-#ifndef OBJALLOC_H
-#define OBJALLOC_H
-
-#include "ansidecl.h"
-
-/* These routines allocate space for an object. The assumption is
- that the object will want to allocate space as it goes along, but
- will never want to free any particular block. There is a function
- to free a block, which also frees all more recently allocated
- blocks. There is also a function to free all the allocated space.
-
- This is essentially a specialization of obstacks. The main
- difference is that a block may not be allocated a bit at a time.
- Another difference is that these routines are always built on top
- of malloc, and always pass an malloc failure back to the caller,
- unlike more recent versions of obstacks. */
-
-/* This is what an objalloc structure looks like. Callers should not
- refer to these fields, nor should they allocate these structure
- themselves. Instead, they should only create them via
- objalloc_init, and only access them via the functions and macros
- listed below. The structure is only defined here so that we can
- access it via macros. */
-
-struct objalloc
-{
- char *current_ptr;
- unsigned int current_space;
- void *chunks;
-};
-
-/* Work out the required alignment. */
-
-struct objalloc_align { char x; double d; };
-
-#if defined (__STDC__) && __STDC__
-#ifndef offsetof
-#include <stddef.h>
-#endif
-#endif
-#ifndef offsetof
-#define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
-#endif
-#define OBJALLOC_ALIGN offsetof (struct objalloc_align, d)
-
-/* Create an objalloc structure. Returns NULL if malloc fails. */
-
-extern struct objalloc *objalloc_create (void);
-
-/* Allocate space from an objalloc structure. Returns NULL if malloc
- fails. */
-
-extern void *_objalloc_alloc (struct objalloc *, unsigned long);
-
-/* The macro version of objalloc_alloc. We only define this if using
- gcc, because otherwise we would have to evaluate the arguments
- multiple times, or use a temporary field as obstack.h does. */
-
-#if defined (__GNUC__) && defined (__STDC__) && __STDC__
-
-/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
- does not implement __extension__. But that compiler doesn't define
- __GNUC_MINOR__. */
-#if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
-#define __extension__
-#endif
-
-#define objalloc_alloc(o, l) \
- __extension__ \
- ({ struct objalloc *__o = (o); \
- unsigned long __len = (l); \
- if (__len == 0) \
- __len = 1; \
- __len = (__len + OBJALLOC_ALIGN - 1) &~ (OBJALLOC_ALIGN - 1); \
- (__len <= __o->current_space \
- ? (__o->current_ptr += __len, \
- __o->current_space -= __len, \
- (void *) (__o->current_ptr - __len)) \
- : _objalloc_alloc (__o, __len)); })
-
-#else /* ! __GNUC__ */
-
-#define objalloc_alloc(o, l) _objalloc_alloc ((o), (l))
-
-#endif /* ! __GNUC__ */
-
-/* Free an entire objalloc structure. */
-
-extern void objalloc_free (struct objalloc *);
-
-/* Free a block allocated by objalloc_alloc. This also frees all more
- recently allocated blocks. */
-
-extern void objalloc_free_block (struct objalloc *, void *);
-
-#endif /* OBJALLOC_H */
diff --git a/include/obstack.h b/include/obstack.h
deleted file mode 100644
index 4aec3a4..0000000
--- a/include/obstack.h
+++ /dev/null
@@ -1,545 +0,0 @@
-/* obstack.h - object stack macros
- Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
- Free Software Foundation, Inc.
-
-
- NOTE: The canonical source of this file is maintained with the GNU C Library.
- Bugs can be reported to bug-glibc@gnu.org.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
- USA. */
-
-/* Summary:
-
-All the apparent functions defined here are macros. The idea
-is that you would use these pre-tested macros to solve a
-very specific set of problems, and they would run fast.
-Caution: no side-effects in arguments please!! They may be
-evaluated MANY times!!
-
-These macros operate a stack of objects. Each object starts life
-small, and may grow to maturity. (Consider building a word syllable
-by syllable.) An object can move while it is growing. Once it has
-been "finished" it never changes address again. So the "top of the
-stack" is typically an immature growing object, while the rest of the
-stack is of mature, fixed size and fixed address objects.
-
-These routines grab large chunks of memory, using a function you
-supply, called `obstack_chunk_alloc'. On occasion, they free chunks,
-by calling `obstack_chunk_free'. You must define them and declare
-them before using any obstack macros.
-
-Each independent stack is represented by a `struct obstack'.
-Each of the obstack macros expects a pointer to such a structure
-as the first argument.
-
-One motivation for this package is the problem of growing char strings
-in symbol tables. Unless you are "fascist pig with a read-only mind"
---Gosper's immortal quote from HAKMEM item 154, out of context--you
-would not like to put any arbitrary upper limit on the length of your
-symbols.
-
-In practice this often means you will build many short symbols and a
-few long symbols. At the time you are reading a symbol you don't know
-how long it is. One traditional method is to read a symbol into a
-buffer, realloc()ating the buffer every time you try to read a symbol
-that is longer than the buffer. This is beaut, but you still will
-want to copy the symbol from the buffer to a more permanent
-symbol-table entry say about half the time.
-
-With obstacks, you can work differently. Use one obstack for all symbol
-names. As you read a symbol, grow the name in the obstack gradually.
-When the name is complete, finalize it. Then, if the symbol exists already,
-free the newly read name.
-
-The way we do this is to take a large chunk, allocating memory from
-low addresses. When you want to build a symbol in the chunk you just
-add chars above the current "high water mark" in the chunk. When you
-have finished adding chars, because you got to the end of the symbol,
-you know how long the chars are, and you can create a new object.
-Mostly the chars will not burst over the highest address of the chunk,
-because you would typically expect a chunk to be (say) 100 times as
-long as an average object.
-
-In case that isn't clear, when we have enough chars to make up
-the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed)
-so we just point to it where it lies. No moving of chars is
-needed and this is the second win: potentially long strings need
-never be explicitly shuffled. Once an object is formed, it does not
-change its address during its lifetime.
-
-When the chars burst over a chunk boundary, we allocate a larger
-chunk, and then copy the partly formed object from the end of the old
-chunk to the beginning of the new larger chunk. We then carry on
-accreting characters to the end of the object as we normally would.
-
-A special macro is provided to add a single char at a time to a
-growing object. This allows the use of register variables, which
-break the ordinary 'growth' macro.
-
-Summary:
- We allocate large chunks.
- We carve out one object at a time from the current chunk.
- Once carved, an object never moves.
- We are free to append data of any size to the currently
- growing object.
- Exactly one object is growing in an obstack at any one time.
- You can run one obstack per control block.
- You may have as many control blocks as you dare.
- Because of the way we do it, you can `unwind' an obstack
- back to a previous state. (You may remove objects much
- as you would with a stack.)
-*/
-
-
-/* Don't do the contents of this file more than once. */
-
-#ifndef _OBSTACK_H
-#define _OBSTACK_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* We use subtraction of (char *) 0 instead of casting to int
- because on word-addressable machines a simple cast to int
- may ignore the byte-within-word field of the pointer. */
-
-#ifndef __PTR_TO_INT
-# define __PTR_TO_INT(P) ((P) - (char *) 0)
-#endif
-
-#ifndef __INT_TO_PTR
-# define __INT_TO_PTR(P) ((P) + (char *) 0)
-#endif
-
-/* We need the type of the resulting object. If __PTRDIFF_TYPE__ is
- defined, as with GNU C, use that; that way we don't pollute the
- namespace with <stddef.h>'s symbols. Otherwise, if <stddef.h> is
- available, include it and use ptrdiff_t. In traditional C, long is
- the best that we can do. */
-
-#ifdef __PTRDIFF_TYPE__
-# define PTR_INT_TYPE __PTRDIFF_TYPE__
-#else
-# ifdef HAVE_STDDEF_H
-# include <stddef.h>
-# define PTR_INT_TYPE ptrdiff_t
-# else
-# define PTR_INT_TYPE long
-# endif
-#endif
-
-#if defined _LIBC || defined HAVE_STRING_H
-# include <string.h>
-# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
-#else
-# ifdef memcpy
-# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N))
-# else
-# define _obstack_memcpy(To, From, N) bcopy ((char *)(From), (To), (N))
-# endif
-#endif
-
-struct _obstack_chunk /* Lives at front of each chunk. */
-{
- char *limit; /* 1 past end of this chunk */
- struct _obstack_chunk *prev; /* address of prior chunk or NULL */
- char contents[4]; /* objects begin here */
-};
-
-struct obstack /* control current object in current chunk */
-{
- long chunk_size; /* preferred size to allocate chunks in */
- struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */
- char *object_base; /* address of object we are building */
- char *next_free; /* where to add next char to current object */
- char *chunk_limit; /* address of char after current chunk */
- PTR_INT_TYPE temp; /* Temporary for some macros. */
- int alignment_mask; /* Mask of alignment for each object. */
- /* These prototypes vary based on `use_extra_arg', and we use
- casts to the prototypeless function type in all assignments,
- but having prototypes here quiets -Wstrict-prototypes. */
- struct _obstack_chunk *(*chunkfun) (void *, long);
- void (*freefun) (void *, struct _obstack_chunk *);
- void *extra_arg; /* first arg for chunk alloc/dealloc funcs */
- unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */
- unsigned maybe_empty_object:1;/* There is a possibility that the current
- chunk contains a zero-length object. This
- prevents freeing the chunk if we allocate
- a bigger chunk to replace it. */
- unsigned alloc_failed:1; /* No longer used, as we now call the failed
- handler on error, but retained for binary
- compatibility. */
-};
-
-/* Declare the external functions we use; they are in obstack.c. */
-
-extern void _obstack_newchunk (struct obstack *, int);
-extern void _obstack_free (struct obstack *, void *);
-extern int _obstack_begin (struct obstack *, int, int,
- void *(*) (long), void (*) (void *));
-extern int _obstack_begin_1 (struct obstack *, int, int,
- void *(*) (void *, long),
- void (*) (void *, void *), void *);
-extern int _obstack_memory_used (struct obstack *);
-
-/* Do the function-declarations after the structs
- but before defining the macros. */
-
-void obstack_init (struct obstack *obstack);
-
-void * obstack_alloc (struct obstack *obstack, int size);
-
-void * obstack_copy (struct obstack *obstack, void *address, int size);
-void * obstack_copy0 (struct obstack *obstack, void *address, int size);
-
-void obstack_free (struct obstack *obstack, void *block);
-
-void obstack_blank (struct obstack *obstack, int size);
-
-void obstack_grow (struct obstack *obstack, void *data, int size);
-void obstack_grow0 (struct obstack *obstack, void *data, int size);
-
-void obstack_1grow (struct obstack *obstack, int data_char);
-void obstack_ptr_grow (struct obstack *obstack, void *data);
-void obstack_int_grow (struct obstack *obstack, int data);
-
-void * obstack_finish (struct obstack *obstack);
-
-int obstack_object_size (struct obstack *obstack);
-
-int obstack_room (struct obstack *obstack);
-void obstack_make_room (struct obstack *obstack, int size);
-void obstack_1grow_fast (struct obstack *obstack, int data_char);
-void obstack_ptr_grow_fast (struct obstack *obstack, void *data);
-void obstack_int_grow_fast (struct obstack *obstack, int data);
-void obstack_blank_fast (struct obstack *obstack, int size);
-
-void * obstack_base (struct obstack *obstack);
-void * obstack_next_free (struct obstack *obstack);
-int obstack_alignment_mask (struct obstack *obstack);
-int obstack_chunk_size (struct obstack *obstack);
-int obstack_memory_used (struct obstack *obstack);
-
-/* Error handler called when `obstack_chunk_alloc' failed to allocate
- more memory. This can be set to a user defined function. The
- default action is to print a message and abort. */
-extern void (*obstack_alloc_failed_handler) (void);
-
-/* Exit value used when `print_and_abort' is used. */
-extern int obstack_exit_failure;
-
-/* Pointer to beginning of object being allocated or to be allocated next.
- Note that this might not be the final address of the object
- because a new chunk might be needed to hold the final size. */
-
-#define obstack_base(h) ((h)->object_base)
-
-/* Size for allocating ordinary chunks. */
-
-#define obstack_chunk_size(h) ((h)->chunk_size)
-
-/* Pointer to next byte not yet allocated in current chunk. */
-
-#define obstack_next_free(h) ((h)->next_free)
-
-/* Mask specifying low bits that should be clear in address of an object. */
-
-#define obstack_alignment_mask(h) ((h)->alignment_mask)
-
-/* To prevent prototype warnings provide complete argument list in
- standard C version. */
-# define obstack_init(h) \
- _obstack_begin ((h), 0, 0, \
- (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
-
-# define obstack_begin(h, size) \
- _obstack_begin ((h), (size), 0, \
- (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
-
-# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
- _obstack_begin ((h), (size), (alignment), \
- (void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun))
-
-# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
- _obstack_begin_1 ((h), (size), (alignment), \
- (void *(*) (void *, long)) (chunkfun), \
- (void (*) (void *, void *)) (freefun), (arg))
-
-# define obstack_chunkfun(h, newchunkfun) \
- ((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun))
-
-# define obstack_freefun(h, newfreefun) \
- ((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun))
-
-#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = (achar))
-
-#define obstack_blank_fast(h,n) ((h)->next_free += (n))
-
-#define obstack_memory_used(h) _obstack_memory_used (h)
-
-#if defined __GNUC__ && defined __STDC__ && __STDC__
-/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
- does not implement __extension__. But that compiler doesn't define
- __GNUC_MINOR__. */
-# if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
-# define __extension__
-# endif
-
-/* For GNU C, if not -traditional,
- we can define these macros to compute all args only once
- without using a global variable.
- Also, we can avoid using the `temp' slot, to make faster code. */
-
-# define obstack_object_size(OBSTACK) \
- __extension__ \
- ({ struct obstack *__o = (OBSTACK); \
- (unsigned) (__o->next_free - __o->object_base); })
-
-# define obstack_room(OBSTACK) \
- __extension__ \
- ({ struct obstack *__o = (OBSTACK); \
- (unsigned) (__o->chunk_limit - __o->next_free); })
-
-# define obstack_make_room(OBSTACK,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->chunk_limit - __o->next_free < __len) \
- _obstack_newchunk (__o, __len); \
- (void) 0; })
-
-# define obstack_empty_p(OBSTACK) \
- __extension__ \
- ({ struct obstack *__o = (OBSTACK); \
- (__o->chunk->prev == 0 && __o->next_free - __o->chunk->contents == 0); })
-
-# define obstack_grow(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->next_free + __len > __o->chunk_limit) \
- _obstack_newchunk (__o, __len); \
- _obstack_memcpy (__o->next_free, (where), __len); \
- __o->next_free += __len; \
- (void) 0; })
-
-# define obstack_grow0(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->next_free + __len + 1 > __o->chunk_limit) \
- _obstack_newchunk (__o, __len + 1); \
- _obstack_memcpy (__o->next_free, (where), __len); \
- __o->next_free += __len; \
- *(__o->next_free)++ = 0; \
- (void) 0; })
-
-# define obstack_1grow(OBSTACK,datum) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- if (__o->next_free + 1 > __o->chunk_limit) \
- _obstack_newchunk (__o, 1); \
- obstack_1grow_fast (__o, datum); \
- (void) 0; })
-
-/* These assume that the obstack alignment is good enough for pointers or ints,
- and that the data added so far to the current object
- shares that much alignment. */
-
-# define obstack_ptr_grow(OBSTACK,datum) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- if (__o->next_free + sizeof (void *) > __o->chunk_limit) \
- _obstack_newchunk (__o, sizeof (void *)); \
- obstack_ptr_grow_fast (__o, datum); })
-
-# define obstack_int_grow(OBSTACK,datum) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- if (__o->next_free + sizeof (int) > __o->chunk_limit) \
- _obstack_newchunk (__o, sizeof (int)); \
- obstack_int_grow_fast (__o, datum); })
-
-# define obstack_ptr_grow_fast(OBSTACK,aptr) \
-__extension__ \
-({ struct obstack *__o1 = (OBSTACK); \
- *(const void **) __o1->next_free = (aptr); \
- __o1->next_free += sizeof (const void *); \
- (void) 0; })
-
-# define obstack_int_grow_fast(OBSTACK,aint) \
-__extension__ \
-({ struct obstack *__o1 = (OBSTACK); \
- *(int *) __o1->next_free = (aint); \
- __o1->next_free += sizeof (int); \
- (void) 0; })
-
-# define obstack_blank(OBSTACK,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->chunk_limit - __o->next_free < __len) \
- _obstack_newchunk (__o, __len); \
- obstack_blank_fast (__o, __len); \
- (void) 0; })
-
-# define obstack_alloc(OBSTACK,length) \
-__extension__ \
-({ struct obstack *__h = (OBSTACK); \
- obstack_blank (__h, (length)); \
- obstack_finish (__h); })
-
-# define obstack_copy(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__h = (OBSTACK); \
- obstack_grow (__h, (where), (length)); \
- obstack_finish (__h); })
-
-# define obstack_copy0(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__h = (OBSTACK); \
- obstack_grow0 (__h, (where), (length)); \
- obstack_finish (__h); })
-
-/* The local variable is named __o1 to avoid a name conflict
- when obstack_blank is called. */
-# define obstack_finish(OBSTACK) \
-__extension__ \
-({ struct obstack *__o1 = (OBSTACK); \
- void *value; \
- value = (void *) __o1->object_base; \
- if (__o1->next_free == value) \
- __o1->maybe_empty_object = 1; \
- __o1->next_free \
- = __INT_TO_PTR ((__PTR_TO_INT (__o1->next_free)+__o1->alignment_mask)\
- & ~ (__o1->alignment_mask)); \
- if (__o1->next_free - (char *)__o1->chunk \
- > __o1->chunk_limit - (char *)__o1->chunk) \
- __o1->next_free = __o1->chunk_limit; \
- __o1->object_base = __o1->next_free; \
- value; })
-
-# define obstack_free(OBSTACK, OBJ) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- void *__obj = (void *) (OBJ); \
- if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \
- __o->next_free = __o->object_base = (char *) __obj; \
- else (obstack_free) (__o, __obj); })
-
-#else /* not __GNUC__ or not __STDC__ */
-
-# define obstack_object_size(h) \
- (unsigned) ((h)->next_free - (h)->object_base)
-
-# define obstack_room(h) \
- (unsigned) ((h)->chunk_limit - (h)->next_free)
-
-# define obstack_empty_p(h) \
- ((h)->chunk->prev == 0 && (h)->next_free - (h)->chunk->contents == 0)
-
-/* Note that the call to _obstack_newchunk is enclosed in (..., 0)
- so that we can avoid having void expressions
- in the arms of the conditional expression.
- Casting the third operand to void was tried before,
- but some compilers won't accept it. */
-
-# define obstack_make_room(h,length) \
-( (h)->temp = (length), \
- (((h)->next_free + (h)->temp > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp), 0) : 0))
-
-# define obstack_grow(h,where,length) \
-( (h)->temp = (length), \
- (((h)->next_free + (h)->temp > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
- _obstack_memcpy ((h)->next_free, (where), (h)->temp), \
- (h)->next_free += (h)->temp)
-
-# define obstack_grow0(h,where,length) \
-( (h)->temp = (length), \
- (((h)->next_free + (h)->temp + 1 > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp + 1), 0) : 0), \
- _obstack_memcpy ((h)->next_free, (where), (h)->temp), \
- (h)->next_free += (h)->temp, \
- *((h)->next_free)++ = 0)
-
-# define obstack_1grow(h,datum) \
-( (((h)->next_free + 1 > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), 1), 0) : 0), \
- obstack_1grow_fast (h, datum))
-
-# define obstack_ptr_grow(h,datum) \
-( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \
- obstack_ptr_grow_fast (h, datum))
-
-# define obstack_int_grow(h,datum) \
-( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \
- obstack_int_grow_fast (h, datum))
-
-# define obstack_ptr_grow_fast(h,aptr) \
- (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr))
-
-# define obstack_int_grow_fast(h,aint) \
- (((int *) ((h)->next_free += sizeof (int)))[-1] = (aptr))
-
-# define obstack_blank(h,length) \
-( (h)->temp = (length), \
- (((h)->chunk_limit - (h)->next_free < (h)->temp) \
- ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
- obstack_blank_fast (h, (h)->temp))
-
-# define obstack_alloc(h,length) \
- (obstack_blank ((h), (length)), obstack_finish ((h)))
-
-# define obstack_copy(h,where,length) \
- (obstack_grow ((h), (where), (length)), obstack_finish ((h)))
-
-# define obstack_copy0(h,where,length) \
- (obstack_grow0 ((h), (where), (length)), obstack_finish ((h)))
-
-# define obstack_finish(h) \
-( ((h)->next_free == (h)->object_base \
- ? (((h)->maybe_empty_object = 1), 0) \
- : 0), \
- (h)->temp = __PTR_TO_INT ((h)->object_base), \
- (h)->next_free \
- = __INT_TO_PTR ((__PTR_TO_INT ((h)->next_free)+(h)->alignment_mask) \
- & ~ ((h)->alignment_mask)), \
- (((h)->next_free - (char *) (h)->chunk \
- > (h)->chunk_limit - (char *) (h)->chunk) \
- ? ((h)->next_free = (h)->chunk_limit) : 0), \
- (h)->object_base = (h)->next_free, \
- (void *) __INT_TO_PTR ((h)->temp))
-
-# define obstack_free(h,obj) \
-( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
- (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
- ? (int) ((h)->next_free = (h)->object_base \
- = (h)->temp + (char *) (h)->chunk) \
- : (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0)))
-
-#endif /* not __GNUC__ or not __STDC__ */
-
-#ifdef __cplusplus
-} /* C++ */
-#endif
-
-#endif /* obstack.h */
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
deleted file mode 100644
index bda9ca1..0000000
--- a/include/opcode/ChangeLog
+++ /dev/null
@@ -1,829 +0,0 @@
-2008-11-28 Joshua Kinard <kumba@gentoo.org>
-
- * mips.h: Define CPU_R14000, CPU_R16000.
- (OPCODE_IS_MEMBER): Include R14000, R16000 in test.
-
-2008-11-18 Catherine Moore <clm@codesourcery.com>
-
- * arm.h (FPU_NEON_FP16): New.
- (FPU_ARCH_NEON_FP16): New.
-
-2008-11-06 Chao-ying Fu <fu@mips.com>
-
- * mips.h: Doucument '1' for 5-bit sync type.
-
-2008-08-28 H.J. Lu <hongjiu.lu@intel.com>
-
- * ia64.h (ia64_resource_specifier): Add IA64_RS_CR_IIB. Update
- IA64_RS_CR.
-
-2008-08-01 Peter Bergner <bergner@vnet.ibm.com>
-
- * ppc.h (PPC_OPCODE_VSX, PPC_OPERAND_VSR): New.
-
-2008-07-30 Michael J. Eager <eager@eagercon.com>
-
- * ppc.h (PPC_OPCODE_405): Define.
- (PPC_OPERAND_FSL, PPC_OPERAND_FCR, PPC_OPERAND_UDI): Define.
-
-2008-06-13 Peter Bergner <bergner@vnet.ibm.com>
-
- * ppc.h (ppc_cpu_t): New typedef.
- (struct powerpc_opcode <flags>): Use it.
- (struct powerpc_operand <insert, extract>): Likewise.
- (struct powerpc_macro <flags>): Likewise.
-
-2008-06-12 Adam Nemet <anemet@caviumnetworks.com>
-
- * mips.h: Document new field descriptors +x, +X, +p, +P, +s, +S.
- Update comment before MIPS16 field descriptors to mention MIPS16.
- (OP_SH_BBITIND, OP_MASK_BBITIND): New bit mask and shift count for
- BBIT.
- (OP_SH_CINSPOS, OP_MASK_CINSPOS, OP_SH_CINSLM1, OP_MASK_CINSLM1):
- New bit masks and shift counts for cins and exts.
-
- * mips.h: Document new field descriptors +Q.
- (OP_SH_SEQI, OP_MASK_SEQI): New bit mask and shift count for SEQI.
-
-2008-04-28 Adam Nemet <anemet@caviumnetworks.com>
-
- * mips.h (INSN_MACRO): Move it up to the the pinfo macros.
- (INSN2_M_FP_S, INSN2_M_FP_D): New pinfo2 macros.
-
-2008-04-14 Edmar Wienskoski <edmar@freescale.com>
-
- * ppc.h: (PPC_OPCODE_E500MC): New.
-
-2008-04-03 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h (MAX_OPERANDS): Set to 5.
- (MAX_MNEM_SIZE): Changed to 20.
-
-2008-03-28 Eric B. Weddington <eric.weddington@atmel.com>
-
- * avr.h (AVR_ISA_TINY3): Define new opcode set for attiny167.
-
-2008-03-09 Paul Brook <paul@codesourcery.com>
-
- * arm.h (FPU_VFP_EXT_D32, FPU_VFP_V3D16, FPU_ARCH_VFP_V3D16): Define.
-
-2008-03-04 Paul Brook <paul@codesourcery.com>
-
- * arm.h (ARM_EXT_V6M, ARM_EXT_BARRIER, ARM_EXT_THUMB_MSR): Define.
- (ARM_AEXT_V6T2, ARM_AEXT_V7_ARM, ARM_AEXT_V7M): Use new flags.
- (ARM_AEXT_V6M, ARM_ARCH_V6M): Define.
-
-2008-02-27 Denis Vlasenko <vda.linux@googlemail.com>
- Nick Clifton <nickc@redhat.com>
-
- PR 3134
- * h8300.h (h8_opcodes): Add an encoding for a mov.l instruction
- with a 32-bit displacement but without the top bit of the 4th byte
- set.
-
-2008-02-18 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
-
- * cr16.h (cr16_num_optab): Declared.
-
-2008-02-14 Hakan Ardo <hakan@debian.org>
-
- PR gas/2626
- * avr.h (AVR_ISA_2xxe): Define.
-
-2008-02-04 Adam Nemet <anemet@caviumnetworks.com>
-
- * mips.h: Update copyright.
- (INSN_CHIP_MASK): New macro.
- (INSN_OCTEON): New macro.
- (CPU_OCTEON): New macro.
- (OPCODE_IS_MEMBER): Handle Octeon instructions.
-
-2008-01-23 Eric B. Weddington <eric.weddington@atmel.com>
-
- * avr.h (AVR_ISA_RF401): Add new opcode set for at86rf401.
-
-2008-01-03 Eric B. Weddington <eric.weddington@atmel.com>
-
- * avr.h (AVR_ISA_USB162): Add new opcode set.
- (AVR_ISA_AVR3): Likewise.
-
-2007-11-29 Mark Shinwell <shinwell@codesourcery.com>
-
- * mips.h (INSN_LOONGSON_2E): New.
- (INSN_LOONGSON_2F): New.
- (CPU_LOONGSON_2E): New.
- (CPU_LOONGSON_2F): New.
- (OPCODE_IS_MEMBER): Update for Loongson-2E and -2F flags.
-
-2007-11-29 Mark Shinwell <shinwell@codesourcery.com>
-
- * mips.h (INSN_ISA*): Redefine certain values as an
- enumeration. Update comments.
- (mips_isa_table): New.
- (ISA_MIPS*): Redefine to match enumeration.
- (OPCODE_IS_MEMBER): Modify to correctly test new INSN_ISA*
- values.
-
-2007-08-08 Ben Elliston <bje@au.ibm.com>
-
- * ppc.h (PPC_OPCODE_PPCPS): New.
-
-2007-07-03 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k.h: Document j K & E.
-
-2007-06-29 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
-
- * cr16.h: New file for CR16 target.
-
-2007-05-02 Alan Modra <amodra@bigpond.net.au>
-
- * ppc.h (PPC_OPERAND_PLUS1): Update comment.
-
-2007-04-23 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k.h (mcfisa_c): New.
- (mcfusp, mcf_mask): Adjust.
-
-2007-04-20 Alan Modra <amodra@bigpond.net.au>
-
- * ppc.h (struct powerpc_operand): Replace "bits" with "bitm".
- (num_powerpc_operands): Declare.
- (PPC_OPERAND_SIGNED et al): Redefine as hex.
- (PPC_OPERAND_PLUS1): Define.
-
-2007-03-21 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h (REX_MODE64): Renamed to ...
- (REX_W): This.
- (REX_EXTX): Renamed to ...
- (REX_R): This.
- (REX_EXTY): Renamed to ...
- (REX_X): This.
- (REX_EXTZ): Renamed to ...
- (REX_B): This.
-
-2007-03-15 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h: Add entries from config/tc-i386.h and move tables
- to opcodes/i386-opc.h.
-
-2007-03-13 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h (FloatDR): Removed.
- (i386_optab): Use FloatD and FloatD|FloatR instead of FloatDR.
-
-2007-03-01 Alan Modra <amodra@bigpond.net.au>
-
- * spu-insns.h: Add soma double-float insns.
-
-2007-02-20 Thiemo Seufer <ths@mips.com>
- Chao-Ying Fu <fu@mips.com>
-
- * mips.h (OP_SH_BP, OP_MASK_BP): Add support for balign instruction.
- (INSN_DSPR2): Add flag for DSP R2 instructions.
- (M_BALIGN): New macro.
-
-2007-02-14 Alan Modra <amodra@bigpond.net.au>
-
- * i386.h (i386_optab): Replace all occurrences of Seg2ShortForm
- and Seg3ShortFrom with Shortform.
-
-2007-02-11 H.J. Lu <hongjiu.lu@intel.com>
-
- PR gas/4027
- * i386.h (i386_optab): Put the real "test" before the pseudo
- one.
-
-2007-01-08 Kazu Hirata <kazu@codesourcery.com>
-
- * m68k.h (m68010up): OR fido_a.
-
-2006-12-25 Kazu Hirata <kazu@codesourcery.com>
-
- * m68k.h (fido_a): New.
-
-2006-12-24 Kazu Hirata <kazu@codesourcery.com>
-
- * m68k.h (mcfmac, mcfemac, cfloat, mcfhwdiv, mcfisa_a,
- mcfisa_aa, mcfisa_b, mcfusp, mcf_mask): Double the defined
- values.
-
-2006-11-08 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h (i386_optab): Replace CpuPNI with CpuSSE3.
-
-2006-10-31 Mei Ligang <ligang@sunnorth.com.cn>
-
- * score-inst.h (enum score_insn_type): Add Insn_internal.
-
-2006-10-25 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
- Yukishige Shibata <shibata@rd.scei.sony.co.jp>
- Nobuhisa Fujinami <fnami@rd.scei.sony.co.jp>
- Takeaki Fukuoka <fukuoka@rd.scei.sony.co.jp>
- Alan Modra <amodra@bigpond.net.au>
-
- * spu-insns.h: New file.
- * spu.h: New file.
-
-2006-10-24 Andrew Pinski <andrew_pinski@playstation.sony.com>
-
- * ppc.h (PPC_OPCODE_CELL): Define.
-
-2006-10-23 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
-
- * i386.h : Modify opcode to support for the change in POPCNT opcode
- in amdfam10 architecture.
-
-2006-09-28 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h: Replace CpuMNI with CpuSSSE3.
-
-2006-09-26 Mark Shinwell <shinwell@codesourcery.com>
- Joseph Myers <joseph@codesourcery.com>
- Ian Lance Taylor <ian@wasabisystems.com>
- Ben Elliston <bje@wasabisystems.com>
-
- * arm.h (ARM_CEXT_IWMMXT2, ARM_ARCH_IWMMXT2): Define.
-
-2006-09-17 Mei Ligang <ligang@sunnorth.com.cn>
-
- * score-datadep.h: New file.
- * score-inst.h: New file.
-
-2006-07-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h (i386_optab): Remove InvMem from maskmovq, movhlps,
- movlhps, movmskps, pextrw, pmovmskb, movmskpd, maskmovdqu,
- movdq2q and movq2dq.
-
-2006-07-10 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
- Michael Meissner <michael.meissner@amd.com>
-
- * i386.h: Add amdfam10 new instructions (SSE4a and ABM instructions).
-
-2006-06-12 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h (i386_optab): Add "nop" with memory reference.
-
-2006-06-12 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h (i386_optab): Update comment for 64bit NOP.
-
-2006-06-06 Ben Elliston <bje@au.ibm.com>
- Anton Blanchard <anton@samba.org>
-
- * ppc.h (PPC_OPCODE_POWER6): Define.
- Adjust whitespace.
-
-2006-06-05 Thiemo Seufer <ths@mips.com>
-
- * mips.h: Improve description of MT flags.
-
-2006-05-25 Richard Sandiford <richard@codesourcery.com>
-
- * m68k.h (mcf_mask): Define.
-
-2006-05-05 Thiemo Seufer <ths@mips.com>
- David Ung <davidu@mips.com>
-
- * mips.h (enum): Add macro M_CACHE_AB.
-
-2006-05-04 Thiemo Seufer <ths@mips.com>
- Nigel Stephens <nigel@mips.com>
- David Ung <davidu@mips.com>
-
- * mips.h: Add INSN_SMARTMIPS define.
-
-2006-04-30 Thiemo Seufer <ths@mips.com>
- David Ung <davidu@mips.com>
-
- * mips.h: Defines udi bits and masks. Add description of
- characters which may appear in the args field of udi
- instructions.
-
-2006-04-26 Thiemo Seufer <ths@networkno.de>
-
- * mips.h: Improve comments describing the bitfield instruction
- fields.
-
-2006-04-26 Julian Brown <julian@codesourcery.com>
-
- * arm.h (FPU_VFP_EXT_V3): Define constant.
- (FPU_NEON_EXT_V1): Likewise.
- (FPU_VFP_HARD): Update.
- (FPU_VFP_V3): Define macro.
- (FPU_ARCH_VFP_V3, FPU_ARCH_VFP_V3_PLUS_NEON_V1): Define macros.
-
-2006-04-07 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
-
- * avr.h (AVR_ISA_PWMx): New.
-
-2006-03-28 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k.h (cpu_m68k, cpu_cf, cpu_m68000, cpu_m68008, cpu_m68010,
- cpu_m68020, cpu_m68ec030, cpu_m68040, cpu_m68060, cpu_m68851,
- cpu_m68881, cpu_m68882, cpu_cpu32, cpu_cf5200, cpu_cf5206e,
- cpu_cf5208, cpu_cf521x, cpu_cf5213, cpu_cf5249, cpu_cf528x,
- cpu_cf5307, cpu_cf5329, cpu_cf5407, cpu_cf547x, cpu_cf548x): Remove.
-
-2006-03-10 Paul Brook <paul@codesourcery.com>
-
- * arm.h (ARM_AEXT_V7_ARM): Include v6ZK extensions.
-
-2006-03-04 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * hppa.h (pa_opcodes): Reorder bb opcodes so that pa10 opcodes come
- first. Correct mask of bb "B" opcode.
-
-2006-02-27 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h (i386_optab): Support Intel Merom New Instructions.
-
-2006-02-24 Paul Brook <paul@codesourcery.com>
-
- * arm.h: Add V7 feature bits.
-
-2006-02-23 H.J. Lu <hongjiu.lu@intel.com>
-
- * ia64.h (ia64_opnd): Add IA64_OPND_IMMU5b.
-
-2006-01-31 Paul Brook <paul@codesourcery.com>
- Richard Earnshaw <rearnsha@arm.com>
-
- * arm.h: Use ARM_CPU_FEATURE.
- (ARM_AEXT_*, FPU_ENDIAN_PURE, FPU_VFP_HARD): New.
- (arm_feature_set): Change to a structure.
- (ARM_CPU_HAS_FEATURE, ARM_MERGE_FEATURE_SETS, ARM_CLEAR_FEATURE,
- ARM_FEATURE): New macros.
-
-2005-12-07 Hans-Peter Nilsson <hp@axis.com>
-
- * cris.h (MOVE_M_TO_PREG_OPCODE, MOVE_M_TO_PREG_ZBITS)
- (MOVE_PC_INCR_OPCODE_PREFIX, MOVE_PC_INCR_OPCODE_SUFFIX): New macros.
- (ADD_PC_INCR_OPCODE): Don't define.
-
-2005-12-06 H.J. Lu <hongjiu.lu@intel.com>
-
- PR gas/1874
- * i386.h (i386_optab): Add 64bit support for monitor and mwait.
-
-2005-11-14 David Ung <davidu@mips.com>
-
- * mips.h: Assign 'm'/'M' codes to MIPS16e save/restore
- instructions. Define MIPS16_ALL_ARGS and MIPS16_ALL_STATICS for
- save/restore encoding of the args field.
-
-2005-10-28 Dave Brolley <brolley@redhat.com>
-
- Contribute the following changes:
- 2005-02-16 Dave Brolley <brolley@redhat.com>
-
- * cgen-bitset.h: Rename CGEN_ISA_MASK to CGEN_BITSET. Rename
- cgen_isa_mask_* to cgen_bitset_*.
- * cgen.h: Likewise.
-
- 2003-10-21 Richard Sandiford <rsandifo@redhat.com>
-
- * cgen.h (CGEN_BITSET_ATTR_VALUE): Fix definition.
- (CGEN_ATTR_ENTRY): Change "value" to type "unsigned".
- (CGEN_CPU_TABLE): Make isas a ponter.
-
- 2003-09-29 Dave Brolley <brolley@redhat.com>
-
- * cgen.h (CGEN_ATTR_VALUE_BITSET_TYPE): New typedef.
- (CGEN_ATTR_VALUE_ENUM_TYPE): Ditto.
- (CGEN_ATTR_VALUE_TYPE): Use these new typedefs.
-
- 2002-12-13 Dave Brolley <brolley@redhat.com>
-
- * cgen.h (symcat.h): #include it.
- (cgen-bitset.h): #include it.
- (CGEN_ATTR_VALUE_TYPE): Now a union.
- (CGEN_ATTR_VALUE): Reference macros generated in opcodes/<arch>-desc.h.
- (CGEN_ATTR_ENTRY): 'value' now unsigned.
- (cgen_cpu_desc): 'isas' now (CGEN_ISA_MASK*).
- * cgen-bitset.h: New file.
-
-2005-09-30 Catherine Moore <clm@cm00re.com>
-
- * bfin.h: New file.
-
-2005-10-24 Jan Beulich <jbeulich@novell.com>
-
- * ia64.h (enum ia64_opnd): Move memory operand out of set of
- indirect operands.
-
-2005-10-16 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * hppa.h (pa_opcodes): Add two fcmp opcodes. Reorder ftest opcodes.
- Add FLAG_STRICT to pa10 ftest opcode.
-
-2005-10-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * hppa.h (pa_opcodes): Remove lha entries.
-
-2005-10-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * hppa.h (FLAG_STRICT): Revise comment.
- (pa_opcode): Revise ordering rules. Add/move strict pa10 variants
- before corresponding pa11 opcodes. Add strict pa10 register-immediate
- entries for "fdc".
-
-2005-09-30 Catherine Moore <clm@cm00re.com>
-
- * bfin.h: New file.
-
-2005-09-24 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * hppa.h (pa_opcodes): Add new "fdc" and "fic" opcode entries.
-
-2005-09-06 Chao-ying Fu <fu@mips.com>
-
- * mips.h (OP_SH_MT_U, OP_MASK_MT_U, OP_SH_MT_H, OP_MASK_MT_H,
- OP_SH_MTACC_T, OP_MASK_MTACC_T, OP_SH_MTACC_D, OP_MASK_MTACC_D): New
- define.
- Document !, $, *, &, g, +t, +T operand formats for MT instructions.
- (INSN_ASE_MASK): Update to include INSN_MT.
- (INSN_MT): New define for MT ASE.
-
-2005-08-25 Chao-ying Fu <fu@mips.com>
-
- * mips.h (OP_SH_DSPACC, OP_MASK_DSPACC, OP_SH_DSPACC_S,
- OP_MASK_DSPACC_S, OP_SH_DSPSFT, OP_MASK_DSPSFT, OP_SH_DSPSFT_7,
- OP_MASK_DSPSFT_7, OP_SH_SA3, OP_MASK_SA3, OP_SH_SA4, OP_MASK_SA4,
- OP_SH_IMM8, OP_MASK_IMM8, OP_SH_IMM10, OP_MASK_IMM10, OP_SH_WRDSP,
- OP_MASK_WRDSP, OP_SH_RDDSP, OP_MASK_RDDSP): New define.
- Document 3, 4, 5, 6, 7, 8, 9, 0, :, ', @ operand formats for DSP
- instructions.
- (INSN_DSP): New define for DSP ASE.
-
-2005-08-18 Alan Modra <amodra@bigpond.net.au>
-
- * a29k.h: Delete.
-
-2005-08-15 Daniel Jacobowitz <dan@codesourcery.com>
-
- * ppc.h (PPC_OPCODE_E300): Define.
-
-2005-08-12 Martin Schwidefsky <schwidefsky@de.ibm.com>
-
- * s390.h (s390_opcode_cpu_val): Add enum for cpu type z9-109.
-
-2005-07-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- PR gas/336
- * hppa.h (pa_opcodes): Allow 0 immediates in PA 2.0 variants of pdtlb
- and pitlb.
-
-2005-07-27 Jan Beulich <jbeulich@novell.com>
-
- * i386.h (i386_optab): Add comment to movd. Use LongMem for all
- movd-s. Add NoRex64 to movq-s dealing only with mmx or xmm registers.
- Add movq-s as 64-bit variants of movd-s.
-
-2005-07-18 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * hppa.h: Fix punctuation in comment.
-
- * hppa.h (pa_opcode): Add rules for opcode ordering. Check first for
- implicit space-register addressing. Set space-register bits on opcodes
- using implicit space-register addressing. Add various missing pa20
- long-immediate opcodes. Remove various opcodes using implicit 3-bit
- space-register addressing. Use "fE" instead of "fe" in various
- fstw opcodes.
-
-2005-07-18 Jan Beulich <jbeulich@novell.com>
-
- * i386.h (i386_optab): Operands of aam and aad are unsigned.
-
-2007-07-15 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h (i386_optab): Support Intel VMX Instructions.
-
-2005-07-10 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * hppa.h (pa_opcode): Don't set FLAG_STRICT in pa10 loads and stores.
-
-2005-07-05 Jan Beulich <jbeulich@novell.com>
-
- * i386.h (i386_optab): Add new insns.
-
-2005-07-01 Nick Clifton <nickc@redhat.com>
-
- * sparc.h: Add typedefs to structure declarations.
-
-2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
-
- PR 1013
- * i386.h (i386_optab): Update comments for 64bit addressing on
- mov. Allow 64bit addressing for mov and movq.
-
-2005-06-11 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * hppa.h (pa_opcodes): Use cM and cX instead of cm and cx,
- respectively, in various floating-point load and store patterns.
-
-2005-05-23 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
-
- * hppa.h (FLAG_STRICT): Correct comment.
- (pa_opcodes): Update load and store entries to allow both PA 1.X and
- PA 2.0 mneumonics when equivalent. Entries with cache control
- completers now require PA 1.1. Adjust whitespace.
-
-2005-05-19 Anton Blanchard <anton@samba.org>
-
- * ppc.h (PPC_OPCODE_POWER5): Define.
-
-2005-05-10 Nick Clifton <nickc@redhat.com>
-
- * Update the address and phone number of the FSF organization in
- the GPL notices in the following files:
- a29k.h, alpha.h, arc.h, arm.h, avr.h, cgen.h, convex.h, cris.h,
- crx.h, d10v.h, d30v.h, dlx.h, h8300.h, hppa.h, i370.h, i386.h,
- i860.h, i960.h, m68hc11.h, m68k.h, m88k.h, maxq.h, mips.h, mmix.h,
- mn10200.h, mn10300.h, msp430.h, np1.h, ns32k.h, or32.h, pdp11.h,
- pj.h, pn.h, ppc.h, pyr.h, s390.h, sparc.h, tic30.h, tic4x.h,
- tic54x.h, tic80.h, v850.h, vax.h
-
-2005-05-09 Jan Beulich <jbeulich@novell.com>
-
- * i386.h (i386_optab): Add ht and hnt.
-
-2005-04-18 Mark Kettenis <kettenis@gnu.org>
-
- * i386.h: Insert hyphens into selected VIA PadLock extensions.
- Add xcrypt-ctr. Provide aliases without hyphens.
-
-2005-04-13 H.J. Lu <hongjiu.lu@intel.com>
-
- Moved from ../ChangeLog
-
- 2005-04-12 Paul Brook <paul@codesourcery.com>
- * m88k.h: Rename psr macros to avoid conflicts.
-
- 2005-03-12 Zack Weinberg <zack@codesourcery.com>
- * arm.h: Adjust comments for ARM_EXT_V4T and ARM_EXT_V5T.
- Add ARM_EXT_V6T2, ARM_ARCH_V6T2, ARM_ARCH_V6KT2, ARM_ARCH_V6ZT2,
- and ARM_ARCH_V6ZKT2.
-
- 2004-11-29 Tomer Levi <Tomer.Levi@nsc.com>
- * crx.h (enum operand_type): Rename rbase_cst4 to rbase_dispu4.
- Remove redundant instruction types.
- (struct argument): X_op - new field.
- (struct cst4_entry): Remove.
- (no_op_insn): Declare.
-
- 2004-11-05 Tomer Levi <Tomer.Levi@nsc.com>
- * crx.h (enum argtype): Rename types, remove unused types.
-
- 2004-10-27 Tomer Levi <Tomer.Levi@nsc.com>
- * crx.h (enum reg): Rearrange registers, remove 'ccfg' and `'pc'.
- (enum reg_type): Remove CRX_PC_REGTYPE, CRX_MTPR_REGTYPE.
- (enum operand_type): Rearrange operands, edit comments.
- replace us<N> with ui<N> for unsigned immediate.
- replace d<N> with disps<N>/dispu<N>/dispe<N> for signed/unsigned/escaped
- displacements (respectively).
- replace rbase_ridx_scl2_dispu<N> with rindex_disps<N> for register index.
- (instruction type): Add NO_TYPE_INS.
- (instruction flags): Add USER_REG, CST4MAP, NO_SP, NO_RPTR.
- (operand_entry): New field - 'flags'.
- (operand flags): New.
-
- 2004-10-21 Tomer Levi <Tomer.Levi@nsc.com>
- * crx.h (operand_type): Remove redundant types i3, i4,
- i5, i8, i12.
- Add new unsigned immediate types us3, us4, us5, us16.
-
-2005-04-12 Mark Kettenis <kettenis@gnu.org>
-
- * i386.h (i386_optab): Mark VIA PadLock instructions as ImmExt and
- adjust them accordingly.
-
-2005-04-01 Jan Beulich <jbeulich@novell.com>
-
- * i386.h (i386_optab): Add rdtscp.
-
-2005-03-29 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h (i386_optab): Don't allow the `l' suffix for moving
- between memory and segment register. Allow movq for moving between
- general-purpose register and segment register.
-
-2005-02-09 Jan Beulich <jbeulich@novell.com>
-
- PR gas/707
- * i386.h (i386_optab): Add x_Suf to fbld and fbstp. Add w_Suf and
- FloatMF to fldcw, fstcw, fnstcw, and the memory formas of fstsw and
- fnstsw.
-
-2006-02-07 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k.h (m68008, m68ec030, m68882): Remove.
- (m68k_mask): New.
- (cpu_m68k, cpu_cf): New.
- (mcf5200, mcf5206e, mcf521x, mcf5249, mcf528x, mcf5307, mcf5407,
- mcf5470, mcf5480): Rename to cpu_<foo>. Add m680x0 variants.
-
-2005-01-25 Alexandre Oliva <aoliva@redhat.com>
-
- 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
- * cgen.h (enum cgen_parse_operand_type): Add
- CGEN_PARSE_OPERAND_SYMBOLIC.
-
-2005-01-21 Fred Fish <fnf@specifixinc.com>
-
- * mips.h: Change INSN_ALIAS to INSN2_ALIAS.
- Change INSN_WRITE_MDMX_ACC to INSN2_WRITE_MDMX_ACC.
- Change INSN_READ_MDMX_ACC to INSN2_READ_MDMX_ACC.
-
-2005-01-19 Fred Fish <fnf@specifixinc.com>
-
- * mips.h (struct mips_opcode): Add new pinfo2 member.
- (INSN_ALIAS): New define for opcode table entries that are
- specific instances of another entry, such as 'move' for an 'or'
- with a zero operand.
- (INSN_READ_MDMX_ACC): Redefine from 0 to 0x2.
- (INSN_WRITE_MDMX_ACC): Redefine from 0 to 0x4.
-
-2004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
-
- * mips.h (CPU_RM9000): Define.
- (OPCODE_IS_MEMBER): Handle CPU_RM9000.
-
-2004-11-25 Jan Beulich <jbeulich@novell.com>
-
- * i386.h: CpuNo64 mov can't reasonably have a 'q' suffix. Moves
- to/from test registers are illegal in 64-bit mode. Add missing
- NoRex64 to sidt. fxsave/fxrstor now allow for a 'q' suffix
- (previously one had to explicitly encode a rex64 prefix). Re-enable
- lahf/sahf in 64-bit mode as at least some Athlon64/Opteron steppings
- support it there. Add cmpxchg16b as per Intel's 64-bit documentation.
-
-2004-11-23 Jan Beulich <jbeulich@novell.com>
-
- * i386.h (i386_optab): paddq and psubq, even in their MMX form, are
- available only with SSE2. Change the MMX additions introduced by SSE
- and 3DNow!A to CpuMMX2 (rather than CpuMMX). Indicate the 3DNow!A
- instructions by their now designated identifier (since combining i686
- and 3DNow! does not really imply 3DNow!A).
-
-2004-11-19 Alan Modra <amodra@bigpond.net.au>
-
- * msp430.h (struct rcodes_s, MSP430_RLC, msp430_rcodes,
- struct hcodes_s, msp430_hcodes): Move to gas/config/tc-msp430.c.
-
-2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
- Vineet Sharma <vineets@noida.hcltech.com>
-
- * maxq.h: New file: Disassembly information for the maxq port.
-
-2004-11-05 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h (i386_optab): Put back "movzb".
-
-2004-11-04 Hans-Peter Nilsson <hp@axis.com>
-
- * cris.h (enum cris_insn_version_usage): Tweak formatting and
- comments. Remove member cris_ver_sim. Add members
- cris_ver_sim_v0_10, cris_ver_v0_10, cris_ver_v3_10,
- cris_ver_v8_10, cris_ver_v10, cris_ver_v10p.
- (struct cris_support_reg, struct cris_cond15): New types.
- (cris_conds15): Declare.
- (JUMP_PC_INCR_OPCODE_V32, BA_DWORD_OPCODE, NOP_OPCODE_COMMON)
- (NOP_OPCODE_ZBITS_COMMON, LAPC_DWORD_OPCODE, LAPC_DWORD_Z_BITS)
- (NOP_OPCODE_V32, NOP_Z_BITS_V32): New macros.
- (NOP_Z_BITS): Define in terms of NOP_OPCODE.
- (cris_imm_oprnd_size_type): New members SIZE_FIELD_SIGNED and
- SIZE_FIELD_UNSIGNED.
-
-2004-11-04 Jan Beulich <jbeulich@novell.com>
-
- * i386.h (sldx_Suf): Remove.
- (FP, l_FP, sl_FP, x_FP): Don't imply IgnoreSize.
- (q_FP): Define, implying no REX64.
- (x_FP, sl_FP): Imply FloatMF.
- (i386_optab): Split reg and mem forms of moving from segment registers
- so that the memory forms can ignore the 16-/32-bit operand size
- distinction. Adjust a few others for Intel mode. Remove *FP uses from
- all non-floating-point instructions. Unite 32- and 64-bit forms of
- movsx, movzx, and movd. Adjust floating point operations for the above
- changes to the *FP macros. Add DefaultSize to floating point control
- insns operating on larger memory ranges. Remove left over comments
- hinting at certain insns being Intel-syntax ones where the ones
- actually meant are already gone.
-
-2004-10-07 Tomer Levi <Tomer.Levi@nsc.com>
-
- * crx.h: Add COPS_REG_INS - Coprocessor Special register
- instruction type.
-
-2004-09-30 Paul Brook <paul@codesourcery.com>
-
- * arm.h (ARM_EXT_V6K, ARM_EXT_V6Z): Define.
- (ARM_ARCH_V6K, ARM_ARCH_V6Z, ARM_ARCH_V6ZK): Define.
-
-2004-09-11 Theodore A. Roth <troth@openavr.org>
-
- * avr.h: Add support for
- atmega48, atmega88, atmega168, attiny13, attiny2313, at90can128.
-
-2004-09-09 Segher Boessenkool <segher@kernel.crashing.org>
-
- * ppc.h (PPC_OPERAND_OPTIONAL): Fix comment.
-
-2004-08-24 Dmitry Diky <diwil@spec.ru>
-
- * msp430.h (msp430_opc): Add new instructions.
- (msp430_rcodes): Declare new instructions.
- (msp430_hcodes): Likewise..
-
-2004-08-13 Nick Clifton <nickc@redhat.com>
-
- PR/301
- * h8300.h (O_JSR): Do not allow VECIND addressing for non-SX
- processors.
-
-2004-08-30 Michal Ludvig <mludvig@suse.cz>
-
- * i386.h (i386_optab): Added montmul/xsha1/xsha256 insns.
-
-2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h (i386_optab): Allow cs/ds in 64bit for branch hints.
-
-2004-07-21 Jan Beulich <jbeulich@novell.com>
-
- * i386.h: Adjust instruction descriptions to better match the
- specification.
-
-2004-07-16 Richard Earnshaw <rearnsha@arm.com>
-
- * arm.h: Remove all old content. Replace with architecture defines
- from gas/config/tc-arm.c.
-
-2004-07-09 Andreas Schwab <schwab@suse.de>
-
- * m68k.h: Fix comment.
-
-2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
-
- * crx.h: New file.
-
-2004-06-24 Alan Modra <amodra@bigpond.net.au>
-
- * i386.h (i386_optab): Remove fildd, fistpd and fisttpd.
-
-2004-05-24 Peter Barada <peter@the-baradas.com>
-
- * m68k.h: Add 'size' to m68k_opcode.
-
-2004-05-05 Peter Barada <peter@the-baradas.com>
-
- * m68k.h: Switch from ColdFire chip name to core variant.
-
-2004-04-22 Peter Barada <peter@the-baradas.com>
-
- * m68k.h: Add mcfmac/mcfemac definitions. Update operand
- descriptions for new EMAC cases.
- Remove ColdFire macmw/macml/msacmw/msacmw hacks and properly
- handle Motorola MAC syntax.
- Allow disassembly of ColdFire V4e object files.
-
-2004-03-16 Alan Modra <amodra@bigpond.net.au>
-
- * ppc.h (PPC_OPERAND_GPR_0): Define. Bump other operand defines.
-
-2004-03-12 Jakub Jelinek <jakub@redhat.com>
-
- * i386.h (i386_optab): Remove CpuNo64 from sysenter and sysexit.
-
-2004-03-12 Michal Ludvig <mludvig@suse.cz>
-
- * i386.h (i386_optab): Added xstore as an alias for xstorerng.
-
-2004-03-12 Michal Ludvig <mludvig@suse.cz>
-
- * i386.h (i386_optab): Added xstore/xcrypt insns.
-
-2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
-
- * h8300.h (32bit ldc/stc): Add relaxing support.
-
-2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
-
- * h8300.h (BITOP): Pass MEMRELAX flag.
-
-2004-01-09 Anil Paranjpe <anilp1@KPITCummins.com>
-
- * h8300.h (BITOP): Dissallow operations on @aa:16 and @aa:32
- except for the H8S.
-
-For older changes see ChangeLog-9103
-
-Local Variables:
-mode: change-log
-left-margin: 8
-fill-column: 74
-version-control: never
-End:
diff --git a/include/opcode/ChangeLog-9103 b/include/opcode/ChangeLog-9103
deleted file mode 100644
index 9a04bf5..0000000
--- a/include/opcode/ChangeLog-9103
+++ /dev/null
@@ -1,3121 +0,0 @@
-2005-04-13 H.J. Lu <hongjiu.lu@intel.com>
-
- 2003-11-18 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
- * mips.h: Define new enum members, M_LCA_AB and M_DLCA_AB.
-
- 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
- * tic4x.h: Namespace cleanup. Replace s/c4x/tic4x
-
- 2002-11-16 Klee Dienes <kdienes@apple.com>
- * m88k.h (INSTAB): Remove 'next' field.
- (instruction): Remove definition; replace with extern declaration
- and mark as const.
-
- 2002-08-28 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
- * tic4x.h: New file.
-
- 2002-07-25 Richard Sandiford <rsandifo@redhat.com>
- * mips.h (CPU_R2000): Remove.
-
-2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
- Bernardo Innocenti <bernie@develer.com>
-
- * m68k.h: Add MCFv4/MCF5528x support.
-
-2003-10-19 Hans-Peter Nilsson <hp@bitrange.com>
-
- * mmix.h (JMP_INSN_BYTE): Define.
-
-2003-09-30 Chris Demetriou <cgd@broadcom.com>
-
- * mips.h: Document +E, +F, +G, +H, and +I operand types.
- Update documentation of I, +B and +C operand types.
- (INSN_ISA64R2, ISA_MIPS64R2, CPU_MIPS64R2): New defines.
- (M_DEXT, M_DINS): New enum values.
-
-2003-09-04 Nick Clifton <nickc@redhat.com>
-
- * v850.h (PROCESSOR_V850E1): Define.
-
-2003-08-19 Alan Modra <amodra@bigpond.net.au>
-
- * ppc.h (PPC_OPCODE_440): Define. Formatting. Use hex for other
- PPC_OPCODE_* defines.
-
-2003-08-16 Jason Eckhardt <jle@rice.edu>
-
- * i860.h (fmov.ds): Expand as famov.ds.
- (fmov.sd): Expand as famov.sd.
- (pfmov.ds): Expand as pfamov.ds.
-
-2003-08-07 Michael Meissner <gnu@the-meissners.org>
-
- * cgen.h: Remove PARAM macro usage in all prototypes.
- (CGEN_EXTRACT_INFO): Use void * instead of PTR.
- (cgen_print_fn): Ditto.
- (CGEN_HW_ENTRY): Ditto.
- (CGEN_MAYBE_MULTI_IFLD): Ditto.
- (struct cgen_insn): Ditto.
- (CGEN_CPU_TABLE): Ditto.
-
-2003-08-07 Alan Modra <amodra@bigpond.net.au>
-
- * alpha.h: Remove PARAMS macro.
- * arc.h: Likewise.
- * d10v.h: Likewise.
- * d30v.h: Likewise.
- * i370.h: Likewise.
- * or32.h: Likewise.
- * pj.h: Likewise.
- * ppc.h: Likewise.
- * sparc.h: Likewise.
- * tic80.h: Likewise.
- * v850.h: Likewise.
-
-2003-07-18 Michael Snyder <msnyder@redhat.com>
-
- * include/opcode/h8sx.h (DO_MOVA1, DO_MOVA2): Reformatting.
-
-2003-07-15 Richard Sandiford <rsandifo@redhat.com>
-
- * mips.h (CPU_RM7000): New macro.
- (OPCODE_IS_MEMBER): Match CPU_RM7000 against 4650 insns.
-
-2003-07-09 Alexandre Oliva <aoliva@redhat.com>
-
- 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
- * mn10300.h (AM33_2): Renamed from AM33.
- 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
- * mn10300.h (AM332, FMT_D3): Defined.
- (MN10300_OPERAND_FSREG, MN10300_OPERAND_FDREG): Likewise.
- (MN10300_OPERAND_FPCR): Likewise.
-
-2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
-
- * s390.h (s390_opcode_cpu_val): Add enum for cpu type z990.
-
-2003-06-25 Richard Sandiford <rsandifo@redhat.com>
-
- * h8300.h (IMM2_NS, IMM8_NS, IMM16_NS): Remove.
- (IMM8U, IMM8U_NS): Define.
- (h8_opcodes): Use IMM8U_NS for mov.[wl] #xx:8,@yy.
-
-2003-06-25 Richard Sandiford <rsandifo@redhat.com>
-
- * h8300.h (h8_opcodes): Fix the mov.l @(dd:32,ERs),ERd and
- mov.l ERs,@(dd:32,ERd) entries.
-
-2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
-
- * i386.h (i386_optab): Support Intel Precott New Instructions.
-
-2003-06-10 Gary Hade <garyhade@us.ibm.com>
-
- * ppc.h (PPC_OPERAND_DQ): Define.
-
-2003-06-10 Richard Sandiford <rsandifo@redhat.com>
-
- * h8300.h (IMM4_NS, IMM8_NS): New.
- (h8_opcodes): Replace IMM4 with IMM4_NS in mov.b and mov.w entries.
- Likewise IMM8 for mov.w and mov.l. Likewise IMM16U for mov.l.
-
-2003-06-03 Michael Snyder <msnyder@redhat.com>
-
- * h8300.h (enum h8_model): Add AV_H8S to distinguish from H8H.
- (ldc): Split ccr ops from exr ops (which are only available
- on H8S or H8SX).
- (stc): Ditto.
- (andc, orc, xorc): Ditto.
- (ldmac, stmac, clrmac, mac): Change access to AV_H8S.
-
-2003-06-03 Michael Snyder <msnyder@redhat.com>
- and Bernd Schmidt <bernds@redhat.com>
- and Alexandre Oliva <aoliva@redhat.com>
- * h8300.h: Add support for h8300sx instruction set.
-
-2003-05-23 Jason Eckhardt <jle@rice.edu>
-
- * i860.h (expand_type): Add XP_ONLY.
- (scyc.b): New XP instruction.
- (ldio.l): Likewise.
- (ldio.s): Likewise.
- (ldio.b): Likewise.
- (ldint.l): Likewise.
- (ldint.s): Likewise.
- (ldint.b): Likewise.
- (stio.l): Likewise.
- (stio.s): Likewise.
- (stio.b): Likewise.
- (pfld.q): Likewise.
-
-2003-05-20 Jason Eckhardt <jle@rice.edu>
-
- * i860.h (flush): Set lower 3 bits properly and use 'L'
- for the immediate operand type instead of 'i'.
-
-2003-05-20 Jason Eckhardt <jle@rice.edu>
-
- * i860.h (fzchks): Both S and R bits must be set.
- (pfzchks): Likewise.
- (faddp): Likewise.
- (pfaddp): Likewise.
- (fix.ss): Remove (invalid instruction).
- (pfix.ss): Likewise.
- (ftrunc.ss): Likewise.
- (pftrunc.ss): Likewise.
-
-2003-05-18 Jason Eckhardt <jle@rice.edu>
-
- * i860.h (form, pform): Add missing .dd suffix.
-
-2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
-
- * m68hc11.h (M68HC12_BANK_VIRT): Define to 0x010000
-
-2003-04-07 Michael Snyder <msnyder@redhat.com>
-
- * h8300.h (ldc/stc): Fix up src/dst swaps.
-
-2003-04-09 J. Grant <jg-binutils@jguk.org>
-
- * mips.h: Correct comment typo.
-
-2003-03-21 Martin Schwidefsky <schwidefsky@de.ibm.com>
-
- * s390.h (s390_opcode_arch_val): Rename to s390_opcode_mode_val.
- (S390_OPCODE_ESAME): Rename to S390_OPCODE_ZARCH.
- (s390_opcode): Remove architecture. Add modes and min_cpu.
-
-2003-03-17 D.Venkatasubramanian <dvenkat@noida.hcltech.com>
-
- * h8300.h (O_SYS_CMDLINE): New pseudo opcode for command line
- processing.
-
-2003-02-21 Noida D.Venkatasubramanian <dvenkat@noida.hcltech.com>
-
- * h8300.h (ldmac, stmac): Replace MACREG with MS32 and MD32.
-
-2003-01-23 Alan Modra <amodra@bigpond.net.au>
-
- * m68hc11.h (cpu6812s): Define.
-
-2003-01-07 Chris Demetriou <cgd@broadcom.com>
-
- * mips.h: Fix missing space in comment.
- (INSN_ISA1, INSN_ISA2, INSN_ISA3, INSN_ISA4, INSN_ISA5)
- (INSN_ISA32, INSN_ISA32R2, INSN_ISA64): Shift values right
- by four bits.
-
-2003-01-02 Chris Demetriou <cgd@broadcom.com>
-
- * mips.h: Update copyright years to include 2002 (which had
- been missed previously) and 2003. Make comments about "+A",
- "+B", and "+C" operand types more descriptive.
-
-2002-12-31 Chris Demetriou <cgd@broadcom.com>
-
- * mips.h: Note that the "+D" operand type name is now used.
-
-2002-12-30 Chris Demetriou <cgd@broadcom.com>
-
- * mips.h: Document "+" as the start of two-character operand
- type names, and add new "K", "+A", "+B", and "+C" operand types.
- (OP_MASK_INSMSB, OP_SH_INSMSB, OP_MASK_EXTMSB)
- (OP_SH_EXTMSB, INSN_ISA32R2, ISA_MIPS32R2, CPU_MIPS32R2): New
- defines.
-
-2002-12-24 Dmitry Diky <diwil@mail.ru>
-
- * msp430.h: New file. Defines msp430 opcodes.
-
-2002-12-30 D.Venkatasubramanian <dvenkat@noida.hcltech.com>
-
- * h8300.h: Added some more pseudo opcodes for system call
- processing.
-
-2002-12-19 Chris Demetriou <cgd@broadcom.com>
-
- * mips.h (OP_OP_COP0, OP_OP_COP1, OP_OP_COP2, OP_OP_COP3)
- (OP_OP_LWC1, OP_OP_LWC2, OP_OP_LWC3, OP_OP_LDC1, OP_OP_LDC2)
- (OP_OP_LDC3, OP_OP_SWC1, OP_OP_SWC2, OP_OP_SWC3, OP_OP_SDC1)
- (OP_OP_SDC2, OP_OP_SDC3): Define.
-
-2002-12-16 Alan Modra <amodra@bigpond.net.au>
-
- * hppa.h (completer_chars): #if 0 out.
-
- * ns32k.h (struct ns32k_opcode): Constify "name", "operands" and
- "default_args".
- (struct not_wot): Constify "args".
- (struct not): Constify "name".
- (numopcodes): Delete.
- (endop): Delete.
-
-2002-12-13 Alan Modra <amodra@bigpond.net.au>
-
- * pj.h (pj_opc_info_t): Add union.
-
-2002-12-04 David Mosberger <davidm@hpl.hp.com>
-
- * ia64.h: Fix copyright message.
- (IA64_OPND_AR_CSD): New operand kind.
-
-2002-12-03 Richard Henderson <rth@redhat.com>
-
- * ia64.h (enum ia64_opnd): Add IA64_OPND_LDXMOV.
-
-2002-12-03 Alan Modra <amodra@bigpond.net.au>
-
- * cgen.h (struct cgen_maybe_multi_ifield): Add "const PTR p" to union.
- Constify "leaf" and "multi".
-
-2002-11-19 Klee Dienes <kdienes@apple.com>
-
- * h8300.h (h8_opcode): Remove 'noperands', 'idx', and 'size'
- fields.
- (h8_opcodes). Modify initializer and initializer macros to no
- longer initialize the removed fields.
-
-2002-11-19 Svein E. Seldal <Svein.Seldal@solidas.com>
-
- * tic4x.h (c4x_insts): Fixed LDHI constraint
-
-2002-11-18 Klee Dienes <kdienes@apple.com>
-
- * h8300.h (h8_opcode): Remove 'length' field.
- (h8_opcodes): Mark as 'const' (both the declaration and
- definition). Modify initializer and initializer macros to no
- longer initialize the length field.
-
-2002-11-18 Klee Dienes <kdienes@apple.com>
-
- * arc.h (arc_ext_opcodes): Declare as extern.
- (arc_ext_operands): Declare as extern.
- * i860.h (i860_opcodes): Declare as const.
-
-2002-11-18 Svein E. Seldal <Svein.Seldal@solidas.com>
-
- * tic4x.h: File reordering. Added enhanced opcodes.
-
-2002-11-16 Svein E. Seldal <Svein.Seldal@solidas.com>
-
- * tic4x.h: Major rewrite of entire file. Define instruction
- classes, and put each instruction into a class.
-
-2002-11-11 Svein E. Seldal <Svein.Seldal@solidas.com>
-
- * tic4x.h: Added new opcodes and corrected some bugs. Add support
- for new DSP types.
-
-2002-10-14 Alan Modra <amodra@bigpond.net.au>
-
- * cgen.h: Test __BFD_H_SEEN__ rather than BFD_VERSION_DATE.
-
-2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
- Ken Raeburn <raeburn@cygnus.com>
- Aldy Hernandez <aldyh@redhat.com>
- Eric Christopher <echristo@redhat.com>
- Richard Sandiford <rsandifo@redhat.com>
-
- * mips.h: Update comment for new opcodes.
- (OP_MASK_VECBYTE, OP_SH_VECBYTE): New.
- (OP_MASK_VECALIGN, OP_SH_VECALIGN): New.
- (INSN_4111, INSN_4120, INSN_5400, INSN_5500): New.
- (CPU_VR4120, CPU_VR5400, CPU_VR5500): New.
- (OPCODE_IS_MEMBER): Handle the new CPU_* values and INSN_* flags.
- Don't match CPU_R4111 with INSN_4100.
-
-2002-08-19 Elena Zannoni <ezannoni@redhat.com>
-
- From matthew green <mrg@redhat.com>
-
- * ppc.h (PPC_OPCODE_SPE): New opcode flag for Powerpc e500
- instructions.
- (PPC_OPCODE_ISEL, PPC_OPCODE_BRLOCK, PPC_OPCODE_PMR,
- PPC_OPCODE_CACHELCK, PPC_OPCODE_RFMCI): New opcode flags for the
- e500x2 Integer select, branch locking, performance monitor,
- cache locking and machine check APUs, respectively.
- (PPC_OPCODE_EFS): New opcode type for efs* instructions.
- (PPC_OPCODE_CLASSIC): New opcode type for Classic PowerPC instructions.
-
-2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
-
- * m68hc11.h (M6812_OP_PAGE): Define to identify call operand.
- (M68HC12_BANK_VIRT, M68HC12_BANK_MASK, M68HC12_BANK_BASE,
- M68HC12_BANK_SHIFT, M68HC12_BANK_PAGE_MASK): Define for 68HC12
- memory banks.
- (M6811_OC1M5, M6811_OC1M4, M6811_MODF): Fix value.
-
-2002-07-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
-
- * mips.h (INSN_MIPS16): New define.
-
-2002-07-08 Alan Modra <amodra@bigpond.net.au>
-
- * i386.h: Remove IgnoreSize from movsx and movzx.
-
-2002-06-08 Alan Modra <amodra@bigpond.net.au>
-
- * a29k.h: Replace CONST with const.
- (CONST): Don't define.
- * convex.h: Replace CONST with const.
- (CONST): Don't define.
- * dlx.h: Replace CONST with const.
- * or32.h (CONST): Don't define.
-
-2002-05-30 Chris G. Demetriou <cgd@broadcom.com>
-
- * mips.h (OP_SH_ALN, OP_MASK_ALN, OP_SH_VSEL, OP_MASK_VSEL)
- (MDMX_FMTSEL_IMM_QH, MDMX_FMTSEL_IMM_OB, MDMX_FMTSEL_VEC_QH)
- (MDMX_FMTSEL_VEC_OB, INSN_READ_MDMX_ACC, INSN_WRITE_MDMX_ACC)
- (INSN_MDMX): New constants, for MDMX support.
- (opcode character list): Add "O", "Q", "X", "Y", and "Z" for MDMX.
-
-2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
-
- * dlx.h: New file.
-
-2002-05-25 Alan Modra <amodra@bigpond.net.au>
-
- * ia64.h: Use #include "" instead of <> for local header files.
- * sparc.h: Likewise.
-
-2002-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
-
- * mips.h: Add M_DROL, M_DROL_I, M_DROR, M_DROR_I macro cases.
-
-2002-05-17 Andrey Volkov <avolkov@sources.redhat.com>
-
- * h8300.h: Corrected defs of all control regs
- and eepmov instr.
-
-2002-04-11 Alan Modra <amodra@bigpond.net.au>
-
- * i386.h: Add intel mode cmpsd and movsd.
- Put them before SSE2 insns, so that rep prefix works.
-
-2002-03-15 Chris G. Demetriou <cgd@broadcom.com>
-
- * mips.h (INSN_MIPS3D): New definition used to mark MIPS-3D
- instructions.
- (OPCODE_IS_MEMBER): Adjust comments to indicate that ASE bit masks
- may be passed along with the ISA bitmask.
-
-2002-03-05 Paul Koning <pkoning@equallogic.com>
-
- * pdp11.h: Add format codes for float instruction formats.
-
-2002-02-25 Alan Modra <amodra@bigpond.net.au>
-
- * ppc.h (PPC_OPCODE_POWER4, PPC_OPCODE_NOPOWER4): Define.
-
-Mon Feb 18 17:31:48 CET 2002 Jan Hubicka <jh@suse.cz>
-
- * i386.h (push,pop): Fix Reg64 to WordReg to allow 16bit operands.
-
-Mon Feb 11 12:53:19 CET 2002 Jan Hubicka <jh@suse.cz>
-
- * i386.h (push,pop): Allow 16bit operands in 64bit mode.
- (xchg): Fix.
- (in, out): Disable 64bit operands.
- (call, jmp): Avoid REX prefixes.
- (jcxz): Prohibit in 64bit mode
- (jrcxz, loop): Add 64bit variants.
- (movq): Fix patterns.
- (movmskps, pextrw, pinstrw): Add 64bit variants.
-
-2002-01-31 Ivan Guzvinec <ivang@opencores.org>
-
- * or32.h: New file.
-
-2002-01-22 Graydon Hoare <graydon@redhat.com>
-
- * cgen.h (CGEN_MAYBE_MULTI_IFLD): New structure.
- (CGEN_OPERAND): Add CGEN_MAYBE_MULTI_IFLD field.
-
-2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
-
- * h8300.h: Comment typo fix.
-
-2002-01-03 matthew green <mrg@redhat.com>
-
- * ppc.h (PPC_OPCODE_BOOKE): BookE is not Motorola specific.
- (PPC_OPCODE_BOOKE64): Likewise.
-
-Mon Dec 31 16:45:41 2001 Jeffrey A Law (law@cygnus.com)
-
- * hppa.h (call, ret): Move to end of table.
- (addb, addib): PA2.0 variants should have been PA2.0W.
- (ldw, ldh, ldb, stw, sth, stb, stwa): Reorder to keep disassembler
- happy.
- (fldw, fldd, fstw, fstd, bb): Likewise.
- (short loads/stores): Tweak format specifier slightly to keep
- disassembler happy.
- (indexed loads/stores): Likewise.
- (absolute loads/stores): Likewise.
-
-2001-12-04 Alexandre Oliva <aoliva@redhat.com>
-
- * d10v.h (OPERAND_NOSP): New macro.
-
-2001-11-29 Alexandre Oliva <aoliva@redhat.com>
-
- * d10v.h (OPERAND_SP): New macro.
-
-2001-11-15 Alan Modra <amodra@bigpond.net.au>
-
- * ppc.h (struct powerpc_operand <insert, extract>): Add dialect param.
-
-2001-11-11 Timothy Wall <twall@alum.mit.edu>
-
- * tic54x.h: Revise opcode layout; don't really need a separate
- structure for parallel opcodes.
-
-2001-11-13 Zack Weinberg <zack@codesourcery.com>
- Alan Modra <amodra@bigpond.net.au>
-
- * i386.h (i386_optab): Add entries for "sldr", "smsw" and "str" to
- accept WordReg.
-
-2001-11-04 Chris Demetriou <cgd@broadcom.com>
-
- * mips.h (OPCODE_IS_MEMBER): Remove extra space.
-
-2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
-
- * mmix.h: New file.
-
-2001-10-18 Chris Demetriou <cgd@broadcom.com>
-
- * mips.h (OPCODE_IS_MEMBER): Add a no-op term to the end
- of the expression, to make source code merging easier.
-
-2001-10-17 Chris Demetriou <cgd@broadcom.com>
-
- * mips.h: Sort coprocessor instruction argument characters
- in comment, add a few more words of description for "H".
-
-2001-10-17 Chris Demetriou <cgd@broadcom.com>
-
- * mips.h (INSN_SB1): New cpu-specific instruction bit.
- (OPCODE_IS_MEMBER): Allow instructions matching INSN_SB1
- if cpu is CPU_SB1.
-
-2001-10-17 matthew green <mrg@redhat.com>
-
- * ppc.h (PPC_OPCODE_BOOKE64): Fix typo.
-
-2001-10-12 matthew green <mrg@redhat.com>
-
- * ppc.h (PPC_OPCODE_BOOKE, PPC_OPCODE_BOOKE64, PPC_OPCODE_403): New
- opcode flags for BookE 32-bit, BookE 64-bit and PowerPC 403
- instructions, respectively.
-
-2001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
-
- * v850.h: Remove spurious comment.
-
-2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
-
- * h8300.h: Fix compile time warning messages
-
-2001-09-04 Richard Henderson <rth@redhat.com>
-
- * alpha.h (struct alpha_operand): Pack elements into bitfields.
-
-2001-08-31 Eric Christopher <echristo@redhat.com>
-
- * mips.h: Remove CPU_MIPS32_4K.
-
-2001-08-27 Torbjorn Granlund <tege@swox.com>
-
- * ppc.h (PPC_OPERAND_DS): Define.
-
-2001-08-25 Andreas Jaeger <aj@suse.de>
-
- * d30v.h: Fix declaration of reg_name_cnt.
-
- * d10v.h: Fix declaration of d10v_reg_name_cnt.
-
- * arc.h: Add prototypes from opcodes/arc-opc.c.
-
-2001-08-16 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
-
- * mips.h (INSN_10000): Define.
- (OPCODE_IS_MEMBER): Check for INSN_10000.
-
-2001-08-10 Alan Modra <amodra@one.net.au>
-
- * ppc.h: Revert 2001-08-08.
-
-2001-08-10 Richard Sandiford <rsandifo@redhat.com>
-
- * mips.h (INSN_GP32): Remove.
- (OPCODE_IS_MEMBER): Remove gp32 parameter.
- (M_MOVE): New macro identifier.
-
-2001-08-08 Alan Modra <amodra@one.net.au>
-
- 1999-10-25 Torbjorn Granlund <tege@swox.com>
- * ppc.h (struct powerpc_operand): New field `reloc'.
-
-2001-08-01 Aldy Hernandez <aldyh@redhat.com>
-
- * mips.h (INSN_ISA_MASK): Nuke bits 12-15.
-
-2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
-
- * cgen.h (CGEN_INSN): Add regex support.
- (build_insn_regex): Declare.
-
-2001-07-11 Frank Ch. Eigler <fche@redhat.com>
-
- * cgen.h (CGEN_MACH): Add insn_chunk_bitsize field.
- (cgen_cpu_desc): Ditto.
-
-2001-07-07 Ben Elliston <bje@redhat.com>
-
- * m88k.h: Clean up and reformat. Remove unused code.
-
-2001-06-14 Geoffrey Keating <geoffk@redhat.com>
-
- * cgen.h (cgen_keyword): Add nonalpha_chars field.
-
-2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
-
- * mips.h (CPU_R12000): Define.
-
-2001-05-23 John Healy <jhealy@redhat.com>
-
- * cgen.h: Increased CGEN_MAX_SYNTAX_ELEMENTS to 48.
-
-2001-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
-
- * mips.h (INSN_ISA_MASK): Define.
-
-2001-05-12 Alan Modra <amodra@one.net.au>
-
- * i386.h (i386_optab): Second operand of cvtps2dq is an xmm reg,
- not an mmx reg. Swap xmm/mmx regs on both movdq2q and movq2dq,
- and use InvMem as these insns must have register operands.
-
-2001-05-04 Alan Modra <amodra@one.net.au>
-
- * i386.h (i386_optab): Move InvMem to first operand of pmovmskb
- and pextrw to swap reg/rm assignments.
-
-2001-04-05 Hans-Peter Nilsson <hp@axis.com>
-
- * cris.h (enum cris_insn_version_usage): Correct comment for
- cris_ver_v3p.
-
-2001-03-24 Alan Modra <alan@linuxcare.com.au>
-
- * i386.h (i386_optab): Correct entry for "movntdq". Add "punpcklqdq".
- Add InvMem to first operand of "maskmovdqu".
-
-2001-03-22 Hans-Peter Nilsson <hp@axis.com>
-
- * cris.h (ADD_PC_INCR_OPCODE): New macro.
-
-2001-03-21 Kazu Hirata <kazu@hxi.com>
-
- * h8300.h: Fix formatting.
-
-2001-03-22 Alan Modra <alan@linuxcare.com.au>
-
- * i386.h (i386_optab): Add paddq, psubq.
-
-2001-03-19 Alan Modra <alan@linuxcare.com.au>
-
- * i386.h (REGNAM_AL, REGNAM_AX, REGNAM_EAX): Define.
-
-2001-02-28 Igor Shevlyakov <igor@windriver.com>
-
- * m68k.h: new defines for Coldfire V4. Update mcf to know
- about mcf5407.
-
-2001-02-18 lars brinkhoff <lars@nocrew.org>
-
- * pdp11.h: New file.
-
-2001-02-12 Jan Hubicka <jh@suse.cz>
-
- * i386.h (i386_optab): SSE integer converison instructions have
- 64bit versions on x86-64.
-
-2001-02-10 Nick Clifton <nickc@redhat.com>
-
- * mips.h: Remove extraneous whitespace. Formating change to allow
- for future contribution.
-
-2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
-
- * s390.h: New file.
-
-2001-02-02 Patrick Macdonald <patrickm@redhat.com>
-
- * cgen.h (CGEN_SYNTAX_CHAR_TYPE): Typedef as unsigned short.
- (CGEN_MAX_SYNTAX_ELEMENTS): Rename from CGEN_MAX_SYNTAX_BYTES.
- (CGEN_SYNTAX): Define using CGEN_MAX_SYNTAX_ELEMENTS.
-
-2001-01-24 Karsten Keil <kkeil@suse.de>
-
- * i386.h (i386_optab): Fix swapgs
-
-2001-01-14 Alan Modra <alan@linuxcare.com.au>
-
- * hppa.h: Describe new '<' and '>' operand types, and tidy
- existing comments.
- (pa_opcodes): Add entries for missing wide mode ldi,ldo,ldw,stw.
- Remove duplicate "ldw j(s,b),x". Sort some entries.
-
-2001-01-13 Jan Hubicka <jh@suse.cz>
-
- * i386.h (i386_optab): Fix pusha and ret templates.
-
-2001-01-11 Peter Targett <peter.targett@arccores.com>
-
- * arc.h (ARC_MACH_5, ARC_MACH_6, ARC_MACH_7, ARC_MACH_8): New
- definitions for masking cpu type.
- (arc_ext_operand_value) New structure for storing extended
- operands.
- (ARC_OPERAND_*) Flags for operand values.
-
-2001-01-10 Jan Hubicka <jh@suse.cz>
-
- * i386.h (pinsrw): Add.
- (pshufw): Remove.
- (cvttpd2dq): Fix operands.
- (cvttps2dq): Likewise.
- (movq2q): Rename to movdq2q.
-
-2001-01-10 Richard Schaal <richard.schaal@intel.com>
-
- * i386.h: Correct movnti instruction.
-
-2001-01-09 Jeff Johnston <jjohnstn@redhat.com>
-
- * cgen.h (CGEN_SYNTAX_CHAR_TYPE): New typedef based on max number
- of operands (unsigned char or unsigned short).
- (CGEN_SYNTAX): Changed to make array CGEN_SYNTAX_CHAR_TYPE.
- (CGEN_SYNTAX_CHAR): Changed to cast to unsigned char.
-
-2001-01-05 Jan Hubicka <jh@suse.cz>
-
- * i386.h (i386_optab): Make [sml]fence template to use immext field.
-
-2001-01-03 Jan Hubicka <jh@suse.cz>
-
- * i386.h (i386_optab): Fix 64bit pushf template; Add instructions
- introduced by Pentium4
-
-2000-12-30 Jan Hubicka <jh@suse.cz>
-
- * i386.h (i386_optab): Add "rex*" instructions;
- add swapgs; disable jmp/call far direct instructions for
- 64bit mode; add syscall and sysret; disable registers for 0xc6
- template. Add 'q' suffixes to extendable instructions, disable
- obsolete instructions, add new sign/zero extension ones.
- (i386_regtab): Add extended registers.
- (*Suf): Add No_qSuf.
- (q_Suf, wlq_Suf, bwlq_Suf): New.
-
-2000-12-20 Jan Hubicka <jh@suse.cz>
-
- * i386.h (i386_optab): Replace "Imm" with "EncImm".
- (i386_regtab): Add flags field.
-
-2000-12-12 Nick Clifton <nickc@redhat.com>
-
- * mips.h: Fix formatting.
-
-2000-12-01 Chris Demetriou <cgd@sibyte.com>
-
- mips.h (OP_MASK_SYSCALL, OP_SH_SYSCALL): Delete.
- (OP_MASK_CODE20, OP_SH_CODE20): Define, with values of old
- OP_*_SYSCALL definitions.
- (OP_SH_CODE19, OP_MASK_CODE19): Define, for use as
- 19 bit wait codes.
- (MIPS operand specifier comments): Remove 'm', add 'U' and
- 'J', and update the meaning of 'B' so that it's more general.
-
- * mips.h (INSN_ISA1, INSN_ISA2, INSN_ISA3, INSN_ISA4,
- INSN_ISA5): Renumber, redefine to mean the ISA at which the
- instruction was added.
- (INSN_ISA32): New constant.
- (INSN_4650, INSN_4010, INSN_4100, INSN_3900, INSN_GP32):
- Renumber to avoid new and/or renumbered INSN_* constants.
- (INSN_MIPS32): Delete.
- (ISA_UNKNOWN): New constant to indicate unknown ISA.
- (ISA_MIPS1, ISA_MIPS2, ISA_MIPS3, ISA_MIPS4, ISA_MIPS5,
- ISA_MIPS32): New constants, defined to be the mask of INSN_*
- constants available at that ISA level.
- (CPU_UNKNOWN): New constant to indicate unknown CPU.
- (CPU_4K, CPU_MIPS32_4K): Rename the former to the latter,
- define it with a unique value.
- (OPCODE_IS_MEMBER): Update for new ISA membership-related
- constant meanings.
-
- * mips.h (INSN_ISA64, ISA_MIPS5, ISA_MIPS64): New
- definitions.
-
- * mips.h (CPU_SB1): New constant.
-
-2000-10-20 Jakub Jelinek <jakub@redhat.com>
-
- * sparc.h (enum sparc_opcode_arch_val): Add SPARC_OPCODE_ARCH_V9B.
- Note that '3' is used for siam operand.
-
-2000-09-22 Jim Wilson <wilson@cygnus.com>
-
- * ia64.h (enum ia64_dependency_semantics): Add IA64_DVS_STOP.
-
-2000-09-13 Anders Norlander <anorland@acc.umu.se>
-
- * mips.h: Use defines instead of hard-coded processor numbers.
- (CPU_R2000, CPU_R3000, CPU_R3900, CPU_R4000, CPU_R4010,
- CPU_VR4100, CPU_R4111, CPU_R4300, CPU_R4400, CPU_R4600, CPU_R4650,
- CPU_R5000, CPU_R6000, CPU_R8000, CPU_R10000, CPU_MIPS32, CPU_4K,
- CPU_4KC, CPU_4KM, CPU_4KP): Define..
- (OPCODE_IS_MEMBER): Use new defines.
- (OP_MASK_SEL, OP_SH_SEL): Define.
- (OP_MASK_CODE20, OP_SH_CODE20): Define.
- Add 'P' to used characters.
- Use 'H' for coprocessor select field.
- Use 'm' for 20 bit breakpoint code.
- Document new arg characters and add to used characters.
- (INSN_MIPS32): New define for MIPS32 extensions.
- (OPCODE_IS_MEMBER): Recognize MIPS32 instructions.
-
-2000-09-05 Alan Modra <alan@linuxcare.com.au>
-
- * hppa.h: Mention cz completer.
-
-2000-08-16 Jim Wilson <wilson@cygnus.com>
-
- * ia64.h (IA64_OPCODE_POSTINC): New.
-
-2000-08-15 H.J. Lu <hjl@gnu.org>
-
- * i386.h: Swap the Intel syntax "movsx"/"movzx" due to the
- IgnoreSize change.
-
-2000-08-08 Jason Eckhardt <jle@cygnus.com>
-
- * i860.h: Small formatting adjustments.
-
-2000-07-29 Marek Michalkiewicz <marekm@linux.org.pl>
-
- * avr.h (AVR_UNDEF_P, AVR_SKIP_P, AVR_DISP0_P): New macros.
- Move related opcodes closer to each other.
- Minor changes in comments, list undefined opcodes.
-
-2000-07-26 Dave Brolley <brolley@redhat.com>
-
- * cgen.h (cgen_hw_lookup_by_num): Second parameter is unsigned.
-
-2000-07-22 Jason Eckhardt <jle@cygnus.com>
-
- * i860.h (btne, bte, bla): Changed these opcodes
- to use sbroff ('r') instead of split16 ('s').
- (J, K, L, M): New operand types for 16-bit aligned fields.
- (ld.x, {p}fld.x, fst.x, pst.d): Changed these opcodes to
- use I, J, K, L, M instead of just I.
- (T, U): New operand types for split 16-bit aligned fields.
- (st.x): Changed these opcodes to use S, T, U instead of just S.
- (andh, andnoth, orh, xorh): Deleted 3-register forms as they do not
- exist on the i860.
- (pfgt.sd, pfle.sd): Deleted these as they do not exist on the i860.
- (pfeq.ss, pfeq.dd): New opcodes.
- (st.s): Fixed incorrect mask bits.
- (fmlow): Fixed incorrect mask bits.
- (fzchkl, pfzchkl): Fixed incorrect mask bits.
- (faddz, pfaddz): Fixed incorrect mask bits.
- (form, pform): Fixed incorrect mask bits.
- (pfld.l): Fixed incorrect mask bits.
- (fst.q): Fixed incorrect mask bits.
- (all floating point opcodes): Fixed incorrect mask bits for
- handling of dual bit.
-
-2000-07-20 Hans-Peter Nilsson <hp@axis.com>
-
- cris.h: New file.
-
-2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
-
- * avr.h (AVR_ISA_WRAP): Remove, now assumed if not AVR_ISA_MEGA.
- (AVR_ISA_ESPM): Remove, because ESPM removed in databook update.
- (AVR_ISA_85xx): Remove, all uses changed back to AVR_ISA_2xxx.
- (AVR_ISA_M83): Define for ATmega83, ATmega85.
- (espm): Remove, because ESPM removed in databook update.
- (eicall, eijmp): Move to the end of opcode table.
-
-2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
-
- * m68hc11.h: New file for support of Motorola 68hc11.
-
-Fri Jun 9 21:51:50 2000 Denis Chertykov <denisc@overta.ru>
-
- * avr.h: clr,lsl,rol, ... moved after add,adc, ...
-
-Wed Jun 7 21:39:54 2000 Denis Chertykov <denisc@overta.ru>
-
- * avr.h: New file with AVR opcodes.
-
-Wed Apr 12 17:11:20 2000 Donald Lindsay <dlindsay@hound.cygnus.com>
-
- * d10v.h: added ALONE attribute for d10v_opcode.exec_type.
-
-2000-05-23 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
-
- * i386.h: Allow d suffix on iret, and add DefaultSize modifier.
-
-2000-05-17 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
-
- * i386.h: Use sl_FP, not sl_Suf for fild.
-
-2000-05-16 Frank Ch. Eigler <fche@redhat.com>
-
- * cgen.h (CGEN_MAX_SYNTAX_BYTES): Increase to 32. Check that
- it exceeds CGEN_ACTUAL_MAX_SYNTAX_BYTES, if set.
- (CGEN_MAX_IFMT_OPERANDS): Increase to 16. Check that it exceeds
- CGEN_ACTUAL_MAX_IFMT_OPERANDS, if set.
-
-2000-05-13 Alan Modra <alan@linuxcare.com.au>,
-
- * i386.h (i386_optab): Cpu686 for sysenter,sysexit,fxsave,fxrestore.
-
-2000-05-13 Alan Modra <alan@linuxcare.com.au>,
- Alexander Sokolov <robocop@netlink.ru>
-
- * i386.h (i386_optab): Add cpu_flags for all instructions.
-
-2000-05-13 Alan Modra <alan@linuxcare.com.au>
-
- From Gavin Romig-Koch <gavin@cygnus.com>
- * i386.h (wld_Suf): Define. Use on pushf, popf, pusha, popa.
-
-2000-05-04 Timothy Wall <twall@cygnus.com>
-
- * tic54x.h: New.
-
-2000-05-03 J.T. Conklin <jtc@redback.com>
-
- * ppc.h (PPC_OPCODE_ALTIVEC): New opcode flag for vector unit.
- (PPC_OPERAND_VR): New operand flag for vector registers.
-
-2000-05-01 Kazu Hirata <kazu@hxi.com>
-
- * h8300.h (EOP): Add missing initializer.
-
-Fri Apr 21 15:03:37 2000 Jason Eckhardt <jle@cygnus.com>
-
- * hppa.h (pa_opcodes): New opcodes for PA2.0 wide mode
- forms of ld/st{b,h,w,d} and fld/fst{w,d} (16-bit displacements).
- New operand types l,y,&,fe,fE,fx added to support above forms.
- (pa_opcodes): Replaced usage of 'x' as source/target for
- floating point double-word loads/stores with 'fx'.
-
-Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
- David Mosberger <davidm@hpl.hp.com>
- Timothy Wall <twall@cygnus.com>
- Jim Wilson <wilson@cygnus.com>
-
- * ia64.h: New file.
-
-2000-03-27 Nick Clifton <nickc@cygnus.com>
-
- * d30v.h (SHORT_A1): Fix value.
- (SHORT_AR): Renumber so that it is at the end of the list of short
- instructions, not the end of the list of long instructions.
-
-2000-03-26 Alan Modra <alan@linuxcare.com>
-
- * i386.h: (UNIXWARE_COMPAT): Rename to SYSV386_COMPAT as the
- problem isn't really specific to Unixware.
- (OLDGCC_COMPAT): Define.
- (i386_optab): If !OLDGCC_COMPAT, don't handle fsubp etc. with
- destination %st(0).
- Fix lots of comments.
-
-2000-03-02 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * d30v.h:
- (SHORT_B2r, SHORT_B3, SHORT_B3r, SHORT_B3b, SHORT_B3br): Updated.
- (SHORT_D1r, SHORT_D2, SHORT_D2r, SHORT_D2Br, SHORT_U): Updated.
- (SHORT_F, SHORT_AF, SHORT_T, SHORT_A5, SHORT_CMP, SHORT_CMPU): Updated.
- (SHORT_A1, SHORT_AA, SHORT_RA, SHORT_MODINC, SHORT_MODDEC): Updated.
- (SHORT_C1, SHORT_C2, SHORT_UF, SHORT_A2, SHORT_NONE, LONG): Updated.
- (LONG_U, LONG_Ur, LONG_CMP, LONG_M, LONG_M2, LONG_2, LONG_2r): Updated.
- (LONG_2b, LONG_2br, LONG_D, LONG_Dr, LONG_Dbr): Updated.
-
-2000-02-25 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386.h (fild, fistp): Change intel d_Suf form to fildd and
- fistpd without suffix.
-
-2000-02-24 Nick Clifton <nickc@cygnus.com>
-
- * cgen.h (cgen_cpu_desc): Rename field 'flags' to
- 'signed_overflow_ok_p'.
- Delete prototypes for cgen_set_flags() and cgen_get_flags().
-
-2000-02-24 Andrew Haley <aph@cygnus.com>
-
- * cgen.h (CGEN_INSN_MACH_HAS_P): New macro.
- (CGEN_CPU_TABLE): flags: new field.
- Add prototypes for new functions.
-
-2000-02-24 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386.h: Add some more UNIXWARE_COMPAT comments.
-
-2000-02-23 Linas Vepstas <linas@linas.org>
-
- * i370.h: New file.
-
-2000-02-22 Chandra Chavva <cchavva@cygnus.com>
-
- * d30v.h (FLAG_NOT_WITH_ADDSUBppp): Redefined as operation
- cannot be combined in parallel with ADD/SUBppp.
-
-2000-02-22 Andrew Haley <aph@cygnus.com>
-
- * mips.h: (OPCODE_IS_MEMBER): Add comment.
-
-1999-12-30 Andrew Haley <aph@cygnus.com>
-
- * mips.h (OPCODE_IS_MEMBER): Add gp32 arg, which determines
- whether synthetic opcodes (e.g. move) generate 32-bit or 64-bit
- insns.
-
-2000-01-15 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386.h: Qualify intel mode far call and jmp with x_Suf.
-
-1999-12-27 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386.h: Add JumpAbsolute qualifier to all non-intel mode
- indirect jumps and calls. Add FF/3 call for intel mode.
-
-Wed Dec 1 03:05:25 1999 Jeffrey A Law (law@cygnus.com)
-
- * mn10300.h: Add new operand types. Add new instruction formats.
-
-Wed Nov 24 20:28:58 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa.h (pa_opcodes): Correctly handle immediate for PA2.0 "bb"
- instruction.
-
-1999-11-18 Gavin Romig-Koch <gavin@cygnus.com>
-
- * mips.h (INSN_ISA5): New.
-
-1999-11-01 Gavin Romig-Koch <gavin@cygnus.com>
-
- * mips.h (OPCODE_IS_MEMBER): New.
-
-1999-10-29 Nick Clifton <nickc@cygnus.com>
-
- * d30v.h (SHORT_AR): Define.
-
-1999-10-18 Michael Meissner <meissner@cygnus.com>
-
- * alpha.h (alpha_num_opcodes): Convert to unsigned.
- (alpha_num_operands): Ditto.
-
-Sun Oct 10 01:46:56 1999 Jerry Quinn <jerry.quinn.adv91@alum.dartmouth.org>
-
- * hppa.h (pa_opcodes): Add load and store cache control to
- instructions. Add ordered access load and store.
-
- * hppa.h (pa_opcode): Add new entries for addb and addib.
-
- * hppa.h (pa_opcodes): Fix cmpb and cmpib entries.
-
- * hppa.h (pa_opcodes): Add entries for cmpb and cmpib.
-
-Thu Oct 7 00:12:25 MDT 1999 Diego Novillo <dnovillo@cygnus.com>
-
- * d10v.h: Add flag RESTRICTED_NUM3 for imm3 operands.
-
-Thu Sep 23 07:08:38 1999 Jerry Quinn <jquinn@nortelnetworks.com>
-
- * hppa.h (pa_opcodes): Add "call" and "ret". Clean up "b", "bve"
- and "be" using completer prefixes.
-
- * hppa.h (pa_opcodes): Add initializers to silence compiler.
-
- * hppa.h: Update comments about character usage.
-
-Mon Sep 20 03:55:31 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa.h (pa_opcodes): Fix minor thinkos introduced while cleaning
- up the new fstw & bve instructions.
-
-Sun Sep 19 10:40:59 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa.h (pa_opcodes): Add remaining PA2.0 integer load/store
- instructions.
-
- * hppa.h (pa_opcodes): Add remaining PA2.0 FP load/store instructions.
-
- * hppa.h (pa_opcodes): Add long offset double word load/store
- instructions.
-
- * hppa.h (pa_opcodes): Add FLAG_STRICT variants of FP loads and
- stores.
-
- * hppa.h (pa_opcodes): Handle PA2.0 fcnv, fcmp and ftest insns.
-
- * hppa.h (pa_opcodes): Finish support for PA2.0 "b" instructions.
-
- * hppa.h (pa_opcodes): Handle PA2.0 "bve" instructions.
-
- * hppa.h (pa_opcodes): Add new syntax "be" instructions.
-
- * hppa.h (pa_opcodes): Note use of 'M' and 'L'.
-
- * hppa.h (pa_opcodes): Add support for "b,l".
-
- * hppa.h (pa_opcodes): Add support for "b,gate".
-
-Sat Sep 18 11:41:16 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa.h (pa_opcodes): Use 'fX' for first register operand
- in xmpyu.
-
- * hppa.h (pa_opcodes): Fix mask for probe and probei.
-
- * hppa.h (pa_opcodes): Fix mask for depwi.
-
-Tue Sep 7 13:44:25 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa.h (pa_opcodes): Add "addil" variant which has the %r1 as
- an explicit output argument.
-
-Mon Sep 6 04:41:42 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa.h: Add strict variants of PA1.0/PA1.1 loads and stores.
- Add a few PA2.0 loads and store variants.
-
-1999-09-04 Steve Chamberlain <sac@pobox.com>
-
- * pj.h: New file.
-
-1999-08-29 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386.h (i386_regtab): Move %st to top of table, and split off
- other fp reg entries.
- (i386_float_regtab): To here.
-
-Sat Aug 28 00:25:25 1999 Jerry Quinn <jquinn@nortelnetworks.com>
-
- * hppa.h (pa_opcodes): Replace 'f' by 'v'. Prefix float register args
- by 'f'.
-
- * hppa.h (pa_opcodes): Add extrd, extrw, depd, depdi, depw, depwi.
- Add supporting args.
-
- * hppa.h: Document new completers and args.
- * hppa.h (pa_opcodes): Add 64 bit patterns and pa2.0 syntax for uxor,
- uaddcm, dcor, addi, add, sub, subi, shladd, rfi, and probe. Add pa2.0
- extensions for ssm, rsm, pdtlb, pitlb. Add performance instructions
- pmenb and pmdis.
-
- * hppa.h (pa_opcodes): Add pa2.0 instructions hadd, hshl,
- hshr, hsub, mixh, mixw, permh.
-
- * hppa.h (pa_opcodes): Change completers in instructions to
- use 'c' prefix.
-
- * hppa.h (pa_opcodes): Add popbts, new forms of bb, havg,
- hshladd, hshradd, shrpd, and shrpw instructions. Update arg comments.
-
- * hppa.h (pa_opcodes): Change fmpyfadd, fmpynfadd, fneg,
- fnegabs to use 'I' instead of 'F'.
-
-1999-08-21 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386.h: Add AMD athlon instructions, pfnacc, pfpnacc, pswapd.
- Document pf2iw and pi2fw as athlon insns. Remove pswapw.
- Alphabetically sort PIII insns.
-
-Wed Aug 18 18:14:40 1999 Doug Evans <devans@canuck.cygnus.com>
-
- * cgen.h (CGEN_INSN_MACH_HAS_P): New macro.
-
-Fri Aug 6 09:46:35 1999 Jerry Quinn <jquinn@nortelnetworks.com>
-
- * hppa.h (pa_opcodes): Add 64 bit versions of or, xor, and,
- and andcm. Add 32 and 64 bit version of cmpclr, cmpiclr.
-
- * hppa.h: Document 64 bit condition completers.
-
-Thu Aug 5 16:56:07 1999 Jerry Quinn <jquinn@nortelnetworks.com>
-
- * hppa.h (pa_opcodes): Change condition args to use '?' prefix.
-
-1999-08-04 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386.h (i386_optab): Add DefaultSize modifier to all insns
- that implicitly modify %esp. #undef d_Suf, x_suf, sld_suf,
- sldx_suf, bwld_Suf, d_FP, x_FP, sld_FP, sldx_FP at end of table.
-
-Wed Jul 28 02:04:24 1999 Jerry Quinn <jquinn@nortelnetworks.com>
- Jeff Law <law@cygnus.com>
-
- * hppa.h (pa_opcodes): Add "pushnom" and "pushbts".
-
- * hppa.h (pa_opcodes): Mark all PA2.0 opcodes with FLAG_STRICT.
-
- * hppa.h (pa_opcodes): Change xmpyu, fmpyfadd,
- and fmpynfadd to use 'J' and 'K' instead of 'E' and 'X'.
-
-1999-07-13 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386.h: Add "undocumented" AMD 3DNow! pf2iw, pi2fw, pswapw insns.
-
-Thu Jul 1 00:17:24 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa.h (struct pa_opcode): Add new field "flags".
- (FLAGS_STRICT): Define.
-
-Fri Jun 25 04:22:04 1999 Jerry Quinn <jquinn@nortelnetworks.com>
- Jeff Law <law@cygnus.com>
-
- * hppa.h (pa_opcodes): Add pa2.0 clrbts instruction.
-
- * hppa.h (pa_opcodes): Add entries for mfia and mtsarcm instructions.
-
-1999-06-23 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386.h: Allow `l' suffix on bswap. Allow `w' suffix on arpl,
- lldt, lmsw, ltr, str, verr, verw. Add FP flag to fcmov*. Add FP
- flag to fcomi and friends.
-
-Fri May 28 15:26:11 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa.h (pa_opcodes): Move integer arithmetic instructions after
- integer logical instructions.
-
-1999-05-28 Linus Nordberg <linus.nordberg@canit.se>
-
- * m68k.h: Document new formats `E', `G', `H' and new places `N',
- `n', `o'.
-
- * m68k.h: Define mcf5206e, mcf5307, mcf. Document new format `u'
- and new places `m', `M', `h'.
-
-Thu May 27 04:13:54 1999 Joel Sherrill (joel@OARcorp.com
-
- * hppa.h (pa_opcodes): Add several processor specific system
- instructions.
-
-Wed May 26 16:57:44 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa.h (pa_opcodes): Add second entry for "comb", "comib",
- "addb", and "addib" to be used by the disassembler.
-
-1999-05-12 Alan Modra <alan@apri.levels.unisa.edu.au>
-
- * i386.h (ReverseModrm): Remove all occurences.
- (InvMem): Add to control/debug/test mov insns, movhlps, movlhps,
- movmskps, pextrw, pmovmskb, maskmovq.
- Change NoSuf to FP on all MMX, XMM and AMD insns as these all
- ignore the data size prefix.
-
- * i386.h (i386_optab, i386_regtab): Add support for PIII SIMD.
- Mostly stolen from Doug Ledford <dledford@redhat.com>
-
-Sat May 8 23:27:35 1999 Richard Henderson <rth@cygnus.com>
-
- * ppc.h (PPC_OPCODE_64_BRIDGE): New.
-
-1999-04-14 Doug Evans <devans@casey.cygnus.com>
-
- * cgen.h (CGEN_ATTR): Delete member num_nonbools.
- (CGEN_ATTR_TYPE): Update.
- (CGEN_ATTR_MASK): Number booleans starting at 0.
- (CGEN_ATTR_VALUE): Update.
- (CGEN_INSN_ATTR): Update.
-
-Mon Apr 12 23:43:27 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa.h (fmpyfadd, fmpynfadd, fneg, fnegabs): New PA2.0
- instructions.
-
-Tue Mar 23 11:24:38 1999 Jeffrey A Law (law@cygnus.com)
-
- * hppa.h (bb, bvb): Tweak opcode/mask.
-
-
-1999-03-22 Doug Evans <devans@casey.cygnus.com>
-
- * cgen.h (CGEN_ISA,CGEN_MACH): New typedefs.
- (struct cgen_cpu_desc): Rename member mach to machs. New member isas.
- New members word_bitsize,default_insn_bitsize,base_insn-bitsize,
- min_insn_bitsize,max_insn_bitsize,isa_table,mach_table,rebuild_tables.
- Delete member max_insn_size.
- (enum cgen_cpu_open_arg): New enum.
- (cpu_open): Update prototype.
- (cpu_open_1): Declare.
- (cgen_set_cpu): Delete.
-
-1999-03-11 Doug Evans <devans@casey.cygnus.com>
-
- * cgen.h (CGEN_HW_TABLE): Delete `num_init_entries' member.
- (CGEN_OPERAND_NIL): New macro.
- (CGEN_OPERAND): New member `type'.
- (@arch@_cgen_operand_table): Delete decl.
- (CGEN_OPERAND_INDEX,CGEN_OPERAND_TYPE,CGEN_OPERAND_ENTRY): Delete.
- (CGEN_OPERAND_TABLE): New struct.
- (cgen_operand_lookup_by_name,cgen_operand_lookup_by_num): Declare.
- (CGEN_OPINST): Pointer to operand table entry replaced with enum.
- (CGEN_CPU_TABLE): New member `isa'. Change member `operand_table',
- now a CGEN_OPERAND_TABLE. Add CGEN_CPU_DESC arg to
- {get,set}_{int,vma}_operand.
- (@arch@_cgen_cpu_open): New arg `isa'.
- (cgen_set_cpu): Ditto.
-
-Fri Feb 26 02:36:45 1999 Richard Henderson <rth@cygnus.com>
-
- * i386.h: Fill in cmov and fcmov alternates. Add fcomi short forms.
-
-1999-02-25 Doug Evans <devans@casey.cygnus.com>
-
- * cgen.h (enum cgen_asm_type): Add CGEN_ASM_NONE.
- (CGEN_HW_ENTRY): Delete member `next'. Change type of `type' to
- enum cgen_hw_type.
- (CGEN_HW_TABLE): New struct.
- (hw_table): Delete declaration.
- (CGEN_OPERAND): Change member hw to hw_type, change type from pointer
- to table entry to enum.
- (CGEN_OPINST): Ditto.
- (CGEN_CPU_TABLE): Change member hw_list to hw_table.
-
-Sat Feb 13 14:13:44 1999 Richard Henderson <rth@cygnus.com>
-
- * alpha.h (AXP_OPCODE_EV6): New.
- (AXP_OPCODE_NOPAL): Include it.
-
-1999-02-09 Doug Evans <devans@casey.cygnus.com>
-
- * cgen.h (CGEN_CPU_DESC): Renamed from CGEN_OPCODE_DESC.
- All uses updated. New members int_insn_p, max_insn_size,
- parse_operand,insert_operand,extract_operand,print_operand,
- sizeof_fields,set_fields_bitsize,get_int_operand,set_int_operand,
- get_vma_operand,set_vma_operand,parse_handlers,insert_handlers,
- extract_handlers,print_handlers.
- (CGEN_ATTR): Change type of num_nonbools to unsigned int.
- (CGEN_ATTR_BOOL_OFFSET): New macro.
- (CGEN_ATTR_MASK): Subtract it to compute bit number.
- (CGEN_ATTR_VALUE): Redo bool/nonbool attr calculation.
- (cgen_opcode_handler): Renamed from cgen_base.
- (CGEN_HW_ATTR_VALUE): Renamed from CGEN_HW_ATTR, all uses updated.
- (CGEN_OPERAND_ATTR_VALUE): Renamed from CGEN_OPERAND_ATTR,
- all uses updated.
- (CGEN_OPERAND_INDEX): Rewrite to use table entry, not global.
- (enum cgen_opinst_type): Renamed from cgen_operand_instance_type.
- (CGEN_IFLD_ATTR_VALUE): Renamed from CGEN_IFLD_ATTR, all uses updated.
- (CGEN_OPCODE,CGEN_IBASE): New types.
- (CGEN_INSN): Rewrite.
- (CGEN_{ASM,DIS}_HASH*): Delete.
- (init_opcode_table,init_ibld_table): Declare.
- (CGEN_INSN_ATTR): New type.
-
-Mon Feb 1 21:09:14 1999 Catherine Moore <clm@cygnus.com>
-
- * i386.h (d_Suf, x_Suf, sld_Suf, sldx_Suf, bwld_Suf): Define.
- (x_FP, d_FP, dls_FP, sldx_FP): Define.
- Change *Suf definitions to include x and d suffixes.
- (movsx): Use w_Suf and b_Suf.
- (movzx): Likewise.
- (movs): Use bwld_Suf.
- (fld): Change ordering. Use sld_FP.
- (fild): Add Intel Syntax equivalent of fildq.
- (fst): Use sld_FP.
- (fist): Use sld_FP.
- (fstp): Use sld_FP. Add x_FP version.
- (fistp): LLongMem version for Intel Syntax.
- (fcom, fcomp): Use sld_FP.
- (fadd, fiadd, fsub): Use sld_FP.
- (fsubr): Use sld_FP.
- (fmul, fimul, fdvi, fidiv, fdivr): Use sld_FP.
-
-1999-01-27 Doug Evans <devans@casey.cygnus.com>
-
- * cgen.h (enum cgen_mode): Add CGEN_MODE_TARGET_MAX, CGEN_MODE_INT,
- CGEN_MODE_UINT.
-
-1999-01-16 Jeffrey A Law (law@cygnus.com)
-
- * hppa.h (bv): Fix mask.
-
-1999-01-05 Doug Evans <devans@casey.cygnus.com>
-
- * cgen.h (CGEN_ATTR_VALUE_TYPE): New typedef.
- (CGEN_ATTR): Use it.
- (CGEN_ATTR_TYPE,CGEN_ATTR_ENTRY): Ditto.
- (CGEN_ATTR_TABLE): New member dfault.
-
-1998-12-30 Gavin Romig-Koch <gavin@cygnus.com>
-
- * mips.h (MIPS16_INSN_BRANCH): New.
-
-Wed Dec 9 10:38:48 1998 David Taylor <taylor@texas.cygnus.com>
-
- The following is part of a change made by Edith Epstein
- <eepstein@sophia.cygnus.com> as part of a project to merge in
- changes by HP; HP did not create ChangeLog entries.
-
- * hppa.h (completer_chars): list of chars to not put a space
- after.
-
-Sun Dec 6 13:21:34 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * i386.h (i386_optab): Permit w suffix on processor control and
- status word instructions.
-
-1998-11-30 Doug Evans <devans@casey.cygnus.com>
-
- * cgen.h (struct cgen_hw_entry): Delete const on attrs member.
- (struct cgen_keyword_entry): Ditto.
- (struct cgen_operand): Ditto.
- (CGEN_IFLD): New typedef, with associated access macros.
- (CGEN_IFMT): New typedef, with associated access macros.
- (CGEN_IFMT): Renamed from CGEN_FORMAT. New member `iflds'.
- (CGEN_IVALUE): New typedef.
- (struct cgen_insn): Delete const on syntax,attrs members.
- `format' now points to format data. Type of `value' is now
- CGEN_IVALUE.
- (struct cgen_opcode_table): New member ifld_table.
-
-1998-11-18 Doug Evans <devans@casey.cygnus.com>
-
- * cgen.h (cgen_extract_fn): Update type of `base_insn' arg.
- (CGEN_OPERAND_INSTANCE): New member `attrs'.
- (CGEN_OPERAND_INSTANCE_{ATTRS,ATTR}): New macros.
- (cgen_dis_lookup_insn): Update type of `base_insn' arg.
- (cgen_opcode_table): Update type of dis_hash fn.
- (extract_operand): Update type of `insn_value' arg.
-
-Thu Oct 29 11:38:36 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * cgen.h (CGEN_VERSION_{MAJOR,MINOR,FIXLEVEL}): Delete.
-
-Tue Oct 27 08:57:59 1998 Gavin Romig-Koch <gavin@cygnus.com>
-
- * mips.h (INSN_MULT): Added.
-
-Tue Oct 20 11:31:34 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386.h (MAX_MNEM_SIZE): Rename from MAX_OPCODE_SIZE.
-
-Mon Oct 19 12:50:00 1998 Doug Evans <devans@seba.cygnus.com>
-
- * cgen.h (CGEN_INSN_INT): New typedef.
- (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
- (CGEN_INSN_BYTES): Renamed from cgen_insn_t.
- (CGEN_INSN_BYTES_PTR): New typedef.
- (CGEN_EXTRACT_INFO): New typedef.
- (cgen_insert_fn,cgen_extract_fn): Update.
- (cgen_opcode_table): New member `insn_endian'.
- (assemble_insn,lookup_insn,lookup_get_insn_operands): Update.
- (insert_operand,extract_operand): Update.
- (cgen_get_insn_value,cgen_put_insn_value): Add prototypes.
-
-Fri Oct 9 13:38:13 1998 Doug Evans <devans@seba.cygnus.com>
-
- * cgen.h (CGEN_ATTR_BOOLS): New macro.
- (struct CGEN_HW_ENTRY): New member `attrs'.
- (CGEN_HW_ATTR): New macro.
- (struct CGEN_OPERAND_INSTANCE): New member `name'.
- (CGEN_INSN_INVALID_P): New macro.
-
-Mon Oct 5 00:21:07 1998 Jeffrey A Law (law@cygnus.com)
-
- * hppa.h: Add "fid".
-
-Sun Oct 4 21:00:00 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- From Robert Andrew Dale <rob@nb.net>
- * i386.h (i386_optab): Add AMD 3DNow! instructions.
- (AMD_3DNOW_OPCODE): Define.
-
-Tue Sep 22 17:53:47 1998 Nick Clifton <nickc@cygnus.com>
-
- * d30v.h (EITHER_BUT_PREFER_MU): Define.
-
-Mon Aug 10 14:09:38 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * cgen.h (cgen_insn): #if 0 out element `cdx'.
-
-Mon Aug 3 12:21:57 1998 Doug Evans <devans@seba.cygnus.com>
-
- Move all global state data into opcode table struct, and treat
- opcode table as something that is "opened/closed".
- * cgen.h (CGEN_OPCODE_DESC): New type.
- (all fns): New first arg of opcode table descriptor.
- (cgen_set_parse_operand_fn): Add prototype.
- (cgen_current_machine,cgen_current_endian): Delete.
- (CGEN_OPCODE_TABLE): New members mach,endian,operand_table,
- parse_operand_fn,asm_hash_table,asm_hash_table_entries,
- dis_hash_table,dis_hash_table_entries.
- (opcode_open,opcode_close): Add prototypes.
-
- * cgen.h (cgen_insn): New element `cdx'.
-
-Thu Jul 30 21:44:25 1998 Frank Ch. Eigler <fche@cygnus.com>
-
- * d30v.h (FLAG_LKR): New flag for "left-kills-right" instructions.
-
-Tue Jul 28 10:59:07 1998 Jeffrey A Law (law@cygnus.com)
-
- * mn10300.h: Add "no_match_operands" field for instructions.
- (MN10300_MAX_OPERANDS): Define.
-
-Fri Jul 24 11:44:24 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * cgen.h (cgen_macro_insn_count): Declare.
-
-Tue Jul 21 13:12:13 1998 Doug Evans <devans@seba.cygnus.com>
-
- * cgen.h (CGEN_VERSION_{MAJOR,MINOR,FIXLEVEL}): Define.
- (cgen_insert_fn,cgen_extract_fn): New arg `pc'.
- (get_operand,put_operand): Replaced with get_{int,vma}_operand,
- set_{int,vma}_operand.
-
-Fri Jun 26 11:09:06 1998 Jeffrey A Law (law@cygnus.com)
-
- * mn10300.h: Add "machine" field for instructions.
- (MN103, AM30): Define machine types.
-
-Fri Jun 19 16:09:09 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386.h: Use FP, not sl_Suf, for fxsave and fxrstor.
-
-1998-06-18 Ulrich Drepper <drepper@cygnus.com>
-
- * i386.h: Add support for fxsave, fxrstor, sysenter and sysexit.
-
-Sat Jun 13 11:31:35 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386.h (i386_optab): Add general form of aad and aam. Add ud2a
- and ud2b.
- (i386_regtab): Allow cr0..7, db0..7, dr0..7, tr0..7, not just
- those that happen to be implemented on pentiums.
-
-Tue Jun 9 12:16:01 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386.h: Change occurences of Data16 to Size16, Data32 to Size32,
- IgnoreDataSize to IgnoreSize. Flag address and data size prefixes
- with Size16|IgnoreSize or Size32|IgnoreSize.
-
-Mon Jun 8 12:15:52 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386.h (REPNE): Rename to REPNE_PREFIX_OPCODE.
- (REPE): Rename to REPE_PREFIX_OPCODE.
- (i386_regtab_end): Remove.
- (i386_prefixtab, i386_prefixtab_end): Remove.
- (i386_optab): Use NULL as sentinel rather than "" to suit rewrite
- of md_begin.
- (MAX_OPCODE_SIZE): Define.
- (i386_optab_end): Remove.
- (sl_Suf): Define.
- (sl_FP): Use sl_Suf.
-
- * i386.h (i386_optab): Allow 16 bit displacement for `mov
- mem,acc'. Combine 16 and 32 bit forms of various insns. Allow 16
- bit form of ljmp. Add IsPrefix modifier to prefixes. Add addr32,
- data32, dword, and adword prefixes.
- (i386_regtab): Add BaseIndex modifier to valid 16 bit base/index
- regs.
-
-Fri Jun 5 23:42:43 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386.h (i386_regtab): Remove BaseIndex modifier from esp.
-
- * i386.h: Allow `l' suffix on fld, fst, fstp, fcom, fcomp with
- register operands, because this is a common idiom. Flag them with
- a warning. Allow illegal faddp, fsubp, fsubrp, fmulp, fdivp,
- fdivrp because gcc erroneously generates them. Also flag with a
- warning.
-
- * i386.h: Add suffix modifiers to most insns, and tighter operand
- checks in some cases. Fix a number of UnixWare compatibility
- issues with float insns. Merge some floating point opcodes, using
- new FloatMF modifier.
- (WORD_PREFIX_OPCODE): Rename to DATA_PREFIX_OPCODE for
- consistency.
-
- * i386.h: Change occurence of ShortformW to W|ShortForm. Add
- IgnoreDataSize where appropriate.
-
-Wed Jun 3 18:28:45 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386.h: (one_byte_segment_defaults): Remove.
- (two_byte_segment_defaults): Remove.
- (i386_regtab): Add BaseIndex to 32 bit regs reg_type.
-
-Fri May 15 15:59:04 1998 Doug Evans <devans@seba.cygnus.com>
-
- * cgen.h (cgen_hw_lookup_by_name): Renamed from cgen_hw_lookup.
- (cgen_hw_lookup_by_num): Declare.
-
-Thu May 7 09:27:58 1998 Frank Ch. Eigler <fche@cygnus.com>
-
- * mips.h (OP_{SH,MASK}_CODE2): Added "q" operand format for lower
- ten bits of MIPS ISA1 "break" instruction, and for "sdbbp"
-
-Thu May 7 02:14:08 1998 Doug Evans <devans@charmed.cygnus.com>
-
- * cgen.h (cgen_asm_init_parse): Delete.
- (cgen_save_fixups,cgen_restore_fixups,cgen_swap_fixups): Delete.
- (cgen_asm_record_register,cgen_asm_finish_insn): Delete.
-
-Mon Apr 27 10:13:11 1998 Doug Evans <devans@seba.cygnus.com>
-
- * cgen.h (CGEN_ATTR_TYPE): Delete `const', moved to uses.
- (cgen_asm_finish_insn): Update prototype.
- (cgen_insn): New members num, data.
- (CGEN_INSN_TABLE): Members asm_hash, asm_hash_table_size,
- dis_hash, dis_hash_table_size moved to ...
- (CGEN_OPCODE_TABLE). Here. Renamed from CGEN_OPCODE_DATA.
- All uses updated. New members asm_hash_p, dis_hash_p.
- (CGEN_MINSN_EXPANSION): New struct.
- (cgen_expand_macro_insn): Declare.
- (cgen_macro_insn_count): Declare.
- (get_insn_operands): Update prototype.
- (lookup_get_insn_operands): Declare.
-
-Tue Apr 21 17:11:32 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386.h (i386_optab): Change iclrKludge and imulKludge to
- regKludge. Add operands types for string instructions.
-
-Mon Apr 20 14:40:29 1998 Tom Tromey <tromey@cygnus.com>
-
- * i386.h (X): Renamed from `Z_' to preserve formatting of opcode
- table.
-
-Sun Apr 19 13:54:06 1998 Tom Tromey <tromey@cygnus.com>
-
- * i386.h (Z_): Renamed from `_' to avoid clash with common alias
- for `gettext'.
-
-Fri Apr 3 12:04:48 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386.h: Remove NoModrm flag from all insns: it's never checked.
- Add IsString flag to string instructions.
- (IS_STRING): Don't define.
- (LOCK_PREFIX_OPCODE, CS_PREFIX_OPCODE, DS_PREFIX_OPCODE): Define.
- (ES_PREFIX_OPCODE, FS_PREFIX_OPCODE, GS_PREFIX_OPCODE): Define.
- (SS_PREFIX_OPCODE): Define.
-
-Mon Mar 30 21:31:56 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * i386.h: Revert March 24 patch; no more LinearAddress.
-
-Mon Mar 30 10:25:54 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386.h (i386_optab): Remove fwait (9b) from all floating point
- instructions, and instead add FWait opcode modifier. Add short
- form of fldenv and fstenv.
- (FWAIT_OPCODE): Define.
-
- * i386.h (i386_optab): Change second operand constraint of `mov
- sreg,reg|mem' instruction from Reg16|Mem to WordReg|WordMem to
- allow legal instructions such as `movl %gs,%esi'
-
-Fri Mar 27 18:30:52 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * h8300.h: Various changes to fully bracket initializers.
-
-Tue Mar 24 18:32:47 1998 H.J. Lu <hjl@gnu.org>
-
- * i386.h: Set LinearAddress for lidt and lgdt.
-
-Mon Mar 2 10:44:07 1998 Doug Evans <devans@seba.cygnus.com>
-
- * cgen.h (CGEN_BOOL_ATTR): New macro.
-
-Thu Feb 26 15:54:31 1998 Michael Meissner <meissner@cygnus.com>
-
- * d30v.h (FLAG_DELAY): New flag for delayed branches/jumps.
-
-Mon Feb 23 10:38:21 1998 Doug Evans <devans@seba.cygnus.com>
-
- * cgen.h (CGEN_CAT3): Delete. Use CONCAT3 now.
- (cgen_insn): Record syntax and format entries here, rather than
- separately.
-
-Tue Feb 17 21:42:56 1998 Nick Clifton <nickc@cygnus.com>
-
- * cgen.h (CGEN_SYNTAX_MAKE_FIELD): New macro.
-
-Tue Feb 17 16:00:56 1998 Doug Evans <devans@seba.cygnus.com>
-
- * cgen.h (cgen_insert_fn): Change type of result to const char *.
- (cgen_parse_{signed,unsigned}_integer): Delete min,max arguments.
- (CGEN_{INSN,KEYWORD,OPERAND}_NBOOL_ATTRS): Renamed from ..._MAX_ATTRS.
-
-Thu Feb 12 18:30:41 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * cgen.h (lookup_insn): New argument alias_p.
-
-Thu Feb 12 03:41:00 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
-
-Fix rac to accept only a0:
- * d10v.h (OPERAND_ACC): Split into:
- (OPERAND_ACC0, OPERAND_ACC1) .
- (OPERAND_GPR): Define.
-
-Wed Feb 11 17:31:53 1998 Doug Evans <devans@seba.cygnus.com>
-
- * cgen.h (CGEN_FIELDS): Define here.
- (CGEN_HW_ENTRY): New member `type'.
- (hw_list): Delete decl.
- (enum cgen_mode): Declare.
- (CGEN_OPERAND): New member `hw'.
- (enum cgen_operand_instance_type): Declare.
- (CGEN_OPERAND_INSTANCE): New type.
- (CGEN_INSN): New member `operands'.
- (CGEN_OPCODE_DATA): Make hw_list const.
- (get_insn_operands,lookup_insn): Add prototypes for.
-
-Tue Feb 3 17:11:23 1998 Doug Evans <devans@seba.cygnus.com>
-
- * cgen.h (CGEN_INSN_MAX_ATTRS): Renamed from CGEN_MAX_INSN_ATTRS.
- (CGEN_HW_ENTRY): Move `next' entry to end of struct.
- (CGEN_KEYWORD_MAX_ATTRS): Renamed from CGEN_MAX_KEYWORD_ATTRS.
- (CGEN_OPERAND_MAX_ATTRS): Renamed from CGEN_MAX_OPERAND_ATTRS.
-
-Mon Feb 2 19:19:15 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * cgen.h: Correct typo in comment end marker.
-
-Mon Feb 2 17:10:38 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU>
-
- * tic30.h: New file.
-
-Thu Jan 22 17:54:56 1998 Nick Clifton <nickc@cygnus.com>
-
- * cgen.h: Add prototypes for cgen_save_fixups(),
- cgen_restore_fixups(), and cgen_swap_fixups(). Change prototype
- of cgen_asm_finish_insn() to return a char *.
-
-Wed Jan 14 17:21:43 1998 Nick Clifton <nickc@cygnus.com>
-
- * cgen.h: Formatting changes to improve readability.
-
-Mon Jan 12 11:37:36 1998 Doug Evans <devans@seba.cygnus.com>
-
- * cgen.h (*): Clean up pass over `struct foo' usage.
- (CGEN_ATTR): Make unsigned char.
- (CGEN_ATTR_TYPE): Update.
- (CGEN_ATTR_{ENTRY,TABLE}): New types.
- (cgen_base): Move member `attrs' to cgen_insn.
- (CGEN_KEYWORD): New member `null_entry'.
- (CGEN_{SYNTAX,FORMAT}): New types.
- (cgen_insn): Format and syntax separated from each other.
-
-Tue Dec 16 15:15:52 1997 Michael Meissner <meissner@cygnus.com>
-
- * d30v.h (d30v_opcode): Reorder flags somewhat, add new flags for
- 2 word load/store, ADDppp/SUBppp, 16/32 bit multiply. Make
- flags_{used,set} long.
- (d30v_operand): Make flags field long.
-
-Mon Dec 1 12:24:44 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- * m68k.h: Fix comment describing operand types.
-
-Sun Nov 23 22:31:27 1997 Michael Meissner <meissner@cygnus.com>
-
- * d30v.h (SHORT_CMPU): Add case for cmpu instruction, and move
- everything else after down.
-
-Tue Nov 18 18:45:14 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * d10v.h (OPERAND_FLAG): Split into:
- (OPERAND_FFLAG, OPERAND_CFLAG) .
-
-Thu Nov 13 11:04:24 1997 Gavin Koch <gavin@cygnus.com>
-
- * mips.h (struct mips_opcode): Changed comments to reflect new
- field usage.
-
-Fri Oct 24 22:36:20 1997 Ken Raeburn <raeburn@cygnus.com>
-
- * mips.h: Added to comments a quick-ref list of all assigned
- operand type characters.
- (OP_{MASK,SH}_PERFREG): New macros.
-
-Wed Oct 22 17:28:33 1997 Richard Henderson <rth@cygnus.com>
-
- * sparc.h: Add '_' and '/' for v9a asr's.
- Patch from David Miller <davem@vger.rutgers.edu>
-
-Tue Oct 14 13:22:29 1997 Jeffrey A Law (law@cygnus.com)
-
- * h8300.h: Bit ops with absolute addresses not in the 8 bit
- area are not available in the base model (H8/300).
-
-Thu Sep 25 13:03:41 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k.h: Remove documentation of ` operand specifier.
-
-Wed Sep 24 19:00:34 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k.h: Document q and v operand specifiers.
-
-Mon Sep 15 18:28:37 1997 Nick Clifton <nickc@cygnus.com>
-
- * v850.h (struct v850_opcode): Add processors field.
- (PROCESSOR_V850, PROCESSOR_ALL): New bit constants.
- (PROCESSOR_V850E, PROCESSOR_NOT_V850): New bit constants.
- (PROCESSOR_V850EA): New bit constants.
-
-Mon Sep 15 11:29:43 1997 Ken Raeburn <raeburn@cygnus.com>
-
- Merge changes from Martin Hunt:
-
- * d30v.h: Allow up to 64 control registers. Add
- SHORT_A5S format.
-
- * d30v.h (LONG_Db): New form for delayed branches.
-
- * d30v.h: (LONG_Db): New form for repeati.
-
- * d30v.h (SHORT_D2B): New form.
-
- * d30v.h (SHORT_A2): New form.
-
- * d30v.h (OPERAND_2REG): Add new operand to indicate 2
- registers are used. Needed for VLIW optimization.
-
-Mon Sep 8 14:05:45 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * cgen.h: Move assembler interface section
- up so cgen_parse_operand_result is defined for cgen_parse_address.
- (cgen_parse_address): Update prototype.
-
-Tue Sep 2 15:32:32 1997 Nick Clifton <nickc@cygnus.com>
-
- * v850.h (V850_OPREAND_ADJUST_SHORT_MEMORY): Removed.
-
-Tue Aug 26 12:21:52 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * i386.h (two_byte_segment_defaults): Correct base register 5 in
- modes 1 and 2 to be ss rather than ds. From Gabriel Paubert
- <paubert@iram.es>.
-
- * i386.h: Set ud2 to 0x0f0b. From Gabriel Paubert
- <paubert@iram.es>.
-
- * i386.h: Comment fixes for ficom[p]?{s,l} from Gabriel Paubert
- <paubert@iram.es>.
-
- * i386.h (JUMP_ON_CX_ZERO): Uncomment (define again).
- (JUMP_ON_ECX_ZERO): Remove commented out macro.
-
-Fri Aug 22 10:38:29 1997 Nick Clifton <nickc@cygnus.com>
-
- * v850.h (V850_NOT_R0): New flag.
-
-Mon Aug 18 11:05:58 1997 Nick Clifton <nickc@cygnus.com>
-
- * v850.h (struct v850_opcode): Remove flags field.
-
-Wed Aug 13 18:45:48 1997 Nick Clifton <nickc@cygnus.com>
-
- * v850.h (struct v850_opcode): Add flags field.
- (struct v850_operand): Extend meaning of 'bits' and 'shift'
- fields.
- (V850E_INSTRUCTION, V850EA_INSTRUCTION): New flags.
- (V850E_PUSH_POP, V850E_IMMEDIATE16, V850E_IMMEDIATE32): New flags.
-
-Fri Aug 8 16:58:42 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * arc.h: New file.
-
-Thu Jul 24 21:16:58 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc.h (sparc_opcodes): Declare as const.
-
-Thu Jul 10 12:53:25 1997 Jeffrey A Law (law@cygnus.com)
-
- * mips.h (FP_S, FP_D): Define. Bitmasks indicating if an insn
- uses single or double precision floating point resources.
- (INSN_NO_ISA, INSN_ISA1): Define.
- (cpu specific INSN macros): Tweak into bitmasks outside the range
- of INSN_ISA field.
-
-Mon Jun 16 14:10:00 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
-
- * i386.h: Fix pand opcode.
-
-Mon Jun 2 11:35:09 1997 Gavin Koch <gavin@cygnus.com>
-
- * mips.h: Widen INSN_ISA and move it to a more convenient
- bit position. Add INSN_3900.
-
-Tue May 20 11:25:29 1997 Gavin Koch <gavin@cygnus.com>
-
- * mips.h (struct mips_opcode): added new field membership.
-
-Mon May 12 16:26:50 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
-
- * i386.h (movd): only Reg32 is allowed.
-
- * i386.h: add fcomp and ud2. From Wayne Scott
- <wscott@ichips.intel.com>.
-
-Mon May 5 17:16:21 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * i386.h: Add MMX instructions.
-
-Mon May 5 12:45:19 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
-
- * i386.h: Remove W modifier from conditional move instructions.
-
-Mon Apr 14 14:56:58 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * i386.h: Change the opcodes for fsubp, fsubrp, fdivp, and fdivrp
- with no arguments to match that generated by the UnixWare
- assembler.
-
-Thu Apr 10 14:35:00 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * cgen.h (<cpu>_cgen_assemble_insn): New arg for errmsg.
- (cgen_parse_operand_fn): Declare.
- (cgen_init_parse_operand): Declare.
- (cgen_parse_operand): Renamed from cgen_asm_parse_operand,
- new argument `want'.
- (enum cgen_parse_operand_result): Renamed from cgen_asm_result.
- (enum cgen_parse_operand_type): New enum.
-
-Sat Apr 5 13:14:05 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * i386.h: Revert last patch for the NON_BROKEN_OPCODES cases.
-
-Fri Apr 4 11:46:11 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * cgen.h: New file.
-
-Fri Apr 4 14:02:32 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * i386.h: Correct opcode values for fsubp, fsubrp, fdivp, and
- fdivrp.
-
-Tue Mar 25 22:57:26 1997 Stu Grossman (grossman@critters.cygnus.com)
-
- * v850.h (extract): Make unsigned.
-
-Mon Mar 24 14:38:15 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * i386.h: Add iclr.
-
-Thu Mar 20 19:49:10 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * i386.h: Change DW to W for cmpxchg and xadd, since they don't
- take a direction bit.
-
-Sat Mar 15 19:03:29 1997 H.J. Lu <hjl@lucon.org>
-
- * sparc.h (sparc_opcode_lookup_arch): Use full prototype.
-
-Fri Mar 14 15:22:01 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * sparc.h: Include <ansidecl.h>. Update function declarations to
- use prototypes, and to use const when appropriate.
-
-Thu Mar 6 14:18:30 1997 Jeffrey A Law (law@cygnus.com)
-
- * mn10300.h (MN10300_OPERAND_RELAX): Define.
-
-Mon Feb 24 15:15:56 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v.h: Change pre_defined_registers to
- d10v_predefined_registers and reg_name_cnt to d10v_reg_name_cnt.
-
-Sat Feb 22 21:25:00 1997 Dawn Perchik <dawn@cygnus.com>
-
- * mips.h: Add macros for cop0, cop1 cop2 and cop3.
- Change mips_opcodes from const array to a pointer,
- and change bfd_mips_num_opcodes from const int to int,
- so that we can increase the size of the mips opcodes table
- dynamically.
-
-Fri Feb 21 16:34:18 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d30v.h (FLAG_X): Remove unused flag.
-
-Tue Feb 18 17:37:20 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d30v.h: New file.
-
-Fri Feb 14 13:16:15 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80.h (PDS_NAME): Macro to access name field of predefined symbols.
- (PDS_VALUE): Macro to access value field of predefined symbols.
- (tic80_next_predefined_symbol): Add prototype.
-
-Mon Feb 10 10:32:17 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80.h (tic80_symbol_to_value): Change prototype to match
- change in function, added class parameter.
-
-Thu Feb 6 17:30:15 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80.h (TIC80_OPERAND_ENDMASK): Add for flagging TIc80
- endmask fields, which are somewhat weird in that 0 and 32 are
- treated exactly the same.
-
-Thu Jan 30 13:46:18 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80.h: Change all the OPERAND defines to use the form (1 << X)
- rather than a constant that is 2**X. Reorder them to put bits for
- operands that have symbolic names in the upper bits, so they can
- be packed into an int where the lower bits contain the value that
- corresponds to that symbolic name.
- (predefined_symbo): Add struct.
- (tic80_predefined_symbols): Declare array of translations.
- (tic80_num_predefined_symbols): Declare size of that array.
- (tic80_value_to_symbol): Declare function.
- (tic80_symbol_to_value): Declare function.
-
-Wed Jan 29 09:37:25 1997 Jeffrey A Law (law@cygnus.com)
-
- * mn10200.h (MN10200_OPERAND_RELAX): Define.
-
-Sat Jan 18 15:18:59 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80.h (TIC80_NO_R0_DEST): Add for opcodes where r0 cannot
- be the destination register.
-
-Thu Jan 16 20:48:55 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80.h (struct tic80_opcode): Change "format" field to "flags".
- (FMT_UNUSED, FMT_SI, FMT_LI, FMT_REG): Delete.
- (TIC80_VECTOR): Define a flag bit for the flags. This one means
- that the opcode can have two vector instructions in a single
- 32 bit word and we have to encode/decode both.
-
-Tue Jan 14 19:37:09 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80.h (TIC80_OPERAND_PCREL): Renamed from
- TIC80_OPERAND_RELATIVE for PC relative.
- (TIC80_OPERAND_BASEREL): New flag bit for register
- base relative.
-
-Mon Jan 13 15:56:38 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80.h (TIC80_OPERAND_FLOAT): Add for floating point operands.
-
-Mon Jan 6 10:51:15 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80.h (TIC80_OPERAND_SCALED): Operand may have optional
- ":s" modifier for scaling.
-
-Sun Jan 5 12:12:19 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80.h (TIC80_OPERAND_M_SI): Add operand modifier for ":m".
- (TIC80_OPERAND_M_LI): Ditto
-
-Sat Jan 4 19:02:44 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80.h (TIC80_OPERAND_BITNUM): Renamed from TIC80_OPERAND_CC_SZ.
- (TIC80_OPERAND_CC): New define for condition code operand.
- (TIC80_OPERAND_CR): New define for control register operand.
-
-Fri Jan 3 16:22:23 1997 Fred Fish <fnf@cygnus.com>
-
- * tic80.h (struct tic80_opcode): Name changed.
- (struct tic80_opcode): Remove format field.
- (struct tic80_operand): Add insertion and extraction functions.
- (TIC80_OPERAND_*): Remove old bogus values, start adding new
- correct ones.
- (FMT_*): Ditto.
-
-Tue Dec 31 15:05:41 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * v850.h (V850_OPERAND_ADJUST_SHORT_MEMORY): New flag to adjust
- type IV instruction offsets.
-
-Fri Dec 27 22:23:10 1996 Fred Fish <fnf@cygnus.com>
-
- * tic80.h: New file.
-
-Wed Dec 18 10:06:31 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10200.h (MN10200_OPERAND_NOCHECK): Define.
-
-Sat Dec 14 10:48:31 1996 Fred Fish <fnf@ninemoons.com>
-
- * mn10200.h: Fix comment, mn10200_operand not powerpc_operand.
- * mn10300.h: Fix comment, mn10300_operand not powerpc_operand.
- * v850.h: Fix comment, v850_operand not powerpc_operand.
-
-Mon Dec 9 16:45:39 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10200.h: Flesh out structures and definitions needed by
- the mn10200 assembler & disassembler.
-
-Tue Nov 26 10:46:56 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * mips.h: Add mips16 definitions.
-
-Mon Nov 25 17:56:54 1996 J.T. Conklin <jtc@cygnus.com>
-
- * m68k.h: Document new <, >, m, n, o and p operand specifiers.
-
-Wed Nov 20 10:59:41 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10300.h (MN10300_OPERAND_PCREL): Define.
- (MN10300_OPERAND_MEMADDR): Define.
-
-Tue Nov 19 13:30:40 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10300.h (MN10300_OPERAND_REG_LIST): Define.
-
-Wed Nov 6 13:41:08 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10300.h (MN10300_OPERAND_SPLIT): Define.
-
-Tue Nov 5 13:26:12 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10300.h (MN10300_OPERAND_EXTENDED): Define.
-
-Mon Nov 4 12:52:48 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10300.h (MN10300_OPERAND_REPEATED): Define.
-
-Fri Nov 1 10:31:02 1996 Richard Henderson <rth@tamu.edu>
-
- * alpha.h: Don't include "bfd.h"; private relocation types are now
- negative to minimize problems with shared libraries. Organize
- instruction subsets by AMASK extensions and PALcode
- implementation.
- (struct alpha_operand): Move flags slot for better packing.
-
-Tue Oct 29 12:19:10 1996 Jeffrey A Law (law@cygnus.com)
-
- * v850.h (V850_OPERAND_RELAX): New operand flag.
-
-Thu Oct 10 14:29:11 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10300.h (FMT_*): Move operand format definitions
- here.
-
-Tue Oct 8 14:48:07 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10300.h (MN10300_OPERAND_PAREN): Define.
-
-Mon Oct 7 16:52:11 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10300.h (mn10300_opcode): Add "format" field.
- (MN10300_OPERAND_*): Define.
-
-Thu Oct 3 10:33:46 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10x00.h: Delete.
- * mn10200.h, mn10300.h: New files.
-
-Wed Oct 2 21:31:26 1996 Jeffrey A Law (law@cygnus.com)
-
- * mn10x00.h: New file.
-
-Fri Sep 27 18:26:46 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * v850.h: Add new flag to indicate this instruction uses a PC
- displacement.
-
-Fri Sep 13 14:58:13 1996 Jeffrey A Law (law@cygnus.com)
-
- * h8300.h (stmac): Add missing instruction.
-
-Sat Aug 31 16:02:03 1996 Jeffrey A Law (law@cygnus.com)
-
- * v850.h (v850_opcode): Remove "size" field. Add "memop"
- field.
-
-Fri Aug 23 10:39:08 1996 Jeffrey A Law (law@cygnus.com)
-
- * v850.h (V850_OPERAND_EP): Define.
-
- * v850.h (v850_opcode): Add size field.
-
-Thu Aug 22 16:51:25 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * v850.h (v850_operands): Add insert and extract fields, pointers
- to functions used to handle unusual operand encoding.
- (V850_OPERAND_REG, V850_OPERAND_SRG, V850_OPERAND_CC,
- V850_OPERAND_SIGNED): Defined.
-
-Wed Aug 21 17:45:10 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * v850.h (v850_operands): Add flags field.
- (OPERAND_REG, OPERAND_NUM): Defined.
-
-Tue Aug 20 14:52:02 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * v850.h: New file.
-
-Fri Aug 16 14:44:15 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * mips.h (OP_SH_LOCC, OP_SH_HICC, OP_MASK_CC, OP_SH_COP1NORM,
- OP_MASK_COP1NORM, OP_SH_COP1SPEC, OP_MASK_COP1SPEC,
- OP_MASK_COP1SCLR, OP_MASK_COP1CMP, OP_SH_COP1CMP, OP_SH_FORMAT,
- OP_MASK_FORMAT, OP_SH_TRUE, OP_MASK_TRUE, OP_SH_GE, OP_MASK_GE,
- OP_SH_UNSIGNED, OP_MASK_UNSIGNED, OP_SH_HINT, OP_MASK_HINT):
- Defined.
-
-Fri Aug 16 00:15:15 1996 Jeffrey A Law (law@cygnus.com)
-
- * hppa.h (pitlb, pitlbe, iitlba, iitlbp, fic, fice): Accept
- a 3 bit space id instead of a 2 bit space id.
-
-Thu Aug 15 13:11:46 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v.h: Add some additional defines to support the
- assembler in determining which operations can be done in parallel.
-
-Tue Aug 6 11:13:22 1996 Jeffrey A Law (law@cygnus.com)
-
- * h8300.h (SN): Define.
- (eepmov.b): Renamed from "eepmov"
- (nop, bpt, rte, rts, sleep, clrmac): These have no size associated
- with them.
-
-Fri Jul 26 11:47:10 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v.h (OPERAND_SHIFT): New operand flag.
-
-Thu Jul 25 12:06:22 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v.h: Changes for divs, parallel-only instructions, and
- signed numbers.
-
-Mon Jul 22 11:21:15 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v.h (pd_reg): Define. Putting the definition here allows
- the assembler and disassembler to share the same struct.
-
-Mon Jul 22 12:15:25 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * i960.h (i960_opcodes): "halt" takes an argument. From Stephen
- Williams <steve@icarus.com>.
-
-Wed Jul 17 14:46:38 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
-
- * d10v.h: New file.
-
-Thu Jul 11 12:09:15 1996 Jeffrey A Law (law@cygnus.com)
-
- * h8300.h (band, bclr): Force high bit of immediate nibble to zero.
-
-Wed Jul 3 14:30:12 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * m68k.h (mcf5200): New macro.
- Document names of coldfire control registers.
-
-Tue Jul 2 23:05:45 1996 Jeffrey A Law (law@cygnus.com)
-
- * h8300.h (SRC_IN_DST): Define.
-
- * h8300.h (UNOP3): Mark the register operand in this insn
- as a source operand, not a destination operand.
- (SHIFT_2, SHIFT_IMM): Remove. Eliminate all references.
- (UNOP3): Change SHIFT_IMM to IMM for H8/S bitops. Mark
- register operand with SRC_IN_DST.
-
-Fri Jun 21 13:52:17 1996 Richard Henderson <rth@tamu.edu>
-
- * alpha.h: New file.
-
-Thu Jun 20 15:02:57 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * rs6k.h: Remove obsolete file.
-
-Wed Jun 19 15:29:38 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * i386.h: Correct opcode values for faddp, fsubp, fsubrp, fmulp,
- fdivp, and fdivrp. Add ffreep.
-
-Tue Jun 18 16:06:00 1996 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * h8300.h: Reorder various #defines for readability.
- (ABS32SRC, ABS32DST, DSP32LIST, ABS32LIST, A32LIST): Define.
- (BITOP): Accept additional (unused) argument. All callers changed.
- (EBITOP): Likewise.
- (O_LAST): Bump.
- (ldc, stc, movb, movw, movl): Use 32bit offsets and absolutes.
-
- * h8300.h (EXR, SHIFT_2, MACREG, SHIFT_IMM, RDINC): Define.
- (O_TAS, O_CLRMAC, O_LDMAC, O_MAC, O_LDM, O_STM): Define.
- (BITOP, EBITOP): Handle new H8/S addressing modes for
- bit insns.
- (UNOP3): Handle new shift/rotate insns on the H8/S.
- (insns using exr): New instructions.
- (tas, mac, ldmac, clrmac, ldm, stm): New instructions.
-
-Thu May 23 16:56:48 1996 Jeffrey A Law (law@cygnus.com)
-
- * h8300.h (add.l): Undo Apr 5th change. The manual I had
- was incorrect.
-
-Mon May 6 23:38:22 1996 Jeffrey A Law (law@cygnus.com)
-
- * h8300.h (START): Remove.
- (MEMRELAX): Define. Mark absolute memory operands in mov.b, mov.w
- and mov.l insns that can be relaxed.
-
-Tue Apr 30 18:30:58 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * i386.h: Remove Abs32 from lcall.
-
-Mon Apr 22 17:09:23 1996 Doug Evans <dje@blues.cygnus.com>
-
- * sparc.h (SPARC_OPCODE_ARCH_V9_P): New macro.
- (SLCPOP): New macro.
- Mark X,Y opcode letters as in use.
-
-Thu Apr 11 17:28:18 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * sparc.h (F_FLOAT, F_FBR): Define.
-
-Fri Apr 5 16:55:34 1996 Jeffrey A Law (law@cygnus.com)
-
- * h8300.h (ABS8MEM): Renamed from ABSMOV. Remove ABSMOV
- from all insns.
- (ABS8SRC,ABS8DST): Add ABS8MEM.
- (add.l): Fix reg+reg variant.
- (eepmov.w): Renamed from eepmovw.
- (ldc,stc): Fix many cases.
-
-Sun Mar 31 13:30:03 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc.h (SPARC_OPCODE_ARCH_MASK): New macro.
-
-Thu Mar 7 15:08:23 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * sparc.h (O): Mark operand letter as in use.
-
-Tue Feb 20 20:46:21 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * sparc.h (sparc_{encode,decode}_sparclet_cpreg): Declare.
- Mark operand letters uU as in use.
-
-Mon Feb 19 01:59:08 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * sparc.h (sparc_opcode_arch_val): Add SPARC_OPCODE_ARCH_SPARCLET.
- (sparc_opcode_arch): Delete member `conflicts'. Add `supported'.
- (SPARC_OPCODE_SUPPORTED): New macro.
- (SPARC_OPCODE_CONFLICT_P): Rewrite.
- (F_NOTV9): Delete.
-
-Fri Feb 16 12:23:34 1996 Jeffrey A Law (law@cygnus.com)
-
- * sparc.h (sparc_opcode_lookup_arch) Make return type in
- declaration consistent with return type in definition.
-
-Wed Feb 14 18:14:11 1996 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * i386.h (i386_optab): Remove Data32 from pushf and popf.
-
-Thu Feb 8 14:27:21 1996 James Carlson <carlson@xylogics.com>
-
- * i386.h (i386_regtab): Add 80486 test registers.
-
-Mon Feb 5 18:35:46 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * i960.h (I_HX): Define.
- (i960_opcodes): Add HX instruction.
-
-Mon Jan 29 12:43:39 1996 Ken Raeburn <raeburn@cygnus.com>
-
- * i386.h: Fix waiting forms of finit, fstenv, fsave, fstsw, fstcw,
- and fclex.
-
-Wed Jan 24 22:36:59 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * sparc.h (enum sparc_opcode_arch_val): Replaces sparc_architecture.
- (SPARC_OPCODE_CONFLICT_P): Renamed from ARCHITECTURES_CONFLICT_P.
- (bfd_* defines): Delete.
- (sparc_opcode_archs): Replaces architecture_pname.
- (sparc_opcode_lookup_arch): Declare.
- (NUMOPCODES): Delete.
-
-Mon Jan 22 08:24:32 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * sparc.h (enum sparc_architecture): Add v9a.
- (ARCHITECTURES_CONFLICT_P): Update.
-
-Thu Dec 28 13:27:53 1995 John Hassey <hassey@rtp.dg.com>
-
- * i386.h: Added Pentium Pro instructions.
-
-Thu Nov 2 22:59:22 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k.h: Document new 'W' operand place.
-
-Tue Oct 24 10:49:10 1995 Jeffrey A Law (law@cygnus.com)
-
- * hppa.h: Add lci and syncdma instructions.
-
-Mon Oct 23 11:09:16 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
-
- * mips.h: Added INSN_4100 flag to mark NEC VR4100 specific
- instructions.
-
-Mon Oct 16 10:28:15 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * ppc.h (PPC_OPCODE_{COMMON,ANY}): New opcode flags for
- assembler's -mcom and -many switches.
-
-Wed Oct 11 16:56:33 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * i386.h: Fix cmpxchg8b extension opcode description.
-
-Thu Oct 5 18:03:36 1995 Ken Raeburn <raeburn@cygnus.com>
-
- * i386.h: Add Pentium instructions wrmsr, rdtsc, rdmsr, cmpxchg8b,
- and register cr4.
-
-Tue Sep 19 15:26:43 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k.h: Change comment: split type P into types 0, 1 and 2.
-
-Wed Aug 30 13:50:55 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc.h (sparc_{encode,decode}_prefetch): Declare.
-
-Tue Aug 29 15:34:58 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc.h (sparc_{encode,decode}_{asi,membar}): Declare.
-
-Wed Aug 2 18:32:19 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * m68kmri.h: Remove.
-
- * m68k.h: Move tables into opcodes/m68k-opc.c, leaving just the
- declarations. Remove F_ALIAS and flag field of struct
- m68k_opcode. Change arch field of struct m68k_opcode to unsigned
- int. Make name and args fields of struct m68k_opcode const.
-
-Wed Aug 2 08:16:46 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc.h (F_NOTV9): Define.
-
-Tue Jul 11 14:20:42 1995 Jeff Spiegel <jeffs@lsil.com>
-
- * mips.h (INSN_4010): Define.
-
-Wed Jun 21 18:49:51 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * m68k.h (TBL1): Reverse sense of "round" argument in result.
-
- Changes from Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>:
- * m68k.h: Fix argument descriptions of coprocessor
- instructions to allow only alterable operands where appropriate.
- [!NO_DEFAULT_SIZES]: An omitted size defaults to `w'.
- (m68k_opcode_aliases): Add more aliases.
-
-Fri Apr 14 22:15:34 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * m68k.h: Added explcitly short-sized conditional branches, and a
- bunch of aliases (fmov*, ftest*, tdivul) to support gcc's
- svr4-based configurations.
-
-Mon Mar 13 21:30:01 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- Mon Feb 27 08:36:39 1995 Bryan Ford <baford@cs.utah.edu>
- * i386.h: added missing Data16/Data32 flags to a few instructions.
-
-Wed Mar 8 15:19:53 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * mips.h (OP_MASK_FR, OP_SH_FR): Define.
- (OP_MASK_BCC, OP_SH_BCC): Define.
- (OP_MASK_PREFX, OP_SH_PREFX): Define.
- (OP_MASK_CCC, OP_SH_CCC): Define.
- (INSN_READ_FPR_R): Define.
- (INSN_RFE): Delete.
-
-Wed Mar 8 03:13:23 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * m68k.h (enum m68k_architecture): Deleted.
- (struct m68k_opcode_alias): New type.
- (m68k_opcodes): Now const. Deleted opcode aliases with exactly
- matching constraints, values and flags. As a side effect of this,
- the MOTOROLA_SYNTAX_ONLY and MIT_SYNTAX_ONLY macros, which so far
- as I know were never used, now may need re-examining.
- (numopcodes): Now const.
- (m68k_opcode_aliases, numaliases): New variables.
- (endop): Deleted.
- [DONT_DEFINE_TABLE]: Declare numopcodes, numaliases, and
- m68k_opcode_aliases; update declaration of m68k_opcodes.
-
-Mon Mar 6 10:02:00 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * hppa.h (delay_type): Delete unused enumeration.
- (pa_opcode): Replace unused delayed field with an architecture
- field.
- (pa_opcodes): Mark each instruction as either PA1.0 or PA1.1.
-
-Fri Mar 3 16:10:24 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * mips.h (INSN_ISA4): Define.
-
-Fri Feb 24 19:13:37 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * mips.h (M_DLA_AB, M_DLI): Define.
-
-Thu Feb 23 17:33:09 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * hppa.h (fstwx): Fix single-bit error.
-
-Wed Feb 15 12:19:52 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * mips.h (M_ULD, M_ULD_A, M_USD, M_USD_A): Define.
-
-Mon Feb 6 10:35:23 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * i386.h: added cpuid instruction , and dr[0-7] aliases for the
- debug registers. From Charles Hannum (mycroft@netbsd.org).
-
-Mon Feb 6 03:31:54 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- Changes from Bryan Ford <baford@schirf.cs.utah.edu> for 16-bit
- i386 support:
- * i386.h (MOV_AX_DISP32): New macro.
- (i386_optab): Added Data16 and Data32 as needed. Added "w" forms
- of several call/return instructions.
- (ADDR_PREFIX_OPCODE): New macro.
-
-Mon Jan 23 16:45:43 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- Sat Jan 21 17:50:38 1995 Pat Rankin (rankin@eql.caltech.edu)
-
- * vax.h (struct vot_wot, field `args'): Make it pointer to const
- char.
- (struct vot, field `name'): ditto.
-
-Thu Jan 19 14:47:53 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * vax.h: Supply and properly group all values in end sentinel.
-
-Tue Jan 17 10:55:30 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * mips.h (INSN_ISA, INSN_4650): Define.
-
-Wed Oct 19 13:34:17 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * a29k.h: Add operand type 'I' for `inv' and `iretinv'. On
- systems with a separate instruction and data cache, such as the
- 29040, these instructions take an optional argument.
-
-Wed Sep 14 17:44:20 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * mips.h (INSN_STORE_MEMORY): Correct value to not conflict with
- INSN_TRAP.
-
-Tue Sep 6 11:39:08 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * mips.h (INSN_STORE_MEMORY): Define.
-
-Thu Jul 28 19:28:07 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * sparc.h: Document new operand type 'x'.
-
-Tue Jul 26 17:48:05 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * i960.h (I_CX2): New instruction category. It includes
- instructions available on Cx and Jx processors.
- (I_JX): New instruction category, for JX-only instructions.
- (i960_opcodes): Put eshro and sysctl in I_CX2 category. Added
- Jx-only instructions, in I_JX category.
-
-Wed Jul 13 18:43:47 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * ns32k.h (endop): Made pointer const too.
-
-Sun Jul 10 11:01:09 1994 Ian Dall (dall@hfrd.dsto.gov.au)
-
- * ns32k.h: Drop Q operand type as there is no correct use
- for it. Add I and Z operand types which allow better checking.
-
-Thu Jul 7 12:34:48 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * h8300.h (xor.l) :fix bit pattern.
- (L_2): New size of operand.
- (trapa): Use it.
-
-Fri Jun 10 16:38:11 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * m68k.h: Move "trap" before "tpcc" to change disassembly.
-
-Fri Jun 3 15:57:36 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * sparc.h: Include v9 definitions.
-
-Thu Jun 2 12:23:17 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * m68k.h (m68060): Defined.
- (m68040up, mfloat, mmmu): Include it.
- (struct m68k_opcode): Widen `arch' field.
- (m68k_opcodes): Updated for M68060. Removed comments that were
- instructions commented out by "JF" years ago.
-
-Thu Apr 28 18:31:14 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * m68k.h (struct m68k_opcode): Shorten `arch' field to 8 bits, and
- add a one-bit `flags' field.
- (F_ALIAS): New macro.
-
-Wed Apr 27 11:29:52 1994 Steve Chamberlain (sac@cygnus.com)
-
- * h8300.h (dec, inc): Get encoding right.
-
-Mon Apr 4 13:12:43 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ppc.h (struct powerpc_operand): Removed signedp field; just use
- a flag instead.
- (PPC_OPERAND_SIGNED): Define.
- (PPC_OPERAND_SIGNOPT): Define.
-
-Thu Mar 31 19:34:08 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * i386.h (IS_JUMP_ON_ECX_ZERO, "jcxz" pattern): Operand size
- prefix is 0x66, not 0x67. Patch from H.J. Lu (hlu@nynexst.com).
-
-Thu Mar 3 15:51:05 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * i386.h: Reverse last change. It'll be handled in gas instead.
-
-Thu Feb 24 15:29:05 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * i386.h (sar): Disabled the two-operand Imm1 form, since it was
- slower on the 486 and used the implicit shift count despite the
- explicit operand. The one-operand form is still available to get
- the shorter form with the implicit shift count.
-
-Thu Feb 17 12:27:52 1994 Torbjorn Granlund (tege@mexican.cygnus.com)
-
- * hppa.h: Fix typo in fstws arg string.
-
-Wed Feb 9 21:23:52 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ppc.h (struct powerpc_opcode): Make operands field unsigned.
-
-Mon Feb 7 19:14:58 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ppc.h (PPC_OPCODE_601): Define.
-
-Fri Feb 4 23:43:50 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * hppa.h (addb): Use '@' for addb and addib pseudo ops.
- (so we can determine valid completers for both addb and addb[tf].)
-
- * hppa.h (xmpyu): No floating point format specifier for the
- xmpyu instruction.
-
-Fri Feb 4 23:36:52 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ppc.h (PPC_OPERAND_NEXT): Define.
- (PPC_OPERAND_NEGATIVE): Change value to make room for above.
- (struct powerpc_macro): Define.
- (powerpc_macros, powerpc_num_macros): Declare.
-
-Fri Jan 21 19:13:50 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * ppc.h: New file. Header file for PowerPC opcode table.
-
-Mon Jan 17 00:14:23 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * hppa.h: More minor template fixes for sfu and copr (to allow
- for easier disassembly).
-
- * hppa.h: Fix templates for all the sfu and copr instructions.
-
-Wed Dec 15 15:12:42 1993 Ken Raeburn (raeburn@cujo.cygnus.com)
-
- * i386.h (push): Permit Imm16 operand too.
-
-Sat Dec 11 16:14:06 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * h8300.h (andc): Exists in base arch.
-
-Wed Dec 1 12:15:32 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * From Hisashi MINAMINO <minamino@sramhc.sra.co.jp>
- * hppa.h: #undef NONE to avoid conflict with hiux include files.
-
-Sun Nov 21 22:06:57 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * hppa.h: Add FP quadword store instructions.
-
-Wed Nov 17 17:13:16 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h: (M_J_A): Added.
- (M_LA): Removed.
-
-Mon Nov 8 12:12:47 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h (OP_MASK_CACHE, OP_SH_CACHE): Define. From Ted Lemon
- <mellon@pepper.ncd.com>.
-
-Sun Nov 7 00:30:11 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
-
- * hppa.h: Immediate field in probei instructions is unsigned,
- not low-sign extended.
-
-Wed Nov 3 10:30:00 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * m88k.h (RRI10MASK): Change from 0xfc00ffe0 to 0xfc00fc00.
-
-Tue Nov 2 12:41:30 1993 Ken Raeburn (raeburn@rover.cygnus.com)
-
- * i386.h: Add "fxch" without operand.
-
-Mon Nov 1 18:13:03 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h (M_JAL_1, M_JAL_2, M_JAL_A): Added.
-
-Sat Oct 2 22:26:11 1993 Jeffrey A Law (law@snake.cs.utah.edu)
-
- * hppa.h: Add gfw and gfr to the opcode table.
-
-Wed Sep 29 16:23:00 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * m88k.h: extended to handle m88110.
-
-Tue Sep 28 19:19:08 1993 Jeffrey A Law (law@snake.cs.utah.edu)
-
- * hppa.h (be, ble): Use operand type 'z' to denote absolute branch
- addresses.
-
-Tue Sep 14 14:04:35 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * i960.h (i960_opcodes): Properly bracket initializers.
-
-Mon Sep 13 12:50:52 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * m88k.h (BOFLAG): rewrite to avoid nested comment.
-
-Mon Sep 13 15:46:06 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * m68k.h (two): Protect second argument with parentheses.
-
-Fri Sep 10 16:29:47 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * i386.h (i386_optab): Added new instruction "rsm" (for i386sl).
- Deleted old in/out instructions in "#if 0" section.
-
-Thu Sep 9 17:42:19 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * i386.h (i386_optab): Properly bracket initializers.
-
-Wed Aug 25 13:50:56 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * hppa.h (pa_opcode): Use '|' for movb and movib insns. (From
- Jeff Law, law@cs.utah.edu).
-
-Mon Aug 23 16:55:03 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * i386.h (lcall): Accept Imm32 operand also.
-
-Mon Aug 23 12:43:11 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h (M_ABSU): Removed (absolute value of unsigned number??).
- (M_DABS): Added.
-
-Thu Aug 19 15:08:37 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h (INSN_*): Changed values. Removed unused definitions.
- Added INSN_COND_BRANCH_LIKELY, INSN_ISA2 and INSN_ISA3. Split
- INSN_LOAD_DELAY into INSN_LOAD_MEMORY_DELAY and
- INSN_LOAD_COPROC_DELAY. Split INSN_COPROC_DELAY into
- INSN_COPROC_MOVE_DELAY and INSN_COPROC_MEMORY_DELAY.
- (M_*): Added new values for r6000 and r4000 macros.
- (ANY_DELAY): Removed.
-
-Wed Aug 18 15:37:48 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h: Added M_LI_S and M_LI_SS.
-
-Tue Aug 17 07:08:08 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
-
- * h8300.h: Get some rare mov.bs correct.
-
-Thu Aug 5 09:15:17 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
-
- * sparc.h: Don't define const ourself; rely on ansidecl.h having
- been included.
-
-Fri Jul 30 18:41:11 1993 John Gilmore (gnu@cygnus.com)
-
- * sparc.h (F_JSR, F_UNBR, F_CONDBR): Add new flags to mark
- jump instructions, for use in disassemblers.
-
-Thu Jul 22 07:25:27 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * m88k.h: Make bitfields just unsigned, not unsigned long or
- unsigned short.
-
-Wed Jul 21 11:55:31 1993 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * hppa.h: New argument type 'y'. Use in various float instructions.
-
-Mon Jul 19 17:17:03 1993 Jim Kingdon (kingdon@deneb.cygnus.com)
-
- * hppa.h (break): First immediate field is unsigned.
-
- * hppa.h: Add rfir instruction.
-
-Sun Jul 18 16:28:08 1993 Jim Kingdon (kingdon@rtl.cygnus.com)
-
- * mips.h: Split the actual table out into ../../opcodes/mips-opc.c.
-
-Fri Jul 16 09:59:29 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips.h: Reworked the hazard information somewhat, and fixed some
- bugs in the instruction hazard descriptions.
-
-Thu Jul 15 12:42:01 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * m88k.h: Corrected a couple of opcodes.
-
-Tue Jul 6 15:17:35 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mips.h: Replaced with version from Ralph Campbell and OSF. The
- new version includes instruction hazard information, but is
- otherwise reasonably similar.
-
-Thu Jul 1 20:36:17 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * h8300.h: Fix typo in UNOP3 (affected sh[al][lr].l).
-
-Fri Jun 11 18:38:44 1993 Ken Raeburn (raeburn@cygnus.com)
-
- Patches from Jeff Law, law@cs.utah.edu:
- * hppa.h: Clean up some of the OLD_TABLE, non-OLD_TABLE braindamage.
- Make the tables be the same for the following instructions:
- "bb", "addb[tf]", "addib[tf]", "add", "add[loc]", "addco",
- "sh[123]add", "sh[123]add[lo]", "sub", "sub[obt]", "sub[bt]o",
- "ds", "comclr", "addi", "addi[ot]", "addito", "subi", "subio",
- "comiclr", "fadd", "fsub", "fmpy", "fdiv", "fsqrt", "fabs",
- "frnd", "fcpy", "fcnvff", "fcnvxf", "fcnvfx", "fcnvfxt",
- "fcmp", and "ftest".
-
- * hppa.h: Make new and old tables the same for "break", "mtctl",
- "mfctl", "bb", "ssm", "rsm", "xmpyu", "fmpyadd", "fmpysub".
- Fix typo in last patch. Collapse several #ifdefs into a
- single #ifdef.
-
- * hppa.h: Delete remaining OLD_TABLE code. Bring some
- of the comments up-to-date.
-
- * hppa.h: Update "free list" of letters and update
- comments describing each letter's function.
-
-Thu Jul 8 09:05:26 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * h8300.h: Lots of little fixes for the h8/300h.
-
-Tue Jun 8 12:16:03 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
-
- Support for H8/300-H
- * h8300.h: Lots of new opcodes.
-
-Fri Jun 4 15:41:37 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
-
- * h8300.h: checkpoint, includes H8/300-H opcodes.
-
-Thu Jun 3 15:42:59 1993 Stu Grossman (grossman@cygnus.com)
-
- * Patches from Jeffrey Law <law@cs.utah.edu>.
- * hppa.h: Rework single precision FP
- instructions so that they correctly disassemble code
- PA1.1 code.
-
-Thu May 27 19:21:22 1993 Bruce Bauman (boot@osf.org)
-
- * i386.h (i386_optab, mov pattern): Remove Mem16 restriction from
- mov to allow instructions like mov ss,xyz(ecx) to assemble.
-
-Tue May 25 00:39:40 1993 Ken Raeburn (raeburn@cygnus.com)
-
- * hppa.h: Use new version from Utah if OLD_TABLE isn't defined;
- gdb will define it for now.
-
-Mon May 24 15:20:06 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * sparc.h: Don't end enumerator list with comma.
-
-Fri May 14 15:15:50 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Based on patches from davidj@ICSI.Berkeley.EDU (David Johnson):
- * mips.h (OP_MASK_COPZ, OP_SH_COPZ): Define.
- ("bc2t"): Correct typo.
- ("[ls]wc[023]"): Use T rather than t.
- ("c[0123]"): Define general coprocessor instructions.
-
-Mon May 10 06:02:25 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com)
-
- * m68k.h: Move split point for gcc compilation more towards
- middle.
-
-Fri Apr 9 13:26:16 1993 Jim Kingdon (kingdon@cygnus.com)
-
- * rs6k.h: Clean up instructions for primary opcode 19 (many were
- simply wrong, ics, rfi, & rfsvc were missing).
- Add "a" to opr_ext for "bb". Doc fix.
-
-Thu Mar 18 13:45:31 1993 Per Bothner (bothner@rtl.cygnus.com)
-
- * i386.h: 486 extensions from John Hassey (hassey@dg-rtp.dg.com).
- * mips.h: Add casts, to suppress warnings about shifting too much.
- * m68k.h: Document the placement code '9'.
-
-Thu Feb 18 02:03:14 1993 John Gilmore (gnu@cygnus.com)
-
- * m68k.h (BREAK_UP_BIG_DECL, AND_OTHER_PART): Add kludge which
- allows callers to break up the large initialized struct full of
- opcodes into two half-sized ones. This permits GCC to compile
- this module, since it takes exponential space for initializers.
- (numopcodes, endop): Revise to use AND_OTHER_PART in size calcs.
-
-Thu Feb 4 02:06:56 1993 John Gilmore (gnu@cygnus.com)
-
- * a29k.h: Remove RCS crud, update GPL to v2, update copyrights.
- * convex.h: Added, from GDB's convx-opcode.h. Added CONST to all
- initialized structs in it.
-
-Thu Jan 28 21:32:22 1993 John Gilmore (gnu@cygnus.com)
-
- Delta 88 changes inspired by Carl Greco, <cgreco@Creighton.Edu>:
- * m88k.h (PMEM): Avoid previous definition from <sys/param.h>.
- (AND): Change to AND_ to avoid ansidecl.h `AND' conflict.
-
-Sat Jan 23 18:10:49 PST 1993 Ralph Campbell (ralphc@pyramid.com)
-
- * mips.h: document "i" and "j" operands correctly.
-
-Thu Jan 7 15:58:13 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * mips.h: Removed endianness dependency.
-
-Sun Jan 3 14:13:35 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * h8300.h: include info on number of cycles per instruction.
-
-Mon Dec 21 21:29:08 1992 Stu Grossman (grossman at cygnus.com)
-
- * hppa.h: Move handy aliases to the front. Fix masks for extract
- and deposit instructions.
-
-Sat Dec 12 16:09:48 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * i386.h: accept shld and shrd both with and without the shift
- count argument, which is always %cl.
-
-Fri Nov 27 17:13:18 1992 Ken Raeburn (raeburn at cygnus.com)
-
- * i386.h (i386_optab_end, i386_regtab_end): Now const.
- (one_byte_segment_defaults, two_byte_segment_defaults,
- i386_prefixtab_end): Ditto.
-
-Mon Nov 23 10:47:25 1992 Ken Raeburn (raeburn@cygnus.com)
-
- * vax.h (bb*): Use "v" (bitfield type), not "a" (address operand)
- for operand 2; from John Carr, jfc@dsg.dec.com.
-
-Wed Nov 4 07:36:49 1992 Ken Raeburn (raeburn@cygnus.com)
-
- * m68k.h: Define FIXED_SIZE_BRANCH, so bsr and bra instructions
- always use 16-bit offsets. Makes calculated-size jump tables
- feasible.
-
-Fri Oct 16 22:52:43 1992 Ken Raeburn (raeburn@cygnus.com)
-
- * i386.h: Fix one-operand forms of in* and out* patterns.
-
-Tue Sep 22 14:08:14 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * m68k.h: Added CPU32 support.
-
-Tue Sep 22 00:38:41 1992 John Gilmore (gnu@cygnus.com)
-
- * mips.h (break): Disassemble the argument. Patch from
- jonathan@cs.stanford.edu (Jonathan Stone).
-
-Wed Sep 9 11:25:28 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * m68k.h: merged Motorola and MIT syntax.
-
-Thu Sep 3 09:33:22 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * m68k.h (pmove): make the tests less strict, the 68k book is
- wrong.
-
-Tue Aug 25 23:25:19 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
-
- * m68k.h (m68ec030): Defined as alias for 68030.
- (m68k_opcodes): New type characters "3" for 68030 MMU regs and "t"
- for immediate 0-7 added. Set up some opcodes (ptest, bkpt) to use
- them. Tightened description of "fmovex" to distinguish it from
- some "pmove" encodings. Added "pmove" for 68030 MMU regs, cleaned
- up descriptions that claimed versions were available for chips not
- supporting them. Added "pmovefd".
-
-Mon Aug 24 12:04:51 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * m68k.h: fix where the . goes in divull
-
-Wed Aug 19 11:22:24 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * m68k.h: the cas2 instruction is supposed to be written with
- indirection on the last two operands, which can be either data or
- address registers. Added a new operand type 'r' which accepts
- either register type. Added new cases for cas2l and cas2w which
- use them. Corrected masks for cas2 which failed to recognize use
- of address register.
-
-Fri Aug 14 14:20:38 1992 Per Bothner (bothner@cygnus.com)
-
- * m68k.h: Merged in patches (mostly m68040-specific) from
- Colin Smith <colin@wrs.com>.
-
- * m68k.h: Merged m68kmri.h and m68k.h (using the former as a
- base). Also cleaned up duplicates, re-ordered instructions for
- the sake of dis-assembling (so aliases come after standard names).
- * m68kmri.h: Now just defines some macros, and #includes m68k.h.
-
-Wed Aug 12 16:38:15 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * m68kmri.h: added various opcodes. Moved jbxx to bxxes. Filled in
- all missing .s
-
-Mon Aug 10 23:22:33 1992 Ken Raeburn (raeburn@cygnus.com)
-
- * sparc.h: Moved tables to BFD library.
-
- * i386.h (i386_optab): Add fildq, fistpq aliases used by gcc.
-
-Sun Jun 28 13:29:03 1992 Fred Fish (fnf@cygnus.com)
-
- * h8300.h: Finish filling in all the holes in the opcode table,
- so that the Lucid C compiler can digest this as well...
-
-Fri Jun 26 21:27:17 1992 John Gilmore (gnu at cygnus.com)
-
- * i386.h: Add setc, setnc, addr16, data16, repz, repnz aliases.
- Fix opcodes on various sizes of fild/fist instructions
- (16bit=no suffix, 32bit="l" suffix, 64bit="ll" suffix).
- Use tabs to indent for comments. Fixes suggested by Minh Tran-Le.
-
-Thu Jun 25 16:13:26 1992 Stu Grossman (grossman at cygnus.com)
-
- * h8300.h: Fill in all the holes in the opcode table so that the
- losing HPUX C compiler can digest this...
-
-Thu Jun 11 12:15:25 1992 John Gilmore (gnu at cygnus.com)
-
- * mips.h: Fix decoding of coprocessor instructions, somewhat.
- (Fix by Eric Anderson, 3jean@maas-neotek.arc.nasa.gov.)
-
-Thu May 28 11:17:44 1992 Jim Wilson (wilson@sphagnum.cygnus.com)
-
- * sparc.h: Add new architecture variant sparclite; add its scan
- and divscc opcodes. Define ARCHITECTURES_CONFLICT_P macro.
-
-Tue May 5 14:23:27 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * mips.h: Add some more opcode synonyms (from Frank Yellin,
- fy@lucid.com).
-
-Thu Apr 16 18:25:26 1992 Per Bothner (bothner@cygnus.com)
-
- * rs6k.h: New version from IBM (Metin).
-
-Thu Apr 9 00:31:19 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * rs6k.h: Fix incorrect extended opcode for instructions `fm'
- and `fd'. (From metin@ibmpa.awdpa.ibm.com (Metin G. Ozisik).)
-
-Tue Apr 7 13:38:47 1992 Stu Grossman (grossman at cygnus.com)
-
- * rs6k.h: Move from ../../gdb/rs6k-opcode.h.
-
-Fri Apr 3 11:30:20 1992 Fred Fish (fnf@cygnus.com)
-
- * m68k.h (one, two): Cast macro args to unsigned to suppress
- complaints from compiler and lint about integer overflow during
- shift.
-
-Sun Mar 29 12:22:08 1992 John Gilmore (gnu at cygnus.com)
-
- * sparc.h (OP): Avoid signed overflow when shifting to high order bit.
-
-Fri Mar 6 00:22:38 1992 John Gilmore (gnu at cygnus.com)
-
- * mips.h: Make bitfield layout depend on the HOST compiler,
- not on the TARGET system.
-
-Fri Feb 21 01:29:51 1992 K. Richard Pixley (rich@cygnus.com)
-
- * i386.h: added inb, inw, outb, outw opcodes, added att syntax for
- scmp, slod, smov, ssca, ssto. Curtesy Minh Tran-Le
- <TRANLE@INTELLICORP.COM>.
-
-Thu Jan 30 07:31:44 1992 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * h8300.h: turned op_type enum into #define list
-
-Thu Jan 30 01:07:24 1992 John Gilmore (gnu at cygnus.com)
-
- * sparc.h: Remove "cypress" architecture. Remove "fitox" and
- similar instructions -- they've been renamed to "fitoq", etc.
- REALLY fix tsubcctv. Fix "fcmpeq" and "fcmpq" which had wrong
- number of arguments.
- * h8300.h: Remove extra ; which produces compiler warning.
-
-Tue Jan 28 22:59:22 1992 Stu Grossman (grossman at cygnus.com)
-
- * sparc.h: fix opcode for tsubcctv.
-
-Tue Jan 7 17:19:39 1992 K. Richard Pixley (rich at cygnus.com)
-
- * sparc.h: fba and cba are now aliases for fb and cb respectively.
-
-Fri Dec 27 10:55:50 1991 Per Bothner (bothner at cygnus.com)
-
- * sparc.h (nop): Made the 'lose' field be even tighter,
- so only a standard 'nop' is disassembled as a nop.
-
-Sun Dec 22 12:18:18 1991 Michael Tiemann (tiemann at cygnus.com)
-
- * sparc.h (nop): Add RD_GO to `lose' so that only %g0 in dest is
- disassembled as a nop.
-
-Wed Dec 18 17:19:44 1991 Stu Grossman (grossman at cygnus.com)
-
- * m68k.h, sparc.h: ANSIfy enums.
-
-Tue Dec 10 00:22:20 1991 K. Richard Pixley (rich at rtl.cygnus.com)
-
- * sparc.h: fix a typo.
-
-Sat Nov 30 20:40:51 1991 Steve Chamberlain (sac at rtl.cygnus.com)
-
- * a29k.h, arm.h, h8300.h, i386.h, i860.h, i960.h , m68k.h,
- m88k.h, mips.h , np1.h, ns32k.h, pn.h, pyr.h, sparc.h, tahoe.h,
- vax.h: Renamed from ../<foo>-opcode.h.
-
-
-Local Variables:
-version-control: never
-End:
diff --git a/include/opcode/alpha.h b/include/opcode/alpha.h
deleted file mode 100644
index 22c85a1..0000000
--- a/include/opcode/alpha.h
+++ /dev/null
@@ -1,237 +0,0 @@
-/* alpha.h -- Header file for Alpha opcode table
- Copyright 1996, 1999, 2001, 2003 Free Software Foundation, Inc.
- Contributed by Richard Henderson <rth@tamu.edu>,
- patterned after the PPC opcode table written by Ian Lance Taylor.
-
-This file is part of GDB, GAS, and the GNU binutils.
-
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them under the terms of the GNU General Public
-License as published by the Free Software Foundation; either version
-1, or (at your option) any later version.
-
-GDB, GAS, and the GNU binutils are distributed in the hope that they
-will be useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING. If not, write to the Free
-Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef OPCODE_ALPHA_H
-#define OPCODE_ALPHA_H
-
-/* The opcode table is an array of struct alpha_opcode. */
-
-struct alpha_opcode
-{
- /* The opcode name. */
- const char *name;
-
- /* The opcode itself. Those bits which will be filled in with
- operands are zeroes. */
- unsigned opcode;
-
- /* The opcode mask. This is used by the disassembler. This is a
- mask containing ones indicating those bits which must match the
- opcode field, and zeroes indicating those bits which need not
- match (and are presumably filled in by operands). */
- unsigned mask;
-
- /* One bit flags for the opcode. These are primarily used to
- indicate specific processors and environments support the
- instructions. The defined values are listed below. */
- unsigned flags;
-
- /* An array of operand codes. Each code is an index into the
- operand table. They appear in the order which the operands must
- appear in assembly code, and are terminated by a zero. */
- unsigned char operands[4];
-};
-
-/* The table itself is sorted by major opcode number, and is otherwise
- in the order in which the disassembler should consider
- instructions. */
-extern const struct alpha_opcode alpha_opcodes[];
-extern const unsigned alpha_num_opcodes;
-
-/* Values defined for the flags field of a struct alpha_opcode. */
-
-/* CPU Availability */
-#define AXP_OPCODE_BASE 0x0001 /* Base architecture -- all cpus. */
-#define AXP_OPCODE_EV4 0x0002 /* EV4 specific PALcode insns. */
-#define AXP_OPCODE_EV5 0x0004 /* EV5 specific PALcode insns. */
-#define AXP_OPCODE_EV6 0x0008 /* EV6 specific PALcode insns. */
-#define AXP_OPCODE_BWX 0x0100 /* Byte/word extension (amask bit 0). */
-#define AXP_OPCODE_CIX 0x0200 /* "Count" extension (amask bit 1). */
-#define AXP_OPCODE_MAX 0x0400 /* Multimedia extension (amask bit 8). */
-
-#define AXP_OPCODE_NOPAL (~(AXP_OPCODE_EV4|AXP_OPCODE_EV5|AXP_OPCODE_EV6))
-
-/* A macro to extract the major opcode from an instruction. */
-#define AXP_OP(i) (((i) >> 26) & 0x3F)
-
-/* The total number of major opcodes. */
-#define AXP_NOPS 0x40
-
-
-/* The operands table is an array of struct alpha_operand. */
-
-struct alpha_operand
-{
- /* The number of bits in the operand. */
- unsigned int bits : 5;
-
- /* How far the operand is left shifted in the instruction. */
- unsigned int shift : 5;
-
- /* The default relocation type for this operand. */
- signed int default_reloc : 16;
-
- /* One bit syntax flags. */
- unsigned int flags : 16;
-
- /* Insertion function. This is used by the assembler. To insert an
- operand value into an instruction, check this field.
-
- If it is NULL, execute
- i |= (op & ((1 << o->bits) - 1)) << o->shift;
- (i is the instruction which we are filling in, o is a pointer to
- this structure, and op is the opcode value; this assumes twos
- complement arithmetic).
-
- If this field is not NULL, then simply call it with the
- instruction and the operand value. It will return the new value
- of the instruction. If the ERRMSG argument is not NULL, then if
- the operand value is illegal, *ERRMSG will be set to a warning
- string (the operand will be inserted in any case). If the
- operand value is legal, *ERRMSG will be unchanged (most operands
- can accept any value). */
- unsigned (*insert) (unsigned instruction, int op, const char **errmsg);
-
- /* Extraction function. This is used by the disassembler. To
- extract this operand type from an instruction, check this field.
-
- If it is NULL, compute
- op = ((i) >> o->shift) & ((1 << o->bits) - 1);
- if ((o->flags & AXP_OPERAND_SIGNED) != 0
- && (op & (1 << (o->bits - 1))) != 0)
- op -= 1 << o->bits;
- (i is the instruction, o is a pointer to this structure, and op
- is the result; this assumes twos complement arithmetic).
-
- If this field is not NULL, then simply call it with the
- instruction value. It will return the value of the operand. If
- the INVALID argument is not NULL, *INVALID will be set to
- non-zero if this operand type can not actually be extracted from
- this operand (i.e., the instruction does not match). If the
- operand is valid, *INVALID will not be changed. */
- int (*extract) (unsigned instruction, int *invalid);
-};
-
-/* Elements in the table are retrieved by indexing with values from
- the operands field of the alpha_opcodes table. */
-
-extern const struct alpha_operand alpha_operands[];
-extern const unsigned alpha_num_operands;
-
-/* Values defined for the flags field of a struct alpha_operand. */
-
-/* Mask for selecting the type for typecheck purposes */
-#define AXP_OPERAND_TYPECHECK_MASK \
- (AXP_OPERAND_PARENS | AXP_OPERAND_COMMA | AXP_OPERAND_IR | \
- AXP_OPERAND_FPR | AXP_OPERAND_RELATIVE | AXP_OPERAND_SIGNED | \
- AXP_OPERAND_UNSIGNED)
-
-/* This operand does not actually exist in the assembler input. This
- is used to support extended mnemonics, for which two operands fields
- are identical. The assembler should call the insert function with
- any op value. The disassembler should call the extract function,
- ignore the return value, and check the value placed in the invalid
- argument. */
-#define AXP_OPERAND_FAKE 01
-
-/* The operand should be wrapped in parentheses rather than separated
- from the previous by a comma. This is used for the load and store
- instructions which want their operands to look like "Ra,disp(Rb)". */
-#define AXP_OPERAND_PARENS 02
-
-/* Used in combination with PARENS, this supresses the supression of
- the comma. This is used for "jmp Ra,(Rb),hint". */
-#define AXP_OPERAND_COMMA 04
-
-/* This operand names an integer register. */
-#define AXP_OPERAND_IR 010
-
-/* This operand names a floating point register. */
-#define AXP_OPERAND_FPR 020
-
-/* This operand is a relative branch displacement. The disassembler
- prints these symbolically if possible. */
-#define AXP_OPERAND_RELATIVE 040
-
-/* This operand takes signed values. */
-#define AXP_OPERAND_SIGNED 0100
-
-/* This operand takes unsigned values. This exists primarily so that
- a flags value of 0 can be treated as end-of-arguments. */
-#define AXP_OPERAND_UNSIGNED 0200
-
-/* Supress overflow detection on this field. This is used for hints. */
-#define AXP_OPERAND_NOOVERFLOW 0400
-
-/* Mask for optional argument default value. */
-#define AXP_OPERAND_OPTIONAL_MASK 07000
-
-/* This operand defaults to zero. This is used for jump hints. */
-#define AXP_OPERAND_DEFAULT_ZERO 01000
-
-/* This operand should default to the first (real) operand and is used
- in conjunction with AXP_OPERAND_OPTIONAL. This allows
- "and $0,3,$0" to be written as "and $0,3", etc. I don't like
- it, but it's what DEC does. */
-#define AXP_OPERAND_DEFAULT_FIRST 02000
-
-/* Similarly, this operand should default to the second (real) operand.
- This allows "negl $0" instead of "negl $0,$0". */
-#define AXP_OPERAND_DEFAULT_SECOND 04000
-
-
-/* Register common names */
-
-#define AXP_REG_V0 0
-#define AXP_REG_T0 1
-#define AXP_REG_T1 2
-#define AXP_REG_T2 3
-#define AXP_REG_T3 4
-#define AXP_REG_T4 5
-#define AXP_REG_T5 6
-#define AXP_REG_T6 7
-#define AXP_REG_T7 8
-#define AXP_REG_S0 9
-#define AXP_REG_S1 10
-#define AXP_REG_S2 11
-#define AXP_REG_S3 12
-#define AXP_REG_S4 13
-#define AXP_REG_S5 14
-#define AXP_REG_FP 15
-#define AXP_REG_A0 16
-#define AXP_REG_A1 17
-#define AXP_REG_A2 18
-#define AXP_REG_A3 19
-#define AXP_REG_A4 20
-#define AXP_REG_A5 21
-#define AXP_REG_T8 22
-#define AXP_REG_T9 23
-#define AXP_REG_T10 24
-#define AXP_REG_T11 25
-#define AXP_REG_RA 26
-#define AXP_REG_PV 27
-#define AXP_REG_T12 27
-#define AXP_REG_AT 28
-#define AXP_REG_GP 29
-#define AXP_REG_SP 30
-#define AXP_REG_ZERO 31
-
-#endif /* OPCODE_ALPHA_H */
diff --git a/include/opcode/arc.h b/include/opcode/arc.h
deleted file mode 100644
index 8ddcf54..0000000
--- a/include/opcode/arc.h
+++ /dev/null
@@ -1,323 +0,0 @@
-/* Opcode table for the ARC.
- Copyright 1994, 1995, 1997, 2001, 2002, 2003
- Free Software Foundation, Inc.
- Contributed by Doug Evans (dje@cygnus.com).
-
- This file is part of GAS, the GNU Assembler, GDB, the GNU debugger, and
- the GNU Binutils.
-
- GAS/GDB is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GAS/GDB is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GAS or GDB; see the file COPYING. If not, write to
- the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
- MA 02110-1301, USA. */
-
-
-/* List of the various cpu types.
- The tables currently use bit masks to say whether the instruction or
- whatever is supported by a particular cpu. This lets us have one entry
- apply to several cpus.
-
- The `base' cpu must be 0. The cpu type is treated independently of
- endianness. The complete `mach' number includes endianness.
- These values are internal to opcodes/bfd/binutils/gas. */
-#define ARC_MACH_5 0
-#define ARC_MACH_6 1
-#define ARC_MACH_7 2
-#define ARC_MACH_8 4
-
-/* Additional cpu values can be inserted here and ARC_MACH_BIG moved down. */
-#define ARC_MACH_BIG 16
-
-/* Mask of number of bits necessary to record cpu type. */
-#define ARC_MACH_CPU_MASK (ARC_MACH_BIG - 1)
-
-/* Mask of number of bits necessary to record cpu type + endianness. */
-#define ARC_MACH_MASK ((ARC_MACH_BIG << 1) - 1)
-
-/* Type to denote an ARC instruction (at least a 32 bit unsigned int). */
-
-typedef unsigned int arc_insn;
-
-struct arc_opcode {
- char *syntax; /* syntax of insn */
- unsigned long mask, value; /* recognize insn if (op&mask) == value */
- int flags; /* various flag bits */
-
-/* Values for `flags'. */
-
-/* Return CPU number, given flag bits. */
-#define ARC_OPCODE_CPU(bits) ((bits) & ARC_MACH_CPU_MASK)
-
-/* Return MACH number, given flag bits. */
-#define ARC_OPCODE_MACH(bits) ((bits) & ARC_MACH_MASK)
-
-/* First opcode flag bit available after machine mask. */
-#define ARC_OPCODE_FLAG_START (ARC_MACH_MASK + 1)
-
-/* This insn is a conditional branch. */
-#define ARC_OPCODE_COND_BRANCH (ARC_OPCODE_FLAG_START)
-#define SYNTAX_3OP (ARC_OPCODE_COND_BRANCH << 1)
-#define SYNTAX_LENGTH (SYNTAX_3OP )
-#define SYNTAX_2OP (SYNTAX_3OP << 1)
-#define OP1_MUST_BE_IMM (SYNTAX_2OP << 1)
-#define OP1_IMM_IMPLIED (OP1_MUST_BE_IMM << 1)
-#define SYNTAX_VALID (OP1_IMM_IMPLIED << 1)
-
-#define I(x) (((x) & 31) << 27)
-#define A(x) (((x) & ARC_MASK_REG) << ARC_SHIFT_REGA)
-#define B(x) (((x) & ARC_MASK_REG) << ARC_SHIFT_REGB)
-#define C(x) (((x) & ARC_MASK_REG) << ARC_SHIFT_REGC)
-#define R(x,b,m) (((x) & (m)) << (b)) /* value X, mask M, at bit B */
-
-/* These values are used to optimize assembly and disassembly. Each insn
- is on a list of related insns (same first letter for assembly, same
- insn code for disassembly). */
-
- struct arc_opcode *next_asm; /* Next instr to try during assembly. */
- struct arc_opcode *next_dis; /* Next instr to try during disassembly. */
-
-/* Macros to create the hash values for the lists. */
-#define ARC_HASH_OPCODE(string) \
- ((string)[0] >= 'a' && (string)[0] <= 'z' ? (string)[0] - 'a' : 26)
-#define ARC_HASH_ICODE(insn) \
- ((unsigned int) (insn) >> 27)
-
- /* Macros to access `next_asm', `next_dis' so users needn't care about the
- underlying mechanism. */
-#define ARC_OPCODE_NEXT_ASM(op) ((op)->next_asm)
-#define ARC_OPCODE_NEXT_DIS(op) ((op)->next_dis)
-};
-
-/* this is an "insert at front" linked list per Metaware spec
- that new definitions override older ones. */
-extern struct arc_opcode *arc_ext_opcodes;
-
-struct arc_operand_value {
- char *name; /* eg: "eq" */
- short value; /* eg: 1 */
- unsigned char type; /* index into `arc_operands' */
- unsigned char flags; /* various flag bits */
-
-/* Values for `flags'. */
-
-/* Return CPU number, given flag bits. */
-#define ARC_OPVAL_CPU(bits) ((bits) & ARC_MACH_CPU_MASK)
-/* Return MACH number, given flag bits. */
-#define ARC_OPVAL_MACH(bits) ((bits) & ARC_MACH_MASK)
-};
-
-struct arc_ext_operand_value {
- struct arc_ext_operand_value *next;
- struct arc_operand_value operand;
-};
-
-extern struct arc_ext_operand_value *arc_ext_operands;
-
-struct arc_operand {
-/* One of the insn format chars. */
- unsigned char fmt;
-
-/* The number of bits in the operand (may be unused for a modifier). */
- unsigned char bits;
-
-/* How far the operand is left shifted in the instruction, or
- the modifier's flag bit (may be unused for a modifier. */
- unsigned char shift;
-
-/* Various flag bits. */
- int flags;
-
-/* Values for `flags'. */
-
-/* This operand is a suffix to the opcode. */
-#define ARC_OPERAND_SUFFIX 1
-
-/* This operand is a relative branch displacement. The disassembler
- prints these symbolically if possible. */
-#define ARC_OPERAND_RELATIVE_BRANCH 2
-
-/* This operand is an absolute branch address. The disassembler
- prints these symbolically if possible. */
-#define ARC_OPERAND_ABSOLUTE_BRANCH 4
-
-/* This operand is an address. The disassembler
- prints these symbolically if possible. */
-#define ARC_OPERAND_ADDRESS 8
-
-/* This operand is a long immediate value. */
-#define ARC_OPERAND_LIMM 0x10
-
-/* This operand takes signed values. */
-#define ARC_OPERAND_SIGNED 0x20
-
-/* This operand takes signed values, but also accepts a full positive
- range of values. That is, if bits is 16, it takes any value from
- -0x8000 to 0xffff. */
-#define ARC_OPERAND_SIGNOPT 0x40
-
-/* This operand should be regarded as a negative number for the
- purposes of overflow checking (i.e., the normal most negative
- number is disallowed and one more than the normal most positive
- number is allowed). This flag will only be set for a signed
- operand. */
-#define ARC_OPERAND_NEGATIVE 0x80
-
-/* This operand doesn't really exist. The program uses these operands
- in special ways. */
-#define ARC_OPERAND_FAKE 0x100
-
-/* separate flags operand for j and jl instructions */
-#define ARC_OPERAND_JUMPFLAGS 0x200
-
-/* allow warnings and errors to be issued after call to insert_xxxxxx */
-#define ARC_OPERAND_WARN 0x400
-#define ARC_OPERAND_ERROR 0x800
-
-/* this is a load operand */
-#define ARC_OPERAND_LOAD 0x8000
-
-/* this is a store operand */
-#define ARC_OPERAND_STORE 0x10000
-
-/* Modifier values. */
-/* A dot is required before a suffix. Eg: .le */
-#define ARC_MOD_DOT 0x1000
-
-/* A normal register is allowed (not used, but here for completeness). */
-#define ARC_MOD_REG 0x2000
-
-/* An auxiliary register name is expected. */
-#define ARC_MOD_AUXREG 0x4000
-
-/* Sum of all ARC_MOD_XXX bits. */
-#define ARC_MOD_BITS 0x7000
-
-/* Non-zero if the operand type is really a modifier. */
-#define ARC_MOD_P(X) ((X) & ARC_MOD_BITS)
-
-/* enforce read/write only register restrictions */
-#define ARC_REGISTER_READONLY 0x01
-#define ARC_REGISTER_WRITEONLY 0x02
-#define ARC_REGISTER_NOSHORT_CUT 0x04
-
-/* Insertion function. This is used by the assembler. To insert an
- operand value into an instruction, check this field.
-
- If it is NULL, execute
- i |= (p & ((1 << o->bits) - 1)) << o->shift;
- (I is the instruction which we are filling in, O is a pointer to
- this structure, and OP is the opcode value; this assumes twos
- complement arithmetic).
-
- If this field is not NULL, then simply call it with the
- instruction and the operand value. It will return the new value
- of the instruction. If the ERRMSG argument is not NULL, then if
- the operand value is illegal, *ERRMSG will be set to a warning
- string (the operand will be inserted in any case). If the
- operand value is legal, *ERRMSG will be unchanged.
-
- REG is non-NULL when inserting a register value. */
-
- arc_insn (*insert)
- (arc_insn insn, const struct arc_operand *operand, int mods,
- const struct arc_operand_value *reg, long value, const char **errmsg);
-
-/* Extraction function. This is used by the disassembler. To
- extract this operand type from an instruction, check this field.
-
- If it is NULL, compute
- op = ((i) >> o->shift) & ((1 << o->bits) - 1);
- if ((o->flags & ARC_OPERAND_SIGNED) != 0
- && (op & (1 << (o->bits - 1))) != 0)
- op -= 1 << o->bits;
- (I is the instruction, O is a pointer to this structure, and OP
- is the result; this assumes twos complement arithmetic).
-
- If this field is not NULL, then simply call it with the
- instruction value. It will return the value of the operand. If
- the INVALID argument is not NULL, *INVALID will be set to
- non-zero if this operand type can not actually be extracted from
- this operand (i.e., the instruction does not match). If the
- operand is valid, *INVALID will not be changed.
-
- INSN is a pointer to an array of two `arc_insn's. The first element is
- the insn, the second is the limm if present.
-
- Operands that have a printable form like registers and suffixes have
- their struct arc_operand_value pointer stored in OPVAL. */
-
- long (*extract)
- (arc_insn *insn, const struct arc_operand *operand, int mods,
- const struct arc_operand_value **opval, int *invalid);
-};
-
-/* Bits that say what version of cpu we have. These should be passed to
- arc_init_opcode_tables. At present, all there is is the cpu type. */
-
-/* CPU number, given value passed to `arc_init_opcode_tables'. */
-#define ARC_HAVE_CPU(bits) ((bits) & ARC_MACH_CPU_MASK)
-/* MACH number, given value passed to `arc_init_opcode_tables'. */
-#define ARC_HAVE_MACH(bits) ((bits) & ARC_MACH_MASK)
-
-/* Special register values: */
-#define ARC_REG_SHIMM_UPDATE 61
-#define ARC_REG_SHIMM 63
-#define ARC_REG_LIMM 62
-
-/* Non-zero if REG is a constant marker. */
-#define ARC_REG_CONSTANT_P(REG) ((REG) >= 61)
-
-/* Positions and masks of various fields: */
-#define ARC_SHIFT_REGA 21
-#define ARC_SHIFT_REGB 15
-#define ARC_SHIFT_REGC 9
-#define ARC_MASK_REG 63
-
-/* Delay slot types. */
-#define ARC_DELAY_NONE 0 /* no delay slot */
-#define ARC_DELAY_NORMAL 1 /* delay slot in both cases */
-#define ARC_DELAY_JUMP 2 /* delay slot only if branch taken */
-
-/* Non-zero if X will fit in a signed 9 bit field. */
-#define ARC_SHIMM_CONST_P(x) ((long) (x) >= -256 && (long) (x) <= 255)
-
-extern const struct arc_operand arc_operands[];
-extern const int arc_operand_count;
-extern struct arc_opcode arc_opcodes[];
-extern const int arc_opcodes_count;
-extern const struct arc_operand_value arc_suffixes[];
-extern const int arc_suffixes_count;
-extern const struct arc_operand_value arc_reg_names[];
-extern const int arc_reg_names_count;
-extern unsigned char arc_operand_map[];
-
-/* Utility fns in arc-opc.c. */
-int arc_get_opcode_mach (int, int);
-
-/* `arc_opcode_init_tables' must be called before `arc_xxx_supported'. */
-void arc_opcode_init_tables (int);
-void arc_opcode_init_insert (void);
-void arc_opcode_init_extract (void);
-const struct arc_opcode *arc_opcode_lookup_asm (const char *);
-const struct arc_opcode *arc_opcode_lookup_dis (unsigned int);
-int arc_opcode_limm_p (long *);
-const struct arc_operand_value *arc_opcode_lookup_suffix
- (const struct arc_operand *type, int value);
-int arc_opcode_supported (const struct arc_opcode *);
-int arc_opval_supported (const struct arc_operand_value *);
-int arc_limm_fixup_adjust (arc_insn);
-int arc_insn_is_j (arc_insn);
-int arc_insn_not_jl (arc_insn);
-int arc_operand_type (int);
-struct arc_operand_value *get_ext_suffix (char *);
-int arc_get_noshortcut_flag (void);
diff --git a/include/opcode/arm.h b/include/opcode/arm.h
deleted file mode 100644
index a639a8b..0000000
--- a/include/opcode/arm.h
+++ /dev/null
@@ -1,212 +0,0 @@
-/* ARM assembler/disassembler support.
- Copyright 2004 Free Software Foundation, Inc.
-
- This file is part of GDB and GAS.
-
- GDB and GAS are free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 1, or (at
- your option) any later version.
-
- GDB and GAS are distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GDB or GAS; see the file COPYING. If not, write to the
- Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-/* The following bitmasks control CPU extensions: */
-#define ARM_EXT_V1 0x00000001 /* All processors (core set). */
-#define ARM_EXT_V2 0x00000002 /* Multiply instructions. */
-#define ARM_EXT_V2S 0x00000004 /* SWP instructions. */
-#define ARM_EXT_V3 0x00000008 /* MSR MRS. */
-#define ARM_EXT_V3M 0x00000010 /* Allow long multiplies. */
-#define ARM_EXT_V4 0x00000020 /* Allow half word loads. */
-#define ARM_EXT_V4T 0x00000040 /* Thumb. */
-#define ARM_EXT_V5 0x00000080 /* Allow CLZ, etc. */
-#define ARM_EXT_V5T 0x00000100 /* Improved interworking. */
-#define ARM_EXT_V5ExP 0x00000200 /* DSP core set. */
-#define ARM_EXT_V5E 0x00000400 /* DSP Double transfers. */
-#define ARM_EXT_V5J 0x00000800 /* Jazelle extension. */
-#define ARM_EXT_V6 0x00001000 /* ARM V6. */
-#define ARM_EXT_V6K 0x00002000 /* ARM V6K. */
-#define ARM_EXT_V6Z 0x00004000 /* ARM V6Z. */
-#define ARM_EXT_V6T2 0x00008000 /* Thumb-2. */
-#define ARM_EXT_DIV 0x00010000 /* Integer division. */
-/* The 'M' in Arm V7M stands for Microcontroller.
- On earlier architecture variants it stands for Multiply. */
-#define ARM_EXT_V5E_NOTM 0x00020000 /* Arm V5E but not Arm V7M. */
-#define ARM_EXT_V6_NOTM 0x00040000 /* Arm V6 but not Arm V7M. */
-#define ARM_EXT_V7 0x00080000 /* Arm V7. */
-#define ARM_EXT_V7A 0x00100000 /* Arm V7A. */
-#define ARM_EXT_V7R 0x00200000 /* Arm V7R. */
-#define ARM_EXT_V7M 0x00400000 /* Arm V7M. */
-#define ARM_EXT_V6M 0x00800000 /* ARM V6M. */
-#define ARM_EXT_BARRIER 0x01000000 /* DSB/DMB/ISB. */
-#define ARM_EXT_THUMB_MSR 0x02000000 /* Thumb MSR/MRS. */
-
-/* Co-processor space extensions. */
-#define ARM_CEXT_XSCALE 0x00000001 /* Allow MIA etc. */
-#define ARM_CEXT_MAVERICK 0x00000002 /* Use Cirrus/DSP coprocessor. */
-#define ARM_CEXT_IWMMXT 0x00000004 /* Intel Wireless MMX technology coprocessor. */
-#define ARM_CEXT_IWMMXT2 0x00000008 /* Intel Wireless MMX technology coprocessor version 2. */
-
-#define FPU_ENDIAN_PURE 0x80000000 /* Pure-endian doubles. */
-#define FPU_ENDIAN_BIG 0 /* Double words-big-endian. */
-#define FPU_FPA_EXT_V1 0x40000000 /* Base FPA instruction set. */
-#define FPU_FPA_EXT_V2 0x20000000 /* LFM/SFM. */
-#define FPU_MAVERICK 0x10000000 /* Cirrus Maverick. */
-#define FPU_VFP_EXT_V1xD 0x08000000 /* Base VFP instruction set. */
-#define FPU_VFP_EXT_V1 0x04000000 /* Double-precision insns. */
-#define FPU_VFP_EXT_V2 0x02000000 /* ARM10E VFPr1. */
-#define FPU_VFP_EXT_V3 0x01000000 /* VFPv3 insns. */
-#define FPU_NEON_EXT_V1 0x00800000 /* Neon (SIMD) insns. */
-#define FPU_VFP_EXT_D32 0x00400000 /* Registers D16-D31. */
-#define FPU_NEON_FP16 0x00200000 /* Half-precision extensions. */
-
-/* Architectures are the sum of the base and extensions. The ARM ARM (rev E)
- defines the following: ARMv3, ARMv3M, ARMv4xM, ARMv4, ARMv4TxM, ARMv4T,
- ARMv5xM, ARMv5, ARMv5TxM, ARMv5T, ARMv5TExP, ARMv5TE. To these we add
- three more to cover cores prior to ARM6. Finally, there are cores which
- implement further extensions in the co-processor space. */
-#define ARM_AEXT_V1 ARM_EXT_V1
-#define ARM_AEXT_V2 (ARM_AEXT_V1 | ARM_EXT_V2)
-#define ARM_AEXT_V2S (ARM_AEXT_V2 | ARM_EXT_V2S)
-#define ARM_AEXT_V3 (ARM_AEXT_V2S | ARM_EXT_V3)
-#define ARM_AEXT_V3M (ARM_AEXT_V3 | ARM_EXT_V3M)
-#define ARM_AEXT_V4xM (ARM_AEXT_V3 | ARM_EXT_V4)
-#define ARM_AEXT_V4 (ARM_AEXT_V3M | ARM_EXT_V4)
-#define ARM_AEXT_V4TxM (ARM_AEXT_V4xM | ARM_EXT_V4T)
-#define ARM_AEXT_V4T (ARM_AEXT_V4 | ARM_EXT_V4T)
-#define ARM_AEXT_V5xM (ARM_AEXT_V4xM | ARM_EXT_V5)
-#define ARM_AEXT_V5 (ARM_AEXT_V4 | ARM_EXT_V5)
-#define ARM_AEXT_V5TxM (ARM_AEXT_V5xM | ARM_EXT_V4T | ARM_EXT_V5T)
-#define ARM_AEXT_V5T (ARM_AEXT_V5 | ARM_EXT_V4T | ARM_EXT_V5T)
-#define ARM_AEXT_V5TExP (ARM_AEXT_V5T | ARM_EXT_V5ExP)
-#define ARM_AEXT_V5TE (ARM_AEXT_V5TExP | ARM_EXT_V5E)
-#define ARM_AEXT_V5TEJ (ARM_AEXT_V5TE | ARM_EXT_V5J)
-#define ARM_AEXT_V6 (ARM_AEXT_V5TEJ | ARM_EXT_V6)
-#define ARM_AEXT_V6K (ARM_AEXT_V6 | ARM_EXT_V6K)
-#define ARM_AEXT_V6Z (ARM_AEXT_V6 | ARM_EXT_V6Z)
-#define ARM_AEXT_V6ZK (ARM_AEXT_V6 | ARM_EXT_V6K | ARM_EXT_V6Z)
-#define ARM_AEXT_V6T2 (ARM_AEXT_V6 \
- | ARM_EXT_V6T2 | ARM_EXT_V6_NOTM | ARM_EXT_THUMB_MSR)
-#define ARM_AEXT_V6KT2 (ARM_AEXT_V6T2 | ARM_EXT_V6K)
-#define ARM_AEXT_V6ZT2 (ARM_AEXT_V6T2 | ARM_EXT_V6Z)
-#define ARM_AEXT_V6ZKT2 (ARM_AEXT_V6T2 | ARM_EXT_V6K | ARM_EXT_V6Z)
-#define ARM_AEXT_V7_ARM (ARM_AEXT_V6ZKT2 | ARM_EXT_V7 | ARM_EXT_BARRIER)
-#define ARM_AEXT_V7A (ARM_AEXT_V7_ARM | ARM_EXT_V7A)
-#define ARM_AEXT_V7R (ARM_AEXT_V7_ARM | ARM_EXT_V7R | ARM_EXT_DIV)
-#define ARM_AEXT_NOTM \
- (ARM_AEXT_V4 | ARM_EXT_V5ExP | ARM_EXT_V5J | ARM_EXT_V6_NOTM)
-#define ARM_AEXT_V6M \
- ((ARM_AEXT_V6K | ARM_EXT_BARRIER | ARM_EXT_V6M | ARM_EXT_THUMB_MSR) \
- & ~(ARM_AEXT_NOTM))
-#define ARM_AEXT_V7M \
- ((ARM_AEXT_V7_ARM | ARM_EXT_V6M | ARM_EXT_V7M | ARM_EXT_DIV) \
- & ~(ARM_AEXT_NOTM))
-#define ARM_AEXT_V7 (ARM_AEXT_V7A & ARM_AEXT_V7R & ARM_AEXT_V7M)
-
-/* Processors with specific extensions in the co-processor space. */
-#define ARM_ARCH_XSCALE ARM_FEATURE (ARM_AEXT_V5TE, ARM_CEXT_XSCALE)
-#define ARM_ARCH_IWMMXT \
- ARM_FEATURE (ARM_AEXT_V5TE, ARM_CEXT_XSCALE | ARM_CEXT_IWMMXT)
-#define ARM_ARCH_IWMMXT2 \
- ARM_FEATURE (ARM_AEXT_V5TE, ARM_CEXT_XSCALE | ARM_CEXT_IWMMXT | ARM_CEXT_IWMMXT2)
-
-#define FPU_VFP_V1xD (FPU_VFP_EXT_V1xD | FPU_ENDIAN_PURE)
-#define FPU_VFP_V1 (FPU_VFP_V1xD | FPU_VFP_EXT_V1)
-#define FPU_VFP_V2 (FPU_VFP_V1 | FPU_VFP_EXT_V2)
-#define FPU_VFP_V3D16 (FPU_VFP_V2 | FPU_VFP_EXT_V3)
-#define FPU_VFP_V3 (FPU_VFP_V3D16 | FPU_VFP_EXT_D32)
-#define FPU_VFP_HARD (FPU_VFP_EXT_V1xD | FPU_VFP_EXT_V1 | FPU_VFP_EXT_V2 \
- | FPU_VFP_EXT_V3 | FPU_NEON_EXT_V1 | FPU_VFP_EXT_D32)
-#define FPU_FPA (FPU_FPA_EXT_V1 | FPU_FPA_EXT_V2)
-
-/* Deprecated */
-#define FPU_ARCH_VFP ARM_FEATURE (0, FPU_ENDIAN_PURE)
-
-#define FPU_ARCH_FPE ARM_FEATURE (0, FPU_FPA_EXT_V1)
-#define FPU_ARCH_FPA ARM_FEATURE (0, FPU_FPA)
-
-#define FPU_ARCH_VFP_V1xD ARM_FEATURE (0, FPU_VFP_V1xD)
-#define FPU_ARCH_VFP_V1 ARM_FEATURE (0, FPU_VFP_V1)
-#define FPU_ARCH_VFP_V2 ARM_FEATURE (0, FPU_VFP_V2)
-#define FPU_ARCH_VFP_V3D16 ARM_FEATURE (0, FPU_VFP_V3D16)
-#define FPU_ARCH_VFP_V3 ARM_FEATURE (0, FPU_VFP_V3)
-#define FPU_ARCH_NEON_V1 ARM_FEATURE (0, FPU_NEON_EXT_V1)
-#define FPU_ARCH_VFP_V3_PLUS_NEON_V1 \
- ARM_FEATURE (0, FPU_VFP_V3 | FPU_NEON_EXT_V1)
-#define FPU_ARCH_NEON_FP16 \
- ARM_FEATURE (0, FPU_VFP_V3 | FPU_NEON_EXT_V1 | FPU_NEON_FP16)
-#define FPU_ARCH_VFP_HARD ARM_FEATURE (0, FPU_VFP_HARD)
-
-#define FPU_ARCH_ENDIAN_PURE ARM_FEATURE (0, FPU_ENDIAN_PURE)
-
-#define FPU_ARCH_MAVERICK ARM_FEATURE (0, FPU_MAVERICK)
-
-#define ARM_ARCH_V1 ARM_FEATURE (ARM_AEXT_V1, 0)
-#define ARM_ARCH_V2 ARM_FEATURE (ARM_AEXT_V2, 0)
-#define ARM_ARCH_V2S ARM_FEATURE (ARM_AEXT_V2S, 0)
-#define ARM_ARCH_V3 ARM_FEATURE (ARM_AEXT_V3, 0)
-#define ARM_ARCH_V3M ARM_FEATURE (ARM_AEXT_V3M, 0)
-#define ARM_ARCH_V4xM ARM_FEATURE (ARM_AEXT_V4xM, 0)
-#define ARM_ARCH_V4 ARM_FEATURE (ARM_AEXT_V4, 0)
-#define ARM_ARCH_V4TxM ARM_FEATURE (ARM_AEXT_V4TxM, 0)
-#define ARM_ARCH_V4T ARM_FEATURE (ARM_AEXT_V4T, 0)
-#define ARM_ARCH_V5xM ARM_FEATURE (ARM_AEXT_V5xM, 0)
-#define ARM_ARCH_V5 ARM_FEATURE (ARM_AEXT_V5, 0)
-#define ARM_ARCH_V5TxM ARM_FEATURE (ARM_AEXT_V5TxM, 0)
-#define ARM_ARCH_V5T ARM_FEATURE (ARM_AEXT_V5T, 0)
-#define ARM_ARCH_V5TExP ARM_FEATURE (ARM_AEXT_V5TExP, 0)
-#define ARM_ARCH_V5TE ARM_FEATURE (ARM_AEXT_V5TE, 0)
-#define ARM_ARCH_V5TEJ ARM_FEATURE (ARM_AEXT_V5TEJ, 0)
-#define ARM_ARCH_V6 ARM_FEATURE (ARM_AEXT_V6, 0)
-#define ARM_ARCH_V6K ARM_FEATURE (ARM_AEXT_V6K, 0)
-#define ARM_ARCH_V6Z ARM_FEATURE (ARM_AEXT_V6Z, 0)
-#define ARM_ARCH_V6ZK ARM_FEATURE (ARM_AEXT_V6ZK, 0)
-#define ARM_ARCH_V6T2 ARM_FEATURE (ARM_AEXT_V6T2, 0)
-#define ARM_ARCH_V6KT2 ARM_FEATURE (ARM_AEXT_V6KT2, 0)
-#define ARM_ARCH_V6ZT2 ARM_FEATURE (ARM_AEXT_V6ZT2, 0)
-#define ARM_ARCH_V6ZKT2 ARM_FEATURE (ARM_AEXT_V6ZKT2, 0)
-#define ARM_ARCH_V6M ARM_FEATURE (ARM_AEXT_V6M, 0)
-#define ARM_ARCH_V7 ARM_FEATURE (ARM_AEXT_V7, 0)
-#define ARM_ARCH_V7A ARM_FEATURE (ARM_AEXT_V7A, 0)
-#define ARM_ARCH_V7R ARM_FEATURE (ARM_AEXT_V7R, 0)
-#define ARM_ARCH_V7M ARM_FEATURE (ARM_AEXT_V7M, 0)
-
-/* Some useful combinations: */
-#define ARM_ARCH_NONE ARM_FEATURE (0, 0)
-#define FPU_NONE ARM_FEATURE (0, 0)
-#define ARM_ANY ARM_FEATURE (-1, 0) /* Any basic core. */
-#define FPU_ANY_HARD ARM_FEATURE (0, FPU_FPA | FPU_VFP_HARD | FPU_MAVERICK)
-#define ARM_ARCH_THUMB2 ARM_FEATURE (ARM_EXT_V6T2 | ARM_EXT_V7 | ARM_EXT_V7A | ARM_EXT_V7R | ARM_EXT_V7M | ARM_EXT_DIV, 0)
-
-/* There are too many feature bits to fit in a single word, so use a
- structure. For simplicity we put all core features in one word and
- everything else in the other. */
-typedef struct
-{
- unsigned long core;
- unsigned long coproc;
-} arm_feature_set;
-
-#define ARM_CPU_HAS_FEATURE(CPU,FEAT) \
- (((CPU).core & (FEAT).core) != 0 || ((CPU).coproc & (FEAT).coproc) != 0)
-
-#define ARM_MERGE_FEATURE_SETS(TARG,F1,F2) \
- do { \
- (TARG).core = (F1).core | (F2).core; \
- (TARG).coproc = (F1).coproc | (F2).coproc; \
- } while (0)
-
-#define ARM_CLEAR_FEATURE(TARG,F1,F2) \
- do { \
- (TARG).core = (F1).core &~ (F2).core; \
- (TARG).coproc = (F1).coproc &~ (F2).coproc; \
- } while (0)
-
-#define ARM_FEATURE(core, coproc) {(core), (coproc)}
diff --git a/include/opcode/avr.h b/include/opcode/avr.h
deleted file mode 100644
index 15a034a..0000000
--- a/include/opcode/avr.h
+++ /dev/null
@@ -1,284 +0,0 @@
-/* Opcode table for the Atmel AVR micro controllers.
-
- Copyright 2000, 2001, 2004, 2006, 2008 Free Software Foundation, Inc.
- Contributed by Denis Chertykov <denisc@overta.ru>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#define AVR_ISA_1200 0x0001 /* In the beginning there was ... */
-#define AVR_ISA_LPM 0x0002 /* device has LPM */
-#define AVR_ISA_LPMX 0x0004 /* device has LPM Rd,Z[+] */
-#define AVR_ISA_SRAM 0x0008 /* device has SRAM (LD, ST, PUSH, POP, ...) */
-#define AVR_ISA_MEGA 0x0020 /* device has >8K program memory (JMP and CALL
- supported, no 8K wrap on RJMP and RCALL) */
-#define AVR_ISA_MUL 0x0040 /* device has new core (MUL, FMUL, ...) */
-#define AVR_ISA_ELPM 0x0080 /* device has >64K program memory (ELPM) */
-#define AVR_ISA_ELPMX 0x0100 /* device has ELPM Rd,Z[+] */
-#define AVR_ISA_SPM 0x0200 /* device can program itself */
-#define AVR_ISA_BRK 0x0400 /* device has BREAK (on-chip debug) */
-#define AVR_ISA_EIND 0x0800 /* device has >128K program memory (none yet) */
-#define AVR_ISA_MOVW 0x1000 /* device has MOVW */
-
-#define AVR_ISA_TINY1 (AVR_ISA_1200 | AVR_ISA_LPM)
-#define AVR_ISA_2xxx (AVR_ISA_TINY1 | AVR_ISA_SRAM)
-/* For the attiny26 which is missing LPM Rd,Z+. */
-#define AVR_ISA_2xxe (AVR_ISA_2xxx | AVR_ISA_LPMX)
-#define AVR_ISA_RF401 (AVR_ISA_2xxx | AVR_ISA_MOVW | AVR_ISA_LPMX)
-#define AVR_ISA_TINY2 (AVR_ISA_2xxx | AVR_ISA_MOVW | AVR_ISA_LPMX | \
- AVR_ISA_SPM | AVR_ISA_BRK)
-#define AVR_ISA_M603 (AVR_ISA_2xxx | AVR_ISA_MEGA)
-#define AVR_ISA_M103 (AVR_ISA_M603 | AVR_ISA_ELPM)
-#define AVR_ISA_M8 (AVR_ISA_2xxx | AVR_ISA_MUL | AVR_ISA_MOVW | \
- AVR_ISA_LPMX | AVR_ISA_SPM)
-#define AVR_ISA_PWMx (AVR_ISA_M8 | AVR_ISA_BRK)
-#define AVR_ISA_M161 (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_MOVW | \
- AVR_ISA_LPMX | AVR_ISA_SPM)
-#define AVR_ISA_94K (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_MOVW | AVR_ISA_LPMX)
-#define AVR_ISA_M323 (AVR_ISA_M161 | AVR_ISA_BRK)
-#define AVR_ISA_M128 (AVR_ISA_M323 | AVR_ISA_ELPM | AVR_ISA_ELPMX)
-
-#define AVR_ISA_AVR1 AVR_ISA_TINY1
-#define AVR_ISA_AVR2 AVR_ISA_2xxx
-#define AVR_ISA_AVR25 AVR_ISA_TINY2
-#define AVR_ISA_AVR3 AVR_ISA_M603
-#define AVR_ISA_AVR31 AVR_ISA_M103
-#define AVR_ISA_AVR35 (AVR_ISA_AVR3 | AVR_ISA_MOVW | \
- AVR_ISA_LPMX | AVR_ISA_SPM | AVR_ISA_BRK)
-#define AVR_ISA_AVR3_ALL (AVR_ISA_AVR3 | AVR_ISA_AVR31 | AVR_ISA_AVR35)
-#define AVR_ISA_AVR4 AVR_ISA_PWMx
-#define AVR_ISA_AVR5 AVR_ISA_M323
-#define AVR_ISA_AVR51 AVR_ISA_M128
-#define AVR_ISA_AVR6 (AVR_ISA_1200 | AVR_ISA_LPM | AVR_ISA_LPMX | \
- AVR_ISA_SRAM | AVR_ISA_MEGA | AVR_ISA_MUL | \
- AVR_ISA_ELPM | AVR_ISA_ELPMX | AVR_ISA_SPM | \
- AVR_ISA_SPM | AVR_ISA_BRK | AVR_ISA_EIND | \
- AVR_ISA_MOVW)
-
-#define REGISTER_P(x) ((x) == 'r' \
- || (x) == 'd' \
- || (x) == 'w' \
- || (x) == 'a' \
- || (x) == 'v')
-
-/* Undefined combination of operands - does the register
- operand overlap with pre-decremented or post-incremented
- pointer register (like ld r31,Z+)? */
-#define AVR_UNDEF_P(x) (((x) & 0xFFED) == 0x91E5 || \
- ((x) & 0xFDEF) == 0x91AD || ((x) & 0xFDEF) == 0x91AE || \
- ((x) & 0xFDEF) == 0x91C9 || ((x) & 0xFDEF) == 0x91CA || \
- ((x) & 0xFDEF) == 0x91E1 || ((x) & 0xFDEF) == 0x91E2)
-
-/* Is this a skip instruction {cpse,sbic,sbis,sbrc,sbrs}? */
-#define AVR_SKIP_P(x) (((x) & 0xFC00) == 0x1000 || \
- ((x) & 0xFD00) == 0x9900 || ((x) & 0xFC08) == 0xFC00)
-
-/* Is this `ldd r,b+0' or `std b+0,r' (b={Y,Z}, disassembled as
- `ld r,b' or `st b,r' respectively - next opcode entry)? */
-#define AVR_DISP0_P(x) (((x) & 0xFC07) == 0x8000)
-
-/* constraint letters
- r - any register
- d - `ldi' register (r16-r31)
- v - `movw' even register (r0, r2, ..., r28, r30)
- a - `fmul' register (r16-r23)
- w - `adiw' register (r24,r26,r28,r30)
- e - pointer registers (X,Y,Z)
- b - base pointer register and displacement ([YZ]+disp)
- z - Z pointer register (for [e]lpm Rd,Z[+])
- M - immediate value from 0 to 255
- n - immediate value from 0 to 255 ( n = ~M ). Relocation impossible
- s - immediate value from 0 to 7
- P - Port address value from 0 to 63. (in, out)
- p - Port address value from 0 to 31. (cbi, sbi, sbic, sbis)
- K - immediate value from 0 to 63 (used in `adiw', `sbiw')
- i - immediate value
- l - signed pc relative offset from -64 to 63
- L - signed pc relative offset from -2048 to 2047
- h - absolute code address (call, jmp)
- S - immediate value from 0 to 7 (S = s << 4)
- ? - use this opcode entry if no parameters, else use next opcode entry
-
- Order is important - some binary opcodes have more than one name,
- the disassembler will only see the first match.
-
- Remaining undefined opcodes (1699 total - some of them might work
- as normal instructions if not all of the bits are decoded):
-
- 0x0001...0x00ff (255) (known to be decoded as `nop' by the old core)
- "100100xxxxxxx011" (128) 0x9[0-3][0-9a-f][3b]
- "100100xxxxxx1000" (64) 0x9[0-3][0-9a-f]8
- "1001001xxxxx01xx" (128) 0x9[23][0-9a-f][4-7]
- "1001010xxxxx0100" (32) 0x9[45][0-9a-f]4
- "1001010x001x1001" (4) 0x9[45][23]9
- "1001010x01xx1001" (8) 0x9[45][4-7]9
- "1001010x1xxx1001" (16) 0x9[45][8-9a-f]9
- "1001010xxxxx1011" (32) 0x9[45][0-9a-f]b
- "10010101001x1000" (2) 0x95[23]8
- "1001010101xx1000" (4) 0x95[4-7]8
- "1001010110111000" (1) 0x95b8
- "1001010111111000" (1) 0x95f8 (`espm' removed in databook update)
- "11111xxxxxxx1xxx" (1024) 0xf[8-9a-f][0-9a-f][8-9a-f]
- */
-
-AVR_INSN (clc, "", "1001010010001000", 1, AVR_ISA_1200, 0x9488)
-AVR_INSN (clh, "", "1001010011011000", 1, AVR_ISA_1200, 0x94d8)
-AVR_INSN (cli, "", "1001010011111000", 1, AVR_ISA_1200, 0x94f8)
-AVR_INSN (cln, "", "1001010010101000", 1, AVR_ISA_1200, 0x94a8)
-AVR_INSN (cls, "", "1001010011001000", 1, AVR_ISA_1200, 0x94c8)
-AVR_INSN (clt, "", "1001010011101000", 1, AVR_ISA_1200, 0x94e8)
-AVR_INSN (clv, "", "1001010010111000", 1, AVR_ISA_1200, 0x94b8)
-AVR_INSN (clz, "", "1001010010011000", 1, AVR_ISA_1200, 0x9498)
-
-AVR_INSN (sec, "", "1001010000001000", 1, AVR_ISA_1200, 0x9408)
-AVR_INSN (seh, "", "1001010001011000", 1, AVR_ISA_1200, 0x9458)
-AVR_INSN (sei, "", "1001010001111000", 1, AVR_ISA_1200, 0x9478)
-AVR_INSN (sen, "", "1001010000101000", 1, AVR_ISA_1200, 0x9428)
-AVR_INSN (ses, "", "1001010001001000", 1, AVR_ISA_1200, 0x9448)
-AVR_INSN (set, "", "1001010001101000", 1, AVR_ISA_1200, 0x9468)
-AVR_INSN (sev, "", "1001010000111000", 1, AVR_ISA_1200, 0x9438)
-AVR_INSN (sez, "", "1001010000011000", 1, AVR_ISA_1200, 0x9418)
-
- /* Same as {cl,se}[chinstvz] above. */
-AVR_INSN (bclr, "S", "100101001SSS1000", 1, AVR_ISA_1200, 0x9488)
-AVR_INSN (bset, "S", "100101000SSS1000", 1, AVR_ISA_1200, 0x9408)
-
-AVR_INSN (icall,"", "1001010100001001", 1, AVR_ISA_2xxx, 0x9509)
-AVR_INSN (ijmp, "", "1001010000001001", 1, AVR_ISA_2xxx, 0x9409)
-
-AVR_INSN (lpm, "?", "1001010111001000", 1, AVR_ISA_TINY1,0x95c8)
-AVR_INSN (lpm, "r,z", "1001000ddddd010+", 1, AVR_ISA_LPMX, 0x9004)
-AVR_INSN (elpm, "?", "1001010111011000", 1, AVR_ISA_ELPM, 0x95d8)
-AVR_INSN (elpm, "r,z", "1001000ddddd011+", 1, AVR_ISA_ELPMX,0x9006)
-
-AVR_INSN (nop, "", "0000000000000000", 1, AVR_ISA_1200, 0x0000)
-AVR_INSN (ret, "", "1001010100001000", 1, AVR_ISA_1200, 0x9508)
-AVR_INSN (reti, "", "1001010100011000", 1, AVR_ISA_1200, 0x9518)
-AVR_INSN (sleep,"", "1001010110001000", 1, AVR_ISA_1200, 0x9588)
-AVR_INSN (break,"", "1001010110011000", 1, AVR_ISA_BRK, 0x9598)
-AVR_INSN (wdr, "", "1001010110101000", 1, AVR_ISA_1200, 0x95a8)
-AVR_INSN (spm, "", "1001010111101000", 1, AVR_ISA_SPM, 0x95e8)
-
-AVR_INSN (adc, "r,r", "000111rdddddrrrr", 1, AVR_ISA_1200, 0x1c00)
-AVR_INSN (add, "r,r", "000011rdddddrrrr", 1, AVR_ISA_1200, 0x0c00)
-AVR_INSN (and, "r,r", "001000rdddddrrrr", 1, AVR_ISA_1200, 0x2000)
-AVR_INSN (cp, "r,r", "000101rdddddrrrr", 1, AVR_ISA_1200, 0x1400)
-AVR_INSN (cpc, "r,r", "000001rdddddrrrr", 1, AVR_ISA_1200, 0x0400)
-AVR_INSN (cpse, "r,r", "000100rdddddrrrr", 1, AVR_ISA_1200, 0x1000)
-AVR_INSN (eor, "r,r", "001001rdddddrrrr", 1, AVR_ISA_1200, 0x2400)
-AVR_INSN (mov, "r,r", "001011rdddddrrrr", 1, AVR_ISA_1200, 0x2c00)
-AVR_INSN (mul, "r,r", "100111rdddddrrrr", 1, AVR_ISA_MUL, 0x9c00)
-AVR_INSN (or, "r,r", "001010rdddddrrrr", 1, AVR_ISA_1200, 0x2800)
-AVR_INSN (sbc, "r,r", "000010rdddddrrrr", 1, AVR_ISA_1200, 0x0800)
-AVR_INSN (sub, "r,r", "000110rdddddrrrr", 1, AVR_ISA_1200, 0x1800)
-
- /* Shorthand for {eor,add,adc,and} r,r above. */
-AVR_INSN (clr, "r=r", "001001rdddddrrrr", 1, AVR_ISA_1200, 0x2400)
-AVR_INSN (lsl, "r=r", "000011rdddddrrrr", 1, AVR_ISA_1200, 0x0c00)
-AVR_INSN (rol, "r=r", "000111rdddddrrrr", 1, AVR_ISA_1200, 0x1c00)
-AVR_INSN (tst, "r=r", "001000rdddddrrrr", 1, AVR_ISA_1200, 0x2000)
-
-AVR_INSN (andi, "d,M", "0111KKKKddddKKKK", 1, AVR_ISA_1200, 0x7000)
- /*XXX special case*/
-AVR_INSN (cbr, "d,n", "0111KKKKddddKKKK", 1, AVR_ISA_1200, 0x7000)
-
-AVR_INSN (ldi, "d,M", "1110KKKKddddKKKK", 1, AVR_ISA_1200, 0xe000)
-AVR_INSN (ser, "d", "11101111dddd1111", 1, AVR_ISA_1200, 0xef0f)
-
-AVR_INSN (ori, "d,M", "0110KKKKddddKKKK", 1, AVR_ISA_1200, 0x6000)
-AVR_INSN (sbr, "d,M", "0110KKKKddddKKKK", 1, AVR_ISA_1200, 0x6000)
-
-AVR_INSN (cpi, "d,M", "0011KKKKddddKKKK", 1, AVR_ISA_1200, 0x3000)
-AVR_INSN (sbci, "d,M", "0100KKKKddddKKKK", 1, AVR_ISA_1200, 0x4000)
-AVR_INSN (subi, "d,M", "0101KKKKddddKKKK", 1, AVR_ISA_1200, 0x5000)
-
-AVR_INSN (sbrc, "r,s", "1111110rrrrr0sss", 1, AVR_ISA_1200, 0xfc00)
-AVR_INSN (sbrs, "r,s", "1111111rrrrr0sss", 1, AVR_ISA_1200, 0xfe00)
-AVR_INSN (bld, "r,s", "1111100ddddd0sss", 1, AVR_ISA_1200, 0xf800)
-AVR_INSN (bst, "r,s", "1111101ddddd0sss", 1, AVR_ISA_1200, 0xfa00)
-
-AVR_INSN (in, "r,P", "10110PPdddddPPPP", 1, AVR_ISA_1200, 0xb000)
-AVR_INSN (out, "P,r", "10111PPrrrrrPPPP", 1, AVR_ISA_1200, 0xb800)
-
-AVR_INSN (adiw, "w,K", "10010110KKddKKKK", 1, AVR_ISA_2xxx, 0x9600)
-AVR_INSN (sbiw, "w,K", "10010111KKddKKKK", 1, AVR_ISA_2xxx, 0x9700)
-
-AVR_INSN (cbi, "p,s", "10011000pppppsss", 1, AVR_ISA_1200, 0x9800)
-AVR_INSN (sbi, "p,s", "10011010pppppsss", 1, AVR_ISA_1200, 0x9a00)
-AVR_INSN (sbic, "p,s", "10011001pppppsss", 1, AVR_ISA_1200, 0x9900)
-AVR_INSN (sbis, "p,s", "10011011pppppsss", 1, AVR_ISA_1200, 0x9b00)
-
-AVR_INSN (brcc, "l", "111101lllllll000", 1, AVR_ISA_1200, 0xf400)
-AVR_INSN (brcs, "l", "111100lllllll000", 1, AVR_ISA_1200, 0xf000)
-AVR_INSN (breq, "l", "111100lllllll001", 1, AVR_ISA_1200, 0xf001)
-AVR_INSN (brge, "l", "111101lllllll100", 1, AVR_ISA_1200, 0xf404)
-AVR_INSN (brhc, "l", "111101lllllll101", 1, AVR_ISA_1200, 0xf405)
-AVR_INSN (brhs, "l", "111100lllllll101", 1, AVR_ISA_1200, 0xf005)
-AVR_INSN (brid, "l", "111101lllllll111", 1, AVR_ISA_1200, 0xf407)
-AVR_INSN (brie, "l", "111100lllllll111", 1, AVR_ISA_1200, 0xf007)
-AVR_INSN (brlo, "l", "111100lllllll000", 1, AVR_ISA_1200, 0xf000)
-AVR_INSN (brlt, "l", "111100lllllll100", 1, AVR_ISA_1200, 0xf004)
-AVR_INSN (brmi, "l", "111100lllllll010", 1, AVR_ISA_1200, 0xf002)
-AVR_INSN (brne, "l", "111101lllllll001", 1, AVR_ISA_1200, 0xf401)
-AVR_INSN (brpl, "l", "111101lllllll010", 1, AVR_ISA_1200, 0xf402)
-AVR_INSN (brsh, "l", "111101lllllll000", 1, AVR_ISA_1200, 0xf400)
-AVR_INSN (brtc, "l", "111101lllllll110", 1, AVR_ISA_1200, 0xf406)
-AVR_INSN (brts, "l", "111100lllllll110", 1, AVR_ISA_1200, 0xf006)
-AVR_INSN (brvc, "l", "111101lllllll011", 1, AVR_ISA_1200, 0xf403)
-AVR_INSN (brvs, "l", "111100lllllll011", 1, AVR_ISA_1200, 0xf003)
-
- /* Same as br?? above. */
-AVR_INSN (brbc, "s,l", "111101lllllllsss", 1, AVR_ISA_1200, 0xf400)
-AVR_INSN (brbs, "s,l", "111100lllllllsss", 1, AVR_ISA_1200, 0xf000)
-
-AVR_INSN (rcall, "L", "1101LLLLLLLLLLLL", 1, AVR_ISA_1200, 0xd000)
-AVR_INSN (rjmp, "L", "1100LLLLLLLLLLLL", 1, AVR_ISA_1200, 0xc000)
-
-AVR_INSN (call, "h", "1001010hhhhh111h", 2, AVR_ISA_MEGA, 0x940e)
-AVR_INSN (jmp, "h", "1001010hhhhh110h", 2, AVR_ISA_MEGA, 0x940c)
-
-AVR_INSN (asr, "r", "1001010rrrrr0101", 1, AVR_ISA_1200, 0x9405)
-AVR_INSN (com, "r", "1001010rrrrr0000", 1, AVR_ISA_1200, 0x9400)
-AVR_INSN (dec, "r", "1001010rrrrr1010", 1, AVR_ISA_1200, 0x940a)
-AVR_INSN (inc, "r", "1001010rrrrr0011", 1, AVR_ISA_1200, 0x9403)
-AVR_INSN (lsr, "r", "1001010rrrrr0110", 1, AVR_ISA_1200, 0x9406)
-AVR_INSN (neg, "r", "1001010rrrrr0001", 1, AVR_ISA_1200, 0x9401)
-AVR_INSN (pop, "r", "1001000rrrrr1111", 1, AVR_ISA_2xxx, 0x900f)
-AVR_INSN (push, "r", "1001001rrrrr1111", 1, AVR_ISA_2xxx, 0x920f)
-AVR_INSN (ror, "r", "1001010rrrrr0111", 1, AVR_ISA_1200, 0x9407)
-AVR_INSN (swap, "r", "1001010rrrrr0010", 1, AVR_ISA_1200, 0x9402)
-
- /* Known to be decoded as `nop' by the old core. */
-AVR_INSN (movw, "v,v", "00000001ddddrrrr", 1, AVR_ISA_MOVW, 0x0100)
-AVR_INSN (muls, "d,d", "00000010ddddrrrr", 1, AVR_ISA_MUL, 0x0200)
-AVR_INSN (mulsu,"a,a", "000000110ddd0rrr", 1, AVR_ISA_MUL, 0x0300)
-AVR_INSN (fmul, "a,a", "000000110ddd1rrr", 1, AVR_ISA_MUL, 0x0308)
-AVR_INSN (fmuls,"a,a", "000000111ddd0rrr", 1, AVR_ISA_MUL, 0x0380)
-AVR_INSN (fmulsu,"a,a","000000111ddd1rrr", 1, AVR_ISA_MUL, 0x0388)
-
-AVR_INSN (sts, "i,r", "1001001ddddd0000", 2, AVR_ISA_2xxx, 0x9200)
-AVR_INSN (lds, "r,i", "1001000ddddd0000", 2, AVR_ISA_2xxx, 0x9000)
-
- /* Special case for b+0, `e' must be next entry after `b',
- b={Y=1,Z=0}, ee={X=11,Y=10,Z=00}, !=1 if -e or e+ or X. */
-AVR_INSN (ldd, "r,b", "10o0oo0dddddbooo", 1, AVR_ISA_2xxx, 0x8000)
-AVR_INSN (ld, "r,e", "100!000dddddee-+", 1, AVR_ISA_1200, 0x8000)
-AVR_INSN (std, "b,r", "10o0oo1rrrrrbooo", 1, AVR_ISA_2xxx, 0x8200)
-AVR_INSN (st, "e,r", "100!001rrrrree-+", 1, AVR_ISA_1200, 0x8200)
-
- /* These are for devices that don't exist yet
- (>128K program memory, PC = EIND:Z). */
-AVR_INSN (eicall, "", "1001010100011001", 1, AVR_ISA_EIND, 0x9519)
-AVR_INSN (eijmp, "", "1001010000011001", 1, AVR_ISA_EIND, 0x9419)
-
diff --git a/include/opcode/bfin.h b/include/opcode/bfin.h
deleted file mode 100755
index 4466fdc..0000000
--- a/include/opcode/bfin.h
+++ /dev/null
@@ -1,1693 +0,0 @@
-/* bfin.h -- Header file for ADI Blackfin opcode table
- Copyright 2005 Free Software Foundation, Inc.
-
-This file is part of GDB, GAS, and the GNU binutils.
-
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them under the terms of the GNU General Public
-License as published by the Free Software Foundation; either version
-1, or (at your option) any later version.
-
-GDB, GAS, and the GNU binutils are distributed in the hope that they
-will be useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING. If not, write to the Free
-Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* Common to all DSP32 instructions. */
-#define BIT_MULTI_INS 0x0800
-
-/* This just sets the multi instruction bit of a DSP32 instruction. */
-#define SET_MULTI_INSTRUCTION_BIT(x) x->value |= BIT_MULTI_INS;
-
-
-/* DSP instructions (32 bit) */
-
-/* dsp32mac
-+----+----+---+---|---+----+----+---|---+---+---+---|---+---+---+---+
-| 1 | 1 | 0 | 0 |.M.| 0 | 0 |.mmod..........|.MM|.P.|.w1|.op1...|
-|.h01|.h11|.w0|.op0...|.h00|.h10|.dst.......|.src0......|.src1......|
-+----+----+---+---|---+----+----+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned long opcode;
- int bits_src1;
- int mask_src1;
- int bits_src0;
- int mask_src0;
- int bits_dst;
- int mask_dst;
- int bits_h10;
- int mask_h10;
- int bits_h00;
- int mask_h00;
- int bits_op0;
- int mask_op0;
- int bits_w0;
- int mask_w0;
- int bits_h11;
- int mask_h11;
- int bits_h01;
- int mask_h01;
- int bits_op1;
- int mask_op1;
- int bits_w1;
- int mask_w1;
- int bits_P;
- int mask_P;
- int bits_MM;
- int mask_MM;
- int bits_mmod;
- int mask_mmod;
- int bits_code2;
- int mask_code2;
- int bits_M;
- int mask_M;
- int bits_code;
- int mask_code;
-} DSP32Mac;
-
-#define DSP32Mac_opcode 0xc0000000
-#define DSP32Mac_src1_bits 0
-#define DSP32Mac_src1_mask 0x7
-#define DSP32Mac_src0_bits 3
-#define DSP32Mac_src0_mask 0x7
-#define DSP32Mac_dst_bits 6
-#define DSP32Mac_dst_mask 0x7
-#define DSP32Mac_h10_bits 9
-#define DSP32Mac_h10_mask 0x1
-#define DSP32Mac_h00_bits 10
-#define DSP32Mac_h00_mask 0x1
-#define DSP32Mac_op0_bits 11
-#define DSP32Mac_op0_mask 0x3
-#define DSP32Mac_w0_bits 13
-#define DSP32Mac_w0_mask 0x1
-#define DSP32Mac_h11_bits 14
-#define DSP32Mac_h11_mask 0x1
-#define DSP32Mac_h01_bits 15
-#define DSP32Mac_h01_mask 0x1
-#define DSP32Mac_op1_bits 16
-#define DSP32Mac_op1_mask 0x3
-#define DSP32Mac_w1_bits 18
-#define DSP32Mac_w1_mask 0x1
-#define DSP32Mac_p_bits 19
-#define DSP32Mac_p_mask 0x1
-#define DSP32Mac_MM_bits 20
-#define DSP32Mac_MM_mask 0x1
-#define DSP32Mac_mmod_bits 21
-#define DSP32Mac_mmod_mask 0xf
-#define DSP32Mac_code2_bits 25
-#define DSP32Mac_code2_mask 0x3
-#define DSP32Mac_M_bits 27
-#define DSP32Mac_M_mask 0x1
-#define DSP32Mac_code_bits 28
-#define DSP32Mac_code_mask 0xf
-
-#define init_DSP32Mac \
-{ \
- DSP32Mac_opcode, \
- DSP32Mac_src1_bits, DSP32Mac_src1_mask, \
- DSP32Mac_src0_bits, DSP32Mac_src0_mask, \
- DSP32Mac_dst_bits, DSP32Mac_dst_mask, \
- DSP32Mac_h10_bits, DSP32Mac_h10_mask, \
- DSP32Mac_h00_bits, DSP32Mac_h00_mask, \
- DSP32Mac_op0_bits, DSP32Mac_op0_mask, \
- DSP32Mac_w0_bits, DSP32Mac_w0_mask, \
- DSP32Mac_h11_bits, DSP32Mac_h11_mask, \
- DSP32Mac_h01_bits, DSP32Mac_h01_mask, \
- DSP32Mac_op1_bits, DSP32Mac_op1_mask, \
- DSP32Mac_w1_bits, DSP32Mac_w1_mask, \
- DSP32Mac_p_bits, DSP32Mac_p_mask, \
- DSP32Mac_MM_bits, DSP32Mac_MM_mask, \
- DSP32Mac_mmod_bits, DSP32Mac_mmod_mask, \
- DSP32Mac_code2_bits, DSP32Mac_code2_mask, \
- DSP32Mac_M_bits, DSP32Mac_M_mask, \
- DSP32Mac_code_bits, DSP32Mac_code_mask \
-};
-
-/* dsp32mult
-+----+----+---+---|---+----+----+---|---+---+---+---|---+---+---+---+
-| 1 | 1 | 0 | 0 |.M.| 0 | 1 |.mmod..........|.MM|.P.|.w1|.op1...|
-|.h01|.h11|.w0|.op0...|.h00|.h10|.dst.......|.src0......|.src1......|
-+----+----+---+---|---+----+----+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef DSP32Mac DSP32Mult;
-#define DSP32Mult_opcode 0xc2000000
-
-#define init_DSP32Mult \
-{ \
- DSP32Mult_opcode, \
- DSP32Mac_src1_bits, DSP32Mac_src1_mask, \
- DSP32Mac_src0_bits, DSP32Mac_src0_mask, \
- DSP32Mac_dst_bits, DSP32Mac_dst_mask, \
- DSP32Mac_h10_bits, DSP32Mac_h10_mask, \
- DSP32Mac_h00_bits, DSP32Mac_h00_mask, \
- DSP32Mac_op0_bits, DSP32Mac_op0_mask, \
- DSP32Mac_w0_bits, DSP32Mac_w0_mask, \
- DSP32Mac_h11_bits, DSP32Mac_h11_mask, \
- DSP32Mac_h01_bits, DSP32Mac_h01_mask, \
- DSP32Mac_op1_bits, DSP32Mac_op1_mask, \
- DSP32Mac_w1_bits, DSP32Mac_w1_mask, \
- DSP32Mac_p_bits, DSP32Mac_p_mask, \
- DSP32Mac_MM_bits, DSP32Mac_MM_mask, \
- DSP32Mac_mmod_bits, DSP32Mac_mmod_mask, \
- DSP32Mac_code2_bits, DSP32Mac_code2_mask, \
- DSP32Mac_M_bits, DSP32Mac_M_mask, \
- DSP32Mac_code_bits, DSP32Mac_code_mask \
-};
-
-/* dsp32alu
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 1 | 1 | 0 | 0 |.M.| 1 | 0 | - | - | - |.HL|.aopcde............|
-|.aop...|.s.|.x.|.dst0......|.dst1......|.src0......|.src1......|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned long opcode;
- int bits_src1;
- int mask_src1;
- int bits_src0;
- int mask_src0;
- int bits_dst1;
- int mask_dst1;
- int bits_dst0;
- int mask_dst0;
- int bits_x;
- int mask_x;
- int bits_s;
- int mask_s;
- int bits_aop;
- int mask_aop;
- int bits_aopcde;
- int mask_aopcde;
- int bits_HL;
- int mask_HL;
- int bits_dontcare;
- int mask_dontcare;
- int bits_code2;
- int mask_code2;
- int bits_M;
- int mask_M;
- int bits_code;
- int mask_code;
-} DSP32Alu;
-
-#define DSP32Alu_opcode 0xc4000000
-#define DSP32Alu_src1_bits 0
-#define DSP32Alu_src1_mask 0x7
-#define DSP32Alu_src0_bits 3
-#define DSP32Alu_src0_mask 0x7
-#define DSP32Alu_dst1_bits 6
-#define DSP32Alu_dst1_mask 0x7
-#define DSP32Alu_dst0_bits 9
-#define DSP32Alu_dst0_mask 0x7
-#define DSP32Alu_x_bits 12
-#define DSP32Alu_x_mask 0x1
-#define DSP32Alu_s_bits 13
-#define DSP32Alu_s_mask 0x1
-#define DSP32Alu_aop_bits 14
-#define DSP32Alu_aop_mask 0x3
-#define DSP32Alu_aopcde_bits 16
-#define DSP32Alu_aopcde_mask 0x1f
-#define DSP32Alu_HL_bits 21
-#define DSP32Alu_HL_mask 0x1
-#define DSP32Alu_dontcare_bits 22
-#define DSP32Alu_dontcare_mask 0x7
-#define DSP32Alu_code2_bits 25
-#define DSP32Alu_code2_mask 0x3
-#define DSP32Alu_M_bits 27
-#define DSP32Alu_M_mask 0x1
-#define DSP32Alu_code_bits 28
-#define DSP32Alu_code_mask 0xf
-
-#define init_DSP32Alu \
-{ \
- DSP32Alu_opcode, \
- DSP32Alu_src1_bits, DSP32Alu_src1_mask, \
- DSP32Alu_src0_bits, DSP32Alu_src0_mask, \
- DSP32Alu_dst1_bits, DSP32Alu_dst1_mask, \
- DSP32Alu_dst0_bits, DSP32Alu_dst0_mask, \
- DSP32Alu_x_bits, DSP32Alu_x_mask, \
- DSP32Alu_s_bits, DSP32Alu_s_mask, \
- DSP32Alu_aop_bits, DSP32Alu_aop_mask, \
- DSP32Alu_aopcde_bits, DSP32Alu_aopcde_mask, \
- DSP32Alu_HL_bits, DSP32Alu_HL_mask, \
- DSP32Alu_dontcare_bits, DSP32Alu_dontcare_mask, \
- DSP32Alu_code2_bits, DSP32Alu_code2_mask, \
- DSP32Alu_M_bits, DSP32Alu_M_mask, \
- DSP32Alu_code_bits, DSP32Alu_code_mask \
-};
-
-/* dsp32shift
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 1 | 1 | 0 | 0 |.M.| 1 | 1 | 0 | 0 | - | - |.sopcde............|
-|.sop...|.HLs...|.dst0......| - | - | - |.src0......|.src1......|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned long opcode;
- int bits_src1;
- int mask_src1;
- int bits_src0;
- int mask_src0;
- int bits_dst1;
- int mask_dst1;
- int bits_dst0;
- int mask_dst0;
- int bits_HLs;
- int mask_HLs;
- int bits_sop;
- int mask_sop;
- int bits_sopcde;
- int mask_sopcde;
- int bits_dontcare;
- int mask_dontcare;
- int bits_code2;
- int mask_code2;
- int bits_M;
- int mask_M;
- int bits_code;
- int mask_code;
-} DSP32Shift;
-
-#define DSP32Shift_opcode 0xc6000000
-#define DSP32Shift_src1_bits 0
-#define DSP32Shift_src1_mask 0x7
-#define DSP32Shift_src0_bits 3
-#define DSP32Shift_src0_mask 0x7
-#define DSP32Shift_dst1_bits 6
-#define DSP32Shift_dst1_mask 0x7
-#define DSP32Shift_dst0_bits 9
-#define DSP32Shift_dst0_mask 0x7
-#define DSP32Shift_HLs_bits 12
-#define DSP32Shift_HLs_mask 0x3
-#define DSP32Shift_sop_bits 14
-#define DSP32Shift_sop_mask 0x3
-#define DSP32Shift_sopcde_bits 16
-#define DSP32Shift_sopcde_mask 0x1f
-#define DSP32Shift_dontcare_bits 21
-#define DSP32Shift_dontcare_mask 0x3
-#define DSP32Shift_code2_bits 23
-#define DSP32Shift_code2_mask 0xf
-#define DSP32Shift_M_bits 27
-#define DSP32Shift_M_mask 0x1
-#define DSP32Shift_code_bits 28
-#define DSP32Shift_code_mask 0xf
-
-#define init_DSP32Shift \
-{ \
- DSP32Shift_opcode, \
- DSP32Shift_src1_bits, DSP32Shift_src1_mask, \
- DSP32Shift_src0_bits, DSP32Shift_src0_mask, \
- DSP32Shift_dst1_bits, DSP32Shift_dst1_mask, \
- DSP32Shift_dst0_bits, DSP32Shift_dst0_mask, \
- DSP32Shift_HLs_bits, DSP32Shift_HLs_mask, \
- DSP32Shift_sop_bits, DSP32Shift_sop_mask, \
- DSP32Shift_sopcde_bits, DSP32Shift_sopcde_mask, \
- DSP32Shift_dontcare_bits, DSP32Shift_dontcare_mask, \
- DSP32Shift_code2_bits, DSP32Shift_code2_mask, \
- DSP32Shift_M_bits, DSP32Shift_M_mask, \
- DSP32Shift_code_bits, DSP32Shift_code_mask \
-};
-
-/* dsp32shiftimm
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 1 | 1 | 0 | 0 |.M.| 1 | 1 | 0 | 1 | - | - |.sopcde............|
-|.sop...|.HLs...|.dst0......|.immag.................|.src1......|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned long opcode;
- int bits_src1;
- int mask_src1;
- int bits_immag;
- int mask_immag;
- int bits_dst0;
- int mask_dst0;
- int bits_HLs;
- int mask_HLs;
- int bits_sop;
- int mask_sop;
- int bits_sopcde;
- int mask_sopcde;
- int bits_dontcare;
- int mask_dontcare;
- int bits_code2;
- int mask_code2;
- int bits_M;
- int mask_M;
- int bits_code;
- int mask_code;
-} DSP32ShiftImm;
-
-#define DSP32ShiftImm_opcode 0xc6800000
-#define DSP32ShiftImm_src1_bits 0
-#define DSP32ShiftImm_src1_mask 0x7
-#define DSP32ShiftImm_immag_bits 3
-#define DSP32ShiftImm_immag_mask 0x3f
-#define DSP32ShiftImm_dst0_bits 9
-#define DSP32ShiftImm_dst0_mask 0x7
-#define DSP32ShiftImm_HLs_bits 12
-#define DSP32ShiftImm_HLs_mask 0x3
-#define DSP32ShiftImm_sop_bits 14
-#define DSP32ShiftImm_sop_mask 0x3
-#define DSP32ShiftImm_sopcde_bits 16
-#define DSP32ShiftImm_sopcde_mask 0x1f
-#define DSP32ShiftImm_dontcare_bits 21
-#define DSP32ShiftImm_dontcare_mask 0x3
-#define DSP32ShiftImm_code2_bits 23
-#define DSP32ShiftImm_code2_mask 0xf
-#define DSP32ShiftImm_M_bits 27
-#define DSP32ShiftImm_M_mask 0x1
-#define DSP32ShiftImm_code_bits 28
-#define DSP32ShiftImm_code_mask 0xf
-
-#define init_DSP32ShiftImm \
-{ \
- DSP32ShiftImm_opcode, \
- DSP32ShiftImm_src1_bits, DSP32ShiftImm_src1_mask, \
- DSP32ShiftImm_immag_bits, DSP32ShiftImm_immag_mask, \
- DSP32ShiftImm_dst0_bits, DSP32ShiftImm_dst0_mask, \
- DSP32ShiftImm_HLs_bits, DSP32ShiftImm_HLs_mask, \
- DSP32ShiftImm_sop_bits, DSP32ShiftImm_sop_mask, \
- DSP32ShiftImm_sopcde_bits, DSP32ShiftImm_sopcde_mask, \
- DSP32ShiftImm_dontcare_bits, DSP32ShiftImm_dontcare_mask, \
- DSP32ShiftImm_code2_bits, DSP32ShiftImm_code2_mask, \
- DSP32ShiftImm_M_bits, DSP32ShiftImm_M_mask, \
- DSP32ShiftImm_code_bits, DSP32ShiftImm_code_mask \
-};
-
-/* LOAD / STORE */
-
-/* LDSTidxI
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 1 | 1 | 1 | 0 | 0 | 1 |.W.|.Z.|.sz....|.ptr.......|.reg.......|
-|.offset........................................................|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned long opcode;
- int bits_offset;
- int mask_offset;
- int bits_reg;
- int mask_reg;
- int bits_ptr;
- int mask_ptr;
- int bits_sz;
- int mask_sz;
- int bits_Z;
- int mask_Z;
- int bits_W;
- int mask_W;
- int bits_code;
- int mask_code;
-} LDSTidxI;
-
-#define LDSTidxI_opcode 0xe4000000
-#define LDSTidxI_offset_bits 0
-#define LDSTidxI_offset_mask 0xffff
-#define LDSTidxI_reg_bits 16
-#define LDSTidxI_reg_mask 0x7
-#define LDSTidxI_ptr_bits 19
-#define LDSTidxI_ptr_mask 0x7
-#define LDSTidxI_sz_bits 22
-#define LDSTidxI_sz_mask 0x3
-#define LDSTidxI_Z_bits 24
-#define LDSTidxI_Z_mask 0x1
-#define LDSTidxI_W_bits 25
-#define LDSTidxI_W_mask 0x1
-#define LDSTidxI_code_bits 26
-#define LDSTidxI_code_mask 0x3f
-
-#define init_LDSTidxI \
-{ \
- LDSTidxI_opcode, \
- LDSTidxI_offset_bits, LDSTidxI_offset_mask, \
- LDSTidxI_reg_bits, LDSTidxI_reg_mask, \
- LDSTidxI_ptr_bits, LDSTidxI_ptr_mask, \
- LDSTidxI_sz_bits, LDSTidxI_sz_mask, \
- LDSTidxI_Z_bits, LDSTidxI_Z_mask, \
- LDSTidxI_W_bits, LDSTidxI_W_mask, \
- LDSTidxI_code_bits, LDSTidxI_code_mask \
-};
-
-
-/* LDST
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 1 | 0 | 0 | 1 |.sz....|.W.|.aop...|.Z.|.ptr.......|.reg.......|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned short opcode;
- int bits_reg;
- int mask_reg;
- int bits_ptr;
- int mask_ptr;
- int bits_Z;
- int mask_Z;
- int bits_aop;
- int mask_aop;
- int bits_W;
- int mask_W;
- int bits_sz;
- int mask_sz;
- int bits_code;
- int mask_code;
-} LDST;
-
-#define LDST_opcode 0x9000
-#define LDST_reg_bits 0
-#define LDST_reg_mask 0x7
-#define LDST_ptr_bits 3
-#define LDST_ptr_mask 0x7
-#define LDST_Z_bits 6
-#define LDST_Z_mask 0x1
-#define LDST_aop_bits 7
-#define LDST_aop_mask 0x3
-#define LDST_W_bits 9
-#define LDST_W_mask 0x1
-#define LDST_sz_bits 10
-#define LDST_sz_mask 0x3
-#define LDST_code_bits 12
-#define LDST_code_mask 0xf
-
-#define init_LDST \
-{ \
- LDST_opcode, \
- LDST_reg_bits, LDST_reg_mask, \
- LDST_ptr_bits, LDST_ptr_mask, \
- LDST_Z_bits, LDST_Z_mask, \
- LDST_aop_bits, LDST_aop_mask, \
- LDST_W_bits, LDST_W_mask, \
- LDST_sz_bits, LDST_sz_mask, \
- LDST_code_bits, LDST_code_mask \
-};
-
-/* LDSTii
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 1 | 0 | 1 |.W.|.op....|.offset........|.ptr.......|.reg.......|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned short opcode;
- int bits_reg;
- int mask_reg;
- int bits_ptr;
- int mask_ptr;
- int bits_offset;
- int mask_offset;
- int bits_op;
- int mask_op;
- int bits_W;
- int mask_W;
- int bits_code;
- int mask_code;
-} LDSTii;
-
-#define LDSTii_opcode 0xa000
-#define LDSTii_reg_bit 0
-#define LDSTii_reg_mask 0x7
-#define LDSTii_ptr_bit 3
-#define LDSTii_ptr_mask 0x7
-#define LDSTii_offset_bit 6
-#define LDSTii_offset_mask 0xf
-#define LDSTii_op_bit 10
-#define LDSTii_op_mask 0x3
-#define LDSTii_W_bit 12
-#define LDSTii_W_mask 0x1
-#define LDSTii_code_bit 13
-#define LDSTii_code_mask 0x7
-
-#define init_LDSTii \
-{ \
- LDSTii_opcode, \
- LDSTii_reg_bit, LDSTii_reg_mask, \
- LDSTii_ptr_bit, LDSTii_ptr_mask, \
- LDSTii_offset_bit, LDSTii_offset_mask, \
- LDSTii_op_bit, LDSTii_op_mask, \
- LDSTii_W_bit, LDSTii_W_mask, \
- LDSTii_code_bit, LDSTii_code_mask \
-};
-
-
-/* LDSTiiFP
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 1 | 0 | 1 | 1 | 1 | 0 |.W.|.offset............|.reg...........|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned short opcode;
- int bits_reg;
- int mask_reg;
- int bits_offset;
- int mask_offset;
- int bits_W;
- int mask_W;
- int bits_code;
- int mask_code;
-} LDSTiiFP;
-
-#define LDSTiiFP_opcode 0xb800
-#define LDSTiiFP_reg_bits 0
-#define LDSTiiFP_reg_mask 0xf
-#define LDSTiiFP_offset_bits 4
-#define LDSTiiFP_offset_mask 0x1f
-#define LDSTiiFP_W_bits 9
-#define LDSTiiFP_W_mask 0x1
-#define LDSTiiFP_code_bits 10
-#define LDSTiiFP_code_mask 0x3f
-
-#define init_LDSTiiFP \
-{ \
- LDSTiiFP_opcode, \
- LDSTiiFP_reg_bits, LDSTiiFP_reg_mask, \
- LDSTiiFP_offset_bits, LDSTiiFP_offset_mask, \
- LDSTiiFP_W_bits, LDSTiiFP_W_mask, \
- LDSTiiFP_code_bits, LDSTiiFP_code_mask \
-};
-
-/* dspLDST
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 1 | 0 | 0 | 1 | 1 | 1 |.W.|.aop...|.m.....|.i.....|.reg.......|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned short opcode;
- int bits_reg;
- int mask_reg;
- int bits_i;
- int mask_i;
- int bits_m;
- int mask_m;
- int bits_aop;
- int mask_aop;
- int bits_W;
- int mask_W;
- int bits_code;
- int mask_code;
-} DspLDST;
-
-#define DspLDST_opcode 0x9c00
-#define DspLDST_reg_bits 0
-#define DspLDST_reg_mask 0x7
-#define DspLDST_i_bits 3
-#define DspLDST_i_mask 0x3
-#define DspLDST_m_bits 5
-#define DspLDST_m_mask 0x3
-#define DspLDST_aop_bits 7
-#define DspLDST_aop_mask 0x3
-#define DspLDST_W_bits 9
-#define DspLDST_W_mask 0x1
-#define DspLDST_code_bits 10
-#define DspLDST_code_mask 0x3f
-
-#define init_DspLDST \
-{ \
- DspLDST_opcode, \
- DspLDST_reg_bits, DspLDST_reg_mask, \
- DspLDST_i_bits, DspLDST_i_mask, \
- DspLDST_m_bits, DspLDST_m_mask, \
- DspLDST_aop_bits, DspLDST_aop_mask, \
- DspLDST_W_bits, DspLDST_W_mask, \
- DspLDST_code_bits, DspLDST_code_mask \
-};
-
-
-/* LDSTpmod
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 1 | 0 | 0 | 0 |.W.|.aop...|.reg.......|.idx.......|.ptr.......|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned short opcode;
- int bits_ptr;
- int mask_ptr;
- int bits_idx;
- int mask_idx;
- int bits_reg;
- int mask_reg;
- int bits_aop;
- int mask_aop;
- int bits_W;
- int mask_W;
- int bits_code;
- int mask_code;
-} LDSTpmod;
-
-#define LDSTpmod_opcode 0x8000
-#define LDSTpmod_ptr_bits 0
-#define LDSTpmod_ptr_mask 0x7
-#define LDSTpmod_idx_bits 3
-#define LDSTpmod_idx_mask 0x7
-#define LDSTpmod_reg_bits 6
-#define LDSTpmod_reg_mask 0x7
-#define LDSTpmod_aop_bits 9
-#define LDSTpmod_aop_mask 0x3
-#define LDSTpmod_W_bits 11
-#define LDSTpmod_W_mask 0x1
-#define LDSTpmod_code_bits 12
-#define LDSTpmod_code_mask 0xf
-
-#define init_LDSTpmod \
-{ \
- LDSTpmod_opcode, \
- LDSTpmod_ptr_bits, LDSTpmod_ptr_mask, \
- LDSTpmod_idx_bits, LDSTpmod_idx_mask, \
- LDSTpmod_reg_bits, LDSTpmod_reg_mask, \
- LDSTpmod_aop_bits, LDSTpmod_aop_mask, \
- LDSTpmod_W_bits, LDSTpmod_W_mask, \
- LDSTpmod_code_bits, LDSTpmod_code_mask \
-};
-
-
-/* LOGI2op
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 0 | 1 | 0 | 0 | 1 |.opc.......|.src...............|.dst.......|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned short opcode;
- int bits_dst;
- int mask_dst;
- int bits_src;
- int mask_src;
- int bits_opc;
- int mask_opc;
- int bits_code;
- int mask_code;
-} LOGI2op;
-
-#define LOGI2op_opcode 0x4800
-#define LOGI2op_dst_bits 0
-#define LOGI2op_dst_mask 0x7
-#define LOGI2op_src_bits 3
-#define LOGI2op_src_mask 0x1f
-#define LOGI2op_opc_bits 8
-#define LOGI2op_opc_mask 0x7
-#define LOGI2op_code_bits 11
-#define LOGI2op_code_mask 0x1f
-
-#define init_LOGI2op \
-{ \
- LOGI2op_opcode, \
- LOGI2op_dst_bits, LOGI2op_dst_mask, \
- LOGI2op_src_bits, LOGI2op_src_mask, \
- LOGI2op_opc_bits, LOGI2op_opc_mask, \
- LOGI2op_code_bits, LOGI2op_code_mask \
-};
-
-
-/* ALU2op
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 0 | 1 | 0 | 0 | 0 | 0 |.opc...........|.src.......|.dst.......|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned short opcode;
- int bits_dst;
- int mask_dst;
- int bits_src;
- int mask_src;
- int bits_opc;
- int mask_opc;
- int bits_code;
- int mask_code;
-} ALU2op;
-
-#define ALU2op_opcode 0x4000
-#define ALU2op_dst_bits 0
-#define ALU2op_dst_mask 0x7
-#define ALU2op_src_bits 3
-#define ALU2op_src_mask 0x7
-#define ALU2op_opc_bits 6
-#define ALU2op_opc_mask 0xf
-#define ALU2op_code_bits 10
-#define ALU2op_code_mask 0x3f
-
-#define init_ALU2op \
-{ \
- ALU2op_opcode, \
- ALU2op_dst_bits, ALU2op_dst_mask, \
- ALU2op_src_bits, ALU2op_src_mask, \
- ALU2op_opc_bits, ALU2op_opc_mask, \
- ALU2op_code_bits, ALU2op_code_mask \
-};
-
-
-/* BRCC
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 0 | 0 | 0 | 1 |.T.|.B.|.offset................................|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned short opcode;
- int bits_offset;
- int mask_offset;
- int bits_B;
- int mask_B;
- int bits_T;
- int mask_T;
- int bits_code;
- int mask_code;
-} BRCC;
-
-#define BRCC_opcode 0x1000
-#define BRCC_offset_bits 0
-#define BRCC_offset_mask 0x3ff
-#define BRCC_B_bits 10
-#define BRCC_B_mask 0x1
-#define BRCC_T_bits 11
-#define BRCC_T_mask 0x1
-#define BRCC_code_bits 12
-#define BRCC_code_mask 0xf
-
-#define init_BRCC \
-{ \
- BRCC_opcode, \
- BRCC_offset_bits, BRCC_offset_mask, \
- BRCC_B_bits, BRCC_B_mask, \
- BRCC_T_bits, BRCC_T_mask, \
- BRCC_code_bits, BRCC_code_mask \
-};
-
-
-/* UJUMP
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 0 | 0 | 1 | 0 |.offset........................................|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned short opcode;
- int bits_offset;
- int mask_offset;
- int bits_code;
- int mask_code;
-} UJump;
-
-#define UJump_opcode 0x2000
-#define UJump_offset_bits 0
-#define UJump_offset_mask 0xfff
-#define UJump_code_bits 12
-#define UJump_code_mask 0xf
-
-#define init_UJump \
-{ \
- UJump_opcode, \
- UJump_offset_bits, UJump_offset_mask, \
- UJump_code_bits, UJump_code_mask \
-};
-
-
-/* ProgCtrl
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |.prgfunc.......|.poprnd........|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned short opcode;
- int bits_poprnd;
- int mask_poprnd;
- int bits_prgfunc;
- int mask_prgfunc;
- int bits_code;
- int mask_code;
-} ProgCtrl;
-
-#define ProgCtrl_opcode 0x0000
-#define ProgCtrl_poprnd_bits 0
-#define ProgCtrl_poprnd_mask 0xf
-#define ProgCtrl_prgfunc_bits 4
-#define ProgCtrl_prgfunc_mask 0xf
-#define ProgCtrl_code_bits 8
-#define ProgCtrl_code_mask 0xff
-
-#define init_ProgCtrl \
-{ \
- ProgCtrl_opcode, \
- ProgCtrl_poprnd_bits, ProgCtrl_poprnd_mask, \
- ProgCtrl_prgfunc_bits, ProgCtrl_prgfunc_mask, \
- ProgCtrl_code_bits, ProgCtrl_code_mask \
-};
-
-/* CALLa
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 1 | 1 | 1 | 0 | 0 | 0 | 1 |.S.|.msw...........................|
-|.lsw...........................................................|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-
-typedef struct
-{
- unsigned long opcode;
- int bits_addr;
- int mask_addr;
- int bits_S;
- int mask_S;
- int bits_code;
- int mask_code;
-} CALLa;
-
-#define CALLa_opcode 0xe2000000
-#define CALLa_addr_bits 0
-#define CALLa_addr_mask 0xffffff
-#define CALLa_S_bits 24
-#define CALLa_S_mask 0x1
-#define CALLa_code_bits 25
-#define CALLa_code_mask 0x7f
-
-#define init_CALLa \
-{ \
- CALLa_opcode, \
- CALLa_addr_bits, CALLa_addr_mask, \
- CALLa_S_bits, CALLa_S_mask, \
- CALLa_code_bits, CALLa_code_mask \
-};
-
-
-/* pseudoDEBUG
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 |.fn....|.grp.......|.reg.......|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned short opcode;
- int bits_reg;
- int mask_reg;
- int bits_grp;
- int mask_grp;
- int bits_fn;
- int mask_fn;
- int bits_code;
- int mask_code;
-} PseudoDbg;
-
-#define PseudoDbg_opcode 0xf800
-#define PseudoDbg_reg_bits 0
-#define PseudoDbg_reg_mask 0x7
-#define PseudoDbg_grp_bits 3
-#define PseudoDbg_grp_mask 0x7
-#define PseudoDbg_fn_bits 6
-#define PseudoDbg_fn_mask 0x3
-#define PseudoDbg_code_bits 8
-#define PseudoDbg_code_mask 0xff
-
-#define init_PseudoDbg \
-{ \
- PseudoDbg_opcode, \
- PseudoDbg_reg_bits, PseudoDbg_reg_mask, \
- PseudoDbg_grp_bits, PseudoDbg_grp_mask, \
- PseudoDbg_fn_bits, PseudoDbg_fn_mask, \
- PseudoDbg_code_bits, PseudoDbg_code_mask \
-};
-
-/* PseudoDbg_assert
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 1 | 1 | 1 | 1 | 0 | - | - | - | - | - |.dbgop.....|.regtest...|
-|.expected......................................................|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned long opcode;
- int bits_expected;
- int mask_expected;
- int bits_regtest;
- int mask_regtest;
- int bits_dbgop;
- int mask_dbgop;
- int bits_dontcare;
- int mask_dontcare;
- int bits_code;
- int mask_code;
-} PseudoDbg_Assert;
-
-#define PseudoDbg_Assert_opcode 0xf0000000
-#define PseudoDbg_Assert_expected_bits 0
-#define PseudoDbg_Assert_expected_mask 0xffff
-#define PseudoDbg_Assert_regtest_bits 16
-#define PseudoDbg_Assert_regtest_mask 0x7
-#define PseudoDbg_Assert_dbgop_bits 19
-#define PseudoDbg_Assert_dbgop_mask 0x7
-#define PseudoDbg_Assert_dontcare_bits 22
-#define PseudoDbg_Assert_dontcare_mask 0x1f
-#define PseudoDbg_Assert_code_bits 27
-#define PseudoDbg_Assert_code_mask 0x1f
-
-#define init_PseudoDbg_Assert \
-{ \
- PseudoDbg_Assert_opcode, \
- PseudoDbg_Assert_expected_bits, PseudoDbg_Assert_expected_mask, \
- PseudoDbg_Assert_regtest_bits, PseudoDbg_Assert_regtest_mask, \
- PseudoDbg_Assert_dbgop_bits, PseudoDbg_Assert_dbgop_mask, \
- PseudoDbg_Assert_dontcare_bits, PseudoDbg_Assert_dontcare_mask, \
- PseudoDbg_Assert_code_bits, PseudoDbg_Assert_code_mask \
-};
-
-/* CaCTRL
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |.a.|.op....|.reg.......|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned short opcode;
- int bits_reg;
- int mask_reg;
- int bits_op;
- int mask_op;
- int bits_a;
- int mask_a;
- int bits_code;
- int mask_code;
-} CaCTRL;
-
-#define CaCTRL_opcode 0x0240
-#define CaCTRL_reg_bits 0
-#define CaCTRL_reg_mask 0x7
-#define CaCTRL_op_bits 3
-#define CaCTRL_op_mask 0x3
-#define CaCTRL_a_bits 5
-#define CaCTRL_a_mask 0x1
-#define CaCTRL_code_bits 6
-#define CaCTRL_code_mask 0x3fff
-
-#define init_CaCTRL \
-{ \
- CaCTRL_opcode, \
- CaCTRL_reg_bits, CaCTRL_reg_mask, \
- CaCTRL_op_bits, CaCTRL_op_mask, \
- CaCTRL_a_bits, CaCTRL_a_mask, \
- CaCTRL_code_bits, CaCTRL_code_mask \
-};
-
-/* PushPopMultiple
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 0 | 0 | 0 | 0 | 0 | 1 | 0 |.d.|.p.|.W.|.dr........|.pr........|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned short opcode;
- int bits_pr;
- int mask_pr;
- int bits_dr;
- int mask_dr;
- int bits_W;
- int mask_W;
- int bits_p;
- int mask_p;
- int bits_d;
- int mask_d;
- int bits_code;
- int mask_code;
-} PushPopMultiple;
-
-#define PushPopMultiple_opcode 0x0400
-#define PushPopMultiple_pr_bits 0
-#define PushPopMultiple_pr_mask 0x7
-#define PushPopMultiple_dr_bits 3
-#define PushPopMultiple_dr_mask 0x7
-#define PushPopMultiple_W_bits 6
-#define PushPopMultiple_W_mask 0x1
-#define PushPopMultiple_p_bits 7
-#define PushPopMultiple_p_mask 0x1
-#define PushPopMultiple_d_bits 8
-#define PushPopMultiple_d_mask 0x1
-#define PushPopMultiple_code_bits 8
-#define PushPopMultiple_code_mask 0x1
-
-#define init_PushPopMultiple \
-{ \
- PushPopMultiple_opcode, \
- PushPopMultiple_pr_bits, PushPopMultiple_pr_mask, \
- PushPopMultiple_dr_bits, PushPopMultiple_dr_mask, \
- PushPopMultiple_W_bits, PushPopMultiple_W_mask, \
- PushPopMultiple_p_bits, PushPopMultiple_p_mask, \
- PushPopMultiple_d_bits, PushPopMultiple_d_mask, \
- PushPopMultiple_code_bits, PushPopMultiple_code_mask \
-};
-
-/* PushPopReg
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |.W.|.grp.......|.reg.......|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned short opcode;
- int bits_reg;
- int mask_reg;
- int bits_grp;
- int mask_grp;
- int bits_W;
- int mask_W;
- int bits_code;
- int mask_code;
-} PushPopReg;
-
-#define PushPopReg_opcode 0x0100
-#define PushPopReg_reg_bits 0
-#define PushPopReg_reg_mask 0x7
-#define PushPopReg_grp_bits 3
-#define PushPopReg_grp_mask 0x7
-#define PushPopReg_W_bits 6
-#define PushPopReg_W_mask 0x1
-#define PushPopReg_code_bits 7
-#define PushPopReg_code_mask 0x1ff
-
-#define init_PushPopReg \
-{ \
- PushPopReg_opcode, \
- PushPopReg_reg_bits, PushPopReg_reg_mask, \
- PushPopReg_grp_bits, PushPopReg_grp_mask, \
- PushPopReg_W_bits, PushPopReg_W_mask, \
- PushPopReg_code_bits, PushPopReg_code_mask, \
-};
-
-/* linkage
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |.R.|
-|.framesize.....................................................|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned long opcode;
- int bits_framesize;
- int mask_framesize;
- int bits_R;
- int mask_R;
- int bits_code;
- int mask_code;
-} Linkage;
-
-#define Linkage_opcode 0xe8000000
-#define Linkage_framesize_bits 0
-#define Linkage_framesize_mask 0xffff
-#define Linkage_R_bits 16
-#define Linkage_R_mask 0x1
-#define Linkage_code_bits 17
-#define Linkage_code_mask 0x7fff
-
-#define init_Linkage \
-{ \
- Linkage_opcode, \
- Linkage_framesize_bits, Linkage_framesize_mask, \
- Linkage_R_bits, Linkage_R_mask, \
- Linkage_code_bits, Linkage_code_mask \
-};
-
-/* LoopSetup
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |.rop...|.c.|.soffset.......|
-|.reg...........| - | - |.eoffset...............................|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned long opcode;
- int bits_eoffset;
- int mask_eoffset;
- int bits_dontcare;
- int mask_dontcare;
- int bits_reg;
- int mask_reg;
- int bits_soffset;
- int mask_soffset;
- int bits_c;
- int mask_c;
- int bits_rop;
- int mask_rop;
- int bits_code;
- int mask_code;
-} LoopSetup;
-
-#define LoopSetup_opcode 0xe0800000
-#define LoopSetup_eoffset_bits 0
-#define LoopSetup_eoffset_mask 0x3ff
-#define LoopSetup_dontcare_bits 10
-#define LoopSetup_dontcare_mask 0x3
-#define LoopSetup_reg_bits 12
-#define LoopSetup_reg_mask 0xf
-#define LoopSetup_soffset_bits 16
-#define LoopSetup_soffset_mask 0xf
-#define LoopSetup_c_bits 20
-#define LoopSetup_c_mask 0x1
-#define LoopSetup_rop_bits 21
-#define LoopSetup_rop_mask 0x3
-#define LoopSetup_code_bits 23
-#define LoopSetup_code_mask 0x1ff
-
-#define init_LoopSetup \
-{ \
- LoopSetup_opcode, \
- LoopSetup_eoffset_bits, LoopSetup_eoffset_mask, \
- LoopSetup_dontcare_bits, LoopSetup_dontcare_mask, \
- LoopSetup_reg_bits, LoopSetup_reg_mask, \
- LoopSetup_soffset_bits, LoopSetup_soffset_mask, \
- LoopSetup_c_bits, LoopSetup_c_mask, \
- LoopSetup_rop_bits, LoopSetup_rop_mask, \
- LoopSetup_code_bits, LoopSetup_code_mask \
-};
-
-/* LDIMMhalf
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 |.Z.|.H.|.S.|.grp...|.reg.......|
-|.hword.........................................................|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned long opcode;
- int bits_hword;
- int mask_hword;
- int bits_reg;
- int mask_reg;
- int bits_grp;
- int mask_grp;
- int bits_S;
- int mask_S;
- int bits_H;
- int mask_H;
- int bits_Z;
- int mask_Z;
- int bits_code;
- int mask_code;
-} LDIMMhalf;
-
-#define LDIMMhalf_opcode 0xe1000000
-#define LDIMMhalf_hword_bits 0
-#define LDIMMhalf_hword_mask 0xffff
-#define LDIMMhalf_reg_bits 16
-#define LDIMMhalf_reg_mask 0x7
-#define LDIMMhalf_grp_bits 19
-#define LDIMMhalf_grp_mask 0x3
-#define LDIMMhalf_S_bits 21
-#define LDIMMhalf_S_mask 0x1
-#define LDIMMhalf_H_bits 22
-#define LDIMMhalf_H_mask 0x1
-#define LDIMMhalf_Z_bits 23
-#define LDIMMhalf_Z_mask 0x1
-#define LDIMMhalf_code_bits 24
-#define LDIMMhalf_code_mask 0xff
-
-#define init_LDIMMhalf \
-{ \
- LDIMMhalf_opcode, \
- LDIMMhalf_hword_bits, LDIMMhalf_hword_mask, \
- LDIMMhalf_reg_bits, LDIMMhalf_reg_mask, \
- LDIMMhalf_grp_bits, LDIMMhalf_grp_mask, \
- LDIMMhalf_S_bits, LDIMMhalf_S_mask, \
- LDIMMhalf_H_bits, LDIMMhalf_H_mask, \
- LDIMMhalf_Z_bits, LDIMMhalf_Z_mask, \
- LDIMMhalf_code_bits, LDIMMhalf_code_mask \
-};
-
-
-/* CC2dreg
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |.op....|.reg.......|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned short opcode;
- int bits_reg;
- int mask_reg;
- int bits_op;
- int mask_op;
- int bits_code;
- int mask_code;
-} CC2dreg;
-
-#define CC2dreg_opcode 0x0200
-#define CC2dreg_reg_bits 0
-#define CC2dreg_reg_mask 0x7
-#define CC2dreg_op_bits 3
-#define CC2dreg_op_mask 0x3
-#define CC2dreg_code_bits 5
-#define CC2dreg_code_mask 0x7fff
-
-#define init_CC2dreg \
-{ \
- CC2dreg_opcode, \
- CC2dreg_reg_bits, CC2dreg_reg_mask, \
- CC2dreg_op_bits, CC2dreg_op_mask, \
- CC2dreg_code_bits, CC2dreg_code_mask \
-};
-
-
-/* PTR2op
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 0 | 1 | 0 | 0 | 0 | 1 | 0 |.opc.......|.src.......|.dst.......|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned short opcode;
- int bits_dst;
- int mask_dst;
- int bits_src;
- int mask_src;
- int bits_opc;
- int mask_opc;
- int bits_code;
- int mask_code;
-} PTR2op;
-
-#define PTR2op_opcode 0x4400
-#define PTR2op_dst_bits 0
-#define PTR2op_dst_mask 0x7
-#define PTR2op_src_bits 3
-#define PTR2op_src_mask 0x7
-#define PTR2op_opc_bits 6
-#define PTR2op_opc_mask 0x7
-#define PTR2op_code_bits 9
-#define PTR2op_code_mask 0x7f
-
-#define init_PTR2op \
-{ \
- PTR2op_opcode, \
- PTR2op_dst_bits, PTR2op_dst_mask, \
- PTR2op_src_bits, PTR2op_src_mask, \
- PTR2op_opc_bits, PTR2op_opc_mask, \
- PTR2op_code_bits, PTR2op_code_mask \
-};
-
-
-/* COMP3op
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 0 | 1 | 0 | 1 |.opc.......|.dst.......|.src1......|.src0......|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned short opcode;
- int bits_src0;
- int mask_src0;
- int bits_src1;
- int mask_src1;
- int bits_dst;
- int mask_dst;
- int bits_opc;
- int mask_opc;
- int bits_code;
- int mask_code;
-} COMP3op;
-
-#define COMP3op_opcode 0x5000
-#define COMP3op_src0_bits 0
-#define COMP3op_src0_mask 0x7
-#define COMP3op_src1_bits 3
-#define COMP3op_src1_mask 0x7
-#define COMP3op_dst_bits 6
-#define COMP3op_dst_mask 0x7
-#define COMP3op_opc_bits 9
-#define COMP3op_opc_mask 0x7
-#define COMP3op_code_bits 12
-#define COMP3op_code_mask 0xf
-
-#define init_COMP3op \
-{ \
- COMP3op_opcode, \
- COMP3op_src0_bits, COMP3op_src0_mask, \
- COMP3op_src1_bits, COMP3op_src1_mask, \
- COMP3op_dst_bits, COMP3op_dst_mask, \
- COMP3op_opc_bits, COMP3op_opc_mask, \
- COMP3op_code_bits, COMP3op_code_mask \
-};
-
-/* ccMV
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 0 | 0 | 0 | 0 | 0 | 1 | 1 |.T.|.d.|.s.|.dst.......|.src.......|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned short opcode;
- int bits_src;
- int mask_src;
- int bits_dst;
- int mask_dst;
- int bits_s;
- int mask_s;
- int bits_d;
- int mask_d;
- int bits_T;
- int mask_T;
- int bits_code;
- int mask_code;
-} CCmv;
-
-#define CCmv_opcode 0x0600
-#define CCmv_src_bits 0
-#define CCmv_src_mask 0x7
-#define CCmv_dst_bits 3
-#define CCmv_dst_mask 0x7
-#define CCmv_s_bits 6
-#define CCmv_s_mask 0x1
-#define CCmv_d_bits 7
-#define CCmv_d_mask 0x1
-#define CCmv_T_bits 8
-#define CCmv_T_mask 0x1
-#define CCmv_code_bits 9
-#define CCmv_code_mask 0x7f
-
-#define init_CCmv \
-{ \
- CCmv_opcode, \
- CCmv_src_bits, CCmv_src_mask, \
- CCmv_dst_bits, CCmv_dst_mask, \
- CCmv_s_bits, CCmv_s_mask, \
- CCmv_d_bits, CCmv_d_mask, \
- CCmv_T_bits, CCmv_T_mask, \
- CCmv_code_bits, CCmv_code_mask \
-};
-
-
-/* CCflag
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 0 | 0 | 0 | 0 | 1 |.I.|.opc.......|.G.|.y.........|.x.........|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned short opcode;
- int bits_x;
- int mask_x;
- int bits_y;
- int mask_y;
- int bits_G;
- int mask_G;
- int bits_opc;
- int mask_opc;
- int bits_I;
- int mask_I;
- int bits_code;
- int mask_code;
-} CCflag;
-
-#define CCflag_opcode 0x0800
-#define CCflag_x_bits 0
-#define CCflag_x_mask 0x7
-#define CCflag_y_bits 3
-#define CCflag_y_mask 0x7
-#define CCflag_G_bits 6
-#define CCflag_G_mask 0x1
-#define CCflag_opc_bits 7
-#define CCflag_opc_mask 0x7
-#define CCflag_I_bits 10
-#define CCflag_I_mask 0x1
-#define CCflag_code_bits 11
-#define CCflag_code_mask 0x1f
-
-#define init_CCflag \
-{ \
- CCflag_opcode, \
- CCflag_x_bits, CCflag_x_mask, \
- CCflag_y_bits, CCflag_y_mask, \
- CCflag_G_bits, CCflag_G_mask, \
- CCflag_opc_bits, CCflag_opc_mask, \
- CCflag_I_bits, CCflag_I_mask, \
- CCflag_code_bits, CCflag_code_mask, \
-};
-
-
-/* CC2stat
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 |.D.|.op....|.cbit..............|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned short opcode;
- int bits_cbit;
- int mask_cbit;
- int bits_op;
- int mask_op;
- int bits_D;
- int mask_D;
- int bits_code;
- int mask_code;
-} CC2stat;
-
-#define CC2stat_opcode 0x0300
-#define CC2stat_cbit_bits 0
-#define CC2stat_cbit_mask 0x1f
-#define CC2stat_op_bits 5
-#define CC2stat_op_mask 0x3
-#define CC2stat_D_bits 7
-#define CC2stat_D_mask 0x1
-#define CC2stat_code_bits 8
-#define CC2stat_code_mask 0xff
-
-#define init_CC2stat \
-{ \
- CC2stat_opcode, \
- CC2stat_cbit_bits, CC2stat_cbit_mask, \
- CC2stat_op_bits, CC2stat_op_mask, \
- CC2stat_D_bits, CC2stat_D_mask, \
- CC2stat_code_bits, CC2stat_code_mask \
-};
-
-
-/* REGMV
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 0 | 0 | 1 | 1 |.gd........|.gs........|.dst.......|.src.......|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned short opcode;
- int bits_src;
- int mask_src;
- int bits_dst;
- int mask_dst;
- int bits_gs;
- int mask_gs;
- int bits_gd;
- int mask_gd;
- int bits_code;
- int mask_code;
-} RegMv;
-
-#define RegMv_opcode 0x3000
-#define RegMv_src_bits 0
-#define RegMv_src_mask 0x7
-#define RegMv_dst_bits 3
-#define RegMv_dst_mask 0x7
-#define RegMv_gs_bits 6
-#define RegMv_gs_mask 0x7
-#define RegMv_gd_bits 9
-#define RegMv_gd_mask 0x7
-#define RegMv_code_bits 12
-#define RegMv_code_mask 0xf
-
-#define init_RegMv \
-{ \
- RegMv_opcode, \
- RegMv_src_bits, RegMv_src_mask, \
- RegMv_dst_bits, RegMv_dst_mask, \
- RegMv_gs_bits, RegMv_gs_mask, \
- RegMv_gd_bits, RegMv_gd_mask, \
- RegMv_code_bits, RegMv_code_mask \
-};
-
-
-/* COMPI2opD
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 0 | 1 | 1 | 0 | 0 |.op|.isrc......................|.dst.......|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned short opcode;
- int bits_dst;
- int mask_dst;
- int bits_src;
- int mask_src;
- int bits_op;
- int mask_op;
- int bits_code;
- int mask_code;
-} COMPI2opD;
-
-#define COMPI2opD_opcode 0x6000
-#define COMPI2opD_dst_bits 0
-#define COMPI2opD_dst_mask 0x7
-#define COMPI2opD_src_bits 3
-#define COMPI2opD_src_mask 0x7f
-#define COMPI2opD_op_bits 10
-#define COMPI2opD_op_mask 0x1
-#define COMPI2opD_code_bits 11
-#define COMPI2opD_code_mask 0x1f
-
-#define init_COMPI2opD \
-{ \
- COMPI2opD_opcode, \
- COMPI2opD_dst_bits, COMPI2opD_dst_mask, \
- COMPI2opD_src_bits, COMPI2opD_src_mask, \
- COMPI2opD_op_bits, COMPI2opD_op_mask, \
- COMPI2opD_code_bits, COMPI2opD_code_mask \
-};
-
-/* COMPI2opP
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 0 | 1 | 1 | 0 | 1 |.op|.src.......................|.dst.......|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef COMPI2opD COMPI2opP;
-
-#define COMPI2opP_opcode 0x6800
-#define COMPI2opP_dst_bits 0
-#define COMPI2opP_dst_mask 0x7
-#define COMPI2opP_src_bits 3
-#define COMPI2opP_src_mask 0x7f
-#define COMPI2opP_op_bits 10
-#define COMPI2opP_op_mask 0x1
-#define COMPI2opP_code_bits 11
-#define COMPI2opP_code_mask 0x1f
-
-#define init_COMPI2opP \
-{ \
- COMPI2opP_opcode, \
- COMPI2opP_dst_bits, COMPI2opP_dst_mask, \
- COMPI2opP_src_bits, COMPI2opP_src_mask, \
- COMPI2opP_op_bits, COMPI2opP_op_mask, \
- COMPI2opP_code_bits, COMPI2opP_code_mask \
-};
-
-
-/* dagMODim
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 1 | 0 | 0 | 1 | 1 | 1 | 1 | 0 |.br| 1 | 1 |.op|.m.....|.i.....|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned short opcode;
- int bits_i;
- int mask_i;
- int bits_m;
- int mask_m;
- int bits_op;
- int mask_op;
- int bits_code2;
- int mask_code2;
- int bits_br;
- int mask_br;
- int bits_code;
- int mask_code;
-} DagMODim;
-
-#define DagMODim_opcode 0x9e60
-#define DagMODim_i_bits 0
-#define DagMODim_i_mask 0x3
-#define DagMODim_m_bits 2
-#define DagMODim_m_mask 0x3
-#define DagMODim_op_bits 4
-#define DagMODim_op_mask 0x1
-#define DagMODim_code2_bits 5
-#define DagMODim_code2_mask 0x3
-#define DagMODim_br_bits 7
-#define DagMODim_br_mask 0x1
-#define DagMODim_code_bits 8
-#define DagMODim_code_mask 0xff
-
-#define init_DagMODim \
-{ \
- DagMODim_opcode, \
- DagMODim_i_bits, DagMODim_i_mask, \
- DagMODim_m_bits, DagMODim_m_mask, \
- DagMODim_op_bits, DagMODim_op_mask, \
- DagMODim_code2_bits, DagMODim_code2_mask, \
- DagMODim_br_bits, DagMODim_br_mask, \
- DagMODim_code_bits, DagMODim_code_mask \
-};
-
-/* dagMODik
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-| 1 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 0 |.op....|.i.....|
-+---+---+---+---|---+---+---+---|---+---+---+---|---+---+---+---+
-*/
-
-typedef struct
-{
- unsigned short opcode;
- int bits_i;
- int mask_i;
- int bits_op;
- int mask_op;
- int bits_code;
- int mask_code;
-} DagMODik;
-
-#define DagMODik_opcode 0x9f60
-#define DagMODik_i_bits 0
-#define DagMODik_i_mask 0x3
-#define DagMODik_op_bits 2
-#define DagMODik_op_mask 0x3
-#define DagMODik_code_bits 3
-#define DagMODik_code_mask 0xfff
-
-#define init_DagMODik \
-{ \
- DagMODik_opcode, \
- DagMODik_i_bits, DagMODik_i_mask, \
- DagMODik_op_bits, DagMODik_op_mask, \
- DagMODik_code_bits, DagMODik_code_mask \
-};
diff --git a/include/opcode/cgen-bitset.h b/include/opcode/cgen-bitset.h
deleted file mode 100644
index 1b6fbe3..0000000
--- a/include/opcode/cgen-bitset.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Header file the type CGEN_BITSET.
-
-Copyright 2002, 2005 Free Software Foundation, Inc.
-
-This file is part of GDB, the GNU debugger, and the GNU Binutils.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#ifndef CGEN_BITSET_H
-#define CGEN_BITSET_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* A bitmask represented as a string.
- Each member of the set is represented as a bit
- in the string. Bytes are indexed from left to right in the string and
- bits from most significant to least within each byte.
-
- For example, the bit representing member number 6 is (set->bits[0] & 0x02).
-*/
-typedef struct cgen_bitset
-{
- unsigned length;
- char *bits;
-} CGEN_BITSET;
-
-extern CGEN_BITSET *cgen_bitset_create PARAMS ((unsigned));
-extern void cgen_bitset_init PARAMS ((CGEN_BITSET *, unsigned));
-extern void cgen_bitset_clear PARAMS ((CGEN_BITSET *));
-extern void cgen_bitset_add PARAMS ((CGEN_BITSET *, unsigned));
-extern void cgen_bitset_set PARAMS ((CGEN_BITSET *, unsigned));
-extern int cgen_bitset_compare PARAMS ((CGEN_BITSET *, CGEN_BITSET *));
-extern void cgen_bitset_union PARAMS ((CGEN_BITSET *, CGEN_BITSET *, CGEN_BITSET *));
-extern int cgen_bitset_intersect_p PARAMS ((CGEN_BITSET *, CGEN_BITSET *));
-extern int cgen_bitset_contains PARAMS ((CGEN_BITSET *, unsigned));
-extern CGEN_BITSET *cgen_bitset_copy PARAMS ((CGEN_BITSET *));
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif
diff --git a/include/opcode/cgen.h b/include/opcode/cgen.h
deleted file mode 100644
index e8fd5d3..0000000
--- a/include/opcode/cgen.h
+++ /dev/null
@@ -1,1473 +0,0 @@
-/* Header file for targets using CGEN: Cpu tools GENerator.
-
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
-Free Software Foundation, Inc.
-
-This file is part of GDB, the GNU debugger, and the GNU Binutils.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef CGEN_H
-#define CGEN_H
-
-#include "symcat.h"
-#include "cgen-bitset.h"
-/* ??? This file requires bfd.h but only to get bfd_vma.
- Seems like an awful lot to require just to get such a fundamental type.
- Perhaps the definition of bfd_vma can be moved outside of bfd.h.
- Or perhaps one could duplicate its definition in another file.
- Until such time, this file conditionally compiles definitions that require
- bfd_vma using __BFD_H_SEEN__. */
-
-/* Enums must be defined before they can be used.
- Allow them to be used in struct definitions, even though the enum must
- be defined elsewhere.
- If CGEN_ARCH isn't defined, this file is being included by something other
- than <arch>-desc.h. */
-
-/* Prepend the arch name, defined in <arch>-desc.h, and _cgen_ to symbol S.
- The lack of spaces in the arg list is important for non-stdc systems.
- This file is included by <arch>-desc.h.
- It can be included independently of <arch>-desc.h, in which case the arch
- dependent portions will be declared as "unknown_cgen_foo". */
-
-#ifndef CGEN_SYM
-#define CGEN_SYM(s) CONCAT3 (unknown,_cgen_,s)
-#endif
-
-/* This file contains the static (unchanging) pieces and as much other stuff
- as we can reasonably put here. It's generally cleaner to put stuff here
- rather than having it machine generated if possible. */
-
-/* The assembler syntax is made up of expressions (duh...).
- At the lowest level the values are mnemonics, register names, numbers, etc.
- Above that are subexpressions, if any (an example might be the
- "effective address" in m68k cpus). Subexpressions are wip.
- At the second highest level are the insns themselves. Above that are
- pseudo-insns, synthetic insns, and macros, if any. */
-
-/* Lots of cpu's have a fixed insn size, or one which rarely changes,
- and it's generally easier to handle these by treating the insn as an
- integer type, rather than an array of characters. So we allow targets
- to control this. When an integer type the value is in host byte order,
- when an array of characters the value is in target byte order. */
-
-typedef unsigned int CGEN_INSN_INT;
-#if CGEN_INT_INSN_P
-typedef CGEN_INSN_INT CGEN_INSN_BYTES;
-typedef CGEN_INSN_INT *CGEN_INSN_BYTES_PTR;
-#else
-typedef unsigned char *CGEN_INSN_BYTES;
-typedef unsigned char *CGEN_INSN_BYTES_PTR;
-#endif
-
-#ifdef __GNUC__
-#define CGEN_INLINE __inline__
-#else
-#define CGEN_INLINE
-#endif
-
-enum cgen_endian
-{
- CGEN_ENDIAN_UNKNOWN,
- CGEN_ENDIAN_LITTLE,
- CGEN_ENDIAN_BIG
-};
-
-/* Forward decl. */
-
-typedef struct cgen_insn CGEN_INSN;
-
-/* Opaque pointer version for use by external world. */
-
-typedef struct cgen_cpu_desc *CGEN_CPU_DESC;
-
-/* Attributes.
- Attributes are used to describe various random things associated with
- an object (ifield, hardware, operand, insn, whatever) and are specified
- as name/value pairs.
- Integer attributes computed at compile time are currently all that's
- supported, though adding string attributes and run-time computation is
- straightforward. Integer attribute values are always host int's
- (signed or unsigned). For portability, this means 32 bits.
- Integer attributes are further categorized as boolean, bitset, integer,
- and enum types. Boolean attributes appear frequently enough that they're
- recorded in one host int. This limits the maximum number of boolean
- attributes to 32, though that's a *lot* of attributes. */
-
-/* Type of attribute values. */
-
-typedef CGEN_BITSET CGEN_ATTR_VALUE_BITSET_TYPE;
-typedef int CGEN_ATTR_VALUE_ENUM_TYPE;
-typedef union
-{
- CGEN_ATTR_VALUE_BITSET_TYPE bitset;
- CGEN_ATTR_VALUE_ENUM_TYPE nonbitset;
-} CGEN_ATTR_VALUE_TYPE;
-
-/* Struct to record attribute information. */
-
-typedef struct
-{
- /* Boolean attributes. */
- unsigned int bool;
- /* Non-boolean integer attributes. */
- CGEN_ATTR_VALUE_TYPE nonbool[1];
-} CGEN_ATTR;
-
-/* Define a structure member for attributes with N non-boolean entries.
- There is no maximum number of non-boolean attributes.
- There is a maximum of 32 boolean attributes (since they are all recorded
- in one host int). */
-
-#define CGEN_ATTR_TYPE(n) \
-struct { unsigned int bool; \
- CGEN_ATTR_VALUE_TYPE nonbool[(n) ? (n) : 1]; }
-
-/* Return the boolean attributes. */
-
-#define CGEN_ATTR_BOOLS(a) ((a)->bool)
-
-/* Non-boolean attribute numbers are offset by this much. */
-
-#define CGEN_ATTR_NBOOL_OFFSET 32
-
-/* Given a boolean attribute number, return its mask. */
-
-#define CGEN_ATTR_MASK(attr) (1 << (attr))
-
-/* Return the value of boolean attribute ATTR in ATTRS. */
-
-#define CGEN_BOOL_ATTR(attrs, attr) ((CGEN_ATTR_MASK (attr) & (attrs)) != 0)
-
-/* Return value of attribute ATTR in ATTR_TABLE for OBJ.
- OBJ is a pointer to the entity that has the attributes
- (??? not used at present but is reserved for future purposes - eventually
- the goal is to allow recording attributes in source form and computing
- them lazily at runtime, not sure of the details yet). */
-
-#define CGEN_ATTR_VALUE(obj, attr_table, attr) \
-((unsigned int) (attr) < CGEN_ATTR_NBOOL_OFFSET \
- ? ((CGEN_ATTR_BOOLS (attr_table) & CGEN_ATTR_MASK (attr)) != 0) \
- : ((attr_table)->nonbool[(attr) - CGEN_ATTR_NBOOL_OFFSET].nonbitset))
-#define CGEN_BITSET_ATTR_VALUE(obj, attr_table, attr) \
- ((attr_table)->nonbool[(attr) - CGEN_ATTR_NBOOL_OFFSET].bitset)
-
-/* Attribute name/value tables.
- These are used to assist parsing of descriptions at run-time. */
-
-typedef struct
-{
- const char * name;
- unsigned value;
-} CGEN_ATTR_ENTRY;
-
-/* For each domain (ifld,hw,operand,insn), list of attributes. */
-
-typedef struct
-{
- const char * name;
- const CGEN_ATTR_ENTRY * dfault;
- const CGEN_ATTR_ENTRY * vals;
-} CGEN_ATTR_TABLE;
-
-/* Instruction set variants. */
-
-typedef struct {
- const char *name;
-
- /* Default instruction size (in bits).
- This is used by the assembler when it encounters an unknown insn. */
- unsigned int default_insn_bitsize;
-
- /* Base instruction size (in bits).
- For non-LIW cpus this is generally the length of the smallest insn.
- For LIW cpus its wip (work-in-progress). For the m32r its 32. */
- unsigned int base_insn_bitsize;
-
- /* Minimum/maximum instruction size (in bits). */
- unsigned int min_insn_bitsize;
- unsigned int max_insn_bitsize;
-} CGEN_ISA;
-
-/* Machine variants. */
-
-typedef struct {
- const char *name;
- /* The argument to bfd_arch_info->scan. */
- const char *bfd_name;
- /* one of enum mach_attr */
- int num;
- /* parameter from mach->cpu */
- unsigned int insn_chunk_bitsize;
-} CGEN_MACH;
-
-/* Parse result (also extraction result).
-
- The result of parsing an insn is stored here.
- To generate the actual insn, this is passed to the insert handler.
- When printing an insn, the result of extraction is stored here.
- To print the insn, this is passed to the print handler.
-
- It is machine generated so we don't define it here,
- but we do need a forward decl for the handler fns.
-
- There is one member for each possible field in the insn.
- The type depends on the field.
- Also recorded here is the computed length of the insn for architectures
- where it varies.
-*/
-
-typedef struct cgen_fields CGEN_FIELDS;
-
-/* Total length of the insn, as recorded in the `fields' struct. */
-/* ??? The field insert handler has lots of opportunities for optimization
- if it ever gets inlined. On architectures where insns all have the same
- size, may wish to detect that and make this macro a constant - to allow
- further optimizations. */
-
-#define CGEN_FIELDS_BITSIZE(fields) ((fields)->length)
-
-/* Extraction support for variable length insn sets. */
-
-/* When disassembling we don't know the number of bytes to read at the start.
- So the first CGEN_BASE_INSN_SIZE bytes are read at the start and the rest
- are read when needed. This struct controls this. It is basically the
- disassemble_info stuff, except that we provide a cache for values already
- read (since bytes can typically be read several times to fetch multiple
- operands that may be in them), and that extraction of fields is needed
- in contexts other than disassembly. */
-
-typedef struct {
- /* A pointer to the disassemble_info struct.
- We don't require dis-asm.h so we use void * for the type here.
- If NULL, BYTES is full of valid data (VALID == -1). */
- void *dis_info;
- /* Points to a working buffer of sufficient size. */
- unsigned char *insn_bytes;
- /* Mask of bytes that are valid in INSN_BYTES. */
- unsigned int valid;
-} CGEN_EXTRACT_INFO;
-
-/* Associated with each insn or expression is a set of "handlers" for
- performing operations like parsing, printing, etc. These require a bfd_vma
- value to be passed around but we don't want all applications to need bfd.h.
- So this stuff is only provided if bfd.h has been included. */
-
-/* Parse handler.
- CD is a cpu table descriptor.
- INSN is a pointer to a struct describing the insn being parsed.
- STRP is a pointer to a pointer to the text being parsed.
- FIELDS is a pointer to a cgen_fields struct in which the results are placed.
- If the expression is successfully parsed, *STRP is updated.
- If not it is left alone.
- The result is NULL if success or an error message. */
-typedef const char * (cgen_parse_fn)
- (CGEN_CPU_DESC, const CGEN_INSN *insn_,
- const char **strp_, CGEN_FIELDS *fields_);
-
-/* Insert handler.
- CD is a cpu table descriptor.
- INSN is a pointer to a struct describing the insn being parsed.
- FIELDS is a pointer to a cgen_fields struct from which the values
- are fetched.
- INSNP is a pointer to a buffer in which to place the insn.
- PC is the pc value of the insn.
- The result is an error message or NULL if success. */
-
-#ifdef __BFD_H_SEEN__
-typedef const char * (cgen_insert_fn)
- (CGEN_CPU_DESC, const CGEN_INSN *insn_,
- CGEN_FIELDS *fields_, CGEN_INSN_BYTES_PTR insnp_,
- bfd_vma pc_);
-#else
-typedef const char * (cgen_insert_fn) ();
-#endif
-
-/* Extract handler.
- CD is a cpu table descriptor.
- INSN is a pointer to a struct describing the insn being parsed.
- The second argument is a pointer to a struct controlling extraction
- (only used for variable length insns).
- EX_INFO is a pointer to a struct for controlling reading of further
- bytes for the insn.
- BASE_INSN is the first CGEN_BASE_INSN_SIZE bytes (host order).
- FIELDS is a pointer to a cgen_fields struct in which the results are placed.
- PC is the pc value of the insn.
- The result is the length of the insn in bits or zero if not recognized. */
-
-#ifdef __BFD_H_SEEN__
-typedef int (cgen_extract_fn)
- (CGEN_CPU_DESC, const CGEN_INSN *insn_,
- CGEN_EXTRACT_INFO *ex_info_, CGEN_INSN_INT base_insn_,
- CGEN_FIELDS *fields_, bfd_vma pc_);
-#else
-typedef int (cgen_extract_fn) ();
-#endif
-
-/* Print handler.
- CD is a cpu table descriptor.
- INFO is a pointer to the disassembly info.
- Eg: disassemble_info. It's defined as `PTR' so this file can be included
- without dis-asm.h.
- INSN is a pointer to a struct describing the insn being printed.
- FIELDS is a pointer to a cgen_fields struct.
- PC is the pc value of the insn.
- LEN is the length of the insn, in bits. */
-
-#ifdef __BFD_H_SEEN__
-typedef void (cgen_print_fn)
- (CGEN_CPU_DESC, void * info_, const CGEN_INSN *insn_,
- CGEN_FIELDS *fields_, bfd_vma pc_, int len_);
-#else
-typedef void (cgen_print_fn) ();
-#endif
-
-/* Parse/insert/extract/print handlers.
-
- Indices into the handler tables.
- We could use pointers here instead, but 90% of them are generally identical
- and that's a lot of redundant data. Making these unsigned char indices
- into tables of pointers saves a bit of space.
- Using indices also keeps assembler code out of the disassembler and
- vice versa. */
-
-struct cgen_opcode_handler
-{
- unsigned char parse, insert, extract, print;
-};
-
-/* Assembler interface.
-
- The interface to the assembler is intended to be clean in the sense that
- libopcodes.a is a standalone entity and could be used with any assembler.
- Not that one would necessarily want to do that but rather that it helps
- keep a clean interface. The interface will obviously be slanted towards
- GAS, but at least it's a start.
- ??? Note that one possible user of the assembler besides GAS is GDB.
-
- Parsing is controlled by the assembler which calls
- CGEN_SYM (assemble_insn). If it can parse and build the entire insn
- it doesn't call back to the assembler. If it needs/wants to call back
- to the assembler, cgen_parse_operand_fn is called which can either
-
- - return a number to be inserted in the insn
- - return a "register" value to be inserted
- (the register might not be a register per pe)
- - queue the argument and return a marker saying the expression has been
- queued (eg: a fix-up)
- - return an error message indicating the expression wasn't recognizable
-
- The result is an error message or NULL for success.
- The parsed value is stored in the bfd_vma *. */
-
-/* Values for indicating what the caller wants. */
-
-enum cgen_parse_operand_type
-{
- CGEN_PARSE_OPERAND_INIT,
- CGEN_PARSE_OPERAND_INTEGER,
- CGEN_PARSE_OPERAND_ADDRESS,
- CGEN_PARSE_OPERAND_SYMBOLIC
-};
-
-/* Values for indicating what was parsed. */
-
-enum cgen_parse_operand_result
-{
- CGEN_PARSE_OPERAND_RESULT_NUMBER,
- CGEN_PARSE_OPERAND_RESULT_REGISTER,
- CGEN_PARSE_OPERAND_RESULT_QUEUED,
- CGEN_PARSE_OPERAND_RESULT_ERROR
-};
-
-#ifdef __BFD_H_SEEN__ /* Don't require bfd.h unnecessarily. */
-typedef const char * (cgen_parse_operand_fn)
- (CGEN_CPU_DESC,
- enum cgen_parse_operand_type, const char **, int, int,
- enum cgen_parse_operand_result *, bfd_vma *);
-#else
-typedef const char * (cgen_parse_operand_fn) ();
-#endif
-
-/* Set the cgen_parse_operand_fn callback. */
-
-extern void cgen_set_parse_operand_fn
- (CGEN_CPU_DESC, cgen_parse_operand_fn);
-
-/* Called before trying to match a table entry with the insn. */
-
-extern void cgen_init_parse_operand (CGEN_CPU_DESC);
-
-/* Operand values (keywords, integers, symbols, etc.) */
-
-/* Types of assembler elements. */
-
-enum cgen_asm_type
-{
- CGEN_ASM_NONE, CGEN_ASM_KEYWORD, CGEN_ASM_MAX
-};
-
-#ifndef CGEN_ARCH
-enum cgen_hw_type { CGEN_HW_MAX };
-#endif
-
-/* List of hardware elements. */
-
-typedef struct
-{
- char *name;
- enum cgen_hw_type type;
- /* There is currently no example where both index specs and value specs
- are required, so for now both are clumped under "asm_data". */
- enum cgen_asm_type asm_type;
- void *asm_data;
-#ifndef CGEN_HW_NBOOL_ATTRS
-#define CGEN_HW_NBOOL_ATTRS 1
-#endif
- CGEN_ATTR_TYPE (CGEN_HW_NBOOL_ATTRS) attrs;
-#define CGEN_HW_ATTRS(hw) (&(hw)->attrs)
-} CGEN_HW_ENTRY;
-
-/* Return value of attribute ATTR in HW. */
-
-#define CGEN_HW_ATTR_VALUE(hw, attr) \
-CGEN_ATTR_VALUE ((hw), CGEN_HW_ATTRS (hw), (attr))
-
-/* Table of hardware elements for selected mach, computed at runtime.
- enum cgen_hw_type is an index into this table (specifically `entries'). */
-
-typedef struct {
- /* Pointer to null terminated table of all compiled in entries. */
- const CGEN_HW_ENTRY *init_entries;
- unsigned int entry_size; /* since the attribute member is variable sized */
- /* Array of all entries, initial and run-time added. */
- const CGEN_HW_ENTRY **entries;
- /* Number of elements in `entries'. */
- unsigned int num_entries;
- /* For now, xrealloc is called each time a new entry is added at runtime.
- ??? May wish to keep track of some slop to reduce the number of calls to
- xrealloc, except that there's unlikely to be many and not expected to be
- in speed critical code. */
-} CGEN_HW_TABLE;
-
-extern const CGEN_HW_ENTRY * cgen_hw_lookup_by_name
- (CGEN_CPU_DESC, const char *);
-extern const CGEN_HW_ENTRY * cgen_hw_lookup_by_num
- (CGEN_CPU_DESC, unsigned int);
-
-/* This struct is used to describe things like register names, etc. */
-
-typedef struct cgen_keyword_entry
-{
- /* Name (as in register name). */
- char * name;
-
- /* Value (as in register number).
- The value cannot be -1 as that is used to indicate "not found".
- IDEA: Have "FUNCTION" attribute? [function is called to fetch value]. */
- int value;
-
- /* Attributes.
- This should, but technically needn't, appear last. It is a variable sized
- array in that one architecture may have 1 nonbool attribute and another
- may have more. Having this last means the non-architecture specific code
- needn't care. The goal is to eventually record
- attributes in their raw form, evaluate them at run-time, and cache the
- values, so this worry will go away anyway. */
- /* ??? Moving this last should be done by treating keywords like insn lists
- and moving the `next' fields into a CGEN_KEYWORD_LIST struct. */
- /* FIXME: Not used yet. */
-#ifndef CGEN_KEYWORD_NBOOL_ATTRS
-#define CGEN_KEYWORD_NBOOL_ATTRS 1
-#endif
- CGEN_ATTR_TYPE (CGEN_KEYWORD_NBOOL_ATTRS) attrs;
-
- /* ??? Putting these here means compiled in entries can't be const.
- Not a really big deal, but something to consider. */
- /* Next name hash table entry. */
- struct cgen_keyword_entry *next_name;
- /* Next value hash table entry. */
- struct cgen_keyword_entry *next_value;
-} CGEN_KEYWORD_ENTRY;
-
-/* Top level struct for describing a set of related keywords
- (e.g. register names).
-
- This struct supports run-time entry of new values, and hashed lookups. */
-
-typedef struct cgen_keyword
-{
- /* Pointer to initial [compiled in] values. */
- CGEN_KEYWORD_ENTRY *init_entries;
-
- /* Number of entries in `init_entries'. */
- unsigned int num_init_entries;
-
- /* Hash table used for name lookup. */
- CGEN_KEYWORD_ENTRY **name_hash_table;
-
- /* Hash table used for value lookup. */
- CGEN_KEYWORD_ENTRY **value_hash_table;
-
- /* Number of entries in the hash_tables. */
- unsigned int hash_table_size;
-
- /* Pointer to null keyword "" entry if present. */
- const CGEN_KEYWORD_ENTRY *null_entry;
-
- /* String containing non-alphanumeric characters used
- in keywords.
- At present, the highest number of entries used is 1. */
- char nonalpha_chars[8];
-} CGEN_KEYWORD;
-
-/* Structure used for searching. */
-
-typedef struct
-{
- /* Table being searched. */
- const CGEN_KEYWORD *table;
-
- /* Specification of what is being searched for. */
- const char *spec;
-
- /* Current index in hash table. */
- unsigned int current_hash;
-
- /* Current element in current hash chain. */
- CGEN_KEYWORD_ENTRY *current_entry;
-} CGEN_KEYWORD_SEARCH;
-
-/* Lookup a keyword from its name. */
-
-const CGEN_KEYWORD_ENTRY *cgen_keyword_lookup_name
- (CGEN_KEYWORD *, const char *);
-
-/* Lookup a keyword from its value. */
-
-const CGEN_KEYWORD_ENTRY *cgen_keyword_lookup_value
- (CGEN_KEYWORD *, int);
-
-/* Add a keyword. */
-
-void cgen_keyword_add (CGEN_KEYWORD *, CGEN_KEYWORD_ENTRY *);
-
-/* Keyword searching.
- This can be used to retrieve every keyword, or a subset. */
-
-CGEN_KEYWORD_SEARCH cgen_keyword_search_init
- (CGEN_KEYWORD *, const char *);
-const CGEN_KEYWORD_ENTRY *cgen_keyword_search_next
- (CGEN_KEYWORD_SEARCH *);
-
-/* Operand value support routines. */
-
-extern const char *cgen_parse_keyword
- (CGEN_CPU_DESC, const char **, CGEN_KEYWORD *, long *);
-#ifdef __BFD_H_SEEN__ /* Don't require bfd.h unnecessarily. */
-extern const char *cgen_parse_signed_integer
- (CGEN_CPU_DESC, const char **, int, long *);
-extern const char *cgen_parse_unsigned_integer
- (CGEN_CPU_DESC, const char **, int, unsigned long *);
-extern const char *cgen_parse_address
- (CGEN_CPU_DESC, const char **, int, int,
- enum cgen_parse_operand_result *, bfd_vma *);
-extern const char *cgen_validate_signed_integer
- (long, long, long);
-extern const char *cgen_validate_unsigned_integer
- (unsigned long, unsigned long, unsigned long);
-#endif
-
-/* Operand modes. */
-
-/* ??? This duplicates the values in arch.h. Revisit.
- These however need the CGEN_ prefix [as does everything in this file]. */
-/* ??? Targets may need to add their own modes so we may wish to move this
- to <arch>-opc.h, or add a hook. */
-
-enum cgen_mode {
- CGEN_MODE_VOID, /* ??? rename simulator's VM to VOID? */
- CGEN_MODE_BI, CGEN_MODE_QI, CGEN_MODE_HI, CGEN_MODE_SI, CGEN_MODE_DI,
- CGEN_MODE_UBI, CGEN_MODE_UQI, CGEN_MODE_UHI, CGEN_MODE_USI, CGEN_MODE_UDI,
- CGEN_MODE_SF, CGEN_MODE_DF, CGEN_MODE_XF, CGEN_MODE_TF,
- CGEN_MODE_TARGET_MAX,
- CGEN_MODE_INT, CGEN_MODE_UINT,
- CGEN_MODE_MAX
-};
-
-/* FIXME: Until simulator is updated. */
-
-#define CGEN_MODE_VM CGEN_MODE_VOID
-
-/* Operands. */
-
-#ifndef CGEN_ARCH
-enum cgen_operand_type { CGEN_OPERAND_MAX };
-#endif
-
-/* "nil" indicator for the operand instance table */
-#define CGEN_OPERAND_NIL CGEN_OPERAND_MAX
-
-/* A tree of these structs represents the multi-ifield
- structure of an operand's hw-index value, if it exists. */
-
-struct cgen_ifld;
-
-typedef struct cgen_maybe_multi_ifield
-{
- int count; /* 0: indexed by single cgen_ifld (possibly null: dead entry);
- n: indexed by array of more cgen_maybe_multi_ifields. */
- union
- {
- const void *p;
- const struct cgen_maybe_multi_ifield * multi;
- const struct cgen_ifld * leaf;
- } val;
-}
-CGEN_MAYBE_MULTI_IFLD;
-
-/* This struct defines each entry in the operand table. */
-
-typedef struct
-{
- /* Name as it appears in the syntax string. */
- char *name;
-
- /* Operand type. */
- enum cgen_operand_type type;
-
- /* The hardware element associated with this operand. */
- enum cgen_hw_type hw_type;
-
- /* FIXME: We don't yet record ifield definitions, which we should.
- When we do it might make sense to delete start/length (since they will
- be duplicated in the ifield's definition) and replace them with a
- pointer to the ifield entry. */
-
- /* Bit position.
- This is just a hint, and may be unused in more complex operands.
- May be unused for a modifier. */
- unsigned char start;
-
- /* The number of bits in the operand.
- This is just a hint, and may be unused in more complex operands.
- May be unused for a modifier. */
- unsigned char length;
-
- /* The (possibly-multi) ifield used as an index for this operand, if it
- is indexed by a field at all. This substitutes / extends the start and
- length fields above, but unsure at this time whether they are used
- anywhere. */
- CGEN_MAYBE_MULTI_IFLD index_fields;
-#if 0 /* ??? Interesting idea but relocs tend to get too complicated,
- and ABI dependent, for simple table lookups to work. */
- /* Ideally this would be the internal (external?) reloc type. */
- int reloc_type;
-#endif
-
- /* Attributes.
- This should, but technically needn't, appear last. It is a variable sized
- array in that one architecture may have 1 nonbool attribute and another
- may have more. Having this last means the non-architecture specific code
- needn't care, now or tomorrow. The goal is to eventually record
- attributes in their raw form, evaluate them at run-time, and cache the
- values, so this worry will go away anyway. */
-#ifndef CGEN_OPERAND_NBOOL_ATTRS
-#define CGEN_OPERAND_NBOOL_ATTRS 1
-#endif
- CGEN_ATTR_TYPE (CGEN_OPERAND_NBOOL_ATTRS) attrs;
-#define CGEN_OPERAND_ATTRS(operand) (&(operand)->attrs)
-} CGEN_OPERAND;
-
-/* Return value of attribute ATTR in OPERAND. */
-
-#define CGEN_OPERAND_ATTR_VALUE(operand, attr) \
-CGEN_ATTR_VALUE ((operand), CGEN_OPERAND_ATTRS (operand), (attr))
-
-/* Table of operands for selected mach/isa, computed at runtime.
- enum cgen_operand_type is an index into this table (specifically
- `entries'). */
-
-typedef struct {
- /* Pointer to null terminated table of all compiled in entries. */
- const CGEN_OPERAND *init_entries;
- unsigned int entry_size; /* since the attribute member is variable sized */
- /* Array of all entries, initial and run-time added. */
- const CGEN_OPERAND **entries;
- /* Number of elements in `entries'. */
- unsigned int num_entries;
- /* For now, xrealloc is called each time a new entry is added at runtime.
- ??? May wish to keep track of some slop to reduce the number of calls to
- xrealloc, except that there's unlikely to be many and not expected to be
- in speed critical code. */
-} CGEN_OPERAND_TABLE;
-
-extern const CGEN_OPERAND * cgen_operand_lookup_by_name
- (CGEN_CPU_DESC, const char *);
-extern const CGEN_OPERAND * cgen_operand_lookup_by_num
- (CGEN_CPU_DESC, int);
-
-/* Instruction operand instances.
-
- For each instruction, a list of the hardware elements that are read and
- written are recorded. */
-
-/* The type of the instance. */
-
-enum cgen_opinst_type {
- /* End of table marker. */
- CGEN_OPINST_END = 0,
- CGEN_OPINST_INPUT, CGEN_OPINST_OUTPUT
-};
-
-typedef struct
-{
- /* Input or output indicator. */
- enum cgen_opinst_type type;
-
- /* Name of operand. */
- const char *name;
-
- /* The hardware element referenced. */
- enum cgen_hw_type hw_type;
-
- /* The mode in which the operand is being used. */
- enum cgen_mode mode;
-
- /* The operand table entry CGEN_OPERAND_NIL if there is none
- (i.e. an explicit hardware reference). */
- enum cgen_operand_type op_type;
-
- /* If `operand' is "nil", the index (e.g. into array of registers). */
- int index;
-
- /* Attributes.
- ??? This perhaps should be a real attribute struct but there's
- no current need, so we save a bit of space and just have a set of
- flags. The interface is such that this can easily be made attributes
- should it prove useful. */
- unsigned int attrs;
-#define CGEN_OPINST_ATTRS(opinst) ((opinst)->attrs)
-/* Return value of attribute ATTR in OPINST. */
-#define CGEN_OPINST_ATTR(opinst, attr) \
-((CGEN_OPINST_ATTRS (opinst) & (attr)) != 0)
-/* Operand is conditionally referenced (read/written). */
-#define CGEN_OPINST_COND_REF 1
-} CGEN_OPINST;
-
-/* Syntax string.
-
- Each insn format and subexpression has one of these.
-
- The syntax "string" consists of characters (n > 0 && n < 128), and operand
- values (n >= 128), and is terminated by 0. Operand values are 128 + index
- into the operand table. The operand table doesn't exist in C, per se, as
- the data is recorded in the parse/insert/extract/print switch statements. */
-
-/* This should be at least as large as necessary for any target. */
-#define CGEN_MAX_SYNTAX_ELEMENTS 48
-
-/* A target may know its own precise maximum. Assert that it falls below
- the above limit. */
-#ifdef CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS
-#if CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS > CGEN_MAX_SYNTAX_ELEMENTS
-#error "CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS too high - enlarge CGEN_MAX_SYNTAX_ELEMENTS"
-#endif
-#endif
-
-typedef unsigned short CGEN_SYNTAX_CHAR_TYPE;
-
-typedef struct
-{
- CGEN_SYNTAX_CHAR_TYPE syntax[CGEN_MAX_SYNTAX_ELEMENTS];
-} CGEN_SYNTAX;
-
-#define CGEN_SYNTAX_STRING(syn) (syn->syntax)
-#define CGEN_SYNTAX_CHAR_P(c) ((c) < 128)
-#define CGEN_SYNTAX_CHAR(c) ((unsigned char)c)
-#define CGEN_SYNTAX_FIELD(c) ((c) - 128)
-#define CGEN_SYNTAX_MAKE_FIELD(c) ((c) + 128)
-
-/* ??? I can't currently think of any case where the mnemonic doesn't come
- first [and if one ever doesn't building the hash tables will be tricky].
- However, we treat mnemonics as just another operand of the instruction.
- A value of 1 means "this is where the mnemonic appears". 1 isn't
- special other than it's a non-printable ASCII char. */
-
-#define CGEN_SYNTAX_MNEMONIC 1
-#define CGEN_SYNTAX_MNEMONIC_P(ch) ((ch) == CGEN_SYNTAX_MNEMONIC)
-
-/* Instruction fields.
-
- ??? We currently don't allow adding fields at run-time.
- Easy to fix when needed. */
-
-typedef struct cgen_ifld {
- /* Enum of ifield. */
- int num;
-#define CGEN_IFLD_NUM(f) ((f)->num)
-
- /* Name of the field, distinguishes it from all other fields. */
- const char *name;
-#define CGEN_IFLD_NAME(f) ((f)->name)
-
- /* Default offset, in bits, from the start of the insn to the word
- containing the field. */
- int word_offset;
-#define CGEN_IFLD_WORD_OFFSET(f) ((f)->word_offset)
-
- /* Default length of the word containing the field. */
- int word_size;
-#define CGEN_IFLD_WORD_SIZE(f) ((f)->word_size)
-
- /* Default starting bit number.
- Whether lsb=0 or msb=0 is determined by CGEN_INSN_LSB0_P. */
- int start;
-#define CGEN_IFLD_START(f) ((f)->start)
-
- /* Length of the field, in bits. */
- int length;
-#define CGEN_IFLD_LENGTH(f) ((f)->length)
-
-#ifndef CGEN_IFLD_NBOOL_ATTRS
-#define CGEN_IFLD_NBOOL_ATTRS 1
-#endif
- CGEN_ATTR_TYPE (CGEN_IFLD_NBOOL_ATTRS) attrs;
-#define CGEN_IFLD_ATTRS(f) (&(f)->attrs)
-} CGEN_IFLD;
-
-/* Return value of attribute ATTR in IFLD. */
-#define CGEN_IFLD_ATTR_VALUE(ifld, attr) \
-CGEN_ATTR_VALUE ((ifld), CGEN_IFLD_ATTRS (ifld), (attr))
-
-/* Instruction data. */
-
-/* Instruction formats.
-
- Instructions are grouped by format. Associated with an instruction is its
- format. Each insn's opcode table entry contains a format table entry.
- ??? There is usually very few formats compared with the number of insns,
- so one can reduce the size of the opcode table by recording the format table
- as a separate entity. Given that we currently don't, format table entries
- are also distinguished by their operands. This increases the size of the
- table, but reduces the number of tables. It's all minutiae anyway so it
- doesn't really matter [at this point in time].
-
- ??? Support for variable length ISA's is wip. */
-
-/* Accompanying each iformat description is a list of its fields. */
-
-typedef struct {
- const CGEN_IFLD *ifld;
-#define CGEN_IFMT_IFLD_IFLD(ii) ((ii)->ifld)
-} CGEN_IFMT_IFLD;
-
-/* This should be at least as large as necessary for any target. */
-#define CGEN_MAX_IFMT_OPERANDS 16
-
-/* A target may know its own precise maximum. Assert that it falls below
- the above limit. */
-#ifdef CGEN_ACTUAL_MAX_IFMT_OPERANDS
-#if CGEN_ACTUAL_MAX_IFMT_OPERANDS > CGEN_MAX_IFMT_OPERANDS
-#error "CGEN_ACTUAL_MAX_IFMT_OPERANDS too high - enlarge CGEN_MAX_IFMT_OPERANDS"
-#endif
-#endif
-
-
-typedef struct
-{
- /* Length that MASK and VALUE have been calculated to
- [VALUE is recorded elsewhere].
- Normally it is base_insn_bitsize. On [V]LIW architectures where the base
- insn size may be larger than the size of an insn, this field is less than
- base_insn_bitsize. */
- unsigned char mask_length;
-#define CGEN_IFMT_MASK_LENGTH(ifmt) ((ifmt)->mask_length)
-
- /* Total length of instruction, in bits. */
- unsigned char length;
-#define CGEN_IFMT_LENGTH(ifmt) ((ifmt)->length)
-
- /* Mask to apply to the first MASK_LENGTH bits.
- Each insn's value is stored with the insn.
- The first step in recognizing an insn for disassembly is
- (opcode & mask) == value. */
- CGEN_INSN_INT mask;
-#define CGEN_IFMT_MASK(ifmt) ((ifmt)->mask)
-
- /* Instruction fields.
- +1 for trailing NULL. */
- CGEN_IFMT_IFLD iflds[CGEN_MAX_IFMT_OPERANDS + 1];
-#define CGEN_IFMT_IFLDS(ifmt) ((ifmt)->iflds)
-} CGEN_IFMT;
-
-/* Instruction values. */
-
-typedef struct
-{
- /* The opcode portion of the base insn. */
- CGEN_INSN_INT base_value;
-
-#ifdef CGEN_MAX_EXTRA_OPCODE_OPERANDS
- /* Extra opcode values beyond base_value. */
- unsigned long ifield_values[CGEN_MAX_EXTRA_OPCODE_OPERANDS];
-#endif
-} CGEN_IVALUE;
-
-/* Instruction opcode table.
- This contains the syntax and format data of an instruction. */
-
-/* ??? Some ports already have an opcode table yet still need to use the rest
- of what cgen_insn has. Plus keeping the opcode data with the operand
- instance data can create a pretty big file. So we keep them separately.
- Not sure this is a good idea in the long run. */
-
-typedef struct
-{
- /* Indices into parse/insert/extract/print handler tables. */
- struct cgen_opcode_handler handlers;
-#define CGEN_OPCODE_HANDLERS(opc) (& (opc)->handlers)
-
- /* Syntax string. */
- CGEN_SYNTAX syntax;
-#define CGEN_OPCODE_SYNTAX(opc) (& (opc)->syntax)
-
- /* Format entry. */
- const CGEN_IFMT *format;
-#define CGEN_OPCODE_FORMAT(opc) ((opc)->format)
-#define CGEN_OPCODE_MASK_BITSIZE(opc) CGEN_IFMT_MASK_LENGTH (CGEN_OPCODE_FORMAT (opc))
-#define CGEN_OPCODE_BITSIZE(opc) CGEN_IFMT_LENGTH (CGEN_OPCODE_FORMAT (opc))
-#define CGEN_OPCODE_IFLDS(opc) CGEN_IFMT_IFLDS (CGEN_OPCODE_FORMAT (opc))
-
- /* Instruction opcode value. */
- CGEN_IVALUE value;
-#define CGEN_OPCODE_VALUE(opc) (& (opc)->value)
-#define CGEN_OPCODE_BASE_VALUE(opc) (CGEN_OPCODE_VALUE (opc)->base_value)
-#define CGEN_OPCODE_BASE_MASK(opc) CGEN_IFMT_MASK (CGEN_OPCODE_FORMAT (opc))
-} CGEN_OPCODE;
-
-/* Instruction attributes.
- This is made a published type as applications can cache a pointer to
- the attributes for speed. */
-
-#ifndef CGEN_INSN_NBOOL_ATTRS
-#define CGEN_INSN_NBOOL_ATTRS 1
-#endif
-typedef CGEN_ATTR_TYPE (CGEN_INSN_NBOOL_ATTRS) CGEN_INSN_ATTR_TYPE;
-
-/* Enum of architecture independent attributes. */
-
-#ifndef CGEN_ARCH
-/* ??? Numbers here are recorded in two places. */
-typedef enum cgen_insn_attr {
- CGEN_INSN_ALIAS = 0
-} CGEN_INSN_ATTR;
-#define CGEN_ATTR_CGEN_INSN_ALIAS_VALUE(attrs) ((attrs)->bool & (1 << CGEN_INSN_ALIAS))
-#endif
-
-/* This struct defines each entry in the instruction table. */
-
-typedef struct
-{
- /* Each real instruction is enumerated. */
- /* ??? This may go away in time. */
- int num;
-#define CGEN_INSN_NUM(insn) ((insn)->base->num)
-
- /* Name of entry (that distinguishes it from all other entries). */
- /* ??? If mnemonics have operands, try to print full mnemonic. */
- const char *name;
-#define CGEN_INSN_NAME(insn) ((insn)->base->name)
-
- /* Mnemonic. This is used when parsing and printing the insn.
- In the case of insns that have operands on the mnemonics, this is
- only the constant part. E.g. for conditional execution of an `add' insn,
- where the full mnemonic is addeq, addne, etc., and the condition is
- treated as an operand, this is only "add". */
- const char *mnemonic;
-#define CGEN_INSN_MNEMONIC(insn) ((insn)->base->mnemonic)
-
- /* Total length of instruction, in bits. */
- int bitsize;
-#define CGEN_INSN_BITSIZE(insn) ((insn)->base->bitsize)
-
-#if 0 /* ??? Disabled for now as there is a problem with embedded newlines
- and the table is already pretty big. Should perhaps be moved
- to a file of its own. */
- /* Semantics, as RTL. */
- /* ??? Plain text or bytecodes? */
- /* ??? Note that the operand instance table could be computed at run-time
- if we parse this and cache the results. Something to eventually do. */
- const char *rtx;
-#define CGEN_INSN_RTX(insn) ((insn)->base->rtx)
-#endif
-
- /* Attributes.
- This must appear last. It is a variable sized array in that one
- architecture may have 1 nonbool attribute and another may have more.
- Having this last means the non-architecture specific code needn't
- care. The goal is to eventually record attributes in their raw form,
- evaluate them at run-time, and cache the values, so this worry will go
- away anyway. */
- CGEN_INSN_ATTR_TYPE attrs;
-#define CGEN_INSN_ATTRS(insn) (&(insn)->base->attrs)
-/* Return value of attribute ATTR in INSN. */
-#define CGEN_INSN_ATTR_VALUE(insn, attr) \
-CGEN_ATTR_VALUE ((insn), CGEN_INSN_ATTRS (insn), (attr))
-#define CGEN_INSN_BITSET_ATTR_VALUE(insn, attr) \
- CGEN_BITSET_ATTR_VALUE ((insn), CGEN_INSN_ATTRS (insn), (attr))
-} CGEN_IBASE;
-
-/* Return non-zero if INSN is the "invalid" insn marker. */
-
-#define CGEN_INSN_INVALID_P(insn) (CGEN_INSN_MNEMONIC (insn) == 0)
-
-/* Main struct contain instruction information.
- BASE is always present, the rest is present only if asked for. */
-
-struct cgen_insn
-{
- /* ??? May be of use to put a type indicator here.
- Then this struct could different info for different classes of insns. */
- /* ??? A speedup can be had by moving `base' into this struct.
- Maybe later. */
- const CGEN_IBASE *base;
- const CGEN_OPCODE *opcode;
- const CGEN_OPINST *opinst;
-
- /* Regex to disambiguate overloaded opcodes */
- void *rx;
-#define CGEN_INSN_RX(insn) ((insn)->rx)
-#define CGEN_MAX_RX_ELEMENTS (CGEN_MAX_SYNTAX_ELEMENTS * 5)
-};
-
-/* Instruction lists.
- This is used for adding new entries and for creating the hash lists. */
-
-typedef struct cgen_insn_list
-{
- struct cgen_insn_list *next;
- const CGEN_INSN *insn;
-} CGEN_INSN_LIST;
-
-/* Table of instructions. */
-
-typedef struct
-{
- const CGEN_INSN *init_entries;
- unsigned int entry_size; /* since the attribute member is variable sized */
- unsigned int num_init_entries;
- CGEN_INSN_LIST *new_entries;
-} CGEN_INSN_TABLE;
-
-/* Return number of instructions. This includes any added at run-time. */
-
-extern int cgen_insn_count (CGEN_CPU_DESC);
-extern int cgen_macro_insn_count (CGEN_CPU_DESC);
-
-/* Macros to access the other insn elements not recorded in CGEN_IBASE. */
-
-/* Fetch INSN's operand instance table. */
-/* ??? Doesn't handle insns added at runtime. */
-#define CGEN_INSN_OPERANDS(insn) ((insn)->opinst)
-
-/* Return INSN's opcode table entry. */
-#define CGEN_INSN_OPCODE(insn) ((insn)->opcode)
-
-/* Return INSN's handler data. */
-#define CGEN_INSN_HANDLERS(insn) CGEN_OPCODE_HANDLERS (CGEN_INSN_OPCODE (insn))
-
-/* Return INSN's syntax. */
-#define CGEN_INSN_SYNTAX(insn) CGEN_OPCODE_SYNTAX (CGEN_INSN_OPCODE (insn))
-
-/* Return size of base mask in bits. */
-#define CGEN_INSN_MASK_BITSIZE(insn) \
- CGEN_OPCODE_MASK_BITSIZE (CGEN_INSN_OPCODE (insn))
-
-/* Return mask of base part of INSN. */
-#define CGEN_INSN_BASE_MASK(insn) \
- CGEN_OPCODE_BASE_MASK (CGEN_INSN_OPCODE (insn))
-
-/* Return value of base part of INSN. */
-#define CGEN_INSN_BASE_VALUE(insn) \
- CGEN_OPCODE_BASE_VALUE (CGEN_INSN_OPCODE (insn))
-
-/* Standard way to test whether INSN is supported by MACH.
- MACH is one of enum mach_attr.
- The "|1" is because the base mach is always selected. */
-#define CGEN_INSN_MACH_HAS_P(insn, mach) \
-((CGEN_INSN_ATTR_VALUE ((insn), CGEN_INSN_MACH) & ((1 << (mach)) | 1)) != 0)
-
-/* Macro instructions.
- Macro insns aren't real insns, they map to one or more real insns.
- E.g. An architecture's "nop" insn may actually be an "mv r0,r0" or
- some such.
-
- Macro insns can expand to nothing (e.g. a nop that is optimized away).
- This is useful in multi-insn macros that build a constant in a register.
- Of course this isn't the default behaviour and must be explicitly enabled.
-
- Assembly of macro-insns is relatively straightforward. Disassembly isn't.
- However, disassembly of at least some kinds of macro insns is important
- in order that the disassembled code preserve the readability of the original
- insn. What is attempted here is to disassemble all "simple" macro-insns,
- where "simple" is currently defined to mean "expands to one real insn".
-
- Simple macro-insns are handled specially. They are emitted as ALIAS's
- of real insns. This simplifies their handling since there's usually more
- of them than any other kind of macro-insn, and proper disassembly of them
- falls out for free. */
-
-/* For each macro-insn there may be multiple expansion possibilities,
- depending on the arguments. This structure is accessed via the `data'
- member of CGEN_INSN. */
-
-typedef struct cgen_minsn_expansion {
- /* Function to do the expansion.
- If the expansion fails (e.g. "no match") NULL is returned.
- Space for the expansion is obtained with malloc.
- It is up to the caller to free it. */
- const char * (* fn)
- (const struct cgen_minsn_expansion *,
- const char *, const char **, int *,
- CGEN_OPERAND **);
-#define CGEN_MIEXPN_FN(ex) ((ex)->fn)
-
- /* Instruction(s) the macro expands to.
- The format of STR is defined by FN.
- It is typically the assembly code of the real insn, but it could also be
- the original Scheme expression or a tokenized form of it (with FN being
- an appropriate interpreter). */
- const char * str;
-#define CGEN_MIEXPN_STR(ex) ((ex)->str)
-} CGEN_MINSN_EXPANSION;
-
-/* Normal expander.
- When supported, this function will convert the input string to another
- string and the parser will be invoked recursively. The output string
- may contain further macro invocations. */
-
-extern const char * cgen_expand_macro_insn
- (CGEN_CPU_DESC, const struct cgen_minsn_expansion *,
- const char *, const char **, int *, CGEN_OPERAND **);
-
-/* The assembler insn table is hashed based on some function of the mnemonic
- (the actually hashing done is up to the target, but we provide a few
- examples like the first letter or a function of the entire mnemonic). */
-
-extern CGEN_INSN_LIST * cgen_asm_lookup_insn
- (CGEN_CPU_DESC, const char *);
-#define CGEN_ASM_LOOKUP_INSN(cd, string) cgen_asm_lookup_insn ((cd), (string))
-#define CGEN_ASM_NEXT_INSN(insn) ((insn)->next)
-
-/* The disassembler insn table is hashed based on some function of machine
- instruction (the actually hashing done is up to the target). */
-
-extern CGEN_INSN_LIST * cgen_dis_lookup_insn
- (CGEN_CPU_DESC, const char *, CGEN_INSN_INT);
-/* FIXME: delete these two */
-#define CGEN_DIS_LOOKUP_INSN(cd, buf, value) cgen_dis_lookup_insn ((cd), (buf), (value))
-#define CGEN_DIS_NEXT_INSN(insn) ((insn)->next)
-
-/* The CPU description.
- A copy of this is created when the cpu table is "opened".
- All global state information is recorded here.
- Access macros are provided for "public" members. */
-
-typedef struct cgen_cpu_desc
-{
- /* Bitmap of selected machine(s) (a la BFD machine number). */
- int machs;
-
- /* Bitmap of selected isa(s). */
- CGEN_BITSET *isas;
-#define CGEN_CPU_ISAS(cd) ((cd)->isas)
-
- /* Current endian. */
- enum cgen_endian endian;
-#define CGEN_CPU_ENDIAN(cd) ((cd)->endian)
-
- /* Current insn endian. */
- enum cgen_endian insn_endian;
-#define CGEN_CPU_INSN_ENDIAN(cd) ((cd)->insn_endian)
-
- /* Word size (in bits). */
- /* ??? Or maybe maximum word size - might we ever need to allow a cpu table
- to be opened for both sparc32/sparc64?
- ??? Another alternative is to create a table of selected machs and
- lazily fetch the data from there. */
- unsigned int word_bitsize;
-
- /* Instruction chunk size (in bits), for purposes of endianness
- conversion. */
- unsigned int insn_chunk_bitsize;
-
- /* Indicator if sizes are unknown.
- This is used by default_insn_bitsize,base_insn_bitsize if there is a
- difference between the selected isa's. */
-#define CGEN_SIZE_UNKNOWN 65535
-
- /* Default instruction size (in bits).
- This is used by the assembler when it encounters an unknown insn. */
- unsigned int default_insn_bitsize;
-
- /* Base instruction size (in bits).
- For non-LIW cpus this is generally the length of the smallest insn.
- For LIW cpus its wip (work-in-progress). For the m32r its 32. */
- unsigned int base_insn_bitsize;
-
- /* Minimum/maximum instruction size (in bits). */
- unsigned int min_insn_bitsize;
- unsigned int max_insn_bitsize;
-
- /* Instruction set variants. */
- const CGEN_ISA *isa_table;
-
- /* Machine variants. */
- const CGEN_MACH *mach_table;
-
- /* Hardware elements. */
- CGEN_HW_TABLE hw_table;
-
- /* Instruction fields. */
- const CGEN_IFLD *ifld_table;
-
- /* Operands. */
- CGEN_OPERAND_TABLE operand_table;
-
- /* Main instruction table. */
- CGEN_INSN_TABLE insn_table;
-#define CGEN_CPU_INSN_TABLE(cd) (& (cd)->insn_table)
-
- /* Macro instructions are defined separately and are combined with real
- insns during hash table computation. */
- CGEN_INSN_TABLE macro_insn_table;
-
- /* Copy of CGEN_INT_INSN_P. */
- int int_insn_p;
-
- /* Called to rebuild the tables after something has changed. */
- void (*rebuild_tables) (CGEN_CPU_DESC);
-
- /* Operand parser callback. */
- cgen_parse_operand_fn * parse_operand_fn;
-
- /* Parse/insert/extract/print cover fns for operands. */
- const char * (*parse_operand)
- (CGEN_CPU_DESC, int opindex_, const char **, CGEN_FIELDS *fields_);
-#ifdef __BFD_H_SEEN__
- const char * (*insert_operand)
- (CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_,
- CGEN_INSN_BYTES_PTR, bfd_vma pc_);
- int (*extract_operand)
- (CGEN_CPU_DESC, int opindex_, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
- CGEN_FIELDS *fields_, bfd_vma pc_);
- void (*print_operand)
- (CGEN_CPU_DESC, int opindex_, void * info_, CGEN_FIELDS * fields_,
- void const *attrs_, bfd_vma pc_, int length_);
-#else
- const char * (*insert_operand) ();
- int (*extract_operand) ();
- void (*print_operand) ();
-#endif
-#define CGEN_CPU_PARSE_OPERAND(cd) ((cd)->parse_operand)
-#define CGEN_CPU_INSERT_OPERAND(cd) ((cd)->insert_operand)
-#define CGEN_CPU_EXTRACT_OPERAND(cd) ((cd)->extract_operand)
-#define CGEN_CPU_PRINT_OPERAND(cd) ((cd)->print_operand)
-
- /* Size of CGEN_FIELDS struct. */
- unsigned int sizeof_fields;
-#define CGEN_CPU_SIZEOF_FIELDS(cd) ((cd)->sizeof_fields)
-
- /* Set the bitsize field. */
- void (*set_fields_bitsize) (CGEN_FIELDS *fields_, int size_);
-#define CGEN_CPU_SET_FIELDS_BITSIZE(cd) ((cd)->set_fields_bitsize)
-
- /* CGEN_FIELDS accessors. */
- int (*get_int_operand)
- (CGEN_CPU_DESC, int opindex_, const CGEN_FIELDS *fields_);
- void (*set_int_operand)
- (CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_, int value_);
-#ifdef __BFD_H_SEEN__
- bfd_vma (*get_vma_operand)
- (CGEN_CPU_DESC, int opindex_, const CGEN_FIELDS *fields_);
- void (*set_vma_operand)
- (CGEN_CPU_DESC, int opindex_, CGEN_FIELDS *fields_, bfd_vma value_);
-#else
- long (*get_vma_operand) ();
- void (*set_vma_operand) ();
-#endif
-#define CGEN_CPU_GET_INT_OPERAND(cd) ((cd)->get_int_operand)
-#define CGEN_CPU_SET_INT_OPERAND(cd) ((cd)->set_int_operand)
-#define CGEN_CPU_GET_VMA_OPERAND(cd) ((cd)->get_vma_operand)
-#define CGEN_CPU_SET_VMA_OPERAND(cd) ((cd)->set_vma_operand)
-
- /* Instruction parse/insert/extract/print handlers. */
- /* FIXME: make these types uppercase. */
- cgen_parse_fn * const *parse_handlers;
- cgen_insert_fn * const *insert_handlers;
- cgen_extract_fn * const *extract_handlers;
- cgen_print_fn * const *print_handlers;
-#define CGEN_PARSE_FN(cd, insn) (cd->parse_handlers[(insn)->opcode->handlers.parse])
-#define CGEN_INSERT_FN(cd, insn) (cd->insert_handlers[(insn)->opcode->handlers.insert])
-#define CGEN_EXTRACT_FN(cd, insn) (cd->extract_handlers[(insn)->opcode->handlers.extract])
-#define CGEN_PRINT_FN(cd, insn) (cd->print_handlers[(insn)->opcode->handlers.print])
-
- /* Return non-zero if insn should be added to hash table. */
- int (* asm_hash_p) (const CGEN_INSN *);
-
- /* Assembler hash function. */
- unsigned int (* asm_hash) (const char *);
-
- /* Number of entries in assembler hash table. */
- unsigned int asm_hash_size;
-
- /* Return non-zero if insn should be added to hash table. */
- int (* dis_hash_p) (const CGEN_INSN *);
-
- /* Disassembler hash function. */
- unsigned int (* dis_hash) (const char *, CGEN_INSN_INT);
-
- /* Number of entries in disassembler hash table. */
- unsigned int dis_hash_size;
-
- /* Assembler instruction hash table. */
- CGEN_INSN_LIST **asm_hash_table;
- CGEN_INSN_LIST *asm_hash_table_entries;
-
- /* Disassembler instruction hash table. */
- CGEN_INSN_LIST **dis_hash_table;
- CGEN_INSN_LIST *dis_hash_table_entries;
-
- /* This field could be turned into a bitfield if room for other flags is needed. */
- unsigned int signed_overflow_ok_p;
-
-} CGEN_CPU_TABLE;
-
-/* wip */
-#ifndef CGEN_WORD_ENDIAN
-#define CGEN_WORD_ENDIAN(cd) CGEN_CPU_ENDIAN (cd)
-#endif
-#ifndef CGEN_INSN_WORD_ENDIAN
-#define CGEN_INSN_WORD_ENDIAN(cd) CGEN_CPU_INSN_ENDIAN (cd)
-#endif
-
-/* Prototypes of major functions. */
-/* FIXME: Move more CGEN_SYM-defined functions into CGEN_CPU_DESC.
- Not the init fns though, as that would drag in things that mightn't be
- used and might not even exist. */
-
-/* Argument types to cpu_open. */
-
-enum cgen_cpu_open_arg {
- CGEN_CPU_OPEN_END,
- /* Select instruction set(s), arg is bitmap or 0 meaning "unspecified". */
- CGEN_CPU_OPEN_ISAS,
- /* Select machine(s), arg is bitmap or 0 meaning "unspecified". */
- CGEN_CPU_OPEN_MACHS,
- /* Select machine, arg is mach's bfd name.
- Multiple machines can be specified by repeated use. */
- CGEN_CPU_OPEN_BFDMACH,
- /* Select endian, arg is CGEN_ENDIAN_*. */
- CGEN_CPU_OPEN_ENDIAN
-};
-
-/* Open a cpu descriptor table for use.
- ??? We only support ISO C stdargs here, not K&R.
- Laziness, plus experiment to see if anything requires K&R - eventually
- K&R will no longer be supported - e.g. GDB is currently trying this. */
-
-extern CGEN_CPU_DESC CGEN_SYM (cpu_open) (enum cgen_cpu_open_arg, ...);
-
-/* Cover fn to handle simple case. */
-
-extern CGEN_CPU_DESC CGEN_SYM (cpu_open_1)
- (const char *mach_name_, enum cgen_endian endian_);
-
-/* Close it. */
-
-extern void CGEN_SYM (cpu_close) (CGEN_CPU_DESC);
-
-/* Initialize the opcode table for use.
- Called by init_asm/init_dis. */
-
-extern void CGEN_SYM (init_opcode_table) (CGEN_CPU_DESC cd_);
-
-/* build the insn selection regex.
- called by init_opcode_table */
-
-extern char * CGEN_SYM(build_insn_regex) (CGEN_INSN *insn_);
-
-/* Initialize the ibld table for use.
- Called by init_asm/init_dis. */
-
-extern void CGEN_SYM (init_ibld_table) (CGEN_CPU_DESC cd_);
-
-/* Initialize an cpu table for assembler or disassembler use.
- These must be called immediately after cpu_open. */
-
-extern void CGEN_SYM (init_asm) (CGEN_CPU_DESC);
-extern void CGEN_SYM (init_dis) (CGEN_CPU_DESC);
-
-/* Initialize the operand instance table for use. */
-
-extern void CGEN_SYM (init_opinst_table) (CGEN_CPU_DESC cd_);
-
-/* Assemble an instruction. */
-
-extern const CGEN_INSN * CGEN_SYM (assemble_insn)
- (CGEN_CPU_DESC, const char *, CGEN_FIELDS *,
- CGEN_INSN_BYTES_PTR, char **);
-
-extern const CGEN_KEYWORD CGEN_SYM (operand_mach);
-extern int CGEN_SYM (get_mach) (const char *);
-
-/* Operand index computation. */
-extern const CGEN_INSN * cgen_lookup_insn
- (CGEN_CPU_DESC, const CGEN_INSN * insn_,
- CGEN_INSN_INT int_value_, unsigned char *bytes_value_,
- int length_, CGEN_FIELDS *fields_, int alias_p_);
-extern void cgen_get_insn_operands
- (CGEN_CPU_DESC, const CGEN_INSN * insn_,
- const CGEN_FIELDS *fields_, int *indices_);
-extern const CGEN_INSN * cgen_lookup_get_insn_operands
- (CGEN_CPU_DESC, const CGEN_INSN *insn_,
- CGEN_INSN_INT int_value_, unsigned char *bytes_value_,
- int length_, int *indices_, CGEN_FIELDS *fields_);
-
-/* Cover fns to bfd_get/set. */
-
-extern CGEN_INSN_INT cgen_get_insn_value
- (CGEN_CPU_DESC, unsigned char *, int);
-extern void cgen_put_insn_value
- (CGEN_CPU_DESC, unsigned char *, int, CGEN_INSN_INT);
-
-/* Read in a cpu description file.
- ??? For future concerns, including adding instructions to the assembler/
- disassembler at run-time. */
-
-extern const char * cgen_read_cpu_file (CGEN_CPU_DESC, const char * filename_);
-
-/* Allow signed overflow of instruction fields. */
-extern void cgen_set_signed_overflow_ok (CGEN_CPU_DESC);
-
-/* Generate an error message if a signed field in an instruction overflows. */
-extern void cgen_clear_signed_overflow_ok (CGEN_CPU_DESC);
-
-/* Will an error message be generated if a signed field in an instruction overflows ? */
-extern unsigned int cgen_signed_overflow_ok_p (CGEN_CPU_DESC);
-
-#endif /* CGEN_H */
diff --git a/include/opcode/convex.h b/include/opcode/convex.h
deleted file mode 100644
index 7843dce..0000000
--- a/include/opcode/convex.h
+++ /dev/null
@@ -1,1707 +0,0 @@
-/* Information for instruction disassembly on the Convex.
- Copyright 1989, 1993, 2002 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#define xxx 0
-#define rrr 1
-#define rr 2
-#define rxr 3
-#define r 4
-#define nops 5
-#define nr 6
-#define pcrel 7
-#define lr 8
-#define rxl 9
-#define rlr 10
-#define rrl 11
-#define iml 12
-#define imr 13
-#define a1r 14
-#define a1l 15
-#define a2r 16
-#define a2l 17
-#define a3 18
-#define a4 19
-#define a5 20
-#define V 1
-#define S 2
-#define VM 3
-#define A 4
-#define VL 5
-#define VS 6
-#define VLS 7
-#define PSW 8
-/* Prevent an error during "make depend". */
-#if !defined (PC)
-#define PC 9
-#endif
-#define ITR 10
-#define VV 11
-#define ITSR 12
-#define TOC 13
-#define CIR 14
-#define TTR 15
-#define VMU 16
-#define VML 17
-#define ICR 18
-#define TCPU 19
-#define CPUID 20
-#define TID 21
-
-const char *op[] = {
- "",
- "v0\0v1\0v2\0v3\0v4\0v5\0v6\0v7",
- "s0\0s1\0s2\0s3\0s4\0s5\0s6\0s7",
- "vm",
- "sp\0a1\0a2\0a3\0a4\0a5\0ap\0fp",
- "vl",
- "vs",
- "vls",
- "psw",
- "pc",
- "itr",
- "vv",
- "itsr",
- "toc",
- "cir",
- "ttr",
- "vmu",
- "vml",
- "icr",
- "tcpu",
- "cpuid",
- "tid",
-};
-
-const struct formstr format0[] = {
- {0,0,rrr,V,S,S}, /* mov */
- {0,0,rrr,S,S,V}, /* mov */
- {1,1,rrr,V,V,V}, /* merg.t */
- {2,1,rrr,V,V,V}, /* mask.t */
- {1,2,rrr,V,S,V}, /* merg.f */
- {2,2,rrr,V,S,V}, /* mask.f */
- {1,1,rrr,V,S,V}, /* merg.t */
- {2,1,rrr,V,S,V}, /* mask.t */
- {3,3,rrr,V,V,V}, /* mul.s */
- {3,4,rrr,V,V,V}, /* mul.d */
- {4,3,rrr,V,V,V}, /* div.s */
- {4,4,rrr,V,V,V}, /* div.d */
- {3,3,rrr,V,S,V}, /* mul.s */
- {3,4,rrr,V,S,V}, /* mul.d */
- {4,3,rrr,V,S,V}, /* div.s */
- {4,4,rrr,V,S,V}, /* div.d */
- {5,0,rrr,V,V,V}, /* and */
- {6,0,rrr,V,V,V}, /* or */
- {7,0,rrr,V,V,V}, /* xor */
- {8,0,rrr,V,V,V}, /* shf */
- {5,0,rrr,V,S,V}, /* and */
- {6,0,rrr,V,S,V}, /* or */
- {7,0,rrr,V,S,V}, /* xor */
- {8,0,rrr,V,S,V}, /* shf */
- {9,3,rrr,V,V,V}, /* add.s */
- {9,4,rrr,V,V,V}, /* add.d */
- {10,3,rrr,V,V,V}, /* sub.s */
- {10,4,rrr,V,V,V}, /* sub.d */
- {9,3,rrr,V,S,V}, /* add.s */
- {9,4,rrr,V,S,V}, /* add.d */
- {10,3,rrr,V,S,V}, /* sub.s */
- {10,4,rrr,V,S,V}, /* sub.d */
- {9,5,rrr,V,V,V}, /* add.b */
- {9,6,rrr,V,V,V}, /* add.h */
- {9,7,rrr,V,V,V}, /* add.w */
- {9,8,rrr,V,V,V}, /* add.l */
- {9,5,rrr,V,S,V}, /* add.b */
- {9,6,rrr,V,S,V}, /* add.h */
- {9,7,rrr,V,S,V}, /* add.w */
- {9,8,rrr,V,S,V}, /* add.l */
- {10,5,rrr,V,V,V}, /* sub.b */
- {10,6,rrr,V,V,V}, /* sub.h */
- {10,7,rrr,V,V,V}, /* sub.w */
- {10,8,rrr,V,V,V}, /* sub.l */
- {10,5,rrr,V,S,V}, /* sub.b */
- {10,6,rrr,V,S,V}, /* sub.h */
- {10,7,rrr,V,S,V}, /* sub.w */
- {10,8,rrr,V,S,V}, /* sub.l */
- {3,5,rrr,V,V,V}, /* mul.b */
- {3,6,rrr,V,V,V}, /* mul.h */
- {3,7,rrr,V,V,V}, /* mul.w */
- {3,8,rrr,V,V,V}, /* mul.l */
- {3,5,rrr,V,S,V}, /* mul.b */
- {3,6,rrr,V,S,V}, /* mul.h */
- {3,7,rrr,V,S,V}, /* mul.w */
- {3,8,rrr,V,S,V}, /* mul.l */
- {4,5,rrr,V,V,V}, /* div.b */
- {4,6,rrr,V,V,V}, /* div.h */
- {4,7,rrr,V,V,V}, /* div.w */
- {4,8,rrr,V,V,V}, /* div.l */
- {4,5,rrr,V,S,V}, /* div.b */
- {4,6,rrr,V,S,V}, /* div.h */
- {4,7,rrr,V,S,V}, /* div.w */
- {4,8,rrr,V,S,V}, /* div.l */
-};
-
-const struct formstr format1[] = {
- {11,0,xxx,0,0,0}, /* exit */
- {12,0,a3,0,0,0}, /* jmp */
- {13,2,a3,0,0,0}, /* jmpi.f */
- {13,1,a3,0,0,0}, /* jmpi.t */
- {14,2,a3,0,0,0}, /* jmpa.f */
- {14,1,a3,0,0,0}, /* jmpa.t */
- {15,2,a3,0,0,0}, /* jmps.f */
- {15,1,a3,0,0,0}, /* jmps.t */
- {16,0,a3,0,0,0}, /* tac */
- {17,0,a1r,A,0,0}, /* ldea */
- {18,8,a1l,VLS,0,0}, /* ld.l */
- {18,9,a1l,VM,0,0}, /* ld.x */
- {19,0,a3,0,0,0}, /* tas */
- {20,0,a3,0,0,0}, /* pshea */
- {21,8,a2l,VLS,0,0}, /* st.l */
- {21,9,a2l,VM,0,0}, /* st.x */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {22,0,a3,0,0,0}, /* call */
- {23,0,a3,0,0,0}, /* calls */
- {24,0,a3,0,0,0}, /* callq */
- {25,0,a1r,A,0,0}, /* pfork */
- {26,5,a2r,S,0,0}, /* ste.b */
- {26,6,a2r,S,0,0}, /* ste.h */
- {26,7,a2r,S,0,0}, /* ste.w */
- {26,8,a2r,S,0,0}, /* ste.l */
- {18,5,a1r,A,0,0}, /* ld.b */
- {18,6,a1r,A,0,0}, /* ld.h */
- {18,7,a1r,A,0,0}, /* ld.w */
- {27,7,a1r,A,0,0}, /* incr.w */
- {21,5,a2r,A,0,0}, /* st.b */
- {21,6,a2r,A,0,0}, /* st.h */
- {21,7,a2r,A,0,0}, /* st.w */
- {27,8,a1r,S,0,0}, /* incr.l */
- {18,5,a1r,S,0,0}, /* ld.b */
- {18,6,a1r,S,0,0}, /* ld.h */
- {18,7,a1r,S,0,0}, /* ld.w */
- {18,8,a1r,S,0,0}, /* ld.l */
- {21,5,a2r,S,0,0}, /* st.b */
- {21,6,a2r,S,0,0}, /* st.h */
- {21,7,a2r,S,0,0}, /* st.w */
- {21,8,a2r,S,0,0}, /* st.l */
- {18,5,a1r,V,0,0}, /* ld.b */
- {18,6,a1r,V,0,0}, /* ld.h */
- {18,7,a1r,V,0,0}, /* ld.w */
- {18,8,a1r,V,0,0}, /* ld.l */
- {21,5,a2r,V,0,0}, /* st.b */
- {21,6,a2r,V,0,0}, /* st.h */
- {21,7,a2r,V,0,0}, /* st.w */
- {21,8,a2r,V,0,0}, /* st.l */
-};
-
-const struct formstr format2[] = {
- {28,5,rr,A,A,0}, /* cvtw.b */
- {28,6,rr,A,A,0}, /* cvtw.h */
- {29,7,rr,A,A,0}, /* cvtb.w */
- {30,7,rr,A,A,0}, /* cvth.w */
- {28,5,rr,S,S,0}, /* cvtw.b */
- {28,6,rr,S,S,0}, /* cvtw.h */
- {29,7,rr,S,S,0}, /* cvtb.w */
- {30,7,rr,S,S,0}, /* cvth.w */
- {28,3,rr,S,S,0}, /* cvtw.s */
- {31,7,rr,S,S,0}, /* cvts.w */
- {32,3,rr,S,S,0}, /* cvtd.s */
- {31,4,rr,S,S,0}, /* cvts.d */
- {31,8,rr,S,S,0}, /* cvts.l */
- {32,8,rr,S,S,0}, /* cvtd.l */
- {33,3,rr,S,S,0}, /* cvtl.s */
- {33,4,rr,S,S,0}, /* cvtl.d */
- {34,0,rr,A,A,0}, /* ldpa */
- {8,0,nr,A,0,0}, /* shf */
- {18,6,nr,A,0,0}, /* ld.h */
- {18,7,nr,A,0,0}, /* ld.w */
- {33,7,rr,S,S,0}, /* cvtl.w */
- {28,8,rr,S,S,0}, /* cvtw.l */
- {35,1,rr,S,S,0}, /* plc.t */
- {36,0,rr,S,S,0}, /* tzc */
- {37,6,rr,A,A,0}, /* eq.h */
- {37,7,rr,A,A,0}, /* eq.w */
- {37,6,nr,A,0,0}, /* eq.h */
- {37,7,nr,A,0,0}, /* eq.w */
- {37,5,rr,S,S,0}, /* eq.b */
- {37,6,rr,S,S,0}, /* eq.h */
- {37,7,rr,S,S,0}, /* eq.w */
- {37,8,rr,S,S,0}, /* eq.l */
- {38,6,rr,A,A,0}, /* leu.h */
- {38,7,rr,A,A,0}, /* leu.w */
- {38,6,nr,A,0,0}, /* leu.h */
- {38,7,nr,A,0,0}, /* leu.w */
- {38,5,rr,S,S,0}, /* leu.b */
- {38,6,rr,S,S,0}, /* leu.h */
- {38,7,rr,S,S,0}, /* leu.w */
- {38,8,rr,S,S,0}, /* leu.l */
- {39,6,rr,A,A,0}, /* ltu.h */
- {39,7,rr,A,A,0}, /* ltu.w */
- {39,6,nr,A,0,0}, /* ltu.h */
- {39,7,nr,A,0,0}, /* ltu.w */
- {39,5,rr,S,S,0}, /* ltu.b */
- {39,6,rr,S,S,0}, /* ltu.h */
- {39,7,rr,S,S,0}, /* ltu.w */
- {39,8,rr,S,S,0}, /* ltu.l */
- {40,6,rr,A,A,0}, /* le.h */
- {40,7,rr,A,A,0}, /* le.w */
- {40,6,nr,A,0,0}, /* le.h */
- {40,7,nr,A,0,0}, /* le.w */
- {40,5,rr,S,S,0}, /* le.b */
- {40,6,rr,S,S,0}, /* le.h */
- {40,7,rr,S,S,0}, /* le.w */
- {40,8,rr,S,S,0}, /* le.l */
- {41,6,rr,A,A,0}, /* lt.h */
- {41,7,rr,A,A,0}, /* lt.w */
- {41,6,nr,A,0,0}, /* lt.h */
- {41,7,nr,A,0,0}, /* lt.w */
- {41,5,rr,S,S,0}, /* lt.b */
- {41,6,rr,S,S,0}, /* lt.h */
- {41,7,rr,S,S,0}, /* lt.w */
- {41,8,rr,S,S,0}, /* lt.l */
- {9,7,rr,S,A,0}, /* add.w */
- {8,0,rr,A,A,0}, /* shf */
- {0,0,rr,A,A,0}, /* mov */
- {0,0,rr,S,A,0}, /* mov */
- {0,7,rr,S,S,0}, /* mov.w */
- {8,0,rr,S,S,0}, /* shf */
- {0,0,rr,S,S,0}, /* mov */
- {0,0,rr,A,S,0}, /* mov */
- {5,0,rr,A,A,0}, /* and */
- {6,0,rr,A,A,0}, /* or */
- {7,0,rr,A,A,0}, /* xor */
- {42,0,rr,A,A,0}, /* not */
- {5,0,rr,S,S,0}, /* and */
- {6,0,rr,S,S,0}, /* or */
- {7,0,rr,S,S,0}, /* xor */
- {42,0,rr,S,S,0}, /* not */
- {40,3,rr,S,S,0}, /* le.s */
- {40,4,rr,S,S,0}, /* le.d */
- {41,3,rr,S,S,0}, /* lt.s */
- {41,4,rr,S,S,0}, /* lt.d */
- {9,3,rr,S,S,0}, /* add.s */
- {9,4,rr,S,S,0}, /* add.d */
- {10,3,rr,S,S,0}, /* sub.s */
- {10,4,rr,S,S,0}, /* sub.d */
- {37,3,rr,S,S,0}, /* eq.s */
- {37,4,rr,S,S,0}, /* eq.d */
- {43,6,rr,A,A,0}, /* neg.h */
- {43,7,rr,A,A,0}, /* neg.w */
- {3,3,rr,S,S,0}, /* mul.s */
- {3,4,rr,S,S,0}, /* mul.d */
- {4,3,rr,S,S,0}, /* div.s */
- {4,4,rr,S,S,0}, /* div.d */
- {9,6,rr,A,A,0}, /* add.h */
- {9,7,rr,A,A,0}, /* add.w */
- {9,6,nr,A,0,0}, /* add.h */
- {9,7,nr,A,0,0}, /* add.w */
- {9,5,rr,S,S,0}, /* add.b */
- {9,6,rr,S,S,0}, /* add.h */
- {9,7,rr,S,S,0}, /* add.w */
- {9,8,rr,S,S,0}, /* add.l */
- {10,6,rr,A,A,0}, /* sub.h */
- {10,7,rr,A,A,0}, /* sub.w */
- {10,6,nr,A,0,0}, /* sub.h */
- {10,7,nr,A,0,0}, /* sub.w */
- {10,5,rr,S,S,0}, /* sub.b */
- {10,6,rr,S,S,0}, /* sub.h */
- {10,7,rr,S,S,0}, /* sub.w */
- {10,8,rr,S,S,0}, /* sub.l */
- {3,6,rr,A,A,0}, /* mul.h */
- {3,7,rr,A,A,0}, /* mul.w */
- {3,6,nr,A,0,0}, /* mul.h */
- {3,7,nr,A,0,0}, /* mul.w */
- {3,5,rr,S,S,0}, /* mul.b */
- {3,6,rr,S,S,0}, /* mul.h */
- {3,7,rr,S,S,0}, /* mul.w */
- {3,8,rr,S,S,0}, /* mul.l */
- {4,6,rr,A,A,0}, /* div.h */
- {4,7,rr,A,A,0}, /* div.w */
- {4,6,nr,A,0,0}, /* div.h */
- {4,7,nr,A,0,0}, /* div.w */
- {4,5,rr,S,S,0}, /* div.b */
- {4,6,rr,S,S,0}, /* div.h */
- {4,7,rr,S,S,0}, /* div.w */
- {4,8,rr,S,S,0}, /* div.l */
-};
-
-const struct formstr format3[] = {
- {32,3,rr,V,V,0}, /* cvtd.s */
- {31,4,rr,V,V,0}, /* cvts.d */
- {33,4,rr,V,V,0}, /* cvtl.d */
- {32,8,rr,V,V,0}, /* cvtd.l */
- {0,0,rrl,S,S,VM}, /* mov */
- {0,0,rlr,S,VM,S}, /* mov */
- {0,0,0,0,0,0},
- {44,0,rr,S,S,0}, /* lop */
- {36,0,rr,V,V,0}, /* tzc */
- {44,0,rr,V,V,0}, /* lop */
- {0,0,0,0,0,0},
- {42,0,rr,V,V,0}, /* not */
- {8,0,rr,S,V,0}, /* shf */
- {35,1,rr,V,V,0}, /* plc.t */
- {45,2,rr,V,V,0}, /* cprs.f */
- {45,1,rr,V,V,0}, /* cprs.t */
- {37,3,rr,V,V,0}, /* eq.s */
- {37,4,rr,V,V,0}, /* eq.d */
- {43,3,rr,V,V,0}, /* neg.s */
- {43,4,rr,V,V,0}, /* neg.d */
- {37,3,rr,S,V,0}, /* eq.s */
- {37,4,rr,S,V,0}, /* eq.d */
- {43,3,rr,S,S,0}, /* neg.s */
- {43,4,rr,S,S,0}, /* neg.d */
- {40,3,rr,V,V,0}, /* le.s */
- {40,4,rr,V,V,0}, /* le.d */
- {41,3,rr,V,V,0}, /* lt.s */
- {41,4,rr,V,V,0}, /* lt.d */
- {40,3,rr,S,V,0}, /* le.s */
- {40,4,rr,S,V,0}, /* le.d */
- {41,3,rr,S,V,0}, /* lt.s */
- {41,4,rr,S,V,0}, /* lt.d */
- {37,5,rr,V,V,0}, /* eq.b */
- {37,6,rr,V,V,0}, /* eq.h */
- {37,7,rr,V,V,0}, /* eq.w */
- {37,8,rr,V,V,0}, /* eq.l */
- {37,5,rr,S,V,0}, /* eq.b */
- {37,6,rr,S,V,0}, /* eq.h */
- {37,7,rr,S,V,0}, /* eq.w */
- {37,8,rr,S,V,0}, /* eq.l */
- {40,5,rr,V,V,0}, /* le.b */
- {40,6,rr,V,V,0}, /* le.h */
- {40,7,rr,V,V,0}, /* le.w */
- {40,8,rr,V,V,0}, /* le.l */
- {40,5,rr,S,V,0}, /* le.b */
- {40,6,rr,S,V,0}, /* le.h */
- {40,7,rr,S,V,0}, /* le.w */
- {40,8,rr,S,V,0}, /* le.l */
- {41,5,rr,V,V,0}, /* lt.b */
- {41,6,rr,V,V,0}, /* lt.h */
- {41,7,rr,V,V,0}, /* lt.w */
- {41,8,rr,V,V,0}, /* lt.l */
- {41,5,rr,S,V,0}, /* lt.b */
- {41,6,rr,S,V,0}, /* lt.h */
- {41,7,rr,S,V,0}, /* lt.w */
- {41,8,rr,S,V,0}, /* lt.l */
- {43,5,rr,V,V,0}, /* neg.b */
- {43,6,rr,V,V,0}, /* neg.h */
- {43,7,rr,V,V,0}, /* neg.w */
- {43,8,rr,V,V,0}, /* neg.l */
- {43,5,rr,S,S,0}, /* neg.b */
- {43,6,rr,S,S,0}, /* neg.h */
- {43,7,rr,S,S,0}, /* neg.w */
- {43,8,rr,S,S,0}, /* neg.l */
-};
-
-const struct formstr format4[] = {
- {46,0,nops,0,0,0}, /* nop */
- {47,0,pcrel,0,0,0}, /* br */
- {48,2,pcrel,0,0,0}, /* bri.f */
- {48,1,pcrel,0,0,0}, /* bri.t */
- {49,2,pcrel,0,0,0}, /* bra.f */
- {49,1,pcrel,0,0,0}, /* bra.t */
- {50,2,pcrel,0,0,0}, /* brs.f */
- {50,1,pcrel,0,0,0}, /* brs.t */
-};
-
-const struct formstr format5[] = {
- {51,5,rr,V,V,0}, /* ldvi.b */
- {51,6,rr,V,V,0}, /* ldvi.h */
- {51,7,rr,V,V,0}, /* ldvi.w */
- {51,8,rr,V,V,0}, /* ldvi.l */
- {28,3,rr,V,V,0}, /* cvtw.s */
- {31,7,rr,V,V,0}, /* cvts.w */
- {28,8,rr,V,V,0}, /* cvtw.l */
- {33,7,rr,V,V,0}, /* cvtl.w */
- {52,5,rxr,V,V,0}, /* stvi.b */
- {52,6,rxr,V,V,0}, /* stvi.h */
- {52,7,rxr,V,V,0}, /* stvi.w */
- {52,8,rxr,V,V,0}, /* stvi.l */
- {52,5,rxr,S,V,0}, /* stvi.b */
- {52,6,rxr,S,V,0}, /* stvi.h */
- {52,7,rxr,S,V,0}, /* stvi.w */
- {52,8,rxr,S,V,0}, /* stvi.l */
-};
-
-const struct formstr format6[] = {
- {53,0,r,A,0,0}, /* ldsdr */
- {54,0,r,A,0,0}, /* ldkdr */
- {55,3,r,S,0,0}, /* ln.s */
- {55,4,r,S,0,0}, /* ln.d */
- {56,0,nops,0,0,0}, /* patu */
- {57,0,r,A,0,0}, /* pate */
- {58,0,nops,0,0,0}, /* pich */
- {59,0,nops,0,0,0}, /* plch */
- {0,0,lr,PSW,A,0}, /* mov */
- {0,0,rxl,A,PSW,0}, /* mov */
- {0,0,lr,PC,A,0}, /* mov */
- {60,0,r,S,0,0}, /* idle */
- {0,0,lr,ITR,S,0}, /* mov */
- {0,0,rxl,S,ITR,0}, /* mov */
- {0,0,0,0,0,0},
- {0,0,rxl,S,ITSR,0}, /* mov */
- {61,0,nops,0,0,0}, /* rtnq */
- {62,0,nops,0,0,0}, /* cfork */
- {63,0,nops,0,0,0}, /* rtn */
- {64,0,nops,0,0,0}, /* wfork */
- {65,0,nops,0,0,0}, /* join */
- {66,0,nops,0,0,0}, /* rtnc */
- {67,3,r,S,0,0}, /* exp.s */
- {67,4,r,S,0,0}, /* exp.d */
- {68,3,r,S,0,0}, /* sin.s */
- {68,4,r,S,0,0}, /* sin.d */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {69,3,r,S,0,0}, /* cos.s */
- {69,4,r,S,0,0}, /* cos.d */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {70,7,r,A,0,0}, /* psh.w */
- {0,0,0,0,0,0},
- {71,7,r,A,0,0}, /* pop.w */
- {0,0,0,0,0,0},
- {70,7,r,S,0,0}, /* psh.w */
- {70,8,r,S,0,0}, /* psh.l */
- {71,7,r,S,0,0}, /* pop.w */
- {71,8,r,S,0,0}, /* pop.l */
- {72,0,nops,0,0,0}, /* eni */
- {73,0,nops,0,0,0}, /* dsi */
- {74,0,nops,0,0,0}, /* bkpt */
- {75,0,nops,0,0,0}, /* msync */
- {76,0,r,S,0,0}, /* mski */
- {77,0,r,S,0,0}, /* xmti */
- {0,0,rxl,S,VV,0}, /* mov */
- {78,0,nops,0,0,0}, /* tstvv */
- {0,0,lr,VS,A,0}, /* mov */
- {0,0,rxl,A,VS,0}, /* mov */
- {0,0,lr,VL,A,0}, /* mov */
- {0,0,rxl,A,VL,0}, /* mov */
- {0,7,lr,VS,S,0}, /* mov.w */
- {0,7,rxl,S,VS,0}, /* mov.w */
- {0,7,lr,VL,S,0}, /* mov.w */
- {0,7,rxl,S,VL,0}, /* mov.w */
- {79,0,r,A,0,0}, /* diag */
- {80,0,nops,0,0,0}, /* pbkpt */
- {81,3,r,S,0,0}, /* sqrt.s */
- {81,4,r,S,0,0}, /* sqrt.d */
- {82,0,nops,0,0,0}, /* casr */
- {0,0,0,0,0,0},
- {83,3,r,S,0,0}, /* atan.s */
- {83,4,r,S,0,0}, /* atan.d */
-};
-
-const struct formstr format7[] = {
- {84,5,r,V,0,0}, /* sum.b */
- {84,6,r,V,0,0}, /* sum.h */
- {84,7,r,V,0,0}, /* sum.w */
- {84,8,r,V,0,0}, /* sum.l */
- {85,0,r,V,0,0}, /* all */
- {86,0,r,V,0,0}, /* any */
- {87,0,r,V,0,0}, /* parity */
- {0,0,0,0,0,0},
- {88,5,r,V,0,0}, /* max.b */
- {88,6,r,V,0,0}, /* max.h */
- {88,7,r,V,0,0}, /* max.w */
- {88,8,r,V,0,0}, /* max.l */
- {89,5,r,V,0,0}, /* min.b */
- {89,6,r,V,0,0}, /* min.h */
- {89,7,r,V,0,0}, /* min.w */
- {89,8,r,V,0,0}, /* min.l */
- {84,3,r,V,0,0}, /* sum.s */
- {84,4,r,V,0,0}, /* sum.d */
- {90,3,r,V,0,0}, /* prod.s */
- {90,4,r,V,0,0}, /* prod.d */
- {88,3,r,V,0,0}, /* max.s */
- {88,4,r,V,0,0}, /* max.d */
- {89,3,r,V,0,0}, /* min.s */
- {89,4,r,V,0,0}, /* min.d */
- {90,5,r,V,0,0}, /* prod.b */
- {90,6,r,V,0,0}, /* prod.h */
- {90,7,r,V,0,0}, /* prod.w */
- {90,8,r,V,0,0}, /* prod.l */
- {35,2,lr,VM,S,0}, /* plc.f */
- {35,1,lr,VM,S,0}, /* plc.t */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
-};
-
-const struct formstr formatx[] = {
- {0,0,0,0,0,0},
-};
-
-const struct formstr format1a[] = {
- {91,0,imr,A,0,0}, /* halt */
- {92,0,a4,0,0,0}, /* sysc */
- {18,6,imr,A,0,0}, /* ld.h */
- {18,7,imr,A,0,0}, /* ld.w */
- {5,0,imr,A,0,0}, /* and */
- {6,0,imr,A,0,0}, /* or */
- {7,0,imr,A,0,0}, /* xor */
- {8,0,imr,A,0,0}, /* shf */
- {9,6,imr,A,0,0}, /* add.h */
- {9,7,imr,A,0,0}, /* add.w */
- {10,6,imr,A,0,0}, /* sub.h */
- {10,7,imr,A,0,0}, /* sub.w */
- {3,6,imr,A,0,0}, /* mul.h */
- {3,7,imr,A,0,0}, /* mul.w */
- {4,6,imr,A,0,0}, /* div.h */
- {4,7,imr,A,0,0}, /* div.w */
- {18,7,iml,VL,0,0}, /* ld.w */
- {18,7,iml,VS,0,0}, /* ld.w */
- {0,0,0,0,0,0},
- {8,7,imr,S,0,0}, /* shf.w */
- {93,0,a5,0,0,0}, /* trap */
- {0,0,0,0,0,0},
- {37,6,imr,A,0,0}, /* eq.h */
- {37,7,imr,A,0,0}, /* eq.w */
- {38,6,imr,A,0,0}, /* leu.h */
- {38,7,imr,A,0,0}, /* leu.w */
- {39,6,imr,A,0,0}, /* ltu.h */
- {39,7,imr,A,0,0}, /* ltu.w */
- {40,6,imr,A,0,0}, /* le.h */
- {40,7,imr,A,0,0}, /* le.w */
- {41,6,imr,A,0,0}, /* lt.h */
- {41,7,imr,A,0,0}, /* lt.w */
-};
-
-const struct formstr format1b[] = {
- {18,4,imr,S,0,0}, /* ld.d */
- {18,10,imr,S,0,0}, /* ld.u */
- {18,8,imr,S,0,0}, /* ld.l */
- {18,7,imr,S,0,0}, /* ld.w */
- {5,0,imr,S,0,0}, /* and */
- {6,0,imr,S,0,0}, /* or */
- {7,0,imr,S,0,0}, /* xor */
- {8,0,imr,S,0,0}, /* shf */
- {9,6,imr,S,0,0}, /* add.h */
- {9,7,imr,S,0,0}, /* add.w */
- {10,6,imr,S,0,0}, /* sub.h */
- {10,7,imr,S,0,0}, /* sub.w */
- {3,6,imr,S,0,0}, /* mul.h */
- {3,7,imr,S,0,0}, /* mul.w */
- {4,6,imr,S,0,0}, /* div.h */
- {4,7,imr,S,0,0}, /* div.w */
- {9,3,imr,S,0,0}, /* add.s */
- {10,3,imr,S,0,0}, /* sub.s */
- {3,3,imr,S,0,0}, /* mul.s */
- {4,3,imr,S,0,0}, /* div.s */
- {40,3,imr,S,0,0}, /* le.s */
- {41,3,imr,S,0,0}, /* lt.s */
- {37,6,imr,S,0,0}, /* eq.h */
- {37,7,imr,S,0,0}, /* eq.w */
- {38,6,imr,S,0,0}, /* leu.h */
- {38,7,imr,S,0,0}, /* leu.w */
- {39,6,imr,S,0,0}, /* ltu.h */
- {39,7,imr,S,0,0}, /* ltu.w */
- {40,6,imr,S,0,0}, /* le.h */
- {40,7,imr,S,0,0}, /* le.w */
- {41,6,imr,S,0,0}, /* lt.h */
- {41,7,imr,S,0,0}, /* lt.w */
-};
-
-const struct formstr e0_format0[] = {
- {10,3,rrr,S,V,V}, /* sub.s */
- {10,4,rrr,S,V,V}, /* sub.d */
- {4,3,rrr,S,V,V}, /* div.s */
- {4,4,rrr,S,V,V}, /* div.d */
- {10,11,rrr,S,V,V}, /* sub.s.f */
- {10,12,rrr,S,V,V}, /* sub.d.f */
- {4,11,rrr,S,V,V}, /* div.s.f */
- {4,12,rrr,S,V,V}, /* div.d.f */
- {3,11,rrr,V,V,V}, /* mul.s.f */
- {3,12,rrr,V,V,V}, /* mul.d.f */
- {4,11,rrr,V,V,V}, /* div.s.f */
- {4,12,rrr,V,V,V}, /* div.d.f */
- {3,11,rrr,V,S,V}, /* mul.s.f */
- {3,12,rrr,V,S,V}, /* mul.d.f */
- {4,11,rrr,V,S,V}, /* div.s.f */
- {4,12,rrr,V,S,V}, /* div.d.f */
- {5,2,rrr,V,V,V}, /* and.f */
- {6,2,rrr,V,V,V}, /* or.f */
- {7,2,rrr,V,V,V}, /* xor.f */
- {8,2,rrr,V,V,V}, /* shf.f */
- {5,2,rrr,V,S,V}, /* and.f */
- {6,2,rrr,V,S,V}, /* or.f */
- {7,2,rrr,V,S,V}, /* xor.f */
- {8,2,rrr,V,S,V}, /* shf.f */
- {9,11,rrr,V,V,V}, /* add.s.f */
- {9,12,rrr,V,V,V}, /* add.d.f */
- {10,11,rrr,V,V,V}, /* sub.s.f */
- {10,12,rrr,V,V,V}, /* sub.d.f */
- {9,11,rrr,V,S,V}, /* add.s.f */
- {9,12,rrr,V,S,V}, /* add.d.f */
- {10,11,rrr,V,S,V}, /* sub.s.f */
- {10,12,rrr,V,S,V}, /* sub.d.f */
- {9,13,rrr,V,V,V}, /* add.b.f */
- {9,14,rrr,V,V,V}, /* add.h.f */
- {9,15,rrr,V,V,V}, /* add.w.f */
- {9,16,rrr,V,V,V}, /* add.l.f */
- {9,13,rrr,V,S,V}, /* add.b.f */
- {9,14,rrr,V,S,V}, /* add.h.f */
- {9,15,rrr,V,S,V}, /* add.w.f */
- {9,16,rrr,V,S,V}, /* add.l.f */
- {10,13,rrr,V,V,V}, /* sub.b.f */
- {10,14,rrr,V,V,V}, /* sub.h.f */
- {10,15,rrr,V,V,V}, /* sub.w.f */
- {10,16,rrr,V,V,V}, /* sub.l.f */
- {10,13,rrr,V,S,V}, /* sub.b.f */
- {10,14,rrr,V,S,V}, /* sub.h.f */
- {10,15,rrr,V,S,V}, /* sub.w.f */
- {10,16,rrr,V,S,V}, /* sub.l.f */
- {3,13,rrr,V,V,V}, /* mul.b.f */
- {3,14,rrr,V,V,V}, /* mul.h.f */
- {3,15,rrr,V,V,V}, /* mul.w.f */
- {3,16,rrr,V,V,V}, /* mul.l.f */
- {3,13,rrr,V,S,V}, /* mul.b.f */
- {3,14,rrr,V,S,V}, /* mul.h.f */
- {3,15,rrr,V,S,V}, /* mul.w.f */
- {3,16,rrr,V,S,V}, /* mul.l.f */
- {4,13,rrr,V,V,V}, /* div.b.f */
- {4,14,rrr,V,V,V}, /* div.h.f */
- {4,15,rrr,V,V,V}, /* div.w.f */
- {4,16,rrr,V,V,V}, /* div.l.f */
- {4,13,rrr,V,S,V}, /* div.b.f */
- {4,14,rrr,V,S,V}, /* div.h.f */
- {4,15,rrr,V,S,V}, /* div.w.f */
- {4,16,rrr,V,S,V}, /* div.l.f */
-};
-
-const struct formstr e0_format1[] = {
- {0,0,0,0,0,0},
- {94,0,a3,0,0,0}, /* tst */
- {95,0,a3,0,0,0}, /* lck */
- {96,0,a3,0,0,0}, /* ulk */
- {17,0,a1r,S,0,0}, /* ldea */
- {97,0,a1r,A,0,0}, /* spawn */
- {98,0,a1r,A,0,0}, /* ldcmr */
- {99,0,a2r,A,0,0}, /* stcmr */
- {100,0,a1r,A,0,0}, /* popr */
- {101,0,a2r,A,0,0}, /* pshr */
- {102,7,a1r,A,0,0}, /* rcvr.w */
- {103,7,a2r,A,0,0}, /* matm.w */
- {104,7,a2r,A,0,0}, /* sndr.w */
- {104,8,a2r,S,0,0}, /* sndr.l */
- {102,8,a1r,S,0,0}, /* rcvr.l */
- {103,8,a2r,S,0,0}, /* matm.l */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {105,7,a2r,A,0,0}, /* putr.w */
- {105,8,a2r,S,0,0}, /* putr.l */
- {106,7,a1r,A,0,0}, /* getr.w */
- {106,8,a1r,S,0,0}, /* getr.l */
- {26,13,a2r,S,0,0}, /* ste.b.f */
- {26,14,a2r,S,0,0}, /* ste.h.f */
- {26,15,a2r,S,0,0}, /* ste.w.f */
- {26,16,a2r,S,0,0}, /* ste.l.f */
- {107,7,a2r,A,0,0}, /* matr.w */
- {108,7,a2r,A,0,0}, /* mat.w */
- {109,7,a1r,A,0,0}, /* get.w */
- {110,7,a1r,A,0,0}, /* rcv.w */
- {0,0,0,0,0,0},
- {111,7,a1r,A,0,0}, /* inc.w */
- {112,7,a2r,A,0,0}, /* put.w */
- {113,7,a2r,A,0,0}, /* snd.w */
- {107,8,a2r,S,0,0}, /* matr.l */
- {108,8,a2r,S,0,0}, /* mat.l */
- {109,8,a1r,S,0,0}, /* get.l */
- {110,8,a1r,S,0,0}, /* rcv.l */
- {0,0,0,0,0,0},
- {111,8,a1r,S,0,0}, /* inc.l */
- {112,8,a2r,S,0,0}, /* put.l */
- {113,8,a2r,S,0,0}, /* snd.l */
- {18,13,a1r,V,0,0}, /* ld.b.f */
- {18,14,a1r,V,0,0}, /* ld.h.f */
- {18,15,a1r,V,0,0}, /* ld.w.f */
- {18,16,a1r,V,0,0}, /* ld.l.f */
- {21,13,a2r,V,0,0}, /* st.b.f */
- {21,14,a2r,V,0,0}, /* st.h.f */
- {21,15,a2r,V,0,0}, /* st.w.f */
- {21,16,a2r,V,0,0}, /* st.l.f */
-};
-
-const struct formstr e0_format2[] = {
- {28,5,rr,V,V,0}, /* cvtw.b */
- {28,6,rr,V,V,0}, /* cvtw.h */
- {29,7,rr,V,V,0}, /* cvtb.w */
- {30,7,rr,V,V,0}, /* cvth.w */
- {28,13,rr,V,V,0}, /* cvtw.b.f */
- {28,14,rr,V,V,0}, /* cvtw.h.f */
- {29,15,rr,V,V,0}, /* cvtb.w.f */
- {30,15,rr,V,V,0}, /* cvth.w.f */
- {31,8,rr,V,V,0}, /* cvts.l */
- {32,7,rr,V,V,0}, /* cvtd.w */
- {33,3,rr,V,V,0}, /* cvtl.s */
- {28,4,rr,V,V,0}, /* cvtw.d */
- {31,16,rr,V,V,0}, /* cvts.l.f */
- {32,15,rr,V,V,0}, /* cvtd.w.f */
- {33,11,rr,V,V,0}, /* cvtl.s.f */
- {28,12,rr,V,V,0}, /* cvtw.d.f */
- {114,0,rr,S,S,0}, /* enal */
- {8,7,rr,S,S,0}, /* shf.w */
- {115,0,rr,S,S,0}, /* enag */
- {0,0,0,0,0,0},
- {28,4,rr,S,S,0}, /* cvtw.d */
- {32,7,rr,S,S,0}, /* cvtd.w */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {116,3,rr,S,S,0}, /* frint.s */
- {116,4,rr,S,S,0}, /* frint.d */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {116,3,rr,V,V,0}, /* frint.s */
- {116,4,rr,V,V,0}, /* frint.d */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {116,11,rr,V,V,0}, /* frint.s.f */
- {116,12,rr,V,V,0}, /* frint.d.f */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {81,3,rr,V,V,0}, /* sqrt.s */
- {81,4,rr,V,V,0}, /* sqrt.d */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {81,11,rr,V,V,0}, /* sqrt.s.f */
- {81,12,rr,V,V,0}, /* sqrt.d.f */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
-};
-
-const struct formstr e0_format3[] = {
- {32,11,rr,V,V,0}, /* cvtd.s.f */
- {31,12,rr,V,V,0}, /* cvts.d.f */
- {33,12,rr,V,V,0}, /* cvtl.d.f */
- {32,16,rr,V,V,0}, /* cvtd.l.f */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {36,2,rr,V,V,0}, /* tzc.f */
- {44,2,rr,V,V,0}, /* lop.f */
- {117,2,rr,V,V,0}, /* xpnd.f */
- {42,2,rr,V,V,0}, /* not.f */
- {8,2,rr,S,V,0}, /* shf.f */
- {35,17,rr,V,V,0}, /* plc.t.f */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {37,11,rr,V,V,0}, /* eq.s.f */
- {37,12,rr,V,V,0}, /* eq.d.f */
- {43,11,rr,V,V,0}, /* neg.s.f */
- {43,12,rr,V,V,0}, /* neg.d.f */
- {37,11,rr,S,V,0}, /* eq.s.f */
- {37,12,rr,S,V,0}, /* eq.d.f */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {40,11,rr,V,V,0}, /* le.s.f */
- {40,12,rr,V,V,0}, /* le.d.f */
- {41,11,rr,V,V,0}, /* lt.s.f */
- {41,12,rr,V,V,0}, /* lt.d.f */
- {40,11,rr,S,V,0}, /* le.s.f */
- {40,12,rr,S,V,0}, /* le.d.f */
- {41,11,rr,S,V,0}, /* lt.s.f */
- {41,12,rr,S,V,0}, /* lt.d.f */
- {37,13,rr,V,V,0}, /* eq.b.f */
- {37,14,rr,V,V,0}, /* eq.h.f */
- {37,15,rr,V,V,0}, /* eq.w.f */
- {37,16,rr,V,V,0}, /* eq.l.f */
- {37,13,rr,S,V,0}, /* eq.b.f */
- {37,14,rr,S,V,0}, /* eq.h.f */
- {37,15,rr,S,V,0}, /* eq.w.f */
- {37,16,rr,S,V,0}, /* eq.l.f */
- {40,13,rr,V,V,0}, /* le.b.f */
- {40,14,rr,V,V,0}, /* le.h.f */
- {40,15,rr,V,V,0}, /* le.w.f */
- {40,16,rr,V,V,0}, /* le.l.f */
- {40,13,rr,S,V,0}, /* le.b.f */
- {40,14,rr,S,V,0}, /* le.h.f */
- {40,15,rr,S,V,0}, /* le.w.f */
- {40,16,rr,S,V,0}, /* le.l.f */
- {41,13,rr,V,V,0}, /* lt.b.f */
- {41,14,rr,V,V,0}, /* lt.h.f */
- {41,15,rr,V,V,0}, /* lt.w.f */
- {41,16,rr,V,V,0}, /* lt.l.f */
- {41,13,rr,S,V,0}, /* lt.b.f */
- {41,14,rr,S,V,0}, /* lt.h.f */
- {41,15,rr,S,V,0}, /* lt.w.f */
- {41,16,rr,S,V,0}, /* lt.l.f */
- {43,13,rr,V,V,0}, /* neg.b.f */
- {43,14,rr,V,V,0}, /* neg.h.f */
- {43,15,rr,V,V,0}, /* neg.w.f */
- {43,16,rr,V,V,0}, /* neg.l.f */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
-};
-
-const struct formstr e0_format4[] = {
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
-};
-
-const struct formstr e0_format5[] = {
- {51,13,rr,V,V,0}, /* ldvi.b.f */
- {51,14,rr,V,V,0}, /* ldvi.h.f */
- {51,15,rr,V,V,0}, /* ldvi.w.f */
- {51,16,rr,V,V,0}, /* ldvi.l.f */
- {28,11,rr,V,V,0}, /* cvtw.s.f */
- {31,15,rr,V,V,0}, /* cvts.w.f */
- {28,16,rr,V,V,0}, /* cvtw.l.f */
- {33,15,rr,V,V,0}, /* cvtl.w.f */
- {52,13,rxr,V,V,0}, /* stvi.b.f */
- {52,14,rxr,V,V,0}, /* stvi.h.f */
- {52,15,rxr,V,V,0}, /* stvi.w.f */
- {52,16,rxr,V,V,0}, /* stvi.l.f */
- {52,13,rxr,S,V,0}, /* stvi.b.f */
- {52,14,rxr,S,V,0}, /* stvi.h.f */
- {52,15,rxr,S,V,0}, /* stvi.w.f */
- {52,16,rxr,S,V,0}, /* stvi.l.f */
-};
-
-const struct formstr e0_format6[] = {
- {0,0,rxl,S,CIR,0}, /* mov */
- {0,0,lr,CIR,S,0}, /* mov */
- {0,0,lr,TOC,S,0}, /* mov */
- {0,0,lr,CPUID,S,0}, /* mov */
- {0,0,rxl,S,TTR,0}, /* mov */
- {0,0,lr,TTR,S,0}, /* mov */
- {118,0,nops,0,0,0}, /* ctrsl */
- {119,0,nops,0,0,0}, /* ctrsg */
- {0,0,rxl,S,VMU,0}, /* mov */
- {0,0,lr,VMU,S,0}, /* mov */
- {0,0,rxl,S,VML,0}, /* mov */
- {0,0,lr,VML,S,0}, /* mov */
- {0,0,rxl,S,ICR,0}, /* mov */
- {0,0,lr,ICR,S,0}, /* mov */
- {0,0,rxl,S,TCPU,0}, /* mov */
- {0,0,lr,TCPU,S,0}, /* mov */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {120,0,nops,0,0,0}, /* stop */
- {0,0,0,0,0,0},
- {0,0,rxl,S,TID,0}, /* mov */
- {0,0,lr,TID,S,0}, /* mov */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
-};
-
-const struct formstr e0_format7[] = {
- {84,13,r,V,0,0}, /* sum.b.f */
- {84,14,r,V,0,0}, /* sum.h.f */
- {84,15,r,V,0,0}, /* sum.w.f */
- {84,16,r,V,0,0}, /* sum.l.f */
- {85,2,r,V,0,0}, /* all.f */
- {86,2,r,V,0,0}, /* any.f */
- {87,2,r,V,0,0}, /* parity.f */
- {0,0,0,0,0,0},
- {88,13,r,V,0,0}, /* max.b.f */
- {88,14,r,V,0,0}, /* max.h.f */
- {88,15,r,V,0,0}, /* max.w.f */
- {88,16,r,V,0,0}, /* max.l.f */
- {89,13,r,V,0,0}, /* min.b.f */
- {89,14,r,V,0,0}, /* min.h.f */
- {89,15,r,V,0,0}, /* min.w.f */
- {89,16,r,V,0,0}, /* min.l.f */
- {84,11,r,V,0,0}, /* sum.s.f */
- {84,12,r,V,0,0}, /* sum.d.f */
- {90,11,r,V,0,0}, /* prod.s.f */
- {90,12,r,V,0,0}, /* prod.d.f */
- {88,11,r,V,0,0}, /* max.s.f */
- {88,12,r,V,0,0}, /* max.d.f */
- {89,11,r,V,0,0}, /* min.s.f */
- {89,12,r,V,0,0}, /* min.d.f */
- {90,13,r,V,0,0}, /* prod.b.f */
- {90,14,r,V,0,0}, /* prod.h.f */
- {90,15,r,V,0,0}, /* prod.w.f */
- {90,16,r,V,0,0}, /* prod.l.f */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
-};
-
-const struct formstr e1_format0[] = {
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {10,18,rrr,S,V,V}, /* sub.s.t */
- {10,19,rrr,S,V,V}, /* sub.d.t */
- {4,18,rrr,S,V,V}, /* div.s.t */
- {4,19,rrr,S,V,V}, /* div.d.t */
- {3,18,rrr,V,V,V}, /* mul.s.t */
- {3,19,rrr,V,V,V}, /* mul.d.t */
- {4,18,rrr,V,V,V}, /* div.s.t */
- {4,19,rrr,V,V,V}, /* div.d.t */
- {3,18,rrr,V,S,V}, /* mul.s.t */
- {3,19,rrr,V,S,V}, /* mul.d.t */
- {4,18,rrr,V,S,V}, /* div.s.t */
- {4,19,rrr,V,S,V}, /* div.d.t */
- {5,1,rrr,V,V,V}, /* and.t */
- {6,1,rrr,V,V,V}, /* or.t */
- {7,1,rrr,V,V,V}, /* xor.t */
- {8,1,rrr,V,V,V}, /* shf.t */
- {5,1,rrr,V,S,V}, /* and.t */
- {6,1,rrr,V,S,V}, /* or.t */
- {7,1,rrr,V,S,V}, /* xor.t */
- {8,1,rrr,V,S,V}, /* shf.t */
- {9,18,rrr,V,V,V}, /* add.s.t */
- {9,19,rrr,V,V,V}, /* add.d.t */
- {10,18,rrr,V,V,V}, /* sub.s.t */
- {10,19,rrr,V,V,V}, /* sub.d.t */
- {9,18,rrr,V,S,V}, /* add.s.t */
- {9,19,rrr,V,S,V}, /* add.d.t */
- {10,18,rrr,V,S,V}, /* sub.s.t */
- {10,19,rrr,V,S,V}, /* sub.d.t */
- {9,20,rrr,V,V,V}, /* add.b.t */
- {9,21,rrr,V,V,V}, /* add.h.t */
- {9,22,rrr,V,V,V}, /* add.w.t */
- {9,23,rrr,V,V,V}, /* add.l.t */
- {9,20,rrr,V,S,V}, /* add.b.t */
- {9,21,rrr,V,S,V}, /* add.h.t */
- {9,22,rrr,V,S,V}, /* add.w.t */
- {9,23,rrr,V,S,V}, /* add.l.t */
- {10,20,rrr,V,V,V}, /* sub.b.t */
- {10,21,rrr,V,V,V}, /* sub.h.t */
- {10,22,rrr,V,V,V}, /* sub.w.t */
- {10,23,rrr,V,V,V}, /* sub.l.t */
- {10,20,rrr,V,S,V}, /* sub.b.t */
- {10,21,rrr,V,S,V}, /* sub.h.t */
- {10,22,rrr,V,S,V}, /* sub.w.t */
- {10,23,rrr,V,S,V}, /* sub.l.t */
- {3,20,rrr,V,V,V}, /* mul.b.t */
- {3,21,rrr,V,V,V}, /* mul.h.t */
- {3,22,rrr,V,V,V}, /* mul.w.t */
- {3,23,rrr,V,V,V}, /* mul.l.t */
- {3,20,rrr,V,S,V}, /* mul.b.t */
- {3,21,rrr,V,S,V}, /* mul.h.t */
- {3,22,rrr,V,S,V}, /* mul.w.t */
- {3,23,rrr,V,S,V}, /* mul.l.t */
- {4,20,rrr,V,V,V}, /* div.b.t */
- {4,21,rrr,V,V,V}, /* div.h.t */
- {4,22,rrr,V,V,V}, /* div.w.t */
- {4,23,rrr,V,V,V}, /* div.l.t */
- {4,20,rrr,V,S,V}, /* div.b.t */
- {4,21,rrr,V,S,V}, /* div.h.t */
- {4,22,rrr,V,S,V}, /* div.w.t */
- {4,23,rrr,V,S,V}, /* div.l.t */
-};
-
-const struct formstr e1_format1[] = {
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {26,20,a2r,S,0,0}, /* ste.b.t */
- {26,21,a2r,S,0,0}, /* ste.h.t */
- {26,22,a2r,S,0,0}, /* ste.w.t */
- {26,23,a2r,S,0,0}, /* ste.l.t */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {18,20,a1r,V,0,0}, /* ld.b.t */
- {18,21,a1r,V,0,0}, /* ld.h.t */
- {18,22,a1r,V,0,0}, /* ld.w.t */
- {18,23,a1r,V,0,0}, /* ld.l.t */
- {21,20,a2r,V,0,0}, /* st.b.t */
- {21,21,a2r,V,0,0}, /* st.h.t */
- {21,22,a2r,V,0,0}, /* st.w.t */
- {21,23,a2r,V,0,0}, /* st.l.t */
-};
-
-const struct formstr e1_format2[] = {
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {28,20,rr,V,V,0}, /* cvtw.b.t */
- {28,21,rr,V,V,0}, /* cvtw.h.t */
- {29,22,rr,V,V,0}, /* cvtb.w.t */
- {30,22,rr,V,V,0}, /* cvth.w.t */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {31,23,rr,V,V,0}, /* cvts.l.t */
- {32,22,rr,V,V,0}, /* cvtd.w.t */
- {33,18,rr,V,V,0}, /* cvtl.s.t */
- {28,19,rr,V,V,0}, /* cvtw.d.t */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {116,18,rr,V,V,0}, /* frint.s.t */
- {116,19,rr,V,V,0}, /* frint.d.t */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {81,18,rr,V,V,0}, /* sqrt.s.t */
- {81,19,rr,V,V,0}, /* sqrt.d.t */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
-};
-
-const struct formstr e1_format3[] = {
- {32,18,rr,V,V,0}, /* cvtd.s.t */
- {31,19,rr,V,V,0}, /* cvts.d.t */
- {33,19,rr,V,V,0}, /* cvtl.d.t */
- {32,23,rr,V,V,0}, /* cvtd.l.t */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {36,1,rr,V,V,0}, /* tzc.t */
- {44,1,rr,V,V,0}, /* lop.t */
- {117,1,rr,V,V,0}, /* xpnd.t */
- {42,1,rr,V,V,0}, /* not.t */
- {8,1,rr,S,V,0}, /* shf.t */
- {35,24,rr,V,V,0}, /* plc.t.t */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {37,18,rr,V,V,0}, /* eq.s.t */
- {37,19,rr,V,V,0}, /* eq.d.t */
- {43,18,rr,V,V,0}, /* neg.s.t */
- {43,19,rr,V,V,0}, /* neg.d.t */
- {37,18,rr,S,V,0}, /* eq.s.t */
- {37,19,rr,S,V,0}, /* eq.d.t */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {40,18,rr,V,V,0}, /* le.s.t */
- {40,19,rr,V,V,0}, /* le.d.t */
- {41,18,rr,V,V,0}, /* lt.s.t */
- {41,19,rr,V,V,0}, /* lt.d.t */
- {40,18,rr,S,V,0}, /* le.s.t */
- {40,19,rr,S,V,0}, /* le.d.t */
- {41,18,rr,S,V,0}, /* lt.s.t */
- {41,19,rr,S,V,0}, /* lt.d.t */
- {37,20,rr,V,V,0}, /* eq.b.t */
- {37,21,rr,V,V,0}, /* eq.h.t */
- {37,22,rr,V,V,0}, /* eq.w.t */
- {37,23,rr,V,V,0}, /* eq.l.t */
- {37,20,rr,S,V,0}, /* eq.b.t */
- {37,21,rr,S,V,0}, /* eq.h.t */
- {37,22,rr,S,V,0}, /* eq.w.t */
- {37,23,rr,S,V,0}, /* eq.l.t */
- {40,20,rr,V,V,0}, /* le.b.t */
- {40,21,rr,V,V,0}, /* le.h.t */
- {40,22,rr,V,V,0}, /* le.w.t */
- {40,23,rr,V,V,0}, /* le.l.t */
- {40,20,rr,S,V,0}, /* le.b.t */
- {40,21,rr,S,V,0}, /* le.h.t */
- {40,22,rr,S,V,0}, /* le.w.t */
- {40,23,rr,S,V,0}, /* le.l.t */
- {41,20,rr,V,V,0}, /* lt.b.t */
- {41,21,rr,V,V,0}, /* lt.h.t */
- {41,22,rr,V,V,0}, /* lt.w.t */
- {41,23,rr,V,V,0}, /* lt.l.t */
- {41,20,rr,S,V,0}, /* lt.b.t */
- {41,21,rr,S,V,0}, /* lt.h.t */
- {41,22,rr,S,V,0}, /* lt.w.t */
- {41,23,rr,S,V,0}, /* lt.l.t */
- {43,20,rr,V,V,0}, /* neg.b.t */
- {43,21,rr,V,V,0}, /* neg.h.t */
- {43,22,rr,V,V,0}, /* neg.w.t */
- {43,23,rr,V,V,0}, /* neg.l.t */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
-};
-
-const struct formstr e1_format4[] = {
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
-};
-
-const struct formstr e1_format5[] = {
- {51,20,rr,V,V,0}, /* ldvi.b.t */
- {51,21,rr,V,V,0}, /* ldvi.h.t */
- {51,22,rr,V,V,0}, /* ldvi.w.t */
- {51,23,rr,V,V,0}, /* ldvi.l.t */
- {28,18,rr,V,V,0}, /* cvtw.s.t */
- {31,22,rr,V,V,0}, /* cvts.w.t */
- {28,23,rr,V,V,0}, /* cvtw.l.t */
- {33,22,rr,V,V,0}, /* cvtl.w.t */
- {52,20,rxr,V,V,0}, /* stvi.b.t */
- {52,21,rxr,V,V,0}, /* stvi.h.t */
- {52,22,rxr,V,V,0}, /* stvi.w.t */
- {52,23,rxr,V,V,0}, /* stvi.l.t */
- {52,20,rxr,S,V,0}, /* stvi.b.t */
- {52,21,rxr,S,V,0}, /* stvi.h.t */
- {52,22,rxr,S,V,0}, /* stvi.w.t */
- {52,23,rxr,S,V,0}, /* stvi.l.t */
-};
-
-const struct formstr e1_format6[] = {
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
-};
-
-const struct formstr e1_format7[] = {
- {84,20,r,V,0,0}, /* sum.b.t */
- {84,21,r,V,0,0}, /* sum.h.t */
- {84,22,r,V,0,0}, /* sum.w.t */
- {84,23,r,V,0,0}, /* sum.l.t */
- {85,1,r,V,0,0}, /* all.t */
- {86,1,r,V,0,0}, /* any.t */
- {87,1,r,V,0,0}, /* parity.t */
- {0,0,0,0,0,0},
- {88,20,r,V,0,0}, /* max.b.t */
- {88,21,r,V,0,0}, /* max.h.t */
- {88,22,r,V,0,0}, /* max.w.t */
- {88,23,r,V,0,0}, /* max.l.t */
- {89,20,r,V,0,0}, /* min.b.t */
- {89,21,r,V,0,0}, /* min.h.t */
- {89,22,r,V,0,0}, /* min.w.t */
- {89,23,r,V,0,0}, /* min.l.t */
- {84,18,r,V,0,0}, /* sum.s.t */
- {84,19,r,V,0,0}, /* sum.d.t */
- {90,18,r,V,0,0}, /* prod.s.t */
- {90,19,r,V,0,0}, /* prod.d.t */
- {88,18,r,V,0,0}, /* max.s.t */
- {88,19,r,V,0,0}, /* max.d.t */
- {89,18,r,V,0,0}, /* min.s.t */
- {89,19,r,V,0,0}, /* min.d.t */
- {90,20,r,V,0,0}, /* prod.b.t */
- {90,21,r,V,0,0}, /* prod.h.t */
- {90,22,r,V,0,0}, /* prod.w.t */
- {90,23,r,V,0,0}, /* prod.l.t */
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
- {0,0,0,0,0,0},
-};
-
-char *lop[] = {
- "mov", /* 0 */
- "merg", /* 1 */
- "mask", /* 2 */
- "mul", /* 3 */
- "div", /* 4 */
- "and", /* 5 */
- "or", /* 6 */
- "xor", /* 7 */
- "shf", /* 8 */
- "add", /* 9 */
- "sub", /* 10 */
- "exit", /* 11 */
- "jmp", /* 12 */
- "jmpi", /* 13 */
- "jmpa", /* 14 */
- "jmps", /* 15 */
- "tac", /* 16 */
- "ldea", /* 17 */
- "ld", /* 18 */
- "tas", /* 19 */
- "pshea", /* 20 */
- "st", /* 21 */
- "call", /* 22 */
- "calls", /* 23 */
- "callq", /* 24 */
- "pfork", /* 25 */
- "ste", /* 26 */
- "incr", /* 27 */
- "cvtw", /* 28 */
- "cvtb", /* 29 */
- "cvth", /* 30 */
- "cvts", /* 31 */
- "cvtd", /* 32 */
- "cvtl", /* 33 */
- "ldpa", /* 34 */
- "plc", /* 35 */
- "tzc", /* 36 */
- "eq", /* 37 */
- "leu", /* 38 */
- "ltu", /* 39 */
- "le", /* 40 */
- "lt", /* 41 */
- "not", /* 42 */
- "neg", /* 43 */
- "lop", /* 44 */
- "cprs", /* 45 */
- "nop", /* 46 */
- "br", /* 47 */
- "bri", /* 48 */
- "bra", /* 49 */
- "brs", /* 50 */
- "ldvi", /* 51 */
- "stvi", /* 52 */
- "ldsdr", /* 53 */
- "ldkdr", /* 54 */
- "ln", /* 55 */
- "patu", /* 56 */
- "pate", /* 57 */
- "pich", /* 58 */
- "plch", /* 59 */
- "idle", /* 60 */
- "rtnq", /* 61 */
- "cfork", /* 62 */
- "rtn", /* 63 */
- "wfork", /* 64 */
- "join", /* 65 */
- "rtnc", /* 66 */
- "exp", /* 67 */
- "sin", /* 68 */
- "cos", /* 69 */
- "psh", /* 70 */
- "pop", /* 71 */
- "eni", /* 72 */
- "dsi", /* 73 */
- "bkpt", /* 74 */
- "msync", /* 75 */
- "mski", /* 76 */
- "xmti", /* 77 */
- "tstvv", /* 78 */
- "diag", /* 79 */
- "pbkpt", /* 80 */
- "sqrt", /* 81 */
- "casr", /* 82 */
- "atan", /* 83 */
- "sum", /* 84 */
- "all", /* 85 */
- "any", /* 86 */
- "parity", /* 87 */
- "max", /* 88 */
- "min", /* 89 */
- "prod", /* 90 */
- "halt", /* 91 */
- "sysc", /* 92 */
- "trap", /* 93 */
- "tst", /* 94 */
- "lck", /* 95 */
- "ulk", /* 96 */
- "spawn", /* 97 */
- "ldcmr", /* 98 */
- "stcmr", /* 99 */
- "popr", /* 100 */
- "pshr", /* 101 */
- "rcvr", /* 102 */
- "matm", /* 103 */
- "sndr", /* 104 */
- "putr", /* 105 */
- "getr", /* 106 */
- "matr", /* 107 */
- "mat", /* 108 */
- "get", /* 109 */
- "rcv", /* 110 */
- "inc", /* 111 */
- "put", /* 112 */
- "snd", /* 113 */
- "enal", /* 114 */
- "enag", /* 115 */
- "frint", /* 116 */
- "xpnd", /* 117 */
- "ctrsl", /* 118 */
- "ctrsg", /* 119 */
- "stop", /* 120 */
-};
-
-char *rop[] = {
- "", /* 0 */
- ".t", /* 1 */
- ".f", /* 2 */
- ".s", /* 3 */
- ".d", /* 4 */
- ".b", /* 5 */
- ".h", /* 6 */
- ".w", /* 7 */
- ".l", /* 8 */
- ".x", /* 9 */
- ".u", /* 10 */
- ".s.f", /* 11 */
- ".d.f", /* 12 */
- ".b.f", /* 13 */
- ".h.f", /* 14 */
- ".w.f", /* 15 */
- ".l.f", /* 16 */
- ".t.f", /* 17 */
- ".s.t", /* 18 */
- ".d.t", /* 19 */
- ".b.t", /* 20 */
- ".h.t", /* 21 */
- ".w.t", /* 22 */
- ".l.t", /* 23 */
- ".t.t", /* 24 */
-};
diff --git a/include/opcode/cr16.h b/include/opcode/cr16.h
deleted file mode 100644
index c99c51a..0000000
--- a/include/opcode/cr16.h
+++ /dev/null
@@ -1,438 +0,0 @@
-/* cr16.h -- Header file for CR16 opcode and register tables.
- Copyright 2007, 2008 Free Software Foundation, Inc.
- Contributed by M R Swami Reddy
-
- This file is part of GAS, GDB and the GNU binutils.
-
- GAS, GDB, and GNU binutils is free software; you can redistribute it
- and/or modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at your
- option) any later version.
-
- GAS, GDB, and GNU binutils are distributed in the hope that they will be
- useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _CR16_H_
-#define _CR16_H_
-
-/* CR16 core Registers :
- The enums are used as indices to CR16 registers table (cr16_regtab).
- Therefore, order MUST be preserved. */
-
-typedef enum
- {
- /* 16-bit general purpose registers. */
- r0, r1, r2, r3,
- r4, r5, r6, r7,
- r8, r9, r10, r11,
- r12_L = 12, r13_L = 13, ra = 14, sp_L = 15,
-
- /* 32-bit general purpose registers. */
- r12 = 12, r13 = 13, r14 = 14, r15 = 15,
- era = 14, sp = 15, RA,
-
- /* Not a register. */
- nullregister,
- MAX_REG
- }
-reg;
-
-/* CR16 processor registers and special registers :
- The enums are used as indices to CR16 processor registers table
- (cr16_pregtab). Therefore, order MUST be preserved. */
-
-typedef enum
- {
- /* processor registers. */
- dbs = MAX_REG,
- dsr, dcrl, dcrh,
- car0l, car0h, car1l, car1h,
- cfg, psr, intbasel, intbaseh,
- ispl, isph, uspl, usph,
- dcr = dcrl,
- car0 = car0l,
- car1 = car1l,
- intbase = intbasel,
- isp = ispl,
- usp = uspl,
- /* Not a processor register. */
- nullpregister = usph + 1,
- MAX_PREG
- }
-preg;
-
-/* CR16 Register types. */
-
-typedef enum
- {
- CR16_R_REGTYPE, /* r<N> */
- CR16_RP_REGTYPE, /* reg pair */
- CR16_P_REGTYPE /* Processor register */
- }
-reg_type;
-
-/* CR16 argument types :
- The argument types correspond to instructions operands
-
- Argument types :
- r - register
- rp - register pair
- c - constant
- i - immediate
- idxr - index with register
- idxrp - index with register pair
- rbase - register base
- rpbase - register pair base
- pr - processor register */
-
-typedef enum
- {
- arg_r,
- arg_c,
- arg_cr,
- arg_crp,
- arg_ic,
- arg_icr,
- arg_idxr,
- arg_idxrp,
- arg_rbase,
- arg_rpbase,
- arg_rp,
- arg_pr,
- arg_prp,
- arg_cc,
- arg_ra,
- /* Not an argument. */
- nullargs
- }
-argtype;
-
-/* CR16 operand types:The operand types correspond to instructions operands.*/
-
-typedef enum
- {
- dummy,
- /* N-bit signed immediate. */
- imm3, imm4, imm5, imm6, imm16, imm20, imm32,
- /* N-bit unsigned immediate. */
- uimm3, uimm3_1, uimm4, uimm4_1, uimm5, uimm16, uimm20, uimm32,
- /* N-bit signed displacement. */
- disps5, disps17, disps25,
- /* N-bit unsigned displacement. */
- dispe9,
- /* N-bit absolute address. */
- abs20, abs24,
- /* Register relative. */
- rra, rbase, rbase_disps20, rbase_dispe20,
- /* Register pair relative. */
- rpbase_disps0, rpbase_dispe4, rpbase_disps4, rpbase_disps16,
- rpbase_disps20, rpbase_dispe20,
- /* Register index. */
- rindex7_abs20, rindex8_abs20,
- /* Register pair index. */
- rpindex_disps0, rpindex_disps14, rpindex_disps20,
- /* register. */
- regr,
- /* register pair. */
- regp,
- /* processor register. */
- pregr,
- /* processor register 32 bit. */
- pregrp,
- /* condition code - 4 bit. */
- cc,
- /* Not an operand. */
- nulloperand,
- /* Maximum supported operand. */
- MAX_OPRD
- }
-operand_type;
-
-/* CR16 instruction types. */
-
-#define NO_TYPE_INS 0
-#define ARITH_INS 1
-#define LD_STOR_INS 2
-#define BRANCH_INS 3
-#define ARITH_BYTE_INS 4
-#define SHIFT_INS 5
-#define BRANCH_NEQ_INS 6
-#define LD_STOR_INS_INC 7
-#define STOR_IMM_INS 8
-#define CSTBIT_INS 9
-
-/* Maximum value supported for instruction types. */
-#define CR16_INS_MAX (1 << 4)
-/* Mask to record an instruction type. */
-#define CR16_INS_MASK (CR16_INS_MAX - 1)
-/* Return instruction type, given instruction's attributes. */
-#define CR16_INS_TYPE(attr) ((attr) & CR16_INS_MASK)
-
-/* Indicates whether this instruction has a register list as parameter. */
-#define REG_LIST CR16_INS_MAX
-
-/* The operands in binary and assembly are placed in reverse order.
- load - (REVERSE_MATCH)/store - (! REVERSE_MATCH). */
-#define REVERSE_MATCH (1 << 5)
-
-/* Printing formats, where the instruction prefix isn't consecutive. */
-#define FMT_1 (1 << 9) /* 0xF0F00000 */
-#define FMT_2 (1 << 10) /* 0xFFF0FF00 */
-#define FMT_3 (1 << 11) /* 0xFFF00F00 */
-#define FMT_4 (1 << 12) /* 0xFFF0F000 */
-#define FMT_5 (1 << 13) /* 0xFFF0FFF0 */
-#define FMT_CR16 (FMT_1 | FMT_2 | FMT_3 | FMT_4 | FMT_5)
-
-/* Indicates whether this instruction can be relaxed. */
-#define RELAXABLE (1 << 14)
-
-/* Indicates that instruction uses user registers (and not
- general-purpose registers) as operands. */
-#define USER_REG (1 << 15)
-
-
-/* Instruction shouldn't allow 'sp' usage. */
-#define NO_SP (1 << 17)
-
-/* Instruction shouldn't allow to push a register which is used as a rptr. */
-#define NO_RPTR (1 << 18)
-
-/* Maximum operands per instruction. */
-#define MAX_OPERANDS 5
-/* Maximum register name length. */
-#define MAX_REGNAME_LEN 10
-/* Maximum instruction length. */
-#define MAX_INST_LEN 256
-
-
-/* Values defined for the flags field of a struct operand_entry. */
-
-/* Operand must be an unsigned number. */
-#define OP_UNSIGNED (1 << 0)
-/* Operand must be a signed number. */
-#define OP_SIGNED (1 << 1)
-/* Operand must be a negative number. */
-#define OP_NEG (1 << 2)
-/* A special load/stor 4-bit unsigned displacement operand. */
-#define OP_DEC (1 << 3)
-/* Operand must be an even number. */
-#define OP_EVEN (1 << 4)
-/* Operand is shifted right. */
-#define OP_SHIFT (1 << 5)
-/* Operand is shifted right and decremented. */
-#define OP_SHIFT_DEC (1 << 6)
-/* Operand has reserved escape sequences. */
-#define OP_ESC (1 << 7)
-/* Operand must be a ABS20 number. */
-#define OP_ABS20 (1 << 8)
-/* Operand must be a ABS24 number. */
-#define OP_ABS24 (1 << 9)
-/* Operand has reserved escape sequences type 1. */
-#define OP_ESC1 (1 << 10)
-
-/* Single operand description. */
-
-typedef struct
- {
- /* Operand type. */
- operand_type op_type;
- /* Operand location within the opcode. */
- unsigned int shift;
- }
-operand_desc;
-
-/* Instruction data structure used in instruction table. */
-
-typedef struct
- {
- /* Name. */
- const char *mnemonic;
- /* Size (in words). */
- unsigned int size;
- /* Constant prefix (matched by the disassembler). */
- unsigned long match; /* ie opcode */
- /* Match size (in bits). */
- /* MASK: if( (i & match_bits) == match ) then match */
- int match_bits;
- /* Attributes. */
- unsigned int flags;
- /* Operands (always last, so unreferenced operands are initialized). */
- operand_desc operands[MAX_OPERANDS];
- }
-inst;
-
-/* Data structure for a single instruction's arguments (Operands). */
-
-typedef struct
- {
- /* Register or base register. */
- reg r;
- /* Register pair register. */
- reg rp;
- /* Index register. */
- reg i_r;
- /* Processor register. */
- preg pr;
- /* Processor register. 32 bit */
- preg prp;
- /* Constant/immediate/absolute value. */
- long constant;
- /* CC code. */
- unsigned int cc;
- /* Scaled index mode. */
- unsigned int scale;
- /* Argument type. */
- argtype type;
- /* Size of the argument (in bits) required to represent. */
- int size;
- /* The type of the expression. */
- unsigned char X_op;
- }
-argument;
-
-/* Internal structure to hold the various entities
- corresponding to the current assembling instruction. */
-
-typedef struct
- {
- /* Number of arguments. */
- int nargs;
- /* The argument data structure for storing args (operands). */
- argument arg[MAX_OPERANDS];
-/* The following fields are required only by CR16-assembler. */
-#ifdef TC_CR16
- /* Expression used for setting the fixups (if any). */
- expressionS exp;
- bfd_reloc_code_real_type rtype;
-#endif /* TC_CR16 */
- /* Instruction size (in bytes). */
- int size;
- }
-ins;
-
-/* Structure to hold information about predefined operands. */
-
-typedef struct
- {
- /* Size (in bits). */
- unsigned int bit_size;
- /* Argument type. */
- argtype arg_type;
- /* One bit syntax flags. */
- int flags;
- }
-operand_entry;
-
-/* Structure to hold trap handler information. */
-
-typedef struct
- {
- /* Trap name. */
- char *name;
- /* Index in dispatch table. */
- unsigned int entry;
- }
-trap_entry;
-
-/* Structure to hold information about predefined registers. */
-
-typedef struct
- {
- /* Name (string representation). */
- char *name;
- /* Value (enum representation). */
- union
- {
- /* Register. */
- reg reg_val;
- /* processor register. */
- preg preg_val;
- } value;
- /* Register image. */
- int image;
- /* Register type. */
- reg_type type;
- }
-reg_entry;
-
-/* CR16 opcode table. */
-extern const inst cr16_instruction[];
-extern const unsigned int cr16_num_opcodes;
-#define NUMOPCODES cr16_num_opcodes
-
-/* CR16 operands table. */
-extern const operand_entry cr16_optab[];
-extern const unsigned int cr16_num_optab;
-
-/* CR16 registers table. */
-extern const reg_entry cr16_regtab[];
-extern const unsigned int cr16_num_regs;
-#define NUMREGS cr16_num_regs
-
-/* CR16 register pair table. */
-extern const reg_entry cr16_regptab[];
-extern const unsigned int cr16_num_regps;
-#define NUMREGPS cr16_num_regps
-
-/* CR16 processor registers table. */
-extern const reg_entry cr16_pregtab[];
-extern const unsigned int cr16_num_pregs;
-#define NUMPREGS cr16_num_pregs
-
-/* CR16 processor registers - 32 bit table. */
-extern const reg_entry cr16_pregptab[];
-extern const unsigned int cr16_num_pregps;
-#define NUMPREGPS cr16_num_pregps
-
-/* CR16 trap/interrupt table. */
-extern const trap_entry cr16_traps[];
-extern const unsigned int cr16_num_traps;
-#define NUMTRAPS cr16_num_traps
-
-/* CR16 CC - codes bit table. */
-extern const char * cr16_b_cond_tab[];
-extern const unsigned int cr16_num_cc;
-#define NUMCC cr16_num_cc;
-
-
-/* Table of instructions with no operands. */
-extern const char * cr16_no_op_insn[];
-
-/* Current instruction we're assembling. */
-extern const inst *instruction;
-
-/* A macro for representing the instruction "constant" opcode, that is,
- the FIXED part of the instruction. The "constant" opcode is represented
- as a 32-bit unsigned long, where OPC is expanded (by a left SHIFT)
- over that range. */
-#define BIN(OPC,SHIFT) (OPC << SHIFT)
-
-/* Is the current instruction type is TYPE ? */
-#define IS_INSN_TYPE(TYPE) \
- (CR16_INS_TYPE (instruction->flags) == TYPE)
-
-/* Is the current instruction mnemonic is MNEMONIC ? */
-#define IS_INSN_MNEMONIC(MNEMONIC) \
- (strcmp (instruction->mnemonic, MNEMONIC) == 0)
-
-/* Does the current instruction has register list ? */
-#define INST_HAS_REG_LIST \
- (instruction->flags & REG_LIST)
-
-
-/* Utility macros for string comparison. */
-#define streq(a, b) (strcmp (a, b) == 0)
-#define strneq(a, b, c) (strncmp (a, b, c) == 0)
-
-/* Long long type handling. */
-/* Replace all appearances of 'long long int' with LONGLONG. */
-typedef long long int LONGLONG;
-typedef unsigned long long ULONGLONG;
-
-#endif /* _CR16_H_ */
diff --git a/include/opcode/cris.h b/include/opcode/cris.h
deleted file mode 100644
index 00ddde0..0000000
--- a/include/opcode/cris.h
+++ /dev/null
@@ -1,366 +0,0 @@
-/* cris.h -- Header file for CRIS opcode and register tables.
- Copyright (C) 2000, 2001, 2004 Free Software Foundation, Inc.
- Contributed by Axis Communications AB, Lund, Sweden.
- Originally written for GAS 1.38.1 by Mikael Asker.
- Updated, BFDized and GNUified by Hans-Peter Nilsson.
-
-This file is part of GAS, GDB and the GNU binutils.
-
-GAS, GDB, and GNU binutils is free software; you can redistribute it
-and/or modify it under the terms of the GNU General Public License as
-published by the Free Software Foundation; either version 2, or (at your
-option) any later version.
-
-GAS, GDB, and GNU binutils are distributed in the hope that they will be
-useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef __CRIS_H_INCLUDED_
-#define __CRIS_H_INCLUDED_
-
-#if !defined(__STDC__) && !defined(const)
-#define const
-#endif
-
-
-/* Registers. */
-#define MAX_REG (15)
-#define REG_SP (14)
-#define REG_PC (15)
-
-/* CPU version control of disassembly and assembly of instructions.
- May affect how the instruction is assembled, at least the size of
- immediate operands. */
-enum cris_insn_version_usage
-{
- /* Any version. */
- cris_ver_version_all=0,
-
- /* Indeterminate (intended for disassembly only, or obsolete). */
- cris_ver_warning,
-
- /* Only for v0..3 (Etrax 1..4). */
- cris_ver_v0_3,
-
- /* Only for v3 or higher (ETRAX 4 and beyond). */
- cris_ver_v3p,
-
- /* Only for v8 (Etrax 100). */
- cris_ver_v8,
-
- /* Only for v8 or higher (ETRAX 100, ETRAX 100 LX). */
- cris_ver_v8p,
-
- /* Only for v0..10. FIXME: Not sure what to do with this. */
- cris_ver_sim_v0_10,
-
- /* Only for v0..10. */
- cris_ver_v0_10,
-
- /* Only for v3..10. (ETRAX 4, ETRAX 100 and ETRAX 100 LX). */
- cris_ver_v3_10,
-
- /* Only for v8..10 (ETRAX 100 and ETRAX 100 LX). */
- cris_ver_v8_10,
-
- /* Only for v10 (ETRAX 100 LX) and same series. */
- cris_ver_v10,
-
- /* Only for v10 (ETRAX 100 LX) and same series. */
- cris_ver_v10p,
-
- /* Only for v32 or higher (codename GUINNESS).
- Of course some or all these of may change to cris_ver_v32p if/when
- there's a new revision. */
- cris_ver_v32p
-};
-
-
-/* Special registers. */
-struct cris_spec_reg
-{
- const char *const name;
- unsigned int number;
-
- /* The size of the register. */
- unsigned int reg_size;
-
- /* What CPU version the special register of that name is implemented
- in. If cris_ver_warning, emit an unimplemented-warning. */
- enum cris_insn_version_usage applicable_version;
-
- /* There might be a specific warning for using a special register
- here. */
- const char *const warning;
-};
-extern const struct cris_spec_reg cris_spec_regs[];
-
-
-/* Support registers (kind of special too, but not named as such). */
-struct cris_support_reg
-{
- const char *const name;
- unsigned int number;
-};
-extern const struct cris_support_reg cris_support_regs[];
-
-struct cris_cond15
-{
- /* The name of the condition. */
- const char *const name;
-
- /* What CPU version this condition name applies to. */
- enum cris_insn_version_usage applicable_version;
-};
-extern const struct cris_cond15 cris_conds15[];
-
-/* Opcode-dependent constants. */
-#define AUTOINCR_BIT (0x04)
-
-/* Prefixes. */
-#define BDAP_QUICK_OPCODE (0x0100)
-#define BDAP_QUICK_Z_BITS (0x0e00)
-
-#define BIAP_OPCODE (0x0540)
-#define BIAP_Z_BITS (0x0a80)
-
-#define DIP_OPCODE (0x0970)
-#define DIP_Z_BITS (0xf280)
-
-#define BDAP_INDIR_LOW (0x40)
-#define BDAP_INDIR_LOW_Z (0x80)
-#define BDAP_INDIR_HIGH (0x09)
-#define BDAP_INDIR_HIGH_Z (0x02)
-
-#define BDAP_INDIR_OPCODE (BDAP_INDIR_HIGH * 0x0100 + BDAP_INDIR_LOW)
-#define BDAP_INDIR_Z_BITS (BDAP_INDIR_HIGH_Z * 0x100 + BDAP_INDIR_LOW_Z)
-#define BDAP_PC_LOW (BDAP_INDIR_LOW + REG_PC)
-#define BDAP_INCR_HIGH (BDAP_INDIR_HIGH + AUTOINCR_BIT)
-
-/* No prefix must have this code for its "match" bits in the
- opcode-table. "BCC .+2" will do nicely. */
-#define NO_CRIS_PREFIX 0
-
-/* Definitions for condition codes. */
-#define CC_CC 0x0
-#define CC_HS 0x0
-#define CC_CS 0x1
-#define CC_LO 0x1
-#define CC_NE 0x2
-#define CC_EQ 0x3
-#define CC_VC 0x4
-#define CC_VS 0x5
-#define CC_PL 0x6
-#define CC_MI 0x7
-#define CC_LS 0x8
-#define CC_HI 0x9
-#define CC_GE 0xA
-#define CC_LT 0xB
-#define CC_GT 0xC
-#define CC_LE 0xD
-#define CC_A 0xE
-#define CC_EXT 0xF
-
-/* A table of strings "cc", "cs"... indexed with condition code
- values as above. */
-extern const char *const cris_cc_strings[];
-
-/* Bcc quick. */
-#define BRANCH_QUICK_LOW (0)
-#define BRANCH_QUICK_HIGH (0)
-#define BRANCH_QUICK_OPCODE (BRANCH_QUICK_HIGH * 0x0100 + BRANCH_QUICK_LOW)
-#define BRANCH_QUICK_Z_BITS (0x0F00)
-
-/* BA quick. */
-#define BA_QUICK_HIGH (BRANCH_QUICK_HIGH + CC_A * 0x10)
-#define BA_QUICK_OPCODE (BA_QUICK_HIGH * 0x100 + BRANCH_QUICK_LOW)
-
-/* Bcc [PC+]. */
-#define BRANCH_PC_LOW (0xFF)
-#define BRANCH_INCR_HIGH (0x0D)
-#define BA_PC_INCR_OPCODE \
- ((BRANCH_INCR_HIGH + CC_A * 0x10) * 0x0100 + BRANCH_PC_LOW)
-
-/* Jump. */
-/* Note that old versions generated special register 8 (in high bits)
- and not-that-old versions recognized it as a jump-instruction.
- That opcode now belongs to JUMPU. */
-#define JUMP_INDIR_OPCODE (0x0930)
-#define JUMP_INDIR_Z_BITS (0xf2c0)
-#define JUMP_PC_INCR_OPCODE \
- (JUMP_INDIR_OPCODE + AUTOINCR_BIT * 0x0100 + REG_PC)
-
-#define MOVE_M_TO_PREG_OPCODE 0x0a30
-#define MOVE_M_TO_PREG_ZBITS 0x01c0
-
-/* BDAP.D N,PC. */
-#define MOVE_PC_INCR_OPCODE_PREFIX \
- (((BDAP_INCR_HIGH | (REG_PC << 4)) << 8) | BDAP_PC_LOW | (2 << 4))
-#define MOVE_PC_INCR_OPCODE_SUFFIX \
- (MOVE_M_TO_PREG_OPCODE | REG_PC | (AUTOINCR_BIT << 8))
-
-#define JUMP_PC_INCR_OPCODE_V32 (0x0DBF)
-
-/* BA DWORD (V32). */
-#define BA_DWORD_OPCODE (0x0EBF)
-
-/* Nop. */
-#define NOP_OPCODE (0x050F)
-#define NOP_Z_BITS (0xFFFF ^ NOP_OPCODE)
-
-#define NOP_OPCODE_V32 (0x05B0)
-#define NOP_Z_BITS_V32 (0xFFFF ^ NOP_OPCODE_V32)
-
-/* For the compatibility mode, let's use "MOVE R0,P0". Doesn't affect
- registers or flags. Unfortunately shuts off interrupts for one cycle
- for < v32, but there doesn't seem to be any alternative without that
- effect. */
-#define NOP_OPCODE_COMMON (0x630)
-#define NOP_OPCODE_ZBITS_COMMON (0xffff & ~NOP_OPCODE_COMMON)
-
-/* LAPC.D */
-#define LAPC_DWORD_OPCODE (0x0D7F)
-#define LAPC_DWORD_Z_BITS (0x0fff & ~LAPC_DWORD_OPCODE)
-
-/* Structure of an opcode table entry. */
-enum cris_imm_oprnd_size_type
-{
- /* No size is applicable. */
- SIZE_NONE,
-
- /* Always 32 bits. */
- SIZE_FIX_32,
-
- /* Indicated by size of special register. */
- SIZE_SPEC_REG,
-
- /* Indicated by size field, signed. */
- SIZE_FIELD_SIGNED,
-
- /* Indicated by size field, unsigned. */
- SIZE_FIELD_UNSIGNED,
-
- /* Indicated by size field, no sign implied. */
- SIZE_FIELD
-};
-
-/* For GDB. FIXME: Is this the best way to handle opcode
- interpretation? */
-enum cris_op_type
-{
- cris_not_implemented_op = 0,
- cris_abs_op,
- cris_addi_op,
- cris_asr_op,
- cris_asrq_op,
- cris_ax_ei_setf_op,
- cris_bdap_prefix,
- cris_biap_prefix,
- cris_break_op,
- cris_btst_nop_op,
- cris_clearf_di_op,
- cris_dip_prefix,
- cris_dstep_logshift_mstep_neg_not_op,
- cris_eight_bit_offset_branch_op,
- cris_move_mem_to_reg_movem_op,
- cris_move_reg_to_mem_movem_op,
- cris_move_to_preg_op,
- cris_muls_op,
- cris_mulu_op,
- cris_none_reg_mode_add_sub_cmp_and_or_move_op,
- cris_none_reg_mode_clear_test_op,
- cris_none_reg_mode_jump_op,
- cris_none_reg_mode_move_from_preg_op,
- cris_quick_mode_add_sub_op,
- cris_quick_mode_and_cmp_move_or_op,
- cris_quick_mode_bdap_prefix,
- cris_reg_mode_add_sub_cmp_and_or_move_op,
- cris_reg_mode_clear_op,
- cris_reg_mode_jump_op,
- cris_reg_mode_move_from_preg_op,
- cris_reg_mode_test_op,
- cris_scc_op,
- cris_sixteen_bit_offset_branch_op,
- cris_three_operand_add_sub_cmp_and_or_op,
- cris_three_operand_bound_op,
- cris_two_operand_bound_op,
- cris_xor_op
-};
-
-struct cris_opcode
-{
- /* The name of the insn. */
- const char *name;
-
- /* Bits that must be 1 for a match. */
- unsigned int match;
-
- /* Bits that must be 0 for a match. */
- unsigned int lose;
-
- /* See the table in "opcodes/cris-opc.c". */
- const char *args;
-
- /* Nonzero if this is a delayed branch instruction. */
- char delayed;
-
- /* Size of immediate operands. */
- enum cris_imm_oprnd_size_type imm_oprnd_size;
-
- /* Indicates which version this insn was first implemented in. */
- enum cris_insn_version_usage applicable_version;
-
- /* What kind of operation this is. */
- enum cris_op_type op;
-};
-extern const struct cris_opcode cris_opcodes[];
-
-
-/* These macros are for the target-specific flags in disassemble_info
- used at disassembly. */
-
-/* This insn accesses memory. This flag is more trustworthy than
- checking insn_type for "dis_dref" which does not work for
- e.g. "JSR [foo]". */
-#define CRIS_DIS_FLAG_MEMREF (1 << 0)
-
-/* The "target" field holds a register number. */
-#define CRIS_DIS_FLAG_MEM_TARGET_IS_REG (1 << 1)
-
-/* The "target2" field holds a register number; add it to "target". */
-#define CRIS_DIS_FLAG_MEM_TARGET2_IS_REG (1 << 2)
-
-/* Yet another add-on: the register in "target2" must be multiplied
- by 2 before adding to "target". */
-#define CRIS_DIS_FLAG_MEM_TARGET2_MULT2 (1 << 3)
-
-/* Yet another add-on: the register in "target2" must be multiplied
- by 4 (mutually exclusive with .._MULT2). */
-#define CRIS_DIS_FLAG_MEM_TARGET2_MULT4 (1 << 4)
-
-/* The register in "target2" is an indirect memory reference (of the
- register there), add to "target". Assumed size is dword (mutually
- exclusive with .._MULT[24]). */
-#define CRIS_DIS_FLAG_MEM_TARGET2_MEM (1 << 5)
-
-/* Add-on to CRIS_DIS_FLAG_MEM_TARGET2_MEM; the memory access is "byte";
- sign-extended before adding to "target". */
-#define CRIS_DIS_FLAG_MEM_TARGET2_MEM_BYTE (1 << 6)
-
-/* Add-on to CRIS_DIS_FLAG_MEM_TARGET2_MEM; the memory access is "word";
- sign-extended before adding to "target". */
-#define CRIS_DIS_FLAG_MEM_TARGET2_MEM_WORD (1 << 7)
-
-#endif /* __CRIS_H_INCLUDED_ */
-
-/*
- * Local variables:
- * eval: (c-set-style "gnu")
- * indent-tabs-mode: t
- * End:
- */
diff --git a/include/opcode/crx.h b/include/opcode/crx.h
deleted file mode 100644
index 66def6b..0000000
--- a/include/opcode/crx.h
+++ /dev/null
@@ -1,418 +0,0 @@
-/* crx.h -- Header file for CRX opcode and register tables.
- Copyright 2004 Free Software Foundation, Inc.
- Contributed by Tomer Levi, NSC, Israel.
- Originally written for GAS 2.12 by Tomer Levi, NSC, Israel.
- Updates, BFDizing, GNUifying and ELF support by Tomer Levi.
-
- This file is part of GAS, GDB and the GNU binutils.
-
- GAS, GDB, and GNU binutils is free software; you can redistribute it
- and/or modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2, or (at your
- option) any later version.
-
- GAS, GDB, and GNU binutils are distributed in the hope that they will be
- useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _CRX_H_
-#define _CRX_H_
-
-/* CRX core/debug Registers :
- The enums are used as indices to CRX registers table (crx_regtab).
- Therefore, order MUST be preserved. */
-
-typedef enum
- {
- /* 32-bit general purpose registers. */
- r0, r1, r2, r3, r4, r5, r6, r7, r8, r9,
- r10, r11, r12, r13, r14, r15, ra, sp,
- /* 32-bit user registers. */
- u0, u1, u2, u3, u4, u5, u6, u7, u8, u9,
- u10, u11, u12, u13, u14, u15, ura, usp,
- /* hi and lo registers. */
- hi, lo,
- /* hi and lo user registers. */
- uhi, ulo,
- /* Processor Status Register. */
- psr,
- /* Interrupt Base Register. */
- intbase,
- /* Interrupt Stack Pointer Register. */
- isp,
- /* Configuration Register. */
- cfg,
- /* Coprocessor Configuration Register. */
- cpcfg,
- /* Coprocessor Enable Register. */
- cen,
- /* Not a register. */
- nullregister,
- MAX_REG
- }
-reg;
-
-/* CRX Coprocessor registers and special registers :
- The enums are used as indices to CRX coprocessor registers table
- (crx_copregtab). Therefore, order MUST be preserved. */
-
-typedef enum
- {
- /* Coprocessor registers. */
- c0 = MAX_REG, c1, c2, c3, c4, c5, c6, c7, c8,
- c9, c10, c11, c12, c13, c14, c15,
- /* Coprocessor special registers. */
- cs0, cs1 ,cs2, cs3, cs4, cs5, cs6, cs7, cs8,
- cs9, cs10, cs11, cs12, cs13, cs14, cs15,
- /* Not a Coprocessor register. */
- nullcopregister,
- MAX_COPREG
- }
-copreg;
-
-/* CRX Register types. */
-
-typedef enum
- {
- CRX_R_REGTYPE, /* r<N> */
- CRX_U_REGTYPE, /* u<N> */
- CRX_C_REGTYPE, /* c<N> */
- CRX_CS_REGTYPE, /* cs<N> */
- CRX_CFG_REGTYPE /* configuration register */
- }
-reg_type;
-
-/* CRX argument types :
- The argument types correspond to instructions operands
-
- Argument types :
- r - register
- c - constant
- i - immediate
- idxr - index register
- rbase - register base
- s - star ('*')
- copr - coprocessor register
- copsr - coprocessor special register. */
-
-typedef enum
- {
- arg_r, arg_c, arg_cr, arg_ic, arg_icr, arg_sc,
- arg_idxr, arg_rbase, arg_copr, arg_copsr,
- /* Not an argument. */
- nullargs
- }
-argtype;
-
-/* CRX operand types :
- The operand types correspond to instructions operands. */
-
-typedef enum
- {
- dummy,
- /* 4-bit encoded constant. */
- cst4,
- /* N-bit immediate. */
- i16, i32,
- /* N-bit unsigned immediate. */
- ui3, ui4, ui5, ui16,
- /* N-bit signed displacement. */
- disps9, disps17, disps25, disps32,
- /* N-bit unsigned displacement. */
- dispu5,
- /* N-bit escaped displacement. */
- dispe9,
- /* N-bit absolute address. */
- abs16, abs32,
- /* Register relative. */
- rbase, rbase_dispu4,
- rbase_disps12, rbase_disps16, rbase_disps28, rbase_disps32,
- /* Register index. */
- rindex_disps6, rindex_disps22,
- /* 4-bit genaral-purpose register specifier. */
- regr,
- /* 8-bit register address space. */
- regr8,
- /* coprocessor register. */
- copregr,
- /* coprocessor special register. */
- copsregr,
- /* Not an operand. */
- nulloperand,
- /* Maximum supported operand. */
- MAX_OPRD
- }
-operand_type;
-
-/* CRX instruction types. */
-
-#define NO_TYPE_INS 0
-#define ARITH_INS 1
-#define LD_STOR_INS 2
-#define BRANCH_INS 3
-#define ARITH_BYTE_INS 4
-#define CMPBR_INS 5
-#define SHIFT_INS 6
-#define BRANCH_NEQ_INS 7
-#define LD_STOR_INS_INC 8
-#define STOR_IMM_INS 9
-#define CSTBIT_INS 10
-#define COP_BRANCH_INS 11
-#define COP_REG_INS 12
-#define COPS_REG_INS 13
-#define DCR_BRANCH_INS 14
-
-/* Maximum value supported for instruction types. */
-#define CRX_INS_MAX (1 << 4)
-/* Mask to record an instruction type. */
-#define CRX_INS_MASK (CRX_INS_MAX - 1)
-/* Return instruction type, given instruction's attributes. */
-#define CRX_INS_TYPE(attr) ((attr) & CRX_INS_MASK)
-
-/* Indicates whether this instruction has a register list as parameter. */
-#define REG_LIST CRX_INS_MAX
-/* The operands in binary and assembly are placed in reverse order.
- load - (REVERSE_MATCH)/store - (! REVERSE_MATCH). */
-#define REVERSE_MATCH (1 << 5)
-
-/* Kind of displacement map used DISPU[BWD]4. */
-#define DISPUB4 (1 << 6)
-#define DISPUW4 (1 << 7)
-#define DISPUD4 (1 << 8)
-#define DISPU4MAP (DISPUB4 | DISPUW4 | DISPUD4)
-
-/* Printing formats, where the instruction prefix isn't consecutive. */
-#define FMT_1 (1 << 9) /* 0xF0F00000 */
-#define FMT_2 (1 << 10) /* 0xFFF0FF00 */
-#define FMT_3 (1 << 11) /* 0xFFF00F00 */
-#define FMT_4 (1 << 12) /* 0xFFF0F000 */
-#define FMT_5 (1 << 13) /* 0xFFF0FFF0 */
-#define FMT_CRX (FMT_1 | FMT_2 | FMT_3 | FMT_4 | FMT_5)
-
-/* Indicates whether this instruction can be relaxed. */
-#define RELAXABLE (1 << 14)
-
-/* Indicates that instruction uses user registers (and not
- general-purpose registers) as operands. */
-#define USER_REG (1 << 15)
-
-/* Indicates that instruction can perfom a cst4 mapping. */
-#define CST4MAP (1 << 16)
-
-/* Instruction shouldn't allow 'sp' usage. */
-#define NO_SP (1 << 17)
-
-/* Instruction shouldn't allow to push a register which is used as a rptr. */
-#define NO_RPTR (1 << 18)
-
-/* Maximum operands per instruction. */
-#define MAX_OPERANDS 5
-/* Maximum register name length. */
-#define MAX_REGNAME_LEN 10
-/* Maximum instruction length. */
-#define MAX_INST_LEN 256
-
-
-/* Values defined for the flags field of a struct operand_entry. */
-
-/* Operand must be an unsigned number. */
-#define OP_UNSIGNED (1 << 0)
-/* Operand must be a signed number. */
-#define OP_SIGNED (1 << 1)
-/* A special arithmetic 4-bit constant operand. */
-#define OP_CST4 (1 << 2)
-/* A special load/stor 4-bit unsigned displacement operand. */
-#define OP_DISPU4 (1 << 3)
-/* Operand must be an even number. */
-#define OP_EVEN (1 << 4)
-/* Operand is shifted right. */
-#define OP_SHIFT (1 << 5)
-/* Operand is shifted right and decremented. */
-#define OP_SHIFT_DEC (1 << 6)
-/* Operand has reserved escape sequences. */
-#define OP_ESC (1 << 7)
-/* Operand is used only for the upper 64 KB (FFFF0000 to FFFFFFFF). */
-#define OP_UPPER_64KB (1 << 8)
-
-/* Single operand description. */
-
-typedef struct
- {
- /* Operand type. */
- operand_type op_type;
- /* Operand location within the opcode. */
- unsigned int shift;
- }
-operand_desc;
-
-/* Instruction data structure used in instruction table. */
-
-typedef struct
- {
- /* Name. */
- const char *mnemonic;
- /* Size (in words). */
- unsigned int size;
- /* Constant prefix (matched by the disassembler). */
- unsigned long match;
- /* Match size (in bits). */
- int match_bits;
- /* Attributes. */
- unsigned int flags;
- /* Operands (always last, so unreferenced operands are initialized). */
- operand_desc operands[MAX_OPERANDS];
- }
-inst;
-
-/* Data structure for a single instruction's arguments (Operands). */
-
-typedef struct
- {
- /* Register or base register. */
- reg r;
- /* Index register. */
- reg i_r;
- /* Coprocessor register. */
- copreg cr;
- /* Constant/immediate/absolute value. */
- long constant;
- /* Scaled index mode. */
- unsigned int scale;
- /* Argument type. */
- argtype type;
- /* Size of the argument (in bits) required to represent. */
- int size;
- /* The type of the expression. */
- unsigned char X_op;
- }
-argument;
-
-/* Internal structure to hold the various entities
- corresponding to the current assembling instruction. */
-
-typedef struct
- {
- /* Number of arguments. */
- int nargs;
- /* The argument data structure for storing args (operands). */
- argument arg[MAX_OPERANDS];
-/* The following fields are required only by CRX-assembler. */
-#ifdef TC_CRX
- /* Expression used for setting the fixups (if any). */
- expressionS exp;
- bfd_reloc_code_real_type rtype;
-#endif /* TC_CRX */
- /* Instruction size (in bytes). */
- int size;
- }
-ins;
-
-/* Structure to hold information about predefined operands. */
-
-typedef struct
- {
- /* Size (in bits). */
- unsigned int bit_size;
- /* Argument type. */
- argtype arg_type;
- /* One bit syntax flags. */
- int flags;
- }
-operand_entry;
-
-/* Structure to hold trap handler information. */
-
-typedef struct
- {
- /* Trap name. */
- char *name;
- /* Index in dispatch table. */
- unsigned int entry;
- }
-trap_entry;
-
-/* Structure to hold information about predefined registers. */
-
-typedef struct
- {
- /* Name (string representation). */
- char *name;
- /* Value (enum representation). */
- union
- {
- /* Register. */
- reg reg_val;
- /* Coprocessor register. */
- copreg copreg_val;
- } value;
- /* Register image. */
- int image;
- /* Register type. */
- reg_type type;
- }
-reg_entry;
-
-/* Structure to hold a cst4 operand mapping. */
-
-/* CRX opcode table. */
-extern const inst crx_instruction[];
-extern const int crx_num_opcodes;
-#define NUMOPCODES crx_num_opcodes
-
-/* CRX operands table. */
-extern const operand_entry crx_optab[];
-
-/* CRX registers table. */
-extern const reg_entry crx_regtab[];
-extern const int crx_num_regs;
-#define NUMREGS crx_num_regs
-
-/* CRX coprocessor registers table. */
-extern const reg_entry crx_copregtab[];
-extern const int crx_num_copregs;
-#define NUMCOPREGS crx_num_copregs
-
-/* CRX trap/interrupt table. */
-extern const trap_entry crx_traps[];
-extern const int crx_num_traps;
-#define NUMTRAPS crx_num_traps
-
-/* cst4 operand mapping. */
-extern const long cst4_map[];
-extern const int cst4_maps;
-
-/* Table of instructions with no operands. */
-extern const char* no_op_insn[];
-
-/* Current instruction we're assembling. */
-extern const inst *instruction;
-
-/* A macro for representing the instruction "constant" opcode, that is,
- the FIXED part of the instruction. The "constant" opcode is represented
- as a 32-bit unsigned long, where OPC is expanded (by a left SHIFT)
- over that range. */
-#define BIN(OPC,SHIFT) (OPC << SHIFT)
-
-/* Is the current instruction type is TYPE ? */
-#define IS_INSN_TYPE(TYPE) \
- (CRX_INS_TYPE(instruction->flags) == TYPE)
-
-/* Is the current instruction mnemonic is MNEMONIC ? */
-#define IS_INSN_MNEMONIC(MNEMONIC) \
- (strcmp(instruction->mnemonic,MNEMONIC) == 0)
-
-/* Does the current instruction has register list ? */
-#define INST_HAS_REG_LIST \
- (instruction->flags & REG_LIST)
-
-/* Long long type handling. */
-/* Replace all appearances of 'long long int' with LONGLONG. */
-typedef long long int LONGLONG;
-typedef unsigned long long ULONGLONG;
-
-#endif /* _CRX_H_ */
diff --git a/include/opcode/d10v.h b/include/opcode/d10v.h
deleted file mode 100644
index c96ddeb..0000000
--- a/include/opcode/d10v.h
+++ /dev/null
@@ -1,208 +0,0 @@
-/* d10v.h -- Header file for D10V opcode table
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003
- Free Software Foundation, Inc.
- Written by Martin Hunt (hunt@cygnus.com), Cygnus Support
-
-This file is part of GDB, GAS, and the GNU binutils.
-
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them under the terms of the GNU General Public
-License as published by the Free Software Foundation; either version
-1, or (at your option) any later version.
-
-GDB, GAS, and the GNU binutils are distributed in the hope that they
-will be useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING. If not, write to the Free
-Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef D10V_H
-#define D10V_H
-
-/* Format Specifier */
-#define FM00 0
-#define FM01 0x40000000
-#define FM10 0x80000000
-#define FM11 0xC0000000
-
-#define NOP 0x5e00
-#define OPCODE_DIVS 0x14002800
-
-/* The opcode table is an array of struct d10v_opcode. */
-
-struct d10v_opcode
-{
- /* The opcode name. */
- const char *name;
-
- /* the opcode format */
- int format;
-
- /* These numbers were picked so we can do if( i & SHORT_OPCODE) */
-#define SHORT_OPCODE 1
-#define LONG_OPCODE 8
-#define SHORT_2 1 /* short with 2 operands */
-#define SHORT_B 3 /* short with 8-bit branch */
-#define LONG_B 8 /* long with 16-bit branch */
-#define LONG_L 10 /* long with 3 operands */
-#define LONG_R 12 /* reserved */
-
- /* just a placeholder for variable-length instructions */
- /* for example, "bra" will be a fake for "bra.s" and bra.l" */
- /* which will immediately follow in the opcode table. */
-#define OPCODE_FAKE 32
-
- /* the number of cycles */
- int cycles;
-
- /* the execution unit(s) used */
- int unit;
-#define EITHER 0
-#define IU 1
-#define MU 2
-#define BOTH 3
-
- /* execution type; parallel or sequential */
- /* this field is used to decide if two instructions */
- /* can be executed in parallel */
- int exec_type;
-#define PARONLY 1 /* parallel only */
-#define SEQ 2 /* must be sequential */
-#define PAR 4 /* may be parallel */
-#define BRANCH_LINK 8 /* subroutine call. must be aligned */
-#define RMEM 16 /* reads memory */
-#define WMEM 32 /* writes memory */
-#define RF0 64 /* reads f0 */
-#define WF0 128 /* modifies f0 */
-#define WCAR 256 /* write Carry */
-#define BRANCH 512 /* branch, no link */
-#define ALONE 1024 /* short but pack with a NOP if on asm line alone */
-
- /* the opcode */
- long opcode;
-
- /* mask. if( (i & mask) == opcode ) then match */
- long mask;
-
- /* An array of operand codes. Each code is an index into the
- operand table. They appear in the order which the operands must
- appear in assembly code, and are terminated by a zero. */
- unsigned char operands[6];
-};
-
-/* The table itself is sorted by major opcode number, and is otherwise
- in the order in which the disassembler should consider
- instructions. */
-extern const struct d10v_opcode d10v_opcodes[];
-extern const int d10v_num_opcodes;
-
-/* The operands table is an array of struct d10v_operand. */
-struct d10v_operand
-{
- /* The number of bits in the operand. */
- int bits;
-
- /* How far the operand is left shifted in the instruction. */
- int shift;
-
- /* One bit syntax flags. */
- int flags;
-};
-
-/* Elements in the table are retrieved by indexing with values from
- the operands field of the d10v_opcodes table. */
-
-extern const struct d10v_operand d10v_operands[];
-
-/* Values defined for the flags field of a struct d10v_operand. */
-
-/* the operand must be an even number */
-#define OPERAND_EVEN (1)
-
-/* the operand must be an odd number */
-#define OPERAND_ODD (2)
-
-/* this is the destination register; it will be modified */
-/* this is used by the optimizer */
-#define OPERAND_DEST (4)
-
-/* number or symbol */
-#define OPERAND_NUM (8)
-
-/* address or label */
-#define OPERAND_ADDR (0x10)
-
-/* register */
-#define OPERAND_REG (0x20)
-
-/* postincrement + */
-#define OPERAND_PLUS (0x40)
-
-/* postdecrement - */
-#define OPERAND_MINUS (0x80)
-
-/* @ */
-#define OPERAND_ATSIGN (0x100)
-
-/* @( */
-#define OPERAND_ATPAR (0x200)
-
-/* accumulator 0 */
-#define OPERAND_ACC0 (0x400)
-
-/* accumulator 1 */
-#define OPERAND_ACC1 (0x800)
-
-/* f0 / f1 flag register */
-#define OPERAND_FFLAG (0x1000)
-
-/* c flag register */
-#define OPERAND_CFLAG (0x2000)
-
-/* control register */
-#define OPERAND_CONTROL (0x4000)
-
-/* predecrement mode '@-sp' */
-#define OPERAND_ATMINUS (0x8000)
-
-/* signed number */
-#define OPERAND_SIGNED (0x10000)
-
-/* special accumulator shifts need a 4-bit number */
-/* 1 <= x <= 16 */
-#define OPERAND_SHIFT (0x20000)
-
-/* general purpose register */
-#define OPERAND_GPR (0x40000)
-
-/* special imm3 values with range restricted to -2 <= imm3 <= 3 */
-/* needed for rac/rachi */
-#define RESTRICTED_NUM3 (0x80000)
-
-/* Pre-decrement is only supported for SP. */
-#define OPERAND_SP (0x100000)
-
-/* Post-decrement is not supported for SP. Like OPERAND_EVEN, and
- unlike OPERAND_SP, this flag doesn't prevent the instruction from
- matching, it only fails validation later on. */
-#define OPERAND_NOSP (0x200000)
-
-/* Structure to hold information about predefined registers. */
-struct pd_reg
-{
- char *name; /* name to recognize */
- char *pname; /* name to print for this register */
- int value;
-};
-
-extern const struct pd_reg d10v_predefined_registers[];
-int d10v_reg_name_cnt (void);
-
-/* an expressionS only has one register type, so we fake it */
-/* by setting high bits to indicate type */
-#define REGISTER_MASK 0xFF
-
-#endif /* D10V_H */
diff --git a/include/opcode/d30v.h b/include/opcode/d30v.h
deleted file mode 100644
index 7aa5bb6..0000000
--- a/include/opcode/d30v.h
+++ /dev/null
@@ -1,286 +0,0 @@
-/* d30v.h -- Header file for D30V opcode table
- Copyright 1997, 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
- Written by Martin Hunt (hunt@cygnus.com), Cygnus Solutions
-
-This file is part of GDB, GAS, and the GNU binutils.
-
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them under the terms of the GNU General Public
-License as published by the Free Software Foundation; either version
-1, or (at your option) any later version.
-
-GDB, GAS, and the GNU binutils are distributed in the hope that they
-will be useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING. If not, write to the Free
-Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef D30V_H
-#define D30V_H
-
-#define NOP 0x00F00000
-
-/* Structure to hold information about predefined registers. */
-struct pd_reg
-{
- char *name; /* name to recognize */
- char *pname; /* name to print for this register */
- int value;
-};
-
-extern const struct pd_reg pre_defined_registers[];
-int reg_name_cnt (void);
-
-/* the number of control registers */
-#define MAX_CONTROL_REG 64
-
-/* define the format specifiers */
-#define FM00 0
-#define FM01 0x80000000
-#define FM10 0x8000000000000000LL
-#define FM11 0x8000000080000000LL
-
-/* define the opcode classes */
-#define BRA 0
-#define LOGIC 1
-#define IMEM 2
-#define IALU1 4
-#define IALU2 5
-
-/* define the execution condition codes */
-#define ECC_AL 0 /* ALways (default) */
-#define ECC_TX 1 /* F0=True, F1=Don't care */
-#define ECC_FX 2 /* F0=False, F1=Don't care */
-#define ECC_XT 3 /* F0=Don't care, F1=True */
-#define ECC_XF 4 /* F0=Don't care, F1=False */
-#define ECC_TT 5 /* F0=True, F1=True */
-#define ECC_TF 6 /* F0=True, F1=False */
-#define ECC_RESERVED 7 /* reserved */
-#define ECC_MAX ECC_RESERVED
-
-extern const char *d30v_ecc_names[];
-
-/* condition code table for CMP and CMPU */
-extern const char *d30v_cc_names[];
-
-/* The opcode table is an array of struct d30v_opcode. */
-struct d30v_opcode
-{
- /* The opcode name. */
- const char *name;
-
- /* the opcode */
- int op1; /* first part, "IALU1" for example */
- int op2; /* the rest of the opcode */
-
- /* opcode format(s). These numbers correspond to entries */
- /* in the d30v_format_table */
- unsigned char format[4];
-
-#define SHORT_M 1
-#define SHORT_M2 5 /* for ld2w and st2w */
-#define SHORT_A 9
-#define SHORT_B1 11
-#define SHORT_B2 12
-#define SHORT_B2r 13
-#define SHORT_B3 14
-#define SHORT_B3r 16
-#define SHORT_B3b 18
-#define SHORT_B3br 20
-#define SHORT_D1r 22
-#define SHORT_D2 24
-#define SHORT_D2r 26
-#define SHORT_D2Br 28
-#define SHORT_U 30 /* unary SHORT_A. ABS for example */
-#define SHORT_F 31 /* SHORT_A with flag registers */
-#define SHORT_AF 33 /* SHORT_A with only the first register a flag register */
-#define SHORT_T 35 /* for trap instruction */
-#define SHORT_A5 36 /* SHORT_A with a 5-bit immediate instead of 6 */
-#define SHORT_CMP 38 /* special form for CMPcc */
-#define SHORT_CMPU 40 /* special form for CMPUcc */
-#define SHORT_A1 42 /* special form of SHORT_A for MACa opcodes where a=1 */
-#define SHORT_AA 44 /* SHORT_A with the first register an accumulator */
-#define SHORT_RA 46 /* SHORT_A with the second register an accumulator */
-#define SHORT_MODINC 48
-#define SHORT_MODDEC 49
-#define SHORT_C1 50
-#define SHORT_C2 51
-#define SHORT_UF 52
-#define SHORT_A2 53
-#define SHORT_NONE 55 /* no operands */
-#define SHORT_AR 56 /* like SHORT_AA but only accept register as third parameter */
-#define LONG 57
-#define LONG_U 58 /* unary LONG */
-#define LONG_Ur 59 /* LONG pc-relative */
-#define LONG_CMP 60 /* special form for CMPcc and CMPUcc */
-#define LONG_M 61 /* Memory long for ldb, stb */
-#define LONG_M2 62 /* Memory long for ld2w, st2w */
-#define LONG_2 63 /* LONG with 2 operands; jmptnz */
-#define LONG_2r 64 /* LONG with 2 operands; bratnz */
-#define LONG_2b 65 /* LONG_2 with modifier of 3 */
-#define LONG_2br 66 /* LONG_2r with modifier of 3 */
-#define LONG_D 67 /* for DJMPI */
-#define LONG_Dr 68 /* for DBRAI */
-#define LONG_Dbr 69 /* for repeati */
-
- /* the execution unit(s) used */
- int unit;
-#define EITHER 0
-#define IU 1
-#define MU 2
-#define EITHER_BUT_PREFER_MU 3
-
- /* this field is used to decide if two instructions */
- /* can be executed in parallel */
- long flags_used;
- long flags_set;
-#define FLAG_0 (1L<<0)
-#define FLAG_1 (1L<<1)
-#define FLAG_2 (1L<<2)
-#define FLAG_3 (1L<<3)
-#define FLAG_4 (1L<<4) /* S (saturation) */
-#define FLAG_5 (1L<<5) /* V (overflow) */
-#define FLAG_6 (1L<<6) /* VA (accumulated overflow) */
-#define FLAG_7 (1L<<7) /* C (carry/borrow) */
-#define FLAG_SM (1L<<8) /* SM (stack mode) */
-#define FLAG_RP (1L<<9) /* RP (repeat enable) */
-#define FLAG_CONTROL (1L<<10) /* control registers */
-#define FLAG_A0 (1L<<11) /* A0 */
-#define FLAG_A1 (1L<<12) /* A1 */
-#define FLAG_JMP (1L<<13) /* instruction is a branch */
-#define FLAG_JSR (1L<<14) /* subroutine call. must be aligned */
-#define FLAG_MEM (1L<<15) /* reads/writes memory */
-#define FLAG_NOT_WITH_ADDSUBppp (1L<<16) /* Old meaning: a 2 word 4 byter operation
- New meaning: operation cannot be
- combined in parallel with ADD/SUBppp. */
-#define FLAG_MUL16 (1L<<17) /* 16 bit multiply */
-#define FLAG_MUL32 (1L<<18) /* 32 bit multiply */
-#define FLAG_ADDSUBppp (1L<<19) /* ADDppp or SUBppp */
-#define FLAG_DELAY (1L<<20) /* This is a delayed branch or jump */
-#define FLAG_LKR (1L<<21) /* insn in left slot kills right slot */
-#define FLAG_CVVA (FLAG_5|FLAG_6|FLAG_7)
-#define FLAG_C FLAG_7
-#define FLAG_ALL (FLAG_0 | \
- FLAG_1 | \
- FLAG_2 | \
- FLAG_3 | \
- FLAG_4 | \
- FLAG_5 | \
- FLAG_6 | \
- FLAG_7 | \
- FLAG_SM | \
- FLAG_RP | \
- FLAG_CONTROL)
-
- int reloc_flag;
-#define RELOC_PCREL 1
-#define RELOC_ABS 2
-};
-
-extern const struct d30v_opcode d30v_opcode_table[];
-extern const int d30v_num_opcodes;
-
-/* The operands table is an array of struct d30v_operand. */
-struct d30v_operand
-{
- /* the length of the field */
- int length;
-
- /* The number of significant bits in the operand. */
- int bits;
-
- /* position relative to Ra */
- int position;
-
- /* syntax flags. */
- long flags;
-};
-extern const struct d30v_operand d30v_operand_table[];
-
-/* Values defined for the flags field of a struct d30v_operand. */
-
-/* this is the destination register; it will be modified */
-/* this is used by the optimizer */
-#define OPERAND_DEST (1)
-
-/* number or symbol */
-#define OPERAND_NUM (2)
-
-/* address or label */
-#define OPERAND_ADDR (4)
-
-/* register */
-#define OPERAND_REG (8)
-
-/* postincrement + */
-#define OPERAND_PLUS (0x10)
-
-/* postdecrement - */
-#define OPERAND_MINUS (0x20)
-
-/* signed number */
-#define OPERAND_SIGNED (0x40)
-
-/* this operand must be shifted left by 3 */
-#define OPERAND_SHIFT (0x80)
-
-/* flag register */
-#define OPERAND_FLAG (0x100)
-
-/* control register */
-#define OPERAND_CONTROL (0x200)
-
-/* accumulator */
-#define OPERAND_ACC (0x400)
-
-/* @ */
-#define OPERAND_ATSIGN (0x800)
-
-/* @( */
-#define OPERAND_ATPAR (0x1000)
-
-/* predecrement mode '@-sp' */
-#define OPERAND_ATMINUS (0x2000)
-
-/* this operand changes the instruction name */
-/* for example, CPMcc, CMPUcc */
-#define OPERAND_NAME (0x4000)
-
-/* fake operand for mvtsys and mvfsys */
-#define OPERAND_SPECIAL (0x8000)
-
-/* let the optimizer know that two registers are affected */
-#define OPERAND_2REG (0x10000)
-
-/* This operand is pc-relative. Note that repeati can have two immediate
- operands, one of which is pcrel, the other (the IMM6U one) is not. */
-#define OPERAND_PCREL (0x20000)
-
-/* The format table is an array of struct d30v_format. */
-struct d30v_format
-{
- int form; /* SHORT_A, LONG, etc */
- int modifier; /* two bit modifier following opcode */
- unsigned char operands[5];
-};
-extern const struct d30v_format d30v_format_table[];
-
-
-/* an instruction is defined by an opcode and a format */
-/* for example, "add" has one opcode, but three different */
-/* formats, 2 SHORT_A forms and a LONG form. */
-struct d30v_insn
-{
- struct d30v_opcode *op; /* pointer to an entry in the opcode table */
- struct d30v_format *form; /* pointer to an entry in the format table */
- int ecc; /* execution condition code */
-};
-
-/* an expressionS only has one register type, so we fake it */
-/* by setting high bits to indicate type */
-#define REGISTER_MASK 0xFF
-
-#endif /* D30V_H */
diff --git a/include/opcode/dlx.h b/include/opcode/dlx.h
deleted file mode 100644
index 278e936..0000000
--- a/include/opcode/dlx.h
+++ /dev/null
@@ -1,282 +0,0 @@
-/* Table of opcodes for the DLX microprocess.
- Copyright 2002 Free Software Foundation, Inc.
-
- This file is part of GDB and GAS.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-
- Initially created by Kuang Hwa Lin, 2002. */
-
-/* Following are the function codes for the Special OP (ALU). */
-#define ALUOP 0x00000000
-#define SPECIALOP 0x00000000
-
-#define NOPF 0x00000000
-#define SLLF 0x00000004
-#define SRLF 0x00000006
-#define SRAF 0x00000007
-
-#define SEQUF 0x00000010
-#define SNEUF 0x00000011
-#define SLTUF 0x00000012
-#define SGTUF 0x00000013
-#define SLEUF 0x00000014
-#define SGEUF 0x00000015
-
-#define ADDF 0x00000020
-#define ADDUF 0x00000021
-#define SUBF 0x00000022
-#define SUBUF 0x00000023
-#define ANDF 0x00000024
-#define ORF 0x00000025
-#define XORF 0x00000026
-
-#define SEQF 0x00000028
-#define SNEF 0x00000029
-#define SLTF 0x0000002A
-#define SGTF 0x0000002B
-#define SLEF 0x0000002C
-#define SGEF 0x0000002D
- /* Following special functions was not mentioned in the
- Hennessy's book but was implemented in the RTL. */
-#define MVTSF 0x00000030
-#define MVFSF 0x00000031
-#define BSWAPF 0x00000032
-#define LUTF 0x00000033
-/* Following special functions was mentioned in the
- Hennessy's book but was not implemented in the RTL. */
-#define MULTF 0x00000005
-#define MULTUF 0x00000006
-#define DIVF 0x00000007
-#define DIVUF 0x00000008
-
-
-/* Following are the rest of the OPcodes:
- JOP = (0x002 << 26), JALOP = (0x003 << 26), BEQOP = (0x004 << 26), BNEOP = (0x005 << 26)
- ADDIOP = (0x008 << 26), ADDUIOP= (0x009 << 26), SUBIOP = (0x00A << 26), SUBUIOP= (0x00B << 26)
- ANDIOP = (0x00C << 26), ORIOP = (0x00D << 26), XORIOP = (0x00E << 26), LHIOP = (0x00F << 26)
- RFEOP = (0x010 << 26), TRAPOP = (0x011 << 26), JROP = (0x012 << 26), JALROP = (0x013 << 26)
- BREAKOP= (0x014 << 26)
- SEQIOP = (0x018 << 26), SNEIOP = (0x019 << 26), SLTIOP = (0x01A << 26), SGTIOP = (0x01B << 26)
- SLEIOP = (0x01C << 26), SGEIOP = (0x01D << 26)
- LBOP = (0x020 << 26), LHOP = (0x021 << 26), LWOP = (0x023 << 26), LBUOP = (0x024 << 26)
- LHUOP = (0x025 << 26), SBOP = (0x028 << 26), SHOP = (0x029 << 26), SWOP = (0x02B << 26)
- LSBUOP = (0x026 << 26), LSHU = (0x027 << 26), LSW = (0x02C << 26),
- SEQUIOP= (0x030 << 26), SNEUIOP= (0x031 << 26), SLTUIOP= (0x032 << 26), SGTUIOP= (0x033 << 26)
- SLEUIOP= (0x034 << 26), SGEUIOP= (0x035 << 26)
- SLLIOP = (0x036 << 26), SRLIOP = (0x037 << 26), SRAIOP = (0x038 << 26). */
-#define JOP 0x08000000
-#define JALOP 0x0c000000
-#define BEQOP 0x10000000
-#define BNEOP 0x14000000
-
-#define ADDIOP 0x20000000
-#define ADDUIOP 0x24000000
-#define SUBIOP 0x28000000
-#define SUBUIOP 0x2c000000
-#define ANDIOP 0x30000000
-#define ORIOP 0x34000000
-#define XORIOP 0x38000000
-#define LHIOP 0x3c000000
-#define RFEOP 0x40000000
-#define TRAPOP 0x44000000
-#define JROP 0x48000000
-#define JALROP 0x4c000000
-#define BREAKOP 0x50000000
-
-#define SEQIOP 0x60000000
-#define SNEIOP 0x64000000
-#define SLTIOP 0x68000000
-#define SGTIOP 0x6c000000
-#define SLEIOP 0x70000000
-#define SGEIOP 0x74000000
-
-#define LBOP 0x80000000
-#define LHOP 0x84000000
-#define LWOP 0x8c000000
-#define LBUOP 0x90000000
-#define LHUOP 0x94000000
-#define LDSTBU
-#define LDSTHU
-#define SBOP 0xa0000000
-#define SHOP 0xa4000000
-#define SWOP 0xac000000
-#define LDST
-
-#define SEQUIOP 0xc0000000
-#define SNEUIOP 0xc4000000
-#define SLTUIOP 0xc8000000
-#define SGTUIOP 0xcc000000
-#define SLEUIOP 0xd0000000
-#define SGEUIOP 0xd4000000
-
-#define SLLIOP 0xd8000000
-#define SRLIOP 0xdc000000
-#define SRAIOP 0xe0000000
-
-/* Following 3 ops was added to provide the MP atonmic operation. */
-#define LSBUOP 0x98000000
-#define LSHUOP 0x9c000000
-#define LSWOP 0xb0000000
-
-/* Following opcode was defined in the Hennessy's book as
- "normal" opcode but was implemented in the RTL as special
- functions. */
-#if 0
-#define MVTSOP 0x50000000
-#define MVFSOP 0x54000000
-#endif
-
-struct dlx_opcode
-{
- /* Name of the instruction. */
- char *name;
-
- /* Opcode word. */
- unsigned long opcode;
-
- /* A string of characters which describe the operands.
- Valid characters are:
- , Itself. The character appears in the assembly code.
- a rs1 The register number is in bits 21-25 of the instruction.
- b rs2/rd The register number is in bits 16-20 of the instruction.
- c rd. The register number is in bits 11-15 of the instruction.
- f FUNC bits 0-10 of the instruction.
- i An immediate operand is in bits 0-16 of the instruction. 0 extended
- I An immediate operand is in bits 0-16 of the instruction. sign extended
- d An 16 bit PC relative displacement.
- D An immediate operand is in bits 0-25 of the instruction.
- N No opperands needed, for nops.
- P it can be a register or a 16 bit operand. */
- char *args;
-};
-
-static const struct dlx_opcode dlx_opcodes[] =
- {
- /* Arithmetic and Logic R-TYPE instructions. */
- { "nop", (ALUOP|NOPF), "N" }, /* NOP */
- { "add", (ALUOP|ADDF), "c,a,b" }, /* Add */
- { "addu", (ALUOP|ADDUF), "c,a,b" }, /* Add Unsigned */
- { "sub", (ALUOP|SUBF), "c,a,b" }, /* SUB */
- { "subu", (ALUOP|SUBUF), "c,a,b" }, /* Sub Unsigned */
- { "mult", (ALUOP|MULTF), "c,a,b" }, /* MULTIPLY */
- { "multu", (ALUOP|MULTUF), "c,a,b" }, /* MULTIPLY Unsigned */
- { "div", (ALUOP|DIVF), "c,a,b" }, /* DIVIDE */
- { "divu", (ALUOP|DIVUF), "c,a,b" }, /* DIVIDE Unsigned */
- { "and", (ALUOP|ANDF), "c,a,b" }, /* AND */
- { "or", (ALUOP|ORF), "c,a,b" }, /* OR */
- { "xor", (ALUOP|XORF), "c,a,b" }, /* Exclusive OR */
- { "sll", (ALUOP|SLLF), "c,a,b" }, /* SHIFT LEFT LOGICAL */
- { "sra", (ALUOP|SRAF), "c,a,b" }, /* SHIFT RIGHT ARITHMETIC */
- { "srl", (ALUOP|SRLF), "c,a,b" }, /* SHIFT RIGHT LOGICAL */
- { "seq", (ALUOP|SEQF), "c,a,b" }, /* Set if equal */
- { "sne", (ALUOP|SNEF), "c,a,b" }, /* Set if not equal */
- { "slt", (ALUOP|SLTF), "c,a,b" }, /* Set if less */
- { "sgt", (ALUOP|SGTF), "c,a,b" }, /* Set if greater */
- { "sle", (ALUOP|SLEF), "c,a,b" }, /* Set if less or equal */
- { "sge", (ALUOP|SGEF), "c,a,b" }, /* Set if greater or equal */
- { "sequ", (ALUOP|SEQUF), "c,a,b" }, /* Set if equal unsigned */
- { "sneu", (ALUOP|SNEUF), "c,a,b" }, /* Set if not equal unsigned */
- { "sltu", (ALUOP|SLTUF), "c,a,b" }, /* Set if less unsigned */
- { "sgtu", (ALUOP|SGTUF), "c,a,b" }, /* Set if greater unsigned */
- { "sleu", (ALUOP|SLEUF), "c,a,b" }, /* Set if less or equal unsigned*/
- { "sgeu", (ALUOP|SGEUF), "c,a,b" }, /* Set if greater or equal */
- { "mvts", (ALUOP|MVTSF), "c,a" }, /* Move to special register */
- { "mvfs", (ALUOP|MVFSF), "c,a" }, /* Move from special register */
- { "bswap", (ALUOP|BSWAPF), "c,a,b" }, /* ??? Was not documented */
- { "lut", (ALUOP|LUTF), "c,a,b" }, /* ????? same as above */
-
- /* Arithmetic and Logical Immediate I-TYPE instructions. */
- { "addi", ADDIOP, "b,a,I" }, /* Add Immediate */
- { "addui", ADDUIOP, "b,a,i" }, /* Add Usigned Immediate */
- { "subi", SUBIOP, "b,a,I" }, /* Sub Immediate */
- { "subui", SUBUIOP, "b,a,i" }, /* Sub Unsigned Immedated */
- { "andi", ANDIOP, "b,a,i" }, /* AND Immediate */
- { "ori", ORIOP, "b,a,i" }, /* OR Immediate */
- { "xori", XORIOP, "b,a,i" }, /* Exclusive OR Immediate */
- { "slli", SLLIOP, "b,a,i" }, /* SHIFT LEFT LOCICAL Immediate */
- { "srai", SRAIOP, "b,a,i" }, /* SHIFT RIGHT ARITH. Immediate */
- { "srli", SRLIOP, "b,a,i" }, /* SHIFT RIGHT LOGICAL Immediate*/
- { "seqi", SEQIOP, "b,a,i" }, /* Set if equal */
- { "snei", SNEIOP, "b,a,i" }, /* Set if not equal */
- { "slti", SLTIOP, "b,a,i" }, /* Set if less */
- { "sgti", SGTIOP, "b,a,i" }, /* Set if greater */
- { "slei", SLEIOP, "b,a,i" }, /* Set if less or equal */
- { "sgei", SGEIOP, "b,a,i" }, /* Set if greater or equal */
- { "sequi", SEQUIOP, "b,a,i" }, /* Set if equal */
- { "sneui", SNEUIOP, "b,a,i" }, /* Set if not equal */
- { "sltui", SLTUIOP, "b,a,i" }, /* Set if less */
- { "sgtui", SGTUIOP, "b,a,i" }, /* Set if greater */
- { "sleui", SLEUIOP, "b,a,i" }, /* Set if less or equal */
- { "sgeui", SGEUIOP, "b,a,i" }, /* Set if greater or equal */
- /* Macros for I type instructions. */
- { "mov", ADDIOP, "b,P" }, /* a move macro */
- { "movu", ADDUIOP, "b,P" }, /* a move macro, unsigned */
-
-#if 0
- /* Move special. */
- { "mvts", MVTSOP, "b,a" }, /* Move From Integer to Special */
- { "mvfs", MVFSOP, "b,a" }, /* Move From Special to Integer */
-#endif
-
- /* Load high Immediate I-TYPE instruction. */
- { "lhi", LHIOP, "b,i" }, /* Load High Immediate */
- { "lui", LHIOP, "b,i" }, /* Load High Immediate */
- { "sethi", LHIOP, "b,i" }, /* Load High Immediate */
-
- /* LOAD/STORE BYTE 8 bits I-TYPE. */
- { "lb", LBOP, "b,a,I" }, /* Load Byte */
- { "lbu", LBUOP, "b,a,I" }, /* Load Byte Unsigned */
- { "ldstbu", LSBUOP, "b,a,I" }, /* Load store Byte Unsigned */
- { "sb", SBOP, "b,a,I" }, /* Store Byte */
-
- /* LOAD/STORE HALFWORD 16 bits. */
- { "lh", LHOP, "b,a,I" }, /* Load Halfword */
- { "lhu", LHUOP, "b,a,I" }, /* Load Halfword Unsigned */
- { "ldsthu", LSHUOP, "b,a,I" }, /* Load Store Halfword Unsigned */
- { "sh", SHOP, "b,a,I" }, /* Store Halfword */
-
- /* LOAD/STORE WORD 32 bits. */
- { "lw", LWOP, "b,a,I" }, /* Load Word */
- { "sw", SWOP, "b,a,I" }, /* Store Word */
- { "ldstw", LSWOP, "b,a,I" }, /* Load Store Word */
-
- /* Branch PC-relative, 16 bits offset. */
- { "beqz", BEQOP, "a,d" }, /* Branch if a == 0 */
- { "bnez", BNEOP, "a,d" }, /* Branch if a != 0 */
- { "beq", BEQOP, "a,d" }, /* Branch if a == 0 */
- { "bne", BNEOP, "a,d" }, /* Branch if a != 0 */
-
- /* Jumps Trap and RFE J-TYPE. */
- { "j", JOP, "D" }, /* Jump, PC-relative 26 bits */
- { "jal", JALOP, "D" }, /* JAL, PC-relative 26 bits */
- { "break", BREAKOP, "D" }, /* break to OS */
- { "trap" , TRAPOP, "D" }, /* TRAP to OS */
- { "rfe", RFEOP, "N" }, /* Return From Exception */
- /* Macros. */
- { "call", JOP, "D" }, /* Jump, PC-relative 26 bits */
-
- /* Jumps Trap and RFE I-TYPE. */
- { "jr", JROP, "a" }, /* Jump Register, Abs (32 bits) */
- { "jalr", JALROP, "a" }, /* JALR, Abs (32 bits) */
- /* Macros. */
- { "retr", JROP, "a" }, /* Jump Register, Abs (32 bits) */
-
- { "", 0x0, "" } /* Dummy entry, not included in NUM_OPCODES.
- This lets code examine entry i + 1 without
- checking if we've run off the end of the table. */
- };
-
-const unsigned int num_dlx_opcodes = (((sizeof dlx_opcodes) / (sizeof dlx_opcodes[0])) - 1);
diff --git a/include/opcode/h8300.h b/include/opcode/h8300.h
deleted file mode 100644
index 32e43c7..0000000
--- a/include/opcode/h8300.h
+++ /dev/null
@@ -1,1894 +0,0 @@
-/* Opcode table for the H8/300
- Copyright 1991, 1992, 1993, 1994, 1996, 1997, 1998, 2000, 2001, 2002,
- 2003, 2004, 2008
- Free Software Foundation, Inc.
- Written by Steve Chamberlain <sac@cygnus.com>.
-
- This file is part of GDB, the GNU Debugger and GAS, the GNU Assembler.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-/* Instructions are stored as a sequence of nibbles.
- If the nibble has value 15 or less than the representation is complete.
- Otherwise, we record what it contains with several flags. */
-
-typedef int op_type;
-
-enum h8_flags
-{
- L_2 = 0x10,
- L_3 = 0x20,
- /* 3 bit constant, zero not accepted. */
- L_3NZ = 0x30,
- L_4 = 0x40,
- L_5 = 0x50,
- L_8 = 0x60,
- L_8U = 0x70,
- L_16 = 0x80,
- L_16U = 0x90,
- L_24 = 0xA0,
- L_32 = 0xB0,
- L_P = 0xC0,
-
- /* Mask to isolate the L_x size bits. */
- SIZE = 0xF0,
-
- REG = 0x0100,
- ABS = 0x0200,
- MEMIND = 0x0300,
- IMM = 0x0400,
- DISP = 0x0500,
- IND = 0x0600,
- POSTINC = 0x0700,
- POSTDEC = 0x0800,
- PREINC = 0x0900,
- PREDEC = 0x0A00,
- PCREL = 0x0B00,
- KBIT = 0x0C00,
- DBIT = 0x0D00,
- CONST_2 = 0x0E00,
- CONST_4 = 0x0F00,
- CONST_8 = 0x1000,
- CONST_16 = 0x1100,
- INDEXB = 0x1200,
- INDEXW = 0x1300,
- INDEXL = 0x1400,
- PCIDXB = 0x1500,
- PCIDXW = 0x1600,
- PCIDXL = 0x1700,
- VECIND = 0x1800,
- LOWREG = 0x1900,
- DATA = 0x2000,
-
- /* Synonyms. */
- INC = POSTINC,
- DEC = PREDEC,
- /* Control Registers. */
- CCR = 0x4000,
- EXR = 0x4100,
- MACH = 0x4200,
- MACL = 0x4300,
- RESERV1 = 0x4400,
- RESERV2 = 0x4500,
- VBR = 0x4600,
- SBR = 0x4700,
- MACREG = 0x4800,
- CCR_EXR = 0x4900,
- VBR_SBR = 0x4A00,
- CC_EX_VB_SB = 0x4B00,
- RESERV3 = 0x4C00,
- RESERV4 = 0x4D00,
- RESERV5 = 0x4E00,
- RESERV6 = 0x4F00,
-
- /* Mask to isolate the addressing mode bits (REG .. PREDEC). */
- MODE = 0x7F00,
-
- CTRL = 0x4000,
-
- NO_SYMBOLS = 0x8000,
- SRC = 0x10000,
- DST = 0x20000,
- OP3 = 0x40000,
- MEMRELAX = 0x80000, /* Move insn which may relax. */
-
- DISPREG = 0x100000,
- IGNORE = 0x200000,
- ABSJMP = 0x400000,
-
- B00 = 0x800000, /* Bit 0 must be low. */
- B01 = 0x1000000, /* Bit 0 must be high. */
- B10 = 0x2000000, /* Bit 1 must be low. */
- B11 = 0x4000000, /* Bit 1 must be high. */
- B20 = 0x8000000, /* Bit 2 must be low. */
- B21 = 0x10000000, /* Bit 2 must be high. */
- B30 = 0x20000000, /* Bit 3 must be low. */
- B31 = 0x40000000, /* Bit 3 must be high. */
- E = 0x80000000, /* End of nibble sequence. */
-
- /* Immediates smaller than 8 bits are always unsigned. */
- IMM3 = IMM | L_3,
- IMM4 = IMM | L_4,
- IMM5 = IMM | L_5,
- IMM3NZ = IMM | L_3NZ,
- IMM2 = IMM | L_2,
-
- IMM8 = IMM | SRC | L_8,
- IMM8U = IMM | SRC | L_8U,
- IMM16 = IMM | SRC | L_16,
- IMM16U = IMM | SRC | L_16U,
- IMM32 = IMM | SRC | L_32,
-
- IMM3NZ_NS = IMM3NZ | NO_SYMBOLS,
- IMM4_NS = IMM4 | NO_SYMBOLS,
- IMM8U_NS = IMM8U | NO_SYMBOLS,
- IMM16U_NS = IMM16U | NO_SYMBOLS,
-
- RD8 = DST | L_8 | REG,
- RD16 = DST | L_16 | REG,
- RD32 = DST | L_32 | REG,
- R3_8 = OP3 | L_8 | REG,
- R3_16 = OP3 | L_16 | REG,
- R3_32 = OP3 | L_32 | REG,
- RS8 = SRC | L_8 | REG,
- RS16 = SRC | L_16 | REG,
- RS32 = SRC | L_32 | REG,
-
- RSP = SRC | L_P | REG,
- RDP = DST | L_P | REG,
-
- PCREL8 = PCREL | L_8,
- PCREL16 = PCREL | L_16,
-
- OP3PCREL8 = OP3 | PCREL | L_8,
- OP3PCREL16 = OP3 | PCREL | L_16,
-
- INDEXB16 = INDEXB | L_16,
- INDEXW16 = INDEXW | L_16,
- INDEXL16 = INDEXL | L_16,
- INDEXB16D = INDEXB | L_16 | DST,
- INDEXW16D = INDEXW | L_16 | DST,
- INDEXL16D = INDEXL | L_16 | DST,
-
- INDEXB32 = INDEXB | L_32,
- INDEXW32 = INDEXW | L_32,
- INDEXL32 = INDEXL | L_32,
- INDEXB32D = INDEXB | L_32 | DST,
- INDEXW32D = INDEXW | L_32 | DST,
- INDEXL32D = INDEXL | L_32 | DST,
-
- DISP2SRC = DISP | L_2 | SRC,
- DISP16SRC = DISP | L_16 | SRC,
- DISP32SRC = DISP | L_32 | SRC,
-
- DISP2DST = DISP | L_2 | DST,
- DISP16DST = DISP | L_16 | DST,
- DISP32DST = DISP | L_32 | DST,
-
- DSTDISPREG = DST | DISPREG,
- SRCDISPREG = SRC | DISPREG,
-
- ABS8SRC = SRC | ABS | L_8,
- ABS16SRC = SRC | ABS | L_16U,
- ABS24SRC = SRC | ABS | L_24,
- ABS32SRC = SRC | ABS | L_32,
-
- ABS8DST = DST | ABS | L_8,
- ABS16DST = DST | ABS | L_16U,
- ABS24DST = DST | ABS | L_24,
- ABS32DST = DST | ABS | L_32,
-
- ABS8OP3 = OP3 | ABS | L_8,
- ABS16OP3 = OP3 | ABS | L_16U,
- ABS24OP3 = OP3 | ABS | L_24,
- ABS32OP3 = OP3 | ABS | L_32,
-
- RDDEC = DST | DEC,
- RSINC = SRC | INC,
- RDINC = DST | INC,
-
- RSPOSTINC = SRC | POSTINC,
- RDPOSTINC = DST | POSTINC,
- RSPREINC = SRC | PREINC,
- RDPREINC = DST | PREINC,
- RSPOSTDEC = SRC | POSTDEC,
- RDPOSTDEC = DST | POSTDEC,
- RSPREDEC = SRC | PREDEC,
- RDPREDEC = DST | PREDEC,
-
- RSIND = SRC | IND,
- RDIND = DST | IND,
- R3_IND = OP3 | IND,
-
-#define MS32 (SRC | L_32 | MACREG)
-#define MD32 (DST | L_32 | MACREG)
-
-#if 1
- OR8 = RS8, /* ??? OR as in One Register. */
- OR16 = RS16,
- OR32 = RS32,
-#else
- OR8 = RD8,
- OR16 = RD16,
- OR32 = RD32
-#endif
-};
-
-enum ctrlreg
-{
- C_CCR = 0,
- C_EXR = 1,
- C_MACH = 2,
- C_MACL = 3,
- C_VBR = 6,
- C_SBR = 7
-};
-
-enum {MAX_CODE_NIBBLES = 33};
-
-struct code
-{
- op_type nib[MAX_CODE_NIBBLES];
-};
-
-struct arg
-{
- op_type nib[3];
-};
-
-/* Availability of instructions on processor models. */
-enum h8_model
-{
- AV_H8,
- AV_H8H,
- AV_H8S,
- AV_H8SX
-};
-
-struct h8_opcode
-{
- int how;
- enum h8_model available;
- int time;
- char *name;
- struct arg args;
- struct code data;
-};
-
-#ifdef DEFINE_TABLE
-
-#define DATA2 DATA, DATA
-#define DATA3 DATA, DATA, DATA
-#define DATA5 DATA, DATA, DATA, DATA, DATA
-#define DATA7 DATA, DATA, DATA, DATA, DATA, DATA, DATA
-
-#define IMM8LIST IMM8, DATA
-#define IMM16LIST IMM16, DATA3
-#define IMM16ULIST IMM16U, DATA3
-#define IMM24LIST IMM24, DATA5
-#define IMM32LIST IMM32, DATA7
-
-#define DISP16LIST DISP | L_16, DATA3
-#define DISP24LIST DISP | L_24, DATA5
-#define DISP32LIST DISP | L_32, DATA7
-
-#define ABS8LIST ABS | L_8, DATA
-#define ABS16LIST ABS | L_16U, DATA3
-#define ABS24LIST ABS | L_24, DATA5
-#define ABS32LIST ABS | L_32, DATA7
-
-#define DSTABS8LIST DST | ABS | L_8, DATA
-#define DSTABS16LIST DST | ABS | L_16U, DATA3
-#define DSTABS24LIST DST | ABS | L_24, DATA5
-#define DSTABS32LIST DST | ABS | L_32, DATA7
-
-#define OP3ABS8LIST OP3 | ABS | L_8, DATA
-#define OP3ABS16LIST OP3 | ABS | L_16, DATA3
-#define OP3ABS24LIST OP3 | ABS | L_24, DATA5
-#define OP3ABS32LIST OP3 | ABS | L_32, DATA7
-
-#define DSTDISP16LIST DST | DISP | L_16, DATA3
-#define DSTDISP24LIST DST | DISP | L_24, DATA5
-#define DSTDISP32LIST DST | DISP | L_32, DATA7
-
-#define A16LIST L_16, DATA3
-#define A24LIST L_24, DATA5
-#define A32LIST L_32, DATA7
-
-/* Extended Operand Prefixes: */
-
-#define PREFIX_010 0x0, 0x1, 0x0
-#define PREFIX_015 0x0, 0x1, 0x5
-#define PREFIX_017 0x0, 0x1, 0x7
-
-#define PREFIX_0100 0x0, 0x1, 0x0, 0x0
-#define PREFIX_010_D2 0x0, 0x1, 0x0, B30 | B21 | DISP2SRC
-#define PREFIX_0101 0x0, 0x1, 0x0, 0x1
-#define PREFIX_0102 0x0, 0x1, 0x0, 0x2
-#define PREFIX_0103 0x0, 0x1, 0x0, 0x3
-#define PREFIX_0104 0x0, 0x1, 0x0, 0x4
-#define PREFIX_0105 0x0, 0x1, 0x0, 0x5
-#define PREFIX_0106 0x0, 0x1, 0x0, 0x6
-#define PREFIX_0107 0x0, 0x1, 0x0, 0x7
-#define PREFIX_0108 0x0, 0x1, 0x0, 0x8
-#define PREFIX_0109 0x0, 0x1, 0x0, 0x9
-#define PREFIX_010A 0x0, 0x1, 0x0, 0xa
-#define PREFIX_010D 0x0, 0x1, 0x0, 0xd
-#define PREFIX_010E 0x0, 0x1, 0x0, 0xe
-
-#define PREFIX_0150 0x0, 0x1, 0x5, 0x0
-#define PREFIX_015_D2 0x0, 0x1, 0x5, B30 | B21 | DISP2SRC
-#define PREFIX_0151 0x0, 0x1, 0x5, 0x1
-#define PREFIX_0152 0x0, 0x1, 0x5, 0x2
-#define PREFIX_0153 0x0, 0x1, 0x5, 0x3
-#define PREFIX_0154 0x0, 0x1, 0x5, 0x4
-#define PREFIX_0155 0x0, 0x1, 0x5, 0x5
-#define PREFIX_0156 0x0, 0x1, 0x5, 0x6
-#define PREFIX_0157 0x0, 0x1, 0x5, 0x7
-#define PREFIX_0158 0x0, 0x1, 0x5, 0x8
-#define PREFIX_0159 0x0, 0x1, 0x5, 0x9
-#define PREFIX_015A 0x0, 0x1, 0x5, 0xa
-#define PREFIX_015D 0x0, 0x1, 0x5, 0xd
-#define PREFIX_015E 0x0, 0x1, 0x5, 0xe
-#define PREFIX_015F 0x0, 0x1, 0x5, 0xf
-
-#define PREFIX_0170 0x0, 0x1, 0x7, 0x0
-#define PREFIX_017_D2S 0x0, 0x1, 0x7, B30 | B21 | DISP2SRC
-#define PREFIX_017_D2D 0x0, 0x1, 0x7, B30 | B21 | DISP2DST
-#define PREFIX_0171 0x0, 0x1, 0x7, 0x1
-#define PREFIX_0172 0x0, 0x1, 0x7, 0x2
-#define PREFIX_0173 0x0, 0x1, 0x7, 0x3
-#define PREFIX_0174 0x0, 0x1, 0x7, 0x4
-#define PREFIX_0175 0x0, 0x1, 0x7, 0x5
-#define PREFIX_0176 0x0, 0x1, 0x7, 0x6
-#define PREFIX_0177 0x0, 0x1, 0x7, 0x7
-#define PREFIX_0178 0x0, 0x1, 0x7, 0x8
-#define PREFIX_0179 0x0, 0x1, 0x7, 0x9
-#define PREFIX_017A 0x0, 0x1, 0x7, 0xa
-#define PREFIX_017D 0x0, 0x1, 0x7, 0xd
-#define PREFIX_017E 0x0, 0x1, 0x7, 0xe
-#define PREFIX_017F 0x0, 0x1, 0x7, 0xf
-
-#define PREFIX_6A15 0x6, 0xa, 0x1, 0x5
-#define PREFIX_6A35 0x6, 0xa, 0x3, 0x5
-#define PREFIX_6B15 0x6, 0xb, 0x1, 0x5
-#define PREFIX_6B35 0x6, 0xb, 0x3, 0x5
-
-#define PREFIX_78R4 0x7, 0x8, B31 | DISPREG, 0x4
-#define PREFIX_78R5 0x7, 0x8, B31 | DISPREG, 0x5
-#define PREFIX_78R6 0x7, 0x8, B31 | DISPREG, 0x6
-#define PREFIX_78R7 0x7, 0x8, B31 | DISPREG, 0x7
-
-#define PREFIX_78R4W 0x7, 0x8, B30 | DISPREG, 0x4
-#define PREFIX_78R5W 0x7, 0x8, B30 | DISPREG, 0x5
-#define PREFIX_78R6W 0x7, 0x8, B30 | DISPREG, 0x6
-#define PREFIX_78R7W 0x7, 0x8, B30 | DISPREG, 0x7
-
-#define PREFIX_78R4WD 0x7, 0x8, B30 | DSTDISPREG, 0x4
-#define PREFIX_78R5WD 0x7, 0x8, B30 | DSTDISPREG, 0x5
-#define PREFIX_78R6WD 0x7, 0x8, B30 | DSTDISPREG, 0x6
-#define PREFIX_78R7WD 0x7, 0x8, B30 | DSTDISPREG, 0x7
-
-#define PREFIX_7974 0x7, 0x9, 0x7, 0x4
-#define PREFIX_7A74 0x7, 0xa, 0x7, 0x4
-#define PREFIX_7A7C 0x7, 0xa, 0x7, 0xc
-
-
-/* Source standard fragment: */
-#define FROM_IND 0, RSIND
-#define FROM_POSTINC 8, RSPOSTINC
-#define FROM_POSTDEC 10, RSPOSTDEC
-#define FROM_PREINC 9, RSPREINC
-#define FROM_PREDEC 11, RSPREDEC
-#define FROM_DISP2 B30 | B20 | DISP2SRC, DISPREG
-#define FROM_DISP16 12, B30 | DISPREG
-#define FROM_DISP32 12, B31 | DISPREG
-#define FROM_DISP16B 13, B30 | DISPREG
-#define FROM_DISP16W 14, B30 | DISPREG
-#define FROM_DISP16L 15, B30 | DISPREG
-#define FROM_DISP32B 13, B31 | DISPREG
-#define FROM_DISP32W 14, B31 | DISPREG
-#define FROM_DISP32L 15, B31 | DISPREG
-#define FROM_ABS16 4, B30 | IGNORE
-#define FROM_ABS32 4, B31 | IGNORE
-
-/* Destination standard fragment: */
-#define TO_IND 0, RDIND
-#define TO_IND_MOV 0, RDIND | B30
-#define TO_POSTINC 8, RDPOSTINC
-#define TO_POSTINC_MOV 8, RDPOSTINC | B30
-#define TO_POSTDEC 10, RDPOSTDEC
-#define TO_POSTDEC_MOV 10, RDPOSTDEC | B30
-#define TO_PREINC 9, RDPREINC
-#define TO_PREINC_MOV 9, RDPREINC | B30
-#define TO_PREDEC 11, RDPREDEC
-#define TO_PREDEC_MOV 11, RDPREDEC | B30
-#define TO_DISP2 B30 | B20 | DISP2DST, DSTDISPREG
-#define TO_DISP2_MOV B30 | B20 | DISP2DST, DSTDISPREG | B30
-#define TO_DISP16 12, B30 | DSTDISPREG
-#define TO_DISP32 12, B31 | DSTDISPREG
-#define TO_DISP16B 13, B30 | DSTDISPREG
-#define TO_DISP16W 14, B30 | DSTDISPREG
-#define TO_DISP16L 15, B30 | DSTDISPREG
-#define TO_DISP32B 13, B31 | DSTDISPREG
-#define TO_DISP32W 14, B31 | DSTDISPREG
-#define TO_DISP32L 15, B31 | DSTDISPREG
-#define TO_ABS16 4, B30 | IGNORE
-#define TO_ABS32 4, B31 | IGNORE
-
-/* Source fragment for three-word instruction: */
-#define TFROM_IND 6, 9, B30 | RSIND, 12
-#define TFROM_DISP2 6, 9, B30 | DISPREG, 12
-#define TFROM_ABS16 6, 11, B30 | B20 | B10 | IGNORE, 12, ABS16LIST
-#define TFROM_ABS32 6, 11, B30 | B20 | B11 | IGNORE, 12, ABS32LIST
-#define TFROM_POSTINC 6, 13, B30 | RSPOSTINC, 12
-#define TFROM_PREINC 6, 13, B30 | RSPREINC, 12
-#define TFROM_POSTDEC 6, 13, B30 | RSPOSTDEC, 12
-#define TFROM_PREDEC 6, 13, B30 | RSPREDEC, 12
-#define TFROM_DISP16 6, 15, B30 | DISPREG, 12, DISP16LIST
-#define TFROM_DISP32 6, 11, 2, 12, DISP32LIST
-#define TFROM_DISP16B 6, 15, B30 | DISPREG, 12, DISP16LIST
-#define TFROM_DISP16W 6, 15, B30 | DISPREG, 12, DISP16LIST
-#define TFROM_DISP16L 6, 15, B30 | DISPREG, 12, DISP16LIST
-#define TFROM_DISP32B 6, 11, 2, 12, DISP32LIST
-#define TFROM_DISP32W 6, 11, 2, 12, DISP32LIST
-#define TFROM_DISP32L 6, 11, 2, 12, DISP32LIST
-#define TFROM_ABS16W 6, 11, 1, 12, ABS16LIST
-#define TFROM_ABS32W 6, 11, 3, 12, ABS32LIST
-
-/* Source fragment for three-word instruction: */
-#define TFROM_IND_B 6, 8, B30 | RSIND, 12
-#define TFROM_ABS16_B 6, 10, B30 | B20 | B10 | IGNORE, 12, ABS16LIST
-#define TFROM_ABS32_B 6, 10, B30 | B20 | B11 | IGNORE, 12, ABS32LIST
-
-#define TFROM_DISP2_B 6, 8, B30 | DISPREG, 12
-#define TFROM_POSTINC_B 6, 12, B30 | RSPOSTINC, 12
-#define TFROM_PREINC_B 6, 12, B30 | RSPREINC, 12
-#define TFROM_POSTDEC_B 6, 12, B30 | RSPOSTDEC, 12
-#define TFROM_PREDEC_B 6, 12, B30 | RSPREDEC, 12
-#define TFROM_DISP16_B 6, 14, B30 | DISPREG, 12, DISP16LIST
-#define TFROM_DISP32_B 6, 10, 2, 12, DISP32LIST
-#define TFROM_DISP16B_B 6, 14, B30 | DISPREG, 12, DISP16LIST
-#define TFROM_DISP16W_B 6, 14, B30 | DISPREG, 12, DISP16LIST
-#define TFROM_DISP16L_B 6, 14, B30 | DISPREG, 12, DISP16LIST
-#define TFROM_DISP32B_B 6, 10, 2, 12, DISP32LIST
-#define TFROM_DISP32W_B 6, 10, 2, 12, DISP32LIST
-#define TFROM_DISP32L_B 6, 10, 2, 12, DISP32LIST
-
-#define TFROM_ABS16W_B 6, 10, 1, 12, ABS16LIST
-#define TFROM_ABS32W_B 6, 10, 3, 12, ABS32LIST
-
-/* Extended Operand Class Expanders: */
-
-#define MOVFROM_STD(CODE, PREFIX, NAME, SRC, SRC_INFIX) \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDIND, E}}, {{PREFIX, SRC_INFIX, TO_IND_MOV, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, SRC_INFIX, TO_POSTINC_MOV, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, SRC_INFIX, TO_POSTDEC_MOV, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, SRC_INFIX, TO_PREINC_MOV, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, SRC_INFIX, TO_PREDEC_MOV, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, SRC_INFIX, TO_DISP2_MOV, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, SRC_INFIX, TO_DISP16, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, SRC_INFIX, TO_DISP32, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, SRC_INFIX, TO_DISP16B, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, SRC_INFIX, TO_DISP16W, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, SRC_INFIX, TO_DISP16L, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, SRC_INFIX, TO_DISP32B, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, SRC_INFIX, TO_DISP32W, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, SRC_INFIX, TO_DISP32L, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, ABS16DST, E}}, {{PREFIX, SRC_INFIX, TO_ABS16, DSTABS16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, ABS32DST, E}}, {{PREFIX, SRC_INFIX, TO_ABS32, DSTABS32LIST, E}}}
-
-#define MOVFROM_AD(CODE, PREFIX, NAME, SRC, SRC_INFIX, SRC_SUFFIX) \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDIND, E}}, {{PREFIX, SRC_INFIX, TO_IND_MOV, SRC_SUFFIX, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, SRC_INFIX, TO_POSTINC_MOV, SRC_SUFFIX, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, SRC_INFIX, TO_POSTDEC_MOV, SRC_SUFFIX, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, SRC_INFIX, TO_PREINC_MOV, SRC_SUFFIX, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, SRC_INFIX, TO_PREDEC_MOV, SRC_SUFFIX, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, SRC_INFIX, TO_DISP2_MOV, SRC_SUFFIX, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, SRC_INFIX, TO_DISP16, SRC_SUFFIX, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, SRC_INFIX, TO_DISP32, SRC_SUFFIX, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, SRC_INFIX, TO_DISP16B, SRC_SUFFIX, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, SRC_INFIX, TO_DISP16W, SRC_SUFFIX, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, SRC_INFIX, TO_DISP16L, SRC_SUFFIX, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, SRC_INFIX, TO_DISP32B, SRC_SUFFIX, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, SRC_INFIX, TO_DISP32W, SRC_SUFFIX, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, SRC_INFIX, TO_DISP32L, SRC_SUFFIX, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, ABS16DST, E}}, {{PREFIX, SRC_INFIX, TO_ABS16, SRC_SUFFIX, DSTABS16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, ABS32DST, E}}, {{PREFIX, SRC_INFIX, TO_ABS32, SRC_SUFFIX, DSTABS32LIST, E}}}
-
-#define MOVFROM_IMM8(CODE, PREFIX, NAME, SRC) \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDIND, E}}, {{PREFIX, 0, RDIND, IMM8LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, 8, RDPOSTINC, IMM8LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, 10, RDPOSTDEC, IMM8LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, 9, RDPREINC, IMM8LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, 11, RDPREDEC, IMM8LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, B30 | B20 | DISP2DST, DSTDISPREG, IMM8LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, 12, B30 | DSTDISPREG, IMM8LIST, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, 12, B31 | DSTDISPREG, IMM8LIST, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, 13, B30 | DSTDISPREG, IMM8LIST, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, 14, B30 | DSTDISPREG, IMM8LIST, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, 15, B30 | DSTDISPREG, IMM8LIST, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, 13, B31 | DSTDISPREG, IMM8LIST, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, 14, B31 | DSTDISPREG, IMM8LIST, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, 15, B31 | DSTDISPREG, IMM8LIST, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, ABS16DST, E}}, {{PREFIX, 4, B30 | IGNORE, IMM8LIST, DSTABS16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, ABS32DST, E}}, {{PREFIX, 4, B31 | IGNORE, IMM8LIST, DSTABS32LIST, E}}}
-
-#define MOVFROM_IMM(CODE, PREFIX, NAME, SRC, LIST) \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDIND, E}}, {{PREFIX, LIST, 0, RDIND, DATA2, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, LIST, 8, RDPOSTINC, DATA2, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, LIST, 10, RDPOSTDEC, DATA2, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, LIST, 9, RDPREINC, DATA2, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, LIST, 11, RDPREDEC, DATA2, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, LIST, B30 | B20 | DISP2DST, DSTDISPREG, DATA2, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, LIST, 12, B30 | DSTDISPREG, DATA2, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, LIST, 12, B31 | DSTDISPREG, DATA2, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, LIST, 13, B30 | DSTDISPREG, DATA2, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, LIST, 14, B30 | DSTDISPREG, DATA2, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, LIST, 15, B30 | DSTDISPREG, DATA2, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, LIST, 13, B31 | DSTDISPREG, DATA2, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, LIST, 14, B31 | DSTDISPREG, DATA2, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, LIST, 15, B31 | DSTDISPREG, DATA2, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, ABS16DST, E}}, {{PREFIX, LIST, 4, B30 | IGNORE, DATA2, DSTABS16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, ABS32DST, E}}, {{PREFIX, LIST, 4, B31 | IGNORE, DATA2, DSTABS32LIST, E}}}
-
-#define MOVFROM_REG_BW(CODE, NAME, SRC, PREFIX, OP1, OP2, OP3, OP4, RELAX16) \
- {CODE, AV_H8, 4, NAME, {{SRC, RDIND, E}}, {{ 6, OP1, B31 | RDIND, SRC, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, 3, 6, OP3, B31 | RDPOSTINC, SRC, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, 1, 6, OP3, B31 | RDPOSTDEC, SRC, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, 2, 6, OP3, B31 | RDPREINC, SRC, E}}}, \
- {CODE, AV_H8, 6, NAME, {{SRC, RDPREDEC, E}}, {{ 6, OP3, B31 | RDPREDEC, SRC, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, B30 | B20 | DISP2DST, 6, OP1, B31 | DSTDISPREG, SRC, E}}}, \
- {CODE, AV_H8, 6, NAME, {{SRC, DISP16DST, E}}, {{ 6, OP4, B31 | DSTDISPREG, SRC, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8, 6, NAME, {{SRC, DISP32DST, E}}, {{7, 8, B30 | DSTDISPREG, 0, 6, OP2, 10, SRC, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, 1, 6, OP4, B31 | DSTDISPREG, SRC, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, 2, 6, OP4, B31 | DSTDISPREG, SRC, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, 3, 6, OP4, B31 | DSTDISPREG, SRC, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{7, 8, B30 | DSTDISPREG, 1, 6, OP2, 10, SRC, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{7, 8, B30 | DSTDISPREG, 2, 6, OP2, 10, SRC, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{7, 8, B30 | DSTDISPREG, 3, 6, OP2, 10, SRC, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8, 4, NAME, {{SRC, ABS16DST, E}}, {{ 6, OP2, 8, SRC, RELAX16 | DSTABS16LIST, E}}}, \
- {CODE, AV_H8, 6, NAME, {{SRC, ABS32DST, E}}, {{ 6, OP2, 10, SRC, MEMRELAX | DSTABS32LIST, E}}}
-
-#define MOVTO_REG_BW(CODE, NAME, DST, PREFIX, OP1, OP2, OP3, OP4, RELAX16) \
- {CODE, AV_H8, 4, NAME, {{RSIND, DST, E}}, {{ 6, OP1, B30 | RSIND, DST, E}}}, \
- {CODE, AV_H8, 6, NAME, {{RSPOSTINC, DST, E}}, {{ 6, OP3, B30 | RSPOSTINC, DST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSPOSTDEC, DST, E}}, {{PREFIX, 2, 6, OP3, B30 | RSPOSTDEC, DST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSPREINC, DST, E}}, {{PREFIX, 1, 6, OP3, B30 | RSPREINC, DST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSPREDEC, DST, E}}, {{PREFIX, 3, 6, OP3, B30 | RSPREDEC, DST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{DISP2SRC, DST, E}}, {{PREFIX, B30 | B20 | DISP2SRC, 6, OP1, B30 | DISPREG, DST, E}}}, \
- {CODE, AV_H8, 6, NAME, {{DISP16SRC, DST, E}}, {{ 6, OP4, B30 | DISPREG, DST, DISP16LIST, E}}}, \
- {CODE, AV_H8, 6, NAME, {{DISP32SRC, DST, E}}, {{7, 8, B30 | DISPREG, 0, 6, OP2, 2, DST, DISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXB16, DST, E}}, {{PREFIX, 1, 6, OP4, B30 | DISPREG, DST, DISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXW16, DST, E}}, {{PREFIX, 2, 6, OP4, B30 | DISPREG, DST, DISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXL16, DST, E}}, {{PREFIX, 3, 6, OP4, B30 | DISPREG, DST, DISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXB32, DST, E}}, {{7, 8, B30 | DISPREG, 1, 6, OP2, 2, DST, DISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXW32, DST, E}}, {{7, 8, B30 | DISPREG, 2, 6, OP2, 2, DST, DISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXL32, DST, E}}, {{7, 8, B30 | DISPREG, 3, 6, OP2, 2, DST, DISP32LIST, E}}}, \
- {CODE, AV_H8, 4, NAME, {{ABS16SRC, DST, E}}, {{ 6, OP2, 0, DST, RELAX16 | ABS16LIST, E}}}, \
- {CODE, AV_H8, 6, NAME, {{ABS32SRC, DST, E}}, {{ 6, OP2, 2, DST, MEMRELAX | ABS32LIST, E}}}
-
-/* Expansion macros for two-word (plus data) instructions. */
-
-/* Expansion from one source to "standard" destinations. */
-#define EXPAND2_STD_SRC(CODE, WEIGHT, NAME, SRC, PREFIX, NIB1, NIB2) \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, TO_POSTINC, NIB1, NIB2, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, TO_POSTDEC, NIB1, NIB2, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, TO_PREINC, NIB1, NIB2, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, TO_PREDEC, NIB1, NIB2, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, TO_DISP2, NIB1, NIB2, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, TO_DISP16, NIB1, NIB2, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, TO_DISP32, NIB1, NIB2, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, TO_DISP16B, NIB1, NIB2, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, TO_DISP16W, NIB1, NIB2, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, TO_DISP16L, NIB1, NIB2, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, TO_DISP32B, NIB1, NIB2, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, TO_DISP32W, NIB1, NIB2, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, TO_DISP32L, NIB1, NIB2, DSTDISP32LIST, E}}}
-
-/* Expansion from one destination to "standard" sources. */
-#define EXPAND2_STD_DST(CODE, WEIGHT, NAME, DST, PREFIX, NIB1, NIB2) \
- {CODE, AV_H8SX, 0, NAME, {{RSPOSTINC, DST, E}}, {{PREFIX, FROM_POSTINC, NIB1, NIB2, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSPOSTDEC, DST, E}}, {{PREFIX, FROM_POSTDEC, NIB1, NIB2, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSPREINC, DST, E}}, {{PREFIX, FROM_PREINC, NIB1, NIB2, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSPREDEC, DST, E}}, {{PREFIX, FROM_PREDEC, NIB1, NIB2, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{DISP2SRC, DST, E}}, {{PREFIX, FROM_DISP2, NIB1, NIB2, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{DISP16SRC, DST, E}}, {{PREFIX, FROM_DISP16, NIB1, NIB2, DISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{DISP32SRC, DST, E}}, {{PREFIX, FROM_DISP32, NIB1, NIB2, DISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXB16, DST, E}}, {{PREFIX, FROM_DISP16B, NIB1, NIB2, DISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXW16, DST, E}}, {{PREFIX, FROM_DISP16W, NIB1, NIB2, DISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXL16, DST, E}}, {{PREFIX, FROM_DISP16L, NIB1, NIB2, DISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXB32, DST, E}}, {{PREFIX, FROM_DISP32B, NIB1, NIB2, DISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXW32, DST, E}}, {{PREFIX, FROM_DISP32W, NIB1, NIB2, DISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXL32, DST, E}}, {{PREFIX, FROM_DISP32L, NIB1, NIB2, DISP32LIST, E}}}
-
-/* Expansion from immediate source to "standard" destinations. */
-#define EXPAND2_STD_IMM(CODE, WEIGHT, NAME, SRC, PREFIX, OPCODE, IGN, IMMLIST) \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, TO_POSTINC, OPCODE, IGN, IMMLIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, TO_POSTDEC, OPCODE, IGN, IMMLIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, TO_PREINC, OPCODE, IGN, IMMLIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, TO_PREDEC, OPCODE, IGN, IMMLIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, TO_DISP2, OPCODE, IGN, IMMLIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, TO_DISP16, OPCODE, IGN, DSTDISP16LIST, IMMLIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, TO_DISP32, OPCODE, IGN, DSTDISP32LIST, IMMLIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, TO_DISP16B, OPCODE, IGN, DSTDISP16LIST, IMMLIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, TO_DISP16W, OPCODE, IGN, DSTDISP16LIST, IMMLIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, TO_DISP16L, OPCODE, IGN, DSTDISP16LIST, IMMLIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, TO_DISP32B, OPCODE, IGN, DSTDISP32LIST, IMMLIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, TO_DISP32W, OPCODE, IGN, DSTDISP32LIST, IMMLIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, TO_DISP32L, OPCODE, IGN, DSTDISP32LIST, IMMLIST, E}}}
-
-/* Expansion from abs/disp source to "standard" destinations. */
-#define EXPAND2_STD_ABSDISP(CODE, WEIGHT, NAME, SRC, PREFIX, DSTLIST, NIB1, NIB2) \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, DSTLIST, TO_POSTINC, NIB1, NIB2, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, DSTLIST, TO_POSTDEC, NIB1, NIB2, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, DSTLIST, TO_PREINC, NIB1, NIB2, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, DSTLIST, TO_PREDEC, NIB1, NIB2, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, DSTLIST, TO_DISP2, NIB1, NIB2, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, DSTLIST, TO_DISP16, NIB1, NIB2, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, DSTLIST, TO_DISP32, NIB1, NIB2, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, DSTLIST, TO_DISP16B, NIB1, NIB2, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, DSTLIST, TO_DISP16W, NIB1, NIB2, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, DSTLIST, TO_DISP16L, NIB1, NIB2, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, DSTLIST, TO_DISP32B, NIB1, NIB2, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, DSTLIST, TO_DISP32W, NIB1, NIB2, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, DSTLIST, TO_DISP32L, NIB1, NIB2, DSTDISP32LIST, E}}}
-
-/* Expansion from ind source to "standard" destinations. */
-#define EXPAND2_STD_IND(CODE, WEIGHT, NAME, OPCODE, BIT) \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, RDPOSTINC, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_POSTINC, OPCODE, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, RDPOSTDEC, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_POSTDEC, OPCODE, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, RDPREINC, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_PREINC, OPCODE, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, RDPREDEC, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_PREDEC, OPCODE, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, DISP2DST, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP2, OPCODE, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, DISP16DST, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP16, OPCODE, IGNORE, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, DISP32DST, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP32, OPCODE, IGNORE, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, INDEXB16D, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP16B, OPCODE, IGNORE, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, INDEXW16D, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP16W, OPCODE, IGNORE, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, INDEXL16D, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP16L, OPCODE, IGNORE, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, INDEXB32D, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP32B, OPCODE, IGNORE, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, INDEXW32D, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP32W, OPCODE, IGNORE, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, INDEXL32D, E}}, {{0x7, 0xc, BIT | RSIND, 0x5, TO_DISP32L, OPCODE, IGNORE, DSTDISP32LIST, E}}}
-
-/* Expansion macros for three word (plus data) instructions. */
-
-#define EXPAND3_STD_SRC(CODE, WEIGHT, NAME, SRC, PREFIX, INFIX, OPCODE) \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, INFIX, 8, RDPOSTINC, OPCODE, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, INFIX, 10, RDPOSTDEC, OPCODE, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, INFIX, 9, RDPREINC, OPCODE, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, INFIX, 11, RDPREDEC, OPCODE, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, INFIX, B30 | B20 | DISP2DST, DSTDISPREG, OPCODE, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, INFIX, 12, B30 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, INFIX, 12, B31 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, INFIX, 13, B30 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, INFIX, 14, B30 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, INFIX, 15, B30 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, INFIX, 13, B31 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, INFIX, 14, B31 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, INFIX, 15, B31 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP32LIST, E}}}
-
-#define EXPAND3_L_SRC(CODE, WEIGHT, NAME, SRC, PREFIX, INFIX, OPCODE) \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDIND, E}}, {{PREFIX, INFIX, 0, RDIND, OPCODE, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTINC, E}}, {{PREFIX, INFIX, 8, RDPOSTINC, OPCODE, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPOSTDEC, E}}, {{PREFIX, INFIX, 10, RDPOSTDEC, OPCODE, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREINC, E}}, {{PREFIX, INFIX, 9, RDPREINC, OPCODE, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, RDPREDEC, E}}, {{PREFIX, INFIX, 11, RDPREDEC, OPCODE, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP2DST, E}}, {{PREFIX, INFIX, B30 | B20 | DISP2DST, DSTDISPREG, OPCODE, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP16DST, E}}, {{PREFIX, INFIX, 12, B30 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, DISP32DST, E}}, {{PREFIX, INFIX, 12, B31 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB16D, E}}, {{PREFIX, INFIX, 13, B30 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW16D, E}}, {{PREFIX, INFIX, 14, B30 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL16D, E}}, {{PREFIX, INFIX, 15, B30 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXB32D, E}}, {{PREFIX, INFIX, 13, B31 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXW32D, E}}, {{PREFIX, INFIX, 14, B31 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, INDEXL32D, E}}, {{PREFIX, INFIX, 15, B31 | DSTDISPREG, OPCODE, B30 | IGNORE, DSTDISP32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, ABS16DST, E}}, {{PREFIX, INFIX, 4, B30 | IGNORE, OPCODE, B30 | IGNORE, DSTABS16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{SRC, ABS32DST, E}}, {{PREFIX, INFIX, 4, B31 | IGNORE, OPCODE, B30 | IGNORE, DSTABS32LIST, E}}}
-
-
-#define EXPAND_STD_MATRIX_L(CODE, NAME, OPCODE) \
- EXPAND3_L_SRC (CODE, 6, NAME, RSIND, PREFIX_0104, TFROM_IND, OPCODE), \
- EXPAND3_L_SRC (CODE, 6, NAME, RSPOSTINC, PREFIX_0104, TFROM_POSTINC, OPCODE), \
- EXPAND3_L_SRC (CODE, 6, NAME, RSPOSTDEC, PREFIX_0106, TFROM_POSTDEC, OPCODE), \
- EXPAND3_L_SRC (CODE, 6, NAME, RSPREINC, PREFIX_0105, TFROM_PREINC, OPCODE), \
- EXPAND3_L_SRC (CODE, 6, NAME, RSPREDEC, PREFIX_0107, TFROM_PREDEC, OPCODE), \
- EXPAND3_L_SRC (CODE, 6, NAME, DISP2SRC, PREFIX_010_D2, TFROM_DISP2, OPCODE), \
- EXPAND3_L_SRC (CODE, 6, NAME, DISP16SRC, PREFIX_0104, TFROM_DISP16, OPCODE), \
- EXPAND3_L_SRC (CODE, 6, NAME, DISP32SRC, PREFIX_78R4, TFROM_DISP32, OPCODE), \
- EXPAND3_L_SRC (CODE, 6, NAME, INDEXB16, PREFIX_0105, TFROM_DISP16B, OPCODE), \
- EXPAND3_L_SRC (CODE, 6, NAME, INDEXW16, PREFIX_0106, TFROM_DISP16W, OPCODE), \
- EXPAND3_L_SRC (CODE, 6, NAME, INDEXL16, PREFIX_0107, TFROM_DISP16L, OPCODE), \
- EXPAND3_L_SRC (CODE, 6, NAME, INDEXB32, PREFIX_78R5, TFROM_DISP32B, OPCODE), \
- EXPAND3_L_SRC (CODE, 6, NAME, INDEXW32, PREFIX_78R6, TFROM_DISP32W, OPCODE), \
- EXPAND3_L_SRC (CODE, 6, NAME, INDEXL32, PREFIX_78R7, TFROM_DISP32L, OPCODE), \
- EXPAND3_L_SRC (CODE, 6, NAME, ABS16SRC, PREFIX_0104, TFROM_ABS16, OPCODE), \
- EXPAND3_L_SRC (CODE, 6, NAME, ABS32SRC, PREFIX_0104, TFROM_ABS32, OPCODE)
-
-
-#define EXPAND_STD_MATRIX_W(CODE, NAME, OPCODE) \
- EXPAND3_L_SRC (CODE, 4, NAME, RSPOSTINC, PREFIX_0154, TFROM_POSTINC, OPCODE), \
- EXPAND3_L_SRC (CODE, 4, NAME, RSPOSTDEC, PREFIX_0156, TFROM_POSTDEC, OPCODE), \
- EXPAND3_L_SRC (CODE, 4, NAME, RSPREINC, PREFIX_0155, TFROM_PREINC, OPCODE), \
- EXPAND3_L_SRC (CODE, 4, NAME, RSPREDEC, PREFIX_0157, TFROM_PREDEC, OPCODE), \
- EXPAND3_L_SRC (CODE, 4, NAME, DISP2SRC, PREFIX_015_D2, TFROM_DISP2, OPCODE), \
- EXPAND3_L_SRC (CODE, 4, NAME, DISP16SRC, PREFIX_0154, TFROM_DISP16, OPCODE), \
- EXPAND3_L_SRC (CODE, 4, NAME, DISP32SRC, PREFIX_78R4W, TFROM_DISP32, OPCODE), \
- EXPAND3_L_SRC (CODE, 4, NAME, INDEXB16, PREFIX_0155, TFROM_DISP16B, OPCODE), \
- EXPAND3_L_SRC (CODE, 4, NAME, INDEXW16, PREFIX_0156, TFROM_DISP16W, OPCODE), \
- EXPAND3_L_SRC (CODE, 4, NAME, INDEXL16, PREFIX_0157, TFROM_DISP16L, OPCODE), \
- EXPAND3_L_SRC (CODE, 4, NAME, INDEXB32, PREFIX_78R5W, TFROM_DISP32B, OPCODE), \
- EXPAND3_L_SRC (CODE, 4, NAME, INDEXW32, PREFIX_78R6W, TFROM_DISP32W, OPCODE), \
- EXPAND3_L_SRC (CODE, 4, NAME, INDEXL32, PREFIX_78R7W, TFROM_DISP32L, OPCODE)
-
-#define EXPAND_STD_MATRIX_B(CODE, NAME, OPCODE) \
- EXPAND3_L_SRC (CODE, 4, NAME, RSPOSTINC, PREFIX_0174, TFROM_POSTINC_B, OPCODE), \
- EXPAND3_L_SRC (CODE, 4, NAME, RSPOSTDEC, PREFIX_0176, TFROM_POSTDEC_B, OPCODE), \
- EXPAND3_L_SRC (CODE, 4, NAME, RSPREINC, PREFIX_0175, TFROM_PREINC_B, OPCODE), \
- EXPAND3_L_SRC (CODE, 4, NAME, RSPREDEC, PREFIX_0177, TFROM_PREDEC_B, OPCODE), \
- EXPAND3_L_SRC (CODE, 4, NAME, DISP2SRC, PREFIX_017_D2S, TFROM_DISP2_B, OPCODE), \
- EXPAND3_L_SRC (CODE, 4, NAME, DISP16SRC, PREFIX_0174, TFROM_DISP16_B, OPCODE), \
- EXPAND3_L_SRC (CODE, 4, NAME, DISP32SRC, PREFIX_78R4W, TFROM_DISP32_B, OPCODE), \
- EXPAND3_L_SRC (CODE, 4, NAME, INDEXB16, PREFIX_0175, TFROM_DISP16B_B, OPCODE), \
- EXPAND3_L_SRC (CODE, 4, NAME, INDEXW16, PREFIX_0176, TFROM_DISP16W_B, OPCODE), \
- EXPAND3_L_SRC (CODE, 4, NAME, INDEXL16, PREFIX_0177, TFROM_DISP16L_B, OPCODE), \
- EXPAND3_L_SRC (CODE, 4, NAME, INDEXB32, PREFIX_78R5W, TFROM_DISP32B_B, OPCODE), \
- EXPAND3_L_SRC (CODE, 4, NAME, INDEXW32, PREFIX_78R6W, TFROM_DISP32W_B, OPCODE), \
- EXPAND3_L_SRC (CODE, 4, NAME, INDEXL32, PREFIX_78R7W, TFROM_DISP32L_B, OPCODE)
-
-
-/* Use the expansion macros to fill out the opcode table. */
-
-#define EXPAND_FROM_REG8(CODE, NAME, OP1, OP2, OP3) \
- {CODE, AV_H8SX, 0, NAME, {{RS8, RDIND, E}}, {{0x7, 0xd, B30 | RDIND, IGNORE, OP1, OP2, RS8, IGNORE, E}}}, \
- EXPAND2_STD_SRC (CODE, 2, NAME, RS8, PREFIX_0179, OP3, RS8), \
- {CODE, AV_H8SX, 0, NAME, {{RS8, ABS8DST, E}}, {{0x7, 0xf, DSTABS8LIST, OP1, OP2, RS8, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RS8, ABS16DST, E}}, {{0x6, 0xa, 0x1, B31 | IGNORE, DSTABS16LIST, OP1, OP2, RS8, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RS8, ABS32DST, E}}, {{0x6, 0xa, 0x3, B31 | IGNORE, DSTABS32LIST, OP1, OP2, RS8, IGNORE, E}}}
-
-#define EXPAND_TO_REG8(CODE, NAME, OP1, OP2, OP3) \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, RD8, E}}, {{0x7, 0xc, B30 | RSIND, IGNORE, OP1, OP2, IGNORE, RD8, E}}}, \
- EXPAND2_STD_DST (CODE, 2, NAME, RD8, PREFIX_017A, OP3, RD8), \
- {CODE, AV_H8SX, 0, NAME, {{ABS8SRC, RD8, E}}, {{0x7, 0xe, ABS8LIST, OP1, OP2, IGNORE, RD8, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, RD8, E}}, {{0x6, 0xa, 0x1, B30 | IGNORE, ABS16LIST, OP1, OP2, IGNORE, RD8, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, RD8, E}}, {{0x6, 0xa, 0x3, B30 | IGNORE, ABS32LIST, OP1, OP2, IGNORE, RD8, E}}}
-
-#define EXPAND_FROM_IND8(CODE, NAME, OPCODE) \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, RDIND, E}}, {{0x7, 0xc, B30 | RSIND, 0x5, TO_IND, OPCODE, IGNORE, E}}}, \
- EXPAND2_STD_IND (CODE, 2, NAME, OPCODE, B30), \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, ABS16DST, E}}, {{0x7, 0xc, B30 | RSIND, 0x5, TO_ABS16, OPCODE, IGNORE, DSTABS16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, ABS32DST, E}}, {{0x7, 0xc, B30 | RSIND, 0x5, TO_ABS32, OPCODE, IGNORE, DSTABS32LIST, E}}}
-
-#define EXPAND_FROM_ABS16_B(CODE, NAME, OPCODE) \
- {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, RDIND, E}}, {{PREFIX_6A15, ABS16LIST, TO_IND, OPCODE, IGNORE, E}}}, \
- EXPAND2_STD_ABSDISP (CODE, 2, NAME, ABS16SRC, PREFIX_6A15, ABS16LIST, OPCODE, IGNORE), \
- {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, ABS16DST, E}}, {{PREFIX_6A15, ABS16LIST, TO_ABS16, OPCODE, IGNORE, DSTABS16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, ABS32DST, E}}, {{PREFIX_6A15, ABS16LIST, TO_ABS32, OPCODE, IGNORE, DSTABS32LIST, E}}}
-
-#define EXPAND_FROM_ABS32_B(CODE, NAME, OPCODE) \
- {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, RDIND, E}}, {{PREFIX_6A35, ABS32LIST, TO_IND, OPCODE, IGNORE, E}}}, \
- EXPAND2_STD_ABSDISP (CODE, 2, NAME, ABS32SRC, PREFIX_6A35, ABS32LIST, OPCODE, IGNORE), \
- {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, ABS16DST, E}}, {{PREFIX_6A35, ABS32LIST, TO_ABS16, OPCODE, IGNORE, DSTABS16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, ABS32DST, E}}, {{PREFIX_6A35, ABS32LIST, TO_ABS32, OPCODE, IGNORE, DSTABS32LIST, E}}}
-
-#define EXPAND_FROM_IMM16_W(CODE, NAME, OPCODE) \
- {CODE, AV_H8SX, 0, NAME, {{IMM16, RDIND, E}}, {{PREFIX_015E, TO_IND, OPCODE, IGNORE, IMM16LIST, E}}}, \
- EXPAND2_STD_IMM (CODE, 2, NAME, IMM16, PREFIX_015E, OPCODE, IGNORE, IMM16LIST), \
- {CODE, AV_H8SX, 0, NAME, {{IMM16, ABS16DST, E}}, {{PREFIX_015E, TO_ABS16, OPCODE, IGNORE, DSTABS16LIST, IMM16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{IMM16, ABS32DST, E}}, {{PREFIX_015E, TO_ABS32, OPCODE, IGNORE, DSTABS32LIST, IMM16LIST, E}}}
-
-#define EXPAND_FROM_REG16(CODE, NAME, OP1, OP2, OP3) \
- {CODE, AV_H8, 2, NAME, {{RS16, RDIND, E}}, {{0x7, 0xd, B31 | RDIND, IGNORE, OP1, OP2, RS16, IGNORE, E}}}, \
- EXPAND2_STD_SRC (CODE, 2, NAME, RS16, PREFIX_0159, OP3, RS16), \
- {CODE, AV_H8SX, 0, NAME, {{RS16, ABS16DST, E}}, {{0x6, 0xb, 0x1, B31 | IGNORE, DSTABS16LIST, OP1, OP2, RS16, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RS16, ABS32DST, E}}, {{0x6, 0xb, 0x3, B31 | IGNORE, DSTABS32LIST, OP1, OP2, RS16, IGNORE, E}}}
-
-#define EXPAND_TO_REG16(CODE, NAME, OP1, OP2, OP3) \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, RD16, E}}, {{0x7, 0xc, B31 | RSIND, IGNORE, OP1, OP2, IGNORE, RD16, E}}}, \
- EXPAND2_STD_DST (CODE, 2, NAME, RD16, PREFIX_015A, OP3, RD16), \
- {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, RD16, E}}, {{0x6, 0xb, 0x1, B30 | IGNORE, ABS16LIST, OP1, OP2, IGNORE, RD16, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, RD16, E}}, {{0x6, 0xb, 0x3, B30 | IGNORE, ABS32LIST, OP1, OP2, IGNORE, RD16, E}}}
-
-#define EXPAND_FROM_IND16(CODE, NAME, OPCODE) \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, RDIND, E}}, {{0x7, 0xc, B31 | RSIND, 0x5, TO_IND, OPCODE, IGNORE, E}}}, \
- EXPAND2_STD_IND (CODE, 2, NAME, OPCODE, B31), \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, ABS16DST, E}}, {{0x7, 0xc, B31 | RSIND, 0x5, TO_ABS16, OPCODE, IGNORE, DSTABS16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, ABS32DST, E}}, {{0x7, 0xc, B31 | RSIND, 0x5, TO_ABS32, OPCODE, IGNORE, DSTABS32LIST, E}}}
-
-#define EXPAND_FROM_ABS16_W(CODE, NAME, OPCODE) \
- {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, RDIND, E}}, {{PREFIX_6B15, ABS16LIST, TO_IND, OPCODE, IGNORE, E}}}, \
- EXPAND2_STD_ABSDISP (CODE, 2, NAME, ABS16SRC, PREFIX_6B15, ABS16LIST, OPCODE, IGNORE), \
- {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, ABS16DST, E}}, {{PREFIX_6B15, ABS16LIST, TO_ABS16, OPCODE, IGNORE, DSTABS16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, ABS32DST, E}}, {{PREFIX_6B15, ABS16LIST, TO_ABS32, OPCODE, IGNORE, DSTABS32LIST, E}}}
-
-#define EXPAND_FROM_ABS32_W(CODE, NAME, OPCODE) \
- {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, RDIND, E}}, {{PREFIX_6B35, ABS32LIST, TO_IND, OPCODE, IGNORE, E}}}, \
- EXPAND2_STD_ABSDISP (CODE, 2, NAME, ABS32SRC, PREFIX_6B35, ABS32LIST, OPCODE, IGNORE), \
- {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, ABS16DST, E}}, {{PREFIX_6B35, ABS32LIST, TO_ABS16, OPCODE, IGNORE, DSTABS16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, ABS32DST, E}}, {{PREFIX_6B35, ABS32LIST, TO_ABS32, OPCODE, IGNORE, DSTABS32LIST, E}}}
-
-#define EXPAND_FROM_IMM16_L(CODE, NAME, OPCODE) \
- {CODE, AV_H8SX, 0, NAME, {{IMM16U_NS, RDIND, E}}, {{PREFIX_010E, TO_IND, OPCODE, B30 | IGNORE, IMM16ULIST, E}}}, \
- EXPAND2_STD_IMM (CODE, 2, NAME, IMM16U_NS, PREFIX_010E, OPCODE, B30 | IGNORE, IMM16ULIST), \
- {CODE, AV_H8SX, 0, NAME, {{IMM16U_NS, ABS16DST, E}}, {{PREFIX_010E, TO_ABS16, OPCODE, B30 | IGNORE, DSTABS16LIST, IMM16ULIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{IMM16U_NS, ABS32DST, E}}, {{PREFIX_010E, TO_ABS32, OPCODE, B30 | IGNORE, DSTABS32LIST, IMM16ULIST, E}}}
-
-#define EXPAND_FROM_IMM32_L(CODE, NAME, OPCODE) \
- {CODE, AV_H8SX, 0, NAME, {{IMM32, RDIND, E}}, {{PREFIX_010E, TO_IND, OPCODE, B31 | IGNORE, IMM32LIST, E}}}, \
- EXPAND2_STD_IMM (CODE, 2, NAME, IMM32, PREFIX_010E, OPCODE, B31 | IGNORE, IMM32LIST), \
- {CODE, AV_H8SX, 0, NAME, {{IMM32, ABS16DST, E}}, {{PREFIX_010E, TO_ABS16, OPCODE, B31 | IGNORE, DSTABS16LIST, IMM32LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{IMM32, ABS32DST, E}}, {{PREFIX_010E, TO_ABS32, OPCODE, B31 | IGNORE, DSTABS32LIST, IMM32LIST, E}}}
-
-#define EXPAND_FROM_REG32(CODE, NAME, OPCODE) \
- {CODE, AV_H8SX, 0, NAME, {{RS32, RDIND, E}}, {{PREFIX_0109, TO_IND, OPCODE, B30 | RS32, E}}}, \
- EXPAND2_STD_SRC (CODE, 2, NAME, RS32, PREFIX_0109, OPCODE, B30 | RS32), \
- {CODE, AV_H8SX, 0, NAME, {{RS32, ABS16DST, E}}, {{PREFIX_0109, TO_ABS16, OPCODE, B30 | RS32, DSTABS16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RS32, ABS32DST, E}}, {{PREFIX_0109, TO_ABS32, OPCODE, B30 | RS32, DSTABS32LIST, E}}}
-
-#define EXPAND_TO_REG32(CODE, NAME, OPCODE) \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, RD32, E}}, {{PREFIX_010A, FROM_IND, OPCODE, B30 | RD32, E}}}, \
- EXPAND2_STD_DST (CODE, 2, NAME, RD32, PREFIX_010A, OPCODE, B30 | RD32), \
- {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, RD32, E}}, {{PREFIX_010A, FROM_ABS16, OPCODE, B30 | RD32, ABS16LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, RD32, E}}, {{PREFIX_010A, FROM_ABS32, OPCODE, B30 | RD32, ABS32LIST, E}}}
-
-
-#define EXPAND_TWOOP_B(CODE, NAME, OP1, OP2, OP3, OP4, BIT) \
- {CODE, AV_H8SX, 0, NAME, {{IMM8, RDIND, E}}, {{0x7, 0xd, B30 | RDIND, IGNORE, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{IMM8, RDPOSTINC, E}}, {{PREFIX_0174, 0x6, 0xc, B30 | RDPOSTINC, B31 | B20 | IGNORE, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{IMM8, RDPOSTDEC, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RDPOSTDEC, B31 | B20 | IGNORE, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{IMM8, RDPREINC, E}}, {{PREFIX_0175, 0x6, 0xc, B30 | RDPREINC, B31 | B20 | IGNORE, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{IMM8, RDPREDEC, E}}, {{PREFIX_0177, 0x6, 0xc, B30 | RDPREDEC, B31 | B20 | IGNORE, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{IMM8, DISP2DST, E}}, {{PREFIX_017_D2D, 0x6, 0x8, B30 | DSTDISPREG, B31 | B20 | IGNORE, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{IMM8, DISP16DST, E}}, {{PREFIX_0174, 0x6, 0xe, B30 | DSTDISPREG, B31 | B20 | IGNORE, DSTDISP16LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{IMM8, DISP32DST, E}}, {{PREFIX_78R4WD, 0x6, 0xa, 2, B31 | B20 | IGNORE, DSTDISP32LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{IMM8, INDEXB16D, E}}, {{PREFIX_0175, 0x6, 0xe, B30 | DSTDISPREG, B31 | B20 | IGNORE, DSTDISP16LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{IMM8, INDEXW16D, E}}, {{PREFIX_0176, 0x6, 0xe, B30 | DSTDISPREG, B31 | B20 | IGNORE, DSTDISP16LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{IMM8, INDEXL16D, E}}, {{PREFIX_0177, 0x6, 0xe, B30 | DSTDISPREG, B31 | B20 | IGNORE, DSTDISP16LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{IMM8, INDEXB32D, E}}, {{PREFIX_78R5WD, 0x6, 0xa, 2, B31 | B20 | IGNORE, DSTDISP32LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{IMM8, INDEXW32D, E}}, {{PREFIX_78R6WD, 0x6, 0xa, 2, B31 | B20 | IGNORE, DSTDISP32LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{IMM8, INDEXL32D, E}}, {{PREFIX_78R7WD, 0x6, 0xa, 2, B31 | B20 | IGNORE, DSTDISP32LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{IMM8, ABS8DST, E}}, {{0x7, 0xf, DSTABS8LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{IMM8, ABS16DST, E}}, {{0x6, 0xa, 0x1, B31 | B20 | IGNORE, DSTABS16LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{IMM8, ABS32DST, E}}, {{0x6, 0xa, 0x3, B31 | B20 | IGNORE, DSTABS32LIST, OP1, BIT | IGNORE, IMM8LIST, E}}}, \
- {CODE, AV_H8, 2, NAME, {{RS8, RD8, E}}, {{OP2, OP3, RS8, RD8, E}}}, \
- EXPAND_FROM_REG8 (CODE, NAME, OP2, OP3, OP4), \
- EXPAND_TO_REG8 (CODE, NAME, OP2, OP3, OP4), \
- EXPAND_FROM_IND8 (CODE, NAME, OP4), \
- EXPAND_STD_MATRIX_B (CODE, NAME, OP4), \
- EXPAND_FROM_ABS16_B (CODE, NAME, OP4), \
- EXPAND_FROM_ABS32_B (CODE, NAME, OP4)
-
-#define EXPAND_TWOOP_W(CODE, NAME, OP1, OP2, OP3) \
- {CODE, AV_H8H, 6, NAME, {{IMM16, RD16, E}}, {{0x7, 0x9, OP3, RD16, IMM16LIST, E}}}, \
- EXPAND_FROM_IMM16_W (CODE, NAME, OP3), \
- EXPAND_FROM_REG16 (CODE, NAME, OP1, OP2, OP3), \
- EXPAND_TO_REG16 (CODE, NAME, OP1, OP2, OP3), \
- EXPAND_FROM_IND16 (CODE, NAME, OP3), \
- EXPAND_STD_MATRIX_W (CODE, NAME, OP3), \
- EXPAND_FROM_ABS16_W (CODE, NAME, OP3), \
- EXPAND_FROM_ABS32_W (CODE, NAME, OP3)
-
-#define EXPAND_TWOOP_L(CODE, NAME, OP1) \
- {CODE, AV_H8SX, 0, NAME, {{IMM16U_NS, RD32, E}}, {{0x7, 0xa, OP1, B31 | RD32, IMM16ULIST, E}}}, \
- {CODE, AV_H8H, 6, NAME, {{IMM32, RD32, E}}, {{0x7, 0xa, OP1, B30 | RD32, IMM32LIST, E}}}, \
- EXPAND_FROM_IMM16_L (CODE, NAME, OP1), \
- EXPAND_FROM_IMM32_L (CODE, NAME, OP1), \
- EXPAND_FROM_REG32 (CODE, NAME, OP1), \
- EXPAND_TO_REG32 (CODE, NAME, OP1), \
- EXPAND_STD_MATRIX_L (CODE, NAME, OP1)
-
-
-/* Old expanders: */
-
-#define BITOP(code, imm, name, op00, op01, op10, op11, op20, op21, op30, op4) \
- {code, AV_H8, 2, name, {{imm, RD8, E}}, {{op00, op01, imm, RD8, E}}}, \
- {code, AV_H8, 6, name, {{imm, RDIND, E}}, {{op10, op11, B30 | RDIND, 0, op00, op01, imm, 0, E}}}, \
- {code, AV_H8, 6, name, {{imm, ABS8DST, E}}, {{op20, op21, DSTABS8LIST, op00, op01, imm, 0, E}}}, \
- {code, AV_H8S, 6, name, {{imm, ABS16DST, E}}, {{0x6, 0xa, 0x1, op30, DST | MEMRELAX | ABS16LIST , op00, op01, imm, op4, E}}}, \
- {code, AV_H8S, 6, name, {{imm, ABS32DST, E}}, {{0x6, 0xa, 0x3, op30, DST | MEMRELAX | ABS32LIST , op00, op01, imm, op4, E}}}
-
-#define BITOP_B(code, imm, name, op00, op01, op10, op11, op20, op21, op30, op4) \
- {code, AV_H8SX, 0, name, {{imm, RDIND, E}}, {{op10, op11, B30 | RDIND, 0, op00, op01, imm, op4, E}}}, \
- {code, AV_H8SX, 0, name, {{imm, ABS8DST, E}}, {{op20, op21, DSTABS8LIST, op00, op01, imm, op4, E}}}, \
- {code, AV_H8SX, 0, name, {{imm, ABS16DST, E}}, {{0x6, 0xa, 0x1, op30, DST | ABS16LIST, op00, op01, imm, op4, E}}}, \
- {code, AV_H8SX, 0, name, {{imm, ABS32DST, E}}, {{0x6, 0xa, 0x3, op30, DST | ABS32LIST, op00, op01, imm, op4, E}}}
-
-#define EBITOP(code, imm, name, op00, op01, op10, op11, op20, op21, op30, op4) \
- BITOP(code, imm, name, op00+1, op01, op10, op11, op20, op21, op30, op4), \
- BITOP(code, RS8, name, op00, op01, op10, op11, op20, op21, op30, op4)
-
-#define EBITOP_B(code, imm, name, op00, op01, op10, op11, op20, op21, op30, op4) \
- BITOP_B(code, imm, name, op00+1, op01, op10, op11, op20, op21, op30, op4), \
- BITOP_B(code, RS8, name, op00, op01, op10, op11, op20, op21, op30, op4)
-
-#define WTWOP(code, name, op1, op2) \
- {code, AV_H8, 2, name, {{RS16, RD16, E}}, {{op1, op2, RS16, RD16, E}}}
-
-#define BRANCH(code, name, op) \
- {code, AV_H8H, 6, name, {{PCREL16, E}}, {{0x5, 0x8, op, 0x0, PCREL16, DATA3 | B00, E}}}, \
- {code, AV_H8, 4, name, {{PCREL8, E}}, {{0x4, op, PCREL8, DATA | B00, E}}}
-
-
-#define UNOP(code, name, op1, op2) \
- {code, AV_H8, 2, name, {{OR8, E}}, {{op1, op2, 0, OR8, E}}}
-
-#define EXPAND_UNOP_STD_B(CODE, NAME, PREFIX, OP1, OP2, OP3) \
- {CODE, AV_H8, 2, NAME, {{OR8, E}}, {{ OP1, OP2, OP3, OR8, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, E}}, {{ 7, 13, B30 | RSIND, IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSPOSTINC, E}}, {{PREFIX, 4, 6, 12, B30 | RSPOSTINC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSPOSTDEC, E}}, {{PREFIX, 6, 6, 12, B30 | RSPOSTDEC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSPREINC, E}}, {{PREFIX, 5, 6, 12, B30 | RSPREINC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSPREDEC, E}}, {{PREFIX, 7, 6, 12, B30 | RSPREDEC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{DISP2SRC, E}}, {{PREFIX, B30 | B21 | DISP2SRC, 6, 8, B30 | DISPREG, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{DISP16SRC, E}}, {{PREFIX, 4, 6, 14, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{DISP32SRC, E}}, {{7, 8, B30 | DISPREG, 4, 6, 10, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXB16, E}}, {{PREFIX, 5, 6, 14, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXW16, E}}, {{PREFIX, 6, 6, 14, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXL16, E}}, {{PREFIX, 7, 6, 14, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXB32, E}}, {{7, 8, B30 | DISPREG, 5, 6, 10, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXW32, E}}, {{7, 8, B30 | DISPREG, 6, 6, 10, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXL32, E}}, {{7, 8, B30 | DISPREG, 7, 6, 10, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{ABS8SRC, E}}, {{ 7, 15, ABS8LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, E}}, {{ 6, 10, 1, B31 | IGNORE, ABS16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, E}}, {{ 6, 10, 3, B31 | IGNORE, ABS32LIST, OP1, OP2, OP3, IGNORE, E}}}
-
-#define EXPAND_UNOP_STD_W(CODE, NAME, PREFIX, OP1, OP2, OP3) \
- {CODE, AV_H8H, 2, NAME, {{OR16, E}}, {{ OP1, OP2, OP3, OR16, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, E}}, {{ 7, 13, B31 | RSIND, IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSPOSTINC, E}}, {{PREFIX, 4, 6, 13, B30 | RSPOSTINC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSPOSTDEC, E}}, {{PREFIX, 6, 6, 13, B30 | RSPOSTDEC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSPREINC, E}}, {{PREFIX, 5, 6, 13, B30 | RSPREINC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSPREDEC, E}}, {{PREFIX, 7, 6, 13, B30 | RSPREDEC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{DISP2SRC, E}}, {{PREFIX, B30 | B21 | DISP2SRC, 6, 9, B30 | DISPREG, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{DISP16SRC, E}}, {{PREFIX, 4, 6, 15, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{DISP32SRC, E}}, {{7, 8, B30 | DISPREG, 4, 6, 11, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXB16, E}}, {{PREFIX, 5, 6, 15, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXW16, E}}, {{PREFIX, 6, 6, 15, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXL16, E}}, {{PREFIX, 7, 6, 15, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXB32, E}}, {{7, 8, B30 | DISPREG, 5, 6, 11, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXW32, E}}, {{7, 8, B30 | DISPREG, 6, 6, 11, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXL32, E}}, {{7, 8, B30 | DISPREG, 7, 6, 11, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, E}}, {{ 6, 11, 1, B31 | IGNORE, ABS16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, E}}, {{ 6, 11, 3, B31 | IGNORE, ABS32LIST, OP1, OP2, OP3, IGNORE, E}}}
-
-#define EXPAND_UNOP_STD_L(CODE, NAME, PREFIX, OP1, OP2, OP3) \
- {CODE, AV_H8H, 2, NAME, {{OR32, E}}, {{ OP1, OP2, OP3, B30 | OR32, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSIND, E}}, {{PREFIX, 4, 6, 9, B30 | RSIND, B31 | IGNORE, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSPOSTINC, E}}, {{PREFIX, 4, 6, 13, B30 | RSPOSTINC, B31 | IGNORE, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSPOSTDEC, E}}, {{PREFIX, 6, 6, 13, B30 | RSPOSTDEC, B31 | IGNORE, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSPREINC, E}}, {{PREFIX, 5, 6, 13, B30 | RSPREINC, B31 | IGNORE, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{RSPREDEC, E}}, {{PREFIX, 7, 6, 13, B30 | RSPREDEC, B31 | IGNORE, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{DISP2SRC, E}}, {{PREFIX, B30 | B21 | DISP2SRC, 6, 9, B30 | DISPREG, B31 | IGNORE, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{DISP16SRC, E}}, {{PREFIX, 4, 6, 15, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{DISP32SRC, E}}, {{7, 8, B31 | DISPREG, 4, 6, 11, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXB16, E}}, {{PREFIX, 5, 6, 15, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXW16, E}}, {{PREFIX, 6, 6, 15, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXL16, E}}, {{PREFIX, 7, 6, 15, B30 | DISPREG, B31 | IGNORE, DISP16LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXB32, E}}, {{7, 8, B31 | DISPREG, 5, 6, 11, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXW32, E}}, {{7, 8, B31 | DISPREG, 6, 6, 11, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{INDEXL32, E}}, {{7, 8, B31 | DISPREG, 7, 6, 11, 2, B31 | IGNORE, DISP32LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{ABS16SRC, E}}, {{PREFIX, 4, 6, 11, 0, B31 | IGNORE, ABS16LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{ABS32SRC, E}}, {{PREFIX, 4, 6, 11, 2, B31 | IGNORE, ABS32LIST, OP1, OP2, OP3, B30 | IGNORE, E}}}
-
-#define EXPAND_UNOP_EXTENDED_B(CODE, NAME, CONST, PREFIX, OP1, OP2, OP3) \
- {CODE, AV_H8, 2, NAME, {{CONST, RD8, E}}, {{ OP1, OP2, OP3, RD8, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, RDIND, E}}, {{ 7, 13, B30 | RDIND, IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, RDPOSTINC, E}}, {{PREFIX, 4, 6, 12, B30 | RDPOSTINC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, RDPOSTDEC, E}}, {{PREFIX, 6, 6, 12, B30 | RDPOSTDEC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, RDPREINC, E}}, {{PREFIX, 5, 6, 12, B30 | RDPREINC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, RDPREDEC, E}}, {{PREFIX, 7, 6, 12, B30 | RDPREDEC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, DISP2DST, E}}, {{PREFIX, B30 | B21 | DISP2DST, 6, 8, B30 | DSTDISPREG, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, DISP16DST, E}}, {{PREFIX, 4, 6, 14, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, DISP32DST, E}}, {{7, 8, B30 | DSTDISPREG, 4, 6, 10, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXB16D, E}}, {{PREFIX, 5, 6, 14, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXW16D, E}}, {{PREFIX, 6, 6, 14, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXL16D, E}}, {{PREFIX, 7, 6, 14, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXB32D, E}}, {{7, 8, B30 | DSTDISPREG, 5, 6, 10, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXW32D, E}}, {{7, 8, B30 | DSTDISPREG, 6, 6, 10, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXL32D, E}}, {{7, 8, B30 | DSTDISPREG, 7, 6, 10, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, ABS8DST, E}}, {{ 7, 15, DSTABS8LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, ABS16DST, E}}, {{ 6, 10, 1, B31 | IGNORE, DSTABS16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, ABS32DST, E}}, {{ 6, 10, 3, B31 | IGNORE, DSTABS32LIST, OP1, OP2, OP3, IGNORE, E}}}
-
-#define EXPAND_UNOP_EXTENDED_W(CODE, NAME, CONST, PREFIX, OP1, OP2, OP3) \
- {CODE, AV_H8, 2, NAME, {{CONST, RD16, E}}, {{ OP1, OP2, OP3, RD16, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, RDIND, E}}, {{ 7, 13, B31 | RDIND, IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, RDPOSTINC, E}}, {{PREFIX, 4, 6, 13, B30 | RDPOSTINC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, RDPOSTDEC, E}}, {{PREFIX, 6, 6, 13, B30 | RDPOSTDEC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, RDPREINC, E}}, {{PREFIX, 5, 6, 13, B30 | RDPREINC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, RDPREDEC, E}}, {{PREFIX, 7, 6, 13, B30 | RDPREDEC, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, DISP2DST, E}}, {{PREFIX, B30 | B21 | DISP2DST, 6, 9, B30 | DSTDISPREG, B31 | IGNORE, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, DISP16DST, E}}, {{PREFIX, 4, 6, 15, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, DISP32DST, E}}, {{7, 8, B30 | DSTDISPREG, 4, 6, 11, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXB16D, E}}, {{PREFIX, 5, 6, 15, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXW16D, E}}, {{PREFIX, 6, 6, 15, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXL16D, E}}, {{PREFIX, 7, 6, 15, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXB32D, E}}, {{7, 8, B30 | DSTDISPREG, 5, 6, 11, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXW32D, E}}, {{7, 8, B30 | DSTDISPREG, 6, 6, 11, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXL32D, E}}, {{7, 8, B30 | DSTDISPREG, 7, 6, 11, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, ABS16DST, E}}, {{ 6, 11, 1, B31 | IGNORE, DSTABS16LIST, OP1, OP2, OP3, IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, ABS32DST, E}}, {{ 6, 11, 3, B31 | IGNORE, DSTABS32LIST, OP1, OP2, OP3, IGNORE, E}}}
-
-#define EXPAND_UNOP_EXTENDED_L(CODE, NAME, CONST, PREFIX, OP1, OP2, OP3, BIT) \
- {CODE, AV_H8, 2, NAME, {{CONST, RD32, E}}, {{ OP1, OP2, OP3, BIT | RD32, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, RDIND, E}}, {{PREFIX, 4, 6, 9, B30 | RDIND, B31 | IGNORE, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, RDPOSTINC, E}}, {{PREFIX, 4, 6, 13, B30 | RDPOSTINC, B31 | IGNORE, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, RDPOSTDEC, E}}, {{PREFIX, 6, 6, 13, B30 | RDPOSTDEC, B31 | IGNORE, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, RDPREINC, E}}, {{PREFIX, 5, 6, 13, B30 | RDPREINC, B31 | IGNORE, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, RDPREDEC, E}}, {{PREFIX, 7, 6, 13, B30 | RDPREDEC, B31 | IGNORE, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, DISP2DST, E}}, {{PREFIX, B30 | B21 | DISP2DST, 6, 9, B30 | DSTDISPREG, B31 | IGNORE, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, DISP16DST, E}}, {{PREFIX, 4, 6, 15, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, DISP32DST, E}}, {{7, 8, B31 | DSTDISPREG, 4, 6, 11, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXB16D, E}}, {{PREFIX, 5, 6, 15, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXW16D, E}}, {{PREFIX, 6, 6, 15, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXL16D, E}}, {{PREFIX, 7, 6, 15, B30 | DSTDISPREG, B31 | IGNORE, DSTDISP16LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXB32D, E}}, {{7, 8, B31 | DSTDISPREG, 5, 6, 11, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXW32D, E}}, {{7, 8, B31 | DSTDISPREG, 6, 6, 11, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, INDEXL32D, E}}, {{7, 8, B31 | DSTDISPREG, 7, 6, 11, 2, B31 | IGNORE, DSTDISP32LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, ABS16DST, E}}, {{PREFIX, 4, 6, 11, 0, B31 | IGNORE, DSTABS16LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}, \
- {CODE, AV_H8SX, 0, NAME, {{CONST, ABS32DST, E}}, {{PREFIX, 4, 6, 11, 2, B31 | IGNORE, DSTABS32LIST, OP1, OP2, OP3, BIT | IGNORE, E}}}
-
-#define PREFIXLDC 0x0, 0x1, 0x4, B30 | CCR_EXR | DST
-#define PREFIXSTC 0x0, 0x1, 0x4, B30 | CCR_EXR | SRC
-
-#define O(op, size) (op * 4 + size)
-#define OP_SIZE(HOW) (HOW % 4)
-#define OP_KIND(HOW) (HOW / 4)
-
-enum h8_asm_codes
-{
- O_RECOMPILE = 0,
- O_ADD,
- O_ADDX,
- O_AND,
- O_BAND,
- O_BRA,
- O_BRAB,
- O_BRAW,
- O_BRAL,
- O_BRAS,
- O_BRABC,
- O_BRABS,
- O_BSRBC,
- O_BSRBS,
- O_BRN,
- O_BHI,
- O_BLS,
- O_BCC,
- O_BCS,
- O_BNE,
- O_BVC,
- O_BVS,
- O_BPL,
- O_BMI,
- O_BGE,
- O_BLT,
- O_BGT,
- O_BLE,
- O_ANDC,
- O_BEQ,
- O_BCLR,
- O_BCLREQ,
- O_BCLRNE,
- O_BSETEQ,
- O_BSETNE,
- O_BFLD,
- O_BFST,
- O_BIAND,
- O_BILD,
- O_BIOR,
- O_BIXOR,
- O_BIST,
- O_BISTZ,
- O_BLD,
- O_BNOT,
- O_BOR,
- O_BSET,
- O_BSR,
- O_BXOR,
- O_CMP,
- O_DAA,
- O_DAS,
- O_DEC,
- O_DIVU,
- O_DIVS,
- O_DIVXU,
- O_DIVXS,
- O_INC,
- O_LDC,
- O_MOV,
- O_MOVAB,
- O_MOVAW,
- O_MOVAL,
- O_MOVMD,
- O_MOVSD,
- O_OR,
- O_ROTL,
- O_ROTR,
- O_ROTXL,
- O_ROTXR,
- O_BPT,
- O_SHAL,
- O_SHAR,
- O_SHLL,
- O_SHLR,
- O_SUB,
- O_SUBS,
- O_TRAPA,
- O_XOR,
- O_XORC,
- O_BST,
- O_BSTZ,
- O_BTST,
- O_EEPMOV,
- O_EXTS,
- O_EXTU,
- O_JMP,
- O_JSR,
- O_MULU,
- O_MULUU,
- O_MULS,
- O_MULSU,
- O_MULXU,
- O_MULXS,
- O_NOP,
- O_NOT,
- O_ORC,
- O_RTE,
- O_RTEL,
- O_STC,
- O_SUBX,
- O_NEG,
- O_RTS,
- O_RTSL,
- O_SLEEP,
- O_ILL,
- O_ADDS,
- O_SYSCALL,
- O_TAS,
- O_CLRMAC,
- O_LDMAC,
- O_MAC,
- O_LDM,
- O_STM,
- O_STMAC,
- O_LAST,
- /* Change made for System Call processing. */
- O_SYS_CREAT,
- O_SYS_OPEN,
- O_SYS_READ,
- O_SYS_WRITE,
- O_SYS_LSEEK,
- O_SYS_CLOSE,
- O_SYS_STAT,
- O_SYS_FSTAT,
-/* Space reserved for future file I/O system calls. */
- O_SYS_CMDLINE
- /* End of System Call specific Changes. */
-};
-
-enum h8_size
-{
- SB = 0,
- SW = 1,
- SL = 2,
- SN = 3
-};
-
-
-/* FIXME: Lots of insns have "E, 0, 0, 0, 0" in the nibble code sequences.
- Methinks the zeroes aren't necessary. Once confirmed, nuke 'em. */
-
-struct h8_opcode h8_opcodes[] =
-{
- {O (O_ADD, SB), AV_H8, 2, "add.b", {{IMM8, RD8, E}}, {{0x8, RD8, IMM8LIST, E}}},
- EXPAND_TWOOP_B (O (O_ADD, SB), "add.b", 0x8, 0x0, 0x8, 0x1, 0),
-
- {O (O_ADD, SW), AV_H8, 6, "add.w", {{RS16, RD16, E}}, {{0x0, 0x9, RS16, RD16, E}}},
- {O (O_ADD, SW), AV_H8SX, 0, "add.w", {{IMM3NZ_NS, RD16, E}}, {{0x0, 0xa, B30 | IMM3NZ, RD16, E}}},
- {O (O_ADD, SW), AV_H8SX, 0, "add.w", {{IMM3NZ_NS, RDIND, E}}, {{0x7, 0xd, B31 | RDIND, IGNORE, 0x0, 0xa, B30 | IMM3NZ, IGNORE, E}}},
- {O (O_ADD, SW), AV_H8SX, 0, "add.w", {{IMM3NZ_NS, ABS16DST, E}}, {{0x6, 0xb, 0x1, B31 | IGNORE, DSTABS16LIST, 0x0, 0xa, B30 | IMM3NZ, IGNORE, E}}},
- {O (O_ADD, SW), AV_H8SX, 0, "add.w", {{IMM3NZ_NS, ABS32DST, E}}, {{0x6, 0xb, 0x3, B31 | IGNORE, DSTABS32LIST, 0x0, 0xa, B30 | IMM3NZ, IGNORE, E}}},
- EXPAND_TWOOP_W (O (O_ADD, SW), "add.w", 0x0, 0x9, 0x1),
-
- {O (O_ADD, SL), AV_H8H, 6, "add.l", {{RS32, RD32, E}}, {{0x0, 0xa, B31 | RS32, B30 | RD32, E}}},
- {O (O_ADD, SL), AV_H8SX, 0, "add.l", {{IMM3NZ_NS, RD32, E}}, {{0x0, 0xa, B31 | IMM3NZ, B31 | RD32, E}}},
- EXPAND_TWOOP_L (O (O_ADD, SL), "add.l", 0x1),
-
- {O (O_ADDS, SL), AV_H8, 2, "adds", {{KBIT, RDP, E}}, {{0x0, 0xB,KBIT, RDP, E}}},
-
- {O (O_ADDX, SB), AV_H8, 2, "addx", {{IMM8, RD8, E}}, {{0x9, RD8, IMM8LIST, E}}},
- {O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{IMM8, RDIND, E}}, {{0x7, 0xd, B30 | RDIND, IGNORE, 0x9, IGNORE, IMM8LIST, E}}},
- {O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{IMM8, RDPOSTDEC, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RDPOSTDEC, B31 | IGNORE, 0x9, IGNORE, IMM8LIST, E}}},
- {O (O_ADDX, SB), AV_H8, 2, "addx", {{RS8, RD8, E}}, {{0x0, 0xe, RS8, RD8, E}}},
- {O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{RS8, RDIND, E}}, {{0x7, 0xd, B30 | RDIND, IGNORE, 0x0, 0xe, RS8, IGNORE, E}}},
- {O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{RS8, RDPOSTDEC, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RDPOSTDEC, B31 | IGNORE, 0x0, 0xe, RS8, IGNORE, E}}},
- {O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{RSIND, RD8, E}}, {{0x7, 0xc, B30 | RSIND, IGNORE, 0x0, 0xe, IGNORE, RD8, E}}},
- {O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{RSPOSTDEC, RD8, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RSPOSTDEC, B30 | B20 | IGNORE, 0x0, 0xe, IGNORE, RD8, E}}},
- {O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{RSIND, RDIND, E}}, {{PREFIX_0174, 0x6, 0x8, B30 | RSIND, 0xd, 0x0, RDIND, 0x1, IGNORE, E}}},
- {O (O_ADDX, SB), AV_H8SX, 0, "addx.b", {{RSPOSTDEC, RDPOSTDEC, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RSPOSTDEC, 0xd, 0xa, RDPOSTDEC, 0x1, IGNORE, E}}},
-
- {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{IMM16, RD16, E}}, {{PREFIX_0151, 0x7, 0x9, 0x1, RD16, IMM16LIST, E}}},
- {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{IMM16, RDIND, E}}, {{0x7, 0xd, B31 | RDIND, B01 | IGNORE, 0x7, 0x9, 0x1, IGNORE, IMM16LIST, E}}},
- {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{IMM16, RDPOSTDEC, E}}, {{PREFIX_0156, 0x6, 0xd, B30 | RDPOSTDEC, B31 | B20 | B01 | IGNORE, 0x7, 0x9, 0x1, IGNORE, IMM16LIST, E}}},
- {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{RS16, RD16, E}}, {{PREFIX_0151, 0x0, 0x9, RS16, RD16, E}}},
- {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{RS16, RDIND, E}}, {{0x7, 0xd, B31 | RDIND, B01 | IGNORE, 0x0, 0x9, RS16, IGNORE, E}}},
- {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{RS16, RDPOSTDEC, E}}, {{PREFIX_0156, 0x6, 0xd, B30 | RDPOSTDEC, B31 | B20 | B01 | IGNORE, 0x0, 0x9, RS16, IGNORE, E}}},
- {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{RSIND, RD16, E}}, {{0x7, 0xc, B31 | RSIND, B01 | IGNORE, 0x0, 0x9, IGNORE, RD16, E}}},
- {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{RSPOSTDEC, RD16, E}}, {{PREFIX_0156, 0x6, 0xd, B30 | RSPOSTDEC, B30 | B20 | B01 | IGNORE, 0x0, 0x9, IGNORE, RD16, E}}},
- {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{RSIND, RDIND, E}}, {{PREFIX_0154, 0x6, 0x9, B30 | RSIND, 0xd, 0x0, RDIND, 0x1, IGNORE, E}}},
- {O (O_ADDX, SW), AV_H8SX, 0, "addx.w", {{RSPOSTDEC, RDPOSTDEC, E}}, {{PREFIX_0156, 0x6, 0xd, B30 | RSPOSTDEC, 0xd, 0xa, RDPOSTDEC, 0x1, IGNORE, E}}},
-
- {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{IMM32, RD32, E}}, {{PREFIX_0101, 0x7, 0xa, 0x1, RD32, IMM32LIST, E}}},
- {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{IMM32, RDIND, E}}, {{PREFIX_0104, 0x6, 0x9, B30 | RDIND, B31 | B20 | B01 | IGNORE, 0x7, 0xa, 0x1, IGNORE, IMM32LIST, E}}},
- {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{IMM32, RDPOSTDEC, E}}, {{PREFIX_0106, 0x6, 0xd, B30 | RDPOSTDEC, B31 | B20 | B01 | IGNORE, 0x7, 0xa, 0x1, IGNORE, IMM32LIST, E}}},
- {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{RS32, RD32, E}}, {{PREFIX_0101, 0x0, 0xa, B31 | RS32, B30 | RD32, E}}},
- {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{RS32, RDIND, E}}, {{PREFIX_0104, 0x6, 0x9, B30 | RDIND, B31 | B20 | B01 | IGNORE, 0x0, 0xa, B31 | RS32, B30 | IGNORE, E}}},
- {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{RS32, RDPOSTDEC, E}}, {{PREFIX_0106, 0x6, 0xd, B30 | RDPOSTDEC, B31 | B20 | B01 | IGNORE, 0x0, 0xa, B31 | RS32, B30 | IGNORE, E}}},
- {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{RSIND, RD32, E}}, {{PREFIX_0104, 0x6, 0x9, B30 | RSIND, B30 | B20 | B01 | IGNORE, 0x0, 0xa, B31 | IGNORE, B30 | RD32, E}}},
- {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{RSPOSTDEC, RD32, E}}, {{PREFIX_0106, 0x6, 0xd, B30 | RSPOSTDEC, B30 | B20 | B01 | IGNORE, 0x0, 0xa, B31 | IGNORE, B30 | RD32, E}}},
- {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{RSIND, RDIND, E}}, {{PREFIX_0104, 0x6, 0x9, B30 | RSIND, 0xd, 0x0, RDIND, 0x1, IGNORE, E}}},
- {O (O_ADDX, SL), AV_H8SX, 0, "addx.l", {{RSPOSTDEC, RDPOSTDEC, E}}, {{PREFIX_0106, 0x6, 0xd, B30 | RSPOSTDEC, 0xd, 0xa, RDPOSTDEC, 0x1, IGNORE, E}}},
-
- {O (O_AND, SB), AV_H8, 2, "and.b", {{IMM8, RD8, E}}, {{0xe, RD8, IMM8LIST, E}}},
- EXPAND_TWOOP_B (O (O_AND, SB), "and.b", 0xe, 0x1, 0x6, 0x6, 0),
-
- {O (O_AND, SW), AV_H8, 2, "and.w", {{RS16, RD16, E}}, {{0x6, 0x6, RS16, RD16, E}}},
- EXPAND_TWOOP_W (O (O_AND, SW), "and.w", 0x6, 0x6, 0x6),
-
- {O (O_AND, SL), AV_H8H, 2, "and.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xF, 0x0, 0x6, 0x6, B30 | RS32, B30 | RD32, E}}},
- EXPAND_TWOOP_L (O (O_AND, SL), "and.l", 0x6),
-
- {O (O_ANDC, SB), AV_H8, 2, "andc", {{IMM8, CCR | DST, E}}, {{0x0, 0x6, IMM8LIST, E}}},
- {O (O_ANDC, SB), AV_H8S, 2, "andc", {{IMM8, EXR | DST, E}}, {{0x0, 0x1, 0x4, EXR | DST, 0x0, 0x6, IMM8LIST, E}}},
-
- BRANCH (O (O_BRA, SB), "bra", 0x0),
-
- {O (O_BRAB, SB), AV_H8SX, 0, "bra", {{LOWREG | L_8, E}}, {{0x5, 0x9, LOWREG | L_8 | B30, 0x5, E}}},
- {O (O_BRAW, SW), AV_H8SX, 0, "bra", {{LOWREG | L_16, E}}, {{0x5, 0x9, LOWREG | L_16 | B30, 0x6, E}}},
- {O (O_BRAL, SL), AV_H8SX, 0, "bra", {{RS32, E}}, {{0x5, 0x9, RS32 | B30, 0x7, E}}},
-
- {O (O_BRABC, SB), AV_H8SX, 0, "bra/bc", {{IMM3, RDIND, OP3PCREL8}}, {{0x7, 0xC, B30 | RDIND, 0x0, 0x4, B30 | IMM3, OP3PCREL8, DATA, E}}},
- {O (O_BRABC, SB), AV_H8SX, 0, "bra/bc", {{IMM3, ABS8DST, OP3PCREL8}}, {{0x7, 0xE, DSTABS8LIST, 0x4, B30 | IMM3, OP3PCREL8, DATA, E}}},
- {O (O_BRABC, SB), AV_H8SX, 0, "bra/bc", {{IMM3, ABS16DST, OP3PCREL8}}, {{0x6, 0xA, 0x1, 0x0, DSTABS16LIST, 0x4, B30 | IMM3, OP3PCREL8, DATA, E}}},
- {O (O_BRABC, SB), AV_H8SX, 0, "bra/bc", {{IMM3, ABS32DST, OP3PCREL8}}, {{0x6, 0xA, 0x3, 0x0, DSTABS32LIST, 0x4, B30 | IMM3, OP3PCREL8, DATA, E}}},
- {O (O_BRABS, SB), AV_H8SX, 0, "bra/bs", {{IMM3, RDIND, OP3PCREL8}}, {{0x7, 0xC, B30 | RDIND, 0x0, 0x4, B31 | IMM3, OP3PCREL8, DATA, E}}},
- {O (O_BRABS, SB), AV_H8SX, 0, "bra/bs", {{IMM3, ABS8DST, OP3PCREL8}}, {{0x7, 0xE, DSTABS8LIST, 0x4, B31 | IMM3, OP3PCREL8, DATA, E}}},
- {O (O_BRABS, SB), AV_H8SX, 0, "bra/bs", {{IMM3, ABS16DST, OP3PCREL8}}, {{0x6, 0xA, 0x1, 0x0, DSTABS16LIST, 0x4, B31 | IMM3, OP3PCREL8, DATA, E}}},
- {O (O_BRABS, SB), AV_H8SX, 0, "bra/bs", {{IMM3, ABS32DST, OP3PCREL8}}, {{0x6, 0xA, 0x3, 0x0, DSTABS32LIST, 0x4, B31 | IMM3, OP3PCREL8, DATA, E}}},
- {O (O_BRABC, SB), AV_H8SX, 0, "bra/bc", {{IMM3, RDIND, OP3PCREL16}}, {{0x7, 0xC, B30 | RDIND, 0x0, 0x5, 0x8, B30 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
- {O (O_BRABC, SB), AV_H8SX, 0, "bra/bc", {{IMM3, ABS8DST, OP3PCREL16}}, {{0x7, 0xE, DSTABS8LIST, 0x5, 0x8, B30 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
- {O (O_BRABC, SB), AV_H8SX, 0, "bra/bc", {{IMM3, ABS16DST, OP3PCREL16}}, {{0x6, 0xA, 0x1, 0x0, DSTABS16LIST, 0x5, 0x8, B30 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
- {O (O_BRABC, SB), AV_H8SX, 0, "bra/bc", {{IMM3, ABS32DST, OP3PCREL16}}, {{0x6, 0xA, 0x3, 0x0, DSTABS32LIST, 0x5, 0x8, B30 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
- {O (O_BRABS, SB), AV_H8SX, 0, "bra/bs", {{IMM3, RDIND, OP3PCREL16}}, {{0x7, 0xC, B30 | RDIND, 0x0, 0x5, 0x8, B31 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
- {O (O_BRABS, SB), AV_H8SX, 0, "bra/bs", {{IMM3, ABS8DST, OP3PCREL16}}, {{0x7, 0xE, DSTABS8LIST, 0x5, 0x8, B31 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
- {O (O_BRABS, SB), AV_H8SX, 0, "bra/bs", {{IMM3, ABS16DST, OP3PCREL16}}, {{0x6, 0xA, 0x1, 0x0, DSTABS16LIST, 0x5, 0x8, B31 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
- {O (O_BRABS, SB), AV_H8SX, 0, "bra/bs", {{IMM3, ABS32DST, OP3PCREL16}}, {{0x6, 0xA, 0x3, 0x0, DSTABS32LIST, 0x5, 0x8, B31 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
-
- {O (O_BRAS, SB), AV_H8SX, 0, "bra/s", {{PCREL8, E}}, {{0x4, 0x0, PCREL8, DATA | B01, E}}},
-
- {O (O_BSRBC, SB), AV_H8SX, 0, "bsr/bc", {{IMM3, RDIND, OP3PCREL16}}, {{0x7, 0xC, B30 | RDIND, 0x0, 0x5, 0xC, B30 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
- {O (O_BSRBC, SB), AV_H8SX, 0, "bsr/bc", {{IMM3, ABS8DST, OP3PCREL16}}, {{0x7, 0xE, DSTABS8LIST, 0x5, 0xC, B30 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
- {O (O_BSRBC, SB), AV_H8SX, 0, "bsr/bc", {{IMM3, ABS16DST, OP3PCREL16}}, {{0x6, 0xA, 0x1, 0x0, DSTABS16LIST, 0x5, 0xC, B30 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
- {O (O_BSRBC, SB), AV_H8SX, 0, "bsr/bc", {{IMM3, ABS32DST, OP3PCREL16}}, {{0x6, 0xA, 0x3, 0x0, DSTABS32LIST, 0x5, 0xC, B30 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
- {O (O_BSRBS, SB), AV_H8SX, 0, "bsr/bs", {{IMM3, RDIND, OP3PCREL16}}, {{0x7, 0xC, B30 | RDIND, 0x0, 0x5, 0xC, B31 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
- {O (O_BSRBS, SB), AV_H8SX, 0, "bsr/bs", {{IMM3, ABS8DST, OP3PCREL16}}, {{0x7, 0xE, DSTABS8LIST, 0x5, 0xC, B31 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
- {O (O_BSRBS, SB), AV_H8SX, 0, "bsr/bs", {{IMM3, ABS16DST, OP3PCREL16}}, {{0x6, 0xA, 0x1, 0x0, DSTABS16LIST, 0x5, 0xC, B31 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
- {O (O_BSRBS, SB), AV_H8SX, 0, "bsr/bs", {{IMM3, ABS32DST, OP3PCREL16}}, {{0x6, 0xA, 0x3, 0x0, DSTABS32LIST, 0x5, 0xC, B31 | IMM3, 0x0, OP3PCREL16, DATA3, E}}},
-
- BRANCH (O (O_BRA, SB), "bt", 0x0),
- BRANCH (O (O_BRN, SB), "brn", 0x1),
- BRANCH (O (O_BRN, SB), "bf", 0x1),
- BRANCH (O (O_BHI, SB), "bhi", 0x2),
- BRANCH (O (O_BLS, SB), "bls", 0x3),
- BRANCH (O (O_BCC, SB), "bcc", 0x4),
- BRANCH (O (O_BCC, SB), "bhs", 0x4),
- BRANCH (O (O_BCS, SB), "bcs", 0x5),
- BRANCH (O (O_BCS, SB), "blo", 0x5),
- BRANCH (O (O_BNE, SB), "bne", 0x6),
- BRANCH (O (O_BEQ, SB), "beq", 0x7),
- BRANCH (O (O_BVC, SB), "bvc", 0x8),
- BRANCH (O (O_BVS, SB), "bvs", 0x9),
- BRANCH (O (O_BPL, SB), "bpl", 0xA),
- BRANCH (O (O_BMI, SB), "bmi", 0xB),
- BRANCH (O (O_BGE, SB), "bge", 0xC),
- BRANCH (O (O_BLT, SB), "blt", 0xD),
- BRANCH (O (O_BGT, SB), "bgt", 0xE),
- BRANCH (O (O_BLE, SB), "ble", 0xF),
-
- EBITOP (O (O_BCLR, SB), IMM3 | B30, "bclr", 0x6, 0x2, 0x7, 0xD, 0x7, 0xF, 0x8, 0),
- BITOP (O (O_BAND, SB), IMM3 | B30, "band", 0x7, 0x6, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
- BITOP (O (O_BIAND, SB), IMM3 | B31, "biand", 0x7, 0x6, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
- BITOP (O (O_BILD, SB), IMM3 | B31, "bild", 0x7, 0x7, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
- BITOP (O (O_BIOR, SB), IMM3 | B31, "bior", 0x7, 0x4, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
- BITOP (O (O_BIST, SB), IMM3 | B31, "bist", 0x6, 0x7, 0x7, 0xD, 0x7, 0xF, 0x8, 0),
- BITOP (O (O_BIXOR, SB), IMM3 | B31, "bixor", 0x7, 0x5, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
- BITOP (O (O_BLD, SB), IMM3 | B30, "bld", 0x7, 0x7, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
- EBITOP (O (O_BNOT, SB), IMM3 | B30, "bnot", 0x6, 0x1, 0x7, 0xD, 0x7, 0xF, 0x8, 0),
- BITOP (O (O_BOR, SB), IMM3 | B30, "bor", 0x7, 0x4, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
- EBITOP (O (O_BSET, SB), IMM3 | B30, "bset", 0x6, 0x0, 0x7, 0xD, 0x7, 0xF, 0x8, 0),
- BITOP (O (O_BST, SB), IMM3 | B30, "bst", 0x6, 0x7, 0x7, 0xD, 0x7, 0xF, 0x8, 0),
- EBITOP (O (O_BTST, SB), IMM3 | B30, "btst", 0x6, 0x3, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
- BITOP (O (O_BXOR, SB), IMM3 | B30, "bxor", 0x7, 0x5, 0x7, 0xC, 0x7, 0xE, 0x0, 0),
-
- EBITOP_B (O (O_BCLREQ, SB), IMM3 | B30, "bclr/eq", 0x6, 0x2, 0x7, 0xD, 0x7, 0xF, 0x8, 0x7),
- EBITOP_B (O (O_BCLRNE, SB), IMM3 | B30, "bclr/ne", 0x6, 0x2, 0x7, 0xD, 0x7, 0xF, 0x8, 0x6),
- EBITOP_B (O (O_BSETEQ, SB), IMM3 | B30, "bset/eq", 0x6, 0x0, 0x7, 0xD, 0x7, 0xF, 0x8, 0x7),
- EBITOP_B (O (O_BSETNE, SB), IMM3 | B30, "bset/ne", 0x6, 0x0, 0x7, 0xD, 0x7, 0xF, 0x8, 0x6),
- BITOP_B (O (O_BISTZ, SB), IMM3 | B31, "bistz", 0x6, 0x7, 0x7, 0xD, 0x7, 0xF, 0x8, 0x7),
- BITOP_B (O (O_BSTZ, SB), IMM3 | B30, "bstz", 0x6, 0x7, 0x7, 0xD, 0x7, 0xF, 0x8, 0x7),
-
- {O (O_BFLD, SB), AV_H8SX, 0, "bfld", {{IMM8, RDIND, R3_8}}, {{0x7, 0xC, B30 | RDIND, 0x0, 0xF, R3_8, IMM8LIST, E}}},
- {O (O_BFLD, SB), AV_H8SX, 0, "bfld", {{IMM8, ABS8DST, R3_8}}, {{0x7, 0xE, DSTABS8LIST, 0xF, R3_8, IMM8LIST, E}}},
- {O (O_BFLD, SB), AV_H8SX, 0, "bfld", {{IMM8, ABS16DST, R3_8}}, {{0x6, 0xA, 0x1, 0x0, DSTABS16LIST, 0xF, R3_8, IMM8LIST, E}}},
- {O (O_BFLD, SB), AV_H8SX, 0, "bfld", {{IMM8, ABS32DST, R3_8}}, {{0x6, 0xA, 0x3, 0x0, DSTABS32LIST, 0xF, R3_8, IMM8LIST, E}}},
-
- /* Because the assembler treats SRC, DST and OP3 as ordinals,
- I must designate the second argument, an immediate value, as DST.
- May God have mercy on my soul. */
- {O (O_BFST, SB), AV_H8SX, 0, "bfst", {{RS8, DST | IMM8, R3_IND}}, {{0x7, 0xD, B30 | R3_IND, 0x0, 0xF, RS8, DST | IMM8LIST, E}}},
- {O (O_BFST, SB), AV_H8SX, 0, "bfst", {{RS8, DST | IMM8, ABS8OP3}}, {{0x7, 0xF, OP3ABS8LIST, 0xF, RS8, DST | IMM8LIST, E}}},
- {O (O_BFST, SB), AV_H8SX, 0, "bfst", {{RS8, DST | IMM8, ABS16OP3}}, {{0x6, 0xA, 0x1, 0x8, OP3ABS16LIST, 0xF, RS8, DST | IMM8LIST, E}}},
- {O (O_BFST, SB), AV_H8SX, 0, "bfst", {{RS8, DST | IMM8, ABS32OP3}}, {{0x6, 0xA, 0x3, 0x8, OP3ABS32LIST, 0xF, RS8, DST | IMM8LIST, E}}},
-
- {O (O_BSR, SB), AV_H8, 6, "bsr", {{PCREL8, E}}, {{0x5, 0x5, PCREL8, DATA, E}}},
- {O (O_BSR, SB), AV_H8, 6, "bsr", {{PCREL16, E}}, {{0x5, 0xC, 0x0, 0x0, PCREL16, DATA3, E}}},
- {O (O_BSR, SB), AV_H8SX, 0, "bsr", {{LOWREG | L_8, E}}, {{0x5, 0xd, B30 | LOWREG | L_8, 0x5, E}}},
- {O (O_BSR, SW), AV_H8SX, 0, "bsr", {{LOWREG | L_16, E}}, {{0x5, 0xd, B30 | LOWREG | L_16, 0x6, E}}},
- {O (O_BSR, SL), AV_H8SX, 0, "bsr", {{OR32, E}}, {{0x5, 0xd, B30 | OR32, 0x7, E}}},
-
- {O (O_CMP, SB), AV_H8, 2, "cmp.b", {{IMM8, RD8, E}}, {{0xa, RD8, IMM8LIST, E}}},
- EXPAND_TWOOP_B (O (O_CMP, SB), "cmp.b", 0xa, 0x1, 0xc, 0x2, B00),
-
- {O (O_CMP, SW), AV_H8, 2, "cmp.w", {{RS16, RD16, E}}, {{0x1, 0xd, RS16, RD16, E}}},
- {O (O_CMP, SW), AV_H8SX, 0, "cmp.w", {{IMM3NZ_NS, RD16, E}}, {{0x1, 0xf, B30 | IMM3NZ, RD16, E}}},
- {O (O_CMP, SW), AV_H8SX, 0, "cmp.w", {{IMM3NZ_NS, RDIND, E}}, {{0x7, 0xd, B31 | RDIND, IGNORE, 0x1, 0xf, B30 | IMM3NZ, IGNORE, E}}},
- {O (O_CMP, SW), AV_H8SX, 0, "cmp.w", {{IMM3NZ_NS, ABS16DST, E}}, {{0x6, 0xb, 0x1, B31 | IGNORE, DSTABS16LIST, 0x1, 0xf, B30 | IMM3NZ, IGNORE, E}}},
- {O (O_CMP, SW), AV_H8SX, 0, "cmp.w", {{IMM3NZ_NS, ABS32DST, E}}, {{0x6, 0xb, 0x3, B31 | IGNORE, DSTABS32LIST, 0x1, 0xf, B30 | IMM3NZ, IGNORE, E}}},
- EXPAND_TWOOP_W (O (O_CMP, SW), "cmp.w", 0x1, 0xd, 0x2),
-
- {O (O_CMP, SL), AV_H8H, 6, "cmp.l", {{RS32, RD32, E}}, {{0x1, 0xf, B31 | RS32, B30 | RD32, E}}},
- {O (O_CMP, SL), AV_H8SX, 0, "cmp.l", {{IMM3NZ_NS, RD32, E}}, {{0x1, 0xf, B31 | IMM3NZ, B31 | RD32, E}}},
- EXPAND_TWOOP_L (O (O_CMP, SL), "cmp.l", 0x2),
-
- UNOP (O (O_DAA, SB), "daa", 0x0, 0xF),
- UNOP (O (O_DAS, SB), "das", 0x1, 0xF),
- UNOP (O (O_DEC, SB), "dec.b", 0x1, 0xA),
-
- {O (O_DEC, SW), AV_H8H, 2, "dec.w", {{DBIT, RD16, E}}, {{0x1, 0xB, 0x5 | DBIT, RD16, E}}},
- {O (O_DEC, SL), AV_H8H, 2, "dec.l", {{DBIT, RD32, E}}, {{0x1, 0xB, 0x7 | DBIT, RD32 | B30, E}}},
-
- {O (O_DIVS, SW), AV_H8SX, 0, "divs.w", {{IMM4, RD16, E}}, {{0x0, 0x1, 0xd, 0x6, 0x5, 0x1, IMM4, RD16, E}}},
- {O (O_DIVS, SW), AV_H8SX, 0, "divs.w", {{RS16, RD16, E}}, {{0x0, 0x1, 0xd, 0x2, 0x5, 0x1, RS16, RD16, E}}},
- {O (O_DIVS, SL), AV_H8SX, 0, "divs.l", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xd, 0x6, 0x5, 0x3, IMM4, B30 | RD32, E}}},
- {O (O_DIVS, SL), AV_H8SX, 0, "divs.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xd, 0x2, 0x5, 0x3, B30 | RS32, B30 | RD32, E}}},
-
- {O (O_DIVU, SW), AV_H8SX, 0, "divu.w", {{IMM4, RD16, E}}, {{0x0, 0x1, 0xd, 0xe, 0x5, 0x1, IMM4, RD16, E}}},
- {O (O_DIVU, SW), AV_H8SX, 0, "divu.w", {{RS16, RD16, E}}, {{0x0, 0x1, 0xd, 0xa, 0x5, 0x1, RS16, RD16, E}}},
- {O (O_DIVU, SL), AV_H8SX, 0, "divu.l", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xd, 0xe, 0x5, 0x3, IMM4, B30 | RD32, E}}},
- {O (O_DIVU, SL), AV_H8SX, 0, "divu.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xd, 0xa, 0x5, 0x3, B30 | RS32, B30 | RD32, E}}},
-
- {O (O_DIVXS, SB), AV_H8SX, 0, "divxs.b", {{IMM4, RD16, E}}, {{0x0, 0x1, 0xD, 0x4, 0x5, 0x1, IMM4, RD16, E}}},
- {O (O_DIVXS, SB), AV_H8H, 13, "divxs.b", {{RS8, RD16, E}}, {{0x0, 0x1, 0xD, 0x0, 0x5, 0x1, RS8, RD16, E}}},
- {O (O_DIVXS, SW), AV_H8SX, 0, "divxs.w", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xD, 0x4, 0x5, 0x3, IMM4, B30 | RD32, E}}},
- {O (O_DIVXS, SW), AV_H8H, 21, "divxs.w", {{RS16, RD32, E}}, {{0x0, 0x1, 0xD, 0x0, 0x5, 0x3, RS16, B30 | RD32, E}}},
-
- {O (O_DIVXU, SB), AV_H8SX, 0, "divxu.b", {{IMM4, RD16, E}}, {{0x0, 0x1, 0xD, 0xC, 0x5, 0x1, IMM4, RD16, E}}},
- {O (O_DIVXU, SB), AV_H8, 13, "divxu.b", {{RS8, RD16, E}}, {{0x5, 0x1, RS8, RD16, E}}},
- {O (O_DIVXU, SW), AV_H8SX, 0, "divxu.w", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xD, 0xC, 0x5, 0x3, IMM4, B30 | RD32, E}}},
- {O (O_DIVXU, SW), AV_H8H, 21, "divxu.w", {{RS16, RD32, E}}, {{0x5, 0x3, RS16, B30 | RD32, E}}},
-
- {O (O_EEPMOV, SB), AV_H8, 4, "eepmov.b", {{E}}, {{0x7, 0xB, 0x5, 0xC, 0x5, 0x9, 0x8, 0xF, E}}},
- {O (O_EEPMOV, SW), AV_H8H, 4, "eepmov.w", {{E}}, {{0x7, 0xB, 0xD, 0x4, 0x5, 0x9, 0x8, 0xF, E}}},
-
- EXPAND_UNOP_STD_W (O (O_EXTS, SW), "exts.w", PREFIX_015, 0x1, 0x7, 0xd),
- EXPAND_UNOP_STD_L (O (O_EXTS, SL), "exts.l", PREFIX_010, 0x1, 0x7, 0xf),
- EXPAND_UNOP_EXTENDED_L (O (O_EXTS, SL), "exts.l", CONST_2, PREFIX_010, 0x1, 0x7, 0xe, 0),
- EXPAND_UNOP_STD_W (O (O_EXTU, SW), "extu.w", PREFIX_015, 0x1, 0x7, 0x5),
- EXPAND_UNOP_STD_L (O (O_EXTU, SL), "extu.l", PREFIX_010, 0x1, 0x7, 0x7),
- EXPAND_UNOP_EXTENDED_L (O (O_EXTU, SL), "extu.l", CONST_2, PREFIX_010, 0x1, 0x7, 0x6, 0),
-
- UNOP (O (O_INC, SB), "inc", 0x0, 0xA),
-
- {O (O_INC, SW), AV_H8H, 2, "inc.w", {{DBIT, RD16, E}}, {{0x0, 0xB, 0x5 | DBIT, RD16, E}}},
- {O (O_INC, SL), AV_H8H, 2, "inc.l", {{DBIT, RD32, E}}, {{0x0, 0xB, 0x7 | DBIT, RD32 | B30, E}}},
-
- {O (O_JMP, SN), AV_H8, 4, "jmp", {{RSIND, E}}, {{0x5, 0x9, B30 | RSIND, 0x0, E}}},
- {O (O_JMP, SN), AV_H8, 6, "jmp", {{ABSJMP | L_24, E}}, {{0x5, 0xA, SRC | ABSJMP | L_24, DATA5, E}}},
-
- {O (O_JMP, SN), AV_H8SX, 0, "jmp", {{ABSJMP | L_32, E}}, {{0x5, 0x9, 0x0, 0x8, ABSJMP | L_32, DATA7, E}}},
-
- {O (O_JMP, SN), AV_H8, 8, "jmp", {{MEMIND, E}}, {{0x5, 0xB, SRC | MEMIND, DATA, E}}},
- {O (O_JMP, SN), AV_H8SX, 0, "jmp", {{VECIND, E}}, {{0x5, 0x9, B31 | SRC | VECIND, DATA, E}}},
-
- {O (O_JSR, SN), AV_H8, 6, "jsr", {{RSIND, E}}, {{0x5, 0xD, B30 | RSIND, 0x0, E}}},
- {O (O_JSR, SN), AV_H8, 8, "jsr", {{ABSJMP | L_24, E}}, {{0x5, 0xE, SRC | ABSJMP | L_24, DATA5, E}}},
-
- {O (O_JSR, SN), AV_H8SX, 0, "jsr", {{ABSJMP | L_32, E}}, {{0x5, 0xD, 0x0, 0x8, ABSJMP | L_32, DATA7, E}}},
-
- {O (O_JSR, SN), AV_H8, 8, "jsr", {{MEMIND, E}}, {{0x5, 0xF, SRC | MEMIND, DATA, E}}},
- {O (O_JSR, SN), AV_H8SX, 8, "jsr", {{VECIND, E}}, {{0x5, 0xD, SRC | VECIND, DATA, E}}},
-
- {O (O_LDC, SB), AV_H8, 2, "ldc", {{IMM8, CCR | DST, E}}, {{ 0x0, 0x7, IMM8LIST, E}}},
- {O (O_LDC, SB), AV_H8S, 2, "ldc", {{IMM8, EXR | DST, E}}, {{0x0, 0x1, 0x4, EXR | DST, 0x0, 0x7, IMM8LIST, E}}},
- {O (O_LDC, SB), AV_H8, 2, "ldc", {{RS8, CCR | DST, E}}, {{0x0, 0x3, B30 | CCR | DST, RS8, E}}},
- {O (O_LDC, SB), AV_H8S, 2, "ldc", {{RS8, EXR | DST, E}}, {{0x0, 0x3, B30 | EXR | DST, RS8, E}}},
- {O (O_LDC, SW), AV_H8H, 2, "ldc", {{RSIND, CCR | DST, E}}, {{PREFIXLDC, 0x6, 0x9, B30 | RSIND, IGNORE, E}}},
- {O (O_LDC, SW), AV_H8S, 2, "ldc", {{RSIND, EXR | DST, E}}, {{PREFIXLDC, 0x6, 0x9, B30 | RSIND, IGNORE, E}}},
- {O (O_LDC, SW), AV_H8H, 2, "ldc", {{RSPOSTINC, CCR | DST, E}}, {{PREFIXLDC, 0x6, 0xD, B30 | RSPOSTINC, IGNORE, E}}},
- {O (O_LDC, SW), AV_H8S, 2, "ldc", {{RSPOSTINC, EXR | DST, E}}, {{PREFIXLDC, 0x6, 0xD, B30 | RSPOSTINC, IGNORE, E}}},
- {O (O_LDC, SW), AV_H8H, 2, "ldc", {{DISP16SRC, CCR | DST, E}}, {{PREFIXLDC, 0x6, 0xF, B30 | DISPREG, IGNORE, SRC | DISP16LIST, E}}},
- {O (O_LDC, SW), AV_H8S, 2, "ldc", {{DISP16SRC, EXR | DST, E}}, {{PREFIXLDC, 0x6, 0xF, B30 | DISPREG, IGNORE, SRC | DISP16LIST, E}}},
- {O (O_LDC, SW), AV_H8H, 2, "ldc", {{DISP32SRC, CCR | DST, E}}, {{PREFIXLDC, 0x7, 0x8, B30 | DISPREG, 0x0, 0x6, 0xB, 0x2, IGNORE, SRC | DISP32LIST, E}}},
- {O (O_LDC, SW), AV_H8S, 2, "ldc", {{DISP32SRC, EXR | DST, E}}, {{PREFIXLDC, 0x7, 0x8, B30 | DISPREG, 0x0, 0x6, 0xB, 0x2, IGNORE, SRC | DISP32LIST, E}}},
- {O (O_LDC, SW), AV_H8H, 2, "ldc", {{ABS16SRC, CCR | DST, E}}, {{PREFIXLDC, 0x6, 0xB, 0x0, IGNORE, SRC | ABS16LIST, E}}},
- {O (O_LDC, SW), AV_H8S, 2, "ldc", {{ABS16SRC, EXR | DST, E}}, {{PREFIXLDC, 0x6, 0xB, 0x0, IGNORE, SRC | ABS16LIST, E}}},
- {O (O_LDC, SW), AV_H8H, 2, "ldc", {{ABS32SRC, CCR | DST, E}}, {{PREFIXLDC, 0x6, 0xB, 0x2, IGNORE, SRC | MEMRELAX | ABS32LIST, E}}},
- {O (O_LDC, SW), AV_H8S, 2, "ldc", {{ABS32SRC, EXR | DST, E}}, {{PREFIXLDC, 0x6, 0xB, 0x2, IGNORE, SRC | MEMRELAX | ABS32LIST, E}}},
-
- {O (O_LDC, SL), AV_H8SX, 0, "ldc", {{RS32, B30 | VBR_SBR | DST, E}}, {{0x0, 0x3, B30 | VBR_SBR | DST, RS32, E}}},
-
-
- {O (O_MOV, SB), AV_H8, 2, "mov.b", {{IMM8, RD8, E}}, {{0xF, RD8, IMM8LIST, E}}},
- {O (O_MOV, SB), AV_H8SX, 0, "mov.b", {{IMM4_NS, ABS16DST, E}}, {{0x6, 0xa, 0xd, IMM4, DSTABS16LIST, E}}},
- {O (O_MOV, SB), AV_H8SX, 0, "mov.b", {{IMM4_NS, ABS32DST, E}}, {{0x6, 0xa, 0xf, IMM4, DSTABS32LIST, E}}},
- MOVFROM_IMM8 (O (O_MOV, SB), PREFIX_017D, "mov.b", IMM8),
-
- {O (O_MOV, SB), AV_H8, 2, "mov.b", {{RS8, RD8, E}}, {{0x0, 0xC, RS8, RD8, E}}},
- MOVFROM_REG_BW (O (O_MOV, SB), "mov.b", RS8, PREFIX_017, 8, 10, 12, 14, MEMRELAX),
- {O (O_MOV, SB), AV_H8, 4, "mov.b", {{RS8, ABS8DST, E}}, {{0x3, RS8, DSTABS8LIST, E}}},
- MOVTO_REG_BW (O (O_MOV, SB), "mov.b", RD8, PREFIX_017, 8, 10, 12, 14, MEMRELAX),
- {O (O_MOV, SB), AV_H8, 4, "mov.b", {{ABS8SRC, RD8, E}}, {{0x2, RD8, ABS8LIST, E}}},
-
- MOVFROM_STD (O (O_MOV, SB), PREFIX_0178, "mov.b", RSIND, FROM_IND),
- MOVFROM_STD (O (O_MOV, SB), PREFIX_0178, "mov.b", RSPOSTINC, FROM_POSTINC),
- MOVFROM_STD (O (O_MOV, SB), PREFIX_0178, "mov.b", RSPOSTDEC, FROM_POSTDEC),
- MOVFROM_STD (O (O_MOV, SB), PREFIX_0178, "mov.b", RSPREINC, FROM_PREINC),
- MOVFROM_STD (O (O_MOV, SB), PREFIX_0178, "mov.b", RSPREDEC, FROM_PREDEC),
- MOVFROM_STD (O (O_MOV, SB), PREFIX_0178, "mov.b", DISP2SRC, FROM_DISP2),
- MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", DISP16SRC, FROM_DISP16, DISP16LIST),
- MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", DISP32SRC, FROM_DISP32, DISP32LIST),
- MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", INDEXB16, FROM_DISP16B, DISP16LIST),
- MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", INDEXW16, FROM_DISP16W, DISP16LIST),
- MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", INDEXL16, FROM_DISP16L, DISP16LIST),
- MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", INDEXB32, FROM_DISP32B, DISP32LIST),
- MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", INDEXW32, FROM_DISP32W, DISP32LIST),
- MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", INDEXL32, FROM_DISP32L, DISP32LIST),
- MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", ABS16SRC, FROM_ABS16, ABS16LIST),
- MOVFROM_AD (O (O_MOV, SB), PREFIX_0178, "mov.b", ABS32SRC, FROM_ABS32, ABS32LIST),
-
- {O (O_MOV, SW), AV_H8SX, 0, "mov.w", {{IMM3NZ_NS, RD16, E}}, {{0x0, 0xf, B30 | IMM3NZ, RD16, E}}},
- {O (O_MOV, SW), AV_H8, 4, "mov.w", {{IMM16, RD16, E}}, {{0x7, 0x9, 0x0, RD16, IMM16LIST, E}}},
- {O (O_MOV, SW), AV_H8SX, 0, "mov.w", {{IMM4_NS, ABS16DST, E}}, {{0x6, 0xb, 0xd, IMM4, DSTABS16LIST, E}}},
- {O (O_MOV, SW), AV_H8SX, 0, "mov.w", {{IMM4_NS, ABS32DST, E}}, {{0x6, 0xb, 0xf, IMM4, DSTABS32LIST, E}}},
-
- MOVFROM_IMM8 (O (O_MOV, SW), PREFIX_015D, "mov.w", IMM8U_NS),
- MOVFROM_IMM (O (O_MOV, SW), PREFIX_7974, "mov.w", IMM16, IMM16LIST),
-
- {O (O_MOV, SW), AV_H8, 2, "mov.w", {{RS16, RD16, E}}, {{0x0, 0xD, RS16, RD16, E}}},
- MOVFROM_REG_BW (O (O_MOV, SW), "mov.w", RS16, PREFIX_015, 9, 11, 13, 15, 0),
- MOVTO_REG_BW (O (O_MOV, SW), "mov.w", RD16, PREFIX_015, 9, 11, 13, 15, 0),
-
- MOVFROM_STD (O (O_MOV, SW), PREFIX_0158, "mov.w", RSIND, FROM_IND),
- MOVFROM_STD (O (O_MOV, SW), PREFIX_0158, "mov.w", RSPOSTINC, FROM_POSTINC),
- MOVFROM_STD (O (O_MOV, SW), PREFIX_0158, "mov.w", RSPOSTDEC, FROM_POSTDEC),
- MOVFROM_STD (O (O_MOV, SW), PREFIX_0158, "mov.w", RSPREINC, FROM_PREINC),
- MOVFROM_STD (O (O_MOV, SW), PREFIX_0158, "mov.w", RSPREDEC, FROM_PREDEC),
- MOVFROM_STD (O (O_MOV, SW), PREFIX_0158, "mov.w", DISP2SRC, FROM_DISP2),
- MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", DISP16SRC, FROM_DISP16, DISP16LIST),
- MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", DISP32SRC, FROM_DISP32, DISP32LIST),
- MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", INDEXB16, FROM_DISP16B, DISP16LIST),
- MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", INDEXW16, FROM_DISP16W, DISP16LIST),
- MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", INDEXL16, FROM_DISP16L, DISP16LIST),
- MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", INDEXB32, FROM_DISP32B, DISP32LIST),
- MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", INDEXW32, FROM_DISP32W, DISP32LIST),
- MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", INDEXL32, FROM_DISP32L, DISP32LIST),
- MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", ABS16SRC, FROM_ABS16, ABS16LIST),
- MOVFROM_AD (O (O_MOV, SW), PREFIX_0158, "mov.w", ABS32SRC, FROM_ABS32, ABS32LIST),
-
- {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{IMM3NZ_NS, RD32, E}}, {{0x0, 0xf, B31 | IMM3NZ, B31 | RD32, E}}},
-
- MOVFROM_IMM8 (O (O_MOV, SL), PREFIX_010D, "mov.l", IMM8U_NS),
- MOVFROM_IMM (O (O_MOV, SL), PREFIX_7A7C, "mov.l", IMM16U_NS, IMM16ULIST),
-
- {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{IMM16U_NS, RD32, E}}, {{0x7, 0xa, 0x0, B31 | RD32, IMM16ULIST, E}}},
- {O (O_MOV, SL), AV_H8H, 4, "mov.l", {{IMM32, RD32, E}}, {{0x7, 0xa, 0x0, B30 | RD32, IMM32LIST, E}}},
-
- MOVFROM_IMM (O (O_MOV, SL), PREFIX_7A74, "mov.l", IMM32, IMM32LIST),
-
- {O (O_MOV, SL), AV_H8H, 2, "mov.l", {{RS32, RD32, E}}, {{0x0, 0xf, B31 | RS32, B30 | RD32, E}}},
-
- {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{RS32, RDIND, E}}, {{PREFIX_0100, 0x6, 0x9, B31 | RDIND, B30 | RS32, E}}},
- {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, RDPOSTINC, E}}, {{PREFIX_0103, 0x6, 0xd, B31 | RDPOSTINC, RS32, E}}},
- {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, RDPOSTDEC, E}}, {{PREFIX_0101, 0x6, 0xd, B31 | RDPOSTDEC, RS32, E}}},
- {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, RDPREINC, E}}, {{PREFIX_0102, 0x6, 0xd, B31 | RDPREINC, RS32, E}}},
- {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{RS32, RDPREDEC, E}}, {{PREFIX_0100, 0x6, 0xd, B31 | RDPREDEC, RS32, E}}},
- {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, DISP2DST, E}}, {{PREFIX_010, B30 | B20 | DISP2DST, 0x6, 0x9, B31 | DSTDISPREG, RS32, E}}},
- {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{RS32, DISP16DST, E}}, {{PREFIX_0100, 0x6, 0xf, B31 | DSTDISPREG, RS32, DSTDISP16LIST, E}}},
- {O (O_MOV, SL), AV_H8SX, 6, "mov.l", {{RS32, DISP32DST, E}}, {{0x7, 0x8, B31 | DSTDISPREG, 0x0, 0x6, 0xb, 0xa, RS32, DSTDISP32LIST, E}}},
- {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{RS32, DISP32DST, E}}, {{PREFIX_0100, 0x7, 0x8, B31 | DSTDISPREG, 0x0, 0x6, 0xb, 0xa, RS32, DSTDISP32LIST, E}}},
- {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{RS32, DISP32DST, E}}, {{PREFIX_0100, 0x7, 0x8, DSTDISPREG, 0x0, 0x6, 0xb, 0xa, RS32, DSTDISP32LIST, E}}},
- {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, INDEXB16D, E}}, {{PREFIX_0101, 0x6, 0xf, B31 | DSTDISPREG, RS32, DSTDISP16LIST, E}}},
- {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, INDEXW16D, E}}, {{PREFIX_0102, 0x6, 0xf, B31 | DSTDISPREG, RS32, DSTDISP16LIST, E}}},
- {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, INDEXL16D, E}}, {{PREFIX_0103, 0x6, 0xf, B31 | DSTDISPREG, RS32, DSTDISP16LIST, E}}},
- {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, INDEXB32D, E}}, {{0x7, 0x8, B31 | DSTDISPREG, 0x1, 0x6, 0xb, 0xa, RS32, DSTDISP32LIST, E}}},
- {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, INDEXW32D, E}}, {{0x7, 0x8, B31 | DSTDISPREG, 0x2, 0x6, 0xb, 0xa, RS32, DSTDISP32LIST, E}}},
- {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RS32, INDEXL32D, E}}, {{0x7, 0x8, B31 | DSTDISPREG, 0x3, 0x6, 0xb, 0xa, RS32, DSTDISP32LIST, E}}},
- {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{RS32, ABS16DST, E}}, {{PREFIX_0100, 0x6, 0xb, 0x8, RS32, DSTABS16LIST, E}}},
- {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{RS32, ABS32DST, E}}, {{PREFIX_0100, 0x6, 0xb, 0xa, RS32, MEMRELAX | DSTABS32LIST, E}}},
-
- {O (O_MOV, SL), AV_H8H, 4, "mov.l", {{RSIND, RD32, E}}, {{PREFIX_0100, 0x6, 0x9, B30 | RSIND, RD32, E}}},
- {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{RSPOSTINC, RD32, E}}, {{PREFIX_0100, 0x6, 0xd, B30 | RSPOSTINC, RD32, E}}},
- {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RSPOSTDEC, RD32, E}}, {{PREFIX_0102, 0x6, 0xd, B30 | RSPOSTDEC, RD32, E}}},
- {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RSPREINC, RD32, E}}, {{PREFIX_0101, 0x6, 0xd, B30 | RSPREINC, RD32, E}}},
- {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{RSPREDEC, RD32, E}}, {{PREFIX_0103, 0x6, 0xd, B30 | RSPREDEC, RD32, E}}},
- {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{DISP2SRC, RD32, E}}, {{PREFIX_010, B30 | B20 | DISP2SRC, 0x6, 0x9, B30 | DISPREG, RD32, E}}},
- {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{DISP16SRC, RD32, E}}, {{PREFIX_0100, 0x6, 0xf, B30 | DISPREG, RD32, SRC | DISP16LIST, E}}},
- {O (O_MOV, SL), AV_H8SX, 6, "mov.l", {{DISP32SRC, RD32, E}}, {{0x7, 0x8, B31 | DISPREG, 0x0, 0x6, 0xb, 0x2, RD32, SRC | DISP32LIST, E}}},
- {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{DISP32SRC, RD32, E}}, {{PREFIX_0100, 0x7, 0x8, B30 | DISPREG, 0x0, 0x6, 0xb, 0x2, RD32, SRC | DISP32LIST, E}}},
- {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{INDEXB16, RD32, E}}, {{PREFIX_0101, 0x6, 0xf, B30 | DISPREG, RD32, SRC | DISP16LIST, E}}},
- {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{INDEXW16, RD32, E}}, {{PREFIX_0102, 0x6, 0xf, B30 | DISPREG, RD32, SRC | DISP16LIST, E}}},
- {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{INDEXL16, RD32, E}}, {{PREFIX_0103, 0x6, 0xf, B30 | DISPREG, RD32, SRC | DISP16LIST, E}}},
- {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{INDEXB32, RD32, E}}, {{0x7, 0x8, B31 | DISPREG, 0x1, 0x6, 0xb, 0x2, RD32, SRC | DISP32LIST, E}}},
- {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{INDEXW32, RD32, E}}, {{0x7, 0x8, B31 | DISPREG, 0x2, 0x6, 0xb, 0x2, RD32, SRC | DISP32LIST, E}}},
- {O (O_MOV, SL), AV_H8SX, 0, "mov.l", {{INDEXL32, RD32, E}}, {{0x7, 0x8, B31 | DISPREG, 0x3, 0x6, 0xb, 0x2, RD32, SRC | DISP32LIST, E}}},
- {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{ABS16SRC, RD32, E}}, {{PREFIX_0100, 0x6, 0xb, 0x0, RD32, SRC | ABS16LIST, E}}},
- {O (O_MOV, SL), AV_H8H, 6, "mov.l", {{ABS32SRC, RD32, E}}, {{PREFIX_0100, 0x6, 0xb, 0x2, RD32, SRC | MEMRELAX | ABS32LIST, E}}},
-
- MOVFROM_STD (O (O_MOV, SL), PREFIX_0108, "mov.l", RSIND, FROM_IND),
- MOVFROM_STD (O (O_MOV, SL), PREFIX_0108, "mov.l", RSPOSTINC, FROM_POSTINC),
- MOVFROM_STD (O (O_MOV, SL), PREFIX_0108, "mov.l", RSPOSTDEC, FROM_POSTDEC),
- MOVFROM_STD (O (O_MOV, SL), PREFIX_0108, "mov.l", RSPREINC, FROM_PREINC),
- MOVFROM_STD (O (O_MOV, SL), PREFIX_0108, "mov.l", RSPREDEC, FROM_PREDEC),
- MOVFROM_STD (O (O_MOV, SL), PREFIX_0108, "mov.l", DISP2SRC, FROM_DISP2),
- MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", DISP16SRC, FROM_DISP16, DISP16LIST),
- MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", DISP32SRC, FROM_DISP32, DISP32LIST),
- MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", INDEXB16, FROM_DISP16B, DISP16LIST),
- MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", INDEXW16, FROM_DISP16W, DISP16LIST),
- MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", INDEXL16, FROM_DISP16L, DISP16LIST),
- MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", INDEXB32, FROM_DISP32B, DISP32LIST),
- MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", INDEXW32, FROM_DISP32W, DISP32LIST),
- MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", INDEXL32, FROM_DISP32L, DISP32LIST),
- MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", ABS16SRC, FROM_ABS16, ABS16LIST),
- MOVFROM_AD (O (O_MOV, SL), PREFIX_0108, "mov.l", ABS32SRC, FROM_ABS32, ABS32LIST),
-
-#define DO_MOVA1(TYPE, OP0, OP1) \
- {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXB16, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0x8, B30 | R3_32, DISP16LIST, E}}}, \
- {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXW16, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0x9, B30 | R3_32, DISP16LIST, E}}}, \
- {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXB16, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0xA, B30 | R3_32, DISP16LIST, E}}}, \
- {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXW16, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0xB, B30 | R3_32, DISP16LIST, E}}}, \
- {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXB16, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0xC, B30 | R3_32, DISP16LIST, E}}}, \
- {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXW16, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0xD, B30 | R3_32, DISP16LIST, E}}}, \
-\
- {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXB32, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0x8, B31 | R3_32, DISP32LIST, E}}}, \
- {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXW32, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0x9, B31 | R3_32, DISP32LIST, E}}}, \
- {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXB32, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0xA, B31 | R3_32, DISP32LIST, E}}}, \
- {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXW32, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0xB, B31 | R3_32, DISP32LIST, E}}}, \
- {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXB32, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0xC, B31 | R3_32, DISP32LIST, E}}}, \
- {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXW32, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0xD, B31 | R3_32, DISP32LIST, E}}}
-
-#define DO_MOVA2(TYPE, OP0, OP1, OP2) \
- {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXB16, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0x8, B30 | R3_32, OP2, DISP16LIST, E}}}, \
- {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXW16, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0x9, B30 | R3_32, OP2, DISP16LIST, E}}}, \
- {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXB16, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0xA, B30 | R3_32, OP2, DISP16LIST, E}}}, \
- {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXW16, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0xB, B30 | R3_32, OP2, DISP16LIST, E}}}, \
- {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXB16, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0xC, B30 | R3_32, OP2, DISP16LIST, E}}}, \
- {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXW16, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0xD, B30 | R3_32, OP2, DISP16LIST, E}}}, \
-\
- {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXB32, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0x8, B31 | R3_32, OP2, DISP32LIST, E}}}, \
- {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXW32, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0x9, B31 | R3_32, OP2, DISP32LIST, E}}}, \
- {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXB32, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0xA, B31 | R3_32, OP2, DISP32LIST, E}}}, \
- {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXW32, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0xB, B31 | R3_32, OP2, DISP32LIST, E}}}, \
- {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXB32, TYPE, R3_32}}, {{PREFIX_017F, OP0, OP1, 0xC, B31 | R3_32, OP2, DISP32LIST, E}}}, \
- {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXW32, TYPE, R3_32}}, {{PREFIX_015F, OP0, OP1, 0xD, B31 | R3_32, OP2, DISP32LIST, E}}}
-
- {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXB16, E}}, {{0x7, 0xA, 0x8, B31 | DISPREG, DISP16LIST, E}}},
- {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXW16, E}}, {{0x7, 0xA, 0x9, B31 | DISPREG, DISP16LIST, E}}},
- {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXB16, E}}, {{0x7, 0xA, 0xA, B31 | DISPREG, DISP16LIST, E}}},
- {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXW16, E}}, {{0x7, 0xA, 0xB, B31 | DISPREG, DISP16LIST, E}}},
- {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXB16, E}}, {{0x7, 0xA, 0xC, B31 | DISPREG, DISP16LIST, E}}},
- {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXW16, E}}, {{0x7, 0xA, 0xD, B31 | DISPREG, DISP16LIST, E}}},
-
- {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXB32, E}}, {{0x7, 0xA, 0x8, B30 | DISPREG, DISP32LIST, E}}},
- {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXW32, E}}, {{0x7, 0xA, 0x9, B30 | DISPREG, DISP32LIST, E}}},
- {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXB32, E}}, {{0x7, 0xA, 0xA, B30 | DISPREG, DISP32LIST, E}}},
- {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXW32, E}}, {{0x7, 0xA, 0xB, B30 | DISPREG, DISP32LIST, E}}},
- {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXB32, E}}, {{0x7, 0xA, 0xC, B30 | DISPREG, DISP32LIST, E}}},
- {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXW32, E}}, {{0x7, 0xA, 0xD, B30 | DISPREG, DISP32LIST, E}}},
-
- {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXB16, RD8, R3_32}}, {{0x7, 0x8, RD8, 0x8, 0x7, 0xA, 0x8, B31 | R3_32, DISP16LIST, E}}},
- {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXW16, RD16, R3_32}}, {{0x7, 0x8, RD16, 0x9, 0x7, 0xA, 0x9, B31 | R3_32, DISP16LIST, E}}},
- {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXB16, RD8, R3_32}}, {{0x7, 0x8, RD8, 0x8, 0x7, 0xA, 0xA, B31 | R3_32, DISP16LIST, E}}},
- {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXW16, RD16, R3_32}}, {{0x7, 0x8, RD16, 0x9, 0x7, 0xA, 0xB, B31 | R3_32, DISP16LIST, E}}},
- {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXB16, RD8, R3_32}}, {{0x7, 0x8, RD8, 0x8, 0x7, 0xA, 0xC, B31 | R3_32, DISP16LIST, E}}},
- {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXW16, RD16, R3_32}}, {{0x7, 0x8, RD16, 0x9, 0x7, 0xA, 0xD, B31 | R3_32, DISP16LIST, E}}},
-
- {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXB32, RD8, R3_32}}, {{0x7, 0x8, RD8, 0x8, 0x7, 0xA, 0x8, B30 | R3_32, DISP32LIST, E}}},
- {O (O_MOVAB, SL), AV_H8SX, 0, "mova/b.l", {{INDEXW32, RD16, R3_32}}, {{0x7, 0x8, RD16, 0x9, 0x7, 0xA, 0x9, B30 | R3_32, DISP32LIST, E}}},
- {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXB32, RD8, R3_32}}, {{0x7, 0x8, RD8, 0x8, 0x7, 0xA, 0xA, B30 | R3_32, DISP32LIST, E}}},
- {O (O_MOVAW, SL), AV_H8SX, 0, "mova/w.l", {{INDEXW32, RD16, R3_32}}, {{0x7, 0x8, RD16, 0x9, 0x7, 0xA, 0xB, B30 | R3_32, DISP32LIST, E}}},
- {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXB32, RD8, R3_32}}, {{0x7, 0x8, RD8, 0x8, 0x7, 0xA, 0xC, B30 | R3_32, DISP32LIST, E}}},
- {O (O_MOVAL, SL), AV_H8SX, 0, "mova/l.l", {{INDEXW32, RD16, R3_32}}, {{0x7, 0x8, RD16, 0x9, 0x7, 0xA, 0xD, B30 | R3_32, DISP32LIST, E}}},
-
- DO_MOVA1 (RDIND, 0x0, B30 | RDIND),
- DO_MOVA1 (RDPOSTINC, 0x8, B30 | RDPOSTINC),
- DO_MOVA1 (RDPOSTDEC, 0xA, B30 | RDPOSTDEC),
- DO_MOVA1 (RDPREINC, 0x9, B30 | RDPREINC),
- DO_MOVA1 (RDPREDEC, 0xB, B30 | RDPREDEC),
- DO_MOVA1 (DISP2DST, B30 | B20 | DISP2DST, B30 | DSTDISPREG),
- DO_MOVA2 (DISP16DST, 0xC, B30 | DSTDISPREG, DSTDISP16LIST),
- DO_MOVA2 (DISP32DST, 0xC, B31 | DSTDISPREG, DSTDISP32LIST),
- DO_MOVA2 (INDEXB16D, 0xD, B30 | DSTDISPREG, DSTDISP16LIST),
- DO_MOVA2 (INDEXW16D, 0xE, B30 | DSTDISPREG, DSTDISP16LIST),
- DO_MOVA2 (INDEXL16D, 0xF, B30 | DSTDISPREG, DSTDISP16LIST),
- DO_MOVA2 (INDEXB32D, 0xD, B31 | DSTDISPREG, DSTDISP32LIST),
- DO_MOVA2 (INDEXW32D, 0xE, B31 | DSTDISPREG, DSTDISP32LIST),
- DO_MOVA2 (INDEXL32D, 0xF, B31 | DSTDISPREG, DSTDISP32LIST),
- DO_MOVA2 (ABS16DST, 0x4, 0x0, DSTABS16LIST),
- DO_MOVA2 (ABS32DST, 0x4, 0x8, DSTABS32LIST),
-
- {O (O_MOV, SB), AV_H8, 10, "movfpe", {{ABS16SRC, RD8, E}}, {{0x6, 0xA, 0x4, RD8, ABS16SRC, DATA3, E}}},
- {O (O_MOV, SB), AV_H8, 10, "movtpe", {{RS8, ABS16DST, E}}, {{0x6, 0xA, 0xC, RS8, ABS16DST, DATA3, E}}},
-
- {O (O_MOVMD, SB), AV_H8SX, 0, "movmd.b", {{E}}, {{0x7, 0xb, 0x9, 0x4, E}}},
- {O (O_MOVMD, SW), AV_H8SX, 0, "movmd.w", {{E}}, {{0x7, 0xb, 0xa, 0x4, E}}},
- {O (O_MOVMD, SL), AV_H8SX, 0, "movmd.l", {{E}}, {{0x7, 0xb, 0xb, 0x4, E}}},
- {O (O_MOVSD, SB), AV_H8SX, 0, "movsd.b", {{PCREL16, E}}, {{0x7, 0xb, 0x8, 0x4, PCREL16, DATA3, E}}},
-
- {O (O_MULS, SW), AV_H8SX, 0, "muls.w", {{IMM4, RD16, E}}, {{0x0, 0x1, 0xc, 0x6, 0x5, 0x0, IMM4, RD16, E}}},
- {O (O_MULS, SW), AV_H8SX, 0, "muls.w", {{RS16, RD16, E}}, {{0x0, 0x1, 0xc, 0x2, 0x5, 0x0, RS16, RD16, E}}},
- {O (O_MULS, SL), AV_H8SX, 0, "muls.l", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xc, 0x6, 0x5, 0x2, IMM4, B30 | RD32, E}}},
- {O (O_MULS, SL), AV_H8SX, 0, "muls.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xc, 0x2, 0x5, 0x2, B30 | RS32, B30 | RD32, E}}},
-
- {O (O_MULU, SW), AV_H8SX, 0, "mulu.w", {{IMM4, RD16, E}}, {{0x0, 0x1, 0xc, 0xe, 0x5, 0x0, IMM4, RD16, E}}},
- {O (O_MULU, SW), AV_H8SX, 0, "mulu.w", {{RS16, RD16, E}}, {{0x0, 0x1, 0xc, 0xa, 0x5, 0x0, RS16, RD16, E}}},
- {O (O_MULU, SL), AV_H8SX, 0, "mulu.l", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xc, 0xe, 0x5, 0x2, IMM4, B30 | RD32, E}}},
- {O (O_MULU, SL), AV_H8SX, 0, "mulu.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xc, 0xa, 0x5, 0x2, B30 | RS32, B30 | RD32, E}}},
-
- {O (O_MULSU, SL), AV_H8SX, 0, "muls/u.l", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xc, 0x7, 0x5, 0x2, IMM4, B30 | RD32, E}}},
- {O (O_MULSU, SL), AV_H8SX, 0, "muls/u.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xc, 0x3, 0x5, 0x2, B30 | RS32, B30 | RD32, E}}},
- {O (O_MULUU, SL), AV_H8SX, 0, "mulu/u.l", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xc, 0xf, 0x5, 0x2, IMM4, B30 | RD32, E}}},
- {O (O_MULUU, SL), AV_H8SX, 0, "mulu/u.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xc, 0xb, 0x5, 0x2, B30 | RS32, B30 | RD32, E}}},
-
- {O (O_MULXS, SB), AV_H8SX, 0, "mulxs.b", {{IMM4, RD16, E}}, {{0x0, 0x1, 0xc, 0x4, 0x5, 0x0, IMM4, RD16, E}}},
- {O (O_MULXS, SB), AV_H8H, 20, "mulxs.b", {{RS8, RD16, E}}, {{0x0, 0x1, 0xc, 0x0, 0x5, 0x0, RS8, RD16, E}}},
- {O (O_MULXS, SW), AV_H8SX, 0, "mulxs.w", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xc, 0x4, 0x5, 0x2, IMM4, B30 | RD32, E}}},
- {O (O_MULXS, SW), AV_H8H, 20, "mulxs.w", {{RS16, RD32, E}}, {{0x0, 0x1, 0xc, 0x0, 0x5, 0x2, RS16, B30 | RD32, E}}},
-
- {O (O_MULXU, SB), AV_H8SX, 0, "mulxu.b", {{IMM4, RD16, E}}, {{0x0, 0x1, 0xc, 0xc, 0x5, 0x0, IMM4, RD16, E}}},
- {O (O_MULXU, SB), AV_H8, 14, "mulxu.b", {{RS8, RD16, E}}, {{0x5, 0x0, RS8, RD16, E}}},
- {O (O_MULXU, SW), AV_H8SX, 0, "mulxu.w", {{IMM4, RD32, E}}, {{0x0, 0x1, 0xc, 0xc, 0x5, 0x2, IMM4, B30 | RD32, E}}},
- {O (O_MULXU, SW), AV_H8H, 14, "mulxu.w", {{RS16, RD32, E}}, {{0x5, 0x2, RS16, B30 | RD32, E}}},
-
- EXPAND_UNOP_STD_B (O (O_NEG, SB), "neg.b", PREFIX_017, 0x1, 0x7, 0x8),
- EXPAND_UNOP_STD_W (O (O_NEG, SW), "neg.w", PREFIX_015, 0x1, 0x7, 0x9),
- EXPAND_UNOP_STD_L (O (O_NEG, SL), "neg.l", PREFIX_010, 0x1, 0x7, 0xb),
-
- {O (O_NOP, SN), AV_H8, 2, "nop", {{E}}, {{0x0, 0x0, 0x0, 0x0, E}}},
-
- EXPAND_UNOP_STD_B (O (O_NOT, SB), "not.b", PREFIX_017, 0x1, 0x7, 0x0),
- EXPAND_UNOP_STD_W (O (O_NOT, SW), "not.w", PREFIX_015, 0x1, 0x7, 0x1),
- EXPAND_UNOP_STD_L (O (O_NOT, SL), "not.l", PREFIX_010, 0x1, 0x7, 0x3),
-
- {O (O_OR, SB), AV_H8, 2, "or.b", {{IMM8, RD8, E}}, {{0xc, RD8, IMM8LIST, E}}},
- EXPAND_TWOOP_B (O (O_OR, SB), "or.b", 0xc, 0x1, 0x4, 0x4, 0),
-
- {O (O_OR, SW), AV_H8, 2, "or.w", {{RS16, RD16, E}}, {{0x6, 0x4, RS16, RD16, E}}},
- EXPAND_TWOOP_W (O (O_OR, SW), "or.w", 0x6, 0x4, 0x4),
-
- {O (O_OR, SL), AV_H8H, 2, "or.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xF, 0x0, 0x6, 0x4, B30 | RS32, B30 | RD32, E}}},
- EXPAND_TWOOP_L (O (O_OR, SL), "or.l", 0x4),
-
- {O (O_ORC, SB), AV_H8, 2, "orc", {{IMM8, CCR | DST, E}}, {{0x0, 0x4, IMM8LIST, E}}},
- {O (O_ORC, SB), AV_H8S, 2, "orc", {{IMM8, EXR | DST, E}}, {{0x0, 0x1, 0x4, EXR | DST, 0x0, 0x4, IMM8LIST, E}}},
-
- {O (O_MOV, SW), AV_H8, 6, "pop.w", {{OR16, E}}, {{0x6, 0xD, 0x7, OR16, E}}},
- {O (O_MOV, SL), AV_H8H, 6, "pop.l", {{OR32, E}}, {{PREFIX_0100, 0x6, 0xD, 0x7, OR32 | B30, E}}},
- {O (O_MOV, SW), AV_H8, 6, "push.w", {{OR16, E}}, {{0x6, 0xD, 0xF, OR16, E}}},
- {O (O_MOV, SL), AV_H8H, 6, "push.l", {{OR32, E}}, {{PREFIX_0100, 0x6, 0xD, 0xF, OR32 | B30, E}}},
-
- EXPAND_UNOP_STD_B (O (O_ROTL, SB), "rotl.b", PREFIX_017, 0x1, 0x2, 0x8),
- EXPAND_UNOP_EXTENDED_B (O (O_ROTL, SB), "rotl.b", CONST_2, PREFIX_017, 0x1, 0x2, 0xc),
- EXPAND_UNOP_STD_W (O (O_ROTL, SW), "rotl.w", PREFIX_015, 0x1, 0x2, 0x9),
- EXPAND_UNOP_EXTENDED_W (O (O_ROTL, SW), "rotl.w", CONST_2, PREFIX_015, 0x1, 0x2, 0xd),
- EXPAND_UNOP_STD_L (O (O_ROTL, SL), "rotl.l", PREFIX_010, 0x1, 0x2, 0xb),
- EXPAND_UNOP_EXTENDED_L (O (O_ROTL, SL), "rotl.l", CONST_2, PREFIX_010, 0x1, 0x2, 0xf, B30),
- EXPAND_UNOP_STD_B (O (O_ROTR, SB), "rotr.b", PREFIX_017, 0x1, 0x3, 0x8),
- EXPAND_UNOP_EXTENDED_B (O (O_ROTR, SB), "rotr.b", CONST_2, PREFIX_017, 0x1, 0x3, 0xc),
- EXPAND_UNOP_STD_W (O (O_ROTR, SW), "rotr.w", PREFIX_015, 0x1, 0x3, 0x9),
- EXPAND_UNOP_EXTENDED_W (O (O_ROTR, SW), "rotr.w", CONST_2, PREFIX_015, 0x1, 0x3, 0xd),
- EXPAND_UNOP_STD_L (O (O_ROTR, SL), "rotr.l", PREFIX_010, 0x1, 0x3, 0xb),
- EXPAND_UNOP_EXTENDED_L (O (O_ROTR, SL), "rotr.l", CONST_2, PREFIX_010, 0x1, 0x3, 0xf, B30),
- EXPAND_UNOP_STD_B (O (O_ROTXL, SB), "rotxl.b", PREFIX_017, 0x1, 0x2, 0x0),
- EXPAND_UNOP_EXTENDED_B (O (O_ROTXL, SB), "rotxl.b", CONST_2, PREFIX_017, 0x1, 0x2, 0x4),
- EXPAND_UNOP_STD_W (O (O_ROTXL, SW), "rotxl.w", PREFIX_015, 0x1, 0x2, 0x1),
- EXPAND_UNOP_EXTENDED_W (O (O_ROTXL, SW), "rotxl.w", CONST_2, PREFIX_015, 0x1, 0x2, 0x5),
- EXPAND_UNOP_STD_L (O (O_ROTXL, SL), "rotxl.l", PREFIX_010, 0x1, 0x2, 0x3),
- EXPAND_UNOP_EXTENDED_L (O (O_ROTXL, SL), "rotxl.l", CONST_2, PREFIX_010, 0x1, 0x2, 0x7, B30),
- EXPAND_UNOP_STD_B (O (O_ROTXR, SB), "rotxr.b", PREFIX_017, 0x1, 0x3, 0x0),
- EXPAND_UNOP_EXTENDED_B (O (O_ROTXR, SB), "rotxr.b", CONST_2, PREFIX_017, 0x1, 0x3, 0x4),
- EXPAND_UNOP_STD_W (O (O_ROTXR, SW), "rotxr.w", PREFIX_015, 0x1, 0x3, 0x1),
- EXPAND_UNOP_EXTENDED_W (O (O_ROTXR, SW), "rotxr.w", CONST_2, PREFIX_015, 0x1, 0x3, 0x5),
- EXPAND_UNOP_STD_L (O (O_ROTXR, SL), "rotxr.l", PREFIX_010, 0x1, 0x3, 0x3),
- EXPAND_UNOP_EXTENDED_L (O (O_ROTXR, SL), "rotxr.l", CONST_2, PREFIX_010, 0x1, 0x3, 0x7, B30),
-
-
- {O (O_BPT, SN), AV_H8, 10, "bpt", {{E}}, {{0x7, 0xA, 0xF, 0xF, E}}},
- {O (O_RTE, SN), AV_H8, 10, "rte", {{E}}, {{0x5, 0x6, 0x7, 0x0, E}}},
- {O (O_RTS, SN), AV_H8, 8, "rts", {{E}}, {{0x5, 0x4, 0x7, 0x0, E}}},
- {O (O_RTEL, SN), AV_H8SX, 0, "rte/l", {{RS32, RD32, E}}, {{0x5, 0x6, RS32 | B30, RD32 | B30, E}}},
- {O (O_RTSL, SN), AV_H8SX, 0, "rts/l", {{RS32, RD32, E}}, {{0x5, 0x4, RS32 | B30, RD32 | B30, E}}},
-
- EXPAND_UNOP_STD_B (O (O_SHAL, SB), "shal.b", PREFIX_017, 0x1, 0x0, 0x8),
- EXPAND_UNOP_EXTENDED_B (O (O_SHAL, SB), "shal.b", CONST_2, PREFIX_017, 0x1, 0x0, 0xc),
- EXPAND_UNOP_STD_W (O (O_SHAL, SW), "shal.w", PREFIX_015, 0x1, 0x0, 0x9),
- EXPAND_UNOP_EXTENDED_W (O (O_SHAL, SW), "shal.w", CONST_2, PREFIX_015, 0x1, 0x0, 0xd),
- EXPAND_UNOP_STD_L (O (O_SHAL, SL), "shal.l", PREFIX_010, 0x1, 0x0, 0xb),
- EXPAND_UNOP_EXTENDED_L (O (O_SHAL, SL), "shal.l", CONST_2, PREFIX_010, 0x1, 0x0, 0xf, B30),
- EXPAND_UNOP_STD_B (O (O_SHAR, SB), "shar.b", PREFIX_017, 0x1, 0x1, 0x8),
- EXPAND_UNOP_EXTENDED_B (O (O_SHAR, SB), "shar.b", CONST_2, PREFIX_017, 0x1, 0x1, 0xc),
- EXPAND_UNOP_STD_W (O (O_SHAR, SW), "shar.w", PREFIX_015, 0x1, 0x1, 0x9),
- EXPAND_UNOP_EXTENDED_W (O (O_SHAR, SW), "shar.w", CONST_2, PREFIX_015, 0x1, 0x1, 0xd),
- EXPAND_UNOP_STD_L (O (O_SHAR, SL), "shar.l", PREFIX_010, 0x1, 0x1, 0xb),
- EXPAND_UNOP_EXTENDED_L (O (O_SHAR, SL), "shar.l", CONST_2, PREFIX_010, 0x1, 0x1, 0xf, B30),
-
- EXPAND_UNOP_STD_B (O (O_SHLL, SB), "shll.b", PREFIX_017, 0x1, 0x0, 0x0),
-
- {O (O_SHLL, SB), AV_H8SX, 0, "shll.b", {{RS8, RD8, E}}, {{0x7, 0x8, RS8, 0x8, 0x1, 0x0, 0x0, RD8, E}}},
-
- EXPAND_UNOP_EXTENDED_B (O (O_SHLL, SB), "shll.b", CONST_2, PREFIX_017, 0x1, 0x0, 0x4),
- EXPAND_UNOP_EXTENDED_B (O (O_SHLL, SB), "shll.b", CONST_4, PREFIX_017, 0x1, 0x0, 0xa),
- {O (O_SHLL, SB), AV_H8SX, 0, "shll.b", {{IMM5, RD8, E}}, {{0x0, 0x3, B31 | IMM5, DATA, 0x1, 0x0, 0x0, RD8, E}}},
-
- EXPAND_UNOP_STD_W (O (O_SHLL, SW), "shll.w", PREFIX_015, 0x1, 0x0, 0x1),
-
- {O (O_SHLL, SW), AV_H8SX, 0, "shll.w", {{RS8, RD16, E}}, {{0x7, 0x8, RS8, 0x8, 0x1, 0x0, 0x1, RD16, E}}},
-
- EXPAND_UNOP_EXTENDED_W (O (O_SHLL, SW), "shll.w", CONST_2, PREFIX_015, 0x1, 0x0, 0x5),
- EXPAND_UNOP_EXTENDED_W (O (O_SHLL, SW), "shll.w", CONST_4, PREFIX_015, 0x1, 0x0, 0x2),
- EXPAND_UNOP_EXTENDED_W (O (O_SHLL, SW), "shll.w", CONST_8, PREFIX_015, 0x1, 0x0, 0x6),
- {O (O_SHLL, SW), AV_H8SX, 0, "shll.w", {{IMM5, RD16, E}}, {{0x0, 0x3, B31 | IMM5, DATA, 0x1, 0x0, 0x1, RD16, E}}},
-
- EXPAND_UNOP_STD_L (O (O_SHLL, SL), "shll.l", PREFIX_010, 0x1, 0x0, 0x3),
-
- {O (O_SHLL, SL), AV_H8SX, 0, "shll.l", {{RS8, RD32, E}}, {{0x7, 0x8, RS8, 0x8, 0x1, 0x0, 0x3, B30 | RD32, E}}},
-
- EXPAND_UNOP_EXTENDED_L (O (O_SHLL, SL), "shll.l", CONST_2, PREFIX_010, 0x1, 0x0, 0x7, B30),
- EXPAND_UNOP_EXTENDED_L (O (O_SHLL, SL), "shll.l", CONST_4, PREFIX_010, 0x1, 0x0, 0x3, B31),
- EXPAND_UNOP_EXTENDED_L (O (O_SHLL, SL), "shll.l", CONST_8, PREFIX_010, 0x1, 0x0, 0x7, B31),
- EXPAND_UNOP_EXTENDED_L (O (O_SHLL, SL), "shll.l", CONST_16, PREFIX_010, 0x1, 0x0, 0xf, B31),
- {O (O_SHLL, SL), AV_H8SX, 0, "shll.l", {{IMM5, RD32, E}}, {{0x0, 0x3, B31 | IMM5, DATA, 0x1, 0x0, 0x3, B30 | RD32, E}}},
-
- EXPAND_UNOP_STD_B (O (O_SHLR, SB), "shlr.b", PREFIX_017, 0x1, 0x1, 0x0),
-
- {O (O_SHLR, SB), AV_H8SX, 0, "shlr.b", {{RS8, RD8, E}}, {{0x7, 0x8, RS8, 0x8, 0x1, 0x1, 0x0, RD8, E}}},
-
- EXPAND_UNOP_EXTENDED_B (O (O_SHLR, SB), "shlr.b", CONST_2, PREFIX_017, 0x1, 0x1, 0x4),
- EXPAND_UNOP_EXTENDED_B (O (O_SHLR, SB), "shlr.b", CONST_4, PREFIX_017, 0x1, 0x1, 0xa),
- {O (O_SHLR, SB), AV_H8SX, 0, "shlr.b", {{IMM5, RD8, E}}, {{0x0, 0x3, B31 | IMM5, DATA, 0x1, 0x1, 0x0, RD8, E}}},
-
- EXPAND_UNOP_STD_W (O (O_SHLR, SW), "shlr.w", PREFIX_015, 0x1, 0x1, 0x1),
-
- {O (O_SHLR, SW), AV_H8SX, 0, "shlr.w", {{RS8, RD16, E}}, {{0x7, 0x8, RS8, 0x8, 0x1, 0x1, 0x1, RD16, E}}},
-
- EXPAND_UNOP_EXTENDED_W (O (O_SHLR, SW), "shlr.w", CONST_2, PREFIX_015, 0x1, 0x1, 0x5),
- EXPAND_UNOP_EXTENDED_W (O (O_SHLR, SW), "shlr.w", CONST_4, PREFIX_015, 0x1, 0x1, 0x2),
- EXPAND_UNOP_EXTENDED_W (O (O_SHLR, SW), "shlr.w", CONST_8, PREFIX_015, 0x1, 0x1, 0x6),
- {O (O_SHLR, SW), AV_H8SX, 0, "shlr.w", {{IMM5, RD16, E}}, {{0x0, 0x3, B31 | IMM5, DATA, 0x1, 0x1, 0x1, RD16, E}}},
-
- EXPAND_UNOP_STD_L (O (O_SHLR, SL), "shlr.l", PREFIX_010, 0x1, 0x1, 0x3),
-
- {O (O_SHLR, SL), AV_H8SX, 0, "shlr.l", {{RS8, RD32, E}}, {{0x7, 0x8, RS8, 0x8, 0x1, 0x1, 0x3, B30 | RD32, E}}},
-
- EXPAND_UNOP_EXTENDED_L (O (O_SHLR, SL), "shlr.l", CONST_2, PREFIX_010, 0x1, 0x1, 0x7, B30),
- EXPAND_UNOP_EXTENDED_L (O (O_SHLR, SL), "shlr.l", CONST_4, PREFIX_010, 0x1, 0x1, 0x3, B31),
- EXPAND_UNOP_EXTENDED_L (O (O_SHLR, SL), "shlr.l", CONST_8, PREFIX_010, 0x1, 0x1, 0x7, B31),
- EXPAND_UNOP_EXTENDED_L (O (O_SHLR, SL), "shlr.l", CONST_16, PREFIX_010, 0x1, 0x1, 0xf, B31),
- {O (O_SHLR, SL), AV_H8SX, 0, "shlr.l", {{IMM5, RD32, E}}, {{0x0, 0x3, B31 | IMM5, DATA, 0x1, 0x1, 0x3, B30 | RD32, E}}},
-
- {O (O_SLEEP, SN), AV_H8, 2, "sleep", {{E}}, {{0x0, 0x1, 0x8, 0x0, E}}},
-
- {O (O_STC, SB), AV_H8, 2, "stc", {{CCR | SRC, RD8, E}}, {{0x0, 0x2, B30 | CCR | SRC, RD8, E}}},
- {O (O_STC, SB), AV_H8S, 2, "stc", {{EXR | SRC, RD8, E}}, {{0x0, 0x2, B30 | EXR | SRC, RD8, E}}},
- {O (O_STC, SW), AV_H8H, 2, "stc", {{CCR | SRC, RDIND, E}}, {{PREFIXSTC, 0x6, 0x9, B31 | RDIND, IGNORE, E}}},
- {O (O_STC, SW), AV_H8S, 2, "stc", {{EXR | SRC, RDIND, E}}, {{PREFIXSTC, 0x6, 0x9, B31 | RDIND, IGNORE, E}}},
- {O (O_STC, SW), AV_H8H, 2, "stc", {{CCR | SRC, RDPREDEC, E}}, {{PREFIXSTC, 0x6, 0xD, B31 | RDPREDEC, IGNORE, E}}},
- {O (O_STC, SW), AV_H8S, 2, "stc", {{EXR | SRC, RDPREDEC, E}}, {{PREFIXSTC, 0x6, 0xD, B31 | RDPREDEC, IGNORE, E}}},
- {O (O_STC, SW), AV_H8H, 2, "stc", {{CCR | SRC, DISP16DST, E}}, {{PREFIXSTC, 0x6, 0xF, B31 | DSTDISPREG, IGNORE, DSTDISP16LIST, E}}},
- {O (O_STC, SW), AV_H8S, 2, "stc", {{EXR | SRC, DISP16DST, E}}, {{PREFIXSTC, 0x6, 0xF, B31 | DSTDISPREG, IGNORE, DSTDISP16LIST, E}}},
- {O (O_STC, SW), AV_H8H, 2, "stc", {{CCR | SRC, DISP32DST, E}}, {{PREFIXSTC, 0x7, 0x8, B30 | DSTDISPREG, 0, 0x6, 0xB, 0xA, IGNORE, DSTDISP32LIST, E}}},
- {O (O_STC, SW), AV_H8S, 2, "stc", {{EXR | SRC, DISP32DST, E}}, {{PREFIXSTC, 0x7, 0x8, B30 | DSTDISPREG, 0, 0x6, 0xB, 0xA, IGNORE, DSTDISP32LIST, E}}},
- {O (O_STC, SW), AV_H8H, 2, "stc", {{CCR | SRC, ABS16DST, E}}, {{PREFIXSTC, 0x6, 0xB, 0x8, IGNORE, DST | ABS16LIST, E}}},
- {O (O_STC, SW), AV_H8S, 2, "stc", {{EXR | SRC, ABS16DST, E}}, {{PREFIXSTC, 0x6, 0xB, 0x8, IGNORE, DST | ABS16LIST, E}}},
- {O (O_STC, SW), AV_H8H, 2, "stc", {{CCR | SRC, ABS32DST, E}}, {{PREFIXSTC, 0x6, 0xB, 0xA, IGNORE, DST | MEMRELAX | ABS32LIST, E}}},
- {O (O_STC, SW), AV_H8S, 2, "stc", {{EXR | SRC, ABS32DST, E}}, {{PREFIXSTC, 0x6, 0xB, 0xA, IGNORE, DST | MEMRELAX | ABS32LIST, E}}},
- {O (O_STC, SL), AV_H8SX, 0, "stc", {{B30 | VBR_SBR | SRC, RD32, E}}, {{0x0, 0x2, B30 | VBR_SBR | SRC, RD32, E}}},
-
-
- EXPAND_TWOOP_B (O (O_SUB, SB), "sub.b", 0xa, 0x1, 0x8, 0x3, B01),
-
- {O (O_SUB, SW), AV_H8, 2, "sub.w", {{RS16, RD16, E}}, {{0x1, 0x9, RS16, RD16, E}}},
- {O (O_SUB, SW), AV_H8SX, 0, "sub.w", {{IMM3NZ_NS, RD16, E}}, {{0x1, 0xa, B30 | IMM3NZ, RD16, E}}},
- {O (O_SUB, SW), AV_H8SX, 0, "sub.w", {{IMM3NZ_NS, RDIND, E}}, {{0x7, 0xd, B31 | RDIND, IGNORE, 0x1, 0xa, B30 | IMM3NZ, IGNORE, E}}},
- {O (O_SUB, SW), AV_H8SX, 0, "sub.w", {{IMM3NZ_NS, ABS16DST, E}}, {{0x6, 0xb, 0x1, B31 | IGNORE, DSTABS16LIST, 0x1, 0xa, B30 | IMM3NZ, IGNORE, E}}},
- {O (O_SUB, SW), AV_H8SX, 0, "sub.w", {{IMM3NZ_NS, ABS32DST, E}}, {{0x6, 0xb, 0x3, B31 | IGNORE, DSTABS32LIST, 0x1, 0xa, B30 | IMM3NZ, IGNORE, E}}},
- EXPAND_TWOOP_W (O (O_SUB, SW), "sub.w", 0x1, 0x9, 0x3),
-
- {O (O_SUB, SL), AV_H8H, 6, "sub.l", {{RS32, RD32, E}}, {{0x1, 0xa, B31 | RS32, B30 | RD32, E}}},
- {O (O_SUB, SL), AV_H8SX, 0, "sub.l", {{IMM3NZ_NS, RD32, E}}, {{0x1, 0xa, B31 | IMM3NZ, B31 | RD32, E}}},
- EXPAND_TWOOP_L (O (O_SUB, SL), "sub.l", 0x3),
-
- {O (O_SUBS, SL), AV_H8, 2, "subs", {{KBIT, RDP, E}}, {{0x1, 0xB,KBIT, RDP, E}}},
-
- {O (O_SUBX, SB), AV_H8, 2, "subx", {{IMM8, RD8, E}}, {{0xb, RD8, IMM8LIST, E}}},
- {O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{IMM8, RDIND, E}}, {{0x7, 0xd, B30 | RDIND, IGNORE, 0xb, IGNORE, IMM8LIST, E}}},
- {O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{IMM8, RDPOSTDEC, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RDPOSTDEC, B31 | IGNORE, 0xb, IGNORE, IMM8LIST, E}}},
- {O (O_SUBX, SB), AV_H8, 2, "subx", {{RS8, RD8, E}}, {{0x1, 0xe, RS8, RD8, E}}},
- {O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{RS8, RDIND, E}}, {{0x7, 0xd, B30 | RDIND, IGNORE, 0x1, 0xe, RS8, IGNORE, E}}},
- {O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{RS8, RDPOSTDEC, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RDPOSTDEC, B31 | IGNORE, 0x1, 0xe, RS8, IGNORE, E}}},
- {O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{RSIND, RD8, E}}, {{0x7, 0xc, B30 | RSIND, IGNORE, 0x1, 0xe, IGNORE, RD8, E}}},
- {O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{RSPOSTDEC, RD8, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RSPOSTDEC, B30 | B20 | IGNORE, 0x1, 0xe, IGNORE, RD8, E}}},
- {O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{RSIND, RDIND, E}}, {{PREFIX_0174, 0x6, 0x8, B30 | RSIND, 0xd, 0x0, RDIND, 0x3, IGNORE, E}}},
- {O (O_SUBX, SB), AV_H8SX, 0, "subx.b", {{RSPOSTDEC, RDPOSTDEC, E}}, {{PREFIX_0176, 0x6, 0xc, B30 | RSPOSTDEC, 0xd, 0xa, RDPOSTDEC, 0x3, IGNORE, E}}},
-
- {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{IMM16, RD16, E}}, {{PREFIX_0151, 0x7, 0x9, 0x3, RD16, IMM16LIST, E}}},
- {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{IMM16, RDIND, E}}, {{0x7, 0xd, B31 | RDIND, B01 | IGNORE, 0x7, 0x9, 0x3, IGNORE, IMM16LIST, E}}},
- {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{IMM16, RDPOSTDEC, E}}, {{PREFIX_0156, 0x6, 0xd, B30 | RDPOSTDEC, B31 | B20 | B01 | IGNORE, 0x7, 0x9, 0x3, IGNORE, IMM16LIST, E}}},
- {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{RS16, RD16, E}}, {{PREFIX_0151, 0x1, 0x9, RS16, RD16, E}}},
- {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{RS16, RDIND, E}}, {{0x7, 0xd, B31 | RDIND, B01 | IGNORE, 0x1, 0x9, RS16, IGNORE, E}}},
- {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{RS16, RDPOSTDEC, E}}, {{PREFIX_0156, 0x6, 0xd, B30 | RDPOSTDEC, B31 | B20 | B01 | IGNORE, 0x1, 0x9, RS16, IGNORE, E}}},
- {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{RSIND, RD16, E}}, {{0x7, 0xc, B31 | RSIND, B01 | IGNORE, 0x1, 0x9, IGNORE, RD16, E}}},
- {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{RSPOSTDEC, RD16, E}}, {{PREFIX_0156, 0x6, 0xd, B30 | RSPOSTDEC, B30 | B20 | B01 | IGNORE, 0x1, 0x9, IGNORE, RD16, E}}},
- {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{RSIND, RDIND, E}}, {{PREFIX_0154, 0x6, 0x9, B30 | RSIND, 0xd, 0x0, RDIND, 0x3, IGNORE, E}}},
- {O (O_SUBX, SW), AV_H8SX, 0, "subx.w", {{RSPOSTDEC, RDPOSTDEC, E}}, {{PREFIX_0156, 0x6, 0xd, B30 | RSPOSTDEC, 0xd, 0xa, RDPOSTDEC, 0x3, IGNORE, E}}},
-
- {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{IMM32, RD32, E}}, {{PREFIX_0101, 0x7, 0xa, 0x3, RD32, IMM32LIST, E}}},
- {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{IMM32, RDIND, E}}, {{PREFIX_0104, 0x6, 0x9, B30 | RDIND, B31 | B20 | B01 | IGNORE, 0x7, 0xa, 0x3, IGNORE, IMM32LIST, E}}},
- {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{IMM32, RDPOSTDEC, E}}, {{PREFIX_0106, 0x6, 0xd, B30 | RDPOSTDEC, B31 | B20 | B01 | IGNORE, 0x7, 0xa, 0x3, IGNORE, IMM32LIST, E}}},
- {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{RS32, RD32, E}}, {{PREFIX_0101, 0x1, 0xa, B31 | RS32, B30 | RD32, E}}},
- {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{RS32, RDIND, E}}, {{PREFIX_0104, 0x6, 0x9, B30 | RDIND, B31 | B20 | B01 | IGNORE, 0x1, 0xa, B31 | RS32, B30 | IGNORE, E}}},
- {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{RS32, RDPOSTDEC, E}}, {{PREFIX_0106, 0x6, 0xd, B30 | RDPOSTDEC, B31 | B20 | B01 | IGNORE, 0x1, 0xa, B31 | RS32, B30 | IGNORE, E}}},
- {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{RSIND, RD32, E}}, {{PREFIX_0104, 0x6, 0x9, B30 | RSIND, B30 | B20 | B01 | IGNORE, 0x1, 0xa, B31 | IGNORE, B30 | RD32, E}}},
- {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{RSPOSTDEC, RD32, E}}, {{PREFIX_0106, 0x6, 0xd, B30 | RSPOSTDEC, B30 | B20 | B01 | IGNORE, 0x1, 0xa, B31 | IGNORE, B30 | RD32, E}}},
- {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{RSIND, RDIND, E}}, {{PREFIX_0104, 0x6, 0x9, B30 | RSIND, 0xd, 0x0, RDIND, 0x3, IGNORE, E}}},
- {O (O_SUBX, SL), AV_H8SX, 0, "subx.l", {{RSPOSTDEC, RDPOSTDEC, E}}, {{PREFIX_0106, 0x6, 0xd, B30 | RSPOSTDEC, 0xd, 0xa, RDPOSTDEC, 0x3, IGNORE, E}}},
-
- {O (O_TRAPA, SB), AV_H8H, 2, "trapa", {{IMM2, E}}, {{0x5, 0x7, IMM2, IGNORE, E}}},
- {O (O_TAS, SB), AV_H8H, 2, "tas", {{RSIND, E}}, {{0x0, 0x1, 0xe, 0x0, 0x7, 0xb, B30 | RSIND, 0xc, E}}},
-
- {O (O_XOR, SB), AV_H8, 2, "xor.b", {{IMM8, RD8, E}}, {{0xd, RD8, IMM8LIST, E}}},
- EXPAND_TWOOP_B (O (O_XOR, SB), "xor.b", 0xd, 0x1, 0x5, 0x5, 0),
-
- {O (O_XOR, SW), AV_H8, 2, "xor.w", {{RS16, RD16, E}}, {{0x6, 0x5, RS16, RD16, E}}},
- EXPAND_TWOOP_W (O (O_XOR, SW), "xor.w", 0x6, 0x5, 0x5),
-
- {O (O_XOR, SL), AV_H8H, 2, "xor.l", {{RS32, RD32, E}}, {{0x0, 0x1, 0xF, 0x0, 0x6, 0x5, B30 | RS32, B30 | RD32, E}}},
- EXPAND_TWOOP_L (O (O_XOR, SL), "xor.l", 0x5),
-
- {O (O_XORC, SB), AV_H8, 2, "xorc", {{IMM8, CCR | DST, E}}, {{0x0, 0x5, IMM8LIST, E}}},
- {O (O_XORC, SB), AV_H8S, 2, "xorc", {{IMM8, EXR | DST, E}}, {{0x0, 0x1, 0x4, EXR | DST, 0x0, 0x5, IMM8LIST, E}}},
-
- {O (O_CLRMAC, SN), AV_H8S, 2, "clrmac", {{E}}, {{0x0, 0x1, 0xa, 0x0, E}}},
- {O (O_MAC, SW), AV_H8S, 2, "mac", {{RSPOSTINC, RDPOSTINC, E}}, {{0x0, 0x1, 0x6, 0x0, 0x6, 0xd, B30 | RSPOSTINC, B30 | RDPOSTINC, E}}},
- {O (O_LDMAC, SL), AV_H8S, 2, "ldmac", {{RS32, MD32, E}}, {{0x0, 0x3, MD32, RS32, E}}},
- {O (O_STMAC, SL), AV_H8S, 2, "stmac", {{MS32, RD32, E}}, {{0x0, 0x2, MS32, RD32, E}}},
- {O (O_LDM, SL), AV_H8H, 6, "ldm.l", {{RSPOSTINC, RD32, E}}, {{0x0, 0x1, DATA, 0x0, 0x6, 0xD, 0x7, B30 | RD32, E}}},
- {O (O_STM, SL), AV_H8H, 6, "stm.l", {{RS32, RDPREDEC, E}}, {{0x0, 0x1, DATA, 0x0, 0x6, 0xD, 0xF, B30 | RS32, E}}},
- {0, 0, 0, NULL, {{0, 0, 0}}, {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}}
-};
-#else
-extern const struct h8_opcode h8_opcodes[];
-#endif
-
diff --git a/include/opcode/hppa.h b/include/opcode/hppa.h
deleted file mode 100644
index d1c0e83..0000000
--- a/include/opcode/hppa.h
+++ /dev/null
@@ -1,1090 +0,0 @@
-/* Table of opcodes for the PA-RISC.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005
- Free Software Foundation, Inc.
-
- Contributed by the Center for Software Science at the
- University of Utah (pa-gdb-bugs@cs.utah.edu).
-
-This file is part of GAS, the GNU Assembler, and GDB, the GNU disassembler.
-
-GAS/GDB is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
-
-GAS/GDB is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GAS or GDB; see the file COPYING. If not, write to
-the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#if !defined(__STDC__) && !defined(const)
-#define const
-#endif
-
-/*
- * Structure of an opcode table entry.
- */
-
-/* There are two kinds of delay slot nullification: normal which is
- * controled by the nullification bit, and conditional, which depends
- * on the direction of the branch and its success or failure.
- *
- * NONE is unfortunately #defined in the hiux system include files.
- * #undef it away.
- */
-#undef NONE
-struct pa_opcode
-{
- const char *name;
- unsigned long int match; /* Bits that must be set... */
- unsigned long int mask; /* ... in these bits. */
- char *args;
- enum pa_arch arch;
- char flags;
-};
-
-/* Enables strict matching. Opcodes with match errors are skipped
- when this bit is set. */
-#define FLAG_STRICT 0x1
-
-/*
- All hppa opcodes are 32 bits.
-
- The match component is a mask saying which bits must match a
- particular opcode in order for an instruction to be an instance
- of that opcode.
-
- The args component is a string containing one character for each operand of
- the instruction. Characters used as a prefix allow any second character to
- be used without conflicting with the main operand characters.
-
- Bit positions in this description follow HP usage of lsb = 31,
- "at" is lsb of field.
-
- In the args field, the following characters must match exactly:
-
- '+,() '
-
- In the args field, the following characters are unused:
-
- ' " - / 34 6789:; '
- '@ C M [\] '
- '` e g } '
-
- Here are all the characters:
-
- ' !"#$%&'()*+-,./0123456789:;<=>?'
- '@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_'
- '`abcdefghijklmnopqrstuvwxyz{|}~ '
-
-Kinds of operands:
- x integer register field at 15.
- b integer register field at 10.
- t integer register field at 31.
- a integer register field at 10 and 15 (for PERMH)
- 5 5 bit immediate at 15.
- s 2 bit space specifier at 17.
- S 3 bit space specifier at 18.
- V 5 bit immediate value at 31
- i 11 bit immediate value at 31
- j 14 bit immediate value at 31
- k 21 bit immediate value at 31
- l 16 bit immediate value at 31 (wide mode only, unusual encoding).
- n nullification for branch instructions
- N nullification for spop and copr instructions
- w 12 bit branch displacement
- W 17 bit branch displacement (PC relative)
- X 22 bit branch displacement (PC relative)
- z 17 bit branch displacement (just a number, not an address)
-
-Also these:
-
- . 2 bit shift amount at 25
- * 4 bit shift amount at 25
- p 5 bit shift count at 26 (to support the SHD instruction) encoded as
- 31-p
- ~ 6 bit shift count at 20,22:26 encoded as 63-~.
- P 5 bit bit position at 26
- q 6 bit bit position at 20,22:26
- T 5 bit field length at 31 (encoded as 32-T)
- % 6 bit field length at 23,27:31 (variable extract/deposit)
- | 6 bit field length at 19,27:31 (fixed extract/deposit)
- A 13 bit immediate at 18 (to support the BREAK instruction)
- ^ like b, but describes a control register
- ! sar (cr11) register
- D 26 bit immediate at 31 (to support the DIAG instruction)
- $ 9 bit immediate at 28 (to support POPBTS)
-
- v 3 bit Special Function Unit identifier at 25
- O 20 bit Special Function Unit operation split between 15 bits at 20
- and 5 bits at 31
- o 15 bit Special Function Unit operation at 20
- 2 22 bit Special Function Unit operation split between 17 bits at 20
- and 5 bits at 31
- 1 15 bit Special Function Unit operation split between 10 bits at 20
- and 5 bits at 31
- 0 10 bit Special Function Unit operation split between 5 bits at 20
- and 5 bits at 31
- u 3 bit coprocessor unit identifier at 25
- F Source Floating Point Operand Format Completer encoded 2 bits at 20
- I Source Floating Point Operand Format Completer encoded 1 bits at 20
- (for 0xe format FP instructions)
- G Destination Floating Point Operand Format Completer encoded 2 bits at 18
- H Floating Point Operand Format at 26 for 'fmpyadd' and 'fmpysub'
- (very similar to 'F')
-
- r 5 bit immediate value at 31 (for the break instruction)
- (very similar to V above, except the value is unsigned instead of
- low_sign_ext)
- R 5 bit immediate value at 15 (for the ssm, rsm, probei instructions)
- (same as r above, except the value is in a different location)
- U 10 bit immediate value at 15 (for SSM, RSM on pa2.0)
- Q 5 bit immediate value at 10 (a bit position specified in
- the bb instruction. It's the same as r above, except the
- value is in a different location)
- B 5 bit immediate value at 10 (a bit position specified in
- the bb instruction. Similar to Q, but 64 bit handling is
- different.
- Z %r1 -- implicit target of addil instruction.
- L ,%r2 completer for new syntax branch
- { Source format completer for fcnv
- _ Destination format completer for fcnv
- h cbit for fcmp
- = gfx tests for ftest
- d 14 bit offset for single precision FP long load/store.
- # 14 bit offset for double precision FP load long/store.
- J Yet another 14 bit offset for load/store with ma,mb completers.
- K Yet another 14 bit offset for load/store with ma,mb completers.
- y 16 bit offset for word aligned load/store (PA2.0 wide).
- & 16 bit offset for dword aligned load/store (PA2.0 wide).
- < 16 bit offset for load/store with ma,mb completers (PA2.0 wide).
- > 16 bit offset for load/store with ma,mb completers (PA2.0 wide).
- Y %sr0,%r31 -- implicit target of be,l instruction.
- @ implicit immediate value of 0
-
-Completer operands all have 'c' as the prefix:
-
- cx indexed load and store completer.
- cX indexed load and store completer. Like cx, but emits a space
- after in disassembler.
- cm short load and store completer.
- cM short load and store completer. Like cm, but emits a space
- after in disassembler.
- cq long load and store completer (like cm, but inserted into a
- different location in the target instruction).
- cs store bytes short completer.
- cA store bytes short completer. Like cs, but emits a space
- after in disassembler.
- ce long load/store completer for LDW/STW with a different encoding
- than the others
- cc load cache control hint
- cd load and clear cache control hint
- cC store cache control hint
- co ordered access
-
- cp branch link and push completer
- cP branch pop completer
- cl branch link completer
- cg branch gate completer
-
- cw read/write completer for PROBE
- cW wide completer for MFCTL
- cL local processor completer for cache control
- cZ System Control Completer (to support LPA, LHA, etc.)
-
- ci correction completer for DCOR
- ca add completer
- cy 32 bit add carry completer
- cY 64 bit add carry completer
- cv signed overflow trap completer
- ct trap on condition completer for ADDI, SUB
- cT trap on condition completer for UADDCM
- cb 32 bit borrow completer for SUB
- cB 64 bit borrow completer for SUB
-
- ch left/right half completer
- cH signed/unsigned saturation completer
- cS signed/unsigned completer at 21
- cz zero/sign extension completer.
- c* permutation completer
-
-Condition operands all have '?' as the prefix:
-
- ?f Floating point compare conditions (encoded as 5 bits at 31)
-
- ?a add conditions
- ?A 64 bit add conditions
- ?@ add branch conditions followed by nullify
- ?d non-negated add branch conditions
- ?D negated add branch conditions
- ?w wide mode non-negated add branch conditions
- ?W wide mode negated add branch conditions
-
- ?s compare/subtract conditions
- ?S 64 bit compare/subtract conditions
- ?t non-negated compare and branch conditions
- ?n 32 bit compare and branch conditions followed by nullify
- ?N 64 bit compare and branch conditions followed by nullify
- ?Q 64 bit compare and branch conditions for CMPIB instruction
-
- ?l logical conditions
- ?L 64 bit logical conditions
-
- ?b branch on bit conditions
- ?B 64 bit branch on bit conditions
-
- ?x shift/extract/deposit conditions
- ?X 64 bit shift/extract/deposit conditions
- ?y shift/extract/deposit conditions followed by nullify for conditional
- branches
-
- ?u unit conditions
- ?U 64 bit unit conditions
-
-Floating point registers all have 'f' as a prefix:
-
- ft target register at 31
- fT target register with L/R halves at 31
- fa operand 1 register at 10
- fA operand 1 register with L/R halves at 10
- fX Same as fA, except prints a space before register during disasm
- fb operand 2 register at 15
- fB operand 2 register with L/R halves at 15
- fC operand 3 register with L/R halves at 16:18,21:23
- fe Like fT, but encoding is different.
- fE Same as fe, except prints a space before register during disasm.
- fx target register at 15 (only for PA 2.0 long format FLDD/FSTD).
-
-Float registers for fmpyadd and fmpysub:
-
- fi mult operand 1 register at 10
- fj mult operand 2 register at 15
- fk mult target register at 20
- fl add/sub operand register at 25
- fm add/sub target register at 31
-
-*/
-
-
-#if 0
-/* List of characters not to put a space after. Note that
- "," is included, as the "spopN" operations use literal
- commas in their completer sections. */
-static const char *const completer_chars = ",CcY<>?!@+&U~FfGHINnOoZMadu|/=0123%e$m}";
-#endif
-
-/* The order of the opcodes in this table is significant:
-
- * The assembler requires that all instances of the same mnemonic be
- consecutive. If they aren't, the assembler will bomb at runtime.
-
- * Immediate fields use pa_get_absolute_expression to parse the
- string. It will generate a "bad expression" error if passed
- a register name. Thus, register index variants of an opcode
- need to precede immediate variants.
-
- * The disassembler does not care about the order of the opcodes
- except in cases where implicit addressing is used.
-
- Here are the rules for ordering the opcodes of a mnemonic:
-
- 1) Opcodes with FLAG_STRICT should precede opcodes without
- FLAG_STRICT.
-
- 2) Opcodes with FLAG_STRICT should be ordered as follows:
- register index opcodes, short immediate opcodes, and finally
- long immediate opcodes. When both pa10 and pa11 variants
- of the same opcode are available, the pa10 opcode should
- come first for correct architectural promotion.
-
- 3) When implicit addressing is available for an opcode, the
- implicit opcode should precede the explicit opcode.
-
- 4) Opcodes without FLAG_STRICT should be ordered as follows:
- register index opcodes, long immediate opcodes, and finally
- short immediate opcodes. */
-
-static const struct pa_opcode pa_opcodes[] =
-{
-
-/* Pseudo-instructions. */
-
-{ "ldi", 0x34000000, 0xffe00000, "l,x", pa20w, 0},/* ldo val(r0),r */
-{ "ldi", 0x34000000, 0xffe0c000, "j,x", pa10, 0},/* ldo val(r0),r */
-
-{ "cmpib", 0xec000000, 0xfc000000, "?Qn5,b,w", pa20, FLAG_STRICT},
-{ "cmpib", 0x84000000, 0xf4000000, "?nn5,b,w", pa10, FLAG_STRICT},
-{ "comib", 0x84000000, 0xfc000000, "?nn5,b,w", pa10, 0}, /* comib{tf}*/
-/* This entry is for the disassembler only. It will never be used by
- assembler. */
-{ "comib", 0x8c000000, 0xfc000000, "?nn5,b,w", pa10, 0}, /* comib{tf}*/
-{ "cmpb", 0x9c000000, 0xdc000000, "?Nnx,b,w", pa20, FLAG_STRICT},
-{ "cmpb", 0x80000000, 0xf4000000, "?nnx,b,w", pa10, FLAG_STRICT},
-{ "comb", 0x80000000, 0xfc000000, "?nnx,b,w", pa10, 0}, /* comb{tf} */
-/* This entry is for the disassembler only. It will never be used by
- assembler. */
-{ "comb", 0x88000000, 0xfc000000, "?nnx,b,w", pa10, 0}, /* comb{tf} */
-{ "addb", 0xa0000000, 0xf4000000, "?Wnx,b,w", pa20w, FLAG_STRICT},
-{ "addb", 0xa0000000, 0xfc000000, "?@nx,b,w", pa10, 0}, /* addb{tf} */
-/* This entry is for the disassembler only. It will never be used by
- assembler. */
-{ "addb", 0xa8000000, 0xfc000000, "?@nx,b,w", pa10, 0},
-{ "addib", 0xa4000000, 0xf4000000, "?Wn5,b,w", pa20w, FLAG_STRICT},
-{ "addib", 0xa4000000, 0xfc000000, "?@n5,b,w", pa10, 0}, /* addib{tf}*/
-/* This entry is for the disassembler only. It will never be used by
- assembler. */
-{ "addib", 0xac000000, 0xfc000000, "?@n5,b,w", pa10, 0}, /* addib{tf}*/
-{ "nop", 0x08000240, 0xffffffff, "", pa10, 0}, /* or 0,0,0 */
-{ "copy", 0x08000240, 0xffe0ffe0, "x,t", pa10, 0}, /* or r,0,t */
-{ "mtsar", 0x01601840, 0xffe0ffff, "x", pa10, 0}, /* mtctl r,cr11 */
-
-/* Loads and Stores for integer registers. */
-
-{ "ldd", 0x0c0000c0, 0xfc00d3c0, "cxccx(b),t", pa20, FLAG_STRICT},
-{ "ldd", 0x0c0000c0, 0xfc0013c0, "cxccx(s,b),t", pa20, FLAG_STRICT},
-{ "ldd", 0x0c0010e0, 0xfc1ff3e0, "cocc@(b),t", pa20, FLAG_STRICT},
-{ "ldd", 0x0c0010e0, 0xfc1f33e0, "cocc@(s,b),t", pa20, FLAG_STRICT},
-{ "ldd", 0x0c0010c0, 0xfc00d3c0, "cmcc5(b),t", pa20, FLAG_STRICT},
-{ "ldd", 0x0c0010c0, 0xfc0013c0, "cmcc5(s,b),t", pa20, FLAG_STRICT},
-{ "ldd", 0x50000000, 0xfc000002, "cq&(b),x", pa20w, FLAG_STRICT},
-{ "ldd", 0x50000000, 0xfc00c002, "cq#(b),x", pa20, FLAG_STRICT},
-{ "ldd", 0x50000000, 0xfc000002, "cq#(s,b),x", pa20, FLAG_STRICT},
-{ "ldw", 0x0c000080, 0xfc00dfc0, "cXx(b),t", pa10, FLAG_STRICT},
-{ "ldw", 0x0c000080, 0xfc001fc0, "cXx(s,b),t", pa10, FLAG_STRICT},
-{ "ldw", 0x0c000080, 0xfc00d3c0, "cxccx(b),t", pa11, FLAG_STRICT},
-{ "ldw", 0x0c000080, 0xfc0013c0, "cxccx(s,b),t", pa11, FLAG_STRICT},
-{ "ldw", 0x0c0010a0, 0xfc1ff3e0, "cocc@(b),t", pa20, FLAG_STRICT},
-{ "ldw", 0x0c0010a0, 0xfc1f33e0, "cocc@(s,b),t", pa20, FLAG_STRICT},
-{ "ldw", 0x0c001080, 0xfc00dfc0, "cM5(b),t", pa10, FLAG_STRICT},
-{ "ldw", 0x0c001080, 0xfc001fc0, "cM5(s,b),t", pa10, FLAG_STRICT},
-{ "ldw", 0x0c001080, 0xfc00d3c0, "cmcc5(b),t", pa11, FLAG_STRICT},
-{ "ldw", 0x0c001080, 0xfc0013c0, "cmcc5(s,b),t", pa11, FLAG_STRICT},
-{ "ldw", 0x4c000000, 0xfc000000, "ce<(b),x", pa20w, FLAG_STRICT},
-{ "ldw", 0x5c000004, 0xfc000006, "ce>(b),x", pa20w, FLAG_STRICT},
-{ "ldw", 0x48000000, 0xfc000000, "l(b),x", pa20w, FLAG_STRICT},
-{ "ldw", 0x5c000004, 0xfc00c006, "ceK(b),x", pa20, FLAG_STRICT},
-{ "ldw", 0x5c000004, 0xfc000006, "ceK(s,b),x", pa20, FLAG_STRICT},
-{ "ldw", 0x4c000000, 0xfc00c000, "ceJ(b),x", pa10, FLAG_STRICT},
-{ "ldw", 0x4c000000, 0xfc000000, "ceJ(s,b),x", pa10, FLAG_STRICT},
-{ "ldw", 0x48000000, 0xfc00c000, "j(b),x", pa10, 0},
-{ "ldw", 0x48000000, 0xfc000000, "j(s,b),x", pa10, 0},
-{ "ldh", 0x0c000040, 0xfc00dfc0, "cXx(b),t", pa10, FLAG_STRICT},
-{ "ldh", 0x0c000040, 0xfc001fc0, "cXx(s,b),t", pa10, FLAG_STRICT},
-{ "ldh", 0x0c000040, 0xfc00d3c0, "cxccx(b),t", pa11, FLAG_STRICT},
-{ "ldh", 0x0c000040, 0xfc0013c0, "cxccx(s,b),t", pa11, FLAG_STRICT},
-{ "ldh", 0x0c001060, 0xfc1ff3e0, "cocc@(b),t", pa20, FLAG_STRICT},
-{ "ldh", 0x0c001060, 0xfc1f33e0, "cocc@(s,b),t", pa20, FLAG_STRICT},
-{ "ldh", 0x0c001040, 0xfc00dfc0, "cM5(b),t", pa10, FLAG_STRICT},
-{ "ldh", 0x0c001040, 0xfc001fc0, "cM5(s,b),t", pa10, FLAG_STRICT},
-{ "ldh", 0x0c001040, 0xfc00d3c0, "cmcc5(b),t", pa11, FLAG_STRICT},
-{ "ldh", 0x0c001040, 0xfc0013c0, "cmcc5(s,b),t", pa11, FLAG_STRICT},
-{ "ldh", 0x44000000, 0xfc000000, "l(b),x", pa20w, FLAG_STRICT},
-{ "ldh", 0x44000000, 0xfc00c000, "j(b),x", pa10, 0},
-{ "ldh", 0x44000000, 0xfc000000, "j(s,b),x", pa10, 0},
-{ "ldb", 0x0c000000, 0xfc00dfc0, "cXx(b),t", pa10, FLAG_STRICT},
-{ "ldb", 0x0c000000, 0xfc001fc0, "cXx(s,b),t", pa10, FLAG_STRICT},
-{ "ldb", 0x0c000000, 0xfc00d3c0, "cxccx(b),t", pa11, FLAG_STRICT},
-{ "ldb", 0x0c000000, 0xfc0013c0, "cxccx(s,b),t", pa11, FLAG_STRICT},
-{ "ldb", 0x0c001020, 0xfc1ff3e0, "cocc@(b),t", pa20, FLAG_STRICT},
-{ "ldb", 0x0c001020, 0xfc1f33e0, "cocc@(s,b),t", pa20, FLAG_STRICT},
-{ "ldb", 0x0c001000, 0xfc00dfc0, "cM5(b),t", pa10, FLAG_STRICT},
-{ "ldb", 0x0c001000, 0xfc001fc0, "cM5(s,b),t", pa10, FLAG_STRICT},
-{ "ldb", 0x0c001000, 0xfc00d3c0, "cmcc5(b),t", pa11, FLAG_STRICT},
-{ "ldb", 0x0c001000, 0xfc0013c0, "cmcc5(s,b),t", pa11, FLAG_STRICT},
-{ "ldb", 0x40000000, 0xfc000000, "l(b),x", pa20w, FLAG_STRICT},
-{ "ldb", 0x40000000, 0xfc00c000, "j(b),x", pa10, 0},
-{ "ldb", 0x40000000, 0xfc000000, "j(s,b),x", pa10, 0},
-{ "std", 0x0c0012e0, 0xfc00f3ff, "cocCx,@(b)", pa20, FLAG_STRICT},
-{ "std", 0x0c0012e0, 0xfc0033ff, "cocCx,@(s,b)", pa20, FLAG_STRICT},
-{ "std", 0x0c0012c0, 0xfc00d3c0, "cmcCx,V(b)", pa20, FLAG_STRICT},
-{ "std", 0x0c0012c0, 0xfc0013c0, "cmcCx,V(s,b)", pa20, FLAG_STRICT},
-{ "std", 0x70000000, 0xfc000002, "cqx,&(b)", pa20w, FLAG_STRICT},
-{ "std", 0x70000000, 0xfc00c002, "cqx,#(b)", pa20, FLAG_STRICT},
-{ "std", 0x70000000, 0xfc000002, "cqx,#(s,b)", pa20, FLAG_STRICT},
-{ "stw", 0x0c0012a0, 0xfc00f3ff, "cocCx,@(b)", pa20, FLAG_STRICT},
-{ "stw", 0x0c0012a0, 0xfc0033ff, "cocCx,@(s,b)", pa20, FLAG_STRICT},
-{ "stw", 0x0c001280, 0xfc00dfc0, "cMx,V(b)", pa10, FLAG_STRICT},
-{ "stw", 0x0c001280, 0xfc001fc0, "cMx,V(s,b)", pa10, FLAG_STRICT},
-{ "stw", 0x0c001280, 0xfc00d3c0, "cmcCx,V(b)", pa11, FLAG_STRICT},
-{ "stw", 0x0c001280, 0xfc0013c0, "cmcCx,V(s,b)", pa11, FLAG_STRICT},
-{ "stw", 0x6c000000, 0xfc000000, "cex,<(b)", pa20w, FLAG_STRICT},
-{ "stw", 0x7c000004, 0xfc000006, "cex,>(b)", pa20w, FLAG_STRICT},
-{ "stw", 0x68000000, 0xfc000000, "x,l(b)", pa20w, FLAG_STRICT},
-{ "stw", 0x7c000004, 0xfc00c006, "cex,K(b)", pa20, FLAG_STRICT},
-{ "stw", 0x7c000004, 0xfc000006, "cex,K(s,b)", pa20, FLAG_STRICT},
-{ "stw", 0x6c000000, 0xfc00c000, "cex,J(b)", pa10, FLAG_STRICT},
-{ "stw", 0x6c000000, 0xfc000000, "cex,J(s,b)", pa10, FLAG_STRICT},
-{ "stw", 0x68000000, 0xfc00c000, "x,j(b)", pa10, 0},
-{ "stw", 0x68000000, 0xfc000000, "x,j(s,b)", pa10, 0},
-{ "sth", 0x0c001260, 0xfc00f3ff, "cocCx,@(b)", pa20, FLAG_STRICT},
-{ "sth", 0x0c001260, 0xfc0033ff, "cocCx,@(s,b)", pa20, FLAG_STRICT},
-{ "sth", 0x0c001240, 0xfc00dfc0, "cMx,V(b)", pa10, FLAG_STRICT},
-{ "sth", 0x0c001240, 0xfc001fc0, "cMx,V(s,b)", pa10, FLAG_STRICT},
-{ "sth", 0x0c001240, 0xfc00d3c0, "cmcCx,V(b)", pa11, FLAG_STRICT},
-{ "sth", 0x0c001240, 0xfc0013c0, "cmcCx,V(s,b)", pa11, FLAG_STRICT},
-{ "sth", 0x64000000, 0xfc000000, "x,l(b)", pa20w, FLAG_STRICT},
-{ "sth", 0x64000000, 0xfc00c000, "x,j(b)", pa10, 0},
-{ "sth", 0x64000000, 0xfc000000, "x,j(s,b)", pa10, 0},
-{ "stb", 0x0c001220, 0xfc00f3ff, "cocCx,@(b)", pa20, FLAG_STRICT},
-{ "stb", 0x0c001220, 0xfc0033ff, "cocCx,@(s,b)", pa20, FLAG_STRICT},
-{ "stb", 0x0c001200, 0xfc00dfc0, "cMx,V(b)", pa10, FLAG_STRICT},
-{ "stb", 0x0c001200, 0xfc001fc0, "cMx,V(s,b)", pa10, FLAG_STRICT},
-{ "stb", 0x0c001200, 0xfc00d3c0, "cmcCx,V(b)", pa11, FLAG_STRICT},
-{ "stb", 0x0c001200, 0xfc0013c0, "cmcCx,V(s,b)", pa11, FLAG_STRICT},
-{ "stb", 0x60000000, 0xfc000000, "x,l(b)", pa20w, FLAG_STRICT},
-{ "stb", 0x60000000, 0xfc00c000, "x,j(b)", pa10, 0},
-{ "stb", 0x60000000, 0xfc000000, "x,j(s,b)", pa10, 0},
-{ "ldwm", 0x4c000000, 0xfc00c000, "j(b),x", pa10, 0},
-{ "ldwm", 0x4c000000, 0xfc000000, "j(s,b),x", pa10, 0},
-{ "stwm", 0x6c000000, 0xfc00c000, "x,j(b)", pa10, 0},
-{ "stwm", 0x6c000000, 0xfc000000, "x,j(s,b)", pa10, 0},
-{ "ldwx", 0x0c000080, 0xfc00dfc0, "cXx(b),t", pa10, FLAG_STRICT},
-{ "ldwx", 0x0c000080, 0xfc001fc0, "cXx(s,b),t", pa10, FLAG_STRICT},
-{ "ldwx", 0x0c000080, 0xfc00d3c0, "cxccx(b),t", pa11, FLAG_STRICT},
-{ "ldwx", 0x0c000080, 0xfc0013c0, "cxccx(s,b),t", pa11, FLAG_STRICT},
-{ "ldwx", 0x0c000080, 0xfc00dfc0, "cXx(b),t", pa10, 0},
-{ "ldwx", 0x0c000080, 0xfc001fc0, "cXx(s,b),t", pa10, 0},
-{ "ldhx", 0x0c000040, 0xfc00dfc0, "cXx(b),t", pa10, FLAG_STRICT},
-{ "ldhx", 0x0c000040, 0xfc001fc0, "cXx(s,b),t", pa10, FLAG_STRICT},
-{ "ldhx", 0x0c000040, 0xfc00d3c0, "cxccx(b),t", pa11, FLAG_STRICT},
-{ "ldhx", 0x0c000040, 0xfc0013c0, "cxccx(s,b),t", pa11, FLAG_STRICT},
-{ "ldhx", 0x0c000040, 0xfc00dfc0, "cXx(b),t", pa10, 0},
-{ "ldhx", 0x0c000040, 0xfc001fc0, "cXx(s,b),t", pa10, 0},
-{ "ldbx", 0x0c000000, 0xfc00dfc0, "cXx(b),t", pa10, FLAG_STRICT},
-{ "ldbx", 0x0c000000, 0xfc001fc0, "cXx(s,b),t", pa10, FLAG_STRICT},
-{ "ldbx", 0x0c000000, 0xfc00d3c0, "cxccx(b),t", pa11, FLAG_STRICT},
-{ "ldbx", 0x0c000000, 0xfc0013c0, "cxccx(s,b),t", pa11, FLAG_STRICT},
-{ "ldbx", 0x0c000000, 0xfc00dfc0, "cXx(b),t", pa10, 0},
-{ "ldbx", 0x0c000000, 0xfc001fc0, "cXx(s,b),t", pa10, 0},
-{ "ldwa", 0x0c000180, 0xfc00dfc0, "cXx(b),t", pa10, FLAG_STRICT},
-{ "ldwa", 0x0c000180, 0xfc00d3c0, "cxccx(b),t", pa11, FLAG_STRICT},
-{ "ldwa", 0x0c0011a0, 0xfc1ff3e0, "cocc@(b),t", pa20, FLAG_STRICT},
-{ "ldwa", 0x0c001180, 0xfc00dfc0, "cM5(b),t", pa10, FLAG_STRICT},
-{ "ldwa", 0x0c001180, 0xfc00d3c0, "cmcc5(b),t", pa11, FLAG_STRICT},
-{ "ldcw", 0x0c0001c0, 0xfc00dfc0, "cXx(b),t", pa10, FLAG_STRICT},
-{ "ldcw", 0x0c0001c0, 0xfc001fc0, "cXx(s,b),t", pa10, FLAG_STRICT},
-{ "ldcw", 0x0c0001c0, 0xfc00d3c0, "cxcdx(b),t", pa11, FLAG_STRICT},
-{ "ldcw", 0x0c0001c0, 0xfc0013c0, "cxcdx(s,b),t", pa11, FLAG_STRICT},
-{ "ldcw", 0x0c0011c0, 0xfc00dfc0, "cM5(b),t", pa10, FLAG_STRICT},
-{ "ldcw", 0x0c0011c0, 0xfc001fc0, "cM5(s,b),t", pa10, FLAG_STRICT},
-{ "ldcw", 0x0c0011c0, 0xfc00d3c0, "cmcd5(b),t", pa11, FLAG_STRICT},
-{ "ldcw", 0x0c0011c0, 0xfc0013c0, "cmcd5(s,b),t", pa11, FLAG_STRICT},
-{ "stwa", 0x0c0013a0, 0xfc00d3ff, "cocCx,@(b)", pa20, FLAG_STRICT},
-{ "stwa", 0x0c001380, 0xfc00dfc0, "cMx,V(b)", pa10, FLAG_STRICT},
-{ "stwa", 0x0c001380, 0xfc00d3c0, "cmcCx,V(b)", pa11, FLAG_STRICT},
-{ "stby", 0x0c001300, 0xfc00dfc0, "cAx,V(b)", pa10, FLAG_STRICT},
-{ "stby", 0x0c001300, 0xfc001fc0, "cAx,V(s,b)", pa10, FLAG_STRICT},
-{ "stby", 0x0c001300, 0xfc00d3c0, "cscCx,V(b)", pa11, FLAG_STRICT},
-{ "stby", 0x0c001300, 0xfc0013c0, "cscCx,V(s,b)", pa11, FLAG_STRICT},
-{ "ldda", 0x0c000100, 0xfc00d3c0, "cxccx(b),t", pa20, FLAG_STRICT},
-{ "ldda", 0x0c001120, 0xfc1ff3e0, "cocc@(b),t", pa20, FLAG_STRICT},
-{ "ldda", 0x0c001100, 0xfc00d3c0, "cmcc5(b),t", pa20, FLAG_STRICT},
-{ "ldcd", 0x0c000140, 0xfc00d3c0, "cxcdx(b),t", pa20, FLAG_STRICT},
-{ "ldcd", 0x0c000140, 0xfc0013c0, "cxcdx(s,b),t", pa20, FLAG_STRICT},
-{ "ldcd", 0x0c001140, 0xfc00d3c0, "cmcd5(b),t", pa20, FLAG_STRICT},
-{ "ldcd", 0x0c001140, 0xfc0013c0, "cmcd5(s,b),t", pa20, FLAG_STRICT},
-{ "stda", 0x0c0013e0, 0xfc00f3ff, "cocCx,@(b)", pa20, FLAG_STRICT},
-{ "stda", 0x0c0013c0, 0xfc00d3c0, "cmcCx,V(b)", pa20, FLAG_STRICT},
-{ "ldwax", 0x0c000180, 0xfc00dfc0, "cXx(b),t", pa10, FLAG_STRICT},
-{ "ldwax", 0x0c000180, 0xfc00d3c0, "cxccx(b),t", pa11, FLAG_STRICT},
-{ "ldwax", 0x0c000180, 0xfc00dfc0, "cXx(b),t", pa10, 0},
-{ "ldcwx", 0x0c0001c0, 0xfc00dfc0, "cXx(b),t", pa10, FLAG_STRICT},
-{ "ldcwx", 0x0c0001c0, 0xfc001fc0, "cXx(s,b),t", pa10, FLAG_STRICT},
-{ "ldcwx", 0x0c0001c0, 0xfc00d3c0, "cxcdx(b),t", pa11, FLAG_STRICT},
-{ "ldcwx", 0x0c0001c0, 0xfc0013c0, "cxcdx(s,b),t", pa11, FLAG_STRICT},
-{ "ldcwx", 0x0c0001c0, 0xfc00dfc0, "cXx(b),t", pa10, 0},
-{ "ldcwx", 0x0c0001c0, 0xfc001fc0, "cXx(s,b),t", pa10, 0},
-{ "ldws", 0x0c001080, 0xfc00dfc0, "cM5(b),t", pa10, FLAG_STRICT},
-{ "ldws", 0x0c001080, 0xfc001fc0, "cM5(s,b),t", pa10, FLAG_STRICT},
-{ "ldws", 0x0c001080, 0xfc00d3c0, "cmcc5(b),t", pa11, FLAG_STRICT},
-{ "ldws", 0x0c001080, 0xfc0013c0, "cmcc5(s,b),t", pa11, FLAG_STRICT},
-{ "ldws", 0x0c001080, 0xfc00dfc0, "cM5(b),t", pa10, 0},
-{ "ldws", 0x0c001080, 0xfc001fc0, "cM5(s,b),t", pa10, 0},
-{ "ldhs", 0x0c001040, 0xfc00dfc0, "cM5(b),t", pa10, FLAG_STRICT},
-{ "ldhs", 0x0c001040, 0xfc001fc0, "cM5(s,b),t", pa10, FLAG_STRICT},
-{ "ldhs", 0x0c001040, 0xfc00d3c0, "cmcc5(b),t", pa11, FLAG_STRICT},
-{ "ldhs", 0x0c001040, 0xfc0013c0, "cmcc5(s,b),t", pa11, FLAG_STRICT},
-{ "ldhs", 0x0c001040, 0xfc00dfc0, "cM5(b),t", pa10, 0},
-{ "ldhs", 0x0c001040, 0xfc001fc0, "cM5(s,b),t", pa10, 0},
-{ "ldbs", 0x0c001000, 0xfc00dfc0, "cM5(b),t", pa10, FLAG_STRICT},
-{ "ldbs", 0x0c001000, 0xfc001fc0, "cM5(s,b),t", pa10, FLAG_STRICT},
-{ "ldbs", 0x0c001000, 0xfc00d3c0, "cmcc5(b),t", pa11, FLAG_STRICT},
-{ "ldbs", 0x0c001000, 0xfc0013c0, "cmcc5(s,b),t", pa11, FLAG_STRICT},
-{ "ldbs", 0x0c001000, 0xfc00dfc0, "cM5(b),t", pa10, 0},
-{ "ldbs", 0x0c001000, 0xfc001fc0, "cM5(s,b),t", pa10, 0},
-{ "ldwas", 0x0c001180, 0xfc00dfc0, "cM5(b),t", pa10, FLAG_STRICT},
-{ "ldwas", 0x0c001180, 0xfc00d3c0, "cmcc5(b),t", pa11, FLAG_STRICT},
-{ "ldwas", 0x0c001180, 0xfc00dfc0, "cM5(b),t", pa10, 0},
-{ "ldcws", 0x0c0011c0, 0xfc00dfc0, "cM5(b),t", pa10, FLAG_STRICT},
-{ "ldcws", 0x0c0011c0, 0xfc001fc0, "cM5(s,b),t", pa10, FLAG_STRICT},
-{ "ldcws", 0x0c0011c0, 0xfc00d3c0, "cmcd5(b),t", pa11, FLAG_STRICT},
-{ "ldcws", 0x0c0011c0, 0xfc0013c0, "cmcd5(s,b),t", pa11, FLAG_STRICT},
-{ "ldcws", 0x0c0011c0, 0xfc00dfc0, "cM5(b),t", pa10, 0},
-{ "ldcws", 0x0c0011c0, 0xfc001fc0, "cM5(s,b),t", pa10, 0},
-{ "stws", 0x0c001280, 0xfc00dfc0, "cMx,V(b)", pa10, FLAG_STRICT},
-{ "stws", 0x0c001280, 0xfc001fc0, "cMx,V(s,b)", pa10, FLAG_STRICT},
-{ "stws", 0x0c001280, 0xfc00d3c0, "cmcCx,V(b)", pa11, FLAG_STRICT},
-{ "stws", 0x0c001280, 0xfc0013c0, "cmcCx,V(s,b)", pa11, FLAG_STRICT},
-{ "stws", 0x0c001280, 0xfc00dfc0, "cMx,V(b)", pa10, 0},
-{ "stws", 0x0c001280, 0xfc001fc0, "cMx,V(s,b)", pa10, 0},
-{ "sths", 0x0c001240, 0xfc00dfc0, "cMx,V(b)", pa10, FLAG_STRICT},
-{ "sths", 0x0c001240, 0xfc001fc0, "cMx,V(s,b)", pa10, FLAG_STRICT},
-{ "sths", 0x0c001240, 0xfc00d3c0, "cmcCx,V(b)", pa11, FLAG_STRICT},
-{ "sths", 0x0c001240, 0xfc0013c0, "cmcCx,V(s,b)", pa11, FLAG_STRICT},
-{ "sths", 0x0c001240, 0xfc00dfc0, "cMx,V(b)", pa10, 0},
-{ "sths", 0x0c001240, 0xfc001fc0, "cMx,V(s,b)", pa10, 0},
-{ "stbs", 0x0c001200, 0xfc00dfc0, "cMx,V(b)", pa10, FLAG_STRICT},
-{ "stbs", 0x0c001200, 0xfc001fc0, "cMx,V(s,b)", pa10, FLAG_STRICT},
-{ "stbs", 0x0c001200, 0xfc00d3c0, "cmcCx,V(b)", pa11, FLAG_STRICT},
-{ "stbs", 0x0c001200, 0xfc0013c0, "cmcCx,V(s,b)", pa11, FLAG_STRICT},
-{ "stbs", 0x0c001200, 0xfc00dfc0, "cMx,V(b)", pa10, 0},
-{ "stbs", 0x0c001200, 0xfc001fc0, "cMx,V(s,b)", pa10, 0},
-{ "stwas", 0x0c001380, 0xfc00dfc0, "cMx,V(b)", pa10, FLAG_STRICT},
-{ "stwas", 0x0c001380, 0xfc00d3c0, "cmcCx,V(b)", pa11, FLAG_STRICT},
-{ "stwas", 0x0c001380, 0xfc00dfc0, "cMx,V(b)", pa10, 0},
-{ "stdby", 0x0c001340, 0xfc00d3c0, "cscCx,V(b)", pa20, FLAG_STRICT},
-{ "stdby", 0x0c001340, 0xfc0013c0, "cscCx,V(s,b)", pa20, FLAG_STRICT},
-{ "stbys", 0x0c001300, 0xfc00dfc0, "cAx,V(b)", pa10, FLAG_STRICT},
-{ "stbys", 0x0c001300, 0xfc001fc0, "cAx,V(s,b)", pa10, FLAG_STRICT},
-{ "stbys", 0x0c001300, 0xfc00d3c0, "cscCx,V(b)", pa11, FLAG_STRICT},
-{ "stbys", 0x0c001300, 0xfc0013c0, "cscCx,V(s,b)", pa11, FLAG_STRICT},
-{ "stbys", 0x0c001300, 0xfc00dfc0, "cAx,V(b)", pa10, 0},
-{ "stbys", 0x0c001300, 0xfc001fc0, "cAx,V(s,b)", pa10, 0},
-
-/* Immediate instructions. */
-{ "ldo", 0x34000000, 0xfc000000, "l(b),x", pa20w, 0},
-{ "ldo", 0x34000000, 0xfc00c000, "j(b),x", pa10, 0},
-{ "ldil", 0x20000000, 0xfc000000, "k,b", pa10, 0},
-{ "addil", 0x28000000, 0xfc000000, "k,b,Z", pa10, 0},
-{ "addil", 0x28000000, 0xfc000000, "k,b", pa10, 0},
-
-/* Branching instructions. */
-{ "b", 0xe8008000, 0xfc00e000, "cpnXL", pa20, FLAG_STRICT},
-{ "b", 0xe800a000, 0xfc00e000, "clnXL", pa20, FLAG_STRICT},
-{ "b", 0xe8000000, 0xfc00e000, "clnW,b", pa10, FLAG_STRICT},
-{ "b", 0xe8002000, 0xfc00e000, "cgnW,b", pa10, FLAG_STRICT},
-{ "b", 0xe8000000, 0xffe0e000, "nW", pa10, 0}, /* b,l foo,r0 */
-{ "bl", 0xe8000000, 0xfc00e000, "nW,b", pa10, 0},
-{ "gate", 0xe8002000, 0xfc00e000, "nW,b", pa10, 0},
-{ "blr", 0xe8004000, 0xfc00e001, "nx,b", pa10, 0},
-{ "bv", 0xe800c000, 0xfc00fffd, "nx(b)", pa10, 0},
-{ "bv", 0xe800c000, 0xfc00fffd, "n(b)", pa10, 0},
-{ "bve", 0xe800f001, 0xfc1ffffd, "cpn(b)L", pa20, FLAG_STRICT},
-{ "bve", 0xe800f000, 0xfc1ffffd, "cln(b)L", pa20, FLAG_STRICT},
-{ "bve", 0xe800d001, 0xfc1ffffd, "cPn(b)", pa20, FLAG_STRICT},
-{ "bve", 0xe800d000, 0xfc1ffffd, "n(b)", pa20, FLAG_STRICT},
-{ "be", 0xe4000000, 0xfc000000, "clnz(S,b),Y", pa10, FLAG_STRICT},
-{ "be", 0xe4000000, 0xfc000000, "clnz(b),Y", pa10, FLAG_STRICT},
-{ "be", 0xe0000000, 0xfc000000, "nz(S,b)", pa10, 0},
-{ "be", 0xe0000000, 0xfc000000, "nz(b)", pa10, 0},
-{ "ble", 0xe4000000, 0xfc000000, "nz(S,b)", pa10, 0},
-{ "movb", 0xc8000000, 0xfc000000, "?ynx,b,w", pa10, 0},
-{ "movib", 0xcc000000, 0xfc000000, "?yn5,b,w", pa10, 0},
-{ "combt", 0x80000000, 0xfc000000, "?tnx,b,w", pa10, 0},
-{ "combf", 0x88000000, 0xfc000000, "?tnx,b,w", pa10, 0},
-{ "comibt", 0x84000000, 0xfc000000, "?tn5,b,w", pa10, 0},
-{ "comibf", 0x8c000000, 0xfc000000, "?tn5,b,w", pa10, 0},
-{ "addbt", 0xa0000000, 0xfc000000, "?dnx,b,w", pa10, 0},
-{ "addbf", 0xa8000000, 0xfc000000, "?dnx,b,w", pa10, 0},
-{ "addibt", 0xa4000000, 0xfc000000, "?dn5,b,w", pa10, 0},
-{ "addibf", 0xac000000, 0xfc000000, "?dn5,b,w", pa10, 0},
-{ "bb", 0xc0004000, 0xffe06000, "?bnx,!,w", pa10, FLAG_STRICT},
-{ "bb", 0xc0006000, 0xffe06000, "?Bnx,!,w", pa20, FLAG_STRICT},
-{ "bb", 0xc4004000, 0xfc006000, "?bnx,Q,w", pa10, FLAG_STRICT},
-{ "bb", 0xc4004000, 0xfc004000, "?Bnx,B,w", pa20, FLAG_STRICT},
-{ "bvb", 0xc0004000, 0xffe04000, "?bnx,w", pa10, 0},
-{ "clrbts", 0xe8004005, 0xffffffff, "", pa20, FLAG_STRICT},
-{ "popbts", 0xe8004005, 0xfffff007, "$", pa20, FLAG_STRICT},
-{ "pushnom", 0xe8004001, 0xffffffff, "", pa20, FLAG_STRICT},
-{ "pushbts", 0xe8004001, 0xffe0ffff, "x", pa20, FLAG_STRICT},
-
-/* Computation Instructions. */
-
-{ "cmpclr", 0x080008a0, 0xfc000fe0, "?Sx,b,t", pa20, FLAG_STRICT},
-{ "cmpclr", 0x08000880, 0xfc000fe0, "?sx,b,t", pa10, FLAG_STRICT},
-{ "comclr", 0x08000880, 0xfc000fe0, "?sx,b,t", pa10, 0},
-{ "or", 0x08000260, 0xfc000fe0, "?Lx,b,t", pa20, FLAG_STRICT},
-{ "or", 0x08000240, 0xfc000fe0, "?lx,b,t", pa10, 0},
-{ "xor", 0x080002a0, 0xfc000fe0, "?Lx,b,t", pa20, FLAG_STRICT},
-{ "xor", 0x08000280, 0xfc000fe0, "?lx,b,t", pa10, 0},
-{ "and", 0x08000220, 0xfc000fe0, "?Lx,b,t", pa20, FLAG_STRICT},
-{ "and", 0x08000200, 0xfc000fe0, "?lx,b,t", pa10, 0},
-{ "andcm", 0x08000020, 0xfc000fe0, "?Lx,b,t", pa20, FLAG_STRICT},
-{ "andcm", 0x08000000, 0xfc000fe0, "?lx,b,t", pa10, 0},
-{ "uxor", 0x080003a0, 0xfc000fe0, "?Ux,b,t", pa20, FLAG_STRICT},
-{ "uxor", 0x08000380, 0xfc000fe0, "?ux,b,t", pa10, 0},
-{ "uaddcm", 0x080009a0, 0xfc000fa0, "cT?Ux,b,t", pa20, FLAG_STRICT},
-{ "uaddcm", 0x08000980, 0xfc000fa0, "cT?ux,b,t", pa10, FLAG_STRICT},
-{ "uaddcm", 0x08000980, 0xfc000fe0, "?ux,b,t", pa10, 0},
-{ "uaddcmt", 0x080009c0, 0xfc000fe0, "?ux,b,t", pa10, 0},
-{ "dcor", 0x08000ba0, 0xfc1f0fa0, "ci?Ub,t", pa20, FLAG_STRICT},
-{ "dcor", 0x08000b80, 0xfc1f0fa0, "ci?ub,t", pa10, FLAG_STRICT},
-{ "dcor", 0x08000b80, 0xfc1f0fe0, "?ub,t", pa10, 0},
-{ "idcor", 0x08000bc0, 0xfc1f0fe0, "?ub,t", pa10, 0},
-{ "addi", 0xb0000000, 0xfc000000, "ct?ai,b,x", pa10, FLAG_STRICT},
-{ "addi", 0xb4000000, 0xfc000000, "cv?ai,b,x", pa10, FLAG_STRICT},
-{ "addi", 0xb4000000, 0xfc000800, "?ai,b,x", pa10, 0},
-{ "addio", 0xb4000800, 0xfc000800, "?ai,b,x", pa10, 0},
-{ "addit", 0xb0000000, 0xfc000800, "?ai,b,x", pa10, 0},
-{ "addito", 0xb0000800, 0xfc000800, "?ai,b,x", pa10, 0},
-{ "add", 0x08000720, 0xfc0007e0, "cY?Ax,b,t", pa20, FLAG_STRICT},
-{ "add", 0x08000700, 0xfc0007e0, "cy?ax,b,t", pa10, FLAG_STRICT},
-{ "add", 0x08000220, 0xfc0003e0, "ca?Ax,b,t", pa20, FLAG_STRICT},
-{ "add", 0x08000200, 0xfc0003e0, "ca?ax,b,t", pa10, FLAG_STRICT},
-{ "add", 0x08000600, 0xfc000fe0, "?ax,b,t", pa10, 0},
-{ "addl", 0x08000a00, 0xfc000fe0, "?ax,b,t", pa10, 0},
-{ "addo", 0x08000e00, 0xfc000fe0, "?ax,b,t", pa10, 0},
-{ "addc", 0x08000700, 0xfc000fe0, "?ax,b,t", pa10, 0},
-{ "addco", 0x08000f00, 0xfc000fe0, "?ax,b,t", pa10, 0},
-{ "sub", 0x080004e0, 0xfc0007e0, "ct?Sx,b,t", pa20, FLAG_STRICT},
-{ "sub", 0x080004c0, 0xfc0007e0, "ct?sx,b,t", pa10, FLAG_STRICT},
-{ "sub", 0x08000520, 0xfc0007e0, "cB?Sx,b,t", pa20, FLAG_STRICT},
-{ "sub", 0x08000500, 0xfc0007e0, "cb?sx,b,t", pa10, FLAG_STRICT},
-{ "sub", 0x08000420, 0xfc0007e0, "cv?Sx,b,t", pa20, FLAG_STRICT},
-{ "sub", 0x08000400, 0xfc0007e0, "cv?sx,b,t", pa10, FLAG_STRICT},
-{ "sub", 0x08000400, 0xfc000fe0, "?sx,b,t", pa10, 0},
-{ "subo", 0x08000c00, 0xfc000fe0, "?sx,b,t", pa10, 0},
-{ "subb", 0x08000500, 0xfc000fe0, "?sx,b,t", pa10, 0},
-{ "subbo", 0x08000d00, 0xfc000fe0, "?sx,b,t", pa10, 0},
-{ "subt", 0x080004c0, 0xfc000fe0, "?sx,b,t", pa10, 0},
-{ "subto", 0x08000cc0, 0xfc000fe0, "?sx,b,t", pa10, 0},
-{ "ds", 0x08000440, 0xfc000fe0, "?sx,b,t", pa10, 0},
-{ "subi", 0x94000000, 0xfc000000, "cv?si,b,x", pa10, FLAG_STRICT},
-{ "subi", 0x94000000, 0xfc000800, "?si,b,x", pa10, 0},
-{ "subio", 0x94000800, 0xfc000800, "?si,b,x", pa10, 0},
-{ "cmpiclr", 0x90000800, 0xfc000800, "?Si,b,x", pa20, FLAG_STRICT},
-{ "cmpiclr", 0x90000000, 0xfc000800, "?si,b,x", pa10, FLAG_STRICT},
-{ "comiclr", 0x90000000, 0xfc000800, "?si,b,x", pa10, 0},
-{ "shladd", 0x08000220, 0xfc000320, "ca?Ax,.,b,t", pa20, FLAG_STRICT},
-{ "shladd", 0x08000200, 0xfc000320, "ca?ax,.,b,t", pa10, FLAG_STRICT},
-{ "sh1add", 0x08000640, 0xfc000fe0, "?ax,b,t", pa10, 0},
-{ "sh1addl", 0x08000a40, 0xfc000fe0, "?ax,b,t", pa10, 0},
-{ "sh1addo", 0x08000e40, 0xfc000fe0, "?ax,b,t", pa10, 0},
-{ "sh2add", 0x08000680, 0xfc000fe0, "?ax,b,t", pa10, 0},
-{ "sh2addl", 0x08000a80, 0xfc000fe0, "?ax,b,t", pa10, 0},
-{ "sh2addo", 0x08000e80, 0xfc000fe0, "?ax,b,t", pa10, 0},
-{ "sh3add", 0x080006c0, 0xfc000fe0, "?ax,b,t", pa10, 0},
-{ "sh3addl", 0x08000ac0, 0xfc000fe0, "?ax,b,t", pa10, 0},
-{ "sh3addo", 0x08000ec0, 0xfc000fe0, "?ax,b,t", pa10, 0},
-
-/* Subword Operation Instructions. */
-
-{ "hadd", 0x08000300, 0xfc00ff20, "cHx,b,t", pa20, FLAG_STRICT},
-{ "havg", 0x080002c0, 0xfc00ffe0, "x,b,t", pa20, FLAG_STRICT},
-{ "hshl", 0xf8008800, 0xffe0fc20, "x,*,t", pa20, FLAG_STRICT},
-{ "hshladd", 0x08000700, 0xfc00ff20, "x,.,b,t", pa20, FLAG_STRICT},
-{ "hshr", 0xf800c800, 0xfc1ff820, "cSb,*,t", pa20, FLAG_STRICT},
-{ "hshradd", 0x08000500, 0xfc00ff20, "x,.,b,t", pa20, FLAG_STRICT},
-{ "hsub", 0x08000100, 0xfc00ff20, "cHx,b,t", pa20, FLAG_STRICT},
-{ "mixh", 0xf8008400, 0xfc009fe0, "chx,b,t", pa20, FLAG_STRICT},
-{ "mixw", 0xf8008000, 0xfc009fe0, "chx,b,t", pa20, FLAG_STRICT},
-{ "permh", 0xf8000000, 0xfc009020, "c*a,t", pa20, FLAG_STRICT},
-
-
-/* Extract and Deposit Instructions. */
-
-{ "shrpd", 0xd0000200, 0xfc001fe0, "?Xx,b,!,t", pa20, FLAG_STRICT},
-{ "shrpd", 0xd0000400, 0xfc001400, "?Xx,b,~,t", pa20, FLAG_STRICT},
-{ "shrpw", 0xd0000000, 0xfc001fe0, "?xx,b,!,t", pa10, FLAG_STRICT},
-{ "shrpw", 0xd0000800, 0xfc001c00, "?xx,b,p,t", pa10, FLAG_STRICT},
-{ "vshd", 0xd0000000, 0xfc001fe0, "?xx,b,t", pa10, 0},
-{ "shd", 0xd0000800, 0xfc001c00, "?xx,b,p,t", pa10, 0},
-{ "extrd", 0xd0001200, 0xfc001ae0, "cS?Xb,!,%,x", pa20, FLAG_STRICT},
-{ "extrd", 0xd8000000, 0xfc000000, "cS?Xb,q,|,x", pa20, FLAG_STRICT},
-{ "extrw", 0xd0001000, 0xfc001be0, "cS?xb,!,T,x", pa10, FLAG_STRICT},
-{ "extrw", 0xd0001800, 0xfc001800, "cS?xb,P,T,x", pa10, FLAG_STRICT},
-{ "vextru", 0xd0001000, 0xfc001fe0, "?xb,T,x", pa10, 0},
-{ "vextrs", 0xd0001400, 0xfc001fe0, "?xb,T,x", pa10, 0},
-{ "extru", 0xd0001800, 0xfc001c00, "?xb,P,T,x", pa10, 0},
-{ "extrs", 0xd0001c00, 0xfc001c00, "?xb,P,T,x", pa10, 0},
-{ "depd", 0xd4000200, 0xfc001ae0, "cz?Xx,!,%,b", pa20, FLAG_STRICT},
-{ "depd", 0xf0000000, 0xfc000000, "cz?Xx,~,|,b", pa20, FLAG_STRICT},
-{ "depdi", 0xd4001200, 0xfc001ae0, "cz?X5,!,%,b", pa20, FLAG_STRICT},
-{ "depdi", 0xf4000000, 0xfc000000, "cz?X5,~,|,b", pa20, FLAG_STRICT},
-{ "depw", 0xd4000000, 0xfc001be0, "cz?xx,!,T,b", pa10, FLAG_STRICT},
-{ "depw", 0xd4000800, 0xfc001800, "cz?xx,p,T,b", pa10, FLAG_STRICT},
-{ "depwi", 0xd4001000, 0xfc001be0, "cz?x5,!,T,b", pa10, FLAG_STRICT},
-{ "depwi", 0xd4001800, 0xfc001800, "cz?x5,p,T,b", pa10, FLAG_STRICT},
-{ "zvdep", 0xd4000000, 0xfc001fe0, "?xx,T,b", pa10, 0},
-{ "vdep", 0xd4000400, 0xfc001fe0, "?xx,T,b", pa10, 0},
-{ "zdep", 0xd4000800, 0xfc001c00, "?xx,p,T,b", pa10, 0},
-{ "dep", 0xd4000c00, 0xfc001c00, "?xx,p,T,b", pa10, 0},
-{ "zvdepi", 0xd4001000, 0xfc001fe0, "?x5,T,b", pa10, 0},
-{ "vdepi", 0xd4001400, 0xfc001fe0, "?x5,T,b", pa10, 0},
-{ "zdepi", 0xd4001800, 0xfc001c00, "?x5,p,T,b", pa10, 0},
-{ "depi", 0xd4001c00, 0xfc001c00, "?x5,p,T,b", pa10, 0},
-
-/* System Control Instructions. */
-
-{ "break", 0x00000000, 0xfc001fe0, "r,A", pa10, 0},
-{ "rfi", 0x00000c00, 0xffffff1f, "cr", pa10, FLAG_STRICT},
-{ "rfi", 0x00000c00, 0xffffffff, "", pa10, 0},
-{ "rfir", 0x00000ca0, 0xffffffff, "", pa11, 0},
-{ "ssm", 0x00000d60, 0xfc00ffe0, "U,t", pa20, FLAG_STRICT},
-{ "ssm", 0x00000d60, 0xffe0ffe0, "R,t", pa10, 0},
-{ "rsm", 0x00000e60, 0xfc00ffe0, "U,t", pa20, FLAG_STRICT},
-{ "rsm", 0x00000e60, 0xffe0ffe0, "R,t", pa10, 0},
-{ "mtsm", 0x00001860, 0xffe0ffff, "x", pa10, 0},
-{ "ldsid", 0x000010a0, 0xfc1fffe0, "(b),t", pa10, 0},
-{ "ldsid", 0x000010a0, 0xfc1f3fe0, "(s,b),t", pa10, 0},
-{ "mtsp", 0x00001820, 0xffe01fff, "x,S", pa10, 0},
-{ "mtctl", 0x00001840, 0xfc00ffff, "x,^", pa10, 0},
-{ "mtsarcm", 0x016018C0, 0xffe0ffff, "x", pa20, FLAG_STRICT},
-{ "mfia", 0x000014A0, 0xffffffe0, "t", pa20, FLAG_STRICT},
-{ "mfsp", 0x000004a0, 0xffff1fe0, "S,t", pa10, 0},
-{ "mfctl", 0x016048a0, 0xffffffe0, "cW!,t", pa20, FLAG_STRICT},
-{ "mfctl", 0x000008a0, 0xfc1fffe0, "^,t", pa10, 0},
-{ "sync", 0x00000400, 0xffffffff, "", pa10, 0},
-{ "syncdma", 0x00100400, 0xffffffff, "", pa10, 0},
-{ "probe", 0x04001180, 0xfc00ffa0, "cw(b),x,t", pa10, FLAG_STRICT},
-{ "probe", 0x04001180, 0xfc003fa0, "cw(s,b),x,t", pa10, FLAG_STRICT},
-{ "probei", 0x04003180, 0xfc00ffa0, "cw(b),R,t", pa10, FLAG_STRICT},
-{ "probei", 0x04003180, 0xfc003fa0, "cw(s,b),R,t", pa10, FLAG_STRICT},
-{ "prober", 0x04001180, 0xfc00ffe0, "(b),x,t", pa10, 0},
-{ "prober", 0x04001180, 0xfc003fe0, "(s,b),x,t", pa10, 0},
-{ "proberi", 0x04003180, 0xfc00ffe0, "(b),R,t", pa10, 0},
-{ "proberi", 0x04003180, 0xfc003fe0, "(s,b),R,t", pa10, 0},
-{ "probew", 0x040011c0, 0xfc00ffe0, "(b),x,t", pa10, 0},
-{ "probew", 0x040011c0, 0xfc003fe0, "(s,b),x,t", pa10, 0},
-{ "probewi", 0x040031c0, 0xfc00ffe0, "(b),R,t", pa10, 0},
-{ "probewi", 0x040031c0, 0xfc003fe0, "(s,b),R,t", pa10, 0},
-{ "lpa", 0x04001340, 0xfc00ffc0, "cZx(b),t", pa10, 0},
-{ "lpa", 0x04001340, 0xfc003fc0, "cZx(s,b),t", pa10, 0},
-{ "lci", 0x04001300, 0xfc00ffe0, "x(b),t", pa11, 0},
-{ "lci", 0x04001300, 0xfc003fe0, "x(s,b),t", pa11, 0},
-{ "pdtlb", 0x04001600, 0xfc00ffdf, "cLcZx(b)", pa20, FLAG_STRICT},
-{ "pdtlb", 0x04001600, 0xfc003fdf, "cLcZx(s,b)", pa20, FLAG_STRICT},
-{ "pdtlb", 0x04001600, 0xfc1fffdf, "cLcZ@(b)", pa20, FLAG_STRICT},
-{ "pdtlb", 0x04001600, 0xfc1f3fdf, "cLcZ@(s,b)", pa20, FLAG_STRICT},
-{ "pdtlb", 0x04001200, 0xfc00ffdf, "cZx(b)", pa10, 0},
-{ "pdtlb", 0x04001200, 0xfc003fdf, "cZx(s,b)", pa10, 0},
-{ "pitlb", 0x04000600, 0xfc001fdf, "cLcZx(S,b)", pa20, FLAG_STRICT},
-{ "pitlb", 0x04000600, 0xfc1f1fdf, "cLcZ@(S,b)", pa20, FLAG_STRICT},
-{ "pitlb", 0x04000200, 0xfc001fdf, "cZx(S,b)", pa10, 0},
-{ "pdtlbe", 0x04001240, 0xfc00ffdf, "cZx(b)", pa10, 0},
-{ "pdtlbe", 0x04001240, 0xfc003fdf, "cZx(s,b)", pa10, 0},
-{ "pitlbe", 0x04000240, 0xfc001fdf, "cZx(S,b)", pa10, 0},
-{ "idtlba", 0x04001040, 0xfc00ffff, "x,(b)", pa10, 0},
-{ "idtlba", 0x04001040, 0xfc003fff, "x,(s,b)", pa10, 0},
-{ "iitlba", 0x04000040, 0xfc001fff, "x,(S,b)", pa10, 0},
-{ "idtlbp", 0x04001000, 0xfc00ffff, "x,(b)", pa10, 0},
-{ "idtlbp", 0x04001000, 0xfc003fff, "x,(s,b)", pa10, 0},
-{ "iitlbp", 0x04000000, 0xfc001fff, "x,(S,b)", pa10, 0},
-{ "pdc", 0x04001380, 0xfc00ffdf, "cZx(b)", pa10, 0},
-{ "pdc", 0x04001380, 0xfc003fdf, "cZx(s,b)", pa10, 0},
-{ "fdc", 0x04001280, 0xfc00ffdf, "cZx(b)", pa10, FLAG_STRICT},
-{ "fdc", 0x04001280, 0xfc003fdf, "cZx(s,b)", pa10, FLAG_STRICT},
-{ "fdc", 0x04003280, 0xfc00ffff, "5(b)", pa20, FLAG_STRICT},
-{ "fdc", 0x04003280, 0xfc003fff, "5(s,b)", pa20, FLAG_STRICT},
-{ "fdc", 0x04001280, 0xfc00ffdf, "cZx(b)", pa10, 0},
-{ "fdc", 0x04001280, 0xfc003fdf, "cZx(s,b)", pa10, 0},
-{ "fic", 0x040013c0, 0xfc00dfdf, "cZx(b)", pa20, FLAG_STRICT},
-{ "fic", 0x04000280, 0xfc001fdf, "cZx(S,b)", pa10, 0},
-{ "fdce", 0x040012c0, 0xfc00ffdf, "cZx(b)", pa10, 0},
-{ "fdce", 0x040012c0, 0xfc003fdf, "cZx(s,b)", pa10, 0},
-{ "fice", 0x040002c0, 0xfc001fdf, "cZx(S,b)", pa10, 0},
-{ "diag", 0x14000000, 0xfc000000, "D", pa10, 0},
-{ "idtlbt", 0x04001800, 0xfc00ffff, "x,b", pa20, FLAG_STRICT},
-{ "iitlbt", 0x04000800, 0xfc00ffff, "x,b", pa20, FLAG_STRICT},
-
-/* These may be specific to certain versions of the PA. Joel claimed
- they were 72000 (7200?) specific. However, I'm almost certain the
- mtcpu/mfcpu were undocumented, but available in the older 700 machines. */
-{ "mtcpu", 0x14001600, 0xfc00ffff, "x,^", pa10, 0},
-{ "mfcpu", 0x14001A00, 0xfc00ffff, "^,x", pa10, 0},
-{ "tocen", 0x14403600, 0xffffffff, "", pa10, 0},
-{ "tocdis", 0x14401620, 0xffffffff, "", pa10, 0},
-{ "shdwgr", 0x14402600, 0xffffffff, "", pa10, 0},
-{ "grshdw", 0x14400620, 0xffffffff, "", pa10, 0},
-
-/* gfw and gfr are not in the HP PA 1.1 manual, but they are in either
- the Timex FPU or the Mustang ERS (not sure which) manual. */
-{ "gfw", 0x04001680, 0xfc00ffdf, "cZx(b)", pa11, 0},
-{ "gfw", 0x04001680, 0xfc003fdf, "cZx(s,b)", pa11, 0},
-{ "gfr", 0x04001a80, 0xfc00ffdf, "cZx(b)", pa11, 0},
-{ "gfr", 0x04001a80, 0xfc003fdf, "cZx(s,b)", pa11, 0},
-
-/* Floating Point Coprocessor Instructions. */
-
-{ "fldw", 0x24000000, 0xfc00df80, "cXx(b),fT", pa10, FLAG_STRICT},
-{ "fldw", 0x24000000, 0xfc001f80, "cXx(s,b),fT", pa10, FLAG_STRICT},
-{ "fldw", 0x24000000, 0xfc00d380, "cxccx(b),fT", pa11, FLAG_STRICT},
-{ "fldw", 0x24000000, 0xfc001380, "cxccx(s,b),fT", pa11, FLAG_STRICT},
-{ "fldw", 0x24001020, 0xfc1ff3a0, "cocc@(b),fT", pa20, FLAG_STRICT},
-{ "fldw", 0x24001020, 0xfc1f33a0, "cocc@(s,b),fT", pa20, FLAG_STRICT},
-{ "fldw", 0x24001000, 0xfc00df80, "cM5(b),fT", pa10, FLAG_STRICT},
-{ "fldw", 0x24001000, 0xfc001f80, "cM5(s,b),fT", pa10, FLAG_STRICT},
-{ "fldw", 0x24001000, 0xfc00d380, "cmcc5(b),fT", pa11, FLAG_STRICT},
-{ "fldw", 0x24001000, 0xfc001380, "cmcc5(s,b),fT", pa11, FLAG_STRICT},
-{ "fldw", 0x5c000000, 0xfc000004, "y(b),fe", pa20w, FLAG_STRICT},
-{ "fldw", 0x58000000, 0xfc000000, "cJy(b),fe", pa20w, FLAG_STRICT},
-{ "fldw", 0x5c000000, 0xfc00c004, "d(b),fe", pa20, FLAG_STRICT},
-{ "fldw", 0x5c000000, 0xfc000004, "d(s,b),fe", pa20, FLAG_STRICT},
-{ "fldw", 0x58000000, 0xfc00c000, "cJd(b),fe", pa20, FLAG_STRICT},
-{ "fldw", 0x58000000, 0xfc000000, "cJd(s,b),fe", pa20, FLAG_STRICT},
-{ "fldd", 0x2c000000, 0xfc00dfc0, "cXx(b),ft", pa10, FLAG_STRICT},
-{ "fldd", 0x2c000000, 0xfc001fc0, "cXx(s,b),ft", pa10, FLAG_STRICT},
-{ "fldd", 0x2c000000, 0xfc00d3c0, "cxccx(b),ft", pa11, FLAG_STRICT},
-{ "fldd", 0x2c000000, 0xfc0013c0, "cxccx(s,b),ft", pa11, FLAG_STRICT},
-{ "fldd", 0x2c001020, 0xfc1ff3e0, "cocc@(b),ft", pa20, FLAG_STRICT},
-{ "fldd", 0x2c001020, 0xfc1f33e0, "cocc@(s,b),ft", pa20, FLAG_STRICT},
-{ "fldd", 0x2c001000, 0xfc00dfc0, "cM5(b),ft", pa10, FLAG_STRICT},
-{ "fldd", 0x2c001000, 0xfc001fc0, "cM5(s,b),ft", pa10, FLAG_STRICT},
-{ "fldd", 0x2c001000, 0xfc00d3c0, "cmcc5(b),ft", pa11, FLAG_STRICT},
-{ "fldd", 0x2c001000, 0xfc0013c0, "cmcc5(s,b),ft", pa11, FLAG_STRICT},
-{ "fldd", 0x50000002, 0xfc000002, "cq&(b),fx", pa20w, FLAG_STRICT},
-{ "fldd", 0x50000002, 0xfc00c002, "cq#(b),fx", pa20, FLAG_STRICT},
-{ "fldd", 0x50000002, 0xfc000002, "cq#(s,b),fx", pa20, FLAG_STRICT},
-{ "fstw", 0x24000200, 0xfc00df80, "cXfT,x(b)", pa10, FLAG_STRICT},
-{ "fstw", 0x24000200, 0xfc001f80, "cXfT,x(s,b)", pa10, FLAG_STRICT},
-{ "fstw", 0x24000200, 0xfc00d380, "cxcCfT,x(b)", pa11, FLAG_STRICT},
-{ "fstw", 0x24000200, 0xfc001380, "cxcCfT,x(s,b)", pa11, FLAG_STRICT},
-{ "fstw", 0x24001220, 0xfc1ff3a0, "cocCfT,@(b)", pa20, FLAG_STRICT},
-{ "fstw", 0x24001220, 0xfc1f33a0, "cocCfT,@(s,b)", pa20, FLAG_STRICT},
-{ "fstw", 0x24001200, 0xfc00df80, "cMfT,5(b)", pa10, FLAG_STRICT},
-{ "fstw", 0x24001200, 0xfc001f80, "cMfT,5(s,b)", pa10, FLAG_STRICT},
-{ "fstw", 0x24001200, 0xfc00df80, "cMfT,5(b)", pa10, FLAG_STRICT},
-{ "fstw", 0x24001200, 0xfc001f80, "cMfT,5(s,b)", pa10, FLAG_STRICT},
-{ "fstw", 0x7c000000, 0xfc000004, "fE,y(b)", pa20w, FLAG_STRICT},
-{ "fstw", 0x78000000, 0xfc000000, "cJfE,y(b)", pa20w, FLAG_STRICT},
-{ "fstw", 0x7c000000, 0xfc00c004, "fE,d(b)", pa20, FLAG_STRICT},
-{ "fstw", 0x7c000000, 0xfc000004, "fE,d(s,b)", pa20, FLAG_STRICT},
-{ "fstw", 0x78000000, 0xfc00c000, "cJfE,d(b)", pa20, FLAG_STRICT},
-{ "fstw", 0x78000000, 0xfc000000, "cJfE,d(s,b)", pa20, FLAG_STRICT},
-{ "fstd", 0x2c000200, 0xfc00dfc0, "cXft,x(b)", pa10, FLAG_STRICT},
-{ "fstd", 0x2c000200, 0xfc001fc0, "cXft,x(s,b)", pa10, FLAG_STRICT},
-{ "fstd", 0x2c000200, 0xfc00d3c0, "cxcCft,x(b)", pa11, FLAG_STRICT},
-{ "fstd", 0x2c000200, 0xfc0013c0, "cxcCft,x(s,b)", pa11, FLAG_STRICT},
-{ "fstd", 0x2c001220, 0xfc1ff3e0, "cocCft,@(b)", pa20, FLAG_STRICT},
-{ "fstd", 0x2c001220, 0xfc1f33e0, "cocCft,@(s,b)", pa20, FLAG_STRICT},
-{ "fstd", 0x2c001200, 0xfc00dfc0, "cMft,5(b)", pa10, FLAG_STRICT},
-{ "fstd", 0x2c001200, 0xfc001fc0, "cMft,5(s,b)", pa10, FLAG_STRICT},
-{ "fstd", 0x2c001200, 0xfc00d3c0, "cmcCft,5(b)", pa11, FLAG_STRICT},
-{ "fstd", 0x2c001200, 0xfc0013c0, "cmcCft,5(s,b)", pa11, FLAG_STRICT},
-{ "fstd", 0x70000002, 0xfc000002, "cqfx,&(b)", pa20w, FLAG_STRICT},
-{ "fstd", 0x70000002, 0xfc00c002, "cqfx,#(b)", pa20, FLAG_STRICT},
-{ "fstd", 0x70000002, 0xfc000002, "cqfx,#(s,b)", pa20, FLAG_STRICT},
-{ "fldwx", 0x24000000, 0xfc00df80, "cXx(b),fT", pa10, FLAG_STRICT},
-{ "fldwx", 0x24000000, 0xfc001f80, "cXx(s,b),fT", pa10, FLAG_STRICT},
-{ "fldwx", 0x24000000, 0xfc00d380, "cxccx(b),fT", pa11, FLAG_STRICT},
-{ "fldwx", 0x24000000, 0xfc001380, "cxccx(s,b),fT", pa11, FLAG_STRICT},
-{ "fldwx", 0x24000000, 0xfc00df80, "cXx(b),fT", pa10, 0},
-{ "fldwx", 0x24000000, 0xfc001f80, "cXx(s,b),fT", pa10, 0},
-{ "flddx", 0x2c000000, 0xfc00dfc0, "cXx(b),ft", pa10, FLAG_STRICT},
-{ "flddx", 0x2c000000, 0xfc001fc0, "cXx(s,b),ft", pa10, FLAG_STRICT},
-{ "flddx", 0x2c000000, 0xfc00d3c0, "cxccx(b),ft", pa11, FLAG_STRICT},
-{ "flddx", 0x2c000000, 0xfc0013c0, "cxccx(s,b),ft", pa11, FLAG_STRICT},
-{ "flddx", 0x2c000000, 0xfc00dfc0, "cXx(b),ft", pa10, 0},
-{ "flddx", 0x2c000000, 0xfc001fc0, "cXx(s,b),ft", pa10, 0},
-{ "fstwx", 0x24000200, 0xfc00df80, "cxfT,x(b)", pa10, FLAG_STRICT},
-{ "fstwx", 0x24000200, 0xfc001f80, "cxfT,x(s,b)", pa10, FLAG_STRICT},
-{ "fstwx", 0x24000200, 0xfc00d380, "cxcCfT,x(b)", pa11, FLAG_STRICT},
-{ "fstwx", 0x24000200, 0xfc001380, "cxcCfT,x(s,b)", pa11, FLAG_STRICT},
-{ "fstwx", 0x24000200, 0xfc00df80, "cxfT,x(b)", pa10, 0},
-{ "fstwx", 0x24000200, 0xfc001f80, "cxfT,x(s,b)", pa10, 0},
-{ "fstdx", 0x2c000200, 0xfc00dfc0, "cxft,x(b)", pa10, FLAG_STRICT},
-{ "fstdx", 0x2c000200, 0xfc001fc0, "cxft,x(s,b)", pa10, FLAG_STRICT},
-{ "fstdx", 0x2c000200, 0xfc00d3c0, "cxcCft,x(b)", pa11, FLAG_STRICT},
-{ "fstdx", 0x2c000200, 0xfc0013c0, "cxcCft,x(s,b)", pa11, FLAG_STRICT},
-{ "fstdx", 0x2c000200, 0xfc00dfc0, "cxft,x(b)", pa10, 0},
-{ "fstdx", 0x2c000200, 0xfc001fc0, "cxft,x(s,b)", pa10, 0},
-{ "fstqx", 0x3c000200, 0xfc00dfc0, "cxft,x(b)", pa10, 0},
-{ "fstqx", 0x3c000200, 0xfc001fc0, "cxft,x(s,b)", pa10, 0},
-{ "fldws", 0x24001000, 0xfc00df80, "cm5(b),fT", pa10, FLAG_STRICT},
-{ "fldws", 0x24001000, 0xfc001f80, "cm5(s,b),fT", pa10, FLAG_STRICT},
-{ "fldws", 0x24001000, 0xfc00d380, "cmcc5(b),fT", pa11, FLAG_STRICT},
-{ "fldws", 0x24001000, 0xfc001380, "cmcc5(s,b),fT", pa11, FLAG_STRICT},
-{ "fldws", 0x24001000, 0xfc00df80, "cm5(b),fT", pa10, 0},
-{ "fldws", 0x24001000, 0xfc001f80, "cm5(s,b),fT", pa10, 0},
-{ "fldds", 0x2c001000, 0xfc00dfc0, "cm5(b),ft", pa10, FLAG_STRICT},
-{ "fldds", 0x2c001000, 0xfc001fc0, "cm5(s,b),ft", pa10, FLAG_STRICT},
-{ "fldds", 0x2c001000, 0xfc00d3c0, "cmcc5(b),ft", pa11, FLAG_STRICT},
-{ "fldds", 0x2c001000, 0xfc0013c0, "cmcc5(s,b),ft", pa11, FLAG_STRICT},
-{ "fldds", 0x2c001000, 0xfc00dfc0, "cm5(b),ft", pa10, 0},
-{ "fldds", 0x2c001000, 0xfc001fc0, "cm5(s,b),ft", pa10, 0},
-{ "fstws", 0x24001200, 0xfc00df80, "cmfT,5(b)", pa10, FLAG_STRICT},
-{ "fstws", 0x24001200, 0xfc001f80, "cmfT,5(s,b)", pa10, FLAG_STRICT},
-{ "fstws", 0x24001200, 0xfc00d380, "cmcCfT,5(b)", pa11, FLAG_STRICT},
-{ "fstws", 0x24001200, 0xfc001380, "cmcCfT,5(s,b)", pa11, FLAG_STRICT},
-{ "fstws", 0x24001200, 0xfc00df80, "cmfT,5(b)", pa10, 0},
-{ "fstws", 0x24001200, 0xfc001f80, "cmfT,5(s,b)", pa10, 0},
-{ "fstds", 0x2c001200, 0xfc00dfc0, "cmft,5(b)", pa10, FLAG_STRICT},
-{ "fstds", 0x2c001200, 0xfc001fc0, "cmft,5(s,b)", pa10, FLAG_STRICT},
-{ "fstds", 0x2c001200, 0xfc00d3c0, "cmcCft,5(b)", pa11, FLAG_STRICT},
-{ "fstds", 0x2c001200, 0xfc0013c0, "cmcCft,5(s,b)", pa11, FLAG_STRICT},
-{ "fstds", 0x2c001200, 0xfc00dfc0, "cmft,5(b)", pa10, 0},
-{ "fstds", 0x2c001200, 0xfc001fc0, "cmft,5(s,b)", pa10, 0},
-{ "fstqs", 0x3c001200, 0xfc00dfc0, "cmft,5(b)", pa10, 0},
-{ "fstqs", 0x3c001200, 0xfc001fc0, "cmft,5(s,b)", pa10, 0},
-{ "fadd", 0x30000600, 0xfc00e7e0, "Ffa,fb,fT", pa10, 0},
-{ "fadd", 0x38000600, 0xfc00e720, "IfA,fB,fT", pa10, 0},
-{ "fsub", 0x30002600, 0xfc00e7e0, "Ffa,fb,fT", pa10, 0},
-{ "fsub", 0x38002600, 0xfc00e720, "IfA,fB,fT", pa10, 0},
-{ "fmpy", 0x30004600, 0xfc00e7e0, "Ffa,fb,fT", pa10, 0},
-{ "fmpy", 0x38004600, 0xfc00e720, "IfA,fB,fT", pa10, 0},
-{ "fdiv", 0x30006600, 0xfc00e7e0, "Ffa,fb,fT", pa10, 0},
-{ "fdiv", 0x38006600, 0xfc00e720, "IfA,fB,fT", pa10, 0},
-{ "fsqrt", 0x30008000, 0xfc1fe7e0, "Ffa,fT", pa10, 0},
-{ "fsqrt", 0x38008000, 0xfc1fe720, "FfA,fT", pa10, 0},
-{ "fabs", 0x30006000, 0xfc1fe7e0, "Ffa,fT", pa10, 0},
-{ "fabs", 0x38006000, 0xfc1fe720, "FfA,fT", pa10, 0},
-{ "frem", 0x30008600, 0xfc00e7e0, "Ffa,fb,fT", pa10, 0},
-{ "frem", 0x38008600, 0xfc00e720, "FfA,fB,fT", pa10, 0},
-{ "frnd", 0x3000a000, 0xfc1fe7e0, "Ffa,fT", pa10, 0},
-{ "frnd", 0x3800a000, 0xfc1fe720, "FfA,fT", pa10, 0},
-{ "fcpy", 0x30004000, 0xfc1fe7e0, "Ffa,fT", pa10, 0},
-{ "fcpy", 0x38004000, 0xfc1fe720, "FfA,fT", pa10, 0},
-{ "fcnvff", 0x30000200, 0xfc1f87e0, "FGfa,fT", pa10, 0},
-{ "fcnvff", 0x38000200, 0xfc1f8720, "FGfA,fT", pa10, 0},
-{ "fcnvxf", 0x30008200, 0xfc1f87e0, "FGfa,fT", pa10, 0},
-{ "fcnvxf", 0x38008200, 0xfc1f8720, "FGfA,fT", pa10, 0},
-{ "fcnvfx", 0x30010200, 0xfc1f87e0, "FGfa,fT", pa10, 0},
-{ "fcnvfx", 0x38010200, 0xfc1f8720, "FGfA,fT", pa10, 0},
-{ "fcnvfxt", 0x30018200, 0xfc1f87e0, "FGfa,fT", pa10, 0},
-{ "fcnvfxt", 0x38018200, 0xfc1f8720, "FGfA,fT", pa10, 0},
-{ "fmpyfadd", 0xb8000000, 0xfc000020, "IfA,fB,fC,fT", pa20, FLAG_STRICT},
-{ "fmpynfadd", 0xb8000020, 0xfc000020, "IfA,fB,fC,fT", pa20, FLAG_STRICT},
-{ "fneg", 0x3000c000, 0xfc1fe7e0, "Ffa,fT", pa20, FLAG_STRICT},
-{ "fneg", 0x3800c000, 0xfc1fe720, "IfA,fT", pa20, FLAG_STRICT},
-{ "fnegabs", 0x3000e000, 0xfc1fe7e0, "Ffa,fT", pa20, FLAG_STRICT},
-{ "fnegabs", 0x3800e000, 0xfc1fe720, "IfA,fT", pa20, FLAG_STRICT},
-{ "fcnv", 0x30000200, 0xfc1c0720, "{_fa,fT", pa20, FLAG_STRICT},
-{ "fcnv", 0x38000200, 0xfc1c0720, "FGfA,fT", pa20, FLAG_STRICT},
-{ "fcmp", 0x30000400, 0xfc00e7e0, "F?ffa,fb", pa10, FLAG_STRICT},
-{ "fcmp", 0x38000400, 0xfc00e720, "I?ffA,fB", pa10, FLAG_STRICT},
-{ "fcmp", 0x30000400, 0xfc0007e0, "F?ffa,fb,h", pa20, FLAG_STRICT},
-{ "fcmp", 0x38000400, 0xfc000720, "I?ffA,fB,h", pa20, FLAG_STRICT},
-{ "fcmp", 0x30000400, 0xfc00e7e0, "F?ffa,fb", pa10, 0},
-{ "fcmp", 0x38000400, 0xfc00e720, "I?ffA,fB", pa10, 0},
-{ "xmpyu", 0x38004700, 0xfc00e720, "fX,fB,fT", pa11, 0},
-{ "fmpyadd", 0x18000000, 0xfc000000, "Hfi,fj,fk,fl,fm", pa11, 0},
-{ "fmpysub", 0x98000000, 0xfc000000, "Hfi,fj,fk,fl,fm", pa11, 0},
-{ "ftest", 0x30002420, 0xffffffff, "", pa10, FLAG_STRICT},
-{ "ftest", 0x30002420, 0xffffffe0, ",=", pa20, FLAG_STRICT},
-{ "ftest", 0x30000420, 0xffff1fff, "m", pa20, FLAG_STRICT},
-{ "fid", 0x30000000, 0xffffffff, "", pa11, 0},
-
-/* Performance Monitor Instructions. */
-
-{ "pmdis", 0x30000280, 0xffffffdf, "N", pa20, FLAG_STRICT},
-{ "pmenb", 0x30000680, 0xffffffff, "", pa20, FLAG_STRICT},
-
-/* Assist Instructions. */
-
-{ "spop0", 0x10000000, 0xfc000600, "v,ON", pa10, 0},
-{ "spop1", 0x10000200, 0xfc000600, "v,oNt", pa10, 0},
-{ "spop2", 0x10000400, 0xfc000600, "v,1Nb", pa10, 0},
-{ "spop3", 0x10000600, 0xfc000600, "v,0Nx,b", pa10, 0},
-{ "copr", 0x30000000, 0xfc000000, "u,2N", pa10, 0},
-{ "cldw", 0x24000000, 0xfc00de00, "ucXx(b),t", pa10, FLAG_STRICT},
-{ "cldw", 0x24000000, 0xfc001e00, "ucXx(s,b),t", pa10, FLAG_STRICT},
-{ "cldw", 0x24000000, 0xfc00d200, "ucxccx(b),t", pa11, FLAG_STRICT},
-{ "cldw", 0x24000000, 0xfc001200, "ucxccx(s,b),t", pa11, FLAG_STRICT},
-{ "cldw", 0x24001000, 0xfc00d200, "ucocc@(b),t", pa20, FLAG_STRICT},
-{ "cldw", 0x24001000, 0xfc001200, "ucocc@(s,b),t", pa20, FLAG_STRICT},
-{ "cldw", 0x24001000, 0xfc00de00, "ucM5(b),t", pa10, FLAG_STRICT},
-{ "cldw", 0x24001000, 0xfc001e00, "ucM5(s,b),t", pa10, FLAG_STRICT},
-{ "cldw", 0x24001000, 0xfc00d200, "ucmcc5(b),t", pa11, FLAG_STRICT},
-{ "cldw", 0x24001000, 0xfc001200, "ucmcc5(s,b),t", pa11, FLAG_STRICT},
-{ "cldd", 0x2c000000, 0xfc00de00, "ucXx(b),t", pa10, FLAG_STRICT},
-{ "cldd", 0x2c000000, 0xfc001e00, "ucXx(s,b),t", pa10, FLAG_STRICT},
-{ "cldd", 0x2c000000, 0xfc00d200, "ucxccx(b),t", pa11, FLAG_STRICT},
-{ "cldd", 0x2c000000, 0xfc001200, "ucxccx(s,b),t", pa11, FLAG_STRICT},
-{ "cldd", 0x2c001000, 0xfc00d200, "ucocc@(b),t", pa20, FLAG_STRICT},
-{ "cldd", 0x2c001000, 0xfc001200, "ucocc@(s,b),t", pa20, FLAG_STRICT},
-{ "cldd", 0x2c001000, 0xfc00de00, "ucM5(b),t", pa10, FLAG_STRICT},
-{ "cldd", 0x2c001000, 0xfc001e00, "ucM5(s,b),t", pa10, FLAG_STRICT},
-{ "cldd", 0x2c001000, 0xfc00d200, "ucmcc5(b),t", pa11, FLAG_STRICT},
-{ "cldd", 0x2c001000, 0xfc001200, "ucmcc5(s,b),t", pa11, FLAG_STRICT},
-{ "cstw", 0x24000200, 0xfc00de00, "ucXt,x(b)", pa10, FLAG_STRICT},
-{ "cstw", 0x24000200, 0xfc001e00, "ucXt,x(s,b)", pa10, FLAG_STRICT},
-{ "cstw", 0x24000200, 0xfc00d200, "ucxcCt,x(b)", pa11, FLAG_STRICT},
-{ "cstw", 0x24000200, 0xfc001200, "ucxcCt,x(s,b)", pa11, FLAG_STRICT},
-{ "cstw", 0x24001200, 0xfc00d200, "ucocCt,@(b)", pa20, FLAG_STRICT},
-{ "cstw", 0x24001200, 0xfc001200, "ucocCt,@(s,b)", pa20, FLAG_STRICT},
-{ "cstw", 0x24001200, 0xfc00de00, "ucMt,5(b)", pa10, FLAG_STRICT},
-{ "cstw", 0x24001200, 0xfc001e00, "ucMt,5(s,b)", pa10, FLAG_STRICT},
-{ "cstw", 0x24001200, 0xfc00d200, "ucmcCt,5(b)", pa11, FLAG_STRICT},
-{ "cstw", 0x24001200, 0xfc001200, "ucmcCt,5(s,b)", pa11, FLAG_STRICT},
-{ "cstd", 0x2c000200, 0xfc00de00, "ucXt,x(b)", pa10, FLAG_STRICT},
-{ "cstd", 0x2c000200, 0xfc001e00, "ucXt,x(s,b)", pa10, FLAG_STRICT},
-{ "cstd", 0x2c000200, 0xfc00d200, "ucxcCt,x(b)", pa11, FLAG_STRICT},
-{ "cstd", 0x2c000200, 0xfc001200, "ucxcCt,x(s,b)", pa11, FLAG_STRICT},
-{ "cstd", 0x2c001200, 0xfc00d200, "ucocCt,@(b)", pa20, FLAG_STRICT},
-{ "cstd", 0x2c001200, 0xfc001200, "ucocCt,@(s,b)", pa20, FLAG_STRICT},
-{ "cstd", 0x2c001200, 0xfc00de00, "ucMt,5(b)", pa10, FLAG_STRICT},
-{ "cstd", 0x2c001200, 0xfc001e00, "ucMt,5(s,b)", pa10, FLAG_STRICT},
-{ "cstd", 0x2c001200, 0xfc00d200, "ucmcCt,5(b)", pa11, FLAG_STRICT},
-{ "cstd", 0x2c001200, 0xfc001200, "ucmcCt,5(s,b)", pa11, FLAG_STRICT},
-{ "cldwx", 0x24000000, 0xfc00de00, "ucXx(b),t", pa10, FLAG_STRICT},
-{ "cldwx", 0x24000000, 0xfc001e00, "ucXx(s,b),t", pa10, FLAG_STRICT},
-{ "cldwx", 0x24000000, 0xfc00d200, "ucxccx(b),t", pa11, FLAG_STRICT},
-{ "cldwx", 0x24000000, 0xfc001200, "ucxccx(s,b),t", pa11, FLAG_STRICT},
-{ "cldwx", 0x24000000, 0xfc00de00, "ucXx(b),t", pa10, 0},
-{ "cldwx", 0x24000000, 0xfc001e00, "ucXx(s,b),t", pa10, 0},
-{ "clddx", 0x2c000000, 0xfc00de00, "ucXx(b),t", pa10, FLAG_STRICT},
-{ "clddx", 0x2c000000, 0xfc001e00, "ucXx(s,b),t", pa10, FLAG_STRICT},
-{ "clddx", 0x2c000000, 0xfc00d200, "ucxccx(b),t", pa11, FLAG_STRICT},
-{ "clddx", 0x2c000000, 0xfc001200, "ucxccx(s,b),t", pa11, FLAG_STRICT},
-{ "clddx", 0x2c000000, 0xfc00de00, "ucXx(b),t", pa10, 0},
-{ "clddx", 0x2c000000, 0xfc001e00, "ucXx(s,b),t", pa10, 0},
-{ "cstwx", 0x24000200, 0xfc00de00, "ucXt,x(b)", pa10, FLAG_STRICT},
-{ "cstwx", 0x24000200, 0xfc001e00, "ucXt,x(s,b)", pa10, FLAG_STRICT},
-{ "cstwx", 0x24000200, 0xfc00d200, "ucxcCt,x(b)", pa11, FLAG_STRICT},
-{ "cstwx", 0x24000200, 0xfc001200, "ucxcCt,x(s,b)", pa11, FLAG_STRICT},
-{ "cstwx", 0x24000200, 0xfc00de00, "ucXt,x(b)", pa10, 0},
-{ "cstwx", 0x24000200, 0xfc001e00, "ucXt,x(s,b)", pa10, 0},
-{ "cstdx", 0x2c000200, 0xfc00de00, "ucXt,x(b)", pa10, FLAG_STRICT},
-{ "cstdx", 0x2c000200, 0xfc001e00, "ucXt,x(s,b)", pa10, FLAG_STRICT},
-{ "cstdx", 0x2c000200, 0xfc00d200, "ucxcCt,x(b)", pa11, FLAG_STRICT},
-{ "cstdx", 0x2c000200, 0xfc001200, "ucxcCt,x(s,b)", pa11, FLAG_STRICT},
-{ "cstdx", 0x2c000200, 0xfc00de00, "ucXt,x(b)", pa10, 0},
-{ "cstdx", 0x2c000200, 0xfc001e00, "ucXt,x(s,b)", pa10, 0},
-{ "cldws", 0x24001000, 0xfc00de00, "ucM5(b),t", pa10, FLAG_STRICT},
-{ "cldws", 0x24001000, 0xfc001e00, "ucM5(s,b),t", pa10, FLAG_STRICT},
-{ "cldws", 0x24001000, 0xfc00d200, "ucmcc5(b),t", pa11, FLAG_STRICT},
-{ "cldws", 0x24001000, 0xfc001200, "ucmcc5(s,b),t", pa11, FLAG_STRICT},
-{ "cldws", 0x24001000, 0xfc00de00, "ucM5(b),t", pa10, 0},
-{ "cldws", 0x24001000, 0xfc001e00, "ucM5(s,b),t", pa10, 0},
-{ "cldds", 0x2c001000, 0xfc00de00, "ucM5(b),t", pa10, FLAG_STRICT},
-{ "cldds", 0x2c001000, 0xfc001e00, "ucM5(s,b),t", pa10, FLAG_STRICT},
-{ "cldds", 0x2c001000, 0xfc00d200, "ucmcc5(b),t", pa11, FLAG_STRICT},
-{ "cldds", 0x2c001000, 0xfc001200, "ucmcc5(s,b),t", pa11, FLAG_STRICT},
-{ "cldds", 0x2c001000, 0xfc00de00, "ucM5(b),t", pa10, 0},
-{ "cldds", 0x2c001000, 0xfc001e00, "ucM5(s,b),t", pa10, 0},
-{ "cstws", 0x24001200, 0xfc00de00, "ucMt,5(b)", pa10, FLAG_STRICT},
-{ "cstws", 0x24001200, 0xfc001e00, "ucMt,5(s,b)", pa10, FLAG_STRICT},
-{ "cstws", 0x24001200, 0xfc00d200, "ucmcCt,5(b)", pa11, FLAG_STRICT},
-{ "cstws", 0x24001200, 0xfc001200, "ucmcCt,5(s,b)", pa11, FLAG_STRICT},
-{ "cstws", 0x24001200, 0xfc00de00, "ucMt,5(b)", pa10, 0},
-{ "cstws", 0x24001200, 0xfc001e00, "ucMt,5(s,b)", pa10, 0},
-{ "cstds", 0x2c001200, 0xfc00de00, "ucMt,5(b)", pa10, FLAG_STRICT},
-{ "cstds", 0x2c001200, 0xfc001e00, "ucMt,5(s,b)", pa10, FLAG_STRICT},
-{ "cstds", 0x2c001200, 0xfc00d200, "ucmcCt,5(b)", pa11, FLAG_STRICT},
-{ "cstds", 0x2c001200, 0xfc001200, "ucmcCt,5(s,b)", pa11, FLAG_STRICT},
-{ "cstds", 0x2c001200, 0xfc00de00, "ucMt,5(b)", pa10, 0},
-{ "cstds", 0x2c001200, 0xfc001e00, "ucMt,5(s,b)", pa10, 0},
-
-/* More pseudo instructions which must follow the main table. */
-{ "call", 0xe800f000, 0xfc1ffffd, "n(b)", pa20, FLAG_STRICT},
-{ "call", 0xe800a000, 0xffe0e000, "nW", pa10, FLAG_STRICT},
-{ "ret", 0xe840d000, 0xfffffffd, "n", pa20, FLAG_STRICT},
-
-};
-
-#define NUMOPCODES ((sizeof pa_opcodes)/(sizeof pa_opcodes[0]))
-
-/* SKV 12/18/92. Added some denotations for various operands. */
-
-#define PA_IMM11_AT_31 'i'
-#define PA_IMM14_AT_31 'j'
-#define PA_IMM21_AT_31 'k'
-#define PA_DISP12 'w'
-#define PA_DISP17 'W'
-
-#define N_HPPA_OPERAND_FORMATS 5
diff --git a/include/opcode/i370.h b/include/opcode/i370.h
deleted file mode 100644
index bdbb2f4..0000000
--- a/include/opcode/i370.h
+++ /dev/null
@@ -1,265 +0,0 @@
-/* i370.h -- Header file for S/390 opcode table
- Copyright 1994, 1995, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
- PowerPC version written by Ian Lance Taylor, Cygnus Support
- Rewritten for i370 ESA/390 support, Linas Vepstas <linas@linas.org>
-
-This file is part of GDB, GAS, and the GNU binutils.
-
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them under the terms of the GNU General Public
-License as published by the Free Software Foundation; either version
-1, or (at your option) any later version.
-
-GDB, GAS, and the GNU binutils are distributed in the hope that they
-will be useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING. If not, write to the Free
-Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef I370_H
-#define I370_H
-
-/* The opcode table is an array of struct i370_opcode. */
-typedef union
-{
- unsigned int i[2];
- unsigned short s[4];
- unsigned char b[8];
-} i370_insn_t;
-
-struct i370_opcode
-{
- /* The opcode name. */
- const char *name;
-
- /* the length of the instruction */
- char len;
-
- /* The opcode itself. Those bits which will be filled in with
- operands are zeroes. */
- i370_insn_t opcode;
-
- /* The opcode mask. This is used by the disassembler. This is a
- mask containing ones indicating those bits which must match the
- opcode field, and zeroes indicating those bits which need not
- match (and are presumably filled in by operands). */
- i370_insn_t mask;
-
- /* One bit flags for the opcode. These are used to indicate which
- specific processors support the instructions. The defined values
- are listed below. */
- unsigned long flags;
-
- /* An array of operand codes. Each code is an index into the
- operand table. They appear in the order which the operands must
- appear in assembly code, and are terminated by a zero. */
- unsigned char operands[8];
-};
-
-/* The table itself is sorted by major opcode number, and is otherwise
- in the order in which the disassembler should consider
- instructions. */
-extern const struct i370_opcode i370_opcodes[];
-extern const int i370_num_opcodes;
-
-/* Values defined for the flags field of a struct i370_opcode. */
-
-/* Opcode is defined for the original 360 architecture. */
-#define I370_OPCODE_360 (0x01)
-
-/* Opcode is defined for the 370 architecture. */
-#define I370_OPCODE_370 (0x02)
-
-/* Opcode is defined for the 370-XA architecture. */
-#define I370_OPCODE_370_XA (0x04)
-
-/* Opcode is defined for the ESA/370 architecture. */
-#define I370_OPCODE_ESA370 (0x08)
-
-/* Opcode is defined for the ESA/390 architecture. */
-#define I370_OPCODE_ESA390 (0x10)
-
-/* Opcode is defined for the ESA/390 w/ BFP facility. */
-#define I370_OPCODE_ESA390_BF (0x20)
-
-/* Opcode is defined for the ESA/390 w/ branch & set authority facility. */
-#define I370_OPCODE_ESA390_BS (0x40)
-
-/* Opcode is defined for the ESA/390 w/ checksum facility. */
-#define I370_OPCODE_ESA390_CK (0x80)
-
-/* Opcode is defined for the ESA/390 w/ compare & move extended facility. */
-#define I370_OPCODE_ESA390_CM (0x100)
-
-/* Opcode is defined for the ESA/390 w/ flt.pt. support extensions facility. */
-#define I370_OPCODE_ESA390_FX (0x200)
-
-/* Opcode is defined for the ESA/390 w/ HFP facility. */
-#define I370_OPCODE_ESA390_HX (0x400)
-
-/* Opcode is defined for the ESA/390 w/ immediate & relative facility. */
-#define I370_OPCODE_ESA390_IR (0x800)
-
-/* Opcode is defined for the ESA/390 w/ move-inverse facility. */
-#define I370_OPCODE_ESA390_MI (0x1000)
-
-/* Opcode is defined for the ESA/390 w/ program-call-fast facility. */
-#define I370_OPCODE_ESA390_PC (0x2000)
-
-/* Opcode is defined for the ESA/390 w/ perform-locked-op facility. */
-#define I370_OPCODE_ESA390_PL (0x4000)
-
-/* Opcode is defined for the ESA/390 w/ square-root facility. */
-#define I370_OPCODE_ESA390_QR (0x8000)
-
-/* Opcode is defined for the ESA/390 w/ resume-program facility. */
-#define I370_OPCODE_ESA390_RP (0x10000)
-
-/* Opcode is defined for the ESA/390 w/ set-address-space-fast facility. */
-#define I370_OPCODE_ESA390_SA (0x20000)
-
-/* Opcode is defined for the ESA/390 w/ subspace group facility. */
-#define I370_OPCODE_ESA390_SG (0x40000)
-
-/* Opcode is defined for the ESA/390 w/ string facility. */
-#define I370_OPCODE_ESA390_SR (0x80000)
-
-/* Opcode is defined for the ESA/390 w/ trap facility. */
-#define I370_OPCODE_ESA390_TR (0x100000)
-
-#define I370_OPCODE_ESA390_SUPERSET (0x1fffff)
-
-
-/* The operands table is an array of struct i370_operand. */
-
-struct i370_operand
-{
- /* The number of bits in the operand. */
- int bits;
-
- /* How far the operand is left shifted in the instruction. */
- int shift;
-
- /* Insertion function. This is used by the assembler. To insert an
- operand value into an instruction, check this field.
-
- If it is NULL, execute
- i |= (op & ((1 << o->bits) - 1)) << o->shift;
- (i is the instruction which we are filling in, o is a pointer to
- this structure, and op is the opcode value; this assumes twos
- complement arithmetic).
-
- If this field is not NULL, then simply call it with the
- instruction and the operand value. It will return the new value
- of the instruction. If the ERRMSG argument is not NULL, then if
- the operand value is illegal, *ERRMSG will be set to a warning
- string (the operand will be inserted in any case). If the
- operand value is legal, *ERRMSG will be unchanged (most operands
- can accept any value). */
- i370_insn_t (*insert)
- (i370_insn_t instruction, long op, const char **errmsg);
-
- /* Extraction function. This is used by the disassembler. To
- extract this operand type from an instruction, check this field.
-
- If it is NULL, compute
- op = ((i) >> o->shift) & ((1 << o->bits) - 1);
- if ((o->flags & I370_OPERAND_SIGNED) != 0
- && (op & (1 << (o->bits - 1))) != 0)
- op -= 1 << o->bits;
- (i is the instruction, o is a pointer to this structure, and op
- is the result; this assumes twos complement arithmetic).
-
- If this field is not NULL, then simply call it with the
- instruction value. It will return the value of the operand. If
- the INVALID argument is not NULL, *INVALID will be set to
- non-zero if this operand type can not actually be extracted from
- this operand (i.e., the instruction does not match). If the
- operand is valid, *INVALID will not be changed. */
- long (*extract) (i370_insn_t instruction, int *invalid);
-
- /* One bit syntax flags. */
- unsigned long flags;
-
- /* name -- handy for debugging, otherwise pointless */
- char * name;
-};
-
-/* Elements in the table are retrieved by indexing with values from
- the operands field of the i370_opcodes table. */
-
-extern const struct i370_operand i370_operands[];
-
-/* Values defined for the flags field of a struct i370_operand. */
-
-/* This operand should be wrapped in parentheses rather than
- separated from the previous by a comma. This is used for S, RS and
- SS form instructions which want their operands to look like
- reg,displacement(basereg) */
-#define I370_OPERAND_SBASE (0x01)
-
-/* This operand is a base register. It may or may not appear next
- to an index register, i.e. either of the two forms
- reg,displacement(basereg)
- reg,displacement(index,basereg) */
-#define I370_OPERAND_BASE (0x02)
-
-/* This pair of operands should be wrapped in parentheses rather than
- separated from the last by a comma. This is used for the RX form
- instructions which want their operands to look like
- reg,displacement(index,basereg) */
-#define I370_OPERAND_INDEX (0x04)
-
-/* This operand names a register. The disassembler uses this to print
- register names with a leading 'r'. */
-#define I370_OPERAND_GPR (0x08)
-
-/* This operand names a floating point register. The disassembler
- prints these with a leading 'f'. */
-#define I370_OPERAND_FPR (0x10)
-
-/* This operand is a displacement. */
-#define I370_OPERAND_RELATIVE (0x20)
-
-/* This operand is a length, such as that in SS form instructions. */
-#define I370_OPERAND_LENGTH (0x40)
-
-/* This operand is optional, and is zero if omitted. This is used for
- the optional B2 field in the shift-left, shift-right instructions. The
- assembler must count the number of operands remaining on the line,
- and the number of operands remaining for the opcode, and decide
- whether this operand is present or not. The disassembler should
- print this operand out only if it is not zero. */
-#define I370_OPERAND_OPTIONAL (0x80)
-
-
-/* Define some misc macros. We keep them with the operands table
- for simplicity. The macro table is an array of struct i370_macro. */
-
-struct i370_macro
-{
- /* The macro name. */
- const char *name;
-
- /* The number of operands the macro takes. */
- unsigned int operands;
-
- /* One bit flags for the opcode. These are used to indicate which
- specific processors support the instructions. The values are the
- same as those for the struct i370_opcode flags field. */
- unsigned long flags;
-
- /* A format string to turn the macro into a normal instruction.
- Each %N in the string is replaced with operand number N (zero
- based). */
- const char *format;
-};
-
-extern const struct i370_macro i370_macros[];
-extern const int i370_num_macros;
-
-
-#endif /* I370_H */
diff --git a/include/opcode/i386.h b/include/opcode/i386.h
deleted file mode 100644
index f59eeea..0000000
--- a/include/opcode/i386.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* opcode/i386.h -- Intel 80386 opcode macros
- Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
- Free Software Foundation, Inc.
-
- This file is part of GAS, the GNU Assembler, and GDB, the GNU Debugger.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* The SystemV/386 SVR3.2 assembler, and probably all AT&T derived
- ix86 Unix assemblers, generate floating point instructions with
- reversed source and destination registers in certain cases.
- Unfortunately, gcc and possibly many other programs use this
- reversed syntax, so we're stuck with it.
-
- eg. `fsub %st(3),%st' results in st = st - st(3) as expected, but
- `fsub %st,%st(3)' results in st(3) = st - st(3), rather than
- the expected st(3) = st(3) - st
-
- This happens with all the non-commutative arithmetic floating point
- operations with two register operands, where the source register is
- %st, and destination register is %st(i).
-
- The affected opcode map is dceX, dcfX, deeX, defX. */
-
-#ifndef SYSV386_COMPAT
-/* Set non-zero for broken, compatible instructions. Set to zero for
- non-broken opcodes at your peril. gcc generates SystemV/386
- compatible instructions. */
-#define SYSV386_COMPAT 1
-#endif
-#ifndef OLDGCC_COMPAT
-/* Set non-zero to cater for old (<= 2.8.1) versions of gcc that could
- generate nonsense fsubp, fsubrp, fdivp and fdivrp with operands
- reversed. */
-#define OLDGCC_COMPAT SYSV386_COMPAT
-#endif
-
-#define MOV_AX_DISP32 0xa0
-#define POP_SEG_SHORT 0x07
-#define JUMP_PC_RELATIVE 0xeb
-#define INT_OPCODE 0xcd
-#define INT3_OPCODE 0xcc
-/* The opcode for the fwait instruction, which disassembler treats as a
- prefix when it can. */
-#define FWAIT_OPCODE 0x9b
-#define ADDR_PREFIX_OPCODE 0x67
-#define DATA_PREFIX_OPCODE 0x66
-#define LOCK_PREFIX_OPCODE 0xf0
-#define CS_PREFIX_OPCODE 0x2e
-#define DS_PREFIX_OPCODE 0x3e
-#define ES_PREFIX_OPCODE 0x26
-#define FS_PREFIX_OPCODE 0x64
-#define GS_PREFIX_OPCODE 0x65
-#define SS_PREFIX_OPCODE 0x36
-#define REPNE_PREFIX_OPCODE 0xf2
-#define REPE_PREFIX_OPCODE 0xf3
-
-#define TWO_BYTE_OPCODE_ESCAPE 0x0f
-#define NOP_OPCODE (char) 0x90
-
-/* register numbers */
-#define EBP_REG_NUM 5
-#define ESP_REG_NUM 4
-
-/* modrm_byte.regmem for twobyte escape */
-#define ESCAPE_TO_TWO_BYTE_ADDRESSING ESP_REG_NUM
-/* index_base_byte.index for no index register addressing */
-#define NO_INDEX_REGISTER ESP_REG_NUM
-/* index_base_byte.base for no base register addressing */
-#define NO_BASE_REGISTER EBP_REG_NUM
-#define NO_BASE_REGISTER_16 6
-
-/* modrm.mode = REGMEM_FIELD_HAS_REG when a register is in there */
-#define REGMEM_FIELD_HAS_REG 0x3/* always = 0x3 */
-#define REGMEM_FIELD_HAS_MEM (~REGMEM_FIELD_HAS_REG)
-
-/* x86-64 extension prefix. */
-#define REX_OPCODE 0x40
-
-/* Indicates 64 bit operand size. */
-#define REX_W 8
-/* High extension to reg field of modrm byte. */
-#define REX_R 4
-/* High extension to SIB index field. */
-#define REX_X 2
-/* High extension to base field of modrm or SIB, or reg field of opcode. */
-#define REX_B 1
-
-/* max operands per insn */
-#define MAX_OPERANDS 5
-
-/* max immediates per insn (lcall, ljmp, insertq, extrq) */
-#define MAX_IMMEDIATE_OPERANDS 2
-
-/* max memory refs per insn (string ops) */
-#define MAX_MEMORY_OPERANDS 2
-
-/* max size of insn mnemonics. */
-#define MAX_MNEM_SIZE 20
-
-/* max size of register name in insn mnemonics. */
-#define MAX_REG_NAME_SIZE 8
diff --git a/include/opcode/i860.h b/include/opcode/i860.h
deleted file mode 100644
index 7836bff..0000000
--- a/include/opcode/i860.h
+++ /dev/null
@@ -1,507 +0,0 @@
-/* Table of opcodes for the i860.
- Copyright 1989, 1991, 2000, 2002, 2003 Free Software Foundation, Inc.
-
-This file is part of GAS, the GNU Assembler, and GDB, the GNU disassembler.
-
-GAS/GDB is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
-
-GAS/GDB is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GAS or GDB; see the file COPYING. If not, write to
-the Free Software Foundation, 51 Franklin Street - Fifth Floor,
-Boston, MA 02110-1301, USA. */
-
-
-/* Structure of an opcode table entry. */
-struct i860_opcode
-{
- /* The opcode name. */
- const char *name;
-
- /* Bits that must be set. */
- unsigned long match;
-
- /* Bits that must not be set. */
- unsigned long lose;
-
- const char *args;
-
- /* Nonzero if this is a possible expand-instruction. */
- char expand;
-};
-
-
-enum expand_type
-{
- E_MOV = 1, E_ADDR, E_U32, E_AND, E_S32, E_DELAY, XP_ONLY
-};
-
-
-/* All i860 opcodes are 32 bits, except for the pseudo-instructions
- and the operations utilizing a 32-bit address expression, an
- unsigned 32-bit constant, or a signed 32-bit constant.
- These opcodes are expanded into a two-instruction sequence for
- any situation where the immediate operand does not fit in 32 bits.
- In the case of the add and subtract operations the expansion is
- to a three-instruction sequence (ex: orh, or, adds). In cases
- where the address is to be relocated, the instruction is
- expanded to handle the worse case, this could be optimized at
- the final link if the actual address were known.
-
- The pseudoinstructions are: mov, fmov, pmov, nop, and fnop.
- These instructions are implemented as a one or two instruction
- sequence of other operations.
-
- The match component is a mask saying which bits must match a
- particular opcode in order for an instruction to be an instance
- of that opcode.
-
- The args component is a string containing one character
- for each operand of the instruction.
-
-Kinds of operands:
- # Number used by optimizer. It is ignored.
- 1 src1 integer register.
- 2 src2 integer register.
- d dest register.
- c ctrlreg control register.
- i 16 bit immediate.
- I 16 bit immediate, aligned 2^0. (ld.b)
- J 16 bit immediate, aligned 2^1. (ld.s)
- K 16 bit immediate, aligned 2^2. (ld.l, {p}fld.l, fst.l)
- L 16 bit immediate, aligned 2^3. ({p}fld.d, fst.d)
- M 16 bit immediate, aligned 2^4. ({p}fld.q, fst.q)
- 5 5 bit immediate.
- l lbroff 26 bit PC relative immediate.
- r sbroff 16 bit PC relative immediate.
- s split 16 bit immediate.
- S split 16 bit immediate, aligned 2^0. (st.b)
- T split 16 bit immediate, aligned 2^1. (st.s)
- U split 16 bit immediate, aligned 2^2. (st.l)
- e src1 floating point register.
- f src2 floating point register.
- g dest floating point register. */
-
-
-/* The order of the opcodes in this table is significant. The assembler
- requires that all instances of the same mnemonic must be consecutive.
- If they aren't, the assembler will not function properly.
-
- The order of opcodes does not affect the disassembler. */
-
-static const struct i860_opcode i860_opcodes[] =
-{
-/* REG-Format Instructions. */
-{ "ld.c", 0x30000000, 0xcc000000, "c,d", 0 }, /* ld.c csrc2,idest */
-{ "ld.b", 0x00000000, 0xfc000000, "1(2),d", 0 }, /* ld.b isrc1(isrc2),idest */
-{ "ld.b", 0x04000000, 0xf8000000, "I(2),d", E_ADDR }, /* ld.b #const(isrc2),idest */
-{ "ld.s", 0x10000000, 0xec000001, "1(2),d", 0 }, /* ld.s isrc1(isrc2),idest */
-{ "ld.s", 0x14000000, 0xe8000001, "J(2),d", E_ADDR }, /* ld.s #const(isrc2),idest */
-{ "ld.l", 0x10000001, 0xec000000, "1(2),d", 0 }, /* ld.l isrc1(isrc2),idest */
-{ "ld.l", 0x14000001, 0xe8000000, "K(2),d", E_ADDR }, /* ld.l #const(isrc2),idest */
-
-{ "st.c", 0x38000000, 0xc4000000, "1,c", 0 }, /* st.c isrc1ni,csrc2 */
-{ "st.b", 0x0c000000, 0xf0000000, "1,S(2)", E_ADDR }, /* st.b isrc1ni,#const(isrc2) */
-{ "st.s", 0x1c000000, 0xe0000001, "1,T(2)", E_ADDR }, /* st.s isrc1ni,#const(isrc2) */
-{ "st.l", 0x1c000001, 0xe0000000, "1,U(2)", E_ADDR }, /* st.l isrc1ni,#const(isrc2) */
-
-{ "ixfr", 0x08000000, 0xf4000000, "1,g", 0 }, /* ixfr isrc1ni,fdest */
-
-{ "fld.l", 0x20000002, 0xdc000001, "1(2),g", 0 }, /* fld.l isrc1(isrc2),fdest */
-{ "fld.l", 0x24000002, 0xd8000001, "K(2),g", E_ADDR }, /* fld.l #const(isrc2),fdest */
-{ "fld.l", 0x20000003, 0xdc000000, "1(2)++,g", 0 }, /* fld.l isrc1(isrc2)++,fdest */
-{ "fld.l", 0x24000003, 0xd8000000, "K(2)++,g", E_ADDR }, /* fld.l #const(isrc2)++,fdest */
-{ "fld.d", 0x20000000, 0xdc000007, "1(2),g", 0 }, /* fld.d isrc1(isrc2),fdest */
-{ "fld.d", 0x24000000, 0xd8000007, "L(2),g", E_ADDR }, /* fld.d #const(isrc2),fdest */
-{ "fld.d", 0x20000001, 0xdc000006, "1(2)++,g", 0 }, /* fld.d isrc1(isrc2)++,fdest */
-{ "fld.d", 0x24000001, 0xd8000006, "L(2)++,g", E_ADDR }, /* fld.d #const(isrc2)++,fdest */
-{ "fld.q", 0x20000004, 0xdc000003, "1(2),g", 0 }, /* fld.q isrc1(isrc2),fdest */
-{ "fld.q", 0x24000004, 0xd8000003, "M(2),g", E_ADDR }, /* fld.q #const(isrc2),fdest */
-{ "fld.q", 0x20000005, 0xdc000002, "1(2)++,g", 0 }, /* fld.q isrc1(isrc2)++,fdest */
-{ "fld.q", 0x24000005, 0xd8000002, "M(2)++,g", E_ADDR }, /* fld.q #const(isrc2)++,fdest */
-
-{ "pfld.l", 0x60000002, 0x9c000001, "1(2),g", 0 }, /* pfld.l isrc1(isrc2),fdest */
-{ "pfld.l", 0x64000002, 0x98000001, "K(2),g", E_ADDR }, /* pfld.l #const(isrc2),fdest */
-{ "pfld.l", 0x60000003, 0x9c000000, "1(2)++,g", 0 }, /* pfld.l isrc1(isrc2)++,fdest */
-{ "pfld.l", 0x64000003, 0x98000000, "K(2)++,g", E_ADDR }, /* pfld.l #const(isrc2)++,fdest */
-{ "pfld.d", 0x60000000, 0x9c000007, "1(2),g", 0 }, /* pfld.d isrc1(isrc2),fdest */
-{ "pfld.d", 0x64000000, 0x98000007, "L(2),g", E_ADDR }, /* pfld.d #const(isrc2),fdest */
-{ "pfld.d", 0x60000001, 0x9c000006, "1(2)++,g", 0 }, /* pfld.d isrc1(isrc2)++,fdest */
-{ "pfld.d", 0x64000001, 0x98000006, "L(2)++,g", E_ADDR }, /* pfld.d #const(isrc2)++,fdest */
-{ "pfld.q", 0x60000004, 0x9c000003, "1(2),g", XP_ONLY }, /* pfld.q isrc1(isrc2),fdest */
-{ "pfld.q", 0x64000004, 0x98000003, "L(2),g", XP_ONLY }, /* pfld.q #const(isrc2),fdest */
-{ "pfld.q", 0x60000005, 0x9c000002, "1(2)++,g", XP_ONLY }, /* pfld.q isrc1(isrc2)++,fdest */
-{ "pfld.q", 0x64000005, 0x98000002, "L(2)++,g", XP_ONLY }, /* pfld.q #const(isrc2)++,fdest */
-
-{ "fst.l", 0x28000002, 0xd4000001, "g,1(2)", 0 }, /* fst.l fdest,isrc1(isrc2) */
-{ "fst.l", 0x2c000002, 0xd0000001, "g,K(2)", E_ADDR }, /* fst.l fdest,#const(isrc2) */
-{ "fst.l", 0x28000003, 0xd4000000, "g,1(2)++", 0 }, /* fst.l fdest,isrc1(isrc2)++ */
-{ "fst.l", 0x2c000003, 0xd0000000, "g,K(2)++", E_ADDR }, /* fst.l fdest,#const(isrc2)++ */
-{ "fst.d", 0x28000000, 0xd4000007, "g,1(2)", 0 }, /* fst.d fdest,isrc1(isrc2) */
-{ "fst.d", 0x2c000000, 0xd0000007, "g,L(2)", E_ADDR }, /* fst.d fdest,#const(isrc2) */
-{ "fst.d", 0x28000001, 0xd4000006, "g,1(2)++", 0 }, /* fst.d fdest,isrc1(isrc2)++ */
-{ "fst.d", 0x2c000001, 0xd0000006, "g,L(2)++", E_ADDR }, /* fst.d fdest,#const(isrc2)++ */
-{ "fst.q", 0x28000004, 0xd4000003, "g,1(2)", 0 }, /* fst.d fdest,isrc1(isrc2) */
-{ "fst.q", 0x2c000004, 0xd0000003, "g,M(2)", E_ADDR }, /* fst.d fdest,#const(isrc2) */
-{ "fst.q", 0x28000005, 0xd4000002, "g,1(2)++", 0 }, /* fst.d fdest,isrc1(isrc2)++ */
-{ "fst.q", 0x2c000005, 0xd0000002, "g,M(2)++", E_ADDR }, /* fst.d fdest,#const(isrc2)++ */
-
-{ "pst.d", 0x3c000000, 0xc0000007, "g,L(2)", E_ADDR }, /* pst.d fdest,#const(isrc2) */
-{ "pst.d", 0x3c000001, 0xc0000006, "g,L(2)++", E_ADDR }, /* pst.d fdest,#const(isrc2)++ */
-
-{ "addu", 0x80000000, 0x7c000000, "1,2,d", 0 }, /* addu isrc1,isrc2,idest */
-{ "addu", 0x84000000, 0x78000000, "i,2,d", E_S32 }, /* addu #const,isrc2,idest */
-{ "adds", 0x90000000, 0x6c000000, "1,2,d", 0 }, /* adds isrc1,isrc2,idest */
-{ "adds", 0x94000000, 0x68000000, "i,2,d", E_S32 }, /* adds #const,isrc2,idest */
-{ "subu", 0x88000000, 0x74000000, "1,2,d", 0 }, /* subu isrc1,isrc2,idest */
-{ "subu", 0x8c000000, 0x70000000, "i,2,d", E_S32 }, /* subu #const,isrc2,idest */
-{ "subs", 0x98000000, 0x64000000, "1,2,d", 0 }, /* subs isrc1,isrc2,idest */
-{ "subs", 0x9c000000, 0x60000000, "i,2,d", E_S32 }, /* subs #const,isrc2,idest */
-
-{ "shl", 0xa0000000, 0x5c000000, "1,2,d", 0 }, /* shl isrc1,isrc2,idest */
-{ "shl", 0xa4000000, 0x58000000, "i,2,d", 0 }, /* shl #const,isrc2,idest */
-{ "shr", 0xa8000000, 0x54000000, "1,2,d", 0 }, /* shr isrc1,isrc2,idest */
-{ "shr", 0xac000000, 0x50000000, "i,2,d", 0 }, /* shr #const,isrc2,idest */
-{ "shrd", 0xb0000000, 0x4c000000, "1,2,d", 0 }, /* shrd isrc1,isrc2,idest */
-{ "shra", 0xb8000000, 0x44000000, "1,2,d", 0 }, /* shra isrc1,isrc2,idest */
-{ "shra", 0xbc000000, 0x40000000, "i,2,d", 0 }, /* shra #const,isrc2,idest */
-
-{ "mov", 0xa0000000, 0x5c00f800, "2,d", 0 }, /* shl r0,isrc2,idest */
-{ "mov", 0x94000000, 0x69e00000, "i,d", E_MOV }, /* adds #const,r0,idest */
-{ "nop", 0xa0000000, 0x5ffff800, "", 0 }, /* shl r0,r0,r0 */
-{ "fnop", 0xb0000000, 0x4ffff800, "", 0 }, /* shrd r0,r0,r0 */
-
-{ "trap", 0x44000000, 0xb8000000, "1,2,d", 0 }, /* trap isrc1ni,isrc2,idest */
-
-{ "flush", 0x34000004, 0xc81f0003, "L(2)", E_ADDR }, /* flush #const(isrc2) */
-{ "flush", 0x34000005, 0xc81f0002, "L(2)++", E_ADDR }, /* flush #const(isrc2)++ */
-
-{ "and", 0xc0000000, 0x3c000000, "1,2,d", 0 }, /* and isrc1,isrc2,idest */
-{ "and", 0xc4000000, 0x38000000, "i,2,d", E_AND }, /* and #const,isrc2,idest */
-{ "andh", 0xcc000000, 0x30000000, "i,2,d", 0 }, /* andh #const,isrc2,idest */
-{ "andnot", 0xd0000000, 0x2c000000, "1,2,d", 0 }, /* andnot isrc1,isrc2,idest */
-{ "andnot", 0xd4000000, 0x28000000, "i,2,d", E_U32 }, /* andnot #const,isrc2,idest */
-{ "andnoth", 0xdc000000, 0x20000000, "i,2,d", 0 }, /* andnoth #const,isrc2,idest */
-{ "or", 0xe0000000, 0x1c000000, "1,2,d", 0 }, /* or isrc1,isrc2,idest */
-{ "or", 0xe4000000, 0x18000000, "i,2,d", E_U32 }, /* or #const,isrc2,idest */
-{ "orh", 0xec000000, 0x10000000, "i,2,d", 0 }, /* orh #const,isrc2,idest */
-{ "xor", 0xf0000000, 0x0c000000, "1,2,d", 0 }, /* xor isrc1,isrc2,idest */
-{ "xor", 0xf4000000, 0x08000000, "i,2,d", E_U32 }, /* xor #const,isrc2,idest */
-{ "xorh", 0xfc000000, 0x00000000, "i,2,d", 0 }, /* xorh #const,isrc2,idest */
-
-{ "bte", 0x58000000, 0xa4000000, "1,2,r", 0 }, /* bte isrc1s,isrc2,sbroff */
-{ "bte", 0x5c000000, 0xa0000000, "5,2,r", 0 }, /* bte #const5,isrc2,sbroff */
-{ "btne", 0x50000000, 0xac000000, "1,2,r", 0 }, /* btne isrc1s,isrc2,sbroff */
-{ "btne", 0x54000000, 0xa8000000, "5,2,r", 0 }, /* btne #const5,isrc2,sbroff */
-{ "bla", 0xb4000000, 0x48000000, "1,2,r", E_DELAY }, /* bla isrc1s,isrc2,sbroff */
-{ "bri", 0x40000000, 0xbc000000, "1", E_DELAY }, /* bri isrc1ni */
-
-/* Core Escape Instruction Format */
-{ "lock", 0x4c000001, 0xb000001e, "", 0 }, /* lock set BL in dirbase */
-{ "calli", 0x4c000002, 0xb000001d, "1", E_DELAY }, /* calli isrc1ni */
-{ "intovr", 0x4c000004, 0xb000001b, "", 0 }, /* intovr trap on integer overflow */
-{ "unlock", 0x4c000007, 0xb0000018, "", 0 }, /* unlock clear BL in dirbase */
-{ "ldio.l", 0x4c000408, 0xb00003f7, "2,d", XP_ONLY }, /* ldio.l isrc2,idest */
-{ "ldio.s", 0x4c000208, 0xb00005f7, "2,d", XP_ONLY }, /* ldio.s isrc2,idest */
-{ "ldio.b", 0x4c000008, 0xb00007f7, "2,d", XP_ONLY }, /* ldio.b isrc2,idest */
-{ "stio.l", 0x4c000409, 0xb00003f6, "1,2", XP_ONLY }, /* stio.l isrc1ni,isrc2 */
-{ "stio.s", 0x4c000209, 0xb00005f6, "1,2", XP_ONLY }, /* stio.s isrc1ni,isrc2 */
-{ "stio.b", 0x4c000009, 0xb00007f6, "1,2", XP_ONLY }, /* stio.b isrc1ni,isrc2 */
-{ "ldint.l", 0x4c00040a, 0xb00003f5, "2,d", XP_ONLY }, /* ldint.l isrc2,idest */
-{ "ldint.s", 0x4c00020a, 0xb00005f5, "2,d", XP_ONLY }, /* ldint.s isrc2,idest */
-{ "ldint.b", 0x4c00000a, 0xb00007f5, "2,d", XP_ONLY }, /* ldint.b isrc2,idest */
-{ "scyc.b", 0x4c00000b, 0xb00007f4, "2", XP_ONLY }, /* scyc.b isrc2 */
-
-/* CTRL-Format Instructions */
-{ "br", 0x68000000, 0x94000000, "l", E_DELAY }, /* br lbroff */
-{ "call", 0x6c000000, 0x90000000, "l", E_DELAY }, /* call lbroff */
-{ "bc", 0x70000000, 0x8c000000, "l", 0 }, /* bc lbroff */
-{ "bc.t", 0x74000000, 0x88000000, "l", E_DELAY }, /* bc.t lbroff */
-{ "bnc", 0x78000000, 0x84000000, "l", 0 }, /* bnc lbroff */
-{ "bnc.t", 0x7c000000, 0x80000000, "l", E_DELAY }, /* bnc.t lbroff */
-
-/* Floating Point Escape Instruction Format - pfam.p fsrc1,fsrc2,fdest. */
-{ "r2p1.ss", 0x48000400, 0xb40001ff, "e,f,g", 0 },
-{ "r2p1.sd", 0x48000480, 0xb400017f, "e,f,g", 0 },
-{ "r2p1.dd", 0x48000580, 0xb400007f, "e,f,g", 0 },
-{ "r2pt.ss", 0x48000401, 0xb40001fe, "e,f,g", 0 },
-{ "r2pt.sd", 0x48000481, 0xb400017e, "e,f,g", 0 },
-{ "r2pt.dd", 0x48000581, 0xb400007e, "e,f,g", 0 },
-{ "r2ap1.ss", 0x48000402, 0xb40001fd, "e,f,g", 0 },
-{ "r2ap1.sd", 0x48000482, 0xb400017d, "e,f,g", 0 },
-{ "r2ap1.dd", 0x48000582, 0xb400007d, "e,f,g", 0 },
-{ "r2apt.ss", 0x48000403, 0xb40001fc, "e,f,g", 0 },
-{ "r2apt.sd", 0x48000483, 0xb400017c, "e,f,g", 0 },
-{ "r2apt.dd", 0x48000583, 0xb400007c, "e,f,g", 0 },
-{ "i2p1.ss", 0x48000404, 0xb40001fb, "e,f,g", 0 },
-{ "i2p1.sd", 0x48000484, 0xb400017b, "e,f,g", 0 },
-{ "i2p1.dd", 0x48000584, 0xb400007b, "e,f,g", 0 },
-{ "i2pt.ss", 0x48000405, 0xb40001fa, "e,f,g", 0 },
-{ "i2pt.sd", 0x48000485, 0xb400017a, "e,f,g", 0 },
-{ "i2pt.dd", 0x48000585, 0xb400007a, "e,f,g", 0 },
-{ "i2ap1.ss", 0x48000406, 0xb40001f9, "e,f,g", 0 },
-{ "i2ap1.sd", 0x48000486, 0xb4000179, "e,f,g", 0 },
-{ "i2ap1.dd", 0x48000586, 0xb4000079, "e,f,g", 0 },
-{ "i2apt.ss", 0x48000407, 0xb40001f8, "e,f,g", 0 },
-{ "i2apt.sd", 0x48000487, 0xb4000178, "e,f,g", 0 },
-{ "i2apt.dd", 0x48000587, 0xb4000078, "e,f,g", 0 },
-{ "rat1p2.ss", 0x48000408, 0xb40001f7, "e,f,g", 0 },
-{ "rat1p2.sd", 0x48000488, 0xb4000177, "e,f,g", 0 },
-{ "rat1p2.dd", 0x48000588, 0xb4000077, "e,f,g", 0 },
-{ "m12apm.ss", 0x48000409, 0xb40001f6, "e,f,g", 0 },
-{ "m12apm.sd", 0x48000489, 0xb4000176, "e,f,g", 0 },
-{ "m12apm.dd", 0x48000589, 0xb4000076, "e,f,g", 0 },
-{ "ra1p2.ss", 0x4800040a, 0xb40001f5, "e,f,g", 0 },
-{ "ra1p2.sd", 0x4800048a, 0xb4000175, "e,f,g", 0 },
-{ "ra1p2.dd", 0x4800058a, 0xb4000075, "e,f,g", 0 },
-{ "m12ttpa.ss", 0x4800040b, 0xb40001f4, "e,f,g", 0 },
-{ "m12ttpa.sd", 0x4800048b, 0xb4000174, "e,f,g", 0 },
-{ "m12ttpa.dd", 0x4800058b, 0xb4000074, "e,f,g", 0 },
-{ "iat1p2.ss", 0x4800040c, 0xb40001f3, "e,f,g", 0 },
-{ "iat1p2.sd", 0x4800048c, 0xb4000173, "e,f,g", 0 },
-{ "iat1p2.dd", 0x4800058c, 0xb4000073, "e,f,g", 0 },
-{ "m12tpm.ss", 0x4800040d, 0xb40001f2, "e,f,g", 0 },
-{ "m12tpm.sd", 0x4800048d, 0xb4000172, "e,f,g", 0 },
-{ "m12tpm.dd", 0x4800058d, 0xb4000072, "e,f,g", 0 },
-{ "ia1p2.ss", 0x4800040e, 0xb40001f1, "e,f,g", 0 },
-{ "ia1p2.sd", 0x4800048e, 0xb4000171, "e,f,g", 0 },
-{ "ia1p2.dd", 0x4800058e, 0xb4000071, "e,f,g", 0 },
-{ "m12tpa.ss", 0x4800040f, 0xb40001f0, "e,f,g", 0 },
-{ "m12tpa.sd", 0x4800048f, 0xb4000170, "e,f,g", 0 },
-{ "m12tpa.dd", 0x4800058f, 0xb4000070, "e,f,g", 0 },
-
-/* Floating Point Escape Instruction Format - pfsm.p fsrc1,fsrc2,fdest. */
-{ "r2s1.ss", 0x48000410, 0xb40001ef, "e,f,g", 0 },
-{ "r2s1.sd", 0x48000490, 0xb400016f, "e,f,g", 0 },
-{ "r2s1.dd", 0x48000590, 0xb400006f, "e,f,g", 0 },
-{ "r2st.ss", 0x48000411, 0xb40001ee, "e,f,g", 0 },
-{ "r2st.sd", 0x48000491, 0xb400016e, "e,f,g", 0 },
-{ "r2st.dd", 0x48000591, 0xb400006e, "e,f,g", 0 },
-{ "r2as1.ss", 0x48000412, 0xb40001ed, "e,f,g", 0 },
-{ "r2as1.sd", 0x48000492, 0xb400016d, "e,f,g", 0 },
-{ "r2as1.dd", 0x48000592, 0xb400006d, "e,f,g", 0 },
-{ "r2ast.ss", 0x48000413, 0xb40001ec, "e,f,g", 0 },
-{ "r2ast.sd", 0x48000493, 0xb400016c, "e,f,g", 0 },
-{ "r2ast.dd", 0x48000593, 0xb400006c, "e,f,g", 0 },
-{ "i2s1.ss", 0x48000414, 0xb40001eb, "e,f,g", 0 },
-{ "i2s1.sd", 0x48000494, 0xb400016b, "e,f,g", 0 },
-{ "i2s1.dd", 0x48000594, 0xb400006b, "e,f,g", 0 },
-{ "i2st.ss", 0x48000415, 0xb40001ea, "e,f,g", 0 },
-{ "i2st.sd", 0x48000495, 0xb400016a, "e,f,g", 0 },
-{ "i2st.dd", 0x48000595, 0xb400006a, "e,f,g", 0 },
-{ "i2as1.ss", 0x48000416, 0xb40001e9, "e,f,g", 0 },
-{ "i2as1.sd", 0x48000496, 0xb4000169, "e,f,g", 0 },
-{ "i2as1.dd", 0x48000596, 0xb4000069, "e,f,g", 0 },
-{ "i2ast.ss", 0x48000417, 0xb40001e8, "e,f,g", 0 },
-{ "i2ast.sd", 0x48000497, 0xb4000168, "e,f,g", 0 },
-{ "i2ast.dd", 0x48000597, 0xb4000068, "e,f,g", 0 },
-{ "rat1s2.ss", 0x48000418, 0xb40001e7, "e,f,g", 0 },
-{ "rat1s2.sd", 0x48000498, 0xb4000167, "e,f,g", 0 },
-{ "rat1s2.dd", 0x48000598, 0xb4000067, "e,f,g", 0 },
-{ "m12asm.ss", 0x48000419, 0xb40001e6, "e,f,g", 0 },
-{ "m12asm.sd", 0x48000499, 0xb4000166, "e,f,g", 0 },
-{ "m12asm.dd", 0x48000599, 0xb4000066, "e,f,g", 0 },
-{ "ra1s2.ss", 0x4800041a, 0xb40001e5, "e,f,g", 0 },
-{ "ra1s2.sd", 0x4800049a, 0xb4000165, "e,f,g", 0 },
-{ "ra1s2.dd", 0x4800059a, 0xb4000065, "e,f,g", 0 },
-{ "m12ttsa.ss", 0x4800041b, 0xb40001e4, "e,f,g", 0 },
-{ "m12ttsa.sd", 0x4800049b, 0xb4000164, "e,f,g", 0 },
-{ "m12ttsa.dd", 0x4800059b, 0xb4000064, "e,f,g", 0 },
-{ "iat1s2.ss", 0x4800041c, 0xb40001e3, "e,f,g", 0 },
-{ "iat1s2.sd", 0x4800049c, 0xb4000163, "e,f,g", 0 },
-{ "iat1s2.dd", 0x4800059c, 0xb4000063, "e,f,g", 0 },
-{ "m12tsm.ss", 0x4800041d, 0xb40001e2, "e,f,g", 0 },
-{ "m12tsm.sd", 0x4800049d, 0xb4000162, "e,f,g", 0 },
-{ "m12tsm.dd", 0x4800059d, 0xb4000062, "e,f,g", 0 },
-{ "ia1s2.ss", 0x4800041e, 0xb40001e1, "e,f,g", 0 },
-{ "ia1s2.sd", 0x4800049e, 0xb4000161, "e,f,g", 0 },
-{ "ia1s2.dd", 0x4800059e, 0xb4000061, "e,f,g", 0 },
-{ "m12tsa.ss", 0x4800041f, 0xb40001e0, "e,f,g", 0 },
-{ "m12tsa.sd", 0x4800049f, 0xb4000160, "e,f,g", 0 },
-{ "m12tsa.dd", 0x4800059f, 0xb4000060, "e,f,g", 0 },
-
-/* Floating Point Escape Instruction Format - pfmam.p fsrc1,fsrc2,fdest. */
-{ "mr2p1.ss", 0x48000000, 0xb40005ff, "e,f,g", 0 },
-{ "mr2p1.sd", 0x48000080, 0xb400057f, "e,f,g", 0 },
-{ "mr2p1.dd", 0x48000180, 0xb400047f, "e,f,g", 0 },
-{ "mr2pt.ss", 0x48000001, 0xb40005fe, "e,f,g", 0 },
-{ "mr2pt.sd", 0x48000081, 0xb400057e, "e,f,g", 0 },
-{ "mr2pt.dd", 0x48000181, 0xb400047e, "e,f,g", 0 },
-{ "mr2mp1.ss", 0x48000002, 0xb40005fd, "e,f,g", 0 },
-{ "mr2mp1.sd", 0x48000082, 0xb400057d, "e,f,g", 0 },
-{ "mr2mp1.dd", 0x48000182, 0xb400047d, "e,f,g", 0 },
-{ "mr2mpt.ss", 0x48000003, 0xb40005fc, "e,f,g", 0 },
-{ "mr2mpt.sd", 0x48000083, 0xb400057c, "e,f,g", 0 },
-{ "mr2mpt.dd", 0x48000183, 0xb400047c, "e,f,g", 0 },
-{ "mi2p1.ss", 0x48000004, 0xb40005fb, "e,f,g", 0 },
-{ "mi2p1.sd", 0x48000084, 0xb400057b, "e,f,g", 0 },
-{ "mi2p1.dd", 0x48000184, 0xb400047b, "e,f,g", 0 },
-{ "mi2pt.ss", 0x48000005, 0xb40005fa, "e,f,g", 0 },
-{ "mi2pt.sd", 0x48000085, 0xb400057a, "e,f,g", 0 },
-{ "mi2pt.dd", 0x48000185, 0xb400047a, "e,f,g", 0 },
-{ "mi2mp1.ss", 0x48000006, 0xb40005f9, "e,f,g", 0 },
-{ "mi2mp1.sd", 0x48000086, 0xb4000579, "e,f,g", 0 },
-{ "mi2mp1.dd", 0x48000186, 0xb4000479, "e,f,g", 0 },
-{ "mi2mpt.ss", 0x48000007, 0xb40005f8, "e,f,g", 0 },
-{ "mi2mpt.sd", 0x48000087, 0xb4000578, "e,f,g", 0 },
-{ "mi2mpt.dd", 0x48000187, 0xb4000478, "e,f,g", 0 },
-{ "mrmt1p2.ss", 0x48000008, 0xb40005f7, "e,f,g", 0 },
-{ "mrmt1p2.sd", 0x48000088, 0xb4000577, "e,f,g", 0 },
-{ "mrmt1p2.dd", 0x48000188, 0xb4000477, "e,f,g", 0 },
-{ "mm12mpm.ss", 0x48000009, 0xb40005f6, "e,f,g", 0 },
-{ "mm12mpm.sd", 0x48000089, 0xb4000576, "e,f,g", 0 },
-{ "mm12mpm.dd", 0x48000189, 0xb4000476, "e,f,g", 0 },
-{ "mrm1p2.ss", 0x4800000a, 0xb40005f5, "e,f,g", 0 },
-{ "mrm1p2.sd", 0x4800008a, 0xb4000575, "e,f,g", 0 },
-{ "mrm1p2.dd", 0x4800018a, 0xb4000475, "e,f,g", 0 },
-{ "mm12ttpm.ss",0x4800000b, 0xb40005f4, "e,f,g", 0 },
-{ "mm12ttpm.sd",0x4800008b, 0xb4000574, "e,f,g", 0 },
-{ "mm12ttpm.dd",0x4800018b, 0xb4000474, "e,f,g", 0 },
-{ "mimt1p2.ss", 0x4800000c, 0xb40005f3, "e,f,g", 0 },
-{ "mimt1p2.sd", 0x4800008c, 0xb4000573, "e,f,g", 0 },
-{ "mimt1p2.dd", 0x4800018c, 0xb4000473, "e,f,g", 0 },
-{ "mm12tpm.ss", 0x4800000d, 0xb40005f2, "e,f,g", 0 },
-{ "mm12tpm.sd", 0x4800008d, 0xb4000572, "e,f,g", 0 },
-{ "mm12tpm.dd", 0x4800018d, 0xb4000472, "e,f,g", 0 },
-{ "mim1p2.ss", 0x4800000e, 0xb40005f1, "e,f,g", 0 },
-{ "mim1p2.sd", 0x4800008e, 0xb4000571, "e,f,g", 0 },
-{ "mim1p2.dd", 0x4800018e, 0xb4000471, "e,f,g", 0 },
-
-/* Floating Point Escape Instruction Format - pfmsm.p fsrc1,fsrc2,fdest. */
-{ "mr2s1.ss", 0x48000010, 0xb40005ef, "e,f,g", 0 },
-{ "mr2s1.sd", 0x48000090, 0xb400056f, "e,f,g", 0 },
-{ "mr2s1.dd", 0x48000190, 0xb400046f, "e,f,g", 0 },
-{ "mr2st.ss", 0x48000011, 0xb40005ee, "e,f,g", 0 },
-{ "mr2st.sd", 0x48000091, 0xb400056e, "e,f,g", 0 },
-{ "mr2st.dd", 0x48000191, 0xb400046e, "e,f,g", 0 },
-{ "mr2ms1.ss", 0x48000012, 0xb40005ed, "e,f,g", 0 },
-{ "mr2ms1.sd", 0x48000092, 0xb400056d, "e,f,g", 0 },
-{ "mr2ms1.dd", 0x48000192, 0xb400046d, "e,f,g", 0 },
-{ "mr2mst.ss", 0x48000013, 0xb40005ec, "e,f,g", 0 },
-{ "mr2mst.sd", 0x48000093, 0xb400056c, "e,f,g", 0 },
-{ "mr2mst.dd", 0x48000193, 0xb400046c, "e,f,g", 0 },
-{ "mi2s1.ss", 0x48000014, 0xb40005eb, "e,f,g", 0 },
-{ "mi2s1.sd", 0x48000094, 0xb400056b, "e,f,g", 0 },
-{ "mi2s1.dd", 0x48000194, 0xb400046b, "e,f,g", 0 },
-{ "mi2st.ss", 0x48000015, 0xb40005ea, "e,f,g", 0 },
-{ "mi2st.sd", 0x48000095, 0xb400056a, "e,f,g", 0 },
-{ "mi2st.dd", 0x48000195, 0xb400046a, "e,f,g", 0 },
-{ "mi2ms1.ss", 0x48000016, 0xb40005e9, "e,f,g", 0 },
-{ "mi2ms1.sd", 0x48000096, 0xb4000569, "e,f,g", 0 },
-{ "mi2ms1.dd", 0x48000196, 0xb4000469, "e,f,g", 0 },
-{ "mi2mst.ss", 0x48000017, 0xb40005e8, "e,f,g", 0 },
-{ "mi2mst.sd", 0x48000097, 0xb4000568, "e,f,g", 0 },
-{ "mi2mst.dd", 0x48000197, 0xb4000468, "e,f,g", 0 },
-{ "mrmt1s2.ss", 0x48000018, 0xb40005e7, "e,f,g", 0 },
-{ "mrmt1s2.sd", 0x48000098, 0xb4000567, "e,f,g", 0 },
-{ "mrmt1s2.dd", 0x48000198, 0xb4000467, "e,f,g", 0 },
-{ "mm12msm.ss", 0x48000019, 0xb40005e6, "e,f,g", 0 },
-{ "mm12msm.sd", 0x48000099, 0xb4000566, "e,f,g", 0 },
-{ "mm12msm.dd", 0x48000199, 0xb4000466, "e,f,g", 0 },
-{ "mrm1s2.ss", 0x4800001a, 0xb40005e5, "e,f,g", 0 },
-{ "mrm1s2.sd", 0x4800009a, 0xb4000565, "e,f,g", 0 },
-{ "mrm1s2.dd", 0x4800019a, 0xb4000465, "e,f,g", 0 },
-{ "mm12ttsm.ss",0x4800001b, 0xb40005e4, "e,f,g", 0 },
-{ "mm12ttsm.sd",0x4800009b, 0xb4000564, "e,f,g", 0 },
-{ "mm12ttsm.dd",0x4800019b, 0xb4000464, "e,f,g", 0 },
-{ "mimt1s2.ss", 0x4800001c, 0xb40005e3, "e,f,g", 0 },
-{ "mimt1s2.sd", 0x4800009c, 0xb4000563, "e,f,g", 0 },
-{ "mimt1s2.dd", 0x4800019c, 0xb4000463, "e,f,g", 0 },
-{ "mm12tsm.ss", 0x4800001d, 0xb40005e2, "e,f,g", 0 },
-{ "mm12tsm.sd", 0x4800009d, 0xb4000562, "e,f,g", 0 },
-{ "mm12tsm.dd", 0x4800019d, 0xb4000462, "e,f,g", 0 },
-{ "mim1s2.ss", 0x4800001e, 0xb40005e1, "e,f,g", 0 },
-{ "mim1s2.sd", 0x4800009e, 0xb4000561, "e,f,g", 0 },
-{ "mim1s2.dd", 0x4800019e, 0xb4000461, "e,f,g", 0 },
-
-{ "fmul.ss", 0x48000020, 0xb40005df, "e,f,g", 0 }, /* fmul.p fsrc1,fsrc2,fdest */
-{ "fmul.sd", 0x480000a0, 0xb400055f, "e,f,g", 0 }, /* fmul.p fsrc1,fsrc2,fdest */
-{ "fmul.dd", 0x480001a0, 0xb400045f, "e,f,g", 0 }, /* fmul.p fsrc1,fsrc2,fdest */
-{ "pfmul.ss", 0x48000420, 0xb40001df, "e,f,g", 0 }, /* pfmul.p fsrc1,fsrc2,fdest */
-{ "pfmul.sd", 0x480004a0, 0xb400015f, "e,f,g", 0 }, /* pfmul.p fsrc1,fsrc2,fdest */
-{ "pfmul.dd", 0x480005a0, 0xb400005f, "e,f,g", 0 }, /* pfmul.p fsrc1,fsrc2,fdest */
-{ "pfmul3.dd", 0x480005a4, 0xb400005b, "e,f,g", 0 }, /* pfmul3.p fsrc1,fsrc2,fdest */
-{ "fmlow.dd", 0x480001a1, 0xb400045e, "e,f,g", 0 }, /* fmlow.dd fsrc1,fsrc2,fdest */
-{ "frcp.ss", 0x48000022, 0xb40005dd, "f,g", 0 }, /* frcp.p fsrc2,fdest */
-{ "frcp.sd", 0x480000a2, 0xb400055d, "f,g", 0 }, /* frcp.p fsrc2,fdest */
-{ "frcp.dd", 0x480001a2, 0xb400045d, "f,g", 0 }, /* frcp.p fsrc2,fdest */
-{ "frsqr.ss", 0x48000023, 0xb40005dc, "f,g", 0 }, /* frsqr.p fsrc2,fdest */
-{ "frsqr.sd", 0x480000a3, 0xb400055c, "f,g", 0 }, /* frsqr.p fsrc2,fdest */
-{ "frsqr.dd", 0x480001a3, 0xb400045c, "f,g", 0 }, /* frsqr.p fsrc2,fdest */
-{ "fadd.ss", 0x48000030, 0xb40005cf, "e,f,g", 0 }, /* fadd.p fsrc1,fsrc2,fdest */
-{ "fadd.sd", 0x480000b0, 0xb400054f, "e,f,g", 0 }, /* fadd.p fsrc1,fsrc2,fdest */
-{ "fadd.dd", 0x480001b0, 0xb400044f, "e,f,g", 0 }, /* fadd.p fsrc1,fsrc2,fdest */
-{ "pfadd.ss", 0x48000430, 0xb40001cf, "e,f,g", 0 }, /* pfadd.p fsrc1,fsrc2,fdest */
-{ "pfadd.sd", 0x480004b0, 0xb400014f, "e,f,g", 0 }, /* pfadd.p fsrc1,fsrc2,fdest */
-{ "pfadd.dd", 0x480005b0, 0xb400004f, "e,f,g", 0 }, /* pfadd.p fsrc1,fsrc2,fdest */
-{ "fsub.ss", 0x48000031, 0xb40005ce, "e,f,g", 0 }, /* fsub.p fsrc1,fsrc2,fdest */
-{ "fsub.sd", 0x480000b1, 0xb400054e, "e,f,g", 0 }, /* fsub.p fsrc1,fsrc2,fdest */
-{ "fsub.dd", 0x480001b1, 0xb400044e, "e,f,g", 0 }, /* fsub.p fsrc1,fsrc2,fdest */
-{ "pfsub.ss", 0x48000431, 0xb40001ce, "e,f,g", 0 }, /* pfsub.p fsrc1,fsrc2,fdest */
-{ "pfsub.sd", 0x480004b1, 0xb400014e, "e,f,g", 0 }, /* pfsub.p fsrc1,fsrc2,fdest */
-{ "pfsub.dd", 0x480005b1, 0xb400004e, "e,f,g", 0 }, /* pfsub.p fsrc1,fsrc2,fdest */
-{ "fix.sd", 0x480000b2, 0xb400054d, "e,g", 0 }, /* fix.p fsrc1,fdest */
-{ "fix.dd", 0x480001b2, 0xb400044d, "e,g", 0 }, /* fix.p fsrc1,fdest */
-{ "pfix.sd", 0x480004b2, 0xb400014d, "e,g", 0 }, /* pfix.p fsrc1,fdest */
-{ "pfix.dd", 0x480005b2, 0xb400004d, "e,g", 0 }, /* pfix.p fsrc1,fdest */
-{ "famov.ss", 0x48000033, 0xb40005cc, "e,g", 0 }, /* famov.p fsrc1,fdest */
-{ "famov.ds", 0x48000133, 0xb40004cc, "e,g", 0 }, /* famov.p fsrc1,fdest */
-{ "famov.sd", 0x480000b3, 0xb400054c, "e,g", 0 }, /* famov.p fsrc1,fdest */
-{ "famov.dd", 0x480001b3, 0xb400044c, "e,g", 0 }, /* famov.p fsrc1,fdest */
-{ "pfamov.ss", 0x48000433, 0xb40001cc, "e,g", 0 }, /* pfamov.p fsrc1,fdest */
-{ "pfamov.ds", 0x48000533, 0xb40000cc, "e,g", 0 }, /* pfamov.p fsrc1,fdest */
-{ "pfamov.sd", 0x480004b3, 0xb400014c, "e,g", 0 }, /* pfamov.p fsrc1,fdest */
-{ "pfamov.dd", 0x480005b3, 0xb400004c, "e,g", 0 }, /* pfamov.p fsrc1,fdest */
-/* Opcode pfgt has R bit cleared; pfle has R bit set. */
-{ "pfgt.ss", 0x48000434, 0xb40001cb, "e,f,g", 0 }, /* pfgt.p fsrc1,fsrc2,fdest */
-{ "pfgt.dd", 0x48000534, 0xb40000cb, "e,f,g", 0 }, /* pfgt.p fsrc1,fsrc2,fdest */
-/* Opcode pfgt has R bit cleared; pfle has R bit set. */
-{ "pfle.ss", 0x480004b4, 0xb400014b, "e,f,g", 0 }, /* pfle.p fsrc1,fsrc2,fdest */
-{ "pfle.dd", 0x480005b4, 0xb400004b, "e,f,g", 0 }, /* pfle.p fsrc1,fsrc2,fdest */
-{ "pfeq.ss", 0x48000435, 0xb40001ca, "e,f,g", 0 }, /* pfeq.p fsrc1,fsrc2,fdest */
-{ "pfeq.dd", 0x48000535, 0xb40000ca, "e,f,g", 0 }, /* pfeq.p fsrc1,fsrc2,fdest */
-{ "ftrunc.sd", 0x480000ba, 0xb4000545, "e,g", 0 }, /* ftrunc.p fsrc1,fdest */
-{ "ftrunc.dd", 0x480001ba, 0xb4000445, "e,g", 0 }, /* ftrunc.p fsrc1,fdest */
-{ "pftrunc.sd", 0x480004ba, 0xb4000145, "e,g", 0 }, /* pftrunc.p fsrc1,fdest */
-{ "pftrunc.dd", 0x480005ba, 0xb4000045, "e,g", 0 }, /* pftrunc.p fsrc1,fdest */
-{ "fxfr", 0x48000040, 0xb40005bf, "e,d", 0 }, /* fxfr fsrc1,idest */
-{ "fiadd.ss", 0x48000049, 0xb40005b6, "e,f,g", 0 }, /* fiadd.w fsrc1,fsrc2,fdest */
-{ "fiadd.dd", 0x480001c9, 0xb4000436, "e,f,g", 0 }, /* fiadd.w fsrc1,fsrc2,fdest */
-{ "pfiadd.ss", 0x48000449, 0xb40001b6, "e,f,g", 0 }, /* pfiadd.w fsrc1,fsrc2,fdest */
-{ "pfiadd.dd", 0x480005c9, 0xb4000036, "e,f,g", 0 }, /* pfiadd.w fsrc1,fsrc2,fdest */
-{ "fisub.ss", 0x4800004d, 0xb40005b2, "e,f,g", 0 }, /* fisub.w fsrc1,fsrc2,fdest */
-{ "fisub.dd", 0x480001cd, 0xb4000432, "e,f,g", 0 }, /* fisub.w fsrc1,fsrc2,fdest */
-{ "pfisub.ss", 0x4800044d, 0xb40001b2, "e,f,g", 0 }, /* pfisub.w fsrc1,fsrc2,fdest */
-{ "pfisub.dd", 0x480005cd, 0xb4000032, "e,f,g", 0 }, /* pfisub.w fsrc1,fsrc2,fdest */
-{ "fzchkl", 0x480001d7, 0xb4000428, "e,f,g", 0 }, /* fzchkl fsrc1,fsrc2,fdest */
-{ "pfzchkl", 0x480005d7, 0xb4000028, "e,f,g", 0 }, /* pfzchkl fsrc1,fsrc2,fdest */
-{ "fzchks", 0x480001df, 0xb4000420, "e,f,g", 0 }, /* fzchks fsrc1,fsrc2,fdest */
-{ "pfzchks", 0x480005df, 0xb4000020, "e,f,g", 0 }, /* pfzchks fsrc1,fsrc2,fdest */
-{ "faddp", 0x480001d0, 0xb400042f, "e,f,g", 0 }, /* faddp fsrc1,fsrc2,fdest */
-{ "pfaddp", 0x480005d0, 0xb400002f, "e,f,g", 0 }, /* pfaddp fsrc1,fsrc2,fdest */
-{ "faddz", 0x480001d1, 0xb400042e, "e,f,g", 0 }, /* faddz fsrc1,fsrc2,fdest */
-{ "pfaddz", 0x480005d1, 0xb400002e, "e,f,g", 0 }, /* pfaddz fsrc1,fsrc2,fdest */
-{ "form", 0x480001da, 0xb4000425, "e,g", 0 }, /* form fsrc1,fdest */
-{ "pform", 0x480005da, 0xb4000025, "e,g", 0 }, /* pform fsrc1,fdest */
-
-/* Floating point pseudo-instructions. */
-{ "fmov.ss", 0x48000049, 0xb7e005b6, "e,g", 0 }, /* fiadd.ss fsrc1,f0,fdest */
-{ "fmov.dd", 0x480001c9, 0xb7e00436, "e,g", 0 }, /* fiadd.dd fsrc1,f0,fdest */
-{ "fmov.sd", 0x480000b3, 0xb400054c, "e,g", 0 }, /* famov.sd fsrc1,fdest */
-{ "fmov.ds", 0x48000133, 0xb40004cc, "e,g", 0 }, /* famov.ds fsrc1,fdest */
-{ "pfmov.ds", 0x48000533, 0xb40000cc, "e,g", 0 }, /* pfamov.ds fsrc1,fdest */
-{ "pfmov.dd", 0x480005c9, 0xb7e00036, "e,g", 0 }, /* pfiadd.dd fsrc1,f0,fdest */
-{ 0, 0, 0, 0, 0 },
-
-};
-
-#define NUMOPCODES ((sizeof i860_opcodes)/(sizeof i860_opcodes[0]))
-
-
diff --git a/include/opcode/i960.h b/include/opcode/i960.h
deleted file mode 100644
index 0999aa1..0000000
--- a/include/opcode/i960.h
+++ /dev/null
@@ -1,525 +0,0 @@
-/* Basic 80960 instruction formats.
-
- Copyright 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor,
- Boston, MA 02110-1301, USA.
-
- The 'COJ' instructions are actually COBR instructions with the 'b' in
- the mnemonic replaced by a 'j'; they are ALWAYS "de-optimized" if necessary:
- if the displacement will not fit in 13 bits, the assembler will replace them
- with the corresponding compare and branch instructions.
-
- All of the 'MEMn' instructions are the same format; the 'n' in the name
- indicates the default index scale factor (the size of the datum operated on).
-
- The FBRA formats are not actually an instruction format. They are the
- "convenience directives" for branching on floating-point comparisons,
- each of which generates 2 instructions (a 'bno' and one other branch).
-
- The CALLJ format is not actually an instruction format. It indicates that
- the instruction generated (a CTRL-format 'call') should have its relocation
- specially flagged for link-time replacement with a 'bal' or 'calls' if
- appropriate. */
-
-#define CTRL 0
-#define COBR 1
-#define COJ 2
-#define REG 3
-#define MEM1 4
-#define MEM2 5
-#define MEM4 6
-#define MEM8 7
-#define MEM12 8
-#define MEM16 9
-#define FBRA 10
-#define CALLJ 11
-
-/* Masks for the mode bits in REG format instructions */
-#define M1 0x0800
-#define M2 0x1000
-#define M3 0x2000
-
-/* Generate the 12-bit opcode for a REG format instruction by placing the
- * high 8 bits in instruction bits 24-31, the low 4 bits in instruction bits
- * 7-10.
- */
-
-#define REG_OPC(opc) ((opc & 0xff0) << 20) | ((opc & 0xf) << 7)
-
-/* Generate a template for a REG format instruction: place the opcode bits
- * in the appropriate fields and OR in mode bits for the operands that will not
- * be used. I.e.,
- * set m1=1, if src1 will not be used
- * set m2=1, if src2 will not be used
- * set m3=1, if dst will not be used
- *
- * Setting the "unused" mode bits to 1 speeds up instruction execution(!).
- * The information is also useful to us because some 1-operand REG instructions
- * use the src1 field, others the dst field; and some 2-operand REG instructions
- * use src1/src2, others src1/dst. The set mode bits enable us to distinguish.
- */
-#define R_0(opc) ( REG_OPC(opc) | M1 | M2 | M3 ) /* No operands */
-#define R_1(opc) ( REG_OPC(opc) | M2 | M3 ) /* 1 operand: src1 */
-#define R_1D(opc) ( REG_OPC(opc) | M1 | M2 ) /* 1 operand: dst */
-#define R_2(opc) ( REG_OPC(opc) | M3 ) /* 2 ops: src1/src2 */
-#define R_2D(opc) ( REG_OPC(opc) | M2 ) /* 2 ops: src1/dst */
-#define R_3(opc) ( REG_OPC(opc) ) /* 3 operands */
-
-/* DESCRIPTOR BYTES FOR REGISTER OPERANDS
- *
- * Interpret names as follows:
- * R: global or local register only
- * RS: global, local, or (if target allows) special-function register only
- * RL: global or local register, or integer literal
- * RSL: global, local, or (if target allows) special-function register;
- * or integer literal
- * F: global, local, or floating-point register
- * FL: global, local, or floating-point register; or literal (including
- * floating point)
- *
- * A number appended to a name indicates that registers must be aligned,
- * as follows:
- * 2: register number must be multiple of 2
- * 4: register number must be multiple of 4
- */
-
-#define SFR 0x10 /* Mask for the "sfr-OK" bit */
-#define LIT 0x08 /* Mask for the "literal-OK" bit */
-#define FP 0x04 /* Mask for "floating-point-OK" bit */
-
-/* This macro ors the bits together. Note that 'align' is a mask
- * for the low 0, 1, or 2 bits of the register number, as appropriate.
- */
-#define OP(align,lit,fp,sfr) ( align | lit | fp | sfr )
-
-#define R OP( 0, 0, 0, 0 )
-#define RS OP( 0, 0, 0, SFR )
-#define RL OP( 0, LIT, 0, 0 )
-#define RSL OP( 0, LIT, 0, SFR )
-#define F OP( 0, 0, FP, 0 )
-#define FL OP( 0, LIT, FP, 0 )
-#define R2 OP( 1, 0, 0, 0 )
-#define RL2 OP( 1, LIT, 0, 0 )
-#define F2 OP( 1, 0, FP, 0 )
-#define FL2 OP( 1, LIT, FP, 0 )
-#define R4 OP( 3, 0, 0, 0 )
-#define RL4 OP( 3, LIT, 0, 0 )
-#define F4 OP( 3, 0, FP, 0 )
-#define FL4 OP( 3, LIT, FP, 0 )
-
-#define M 0x7f /* Memory operand (MEMA & MEMB format instructions) */
-
-/* Macros to extract info from the register operand descriptor byte 'od'.
- */
-#define SFR_OK(od) (od & SFR) /* TRUE if sfr operand allowed */
-#define LIT_OK(od) (od & LIT) /* TRUE if literal operand allowed */
-#define FP_OK(od) (od & FP) /* TRUE if floating-point op allowed */
-#define REG_ALIGN(od,n) ((od & 0x3 & n) == 0)
- /* TRUE if reg #n is properly aligned */
-#define MEMOP(od) (od == M) /* TRUE if operand is a memory operand*/
-
-/* Description of a single i80960 instruction */
-struct i960_opcode {
- long opcode; /* 32 bits, constant fields filled in, rest zeroed */
- char *name; /* Assembler mnemonic */
- short iclass; /* Class: see #defines below */
- char format; /* REG, COBR, CTRL, MEMn, COJ, FBRA, or CALLJ */
- char num_ops; /* Number of operands */
- char operand[3];/* Operand descriptors; same order as assembler instr */
-};
-
-/* Classes of 960 intructions:
- * - each instruction falls into one class.
- * - each target architecture supports one or more classes.
- *
- * EACH CONSTANT MUST CONTAIN 1 AND ONLY 1 SET BIT!: see targ_has_iclass().
- */
-#define I_BASE 0x01 /* 80960 base instruction set */
-#define I_CX 0x02 /* 80960Cx instruction */
-#define I_DEC 0x04 /* Decimal instruction */
-#define I_FP 0x08 /* Floating point instruction */
-#define I_KX 0x10 /* 80960Kx instruction */
-#define I_MIL 0x20 /* Military instruction */
-#define I_CASIM 0x40 /* CA simulator instruction */
-#define I_CX2 0x80 /* Cx/Jx/Hx instructions */
-#define I_JX 0x100 /* Jx/Hx instruction */
-#define I_HX 0x200 /* Hx instructions */
-
-/******************************************************************************
- *
- * TABLE OF i960 INSTRUCTION DESCRIPTIONS
- *
- ******************************************************************************/
-
-const struct i960_opcode i960_opcodes[] = {
-
- /* if a CTRL instruction has an operand, it's always a displacement */
-
- /* callj default=='call' */
- { 0x09000000, "callj", I_BASE, CALLJ, 1, { 0, 0, 0 } },
- { 0x08000000, "b", I_BASE, CTRL, 1, { 0, 0, 0 } },
- { 0x09000000, "call", I_BASE, CTRL, 1, { 0, 0, 0 } },
- { 0x0a000000, "ret", I_BASE, CTRL, 0, { 0, 0, 0 } },
- { 0x0b000000, "bal", I_BASE, CTRL, 1, { 0, 0, 0 } },
- { 0x10000000, "bno", I_BASE, CTRL, 1, { 0, 0, 0 } },
- /* bf same as bno */
- { 0x10000000, "bf", I_BASE, CTRL, 1, { 0, 0, 0 } },
- /* bru same as bno */
- { 0x10000000, "bru", I_BASE, CTRL, 1, { 0, 0, 0 } },
- { 0x11000000, "bg", I_BASE, CTRL, 1, { 0, 0, 0 } },
- /* brg same as bg */
- { 0x11000000, "brg", I_BASE, CTRL, 1, { 0, 0, 0 } },
- { 0x12000000, "be", I_BASE, CTRL, 1, { 0, 0, 0 } },
- /* bre same as be */
- { 0x12000000, "bre", I_BASE, CTRL, 1, { 0, 0, 0 } },
- { 0x13000000, "bge", I_BASE, CTRL, 1, { 0, 0, 0 } },
- /* brge same as bge */
- { 0x13000000, "brge", I_BASE, CTRL, 1, { 0, 0, 0 } },
- { 0x14000000, "bl", I_BASE, CTRL, 1, { 0, 0, 0 } },
- /* brl same as bl */
- { 0x14000000, "brl", I_BASE, CTRL, 1, { 0, 0, 0 } },
- { 0x15000000, "bne", I_BASE, CTRL, 1, { 0, 0, 0 } },
- /* brlg same as bne */
- { 0x15000000, "brlg", I_BASE, CTRL, 1, { 0, 0, 0 } },
- { 0x16000000, "ble", I_BASE, CTRL, 1, { 0, 0, 0 } },
- /* brle same as ble */
- { 0x16000000, "brle", I_BASE, CTRL, 1, { 0, 0, 0 } },
- { 0x17000000, "bo", I_BASE, CTRL, 1, { 0, 0, 0 } },
- /* bt same as bo */
- { 0x17000000, "bt", I_BASE, CTRL, 1, { 0, 0, 0 } },
- /* bro same as bo */
- { 0x17000000, "bro", I_BASE, CTRL, 1, { 0, 0, 0 } },
- { 0x18000000, "faultno", I_BASE, CTRL, 0, { 0, 0, 0 } },
- /* faultf same as faultno */
- { 0x18000000, "faultf", I_BASE, CTRL, 0, { 0, 0, 0 } },
- { 0x19000000, "faultg", I_BASE, CTRL, 0, { 0, 0, 0 } },
- { 0x1a000000, "faulte", I_BASE, CTRL, 0, { 0, 0, 0 } },
- { 0x1b000000, "faultge", I_BASE, CTRL, 0, { 0, 0, 0 } },
- { 0x1c000000, "faultl", I_BASE, CTRL, 0, { 0, 0, 0 } },
- { 0x1d000000, "faultne", I_BASE, CTRL, 0, { 0, 0, 0 } },
- { 0x1e000000, "faultle", I_BASE, CTRL, 0, { 0, 0, 0 } },
- { 0x1f000000, "faulto", I_BASE, CTRL, 0, { 0, 0, 0 } },
- /* faultt syn for faulto */
- { 0x1f000000, "faultt", I_BASE, CTRL, 0, { 0, 0, 0 } },
-
- { 0x01000000, "syscall", I_CASIM,CTRL, 0, { 0, 0, 0 } },
-
- /* If a COBR (or COJ) has 3 operands, the last one is always a
- * displacement and does not appear explicitly in the table.
- */
-
- { 0x20000000, "testno", I_BASE, COBR, 1, { R, 0, 0 } },
- { 0x21000000, "testg", I_BASE, COBR, 1, { R, 0, 0 } },
- { 0x22000000, "teste", I_BASE, COBR, 1, { R, 0, 0 } },
- { 0x23000000, "testge", I_BASE, COBR, 1, { R, 0, 0 } },
- { 0x24000000, "testl", I_BASE, COBR, 1, { R, 0, 0 } },
- { 0x25000000, "testne", I_BASE, COBR, 1, { R, 0, 0 } },
- { 0x26000000, "testle", I_BASE, COBR, 1, { R, 0, 0 } },
- { 0x27000000, "testo", I_BASE, COBR, 1, { R, 0, 0 } },
- { 0x30000000, "bbc", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x31000000, "cmpobg", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x32000000, "cmpobe", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x33000000, "cmpobge", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x34000000, "cmpobl", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x35000000, "cmpobne", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x36000000, "cmpoble", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x37000000, "bbs", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x38000000, "cmpibno", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x39000000, "cmpibg", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x3a000000, "cmpibe", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x3b000000, "cmpibge", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x3c000000, "cmpibl", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x3d000000, "cmpibne", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x3e000000, "cmpible", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x3f000000, "cmpibo", I_BASE, COBR, 3, { RL, RS, 0 } },
- { 0x31000000, "cmpojg", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x32000000, "cmpoje", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x33000000, "cmpojge", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x34000000, "cmpojl", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x35000000, "cmpojne", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x36000000, "cmpojle", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x38000000, "cmpijno", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x39000000, "cmpijg", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x3a000000, "cmpije", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x3b000000, "cmpijge", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x3c000000, "cmpijl", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x3d000000, "cmpijne", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x3e000000, "cmpijle", I_BASE, COJ, 3, { RL, RS, 0 } },
- { 0x3f000000, "cmpijo", I_BASE, COJ, 3, { RL, RS, 0 } },
-
- { 0x80000000, "ldob", I_BASE, MEM1, 2, { M, R, 0 } },
- { 0x82000000, "stob", I_BASE, MEM1, 2, { R, M, 0 } },
- { 0x84000000, "bx", I_BASE, MEM1, 1, { M, 0, 0 } },
- { 0x85000000, "balx", I_BASE, MEM1, 2, { M, R, 0 } },
- { 0x86000000, "callx", I_BASE, MEM1, 1, { M, 0, 0 } },
- { 0x88000000, "ldos", I_BASE, MEM2, 2, { M, R, 0 } },
- { 0x8a000000, "stos", I_BASE, MEM2, 2, { R, M, 0 } },
- { 0x8c000000, "lda", I_BASE, MEM1, 2, { M, R, 0 } },
- { 0x90000000, "ld", I_BASE, MEM4, 2, { M, R, 0 } },
- { 0x92000000, "st", I_BASE, MEM4, 2, { R, M, 0 } },
- { 0x98000000, "ldl", I_BASE, MEM8, 2, { M, R2, 0 } },
- { 0x9a000000, "stl", I_BASE, MEM8, 2, { R2, M, 0 } },
- { 0xa0000000, "ldt", I_BASE, MEM12, 2, { M, R4, 0 } },
- { 0xa2000000, "stt", I_BASE, MEM12, 2, { R4, M, 0 } },
- { 0xb0000000, "ldq", I_BASE, MEM16, 2, { M, R4, 0 } },
- { 0xb2000000, "stq", I_BASE, MEM16, 2, { R4, M, 0 } },
- { 0xc0000000, "ldib", I_BASE, MEM1, 2, { M, R, 0 } },
- { 0xc2000000, "stib", I_BASE, MEM1, 2, { R, M, 0 } },
- { 0xc8000000, "ldis", I_BASE, MEM2, 2, { M, R, 0 } },
- { 0xca000000, "stis", I_BASE, MEM2, 2, { R, M, 0 } },
-
- { R_3(0x580), "notbit", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x581), "and", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x582), "andnot", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x583), "setbit", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x584), "notand", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x586), "xor", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x587), "or", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x588), "nor", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x589), "xnor", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_2D(0x58a), "not", I_BASE, REG, 2, { RSL,RS, 0 } },
- { R_3(0x58b), "ornot", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x58c), "clrbit", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x58d), "notor", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x58e), "nand", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x58f), "alterbit", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x590), "addo", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x591), "addi", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x592), "subo", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x593), "subi", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x598), "shro", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x59a), "shrdi", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x59b), "shri", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x59c), "shlo", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x59d), "rotate", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x59e), "shli", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_2(0x5a0), "cmpo", I_BASE, REG, 2, { RSL,RSL, 0 } },
- { R_2(0x5a1), "cmpi", I_BASE, REG, 2, { RSL,RSL, 0 } },
- { R_2(0x5a2), "concmpo", I_BASE, REG, 2, { RSL,RSL, 0 } },
- { R_2(0x5a3), "concmpi", I_BASE, REG, 2, { RSL,RSL, 0 } },
- { R_3(0x5a4), "cmpinco", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x5a5), "cmpinci", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x5a6), "cmpdeco", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x5a7), "cmpdeci", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_2(0x5ac), "scanbyte", I_BASE, REG, 2, { RSL,RSL, 0 } },
- { R_2(0x5ae), "chkbit", I_BASE, REG, 2, { RSL,RSL, 0 } },
- { R_3(0x5b0), "addc", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x5b2), "subc", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_2D(0x5cc), "mov", I_BASE, REG, 2, { RSL,RS, 0 } },
- { R_2D(0x5dc), "movl", I_BASE, REG, 2, { RL2,R2, 0 } },
- { R_2D(0x5ec), "movt", I_BASE, REG, 2, { RL4,R4, 0 } },
- { R_2D(0x5fc), "movq", I_BASE, REG, 2, { RL4,R4, 0 } },
- { R_3(0x610), "atmod", I_BASE, REG, 3, { RS, RSL,R } },
- { R_3(0x612), "atadd", I_BASE, REG, 3, { RS, RSL,RS } },
- { R_2D(0x640), "spanbit", I_BASE, REG, 2, { RSL,RS, 0 } },
- { R_2D(0x641), "scanbit", I_BASE, REG, 2, { RSL,RS, 0 } },
- { R_3(0x645), "modac", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x650), "modify", I_BASE, REG, 3, { RSL,RSL,R } },
- { R_3(0x651), "extract", I_BASE, REG, 3, { RSL,RSL,R } },
- { R_3(0x654), "modtc", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x655), "modpc", I_BASE, REG, 3, { RSL,RSL,R } },
- { R_1(0x660), "calls", I_BASE, REG, 1, { RSL, 0, 0 } },
- { R_0(0x66b), "mark", I_BASE, REG, 0, { 0, 0, 0 } },
- { R_0(0x66c), "fmark", I_BASE, REG, 0, { 0, 0, 0 } },
- { R_0(0x66d), "flushreg", I_BASE, REG, 0, { 0, 0, 0 } },
- { R_0(0x66f), "syncf", I_BASE, REG, 0, { 0, 0, 0 } },
- { R_3(0x670), "emul", I_BASE, REG, 3, { RSL,RSL,R2 } },
- { R_3(0x671), "ediv", I_BASE, REG, 3, { RSL,RL2,RS } },
- { R_2D(0x672), "cvtadr", I_CASIM,REG, 2, { RL, R2, 0 } },
- { R_3(0x701), "mulo", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x708), "remo", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x70b), "divo", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x741), "muli", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x748), "remi", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x749), "modi", I_BASE, REG, 3, { RSL,RSL,RS } },
- { R_3(0x74b), "divi", I_BASE, REG, 3, { RSL,RSL,RS } },
-
- /* Floating-point instructions */
-
- { R_2D(0x674), "cvtir", I_FP, REG, 2, { RL, F, 0 } },
- { R_2D(0x675), "cvtilr", I_FP, REG, 2, { RL, F, 0 } },
- { R_3(0x676), "scalerl", I_FP, REG, 3, { RL, FL2,F2 } },
- { R_3(0x677), "scaler", I_FP, REG, 3, { RL, FL, F } },
- { R_3(0x680), "atanr", I_FP, REG, 3, { FL, FL, F } },
- { R_3(0x681), "logepr", I_FP, REG, 3, { FL, FL, F } },
- { R_3(0x682), "logr", I_FP, REG, 3, { FL, FL, F } },
- { R_3(0x683), "remr", I_FP, REG, 3, { FL, FL, F } },
- { R_2(0x684), "cmpor", I_FP, REG, 2, { FL, FL, 0 } },
- { R_2(0x685), "cmpr", I_FP, REG, 2, { FL, FL, 0 } },
- { R_2D(0x688), "sqrtr", I_FP, REG, 2, { FL, F, 0 } },
- { R_2D(0x689), "expr", I_FP, REG, 2, { FL, F, 0 } },
- { R_2D(0x68a), "logbnr", I_FP, REG, 2, { FL, F, 0 } },
- { R_2D(0x68b), "roundr", I_FP, REG, 2, { FL, F, 0 } },
- { R_2D(0x68c), "sinr", I_FP, REG, 2, { FL, F, 0 } },
- { R_2D(0x68d), "cosr", I_FP, REG, 2, { FL, F, 0 } },
- { R_2D(0x68e), "tanr", I_FP, REG, 2, { FL, F, 0 } },
- { R_1(0x68f), "classr", I_FP, REG, 1, { FL, 0, 0 } },
- { R_3(0x690), "atanrl", I_FP, REG, 3, { FL2,FL2,F2 } },
- { R_3(0x691), "logeprl", I_FP, REG, 3, { FL2,FL2,F2 } },
- { R_3(0x692), "logrl", I_FP, REG, 3, { FL2,FL2,F2 } },
- { R_3(0x693), "remrl", I_FP, REG, 3, { FL2,FL2,F2 } },
- { R_2(0x694), "cmporl", I_FP, REG, 2, { FL2,FL2, 0 } },
- { R_2(0x695), "cmprl", I_FP, REG, 2, { FL2,FL2, 0 } },
- { R_2D(0x698), "sqrtrl", I_FP, REG, 2, { FL2,F2, 0 } },
- { R_2D(0x699), "exprl", I_FP, REG, 2, { FL2,F2, 0 } },
- { R_2D(0x69a), "logbnrl", I_FP, REG, 2, { FL2,F2, 0 } },
- { R_2D(0x69b), "roundrl", I_FP, REG, 2, { FL2,F2, 0 } },
- { R_2D(0x69c), "sinrl", I_FP, REG, 2, { FL2,F2, 0 } },
- { R_2D(0x69d), "cosrl", I_FP, REG, 2, { FL2,F2, 0 } },
- { R_2D(0x69e), "tanrl", I_FP, REG, 2, { FL2,F2, 0 } },
- { R_1(0x69f), "classrl", I_FP, REG, 1, { FL2, 0, 0 } },
- { R_2D(0x6c0), "cvtri", I_FP, REG, 2, { FL, R, 0 } },
- { R_2D(0x6c1), "cvtril", I_FP, REG, 2, { FL, R2, 0 } },
- { R_2D(0x6c2), "cvtzri", I_FP, REG, 2, { FL, R, 0 } },
- { R_2D(0x6c3), "cvtzril", I_FP, REG, 2, { FL, R2, 0 } },
- { R_2D(0x6c9), "movr", I_FP, REG, 2, { FL, F, 0 } },
- { R_2D(0x6d9), "movrl", I_FP, REG, 2, { FL2,F2, 0 } },
- { R_2D(0x6e1), "movre", I_FP, REG, 2, { FL4,F4, 0 } },
- { R_3(0x6e2), "cpysre", I_FP, REG, 3, { FL4,FL4,F4 } },
- { R_3(0x6e3), "cpyrsre", I_FP, REG, 3, { FL4,FL4,F4 } },
- { R_3(0x78b), "divr", I_FP, REG, 3, { FL, FL, F } },
- { R_3(0x78c), "mulr", I_FP, REG, 3, { FL, FL, F } },
- { R_3(0x78d), "subr", I_FP, REG, 3, { FL, FL, F } },
- { R_3(0x78f), "addr", I_FP, REG, 3, { FL, FL, F } },
- { R_3(0x79b), "divrl", I_FP, REG, 3, { FL2,FL2,F2 } },
- { R_3(0x79c), "mulrl", I_FP, REG, 3, { FL2,FL2,F2 } },
- { R_3(0x79d), "subrl", I_FP, REG, 3, { FL2,FL2,F2 } },
- { R_3(0x79f), "addrl", I_FP, REG, 3, { FL2,FL2,F2 } },
-
- /* These are the floating point branch instructions. Each actually
- * generates 2 branch instructions: the first a CTRL instruction with
- * the indicated opcode, and the second a 'bno'.
- */
-
- { 0x12000000, "brue", I_FP, FBRA, 1, { 0, 0, 0 } },
- { 0x11000000, "brug", I_FP, FBRA, 1, { 0, 0, 0 } },
- { 0x13000000, "bruge", I_FP, FBRA, 1, { 0, 0, 0 } },
- { 0x14000000, "brul", I_FP, FBRA, 1, { 0, 0, 0 } },
- { 0x16000000, "brule", I_FP, FBRA, 1, { 0, 0, 0 } },
- { 0x15000000, "brulg", I_FP, FBRA, 1, { 0, 0, 0 } },
-
-
- /* Decimal instructions */
-
- { R_3(0x642), "daddc", I_DEC, REG, 3, { RSL,RSL,RS } },
- { R_3(0x643), "dsubc", I_DEC, REG, 3, { RSL,RSL,RS } },
- { R_2D(0x644), "dmovt", I_DEC, REG, 2, { RSL,RS, 0 } },
-
-
- /* KX extensions */
-
- { R_2(0x600), "synmov", I_KX, REG, 2, { R, R, 0 } },
- { R_2(0x601), "synmovl", I_KX, REG, 2, { R, R, 0 } },
- { R_2(0x602), "synmovq", I_KX, REG, 2, { R, R, 0 } },
- { R_2D(0x615), "synld", I_KX, REG, 2, { R, R, 0 } },
-
-
- /* MC extensions */
-
- { R_3(0x603), "cmpstr", I_MIL, REG, 3, { R, R, RL } },
- { R_3(0x604), "movqstr", I_MIL, REG, 3, { R, R, RL } },
- { R_3(0x605), "movstr", I_MIL, REG, 3, { R, R, RL } },
- { R_2D(0x613), "inspacc", I_MIL, REG, 2, { R, R, 0 } },
- { R_2D(0x614), "ldphy", I_MIL, REG, 2, { R, R, 0 } },
- { R_3(0x617), "fill", I_MIL, REG, 3, { R, RL, RL } },
- { R_2D(0x646), "condrec", I_MIL, REG, 2, { R, R, 0 } },
- { R_2D(0x656), "receive", I_MIL, REG, 2, { R, R, 0 } },
- { R_3(0x662), "send", I_MIL, REG, 3, { R, RL, R } },
- { R_1(0x663), "sendserv", I_MIL, REG, 1, { R, 0, 0 } },
- { R_1(0x664), "resumprcs", I_MIL, REG, 1, { R, 0, 0 } },
- { R_1(0x665), "schedprcs", I_MIL, REG, 1, { R, 0, 0 } },
- { R_0(0x666), "saveprcs", I_MIL, REG, 0, { 0, 0, 0 } },
- { R_1(0x668), "condwait", I_MIL, REG, 1, { R, 0, 0 } },
- { R_1(0x669), "wait", I_MIL, REG, 1, { R, 0, 0 } },
- { R_1(0x66a), "signal", I_MIL, REG, 1, { R, 0, 0 } },
- { R_1D(0x673), "ldtime", I_MIL, REG, 1, { R2, 0, 0 } },
-
-
- /* CX extensions */
-
- { R_3(0x5d8), "eshro", I_CX2, REG, 3, { RSL,RSL,RS } },
- { R_3(0x630), "sdma", I_CX, REG, 3, { RSL,RSL,RL } },
- { R_3(0x631), "udma", I_CX, REG, 0, { 0, 0, 0 } },
- { R_3(0x659), "sysctl", I_CX2, REG, 3, { RSL,RSL,RL } },
-
-
- /* Jx extensions. */
- { R_3(0x780), "addono", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x790), "addog", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7a0), "addoe", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7b0), "addoge", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7c0), "addol", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7d0), "addone", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7e0), "addole", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7f0), "addoo", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x781), "addino", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x791), "addig", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7a1), "addie", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7b1), "addige", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7c1), "addil", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7d1), "addine", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7e1), "addile", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7f1), "addio", I_JX, REG, 3, { RSL,RSL,RS } },
-
- { R_2D(0x5ad), "bswap", I_JX, REG, 2, { RSL, RS, 0 } },
-
- { R_2(0x594), "cmpob", I_JX, REG, 2, { RSL,RSL, 0 } },
- { R_2(0x595), "cmpib", I_JX, REG, 2, { RSL,RSL, 0 } },
- { R_2(0x596), "cmpos", I_JX, REG, 2, { RSL,RSL, 0 } },
- { R_2(0x597), "cmpis", I_JX, REG, 2, { RSL,RSL, 0 } },
-
- { R_3(0x784), "selno", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x794), "selg", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7a4), "sele", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7b4), "selge", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7c4), "sell", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7d4), "selne", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7e4), "selle", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7f4), "selo", I_JX, REG, 3, { RSL,RSL,RS } },
-
- { R_3(0x782), "subono", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x792), "subog", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7a2), "suboe", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7b2), "suboge", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7c2), "subol", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7d2), "subone", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7e2), "subole", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7f2), "suboo", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x783), "subino", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x793), "subig", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7a3), "subie", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7b3), "subige", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7c3), "subil", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7d3), "subine", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7e3), "subile", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_3(0x7f3), "subio", I_JX, REG, 3, { RSL,RSL,RS } },
-
- { R_3(0x65c), "dcctl", I_JX, REG, 3, { RSL,RSL,RL } },
- { R_3(0x65b), "icctl", I_JX, REG, 3, { RSL,RSL,RS } },
- { R_2D(0x658), "intctl", I_JX, REG, 2, { RSL, RS, 0 } },
- { R_0(0x5b4), "intdis", I_JX, REG, 0, { 0, 0, 0 } },
- { R_0(0x5b5), "inten", I_JX, REG, 0, { 0, 0, 0 } },
- { R_0(0x65d), "halt", I_JX, REG, 1, { RSL, 0, 0 } },
-
- /* Hx extensions. */
- { 0xac000000, "dcinva", I_HX, MEM1, 1, { M, 0, 0 } },
-
- /* END OF TABLE */
-
- { 0, NULL, 0, 0, 0, { 0, 0, 0 } }
-};
-
- /* end of i960-opcode.h */
diff --git a/include/opcode/ia64.h b/include/opcode/ia64.h
deleted file mode 100644
index 280862d..0000000
--- a/include/opcode/ia64.h
+++ /dev/null
@@ -1,397 +0,0 @@
-/* ia64.h -- Header file for ia64 opcode table
- Copyright (C) 1998, 1999, 2000, 2002, 2005, 2006
- Free Software Foundation, Inc.
- Contributed by David Mosberger-Tang <davidm@hpl.hp.com> */
-
-#ifndef opcode_ia64_h
-#define opcode_ia64_h
-
-#include <sys/types.h>
-
-#include "bfd.h"
-
-
-typedef BFD_HOST_U_64_BIT ia64_insn;
-
-enum ia64_insn_type
- {
- IA64_TYPE_NIL = 0, /* illegal type */
- IA64_TYPE_A, /* integer alu (I- or M-unit) */
- IA64_TYPE_I, /* non-alu integer (I-unit) */
- IA64_TYPE_M, /* memory (M-unit) */
- IA64_TYPE_B, /* branch (B-unit) */
- IA64_TYPE_F, /* floating-point (F-unit) */
- IA64_TYPE_X, /* long encoding (X-unit) */
- IA64_TYPE_DYN, /* Dynamic opcode */
- IA64_NUM_TYPES
- };
-
-enum ia64_unit
- {
- IA64_UNIT_NIL = 0, /* illegal unit */
- IA64_UNIT_I, /* integer unit */
- IA64_UNIT_M, /* memory unit */
- IA64_UNIT_B, /* branching unit */
- IA64_UNIT_F, /* floating-point unit */
- IA64_UNIT_L, /* long "unit" */
- IA64_UNIT_X, /* may be integer or branch unit */
- IA64_NUM_UNITS
- };
-
-/* Changes to this enumeration must be propagated to the operand table in
- bfd/cpu-ia64-opc.c
- */
-enum ia64_opnd
- {
- IA64_OPND_NIL, /* no operand---MUST BE FIRST!*/
-
- /* constants */
- IA64_OPND_AR_CSD, /* application register csd (ar.csd) */
- IA64_OPND_AR_CCV, /* application register ccv (ar.ccv) */
- IA64_OPND_AR_PFS, /* application register pfs (ar.pfs) */
- IA64_OPND_C1, /* the constant 1 */
- IA64_OPND_C8, /* the constant 8 */
- IA64_OPND_C16, /* the constant 16 */
- IA64_OPND_GR0, /* gr0 */
- IA64_OPND_IP, /* instruction pointer (ip) */
- IA64_OPND_PR, /* predicate register (pr) */
- IA64_OPND_PR_ROT, /* rotating predicate register (pr.rot) */
- IA64_OPND_PSR, /* processor status register (psr) */
- IA64_OPND_PSR_L, /* processor status register L (psr.l) */
- IA64_OPND_PSR_UM, /* processor status register UM (psr.um) */
-
- /* register operands: */
- IA64_OPND_AR3, /* third application register # (bits 20-26) */
- IA64_OPND_B1, /* branch register # (bits 6-8) */
- IA64_OPND_B2, /* branch register # (bits 13-15) */
- IA64_OPND_CR3, /* third control register # (bits 20-26) */
- IA64_OPND_F1, /* first floating-point register # */
- IA64_OPND_F2, /* second floating-point register # */
- IA64_OPND_F3, /* third floating-point register # */
- IA64_OPND_F4, /* fourth floating-point register # */
- IA64_OPND_P1, /* first predicate # */
- IA64_OPND_P2, /* second predicate # */
- IA64_OPND_R1, /* first register # */
- IA64_OPND_R2, /* second register # */
- IA64_OPND_R3, /* third register # */
- IA64_OPND_R3_2, /* third register # (limited to gr0-gr3) */
-
- /* memory operands: */
- IA64_OPND_MR3, /* memory at addr of third register # */
-
- /* indirect operands: */
- IA64_OPND_CPUID_R3, /* cpuid[reg] */
- IA64_OPND_DBR_R3, /* dbr[reg] */
- IA64_OPND_DTR_R3, /* dtr[reg] */
- IA64_OPND_ITR_R3, /* itr[reg] */
- IA64_OPND_IBR_R3, /* ibr[reg] */
- IA64_OPND_MSR_R3, /* msr[reg] */
- IA64_OPND_PKR_R3, /* pkr[reg] */
- IA64_OPND_PMC_R3, /* pmc[reg] */
- IA64_OPND_PMD_R3, /* pmd[reg] */
- IA64_OPND_RR_R3, /* rr[reg] */
-
- /* immediate operands: */
- IA64_OPND_CCNT5, /* 5-bit count (31 - bits 20-24) */
- IA64_OPND_CNT2a, /* 2-bit count (1 + bits 27-28) */
- IA64_OPND_CNT2b, /* 2-bit count (bits 27-28): 1, 2, 3 */
- IA64_OPND_CNT2c, /* 2-bit count (bits 30-31): 0, 7, 15, or 16 */
- IA64_OPND_CNT5, /* 5-bit count (bits 14-18) */
- IA64_OPND_CNT6, /* 6-bit count (bits 27-32) */
- IA64_OPND_CPOS6a, /* 6-bit count (63 - bits 20-25) */
- IA64_OPND_CPOS6b, /* 6-bit count (63 - bits 14-19) */
- IA64_OPND_CPOS6c, /* 6-bit count (63 - bits 31-36) */
- IA64_OPND_IMM1, /* signed 1-bit immediate (bit 36) */
- IA64_OPND_IMMU2, /* unsigned 2-bit immediate (bits 13-14) */
- IA64_OPND_IMMU5b, /* unsigned 5-bit immediate (32 + bits 14-18) */
- IA64_OPND_IMMU7a, /* unsigned 7-bit immediate (bits 13-19) */
- IA64_OPND_IMMU7b, /* unsigned 7-bit immediate (bits 20-26) */
- IA64_OPND_SOF, /* 8-bit stack frame size */
- IA64_OPND_SOL, /* 8-bit size of locals */
- IA64_OPND_SOR, /* 6-bit number of rotating registers (scaled by 8) */
- IA64_OPND_IMM8, /* signed 8-bit immediate (bits 13-19 & 36) */
- IA64_OPND_IMM8U4, /* cmp4*u signed 8-bit immediate (bits 13-19 & 36) */
- IA64_OPND_IMM8M1, /* signed 8-bit immediate -1 (bits 13-19 & 36) */
- IA64_OPND_IMM8M1U4, /* cmp4*u signed 8-bit immediate -1 (bits 13-19 & 36)*/
- IA64_OPND_IMM8M1U8, /* cmp*u signed 8-bit immediate -1 (bits 13-19 & 36) */
- IA64_OPND_IMMU9, /* unsigned 9-bit immediate (bits 33-34, 20-26) */
- IA64_OPND_IMM9a, /* signed 9-bit immediate (bits 6-12, 27, 36) */
- IA64_OPND_IMM9b, /* signed 9-bit immediate (bits 13-19, 27, 36) */
- IA64_OPND_IMM14, /* signed 14-bit immediate (bits 13-19, 27-32, 36) */
- IA64_OPND_IMM17, /* signed 17-bit immediate (2*bits 6-12, 24-31, 36) */
- IA64_OPND_IMMU21, /* unsigned 21-bit immediate (bits 6-25, 36) */
- IA64_OPND_IMM22, /* signed 22-bit immediate (bits 13-19, 22-36) */
- IA64_OPND_IMMU24, /* unsigned 24-bit immediate (bits 6-26, 31-32, 36) */
- IA64_OPND_IMM44, /* signed 44-bit immediate (2^16*bits 6-32, 36) */
- IA64_OPND_IMMU62, /* unsigned 62-bit immediate */
- IA64_OPND_IMMU64, /* unsigned 64-bit immediate (lotsa bits...) */
- IA64_OPND_INC3, /* signed 3-bit (bits 13-15): +/-1, 4, 8, 16 */
- IA64_OPND_LEN4, /* 4-bit count (bits 27-30 + 1) */
- IA64_OPND_LEN6, /* 6-bit count (bits 27-32 + 1) */
- IA64_OPND_MBTYPE4, /* 4-bit mux type (bits 20-23) */
- IA64_OPND_MHTYPE8, /* 8-bit mux type (bits 20-27) */
- IA64_OPND_POS6, /* 6-bit count (bits 14-19) */
- IA64_OPND_TAG13, /* signed 13-bit tag (ip + 16*bits 6-12, 33-34) */
- IA64_OPND_TAG13b, /* signed 13-bit tag (ip + 16*bits 24-32) */
- IA64_OPND_TGT25, /* signed 25-bit (ip + 16*bits 6-25, 36) */
- IA64_OPND_TGT25b, /* signed 25-bit (ip + 16*bits 6-12, 20-32, 36) */
- IA64_OPND_TGT25c, /* signed 25-bit (ip + 16*bits 13-32, 36) */
- IA64_OPND_TGT64, /* 64-bit (ip + 16*bits 13-32, 36, 2-40(L)) */
- IA64_OPND_LDXMOV, /* any symbol, generates R_IA64_LDXMOV. */
-
- IA64_OPND_COUNT /* # of operand types (MUST BE LAST!) */
- };
-
-enum ia64_dependency_mode
-{
- IA64_DV_RAW,
- IA64_DV_WAW,
- IA64_DV_WAR,
-};
-
-enum ia64_dependency_semantics
-{
- IA64_DVS_NONE,
- IA64_DVS_IMPLIED,
- IA64_DVS_IMPLIEDF,
- IA64_DVS_DATA,
- IA64_DVS_INSTR,
- IA64_DVS_SPECIFIC,
- IA64_DVS_STOP,
- IA64_DVS_OTHER,
-};
-
-enum ia64_resource_specifier
-{
- IA64_RS_ANY,
- IA64_RS_AR_K,
- IA64_RS_AR_UNAT,
- IA64_RS_AR, /* 8-15, 20, 22-23, 31, 33-35, 37-39, 41-43, 45-47, 67-111 */
- IA64_RS_ARb, /* 48-63, 112-127 */
- IA64_RS_BR,
- IA64_RS_CFM,
- IA64_RS_CPUID,
- IA64_RS_CR_IIB,
- IA64_RS_CR_IRR,
- IA64_RS_CR_LRR,
- IA64_RS_CR, /* 3-7,10-15,18,28-63,75-79,82-127 */
- IA64_RS_DBR,
- IA64_RS_FR,
- IA64_RS_FRb,
- IA64_RS_GR0,
- IA64_RS_GR,
- IA64_RS_IBR,
- IA64_RS_INSERVICE, /* CR[EOI] or CR[IVR] */
- IA64_RS_MSR,
- IA64_RS_PKR,
- IA64_RS_PMC,
- IA64_RS_PMD,
- IA64_RS_PR, /* non-rotating, 1-15 */
- IA64_RS_PRr, /* rotating, 16-62 */
- IA64_RS_PR63,
- IA64_RS_RR,
-
- IA64_RS_ARX, /* ARs not in RS_AR or RS_ARb */
- IA64_RS_CRX, /* CRs not in RS_CR */
- IA64_RS_PSR, /* PSR bits */
- IA64_RS_RSE, /* implementation-specific RSE resources */
- IA64_RS_AR_FPSR,
-};
-
-enum ia64_rse_resource
-{
- IA64_RSE_N_STACKED_PHYS,
- IA64_RSE_BOF,
- IA64_RSE_STORE_REG,
- IA64_RSE_LOAD_REG,
- IA64_RSE_BSPLOAD,
- IA64_RSE_RNATBITINDEX,
- IA64_RSE_CFLE,
- IA64_RSE_NDIRTY,
-};
-
-/* Information about a given resource dependency */
-struct ia64_dependency
-{
- /* Name of the resource */
- const char *name;
- /* Does this dependency need further specification? */
- enum ia64_resource_specifier specifier;
- /* Mode of dependency */
- enum ia64_dependency_mode mode;
- /* Dependency semantics */
- enum ia64_dependency_semantics semantics;
- /* Register index, if applicable (distinguishes AR, CR, and PSR deps) */
-#define REG_NONE (-1)
- int regindex;
- /* Special info on semantics */
- const char *info;
-};
-
-/* Two arrays of indexes into the ia64_dependency table.
- chks are dependencies to check for conflicts when an opcode is
- encountered; regs are dependencies to register (mark as used) when an
- opcode is used. chks correspond to readers (RAW) or writers (WAW or
- WAR) of a resource, while regs correspond to writers (RAW or WAW) and
- readers (WAR) of a resource. */
-struct ia64_opcode_dependency
-{
- int nchks;
- const unsigned short *chks;
- int nregs;
- const unsigned short *regs;
-};
-
-/* encode/extract the note/index for a dependency */
-#define RDEP(N,X) (((N)<<11)|(X))
-#define NOTE(X) (((X)>>11)&0x1F)
-#define DEP(X) ((X)&0x7FF)
-
-/* A template descriptor describes the execution units that are active
- for each of the three slots. It also specifies the location of
- instruction group boundaries that may be present between two slots. */
-struct ia64_templ_desc
- {
- int group_boundary; /* 0=no boundary, 1=between slot 0 & 1, etc. */
- enum ia64_unit exec_unit[3];
- const char *name;
- };
-
-/* The opcode table is an array of struct ia64_opcode. */
-
-struct ia64_opcode
- {
- /* The opcode name. */
- const char *name;
-
- /* The type of the instruction: */
- enum ia64_insn_type type;
-
- /* Number of output operands: */
- int num_outputs;
-
- /* The opcode itself. Those bits which will be filled in with
- operands are zeroes. */
- ia64_insn opcode;
-
- /* The opcode mask. This is used by the disassembler. This is a
- mask containing ones indicating those bits which must match the
- opcode field, and zeroes indicating those bits which need not
- match (and are presumably filled in by operands). */
- ia64_insn mask;
-
- /* An array of operand codes. Each code is an index into the
- operand table. They appear in the order which the operands must
- appear in assembly code, and are terminated by a zero. */
- enum ia64_opnd operands[5];
-
- /* One bit flags for the opcode. These are primarily used to
- indicate specific processors and environments support the
- instructions. The defined values are listed below. */
- unsigned int flags;
-
- /* Used by ia64_find_next_opcode (). */
- short ent_index;
-
- /* Opcode dependencies. */
- const struct ia64_opcode_dependency *dependencies;
- };
-
-/* Values defined for the flags field of a struct ia64_opcode. */
-
-#define IA64_OPCODE_FIRST (1<<0) /* must be first in an insn group */
-#define IA64_OPCODE_X_IN_MLX (1<<1) /* insn is allowed in X slot of MLX */
-#define IA64_OPCODE_LAST (1<<2) /* must be last in an insn group */
-#define IA64_OPCODE_PRIV (1<<3) /* privileged instruct */
-#define IA64_OPCODE_SLOT2 (1<<4) /* insn allowed in slot 2 only */
-#define IA64_OPCODE_NO_PRED (1<<5) /* insn cannot be predicated */
-#define IA64_OPCODE_PSEUDO (1<<6) /* insn is a pseudo-op */
-#define IA64_OPCODE_F2_EQ_F3 (1<<7) /* constraint: F2 == F3 */
-#define IA64_OPCODE_LEN_EQ_64MCNT (1<<8) /* constraint: LEN == 64-CNT */
-#define IA64_OPCODE_MOD_RRBS (1<<9) /* modifies all rrbs in CFM */
-#define IA64_OPCODE_POSTINC (1<<10) /* postincrement MR3 operand */
-
-/* A macro to extract the major opcode from an instruction. */
-#define IA64_OP(i) (((i) >> 37) & 0xf)
-
-enum ia64_operand_class
- {
- IA64_OPND_CLASS_CST, /* constant */
- IA64_OPND_CLASS_REG, /* register */
- IA64_OPND_CLASS_IND, /* indirect register */
- IA64_OPND_CLASS_ABS, /* absolute value */
- IA64_OPND_CLASS_REL, /* IP-relative value */
- };
-
-/* The operands table is an array of struct ia64_operand. */
-
-struct ia64_operand
-{
- enum ia64_operand_class class;
-
- /* Set VALUE as the operand bits for the operand of type SELF in the
- instruction pointed to by CODE. If an error occurs, *CODE is not
- modified and the returned string describes the cause of the
- error. If no error occurs, NULL is returned. */
- const char *(*insert) (const struct ia64_operand *self, ia64_insn value,
- ia64_insn *code);
-
- /* Extract the operand bits for an operand of type SELF from
- instruction CODE store them in *VALUE. If an error occurs, the
- cause of the error is described by the string returned. If no
- error occurs, NULL is returned. */
- const char *(*extract) (const struct ia64_operand *self, ia64_insn code,
- ia64_insn *value);
-
- /* A string whose meaning depends on the operand class. */
-
- const char *str;
-
- struct bit_field
- {
- /* The number of bits in the operand. */
- int bits;
-
- /* How far the operand is left shifted in the instruction. */
- int shift;
- }
- field[4]; /* no operand has more than this many bit-fields */
-
- unsigned int flags;
-
- const char *desc; /* brief description */
-};
-
-/* Values defined for the flags field of a struct ia64_operand. */
-
-/* Disassemble as signed decimal (instead of hex): */
-#define IA64_OPND_FLAG_DECIMAL_SIGNED (1<<0)
-/* Disassemble as unsigned decimal (instead of hex): */
-#define IA64_OPND_FLAG_DECIMAL_UNSIGNED (1<<1)
-
-extern const struct ia64_templ_desc ia64_templ_desc[16];
-
-/* The tables are sorted by major opcode number and are otherwise in
- the order in which the disassembler should consider instructions. */
-extern struct ia64_opcode ia64_opcodes_a[];
-extern struct ia64_opcode ia64_opcodes_i[];
-extern struct ia64_opcode ia64_opcodes_m[];
-extern struct ia64_opcode ia64_opcodes_b[];
-extern struct ia64_opcode ia64_opcodes_f[];
-extern struct ia64_opcode ia64_opcodes_d[];
-
-
-extern struct ia64_opcode *ia64_find_opcode (const char *name);
-extern struct ia64_opcode *ia64_find_next_opcode (struct ia64_opcode *ent);
-
-extern struct ia64_opcode *ia64_dis_opcode (ia64_insn insn,
- enum ia64_insn_type type);
-
-extern void ia64_free_opcode (struct ia64_opcode *ent);
-extern const struct ia64_dependency *ia64_find_dependency (int index);
-
-/* To avoid circular library dependencies, this array is implemented
- in bfd/cpu-ia64-opc.c: */
-extern const struct ia64_operand elf64_ia64_operands[IA64_OPND_COUNT];
-
-#endif /* opcode_ia64_h */
diff --git a/include/opcode/m68hc11.h b/include/opcode/m68hc11.h
deleted file mode 100644
index cddc59a..0000000
--- a/include/opcode/m68hc11.h
+++ /dev/null
@@ -1,427 +0,0 @@
-/* m68hc11.h -- Header file for Motorola 68HC11 & 68HC12 opcode table
- Copyright 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
- Written by Stephane Carrez (stcarrez@nerim.fr)
-
-This file is part of GDB, GAS, and the GNU binutils.
-
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them under the terms of the GNU General Public
-License as published by the Free Software Foundation; either version
-1, or (at your option) any later version.
-
-GDB, GAS, and the GNU binutils are distributed in the hope that they
-will be useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING. If not, write to the Free
-Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _OPCODE_M68HC11_H
-#define _OPCODE_M68HC11_H
-
-/* Flags for the definition of the 68HC11 & 68HC12 CCR. */
-#define M6811_S_BIT 0x80 /* Stop disable */
-#define M6811_X_BIT 0x40 /* X-interrupt mask */
-#define M6811_H_BIT 0x20 /* Half carry flag */
-#define M6811_I_BIT 0x10 /* I-interrupt mask */
-#define M6811_N_BIT 0x08 /* Negative */
-#define M6811_Z_BIT 0x04 /* Zero */
-#define M6811_V_BIT 0x02 /* Overflow */
-#define M6811_C_BIT 0x01 /* Carry */
-
-/* 68HC11 register address offsets (range 0..0x3F or 0..64).
- The absolute address of the I/O register depends on the setting
- of the M6811_INIT register. At init time, the I/O registers are
- mapped at 0x1000. Address of registers is then:
-
- 0x1000 + M6811_xxx
-*/
-#define M6811_PORTA 0x00 /* Port A register */
-#define M6811__RES1 0x01 /* Unused/Reserved */
-#define M6811_PIOC 0x02 /* Parallel I/O Control register */
-#define M6811_PORTC 0x03 /* Port C register */
-#define M6811_PORTB 0x04 /* Port B register */
-#define M6811_PORTCL 0x05 /* Alternate latched port C */
-#define M6811__RES6 0x06 /* Unused/Reserved */
-#define M6811_DDRC 0x07 /* Data direction register for port C */
-#define M6811_PORTD 0x08 /* Port D register */
-#define M6811_DDRD 0x09 /* Data direction register for port D */
-#define M6811_PORTE 0x0A /* Port E input register */
-#define M6811_CFORC 0x0B /* Compare Force Register */
-#define M6811_OC1M 0x0C /* OC1 Action Mask register */
-#define M6811_OC1D 0x0D /* OC1 Action Data register */
-#define M6811_TCTN 0x0E /* Timer Counter Register */
-#define M6811_TCTN_H 0x0E /* " " " High part */
-#define M6811_TCTN_L 0x0F /* " " " Low part */
-#define M6811_TIC1 0x10 /* Input capture 1 register */
-#define M6811_TIC1_H 0x10 /* " " " High part */
-#define M6811_TIC1_L 0x11 /* " " " Low part */
-#define M6811_TIC2 0x12 /* Input capture 2 register */
-#define M6811_TIC2_H 0x12 /* " " " High part */
-#define M6811_TIC2_L 0x13 /* " " " Low part */
-#define M6811_TIC3 0x14 /* Input capture 3 register */
-#define M6811_TIC3_H 0x14 /* " " " High part */
-#define M6811_TIC3_L 0x15 /* " " " Low part */
-#define M6811_TOC1 0x16 /* Output Compare 1 register */
-#define M6811_TOC1_H 0x16 /* " " " High part */
-#define M6811_TOC1_L 0x17 /* " " " Low part */
-#define M6811_TOC2 0x18 /* Output Compare 2 register */
-#define M6811_TOC2_H 0x18 /* " " " High part */
-#define M6811_TOC2_L 0x19 /* " " " Low part */
-#define M6811_TOC3 0x1A /* Output Compare 3 register */
-#define M6811_TOC3_H 0x1A /* " " " High part */
-#define M6811_TOC3_L 0x1B /* " " " Low part */
-#define M6811_TOC4 0x1C /* Output Compare 4 register */
-#define M6811_TOC4_H 0x1C /* " " " High part */
-#define M6811_TOC4_L 0x1D /* " " " Low part */
-#define M6811_TOC5 0x1E /* Output Compare 5 register */
-#define M6811_TOC5_H 0x1E /* " " " High part */
-#define M6811_TOC5_L 0x1F /* " " " Low part */
-#define M6811_TCTL1 0x20 /* Timer Control register 1 */
-#define M6811_TCTL2 0x21 /* Timer Control register 2 */
-#define M6811_TMSK1 0x22 /* Timer Interrupt Mask Register 1 */
-#define M6811_TFLG1 0x23 /* Timer Interrupt Flag Register 1 */
-#define M6811_TMSK2 0x24 /* Timer Interrupt Mask Register 2 */
-#define M6811_TFLG2 0x25 /* Timer Interrupt Flag Register 2 */
-#define M6811_PACTL 0x26 /* Pulse Accumulator Control Register */
-#define M6811_PACNT 0x27 /* Pulse Accumulator Count Register */
-#define M6811_SPCR 0x28 /* SPI Control register */
-#define M6811_SPSR 0x29 /* SPI Status register */
-#define M6811_SPDR 0x2A /* SPI Data register */
-#define M6811_BAUD 0x2B /* SCI Baud register */
-#define M6811_SCCR1 0x2C /* SCI Control register 1 */
-#define M6811_SCCR2 0x2D /* SCI Control register 2 */
-#define M6811_SCSR 0x2E /* SCI Status register */
-#define M6811_SCDR 0x2F /* SCI Data (Read => RDR, Write => TDR) */
-#define M6811_ADCTL 0x30 /* A/D Control register */
-#define M6811_ADR1 0x31 /* A/D, Analog Result register 1 */
-#define M6811_ADR2 0x32 /* A/D, Analog Result register 2 */
-#define M6811_ADR3 0x33 /* A/D, Analog Result register 3 */
-#define M6811_ADR4 0x34 /* A/D, Analog Result register 4 */
-#define M6811__RES35 0x35
-#define M6811__RES36 0x36
-#define M6811__RES37 0x37
-#define M6811__RES38 0x38
-#define M6811_OPTION 0x39 /* System Configuration Options */
-#define M6811_COPRST 0x3A /* Arm/Reset COP Timer Circuitry */
-#define M6811_PPROG 0x3B /* EEPROM Programming Control Register */
-#define M6811_HPRIO 0x3C /* Highest priority I-Bit int and misc */
-#define M6811_INIT 0x3D /* Ram and I/O mapping register */
-#define M6811_TEST1 0x3E /* Factory test control register */
-#define M6811_CONFIG 0x3F /* COP, ROM and EEPROM enables */
-
-
-/* Flags of the CONFIG register (in EEPROM). */
-#define M6811_NOSEC 0x08 /* Security mode disable */
-#define M6811_NOCOP 0x04 /* COP system disable */
-#define M6811_ROMON 0x02 /* Enable on-chip rom */
-#define M6811_EEON 0x01 /* Enable on-chip eeprom */
-
-/* Flags of the PPROG register. */
-#define M6811_BYTE 0x10 /* Byte mode */
-#define M6811_ROW 0x08 /* Row mode */
-#define M6811_ERASE 0x04 /* Erase mode select (1 = erase, 0 = read) */
-#define M6811_EELAT 0x02 /* EEPROM Latch Control */
-#define M6811_EEPGM 0x01 /* EEPROM Programming Voltage Enable */
-
-/* Flags of the PIOC register. */
-#define M6811_STAF 0x80 /* Strobe A Interrupt Status Flag */
-#define M6811_STAI 0x40 /* Strobe A Interrupt Enable Mask */
-#define M6811_CWOM 0x20 /* Port C Wire OR mode */
-#define M6811_HNDS 0x10 /* Handshake mode */
-#define M6811_OIN 0x08 /* Output or Input handshaking */
-#define M6811_PLS 0x04 /* Pulse/Interlocked Handshake Operation */
-#define M6811_EGA 0x02 /* Active Edge for Strobe A */
-#define M6811_INVB 0x01 /* Invert Strobe B */
-
-/* Flags of the SCCR1 register. */
-#define M6811_R8 0x80 /* Receive Data bit 8 */
-#define M6811_T8 0x40 /* Transmit data bit 8 */
-#define M6811__SCCR1_5 0x20 /* Unused */
-#define M6811_M 0x10 /* SCI Character length */
-#define M6811_WAKE 0x08 /* Wake up method select (0=idle, 1=addr mark) */
-
-/* Flags of the SCCR2 register. */
-#define M6811_TIE 0x80 /* Transmit Interrupt enable */
-#define M6811_TCIE 0x40 /* Transmit Complete Interrupt Enable */
-#define M6811_RIE 0x20 /* Receive Interrupt Enable */
-#define M6811_ILIE 0x10 /* Idle Line Interrupt Enable */
-#define M6811_TE 0x08 /* Transmit Enable */
-#define M6811_RE 0x04 /* Receive Enable */
-#define M6811_RWU 0x02 /* Receiver Wake Up */
-#define M6811_SBK 0x01 /* Send Break */
-
-/* Flags of the SCSR register. */
-#define M6811_TDRE 0x80 /* Transmit Data Register Empty */
-#define M6811_TC 0x40 /* Transmit Complete */
-#define M6811_RDRF 0x20 /* Receive Data Register Full */
-#define M6811_IDLE 0x10 /* Idle Line Detect */
-#define M6811_OR 0x08 /* Overrun Error */
-#define M6811_NF 0x04 /* Noise Flag */
-#define M6811_FE 0x02 /* Framing Error */
-#define M6811__SCSR_0 0x01 /* Unused */
-
-/* Flags of the BAUD register. */
-#define M6811_TCLR 0x80 /* Clear Baud Rate (TEST mode) */
-#define M6811__BAUD_6 0x40 /* Not used */
-#define M6811_SCP1 0x20 /* SCI Baud rate prescaler select */
-#define M6811_SCP0 0x10
-#define M6811_RCKB 0x08 /* Baud Rate Clock Check (TEST mode) */
-#define M6811_SCR2 0x04 /* SCI Baud rate select */
-#define M6811_SCR1 0x02
-#define M6811_SCR0 0x01
-
-#define M6811_BAUD_DIV_1 (0)
-#define M6811_BAUD_DIV_3 (M6811_SCP0)
-#define M6811_BAUD_DIV_4 (M6811_SCP1)
-#define M6811_BAUD_DIV_13 (M6811_SCP1|M6811_SCP0)
-
-/* Flags of the SPCR register. */
-#define M6811_SPIE 0x80 /* Serial Peripheral Interrupt Enable */
-#define M6811_SPE 0x40 /* Serial Peripheral System Enable */
-#define M6811_DWOM 0x20 /* Port D Wire-OR mode option */
-#define M6811_MSTR 0x10 /* Master Mode Select */
-#define M6811_CPOL 0x08 /* Clock Polarity */
-#define M6811_CPHA 0x04 /* Clock Phase */
-#define M6811_SPR1 0x02 /* SPI Clock Rate Select */
-#define M6811_SPR0 0x01
-
-/* Flags of the SPSR register. */
-#define M6811_SPIF 0x80 /* SPI Transfer Complete flag */
-#define M6811_WCOL 0x40 /* Write Collision */
-#define M6811_MODF 0x10 /* Mode Fault */
-
-/* Flags of the ADCTL register. */
-#define M6811_CCF 0x80 /* Conversions Complete Flag */
-#define M6811_SCAN 0x20 /* Continuous Scan Control */
-#define M6811_MULT 0x10 /* Multiple Channel/Single Channel Control */
-#define M6811_CD 0x08 /* Channel Select D */
-#define M6811_CC 0x04 /* C */
-#define M6811_CB 0x02 /* B */
-#define M6811_CA 0x01 /* A */
-
-/* Flags of the CFORC register. */
-#define M6811_FOC1 0x80 /* Force Output Compare 1 */
-#define M6811_FOC2 0x40 /* 2 */
-#define M6811_FOC3 0x20 /* 3 */
-#define M6811_FOC4 0x10 /* 4 */
-#define M6811_FOC5 0x08 /* 5 */
-
-/* Flags of the OC1M register. */
-#define M6811_OC1M7 0x80 /* Output Compare 7 */
-#define M6811_OC1M6 0x40 /* 6 */
-#define M6811_OC1M5 0x20 /* 5 */
-#define M6811_OC1M4 0x10 /* 4 */
-#define M6811_OC1M3 0x08 /* 3 */
-
-/* Flags of the OC1D register. */
-#define M6811_OC1D7 0x80
-#define M6811_OC1D6 0x40
-#define M6811_OC1D5 0x20
-#define M6811_OC1D4 0x10
-#define M6811_OC1D3 0x08
-
-/* Flags of the TCTL1 register. */
-#define M6811_OM2 0x80 /* Output Mode 2 */
-#define M6811_OL2 0x40 /* Output Level 2 */
-#define M6811_OM3 0x20
-#define M6811_OL3 0x10
-#define M6811_OM4 0x08
-#define M6811_OL4 0x04
-#define M6811_OM5 0x02
-#define M6811_OL5 0x01
-
-/* Flags of the TCTL2 register. */
-#define M6811_EDG1B 0x20 /* Input Edge Capture Control 1 */
-#define M6811_EDG1A 0x10
-#define M6811_EDG2B 0x08 /* Input 2 */
-#define M6811_EDG2A 0x04
-#define M6811_EDG3B 0x02 /* Input 3 */
-#define M6811_EDG3A 0x01
-
-/* Flags of the TMSK1 register. */
-#define M6811_OC1I 0x80 /* Output Compare 1 Interrupt */
-#define M6811_OC2I 0x40 /* 2 */
-#define M6811_OC3I 0x20 /* 3 */
-#define M6811_OC4I 0x10 /* 4 */
-#define M6811_OC5I 0x08 /* 5 */
-#define M6811_IC1I 0x04 /* Input Capture 1 Interrupt */
-#define M6811_IC2I 0x02 /* 2 */
-#define M6811_IC3I 0x01 /* 3 */
-
-/* Flags of the TFLG1 register. */
-#define M6811_OC1F 0x80 /* Output Compare 1 Flag */
-#define M6811_OC2F 0x40 /* 2 */
-#define M6811_OC3F 0x20 /* 3 */
-#define M6811_OC4F 0x10 /* 4 */
-#define M6811_OC5F 0x08 /* 5 */
-#define M6811_IC1F 0x04 /* Input Capture 1 Flag */
-#define M6811_IC2F 0x02 /* 2 */
-#define M6811_IC3F 0x01 /* 3 */
-
-/* Flags of Timer Interrupt Mask Register 2 (TMSK2). */
-#define M6811_TOI 0x80 /* Timer Overflow Interrupt Enable */
-#define M6811_RTII 0x40 /* RTI Interrupt Enable */
-#define M6811_PAOVI 0x20 /* Pulse Accumulator Overflow Interrupt En. */
-#define M6811_PAII 0x10 /* Pulse Accumulator Interrupt Enable */
-#define M6811_PR1 0x02 /* Timer prescaler */
-#define M6811_PR0 0x01 /* Timer prescaler */
-#define M6811_TPR_1 0x00 /* " " prescale div 1 */
-#define M6811_TPR_4 0x01 /* " " prescale div 4 */
-#define M6811_TPR_8 0x02 /* " " prescale div 8 */
-#define M6811_TPR_16 0x03 /* " " prescale div 16 */
-
-/* Flags of Timer Interrupt Flag Register 2 (M6811_TFLG2). */
-#define M6811_TOF 0x80 /* Timer overflow bit */
-#define M6811_RTIF 0x40 /* Read time interrupt flag */
-#define M6811_PAOVF 0x20 /* Pulse accumulator overflow Interrupt flag */
-#define M6811_PAIF 0x10 /* Pulse accumulator Input Edge " " " */
-
-/* Flags of Pulse Accumulator Control Register (PACTL). */
-#define M6811_DDRA7 0x80 /* Data direction for port A bit 7 */
-#define M6811_PAEN 0x40 /* Pulse accumulator system enable */
-#define M6811_PAMOD 0x20 /* Pulse accumulator mode */
-#define M6811_PEDGE 0x10 /* Pulse accumulator edge control */
-#define M6811_RTR1 0x02 /* RTI Interrupt rates select */
-#define M6811_RTR0 0x01 /* " " " " */
-
-/* Flags of the Options register. */
-#define M6811_ADPU 0x80 /* A/D Powerup */
-#define M6811_CSEL 0x40 /* A/D/EE Charge pump clock source select */
-#define M6811_IRQE 0x20 /* IRQ Edge/Level sensitive */
-#define M6811_DLY 0x10 /* Stop exit turn on delay */
-#define M6811_CME 0x08 /* Clock Monitor enable */
-#define M6811_CR1 0x02 /* COP timer rate select */
-#define M6811_CR0 0x01 /* COP timer rate select */
-
-/* Flags of the HPRIO register. */
-#define M6811_RBOOT 0x80 /* Read Bootstrap ROM */
-#define M6811_SMOD 0x40 /* Special Mode */
-#define M6811_MDA 0x20 /* Mode Select A */
-#define M6811_IRV 0x10 /* Internal Read Visibility */
-#define M6811_PSEL3 0x08 /* Priority Select */
-#define M6811_PSEL2 0x04
-#define M6811_PSEL1 0x02
-#define M6811_PSEL0 0x01
-
-/* Some insns used by gas to turn relative branches into absolute ones. */
-#define M6811_BRA 0x20
-#define M6811_JMP 0x7e
-#define M6811_BSR 0x8d
-#define M6811_JSR 0xbd
-#define M6812_JMP 0x06
-#define M6812_BSR 0x07
-#define M6812_JSR 0x16
-
-/* Instruction code pages. Code page 1 is the default. */
-/*#define M6811_OPCODE_PAGE1 0x00*/
-#define M6811_OPCODE_PAGE2 0x18
-#define M6811_OPCODE_PAGE3 0x1A
-#define M6811_OPCODE_PAGE4 0xCD
-
-
-/* 68HC11 operands formats as stored in the m6811_opcode table. These
- flags do not correspond to anything in the 68HC11 or 68HC12.
- They are only used by GAS to recognize operands. */
-#define M6811_OP_NONE 0 /* No operand */
-#define M6811_OP_DIRECT 0x0001 /* Page 0 addressing: *<val-8bits> */
-#define M6811_OP_IMM8 0x0002 /* 8 bits immediat: #<val-8bits> */
-#define M6811_OP_IMM16 0x0004 /* 16 bits immediat: #<val-16bits> */
-#define M6811_OP_IND16 0x0008 /* Indirect abs: <val-16> */
-#define M6812_OP_IND16_P2 0x0010 /* Second parameter indirect abs. */
-#define M6812_OP_REG 0x0020 /* Register operand 1 */
-#define M6812_OP_REG_2 0x0040 /* Register operand 2 */
-
-#define M6811_OP_IX 0x0080 /* Indirect IX: <val-8>,x */
-#define M6811_OP_IY 0x0100 /* Indirect IY: <val-8>,y */
-#define M6812_OP_IDX 0x0200 /* Indirect: N,r N,[+-]r[+-] N:5-bits */
-#define M6812_OP_IDX_1 0x0400 /* N,r N:9-bits */
-#define M6812_OP_IDX_2 0x0800 /* N,r N:16-bits */
-#define M6812_OP_D_IDX 0x1000 /* Indirect indexed: [D,r] */
-#define M6812_OP_D_IDX_2 0x2000 /* [N,r] N:16-bits */
-#define M6812_OP_PAGE 0x4000 /* Page number */
-#define M6811_OP_MASK 0x07FFF
-#define M6811_OP_BRANCH 0x00008000 /* Branch, jsr, call */
-#define M6811_OP_BITMASK 0x00010000 /* Bitmask: #<val-8> */
-#define M6811_OP_JUMP_REL 0x00020000 /* Pc-Relative: <val-8> */
-#define M6812_OP_JUMP_REL16 0x00040000 /* Pc-relative: <val-16> */
-#define M6811_OP_PAGE1 0x0000
-#define M6811_OP_PAGE2 0x00080000 /* Need a page2 opcode before */
-#define M6811_OP_PAGE3 0x00100000 /* Need a page3 opcode before */
-#define M6811_OP_PAGE4 0x00200000 /* Need a page4 opcode before */
-#define M6811_MAX_OPERANDS 3 /* Max operands: brset <dst> <mask> <b> */
-
-#define M6812_ACC_OFFSET 0x00400000 /* A,r B,r D,r */
-#define M6812_ACC_IND 0x00800000 /* [D,r] */
-#define M6812_PRE_INC 0x01000000 /* n,+r n = -8..8 */
-#define M6812_PRE_DEC 0x02000000 /* n,-r */
-#define M6812_POST_INC 0x04000000 /* n,r+ */
-#define M6812_POST_DEC 0x08000000 /* n,r- */
-#define M6812_INDEXED_IND 0x10000000 /* [n,r] n = 16-bits */
-#define M6812_INDEXED 0x20000000 /* n,r n = 5, 9 or 16-bits */
-#define M6812_OP_IDX_P2 0x40000000
-
-/* Markers to identify some instructions. */
-#define M6812_OP_EXG_MARKER 0x01000000 /* exg r1,r2 */
-#define M6812_OP_TFR_MARKER 0x02000000 /* tfr r1,r2 */
-#define M6812_OP_SEX_MARKER 0x04000000 /* sex r1,r2 */
-
-#define M6812_OP_EQ_MARKER 0x80000000 /* dbeq/ibeq/tbeq */
-#define M6812_OP_DBCC_MARKER 0x04000000 /* dbeq/dbne */
-#define M6812_OP_IBCC_MARKER 0x02000000 /* ibeq/ibne */
-#define M6812_OP_TBCC_MARKER 0x01000000
-
-#define M6812_OP_TRAP_ID 0x80000000 /* trap #N */
-
-#define M6811_OP_HIGH_ADDR 0x01000000 /* Used internally by gas. */
-#define M6811_OP_LOW_ADDR 0x02000000
-
-#define M68HC12_BANK_VIRT 0x010000
-#define M68HC12_BANK_MASK 0x00003fff
-#define M68HC12_BANK_BASE 0x00008000
-#define M68HC12_BANK_SHIFT 14
-#define M68HC12_BANK_PAGE_MASK 0x0ff
-
-
-/* CPU identification. */
-#define cpu6811 0x01
-#define cpu6812 0x02
-#define cpu6812s 0x04
-
-/* The opcode table is an array of struct m68hc11_opcode. */
-struct m68hc11_opcode {
- const char* name; /* Op-code name */
- long format;
- unsigned char size;
- unsigned char opcode;
- unsigned char cycles_low;
- unsigned char cycles_high;
- unsigned char set_flags_mask;
- unsigned char clr_flags_mask;
- unsigned char chg_flags_mask;
- unsigned char arch;
-};
-
-/* Alias definition for 68HC12. */
-struct m68hc12_opcode_alias
-{
- const char* name;
- const char* translation;
- unsigned char size;
- unsigned char code1;
- unsigned char code2;
-};
-
-/* The opcode table. The table contains all the opcodes (all pages).
- You can't rely on the order. */
-extern const struct m68hc11_opcode m68hc11_opcodes[];
-extern const int m68hc11_num_opcodes;
-
-/* Alias table for 68HC12. It translates some 68HC11 insn which are not
- implemented in 68HC12 but have equivalent translations. */
-extern const struct m68hc12_opcode_alias m68hc12_alias[];
-extern const int m68hc12_num_alias;
-
-#endif /* _OPCODE_M68HC11_H */
diff --git a/include/opcode/m68k.h b/include/opcode/m68k.h
deleted file mode 100644
index 2dd6d3f..0000000
--- a/include/opcode/m68k.h
+++ /dev/null
@@ -1,378 +0,0 @@
-/* Opcode table header for m680[01234]0/m6888[12]/m68851.
- Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2001,
- 2003, 2004, 2006 Free Software Foundation, Inc.
-
- This file is part of GDB, GAS, and the GNU binutils.
-
- GDB, GAS, and the GNU binutils are free software; you can redistribute
- them and/or modify them under the terms of the GNU General Public
- License as published by the Free Software Foundation; either version
- 1, or (at your option) any later version.
-
- GDB, GAS, and the GNU binutils are distributed in the hope that they
- will be useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- the GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this file; see the file COPYING. If not, write to the Free
- Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-/* These are used as bit flags for the arch field in the m68k_opcode
- structure. */
-#define _m68k_undef 0
-#define m68000 0x001
-#define m68010 0x002
-#define m68020 0x004
-#define m68030 0x008
-#define m68040 0x010
-#define m68060 0x020
-#define m68881 0x040
-#define m68851 0x080
-#define cpu32 0x100 /* e.g., 68332 */
-#define fido_a 0x200
-#define m68k_mask 0x3ff
-
-#define mcfmac 0x400 /* ColdFire MAC. */
-#define mcfemac 0x800 /* ColdFire EMAC. */
-#define cfloat 0x1000 /* ColdFire FPU. */
-#define mcfhwdiv 0x2000 /* ColdFire hardware divide. */
-
-#define mcfisa_a 0x4000 /* ColdFire ISA_A. */
-#define mcfisa_aa 0x8000 /* ColdFire ISA_A+. */
-#define mcfisa_b 0x10000 /* ColdFire ISA_B. */
-#define mcfisa_c 0x20000 /* ColdFire ISA_C. */
-#define mcfusp 0x40000 /* ColdFire USP instructions. */
-#define mcf_mask 0x7e400
-
-/* Handy aliases. */
-#define m68040up (m68040 | m68060)
-#define m68030up (m68030 | m68040up)
-#define m68020up (m68020 | m68030up)
-#define m68010up (m68010 | cpu32 | fido_a | m68020up)
-#define m68000up (m68000 | m68010up)
-
-#define mfloat (m68881 | m68040 | m68060)
-#define mmmu (m68851 | m68030 | m68040 | m68060)
-
-/* The structure used to hold information for an opcode. */
-
-struct m68k_opcode
-{
- /* The opcode name. */
- const char *name;
- /* The pseudo-size of the instruction(in bytes). Used to determine
- number of bytes necessary to disassemble the instruction. */
- unsigned int size;
- /* The opcode itself. */
- unsigned long opcode;
- /* The mask used by the disassembler. */
- unsigned long match;
- /* The arguments. */
- const char *args;
- /* The architectures which support this opcode. */
- unsigned int arch;
-};
-
-/* The structure used to hold information for an opcode alias. */
-
-struct m68k_opcode_alias
-{
- /* The alias name. */
- const char *alias;
- /* The instruction for which this is an alias. */
- const char *primary;
-};
-
-/* We store four bytes of opcode for all opcodes because that is the
- most any of them need. The actual length of an instruction is
- always at least 2 bytes, and is as much longer as necessary to hold
- the operands it has.
-
- The match field is a mask saying which bits must match particular
- opcode in order for an instruction to be an instance of that
- opcode.
-
- The args field is a string containing two characters for each
- operand of the instruction. The first specifies the kind of
- operand; the second, the place it is stored.
-
- If the first char of args is '.', it indicates that the opcode is
- two words. This is only necessary when the match field does not
- have any bits set in the second opcode word. Such a '.' is skipped
- for operand processing. */
-
-/* Kinds of operands:
- Characters used: AaBbCcDdEeFfGgHIiJjKkLlMmnOopQqRrSsTtUuVvWwXxYyZz01234|*~%;@!&$?/<>#^+-
-
- D data register only. Stored as 3 bits.
- A address register only. Stored as 3 bits.
- a address register indirect only. Stored as 3 bits.
- R either kind of register. Stored as 4 bits.
- r either kind of register indirect only. Stored as 4 bits.
- At the moment, used only for cas2 instruction.
- F floating point coprocessor register only. Stored as 3 bits.
- O an offset (or width): immediate data 0-31 or data register.
- Stored as 6 bits in special format for BF... insns.
- + autoincrement only. Stored as 3 bits (number of the address register).
- - autodecrement only. Stored as 3 bits (number of the address register).
- Q quick immediate data. Stored as 3 bits.
- This matches an immediate operand only when value is in range 1 .. 8.
- M moveq immediate data. Stored as 8 bits.
- This matches an immediate operand only when value is in range -128..127
- T trap vector immediate data. Stored as 4 bits.
-
- k K-factor for fmove.p instruction. Stored as a 7-bit constant or
- a three bit register offset, depending on the field type.
-
- # immediate data. Stored in special places (b, w or l)
- which say how many bits to store.
- ^ immediate data for floating point instructions. Special places
- are offset by 2 bytes from '#'...
- B pc-relative address, converted to an offset
- that is treated as immediate data.
- d displacement and register. Stores the register as 3 bits
- and stores the displacement in the entire second word.
-
- C the CCR. No need to store it; this is just for filtering validity.
- S the SR. No need to store, just as with CCR.
- U the USP. No need to store, just as with CCR.
- E the MAC ACC. No need to store, just as with CCR.
- e the EMAC ACC[0123].
- G the MAC/EMAC MACSR. No need to store, just as with CCR.
- g the EMAC ACCEXT{01,23}.
- H the MASK. No need to store, just as with CCR.
- i the MAC/EMAC scale factor.
-
- I Coprocessor ID. Not printed if 1. The Coprocessor ID is always
- extracted from the 'd' field of word one, which means that an extended
- coprocessor opcode can be skipped using the 'i' place, if needed.
-
- s System Control register for the floating point coprocessor.
-
- J Misc register for movec instruction, stored in 'j' format.
- Possible values:
- 0x000 SFC Source Function Code reg [60, 40, 30, 20, 10]
- 0x001 DFC Data Function Code reg [60, 40, 30, 20, 10]
- 0x002 CACR Cache Control Register [60, 40, 30, 20, mcf]
- 0x003 TC MMU Translation Control [60, 40]
- 0x004 ITT0 Instruction Transparent
- Translation reg 0 [60, 40]
- 0x005 ITT1 Instruction Transparent
- Translation reg 1 [60, 40]
- 0x006 DTT0 Data Transparent
- Translation reg 0 [60, 40]
- 0x007 DTT1 Data Transparent
- Translation reg 1 [60, 40]
- 0x008 BUSCR Bus Control Register [60]
- 0x800 USP User Stack Pointer [60, 40, 30, 20, 10]
- 0x801 VBR Vector Base reg [60, 40, 30, 20, 10, mcf]
- 0x802 CAAR Cache Address Register [ 30, 20]
- 0x803 MSP Master Stack Pointer [ 40, 30, 20]
- 0x804 ISP Interrupt Stack Pointer [ 40, 30, 20]
- 0x805 MMUSR MMU Status reg [ 40]
- 0x806 URP User Root Pointer [60, 40]
- 0x807 SRP Supervisor Root Pointer [60, 40]
- 0x808 PCR Processor Configuration reg [60]
- 0xC00 ROMBAR ROM Base Address Register [520X]
- 0xC04 RAMBAR0 RAM Base Address Register 0 [520X]
- 0xC05 RAMBAR1 RAM Base Address Register 0 [520X]
- 0xC0F MBAR0 RAM Base Address Register 0 [520X]
- 0xC04 FLASHBAR FLASH Base Address Register [mcf528x]
- 0xC05 RAMBAR Static RAM Base Address Register [mcf528x]
-
- L Register list of the type d0-d7/a0-a7 etc.
- (New! Improved! Can also hold fp0-fp7, as well!)
- The assembler tries to see if the registers match the insn by
- looking at where the insn wants them stored.
-
- l Register list like L, but with all the bits reversed.
- Used for going the other way. . .
-
- c cache identifier which may be "nc" for no cache, "ic"
- for instruction cache, "dc" for data cache, or "bc"
- for both caches. Used in cinv and cpush. Always
- stored in position "d".
-
- u Any register, with ``upper'' or ``lower'' specification. Used
- in the mac instructions with size word.
-
- The remainder are all stored as 6 bits using an address mode and a
- register number; they differ in which addressing modes they match.
-
- * all (modes 0-6,7.0-4)
- ~ alterable memory (modes 2-6,7.0,7.1)
- (not 0,1,7.2-4)
- % alterable (modes 0-6,7.0,7.1)
- (not 7.2-4)
- ; data (modes 0,2-6,7.0-4)
- (not 1)
- @ data, but not immediate (modes 0,2-6,7.0-3)
- (not 1,7.4)
- ! control (modes 2,5,6,7.0-3)
- (not 0,1,3,4,7.4)
- & alterable control (modes 2,5,6,7.0,7.1)
- (not 0,1,3,4,7.2-4)
- $ alterable data (modes 0,2-6,7.0,7.1)
- (not 1,7.2-4)
- ? alterable control, or data register (modes 0,2,5,6,7.0,7.1)
- (not 1,3,4,7.2-4)
- / control, or data register (modes 0,2,5,6,7.0-3)
- (not 1,3,4,7.4)
- > *save operands (modes 2,4,5,6,7.0,7.1)
- (not 0,1,3,7.2-4)
- < *restore operands (modes 2,3,5,6,7.0-3)
- (not 0,1,4,7.4)
-
- coldfire move operands:
- m (modes 0-4)
- n (modes 5,7.2)
- o (modes 6,7.0,7.1,7.3,7.4)
- p (modes 0-5)
-
- coldfire bset/bclr/btst/mulsl/mulul operands:
- q (modes 0,2-5)
- v (modes 0,2-5,7.0,7.1)
- b (modes 0,2-5,7.2)
- w (modes 2-5,7.2)
- y (modes 2,5)
- z (modes 2,5,7.2)
- x mov3q immediate operand.
- j coprocessor ET operand.
- K coprocessor command number.
- 4 (modes 2,3,4,5)
- */
-
-/* For the 68851: */
-/* I didn't use much imagination in choosing the
- following codes, so many of them aren't very
- mnemonic. -rab
-
- 0 32 bit pmmu register
- Possible values:
- 000 TC Translation Control Register (68030, 68851)
-
- 1 16 bit pmmu register
- 111 AC Access Control (68851)
-
- 2 8 bit pmmu register
- 100 CAL Current Access Level (68851)
- 101 VAL Validate Access Level (68851)
- 110 SCC Stack Change Control (68851)
-
- 3 68030-only pmmu registers (32 bit)
- 010 TT0 Transparent Translation reg 0
- (aka Access Control reg 0 -- AC0 -- on 68ec030)
- 011 TT1 Transparent Translation reg 1
- (aka Access Control reg 1 -- AC1 -- on 68ec030)
-
- W wide pmmu registers
- Possible values:
- 001 DRP Dma Root Pointer (68851)
- 010 SRP Supervisor Root Pointer (68030, 68851)
- 011 CRP Cpu Root Pointer (68030, 68851)
-
- f function code register (68030, 68851)
- 0 SFC
- 1 DFC
-
- V VAL register only (68851)
-
- X BADx, BACx (16 bit)
- 100 BAD Breakpoint Acknowledge Data (68851)
- 101 BAC Breakpoint Acknowledge Control (68851)
-
- Y PSR (68851) (MMUSR on 68030) (ACUSR on 68ec030)
- Z PCSR (68851)
-
- | memory (modes 2-6, 7.*)
-
- t address test level (68030 only)
- Stored as 3 bits, range 0-7.
- Also used for breakpoint instruction now.
-
-*/
-
-/* Places to put an operand, for non-general operands:
- Characters used: BbCcDdFfGgHhIijkLlMmNnostWw123456789/
-
- s source, low bits of first word.
- d dest, shifted 9 in first word
- 1 second word, shifted 12
- 2 second word, shifted 6
- 3 second word, shifted 0
- 4 third word, shifted 12
- 5 third word, shifted 6
- 6 third word, shifted 0
- 7 second word, shifted 7
- 8 second word, shifted 10
- 9 second word, shifted 5
- E second word, shifted 9
- D store in both place 1 and place 3; for divul and divsl.
- B first word, low byte, for branch displacements
- W second word (entire), for branch displacements
- L second and third words (entire), for branch displacements
- (also overloaded for move16)
- b second word, low byte
- w second word (entire) [variable word/long branch offset for dbra]
- W second word (entire) (must be signed 16 bit value)
- l second and third word (entire)
- g variable branch offset for bra and similar instructions.
- The place to store depends on the magnitude of offset.
- t store in both place 7 and place 8; for floating point operations
- c branch offset for cpBcc operations.
- The place to store is word two if bit six of word one is zero,
- and words two and three if bit six of word one is one.
- i Increment by two, to skip over coprocessor extended operands. Only
- works with the 'I' format.
- k Dynamic K-factor field. Bits 6-4 of word 2, used as a register number.
- Also used for dynamic fmovem instruction.
- C floating point coprocessor constant - 7 bits. Also used for static
- K-factors...
- j Movec register #, stored in 12 low bits of second word.
- m For M[S]ACx; 4 bits split with MSB shifted 6 bits in first word
- and remaining 3 bits of register shifted 9 bits in first word.
- Indicate upper/lower in 1 bit shifted 7 bits in second word.
- Use with `R' or `u' format.
- n `m' withouth upper/lower indication. (For M[S]ACx; 4 bits split
- with MSB shifted 6 bits in first word and remaining 3 bits of
- register shifted 9 bits in first word. No upper/lower
- indication is done.) Use with `R' or `u' format.
- o For M[S]ACw; 4 bits shifted 12 in second word (like `1').
- Indicate upper/lower in 1 bit shifted 7 bits in second word.
- Use with `R' or `u' format.
- M For M[S]ACw; 4 bits in low bits of first word. Indicate
- upper/lower in 1 bit shifted 6 bits in second word. Use with
- `R' or `u' format.
- N For M[S]ACw; 4 bits in low bits of second word. Indicate
- upper/lower in 1 bit shifted 6 bits in second word. Use with
- `R' or `u' format.
- h shift indicator (scale factor), 1 bit shifted 10 in second word
-
- Places to put operand, for general operands:
- d destination, shifted 6 bits in first word
- b source, at low bit of first word, and immediate uses one byte
- w source, at low bit of first word, and immediate uses two bytes
- l source, at low bit of first word, and immediate uses four bytes
- s source, at low bit of first word.
- Used sometimes in contexts where immediate is not allowed anyway.
- f single precision float, low bit of 1st word, immediate uses 4 bytes
- F double precision float, low bit of 1st word, immediate uses 8 bytes
- x extended precision float, low bit of 1st word, immediate uses 12 bytes
- p packed float, low bit of 1st word, immediate uses 12 bytes
- G EMAC accumulator, load (bit 4 2nd word, !bit8 first word)
- H EMAC accumulator, non load (bit 4 2nd word, bit 8 first word)
- F EMAC ACCx
- f EMAC ACCy
- I MAC/EMAC scale factor
- / Like 's', but set 2nd word, bit 5 if trailing_ampersand set
- ] first word, bit 10
-*/
-
-extern const struct m68k_opcode m68k_opcodes[];
-extern const struct m68k_opcode_alias m68k_opcode_aliases[];
-
-extern const int m68k_numopcodes, m68k_numaliases;
-
-/* end of m68k-opcode.h */
diff --git a/include/opcode/m88k.h b/include/opcode/m88k.h
deleted file mode 100644
index 2589686..0000000
--- a/include/opcode/m88k.h
+++ /dev/null
@@ -1,454 +0,0 @@
-/* Table of opcodes for the Motorola M88k family.
- Copyright 1989, 1990, 1991, 1993, 2001, 2002
- Free Software Foundation, Inc.
-
-This file is part of GDB and GAS.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/*
- * Disassembler Instruction Table
- *
- * The first field of the table is the opcode field. If an opcode
- * is specified which has any non-opcode bits on, a system error
- * will occur when the system attempts the install it into the
- * instruction table. The second parameter is a pointer to the
- * instruction mnemonic. Each operand is specified by offset, width,
- * and type. The offset is the bit number of the least significant
- * bit of the operand with bit 0 being the least significant bit of
- * the instruction. The width is the number of bits used to specify
- * the operand. The type specifies the output format to be used for
- * the operand. The valid formats are: register, register indirect,
- * hex constant, and bit field specification. The last field is a
- * pointer to the next instruction in the linked list. These pointers
- * are initialized by init_disasm().
- *
- * Revision History
- *
- * Revision 1.0 11/08/85 Creation date
- * 1.1 02/05/86 Updated instruction mnemonic table MD
- * 1.2 06/16/86 Updated SIM_FLAGS for floating point
- * 1.3 09/20/86 Updated for new encoding
- * 05/11/89 R. Trawick adapted from Motorola disassembler
- */
-
-#include <stdio.h>
-
-/* Define the number of bits in the primary opcode field of the instruction,
- the destination field, the source 1 and source 2 fields. */
-
-/* Size of opcode field. */
-#define OP 8
-
-/* Size of destination. */
-#define DEST 6
-
-/* Size of source1. */
-#define SOURCE1 6
-
-/* Size of source2. */
-#define SOURCE2 6
-
-/* Number of registers. */
-#define REGs 32
-
-/* Type definitions. */
-
-typedef unsigned int UINT;
-#define WORD long
-#define FLAG unsigned
-#define STATE short
-
-/* The next four equates define the priorities that the various classes
- * of instructions have regarding writing results back into registers and
- * signalling exceptions. */
-
-/* PMEM is also defined in <sys/param.h> on Delta 88's. Sigh! */
-#undef PMEM
-
-/* Integer priority. */
-#define PINT 0
-
-/* Floating point priority. */
-#define PFLT 1
-
-/* Memory priority. */
-#define PMEM 2
-
-/* Not applicable, instruction doesn't write to regs. */
-#define NA 3
-
-/* Highest of these priorities. */
-#define HIPRI 3
-
-/* The instruction registers are an artificial mechanism to speed up
- * simulator execution. In the real processor, an instruction register
- * is 32 bits wide. In the simulator, the 32 bit instruction is kept in
- * a structure field called rawop, and the instruction is partially decoded,
- * and split into various fields and flags which make up the other fields
- * of the structure.
- * The partial decode is done when the instructions are initially loaded
- * into simulator memory. The simulator code memory is not an array of
- * 32 bit words, but is an array of instruction register structures.
- * Yes this wastes memory, but it executes much quicker.
- */
-
-struct IR_FIELDS
-{
- unsigned op:OP,
- dest: DEST,
- src1: SOURCE1,
- src2: SOURCE2;
- int ltncy,
- extime,
- /* Writeback priority. */
- wb_pri;
- /* Immediate size. */
- unsigned imm_flags:2,
- /* Register source 1 used. */
- rs1_used:1,
- /* Register source 2 used. */
- rs2_used:1,
- /* Register source/dest. used. */
- rsd_used:1,
- /* Complement. */
- c_flag:1,
- /* Upper half word. */
- u_flag:1,
- /* Execute next. */
- n_flag:1,
- /* Uses writeback slot. */
- wb_flag:1,
- /* Dest size. */
- dest_64:1,
- /* Source 1 size. */
- s1_64:1,
- /* Source 2 size. */
- s2_64:1,
- scale_flag:1,
- /* Scaled register. */
- brk_flg:1;
-};
-
-struct mem_segs
-{
- /* Pointer (returned by calloc) to segment. */
- struct mem_wrd *seg;
-
- /* Base load address from file headers. */
- unsigned long baseaddr;
-
- /* Ending address of segment. */
- unsigned long endaddr;
-
- /* Segment control flags (none defined). */
- int flags;
-};
-
-#define MAXSEGS (10) /* max number of segment allowed */
-#define MEMSEGSIZE (sizeof(struct mem_segs))/* size of mem_segs structure */
-
-#if 0
-#define BRK_RD (0x01) /* break on memory read */
-#define BRK_WR (0x02) /* break on memory write */
-#define BRK_EXEC (0x04) /* break on execution */
-#define BRK_CNT (0x08) /* break on terminal count */
-#endif
-
-struct mem_wrd
-{
- /* Simulator instruction break down. */
- struct IR_FIELDS opcode;
- union {
- /* Memory element break down. */
- unsigned long l;
- unsigned short s[2];
- unsigned char c[4];
- } mem;
-};
-
-/* Size of each 32 bit memory model. */
-#define MEMWRDSIZE (sizeof (struct mem_wrd))
-
-extern struct mem_segs memory[];
-extern struct PROCESSOR m78000;
-
-struct PROCESSOR
-{
- unsigned WORD
- /* Execute instruction pointer. */
- ip,
- /* Vector base register. */
- vbr,
- /* Processor status register. */
- psr;
-
- /* Source 1. */
- WORD S1bus,
- /* Source 2. */
- S2bus,
- /* Destination. */
- Dbus,
- /* Data address bus. */
- DAbus,
- ALU,
- /* Data registers. */
- Regs[REGs],
- /* Max clocks before reg is available. */
- time_left[REGs],
- /* Writeback priority of reg. */
- wb_pri[REGs],
- /* Integer unit control regs. */
- SFU0_regs[REGs],
- /* Floating point control regs. */
- SFU1_regs[REGs],
- Scoreboard[REGs],
- Vbr;
- unsigned WORD scoreboard,
- Psw,
- Tpsw;
- /* Waiting for a jump instruction. */
- FLAG jump_pending:1;
-};
-
-/* Size of immediate field. */
-
-#define i26bit 1
-#define i16bit 2
-#define i10bit 3
-
-/* Definitions for fields in psr. */
-
-#define psr_mode 31
-#define psr_rbo 30
-#define psr_ser 29
-#define psr_carry 28
-#define psr_sf7m 11
-#define psr_sf6m 10
-#define psr_sf5m 9
-#define psr_sf4m 8
-#define psr_sf3m 7
-#define psr_sf2m 6
-#define psr_sf1m 5
-#define psr_mam 4
-#define psr_inm 3
-#define psr_exm 2
-#define psr_trm 1
-#define psr_ovfm 0
-
-/* The 1 clock operations. */
-
-#define ADDU 1
-#define ADDC 2
-#define ADDUC 3
-#define ADD 4
-
-#define SUBU ADD+1
-#define SUBB ADD+2
-#define SUBUB ADD+3
-#define SUB ADD+4
-
-#define AND_ ADD+5
-#define OR ADD+6
-#define XOR ADD+7
-#define CMP ADD+8
-
-/* Loads. */
-
-#define LDAB CMP+1
-#define LDAH CMP+2
-#define LDA CMP+3
-#define LDAD CMP+4
-
-#define LDB LDAD+1
-#define LDH LDAD+2
-#define LD LDAD+3
-#define LDD LDAD+4
-#define LDBU LDAD+5
-#define LDHU LDAD+6
-
-/* Stores. */
-
-#define STB LDHU+1
-#define STH LDHU+2
-#define ST LDHU+3
-#define STD LDHU+4
-
-/* Exchange. */
-
-#define XMEMBU LDHU+5
-#define XMEM LDHU+6
-
-/* Branches. */
-
-#define JSR STD+1
-#define BSR STD+2
-#define BR STD+3
-#define JMP STD+4
-#define BB1 STD+5
-#define BB0 STD+6
-#define RTN STD+7
-#define BCND STD+8
-
-/* Traps. */
-
-#define TB1 BCND+1
-#define TB0 BCND+2
-#define TCND BCND+3
-#define RTE BCND+4
-#define TBND BCND+5
-
-/* Misc. */
-
-#define MUL TBND + 1
-#define DIV MUL +2
-#define DIVU MUL +3
-#define MASK MUL +4
-#define FF0 MUL +5
-#define FF1 MUL +6
-#define CLR MUL +7
-#define SET MUL +8
-#define EXT MUL +9
-#define EXTU MUL +10
-#define MAK MUL +11
-#define ROT MUL +12
-
-/* Control register manipulations. */
-
-#define LDCR ROT +1
-#define STCR ROT +2
-#define XCR ROT +3
-
-#define FLDCR ROT +4
-#define FSTCR ROT +5
-#define FXCR ROT +6
-
-#define NOP XCR +1
-
-/* Floating point instructions. */
-
-#define FADD NOP +1
-#define FSUB NOP +2
-#define FMUL NOP +3
-#define FDIV NOP +4
-#define FSQRT NOP +5
-#define FCMP NOP +6
-#define FIP NOP +7
-#define FLT NOP +8
-#define INT NOP +9
-#define NINT NOP +10
-#define TRNC NOP +11
-#define FLDC NOP +12
-#define FSTC NOP +13
-#define FXC NOP +14
-
-#define UEXT(src,off,wid) \
- ((((unsigned int)(src)) >> (off)) & ((1 << (wid)) - 1))
-
-#define SEXT(src,off,wid) \
- (((((int)(src))<<(32 - ((off) + (wid)))) >>(32 - (wid))) )
-
-#define MAKE(src,off,wid) \
- ((((unsigned int)(src)) & ((1 << (wid)) - 1)) << (off))
-
-#define opword(n) (unsigned long) (memaddr->mem.l)
-
-/* Constants and masks. */
-
-#define SFU0 0x80000000
-#define SFU1 0x84000000
-#define SFU7 0x9c000000
-#define RRI10 0xf0000000
-#define RRR 0xf4000000
-#define SFUMASK 0xfc00ffe0
-#define RRRMASK 0xfc00ffe0
-#define RRI10MASK 0xfc00fc00
-#define DEFMASK 0xfc000000
-#define CTRL 0x0000f000
-#define CTRLMASK 0xfc00f800
-
-/* Operands types. */
-
-enum operand_type
-{
- HEX = 1,
- REG = 2,
- CONT = 3,
- IND = 3,
- BF = 4,
- /* Scaled register. */
- REGSC = 5,
- /* Control register. */
- CRREG = 6,
- /* Floating point control register. */
- FCRREG = 7,
- PCREL = 8,
- CONDMASK = 9,
- /* Extended register. */
- XREG = 10,
- /* Decimal. */
- DEC = 11
-};
-
-/* Hashing specification. */
-
-#define HASHVAL 79
-
-/* Structure templates. */
-
-typedef struct
-{
- unsigned int offset;
- unsigned int width;
- enum operand_type type;
-} OPSPEC;
-
-struct SIM_FLAGS
-{
- int ltncy, /* latency (max number of clocks needed to execute). */
- extime, /* execution time (min number of clocks needed to execute). */
- wb_pri; /* writeback slot priority. */
- unsigned op:OP, /* simulator version of opcode. */
- imm_flags:2, /* 10,16 or 26 bit immediate flags. */
- rs1_used:1, /* register source 1 used. */
- rs2_used:1, /* register source 2 used. */
- rsd_used:1, /* register source/dest used. */
- c_flag:1, /* complement. */
- u_flag:1, /* upper half word. */
- n_flag:1, /* execute next. */
- wb_flag:1, /* uses writeback slot. */
- dest_64:1, /* double precision dest. */
- s1_64:1, /* double precision source 1. */
- s2_64:1, /* double precision source 2. */
- scale_flag:1; /* register is scaled. */
-};
-
-typedef struct INSTRUCTAB {
- unsigned int opcode;
- char *mnemonic;
- OPSPEC op1,op2,op3;
- struct SIM_FLAGS flgs;
-} INSTAB;
-
-
-#define NO_OPERAND {0,0,0}
-
-extern const INSTAB instructions[];
-
-/*
- * Local Variables:
- * fill-column: 131
- * End:
- */
diff --git a/include/opcode/maxq.h b/include/opcode/maxq.h
deleted file mode 100644
index f621ac1..0000000
--- a/include/opcode/maxq.h
+++ /dev/null
@@ -1,1132 +0,0 @@
-/* maxq.h -- Header file for MAXQ opcode table.
-
- Copyright (C) 2004 Free Software Foundation, Inc.
-
- This file is part of GDB, GAS, and the GNU binutils.
-
- Written by Vineet Sharma(vineets@noida.hcltech.com)
- Inderpreet Singh (inderpreetb@noida.hcltech.com)
-
- GDB, GAS, and the GNU binutils are free software; you can redistribute
- them and/or modify them under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2, or (at
- your option) any later version.
-
- GDB, GAS, and the GNU binutils are distributed in the hope that they will
- be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this file; see the file COPYING. If not, write to the Free Software
- Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _MAXQ20_H_
-#define _MAXQ20_H_
-
-/* This file contains the opcode table for the MAXQ10/20 processor. The table
- has been designed on the lines of the SH processor with the following
- fields:
- (1) Instruction Name
- (2) Instruction arguments description
- (3) Description of the breakup of the opcode (1+7+8|8+8|1+4+4|1+7+1+3+4
- |1+3+4+1+3+4|1+3+4+8|1+1+2+4+8)
- (4) Architecture supported
-
- The Register table is also defined. It contains the following fields
- (1) Register name
- (2) Module Number
- (3) Module Index
- (4) Opcode
- (5) Regtype
-
- The Memory access table is defined containing the various opcodes for
- memory access containing the following fields
- (1) Memory access Operand Name
- (2) Memory access Operand opcode. */
-
-# define MAXQ10 0x0001
-# define MAXQ20 0x0002
-# define MAX (MAXQ10 | MAXQ20)
-
-/* This is for the NOP instruction Specify : 1st bit : NOP_FMT 1st byte:
- NOP_DST 2nd byte: NOP_SRC. */
-# define NOP_FMT 1
-# define NOP_SRC 0x3A
-# define NOP_DST 0x5A
-
-typedef enum
-{
- ZEROBIT = 0x1, /* A zero followed by 3 bits. */
- ONEBIT = 0x2, /* A one followed by 3 bits. */
- REG = 0x4, /* Register. */
- MEM = 0x8, /* Memory access. */
- IMM = 0x10, /* Immediate value. */
- DISP = 0x20, /* Displacement value. */
- BIT = 0x40, /* Bit value. */
- FMT = 0x80, /* The format bit. */
- IMMBIT = 0x100, /* An immediate bit. */
- FLAG = 0x200, /* A Flag. */
- DATA = 0x400, /* Symbol in the data section. */
- BIT_BUCKET = 0x800, /* FOr BIT BUCKET. */
-}
-UNKNOWN_OP;
-
-typedef enum
-{
- NO_ARG = 0,
- A_IMM = 0x01, /* An 8 bit immediate value. */
- A_REG = 0x2, /* An 8 bit source register. */
- A_MEM = 0x4, /* A 7 bit destination register. */
- FLAG_C = 0x8, /* Carry Flag. */
- FLAG_NC = 0x10, /* No Carry (~C) flag. */
- FLAG_Z = 0x20, /* Zero Flag. */
- FLAG_NZ = 0x40, /* Not Zero Flag. */
- FLAG_S = 0x80, /* Sign Flag. */
- FLAG_E = 0x100, /* Equals Flag. */
- FLAG_NE = 0x200, /* Not Equal Flag. */
- ACC_BIT = 0x400, /* One of the 16 accumulator bits of the form Acc.<b>. */
- DST_BIT = 0x800, /* One of the 8 bits of the specified SRC. */
- SRC_BIT = 0x1000, /* One of the 8 bits of the specified source register. */
- A_BIT_0 = 0x2000, /* #0. */
- A_BIT_1 = 0x4000, /* #1. */
- A_DISP = 0x8000, /* Displacement Operand. */
- A_DATA = 0x10000, /* Data in the data section. */
- A_BIT_BUCKET = 0x200000,
-}
-MAX_ARG_TYPE;
-
-typedef struct
-{
- char * name; /* Name of the instruction. */
- unsigned int op_number; /* Operand Number or the number of operands. */
- MAX_ARG_TYPE arg[2]; /* Types of operands. */
- int format; /* Format bit. */
- int dst[2]; /* Destination in the move instruction. */
- int src[2]; /* Source in the move instruction. */
- int arch; /* The Machine architecture. */
- unsigned int instr_id; /* Added for decode and dissassembly. */
-}
-MAXQ20_OPCODE_INFO;
-
-/* Structure for holding opcodes of the same name. */
-typedef struct
-{
- const MAXQ20_OPCODE_INFO *start; /* The first opcode. */
- const MAXQ20_OPCODE_INFO *end; /* The last opcode. */
-}
-MAXQ20_OPCODES;
-
-/* The entry into the hash table will be of the type MAXX_OPCODES. */
-
-/* The definition of the table. */
-const MAXQ20_OPCODE_INFO op_table[] =
-{
- /* LOGICAL OPERATIONS */
- /* AND src : f001 1010 ssss ssss */
- {"AND", 1, {A_IMM | A_REG | A_MEM | A_DISP, 0}, FMT, {0x1a, 0},
- {REG | MEM | IMM | DISP, 0}, MAX, 0x11},
- /* AND Acc.<b> : 1111 1010 bbbb 1010 */
- {"AND", 1, {ACC_BIT, 0}, 1, {0x1a, 0}, {BIT, 0xa}, MAX, 0x39},
- /* OR src : f010 1010 ssss ssss */
- {"OR", 1, {A_IMM | A_REG | A_MEM | A_DISP, 0}, FMT, {0x2a, 0},
- {REG | MEM | IMM | DISP, 0}, MAX, 0x12},
- /* OR Acc.<b> : 1010 1010 bbbb 1010 */
- {"OR", 1, {ACC_BIT, 0}, 1, {0x2a, 0}, {BIT, 0xa}, MAX, 0x3A},
- /* XOR src : f011 1010 ssss ssss */
- {"XOR", 1, {A_IMM | A_REG | A_MEM | A_DISP, 0}, FMT, {0x3a, 0},
- {REG | MEM | IMM | DISP, 0}, MAX, 0x13},
- /* XOR Acc.<b> : 1011 1010 bbbb 1010 */
- {"XOR", 1, {ACC_BIT, 0}, 1, {0x3a, 0}, {BIT, 0xa}, MAX, 0x3B},
- /* LOGICAL OPERATIONS INVOLVING ONLY THE ACCUMULATOR */
- /* CPL : 1000 1010 0001 1010 */
- {"CPL", 0, {0, 0}, 1, {0x0a, 0}, {0x1a, 0}, MAX, 0x21},
- /* CPL C : 1101 1010 0010 1010 */
- {"CPL", 1, {FLAG_C, 0}, 1, {0x5a, 0}, {0x2a, 0}, MAX, 0x3D},
- /* NEG : 1000 1010 1001 1010 */
- {"NEG", 0, {0, 0}, 1, {0x0a, 0}, {0x9a, 0}, MAX, 0x29},
- /* SLA : 1000 1010 0010 1010 */
- {"SLA", 0, {0, 0}, 1, {0x0a, 0}, {0x2a, 0}, MAX, 0x22},
- /* SLA2: 1000 1010 0011 1010 */
- {"SLA2", 0, {0, 0}, 1, {0x0a, 0}, {0x3a, 0}, MAX, 0x23},
- /* SLA4: 1000 1010 0110 1010 */
- {"SLA4", 0, {0, 0}, 1, {0x0a, 0}, {0x6a, 0}, MAX, 0x26},
- /* RL : 1000 1010 0100 1010 */
- {"RL", 0, {0, 0}, 1, {0x0a, 0}, {0x4a, 0}, MAX, 0x24},
- /* RLC : 1000 1010 0101 1010 */
- {"RLC", 0, {0, 0}, 1, {0x0a, 0}, {0x5a, 0}, MAX, 0x25},
- /* SRA : 1000 1010 1111 1010 */
- {"SRA", 0, {0, 0}, 1, {0x0a, 0}, {0xfa, 0}, MAX, 0x2F},
- /* SRA2: 1000 1010 1110 1010 */
- {"SRA2", 0, {0, 0}, 1, {0x0a, 0}, {0xea, 0}, MAX, 0x2E},
- /* SRA4: 1000 1010 1011 1010 */
- {"SRA4", 0, {0, 0}, 1, {0x0a, 0}, {0xba, 0}, MAX, 0x2B},
- /* SR : 1000 1010 1010 1010 */
- {"SR", 0, {0, 0}, 1, {0x0a, 0}, {0xaa, 0}, MAX, 0x2A},
- /* RR : 1000 1010 1100 1010 */
- {"RR", 0, {0, 0}, 1, {0x0a, 0}, {0xca, 0}, MAX, 0x2C},
- /* RRC : 1000 1010 1101 1010 */
- {"RRC", 0, {0, 0}, 1, {0x0a, 0}, {0xda, 0}, MAX, 0x2D},
- /* MATH OPERATIONS */
- /* ADD src : f100 1010 ssss ssss */
- {"ADD", 1, {A_IMM | A_REG | A_MEM | A_DISP, 0}, FMT, {0x4a, 0},
- {IMM | REG | MEM | DISP, 0}, MAX, 0x14},
- /* ADDC src : f110 1010 ssss ssss */
- {"ADDC", 1, {A_IMM | A_REG | A_MEM | A_DISP, 0}, FMT, {0x6a, 0},
- {IMM | REG | MEM | DISP, 0}, MAX, 0x16},
- /* SUB src : f101 1010 ssss ssss */
- {"SUB", 1, {A_IMM | A_REG | A_MEM | A_DISP, 0}, FMT, {0x5a, 0},
- {IMM | REG | MEM | DISP, 0}, MAX, 0x15},
- /* SUBB src : f111 1010 ssss ssss */
- {"SUBB", 1, {A_IMM | A_REG | A_MEM | A_DISP, 0}, FMT, {0x7a, 0},
- {IMM | REG | MEM | DISP, 0}, MAX, 0x17},
- /* BRANCHING OPERATIONS */
-
- /* DJNZ LC[0] src: f100 1101 ssss ssss */
- {"DJNZ", 2, {A_REG, A_IMM | A_REG | A_MEM | A_DISP}, FMT, {0x4d, 0},
- {IMM | REG | MEM | DISP, 0}, MAX, 0xA4},
- /* DJNZ LC[1] src: f101 1101 ssss ssss */
- {"DJNZ", 2, {A_REG, A_IMM | A_REG | A_MEM | A_DISP}, FMT, {0x5d, 0},
- {IMM | REG | MEM | DISP, 0}, MAX, 0xA5},
- /* CALL src : f011 1101 ssss ssss */
- {"CALL", 1, {A_IMM | A_REG | A_MEM | A_DISP, 0}, FMT, {0x3d, 0},
- {IMM | REG | MEM | DISP, 0}, MAX, 0xA3},
- /* JUMP src : f000 1100 ssss ssss */
- {"JUMP", 1, {A_IMM | A_REG | A_MEM | A_DISP, 0}, FMT, {0x0c, 0},
- {IMM | REG | MEM | DISP, 0}, MAX, 0x50},
- /* JUMP C,src : f010 1100 ssss ssss */
- {"JUMP", 2, {FLAG_C, A_IMM | A_REG | A_MEM | A_DISP}, FMT, {0x2c, 0},
- {IMM | REG | MEM | DISP, 0}, MAX, 0x52},
- /* JUMP NC,src: f110 1100 ssss ssss */
- {"JUMP", 2, {FLAG_NC, A_IMM | A_REG | A_MEM | A_DISP}, FMT, {0x6c, 0},
- {IMM | REG | MEM | DISP, 0}, MAX, 0x56},
- /* JUMP Z,src : f001 1100 ssss ssss */
- {"JUMP", 2, {FLAG_Z, A_IMM | A_REG | A_MEM | A_DISP}, FMT, {0x1c, 0},
- {IMM | REG | MEM | DISP, 0}, MAX, 0x51},
- /* JUMP NZ,src: f101 1100 ssss ssss */
- {"JUMP", 2, {FLAG_NZ, A_IMM | A_REG | A_MEM | A_DISP}, FMT, {0x5c, 0},
- {IMM | REG | MEM | DISP, 0}, MAX, 0x55},
- /* JUMP E,src : 0011 1100 ssss ssss */
- {"JUMP", 2, {FLAG_E, A_IMM | A_DISP}, 0, {0x3c, 0}, {IMM, 0}, MAX, 0x53},
- /* JUMP NE,src: 0111 1100 ssss ssss */
- {"JUMP", 2, {FLAG_NE, A_IMM | A_DISP}, 0, {0x7c, 0}, {IMM, 0}, MAX, 0x57},
- /* JUMP S,src : f100 1100 ssss ssss */
- {"JUMP", 2, {FLAG_S, A_IMM | A_REG | A_MEM | A_DISP}, FMT, {0x4c, 0},
- {IMM | REG | MEM | DISP, 0}, MAX, 0x54},
- /* RET : 1000 1100 0000 1101 */
- {"RET", 0, {0, 0}, 1, {0x0c, 0}, {0x0d, 0}, MAX, 0x68},
- /* RET C : 1010 1100 0000 1101 */
- {"RET", 1, {FLAG_C, 0}, 1, {0x2c, 0}, {0x0d, 0}, MAX, 0x6A},
- /* RET NC : 1110 1100 0000 1101 */
- {"RET", 1, {FLAG_NC, 0}, 1, {0x6c, 0}, {0x0d, 0}, MAX, 0x6E},
- /* RET Z : 1001 1100 0000 1101 */
- {"RET", 1, {FLAG_Z, 0}, 1, {0x1c, 0}, {0x0d, 0}, MAX, 0x69},
- /* RET NZ : 1101 1100 0000 1101 */
- {"RET", 1, {FLAG_NZ, 0}, 1, {0x5c, 0}, {0x0d, 0}, MAX, 0x6D},
- /* RET S : 1100 1100 0000 1101 */
- {"RET", 1, {FLAG_S, 0}, 1, {0x4c, 0}, {0x0d, 0}, MAX, 0x6C},
- /* RETI : 1000 1100 1000 1101 */
- {"RETI", 0, {0, 0}, 1, {0x0c, 0}, {0x8d, 0}, MAX, 0x78},
- /* ADDED ACCORDING TO NEW SPECIFICATION */
-
- /* RETI C : 1010 1100 1000 1101 */
- {"RETI", 1, {FLAG_C, 0}, 1, {0x2c, 0}, {0x8d, 0}, MAX, 0x7A},
- /* RETI NC : 1110 1100 1000 1101 */
- {"RETI", 1, {FLAG_NC, 0}, 1, {0x6c, 0}, {0x8d, 0}, MAX, 0x7E},
- /* RETI Z : 1001 1100 1000 1101 */
- {"RETI", 1, {FLAG_Z, 0}, 1, {0x1c, 0}, {0x8d, 0}, MAX, 0x79},
- /* RETI NZ : 1101 1100 1000 1101 */
- {"RETI", 1, {FLAG_NZ, 0}, 1, {0x5c, 0}, {0x8d, 0}, MAX, 0x7D},
- /* RETI S : 1100 1100 1000 1101 */
- {"RETI", 1, {FLAG_S, 0}, 1, {0x4c, 0}, {0x8d, 0}, MAX, 0x7C},
- /* MISCELLANEOUS INSTRUCTIONS */
- /* CMP src : f111 1000 ssss ssss */
- {"CMP", 1, {A_REG | A_IMM | A_MEM | A_DISP, 0}, FMT, {0x78, 0},
- {REG | MEM | IMM | DISP, 0}, MAX, 0xD7},
- /* DATA TRANSFER OPERATIONS */
- /* XCH : 1000 1010 1000 1010 */
- {"XCH", 0, {0, 0}, 1, {0x0a, 0}, {0x8a, 0}, MAXQ20, 0x28},
- /* XCHN : 1000 1010 0111 1010 */
- {"XCHN", 0, {0, 0}, 1, {0x0a, 0}, {0x7a, 0}, MAX, 0x27},
- /* PUSH src : f000 1101 ssss ssss */
- {"PUSH", 1, {A_REG | A_IMM | A_MEM | A_DISP, 0}, FMT, {0x0d, 0},
- {IMM | REG | MEM | DISP, 0}, MAX, 0xA0},
- /* POP dst : 1ddd dddd 0000 1101 */
- {"POP", 1, {A_REG, 0}, 1, {REG, 0}, {0x0d, 0}, MAX, 0xB0},
- /* Added according to new spec */
- /* POPI dst : 1ddd dddd 1000 1101 */
- {"POPI", 1, {A_REG, 0}, 1, {REG, 0}, {0x8d, 0}, MAX, 0xC0},
- /* MOVE dst,src: fddd dddd ssss ssss */
- {"MOVE", 2, {A_REG | A_MEM, A_REG | A_IMM | A_MEM | A_DATA | A_DISP}, FMT,
- {REG | MEM, 0}, {REG | IMM | MEM | DATA | A_DISP, 0}, MAX, 0x80},
- /* BIT OPERATIONS */
- /* MOVE C,Acc.<b> : 1110 1010 bbbb 1010 */
- {"MOVE", 2, {FLAG_C, ACC_BIT}, 1, {0x6a, 0}, {BIT, 0xa}, MAX, 0x3E},
- /* MOVE C,#0 : 1101 1010 0000 1010 */
- {"MOVE", 2, {FLAG_C, A_BIT_0}, 1, {0x5a, 0}, {0x0a, 0}, MAX, 0x3D},
- /* MOVE C,#1 : 1101 1010 0001 1010 */
- {"MOVE", 2, {FLAG_C, A_BIT_1}, 1, {0x5a, 0}, {0x1a, 0}, MAX, 0x3D},
- /* MOVE Acc.<b>,C : 1111 1010 bbbb 1010 */
- {"MOVE", 2, {ACC_BIT, FLAG_C}, 1, {0x7a, 0}, {BIT, 0xa}, MAX, 0x3F},
- /* MOVE dst.<b>,#0 : 1ddd dddd 0bbb 0111 */
- {"MOVE", 2, {DST_BIT, A_BIT_0}, 1, {REG, 0}, {ZEROBIT, 0x7}, MAX, 0x40},
- /* MOVE dst.<b>,#1 : 1ddd dddd 1bbb 0111 */
- {"MOVE", 2, {DST_BIT, A_BIT_1}, 1, {REG, 0}, {ONEBIT, 0x7}, MAX, 0x41},
- /* MOVE C,src.<b> : fbbb 0111 ssss ssss */
- {"MOVE", 2, {FLAG_C, SRC_BIT}, FMT, {BIT, 0x7}, {REG, 0}, MAX, 0x97},
- /* NOP : 1101 1010 0011 1010 */
- {"NOP", 0, {0, 0}, NOP_FMT, {NOP_DST, 0}, {NOP_SRC, 0}, MAX, 0x3D},
- {NULL, 0, {0, 0}, 0, {0, 0}, {0, 0}, 0, 0x00}
-};
-
-/* All the modules. */
-
-#define MOD0 0x0
-#define MOD1 0x1
-#define MOD2 0x2
-#define MOD3 0x3
-#define MOD4 0x4
-#define MOD5 0x5
-#define MOD6 0x6
-#define MOD7 0x7
-#define MOD8 0x8
-#define MOD9 0x9
-#define MODA 0xa
-#define MODB 0xb
-#define MODC 0xc
-#define MODD 0xd
-#define MODE 0xe
-#define MODF 0xf
-
-/* Added according to new specification. */
-#define MOD10 0x10
-#define MOD11 0x11
-#define MOD12 0x12
-#define MOD13 0x13
-#define MOD14 0x14
-#define MOD15 0x15
-#define MOD16 0x16
-#define MOD17 0x17
-#define MOD18 0x18
-#define MOD19 0x19
-#define MOD1A 0x1a
-#define MOD1B 0x1b
-#define MOD1C 0x1c
-#define MOD1D 0x1d
-#define MOD1E 0x1e
-#define MOD1F 0x1f
-
-/* - Peripheral Register Modules - */
-/* Serial Register Modules. */
-#define CTRL MOD8 /* For the module containing the control registers. */
-#define ACC MOD9 /* For the module containing the 16 accumulators. */
-#define Act_ACC MODA /* For the module containing the active accumulator. */
-#define PFX MODB /* For the module containing the prefix registers. */
-#define IP MODC /* For the module containing the instruction pointer register. */
-#define SPIV MODD /* For the module containing the stack pointer and the interrupt vector. */
-#define LC MODD /* For the module containing the loop counters and HILO registers. */
-#define DP MODF /* For the module containig the data pointer registers. */
-
-/* Register Types. */
-typedef enum _Reg_type
-{ Reg_8R, /* 8 bit register. read only. */
- Reg_16R, /* 16 bit register, read only. */
- Reg_8W, /* 8 bit register, both read and write. */
- Reg_16W /* 16 bit register, both read and write. */
-}
-Reg_type;
-
-/* Register Structure. */
-typedef struct reg
-{
- char *reg_name; /* Register name. */
- short int Mod_name; /* The module name. */
- short int Mod_index; /* The module index. */
- int opcode; /* The opcode of the register. */
- Reg_type rtype; /* 8 bit/16 bit and read only/read write. */
- int arch; /* The Machine architecture. */
-}
-reg_entry;
-
-reg_entry *new_reg_table = NULL;
-int num_of_reg = 0;
-
-typedef struct
-{
- char *rname;
- int rindex;
-}
-reg_index;
-
-/* Register Table description. */
-reg_entry system_reg_table[] =
-{
- /* Serial Registers */
- /* MODULE 8 Registers : I call them the control registers. */
- /* Accumulator Pointer CTRL[0h] */
- {
- "AP", CTRL, 0x0, 0x00 | CTRL, Reg_8W, MAX},
- /* Accumulator Pointer Control Register : CTRL[1h] */
-
- {
- "APC", CTRL, 0x1, 0x10 | CTRL, Reg_8W, MAX},
- /* Processor Status Flag Register CTRL[4h] Note: Bits 6 and 7 read only */
- {
- "PSF", CTRL, 0x4, 0x40 | CTRL, Reg_8W, MAX},
- /* Interrupt and Control Register : CTRL[5h] */
- {
- "IC", CTRL, 0x5, 0x50 | CTRL, Reg_8W, MAX},
- /* Interrupt Mask Register : CTRL[6h] */
- {
- "IMR", CTRL, 0x6, 0x60 | CTRL, Reg_8W, MAX},
- /* Interrupt System Control : CTRL[8h] */
- {
- "SC", CTRL, 0x8, 0x80 | CTRL, Reg_8W, MAX},
- /* Interrupt Identification Register : CTRL[Bh] */
- {
- "IIR", CTRL, 0xb, 0xb0 | CTRL, Reg_8R, MAX},
- /* System Clock Control Register : CTRL[Eh] Note: Bit 5 is read only */
- {
- "CKCN", CTRL, 0xe, 0xe0 | CTRL, Reg_8W, MAX},
- /* Watchdog Control Register : CTRL[Fh] */
- {
- "WDCN", CTRL, 0xf, 0xf0 | CTRL, Reg_8W, MAX},
- /* The 16 accumulator registers : ACC[0h-Fh] */
- {
- "A[0]", ACC, 0x0, 0x00 | ACC, Reg_16W, MAXQ20},
- {
- "A[1]", ACC, 0x1, 0x10 | ACC, Reg_16W, MAXQ20},
- {
- "A[2]", ACC, 0x2, 0x20 | ACC, Reg_16W, MAXQ20},
- {
- "A[3]", ACC, 0x3, 0x30 | ACC, Reg_16W, MAXQ20},
- {
- "A[4]", ACC, 0x4, 0x40 | ACC, Reg_16W, MAXQ20},
- {
- "A[5]", ACC, 0x5, 0x50 | ACC, Reg_16W, MAXQ20},
- {
- "A[6]", ACC, 0x6, 0x60 | ACC, Reg_16W, MAXQ20},
- {
- "A[7]", ACC, 0x7, 0x70 | ACC, Reg_16W, MAXQ20},
- {
- "A[8]", ACC, 0x8, 0x80 | ACC, Reg_16W, MAXQ20},
- {
- "A[9]", ACC, 0x9, 0x90 | ACC, Reg_16W, MAXQ20},
- {
- "A[10]", ACC, 0xa, 0xa0 | ACC, Reg_16W, MAXQ20},
- {
- "A[11]", ACC, 0xb, 0xb0 | ACC, Reg_16W, MAXQ20},
- {
- "A[12]", ACC, 0xc, 0xc0 | ACC, Reg_16W, MAXQ20},
- {
- "A[13]", ACC, 0xd, 0xd0 | ACC, Reg_16W, MAXQ20},
- {
- "A[14]", ACC, 0xe, 0xe0 | ACC, Reg_16W, MAXQ20},
- {
- "A[15]", ACC, 0xf, 0xf0 | ACC, Reg_16W, MAXQ20},
- /* The Active Accumulators : Act_Acc[0h-1h] */
- {
- "ACC", Act_ACC, 0x0, 0x00 | Act_ACC, Reg_16W, MAXQ20},
- {
- "A[AP]", Act_ACC, 0x1, 0x10 | Act_ACC, Reg_16W, MAXQ20},
- /* The 16 accumulator registers : ACC[0h-Fh] */
- {
- "A[0]", ACC, 0x0, 0x00 | ACC, Reg_8W, MAXQ10},
- {
- "A[1]", ACC, 0x1, 0x10 | ACC, Reg_8W, MAXQ10},
- {
- "A[2]", ACC, 0x2, 0x20 | ACC, Reg_8W, MAXQ10},
- {
- "A[3]", ACC, 0x3, 0x30 | ACC, Reg_8W, MAXQ10},
- {
- "A[4]", ACC, 0x4, 0x40 | ACC, Reg_8W, MAXQ10},
- {
- "A[5]", ACC, 0x5, 0x50 | ACC, Reg_8W, MAXQ10},
- {
- "A[6]", ACC, 0x6, 0x60 | ACC, Reg_8W, MAXQ10},
- {
- "A[7]", ACC, 0x7, 0x70 | ACC, Reg_8W, MAXQ10},
- {
- "A[8]", ACC, 0x8, 0x80 | ACC, Reg_8W, MAXQ10},
- {
- "A[9]", ACC, 0x9, 0x90 | ACC, Reg_8W, MAXQ10},
- {
- "A[10]", ACC, 0xa, 0xa0 | ACC, Reg_8W, MAXQ10},
- {
- "A[11]", ACC, 0xb, 0xb0 | ACC, Reg_8W, MAXQ10},
- {
- "A[12]", ACC, 0xc, 0xc0 | ACC, Reg_8W, MAXQ10},
- {
- "A[13]", ACC, 0xd, 0xd0 | ACC, Reg_8W, MAXQ10},
- {
- "A[14]", ACC, 0xe, 0xe0 | ACC, Reg_8W, MAXQ10},
- {
- "A[15]", ACC, 0xf, 0xf0 | ACC, Reg_8W, MAXQ10},
- /* The Active Accumulators : Act_Acc[0h-1h] */
- {
- "A[AP]", Act_ACC, 0x1, 0x10 | Act_ACC, Reg_8W, MAXQ10},
- /* The Active Accumulators : Act_Acc[0h-1h] */
- {
- "ACC", Act_ACC, 0x0, 0x00 | Act_ACC, Reg_8W, MAXQ10},
- /* The Prefix Registers : PFX[0h,2h] */
- {
- "PFX[0]", PFX, 0x0, 0x00 | PFX, Reg_16W, MAX},
- {
- "PFX[1]", PFX, 0x1, 0x10 | PFX, Reg_16W, MAX},
- {
- "PFX[2]", PFX, 0x2, 0x20 | PFX, Reg_16W, MAX},
- {
- "PFX[3]", PFX, 0x3, 0x30 | PFX, Reg_16W, MAX},
- {
- "PFX[4]", PFX, 0x4, 0x40 | PFX, Reg_16W, MAX},
- {
- "PFX[5]", PFX, 0x5, 0x50 | PFX, Reg_16W, MAX},
- {
- "PFX[6]", PFX, 0x6, 0x60 | PFX, Reg_16W, MAX},
- {
- "PFX[7]", PFX, 0x7, 0x70 | PFX, Reg_16W, MAX},
- /* The Instruction Pointer Registers : IP[0h,8h] */
- {
- "IP", IP, 0x0, 0x00 | IP, Reg_16W, MAX},
- /* The Stack Pointer Registers : SPIV[1h,9h] */
- {
- "SP", SPIV, 0x1, 0x10 | SPIV, Reg_16W, MAX},
- /* The Interrupt Vector Registers : SPIV[2h,Ah] */
- {
- "IV", SPIV, 0x2, 0x20 | SPIV, Reg_16W, MAX},
- /* ADDED for New Specification */
-
- /* The Loop Counter Registers : LCHILO[0h-4h,8h-Bh] */
- {
- "LC[0]", LC, 0x6, 0x60 | LC, Reg_16W, MAX},
- {
- "LC[1]", LC, 0x7, 0x70 | LC, Reg_16W, MAX},
- /* MODULE Eh Whole Column has changed */
-
- {
- "OFFS", MODE, 0x3, 0x30 | MODE, Reg_8W, MAX},
- {
- "DPC", MODE, 0x4, 0x40 | MODE, Reg_16W, MAX},
- {
- "GR", MODE, 0x5, 0x50 | MODE, Reg_16W, MAX},
- {
- "GRL", MODE, 0x6, 0x60 | MODE, Reg_8W, MAX},
- {
- "BP", MODE, 0x7, 0x70 | MODE, Reg_16W, MAX},
- {
- "GRS", MODE, 0x8, 0x80 | MODE, Reg_16W, MAX},
- {
- "GRH", MODE, 0x9, 0x90 | MODE, Reg_8W, MAX},
- {
- "GRXL", MODE, 0xA, 0xA0 | MODE, Reg_8R, MAX},
- {
- "FP", MODE, 0xB, 0xB0 | MODE, Reg_16R, MAX},
- /* The Data Pointer registers : DP[3h,7h,Bh,Fh] */
- {
- "DP[0]", DP, 0x3, 0x30 | DP, Reg_16W, MAX},
- {
- "DP[1]", DP, 0x7, 0x70 | DP, Reg_16W, MAX},
-};
-typedef struct
-{
- char *name;
- int type;
-}
-match_table;
-
-#define GPIO0 0x00 /* Gerneral Purpose I/O Module 0. */
-#define GPIO1 0x01 /* Gerneral Purpose I/O Module 1. */
-#define RTC 0x00 /* Real Time Clock Module. */
-#define MAC 0x02 /* Hardware Multiplier Module. */
-#define SER0 0x02 /* Contains the UART Registers. */
-#define SPI 0x03 /* Serial Pheripheral Interface Module. */
-#define OWBM 0x03 /* One Wire Bus Module. */
-#define SER1 0x03 /* Contains the UART Registers. */
-#define TIMER20 0x03 /* Timer Counter Module 2. */
-#define TIMER21 0x04 /* Timer Counter Module 2. */
-#define JTAGD 0x03 /* In-Circuit Debugging Support. */
-#define LCD 0x03 /* LCD register Modules. */
-
-/* Plugable modules register table f. */
-
-reg_entry peripheral_reg_table[] =
-{
- /* -------- The GPIO Module Registers -------- */
- /* Port n Output Registers : GPIO[0h-4h] */
- {
- "PO0", GPIO0, 0x0, 0x00 | MOD0, Reg_8W, MAX},
- {
- "PO1", GPIO0, 0x1, 0x10 | MOD0, Reg_8W, MAX},
- {
- "PO2", GPIO0, 0x2, 0x20 | MOD0, Reg_8W, MAX},
- {
- "PO3", GPIO0, 0x3, 0x30 | MOD0, Reg_8W, MAX},
- /* External Interrupt Flag Register : GPIO[6h] */
- {
- "EIF0", GPIO0, 0x6, 0x60 | MOD0, Reg_8W, MAX},
- /* External Interrupt Enable Register : GPIO[7h] */
- {
- "EIE0", GPIO0, 0x7, 0x70 | MOD0, Reg_8W, MAX},
- /* Port n Input Registers : GPIO[8h-Bh] */
- {
- "PI0", GPIO0, 0x8, 0x80 | MOD0, Reg_8W, MAX},
- {
- "PI1", GPIO0, 0x9, 0x90 | MOD0, Reg_8W, MAX},
- {
- "PI2", GPIO0, 0xa, 0xa0 | MOD0, Reg_8W, MAX},
- {
- "PI3", GPIO0, 0xb, 0xb0 | MOD0, Reg_8W, MAX},
- {
- "EIES0", GPIO0, 0xc, 0xc0 | MOD0, Reg_8W, MAX},
- /* Port n Direction Registers : GPIO[Ch-Fh] */
- {
- "PD0", GPIO0, 0x10, 0x10 | MOD0, Reg_8W, MAX},
- {
- "PD1", GPIO0, 0x11, 0x11 | MOD0, Reg_8W, MAX},
- {
- "PD2", GPIO0, 0x12, 0x12 | MOD0, Reg_8W, MAX},
- {
- "PD3", GPIO0, 0x13, 0x13 | MOD0, Reg_8W, MAX},
- /* -------- Real Time Counter Module RTC -------- */
- /* RTC Control Register : [01h] */
- {
- "RCNT", RTC, 0x19, 0x19 | MOD0, Reg_16W, MAX},
- /* RTC Seconds High [02h] */
- {
- "RTSS", RTC, 0x1A, 0x1A | MOD0, Reg_8W, MAX},
- /* RTC Seconds Low [03h] */
- {
- "RTSH", RTC, 0x1b, 0x1b | MOD0, Reg_16W, MAX},
- /* RTC Subsecond Register [04h] */
- {
- "RTSL", RTC, 0x1C, 0x1C | MOD0, Reg_16W, MAX},
- /* RTC Alarm seconds high [05h] */
- {
- "RSSA", RTC, 0x1D, 0x1D | MOD0, Reg_8W, MAX},
- /* RTC Alarm seconds high [06h] */
- {
- "RASH", RTC, 0x1E, 0x1E | MOD0, Reg_8W, MAX},
- /* RTC Subsecond Alarm Register [07h] */
- {
- "RASL", RTC, 0x1F, 0x1F | MOD0, Reg_16W, MAX},
- /* -------- The GPIO Module Registers -------- */
- /* Port n Output Registers : GPIO[0h-4h] */
- {
- "PO4", GPIO1, 0x0, 0x00 | MOD1, Reg_8W, MAX},
- {
- "PO5", GPIO1, 0x1, 0x10 | MOD1, Reg_8W, MAX},
- {
- "PO6", GPIO1, 0x2, 0x20 | MOD1, Reg_8W, MAX},
- {
- "PO7", GPIO1, 0x3, 0x30 | MOD1, Reg_8W, MAX},
- /* External Interrupt Flag Register : GPIO[6h] */
- {
- "EIF1", GPIO0, 0x6, 0x60 | MOD1, Reg_8W, MAX},
- /* External Interrupt Enable Register : GPIO[7h] */
- {
- "EIE1", GPIO0, 0x7, 0x70 | MOD1, Reg_8W, MAX},
- /* Port n Input Registers : GPIO[8h-Bh] */
- {
- "PI4", GPIO1, 0x8, 0x80 | MOD1, Reg_8W, MAX},
- {
- "PI5", GPIO1, 0x9, 0x90 | MOD1, Reg_8W, MAX},
- {
- "PI6", GPIO1, 0xa, 0xa0 | MOD1, Reg_8W, MAX},
- {
- "PI7", GPIO1, 0xb, 0xb0 | MOD1, Reg_8W, MAX},
- {
- "EIES1", GPIO1, 0xc, 0xc0 | MOD1, Reg_8W, MAX},
- /* Port n Direction Registers : GPIO[Ch-Fh] */
- {
- "PD4", GPIO1, 0x10, 0x10 | MOD1, Reg_8W, MAX},
- {
- "PD5", GPIO1, 0x11, 0x11 | MOD1, Reg_8W, MAX},
- {
- "PD6", GPIO1, 0x12, 0x12 | MOD1, Reg_8W, MAX},
- {
- "PD7", GPIO1, 0x13, 0x13 | MOD1, Reg_8W, MAX},
-#if 0
- /* Supply Boltage Check Register */
- {
- "SVS", GPIO1, 0x1e, 0x1e | GPIO1, Reg_8W, MAX},
- /* Wake up output register */
- {
- "WK0", GPIO1, 0x1f, 0x1f | GPIO1, Reg_8W, MAX},
-#endif /* */
-
- /* -------- MAC Hardware multiplier module -------- */
- /* MAC Hardware Multiplier control register: [01h] */
- {
- "MCNT", MAC, 0x1, 0x10 | MOD2, Reg_8W, MAX},
- /* MAC Multiplier Operand A Register [02h] */
- {
- "MA", MAC, 0x2, 0x20 | MOD2, Reg_16W, MAX},
- /* MAC Multiplier Operand B Register [03h] */
- {
- "MB", MAC, 0x3, 0x30 | MOD2, Reg_16W, MAX},
- /* MAC Multiplier Accumulator 2 Register [04h] */
- {
- "MC2", MAC, 0x4, 0x40 | MOD2, Reg_16W, MAX},
- /* MAC Multiplier Accumulator 1 Register [05h] */
- {
- "MC1", MAC, 0x5, 0x50 | MOD2, Reg_16W, MAX},
- /* MAC Multiplier Accumulator 0 Register [06h] */
- {
- "MC0", MAC, 0x6, 0x60 | MOD2, Reg_16W, MAX},
- /* -------- The Serial I/O module SER -------- */
- /* UART registers */
- /* Serial Port Control Register : SER[6h] */
- {
- "SCON0", SER0, 0x6, 0x60 | MOD2, Reg_8W, MAX},
- /* Serial Data Buffer Register : SER[7h] */
- {
- "SBUF0", SER0, 0x7, 0x70 | MOD2, Reg_8W, MAX},
- /* Serial Port Mode Register : SER[4h] */
- {
- "SMD0", SER0, 0x8, 0x80 | MOD2, Reg_8W, MAX},
- /* Serial Port Phase Register : SER[4h] */
- {
- "PR0", SER1, 0x9, 0x90 | MOD2, Reg_16W, MAX},
- /* ------ LCD Display Module ---------- */
- {
- "LCRA", LCD, 0xd, 0xd0 | MOD2, Reg_16W, MAX},
- {
- "LCFG", LCD, 0xe, 0xe0 | MOD2, Reg_8W, MAX},
- {
- "LCD16", LCD, 0xf, 0xf0 | MOD2, Reg_8W, MAX},
- {
- "LCD0", LCD, 0x10, 0x10 | MOD2, Reg_8W, MAX},
- {
- "LCD1", LCD, 0x11, 0x11 | MOD2, Reg_8W, MAX},
- {
- "LCD2", LCD, 0x12, 0x12 | MOD2, Reg_8W, MAX},
- {
- "LCD3", LCD, 0x13, 0x13 | MOD2, Reg_8W, MAX},
- {
- "LCD4", LCD, 0x14, 0x14 | MOD2, Reg_8W, MAX},
- {
- "LCD5", LCD, 0x15, 0x15 | MOD2, Reg_8W, MAX},
- {
- "LCD6", LCD, 0x16, 0x16 | MOD2, Reg_8W, MAX},
- {
- "LCD7", LCD, 0x17, 0x17 | MOD2, Reg_8W, MAX},
- {
- "LCD8", LCD, 0x18, 0x18 | MOD2, Reg_8W, MAX},
- {
- "LCD9", LCD, 0x19, 0x19 | MOD2, Reg_8W, MAX},
- {
- "LCD10", LCD, 0x1a, 0x1a | MOD2, Reg_8W, MAX},
- {
- "LCD11", LCD, 0x1b, 0x1b | MOD2, Reg_8W, MAX},
- {
- "LCD12", LCD, 0x1c, 0x1c | MOD2, Reg_8W, MAX},
- {
- "LCD13", LCD, 0x1d, 0x1d | MOD2, Reg_8W, MAX},
- {
- "LCD14", LCD, 0x1e, 0x1e | MOD2, Reg_8W, MAX},
- {
- "LCD15", LCD, 0x1f, 0x1f | MOD2, Reg_8W, MAX},
- /* -------- SPI registers -------- */
- /* SPI data buffer Register : SER[7h] */
- {
- "SPIB", SPI, 0x5, 0x50 | MOD3, Reg_16W, MAX},
- /* SPI Control Register : SER[8h] Note : Bit 7 is a read only bit */
- {
- "SPICN", SPI, 0x15, 0x15 | MOD3, Reg_8W, MAX},
- /* SPI Configuration Register : SER[9h] Note : Bits 4,3 and 2 are read
- only. */
- {
- "SPICF", SPI, 0x16, 0x16 | MOD3, Reg_8W, MAX},
- /* SPI Clock Register : SER[Ah] */
- {
- "SPICK", SPI, 0x17, 0x17 | MOD3, Reg_8W, MAX},
- /* -------- One Wire Bus Master OWBM -------- */
- /* OWBM One Wire address Register register: [01h] */
- {
- "OWA", OWBM, 0x13, 0x13 | MOD3, Reg_8W, MAX},
- /* OWBM One Wire Data register: [02h] */
- {
- "OWD", OWBM, 0x14, 0x14 | MOD3, Reg_8W, MAX},
- /* -------- The Serial I/O module SER -------- */
- /* UART registers */
- /* Serial Port Control Register : SER[6h] */
- {
- "SCON1", SER1, 0x6, 0x60 | MOD3, Reg_8W, MAX},
- /* Serial Data Buffer Register : SER[7h] */
- {
- "SBUF1", SER1, 0x7, 0x70 | MOD3, Reg_8W, MAX},
- /* Serial Port Mode Register : SER[4h] */
- {
- "SMD1", SER1, 0x8, 0x80 | MOD3, Reg_8W, MAX},
- /* Serial Port Phase Register : SER[4h] */
- {
- "PR1", SER1, 0x9, 0x90 | MOD3, Reg_16W, MAX},
- /* -------- Timer/Counter 2 Module -------- */
- /* Timer 2 configuration Register : TC[3h] */
- {
- "T2CNA0", TIMER20, 0x0, 0x00 | MOD3, Reg_8W, MAX},
- {
- "T2H0", TIMER20, 0x1, 0x10 | MOD3, Reg_8W, MAX},
- {
- "T2RH0", TIMER20, 0x2, 0x20 | MOD3, Reg_8W, MAX},
- {
- "T2CH0", TIMER20, 0x3, 0x30 | MOD3, Reg_8W, MAX},
- {
- "T2CNB0", TIMER20, 0xc, 0xc0 | MOD3, Reg_8W, MAX},
- {
- "T2V0", TIMER20, 0xd, 0xd0 | MOD3, Reg_16W, MAX},
- {
- "T2R0", TIMER20, 0xe, 0xe0 | MOD3, Reg_16W, MAX},
- {
- "T2C0", TIMER20, 0xf, 0xf0 | MOD3, Reg_16W, MAX},
- {
- "T2CFG0", TIMER20, 0x10, 0x10 | MOD3, Reg_8W, MAX},
- /* Timer 2-1 configuration Register : TC[4h] */
-
- {
- "T2CNA1", TIMER21, 0x0, 0x00 | MOD4, Reg_8W, MAX},
- {
- "T2H1", TIMER21, 0x1, 0x10 | MOD4, Reg_8W, MAX},
- {
- "T2RH1", TIMER21, 0x2, 0x20 | MOD4, Reg_8W, MAX},
- {
- "T2CH1", TIMER21, 0x3, 0x30 | MOD4, Reg_8W, MAX},
- {
- "T2CNA2", TIMER21, 0x4, 0x40 | MOD4, Reg_8W, MAX},
- {
- "T2H2", TIMER21, 0x5, 0x50 | MOD4, Reg_8W, MAX},
- {
- "T2RH2", TIMER21, 0x6, 0x60 | MOD4, Reg_8W, MAX},
- {
- "T2CH2", TIMER21, 0x7, 0x70 | MOD4, Reg_8W, MAX},
- {
- "T2CNB1", TIMER21, 0x8, 0x80 | MOD4, Reg_8W, MAX},
- {
- "T2V1", TIMER21, 0x9, 0x90 | MOD4, Reg_16W, MAX},
- {
- "T2R1", TIMER21, 0xa, 0xa0 | MOD4, Reg_16W, MAX},
- {
- "T2C1", TIMER21, 0xb, 0xb0 | MOD4, Reg_16W, MAX},
- {
- "T2CNB2", TIMER21, 0xc, 0xc0 | MOD4, Reg_8W, MAX},
- {
- "T2V2", TIMER21, 0xd, 0xd0 | MOD4, Reg_16W, MAX},
- {
- "T2R2", TIMER21, 0xe, 0xe0 | MOD4, Reg_16W, MAX},
- {
- "T2C2", TIMER21, 0xf, 0xf0 | MOD4, Reg_16W, MAX},
- {
- "T2CFG1", TIMER21, 0x10, 0x10 | MOD4, Reg_8W, MAX},
- {
- "T2CFG2", TIMER21, 0x11, 0x11 | MOD4, Reg_8W, MAX},
- {
- NULL, 0, 0, 0, 0, 0}
-};
-
-/* Memory access argument. */
-struct mem_access
-{
- char *name; /* Name of the Memory access operand. */
- int opcode; /* Its corresponding opcode. */
-};
-typedef struct mem_access mem_access;
-
-/* The Memory table for accessing the data memory through particular registers. */
-struct mem_access mem_table[] =
-{
- /* The Pop Operation on the stack. */
- {"@SP--", 0x0d},
- /* Data Pointer 0 */
- {"@DP[0]", 0x0f},
- /* Data Ponter 1 */
- {"@DP[1]", 0x4f},
- /* Data Pointer 0 post increment */
- {"@DP[0]++", 0x1f},
- /* Data Pointer 1 post increment */
- {"@DP[1]++", 0x5f},
- /* Data Pointer 0 post decrement */
- {"@DP[0]--", 0x2f},
- /* Data Pointer 1 post decrement */
- {"@DP[1]--", 0x6f},
- /* ADDED According to New Specification. */
-
- {"@BP[OFFS]", 0x0E},
- {"@BP[OFFS++]", 0x1E},
- {"@BP[OFFS--]", 0x2E},
- {"NUL", 0x76},
- {"@++SP", 0x0D},
- {"@BP[++OFFS]", 0x1E},
- {"@BP[--OFFS]", 0x2E},
- {"@++DP[0]", 0x1F},
- {"@++DP[1]", 0x5F}, {"@--DP[0]", 0x2F}, {"@--DP[1]", 0x6F}
-};
-
-/* Register bit argument. */
-struct reg_bit
-{
- reg_entry *reg;
- int bit;
-};
-typedef struct reg_bit reg_bit;
-
-/* There are certain names given to particular bits of some registers.
- These will be taken care of here. */
-struct bit_name
-{
- char *name;
- char *reg_bit;
-};
-typedef struct bit_name bit_name;
-
-bit_name bit_table[] =
-{
- {
- "RI", "SCON.0"},
- /* FOr APC */
- {
- "MOD0", "APC.0"},
- {
- "MOD1", "APC.1"},
- {
- "MOD2", "APC.2"},
- {
- "IDS", "APC.6"},
- {
- "CLR", "APC.6"},
- /* For PSF */
- {
- "E", "PSF.0"},
- {
- "C", "PSF.1"},
- {
- "OV", "PSF.2"},
- {
- "S", "PSF.6"},
- {
- "Z", "PSF.7"},
- /* For IC */
-
- {
- "IGE", "IC.0"},
- {
- "INS", "IC.1"},
- {
- "CGDS", "IC.5"},
- /* For IMR */
-
- {
- "IM0", "IMR.0"},
- {
- "IM1", "IMR.1"},
- {
- "IM2", "IMR.2"},
- {
- "IM3", "IMR.3"},
- {
- "IM4", "IMR.4"},
- {
- "IM5", "IMR.5"},
- {
- "IMS", "IMR.7"},
- /* For SC */
- {
- "PWL", "SC.1"},
- {
- "ROD", "SC.2"},
- {
- "UPA", "SC.3"},
- {
- "CDA0", "SC.4"},
- {
- "CDA1", "SC.5"},
- /* For IIR */
-
- {
- "II0", "IIR.0"},
- {
- "II1", "IIR.1"},
- {
- "II2", "IIR.2"},
- {
- "II3", "IIR.3"},
- {
- "II4", "IIR.4"},
- {
- "II5", "IIR.5"},
- {
- "IIS", "IIR.7"},
- /* For CKCN */
-
- {
- "CD0", "CKCN.0"},
- {
- "CD1", "CKCN.1"},
- {
- "PMME", "CKCN.2"},
- {
- "SWB", "CKCN.3"},
- {
- "STOP", "CKCN.4"},
- {
- "RGMD", "CKCN.5"},
- {
- "RGSL", "CKCN.6"},
- /* For WDCN */
-
- {
- "RWT", "WDCN.0"},
- {
- "EWT", "WDCN.1"},
- {
- "WTRF", "WDCN.2"},
- {
- "WDIF", "WDCN.3"},
- {
- "WD0", "WDCN.4"},
- {
- "WD1", "WDCN.5"},
- {
- "EWDI", "WDCN.6"},
- {
- "POR", "WDCN.7"},
- /* For DPC */
-
- {
- "DPS0", "DPC.0"},
- {
- "DPS1", "DPC.1"},
- {
- "WBS0", "DPC.2"},
- {
- "WBS1", "DPC.3"},
- {
- "WBS2", "DPC.4"},
-
- /* For SCON */
- {
- "TI", "SCON.1"},
- {
- "RB8", "SCON.2"},
- {
- "TB8", "SCON.3"},
- {
- "REN", "SCON.4"},
- {
- "SM2", "SCON.5"},
- {
- "SM1", "SCON.6"},
- {
- "SM0", "SCON.7"},
- {
- "FE", "SCON.7"}
-};
-
-const char *LSInstr[] =
-{
- "LJUMP", "SJUMP", "LDJNZ", "SDJNZ", "LCALL", "SCALL", "JUMP",
- "DJNZ", "CALL", NULL
-};
-
-typedef enum
-{
- DST,
- SRC,
- BOTH,
-}
-type1;
-
-struct mem_access_syntax
-{
- char name[12]; /* Name of the Memory access operand. */
- type1 type;
- char *invalid_op[5];
-};
-typedef struct mem_access_syntax mem_access_syntax;
-
-/* The Memory Access table for accessing the data memory through particular
- registers. */
-const mem_access_syntax mem_access_syntax_table[] =
-{
- {
- "@SP--", SRC,
- {
- NULL, NULL, NULL, NULL, NULL}},
- /* Data Pointer 0 */
- {
- "@DP[0]", BOTH,
- {
- "@DP[0]--", "@DP[0]++", NULL, NULL, NULL}},
- /* Data Ponter 1 */
- {
- "@DP[1]", BOTH,
- {
- "@DP[1]--", "@DP[1]++", NULL, NULL, NULL}},
- /* Data Pointer 0 post increment */
- {
- "@DP[0]++", SRC,
- {
- NULL, NULL, NULL, NULL, NULL}},
- /* Data Pointer 1 post increment */
- {
- "@DP[1]++", SRC,
- {
- NULL, NULL, NULL, NULL, NULL}},
- /* Data Pointer 0 post decrement */
- {
- "@DP[0]--", SRC,
- {
- NULL, NULL, NULL, NULL, NULL}},
- /* Data Pointer 1 post decrement */
- {
- "@DP[1]--", SRC,
- {
- NULL, NULL, NULL, NULL, NULL}},
- /* ADDED According to New Specification */
-
- {
- "@BP[OFFS]", BOTH,
- {
- "@BP[OFFS++]", "@BP[OFFS--]", NULL, NULL, NULL}},
- {
- "@BP[OFFS++]", SRC,
- {
- NULL, NULL, NULL, NULL, NULL}},
- {
- "@BP[OFFS--]", SRC,
- {
- NULL, NULL, NULL, NULL, NULL}},
- {
- "NUL", DST,
- {
- NULL, NULL, NULL, NULL, NULL}},
- {
- "@++SP", DST,
- {
- NULL, NULL, NULL, NULL, NULL}},
- {
- "@BP[++OFFS]", DST,
- {
- "@BP[OFFS--]", "@BP[OFFS++]", NULL, NULL, NULL}},
- {
- "@BP[--OFFS]", DST,
- {
- "@BP[OFFS--]", "@BP[OFFS++]", NULL, NULL, NULL}},
- {
- "@++DP[0]", DST,
- {
- "@DP[0]--", "@DP[0]++", NULL, NULL, NULL}},
- {
- "@++DP[1]", DST,
- {
- "@DP[1]--", "@DP[1]++", NULL, NULL, NULL}},
- {
- "@--DP[0]", DST,
- {
- "@DP[0]++", "@DP[0]--", NULL, NULL, NULL}},
- {
- "@--DP[1]", DST,
- {
- "@DP[1]++", "@DP[1]--", NULL, NULL, NULL}}
-};
-
-#endif
diff --git a/include/opcode/mips.h b/include/opcode/mips.h
deleted file mode 100644
index e7cfdb9..0000000
--- a/include/opcode/mips.h
+++ /dev/null
@@ -1,1100 +0,0 @@
-/* mips.h. Mips opcode list for GDB, the GNU debugger.
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2008
- Free Software Foundation, Inc.
- Contributed by Ralph Campbell and OSF
- Commented and modified by Ian Lance Taylor, Cygnus Support
-
-This file is part of GDB, GAS, and the GNU binutils.
-
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them under the terms of the GNU General Public
-License as published by the Free Software Foundation; either version
-1, or (at your option) any later version.
-
-GDB, GAS, and the GNU binutils are distributed in the hope that they
-will be useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING. If not, write to the Free
-Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _MIPS_H_
-#define _MIPS_H_
-
-/* These are bit masks and shift counts to use to access the various
- fields of an instruction. To retrieve the X field of an
- instruction, use the expression
- (i >> OP_SH_X) & OP_MASK_X
- To set the same field (to j), use
- i = (i &~ (OP_MASK_X << OP_SH_X)) | (j << OP_SH_X)
-
- Make sure you use fields that are appropriate for the instruction,
- of course.
-
- The 'i' format uses OP, RS, RT and IMMEDIATE.
-
- The 'j' format uses OP and TARGET.
-
- The 'r' format uses OP, RS, RT, RD, SHAMT and FUNCT.
-
- The 'b' format uses OP, RS, RT and DELTA.
-
- The floating point 'i' format uses OP, RS, RT and IMMEDIATE.
-
- The floating point 'r' format uses OP, FMT, FT, FS, FD and FUNCT.
-
- A breakpoint instruction uses OP, CODE and SPEC (10 bits of the
- breakpoint instruction are not defined; Kane says the breakpoint
- code field in BREAK is 20 bits; yet MIPS assemblers and debuggers
- only use ten bits). An optional two-operand form of break/sdbbp
- allows the lower ten bits to be set too, and MIPS32 and later
- architectures allow 20 bits to be set with a signal operand
- (using CODE20).
-
- The syscall instruction uses CODE20.
-
- The general coprocessor instructions use COPZ. */
-
-#define OP_MASK_OP 0x3f
-#define OP_SH_OP 26
-#define OP_MASK_RS 0x1f
-#define OP_SH_RS 21
-#define OP_MASK_FR 0x1f
-#define OP_SH_FR 21
-#define OP_MASK_FMT 0x1f
-#define OP_SH_FMT 21
-#define OP_MASK_BCC 0x7
-#define OP_SH_BCC 18
-#define OP_MASK_CODE 0x3ff
-#define OP_SH_CODE 16
-#define OP_MASK_CODE2 0x3ff
-#define OP_SH_CODE2 6
-#define OP_MASK_RT 0x1f
-#define OP_SH_RT 16
-#define OP_MASK_FT 0x1f
-#define OP_SH_FT 16
-#define OP_MASK_CACHE 0x1f
-#define OP_SH_CACHE 16
-#define OP_MASK_RD 0x1f
-#define OP_SH_RD 11
-#define OP_MASK_FS 0x1f
-#define OP_SH_FS 11
-#define OP_MASK_PREFX 0x1f
-#define OP_SH_PREFX 11
-#define OP_MASK_CCC 0x7
-#define OP_SH_CCC 8
-#define OP_MASK_CODE20 0xfffff /* 20 bit syscall/breakpoint code. */
-#define OP_SH_CODE20 6
-#define OP_MASK_SHAMT 0x1f
-#define OP_SH_SHAMT 6
-#define OP_MASK_FD 0x1f
-#define OP_SH_FD 6
-#define OP_MASK_TARGET 0x3ffffff
-#define OP_SH_TARGET 0
-#define OP_MASK_COPZ 0x1ffffff
-#define OP_SH_COPZ 0
-#define OP_MASK_IMMEDIATE 0xffff
-#define OP_SH_IMMEDIATE 0
-#define OP_MASK_DELTA 0xffff
-#define OP_SH_DELTA 0
-#define OP_MASK_FUNCT 0x3f
-#define OP_SH_FUNCT 0
-#define OP_MASK_SPEC 0x3f
-#define OP_SH_SPEC 0
-#define OP_SH_LOCC 8 /* FP condition code. */
-#define OP_SH_HICC 18 /* FP condition code. */
-#define OP_MASK_CC 0x7
-#define OP_SH_COP1NORM 25 /* Normal COP1 encoding. */
-#define OP_MASK_COP1NORM 0x1 /* a single bit. */
-#define OP_SH_COP1SPEC 21 /* COP1 encodings. */
-#define OP_MASK_COP1SPEC 0xf
-#define OP_MASK_COP1SCLR 0x4
-#define OP_MASK_COP1CMP 0x3
-#define OP_SH_COP1CMP 4
-#define OP_SH_FORMAT 21 /* FP short format field. */
-#define OP_MASK_FORMAT 0x7
-#define OP_SH_TRUE 16
-#define OP_MASK_TRUE 0x1
-#define OP_SH_GE 17
-#define OP_MASK_GE 0x01
-#define OP_SH_UNSIGNED 16
-#define OP_MASK_UNSIGNED 0x1
-#define OP_SH_HINT 16
-#define OP_MASK_HINT 0x1f
-#define OP_SH_MMI 0 /* Multimedia (parallel) op. */
-#define OP_MASK_MMI 0x3f
-#define OP_SH_MMISUB 6
-#define OP_MASK_MMISUB 0x1f
-#define OP_MASK_PERFREG 0x1f /* Performance monitoring. */
-#define OP_SH_PERFREG 1
-#define OP_SH_SEL 0 /* Coprocessor select field. */
-#define OP_MASK_SEL 0x7 /* The sel field of mfcZ and mtcZ. */
-#define OP_SH_CODE19 6 /* 19 bit wait code. */
-#define OP_MASK_CODE19 0x7ffff
-#define OP_SH_ALN 21
-#define OP_MASK_ALN 0x7
-#define OP_SH_VSEL 21
-#define OP_MASK_VSEL 0x1f
-#define OP_MASK_VECBYTE 0x7 /* Selector field is really 4 bits,
- but 0x8-0xf don't select bytes. */
-#define OP_SH_VECBYTE 22
-#define OP_MASK_VECALIGN 0x7 /* Vector byte-align (alni.ob) op. */
-#define OP_SH_VECALIGN 21
-#define OP_MASK_INSMSB 0x1f /* "ins" MSB. */
-#define OP_SH_INSMSB 11
-#define OP_MASK_EXTMSBD 0x1f /* "ext" MSBD. */
-#define OP_SH_EXTMSBD 11
-
-/* MIPS DSP ASE */
-#define OP_SH_DSPACC 11
-#define OP_MASK_DSPACC 0x3
-#define OP_SH_DSPACC_S 21
-#define OP_MASK_DSPACC_S 0x3
-#define OP_SH_DSPSFT 20
-#define OP_MASK_DSPSFT 0x3f
-#define OP_SH_DSPSFT_7 19
-#define OP_MASK_DSPSFT_7 0x7f
-#define OP_SH_SA3 21
-#define OP_MASK_SA3 0x7
-#define OP_SH_SA4 21
-#define OP_MASK_SA4 0xf
-#define OP_SH_IMM8 16
-#define OP_MASK_IMM8 0xff
-#define OP_SH_IMM10 16
-#define OP_MASK_IMM10 0x3ff
-#define OP_SH_WRDSP 11
-#define OP_MASK_WRDSP 0x3f
-#define OP_SH_RDDSP 16
-#define OP_MASK_RDDSP 0x3f
-#define OP_SH_BP 11
-#define OP_MASK_BP 0x3
-
-/* MIPS MT ASE */
-#define OP_SH_MT_U 5
-#define OP_MASK_MT_U 0x1
-#define OP_SH_MT_H 4
-#define OP_MASK_MT_H 0x1
-#define OP_SH_MTACC_T 18
-#define OP_MASK_MTACC_T 0x3
-#define OP_SH_MTACC_D 13
-#define OP_MASK_MTACC_D 0x3
-
-#define OP_OP_COP0 0x10
-#define OP_OP_COP1 0x11
-#define OP_OP_COP2 0x12
-#define OP_OP_COP3 0x13
-#define OP_OP_LWC1 0x31
-#define OP_OP_LWC2 0x32
-#define OP_OP_LWC3 0x33 /* a.k.a. pref */
-#define OP_OP_LDC1 0x35
-#define OP_OP_LDC2 0x36
-#define OP_OP_LDC3 0x37 /* a.k.a. ld */
-#define OP_OP_SWC1 0x39
-#define OP_OP_SWC2 0x3a
-#define OP_OP_SWC3 0x3b
-#define OP_OP_SDC1 0x3d
-#define OP_OP_SDC2 0x3e
-#define OP_OP_SDC3 0x3f /* a.k.a. sd */
-
-/* Values in the 'VSEL' field. */
-#define MDMX_FMTSEL_IMM_QH 0x1d
-#define MDMX_FMTSEL_IMM_OB 0x1e
-#define MDMX_FMTSEL_VEC_QH 0x15
-#define MDMX_FMTSEL_VEC_OB 0x16
-
-/* UDI */
-#define OP_SH_UDI1 6
-#define OP_MASK_UDI1 0x1f
-#define OP_SH_UDI2 6
-#define OP_MASK_UDI2 0x3ff
-#define OP_SH_UDI3 6
-#define OP_MASK_UDI3 0x7fff
-#define OP_SH_UDI4 6
-#define OP_MASK_UDI4 0xfffff
-
-/* Octeon */
-#define OP_SH_BBITIND 16
-#define OP_MASK_BBITIND 0x1f
-#define OP_SH_CINSPOS 6
-#define OP_MASK_CINSPOS 0x1f
-#define OP_SH_CINSLM1 11
-#define OP_MASK_CINSLM1 0x1f
-#define OP_SH_SEQI 6
-#define OP_MASK_SEQI 0x3ff
-
-/* This structure holds information for a particular instruction. */
-
-struct mips_opcode
-{
- /* The name of the instruction. */
- const char *name;
- /* A string describing the arguments for this instruction. */
- const char *args;
- /* The basic opcode for the instruction. When assembling, this
- opcode is modified by the arguments to produce the actual opcode
- that is used. If pinfo is INSN_MACRO, then this is 0. */
- unsigned long match;
- /* If pinfo is not INSN_MACRO, then this is a bit mask for the
- relevant portions of the opcode when disassembling. If the
- actual opcode anded with the match field equals the opcode field,
- then we have found the correct instruction. If pinfo is
- INSN_MACRO, then this field is the macro identifier. */
- unsigned long mask;
- /* For a macro, this is INSN_MACRO. Otherwise, it is a collection
- of bits describing the instruction, notably any relevant hazard
- information. */
- unsigned long pinfo;
- /* A collection of additional bits describing the instruction. */
- unsigned long pinfo2;
- /* A collection of bits describing the instruction sets of which this
- instruction or macro is a member. */
- unsigned long membership;
-};
-
-/* These are the characters which may appear in the args field of an
- instruction. They appear in the order in which the fields appear
- when the instruction is used. Commas and parentheses in the args
- string are ignored when assembling, and written into the output
- when disassembling.
-
- Each of these characters corresponds to a mask field defined above.
-
- "1" 5 bit sync type (OP_*_SHAMT)
- "<" 5 bit shift amount (OP_*_SHAMT)
- ">" shift amount between 32 and 63, stored after subtracting 32 (OP_*_SHAMT)
- "a" 26 bit target address (OP_*_TARGET)
- "b" 5 bit base register (OP_*_RS)
- "c" 10 bit breakpoint code (OP_*_CODE)
- "d" 5 bit destination register specifier (OP_*_RD)
- "h" 5 bit prefx hint (OP_*_PREFX)
- "i" 16 bit unsigned immediate (OP_*_IMMEDIATE)
- "j" 16 bit signed immediate (OP_*_DELTA)
- "k" 5 bit cache opcode in target register position (OP_*_CACHE)
- Also used for immediate operands in vr5400 vector insns.
- "o" 16 bit signed offset (OP_*_DELTA)
- "p" 16 bit PC relative branch target address (OP_*_DELTA)
- "q" 10 bit extra breakpoint code (OP_*_CODE2)
- "r" 5 bit same register used as both source and target (OP_*_RS)
- "s" 5 bit source register specifier (OP_*_RS)
- "t" 5 bit target register (OP_*_RT)
- "u" 16 bit upper 16 bits of address (OP_*_IMMEDIATE)
- "v" 5 bit same register used as both source and destination (OP_*_RS)
- "w" 5 bit same register used as both target and destination (OP_*_RT)
- "U" 5 bit same destination register in both OP_*_RD and OP_*_RT
- (used by clo and clz)
- "C" 25 bit coprocessor function code (OP_*_COPZ)
- "B" 20 bit syscall/breakpoint function code (OP_*_CODE20)
- "J" 19 bit wait function code (OP_*_CODE19)
- "x" accept and ignore register name
- "z" must be zero register
- "K" 5 bit Hardware Register (rdhwr instruction) (OP_*_RD)
- "+A" 5 bit ins/ext/dins/dext/dinsm/dextm position, which becomes
- LSB (OP_*_SHAMT).
- Enforces: 0 <= pos < 32.
- "+B" 5 bit ins/dins size, which becomes MSB (OP_*_INSMSB).
- Requires that "+A" or "+E" occur first to set position.
- Enforces: 0 < (pos+size) <= 32.
- "+C" 5 bit ext/dext size, which becomes MSBD (OP_*_EXTMSBD).
- Requires that "+A" or "+E" occur first to set position.
- Enforces: 0 < (pos+size) <= 32.
- (Also used by "dext" w/ different limits, but limits for
- that are checked by the M_DEXT macro.)
- "+E" 5 bit dinsu/dextu position, which becomes LSB-32 (OP_*_SHAMT).
- Enforces: 32 <= pos < 64.
- "+F" 5 bit "dinsm/dinsu" size, which becomes MSB-32 (OP_*_INSMSB).
- Requires that "+A" or "+E" occur first to set position.
- Enforces: 32 < (pos+size) <= 64.
- "+G" 5 bit "dextm" size, which becomes MSBD-32 (OP_*_EXTMSBD).
- Requires that "+A" or "+E" occur first to set position.
- Enforces: 32 < (pos+size) <= 64.
- "+H" 5 bit "dextu" size, which becomes MSBD (OP_*_EXTMSBD).
- Requires that "+A" or "+E" occur first to set position.
- Enforces: 32 < (pos+size) <= 64.
-
- Floating point instructions:
- "D" 5 bit destination register (OP_*_FD)
- "M" 3 bit compare condition code (OP_*_CCC) (only used for mips4 and up)
- "N" 3 bit branch condition code (OP_*_BCC) (only used for mips4 and up)
- "S" 5 bit fs source 1 register (OP_*_FS)
- "T" 5 bit ft source 2 register (OP_*_FT)
- "R" 5 bit fr source 3 register (OP_*_FR)
- "V" 5 bit same register used as floating source and destination (OP_*_FS)
- "W" 5 bit same register used as floating target and destination (OP_*_FT)
-
- Coprocessor instructions:
- "E" 5 bit target register (OP_*_RT)
- "G" 5 bit destination register (OP_*_RD)
- "H" 3 bit sel field for (d)mtc* and (d)mfc* (OP_*_SEL)
- "P" 5 bit performance-monitor register (OP_*_PERFREG)
- "e" 5 bit vector register byte specifier (OP_*_VECBYTE)
- "%" 3 bit immediate vr5400 vector alignment operand (OP_*_VECALIGN)
- see also "k" above
- "+D" Combined destination register ("G") and sel ("H") for CP0 ops,
- for pretty-printing in disassembly only.
-
- Macro instructions:
- "A" General 32 bit expression
- "I" 32 bit immediate (value placed in imm_expr).
- "+I" 32 bit immediate (value placed in imm2_expr).
- "F" 64 bit floating point constant in .rdata
- "L" 64 bit floating point constant in .lit8
- "f" 32 bit floating point constant
- "l" 32 bit floating point constant in .lit4
-
- MDMX instruction operands (note that while these use the FP register
- fields, they accept both $fN and $vN names for the registers):
- "O" MDMX alignment offset (OP_*_ALN)
- "Q" MDMX vector/scalar/immediate source (OP_*_VSEL and OP_*_FT)
- "X" MDMX destination register (OP_*_FD)
- "Y" MDMX source register (OP_*_FS)
- "Z" MDMX source register (OP_*_FT)
-
- DSP ASE usage:
- "2" 2 bit unsigned immediate for byte align (OP_*_BP)
- "3" 3 bit unsigned immediate (OP_*_SA3)
- "4" 4 bit unsigned immediate (OP_*_SA4)
- "5" 8 bit unsigned immediate (OP_*_IMM8)
- "6" 5 bit unsigned immediate (OP_*_RS)
- "7" 2 bit dsp accumulator register (OP_*_DSPACC)
- "8" 6 bit unsigned immediate (OP_*_WRDSP)
- "9" 2 bit dsp accumulator register (OP_*_DSPACC_S)
- "0" 6 bit signed immediate (OP_*_DSPSFT)
- ":" 7 bit signed immediate (OP_*_DSPSFT_7)
- "'" 6 bit unsigned immediate (OP_*_RDDSP)
- "@" 10 bit signed immediate (OP_*_IMM10)
-
- MT ASE usage:
- "!" 1 bit usermode flag (OP_*_MT_U)
- "$" 1 bit load high flag (OP_*_MT_H)
- "*" 2 bit dsp/smartmips accumulator register (OP_*_MTACC_T)
- "&" 2 bit dsp/smartmips accumulator register (OP_*_MTACC_D)
- "g" 5 bit coprocessor 1 and 2 destination register (OP_*_RD)
- "+t" 5 bit coprocessor 0 destination register (OP_*_RT)
- "+T" 5 bit coprocessor 0 destination register (OP_*_RT) - disassembly only
-
- UDI immediates:
- "+1" UDI immediate bits 6-10
- "+2" UDI immediate bits 6-15
- "+3" UDI immediate bits 6-20
- "+4" UDI immediate bits 6-25
-
- Octeon:
- "+x" Bit index field of bbit. Enforces: 0 <= index < 32.
- "+X" Bit index field of bbit aliasing bbit32. Matches if 32 <= index < 64,
- otherwise skips to next candidate.
- "+p" Position field of cins/cins32/exts/exts32. Enforces 0 <= pos < 32.
- "+P" Position field of cins/exts aliasing cins32/exts32. Matches if
- 32 <= pos < 64, otherwise skips to next candidate.
- "+Q" Immediate field of seqi/snei. Enforces -512 <= imm < 512.
- "+s" Length-minus-one field of cins/exts. Enforces: 0 <= lenm1 < 32.
- "+S" Length-minus-one field of cins32/exts32 or cins/exts aliasing
- cint32/exts32. Enforces non-negative value and that
- pos + lenm1 < 32 or pos + lenm1 < 64 depending whether previous
- position field is "+p" or "+P".
-
- Other:
- "()" parens surrounding optional value
- "," separates operands
- "[]" brackets around index for vector-op scalar operand specifier (vr5400)
- "+" Start of extension sequence.
-
- Characters used so far, for quick reference when adding more:
- "1234567890"
- "%[]<>(),+:'@!$*&"
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- "abcdefghijklopqrstuvwxz"
-
- Extension character sequences used so far ("+" followed by the
- following), for quick reference when adding more:
- "1234"
- "ABCDEFGHIPQSTX"
- "pstx"
-*/
-
-/* These are the bits which may be set in the pinfo field of an
- instructions, if it is not equal to INSN_MACRO. */
-
-/* Modifies the general purpose register in OP_*_RD. */
-#define INSN_WRITE_GPR_D 0x00000001
-/* Modifies the general purpose register in OP_*_RT. */
-#define INSN_WRITE_GPR_T 0x00000002
-/* Modifies general purpose register 31. */
-#define INSN_WRITE_GPR_31 0x00000004
-/* Modifies the floating point register in OP_*_FD. */
-#define INSN_WRITE_FPR_D 0x00000008
-/* Modifies the floating point register in OP_*_FS. */
-#define INSN_WRITE_FPR_S 0x00000010
-/* Modifies the floating point register in OP_*_FT. */
-#define INSN_WRITE_FPR_T 0x00000020
-/* Reads the general purpose register in OP_*_RS. */
-#define INSN_READ_GPR_S 0x00000040
-/* Reads the general purpose register in OP_*_RT. */
-#define INSN_READ_GPR_T 0x00000080
-/* Reads the floating point register in OP_*_FS. */
-#define INSN_READ_FPR_S 0x00000100
-/* Reads the floating point register in OP_*_FT. */
-#define INSN_READ_FPR_T 0x00000200
-/* Reads the floating point register in OP_*_FR. */
-#define INSN_READ_FPR_R 0x00000400
-/* Modifies coprocessor condition code. */
-#define INSN_WRITE_COND_CODE 0x00000800
-/* Reads coprocessor condition code. */
-#define INSN_READ_COND_CODE 0x00001000
-/* TLB operation. */
-#define INSN_TLB 0x00002000
-/* Reads coprocessor register other than floating point register. */
-#define INSN_COP 0x00004000
-/* Instruction loads value from memory, requiring delay. */
-#define INSN_LOAD_MEMORY_DELAY 0x00008000
-/* Instruction loads value from coprocessor, requiring delay. */
-#define INSN_LOAD_COPROC_DELAY 0x00010000
-/* Instruction has unconditional branch delay slot. */
-#define INSN_UNCOND_BRANCH_DELAY 0x00020000
-/* Instruction has conditional branch delay slot. */
-#define INSN_COND_BRANCH_DELAY 0x00040000
-/* Conditional branch likely: if branch not taken, insn nullified. */
-#define INSN_COND_BRANCH_LIKELY 0x00080000
-/* Moves to coprocessor register, requiring delay. */
-#define INSN_COPROC_MOVE_DELAY 0x00100000
-/* Loads coprocessor register from memory, requiring delay. */
-#define INSN_COPROC_MEMORY_DELAY 0x00200000
-/* Reads the HI register. */
-#define INSN_READ_HI 0x00400000
-/* Reads the LO register. */
-#define INSN_READ_LO 0x00800000
-/* Modifies the HI register. */
-#define INSN_WRITE_HI 0x01000000
-/* Modifies the LO register. */
-#define INSN_WRITE_LO 0x02000000
-/* Takes a trap (easier to keep out of delay slot). */
-#define INSN_TRAP 0x04000000
-/* Instruction stores value into memory. */
-#define INSN_STORE_MEMORY 0x08000000
-/* Instruction uses single precision floating point. */
-#define FP_S 0x10000000
-/* Instruction uses double precision floating point. */
-#define FP_D 0x20000000
-/* Instruction is part of the tx39's integer multiply family. */
-#define INSN_MULT 0x40000000
-/* Instruction synchronize shared memory. */
-#define INSN_SYNC 0x80000000
-/* Instruction is actually a macro. It should be ignored by the
- disassembler, and requires special treatment by the assembler. */
-#define INSN_MACRO 0xffffffff
-
-/* These are the bits which may be set in the pinfo2 field of an
- instruction. */
-
-/* Instruction is a simple alias (I.E. "move" for daddu/addu/or) */
-#define INSN2_ALIAS 0x00000001
-/* Instruction reads MDMX accumulator. */
-#define INSN2_READ_MDMX_ACC 0x00000002
-/* Instruction writes MDMX accumulator. */
-#define INSN2_WRITE_MDMX_ACC 0x00000004
-/* Macro uses single-precision floating-point instructions. This should
- only be set for macros. For instructions, FP_S in pinfo carries the
- same information. */
-#define INSN2_M_FP_S 0x00000008
-/* Macro uses double-precision floating-point instructions. This should
- only be set for macros. For instructions, FP_D in pinfo carries the
- same information. */
-#define INSN2_M_FP_D 0x00000010
-
-/* Masks used to mark instructions to indicate which MIPS ISA level
- they were introduced in. INSN_ISA_MASK masks an enumeration that
- specifies the base ISA level(s). The remainder of a 32-bit
- word constructed using these macros is a bitmask of the remaining
- INSN_* values below. */
-
-#define INSN_ISA_MASK 0x0000000ful
-
-/* We cannot start at zero due to ISA_UNKNOWN below. */
-#define INSN_ISA1 1
-#define INSN_ISA2 2
-#define INSN_ISA3 3
-#define INSN_ISA4 4
-#define INSN_ISA5 5
-#define INSN_ISA32 6
-#define INSN_ISA32R2 7
-#define INSN_ISA64 8
-#define INSN_ISA64R2 9
-/* Below this point the INSN_* values correspond to combinations of ISAs.
- They are only for use in the opcodes table to indicate membership of
- a combination of ISAs that cannot be expressed using the usual inclusion
- ordering on the above INSN_* values. */
-#define INSN_ISA3_32 10
-#define INSN_ISA3_32R2 11
-#define INSN_ISA4_32 12
-#define INSN_ISA4_32R2 13
-#define INSN_ISA5_32R2 14
-
-/* Given INSN_ISA* values X and Y, where X ranges over INSN_ISA1 through
- INSN_ISA5_32R2 and Y ranges over INSN_ISA1 through INSN_ISA64R2,
- this table describes whether at least one of the ISAs described by X
- is/are implemented by ISA Y. (Think of Y as the ISA level supported by
- a particular core and X as the ISA level(s) at which a certain instruction
- is defined.) The ISA(s) described by X is/are implemented by Y iff
- (mips_isa_table[(Y & INSN_ISA_MASK) - 1] >> ((X & INSN_ISA_MASK) - 1)) & 1
- is non-zero. */
-static const unsigned int mips_isa_table[] =
- { 0x0001, 0x0003, 0x0607, 0x1e0f, 0x3e1f, 0x0a23, 0x3e63, 0x3ebf, 0x3fff };
-
-/* Masks used for Chip specific instructions. */
-#define INSN_CHIP_MASK 0xc3ff0800
-
-/* Cavium Networks Octeon instructions. */
-#define INSN_OCTEON 0x00000800
-
-/* Masks used for MIPS-defined ASEs. */
-#define INSN_ASE_MASK 0x3c00f000
-
-/* DSP ASE */
-#define INSN_DSP 0x00001000
-#define INSN_DSP64 0x00002000
-/* MIPS 16 ASE */
-#define INSN_MIPS16 0x00004000
-/* MIPS-3D ASE */
-#define INSN_MIPS3D 0x00008000
-
-/* MIPS R4650 instruction. */
-#define INSN_4650 0x00010000
-/* LSI R4010 instruction. */
-#define INSN_4010 0x00020000
-/* NEC VR4100 instruction. */
-#define INSN_4100 0x00040000
-/* Toshiba R3900 instruction. */
-#define INSN_3900 0x00080000
-/* MIPS R10000 instruction. */
-#define INSN_10000 0x00100000
-/* Broadcom SB-1 instruction. */
-#define INSN_SB1 0x00200000
-/* NEC VR4111/VR4181 instruction. */
-#define INSN_4111 0x00400000
-/* NEC VR4120 instruction. */
-#define INSN_4120 0x00800000
-/* NEC VR5400 instruction. */
-#define INSN_5400 0x01000000
-/* NEC VR5500 instruction. */
-#define INSN_5500 0x02000000
-
-/* MDMX ASE */
-#define INSN_MDMX 0x04000000
-/* MT ASE */
-#define INSN_MT 0x08000000
-/* SmartMIPS ASE */
-#define INSN_SMARTMIPS 0x10000000
-/* DSP R2 ASE */
-#define INSN_DSPR2 0x20000000
-/* ST Microelectronics Loongson 2E. */
-#define INSN_LOONGSON_2E 0x40000000
-/* ST Microelectronics Loongson 2F. */
-#define INSN_LOONGSON_2F 0x80000000
-
-/* MIPS ISA defines, use instead of hardcoding ISA level. */
-
-#define ISA_UNKNOWN 0 /* Gas internal use. */
-#define ISA_MIPS1 INSN_ISA1
-#define ISA_MIPS2 INSN_ISA2
-#define ISA_MIPS3 INSN_ISA3
-#define ISA_MIPS4 INSN_ISA4
-#define ISA_MIPS5 INSN_ISA5
-
-#define ISA_MIPS32 INSN_ISA32
-#define ISA_MIPS64 INSN_ISA64
-
-#define ISA_MIPS32R2 INSN_ISA32R2
-#define ISA_MIPS64R2 INSN_ISA64R2
-
-
-/* CPU defines, use instead of hardcoding processor number. Keep this
- in sync with bfd/archures.c in order for machine selection to work. */
-#define CPU_UNKNOWN 0 /* Gas internal use. */
-#define CPU_R3000 3000
-#define CPU_R3900 3900
-#define CPU_R4000 4000
-#define CPU_R4010 4010
-#define CPU_VR4100 4100
-#define CPU_R4111 4111
-#define CPU_VR4120 4120
-#define CPU_R4300 4300
-#define CPU_R4400 4400
-#define CPU_R4600 4600
-#define CPU_R4650 4650
-#define CPU_R5000 5000
-#define CPU_VR5400 5400
-#define CPU_VR5500 5500
-#define CPU_R6000 6000
-#define CPU_RM7000 7000
-#define CPU_R8000 8000
-#define CPU_RM9000 9000
-#define CPU_R10000 10000
-#define CPU_R12000 12000
-#define CPU_R14000 14000
-#define CPU_R16000 16000
-#define CPU_MIPS16 16
-#define CPU_MIPS32 32
-#define CPU_MIPS32R2 33
-#define CPU_MIPS5 5
-#define CPU_MIPS64 64
-#define CPU_MIPS64R2 65
-#define CPU_SB1 12310201 /* octal 'SB', 01. */
-#define CPU_LOONGSON_2E 3001
-#define CPU_LOONGSON_2F 3002
-#define CPU_OCTEON 6501
-
-/* Test for membership in an ISA including chip specific ISAs. INSN
- is pointer to an element of the opcode table; ISA is the specified
- ISA/ASE bitmask to test against; and CPU is the CPU specific ISA to
- test, or zero if no CPU specific ISA test is desired. */
-
-#define OPCODE_IS_MEMBER(insn, isa, cpu) \
- (((isa & INSN_ISA_MASK) != 0 \
- && ((insn)->membership & INSN_ISA_MASK) != 0 \
- && ((mips_isa_table [(isa & INSN_ISA_MASK) - 1] >> \
- (((insn)->membership & INSN_ISA_MASK) - 1)) & 1) != 0) \
- || ((isa & ~INSN_ISA_MASK) \
- & ((insn)->membership & ~INSN_ISA_MASK)) != 0 \
- || (cpu == CPU_R4650 && ((insn)->membership & INSN_4650) != 0) \
- || (cpu == CPU_RM7000 && ((insn)->membership & INSN_4650) != 0) \
- || (cpu == CPU_RM9000 && ((insn)->membership & INSN_4650) != 0) \
- || (cpu == CPU_R4010 && ((insn)->membership & INSN_4010) != 0) \
- || (cpu == CPU_VR4100 && ((insn)->membership & INSN_4100) != 0) \
- || (cpu == CPU_R3900 && ((insn)->membership & INSN_3900) != 0) \
- || ((cpu == CPU_R10000 || cpu == CPU_R12000 || cpu == CPU_R14000 \
- || cpu == CPU_R16000) \
- && ((insn)->membership & INSN_10000) != 0) \
- || (cpu == CPU_SB1 && ((insn)->membership & INSN_SB1) != 0) \
- || (cpu == CPU_R4111 && ((insn)->membership & INSN_4111) != 0) \
- || (cpu == CPU_VR4120 && ((insn)->membership & INSN_4120) != 0) \
- || (cpu == CPU_VR5400 && ((insn)->membership & INSN_5400) != 0) \
- || (cpu == CPU_VR5500 && ((insn)->membership & INSN_5500) != 0) \
- || (cpu == CPU_LOONGSON_2E \
- && ((insn)->membership & INSN_LOONGSON_2E) != 0) \
- || (cpu == CPU_LOONGSON_2F \
- && ((insn)->membership & INSN_LOONGSON_2F) != 0) \
- || (cpu == CPU_OCTEON \
- && ((insn)->membership & INSN_OCTEON) != 0) \
- || 0) /* Please keep this term for easier source merging. */
-
-/* This is a list of macro expanded instructions.
-
- _I appended means immediate
- _A appended means address
- _AB appended means address with base register
- _D appended means 64 bit floating point constant
- _S appended means 32 bit floating point constant. */
-
-enum
-{
- M_ABS,
- M_ADD_I,
- M_ADDU_I,
- M_AND_I,
- M_BALIGN,
- M_BEQ,
- M_BEQ_I,
- M_BEQL_I,
- M_BGE,
- M_BGEL,
- M_BGE_I,
- M_BGEL_I,
- M_BGEU,
- M_BGEUL,
- M_BGEU_I,
- M_BGEUL_I,
- M_BGT,
- M_BGTL,
- M_BGT_I,
- M_BGTL_I,
- M_BGTU,
- M_BGTUL,
- M_BGTU_I,
- M_BGTUL_I,
- M_BLE,
- M_BLEL,
- M_BLE_I,
- M_BLEL_I,
- M_BLEU,
- M_BLEUL,
- M_BLEU_I,
- M_BLEUL_I,
- M_BLT,
- M_BLTL,
- M_BLT_I,
- M_BLTL_I,
- M_BLTU,
- M_BLTUL,
- M_BLTU_I,
- M_BLTUL_I,
- M_BNE,
- M_BNE_I,
- M_BNEL_I,
- M_CACHE_AB,
- M_DABS,
- M_DADD_I,
- M_DADDU_I,
- M_DDIV_3,
- M_DDIV_3I,
- M_DDIVU_3,
- M_DDIVU_3I,
- M_DEXT,
- M_DINS,
- M_DIV_3,
- M_DIV_3I,
- M_DIVU_3,
- M_DIVU_3I,
- M_DLA_AB,
- M_DLCA_AB,
- M_DLI,
- M_DMUL,
- M_DMUL_I,
- M_DMULO,
- M_DMULO_I,
- M_DMULOU,
- M_DMULOU_I,
- M_DREM_3,
- M_DREM_3I,
- M_DREMU_3,
- M_DREMU_3I,
- M_DSUB_I,
- M_DSUBU_I,
- M_DSUBU_I_2,
- M_J_A,
- M_JAL_1,
- M_JAL_2,
- M_JAL_A,
- M_L_DOB,
- M_L_DAB,
- M_LA_AB,
- M_LB_A,
- M_LB_AB,
- M_LBU_A,
- M_LBU_AB,
- M_LCA_AB,
- M_LD_A,
- M_LD_OB,
- M_LD_AB,
- M_LDC1_AB,
- M_LDC2_AB,
- M_LDC3_AB,
- M_LDL_AB,
- M_LDR_AB,
- M_LH_A,
- M_LH_AB,
- M_LHU_A,
- M_LHU_AB,
- M_LI,
- M_LI_D,
- M_LI_DD,
- M_LI_S,
- M_LI_SS,
- M_LL_AB,
- M_LLD_AB,
- M_LS_A,
- M_LW_A,
- M_LW_AB,
- M_LWC0_A,
- M_LWC0_AB,
- M_LWC1_A,
- M_LWC1_AB,
- M_LWC2_A,
- M_LWC2_AB,
- M_LWC3_A,
- M_LWC3_AB,
- M_LWL_A,
- M_LWL_AB,
- M_LWR_A,
- M_LWR_AB,
- M_LWU_AB,
- M_MOVE,
- M_MUL,
- M_MUL_I,
- M_MULO,
- M_MULO_I,
- M_MULOU,
- M_MULOU_I,
- M_NOR_I,
- M_OR_I,
- M_REM_3,
- M_REM_3I,
- M_REMU_3,
- M_REMU_3I,
- M_DROL,
- M_ROL,
- M_DROL_I,
- M_ROL_I,
- M_DROR,
- M_ROR,
- M_DROR_I,
- M_ROR_I,
- M_S_DA,
- M_S_DOB,
- M_S_DAB,
- M_S_S,
- M_SC_AB,
- M_SCD_AB,
- M_SD_A,
- M_SD_OB,
- M_SD_AB,
- M_SDC1_AB,
- M_SDC2_AB,
- M_SDC3_AB,
- M_SDL_AB,
- M_SDR_AB,
- M_SEQ,
- M_SEQ_I,
- M_SGE,
- M_SGE_I,
- M_SGEU,
- M_SGEU_I,
- M_SGT,
- M_SGT_I,
- M_SGTU,
- M_SGTU_I,
- M_SLE,
- M_SLE_I,
- M_SLEU,
- M_SLEU_I,
- M_SLT_I,
- M_SLTU_I,
- M_SNE,
- M_SNE_I,
- M_SB_A,
- M_SB_AB,
- M_SH_A,
- M_SH_AB,
- M_SW_A,
- M_SW_AB,
- M_SWC0_A,
- M_SWC0_AB,
- M_SWC1_A,
- M_SWC1_AB,
- M_SWC2_A,
- M_SWC2_AB,
- M_SWC3_A,
- M_SWC3_AB,
- M_SWL_A,
- M_SWL_AB,
- M_SWR_A,
- M_SWR_AB,
- M_SUB_I,
- M_SUBU_I,
- M_SUBU_I_2,
- M_TEQ_I,
- M_TGE_I,
- M_TGEU_I,
- M_TLT_I,
- M_TLTU_I,
- M_TNE_I,
- M_TRUNCWD,
- M_TRUNCWS,
- M_ULD,
- M_ULD_A,
- M_ULH,
- M_ULH_A,
- M_ULHU,
- M_ULHU_A,
- M_ULW,
- M_ULW_A,
- M_USH,
- M_USH_A,
- M_USW,
- M_USW_A,
- M_USD,
- M_USD_A,
- M_XOR_I,
- M_COP0,
- M_COP1,
- M_COP2,
- M_COP3,
- M_NUM_MACROS
-};
-
-
-/* The order of overloaded instructions matters. Label arguments and
- register arguments look the same. Instructions that can have either
- for arguments must apear in the correct order in this table for the
- assembler to pick the right one. In other words, entries with
- immediate operands must apear after the same instruction with
- registers.
-
- Many instructions are short hand for other instructions (i.e., The
- jal <register> instruction is short for jalr <register>). */
-
-extern const struct mips_opcode mips_builtin_opcodes[];
-extern const int bfd_mips_num_builtin_opcodes;
-extern struct mips_opcode *mips_opcodes;
-extern int bfd_mips_num_opcodes;
-#define NUMOPCODES bfd_mips_num_opcodes
-
-
-/* The rest of this file adds definitions for the mips16 TinyRISC
- processor. */
-
-/* These are the bitmasks and shift counts used for the different
- fields in the instruction formats. Other than OP, no masks are
- provided for the fixed portions of an instruction, since they are
- not needed.
-
- The I format uses IMM11.
-
- The RI format uses RX and IMM8.
-
- The RR format uses RX, and RY.
-
- The RRI format uses RX, RY, and IMM5.
-
- The RRR format uses RX, RY, and RZ.
-
- The RRI_A format uses RX, RY, and IMM4.
-
- The SHIFT format uses RX, RY, and SHAMT.
-
- The I8 format uses IMM8.
-
- The I8_MOVR32 format uses RY and REGR32.
-
- The IR_MOV32R format uses REG32R and MOV32Z.
-
- The I64 format uses IMM8.
-
- The RI64 format uses RY and IMM5.
- */
-
-#define MIPS16OP_MASK_OP 0x1f
-#define MIPS16OP_SH_OP 11
-#define MIPS16OP_MASK_IMM11 0x7ff
-#define MIPS16OP_SH_IMM11 0
-#define MIPS16OP_MASK_RX 0x7
-#define MIPS16OP_SH_RX 8
-#define MIPS16OP_MASK_IMM8 0xff
-#define MIPS16OP_SH_IMM8 0
-#define MIPS16OP_MASK_RY 0x7
-#define MIPS16OP_SH_RY 5
-#define MIPS16OP_MASK_IMM5 0x1f
-#define MIPS16OP_SH_IMM5 0
-#define MIPS16OP_MASK_RZ 0x7
-#define MIPS16OP_SH_RZ 2
-#define MIPS16OP_MASK_IMM4 0xf
-#define MIPS16OP_SH_IMM4 0
-#define MIPS16OP_MASK_REGR32 0x1f
-#define MIPS16OP_SH_REGR32 0
-#define MIPS16OP_MASK_REG32R 0x1f
-#define MIPS16OP_SH_REG32R 3
-#define MIPS16OP_EXTRACT_REG32R(i) ((((i) >> 5) & 7) | ((i) & 0x18))
-#define MIPS16OP_MASK_MOVE32Z 0x7
-#define MIPS16OP_SH_MOVE32Z 0
-#define MIPS16OP_MASK_IMM6 0x3f
-#define MIPS16OP_SH_IMM6 5
-
-/* These are the characters which may appears in the args field of a MIPS16
- instruction. They appear in the order in which the fields appear when the
- instruction is used. Commas and parentheses in the args string are ignored
- when assembling, and written into the output when disassembling.
-
- "y" 3 bit register (MIPS16OP_*_RY)
- "x" 3 bit register (MIPS16OP_*_RX)
- "z" 3 bit register (MIPS16OP_*_RZ)
- "Z" 3 bit register (MIPS16OP_*_MOVE32Z)
- "v" 3 bit same register as source and destination (MIPS16OP_*_RX)
- "w" 3 bit same register as source and destination (MIPS16OP_*_RY)
- "0" zero register ($0)
- "S" stack pointer ($sp or $29)
- "P" program counter
- "R" return address register ($ra or $31)
- "X" 5 bit MIPS register (MIPS16OP_*_REGR32)
- "Y" 5 bit MIPS register (MIPS16OP_*_REG32R)
- "6" 6 bit unsigned break code (MIPS16OP_*_IMM6)
- "a" 26 bit jump address
- "e" 11 bit extension value
- "l" register list for entry instruction
- "L" register list for exit instruction
-
- The remaining codes may be extended. Except as otherwise noted,
- the full extended operand is a 16 bit signed value.
- "<" 3 bit unsigned shift count * 0 (MIPS16OP_*_RZ) (full 5 bit unsigned)
- ">" 3 bit unsigned shift count * 0 (MIPS16OP_*_RX) (full 5 bit unsigned)
- "[" 3 bit unsigned shift count * 0 (MIPS16OP_*_RZ) (full 6 bit unsigned)
- "]" 3 bit unsigned shift count * 0 (MIPS16OP_*_RX) (full 6 bit unsigned)
- "4" 4 bit signed immediate * 0 (MIPS16OP_*_IMM4) (full 15 bit signed)
- "5" 5 bit unsigned immediate * 0 (MIPS16OP_*_IMM5)
- "H" 5 bit unsigned immediate * 2 (MIPS16OP_*_IMM5)
- "W" 5 bit unsigned immediate * 4 (MIPS16OP_*_IMM5)
- "D" 5 bit unsigned immediate * 8 (MIPS16OP_*_IMM5)
- "j" 5 bit signed immediate * 0 (MIPS16OP_*_IMM5)
- "8" 8 bit unsigned immediate * 0 (MIPS16OP_*_IMM8)
- "V" 8 bit unsigned immediate * 4 (MIPS16OP_*_IMM8)
- "C" 8 bit unsigned immediate * 8 (MIPS16OP_*_IMM8)
- "U" 8 bit unsigned immediate * 0 (MIPS16OP_*_IMM8) (full 16 bit unsigned)
- "k" 8 bit signed immediate * 0 (MIPS16OP_*_IMM8)
- "K" 8 bit signed immediate * 8 (MIPS16OP_*_IMM8)
- "p" 8 bit conditional branch address (MIPS16OP_*_IMM8)
- "q" 11 bit branch address (MIPS16OP_*_IMM11)
- "A" 8 bit PC relative address * 4 (MIPS16OP_*_IMM8)
- "B" 5 bit PC relative address * 8 (MIPS16OP_*_IMM5)
- "E" 5 bit PC relative address * 4 (MIPS16OP_*_IMM5)
- "m" 7 bit register list for save instruction (18 bit extended)
- "M" 7 bit register list for restore instruction (18 bit extended)
- */
-
-/* Save/restore encoding for the args field when all 4 registers are
- either saved as arguments or saved/restored as statics. */
-#define MIPS16_ALL_ARGS 0xe
-#define MIPS16_ALL_STATICS 0xb
-
-/* For the mips16, we use the same opcode table format and a few of
- the same flags. However, most of the flags are different. */
-
-/* Modifies the register in MIPS16OP_*_RX. */
-#define MIPS16_INSN_WRITE_X 0x00000001
-/* Modifies the register in MIPS16OP_*_RY. */
-#define MIPS16_INSN_WRITE_Y 0x00000002
-/* Modifies the register in MIPS16OP_*_RZ. */
-#define MIPS16_INSN_WRITE_Z 0x00000004
-/* Modifies the T ($24) register. */
-#define MIPS16_INSN_WRITE_T 0x00000008
-/* Modifies the SP ($29) register. */
-#define MIPS16_INSN_WRITE_SP 0x00000010
-/* Modifies the RA ($31) register. */
-#define MIPS16_INSN_WRITE_31 0x00000020
-/* Modifies the general purpose register in MIPS16OP_*_REG32R. */
-#define MIPS16_INSN_WRITE_GPR_Y 0x00000040
-/* Reads the register in MIPS16OP_*_RX. */
-#define MIPS16_INSN_READ_X 0x00000080
-/* Reads the register in MIPS16OP_*_RY. */
-#define MIPS16_INSN_READ_Y 0x00000100
-/* Reads the register in MIPS16OP_*_MOVE32Z. */
-#define MIPS16_INSN_READ_Z 0x00000200
-/* Reads the T ($24) register. */
-#define MIPS16_INSN_READ_T 0x00000400
-/* Reads the SP ($29) register. */
-#define MIPS16_INSN_READ_SP 0x00000800
-/* Reads the RA ($31) register. */
-#define MIPS16_INSN_READ_31 0x00001000
-/* Reads the program counter. */
-#define MIPS16_INSN_READ_PC 0x00002000
-/* Reads the general purpose register in MIPS16OP_*_REGR32. */
-#define MIPS16_INSN_READ_GPR_X 0x00004000
-/* Is a branch insn. */
-#define MIPS16_INSN_BRANCH 0x00010000
-
-/* The following flags have the same value for the mips16 opcode
- table:
- INSN_UNCOND_BRANCH_DELAY
- INSN_COND_BRANCH_DELAY
- INSN_COND_BRANCH_LIKELY (never used)
- INSN_READ_HI
- INSN_READ_LO
- INSN_WRITE_HI
- INSN_WRITE_LO
- INSN_TRAP
- INSN_ISA3
- */
-
-extern const struct mips_opcode mips16_opcodes[];
-extern const int bfd_mips16_num_opcodes;
-
-#endif /* _MIPS_H_ */
diff --git a/include/opcode/mmix.h b/include/opcode/mmix.h
deleted file mode 100644
index 7f561c6..0000000
--- a/include/opcode/mmix.h
+++ /dev/null
@@ -1,186 +0,0 @@
-/* mmix.h -- Header file for MMIX opcode table
- Copyright (C) 2001, 2003 Free Software Foundation, Inc.
- Written by Hans-Peter Nilsson (hp@bitrange.com)
-
-This file is part of GDB, GAS, and the GNU binutils.
-
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them under the terms of the GNU General Public
-License as published by the Free Software Foundation; either version 2,
-or (at your option) any later version.
-
-GDB, GAS, and the GNU binutils are distributed in the hope that they
-will be useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING. If not, write to the Free
-Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* We could have just a char*[] table indexed by the register number, but
- that would not allow for synonyms. The table is terminated with an
- entry with a NULL name. */
-struct mmix_spec_reg
-{
- const char *name;
- unsigned int number;
-};
-
-/* General indication of the type of instruction. */
-enum mmix_insn_type
- {
- mmix_type_pseudo,
- mmix_type_normal,
- mmix_type_branch,
- mmix_type_condbranch,
- mmix_type_memaccess_octa,
- mmix_type_memaccess_tetra,
- mmix_type_memaccess_wyde,
- mmix_type_memaccess_byte,
- mmix_type_memaccess_block,
- mmix_type_jsr
- };
-
-/* Type of operands an instruction takes. Use when parsing assembly code
- and disassembling. */
-enum mmix_operands_type
- {
- mmix_operands_none = 0,
-
- /* All operands are registers: "$X,$Y,$Z". */
- mmix_operands_regs,
-
- /* "$X,YZ", like SETH. */
- mmix_operands_reg_yz,
-
- /* The regular "$X,$Y,$Z|Z".
- The Z is optional; if only "$X,$Y" is given, then "$X,$Y,0" is
- assumed. */
- mmix_operands_regs_z_opt,
-
- /* The regular "$X,$Y,$Z|Z". */
- mmix_operands_regs_z,
-
- /* "Address"; only JMP. Zero operands allowed unless GNU syntax. */
- mmix_operands_jmp,
-
- /* "$X|X,$Y,$Z|Z": PUSHGO; like "3", but X can be expressed as an
- integer. */
- mmix_operands_pushgo,
-
- /* Two registers or a register and a byte, like FLOT, possibly with
- rounding: "$X,$Z|Z" or "$X,ROUND_MODE,$Z|Z". */
- mmix_operands_roundregs_z,
-
- /* "X,YZ", POP. Unless GNU syntax, zero or one operand is allowed. */
- mmix_operands_pop,
-
- /* Two registers, possibly with rounding: "$X,$Z" or
- "$X,ROUND_MODE,$Z". */
- mmix_operands_roundregs,
-
- /* "XYZ", like SYNC. */
- mmix_operands_sync,
-
- /* "X,$Y,$Z|Z", like SYNCD. */
- mmix_operands_x_regs_z,
-
- /* "$X,Y,$Z|Z", like NEG and NEGU. The Y field is optional, default 0. */
- mmix_operands_neg,
-
- /* "$X,Address, like GETA or branches. */
- mmix_operands_regaddr,
-
- /* "$X|X,Address, like PUSHJ. */
- mmix_operands_pushj,
-
- /* "$X,spec_reg"; GET. */
- mmix_operands_get,
-
- /* "spec_reg,$Z|Z"; PUT. */
- mmix_operands_put,
-
- /* Two registers, "$X,$Y". */
- mmix_operands_set,
-
- /* "$X,0"; SAVE. */
- mmix_operands_save,
-
- /* "0,$Z"; UNSAVE. */
- mmix_operands_unsave,
-
- /* "X,Y,Z"; like SWYM or TRAP. Zero (or 1 if GNU syntax) to three
- operands, interpreted as 0; XYZ; X, YZ and X, Y, Z. */
- mmix_operands_xyz_opt,
-
- /* Just "Z", like RESUME. Unless GNU syntax, the operand can be omitted
- and will then be assumed zero. */
- mmix_operands_resume,
-
- /* These are specials to handle that pseudo-directives are specified
- like ordinary insns when being mmixal-compatible. They signify the
- specific pseudo-directive rather than the operands type. */
-
- /* LOC. */
- mmix_operands_loc,
-
- /* PREFIX. */
- mmix_operands_prefix,
-
- /* BYTE. */
- mmix_operands_byte,
-
- /* WYDE. */
- mmix_operands_wyde,
-
- /* TETRA. */
- mmix_operands_tetra,
-
- /* OCTA. */
- mmix_operands_octa,
-
- /* LOCAL. */
- mmix_operands_local,
-
- /* BSPEC. */
- mmix_operands_bspec,
-
- /* ESPEC. */
- mmix_operands_espec,
- };
-
-struct mmix_opcode
- {
- const char *name;
- unsigned long match;
- unsigned long lose;
- enum mmix_operands_type operands;
-
- /* This is used by the disassembly function. */
- enum mmix_insn_type type;
- };
-
-/* Declare the actual tables. */
-extern const struct mmix_opcode mmix_opcodes[];
-
-/* This one is terminated with an entry with a NULL name. */
-extern const struct mmix_spec_reg mmix_spec_regs[];
-
-/* Some insn values we use when padding and synthesizing address loads. */
-#define IMM_OFFSET_BIT 1
-#define COND_INV_BIT 0x8
-#define PRED_INV_BIT 0x10
-
-#define PUSHGO_INSN_BYTE 0xbe
-#define GO_INSN_BYTE 0x9e
-#define SETL_INSN_BYTE 0xe3
-#define INCML_INSN_BYTE 0xe6
-#define INCMH_INSN_BYTE 0xe5
-#define INCH_INSN_BYTE 0xe4
-#define SWYM_INSN_BYTE 0xfd
-#define JMP_INSN_BYTE 0xf0
-
-/* We can have 256 - 32 (local registers) - 1 ($255 is not allocatable)
- global registers. */
-#define MAX_GREGS 223
diff --git a/include/opcode/mn10200.h b/include/opcode/mn10200.h
deleted file mode 100644
index 51e44c6..0000000
--- a/include/opcode/mn10200.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/* mn10200.h -- Header file for Matsushita 10200 opcode table
- Copyright 1996, 1997 Free Software Foundation, Inc.
- Written by Jeff Law, Cygnus Support
-
-This file is part of GDB, GAS, and the GNU binutils.
-
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them under the terms of the GNU General Public
-License as published by the Free Software Foundation; either version
-1, or (at your option) any later version.
-
-GDB, GAS, and the GNU binutils are distributed in the hope that they
-will be useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING. If not, write to the Free
-Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef MN10200_H
-#define MN10200_H
-
-/* The opcode table is an array of struct mn10200_opcode. */
-
-struct mn10200_opcode
-{
- /* The opcode name. */
- const char *name;
-
- /* The opcode itself. Those bits which will be filled in with
- operands are zeroes. */
- unsigned long opcode;
-
- /* The opcode mask. This is used by the disassembler. This is a
- mask containing ones indicating those bits which must match the
- opcode field, and zeroes indicating those bits which need not
- match (and are presumably filled in by operands). */
- unsigned long mask;
-
- /* The format of this opcode. */
- unsigned char format;
-
- /* An array of operand codes. Each code is an index into the
- operand table. They appear in the order which the operands must
- appear in assembly code, and are terminated by a zero. */
- unsigned char operands[8];
-};
-
-/* The table itself is sorted by major opcode number, and is otherwise
- in the order in which the disassembler should consider
- instructions. */
-extern const struct mn10200_opcode mn10200_opcodes[];
-extern const int mn10200_num_opcodes;
-
-
-/* The operands table is an array of struct mn10200_operand. */
-
-struct mn10200_operand
-{
- /* The number of bits in the operand. */
- int bits;
-
- /* How far the operand is left shifted in the instruction. */
- int shift;
-
- /* One bit syntax flags. */
- int flags;
-};
-
-/* Elements in the table are retrieved by indexing with values from
- the operands field of the mn10200_opcodes table. */
-
-extern const struct mn10200_operand mn10200_operands[];
-
-/* Values defined for the flags field of a struct mn10200_operand. */
-#define MN10200_OPERAND_DREG 0x1
-
-#define MN10200_OPERAND_AREG 0x2
-
-#define MN10200_OPERAND_PSW 0x4
-
-#define MN10200_OPERAND_MDR 0x8
-
-#define MN10200_OPERAND_SIGNED 0x10
-
-#define MN10200_OPERAND_PROMOTE 0x20
-
-#define MN10200_OPERAND_PAREN 0x40
-
-#define MN10200_OPERAND_REPEATED 0x80
-
-#define MN10200_OPERAND_EXTENDED 0x100
-
-#define MN10200_OPERAND_NOCHECK 0x200
-
-#define MN10200_OPERAND_PCREL 0x400
-
-#define MN10200_OPERAND_MEMADDR 0x800
-
-#define MN10200_OPERAND_RELAX 0x1000
-
-#define FMT_1 1
-#define FMT_2 2
-#define FMT_3 3
-#define FMT_4 4
-#define FMT_5 5
-#define FMT_6 6
-#define FMT_7 7
-#endif /* MN10200_H */
diff --git a/include/opcode/mn10300.h b/include/opcode/mn10300.h
deleted file mode 100644
index a47ef48..0000000
--- a/include/opcode/mn10300.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/* mn10300.h -- Header file for Matsushita 10300 opcode table
- Copyright 1996, 1997, 1998, 1999, 2003 Free Software Foundation, Inc.
- Written by Jeff Law, Cygnus Support
-
-This file is part of GDB, GAS, and the GNU binutils.
-
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them under the terms of the GNU General Public
-License as published by the Free Software Foundation; either version
-1, or (at your option) any later version.
-
-GDB, GAS, and the GNU binutils are distributed in the hope that they
-will be useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING. If not, write to the Free
-Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef MN10300_H
-#define MN10300_H
-
-/* The opcode table is an array of struct mn10300_opcode. */
-
-#define MN10300_MAX_OPERANDS 8
-struct mn10300_opcode
-{
- /* The opcode name. */
- const char *name;
-
- /* The opcode itself. Those bits which will be filled in with
- operands are zeroes. */
- unsigned long opcode;
-
- /* The opcode mask. This is used by the disassembler. This is a
- mask containing ones indicating those bits which must match the
- opcode field, and zeroes indicating those bits which need not
- match (and are presumably filled in by operands). */
- unsigned long mask;
-
- /* A bitmask. For each operand, nonzero if it must not have the same
- register specification as all other operands with a nonzero bit in
- this flag. ie 0x81 would indicate that operands 7 and 0 must not
- match. Note that we count operands from left to right as they appear
- in the operands specification below. */
- unsigned int no_match_operands;
-
- /* The format of this opcode. */
- unsigned char format;
-
- /* Bitmask indicating what cpu variants this opcode is available on.
- We assume mn10300 base opcodes are available everywhere, so we only
- have to note opcodes which are available on other variants. */
- unsigned int machine;
-
- /* An array of operand codes. Each code is an index into the
- operand table. They appear in the order which the operands must
- appear in assembly code, and are terminated by a zero. */
- unsigned char operands[MN10300_MAX_OPERANDS];
-};
-
-/* The table itself is sorted by major opcode number, and is otherwise
- in the order in which the disassembler should consider
- instructions. */
-extern const struct mn10300_opcode mn10300_opcodes[];
-extern const int mn10300_num_opcodes;
-
-
-/* The operands table is an array of struct mn10300_operand. */
-
-struct mn10300_operand
-{
- /* The number of bits in the operand. */
- int bits;
-
- /* How far the operand is left shifted in the instruction. */
- int shift;
-
- /* One bit syntax flags. */
- int flags;
-};
-
-/* Elements in the table are retrieved by indexing with values from
- the operands field of the mn10300_opcodes table. */
-
-extern const struct mn10300_operand mn10300_operands[];
-
-/* Values defined for the flags field of a struct mn10300_operand. */
-#define MN10300_OPERAND_DREG 0x1
-
-#define MN10300_OPERAND_AREG 0x2
-
-#define MN10300_OPERAND_SP 0x4
-
-#define MN10300_OPERAND_PSW 0x8
-
-#define MN10300_OPERAND_MDR 0x10
-
-#define MN10300_OPERAND_SIGNED 0x20
-
-#define MN10300_OPERAND_PROMOTE 0x40
-
-#define MN10300_OPERAND_PAREN 0x80
-
-#define MN10300_OPERAND_REPEATED 0x100
-
-#define MN10300_OPERAND_EXTENDED 0x200
-
-#define MN10300_OPERAND_SPLIT 0x400
-
-#define MN10300_OPERAND_REG_LIST 0x800
-
-#define MN10300_OPERAND_PCREL 0x1000
-
-#define MN10300_OPERAND_MEMADDR 0x2000
-
-#define MN10300_OPERAND_RELAX 0x4000
-
-#define MN10300_OPERAND_USP 0x8000
-
-#define MN10300_OPERAND_SSP 0x10000
-
-#define MN10300_OPERAND_MSP 0x20000
-
-#define MN10300_OPERAND_PC 0x40000
-
-#define MN10300_OPERAND_EPSW 0x80000
-
-#define MN10300_OPERAND_RREG 0x100000
-
-#define MN10300_OPERAND_XRREG 0x200000
-
-#define MN10300_OPERAND_PLUS 0x400000
-
-#define MN10300_OPERAND_24BIT 0x800000
-
-#define MN10300_OPERAND_FSREG 0x1000000
-
-#define MN10300_OPERAND_FDREG 0x2000000
-
-#define MN10300_OPERAND_FPCR 0x4000000
-
-/* Opcode Formats. */
-#define FMT_S0 1
-#define FMT_S1 2
-#define FMT_S2 3
-#define FMT_S4 4
-#define FMT_S6 5
-#define FMT_D0 6
-#define FMT_D1 7
-#define FMT_D2 8
-#define FMT_D4 9
-#define FMT_D5 10
-#define FMT_D6 11
-#define FMT_D7 12
-#define FMT_D8 13
-#define FMT_D9 14
-#define FMT_D10 15
-#define FMT_D3 16
-
-/* Variants of the mn10300 which have additional opcodes. */
-#define MN103 300
-#define AM30 300
-
-#define AM33 330
-#define AM33_2 332
-
-#endif /* MN10300_H */
diff --git a/include/opcode/msp430.h b/include/opcode/msp430.h
deleted file mode 100644
index eec2f1e..0000000
--- a/include/opcode/msp430.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/* Opcode table for the TI MSP430 microcontrollers
-
- Copyright 2002, 2004 Free Software Foundation, Inc.
- Contributed by Dmitry Diky <diwil@mail.ru>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef __MSP430_H_
-#define __MSP430_H_
-
-struct msp430_operand_s
-{
- int ol; /* Operand length words. */
- int am; /* Addr mode. */
- int reg; /* Register. */
- int mode; /* Pperand mode. */
-#define OP_REG 0
-#define OP_EXP 1
-#ifndef DASM_SECTION
- expressionS exp;
-#endif
-};
-
-#define BYTE_OPERATION (1 << 6) /* Byte operation flag for all instructions. */
-
-struct msp430_opcode_s
-{
- char *name;
- int fmt;
- int insn_opnumb;
- int bin_opcode;
- int bin_mask;
-};
-
-#define MSP_INSN(name, size, numb, bin, mask) { #name, size, numb, bin, mask }
-
-static struct msp430_opcode_s msp430_opcodes[] =
-{
- MSP_INSN (and, 1, 2, 0xf000, 0xf000),
- MSP_INSN (inv, 0, 1, 0xe330, 0xfff0),
- MSP_INSN (xor, 1, 2, 0xe000, 0xf000),
- MSP_INSN (setz, 0, 0, 0xd322, 0xffff),
- MSP_INSN (setc, 0, 0, 0xd312, 0xffff),
- MSP_INSN (eint, 0, 0, 0xd232, 0xffff),
- MSP_INSN (setn, 0, 0, 0xd222, 0xffff),
- MSP_INSN (bis, 1, 2, 0xd000, 0xf000),
- MSP_INSN (clrz, 0, 0, 0xc322, 0xffff),
- MSP_INSN (clrc, 0, 0, 0xc312, 0xffff),
- MSP_INSN (dint, 0, 0, 0xc232, 0xffff),
- MSP_INSN (clrn, 0, 0, 0xc222, 0xffff),
- MSP_INSN (bic, 1, 2, 0xc000, 0xf000),
- MSP_INSN (bit, 1, 2, 0xb000, 0xf000),
- MSP_INSN (dadc, 0, 1, 0xa300, 0xff30),
- MSP_INSN (dadd, 1, 2, 0xa000, 0xf000),
- MSP_INSN (tst, 0, 1, 0x9300, 0xff30),
- MSP_INSN (cmp, 1, 2, 0x9000, 0xf000),
- MSP_INSN (decd, 0, 1, 0x8320, 0xff30),
- MSP_INSN (dec, 0, 1, 0x8310, 0xff30),
- MSP_INSN (sub, 1, 2, 0x8000, 0xf000),
- MSP_INSN (sbc, 0, 1, 0x7300, 0xff30),
- MSP_INSN (subc, 1, 2, 0x7000, 0xf000),
- MSP_INSN (adc, 0, 1, 0x6300, 0xff30),
- MSP_INSN (rlc, 0, 2, 0x6000, 0xf000),
- MSP_INSN (addc, 1, 2, 0x6000, 0xf000),
- MSP_INSN (incd, 0, 1, 0x5320, 0xff30),
- MSP_INSN (inc, 0, 1, 0x5310, 0xff30),
- MSP_INSN (rla, 0, 2, 0x5000, 0xf000),
- MSP_INSN (add, 1, 2, 0x5000, 0xf000),
- MSP_INSN (nop, 0, 0, 0x4303, 0xffff),
- MSP_INSN (clr, 0, 1, 0x4300, 0xff30),
- MSP_INSN (ret, 0, 0, 0x4130, 0xff30),
- MSP_INSN (pop, 0, 1, 0x4130, 0xff30),
- MSP_INSN (br, 0, 3, 0x4000, 0xf000),
- MSP_INSN (mov, 1, 2, 0x4000, 0xf000),
- MSP_INSN (jmp, 3, 1, 0x3c00, 0xfc00),
- MSP_INSN (jl, 3, 1, 0x3800, 0xfc00),
- MSP_INSN (jge, 3, 1, 0x3400, 0xfc00),
- MSP_INSN (jn, 3, 1, 0x3000, 0xfc00),
- MSP_INSN (jc, 3, 1, 0x2c00, 0xfc00),
- MSP_INSN (jhs, 3, 1, 0x2c00, 0xfc00),
- MSP_INSN (jnc, 3, 1, 0x2800, 0xfc00),
- MSP_INSN (jlo, 3, 1, 0x2800, 0xfc00),
- MSP_INSN (jz, 3, 1, 0x2400, 0xfc00),
- MSP_INSN (jeq, 3, 1, 0x2400, 0xfc00),
- MSP_INSN (jnz, 3, 1, 0x2000, 0xfc00),
- MSP_INSN (jne, 3, 1, 0x2000, 0xfc00),
- MSP_INSN (reti, 2, 0, 0x1300, 0xffc0),
- MSP_INSN (call, 2, 1, 0x1280, 0xffc0),
- MSP_INSN (push, 2, 1, 0x1200, 0xff80),
- MSP_INSN (sxt, 2, 1, 0x1180, 0xffc0),
- MSP_INSN (rra, 2, 1, 0x1100, 0xff80),
- MSP_INSN (swpb, 2, 1, 0x1080, 0xffc0),
- MSP_INSN (rrc, 2, 1, 0x1000, 0xff80),
- /* Simple polymorphs. */
- MSP_INSN (beq, 4, 0, 0, 0xffff),
- MSP_INSN (bne, 4, 1, 0, 0xffff),
- MSP_INSN (blt, 4, 2, 0, 0xffff),
- MSP_INSN (bltu, 4, 3, 0, 0xffff),
- MSP_INSN (bge, 4, 4, 0, 0xffff),
- MSP_INSN (bgeu, 4, 5, 0, 0xffff),
- MSP_INSN (bltn, 4, 6, 0, 0xffff),
- MSP_INSN (jump, 4, 7, 0, 0xffff),
- /* Long polymorphs. */
- MSP_INSN (bgt, 5, 0, 0, 0xffff),
- MSP_INSN (bgtu, 5, 1, 0, 0xffff),
- MSP_INSN (bleu, 5, 2, 0, 0xffff),
- MSP_INSN (ble, 5, 3, 0, 0xffff),
-
- /* End of instruction set. */
- { NULL, 0, 0, 0, 0 }
-};
-
-#endif
diff --git a/include/opcode/np1.h b/include/opcode/np1.h
deleted file mode 100644
index ebe37f5..0000000
--- a/include/opcode/np1.h
+++ /dev/null
@@ -1,422 +0,0 @@
-/* Print GOULD NPL instructions for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 1991 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-GDB is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
-
-GDB is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GDB; see the file COPYING. If not, write to
-the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-struct gld_opcode
-{
- char *name;
- unsigned long opcode;
- unsigned long mask;
- char *args;
- int length;
-};
-
-/* We store four bytes of opcode for all opcodes because that
- is the most any of them need. The actual length of an instruction
- is always at least 2 bytes, and at most four. The length of the
- instruction is based on the opcode.
-
- The mask component is a mask saying which bits must match
- particular opcode in order for an instruction to be an instance
- of that opcode.
-
- The args component is a string containing characters
- that are used to format the arguments to the instruction. */
-
-/* Kinds of operands:
- r Register in first field
- R Register in second field
- b Base register in first field
- B Base register in second field
- v Vector register in first field
- V Vector register in first field
- A Optional address register (base register)
- X Optional index register
- I Immediate data (16bits signed)
- O Offset field (16bits signed)
- h Offset field (15bits signed)
- d Offset field (14bits signed)
- S Shift count field
-
- any other characters are printed as is...
-*/
-
-/* The assembler requires that this array be sorted as follows:
- all instances of the same mnemonic must be consecutive.
- All instances of the same mnemonic with the same number of operands
- must be consecutive.
- */
-struct gld_opcode gld_opcodes[] =
-{
-{ "lb", 0xb4080000, 0xfc080000, "r,xOA,X", 4 },
-{ "lnb", 0xb8080000, 0xfc080000, "r,xOA,X", 4 },
-{ "lbs", 0xec080000, 0xfc080000, "r,xOA,X", 4 },
-{ "lh", 0xb4000001, 0xfc080001, "r,xOA,X", 4 },
-{ "lnh", 0xb8000001, 0xfc080001, "r,xOA,X", 4 },
-{ "lw", 0xb4000000, 0xfc080000, "r,xOA,X", 4 },
-{ "lnw", 0xb8000000, 0xfc080000, "r,xOA,X", 4 },
-{ "ld", 0xb4000002, 0xfc080002, "r,xOA,X", 4 },
-{ "lnd", 0xb8000002, 0xfc080002, "r,xOA,X", 4 },
-{ "li", 0xf8000000, 0xfc7f0000, "r,I", 4 },
-{ "lpa", 0x50080000, 0xfc080000, "r,xOA,X", 4 },
-{ "la", 0x50000000, 0xfc080000, "r,xOA,X", 4 },
-{ "labr", 0x58080000, 0xfc080000, "b,xOA,X", 4 },
-{ "lbp", 0x90080000, 0xfc080000, "r,xOA,X", 4 },
-{ "lhp", 0x90000001, 0xfc080001, "r,xOA,X", 4 },
-{ "lwp", 0x90000000, 0xfc080000, "r,xOA,X", 4 },
-{ "ldp", 0x90000002, 0xfc080002, "r,xOA,X", 4 },
-{ "suabr", 0x58000000, 0xfc080000, "b,xOA,X", 4 },
-{ "lf", 0xbc000000, 0xfc080000, "r,xOA,X", 4 },
-{ "lfbr", 0xbc080000, 0xfc080000, "b,xOA,X", 4 },
-{ "lwbr", 0x5c000000, 0xfc080000, "b,xOA,X", 4 },
-{ "stb", 0xd4080000, 0xfc080000, "r,xOA,X", 4 },
-{ "sth", 0xd4000001, 0xfc080001, "r,xOA,X", 4 },
-{ "stw", 0xd4000000, 0xfc080000, "r,xOA,X", 4 },
-{ "std", 0xd4000002, 0xfc080002, "r,xOA,X", 4 },
-{ "stf", 0xdc000000, 0xfc080000, "r,xOA,X", 4 },
-{ "stfbr", 0xdc080000, 0xfc080000, "b,xOA,X", 4 },
-{ "stwbr", 0x54000000, 0xfc080000, "b,xOA,X", 4 },
-{ "zmb", 0xd8080000, 0xfc080000, "r,xOA,X", 4 },
-{ "zmh", 0xd8000001, 0xfc080001, "r,xOA,X", 4 },
-{ "zmw", 0xd8000000, 0xfc080000, "r,xOA,X", 4 },
-{ "zmd", 0xd8000002, 0xfc080002, "r,xOA,X", 4 },
-{ "stbp", 0x94080000, 0xfc080000, "r,xOA,X", 4 },
-{ "sthp", 0x94000001, 0xfc080001, "r,xOA,X", 4 },
-{ "stwp", 0x94000000, 0xfc080000, "r,xOA,X", 4 },
-{ "stdp", 0x94000002, 0xfc080002, "r,xOA,X", 4 },
-{ "lil", 0xf80b0000, 0xfc7f0000, "r,D", 4 },
-{ "lwsl1", 0xec000000, 0xfc080000, "r,xOA,X", 4 },
-{ "lwsl2", 0xfc000000, 0xfc080000, "r,xOA,X", 4 },
-{ "lwsl3", 0xfc080000, 0xfc080000, "r,xOA,X", 4 },
-
-{ "lvb", 0xb0080000, 0xfc080000, "v,xOA,X", 4 },
-{ "lvh", 0xb0000001, 0xfc080001, "v,xOA,X", 4 },
-{ "lvw", 0xb0000000, 0xfc080000, "v,xOA,X", 4 },
-{ "lvd", 0xb0000002, 0xfc080002, "v,xOA,X", 4 },
-{ "liv", 0x3c040000, 0xfc0f0000, "v,R", 2 },
-{ "livf", 0x3c080000, 0xfc0f0000, "v,R", 2 },
-{ "stvb", 0xd0080000, 0xfc080000, "v,xOA,X", 4 },
-{ "stvh", 0xd0000001, 0xfc080001, "v,xOA,X", 4 },
-{ "stvw", 0xd0000000, 0xfc080000, "v,xOA,X", 4 },
-{ "stvd", 0xd0000002, 0xfc080002, "v,xOA,X", 4 },
-
-{ "trr", 0x2c000000, 0xfc0f0000, "r,R", 2 },
-{ "trn", 0x2c040000, 0xfc0f0000, "r,R", 2 },
-{ "trnd", 0x2c0c0000, 0xfc0f0000, "r,R", 2 },
-{ "trabs", 0x2c010000, 0xfc0f0000, "r,R", 2 },
-{ "trabsd", 0x2c090000, 0xfc0f0000, "r,R", 2 },
-{ "trc", 0x2c030000, 0xfc0f0000, "r,R", 2 },
-{ "xcr", 0x28040000, 0xfc0f0000, "r,R", 2 },
-{ "cxcr", 0x2c060000, 0xfc0f0000, "r,R", 2 },
-{ "cxcrd", 0x2c0e0000, 0xfc0f0000, "r,R", 2 },
-{ "tbrr", 0x2c020000, 0xfc0f0000, "r,B", 2 },
-{ "trbr", 0x28030000, 0xfc0f0000, "b,R", 2 },
-{ "xcbr", 0x28020000, 0xfc0f0000, "b,B", 2 },
-{ "tbrbr", 0x28010000, 0xfc0f0000, "b,B", 2 },
-
-{ "trvv", 0x28050000, 0xfc0f0000, "v,V", 2 },
-{ "trvvn", 0x2c050000, 0xfc0f0000, "v,V", 2 },
-{ "trvvnd", 0x2c0d0000, 0xfc0f0000, "v,V", 2 },
-{ "trvab", 0x2c070000, 0xfc0f0000, "v,V", 2 },
-{ "trvabd", 0x2c0f0000, 0xfc0f0000, "v,V", 2 },
-{ "cmpv", 0x14060000, 0xfc0f0000, "v,V", 2 },
-{ "expv", 0x14070000, 0xfc0f0000, "v,V", 2 },
-{ "mrvvlt", 0x10030000, 0xfc0f0000, "v,V", 2 },
-{ "mrvvle", 0x10040000, 0xfc0f0000, "v,V", 2 },
-{ "mrvvgt", 0x14030000, 0xfc0f0000, "v,V", 2 },
-{ "mrvvge", 0x14040000, 0xfc0f0000, "v,V", 2 },
-{ "mrvveq", 0x10050000, 0xfc0f0000, "v,V", 2 },
-{ "mrvvne", 0x10050000, 0xfc0f0000, "v,V", 2 },
-{ "mrvrlt", 0x100d0000, 0xfc0f0000, "v,R", 2 },
-{ "mrvrle", 0x100e0000, 0xfc0f0000, "v,R", 2 },
-{ "mrvrgt", 0x140d0000, 0xfc0f0000, "v,R", 2 },
-{ "mrvrge", 0x140e0000, 0xfc0f0000, "v,R", 2 },
-{ "mrvreq", 0x100f0000, 0xfc0f0000, "v,R", 2 },
-{ "mrvrne", 0x140f0000, 0xfc0f0000, "v,R", 2 },
-{ "trvr", 0x140b0000, 0xfc0f0000, "r,V", 2 },
-{ "trrv", 0x140c0000, 0xfc0f0000, "v,R", 2 },
-
-{ "bu", 0x40000000, 0xff880000, "xOA,X", 4 },
-{ "bns", 0x70080000, 0xff880000, "xOA,X", 4 },
-{ "bnco", 0x70880000, 0xff880000, "xOA,X", 4 },
-{ "bge", 0x71080000, 0xff880000, "xOA,X", 4 },
-{ "bne", 0x71880000, 0xff880000, "xOA,X", 4 },
-{ "bunge", 0x72080000, 0xff880000, "xOA,X", 4 },
-{ "bunle", 0x72880000, 0xff880000, "xOA,X", 4 },
-{ "bgt", 0x73080000, 0xff880000, "xOA,X", 4 },
-{ "bnany", 0x73880000, 0xff880000, "xOA,X", 4 },
-{ "bs" , 0x70000000, 0xff880000, "xOA,X", 4 },
-{ "bco", 0x70800000, 0xff880000, "xOA,X", 4 },
-{ "blt", 0x71000000, 0xff880000, "xOA,X", 4 },
-{ "beq", 0x71800000, 0xff880000, "xOA,X", 4 },
-{ "buge", 0x72000000, 0xff880000, "xOA,X", 4 },
-{ "bult", 0x72800000, 0xff880000, "xOA,X", 4 },
-{ "ble", 0x73000000, 0xff880000, "xOA,X", 4 },
-{ "bany", 0x73800000, 0xff880000, "xOA,X", 4 },
-{ "brlnk", 0x44000000, 0xfc080000, "r,xOA,X", 4 },
-{ "bib", 0x48000000, 0xfc080000, "r,xOA,X", 4 },
-{ "bih", 0x48080000, 0xfc080000, "r,xOA,X", 4 },
-{ "biw", 0x4c000000, 0xfc080000, "r,xOA,X", 4 },
-{ "bid", 0x4c080000, 0xfc080000, "r,xOA,X", 4 },
-{ "bivb", 0x60000000, 0xfc080000, "r,xOA,X", 4 },
-{ "bivh", 0x60080000, 0xfc080000, "r,xOA,X", 4 },
-{ "bivw", 0x64000000, 0xfc080000, "r,xOA,X", 4 },
-{ "bivd", 0x64080000, 0xfc080000, "r,xOA,X", 4 },
-{ "bvsb", 0x68000000, 0xfc080000, "r,xOA,X", 4 },
-{ "bvsh", 0x68080000, 0xfc080000, "r,xOA,X", 4 },
-{ "bvsw", 0x6c000000, 0xfc080000, "r,xOA,X", 4 },
-{ "bvsd", 0x6c080000, 0xfc080000, "r,xOA,X", 4 },
-
-{ "camb", 0x80080000, 0xfc080000, "r,xOA,X", 4 },
-{ "camh", 0x80000001, 0xfc080001, "r,xOA,X", 4 },
-{ "camw", 0x80000000, 0xfc080000, "r,xOA,X", 4 },
-{ "camd", 0x80000002, 0xfc080002, "r,xOA,X", 4 },
-{ "car", 0x10000000, 0xfc0f0000, "r,R", 2 },
-{ "card", 0x14000000, 0xfc0f0000, "r,R", 2 },
-{ "ci", 0xf8050000, 0xfc7f0000, "r,I", 4 },
-{ "chkbnd", 0x5c080000, 0xfc080000, "r,xOA,X", 4 },
-
-{ "cavv", 0x10010000, 0xfc0f0000, "v,V", 2 },
-{ "cavr", 0x10020000, 0xfc0f0000, "v,R", 2 },
-{ "cavvd", 0x10090000, 0xfc0f0000, "v,V", 2 },
-{ "cavrd", 0x100b0000, 0xfc0f0000, "v,R", 2 },
-
-{ "anmb", 0x84080000, 0xfc080000, "r,xOA,X", 4 },
-{ "anmh", 0x84000001, 0xfc080001, "r,xOA,X", 4 },
-{ "anmw", 0x84000000, 0xfc080000, "r,xOA,X", 4 },
-{ "anmd", 0x84000002, 0xfc080002, "r,xOA,X", 4 },
-{ "anr", 0x04000000, 0xfc0f0000, "r,R", 2 },
-{ "ani", 0xf8080000, 0xfc7f0000, "r,I", 4 },
-{ "ormb", 0xb8080000, 0xfc080000, "r,xOA,X", 4 },
-{ "ormh", 0xb8000001, 0xfc080001, "r,xOA,X", 4 },
-{ "ormw", 0xb8000000, 0xfc080000, "r,xOA,X", 4 },
-{ "ormd", 0xb8000002, 0xfc080002, "r,xOA,X", 4 },
-{ "orr", 0x08000000, 0xfc0f0000, "r,R", 2 },
-{ "oi", 0xf8090000, 0xfc7f0000, "r,I", 4 },
-{ "eomb", 0x8c080000, 0xfc080000, "r,xOA,X", 4 },
-{ "eomh", 0x8c000001, 0xfc080001, "r,xOA,X", 4 },
-{ "eomw", 0x8c000000, 0xfc080000, "r,xOA,X", 4 },
-{ "eomd", 0x8c000002, 0xfc080002, "r,xOA,X", 4 },
-{ "eor", 0x0c000000, 0xfc0f0000, "r,R", 2 },
-{ "eoi", 0xf80a0000, 0xfc7f0000, "r,I", 4 },
-
-{ "anvv", 0x04010000, 0xfc0f0000, "v,V", 2 },
-{ "anvr", 0x04020000, 0xfc0f0000, "v,R", 2 },
-{ "orvv", 0x08010000, 0xfc0f0000, "v,V", 2 },
-{ "orvr", 0x08020000, 0xfc0f0000, "v,R", 2 },
-{ "eovv", 0x0c010000, 0xfc0f0000, "v,V", 2 },
-{ "eovr", 0x0c020000, 0xfc0f0000, "v,R", 2 },
-
-{ "sacz", 0x100c0000, 0xfc0f0000, "r,R", 2 },
-{ "sla", 0x1c400000, 0xfc600000, "r,S", 2 },
-{ "sll", 0x1c600000, 0xfc600000, "r,S", 2 },
-{ "slc", 0x24400000, 0xfc600000, "r,S", 2 },
-{ "slad", 0x20400000, 0xfc600000, "r,S", 2 },
-{ "slld", 0x20600000, 0xfc600000, "r,S", 2 },
-{ "sra", 0x1c000000, 0xfc600000, "r,S", 2 },
-{ "srl", 0x1c200000, 0xfc600000, "r,S", 2 },
-{ "src", 0x24000000, 0xfc600000, "r,S", 2 },
-{ "srad", 0x20000000, 0xfc600000, "r,S", 2 },
-{ "srld", 0x20200000, 0xfc600000, "r,S", 2 },
-{ "sda", 0x3c030000, 0xfc0f0000, "r,R", 2 },
-{ "sdl", 0x3c020000, 0xfc0f0000, "r,R", 2 },
-{ "sdc", 0x3c010000, 0xfc0f0000, "r,R", 2 },
-{ "sdad", 0x3c0b0000, 0xfc0f0000, "r,R", 2 },
-{ "sdld", 0x3c0a0000, 0xfc0f0000, "r,R", 2 },
-
-{ "svda", 0x3c070000, 0xfc0f0000, "v,R", 2 },
-{ "svdl", 0x3c060000, 0xfc0f0000, "v,R", 2 },
-{ "svdc", 0x3c050000, 0xfc0f0000, "v,R", 2 },
-{ "svdad", 0x3c0e0000, 0xfc0f0000, "v,R", 2 },
-{ "svdld", 0x3c0d0000, 0xfc0f0000, "v,R", 2 },
-
-{ "sbm", 0xac080000, 0xfc080000, "f,xOA,X", 4 },
-{ "zbm", 0xac000000, 0xfc080000, "f,xOA,X", 4 },
-{ "tbm", 0xa8080000, 0xfc080000, "f,xOA,X", 4 },
-{ "incmb", 0xa0000000, 0xfc080000, "xOA,X", 4 },
-{ "incmh", 0xa0080000, 0xfc080000, "xOA,X", 4 },
-{ "incmw", 0xa4000000, 0xfc080000, "xOA,X", 4 },
-{ "incmd", 0xa4080000, 0xfc080000, "xOA,X", 4 },
-{ "sbmd", 0x7c080000, 0xfc080000, "r,xOA,X", 4 },
-{ "zbmd", 0x7c000000, 0xfc080000, "r,xOA,X", 4 },
-{ "tbmd", 0x78080000, 0xfc080000, "r,xOA,X", 4 },
-
-{ "ssm", 0x9c080000, 0xfc080000, "f,xOA,X", 4 },
-{ "zsm", 0x9c000000, 0xfc080000, "f,xOA,X", 4 },
-{ "tsm", 0x98080000, 0xfc080000, "f,xOA,X", 4 },
-
-{ "admb", 0xc8080000, 0xfc080000, "r,xOA,X", 4 },
-{ "admh", 0xc8000001, 0xfc080001, "r,xOA,X", 4 },
-{ "admw", 0xc8000000, 0xfc080000, "r,xOA,X", 4 },
-{ "admd", 0xc8000002, 0xfc080002, "r,xOA,X", 4 },
-{ "adr", 0x38000000, 0xfc0f0000, "r,R", 2 },
-{ "armb", 0xe8080000, 0xfc080000, "r,xOA,X", 4 },
-{ "armh", 0xe8000001, 0xfc080001, "r,xOA,X", 4 },
-{ "armw", 0xe8000000, 0xfc080000, "r,xOA,X", 4 },
-{ "armd", 0xe8000002, 0xfc080002, "r,xOA,X", 4 },
-{ "adi", 0xf8010000, 0xfc0f0000, "r,I", 4 },
-{ "sumb", 0xcc080000, 0xfc080000, "r,xOA,X", 4 },
-{ "sumh", 0xcc000001, 0xfc080001, "r,xOA,X", 4 },
-{ "sumw", 0xcc000000, 0xfc080000, "r,xOA,X", 4 },
-{ "sumd", 0xcc000002, 0xfc080002, "r,xOA,X", 4 },
-{ "sur", 0x3c000000, 0xfc0f0000, "r,R", 2 },
-{ "sui", 0xf8020000, 0xfc0f0000, "r,I", 4 },
-{ "mpmb", 0xc0080000, 0xfc080000, "r,xOA,X", 4 },
-{ "mpmh", 0xc0000001, 0xfc080001, "r,xOA,X", 4 },
-{ "mpmw", 0xc0000000, 0xfc080000, "r,xOA,X", 4 },
-{ "mpr", 0x38020000, 0xfc0f0000, "r,R", 2 },
-{ "mprd", 0x3c0f0000, 0xfc0f0000, "r,R", 2 },
-{ "mpi", 0xf8030000, 0xfc0f0000, "r,I", 4 },
-{ "dvmb", 0xc4080000, 0xfc080000, "r,xOA,X", 4 },
-{ "dvmh", 0xc4000001, 0xfc080001, "r,xOA,X", 4 },
-{ "dvmw", 0xc4000000, 0xfc080000, "r,xOA,X", 4 },
-{ "dvr", 0x380a0000, 0xfc0f0000, "r,R", 2 },
-{ "dvi", 0xf8040000, 0xfc0f0000, "r,I", 4 },
-{ "exs", 0x38080000, 0xfc0f0000, "r,R", 2 },
-
-{ "advv", 0x30000000, 0xfc0f0000, "v,V", 2 },
-{ "advvd", 0x30080000, 0xfc0f0000, "v,V", 2 },
-{ "adrv", 0x34000000, 0xfc0f0000, "v,R", 2 },
-{ "adrvd", 0x34080000, 0xfc0f0000, "v,R", 2 },
-{ "suvv", 0x30010000, 0xfc0f0000, "v,V", 2 },
-{ "suvvd", 0x30090000, 0xfc0f0000, "v,V", 2 },
-{ "surv", 0x34010000, 0xfc0f0000, "v,R", 2 },
-{ "survd", 0x34090000, 0xfc0f0000, "v,R", 2 },
-{ "mpvv", 0x30020000, 0xfc0f0000, "v,V", 2 },
-{ "mprv", 0x34020000, 0xfc0f0000, "v,R", 2 },
-
-{ "adfw", 0xe0080000, 0xfc080000, "r,xOA,X", 4 },
-{ "adfd", 0xe0080002, 0xfc080002, "r,xOA,X", 4 },
-{ "adrfw", 0x38010000, 0xfc0f0000, "r,R", 2 },
-{ "adrfd", 0x38090000, 0xfc0f0000, "r,R", 2 },
-{ "surfw", 0xe0000000, 0xfc080000, "r,xOA,X", 4 },
-{ "surfd", 0xe0000002, 0xfc080002, "r,xOA,X", 4 },
-{ "surfw", 0x38030000, 0xfc0f0000, "r,R", 2 },
-{ "surfd", 0x380b0000, 0xfc0f0000, "r,R", 2 },
-{ "mpfw", 0xe4080000, 0xfc080000, "r,xOA,X", 4 },
-{ "mpfd", 0xe4080002, 0xfc080002, "r,xOA,X", 4 },
-{ "mprfw", 0x38060000, 0xfc0f0000, "r,R", 2 },
-{ "mprfd", 0x380e0000, 0xfc0f0000, "r,R", 2 },
-{ "rfw", 0xe4000000, 0xfc080000, "r,xOA,X", 4 },
-{ "rfd", 0xe4000002, 0xfc080002, "r,xOA,X", 4 },
-{ "rrfw", 0x0c0e0000, 0xfc0f0000, "r", 2 },
-{ "rrfd", 0x0c0f0000, 0xfc0f0000, "r", 2 },
-
-{ "advvfw", 0x30040000, 0xfc0f0000, "v,V", 2 },
-{ "advvfd", 0x300c0000, 0xfc0f0000, "v,V", 2 },
-{ "adrvfw", 0x34040000, 0xfc0f0000, "v,R", 2 },
-{ "adrvfd", 0x340c0000, 0xfc0f0000, "v,R", 2 },
-{ "suvvfw", 0x30050000, 0xfc0f0000, "v,V", 2 },
-{ "suvvfd", 0x300d0000, 0xfc0f0000, "v,V", 2 },
-{ "survfw", 0x34050000, 0xfc0f0000, "v,R", 2 },
-{ "survfd", 0x340d0000, 0xfc0f0000, "v,R", 2 },
-{ "mpvvfw", 0x30060000, 0xfc0f0000, "v,V", 2 },
-{ "mpvvfd", 0x300e0000, 0xfc0f0000, "v,V", 2 },
-{ "mprvfw", 0x34060000, 0xfc0f0000, "v,R", 2 },
-{ "mprvfd", 0x340e0000, 0xfc0f0000, "v,R", 2 },
-{ "rvfw", 0x30070000, 0xfc0f0000, "v", 2 },
-{ "rvfd", 0x300f0000, 0xfc0f0000, "v", 2 },
-
-{ "fltw", 0x38070000, 0xfc0f0000, "r,R", 2 },
-{ "fltd", 0x380f0000, 0xfc0f0000, "r,R", 2 },
-{ "fixw", 0x38050000, 0xfc0f0000, "r,R", 2 },
-{ "fixd", 0x380d0000, 0xfc0f0000, "r,R", 2 },
-{ "cfpds", 0x3c090000, 0xfc0f0000, "r,R", 2 },
-
-{ "fltvw", 0x080d0000, 0xfc0f0000, "v,V", 2 },
-{ "fltvd", 0x080f0000, 0xfc0f0000, "v,V", 2 },
-{ "fixvw", 0x080c0000, 0xfc0f0000, "v,V", 2 },
-{ "fixvd", 0x080e0000, 0xfc0f0000, "v,V", 2 },
-{ "cfpvds", 0x0c0d0000, 0xfc0f0000, "v,V", 2 },
-
-{ "orvrn", 0x000a0000, 0xfc0f0000, "r,V", 2 },
-{ "andvrn", 0x00080000, 0xfc0f0000, "r,V", 2 },
-{ "frsteq", 0x04090000, 0xfc0f0000, "r,V", 2 },
-{ "sigma", 0x0c080000, 0xfc0f0000, "r,V", 2 },
-{ "sigmad", 0x0c0a0000, 0xfc0f0000, "r,V", 2 },
-{ "sigmf", 0x08080000, 0xfc0f0000, "r,V", 2 },
-{ "sigmfd", 0x080a0000, 0xfc0f0000, "r,V", 2 },
-{ "prodf", 0x04080000, 0xfc0f0000, "r,V", 2 },
-{ "prodfd", 0x040a0000, 0xfc0f0000, "r,V", 2 },
-{ "maxv", 0x10080000, 0xfc0f0000, "r,V", 2 },
-{ "maxvd", 0x100a0000, 0xfc0f0000, "r,V", 2 },
-{ "minv", 0x14080000, 0xfc0f0000, "r,V", 2 },
-{ "minvd", 0x140a0000, 0xfc0f0000, "r,V", 2 },
-
-{ "lpsd", 0xf0000000, 0xfc080000, "xOA,X", 4 },
-{ "ldc", 0xf0080000, 0xfc080000, "xOA,X", 4 },
-{ "spm", 0x040c0000, 0xfc0f0000, "r", 2 },
-{ "rpm", 0x040d0000, 0xfc0f0000, "r", 2 },
-{ "tritr", 0x00070000, 0xfc0f0000, "r", 2 },
-{ "trrit", 0x00060000, 0xfc0f0000, "r", 2 },
-{ "rpswt", 0x04080000, 0xfc0f0000, "r", 2 },
-{ "exr", 0xf8070000, 0xfc0f0000, "", 4 },
-{ "halt", 0x00000000, 0xfc0f0000, "", 2 },
-{ "wait", 0x00010000, 0xfc0f0000, "", 2 },
-{ "nop", 0x00020000, 0xfc0f0000, "", 2 },
-{ "eiae", 0x00030000, 0xfc0f0000, "", 2 },
-{ "efae", 0x000d0000, 0xfc0f0000, "", 2 },
-{ "diae", 0x000e0000, 0xfc0f0000, "", 2 },
-{ "dfae", 0x000f0000, 0xfc0f0000, "", 2 },
-{ "spvc", 0xf8060000, 0xfc0f0000, "r,T,N", 4 },
-{ "rdsts", 0x00090000, 0xfc0f0000, "r", 2 },
-{ "setcpu", 0x000c0000, 0xfc0f0000, "r", 2 },
-{ "cmc", 0x000b0000, 0xfc0f0000, "r", 2 },
-{ "trrcu", 0x00040000, 0xfc0f0000, "r", 2 },
-{ "attnio", 0x00050000, 0xfc0f0000, "", 2 },
-{ "fudit", 0x28080000, 0xfc0f0000, "", 2 },
-{ "break", 0x28090000, 0xfc0f0000, "", 2 },
-{ "frzss", 0x280a0000, 0xfc0f0000, "", 2 },
-{ "ripi", 0x04040000, 0xfc0f0000, "r,R", 2 },
-{ "xcp", 0x04050000, 0xfc0f0000, "r", 2 },
-{ "block", 0x04060000, 0xfc0f0000, "", 2 },
-{ "unblock", 0x04070000, 0xfc0f0000, "", 2 },
-{ "trsc", 0x08060000, 0xfc0f0000, "r,R", 2 },
-{ "tscr", 0x08070000, 0xfc0f0000, "r,R", 2 },
-{ "fq", 0x04080000, 0xfc0f0000, "r", 2 },
-{ "flupte", 0x2c080000, 0xfc0f0000, "r", 2 },
-{ "rviu", 0x040f0000, 0xfc0f0000, "", 2 },
-{ "ldel", 0x280c0000, 0xfc0f0000, "r,R", 2 },
-{ "ldu", 0x280d0000, 0xfc0f0000, "r,R", 2 },
-{ "stdecc", 0x280b0000, 0xfc0f0000, "r,R", 2 },
-{ "trpc", 0x08040000, 0xfc0f0000, "r", 2 },
-{ "tpcr", 0x08050000, 0xfc0f0000, "r", 2 },
-{ "ghalt", 0x0c050000, 0xfc0f0000, "r", 2 },
-{ "grun", 0x0c040000, 0xfc0f0000, "", 2 },
-{ "tmpr", 0x2c0a0000, 0xfc0f0000, "r,R", 2 },
-{ "trmp", 0x2c0b0000, 0xfc0f0000, "r,R", 2 },
-
-{ "trrve", 0x28060000, 0xfc0f0000, "r", 2 },
-{ "trver", 0x28070000, 0xfc0f0000, "r", 2 },
-{ "trvlr", 0x280f0000, 0xfc0f0000, "r", 2 },
-
-{ "linkfl", 0x18000000, 0xfc0f0000, "r,R", 2 },
-{ "linkbl", 0x18020000, 0xfc0f0000, "r,R", 2 },
-{ "linkfp", 0x18010000, 0xfc0f0000, "r,R", 2 },
-{ "linkbp", 0x18030000, 0xfc0f0000, "r,R", 2 },
-{ "linkpl", 0x18040000, 0xfc0f0000, "r,R", 2 },
-{ "ulinkl", 0x18080000, 0xfc0f0000, "r,R", 2 },
-{ "ulinkp", 0x18090000, 0xfc0f0000, "r,R", 2 },
-{ "ulinktl", 0x180a0000, 0xfc0f0000, "r,R", 2 },
-{ "ulinktp", 0x180b0000, 0xfc0f0000, "r,R", 2 },
-};
-
-int numopcodes = sizeof(gld_opcodes) / sizeof(gld_opcodes[0]);
-
-struct gld_opcode *endop = gld_opcodes + sizeof(gld_opcodes) /
- sizeof(gld_opcodes[0]);
diff --git a/include/opcode/ns32k.h b/include/opcode/ns32k.h
deleted file mode 100644
index 5cb2f97..0000000
--- a/include/opcode/ns32k.h
+++ /dev/null
@@ -1,487 +0,0 @@
-/* ns32k-opcode.h -- Opcode table for National Semi 32k processor
- Copyright 1987, 1991, 1994, 2002 Free Software Foundation, Inc.
-
-This file is part of GAS, the GNU Assembler.
-
-GAS is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
-
-GAS is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GAS; see the file COPYING. If not, write to
-the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-
-#ifdef SEQUENT_COMPATABILITY
-#define DEF_MODEC 20
-#define DEF_MODEL 21
-#endif
-
-#ifndef DEF_MODEC
-#define DEF_MODEC 20
-#endif
-
-#ifndef DEF_MODEL
-#define DEF_MODEL 20
-#endif
-/*
- After deciding the instruction entry (via hash.c) the instruction parser
- will try to match the operands after the instruction to the required set
- given in the entry operandfield. Every operand will result in a change in
- the opcode or the addition of data to the opcode.
- The operands in the source instruction are checked for inconsistent
- semantics.
-
- F : 32 bit float general form
- L : 64 bit float "
- B : byte "
- W : word "
- D : double-word "
- A : double-word gen-address-form ie no regs, no immediate
- I : integer writeable gen int except immediate (A + reg)
- Z : floating writeable gen float except immediate (Z + freg)
- d : displacement
- b : displacement - pc relative addressing acb
- p : displacement - pc relative addressing br bcond bsr cxp
- q : quick
- i : immediate (8 bits)
- This is not a standard ns32k operandtype, it is used to build
- instructions like svc arg1,arg2
- Svc is the instruction SuperVisorCall and is sometimes used to
- call OS-routines from usermode. Some args might be handy!
- r : register number (3 bits)
- O : setcfg instruction optionslist
- C : cinv instruction optionslist
- S : stringinstruction optionslist
- U : registerlist save,enter
- u : registerlist restore,exit
- M : mmu register
- P : cpu register
- g : 3:rd operand of inss or exts instruction
- G : 4:th operand of inss or exts instruction
- Those operands are encoded in the same byte.
- This byte is placed last in the instruction.
- f : operand of sfsr
- H : sequent-hack for bsr (Warning)
-
-column 1 instructions
- 2 number of bits in opcode.
- 3 number of bits in opcode explicitly
- determined by the instruction type.
- 4 opcodeseed, the number we build our opcode
- from.
- 5 operandtypes, used by operandparser.
- 6 size in bytes of immediate
-*/
-struct ns32k_opcode {
- const char *name;
- unsigned char opcode_id_size; /* not used by the assembler */
- unsigned char opcode_size;
- unsigned long opcode_seed;
- const char *operands;
- unsigned char im_size; /* not used by dissassembler */
- const char *default_args; /* default to those args when none given */
- char default_modec; /* default to this addr-mode when ambigous
- ie when the argument of a general addr-mode
- is a plain constant */
- char default_model; /* is a plain label */
-};
-
-#ifdef comment
-/* This section was from the gdb version of this file. */
-
-#ifndef ns32k_opcodeT
-#define ns32k_opcodeT int
-#endif /* no ns32k_opcodeT */
-
-struct not_wot /* ns32k opcode table: wot to do with this */
- /* particular opcode */
-{
- int obits; /* number of opcode bits */
- int ibits; /* number of instruction bits */
- ns32k_opcodeT code; /* op-code (may be > 8 bits!) */
- const char *args; /* how to compile said opcode */
-};
-
-struct not /* ns32k opcode text */
-{
- const char *name; /* opcode name: lowercase string [key] */
- struct not_wot detail; /* rest of opcode table [datum] */
-};
-
-/* Instructions look like this:
-
- basic instruction--1, 2, or 3 bytes
- index byte for operand A, if operand A is indexed--1 byte
- index byte for operand B, if operand B is indexed--1 byte
- addressing extension for operand A
- addressing extension for operand B
- implied operands
-
- Operand A is the operand listed first in the following opcode table.
- Operand B is the operand listed second in the following opcode table.
- All instructions have at most 2 general operands, so this is enough.
- The implied operands are associated with operands other than A and B.
-
- Each operand has a digit and a letter.
-
- The digit gives the position in the assembly language. The letter,
- one of the following, tells us what kind of operand it is. */
-
-/* F : 32 bit float
- * L : 64 bit float
- * B : byte
- * W : word
- * D : double-word
- * I : integer not immediate
- * Z : floating not immediate
- * d : displacement
- * q : quick
- * i : immediate (8 bits)
- * r : register number (3 bits)
- * p : displacement - pc relative addressing
-*/
-
-
-#endif /* comment */
-
-static const struct ns32k_opcode ns32k_opcodes[]=
-{
- { "absf", 14,24, 0x35be, "1F2Z", 4, "", DEF_MODEC,DEF_MODEL },
- { "absl", 14,24, 0x34be, "1L2Z", 8, "", DEF_MODEC,DEF_MODEL },
- { "absb", 14,24, 0x304e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "absw", 14,24, 0x314e, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "absd", 14,24, 0x334e, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "acbb", 7,16, 0x4c, "2I1q3p", 1, "", DEF_MODEC,DEF_MODEL },
- { "acbw", 7,16, 0x4d, "2I1q3p", 2, "", DEF_MODEC,DEF_MODEL },
- { "acbd", 7,16, 0x4f, "2I1q3p", 4, "", DEF_MODEC,DEF_MODEL },
- { "addf", 14,24, 0x01be, "1F2Z", 4, "", DEF_MODEC,DEF_MODEL },
- { "addl", 14,24, 0x00be, "1L2Z", 8, "", DEF_MODEC,DEF_MODEL },
- { "addb", 6,16, 0x00, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "addw", 6,16, 0x01, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "addd", 6,16, 0x03, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "addcb", 6,16, 0x10, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "addcw", 6,16, 0x11, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "addcd", 6,16, 0x13, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "addpb", 14,24, 0x3c4e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "addpw", 14,24, 0x3d4e, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "addpd", 14,24, 0x3f4e, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "addqb", 7,16, 0x0c, "2I1q", 1, "", DEF_MODEC,DEF_MODEL },
- { "addqw", 7,16, 0x0d, "2I1q", 2, "", DEF_MODEC,DEF_MODEL },
- { "addqd", 7,16, 0x0f, "2I1q", 4, "", DEF_MODEC,DEF_MODEL },
- { "addr", 6,16, 0x27, "1A2I", 4, "", 21,21 },
- { "adjspb", 11,16, 0x057c, "1B", 1, "", DEF_MODEC,DEF_MODEL },
- { "adjspw", 11,16, 0x057d, "1W", 2, "", DEF_MODEC,DEF_MODEL },
- { "adjspd", 11,16, 0x057f, "1D", 4, "", DEF_MODEC,DEF_MODEL },
- { "andb", 6,16, 0x28, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "andw", 6,16, 0x29, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "andd", 6,16, 0x2b, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "ashb", 14,24, 0x044e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "ashw", 14,24, 0x054e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "ashd", 14,24, 0x074e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "beq", 8,8, 0x0a, "1p", 0, "", 21,21 },
- { "bne", 8,8, 0x1a, "1p", 0, "", 21,21 },
- { "bcs", 8,8, 0x2a, "1p", 0, "", 21,21 },
- { "bcc", 8,8, 0x3a, "1p", 0, "", 21,21 },
- { "bhi", 8,8, 0x4a, "1p", 0, "", 21,21 },
- { "bls", 8,8, 0x5a, "1p", 0, "", 21,21 },
- { "bgt", 8,8, 0x6a, "1p", 0, "", 21,21 },
- { "ble", 8,8, 0x7a, "1p", 0, "", 21,21 },
- { "bfs", 8,8, 0x8a, "1p", 0, "", 21,21 },
- { "bfc", 8,8, 0x9a, "1p", 0, "", 21,21 },
- { "blo", 8,8, 0xaa, "1p", 0, "", 21,21 },
- { "bhs", 8,8, 0xba, "1p", 0, "", 21,21 },
- { "blt", 8,8, 0xca, "1p", 0, "", 21,21 },
- { "bge", 8,8, 0xda, "1p", 0, "", 21,21 },
- { "but", 8,8, 0xea, "1p", 0, "", 21,21 },
- { "buf", 8,8, 0xfa, "1p", 0, "", 21,21 },
- { "bicb", 6,16, 0x08, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "bicw", 6,16, 0x09, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "bicd", 6,16, 0x0b, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "bicpsrb", 11,16, 0x17c, "1B", 1, "", DEF_MODEC,DEF_MODEL },
- { "bicpsrw", 11,16, 0x17d, "1W", 2, "", DEF_MODEC,DEF_MODEL },
- { "bispsrb", 11,16, 0x37c, "1B", 1, "", DEF_MODEC,DEF_MODEL },
- { "bispsrw", 11,16, 0x37d, "1W", 2, "", DEF_MODEC,DEF_MODEL },
- { "bpt", 8,8, 0xf2, "", 0, "", DEF_MODEC,DEF_MODEL },
- { "br", 8,8, 0xea, "1p", 0, "", 21,21 },
-#ifdef SEQUENT_COMPATABILITY
- { "bsr", 8,8, 0x02, "1H", 0, "", 21,21 },
-#else
- { "bsr", 8,8, 0x02, "1p", 0, "", 21,21 },
-#endif
- { "caseb", 11,16, 0x77c, "1B", 1, "", DEF_MODEC,DEF_MODEL },
- { "casew", 11,16, 0x77d, "1W", 2, "", DEF_MODEC,DEF_MODEL },
- { "cased", 11,16, 0x77f, "1D", 4, "", DEF_MODEC,DEF_MODEL },
- { "cbitb", 14,24, 0x084e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "cbitw", 14,24, 0x094e, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "cbitd", 14,24, 0x0b4e, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "cbitib", 14,24, 0x0c4e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "cbitiw", 14,24, 0x0d4e, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "cbitid", 14,24, 0x0f4e, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "checkb", 11,24, 0x0ee, "2A3B1r", 1, "", DEF_MODEC,DEF_MODEL },
- { "checkw", 11,24, 0x1ee, "2A3W1r", 2, "", DEF_MODEC,DEF_MODEL },
- { "checkd", 11,24, 0x3ee, "2A3D1r", 4, "", DEF_MODEC,DEF_MODEL },
- { "cinv", 14,24, 0x271e, "2D1C", 4, "", DEF_MODEC,DEF_MODEL },
- { "cmpf", 14,24, 0x09be, "1F2F", 4, "", DEF_MODEC,DEF_MODEL },
- { "cmpl", 14,24, 0x08be, "1L2L", 8, "", DEF_MODEC,DEF_MODEL },
- { "cmpb", 6,16, 0x04, "1B2B", 1, "", DEF_MODEC,DEF_MODEL },
- { "cmpw", 6,16, 0x05, "1W2W", 2, "", DEF_MODEC,DEF_MODEL },
- { "cmpd", 6,16, 0x07, "1D2D", 4, "", DEF_MODEC,DEF_MODEL },
- { "cmpmb", 14,24, 0x04ce, "1A2A3b", 1, "", DEF_MODEC,DEF_MODEL },
- { "cmpmw", 14,24, 0x05ce, "1A2A3b", 2, "", DEF_MODEC,DEF_MODEL },
- { "cmpmd", 14,24, 0x07ce, "1A2A3b", 4, "", DEF_MODEC,DEF_MODEL },
- { "cmpqb", 7,16, 0x1c, "2B1q", 1, "", DEF_MODEC,DEF_MODEL },
- { "cmpqw", 7,16, 0x1d, "2W1q", 2, "", DEF_MODEC,DEF_MODEL },
- { "cmpqd", 7,16, 0x1f, "2D1q", 4, "", DEF_MODEC,DEF_MODEL },
- { "cmpsb", 16,24, 0x040e, "1S", 0, "[]", DEF_MODEC,DEF_MODEL },
- { "cmpsw", 16,24, 0x050e, "1S", 0, "[]", DEF_MODEC,DEF_MODEL },
- { "cmpsd", 16,24, 0x070e, "1S", 0, "[]", DEF_MODEC,DEF_MODEL },
- { "cmpst", 16,24, 0x840e, "1S", 0, "[]", DEF_MODEC,DEF_MODEL },
- { "comb", 14,24, 0x344e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "comw", 14,24, 0x354e, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "comd", 14,24, 0x374e, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "cvtp", 11,24, 0x036e, "2A3D1r", 4, "", DEF_MODEC,DEF_MODEL },
- { "cxp", 8,8, 0x22, "1p", 0, "", 21,21 },
- { "cxpd", 11,16, 0x07f, "1A", 4, "", DEF_MODEC,DEF_MODEL },
- { "deib", 14,24, 0x2cce, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "deiw", 14,24, 0x2dce, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "deid", 14,24, 0x2fce, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "dia", 8,8, 0xc2, "", 1, "", DEF_MODEC,DEF_MODEL },
- { "divf", 14,24, 0x21be, "1F2Z", 4, "", DEF_MODEC,DEF_MODEL },
- { "divl", 14,24, 0x20be, "1L2Z", 8, "", DEF_MODEC,DEF_MODEL },
- { "divb", 14,24, 0x3cce, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "divw", 14,24, 0x3dce, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "divd", 14,24, 0x3fce, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "enter", 8,8, 0x82, "1U2d", 0, "", DEF_MODEC,DEF_MODEL },
- { "exit", 8,8, 0x92, "1u", 0, "", DEF_MODEC,DEF_MODEL },
- { "extb", 11,24, 0x02e, "2I3B1r4d", 1, "", DEF_MODEC,DEF_MODEL },
- { "extw", 11,24, 0x12e, "2I3W1r4d", 2, "", DEF_MODEC,DEF_MODEL },
- { "extd", 11,24, 0x32e, "2I3D1r4d", 4, "", DEF_MODEC,DEF_MODEL },
- { "extsb", 14,24, 0x0cce, "1I2I4G3g", 1, "", DEF_MODEC,DEF_MODEL },
- { "extsw", 14,24, 0x0dce, "1I2I4G3g", 2, "", DEF_MODEC,DEF_MODEL },
- { "extsd", 14,24, 0x0fce, "1I2I4G3g", 4, "", DEF_MODEC,DEF_MODEL },
- { "ffsb", 14,24, 0x046e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "ffsw", 14,24, 0x056e, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "ffsd", 14,24, 0x076e, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "flag", 8,8, 0xd2, "", 0, "", DEF_MODEC,DEF_MODEL },
- { "floorfb", 14,24, 0x3c3e, "1F2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "floorfw", 14,24, 0x3d3e, "1F2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "floorfd", 14,24, 0x3f3e, "1F2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "floorlb", 14,24, 0x383e, "1L2I", 8, "", DEF_MODEC,DEF_MODEL },
- { "floorlw", 14,24, 0x393e, "1L2I", 8, "", DEF_MODEC,DEF_MODEL },
- { "floorld", 14,24, 0x3b3e, "1L2I", 8, "", DEF_MODEC,DEF_MODEL },
- { "ibitb", 14,24, 0x384e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "ibitw", 14,24, 0x394e, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "ibitd", 14,24, 0x3b4e, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "indexb", 11,24, 0x42e, "2B3B1r", 1, "", DEF_MODEC,DEF_MODEL },
- { "indexw", 11,24, 0x52e, "2W3W1r", 2, "", DEF_MODEC,DEF_MODEL },
- { "indexd", 11,24, 0x72e, "2D3D1r", 4, "", DEF_MODEC,DEF_MODEL },
- { "insb", 11,24, 0x0ae, "2B3I1r4d", 1, "", DEF_MODEC,DEF_MODEL },
- { "insw", 11,24, 0x1ae, "2W3I1r4d", 2, "", DEF_MODEC,DEF_MODEL },
- { "insd", 11,24, 0x3ae, "2D3I1r4d", 4, "", DEF_MODEC,DEF_MODEL },
- { "inssb", 14,24, 0x08ce, "1B2I4G3g", 1, "", DEF_MODEC,DEF_MODEL },
- { "inssw", 14,24, 0x09ce, "1W2I4G3g", 2, "", DEF_MODEC,DEF_MODEL },
- { "inssd", 14,24, 0x0bce, "1D2I4G3g", 4, "", DEF_MODEC,DEF_MODEL },
- { "jsr", 11,16, 0x67f, "1A", 4, "", 21,21 },
- { "jump", 11,16, 0x27f, "1A", 4, "", 21,21 },
- { "lfsr", 19,24, 0x00f3e,"1D", 4, "", DEF_MODEC,DEF_MODEL },
- { "lmr", 15,24, 0x0b1e, "2D1M", 4, "", DEF_MODEC,DEF_MODEL },
- { "lprb", 7,16, 0x6c, "2B1P", 1, "", DEF_MODEC,DEF_MODEL },
- { "lprw", 7,16, 0x6d, "2W1P", 2, "", DEF_MODEC,DEF_MODEL },
- { "lprd", 7,16, 0x6f, "2D1P", 4, "", DEF_MODEC,DEF_MODEL },
- { "lshb", 14,24, 0x144e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "lshw", 14,24, 0x154e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "lshd", 14,24, 0x174e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "meib", 14,24, 0x24ce, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "meiw", 14,24, 0x25ce, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "meid", 14,24, 0x27ce, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "modb", 14,24, 0x38ce, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "modw", 14,24, 0x39ce, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "modd", 14,24, 0x3bce, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "movf", 14,24, 0x05be, "1F2Z", 4, "", DEF_MODEC,DEF_MODEL },
- { "movl", 14,24, 0x04be, "1L2Z", 8, "", DEF_MODEC,DEF_MODEL },
- { "movb", 6,16, 0x14, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "movw", 6,16, 0x15, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "movd", 6,16, 0x17, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "movbf", 14,24, 0x043e, "1B2Z", 1, "", DEF_MODEC,DEF_MODEL },
- { "movwf", 14,24, 0x053e, "1W2Z", 2, "", DEF_MODEC,DEF_MODEL },
- { "movdf", 14,24, 0x073e, "1D2Z", 4, "", DEF_MODEC,DEF_MODEL },
- { "movbl", 14,24, 0x003e, "1B2Z", 1, "", DEF_MODEC,DEF_MODEL },
- { "movwl", 14,24, 0x013e, "1W2Z", 2, "", DEF_MODEC,DEF_MODEL },
- { "movdl", 14,24, 0x033e, "1D2Z", 4, "", DEF_MODEC,DEF_MODEL },
- { "movfl", 14,24, 0x1b3e, "1F2Z", 4, "", DEF_MODEC,DEF_MODEL },
- { "movlf", 14,24, 0x163e, "1L2Z", 8, "", DEF_MODEC,DEF_MODEL },
- { "movmb", 14,24, 0x00ce, "1A2A3b", 1, "", DEF_MODEC,DEF_MODEL },
- { "movmw", 14,24, 0x01ce, "1A2A3b", 2, "", DEF_MODEC,DEF_MODEL },
- { "movmd", 14,24, 0x03ce, "1A2A3b", 4, "", DEF_MODEC,DEF_MODEL },
- { "movqb", 7,16, 0x5c, "2I1q", 1, "", DEF_MODEC,DEF_MODEL },
- { "movqw", 7,16, 0x5d, "2I1q", 2, "", DEF_MODEC,DEF_MODEL },
- { "movqd", 7,16, 0x5f, "2I1q", 4, "", DEF_MODEC,DEF_MODEL },
- { "movsb", 16,24, 0x000e, "1S", 0, "[]", DEF_MODEC,DEF_MODEL },
- { "movsw", 16,24, 0x010e, "1S", 0, "[]", DEF_MODEC,DEF_MODEL },
- { "movsd", 16,24, 0x030e, "1S", 0, "[]", DEF_MODEC,DEF_MODEL },
- { "movst", 16,24, 0x800e, "1S", 0, "[]", DEF_MODEC,DEF_MODEL },
- { "movsub", 14,24, 0x0cae, "1A2A", 1, "", DEF_MODEC,DEF_MODEL },
- { "movsuw", 14,24, 0x0dae, "1A2A", 2, "", DEF_MODEC,DEF_MODEL },
- { "movsud", 14,24, 0x0fae, "1A2A", 4, "", DEF_MODEC,DEF_MODEL },
- { "movusb", 14,24, 0x1cae, "1A2A", 1, "", DEF_MODEC,DEF_MODEL },
- { "movusw", 14,24, 0x1dae, "1A2A", 2, "", DEF_MODEC,DEF_MODEL },
- { "movusd", 14,24, 0x1fae, "1A2A", 4, "", DEF_MODEC,DEF_MODEL },
- { "movxbd", 14,24, 0x1cce, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "movxwd", 14,24, 0x1dce, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "movxbw", 14,24, 0x10ce, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "movzbd", 14,24, 0x18ce, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "movzwd", 14,24, 0x19ce, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "movzbw", 14,24, 0x14ce, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "mulf", 14,24, 0x31be, "1F2Z", 4, "", DEF_MODEC,DEF_MODEL },
- { "mull", 14,24, 0x30be, "1L2Z", 8, "", DEF_MODEC,DEF_MODEL },
- { "mulb", 14,24, 0x20ce, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "mulw", 14,24, 0x21ce, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "muld", 14,24, 0x23ce, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "negf", 14,24, 0x15be, "1F2Z", 4, "", DEF_MODEC,DEF_MODEL },
- { "negl", 14,24, 0x14be, "1L2Z", 8, "", DEF_MODEC,DEF_MODEL },
- { "negb", 14,24, 0x204e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "negw", 14,24, 0x214e, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "negd", 14,24, 0x234e, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "nop", 8,8, 0xa2, "", 0, "", DEF_MODEC,DEF_MODEL },
- { "notb", 14,24, 0x244e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "notw", 14,24, 0x254e, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "notd", 14,24, 0x274e, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "orb", 6,16, 0x18, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "orw", 6,16, 0x19, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "ord", 6,16, 0x1b, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "quob", 14,24, 0x30ce, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "quow", 14,24, 0x31ce, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "quod", 14,24, 0x33ce, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "rdval", 19,24, 0x0031e,"1A", 4, "", DEF_MODEC,DEF_MODEL },
- { "remb", 14,24, 0x34ce, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "remw", 14,24, 0x35ce, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "remd", 14,24, 0x37ce, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "restore", 8,8, 0x72, "1u", 0, "", DEF_MODEC,DEF_MODEL },
- { "ret", 8,8, 0x12, "1d", 0, "", DEF_MODEC,DEF_MODEL },
- { "reti", 8,8, 0x52, "", 0, "", DEF_MODEC,DEF_MODEL },
- { "rett", 8,8, 0x42, "1d", 0, "", DEF_MODEC,DEF_MODEL },
- { "rotb", 14,24, 0x004e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "rotw", 14,24, 0x014e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "rotd", 14,24, 0x034e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "roundfb", 14,24, 0x243e, "1F2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "roundfw", 14,24, 0x253e, "1F2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "roundfd", 14,24, 0x273e, "1F2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "roundlb", 14,24, 0x203e, "1L2I", 8, "", DEF_MODEC,DEF_MODEL },
- { "roundlw", 14,24, 0x213e, "1L2I", 8, "", DEF_MODEC,DEF_MODEL },
- { "roundld", 14,24, 0x233e, "1L2I", 8, "", DEF_MODEC,DEF_MODEL },
- { "rxp", 8,8, 0x32, "1d", 0, "", DEF_MODEC,DEF_MODEL },
- { "seqb", 11,16, 0x3c, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "seqw", 11,16, 0x3d, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "seqd", 11,16, 0x3f, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "sneb", 11,16, 0xbc, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "snew", 11,16, 0xbd, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "sned", 11,16, 0xbf, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "scsb", 11,16, 0x13c, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "scsw", 11,16, 0x13d, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "scsd", 11,16, 0x13f, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "sccb", 11,16, 0x1bc, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "sccw", 11,16, 0x1bd, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "sccd", 11,16, 0x1bf, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "shib", 11,16, 0x23c, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "shiw", 11,16, 0x23d, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "shid", 11,16, 0x23f, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "slsb", 11,16, 0x2bc, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "slsw", 11,16, 0x2bd, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "slsd", 11,16, 0x2bf, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "sgtb", 11,16, 0x33c, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "sgtw", 11,16, 0x33d, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "sgtd", 11,16, 0x33f, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "sleb", 11,16, 0x3bc, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "slew", 11,16, 0x3bd, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "sled", 11,16, 0x3bf, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "sfsb", 11,16, 0x43c, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "sfsw", 11,16, 0x43d, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "sfsd", 11,16, 0x43f, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "sfcb", 11,16, 0x4bc, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "sfcw", 11,16, 0x4bd, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "sfcd", 11,16, 0x4bf, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "slob", 11,16, 0x53c, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "slow", 11,16, 0x53d, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "slod", 11,16, 0x53f, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "shsb", 11,16, 0x5bc, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "shsw", 11,16, 0x5bd, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "shsd", 11,16, 0x5bf, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "sltb", 11,16, 0x63c, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "sltw", 11,16, 0x63d, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "sltd", 11,16, 0x63f, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "sgeb", 11,16, 0x6bc, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "sgew", 11,16, 0x6bd, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "sged", 11,16, 0x6bf, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "sutb", 11,16, 0x73c, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "sutw", 11,16, 0x73d, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "sutd", 11,16, 0x73f, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "sufb", 11,16, 0x7bc, "1B", 0, "", DEF_MODEC,DEF_MODEL },
- { "sufw", 11,16, 0x7bd, "1W", 0, "", DEF_MODEC,DEF_MODEL },
- { "sufd", 11,16, 0x7bf, "1D", 0, "", DEF_MODEC,DEF_MODEL },
- { "save", 8,8, 0x62, "1U", 0, "", DEF_MODEC,DEF_MODEL },
- { "sbitb", 14,24, 0x184e, "1B2A", 1, "", DEF_MODEC,DEF_MODEL },
- { "sbitw", 14,24, 0x194e, "1W2A", 2, "", DEF_MODEC,DEF_MODEL },
- { "sbitd", 14,24, 0x1b4e, "1D2A", 4, "", DEF_MODEC,DEF_MODEL },
- { "sbitib", 14,24, 0x1c4e, "1B2A", 1, "", DEF_MODEC,DEF_MODEL },
- { "sbitiw", 14,24, 0x1d4e, "1W2A", 2, "", DEF_MODEC,DEF_MODEL },
- { "sbitid", 14,24, 0x1f4e, "1D2A", 4, "", DEF_MODEC,DEF_MODEL },
- { "setcfg", 15,24, 0x0b0e, "1O", 0, "", DEF_MODEC,DEF_MODEL },
- { "sfsr", 14,24, 0x373e, "1f", 0, "", DEF_MODEC,DEF_MODEL },
- { "skpsb", 16,24, 0x0c0e, "1S", 0, "[]", DEF_MODEC,DEF_MODEL },
- { "skpsw", 16,24, 0x0d0e, "1S", 0, "[]", DEF_MODEC,DEF_MODEL },
- { "skpsd", 16,24, 0x0f0e, "1S", 0, "[]", DEF_MODEC,DEF_MODEL },
- { "skpst", 16,24, 0x8c0e, "1S", 0, "[]", DEF_MODEC,DEF_MODEL },
- { "smr", 15,24, 0x0f1e, "2I1M", 4, "", DEF_MODEC,DEF_MODEL },
- { "sprb", 7,16, 0x2c, "2I1P", 1, "", DEF_MODEC,DEF_MODEL },
- { "sprw", 7,16, 0x2d, "2I1P", 2, "", DEF_MODEC,DEF_MODEL },
- { "sprd", 7,16, 0x2f, "2I1P", 4, "", DEF_MODEC,DEF_MODEL },
- { "subf", 14,24, 0x11be, "1F2Z", 4, "", DEF_MODEC,DEF_MODEL },
- { "subl", 14,24, 0x10be, "1L2Z", 8, "", DEF_MODEC,DEF_MODEL },
- { "subb", 6,16, 0x20, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "subw", 6,16, 0x21, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "subd", 6,16, 0x23, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "subcb", 6,16, 0x30, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "subcw", 6,16, 0x31, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "subcd", 6,16, 0x33, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "subpb", 14,24, 0x2c4e, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "subpw", 14,24, 0x2d4e, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "subpd", 14,24, 0x2f4e, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
-#ifdef NS32K_SVC_IMMED_OPERANDS
- { "svc", 8,8, 0xe2, "2i1i", 1, "", DEF_MODEC,DEF_MODEL }, /* not really, but some unix uses it */
-#else
- { "svc", 8,8, 0xe2, "", 0, "", DEF_MODEC,DEF_MODEL },
-#endif
- { "tbitb", 6,16, 0x34, "1B2A", 1, "", DEF_MODEC,DEF_MODEL },
- { "tbitw", 6,16, 0x35, "1W2A", 2, "", DEF_MODEC,DEF_MODEL },
- { "tbitd", 6,16, 0x37, "1D2A", 4, "", DEF_MODEC,DEF_MODEL },
- { "truncfb", 14,24, 0x2c3e, "1F2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "truncfw", 14,24, 0x2d3e, "1F2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "truncfd", 14,24, 0x2f3e, "1F2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "trunclb", 14,24, 0x283e, "1L2I", 8, "", DEF_MODEC,DEF_MODEL },
- { "trunclw", 14,24, 0x293e, "1L2I", 8, "", DEF_MODEC,DEF_MODEL },
- { "truncld", 14,24, 0x2b3e, "1L2I", 8, "", DEF_MODEC,DEF_MODEL },
- { "wait", 8,8, 0xb2, "", 0, "", DEF_MODEC,DEF_MODEL },
- { "wrval", 19,24, 0x0071e,"1A", 0, "", DEF_MODEC,DEF_MODEL },
- { "xorb", 6,16, 0x38, "1B2I", 1, "", DEF_MODEC,DEF_MODEL },
- { "xorw", 6,16, 0x39, "1W2I", 2, "", DEF_MODEC,DEF_MODEL },
- { "xord", 6,16, 0x3b, "1D2I", 4, "", DEF_MODEC,DEF_MODEL },
- { "dotf", 14,24, 0x0dfe, "1F2F", 4, "", DEF_MODEC,DEF_MODEL },
- { "dotl", 14,24, 0x0cfe, "1L2L", 8, "", DEF_MODEC,DEF_MODEL },
- { "logbf", 14,24, 0x15fe, "1F2Z", 4, "", DEF_MODEC,DEF_MODEL },
- { "logbl", 14,24, 0x14fe, "1L2Z", 8, "", DEF_MODEC,DEF_MODEL },
- { "polyf", 14,24, 0x09fe, "1F2F", 4, "", DEF_MODEC,DEF_MODEL },
- { "polyl", 14,24, 0x08fe, "1L2L", 8, "", DEF_MODEC,DEF_MODEL },
- { "scalbf", 14,24, 0x11fe, "1F2Z", 4, "", DEF_MODEC,DEF_MODEL },
- { "scalbl", 14,24, 0x10fe, "1L2Z", 8, "", DEF_MODEC,DEF_MODEL },
-};
-
-#define MAX_ARGS 4
-#define ARG_LEN 50
-
diff --git a/include/opcode/or32.h b/include/opcode/or32.h
deleted file mode 100644
index 3412b22..0000000
--- a/include/opcode/or32.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/* Table of opcodes for the OpenRISC 1000 ISA.
- Copyright 2002, 2003 Free Software Foundation, Inc.
- Contributed by Damjan Lampret (lampret@opencores.org).
-
- This file is part of or1k_gen_isa, or1ksim, GDB and GAS.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* We treat all letters the same in encode/decode routines so
- we need to assign some characteristics to them like signess etc. */
-
-#ifndef OR32_H_ISA
-#define OR32_H_ISA
-
-#define NUM_UNSIGNED (0)
-#define NUM_SIGNED (1)
-
-#define MAX_GPRS 32
-#define PAGE_SIZE 4096
-#undef __HALF_WORD_INSN__
-
-#define OPERAND_DELIM (',')
-
-#define OR32_IF_DELAY (1)
-#define OR32_W_FLAG (2)
-#define OR32_R_FLAG (4)
-
-struct or32_letter
-{
- char letter;
- int sign;
- /* int reloc; relocation per letter ?? */
-};
-
-/* Main instruction specification array. */
-struct or32_opcode
-{
- /* Name of the instruction. */
- char *name;
-
- /* A string of characters which describe the operands.
- Valid characters are:
- ,() Itself. Characters appears in the assembly code.
- rA Register operand.
- rB Register operand.
- rD Register operand.
- I An immediate operand, range -32768 to 32767.
- J An immediate operand, range . (unused)
- K An immediate operand, range 0 to 65535.
- L An immediate operand, range 0 to 63.
- M An immediate operand, range . (unused)
- N An immediate operand, range -33554432 to 33554431.
- O An immediate operand, range . (unused). */
- char *args;
-
- /* Opcode and operand encoding. */
- char *encoding;
- void (*exec) (void);
- unsigned int flags;
-};
-
-#define OPTYPE_LAST (0x80000000)
-#define OPTYPE_OP (0x40000000)
-#define OPTYPE_REG (0x20000000)
-#define OPTYPE_SIG (0x10000000)
-#define OPTYPE_DIS (0x08000000)
-#define OPTYPE_DST (0x04000000)
-#define OPTYPE_SBIT (0x00001F00)
-#define OPTYPE_SHR (0x0000001F)
-#define OPTYPE_SBIT_SHR (8)
-
-/* MM: Data how to decode operands. */
-extern struct insn_op_struct
-{
- unsigned long type;
- unsigned long data;
-} **op_start;
-
-#ifdef HAS_EXECUTION
-extern void l_invalid (void);
-extern void l_sfne (void);
-extern void l_bf (void);
-extern void l_add (void);
-extern void l_sw (void);
-extern void l_sb (void);
-extern void l_sh (void);
-extern void l_lwz (void);
-extern void l_lbs (void);
-extern void l_lbz (void);
-extern void l_lhs (void);
-extern void l_lhz (void);
-extern void l_movhi (void);
-extern void l_and (void);
-extern void l_or (void);
-extern void l_xor (void);
-extern void l_sub (void);
-extern void l_mul (void);
-extern void l_div (void);
-extern void l_divu (void);
-extern void l_sll (void);
-extern void l_sra (void);
-extern void l_srl (void);
-extern void l_j (void);
-extern void l_jal (void);
-extern void l_jalr (void);
-extern void l_jr (void);
-extern void l_rfe (void);
-extern void l_nop (void);
-extern void l_bnf (void);
-extern void l_sfeq (void);
-extern void l_sfgts (void);
-extern void l_sfges (void);
-extern void l_sflts (void);
-extern void l_sfles (void);
-extern void l_sfgtu (void);
-extern void l_sfgeu (void);
-extern void l_sfltu (void);
-extern void l_sfleu (void);
-extern void l_mtspr (void);
-extern void l_mfspr (void);
-extern void l_sys (void);
-extern void l_trap (void); /* CZ 21/06/01. */
-extern void l_macrc (void);
-extern void l_mac (void);
-extern void l_msb (void);
-extern void l_invalid (void);
-extern void l_cust1 (void);
-extern void l_cust2 (void);
-extern void l_cust3 (void);
-extern void l_cust4 (void);
-#endif
-extern void l_none (void);
-
-extern const struct or32_letter or32_letters[];
-
-extern const struct or32_opcode or32_opcodes[];
-
-extern const unsigned int or32_num_opcodes;
-
-/* Calculates instruction length in bytes. Always 4 for OR32. */
-extern int insn_len (int);
-
-/* Is individual insn's operand signed or unsigned? */
-extern int letter_signed (char);
-
-/* Number of letters in the individual lettered operand. */
-extern int letter_range (char);
-
-/* MM: Returns index of given instruction name. */
-extern int insn_index (char *);
-
-/* MM: Returns instruction name from index. */
-extern const char *insn_name (int);
-
-/* MM: Constructs new FSM, based on or32_opcodes. */
-extern void build_automata (void);
-
-/* MM: Destructs FSM. */
-extern void destruct_automata (void);
-
-/* MM: Decodes instruction using FSM. Call build_automata first. */
-extern int insn_decode (unsigned int);
-
-/* Disassemble one instruction from insn to disassemble.
- Return the size of the instruction. */
-int disassemble_insn (unsigned long);
-
-#endif
diff --git a/include/opcode/pdp11.h b/include/opcode/pdp11.h
deleted file mode 100644
index 0f0256b..0000000
--- a/include/opcode/pdp11.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* PDP-11 opcde list.
- Copyright 2001, 2002 Free Software Foundation, Inc.
-
-This file is part of GDB and GAS.
-
-GDB and GAS are free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
-
-GDB and GAS are distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GDB or GAS; see the file COPYING. If not, write to
-the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/*
- * PDP-11 opcode types.
- */
-
-#define PDP11_OPCODE_NO_OPS 0
-#define PDP11_OPCODE_REG 1 /* register */
-#define PDP11_OPCODE_OP 2 /* generic operand */
-#define PDP11_OPCODE_REG_OP 3 /* register and generic operand */
-#define PDP11_OPCODE_REG_OP_REV 4 /* register and generic operand,
- reversed syntax */
-#define PDP11_OPCODE_AC_FOP 5 /* fpu accumulator and generic float
- operand */
-#define PDP11_OPCODE_OP_OP 6 /* two generic operands */
-#define PDP11_OPCODE_DISPL 7 /* pc-relative displacement */
-#define PDP11_OPCODE_REG_DISPL 8 /* redister and pc-relative
- displacement */
-#define PDP11_OPCODE_IMM8 9 /* 8-bit immediate */
-#define PDP11_OPCODE_IMM6 10 /* 6-bit immediate */
-#define PDP11_OPCODE_IMM3 11 /* 3-bit immediate */
-#define PDP11_OPCODE_ILLEGAL 12 /* illegal instruction */
-#define PDP11_OPCODE_FOP_AC 13 /* generic float argument, then fpu
- accumulator */
-#define PDP11_OPCODE_FOP 14 /* generic float operand */
-#define PDP11_OPCODE_AC_OP 15 /* fpu accumulator and generic int
- operand */
-#define PDP11_OPCODE_OP_AC 16 /* generic int argument, then fpu
- accumulator */
-
-/*
- * PDP-11 instruction set extensions.
- *
- * Please keep the numbers low, as they are used as indices into
- * an array.
- */
-
-#define PDP11_NONE 0 /* not in instruction set */
-#define PDP11_BASIC 1 /* basic instruction set (11/20 etc) */
-#define PDP11_CSM 2 /* commercial instruction set */
-#define PDP11_CIS 3 /* commercial instruction set */
-#define PDP11_EIS 4 /* extended instruction set (11/45 etc) */
-#define PDP11_FIS 5 /* KEV11 floating-point instructions */
-#define PDP11_FPP 6 /* FP-11 floating-point instructions */
-#define PDP11_LEIS 7 /* limited extended instruction set
- (11/40 etc) */
-#define PDP11_MFPT 8 /* move from processor type */
-#define PDP11_MPROC 9 /* multiprocessor instructions: tstset,
- wrtlck */
-#define PDP11_MXPS 10 /* move from/to processor status */
-#define PDP11_SPL 11 /* set priority level */
-#define PDP11_UCODE 12 /* microcode instructions: ldub, med, xfc */
-#define PDP11_EXT_NUM 13 /* total number of extension types */
-
-struct pdp11_opcode
-{
- const char *name;
- int opcode;
- int mask;
- int type;
- int extension;
-};
-
-extern const struct pdp11_opcode pdp11_opcodes[];
-extern const struct pdp11_opcode pdp11_aliases[];
-extern const int pdp11_num_opcodes, pdp11_num_aliases;
-
-/* end of pdp11.h */
diff --git a/include/opcode/pj.h b/include/opcode/pj.h
deleted file mode 100644
index 30201d6..0000000
--- a/include/opcode/pj.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Definitions for decoding the picoJava opcode table.
- Copyright 1999, 2002, 2003 Free Software Foundation, Inc.
- Contributed by Steve Chamberlain of Transmeta (sac@pobox.com).
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-
-/* Names used to describe the type of instruction arguments, used by
- the assembler and disassembler. Attributes are encoded in various fields. */
-
-/* reloc size pcrel uns */
-#define O_N 0
-#define O_16 (1<<4 | 2 | (0<<6) | (0<<3))
-#define O_U16 (1<<4 | 2 | (0<<6) | (1<<3))
-#define O_R16 (2<<4 | 2 | (1<<6) | (0<<3))
-#define O_8 (3<<4 | 1 | (0<<6) | (0<<3))
-#define O_U8 (3<<4 | 1 | (0<<6) | (1<<3))
-#define O_R8 (4<<4 | 1 | (0<<6) | (0<<3))
-#define O_R32 (5<<4 | 4 | (1<<6) | (0<<3))
-#define O_32 (6<<4 | 4 | (0<<6) | (0<<3))
-
-#define ASIZE(x) ((x) & 0x7)
-#define PCREL(x) (!!((x) & (1<<6)))
-#define UNS(x) (!!((x) & (1<<3)))
-
-
-typedef struct pj_opc_info_t
-{
- short opcode;
- short opcode_next;
- char len;
- unsigned char arg[2];
- union {
- const char *name;
- void (*func) (struct pj_opc_info_t *, char *);
- } u;
-} pj_opc_info_t;
diff --git a/include/opcode/pn.h b/include/opcode/pn.h
deleted file mode 100644
index f8d474f..0000000
--- a/include/opcode/pn.h
+++ /dev/null
@@ -1,282 +0,0 @@
-/* Print GOULD PN (PowerNode) instructions for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 1991 Free Software Foundation, Inc.
-
-This file is part of GDB.
-
-GDB is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
-
-GDB is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GDB; see the file COPYING. If not, write to
-the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-struct gld_opcode
-{
- char *name;
- unsigned long opcode;
- unsigned long mask;
- char *args;
- int length;
-};
-
-/* We store four bytes of opcode for all opcodes because that
- is the most any of them need. The actual length of an instruction
- is always at least 2 bytes, and at most four. The length of the
- instruction is based on the opcode.
-
- The mask component is a mask saying which bits must match
- particular opcode in order for an instruction to be an instance
- of that opcode.
-
- The args component is a string containing characters
- that are used to format the arguments to the instruction. */
-
-/* Kinds of operands:
- r Register in first field
- R Register in second field
- b Base register in first field
- B Base register in second field
- v Vector register in first field
- V Vector register in first field
- A Optional address register (base register)
- X Optional index register
- I Immediate data (16bits signed)
- O Offset field (16bits signed)
- h Offset field (15bits signed)
- d Offset field (14bits signed)
- S Shift count field
-
- any other characters are printed as is...
-*/
-
-/* The assembler requires that this array be sorted as follows:
- all instances of the same mnemonic must be consecutive.
- All instances of the same mnemonic with the same number of operands
- must be consecutive.
- */
-struct gld_opcode gld_opcodes[] =
-{
-{ "abm", 0xa0080000, 0xfc080000, "f,xOA,X", 4 },
-{ "abr", 0x18080000, 0xfc0c0000, "r,f", 2 },
-{ "aci", 0xfc770000, 0xfc7f8000, "r,I", 4 },
-{ "adfd", 0xe0080002, 0xfc080002, "r,xOA,X", 4 },
-{ "adfw", 0xe0080000, 0xfc080000, "r,xOA,X", 4 },
-{ "adi", 0xc8010000, 0xfc7f0000, "r,I", 4 },
-{ "admb", 0xb8080000, 0xfc080000, "r,xOA,X", 4 },
-{ "admd", 0xb8000002, 0xfc080002, "r,xOA,X", 4 },
-{ "admh", 0xb8000001, 0xfc080001, "r,xOA,X", 4 },
-{ "admw", 0xb8000000, 0xfc080000, "r,xOA,X", 4 },
-{ "adr", 0x38000000, 0xfc0f0000, "r,R", 2 },
-{ "adrfd", 0x38090000, 0xfc0f0000, "r,R", 2 },
-{ "adrfw", 0x38010000, 0xfc0f0000, "r,R", 2 },
-{ "adrm", 0x38080000, 0xfc0f0000, "r,R", 2 },
-{ "ai", 0xfc030000, 0xfc07ffff, "I", 4 },
-{ "anmb", 0x84080000, 0xfc080000, "r,xOA,X", 4 },
-{ "anmd", 0x84000002, 0xfc080002, "r,xOA,X", 4 },
-{ "anmh", 0x84000001, 0xfc080001, "r,xOA,X", 4 },
-{ "anmw", 0x84000000, 0xfc080000, "r,xOA,X", 4 },
-{ "anr", 0x04000000, 0xfc0f0000, "r,R", 2 },
-{ "armb", 0xe8080000, 0xfc080000, "r,xOA,X", 4 },
-{ "armd", 0xe8000002, 0xfc080002, "r,xOA,X", 4 },
-{ "armh", 0xe8000001, 0xfc080001, "r,xOA,X", 4 },
-{ "armw", 0xe8000000, 0xfc080000, "r,xOA,X", 4 },
-{ "bcf", 0xf0000000, 0xfc080000, "I,xOA,X", 4 },
-{ "bct", 0xec000000, 0xfc080000, "I,xOA,X", 4 },
-{ "bei", 0x00060000, 0xffff0000, "", 2 },
-{ "bft", 0xf0000000, 0xff880000, "xOA,X", 4 },
-{ "bib", 0xf4000000, 0xfc780000, "r,xOA", 4 },
-{ "bid", 0xf4600000, 0xfc780000, "r,xOA", 4 },
-{ "bih", 0xf4200000, 0xfc780000, "r,xOA", 4 },
-{ "biw", 0xf4400000, 0xfc780000, "r,xOA", 4 },
-{ "bl", 0xf8800000, 0xff880000, "xOA,X", 4 },
-{ "bsub", 0x5c080000, 0xff8f0000, "", 2 },
-{ "bsubm", 0x28080000, 0xfc080000, "", 4 },
-{ "bu", 0xec000000, 0xff880000, "xOA,X", 4 },
-{ "call", 0x28080000, 0xfc0f0000, "", 2 },
-{ "callm", 0x5c080000, 0xff880000, "", 4 },
-{ "camb", 0x90080000, 0xfc080000, "r,xOA,X", 4 },
-{ "camd", 0x90000002, 0xfc080002, "r,xOA,X", 4 },
-{ "camh", 0x90000001, 0xfc080001, "r,xOA,X", 4 },
-{ "camw", 0x90000000, 0xfc080000, "r.xOA,X", 4 },
-{ "car", 0x10000000, 0xfc0f0000, "r,R", 2 },
-{ "cd", 0xfc060000, 0xfc070000, "r,f", 4 },
-{ "cea", 0x000f0000, 0xffff0000, "", 2 },
-{ "ci", 0xc8050000, 0xfc7f0000, "r,I", 4 },
-{ "cmc", 0x040a0000, 0xfc7f0000, "r", 2 },
-{ "cmmb", 0x94080000, 0xfc080000, "r,xOA,X", 4 },
-{ "cmmd", 0x94000002, 0xfc080002, "r,xOA,X", 4 },
-{ "cmmh", 0x94000001, 0xfc080001, "r,xOA,X", 4 },
-{ "cmmw", 0x94000000, 0xfc080000, "r,xOA,X", 4 },
-{ "cmr", 0x14000000, 0xfc0f0000, "r,R", 2 },
-{ "daci", 0xfc7f0000, 0xfc7f8000, "r,I", 4 },
-{ "dae", 0x000e0000, 0xffff0000, "", 2 },
-{ "dai", 0xfc040000, 0xfc07ffff, "I", 4 },
-{ "dci", 0xfc6f0000, 0xfc7f8000, "r,I", 4 },
-{ "di", 0xfc010000, 0xfc07ffff, "I", 4 },
-{ "dvfd", 0xe4000002, 0xfc080002, "r,xOA,X", 4 },
-{ "dvfw", 0xe4000000, 0xfc080000, "r,xOA,X", 4 },
-{ "dvi", 0xc8040000, 0xfc7f0000, "r,I", 4 },
-{ "dvmb", 0xc4080000, 0xfc080000, "r,xOA,X", 4 },
-{ "dvmh", 0xc4000001, 0xfc080001, "r,xOA,X", 4 },
-{ "dvmw", 0xc4000000, 0xfc080000, "r,xOA,X", 4 },
-{ "dvr", 0x380a0000, 0xfc0f0000, "r,R", 2 },
-{ "dvrfd", 0x380c0000, 0xfc0f0000, "r,R", 4 },
-{ "dvrfw", 0x38040000, 0xfc0f0000, "r,xOA,X", 4 },
-{ "eae", 0x00080000, 0xffff0000, "", 2 },
-{ "eci", 0xfc670000, 0xfc7f8080, "r,I", 4 },
-{ "ecwcs", 0xfc4f0000, 0xfc7f8000, "", 4 },
-{ "ei", 0xfc000000, 0xfc07ffff, "I", 4 },
-{ "eomb", 0x8c080000, 0xfc080000, "r,xOA,X", 4 },
-{ "eomd", 0x8c000002, 0xfc080002, "r,xOA,X", 4 },
-{ "eomh", 0x8c000001, 0xfc080001, "r,xOA,X", 4 },
-{ "eomw", 0x8c000000, 0xfc080000, "r,xOA,X", 4 },
-{ "eor", 0x0c000000, 0xfc0f0000, "r,R", 2 },
-{ "eorm", 0x0c080000, 0xfc0f0000, "r,R", 2 },
-{ "es", 0x00040000, 0xfc7f0000, "r", 2 },
-{ "exm", 0xa8000000, 0xff880000, "xOA,X", 4 },
-{ "exr", 0xc8070000, 0xfc7f0000, "r", 2 },
-{ "exrr", 0xc8070002, 0xfc7f0002, "r", 2 },
-{ "fixd", 0x380d0000, 0xfc0f0000, "r,R", 2 },
-{ "fixw", 0x38050000, 0xfc0f0000, "r,R", 2 },
-{ "fltd", 0x380f0000, 0xfc0f0000, "r,R", 2 },
-{ "fltw", 0x38070000, 0xfc0f0000, "r,R", 2 },
-{ "grio", 0xfc3f0000, 0xfc7f8000, "r,I", 4 },
-{ "halt", 0x00000000, 0xffff0000, "", 2 },
-{ "hio", 0xfc370000, 0xfc7f8000, "r,I", 4 },
-{ "jwcs", 0xfa080000, 0xff880000, "xOA,X", 4 },
-{ "la", 0x50000000, 0xfc000000, "r,xOA,X", 4 },
-{ "labr", 0x58080000, 0xfc080000, "b,xOA,X", 4 },
-{ "lb", 0xac080000, 0xfc080000, "r,xOA,X", 4 },
-{ "lcs", 0x00030000, 0xfc7f0000, "r", 2 },
-{ "ld", 0xac000002, 0xfc080002, "r,xOA,X", 4 },
-{ "lear", 0x80000000, 0xfc080000, "r,xOA,X", 4 },
-{ "lf", 0xcc000000, 0xfc080000, "r,xOA,X", 4 },
-{ "lfbr", 0xcc080000, 0xfc080000, "b,xOA,X", 4 },
-{ "lh", 0xac000001, 0xfc080001, "r,xOA,X", 4 },
-{ "li", 0xc8000000, 0xfc7f0000, "r,I", 4 },
-{ "lmap", 0x2c070000, 0xfc7f0000, "r", 2 },
-{ "lmb", 0xb0080000, 0xfc080000, "r,xOA,X", 4 },
-{ "lmd", 0xb0000002, 0xfc080002, "r,xOA,X", 4 },
-{ "lmh", 0xb0000001, 0xfc080001, "r,xOA,X", 4 },
-{ "lmw", 0xb0000000, 0xfc080000, "r,xOA,X", 4 },
-{ "lnb", 0xb4080000, 0xfc080000, "r,xOA,X", 4 },
-{ "lnd", 0xb4000002, 0xfc080002, "r,xOA,X", 4 },
-{ "lnh", 0xb4000001, 0xfc080001, "r,xOA,X", 4 },
-{ "lnw", 0xb4000000, 0xfc080000, "r,xOA,X", 4 },
-{ "lpsd", 0xf9800000, 0xff880000, "r,xOA,X", 4 },
-{ "lpsdcm", 0xfa800000, 0xff880000, "r,xOA,X", 4 },
-{ "lw", 0xac000000, 0xfc080000, "r,xOA,X", 4 },
-{ "lwbr", 0x5c000000, 0xfc080000, "b,xOA,X", 4 },
-{ "mpfd", 0xe4080002, 0xfc080002, "r,xOA,X", 4 },
-{ "mpfw", 0xe4080000, 0xfc080000, "r,xOA,X", 4 },
-{ "mpi", 0xc8030000, 0xfc7f0000, "r,I", 4 },
-{ "mpmb", 0xc0080000, 0xfc080000, "r,xOA,X", 4 },
-{ "mpmh", 0xc0000001, 0xfc080001, "r,xOA,X", 4 },
-{ "mpmw", 0xc0000000, 0xfc080000, "r,xOA,X", 4 },
-{ "mpr", 0x38020000, 0xfc0f0000, "r,R", 2 },
-{ "mprfd", 0x380e0000, 0xfc0f0000, "r,R", 2 },
-{ "mprfw", 0x38060000, 0xfc0f0000, "r,R", 2 },
-{ "nop", 0x00020000, 0xffff0000, "", 2 },
-{ "ormb", 0x88080000, 0xfc080000, "r,xOA,X", 4 },
-{ "ormd", 0x88000002, 0xfc080002, "r,xOA,X", 4 },
-{ "ormh", 0x88000001, 0xfc080001, "r,xOA,X", 4 },
-{ "ormw", 0x88000000, 0xfc080000, "r,xOA,X", 4 },
-{ "orr", 0x08000000, 0xfc0f0000, "r,R", 2 },
-{ "orrm", 0x08080000, 0xfc0f0000, "r,R", 2 },
-{ "rdsts", 0x00090000, 0xfc7f0000, "r", 2 },
-{ "return", 0x280e0000, 0xfc7f0000, "", 2 },
-{ "ri", 0xfc020000, 0xfc07ffff, "I", 4 },
-{ "rnd", 0x00050000, 0xfc7f0000, "r", 2 },
-{ "rpswt", 0x040b0000, 0xfc7f0000, "r", 2 },
-{ "rschnl", 0xfc2f0000, 0xfc7f8000, "r,I", 4 },
-{ "rsctl", 0xfc470000, 0xfc7f8000, "r,I", 4 },
-{ "rwcs", 0x000b0000, 0xfc0f0000, "r,R", 2 },
-{ "sacz", 0x10080000, 0xfc0f0000, "r,R", 2 },
-{ "sbm", 0x98080000, 0xfc080000, "f,xOA,X", 4 },
-{ "sbr", 0x18000000, 0xfc0c0000, "r,f", 4 },
-{ "sea", 0x000d0000, 0xffff0000, "", 2 },
-{ "setcpu", 0x2c090000, 0xfc7f0000, "r", 2 },
-{ "sio", 0xfc170000, 0xfc7f8000, "r,I", 4 },
-{ "sipu", 0x000a0000, 0xffff0000, "", 2 },
-{ "sla", 0x1c400000, 0xfc600000, "r,S", 2 },
-{ "slad", 0x20400000, 0xfc600000, "r,S", 2 },
-{ "slc", 0x24400000, 0xfc600000, "r,S", 2 },
-{ "sll", 0x1c600000, 0xfc600000, "r,S", 2 },
-{ "slld", 0x20600000, 0xfc600000, "r,S", 2 },
-{ "smc", 0x04070000, 0xfc070000, "", 2 },
-{ "sra", 0x1c000000, 0xfc600000, "r,S", 2 },
-{ "srad", 0x20000000, 0xfc600000, "r,S", 2 },
-{ "src", 0x24000000, 0xfc600000, "r,S", 2 },
-{ "srl", 0x1c200000, 0xfc600000, "r,S", 2 },
-{ "srld", 0x20200000, 0xfc600000, "r,S", 2 },
-{ "stb", 0xd4080000, 0xfc080000, "r,xOA,X", 4 },
-{ "std", 0xd4000002, 0xfc080002, "r,xOA,X", 4 },
-{ "stf", 0xdc000000, 0xfc080000, "r,xOA,X", 4 },
-{ "stfbr", 0x54000000, 0xfc080000, "b,xOA,X", 4 },
-{ "sth", 0xd4000001, 0xfc080001, "r,xOA,X", 4 },
-{ "stmb", 0xd8080000, 0xfc080000, "r,xOA,X", 4 },
-{ "stmd", 0xd8000002, 0xfc080002, "r,xOA,X", 4 },
-{ "stmh", 0xd8000001, 0xfc080001, "r,xOA,X", 4 },
-{ "stmw", 0xd8000000, 0xfc080000, "r,xOA,X", 4 },
-{ "stpio", 0xfc270000, 0xfc7f8000, "r,I", 4 },
-{ "stw", 0xd4000000, 0xfc080000, "r,xOA,X", 4 },
-{ "stwbr", 0x54000000, 0xfc080000, "b,xOA,X", 4 },
-{ "suabr", 0x58000000, 0xfc080000, "b,xOA,X", 4 },
-{ "sufd", 0xe0000002, 0xfc080002, "r,xOA,X", 4 },
-{ "sufw", 0xe0000000, 0xfc080000, "r,xOA,X", 4 },
-{ "sui", 0xc8020000, 0xfc7f0000, "r,I", 4 },
-{ "sumb", 0xbc080000, 0xfc080000, "r,xOA,X", 4 },
-{ "sumd", 0xbc000002, 0xfc080002, "r,xOA,X", 4 },
-{ "sumh", 0xbc000001, 0xfc080001, "r,xOA,X", 4 },
-{ "sumw", 0xbc000000, 0xfc080000, "r,xOA,X", 4 },
-{ "sur", 0x3c000000, 0xfc0f0000, "r,R", 2 },
-{ "surfd", 0x380b0000, 0xfc0f0000, "r,xOA,X", 4 },
-{ "surfw", 0x38030000, 0xfc0f0000, "r,R", 2 },
-{ "surm", 0x3c080000, 0xfc0f0000, "r,R", 2 },
-{ "svc", 0xc8060000, 0xffff0000, "", 4 },
-{ "tbm", 0xa4080000, 0xfc080000, "f,xOA,X", 4 },
-{ "tbr", 0x180c0000, 0xfc0c0000, "r,f", 2 },
-{ "tbrr", 0x2c020000, 0xfc0f0000, "r,B", 2 },
-{ "tccr", 0x28040000, 0xfc7f0000, "", 2 },
-{ "td", 0xfc050000, 0xfc070000, "r,f", 4 },
-{ "tio", 0xfc1f0000, 0xfc7f8000, "r,I", 4 },
-{ "tmapr", 0x2c0a0000, 0xfc0f0000, "r,R", 2 },
-{ "tpcbr", 0x280c0000, 0xfc7f0000, "r", 2 },
-{ "trbr", 0x2c010000, 0xfc0f0000, "b,R", 2 },
-{ "trc", 0x2c030000, 0xfc0f0000, "r,R", 2 },
-{ "trcc", 0x28050000, 0xfc7f0000, "", 2 },
-{ "trcm", 0x2c0b0000, 0xfc0f0000, "r,R", 2 },
-{ "trn", 0x2c040000, 0xfc0f0000, "r,R", 2 },
-{ "trnm", 0x2c0c0000, 0xfc0f0000, "r,R", 2 },
-{ "trr", 0x2c000000, 0xfc0f0000, "r,R", 2 },
-{ "trrm", 0x2c080000, 0xfc0f0000, "r,R", 2 },
-{ "trsc", 0x2c0e0000, 0xfc0f0000, "r,R", 2 },
-{ "trsw", 0x28000000, 0xfc7f0000, "r", 2 },
-{ "tscr", 0x2c0f0000, 0xfc0f0000, "r,R", 2 },
-{ "uei", 0x00070000, 0xffff0000, "", 2 },
-{ "wait", 0x00010000, 0xffff0000, "", 2 },
-{ "wcwcs", 0xfc5f0000, 0xfc7f8000, "", 4 },
-{ "wwcs", 0x000c0000, 0xfc0f0000, "r,R", 2 },
-{ "xcbr", 0x28020000, 0xfc0f0000, "b,B", 2 },
-{ "xcr", 0x2c050000, 0xfc0f0000, "r,R", 2 },
-{ "xcrm", 0x2c0d0000, 0xfc0f0000, "r,R", 2 },
-{ "zbm", 0x9c080000, 0xfc080000, "f,xOA,X", 4 },
-{ "zbr", 0x18040000, 0xfc0c0000, "r,f", 2 },
-{ "zmb", 0xf8080000, 0xfc080000, "r,xOA,X", 4 },
-{ "zmd", 0xf8000002, 0xfc080002, "r,xOA,X", 4 },
-{ "zmh", 0xf8000001, 0xfc080001, "r,xOA,X", 4 },
-{ "zmw", 0xf8000000, 0xfc080000, "r,xOA,X", 4 },
-{ "zr", 0x0c000000, 0xfc0f0000, "r", 2 },
-};
-
-int numopcodes = sizeof(gld_opcodes) / sizeof(gld_opcodes[0]);
-
-struct gld_opcode *endop = gld_opcodes + sizeof(gld_opcodes) /
- sizeof(gld_opcodes[0]);
diff --git a/include/opcode/ppc.h b/include/opcode/ppc.h
deleted file mode 100644
index 0296b59..0000000
--- a/include/opcode/ppc.h
+++ /dev/null
@@ -1,349 +0,0 @@
-/* ppc.h -- Header file for PowerPC opcode table
- Copyright 1994, 1995, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007 Free Software Foundation, Inc.
- Written by Ian Lance Taylor, Cygnus Support
-
-This file is part of GDB, GAS, and the GNU binutils.
-
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them under the terms of the GNU General Public
-License as published by the Free Software Foundation; either version
-1, or (at your option) any later version.
-
-GDB, GAS, and the GNU binutils are distributed in the hope that they
-will be useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING. If not, write to the Free
-Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef PPC_H
-#define PPC_H
-
-typedef unsigned long ppc_cpu_t;
-
-/* The opcode table is an array of struct powerpc_opcode. */
-
-struct powerpc_opcode
-{
- /* The opcode name. */
- const char *name;
-
- /* The opcode itself. Those bits which will be filled in with
- operands are zeroes. */
- unsigned long opcode;
-
- /* The opcode mask. This is used by the disassembler. This is a
- mask containing ones indicating those bits which must match the
- opcode field, and zeroes indicating those bits which need not
- match (and are presumably filled in by operands). */
- unsigned long mask;
-
- /* One bit flags for the opcode. These are used to indicate which
- specific processors support the instructions. The defined values
- are listed below. */
- ppc_cpu_t flags;
-
- /* An array of operand codes. Each code is an index into the
- operand table. They appear in the order which the operands must
- appear in assembly code, and are terminated by a zero. */
- unsigned char operands[8];
-};
-
-/* The table itself is sorted by major opcode number, and is otherwise
- in the order in which the disassembler should consider
- instructions. */
-extern const struct powerpc_opcode powerpc_opcodes[];
-extern const int powerpc_num_opcodes;
-
-/* Values defined for the flags field of a struct powerpc_opcode. */
-
-/* Opcode is defined for the PowerPC architecture. */
-#define PPC_OPCODE_PPC 1
-
-/* Opcode is defined for the POWER (RS/6000) architecture. */
-#define PPC_OPCODE_POWER 2
-
-/* Opcode is defined for the POWER2 (Rios 2) architecture. */
-#define PPC_OPCODE_POWER2 4
-
-/* Opcode is only defined on 32 bit architectures. */
-#define PPC_OPCODE_32 8
-
-/* Opcode is only defined on 64 bit architectures. */
-#define PPC_OPCODE_64 0x10
-
-/* Opcode is supported by the Motorola PowerPC 601 processor. The 601
- is assumed to support all PowerPC (PPC_OPCODE_PPC) instructions,
- but it also supports many additional POWER instructions. */
-#define PPC_OPCODE_601 0x20
-
-/* Opcode is supported in both the Power and PowerPC architectures
- (ie, compiler's -mcpu=common or assembler's -mcom). */
-#define PPC_OPCODE_COMMON 0x40
-
-/* Opcode is supported for any Power or PowerPC platform (this is
- for the assembler's -many option, and it eliminates duplicates). */
-#define PPC_OPCODE_ANY 0x80
-
-/* Opcode is supported as part of the 64-bit bridge. */
-#define PPC_OPCODE_64_BRIDGE 0x100
-
-/* Opcode is supported by Altivec Vector Unit */
-#define PPC_OPCODE_ALTIVEC 0x200
-
-/* Opcode is supported by PowerPC 403 processor. */
-#define PPC_OPCODE_403 0x400
-
-/* Opcode is supported by PowerPC BookE processor. */
-#define PPC_OPCODE_BOOKE 0x800
-
-/* Opcode is only supported by 64-bit PowerPC BookE processor. */
-#define PPC_OPCODE_BOOKE64 0x1000
-
-/* Opcode is supported by PowerPC 440 processor. */
-#define PPC_OPCODE_440 0x2000
-
-/* Opcode is only supported by Power4 architecture. */
-#define PPC_OPCODE_POWER4 0x4000
-
-/* Opcode isn't supported by Power4 architecture. */
-#define PPC_OPCODE_NOPOWER4 0x8000
-
-/* Opcode is only supported by POWERPC Classic architecture. */
-#define PPC_OPCODE_CLASSIC 0x10000
-
-/* Opcode is only supported by e500x2 Core. */
-#define PPC_OPCODE_SPE 0x20000
-
-/* Opcode is supported by e500x2 Integer select APU. */
-#define PPC_OPCODE_ISEL 0x40000
-
-/* Opcode is an e500 SPE floating point instruction. */
-#define PPC_OPCODE_EFS 0x80000
-
-/* Opcode is supported by branch locking APU. */
-#define PPC_OPCODE_BRLOCK 0x100000
-
-/* Opcode is supported by performance monitor APU. */
-#define PPC_OPCODE_PMR 0x200000
-
-/* Opcode is supported by cache locking APU. */
-#define PPC_OPCODE_CACHELCK 0x400000
-
-/* Opcode is supported by machine check APU. */
-#define PPC_OPCODE_RFMCI 0x800000
-
-/* Opcode is only supported by Power5 architecture. */
-#define PPC_OPCODE_POWER5 0x1000000
-
-/* Opcode is supported by PowerPC e300 family. */
-#define PPC_OPCODE_E300 0x2000000
-
-/* Opcode is only supported by Power6 architecture. */
-#define PPC_OPCODE_POWER6 0x4000000
-
-/* Opcode is only supported by PowerPC Cell family. */
-#define PPC_OPCODE_CELL 0x8000000
-
-/* Opcode is supported by CPUs with paired singles support. */
-#define PPC_OPCODE_PPCPS 0x10000000
-
-/* Opcode is supported by Power E500MC */
-#define PPC_OPCODE_E500MC 0x20000000
-
-/* Opcode is supported by PowerPC 405 processor. */
-#define PPC_OPCODE_405 0x40000000
-
-/* Opcode is supported by Vector-Scalar (VSX) Unit */
-#define PPC_OPCODE_VSX 0x80000000
-
-/* A macro to extract the major opcode from an instruction. */
-#define PPC_OP(i) (((i) >> 26) & 0x3f)
-
-/* The operands table is an array of struct powerpc_operand. */
-
-struct powerpc_operand
-{
- /* A bitmask of bits in the operand. */
- unsigned int bitm;
-
- /* How far the operand is left shifted in the instruction.
- -1 to indicate that BITM and SHIFT cannot be used to determine
- where the operand goes in the insn. */
- int shift;
-
- /* Insertion function. This is used by the assembler. To insert an
- operand value into an instruction, check this field.
-
- If it is NULL, execute
- i |= (op & o->bitm) << o->shift;
- (i is the instruction which we are filling in, o is a pointer to
- this structure, and op is the operand value).
-
- If this field is not NULL, then simply call it with the
- instruction and the operand value. It will return the new value
- of the instruction. If the ERRMSG argument is not NULL, then if
- the operand value is illegal, *ERRMSG will be set to a warning
- string (the operand will be inserted in any case). If the
- operand value is legal, *ERRMSG will be unchanged (most operands
- can accept any value). */
- unsigned long (*insert)
- (unsigned long instruction, long op, ppc_cpu_t dialect, const char **errmsg);
-
- /* Extraction function. This is used by the disassembler. To
- extract this operand type from an instruction, check this field.
-
- If it is NULL, compute
- op = (i >> o->shift) & o->bitm;
- if ((o->flags & PPC_OPERAND_SIGNED) != 0)
- sign_extend (op);
- (i is the instruction, o is a pointer to this structure, and op
- is the result).
-
- If this field is not NULL, then simply call it with the
- instruction value. It will return the value of the operand. If
- the INVALID argument is not NULL, *INVALID will be set to
- non-zero if this operand type can not actually be extracted from
- this operand (i.e., the instruction does not match). If the
- operand is valid, *INVALID will not be changed. */
- long (*extract) (unsigned long instruction, ppc_cpu_t dialect, int *invalid);
-
- /* One bit syntax flags. */
- unsigned long flags;
-};
-
-/* Elements in the table are retrieved by indexing with values from
- the operands field of the powerpc_opcodes table. */
-
-extern const struct powerpc_operand powerpc_operands[];
-extern const unsigned int num_powerpc_operands;
-
-/* Values defined for the flags field of a struct powerpc_operand. */
-
-/* This operand takes signed values. */
-#define PPC_OPERAND_SIGNED (0x1)
-
-/* This operand takes signed values, but also accepts a full positive
- range of values when running in 32 bit mode. That is, if bits is
- 16, it takes any value from -0x8000 to 0xffff. In 64 bit mode,
- this flag is ignored. */
-#define PPC_OPERAND_SIGNOPT (0x2)
-
-/* This operand does not actually exist in the assembler input. This
- is used to support extended mnemonics such as mr, for which two
- operands fields are identical. The assembler should call the
- insert function with any op value. The disassembler should call
- the extract function, ignore the return value, and check the value
- placed in the valid argument. */
-#define PPC_OPERAND_FAKE (0x4)
-
-/* The next operand should be wrapped in parentheses rather than
- separated from this one by a comma. This is used for the load and
- store instructions which want their operands to look like
- reg,displacement(reg)
- */
-#define PPC_OPERAND_PARENS (0x8)
-
-/* This operand may use the symbolic names for the CR fields, which
- are
- lt 0 gt 1 eq 2 so 3 un 3
- cr0 0 cr1 1 cr2 2 cr3 3
- cr4 4 cr5 5 cr6 6 cr7 7
- These may be combined arithmetically, as in cr2*4+gt. These are
- only supported on the PowerPC, not the POWER. */
-#define PPC_OPERAND_CR (0x10)
-
-/* This operand names a register. The disassembler uses this to print
- register names with a leading 'r'. */
-#define PPC_OPERAND_GPR (0x20)
-
-/* Like PPC_OPERAND_GPR, but don't print a leading 'r' for r0. */
-#define PPC_OPERAND_GPR_0 (0x40)
-
-/* This operand names a floating point register. The disassembler
- prints these with a leading 'f'. */
-#define PPC_OPERAND_FPR (0x80)
-
-/* This operand is a relative branch displacement. The disassembler
- prints these symbolically if possible. */
-#define PPC_OPERAND_RELATIVE (0x100)
-
-/* This operand is an absolute branch address. The disassembler
- prints these symbolically if possible. */
-#define PPC_OPERAND_ABSOLUTE (0x200)
-
-/* This operand is optional, and is zero if omitted. This is used for
- example, in the optional BF field in the comparison instructions. The
- assembler must count the number of operands remaining on the line,
- and the number of operands remaining for the opcode, and decide
- whether this operand is present or not. The disassembler should
- print this operand out only if it is not zero. */
-#define PPC_OPERAND_OPTIONAL (0x400)
-
-/* This flag is only used with PPC_OPERAND_OPTIONAL. If this operand
- is omitted, then for the next operand use this operand value plus
- 1, ignoring the next operand field for the opcode. This wretched
- hack is needed because the Power rotate instructions can take
- either 4 or 5 operands. The disassembler should print this operand
- out regardless of the PPC_OPERAND_OPTIONAL field. */
-#define PPC_OPERAND_NEXT (0x800)
-
-/* This operand should be regarded as a negative number for the
- purposes of overflow checking (i.e., the normal most negative
- number is disallowed and one more than the normal most positive
- number is allowed). This flag will only be set for a signed
- operand. */
-#define PPC_OPERAND_NEGATIVE (0x1000)
-
-/* This operand names a vector unit register. The disassembler
- prints these with a leading 'v'. */
-#define PPC_OPERAND_VR (0x2000)
-
-/* This operand is for the DS field in a DS form instruction. */
-#define PPC_OPERAND_DS (0x4000)
-
-/* This operand is for the DQ field in a DQ form instruction. */
-#define PPC_OPERAND_DQ (0x8000)
-
-/* Valid range of operand is 0..n rather than 0..n-1. */
-#define PPC_OPERAND_PLUS1 (0x10000)
-
-/* Xilinx APU and FSL related operands */
-#define PPC_OPERAND_FSL (0x20000)
-#define PPC_OPERAND_FCR (0x40000)
-#define PPC_OPERAND_UDI (0x80000)
-
-/* This operand names a vector-scalar unit register. The disassembler
- prints these with a leading 'vs'. */
-#define PPC_OPERAND_VSR (0x100000)
-
-/* The POWER and PowerPC assemblers use a few macros. We keep them
- with the operands table for simplicity. The macro table is an
- array of struct powerpc_macro. */
-
-struct powerpc_macro
-{
- /* The macro name. */
- const char *name;
-
- /* The number of operands the macro takes. */
- unsigned int operands;
-
- /* One bit flags for the opcode. These are used to indicate which
- specific processors support the instructions. The values are the
- same as those for the struct powerpc_opcode flags field. */
- ppc_cpu_t flags;
-
- /* A format string to turn the macro into a normal instruction.
- Each %N in the string is replaced with operand number N (zero
- based). */
- const char *format;
-};
-
-extern const struct powerpc_macro powerpc_macros[];
-extern const int powerpc_num_macros;
-
-#endif /* PPC_H */
diff --git a/include/opcode/pyr.h b/include/opcode/pyr.h
deleted file mode 100644
index a523dfd..0000000
--- a/include/opcode/pyr.h
+++ /dev/null
@@ -1,305 +0,0 @@
-/* pyramid.opcode.h -- gdb initial attempt.
-
- Copyright 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-/* pyramid opcode table: wot to do with this
- particular opcode */
-
-struct pyr_datum
-{
- char nargs;
- char * args; /* how to compile said opcode */
- unsigned long mask; /* Bit vector: which operand modes are valid
- for this opcode */
- unsigned char code; /* op-code (always 6(?) bits */
-};
-
-typedef struct pyr_insn_format
-{
- unsigned int mode :4;
- unsigned int operator :8;
- unsigned int index_scale :2;
- unsigned int index_reg :6;
- unsigned int operand_1 :6;
- unsigned int operand_2:6;
-} pyr_insn_format;
-
-
-/* We store four bytes of opcode for all opcodes.
- Pyramid is sufficiently RISCy that:
- - insns are always an integral number of words;
- - the length of any insn can be told from the first word of
- the insn. (ie, if there are zero, one, or two words of
- immediate operand/offset).
-
-
- The args component is a string containing two characters for each
- operand of the instruction. The first specifies the kind of operand;
- the second, the place it is stored. */
-
-/* Kinds of operands:
- mask assembler syntax description
- 0x0001: movw Rn,Rn register to register
- 0x0002: movw K,Rn quick immediate to register
- 0x0004: movw I,Rn long immediate to register
- 0x0008: movw (Rn),Rn register indirect to register
- movw (Rn)[x],Rn register indirect to register
- 0x0010: movw I(Rn),Rn offset register indirect to register
- movw I(Rn)[x],Rn offset register indirect, indexed, to register
-
- 0x0020: movw Rn,(Rn) register to register indirect
- 0x0040: movw K,(Rn) quick immediate to register indirect
- 0x0080: movw I,(Rn) long immediate to register indirect
- 0x0100: movw (Rn),(Rn) register indirect to-register indirect
- 0x0100: movw (Rn),(Rn) register indirect to-register indirect
- 0x0200: movw I(Rn),(Rn) register indirect+offset to register indirect
- 0x0200: movw I(Rn),(Rn) register indirect+offset to register indirect
-
- 0x0400: movw Rn,I(Rn) register to register indirect+offset
- 0x0800: movw K,I(Rn) quick immediate to register indirect+offset
- 0x1000: movw I,I(Rn) long immediate to register indirect+offset
- 0x1000: movw (Rn),I(Rn) register indirect to-register indirect+offset
- 0x1000: movw I(Rn),I(Rn) register indirect+offset to register indirect
- +offset
- 0x0000: (irregular) ???
-
-
- Each insn has a four-bit field encoding the type(s) of its operands.
-*/
-
-/* Some common combinations
- */
-
-/* the first 5,(0x1|0x2|0x4|0x8|0x10) ie (1|2|4|8|16), ie ( 32 -1)*/
-#define GEN_TO_REG (31)
-
-#define UNKNOWN ((unsigned long)-1)
-#define ANY (GEN_TO_REG | (GEN_TO_REG << 5) | (GEN_TO_REG << 15))
-
-#define CONVERT (1|8|0x10|0x20|0x200)
-
-#define K_TO_REG (2)
-#define I_TO_REG (4)
-#define NOTK_TO_REG (GEN_TO_REG & ~K_TO_REG)
-#define NOTI_TO_REG (GEN_TO_REG & ~I_TO_REG)
-
-/* The assembler requires that this array be sorted as follows:
- all instances of the same mnemonic must be consecutive.
- All instances of the same mnemonic with the same number of operands
- must be consecutive.
- */
-
-struct pyr_opcode /* pyr opcode text */
-{
- char * name; /* opcode name: lowercase string [key] */
- struct pyr_datum datum; /* rest of opcode table [datum] */
-};
-
-#define pyr_how args
-#define pyr_nargs nargs
-#define pyr_mask mask
-#define pyr_name name
-
-struct pyr_opcode pyr_opcodes[] =
-{
- {"movb", { 2, "", UNKNOWN, 0x11}, },
- {"movh", { 2, "", UNKNOWN, 0x12} },
- {"movw", { 2, "", ANY, 0x10} },
- {"movl", { 2, "", ANY, 0x13} },
- {"mnegw", { 2, "", (0x1|0x8|0x10), 0x14} },
- {"mnegf", { 2, "", 0x1, 0x15} },
- {"mnegd", { 2, "", 0x1, 0x16} },
- {"mcomw", { 2, "", (0x1|0x8|0x10), 0x17} },
- {"mabsw", { 2, "", (0x1|0x8|0x10), 0x18} },
- {"mabsf", { 2, "", 0x1, 0x19} },
- {"mabsd", { 2, "", 0x1, 0x1a} },
- {"mtstw", { 2, "", (0x1|0x8|0x10), 0x1c} },
- {"mtstf", { 2, "", 0x1, 0x1d} },
- {"mtstd", { 2, "", 0x1, 0x1e} },
- {"mova", { 2, "", 0x8|0x10, 0x1f} },
- {"movzbw", { 2, "", (0x1|0x8|0x10), 0x20} },
- {"movzhw", { 2, "", (0x1|0x8|0x10), 0x21} },
- /* 2 insns out of order here */
- {"movbl", { 2, "", 1, 0x4f} },
- {"filbl", { 2, "", 1, 0x4e} },
-
- {"cvtbw", { 2, "", CONVERT, 0x22} },
- {"cvthw", { 2, "", CONVERT, 0x23} },
- {"cvtwb", { 2, "", CONVERT, 0x24} },
- {"cvtwh", { 2, "", CONVERT, 0x25} },
- {"cvtwf", { 2, "", CONVERT, 0x26} },
- {"cvtwd", { 2, "", CONVERT, 0x27} },
- {"cvtfw", { 2, "", CONVERT, 0x28} },
- {"cvtfd", { 2, "", CONVERT, 0x29} },
- {"cvtdw", { 2, "", CONVERT, 0x2a} },
- {"cvtdf", { 2, "", CONVERT, 0x2b} },
-
- {"addw", { 2, "", GEN_TO_REG, 0x40} },
- {"addwc", { 2, "", GEN_TO_REG, 0x41} },
- {"subw", { 2, "", GEN_TO_REG, 0x42} },
- {"subwb", { 2, "", GEN_TO_REG, 0x43} },
- {"rsubw", { 2, "", GEN_TO_REG, 0x44} },
- {"mulw", { 2, "", GEN_TO_REG, 0x45} },
- {"emul", { 2, "", GEN_TO_REG, 0x47} },
- {"umulw", { 2, "", GEN_TO_REG, 0x46} },
- {"divw", { 2, "", GEN_TO_REG, 0x48} },
- {"ediv", { 2, "", GEN_TO_REG, 0x4a} },
- {"rdivw", { 2, "", GEN_TO_REG, 0x4b} },
- {"udivw", { 2, "", GEN_TO_REG, 0x49} },
- {"modw", { 2, "", GEN_TO_REG, 0x4c} },
- {"umodw", { 2, "", GEN_TO_REG, 0x4d} },
-
-
- {"addf", { 2, "", 1, 0x50} },
- {"addd", { 2, "", 1, 0x51} },
- {"subf", { 2, "", 1, 0x52} },
- {"subd", { 2, "", 1, 0x53} },
- {"mulf", { 2, "", 1, 0x56} },
- {"muld", { 2, "", 1, 0x57} },
- {"divf", { 2, "", 1, 0x58} },
- {"divd", { 2, "", 1, 0x59} },
-
-
- {"cmpb", { 2, "", UNKNOWN, 0x61} },
- {"cmph", { 2, "", UNKNOWN, 0x62} },
- {"cmpw", { 2, "", UNKNOWN, 0x60} },
- {"ucmpb", { 2, "", UNKNOWN, 0x66} },
- /* WHY no "ucmph"??? */
- {"ucmpw", { 2, "", UNKNOWN, 0x65} },
- {"xchw", { 2, "", UNKNOWN, 0x0f} },
-
-
- {"andw", { 2, "", GEN_TO_REG, 0x30} },
- {"orw", { 2, "", GEN_TO_REG, 0x31} },
- {"xorw", { 2, "", GEN_TO_REG, 0x32} },
- {"bicw", { 2, "", GEN_TO_REG, 0x33} },
- {"lshlw", { 2, "", GEN_TO_REG, 0x38} },
- {"ashlw", { 2, "", GEN_TO_REG, 0x3a} },
- {"ashll", { 2, "", GEN_TO_REG, 0x3c} },
- {"ashrw", { 2, "", GEN_TO_REG, 0x3b} },
- {"ashrl", { 2, "", GEN_TO_REG, 0x3d} },
- {"rotlw", { 2, "", GEN_TO_REG, 0x3e} },
- {"rotrw", { 2, "", GEN_TO_REG, 0x3f} },
-
- /* push and pop insns are "going away next release". */
- {"pushw", { 2, "", GEN_TO_REG, 0x0c} },
- {"popw", { 2, "", (0x1|0x8|0x10), 0x0d} },
- {"pusha", { 2, "", (0x8|0x10), 0x0e} },
-
- {"bitsw", { 2, "", UNKNOWN, 0x35} },
- {"bitcw", { 2, "", UNKNOWN, 0x36} },
- /* some kind of ibra/dbra insns??*/
- {"icmpw", { 2, "", UNKNOWN, 0x67} },
- {"dcmpw", { 2, "", (1|4|0x20|0x80|0x400|0x1000), 0x69} },/*FIXME*/
- {"acmpw", { 2, "", 1, 0x6b} },
-
- /* Call is written as a 1-op insn, but is always (dis)assembled as a 2-op
- insn with a 2nd op of tr14. The assembler will have to grok this. */
- {"call", { 2, "", GEN_TO_REG, 0x04} },
- {"call", { 1, "", GEN_TO_REG, 0x04} },
-
- {"callk", { 1, "", UNKNOWN, 0x06} },/* system call?*/
- /* Ret is usually written as a 0-op insn, but gets disassembled as a
- 1-op insn. The operand is always tr15. */
- {"ret", { 0, "", UNKNOWN, 0x09} },
- {"ret", { 1, "", UNKNOWN, 0x09} },
- {"adsf", { 2, "", (1|2|4), 0x08} },
- {"retd", { 2, "", UNKNOWN, 0x0a} },
- {"btc", { 2, "", UNKNOWN, 0x01} },
- {"bfc", { 2, "", UNKNOWN, 0x02} },
- /* Careful: halt is 0x00000000. Jump must have some other (mode?)bit set?? */
- {"jump", { 1, "", UNKNOWN, 0x00} },
- {"btp", { 2, "", UNKNOWN, 0xf00} },
- /* read control-stack pointer is another 1-or-2 operand insn. */
- {"rcsp", { 2, "", UNKNOWN, 0x01f} },
- {"rcsp", { 1, "", UNKNOWN, 0x01f} }
-};
-
-/* end: pyramid.opcode.h */
-/* One day I will have to take the time to find out what operands
- are valid for these insns, and guess at what they mean.
-
- I can't imagine what the "I???" insns (iglob, etc) do.
-
- the arithmetic-sounding insns ending in "p" sound awfully like BCD
- arithmetic insns:
- dshlp -> Decimal SHift Left Packed
- dshrp -> Decimal SHift Right Packed
- and cvtlp would be convert long to packed.
- I have no idea how the operands are interpreted; but having them be
- a long register with (address, length) of an in-memory packed BCD operand
- would not be surprising.
- They are unlikely to be a packed bcd string: 64 bits of long give
- is only 15 digits+sign, which isn't enough for COBOL.
- */
-#if 0
- {"wcsp", { 2, "", UNKNOWN, 0x00} }, /*write csp?*/
- /* The OSx Operating System Porting Guide claims SSL does things
- with tr12 (a register reserved to it) to do with static block-structure
- references. SSL=Set Static Link? It's "Going away next release". */
- {"ssl", { 2, "", UNKNOWN, 0x00} },
- {"ccmps", { 2, "", UNKNOWN, 0x00} },
- {"lcd", { 2, "", UNKNOWN, 0x00} },
- {"uemul", { 2, "", UNKNOWN, 0x00} }, /*unsigned emul*/
- {"srf", { 2, "", UNKNOWN, 0x00} }, /*Gidget time???*/
- {"mnegp", { 2, "", UNKNOWN, 0x00} }, /move-neg phys?*/
- {"ldp", { 2, "", UNKNOWN, 0x00} }, /*load phys?*/
- {"ldti", { 2, "", UNKNOWN, 0x00} },
- {"ldb", { 2, "", UNKNOWN, 0x00} },
- {"stp", { 2, "", UNKNOWN, 0x00} },
- {"stti", { 2, "", UNKNOWN, 0x00} },
- {"stb", { 2, "", UNKNOWN, 0x00} },
- {"stu", { 2, "", UNKNOWN, 0x00} },
- {"addp", { 2, "", UNKNOWN, 0x00} },
- {"subp", { 2, "", UNKNOWN, 0x00} },
- {"mulp", { 2, "", UNKNOWN, 0x00} },
- {"divp", { 2, "", UNKNOWN, 0x00} },
- {"dshlp", { 2, "", UNKNOWN, 0x00} }, /* dec shl packed? */
- {"dshrp", { 2, "", UNKNOWN, 0x00} }, /* dec shr packed? */
- {"movs", { 2, "", UNKNOWN, 0x00} }, /*move (string?)?*/
- {"cmpp", { 2, "", UNKNOWN, 0x00} }, /* cmp phys?*/
- {"cmps", { 2, "", UNKNOWN, 0x00} }, /* cmp (string?)?*/
- {"cvtlp", { 2, "", UNKNOWN, 0x00} }, /* cvt long to p??*/
- {"cvtpl", { 2, "", UNKNOWN, 0x00} }, /* cvt p to l??*/
- {"dintr", { 2, "", UNKNOWN, 0x00} }, /* ?? intr ?*/
- {"rphysw", { 2, "", UNKNOWN, 0x00} }, /* read phys word?*/
- {"wphysw", { 2, "", UNKNOWN, 0x00} }, /* write phys word?*/
- {"cmovs", { 2, "", UNKNOWN, 0x00} },
- {"rsubw", { 2, "", UNKNOWN, 0x00} },
- {"bicpsw", { 2, "", UNKNOWN, 0x00} }, /* clr bit in psw? */
- {"bispsw", { 2, "", UNKNOWN, 0x00} }, /* set bit in psw? */
- {"eio", { 2, "", UNKNOWN, 0x00} }, /* ?? ?io ? */
- {"callp", { 2, "", UNKNOWN, 0x00} }, /* call phys?*/
- {"callr", { 2, "", UNKNOWN, 0x00} },
- {"lpcxt", { 2, "", UNKNOWN, 0x00} }, /*load proc context*/
- {"rei", { 2, "", UNKNOWN, 0x00} }, /*ret from intrpt*/
- {"rport", { 2, "", UNKNOWN, 0x00} }, /*read-port?*/
- {"rtod", { 2, "", UNKNOWN, 0x00} }, /*read-time-of-day?*/
- {"ssi", { 2, "", UNKNOWN, 0x00} },
- {"vtpa", { 2, "", UNKNOWN, 0x00} }, /*virt-to-phys-addr?*/
- {"wicl", { 2, "", UNKNOWN, 0x00} }, /* write icl ? */
- {"wport", { 2, "", UNKNOWN, 0x00} }, /*write-port?*/
- {"wtod", { 2, "", UNKNOWN, 0x00} }, /*write-time-of-day?*/
- {"flic", { 2, "", UNKNOWN, 0x00} },
- {"iglob", { 2, "", UNKNOWN, 0x00} }, /* I global? */
- {"iphys", { 2, "", UNKNOWN, 0x00} }, /* I physical? */
- {"ipid", { 2, "", UNKNOWN, 0x00} }, /* I pid? */
- {"ivect", { 2, "", UNKNOWN, 0x00} }, /* I vector? */
- {"lamst", { 2, "", UNKNOWN, 0x00} },
- {"tio", { 2, "", UNKNOWN, 0x00} },
-#endif
diff --git a/include/opcode/s390.h b/include/opcode/s390.h
deleted file mode 100644
index 2c00f4b..0000000
--- a/include/opcode/s390.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/* s390.h -- Header file for S390 opcode table
- Copyright 2000, 2001, 2003 Free Software Foundation, Inc.
- Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-#ifndef S390_H
-#define S390_H
-
-/* List of instruction sets variations. */
-
-enum s390_opcode_mode_val
- {
- S390_OPCODE_ESA = 0,
- S390_OPCODE_ZARCH
- };
-
-enum s390_opcode_cpu_val
- {
- S390_OPCODE_G5 = 0,
- S390_OPCODE_G6,
- S390_OPCODE_Z900,
- S390_OPCODE_Z990,
- S390_OPCODE_Z9_109,
- S390_OPCODE_Z9_EC,
- S390_OPCODE_Z10
- };
-
-/* The opcode table is an array of struct s390_opcode. */
-
-struct s390_opcode
- {
- /* The opcode name. */
- const char * name;
-
- /* The opcode itself. Those bits which will be filled in with
- operands are zeroes. */
- unsigned char opcode[6];
-
- /* The opcode mask. This is used by the disassembler. This is a
- mask containing ones indicating those bits which must match the
- opcode field, and zeroes indicating those bits which need not
- match (and are presumably filled in by operands). */
- unsigned char mask[6];
-
- /* The opcode length in bytes. */
- int oplen;
-
- /* An array of operand codes. Each code is an index into the
- operand table. They appear in the order which the operands must
- appear in assembly code, and are terminated by a zero. */
- unsigned char operands[6];
-
- /* Bitmask of execution modes this opcode is available for. */
- unsigned int modes;
-
- /* First cpu this opcode is available for. */
- enum s390_opcode_cpu_val min_cpu;
- };
-
-/* The table itself is sorted by major opcode number, and is otherwise
- in the order in which the disassembler should consider
- instructions. */
-extern const struct s390_opcode s390_opcodes[];
-extern const int s390_num_opcodes;
-
-/* A opcode format table for the .insn pseudo mnemonic. */
-extern const struct s390_opcode s390_opformats[];
-extern const int s390_num_opformats;
-
-/* Values defined for the flags field of a struct powerpc_opcode. */
-
-/* The operands table is an array of struct s390_operand. */
-
-struct s390_operand
- {
- /* The number of bits in the operand. */
- int bits;
-
- /* How far the operand is left shifted in the instruction. */
- int shift;
-
- /* One bit syntax flags. */
- unsigned long flags;
- };
-
-/* Elements in the table are retrieved by indexing with values from
- the operands field of the powerpc_opcodes table. */
-
-extern const struct s390_operand s390_operands[];
-
-/* Values defined for the flags field of a struct s390_operand. */
-
-/* This operand names a register. The disassembler uses this to print
- register names with a leading 'r'. */
-#define S390_OPERAND_GPR 0x1
-
-/* This operand names a floating point register. The disassembler
- prints these with a leading 'f'. */
-#define S390_OPERAND_FPR 0x2
-
-/* This operand names an access register. The disassembler
- prints these with a leading 'a'. */
-#define S390_OPERAND_AR 0x4
-
-/* This operand names a control register. The disassembler
- prints these with a leading 'c'. */
-#define S390_OPERAND_CR 0x8
-
-/* This operand is a displacement. */
-#define S390_OPERAND_DISP 0x10
-
-/* This operand names a base register. */
-#define S390_OPERAND_BASE 0x20
-
-/* This operand names an index register, it can be skipped. */
-#define S390_OPERAND_INDEX 0x40
-
-/* This operand is a relative branch displacement. The disassembler
- prints these symbolically if possible. */
-#define S390_OPERAND_PCREL 0x80
-
-/* This operand takes signed values. */
-#define S390_OPERAND_SIGNED 0x100
-
-/* This operand is a length. */
-#define S390_OPERAND_LENGTH 0x200
-
-/* This operand is optional. Only a single operand at the end of
- the instruction may be optional. */
-#define S390_OPERAND_OPTIONAL 0x400
-
- #endif /* S390_H */
diff --git a/include/opcode/score-datadep.h b/include/opcode/score-datadep.h
deleted file mode 100644
index 8ef35ad..0000000
--- a/include/opcode/score-datadep.h
+++ /dev/null
@@ -1,282 +0,0 @@
-/* score-datadep.h -- Score Instructions data dependency table
- Copyright 2006 Free Software Foundation, Inc.
- Contributed by:
- Mei Ligang (ligang@sunnorth.com.cn)
- Pei-Lin Tsai (pltsai@sunplus.com)
-
- This file is part of GAS, the GNU Assembler.
-
- GAS is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GAS is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-#ifndef SCORE_DATA_DEPENDENCY_H
-#define SCORE_DATA_DEPENDENCY_H
-
-#define INSN_NAME_LEN 16
-
-enum insn_type_for_dependency
-{
- D_pce,
- D_cond_br,
- D_cond_mv,
- D_cached,
- D_cachei,
- D_ldst,
- D_ldcombine,
- D_mtcr,
- D_mfcr,
- D_mfsr,
- D_mftlb,
- D_mtptlb,
- D_mtrtlb,
- D_stlb,
- D_all_insn
-};
-
-struct insn_to_dependency
-{
- char *insn_name;
- enum insn_type_for_dependency type;
-};
-
-struct data_dependency
-{
- enum insn_type_for_dependency pre_insn_type;
- char pre_reg[6];
- enum insn_type_for_dependency cur_insn_type;
- char cur_reg[6];
- int bubblenum_7;
- int bubblenum_5;
- int warn_or_error; /* warning - 0; error - 1 */
-};
-
-static const struct insn_to_dependency insn_to_dependency_table[] =
-{
- /* pce instruction. */
- {"pce", D_pce},
- /* conditional branch instruction. */
- {"bcs", D_cond_br},
- {"bcc", D_cond_br},
- {"bgtu", D_cond_br},
- {"bleu", D_cond_br},
- {"beq", D_cond_br},
- {"bne", D_cond_br},
- {"bgt", D_cond_br},
- {"ble", D_cond_br},
- {"bge", D_cond_br},
- {"blt", D_cond_br},
- {"bmi", D_cond_br},
- {"bpl", D_cond_br},
- {"bvs", D_cond_br},
- {"bvc", D_cond_br},
- {"bcsl", D_cond_br},
- {"bccl", D_cond_br},
- {"bgtul", D_cond_br},
- {"bleul", D_cond_br},
- {"beql", D_cond_br},
- {"bnel", D_cond_br},
- {"bgtl", D_cond_br},
- {"blel", D_cond_br},
- {"bgel", D_cond_br},
- {"bltl", D_cond_br},
- {"bmil", D_cond_br},
- {"bpll", D_cond_br},
- {"bvsl", D_cond_br},
- {"bvcl", D_cond_br},
- {"bcs!", D_cond_br},
- {"bcc!", D_cond_br},
- {"bgtu!", D_cond_br},
- {"bleu!", D_cond_br},
- {"beq!", D_cond_br},
- {"bne!", D_cond_br},
- {"bgt!", D_cond_br},
- {"ble!", D_cond_br},
- {"bge!", D_cond_br},
- {"blt!", D_cond_br},
- {"bmi!", D_cond_br},
- {"bpl!", D_cond_br},
- {"bvs!", D_cond_br},
- {"bvc!", D_cond_br},
- {"brcs", D_cond_br},
- {"brcc", D_cond_br},
- {"brgtu", D_cond_br},
- {"brleu", D_cond_br},
- {"breq", D_cond_br},
- {"brne", D_cond_br},
- {"brgt", D_cond_br},
- {"brle", D_cond_br},
- {"brge", D_cond_br},
- {"brlt", D_cond_br},
- {"brmi", D_cond_br},
- {"brpl", D_cond_br},
- {"brvs", D_cond_br},
- {"brvc", D_cond_br},
- {"brcsl", D_cond_br},
- {"brccl", D_cond_br},
- {"brgtul", D_cond_br},
- {"brleul", D_cond_br},
- {"breql", D_cond_br},
- {"brnel", D_cond_br},
- {"brgtl", D_cond_br},
- {"brlel", D_cond_br},
- {"brgel", D_cond_br},
- {"brltl", D_cond_br},
- {"brmil", D_cond_br},
- {"brpll", D_cond_br},
- {"brvsl", D_cond_br},
- {"brvcl", D_cond_br},
- {"brcs!", D_cond_br},
- {"brcc!", D_cond_br},
- {"brgtu!", D_cond_br},
- {"brleu!", D_cond_br},
- {"breq!", D_cond_br},
- {"brne!", D_cond_br},
- {"brgt!", D_cond_br},
- {"brle!", D_cond_br},
- {"brge!", D_cond_br},
- {"brlt!", D_cond_br},
- {"brmi!", D_cond_br},
- {"brpl!", D_cond_br},
- {"brvs!", D_cond_br},
- {"brvc!", D_cond_br},
- {"brcsl!", D_cond_br},
- {"brccl!", D_cond_br},
- {"brgtul!", D_cond_br},
- {"brleul!", D_cond_br},
- {"breql!", D_cond_br},
- {"brnel!", D_cond_br},
- {"brgtl!", D_cond_br},
- {"brlel!", D_cond_br},
- {"brgel!", D_cond_br},
- {"brltl!", D_cond_br},
- {"brmil!", D_cond_br},
- {"brpll!", D_cond_br},
- {"brvsl!", D_cond_br},
- {"brvcl!", D_cond_br},
- /* conditional move instruction. */
- {"mvcs", D_cond_mv},
- {"mvcc", D_cond_mv},
- {"mvgtu", D_cond_mv},
- {"mvleu", D_cond_mv},
- {"mveq", D_cond_mv},
- {"mvne", D_cond_mv},
- {"mvgt", D_cond_mv},
- {"mvle", D_cond_mv},
- {"mvge", D_cond_mv},
- {"mvlt", D_cond_mv},
- {"mvmi", D_cond_mv},
- {"mvpl", D_cond_mv},
- {"mvvs", D_cond_mv},
- {"mvvc", D_cond_mv},
- /* move spectial instruction. */
- {"mtcr", D_mtcr},
- {"mftlb", D_mftlb},
- {"mtptlb", D_mtptlb},
- {"mtrtlb", D_mtrtlb},
- {"stlb", D_stlb},
- {"mfcr", D_mfcr},
- {"mfsr", D_mfsr},
- /* cache instruction. */
- {"cache 8", D_cached},
- {"cache 9", D_cached},
- {"cache 10", D_cached},
- {"cache 11", D_cached},
- {"cache 12", D_cached},
- {"cache 13", D_cached},
- {"cache 14", D_cached},
- {"cache 24", D_cached},
- {"cache 26", D_cached},
- {"cache 27", D_cached},
- {"cache 29", D_cached},
- {"cache 30", D_cached},
- {"cache 31", D_cached},
- {"cache 0", D_cachei},
- {"cache 1", D_cachei},
- {"cache 2", D_cachei},
- {"cache 3", D_cachei},
- {"cache 4", D_cachei},
- {"cache 16", D_cachei},
- {"cache 17", D_cachei},
- /* load/store instruction. */
- {"lb", D_ldst},
- {"lbu", D_ldst},
- {"lbu!", D_ldst},
- {"lbup!", D_ldst},
- {"lh", D_ldst},
- {"lhu", D_ldst},
- {"lh!", D_ldst},
- {"lhp!", D_ldst},
- {"lw", D_ldst},
- {"lw!", D_ldst},
- {"lwp!", D_ldst},
- {"sb", D_ldst},
- {"sb!", D_ldst},
- {"sbp!", D_ldst},
- {"sh", D_ldst},
- {"sh!", D_ldst},
- {"shp!", D_ldst},
- {"sw", D_ldst},
- {"sw!", D_ldst},
- {"swp!", D_ldst},
- {"alw", D_ldst},
- {"asw", D_ldst},
- {"push!", D_ldst},
- {"pushhi!", D_ldst},
- {"pop!", D_ldst},
- {"pophi!", D_ldst},
- {"ldc1", D_ldst},
- {"ldc2", D_ldst},
- {"ldc3", D_ldst},
- {"stc1", D_ldst},
- {"stc2", D_ldst},
- {"stc3", D_ldst},
- {"scb", D_ldst},
- {"scw", D_ldst},
- {"sce", D_ldst},
- /* load combine instruction. */
- {"lcb", D_ldcombine},
- {"lcw", D_ldcombine},
- {"lce", D_ldcombine},
-};
-
-static const struct data_dependency data_dependency_table[] =
-{
- /* Condition register. */
- {D_mtcr, "cr1", D_pce, "", 2, 1, 1},
- {D_mtcr, "cr1", D_cond_br, "", 1, 0, 1},
- {D_mtcr, "cr1", D_cond_mv, "", 1, 0, 1},
- /* Status regiser. */
- {D_mtcr, "cr0", D_all_insn, "", 5, 4, 0},
- /* CCR regiser. */
- {D_mtcr, "cr4", D_all_insn, "", 6, 5, 0},
- /* EntryHi/EntryLo register. */
- {D_mftlb, "", D_mtptlb, "", 1, 1, 1},
- {D_mftlb, "", D_mtrtlb, "", 1, 1, 1},
- {D_mftlb, "", D_stlb, "", 1, 1,1},
- {D_mftlb, "", D_mfcr, "cr11", 1, 1, 1},
- {D_mftlb, "", D_mfcr, "cr12", 1, 1, 1},
- /* Index register. */
- {D_stlb, "", D_mtptlb, "", 1, 1, 1},
- {D_stlb, "", D_mftlb, "", 1, 1, 1},
- {D_stlb, "", D_mfcr, "cr8", 2, 2, 1},
- /* Cache. */
- {D_cached, "", D_ldst, "", 1, 1, 0},
- {D_cached, "", D_ldcombine, "", 1, 1, 0},
- {D_cachei, "", D_all_insn, "", 5, 4, 0},
- /* Load combine. */
- {D_ldcombine, "", D_mfsr, "sr1", 3, 3, 1},
-};
-
-#endif
diff --git a/include/opcode/score-inst.h b/include/opcode/score-inst.h
deleted file mode 100644
index e87794f..0000000
--- a/include/opcode/score-inst.h
+++ /dev/null
@@ -1,507 +0,0 @@
-/* score-inst.h -- Score Instructions Table
- Copyright 2006 Free Software Foundation, Inc.
- Contributed by:
- Mei Ligang (ligang@sunnorth.com.cn)
- Pei-Lin Tsai (pltsai@sunplus.com)
-
- This file is part of GAS, the GNU Assembler.
-
- GAS is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GAS is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-#ifndef SCORE_INST_H
-#define SCORE_INST_H
-
-#define LDST_UNALIGN_MASK 0x0000007f
-#define UA_LCB 0x00000060
-#define UA_LCW 0x00000062
-#define UA_LCE 0x00000066
-#define UA_SCB 0x00000068
-#define UA_SCW 0x0000006a
-#define UA_SCE 0x0000006e
-#define UA_LL 0x0000000c
-#define UA_SC 0x0000000e
-#define LDST16_RR_MASK 0x0000000f
-#define N16_LW 8
-#define N16_LH 9
-#define N16_POP 10
-#define N16_LBU 11
-#define N16_SW 12
-#define N16_SH 13
-#define N16_PUSH 14
-#define N16_SB 15
-#define LDST16_RI_MASK 0x7007
-#define N16_LWP 0x7000
-#define N16_LHP 0x7001
-#define N16_LBUP 0x7003
-#define N16_SWP 0x7004
-#define N16_SHP 0x7005
-#define N16_SBP 0x7007
-#define N16_LIU 0x5000
-
-#define OPC_PSEUDOLDST_MASK 0x00000007
-
-enum
-{
- INSN_LW = 0,
- INSN_LH = 1,
- INSN_LHU = 2,
- INSN_LB = 3,
- INSN_SW = 4,
- INSN_SH = 5,
- INSN_LBU = 6,
- INSN_SB = 7,
-};
-
-/* Sub opcdoe opcode. */
-enum
-{
- INSN16_LBU = 11,
- INSN16_LH = 9,
- INSN16_LW = 8,
- INSN16_SB = 15,
- INSN16_SH = 13,
- INSN16_SW = 12,
-};
-
-enum
-{
- LDST_NOUPDATE = 0,
- LDST_PRE = 1,
- LDST_POST = 2,
-};
-
-enum score_insn_type
-{
- Rd_I4,
- Rd_I5,
- Rd_rvalueBP_I5,
- Rd_lvalueBP_I5,
- Rd_Rs_I5,
- x_Rs_I5,
- x_I5_x,
- Rd_I8,
- Rd_Rs_I14,
- I15,
- Rd_I16,
- Rd_rvalueRs_SI10,
- Rd_lvalueRs_SI10,
- Rd_rvalueRs_preSI12,
- Rd_rvalueRs_postSI12,
- Rd_lvalueRs_preSI12,
- Rd_lvalueRs_postSI12,
- Rd_Rs_SI14,
- Rd_rvalueRs_SI15,
- Rd_lvalueRs_SI15,
- Rd_SI16,
- PC_DISP8div2,
- PC_DISP11div2,
- PC_DISP19div2,
- PC_DISP24div2,
- Rd_Rs_Rs,
- x_Rs_x,
- x_Rs_Rs,
- Rd_Rs_x,
- Rd_x_Rs,
- Rd_x_x,
- Rd_Rs,
- Rd_HighRs,
- Rd_lvalueRs,
- Rd_rvalueRs,
- Rd_lvalue32Rs,
- Rd_rvalue32Rs,
- x_Rs,
- NO_OPD,
- NO16_OPD,
- OP5_rvalueRs_SI15,
- I5_Rs_Rs_I5_OP5,
- x_rvalueRs_post4,
- Rd_rvalueRs_post4,
- Rd_x_I5,
- Rd_lvalueRs_post4,
- x_lvalueRs_post4,
- Rd_LowRs,
- Rd_Rs_Rs_imm,
- Insn_Type_PCE,
- Insn_Type_SYN,
- Insn_GP,
- Insn_PIC,
- Insn_internal,
-};
-
-enum score_data_type
-{
- _IMM4 = 0,
- _IMM5,
- _IMM8,
- _IMM14,
- _IMM15,
- _IMM16,
- _SIMM10 = 6,
- _SIMM12,
- _SIMM14,
- _SIMM15,
- _SIMM16,
- _SIMM14_NEG = 11,
- _IMM16_NEG,
- _SIMM16_NEG,
- _IMM20,
- _IMM25,
- _DISP8div2 = 16,
- _DISP11div2,
- _DISP19div2,
- _DISP24div2,
- _VALUE,
- _VALUE_HI16,
- _VALUE_LO16,
- _VALUE_LDST_LO16 = 23,
- _SIMM16_LA,
- _IMM5_RSHIFT_1,
- _IMM5_RSHIFT_2,
- _SIMM16_LA_POS,
- _IMM5_RANGE_8_31,
- _IMM10_RSHIFT_2,
- _GP_IMM15 = 30,
- _GP_IMM14 = 31,
- _SIMM16_pic = 42, /* Index in score_df_range. */
- _IMM16_LO16_pic = 43,
- _IMM16_pic = 44,
-};
-
-#define REG_TMP 1
-
-#define OP_REG_TYPE (1 << 6)
-#define OP_IMM_TYPE (1 << 7)
-#define OP_SH_REGD (OP_REG_TYPE |20)
-#define OP_SH_REGS1 (OP_REG_TYPE |15)
-#define OP_SH_REGS2 (OP_REG_TYPE |10)
-#define OP_SH_I (OP_IMM_TYPE | 1)
-#define OP_SH_RI15 (OP_IMM_TYPE | 0)
-#define OP_SH_I12 (OP_IMM_TYPE | 3)
-#define OP_SH_DISP24 (OP_IMM_TYPE | 1)
-#define OP_SH_DISP19_p1 (OP_IMM_TYPE |15)
-#define OP_SH_DISP19_p2 (OP_IMM_TYPE | 1)
-#define OP_SH_I5 (OP_IMM_TYPE |10)
-#define OP_SH_I10 (OP_IMM_TYPE | 5)
-#define OP_SH_COPID (OP_IMM_TYPE | 5)
-#define OP_SH_TRAPI5 (OP_IMM_TYPE |15)
-#define OP_SH_I15 (OP_IMM_TYPE |10)
-
-#define OP16_SH_REGD (OP_REG_TYPE | 8)
-#define OP16_SH_REGS1 (OP_REG_TYPE | 4)
-#define OP16_SH_I45 (OP_IMM_TYPE | 3)
-#define OP16_SH_I8 (OP_IMM_TYPE | 0)
-#define OP16_SH_DISP8 (OP_IMM_TYPE | 0)
-#define OP16_SH_DISP11 (OP_IMM_TYPE | 1)
-
-struct datafield_range
-{
- int data_type;
- int bits;
- int range[2];
-};
-
-struct datafield_range score_df_range[] =
-{
- {_IMM4, 4, {0, (1 << 4) - 1}}, /* ( 0 ~ 15 ) */
- {_IMM5, 5, {0, (1 << 5) - 1}}, /* ( 0 ~ 31 ) */
- {_IMM8, 8, {0, (1 << 8) - 1}}, /* ( 0 ~ 255 ) */
- {_IMM14, 14, {0, (1 << 14) - 1}}, /* ( 0 ~ 16383) */
- {_IMM15, 15, {0, (1 << 15) - 1}}, /* ( 0 ~ 32767) */
- {_IMM16, 16, {0, (1 << 16) - 1}}, /* ( 0 ~ 65535) */
- {_SIMM10, 10, {-(1 << 9), (1 << 9) - 1}}, /* ( -512 ~ 511 ) */
- {_SIMM12, 12, {-(1 << 11), (1 << 11) - 1}}, /* ( -2048 ~ 2047 ) */
- {_SIMM14, 14, {-(1 << 13), (1 << 13) - 1}}, /* ( -8192 ~ 8191 ) */
- {_SIMM15, 15, {-(1 << 14), (1 << 14) - 1}}, /* (-16384 ~ 16383) */
- {_SIMM16, 16, {-(1 << 15), (1 << 15) - 1}}, /* (-32768 ~ 32767) */
- {_SIMM14_NEG, 14, {-(1 << 13), (1 << 13) - 1}}, /* ( -8191 ~ 8192 ) */
- {_IMM16_NEG, 16, {0, (1 << 16) - 1}}, /* (-65535 ~ 0 ) */
- {_SIMM16_NEG, 16, {-(1 << 15), (1 << 15) - 1}}, /* (-32768 ~ 32767) */
- {_IMM20, 20, {0, (1 << 20) - 1}},
- {_IMM25, 25, {0, (1 << 25) - 1}},
- {_DISP8div2, 8, {-(1 << 8), (1 << 8) - 1}}, /* ( -256 ~ 255 ) */
- {_DISP11div2, 11, {0, 0}},
- {_DISP19div2, 19, {-(1 << 19), (1 << 19) - 1}}, /* (-524288 ~ 524287) */
- {_DISP24div2, 24, {0, 0}},
- {_VALUE, 32, {0, ((unsigned int)1 << 31) - 1}},
- {_VALUE_HI16, 16, {0, (1 << 16) - 1}},
- {_VALUE_LO16, 16, {0, (1 << 16) - 1}},
- {_VALUE_LDST_LO16, 16, {0, (1 << 16) - 1}},
- {_SIMM16_LA, 16, {-(1 << 15), (1 << 15) - 1}}, /* (-32768 ~ 32767) */
- {_IMM5_RSHIFT_1, 5, {0, (1 << 6) - 1}}, /* ( 0 ~ 63 ) */
- {_IMM5_RSHIFT_2, 5, {0, (1 << 7) - 1}}, /* ( 0 ~ 127 ) */
- {_SIMM16_LA_POS, 16, {0, (1 << 15) - 1}}, /* ( 0 ~ 32767) */
- {_IMM5_RANGE_8_31, 5, {8, 31}}, /* But for cop0 the valid data : (8 ~ 31). */
- {_IMM10_RSHIFT_2, 10, {-(1 << 11), (1 << 11) - 1}}, /* For ldc#, stc#. */
- {_SIMM10, 10, {0, (1 << 10) - 1}}, /* ( -1024 ~ 1023 ) */
- {_SIMM12, 12, {0, (1 << 12) - 1}}, /* ( -2048 ~ 2047 ) */
- {_SIMM14, 14, {0, (1 << 14) - 1}}, /* ( -8192 ~ 8191 ) */
- {_SIMM15, 15, {0, (1 << 15) - 1}}, /* (-16384 ~ 16383) */
- {_SIMM16, 16, {0, (1 << 16) - 1}}, /* (-65536 ~ 65536) */
- {_SIMM14_NEG, 14, {0, (1 << 16) - 1}}, /* ( -8191 ~ 8192 ) */
- {_IMM16_NEG, 16, {0, (1 << 16) - 1}}, /* ( 65535 ~ 0 ) */
- {_SIMM16_NEG, 16, {0, (1 << 16) - 1}}, /* ( 65535 ~ 0 ) */
- {_IMM20, 20, {0, (1 << 20) - 1}}, /* (-32768 ~ 32767) */
- {_IMM25, 25, {0, (1 << 25) - 1}}, /* (-32768 ~ 32767) */
- {_GP_IMM15, 15, {0, (1 << 15) - 1}}, /* ( 0 ~ 65535) */
- {_GP_IMM14, 14, {0, (1 << 14) - 1}}, /* ( 0 ~ 65535) */
- {_SIMM16_pic, 16, {-(1 << 15), (1 << 15) - 1}}, /* (-32768 ~ 32767) */
- {_IMM16_LO16_pic, 16, {0, (1 << 16) - 1}}, /* ( 65535 ~ 0 ) */
- {_IMM16_pic, 16, {0, (1 << 16) - 1}}, /* ( 0 ~ 65535) */
-};
-
-struct shift_bitmask
-{
- int opd_type;
- int opd_num;
- struct datafield_range *df_range;
- int sh[4];
- long fieldbits[4];
-};
-
-struct shift_bitmask score_sh_bits_map[] =
-{
- {
- Rd_I4, 2, &score_df_range[_IMM4],
- {OP16_SH_REGD, OP16_SH_I45, 0, 0},
- {0xf, 0xf, 0, 0},
- },
- {
- Rd_I5, 2, &score_df_range[_IMM5],
- {OP16_SH_REGD, OP16_SH_I45, 0, 0},
- {0xf, 0x1f, 0, 0},
- },
- {
- Rd_rvalueBP_I5, 2, &score_df_range[_IMM5],
- {OP16_SH_REGD, OP16_SH_I45, 0, 0},
- {0xf, 0x1f, 0, 0},
- },
- {
- Rd_lvalueBP_I5, 2, &score_df_range[_IMM5],
- {OP16_SH_REGD, OP16_SH_I45, 0, 0},
- {0xf, 0x1f, 0, 0},
- },
- {
- Rd_Rs_I5, 3, &score_df_range[_IMM5],
- {OP_SH_REGD, OP_SH_REGS1, OP_SH_I5, 0},
- {0x1f, 0x1f, 0x1f, 0},
- },
- {
- x_Rs_I5, 2, &score_df_range[_IMM5],
- {OP_SH_REGS1, OP_SH_I5, 0, 0},
- {0x1f, 0x1f, 0, 0},
- },
- {
- x_I5_x, 1, &score_df_range[_IMM5],
- {OP_SH_TRAPI5, 0, 0, 0},
- {0x1f, 0, 0, 0},
- },
- {
- Rd_I8, 2, &score_df_range[_IMM8],
- {OP16_SH_REGD, OP16_SH_I8, 0, 0},
- {0xf, 0xff, 0, 0},
- },
- {
- Rd_Rs_I14, 3, &score_df_range[_IMM14],
- {OP_SH_REGD, OP_SH_REGS1, OP_SH_I, 0},
- {0x1f, 0x1f, 0x3fff, 0},
- },
- {
- I15, 1, &score_df_range[_IMM15],
- {OP_SH_I15, 0, 0, 0},
- {0x7fff, 0, 0, 0},
- },
- {
- Rd_I16, 2, &score_df_range[_IMM16],
- {OP_SH_REGD, OP_SH_I, 0, 0},
- {0x1f, 0xffff, 0, 0},
- },
- {
- Rd_rvalueRs_SI10, 3, &score_df_range[_SIMM10],
- {OP_SH_REGD, OP_SH_REGS1, OP_SH_I10, 0},
- {0x1f, 0x1f, 0x3ff, 0},
- },
- {
- Rd_lvalueRs_SI10, 3, &score_df_range[_SIMM10],
- {OP_SH_REGD, OP_SH_REGS1, OP_SH_I10, 0},
- {0x1f, 0x1f, 0x3ff, 0},
- },
- {
- Rd_rvalueRs_preSI12, 3, &score_df_range[_SIMM12],
- {OP_SH_REGD, OP_SH_REGS1, OP_SH_I12, 0},
- {0xf, 0xf, 0xfff, 0},
- },
- {
- Rd_rvalueRs_postSI12, 3, &score_df_range[_SIMM12],
- {OP_SH_REGD, OP_SH_REGS1, OP_SH_I12, 0},
- {0xf, 0xf, 0xfff, 0},
- },
- {
- Rd_lvalueRs_preSI12, 3, &score_df_range[_SIMM12],
- {OP_SH_REGD, OP_SH_REGS1, OP_SH_I12, 0},
- {0xf, 0xf, 0xfff, 0},
- },
- {
- Rd_lvalueRs_postSI12, 3, &score_df_range[_SIMM12],
- {OP_SH_REGD, OP_SH_REGS1, OP_SH_I12, 0},
- {0xf, 0xf, 0xfff, 0},
- },
- {
- Rd_Rs_SI14, 3, &score_df_range[_SIMM14],
- {OP_SH_REGD, OP_SH_REGS1, OP_SH_I, 0},
- {0x1f, 0x1f, 0x3fff, 0},
- },
- {
- Rd_rvalueRs_SI15, 3, &score_df_range[_SIMM15],
- {OP_SH_REGD, OP_SH_REGS1, OP_SH_RI15, 0},
- {0x1f, 0x1f, 0x7fff, 0},
- },
- {
- Rd_lvalueRs_SI15, 3, &score_df_range[_SIMM15],
- {OP_SH_REGD, OP_SH_REGS1, OP_SH_RI15, 0},
- {0x1f, 0x1f, 0x7fff, 0},
- },
- {
- Rd_SI16, 2, &score_df_range[_SIMM16],
- {OP_SH_REGD, OP_SH_I, 0, 0},
- {0x1f, 0xffff, 0, 0},
- },
- {
- PC_DISP8div2, 1, &score_df_range[_DISP8div2],
- {OP16_SH_DISP8, 0, 0, 0},
- {0xff, 0, 0, 0},
- },
- {
- PC_DISP11div2, 1, &score_df_range[_DISP11div2],
- {OP16_SH_DISP11, 0, 0, 0},
- {0x7ff, 0, 0, 0},
- },
- {
- PC_DISP19div2, 2, &score_df_range[_DISP19div2],
- {OP_SH_DISP19_p1, OP_SH_DISP19_p2, 0, 0},
- {0x3ff, 0x1ff, 0, 0},
- },
- {
- PC_DISP24div2, 1, &score_df_range[_DISP24div2],
- {OP_SH_DISP24, 0, 0, 0},
- {0xffffff, 0, 0, 0},
- },
- {
- Rd_Rs_Rs, 3, NULL,
- {OP_SH_REGD, OP_SH_REGS1, OP_SH_REGS2, 0},
- {0x1f, 0x1f, 0x1f, 0}
- },
- {
- Rd_Rs_x, 2, NULL,
- {OP_SH_REGD, OP_SH_REGS1, 0, 0},
- {0x1f, 0x1f, 0, 0},
- },
- {
- Rd_x_Rs, 2, NULL,
- {OP_SH_REGD, OP_SH_REGS2, 0, 0},
- {0x1f, 0x1f, 0, 0},
- },
- {
- Rd_x_x, 1, NULL,
- {OP_SH_REGD, 0, 0, 0},
- {0x1f, 0, 0, 0},
- },
- {
- x_Rs_Rs, 2, NULL,
- {OP_SH_REGS1, OP_SH_REGS2, 0, 0},
- {0x1f, 0x1f, 0, 0},
- },
- {
- x_Rs_x, 1, NULL,
- {OP_SH_REGS1, 0, 0, 0},
- {0x1f, 0, 0, 0},
- },
- {
- Rd_Rs, 2, NULL,
- {OP16_SH_REGD, OP16_SH_REGS1, 0, 0},
- {0xf, 0xf, 0, 0},
- },
- {
- Rd_HighRs, 2, NULL,
- {OP16_SH_REGD, OP16_SH_REGS1, 0, 0},
- {0xf, 0xf, 0x1f, 0},
- },
- {
- Rd_rvalueRs, 2, NULL,
- {OP16_SH_REGD, OP16_SH_REGS1, 0, 0},
- {0xf, 0xf, 0, 0},
- },
- {
- Rd_lvalueRs, 2, NULL,
- {OP16_SH_REGD, OP16_SH_REGS1, 0, 0},
- {0xf, 0xf, 0, 0}
- },
- {
- Rd_lvalue32Rs, 2, NULL,
- {OP_SH_REGD, OP_SH_REGS1, 0, 0},
- {0x1f, 0x1f, 0, 0},
- },
- {
- Rd_rvalue32Rs, 2, NULL,
- {OP_SH_REGD, OP_SH_REGS1, 0, 0},
- {0x1f, 0x1f, 0, 0},
- },
- {
- x_Rs, 1, NULL,
- {OP16_SH_REGS1, 0, 0, 0},
- {0xf, 0, 0, 0},
- },
- {
- NO_OPD, 0, NULL,
- {0, 0, 0, 0},
- {0, 0, 0, 0},
- },
- {
- NO16_OPD, 0, NULL,
- {0, 0, 0, 0},
- {0, 0, 0, 0},
- },
-};
-
-struct asm_opcode
-{
- /* Instruction name. */
- const char *template;
-
- /* Instruction Opcode. */
- unsigned long value;
-
- /* Instruction bit mask. */
- unsigned long bitmask;
-
- /* Relax instruction opcode. 0x8000 imply no relaxation. */
- unsigned long relax_value;
-
- /* Instruction type. */
- enum score_insn_type type;
-
- /* Function to call to parse args. */
- void (*parms) (char *);
-};
-
-enum insn_class
-{
- INSN_CLASS_16,
- INSN_CLASS_32,
- INSN_CLASS_PCE,
- INSN_CLASS_SYN
-};
-
-#endif
diff --git a/include/opcode/sparc.h b/include/opcode/sparc.h
deleted file mode 100644
index 9e238be..0000000
--- a/include/opcode/sparc.h
+++ /dev/null
@@ -1,237 +0,0 @@
-/* Definitions for opcode table for the sparc.
- Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2002,
- 2003, 2005 Free Software Foundation, Inc.
-
- This file is part of GAS, the GNU Assembler, GDB, the GNU debugger, and
- the GNU Binutils.
-
- GAS/GDB is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GAS/GDB is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GAS or GDB; see the file COPYING. If not, write to
- the Free Software Foundation, 51 Franklin Street - Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-#include "ansidecl.h"
-
-/* The SPARC opcode table (and other related data) is defined in
- the opcodes library in sparc-opc.c. If you change anything here, make
- sure you fix up that file, and vice versa. */
-
- /* FIXME-someday: perhaps the ,a's and such should be embedded in the
- instruction's name rather than the args. This would make gas faster, pinsn
- slower, but would mess up some macros a bit. xoxorich. */
-
-/* List of instruction sets variations.
- These values are such that each element is either a superset of a
- preceding each one or they conflict in which case SPARC_OPCODE_CONFLICT_P
- returns non-zero.
- The values are indices into `sparc_opcode_archs' defined in sparc-opc.c.
- Don't change this without updating sparc-opc.c. */
-
-enum sparc_opcode_arch_val
-{
- SPARC_OPCODE_ARCH_V6 = 0,
- SPARC_OPCODE_ARCH_V7,
- SPARC_OPCODE_ARCH_V8,
- SPARC_OPCODE_ARCH_SPARCLET,
- SPARC_OPCODE_ARCH_SPARCLITE,
- /* V9 variants must appear last. */
- SPARC_OPCODE_ARCH_V9,
- SPARC_OPCODE_ARCH_V9A, /* V9 with ultrasparc additions. */
- SPARC_OPCODE_ARCH_V9B, /* V9 with ultrasparc and cheetah additions. */
- SPARC_OPCODE_ARCH_BAD /* Error return from sparc_opcode_lookup_arch. */
-};
-
-/* The highest architecture in the table. */
-#define SPARC_OPCODE_ARCH_MAX (SPARC_OPCODE_ARCH_BAD - 1)
-
-/* Given an enum sparc_opcode_arch_val, return the bitmask to use in
- insn encoding/decoding. */
-#define SPARC_OPCODE_ARCH_MASK(arch) (1 << (arch))
-
-/* Given a valid sparc_opcode_arch_val, return non-zero if it's v9. */
-#define SPARC_OPCODE_ARCH_V9_P(arch) ((arch) >= SPARC_OPCODE_ARCH_V9)
-
-/* Table of cpu variants. */
-
-typedef struct sparc_opcode_arch
-{
- const char *name;
- /* Mask of sparc_opcode_arch_val's supported.
- EG: For v7 this would be
- (SPARC_OPCODE_ARCH_MASK (..._V6) | SPARC_OPCODE_ARCH_MASK (..._V7)).
- These are short's because sparc_opcode.architecture is. */
- short supported;
-} sparc_opcode_arch;
-
-extern const struct sparc_opcode_arch sparc_opcode_archs[];
-
-/* Given architecture name, look up it's sparc_opcode_arch_val value. */
-extern enum sparc_opcode_arch_val sparc_opcode_lookup_arch (const char *);
-
-/* Return the bitmask of supported architectures for ARCH. */
-#define SPARC_OPCODE_SUPPORTED(ARCH) (sparc_opcode_archs[ARCH].supported)
-
-/* Non-zero if ARCH1 conflicts with ARCH2.
- IE: ARCH1 as a supported bit set that ARCH2 doesn't, and vice versa. */
-#define SPARC_OPCODE_CONFLICT_P(ARCH1, ARCH2) \
- (((SPARC_OPCODE_SUPPORTED (ARCH1) & SPARC_OPCODE_SUPPORTED (ARCH2)) \
- != SPARC_OPCODE_SUPPORTED (ARCH1)) \
- && ((SPARC_OPCODE_SUPPORTED (ARCH1) & SPARC_OPCODE_SUPPORTED (ARCH2)) \
- != SPARC_OPCODE_SUPPORTED (ARCH2)))
-
-/* Structure of an opcode table entry. */
-
-typedef struct sparc_opcode
-{
- const char *name;
- unsigned long match; /* Bits that must be set. */
- unsigned long lose; /* Bits that must not be set. */
- const char *args;
- /* This was called "delayed" in versions before the flags. */
- char flags;
- short architecture; /* Bitmask of sparc_opcode_arch_val's. */
-} sparc_opcode;
-
-#define F_DELAYED 1 /* Delayed branch. */
-#define F_ALIAS 2 /* Alias for a "real" instruction. */
-#define F_UNBR 4 /* Unconditional branch. */
-#define F_CONDBR 8 /* Conditional branch. */
-#define F_JSR 16 /* Subroutine call. */
-#define F_FLOAT 32 /* Floating point instruction (not a branch). */
-#define F_FBR 64 /* Floating point branch. */
-/* FIXME: Add F_ANACHRONISTIC flag for v9. */
-
-/* All sparc opcodes are 32 bits, except for the `set' instruction (really a
- macro), which is 64 bits. It is handled as a special case.
-
- The match component is a mask saying which bits must match a particular
- opcode in order for an instruction to be an instance of that opcode.
-
- The args component is a string containing one character for each operand of the
- instruction.
-
- Kinds of operands:
- # Number used by optimizer. It is ignored.
- 1 rs1 register.
- 2 rs2 register.
- d rd register.
- e frs1 floating point register.
- v frs1 floating point register (double/even).
- V frs1 floating point register (quad/multiple of 4).
- f frs2 floating point register.
- B frs2 floating point register (double/even).
- R frs2 floating point register (quad/multiple of 4).
- g frsd floating point register.
- H frsd floating point register (double/even).
- J frsd floating point register (quad/multiple of 4).
- b crs1 coprocessor register
- c crs2 coprocessor register
- D crsd coprocessor register
- m alternate space register (asr) in rd
- M alternate space register (asr) in rs1
- h 22 high bits.
- X 5 bit unsigned immediate
- Y 6 bit unsigned immediate
- 3 SIAM mode (3 bits). (v9b)
- K MEMBAR mask (7 bits). (v9)
- j 10 bit Immediate. (v9)
- I 11 bit Immediate. (v9)
- i 13 bit Immediate.
- n 22 bit immediate.
- k 2+14 bit PC relative immediate. (v9)
- G 19 bit PC relative immediate. (v9)
- l 22 bit PC relative immediate.
- L 30 bit PC relative immediate.
- a Annul. The annul bit is set.
- A Alternate address space. Stored as 8 bits.
- C Coprocessor state register.
- F floating point state register.
- p Processor state register.
- N Branch predict clear ",pn" (v9)
- T Branch predict set ",pt" (v9)
- z %icc. (v9)
- Z %xcc. (v9)
- q Floating point queue.
- r Single register that is both rs1 and rd.
- O Single register that is both rs2 and rd.
- Q Coprocessor queue.
- S Special case.
- t Trap base register.
- w Window invalid mask register.
- y Y register.
- u sparclet coprocessor registers in rd position
- U sparclet coprocessor registers in rs1 position
- E %ccr. (v9)
- s %fprs. (v9)
- P %pc. (v9)
- W %tick. (v9)
- o %asi. (v9)
- 6 %fcc0. (v9)
- 7 %fcc1. (v9)
- 8 %fcc2. (v9)
- 9 %fcc3. (v9)
- ! Privileged Register in rd (v9)
- ? Privileged Register in rs1 (v9)
- * Prefetch function constant. (v9)
- x OPF field (v9 impdep).
- 0 32/64 bit immediate for set or setx (v9) insns
- _ Ancillary state register in rd (v9a)
- / Ancillary state register in rs1 (v9a)
-
- The following chars are unused: (note: ,[] are used as punctuation)
- [45]. */
-
-#define OP2(x) (((x) & 0x7) << 22) /* Op2 field of format2 insns. */
-#define OP3(x) (((x) & 0x3f) << 19) /* Op3 field of format3 insns. */
-#define OP(x) ((unsigned) ((x) & 0x3) << 30) /* Op field of all insns. */
-#define OPF(x) (((x) & 0x1ff) << 5) /* Opf field of float insns. */
-#define OPF_LOW5(x) OPF ((x) & 0x1f) /* V9. */
-#define F3F(x, y, z) (OP (x) | OP3 (y) | OPF (z)) /* Format3 float insns. */
-#define F3I(x) (((x) & 0x1) << 13) /* Immediate field of format 3 insns. */
-#define F2(x, y) (OP (x) | OP2(y)) /* Format 2 insns. */
-#define F3(x, y, z) (OP (x) | OP3(y) | F3I(z)) /* Format3 insns. */
-#define F1(x) (OP (x))
-#define DISP30(x) ((x) & 0x3fffffff)
-#define ASI(x) (((x) & 0xff) << 5) /* Asi field of format3 insns. */
-#define RS2(x) ((x) & 0x1f) /* Rs2 field. */
-#define SIMM13(x) ((x) & 0x1fff) /* Simm13 field. */
-#define RD(x) (((x) & 0x1f) << 25) /* Destination register field. */
-#define RS1(x) (((x) & 0x1f) << 14) /* Rs1 field. */
-#define ASI_RS2(x) (SIMM13 (x))
-#define MEMBAR(x) ((x) & 0x7f)
-#define SLCPOP(x) (((x) & 0x7f) << 6) /* Sparclet cpop. */
-
-#define ANNUL (1 << 29)
-#define BPRED (1 << 19) /* V9. */
-#define IMMED F3I (1)
-#define RD_G0 RD (~0)
-#define RS1_G0 RS1 (~0)
-#define RS2_G0 RS2 (~0)
-
-extern const struct sparc_opcode sparc_opcodes[];
-extern const int sparc_num_opcodes;
-
-extern int sparc_encode_asi (const char *);
-extern const char *sparc_decode_asi (int);
-extern int sparc_encode_membar (const char *);
-extern const char *sparc_decode_membar (int);
-extern int sparc_encode_prefetch (const char *);
-extern const char *sparc_decode_prefetch (int);
-extern int sparc_encode_sparclet_cpreg (const char *);
-extern const char *sparc_decode_sparclet_cpreg (int);
-
-/* Local Variables:
- fill-column: 131
- comment-column: 0
- End: */
-
diff --git a/include/opcode/spu-insns.h b/include/opcode/spu-insns.h
deleted file mode 100644
index 237d8ab..0000000
--- a/include/opcode/spu-insns.h
+++ /dev/null
@@ -1,417 +0,0 @@
-/* SPU ELF support for BFD.
-
- Copyright 2006, 2007 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* SPU Opcode Table
-
--=-=-= FORMAT =-=-=-
-
- +----+-------+-------+-------+-------+ +------------+-------+-------+-------+
-RRR | op | RC | RB | RA | RT | RI7 | op | I7 | RA | RT |
- +----+-------+-------+-------+-------+ +------------+-------+-------+-------+
- 0 3 1 1 2 3 0 1 1 2 3
- 0 7 4 1 0 7 4 1
-
- +-----------+--------+-------+-------+ +---------+----------+-------+-------+
-RI8 | op | I8 | RA | RT | RI10 | op | I10 | RA | RT |
- +-----------+--------+-------+-------+ +---------+----------+-------+-------+
- 0 9 1 2 3 0 7 1 2 3
- 7 4 1 7 4 1
-
- +----------+-----------------+-------+ +--------+-------------------+-------+
-RI16 | op | I16 | RT | RI18 | op | I18 | RT |
- +----------+-----------------+-------+ +--------+-------------------+-------+
- 0 8 2 3 0 6 2 3
- 4 1 4 1
-
- +------------+-------+-------+-------+ +-------+--+-----------------+-------+
-RR | op | RB | RA | RT | LBT | op |RO| I16 | RO |
- +------------+-------+-------+-------+ +-------+--+-----------------+-------+
- 0 1 1 2 3 0 6 8 2 3
- 0 7 4 1 4 1
-
- +------------+----+--+-------+-------+
- LBTI | op | // |RO| RA | RO |
- +------------+----+--+-------+-------+
- 0 1 1 1 2 3
- 0 5 7 4 1
-
--=-=-= OPCODE =-=-=-
-
-OPCODE field specifies the most significant 11bit of the instruction. Some formats don't have 11bits for opcode field, and in this
-case, bit field other than op are defined as 0s. For example, opcode of fma instruction which is RRR format is defined as 0x700,
-since 0x700 -> 11'b11100000000, this means opcode is 4'b1110, and other 7bits are defined as 7'b0000000.
-
--=-=-= ASM_FORMAT =-=-=-
-
-RRR category RI7 category
- ASM_RRR mnemonic RC, RA, RB, RT ASM_RI4 mnemonic RT, RA, I4
- ASM_RI7 mnemonic RT, RA, I7
-
-RI8 category RI10 category
- ASM_RUI8 mnemonic RT, RA, UI8 ASM_AI10 mnemonic RA, I10
- ASM_RI10 mnemonic RT, RA, R10
- ASM_RI10IDX mnemonic RT, I10(RA)
-
-RI16 category RI18 category
- ASM_I16W mnemonic I16W ASM_RI18 mnemonic RT, I18
- ASM_RI16 mnemonic RT, I16
- ASM_RI16W mnemonic RT, I16W
-
-RR category LBT category
- ASM_MFSPR mnemonic RT, SA ASM_LBT mnemonic brinst, brtarg
- ASM_MTSPR mnemonic SA, RT
- ASM_NOOP mnemonic LBTI category
- ASM_RA mnemonic RA ASM_LBTI mnemonic brinst, RA
- ASM_RAB mnemonic RA, RB
- ASM_RDCH mnemonic RT, CA
- ASM_RR mnemonic RT, RA, RB
- ASM_RT mnemonic RT
- ASM_RTA mnemonic RT, RA
- ASM_WRCH mnemonic CA, RT
-
-Note that RRR instructions have the names for RC and RT reversed from
-what's in the ISA, in order to put RT in the same position it appears
-for other formats.
-
--=-=-= DEPENDENCY =-=-=-
-
-DEPENDENCY filed consists of 5 digits. This represents which register is used as source and which register is used as target.
-The first(most significant) digit is always 0. Then it is followd by RC, RB, RA and RT digits.
-If the digit is 0, this means the corresponding register is not used in the instruction.
-If the digit is 1, this means the corresponding register is used as a source in the instruction.
-If the digit is 2, this means the corresponding register is used as a target in the instruction.
-If the digit is 3, this means the corresponding register is used as both source and target in the instruction.
-For example, fms instruction has 00113 as the DEPENDENCY field. This means RC is not used in this operation, RB and RA are
-used as sources and RT is the target.
-
--=-=-= PIPE =-=-=-
-
-This field shows which execution pipe is used for the instruction
-
-pipe0 execution pipelines:
- FP6 SP floating pipeline
- FP7 integer operations executed in SP floating pipeline
- FPD DP floating pipeline
- FX2 FXU pipeline
- FX3 Rotate/Shift pipeline
- FXB Byte pipeline
- NOP No pipeline
-
-pipe1 execution pipelines:
- BR Branch pipeline
- LNOP No pipeline
- LS Load/Store pipeline
- SHUF Shuffle pipeline
- SPR SPR/CH pipeline
-
-*/
-
-#define _A0() {0}
-#define _A1(a) {1,a}
-#define _A2(a,b) {2,a,b}
-#define _A3(a,b,c) {3,a,b,c}
-#define _A4(a,b,c,d) {4,a,b,c,d}
-
-/* TAG FORMAT OPCODE MNEMONIC ASM_FORMAT DEPENDENCY PIPE COMMENT */
-/* 0[RC][RB][RA][RT] */
-/* 1:src, 2:target */
-
-APUOP(M_BR, RI16, 0x190, "br", _A1(A_R18), 00000, BR) /* BRel IP<-IP+I16 */
-APUOP(M_BRSL, RI16, 0x198, "brsl", _A2(A_T,A_R18), 00002, BR) /* BRelSetLink RT,IP<-IP,IP+I16 */
-APUOP(M_BRA, RI16, 0x180, "bra", _A1(A_S18), 00000, BR) /* BRAbs IP<-I16 */
-APUOP(M_BRASL, RI16, 0x188, "brasl", _A2(A_T,A_S18), 00002, BR) /* BRAbsSetLink RT,IP<-IP,I16 */
-APUOP(M_FSMBI, RI16, 0x194, "fsmbi", _A2(A_T,A_X16), 00002, SHUF) /* FormSelMask%I RT<-fsm(I16) */
-APUOP(M_LQA, RI16, 0x184, "lqa", _A2(A_T,A_S18), 00002, LS) /* LoadQAbs RT<-M[I16] */
-APUOP(M_LQR, RI16, 0x19C, "lqr", _A2(A_T,A_R18), 00002, LS) /* LoadQRel RT<-M[IP+I16] */
-APUOP(M_STOP, RR, 0x000, "stop", _A0(), 00000, BR) /* STOP stop */
-APUOP(M_STOP2, RR, 0x000, "stop", _A1(A_U14), 00000, BR) /* STOP stop */
-APUOP(M_STOPD, RR, 0x140, "stopd", _A3(A_T,A_A,A_B), 00111, BR) /* STOPD stop (with register dependencies) */
-APUOP(M_LNOP, RR, 0x001, "lnop", _A0(), 00000, LNOP) /* LNOP no_operation */
-APUOP(M_SYNC, RR, 0x002, "sync", _A0(), 00000, BR) /* SYNC flush_pipe */
-APUOP(M_DSYNC, RR, 0x003, "dsync", _A0(), 00000, BR) /* DSYNC flush_store_queue */
-APUOP(M_MFSPR, RR, 0x00c, "mfspr", _A2(A_T,A_S), 00002, SPR) /* MFSPR RT<-SA */
-APUOP(M_RDCH, RR, 0x00d, "rdch", _A2(A_T,A_H), 00002, SPR) /* ReaDCHannel RT<-CA:data */
-APUOP(M_RCHCNT, RR, 0x00f, "rchcnt", _A2(A_T,A_H), 00002, SPR) /* ReaDCHanCouNT RT<-CA:count */
-APUOP(M_HBRA, LBT, 0x080, "hbra", _A2(A_S11,A_S18), 00000, LS) /* HBRA BTB[B9]<-M[I16] */
-APUOP(M_HBRR, LBT, 0x090, "hbrr", _A2(A_S11,A_R18), 00000, LS) /* HBRR BTB[B9]<-M[IP+I16] */
-APUOP(M_BRZ, RI16, 0x100, "brz", _A2(A_T,A_R18), 00001, BR) /* BRZ IP<-IP+I16_if(RT) */
-APUOP(M_BRNZ, RI16, 0x108, "brnz", _A2(A_T,A_R18), 00001, BR) /* BRNZ IP<-IP+I16_if(RT) */
-APUOP(M_BRHZ, RI16, 0x110, "brhz", _A2(A_T,A_R18), 00001, BR) /* BRHZ IP<-IP+I16_if(RT) */
-APUOP(M_BRHNZ, RI16, 0x118, "brhnz", _A2(A_T,A_R18), 00001, BR) /* BRHNZ IP<-IP+I16_if(RT) */
-APUOP(M_STQA, RI16, 0x104, "stqa", _A2(A_T,A_S18), 00001, LS) /* SToreQAbs M[I16]<-RT */
-APUOP(M_STQR, RI16, 0x11C, "stqr", _A2(A_T,A_R18), 00001, LS) /* SToreQRel M[IP+I16]<-RT */
-APUOP(M_MTSPR, RR, 0x10c, "mtspr", _A2(A_S,A_T), 00001, SPR) /* MTSPR SA<-RT */
-APUOP(M_WRCH, RR, 0x10d, "wrch", _A2(A_H,A_T), 00001, SPR) /* ChanWRite CA<-RT */
-APUOP(M_LQD, RI10, 0x1a0, "lqd", _A4(A_T,A_S14,A_P,A_A), 00012, LS) /* LoadQDisp RT<-M[Ra+I10] */
-APUOP(M_BI, RR, 0x1a8, "bi", _A1(A_A), 00010, BR) /* BI IP<-RA */
-APUOP(M_BISL, RR, 0x1a9, "bisl", _A2(A_T,A_A), 00012, BR) /* BISL RT,IP<-IP,RA */
-APUOP(M_IRET, RR, 0x1aa, "iret", _A1(A_A), 00010, BR) /* IRET IP<-SRR0 */
-APUOP(M_IRET2, RR, 0x1aa, "iret", _A0(), 00010, BR) /* IRET IP<-SRR0 */
-APUOP(M_BISLED, RR, 0x1ab, "bisled", _A2(A_T,A_A), 00012, BR) /* BISLED RT,IP<-IP,RA_if(ext) */
-APUOP(M_HBR, LBTI, 0x1ac, "hbr", _A2(A_S11I,A_A), 00010, LS) /* HBR BTB[B9]<-M[Ra] */
-APUOP(M_FREST, RR, 0x1b8, "frest", _A2(A_T,A_A), 00012, SHUF) /* FREST RT<-recip(RA) */
-APUOP(M_FRSQEST, RR, 0x1b9, "frsqest", _A2(A_T,A_A), 00012, SHUF) /* FRSQEST RT<-rsqrt(RA) */
-APUOP(M_FSM, RR, 0x1b4, "fsm", _A2(A_T,A_A), 00012, SHUF) /* FormSelMask% RT<-expand(Ra) */
-APUOP(M_FSMH, RR, 0x1b5, "fsmh", _A2(A_T,A_A), 00012, SHUF) /* FormSelMask% RT<-expand(Ra) */
-APUOP(M_FSMB, RR, 0x1b6, "fsmb", _A2(A_T,A_A), 00012, SHUF) /* FormSelMask% RT<-expand(Ra) */
-APUOP(M_GB, RR, 0x1b0, "gb", _A2(A_T,A_A), 00012, SHUF) /* GatherBits% RT<-gather(RA) */
-APUOP(M_GBH, RR, 0x1b1, "gbh", _A2(A_T,A_A), 00012, SHUF) /* GatherBits% RT<-gather(RA) */
-APUOP(M_GBB, RR, 0x1b2, "gbb", _A2(A_T,A_A), 00012, SHUF) /* GatherBits% RT<-gather(RA) */
-APUOP(M_CBD, RI7, 0x1f4, "cbd", _A4(A_T,A_U7,A_P,A_A), 00012, SHUF) /* genCtl%%insD RT<-sta(Ra+I4,siz) */
-APUOP(M_CHD, RI7, 0x1f5, "chd", _A4(A_T,A_U7,A_P,A_A), 00012, SHUF) /* genCtl%%insD RT<-sta(Ra+I4,siz) */
-APUOP(M_CWD, RI7, 0x1f6, "cwd", _A4(A_T,A_U7,A_P,A_A), 00012, SHUF) /* genCtl%%insD RT<-sta(Ra+I4,siz) */
-APUOP(M_CDD, RI7, 0x1f7, "cdd", _A4(A_T,A_U7,A_P,A_A), 00012, SHUF) /* genCtl%%insD RT<-sta(Ra+I4,siz) */
-APUOP(M_ROTQBII, RI7, 0x1f8, "rotqbii", _A3(A_T,A_A,A_U3), 00012, SHUF) /* ROTQBII RT<-RA<<<I7 */
-APUOP(M_ROTQBYI, RI7, 0x1fc, "rotqbyi", _A3(A_T,A_A,A_S7N), 00012, SHUF) /* ROTQBYI RT<-RA<<<(I7*8) */
-APUOP(M_ROTQMBII, RI7, 0x1f9, "rotqmbii", _A3(A_T,A_A,A_S3), 00012, SHUF) /* ROTQMBII RT<-RA<<I7 */
-APUOP(M_ROTQMBYI, RI7, 0x1fd, "rotqmbyi", _A3(A_T,A_A,A_S6), 00012, SHUF) /* ROTQMBYI RT<-RA<<I7 */
-APUOP(M_SHLQBII, RI7, 0x1fb, "shlqbii", _A3(A_T,A_A,A_U3), 00012, SHUF) /* SHLQBII RT<-RA<<I7 */
-APUOP(M_SHLQBYI, RI7, 0x1ff, "shlqbyi", _A3(A_T,A_A,A_U5), 00012, SHUF) /* SHLQBYI RT<-RA<<I7 */
-APUOP(M_STQD, RI10, 0x120, "stqd", _A4(A_T,A_S14,A_P,A_A), 00011, LS) /* SToreQDisp M[Ra+I10]<-RT */
-APUOP(M_BIHNZ, RR, 0x12b, "bihnz", _A2(A_T,A_A), 00011, BR) /* BIHNZ IP<-RA_if(RT) */
-APUOP(M_BIHZ, RR, 0x12a, "bihz", _A2(A_T,A_A), 00011, BR) /* BIHZ IP<-RA_if(RT) */
-APUOP(M_BINZ, RR, 0x129, "binz", _A2(A_T,A_A), 00011, BR) /* BINZ IP<-RA_if(RT) */
-APUOP(M_BIZ, RR, 0x128, "biz", _A2(A_T,A_A), 00011, BR) /* BIZ IP<-RA_if(RT) */
-APUOP(M_CBX, RR, 0x1d4, "cbx", _A3(A_T,A_A,A_B), 00112, SHUF) /* genCtl%%insX RT<-sta(Ra+Rb,siz) */
-APUOP(M_CHX, RR, 0x1d5, "chx", _A3(A_T,A_A,A_B), 00112, SHUF) /* genCtl%%insX RT<-sta(Ra+Rb,siz) */
-APUOP(M_CWX, RR, 0x1d6, "cwx", _A3(A_T,A_A,A_B), 00112, SHUF) /* genCtl%%insX RT<-sta(Ra+Rb,siz) */
-APUOP(M_CDX, RR, 0x1d7, "cdx", _A3(A_T,A_A,A_B), 00112, SHUF) /* genCtl%%insX RT<-sta(Ra+Rb,siz) */
-APUOP(M_LQX, RR, 0x1c4, "lqx", _A3(A_T,A_A,A_B), 00112, LS) /* LoadQindeX RT<-M[Ra+Rb] */
-APUOP(M_ROTQBI, RR, 0x1d8, "rotqbi", _A3(A_T,A_A,A_B), 00112, SHUF) /* ROTQBI RT<-RA<<<Rb */
-APUOP(M_ROTQMBI, RR, 0x1d9, "rotqmbi", _A3(A_T,A_A,A_B), 00112, SHUF) /* ROTQMBI RT<-RA<<Rb */
-APUOP(M_SHLQBI, RR, 0x1db, "shlqbi", _A3(A_T,A_A,A_B), 00112, SHUF) /* SHLQBI RT<-RA<<Rb */
-APUOP(M_ROTQBY, RR, 0x1dc, "rotqby", _A3(A_T,A_A,A_B), 00112, SHUF) /* ROTQBY RT<-RA<<<(Rb*8) */
-APUOP(M_ROTQMBY, RR, 0x1dd, "rotqmby", _A3(A_T,A_A,A_B), 00112, SHUF) /* ROTQMBY RT<-RA<<Rb */
-APUOP(M_SHLQBY, RR, 0x1df, "shlqby", _A3(A_T,A_A,A_B), 00112, SHUF) /* SHLQBY RT<-RA<<Rb */
-APUOP(M_ROTQBYBI, RR, 0x1cc, "rotqbybi", _A3(A_T,A_A,A_B), 00112, SHUF) /* ROTQBYBI RT<-RA<<Rb */
-APUOP(M_ROTQMBYBI, RR, 0x1cd, "rotqmbybi", _A3(A_T,A_A,A_B), 00112, SHUF) /* ROTQMBYBI RT<-RA<<Rb */
-APUOP(M_SHLQBYBI, RR, 0x1cf, "shlqbybi", _A3(A_T,A_A,A_B), 00112, SHUF) /* SHLQBYBI RT<-RA<<Rb */
-APUOP(M_STQX, RR, 0x144, "stqx", _A3(A_T,A_A,A_B), 00111, LS) /* SToreQindeX M[Ra+Rb]<-RT */
-APUOP(M_SHUFB, RRR, 0x580, "shufb", _A4(A_C,A_A,A_B,A_T), 02111, SHUF) /* SHUFfleBytes RC<-f(RA,RB,RT) */
-APUOP(M_IL, RI16, 0x204, "il", _A2(A_T,A_S16), 00002, FX2) /* ImmLoad RT<-sxt(I16) */
-APUOP(M_ILH, RI16, 0x20c, "ilh", _A2(A_T,A_X16), 00002, FX2) /* ImmLoadH RT<-I16 */
-APUOP(M_ILHU, RI16, 0x208, "ilhu", _A2(A_T,A_X16), 00002, FX2) /* ImmLoadHUpper RT<-I16<<16 */
-APUOP(M_ILA, RI18, 0x210, "ila", _A2(A_T,A_U18), 00002, FX2) /* ImmLoadAddr RT<-zxt(I18) */
-APUOP(M_NOP, RR, 0x201, "nop", _A1(A_T), 00000, NOP) /* XNOP no_operation */
-APUOP(M_NOP2, RR, 0x201, "nop", _A0(), 00000, NOP) /* XNOP no_operation */
-APUOP(M_IOHL, RI16, 0x304, "iohl", _A2(A_T,A_X16), 00003, FX2) /* AddImmeXt RT<-RT+sxt(I16) */
-APUOP(M_ANDBI, RI10, 0x0b0, "andbi", _A3(A_T,A_A,A_S10B), 00012, FX2) /* AND%I RT<-RA&I10 */
-APUOP(M_ANDHI, RI10, 0x0a8, "andhi", _A3(A_T,A_A,A_S10), 00012, FX2) /* AND%I RT<-RA&I10 */
-APUOP(M_ANDI, RI10, 0x0a0, "andi", _A3(A_T,A_A,A_S10), 00012, FX2) /* AND%I RT<-RA&I10 */
-APUOP(M_ORBI, RI10, 0x030, "orbi", _A3(A_T,A_A,A_S10B), 00012, FX2) /* OR%I RT<-RA|I10 */
-APUOP(M_ORHI, RI10, 0x028, "orhi", _A3(A_T,A_A,A_S10), 00012, FX2) /* OR%I RT<-RA|I10 */
-APUOP(M_ORI, RI10, 0x020, "ori", _A3(A_T,A_A,A_S10), 00012, FX2) /* OR%I RT<-RA|I10 */
-APUOP(M_ORX, RR, 0x1f0, "orx", _A2(A_T,A_A), 00012, BR) /* ORX RT<-RA.w0|RA.w1|RA.w2|RA.w3 */
-APUOP(M_XORBI, RI10, 0x230, "xorbi", _A3(A_T,A_A,A_S10B), 00012, FX2) /* XOR%I RT<-RA^I10 */
-APUOP(M_XORHI, RI10, 0x228, "xorhi", _A3(A_T,A_A,A_S10), 00012, FX2) /* XOR%I RT<-RA^I10 */
-APUOP(M_XORI, RI10, 0x220, "xori", _A3(A_T,A_A,A_S10), 00012, FX2) /* XOR%I RT<-RA^I10 */
-APUOP(M_AHI, RI10, 0x0e8, "ahi", _A3(A_T,A_A,A_S10), 00012, FX2) /* Add%Immed RT<-RA+I10 */
-APUOP(M_AI, RI10, 0x0e0, "ai", _A3(A_T,A_A,A_S10), 00012, FX2) /* Add%Immed RT<-RA+I10 */
-APUOP(M_SFHI, RI10, 0x068, "sfhi", _A3(A_T,A_A,A_S10), 00012, FX2) /* SubFrom%Imm RT<-I10-RA */
-APUOP(M_SFI, RI10, 0x060, "sfi", _A3(A_T,A_A,A_S10), 00012, FX2) /* SubFrom%Imm RT<-I10-RA */
-APUOP(M_CGTBI, RI10, 0x270, "cgtbi", _A3(A_T,A_A,A_S10B), 00012, FX2) /* CGT%I RT<-(RA>I10) */
-APUOP(M_CGTHI, RI10, 0x268, "cgthi", _A3(A_T,A_A,A_S10), 00012, FX2) /* CGT%I RT<-(RA>I10) */
-APUOP(M_CGTI, RI10, 0x260, "cgti", _A3(A_T,A_A,A_S10), 00012, FX2) /* CGT%I RT<-(RA>I10) */
-APUOP(M_CLGTBI, RI10, 0x2f0, "clgtbi", _A3(A_T,A_A,A_S10B), 00012, FX2) /* CLGT%I RT<-(RA>I10) */
-APUOP(M_CLGTHI, RI10, 0x2e8, "clgthi", _A3(A_T,A_A,A_S10), 00012, FX2) /* CLGT%I RT<-(RA>I10) */
-APUOP(M_CLGTI, RI10, 0x2e0, "clgti", _A3(A_T,A_A,A_S10), 00012, FX2) /* CLGT%I RT<-(RA>I10) */
-APUOP(M_CEQBI, RI10, 0x3f0, "ceqbi", _A3(A_T,A_A,A_S10B), 00012, FX2) /* CEQ%I RT<-(RA=I10) */
-APUOP(M_CEQHI, RI10, 0x3e8, "ceqhi", _A3(A_T,A_A,A_S10), 00012, FX2) /* CEQ%I RT<-(RA=I10) */
-APUOP(M_CEQI, RI10, 0x3e0, "ceqi", _A3(A_T,A_A,A_S10), 00012, FX2) /* CEQ%I RT<-(RA=I10) */
-APUOP(M_HGTI, RI10, 0x278, "hgti", _A3(A_T,A_A,A_S10), 00010, FX2) /* HaltGTI halt_if(RA>I10) */
-APUOP(M_HGTI2, RI10, 0x278, "hgti", _A2(A_A,A_S10), 00010, FX2) /* HaltGTI halt_if(RA>I10) */
-APUOP(M_HLGTI, RI10, 0x2f8, "hlgti", _A3(A_T,A_A,A_S10), 00010, FX2) /* HaltLGTI halt_if(RA>I10) */
-APUOP(M_HLGTI2, RI10, 0x2f8, "hlgti", _A2(A_A,A_S10), 00010, FX2) /* HaltLGTI halt_if(RA>I10) */
-APUOP(M_HEQI, RI10, 0x3f8, "heqi", _A3(A_T,A_A,A_S10), 00010, FX2) /* HaltEQImm halt_if(RA=I10) */
-APUOP(M_HEQI2, RI10, 0x3f8, "heqi", _A2(A_A,A_S10), 00010, FX2) /* HaltEQImm halt_if(RA=I10) */
-APUOP(M_MPYI, RI10, 0x3a0, "mpyi", _A3(A_T,A_A,A_S10), 00012, FP7) /* MPYI RT<-RA*I10 */
-APUOP(M_MPYUI, RI10, 0x3a8, "mpyui", _A3(A_T,A_A,A_S10), 00012, FP7) /* MPYUI RT<-RA*I10 */
-APUOP(M_CFLTS, RI8, 0x3b0, "cflts", _A3(A_T,A_A,A_U7A), 00012, FP7) /* CFLTS RT<-int(RA,I8) */
-APUOP(M_CFLTU, RI8, 0x3b2, "cfltu", _A3(A_T,A_A,A_U7A), 00012, FP7) /* CFLTU RT<-int(RA,I8) */
-APUOP(M_CSFLT, RI8, 0x3b4, "csflt", _A3(A_T,A_A,A_U7B), 00012, FP7) /* CSFLT RT<-flt(RA,I8) */
-APUOP(M_CUFLT, RI8, 0x3b6, "cuflt", _A3(A_T,A_A,A_U7B), 00012, FP7) /* CUFLT RT<-flt(RA,I8) */
-APUOP(M_FESD, RR, 0x3b8, "fesd", _A2(A_T,A_A), 00012, FPD) /* FESD RT<-double(RA) */
-APUOP(M_FRDS, RR, 0x3b9, "frds", _A2(A_T,A_A), 00012, FPD) /* FRDS RT<-single(RA) */
-APUOP(M_FSCRRD, RR, 0x398, "fscrrd", _A1(A_T), 00002, FPD) /* FSCRRD RT<-FP_status */
-APUOP(M_FSCRWR, RR, 0x3ba, "fscrwr", _A2(A_T,A_A), 00010, FP7) /* FSCRWR FP_status<-RA */
-APUOP(M_FSCRWR2, RR, 0x3ba, "fscrwr", _A1(A_A), 00010, FP7) /* FSCRWR FP_status<-RA */
-APUOP(M_CLZ, RR, 0x2a5, "clz", _A2(A_T,A_A), 00012, FX2) /* CLZ RT<-clz(RA) */
-APUOP(M_CNTB, RR, 0x2b4, "cntb", _A2(A_T,A_A), 00012, FXB) /* CNT RT<-pop(RA) */
-APUOP(M_XSBH, RR, 0x2b6, "xsbh", _A2(A_T,A_A), 00012, FX2) /* eXtSignBtoH RT<-sign_ext(RA) */
-APUOP(M_XSHW, RR, 0x2ae, "xshw", _A2(A_T,A_A), 00012, FX2) /* eXtSignHtoW RT<-sign_ext(RA) */
-APUOP(M_XSWD, RR, 0x2a6, "xswd", _A2(A_T,A_A), 00012, FX2) /* eXtSignWtoD RT<-sign_ext(RA) */
-APUOP(M_ROTI, RI7, 0x078, "roti", _A3(A_T,A_A,A_S7N), 00012, FX3) /* ROT%I RT<-RA<<<I7 */
-APUOP(M_ROTMI, RI7, 0x079, "rotmi", _A3(A_T,A_A,A_S7), 00012, FX3) /* ROT%MI RT<-RA<<I7 */
-APUOP(M_ROTMAI, RI7, 0x07a, "rotmai", _A3(A_T,A_A,A_S7), 00012, FX3) /* ROTMA%I RT<-RA<<I7 */
-APUOP(M_SHLI, RI7, 0x07b, "shli", _A3(A_T,A_A,A_U6), 00012, FX3) /* SHL%I RT<-RA<<I7 */
-APUOP(M_ROTHI, RI7, 0x07c, "rothi", _A3(A_T,A_A,A_S7N), 00012, FX3) /* ROT%I RT<-RA<<<I7 */
-APUOP(M_ROTHMI, RI7, 0x07d, "rothmi", _A3(A_T,A_A,A_S6), 00012, FX3) /* ROT%MI RT<-RA<<I7 */
-APUOP(M_ROTMAHI, RI7, 0x07e, "rotmahi", _A3(A_T,A_A,A_S6), 00012, FX3) /* ROTMA%I RT<-RA<<I7 */
-APUOP(M_SHLHI, RI7, 0x07f, "shlhi", _A3(A_T,A_A,A_U5), 00012, FX3) /* SHL%I RT<-RA<<I7 */
-APUOP(M_A, RR, 0x0c0, "a", _A3(A_T,A_A,A_B), 00112, FX2) /* Add% RT<-RA+RB */
-APUOP(M_AH, RR, 0x0c8, "ah", _A3(A_T,A_A,A_B), 00112, FX2) /* Add% RT<-RA+RB */
-APUOP(M_SF, RR, 0x040, "sf", _A3(A_T,A_A,A_B), 00112, FX2) /* SubFrom% RT<-RB-RA */
-APUOP(M_SFH, RR, 0x048, "sfh", _A3(A_T,A_A,A_B), 00112, FX2) /* SubFrom% RT<-RB-RA */
-APUOP(M_CGT, RR, 0x240, "cgt", _A3(A_T,A_A,A_B), 00112, FX2) /* CGT% RT<-(RA>RB) */
-APUOP(M_CGTB, RR, 0x250, "cgtb", _A3(A_T,A_A,A_B), 00112, FX2) /* CGT% RT<-(RA>RB) */
-APUOP(M_CGTH, RR, 0x248, "cgth", _A3(A_T,A_A,A_B), 00112, FX2) /* CGT% RT<-(RA>RB) */
-APUOP(M_CLGT, RR, 0x2c0, "clgt", _A3(A_T,A_A,A_B), 00112, FX2) /* CLGT% RT<-(RA>RB) */
-APUOP(M_CLGTB, RR, 0x2d0, "clgtb", _A3(A_T,A_A,A_B), 00112, FX2) /* CLGT% RT<-(RA>RB) */
-APUOP(M_CLGTH, RR, 0x2c8, "clgth", _A3(A_T,A_A,A_B), 00112, FX2) /* CLGT% RT<-(RA>RB) */
-APUOP(M_CEQ, RR, 0x3c0, "ceq", _A3(A_T,A_A,A_B), 00112, FX2) /* CEQ% RT<-(RA=RB) */
-APUOP(M_CEQB, RR, 0x3d0, "ceqb", _A3(A_T,A_A,A_B), 00112, FX2) /* CEQ% RT<-(RA=RB) */
-APUOP(M_CEQH, RR, 0x3c8, "ceqh", _A3(A_T,A_A,A_B), 00112, FX2) /* CEQ% RT<-(RA=RB) */
-APUOP(M_HGT, RR, 0x258, "hgt", _A3(A_T,A_A,A_B), 00110, FX2) /* HaltGT halt_if(RA>RB) */
-APUOP(M_HGT2, RR, 0x258, "hgt", _A2(A_A,A_B), 00110, FX2) /* HaltGT halt_if(RA>RB) */
-APUOP(M_HLGT, RR, 0x2d8, "hlgt", _A3(A_T,A_A,A_B), 00110, FX2) /* HaltLGT halt_if(RA>RB) */
-APUOP(M_HLGT2, RR, 0x2d8, "hlgt", _A2(A_A,A_B), 00110, FX2) /* HaltLGT halt_if(RA>RB) */
-APUOP(M_HEQ, RR, 0x3d8, "heq", _A3(A_T,A_A,A_B), 00110, FX2) /* HaltEQ halt_if(RA=RB) */
-APUOP(M_HEQ2, RR, 0x3d8, "heq", _A2(A_A,A_B), 00110, FX2) /* HaltEQ halt_if(RA=RB) */
-APUOP(M_FCEQ, RR, 0x3c2, "fceq", _A3(A_T,A_A,A_B), 00112, FX2) /* FCEQ RT<-(RA=RB) */
-APUOP(M_FCMEQ, RR, 0x3ca, "fcmeq", _A3(A_T,A_A,A_B), 00112, FX2) /* FCMEQ RT<-(|RA|=|RB|) */
-APUOP(M_FCGT, RR, 0x2c2, "fcgt", _A3(A_T,A_A,A_B), 00112, FX2) /* FCGT RT<-(RA<RB) */
-APUOP(M_FCMGT, RR, 0x2ca, "fcmgt", _A3(A_T,A_A,A_B), 00112, FX2) /* FCMGT RT<-(|RA|<|RB|) */
-APUOP(M_AND, RR, 0x0c1, "and", _A3(A_T,A_A,A_B), 00112, FX2) /* AND RT<-RA&RB */
-APUOP(M_NAND, RR, 0x0c9, "nand", _A3(A_T,A_A,A_B), 00112, FX2) /* NAND RT<-!(RA&RB) */
-APUOP(M_OR, RR, 0x041, "or", _A3(A_T,A_A,A_B), 00112, FX2) /* OR RT<-RA|RB */
-APUOP(M_NOR, RR, 0x049, "nor", _A3(A_T,A_A,A_B), 00112, FX2) /* NOR RT<-!(RA&RB) */
-APUOP(M_XOR, RR, 0x241, "xor", _A3(A_T,A_A,A_B), 00112, FX2) /* XOR RT<-RA^RB */
-APUOP(M_EQV, RR, 0x249, "eqv", _A3(A_T,A_A,A_B), 00112, FX2) /* EQuiValent RT<-!(RA^RB) */
-APUOP(M_ANDC, RR, 0x2c1, "andc", _A3(A_T,A_A,A_B), 00112, FX2) /* ANDComplement RT<-RA&!RB */
-APUOP(M_ORC, RR, 0x2c9, "orc", _A3(A_T,A_A,A_B), 00112, FX2) /* ORComplement RT<-RA|!RB */
-APUOP(M_ABSDB, RR, 0x053, "absdb", _A3(A_T,A_A,A_B), 00112, FXB) /* ABSoluteDiff RT<-|RA-RB| */
-APUOP(M_AVGB, RR, 0x0d3, "avgb", _A3(A_T,A_A,A_B), 00112, FXB) /* AVG% RT<-(RA+RB+1)/2 */
-APUOP(M_SUMB, RR, 0x253, "sumb", _A3(A_T,A_A,A_B), 00112, FXB) /* SUM% RT<-f(RA,RB) */
-APUOP(M_DFA, RR, 0x2cc, "dfa", _A3(A_T,A_A,A_B), 00112, FPD) /* DFAdd RT<-RA+RB */
-APUOP(M_DFM, RR, 0x2ce, "dfm", _A3(A_T,A_A,A_B), 00112, FPD) /* DFMul RT<-RA*RB */
-APUOP(M_DFS, RR, 0x2cd, "dfs", _A3(A_T,A_A,A_B), 00112, FPD) /* DFSub RT<-RA-RB */
-APUOP(M_FA, RR, 0x2c4, "fa", _A3(A_T,A_A,A_B), 00112, FP6) /* FAdd RT<-RA+RB */
-APUOP(M_FM, RR, 0x2c6, "fm", _A3(A_T,A_A,A_B), 00112, FP6) /* FMul RT<-RA*RB */
-APUOP(M_FS, RR, 0x2c5, "fs", _A3(A_T,A_A,A_B), 00112, FP6) /* FSub RT<-RA-RB */
-APUOP(M_MPY, RR, 0x3c4, "mpy", _A3(A_T,A_A,A_B), 00112, FP7) /* MPY RT<-RA*RB */
-APUOP(M_MPYH, RR, 0x3c5, "mpyh", _A3(A_T,A_A,A_B), 00112, FP7) /* MPYH RT<-(RAh*RB)<<16 */
-APUOP(M_MPYHH, RR, 0x3c6, "mpyhh", _A3(A_T,A_A,A_B), 00112, FP7) /* MPYHH RT<-RAh*RBh */
-APUOP(M_MPYHHU, RR, 0x3ce, "mpyhhu", _A3(A_T,A_A,A_B), 00112, FP7) /* MPYHHU RT<-RAh*RBh */
-APUOP(M_MPYS, RR, 0x3c7, "mpys", _A3(A_T,A_A,A_B), 00112, FP7) /* MPYS RT<-(RA*RB)>>16 */
-APUOP(M_MPYU, RR, 0x3cc, "mpyu", _A3(A_T,A_A,A_B), 00112, FP7) /* MPYU RT<-RA*RB */
-APUOP(M_FI, RR, 0x3d4, "fi", _A3(A_T,A_A,A_B), 00112, FP7) /* FInterpolate RT<-f(RA,RB) */
-APUOP(M_ROT, RR, 0x058, "rot", _A3(A_T,A_A,A_B), 00112, FX3) /* ROT% RT<-RA<<<RB */
-APUOP(M_ROTM, RR, 0x059, "rotm", _A3(A_T,A_A,A_B), 00112, FX3) /* ROT%M RT<-RA<<Rb */
-APUOP(M_ROTMA, RR, 0x05a, "rotma", _A3(A_T,A_A,A_B), 00112, FX3) /* ROTMA% RT<-RA<<Rb */
-APUOP(M_SHL, RR, 0x05b, "shl", _A3(A_T,A_A,A_B), 00112, FX3) /* SHL% RT<-RA<<Rb */
-APUOP(M_ROTH, RR, 0x05c, "roth", _A3(A_T,A_A,A_B), 00112, FX3) /* ROT% RT<-RA<<<RB */
-APUOP(M_ROTHM, RR, 0x05d, "rothm", _A3(A_T,A_A,A_B), 00112, FX3) /* ROT%M RT<-RA<<Rb */
-APUOP(M_ROTMAH, RR, 0x05e, "rotmah", _A3(A_T,A_A,A_B), 00112, FX3) /* ROTMA% RT<-RA<<Rb */
-APUOP(M_SHLH, RR, 0x05f, "shlh", _A3(A_T,A_A,A_B), 00112, FX3) /* SHL% RT<-RA<<Rb */
-APUOP(M_MPYHHA, RR, 0x346, "mpyhha", _A3(A_T,A_A,A_B), 00113, FP7) /* MPYHHA RT<-RAh*RBh+RT */
-APUOP(M_MPYHHAU, RR, 0x34e, "mpyhhau", _A3(A_T,A_A,A_B), 00113, FP7) /* MPYHHAU RT<-RAh*RBh+RT */
-APUOP(M_DFMA, RR, 0x35c, "dfma", _A3(A_T,A_A,A_B), 00113, FPD) /* DFMAdd RT<-RT+RA*RB */
-APUOP(M_DFMS, RR, 0x35d, "dfms", _A3(A_T,A_A,A_B), 00113, FPD) /* DFMSub RT<-RA*RB-RT */
-APUOP(M_DFNMS, RR, 0x35e, "dfnms", _A3(A_T,A_A,A_B), 00113, FPD) /* DFNMSub RT<-RT-RA*RB */
-APUOP(M_DFNMA, RR, 0x35f, "dfnma", _A3(A_T,A_A,A_B), 00113, FPD) /* DFNMAdd RT<-(-RT)-RA*RB */
-APUOP(M_FMA, RRR, 0x700, "fma", _A4(A_C,A_A,A_B,A_T), 02111, FP6) /* FMAdd RC<-RT+RA*RB */
-APUOP(M_FMS, RRR, 0x780, "fms", _A4(A_C,A_A,A_B,A_T), 02111, FP6) /* FMSub RC<-RA*RB-RT */
-APUOP(M_FNMS, RRR, 0x680, "fnms", _A4(A_C,A_A,A_B,A_T), 02111, FP6) /* FNMSub RC<-RT-RA*RB */
-APUOP(M_MPYA, RRR, 0x600, "mpya", _A4(A_C,A_A,A_B,A_T), 02111, FP7) /* MPYA RC<-RA*RB+RT */
-APUOP(M_SELB, RRR, 0x400, "selb", _A4(A_C,A_A,A_B,A_T), 02111, FX2) /* SELectBits RC<-RA&RT|RB&!RT */
-/* for system function call, this uses op-code of mtspr */
-APUOP(M_SYSCALL, RI7, 0x10c, "syscall", _A3(A_T,A_A,A_S7N), 00002, SPR) /* System Call */
-/*
-pseudo instruction:
-system call
-value of I9 operation
-0 halt
-1 rt[0] = open(MEM[ra[0]], ra[1])
-2 rt[0] = close(ra[0])
-3 rt[0] = read(ra[0], MEM[ra[1]], ra[2])
-4 rt[0] = write(ra[0], MEM[ra[1]], ra[2])
-5 printf(MEM[ra[0]], ra[1], ra[2], ra[3])
-42 rt[0] = clock()
-52 rt[0] = lseek(ra0, ra1, ra2)
-
-*/
-
-
-/* new multiprecision add/sub */
-APUOP(M_ADDX, RR, 0x340, "addx", _A3(A_T,A_A,A_B), 00113, FX2) /* Add_eXtended RT<-RA+RB+RT */
-APUOP(M_CG, RR, 0x0c2, "cg", _A3(A_T,A_A,A_B), 00112, FX2) /* CarryGenerate RT<-cout(RA+RB) */
-APUOP(M_CGX, RR, 0x342, "cgx", _A3(A_T,A_A,A_B), 00113, FX2) /* CarryGen_eXtd RT<-cout(RA+RB+RT) */
-APUOP(M_SFX, RR, 0x341, "sfx", _A3(A_T,A_A,A_B), 00113, FX2) /* Add_eXtended RT<-RA+RB+RT */
-APUOP(M_BG, RR, 0x042, "bg", _A3(A_T,A_A,A_B), 00112, FX2) /* CarryGenerate RT<-cout(RA+RB) */
-APUOP(M_BGX, RR, 0x343, "bgx", _A3(A_T,A_A,A_B), 00113, FX2) /* CarryGen_eXtd RT<-cout(RA+RB+RT) */
-
-/*
-
-The following ops are a subset of above except with feature bits set.
-Feature bits are bits 11-17 of the instruction:
-
- 11 - C & P feature bit
- 12 - disable interrupts
- 13 - enable interrupts
-
-*/
-APUOPFB(M_BID, RR, 0x1a8, 0x20, "bid", _A1(A_A), 00010, BR) /* BI IP<-RA */
-APUOPFB(M_BIE, RR, 0x1a8, 0x10, "bie", _A1(A_A), 00010, BR) /* BI IP<-RA */
-APUOPFB(M_BISLD, RR, 0x1a9, 0x20, "bisld", _A2(A_T,A_A), 00012, BR) /* BISL RT,IP<-IP,RA */
-APUOPFB(M_BISLE, RR, 0x1a9, 0x10, "bisle", _A2(A_T,A_A), 00012, BR) /* BISL RT,IP<-IP,RA */
-APUOPFB(M_IRETD, RR, 0x1aa, 0x20, "iretd", _A1(A_A), 00010, BR) /* IRET IP<-SRR0 */
-APUOPFB(M_IRETD2, RR, 0x1aa, 0x20, "iretd", _A0(), 00010, BR) /* IRET IP<-SRR0 */
-APUOPFB(M_IRETE, RR, 0x1aa, 0x10, "irete", _A1(A_A), 00010, BR) /* IRET IP<-SRR0 */
-APUOPFB(M_IRETE2, RR, 0x1aa, 0x10, "irete", _A0(), 00010, BR) /* IRET IP<-SRR0 */
-APUOPFB(M_BISLEDD, RR, 0x1ab, 0x20, "bisledd", _A2(A_T,A_A), 00012, BR) /* BISLED RT,IP<-IP,RA_if(ext) */
-APUOPFB(M_BISLEDE, RR, 0x1ab, 0x10, "bislede", _A2(A_T,A_A), 00012, BR) /* BISLED RT,IP<-IP,RA_if(ext) */
-APUOPFB(M_BIHNZD, RR, 0x12b, 0x20, "bihnzd", _A2(A_T,A_A), 00011, BR) /* BIHNZ IP<-RA_if(RT) */
-APUOPFB(M_BIHNZE, RR, 0x12b, 0x10, "bihnze", _A2(A_T,A_A), 00011, BR) /* BIHNZ IP<-RA_if(RT) */
-APUOPFB(M_BIHZD, RR, 0x12a, 0x20, "bihzd", _A2(A_T,A_A), 00011, BR) /* BIHZ IP<-RA_if(RT) */
-APUOPFB(M_BIHZE, RR, 0x12a, 0x10, "bihze", _A2(A_T,A_A), 00011, BR) /* BIHZ IP<-RA_if(RT) */
-APUOPFB(M_BINZD, RR, 0x129, 0x20, "binzd", _A2(A_T,A_A), 00011, BR) /* BINZ IP<-RA_if(RT) */
-APUOPFB(M_BINZE, RR, 0x129, 0x10, "binze", _A2(A_T,A_A), 00011, BR) /* BINZ IP<-RA_if(RT) */
-APUOPFB(M_BIZD, RR, 0x128, 0x20, "bizd", _A2(A_T,A_A), 00011, BR) /* BIZ IP<-RA_if(RT) */
-APUOPFB(M_BIZE, RR, 0x128, 0x10, "bize", _A2(A_T,A_A), 00011, BR) /* BIZ IP<-RA_if(RT) */
-APUOPFB(M_SYNCC, RR, 0x002, 0x40, "syncc", _A0(), 00000, BR) /* SYNCC flush_pipe */
-APUOPFB(M_HBRP, LBTI, 0x1ac, 0x40, "hbrp", _A0(), 00010, LS) /* HBR BTB[B9]<-M[Ra] */
-
-/* Synonyms required by the AS manual. */
-APUOP(M_LR, RI10, 0x020, "lr", _A2(A_T,A_A), 00012, FX2) /* OR%I RT<-RA|I10 */
-APUOP(M_BIHT, RR, 0x12b, "biht", _A2(A_T,A_A), 00011, BR) /* BIHNZ IP<-RA_if(RT) */
-APUOP(M_BIHF, RR, 0x12a, "bihf", _A2(A_T,A_A), 00011, BR) /* BIHZ IP<-RA_if(RT) */
-APUOP(M_BIT, RR, 0x129, "bit", _A2(A_T,A_A), 00011, BR) /* BINZ IP<-RA_if(RT) */
-APUOP(M_BIF, RR, 0x128, "bif", _A2(A_T,A_A), 00011, BR) /* BIZ IP<-RA_if(RT) */
-APUOPFB(M_BIHTD, RR, 0x12b, 0x20, "bihtd", _A2(A_T,A_A), 00011, BR) /* BIHNF IP<-RA_if(RT) */
-APUOPFB(M_BIHTE, RR, 0x12b, 0x10, "bihte", _A2(A_T,A_A), 00011, BR) /* BIHNF IP<-RA_if(RT) */
-APUOPFB(M_BIHFD, RR, 0x12a, 0x20, "bihfd", _A2(A_T,A_A), 00011, BR) /* BIHZ IP<-RA_if(RT) */
-APUOPFB(M_BIHFE, RR, 0x12a, 0x10, "bihfe", _A2(A_T,A_A), 00011, BR) /* BIHZ IP<-RA_if(RT) */
-APUOPFB(M_BITD, RR, 0x129, 0x20, "bitd", _A2(A_T,A_A), 00011, BR) /* BINF IP<-RA_if(RT) */
-APUOPFB(M_BITE, RR, 0x129, 0x10, "bite", _A2(A_T,A_A), 00011, BR) /* BINF IP<-RA_if(RT) */
-APUOPFB(M_BIFD, RR, 0x128, 0x20, "bifd", _A2(A_T,A_A), 00011, BR) /* BIZ IP<-RA_if(RT) */
-APUOPFB(M_BIFE, RR, 0x128, 0x10, "bife", _A2(A_T,A_A), 00011, BR) /* BIZ IP<-RA_if(RT) */
-
-/* New soma double-float insns. */
-APUOP(M_DFCEQ, RR, 0x3c3, "dfceq", _A3(A_T,A_A,A_B), 00112, FX2) /* DFCEQ RT<-(RA=RB) */
-APUOP(M_DFCMEQ, RR, 0x3cb, "dfcmeq", _A3(A_T,A_A,A_B), 00112, FX2) /* DFCMEQ RT<-(|RA|=|RB|) */
-APUOP(M_DFCGT, RR, 0x2c3, "dfcgt", _A3(A_T,A_A,A_B), 00112, FX2) /* DFCGT RT<-(RA>RB) */
-APUOP(M_DFCMGT, RR, 0x2cb, "dfcmgt", _A3(A_T,A_A,A_B), 00112, FX2) /* DFCMGT RT<-(|RA|>|RB|) */
-APUOP(M_DFTSV, RI7, 0x3bf, "dftsv", _A3(A_T,A_A,A_U7), 00012, FX2) /* DFTSV RT<-testspecial(RA,I7) */
-
-#undef _A0
-#undef _A1
-#undef _A2
-#undef _A3
-#undef _A4
diff --git a/include/opcode/spu.h b/include/opcode/spu.h
deleted file mode 100644
index 975b1fd..0000000
--- a/include/opcode/spu.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/* SPU ELF support for BFD.
-
- Copyright 2006 Free Software Foundation, Inc.
-
- This file is part of GDB, GAS, and the GNU binutils.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-
-/* These two enums are from rel_apu/common/spu_asm_format.h */
-/* definition of instruction format */
-typedef enum {
- RRR,
- RI18,
- RI16,
- RI10,
- RI8,
- RI7,
- RR,
- LBT,
- LBTI,
- IDATA,
- UNKNOWN_IFORMAT
-} spu_iformat;
-
-/* These values describe assembly instruction arguments. They indicate
- * how to encode, range checking and which relocation to use. */
-typedef enum {
- A_T, /* register at pos 0 */
- A_A, /* register at pos 7 */
- A_B, /* register at pos 14 */
- A_C, /* register at pos 21 */
- A_S, /* special purpose register at pos 7 */
- A_H, /* channel register at pos 7 */
- A_P, /* parenthesis, this has to separate regs from immediates */
- A_S3,
- A_S6,
- A_S7N,
- A_S7,
- A_U7A,
- A_U7B,
- A_S10B,
- A_S10,
- A_S11,
- A_S11I,
- A_S14,
- A_S16,
- A_S18,
- A_R18,
- A_U3,
- A_U5,
- A_U6,
- A_U7,
- A_U14,
- A_X16,
- A_U18,
- A_MAX
-} spu_aformat;
-
-enum spu_insns {
-#define APUOP(TAG,MACFORMAT,OPCODE,MNEMONIC,ASMFORMAT,DEP,PIPE) \
- TAG,
-#define APUOPFB(TAG,MACFORMAT,OPCODE,FB,MNEMONIC,ASMFORMAT,DEP,PIPE) \
- TAG,
-#include "opcode/spu-insns.h"
-#undef APUOP
-#undef APUOPFB
- M_SPU_MAX
-};
-
-struct spu_opcode
-{
- spu_iformat insn_type;
- unsigned int opcode;
- char *mnemonic;
- int arg[5];
-};
-
-#define SIGNED_EXTRACT(insn,size,pos) (((int)((insn) << (32-size-pos))) >> (32-size))
-#define UNSIGNED_EXTRACT(insn,size,pos) (((insn) >> pos) & ((1 << size)-1))
-
-#define DECODE_INSN_RT(insn) (insn & 0x7f)
-#define DECODE_INSN_RA(insn) ((insn >> 7) & 0x7f)
-#define DECODE_INSN_RB(insn) ((insn >> 14) & 0x7f)
-#define DECODE_INSN_RC(insn) ((insn >> 21) & 0x7f)
-
-#define DECODE_INSN_I10(insn) SIGNED_EXTRACT(insn,10,14)
-#define DECODE_INSN_U10(insn) UNSIGNED_EXTRACT(insn,10,14)
-
-/* For branching, immediate loads, hbr and lqa/stqa. */
-#define DECODE_INSN_I16(insn) SIGNED_EXTRACT(insn,16,7)
-#define DECODE_INSN_U16(insn) UNSIGNED_EXTRACT(insn,16,7)
-
-/* for stop */
-#define DECODE_INSN_U14(insn) UNSIGNED_EXTRACT(insn,14,0)
-
-/* For ila */
-#define DECODE_INSN_I18(insn) SIGNED_EXTRACT(insn,18,7)
-#define DECODE_INSN_U18(insn) UNSIGNED_EXTRACT(insn,18,7)
-
-/* For rotate and shift and generate control mask */
-#define DECODE_INSN_I7(insn) SIGNED_EXTRACT(insn,7,14)
-#define DECODE_INSN_U7(insn) UNSIGNED_EXTRACT(insn,7,14)
-
-/* For float <-> int conversion */
-#define DECODE_INSN_I8(insn) SIGNED_EXTRACT(insn,8,14)
-#define DECODE_INSN_U8(insn) UNSIGNED_EXTRACT(insn,8,14)
-
-/* For hbr */
-#define DECODE_INSN_I9a(insn) ((SIGNED_EXTRACT(insn,2,23) << 7) | UNSIGNED_EXTRACT(insn,7,0))
-#define DECODE_INSN_I9b(insn) ((SIGNED_EXTRACT(insn,2,14) << 7) | UNSIGNED_EXTRACT(insn,7,0))
-#define DECODE_INSN_U9a(insn) ((UNSIGNED_EXTRACT(insn,2,23) << 7) | UNSIGNED_EXTRACT(insn,7,0))
-#define DECODE_INSN_U9b(insn) ((UNSIGNED_EXTRACT(insn,2,14) << 7) | UNSIGNED_EXTRACT(insn,7,0))
-
diff --git a/include/opcode/tahoe.h b/include/opcode/tahoe.h
deleted file mode 100644
index b5cee24..0000000
--- a/include/opcode/tahoe.h
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Ported by the State University of New York at Buffalo by the Distributed
- * Computer Systems Lab, Department of Computer Science, 1991.
- */
-
-#ifndef tahoe_opcodeT
-#define tahoe_opcodeT int
-#endif /* no tahoe_opcodeT */
-
-struct vot_wot /* tahoe opcode table: wot to do with this */
- /* particular opcode */
-{
- char * args; /* how to compile said opcode */
- tahoe_opcodeT code; /* op-code (may be > 8 bits!) */
-};
-
-struct vot /* tahoe opcode text */
-{
- char * name; /* opcode name: lowercase string [key] */
- struct vot_wot detail; /* rest of opcode table [datum] */
-};
-
-#define vot_how args
-#define vot_code code
-#define vot_detail detail
-#define vot_name name
-
-static struct vot
-votstrs[] =
-{
-{ "halt", {"", 0x00 } },
-{ "sinf", {"", 0x05 } },
-{ "ldf", {"rl", 0x06 } },
-{ "ldd", {"rq", 0x07 } },
-{ "addb2", {"rbmb", 0x08 } },
-{ "movb", {"rbwb", 0x09 } },
-{ "addw2", {"rwmw", 0x0a } },
-{ "movw", {"rwww", 0x0b } },
-{ "addl2", {"rlml", 0x0c } },
-{ "movl", {"rlwl", 0x0d } },
-{ "bbs", {"rlvlbw", 0x0e } },
-{ "nop", {"", 0x10 } },
-{ "brb", {"bb", 0x11 } },
-{ "brw", {"bw", 0x13 } },
-{ "cosf", {"", 0x15 } },
-{ "lnf", {"rl", 0x16 } },
-{ "lnd", {"rq", 0x17 } },
-{ "addb3", {"rbrbwb", 0x18 } },
-{ "cmpb", {"rbwb", 0x19 } },
-{ "addw3", {"rwrwww", 0x1a } },
-{ "cmpw", {"rwww", 0x1b } },
-{ "addl3", {"rlrlwl", 0x1c } },
-{ "cmpl", {"rlwl", 0x1d } },
-{ "bbc", {"rlvlbw", 0x1e } },
-{ "rei", {"", 0x20 } },
-{ "bneq", {"bb", 0x21 } },
-{ "bnequ", {"bb", 0x21 } },
-{ "cvtwl", {"rwwl", 0x23 } },
-{ "stf", {"wl", 0x26 } },
-{ "std", {"wq", 0x27 } },
-{ "subb2", {"rbmb", 0x28 } },
-{ "mcomb", {"rbwb", 0x29 } },
-{ "subw2", {"rwmw", 0x2a } },
-{ "mcomw", {"rwww", 0x2b } },
-{ "subl2", {"rlml", 0x2c } },
-{ "mcoml", {"rlwl", 0x2d } },
-{ "emul", {"rlrlrlwq", 0x2e } },
-{ "aoblss", {"rlmlbw", 0x2f } },
-{ "bpt", {"", 0x30 } },
-{ "beql", {"bb", 0x31 } },
-{ "beqlu", {"bb", 0x31 } },
-{ "cvtwb", {"rwwb", 0x33 } },
-{ "logf", {"", 0x35 } },
-{ "cmpf", {"rl", 0x36 } },
-{ "cmpd", {"rq", 0x37 } },
-{ "subb3", {"rbrbwb", 0x38 } },
-{ "bitb", {"rbrb", 0x39 } },
-{ "subw3", {"rwrwww", 0x3a } },
-{ "bitw", {"rwrw", 0x3b } },
-{ "subl3", {"rlrlwl", 0x3c } },
-{ "bitl", {"rlrl", 0x3d } },
-{ "ediv", {"rlrqwlwl", 0x3e } },
-{ "aobleq", {"rlmlbw", 0x3f } },
-{ "ret", {"", 0x40 } },
-{ "bgtr", {"bb", 0x41 } },
-{ "sqrtf", {"", 0x45 } },
-{ "cmpf2", {"rl", 0x46 } },
-{ "cmpd2", {"rqrq", 0x47 } },
-{ "shll", {"rbrlwl", 0x48 } },
-{ "clrb", {"wb", 0x49 } },
-{ "shlq", {"rbrqwq", 0x4a } },
-{ "clrw", {"ww", 0x4b } },
-{ "mull2", {"rlml", 0x4c } },
-{ "clrl", {"wl", 0x4d } },
-{ "shal", {"rbrlwl", 0x4e } },
-{ "bleq", {"bb", 0x51 } },
-{ "expf", {"", 0x55 } },
-{ "tstf", {"", 0x56 } },
-{ "tstd", {"", 0x57 } },
-{ "shrl", {"rbrlwl", 0x58 } },
-{ "tstb", {"rb", 0x59 } },
-{ "shrq", {"rbrqwq", 0x5a } },
-{ "tstw", {"rw", 0x5b } },
-{ "mull3", {"rlrlwl", 0x5c } },
-{ "tstl", {"rl", 0x5d } },
-{ "shar", {"rbrlwl", 0x5e } },
-{ "bbssi", {"rlmlbw", 0x5f } },
-{ "ldpctx", {"", 0x60 } },
-{ "pushd", {"", 0x67 } },
-{ "incb", {"mb", 0x69 } },
-{ "incw", {"mw", 0x6b } },
-{ "divl2", {"rlml", 0x6c } },
-{ "incl", {"ml", 0x6d } },
-{ "cvtlb", {"rlwb", 0x6f } },
-{ "svpctx", {"", 0x70 } },
-{ "jmp", {"ab", 0x71 } },
-{ "cvlf", {"rl", 0x76 } },
-{ "cvld", {"rl", 0x77 } },
-{ "decb", {"mb", 0x79 } },
-{ "decw", {"mw", 0x7b } },
-{ "divl3", {"rlrlwl", 0x7c } },
-{ "decl", {"ml", 0x7d } },
-{ "cvtlw", {"rlww", 0x7f } },
-{ "bgeq", {"bb", 0x81 } },
-{ "movs2", {"abab", 0x82 } },
-{ "cvfl", {"wl", 0x86 } },
-{ "cvdl", {"wl", 0x87 } },
-{ "orb2", {"rbmb", 0x88 } },
-{ "cvtbl", {"rbwl", 0x89 } },
-{ "orw2", {"rwmw", 0x8a } },
-{ "bispsw", {"rw", 0x8b } },
-{ "orl2", {"rlml", 0x8c } },
-{ "adwc", {"rlml", 0x8d } },
-{ "adda", {"rlml", 0x8e } },
-{ "blss", {"bb", 0x91 } },
-{ "cmps2", {"abab", 0x92 } },
-{ "ldfd", {"rl", 0x97 } },
-{ "orb3", {"rbrbwb", 0x98 } },
-{ "cvtbw", {"rbww", 0x99 } },
-{ "orw3", {"rwrwww", 0x9a } },
-{ "bicpsw", {"rw", 0x9b } },
-{ "orl3", {"rlrlwl", 0x9c } },
-{ "sbwc", {"rlml", 0x9d } },
-{ "suba", {"rlml", 0x9e } },
-{ "bgtru", {"bb", 0xa1 } },
-{ "cvdf", {"", 0xa6 } },
-{ "andb2", {"rbmb", 0xa8 } },
-{ "movzbl", {"rbwl", 0xa9 } },
-{ "andw2", {"rwmw", 0xaa } },
-{ "loadr", {"rwal", 0xab } },
-{ "andl2", {"rlml", 0xac } },
-{ "mtpr", {"rlrl", 0xad } },
-{ "ffs", {"rlwl", 0xae } },
-{ "blequ", {"bb", 0xb1 } },
-{ "negf", {"", 0xb6 } },
-{ "negd", {"", 0xb7 } },
-{ "andb3", {"rbrbwb", 0xb8 } },
-{ "movzbw", {"rbww", 0xb9 } },
-{ "andw3", {"rwrwww", 0xba } },
-{ "storer", {"rwal", 0xbb } },
-{ "andl3", {"rlrlwl", 0xbc } },
-{ "mfpr", {"rlwl", 0xbd } },
-{ "ffc", {"rlwl", 0xbe } },
-{ "calls", {"rbab", 0xbf } },
-{ "prober", {"rbabrl", 0xc0 } },
-{ "bvc", {"bb", 0xc1 } },
-{ "movs3", {"ababrw", 0xc2 } },
-{ "movzwl", {"rwwl", 0xc3 } },
-{ "addf", {"rl", 0xc6 } },
-{ "addd", {"rq", 0xc7 } },
-{ "xorb2", {"rbmb", 0xc8 } },
-{ "movob", {"rbwb", 0xc9 } },
-{ "xorw2", {"rwmw", 0xca } },
-{ "movow", {"rwww", 0xcb } },
-{ "xorl2", {"rlml", 0xcc } },
-{ "movpsl", {"wl", 0xcd } },
-{ "kcall", {"rw", 0xcf } },
-{ "probew", {"rbabrl", 0xd0 } },
-{ "bvs", {"bb", 0xd1 } },
-{ "cmps3", {"ababrw", 0xd2 } },
-{ "subf", {"rq", 0xd6 } },
-{ "subd", {"rq", 0xd7 } },
-{ "xorb3", {"rbrbwb", 0xd8 } },
-{ "pushb", {"rb", 0xd9 } },
-{ "xorw3", {"rwrwww", 0xda } },
-{ "pushw", {"rw", 0xdb } },
-{ "xorl3", {"rlrlwl", 0xdc } },
-{ "pushl", {"rl", 0xdd } },
-{ "insque", {"abab", 0xe0 } },
-{ "bcs", {"bb", 0xe1 } },
-{ "bgequ", {"bb", 0xe1 } },
-{ "mulf", {"rq", 0xe6 } },
-{ "muld", {"rq", 0xe7 } },
-{ "mnegb", {"rbwb", 0xe8 } },
-{ "movab", {"abwl", 0xe9 } },
-{ "mnegw", {"rwww", 0xea } },
-{ "movaw", {"awwl", 0xeb } },
-{ "mnegl", {"rlwl", 0xec } },
-{ "moval", {"alwl", 0xed } },
-{ "remque", {"ab", 0xf0 } },
-{ "bcc", {"bb", 0xf1 } },
-{ "blssu", {"bb", 0xf1 } },
-{ "divf", {"rq", 0xf6 } },
-{ "divd", {"rq", 0xf7 } },
-{ "movblk", {"alalrw", 0xf8 } },
-{ "pushab", {"ab", 0xf9 } },
-{ "pushaw", {"aw", 0xfb } },
-{ "casel", {"rlrlrl", 0xfc } },
-{ "pushal", {"al", 0xfd } },
-{ "callf", {"rbab", 0xfe } },
-{ "" , "" } /* empty is end sentinel */
-
-};
diff --git a/include/opcode/tic30.h b/include/opcode/tic30.h
deleted file mode 100644
index 198e04e..0000000
--- a/include/opcode/tic30.h
+++ /dev/null
@@ -1,691 +0,0 @@
-/* tic30.h -- Header file for TI TMS320C30 opcode table
- Copyright 1998 Free Software Foundation, Inc.
- Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
-
-This file is part of GDB, GAS, and the GNU binutils.
-
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them under the terms of the GNU General Public
-License as published by the Free Software Foundation; either version
-1, or (at your option) any later version.
-
-GDB, GAS, and the GNU binutils are distributed in the hope that they
-will be useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING. If not, write to the Free
-Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
-02110-1301, USA. */
-
-/* FIXME: The opcode table should be in opcodes/tic30-opc.c, not in a
- header file. */
-
-#ifndef _TMS320_H_
-#define _TMS320_H_
-
-struct _register
-{
- char *name;
- unsigned char opcode;
- unsigned char regtype;
-};
-
-typedef struct _register reg;
-
-#define REG_Rn 0x01
-#define REG_ARn 0x02
-#define REG_DP 0x03
-#define REG_OTHER 0x04
-
-static const reg tic30_regtab[] = {
- { "r0", 0x00, REG_Rn },
- { "r1", 0x01, REG_Rn },
- { "r2", 0x02, REG_Rn },
- { "r3", 0x03, REG_Rn },
- { "r4", 0x04, REG_Rn },
- { "r5", 0x05, REG_Rn },
- { "r6", 0x06, REG_Rn },
- { "r7", 0x07, REG_Rn },
- { "ar0",0x08, REG_ARn },
- { "ar1",0x09, REG_ARn },
- { "ar2",0x0A, REG_ARn },
- { "ar3",0x0B, REG_ARn },
- { "ar4",0x0C, REG_ARn },
- { "ar5",0x0D, REG_ARn },
- { "ar6",0x0E, REG_ARn },
- { "ar7",0x0F, REG_ARn },
- { "dp", 0x10, REG_DP },
- { "ir0",0x11, REG_OTHER },
- { "ir1",0x12, REG_OTHER },
- { "bk", 0x13, REG_OTHER },
- { "sp", 0x14, REG_OTHER },
- { "st", 0x15, REG_OTHER },
- { "ie", 0x16, REG_OTHER },
- { "if", 0x17, REG_OTHER },
- { "iof",0x18, REG_OTHER },
- { "rs", 0x19, REG_OTHER },
- { "re", 0x1A, REG_OTHER },
- { "rc", 0x1B, REG_OTHER },
- { "R0", 0x00, REG_Rn },
- { "R1", 0x01, REG_Rn },
- { "R2", 0x02, REG_Rn },
- { "R3", 0x03, REG_Rn },
- { "R4", 0x04, REG_Rn },
- { "R5", 0x05, REG_Rn },
- { "R6", 0x06, REG_Rn },
- { "R7", 0x07, REG_Rn },
- { "AR0",0x08, REG_ARn },
- { "AR1",0x09, REG_ARn },
- { "AR2",0x0A, REG_ARn },
- { "AR3",0x0B, REG_ARn },
- { "AR4",0x0C, REG_ARn },
- { "AR5",0x0D, REG_ARn },
- { "AR6",0x0E, REG_ARn },
- { "AR7",0x0F, REG_ARn },
- { "DP", 0x10, REG_DP },
- { "IR0",0x11, REG_OTHER },
- { "IR1",0x12, REG_OTHER },
- { "BK", 0x13, REG_OTHER },
- { "SP", 0x14, REG_OTHER },
- { "ST", 0x15, REG_OTHER },
- { "IE", 0x16, REG_OTHER },
- { "IF", 0x17, REG_OTHER },
- { "IOF",0x18, REG_OTHER },
- { "RS", 0x19, REG_OTHER },
- { "RE", 0x1A, REG_OTHER },
- { "RC", 0x1B, REG_OTHER },
- { "", 0, 0 }
-};
-
-static const reg *const tic30_regtab_end
- = tic30_regtab + sizeof(tic30_regtab)/sizeof(tic30_regtab[0]);
-
-/* Indirect Addressing Modes Modification Fields */
-/* Indirect Addressing with Displacement */
-#define PreDisp_Add 0x00
-#define PreDisp_Sub 0x01
-#define PreDisp_Add_Mod 0x02
-#define PreDisp_Sub_Mod 0x03
-#define PostDisp_Add_Mod 0x04
-#define PostDisp_Sub_Mod 0x05
-#define PostDisp_Add_Circ 0x06
-#define PostDisp_Sub_Circ 0x07
-/* Indirect Addressing with Index Register IR0 */
-#define PreIR0_Add 0x08
-#define PreIR0_Sub 0x09
-#define PreIR0_Add_Mod 0x0A
-#define PreIR0_Sub_Mod 0x0B
-#define PostIR0_Add_Mod 0x0C
-#define PostIR0_Sub_Mod 0x0D
-#define PostIR0_Add_Circ 0x0E
-#define PostIR0_Sub_Circ 0x0F
-/* Indirect Addressing with Index Register IR1 */
-#define PreIR1_Add 0x10
-#define PreIR1_Sub 0x11
-#define PreIR1_Add_Mod 0x12
-#define PreIR1_Sub_Mod 0x13
-#define PostIR1_Add_Mod 0x14
-#define PostIR1_Sub_Mod 0x15
-#define PostIR1_Add_Circ 0x16
-#define PostIR1_Sub_Circ 0x17
-/* Indirect Addressing (Special Cases) */
-#define IndirectOnly 0x18
-#define PostIR0_Add_BitRev 0x19
-
-typedef struct {
- char *syntax;
- unsigned char modfield;
- unsigned char displacement;
-} ind_addr_type;
-
-#define IMPLIED_DISP 0x01
-#define DISP_REQUIRED 0x02
-#define NO_DISP 0x03
-
-static const ind_addr_type tic30_indaddr_tab[] = {
- { "*+ar", PreDisp_Add, IMPLIED_DISP },
- { "*-ar", PreDisp_Sub, IMPLIED_DISP },
- { "*++ar", PreDisp_Add_Mod, IMPLIED_DISP },
- { "*--ar", PreDisp_Sub_Mod, IMPLIED_DISP },
- { "*ar++", PostDisp_Add_Mod, IMPLIED_DISP },
- { "*ar--", PostDisp_Sub_Mod, IMPLIED_DISP },
- { "*ar++%", PostDisp_Add_Circ, IMPLIED_DISP },
- { "*ar--%", PostDisp_Sub_Circ, IMPLIED_DISP },
- { "*+ar()", PreDisp_Add, DISP_REQUIRED },
- { "*-ar()", PreDisp_Sub, DISP_REQUIRED },
- { "*++ar()", PreDisp_Add_Mod, DISP_REQUIRED },
- { "*--ar()", PreDisp_Sub_Mod, DISP_REQUIRED },
- { "*ar++()", PostDisp_Add_Mod, DISP_REQUIRED },
- { "*ar--()", PostDisp_Sub_Mod, DISP_REQUIRED },
- { "*ar++()%", PostDisp_Add_Circ, DISP_REQUIRED },
- { "*ar--()%", PostDisp_Sub_Circ, DISP_REQUIRED },
- { "*+ar(ir0)", PreIR0_Add, NO_DISP },
- { "*-ar(ir0)", PreIR0_Sub, NO_DISP },
- { "*++ar(ir0)", PreIR0_Add_Mod, NO_DISP },
- { "*--ar(ir0)", PreIR0_Sub_Mod, NO_DISP },
- { "*ar++(ir0)", PostIR0_Add_Mod, NO_DISP },
- { "*ar--(ir0)", PostIR0_Sub_Mod, NO_DISP },
- { "*ar++(ir0)%",PostIR0_Add_Circ, NO_DISP },
- { "*ar--(ir0)%",PostIR0_Sub_Circ, NO_DISP },
- { "*+ar(ir1)", PreIR1_Add, NO_DISP },
- { "*-ar(ir1)", PreIR1_Sub, NO_DISP },
- { "*++ar(ir1)", PreIR1_Add_Mod, NO_DISP },
- { "*--ar(ir1)", PreIR1_Sub_Mod, NO_DISP },
- { "*ar++(ir1)", PostIR1_Add_Mod, NO_DISP },
- { "*ar--(ir1)", PostIR1_Sub_Mod, NO_DISP },
- { "*ar++(ir1)%",PostIR1_Add_Circ, NO_DISP },
- { "*ar--(ir1)%",PostIR1_Sub_Circ, NO_DISP },
- { "*ar", IndirectOnly, NO_DISP },
- { "*ar++(ir0)b",PostIR0_Add_BitRev, NO_DISP },
- { "", 0,0 }
-};
-
-static const ind_addr_type *const tic30_indaddrtab_end
- = tic30_indaddr_tab + sizeof(tic30_indaddr_tab)/sizeof(tic30_indaddr_tab[0]);
-
-/* Possible operand types */
-/* Register types */
-#define Rn 0x0001
-#define ARn 0x0002
-#define DPReg 0x0004
-#define OtherReg 0x0008
-/* Addressing mode types */
-#define Direct 0x0010
-#define Indirect 0x0020
-#define Imm16 0x0040
-#define Disp 0x0080
-#define Imm24 0x0100
-#define Abs24 0x0200
-/* 3 operand addressing mode types */
-#define op3T1 0x0400
-#define op3T2 0x0800
-/* Interrupt vector */
-#define IVector 0x1000
-/* Not required */
-#define NotReq 0x2000
-
-#define GAddr1 Rn | Direct | Indirect | Imm16
-#define GAddr2 GAddr1 | AllReg
-#define TAddr1 op3T1 | Rn | Indirect
-#define TAddr2 op3T2 | Rn | Indirect
-#define Reg Rn | ARn
-#define AllReg Reg | DPReg | OtherReg
-
-typedef struct _template
-{
- char *name;
- unsigned int operands; /* how many operands */
- unsigned int base_opcode; /* base_opcode is the fundamental opcode byte */
- /* the bits in opcode_modifier are used to generate the final opcode from
- the base_opcode. These bits also are used to detect alternate forms of
- the same instruction */
- unsigned int opcode_modifier;
-
- /* opcode_modifier bits: */
-#define AddressMode 0x00600000
-#define PCRel 0x02000000
-#define StackOp 0x001F0000
-#define Rotate StackOp
-
- /* operand_types[i] describes the type of operand i. This is made
- by OR'ing together all of the possible type masks. (e.g.
- 'operand_types[i] = Reg|Imm' specifies that operand i can be
- either a register or an immediate operand */
- unsigned int operand_types[3];
- /* This defines the number type of an immediate argument to an instruction. */
- int imm_arg_type;
-#define Imm_None 0
-#define Imm_Float 1
-#define Imm_SInt 2
-#define Imm_UInt 3
-}
-template;
-
-static const template tic30_optab[] = {
- { "absf" ,2,0x00000000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "absi" ,2,0x00800000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "addc" ,2,0x01000000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "addc3" ,3,0x20000000,AddressMode, { TAddr1|AllReg, TAddr2|AllReg, AllReg }, Imm_None },
- { "addf" ,2,0x01800000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "addf3" ,3,0x20800000,AddressMode, { TAddr1, TAddr2, Rn }, Imm_None },
- { "addi" ,2,0x02000000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "addi3" ,3,0x21000000,AddressMode, { TAddr1|AllReg, TAddr2|AllReg, AllReg }, Imm_None },
- { "and" ,2,0x02800000,AddressMode, { GAddr2, AllReg, 0 }, Imm_UInt },
- { "and3" ,3,0x21800000,AddressMode, { TAddr1|AllReg, TAddr2|AllReg, AllReg }, Imm_None },
- { "andn" ,2,0x03000000,AddressMode, { GAddr2, AllReg, 0 }, Imm_UInt },
- { "andn3" ,3,0x22000000,AddressMode, { TAddr1|AllReg, TAddr2|AllReg, AllReg }, Imm_None },
- { "ash" ,2,0x03800000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ash3" ,3,0x22800000,AddressMode, { TAddr1|AllReg, TAddr2|AllReg, AllReg }, Imm_None },
- { "b" ,1,0x68000000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bu" ,1,0x68000000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "blo" ,1,0x68010000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bls" ,1,0x68020000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bhi" ,1,0x68030000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bhs" ,1,0x68040000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "beq" ,1,0x68050000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bne" ,1,0x68060000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "blt" ,1,0x68070000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "ble" ,1,0x68080000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bgt" ,1,0x68090000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bge" ,1,0x680A0000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bz" ,1,0x68050000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bnz" ,1,0x68060000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bp" ,1,0x68090000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bn" ,1,0x68070000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bnn" ,1,0x680A0000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bnv" ,1,0x680C0000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bv" ,1,0x680D0000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bnuf" ,1,0x680E0000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "buf" ,1,0x680F0000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bnc" ,1,0x68040000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bc" ,1,0x68010000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bnlv" ,1,0x68100000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "blv" ,1,0x68110000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bnluf" ,1,0x68120000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bluf" ,1,0x68130000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bzuf" ,1,0x68140000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bd" ,1,0x68200000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bud" ,1,0x68200000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "blod" ,1,0x68210000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "blsd" ,1,0x68220000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bhid" ,1,0x68230000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bhsd" ,1,0x68240000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "beqd" ,1,0x68250000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bned" ,1,0x68260000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bltd" ,1,0x68270000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bled" ,1,0x68280000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bgtd" ,1,0x68290000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bged" ,1,0x682A0000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bzd" ,1,0x68250000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bnzd" ,1,0x68260000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bpd" ,1,0x68290000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bnd" ,1,0x68270000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bnnd" ,1,0x682A0000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bnvd" ,1,0x682C0000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bvd" ,1,0x682D0000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bnufd" ,1,0x682E0000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bufd" ,1,0x682F0000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bncd" ,1,0x68240000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bcd" ,1,0x68210000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bnlvd" ,1,0x68300000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "blvd" ,1,0x68310000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bnlufd" ,1,0x68320000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "blufd" ,1,0x68330000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "bzufd" ,1,0x68340000,PCRel, { AllReg|Disp, 0, 0 }, Imm_None },
- { "br" ,1,0x60000000,0, { Imm24, 0, 0 }, Imm_UInt },
- { "brd" ,1,0x61000000,0, { Imm24, 0, 0 }, Imm_UInt },
- { "call" ,1,0x62000000,0, { Imm24, 0, 0 }, Imm_UInt },
- { "callu" ,1,0x70000000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "calllo" ,1,0x70010000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "callls" ,1,0x70020000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "callhi" ,1,0x70030000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "callhs" ,1,0x70040000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "calleq" ,1,0x70050000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "callne" ,1,0x70060000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "calllt" ,1,0x70070000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "callle" ,1,0x70080000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "callgt" ,1,0x70090000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "callge" ,1,0x700A0000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "callz" ,1,0x70050000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "callnz" ,1,0x70060000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "callp" ,1,0x70090000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "calln" ,1,0x70070000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "callnn" ,1,0x700A0000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "callnv" ,1,0x700C0000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "callv" ,1,0x700D0000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "callnuf",1,0x700E0000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "calluf" ,1,0x700F0000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "callnc" ,1,0x70040000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "callc" ,1,0x70010000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "callnlv",1,0x70100000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "calllv" ,1,0x70110000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "callnluf",1,0x70120000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "callluf",1,0x70130000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "callzuf",1,0x70140000,PCRel, { AllReg|Disp, 0, 0 }, Imm_UInt },
- { "cmpf" ,2,0x04000000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "cmpf3" ,2,0x23000000,AddressMode, { TAddr1, TAddr2, 0 }, Imm_None },
- { "cmpi" ,2,0x04800000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "cmpi3" ,2,0x23800000,AddressMode, { TAddr1|AllReg, TAddr2|AllReg, 0 }, Imm_None },
- { "db" ,2,0x6C000000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbu" ,2,0x6C000000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dblo" ,2,0x6C010000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbls" ,2,0x6C020000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbhi" ,2,0x6C030000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbhs" ,2,0x6C040000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbeq" ,2,0x6C050000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbne" ,2,0x6C060000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dblt" ,2,0x6C070000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dble" ,2,0x6C080000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbgt" ,2,0x6C090000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbge" ,2,0x6C0A0000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbz" ,2,0x6C050000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbnz" ,2,0x6C060000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbp" ,2,0x6C090000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbn" ,2,0x6C070000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbnn" ,2,0x6C0A0000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbnv" ,2,0x6C0C0000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbv" ,2,0x6C0D0000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbnuf" ,2,0x6C0E0000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbuf" ,2,0x6C0F0000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbnc" ,2,0x6C040000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbc" ,2,0x6C010000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbnlv" ,2,0x6C100000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dblv" ,2,0x6C110000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbnluf" ,2,0x6C120000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbluf" ,2,0x6C130000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbzuf" ,2,0x6C140000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbd" ,2,0x6C200000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbud" ,2,0x6C200000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dblod" ,2,0x6C210000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dblsd" ,2,0x6C220000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbhid" ,2,0x6C230000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbhsd" ,2,0x6C240000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbeqd" ,2,0x6C250000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbned" ,2,0x6C260000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbltd" ,2,0x6C270000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbled" ,2,0x6C280000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbgtd" ,2,0x6C290000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbged" ,2,0x6C2A0000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbzd" ,2,0x6C250000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbnzd" ,2,0x6C260000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbpd" ,2,0x6C290000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbnd" ,2,0x6C270000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbnnd" ,2,0x6C2A0000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbnvd" ,2,0x6C2C0000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbvd" ,2,0x6C2D0000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbnufd" ,2,0x6C2E0000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbufd" ,2,0x6C2F0000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbncd" ,2,0x6C240000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbcd" ,2,0x6C210000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbnlvd" ,2,0x6C300000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dblvd" ,2,0x6C310000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbnlufd",2,0x6C320000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dblufd" ,2,0x6C330000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "dbzufd" ,2,0x6C340000,PCRel, { ARn, AllReg|Disp, 0 }, Imm_None },
- { "fix" ,2,0x05000000,AddressMode, { GAddr1, AllReg, 0 }, Imm_Float },
- { "float" ,2,0x05800000,AddressMode, { GAddr2, Rn, 0 }, Imm_SInt },
- { "iack" ,1,0x1B000000,AddressMode, { Direct|Indirect, 0, 0 }, Imm_None },
- { "idle" ,0,0x06000000,0, { 0, 0, 0 }, Imm_None },
- { "idle2" ,0,0x06000001,0, { 0, 0, 0 }, Imm_None }, /* LC31 Only */
- { "lde" ,2,0x06800000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldf" ,2,0x07000000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfu" ,2,0x40000000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldflo" ,2,0x40800000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfls" ,2,0x41000000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfhi" ,2,0x41800000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfhs" ,2,0x42000000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfeq" ,2,0x42800000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfne" ,2,0x43000000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldflt" ,2,0x43800000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfle" ,2,0x44000000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfgt" ,2,0x44800000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfge" ,2,0x45000000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfz" ,2,0x42800000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfnz" ,2,0x43000000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfp" ,2,0x44800000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfn" ,2,0x43800000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfnn" ,2,0x45000000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfnv" ,2,0x46000000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfv" ,2,0x46800000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfnuf" ,2,0x47000000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfuf" ,2,0x47800000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfnc" ,2,0x42000000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfc" ,2,0x40800000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfnlv" ,2,0x48000000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldflv" ,2,0x48800000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfnluf",2,0x49000000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfluf" ,2,0x49800000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfzuf" ,2,0x4A000000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldfi" ,2,0x07800000,AddressMode, { Direct|Indirect, Rn, 0 }, Imm_None },
- { "ldi" ,2,0x08000000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldiu" ,2,0x50000000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldilo" ,2,0x50800000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldils" ,2,0x51000000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldihi" ,2,0x51800000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldihs" ,2,0x52000000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldieq" ,2,0x52800000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldine" ,2,0x53000000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldilt" ,2,0x53800000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldile" ,2,0x54000000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldigt" ,2,0x54800000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldige" ,2,0x55000000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldiz" ,2,0x52800000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldinz" ,2,0x53000000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldip" ,2,0x54800000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldin" ,2,0x53800000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldinn" ,2,0x55000000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldinv" ,2,0x56000000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldiv" ,2,0x56800000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldinuf" ,2,0x57000000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldiuf" ,2,0x57800000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldinc" ,2,0x52000000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldic" ,2,0x50800000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldinlv" ,2,0x58000000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldilv" ,2,0x58800000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldinluf",2,0x59000000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldiluf" ,2,0x59800000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldizuf" ,2,0x5A000000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "ldii" ,2,0x08800000,AddressMode, { Direct|Indirect, AllReg, 0 }, Imm_None },
- { "ldm" ,2,0x09000000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "ldp" ,2,0x08700000,0, { Abs24|Direct, DPReg|NotReq, 0 }, Imm_UInt },
- { "lopower",0,0x10800001,0, { 0, 0, 0 }, Imm_None }, /* LC31 Only */
- { "lsh" ,2,0x09800000,AddressMode, { GAddr2, AllReg, 0 }, Imm_UInt },
- { "lsh3" ,3,0x24000000,AddressMode, { TAddr1|AllReg, TAddr2|AllReg, AllReg }, Imm_None },
- { "maxspeed",0,0x10800000,0, { 0, 0, 0 }, Imm_None }, /* LC31 Only */
- { "mpyf" ,2,0x0A000000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "mpyf3" ,3,0x24800000,AddressMode, { TAddr1, TAddr2, Rn }, Imm_None },
- { "mpyi" ,2,0x0A800000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "mpyi3" ,3,0x25000000,AddressMode, { TAddr1|AllReg, TAddr2|AllReg, AllReg }, Imm_None },
- { "negb" ,2,0x0B000000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "negf" ,2,0x0B800000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "negi" ,2,0x0C000000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "nop" ,1,0x0C800000,AddressMode, { AllReg|Indirect|NotReq, 0, 0 }, Imm_None },
- { "norm" ,2,0x0D000000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float }, /*Check another source*/
- { "not" ,2,0x0D800000,AddressMode, { GAddr2, AllReg, 0 }, Imm_UInt },
- { "or" ,2,0x10000000,AddressMode, { GAddr2, AllReg, 0 }, Imm_UInt },
- { "or3" ,3,0x25800000,AddressMode, { TAddr1|AllReg, TAddr2|AllReg, AllReg }, Imm_None },
- { "pop" ,1,0x0E200000,StackOp, { AllReg, 0, 0 }, Imm_None },
- { "popf" ,1,0x0EA00000,StackOp, { Rn, 0, 0 }, Imm_None },
- { "push" ,1,0x0F200000,StackOp, { AllReg, 0, 0 }, Imm_None },
- { "pushf" ,1,0x0FA00000,StackOp, { Rn, 0, 0 }, Imm_None },
- { "reti" ,0,0x78000000,0, { 0, 0, 0 }, Imm_None },
- { "retiu" ,0,0x78000000,0, { 0, 0, 0 }, Imm_None },
- { "retilo" ,0,0x78010000,0, { 0, 0, 0 }, Imm_None },
- { "retils" ,0,0x78020000,0, { 0, 0, 0 }, Imm_None },
- { "retihi" ,0,0x78030000,0, { 0, 0, 0 }, Imm_None },
- { "retihs" ,0,0x78040000,0, { 0, 0, 0 }, Imm_None },
- { "retieq" ,0,0x78050000,0, { 0, 0, 0 }, Imm_None },
- { "retine" ,0,0x78060000,0, { 0, 0, 0 }, Imm_None },
- { "retilt" ,0,0x78070000,0, { 0, 0, 0 }, Imm_None },
- { "retile" ,0,0x78080000,0, { 0, 0, 0 }, Imm_None },
- { "retigt" ,0,0x78090000,0, { 0, 0, 0 }, Imm_None },
- { "retige" ,0,0x780A0000,0, { 0, 0, 0 }, Imm_None },
- { "retiz" ,0,0x78050000,0, { 0, 0, 0 }, Imm_None },
- { "retinz" ,0,0x78060000,0, { 0, 0, 0 }, Imm_None },
- { "retip" ,0,0x78090000,0, { 0, 0, 0 }, Imm_None },
- { "retin" ,0,0x78070000,0, { 0, 0, 0 }, Imm_None },
- { "retinn" ,0,0x780A0000,0, { 0, 0, 0 }, Imm_None },
- { "retinv" ,0,0x780C0000,0, { 0, 0, 0 }, Imm_None },
- { "retiv" ,0,0x780D0000,0, { 0, 0, 0 }, Imm_None },
- { "retinuf",0,0x780E0000,0, { 0, 0, 0 }, Imm_None },
- { "retiuf" ,0,0x780F0000,0, { 0, 0, 0 }, Imm_None },
- { "retinc" ,0,0x78040000,0, { 0, 0, 0 }, Imm_None },
- { "retic" ,0,0x78010000,0, { 0, 0, 0 }, Imm_None },
- { "retinlv",0,0x78100000,0, { 0, 0, 0 }, Imm_None },
- { "retilv" ,0,0x78110000,0, { 0, 0, 0 }, Imm_None },
- { "retinluf",0,0x78120000,0, { 0, 0, 0 }, Imm_None },
- { "retiluf",0,0x78130000,0, { 0, 0, 0 }, Imm_None },
- { "retizuf",0,0x78140000,0, { 0, 0, 0 }, Imm_None },
- { "rets" ,0,0x78800000,0, { 0, 0, 0 }, Imm_None },
- { "retsu" ,0,0x78800000,0, { 0, 0, 0 }, Imm_None },
- { "retslo" ,0,0x78810000,0, { 0, 0, 0 }, Imm_None },
- { "retsls" ,0,0x78820000,0, { 0, 0, 0 }, Imm_None },
- { "retshi" ,0,0x78830000,0, { 0, 0, 0 }, Imm_None },
- { "retshs" ,0,0x78840000,0, { 0, 0, 0 }, Imm_None },
- { "retseq" ,0,0x78850000,0, { 0, 0, 0 }, Imm_None },
- { "retsne" ,0,0x78860000,0, { 0, 0, 0 }, Imm_None },
- { "retslt" ,0,0x78870000,0, { 0, 0, 0 }, Imm_None },
- { "retsle" ,0,0x78880000,0, { 0, 0, 0 }, Imm_None },
- { "retsgt" ,0,0x78890000,0, { 0, 0, 0 }, Imm_None },
- { "retsge" ,0,0x788A0000,0, { 0, 0, 0 }, Imm_None },
- { "retsz" ,0,0x78850000,0, { 0, 0, 0 }, Imm_None },
- { "retsnz" ,0,0x78860000,0, { 0, 0, 0 }, Imm_None },
- { "retsp" ,0,0x78890000,0, { 0, 0, 0 }, Imm_None },
- { "retsn" ,0,0x78870000,0, { 0, 0, 0 }, Imm_None },
- { "retsnn" ,0,0x788A0000,0, { 0, 0, 0 }, Imm_None },
- { "retsnv" ,0,0x788C0000,0, { 0, 0, 0 }, Imm_None },
- { "retsv" ,0,0x788D0000,0, { 0, 0, 0 }, Imm_None },
- { "retsnuf",0,0x788E0000,0, { 0, 0, 0 }, Imm_None },
- { "retsuf" ,0,0x788F0000,0, { 0, 0, 0 }, Imm_None },
- { "retsnc" ,0,0x78840000,0, { 0, 0, 0 }, Imm_None },
- { "retsc" ,0,0x78810000,0, { 0, 0, 0 }, Imm_None },
- { "retsnlv",0,0x78900000,0, { 0, 0, 0 }, Imm_None },
- { "retslv" ,0,0x78910000,0, { 0, 0, 0 }, Imm_None },
- { "retsnluf",0,0x78920000,0, { 0, 0, 0 }, Imm_None },
- { "retsluf",0,0x78930000,0, { 0, 0, 0 }, Imm_None },
- { "retszuf",0,0x78940000,0, { 0, 0, 0 }, Imm_None },
- { "rnd" ,2,0x11000000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "rol" ,1,0x11E00001,Rotate, { AllReg, 0, 0 }, Imm_None },
- { "rolc" ,1,0x12600001,Rotate, { AllReg, 0, 0 }, Imm_None },
- { "ror" ,1,0x12E0FFFF,Rotate, { AllReg, 0, 0 }, Imm_None },
- { "rorc" ,1,0x1360FFFF,Rotate, { AllReg, 0, 0 }, Imm_None },
- { "rptb" ,1,0x64000000,0, { Imm24, 0, 0 }, Imm_UInt },
- { "rpts" ,1,0x139B0000,AddressMode, { GAddr2, 0, 0 }, Imm_UInt },
- { "sigi" ,0,0x16000000,0, { 0, 0, 0 }, Imm_None },
- { "stf" ,2,0x14000000,AddressMode, { Rn, Direct|Indirect, 0 }, Imm_Float },
- { "stfi" ,2,0x14800000,AddressMode, { Rn, Direct|Indirect, 0 }, Imm_Float },
- { "sti" ,2,0x15000000,AddressMode, { AllReg, Direct|Indirect, 0 }, Imm_SInt },
- { "stii" ,2,0x15800000,AddressMode, { AllReg, Direct|Indirect, 0 }, Imm_SInt },
- { "subb" ,2,0x16800000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "subb3" ,3,0x26000000,AddressMode, { TAddr1|AllReg, TAddr2|AllReg, AllReg }, Imm_None },
- { "subc" ,2,0x17000000,AddressMode, { GAddr2, AllReg, 0 }, Imm_UInt },
- { "subf" ,2,0x17800000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "subf3" ,3,0x26800000,AddressMode, { TAddr1, TAddr2, Rn }, Imm_None },
- { "subi" ,2,0x18000000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "subi3" ,3,0x27000000,AddressMode, { TAddr1|AllReg, TAddr2|AllReg, AllReg }, Imm_None },
- { "subrb" ,2,0x18800000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "subrf" ,2,0x19000000,AddressMode, { GAddr1, Rn, 0 }, Imm_Float },
- { "subri" ,2,0x19800000,AddressMode, { GAddr2, AllReg, 0 }, Imm_SInt },
- { "swi" ,0,0x66000000,0, { 0, 0, 0 }, Imm_None },
- { "trap" ,1,0x74800020,0, { IVector, 0, 0 }, Imm_None },
- { "trapu" ,1,0x74800020,0, { IVector, 0, 0 }, Imm_None },
- { "traplo" ,1,0x74810020,0, { IVector, 0, 0 }, Imm_None },
- { "trapls" ,1,0x74820020,0, { IVector, 0, 0 }, Imm_None },
- { "traphi" ,1,0x74830020,0, { IVector, 0, 0 }, Imm_None },
- { "traphs" ,1,0x74840020,0, { IVector, 0, 0 }, Imm_None },
- { "trapeq" ,1,0x74850020,0, { IVector, 0, 0 }, Imm_None },
- { "trapne" ,1,0x74860020,0, { IVector, 0, 0 }, Imm_None },
- { "traplt" ,1,0x74870020,0, { IVector, 0, 0 }, Imm_None },
- { "traple" ,1,0x74880020,0, { IVector, 0, 0 }, Imm_None },
- { "trapgt" ,1,0x74890020,0, { IVector, 0, 0 }, Imm_None },
- { "trapge" ,1,0x748A0020,0, { IVector, 0, 0 }, Imm_None },
- { "trapz" ,1,0x74850020,0, { IVector, 0, 0 }, Imm_None },
- { "trapnz" ,1,0x74860020,0, { IVector, 0, 0 }, Imm_None },
- { "trapp" ,1,0x74890020,0, { IVector, 0, 0 }, Imm_None },
- { "trapn" ,1,0x74870020,0, { IVector, 0, 0 }, Imm_None },
- { "trapnn" ,1,0x748A0020,0, { IVector, 0, 0 }, Imm_None },
- { "trapnv" ,1,0x748C0020,0, { IVector, 0, 0 }, Imm_None },
- { "trapv" ,1,0x748D0020,0, { IVector, 0, 0 }, Imm_None },
- { "trapnuf",1,0x748E0020,0, { IVector, 0, 0 }, Imm_None },
- { "trapuf" ,1,0x748F0020,0, { IVector, 0, 0 }, Imm_None },
- { "trapnc" ,1,0x74840020,0, { IVector, 0, 0 }, Imm_None },
- { "trapc" ,1,0x74810020,0, { IVector, 0, 0 }, Imm_None },
- { "trapnlv",1,0x74900020,0, { IVector, 0, 0 }, Imm_None },
- { "traplv" ,1,0x74910020,0, { IVector, 0, 0 }, Imm_None },
- { "trapnluf",1,0x74920020,0, { IVector, 0, 0 }, Imm_None },
- { "trapluf",1,0x74930020,0, { IVector, 0, 0 }, Imm_None },
- { "trapzuf",1,0x74940020,0, { IVector, 0, 0 }, Imm_None },
- { "tstb" ,2,0x1A000000,AddressMode, { GAddr2, AllReg, 0 }, Imm_UInt },
- { "tstb3" ,2,0x27800000,AddressMode, { TAddr1|AllReg, TAddr2|AllReg, 0 }, Imm_None },
- { "xor" ,2,0x1A800000,AddressMode, { GAddr2, AllReg, 0 }, Imm_UInt },
- { "xor3" ,3,0x28000000,AddressMode, { TAddr1|AllReg, TAddr2|AllReg, AllReg }, Imm_None },
- { "" ,0,0x00000000,0, { 0, 0, 0 }, 0 }
-};
-
-static const template *const tic30_optab_end =
- tic30_optab + sizeof(tic30_optab)/sizeof(tic30_optab[0]);
-
-typedef struct {
- char *name;
- unsigned int operands_1;
- unsigned int operands_2;
- unsigned int base_opcode;
- unsigned int operand_types[2][3];
- /* Which operand fits into which part of the final opcode word. */
- int oporder;
-} partemplate;
-
-/* oporder defines - not very descriptive. */
-#define OO_4op1 0
-#define OO_4op2 1
-#define OO_4op3 2
-#define OO_5op1 3
-#define OO_5op2 4
-#define OO_PField 5
-
-static const partemplate tic30_paroptab[] = {
- { "q_absf_stf", 2,2,0xC8000000, { { Indirect, Rn, 0 }, { Rn, Indirect, 0 } },
- OO_4op1 },
- { "q_absi_sti", 2,2,0xCA000000, { { Indirect, Rn, 0 }, { Rn, Indirect, 0 } },
- OO_4op1 },
- { "q_addf3_stf", 3,2,0xCC000000, { { Indirect, Rn, Rn }, { Rn, Indirect, 0 } },
- OO_5op1 },
- { "q_addi3_sti", 3,2,0xCE000000, { { Indirect, Rn, Rn }, { Rn, Indirect, 0 } },
- OO_5op1 },
- { "q_and3_sti", 3,2,0xD0000000, { { Indirect, Rn, Rn }, { Rn, Indirect, 0 } },
- OO_5op1 },
- { "q_ash3_sti", 3,2,0xD2000000, { { Rn, Indirect, Rn }, { Rn, Indirect, 0 } },
- OO_5op2 },
- { "q_fix_sti", 2,2,0xD4000000, { { Indirect, Rn, 0 }, { Rn, Indirect, 0 } },
- OO_4op1 },
- { "q_float_stf", 2,2,0xD6000000, { { Indirect, Rn, 0 }, { Rn, Indirect, 0 } },
- OO_4op1 },
- { "q_ldf_ldf", 2,2,0xC4000000, { { Indirect, Rn, 0 }, { Indirect, Rn, 0 } },
- OO_4op2 },
- { "q_ldf_stf", 2,2,0xD8000000, { { Indirect, Rn, 0 }, { Rn, Indirect, 0 } },
- OO_4op1 },
- { "q_ldi_ldi", 2,2,0xC6000000, { { Indirect, Rn, 0 }, { Indirect, Rn, 0 } },
- OO_4op2 },
- { "q_ldi_sti", 2,2,0xDA000000, { { Indirect, Rn, 0 }, { Rn, Indirect, 0 } },
- OO_4op1 },
- { "q_lsh3_sti", 3,2,0xDC000000, { { Rn, Indirect, Rn }, { Rn, Indirect, 0 } },
- OO_5op2 },
- { "q_mpyf3_addf3",3,3,0x80000000, { { Rn | Indirect, Rn | Indirect, Rn },
- { Rn | Indirect, Rn | Indirect, Rn } }, OO_PField },
- { "q_mpyf3_stf", 3,2,0xDE000000, { { Indirect, Rn, Rn }, { Rn, Indirect, 0 } },
- OO_5op1 },
- { "q_mpyf3_subf3",3,3,0x84000000, { { Rn | Indirect, Rn | Indirect, Rn },
- { Rn | Indirect, Rn | Indirect, Rn } }, OO_PField },
- { "q_mpyi3_addi3",3,3,0x88000000, { { Rn | Indirect, Rn | Indirect, Rn },
- { Rn | Indirect, Rn | Indirect, Rn } }, OO_PField },
- { "q_mpyi3_sti", 3,2,0xE0000000, { { Indirect, Rn, Rn }, { Rn, Indirect, 0 } },
- OO_5op1 },
- { "q_mpyi3_subi3",3,3,0x8C000000, { { Rn | Indirect, Rn | Indirect, Rn },
- { Rn | Indirect, Rn | Indirect, Rn } }, OO_PField },
- { "q_negf_stf", 2,2,0xE2000000, { { Indirect, Rn, 0 }, { Rn, Indirect, 0 } },
- OO_4op1 },
- { "q_negi_sti", 2,2,0xE4000000, { { Indirect, Rn, 0 }, { Rn, Indirect, 0 } },
- OO_4op1 },
- { "q_not_sti", 2,2,0xE6000000, { { Indirect, Rn, 0 }, { Rn, Indirect, 0 } },
- OO_4op1 },
- { "q_or3_sti", 3,2,0xE8000000, { { Indirect, Rn, Rn }, { Rn, Indirect, 0 } },
- OO_5op1 },
- { "q_stf_stf", 2,2,0xC0000000, { { Rn, Indirect, 0 }, { Rn, Indirect, 0 } },
- OO_4op3 },
- { "q_sti_sti", 2,2,0xC2000000, { { Rn, Indirect, 0 }, { Rn, Indirect, 0 } },
- OO_4op3 },
- { "q_subf3_stf", 3,2,0xEA000000, { { Rn, Indirect, Rn }, { Rn, Indirect, 0 } },
- OO_5op2 },
- { "q_subi3_sti", 3,2,0xEC000000, { { Rn, Indirect, Rn }, { Rn, Indirect, 0 } },
- OO_5op2 },
- { "q_xor3_sti", 3,2,0xEE000000, { { Indirect, Rn, Rn }, { Rn, Indirect, 0 } },
- OO_5op1 },
- { "", 0,0,0x00000000, { { 0, 0, 0 }, { 0, 0, 0 } }, 0 }
-};
-
-static const partemplate *const tic30_paroptab_end =
- tic30_paroptab + sizeof(tic30_paroptab)/sizeof(tic30_paroptab[0]);
-
-#endif
diff --git a/include/opcode/tic4x.h b/include/opcode/tic4x.h
deleted file mode 100644
index 8830a7d..0000000
--- a/include/opcode/tic4x.h
+++ /dev/null
@@ -1,1079 +0,0 @@
-/* Table of opcodes for the Texas Instruments TMS320C[34]X family.
-
- Copyright (C) 2002, 2003 Free Software Foundation.
-
- Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz)
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-#define IS_CPU_TIC3X(v) ((v) == 30 || (v) == 31 || (v) == 32 || (v) == 33)
-#define IS_CPU_TIC4X(v) ((v) == 0 || (v) == 40 || (v) == 44)
-
-/* Define some bitfield extraction/insertion macros. */
-#define EXTR(inst, m, l) ((inst) << (31 - (m)) >> (31 - ((m) - (l))))
-#define EXTRU(inst, m, l) EXTR ((unsigned long)(inst), (m), (l))
-#define EXTRS(inst, m, l) EXTR ((long)(inst), (m), (l))
-#define INSERTU(inst, val, m, l) (inst |= ((val) << (l)))
-#define INSERTS(inst, val, m, l) INSERTU (inst, ((val) & ((1 << ((m) - (l) + 1)) - 1)), m, l)
-
-/* Define register numbers. */
-typedef enum
- {
- REG_R0, REG_R1, REG_R2, REG_R3,
- REG_R4, REG_R5, REG_R6, REG_R7,
- REG_AR0, REG_AR1, REG_AR2, REG_AR3,
- REG_AR4, REG_AR5, REG_AR6, REG_AR7,
- REG_DP, REG_IR0, REG_IR1, REG_BK,
- REG_SP, REG_ST, REG_DIE, REG_IIE,
- REG_IIF, REG_RS, REG_RE, REG_RC,
- REG_R8, REG_R9, REG_R10, REG_R11,
- REG_IVTP, REG_TVTP
- }
-c4x_reg_t;
-
-/* Note that the actual register numbers for IVTP is 0 and TVTP is 1. */
-
-#define REG_IE REG_DIE /* C3x only */
-#define REG_IF REG_IIE /* C3x only */
-#define REG_IOF REG_IIF /* C3x only */
-
-#define TIC3X_REG_MAX REG_RC
-#define TIC4X_REG_MAX REG_TVTP
-
-/* Register table size including C4x expansion regs. */
-#define REG_TABLE_SIZE (TIC4X_REG_MAX + 1)
-
-struct tic4x_register
-{
- char * name;
- unsigned long regno;
-};
-
-typedef struct tic4x_register tic4x_register_t;
-
-/* We could store register synonyms here. */
-static const tic4x_register_t tic3x_registers[] =
-{
- {"f0", REG_R0},
- {"r0", REG_R0},
- {"f1", REG_R1},
- {"r1", REG_R1},
- {"f2", REG_R2},
- {"r2", REG_R2},
- {"f3", REG_R3},
- {"r3", REG_R3},
- {"f4", REG_R4},
- {"r4", REG_R4},
- {"f5", REG_R5},
- {"r5", REG_R5},
- {"f6", REG_R6},
- {"r6", REG_R6},
- {"f7", REG_R7},
- {"r7", REG_R7},
- {"ar0", REG_AR0},
- {"ar1", REG_AR1},
- {"ar2", REG_AR2},
- {"ar3", REG_AR3},
- {"ar4", REG_AR4},
- {"ar5", REG_AR5},
- {"ar6", REG_AR6},
- {"ar7", REG_AR7},
- {"dp", REG_DP},
- {"ir0", REG_IR0},
- {"ir1", REG_IR1},
- {"bk", REG_BK},
- {"sp", REG_SP},
- {"st", REG_ST},
- {"ie", REG_IE},
- {"if", REG_IF},
- {"iof", REG_IOF},
- {"rs", REG_RS},
- {"re", REG_RE},
- {"rc", REG_RC},
- {"", 0}
-};
-
-const unsigned int tic3x_num_registers = (((sizeof tic3x_registers) / (sizeof tic3x_registers[0])) - 1);
-
-/* Define C4x registers in addition to C3x registers. */
-static const tic4x_register_t tic4x_registers[] =
-{
- {"die", REG_DIE}, /* Clobbers C3x REG_IE */
- {"iie", REG_IIE}, /* Clobbers C3x REG_IF */
- {"iif", REG_IIF}, /* Clobbers C3x REG_IOF */
- {"f8", REG_R8},
- {"r8", REG_R8},
- {"f9", REG_R9},
- {"r9", REG_R9},
- {"f10", REG_R10},
- {"r10", REG_R10},
- {"f11", REG_R11},
- {"r11", REG_R11},
- {"ivtp", REG_IVTP},
- {"tvtp", REG_TVTP},
- {"", 0}
-};
-
-const unsigned int tic4x_num_registers = (((sizeof tic4x_registers) / (sizeof tic4x_registers[0])) - 1);
-
-struct tic4x_cond
-{
- char * name;
- unsigned long cond;
-};
-
-typedef struct tic4x_cond tic4x_cond_t;
-
-/* Define conditional branch/load suffixes. Put desired form for
- disassembler last. */
-static const tic4x_cond_t tic4x_conds[] =
-{
- { "u", 0x00 },
- { "c", 0x01 }, { "lo", 0x01 },
- { "ls", 0x02 },
- { "hi", 0x03 },
- { "nc", 0x04 }, { "hs", 0x04 },
- { "z", 0x05 }, { "eq", 0x05 },
- { "nz", 0x06 }, { "ne", 0x06 },
- { "n", 0x07 }, { "l", 0x07 }, { "lt", 0x07 },
- { "le", 0x08 },
- { "p", 0x09 }, { "gt", 0x09 },
- { "nn", 0x0a }, { "ge", 0x0a },
- { "nv", 0x0c },
- { "v", 0x0d },
- { "nuf", 0x0e },
- { "uf", 0x0f },
- { "nlv", 0x10 },
- { "lv", 0x11 },
- { "nluf", 0x12 },
- { "luf", 0x13 },
- { "zuf", 0x14 },
- /* Dummy entry, not included in num_conds. This
- lets code examine entry i+1 without checking
- if we've run off the end of the table. */
- { "", 0x0}
-};
-
-const unsigned int tic4x_num_conds = (((sizeof tic4x_conds) / (sizeof tic4x_conds[0])) - 1);
-
-struct tic4x_indirect
-{
- char * name;
- unsigned long modn;
-};
-
-typedef struct tic4x_indirect tic4x_indirect_t;
-
-/* Define indirect addressing modes where:
- d displacement (signed)
- y ir0
- z ir1 */
-
-static const tic4x_indirect_t tic4x_indirects[] =
-{
- { "*+a(d)", 0x00 },
- { "*-a(d)", 0x01 },
- { "*++a(d)", 0x02 },
- { "*--a(d)", 0x03 },
- { "*a++(d)", 0x04 },
- { "*a--(d)", 0x05 },
- { "*a++(d)%", 0x06 },
- { "*a--(d)%", 0x07 },
- { "*+a(y)", 0x08 },
- { "*-a(y)", 0x09 },
- { "*++a(y)", 0x0a },
- { "*--a(y)", 0x0b },
- { "*a++(y)", 0x0c },
- { "*a--(y)", 0x0d },
- { "*a++(y)%", 0x0e },
- { "*a--(y)%", 0x0f },
- { "*+a(z)", 0x10 },
- { "*-a(z)", 0x11 },
- { "*++a(z)", 0x12 },
- { "*--a(z)", 0x13 },
- { "*a++(z)", 0x14 },
- { "*a--(z)", 0x15 },
- { "*a++(z)%", 0x16 },
- { "*a--(z)%", 0x17 },
- { "*a", 0x18 },
- { "*a++(y)b", 0x19 },
- /* Dummy entry, not included in num_indirects. This
- lets code examine entry i+1 without checking
- if we've run off the end of the table. */
- { "", 0x0}
-};
-
-#define TIC3X_MODN_MAX 0x19
-
-const unsigned int tic4x_num_indirects = (((sizeof tic4x_indirects) / (sizeof tic4x_indirects[0])) - 1);
-
-/* Instruction template. */
-struct tic4x_inst
-{
- char * name;
- unsigned long opcode;
- unsigned long opmask;
- char * args;
- unsigned long oplevel;
-};
-
-typedef struct tic4x_inst tic4x_inst_t;
-
-/* Opcode infix
- B condition 16--20 U,C,Z,LO,HI, etc.
- C condition 23--27 U,C,Z,LO,HI, etc.
-
- Arguments
- , required arg follows
- ; optional arg follows
-
- Argument types bits [classes] - example
- -----------------------------------------------------------
- * indirect (all) 0--15 [A,AB,AU,AF,A2,A3,A6,A7,AY,B,BA,BB,BI,B6,B7] - *+AR0(5), *++AR0(IR0)
- # direct (for LDP) 0--15 [Z] - @start, start
- @ direct 0--15 [A,AB,AU,AF,A3,A6,A7,AY,B,BA,BB,BI,B6,B7] - @start, start
- A address register 22--24 [D] - AR0, AR7
- B unsigned integer 0--23 [I,I2] - @start, start (absolute on C3x, relative on C4x)
- C indirect (disp - C4x) 0--7 [S,SC,S2,T,TC,T2,T2C] - *+AR0(5)
- E register (all) 0--7 [T,TC,T2,T2C] - R0, R7, R11, AR0, DP
- e register (0-11) 0--7 [S,SC,S2] - R0, R7, R11
- F short float immediate 0--15 [AF,B,BA,BB] - 3.5, 0e-3.5e-1
- G register (all) 8--15 [T,TC,T2,T2C] - R0, R7, R11, AR0, DP
- g register (0-11) 0--7 [S,SC,S2] - R0, R7, R11
- H register (0-7) 18--16 [LS,M,P,Q] - R0, R7
- I indirect (no disp) 0--7 [S,SC,S2,T,TC,T2,T2C] - *+AR0(1), *+AR0(IR0)
- i indirect (enhanced) 0--7 [LL,LS,M,P,Q,QC] - *+AR0(1), R5
- J indirect (no disp) 8--15 [LL,LS,P,Q,QC,S,SC,S2,T,TC,T2,T2C] - *+AR0(1), *+AR0(IR0)
- j indirect (enhanced) 8--15 [M] - *+AR0(1), R5
- K register 19--21 [LL,M,Q,QC] - R0, R7
- L register 22--24 [LL,LS,P,Q,QC] - R0, R7
- M register (R2,R3) 22--22 [M] R2, R3
- N register (R0,R1) 23--23 [M] R0, R1
- O indirect(disp - C4x) 8--15 [S,SC,S2,T,TC,T2] - *+AR0(5)
- P displacement (PC Rel) 0--15 [D,J,JS] - @start, start
- Q register (all) 0--15 [A,AB,AU,A2,A3,AY,BA,BI,D,I2,J,JS] - R0, AR0, DP, SP
- q register (0-11) 0--15 [AF,B,BB] - R0, R7, R11
- R register (all) 16--20 [A,AB,AU,AF,A6,A7,R,T,TC] - R0, AR0, DP, SP
- r register (0-11) 16--20 [B,BA,BB,BI,B6,B7,RF,S,SC] - R0, R1, R11
- S short int immediate 0--15 [A,AB,AY,BI] - -5, 5
- T integer (C4x) 16--20 [Z] - -5, 12
- U unsigned integer 0--15 [AU,A3] - 0, 65535
- V vector (C4x: 0--8) 0--4 [Z] - 25, 7
- W short int (C4x) 0--7 [T,TC,T2,T2C] - -3, 5
- X expansion reg (C4x) 0--4 [Z] - IVTP, TVTP
- Y address reg (C4x) 16--20 [Z] - AR0, DP, SP, IR0
- Z expansion reg (C4x) 16--20 [Z] - IVTP, TVTP
-*/
-
-#define TIC4X_OPERANDS_MAX 7 /* Max number of operands for an inst. */
-#define TIC4X_NAME_MAX 16 /* Max number of chars in parallel name. */
-
-/* Define the instruction level */
-#define OP_C3X 0x1 /* C30 support - supported by all */
-#define OP_C4X 0x2 /* C40 support - C40, C44 */
-#define OP_ENH 0x4 /* Class LL,LS,M,P,Q,QC enhancements. Argument type
- I and J is enhanced in these classes - C31>=6.0,
- C32>=2.0, C33 */
-#define OP_LPWR 0x8 /* Low power support (LOPOWER, MAXSPEED) - C30>=7.0,
- LC31, C31>=5.0, C32 */
-#define OP_IDLE2 0x10 /* Idle2 support (IDLE2) - C30>=7.0, LC31, C31>=5.0,
- C32, C33, C40>=5.0, C44 */
-
-/* The following class definition is a classification scheme for
- putting instructions with similar type of arguments together. It
- simplifies the op-code definitions significantly, as we then only
- need to use the class macroes for 95% of the DSP's opcodes.
-*/
-
-/* A: General 2-operand integer operations
- Syntax: <i> src, dst
- src = Register (Q), Direct (@), Indirect (*), Signed immediate (S)
- dst = Register (R)
- Instr: 15/8 - ABSI, ADDC, ADDI, ASH, CMPI, LDI, LSH, MPYI, NEGB, NEGI,
- SUBB, SUBC, SUBI, SUBRB, SUBRI, C4x: LBn, LHn, LWLn, LWRn,
- MBn, MHn, MPYSHI, MPYUHI
-*/
-#define A_CLASS_INSN(name, opcode, level) \
- { name, opcode|0x00000000, 0xffe00000, "Q;R", level }, \
- { name, opcode|0x00200000, 0xffe00000, "@,R", level }, \
- { name, opcode|0x00400000, 0xffe00000, "*,R", level }, \
- { name, opcode|0x00600000, 0xffe00000, "S,R", level }
-
-/* AB: General 2-operand integer operation with condition
- Syntax: <i>c src, dst
- c = Condition
- src = Register (Q), Direct (@), Indirect (*), Signed immediate (S)
- dst = Register (R)
- Instr: 1/0 - LDIc
-*/
-#define AB_CLASS_INSN(name, opcode, level) \
- { name, opcode|0x40000000, 0xf0600000, "Q;R", level }, \
- { name, opcode|0x40200000, 0xf0600000, "@,R", level }, \
- { name, opcode|0x40400000, 0xf0600000, "*,R", level }, \
- { name, opcode|0x40600000, 0xf0600000, "S,R", level }
-
-/* AU: General 2-operand unsigned integer operation
- Syntax: <i> src, dst
- src = Register (Q), Direct (@), Indirect (*), Unsigned immediate (U)
- dst = Register (R)
- Instr: 6/2 - AND, ANDN, NOT, OR, TSTB, XOR, C4x: LBUn, LHUn
-*/
-#define AU_CLASS_INSN(name, opcode, level) \
- { name, opcode|0x00000000, 0xffe00000, "Q;R", level }, \
- { name, opcode|0x00200000, 0xffe00000, "@,R", level }, \
- { name, opcode|0x00400000, 0xffe00000, "*,R", level }, \
- { name, opcode|0x00600000, 0xffe00000, "U,R", level }
-
-/* AF: General 2-operand float to integer operation
- Syntax: <i> src, dst
- src = Register 0-11 (q), Direct (@), Indirect (*), Float immediate (F)
- dst = Register (R)
- Instr: 1/0 - FIX
-*/
-#define AF_CLASS_INSN(name, opcode, level) \
- { name, opcode|0x00000000, 0xffe00000, "q;R", level }, \
- { name, opcode|0x00200000, 0xffe00000, "@,R", level }, \
- { name, opcode|0x00400000, 0xffe00000, "*,R", level }, \
- { name, opcode|0x00600000, 0xffe00000, "F,R", level }
-
-/* A2: Limited 1-operand (integer) operation
- Syntax: <i> src
- src = Register (Q), Indirect (*), None
- Instr: 1/0 - NOP
-*/
-#define A2_CLASS_INSN(name, opcode, level) \
- { name, opcode|0x00000000, 0xffe00000, "Q", level }, \
- { name, opcode|0x00400000, 0xffe00000, "*", level }, \
- { name, opcode|0x00000000, 0xffe00000, "" , level }
-
-/* A3: General 1-operand unsigned integer operation
- Syntax: <i> src
- src = Register (Q), Direct (@), Indirect (*), Unsigned immediate (U)
- Instr: 1/0 - RPTS
-*/
-#define A3_CLASS_INSN(name, opcode, level) \
- { name, opcode|0x00000000, 0xffff0000, "Q", level }, \
- { name, opcode|0x00200000, 0xffff0000, "@", level }, \
- { name, opcode|0x00400000, 0xffff0000, "*", level }, \
- { name, opcode|0x00600000, 0xffff0000, "U", level }
-
-/* A6: Limited 2-operand integer operation
- Syntax: <i> src, dst
- src = Direct (@), Indirect (*)
- dst = Register (R)
- Instr: 1/1 - LDII, C4x: SIGI
-*/
-#define A6_CLASS_INSN(name, opcode, level) \
- { name, opcode|0x00200000, 0xffe00000, "@,R", level }, \
- { name, opcode|0x00400000, 0xffe00000, "*,R", level }
-
-/* A7: Limited 2-operand integer store operation
- Syntax: <i> src, dst
- src = Register (R)
- dst = Direct (@), Indirect (*)
- Instr: 2/0 - STI, STII
-*/
-#define A7_CLASS_INSN(name, opcode, level) \
- { name, opcode|0x00200000, 0xffe00000, "R,@", level }, \
- { name, opcode|0x00400000, 0xffe00000, "R,*", level }
-
-/* AY: General 2-operand signed address load operation
- Syntax: <i> src, dst
- src = Register (Q), Direct (@), Indirect (*), Signed immediate (S)
- dst = Address register - ARx, IRx, DP, BK, SP (Y)
- Instr: 0/1 - C4x: LDA
- Note: Q and Y should *never* be the same register
-*/
-#define AY_CLASS_INSN(name, opcode, level) \
- { name, opcode|0x00000000, 0xffe00000, "Q,Y", level }, \
- { name, opcode|0x00200000, 0xffe00000, "@,Y", level }, \
- { name, opcode|0x00400000, 0xffe00000, "*,Y", level }, \
- { name, opcode|0x00600000, 0xffe00000, "S,Y", level }
-
-/* B: General 2-operand float operation
- Syntax: <i> src, dst
- src = Register 0-11 (q), Direct (@), Indirect (*), Float immediate (F)
- dst = Register 0-11 (r)
- Instr: 12/2 - ABSF, ADDF, CMPF, LDE, LDF, LDM, MPYF, NEGF, NORM, RND,
- SUBF, SUBRF, C4x: RSQRF, TOIEEE
-*/
-#define B_CLASS_INSN(name, opcode, level) \
- { name, opcode|0x00000000, 0xffe00000, "q;r", level }, \
- { name, opcode|0x00200000, 0xffe00000, "@,r", level }, \
- { name, opcode|0x00400000, 0xffe00000, "*,r", level }, \
- { name, opcode|0x00600000, 0xffe00000, "F,r", level }
-
-/* BA: General 2-operand integer to float operation
- Syntax: <i> src, dst
- src = Register (Q), Direct (@), Indirect (*), Float immediate (F)
- dst = Register 0-11 (r)
- Instr: 0/1 - C4x: CRCPF
-*/
-#define BA_CLASS_INSN(name, opcode, level) \
- { name, opcode|0x00000000, 0xffe00000, "Q;r", level }, \
- { name, opcode|0x00200000, 0xffe00000, "@,r", level }, \
- { name, opcode|0x00400000, 0xffe00000, "*,r", level }, \
- { name, opcode|0x00600000, 0xffe00000, "F,r", level }
-
-/* BB: General 2-operand conditional float operation
- Syntax: <i>c src, dst
- c = Condition
- src = Register 0-11 (q), Direct (@), Indirect (*), Float immediate (F)
- dst = Register 0-11 (r)
- Instr: 1/0 - LDFc
-*/
-#define BB_CLASS_INSN(name, opcode, level) \
- { name, opcode|0x40000000, 0xf0600000, "q;r", level }, \
- { name, opcode|0x40200000, 0xf0600000, "@,r", level }, \
- { name, opcode|0x40400000, 0xf0600000, "*,r", level }, \
- { name, opcode|0x40600000, 0xf0600000, "F,r", level }
-
-/* BI: General 2-operand integer to float operation (yet different to BA)
- Syntax: <i> src, dst
- src = Register (Q), Direct (@), Indirect (*), Signed immediate (S)
- dst = Register 0-11 (r)
- Instr: 1/0 - FLOAT
-*/
-#define BI_CLASS_INSN(name, opcode, level) \
- { name, opcode|0x00000000, 0xffe00000, "Q;r", level }, \
- { name, opcode|0x00200000, 0xffe00000, "@,r", level }, \
- { name, opcode|0x00400000, 0xffe00000, "*,r", level }, \
- { name, opcode|0x00600000, 0xffe00000, "S,r", level }
-
-/* B6: Limited 2-operand float operation
- Syntax: <i> src, dst
- src = Direct (@), Indirect (*)
- dst = Register 0-11 (r)
- Instr: 1/1 - LDFI, C4x: FRIEEE
-*/
-#define B6_CLASS_INSN(name, opcode, level) \
- { name, opcode|0x00200000, 0xffe00000, "@,r", level }, \
- { name, opcode|0x00400000, 0xffe00000, "*,r", level }
-
-/* B7: Limited 2-operand float store operation
- Syntax: <i> src, dst
- src = Register 0-11 (r)
- dst = Direct (@), Indirect (*)
- Instr: 2/0 - STF, STFI
-*/
-#define B7_CLASS_INSN(name, opcode, level) \
- { name, opcode|0x00200000, 0xffe00000, "r,@", level }, \
- { name, opcode|0x00400000, 0xffe00000, "r,*", level }
-
-/* D: Decrement and brach operations
- Syntax: <i>c ARn, dst
- c = condition
- ARn = AR register 0-7 (A)
- dst = Register (Q), PC-relative (P)
- Instr: 2/0 - DBc, DBcD
- Alias: <name1> <name2>
-*/
-#define D_CLASS_INSN(name1, name2, opcode, level) \
- { name1, opcode|0x00000000, 0xfe200000, "A,Q", level }, \
- { name1, opcode|0x02000000, 0xfe200000, "A,P", level }, \
- { name2, opcode|0x00000000, 0xfe200000, "A,Q", level }, \
- { name2, opcode|0x02000000, 0xfe200000, "A,P", level }
-
-/* I: General branch operations
- Syntax: <i> dst
- dst = Address (B)
- Instr: 3/1 - BR, BRD, CALL, C4x: LAJ
-*/
-
-/* I2: General branch operations (C4x addition)
- Syntax: <i> dst
- dst = Address (B), C4x: Register (Q)
- Instr: 2/0 - RPTB, RPTBD
-*/
-
-/* J: General conditional branch operations
- Syntax: <i>c dst
- c = Condition
- dst = Register (Q), PC-relative (P)
- Instr: 2/3 - Bc, BcD, C4x: BcAF, BcAT, LAJc
- Alias: <name1> <name2>
-*/
-#define J_CLASS_INSN(name1, name2, opcode, level) \
- { name1, opcode|0x00000000, 0xffe00000, "Q", level }, \
- { name1, opcode|0x02000000, 0xffe00000, "P", level }, \
- { name2, opcode|0x00000000, 0xffe00000, "Q", level }, \
- { name2, opcode|0x02000000, 0xffe00000, "P", level }
-
-/* JS: General conditional branch operations
- Syntax: <i>c dst
- c = Condition
- dst = Register (Q), PC-relative (P)
- Instr: 1/1 - CALLc, C4X: LAJc
-*/
-
-/* LL: Load-load parallell operation
- Syntax: <i> src2, dst2 || <i> src1, dst1
- src1 = Indirect 0,1,IR0,IR1 (J)
- dst1 = Register 0-7 (K)
- src2 = Indirect 0,1,IR0,IR1, ENH: Register (i)
- dst2 = Register 0-7 (L)
- Instr: 2/0 - LDF||LDF, LDI||LDI
- Alias: i||i, i1||i2, i2||i1
-*/
-#define LL_CLASS_INSN(name, opcode, level) \
- { name "_" name , opcode, 0xfe000000, "i;L|J,K", level }, \
- { name "2_" name "1", opcode, 0xfe000000, "i;L|J,K", level }, \
- { name "1_" name "2", opcode, 0xfe000000, "J,K|i;L", level }
-
-/* LS: Store-store parallell operation
- Syntax: <i> src2, dst2 || <i> src1, dst1
- src1 = Register 0-7 (H)
- dst1 = Indirect 0,1,IR0,IR1 (J)
- src2 = Register 0-7 (L)
- dst2 = Indirect 0,1,IR0,IR1, ENH: register (i)
- Instr: 2/0 - STF||STF, STI||STI
- Alias: i||i, i1||i2, i2||i1.
-*/
-#define LS_CLASS_INSN(name, opcode, level) \
- { name "_" name , opcode, 0xfe000000, "L;i|H,J", level }, \
- { name "2_" name "1", opcode, 0xfe000000, "L;i|H,J", level }, \
- { name "1_" name "2", opcode, 0xfe000000, "H,J|L;i", level }
-
-/* M: General multiply and add/sub operations
- Syntax: <ia> src3,src4,dst1 || <ib> src2,src1,dst2 [00] - Manual
- <ia> src3,src1,dst1 || <ib> src2,src4,dst2 [01] - Manual
- <ia> src1,src3,dst1 || <ib> src2,src4,dst2 [01]
- <ia> src1,src2,dst1 || <ib> src4,src3,dst2 [02] - Manual
- <ia> src3,src1,dst1 || <ib> src4,src2,dst2 [03] - Manual
- <ia> src1,src3,dst1 || <ib> src4,src2,dst2 [03]
- src1 = Register 0-7 (K)
- src2 = Register 0-7 (H)
- src3 = Indirect 0,1,IR0,IR1, ENH: register (j)
- src4 = Indirect 0,1,IR0,IR1, ENH: register (i)
- dst1 = Register 0-1 (N)
- dst2 = Register 2-3 (M)
- Instr: 4/0 - MPYF3||ADDF3, MPYF3||SUBF3, MPYI3||ADDI3, MPYI3||SUBI3
- Alias: a||b, a3||n, a||b3, a3||b3, b||a, b3||a, b||a3, b3||a3
-*/
-#define M_CLASS_INSN(namea, nameb, opcode, level) \
- { namea "_" nameb, opcode|0x00000000, 0xff000000, "i;j;N|H;K;M", level }, \
- { namea "_" nameb, opcode|0x01000000, 0xff000000, "j;K;N|H;i;M", level }, \
- { namea "_" nameb, opcode|0x01000000, 0xff000000, "K;j;N|H;i;M", level }, \
- { namea "_" nameb, opcode|0x02000000, 0xff000000, "H;K;N|i;j;M", level }, \
- { namea "_" nameb, opcode|0x03000000, 0xff000000, "j;K;N|i;H;M", level }, \
- { namea "_" nameb, opcode|0x03000000, 0xff000000, "K;j;N|i;H;M", level }, \
- { namea "3_" nameb, opcode|0x00000000, 0xff000000, "i;j;N|H;K;M", level }, \
- { namea "3_" nameb, opcode|0x01000000, 0xff000000, "j;K;N|H;i;M", level }, \
- { namea "3_" nameb, opcode|0x01000000, 0xff000000, "K;j;N|H;i;M", level }, \
- { namea "3_" nameb, opcode|0x02000000, 0xff000000, "H;K;N|i;j;M", level }, \
- { namea "3_" nameb, opcode|0x03000000, 0xff000000, "j;K;N|i;H;M", level }, \
- { namea "3_" nameb, opcode|0x03000000, 0xff000000, "K;j;N|i;H;M", level }, \
- { namea "_" nameb "3", opcode|0x00000000, 0xff000000, "i;j;N|H;K;M", level }, \
- { namea "_" nameb "3", opcode|0x01000000, 0xff000000, "j;K;N|H;i;M", level }, \
- { namea "_" nameb "3", opcode|0x01000000, 0xff000000, "K;j;N|H;i;M", level }, \
- { namea "_" nameb "3", opcode|0x02000000, 0xff000000, "H;K;N|i;j;M", level }, \
- { namea "_" nameb "3", opcode|0x03000000, 0xff000000, "j;K;N|i;H;M", level }, \
- { namea "_" nameb "3", opcode|0x03000000, 0xff000000, "K;j;N|i;H;M", level }, \
- { namea "3_" nameb "3", opcode|0x00000000, 0xff000000, "i;j;N|H;K;M", level }, \
- { namea "3_" nameb "3", opcode|0x01000000, 0xff000000, "j;K;N|H;i;M", level }, \
- { namea "3_" nameb "3", opcode|0x01000000, 0xff000000, "K;j;N|H;i;M", level }, \
- { namea "3_" nameb "3", opcode|0x02000000, 0xff000000, "H;K;N|i;j;M", level }, \
- { namea "3_" nameb "3", opcode|0x03000000, 0xff000000, "j;K;N|i;H;M", level }, \
- { namea "3_" nameb "3", opcode|0x03000000, 0xff000000, "K;j;N|i;H;M", level }, \
- { nameb "_" namea, opcode|0x00000000, 0xff000000, "H;K;M|i;j;N", level }, \
- { nameb "_" namea, opcode|0x01000000, 0xff000000, "H;i;M|j;K;N", level }, \
- { nameb "_" namea, opcode|0x01000000, 0xff000000, "H;i;M|K;j;N", level }, \
- { nameb "_" namea, opcode|0x02000000, 0xff000000, "i;j;M|H;K;N", level }, \
- { nameb "_" namea, opcode|0x03000000, 0xff000000, "i;H;M|j;K;N", level }, \
- { nameb "_" namea, opcode|0x03000000, 0xff000000, "i;H;M|K;j;N", level }, \
- { nameb "3_" namea, opcode|0x00000000, 0xff000000, "H;K;M|i;j;N", level }, \
- { nameb "3_" namea, opcode|0x01000000, 0xff000000, "H;i;M|j;K;N", level }, \
- { nameb "3_" namea, opcode|0x01000000, 0xff000000, "H;i;M|K;j;N", level }, \
- { nameb "3_" namea, opcode|0x02000000, 0xff000000, "i;j;M|H;K;N", level }, \
- { nameb "3_" namea, opcode|0x03000000, 0xff000000, "i;H;M|j;K;N", level }, \
- { nameb "3_" namea, opcode|0x03000000, 0xff000000, "i;H;M|K;j;N", level }, \
- { nameb "_" namea "3", opcode|0x00000000, 0xff000000, "H;K;M|i;j;N", level }, \
- { nameb "_" namea "3", opcode|0x01000000, 0xff000000, "H;i;M|j;K;N", level }, \
- { nameb "_" namea "3", opcode|0x01000000, 0xff000000, "H;i;M|K;j;N", level }, \
- { nameb "_" namea "3", opcode|0x02000000, 0xff000000, "i;j;M|H;K;N", level }, \
- { nameb "_" namea "3", opcode|0x03000000, 0xff000000, "i;H;M|j;K;N", level }, \
- { nameb "_" namea "3", opcode|0x03000000, 0xff000000, "i;H;M|K;j;N", level }, \
- { nameb "3_" namea "3", opcode|0x00000000, 0xff000000, "H;K;M|i;j;N", level }, \
- { nameb "3_" namea "3", opcode|0x01000000, 0xff000000, "H;i;M|j;K;N", level }, \
- { nameb "3_" namea "3", opcode|0x01000000, 0xff000000, "H;i;M|K;j;N", level }, \
- { nameb "3_" namea "3", opcode|0x02000000, 0xff000000, "i;j;M|H;K;N", level }, \
- { nameb "3_" namea "3", opcode|0x03000000, 0xff000000, "i;H;M|j;K;N", level }, \
- { nameb "3_" namea "3", opcode|0x03000000, 0xff000000, "i;H;M|K;j;N", level }
-
-/* P: General 2-operand operation with parallell store
- Syntax: <ia> src2, dst1 || <ib> src3, dst2
- src2 = Indirect 0,1,IR0,IR1, ENH: register (i)
- dst1 = Register 0-7 (L)
- src3 = Register 0-7 (H)
- dst2 = Indirect 0,1,IR0,IR1 (J)
- Instr: 9/2 - ABSF||STF, ABSI||STI, FIX||STI, FLOAT||STF, LDF||STF,
- LDI||STI, NEGF||STF, NEGI||STI, NOT||STI, C4x: FRIEEE||STF,
- TOIEEE||STF
- Alias: a||b, b||a
-*/
-#define P_CLASS_INSN(namea, nameb, opcode, level) \
- { namea "_" nameb, opcode, 0xfe000000, "i;L|H,J", level }, \
- { nameb "_" namea, opcode, 0xfe000000, "H,J|i;L", level }
-
-/* Q: General 3-operand operation with parallell store
- Syntax: <ia> src1, src2, dst1 || <ib> src3, dst2
- src1 = Register 0-7 (K)
- src2 = Indirect 0,1,IR0,IR1, ENH: register (i)
- dst1 = Register 0-7 (L)
- src3 = Register 0-7 (H)
- dst2 = Indirect 0,1,IR0,IR1 (J)
- Instr: 4/0 - ASH3||STI, LSH3||STI, SUBF3||STF, SUBI3||STI
- Alias: a||b, b||a, a3||b, b||a3
-*/
-#define Q_CLASS_INSN(namea, nameb, opcode, level) \
- { namea "_" nameb , opcode, 0xfe000000, "K,i;L|H,J", level }, \
- { nameb "_" namea , opcode, 0xfe000000, "H,J|K,i;L", level }, \
- { namea "3_" nameb , opcode, 0xfe000000, "K,i;L|H,J", level }, \
- { nameb "_" namea "3", opcode, 0xfe000000, "H,J|K,i;L", level }
-
-/* QC: General commutative 3-operand operation with parallell store
- Syntax: <ia> src2, src1, dst1 || <ib> src3, dst2
- <ia> src1, src2, dst1 || <ib> src3, dst2 - Manual
- src1 = Register 0-7 (K)
- src2 = Indirect 0,1,IR0,IR1, ENH: register (i)
- dst1 = Register 0-7 (L)
- src3 = Register 0-7 (H)
- dst2 = Indirect 0,1,IR0,IR1 (J)
- Instr: 7/0 - ADDF3||STF, ADDI3||STI, AND3||STI, MPYF3||STF, MPYI3||STI,
- OR3||STI, XOR3||STI
- Alias: a||b, b||a, a3||b, b||a3
-*/
-#define QC_CLASS_INSN(namea, nameb, opcode, level) \
- { namea "_" nameb , opcode, 0xfe000000, "i;K;L|H,J", level }, \
- { namea "_" nameb , opcode, 0xfe000000, "K;i;L|H,J", level }, \
- { nameb "_" namea , opcode, 0xfe000000, "H,J|i;K;L", level }, \
- { nameb "_" namea , opcode, 0xfe000000, "H,J|K;i;L", level }, \
- { namea "3_" nameb , opcode, 0xfe000000, "i;K;L|H,J", level }, \
- { namea "3_" nameb , opcode, 0xfe000000, "K;i;L|H,J", level }, \
- { nameb "_" namea "3", opcode, 0xfe000000, "H,J|i;K;L", level }, \
- { nameb "_" namea "3", opcode, 0xfe000000, "H,J|K;i;L", level }
-
-/* R: General register integer operation
- Syntax: <i> dst
- dst = Register (R)
- Instr: 6/0 - POP, PUSH, ROL, ROLC, ROR, RORC
-*/
-#define R_CLASS_INSN(name, opcode, level) \
- { name, opcode, 0xffe0ffff, "R", level }
-
-/* RF: General register float operation
- Syntax: <i> dst
- dst = Register 0-11 (r)
- Instr: 2/0 - POPF, PUSHF
-*/
-#define RF_CLASS_INSN(name, opcode, level) \
- { name, opcode, 0xffe0ffff, "r", level }
-
-/* S: General 3-operand float operation
- Syntax: <i> src2, src1, dst
- src2 = Register 0-11 (e), Indirect 0,1,IR0,IR1 (I), C4x T2: Indirect (C)
- src1 = Register 0-11 (g), Indirect 0,1,IR0,IR1 (J), C4x T2: Indirect (O)
- dst = Register 0-11 (r)
- Instr: 1/0 - SUBF3
- Alias: i, i3
-*/
-#define S_CLASS_INSN(name, opcode, level) \
- { name, opcode|0x20000000, 0xffe00000, "e,g;r", level }, \
- { name, opcode|0x20200000, 0xffe00000, "e,J,r", level }, \
- { name, opcode|0x20400000, 0xffe00000, "I,g;r", level }, \
- { name, opcode|0x20600000, 0xffe00000, "I,J,r", level }, \
- { name, opcode|0x30200000, 0xffe00000, "C,g;r", OP_C4X }, \
- { name, opcode|0x30600000, 0xffe00000, "C,O,r", OP_C4X }, \
- { name "3", opcode|0x20000000, 0xffe00000, "e,g;r", level }, \
- { name "3", opcode|0x20200000, 0xffe00000, "e,J,r", level }, \
- { name "3", opcode|0x20400000, 0xffe00000, "I,g;r", level }, \
- { name "3", opcode|0x20600000, 0xffe00000, "I,J,r", level }, \
- { name "3", opcode|0x30200000, 0xffe00000, "C,g;r", OP_C4X }, \
- { name "3", opcode|0x30600000, 0xffe00000, "C,O,r", OP_C4X }
-
-/* SC: General commutative 3-operand float operation
- Syntax: <i> src2, src1, dst - Manual
- <i> src1, src2, dst
- src2 = Register 0-11 (e), Indirect 0,1,IR0,IR1 (I), C4x T2: Indirect (C)
- src1 = Register 0-11 (g), Indirect 0,1,IR0,IR1 (J), C4x T2: Indirect (O)
- dst = Register 0-11 (r)
- Instr: 2/0 - ADDF3, MPYF3
- Alias: i, i3
-*/
-#define SC_CLASS_INSN(name, opcode, level) \
- { name, opcode|0x20000000, 0xffe00000, "e,g;r", level }, \
- { name, opcode|0x20200000, 0xffe00000, "e,J,r", level }, \
- { name, opcode|0x20400000, 0xffe00000, "I,g;r", level }, \
- { name, opcode|0x20600000, 0xffe00000, "I,J,r", level }, \
- { name, opcode|0x30200000, 0xffe00000, "C,g;r", OP_C4X }, \
- { name, opcode|0x30200000, 0xffe00000, "g,C,r", OP_C4X }, \
- { name, opcode|0x30600000, 0xffe00000, "C,O,r", OP_C4X }, \
- { name "3", opcode|0x20000000, 0xffe00000, "e,g;r", level }, \
- { name "3", opcode|0x20200000, 0xffe00000, "e,J,r", level }, \
- { name "3", opcode|0x20400000, 0xffe00000, "I,g;r", level }, \
- { name "3", opcode|0x20600000, 0xffe00000, "I,J,r", level }, \
- { name "3", opcode|0x30200000, 0xffe00000, "g,C,r", OP_C4X }, \
- { name "3", opcode|0x30200000, 0xffe00000, "C,g;r", OP_C4X }, \
- { name "3", opcode|0x30600000, 0xffe00000, "C,O,r", OP_C4X }
-
-/* S2: General 3-operand float operation with 2 args
- Syntax: <i> src2, src1
- src2 = Register 0-11 (e), Indirect 0,1,IR0,IR1 (I), C4x T2: Indirect (C)
- src1 = Register 0-11 (g), Indirect 0,1,IR0,IR1 (J), C4x T2: Indirect (O)
- Instr: 1/0 - CMPF3
- Alias: i, i3
-*/
-#define S2_CLASS_INSN(name, opcode, level) \
- { name, opcode|0x20000000, 0xffe00000, "e,g", level }, \
- { name, opcode|0x20200000, 0xffe00000, "e,J", level }, \
- { name, opcode|0x20400000, 0xffe00000, "I,g", level }, \
- { name, opcode|0x20600000, 0xffe00000, "I,J", level }, \
- { name, opcode|0x30200000, 0xffe00000, "C,g", OP_C4X }, \
- { name, opcode|0x30600000, 0xffe00000, "C,O", OP_C4X }, \
- { name "3", opcode|0x20000000, 0xffe00000, "e,g", level }, \
- { name "3", opcode|0x20200000, 0xffe00000, "e,J", level }, \
- { name "3", opcode|0x20400000, 0xffe00000, "I,g", level }, \
- { name "3", opcode|0x20600000, 0xffe00000, "I,J", level }, \
- { name "3", opcode|0x30200000, 0xffe00000, "C,g", OP_C4X }, \
- { name "3", opcode|0x30600000, 0xffe00000, "C,O", OP_C4X }
-
-/* T: General 3-operand integer operand
- Syntax: <i> src2, src1, dst
- src2 = Register (E), Indirect 0,1,IR0,IR1 (I), C4x T2: Indirect (C), Immediate (W)
- src1 = Register (G), Indirect 0,1,IR0,IR1 (J), C4x T2: Indirect (O)
- dst = Register (R)
- Instr: 5/0 - ANDN3, ASH3, LSH3, SUBB3, SUBI3
- Alias: i, i3
-*/
-#define T_CLASS_INSN(name, opcode, level) \
- { name, opcode|0x20000000, 0xffe00000, "E,G;R", level }, \
- { name, opcode|0x20200000, 0xffe00000, "E,J,R", level }, \
- { name, opcode|0x20400000, 0xffe00000, "I,G;R", level }, \
- { name, opcode|0x20600000, 0xffe00000, "I,J,R", level }, \
- { name, opcode|0x30000000, 0xffe00000, "W,G;R", OP_C4X }, \
- { name, opcode|0x30200000, 0xffe00000, "C,G;R", OP_C4X }, \
- { name, opcode|0x30400000, 0xffe00000, "W,O,R", OP_C4X }, \
- { name, opcode|0x30600000, 0xffe00000, "C,O,R", OP_C4X }, \
- { name "3", opcode|0x20000000, 0xffe00000, "E,G;R", level }, \
- { name "3", opcode|0x20200000, 0xffe00000, "E,J,R", level }, \
- { name "3", opcode|0x20400000, 0xffe00000, "I,G;R", level }, \
- { name "3", opcode|0x20600000, 0xffe00000, "I,J,R", level }, \
- { name "3", opcode|0x30000000, 0xffe00000, "W,G;R", OP_C4X }, \
- { name "3", opcode|0x30200000, 0xffe00000, "C,G;R", OP_C4X }, \
- { name "3", opcode|0x30400000, 0xffe00000, "W,O,R", OP_C4X }, \
- { name "3", opcode|0x30600000, 0xffe00000, "C,O,R", OP_C4X }
-
-/* TC: General commutative 3-operand integer operation
- Syntax: <i> src2, src1, dst
- <i> src1, src2, dst
- src2 = Register (E), Indirect 0,1,IR0,IR1 (I), C4x T2: Indirect (C), Immediate (W)
- src1 = Register (G), Indirect 0,1,IR0,IR1 (J), C4x T2: Indirect (O)
- dst = Register (R)
- Instr: 6/2 - ADDC3, ADDI3, AND3, MPYI3, OR3, XOR3, C4x: MPYSHI, MPYUHI
- Alias: i, i3
-*/
-#define TC_CLASS_INSN(name, opcode, level) \
- { name, opcode|0x20000000, 0xffe00000, "E,G;R", level }, \
- { name, opcode|0x20200000, 0xffe00000, "E,J,R", level }, \
- { name, opcode|0x20400000, 0xffe00000, "I,G;R", level }, \
- { name, opcode|0x20600000, 0xffe00000, "I,J,R", level }, \
- { name, opcode|0x30000000, 0xffe00000, "W,G;R", OP_C4X }, \
- { name, opcode|0x30000000, 0xffe00000, "G,W,R", OP_C4X }, \
- { name, opcode|0x30200000, 0xffe00000, "C,G;R", OP_C4X }, \
- { name, opcode|0x30200000, 0xffe00000, "G,C,R", OP_C4X }, \
- { name, opcode|0x30400000, 0xffe00000, "W,O,R", OP_C4X }, \
- { name, opcode|0x30400000, 0xffe00000, "O,W,R", OP_C4X }, \
- { name, opcode|0x30600000, 0xffe00000, "C,O,R", OP_C4X }, \
- { name "3", opcode|0x20000000, 0xffe00000, "E,G;R", level }, \
- { name "3", opcode|0x20200000, 0xffe00000, "E,J,R", level }, \
- { name "3", opcode|0x20400000, 0xffe00000, "I,G;R", level }, \
- { name "3", opcode|0x20600000, 0xffe00000, "I,J,R", level }, \
- { name "3", opcode|0x30000000, 0xffe00000, "W,G;R", OP_C4X }, \
- { name "3", opcode|0x30000000, 0xffe00000, "G,W,R", OP_C4X }, \
- { name "3", opcode|0x30200000, 0xffe00000, "C,G;R", OP_C4X }, \
- { name "3", opcode|0x30200000, 0xffe00000, "G,C,R", OP_C4X }, \
- { name "3", opcode|0x30400000, 0xffe00000, "W,O,R", OP_C4X }, \
- { name "3", opcode|0x30400000, 0xffe00000, "O,W,R", OP_C4X }, \
- { name "3", opcode|0x30600000, 0xffe00000, "C,O,R", OP_C4X }
-
-/* T2: General 3-operand integer operation with 2 args
- Syntax: <i> src2, src1
- src2 = Register (E), Indirect 0,1,IR0,IR1 (I), C4x T2: Indirect (C), Immediate (W)
- src1 = Register (G), Indirect 0,1,IR0,IR1 (J), C4x T2: Indirect (O)
- Instr: 1/0 - CMPI3
- Alias: i, i3
-*/
-#define T2_CLASS_INSN(name, opcode, level) \
- { name, opcode|0x20000000, 0xffe00000, "E,G", level }, \
- { name, opcode|0x20200000, 0xffe00000, "E,J", level }, \
- { name, opcode|0x20400000, 0xffe00000, "I,G", level }, \
- { name, opcode|0x20600000, 0xffe00000, "I,J", level }, \
- { name, opcode|0x30000000, 0xffe00000, "W,G", OP_C4X }, \
- { name, opcode|0x30200000, 0xffe00000, "C,G", OP_C4X }, \
- { name, opcode|0x30400000, 0xffe00000, "W,O", OP_C4X }, \
- { name, opcode|0x30600000, 0xffe00000, "C,O", OP_C4X }, \
- { name "3", opcode|0x20000000, 0xffe00000, "E,G", level }, \
- { name "3", opcode|0x20200000, 0xffe00000, "E,J", level }, \
- { name "3", opcode|0x20400000, 0xffe00000, "I,G", level }, \
- { name "3", opcode|0x20600000, 0xffe00000, "I,J", level }, \
- { name "3", opcode|0x30000000, 0xffe00000, "W,G", OP_C4X }, \
- { name "3", opcode|0x30200000, 0xffe00000, "C,G", OP_C4X }, \
- { name "3", opcode|0x30400000, 0xffe00000, "W,O", OP_C4X }, \
- { name "3", opcode|0x30600000, 0xffe00000, "C,O", OP_C4X }
-
-/* T2C: General commutative 3-operand integer operation with 2 args
- Syntax: <i> src2, src1 - Manual
- <i> src1, src2
- src2 = Register (E), Indirect 0,1,IR0,IR1 (I), C4x T2: Indirect (C), Immediate (W)
- src1 = Register (G), Indirect 0,1,IR0,IR1 (J), C4x T2: Indirect (0)
- Instr: 1/0 - TSTB3
- Alias: i, i3
-*/
-#define T2C_CLASS_INSN(name, opcode, level) \
- { name, opcode|0x20000000, 0xffe00000, "E,G", level }, \
- { name, opcode|0x20200000, 0xffe00000, "E,J", level }, \
- { name, opcode|0x20400000, 0xffe00000, "I,G", level }, \
- { name, opcode|0x20600000, 0xffe00000, "I,J", level }, \
- { name, opcode|0x30000000, 0xffe00000, "W,G", OP_C4X }, \
- { name, opcode|0x30000000, 0xffe00000, "G,W", OP_C4X }, \
- { name, opcode|0x30200000, 0xffe00000, "C,G", OP_C4X }, \
- { name, opcode|0x30200000, 0xffe00000, "G,C", OP_C4X }, \
- { name, opcode|0x30400000, 0xffe00000, "W,O", OP_C4X }, \
- { name, opcode|0x30400000, 0xffe00000, "O,W", OP_C4X }, \
- { name, opcode|0x30600000, 0xffe00000, "C,O", OP_C4X }, \
- { name "3", opcode|0x20000000, 0xffe00000, "E,G", level }, \
- { name "3", opcode|0x20200000, 0xffe00000, "E,J", level }, \
- { name "3", opcode|0x20400000, 0xffe00000, "I,G", level }, \
- { name "3", opcode|0x20600000, 0xffe00000, "I,J", level }, \
- { name "3", opcode|0x30000000, 0xffe00000, "W,G", OP_C4X }, \
- { name "3", opcode|0x30000000, 0xffe00000, "G,W", OP_C4X }, \
- { name "3", opcode|0x30200000, 0xffe00000, "C,G", OP_C4X }, \
- { name "3", opcode|0x30200000, 0xffe00000, "G,C", OP_C4X }, \
- { name "3", opcode|0x30400000, 0xffe00000, "W,O", OP_C4X }, \
- { name "3", opcode|0x30400000, 0xffe00000, "O,W", OP_C4X }, \
- { name "3", opcode|0x30600000, 0xffe00000, "C,O", OP_C4X }
-
-/* Z: Misc operations with or without arguments
- Syntax: <i> <arg1>,...
- Instr: 16 - RETIc, RETSc, SIGI(c3X), SWI, IDLE, IDLE2, RETIcD,
- TRAPc, LATc, LDEP, LDEHI, LDEPE, LDPK, STIK, LDP, IACK
-*/
-
-
-/* Define tic4x opcodes for assembler and disassembler. */
-static const tic4x_inst_t tic4x_insts[] =
-{
- /* Put synonyms after the desired forms in table so that they get
- overwritten in the lookup table. The disassembler will thus
- print the `proper' mnemonics. Note that the disassembler
- only decodes the 11 MSBs, so instructions like ldp @0x500 will
- be printed as ldiu 5, dp. Note that with parallel instructions,
- the second part is executed before the first part, unless
- the sti1||sti2 form is used. We also allow sti2||sti1
- which is equivalent to the default sti||sti form.
- */
- B_CLASS_INSN( "absf", 0x00000000, OP_C3X ),
- P_CLASS_INSN( "absf", "stf", 0xc8000000, OP_C3X ),
- A_CLASS_INSN( "absi", 0x00800000, OP_C3X ),
- P_CLASS_INSN( "absi", "sti", 0xca000000, OP_C3X ),
- A_CLASS_INSN( "addc", 0x01000000, OP_C3X ),
- TC_CLASS_INSN( "addc", 0x00000000, OP_C3X ),
- B_CLASS_INSN( "addf", 0x01800000, OP_C3X ),
- SC_CLASS_INSN( "addf", 0x00800000, OP_C3X ),
- QC_CLASS_INSN( "addf", "stf", 0xcc000000, OP_C3X ),
- A_CLASS_INSN( "addi", 0x02000000, OP_C3X ),
- TC_CLASS_INSN( "addi", 0x01000000, OP_C3X ),
- QC_CLASS_INSN( "addi", "sti", 0xce000000, OP_C3X ),
- AU_CLASS_INSN( "and", 0x02800000, OP_C3X ),
- TC_CLASS_INSN( "and", 0x01800000, OP_C3X ),
- QC_CLASS_INSN( "and", "sti", 0xd0000000, OP_C3X ),
- AU_CLASS_INSN( "andn", 0x03000000, OP_C3X ),
- T_CLASS_INSN( "andn", 0x02000000, OP_C3X ),
- A_CLASS_INSN( "ash", 0x03800000, OP_C3X ),
- T_CLASS_INSN( "ash", 0x02800000, OP_C3X ),
- Q_CLASS_INSN( "ash", "sti", 0xd2000000, OP_C3X ),
- J_CLASS_INSN( "bB", "b", 0x68000000, OP_C3X ),
- J_CLASS_INSN( "bBd", "bd", 0x68200000, OP_C3X ),
- J_CLASS_INSN( "bBaf", "baf", 0x68a00000, OP_C4X ),
- J_CLASS_INSN( "bBat", "bat", 0x68600000, OP_C4X ),
- { "br", 0x60000000, 0xff000000, "B" , OP_C3X }, /* I_CLASS */
- { "brd", 0x61000000, 0xff000000, "B" , OP_C3X }, /* I_CLASS */
- { "call", 0x62000000, 0xff000000, "B" , OP_C3X }, /* I_CLASS */
- { "callB", 0x70000000, 0xffe00000, "Q" , OP_C3X }, /* JS_CLASS */
- { "callB", 0x72000000, 0xffe00000, "P" , OP_C3X }, /* JS_CLASS */
- B_CLASS_INSN( "cmpf", 0x04000000, OP_C3X ),
- S2_CLASS_INSN( "cmpf", 0x03000000, OP_C3X ),
- A_CLASS_INSN( "cmpi", 0x04800000, OP_C3X ),
- T2_CLASS_INSN( "cmpi", 0x03800000, OP_C3X ),
- D_CLASS_INSN( "dbB", "db", 0x6c000000, OP_C3X ),
- D_CLASS_INSN( "dbBd", "dbd", 0x6c200000, OP_C3X ),
- AF_CLASS_INSN( "fix", 0x05000000, OP_C3X ),
- P_CLASS_INSN( "fix", "sti", 0xd4000000, OP_C3X ),
- BI_CLASS_INSN( "float", 0x05800000, OP_C3X ),
- P_CLASS_INSN( "float", "stf", 0xd6000000, OP_C3X ),
- B6_CLASS_INSN( "frieee", 0x1c000000, OP_C4X ),
- P_CLASS_INSN( "frieee","stf", 0xf2000000, OP_C4X ),
- { "iack", 0x1b200000, 0xffe00000, "@" , OP_C3X }, /* Z_CLASS */
- { "iack", 0x1b400000, 0xffe00000, "*" , OP_C3X }, /* Z_CLASS */
- { "idle", 0x06000000, 0xffffffff, "" , OP_C3X }, /* Z_CLASS */
- { "idlez", 0x06000000, 0xffffffff, "" , OP_C3X }, /* Z_CLASS */
- { "idle2", 0x06000001, 0xffffffff, "" , OP_IDLE2 }, /* Z_CLASS */
- { "laj", 0x63000000, 0xff000000, "B" , OP_C4X }, /* I_CLASS */
- { "lajB", 0x70200000, 0xffe00000, "Q" , OP_C4X }, /* JS_CLASS */
- { "lajB", 0x72200000, 0xffe00000, "P" , OP_C4X }, /* JS_CLASS */
- { "latB", 0x74800000, 0xffe00000, "V" , OP_C4X }, /* Z_CLASS */
- A_CLASS_INSN( "lb0", 0xb0000000, OP_C4X ),
- A_CLASS_INSN( "lb1", 0xb0800000, OP_C4X ),
- A_CLASS_INSN( "lb2", 0xb1000000, OP_C4X ),
- A_CLASS_INSN( "lb3", 0xb1800000, OP_C4X ),
- AU_CLASS_INSN( "lbu0", 0xb2000000, OP_C4X ),
- AU_CLASS_INSN( "lbu1", 0xb2800000, OP_C4X ),
- AU_CLASS_INSN( "lbu2", 0xb3000000, OP_C4X ),
- AU_CLASS_INSN( "lbu3", 0xb3800000, OP_C4X ),
- AY_CLASS_INSN( "lda", 0x1e800000, OP_C4X ),
- B_CLASS_INSN( "lde", 0x06800000, OP_C3X ),
- { "ldep", 0x76000000, 0xffe00000, "X,R" , OP_C4X }, /* Z_CLASS */
- B_CLASS_INSN( "ldf", 0x07000000, OP_C3X ),
- LL_CLASS_INSN( "ldf", 0xc4000000, OP_C3X ),
- P_CLASS_INSN( "ldf", "stf", 0xd8000000, OP_C3X ),
- BB_CLASS_INSN( "ldfC", 0x00000000, OP_C3X ),
- B6_CLASS_INSN( "ldfi", 0x07800000, OP_C3X ),
- { "ldhi", 0x1fe00000, 0xffe00000, "U,R" , OP_C4X }, /* Z_CLASS */
- { "ldhi", 0x1fe00000, 0xffe00000, "#,R" , OP_C4X }, /* Z_CLASS */
- A_CLASS_INSN( "ldi", 0x08000000, OP_C3X ),
- LL_CLASS_INSN( "ldi", 0xc6000000, OP_C3X ),
- P_CLASS_INSN( "ldi", "sti", 0xda000000, OP_C3X ),
- AB_CLASS_INSN( "ldiC", 0x10000000, OP_C3X ),
- A6_CLASS_INSN( "ldii", 0x08800000, OP_C3X ),
- { "ldp", 0x50700000, 0xffff0000, "#" , OP_C3X }, /* Z_CLASS - synonym for ldiu #,dp */
- B_CLASS_INSN( "ldm", 0x09000000, OP_C3X ),
- { "ldpe", 0x76800000, 0xffe00000, "Q,Z" , OP_C4X }, /* Z_CLASS */
- { "ldpk", 0x1F700000, 0xffff0000, "#" , OP_C4X }, /* Z_CLASS */
- A_CLASS_INSN( "lh0", 0xba000000, OP_C4X ),
- A_CLASS_INSN( "lh1", 0xba800000, OP_C4X ),
- AU_CLASS_INSN( "lhu0", 0xbb000000, OP_C4X ),
- AU_CLASS_INSN( "lhu1", 0xbb800000, OP_C4X ),
- { "lopower", 0x10800001,0xffffffff, "" , OP_LPWR }, /* Z_CLASS */
- A_CLASS_INSN( "lsh", 0x09800000, OP_C3X ),
- T_CLASS_INSN( "lsh", 0x04000000, OP_C3X ),
- Q_CLASS_INSN( "lsh", "sti", 0xdc000000, OP_C3X ),
- A_CLASS_INSN( "lwl0", 0xb4000000, OP_C4X ),
- A_CLASS_INSN( "lwl1", 0xb4800000, OP_C4X ),
- A_CLASS_INSN( "lwl2", 0xb5000000, OP_C4X ),
- A_CLASS_INSN( "lwl3", 0xb5800000, OP_C4X ),
- A_CLASS_INSN( "lwr0", 0xb6000000, OP_C4X ),
- A_CLASS_INSN( "lwr1", 0xb6800000, OP_C4X ),
- A_CLASS_INSN( "lwr2", 0xb7000000, OP_C4X ),
- A_CLASS_INSN( "lwr3", 0xb7800000, OP_C4X ),
- { "maxspeed",0x10800000,0xffffffff, "" , OP_LPWR }, /* Z_CLASS */
- A_CLASS_INSN( "mb0", 0xb8000000, OP_C4X ),
- A_CLASS_INSN( "mb1", 0xb8800000, OP_C4X ),
- A_CLASS_INSN( "mb2", 0xb9000000, OP_C4X ),
- A_CLASS_INSN( "mb3", 0xb9800000, OP_C4X ),
- A_CLASS_INSN( "mh0", 0xbc000000, OP_C4X ),
- A_CLASS_INSN( "mh1", 0xbc800000, OP_C4X ),
- A_CLASS_INSN( "mh2", 0xbd000000, OP_C4X ),
- A_CLASS_INSN( "mh3", 0xbd800000, OP_C4X ),
- B_CLASS_INSN( "mpyf", 0x0a000000, OP_C3X ),
- SC_CLASS_INSN( "mpyf", 0x04800000, OP_C3X ),
- M_CLASS_INSN( "mpyf", "addf", 0x80000000, OP_C3X ),
- QC_CLASS_INSN( "mpyf", "stf", 0xde000000, OP_C3X ),
- M_CLASS_INSN( "mpyf", "subf", 0x84000000, OP_C3X ),
- A_CLASS_INSN( "mpyi", 0x0a800000, OP_C3X ),
- TC_CLASS_INSN( "mpyi", 0x05000000, OP_C3X ),
- M_CLASS_INSN( "mpyi", "addi", 0x88000000, OP_C3X ),
- QC_CLASS_INSN( "mpyi", "sti", 0xe0000000, OP_C3X ),
- M_CLASS_INSN( "mpyi", "subi", 0x8c000000, OP_C3X ),
- A_CLASS_INSN( "mpyshi", 0x1d800000, OP_C4X ),
- TC_CLASS_INSN( "mpyshi", 0x28800000, OP_C4X ),
- A_CLASS_INSN( "mpyuhi", 0x1e000000, OP_C4X ),
- TC_CLASS_INSN( "mpyuhi", 0x29000000, OP_C4X ),
- A_CLASS_INSN( "negb", 0x0b000000, OP_C3X ),
- B_CLASS_INSN( "negf", 0x0b800000, OP_C3X ),
- P_CLASS_INSN( "negf", "stf", 0xe2000000, OP_C3X ),
- A_CLASS_INSN( "negi", 0x0c000000, OP_C3X ),
- P_CLASS_INSN( "negi", "sti", 0xe4000000, OP_C3X ),
- A2_CLASS_INSN( "nop", 0x0c800000, OP_C3X ),
- B_CLASS_INSN( "norm", 0x0d000000, OP_C3X ),
- AU_CLASS_INSN( "not", 0x0d800000, OP_C3X ),
- P_CLASS_INSN( "not", "sti", 0xe6000000, OP_C3X ),
- AU_CLASS_INSN( "or", 0x10000000, OP_C3X ),
- TC_CLASS_INSN( "or", 0x05800000, OP_C3X ),
- QC_CLASS_INSN( "or", "sti", 0xe8000000, OP_C3X ),
- R_CLASS_INSN( "pop", 0x0e200000, OP_C3X ),
- RF_CLASS_INSN( "popf", 0x0ea00000, OP_C3X ),
- R_CLASS_INSN( "push", 0x0f200000, OP_C3X ),
- RF_CLASS_INSN( "pushf", 0x0fa00000, OP_C3X ),
- BA_CLASS_INSN( "rcpf", 0x1d000000, OP_C4X ),
- { "retiB", 0x78000000, 0xffe00000, "" , OP_C3X }, /* Z_CLASS */
- { "reti", 0x78000000, 0xffe00000, "" , OP_C3X }, /* Z_CLASS - Alias for retiu */
- { "retiBd", 0x78200000, 0xffe00000, "" , OP_C4X }, /* Z_CLASS */
- { "retid", 0x78200000, 0xffe00000, "" , OP_C4X }, /* Z_CLASS - Alias for retiud */
- { "retsB", 0x78800000, 0xffe00000, "" , OP_C3X }, /* Z_CLASS */
- { "rets", 0x78800000, 0xffe00000, "" , OP_C3X }, /* Z_CLASS - Alias for retsu */
- B_CLASS_INSN( "rnd", 0x11000000, OP_C3X ),
- R_CLASS_INSN( "rol", 0x11e00001, OP_C3X ),
- R_CLASS_INSN( "rolc", 0x12600001, OP_C3X ),
- R_CLASS_INSN( "ror", 0x12e0ffff, OP_C3X ),
- R_CLASS_INSN( "rorc", 0x1360ffff, OP_C3X ),
- { "rptb", 0x64000000, 0xff000000, "B" , OP_C3X }, /* I2_CLASS */
- { "rptb", 0x79000000, 0xff000000, "Q" , OP_C4X }, /* I2_CLASS */
- { "rptbd", 0x65000000, 0xff000000, "B" , OP_C4X }, /* I2_CLASS */
- { "rptbd", 0x79800000, 0xff000000, "Q" , OP_C4X }, /* I2_CLASS */
- A3_CLASS_INSN( "rpts", 0x139b0000, OP_C3X ),
- B_CLASS_INSN( "rsqrf", 0x1c800000, OP_C4X ),
- { "sigi", 0x16000000, 0xffe00000, "" , OP_C3X }, /* Z_CLASS */
- A6_CLASS_INSN( "sigi", 0x16000000, OP_C4X ),
- B7_CLASS_INSN( "stf", 0x14000000, OP_C3X ),
- LS_CLASS_INSN( "stf", 0xc0000000, OP_C3X ),
- B7_CLASS_INSN( "stfi", 0x14800000, OP_C3X ),
- A7_CLASS_INSN( "sti", 0x15000000, OP_C3X ),
- { "sti", 0x15000000, 0xffe00000, "T,@" , OP_C4X }, /* Class A7 - Alias for stik */
- { "sti", 0x15600000, 0xffe00000, "T,*" , OP_C4X }, /* Class A7 */
- LS_CLASS_INSN( "sti", 0xc2000000, OP_C3X ),
- A7_CLASS_INSN( "stii", 0x15800000, OP_C3X ),
- { "stik", 0x15000000, 0xffe00000, "T,@" , OP_C4X }, /* Z_CLASS */
- { "stik", 0x15600000, 0xffe00000, "T,*" , OP_C4X }, /* Z_CLASS */
- A_CLASS_INSN( "subb", 0x16800000, OP_C3X ),
- T_CLASS_INSN( "subb", 0x06000000, OP_C3X ),
- A_CLASS_INSN( "subc", 0x17000000, OP_C3X ),
- B_CLASS_INSN( "subf", 0x17800000, OP_C3X ),
- S_CLASS_INSN( "subf", 0x06800000, OP_C3X ),
- Q_CLASS_INSN( "subf", "stf", 0xea000000, OP_C3X ),
- A_CLASS_INSN( "subi", 0x18000000, OP_C3X ),
- T_CLASS_INSN( "subi", 0x07000000, OP_C3X ),
- Q_CLASS_INSN( "subi", "sti", 0xec000000, OP_C3X ),
- A_CLASS_INSN( "subrb", 0x18800000, OP_C3X ),
- B_CLASS_INSN( "subrf", 0x19000000, OP_C3X ),
- A_CLASS_INSN( "subri", 0x19800000, OP_C3X ),
- { "swi", 0x66000000, 0xffffffff, "" , OP_C3X }, /* Z_CLASS */
- B_CLASS_INSN( "toieee", 0x1b800000, OP_C4X ),
- P_CLASS_INSN( "toieee","stf", 0xf0000000, OP_C4X ),
- { "trapB", 0x74000000, 0xffe00000, "V" , OP_C3X }, /* Z_CLASS */
- { "trap", 0x74000000, 0xffe00000, "V" , OP_C3X }, /* Z_CLASS - Alias for trapu */
- AU_CLASS_INSN( "tstb", 0x1a000000, OP_C3X ),
- T2C_CLASS_INSN("tstb", 0x07800000, OP_C3X ),
- AU_CLASS_INSN( "xor", 0x1a800000, OP_C3X ),
- TC_CLASS_INSN( "xor", 0x08000000, OP_C3X ),
- QC_CLASS_INSN( "xor", "sti", 0xee000000, OP_C3X ),
-
- /* Dummy entry, not included in tic4x_num_insts. This
- lets code examine entry i + 1 without checking
- if we've run off the end of the table. */
- { "", 0x0, 0x00, "", 0 }
-};
-
-const unsigned int tic4x_num_insts = (((sizeof tic4x_insts) / (sizeof tic4x_insts[0])) - 1);
diff --git a/include/opcode/tic54x.h b/include/opcode/tic54x.h
deleted file mode 100644
index a37ae33..0000000
--- a/include/opcode/tic54x.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/* tic54x.h -- Header file for TI TMS320C54X opcode table
- Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
- Written by Timothy Wall (twall@cygnus.com)
-
-This file is part of GDB, GAS, and the GNU binutils.
-
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them under the terms of the GNU General Public
-License as published by the Free Software Foundation; either version
-1, or (at your option) any later version.
-
-GDB, GAS, and the GNU binutils are distributed in the hope that they
-will be useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING. If not, write to the Free
-Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
-02110-1301, USA. */
-
-#ifndef _opcode_tic54x_h_
-#define _opcode_tic54x_h_
-
-typedef struct _symbol
-{
- const char *name;
- unsigned short value;
-} symbol;
-
-enum optype {
- OPT = 0x8000,
- OP_None = 0x0,
-
- OP_Xmem, /* AR3 or AR4, indirect */
- OP_Ymem, /* AR3 or AR4, indirect */
- OP_pmad, /* PROG mem, direct */
- OP_dmad, /* DATA mem, direct */
- OP_Smem,
- OP_Lmem, /* 32-bit single-addressed (direct/indirect) */
- OP_MMR,
- OP_PA,
- OP_Sind,
- OP_xpmad,
- OP_xpmad_ms7,
- OP_MMRX,
- OP_MMRY,
-
- OP_SRC1, /* src accumulator in bit 8 */
- OP_SRC, /* src accumulator in bit 9 */
- OP_RND, /* rounded result dst accumulator, opposite of bit 8 */
- OP_DST, /* dst accumulator in bit 8 */
- OP_ARX, /* arX in bits 0-3 */
- OP_SHIFT, /* -16 to 15 (SHIFT), bits 0-4 */
- OP_SHFT, /* 0 to 15 (SHIFT1 in summary), bits 0-3 */
- OP_B, /* ACC B only */
- OP_A, /* ACC A only */
-
- OP_lk, /* 16-bit immediate, '#' optional */
- OP_TS,
- OP_k8, /* -128 <= k <= 128 */
- OP_16, /* literal "16" */
- OP_BITC, /* 0 to 16 */
- OP_CC, /* condition code */
- OP_CC2, /* 4-bit condition code */
- OP_CC3, /* 2-bit condition code */
- OP_123, /* 1, 2, or 3 */
- OP_031, /* 0-31, numeric */
- OP_k5, /* 0 to 31 */
- OP_k8u, /* 0 to 255 */
- OP_ASM, /* "ASM" */
- OP_T, /* "T" */
- OP_DP, /* "DP" */
- OP_ARP, /* "ARP" */
- OP_k3, /* 0-7 */
- OP_lku, /* 0 to 65535 */
- OP_N, /* 0/1 or ST0/ST1 */
- OP_SBIT, /* status bit or 0-15 */
- OP_12, /* one or two */
- OP_k9, /* 9 bits of data page (DP) address */
- OP_TRN, /* "TRN" */
-
-};
-
-typedef struct _template
-{
- /* The opcode mnemonic */
- const char *name;
- unsigned int words; /* insn size in words */
- int minops, maxops; /* min/max operand count */
- /* The significant bits in the opcode. Other bits are zero.
- Instructions with more than 16 bits of opcode store the rest in the upper
- 16 bits.
- */
- unsigned short opcode;
-#define INDIRECT(OP) ((OP)&0x80)
-#define MOD(OP) (((OP)>>3)&0xF)
-#define ARF(OP) ((OP)&0x7)
-#define IS_LKADDR(OP) (INDIRECT(OP) && MOD(OP)>=12)
-#define SRC(OP) ((OP)&0x200)
-#define DST(OP) ((OP)&0x100)
-#define SRC1(OP) ((OP)&0x100)
-#define SHIFT(OP) (((OP)&0x10)?(((OP)&0x1F)-32):((OP)&0x1F))
-#define SHFT(OP) ((OP)&0xF)
-#define ARX(OP) ((OP)&0x7)
-#define XMEM(OP) (((OP)&0x00F0)>>4)
-#define YMEM(OP) ((OP)&0x000F)
-#define XMOD(C) (((C)&0xC)>>2)
-#define XARX(C) (((C)&0x3)+2)
-#define CC3(OP) (((OP)>>8)&0x3)
-#define SBIT(OP) ((OP)&0xF)
-#define MMR(OP) ((OP)&0x7F)
-#define MMRX(OP) ((((OP)>>4)&0xF)+16)
-#define MMRY(OP) (((OP)&0xF)+16)
-
-#define OPTYPE(X) ((X)&~OPT)
-
- /* Ones in this mask indicate which bits must match the opcode field.
- Zeroes indicate don't care bits (operands and/or opcode options) */
- unsigned short mask;
-
- /* An array of operand codes (at most 4 operands) */
-#define MAX_OPERANDS 4
- enum optype operand_types[MAX_OPERANDS];
-
- /* Special purpose flags (e.g. branch type, parallel, delay, etc)
- */
- unsigned short flags;
-#define B_NEXT 0 /* normal execution, next insn is next address */
-#define B_BRANCH 1 /* next insn is in opcode */
-#define B_RET 2 /* next insn is on stack */
-#define B_BACC 3 /* next insn is in acc */
-#define B_REPEAT 4 /* next insn repeats */
-#define FL_BMASK 0x07
-
-#define FL_DELAY 0x10 /* instruction uses delay slots */
-#define FL_EXT 0x20 /* instruction takes two words */
-#define FL_FAR 0x40 /* far mode addressing */
-#define FL_LP 0x80 /* LP-only instruction */
-#define FL_NR 0x100 /* no repeat allowed */
-#define FL_SMR 0x200 /* Smem read (for flagging write-only *+ARx */
-
-#define FL_PAR 0x400 /* Parallel instruction. */
-
- unsigned short opcode2, mask2; /* some insns have an extended opcode */
-
- const char* parname;
- enum optype paroperand_types[MAX_OPERANDS];
-
-} template;
-
-extern const template tic54x_unknown_opcode;
-extern const template tic54x_optab[];
-extern const template tic54x_paroptab[];
-extern const symbol mmregs[], regs[];
-extern const symbol condition_codes[], cc2_codes[], status_bits[];
-extern const symbol cc3_codes[];
-extern const char *misc_symbols[];
-struct disassemble_info;
-extern const template* tic54x_get_insn (struct disassemble_info *,
- bfd_vma, unsigned short, int *);
-
-#endif /* _opcode_tic54x_h_ */
diff --git a/include/opcode/tic80.h b/include/opcode/tic80.h
deleted file mode 100644
index c89b81c..0000000
--- a/include/opcode/tic80.h
+++ /dev/null
@@ -1,282 +0,0 @@
-/* tic80.h -- Header file for TI TMS320C80 (MV) opcode table
- Copyright 1996, 1997, 2003 Free Software Foundation, Inc.
- Written by Fred Fish (fnf@cygnus.com), Cygnus Support
-
-This file is part of GDB, GAS, and the GNU binutils.
-
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them under the terms of the GNU General Public
-License as published by the Free Software Foundation; either version
-1, or (at your option) any later version.
-
-GDB, GAS, and the GNU binutils are distributed in the hope that they
-will be useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING. If not, write to the Free
-Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef TIC80_H
-#define TIC80_H
-
-/* The opcode table is an array of struct tic80_opcode. */
-
-struct tic80_opcode
-{
- /* The opcode name. */
-
- const char *name;
-
- /* The opcode itself. Those bits which will be filled in with operands
- are zeroes. */
-
- unsigned long opcode;
-
- /* The opcode mask. This is used by the disassembler. This is a mask
- containing ones indicating those bits which must match the opcode
- field, and zeroes indicating those bits which need not match (and are
- presumably filled in by operands). */
-
- unsigned long mask;
-
- /* Special purpose flags for this opcode. */
-
- unsigned char flags;
-
- /* An array of operand codes. Each code is an index into the operand
- table. They appear in the order which the operands must appear in
- assembly code, and are terminated by a zero. FIXME: Adjust size to
- match actual requirements when TIc80 support is complete */
-
- unsigned char operands[8];
-};
-
-/* The table itself is sorted by major opcode number, and is otherwise in
- the order in which the disassembler should consider instructions.
- FIXME: This isn't currently true. */
-
-extern const struct tic80_opcode tic80_opcodes[];
-extern const int tic80_num_opcodes;
-
-
-/* The operands table is an array of struct tic80_operand. */
-
-struct tic80_operand
-{
- /* The number of bits in the operand. */
-
- int bits;
-
- /* How far the operand is left shifted in the instruction. */
-
- int shift;
-
- /* Insertion function. This is used by the assembler. To insert an
- operand value into an instruction, check this field.
-
- If it is NULL, execute
- i |= (op & ((1 << o->bits) - 1)) << o->shift;
- (i is the instruction which we are filling in, o is a pointer to
- this structure, and op is the opcode value; this assumes twos
- complement arithmetic).
-
- If this field is not NULL, then simply call it with the
- instruction and the operand value. It will return the new value
- of the instruction. If the ERRMSG argument is not NULL, then if
- the operand value is illegal, *ERRMSG will be set to a warning
- string (the operand will be inserted in any case). If the
- operand value is legal, *ERRMSG will be unchanged (most operands
- can accept any value). */
-
- unsigned long (*insert)
- (unsigned long instruction, long op, const char **errmsg);
-
- /* Extraction function. This is used by the disassembler. To
- extract this operand type from an instruction, check this field.
-
- If it is NULL, compute
- op = ((i) >> o->shift) & ((1 << o->bits) - 1);
- if ((o->flags & TIC80_OPERAND_SIGNED) != 0
- && (op & (1 << (o->bits - 1))) != 0)
- op -= 1 << o->bits;
- (i is the instruction, o is a pointer to this structure, and op
- is the result; this assumes twos complement arithmetic).
-
- If this field is not NULL, then simply call it with the
- instruction value. It will return the value of the operand. If
- the INVALID argument is not NULL, *INVALID will be set to
- non-zero if this operand type can not actually be extracted from
- this operand (i.e., the instruction does not match). If the
- operand is valid, *INVALID will not be changed. */
-
- long (*extract) (unsigned long instruction, int *invalid);
-
- /* One bit syntax flags. */
-
- unsigned long flags;
-};
-
-/* Elements in the table are retrieved by indexing with values from
- the operands field of the tic80_opcodes table. */
-
-extern const struct tic80_operand tic80_operands[];
-
-
-/* Values defined for the flags field of a struct tic80_operand.
-
- Note that flags for all predefined symbols, such as the general purpose
- registers (ex: r10), control registers (ex: FPST), condition codes (ex:
- eq0.b), bit numbers (ex: gt.b), etc are large enough that they can be
- or'd into an int where the lower bits contain the actual numeric value
- that correponds to this predefined symbol. This way a single int can
- contain both the value of the symbol and it's type.
- */
-
-/* This operand must be an even register number. Floating point numbers
- for example are stored in even/odd register pairs. */
-
-#define TIC80_OPERAND_EVEN (1 << 0)
-
-/* This operand must be an odd register number and must be one greater than
- the register number of the previous operand. I.E. the second register in
- an even/odd register pair. */
-
-#define TIC80_OPERAND_ODD (1 << 1)
-
-/* This operand takes signed values. */
-
-#define TIC80_OPERAND_SIGNED (1 << 2)
-
-/* This operand may be either a predefined constant name or a numeric value.
- An example would be a condition code like "eq0.b" which has the numeric
- value 0x2. */
-
-#define TIC80_OPERAND_NUM (1 << 3)
-
-/* This operand should be wrapped in parentheses rather than separated
- from the previous one by a comma. This is used for various
- instructions, like the load and store instructions, which want
- their operands to look like "displacement(reg)" */
-
-#define TIC80_OPERAND_PARENS (1 << 4)
-
-/* This operand is a PC relative branch offset. The disassembler prints
- these symbolically if possible. Note that the offsets are taken as word
- offsets. */
-
-#define TIC80_OPERAND_PCREL (1 << 5)
-
-/* This flag is a hint to the disassembler for using hex as the prefered
- printing format, even for small positive or negative immediate values.
- Normally values in the range -999 to 999 are printed as signed decimal
- values and other values are printed in hex. */
-
-#define TIC80_OPERAND_BITFIELD (1 << 6)
-
-/* This operand may have a ":m" modifier specified by bit 17 in a short
- immediate form instruction. */
-
-#define TIC80_OPERAND_M_SI (1 << 7)
-
-/* This operand may have a ":m" modifier specified by bit 15 in a long
- immediate or register form instruction. */
-
-#define TIC80_OPERAND_M_LI (1 << 8)
-
-/* This operand may have a ":s" modifier specified in bit 11 in a long
- immediate or register form instruction. */
-
-#define TIC80_OPERAND_SCALED (1 << 9)
-
-/* This operand is a floating point value */
-
-#define TIC80_OPERAND_FLOAT (1 << 10)
-
-/* This operand is an byte offset from a base relocation. The lower
- two bits of the final relocated address are ignored when the value is
- written to the program counter. */
-
-#define TIC80_OPERAND_BASEREL (1 << 11)
-
-/* This operand is an "endmask" field for a shift instruction.
- It is treated special in that it can have values of 0-32,
- where 0 and 32 result in the same instruction. The assembler
- must be able to accept both endmask values. This disassembler
- has no way of knowing from the instruction which value was
- given at assembly time, so it just uses '0'. */
-
-#define TIC80_OPERAND_ENDMASK (1 << 12)
-
-/* This operand is one of the 32 general purpose registers.
- The disassembler prints these with a leading 'r'. */
-
-#define TIC80_OPERAND_GPR (1 << 27)
-
-/* This operand is a floating point accumulator register.
- The disassembler prints these with a leading 'a'. */
-
-#define TIC80_OPERAND_FPA ( 1 << 28)
-
-/* This operand is a control register number, either numeric or
- symbolic (like "EIF", "EPC", etc).
- The disassembler prints these symbolically. */
-
-#define TIC80_OPERAND_CR (1 << 29)
-
-/* This operand is a condition code, either numeric or
- symbolic (like "eq0.b", "ne0.w", etc).
- The disassembler prints these symbolically. */
-
-#define TIC80_OPERAND_CC (1 << 30)
-
-/* This operand is a bit number, either numeric or
- symbolic (like "eq.b", "or.f", etc).
- The disassembler prints these symbolically.
- Note that they appear in the instruction in 1's complement relative
- to the values given in the manual. */
-
-#define TIC80_OPERAND_BITNUM (1 << 31)
-
-/* This mask is used to strip operand bits from an int that contains
- both operand bits and a numeric value in the lsbs. */
-
-#define TIC80_OPERAND_MASK (TIC80_OPERAND_GPR | TIC80_OPERAND_FPA | TIC80_OPERAND_CR | TIC80_OPERAND_CC | TIC80_OPERAND_BITNUM)
-
-
-/* Flag bits for the struct tic80_opcode flags field. */
-
-#define TIC80_VECTOR 01 /* Is a vector instruction */
-#define TIC80_NO_R0_DEST 02 /* Register r0 cannot be a destination register */
-
-
-/* The opcodes library contains a table that allows translation from predefined
- symbol names to numeric values, and vice versa. */
-
-/* Structure to hold information about predefined symbols. */
-
-struct predefined_symbol
-{
- char *name; /* name to recognize */
- int value;
-};
-
-#define PDS_NAME(pdsp) ((pdsp) -> name)
-#define PDS_VALUE(pdsp) ((pdsp) -> value)
-
-/* Translation array. */
-extern const struct predefined_symbol tic80_predefined_symbols[];
-/* How many members in the array. */
-extern const int tic80_num_predefined_symbols;
-
-/* Translate value to symbolic name. */
-const char *tic80_value_to_symbol (int val, int class);
-
-/* Translate symbolic name to value. */
-int tic80_symbol_to_value (char *name, int class);
-
-const struct predefined_symbol *tic80_next_predefined_symbol
- (const struct predefined_symbol *);
-
-#endif /* TIC80_H */
diff --git a/include/opcode/v850.h b/include/opcode/v850.h
deleted file mode 100644
index 436ff39..0000000
--- a/include/opcode/v850.h
+++ /dev/null
@@ -1,166 +0,0 @@
-/* v850.h -- Header file for NEC V850 opcode table
- Copyright 1996, 1997, 2001, 2003 Free Software Foundation, Inc.
- Written by J.T. Conklin, Cygnus Support
-
-This file is part of GDB, GAS, and the GNU binutils.
-
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them under the terms of the GNU General Public
-License as published by the Free Software Foundation; either version
-1, or (at your option) any later version.
-
-GDB, GAS, and the GNU binutils are distributed in the hope that they
-will be useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING. If not, write to the Free
-Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef V850_H
-#define V850_H
-
-/* The opcode table is an array of struct v850_opcode. */
-
-struct v850_opcode
-{
- /* The opcode name. */
- const char *name;
-
- /* The opcode itself. Those bits which will be filled in with
- operands are zeroes. */
- unsigned long opcode;
-
- /* The opcode mask. This is used by the disassembler. This is a
- mask containing ones indicating those bits which must match the
- opcode field, and zeroes indicating those bits which need not
- match (and are presumably filled in by operands). */
- unsigned long mask;
-
- /* An array of operand codes. Each code is an index into the
- operand table. They appear in the order which the operands must
- appear in assembly code, and are terminated by a zero. */
- unsigned char operands[8];
-
- /* Which (if any) operand is a memory operand. */
- unsigned int memop;
-
- /* Target processor(s). A bit field of processors which support
- this instruction. Note a bit field is used as some instructions
- are available on multiple, different processor types, whereas
- other instructions are only available on one specific type. */
- unsigned int processors;
-};
-
-/* Values for the processors field in the v850_opcode structure. */
-#define PROCESSOR_V850 (1 << 0) /* Just the V850. */
-#define PROCESSOR_ALL -1 /* Any processor. */
-#define PROCESSOR_V850E (1 << 1) /* Just the V850E. */
-#define PROCESSOR_NOT_V850 (~ PROCESSOR_V850) /* Any processor except the V850. */
-#define PROCESSOR_V850EA (1 << 2) /* Just the V850EA. */
-#define PROCESSOR_V850E1 (1 << 3) /* Just the V850E1. */
-
-/* The table itself is sorted by major opcode number, and is otherwise
- in the order in which the disassembler should consider
- instructions. */
-extern const struct v850_opcode v850_opcodes[];
-extern const int v850_num_opcodes;
-
-
-/* The operands table is an array of struct v850_operand. */
-
-struct v850_operand
-{
- /* The number of bits in the operand. */
- /* If this value is -1 then the operand's bits are in a discontinous distribution in the instruction. */
- int bits;
-
- /* (bits >= 0): How far the operand is left shifted in the instruction. */
- /* (bits == -1): Bit mask of the bits in the operand. */
- int shift;
-
- /* Insertion function. This is used by the assembler. To insert an
- operand value into an instruction, check this field.
-
- If it is NULL, execute
- i |= (op & ((1 << o->bits) - 1)) << o->shift;
- (i is the instruction which we are filling in, o is a pointer to
- this structure, and op is the opcode value; this assumes twos
- complement arithmetic).
-
- If this field is not NULL, then simply call it with the
- instruction and the operand value. It will return the new value
- of the instruction. If the ERRMSG argument is not NULL, then if
- the operand value is illegal, *ERRMSG will be set to a warning
- string (the operand will be inserted in any case). If the
- operand value is legal, *ERRMSG will be unchanged (most operands
- can accept any value). */
- unsigned long (* insert)
- (unsigned long instruction, long op, const char ** errmsg);
-
- /* Extraction function. This is used by the disassembler. To
- extract this operand type from an instruction, check this field.
-
- If it is NULL, compute
- op = o->bits == -1 ? ((i) & o->shift) : ((i) >> o->shift) & ((1 << o->bits) - 1);
- if (o->flags & V850_OPERAND_SIGNED)
- op = (op << (32 - o->bits)) >> (32 - o->bits);
- (i is the instruction, o is a pointer to this structure, and op
- is the result; this assumes twos complement arithmetic).
-
- If this field is not NULL, then simply call it with the
- instruction value. It will return the value of the operand. If
- the INVALID argument is not NULL, *INVALID will be set to
- non-zero if this operand type can not actually be extracted from
- this operand (i.e., the instruction does not match). If the
- operand is valid, *INVALID will not be changed. */
- unsigned long (* extract) (unsigned long instruction, int * invalid);
-
- /* One bit syntax flags. */
- int flags;
-};
-
-/* Elements in the table are retrieved by indexing with values from
- the operands field of the v850_opcodes table. */
-
-extern const struct v850_operand v850_operands[];
-
-/* Values defined for the flags field of a struct v850_operand. */
-
-/* This operand names a general purpose register */
-#define V850_OPERAND_REG 0x01
-
-/* This operand names a system register */
-#define V850_OPERAND_SRG 0x02
-
-/* This operand names a condition code used in the setf instruction */
-#define V850_OPERAND_CC 0x04
-
-/* This operand takes signed values */
-#define V850_OPERAND_SIGNED 0x08
-
-/* This operand is the ep register. */
-#define V850_OPERAND_EP 0x10
-
-/* This operand is a PC displacement */
-#define V850_OPERAND_DISP 0x20
-
-/* This is a relaxable operand. Only used for D9->D22 branch relaxing
- right now. We may need others in the future (or maybe handle them like
- promoted operands on the mn10300?) */
-#define V850_OPERAND_RELAX 0x40
-
-/* The register specified must not be r0 */
-#define V850_NOT_R0 0x80
-
-/* push/pop type instruction, V850E specific. */
-#define V850E_PUSH_POP 0x100
-
-/* 16 bit immediate follows instruction, V850E specific. */
-#define V850E_IMMEDIATE16 0x200
-
-/* 32 bit immediate follows instruction, V850E specific. */
-#define V850E_IMMEDIATE32 0x400
-
-#endif /* V850_H */
diff --git a/include/opcode/vax.h b/include/opcode/vax.h
deleted file mode 100644
index a521303..0000000
--- a/include/opcode/vax.h
+++ /dev/null
@@ -1,382 +0,0 @@
-/* Vax opcde list.
- Copyright 1989, 1991, 1992, 1995 Free Software Foundation, Inc.
-
-This file is part of GDB and GAS.
-
-GDB and GAS are free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
-
-GDB and GAS are distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GDB or GAS; see the file COPYING. If not, write to
-the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef vax_opcodeT
-#define vax_opcodeT int
-#endif /* no vax_opcodeT */
-
-struct vot_wot /* vax opcode table: wot to do with this */
- /* particular opcode */
-{
- const char *args; /* how to compile said opcode */
- vax_opcodeT code; /* op-code (may be > 8 bits!) */
-};
-
-struct vot /* vax opcode text */
-{
- const char *name; /* opcode name: lowercase string [key] */
- struct vot_wot detail; /* rest of opcode table [datum] */
-};
-
-#define vot_how args
-#define vot_code code
-#define vot_detail detail
-#define vot_name name
-
-static const struct vot
-votstrs[] =
-{
-{ "halt", {"", 0x00 } },
-{ "nop", {"", 0x01 } },
-{ "rei", {"", 0x02 } },
-{ "bpt", {"", 0x03 } },
-{ "ret", {"", 0x04 } },
-{ "rsb", {"", 0x05 } },
-{ "ldpctx", {"", 0x06 } },
-{ "svpctx", {"", 0x07 } },
-{ "cvtps", {"rwabrwab", 0x08 } },
-{ "cvtsp", {"rwabrwab", 0x09 } },
-{ "index", {"rlrlrlrlrlwl", 0x0a } },
-{ "crc", {"abrlrwab", 0x0b } },
-{ "prober", {"rbrwab", 0x0c } },
-{ "probew", {"rbrwab", 0x0d } },
-{ "insque", {"abab", 0x0e } },
-{ "remque", {"abwl", 0x0f } },
-{ "bsbb", {"bb", 0x10 } },
-{ "brb", {"bb", 0x11 } },
-{ "bneq", {"bb", 0x12 } },
-{ "bnequ", {"bb", 0x12 } },
-{ "beql", {"bb", 0x13 } },
-{ "beqlu", {"bb", 0x13 } },
-{ "bgtr", {"bb", 0x14 } },
-{ "bleq", {"bb", 0x15 } },
-{ "jsb", {"ab", 0x16 } },
-{ "jmp", {"ab", 0x17 } },
-{ "bgeq", {"bb", 0x18 } },
-{ "blss", {"bb", 0x19 } },
-{ "bgtru", {"bb", 0x1a } },
-{ "blequ", {"bb", 0x1b } },
-{ "bvc", {"bb", 0x1c } },
-{ "bvs", {"bb", 0x1d } },
-{ "bcc", {"bb", 0x1e } },
-{ "bgequ", {"bb", 0x1e } },
-{ "blssu", {"bb", 0x1f } },
-{ "bcs", {"bb", 0x1f } },
-{ "addp4", {"rwabrwab", 0x20 } },
-{ "addp6", {"rwabrwabrwab", 0x21 } },
-{ "subp4", {"rwabrwab", 0x22 } },
-{ "subp6", {"rwabrwabrwab", 0x23 } },
-{ "cvtpt", {"rwababrwab", 0x24 } },
-{ "mulp", {"rwabrwabrwab", 0x25 } },
-{ "cvttp", {"rwababrwab", 0x26 } },
-{ "divp", {"rwabrwabrwab", 0x27 } },
-{ "movc3", {"rwabab", 0x28 } },
-{ "cmpc3", {"rwabab", 0x29 } },
-{ "scanc", {"rwababrb", 0x2a } },
-{ "spanc", {"rwababrb", 0x2b } },
-{ "movc5", {"rwabrbrwab", 0x2c } },
-{ "cmpc5", {"rwabrbrwab", 0x2d } },
-{ "movtc", {"rwabrbabrwab", 0x2e } },
-{ "movtuc", {"rwabrbabrwab", 0x2f } },
-{ "bsbw", {"bw", 0x30 } },
-{ "brw", {"bw", 0x31 } },
-{ "cvtwl", {"rwwl", 0x32 } },
-{ "cvtwb", {"rwwb", 0x33 } },
-{ "movp", {"rwabab", 0x34 } },
-{ "cmpp3", {"rwabab", 0x35 } },
-{ "cvtpl", {"rwabwl", 0x36 } },
-{ "cmpp4", {"rwabrwab", 0x37 } },
-{ "editpc", {"rwababab", 0x38 } },
-{ "matchc", {"rwabrwab", 0x39 } },
-{ "locc", {"rbrwab", 0x3a } },
-{ "skpc", {"rbrwab", 0x3b } },
-{ "movzwl", {"rwwl", 0x3c } },
-{ "acbw", {"rwrwmwbw", 0x3d } },
-{ "movaw", {"awwl", 0x3e } },
-{ "pushaw", {"aw", 0x3f } },
-{ "addf2", {"rfmf", 0x40 } },
-{ "addf3", {"rfrfwf", 0x41 } },
-{ "subf2", {"rfmf", 0x42 } },
-{ "subf3", {"rfrfwf", 0x43 } },
-{ "mulf2", {"rfmf", 0x44 } },
-{ "mulf3", {"rfrfwf", 0x45 } },
-{ "divf2", {"rfmf", 0x46 } },
-{ "divf3", {"rfrfwf", 0x47 } },
-{ "cvtfb", {"rfwb", 0x48 } },
-{ "cvtfw", {"rfww", 0x49 } },
-{ "cvtfl", {"rfwl", 0x4a } },
-{ "cvtrfl", {"rfwl", 0x4b } },
-{ "cvtbf", {"rbwf", 0x4c } },
-{ "cvtwf", {"rwwf", 0x4d } },
-{ "cvtlf", {"rlwf", 0x4e } },
-{ "acbf", {"rfrfmfbw", 0x4f } },
-{ "movf", {"rfwf", 0x50 } },
-{ "cmpf", {"rfrf", 0x51 } },
-{ "mnegf", {"rfwf", 0x52 } },
-{ "tstf", {"rf", 0x53 } },
-{ "emodf", {"rfrbrfwlwf", 0x54 } },
-{ "polyf", {"rfrwab", 0x55 } },
-{ "cvtfd", {"rfwd", 0x56 } },
- /* opcode 57 is not defined yet */
-{ "adawi", {"rwmw", 0x58 } },
- /* opcode 59 is not defined yet */
- /* opcode 5a is not defined yet */
- /* opcode 5b is not defined yet */
-{ "insqhi", {"abaq", 0x5c } },
-{ "insqti", {"abaq", 0x5d } },
-{ "remqhi", {"aqwl", 0x5e } },
-{ "remqti", {"aqwl", 0x5f } },
-{ "addd2", {"rdmd", 0x60 } },
-{ "addd3", {"rdrdwd", 0x61 } },
-{ "subd2", {"rdmd", 0x62 } },
-{ "subd3", {"rdrdwd", 0x63 } },
-{ "muld2", {"rdmd", 0x64 } },
-{ "muld3", {"rdrdwd", 0x65 } },
-{ "divd2", {"rdmd", 0x66 } },
-{ "divd3", {"rdrdwd", 0x67 } },
-{ "cvtdb", {"rdwb", 0x68 } },
-{ "cvtdw", {"rdww", 0x69 } },
-{ "cvtdl", {"rdwl", 0x6a } },
-{ "cvtrdl", {"rdwl", 0x6b } },
-{ "cvtbd", {"rbwd", 0x6c } },
-{ "cvtwd", {"rwwd", 0x6d } },
-{ "cvtld", {"rlwd", 0x6e } },
-{ "acbd", {"rdrdmdbw", 0x6f } },
-{ "movd", {"rdwd", 0x70 } },
-{ "cmpd", {"rdrd", 0x71 } },
-{ "mnegd", {"rdwd", 0x72 } },
-{ "tstd", {"rd", 0x73 } },
-{ "emodd", {"rdrbrdwlwd", 0x74 } },
-{ "polyd", {"rdrwab", 0x75 } },
-{ "cvtdf", {"rdwf", 0x76 } },
- /* opcode 77 is not defined yet */
-{ "ashl", {"rbrlwl", 0x78 } },
-{ "ashq", {"rbrqwq", 0x79 } },
-{ "emul", {"rlrlrlwq", 0x7a } },
-{ "ediv", {"rlrqwlwl", 0x7b } },
-{ "clrd", {"wd", 0x7c } },
-{ "clrg", {"wg", 0x7c } },
-{ "clrq", {"wd", 0x7c } },
-{ "movq", {"rqwq", 0x7d } },
-{ "movaq", {"aqwl", 0x7e } },
-{ "movad", {"adwl", 0x7e } },
-{ "pushaq", {"aq", 0x7f } },
-{ "pushad", {"ad", 0x7f } },
-{ "addb2", {"rbmb", 0x80 } },
-{ "addb3", {"rbrbwb", 0x81 } },
-{ "subb2", {"rbmb", 0x82 } },
-{ "subb3", {"rbrbwb", 0x83 } },
-{ "mulb2", {"rbmb", 0x84 } },
-{ "mulb3", {"rbrbwb", 0x85 } },
-{ "divb2", {"rbmb", 0x86 } },
-{ "divb3", {"rbrbwb", 0x87 } },
-{ "bisb2", {"rbmb", 0x88 } },
-{ "bisb3", {"rbrbwb", 0x89 } },
-{ "bicb2", {"rbmb", 0x8a } },
-{ "bicb3", {"rbrbwb", 0x8b } },
-{ "xorb2", {"rbmb", 0x8c } },
-{ "xorb3", {"rbrbwb", 0x8d } },
-{ "mnegb", {"rbwb", 0x8e } },
-{ "caseb", {"rbrbrb", 0x8f } },
-{ "movb", {"rbwb", 0x90 } },
-{ "cmpb", {"rbrb", 0x91 } },
-{ "mcomb", {"rbwb", 0x92 } },
-{ "bitb", {"rbrb", 0x93 } },
-{ "clrb", {"wb", 0x94 } },
-{ "tstb", {"rb", 0x95 } },
-{ "incb", {"mb", 0x96 } },
-{ "decb", {"mb", 0x97 } },
-{ "cvtbl", {"rbwl", 0x98 } },
-{ "cvtbw", {"rbww", 0x99 } },
-{ "movzbl", {"rbwl", 0x9a } },
-{ "movzbw", {"rbww", 0x9b } },
-{ "rotl", {"rbrlwl", 0x9c } },
-{ "acbb", {"rbrbmbbw", 0x9d } },
-{ "movab", {"abwl", 0x9e } },
-{ "pushab", {"ab", 0x9f } },
-{ "addw2", {"rwmw", 0xa0 } },
-{ "addw3", {"rwrwww", 0xa1 } },
-{ "subw2", {"rwmw", 0xa2 } },
-{ "subw3", {"rwrwww", 0xa3 } },
-{ "mulw2", {"rwmw", 0xa4 } },
-{ "mulw3", {"rwrwww", 0xa5 } },
-{ "divw2", {"rwmw", 0xa6 } },
-{ "divw3", {"rwrwww", 0xa7 } },
-{ "bisw2", {"rwmw", 0xa8 } },
-{ "bisw3", {"rwrwww", 0xa9 } },
-{ "bicw2", {"rwmw", 0xaa } },
-{ "bicw3", {"rwrwww", 0xab } },
-{ "xorw2", {"rwmw", 0xac } },
-{ "xorw3", {"rwrwww", 0xad } },
-{ "mnegw", {"rwww", 0xae } },
-{ "casew", {"rwrwrw", 0xaf } },
-{ "movw", {"rwww", 0xb0 } },
-{ "cmpw", {"rwrw", 0xb1 } },
-{ "mcomw", {"rwww", 0xb2 } },
-{ "bitw", {"rwrw", 0xb3 } },
-{ "clrw", {"ww", 0xb4 } },
-{ "tstw", {"rw", 0xb5 } },
-{ "incw", {"mw", 0xb6 } },
-{ "decw", {"mw", 0xb7 } },
-{ "bispsw", {"rw", 0xb8 } },
-{ "bicpsw", {"rw", 0xb9 } },
-{ "popr", {"rw", 0xba } },
-{ "pushr", {"rw", 0xbb } },
-{ "chmk", {"rw", 0xbc } },
-{ "chme", {"rw", 0xbd } },
-{ "chms", {"rw", 0xbe } },
-{ "chmu", {"rw", 0xbf } },
-{ "addl2", {"rlml", 0xc0 } },
-{ "addl3", {"rlrlwl", 0xc1 } },
-{ "subl2", {"rlml", 0xc2 } },
-{ "subl3", {"rlrlwl", 0xc3 } },
-{ "mull2", {"rlml", 0xc4 } },
-{ "mull3", {"rlrlwl", 0xc5 } },
-{ "divl2", {"rlml", 0xc6 } },
-{ "divl3", {"rlrlwl", 0xc7 } },
-{ "bisl2", {"rlml", 0xc8 } },
-{ "bisl3", {"rlrlwl", 0xc9 } },
-{ "bicl2", {"rlml", 0xca } },
-{ "bicl3", {"rlrlwl", 0xcb } },
-{ "xorl2", {"rlml", 0xcc } },
-{ "xorl3", {"rlrlwl", 0xcd } },
-{ "mnegl", {"rlwl", 0xce } },
-{ "casel", {"rlrlrl", 0xcf } },
-{ "movl", {"rlwl", 0xd0 } },
-{ "cmpl", {"rlrl", 0xd1 } },
-{ "mcoml", {"rlwl", 0xd2 } },
-{ "bitl", {"rlrl", 0xd3 } },
-{ "clrf", {"wf", 0xd4 } },
-{ "clrl", {"wl", 0xd4 } },
-{ "tstl", {"rl", 0xd5 } },
-{ "incl", {"ml", 0xd6 } },
-{ "decl", {"ml", 0xd7 } },
-{ "adwc", {"rlml", 0xd8 } },
-{ "sbwc", {"rlml", 0xd9 } },
-{ "mtpr", {"rlrl", 0xda } },
-{ "mfpr", {"rlwl", 0xdb } },
-{ "movpsl", {"wl", 0xdc } },
-{ "pushl", {"rl", 0xdd } },
-{ "moval", {"alwl", 0xde } },
-{ "movaf", {"afwl", 0xde } },
-{ "pushal", {"al", 0xdf } },
-{ "pushaf", {"af", 0xdf } },
-{ "bbs", {"rlvbbb", 0xe0 } },
-{ "bbc", {"rlvbbb", 0xe1 } },
-{ "bbss", {"rlvbbb", 0xe2 } },
-{ "bbcs", {"rlvbbb", 0xe3 } },
-{ "bbsc", {"rlvbbb", 0xe4 } },
-{ "bbcc", {"rlvbbb", 0xe5 } },
-{ "bbssi", {"rlvbbb", 0xe6 } },
-{ "bbcci", {"rlvbbb", 0xe7 } },
-{ "blbs", {"rlbb", 0xe8 } },
-{ "blbc", {"rlbb", 0xe9 } },
-{ "ffs", {"rlrbvbwl", 0xea } },
-{ "ffc", {"rlrbvbwl", 0xeb } },
-{ "cmpv", {"rlrbvbrl", 0xec } },
-{ "cmpzv", {"rlrbvbrl", 0xed } },
-{ "extv", {"rlrbvbwl", 0xee } },
-{ "extzv", {"rlrbvbwl", 0xef } },
-{ "insv", {"rlrlrbvb", 0xf0 } },
-{ "acbl", {"rlrlmlbw", 0xf1 } },
-{ "aoblss", {"rlmlbb", 0xf2 } },
-{ "aobleq", {"rlmlbb", 0xf3 } },
-{ "sobgeq", {"mlbb", 0xf4 } },
-{ "sobgtr", {"mlbb", 0xf5 } },
-{ "cvtlb", {"rlwb", 0xf6 } },
-{ "cvtlw", {"rlww", 0xf7 } },
-{ "ashp", {"rbrwabrbrwab", 0xf8 } },
-{ "cvtlp", {"rlrwab", 0xf9 } },
-{ "callg", {"abab", 0xfa } },
-{ "calls", {"rlab", 0xfb } },
-{ "xfc", {"", 0xfc } },
- /* undefined opcodes here */
-{ "cvtdh", {"rdwh", 0x32fd } },
-{ "cvtgf", {"rgwh", 0x33fd } },
-{ "addg2", {"rgmg", 0x40fd } },
-{ "addg3", {"rgrgwg", 0x41fd } },
-{ "subg2", {"rgmg", 0x42fd } },
-{ "subg3", {"rgrgwg", 0x43fd } },
-{ "mulg2", {"rgmg", 0x44fd } },
-{ "mulg3", {"rgrgwg", 0x45fd } },
-{ "divg2", {"rgmg", 0x46fd } },
-{ "divg3", {"rgrgwg", 0x47fd } },
-{ "cvtgb", {"rgwb", 0x48fd } },
-{ "cvtgw", {"rgww", 0x49fd } },
-{ "cvtgl", {"rgwl", 0x4afd } },
-{ "cvtrgl", {"rgwl", 0x4bfd } },
-{ "cvtbg", {"rbwg", 0x4cfd } },
-{ "cvtwg", {"rwwg", 0x4dfd } },
-{ "cvtlg", {"rlwg", 0x4efd } },
-{ "acbg", {"rgrgmgbw", 0x4ffd } },
-{ "movg", {"rgwg", 0x50fd } },
-{ "cmpg", {"rgrg", 0x51fd } },
-{ "mnegg", {"rgwg", 0x52fd } },
-{ "tstg", {"rg", 0x53fd } },
-{ "emodg", {"rgrwrgwlwg", 0x54fd } },
-{ "polyg", {"rgrwab", 0x55fd } },
-{ "cvtgh", {"rgwh", 0x56fd } },
- /* undefined opcodes here */
-{ "addh2", {"rhmh", 0x60fd } },
-{ "addh3", {"rhrhwh", 0x61fd } },
-{ "subh2", {"rhmh", 0x62fd } },
-{ "subh3", {"rhrhwh", 0x63fd } },
-{ "mulh2", {"rhmh", 0x64fd } },
-{ "mulh3", {"rhrhwh", 0x65fd } },
-{ "divh2", {"rhmh", 0x66fd } },
-{ "divh3", {"rhrhwh", 0x67fd } },
-{ "cvthb", {"rhwb", 0x68fd } },
-{ "cvthw", {"rhww", 0x69fd } },
-{ "cvthl", {"rhwl", 0x6afd } },
-{ "cvtrhl", {"rhwl", 0x6bfd } },
-{ "cvtbh", {"rbwh", 0x6cfd } },
-{ "cvtwh", {"rwwh", 0x6dfd } },
-{ "cvtlh", {"rlwh", 0x6efd } },
-{ "acbh", {"rhrhmhbw", 0x6ffd } },
-{ "movh", {"rhwh", 0x70fd } },
-{ "cmph", {"rhrh", 0x71fd } },
-{ "mnegh", {"rhwh", 0x72fd } },
-{ "tsth", {"rh", 0x73fd } },
-{ "emodh", {"rhrwrhwlwh", 0x74fd } },
-{ "polyh", {"rhrwab", 0x75fd } },
-{ "cvthg", {"rhwg", 0x76fd } },
- /* undefined opcodes here */
-{ "clrh", {"wh", 0x7cfd } },
-{ "clro", {"wo", 0x7cfd } },
-{ "movo", {"rowo", 0x7dfd } },
-{ "movah", {"ahwl", 0x7efd } },
-{ "movao", {"aowl", 0x7efd } },
-{ "pushah", {"ah", 0x7ffd } },
-{ "pushao", {"ao", 0x7ffd } },
- /* undefined opcodes here */
-{ "cvtfh", {"rfwh", 0x98fd } },
-{ "cvtfg", {"rfwg", 0x99fd } },
- /* undefined opcodes here */
-{ "cvthf", {"rhwf", 0xf6fd } },
-{ "cvthd", {"rhwd", 0xf7fd } },
- /* undefined opcodes here */
-{ "bugl", {"rl", 0xfdff } },
-{ "bugw", {"rw", 0xfeff } },
- /* undefined opcodes here */
-
-{ "", {"", 0} } /* empty is end sentinel */
-
-}; /* votstrs */
-
-/* end: vax.opcode.h */
diff --git a/include/os9k.h b/include/os9k.h
deleted file mode 100644
index e8baee1..0000000
--- a/include/os9k.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/* os9k.h - OS-9000 i386 module header definitions
- Copyright 2000 Free Software Foundation, Inc.
-
-This file is part of GNU CC.
-
-GNU CC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU CC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 51 Franklin Street - Fifth Floor,
-Boston, MA 02110-1301, USA. */
-
-#if !defined(_MODULE_H)
-#define _MODULE_H
-
-#define _MPF386
-
-/* Size of common header less parity field. */
-#define N_M_PARITY (sizeof(mh_com)-sizeof(unisgned short))
-#define OLD_M_PARITY 46
-#define M_PARITY N_M_PARITY
-
-#ifdef _MPF68K
-#define MODSYNC 0x4afc /* Module header sync code for 680x0 processors. */
-#endif
-
-#ifdef _MPF386
-#define MODSYNC 0x4afc /* Module header sync code for 80386 processors. */
-#endif
-
-#define MODREV 1 /* Module format revision 1. */
-#define CRCCON 0x800063 /* CRC polynomial constant. */
-
-/* Module access permission values. */
-#define MP_OWNER_READ 0x0001
-#define MP_OWNER_WRITE 0x0002
-#define MP_OWNER_EXEC 0x0004
-#define MP_GROUP_READ 0x0010
-#define MP_GROUP_WRITE 0x0020
-#define MP_GROUP_EXEC 0x0040
-#define MP_WORLD_READ 0x0100
-#define MP_WORLD_WRITE 0x0200
-#define MP_WORLD_EXEC 0x0400
-#define MP_WORLD_ACCESS 0x0777
-#define MP_OWNER_MASK 0x000f
-#define MP_GROUP_MASK 0x00f0
-#define MP_WORLD_MASK 0x0f00
-#define MP_SYSTM_MASK 0xf000
-
-/* Module Type/Language values. */
-#define MT_ANY 0
-#define MT_PROGRAM 0x0001
-#define MT_SUBROUT 0x0002
-#define MT_MULTI 0x0003
-#define MT_DATA 0x0004
-#define MT_TRAPLIB 0x000b
-#define MT_SYSTEM 0x000c
-#define MT_FILEMAN 0x000d
-#define MT_DEVDRVR 0x000e
-#define MT_DEVDESC 0x000f
-#define MT_MASK 0xff00
-
-#define ML_ANY 0
-#define ML_OBJECT 1
-#define ML_ICODE 2
-#define ML_PCODE 3
-#define ML_CCODE 4
-#define ML_CBLCODE 5
-#define ML_FRTNCODE 6
-#define ML_MASK 0x00ff
-
-#define mktypelang(type, lang) (((type) << 8) | (lang))
-
-/* Module Attribute values. */
-#define MA_REENT 0x80
-#define MA_GHOST 0x40
-#define MA_SUPER 0x20
-#define MA_MASK 0xff00
-#define MR_MASK 0x00ff
-
-#define mkattrevs(attr, revs) (((attr) << 8) | (revs))
-
-#define m_user m_owner.grp_usr.usr
-#define m_group m_owner.grp_usr.grp
-#define m_group_user m_owner.group_user
-
-/* Macro definitions for accessing module header fields. */
-#define MODNAME(mod) ((u_char*)((u_char*)mod + ((Mh_com)mod)->m_name))
-#if 0
-/* Appears not to be used, and the u_int32 typedef is gone (because it
- conflicted with a Mach header. */
-#define MODSIZE(mod) ((u_int32)((Mh_com)mod)->m_size)
-#endif /* 0 */
-#define MHCOM_BYTES_SIZE 80
-#define N_BADMAG(a) (((a).a_info) != MODSYNC)
-
-typedef struct mh_com
-{
- /* Sync bytes ($4afc). */
- unsigned char m_sync[2];
- unsigned char m_sysrev[2]; /* System revision check value. */
- unsigned char m_size[4]; /* Module size. */
- unsigned char m_owner[4]; /* Group/user id. */
- unsigned char m_name[4]; /* Offset to module name. */
- unsigned char m_access[2]; /* Access permissions. */
- unsigned char m_tylan[2]; /* Type/lang. */
- unsigned char m_attrev[2]; /* Rev/attr. */
- unsigned char m_edit[2]; /* Edition. */
- unsigned char m_needs[4]; /* Module hardware requirements flags. (reserved). */
- unsigned char m_usage[4]; /* Comment string offset. */
- unsigned char m_symbol[4]; /* Symbol table offset. */
- unsigned char m_exec[4]; /* Offset to execution entry point. */
- unsigned char m_excpt[4]; /* Offset to exception entry point. */
- unsigned char m_data[4]; /* Data storage requirement. */
- unsigned char m_stack[4]; /* Stack size. */
- unsigned char m_idata[4]; /* Offset to initialized data. */
- unsigned char m_idref[4]; /* Offset to data reference lists. */
- unsigned char m_init[4]; /* Initialization routine offset. */
- unsigned char m_term[4]; /* Termination routine offset. */
- unsigned char m_ident[2]; /* Ident code for ident program. */
- char m_spare[8]; /* Reserved bytes. */
- unsigned char m_parity[2]; /* Header parity. */
-} mh_com,*Mh_com;
-
-/* Executable memory module. */
-typedef mh_com *Mh_exec,mh_exec;
-
-/* Data memory module. */
-typedef mh_com *Mh_data,mh_data;
-
-/* File manager memory module. */
-typedef mh_com *Mh_fman,mh_fman;
-
-/* Device driver module. */
-typedef mh_com *Mh_drvr,mh_drvr;
-
-/* Trap handler module. */
-typedef mh_com mh_trap, *Mh_trap;
-
-/* Device descriptor module. */
-typedef mh_com *Mh_dev,mh_dev;
-
-/* Configuration module. */
-typedef mh_com *Mh_config, mh_config;
-
-#if 0
-
-#if !defined(_MODDIR_H)
-/* Go get _os_fmod (and others). */
-#include <moddir.h>
-#endif
-
-error_code _os_crc (void *, u_int32, int *);
-error_code _os_datmod (char *, u_int32, u_int16 *, u_int16 *, u_int32, void **, mh_data **);
-error_code _os_get_moddir (void *, u_int32 *);
-error_code _os_initdata (mh_com *, void *);
-error_code _os_link (char **, mh_com **, void **, u_int16 *, u_int16 *);
-error_code _os_linkm (mh_com *, void **, u_int16 *, u_int16 *);
-error_code _os_load (char *, mh_com **, void **, u_int32, u_int16 *, u_int16 *, u_int32);
-error_code _os_mkmodule (char *, u_int32, u_int16 *, u_int16 *, u_int32, void **, mh_com **, u_int32);
-error_code _os_modaddr (void *, mh_com **);
-error_code _os_setcrc (mh_com *);
-error_code _os_slink (u_int32, char *, void **, void **, mh_com **);
-error_code _os_slinkm (u_int32, mh_com *, void **, void **);
-error_code _os_unlink (mh_com *);
-error_code _os_unload (char *, u_int32);
-error_code _os_tlink (u_int32, char *, void **, mh_trap **, void *, u_int32);
-error_code _os_tlinkm (u_int32, mh_com *, void **, void *, u_int32);
-error_code _os_iodel (mh_com *);
-error_code _os_vmodul (mh_com *, mh_com *, u_int32);
-#endif /* 0 */
-
-#endif
diff --git a/include/partition.h b/include/partition.h
deleted file mode 100644
index d8b554f..0000000
--- a/include/partition.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* List implementation of a partition of consecutive integers.
- Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
- Contributed by CodeSourcery, LLC.
-
- This file is part of GCC.
-
- GCC is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GCC is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GCC; see the file COPYING. If not, write to
- the Free Software Foundation, 51 Franklin Street - Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-/* This package implements a partition of consecutive integers. The
- elements are partitioned into classes. Each class is represented
- by one of its elements, the canonical element, which is chosen
- arbitrarily from elements in the class. The principal operations
- on a partition are FIND, which takes an element, determines its
- class, and returns the canonical element for that class, and UNION,
- which unites the two classes that contain two given elements into a
- single class.
-
- The list implementation used here provides constant-time finds. By
- storing the size of each class with the class's canonical element,
- it is able to perform unions over all the classes in the partition
- in O (N log N) time. */
-
-#ifndef _PARTITION_H
-#define _PARTITION_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include "ansidecl.h"
-#include <stdio.h>
-
-struct partition_elem
-{
- /* The canonical element that represents the class containing this
- element. */
- int class_element;
- /* The next element in this class. Elements in each class form a
- circular list. */
- struct partition_elem* next;
- /* The number of elements in this class. Valid only if this is the
- canonical element for its class. */
- unsigned class_count;
-};
-
-typedef struct partition_def
-{
- /* The number of elements in this partition. */
- int num_elements;
- /* The elements in the partition. */
- struct partition_elem elements[1];
-} *partition;
-
-extern partition partition_new (int);
-extern void partition_delete (partition);
-extern int partition_union (partition, int, int);
-extern void partition_print (partition, FILE*);
-
-/* Returns the canonical element corresponding to the class containing
- ELEMENT__ in PARTITION__. */
-
-#define partition_find(partition__, element__) \
- ((partition__)->elements[(element__)].class_element)
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _PARTITION_H */
diff --git a/include/plugin-api.h b/include/plugin-api.h
deleted file mode 100644
index a90fa23..0000000
--- a/include/plugin-api.h
+++ /dev/null
@@ -1,242 +0,0 @@
-/* plugin-api.h -- External linker plugin API. */
-
-/* Copyright 2008 Free Software Foundation, Inc.
- Written by Cary Coutant <ccoutant@google.com>.
-
- This file is part of binutils.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
- MA 02110-1301, USA. */
-
-/* This file defines the interface for writing a linker plugin, which is
- described at < http://gcc.gnu.org/wiki/whopr/driver >. */
-
-#ifndef PLUGIN_API_H
-#define PLUGIN_API_H
-
-#include <stdint.h>
-#include <sys/types.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/* Status code returned by most API routines. */
-
-enum ld_plugin_status
-{
- LDPS_OK = 0,
- LDPS_NO_SYMS, /* Attempt to get symbols that haven't been added. */
- LDPS_ERR
- /* Additional Error codes TBD. */
-};
-
-/* The version of the API specification. */
-
-enum ld_plugin_api_version
-{
- LD_PLUGIN_API_VERSION = 1
-};
-
-/* The type of output file being generated by the linker. */
-
-enum ld_plugin_output_file_type
-{
- LDPO_REL,
- LDPO_EXEC,
- LDPO_DYN
-};
-
-/* An input file managed by the plugin library. */
-
-struct ld_plugin_input_file
-{
- const char *name;
- int fd;
- off_t offset;
- off_t filesize;
- void *handle;
-};
-
-/* A symbol belonging to an input file managed by the plugin library. */
-
-struct ld_plugin_symbol
-{
- char *name;
- char *version;
- int def;
- int visibility;
- uint64_t size;
- char *comdat_key;
- int resolution;
-};
-
-/* Whether the symbol is a definition, reference, or common, weak or not. */
-
-enum ld_plugin_symbol_kind
-{
- LDPK_DEF,
- LDPK_WEAKDEF,
- LDPK_UNDEF,
- LDPK_WEAKUNDEF,
- LDPK_COMMON
-};
-
-/* The visibility of the symbol. */
-
-enum ld_plugin_symbol_visibility
-{
- LDPV_DEFAULT,
- LDPV_PROTECTED,
- LDPV_INTERNAL,
- LDPV_HIDDEN
-};
-
-/* How a symbol is resolved. */
-
-enum ld_plugin_symbol_resolution
-{
- LDPR_UNKNOWN = 0,
- LDPR_UNDEF,
- LDPR_PREVAILING_DEF,
- LDPR_PREVAILING_DEF_IRONLY,
- LDPR_PREEMPTED_REG,
- LDPR_PREEMPTED_IR,
- LDPR_RESOLVED_IR,
- LDPR_RESOLVED_EXEC,
- LDPR_RESOLVED_DYN
-};
-
-/* The plugin library's "claim file" handler. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_claim_file_handler) (
- const struct ld_plugin_input_file *file, int *claimed);
-
-/* The plugin library's "all symbols read" handler. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_all_symbols_read_handler) (void);
-
-/* The plugin library's cleanup handler. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_cleanup_handler) (void);
-
-/* The linker's interface for registering the "claim file" handler. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_register_claim_file) (ld_plugin_claim_file_handler handler);
-
-/* The linker's interface for registering the "all symbols read" handler. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_register_all_symbols_read) (
- ld_plugin_all_symbols_read_handler handler);
-
-/* The linker's interface for registering the cleanup handler. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_register_cleanup) (ld_plugin_cleanup_handler handler);
-
-/* The linker's interface for adding symbols from a claimed input file. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_add_symbols) (void *handle, int nsyms,
- const struct ld_plugin_symbol *syms);
-
-/* The linker's interface for retrieving symbol resolution information. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_get_symbols) (const void *handle, int nsyms,
- struct ld_plugin_symbol *syms);
-
-/* The linker's interface for adding a compiled input file. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_add_input_file) (char *pathname);
-
-/* The linker's interface for issuing a warning or error message. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_message) (int level, const char *format, ...);
-
-enum ld_plugin_level
-{
- LDPL_INFO,
- LDPL_WARNING,
- LDPL_ERROR,
- LDPL_FATAL
-};
-
-/* Values for the tv_tag field of the transfer vector. */
-
-enum ld_plugin_tag
-{
- LDPT_NULL = 0,
- LDPT_API_VERSION,
- LDPT_GOLD_VERSION,
- LDPT_LINKER_OUTPUT,
- LDPT_OPTION,
- LDPT_REGISTER_CLAIM_FILE_HOOK,
- LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK,
- LDPT_REGISTER_CLEANUP_HOOK,
- LDPT_ADD_SYMBOLS,
- LDPT_GET_SYMBOLS,
- LDPT_ADD_INPUT_FILE,
- LDPT_MESSAGE
-};
-
-/* The plugin transfer vector. */
-
-struct ld_plugin_tv
-{
- enum ld_plugin_tag tv_tag;
- union
- {
- int tv_val;
- const char *tv_string;
- ld_plugin_register_claim_file tv_register_claim_file;
- ld_plugin_register_all_symbols_read tv_register_all_symbols_read;
- ld_plugin_register_cleanup tv_register_cleanup;
- ld_plugin_add_symbols tv_add_symbols;
- ld_plugin_get_symbols tv_get_symbols;
- ld_plugin_add_input_file tv_add_input_file;
- ld_plugin_message tv_message;
- } tv_u;
-};
-
-/* The plugin library's "onload" entry point. */
-
-typedef
-enum ld_plugin_status
-(*ld_plugin_onload) (struct ld_plugin_tv *tv);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !defined(PLUGIN_API_H) */
diff --git a/include/progress.h b/include/progress.h
deleted file mode 100644
index 53e0199..0000000
--- a/include/progress.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Default definitions for progress macros.
- Copyright 1994 Free Software Foundation, Inc.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* The default definitions below are intended to be replaced by real
- definitions, if building the tools for an interactive programming
- environment. */
-
-#ifndef _PROGRESS_H
-#define _PROGRESS_H
-
-#ifndef START_PROGRESS
-#define START_PROGRESS(STR,N)
-#endif
-
-#ifndef PROGRESS
-#define PROGRESS(X)
-#endif
-
-#ifndef END_PROGRESS
-#define END_PROGRESS(STR)
-#endif
-
-#endif /* _PROGRESS_H */
diff --git a/include/safe-ctype.h b/include/safe-ctype.h
deleted file mode 100644
index 0266bf1..0000000
--- a/include/safe-ctype.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/* <ctype.h> replacement macros.
-
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- Contributed by Zack Weinberg <zackw@stanford.edu>.
-
-This file is part of the libiberty library.
-Libiberty is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-Libiberty is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with libiberty; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
-Boston, MA 02110-1301, USA. */
-
-/* This is a compatible replacement of the standard C library's <ctype.h>
- with the following properties:
-
- - Implements all isxxx() macros required by C99.
- - Also implements some character classes useful when
- parsing C-like languages.
- - Does not change behavior depending on the current locale.
- - Behaves properly for all values in the range of a signed or
- unsigned char.
-
- To avoid conflicts, this header defines the isxxx functions in upper
- case, e.g. ISALPHA not isalpha. */
-
-#ifndef SAFE_CTYPE_H
-#define SAFE_CTYPE_H
-
-/* Determine host character set. */
-#define HOST_CHARSET_UNKNOWN 0
-#define HOST_CHARSET_ASCII 1
-#define HOST_CHARSET_EBCDIC 2
-
-#if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
- && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21
-# define HOST_CHARSET HOST_CHARSET_ASCII
-#else
-# if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \
- && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A
-# define HOST_CHARSET HOST_CHARSET_EBCDIC
-# else
-# define HOST_CHARSET HOST_CHARSET_UNKNOWN
-# endif
-#endif
-
-/* Categories. */
-
-enum {
- /* In C99 */
- _sch_isblank = 0x0001, /* space \t */
- _sch_iscntrl = 0x0002, /* nonprinting characters */
- _sch_isdigit = 0x0004, /* 0-9 */
- _sch_islower = 0x0008, /* a-z */
- _sch_isprint = 0x0010, /* any printing character including ' ' */
- _sch_ispunct = 0x0020, /* all punctuation */
- _sch_isspace = 0x0040, /* space \t \n \r \f \v */
- _sch_isupper = 0x0080, /* A-Z */
- _sch_isxdigit = 0x0100, /* 0-9A-Fa-f */
-
- /* Extra categories useful to cpplib. */
- _sch_isidst = 0x0200, /* A-Za-z_ */
- _sch_isvsp = 0x0400, /* \n \r */
- _sch_isnvsp = 0x0800, /* space \t \f \v \0 */
-
- /* Combinations of the above. */
- _sch_isalpha = _sch_isupper|_sch_islower, /* A-Za-z */
- _sch_isalnum = _sch_isalpha|_sch_isdigit, /* A-Za-z0-9 */
- _sch_isidnum = _sch_isidst|_sch_isdigit, /* A-Za-z0-9_ */
- _sch_isgraph = _sch_isalnum|_sch_ispunct, /* isprint and not space */
- _sch_iscppsp = _sch_isvsp|_sch_isnvsp, /* isspace + \0 */
- _sch_isbasic = _sch_isprint|_sch_iscppsp /* basic charset of ISO C
- (plus ` and @) */
-};
-
-/* Character classification. */
-extern const unsigned short _sch_istable[256];
-
-#define _sch_test(c, bit) (_sch_istable[(c) & 0xff] & (unsigned short)(bit))
-
-#define ISALPHA(c) _sch_test(c, _sch_isalpha)
-#define ISALNUM(c) _sch_test(c, _sch_isalnum)
-#define ISBLANK(c) _sch_test(c, _sch_isblank)
-#define ISCNTRL(c) _sch_test(c, _sch_iscntrl)
-#define ISDIGIT(c) _sch_test(c, _sch_isdigit)
-#define ISGRAPH(c) _sch_test(c, _sch_isgraph)
-#define ISLOWER(c) _sch_test(c, _sch_islower)
-#define ISPRINT(c) _sch_test(c, _sch_isprint)
-#define ISPUNCT(c) _sch_test(c, _sch_ispunct)
-#define ISSPACE(c) _sch_test(c, _sch_isspace)
-#define ISUPPER(c) _sch_test(c, _sch_isupper)
-#define ISXDIGIT(c) _sch_test(c, _sch_isxdigit)
-
-#define ISIDNUM(c) _sch_test(c, _sch_isidnum)
-#define ISIDST(c) _sch_test(c, _sch_isidst)
-#define IS_ISOBASIC(c) _sch_test(c, _sch_isbasic)
-#define IS_VSPACE(c) _sch_test(c, _sch_isvsp)
-#define IS_NVSPACE(c) _sch_test(c, _sch_isnvsp)
-#define IS_SPACE_OR_NUL(c) _sch_test(c, _sch_iscppsp)
-
-/* Character transformation. */
-extern const unsigned char _sch_toupper[256];
-extern const unsigned char _sch_tolower[256];
-#define TOUPPER(c) _sch_toupper[(c) & 0xff]
-#define TOLOWER(c) _sch_tolower[(c) & 0xff]
-
-/* Prevent the users of safe-ctype.h from accidently using the routines
- from ctype.h. Initially, the approach was to produce an error when
- detecting that ctype.h has been included. But this was causing
- trouble as ctype.h might get indirectly included as a result of
- including another system header (for instance gnulib's stdint.h).
- So we include ctype.h here and then immediately redefine its macros. */
-
-#include <ctype.h>
-#undef isalpha
-#define isalpha(c) do_not_use_isalpha_with_safe_ctype
-#undef isalnum
-#define isalnum(c) do_not_use_isalnum_with_safe_ctype
-#undef iscntrl
-#define iscntrl(c) do_not_use_iscntrl_with_safe_ctype
-#undef isdigit
-#define isdigit(c) do_not_use_isdigit_with_safe_ctype
-#undef isgraph
-#define isgraph(c) do_not_use_isgraph_with_safe_ctype
-#undef islower
-#define islower(c) do_not_use_islower_with_safe_ctype
-#undef isprint
-#define isprint(c) do_not_use_isprint_with_safe_ctype
-#undef ispunct
-#define ispunct(c) do_not_use_ispunct_with_safe_ctype
-#undef isspace
-#define isspace(c) do_not_use_isspace_with_safe_ctype
-#undef isupper
-#define isupper(c) do_not_use_isupper_with_safe_ctype
-#undef isxdigit
-#define isxdigit(c) do_not_use_isxdigit_with_safe_ctype
-#undef toupper
-#define toupper(c) do_not_use_toupper_with_safe_ctype
-#undef tolower
-#define tolower(c) do_not_use_tolower_with_safe_ctype
-
-#endif /* SAFE_CTYPE_H */
diff --git a/include/sha1.h b/include/sha1.h
deleted file mode 100644
index 0c2b765..0000000
--- a/include/sha1.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/* Declarations of functions and data types used for SHA1 sum
- library functions.
- Copyright (C) 2000, 2001, 2003, 2005, 2006, 2008
- Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef SHA1_H
-# define SHA1_H 1
-
-#include <stdio.h>
-
-#if defined HAVE_LIMITS_H || _LIBC
-# include <limits.h>
-#endif
-
-#include "ansidecl.h"
-
-/* The following contortions are an attempt to use the C preprocessor
- to determine an unsigned integral type that is 32 bits wide. An
- alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
- doing that would require that the configure script compile and *run*
- the resulting executable. Locally running cross-compiled executables
- is usually not possible. */
-
-#ifdef _LIBC
-# include <sys/types.h>
-typedef u_int32_t sha1_uint32;
-typedef uintptr_t sha1_uintptr;
-#else
-# define INT_MAX_32_BITS 2147483647
-
-/* If UINT_MAX isn't defined, assume it's a 32-bit type.
- This should be valid for all systems GNU cares about because
- that doesn't include 16-bit systems, and only modern systems
- (that certainly have <limits.h>) have 64+-bit integral types. */
-
-# ifndef INT_MAX
-# define INT_MAX INT_MAX_32_BITS
-# endif
-
-# if INT_MAX == INT_MAX_32_BITS
- typedef unsigned int sha1_uint32;
-# else
-# if SHRT_MAX == INT_MAX_32_BITS
- typedef unsigned short sha1_uint32;
-# else
-# if LONG_MAX == INT_MAX_32_BITS
- typedef unsigned long sha1_uint32;
-# else
- /* The following line is intended to evoke an error.
- Using #error is not portable enough. */
- "Cannot determine unsigned 32-bit data type."
-# endif
-# endif
-# endif
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Structure to save state of computation between the single steps. */
-struct sha1_ctx
-{
- sha1_uint32 A;
- sha1_uint32 B;
- sha1_uint32 C;
- sha1_uint32 D;
- sha1_uint32 E;
-
- sha1_uint32 total[2];
- sha1_uint32 buflen;
- sha1_uint32 buffer[32];
-};
-
-
-/* Initialize structure containing state of computation. */
-extern void sha1_init_ctx (struct sha1_ctx *ctx);
-
-/* Starting with the result of former calls of this function (or the
- initialization function update the context for the next LEN bytes
- starting at BUFFER.
- It is necessary that LEN is a multiple of 64!!! */
-extern void sha1_process_block (const void *buffer, size_t len,
- struct sha1_ctx *ctx);
-
-/* Starting with the result of former calls of this function (or the
- initialization function update the context for the next LEN bytes
- starting at BUFFER.
- It is NOT required that LEN is a multiple of 64. */
-extern void sha1_process_bytes (const void *buffer, size_t len,
- struct sha1_ctx *ctx);
-
-/* Process the remaining bytes in the buffer and put result from CTX
- in first 20 bytes following RESBUF. The result is always in little
- endian byte order, so that a byte-wise output yields to the wanted
- ASCII representation of the message digest.
-
- IMPORTANT: On some systems it is required that RESBUF be correctly
- aligned for a 32 bits value. */
-extern void *sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf);
-
-
-/* Put result from CTX in first 20 bytes following RESBUF. The result is
- always in little endian byte order, so that a byte-wise output yields
- to the wanted ASCII representation of the message digest.
-
- IMPORTANT: On some systems it is required that RESBUF is correctly
- aligned for a 32 bits value. */
-extern void *sha1_read_ctx (const struct sha1_ctx *ctx, void *resbuf);
-
-
-/* Compute SHA1 message digest for bytes read from STREAM. The
- resulting message digest number will be written into the 20 bytes
- beginning at RESBLOCK. */
-extern int sha1_stream (FILE *stream, void *resblock);
-
-/* Compute SHA1 message digest for LEN bytes beginning at BUFFER. The
- result is always in little endian byte order, so that a byte-wise
- output yields to the wanted ASCII representation of the message
- digest. */
-extern void *sha1_buffer (const char *buffer, size_t len, void *resblock);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/sort.h b/include/sort.h
deleted file mode 100644
index 582af81..0000000
--- a/include/sort.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Sorting algorithms.
- Copyright (C) 2000, 2002 Free Software Foundation, Inc.
- Contributed by Mark Mitchell <mark@codesourcery.com>.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING. If not, write to
-the Free Software Foundation, 51 Franklin Street - Fifth Floor,
-Boston, MA 02110-1301, USA. */
-
-#ifndef SORT_H
-#define SORT_H
-
-#include <sys/types.h> /* For size_t */
-#ifdef __STDC__
-#include <stddef.h>
-#endif /* __STDC__ */
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include "ansidecl.h"
-
-/* Sort an array of pointers. */
-
-extern void sort_pointers (size_t, void **, void **);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* SORT_H */
-
-
-
-
diff --git a/include/splay-tree.h b/include/splay-tree.h
deleted file mode 100644
index b03c581..0000000
--- a/include/splay-tree.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/* A splay-tree datatype.
- Copyright 1998, 1999, 2000, 2002, 2007 Free Software Foundation, Inc.
- Contributed by Mark Mitchell (mark@markmitchell.com).
-
- This file is part of GCC.
-
- GCC is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GCC is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GCC; see the file COPYING. If not, write to
- the Free Software Foundation, 51 Franklin Street - Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-/* For an easily readable description of splay-trees, see:
-
- Lewis, Harry R. and Denenberg, Larry. Data Structures and Their
- Algorithms. Harper-Collins, Inc. 1991.
-
- The major feature of splay trees is that all basic tree operations
- are amortized O(log n) time for a tree with n nodes. */
-
-#ifndef _SPLAY_TREE_H
-#define _SPLAY_TREE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include "ansidecl.h"
-
-#ifndef _WIN64
- typedef unsigned long int libi_uhostptr_t;
- typedef long int libi_shostptr_t;
-#else
- typedef unsigned long long libi_uhostptr_t;
- typedef long long libi_shostptr_t;
-#endif
-
-#ifndef GTY
-#define GTY(X)
-#endif
-
-/* Use typedefs for the key and data types to facilitate changing
- these types, if necessary. These types should be sufficiently wide
- that any pointer or scalar can be cast to these types, and then
- cast back, without loss of precision. */
-typedef libi_uhostptr_t splay_tree_key;
-typedef libi_uhostptr_t splay_tree_value;
-
-/* Forward declaration for a node in the tree. */
-typedef struct splay_tree_node_s *splay_tree_node;
-
-/* The type of a function which compares two splay-tree keys. The
- function should return values as for qsort. */
-typedef int (*splay_tree_compare_fn) (splay_tree_key, splay_tree_key);
-
-/* The type of a function used to deallocate any resources associated
- with the key. */
-typedef void (*splay_tree_delete_key_fn) (splay_tree_key);
-
-/* The type of a function used to deallocate any resources associated
- with the value. */
-typedef void (*splay_tree_delete_value_fn) (splay_tree_value);
-
-/* The type of a function used to iterate over the tree. */
-typedef int (*splay_tree_foreach_fn) (splay_tree_node, void*);
-
-/* The type of a function used to allocate memory for tree root and
- node structures. The first argument is the number of bytes needed;
- the second is a data pointer the splay tree functions pass through
- to the allocator. This function must never return zero. */
-typedef void *(*splay_tree_allocate_fn) (int, void *);
-
-/* The type of a function used to free memory allocated using the
- corresponding splay_tree_allocate_fn. The first argument is the
- memory to be freed; the latter is a data pointer the splay tree
- functions pass through to the freer. */
-typedef void (*splay_tree_deallocate_fn) (void *, void *);
-
-/* The nodes in the splay tree. */
-struct splay_tree_node_s GTY(())
-{
- /* The key. */
- splay_tree_key GTY ((use_param1)) key;
-
- /* The value. */
- splay_tree_value GTY ((use_param2)) value;
-
- /* The left and right children, respectively. */
- splay_tree_node GTY ((use_params)) left;
- splay_tree_node GTY ((use_params)) right;
-};
-
-/* The splay tree itself. */
-struct splay_tree_s GTY(())
-{
- /* The root of the tree. */
- splay_tree_node GTY ((use_params)) root;
-
- /* The comparision function. */
- splay_tree_compare_fn comp;
-
- /* The deallocate-key function. NULL if no cleanup is necessary. */
- splay_tree_delete_key_fn delete_key;
-
- /* The deallocate-value function. NULL if no cleanup is necessary. */
- splay_tree_delete_value_fn delete_value;
-
- /* Allocate/free functions, and a data pointer to pass to them. */
- splay_tree_allocate_fn allocate;
- splay_tree_deallocate_fn deallocate;
- void * GTY((skip)) allocate_data;
-};
-
-typedef struct splay_tree_s *splay_tree;
-
-extern splay_tree splay_tree_new (splay_tree_compare_fn,
- splay_tree_delete_key_fn,
- splay_tree_delete_value_fn);
-extern splay_tree splay_tree_new_with_allocator (splay_tree_compare_fn,
- splay_tree_delete_key_fn,
- splay_tree_delete_value_fn,
- splay_tree_allocate_fn,
- splay_tree_deallocate_fn,
- void *);
-extern void splay_tree_delete (splay_tree);
-extern splay_tree_node splay_tree_insert (splay_tree,
- splay_tree_key,
- splay_tree_value);
-extern void splay_tree_remove (splay_tree, splay_tree_key);
-extern splay_tree_node splay_tree_lookup (splay_tree, splay_tree_key);
-extern splay_tree_node splay_tree_predecessor (splay_tree, splay_tree_key);
-extern splay_tree_node splay_tree_successor (splay_tree, splay_tree_key);
-extern splay_tree_node splay_tree_max (splay_tree);
-extern splay_tree_node splay_tree_min (splay_tree);
-extern int splay_tree_foreach (splay_tree, splay_tree_foreach_fn, void*);
-extern int splay_tree_compare_ints (splay_tree_key, splay_tree_key);
-extern int splay_tree_compare_pointers (splay_tree_key, splay_tree_key);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _SPLAY_TREE_H */
diff --git a/include/symcat.h b/include/symcat.h
deleted file mode 100644
index 03a1292..0000000
--- a/include/symcat.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Symbol concatenation utilities.
-
- Copyright (C) 1998, 2000 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef SYM_CAT_H
-#define SYM_CAT_H
-
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define CONCAT2(a,b) a##b
-#define CONCAT3(a,b,c) a##b##c
-#define CONCAT4(a,b,c,d) a##b##c##d
-#define STRINGX(s) #s
-#else
-/* Note one should never pass extra whitespace to the CONCATn macros,
- e.g. CONCAT2(foo, bar) because traditonal C will keep the space between
- the two labels instead of concatenating them. Instead, make sure to
- write CONCAT2(foo,bar). */
-#define CONCAT2(a,b) a/**/b
-#define CONCAT3(a,b,c) a/**/b/**/c
-#define CONCAT4(a,b,c,d) a/**/b/**/c/**/d
-#define STRINGX(s) "s"
-#endif
-
-#define XCONCAT2(a,b) CONCAT2(a,b)
-#define XCONCAT3(a,b,c) CONCAT3(a,b,c)
-#define XCONCAT4(a,b,c,d) CONCAT4(a,b,c,d)
-
-/* Note the layer of indirection here is typically used to allow
- stringification of the expansion of macros. I.e. "#define foo
- bar", "XSTRING(foo)", to yield "bar". Be aware that this only
- works for __STDC__, not for traditional C which will still resolve
- to "foo". */
-#define XSTRING(s) STRINGX(s)
-
-#endif /* SYM_CAT_H */
diff --git a/include/xregex.h b/include/xregex.h
deleted file mode 100644
index 645195b..0000000
--- a/include/xregex.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* This file redefines all regex external names before including
- a renamed copy of glibc's regex.h. */
-
-#ifndef _XREGEX_H
-#define _XREGEX_H 1
-
-# define regfree xregfree
-# define regexec xregexec
-# define regcomp xregcomp
-# define regerror xregerror
-# define re_set_registers xre_set_registers
-# define re_match_2 xre_match_2
-# define re_match xre_match
-# define re_search xre_search
-# define re_compile_pattern xre_compile_pattern
-# define re_set_syntax xre_set_syntax
-# define re_search_2 xre_search_2
-# define re_compile_fastmap xre_compile_fastmap
-# define re_syntax_options xre_syntax_options
-# define re_max_failures xre_max_failures
-
-# define _REGEX_RE_COMP
-# define re_comp xre_comp
-# define re_exec xre_exec
-
-#include "xregex2.h"
-
-#endif /* xregex.h */
diff --git a/include/xregex2.h b/include/xregex2.h
deleted file mode 100644
index d3d0da1..0000000
--- a/include/xregex2.h
+++ /dev/null
@@ -1,565 +0,0 @@
-/* Definitions for data structures and routines for the regular
- expression library, version 0.12.
-
- Copyright (C) 1985, 1989, 1990, 1991, 1992, 1993, 1995, 1996, 1997,
- 1998, 2000, 2005 Free Software Foundation, Inc.
-
- This file is part of the GNU C Library. Its master source is NOT part of
- the C library, however. The master source lives in /gd/gnu/lib.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA. */
-
-#ifndef _REGEX_H
-#define _REGEX_H 1
-
-/* Allow the use in C++ code. */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* POSIX says that <sys/types.h> must be included (by the caller) before
- <regex.h>. */
-
-#if !defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE && defined VMS
-/* VMS doesn't have `size_t' in <sys/types.h>, even though POSIX says it
- should be there. */
-# include <stddef.h>
-#endif
-
-/* The following two types have to be signed and unsigned integer type
- wide enough to hold a value of a pointer. For most ANSI compilers
- ptrdiff_t and size_t should be likely OK. Still size of these two
- types is 2 for Microsoft C. Ugh... */
-typedef long int s_reg_t;
-typedef unsigned long int active_reg_t;
-
-/* The following bits are used to determine the regexp syntax we
- recognize. The set/not-set meanings are chosen so that Emacs syntax
- remains the value 0. The bits are given in alphabetical order, and
- the definitions shifted by one from the previous bit; thus, when we
- add or remove a bit, only one other definition need change. */
-typedef unsigned long int reg_syntax_t;
-
-/* If this bit is not set, then \ inside a bracket expression is literal.
- If set, then such a \ quotes the following character. */
-#define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
-
-/* If this bit is not set, then + and ? are operators, and \+ and \? are
- literals.
- If set, then \+ and \? are operators and + and ? are literals. */
-#define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
-
-/* If this bit is set, then character classes are supported. They are:
- [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:],
- [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:].
- If not set, then character classes are not supported. */
-#define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
-
-/* If this bit is set, then ^ and $ are always anchors (outside bracket
- expressions, of course).
- If this bit is not set, then it depends:
- ^ is an anchor if it is at the beginning of a regular
- expression or after an open-group or an alternation operator;
- $ is an anchor if it is at the end of a regular expression, or
- before a close-group or an alternation operator.
-
- This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because
- POSIX draft 11.2 says that * etc. in leading positions is undefined.
- We already implemented a previous draft which made those constructs
- invalid, though, so we haven't changed the code back. */
-#define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
-
-/* If this bit is set, then special characters are always special
- regardless of where they are in the pattern.
- If this bit is not set, then special characters are special only in
- some contexts; otherwise they are ordinary. Specifically,
- * + ? and intervals are only special when not after the beginning,
- open-group, or alternation operator. */
-#define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
-
-/* If this bit is set, then *, +, ?, and { cannot be first in an re or
- immediately after an alternation or begin-group operator. */
-#define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
-
-/* If this bit is set, then . matches newline.
- If not set, then it doesn't. */
-#define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
-
-/* If this bit is set, then . doesn't match NUL.
- If not set, then it does. */
-#define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
-
-/* If this bit is set, nonmatching lists [^...] do not match newline.
- If not set, they do. */
-#define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
-
-/* If this bit is set, either \{...\} or {...} defines an
- interval, depending on RE_NO_BK_BRACES.
- If not set, \{, \}, {, and } are literals. */
-#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
-
-/* If this bit is set, +, ? and | aren't recognized as operators.
- If not set, they are. */
-#define RE_LIMITED_OPS (RE_INTERVALS << 1)
-
-/* If this bit is set, newline is an alternation operator.
- If not set, newline is literal. */
-#define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
-
-/* If this bit is set, then `{...}' defines an interval, and \{ and \}
- are literals.
- If not set, then `\{...\}' defines an interval. */
-#define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
-
-/* If this bit is set, (...) defines a group, and \( and \) are literals.
- If not set, \(...\) defines a group, and ( and ) are literals. */
-#define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
-
-/* If this bit is set, then \<digit> matches <digit>.
- If not set, then \<digit> is a back-reference. */
-#define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
-
-/* If this bit is set, then | is an alternation operator, and \| is literal.
- If not set, then \| is an alternation operator, and | is literal. */
-#define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
-
-/* If this bit is set, then an ending range point collating higher
- than the starting range point, as in [z-a], is invalid.
- If not set, then when ending range point collates higher than the
- starting range point, the range is ignored. */
-#define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
-
-/* If this bit is set, then an unmatched ) is ordinary.
- If not set, then an unmatched ) is invalid. */
-#define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
-
-/* If this bit is set, succeed as soon as we match the whole pattern,
- without further backtracking. */
-#define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
-
-/* If this bit is set, do not process the GNU regex operators.
- If not set, then the GNU regex operators are recognized. */
-#define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
-
-/* If this bit is set, turn on internal regex debugging.
- If not set, and debugging was on, turn it off.
- This only works if regex.c is compiled -DDEBUG.
- We define this bit always, so that all that's needed to turn on
- debugging is to recompile regex.c; the calling code can always have
- this bit set, and it won't affect anything in the normal case. */
-#define RE_DEBUG (RE_NO_GNU_OPS << 1)
-
-/* If this bit is set, a syntactically invalid interval is treated as
- a string of ordinary characters. For example, the ERE 'a{1' is
- treated as 'a\{1'. */
-#define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
-
-/* This global variable defines the particular regexp syntax to use (for
- some interfaces). When a regexp is compiled, the syntax used is
- stored in the pattern buffer, so changing this does not affect
- already-compiled regexps. */
-extern reg_syntax_t re_syntax_options;
-
-/* Define combinations of the above bits for the standard possibilities.
- (The [[[ comments delimit what gets put into the Texinfo file, so
- don't delete them!) */
-/* [[[begin syntaxes]]] */
-#define RE_SYNTAX_EMACS 0
-
-#define RE_SYNTAX_AWK \
- (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \
- | RE_NO_BK_PARENS | RE_NO_BK_REFS \
- | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \
- | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \
- | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS)
-
-#define RE_SYNTAX_GNU_AWK \
- ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG) \
- & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS))
-
-#define RE_SYNTAX_POSIX_AWK \
- (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \
- | RE_INTERVALS | RE_NO_GNU_OPS)
-
-#define RE_SYNTAX_GREP \
- (RE_BK_PLUS_QM | RE_CHAR_CLASSES \
- | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \
- | RE_NEWLINE_ALT)
-
-#define RE_SYNTAX_EGREP \
- (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \
- | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \
- | RE_NEWLINE_ALT | RE_NO_BK_PARENS \
- | RE_NO_BK_VBAR)
-
-#define RE_SYNTAX_POSIX_EGREP \
- (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \
- | RE_INVALID_INTERVAL_ORD)
-
-/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */
-#define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
-
-#define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC
-
-/* Syntax bits common to both basic and extended POSIX regex syntax. */
-#define _RE_SYNTAX_POSIX_COMMON \
- (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \
- | RE_INTERVALS | RE_NO_EMPTY_RANGES)
-
-#define RE_SYNTAX_POSIX_BASIC \
- (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM)
-
-/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes
- RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this
- isn't minimal, since other operators, such as \`, aren't disabled. */
-#define RE_SYNTAX_POSIX_MINIMAL_BASIC \
- (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS)
-
-#define RE_SYNTAX_POSIX_EXTENDED \
- (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
- | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \
- | RE_NO_BK_PARENS | RE_NO_BK_VBAR \
- | RE_CONTEXT_INVALID_OPS | RE_UNMATCHED_RIGHT_PAREN_ORD)
-
-/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INDEP_OPS is
- removed and RE_NO_BK_REFS is added. */
-#define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \
- (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
- | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \
- | RE_NO_BK_PARENS | RE_NO_BK_REFS \
- | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD)
-/* [[[end syntaxes]]] */
-
-/* Maximum number of duplicates an interval can allow. Some systems
- (erroneously) define this in other header files, but we want our
- value, so remove any previous define. */
-#ifdef RE_DUP_MAX
-# undef RE_DUP_MAX
-#endif
-/* If sizeof(int) == 2, then ((1 << 15) - 1) overflows. */
-#define RE_DUP_MAX (0x7fff)
-
-
-/* POSIX `cflags' bits (i.e., information for `regcomp'). */
-
-/* If this bit is set, then use extended regular expression syntax.
- If not set, then use basic regular expression syntax. */
-#define REG_EXTENDED 1
-
-/* If this bit is set, then ignore case when matching.
- If not set, then case is significant. */
-#define REG_ICASE (REG_EXTENDED << 1)
-
-/* If this bit is set, then anchors do not match at newline
- characters in the string.
- If not set, then anchors do match at newlines. */
-#define REG_NEWLINE (REG_ICASE << 1)
-
-/* If this bit is set, then report only success or fail in regexec.
- If not set, then returns differ between not matching and errors. */
-#define REG_NOSUB (REG_NEWLINE << 1)
-
-
-/* POSIX `eflags' bits (i.e., information for regexec). */
-
-/* If this bit is set, then the beginning-of-line operator doesn't match
- the beginning of the string (presumably because it's not the
- beginning of a line).
- If not set, then the beginning-of-line operator does match the
- beginning of the string. */
-#define REG_NOTBOL 1
-
-/* Like REG_NOTBOL, except for the end-of-line. */
-#define REG_NOTEOL (1 << 1)
-
-
-/* If any error codes are removed, changed, or added, update the
- `re_error_msg' table in regex.c. */
-typedef enum
-{
-#ifdef _XOPEN_SOURCE
- REG_ENOSYS = -1, /* This will never happen for this implementation. */
-#endif
-
- REG_NOERROR = 0, /* Success. */
- REG_NOMATCH, /* Didn't find a match (for regexec). */
-
- /* POSIX regcomp return error codes. (In the order listed in the
- standard.) */
- REG_BADPAT, /* Invalid pattern. */
- REG_ECOLLATE, /* Not implemented. */
- REG_ECTYPE, /* Invalid character class name. */
- REG_EESCAPE, /* Trailing backslash. */
- REG_ESUBREG, /* Invalid back reference. */
- REG_EBRACK, /* Unmatched left bracket. */
- REG_EPAREN, /* Parenthesis imbalance. */
- REG_EBRACE, /* Unmatched \{. */
- REG_BADBR, /* Invalid contents of \{\}. */
- REG_ERANGE, /* Invalid range end. */
- REG_ESPACE, /* Ran out of memory. */
- REG_BADRPT, /* No preceding re for repetition op. */
-
- /* Error codes we've added. */
- REG_EEND, /* Premature end. */
- REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */
- REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */
-} reg_errcode_t;
-
-/* This data structure represents a compiled pattern. Before calling
- the pattern compiler, the fields `buffer', `allocated', `fastmap',
- `translate', and `no_sub' can be set. After the pattern has been
- compiled, the `re_nsub' field is available. All other fields are
- private to the regex routines. */
-
-#ifndef RE_TRANSLATE_TYPE
-# define RE_TRANSLATE_TYPE char *
-#endif
-
-struct re_pattern_buffer
-{
-/* [[[begin pattern_buffer]]] */
- /* Space that holds the compiled pattern. It is declared as
- `unsigned char *' because its elements are
- sometimes used as array indexes. */
- unsigned char *buffer;
-
- /* Number of bytes to which `buffer' points. */
- unsigned long int allocated;
-
- /* Number of bytes actually used in `buffer'. */
- unsigned long int used;
-
- /* Syntax setting with which the pattern was compiled. */
- reg_syntax_t syntax;
-
- /* Pointer to a fastmap, if any, otherwise zero. re_search uses
- the fastmap, if there is one, to skip over impossible
- starting points for matches. */
- char *fastmap;
-
- /* Either a translate table to apply to all characters before
- comparing them, or zero for no translation. The translation
- is applied to a pattern when it is compiled and to a string
- when it is matched. */
- RE_TRANSLATE_TYPE translate;
-
- /* Number of subexpressions found by the compiler. */
- size_t re_nsub;
-
- /* Zero if this pattern cannot match the empty string, one else.
- Well, in truth it's used only in `re_search_2', to see
- whether or not we should use the fastmap, so we don't set
- this absolutely perfectly; see `re_compile_fastmap' (the
- `duplicate' case). */
- unsigned can_be_null : 1;
-
- /* If REGS_UNALLOCATED, allocate space in the `regs' structure
- for `max (RE_NREGS, re_nsub + 1)' groups.
- If REGS_REALLOCATE, reallocate space if necessary.
- If REGS_FIXED, use what's there. */
-#define REGS_UNALLOCATED 0
-#define REGS_REALLOCATE 1
-#define REGS_FIXED 2
- unsigned regs_allocated : 2;
-
- /* Set to zero when `regex_compile' compiles a pattern; set to one
- by `re_compile_fastmap' if it updates the fastmap. */
- unsigned fastmap_accurate : 1;
-
- /* If set, `re_match_2' does not return information about
- subexpressions. */
- unsigned no_sub : 1;
-
- /* If set, a beginning-of-line anchor doesn't match at the
- beginning of the string. */
- unsigned not_bol : 1;
-
- /* Similarly for an end-of-line anchor. */
- unsigned not_eol : 1;
-
- /* If true, an anchor at a newline matches. */
- unsigned newline_anchor : 1;
-
-/* [[[end pattern_buffer]]] */
-};
-
-typedef struct re_pattern_buffer regex_t;
-
-/* Type for byte offsets within the string. POSIX mandates this. */
-typedef int regoff_t;
-
-
-/* This is the structure we store register match data in. See
- regex.texinfo for a full description of what registers match. */
-struct re_registers
-{
- unsigned num_regs;
- regoff_t *start;
- regoff_t *end;
-};
-
-
-/* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer,
- `re_match_2' returns information about at least this many registers
- the first time a `regs' structure is passed. */
-#ifndef RE_NREGS
-# define RE_NREGS 30
-#endif
-
-
-/* POSIX specification for registers. Aside from the different names than
- `re_registers', POSIX uses an array of structures, instead of a
- structure of arrays. */
-typedef struct
-{
- regoff_t rm_so; /* Byte offset from string's start to substring's start. */
- regoff_t rm_eo; /* Byte offset from string's start to substring's end. */
-} regmatch_t;
-
-/* Declarations for routines. */
-
-/* To avoid duplicating every routine declaration -- once with a
- prototype (if we are ANSI), and once without (if we aren't) -- we
- use the following macro to declare argument types. This
- unfortunately clutters up the declarations a bit, but I think it's
- worth it. */
-
-/* Sets the current default syntax to SYNTAX, and return the old syntax.
- You can also simply assign to the `re_syntax_options' variable. */
-extern reg_syntax_t re_set_syntax (reg_syntax_t syntax);
-
-/* Compile the regular expression PATTERN, with length LENGTH
- and syntax given by the global `re_syntax_options', into the buffer
- BUFFER. Return NULL if successful, and an error string if not. */
-extern const char *re_compile_pattern (const char *pattern, size_t length,
- struct re_pattern_buffer *buffer);
-
-
-/* Compile a fastmap for the compiled pattern in BUFFER; used to
- accelerate searches. Return 0 if successful and -2 if was an
- internal error. */
-extern int re_compile_fastmap (struct re_pattern_buffer *buffer);
-
-
-/* Search in the string STRING (with length LENGTH) for the pattern
- compiled into BUFFER. Start searching at position START, for RANGE
- characters. Return the starting position of the match, -1 for no
- match, or -2 for an internal error. Also return register
- information in REGS (if REGS and BUFFER->no_sub are nonzero). */
-extern int re_search (struct re_pattern_buffer *buffer, const char *string,
- int length, int start, int range,
- struct re_registers *regs);
-
-
-/* Like `re_search', but search in the concatenation of STRING1 and
- STRING2. Also, stop searching at index START + STOP. */
-extern int re_search_2 (struct re_pattern_buffer *buffer, const char *string1,
- int length1, const char *string2, int length2,
- int start, int range, struct re_registers *regs,
- int stop);
-
-
-/* Like `re_search', but return how many characters in STRING the regexp
- in BUFFER matched, starting at position START. */
-extern int re_match (struct re_pattern_buffer *buffer, const char *string,
- int length, int start, struct re_registers *regs);
-
-
-/* Relates to `re_match' as `re_search_2' relates to `re_search'. */
-extern int re_match_2 (struct re_pattern_buffer *buffer, const char *string1,
- int length1, const char *string2, int length2,
- int start, struct re_registers *regs, int stop);
-
-
-/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
- ENDS. Subsequent matches using BUFFER and REGS will use this memory
- for recording register information. STARTS and ENDS must be
- allocated with malloc, and must each be at least `NUM_REGS * sizeof
- (regoff_t)' bytes long.
-
- If NUM_REGS == 0, then subsequent matches should allocate their own
- register data.
-
- Unless this function is called, the first search or match using
- PATTERN_BUFFER will allocate its own register data, without
- freeing the old data. */
-extern void re_set_registers (struct re_pattern_buffer *buffer,
- struct re_registers *regs,
- unsigned num_regs, regoff_t *starts,
- regoff_t *ends);
-
-#if defined _REGEX_RE_COMP || defined _LIBC
-# ifndef _CRAY
-/* 4.2 bsd compatibility. */
-extern char *re_comp (const char *);
-extern int re_exec (const char *);
-# endif
-#endif
-
-/* GCC 2.95 and later have "__restrict"; C99 compilers have
- "restrict", and "configure" may have defined "restrict". */
-#ifndef __restrict
-# if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__))
-# if defined restrict || 199901L <= __STDC_VERSION__
-# define __restrict restrict
-# else
-# define __restrict
-# endif
-# endif
-#endif
-
-/* GCC 3.1 and later support declaring arrays as non-overlapping
- using the syntax array_name[restrict] */
-#ifndef __restrict_arr
-# if ! (3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) || defined (__GNUG__)
-# define __restrict_arr
-# else
-# define __restrict_arr __restrict
-# endif
-#endif
-
-/* POSIX compatibility. */
-extern int regcomp (regex_t *__restrict __preg,
- const char *__restrict __pattern,
- int __cflags);
-
-#if (__GNUC__)
-__extension__
-#endif
-extern int regexec (const regex_t *__restrict __preg,
- const char *__restrict __string, size_t __nmatch,
- regmatch_t __pmatch[__restrict_arr],
- int __eflags);
-
-extern size_t regerror (int __errcode, const regex_t *__preg,
- char *__errbuf, size_t __errbuf_size);
-
-extern void regfree (regex_t *__preg);
-
-
-#ifdef __cplusplus
-}
-#endif /* C++ */
-
-#endif /* regex.h */
-
-/*
-Local variables:
-make-backup-files: t
-version-control: t
-trim-versions-without-asking: nil
-End:
-*/
diff --git a/include/xtensa-config.h b/include/xtensa-config.h
deleted file mode 100644
index bc99815..0000000
--- a/include/xtensa-config.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/* Xtensa configuration settings.
- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
- Free Software Foundation, Inc.
- Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef XTENSA_CONFIG_H
-#define XTENSA_CONFIG_H
-
-/* The macros defined here match those with the same names in the Xtensa
- compile-time HAL (Hardware Abstraction Layer). Please refer to the
- Xtensa System Software Reference Manual for documentation of these
- macros. */
-
-#undef XCHAL_HAVE_BE
-#define XCHAL_HAVE_BE 1
-
-#undef XCHAL_HAVE_DENSITY
-#define XCHAL_HAVE_DENSITY 1
-
-#undef XCHAL_HAVE_CONST16
-#define XCHAL_HAVE_CONST16 0
-
-#undef XCHAL_HAVE_ABS
-#define XCHAL_HAVE_ABS 1
-
-#undef XCHAL_HAVE_ADDX
-#define XCHAL_HAVE_ADDX 1
-
-#undef XCHAL_HAVE_L32R
-#define XCHAL_HAVE_L32R 1
-
-#undef XSHAL_USE_ABSOLUTE_LITERALS
-#define XSHAL_USE_ABSOLUTE_LITERALS 0
-
-#undef XCHAL_HAVE_MAC16
-#define XCHAL_HAVE_MAC16 0
-
-#undef XCHAL_HAVE_MUL16
-#define XCHAL_HAVE_MUL16 1
-
-#undef XCHAL_HAVE_MUL32
-#define XCHAL_HAVE_MUL32 1
-
-#undef XCHAL_HAVE_MUL32_HIGH
-#define XCHAL_HAVE_MUL32_HIGH 0
-
-#undef XCHAL_HAVE_DIV32
-#define XCHAL_HAVE_DIV32 1
-
-#undef XCHAL_HAVE_NSA
-#define XCHAL_HAVE_NSA 1
-
-#undef XCHAL_HAVE_MINMAX
-#define XCHAL_HAVE_MINMAX 1
-
-#undef XCHAL_HAVE_SEXT
-#define XCHAL_HAVE_SEXT 1
-
-#undef XCHAL_HAVE_LOOPS
-#define XCHAL_HAVE_LOOPS 1
-
-#undef XCHAL_HAVE_THREADPTR
-#define XCHAL_HAVE_THREADPTR 1
-
-#undef XCHAL_HAVE_RELEASE_SYNC
-#define XCHAL_HAVE_RELEASE_SYNC 1
-
-#undef XCHAL_HAVE_S32C1I
-#define XCHAL_HAVE_S32C1I 1
-
-#undef XCHAL_HAVE_BOOLEANS
-#define XCHAL_HAVE_BOOLEANS 0
-
-#undef XCHAL_HAVE_FP
-#define XCHAL_HAVE_FP 0
-
-#undef XCHAL_HAVE_FP_DIV
-#define XCHAL_HAVE_FP_DIV 0
-
-#undef XCHAL_HAVE_FP_RECIP
-#define XCHAL_HAVE_FP_RECIP 0
-
-#undef XCHAL_HAVE_FP_SQRT
-#define XCHAL_HAVE_FP_SQRT 0
-
-#undef XCHAL_HAVE_FP_RSQRT
-#define XCHAL_HAVE_FP_RSQRT 0
-
-#undef XCHAL_HAVE_WINDOWED
-#define XCHAL_HAVE_WINDOWED 1
-
-#undef XCHAL_NUM_AREGS
-#define XCHAL_NUM_AREGS 32
-
-#undef XCHAL_HAVE_WIDE_BRANCHES
-#define XCHAL_HAVE_WIDE_BRANCHES 0
-
-#undef XCHAL_HAVE_PREDICTED_BRANCHES
-#define XCHAL_HAVE_PREDICTED_BRANCHES 0
-
-
-#undef XCHAL_ICACHE_SIZE
-#define XCHAL_ICACHE_SIZE 16384
-
-#undef XCHAL_DCACHE_SIZE
-#define XCHAL_DCACHE_SIZE 16384
-
-#undef XCHAL_ICACHE_LINESIZE
-#define XCHAL_ICACHE_LINESIZE 32
-
-#undef XCHAL_DCACHE_LINESIZE
-#define XCHAL_DCACHE_LINESIZE 32
-
-#undef XCHAL_ICACHE_LINEWIDTH
-#define XCHAL_ICACHE_LINEWIDTH 5
-
-#undef XCHAL_DCACHE_LINEWIDTH
-#define XCHAL_DCACHE_LINEWIDTH 5
-
-#undef XCHAL_DCACHE_IS_WRITEBACK
-#define XCHAL_DCACHE_IS_WRITEBACK 1
-
-
-#undef XCHAL_HAVE_MMU
-#define XCHAL_HAVE_MMU 1
-
-#undef XCHAL_MMU_MIN_PTE_PAGE_SIZE
-#define XCHAL_MMU_MIN_PTE_PAGE_SIZE 12
-
-
-#undef XCHAL_HAVE_DEBUG
-#define XCHAL_HAVE_DEBUG 1
-
-#undef XCHAL_NUM_IBREAK
-#define XCHAL_NUM_IBREAK 2
-
-#undef XCHAL_NUM_DBREAK
-#define XCHAL_NUM_DBREAK 2
-
-#undef XCHAL_DEBUGLEVEL
-#define XCHAL_DEBUGLEVEL 6
-
-
-#undef XCHAL_MAX_INSTRUCTION_SIZE
-#define XCHAL_MAX_INSTRUCTION_SIZE 3
-
-#undef XCHAL_INST_FETCH_WIDTH
-#define XCHAL_INST_FETCH_WIDTH 4
-
-
-#undef XSHAL_ABI
-#undef XTHAL_ABI_WINDOWED
-#undef XTHAL_ABI_CALL0
-#define XSHAL_ABI XTHAL_ABI_WINDOWED
-#define XTHAL_ABI_WINDOWED 0
-#define XTHAL_ABI_CALL0 1
-
-#endif /* !XTENSA_CONFIG_H */
diff --git a/include/xtensa-isa-internal.h b/include/xtensa-isa-internal.h
deleted file mode 100644
index ae1f167..0000000
--- a/include/xtensa-isa-internal.h
+++ /dev/null
@@ -1,234 +0,0 @@
-/* Internal definitions for configurable Xtensa ISA support.
- Copyright 2003, 2004, 2005, 2008 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
- USA. */
-
-#ifndef XTENSA_ISA_INTERNAL_H
-#define XTENSA_ISA_INTERNAL_H
-
-/* Flags. */
-
-#define XTENSA_OPERAND_IS_REGISTER 0x00000001
-#define XTENSA_OPERAND_IS_PCRELATIVE 0x00000002
-#define XTENSA_OPERAND_IS_INVISIBLE 0x00000004
-#define XTENSA_OPERAND_IS_UNKNOWN 0x00000008
-
-#define XTENSA_OPCODE_IS_BRANCH 0x00000001
-#define XTENSA_OPCODE_IS_JUMP 0x00000002
-#define XTENSA_OPCODE_IS_LOOP 0x00000004
-#define XTENSA_OPCODE_IS_CALL 0x00000008
-
-#define XTENSA_STATE_IS_EXPORTED 0x00000001
-#define XTENSA_STATE_IS_SHARED_OR 0x00000002
-
-#define XTENSA_INTERFACE_HAS_SIDE_EFFECT 0x00000001
-
-/* Function pointer typedefs */
-typedef void (*xtensa_format_encode_fn) (xtensa_insnbuf);
-typedef void (*xtensa_get_slot_fn) (const xtensa_insnbuf, xtensa_insnbuf);
-typedef void (*xtensa_set_slot_fn) (xtensa_insnbuf, const xtensa_insnbuf);
-typedef int (*xtensa_opcode_decode_fn) (const xtensa_insnbuf);
-typedef uint32 (*xtensa_get_field_fn) (const xtensa_insnbuf);
-typedef void (*xtensa_set_field_fn) (xtensa_insnbuf, uint32);
-typedef int (*xtensa_immed_decode_fn) (uint32 *);
-typedef int (*xtensa_immed_encode_fn) (uint32 *);
-typedef int (*xtensa_do_reloc_fn) (uint32 *, uint32);
-typedef int (*xtensa_undo_reloc_fn) (uint32 *, uint32);
-typedef void (*xtensa_opcode_encode_fn) (xtensa_insnbuf);
-typedef int (*xtensa_format_decode_fn) (const xtensa_insnbuf);
-typedef int (*xtensa_length_decode_fn) (const unsigned char *);
-
-typedef struct xtensa_format_internal_struct
-{
- const char *name; /* Instruction format name. */
- int length; /* Instruction length in bytes. */
- xtensa_format_encode_fn encode_fn;
- int num_slots;
- int *slot_id; /* Array[num_slots] of slot IDs. */
-} xtensa_format_internal;
-
-typedef struct xtensa_slot_internal_struct
-{
- const char *name; /* Not necessarily unique. */
- const char *format;
- int position;
- xtensa_get_slot_fn get_fn;
- xtensa_set_slot_fn set_fn;
- xtensa_get_field_fn *get_field_fns; /* Array[field_id]. */
- xtensa_set_field_fn *set_field_fns; /* Array[field_id]. */
- xtensa_opcode_decode_fn opcode_decode_fn;
- const char *nop_name;
-} xtensa_slot_internal;
-
-typedef struct xtensa_operand_internal_struct
-{
- const char *name;
- int field_id;
- xtensa_regfile regfile; /* Register file. */
- int num_regs; /* Usually 1; 2 for reg pairs, etc. */
- uint32 flags; /* See XTENSA_OPERAND_* flags. */
- xtensa_immed_encode_fn encode; /* Encode the operand value. */
- xtensa_immed_decode_fn decode; /* Decode the value from the field. */
- xtensa_do_reloc_fn do_reloc; /* Perform a PC-relative reloc. */
- xtensa_undo_reloc_fn undo_reloc; /* Undo a PC-relative relocation. */
-} xtensa_operand_internal;
-
-typedef struct xtensa_arg_internal_struct
-{
- union {
- int operand_id; /* For normal operands. */
- xtensa_state state; /* For stateOperands. */
- } u;
- char inout; /* Direction: 'i', 'o', or 'm'. */
-} xtensa_arg_internal;
-
-typedef struct xtensa_iclass_internal_struct
-{
- int num_operands; /* Size of "operands" array. */
- xtensa_arg_internal *operands; /* Array[num_operands]. */
-
- int num_stateOperands; /* Size of "stateOperands" array. */
- xtensa_arg_internal *stateOperands; /* Array[num_stateOperands]. */
-
- int num_interfaceOperands; /* Size of "interfaceOperands". */
- xtensa_interface *interfaceOperands; /* Array[num_interfaceOperands]. */
-} xtensa_iclass_internal;
-
-typedef struct xtensa_opcode_internal_struct
-{
- const char *name; /* Opcode mnemonic. */
- int iclass_id; /* Iclass for this opcode. */
- uint32 flags; /* See XTENSA_OPCODE_* flags. */
- xtensa_opcode_encode_fn *encode_fns; /* Array[slot_id]. */
- int num_funcUnit_uses; /* Number of funcUnit_use entries. */
- xtensa_funcUnit_use *funcUnit_uses; /* Array[num_funcUnit_uses]. */
-} xtensa_opcode_internal;
-
-typedef struct xtensa_regfile_internal_struct
-{
- const char *name; /* Full name of the regfile. */
- const char *shortname; /* Abbreviated name. */
- xtensa_regfile parent; /* View parent (or identity). */
- int num_bits; /* Width of the registers. */
- int num_entries; /* Number of registers. */
-} xtensa_regfile_internal;
-
-typedef struct xtensa_interface_internal_struct
-{
- const char *name; /* Interface name. */
- int num_bits; /* Width of the interface. */
- uint32 flags; /* See XTENSA_INTERFACE_* flags. */
- int class_id; /* Class of related interfaces. */
- char inout; /* "i" or "o". */
-} xtensa_interface_internal;
-
-typedef struct xtensa_funcUnit_internal_struct
-{
- const char *name; /* Functional unit name. */
- int num_copies; /* Number of instances. */
-} xtensa_funcUnit_internal;
-
-typedef struct xtensa_state_internal_struct
-{
- const char *name; /* State name. */
- int num_bits; /* Number of state bits. */
- uint32 flags; /* See XTENSA_STATE_* flags. */
-} xtensa_state_internal;
-
-typedef struct xtensa_sysreg_internal_struct
-{
- const char *name; /* Register name. */
- int number; /* Register number. */
- int is_user; /* Non-zero if a "user register". */
-} xtensa_sysreg_internal;
-
-typedef struct xtensa_lookup_entry_struct
-{
- const char *key;
- union
- {
- xtensa_opcode opcode; /* Internal opcode number. */
- xtensa_sysreg sysreg; /* Internal sysreg number. */
- xtensa_state state; /* Internal state number. */
- xtensa_interface intf; /* Internal interface number. */
- xtensa_funcUnit fun; /* Internal funcUnit number. */
- } u;
-} xtensa_lookup_entry;
-
-typedef struct xtensa_isa_internal_struct
-{
- int is_big_endian; /* Endianness. */
- int insn_size; /* Maximum length in bytes. */
- int insnbuf_size; /* Number of insnbuf_words. */
-
- int num_formats;
- xtensa_format_internal *formats;
- xtensa_format_decode_fn format_decode_fn;
- xtensa_length_decode_fn length_decode_fn;
-
- int num_slots;
- xtensa_slot_internal *slots;
-
- int num_fields;
-
- int num_operands;
- xtensa_operand_internal *operands;
-
- int num_iclasses;
- xtensa_iclass_internal *iclasses;
-
- int num_opcodes;
- xtensa_opcode_internal *opcodes;
- xtensa_lookup_entry *opname_lookup_table;
-
- int num_regfiles;
- xtensa_regfile_internal *regfiles;
-
- int num_states;
- xtensa_state_internal *states;
- xtensa_lookup_entry *state_lookup_table;
-
- int num_sysregs;
- xtensa_sysreg_internal *sysregs;
- xtensa_lookup_entry *sysreg_lookup_table;
-
- /* The current Xtensa ISA only supports 256 of each kind of sysreg so
- we can get away with implementing lookups with tables indexed by
- the register numbers. If we ever allow larger sysreg numbers, this
- may have to be reimplemented. The first entry in the following
- arrays corresponds to "special" registers and the second to "user"
- registers. */
- int max_sysreg_num[2];
- xtensa_sysreg *sysreg_table[2];
-
- int num_interfaces;
- xtensa_interface_internal *interfaces;
- xtensa_lookup_entry *interface_lookup_table;
-
- int num_funcUnits;
- xtensa_funcUnit_internal *funcUnits;
- xtensa_lookup_entry *funcUnit_lookup_table;
-
-} xtensa_isa_internal;
-
-extern int xtensa_isa_name_compare (const void *, const void *);
-
-extern xtensa_isa_status xtisa_errno;
-extern char xtisa_error_msg[];
-
-#endif /* !XTENSA_ISA_INTERNAL_H */
diff --git a/include/xtensa-isa.h b/include/xtensa-isa.h
deleted file mode 100644
index 69ac60d..0000000
--- a/include/xtensa-isa.h
+++ /dev/null
@@ -1,813 +0,0 @@
-/* Interface definition for configurable Xtensa ISA support.
- Copyright 2003, 2004, 2005, 2006, 2008 Free Software Foundation, Inc.
-
- This file is part of BFD, the Binary File Descriptor library.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
- USA. */
-
-#ifndef XTENSA_LIBISA_H
-#define XTENSA_LIBISA_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Version number: This is intended to help support code that works with
- versions of this library from multiple Xtensa releases. */
-
-#define XTENSA_ISA_VERSION 7000
-
-#ifndef uint32
-#define uint32 unsigned int
-#endif
-
-/* This file defines the interface to the Xtensa ISA library. This
- library contains most of the ISA-specific information for a
- particular Xtensa processor. For example, the set of valid
- instructions, their opcode encodings and operand fields are all
- included here.
-
- This interface basically defines a number of abstract data types.
-
- . an instruction buffer - for holding the raw instruction bits
- . ISA info - information about the ISA as a whole
- . instruction formats - instruction size and slot structure
- . opcodes - information about individual instructions
- . operands - information about register and immediate instruction operands
- . stateOperands - information about processor state instruction operands
- . interfaceOperands - information about interface instruction operands
- . register files - register file information
- . processor states - internal processor state information
- . system registers - "special registers" and "user registers"
- . interfaces - TIE interfaces that are external to the processor
- . functional units - TIE shared functions
-
- The interface defines a set of functions to access each data type.
- With the exception of the instruction buffer, the internal
- representations of the data structures are hidden. All accesses must
- be made through the functions defined here. */
-
-typedef struct xtensa_isa_opaque { int unused; } *xtensa_isa;
-
-
-/* Most of the Xtensa ISA entities (e.g., opcodes, regfiles, etc.) are
- represented here using sequential integers beginning with 0. The
- specific values are only fixed for a particular instantiation of an
- xtensa_isa structure, so these values should only be used
- internally. */
-
-typedef int xtensa_opcode;
-typedef int xtensa_format;
-typedef int xtensa_regfile;
-typedef int xtensa_state;
-typedef int xtensa_sysreg;
-typedef int xtensa_interface;
-typedef int xtensa_funcUnit;
-
-
-/* Define a unique value for undefined items. */
-
-#define XTENSA_UNDEFINED -1
-
-
-/* Overview of using this interface to decode/encode instructions:
-
- Each Xtensa instruction is associated with a particular instruction
- format, where the format defines a fixed number of slots for
- operations. The formats for the core Xtensa ISA have only one slot,
- but FLIX instructions may have multiple slots. Within each slot,
- there is a single opcode and some number of associated operands.
-
- The encoding and decoding functions operate on instruction buffers,
- not on the raw bytes of the instructions. The same instruction
- buffer data structure is used for both entire instructions and
- individual slots in those instructions -- the contents of a slot need
- to be extracted from or inserted into the buffer for the instruction
- as a whole.
-
- Decoding an instruction involves first finding the format, which
- identifies the number of slots, and then decoding each slot
- separately. A slot is decoded by finding the opcode and then using
- the opcode to determine how many operands there are. For example:
-
- xtensa_insnbuf_from_chars
- xtensa_format_decode
- for each slot {
- xtensa_format_get_slot
- xtensa_opcode_decode
- for each operand {
- xtensa_operand_get_field
- xtensa_operand_decode
- }
- }
-
- Encoding an instruction is roughly the same procedure in reverse:
-
- xtensa_format_encode
- for each slot {
- xtensa_opcode_encode
- for each operand {
- xtensa_operand_encode
- xtensa_operand_set_field
- }
- xtensa_format_set_slot
- }
- xtensa_insnbuf_to_chars
-*/
-
-
-/* Error handling. */
-
-/* Error codes. The code for the most recent error condition can be
- retrieved with the "errno" function. For any result other than
- xtensa_isa_ok, an error message containing additional information
- about the problem can be retrieved using the "error_msg" function.
- The error messages are stored in an internal buffer, which should
- not be freed and may be overwritten by subsequent operations. */
-
-typedef enum xtensa_isa_status_enum
-{
- xtensa_isa_ok = 0,
- xtensa_isa_bad_format,
- xtensa_isa_bad_slot,
- xtensa_isa_bad_opcode,
- xtensa_isa_bad_operand,
- xtensa_isa_bad_field,
- xtensa_isa_bad_iclass,
- xtensa_isa_bad_regfile,
- xtensa_isa_bad_sysreg,
- xtensa_isa_bad_state,
- xtensa_isa_bad_interface,
- xtensa_isa_bad_funcUnit,
- xtensa_isa_wrong_slot,
- xtensa_isa_no_field,
- xtensa_isa_out_of_memory,
- xtensa_isa_buffer_overflow,
- xtensa_isa_internal_error,
- xtensa_isa_bad_value
-} xtensa_isa_status;
-
-extern xtensa_isa_status
-xtensa_isa_errno (xtensa_isa isa);
-
-extern char *
-xtensa_isa_error_msg (xtensa_isa isa);
-
-
-
-/* Instruction buffers. */
-
-typedef uint32 xtensa_insnbuf_word;
-typedef xtensa_insnbuf_word *xtensa_insnbuf;
-
-
-/* Get the size in "insnbuf_words" of the xtensa_insnbuf array. */
-
-extern int
-xtensa_insnbuf_size (xtensa_isa isa);
-
-
-/* Allocate an xtensa_insnbuf of the right size. */
-
-extern xtensa_insnbuf
-xtensa_insnbuf_alloc (xtensa_isa isa);
-
-
-/* Release an xtensa_insnbuf. */
-
-extern void
-xtensa_insnbuf_free (xtensa_isa isa, xtensa_insnbuf buf);
-
-
-/* Conversion between raw memory (char arrays) and our internal
- instruction representation. This is complicated by the Xtensa ISA's
- variable instruction lengths. When converting to chars, the buffer
- must contain a valid instruction so we know how many bytes to copy;
- thus, the "to_chars" function returns the number of bytes copied or
- XTENSA_UNDEFINED on error. The "from_chars" function first reads the
- minimal number of bytes required to decode the instruction length and
- then proceeds to copy the entire instruction into the buffer; if the
- memory does not contain a valid instruction, it copies the maximum
- number of bytes required for the longest Xtensa instruction. The
- "num_chars" argument may be used to limit the number of bytes that
- can be read or written. Otherwise, if "num_chars" is zero, the
- functions may read or write past the end of the code. */
-
-extern int
-xtensa_insnbuf_to_chars (xtensa_isa isa, const xtensa_insnbuf insn,
- unsigned char *cp, int num_chars);
-
-extern void
-xtensa_insnbuf_from_chars (xtensa_isa isa, xtensa_insnbuf insn,
- const unsigned char *cp, int num_chars);
-
-
-
-/* ISA information. */
-
-/* Initialize the ISA information. */
-
-extern xtensa_isa
-xtensa_isa_init (xtensa_isa_status *errno_p, char **error_msg_p);
-
-
-/* Deallocate an xtensa_isa structure. */
-
-extern void
-xtensa_isa_free (xtensa_isa isa);
-
-
-/* Get the maximum instruction size in bytes. */
-
-extern int
-xtensa_isa_maxlength (xtensa_isa isa);
-
-
-/* Decode the length in bytes of an instruction in raw memory (not an
- insnbuf). This function reads only the minimal number of bytes
- required to decode the instruction length. Returns
- XTENSA_UNDEFINED on error. */
-
-extern int
-xtensa_isa_length_from_chars (xtensa_isa isa, const unsigned char *cp);
-
-
-/* Get the number of stages in the processor's pipeline. The pipeline
- stage values returned by other functions in this library will range
- from 0 to N-1, where N is the value returned by this function.
- Note that the stage numbers used here may not correspond to the
- actual processor hardware, e.g., the hardware may have additional
- stages before stage 0. Returns XTENSA_UNDEFINED on error. */
-
-extern int
-xtensa_isa_num_pipe_stages (xtensa_isa isa);
-
-
-/* Get the number of various entities that are defined for this processor. */
-
-extern int
-xtensa_isa_num_formats (xtensa_isa isa);
-
-extern int
-xtensa_isa_num_opcodes (xtensa_isa isa);
-
-extern int
-xtensa_isa_num_regfiles (xtensa_isa isa);
-
-extern int
-xtensa_isa_num_states (xtensa_isa isa);
-
-extern int
-xtensa_isa_num_sysregs (xtensa_isa isa);
-
-extern int
-xtensa_isa_num_interfaces (xtensa_isa isa);
-
-extern int
-xtensa_isa_num_funcUnits (xtensa_isa isa);
-
-
-
-/* Instruction formats. */
-
-/* Get the name of a format. Returns null on error. */
-
-extern const char *
-xtensa_format_name (xtensa_isa isa, xtensa_format fmt);
-
-
-/* Given a format name, return the format number. Returns
- XTENSA_UNDEFINED if the name is not a valid format. */
-
-extern xtensa_format
-xtensa_format_lookup (xtensa_isa isa, const char *fmtname);
-
-
-/* Decode the instruction format from a binary instruction buffer.
- Returns XTENSA_UNDEFINED if the format is not recognized. */
-
-extern xtensa_format
-xtensa_format_decode (xtensa_isa isa, const xtensa_insnbuf insn);
-
-
-/* Set the instruction format field(s) in a binary instruction buffer.
- All the other fields are set to zero. Returns non-zero on error. */
-
-extern int
-xtensa_format_encode (xtensa_isa isa, xtensa_format fmt, xtensa_insnbuf insn);
-
-
-/* Find the length (in bytes) of an instruction. Returns
- XTENSA_UNDEFINED on error. */
-
-extern int
-xtensa_format_length (xtensa_isa isa, xtensa_format fmt);
-
-
-/* Get the number of slots in an instruction. Returns XTENSA_UNDEFINED
- on error. */
-
-extern int
-xtensa_format_num_slots (xtensa_isa isa, xtensa_format fmt);
-
-
-/* Get the opcode for a no-op in a particular slot.
- Returns XTENSA_UNDEFINED on error. */
-
-extern xtensa_opcode
-xtensa_format_slot_nop_opcode (xtensa_isa isa, xtensa_format fmt, int slot);
-
-
-/* Get the bits for a specified slot out of an insnbuf for the
- instruction as a whole and put them into an insnbuf for that one
- slot, and do the opposite to set a slot. Return non-zero on error. */
-
-extern int
-xtensa_format_get_slot (xtensa_isa isa, xtensa_format fmt, int slot,
- const xtensa_insnbuf insn, xtensa_insnbuf slotbuf);
-
-extern int
-xtensa_format_set_slot (xtensa_isa isa, xtensa_format fmt, int slot,
- xtensa_insnbuf insn, const xtensa_insnbuf slotbuf);
-
-
-
-/* Opcode information. */
-
-/* Translate a mnemonic name to an opcode. Returns XTENSA_UNDEFINED if
- the name is not a valid opcode mnemonic. */
-
-extern xtensa_opcode
-xtensa_opcode_lookup (xtensa_isa isa, const char *opname);
-
-
-/* Decode the opcode for one instruction slot from a binary instruction
- buffer. Returns the opcode or XTENSA_UNDEFINED if the opcode is
- illegal. */
-
-extern xtensa_opcode
-xtensa_opcode_decode (xtensa_isa isa, xtensa_format fmt, int slot,
- const xtensa_insnbuf slotbuf);
-
-
-/* Set the opcode field(s) for an instruction slot. All other fields
- in the slot are set to zero. Returns non-zero if the opcode cannot
- be encoded. */
-
-extern int
-xtensa_opcode_encode (xtensa_isa isa, xtensa_format fmt, int slot,
- xtensa_insnbuf slotbuf, xtensa_opcode opc);
-
-
-/* Get the mnemonic name for an opcode. Returns null on error. */
-
-extern const char *
-xtensa_opcode_name (xtensa_isa isa, xtensa_opcode opc);
-
-
-/* Check various properties of opcodes. These functions return 0 if
- the condition is false, 1 if the condition is true, and
- XTENSA_UNDEFINED on error. The instructions are classified as
- follows:
-
- branch: conditional branch; may fall through to next instruction (B*)
- jump: unconditional branch (J, JX, RET*, RF*)
- loop: zero-overhead loop (LOOP*)
- call: unconditional call; control returns to next instruction (CALL*)
-
- For the opcodes that affect control flow in some way, the branch
- target may be specified by an immediate operand or it may be an
- address stored in a register. You can distinguish these by
- checking if the instruction has a PC-relative immediate
- operand. */
-
-extern int
-xtensa_opcode_is_branch (xtensa_isa isa, xtensa_opcode opc);
-
-extern int
-xtensa_opcode_is_jump (xtensa_isa isa, xtensa_opcode opc);
-
-extern int
-xtensa_opcode_is_loop (xtensa_isa isa, xtensa_opcode opc);
-
-extern int
-xtensa_opcode_is_call (xtensa_isa isa, xtensa_opcode opc);
-
-
-/* Find the number of ordinary operands, state operands, and interface
- operands for an instruction. These return XTENSA_UNDEFINED on
- error. */
-
-extern int
-xtensa_opcode_num_operands (xtensa_isa isa, xtensa_opcode opc);
-
-extern int
-xtensa_opcode_num_stateOperands (xtensa_isa isa, xtensa_opcode opc);
-
-extern int
-xtensa_opcode_num_interfaceOperands (xtensa_isa isa, xtensa_opcode opc);
-
-
-/* Get functional unit usage requirements for an opcode. Each "use"
- is identified by a <functional unit, pipeline stage> pair. The
- "num_funcUnit_uses" function returns the number of these "uses" or
- XTENSA_UNDEFINED on error. The "funcUnit_use" function returns
- a pointer to a "use" pair or null on error. */
-
-typedef struct xtensa_funcUnit_use_struct
-{
- xtensa_funcUnit unit;
- int stage;
-} xtensa_funcUnit_use;
-
-extern int
-xtensa_opcode_num_funcUnit_uses (xtensa_isa isa, xtensa_opcode opc);
-
-extern xtensa_funcUnit_use *
-xtensa_opcode_funcUnit_use (xtensa_isa isa, xtensa_opcode opc, int u);
-
-
-
-/* Operand information. */
-
-/* Get the name of an operand. Returns null on error. */
-
-extern const char *
-xtensa_operand_name (xtensa_isa isa, xtensa_opcode opc, int opnd);
-
-
-/* Some operands are "invisible", i.e., not explicitly specified in
- assembly language. When assembling an instruction, you need not set
- the values of invisible operands, since they are either hardwired or
- derived from other field values. The values of invisible operands
- can be examined in the same way as other operands, but remember that
- an invisible operand may get its value from another visible one, so
- the entire instruction must be available before examining the
- invisible operand values. This function returns 1 if an operand is
- visible, 0 if it is invisible, or XTENSA_UNDEFINED on error. Note
- that whether an operand is visible is orthogonal to whether it is
- "implicit", i.e., whether it is encoded in a field in the
- instruction. */
-
-extern int
-xtensa_operand_is_visible (xtensa_isa isa, xtensa_opcode opc, int opnd);
-
-
-/* Check if an operand is an input ('i'), output ('o'), or inout ('m')
- operand. Note: The output operand of a conditional assignment
- (e.g., movnez) appears here as an inout ('m') even if it is declared
- in the TIE code as an output ('o'); this allows the compiler to
- properly handle register allocation for conditional assignments.
- Returns 0 on error. */
-
-extern char
-xtensa_operand_inout (xtensa_isa isa, xtensa_opcode opc, int opnd);
-
-
-/* Get and set the raw (encoded) value of the field for the specified
- operand. The "set" function does not check if the value fits in the
- field; that is done by the "encode" function below. Both of these
- functions return non-zero on error, e.g., if the field is not defined
- for the specified slot. */
-
-extern int
-xtensa_operand_get_field (xtensa_isa isa, xtensa_opcode opc, int opnd,
- xtensa_format fmt, int slot,
- const xtensa_insnbuf slotbuf, uint32 *valp);
-
-extern int
-xtensa_operand_set_field (xtensa_isa isa, xtensa_opcode opc, int opnd,
- xtensa_format fmt, int slot,
- xtensa_insnbuf slotbuf, uint32 val);
-
-
-/* Encode and decode operands. The raw bits in the operand field may
- be encoded in a variety of different ways. These functions hide
- the details of that encoding. The result values are returned through
- the argument pointer. The return value is non-zero on error. */
-
-extern int
-xtensa_operand_encode (xtensa_isa isa, xtensa_opcode opc, int opnd,
- uint32 *valp);
-
-extern int
-xtensa_operand_decode (xtensa_isa isa, xtensa_opcode opc, int opnd,
- uint32 *valp);
-
-
-/* An operand may be either a register operand or an immediate of some
- sort (e.g., PC-relative or not). The "is_register" function returns
- 0 if the operand is an immediate, 1 if it is a register, and
- XTENSA_UNDEFINED on error. The "regfile" function returns the
- regfile for a register operand, or XTENSA_UNDEFINED on error. */
-
-extern int
-xtensa_operand_is_register (xtensa_isa isa, xtensa_opcode opc, int opnd);
-
-extern xtensa_regfile
-xtensa_operand_regfile (xtensa_isa isa, xtensa_opcode opc, int opnd);
-
-
-/* Register operands may span multiple consecutive registers, e.g., a
- 64-bit data type may occupy two 32-bit registers. Only the first
- register is encoded in the operand field. This function specifies
- the number of consecutive registers occupied by this operand. For
- non-register operands, the return value is undefined. Returns
- XTENSA_UNDEFINED on error. */
-
-extern int
-xtensa_operand_num_regs (xtensa_isa isa, xtensa_opcode opc, int opnd);
-
-
-/* Some register operands do not completely identify the register being
- accessed. For example, the operand value may be added to an internal
- state value. By definition, this implies that the corresponding
- regfile is not allocatable. Unknown registers should generally be
- treated with worst-case assumptions. The function returns 0 if the
- register value is unknown, 1 if known, and XTENSA_UNDEFINED on
- error. */
-
-extern int
-xtensa_operand_is_known_reg (xtensa_isa isa, xtensa_opcode opc, int opnd);
-
-
-/* Check if an immediate operand is PC-relative. Returns 0 for register
- operands and non-PC-relative immediates, 1 for PC-relative
- immediates, and XTENSA_UNDEFINED on error. */
-
-extern int
-xtensa_operand_is_PCrelative (xtensa_isa isa, xtensa_opcode opc, int opnd);
-
-
-/* For PC-relative offset operands, the interpretation of the offset may
- vary between opcodes, e.g., is it relative to the current PC or that
- of the next instruction? The following functions are defined to
- perform PC-relative relocations and to undo them (as in the
- disassembler). The "do_reloc" function takes the desired address
- value and the PC of the current instruction and sets the value to the
- corresponding PC-relative offset (which can then be encoded and
- stored into the operand field). The "undo_reloc" function takes the
- unencoded offset value and the current PC and sets the value to the
- appropriate address. The return values are non-zero on error. Note
- that these functions do not replace the encode/decode functions; the
- operands must be encoded/decoded separately and the encode functions
- are responsible for detecting invalid operand values. */
-
-extern int
-xtensa_operand_do_reloc (xtensa_isa isa, xtensa_opcode opc, int opnd,
- uint32 *valp, uint32 pc);
-
-extern int
-xtensa_operand_undo_reloc (xtensa_isa isa, xtensa_opcode opc, int opnd,
- uint32 *valp, uint32 pc);
-
-
-
-/* State Operands. */
-
-/* Get the state accessed by a state operand. Returns XTENSA_UNDEFINED
- on error. */
-
-extern xtensa_state
-xtensa_stateOperand_state (xtensa_isa isa, xtensa_opcode opc, int stOp);
-
-
-/* Check if a state operand is an input ('i'), output ('o'), or inout
- ('m') operand. Returns 0 on error. */
-
-extern char
-xtensa_stateOperand_inout (xtensa_isa isa, xtensa_opcode opc, int stOp);
-
-
-
-/* Interface Operands. */
-
-/* Get the external interface accessed by an interface operand.
- Returns XTENSA_UNDEFINED on error. */
-
-extern xtensa_interface
-xtensa_interfaceOperand_interface (xtensa_isa isa, xtensa_opcode opc,
- int ifOp);
-
-
-
-/* Register Files. */
-
-/* Regfiles include both "real" regfiles and "views", where a view
- allows a group of adjacent registers in a real "parent" regfile to be
- viewed as a single register. A regfile view has all the same
- properties as its parent except for its (long) name, bit width, number
- of entries, and default ctype. You can use the parent function to
- distinguish these two classes. */
-
-/* Look up a regfile by either its name or its abbreviated "short name".
- Returns XTENSA_UNDEFINED on error. The "lookup_shortname" function
- ignores "view" regfiles since they always have the same shortname as
- their parents. */
-
-extern xtensa_regfile
-xtensa_regfile_lookup (xtensa_isa isa, const char *name);
-
-extern xtensa_regfile
-xtensa_regfile_lookup_shortname (xtensa_isa isa, const char *shortname);
-
-
-/* Get the name or abbreviated "short name" of a regfile.
- Returns null on error. */
-
-extern const char *
-xtensa_regfile_name (xtensa_isa isa, xtensa_regfile rf);
-
-extern const char *
-xtensa_regfile_shortname (xtensa_isa isa, xtensa_regfile rf);
-
-
-/* Get the parent regfile of a "view" regfile. If the regfile is not a
- view, the result is the same as the input parameter. Returns
- XTENSA_UNDEFINED on error. */
-
-extern xtensa_regfile
-xtensa_regfile_view_parent (xtensa_isa isa, xtensa_regfile rf);
-
-
-/* Get the bit width of a regfile or regfile view.
- Returns XTENSA_UNDEFINED on error. */
-
-extern int
-xtensa_regfile_num_bits (xtensa_isa isa, xtensa_regfile rf);
-
-
-/* Get the number of regfile entries. Returns XTENSA_UNDEFINED on
- error. */
-
-extern int
-xtensa_regfile_num_entries (xtensa_isa isa, xtensa_regfile rf);
-
-
-
-/* Processor States. */
-
-/* Look up a state by name. Returns XTENSA_UNDEFINED on error. */
-
-extern xtensa_state
-xtensa_state_lookup (xtensa_isa isa, const char *name);
-
-
-/* Get the name for a processor state. Returns null on error. */
-
-extern const char *
-xtensa_state_name (xtensa_isa isa, xtensa_state st);
-
-
-/* Get the bit width for a processor state.
- Returns XTENSA_UNDEFINED on error. */
-
-extern int
-xtensa_state_num_bits (xtensa_isa isa, xtensa_state st);
-
-
-/* Check if a state is exported from the processor core. Returns 0 if
- the condition is false, 1 if the condition is true, and
- XTENSA_UNDEFINED on error. */
-
-extern int
-xtensa_state_is_exported (xtensa_isa isa, xtensa_state st);
-
-
-/* Check for a "shared_or" state. Returns 0 if the condition is false,
- 1 if the condition is true, and XTENSA_UNDEFINED on error. */
-
-extern int
-xtensa_state_is_shared_or (xtensa_isa isa, xtensa_state st);
-
-
-
-/* Sysregs ("special registers" and "user registers"). */
-
-/* Look up a register by its number and whether it is a "user register"
- or a "special register". Returns XTENSA_UNDEFINED if the sysreg does
- not exist. */
-
-extern xtensa_sysreg
-xtensa_sysreg_lookup (xtensa_isa isa, int num, int is_user);
-
-
-/* Check if there exists a sysreg with a given name.
- If not, this function returns XTENSA_UNDEFINED. */
-
-extern xtensa_sysreg
-xtensa_sysreg_lookup_name (xtensa_isa isa, const char *name);
-
-
-/* Get the name of a sysreg. Returns null on error. */
-
-extern const char *
-xtensa_sysreg_name (xtensa_isa isa, xtensa_sysreg sysreg);
-
-
-/* Get the register number. Returns XTENSA_UNDEFINED on error. */
-
-extern int
-xtensa_sysreg_number (xtensa_isa isa, xtensa_sysreg sysreg);
-
-
-/* Check if a sysreg is a "special register" or a "user register".
- Returns 0 for special registers, 1 for user registers and
- XTENSA_UNDEFINED on error. */
-
-extern int
-xtensa_sysreg_is_user (xtensa_isa isa, xtensa_sysreg sysreg);
-
-
-
-/* Interfaces. */
-
-/* Find an interface by name. The return value is XTENSA_UNDEFINED if
- the specified interface is not found. */
-
-extern xtensa_interface
-xtensa_interface_lookup (xtensa_isa isa, const char *ifname);
-
-
-/* Get the name of an interface. Returns null on error. */
-
-extern const char *
-xtensa_interface_name (xtensa_isa isa, xtensa_interface intf);
-
-
-/* Get the bit width for an interface.
- Returns XTENSA_UNDEFINED on error. */
-
-extern int
-xtensa_interface_num_bits (xtensa_isa isa, xtensa_interface intf);
-
-
-/* Check if an interface is an input ('i') or output ('o') with respect
- to the Xtensa processor core. Returns 0 on error. */
-
-extern char
-xtensa_interface_inout (xtensa_isa isa, xtensa_interface intf);
-
-
-/* Check if accessing an interface has potential side effects.
- Currently "data" interfaces have side effects and "control"
- interfaces do not. Returns 1 if there are side effects, 0 if not,
- and XTENSA_UNDEFINED on error. */
-
-extern int
-xtensa_interface_has_side_effect (xtensa_isa isa, xtensa_interface intf);
-
-
-/* Some interfaces may be related such that accessing one interface
- has side effects on a set of related interfaces. The interfaces
- are partitioned into equivalence classes of related interfaces, and
- each class is assigned a unique identifier number. This function
- returns the class identifier for an interface, or XTENSA_UNDEFINED
- on error. These identifiers can be compared to determine if two
- interfaces are related; the specific values of the identifiers have
- no particular meaning otherwise. */
-
-extern int
-xtensa_interface_class_id (xtensa_isa isa, xtensa_interface intf);
-
-
-
-/* Functional Units. */
-
-/* Find a functional unit by name. The return value is XTENSA_UNDEFINED if
- the specified unit is not found. */
-
-extern xtensa_funcUnit
-xtensa_funcUnit_lookup (xtensa_isa isa, const char *fname);
-
-
-/* Get the name of a functional unit. Returns null on error. */
-
-extern const char *
-xtensa_funcUnit_name (xtensa_isa isa, xtensa_funcUnit fun);
-
-
-/* Functional units may be replicated. See how many instances of a
- particular function unit exist. Returns XTENSA_UNDEFINED on error. */
-
-extern int
-xtensa_funcUnit_num_copies (xtensa_isa isa, xtensa_funcUnit fun);
-
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* XTENSA_LIBISA_H */
diff --git a/winsup/COPYING b/winsup/COPYING
deleted file mode 100644
index 623b625..0000000
--- a/winsup/COPYING
+++ /dev/null
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/winsup/CYGWIN_LICENSE b/winsup/CYGWIN_LICENSE
deleted file mode 100644
index 75dac9a..0000000
--- a/winsup/CYGWIN_LICENSE
+++ /dev/null
@@ -1,66 +0,0 @@
-Red Hat, Inc. licenses Cygwin to you under the terms of the GNU
-General Public License version 2 (GPLv2), as published by the Free
-Software Foundation, along with the additional permissions given
-below.
-
-There is NO WARRANTY for this software, express or implied, including
-the implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-PURPOSE.
-
-You should have received a copy of GPLv2 along with this program; if
-not, see http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt .
-
-
-Additional Permissions:
-
-
-1. Linking Exception.
-
-As a special exception to GPLv2, Red Hat grants you permission to link
-software whose sources are distributed under a license that satisfies
-the Open Source Definition with libcygwin.a, without libcygwin.a
-itself causing the resulting program to be covered by GPLv2.
-
-This means that you can port an open source application to Cygwin, and
-distribute that executable as if it didn't include a copy of
-libcygwin.a linked into it. Note that this does not apply to the
-Cygwin DLL itself. If you distribute a (possibly modified) version of
-the DLL you must adhere to the terms of GPLv2, including the
-requirement to provide sources for the Cygwin DLL.
-
-See http://www.opensource.org/docs/osd/ for the precise Open Source
-Definition referenced above.
-
-
-2. Files Excluded from GPL Coverage.
-
-Red Hat grants you permission to distribute Cygwin with the following
-files, which are not considered part of Cygwin and are not governed by
-GPLv2, in source or binary form.
-
-winsup\testsuite\winsup.api\msgtest.c
-winsup\testsuite\winsup.api\semtest.c
-winsup\testsuite\winsup.api\shmtest.c
-
-Red Hat grants you permission to link or combine code in Cygwin with
-code in or corresponding to the following files, which are not
-considered part of Cygwin and are not governed by GPLv2, and to
-distribute such combinations under terms of your choice, provided that
-such terms are otherwise consistent with the application of GPLv2 to
-Cygwin itself. You must comply with GPLv2 with respect to all
-portions of such combinations other than those that correspond to or
-are derived from such non-Cygwin code but which do not correspond to
-or are not derived from Cygwin itself.
-
-winsup\cygserver\sysv_shm.cc
-
-
-3. Alternative License.
-
-Red Hat sells a special Cygwin License for customers who are unable to
-provide their application in open source code form. For more
-information, please see: http://www.redhat.com/software/cygwin/, or call
-+1-866-2REDHAT ext. 45300 (toll-free in the US).
-
-Outside the US call your regional Red Hat office, see
-http://www.redhat.com/about/contact/ww/
diff --git a/winsup/ChangeLog b/winsup/ChangeLog
deleted file mode 100644
index d1505a0..0000000
--- a/winsup/ChangeLog
+++ /dev/null
@@ -1,482 +0,0 @@
-2008-10-12 Christopher Faylor <me+cygwin@cgf.cx>
-
- * Makefile.in: Revert erroneous checkin.
- * Makefile.common: Tweak to work better with new utils/mingw front-end.
-
-2008-10-11 Christopher Faylor <me+cygwin@cgf.cx>
-
- * Makefile.in: Tweak to work better with new utils/mingw front-end.
-
-2008-05-16 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (install-license): Install COPYING file as well.
-
-2008-05-16 Corinna Vinschen <corinna@vinschen.de>
-
- * CYGWIN_LICENSE: New text.
-
-2007-08-31 Christopher Faylor <me+cygwin@cgf.cx>
-
- * configure: Regenerate.
-
-2007-07-06 Corinna Vinschen <corinna@vinschen.de>
-
- * CYGWIN_LICENSE: Fix URL to world-wide offices.
-
-2007-07-06 Corinna Vinschen <corinna@vinschen.de>
-
- * CYGWIN_LICENSE: Fix URL to open source definition.
-
-2006-12-12 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (subauth): Drop rule.
- * configure.in: Remove subauth related check.
- * configure: Regenerate.
-
-2006-11-27 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in: Add dependencies for lsaauth.
- * configure.in: Disable building subauth. Add building lsaauth.
- * configure: Regenerate.
-
-2006-08-30 Christopher Faylor <cgf@timesys.com>
-
- * Makefile.in: Make install-license .PHONY. Make sure that doc
- directory is created before copying to it.
-
-2006-08-30 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in: Make installation of CYGWIN_LICENSE configurable.
- * aclocal.m4: Regenerate.
- * configure.in: Add GCC_NO_EXECUTABLES call. Add configuration for
- INSTALL_LICENSE. Make cygwin subdirectory optional. Add sanity
- check for cygwin resp. mingw subdirectories dependent of the target.
- * configure: Regenerate.
-
-2006-08-02 Christopher Faylor <cgf@timesys.com>
-
- * Makefile.in (subauth): Add dependency on mingw.
-
-2006-07-23 Christopher Faylor <cgf@timesys.com>
-
- * Makefile.in: Update copyright. Fix 'check' target so that it will
- once-again create a working testsuite directory. Add a comment this
- time to explain the unusual behavior.
-
-2006-07-14 Corinna Vinschen <corinna@vinschen.de>
-
- * configure.in: Reenable building the subauth subdir.
- * configure: Regenerate.
-
-2006-05-24 Christopher Faylor <cgf@timesys.com>
-
- * configure.in: Update to newer autoconf.
- (thanks to Steve Ellcey)
- * Makefile.in: Ditto.
- * configure: Regenerate.
- * acinclude.m4: New file.
- * aclocal.m4: Ditto.
-
-2006-01-29 Christopher Faylor <cgf@timesys.com>
-
- * CYGWIN_LICENSE: Restrict to v2.
- * COPYING: Add.
-
-2006-01-16 Corinna Vinschen <corinna@vinschen.de>
-
- * configure.in: Add AC_PROG_INSTALL handling.
- * configure: Regenerate.
- * Makefile.in (install): Install CYGWIN_LICENSE.
-
-2006-01-16 Corinna Vinschen <corinna@vinschen.de>
-
- * CYGWIN_LICENSE: Fix contact information.
-
-2005-10-11 Christopher Faylor <cgf@timesys.com>
-
- * Makefile.common (CFLAGS_COMMON): Add -Wstrict-aliasing.
-
-2005-03-22 Christopher Faylor <cgf@timesys.com>
-
- * Makefile.common: Add -dD to options when creating preprocess files.
-
-2003-11-23 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in: Make cygserver depending on cygwin.
-
-2003-11-20 Christopher Faylor <cgf@redhat.com>
-
- * configure.in: Make --use-server the default.
- * configure: Regenerate.
-
-2003-08-05 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.common: Hmm. Older compilers seem to need -nostdinc.
-
-2003-08-05 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.common: Don't use -nostdinc with g++.
-
-2003-07-25 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Only use localhost when building mingw with distcc or
- gcc won't be able to find .exp files on other hosts.
-
-2003-07-18 Vaclav Haisman <V.Haisman@sh.cvut.cz>
-
- * Makefile.common (CFLAGS_COMMON): Remove -march=i386.
-
-2003-07-01 Christopher Faylor <cgf@redhat.com>
-
- * configure.in: Add --enable-server option.
- * configure: Regenerate.
-
-2003-07-01 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.common (CFLAGS_COMMON): Remove -Winline since it is too
- noisy on newer versions of gcc.
-
-2003-07-01 Christopher Faylor <cgf@redhat.com>
-
- * configure.in: Add cygserver subdir.
- * Makefile.in: Ditto.
- * configure: Regenerate.
-
- * Makefile.common: Remove debugging statements.
-
-2003-05-12 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.common: Remove newlib_sys_include and
- newlib_sys_include_include entirely. Set CRT0 to cygwin/crt0.o.
-
-2003-04-18 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Reorganize to try to allow lack of mingw/w32api to work.
-
-2003-04-11 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.common (w32api_lib): Fix w32api detection.
-
-2003-03-28 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.common (ALL_CXXFLAGS): Make normal '=' type variable so that
- CXXFLAGS is properly interpreted.
-
-2003-03-17 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.common (w32api_lib): Default to system w32api directory if
- w32api is missing from source.
-
-2003-03-17 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.common: Fix typo from previous checkin.
-
-2003-03-17 Christopher Faylor <cgf@redhat.com>
-
- * configure.in: w32api directory was already optional. Semi-revert
- 2003-02-06 change.
- * configure: Regenerate.
- * Makefile.common: Don't specific -nostdinc if there is no w32api
- directory.
-
-2003-03-09 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.common: Avoid double slashes in GCC_INCLUDE.
-
-2003-02-12 Christopher Faylor <cgf@redhat.com>
-
- * MAINTAINERS: Remove out-of-date file.
-
-2003-02-06 Christopher Faylor <cgf@redhat.com>
-
- * configure.in: Make w32api directory optional.
- * configure: Regenerate.
-
-2003-01-22 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.common (MINGW_LDFLAGS): Add mingw/mingwex builddir.
-
-2002-12-21 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.common: Don't attempt to pretty-print c++ errors.
-
-2002-12-12 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.common: Define MINGW_LDFLAGS.
- * configure.in: Reorder SUBDIRS to have mingw before cygwin.
- * configure: Regenerate from configure.in.
-
-2002-09-27 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (check): Be more defensive when creating testsuite
- config.status.
-
-2002-08-16 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Change COMPILE_C* definitions.
-
-2002-08-10 Earnie Boyd <earnie@users.sf.net>
-
- * w32sdk: New winsup module.
-
-2002-07-06 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.common (MINGW_INCLUDES): Simplify.
- (MINGW_CFLAGS): New.
- (MINGW_CXXFLAGS): Ditto.
-
-2002-06-02 Christopher Faylor <cgf@redhat.com>
-
- * configure.in: Complain about lack of w32api directory.
- * configure: Regenerate.
-
-2002-04-25 Christopher Faylor <cgf@redhat.com>
-
- * configure.in: Remove cinstall target.
- * Makefile.in: Ditto.
- * configure: Regenerate.
-
-2002-02-19 Christopher Faylor <cgf@redhat.com>
-
- * configure.in: Avoid building w32api or mingw if they don't exist.
- * configure: Regenerate.
-
-2001-12-18 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Don't attempt to use zlib directory as a dependency if
- it doesn't exist.
-
-2001-12-14 Christopher Faylor <cgf@redhat.com>
-
- * configure.in: Detect zlib subdirectory.
- * configure: Regenerate
- * Makefile.in: Exit immediately if a sub-make fails.
- * Makefile.common: Add automatic rules for bz2lib and zlib.
-
-2001-11-04 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Force configure in testsuite directory if config.status
- does not exist.
-
-2001-11-03 Christopher Faylor <cgf@redhat.com>
-
- * configure.in: Disable subauth directory test.
- * configure: Regenerate.
- * Makefile.in: Use MAKE variable in directory builds.
-
-2001-11-03 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Add directory dependencies to ensure ordering when using
- 'make -jN'.
-
-2001-11-03 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.common: Remove preferred-stack-boundary setting since gcc
- 2.95.3 doesn't work well with it.
-
-2001-11-01 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.common: Add some stuff to common CFLAGS.
-
-2001-10-29 Egor Duda <deo@logos-m.ru>
-
- * Makefile.in: Propagate 'clean' to subdirs properly.
-
-2001-10-26 Corinna Vinschen <corinna@vinschen.de>
-
- * configure: Regenerate, removing erroneous SUBDIRS substitution.
-
-2001-10-24 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Only build testsuite directory on first 'make check'.
- * configure.in: Remove testsuite from SUBDIRS.
- * configure: Regenerate.
-
-2001-10-12 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Add -nostdinc to CXXFLAGS.
-
-2001-10-12 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.common: Perform more include file testing trickery.
-
-Sun Oct 7 23:08:46 2001 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.common: Avoid adding -I options to compile if they already
- exist in CC or C*FLAGS. This prevents warnings from newer versions of
- gcc.
-
-Tue May 15 01:09:56 2001 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.common: Change method for finding current directory.
-
-Sat May 5 00:14:03 2001 Christopher Faylor <cgf@cygnus.com>
-
- * configure.in: Fix typo.
- * configure: Regenerate.
-
-Fri May 4 11:24:53 2001 Christopher Faylor <cgf@cygnus.com>
-
- * configure.in: Make subauth configuration optional.
- * configure: Regenerate.
-
-Fri May 4 15:06:00 Corinna Vinschen <corinna@vinschen.de>
-
- * subauth: New subdirectory.
- * configure.in: Add subauth to the list of subdirectories.
- * configure: Regenerated from configure.in.
-
-Wed Apr 18 18:45:07 2001 Christopher Faylor <cgf@cygnus.com>
-
- * configure.in: Add bz2lib.
-
-2001-03-19 DJ Delorie <dj@redhat.com>
-
- * configure: fix regeneration bug.
-
-Thu Feb 22 13:36:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.common: Revert previous change.
-
-Wed Feb 21 22:41:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.common: Add `-fvtable-thunks' to COMPILE_CXX.
-
-Sun Dec 3 00:21:31 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.common: Eliminate checks for libgcc.a and libstdc++.a. Use
- CXX for g++ compiles.
- * configure.in: Find correct c++ compiler.
- * configure: Regenerate.
-
-Mon Oct 23 00:50:02 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.common (LIBGCC): Acommodate older gcc's that don't need
- libstdc++.a.
-
-Sat Oct 21 18:01:22 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.common (LIBGCC): Find libstdc++.a as well as libc.a since
- builtin functions are in this library in newer gcc's.
-
-Sun Oct 1 22:02:38 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.common: Extend VERBOSE default.
- * Makefile.in: Don't clean the testsuite separately. It's already part
- of CLEAN_SUBDIRS.
-
-2000-09-30 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.common: Default to VERBOSE when part of overall source
- tree build.
-
-2000-09-02 Egor Duda <deo@logos-m.ru>
-
- * Makefile.in: Add new goal "check"
- * configure.in: When doing native build do configure in
- testsuite subdirectory
- * configure: Regenerate.
-
-Fri Sep 1 10:15:37 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: More normalization.
-
-Thu Aug 31 16:37:31 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Normalize 'pwd' based on location of winsup.
-
-Thu Aug 24 15:02:26 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.common: Add bupdir2 to reference above the i686-pc-cygwin
- directory.
-
-Thu Jun 22 18:28:06 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Add dummy info targets.
-
-Tue Jun 20 13:36:23 2000 Christopher Faylor <cgf@cygnus.com>
-
- * configure.in: Bow to necessity and build w32api before anything else.
- * configure: Regenerate.
-
-Sat Jun 17 13:50:04 2000 Christopher Faylor <cgf@cygnus.com>
-
- * configure.in: Detect "cross-hosting" situation and add a subset of
- directories to SUBDIRS.
- * configure: Regenerate.
-
-Thu May 25 18:39:24 2000 Christopher Faylor <cgf@cygnus.com>
-
- * configure.in: Don't assume that cinstall directory exists.
- * configure: Regenerate
-
-2000-05-24 DJ Delorie <dj@cygnus.com>
-
- * Makefile.common (%.o): further simplify, add "..." to make it obvious
- it's an abbreviated command line.
-
-Thu May 18 14:33:05 2000 Christopher Faylor <cgf@cygnus.com>
-
- * MAINTAINERS: Add Corinna to general list.
-
-2000-04-17 DJ Delorie <dj@cygnus.com>
-
- * Makefile.common (srcdir): remove dependence on where pwd is
-
-Sun Apr 9 23:47:45 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.common: Resolve srcdir to absolute path or it will confuse
- usages when passed to submakes. Eliminate vestigal use of
- MAKEOVERRIDES.
-
-Sun Apr 9 02:06:49 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Work around MAKEOVERRIDES problem with older versions
- of make.
- * Makefile.common: Ditto.
-
-Fri Apr 7 17:04:02 Ron Parker <rdparker@sourceware.cygnus.com>
-
- * configure.in: Added cinstall to the list of subdirs.
- * configure: Regenerate.
-
-Thu Mar 30 23:45:00 2000 Christopher Faylor <cgf@cygnus.com>
-
- * MAINTAINERS: Add Ron Parker as maintainer of cinstall stuff.
-
-Sun Feb 6 18:15:44 2000 Christopher Faylor <cgf@cygnus.com>
-
- * configure.in: Do the standard CC/CFLAGS stuff for propagation to
- sub-configures.
- * configure: Regenerate.
-
-2000-01-26 DJ Delorie <dj@cygnus.com>
-
- * doc/Makefile.in: fix doctool -d options
-
-Fri Jan 21 12:51:32 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.common: No need to rerun Makefile if config.status changes.
- That should happen automatically.
- * Makefile.in: Ditto.
-
-Sat Jan 8 14:40:01 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.common: Remove cygwin DLL specific stuff. Make Makefile
- target PRECIOUS.
- * Makefile.in: Make Makefile target PRECIOUS.
-
-Fri Jan 7 21:00:49 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.common: Remove cygwin DLL specific stuff. Correctly deal
- with updir stuff when building in the same directory as the source.
-
-Thu Jan 6 19:04:35 2000 Christopher Faylor <cgf@cygnus.com>
-
- Create new directory structure
- * Makefile.in: New file.
- * configure.in: New file.
- * configure: New file.
- * Makefile.common: New file.
- * cygwin: New directory.
- * w32api: New directory.
diff --git a/winsup/Makefile.common b/winsup/Makefile.common
deleted file mode 100644
index 96e58ef..0000000
--- a/winsup/Makefile.common
+++ /dev/null
@@ -1,195 +0,0 @@
-# Makefile.common - common definitions for the winsup directory
-#
-# Copyright 2000, 2001, 2002, 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.
-
-# This makefile requires GNU make.
-
-CFLAGS_COMMON:=-Wall -Wstrict-aliasing -Wwrite-strings -fno-common -pipe -fbuiltin -fmessage-length=0# -finline-functions
-MALLOC_DEBUG:=#-DMALLOC_DEBUG -I/cygnus/src/uberbaum/winsup/cygwin/dlmalloc
-MALLOC_OBJ:=#/cygnus/src/uberbaum/winsup/cygwin/dlmalloc/malloc.o
-
-override srcdir:=${shell cd $(srcdir); pwd}
-ifneq (,${filter-out /%,$(srcdir)})
- updir:=$(srcdir)/..
- updir1:=$(updir)/..
-else
- updir:=${patsubst %:::,%,${patsubst %/:::,%,$(dir $(srcdir)):::}}
-ifneq (,${findstring /,$(updir)})
- updir1:=${patsubst %:::,%,${patsubst %/:::,%,$(dir $(updir)):::}}
-else
- updir1:=$(updir)/..
-endif
-endif
-
-pwd:=${shell pwd}
-ifneq "${filter winsup%,${notdir $(pwd)}}" ""
- here:=${pwd}/cygwin
-else
- here:=${dir $(pwd)}cygwin
-endif
-bupdir:=${shell cd $(here)/..; pwd}
-ifneq (,${filter-out /%,$(bupdir)})
- bupdir1:=../..
- bupdir2:=../../..
-else
-ifneq (,${findstring /,$(bupdir)})
- bupdir1:=${patsubst %:::,%,${patsubst %/:::,%,$(dir $(bupdir)):::}}
-else
- bupdir1:=$(bupdir)/..
-endif
-ifneq (,${findstring /,$(bupdir1)})
- bupdir2:=${patsubst %:::,%,${patsubst %/:::,%,$(dir $(bupdir1)):::}}
-else
- bupdir2:=$(bupdir1)/..
-endif
-endif
-
-zlib_source:=$(updir)/zlib
-zlib_build:=$(bupdir)/zlib
-bz2lib_source:=$(updir)/bz2lib
-bz2lib_build:=$(bupdir)/bz2lib
-w32api_source:=$(updir)/w32api
-w32api_build:=$(bupdir)/w32api
-w32api_lib:=$(w32api_build)/lib
-newlib_source:=$(updir1)/newlib
-newlib_build:=$(bupdir1)/newlib
-cygwin_build:=$(bupdir)/cygwin
-cygwin_source:=$(updir)/cygwin
-mingw_build:=$(bupdir)/mingw
-mingw_source:=$(updir)/mingw
-utils_build:=$(bupdir)/utils
-utils_source:=$(updir)/utils
-ifeq (,${findstring $(newlib_source)/libc/include,$(CFLAGS) $(CXXFLAGS) $(CXX) $(CC)})
-newlib_include:=-I$(newlib_source)/libc/include
-endif
-ifeq (,${findstring $(cygwin_source)/include,$(CFLAGS) $(CXXFLAGS) $(CXX) $(CC)})
-cygwin_include:=-I$(cygwin_source)/include
-endif
-
-# Try to determine what directories are available in winsup.
-# Attempt to properly detect missing mingw or w32api and adjust command
-# line parameters appropriately
-
-# nostdinc:=${shell [ -d "$(updir)/w32api" ] && echo "-nostdinc"}
-# ifneq (,$(nostdinc))
-nostdincxx:=-nostdinc++
-# ifeq (,${findstring $(w32api_source),$(CFLAGS) $(CXXFLAGS) $(CXX) $(CC)})
-w32api_include:=-I$(w32api_source)/include
-# endif
-# endif
-
-mingw_include:=${shell [ -d "$(mingw_source)/include" ] && echo "-I$(mingw_source)/include"}
-ifneq (,$(mingw_include))
-nostdlib:=-nostdlib
-else
-nostdlib:=
-endif
-
-ifeq (,${nostdlib})
-nostdinc:=
-endif
-
-INCLUDES:=-I. $(cygwin_include) -I$(cygwin_source) $(newlib_include) $(w32api_include)
-ifdef CONFIG_DIR
-INCLUDES+=-I$(CONFIG_DIR)
-endif
-
-MINGW_INCLUDES:=${mingw_include} $(w32api_include)
-MINGW_CFLAGS:=-mno-cygwin $(MINGW_INCLUDES)
-MINGW_CXXFLAGS:=${filter-out $(newlib_source)/%,$(CXXFLAGS)} -mno-cygwin $(MINGW_INCLUDES)
-MINGW_LDFLAGS:=-B${mingw_build} -B${mingw_build}/mingwex
-
-GCC_DEFAULT_OPTIONS:=$(CFLAGS_COMMON) $(CFLAGS_CONFIG) $(INCLUDES)
-
-# Link in libc and libm from newlib
-
-LIBC:=$(newlib_build)/libc/libc.a
-LIBM:=$(newlib_build)/libm/libm.a
-CRT0:=$(cygwin_build)/crt0.o
-
-ALL_CFLAGS:=$(DEFS) $(MALLOC_DEBUG) $(CFLAGS) $(GCC_DEFAULT_OPTIONS)
-ALL_CXXFLAGS=$(DEFS) $(MALLOC_DEBUG) $(CXXFLAGS) $(GCC_DEFAULT_OPTIONS)
-
-ifndef PREPROCESS
-c=-c
-o=.o
-else
-c=-E -dD
-o=.E
-endif
-
-libgcc:=${subst \,/,${shell $(CC_FOR_TARGET) -print-libgcc-file-name}}
-gcc_libdir:=${word 1,${dir $(libgcc)}}
-ifeq (,${findstring $(gcc_libdir),$(CFLAGS) $(CXXFLAGS) $(CXX) $(CC)})
-GCC_INCLUDE:=${subst //,/,-I$(gcc_libdir)/include}
-endif
-
-COMPILE_CXX=$(CXX) $c $(nostdincxx) $(nostdinc) $(ALL_CXXFLAGS) $(GCC_INCLUDE) \
- -fno-rtti -fno-exceptions
-COMPILE_CC=$(CC) $c $(nostdinc) $(ALL_CFLAGS) $(GCC_INCLUDE)
-
-vpath %.a $(cygwin_build):$(w32api_lib):$(newlib_build)/libc:$(newlib_build)/libm
-
-MAKEOVERRIDES_WORKAROUND=${wordlist 2,1,a b c}
-
-ifneq ($(MAKEOVERRIDES_WORKAROUND),)
- override MAKE:=$(MAKE) $(MAKEOVERRIDES)
- MAKEOVERRIDES:=
- export MAKEOVERRIDES
-endif
-
-ifdef RPATH_ENVVAR
-VERBOSE=1
-endif
-
-ifneq "${findstring -B,$(COMPILE_CXX) $(COMPILE_CC)}" ""
-VERBOSE=1
-endif
-
-.PRECIOUS: %.o
-
-%.o: %.cc
-ifdef VERBOSE
- $(COMPILE_CXX) -o $(@D)/$(*F)$o $<
-else
- @echo $(CXX) $c $(CXXFLAGS) ... $(*F).cc
- @$(COMPILE_CXX) -o $(@D)/$(*F)$o $<
-endif
-
-%.o: %.c
-ifdef VERBOSE
- $(COMPILE_CC) -o $(@D)/$(*F)$o $<
-else
- @echo $(CC) $c $(CFLAGS) ... $(*F).c
- @$(COMPILE_CC) -o $(@D)/$(*F)$o $<
-endif
-
-$(bupdir1)/libiberty/%.o: $(updir1)/libiberty/%.c
- @$(MAKE) -C $(@D) $(@F)
-
-$(w32api_lib)/%.a: $(w32api_lib)/Makefile
- @$(MAKE) --no-print-dir -C $(@D) $(@F)
-
-$(bz2lib)/%.a: $(bz2lib)/Makefile
- @$(MAKE) --no-print-dir -C $(@D) $(@F)
-
-$(zlib)/%.a: $(zlib)/Makefile
- @$(MAKE) --no-print-dir -C $(@D) $(@F)
-
-all:
-
-# For auto-rebuilding the Makefile
-
-.PRECIOUS: Makefile
-
-Makefile: Makefile.in $(srcdir)/configure.in config.status
- $(SHELL) config.status
-
-config.status: configure
- $(SHELL) config.status --recheck
diff --git a/winsup/Makefile.in b/winsup/Makefile.in
deleted file mode 100644
index a81229e..0000000
--- a/winsup/Makefile.in
+++ /dev/null
@@ -1,140 +0,0 @@
-# Makefile.in for windows stuff
-# Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2006,
-# 2007, 2008
-# 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.
-
-# This makefile requires GNU make.
-
-SHELL:=@SHELL@
-VPATH:=@srcdir@
-srcdir:=@srcdir@
-objdir:=.
-
-target_alias:=@target_alias@
-build_alias:=@build_alias@
-host_alias:=@host_alias@
-prefix:=@prefix@
-
-program_transform_name:=@program_transform_name@
-exec_prefix:=@exec_prefix@
-bindir:=@bindir@
-libdir:=@libdir@
-ifeq ($(target_alias),$(host_alias))
-ifeq ($(build_alias),$(host_alias))
-tooldir:=$(exec_prefix)
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-datadir:=@datadir@
-infodir:=@infodir@
-includedir:=@includedir@
-
-INSTALL:=@INSTALL@
-INSTALL_PROGRAM:=@INSTALL_PROGRAM@
-INSTALL_DATA:=@INSTALL_DATA@
-
-SUBDIRS=@subdirs@
-INSTALL_SUBDIRS=${patsubst %,install_%,$(SUBDIRS)}
-CLEAN_SUBDIRS=${patsubst %,clean_%,$(SUBDIRS)}
-ZLIB=${findstring zlib,$(SUBDIRS)}
-
-INSTALL_LICENSE:=@INSTALL_LICENSE@
-
-.PHONY: all install clean all-info info install-info install-license check \
- $(SUBDIRS) $(INSTALL_SUBDIRS) $(CLEAN_SUBDIRS)
-
-.SUFFIXES:
-
-MAKEOVERRIDES_WORKAROUND=${wordlist 2,1,a b c}
-
-ifneq ($(MAKEOVERRIDES_WORKAROUND),)
- override MAKE:=$(MAKE) $(MAKEOVERRIDES)
- MAKEOVERRIDES:=
- export MAKEOVERRIDES
-endif
-
-all: Makefile $(SUBDIRS)
-
-install-license: CYGWIN_LICENSE COPYING
- ${INSTALL} -d $(prefix)/share/doc/Cygwin
- for i in $^; do \
- ${INSTALL} $$i $(prefix)/share/doc/Cygwin ; \
- done
-
-install: Makefile $(INSTALL_LICENSE) $(INSTALL_SUBDIRS)
-
-clean: $(CLEAN_SUBDIRS)
-
-all-info:
-
-install-info:
-
-info:
-
-$(SUBDIRS):
- @if cd $@ 2>/dev/null; then \
- test "$@" = "mingw" && export DISTCC_HOSTS=localhost;\
- $(MAKE) all || exit 1; \
- fi || exit 0
-
-$(INSTALL_SUBDIRS):
- @if cd ${patsubst install_%,%,$@} 2>/dev/null; then \
- $(MAKE) install || exit 1; \
- fi || exit 0
-
-$(CLEAN_SUBDIRS):
- @if cd ${patsubst clean_%,%,$@} 2>/dev/null; then \
- $(MAKE) clean || exit 1; \
- fi || exit 0
-
-.PRECIOUS: Makefile
-
-Makefile: Makefile.in $(srcdir)/configure.in config.status
- $(SHELL) config.status
-
-config.status: configure
- $(SHELL) config.status --recheck
-
-# The below rule is intended to run configure only when "make check" is
-# actually specified, i.e., not in a cross-compilation environment. The
-# cygwin configuration is copied and modified to ensure that the same configuration
-# parameters are passed when the testsuite is configured as when cygwin was configured.
-check: cygwin
- @if [ -f testsuite/config.status ]; then \
- cd testsuite; \
- else \
- (mkdir testsuite 2>/dev/null || exit 0); \
- cd testsuite; \
- sed -e 's%winsup/cygwin\>%winsup/testsuite%g' ../cygwin/config.status > config.status; \
- chmod a+x config.status; \
- sh ./config.status --recheck; \
- sh ./config.status; \
- fi; \
- $(MAKE) check
-
-utils: cygwin mingw
-
-mingw: w32api
-
-cygwin: w32api
-
-cygserver: cygwin
-
-install_utils: cygwin mingw
-
-install_mingw: w32api
-
-install_cygwin: w32api
-
-install_cygserver: cygwin
-
-lsaauth: mingw cygwin
diff --git a/winsup/README b/winsup/README
deleted file mode 100644
index 290275c..0000000
--- a/winsup/README
+++ /dev/null
@@ -1,9 +0,0 @@
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-
-Cygwin documentation is available on the net at http://cygwin.com
-You might especially be interested in
-
-http://cygwin.com/faq/faq.programming.html#faq.programming.building-cygwin
-
diff --git a/winsup/acinclude.m4 b/winsup/acinclude.m4
deleted file mode 100644
index 4e2db07..0000000
--- a/winsup/acinclude.m4
+++ /dev/null
@@ -1,43 +0,0 @@
-dnl This provides configure definitions used by all the winsup
-dnl configure.in files.
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN([LIB_AC_PROG_CC_GNU],
-[AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc,
-[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
-cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi])])
-
-AC_DEFUN([LIB_AC_PROG_CC],
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_TOOL(CC, gcc, gcc)
-: ${CC:=gcc}
-AC_PROG_CC
-test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-])
-
-AC_DEFUN([LIB_AC_PROG_CXX],
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_TOOL(CXX, g++, g++)
-if test -z "$CXX"; then
- AC_CHECK_TOOL(CXX, g++, c++, , , )
- : ${CXX:=g++}
- AC_PROG_CXX
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-CXXFLAGS='$(CFLAGS)'
-])
diff --git a/winsup/aclocal.m4 b/winsup/aclocal.m4
deleted file mode 100644
index 86121a0..0000000
--- a/winsup/aclocal.m4
+++ /dev/null
@@ -1,76 +0,0 @@
-# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-# GCC_NO_EXECUTABLES
-# -----------------
-# FIXME: The GCC team has specific needs which the current Autoconf
-# framework cannot solve elegantly. This macro implements a dirty
-# hack until Autoconf is able to provide the services its users
-# need.
-#
-# Several of the support libraries that are often built with GCC can't
-# assume the tool-chain is already capable of linking a program: the
-# compiler often expects to be able to link with some of such
-# libraries.
-#
-# In several of these libraries, workarounds have been introduced to
-# avoid the AC_PROG_CC_WORKS test, that would just abort their
-# configuration. The introduction of AC_EXEEXT, enabled either by
-# libtool or by CVS autoconf, have just made matters worse.
-#
-# Unlike the previous AC_NO_EXECUTABLES, this test does not
-# disable link tests at autoconf time, but at configure time.
-# This allows AC_NO_EXECUTABLES to be invoked conditionally.
-AC_DEFUN_ONCE([GCC_NO_EXECUTABLES],
-[m4_divert_push([KILL])
-
-AC_BEFORE([$0], [_AC_COMPILER_EXEEXT])
-AC_BEFORE([$0], [AC_LINK_IFELSE])
-
-m4_define([_AC_COMPILER_EXEEXT],
-AC_LANG_CONFTEST([AC_LANG_PROGRAM()])
-# FIXME: Cleanup?
-AS_IF([AC_TRY_EVAL(ac_link)], [gcc_no_link=no], [gcc_no_link=yes])
-if test x$gcc_no_link = xyes; then
- # Setting cross_compile will disable run tests; it will
- # also disable AC_CHECK_FILE but that's generally
- # correct if we can't link.
- cross_compiling=yes
- EXEEXT=
-else
- m4_defn([_AC_COMPILER_EXEEXT])dnl
-fi
-)
-
-m4_define([AC_LINK_IFELSE],
-if test x$gcc_no_link = xyes; then
- AC_MSG_ERROR([Link tests are not allowed after [[$0]].])
-fi
-m4_defn([AC_LINK_IFELSE]))
-
-dnl This is a shame. We have to provide a default for some link tests,
-dnl similar to the default for run tests.
-m4_define([AC_FUNC_MMAP],
-if test x$gcc_no_link = xyes; then
- if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
- ac_cv_func_mmap_fixed_mapped=no
- fi
-fi
-if test "x${ac_cv_func_mmap_fixed_mapped}" != xno; then
- m4_defn([AC_FUNC_MMAP])
-fi)
-
-m4_divert_pop()dnl
-])# GCC_NO_EXECUTABLES
-
-m4_include([acinclude.m4])
diff --git a/winsup/configure b/winsup/configure
deleted file mode 100755
index 784280f..0000000
--- a/winsup/configure
+++ /dev/null
@@ -1,4847 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61.
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-as_nl='
-'
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-if test "x$CONFIG_SHELL" = x; then
- if (eval ":") 2>/dev/null; then
- as_have_required=yes
-else
- as_have_required=no
-fi
-
- if test $as_have_required = yes && (eval ":
-(as_func_return () {
- (exit \$1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
- :
-else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0) || { (exit 1); exit 1; }
-
-(
- as_lineno_1=\$LINENO
- as_lineno_2=\$LINENO
- test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
- test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
-") 2> /dev/null; then
- :
-else
- as_candidate_shells=
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- case $as_dir in
- /*)
- for as_base in sh bash ksh sh5; do
- as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
- done;;
- esac
-done
-IFS=$as_save_IFS
-
-
- for as_shell in $as_candidate_shells $SHELL; do
- # Try only shells that exist, to save several forks.
- if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { ("$as_shell") 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-_ASEOF
-}; then
- CONFIG_SHELL=$as_shell
- as_have_required=yes
- if { "$as_shell" 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-(as_func_return () {
- (exit $1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = "$1" ); then
- :
-else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test $exitcode = 0) || { (exit 1); exit 1; }
-
-(
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
-
-_ASEOF
-}; then
- break
-fi
-
-fi
-
- done
-
- if test "x$CONFIG_SHELL" != x; then
- for as_var in BASH_ENV ENV
- do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- done
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
-
- if test $as_have_required = no; then
- echo This script requires a shell more modern than all the
- echo shells that I found on your system. Please install a
- echo modern shell, or manually run the script under such a
- echo shell if you do have one.
- { (exit 1); exit 1; }
-fi
-
-
-fi
-
-fi
-
-
-
-(eval "as_func_return () {
- (exit \$1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
- :
-else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0") || {
- echo No shell found that supports shell functions.
- echo Please tell autoconf@gnu.org about your system,
- echo including any error possibly output before this
- echo message
-}
-
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line after each line using $LINENO; the second 'sed'
- # does the real work. The second script uses 'N' to pair each
- # line-number line with the line containing $LINENO, and appends
- # trailing '-' during substitution so that $LINENO is not a special
- # case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # scripts with optimization help from Paolo Bonzini. Blame Lee
- # E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
- case `echo 'x\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- *) ECHO_C='\c';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-exec 7<&0 </dev/null 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-
-ac_unique_file="Makefile.in"
-ac_subst_vars='SHELL
-PATH_SEPARATOR
-PACKAGE_NAME
-PACKAGE_TARNAME
-PACKAGE_VERSION
-PACKAGE_STRING
-PACKAGE_BUGREPORT
-exec_prefix
-prefix
-program_transform_name
-bindir
-sbindir
-libexecdir
-datarootdir
-datadir
-sysconfdir
-sharedstatedir
-localstatedir
-includedir
-oldincludedir
-docdir
-infodir
-htmldir
-dvidir
-pdfdir
-psdir
-libdir
-localedir
-mandir
-DEFS
-ECHO_C
-ECHO_N
-ECHO_T
-LIBS
-build_alias
-host_alias
-target_alias
-INSTALL_PROGRAM
-INSTALL_SCRIPT
-INSTALL_DATA
-build
-build_cpu
-build_vendor
-build_os
-host
-host_cpu
-host_vendor
-host_os
-target
-target_cpu
-target_vendor
-target_os
-CC
-CFLAGS
-LDFLAGS
-CPPFLAGS
-ac_ct_CC
-EXEEXT
-OBJEXT
-CXX
-CXXFLAGS
-ac_ct_CXX
-subdirs
-INSTALL_LICENSE
-SET_MAKE
-LIBOBJS
-LTLIBOBJS'
-ac_subst_files=''
- ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-CXX
-CXXFLAGS
-CCC'
-ac_subdirs_all='cygwin
-mingw
-w32api
-lsaauth
-cygserver
-utils doc'
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval $ac_prev=\$ac_option
- ac_prev=
- continue
- fi
-
- case $ac_option in
- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *) ac_optarg=yes ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_dashdash$ac_option in
- --)
- ac_dashdash=yes ;;
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=*)
- datadir=$ac_optarg ;;
-
- -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
- | --dataroo | --dataro | --datar)
- ac_prev=datarootdir ;;
- -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
- | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
- datarootdir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
- eval enable_$ac_feature=no ;;
-
- -docdir | --docdir | --docdi | --doc | --do)
- ac_prev=docdir ;;
- -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
- docdir=$ac_optarg ;;
-
- -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
- ac_prev=dvidir ;;
- -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
- dvidir=$ac_optarg ;;
-
- -enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
- eval enable_$ac_feature=\$ac_optarg ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
- ac_prev=htmldir ;;
- -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
- | --ht=*)
- htmldir=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir=$ac_optarg ;;
-
- -localedir | --localedir | --localedi | --localed | --locale)
- ac_prev=localedir ;;
- -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
- localedir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst | --locals)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
- localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name=$ac_optarg ;;
-
- -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
- ac_prev=pdfdir ;;
- -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
- pdfdir=$ac_optarg ;;
-
- -psdir | --psdir | --psdi | --psd | --ps)
- ac_prev=psdir ;;
- -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
- psdir=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
- eval with_$ac_package=\$ac_optarg ;;
-
- -without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
- eval with_$ac_package=no ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries=$ac_optarg ;;
-
- -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- eval $ac_envvar=\$ac_optarg
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-# Be sure to have absolute directory names.
-for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
- datadir sysconfdir sharedstatedir localstatedir includedir \
- oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
-do
- eval ac_val=\$$ac_var
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) continue;;
- NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
- esac
- { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; }
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- { echo "$as_me: error: Working directory cannot be determined" >&2
- { (exit 1); exit 1; }; }
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- { echo "$as_me: error: pwd does not report name of working directory" >&2
- { (exit 1); exit 1; }; }
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then the parent directory.
- ac_confdir=`$as_dirname -- "$0" ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$0" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r "$srcdir/$ac_unique_file"; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
- test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
- { (exit 1); exit 1; }; }
- pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
- srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
- eval ac_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_env_${ac_var}_value=\$${ac_var}
- eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
- --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- --infodir=DIR info documentation [DATAROOTDIR/info]
- --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
- --mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
- --htmldir=DIR html documentation [DOCDIR]
- --dvidir=DIR dvi documentation [DOCDIR]
- --pdfdir=DIR pdf documentation [DOCDIR]
- --psdir=DIR ps documentation [DOCDIR]
-_ACEOF
-
- cat <<\_ACEOF
-
-System types:
- --build=BUILD configure for building on BUILD [guessed]
- --host=HOST cross-compile to build programs to run on HOST [BUILD]
- --target=TARGET configure for building compilers for TARGET [HOST]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-
- cat <<\_ACEOF
-
-Optional Features:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-server Build a cygwin DLL which can communicate with cygserver
-
-Some influential environment variables:
- CC C compiler command
- CFLAGS C compiler flags
- LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
- nonstandard directory <lib dir>
- LIBS libraries to pass to the linker, e.g. -l<library>
- CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
- you have headers in a nonstandard directory <include dir>
- CXX C++ compiler command
- CXXFLAGS C++ compiler flags
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d "$ac_dir" || continue
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
- cd "$ac_dir" || { ac_status=$?; continue; }
- # Check for guested configure.
- if test -f "$ac_srcdir/configure.gnu"; then
- echo &&
- $SHELL "$ac_srcdir/configure.gnu" --help=recursive
- elif test -f "$ac_srcdir/configure"; then
- echo &&
- $SHELL "$ac_srcdir/configure" --help=recursive
- else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi || ac_status=$?
- cd "$ac_pwd" || { ac_status=$?; break; }
- done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
- cat <<\_ACEOF
-configure
-generated by GNU Autoconf 2.61
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit
-fi
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by $as_me, which was
-generated by GNU Autoconf 2.61. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- echo "PATH: $as_dir"
-done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *\'*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- ac_configure_args="$ac_configure_args '$ac_arg'"
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-(
- for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- *) $as_unset $ac_var ;;
- esac ;;
- esac
- done
- (set) 2>&1 |
- case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- sed -n \
- "s/'\''/'\''\\\\'\'''\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
- ;; #(
- *)
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-)
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------------- ##
-## File substitutions. ##
-## ------------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- cat confdefs.h
- echo
- fi
- test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core core.conftest.* &&
- rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -n "$CONFIG_SITE"; then
- set x "$CONFIG_SITE"
-elif test "x$prefix" != xNONE; then
- set x "$prefix/share/config.site" "$prefix/etc/config.site"
-else
- set x "$ac_default_prefix/share/config.site" \
- "$ac_default_prefix/etc/config.site"
-fi
-shift
-for ac_site_file
-do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . "$cache_file";;
- *) . "./$cache_file";;
- esac
- fi
-else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val=\$ac_cv_env_${ac_var}_value
- eval ac_new_val=\$ac_env_${ac_var}_value
- case $ac_old_set,$ac_new_set in
- set,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-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
- elif test -f "$ac_dir/shtool"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
-echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- done
- done
- ;;
-esac
-done
-IFS=$as_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. Don't cache a
- # value for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the value is a relative name.
- INSTALL=$ac_install_sh
- fi
-fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
- { (exit 1); exit 1; }; }
-
-{ echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
-if test "${ac_cv_build+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-echo "$as_me: error: invalid value of canonical build" >&2;}
- { (exit 1); exit 1; }; };;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
-if test "${ac_cv_host+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "x$host_alias" = x; then
- ac_cv_host=$ac_cv_build
-else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-echo "$as_me: error: invalid value of canonical host" >&2;}
- { (exit 1); exit 1; }; };;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-{ echo "$as_me:$LINENO: checking target system type" >&5
-echo $ECHO_N "checking target system type... $ECHO_C" >&6; }
-if test "${ac_cv_target+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "x$target_alias" = x; then
- ac_cv_target=$ac_cv_host
-else
- ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
- { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-echo "${ECHO_T}$ac_cv_target" >&6; }
-case $ac_cv_target in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
-echo "$as_me: error: invalid value of canonical target" >&2;}
- { (exit 1); exit 1; }; };;
-esac
-target=$ac_cv_target
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_target
-shift
-target_cpu=$1
-target_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-target_os=$*
-IFS=$ac_save_IFS
-case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
- if test "x$ac_ct_CC" = x; then
- CC="gcc"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-else
- CC="$ac_cv_prog_CC"
-fi
-
-: ${CC:=gcc}
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-else
- CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
- 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 "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
- fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl.exe
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl.exe
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
- test -n "$ac_ct_CC" && break
-done
-
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-fi
-
-fi
-
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO: checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compiler --version >&5") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compiler -v >&5") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compiler -V >&5") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-# FIXME: Cleanup?
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- gcc_no_link=no
-else
- gcc_no_link=yes
-fi
-
-if test x$gcc_no_link = xyes; then
- # Setting cross_compile will disable run tests; it will
- # also disable AC_CHECK_FILE but that's generally
- # correct if we can't link.
- cross_compiling=yes
- EXEEXT=
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-#
-# List of possible output files, starting from the most likely.
-# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
-# only as a last resort. b.out is created by i960 compilers.
-ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
-#
-# The IRIX 6 linker writes into existing files which may not be
-# executable, retaining their permissions. Remove them first so a
-# subsequent execution test works.
-ac_rmfiles=
-for ac_file in $ac_files
-do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
- * ) ac_rmfiles="$ac_rmfiles $ac_file";;
- esac
-done
-rm -f $ac_rmfiles
-
-if { (ac_try="$ac_link_default"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link_default") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile. We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
- then :; else
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- fi
- # We set ac_cv_exeext here because the later test for it is not
- # safe: cross compilers may not add the suffix if given an `-o'
- # argument, so we may need to know it at that point already.
- # Even if this section looks crufty: it has the advantage of
- # actually working.
- break;;
- * )
- break;;
- esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-else
- ac_file=''
-fi
-
-{ echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6; }
-if test -z "$ac_file"; then
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
-fi
-{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
-{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6; }
-
-{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- break;;
- * ) break;;
- esac
-done
-else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-fi
-{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
-if test "${ac_cv_objext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- for ac_file in conftest.o conftest.obj conftest.*; do
- test -f "$ac_file" || continue;
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_compiler_gnu=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_save_c_werror_flag=$ac_c_werror_flag
- ac_c_werror_flag=yes
- ac_cv_prog_cc_g=no
- CFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_cc_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- CFLAGS=""
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_c_werror_flag=$ac_save_c_werror_flag
- CFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_cc_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_cc_c89=$ac_arg
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6; } ;;
- xno)
- { echo "$as_me:$LINENO: result: unsupported" >&5
-echo "${ECHO_T}unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5
-echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
- { (exit 1); exit 1; }; }
-
-if test -n "$ac_tool_prefix"; then
- # 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 "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CXX="${ac_tool_prefix}g++"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
- { echo "$as_me:$LINENO: result: $CXX" >&5
-echo "${ECHO_T}$CXX" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CXX"; then
- ac_ct_CXX=$CXX
- # Extract the first word of "g++", so it can be a program name with args.
-set dummy g++; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CXX"; then
- ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CXX="g++"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
- { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-echo "${ECHO_T}$ac_ct_CXX" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
- if test "x$ac_ct_CXX" = x; then
- CXX="g++"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- CXX=$ac_ct_CXX
- fi
-else
- CXX="$ac_cv_prog_CXX"
-fi
-
-if test -z "$CXX"; then
- if test -n "$ac_tool_prefix"; then
- # 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 "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CXX="${ac_tool_prefix}g++"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
- { echo "$as_me:$LINENO: result: $CXX" >&5
-echo "${ECHO_T}$CXX" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CXX"; then
- ac_ct_CXX=$CXX
- # Extract the first word of "g++", so it can be a program name with args.
-set dummy g++; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CXX"; then
- ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CXX="g++"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
- { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-echo "${ECHO_T}$ac_ct_CXX" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
- if test "x$ac_ct_CXX" = x; then
- CXX="c++"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- CXX=$ac_ct_CXX
- fi
-else
- CXX="$ac_cv_prog_CXX"
-fi
-
- : ${CXX:=g++}
- ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -z "$CXX"; then
- if test -n "$CCC"; then
- CXX=$CCC
- else
- if test -n "$ac_tool_prefix"; then
- for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
- { echo "$as_me:$LINENO: result: $CXX" >&5
-echo "${ECHO_T}$CXX" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
- test -n "$CXX" && break
- done
-fi
-if test -z "$CXX"; then
- ac_ct_CXX=$CXX
- for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CXX"; then
- ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CXX="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
- { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-echo "${ECHO_T}$ac_ct_CXX" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
- test -n "$ac_ct_CXX" && break
-done
-
- if test "x$ac_ct_CXX" = x; then
- CXX="g++"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- CXX=$ac_ct_CXX
- fi
-fi
-
- fi
-fi
-# Provide some information about the compiler.
-echo "$as_me:$LINENO: checking for C++ compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compiler --version >&5") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compiler -v >&5") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compiler -V >&5") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_compiler_gnu=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; }
-GXX=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
-echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_save_cxx_werror_flag=$ac_cxx_werror_flag
- ac_cxx_werror_flag=yes
- ac_cv_prog_cxx_g=no
- CXXFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_cxx_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- CXXFLAGS=""
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
- CXXFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_cxx_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; }
-if test "$ac_test_CXXFLAGS" = set; then
- CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
- if test "$GXX" = yes; then
- CXXFLAGS="-g -O2"
- else
- CXXFLAGS="-g"
- fi
-else
- if test "$GXX" = yes; then
- CXXFLAGS="-O2"
- else
- CXXFLAGS=
- fi
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
- test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5
-echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-CXXFLAGS='$(CFLAGS)'
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-use_cygserver='yes'
-# Check whether --enable-server was given.
-if test "${enable_server+set}" = set; then
- enableval=$enable_server; case "${enableval}" in
-yes) ;;
-no) use_cygserver=;;
-esac
-
-fi
-
-
-INSTALL_LICENSE=
-
-case "$target" in
- *cygwin*)
- if ! test -d $srcdir/cygwin; then
- { { echo "$as_me:$LINENO: error: \"No cygwin dir. Can't build Cygwin. Exiting...\"" >&5
-echo "$as_me: error: \"No cygwin dir. Can't build Cygwin. Exiting...\"" >&2;}
- { (exit 1); exit 1; }; }
- fi
- subdirs="$subdirs cygwin"
-
- INSTALL_LICENSE="install-license"
- ;;
- *mingw*)
- if ! test -d $srcdir/mingw; then
- { { echo "$as_me:$LINENO: error: \"No mingw dir. Can't build Mingw. Exiting...\"" >&5
-echo "$as_me: error: \"No mingw dir. Can't build Mingw. Exiting...\"" >&2;}
- { (exit 1); exit 1; }; }
- fi
- ;;
-esac
-
-if test -d $srcdir/mingw; then
- subdirs="$subdirs mingw"
-
-fi
-subdirs="$subdirs w32api"
-
-
-case "$with_cross_host" in
- ""|*cygwin*)
- # if test -d $srcdir/bz2lib; then
- # AC_CONFIG_SUBDIRS(bz2lib)
- # fi
- # if test -d $srcdir/zlib; then
- # AC_CONFIG_SUBDIRS(zlib)
- # fi
- if test -d $srcdir/lsaauth; then
- subdirs="$subdirs lsaauth"
-
- fi
- if test -n "$use_cygserver" -a -d $srcdir/cygserver; then
- subdirs="$subdirs cygserver"
-
- fi
- subdirs="$subdirs utils doc"
-
- ;;
-esac
-
-
-
-{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
-set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
- @echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
- *@@@%%%=?*=@@@%%%*)
- eval ac_cv_prog_make_${ac_make}_set=yes;;
- *)
- eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
- SET_MAKE=
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-ac_config_files="$ac_config_files Makefile"
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
- for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- *) $as_unset $ac_var ;;
- esac ;;
- esac
- done
-
- (set) 2>&1 |
- case $as_nl`(ac_space=' '; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;; #(
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-) |
- sed '
- /^ac_cv_env_/b end
- t clear
- :clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
- if test -w "$cache_file"; then
- test "x$cache_file" != "x/dev/null" &&
- { echo "$as_me:$LINENO: updating cache $cache_file" >&5
-echo "$as_me: updating cache $cache_file" >&6;}
- cat confcache >$cache_file
- else
- { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-echo "$as_me: not updating unwritable cache $cache_file" >&6;}
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then branch to the quote section. Otherwise,
-# look for a macro that doesn't take arguments.
-ac_script='
-t clear
-:clear
-s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
-t quote
-s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
-t quote
-b any
-:quote
-s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
-s/\[/\\&/g
-s/\]/\\&/g
-s/\$/$$/g
-H
-:any
-${
- g
- s/^\n//
- s/\n/ /g
- p
-}
-'
-DEFS=`sed -n "$ac_script" confdefs.h`
-
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`echo "$ac_i" | sed "$ac_script"`
- # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
- # will be set to the directory where LIBOBJS objects are built.
- ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-as_nl='
-'
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line after each line using $LINENO; the second 'sed'
- # does the real work. The second script uses 'N' to pair each
- # line-number line with the line containing $LINENO, and appends
- # trailing '-' during substitution so that $LINENO is not a special
- # case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # scripts with optimization help from Paolo Bonzini. Blame Lee
- # E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
- case `echo 'x\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- *) ECHO_C='\c';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-
-# Save the log message, to keep $[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.61. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-# Files that config.status was made for.
-config_files="$ac_config_files"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number and configuration settings, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
-
-Configuration files:
-$config_files
-
-Report bugs to <bug-autoconf@gnu.org>."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.61,
- with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2006 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=*)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- *)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- esac
-
- case $ac_option in
- # Handling of the options.
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- echo "$ac_cs_version"; exit ;;
- --debug | --debu | --deb | --de | --d | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- ac_need_defaults=false;;
- --he | --h | --help | --hel | -h )
- echo "$ac_cs_usage"; exit ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1"
- ac_need_defaults=false ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-if \$ac_cs_recheck; then
- echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- CONFIG_SHELL=$SHELL
- export CONFIG_SHELL
- exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
- echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
- case $ac_config_target in
- "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
- tmp=
- trap 'exit_status=$?
- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./conf$$-$RANDOM
- (umask 077 && mkdir "$tmp")
-} ||
-{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-#
-# Set up the sed scripts for CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "$CONFIG_FILES"; then
-
-_ACEOF
-
-
-
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
- cat >conf$$subs.sed <<_ACEOF
-SHELL!$SHELL$ac_delim
-PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
-PACKAGE_NAME!$PACKAGE_NAME$ac_delim
-PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
-PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
-PACKAGE_STRING!$PACKAGE_STRING$ac_delim
-PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
-exec_prefix!$exec_prefix$ac_delim
-prefix!$prefix$ac_delim
-program_transform_name!$program_transform_name$ac_delim
-bindir!$bindir$ac_delim
-sbindir!$sbindir$ac_delim
-libexecdir!$libexecdir$ac_delim
-datarootdir!$datarootdir$ac_delim
-datadir!$datadir$ac_delim
-sysconfdir!$sysconfdir$ac_delim
-sharedstatedir!$sharedstatedir$ac_delim
-localstatedir!$localstatedir$ac_delim
-includedir!$includedir$ac_delim
-oldincludedir!$oldincludedir$ac_delim
-docdir!$docdir$ac_delim
-infodir!$infodir$ac_delim
-htmldir!$htmldir$ac_delim
-dvidir!$dvidir$ac_delim
-pdfdir!$pdfdir$ac_delim
-psdir!$psdir$ac_delim
-libdir!$libdir$ac_delim
-localedir!$localedir$ac_delim
-mandir!$mandir$ac_delim
-DEFS!$DEFS$ac_delim
-ECHO_C!$ECHO_C$ac_delim
-ECHO_N!$ECHO_N$ac_delim
-ECHO_T!$ECHO_T$ac_delim
-LIBS!$LIBS$ac_delim
-build_alias!$build_alias$ac_delim
-host_alias!$host_alias$ac_delim
-target_alias!$target_alias$ac_delim
-INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
-INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
-INSTALL_DATA!$INSTALL_DATA$ac_delim
-build!$build$ac_delim
-build_cpu!$build_cpu$ac_delim
-build_vendor!$build_vendor$ac_delim
-build_os!$build_os$ac_delim
-host!$host$ac_delim
-host_cpu!$host_cpu$ac_delim
-host_vendor!$host_vendor$ac_delim
-host_os!$host_os$ac_delim
-target!$target$ac_delim
-target_cpu!$target_cpu$ac_delim
-target_vendor!$target_vendor$ac_delim
-target_os!$target_os$ac_delim
-CC!$CC$ac_delim
-CFLAGS!$CFLAGS$ac_delim
-LDFLAGS!$LDFLAGS$ac_delim
-CPPFLAGS!$CPPFLAGS$ac_delim
-ac_ct_CC!$ac_ct_CC$ac_delim
-EXEEXT!$EXEEXT$ac_delim
-OBJEXT!$OBJEXT$ac_delim
-CXX!$CXX$ac_delim
-CXXFLAGS!$CXXFLAGS$ac_delim
-ac_ct_CXX!$ac_ct_CXX$ac_delim
-subdirs!$subdirs$ac_delim
-INSTALL_LICENSE!$INSTALL_LICENSE$ac_delim
-SET_MAKE!$SET_MAKE$ac_delim
-LIBOBJS!$LIBOBJS$ac_delim
-LTLIBOBJS!$LTLIBOBJS$ac_delim
-_ACEOF
-
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 67; then
- break
- elif $ac_last_try; then
- { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-
-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
-if test -n "$ac_eof"; then
- ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
- ac_eof=`expr $ac_eof + 1`
-fi
-
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
-_ACEOF
-sed '
-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
-s/^/s,@/; s/!/@,|#_!!_#|/
-:n
-t n
-s/'"$ac_delim"'$/,g/; t
-s/$/\\/; p
-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
-' >>$CONFIG_STATUS <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-:end
-s/|#_!!_#|//g
-CEOF$ac_eof
-_ACEOF
-
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[ ]*\):*/\1/
-s/:*$//
-s/^[^=]*=[ ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-fi # test -n "$CONFIG_FILES"
-
-
-for ac_tag in :F $CONFIG_FILES
-do
- case $ac_tag in
- :[FHLC]) ac_mode=$ac_tag; continue;;
- esac
- case $ac_mode$ac_tag in
- :[FHL]*:*);;
- :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
-echo "$as_me: error: Invalid tag $ac_tag." >&2;}
- { (exit 1); exit 1; }; };;
- :[FH]-) ac_tag=-:-;;
- :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
- esac
- ac_save_IFS=$IFS
- IFS=:
- set x $ac_tag
- IFS=$ac_save_IFS
- shift
- ac_file=$1
- shift
-
- case $ac_mode in
- :L) ac_source=$1;;
- :[FH])
- ac_file_inputs=
- for ac_f
- do
- case $ac_f in
- -) ac_f="$tmp/stdin";;
- *) # Look for the file first in the build tree, then in the source tree
- # (if the path is not absolute). The absolute path cannot be DOS-style,
- # because $ac_f cannot contain `:'.
- test -f "$ac_f" ||
- case $ac_f in
- [\\/$]*) false;;
- *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
- esac ||
- { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-echo "$as_me: error: cannot find input file: $ac_f" >&2;}
- { (exit 1); exit 1; }; };;
- esac
- ac_file_inputs="$ac_file_inputs $ac_f"
- done
-
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- configure_input="Generated from "`IFS=:
- echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
- if test x"$ac_file" != x-; then
- configure_input="$ac_file. $configure_input"
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- fi
-
- case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin";;
- esac
- ;;
- esac
-
- ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- { as_dir="$ac_dir"
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
- { (exit 1); exit 1; }; }; }
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
- case $ac_mode in
- :F)
- #
- # CONFIG_FILE
- #
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
- esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-
-case `sed -n '/datarootdir/ {
- p
- q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p
-' $ac_file_inputs` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- ac_datarootdir_hack='
- s&@datadir@&$datadir&g
- s&@docdir@&$docdir&g
- s&@infodir@&$infodir&g
- s&@localedir@&$localedir&g
- s&@mandir@&$mandir&g
- s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s&@configure_input@&$configure_input&;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-$ac_datarootdir_hack
-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
- { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&5
-echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&2;}
-
- rm -f "$tmp/stdin"
- case $ac_file in
- -) cat "$tmp/out"; rm -f "$tmp/out";;
- *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
- esac
- ;;
-
-
-
- esac
-
-done # for ac_tag
-
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || { (exit 1); exit 1; }
-fi
-
-#
-# CONFIG_SUBDIRS section.
-#
-if test "$no_recursion" != yes; then
-
- # Remove --cache-file and --srcdir arguments so they do not pile up.
- ac_sub_configure_args=
- ac_prev=
- eval "set x $ac_configure_args"
- shift
- for ac_arg
- do
- if test -n "$ac_prev"; then
- ac_prev=
- continue
- fi
- case $ac_arg in
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
- | --c=*)
- ;;
- --config-cache | -C)
- ;;
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- ;;
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- ;;
- *)
- case $ac_arg in
- *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
- esac
- done
-
- # Always prepend --prefix to ensure using the same prefix
- # in subdir configurations.
- ac_arg="--prefix=$prefix"
- case $ac_arg in
- *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
-
- # Pass --silent
- if test "$silent" = yes; then
- ac_sub_configure_args="--silent $ac_sub_configure_args"
- fi
-
- ac_popdir=`pwd`
- for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
-
- # Do not complain, so a configure script can configure whichever
- # parts of a large source tree are present.
- test -d "$srcdir/$ac_dir" || continue
-
- ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
- echo "$as_me:$LINENO: $ac_msg" >&5
- echo "$ac_msg" >&6
- { as_dir="$ac_dir"
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
- { (exit 1); exit 1; }; }; }
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
- cd "$ac_dir"
-
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f "$ac_srcdir/configure.gnu"; then
- ac_sub_configure=$ac_srcdir/configure.gnu
- elif test -f "$ac_srcdir/configure"; then
- ac_sub_configure=$ac_srcdir/configure
- elif test -f "$ac_srcdir/configure.in"; then
- # This should be Cygnus configure.
- ac_sub_configure=$ac_aux_dir/configure
- else
- { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
-echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
- ac_sub_configure=
- fi
-
- # The recursion is here.
- if test -n "$ac_sub_configure"; then
- # Make the cache file name correct relative to the subdirectory.
- case $cache_file in
- [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
- *) # Relative name.
- ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
- esac
-
- { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
-echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
- # The eval makes quoting arguments work.
- eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
- --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
- { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
-echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
- { (exit 1); exit 1; }; }
- fi
-
- cd "$ac_popdir"
- done
-fi
-
diff --git a/winsup/configure.in b/winsup/configure.in
deleted file mode 100755
index 62a27d9..0000000
--- a/winsup/configure.in
+++ /dev/null
@@ -1,80 +0,0 @@
-dnl Autoconf configure script for Cygwin.
-dnl Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 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.59)dnl
-AC_INIT(Makefile.in)
-
-INSTALL=`cd $srcdir/..; echo $(pwd)/install-sh -c`
-
-AC_PROG_INSTALL
-AC_CANONICAL_SYSTEM
-
-GCC_NO_EXECUTABLES
-
-LIB_AC_PROG_CC
-LIB_AC_PROG_CXX
-
-AC_LANG_C
-
-use_cygserver='yes'
-AC_ARG_ENABLE(server,
-[ --enable-server Build a cygwin DLL which can communicate with cygserver],
-[case "${enableval}" in
-yes) ;;
-no) use_cygserver=;;
-esac
-])
-
-INSTALL_LICENSE=
-
-case "$target" in
- *cygwin*)
- if ! test -d $srcdir/cygwin; then
- AC_MSG_ERROR("No cygwin dir. Can't build Cygwin. Exiting...")
- fi
- AC_CONFIG_SUBDIRS(cygwin)
- INSTALL_LICENSE="install-license"
- ;;
- *mingw*)
- if ! test -d $srcdir/mingw; then
- AC_MSG_ERROR("No mingw dir. Can't build Mingw. Exiting...")
- fi
- ;;
-esac
-
-if test -d $srcdir/mingw; then
- AC_CONFIG_SUBDIRS(mingw)
-fi
-AC_CONFIG_SUBDIRS(w32api)
-
-case "$with_cross_host" in
- ""|*cygwin*)
- # if test -d $srcdir/bz2lib; then
- # AC_CONFIG_SUBDIRS(bz2lib)
- # fi
- # if test -d $srcdir/zlib; then
- # AC_CONFIG_SUBDIRS(zlib)
- # fi
- if test -d $srcdir/lsaauth; then
- AC_CONFIG_SUBDIRS(lsaauth)
- fi
- if test -n "$use_cygserver" -a -d $srcdir/cygserver; then
- AC_CONFIG_SUBDIRS(cygserver)
- fi
- AC_CONFIG_SUBDIRS(utils doc)
- ;;
-esac
-
-AC_SUBST(INSTALL_LICENSE)
-
-AC_PROG_MAKE_SET
-
-AC_OUTPUT(Makefile)
diff --git a/winsup/cygserver/ChangeLog b/winsup/cygserver/ChangeLog
deleted file mode 100644
index 3f8566f..0000000
--- a/winsup/cygserver/ChangeLog
+++ /dev/null
@@ -1,583 +0,0 @@
-2008-12-15 Corinna Vinschen <corinna@vinschen.de>
-
- * setpwd.cc (client_request_setpwd::serve): Don't treat removing
- non-existant private data as error.
-
-2008-12-15 Corinna Vinschen <corinna@vinschen.de>
-
- * setpwd.cc (client_request_setpwd::serve): Explicitely erase password
- buffer content after usage.
-
-2008-11-26 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (OBJS): Add setpwd.o.
- * README: Explain new service to store passwords in the LSA registry
- area.
- * bsd_helper.cc (get_token_info): Make externally available.
- * bsd_helper.h (get_token_info): Declare.
- * client.cc (client_request::handle_request): Add case for
- CYGSERVER_REQUEST_SETPWD request.
- * setpwd.cc: New file implementing the CYGSERVER_REQUEST_SETPWD
- request.
-
-2008-10-30 Christopher Faylor <me+cygwin@cgf.cx>
-
- * Makefile.in: Use -static-libgcc when creating cygserver.exe.
-
-2008-04-30 Corinna Vinschen <corinna@vinschen.de>
-
- * sysv_msg.cc: Add fix from upstream version 1.65.
- (msgsnd): Call msleep with timeout value. Handle EWOULDBLOCK. Make
- sure it's clear from where msleep has been called in debug output.
- (msgrcv): Make sure it's clear from where msleep has been called in
- debug output.
-
-2008-02-06 Corinna Vinschen <corinna@vinschen.de>
-
- * bsd_helper.cc: Replace %E __small_printf format specifier with %lu
- and call to GetLastError throughout.
- * bsd_mutex.cc: Ditto.
- * sysv_sem.cc (semget): Replace %X __small_printf format specifier
- with %llx.
-
-2008-02-06 Corinna Vinschen <corinna@vinschen.de>
-
- Remove dependency from Cygwin internal code.
- * Makefile.in (CYGWIN_OBJS): Remove smallprint.o.
- (cygserver.exe): Remove strfuncs.o
- (strfuncs.o): Drop rule.
- * bsd_log.cc (_vlog): Use snprintf/vsnprintf instead of
- __small_sprintf/__small_vsprintf.
- * sysv_sem.cc (seminit): Use sys_malloc instead of malloc. Use
- snprintf instead of __small_sprintf.
- (semunload): Free the above allocated sema_mtx names here.
-
-2008-02-03 Brian Dessent <brian@dessent.net>
-
- * Makefile.in: Don't link strfuncs.o from the Cygwin build dir.
- Build it again with __OUTSIDE_CYGWIN__ defined.
-
-2007-11-05 Corinna Vinschen <corinna@vinschen.de>
-
- * bsd_helper.cc (tunable_params): Add kern.ipc.shm_allow_removed as
- bool parameter.
- * cygserver.conf: Add a description for the kern.ipc.shm_allow_removed
- parameter.
- * sysv_shm.cc (shminit): Set shm_allow_removed variable according to
- kern.ipc.shm_allow_removed setting.
-
-2007-08-02 Corinna Vinschen <corinna@vinschen.de>
-
- * smallprint.c: Remove.
-
-2007-08-02 Christopher Faylor <me+cygwin@cgf.cx>
-
- * Makefile.in: Add -lntdll to link line.
- (CYGWIN_OBJS): Include strfuncs.o.
-
-2007-08-02 Corinna Vinschen <corinna@vinschen.de>
-
- * smallprint.c: New file.
- * Makefile.in (OBJS): Add smallprint.o.
- (CYGWIN_OBJS): Remove smallprint.o from Cygwin dir.
-
-2007-07-21 Corinna Vinschen <corinna@vinschen.de>
-
- * bsd_helper.cc: Drop unnecessary security.h include.
-
-2007-02-23 Corinna Vinschen <corinna@vinschen.de>
-
- Throughout remove using wincap.
- * Makefile.in (OBJS): Remove wincap.o.
- * README: Don't mention 9x.
- * bsd_mutex.cc (_mtx_unlock): Drop checking for 9x error codes.
- * cygserver.cc (server_submission_loop::request_loop): Add FIXME
- comment.
- * wincap.cc: Remove.
- * wincap.h: Remove.
- * woutsup.h: Don't include wincap.h.
-
-2007-02-22 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (OBJS): Drop transport_sockets.o.
- * sysv_shm.cc (shmget_allocate_segment): Remove spurious cast.
- * transport.cc: Don't include transport_sockets.h.
- (create_server_transport): Always create transport_layer_pipes.
- * transport_sockets.cc: Remove.
- * transport_sockets.h: Remove.
-
-2006-05-24 Christopher Faylor <cgf@timesys.com>
-
- * configure.in: Update to newer autoconf.
- (thanks to Steve Ellcey)
- * configure: Regenerate.
- * aclocal.m4: New file.
-
-2006-01-12 Corinna Vinschen <corinna@vinschen.de>
-
- * wincap.cc: New file.
- * wincap.h: New file.
- * Makefile.in: Accomodate having our own wincap implementation now.
-
-2006-01-09 Corinna Vinschen <corinna@vinschen.de>
-
- Check FreeBSD upstream changes and apply important patches.
- * sysv_sem.cc (__semctl): Check copyin return value (from 1.76).
- * sysv_shm.cc (shminit): Actually use the iterating variable in the
- for loop when trying to avoid overflow (from 1.102).
-
-2005-11-10 Corinna Vinschen <corinna@vinschen.de>
-
- * bsd_helper.cc (securityinit): New function. Move initialization
- of security related variables from ipcinit here.
- * bsd_helper.h (securityinit): Add prototype.
- * cygserver.cc (main): Call securityinit right after wincap.init.
-
-2005-11-10 Corinna Vinschen <corinna@vinschen.de>
-
- * bsd_log.cc (_vpanic): LOG_EMERG is overkill, use LOG_CRIT.
-
-2005-11-09 Corinna Vinschen <corinna@vinschen.de>
-
- * process.cc (process_cache::process): Fix maximum process condition.
-
-2005-10-24 Corinna Vinschen <corinna@vinschen.de>
-
- * README: Add description for new -p/--process-cache option.
- * bsd_helper.cc (default_tun_check): Add kern.srv.process_cache_size
- entry to tunable_params. Set max value of kern.srv.request_threads
- to 310.
- * cygserver.cc (SERVER_VERSION): Set to 1.20.
- (print_usage): Print usage of new parameter -p.
- (main): Add process cache parameter handling. Accomodate new max
- value of request threads.
- * cygserver.conf: Add kern.srv.process_cache_size tunable parameter.
- Accomodate new max value of kern.srv.request_threads.
- * process.cc: Fix a comment.
- (process_cache::process_cache): Add max process cache size parameter.
- Change _cache_add_trigger to manual reset event.
- (struct pcache_wait_t): New struct used as parameter to
- pcache_wait_thread.
- (pcache_wait_thread): New thread function used for threaded process
- cache.
- (process_cache::wait_for_processes): Use threaded waiting if number
- of processes to wait for is bigger than 62. Always check all processes
- to avoid race under heavy load.
- (process_cache::sync_wait_array): Remove useless assert. Reset
- _cache_add_trigger right at the start since it's manual reset now.
- Accomodate threaded waiting.
- * process.h (process_cache::process_cache): Add max_procs parameter.
- (process_cache::_max_process_count): New member.
- (process_cache::_wait_array: Raise to allow up to 5 wait threads.
- (process_cache::_process_array): Ditto.
-
-2005-08-08 Christopher Faylor <cgf@timesys.com>
-
- * cygserver.cc (main): Call wincap.init() earlier to avoid a NULL
- dereference.
-
-2005-06-14 Corinna Vinschen <corinna@vinschen.de>
-
- * sysv_sem.cc (semu_list): Define static to avoid gcc 4.x compiler
- warning.
-
-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 4192bda..0000000
--- a/winsup/cygserver/Makefile.in
+++ /dev/null
@@ -1,91 +0,0 @@
-# Makefile for Cygwin server
-# Copyright 2003, 2006, 2007 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@
-
-DESTDIR=
-prefix:=${DESTDIR}@prefix@
-exec_prefix:=${DESTDIR}@exec_prefix@
-bindir:=${DESTDIR}@bindir@
-sbindir:=${DESTDIR}@sbindir@
-sysconfdir:=${DESTDIR}@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 \
- bsd_helper.o bsd_log.o bsd_mutex.o \
- sysv_msg.o sysv_sem.o sysv_shm.o setpwd.o
-LIBOBJS:=${patsubst %.o,lib%.o,$(OBJS)}
-
-CYGWIN_OBJS:=$(cygwin_build)/version.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,$^} -static-libgcc -L$(cygwin_build) -lntdll
-
-$(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)} -c -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 0136550..0000000
--- a/winsup/cygserver/README
+++ /dev/null
@@ -1,230 +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.
- - Allows non-privileged users to store obfuscated passwords in the
- registry to be used for setuid(2) to create user tokens with network
- credentials. This service is used by `passwd -R'. Using the stored
- passwords in setuid(2) does not require running cygserver. The
- registry storage is the same as Windows uses to store passwords for
- accounts running Windows services.
-
-
-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
-
- -p, --process-cache <num>
-
- Number of processes which can connect concurrently to cygserver.
- Default is 62. Each process connected to cygserver is a synchronization
- object which has to be maintained. The data structure to maintain these
- processes is the so-called "process cache". In theory, an arbitrary
- number of processes could connect to cygserver, but due to the need to
- synchronize, the higher the number of connected processes, the more
- synchronization overhead exists. By using this option, you can set an
- upper limit to the synchronization effort. If more than 62 processes
- try to connect to cygserver concurrently, two additional synchronization
- threads are necessary, and one for each further 62 concurrent
- processes. So, useful values for the --process-cache option are 62, 124,
- 186, 248, 310. 310 is the maximum value.
- Configuration file option: kern.srv.process_cache_size
-
- NOTE: The number of child processes of a single parent process is limited
- to 256. So in case of taking advantage of a process cache size beyond 256,
- keep in mind that not all of these processes can be child processes of one
- single parent process.
-
- -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.
-
- -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.
-
- It's best practice to 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/aclocal.m4 b/winsup/cygserver/aclocal.m4
deleted file mode 100644
index ecef424..0000000
--- a/winsup/cygserver/aclocal.m4
+++ /dev/null
@@ -1,875 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-# lib-prefix.m4 serial 4 (gettext-0.14.2)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
-dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
-dnl require excessive bracketing.
-ifdef([AC_HELP_STRING],
-[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
-[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
-
-dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
-dnl to access previously installed libraries. The basic assumption is that
-dnl a user will want packages to use other packages he previously installed
-dnl with the same --prefix option.
-dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
-dnl libraries, but is otherwise very convenient.
-AC_DEFUN([AC_LIB_PREFIX],
-[
- AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib-prefix],
-[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
- --without-lib-prefix don't search for libraries in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
- fi
- fi
-])
- if test $use_additional = yes; then
- dnl Potentially add $additional_includedir to $CPPFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's already present in $CPPFLAGS,
- dnl 3. if it's /usr/local/include and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- for x in $CPPFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $CPPFLAGS.
- CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- dnl Potentially add $additional_libdir to $LDFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's already present in $LDFLAGS,
- dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
- haveit=
- for x in $LDFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_libdir" = "X/usr/local/lib"; then
- if test -n "$GCC"; then
- case $host_os in
- linux*) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LDFLAGS.
- LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- fi
-])
-
-dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
-dnl acl_final_exec_prefix, containing the values to which $prefix and
-dnl $exec_prefix will expand at the end of the configure script.
-AC_DEFUN([AC_LIB_PREPARE_PREFIX],
-[
- dnl Unfortunately, prefix and exec_prefix get only finally determined
- dnl at the end of configure.
- if test "X$prefix" = "XNONE"; then
- acl_final_prefix="$ac_default_prefix"
- else
- acl_final_prefix="$prefix"
- fi
- if test "X$exec_prefix" = "XNONE"; then
- acl_final_exec_prefix='${prefix}'
- else
- acl_final_exec_prefix="$exec_prefix"
- fi
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
- prefix="$acl_save_prefix"
-])
-
-dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
-dnl variables prefix and exec_prefix bound to the values they will have
-dnl at the end of the configure script.
-AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
-[
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- acl_save_exec_prefix="$exec_prefix"
- exec_prefix="$acl_final_exec_prefix"
- $1
- exec_prefix="$acl_save_exec_prefix"
- prefix="$acl_save_prefix"
-])
-
-# lib-link.m4 serial 6 (gettext-0.14.3)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_PREREQ(2.50)
-
-dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
-dnl augments the CPPFLAGS variable.
-AC_DEFUN([AC_LIB_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
- ac_cv_lib[]Name[]_libs="$LIB[]NAME"
- ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
- ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
- ])
- LIB[]NAME="$ac_cv_lib[]Name[]_libs"
- LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
- INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
- dnl results of this search when this library appears as a dependency.
- HAVE_LIB[]NAME=yes
- undefine([Name])
- undefine([NAME])
-])
-
-dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
-dnl searches for libname and the libraries corresponding to explicit and
-dnl implicit dependencies, together with the specified include files and
-dnl the ability to compile and link the specified testcode. If found, it
-dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
-dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
-dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
-dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
-AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-
- dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
- dnl accordingly.
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
-
- dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
- dnl because if the user has installed lib[]Name and not disabled its use
- dnl via --without-lib[]Name-prefix, he wants to use it.
- ac_save_CPPFLAGS="$CPPFLAGS"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-
- AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS $LIB[]NAME"
- AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
- LIBS="$ac_save_LIBS"
- ])
- if test "$ac_cv_lib[]Name" = yes; then
- HAVE_LIB[]NAME=yes
- AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
- AC_MSG_CHECKING([how to link with lib[]$1])
- AC_MSG_RESULT([$LIB[]NAME])
- else
- HAVE_LIB[]NAME=no
- dnl If $LIB[]NAME didn't lead to a usable library, we don't need
- dnl $INC[]NAME either.
- CPPFLAGS="$ac_save_CPPFLAGS"
- LIB[]NAME=
- LTLIB[]NAME=
- fi
- AC_SUBST([HAVE_LIB]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- undefine([Name])
- undefine([NAME])
-])
-
-dnl Determine the platform dependent parameters needed to use rpath:
-dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
-dnl hardcode_direct, hardcode_minus_L.
-AC_DEFUN([AC_LIB_RPATH],
-[
- dnl Tell automake >= 1.10 to complain if config.rpath is missing.
- m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
- AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
- AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
- AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
- AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
- CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
- ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
- . ./conftest.sh
- rm -f ./conftest.sh
- acl_cv_rpath=done
- ])
- wl="$acl_cv_wl"
- libext="$acl_cv_libext"
- shlibext="$acl_cv_shlibext"
- hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
- hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
- hardcode_direct="$acl_cv_hardcode_direct"
- hardcode_minus_L="$acl_cv_hardcode_minus_L"
- dnl Determine whether the user wants rpath handling at all.
- AC_ARG_ENABLE(rpath,
- [ --disable-rpath do not hardcode runtime library paths],
- :, enable_rpath=yes)
-])
-
-dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
-AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
-[
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib$1-prefix],
-[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
- --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
- fi
- fi
-])
- dnl Search the library and its dependencies in $additional_libdir and
- dnl $LDFLAGS. Using breadth-first-seach.
- LIB[]NAME=
- LTLIB[]NAME=
- INC[]NAME=
- rpathdirs=
- ltrpathdirs=
- names_already_handled=
- names_next_round='$1 $2'
- while test -n "$names_next_round"; do
- names_this_round="$names_next_round"
- names_next_round=
- for name in $names_this_round; do
- already_handled=
- for n in $names_already_handled; do
- if test "$n" = "$name"; then
- already_handled=yes
- break
- fi
- done
- if test -z "$already_handled"; then
- names_already_handled="$names_already_handled $name"
- dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
- dnl or AC_LIB_HAVE_LINKFLAGS call.
- uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
- eval value=\"\$HAVE_LIB$uppername\"
- if test -n "$value"; then
- if test "$value" = yes; then
- eval value=\"\$LIB$uppername\"
- test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
- eval value=\"\$LTLIB$uppername\"
- test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
- else
- dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
- dnl that this library doesn't exist. So just drop it.
- :
- fi
- else
- dnl Search the library lib$name in $additional_libdir and $LDFLAGS
- dnl and the already constructed $LIBNAME/$LTLIBNAME.
- found_dir=
- found_la=
- found_so=
- found_a=
- if test $use_additional = yes; then
- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
- found_dir="$additional_libdir"
- found_so="$additional_libdir/lib$name.$shlibext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- else
- if test -f "$additional_libdir/lib$name.$libext"; then
- found_dir="$additional_libdir"
- found_a="$additional_libdir/lib$name.$libext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- fi
- fi
- fi
- if test "X$found_dir" = "X"; then
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- case "$x" in
- -L*)
- dir=`echo "X$x" | sed -e 's/^X-L//'`
- if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
- found_dir="$dir"
- found_so="$dir/lib$name.$shlibext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- else
- if test -f "$dir/lib$name.$libext"; then
- found_dir="$dir"
- found_a="$dir/lib$name.$libext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- fi
- fi
- ;;
- esac
- if test "X$found_dir" != "X"; then
- break
- fi
- done
- fi
- if test "X$found_dir" != "X"; then
- dnl Found the library.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
- if test "X$found_so" != "X"; then
- dnl Linking with a shared library. We attempt to hardcode its
- dnl directory into the executable's runpath, unless it's the
- dnl standard /usr/lib.
- if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
- dnl No hardcoding is needed.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $found_dir"
- fi
- dnl The hardcoding into $LIBNAME is system dependent.
- if test "$hardcode_direct" = yes; then
- dnl Using DIR/libNAME.so during linking hardcodes DIR into the
- dnl resulting binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $found_dir"
- fi
- else
- dnl Rely on "-L$found_dir".
- dnl But don't add it if it's already contained in the LDFLAGS
- dnl or the already constructed $LIBNAME
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
- fi
- if test "$hardcode_minus_L" != no; then
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
- dnl here, because this doesn't fit in flags passed to the
- dnl compiler. So give up. No hardcoding. This affects only
- dnl very old systems.
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- fi
- else
- if test "X$found_a" != "X"; then
- dnl Linking with a static library.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
- else
- dnl We shouldn't come here, but anyway it's good to have a
- dnl fallback.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
- fi
- fi
- dnl Assume the include files are nearby.
- additional_includedir=
- case "$found_dir" in
- */lib | */lib/)
- basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
- additional_includedir="$basedir/include"
- ;;
- esac
- if test "X$additional_includedir" != "X"; then
- dnl Potentially add $additional_includedir to $INCNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's /usr/local/include and we are using GCC on Linux,
- dnl 3. if it's already present in $CPPFLAGS or the already
- dnl constructed $INCNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- for x in $CPPFLAGS $INC[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $INCNAME.
- INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- fi
- dnl Look for dependencies.
- if test -n "$found_la"; then
- dnl Read the .la file. It defines the variables
- dnl dlname, library_names, old_library, dependency_libs, current,
- dnl age, revision, installed, dlopen, dlpreopen, libdir.
- save_libdir="$libdir"
- case "$found_la" in
- */* | *\\*) . "$found_la" ;;
- *) . "./$found_la" ;;
- esac
- libdir="$save_libdir"
- dnl We use only dependency_libs.
- for dep in $dependency_libs; do
- case "$dep" in
- -L*)
- additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
- dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 3. if it's already present in $LDFLAGS or the already
- dnl constructed $LIBNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
- haveit=
- if test "X$additional_libdir" = "X/usr/local/lib"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LIBNAME.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- haveit=
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LTLIBNAME.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- ;;
- -R*)
- dir=`echo "X$dep" | sed -e 's/^X-R//'`
- if test "$enable_rpath" != no; then
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $dir"
- fi
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $dir"
- fi
- fi
- ;;
- -l*)
- dnl Handle this in the next round.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
- ;;
- *.la)
- dnl Handle this in the next round. Throw away the .la's
- dnl directory; it is already contained in a preceding -L
- dnl option.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
- ;;
- *)
- dnl Most likely an immediate library name.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
- ;;
- esac
- done
- fi
- else
- dnl Didn't find the library; assume it is in the system directories
- dnl known to the linker and runtime loader. (All the system
- dnl directories known to the linker should also be known to the
- dnl runtime loader, otherwise the system is severely misconfigured.)
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- done
- done
- if test "X$rpathdirs" != "X"; then
- if test -n "$hardcode_libdir_separator"; then
- dnl Weird platform: only the last -rpath option counts, the user must
- dnl pass all path elements in one option. We can arrange that for a
- dnl single library, but not when more than one $LIBNAMEs are used.
- alldirs=
- for found_dir in $rpathdirs; do
- alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
- done
- dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
- acl_save_libdir="$libdir"
- libdir="$alldirs"
- eval flag=\"$hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- else
- dnl The -rpath options are cumulative.
- for found_dir in $rpathdirs; do
- acl_save_libdir="$libdir"
- libdir="$found_dir"
- eval flag=\"$hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- done
- fi
- fi
- if test "X$ltrpathdirs" != "X"; then
- dnl When using libtool, the option that works for both libraries and
- dnl executables is -R. The -R options are cumulative.
- for found_dir in $ltrpathdirs; do
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
- done
- fi
-])
-
-dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
-dnl unless already present in VAR.
-dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
-dnl contains two or three consecutive elements that belong together.
-AC_DEFUN([AC_LIB_APPENDTOVAR],
-[
- for element in [$2]; do
- haveit=
- for x in $[$1]; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X$element"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- [$1]="${[$1]}${[$1]:+ }$element"
- fi
- done
-])
-
-# lib-ld.m4 serial 3 (gettext-0.13)
-dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
-
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
-AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- acl_cv_prog_gnu_ld=yes ;;
-*)
- acl_cv_prog_gnu_ld=no ;;
-esac])
-with_gnu_ld=$acl_cv_prog_gnu_ld
-])
-
-dnl From libtool-1.4. Sets the variable LD.
-AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- [re_direlt='/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(acl_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- acl_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break ;;
- *)
- test "$with_gnu_ld" != yes && break ;;
- esac
- fi
- done
- IFS="$ac_save_ifs"
-else
- acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$acl_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_LIB_PROG_LD_GNU
-])
-
-dnl This provides configure definitions used by all the winsup
-dnl configure.in files.
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN([LIB_AC_PROG_CC_GNU],
-[AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc,
-[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
-cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi])])
-
-AC_DEFUN([LIB_AC_PROG_CC],
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_TOOL(CC, gcc, gcc)
-: ${CC:=gcc}
-AC_PROG_CC
-test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-])
-
-AC_DEFUN([LIB_AC_PROG_CXX],
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_TOOL(CXX, g++, g++)
-if test -z "$CXX"; then
- AC_CHECK_TOOL(CXX, g++, c++, , , )
- : ${CXX:=g++}
- AC_PROG_CXX
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-CXXFLAGS='$(CFLAGS)'
-])
-
diff --git a/winsup/cygserver/bsd_helper.cc b/winsup/cygserver/bsd_helper.cc
deleted file mode 100644
index 6dabdc8..0000000
--- a/winsup/cygserver/bsd_helper.cc
+++ /dev/null
@@ -1,691 +0,0 @@
-/* bsd_helper.cc
-
- Copyright 2003, 2004, 2005, 2007 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 "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)
-{
- 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 };
-
-void
-securityinit ()
-{
- InitializeSecurityDescriptor (&sec_all_nih_sd, SECURITY_DESCRIPTOR_REVISION);
- SetSecurityDescriptorDacl (&sec_all_nih_sd, TRUE, 0, FALSE);
- init_admin_sid ();
-}
-
-/* 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 ()
-{
- 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.
- */
-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)
-{
- /* 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;
-
- 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, %lu", GetLastError ());
- 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, %lu", GetLastError ());
- 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}, {32}, default_tun_check},
- { "kern.srv.request_threads", TUN_INT, {0}, {1}, {310}, default_tun_check},
- { "kern.srv.process_cache_size", TUN_INT, {0}, {1}, {310}, 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_allow_removed", TUN_BOOL, {TUN_UNDEF}, {TUN_FALSE}, {TUN_TRUE}, 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 0458985..0000000
--- a/winsup/cygserver/bsd_helper.h
+++ /dev/null
@@ -1,66 +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;
-
-void securityinit (void);
-
-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))
-
-void *get_token_info (HANDLE, TOKEN_INFORMATION_CLASS);
-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 78dcdb0..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 <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];
- char *pos;
-
- if ((level == LOG_DEBUG && log_debug != TUN_TRUE)
- || (level != LOG_DEBUG && level >= log_level))
- return;
- pos = stpcpy (buf, "cygserver: ");
- if (file && log_debug == TUN_TRUE)
- pos += snprintf (pos, 16384 - (pos - buf), "%s, line %d: ", file, line);
- vsnprintf (pos, 16384 - (pos - buf), 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_CRIT, 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 d4cad56..0000000
--- a/winsup/cygserver/bsd_mutex.cc
+++ /dev/null
@@ -1,386 +0,0 @@
-/* bsd_mutex.cc
-
- Copyright 2003, 2004, 2005, 2007 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, %lu\n", name, GetLastError ());
-}
-
-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, %lu", m->name, winpid,
- GetLastError ());
- 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. */
- if (GetLastError () != ERROR_TOO_MANY_POSTS)
- _panic (file, line, "release of mutex %s failed, %lu", m->name,
- GetLastError ());
- }
- _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 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: %lu", GetLastError ());
- 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: %lu", GetLastError ());
- 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, %lu", wmesg, GetLastError ());
- debug ("wait in msleep (%s) failed for %d, %lu", wmesg,
- td->td_proc->winpid, GetLastError ());
- 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 f66a995..0000000
--- a/winsup/cygserver/client.cc
+++ /dev/null
@@ -1,547 +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_setpwd.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;
- case CYGSERVER_REQUEST_SETPWD:
- req = new client_request_setpwd;
- 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 383421f..0000000
--- a/winsup/cygserver/configure
+++ /dev/null
@@ -1,5240 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59.
-#
-# Copyright (C) 2003 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-exec 6>&1
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_config_libobj_dir=.
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete. It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
-# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-
-ac_unique_file="cygserver.cc"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC ac_ct_CC CFLAGS LDFLAGS CPPFLAGS EXEEXT OBJEXT CXX ac_ct_CXX CXXFLAGS all_host install_host AR ac_ct_AR AS ac_ct_AS RANLIB ac_ct_RANLIB LD ac_ct_LD NM ac_ct_NM DLLTOOL ac_ct_DLLTOOL WINDRES ac_ct_WINDRES ALLOCA CPP EGREP SET_MAKE LIBOBJS LTLIBOBJS'
-ac_subst_files=''
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-ac_prev=
-for ac_option
-do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_option in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- eval "enable_$ac_feature=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_$ac_feature='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "with_$ac_package='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
- eval "with_$ac_package=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries=$ac_optarg ;;
-
- -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$ac_envvar='$ac_optarg'"
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$0" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
- fi
-fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
- { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CXX_set=${CXX+set}
-ac_env_CXX_value=$CXX
-ac_cv_env_CXX_set=${CXX+set}
-ac_cv_env_CXX_value=$CXX
-ac_env_CXXFLAGS_set=${CXXFLAGS+set}
-ac_env_CXXFLAGS_value=$CXXFLAGS
-ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
-ac_cv_env_CXXFLAGS_value=$CXXFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-_ACEOF
-
- cat <<_ACEOF
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
-_ACEOF
-
- cat <<\_ACEOF
-
-System types:
- --build=BUILD configure for building on BUILD [guessed]
- --host=HOST cross-compile to build programs to run on HOST [BUILD]
- --target=TARGET configure for building compilers for TARGET [HOST]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-
- cat <<\_ACEOF
-
-Optional Features:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-debugging Build a cygwin DLL which has more consistency checking for debugging
-
-Some influential environment variables:
- CC C compiler command
- CFLAGS C compiler flags
- LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
- nonstandard directory <lib dir>
- CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
- headers in a nonstandard directory <include dir>
- CXX C++ compiler command
- CXXFLAGS C++ compiler flags
- CPP C preprocessor
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-_ACEOF
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- ac_popdir=`pwd`
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_srcdir/configure.gnu; then
- echo
- $SHELL $ac_srcdir/configure.gnu --help=recursive
- elif test -f $ac_srcdir/configure; then
- echo
- $SHELL $ac_srcdir/configure --help=recursive
- elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
- else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
- cd "$ac_popdir"
- done
-fi
-
-test -n "$ac_init_help" && exit 0
-if $ac_init_version; then
- cat <<\_ACEOF
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit 0
-fi
-exec 5>config.log
-cat >&5 <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- echo "PATH: $as_dir"
-done
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_sep=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-{
- (set) 2>&1 |
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- ;;
- *)
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-}
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- sed "/^$/d" confdefs.h | sort
- echo
- fi
- test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
- ' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
- esac
- fi
-else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val="\$ac_cv_env_${ac_var}_value"
- eval ac_new_val="\$ac_env_${ac_var}_value"
- case $ac_old_set,$ac_new_set in
- set,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ac_aux_dir=
-for ac_dir in ../.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f $ac_dir/shtool; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ../.. $srcdir/../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in ../.. $srcdir/../.." >&2;}
- { (exit 1); exit 1; }; }
-fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-
-
-INSTALL=`cd $srcdir/../..; echo $(pwd)/install-sh -c`
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- done
- done
- ;;
-esac
-done
-
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL=$ac_install_sh
- fi
-fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-# Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
- { (exit 1); exit 1; }; }
-
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
-if test "${ac_cv_build+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
- ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
-build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
-if test "${ac_cv_host+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
- ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
-host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking target system type" >&5
-echo $ECHO_N "checking target system type... $ECHO_C" >&6
-if test "${ac_cv_target+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_target_alias=$target_alias
-test "x$ac_cv_target_alias" = "x" &&
- ac_cv_target_alias=$ac_cv_host_alias
-ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-echo "${ECHO_T}$ac_cv_target" >&6
-target=$ac_cv_target
-target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_CC" && ac_cv_prog_ac_ct_CC="gcc"
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
-
-: ${CC:=gcc}
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-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 "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
- fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$ac_ct_CC" && break
-done
-
- CC=$ac_ct_CC
-fi
-
-fi
-
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
- (eval $ac_link_default) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Find the output, starting from the most likely. This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
- conftest.$ac_ext )
- # This is the source file.
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool,
- # but it would be cool to find out if it's true. Does anybody
- # maintain Libtool? --akim.
- export ac_cv_exeext
- break;;
- * )
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
-
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
-fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
- break;;
- * ) break;;
- esac
-done
-else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
-if test "${ac_cv_objext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_prog_cc_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std1 is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std1. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-
-fi
-
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
- *)
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
-
-# Some people use a C++ compiler to compile C. Since we use `exit',
-# in C++ we need to declare it. In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
- choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5
-echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
- { (exit 1); exit 1; }; }
-
-if test -n "$ac_tool_prefix"; then
- # 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 "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CXX="${ac_tool_prefix}g++"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
- echo "$as_me:$LINENO: result: $CXX" >&5
-echo "${ECHO_T}$CXX" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CXX"; then
- ac_ct_CXX=$CXX
- # Extract the first word of "g++", so it can be a program name with args.
-set dummy g++; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CXX"; then
- ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CXX="g++"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_CXX" && ac_cv_prog_ac_ct_CXX="g++"
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
- echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-echo "${ECHO_T}$ac_ct_CXX" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CXX=$ac_ct_CXX
-else
- CXX="$ac_cv_prog_CXX"
-fi
-
-if test -z "$CXX"; then
- if test -n "$ac_tool_prefix"; then
- # 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 "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CXX="${ac_tool_prefix}g++"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
- echo "$as_me:$LINENO: result: $CXX" >&5
-echo "${ECHO_T}$CXX" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CXX"; then
- ac_ct_CXX=$CXX
- # Extract the first word of "g++", so it can be a program name with args.
-set dummy g++; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CXX"; then
- ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CXX="g++"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_CXX" && ac_cv_prog_ac_ct_CXX="c++"
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
- echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-echo "${ECHO_T}$ac_ct_CXX" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CXX=$ac_ct_CXX
-else
- CXX="$ac_cv_prog_CXX"
-fi
-
- : ${CXX:=g++}
- ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
- echo "$as_me:$LINENO: result: $CXX" >&5
-echo "${ECHO_T}$CXX" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$CXX" && break
- done
-fi
-if test -z "$CXX"; then
- ac_ct_CXX=$CXX
- for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CXX"; then
- ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CXX="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
- echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-echo "${ECHO_T}$ac_ct_CXX" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$ac_ct_CXX" && break
-done
-test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
-
- CXX=$ac_ct_CXX
-fi
-
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C++ compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
-GXX=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-CXXFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
-echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cxx_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cxx_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_prog_cxx_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
-if test "$ac_test_CXXFLAGS" = set; then
- CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
- if test "$GXX" = yes; then
- CXXFLAGS="-g -O2"
- else
- CXXFLAGS="-g"
- fi
-else
- if test "$GXX" = yes; then
- CXXFLAGS="-O2"
- else
- CXXFLAGS=
- fi
-fi
-for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
- test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5
-echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-CXXFLAGS='$(CFLAGS)'
-
-
-case "$with_cross_host" in
- ""|*cygwin*)
- all_host="all_host"
- install_host="install_host"
- ;;
- *)
- all_host=
- install_host=
- ;;
-esac
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
- echo "$as_me:$LINENO: result: $AR" >&5
-echo "${ECHO_T}$AR" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_AR"; then
- ac_ct_AR=$AR
- # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_AR"; then
- ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_AR="ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
- echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-echo "${ECHO_T}$ac_ct_AR" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- AR=$ac_ct_AR
-else
- AR="$ac_cv_prog_AR"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AS+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-AS=$ac_cv_prog_AS
-if test -n "$AS"; then
- echo "$as_me:$LINENO: result: $AS" >&5
-echo "${ECHO_T}$AS" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_AS"; then
- ac_ct_AS=$AS
- # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_AS"; then
- ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_AS="as"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_AS" && ac_cv_prog_ac_ct_AS="as"
-fi
-fi
-ac_ct_AS=$ac_cv_prog_ac_ct_AS
-if test -n "$ac_ct_AS"; then
- echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
-echo "${ECHO_T}$ac_ct_AS" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- AS=$ac_ct_AS
-else
- AS="$ac_cv_prog_AS"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="ranlib"
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- RANLIB=$ac_ct_RANLIB
-else
- RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # 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 "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_LD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$LD"; then
- ac_cv_prog_LD="$LD" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_LD="${ac_tool_prefix}ld"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-LD=$ac_cv_prog_LD
-if test -n "$LD"; then
- echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_LD"; then
- ac_ct_LD=$LD
- # Extract the first word of "ld", so it can be a program name with args.
-set dummy ld; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_LD"; then
- ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_LD="ld"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
-fi
-fi
-ac_ct_LD=$ac_cv_prog_ac_ct_LD
-if test -n "$ac_ct_LD"; then
- echo "$as_me:$LINENO: result: $ac_ct_LD" >&5
-echo "${ECHO_T}$ac_ct_LD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- LD=$ac_ct_LD
-else
- LD="$ac_cv_prog_LD"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # 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 "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_NM+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$NM"; then
- ac_cv_prog_NM="$NM" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_NM="${ac_tool_prefix}nm"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-NM=$ac_cv_prog_NM
-if test -n "$NM"; then
- echo "$as_me:$LINENO: result: $NM" >&5
-echo "${ECHO_T}$NM" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_NM"; then
- ac_ct_NM=$NM
- # Extract the first word of "nm", so it can be a program name with args.
-set dummy nm; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_NM"; then
- ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_NM="nm"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
-fi
-fi
-ac_ct_NM=$ac_cv_prog_ac_ct_NM
-if test -n "$ac_ct_NM"; then
- echo "$as_me:$LINENO: result: $ac_ct_NM" >&5
-echo "${ECHO_T}$ac_ct_NM" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- NM=$ac_ct_NM
-else
- NM="$ac_cv_prog_NM"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # 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 "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_DLLTOOL+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-DLLTOOL=$ac_cv_prog_DLLTOOL
-if test -n "$DLLTOOL"; then
- echo "$as_me:$LINENO: result: $DLLTOOL" >&5
-echo "${ECHO_T}$DLLTOOL" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_DLLTOOL"; then
- ac_ct_DLLTOOL=$DLLTOOL
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_DLLTOOL"; then
- ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_DLLTOOL="dlltool"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_DLLTOOL" && ac_cv_prog_ac_ct_DLLTOOL="dlltool"
-fi
-fi
-ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
-if test -n "$ac_ct_DLLTOOL"; then
- echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
-echo "${ECHO_T}$ac_ct_DLLTOOL" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- DLLTOOL=$ac_ct_DLLTOOL
-else
- DLLTOOL="$ac_cv_prog_DLLTOOL"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # 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 "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_WINDRES+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$WINDRES"; then
- ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-WINDRES=$ac_cv_prog_WINDRES
-if test -n "$WINDRES"; then
- echo "$as_me:$LINENO: result: $WINDRES" >&5
-echo "${ECHO_T}$WINDRES" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_WINDRES"; then
- ac_ct_WINDRES=$WINDRES
- # Extract the first word of "windres", so it can be a program name with args.
-set dummy windres; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_WINDRES"; then
- ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_WINDRES="windres"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_WINDRES" && ac_cv_prog_ac_ct_WINDRES="windres"
-fi
-fi
-ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
-if test -n "$ac_ct_WINDRES"; then
- echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5
-echo "${ECHO_T}$ac_ct_WINDRES" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- WINDRES=$ac_ct_WINDRES
-else
- WINDRES="$ac_cv_prog_WINDRES"
-fi
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- break
-fi
-
- done
- ac_cv_prog_CPP=$CPP
-
-fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
-fi
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- :
-else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
- fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
-
-
-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
-# for constant arguments. Useless!
-echo "$as_me:$LINENO: checking for working alloca.h" >&5
-echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
-if test "${ac_cv_working_alloca_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <alloca.h>
-int
-main ()
-{
-char *p = (char *) alloca (2 * sizeof (int));
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_working_alloca_h=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_working_alloca_h=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
-echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
-if test $ac_cv_working_alloca_h = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ALLOCA_H 1
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for alloca" >&5
-echo $ECHO_N "checking for alloca... $ECHO_C" >&6
-if test "${ac_cv_func_alloca_works+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#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;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_alloca_works=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_alloca_works=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
-echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
-
-if test $ac_cv_func_alloca_works = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ALLOCA 1
-_ACEOF
-
-else
- # 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 <<\_ACEOF
-#define C_ALLOCA 1
-_ACEOF
-
-
-echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
-echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
-if test "${ac_cv_os_cray+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if defined(CRAY) && ! defined(CRAY2)
-webecray
-#else
-wenotbecray
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "webecray" >/dev/null 2>&1; then
- ac_cv_os_cray=yes
-else
- ac_cv_os_cray=no
-fi
-rm -f conftest*
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
-echo "${ECHO_T}$ac_cv_os_cray" >&6
-if test $ac_cv_os_cray = yes; then
- for ac_func in _getb67 GETB67 getb67; do
- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* 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 ();
-/* 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
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define CRAY_STACKSEG_END $ac_func
-_ACEOF
-
- break
-fi
-
- done
-fi
-
-echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
-echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
-if test "${ac_cv_c_stack_direction+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_c_stack_direction=0
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-int
-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;
-}
-
-int
-main ()
-{
- exit (find_stack_direction () < 0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_stack_direction=1
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_c_stack_direction=-1
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
-echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
-
-cat >>confdefs.h <<_ACEOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-_ACEOF
-
-
-fi
-
-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.make <<\_ACEOF
-all:
- @echo 'ac_maketemp="$(MAKE)"'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftest.make 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 conftest.make
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
- SET_MAKE=
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-# Test for builtin mem* functions.
-
-
-ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-#include <string.h>
-void foo(char *s, int c, size_t n)
-{
- __builtin_memset(s, c, n);
-}
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- use_builtin_memset=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-use_builtin_memset=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-if test $use_builtin_memset = "yes"; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_BUILTIN_MEMSET 1
-_ACEOF
-
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-# 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 <<\_ACEOF
-#define DEBUGGING 1
-_ACEOF
- ;;
-no) ;;
-esac
-
-fi;
-
- ac_config_files="$ac_config_files Makefile"
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-{
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-} |
- sed '
- t clear
- : clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
- cat confcache >$cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[ ]*$//;
-}'
-fi
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then we branch to the quote section. Otherwise,
-# look for a macro that doesn't take arguments.
-cat >confdef2opt.sed <<\_ACEOF
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
-t quote
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
-t quote
-d
-: quote
-s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
-s,\[,\\&,g
-s,\],\\&,g
-s,\$,$$,g
-p
-_ACEOF
-# We use echo to avoid assuming a particular line-breaking character.
-# The extra dot is to prevent the shell from consuming trailing
-# line-breaks from the sub-command output. A line-break within
-# single-quotes doesn't work because, if this script is created in a
-# platform that uses two characters for line-breaks (e.g., DOS), tr
-# would break.
-ac_LF_and_DOT=`echo; echo .`
-DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f confdef2opt.sed
-
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling. Logging --version etc. is OK.
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
-_ACEOF
-
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_headers"; then
- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_links"; then
- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
-
-Configuration files:
-$config_files
-
-Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.59,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-INSTALL="$INSTALL"
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=*)
- ac_option=`expr "x$1" : 'x\([^=]*\)='`
- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- -*)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- *) # This is not an option, so the user has probably given explicit
- # arguments.
- ac_option=$1
- ac_need_defaults=false;;
- esac
-
- case $ac_option in
- # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --vers* | -V )
- echo "$ac_cs_version"; exit 0 ;;
- --he | --h)
- # Conflict between --help and --header
- { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
- ac_need_defaults=false;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1" ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-if \$ac_cs_recheck; then
- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-
-
-
-
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_config_target in $ac_config_targets
-do
- case "$ac_config_target" in
- # Handling of arguments.
- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./confstat$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
-{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-
-#
-# CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@build@,$build,;t t
-s,@build_cpu@,$build_cpu,;t t
-s,@build_vendor@,$build_vendor,;t t
-s,@build_os@,$build_os,;t t
-s,@host@,$host,;t t
-s,@host_cpu@,$host_cpu,;t t
-s,@host_vendor@,$host_vendor,;t t
-s,@host_os@,$host_os,;t t
-s,@target@,$target,;t t
-s,@target_cpu@,$target_cpu,;t t
-s,@target_vendor@,$target_vendor,;t t
-s,@target_os@,$target_os,;t t
-s,@CC@,$CC,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@CXX@,$CXX,;t t
-s,@ac_ct_CXX@,$ac_ct_CXX,;t t
-s,@CXXFLAGS@,$CXXFLAGS,;t t
-s,@all_host@,$all_host,;t t
-s,@install_host@,$install_host,;t t
-s,@AR@,$AR,;t t
-s,@ac_ct_AR@,$ac_ct_AR,;t t
-s,@AS@,$AS,;t t
-s,@ac_ct_AS@,$ac_ct_AS,;t t
-s,@RANLIB@,$RANLIB,;t t
-s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s,@LD@,$LD,;t t
-s,@ac_ct_LD@,$ac_ct_LD,;t t
-s,@NM@,$NM,;t t
-s,@ac_ct_NM@,$ac_ct_NM,;t t
-s,@DLLTOOL@,$DLLTOOL,;t t
-s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t
-s,@WINDRES@,$WINDRES,;t t
-s,@ac_ct_WINDRES@,$ac_ct_WINDRES,;t t
-s,@ALLOCA@,$ALLOCA,;t t
-s,@CPP@,$CPP,;t t
-s,@EGREP@,$EGREP,;t t
-s,@SET_MAKE@,$SET_MAKE,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
-
-_ACEOF
-
- cat >>$CONFIG_STATUS <<\_ACEOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_lines=48
- ac_sed_frag=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_lines # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- else
- # The purpose of the label and of the branching condition is to
- # speed up the sed processing (if there are no `@' at all, there
- # is no need to browse any of the substitutions).
- # These are the two extra sed commands mentioned above.
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_lines`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
-fi # test -n "$CONFIG_FILES"
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
- esac
-
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- if test x"$ac_file" = x-; then
- configure_input=
- else
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
-
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;t t
-s,@srcdir@,$ac_srcdir,;t t
-s,@abs_srcdir@,$ac_abs_srcdir,;t t
-s,@top_srcdir@,$ac_top_srcdir,;t t
-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s,@builddir@,$ac_builddir,;t t
-s,@abs_builddir@,$ac_abs_builddir,;t t
-s,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-s,@INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- rm -f $tmp/stdin
- if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
- else
- cat $tmp/out
- rm -f $tmp/out
- fi
-
-done
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || { (exit 1); exit 1; }
-fi
-
diff --git a/winsup/cygserver/configure.in b/winsup/cygserver/configure.in
deleted file mode 100644
index f0fd4b0..0000000
--- a/winsup/cygserver/configure.in
+++ /dev/null
@@ -1,75 +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.59)dnl
-AC_INIT(cygserver.cc)
-
-AC_CONFIG_AUX_DIR(../..)
-
-INSTALL=`cd $srcdir/../..; echo $(pwd)/install-sh -c`
-
-AC_PROG_INSTALL
-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 262734f..0000000
--- a/winsup/cygserver/cygserver.cc
+++ /dev/null
@@ -1,770 +0,0 @@
-/* cygserver.cc
-
- Copyright 2001, 2002, 2003, 2004, 2005, 2007 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.20"
-
-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;
- 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 (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 (!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 (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.
- * FIXME: This looks weird and is an issue on NT, too. Per MSDN,
- * THREAD_PRIORITY_HIGHEST + 1 is only a valid priority level if
- * the priority class is set to REALTIME_PRIORITY_CLASS.
- */
- 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"
-" -p, --process-cache <num> Size of process cache.\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'},
- {"process-cache", required_argument, NULL, 'p'},
- {"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:mp:qr:sSvyY";
-
- long cleanup_threads = 0;
- long request_threads = 0;
- long process_cache_size = 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;
-
- securityinit ();
-
- 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 > 32 || (c && *c))
- panic ("Number of cleanup threads must be between 1 and 32");
- 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 'p':
- c = NULL;
- process_cache_size = strtol (optarg, &c, 10);
- if (process_cache_size <= 0 || process_cache_size > 310 || (c && *c))
- panic ("Size of process cache must be between 1 and 310");
- break;
-
- case 'q':
- support_msgqueues = TUN_FALSE;
- break;
-
- case 'r':
- c = NULL;
- request_threads = strtol (optarg, &c, 10);
- if (request_threads <= 0 || request_threads > 310 || (c && *c))
- panic ("Number of request threads must be between 1 and 310");
- 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 (!process_cache_size)
- TUNABLE_INT_FETCH ("kern.srv.process_cache_size", &process_cache_size);
- if (!process_cache_size)
- process_cache_size = 62;
-
- 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;
-
- if (!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 (process_cache_size, 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 589931b..0000000
--- a/winsup/cygserver/cygserver.conf
+++ /dev/null
@@ -1,147 +0,0 @@
-# cygserver.conf, Copyright(C) 2003, 2005 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: 310, command line option -r, --request-threads
-#kern.srv.request_threads 10
-
-# kern.srv.process_cache_size: No. of concurrent processes which can be handled
-# by Cygserver concurrently.
-# Default: 62, Min: 1, Max: 310, command line option -p, --process-cache
-#kern.srv.process_cache_size 62
-
-# 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
-
-# kern.ipc.shm_allow_removed: Determines whether a process is allowed to
-# attach to a shared memory segment (using the shmat call) after a successful
-# call to shmctl(IPC_RMID). This is a Linux-specific, and therefore
-# non-portable feature. Use with care. Default is "no".
-#kern.ipc.shm_allow_removed no
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 cc665d8..0000000
--- a/winsup/cygserver/process.cc
+++ /dev/null
@@ -1,500 +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::check_and_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 size_t max_procs,
- const unsigned int initial_workers)
- : _queue (initial_workers),
- _submitter (this, &_queue), // true == interruptible
- _processes_count (0),
- _max_process_count (max_procs),
- _processes_head (NULL),
- _cache_add_trigger (NULL)
-{
- /* there can only be one */
- InitializeCriticalSection (&_cache_write_access);
-
- _cache_add_trigger = CreateEvent (NULL, // SECURITY_ATTRIBUTES
- TRUE, // Manual-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 >= _max_process_count)
- {
- LeaveCriticalSection (&_cache_write_access);
- system_printf (("process limit (%d processes) reached; "
- "new connection refused for %d(%lu)"),
- _max_process_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;
-}
-
-struct pcache_wait_t
-{
- size_t index;
- size_t count;
- HANDLE *hdls;
-};
-
-static DWORD WINAPI
-pcache_wait_thread (const LPVOID param)
-{
- pcache_wait_t *p = (pcache_wait_t *) param;
-
- DWORD rc = WaitForMultipleObjects (p->count, p->hdls, FALSE, INFINITE);
- ExitThread (rc == WAIT_FAILED ? rc : rc + p->index);
-}
-
-void
-process_cache::wait_for_processes (const HANDLE interrupt_event)
-{
- // Update `_wait_array' with handles of all current processes.
- size_t idx;
- const size_t count = sync_wait_array (interrupt_event);
-
- debug_printf ("waiting on %u objects in total (%u processes)",
- count, _processes_count);
-
- DWORD rc = WAIT_FAILED;
-
- if (count <= 64)
- {
- /* If count <= 64, a single WaitForMultipleObjects is sufficient and
- we can simply wait in the main thread. */
- rc = WaitForMultipleObjects (count, _wait_array, FALSE, INFINITE);
- if (rc == WAIT_FAILED)
- {
- system_printf ("could not wait on the process handles, error = %lu",
- GetLastError ());
- abort ();
- }
- }
- else
- {
- /* If count > 64 we have to create sub-threads which wait for the
- actual wait objects and the main thread waits for the termination
- of one of the threads. */
- HANDLE main_wait_array[5] = { NULL };
- DWORD mcount = 0;
-
- for (idx = 0; idx < count; idx += 64)
- {
- pcache_wait_t p = { idx, min (count - idx, 64), _wait_array + idx };
- main_wait_array[mcount++] = CreateThread (NULL, 0, pcache_wait_thread,
- &p, 0, NULL);
- }
-
- rc = WaitForMultipleObjects (mcount, main_wait_array, FALSE, INFINITE);
- if (rc == WAIT_FAILED)
- {
- system_printf ("could not wait on the process handles, error = %lu",
- GetLastError ());
- abort ();
- }
-
- /* Check for error condition on signalled sub-thread. */
- GetExitCodeThread (main_wait_array[rc], &rc);
- if (rc == WAIT_FAILED)
- {
- system_printf ("could not wait on the process handles, error = %lu",
- GetLastError ());
- abort ();
- }
-
- /* Wake up all waiting threads. _cache_add_trigger gets reset
- in sync_wait_array again. */
- SetEvent (_cache_add_trigger);
- WaitForMultipleObjects (mcount, main_wait_array, TRUE, INFINITE);
- for (idx = 0; idx < mcount; idx++)
- CloseHandle (main_wait_array[idx]);
- }
-
- /* Tell all processes the bad news. This one formerly only checked
- processes beginning with the index of the signalled process, but
- this can result in processes which are signalled but never removed
- under heavy load conditions. */
- for (idx = 0; idx < count; idx++)
- if (_process_array[idx])
- check_and_remove_process (idx);
-}
-
-/*
- * 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 (interrupt_event && interrupt_event != INVALID_HANDLE_VALUE);
-
- /* Always reset _cache_add_trigger before filling up the array again. */
- ResetEvent (_cache_add_trigger);
-
- EnterCriticalSection (&_cache_write_access);
-
- 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;
-
- if (!ptr->_next || index % 64 == 62)
- {
- /* Added at the end of each thread's array part for efficiency. */
- _wait_array[index] = interrupt_event;
- _process_array[index++] = NULL;
- _wait_array[index] = _cache_add_trigger;
- _process_array[index++] = NULL;
- }
- }
-
- if (!index)
- {
- /* To get at least *something* to wait for. */
- _wait_array[index] = interrupt_event;
- _process_array[index++] = NULL;
- _wait_array[index] = _cache_add_trigger;
- _process_array[index++] = NULL;
- }
-
- 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 4702d28..0000000
--- a/winsup/cygserver/process.h
+++ /dev/null
@@ -1,179 +0,0 @@
-/* process.h
-
- 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. */
-
-#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 (const size_t max_procs, const unsigned int initial_workers);
- ~process_cache ();
-
- class process *process (pid_t cygpid, DWORD winpid,
- HANDLE signal_arrived = INVALID_HANDLE_VALUE);
-
- 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;
- size_t _max_process_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[5 * MAXIMUM_WAIT_OBJECTS];
- class process *_process_array[5 * 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/setpwd.cc b/winsup/cygserver/setpwd.cc
deleted file mode 100644
index 8125fd2..0000000
--- a/winsup/cygserver/setpwd.cc
+++ /dev/null
@@ -1,104 +0,0 @@
-/* setpwd.cc: Set LSA private data password for current user.
-
- Copyright 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-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 <wchar.h>
-
-#include <ntsecapi.h>
-#include <ntdef.h>
-#include "ntdll.h"
-
-#include "cygserver.h"
-#include "process.h"
-#include "transport.h"
-
-#include "cygserver_setpwd.h"
-
-client_request_setpwd::client_request_setpwd ()
- : client_request (CYGSERVER_REQUEST_SETPWD,
- &_parameters, sizeof (_parameters))
-{
-}
-
-void
-client_request_setpwd::serve (transport_layer_base *const conn,
- process_cache *const cache)
-{
- HANDLE tok;
- PTOKEN_USER user;
- WCHAR sidbuf[128], key_name [128 + wcslen (CYGWIN_LSA_KEY_PREFIX)];
- UNICODE_STRING sid, key, data;
-
- syscall_printf ("Request to set private data");
- 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;
- }
- msglen (0);
- if (!conn->impersonate_client ())
- {
- error_code (EACCES);
- return;
- }
- if (!OpenThreadToken (GetCurrentThread (), TOKEN_READ, TRUE, &tok))
- {
- conn->revert_to_self ();
- error_code (EACCES);
- return;
- }
- /* Get uid from user SID in token. */
- user = (PTOKEN_USER) get_token_info (tok, TokenUser);
- CloseHandle (tok);
- conn->revert_to_self ();
- if (!user)
- {
- error_code (EACCES);
- return;
- }
- LSA_OBJECT_ATTRIBUTES oa = { 0, 0, 0, 0, 0, 0 };
- HANDLE lsa;
- NTSTATUS status = LsaOpenPolicy (NULL, &oa, POLICY_CREATE_SECRET, &lsa);
- if (!NT_SUCCESS (status))
- {
- error_code (LsaNtStatusToWinError (status));
- return;
- }
- RtlInitEmptyUnicodeString (&sid, sidbuf, sizeof sidbuf);
- RtlConvertSidToUnicodeString (&sid, user->User.Sid, FALSE);
- free (user);
- RtlInitEmptyUnicodeString (&key, key_name, sizeof key_name);
- RtlAppendUnicodeToString (&key, CYGWIN_LSA_KEY_PREFIX);
- RtlAppendUnicodeStringToString (&key, &sid);
- RtlInitUnicodeString (&data, _parameters.in.passwd);
- status = LsaStorePrivateData (lsa, &key, data.Length ? &data : NULL);
- if (data.Length)
- memset (data.Buffer, 0, data.Length);
- /* Success or we're trying to remove a password entry which doesn't exist. */
- if (NT_SUCCESS (status)
- || (data.Length == 0 && status == STATUS_OBJECT_NAME_NOT_FOUND))
- error_code (0);
- else
- error_code (LsaNtStatusToWinError (status));
- syscall_printf ("Request to set private data returns error %d", error_code ());
- LsaClose (lsa);
-}
-#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 217cc1d..0000000
--- a/winsup/cygserver/sysv_msg.cc
+++ /dev/null
@@ -1,1215 +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 $");
-/* CV, 2006-01-09: Inspected upstream up to version 1.60. */
-
-#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,
- "msgsnd", 50);
- DPRINTF(("good morning, error=%d\n", error));
- if (we_own_it)
- msqptr->msg_perm.mode &= ~MSG_LOCKED;
- if (error == EWOULDBLOCK) {
- DPRINTF(("timed out\n"));
- continue;
- }
- 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,
- "msgrcv", 0);
- DPRINTF(("msgrcv: good morning (error=%d)\n", error));
-
- if (error != 0) {
- DPRINTF(("msgrcv: 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 499c1f9..0000000
--- a/winsup/cygserver/sysv_sem.cc
+++ /dev/null
@@ -1,1389 +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 <stdio.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 $");
-/* CV, 2006-01-09: Inspected upstream up to version 1.78. */
-
-#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 */
-static 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 *) sys_malloc(16, M_SEM, M_WAITOK);
- snprintf(buf, 16, "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++) {
- sys_free((void *) sema_mtx[i].name, M_SEM);
- 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);
- error = 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%llx, %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 700dbe2..0000000
--- a/winsup/cygserver/sysv_shm.cc
+++ /dev/null
@@ -1,1046 +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 $");
-/* CV, 2006-01-09: Inspected upstream up to version 1.104. */
-
-#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) > 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;
- tun_bool_t shm_ar;
-
- TUNABLE_INT_FETCH("kern.ipc.shmmaxpgs", &shminfo.shmall);
- for (i = PAGE_SIZE; i > 0; i--) {
- shminfo.shmmax = shminfo.shmall * i;
- 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_BOOL_FETCH("kern.ipc.shm_allow_removed", &shm_ar);
- if (shm_ar == TUN_TRUE)
- shm_allow_removed = 1;
- 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 ff9ce8d..0000000
--- a/winsup/cygserver/transport.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-/* transport.cc
-
- Copyright 2001, 2002, 2003, 2004, 2007 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"
-
-/* The factory */
-transport_layer_base *
-create_server_transport ()
-{
- return new transport_layer_pipes;
-}
-
-#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/woutsup.h b/winsup/cygserver/woutsup.h
deleted file mode 100644
index b262ae2..0000000
--- a/winsup/cygserver/woutsup.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* woutsup.h: for Cygwin code compiled outside the DLL (i.e. cygserver).
-
- Copyright 2002, 2003, 2007 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-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 "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__)
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
deleted file mode 100644
index e40be0a..0000000
--- a/winsup/cygwin/ChangeLog
+++ /dev/null
@@ -1,3277 +0,0 @@
-2008-12-22 Christopher Faylor <me+cygwin@cgf.cx>
-
- * pipe.cc (getov_result): Minor cleanup.
-
-2008-12-20 Christopher Faylor <me+cygwin@cgf.cx>
-
- * pipe.cc (getov_result): Add parameters to facilitate better EOF
- checking.
- (pipe_handler): Pass extra arguments to getov_result.
-
-2008-12-20 Christopher Faylor <me+cygwin@cgf.cx>
-
- * fhandler.cc (fhandler_base::wait_overlapped): Reorganize to eliminate
- gotos and to hopefully eliminate one race when a signal is detected or
- there is a WFMO error.
-
-2008-12-20 Christopher Faylor <me+cygwin@cgf.cx>
-
- * pinfo.h (pinfo::thisproc): Declare. Rename from set_myself.
- * pinfo.cc (pinfo::thisproc): Define. Rename from set_myself. Set
- procinfo to NULL to avoid confusing subsequent init.
- (pinfo_init): Accommodate set_myself -> pinfo::thisproc rename.
- * dcrt0.cc (child_info_fork::handle_fork): Ditto.
- (child_info_spawn::handle_spawn): Ditto.
-
-2008-12-20 Corinna Vinschen <corinna@vinschen.de>
-
- * pwdgrp.h (pwdgrp::refresh): Fix indentation.
- * uinfo.cc (pwdgrp::load): Open file synchronized to avoid truncated
- read. Drop local variable off.
-
-2008-12-19 Christopher Faylor <me+cygwin@cgf.cx>
-
- * pinfo.cc (pinfo_basic): New class.
- (pinfo_basic::pinfo_basic): Define constructor for new class.
- (myself): Initialize from myself_initial.
- (set_myself): Set pid and progname from already myself_initial.
- * strace.cc (strace::strace): Split apart strace::hello. Send
- notification to strace as early as possible.
- (strace::hello): Just send clause which describes the current process.
- This can now be preceded by early initialization strace output.
- * include/sys/strace.h (strace::strace): Declare new constructor.
-
-2008-12-19 Christian Franke <franke@computer.org>
-
- * fhandler_registry.cc (perf_data_files): New table.
- (PERF_DATA_FILE_COUNT): New constant.
- (fhandler_registry::exists): Add check for HKEY_PERFORMANCE_DATA
- value names.
- (fhandler_registry::fstat): For HKEY_PERFORMANCE_DATA, return
- default values only.
- (fhandler_registry::readdir): For HKEY_PERFORMANCE_DATA, list
- names from perf_data_files only.
- (fhandler_registry::fill_filebuf): Use larger buffer to speed up
- access to HKEY_PERFORMANCE_DATA values. Remove check for possible
- subkey. Add RegCloseKey ().
- (open_key): Replace goto by break, remove label. Do not try to
- open subkey of HKEY_PERFORMANCE_DATA. Add missing RegCloseKey ()
- after open subkey error.
-
-2008-12-19 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (path_conv::check): Handle incoming DOS paths non-POSIXy,
- always case-insensitive, always ignoring ACLs.
-
-2008-12-18 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc: Set 4th parameter of NtQueryDirectoryFile to
- NULL throughout.
- (fhandler_disk_file::facl): Fix a condition so that fstat_by_handle
- is actually used.
- (fhandler_disk_file::readdir): Don't print debug message on a simple
- STATUS_NO_MORE_FILES status code.
-
-2008-12-18 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlin_info::check): Set 4th parameter of
- NtQueryDirectoryFile to NULL instead of 0 since it's a pointer.
- Simplify label and break from loop handling in symlink evaluation
- conditional expression. Drop a now useless break statement. Fix
- behaviour when searching for `foo' and then finding a `foo.lnk'
- which is no shortcut.
-
-2008-12-16 Christian Franke <franke@computer.org>
-
- * fhandler_registry.cc (DEFAULT_VALUE_NAME): Remove constant.
- (encode_regname): Encode empty (default) name to "@".
- Encode "@" to "%40". Change error return to -1.
- (decode_regname): Decode "@" to empty name. Decode "%40" to "@".
- (fhandler_registry::exists): Skip check for keys if name is empty.
- Remove check for DEFAULT_VALUE_NAME, now handled by decode_regname ().
- (fhandler_registry::readdir): Remove check for empty name, now
- handled by encode_regname ().
- (fhandler_registry::open): Remove check for DEFAULT_VALUE_NAME.
- (fhandler_registry::open_key): Fail with ENOENT if key name is empty.
-
-2008-12-15 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (gen_full_path_at): Use isabspath instead of isdirsep
- to recognize absolute path.
-
-2008-12-15 Corinna Vinschen <corinna@vinschen.de>
-
- * sec_auth.cc (open_local_policy): Set lsa handle to
- INVALID_HANDLE_VALUE when LsaOpenPolicy fails. Explain why.
-
-2008-12-15 Corinna Vinschen <corinna@vinschen.de>
-
- * setlsapwd.cc (setlsapwd): Simplify code. Only try to call cygserver
- if opening local policy fails. Don't treat removing non-existant
- private data as error.
-
-2008-12-15 Corinna Vinschen <corinna@vinschen.de>
-
- * setlsapwd.cc (setlsapwd): Explicitely erase password buffer content
- after usage.
-
-2008-12-15 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_registry.cc (fhandler_registry::exists): Handle EACCES.
- (fhandler_registry::open): Ditto.
-
-2008-12-15 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Export fgetwc, fgetws, fputwc, fputws, fwide, getwc,
- getwchar, putwc, putwchar, ungetwc.
- * posix.sgml: Move above functions (add missing) into "implemented
- SUSv3" section.
- * include/cygwin/version.h: Bump api minor number.
-
-2008-12-15 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_registry): Declare dup method.
- * fhandler_registry.cc (fhandler_registry::exists): Fix missing
- parenthesis.
- (fhandler_registry::dup): New method.
-
-2008-12-14 Christopher Faylor <me+cygwin@cgf.cx>
-
- * fhandler_disk_file.cc (readdir_get_ino): Don't complain about MS-DOS
- paths since the function could be fed one by an internal call.
-
-2008-12-13 Christopher Faylor <me+cygwin@cgf.cx>
-
- * cygheap.cc (cygheap_user::~cygheap_user): Remove unneeded if 0'ed
- code.
-
- * fhandler_registry.cc (fhandler_registry::exists): Recode goto as
- if/else to avoid a gcc4 compiler warning.
- (fhandler_registry::open): Ditto. Use one goto rather than two.
-
- * gentls_offsets: Fix compiler warning in generated output.
- * tlsoffsets.h: Regenerate.
-
- * mount.cc (fillout_mntent): slashify native paths returned via
- getmntent.
-
-2008-12-08 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * resolv.h: #include <netinet/in.h> for sockaddr_in typedef.
-
-2008-12-07 Christian Franke <franke@computer.org>
-
- * fhandler_registry.cc (encode_regname): Add Parameter add_val.
- Append "%val" if add_val is set.
- (decode_regname): Remove trailing "%val". Change returncode accordingly.
- (__DIR_hash): New class.
- (d_hash): New macro.
- (key_exists): New function.
- (fhandler_registry::exists): Remove encode of registry name before path
- compare, decode file part of path instead. Skip checks for keys if
- trailing "%val" detected.
- (fhandler_registry::fstat): Change check of return value of
- decode_regname ().
- (fhandler_registry::readdir): Allocate __DIR_hash. Record key names in
- hash table. Append "%val" if key with same name exists. Fix error
- handling of encode_regname (). Set dirent.d_type.
- (fhandler_registry::closedir): Delete __DIR_hash.
- (fhandler_registry::open): Don't open key if trailing "%val" detected
- by decode_regname ().
- (open_key): Ditto.
-
-2008-12-03 Pierre A. Humblet <Pierre.Humblet@ieee.org>
-
- * libc/minires.c (open_sock): Set non blocking and close on exec.
- (res_ninit): Set id pseudo-randomly.
- (res_nsend): Do not set close on exec. Initialize server from id.
- Flush socket. Tighten rules for answer acceptance.
- (res_nmkquery): Update id using current data.
-
-2008-12-02 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_registry.cc (must_encode): Fix condition changed for testing.
-
-2008-12-01 Christian Franke <franke@computer.org>
-
- * fhandler_registry.cc (must_encode): New function.
- (encode_regname): Ditto.
- (decode_regname): Ditto.
- (fhandler_registry::exists): Encode name before path compare.
- (fhandler_registry::fstat): Pass decoded name to win32 registry call.
- (fhandler_registry::readdir): Return encoded name to user.
- (fhandler_registry::open): Store decoded name into value_name.
- (open_key): Pass decoded name to win32 registry call
-
-2008-11-28 Christopher Faylor <me+cygwin@cgf.cx>
-
- * exceptions.c (sigpacket::process): Set tls on return since it is
- assumed to be set to a valid value by the caller.
-
-2008-11-28 Christopher Faylor <me+cygwin@cgf.cx>
-
- * include/cygwin/version.h: Bump api minor number to 189 to flag the
- implementation of dirent.d_type.
-
-2008-11-28 Christopher Faylor <me+cygwin@cgf.cx>
-
- * exceptions.cc (sigpacket::process): Rework previous change. tls
- could still become NULL.
-
-2008-11-28 Christian Franke <franke@computer.org>
-
- * dir.cc (readdir_worker): Initialize dirent.d_type and __d_unused1.
- * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper):
- Set dirent.d_type based on FILE_ATTRIBUTE_*.
- * include/sys/dirent.h: Define _DIRENT_HAVE_D_TYPE (enables DT_*
- declarations).
- (struct dirent): Add d_type. Adjust __d_unused1 size to preserve layout.
-
-2008-11-27 Christopher Faylor <me+cygwin@cgf.cx>
-
- * exceptions.cc (sigpacket::process): Make sure that 'tls' is never
- NULL when used.
-
-2008-11-26 Christopher Faylor <me+cygwin@cgf.cx>
-
- Remove unneeded whitespace throughout.
-
- * fhandler_fifo.cc (fhandler_fifo::open): Rework to cause errno to be
- set to ENXIO when opening a fifo write/nonblocking.
-
- * environ.cc (ucreqenv): Rename to ucenv. Move code from old ucenv
- here and conditionalize it on create_upcaseenv.
- (ucenv): Delete.
- (environ_init): Fix compiler warning by moving create_upcaseenv test to
- ucenv. Don't bother checking for child_proc_info when calling ucenv
- since it is assumed to be NULL at the point where the function is
- called.
-
- * path.cc (symlink_worker): Turn off MS-DOS path warnings when dealing
- with devices since the device handler passes in a translated MS-DOS
- path.
-
- * sec_auth.cc (lsaprivkeyauth): Avoid variable initialization which
- causes a compiler error.
-
- * fhandler_netdrive.cc: Update copyright.
-
-2008-11-26 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (DLL_OFILES): Add setlsapwd.o.
- * cygserver.h (CYGWIN_SERVER_VERSION_API): Bump.
- (request_code_t): Define CYGSERVER_REQUEST_SETPWD request type.
- * cygserver_msg.h (client_request_msg::retval): Use default value of -1
- for retval if msglen is 0.
- * cygserver_sem.h (client_request_sem::retval): Ditto.
- * cygserver_shm.h (client_request_shm::retval): Ditto.
- * cygserver_setpwd.h: New file.
- * external.cc (cygwin_internal): Implement new CW_SET_PRIV_KEY type.
- * sec_auth.cc (open_local_policy): Make externally available.
- Get ACCESS_MASK as argument.
- (create_token): Accommodate change to open_local_policy.
- (lsaauth): Ditto.
- (lsaprivkeyauth): New function fetching token by retrieving
- password stored in Cygwin or Interix LSA private data area and
- calling LogonUser with it.
- * security.h (lsaprivkeyauth): Declare.
- (open_local_policy): Declare.
- * setlsapwd.cc: New file implementing setting LSA private data password
- using LsaStorePrivateData or by calling cygserver if available.
- * syscalls.cc (seteuid32): Add workaround to get the original token
- when switching back to the original privileged user, even if
- setgroups group list is still active. Add long comment to explain why.
- Call lsaprivkeyauth first, only if that fails call lsaauth or
- create_token.
- * include/cygwin/version.h: Bump API minor number.
- * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_SET_PRIV_KEY.
-
-2008-11-21 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_floppy.cc (fhandler_dev_floppy::raw_read): Drop
- initialization of bytes_to_read. Set bytes_to_read to len in
- non-buffered case. Call read_bytes correctly with bytes_to_read
- instead of len.
-
-2008-11-21 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (MapView): Add NT status to debug output.
-
-2008-11-11 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (GetSystemDEPPolicy): Define.
- (GetProcessDEPPolicy): Ditto.
- (SetProcessDEPPolicy): Ditto.
- * dcrt0.cc (disable_dep): New static function.
- (dll_crt0_0): Call disable_dep on platforms requiring it. Add longish
- comment to explain the circumstances.
- * wincap.h (wincaps::ts_has_dep_problem): New element.
- * wincap.cc: Implement above element throughout.
- (wincapc::init): Set ts_has_dep_problem to true on 2008 Terminal
- Servers.
- * winsup.h (WINVER): Set to 0x0601.
-
-2008-11-11 Corinna Vinschen <corinna@vinschen.de>
-
- * mount.cc (mount_info::cygdrive_win32_path): Always upper case
- DOS drive letter to accommodate case sensitivity.
- (cygdrive_getmntent): Ditto.
- * path.cc (path_conv::check): Invalidate wide_path after making path
- relative.
-
-2008-11-11 Corinna Vinschen <corinna@vinschen.de>
-
- * environ.cc (create_upcaseenv): New static variable.
- (renv_arr): New static array to keep track of environment variables
- which have to be always uppercased.
- (idx_arr): Ditto.
- (start_at): Ditto.
- (ucreqenv): New function to uppercase only the environment variables
- from renv_arr.
- (parse_thing): Add "upcaseenv" setting.
- (environ_init): Parse $CYGWIN before doing anything else. Call
- ucreqenv instead of ucenv if CYGWIN=noupcaseenv is set.
-
-2008-11-10 Christopher Faylor <me+cygwin@cgf.cx>
-
- * path.cc (normalize_win32_path): Don't add a trailing '\' if the cwd
- returns a path with a trailing '\'.
-
-2008-11-07 Christopher Faylor <me+cygwin@cgf.cx>
-
- * pthread.cc (pthread_mutex::_unlock): Avoid unlocking a mutex if the
- recursion_counter is already 0.
- (pthread_mutex::_destroy): Don't consider a mutex busy if its
- recursion_counter == 0.
- (pthread_mutex::_fixup_after_fork): Set recursion_counter to 0 to flag
- that we've just forked. Don't reset the owner of this mutex since the
- forkee may think it still owns the mutex. Reinstate initialization of
- win32_obj_id.
-
- * fhandler_floppy.cc (fhandler_dev_floppy::raw_read): Initialize a
- variable to bypass a C++ warning.
-
-2008-11-05 Corinna Vinschen <corinna@vinschen.de>
-
- * environ.cc (environ_init): Avoid evaluating $CYGWIN twice.
-
-2008-10-23 Corinna Vinschen <corinna@vinschen.de>
-
- * wincap.cc (all wincaps): Store in .cygwin_dll_common section same as
- wincap. Add comment to explain why.
-
-2008-10-22 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (GetSystemWindowsDirectoryW): Define.
- * kernel32.cc (GetWindowsDirectoryW): Implement to abstract from
- running under Terminal Services or not.
- (GetWindowsDirectoryA): Ditto.
-
-2008-10-21 Corinna Vinschen <corinna@vinschen.de>
-
- * passwd.cc (pwdgrp::read_passwd): Check if we're called within
- user_shared initialization and ignore myself, if so. Reformat
- conditional expression.
-
-2008-10-20 Corinna Vinschen <corinna@vinschen.de>
-
- * ntdll.h (NtSetAttributesFile): New inline function.
- * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Use
- NtSetAttributesFile.
- * path.cc (symlink_worker): Ditto.
- * syscalls.cc (unlink_nt): Ditto.
- (rename): Omit FILE_SHARE_DELETE when opening files on Samba. Add
- comment to explain why.
-
-2008-10-17 Corinna Vinschen <corinna@vinschen.de>
-
- * dtable.cc (dtable::get_debugger_info): Call SetStdHandle
- for the newly opened handle. Explain why.
- (dtable::stdio_init): Don't duplicate standard error handle
- when stderr has already been created under debugger control.
-
-2008-10-13 Corinna Vinschen <corinna@vinschen.de>
-
- * sec_acl.cc (setacl): Align standard owner and group permissions
- with alloc_sd. Strip FILE_READ_ATTRIBUTES fromn setting
- FILE_GENERIC_EXECUTE permissions same as in alloc_sd.
- * security.cc (alloc_sd): Reformat expression. Strip EA permission
- bits from owner_deny and group_deny computation.
-
-2008-10-09 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_base::fstat_helper): Check
- for executable suffixes here in case we're on a file system
- not supporting permission.
- * path.cc (path_conv::check): Drop check for executable suffixes.
-
-2008-10-09 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_floppy.cc (fhandler_dev_floppy::raw_read): Keep track of
- current position in non-buffered case, too.
-
-2008-10-09 Corinna Vinschen <corinna@vinschen.de>
-
- * grp.cc (pwdgrp::read_group): Generate more speaking group name
- if passwd gid exists under different gid in /etc/group.
-
-2008-10-09 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (path_conv::is_binary): Always check for GetBinaryType.
- * syscalls.cc (rename): Fix test for just changing case of name on
- case insensitive filesystems.
-
-2008-10-09 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink_info::check_shortcut): Don't check for executability
- here.
- (symlink_info::check_sysfile): Ditto.
-
-2008-10-08 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (path_conv::check): Only assume executability by suffix
- on file systems not supporting permissions.
-
-2008-10-07 Christopher Faylor <me+cygwin@cgf.cx>
-
- * pthread.cc (pthread_create): Very minor formatting change.
- * timer.cc (timer_thread): Ensure that any created thread defaults to
- detached state.
-
-2008-10-06 Christopher Faylor <me+cygwin@cgf.cx>
-
- * cygtls.h (_cygtls::initialized): Remove bogus stack check which would
- crash when checking the current thread from the current thread.
- * tlsoffsets.h: Regenerate.
-
-2008-10-05 Christopher Faylor <me+cygwin@cgf.cx>
-
- * dcrt0.cc (dll_crt0_0): Don't initialize signals early when
- dynamically loaded.
- (dll_crt0_1): Wait until this phase to initialize signals when
- dynamically loaded.
-
-2008-09-29 Christopher Faylor <me+cygwin@cgf.cx>
-
- * thread.cc (pthread_mutex::_fixup_after_fork): Reinstate DEBUGGING
- conditional.
-
-2008-09-29 Christopher Faylor <me+cygwin@cgf.cx>
-
- * thread.cc (pthread_mutex::_fixup_after_fork): Just reset lock to
- pristine state after fork. Don't recreate a mutex since it may not
- actually be needed.
-
-2008-09-29 Corinna Vinschen <corinna@vinschen.de>
-
- * flock.cc (inode_t::get_all_locks_list): Fix typo.
- * posix.sgml: Add cfmakeraw to list of implemented BSD functions.
-
-2008-09-19 Eric Blake <ebb9@byu.net>
-
- * errno.cc (_sys_errlist): Add ECANCELED, ENOTRECOVERABLE,
- EOWNERDEAD.
-
-2008-09-15 Christopher Faylor <me+cygwin@cgf.cx>
-
- * cygtls.h (unionent): Move from net.cc.
- (unionent::struct_type): Move enum here.
- (_local_storage::hostent_buf): Define as unionent.
- (_local_storage::protoent_buf): Ditto.
- (_local_storage::servent_buf): Ditto.
- * net.cc (unionent): Move to cygtls.h.
- (struct_type): Ditto.
- (dup_ent): Define one function per {host,proto,serv}ent type.
- (cygwin_getprotobyname): Simplify dup_ent call. Removed now-unneeded
- return type coercion.
- (cygwin_getprotobynumber): Ditto.
- (cygwin_getservbyname): Ditto.
- (cygwin_getservbyport): Ditto.
- (cygwin_gethostbyname): Ditto.
- (cygwin_gethostbyaddr): Ditto.
- tlsoffsets.h: Regenerate.
-
-2008-09-12 Christopher Faylor <me+cygwin@cgf.cx>
-
- * Makefile.in: Add -c option which is now removed from COMPILE_C*.
- * cygwin.din (cfmakeraw): Export.
- * termios.cc (cfmakeraw): Implement.
- * include/sys/termios.h (cfmakeraw): Declare.
- * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
-
-2008-09-11 Christopher Faylor <me+cygwin@cgf.cx>
-
- * cygwin.din (sys_sigabbrev): Add this here.
- * dcrt0.cc (__argc,__argv,_check_for_executable): Remove dllexport
- decoration since it is already handled in cygwin.din.
- * errno.cc (_sys_errlist): Ditto.
- * strsig.cc (sys_sigabbrev): Ditto.
- * include/cygwin/signal.h: Protect use of dllimport when
- __INSIDE_CYGWIN__.
- * libc/getopt.c: Revert previous changes. Define __INSIDE_CYGWIN__.
-
-2008-09-11 Christopher Faylor <me+cygwin@cgf.cx>
-
- * localtime.cc (increment_overflow): Mark as non-inline to prevent
- compiler from complaining about the very thing we're trying to test.
- * ntea.cc (read_ea): Reorganize to avoid a new compiler warning/error.
- * sched.cc (sched_rr_get_interval): Ditto.
- * select.cc (peek_serial): Ditto.
- * libc/rexec.cc (ruserpass): Ditto.
- * posix_ipc.cc (ipc_names): Make static to avoid a compiler warning
- (and it's the right thing to do anyway).
-
-2008-09-11 Christopher Faylor <me+cygwin@cgf.cx>
-
- * net.cc (in6addr_any, in6addr_loopback): Add appropriate number of
- braces around initializer.
- (dup_ent): Try harder to coerce the first argument to deal with more
- stringent compiler.
- (get_2k_ifs): Remove extraneous typedef.
- (get_2k_ifs): Reorganize expression to avoid a compiler warning.
- (get_xp_ifs): Ditto.
- (get_nt_ifs): Ditto.
-
-2008-09-11 Christopher Faylor <me+cygwin@cgf.cx>
-
- * fhandler.h (fhandler_pipe::raw_read): Remove __stdcall decoration.
- * pipe.cc (fhandler_pipe::raw_read): Ditto.
-
-2008-09-11 Christopher Faylor <me+cygwin@cgf.cx>
-
- * cygheap.cc (creturn): Reorganize to avoid a new compiler
- warning/error.
- * dtable.cc (handle_to_fn): Ditto.
- * fhandler_console.cc (fhandler_console::read): Ditto.
- (fhandler_console::scroll_screen): Ditto.
- (dev_console::set_color): Ditto.
- * fhandler_dsp.cc (fhandler_dev_dsp::write): Ditto.
- (fhandler_dev_dsp::read): Ditto.
- * fhandler_tape.cc (mtinfo_drive::get_status): Ditto.
- * hookapi.cc (find_first_notloaded_dll): Ditto.
- * mmap.cc (msync): Ditto.
- * pipe.cc (pipesync::pipesync): Ditto.
- * sec_acl.cc (getace): Ditto.
- * sec_auth.cc (create_token): Ditto.
- (lsaauth): Ditto.
- * select.cc (peek_pipe): Ditto.
- * spawn.cc (av::fixup): Ditto.
- * syscalls.cc (popen): Ditto.
- * tty.cc (tty::init_session): Ditto.
- * uinfo.cc (pwdgrp::load): Ditto.
- * fhandler.cc (fhandler_base::setup_overlapped): Ditto.
- (fhandler_base::wait_overlapped): Rename second use of res variable to
- wres or errors are not returned correctly.
- * dcrt0.cc: Remove obsolete variable.
- * dll_init.cc (release_upto): Fix typo involving incorrect use of '|'.
- * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Avoid a
- compiler warning regarding coercing type-punned variables.
- (fhandler_base::fstat_by_name): Ditto.
- * fhandler_fifo.cc (fhandler_fifo::open_nonserver): Fix = vs. == typo.
- (fhandler_fifo::wait): Add all conditions to switch statement to avoid
- a compiler warning.
- * fhandler_process.cc: Avoid unneeded initialization of variables to
- zero.
- * fhandler_socket.cc (fhandler_socket::listen): Add braces around
- initializer.
- * flock.cc (inode_t::get_all_locks_list): Reorganize to avoid a
- compiler warning. Fix problem with EWOULDBLOCK error return.
- * path.cc (GUID_shortcut): Use braces around struct initializer.
- (cygwin_conv_path): Reorganize to avoid a compiler warning.
- * random.cc (dummy): Mark variable as volatile to avoid a "used
- uninitialized" warning.
- * libc/getopt.c: Mark some variables as dllexport although gcc doesn't
- seem to do the right thing with them.
- * libc/minires-os-if.c (get_registry_dns_items): Coerce some function
- arguments to avoid a compiler warning.
-
-2008-08-27 Christopher Faylor <me+cygwin@cgf.cx>
-
- * fhandler_tty.cc (close_maybe): Check for both types of invalid handle
- before attempting CloseHandle.
- (fhandler_pty_master::setup): Only set inheritance on pty handles, not
- tty handles.
-
-2008-08-26 Christopher Faylor <me+cygwin@cgf.cx>
-
- * shared_info.h (shared_info::create_root_entry): Remove extraneous
- mount_info:: from declaration.
-
-2008-08-26 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_pipe): Rename read and write
- declarations to raw_read and raw_write.
- * pipe.cc (fhandler_pipe::raw_read): Rename from read.
- (fhandler_pipe::raw_write): Rename from write.
-
-2008-08-21 Christopher Faylor <me+cygwin@cgf.cx>
-
- * fhandler.cc (fhandler_base::wait_overlapped): Reorganize again to
- accommodate what appears to be an MSDN hint about not resetting the
- overlapped event prior to calling GetOverlappedResult.
-
-2008-08-20 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink_info::check_shortcut): If file can't be opened,
- treat it as non-symlink rather than generating an EIO error.
- (symlink_info::check_sysfile): Ditto.
-
-2008-08-19 Christopher Faylor <me+cygwin@cgf.cx>
-
- * fhandler.cc (fhandler_base::wait_overlapped): Always assume that
- bytes will be non-NULL. Distinguish input result from result derived
- from WFMO and GetOverlappedResult or res can never be -1. Only raise
- SIGPIPE when writing.
- * fhandler.h (fhandler_base::wait_overlapped): Pass first argument by
- value.
- * fhandler_fifo.cc (fhandler_fifo::wait): Pass in dummy byte count to
- wait_overlapped.
- * pipe.cc (DEFAULT_PIPEBUFSIZE): Define to 65536 explicitly.
-
-2008-08-19 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Drop fattr variable
- and use FILE_ATTRIBUTE_DIRECTORY directly in call to NtCreateFile.
- * posix_ipc.cc (ipc_mutex_init): Fix format string when creating IPC
- object name.
- (ipc_cond_init): Ditto.
- * security.cc (alloc_sd): Add parentheses to fix setting initial
- owner_allow value.
-
-2008-08-18 Christopher Faylor <me+cygwin@cgf.cx>
-
- * fhandler.cc (fhandler_base::wait_overlapped): Don't treat
- ERROR_BROKEN_PIPE as a non-error. Do raise SIGPIPE when it is
- detected.
-
-2008-08-15 Corinna Vinschen <corinna@vinschen.de>
-
- * mount.cc (mount_info::get_mounts_here): Don't subtract 2 from
- Length if it's 0 anyway.
-
-2008-08-15 Corinna Vinschen <corinna@vinschen.de>
-
- * mount.cc (mount_info::create_root_entry): Create default cygdrive
- prefix with MOUNT_NOPOSIX flag.
-
-2008-08-15 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink_info::check): Don't use eabuf when trying to open
- file a second time. Call NtOpenFile instead of NtCreateFile in this
- case.
-
-2008-08-14 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::link): Fix linking
- against symlinks.
-
-2008-08-14 Corinna Vinschen <corinna@vinschen.de>
-
- * external.cc (cygwin_internal): Call set_security_attribute with
- additional path_conv argument.
- * fhandler.cc (fhandler_base::open): Ditto.
- * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Never set DOS
- R/O attribute when using ACLs.
- (fhandler_disk_file::mkdir): Ditto. Set
- security descriptor on remote dirs after creating the dir, same as in
- fhandler_base::open.
- * fhandler_socket.cc (fhandler_socket::bind): Ditto for remote AF_LOCAL
- socket files.
- * path.cc (symlink_worker): Ditto. for remote symlinks.
- * security.cc (alloc_sd): Take additional path_conv argument.
- Accommodate throughout. Drop setting FILE_WRITE_EA/FILE_READ_EA
- flags unconditionally (was only necessary for "ntea"). Don't set
- FILE_READ_ATTRIBUTES and FILE_WRITE_ATTRIBUTES unconditionally on
- Samba. Add comment to explain. Drop useless setting of
- STANDARD_RIGHTS_WRITE, it's in FILE_GENERIC_WRITE anyway.
- Remove FILE_READ_ATTRIBUTES bit from FILE_GENERIC_EXECUTE so as not
- to enforce read permissions on Samba.
- (set_security_attribute): Take additional path_conv argument.
- * security.h (set_security_attribute): Change prototype accordingly.
-
-2008-08-13 Corinna Vinschen <corinna@vinschen.de>
-
- * mount.cc (fillout_mntent): Always print noumount option last.
-
-2008-08-13 Corinna Vinschen <corinna@vinschen.de>
-
- * mount.cc (fillout_mntent): Print options as taken in fstab and mount.
-
-2008-08-13 Corinna Vinschen <corinna@vinschen.de>
-
- * dll_init.cc: Throughout convert to use long pathnames.
- * dll_init.h (struct dll): Change name to WCHAR, change operator [] to
- take PWCHAR argument.
-
-2008-08-11 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (rename): If newpath doesn't exist, check if .exe suffix
- in oldpath has been omitted before appending .exe to newpath.
-
-2008-08-09 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_floppy.cc (fhandler_dev_floppy::raw_read): Don't set
- eom_detected when EOF is detected, thus returning 0 instead of
- setting errno to ENOSPC.
-
-2008-08-07 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Use Samba workaround generally
- for all remote filesystems supporting ACLs. Change comment and
- explain why. Refer to the discussion which led to this.
-
-2008-08-05 Brian Dessent <brian@dessent.net>
-
- * config/i386/profile.h (mcount): Mark asms volatile.
-
-2008-08-05 Christopher Faylor <me+cygwin@cgf.cx>
-
- * dll_init.cc (dll_global_dtors): Add an additional test to avoid
- walking the linked list if it is empty.
- (dll_list::detach): Don't set dll_global_dtors_recorded if we aren't
- actually going to record any dlls.
-
-2008-08-04 Christopher Faylor <me+cygwin@cgf.cx>
-
- Changes suggested by Dave Korn.
- * dcrt0.cc (cygwin_exit): Remove (hopefully) extraneous call to
- dll_global_dtors.
- * dll_init.cc (dll_global_dtors): Run destructors in reverse
- dependency/load order.
- * dll_init.h (dll_list): Add dll_global_dtors as a friend.
-
-2008-08-01 Christopher Faylor <me+cygwin@cgf.cx>
-
- * dcrt0.cc (dll_crt0_1): Add a symbol denoting return from call to
- main().
- * exceptions.cc (stack_info::walk): Stop walking the stack when we
- hit _cygwin_exit_return rather than just blindly stopping when PC
- becomes zero.
-
-2008-07-31 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink_info::check): Handle (and explain) a special case
- when accessing files matching DOS device names on SMB shares.
-
-2008-07-31 Corinna Vinschen <corinna@vinschen.de>
-
- * spawn.cc (spawn_guts): Check constructed short pathname for being
- a DOS device name and fall back to long path name, if so.
-
-2008-07-30 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_base::fstat_by_name): Check for
- file systems incapable of handling FileIdBothDirectoryInformation
- correctly.
- (fhandler_disk_file::opendir): Ditto.
- * path.cc (fs_info::update): Always clear at the start.
- Rearrange to make certain tests only on non-Samba, non-NFS remote
- drives.
- Add test for file systems known to be incapable of handling
- FileIdBothDirectoryInformation correctly. Right now that's just
- "UNIXFS".
- * path.h (struct fs_info): Add has_buggy_fileid_dirinfo flag and
- accessor methods.
- (class path_conv): Add has_buggy_fileid_dirinfo method.
-
-2008-07-30 Corinna Vinschen <corinna@vinschen.de>
-
- * sec_auth.cc (extract_nt_dom_user): Return domain and user name as
- WCHAR.
- (cygwin_logon_user): Accommodate above change. Convert password to
- WCHAR and call LogonUserW.
- * external.cc (cygwin_internal): Accommodate above change.
- * security.h (extract_nt_dom_user): Change prototype accordingly.
-
-2008-07-30 Christopher Faylor <me+cygwin@cgf.cx>
-
- * cygwin.din (_getutline): Remove.
- * lib/bsdlib.cc (login): Make argument const as per linux.
- (logout): Ditto.
- * syscalls.cc (getutid): Ditto.
- (getutline): Ditto.
- (pututline): Ditto.
- (getutxent): Add comment mentioning non-thread-safety.
- (getutxid): Ditto.
- (getutxline): Ditto.
- (pututxline): Ditto.
- * sys/utmp.h: Declare arguments to various functions as const as per
- linux. Remove bogus _getutline definition.
-
-2008-07-29 Christopher Faylor <me+cygwin@cgf.cx>
-
- * include/cygwin/version.h: Add comment indicating that current API number
- bump also has another consequence.
-
-2008-07-29 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (DLL_OFILES): Remove v8 regexp files.
- (OBSOLETE_FUNCTIONS): Remove v8 regexp functions.
- (NEW_FUNCTIONS): Remove POSIX regex functions.
- * cygwin.din: Export POSIX regex functions with their correct symbol
- name. Export with posix_ prefix for backward compatibility.
- * syscalls.cc (regfree): Remove ancient fake function.
- * regex/regex.h: Remove renaming regex functions within Cygwin.
- * regexp/*: Remove.
- * include/cygwin/version.h: Bump API minor number.
-
-2008-07-27 Corinna Vinschen <corinna@vinschen.de>
- Christopher Faylor <me+cygwin@cgf.cx>
-
- * dcrt0.cc (dll_crt0_0): Remove calling malloc_init and
- user_shared_initialize_1 from here.
- (dll_crt0_1): Remove dynamically_loaded check. Just call malloc_init
- and user_shared_initialize unconditionally.
- * shared.cc (user_shared_create): Rename from user_shared_initialize.
- (user_shared_initialize): Rename from user_shared_initialize_1. Move
- complete user_shared content initialization code here from
- user_shared_create.
- * syscalls.cc (seteuid32): Remove call to user_shared_initialize_1.
- That is implied by the "true" argument to user_shared_create().
-
-2008-07-27 Christopher Faylor <me+cygwin@cgf.cx>
-
- * mount.cc (mount_info::init): Add location where we're looking for
- fstab to temporary message.
-
- * lib/cygwin_crt0.c (cygwin_crt0): Simplify by eliminating
- accommodations for ancient cygwin DLLs.
- * lib/crt0.h: Include <windows.h> directly since it is needed.
-
-2008-07-27 Christopher Faylor <me+cygwin@cgf.cx>
-
- * shared_info.h (shared_destroy): Declare.
- * shared.cc (shared_destroy): Define new function to destroy shared
- memory regions.
- * init.cc (dll_entry): Call shared_destroy when dll detaches from the
- process.
-
-2008-07-27 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::send_internal): Send never more
- then 64K bytes at once. For blocking sockets, loop until entire data
- has been sent or an error occurs.
- (fhandler_socket::sendto): Drop code which sends on 64K bytes.
- (fhandler_socket::sendmsg): Ditto.
-
-2008-07-26 Christopher Faylor <me+cygwin@cgf.cx>
-
- * fhandler_tty.cc (fhandler_pty_master::setup): Reorganize so that all
- operations for each end of the pipe are grouped together.
-
-2008-07-25 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc (dll_crt0_1): Call malloc_init and user_shared_initialize_1
- only in non-dynamically loaded case.
-
-2008-07-25 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc (dll_crt0_0): Call malloc_init and user_shared_initialize_1
- here in case we're dynamically loaded. Explain why.
- (dll_crt0_1): Call user_shared_initialize_1 from here.
- * mount.cc (is_native_path): New inline function testing for native
- and long Win32 path prefix.
- (is_unc_share): Remove long WIn32 path prefix test.
- (mount_info::create_root_entry): Use PATH_MAX buffer.
- (mount_info::init): Ditto.
- (mount_info::add_item): Test for is_native_path as well.
- * path.cc (normalize_win32_path): Simplify native path prefix code.
- * shared.cc (user_shared_initialize_1): New function taking user
- shared initialization code relying on malloc and cygtls.
- (user_shared_initialize): Move mountinfo initialization to
- user_shared_initialize_1.
- * shared_info.h (user_shared_initialize_1): Declare.
- * syscalls.cc (seteuid32): Call user_shared_initialize_1 after user
- changed.
-
-2008-07-24 Corinna Vinschen <corinna@vinschen.de>
-
- * mount.cc (mount_info::from_fstab): Change system_printf to
- debug_printf on NtOpenFile failure.
-
-2008-07-24 Corinna Vinschen <corinna@vinschen.de>
-
- * shared.cc (user_shared_initialize): Fetch potentially changed Cygwin
- username from /etc/passwd before loading mount table.
- (shared_info::init_installation_root): New function fetching Cygwin's
- installation root dir and storing as native NT path in global shared
- memory.
- (shared_info::initialize): Call init_installation_root exactly once at
- first startup.
- * shared_info.h (SHARED_INFO_CB): Accommodate change to shared_info.
- (CURR_SHARED_MAGIC): Ditto.
- (class shared_info): Add installation_root member.
- (shared_info::init_installation_root): Declare.
-
- * grp.cc (pwdgrp::read_group): Call pwdgrp::load with native WCHAR path.
- * passwd.cc (pwdgrp::read_passwd): Ditto. Avoid recursion.
- (etc::init): Take POBJECT_ATTRIBUTES instead of path_conv.
- * path.h (etc::init): Change prototype accordingly.
- * pwdgrp.h (class pwdgrp): Store path as UNICODE_STRING/PWCHAR instead
- of as path_conv.
- (pwdgrp::load): Accommodate prototype.
- * uinfo.cc (pwdgrp::load): Change argument type from char to wchar_t.
- Create native NT path here instead of calling path_conv.
-
- * mount.cc (find_root_from_cygwin_dll): Drop in favor of global
- initializaion in shared_info.
- (mount_info::init): Fetch native NT root dir from cygwin_shared.
- (mount_info::from_fstab): Expect native NT path and use native NT
- functions to access file. Convert username part in user fstab path
- according to special char transformation rules.
- * path.cc (tfx_chars): Convert slash to backslash.
- (transform_chars): Implement for path given as PWCHAR.
- (transform_chars): PUNICODE_STRING version calls PWCHAR version.
- Remove useless commented code.
-
-2008-07-22 Corinna Vinschen <corinna@vinschen.de>
-
- * spawn.cc (spawn_guts): Fix previous patch for UNC paths.
-
-2008-07-22 Corinna Vinschen <corinna@vinschen.de>
-
- * spawn.cc (spawn_guts): Remove long path prefix from win32 path
- before calling CreateProcess if path length is < MAX_PATH.
-
-2008-07-22 Corinna Vinschen <corinna@vinschen.de>
-
- * include/ctype.h: Declare __ctype_ptr__ to keep newlib build happy.
-
-2008-07-19 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (WNetGetProviderNameA): Define.
- (WNetGetResourceParentA): Remove.
- * fhandler_netdrive.cc (struct net_hdls): New structure to keep
- WNet handles. Stored in dir->__handle throughout.
- (thread_netdrive): Rewrite to enumerate all servers in all accessible
- domains and workgroups.
- (fhandler_netdrive::readdir): Simplify toplevel code. Lowercase all
- server names in toplevel.
- (fhandler_netdrive::rewinddir): Close all WNet handles and free
- net_hdls structure.
-
-2008-07-18 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Rename x to fh. On Samba, always
- create file with NULL security descriptor and set the permissions
- afterwards. Explain why.
-
-2008-07-18 Corinna Vinschen <corinna@vinschen.de>
-
- * environ.cc (known): Remove "binmode" option.
- * fhandler.cc (binmode): Remove.
- (fhandler_base::set_flags): Accommodate binmode removal.
- * path.h (path_conv::set_binary): Remove.
- * pipe.cc (pipe): Create pipes always as binary pipes.
- * winsup.h (binmode): Remove declaration.
-
-2008-07-17 Corinna Vinschen <corinna@vinschen.de>
-
- * mount.cc (mount_info::from_fstab_line): Default to binary mount.
-
-2008-07-16 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (allow_winsymlinks): Revert default to create system bit
- symlinks for speed.
-
-2008-07-16 Corinna Vinschen <corinna@vinschen.de>
-
- Add case-sensitivity.
- Unconditionally handle mount points case-sensitive.
- Unconditionally handle virtual paths case-sensitive.
- Unconditionally handle registry paths case-insensitive.
- Otherwise, accommodate case-sensitivity of given path throughout.
- * cygheap.cc (cygheap_root::set): Get additional caseinsensitive
- parameter and store it.
- * cygheap.h (struct cygheap_root_mount_info): Add member
- caseinsensitive.
- * dlfcn.cc (get_full_path_of_dll): Drop PC_NOFULL parameter from call
- to path_conv::check.
- * environ.cc (pcheck_case): Remove.
- (check_case_init): Remove.
- (known): Drop "check_case" option.
- * exceptions.cc (open_stackdumpfile): Add comment.
- * fhandler.cc (fhandler_base::get_default_fmode): Call pathmatch
- instead of strcasematch.
- * fhandler_disk_file.cc: Accommodate case-sensitivity of given path
- throughout.
- (__DIR_mounts::check_mount): Unconditionally check virtual paths
- case-sensitive.
- (fhandler_disk_file::link): Drop case clash handling.
- (fhandler_disk_file::open): Ditto.
- (fhandler_disk_file::readdir_helper): Drop managed mount code.
- * mount.cc: Remove managed mount code and datastructures.
- (struct opt): Remove "managed" option. Add "posix=0" and "posix=1"
- options.
- (fillout_mntent): Remove "managed" output. Add "posix" output.
- * path.cc (struct symlink_info): Remove case_clash member and
- case_check method.
- (pcheck_case): Remove.
- (path_prefix_p): Take additional bool parameter "caseinsensitive".
- (pathnmatch): Ditto.
- (pathmatch): Ditto.
- (mkrelpath): Ditto.
- (fs_info::update): Set caseinsensitive flag according to file system
- name and FILE_CASE_SENSITIVE_SEARCH flag. Add comment.
- (tfx_chars_managed): Remove.
- (transform_chars): Drop "managed" parameter. Always use tfx_chars.
- (get_nt_native_path): Drop "managed" parameter. Make sure drive letters
- are always upper case.
- (getfileattr): Change second parameter to denote caseinsensitivity.
- (path_conv::check): Initialize caseinsensitive to OBJ_CASE_INSENSITIVE.
- Set caseinsensitive according to global obcaseinsensitive flag, file
- system case sensitivity and MOUNT_NOPOSIX mount flag.
- Drop case_clash and all the related code.
- (symlink_worker): Drop case clash handling.
- (symlink_info::set): Drop setting case_clash.
- (symlink_info::case_check): Remove.
- (cwdstuff::set): Add comment.
- (etc::init): Take path_conv instead of PUNICODE_STRING as parameter to
- allow case sensitivity.
- * path.h (enum pathconv_arg): Drop PC_SYM_IGNORE.
- (enum case_checking): Remove.
- (enum path_types): Drop PATH_ENC, add PATH_NOPOSIX flag.
- (struct fs_info): Add caseinsensitive flag and accessor methods.
- (class path_conv): Add caseinsensitive member and define
- objcaseinsensitive method. Drop case_clash member and isencoded method.
- (pathmatch): Change prototype according to above change.
- (pathnmatch): Ditto.
- (path_prefix_p): Ditto.
- (get_nt_native_path): Ditto.
- (class etc): Ditto.
- (fnunmunge): Remove prototype.
- * shared.cc (shared_info::init_obcaseinsensitive): Initialize
- obcaseinsensitive flag from obcaseinsensitive registry value.
- (shared_info::initialize): Call init_obcaseinsensitive here by the
- first process creating the shared memory.
- * shared_info.h (mount_item::fnmunge): Remove.
- (shared_info::obcaseinsensitive): Rename from obcaseinsensitivity.
- (shared_info::init_obcaseinsensitive): Declare.
- * syscalls.cc (try_to_bin): Add comment.
- * include/sys/mount.h (MOUNT_ENC): Remove flag.
- (MOUNT_NOPOSIX): Add flag.
-
-2008-07-15 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_tape.cc (mtinfo::initialize): Remove synchronization stuff.
- Just initialize drive data.
- * mtinfo.h (MTINFO_MAGIC): Remove.
- (MTINFO_VERSION): Remove.
- (class mtinfo): Remove magic and version members.
- * shared.cc (shared_info::initialize): Move call to
- get_session_parent_dir so that the dir creation is only called once.
- Move call to mt.initialize so that it's called only by the first
- process creating the shared memory.
- * shared_info.h (SHARED_INFO_CB): Accommodate change to shared_info.
- (CURR_SHARED_MAGIC): Ditto.
- (class shared_info): Add obcaseinsensitivity member.
-
-2008-07-14 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::fpathconf): On _PC_POSIX_PERMISSIONS
- and _PC_POSIX_SECURITY, return true for NFS, too.
-
-2008-07-14 Corinna Vinschen <corinna@vinschen.de>
-
- Throughout drop allow_ntsec and allow_smbntsec handling.
- * environ.cc (set_ntsec): Remove.
- (set_smbntsec): Remove.
- (known): Remove ntsec and smbntsec options.
- * external.cc (check_ntsec): Return true if no filename is given.
- * mount.cc (oopts): Add "acl" and "noacl" options. Set MOUNT_NOACL
- flag accordingly.
- (fillout_mntent): Handle MOUNT_NOACL flag.
- * path.h (enum path_types): Add PATH_NOACL.
- * security.cc (allow_ntsec): Remove.
- (allow_smbntsec): Remove.
- * security.h (allow_ntsec): Drop declaration.
- (allow_smbntsec): Drop declaration.
- * include/sys/mount.h (MOUNT_NOACL): Define.
-
-2008-07-14 Corinna Vinschen <corinna@vinschen.de>
-
- * miscfuncs.cc (cygwin_strncasecmp): Fix bug which results in
- prematurely truncated strings. Simplify target length argument to
- sys_mbstowcs.
-
-2008-07-14 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (GetExtendedTcpTable): Define.
- * fhandler_socket.cc (address_in_use): Take const struct sockaddr
- pointer as argument. Implement additional AF_INET6 table check.
- (fhandler_socket::bind): Drop AF_INET test before calling
- address_in_use.
- * net.cc (ipv4_getnameinfo): Return EAI_FAMILY instead of 1 if
- called with unsupported af_family.
-
-2008-07-12 Eric Blake <ebb9@byu.net>
-
- Fix usage of recently fixed Interlocked* functions.
- * winbase.h (ilockincr, ilockdecr, ilockexch, ilockcmpexch): Add
- volatile qualifier, to match Interlocked* functions.
-
-2008-07-11 Corinna Vinschen <corinna@vinschen.de>
-
- * select.cc (peek_pipe): Temporarily revert patch from 2008-05-30.
-
-2008-07-11 Corinna Vinschen <corinna@vinschen.de>
-
- Change length for domain buffers from INTERNET_MAX_HOST_NAME_LENGTH to
- MAX_DOMAIN_NAME_LEN throughout.
- * cyglsa.h (CYG_LSA_MAGIC): New value.
- (cyglsa_t): Define username and domain as WCHAR arrays.
- * errno.cc (errmap): Add mapping for ERROR_NONE_MAPPED.
- * sec_auth.cc: Drop 'w' prefix from WCHAR string variable names where
- appropriate.
- (extract_nt_dom_user): Prefer resolving by SID before resolving by
- domain\name pair.
- (cygwin_logon_user): Don't print cleartext password in debug output.
- Change comment.
- (get_user_groups): Revert calls to LookupAccountNameW to use NULL
- server instead of explicit server name, according to MSDN.
- (get_user_local_groups): Ditto.
- (get_server_groups): Fetch domain and user name from usersid per
- LookupAccountSidW instead of calling extract_nt_dom_user.
- (lsaauth): Fetch domain and user name from usersid per LookupAccountSidW
- instead of calling extract_nt_dom_user.
- * sec_helper.cc (cygpriv): Convert to wchar_t pointer array.
- (privilege_luid): Convert first parameter to PWCHAR.
- (privilege_name): Return wchar_t pointer.
- (set_privileges): Accommodate debug output.
- * security.h (privilege_luid): Change prototype accordingly.
-
-2008-07-10 Corinna Vinschen <corinna@vinschen.de>
-
- * cyglsa.h (SECURITY_STRING): Define.
- (enum _SECPKG_NAME_TYPE): Define.
- (struct _SECPKG_CALL_INFO): Define.
- (struct _LSA_SECPKG_FUNCS): Extend to full size. Define unused
- functions lazily.
- (cygprf_t): Define.
- * sec_auth.cc (lsaauth): Use actual primary group if no admins group.
- Add (disabled) code to fetch token from profil data.
-
-2008-07-09 Corinna Vinschen <corinna@vinschen.de>
-
- * sec_auth.cc (verify_token): Allow builtin groups missing in a token
- and it's still valid. Explain why.
-
-2008-07-09 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (DsGetDcNameW): Replace DsGetDcNameA.
- * dcrt0.cc (child_info_spawn::handle_spawn): Drop artificial
- supplementary group list from calling setgroups in parent.
- * grp.cc (internal_getgroups): Drop 9x-only code. Reformat.
- * sec_auth.cc (get_logon_server): Do everything in WCHAR only.
- (get_user_groups): Ditto. Use wlogonserver in LookupAccountNameW
- calls, too.
- (is_group_member): Get logon server as first argument and use in call
- to NetLocalGroupGetMembers.
- (get_user_local_groups): Get logon server as first argument and use in
- calls to NetLocalGroupEnum and LookupAccountNameW. Revamp to work
- more correctly in domain environments.
- (get_server_groups): Accommodate aforementioned changed function calls.
- * security.h (get_logon_server): Change prototype accordingly.
- * uinfo.cc (cygheap_user::env_logsrv): Accommodate changed
- get_logon_server call.
-
-2008-07-09 Corinna Vinschen <corinna@vinschen.de>
-
- * grp.cc (internal_getgroups): Also add integrity-enabled groups.
-
-2008-07-09 Corinna Vinschen <corinna@vinschen.de>
-
- * sec_auth.cc (verify_token): Disable code which returns false if
- the token contains additional groups not requested by setgroups.
- Explain why.
-
-2008-07-08 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::bind): Don't run explicit
- local socket test in SO_REUSEADDR case on systems supporting
- enhanced socket security. Explain why. Only call address_in_use
- for AF_INET sockets.
- * net.cc (cygwin_setsockopt): Don't call setsockopt to set SO_REUSEADDR
- on systems supporting enhanced socket security. Add comment.
- * wincap.h (wincaps::has_enhanced_socket_security): New element.
- * wincap.cc: Implement above element throughout.
-
-2008-07-08 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (ipv6_inited): Make NO_COPY.
-
-2008-07-02 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (path_conv::is_binary): Fix test. Add comment.
-
-2008-06-24 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_bindresvport_sa): Fix usage of last_used_bindresvport.
-
-2008-06-21 Corinna Vinschen <corinna@vinschen.de>
-
- * include/limits.h (PATH_MAX): Add comment.
- * include/cygwin/config.h (__FILENAME_MAX__): Define as 4096. Add
- comment.
-
-2008-06-19 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_tty.cc (fhandler_pty_master::setup): Fix pipe inheritance.
-
-2008-06-18 Christopher Faylor <me+cygwin@cgf.cx>
-
- * strsig.cc (strsignal): Return non-const buffer to allow building with
- recent newlib change.
-
-2008-06-17 Corinna Vinschen <corinna@vinschen.de>
-
- * sec_auth.cc (DsGetDcNameA): Drop declaration.
- (DS_FORCE_REDISCOVERY): Drop definition.
-
-2008-06-17 Christopher Faylor <me+cygwin@cgf.cx>
-
- * spawn.cc (spawn_guts): Reinstate call to
- fhandler_console::need_invisible since it is required to prevent
- console flashing.
-
-2008-06-17 Corinna Vinschen <corinna@vinschen.de>
-
- * include/resolv.h (_getshort): Drop declaration.
- (_getlong): Ditto.
-
-2008-06-12 Corinna Vinschen <corinna@vinschen.de>
-
- * mount.cc (mount_info::get_cygdrive_info): Fix usage of user and
- system arguments. Strip trailing slash from path for backward
- compatibility.
-
-2008-06-12 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (set_console_state_for_spawn): Drop declaration.
- * fhandler_console.cc (set_console_state_for_spawn): Remove.
- (fhandler_console::open): Set console state last. Don't set
- ENABLE_PROCESSED_INPUT flag.
- * spawn.cc (spawn_guts): Drop call to set_console_state_for_spawn.
-
-2008-06-11 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (get_nt_native_path): Drop considerations for DOS devices.
- Keep relative paths relative.
- (cygwin_conv_path): Don't try to skip native NT prefixes on relative
- paths.
-
-2008-06-11 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/version.h (CYGWIN_VERSION_MOUNT_REGISTRY): Bump.
- (CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME): Remove.
- (CYGWIN_INFO_CYGDRIVE_FLAGS): Remove.
- (CYGWIN_INFO_CYGDRIVE_PREFIX): Remove.
- (CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX): Add comment to differ from the
- registry related defines.
-
-2008-06-11 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_procnet.cc (dad_to_flags): Fix comment.
-
-2008-06-10 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_procnet.cc (get_scope): New static function to evaluate
- scope.
- (dad_to_flags): New static array to convert Windows DAD state to
- Linux values.
- (format_procnet_ifinet6): Drop asking for IfIndex, just use Ipv6IfIndex.
- Use get_scope and dad_to_flags to generate more accurate linux-like
- output.
-
-2008-06-10 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (if_nametoindex): Fix typo in call to get_adapters_addresses.
- (if_indextoname): Prefer IPv6 loopback device name over IPv4 loopback
- device name on pre-Vista systems.
- (if_nameindex): Ditto.
-
-2008-06-10 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_procnet.cc (format_procnet_ifinet6): Use sprintf rather than
- __small_sprintf.
- * net.cc (if_nametoindex): Prefer IPv6IfIndex over IfIndex for
- consistency with /proc/net/if_inet6.
- (if_indextoname): Ditto.
- (if_nameindex): Ditto.
-
-2008-06-10 Corinna Vinschen <corinna@vinschen.de>
-
- * mount.cc (mount_info::from_fstab): Read sizeof (buf) - 2 bytes.
- Add code to handle overly long lines.
-
-2008-06-10 Corinna Vinschen <corinna@vinschen.de>
-
- * sec_auth.cc (lsaauth): Make returned token inheritable.
-
-2008-06-10 Corinna Vinschen <corinna@vinschen.de>
-
- * devices.cc: Regenerate.
-
-2008-06-09 Christopher Faylor <me+cygwin@cgf.cx>
-
- * devices.in: Remove "Global" from tty device.
-
-008-06-09 Eric Blake <ebb9@byu.net>
-
- * signal.cc (abort): Only flush streams after signal handler.
-
-2008-06-02 Christopher Faylor <me+cygwin@cgf.cx>
-
- * cygwin.sc: Remove unrequired and erroneous definition.
-
-2008-05-30 Christopher Faylor <me+cygwin@cgf.cx>
-
- * select.cc (peek_pipe): Semi-reinstate pipe NT-special write
- detection.
-
-2008-05-29 Christopher Faylor <me+cygwin@cgf.cx>
-
- * devices.in: Change mapping for /dev/ttyS* and /dev/com*.
- * devices.cc: Regenerate.
-
-2008-05-25 Christopher Faylor <me+cygwin@cgf.cx>
-
- * mount.cc (mount_info::from_fstab): Use proper buffer size.
-
-2008-05-24 Christopher Faylor <me+cygwin@cgf.cx>
-
- * mount.cc (mount_info::init): Revert previous change.
- (mount_info::from_fstab): Change system_printf to debug_printf. Just
- use a local NT_MAX_PATH sized temporary buffer.
-
-2008-05-24 Corinna Vinschen <corinna@vinschen.de>
-
- * mount.cc (mount_info::init): Recreate path when trying to read the
- user fstab file.
-
-2008-05-24 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink_info::check): Reorder test for nfs symlinks.
-
-2008-05-23 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Don't try to
- use FileIdBothDirectoryInformation on NFS shares. Fix comment to
- explain why.
- * path.cc (symlink_info::check): Reinstantiate no_ea. Use in
- erroneously changed condition.
-
-2008-05-23 Christopher Faylor <me+cygwin@cgf.cx>
-
- * mount.cc (find_root_from_cygwin_dll): New function factored from
- from_fstab. Avoid use of tls since it isn't necessarily initialized
- when cygwin1.dll is dynamically loaded.
- (mount_info::create_root_entry): Ditto.
- (mount_info::init): Calculate cygwin root once. Use create_root_entry
- to record it. Pass fstab location to from_fstab.
- (mount_info::from_fstab): Move root calculation stuff elsewhere, as per
- above.
-
- * shared_info.h (mount_info::from_fstab_line): Make private.
- (mount_info::fstab): Ditto. Accommodate new arguments.
-
-2008-05-23 Christopher Faylor <me+cygwin@cgf.cx>
-
- * mount.cc (mount_info::from_fstab): Use cygwin_hmodule rather than
- trying to find handle based on cygwin1.dll.
-
- * path.cc (symlink_info::check): Remove unused variable.
-
-2008-05-23 Corinna Vinschen <corinna@vinschen.de>
-
- * shared.cc (open_shared): Fix comments. Fix a condition which has
- been overlooked to revert to its old state in change from 2008-04-18.
-
-2008-05-22 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink_info::check): Define eabuf and easize outside of
- loop. Set to NULL on first STATUS_EAS_NOT_SUPPORTED. Align comments.
- Fix formatting.
-
-2008-05-23 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::readdir): Eliminate
- compiler warning.
-
-2008-05-23 Christopher Faylor <me+cygwin@cgf.cx>
-
- * path.cc (symlink_info::check): Don't pass EaBuffer to NtCreateFile if
- it has indicated that it isn't appropriate.
- * ntdll.h (STATUS_EAS_NOT_SUPPORTED): Define.
-
- * winsup.h: Remove __builtin* defines.
-
-2008-05-22 Corinna Vinschen <corinna@vinschen.de>
-
- * grp.cc (internal_getgroups): Fix thinko. Only add enabled groups to
- the group list.
-
-2008-05-22 Corinna Vinschen <corinna@vinschen.de>
-
- * grp.cc (internal_getgroups): Don't add deny-only groups to the group
- list.
-
-2008-05-22 Corinna Vinschen <corinna@vinschen.de>
-
- * cygtls.h (struct san): Add two int values to store the current
- tls_pathbuf counters.
- (return_from_fault): Restore tls_pathbuf counters.
- (setup_fault): Save tls_pathbuf counters.
- * tlsoffset.h: Regenerate.
-
-2008-05-22 Corinna Vinschen <corinna@vinschen.de>
-
- * sec_acl.cc (setacl): Set errno to EINVAL if user or group don't exist.
-
-2008-05-22 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (cygwin_conv_path): Define tp before setting up faul handler.
- * syscalls.cc: Ditto, throughout.
- (gen_full_path_at): Add bool parameter to allow NULL pathname.
- (futimesat): Allow NULL pathname as GLIBC.
-
-2008-05-21 Christopher Faylor <me+cygwin@cgf.cx>
-
- * string.h (strchr): Eliminate.
-
- * syscalls.cc (rename): Work around inexplicable C++ warning.
-
-2008-05-21 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (get_ino_by_handle): Rename pfai to fai.
- (fhandler_base::fstat_by_handle): Drop fai_size and pfai in favor of
- static struct fai_buf. Restructure.
- (fhandler_base::fstat_by_name): Drop fvi_size and pfvi. Drop fdi_size
- and pfdi in favor of static struct fdi_buf. Drop redundant test for
- existance. Use FileDirectoryInformation class instead of
- FileBothDirectoryInformation. Drop call to NtQueryVolumeInformationFile
- in favor of using pc.fs_serial_number (). Fix FileId information given
- to fstat_helper.
- (fhandler_disk_file::fstatvfs): Drop fvi_size, pfvi, fai_size and pfai.
- Drop getting FileFsVolumeInformation and FileFsAttributeInformation in
- favor of using the related path_conv info.
- (fhandler_disk_file::opendir): Fix comment.
- (fhandler_disk_file::readdir): Ditto. Use FileDirectoryInformation
- class instead of FileBothDirectoryInformation.
- * path.cc (fs_info::update): Store MaximumComponentNameLength in new
- member name_len.
- * path.h (struct fs_info): Use ULONG rather than DWORD. Add member
- name_len to store MaximumComponentNameLength. Add accessor methods.
- (path_conv::fs_name_len): New method.
-
-2008-05-21 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (dirent_states): Add dirent_nfs_d_ino state and add it to
- dirent_info_mask.
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Set
- dirent_nfs_d_ino flag for NFS shares. Explain why.
- (fhandler_disk_file::readdir): Use FileNamesInformation instead of
- FileBothDirectoryInformation info class on NFS clients not supporting
- the FileIdBothDirectoryInformation info class. Use local pointers to
- accommodate different offsets.
- * path.cc (symlink_info::check): Don't test directories for symlinks
- on NFS shares. Enhance comment.
-
-2008-05-21 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (FILTERED_MODE): Define valid chmod mode mask.
- (chmod): Call fh->fchmod with filtered mode.
- (fchmod): Ditto.
-
-2008-05-20 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Fix test for
- S_IFSOCK in mode bits.
-
-2008-05-20 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink_worker): Fix EA buffer size info given to
- NtCreateFile.
- (symlink_info::check_nfs_symlink): Get 64K buffer for EA buffer.
- Change EA buffer size info given to NtQueryEaFile accordingly.
-
-2008-05-20 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink_info::check_shortcut): Minimize requested file
- access flags.
- (symlink_info::check_sysfile): Ditto. Add missing `else'.
- (symlink_info::check): Only retry to open file if first try failed
- with access denied.
-
-2008-05-20 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (fs_info::update): Re-add opening the unsplitted path
- for fillout_mntent's sake.
-
-2008-05-20 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Create directories
- on NFS shares with correct mode bits.
-
-2008-05-20 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.h (cygwin_inet_addr): Fix type of declaration.
-
-2008-05-20 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (DLL_OFILES): Add nfs.o.
- * fhandler.cc (fhandler_base::open): Open files on NFS shares with
- correct access flags and EAs.
- * fhandler.h (fhandler_base::fstat_by_nfs_ea): Declare.
- * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): New method.
- (fhandler_base::fstat_by_handle): Call fstat_by_nfs_ea for files on
- NFS shares.
- (fhandler_disk_file::fchmod): Use NFS specific method to set mode for
- files on NFS shares. Don't overrule errno from call to
- set_file_attribute with errno from NtSetInformationFile call.
- (fhandler_disk_file::fchown): Add comment.
- * mount.cc (fillout_mntent): Accommodate change in second parameter
- to fs_info::update.
- * nfs.cc: New file.
- * nfs.h: New file.
- * path.cc (fs_info::update): Take handle instead of bool as second
- parameter. Use that handle if it's not NULL. Only close handle if
- it has been opened here. Use static defined buffers instead of
- alloca'd buffers.
- (path_conv::check): Call symlink_info::check with reference to fs.
- Don't call fs.update here if file exists.
- (conv_path_list): Prefer tmp_pathbuf buffer over using alloca.
- (symlink_worker): Use NFS specific method to create symlinks on NFS
- shares. Prefer tmp_pathbuf buffer over using alloca.
- (symlink_info::check_shortcut): Reopen file from incoming handle
- with necessary FILE_GENERIC_READ flag. Prefer tmp_pathbuf buffer over
- using alloca.
- (symlink_info::check_sysfile): Ditto.
- (symlink_info::check_reparse_point): Use tmp_pathbuf buffer to
- allocate REPARSE_DATA_BUFFER.
- (symlink_info::check_nfs_symlink): New method.
- (enum symlink_t): Remove.
- (symlink_info::check): Don't use NtQueryAttributesFile. Rather, open
- file with necessary access flags and call NtQueryInformationFile. Fix
- error handling in case file can't be opened. For existing files, call
- fs_info::update here. Restructure symlink checking to accommodate the
- fact that the file is already open. Add case for NFS symlinks.
- * path.h (fs_info::update): Take handle instead of bool as second
- parameter.
-
-2008-05-20 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (rename): Fix condition when to start a transaction.
-
-2008-05-20 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (path_conv::check): Free wide_path and normalized_path if
- necessary.
- * path.h (path_conv::path_conv): Set wide_path, normalized_path and
- normalized_path_size to 0 in all constructors.
-
-2008-05-19 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (rename): Allocate temporary path buffers using
- tmp_pathbuf. Don't try to unset R/O attribute on dstpc if a
- removepc exists. dstpc is a non-existant file in that case.
-
-2008-05-17 Christopher Faylor <me+cygwin@cgf.cx>
-
- * include/stdint.h: Use int rather than long for {u,}int32_t.
-
-2008-05-16 Corinna Vinschen <corinna@vinschen.de>
-
- * CYGWIN_LICENSE: Remove duplicate file here.
-
-2008-05-15 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (rename): ONly start transaction if FS supports them.
-
-2008-05-15 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (LoadDLLfuncNt): Re-invent.
- (NtCreateTransaction): Define.
- (NtCommitTransaction): Define.
- (NtRollbackTransaction): Define.
- (RtlGetCurrentTransaction): Define.
- (RtlSetCurrentTransaction): Define.
- * ntdll.h (TRANSACTION_ALL_ACCESS): Define.
- (NtCreateTransaction): Declare.
- (NtCommitTransaction): Declare.
- (NtRollbackTransaction): Declare.
- (RtlGetCurrentTransaction): Declare.
- (RtlSetCurrentTransaction): Declare.
- * syscalls.cc (start_transaction): New static function to start TxF
- transaction.
- (stop_transaction): New static function to end TxF transaction.
- (rename): Call start_transaction and stop_transaction where appropriate
- on systems supporting transactions.
- * wincap.h (wincaps::has_transactions): New element.
- * wincap.cc: Implement above element throughout.
-
-2008-05-14 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Drop
- explicit transformation of special DOS chars.
- * strfuncs.cc (sys_wcstombs): Always transform UNICODE private use area
- back to ASCII.
-
-2008-05-13 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/stdlib.h (initstate): Declare.
- (setstate): Declare.
-
-2008-05-13 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (path_conv::set_normalized_path): Drop strip_tail argument.
- Never strip trailing dots and spaces.
- * (path_conv::check): Accomodate above change.
- * path.h (path_conv::operator=): Ditto
- * dtable.cc (build_fh_dev): Ditto.
- * fhandler.h (fhandler_base::set_name): Ditto.
-
- * path.cc (transform_chars): Disable converting trailing dots and
- spaces.
-
- * path.cc (path_conv::check): Remove two disabled code snippets.
-
-2008-05-13 Corinna Vinschen <corinna@vinschen.de>
-
- * random.cc (initstate): Align to POSIX definition.
- (setstate): Ditto.
-
-2008-05-10 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (DLL_OFILES): Remove _def_time.o.
- * libc/_def_time.c: Remove. Move definitions of _DefaultTimeLocale
- and _CurrentTimeLocale ...
- * libc/strptime.cc: ... here.
-
-2008-05-08 Corinna Vinschen <corinna@vinschen.de>
-
- * include/sys/localedef.h: Remove.
- * libc/strptime.cc: Define _TimeLocale and declare _CurrentTimeLocale
- as well as _DefaultTimeLocale locally for Cygwin.
-
-2008-05-08 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (DLL_OFILES): Add _def_time.o. Remove timelocal.o.
- * include/sys/localedef.h: New file from NetBSD.
- * libc/_def_time.c: Ditto.
- * libc/getopt.c: Update to latest OpenBSD version 1.23.
- * libc/strptime.cc: Replace FreeBSD version 1.35 with latest NetBSD
- version 1.28.
- * libc/timelocal.cc: Remove.
- * libc/timelocal.h: Remove.
-
-2008-04-30 Corinna Vinschen <corinna@vinschen.de>
-
- * dtable.cc (dtable::release): Drop fixup_before handling.
- (dtable::fixup_before_fork): Remove.
- (dtable::fixup_before_exec): Remove.
- * dtable.h (class dtable): Remove cnt_need_fixup_before member.
- (dtable::dtable): Accommodate above change.
- (dtable::dec_need_fixup_before): Remove.
- (dtable::inc_need_fixup_before): Remove.
- (dtable::need_fixup_before): Remove.
- (dtable::fixup_before_exec): Remove declaration.
- (dtable::fixup_before_fork): Ditto.
- * fhandler.h (fhandler_base::fixup_before_fork_exec): Remove.
- (fhandler_base::need_fixup_before): Remove.
- * fork.cc (frok::parent): Drop fixup_before handling.
- * spawn.cc (spawn_guts): Ditto.
-
-2008-04-30 Corinna Vinschen <corinna@vinschen.de>
-
- * mount.cc (is_unc_share): Allow \\?\ prefix as well. Enhance comment.
- (mount_info::from_fstab): Remove patch from 2008-04-29.
-
- * mount.cc (mount_info::conv_to_posix_path): Simplify test for native
- UNC path.
- * path.cc (normalize_win32_path): Ditto.
- (symlink_worker): Ditto.
- (symlink_info::posixify): Ditto.
- (cygwin_conv_path): Ditto.
-
-2008-04-29 Corinna Vinschen <corinna@vinschen.de>
-
- * mount.cc (mount_info::from_fstab): Skip native path prefix in
- module path.
-
-2008-04-29 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (rename): Use volume serial numbers stored in path_conv
- rather than fetching them here for the "same file" test. Change
- comment to reflect this.
-
-2008-04-28 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink_info::check): Avoid special handling for
- STATUS_BUFFER_OVERFLOW when calling NtQueryDirectoryFile.
- * strace.cc (strace::vprntf): Use bigger buffer.
-
-2008-04-28 Corinna Vinschen <corinna@vinschen.de>
-
- * kernel32.cc (CreateFileMappingW): Remove stray small_printf.
-
-2008-04-28 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (IsWow64Process): Remove.
- (Wow64DisableWow64FsRedirection): Remove.
- (Wow64RevertWow64FsRedirection): Remove.
- * ntdll.h (enum _PROCESSINFOCLASS): Define ProcessWow64Information.
- * init.cc (respawn_wow64_process): Use NtQueryInformationProcess to
- get WOW64 state.
- * wincap.cc (wincapc::init): Ditto.
- * wincap.h (wincapc::wow64): Change type to ULONG.
-
-2008-04-27 Corinna Vinschen <corinna@vinschen.de>
-
- * wincap.h (wincapc::wow64): Change type to BOOL.
- * wincap.cc: Remove explicit use of this pointer in wincapc methods.
- (wincapc::init): Fix bug in IsWow64Process handling.
-
-2008-04-26 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc (dll_crt0_0): Set SEM_NOGPFAULTERRORBOX error mode, too,
- to accommodate Vista/Longhorn.
- * spawn.cc (spawn_guts): Move check for CREATE_SUSPENDED condition
- after the call to ch.set() since it depends on it.
-
-2008-04-25 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (install): Drop install rules for postinstall script.
-
-2008-04-25 Corinna Vinschen <corinna@vinschen.de>
-
- * postinstall: Remove (Moved to base-cygwin package).
-
-2008-04-25 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Move handling FILE_ATTRIBUTE_NORMAL
- back to its old place. Or it to file_attributes instead of setting it.
-
-2008-04-25 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): *Only* handle SYSTEM and HIDDEN
- attributes in FILE_OVERWRITE case.
-
-2008-04-25 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Handle SYSTEM and HIDDEN attributes
- in FILE_OVERWRITE case as well.
-
-2008-04-24 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_base::fstat_helper): Disable calling
- pc.ndisk_links. Just use nNumberOfLinks instead.
-
-2008-04-24 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_base::utimens_fs): Fix typo in
- input range check.
-
-2008-04-24 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din (futimens): Export.
- (utimensat): Export.
- * fhandler.cc (fhandler_base::utimens): Replace fhandler_base::utimes.
- Call utimens_fs.
- * fhandler.h (class fhandler_base): Declare utimens_fs instead of
- utimes_fs, utimens instead of utimes.
- (class fhandler_disk_file): Declare utimens instead of utimes.
- * fhandler_disk_file.cc (fhandler_disk_file::utimens): Replace
- fhandler_disk_file::utimes.
- (fhandler_base::utimens_fs): Replace fhandler_base::utimes_fs.
- Implement tv_nsec handling according to SUSv4.
- * syscalls.cc (utimensat): New function.
- * times.cc (timespec_to_filetime): New function.
- (timeval_to_timespec): New function.
- (utimens_worker): Replace utimes_worker.
- (utimes): Convert timeval to timespec and call utimens_worker.
- (lutimes): Ditto.
- (futimens): Take over implementation from futimes.
- (futimes): Convert timeval to timespec and call futimens.
- * winsup.h (timespec_to_filetime): Declare.
- * include/cygwin/version.h: Bump API minor number.
- * posix.sgml: Add SUSv4 section. Add futimens and utimensat to it.
-
-2008-04-24 Yaakov (Cygwin Ports) <yselkowitz@users.sourceforge.net>
-
- * include/wait.h: New file.
-
-2008-04-23 Corinna Vinschen <corinna@vinschen.de>
-
- * posix.sgml: Add openat, faccessat, fchmodat, fchownat, fstatat,
- futimesat, linkat, mkdirat, mkfifoat, mknodat, readlinkat, renameat,
- symlinkat, unlinkat to list of implemented Solaris functions.
-
-2008-04-23 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Sort.
- (faccessat): Export.
- (fchmodat): Export.
- (fchownat): Export.
- (fstatat): Export.
- (futimesat): Export.
- (linkat): Export.
- (mkdirat): Export.
- (mkfifoat): Export.
- (mknodat): Export.
- (openat): Export.
- (readlinkat): Export.
- (renameat): Export.
- (symlinkat): Export.
- (unlinkat): Export.
- * path.cc (readlink): Align definition to POSIX.
- * syscalls.cc (gen_full_path_at): New static function.
- (faccessat): Implement.
- (fchmodat): Implement.
- (fchownat): Implement.
- (fstatat): Implement.
- (futimesat): Implement.
- (linkat): Implement.
- (mkdirat): Implement.
- (mkfifoat): Implement.
- (mknodat): Implement.
- (openat): Implement.
- (readlinkat): Implement.
- (renameat): Implement.
- (symlinkat): Implement.
- (unlinkat): Implement.
- * include/cygwin/version.h: Bump API minor number.
-
-2008-04-22 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc (dll_crt0_0): Move CWD initialization from here...
- (dll_crt0_1): ...to here.
-
-2008-04-22 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din (fmemopen): Export.
- (open_memstream): Export.
- * include/cygwin/version.h: Bump API minor number.
-
-2008-04-22 Corinna Vinschen <corinna@vinschen.de>
-
- * sec_auth.cc (create_token): Add integrity level SID to token on
- systems supporting that. Remove useless check for dynamically loading
- NtCreateToken function.
- * sec_helper.cc (mandatory_medium_integrity_sid): Define.
- (mandatory_high_integrity_sid): Define.
- (mandatory_system_integrity_sid): Define.
- * sec_helper.h (mandatory_medium_integrity_sid): Declare.
- (mandatory_high_integrity_sid): Declare.
- (mandatory_system_integrity_sid): Declare.
-
-2008-04-21 Corinna Vinschen <corinna@vinschen.de>
-
- * mount.cc (mount_info::init): Remove call to from_registry. Print
- message that fstab is missing.
- (mount_info::from_fstab): Use CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX
- instead of constant string.
- (mount_info::read_mounts): Remove.
- (mount_info::from_registry): Remove.
- (mount_info::read_cygdrive_info_from_registry): Remove.
- * postinstall: Enable code to create fstab entries from old registry
- entries.
- * registry.cc (reg_key::reg_key): Drop CYGWIN_INFO_CYGNUS_REGISTRY_NAME
- from registry key.
- * shared_info.h (mount_info::read_mounts): Remove declaration.
- (mount_info::from_registry): Ditto.
- (mount_info::to_registry): Ditto.
- (mount_info::read_cygdrive_info_from_registry): Ditto.
- * winver.rc (CYGWIN_REGISTRY_KEY): Remove.
- (LegalCopyright): Fix to include 2008.
- (RegistryKey): Set to CYGWIN_INFO_CYGWIN_REGISTRY_NAME.
- * include/cygwin/version.h (CYGWIN_INFO_CYGNUS_REGISTRY_NAME): Remove.
-
-2008-04-21 Corinna Vinschen <corinna@vinschen.de>
-
- * kernel32.cc (CreateFileMappingW): Fix bug in reserve/commit handling.
-
-2008-04-21 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (DLL_OFILES): Add kernel32.o.
- * autoload.cc (WSACloseEvent): Remove.
- (WSACreateEvent): Remove.
- * cygheap.cc (cygheap_init): Drop initializing shared_prefix.
- * cygheap.h (struct init_cygheap): Drop shared_prefix and
- shared_prefix_buf members.
- * fhandler_socket.cc (sock_shared_name): New static function.
- (search_wsa_event_slot): Convert name buffers to WCHAR. Call
- NtCreateMutant/NtOpenMutant to create mutexes in session local
- namespace.
- (fhandler_socket::init_events): Ditto. Fix debug output.
- (fhandler_socket::release_events): Close mutexes using NtClose.
- (fhandler_socket::dup): Ditto.
- * kernel32.cc: New file, implementing Win32 calls in a Cygwin-specific
- way.
- * mmap.cc (MapView): Make static.
- * ntdll.h: Fix status code sorting.
- (STATUS_OBJECT_NAME_EXISTS): Define.
- (SEMAPHORE_QUERY_STATE): Define.
- (CYG_SHARED_DIR_ACCESS): Define.
- (CYG_MUTANT_ACCESS): Define.
- (CYG_EVENT_ACCESS): Define.
- (CYG_SEMAPHORE_ACCESS): Define.
- (enum _PROCESSINFOCLASS): Define ProcessSessionInformation.
- (struct _PROCESS_SESSION_INFORMATION): Define.
- (NtCreateSemaphore): Declare.
- (NtOpenSemaphore): Declare.
- * flock.cc: Use CYG_xxx_ACCESS access masks where appropriate.
- * posix_ipc.cc (ipc_mutex_init): Use native functions to create mutex.
- Create in cygwin-shared subdir.
- (ipc_cond_init): Ditto for event.
- (ipc_mutex_close): Use NtClose.
- (ipc_cond_close): Ditto.
- (mq_open): Drop "cyg" prefix from mqh_uname.
- * shared.cc (CYG_SHARED_DIR_ACCESS): Drop definition here.
- (_cygwin_testing): Declare extern on file level.
- (get_shared_parent_dir): Change name of shared directory. Add name
- to api_fatal output.
- (get_session_parent_dir): New function.
- (shared_name): Simplify.
- (shared_info::initialize): Call get_session_parent_dir.
- * shared_info.h (get_session_parent_dir): Declare.
- * smallprint.cc (__small_vswprintf): Fix bug in multibyte string
- conversion.
- * thread.cc (semaphore::semaphore): Align semaphore name to object
- names in posix IPC functions.
- * include/cygwin/version.h (CYGWIN_VERSION_SHARED_DATA): Bump.
-
-2008-04-18 Corinna Vinschen <corinna@vinschen.de>
-
- Revert thinko in previous patch.
- * fhandler.h (struct wsa_event): Move back from wsa_event.h to here.
- * fhandler_socket.cc (NUM_SOCKS): Ditto.
- (wsa_events): Move back from cygwin_shared to here. Accommodate
- throughout.
- (socket_serial_number): Ditto.
- * shared_info.h: Accommodate above changes.
- * wsa_event.h: Remove.
-
-2008-04-18 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (struct wsa_event): Move to wsa_event.h. Include
- wsa_event.h instead.
- * fhandler_socket.cc (NUM_SOCKS): Move to wsa_event.h.
- (wsa_events): Move from DLL shared area to cygwin_shared shared
- memory. Accommodate throughout.
- (socket_serial_number): Ditto.
- * fhandler_tape.cc (mt): Ditto.
- (mtinfo_init): Remove.
- (mt): Define as cygwin_shared->mt.
- * flock.cc (FLOCK_PARENT_DIR_ACCESS): Remove.
- (FLOCK_INODE_DIR_ACCESS): Move up in file.
- (FLOCK_MUTANT_ACCESS): Ditto.
- (FLOCK_EVENT_ACCESS): Ditto.
- (get_lock_parent_dir): Remove.
- (inode_t::inode_t): Call get_shared_parent_dir to get parent dir handle.
- Add a "flock-" prefix to file's lock directory name for clarity.
- * mtinfo.h (mtinfo_init): Drop declaration.
- * net.cc (last_used_bindresvport): Move from DLL shared area to
- cygwin_shared shared memory.
- (cygwin_bindresvport_sa): Accommodate above change.
- * sec_helper.cc (_everyone_sd): Move here from flock.cc.
- * security.h (SD_MIN_SIZE): Ditto.
- (everyone_sd): Ditto.
- * shared.cc (cygwin_shared_area): Remove.
- (cygwin_shared_h): New handle.
- (get_shared_parent_dir): New static function.
- (shared_name): Drop session_local argument. Call get_shared_parent_dir
- here. Add cygwin-shared subdir to object name.
- (offsets): Reinstantiate SH_CYGWIN_SHARED member.
- (open_shared): Revert change from 2007-03-29 for systems supporting
- SeCreateGlobalPrivilege.
- (shared_info::initialize): Call mtinfo's initialize here.
- (memory_init): Drop call to mtinfo_init.
- * shared_info.h (SHARED_INFO_CB): Accommodate change to shared_info.
- (CURR_SHARED_MAGIC): Ditto.
- (class shared_info): Add members for global socket and tape info
- sharing.
- (enum shared_locations): Reinstantiate SH_CYGWIN_SHARED.
- (get_shared_parent_dir): Declare.
- (shared_name): Drop session_local argument from declaration.
- * wsa_event.h: New file. Move definitions of NUM_SOCKS and
- struct wsa_event here.
-
-2008-04-18 Christopher Faylor <me+cygwin@cgf.cx>
-
- * autoload.cc (noload): Make sure this and succeeding functions are
- located in the text segment.
-
-2008-04-16 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::close): Disable enforced
- lingering since the original problem can no longer be reproduced.
-
-2008-04-16 Corinna Vinschen <corinna@vinschen.de>
-
- * grp.cc (internal_getgroups): Drop local buf. Allocate groups
- directly using alloca.
-
-2008-04-14 Corinna Vinschen <corinna@vinschen.de>
-
- * postinstall: Fix copy/paste bug.
-
-2008-04-14 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Fix
- thinko in UNC path handling.
- * path.cc (symlink_worker): Fix typo in comment. Fix UNC path handling.
-
-2008-04-13 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Simplify
- code which checks for symlinks. Fix problem with UNC paths.
-
- * environ.cc (struct parse_thing): Remove transparent_exe option.
- * syscalls.cc (transparent_exe): Remove.
- (unlink): Always add stat_suffixes, drop transparent_exe check.
- (open): Ditto.
- (link): Ditto.
- (pathconf): Ditto.
- * fhandler_disk_file.cc (fhandler_disk_file::link): Ditto.
- * fhandler_process.cc (fhandler_process::fill_filebuf): Always remove
- .exe suffix.
- * path.cc (realpath): Never attach known_suffix.
-
-2008-04-10 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din (wprintf): Remove.
- (_wprintf): Ditto.
- * syscalls.cc (wprintf): Ditto.
- * include/cygwin/version.h: Add FIXME comment.
-
-2008-04-08 Corinna Vinschen <corinna@vinschen.de>
-
- * mount.cc (mount_info::from_fstab): Read user fstab files from
- /etc/fstab.d/$USER to avoid user write access to /etc.
- * postinstall: Use variables for filenames. Create /etc/fstab.d dir
- with 01777 permissions.
-
-2008-04-08 Corinna Vinschen <corinna@vinschen.de>
-
- * postinstall: Disable adding registry mounts to /etc/fstab for now.
-
-2008-04-07 Christopher Faylor <me+cygwin@cgf.cx>
-
- Remove unneeded header files from source files throughout.
-
-2008-04-07 Corinna Vinschen <corinna@vinschen.de>
-
- * postinstall: Add function print_flags and call where appropriate.
- Omit system and cygdrive flag when testing cygdrive flags.
-
-2008-04-07 Christopher Faylor <me+cygwin@cgf.cx>
-
- Add miscfuncs.h to files as needed throughout.
- * mount.cc: New file.
- * path.cc: Move mount-specific stuff into mount.cc. Move common stuff
- into miscfuncs.cc. Remove unneeded includes.
- * miscfuncs.cc: Move some common path functions here.
- * miscfuncs.h: New file.
- * winsup.h: Move miscelleneous functions to miscfuncs.h.
- * dcrt0.cc: Remove unneeded includes.
- * Makefile.in (DLL_OFILES): Add mount.o.
-
- * include/cygwin/config.h: Fix a minor typo.
-
-2008-04-07 Corinna Vinschen <corinna@vinschen.de>
-
- * postinstall: Set IFS to LF only. Change while loop in subshell to
- for loop in parent shell. Add code to read system mount points and
- system cygdrive prefix from registry and append them to /etc/fstab.
-
-2008-04-06 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (struct opt): Rename "system" to "nouser".
- * postinsatll: Ditto.
-
-2008-04-05 Corinna Vinschen <corinna@vinschen.de>
-
- * postinstall: New script.
- * Makefile.in (sysconfdir): Define.
- (install): Create $(sysconfdir)/postinstall dir. Install postinstall
- script into it.
-
- * path.cc: Add temorary comments to note later function removal.
- (conv_fstab_spaces): New inline function to handle \040 to space
- conversion.
- (struct opt): Add "system" and "user" mount options.
- (mount_info::from_fstab_line): Only allow # to start a comment at
- the beginning of the line. Call conv_fstab_spaces on native_path and
- posix_path fields. Don't enforce system mounts in /etc/fstab.
- Drop last argument in call to add_item.
- (mount_info::from_fstab): Create a default cygdrive entry. Load
- user mount points from fstab.<username> instead of fstab.<sid>.
- (mount_info::read_mounts): Drop last argument in call to add_item.
- (mount_info::add_reg_mount): Remove.
- (mount_info::del_reg_mount): Remove.
- (mount_info::write_cygdrive_info): Rename from
- mount_info::write_cygdrive_info_to_registry. Don't write to registry.
- Disallow to overwrite a system cygdrive prefix.
- (mount_info::remove_cygdrive_info_from_registry): Remove.
- (mount_info::get_cygdrive_info): Just fetch current cygdrive prefix and
- flags.
- (mount_info::add_item): Drop last argument. Don't write to registry.
- Disallow to overwrite a system mount point.
- (mount_info::del_item): Drop last argument. Don't write to registry.
- Disallow to remove a system mount point.
- (mount): Enforce user mount.
- (cygwin_umount): Ditto.
- * shared_info.h (mount_info::add_item): Drop last argument.
- (mount_info::del_item): Ditto.
- (mount_info::add_reg_mount): Remove.
- (mount_info::del_reg_mount): Remove.
- (mount_info::write_cygdrive_info): Rename from
- mount_info::write_cygdrive_info_to_registry.
- (mount_info::remove_cygdrive_info_from_registry): Remove.
-
-2008-04-03 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (mount_info::from_fstab_line): Simplify. Recognize special
- "cygdrive" entry from FS type field.
- (mount_info::from_fstab): Create a default root dir.
-
-2008-04-03 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc (insert_file): Fix potential buffer overflow.
-
-2008-04-03 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (mount_info::from_fstab): Get module path name of the Cygwin
- DLL, not the path of the application.
-
-2008-04-03 Corinna Vinschen <corinna@vinschen.de>
-
- Cleanup.
- * exceptions.cc (windows_system_directory): Make static. Convert to
- WCHAR.
- (_cygtls::inside_kernel): Accommodate above change. Check module
- path name for leading \\?\ and skip, if so.
- (try_to_debug): Call GetEnvironmentStringsW and convert evaluation to
- WCHAR to avoid truncated environment problem.
- (has_visible_window_station): Call GetUserObjectInformationW.
- (events_init): Accommodate above conversion of windows_system_directory.
- * init.cc (respawn_wow64_process): Use WCHAR functions to start new
- process.
- * net.cc (__dup_ent): Drop Windows 9x consideration.
- (load_ipv6_funcs): Use WCHAR functions to load IPv6 libs.
- * syscalls.cc (syscalls.cc): Remove call to GetDiskFreeSpace.
-
-2008-04-02 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (mount_info::init): First try to fetch mount points from
- fstab files. Fallback to registry if none exists.
- (skip_ws): New inline function.
- (find_ws): Ditto.
- (struct opt): New structure for mount options.
- (read_flags): New static function to convert a mount flags string into
- a flag value.
- (mount_info::from_fstab_line): New method to create a mount table
- entry from a fstab line.
- (mount_info::from_fstab): New method to read fstab file.
- * shared_info.h (mount_info::from_fstab_line): Declare.
- (mount_info::from_fstab): Declare.
-
-2008-04-02 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (enum symlink_t): Rename from shortcut_t.
-
-2008-04-02 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink_info::check_reparse_point): Use NtFsControlFile
- to read reparse points.
- (enum shortcut_t): New type.
- (symlink_info::check): Convert sym_check to shortcut_t. Use shortcut_t
- enum values throughout. Check reparse point before checking for
- sysfile shortcut. Open reparse points with READ_CONTROL only to
- accommodate special Vista reparse points. Add comments.
-
-2008-04-02 Corinna Vinschen <corinna@vinschen.de>
-
- * flock.cc (get_lock_parent_dir): Drop call to NtOpenDirectoryObject
- and utilize OBJ_OPENIF flag in call to NtCreateDirectoryObject.
- (inode_t::inode_t): Ditto. Same for NtOpenMutant/NtCreateMutant.
-
-2008-04-02 Corinna Vinschen <corinna@vinschen.de>
-
- * posix.sgml: Change lockf to being implemented.
-
-2008-04-02 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc (insert_file): Convert filename to WCHAR and call
- CreateFileW to allow UTF-8 filenames.
-
-2008-04-01 Corinna Vinschen <corinna@vinschen.de>
-
- * Fix copyright dates.
-
-2008-04-01 Corinna Vinschen <corinna@vinschen.de>
-
- Throughout, call fcntl64 instead of fcntl or fcntl_worker.
- * fcntl.cc (fcntl_worker): Remove.
- (fcntl64): Add fault handler. Move fcntl_worker stuff here. Add case
- for locking and call fhandler's lock method directly. Make sure that
- F_FLOCK flag isn't set in lock call.
- (_fcntl): Add fault handler.
- * fhandler.cc (fhandler_base::fcntl): Drop lock cases.
- * flock.cc (flock): Add fault handler. Simplify code. Call fhandlers
- lock method directly instead of fcntl_worker. Add debug output.
- (lockf): Add fault handler. Call fhandlers lock method directly
- instead of fcntl_worker. Add debug output.
- * winsup.h (fcntl_worker): Drop declaration.
- (fcntl64): Declare.
-
-2008-03-31 Corinna Vinschen <corinna@vinschen.de>
-
- * smallprint.cc (__small_vswprintf): Fix uninitialized usage of `w'.
-
- Revamp advisory file locking to avoid cross reference pointers as well
- as to allow BSD flock semantics. More agressively delete unused nodes
- and sync objects.
- * fhandler.h (fhandler_base::ino): Rename from namehash. Fix comment.
- (fhandler_base::node): Remove.
- (fhandler_base::unique_id): Add.
- (fhandler_base::del_my_locks): New method.
- (get_ino): Rename from get_namehash. Change usage throughout Cygwin.
- (get_unique_id): New method.
- * fhandler.cc (fhandler_base::close): Call own del_my_locks method.
- Fix comment.
- (fhandler_base::fhandler_base): Accommodate new and changed members.
- (fhandler_base::fixup_after_fork): Call del_my_locks.
- (fhandler_base::fixup_after_exec): Ditto for files with close-on-exec
- flag set.
- * fhandler_disk_file.cc (get_ino_by_handle): Rename from
- readdir_get_ino_by_handle. Accommodate throughout.
- (fhandler_base::open_fs): Fill ino with inode number if FS has good
- inodes. Allocate a LUID and store in unique_id to recognize file
- descriptors referencing the same file object.
- * flock.cc: Drop flock TODO comments. Use explicit types __dev32_t
- and __ino64_t instead of dev_t and ino_t.
- (LOCK_OBJ_NAME_LEN): Change to reflect longer lf_id length.
- (get_obj_handle_count): New method.
- (lockf_t::lf_id): Change type to long long.
- (inode_t::get_lock_obj_handle_count): Drop in favor of static function
- get_obj_handle_count.
- (inode_t::del_locks): Remove.
- (inode_t::get): Add create_if_missing flag argument.
- (inode_t::del_my_locks): Reimplement to handle POSIX and BSD flock
- locks. Return if node can be deleted or not.
- (inode_t::~inode_t): Ditto. Close handles to i_dir and i_mtx.
- (fixup_lockf_after_fork): Remove.
- (fhandler_base::del_my_locks): New method.
- (fixup_lockf_after_exec): Check if node can be deleted.
- (inode_t::get): Only create node if create_if_missing is set. Lock
- the returned node here before unlocking the node list.
- (inode_t::get_all_locks_list): Accommodate new lf_id length.
- (inode_t::create_lock_obj): Ditto.
- (lockf_t::open_lock_obj): Ditto. Change return type to bool. De-const.
- Set lf_obj instead of returning a handle.
- (lockf_t::del_lock_obj): Call SetEvent only if new incoming parameters
- allow it. Explain how it's supposed to work.
- (fhandler_disk_file::lock): Only fetch file length in SEEK_END case.
- Use NtQueryInformationFile(FileStandardInformation) instead of
- calling fstat_by_handle. Always unlock node before returning.
- Use fhandler's unique id to create lf_id for BSD flock locks.
- Rely on node lock from inode_t::get. Call del_lock_obj on removed
- locks here to allow explicit unlocking. Delete node if no lock exists
- on the file anymore.
- (lf_setlock): Get file handle as additional parameter. Handle the fact
- that lf_getblock now always opens the attached event object. Reactivate
- erroneously applied patch which deactivates setting thread priority.
- Additionally handle blocking on BSD flock locks.
- (lf_clearlock): Get file handle as additional parameter.
- (lf_getlock): Close event handle opened by lf_getblock.
- (lf_getblock): Open potentially blocking event object here and check
- its signal state if it's a BSD flock lock.
- (lf_wakelock): Get file handle as additional parameter.
- * fork.cc (frok::child): Drop call to fixup_lockf_after_fork.
- * ntdll.h (struct _EVENT_BASIC_INFORMATION): Define.
- (enum _EVENT_INFORMATION_CLASS): Define.
- (NtQueryEvent): Declare.
-
- * fhandler.h (fhandler_base::fs_flags): Remove.
- (fhandler_base::set_fs_flags): Remove.
- (fhandler_base::get_fs_flags): Remove.
- * fhandler.cc (fhandler_base::write): Check for sparse file using
- pc.fs_flags().
- * fhandler_disk_file.cc (fhandler_disk_file::ftruncate): Ditto.
-
- The return of the volume serial number in fs_info.
- * fhandler.h (get_dev): New method.
- * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Drop call to
- NtQueryVolumeInformationFile(FileFsVolumeInformation). Just use
- get_dev() method.
- * fhandler_fifo.cc (fhandler_fifo::open) Use device ID and inode number
- to generate fifo name.
- * path.h (fs_info::sernum): New member.
- (fs_info::serial_number): New method.
- (path_conv::fs_serial_number): New method.
- * path.cc (fs_info::update): Fetch volume serial number and store in
- sernum.
-
-2008-03-28 Corinna Vinschen <corinna@vinschen.de>
-
- * flock.cc (lockf_t::operator new): Add operator taking a pointer. Call
- cmalloc instead of ccalloc in the default operator. Add comments.
- (inode_t::operator new): Call cmalloc instead of ccalloc.
- (inode_t::get_all_locks_list): Return lockf_t pointer.
- (inode_t::del_all_locks_list): Delete. Remove calls throughout.
- (inode_t::get): Handle failing new gracefully.
- (MAX_LOCKF_CNT): Define.
- (inode_t::get_all_locks_list): Use pre-allocated buffer in i_all_lf
- instead of allocating every lock. Return pointer to start of linked
- list of locks.
- (lockf_t::open_lock_obj): Create event object non-inheritable.
- (fhandler_disk_file::lock): Handle failing new gracefully.
- (lf_setlock): Allocate temporary buffer for node->i_all_lf from TLS.
- Remove erroneous NtClose call.
- (lf_getlock): Allocate temporary buffer for node->i_all_lf from TLS.
- (lf_getblock): Set lf to return value of get_all_locks_list.
-
-2008-03-27 Corinna Vinschen <corinna@vinschen.de>
-
- * flock.cc (FLOCK_PARENT_DIR_ACCESS): Define.
- (FLOCK_INODE_DIR_ACCESS): Define.
- (FLOCK_MUTANT_ACCESS): Define.
- (FLOCK_EVENT_ACCESS): Define.
- (SD_MIN_SIZE): Define.
- (everyone_sd): Define to simplify calling _everyone_sd.
- (_everyone_sd): Replace everyone_sync_sd. Take SECURITY_DESCRIPTOR as
- argument and allow to specify access mask.
- (get_lock_parent_dir): Open/Create parent dir with
- FLOCK_PARENT_DIR_ACCESS. Add text to api_fatal message.
- (inode_t::inode_t): Open/Create dir with FLOCK_INODE_DIR_ACCESS.
- Open/Create mutant with FLOCK_MUTANT_ACCESS. Add text to api_fatal
- message.
- (lockf_t::create_lock_obj): Create event with FLOCK_EVENT_ACCESS.
- Add text to api_fatal message.
- (lockf_t::open_lock_obj): Open event with FLOCK_EVENT_ACCESS.
- On failure, just return NULL pointer instead of calling api_fatal.
- (lockf_t::get_lock_obj_handle_count): Replace call to small_printf
- with call to debug_printf.
- (lf_setlock): Handle a failure to open the lock event object as
- EDEADLK. Call system_printf if opening sync objects fail.
- * ntdll.h (DIRECTORY_TRAVERSE): Define.
- (DIRECTORY_CREATE_OBJECT): Define.
- (DIRECTORY_CREATE_SUBDIRECTORY): Define.
- (EVENT_QUERY_STATE): Define.
-
-2008-03-27 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (rename): Fix setting errno in case of trailing "/."
-
-2008-03-27 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc: Create shared objects session local throughout.
- * shared.cc (shared_name): Add argument to allow opening session
- local shared memory.
- * shared_info.h (shared_name): Change declaration accordingly.
-
-2008-03-26 Christopher Faylor <me+cygwin@cgf.cx>
-
- Implement method of detecting a missing dll as suggested by Brian
- Dessent.
- * hookapi.cc (find_first_notloaded_dll): New function.
- * pinfo.cc (status_exit): New function. Issue message when dll not
- found. Use find_first_notloaded_dll to find a nonexistent dll.
- (pinfo::maybe_set_exit_code_from_windows): Call status_exit when exit
- code >= 0xc0000000UL.
- * sigproc.cc (child_info::proc_retry): Return exit code when
- STATUS_DLL_NOT_FOUND.
- * spawn.cc (spawn_guts): Minor cleanup.
- * syscalls.cc (close_all_files): Don't actually close stderr
- filehandle. Just make it noninheritable.
- * winsup.h (find_first_notloaded_dll): Declare new function.
-
-2008-03-26 Brian Dessent <brian@dessent.net>
-
- * ntdll.h: Add several missing NTSTATUS defines.
-
-2008-03-24 Corinna Vinschen <corinna@vinschen.de>
-
- * flock.cc (inode_t::get_all_locks_list): Don't allow F_WAIT flag
- in lock event object name.
- (lockf_t::create_lock_obj): Ditto.
- (lockf_t::open_lock_obj): Ditto.
- (lf_setlock): Only check POSIX locks for deadlock condition.
- (lf_findoverlap): Don't let POSIX and flock locks interact.
-
-2008-03-24 Corinna Vinschen <corinna@vinschen.de>
-
- * flock.cc: Clarify a couple of comments.
- (lf_setlock): Treat not being able to sync on a process as a potential
- deadlock situation. Close process handle using CloseHandle.
-
-2008-03-24 Corinna Vinschen <corinna@vinschen.de>
-
- * flock.cc: Fix typo in comment.
-
-2008-03-24 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::dup): Drop setting flags in the parent.
-
- Implement advisory file locking.
- * cygheap.h (struct init_cygheap): Add inode_list member.
- * cygwin.din (lockf): Export.
- * dcrt0.cc (child_info_spawn::handle_spawn): Call
- fixup_lockf_after_exec.
- * dtable.h (class dtable): Add fhandler_disk_file as friend class.
- * fhandler.cc (fhandler_base::close): Call del_my_locks if node is set.
- (fhandler_base::fhandler_base): Initialize node to NULL.
- (fhandler_base::fixup_after_fork): Ditto.
- * fhandler.h (class fhandler_base): Add member node.
- * fhandler_disk_file.cc (fhandler_disk_file::lock): Delete.
- * flock.cc: Implement all advisory file locking here.
- (fhandler_disk_file::lock): Implement here.
- (flock): Call fcntl with F_FLOCK bit set. Remove test main function.
- (lockf): New function.
- * fork.cc (frok::child): Call fixup_lockf_after_fork.
- * ntdll.h (DIRECTORY_ALL_ACCESS): Define.
- (struct _OBJECT_BASIC_INFORMATION): Define.
- (enum _EVENT_TYPE): Define.
- (NtCreateDirectoryObject): Declare.
- (NtCreateEvent): Declare.
- (NtCreateMutant): Declare.
- (NtOpenEvent): Declare.
- (NtOpenMutant): Declare.
- * include/cygwin/version.h: Bump API minor number.
-
-2008-03-22 Christopher Faylor <me+cygwin@cgf.cx>
-
- * dtable.cc (handle_to_fn): Modify to return true if handle represents
- a cygwin tty.
- (dtable::init_std_file_from_handle): Detect when we've seen a cygwin
- pipe and use it in overlapped mode by default.
- (decode_tty): Make static.
-
-2008-03-22 Christopher Faylor <me+cygwin@cgf.cx>
-
- * dtable.cc: Define various device-related string constants as wide
- character constants.
- (dtable::init_std_file_from_handle): Reorganize pipe handling to try to
- catch special tty case.
- (build_fh_name_worker): Declare for common use.
- (build_fh_name): Define char version.
- (build_fh_name): Define (currently unused) UNICODE_STRING version.
- (decode_tty): Detect if pipe is actually a cygwin tty, returning the
- tty name in the buffer.
- (handle_to_fn): Reorganize to use wide characters.
- * dtable.h (build_fh_name): Declare (currently unused) UNICODE_STRING
- version.
- * fhandler_tty.cc (fhandler_pty_master::setup): Use
- fhandler_pipe::create_selectable to create a pipe with a given name.
- * pipe.cc (pipe_handler): Make returned handle inheritable.
- (fhandler_pipe::create_selectable): Take an optional name. Use a
- standard cygwin introducer for the name.
-
- * path.cc (path_conv::check): Make first argument const.
- * path.h (path_conv::check): Ditto for declaration.
- (path_conv::path_conv): Ditto for UNICODE_STRING version.
-
-2008-03-18 Corinna Vinschen <corinna@vinschen.de>
-
- * include/sys/cygwin.h: Revert erroneous move of `#ifdef WINVER' to
- another location.
-
-2008-03-14 Corinna Vinschen <corinna@vinschen.de>
-
- * fcntl.cc (fcntl_worker): Protect with a 'myfault'.
-
- * path.cc (normalize_posix_path): Treat X:/ as Win32 path, too.
-
- * smallprint.cc (__wrn): New static function.
- (__small_vswprintf): New function to generate WCHAR strings.
- (__small_swprintf): Ditto.
- * winsup.h (__small_swprintf): Declare.
- (__small_vswprintf): Declare.
-
-2008-03-13 Corinna Vinschen <corinna@vinschen.de>
-
- * path.sgml: Remove documentation for old path API. Add documentation
- for new path API.
- * security.sgml: New file to document cygwin_set_impersonation_token
- and cygwin_logon_user with only eight years of delay.
- * shared.sgml: Remove file.
- * include/sys/cygwin.h (cygwin32_attach_handle_to_fd): Move declaration
- into fully deprecated function block.
- (cygwin_logon_user): Move declaration down to declaration of
- cygwin_set_impersonation_token.
-
-2008-03-12 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (rename): Just return with 0 if filenames are identical,
- per POSIX. Drop comment added in previous patch.
-
-2008-03-12 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (rename): Handle a special case of trying to rename a
- mount point.
-
-2008-03-12 Corinna Vinschen <corinna@vinschen.de>
-
- * environ.h: Fix comment.
- * winsup.h: Ditto. Reflect the fact that CYG_MAX_PATH is deprecated.
-
-2008-03-12 Corinna Vinschen <corinna@vinschen.de>
-
- * pipe.cc (fhandler_pipe::create_selectable): Use MAX_PATH instead of
- CYG_MAX_PATH.
- * tty.cc (tty_list::init_session): Ditto.
- (tty::alive): Ditto.
- (tty::open_mutex): Ditto.
- (tty::create_inuse): Ditto.
- (tty::get_event): Ditto.
-
-2008-03-12 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Disable
- munging. Convert all chars in the 0xf0xx area to it's ascii equivalent.
- * path.cc (normalize_posix_path): Don't treat "X:foo" as windows path,
- only "X:\foo".
- (tfx_chars): New transformation table for special DOS chars.
- (tfx_chars_managed): Ditto, plus transformation of uppercase ASCII
- chars.
- (transform_chars): New function.
- (get_nt_native_path): Make static. Call transform_chars for all valid
- FS paths. Get additional flag if file is managed or not. Accommodate
- throughout.
- (getfileattr): Get additional flag if file is managed or not.
- Accommodate throughout.
- (path_conv::check): Disable special handling for trailing dots and
- spaces.
- (mount_item::build_win32): Disable code for managed paths.
- (mount_info::conv_to_posix_path): Ditto.
- * path.h (get_nt_native_path): Remove declaration.
-
-2008-03-12 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Don't
- copy filename twice in the non-managed case.
-
-2008-03-12 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.h (NT_MAX_PATH): Revert ill-advised change to 32767.
- Accommodate change throughout.
-
- * cygwin.din (cygwin_conv_path): Export.
- (cygwin_conv_path_list): Export.
- (cygwin_create_path): Export.
- * dcrt0.cc (dll_crt0_1): Use cygwin_conv_path.
- * dtable.cc (handle_to_fn): Ditto. Don't expect UNICODE_STRING being
- 0-terminated.
- * environ.cc (env_plist_to_posix): New helper function.
- (env_plist_to_win32): Ditto.
- (env_path_to_posix): Ditto.
- (env_path_to_win32): Ditto.
- (return_MAX_PATH): Remove.
- (conv_envvars): Use new helper functions. Drop removed members.
- (win_env::operator =): Accommodate removal of path length functions.
- (win_env::add_cache): Accommodate new env helper function API.
- (posify): Ditto.
- * environ.h (struct win_env): Ditto. Remove path length function
- pointers since they are unused.
- * path.cc (warn_msdos): Use cygwin_conv_path.
- (getfileattr): Use new tmp_pathbuf::u_get method.
- (fillout_mntent): Ditto.
- (symlink_info::check): Ditto.
- (path_conv::check): Use sizeof (WCHAR) instead of constant 2.
- (symlink_info::check_reparse_point): Ditto.
- (conv_path_list): Get max size of target string as argument. Call
- cygwin_conv_path as helper function.
- (cygwin_conv_path): New function.
- (cygwin_create_path): New function.
- (cygwin_conv_to_win32_path): Just call cygwin_conv_path with size set
- to MAX_PATH.
- (cygwin_conv_to_full_win32_path): Ditto.
- (cygwin_conv_to_posix_path): Ditto.
- (cygwin_conv_to_full_posix_path): Ditto.
- (conv_path_list_buf_size): Add FIXME comment.
- (env_PATH_to_posix): Rename from env_win32_to_posix_path_list.
- Add size argument as required for env helper functions.
- (cygwin_win32_to_posix_path_list): Call conv_path_list with size set to
- MAX_PATH.
- (cygwin_posix_to_win32_path_list): Ditto.
- (cygwin_conv_path_list): New function.
- (cwdstuff::get): Fix length argument in call to sys_wcstombs.
- * spawn.cc (find_exec): Use cygwin_conv_path_list.
- * tls_pbuf.h (tmp_pathbuf::u_get: New method.
- * uinfo.cc (cygheap_user::ontherange): Allocate temporary path buffers
- using tmp_pathbuf. Use cygwin_conv_path.
- * winf.cc (av::unshift): Use cygwin_conv_path.
- * include/cygwin/version.h: Bump API minor number.
- * include/sys/cygwin.h: Comment out old cygwin32_XXX API.
- Mark old path handling API as deprecated.
- (cygwin_conv_path_t): Typedef. Define values.
- (cygwin_conv_path): Declare.
- (cygwin_create_path): Declare.
- (cygwin_conv_path_list): Declare.
-
-2008-03-11 Corinna Vinschen <corinna@vinschen.de>
-
- * dlfcn.cc (get_full_path_of_dll): Allow paths up to PATH_MAX.
- (dlopen): Call get_full_path_of_dll with path buffer allocate by
- tmp_pathbuf.
-
-2008-03-11 Corinna Vinschen <corinna@vinschen.de>
-
- * spawn.cc (find_exec): Use tmp_pathbuf to allocate path buffer.
-
-2008-03-11 Corinna Vinschen <corinna@vinschen.de>
-
- * dtable.cc (dtable::init_std_file_from_handle): Use tmp_pathbuf to
- allocate path buffer.
- (handle_to_fn): Ditto. Allocate fnbuf big enough to get long path
- names.
-
-2008-03-11 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (cwdstuff::set): Make sure drive_length is 0 for virtual
- paths. Add comments.
- * spawn.cc (spawn_guts): Don't allow to start a native Win32 application
- from a long path or a virtual path. Print an error message to stderr.
-
-2008-03-11 Corinna Vinschen <corinna@vinschen.de>
-
- * environ.cc (parse_options): Use tmp_pathbuf to allocate buffer.
- (regopt): Take tmp buffer as additional argument.
- (environ_init): Alllcate tmpbuf earlier. Use as temporary buffer in
- call to regopt.
- * tls_pbuf.cc (tmp_pathbuf::c_get): Allocate one additional char.
- (tmp_pathbuf::w_get): Allocate one additional WCHAR.
- * winf.cc (av::unshift): Use tmp_pathbuf to allocate buffer.
-
-2008-03-11 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (sync): Use MAX_PATH rather than CYG_MAX_PATH.
-
-2008-03-10 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_console): Add write_buf as pointer to
- temporary buffer space.
- * fhandler_console.cc (CONVERT_LIMIT): Define as NT_MAX_PATH. Add
- comment.
- (fhandler_console::write_normal): Use write_buf throughout.
- (fhandler_console::write): Use tmp_pathbuf to allocate write_buf.
-
-2008-03-10 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_console.cc (fhandler_console::write_normal): Don't print
- chars marked as ERR chars.
-
-2008-03-10 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (dev_console::con_to_str): Declare returning DWORD.
- * fhandler_console.cc (dev_console::con_to_str): Return number of
- multibyte char bytes.
- (fhandler_console::read): Set nread to number of multibyte char bytes
- returned from con_to_str.
- (fhandler_console::write_normal): Reorder trunc buffer preocessing.
- Return after writing valid multibyte sequence out of trunc buffer.
- Change comments slightly.
-
-2008-03-08 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (DIR_BUF_SIZE): Define required space for file
- name in terms of sizeof(WCHAR).
- (fhandler_disk_file::readdir_helper): Convert *all* of fname.
- * path.cc (fillout_mntent): Use tmp_pathbuf for path buffer.
- (symlink_worker): Ditto.
- (SCAN_JUSTCHECKTHIS): New state for suffix_scan to define
- that only the actual name gets cheked and a suffix is never attached.
- (suffix_scan::has): If filename + suffix would be > NAME_MAX, start
- in SCAN_JUSTCHECKTHIS state.
- (suffix_scan::next): Add case for SCAN_JUSTCHECKTHIS.
- (symlink_info::check): Use tmp_pathbuf for path buffer. Goto
- file_not_symlink in case of invalid file name.
- (realpath): Use tmp_pathbuf for path buffer.
-
-2008-03-07 Brian Dessent <brian@dessent.net>
-
- * dtable.cc (handle_to_fn): Null-terminate posix_fn in the case
- of justslash = true.
-
-2008-03-07 Brian Dessent <brian@dessent.net>
-
- * fhandler.cc (fhandler_base::open): Use %S for PUNICODE_STRING.
- * syscalls.cc (setmode): Ditto.
-
-2008-03-07 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::sendto): Never send more than
- 64K. Add comment to explain why.
- (fhandler_socket::sendmsg): Ditto.
-
-2008-03-07 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (DLL_OFILES): Add tls_pbuf.o.
- * autoload.cc (CreateDesktopW): Replace CreateDesktopA.
- (CreateWindowStationW): Replace CreateWindowStationA.
- (GetUserObjectInformationW): Replace GetUserObjectInformationA.
- * cygheap.h (cwdstuff::get): Assume default buffer size NT_MAX_PATH.
- * cygtls.cc (_cygtls::remove): Free temporary TLS path buffers.
- * cygtls.h (TP_NUM_C_BUFS): Define.
- (TP_NUM_W_BUFS): Define.
- (class tls_pathbuf): New class to store pointers to thread local
- temporary path buffers.
- (_local_storage::pathbufs): New member.
- * environ.cc (win_env::add_cache): Use temporary TLS path buffer instead
- of stack based buffer.
- (posify): Get temporary outenv buffer from calling function.
- (environ_init): Create temporary TLS path buffer for posify.
- (build_env): Create Windows environment block as WCHAR buffer.
- * environ.h (build_env): Change declaration accordingly.
- * external.cc (sync_winenv): Accommodate build_env change.
- * fhandler_console.cc (fhandler_console::need_invisible): Use
- GetUserObjectInformationW and CreateWindowStationW.
- * fhandler_process.cc (format_process_maps): Use temporary TLS path
- buffer instead of stack based buffer.
- * fork.cc (frok::parent): Convert to use CreateProcessW.
- * path.cc: Throughout use temporary TLS path buffers instead of stack
- based buffer. Replace checks for CYG_MAX_PATH by checks for
- NT_MAX_PATH.
- (getfileattr): New function to replace GetFileAttributesA.
- (normalize_win32_path): Remove Win32 and NT long path prefixes.
- (getwd): Assume PATH_MAX + 1 buffer per SUSv3.
- * path.h (class path_conv): Set path buffer to size NT_MAX_PATH.
- (iswdrive): Define.
- * pinfo.cc (commune_process): Use temporary TLS path buffer instead of
- stack based buffer.
- * registry.cc (get_registry_hive_path): Ditto.
- (load_registry_hive): Ditto.
- * spawn.cc (spawn_guts): Convert to use CreateProcessW and
- CreateProcessAsUserW.
- (av::fixup): Open/close file using NtOpenFile/NtClose.
- * syscalls.cc (mknod_worker): Allow PATH_MAX file name.
- (mknod32): Ditto.
- (getusershell): Ditto.
- * tls_pbuf.cc: New file implementing tls_pathbuf and tmp_pathbuf
- methods.
- * tls_pbuf.h: New header for files using tmp_pathbuf.
- * tlsoffsets.h: Regenerate.
- * winsup.h (NT_MAX_PATH): Define as 32767 to avoid USHORT overflow.
-
-2008-03-06 Corinna Vinschen <corinna@vinschen.de>
-
- * child_info.h (CURR_CHILD_INFO_MAGIC): Reset.
-
-2008-03-06 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open_): Add missing test for O_CREAT.
- Fix comment.
-
-2008-03-05 Corinna Vinschen <corinna@vinschen.de>
-
- * child_info.h (~child_info_spawn): Check moreinfo->myself_pinfo for
- NULL before closing.
- * spawn.cc (spawn_guts): Don't close moreinfo->myself_pinfo explicitely
- in case of failing CloseProcess.
-
- * fhandler.cc (fhandler_base::open_): Return EISDIR when trying to
- create a directory.
- * path.cc (path_conv::check): If input path had a trailing dir
- separator, tack it on to the native path if directory doesn't exist.
-
-2008-03-02 Christopher Faylor <me+cygwin@cgf.cx>
-
- * cygtls.cc (_cygtls::init_exception_handler): Semi-revert to making
- only ourselves the exception handler and nothing else.
- * exceptions.cc (open_stackdumpfile): Use correct format specifiers for
- unicode when printing the name of the stackdump file.
- (stack_info::walk): Stop walking if ebp points into cygwin itself.
- (_cygtls::handle_exceptions): Detect when signal is masked and treat as
- if it was not caught. Reinitialize exception handler to known state to
- avoid subsequent attempts to call Windows exception handlers if an
- exception occurs in a signal handler. Revert to a 'return 0' rather
- than using a goto.
-
- * strfuncs.cc (sys_wcstombs_alloc): Minor formatting tweak.
- * winsup.h: Fix comment typo.
-
-2008-03-02 Christopher Faylor <me+cygwin@cgf.cx>
-
- * smallprint.cc (__small_vsprintf): Free allocated buffer rather than
- pointer into the buffer.
-
-2008-03-01 Christopher Faylor <me+cygwin@cgf.cx>
-
- * cygtls.h (_cygtls::handle_threadlist_exception): Eliminate.
- (_cygtls::init_threadlist_exceptions): Ditto.
- * cygtls.cc (_cygtls::handle_threadlist_exception): Eliminate.
- (_cygtls::init_threadlist_exceptions): Ditto.
- (_cygtls::find_tls): Use myfault handling to deal with errors caused by
- nonexistent threads.
- * sigproc.cc (wait_sig): Eliminate call to init_threadlist_exceptions.
-
-2008-03-01 Christopher Faylor <me+cygwin@cgf.cx>
-
- * cygtls.cc (_cygtls::init_exception_handler): Just return.
-
-2008-03-01 Corinna Vinschen <corinna@vinschen.de>
-
- * exceptions.cc (_cygtls::handle_exceptions): Only call rtl_unwind when
- exiting. Just return, don't set thread context.
- * gendef (_setjmp): Store %fs:0 in jmp_buf.
- (_sjfault): Ditto.
- (_ljfault): Restore %fs:0 from jmp_buf.
- (_longjmp): Ditto.
-
-2008-02-29 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Call close_fs
- instead of close to avoid calling close from wrong class when changing
- a file system based device node.
- (fhandler_disk_file::fchown): Ditto.
- (fhandler_disk_file::facl): Ditto.
-
-2008-02-28 Corinna Vinschen <corinna@vinschen.de>
-
- * exceptions.cc (_cygtls::handle_exceptions): When being debugged,
- leave through SetThreadContext, too, to keep exception handler stack
- intact.
-
-2008-02-28 Corinna Vinschen <corinna@vinschen.de>
-
- * exceptions.cc (open_stackdumpfile): Add comments.
-
-2008-02-28 Corinna Vinschen <corinna@vinschen.de>
-
- * exceptions.cc (open_stackdumpfile): Use NtCreateFile to create
- stackdump file.
-
-2008-02-27 Corinna Vinschen <corinna@vinschen.de>
-
- * exceptions.cc (stack_info::walk): Fix typo.
-
-2008-02-27 Corinna Vinschen <corinna@vinschen.de>
-
- * cygtls.cc (_cygtls::init_exception_handler): Fix comment.
-
-2008-02-27 Corinna Vinschen <corinna@vinschen.de>
-
- * (struct __DIR_cache): Switch order of members so that the buffer
- given to NtQueryDirectoryFile is 8 byte aligned.
-
-2008-02-27 Christopher Faylor <me+cygwin@cgf.cx>
-
- * cygtls.cc (_cygtls::handle_threadlist_exception): Make it clear that
- the function never actually returns.
- * exceptions.cc (_cygtls::handle_exceptions): Jump out of function
- rather than returning to avoid meddling by previously installed
- exception handlers.
-
-2008-02-25 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc (initial_env): Only use local buffer "buf" if DEBUGGING is
- enabled. Replace calls to GetEnvironmentVariable by calls to
- GetEnvironmentVariableA for clarity. Call GetEnvironmentVariableA
- with NULL buffer.
- (cygbench): Ditto, drop local buffer.
- * environ.cc (getearly): Call GetEnvironmentVariableA.
- (environ_init): Retrieve unicode environment and convert to current
- codepage locally.
- (getwinenveq): Ditto.
- * exceptions.cc (try_to_debug): Accommodate new sys_mbstowcs calling
- convention.
- * fhandler_clipboard.cc (set_clipboard): Call sys_mbstowcs to retrieve
- required buffer length.
- * fork.cc (frok::child): Call GetEnvironmentVariableA.
- * miscfuncs.cc: Accommodate changed arguments in calls to sys_mbstowcs.
- * sec_auth.cc: Ditto.
- * strfuncs.cc (sys_wcstombs_alloc): Fix formatting.
- (sys_mbstowcs): Change arguments to allow specifying a source string
- length.
- (sys_mbstowcs_alloc): Ditto.
- * uinfo.cc (cygheap_user::ontherange): Accommodate changed arguments in
- calls to sys_mbstowcs.
- * winsup.h (sys_mbstowcs): Adjust declaration.
- (sys_mbstowcs_alloc): Ditto.
-
-2008-02-20 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (cwdstuff::set): Revert error handling change in case
- DuplicateHandle fails, because it breaks Vista/Longhorn workaround.
-
-2008-02-19 Christopher Faylor <me+cygwin@cgf.cx>
-
- * sigproc.cc (sig_send): Use sigmask of target thread if it is
- specified otherwise default to main sigmask.
-
-2008-02-16 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::fpathconf): Fix _PC_NAME_MAX and
- _PC_PATH_MAX cases.
-
-2008-02-15 Corinna Vinschen <corinna@vinschen.de>
-
- * include/sys/cygwin.h (__INT_MAX_PATH): Remove.
- (external_pinfo): Convert program_long to pointer.
- * external.cc (fillout_pinfo): Add buffer for program_long value.
-
-2008-02-15 Corinna Vinschen <corinna@vinschen.de>
-
- * include/sys/cygwin.h (__INT_MAX_PATH): Define to 32K.
- (external_pinfo): Set size of program_long to __INT_MAX_PATH.
-
-2008-02-15 Christopher Faylor <me+cygwin@cgf.cx>
-
- * include/sys/cygwin.h (external_pinfo): Define program_long size using
- external buffer size rather than cygwin-internal buffer size.
-
-2008-02-15 Christopher Faylor <me+cygwin@cgf.cx>
-
- Perform whitespace cleanup throughout.
-
- * dcrt0.cc (signal_shift_subtract): Eliminate ancient backwards
- compatibility.
- (check_sanity_and_sync): Ditto.
- * winsup.h (SIGTOMASK): Ditto. Just use constant in signal
- calculation.
- * include/cygwin/version: Remove backwards signal mask compatibility
- define.
-
- * path.cc (symlink_info::check_sysfile): Cosmetic change.
-
- * registry.cc (get_registry_hive_path): Remove unneeded variable.
-
- * exceptions.cc (handle_sigsuspend): Eliminate thread signal mask and
- use either main sigmask or current thread sigmask.
- (set_process_mask): Ditto.
- (sighold): Ditto.
- (sigrelse): Ditto.
- (sigset): Ditto.
- (set_process_mask_delta): Ditto.
- (_cygtls::call_signal_handler): Ditto.
- * fhandler_process.cc (format_process_status): Ditto.
- * fhandler_termios.cc (fhandler_termios::bg_check): Ditto.
- * pinfo.h (class pinfo): Ditto.
- * select.cc (pselect): Ditto.
- * signal.cc (sigprocmask): Ditto.
- (abort): Ditto.
- (sigpause): Ditto.
- (sigsend): Ditto.
- (wait_sig): Ditto.
- * thread.h (pthread::parent_tls): New member.
- * thread.cc (pthread::pthread): Record parent_tls here.
- (pthread::thread_init_wrapper): Initialize sigmask from parent thread.
-
-2008-02-14 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.cc (cwcsdup): New function.
- (cwcsdup1): New function.
- * cygheap.h (cygheap_user::get_windows_id): New method returning PWCHAR.
- (cwcsdup): Declare.
- (cwcsdup1): Declare.
- * registry.cc (get_registry_hive_path): Use WCHAR instead of char
- throughout.
- (load_registry_hive): Ditto.
- * registry.h (get_registry_hive_path): Change declaration accordingly.
- (load_registry_hive): Ditto.
- * sec_helper.cc (cygpsid::string): New method returning PWCHAR.
- * security.h (cygpsid::string): Declare.
- * syscalls.cc (seteuid32): Convert local name var to WCHAR.
- * uinfo.cc (cygheap_user::env_userprofile): Convert local name buffers
- to WCHAR. Call sys_wcstombs_alloc to generate puserprof buffer.
-
- * winsup.h: Fix comment.
- (NT_MAX_PATH): New definition for maximum internal path length.
- Use throughout where appropriate.
- * include/limits.h (PATH_MAX): Set to 4096 as on Linux.
-
-2008-02-13 Christopher Faylor <me+cygwin@cgf.cx>
-
- * configure.in: Remove non-working options.
- * configure: Regenerate.
-
-2008-02-13 Christopher Faylor <me+cygwin@cgf.cx>
-
- * syscalls.cc (_isatty): Define as an alias to isatty to override
- newlib version.
-
- * thread.cc (pthread_kill): Deal with signal 0 as per POSIX and also
- avoid manipulating an invalid thread.
-
-2008-02-13 Corinna Vinschen <corinna@vinschen.de>
-
- * posix.sgml: Move llrint, llrintf, llrintl, lrintl, rintl, wcstol,
- wcstoll, wcstoul, wcstoull, wcsxfrm from unimplemented to implemented
- POSIX interfaces.
- Change headline of "GNU extensions" to "GNU and Linux extensions".
- Add fgetxattr, flistxattr, fremovexattr, fsetxattr, getxattr, lgetxattr,
- listxattr, llistxattr, lremovexattr, lsetxattr, removexattr, setxattr,
- wcpcpy and wcpncpy to list of implemented GNU functions.
-
-2008-02-13 Corinna Vinschen <corinna@vinschen.de>
-
- * cygtls.cc (_cygtls::init_exception_handler): Revert patch
- from 2005-12-02.
- * exceptions.cc (stack_info::walk): Add workaround for NT 5.2
- 64 bit OSes.
- * wincap.h (wincaps::has_restricted_stack_args): New element.
- * wincap.cc: Implement above element throughout.
- (wincapc::init): Reset has_restricted_stack_args if not running
- under WOW64.
-
-2008-02-11 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fgetxattr): Remove unused
- attr.
- (fhandler_disk_file::fsetxattr): Ditto.
- * include/attr/xattr.h: New file.
-
-2008-02-11 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc (dll_crt0_1): Fix typo in call to sys_wcstombs.
- * miscfuncs.cc (next_char): Initialize ret to keep gcc happy.
-
-2008-02-10 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (DLL_OFILES): Add ntea.o.
- * cygwin.din (getxattr, listxattr, removexattr, setxattr, lgetxattr,
- llistxattr, lremovexattr, lsetxattr, fgetxattr, flistxattr,
- fremovexattr, fsetxattr): Export Linux extended attribute functions.
- Sort.
- * errno.cc (errmap): Add mappings for ERROR_EAS_DIDNT_FIT,
- ERROR_EAS_NOT_SUPPORTED, ERROR_EA_LIST_INCONSISTENT,
- ERROR_EA_TABLE_FULL, ERROR_FILE_CORRUPT, ERROR_INVALID_EA_NAME.
- * fhandler.h (class fhandler_base): Declare new fgetxattr and
- fsetxattr methods.
- (class fhandler_disk_file): Ditto.
- * fhandler.cc (fhandler_base::fgetxattr): New method.
- (fhandler_base::fsetxattr): New method.
- * fhandler_disk_file.cc (fhandler_disk_file::fgetxattr): New method.
- (fhandler_disk_file::fsetxattr): New method.
- * ntdll.h (STATUS_EA_TOO_LARGE): Define.
- (STATUS_NONEXISTENT_EA_ENTRY): Define.
- (STATUS_NO_EAS_ON_FILE): Define.
- * ntea.cc (read_ea): Rewrite for long pathnames and for using with
- Linux extended attribute functions.
- (write_ea): Ditto.
- (getxattr_worker): New static function.
- (getxattr): New function.
- (lgetxattr): New function.
- (fgetxattr): New function.
- (listxattr): New function.
- (llistxattr): New function.
- (flistxattr): New function.
- (setxattr_worker): New static function.
- (setxattr): New function.
- (lsetxattr): New function.
- (fsetxattr): New function.
- (removexattr): New function.
- (lsetxattr): New function.
- (fsetxattr): New function.
- * security.h (read_ea): Change declaration according to above changes.
- (write_ea): Ditto.
- * include/cygwin/version.h: Bump API minor version.
-
-2008-02-10 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/ftw.cc (ftw): Allow nfds <= 0 for glibc compatibility.
- * libc/nftw.c (nftw): Ditto.
-
-2008-02-07 Corinna Vinschen <corinna@vinschen.de>
-
- * dtable.cc (dtable::init_std_file_from_handle): Set access to
- read/write if handle is connected to a tty or console.
- * fhandler_dsp.cc (fhandler_dev_dsp::dup): Set open flags correctly
- after duplicating from archetype.
- * fhandler_tty.cc (fhandler_tty_slave::dup): Ditto.
- (fhandler_pty_master::dup): Ditto.
-
-2008-02-06 Corinna Vinschen <corinna@vinschen.de>
-
- * miscfuncs.cc (next_char): Fix typos in comment.
- * strfuncs.cc: Remove cygserver guards.
-
-2008-02-06 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_console::trunc_buf): Add to use as cache for
- truncated multibyte characters on input.
- (fhandler_console::write_replacement_char): Declare new method.
- * fhandler_console.cc (CONVERT_LIMIT): Raise to 64K.
- (fhandler_console::fhandler_console): Initialize trunc_buf.
- (ERR): Define as independent value again.
- (fhandler_console::write_replacement_char): New method to print
- replacement chars.
- (fhandler_console::write_normal): Add handling for truncated multibyte
- sequences. Call next_char instead of pathetic CharNextExA function.
- Don't change src, rather just work with found later on.
- * miscfuncs.cc (is_cp_multibyte): Move here from strfuncs.cc.
- Don't call Windows function, restrict to well-known ANSI/OEM codepages
- and UTF-8.
- (next_char): Call CharNextExA only for doublebyte codepages.
- Implement for UTF-8 here.
- * strfuncs.cc (is_cp_multibyte): Move to miscfuncs.cc.
- * winsup.h (next_char): Declare.
- * include/limits.h (MB_LEN_MAX): Set to maximum value of MB_CUR_MAX
- as defined by newlib for now.
-
-2008-02-05 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (CharToOemA): Remove.
- (CharNextExA): Define.
- * environ.cc (codepage_init): Un-static. Set active_codepage to
- active codepage. Default to ansi regardless of buf pointer.
- * fhandler.h (dev_console::get_console_cp): New method.
- (dev_console::con_to_str): Change declaration according to new
- implementation.
- (dev_console::str_to_con): Ditto.
- * fhandler_console.cc (cp_convert): Remove.
- (dev_console::con_to_str): Redefine to take WCHAR as incoming console
- char.
- (dev_console::get_console_cp): Return correct codepage according to
- alternate_charset_active setting.
- (dev_console::str_to_con): Redefine to create WCHAR buffer for console
- output.
- (fhandler_console::read): Read console input as WCHARs.
- (base_chars): Fix typo in comment.
- (fhandler_console::char_command): Save and restore console output
- buffer using UNICODE functions.
- (fhandler_console::write_normal): Convert to write output in UNICODE.
- Use CharNextExA to recognize multibyte characters in input. Workaround
- problem with UTF-8 and MultiByteToWideChar. Simplify the loop for
- printing "normal" characters.
- * strfuncs.cc (active_codepage): New variable to store active codepage.
- (get_cp): Call codepage_init() if active_codepage is uninitialized.
- Just return active_codepage.
- (is_cp_multibyte): New function.
- * winsup.h (active_codepage): Declare.
- (codepage_init): Declare.
- (is_cp_multibyte): Declare.
-
-2008-02-03 Brian Dessent <brian@dessent.net>
-
- * smallprint.cc (__small_vsprintf): Use HEAP_NOTHEAP for type.
- * strfuncs.cc (sys_wcstombs_alloc): Guard use of ccalloc
- to !__OUTSIDE_CYGWIN__ for use in cygserver.
- (sys_mbstowcs_alloc): Ditto.
-
-2008-02-01 Corinna Vinschen <corinna@vinschen.de>
-
- * miscfuncs.cc (cygwin_wcsncasecmp): Never access more than n
- characters.
- (cygwin_strncasecmp): Ditto. Fix for strings longer than n.
-
-2008-02-01 Corinna Vinschen <corinna@vinschen.de>
-
- * string.h: Re-enable inline strcasematch and strncasematch
- implementations and rename to ascii_strcasematch/ascii_strncasematch.
- * dcrt0.cc: Replace str[n]casematch with ascii_str[n]casematch where
- applicable.
- * environ.cc: Ditto.
- * fhandler_process.cc: Ditto.
- * hookapi.cc: Ditto.
- * path.cc: Ditto.
- * spawn.cc: Ditto.
- * strace.cc: Ditto.
- * syscalls.cc: Ditto.
- * uinfo.cc: Ditto.
- * winf.cc: Ditto.
-
-2008-01-31 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc (dll_crt0_1): Use GetCommandLineW and convert to current
- codepage.
- * environ.cc (set_file_api_mode): Always set file api to ANSI if not
- using the OEM codepage.
- (codepage_init): Allow "utf8" codepage.
- * fhandler_clipboard.cc (set_clipboard): Convert clipbuf to void and
- cast as needed. Always convert input to wide char and write
- CF_UNICODETEXT to clipboard.
- (fhandler_dev_clipboard::read): Read CF_UNICODETEXT from clipboard and
- convert to current codepage if CYGWIN_NATIVE format is not available.
- * fhandler_console.cc: Drop redundant undef.
- * smallprint.cc (__small_vsprintf): Convert PWCHAR and UNICODE_STRING
- to current codepage for printing.
- * strfuncs.cc: Use PWCHAR throughout.
- (get_cp): Return CP_UTF8 for utf8_cp codepage setting.
- (sys_wcstombs): Allow NULL target buffer.
- (sys_wcstombs_alloc): New function.
- (sys_mbstowcs_alloc): Ditto.
- * winsup.h (codepage_type): Add utf8_cp.
- (HEAP_NOTHEAP): Define.
- (sys_wcstombs_alloc): Declare.
- (sys_mbstowcs_alloc): Declare.
-
-2008-01-31 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.h (struct cwdstuff): Add dir member to store cwd handle.
- (cwdstuff::get_handle): New method.
- * path.cc (cwdstuff::set): When doit is true, always try to get
- directory handle. Fail if duplicating handle fails. Store handle
- in dir. Fix potential SEGV when setting drive_length.
-
-2008-01-28 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc: Fix Samba version in comment.
-
-2008-01-24 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (fs_info::update): Fix old-style Samba test to support
- recent as well as upcoming Samba releases.
-
-2008-01-22 Corinna Vinschen <corinna@vinschen.de>
-
- * ntdll.h (struct _FILE_FS_OBJECTID_INFORMATION): Define.
- * path.cc (struct smb_extended_info): Define.
- (fs_info::update): Request object id info to get Samba information.
- Set flags according to new implementation.
- * path.h (struct fs_info): Add samba_version to status_flags.
- Implement flags() and samba_version() using IMPLEMENT_STATUS_FLAG.
-
-2008-01-21 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::link): Open file with
- READ_CONTROL for Vista/Longhorn's sake.
-
-2008-01-15 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (install-libs): Overwrite newlib's libg.a with symlink
- to libcygwin.a.
-
-2008-01-15 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (DLL_OFILES): Remove memmem.o.
- * memmem.cc: Remove in favor of newlib implementation.
-
-2008-01-07 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h: Update copyright.
- * include/limits.h: Ditto.
-
-2008-01-06 Christopher Faylor <me+cygwin@cgf.cx>
-
- * fhandler.h (fhandler_base::is_tty): Make bool.
- (fhandler_serial::is_tty): Ditto.
- (fhandler_termios::is_tty): Ditto.
- (fhandler_base::is_slow): Return bool value.
- (fhandler_socket::is_slow): Ditto.
- (fhandler_serial::is_slow): Ditto.
- (fhandler_console::is_slow): Ditto.
- (fhandler_tty_common::is_slow): Ditto.
- (fhandler_tty_master::is_slow): Ditto.
- (fhandler_dev_null::is_slow): Ditto.
-
-2008-01-06 Christopher Faylor <me+cygwin@cgf.cx>
-
- * include/limits.h (TTY_NAME_MAX): Increase size to same as linux to
- allow for (at least) null terminating byte for "/dev/console".
-
-2008-01-01 Christopher Faylor <me+cygwin@cgf.cx>
-
- * tty.cc: Update copyright.
- * pipe.cc: Ditto.
-
-2008-01-01 Christopher Faylor <me+cygwin@cgf.cx>
-
- * newsym: First stab at understanding data as well as functions.
-
- * pipe.cc (fhandler_pipe::init): Move more intelligence here.
- (fhandler_pipe::create): Simplify based on above change.
-
- * tty.cc (tty_list::allocate): Remove non-NT code.
diff --git a/winsup/cygwin/ChangeLog-1995 b/winsup/cygwin/ChangeLog-1995
deleted file mode 100644
index 43d28a3..0000000
--- a/winsup/cygwin/ChangeLog-1995
+++ /dev/null
@@ -1,177 +0,0 @@
-Mon Dec 18 16:44:38 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * configure.in (target_cpu): specify valid Intel x86 architectures
- explicitly.
-
-Mon Dec 18 15:04:29 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * sysdef/*.def: moved to sysdef/i386/.
-
-Mon Dec 18 15:00:56 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * configure.in: Set DLL_ENTRY and SYSDEF_DIR for i386 and powerpc.
- * configure: Regenerated with autoconf 2.7.
-
- * Makefile.in: Use DLL_ENTRY and SYSDEF_DIR.
-
-Sat Dec 16 18:36:44 1995 steve chamberlain <sac@slash.cygnus.com>
-
- Changed the way that file handles are inherited. Now
- all files are opened with the inheriting turned on, and they're
- closed when necessary.
-
- Changed the way that children are waited for. Now
- you can exec a non-gnuwin32 program and wait for its
- result.
-
- * Makefile.in: Turn off frame-pointer.
- * dcrt0.cc (environ_init): Lint.
- * dirsearch.cc (opendir): Use new path_conv mechanism.
- * exceptions.cc (ctrl_c_handler): Exit with correct status
- * exec.cc (file_exists): Moved to paths.cc
- (_execve): Moved most of the work into spawn.cc.
- * fhandler.cc (*): Much.
- * libccrt0.c (foo): Deleted.
- (cygwin_crt0): Lint.
- * path.cc (readlink): Initialize the SECURITY_ATTRIBUTES struct.
- * pipe.cc (pipe, dup*): Reorganized.
- * registry.cc (read_in): Create the key in CURRENT_USER.
- * wait.cc, spawn.cc (*): Much.
- * sysconf.cc (sysconf): Understand SC_PAGESIZE.
- * times.cc (utime): New function.
- * uname.cc (uname): Dig out more info.
-
-Wed Dec 13 05:54:55 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * dcrt0.cc (environ_init): Cast alloca return to appropriate type.
- * spawn.cc (spawn_guts): Ditto.
-
- * strace.cc (__small_{v,}sprintf): Add appropriate prototypes.
-
- * exceptions.cc (_except_list): Only use segments for 386 systems.
- (__stack_trace): Add PowerPC support, and do nothing for systems
- that are not supported except print stack tracing is not yet
- support.
-
- * sdata.cc (import_term): Only use __attribute__((section)) on 386
- systems.
-
- * shared.cc (shared_init): Use MARK macro instead of calling mark
- directly with incorrect type arguments.
-
- * fhandler.cc (fhandler_dev_null::{read,write}): Use size_t in
- prototype, not unsigned int.
-
- * fork.cc (find_exec): Fix type errors.
- * path.cc (path_to_real_path_keep_rel): Ditto.
- * syscalls.h (PATH_TO_REAL_PATH): Ditto.
-
- * {longjmp,setjmp}.c: #ifdef i386 code.
-
- * include/wintypes.h (ExitProcess): Add
- __attribute__((__noreturn__)) so exit compiles without warnings.
-
-Tue Dec 12 18:25:05 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * include/wintypes.h (WINAPI): Only define WINAPI for x86 systems.
-
-Tue Dec 5 16:00:05 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * Makefile.in (all): Only build documentation for info target.
- Expect texi2html to not be found most of the time.
-
-Tue Dec 5 08:08:08 1995 steve chamberlain <sac@slash.cygnus.com>
-
- Release-B10
-
- * cygwin.dll (__assert, wait, spawnv, spawnvp): Deleted.
- * dcrt0.c: Quoting rewritten.
- * exec.cc (file_exists): Use new path_conv mechanism.
- (_execve): Close open child process handles.
- * fhandler.cc (fhandler_normal::open): Follow symlinks.
- (fhandler_normal::read): Keep track of logical file posision.
- (fhandler_normal::lseek): Seek in text files correctly.
- (fhandler_normal::fstat): Set IFLNK bit if its a symlink.
- (fhandler_normal::init): Maintain is_pipe.
- (fhandler_dev_null::fstat): New.
- (fhandler_dev_null::get_handle): Return INVALID_HANDLE.
- * fork.cc: Use new event mechanism.
- * libccrt0.cc: Keep track of _fmode variable.
- * misc.c (readlink): Delete.
- * path.cc (__path_to_real_path_1): Allow /d<letter> mechanism.
- (path_to_real_path_keep_rel): New
- (link_cookie:*): Support for symbolic links.
- * spawn.cc (spawn_guts): Quoting rewritten.
- * times.cc: New.
- * syscalls.cc (_stat_worker): New.
- (_stat, _lstat): Use _stat_worker.
- * sysconf.cc (sysconf): Support _SC_CLK_TCK.
-
-Tue Nov 28 15:29:38 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * loads of stuff. When I make < 100k of diffs in a day,
- the ChangeLog will be usefull.
-
-Tue Nov 21 18:01:39 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * Makefile.in: Build the doc.
- * exceptions.cc: lint.
- * fork.cc: lint.
- * shared.cc (shared_init): If MapViewOfFileEx fails, then try
- again, but get the OS to select the address (for win95)
- * strace.cc (__sysprintf): Print pid and state in hex.
- * syscalls.cc (_unlink): Translate path to realpath.
-
-Wed Nov 15 23:47:43 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * spawn.cc (_exit): set return value's lower byte to 0 by default.
-
- Tue Oct 3 10:23:14 1995 Anders Blomdell (anders.blomdell@control.lth.se)
-
- * spawn.cc (spawn_guts): quote doublequotes correctly
-
-Tue Nov 14 15:05:33 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * configure.in: comment out call to cfg-ml-com.in.
-
-Tue Oct 31 11:19:18 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libcerr.cc: New file.
- * dcrt0.cc (environ_init): Initialize PATH and friends nicely.
- * exceptions.cc (ctrl_c_handler): Default case is to exit.
- * fork.cc (__suffixy, find_exec): translate between paths and
- real_paths.
- * shared.cc (shared_init): Hard wire shared memory at 0xa0000000.
- * syscalls.c (__path_to_real_path, real_path_to_path): Always
- translate '/' <> '\'
-
-Mon Oct 30 17:36:10 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * syscalls.cc (_rename): Fix for win95.
-
-Fri Oct 27 20:53:47 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * Everything changed.
-
-Thu Oct 19 10:47:52 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * registry.cc, uinfo.cc: New files.
- * crt0.c (*uinfo*, *_exe_suffix*): Delete.
- (dll_crt0): Call shared_init.
- * getlogin.c: deleted.
- * shared.cc: Fill in.
- * spawn.c (_spawn): Use __exe_suffix function.
- * syscalls.c (getuid, getgid): Moved into uinfo.cc
- * syscalls.h (*uinfo, __exe_suffix): Deleted
- * Makefile.in: Cope with target configury.
- * termios.c: Fix stub prototypes.
- * win.h: Deleted.
- * include/winadvapi.h: Fill in some REG prototypes.
-
-Thu Oct 19 10:47:52 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * Makefile.in: Cope with target configury.
-
-Wed Oct 18 15:34:49 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * Moved from newlib.
diff --git a/winsup/cygwin/ChangeLog-1996 b/winsup/cygwin/ChangeLog-1996
deleted file mode 100644
index 9c786c4..0000000
--- a/winsup/cygwin/ChangeLog-1996
+++ /dev/null
@@ -1,2031 +0,0 @@
-Mon Dec 23 13:35:27 1996 Jeremy Allison <jra@cygnus.com>
-
- * Makefile.in: Added $(srcdir)/../libstdc++/stl -I$(srcdir)/../libio
- to the include path. As mmap uses STL then this is needed
- to build the cross compiler. Also added mmap.o file.
- * cygwin.din: Added mmap, mprotect, msync, munmap.
- * dcrt0.cc: Added code to get the module pathname from
- a previously unused field in the u area so fork() calls
- don't have to search the path. Forwards compatible with
- earlier releases as they set this field to zero.
- * fork.cc: Added call to recreate_mmaps_after_fork() in
- child code. Ensures child has same view of mmap'ed areas
- as parent.
- * libccrt0.cc: (See dcrt0.cc change). Setup the module
- handle so fork can get the path name.
- * mmap.cc: New file. Implements mmap, mprotect, msync, munmap,
- recreate_mmaps_after_fork. Uses STL.
- * select.cc: Added code to set errno to EINVAL if select done
- on handles and sockets. Must fix this soon.
- * spawn.cc: Set new variable hmodule in u area to zero for child.
- * syscalls.cc: Added fsync functionality. No longer a dummy call.
- * winsup.h: Decremented internal_reserved array by one to add
- hmodule in u area. Added prototype for recreate_mmaps_after_fork().
- * include/sys/mman.h: Fixed include file for mmap calls.
-
-Tue Dec 17 16:20:52 1996 Geoffrey Noer <noer@cygnus.com>
-
- * syscalls.cc (_rename): fix code so we really do
- return -1 if _rename fails.
-
-Tue Dec 17 12:12:29 1996 Jeremy Allison <jra@cygnus.com>
-
- * fhandler.cc: Added Sergeys patch for FakeReadFile.
- * cygwin.din: Re-ordered network calls.
-
-Mon Dec 16 16:47:26 1996 Geoffrey Noer <noer@cygnus.com>
-
- * configure.in: remove AC_C_CROSS (now part of AC_PROG_CC)
- * utils/configure.in: ditto
- * configure: regenerate
- * utils/configure: regenerate
-
-Mon Dec 16 14:50:46 1996 Geoffrey Noer <noer@cygnus.com>
-
- * cygwin.din: export cygwin32_getsockopt
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * spawn.cc: don't assume all scripts should be run in
- bash -- run the shell specified after the #!
-
-Fri Dec 13 16:18:22 1996 Jeremy Allison <jra@cygnus.com>
-
- * path.cc: Added support for UNC paths.
-
-Fri Dec 13 10:56:21 1996 Jeremy Allison <jra@cygnus.com>
-
- * cygwin.din: Added h_errno, seteuid, _seteuid.
- * exceptions.cc: Made init_exceptions extern "C".
- * exceptions.h: Added cplusplus wrappers to enable this to
- be used from C.
- * net.cc: Added error numbers, fixed gethostbyaddr, added h_errno
- fixes.
- * stubs.cc: Added seteuid.
- * include/mywinsock.h: Added HOST error entries for DNS lookups.
-
-Tue Dec 10 15:38:46 1996 Geoffrey Noer <noer@cygnus.com>
-
- * version.h: bump CYGWIN_DLL_VERSION_MINOR to 4
-
- patch from Marcus Daniels <marcus@sysc.pdx.edu>:
- * fhandler.cc: add fhandler_dev_null::dup (fhandler_base *child)
- * fhandler.h: add matching header
-
- gnu-win32 beta 17.1 release made
-
-Thu Dec 5 14:03:08 1996 Geoffrey Noer <noer@cygnus.com>
-
- * select.cc: add missing end comment at about line 933.
- gnu-win32 beta 17 release made
-
-Wed Dec 4 15:53:11 1996 Geoffrey Noer <noer@cygnus.com>
-
- * version.h: increment minor dll number in conjunction
- with gnu-win32 beta 17 release
-
-Tue Dec 3 15:05:57 1996 Geoffrey Noer <noer@cygnus.com>
-
- * strsep.cc: new file containing Berkeley-copyrighted strsep
- code previously in misc.cc.
- * misc.cc: strsep moved to strsep.cc, stop including
- unistd.h, strings.h, sys/types.h, stddef.h, and stdarg.h
- * Makefile.in: appropriate adjustments to add strsep.cc
-
-Tue Dec 3 13:50:59 1996 Geoffrey Noer <noer@cygnus.com>
-
- * include/sys/copying.dj: new file whose presence is
- required by include/sys/file.h
-
-Tue Dec 3 13:37:27 1996 Geoffrey Noer <noer@cygnus.com>
-
- Throughout all Cygnus-developped source files: put all
- code under GPL
-
-Tue Dec 3 10:54:01 1996 Jeremy Allison <jra@cygnus.com>
-
- * fork.cc: Changed code to delete [] saved child_hinfo
- after allocate_pid called. Needed as child changes this
- value in the shared area when it de-linearizes fd array.
- Needed to stop race condition with earlier fix.
- * winsup.h: Changed definition of item in hinfo to be
- a char array rather than fhandler_console. Stops
- destructor being called when fork delete [] of
- hinfo array called.
- * hinfo.cc: Changes (casts) to support winsup.h changes.
-
-Mon Dec 2 17:22:13 1996 Geoffrey Noer <noer@cygnus.com>
-
- * include/utime.h: add ifdef _UTIME_U wrapper around header
-
-Mon Dec 2 15:45:46 1996 Jeremy Allison <jra@cygnus.com>
-
- * fork.cc: Fixed file descriptor resource leak in parent.
- * registry.cc: Removed fatal error if registry key cannot
- be opened. Causes errors in service code.
-
-Wed Nov 27 15:40:15 1996 Geoffrey Noer <noer@cygnus.com>
-
- * cygwin.din: for MS compatibility, also export functions
- as _funcname = funcname
- * include/netdb:
- * include/sys/socket.h:
- Do the equivalent thing for functions exported as cygwin32_funcname
-
-Wed Nov 27 15:14:30 1996 Geoffrey Noer <noer@cygnus.com>
-
- * cygwin.din: remove exported helper functions that shouldn't
- need to be exported (_read et al)
- * glob/Makefile.in: add SHELL definition
- * utils/Makefile.in: add SHELL definition
-
-Mon Nov 25 14:24:52 1996 Geoffrey Noer <noer@cygnus.com>
-
- * include/commdlg.h, ddeml.h, winadvapi.h, winbase.h, wincon.h,
- windef.h, windowsx.h, winerror.h, wingdi.h, winkernel.h, winnt.h,
- wintypes.h, winuser.h, winversion.h:
- Add MS-style header files back, each of which now includes our
- windows.h. This should allow compilation of Windows code
- that expects normal MS-named headers as long as the information
- is in our windows.h somewhere. The appropriate wrappers have
- been added to each file so windows.h isn't included more than
- once.
- * include/windows.h: add paranoia wrapper so it can be included
- more than once.
-
-Mon Nov 18 22:19:40 1996 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: change rules around so new-cygwin.dll is
- only rebuilt when necessary
- * spawn.cc: include <stdlib.h>
-
-Mon Nov 18 21:08:15 1996 Geoffrey Noer <noer@cygnus.com>
-
- * net.cc: remove extern "C"s that shouldn't be there
- (get_win95_ifconf, get_winnt_ifconf, get_if_flags)
- * syscalls.cc: remove extern "C"s from num_entries, _stat_worker
- * winsup.h: add extern "C"s for syscalls protos
-
-Mon Nov 18 20:35:39 1996 Geoffrey Noer <noer@cygnus.com>
-
- * winsup.h: include version.h
- * Makefile.in: remove dependencies involving version.h, but add
- version.h to winsup.h dependency line and also add others that
- should also be there.
- * dcrt0.cc:
- * libccrt0.cc:
- * registry.cc:
- * shared.cc: delete includes of version.h
-
-Mon Nov 18 20:16:37 1996 Geoffrey Noer <noer@cygnus.com>
-
- * stubs.c -> stubs.cc, add extern "C"s
- * uname.c -> uname.cc, add extern "C"s
- * console.cc: add extern "C"s, remove include windows.h
- since its already included in winsup.h
- * dirsearch.cc: add extern "C"s
- * fcntl.cc: add extern "C"s
- * winsup.h: remove LEAN_AND_MEAN define since that's no longer
- relevant with new windows headers, include version.h
- * malloc.cc: fix typos
-
-Mon Nov 18 18:02:31 1996 Geoffrey Noer <noer@cygnus.com>
-
- * grp.c renamed to grp.cc, add extern "C"s
- * misc.c renamed to misc.cc, add extern "C"s
-
-Mon Nov 18 16:08:26 1996 Geoffrey Noer <noer@cygnus.com>
-
- * syscalls.cc: extern "C"'d function calls
- * net.cc: extern "C"'d function calls, some respacing
- * hinfo.cc: extern "C"'d function calls, some respacing
- * syscalls.h: removed defines for MIN, errno, alloca(x),
- DEFAULT_GID/UID, NOT_OPEN_FD(fd), STD_RBITS et al,
- O_NOSYMLINK
- * winsup.h: added what was just deleted from syscalls.h
-
-Mon Nov 18 15:56:22 1996 Jeremy Allison <jra@cygnus.com>
-
- * cygwin.din: Added readv
- * syscalls.cc: Added readv code.
- * syscalls.h: Added readv prototype.
-
-Wed Nov 13 15:55:14 1996 Geoffrey Noer <noer@cygnus.com>
-
- * cygwin.din: added C++-related exports for stuff in
- libgcc.a (from new.o, tinfo.o, tinfo2.o, exception.o).
-
-Mon Nov 11 15:50:26 1996 Geoffrey Noer <noer@cygnus.com>
-
- * dcrt0.cc
- * dirsearch.cc
- * malloc.cc
- * passwd.cc
- * path.cc,
- * pinfo.cc
- * syslog.cc
- * utils/kill.cc
- * utils/cygwin.cc:
- need to #include <stdlib.h> which used to be included
- automatically in windows.h included by winsup.h.
- * shared.cc: UnmapViewOfFile takes a void *, not a
- const void *
- * malloc.cc: formatting fixes
-
-Fri Nov 8 17:31:55 1996 Jeremy Allison <jra@cygnus.com>
-
- * select.cc: Added fix for HANDLE select sent by
- Sergey Okhapkin.
- * fhandler.h: Changed dup to return int. Can now
- return error to dup2.
- * fhandler.cc: Changed dup to return error code.
- Corrected fhandler_console::close to return
- error code.
- * hinfo.cc (dup2): Check return code from
- fhandler->dup.
- * times.cc: Changed DST calculation as tm struct
- month starts at zero, NT wMonth starts at 1.
- * TODO: Added the things i'd like to do.
-
-Wed Nov 6 17:42:31 1996 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: Changed name of base file for cygwin.dll from
- base to cygwin.base. Changed name of exp file for cygwin.dll
- from win.exp to cygwin.exp. Updated dependency list, removing
- recently removed files like libcfork.cc, added missing files,
- and added all missing header dependencies. Small formatting
- fixes.
-
-Fri Nov 1 16:38:48 1996 Geoffrey Noer <noer@cygnus.com>
-
- * TODO: deleted old stuff from a long time ago, added some
- new stuff
-
- * added public domain disclaimers to all files missing them,
- reformatting of non-imported code to conform to GNU standards.
- Changes to:
- delqueue.h, exceptions.h, fcntl.cc, fhandler.h, grp.c,
- init.cc, ioctl.cc, key.cc, libcctype.c, libcerr.cc, libcmain.cc,
- misc.c, path.h, pold.c, resource.cc, smallprint.c, strerror.cc,
- syslog.cc, termios.cc, test.c, version.h, wait.cc
-
-Fri Nov 1 14:44:29 1996 Jeremy Allison <jra@cygnus.com>
-
- * fhandler.h: Added is_console() method needed by
- new select code.
- * fhandler.cc (fhandler_console::init): Added c_oflag setting
- dependent on bin parameter.
- * select.cc: Added code to implement select from console
- handles. Ignores keyup events and still blocks.
-
-Wed Oct 30 16:35:41 1996 Jeremy Allison <jra@cygnus.com>
-
- * fhandler.h: Removed fhandler_console_in, fhandler_console_out
- and integrated them both into fhandler_console. Added output_handle_
- so fhandler console has two handles.
- * fhandler.cc: Updated to support changes in fhandler.h. It is now
- possible to open("/dev/tty") and read/write to the same fd.
- * hinfo.cc(build_fhandler): Removed references to obsolete classes.
- * spawn.cc: Changed to get correct reference to output_handle_ for
- fhandler_console class.
- * console.cc: Changed to get output handle rather than input handle.
- * winsup.h: Changed definition of prototypes for functions changed
- in console.cc
-
-Wed Oct 30 13:05:33 1996 Geoffrey Noer <noer@cygnus.com>
-
- * include/custcntl.h
- * include/features.h
- * include/icmp.h
- * include/wchar.h
- * include/cygwin32/icmp.h
- * include/cygwin32/ip.h
- * include/cygwin32/sockios.h
- * include/cygwin32/types.h
- * include/cygwin32/uio.h
- * include/sys/ttychars.h
- Added comment with name of header to each so that these are no
- longer empty files (some unzip programs won't create
- zero-length files which is a problem for headers)
-
-Sun Oct 27 17:30:03 1996 Geoffrey Noer <noer@cygnus.com>
-
- * cygwin.din: also export "_execl = execl" and the same
- for _execle and _execlp
-
-Thu Oct 24 01:43:29 1996 Geoffrey Noer <noer@cygnus.com>
-
- * include/windows.h: rewritten to include headers from
- the include/Windows32 subdirectory
- * winsup.h: no longer define MAX_PATH here since it's defined
- in header files dragged in by windows.h
- * dirsearch.cc (readdir): change WIN32_FIND_DATAA to WIN32_FIND_DATA
- * libccrt0.cc: #include <stdlib.h>
- * syscalls.cc (_unlink): chmod file to be unlinked to be
- writable and try to delete it again if first delete failed
- with permission denied error (rm will now work on read-only files)
- (num_entries): change WIN32_FIND_DATAA to WIN32_FIND_DATA
- * include/commdlg.h: delete
- * include/ddeml.h: delete
- * include/winadvapi.h: delete
- * include/winbase.h: delete
- * include/wincon.h: delete
- * include/windef.h: delete
- * include/windowsx.h: delete
- * include/winerror.h: delete
- * include/wingdi.h: delete
- * include/winkernel.h: delete
- * include/winnt.h: delete
- * include/wintypes.h: delete
- * include/winuser.h: delete
- * include/winversion.h: delete
-
-Wed Oct 23 10:43:05 1996 Jeremy Allison <jra@cygnus.com>
-
- * dcrt0.cc (api_fatal): Changed locking clear of
- process table to unlocking clear. Needed as lock code calls
- api_fatal.
- * exceptions.cc: Added debug_printfs to follow exceptions in
- strace mode.
- * pinfo.cc: Added code to ensure fd table is cleared when new
- pid entry allocated. Fixed bug when process is terminated
- violently by TerminateProcess and leaves fd table non-zero.
- * termios.cc: Changed stubbed out syscalls to syscall_printf
- rather than small_printf. Stops annoying tcdrain message.
- * winsup.h: Made get_empty_pinfo call private to pinfo_list.
- Should never be called external to this class.
-
-Tue Oct 22 16:14:23 1996 Jeremy Allison <jra@cygnus.com>
-
- * hinfo.cc: Removed previous change. This is not the
- correct place to flush input events.
-
-Tue Oct 22 09:25:32 1996 Jeremy Allison <jra@cygnus.com>
-
- * dcrt0.cc: Fixed up exit code to clean up pinfo array.
- * exceptions.cc: Fixed up exit code to clean up pinfo array.
- * fork.cc: Tidied up access to inuse_p entry. Added flags
- to allow different states to be represented.
- * hinfo.cc: Added code to flush pending events if
- stdin is a console.
- * pinfo.cc (pinfo::record_death): Added code to clean
- the pinfo array if we are an exiting parent.
- * spawn.cc: Removed erroneous code to clean childs
- pinfo entry.
- * wait.cc: Changed WAIT_ERROR_RC to Win32 WAIT_FAILED.
- Tidied up access to pinfo array.
- * winsup.h: Added record_death_nolock to pinfo class.
- Added PID_XXX types for inuse_p.
-
-Tue Oct 22 01:26:52 1996 Geoffrey Noer <noer@cygnus.com>
-
- * include/Windows32/Base.h:
- * include/Windows32/Functions.h:
- * include/Windows32/Structures.h:
- * include/Windows32/UnicodeFunctions.h:
- Fixes to just commited changes
-
-Mon Oct 21 19:58:50 1996 Geoffrey Noer <noer@cygnus.com>
-
- * include/Windows32/ASCIIFunctions.h:
- * include/Windows32/Base.h:
- * include/Windows32/Defines.h:
- * include/Windows32/Functions.h:
- * include/Windows32/Structures.h:
- * include/Windows32/UnicodeFunctions.h:
-
- Add back items in old include files (commdlg.h, ddeml.h,
- shellapi.h, winadvapi.h, winbase.h, wincon.h, windef.h,
- windowsx.h, winerror.h, wingdi.h, winkernel.h, winnt.h,
- wintypes.h, winuser.h, winversion.h) which should now be able
- to be erased and windows.h modified to point to the new headers
- without anything nasty happening.
-
- * include/WINREADME: deleted
- * include/mywinsock.h: removed many blank lines
-
-Mon Oct 21 09:48:00 1996 Jeremy Allison <jra@cygnus.com>
-
- * select.cc: Re-written from scratch. Take account of
- the following cases. (1). All sockets [written&works]
- (2). Handles, sockets and always readies [written,not tested]
- (3). All handles [written,not tested]. (4). Handles & sockets
- with timeout [not yet written,returns -1]. Correctly blocks
- and doesn't spin cpu.
- * pinfo.cc: Changed to add global lock around pinfo array.
- * fork.cc: Changed to use global pinfo lock.
- * shared.cc: Fixed bug with fork()->exec()->exec() code.
- * net.cc: Removed select_init() call (no longer used).
- * spawn.cc: Implemented suggestion that spawn creates
- process suspended, then sets up it's dwProcessId entry
- in the shared pinfo array.
- * wait.cc: Changed to use global pinfo lock.
- * winsup.h: Added missing windows_95() call.
- * fhandler.h: Changed ifdefs to select new always_ready
- methods.
- * fhandler.cc (fhandler_console::write): Fixed bug
- where return of write_normal was being ignored.
- * dcrt0.cc: Added code to use global pinfo lock.
- Ensure that process records it's own death.
- * exceptions.cc: Added code to clear our entry in pinfo
- array when we are exiting. Should reduce dead processes in
- pinfo array.
- * include/winbase.h: Added MAXIMUM_WAIT_OBJECTS define.
-
-Mon Oct 21 00:52:17 1996 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: install headers from new Windows32 dir
-
-Sat Oct 19 00:47:58 1996 Geoffrey Noer <noer@cygnus.com>
-
- * include/Windows32/Base.h: change DWORD to unsigned int from
- unsigned long, change __WIN32__ checks to _WIN32, change
- // comments to /* */
-
-Fri Oct 18 17:33:07 1996 Geoffrey Noer <noer@cygnus.com>
-
- * include/Windows32/Defines.h: change INFINITE to 0xFFFFFFFF,
- add back definitions present in old winsup headers missing from
- this file (STATUS_WAIT_0 et al, CONTEXT stuff, FAR, PACKED,
- ASCIICHAR)
- * include/Windows32/Functions.h: change // comments to /* */
- * include/Windows32/Messages.h: add definitions for WM_NULL,
- WM_PENWINFIRST, WM_PENWINLAST
- * include/Windows32/Sockets.h: change __WIN32__ checks to _WIN32
- * include/Windows32/Structures.h: add ppc case for CONTEXT
- structure, change // comments to /* */
-
-Fri Oct 18 17:25:09 1996 Geoffrey Noer <noer@cygnus.com>
-
- * include/Windows32: new directory for Windows headers
- * include/Windows32/ASCIIFunctions.h:
- * include/Windows32/Base.h:
- * include/Windows32/Defines.h:
- * include/Windows32/Errors.h:
- * include/Windows32/Functions.h:
- * include/Windows32/Messages.h:
- * include/Windows32/Sockets.h:
- * include/Windows32/Structures.h:
- * include/Windows32/UnicodeFunctions.h:
- New Win32 headers from Scott Christley's windows32api-0.1.2 package
- with no local modifications.
-
-Wed Oct 16 17:16:33 1996 Geoffrey Noer <noer@cygnus.com>
-
- * key.cc: remove extra blank lines, change ASCIICHAR to AsciiChar
- * registry.cc: remove #include <winbase.h> since it's already
- included in windows.h
-
-Tue Oct 15 09:51:48 1996 Jeremy Allison <jra@cygnus.com>
-
- * fhandler.h: Many changes to support moving fhandler array out of
- shared area into locally allocated memory. Removed fhandler class,
- fhandler_base is now root of class tree. Re-arranged class definitions
- to make it clear what functions are virtual and can be overridden.
- Inlined may accessor functions.
- * fhandler.cc: Many changes to support moving fhandler array out of
- shared area into locally allocated memory. unix_path_name_ is now
- always set (all fhandler_base classes have a name).
- * hinfo.cc: Many changes to support moving fhandler array out of
- shared area into locally allocated memory. Added linearization and
- de-linearization functions.
- * net.cc(socket): Added code to keep name for fhandler_socket.
- * pinfo.cc : Changed allocation of fhandler_base array to be in local
- memory rather than in shared area. (modified functions are pinfo_init,
- pinfo_list::get_empty_pinfo, pinfo_list::allocate_pid,
- pinfo::record_death).
- * shared.cc: Added functions to copy fd area for spawned process.
- Changed name of shared area to include master version number of
- Cygwin32.
- * spawn.cc (spawn_guts): Added code to initialize new shared area
- for fds.
- * syscalls.cc: Changed all code depending on NOFILE to use
- getdtablesize(). Added internal setdtablesize() call for exec'ed
- processes.
- * syscalls.h: Added getdtablesize().
- * sysconf.cc (sysconf): Changed SC_OPEN_MAX to return getdtablesize().
- * winsup.h: Moved fhandler array out of shared area. Changed from
- fhandler to fhandler_base (new root of class tree).
- * include/mywinsock.h: Updated #endif to make end of
- __INSIDE_CYGWIN32__ clear.
- * include/winkernel.h: Added UnmapViewOfFile call.
-
-Mon Oct 14 14:59:16 1996 Geoffrey Noer <noer@cygnus.com>
-
- * sysdef/i386: replace all files with ones from Scott
- Christley's windows32api-0.1.2 package. Still need to
- integrate new headers.
-
-Mon Oct 14 13:41:14 1996 Geoffrey Noer <noer@cygnus.com>
-
- * syscalls.cc (_unlink): need to fchmod file to writable
- before attempting to delete. This change still needs more
- work (fchmod isn't written yet).
- * (fchmod): change comment
-
-Fri Oct 11 22:27:17 1996 Geoffrey Noer <noer@cygnus.com>
-
- * fhandler.cc, fhandler.h: minor fixes to console
- support functions (remove missed reference to gotarg2,
- definition in fhandler.h)
-
-Wed Oct 9 17:55:00 1996 Geoffrey Noer <noer@cygnus.com>
-
- * delqueue.cc: added copyright notice, reformatted file
-
- from sos@prospect.com.ru (Sergey Okhapkin):
- * fhandler.cc, fhandler.h: add/fix ansi/vt100 console support,
- and fix a tab bug
- (modified functions are fhandler_console_out::clear_screen,
- fhandler_console_out::clear_to_eol,
- fhandler_console_out::char_command,
- fhandler_console_out::write,
- FakeReadFile)
-
-Wed Oct 9 17:32:17 1996 Jeremy Allison <jra@cygnus.com>
-
- * times.cc: Swapped gmtime and localtime (they were
- incorrectly reversed).
- Added is_dst determination to them both.
- * misc.c: Added swab, ffs.
- * fcntl.cc(fcntl): Added capability for lock calls.
- * fhandler.h: Added lock method into fhandler class.
- * fhandler.cc: Added NT/Win95 semantics locks into ::lock
- made them pretend they are POSIX locks.
- * syscalls.cc (writev): Fixed return value bug.
- * net.cc: Added WSAEOPNOTSUPP error.
- * cygwin.din: Added ffs and swab.
- * include/strings.h: Added file (just include string.h).
- * include/winbase.h: Added defines LOCKFILE_FAIL_IMMEDIATELY
- and LOCKFILE_EXCLUSIVE_LOCK.
- * include/winerror.h: Added define ERROR_LOCK_FAILED.
-
-Thu Oct 3 16:19:23 1996 Jeremy Allison <jra@cygnus.com>
-
- * fhandler.h: Many changes - removed all public variables
- from classes, replaced with accessor functions. Renamed all
- class variables to add a trailing '_'. This makes reading
- and understanding which variables are class variables much simpler.
- Changed name member to unix_path_name_ and made dynamic rather
- than a fixed 31 byte buffer per entry.
- * fhandler.cc: Updated varable access for above.
- * fcntl.cc: Updated varable access for above.
- * hinfo.cc: Updated varable access for above.
- * spawn.cc: Updated varable access for above.
- * syscalls.cc: Added fsync (null call) and fchmod(null
- call at present).
- * net.cc: Added ioctls for SIOCGIFCONF and SIOCGIFFLAGS.
- Added ntohs, ntohl, static functions get_winnt_ifconf,
- get_win95_ifconf and get_if_flags.
- * include/cygwin32/if.h: Added structs for new ioctls.
- * include/cygwin32/socket.h: Added iovec include.
- * include/asm/socket.h: Added defines for above ioctls.
- * cygwin.din: Added ntohs, ntohl, fsync, fchmod.
-
-Wed Oct 2 17:34:21 1996 Geoffrey Noer <noer@cygnus.com>
-
- * utils/configure.in: add call to AC_CANONICAL_SYSTEM
- * utils/configure: regenerate
- * Makefile.in: build cygwin.dll as new-cygwin.dll and install as
- cygwin.dll to prevent confusion when building winsup natively
-
-Tue Oct 1 17:27:34 1996 Jeremy Allison (jra@cygnus.com)
-
- * include/regex.h: Added.
- * net.cc: Added WSAECONNRESET, WSAEPFNOSUPPORT to
- errmap array.
-
-Tue Oct 1 15:40:39 1996 Jeremy Allison (jra@cygnus.com)
-
- * fork.cc (cygwin_fork_helper1): Fixed resource leak of process
- handles, added cleanup code. Also fixed timout problem when child
- cannot be initialized.
- * dirsearch.cc (readdir): Changed comparison to explicitly check for
- INVALID_HANDLE_VALUE. Test < 0 fails with void *.
- * syscalls.cc (num_entries): Changed comparison to explicitly check for
- INVALID_HANDLE_VALUE. Test < 0 fails with void *.
- * cygwin.din: Added regcomp, regexec, regerror, regfree.
- * Makefile.in: Added EXTRA_OFILES containing ../librx/rx.o. Added
- comment to explain makefrag. Added ../newlib/libc/include to include
- path.
-
-Mon Sep 30 16:10:56 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * cygwin.din: Remove getopt and friends.
-
-Fri Sep 27 18:31:28 1996 Jeremy Allison <jra@cygnus.com>
-
- * dcrt0.cc (dll_crt_1): Moved initialization of _reent to correct
- position.
-
-Fri Sep 27 14:24:05 1996 Jeremy Allison <jra@cygnus.com>
-
- * dcrt0.cc (dll_crt_1): Fixed fork bug with _impure_ptr not being
- initialized correctly in a forked child. This should fix
- the bash echo in a sub-shell bug.
- * include/sys/uio.h: Created file. Contains definitions for writev
- * include/limits.h: Added IOV_MAX and SSIZE_MAX.
- * syscalls.cc: Added writev, changed read and write to return ssize_t.
- * syscalls.h: Added writev, changed read and write to return ssize_t.
- * cygwin.din: Added writev call.
-
-Wed Sep 20 13:09:00 1996 Jeremy Allison <jra@cygnus.com>
-
- * include/mntent.h: Added MOUNTED definition, needed by
- some code.
- * dcrt0.cc : Added __progname for getopt code.
- * misc.c: Added getw code.
- * cygwin.din: Added getopt, optarg, opterr, optind
- optopt, putw, getw calls.
-
-Fri Sep 20 03:03:17 1996 Geoffrey Noer <noer@cygnus.com>
-
- * select.cc: change long millisec to unsigned int,
- respaced file
-
- patch from Sergey Okhapkin <sos@prospect.com.ru>:
- * select.cc (polled): fix for select to get keyboard input
- working properly (check EventType != KEY_EVENT instead
- of checking for KeyEvent.AsciiChar == 0)
- * select.cc (cygwin32_select): make int i unsigned int so NULL is
- a valid timeout argument for loop
-
-Fri Sep 13 18:21:52 1996 Jeremy Allison <jra@cygnus.com>
-
- * fhandler.cc (fhandler_base::read): rewrite text mode read
-
-Fri Sep 13 14:58:17 1996 Geoffrey Noer <noer@cygnus.com>
-
- * exceptions.cc (call_handler): fix control-C not working
- problem by setting rethere variable before the old value is
- clobbered.
-
-Thu Sep 12 16:27:00 1996 Jeremy Allison <jra@cygnus.com>
-
- * syslog.cc (pass_handler) : Removed duplicate code
- in pass_handler::print(). Added get_win95_event_log_path()
- to facilitate moving to registry configuration.
-
-Thu Sep 12 12:56:00 1996 Jeremy Allison <jra@cygnus.com>
-
- * syslog.cc : Added real openlog, syslog, logmask, closelog
- calls. syslog logs to event log on NT, file on Win95.
- * include/winnt.h : added EVENTLOG_xx_TYPE definitions.
- * include/winadvapi.h : added ReportEventA, RegisterEventSourceA
- DeregisterEventSourceA declarations.
- * include/winkernel.h : added LockFile, UnlockFile, LockFileEx,
- UnlockFileEx declarations.
- * include/wintypes.h : added PSID typedef.
- * include/sys/syslog.h : added options flag definitions for openlog.
-
-Wed Sep 11 15:34:09 1996 Geoffrey Noer <noer@cygnus.com>
-
- * fhandler.cc (popen): delete stub in favor of newlib's
- (pclose): delete stub in favor of newlib's
-
-Tue Sep 10 17:20:56 1996 Geoffrey Noer <noer@cygnus.com>
-
- * configure.in: don't transform names (the only time this might
- be a good idea is for unix x cygwin32)
- * configure: regenerated with autoconf
-
-Tue Sep 10 17:20:56 1996 Geoffrey Noer <noer@cygnus.com>
-
- patch from Sergey Okhapkin <sos@prospect.com.ru>:
- * fhandler.cc (FakeReadFile): support arrow keys, stop treating
- bringing window to front as a key down (resulting in random
- characters being printed in bash).
-
-Mon Sep 9 19:09:36 1996 Geoffrey Noer <noer@cygnus.com>
-
- * syscalls.cc (system): fix system call
-
-Fri Sep 6 09:33:13 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * fhandler.h (fhandler_base): Make execable_p public char, not
- private signed char. Delete get_execable.
- * fhandler.cc (fhandler_base::get_execable): Renamed to
- check_execable_p.
- (fhandler_base::open): Restore symlink support.
- Set execable_p, symlink_p.
- (fhandler_base::fstat): Replace call to get_execable with reference
- to execable_p.
- (fhandler_base::fhandler_base): Set execable_p to 0.
- * path.h (symlink_check): Declare it.
- * path.cc (symlink_check): New function.
- (readlink): Call it.
- (symlink_follow): Likewise. New arg EXEC, callers updated.
- * syscalls.cc (_stat_worker): New arg CALLER, callers updated.
-
- * syscalls.cc: Delete all occurences of in/out and MARK.
-
-Thu Sep 5 18:51:01 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * fork.cc: Don't include <ctype.h>. Delete find_exec and support.
- * spawn.cc: Include <ctype.h>. Move find_exec and support here.
- (perhaps_suffix): New argument report_failure_p, callers updated.
- (find_exec_1): Use perhaps_suffix when scanning PATH.
- (spawn_guts): Replace code to translate posix to win32 path lists
- with calls to utility fns that do the job.
-
-Wed Sep 4 13:30:57 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * path.cc (readlink): Make more bulletproof.
-
-Wed Aug 28 16:44:24 1996 Geoffrey Noer <noer@cygnus.com>
-
- * syscalls.cc (system): use execlp
- * public release beta 16 made
-
-Tue Aug 27 09:58:14 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * version.h (CYGWIN_DLL_VERSION_MINOR): Bump up to 2.
-
-Mon Aug 26 15:12:44 1996 Geoffrey Noer <noer@cygnus.com>
-
- * syscalls.cc (system): added basic system() call.
-
-Mon Aug 26 13:46:30 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * cygwin.din (cygwin_fork_helper__FPvN30): Delete.
- (vfork,select): Add.
- * fork.cc (prepare_child): Delete, contents moved into
- cygwin_fork_helper1.
- (cygwin_fork_helper): Delete, contents moved into __fork.
- * winsup.h (cygwin_fork_helper): Delete.
-
- * path.cc: #include <fcntl.h>.
- (symlink,readlink): Reenable, rewrite.
- (symlink_follow): New function.
- * path.h (symlink): Delete.
- (SYMLINK_COOKIE, MAX_LINK_DEPTH): Define.
- (symlink_follow): Declare.
- * spawn.cc (spawn_guts): Rewrite symlink support.
-
- * syscalls.cc (_unlink): Make arg a const char *.
- * winsup.h (_unlink): Likewise.
-
- * spawn.cc (spawn_guts): Fix allocation of stack space for sh.exe path.
-
- * include/sys/errno.h: Deleted. Use newlib's.
-
-Fri Aug 23 16:00:00 1996 Jeremy Allison <jra@cygnus.com>
-
- * net.cc (getdomainname): Changed win95 code to open
- "System" key rather than "SYSTEM". I think the registry
- is case-sensitive.
-
-Thu Aug 22 17:04:09 1996 Geoffrey Noer <noer@cygnus.com>
-
- move fork into the dll:
- * libcfork.cc: deleted
- * fork.cc (vfork): used to be in libcfork.cc
- * (__fork): used to be in libcfork.cc
- * (fork): used to be in libcfork.cc
- * Makefile.in: don't build libcfork.cc any more
- * libccrt0.cc: set data_start, etc. from dll structure
- * winsup.h: add data_start, etc. to public vars in dll
- * cygwin.din: list fork
-
-Thu Aug 22 01:36:53 1996 Geoffrey Noer <noer@cygnus.com>
-
- * registry.cc: fix new registry code
- * syscalls.cc: make Windows95 check function extern "C"
-
-Wed Aug 21 16:15:47 1996 Geoffrey Noer <noer@cygnus.com>
-
- * cygwin.din: list vfork
- * dirsearch.cc: fix errno setting in readdir that caused
- diff to not function on directories
- * pipe.cc: reformatted
-
-Wed Aug 21 15:12:47 1996 Jeremy Allison <jra@cygnus.com>
-
- * net.cc (domainname): Changed getdomainname to get the
- information from the registry.
- * registry.h: Modified interface to reg_key.
- * registry.cc: Added open(),close() calls, made
- get/set string values return error indication, added trailing
- underscore to hkey member so it can be seen to
- be a class member.
- * include/winadvapi.h: Added KEY_READ and KEY write
- defines for registry access.
-
-Mon Aug 19 09:22:35 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * path.cc (split_path): New function.
- * path.h (split_path): Declare it.
- * cygwin.din (cygwin32_split_path): Export it.
-
- * include/winkernel.h (FILE_SHARE_DELETE): Define.
-
- * syscalls.cc (__do_global_[cd]tors], __main): Move from here.
- * dcrt0.cc: To here.
-
- * dcrt0.cc (recur): Restore (now that we know WHY it was needed).
- (dll_crt0_1): Probe forked child's stack out.
-
- * fork.cc (FORK_WAIT_TIMEOUT): Bump up to two minutes.
-
- * fork.cc (dump_jmp_buf): New function.
- (cygwin_fork_helper1): Call it.
- * dcrt0.cc (dll_crt0:1): Call it.
- * winsup.h (dump_jmp_buf): Declare it.
-
- * fork.cc (cygwin_fork_helper1): Reenable child suspend before
- stack copy code.
-
-Sat Aug 17 04:06:36 1996 Geoffrey Noer <noer@cygnus.com>
-
- * dirsearch.cc: reformatted, removed a couple of gotos
-
-Thu Aug 15 17:56:08 1996 Geoffrey Noer <noer@cygnus.com>
-
- * cygwin.din: added __eprintf, a newlib function needed by assert.
- * times.cc: swap gmtime and localtime (gmtime really was localtime
- and vice versa).
-
-Tue Aug 13 03:46:22 1996 Geoffrey Noer <noer@cygnus.com>
-
- * signal.cc: renamed all signal variables "sig",
- fixed signal range error checking in all relevant functions,
- (sigaddset): new
- (sigismember): new
- (sigfillset): new
- (sigemptyset): new
- * cygwin.din: added corresponding entries for new signal functions.
- * cygwin.h: added protos for them
- * fhandler.cc, fhandler.h: major reformat of code
- * net.cc (cygwin32_socket): call checkinit() at start to
- initialize WinSock in case it isn't already.
- * syscalls.cc (access): set errno appropriately when no
- write access
- * fcntl.cc: reformatting
-
-Sat Aug 10 16:30:14 1996 Geoffrey Noer <noer@cygnus.com>
-
- * signal.cc (_raise): rewrite to shorten code, corrected
- return values.
- * fcntl.cc, net.cc, signal.cc, stubs.c: reformatted, added
- public domain notice at the tops if they were missing.
-
-Fri Aug 9 18:19:12 1996 Geoffrey Noer <noer@cygnus.com>
-
- * syscalls.cc (_rename): return -1 if file to be renamed
- doesn't exist. Reformatted whole file.
- * fork.cc: increase timeout value to 60 sec from 30 sec
-
-Thu Aug 8 17:44:39 1996 Jim Wilson <wilson@cygnus.com>
-
- * config/i386/longjmp.c: Increment %eax if it is zero.
-
-Wed Aug 7 15:51:04 1996 Geoffrey Noer <noer@cygnus.com>
-
- * include/sys/mman.h: fixed defines for PROT_READ et al to
- match what's more normally there in unix
- * sysdef/i386/*: removed the extra underscores present in most
- of these files that shouldn't have been there
- * net.cc: cleaned up whitespace, formatting
-
-Tue Jul 16 12:43:16 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * libccrt0.cc (__version): Deleted, unused.
-
- * uname.c (uname): Print CYGWIN_DLL_VERSION is version field.
-
-Mon Jul 15 16:48:29 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * version.h (CYGWIN_DLL_VERSION_MINOR): Bump up to 1.
-
- Path handling clean up, pass 2 (use //<letter>, not /.<letter>.).
- * path.cc (SLASH_DRIVE_PREFIX_LEN): Delete.
- (slash_drive_to_win32_path): New function.
- (mount_info::posix_path_p): Delete support for $CYGWIN,
- always return 1.
- (path_conv::path_conv): Call slash_drive_to_win32_path.
- (mount_info::conv_to_win32_path): Renamed from
- posix_path_to_win32_path. All callers updated.
- (mount_info::conv_to_posix_path): Renamed from
- win32_path_to_posix_path. All callers updated.
- (normalize_posix_path): Keep two leading /'s (or \'s).
- (normalize_win32_path): Likewise.
- (conv_to_{win32,posix}_path): Renamed from
- {posix,win32}_path_to_{win32,posix}_path_keep_rel.
- (conv_to_full_{win32,posix}_path): Renamed from
- {posix,win32}_path_to_full_{win32,posix}_path.
- (posix_path_list_p): New function.
- (cygwin32_{unix,dos}_path_to_{dos,unix}_path_keep_rel): Delete.
- ({unix,dos}_path_to_{dos,unix}_path): Delete.
- ({win32,posix}_to_{posix,win32}_path_list_buf_size): Renamed from
- cygwin32_{win32,posix}_to_{posix,win32}_path_list_buf_size.
- ({win32,posix}_to_{posix,win32}_path_list): Renamed from
- cygwin32_{win32,posix}_to_{posix,win32}_path_list.
- (slash_drive_prefix_p): Recognize //<letter>, not /.<letter>.
- (build_slash_drive_prefix): Update.
- * path.h: Update.
- * cygwin.din ({dos,unix}_path_to_{unix,dos}_path): Delete.
- (cygwin32_{dos,unix}_path_to_{unix,dos}_path_keep_rel): Delete.
- (cygwin32_conv_to_{posix,win32}_path): Renamed from
- (cygwin32_{win32,posix}_path_to_{posix,win32}_path_keep_rel.
- (cygwin32_conv_to_full_{posix,win32}): New exports.
- (cygwin32_posix_path_list_p): New export.
- * dcrt0.cc (path_len): Delete.
- (PATH_ENV_BUF_SIZE): Delete.
- (conv_path_names): Delete all but PATH.
- (dll_crt0_1): Rewrite environment variable conversion code.
- * fork.cc (find_exec_1): Delete _SC_PATH_RULES support. Determine
- path delimiter by calling posix_path_list_p.
- * shared.cc (shared_info::initialize): Delete `path_rules'.
- * sysconf.cc (sysconf): Delete _SC_PATH_RULES.
- * winsup.h (shared_info): Delete `path_rules'.
-
- * fork.cc (cygwin_fork_helper1): Reset u->forkee after child has
- started.
-
- * pinfo.cc (pinfo::init_from_fork): Delete. Empty function.
- * fork.cc (cygwin_fork_helper1): Delete call to it.
-
- * utils/kill.cc (usage): New function.
- (main): Allow multiple pids to be passed. Call usage.
-
-Mon Jul 15 13:07:23 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * Makefile.in (install): If cross compiling, install the
- cygwin.dll file as $target_alias-cygwin.dll in the bin directory,
- instead of plain cygin.dll.
- Install the cygwin.dll file in the library directory as well.
-
- * configure.in: Test for cross compiling, and if cross compiling,
- transform name of cygwin.dll file in the binary directory.
-
- * configure: Regenerate.
-
- * utils/Makefile.in (Makefile): Rebuild Makefile if configure.in
- changes.
- (install): Use the toplevel install.sh to install the utilities,
- and transform the name if cross compiling.
-
- * utils/configure.in: Test for cross compiling, and if cross
- compiling, tranform mount, umount, ps, etc. Do not call
- AC_PROG_INSTALL anymore.
-
- * utils/configure: Regenerate.
-
-Fri Jul 12 16:25:09 1996 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: also make install in utils subdir so "mount"
- et al gets installed.
-
-Thu Jul 11 17:53:31 1996 Geoffrey Noer <noer@cygnus.com>
-
- * include/sys/param.h: fixed value of HZ (now 1000 instead of 100).
- caused bug that showed up as "time sleep 5" returning 50.
-
-Thu Jul 11 14:08:09 1996 Geoffrey Noer <noer@cygnus.com>
-
- * fhandler.cc: correct typo in comment
- * exceptions.cc: remove definition of sig_func_ptr, replace
- occurances with newlib-defined _sig_func_ptr.
-
-Wed Jul 10 19:12:18 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * version.h (CYGWIN_DLL_VERSION_{MAJOR,MINOR}): Bump up to 17.0.
- * winsup.h (class per_process): New members {public,internal}_reserved.
- (SIZEOF_PER_PROCESS): Define.
- * dcrt0.cc (dll_crt0_1): Add sanity check of per_process size.
- Don't call checkout for forkee.
- * libccrt0.cc (cygwin_crt0): Set magic_biscuit to sizeof per_process
- again.
-
- * utils/ps.cc (main): Print uid.
-
- * hinfo.h: Deleted. Contents moved to winsup.h.
- * Makefile.in (WINSUP_H): Update.
-
- * dcrt0.cc (u, environ): Moved here.
- * shared.cc: From here.
-
- * pinfo.cc (pinfo_init): Renamed from pinfo_init_per_process.
- All callers updated.
- * hinfo.cc (hmap_init): Renamed from hmap_init_per_process.
- All callers updated.
- * winsup.h (cygwin_parent_p): Renamed from invoked_by_cygwin_p.
- All uses updated.
-
- * fork.cc (prepare_child): Add debug message.
-
- * uinfo.cc (uinfo_init): Renamed from uinfo::init.
- All callers updated. Call getlogin instead of GetUserName.
- (getlogin): Call GetUserName.
- * winsup.h (class uinfo): Delete. Members uid,gid moved ...
- (class pinfo): To here. All uses updated.
- (class shared_info): Delete member `u'.
- * fork.cc (cygwin_fork_helper1): Set child's uid,gid.
-
- * pinfo.cc (pinfo::clearout): Reset strace_mask_ptr.
-
- * shared.cc (open_shared_file_map): Add debugging message.
-
-Fri Jul 5 15:36:48 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * exceptions.cc (sig_func_ptr): New typedef.
- (__stack_trace): Make i386 and ppc formats the same.
- (sigfunc): Use sig_func_ptr.
- (call_handler): Likewise. All callers updated.
- (__cygwin_exception_handler): Handle exceptions before dll has
- fully initialized. Only call dump_status once, like __stack_trace.
- (really_exit): Call _exit, not exit.
-
- * hinfo.cc: Add copyright.
- * uinfo.cc: Likewise.
-
- * passwd.c: Whitespace cleanup.
- (search_for): Make static.
-
- * pinfo.cc (pinfo_list::init): Delete call to clearout vec[0].
- (pinfo::clearout): Reset more fields.
- (pinfo_list::get_empty_pinfo): Delete printing of error messages
- if table is full.
-
- * shared.cc (open_shared_file_map): Mark shared map as not inherited.
-
- * signal.cc (signal): Delete (void *) coersion of result.
- (usleep): Convert microseconds to milliseconds. Delete second copy.
- (_raise): Use _sig_func_ptr.
-
- * syscalls.h: Delete #include mntent.h, sys/types.h, string.h,
- stdio.h, setjmp.h, stdlib.h, signal.h, sys/strace.h, unistd.h,
- ctype.h, fcntl.h.
- * winsup.h: #include sys/types.h, sys/strace.h, setjmp.h, signal.h,
- string.h, windows.h.
- * All necessary files updated.
-
- * winsup.h (class pinfo): Delete member localtime_buf.
- * times.cc (corelocaltime): Use static local for localtime_buf.
-
- * winsup.h (class pinfo): Rename the_pid to pid. All uses updated.
- Delete handle_valid_p, unused. Rename __sig_mask to sig_mask.
-
-Thu Jul 4 14:36:01 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * shared.h: Deleted. All files updated.
- * winsup.h: shared.h contents moved here.
- * Makefile.in (WINSUP_H): Update.
-
- * heap.cc: Renamed from pproc.cc.
- (heap_init): Renamed from per_process::init.
- In forkee initialization, ensure memory being reserved is at same
- address as parent's. Commit forkee memory in one chunk.
- (_sbrk): Moved here,
- * syscalls.cc (_sbrk): From here.
- * Makefile.in (DLL_OFILES): Update.
- * dcrt0.cc (dll_crt0_1): Call heap_init instead of u->init.
- * winsup.h (class per_process): Delete member `init'.
-
- * dcrt0.cc (recur): Delete.
- (dos_argv_to_unix_argv): Delete.
-
- * delqueue.cc: Delete #include of delqueue.h, winerror.h
- * winsup.h: #include delqueue.h.
-
- * exceptions.cc (ctrl_c_handler): Only require 13 ^c's to quit task.
-
- * fork.cc (fork_mutex,forkee_stopped,forker_stopped): New static
- globals, were in class_shared info.
- (fork_init,fork_terminate): New functions.
- (prepare_child,cygwin_fork_helper1): Update.
- (cygwin_fork_helper1): If fork disabled, return EAGAIN.
- Delete unnecessary resetting of forkee_stopped event.
- * winsup.h (fork_init,fork_terminate): Declare them.
- * dcrt0.cc (dll_crt0_1): Call fork_init.
- (_exit): Call fork_terminate.
- * shared.c (shared_info::initialize): Delete init of fork stuff.
-
- * shared.c (h): New static global, was in class shared_info.
- (shared_info::terminate): Delete, move contents into shared_terminate.
-
- * strace.cc (flush_p): New static global.
- (strace_init): Don't clobber u->strace_mask if _STRACE_INHERIT set.
- (__sys_printf): Only flush buffers if _STRACE_FLUSH.
- * include/sys/strace.h (_STRACE_FLUSH,_STRACE_INHERIT): Define.
- Reorganize bitmasks.
-
- * utils/ps.cc (main): Make output prettier.
-
-Wed Jul 3 12:30:24 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * utils/Makefile.in (mount,umount,ps,kill): Rewrite rules.
- (PROGS): Add cygwin.
- (cygwin): New target.
- (install): Install all of $(PROGS).
- * utils/cygwin.cc: New file.
-
- * pinfo.cc (pinfo_init_per_process): PID environment variable handling
- moved here. Delete setting of u->parent. Set strace_mask_ptr.
- Set invoked_by_cygwin_p appropriately.
- (vfork_init): Delete, unused.
- (pinfo::init_self): Delete setting of root_p.
- (pinfo::terminate): root_p renamed to invoked_by_cygwin_p.
- * winsup.h (class per_process): Delete initial_pid, no longer used.
- (class pinfo): Add strace_mask_ptr.
- * fork.cc (cygwin_fork_helper1): Update.
-
- * winsup.h (class per_process): Delete trace_file, trace_mutex.
- Rename estrace to strace_mask.
- (system_printf): Declare.
- * strace.cc (strace_init): Renamed from per_process::strace_init.
- Don't open trace file unless strace environment variable set.
- Open trace file with FILE_SHARE_READ so others can read trace file
- while tracing in progress. Print error if $strace too big.
- (strace_file, strace_mutex): New static globals.
- (__sys_printf): Don't do anything if strace file not opened.
- (system_printf): New function.
- * pproc.cc (per_process::init): Delete call to strace_init.
- * dcrt0 (dll_crt0_1): Call strace_init as soon as possible.
-
- * dcrt0 (dll_crt0_1): Delete local can_glob, use
- u->self->invoked_by_cygwin_p instead.
- Move PID environment variable handling into pinfo_init_per_process.
- Delete setting of u->self->in_bash.
- Delete watching for bash.
- * winsup.h (class pinfo): Delete in_bash.
-
- * exceptions.cc (*): Call system_printf, not __sys_printf.
-
- * shared.h (class shared_info): Delete pp, unused.
-
- * syscalls.cc (isatty): Replace ttyname with is_tty.
-
- * winsup.h (registry_init_once_only): Delete, unused.
- (stdout_handle,file_handle_from_fd): Likewise.
- (CHILD_P,child_p,ALL_FS,loadup_dll,cygwin_s): Likewise.
- (unmixedcaseify): Prototype moved to path.h.
- * path.h (unmixedcaseify): Declare.
-
- * fork.cc (FORK_WAIT_TIMEOUT, WAIT_ERROR_RC): Define.
- (find_exec_1): Don't search PATH if directory present (not only if
- absolute path). Search "." before searching PATH.
- (copy): Return boolean indicating success. All callers updated.
- (prepare_child): Simplify. Check return code of WaitForSingleObject.
- Don't wait an infinite amount of time.
- (cygwin_fork_helper1): Simplify.
- Check return code of WaitForSingleObject.
- Don't wait an infinite amount of time.
- Check return code of copy.
- Disable code to Suspend/Resume child thread a second time.
-
- * winsup.h (class per_process): Make initial_sp a char *.
- * libccrt0.cc (cygwin_crt0): Update.
-
- * path.cc (path_conv): If name too long, set path to bogus value.
-
- * include/winkernel.h (WriteProcessMemory): Fix prototype.
-
- * include/sys/strace.h: Add extern "C" ifdef __cplusplus.
- (_STRACE): Delete.
- * dirsearch.cc (rewinddir): Use syscall_printf.
-
-Tue Jul 2 14:44:18 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * wait.cc (WAIT_ERROR_RC): Use it instead of ALL_FS.
- (wait_found): New argument `options'. If GetExitCodeProcess fails,
- ensure `result' contains something reasonable.
- (wait_for_single): Check whether `c' is NULL before dereferencing it.
- (wait_for_any): Add some comments. Delete unnecessary gotos.
- (waitpid): Print message if called with intpid == 0.
-
-Sat Jun 29 10:49:28 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * dirsearch.cc (readdir): Clean up syscall tracing.
- Mixed case handling temporarily disabled.
-
-Wed Jun 26 11:54:27 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
-
- * Makefile.in (bindir, libdir, datadir, infodir, includedir):
- Use autoconf-set values.
- (docdir): Removed.
- (install-info): Add.
- * configure.in (AC_PREREQ): autoconf 2.5 or higher.
- * configure: Rebuilt.
- * glob/configure.in (AC_PREREQ): autoconf 2.5 or higher.
- * glob/configure: Rebuilt.
- * utils/Makefile.in (bindir, exec_prefix): Use autoconf-set values.
- * utils/configure.in (AC_PREREQ): autoconf 2.5 or higher.
- * utils/configure: Rebuilt.
-
-Tue Jun 25 17:48:56 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * include/sys/param.h (PATH_MAX,MAXPATHLEN): Change from 1024 to 259.
- (BIG_ENDIAN,LITTLE_ENDIAN,BYTE_ORDER): Define.
-
-Mon Jun 24 16:35:48 1996 Mark Eichin <eichin@cygnus.com>
-
- * fhandler.cc (read): Replace the old broken igncr code (which has
- been disabled for a while anyway) with code that checks for
- ENABLE_LINE_INPUT and replace only \r\n with \n.
-
-Mon Jun 24 00:12:22 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * dcrt0.cc (dll_crt0_1): Convert argv[0] to posix style if necessary.
-
-Sun Jun 23 17:21:41 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * version.h (CYGWIN_DLL_VERSION_MINOR): Bump up to 2.
-
- * fork.cc (perhaps_suffix): Simplify.
- (find_exec_1): Likewise. Always try appending .exe first.
- (cygwin_fork_helper1): Clean up (lots more needed still).
- Test for split heap before calling CreateProcess.
- No longer call find_exec, now done at start up.
- * dcrt0.cc (dll_crt0_1): Call find_exec to expand argv[0].
-
- * path.cc (conv_path_list_buf_size): New function.
- (cygwin32_{win32,posix}_to_{posix,win32}_path_list_buf_size): Ditto.
- (conv_path_list): Ditto.
- (cygwin32_{win32,posix}_to_{posix,win32}_path_list): Ditto.
- * cygwin.din: Export them.
-
- * misc.c (small_printf): Delete.
- (vhangup): Set errno.
-
- * syscalls.cc (isatty): Print syscall trace message even if error.
-
- * console.cc (*): Check return codes of win32 api calls.
-
- * syscalls.cc (chmod): Set errno of SetFileAttributes fails.
- Fix call to syscall_printf.
-
-Thu Jun 20 00:43:52 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * dcrt0.cc (dll_crt0_1): Save full program name.
- * fork.cc (cygwin_fork_helper1): Always call find_exec.
-
- * path.cc (normalize_{posix,win32}_path): Fix edge case handling.
- (path_conv::path_conv): Ensure path is \-ified if win32 path rules.
-
- * spawn.cc (spawn_guts): Set errno if CreateProcess fails.
-
-Wed Jun 19 00:18:03 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * path.h (PATH_RULES macros): Delete. Use ones in unistd.h.
- (enum path_rules_enum): Deleted. All uses updated.
- (path_conv): Rename member get_native to get_win32. All uses updated.
- (*win32_path*): Renamed from *native_path*.
- * path.cc (*win32_path*): Renamed from *native_path*.
- (mount_info::posix_path_p): Prepend '_' to PATH_RULES.
- Fix returning of cached value.
- (slash_drive_prefix_p, build_slash_drive_prefix): New functions.
- (mount_info::posix_path_to_win32_path): /.<letter>. is a drive spec.
- (path_conv::path_conv): Likewise.
- (mount_info::win32_path_to_posix_path): Convert unknown drives to
- /.<letter>. Normalize win32_path.
- (normalize_win32_path): New functions.
- (getcwd_inner): New arg `posix_p'. All callers updated.
- * shared.cc (shared_info::initialize): Prepend '_' to PATH_RULES.
- _PATH_RULES_NATIVE -> _PATH_RULES_WIN32.
- * spawn.cc (*win32_path*): Renamed from *native_path*.
- * dcrt0.cc: Likewise.
- * cygwin.din: Likewise.
-
- * Makefile.in (WINSUP_H): Add shared.h
-
- * smallprint.c (rn): Make static.
-
- * sysconf.cc: Renamed from sysconf.c.
- (sysconf): Support _SC_PATH_RULES.
-
- * screen.c: Deleted.
- * Makefile.in (DLL_OFILES): Delete screen.o.
-
- * fork.cc (cygwin_fork_helper): Don't pass 0 from longjmp to setjmp.
-
- * path.h (class mount_info): Update posix_path_to_native_path member.
- * path.cc (path_prefix_p): Rewrite.
- New arg `len'. All callers updated.
- (mount_info::binary_native_path_p): Call path_prefix_p.
- (path_conv::path_conv): Pass full_path to binary_native_path_p.
- (mount_info::posix_path_to_native_path): Delete arg keep_rel_p.
- New arg full_native_path. All callers updated. Don't call
- getcwd_inner if unnecessary. Rewrite relative path handling.
- (mount_info::native_path_to_posix_path): Call path_prefix_p.
- Call slashify on `pathbuf', not original argument.
-
- * syscalls.cc (chdir): Fix lifetime of converted path.
-
-Tue Jun 18 11:48:51 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * configure.in (EXE_LDFLAGS): Explicitly link with newlib if necessary.
- * configure: Regenerated.
- * Makefile.in (EXE_LDFLAGS): Define.
- (FLAGS_TO_PASS): Add EXE_LDFLAGS.
- (config.status): New target.
- (utils-all): Depend on $(LIBNAME).
- * utils/Makefile.in (EXE_LDFLAGS): Define.
- (mount,umount,ps,kill): Link with $(EXE_LDFLAGS).
-
- * version.h (CYGWIN_DLL_VERSION_MINOR): Bump up to 1.
-
-Mon Jun 17 18:29:54 1996 Doug Evans <dje@canuck.cygnus.com>
-
- Improve pathname handling, first pass.
- * path.h (symlink): Renamed from link_cookie.
- (class path_conv): New member error.
- (path_conv::get_native): Renamed from get_dos, all uses updated.
- (path_conv::get_binary): Delete.
- (mount_info::{mangle,reverse_mangle}): Delete.
- (mount_item::posix_path_to_native_path): Renamed from mangle.
- (mount_info::native_path_to_posix_path): Renamed from reverse_mangle.
- (path_rules_enum): Define.
- * path.cc: Temporarily disable mixed-case and symlink handling.
- (mount_info::posix_path_p): New function.
- (mount_info::binary_native_path_p): Renamed from binary_dos_path_p.
- (path_conv::path_conv): Handle native path rules.
- (mount_item::{mangle,reverse_mangle}): Delete.
- (mount_info::posix_path_to_native_path): Renamed from mangle.
- (mount_info::native_path_to_posix_path): Renamed from reverse_mangle.
- (mount_info::from_registry): Set nmounts. Use MAX_PATH.
- (mount_info::{add,del}_item): Rewrite.
- (slashify): Renamed from flip_slash.
- (getcwd_inner): Make static. Don't convert to posix path if using
- native path rules.
- (file_exists): Delete.
- (addmntent,hasmntopt): Delete.
- (mount): Only update registry if mount succeeded.
- (umount): Only update registry if umount succeeded.
- (normalize_posix_path): Renamed from normalize_path. Pass in cwd.
- (cygwin32_{posix,native}_path_to_{native,posix}_path_keep_rel): Renamed
- from ...{unix/dos}....
- * dcrt0.cc (dos_argv_to_unix_argv): #ifdef out.
- (dll_crt0_1): Don't call it.
- * fhandler.cc (fhandler_base::open): Temporarily disable symlinks.
- * shared.cc (open_shared_file_map): New function.
- (shared_init): Call it.
- (shared_info::initialize): Fetch `path_rules' from registry.
- * shared.h (inited): Make private.
- (path_rules): New member.
- * spawn.cc: #include "shared.h".
- (spawn_guts, env var translation): Don't translate path names if
- using native path rules.
- * syscalls.cc (symlink): Delete (moved to path.cc).
- * cygwin.din (dump__5pinfo): Delete.
- (cygwin32_{posix,native}_path_to_{native,posix}_path_keep_rel): Renamed
- from ...{unix/dos}....
-
- * smallout.cc: Delete.
- * sdata.cc: Delete.
- * shared.cc (u,s,environ): Define here.
- * Makefile.in (glob/libglob.a): Depend on glob/glob.c, glob/fnmatch.c.
- (utils-all): New target.
- (DLL_OFILES): Delete smallout.o, sdata.o.
- (Makefile): Depend on cygwin.din.
- (WINSUP_H): Depend on syscalls.h.
-
- * configure.in (AC_CONFIG_SUBDIRS): Add bin.
- (AC_PROG_INSTALL): Call.
- * configure: Regenerated.
- * utils/{Makefile.in,configure.in,configure}: New files.
- * utils/{kill.cc,mount.cc,ps.cc,umount.cc,termcap}: New files.
- * Makefile.in (UTILS_ALL): Define.
- (all): Depend on $(UTILS_ALL).
- (utils-all): New target.
-
- * dcrt0.cc (recur): Make no-op to see what happens.
- (globify): Don't call glob if unnecessary.
- Check return code from glob.
- (api_fatal): New function.
- * fhandler.cc (fhandler_base::read): Dump first few chars read.
- (fhandler_base::get_execable): New function.
- (fhandler_base::fstat): Use it.
- (fhandler_base::fhandler_base): Init execable_p.
- (fhandler_disk_file::fhandler_disk_file): Delete execable_p.
- (fhandler::{get,set}_execable_bit): Delete.
- (fhandler_disk_file::{get,set}_execable_bit): Delete.
- * fhandler.h (class fhandler): Delete {get,set}_execable_bit.
- (class fhandler_base): New member execable_p.
- New member fn get_execable.
- * fork.cc: Simplify/cleanup.
- (cygwin_fork_helper1): Use MAX_PATH, not MAXPATHLEN.
- * pinfo.cc (pinfo::dump): Delete.
- * pproc.cc (per_process::set_envname): Delete.
- * strace.cc (smallout::do_pline): Delete.
- * syscalls.h (readlink): Third arg is an int.
- * winsup.h (class pinfo, member progname): Use MAX_PATH.
- (class pinfo, member dump): Delete.
- (class smallout): Delete.
- (smallout): Delete.
- (class per_process, member set_envname): Delete.
- (file_exists): Delete.
- (api_fatal): Declare.
- * Makefile.in (LIB{C,CXX}FLAGS_FOR_TARGET): Delete, use {C,CXX}FLAGS.
- (FLAGS_TO_PASS): Define.
- (glob/libglob.a): Delete duplicate entry.
-
- * syscalls.cc (_sbrk): Update u->size when heap is grown.
-
- * hinfo.cc (hmap_init_per_process): Ensure stdout's handle != stderr's.
-
-Fri Jun 14 06:32:13 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * register.h, registry.cc: Whitespace cleanup.
-
-Thu Jun 13 20:57:28 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * Makefile.in (install): Install cygwin.dll in $(bindir).
-
-Tue Jun 11 13:46:17 1996 Geoffrey Noer <noer@cygnus.com>
-
- * fhandler.cc: lseek is now only binary mode, interpret control
- z characters as EOF when reading from a file. Reformatted some
- of the code (cleaned up line spacing, etc.)
-
-Tue Jun 11 09:50:09 1996 Jason Molenda (crash@kyriath.cygnus.com)
-
- * path.cc (nofinalslash): move it so it is next to its friends
- flip_slash and backslashify.
-
-Mon Jun 10 18:57:03 1996 Jason Molenda (crash@kyriath.cygnus.com)
-
- * path.cc (*): Pretty printing.
- (unix_path_to_dos_path_with_rel): use "dosnamein" and "unixnameout"
- instead of "path" & "real_path".
- (dos_path_to_unix_path_keep_rel): delete obsolete code.
- (mount_item::mangle): use "unixnamein" and "dosnameout" instead of
- "unixname" and "dosname".
- (mount_info::mangle): use "unixnamein" and "dosnameout". Remove
- obsolete code.
- * path.h (mount_item): Update prototypes, add comment.
- (mount_info): Update prototypes.
-
-Mon Jun 10 17:05:23 1996 Jason Molenda (crash@kyriath.cygnus.com)
-
- * path.cc (mount_item::reverse_mangle): Pretty printing,
- add a bit to the comment.
- (getcwd_inner): use MAX_PATH not MAXPATHLEN.
- (normalize_path): use MAX_PATH not MAXPATHLEN.
- (link_cookie::follow): use MAX_PATH not MAXPATHLEN.
-
-Mon Jun 10 15:36:32 1996 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: changed $(DOC) so it doesn't include html
- files; made a new info-html target that does the html
- versions of the docs. Since most customers don't have texi2html
- installed, the make shouldn't fail because of this.
- * configure: regenerated with autoconf 2.8
-
-Sun Jun 9 17:10:37 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * version.c: Deleted.
- * version.h: New file.
- * winsup.h (VERSION): Deleted.
- (class per_process): Add version_major, version_minor. Delete version.
- * registry.cc: #include "version.h".
- (reg_session::reg_session): Update.
- * libccrt0.cc: #include "version.h"
- (cygwin_crt0): Delete setting of version, set magic_biscuit to 0.
- Set version_major, version_minor.
- * dcrt0.cc: #include "version.h".
- (cygwin_dll_version_{major,minor}): New static locals.
- (dll_crt0_1): Rewrite app/dll compatibility test.
- * Makefile.in (LIBCOS): Delete version.o.
- (DLL_OFILES): Delete version.o.
- (dcrt0.o,libccrt0.o,registry.o): Depend on version.h.
-
- * exceptions.h: New file.
- * exceptions.cc: Massive cleanups (still lots more to go).
- #include "exceptions.h".
- (init_exceptions): Renamed from __init_exceptions. New argument of
- pointer to exception handler list entry.
- (init_exception_handler): Renamed from init_thread_exceptions.
- Rewrite based on info from Onno Hovers <onno@stack.urc.tue.nl>.
- (ppc descriptor_to_{function,gotattr}): Make static.
- (i386 __stack_trace): Fix test for top of stack.
- * dcrt0.cc: #include "exceptions.h".
- (dll_crt0_1): Exception handler list entry must live on stack.
- * winsup.h (class pinfo): Delete member myp.
- * syscalls.h (struct exception_list): Delete.
- (__really_exit, __init_exceptions): Delete.
- * Makefile.in (dcrt0.o,exceptions.o): Depend on exceptions.h.
-
-Fri Jun 7 17:49:28 1996 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * dcrt0.cc (conv_path_names): Add GCC_EXEC_PREFIX.
-
-Fri Jun 7 14:38:05 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * Makefile.in (CC_FOR_TARGET,LD,DLLTOOL): Define.
- (AR,RANLIB): Set via configure.
- * configure.in (AR,LD,DLLTOOL): Set.
- (AC_PROG_RANLIB): Call.
- * configure: Regenerated.
-
-Thu Jun 6 12:11:23 1996 Kim Knuttila <krk@cygnus.com>
-
- * dcrt0.cc (dll_crt0_1): Removed reference to reent_data._next.
-
-Tue Jun 4 15:52:29 1996 Geoffrey Noer <noer@cygnus.com>
-
- * include/winkernel.h: fixed typo
-
-Tue May 28 13:08:25 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * syscalls.cc (_sbrk): Fix test of return value from VirtualAlloc.
- Delete lincr, make incr signed, and use only it. Misc. minor cleanup.
-
-Thu May 23 17:31:57 1996 Geoffrey Noer <noer@cygnus.com>
-
- sac diffs applied:
- * path.h: change MAXMOUNTS to 30 instead of 20
- * sysdef/i386/rpcndr.def: add "none" to end of file
- * fhandler.cc: fix memset call to say sizeof (*buf) instead
- of sizeof (buf).
- * include/winuser.h: define MDIS_ALLCHILDSTYLES
- * Makefile.in: entry to build glob/libglob.a:
-
-Thu May 23 10:38:43 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * fhandler.h (class fhandler_base): Make `name' private and shrink
- to 32 bytes.
- (set_name): Declare.
- * fhandler.cc (fhandler::set_name): New function.
- (fhander_base::open): Call it.
- (fhander_base::init): Call it.
- (fhandler_tty::ttyname): Call get_name instead of accessing `name'
- directly.
-
- * dcrt0.cc (dll_crt0_1): Call ExitProcess instead of exit if
- DLL and APP are out of sync.
-
-Thu May 16 03:07:18 1996 Mark Eichin <eichin@cygnus.com>
-
- * fhandler.cc (FakeReadFile): new function. Interface like
- ReadFile, only called from fhandler_console_in::read, calls
- ReadFile unless we're really reading from STD_INPUT_HANDLE and
- with ENABLE_LINE_INPUT turned off, in which case we use
- ReadConsoleInput instead. When using ReadConsoleInput, always read
- all available events, but only block if we don't get at least one
- actual character. This would be the place to implement FIONBIO on
- the console tty, which doesn't actually exist yet.
- (dbg_input_event): copied from select.cc, debugging code to show
- detail of what events we're actually getting.
- (ioctl): off-by-one on window size.
-
-Wed May 15 18:11:16 1996 Jim Wilson <wilson@chestnut.cygnus.com>
-
- * fhandler.h (class fhandler_base): Use MAXPATHLEN not 100 for size
- of array name.
-
-Wed May 15 11:14:46 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * fork.cc (cygwin_fork_helper1): More debugging printf's.
-
- * dcrt0.cc (num_ms_env_vars): Renamed from ms_env_arity.
- (build_argv): Renamed from fill.
- (compute_argc): Renamed from prepare.
- * libccrt0.cc (cygwin_statu): Make static.
- * pproc.cc (per_process::init): Move strace initialization from here,
- * strace.cc (per_process::strace_init): To here.
- Pass FILE_SHARE_WRITE to CreateFileA. Print error message if open
- of log file fails. Create mutex for trace messages.
- (__sys_printf): Always write to end of disk files. Use mutex.
- (d): Delete.
- * winsup.h (class per_process): Add strace_init. Reorganize.
- `run_ctors' renamed to `run_ctors_p'. New member `trace_mutex'.
- (d): Delete.
- (PATH_MAX): Delete.
-
- * Makefile.in: Add header file dependencies.
-
- * dcrt0.cc (_exit): Add debugging printf.
- * shared.h (class shared_info): Rename member mutex_a to fork_mutex.
- * fork.cc (cygwin_fork_helper1): Update.
- Return with error if process slot unavailable.
- Set errno and release fork_mutex if failed because of split heap.
- * shared.cc (shared_info::terminate): Update.
- (shared_info::initialize): Update.
-
-Tue May 14 14:59:32 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * fork.cc (cygwin_fork_helper1): Avoid SIGSEGV if allocate_pid fails.
-
- * pproc.cc (per_process::init): Fix test.
-
- * winsup.h (): Rename member `parent' to `ppid'.
- * fork.cc (prepare_child): Update.
- (cygwin_fork_helper1): Likewise.
- * hinfo.cc (hmap_init_per_process): Likewise.
- (hinfo_vec::dup_for_fork): Fix message.
- (hinfo_vec::dup2): Fix args to debug_printf. Delete extra printf's.
- * pinfo.cc (pinfo_init_per_process): Update.
- (pinfo::dump): Likewise.
- (pinfo::init_self): Likewise.
- * pproc.cc (per_process::init): Open strace file in append mode.
- * smallprintf.c (__small_vsprintf): Support %p.
- * syscalls.cc (getppid): Update.
- * wait.cc (wait_for_any): Likewise.
-
-Mon May 13 13:45:36 1996 Mark Eichin <eichin@cygnus.com>
-
- * fhandler.cc (ioctl): fix TIOCGWINSZ handling: (1) check the
- error return (2) if we're trying on STD_INPUT_HANDLE, substitute
- STD_OUTPUT_HANDLE since GetConsoleScreenBufferInfo only works on
- console output (3) check srWindow for the *screen* size, instead
- of checking dwSize for the scroll buffer size.
-
- * include/sys/errno.h (ECONNABORTED): add another errno value.
- * net.cc (errmap): add ECONNABORTED case.
-
- * fhandler.cc (fstat): clear the *entire* stat buf, not just the
- first four bytes.
-
-Fri May 10 17:59:09 1996 Mark Eichin <eichin@cygnus.com>
-
- * select.cc: change most debugging statements to select_printf.
- (dbg_input_event): new function, prints an INPUT_RECORD via select
- printf.
- (polled): Don't sleep around WaitForMultipleObjects; let it have a
- 10ms timeout until we have time to test it with 0. If
- WaitForMultipleObjects says that STD_INPUT_HANDLE has data, use
- PeekConsoleInput to scan the available events. If the first one is
- not a *bKeyDown* with a non-zero *AsciiChar* then use
- ReadConsoleInput to rip it off the queue, and pretend it wasn't
- there, so that later calls to read (and thus ReadFile) don't block
- because they can't find any *real* input. (This could be optimized
- later to check the whole queue, and if there are *no* real input
- events, nuke them all.)
-
- * include/sys/strace.h (_STRACE_SELECT, select_printf): new printf
- category, because select needs a *lot* of work. STRACE=256 to use it.
-
- * fhandler.cc (fhandler_console_in::init): IGNCR can't work
- without major changes to deal with the interaction with select
- (which shouldn't wake up if IGNCR causes the whole input to be
- deleted...) so don't make it the default.
- (fhandler_console_out::tcgetattr, fhandler_tty::tcgetattr): don't
- set IGNCR based on get_r_binary either.
-
-Wed May 8 20:20:05 1996 Mark Eichin <eichin@cygnus.com>
-
- * times.cc (__to_clock_t): must cast dwLowDateTime to *unsigned*
- before adding it -- otherwise we may subtract it!
- (to_time_t): same.
-
-Wed May 8 18:21:28 1996 Mark Eichin <eichin@cygnus.com>
-
- * times.cc (corelocaltime): new function. Basic localtime from
- newlib, with no conversions.
- (gmtime): just calls corelocaltime.
- (localtime): uses GetTimeZoneInformation, biases to standard time
- first, then uses DaylightDate and StandardDate to figure out if
- we're in DST -- and calls corelocaltime a second time with the
- rebiased seconds, if we are.
- (times): add debug_printf statements which work around apparent
- compiler bug and 7+ minute error.
-
- * select.cc: revert to <sac>'s changes of 4/20 which were
- accidentally backed out on 4/24.
-
-Tue May 7 05:29:42 1996 Mark Eichin <eichin@cygnus.com>
-
- * times.cc (__to_clock_t): subtract out FACTOR, the difference
- between 1601 and 1970, just like to_time_t() does.
-
-Tue May 7 01:55:06 1996 Mark Eichin <eichin@cygnus.com>
-
- * times.cc (gmtime): new function. Use GetTimeZoneInformation to
- compensate ahead before calling localtime (since the newlib
- version doesn't know what timezone we're in.)
- (localtime): use SECSPERMIN, not 60, to show that we know what
- we're talking about.
-
- * net.cc (errmap): add WSAEADDRINUSE, WSAECONNREFUSED mappings.
-
-Sun May 5 00:45:59 1996 Mark Eichin <eichin@cygnus.com>
-
- * include/sys/socket.h: add recvfrom macro and cygwin32_recvfrom
- declaration. Remove htons/htonl misdeclarations as they collide
- with the macros in asm/byteorder.h.
-
- * include/asm/byteorder.h: enable the ntohl/ntohs declarations so
- we at least get the macro versions when we optimize, even if the
- library hooks aren't there.
-
-Wed Apr 24 23:42:49 1996 Steve Chamberlain <sac@dilithium.transmeta.com>
-
- * winsup.h (pinfo, pinfo_list): Remove dummy item.
- * fork.cc (*): Revert changes of Apr 2.
-
-Sun Apr 21 17:00:14 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * wait.cc (wait_for_any): Fix the wait heuristic.
-
-Sat Apr 20 13:22:03 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * Makefile.in (.cc.o): Pass -fno-rtti.
- * dcrt0.cc (globify): A single match is ok.
- * exceptions.cc (i386 call_handler): optimize.
- * fhandler.cc (fhandler_console_in::read): Handle ICRNL right.
- (*:get_name *:always_ready): New.
- * select.cc: Understand that console output doesn't signal when it's
- ready.
-
-Fri Apr 12 14:49:34 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * Makefile.in (glob/libglob.a): Pass -I so glob.c finds right dirent.h.
-
-Wed Apr 10 16:13:30 1996 steve chamberlain <sac@slash.cygnus.com>
-
- * Makefile.in (glob/libglob.a): Call glob makefile correctly.
- * winsup.h (pinfo, pinfo_list): Reorder elements to avoid
- alignment bug in PPC gcc.
-
-Tue Apr 9 17:23:57 1996 steve chamberlain <sac@slash.cygnus.com>
-
- * dcrt0.cc (globify): Expand command line wildcards if
- run from dos prompt.
-
- * exceptions.cc (386 call_handler): More fumblings.
- * fhandler.cc (fhandler_base::stat): Initialize ino.
- (fhandler_console::open): Fix test for RDONLY.
- (fhandler_tty::stat): Set ino.
- (fhandler_console_out::vt100 stuff): More.
- * fork.cc: Lint.
- * pinfo.cc (pinfo::init_self): Don't bother to DuplicateHandles
- to get process info.
- * signal.cc (usleep): Get correct order of magnitude.
- * spawn.cc (spawn_guts): Turn of exception handling in
- parent of thing which execs.
- * syscalls.cc (stat): Look for <file> and <file.exe>.
- * wait.cc (wait_for_any): Keep waiting if WaitForMultipleObject
- returns invalid result.
-
-Tue Apr 2 12:45:35 1996 steve chamberlain <sac@slash.cygnus.com>
-
- * dcrt0.cc (conv_path_names): Add HOME.
- (dll_crt0_1): Use u->self->head_sp.
- * exceptions.cc (i386 call_handler): Rewritten, now almost works
- on win95.
- * fhandler.cc (fhandler_base::open): Calculate namehash.
- (fhandler_base::fstat): ^ name hash with file index low.
- * fork.cc (*): forkee/forkerr events moved from sinfo
- into pinfo.
-
-Fri Mar 29 16:35:02 1996 steve chamberlain <sac@slash.cygnus.com>
-
- * libcmain.cc: New.
- * winsup.h: restore and myp moved from per_process to pinfo class.
- * dcrt0.cc (dll_crt0_1): Cope with move.
- * exceptions.cc (init_thread_exceptions): Ditto.
- * signal.cc (sigprocmask): Ditto.
- * fork.cc (cygwin_fork_helper1): Don't fork if split_heap_p.
- * pinfo.cc (pinfo::clearout): Zero split_heap_p.
- * syscalls.cc (_sbrk): Cope with not being able to
- allocate contiguous chunks.
-
-
-Tue Mar 26 09:14:32 1996 steve chamberlain <sac@slash.cygnus.com>
-
- * exceptions.cc (__cygwin_exception_handler): re-export.
-
-Fri Mar 22 16:49:29 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * cygwin.din (__stack_trace): Export.
- (__cygwin_exception_handler): Ditto.
-
- * exceptions.cc (i386 exception handling): Move under appropriate
- x86 #ifdefs. Use the macro HAVE_INIT_THREAD_EXCEPTIONS to be
- whatever a machine needs to do to initialize exceptions in this
- thread. Nop for the PowerPC right now.
- (__stack_trace): Make it a "C" function so there is no name
- mangling, and export it.
- (call_handler): Split by architecture before the function, rather
- than inside it. First stab at PowerPC exception handling.
- (__cygwin_exception_handler): Rename from ehandler3, and export
- it. Add more status -> signal mappings.
- (ctrl_c_handler, CTRL_LOGOFF_EVENT): Map to SIGHUP, not SIGQUIT.
- (__stack_trace): Split into separate machine dependent functions,
- rather than #ifdef'ing inside of a common function. Make the
- PowerPC messages clearer.
-
-Mon Mar 18 13:27:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * include/winkernel.h (CreateThread): Correctly declare function
- pointer argument.
-
- * misc.c (wprintf): Convert to use vprintf and fix warnings.
- (tgetent): Declare to return int to fix warnings.
- (vhangup): Declare to return int to fix warnings. Return -1 also.
-
- * include/winbase.h (UnhandledExceptionFilter): Declare.
-
-Tue Mar 12 12:56:28 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * include/winkernel.h (FlushFileBuffers): Declare.
-
-Tue Mar 12 11:16:32 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * exceptions.cc (dump_status): Make columns line up for PowerPC.
- (call_handler): Right now, call exit(255) for the PowerPC.
-
- * strace.cc (__sys_printf): Call FlushFileBuffers after writing
- out the file to make sure it really gets flushed.
-
- * include/winkernel.h (PowerPC CONTEXT): Add fields returned if
- CONTEXT_DEBUG_REGISTERS is set.
-
-Sun Mar 10 15:31:17 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * strerror.cc, syslog.cc, net.cc: New files.
- * cygwin.din: Add new net functions.
- * dcrt0.cc (dll_crt0_1): Fix call to build argv[0].
- * fhandler.cc (fhandler_base::open): Tidy.
- * fhandler.h: Add net classes.
- * hinfo.cc (hinfo_vec::build_fhandler): Add tape stuff.
- * path.cc (*::mangle, *::reverse_mangle): Fix.
- (mount_info::init): No trailing / now.
- * select.cc (*): Rewrite.
- * spawn.cc (spawn_guts): Fix leak.
- * syscalls.cc (_sbrk): Keep working until memory really fills up.
-
-Tue Feb 20 16:53:24 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * dcrt0.cc (dll_crt0_1): Get version from the header.
- * fhandler.cc (CHUNK_SIZE): New.
- (fhandler_base::read, fhandler_base::write): CRLF conversion
- rewritten.
- path.cc (path_conv::path_conv): Initialize mixed, binary and silent.
- * smallprint.c (__small_vsprintf): Add 'c' option.
- * wait.cc (wait_found): Close child handles.
-
-Mon Feb 19 09:11:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * Makefile.in (real-headers): Eliminate real-headers dependency on
- mspatches/*.patch, since you can't be guaranteed that it exists.
-
-Fri Feb 16 14:24:47 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * exceptions.cc (dump_status): On the PowerPC, dump all of the
- integer registers.
-
- * uname.c (uname): Don't assume that the only two NT systems are
- i386 and PowerPC.
- * exceptions.cc (call_handler): Ditto.
- (dump_status): Ditto.
-
-Thu Feb 15 18:20:33 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * cygwin.din (__empty): Add.
- * dcrt0.cc (dos_argv_to_unix_argv): New.
- (check, onetimecheck): New.
- * exceptions.cc (ehandler3): Always show backtrace
- if exception failed.
- * fhandler.cc (*::open): Removed dos_path argument.
- (fhandler_base::fstat): Use nFileIndexLow as the inode
- value.
- * hinfo.cc (init_std_file_from_handle): Don't default
- to binary.
- * paths.cc (*): Use new registry classes.
- * registry.cc (*): Rewritten.
- * syscalls.cc (open): Call fhandler->open without
- the dos filename arg.
-
-Sat Feb 10 08:18:45 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * configure.in (ALLOCA for powerpc): Add __allocate_stack.
-
-Wed Feb 7 16:41:18 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- Release-B13
-
- * malloc.cc (export_*): New. Changed the way that malloc
- stubs are used.
- * cygwin.din: Export the export_* stuff as malloc, realloc and free.
- * path.cc (link_cookie::create): Keep cookie filenames in unix
- format.
- (reverse_mangle): Clean up.
- (readlink): Ditto.
- (qfunc): Sort by name too.
- * spawn.cc (spawn_guts): Handle zero length arg.
- Only set errno when it's not 0.
- * Makefile.in: Build new doc.
- * fhandler.cc (fhandler_base::fstat): Round up block used.
- * path.cc (escape_char): Now it's ^.
- * syscalls.cc (errmap): ERROR_INVALID_NAME yields ENOENT.
- (chown): Returns 0.
- (sbrk): Clean up.
- (_unlink): Only try and DeleteFile once.
-
-Mon Feb 5 19:15:44 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * dcrt0.cc (dll_crt0_1): Build env string into static buffer.
- * dirsearch.c (opendir): Stat on unix pathname.
- * paths.cc (*): Support for mixed case filenames.
-
-Sun Feb 4 15:55:58 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * *.cc: Lint.
- (conv_path_names): New.
- (dll_crt0_1): Use conv_path_names list.
- * fctnl.cc (F_DUPFD): Look from the fd forward.
- * fhandler.cc (fhandler_base::open): Understand binary modes.
- (fhandler_console_in::init): Call tcsetattr with reasonable start
- values.
- * spawn.cc (spawn_guts): Use conv_path_names.
- (queue_file_deletion): Deleted.
- (unlink): Use new queue file stuff.
- * delqueue.cc, delqueue.h: New files.
- * shared.h: New file.
-
-Wed Jan 31 11:12:24 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * crt0.cc: Hacks to probe out ppc stack.
- * exceptions.cc (ehander3): Don't use 386 context info on the ppc.
- * path.cc (mount_info::mangle): Turn /usi or /usp into /usr.
- * uname.c (uname): Change sysname and get ppc name right.
-
-Fri Jan 26 15:47:31 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * pproc.cc (per_process::init): Cope when no memory is needed.
- * Makefile.in, configure.in: Cope with config directory.
- * setjmp.c, longjmp.c: Moved into config/i386.
- * config/ppc/setjmp.S, config/ppc/longjmp.S: New.
-
-Fri Jan 26 14:57:33 1996 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * Makefile.in (DLL_OFILES): removed ppc-stub.o
- ppc-stub.c: Removed.
- configure: regenerated with autoconf 2.7.
-
-Fri Jan 26 11:18:07 1996 Kim Knuttila <krk@cygnus.com>
-
- * Makefile.in (DLL_OFILES): added ppc-stub.o
-
-Thu Jan 25 09:33:24 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * malloc.cc (malloc, free, realloc): Hack for ppc.
-
-Wed Jan 24 20:22:42 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * cygwin.dll (loadup_dll): Remove.
- * dcrt0.cc: lint.
- * fhandler.* (*): Move to new class structure.
- * hinfo.cc: Use new fhandler glue.
- * libcfork.cc: Cope with ppc naming convention.
-
-Mon Jan 22 10:33:53 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * fhandler.h, hinfo.h: New files.
- * winsup.h: Split from here.
- * configure.in: Set i386 entry point correctly.
- * fhandler.cc (fhandler_normal:open): .com files
- are executable too.
- * hinfo.cc (init_std_file_from_handle): Inspect
- master_fmode_binary.
- * misc.cc (wcscmp, wcslen): New.
- * dcrt0.cc (probe): Change way a forkee's stack is allocated.
- * pproc.cc (per_process::init): Initialize using heap chunk.
- * shared.cc (shared_info::initialize): Initialize heap chunk.
- * syscalls.cc (_sbrk): If current chunk is used, allocate another.
- * wait.cc (wait_found): Fix exit code.
-
-Thu Jan 18 10:09:45 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * fhandler.cc (fhandler_normal::open) Don't test a
- com port to see if it's executable.
- * configure.in, cygwin.din: More powerpc configury.
-
-Wed Jan 17 16:25:36 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * configure.in, Makefile.in: Build powerpc stuff.
- * hinfo.cc (build_fhandler): Use new with placement.
- (fhandler::operator new): New.
-
-Wed Jan 3 18:18:57 1996 steve chamberlain <sac@slash.cygnus.com>
-
- * select.cc: New file.
- * Makefile.in: Cope with it.
-
-Tue Jan 2 08:58:58 1996 steve chamberlain <sac@slash.cygnus.com>
-
- * version.c: New file.
- * Makefile.in: Cope with it.
- * cygwin.def (setgrent, cuserid, setpgrp, mount, setmntent, endmntent, umount): New.
- * dcrt0.cc: Remove obsolete vfork stuff.
- (dll_crt0): Change way environ is built. Check that app is built
- with correct version of dll.
- * dirsearch.cc, exceptions.cc: Lint.
- * fhandler.cc: Lint. Most of termios.c moved into here.
- (fhandler_console:*): New.
- * hinfo.cc (hinfo_vec::init_std_file_from_handle): Open stdfiles as consoles
- if possible.
- * libccrt0.cc: Lint.
- * malloc.cc: More comments.
- * path.cc (*): Cope with mount handling.
- * registry.cc: Lint.
- (reg_session): New.
- * shared.cc: Lint.
- * signal.cc (usleep): New.
- * spawn.cc: Lint. Removed vfork stuff.
- * stubs.c (getmntent, endgrent): Deleted.
- * syscalls.c (__seterrno): Now takes arguments.
- * termios.c: Much moved info fhandler.c
- * times.cc (utime, utimes): New.
- * uinfo.c (cuserid): New.
diff --git a/winsup/cygwin/ChangeLog-1997 b/winsup/cygwin/ChangeLog-1997
deleted file mode 100644
index 33b0011..0000000
--- a/winsup/cygwin/ChangeLog-1997
+++ /dev/null
@@ -1,2800 +0,0 @@
-Wed Dec 31 15:00:32 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * hinfo.cc (hinfo_vec::find_unused_handle): correct
- previous patch -- need to fix up vec[i].h pointers
-
-Wed Dec 31 14:13:22 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * regexp/Makefile.in (tooldir): New variable.
- (install): Install regexp.h.
-
-Tue Dec 30 19:52:46 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * net.cc (inet_netof): New function.
- (inet_makeaddr): New function.
- * cygwin.din: Export inet_netof and inet_makeaddr.
-
-Tue Dec 23 17:45:07 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * path.cc (current_directory_name): New static variable.
- (current_directory_posix_name): New static variable.
- (getcwd_inner): Cache the directory name.
- (chdir): Move here from syscalls.cc. Clear directory cache
- variables.
- * syscalls.cc (chdir): Remove; now in path.cc.
-
- * environ.cc (setenv): Add cast to avoid warning.
-
- * security.cc (get_file_attribute): Make file parameter a pointer
- to const char.
- (set_file_attribute): Likewise.
- * winsup.c (get_file_attribute): Update declaration.
- (set_file_attribute): Likewise.
-
- * path.cc (path_conv): Don't pass the root directory to
- symlink_check_one.
-
-Mon Dec 22 16:34:40 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * path.cc (realpath): Use path_conv to resolve symlinks.
-
- * path.cc (path_conv::path_conv): Rewrite completely to convert to
- win32 path first and then check for symlinks element by element.
- (symlink_check_one): New static function based on old
- symlink_check_worker, but without path conversion.
- (path_prefix_p): Move definition before all uses.
- (skip_n_slashes, symlink_expand, symlink_follow): Remove.
- (symlink_check_worker, symlink_check): Remove.
- (readlink): Rewrite to use new symlink_check_one.
- (unmixedcaseify, mixedcaseify): Comment out.
- * path.h (symlink_check, symlink_follow): Don't declare.
- * fhandler.cc (open): Don't pass O_NOSYMLINK to path_conv. Set
- errno from path_conv if it fails.
- * dirsearch.cc (opendir): Check errors from path_conv, and set
- errno appropriately.
- * times.cc (utimes): Likewise.
- * syscalls.cc (_unlink, _link, mkdir, rmdir, chdir): Likewise.
- (chmod, _rename): Likewise.
- (_stat_worker): Don't just pass nofollow to _open, but base
- whether to pass O_NOSYMLINK on whether nofollow is set.
- (lstat): Pass 1, not O_NOSYMLINK, to _stat_worker.
- * strerror.cc (strerror): Add ELOOP.
-
-Thu Dec 18 12:30:47 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * fhandler.h (class fhandler_base): Remove inline definitions of
- tcflush, tcsendbreak, tcdrain, tcflow, tcsetattr, tcgetattr,
- tcsetpgrp, and tcgetpgrp, so that we can set proper errno values.
- (class fhandler_tty): Add pgrp_ field, and virtual tcgetpgrp and
- tcsetpgrp functions.
- * fhandler.cc (fhandler_base::tcflush): New function.
- (fhandler_base::tcsendbreak): New function.
- (fhandler_base::tcdrain): New function.
- (fhandler_base::tcflow): New function.
- (fhandler_base::tcsetattr): New function.
- (fhandler_base::tcgetattr): New function.
- (fhandler_base::tcsetpgrp): New function.
- (fhandler_base::tcgetpgrp): New function.
- (fhandler_tty::fhandler_tty): Initialize pgrp_.
-
- * tty.cc (tcsetpgrp): Set errno correctly on failure.
-
- * include/sys/termios.h (CBAUD): Change to 037.
- (B57600, B115200): Change to values that can fit in a speed_t.
-
- * spawn.cc (spawn_guts): Set errno correctly if we can't find the
- executable.
-
-Mon Dec 15 16:40:07 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from msnyder@cygnus.com (Michael Snyder):
- * heap.cc (_sbrk): handle situation where newalloc < incr
-
-Mon Dec 15 16:40:07 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- Allow Cygwin32 to terminate process even when in a blocking
- winsock call.
- * exceptions.cc (call_handler): call to WSACancelBlockingCall()
- removed.
- (sighandle): call WSACleanup() before exiting the process to
- cancel blocking winsock calls.
- * include/mywinsock.h: add proto for WSACleanup().
-
-Mon Dec 15 16:40:07 1997 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: compile .cc files with -fno-exceptions to
- decrease dll size and increase execution speed a little.
-
-Mon Dec 15 16:40:07 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * tty.cc (do_input): Detect CTRL-T as a special case when
- STRACE_CACHE is active. Dumps the strace cache to disk.
- * console.cc (fhandler_console::read): Detect CTRL-T as a special
- case when STRACE_CACHE is active. Dumps the strace cache to disk.
-
-Sat Dec 13 15:12:53 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * fork.cc: Include <malloc.h>.
- (cygwin_fork_helper1): Call __malloc_copy after copying the stack
- and heap to the child.
-
-Thu Dec 11 15:14:40 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * sigproc.cc (proc_subproc): Remove over-enthusiastic test for
- process handling readiness or proc_wait will loop attempting to
- handle a dying subprocess when signal handlers are not ready.
- * fork.cc (cygwin_fork_helper1): Reorganize to ensure that a
- forked process is capable of receiving signals when fork()
- returns.
-
-Wed Dec 10 15:43:37 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * include/sys/termios.h (IXANY): Correct value.
- (PARMRK): Define again.
-
-Wed Dec 10 00:05:23 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * dcrt0.cc (dll_crt0_1): Move start time initialization to a more
- logical place (pinfo_init).
- (do_exit): Reorganize to attempt to solve races when a cygwin
- process occupies two windows pids (i.e., an execed process).
- * exceptions.cc (lock_cs): Fix erroneous WFSO logic.
- (sighandle): Use new method for determining if process was
- initiated via fork.
- (events_terminate): Do not close pinfo_mutex. Allow automatic
- close by ExitProcess to lengthen the time that the pinfo structure
- is locked, minimizing races between an exiting child and a
- potentially exiting parent.
- * hinfo.cc (hmap_init): Use new method for determining if process
- was initiated via fork.
- (hinfo_vec::de_linearize_fd_array): Fix a typo in a comment.
- * pinfo.cc (clearout): Remove this function. Handled in
- allocate_pid.
- (pinfo_init): Move start_time setting here from dll_crt0_1.
- Remove call to init_self in favor of adding three additional lines
- of code.
- (pinfo_list::operator []): Implement a very simple hashing
- scheme for pid lookup.
- (lpfu): New routine controlled by DEBUGGING conditional. When
- DEBUGGING is activated, lpfu returns more information about the
- state of a timed out pinfo_mutex.
- (pinfo_list::get_empty_pinfo): Remove function. Move
- functionality to allocate_pid.
- (allocate_pid): Implement a (very) simple hashing scheme for
- finding an available pid. Take advantage of reorganized pinfo
- structure to zero all pertinent fields with one memset.
- (pinfo::record_death_nolock): Don't bothering zeroing
- inconsequential stuff.
- (pinfo::record_death): Leave pinfo_mutex locked with the
- understanding that this function will be called just prior to
- exiting the process. This minimizes a race between a child which
- is exiting at nearly the same time as its parent.
- * sigproc.cc: Reformat function calls.
- (sigproc_init): Clear new PID_INITIALIZING flag to indicate that
- a (possibly execed) process is now capable of receiving signals.
- (sig_send): Be more defensive in determining if a signal can be
- sent to myself or suffer problems with execed processes.
- (sigproc_terminate): Wait for sig_proc to exit to ensure that
- all pending signals have been handled. Use new 'proc_terminate'
- function to terminate the subprocess handling thread.
- (allow_sig_dispatch): Don't bother blocking signals if signal
- handling isn't active in this process yet.
- (block_sig_dispatch): Don't bother blocking signals if signal
- handling isn't active in this process yet.
- (sig_proc): Use sig_loop_wait variable to control wait time for
- signal semaphores. Uncouples this wait from wait_subproc.
- Perform signal cleanup here on thread termination.
- (proc_exists): More accurate tests to determine if a process
- really exists.
- (proc_register): Remove this function in favor of a macro.
- (proc_subproc): More stringent test for being "ready" to process
- subprocesses. Add more common initialization to PROC_ADDCHILD.
- Remove PROC_EXIT in favor of a separate function.
- (proc_terminate): New function. Replaces PROC_EXIT functionality
- in proc_subproc. Terminates subproc handler thread.
- (stopped_or_terminated): use lock_pinfo_for_update when modifying
- child stopsig status or suffer a race.
- (wait_subproc): Save sig_proc thread handle away for
- synchronization when exiting. Set up 'i_am_alive' mutex inherited
- by childen. Child's inability to lock this mutex means that the
- parent is still alive and processing children. Use proc_loop_wait
- to control WFMO. Clean up events queue on thread exit.
- (zap_subproc): Clear out pinfo structure for a child.
- * sigproc.h: Remove PROC_EXIT constant. Remove obsolete
- proc_register declaration.
- (alive_parent): New macro to determine if a parent is still alive.
- * spawn.cc (spawn_guts): Fix a comment typo. Use proc_terminate
- to terminate all subprocess handling prior to an exec. Use new
- method for determining if this process was started via a fork.
- Attempt to clean up races between execed process, its parent, and
- the execed child.
- * winsup.h (pinfo): Add a new handle indicating that a parent is
- alive. This should be a foolproof way of determining if a parent
- has gone away so that a child will know whether to remove itself
- from the pinfo table.
- Reorganize the structure in such a way that items to be zeroed
- are grouped together at the beginning for more efficient zeroing
- in allocate_pid.
- Add a new PID_* constant.
- New lock_pinfo_for_update macro for use when debugging cygwin.
-
-Wed Dec 10 00:05:23 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- Change the way to inherit fd table on spawn/exec calls.
- Use STARTUPINFO structure to pass an fd table to a child process
- instead of shared memory area. This is undocumented, but is used
- by MSVC runtime. The desktop inheritance code added again,
- otherwise user32.dll will fail to initialize after sexec calls.
- * pinfo.cc (pinfo_init): delinearize fd array from STARTUPINFO
- structure instead of call to copy_shared_fd_table.
- * shared.cc (create_shared_fd_mapping_name): remove
- (create/copy_shared_fd_table): remove
- * spawn.cc (spawn_guts): use lp(cb)Reserved2 fields of STARTUPINFO
- to pass fd table to a child. Remove call to
- create_shared_fd_table. Inherit window station/desktop on sexec
- calls.
- * winsup.h: remove prototypes for create/copy_shared_fd_table.
-
-Fri Dec 5 18:57:42 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * kill.cc (main): Report error if kill() fails. Minor reformat.
- * ps.cc (main): Only use month/day in start time when starting
- time is > 24 hours in the past, not when it occurs yesterday.
-
-Fri Dec 5 15:54:41 1997 Geoffrey Noer <noer@cygnus.com>
-
- * fcntl.cc (_fcntl): reformat
- * fhandler.cc (fhandler_tty::open): new, need special open for
- ttys. In addition to calling fhandler_base::open, check
- flags to handle blocking vs. non-blocking I/O. Should
- initialize tty to standard state (9600 bits/sec - 8 - 1 with
- no flow control) but this code needs more work still. Ifdef
- out for now.
- (fhandler_tty::tcsendbreak): new
- (fhandler_tty::tcdrain): new
- (fhandler_tty::tcflow): new
- (fhandler_tty::tcsetattr): add support for action arg. Use
- a DCB struct to hold the values we will set. First call
- GetCommState to get the current state, then reassign values
- based on the contents of the termios struct. Handle the
- case where t->c_ospeed is set to B0, otherwise set state.BaudRate.
- Set all the other DCB struct values appropriately, based on
- the contents of the termios struct.
- (fhandler_tty::tcgetattr): do the inverse of tcsetattr.
- Call GetCommState to get the current state and use this to set
- the appropriate termios struct values.
- * termios.cc: reformat
- (tcsendbreak): implement -- add duration arg,
- call fhandler tcsendbreak as appropriate
- (tcdrain): implement -- call fhandler tcdrain as appropriate
- (tcflow): implement -- call fhandler tcflow as appropriate
- * fhandler.h: add new tc* protos
- * include/sys/termios.h: correct values of iflag bits,
- define CRTSXOFF and CRTSCTS, CBAUD, B57600 and B115200.
- Add protos for tc* functions.
-
-Wed Nov 26 17:06:17 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * spawn.cc (perhaps_suffix): resolve symlinks to .exes.
-
-Mon Nov 24 17:10:49 1997 Geoffrey Noer <noer@cygnus.com>
-
- * cygwin.din: remove crypt
- * syscalls.cc (crypt): remove crypt stub
-
-Sun Nov 23 17:34:42 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * spawn.cc (spawn_guts): save the path of the script itself,
- use the saved path while building the command line to execute.
-
-Thu Nov 20 22:58:23 1997 Geoffrey Noer <noer@cygnus.com>
-
- * stubs.cc: delete file, move unimplemented stubs to the
- files in which they would normally belong.
- * grp.cc (setgrent): implement (was in stubs.cc)
- * syscalls.cc: move regfree, mknod, setgid, set(e)uid, sync,
- crypt, and PPC __chkstk/_alloca/dll_entry stubs here from stubs.cc
- (sync): just return zero for now instead of -1
- (crypt): return -1 instead of 0
-
-Thu Nov 20 22:41:57 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * spawn.cc (spawn_guts): A premature close of the spawned filehandle
- was possible when reparenting an exited process. Fix this.
- * dcrt0.cc (do_exit): Only do minimal cleanup if "pid focus"
- has moved to another windows process or the other process will
- become confused.
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * sigproc.cc (getsem): set errno to EPERM if existing semaphore
- cannot be opened.
- (wait_subproc): allow access to signal semaphores to process's
- owner only except for SIGCHLD (needed for SIGCHLD delivery after
- sexecXX calls).
-
-Thu Nov 20 00:52:58 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * syscalls.cc (hash_path_name): Ignore trailing backslash when
- calculating pathname hash.
- * hinfo.cc (hinfo_vec::de_linearize_fd_array): Set use_tty
- if /dev/ttyn is detected in the shared_fd_table. Before this
- change, executing "set CYGWIN_TTY=1", "bash", "unset CYGWIN_TTY",
- "/bin/pwd" would result in pwd printing nothing because
- the de_linearize code would use the wrong fhandler_xxx when
- reading from the buffer inherited from the parent process.
- * cygwin.din: Add new ctermid function for export.
- * syscalls.cc (ctermid): New function
- * exceptions.cc (call_handler): If called during a P_OVERLAY
- spawn, merely set appropriate flags and return. The spawn
- code will then clean up and exit.
- * sigproc.cc (proc_exists): Reorganize to better detect defunct
- processes. Don't clean up pinfo if process has a parent since the
- parent should clean up eventually.
- * spawn.cc: New global exec_exit. Set by signal handler to
- value which should be used on exit from aborted spawn.
- (spawn_guts): Try harder to let the child terminate (if it is
- going to) before exiting on a signal. Remove obsolete code.
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * exec.cc (file_exists): Removed
- * spawn.cc (spawn_guts): call perhaps_suffix to convert filename
- to win32 form and to check file existance; prog variable
- removed, all references changed to real_path variable.
- Do not inherit parent's window station/desktop on sexecXX calls.
- They are no longer needed with the new signal handling.
- (_spawnve): extra file existance check removed
- * winsup.h: file_exists prototype removed
-
-Wed Nov 19 16:23:47 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * cygwin.din: add missing exports for random -- initstate
- and setstate (accessed by gawk among others?)
-
-Tue Nov 18 22:27:10 1997 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: Add spaces after colons in rules for make
-
-Mon Nov 17 22:35:25 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from proven@cygnus.com (Chris Provenzano):
- * Makefile.in: set SHELL = @SHELL@, set VPATH to only @srcdir@.
- Remove mingw from directories to build for now, adapt rules
- for building sysdef files without fancy VPATH
- * configure: regenerate
- * config/i386/makefrag: add rules to build setjmp/longjmp
- * regexp/Makefile.in: set SHELL = @SHELL@
- * regexp/configure: regenerate
- * utils/Makefile.in: set SHELL = @SHELL@
- * utils/configure: regenerate
-
-Mon Nov 17 18:36:50 1997 Geoffrey Noer <noer@rtl.cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * fhandler.cc (fhandler_disk_file::open): calls to symlink_XXX
- replaced with path_conv class calls.
- * path.cc (path_conv::path_conv): comments added, O_NOSYMLINK case
- added.
- * path.h (class path_conv): symlink_p, exec_p - new class members.
- * spawn.cc (spawn_guts): call path_conv instead of symlink_follow.
-
-Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@rtl.cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * dcrt0.cc (do_exit): Use new pinfo element in debug statement.
- * pinfo.cc (pinfo_init): Eliminate use of "PID" environment
- variable in favor of scanning the process table for a
- SpawnedProcessId field matching current windows process id.
- Should speed up spawned process startup slightly. Delay setting
- of dwProcessId until process is capable of processing signals
- since this field is used to build signal semaphores.
- * signal.cc (kill_worker): Perform a `proc_exists' on the pid
- in question if signal == 0. This will verify that the process
- actually exists and was not abnormally terminated.
- * sigproc.cc (sigproc_init): Initialize dwProcessId field after
- signal processing has been initialized.
- (sigproc_terminate): Remove events[0] close.
- (getsem): Use GetCurrentProcessId to find the windows pid since
- this dwProcessId field is not yet set up. Use proc_exists to
- determine if error should be printed on OpenSemaphore error.
- (proc_exists): New function. Makes more exhaustive test of
- process existence. Determines if process died without going
- through normal shutdown.
- (wait_subproc): Close wakeup event only on thread exit.
- * spawn.cc: Remove pExeced. Use new field in pinfo.
- (spawn_guts): Initialize dwSpawnedProcessId field.
- * utils/ps.cc (main): Perform a kill(pid, 0) on any pids that
- appear to be active. This will clear out pids that have died
- abnormally. 'ps -f' bypasses this.
- * winsup.h (class pinfo): Add dwSpawnedProcessId field.
-
-Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@rtl.cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * pinfo.cc ((pinfo_init): use dwProcessId for execed/spawned
- check, set subproc_ready event only if the process is exec'ed.
- * spawn.cc (spawn_guts): initialize hProcess and dwProcessId
- fields of pinfo on exec, keep progname field on spawn.
-
-Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@rtl.cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * dcrt0.cc: remove commented out code
- * spawn.cc: fix misapplied patch problem
-
-Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * fhandler.cc (fhandler_dev_null::open): Open Windows 'nul'
- device rather than "faking" a real open.
- (fhandler_dev_null::close): delete.
- (fhandler_dev_null::fstat): delete.
- (fhandler_dev_null::ioctl): delete.
- (fhandler_dev_null::read): delete.
- (fhandler_dev_null::write): delete.
- (fhandler_dev_null::lseek): delete.
- (fhandler_dev_null::dup): delete.
- * fhandler.h (class fhandler_base): delete above methods from
- class.
- * hinfo.cc (hinfo_vec::build_fhandler): Use new fhandler_dev_null
- class which opens 'nul' device. Treat /dev/null similarly to
- other Windows devices. This allows redirection of /dev/null to
- non-cygwin processes.
-
-Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * dcrt0.cc (do_exit): Use EXIT_* flags to determine how exit
- should proceed. Honor new EXIT_NOCLOSEALL to avoid
- close_all_files.
- * exceptions.cc (__cygwin32_exception_handler): Use new
- EXIT_SIGNAL define to indicate exiting due to signal.
- * signal.cc (sigprocmask): Slightly more defensive check against
- being called prior to complete cygwin setup.
- (_raise): Defensive check to guard against being called prior to
- complete cygwin setup.
- * sigproc.cc (stopped_or_terminated): Use new EXIT_SIGNAL define
- to detect exiting due to signal.
- * sigproc.h: Define flags to be used during exit process as
- EXIT_*.
- * spawn.cc (spawn_guts): Use EXIT_* constants to control how
- do_exit proceeds after _P_OVERLAY.
-
-Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@cygnus.com>
-
- * sysconf.cc (sysconf): return 1048576 for ARG_MAX until
- we figure out the right value (_POSIX_ARG_MAX is only 4K
- which is too small).
-
-Sun Nov 16 15:54:27 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * dcrt0.cc (dll_crt0_1): call winsock_init if neccesary.
- * fhandler.cc ((fhandler_socket::fhandler_socket): moved to net.cc
- * fhandler.h (class fhandler_socket): destructor prototype added.
- * fork.cc (cygwin_fork_helper1): set PID_SOCKETS_USED in the
- child's pinfo if parent has open socket descriptors; call
- winsock_init in child code if necessary.
- * net.cc: static variable winsock_init_p removed;
- number_of_sockets is new global variable containing number of
- opened sockets.
- (winsock_init): made global, save "winsock inited" flag in process
- state field.
- (cygwin32_winsock calls): condition for winsock initialisation
- changed
- (fhandler_socket::fhandler_socket): new, moved from fhandler.cc;
- increment number_of_sockets on constructor call.
- (fhandler_socket::~fhandler_socket): new. Decrement
- number_of_sockets on destructor call, check for negative value.
- (fhandler_socket::ioctl): check for winsock initialisation added.
- * spawn.cc (spawn_guts): handle PID_SOCKETS_USED in child's pinfo.
- * winsup.h: PID_SOCKETS_USED - new enum value; number_of_sockets
- and winsock_init() prototypes added.
-
-Wed Nov 12 23:02:34 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * exceptions.cc: Substitute do_exit for _exit as appropriate.
- do_exit allows full 32 bits of exit value. The upper 16 bits
- are used for special cygwin operations.
- * winsup.h: Change definition of do_exit to allow calling from
- signal handler.
- * dcrt0.cc (do_exit): Change to allow calling from signal handler
- in place of _exit. This is necessary to ensure that only cygwin
- internal applications can exit with the upper order 16 bits set
- to non-zero.
-
-Wed Nov 12 23:02:34 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * dcrt0.cc (do_exit): New function. Subsumes functionality of
- _exit but takes a DWORD argument. Changed to avoid some shutdown
- activities when called with REPARENTING bit set in argument. Also
- explicitly kills any executing non-cygwin subprocess from a
- spawn(P_OVERLAY)...
- (_exit): Use do_exit for exiting. Ensure that only low order 1
- bits of status are used or confusion will result if exiting with
- some higher order bits set.
- * exceptions.cc (set_process_mask): Reflect new method for
- sig_send to send signals to self.
- (handle_sigsuspend): Reflect new method for sig_send to send
- signals to self.
- * fork.cc: A handle name was changed in the pinfo structure to
- be more reflective of its use. Change forkee_stopped to
- subproc_ready everywhere.
- * pinfo.cc (pinfo::clearout): Change forkee_stopped to
- subproc_ready.
- (pinfo_init): Use PID_EXECED flag to determine if this process has
- been execed. If so, signal the remaining stub in the process
- which invoked us so that the stub can terminate and let us take
- over as this pid.
- * sigproc.cc (sig_send): Change method for determining if sending
- signals to myself. A NULL pointer means communicate with my
- signal handler. This is necessary to allow communication with
- our own signal processors after reparenting an execed process.
- Also, add an additional test to detect if a process goes away in
- the middle of attempting to send it a signal.
- (allow_sig_dispatch): Reflect new method for sig_send to send
- signals to self.
- (getsem): Use dwProcessId in names for signal semaphores. Allows
- communicating with both parts of a process that is temporarily
- "split in two" while execing.
- (sig_proc): Avoid printing an error if WAIT_FAILED and exiting
- anyway. Process requests even if loop_wait == 0.
- (proc_subproc): Defensive check for manipulating processes prior
- to initialization or after terminating sigproc.
- Use different check for subprocesses that have been reparented.
- Hopefully this will eliminate WFSO, error 6 problems.
- (wait_subproc): Only exit when loop_wait == 0 and not dealing with
- a process.
- * spawn.cc: Set up two global variables, used on exit when
- execing a non-cygwin process: hExeced - handle of non-cygwin
- process which is being waited for by a stub, pExeced - windows pid
- of the process.
- (spawn_guts): Reorganize to always (temporarily) wait for the new
- process when P_OVERLAY. If a cygwin process is invoked, then the
- wait will return when an event is signalled and the new process
- will be "reparented" in the ppid. If a non-cygwin process is
- invoked, wait until the process exits or a signal is received
- which terminates the process. In this case, the do_exit function
- will terminate the non-cygwin process.
- * winsup.h: Rename forkee_stopped to subproc_ready since this
- event now has a dual role which is better defined by this new
- name. Add a new flag (PID_EXECED) for process_state. Define a
- new function `do_exit' which operates similarly to _exit
- but takes > 16 quantities with the high order bit signifying
- different exit actions.
-
-Mon Nov 10 17:11:08 1997 Geoffrey Noer <noer@cygnus.com>
-
- * include/utime.h: remove (moved to newlib/libc/sys/cygwin32/sys)
- so as not to conflict with the one in newlib/libc/include.
-
-Mon Nov 10 15:11:42 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * exceptions.cc (__cygwin32_exception_handler): exit with
- "core dumped" exit code after writing "core" file.
-
-Mon Nov 10 15:11:42 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * console.cc: Add convenience macros and structures for handling
- scrolling.
- (fhandler_console::fillin_info): New function to fill in the `info'
- struct.
- (fhandler_console::scroll_screen): Change to scroll only the visible
- portion of the screen. Honor scroll regions more stringently.
- (fhandler_console::open): Use new fillin_info function.
- (fhandler_console::ioctl): Use new fillin_info function which
- automatically calculates screen size.
- (fhandler_console::clear_screen): Use new fillin_info function.
- Only clear visible portion of screen.
- (fhandler_console::cursor_set): Add a flag to indicate whether
- cursor positioning is absolute within buffer or is screen relative.
- Use new fillin_info function to get screen information.
- (fhandler_console::cursor_rel): Use new fillin_info function.
- Change for new cursor_set parameter.
- (fhandler_console::cursor_get): Use new fillin_info function.
- (fhandler_console::char_command): Use new fillin_info function
- where appropriate. Change for new cursor set parameter where
- appropriate. Scroll only visible portion of screen when required.
- * fhandler.h (class fhandler_console): Add fillin_info, change
- cursor_set to reflect additional argument.
-
-Mon Nov 10 15:11:42 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * dcrt0.cc (dll_crt0_1): Register process start time.
- * fork.cc (cygwin_fork_helper1): Register process start time.
- * utils/ps.cc (main): Report process start time.
- (start_time): New function to format time similarly to UNIX ps.
- A time from today shows as HH:MM, times from previous days just
- show the month and day.
- * winsup.h (class pinfo): Add start_time field.
-
-Mon Nov 10 11:54:27 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * include/Windows32/Defines.h (TIME_ZONE_ID_INVALID): Define.
- * times.cc (gettimeofday): The error return from
- GetTimeZoneInformation is TIME_ZONE_ID_INVALID, not
- TIME_ZONE_ID_UNKNOWN.
-
-Sun Nov 9 17:08:30 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * Makefile.in: add ../libiberty/strsignal.o
- * cygwin.din: add exports for strsignal, strtosigno
- * utils/kill.cc: changes to allow accepting signal name
- as argument
-
-Sun Nov 9 17:08:30 1997 Geoffrey Noer <noer@cygnus.com>
-
- * include/limits.h: define PATH_MAX here instead of
- include/sys/param.h, define _POSIX_NGROUPS_MAX as 0 not 1
- (system invariant value, not implementation-specific)
- * include/sys/param.h: remove PATH_MAX, change NOFILE from 64
- to 8192, delete PATHSIZE, remove safety wrapper around
- MAXHOSTNAMELEN, add comments
- * sysconf.cc (sysconf): return NGROUPS_MAX not zero,
- return _POSIX_SAVED_IDS not zero. Return _POSIX_CHILD_MAX
- not 4096. Return _POSIX_CHILD_MAX, not 8.
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * winsup.h: add proto for setdtablesize, define NOFILE_INIT
- and NOFILE_INCR
- * hinfo.cc (hmap_init, hinfo_vec::find_unused_handle): change to
- support virtually unlimited numbers of fds. Remove setdtablesize
- proto
- * syscalls.cc: initialize dtable_size to NOFILE_INIT instead of
- NOFILE
-
-Thu Nov 6 13:14:09 1997 Geoffrey Noer <noer@cygnus.com>
-
- * exceptions.cc (__cygwin32_exception_handler): don't
- print "In cygwin32_except_handler" for exceptions Cygwin32
- isn't going to handle. Print "(progname PID) Exception: <type>"
- to console. Redirect all detailed information including the
- stack trace to <progname>.core. This should reduce confusion
- about what's causing the exception (a lot of people would see "In
- cygwin32..." and think the problem was in Cygwin32 when most of
- the time it was in some other program).
- * syscalls.cc: add fixme
- * times.cc: add fixme
-
-Wed Nov 5 19:23:10 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * Makefile.in: force .c.os and .cc.os to be built in same
- directories as source
-
-Wed Nov 5 19:23:10 1997 Geoffrey Noer <noer@cygnus.com>
-
- * drct0.cc (dll_crt0_1): stop initializing winsock on process
- startup since that slows down startup time of all processes, even
- ones that don't end up making Winsock calls.
- * fork.cc (cygwin_fork_helper1): don't need to call uinfo_init
- or socket_checkinit after fork -- the appropriate functions will
- do the necessary initialization if they are ever called.
- * net.cc: init winsock_init_p to zero and make it static
- (all exported functions): call winsock_init before making
- any WinSock calls since this no longer happens in dcrt0.cc
- startup code. Only do this if !winsock_init_p.
- (winsock_init): checkinit renamed. Now just inits winsock
- without checking whether it has been already initialized.
- Make it static.
- * uinfo.cc (uinfo_init): after we call getpwnam, we know
- the passwd file has been read in so don't check initialization
- of it. However, we do need to read_etc_group() if group_in_memory
- isn't set.
- * passwd.cc: rename global i variable to pw_pos, rename
- passwd_in_memory to passwd_in_memory_p to match net.cc scheme.
- Add comments.
- (read_etc_passwd): make static
- (various): make sure to read_etc_passwd() if passwd_in_memory
- isn't set
- * grp.cc: add comments, rename idx global to grp_pos,
- rename group_in_memory to group_in_memory_p to match net.cc
- scheme, group_in_memory_p no longer static (needs to be accessed
- by uinfo_init)
- * winsup.h: remove proto for socket_checkinit since that's
- renamed and static within net.cc
-
-Tue Nov 4 01:02:20 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * signal.cc (sigprocmask): Newer versions of gcc will call
- sigprocmask when a builtin constructor is activated. If this
- happens prior to the setup of u->self, then a NULL dereference
- will occur. Guard against this.
-
-Mon Nov 3 17:00:45 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * hinfo.cc (hinfo_vec::build_fhandler): Open a console for
- /dev/tty when !use_tty.
-
-Thu Oct 30 10:28:15 1997 Tom Tromey <tromey@cygnus.com>
-
- * include/mapi.h: New file.
- * sysdef/i386/mapi32.def (MAPISendMail@20): New export.
-
-Thu Oct 30 15:08:13 1997 Geoffrey Noer <noer@cygnus.com>
-
- * times.cc: add comments listing standards funcs are defined in
- (dump_filetime): remove unused local func
- * net.cc (fail): remove local func, replace one reference with
- equivalent debug_printf, add standards comments, reformat a little
- (fhandler_socket::close): simplify handling of res
- (fhandler_socket::fstat): set ENOSYS (unimplemented)
- * stubs.cc: set ENOSYS in unimplemented funcs
- * uname.cc: add standards comment
- * ntea.cc: reformat
-
-Wed Oct 29 22:43:57 1997 Geoffrey Noer <noer@cygnus.com>
-
- * times.cc (settimeofday): set ENOSYS instead of EPERM
- since ENOSYS maps to "Function not implemented" which is the
- case here.
- * syscalls.cc (seterrno): on failure, set EACCES instead of EPERM
- which is better for the unknown error case
-
-Fri Oct 24 01:24:07 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from green@cygnus.com (Anthony Green):
- * dcrt0.cc: new host_dependent_constants object with a global
- instance of it which allows constants that are different in Win 95
- and NT to be saved here instead of having forks in the code and
- having to check the OS type each time. Add two constants for
- fhandler, one for sharing attributes and one for upper word value
- for locking files.
- (dll_crt0_1): call host_dependent init function
- * fhandler.cc (fhandler_base::open): use above object for
- setting shared attributes
- (fhandler_disk_file::lock): get upper word for locking from
- host_dependent_constants
- * winsup.h: define host_dependent_constants class and add extern
- for global instance of it
-
-Wed Oct 22 02:27:53 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * cygwin.din: Export getenv, putenv, setenv and unsetenv instead
- of cygwin32_ wrappers
- * dcrt0.cc: External variable environ removed
- (dll_crt0_1): strip executable's path on console title if
- environment variable CYGWIN_TITLE set to "strip", references to
- environ removed.
- * environ.cc: New file. Code derived from newlib sources.
- * exec.cc: include stdlib.h
- (execl, execv): new (derived from newlib sources).
- (sexecve): reference to environ removed.
- (sexecvpe): call getenv instead of cygwin32_getenv.
- * grp.cc: new static variable group_in_memory
- (read_etc_group): skip blank lines
- (getgrgid, getgrnam, getgrent): call read_etc_group when necessary.
- * misc.cc (cygwin32_getenv/putenv/setenv/unsetenv): remove
- wrappers.
- * passwd.cc: new static variable passwd_in_memory
- (read_etc_passwd): skip blank lines
- (search_for, getpwent): call read_etc_passwd when necessary.
- (setpwent): fixed incorrect initialization of i var.
- * pinfo.cc (pinfo_init): initialize uid with illegal value to
- force read of /etc/passwd and /etc/group.
- * spawn.cc: call getenv instead cygwin32_getenv
- (spawn_guts): force read of /etc/passwd and /etc/group on sexec
- calls.
- * uinfo.cc (uinfo_init): read /etc/passwd and /etc/group only if
- uid is undefined.
- * winsup.h: remove protos for environ, cygwin32_getenv,
- cygwin32_putenv
-
-Wed Oct 22 02:08:54 1997 Geoffrey Noer <noer@cygnus.com>
-
- * utils/aclocal.m4: new file. Define autoconf macros for
- determining whether we're compiling for the cygwin32 environment
- or not and determine the executable suffix
- * utils/configure.in: call AM_CYGWIN32 and AM_EXEEXT
- * utils/configure: regenerate
- * utils/Makefile.in: add $(exeext) after executable names so
- programs will be built with the .exe suffix
-
-Wed Oct 22 00:50:27 1997 Geoffrey Noer <noer@cygnus.com>
-
- Now that it is possible to use gdb using a stable
- cygwin.dll to debug a program using a newer, potentially buggy
- cygwin.dll, the strace mechanism will probably end up being
- used more and more for debugging timing/race-condition bugs that
- aren't easily exposed in a gdb session. The following changes
- make the strace facility better for debugging timing issues by
- storing the last few commands in a buffer instead of writing
- to disk each function call.
-
- patch from cgf@bbc.com (Chris Faylor):
- * dcrt0.cc (dll_crt0_1): Change to strace_init call to take
- an argument (for planned future registry changes).
- (_exit): Call strace_dump when appropriate. Add a debugging
- printf.
- * include/sys/strace.h: Add _STRACE_CACHE, _STRACE_EXITDUMP,
- strace_dump ().
- * strace.c (strace_init): Allow hexadecimal, octal setting of
- strace flags in environment variable. Handle new cache option.
- (strace_printf): Display number of seconds from last message.
- Handle _STRACE_CACHE.
- (strace_dump): New function. Dump cached messages to disk.
-
-Wed Oct 22 00:08:40 1997 Geoffrey Noer <noer@cygnus.com>
-
- * cygwin.din: export socket calls without cygwin32_ prefix
- * net.cc: remove unused herror function in favor of
- cygwin32_herror which is exported as herror
- * include/netdb.h: we are now exporting the socket calls without
- the cygwin32_ prefix so we don't need the nasty remapping in
- header files
- * include/arpa/inet.h: ditto
- * include/sys/socket.h: ditto
- * select.cc (select): make extern C
-
-Tue Oct 21 22:52:29 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * sigproc.cc (sigproc_terminate): Fix flawed attempt to signal
- any processes waiting for signal notification success when the
- process receiving the signal is terminating.
- (wait_subproc): Report on errors when opening the
- sync_proc_subproc mutex. Move initialization of events[0]
- "wakeup" signal prior to wait_subproc_inited or risk a (miniscule)
- chance for a reference to a NULL handle.
- * strace.cc (ta[]): Change WM_ASYNCIO entry to reflect previous
- changes to WM_ASYNCIO constant.
-
-Tue Oct 21 14:30:14 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * sigproc.cc (proc_subproc): fix minor error output problem
-
-Mon Oct 20 20:19:02 1997 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: change DLL_NAME to cygwin97r2.dll
-
-Mon Oct 20 20:16:47 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * window.cc (alarm): When there is a previous alarm() request
- with less than one second remaining, then the return from a call
- to alarm() is supposed to return 1.
-
-Mon Oct 20 20:16:47 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * Makefile.in: Add sigproc.o target. Add sigproc.h dependency
- where appropriate. Add -s to intermediate ld of cygwin.dll to
- speed up the process of building the .dll.
- * dcrt0.cc: Add new sigproc.h include.
- (dll_crt0_1): Replace window_init with sigproc_init for
- initialization of signal/sub process handling. Change to use new
- process_state field in pinfo.
- (_exit): Remove spurious debugging statement. Terminate sigproc
- processing. Remove signal blocking obviated by previous signal
- termination. Remove SIGCHLD notification of parent as it is now
- handled automatically in the parent.
- (api_fatal): Terminate sigproc processing.
- * exceptions.cc: Add new sigproc.h include. Change name of
- ourhThread.
- (ctrl_c_handler): Change to static as this is no longer called
- outside of this module.
- (lock_cs): Change to a function which will optionally grab new
- signal dispatch mutex. Don't wait forever for cs mutex.
- (unlock_cs): Change to a function which will optionally release
- new signal dispatch mutex.
- (init_exceptions): Detect errors from SetConsoleCtrlHandler.
- Initialize new sig_dispatch mutex. This mutex is used to
- control dispatching to a function on signal receipt.
- (sig_dispatch_pending): New function. Called from signal
- processing thread to dispatch pending signals.
- (set_process_mask): Block signal dispatch during setting of new
- mask, if possible. Contact signal thread to dispatch pending
- signals.
- (handle_sigsuspend): New function. Attempts to implement a
- sigsuspend which will not lose signal notification. Called from
- sigsuspend.
- (call_handler): Use sigproc_printf where appropriate.
- (ctrl_c_handler): Use _raise to invoke the correct signal.
- (sighandle): New function. Subsumes most of ctrl_c_handler.
- Change to mark as suspended signals which would dispatch for which
- the sig_dispatch mutex is unavailable. Use sigproc_printf where
- appropriate.
- (events_init): Remove application_stopped mutex made obsolete by
- new sigproc handling.
- (events_terminate): Remove application_stopped mutex made
- obsolete by new sigproc handling.
- * fork.cc: Add new sigproc.h include.
- (cygwin_fork_helper1): Use process_state field in pinfo (replaces
- inuse_p). Call proc_register to add a new subproc to sigproc
- handling. Call sigproc_init for new subprocess. Remove obsolete
- window_init.
- * heap.cc (_sbrk): Use process_state field in pinfo (replaces
- split_heap_p).
- * hinfo.cc (hmap_init): Use process_state field in pinfo (replaces
- cygwin_parent_p).
- * include/sys/strace.h: Add tracing for signal/subprocesses.
- * init.cc: Add new sigproc.h include. Add waitq_storage global
- for new sigproc handling.
- (dll_entry): Add initialization, destruction of structures needed
- by new sigproc handling.
- * net.cc (fhandler_socket::ioctl): Use gethwnd() function to find
- hwnd of hidden window.
- * pinfo.cc: Add new sigproc.h include.
- (pinfo::clearout): Use process_state field in pinfo (replaces
- split_heap_p). Explicitly initialize various handles to NULL.
- (pinfo_init): Use process_state field in pinfo (replaces
- cygwin_parent_p).
- (pinfo_list::operator): Use process_state field in pinfo (replaces
- inuse_p).
- (pinfo_list::alocate_pid): Initialize process_state field.
- (pinfo::init_self): Remove obsolete initialization of hProcess.
- (pinfo::record_death_nolock): Changes for new sigproc handling.
- (pinfo::record_death): Move bulk of this code to sigproc.cc.
- (pinfo::terminate): Remove function made obsolete by sigproc
- handling.
- (pinfo::init_from_exec): Use process_state field (replaces
- inuse_p).
- * signal.cc: Add new sigproc.h include.
- (kill_worker): Call new sig_send function to send signals to
- cygwin processes.
- (_kill): Use process_state field in pinfo (replaces inuse_p).
- (sigsuspend): Call handle_sigsuspend in exceptions.cc to handle
- sigsuspend in a non-raceable way.
- * sigproc.cc: New signal/subprocess handling module. Replaces
- SendMessage method for signals with a method using semaphores.
- Also detects changes in the state of child processes.
- * sigproc.h: New header file defining constants and functions for
- signal/subprocess handling.
- * spawn.cc: Add new sigproc.h include. Clean up trailing spaces.
- (spawn_guts): Reorganize to use new sigproc handling.
- Use new pinfo process_state field (replaces inuse_p).
- * syscalls.cc (_read): Use new pinfo process_state field (replaces
- inuse_p).
- (_write): ditto.
- * tty.cc (tty_init): Use new pinfo process_state field (replaces
- cygwin_parent_p).
- * utils/ps.cc (main): Use new pinfo process_state field (replaces
- inuse_p). Detect "zombie" processes similarly to UNIX ps.
- * wait.cc: Add required includes.
- (wait_found): Function obsoleted by new sigproc handling.
- (wait4): Reorganize to use new sigproc handling.
- * window.cc: Changes for new sigproc handling.
- (WndProc): Remove SIGNAL handling obsoleted by new sigproc
- handling. Use static window handle since the field has been
- removed from pinfo. Use _raise where appropriate to send signals.
- (Winmain): Replace global window handle with static since the
- field has been removed from pinfo.
- (window_init): Remove obsolete function.
- (gethwnd): New function to allocate hidden window on demand rather
- than at startup.
- (window_terminate): Kill hidden window only if allocated.
- (setitimer): Use gethwnd function to retrieve hidden window
- handle.
- * winsup.h: Remove stuff made obsolete by sigproc handling. Move
- some constants to new sigproc.h header file. Remove inuse_p,
- cygin_parent_p, split_heap_p. Replace with a single process_state
- field. Define bit fields for process_state in an enum for easier
- debugging.
-
-Mon Oct 20 19:17:33 1997 Geoffrey Noer <noer@cygnus.com>
-
- * sysdef/i386/winserve.def: remove ancient version of cygwin.din
- * include/sgtty.h: remove since Cygwin32's tty handling doesn't
- support bsd syntax/semantics
- * include/sys/termios.h: change winsize struct to include
- ws_xpixel and ws_ypixel members
- * cygwin.din: remove export of ScreenCols, ScreenGetCursor,
- ScreenRows, ScreenSetCursor, get_pid__5pinfo, getkey, _getkey,
- kbhit, _kbhit, __small_printf = small_printf__FPCce
- * key.cc: remove. Similar functionality exists in ncurses
- which can be compiled for Cygwin32
- * console.cc (ScreenCols, ScreenGetCursor, ScreenSetCursor,
- ScreenRows): delete and delete SCREEN_ROWS/COLS defines
- * pold.c: remove old pipe-related code that's no longer used
- * include/regex.h: remove, it's not a part of cygwin.dll
- * syscalls.cc: started to add comments including standards
- information
- (truncate): new
- (ftruncate): length is an off_t, not a size_t. Add missing
- return value to debug printf
- * syscalls.h: ftruncate length is an off_t, add proto for truncate
-
- patch from cgf@bbc.com (Chris Faylor):
- * console.cc (fhandler_console::write): Recognize '@' as a valid
- character to follow a '\e[' sequence or get 'Bad escape' errors.
-
-Wed Oct 15 18:44:25 1997 Geoffrey Noer <noer@cygnus.com>
-
- * cygwin.din: restore __main as an export
-
-Mon Oct 13 18:41:09 1997 Geoffrey Noer <noer@cygnus.com>
-
- * cygwin.din: revert renaming of __assert since that's
- actually what it's supposed to be called
- * assert.cc: ditto
-
-Fri Oct 10 19:25:49 1997 Tom Tromey <tromey@cygnus.com>
-
- * include/Windows32/Base.h: Moved typedefs of CHAR, SHORT, etc,
- before all other uses in file.
-
-Fri Oct 10 17:50:12 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * include/Windows32/Base.h: Only typedef CHAR, SHORT, and LONG if
- VOID is not defined
-
-Thu Oct 9 00:46:40 1997 Geoffrey Noer <noer@cygnus.com>
-
- * cygwin.din: remove all libgcc.a exports. They don't
- belong here since libgcc.a doesn't really relate to the
- purpose of cygwin.dll, and (to make things worse) the contents
- change over time.
- * assert.cc: rename __assert to __cygwin32_assert
- * exceptions.cc: rename __stack_trace to __cygwin32_stack_trace,
- __cygwin_except_handler to __cygwin32_except_handler
- * version.h: increment major and minor numbers
-
-Tue Oct 7 12:52:25 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * dcrt0.cc (_exit): under Win 95, don't send SIGCHLD
- unless special env variable is set. This works around a
- problem where exiting a process can hang under Win 95.
-
-Mon Oct 6 23:41:34 1997 Geoffrey Noer <noer@cygnus.com>
-
- * regexp: new directory containing free regexp code by
- Henry Spencer. Taken from the most recent release of NetBSD.
- Write configure.in and Makefile.in, based on files from
- winsup/utils.
- * Makefile.in: build regexp directory and include objs in
- cygwin.dll.
- * stubs.cc: remove all reg* stubs except for regfree which
- isn't provided by above code.
-
-Mon Oct 6 13:35:48 1997 Geoffrey Noer <noer@cygnus.com>
-
- * dcrt0.cc: remove asm idata3 terminator, now that ld is fixed
- such that this is no longer necessary.
- * libccrt0.cc: ditto
-
-Mon Oct 6 13:14:00 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * spawn.cc (spawn_guts): return child's PID on
- spawn (_P_NOWAIT,...) instead of child's handle.
- (cwait): rewritten as a wrapper to waitpid.
-
-Mon Oct 6 13:02:01 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * net.cc (socketpair): new
- * cygwin.din: add socketpair export
-
-Mon Oct 6 13:01:51 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * dcrt0.cc: Remove obsolete call to fork_terminate.
- * exceptions.cc: Respace, remove extraneous trailing whitespace.
- Change critical section to mutex since there are supposedly
- multi-processor problems with critical sections under NT.
- Use "lock_cs" and "unlock_cs" macros to lock/unlock critical
- regions.
- (init_exceptions): Change critical section initialization to mutex
- initialization.
- (set_process_mask): Use locking macros to control access to
- sig_mask.
- (ctrl_c_handler): Use lock_cs/unlock_cs to control access.
- (events_init): Use standard cygname function to create names for
- shareable objects.
- (events_init): Close cs mutex.
- * fork.cc: Use event flags which are specific to the child being
- forked. This prevents one process from prematurely activating
- another. It also makes fork slightly more thread-safe.
- (fork_init): Remove event initialization.
- (fork_terminate): Remove function.
- (cygwin_fork_helper1): Initialize events on a per-fork basis.
- Events are inherited in child's pinfo structure.
- Remove child->hThread initialization as it not needed. Use
- pi.hThread where child->hThread is used.
- Work around Windows 95 bug where a WaitForSingleObjects will
- sometimes return ERROR_INVALID_HANDLE when it is resumed after
- a suspend.
- * pinfo.cc: Remove references to hThread field whereever it occurs.
- * strace.cc: Use standard cygname function to create name for
- strace_mutex. Prevents confusion between different .dll versions.
- * wait.cc (wait_found): Remove reference to hThread.
- * winsup.h (class pinfo): Remove reference to hThread. Add
- per-process fork control event handles.
- * include/limits.h: Increase NGROUPS_MAX from 0 to 1 to reflect
- recent change to getgroups.
-
-Mon Oct 6 11:06:22 1997 Geoffrey Noer <noer@cygnus.com>
-
- Oops. ../libio refers to objdir and is not the same
- as $(srcdir)/../libio.
-
-Thu Oct 2 23:12:19 1997 Geoffrey Noer <noer@cygnus.com>
-
- Revert patches to sources applied after Sept 16. Removed
- relevant portions of ChangeLog entries. Some of those changes
- may reappear later (removing the entries makes this log easier
- to understand).
-
-Thu Oct 2 15:34:03 1997 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: remove hardcoding of SHELL to /bin/sh, remove
- ../libio from INCLUDES since $(srcdir)/../libio is already
- included.
- * glob/Makefile.in: remove hardcoding of SHELL to /bin/sh
-
-Mon Sep 29 14:06:24 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * cygwin.din: add exports for rcmd, rresvport, rexec
- * net.cc (cygwin32_rcmd): new
- (cygwin32_rresvport): new
- (cygwin32_rexec): new
- * include/mywinsock.h: add protos for Winsock calls associated
- with functions called by the above.
-
-Mon Sep 29 13:26:24 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * grp.cc (getgrent): Change overlooked comment to reflect new
- behavior.
-
-Thu Sep 25 18:35:49 1997 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: remove debugdll defs since the shared memory
- overlap problem is solved by the timestamp addition of Sept 23
- * version.h: rework explanations of version numbers
-
-Thu Sep 25 16:21:49 1997 Geoffrey Noer <noer@cygnus.com>
-
- * spawn.cc: add missing cast to debug printf
-
-Thu Sep 25 16:14:17 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * path.cc (conv_to_win32_path): Call backslashify on a win32
- path.
-
-Tue Sep 23 17:58:17 1997 Geoffrey Noer <noer@cygnus.com>
-
- Fixes for things that were causing compile-time warnings:
- * exec.cc (_execve): add missing const to args to match def
- of execve in newlib which this calls.
- (sexecve): add missing const to def
- (sexeclpe): don't need to cast argv in sexecvpe call
- (sexecvpe): add missing const to def
- * winsup.h: correct _execve proto, add protos for login/logout
- * syscalls.h: correct sexecve, sexecvpe protos
- * include/Windows32/Base.h: NULL should be defined differently
- for C++
- * init.cc: respacing
-
-Tue Sep 23 17:05:50 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * dcrt0.cc (dll_crt0_1): don't use alloca for allocating storage
- for environment blocks because setenv() uses realloc!
-
-Tue Sep 23 17:05:50 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * Makefile.in (LD_STUFF): Add datestamp.o after DLL_OFILES.
- (datestamp.o): New target. datestamp.c is generated whenever .o
- files change. It creates a file containing a "date stamp"
- which is used by the function "cygname" to create named
- shared memory, events, mutexes, and semaphores used by
- cygwin.dll. The unique datestamp allows multiple loading of
- different cygwin.dll's even when they have incompatible use
- of shared memory areas.
- * init.cc (dll_entry): Create the name string used by cygname
- from the name of the invoking .dll + the datestamp of the
- .dll from the auto-generated datestamp.c
- * misc.cc (cygname): New function. Creates a standard Cygnus
- shared resource name given a prefix, a name (e.g., pinfo_mutex),
- and a numeric suffix (e.g., a pid). Replaces custom code in
- several files. Uses cygwin_dlldate from datestamp.c to construct
- names that are unique for a given cygwin load.
- * shared.cc (open_shared_file_map): Use standard cygname function
- to create names for sharable objects. Use static handle 'h'
- so that it can be closed later by shared_terminate.
- (shared_terminate): Guard against calling CloseHandle with a
- NULL handle.
- (create_shared_fd_mapping_name): Use cygname function to generate
- the name for the "fd_map".
-
-Tue Sep 16 23:34:36 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * fcntl.cc (_fcntl): correct errno value (EBADF instead of
- EBADFD).
-
-Tue Sep 16 17:22:28 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * include/Windows32/Defines.h: add missing defines needed
- for NTEA usage.
- * ntea.cc: remove them from here
- * syscalls.cc (_link): call CreateFile with FILE_WRITE_ATTRIBUTES
- flag instead of GENERIC_WRITE
-
-Tue Sep 16 17:22:28 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * pinfo.cc (pinfo_init): Fix a NULL pointer dereference when PID
- environment variable contains garbage.
-
-Thu Sep 11 16:51:40 1997 Geoffrey Noer <noer@cygnus.com>
-
- * syscalls.cc (ftruncate): read file pointer location at
- beginning of function and restore it at the end
-
-Thu Sep 11 15:35:10 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * path.cc (backslashify): Don't turn a single trailing slash into
- a double trailing slash.
-
-Wed Sep 10 11:40:55 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * include/Windows32/Structures.h: Add PACKED to PRINTDLG.
- * include/Windows32/Functions.h: Add STDCALL to a few function
- declarations.
-
-Tue Sep 9 02:12:18 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * syscalls.cc (_link): Implement hard links under NT with NTFS
- using the backup API. Default to copying the file (what we did
- before).
-
-Mon Sep 8 20:19:09 1997 Geoffrey Noer <noer@cygnus.com>
-
- Merge in the following changes:
-
- Thu Aug 21 13:30:12 1997 Ian Lance Taylor <ian@cygnus.com>
- * assert.cc: New file.
- * Makefile.in (DLL_OFILES): Add assert.o.
- (assert.o): New target.
- * pinfo.cc (cygwin32_winpid_to_pid): New C function.
- * cygwin.din: Add cygwin32_winpid_to_pid.
- * include/sys/cygwin.h: Include <sys/types.h>.
- (cygwin32_winpid_to_pid): Declare.
- * pinfo.cc (pinfo_init): Add debug_printf showing pid and pgid.
-
- Wed Aug 20 13:24:30 1997 Ian Lance Taylor <ian@cygnus.com>
- * spawn.cc (env_sort): New static function.
- (spawn_guts): Sort the environment before passing it to
- CreateProcess.
- * exceptions.cc (exit_already): New file static variable.
- (__cygwin_exception_handler): If exit_already is set, just
- return. If we get an exception we don't recognize, let the next
- exception handler handle it. Just ignore the INVALID_HANDLE
- exception.
- (really_exit): Remove file static exit_already variable; use the
- global one.
- (events_terminate): Set exit_already.
- * include/Windows32/Defines.h (EXCEPTION_INVALID_HANDLE): Define.
- (STATUS_INVALID_HANDLE): Define.
- * include/Windows32/Functions.h: Declare some shell functions.
-
-Mon Sep 8 17:40:46 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * dcrt0.cc (_exit): Kill the foreground process group on session
- leader exit only if job control is in progress.
- * exceptions.cc (ctrl_c_handler): protect the code with critical
- section. This helps stability under Win 95.
- * include/sys/strace.h: add new wm_printf macro
- * signal.cc (kill_worker): window message number changed (window
- messages WM_USER-WM_USER+0x100 reserved for common controls on
- windows95). Debug print added.
- * spawn.cc (spawn_guts): removed unneeded flag DETACHED_PROCESS.
- * strace.cc: defines for SIGNAL and ASYNCIO messages added.
- * tty.cc (create_tty_master): initialize speed fields of termios
- structure.
- (fhandler_pty_master::open): likewise.
- * window.cc (WndProc): debug print added, window message number
- changed.
- * winsup.h: WM_ASYNCIO number changed.
-
-Mon Sep 8 16:40:46 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * fhandler.h: set_w_binary/set_r_binary now defined to
- return void
- * grp.cc (getgroups): always return an array of length 1 where
- the element is the user's gid.
- * pinfo.cc (pinfo_init): verify that we haven't exceeded the
- maximum number of processes
- (pinfo_list::allocate_pid): ditto
- * include/Windows32/Functions.h: add noreturn attrib to ExitProcess
- * include/sys/strace.h: change strace defs so strace-related
- printfs will automatically add __FUNCTION__: to the beginning,
- rename __sys_printf to strace_printf.
- * *.cc: remove function names from debug printfs in favor of the
- new scheme where they are automatically added, change __sys_printf
- references (now strace_printf).
- * smallprint.c (__small_vsprintf): new function displayer code
- to support the above changes
-
-Wed Sep 3 12:44:45 1997 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: split subdir_do into subdir_dobefore and
- subdir_doafter to reflect whether the subdir in question
- should be built before or after the top level is built
- (e.g. glob needs to be built before libcygwin.a but libcygwin.a
- needs to be built before utils).
-
-Thu Aug 28 12:09:39 1997 Geoffrey Noer <noer@cygnus.com>
-
- * configure.in: when setting up EXE_LDFLAGS, correct the
- location of crt0.o to ../../newlib since EXE_LDFLAGS is used
- by Cygwin32 subdirectories where newlib is two directories up
- instead of one.
- * configure: regenerate with autoconf
-
-Thu Aug 28 00:13:11 1997 Geoffrey Noer <noer@cygnus.com>
-
- Replace all licensing-related headers in all Cygnus-owned
- files. Instead of listing terms at the top of each file, now
- we simply refer to:
- * CYGWIN32_LICENSE: new file listing Cygwin32 licensing terms
-
-Wed Aug 27 17:40:16 1997 Geoffrey Noer <noer@cygnus.com>
-
- * cygwin.din: export random, srandom
-
-Wed Aug 20 16:56:39 1997 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: remove unused winsock-related build rules
- that were commented out, minor comment changes, remove
- test.exe build rule.
-
-Wed Aug 20 14:45:17 1997 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: link cygwin.dll with -lm -lgcc -lc -lgcc instead
- of -lc -lm -lm -lgcc so lgcc finds abort(). Add definitions that
- will eventually be used to build a cygwindebug.dll used by gdb
- so gdb can debug a buggy cygwin.dll. Change some variable names
- to have underscores in them (DLL_NAME, LIB_NAME, DEF_FILE, etc.).
- Comment out text.exe build rule.
-
-Tue Aug 19 20:41:51 1997 Geoffrey Noer <noer@cygnus.com>
-
- * dcrt0.cc: respace, modify some comments slightly
-
-Tue Aug 19 16:17:57 1997 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: include ../libiberty/random.o, stop including
- librx since it is LGPL'd code.
- * stubs.cc: add stubs for regcomp, regexec, regerror, regfree
- * dcrt0.cc (dll_crt0_1): default to not support tty/pty devs,
- default to not displaying the running process in the title bar.
-
-Fri Aug 15 18:23:43 1997 Rob Savoye <rob@cygnus.com>
-
- Add mingw directory for the minimalist cygwin environment.
- See mingw/ChangeLog for changes specific to that directory
-
- * configure.in: Add mingw to AC_CONFIG_SUBDIR.
- * configure: Regenerated from autoconf 2.12 with Cygnus patches.
- * Makefile.in: Use subdir_do which uses the value of $SUBDIRS
- rather than having seperate target for each directory.
- * glob/Makefile.in: Add a phony target for install.
- * configure.in: Add mingw to AC_CONFIG_SUBDIR.
-
-Fri Aug 15 01:12:19 1997 Geoffrey Noer <noer@cygnus.com>
-
- * times.cc: add missing extern "C"s around exported functions
-
-Thu Aug 14 17:00:32 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * console.cc (fhandler_console::input_tcsetattr): clear iflag_ and
- lflag_ when tty support enabled.
- (FakeReadFile): do not interrupt read when tty support enabled.
- Do not reset signal_arrived event.
- * cygwin.din: add exports - cf(g)set(i)ospeed, login, logout, ttyslot
- * dcrt0.cc (_exit): kill orphaned childs with SIGHUP and SIGCONT
- on group leader exit, kill foreground process group on session
- leader exit.
- * dirsearch.cc (closedir): check for FindFirst() was called
- * exceptions.cc: include mywinsock.h.
- (call_handler): call WSACancelBlockingCall to try to interrupt
- blocking winsock call, do PulseEvent() instead of SetEvent().
- (ctrl_c_handler): clear pending SIGCONT on stop signals, clear all
- pending stop signals on SIGCONT, suspend the thread before resuming
- to avoid W95 bug, process pending signals on SIGCONT, add signals to
- pending if the process is stopped.
- * fcntl.cc (fcntl): some code rearrangement to always do debug printfs
- on call exit.
- * hinfo.cc: include stdio.h
- (hinfo_vec::build_fhandler): always add ttynum to tty's filename
- (hinfo_vec::dup2): fix return value initialization and errno setting.
- * include/netdb.h: typedef for sig_t removed
- * include/sys/termios.h: octal constants changed to hexadecimals
- to simplify debugging.
- * misc.cc: include unistd.h and utmp.h
- (login): new
- (logout): new
- * pinfo.cc (lock_pinfo_for_update): debug printf added
- (pinfo::record_death): mark processes as orphaned on group leader
- exit.
- * select.cc (cygwin32_select): ResetEvent() removed
- * signal.cc: unneeded ResetEvents removed
- (_kill): ignore stop signals from a member of orphaned process group,
- kill self process the last on group kill.
- (sigaction): reset pending SIGCHLD when the disposition is set to
- default.
- * spawn.cc (spawn_guts): ResetEvent removed
- (cwait): do not interrupt the call
- * strerror.cc: include stdio.h, reenable disabled cases, remove
- duplicated cases, return decimal error value in the default case.
- * syscalls.cc (setsid): set process group id to process id when setsid
- called.
- (setpgid): check for negative pgid
- * syslog.cc (syslog): %m macro support added
- * termios.cc (cfg(s)eti(o)speed): new fuctions needed to support
- NIST PCTS requirements.
- * tty.cc: include utmp.h.
- (ttyslot): new
- (tty_list::terminate): fill in utmp on tty master exit
- (tty_list::allocate_tty): check for tty master pocess alive
- (create_tty_master): fill in utmp
- (do_input): restart tty output on interrupt
- (fhandler_tty_slave::fhndler_tty_slave): ttynum logic moved to
- build_fhandler.
- (fhandler_tty_slave::open): set tty's session id to sid of the calling
- process.
- (fhandler_tty_slave::write): check for TOSTOP bit
- (fhandler_tty_slave::fstat): allow access to tty to everyone
- (fhandler_tty_slave::ioctl): check for TOSTOP bit
- * tty.h: ttyslot prototype added
- * wait.cc (wait4): check for valid value of option argument added
- * winsup.h: define PID_ORPHANED, move tty_list array to the end
- of shared area.
-
-Thu Aug 14 11:42:59 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * path.cc (slash_unc_prefix_p): Correct check of path[3]. Permit
- numbers after the host name.
-
- * include/Windows32/Defines.h: Correct value for SM_CMETRICS,
- SM_CXDRAG, SM_CYDRAG, SM_CXEDGE, SM_CYEDGE, SM_CXFIXEDFRAME,
- SM_CYFIXEDFRAME, and add SM_MOUSEWHEELPRESENT.
-
-Wed Aug 13 20:11:52 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * fork.cc (cygwin_fork_helper1): If we don't have a console, pass
- DETACHED_PROCESS to CreateProcess.
- * spawn.cc (spawn_guts): Likewise.
-
-Tue Aug 12 19:51:32 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * include/Windows32/Structures.h (IMAGE_DOS_HEADER): Remove
- dos_message and nt_signature fields; they aren't present in the
- Windows header file.
-
-Wed Aug 6 16:27:13 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * include/Windows32/Structures.h: Define LPMEASUREITEMSTRUCT as a
- pointer to MEASUREITEMSTRUCT.
-
- * syscalls.cc (_stat_worker): In directory case, only set
- STD_WBITS in st_mode if FILE_ATTRIBUTE_READONLY is clear.
- (access): Remove special case for directory.
-
- * include/Windows32/Defines.h (HKEY_DYN_DATA): Define.
- (REG_FULL_RESOURCE_DESCRIPTOR): Define.
- (REG_RESOURCE_REQUIREMENTS_LIST): Define.
-
-Mon Aug 4 21:15:05 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * glob/Makefile.in: Add include of newlib/libc/sys/cygwin32 to
- explicit .c.o rule so that dirent.h is found.
-
-Thu Jul 24 02:14:24 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * cygwin.din: fpathconf, initgroups - new exports
- * console.cc: new static variable CONSOLE_SCREEN_BUFFER_INFO info
- (fhandler_console::scroll_screen): local variable info removed
- (fhandler_console::open): likewise
- (fhandler_console::ioctl): likewise
- (fhandler_console::clear_screen): likewise
- (fhandler_console::cursor_set): likewise
- (fhandler_console::cursor_rel): likewise
- (fhandler_console::cursor_get): likewise
- (fhandler_console::write_normal): fixed scroll region bug, termcap
- "cs" entry works now
- * dcrt0.cc (dll_crt0_1): set file API to use OEM charset, convert
- command line from ANSI to OEM charset.
- (_exit): clear stopsig value on process exit
- * exceptions.cc (call_handler): add one millisecond delay before
- SetEvent()
- (ctrl_c_handler): clear pending stop signals on SIGCONT, do not send
- SIGCHLD to parent on process resuming; some debug printfs added; do
- not call _exit() in a context of signal handling thread (would cause
- more harm than good); fixed a bug with SA_NOCLDSTOP flag.
- * fhandler.cc (fhandler_base::open): use full win32 path name to
- generate inode number namehash instead of unix filename.
- * fork.cc (cygwin_fork_helper1): block all signals while child and
- parent are in fork() code
- * grp.cc (initgroups): new stub added
- * include/limits.h: new posix defines added
- * include/sys/termios.h: typedef speed_t as unsigned char
- * path.cc (mount_info::conv_to_posix_path) bugfix
- * pinfo.cc (pinfo_list::operator []): PID_NOT_IN_USE check added
- (pinfo::record_death): set child's ppid to 1 on parent exit
- * signal.cc (sleep): correct return value if sleep call was
- interrupted
- (_kill): correct return value if killed pid was not found.
- (sigaction): correct return value on handling non-handlable
- signals, clear pending ignored signals
- (sigsuspend): sigsuspend call should always return -1 and set errno
- to EINTR.
- * spawn.cc: respace
- * syscalls.cc: map ERROR_NO_DATA to EPIPE instead of ENODATA
- (isatty): fixed return value
- (fpathconf): new
- (pathconf): rewritten
- (ttyname): fixed return value
- * sysconf.cc (sysconf): misc fixes
- * termios.cc (tcsendbreak): corrected errno set
- (tcdrain): likewise
- (tcflush): likewise
- (tcflow): likewise
- (tcsetattr): likewise
- (tcgetattr): likewise
- (tcgetpgrp): likewise
- (tcsetpgrp): likewise
- * tty.cc (fhandler_tty_slave::ioctl): TCGETA/TCSETA support added
- * wait.cc (_wait): wait() syscall should do not terminate if
- a child is stopped.
- (wait4): wait calls should wait childs only; fixed a bug with
- nprocinfo count; fixed signal handling.
-
-Thu Jul 24 02:10:25 1997 Geoffrey Noer <noer@cygnus.com>
-
- * uname.cc: uname now outputs Cygwin32_NT or Cygwin32_95
- instead of Cygwin32/NT or Cygwin32/95.
-
-Thu Jul 24 02:10:25 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * cygwin.din: sexecve, sexecl, sexecle, sexeclp, sexeclpe,
- sexecv, sexecp, sexecvpe - new exports
- * exceptions.cc (ctrl_c_handler): do not raise SIGHUP on
- CTRL_LOGOFF_EVENT to prevent termination of cygwin application
- run as NT service on user logoff, raise SIGHUP instead of SIGQUIT
- on system shutdown, clear stopped status in inuse_p on SIGCONT,
- set stopped status on stop signals, call _exit() on process
- termination in a context of signal thread to terminate while
- in a blocking win32 syscall.
- * exec.cc: include unistd.h and ctype.h.
- (_execve): code moved to sexecve, call sexecve with a NULL hToken
- handle.
- (sexecve): new, check path, argv[0] and envp to null values,
- pass nToken handle to spawn_guts().
- (sexecl): new (code derived from spawn family of functions in
- spawn.cc)
- (sexecle): new
- (sexeclp): new
- (sexeclpe): new
- (sexecv): new
- (sexecp): new
- (strccopy): new
- (sexecvpe): new
- * fhandler.cc (fhandler_base::fstat): add STD_RBITS and STD_WBITS
- to st_mode of non-file handles.
- (fhandler_dev_floppy::open): clear O_TRUNC bit.
- (fhandler_dev_tape::open): likewise
- * fhandler.h (fhandler_pty_master): new member pktmode (flag to
- indicate pty's packet mode)
- * fork.cc (cygwin_fork_helper1): call uinfo_init () in a child code
- to read /etc/passwd, /etc/group into memory.
- * hinfo.cc (hinfo_vec::build_fhandler): check socket names for right
- inheritance on exec().
- * include/Windows32/Defines.h: fixed a typo in LPSTR_TEXTCALLBACKA
- definition
- * include/Windows32/Functions.h: added prototype for
- ImpersonateLoggedOnUser() API call.
- * net.cc (cygwin32_socket): duplicate socket handle as inheritable
- to avoid Windows95 socket inheritance bug, close the original socket.
- (cygwin32_accept): likewise.
- * path.cc (mount_info::conv_to_win32_path): do not add trailing
- backslash to UNC device names like "\\.\a:", "\\.\tape0:" etc.
- * pinfo.cc (pinfo::record_death_nolock) set PID_WAITING_FOR_PARENT
- bit to inuse_p instead of assignment - inuse_p is a bit set now.
- (pinfo::record_death): check PID_WAITING_FOR_PARENT bit instead of
- comparison.
- * select.cc (fd_pipe_map::convert_to_unix_fdset): deal with pipe
- errors.
- (pipethread): likewise
- * shared.cc (create_shared_fd_table): allow any process to access
- shared arg, needed for sexec() family implementation
- * signal.cc (kill_worker): fixed a typo in debug printf
- * spawn.cc (spawn_guts): new hToken argument (security token of
- logged on user for sexec() calls implementation), added checks for
- zero prog_arg and argv[0], if hToken is not NULL run
- CreateProcessAsUser() on the current window station/desktop, or
- just CreateProcess() otherwise, close hToken after the process is
- created.
- (_spawnve): pass NULL hToken to spawn_guts().
- * syscalls.cc (_read): set process's read status while in a read call
- (_write): set process's write status while in a write call
- (stat_worker): if GetFileAttributes() fails, try to call fstat to
- support raw devices
- * syscalls.h: include windows.h, added sexec() family functions
- prototypes.
- * sysdef/i386/kernel32.def: ImpersonateLoggedOnUser - new export
- * tty.cc: tty attachment logic changed - tty_list::count field
- counts now number of tty opens, but not a number of processes,
- attached to a tty.
- (tty_init): do not call attach_tty() in a exec'ed process
- (attach_tty): correct return value if !use_tty.
- (tty::init): initialize pgid and hwnd fields.
- (tty_list::terminate): clearout tty on master exit.
- (tty_list::allocate_tty): fixed a bug in a tty allocation.
- (fhandler_tty_master::init): on NT allow any process to open
- tty-master process for handle duplication, create synchronisation
- events with a world-wide access, initialize winsize structure with
- a default values.
- (fhandler_tty_slave::open): if a tty doesn't have process group set,
- set it to a process group of current process.
- (fhandler_tty_slave::write): added missed \n to debug print, tty
- write synchronization moved to a more correct place.
- (fhandler_tty_slave::read): Sleep time changed for conformance with
- other sleeps.
- (fhandler_tty_slave::tcsetattr): synchronization added
- (fhandler_tty_slave::ioctl): initialize arg.winsize with a tty-stored
- value, copy the result of ioctl call to winsize.
- (fhandler_pty_master::fstat): small fix
- (fhandler_pty_master::open): on NT allow any process to open
- pty-master process for handle duplication, initialize winsize
- structure with a default values.
- (fhandler_pty_master::read): check for pipe errors, changes to support
- packet mode
- (fhandler_pty_master::ioctl): rewritten, no longer a stub.
- (fhandler_pty_master::linearize/de_linearize): save/restore pktmode
- value.
- * tty.h (class tty): winsize - new member
- * utils/ps.cc: show process status just after tty number field
- * winsup.h: defines for new bits in inuse_p added, spawn_guts()
- prototype changed.
-
-Thu Jul 24 02:10:25 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * Makefile.in: Add tty.o to link and dependency lists, add
- tty.h to headers list
- * console.cc (fhandler_console::open): save open call flags
- (fhandler_console::input_tcsetattr): clear all console modes if
- tty support enabled
- (FakeReadFile): restart read on signal delivering, changed CTRL
- macro to CONTROL to avoid conflict with sys/termios.h, copy as
- much as possible chars to output buffer instead of call to
- undo_input after every char to prevent timeouts problem.
- * cygwin.din: srandom, ptsname, grantpt, unlockpt - new exports.
- * dcrt0.cc: include tty.h, new use_tty global variable.
- (dll_crt0_1): call events_init() on application startup, set
- use_tty to FALSE if CYGWIN_NOTTY environment variable is defined,
- do not change console title if CYGWIN_NOTITLE environment
- variable set, call tty_init().
- (_exit): call tty_terminate(), events_terminate() and others
- in the right order. All modifications of console title are
- mutexed to allow tty code to obtain console window handle right.
- * exceptions.cc (exception_init): initialization of signal_arrived
- event moved to events_init().
- (call_handler): raise signal arrived event after resuming main
- thread.
- (__cygwin_exception_handler): raise signal instead of calling
- ctrl_c_handler, because exception handler is called in a context
- of the thread, caused exception, and SuspendThread in call_handler
- blocks itself :-)
- (ctrl_c_handler): clear stopsig on SIGCONT delivery, call
- ResumeThread until suspend count > 1, notify parent about child's
- status changed. Care about handling SIGCONT signal. On stop
- signals release vital mutexes used by stopped thread, save
- signal number for wait(WUNTRACED) calls, notify parent about child's
- status change. Do not stop processes running without job control
- (when pgid == 0). Ensure that main thread is unblocked before
- call _exit().
- (events_init): new
- (events_terminate): new
- * fcntl.cc (_fcntl): use saved open flags on F_GETFL/F_SETFL instead
- of game with access_ variable. Is this variable longer needed?
- * fhandler.cc (fhandler_base::linearize/de_linearize): save/restore
- openflags_ variable.
- (fhandler_base::open): save file open flags.
- * fhandler.h (fhandler_base): new openflags_ member, new member
- functions get_flags/set_flags, new virtual functions ptsname,
- dup_for_fork, tcget(set)pgrp
- (fhandler_pipe): remove always_write/except_ready because pipes
- are always write ready (not true...) and selectable on read.
- new classes fhandler_tty_slave, fhandler_pty_master,
- fhandler_tty_master
- * fork.cc (cygwin_fork_helper1): inherit control tty number on fork,
- call tty_init on child startup.
- * hinfo.cc: include stdlib.h and ctype.h.
- (hmap_init): take care on exec'ed processes.
- (init_std_file_from_handle): open /dev/tty for standard handles if
- tty usage enabled.
- (build_fhandler): check for tty slave and pty master devices.
- * include/exceptions.h: exception handler returns "int" (exception
- handling code), not "void".
- * include/termios.h: new defines, struct winsize must contain
- ws_xpixel and ws_ypixel members (commented now to avoid
- incompabilities with existing binaries. Should be uncommented in
- next release.
- * net.cc (gethostbyaddr): corrected return value
- * passwd.cc (parse): remove trailing newline from password
- lines (user's shell was reported with trailing newline before).
- * pinfo.cc (lock_pinfo_for_update): open mutex code moved to
- events_init() in exceptions.cc.
- (destroy_pinfo_lock): removed, pinfo_mutex is now closed in
- events_terminate() in exceptions.cc.
- (init_self): the initial value for pgid must be 0 (no job-controlled
- process).
- * select.cc: all debug_printf's changed to select_printf.
- (fd_pipe_map): new class to implement (polling...) select on pipes.
- (pipethread): new
- (cygwin32_select): comment out socket only case since generic
- code (select on different types of handles) works for sockets too
- but is interruptable. The case for always_ready_used is used now
- and for polling select (zero timevalue). Changes to support
- select on pipes.
- * shared.cc (shared_info::initialize): initialize tty table.
- * signal.cc (sleep/usleep/sigsuspend/pause): signal_arrived moved
- from u area to dll's address space, signal_arrived is manual reset
- event now.
- (_raise): implemented as kill (self, sig).
- (kill_worker): new. Use SendMessage instead of PostMessage to avoid
- some timing problems.
- * spawn.cc: include tty.h.
- (spawn_guts) call close_all_files() on exec, call tty_terminate()
- before process exit. Some changes due to moving signal_arrived to
- dll's address space.
- (_spawnve): inherit control tty number on spawn.
- * syscalls.cc (close_all_files): reenabled. The code is ok after
- all! The troubles were due to incorrect usage on exec() calls.
- (setsid): no longer a stub
- (ptsname): new
- * termios.cc: all syscall_printf's changed to termios_printf.
- (tcget(set)pgrp): rewritten, no longer a stub.
- * times.cc (utimes): It looks like Win32 does not allow changing
- times of directories, so just return success in this case.
- * tty.cc: new file
- (tty_init): new
- (tty_terminate): new
- (attach_tty): new
- (detach_tty): new
- (tty::init): new
- (tty_list::terminate): new
- (tty_list::connect_tty): new
- (tty_list::free_tty): new
- (tty_list::init): new
- (tty_list::allocate_tty): new
- (fhandler_tty_master::fhandler_tty_master): new
- (create_tty_master): new
- (fhandler_tty_master::init): new
- (doecho): new
- (do_input): new
- (process_input): new
- (do_output): new
- (process_output): new
- (process_ioctl): new
- (fhandler_tty_slave::fhandler_tty_slave): new
- (fhandler_tty_slave::open): new
- (fhandler_tty_slave::init): new
- (fhandler_tty_slave::close): new
- (fhandler_tty_slave::write): new
- (fhandler_tty_slave::read): new
- (fhandler_tty_slave::linearize): new
- (fhandler_tty_slave::de_linearize): new
- (fhandler_tty_slave::dup): new
- (fhandler_tty_slave::dup_for_fork): new
- (fhandler_tty_slave::fstat): new
- (fhandler_tty_slave::tcgetattr): new
- (fhandler_tty_slave::tcsetattr): new
- (fhandler_tty_slave::tcflush): new
- (fhandler_tty_slave::tcsetpgrp): new
- (fhandler_tty_slave::tcgetpgrp): new
- (fhandler_tty_slave::send_ioctl_request): new
- (fhandler_tty_slave::ioctl): new
- (fhandler_pty_master::fhandler_pty_master): new
- (fhandler_pty_master::fstat): new
- (fhandler_pty_master::open): new
- (fhandler_pty_master::close): new
- (fhandler_pty_master::write): new
- (fhandler_pty_master::read): new
- (fhandler_pty_master::tcgetattr): new
- (fhandler_pty_master::tcsetattr): new
- (fhandler_pty_master::tcflush): new
- (fhandler_pty_master::ioctl): new
- (fhandler_pty_master::ptsname): new
- (fhandler_pty_master::linearize): new
- (fhandler_pty_master::de_linearize): new
- (fhandler_pty_master::dup_for_fork): new
- (grantpt): new
- (unlockpt): new
- * tty.h: new
- * utils/ps.cc: display process's control tty number.
- * wait.cc (wait_for_single): removed.
- (wait_for_any): all code moved to wait4().
- (wait4): rescan process table on child status changes, support for
- WUNTRACED flag, avoid time races on child exit, correct return
- value on timeout.
- * window.cc: misc changes to wait creation of process's hidden
- window to avoid race conditions on multiprocessor systems.
- * winsup.h: misc changes to support all of the above.
-
-Thu Jul 24 02:10:25 1997 Geoffrey Noer <noer@cygnus.com>
-
- * net.cc (cygwin32_shutdown): New implementation to replace
- stub previously present
-
-Tue Jul 22 14:59:22 1997 Geoffrey Noer <noer@cygnus.com>
-
- * cygwin.din: remove random, srandom
- * Makefile.in: remove random/srandom-related lines
-
-Tue Jul 22 14:10:32 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * path.cc (realpath): New C function.
- * cygwin.din: Export realpath.
-
- * cygwin.din: Export srandom.
-
-Wed Jul 9 12:26:03 1997 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: libiberty random.o ends up in winsup, link
- in that obj for now
-
-Tue Jul 8 14:02:41 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * libcmain.cc (main): Pass wShowWindow field from startup info to
- WinMain.
-
-Mon Jul 7 17:47:48 1997 Geoffrey Noer <noer@cygnus.com>
-
- * path.cc: respace, reword comments
- * times.cc (utimes): add FIXME
-
-Tue Jun 24 18:31:27 1997 Geoffrey Noer <noer@cygnus.com>
-
- * winsup.h: adjust protos to reflect the above, add enum os_type
- which contains {winNT, win95, win32s, unknown}
- * security.cc (is_nt): Delete
- * syscalls.cc (windows_95): Delete
- (get_os_type): New local function which returns os_type. Replaces
- windows_95() and is_nt().
-
- * fhandler.cc: Reformat. Call get_os_type() instead of
- windows_95() and/or is_nt(), reorder so NT cases are first.
- * mmap.cc: ditto
- * net.cc: ditto
- * syscalls.cc: ditto
- * syslog.cc: ditto
-
- * uname.cc (uname): call get_os_type to fill new our_os local
- variable, check that when filling out utsname struct, default
- to i386 when we can't find out the specific Intel processor
- variant.
- * fhandler.cc (get_file_owner): remove doit variable
- (get_file_group): ditto
- * mmap.cc: extern "C" individual functions instead of wrapper
- around most of file.
- * misc.cc: minor reformat
- * heap.cc (_sbrk): split a = b = c statement into two to
- make code clearer and avoid invalid C++ casting warning during
- compile.
- * path.cc (symlink_follow): initialize syml_p and exec_p to zero
- * select.cc: respace
- (selectthread): cast first arg of WINSOCK_FD_SET
- * ntea.cc (NTReadEARaw): add missing casts in front of malloc calls
- * utils/mount.cc: remove mixed option since that hasn't been
- supported for quite some time
-
-Sun Jun 22 17:27:03 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * include/windows.h: If RC_INVOKED is defined, don't include
- limits.h, stdarg.h, Structures.h, Functions.h or Sockets.h, and
- don't typedef BOOL.
- * include/Windows32/Base.h: Don't do any typedefs if RC_INVOKED is
- defined.
-
- * include/Windows32/Sockets.h (MAXHOSTNAMELEN): Don't define if
- already defined.
- * include/sys/param.h (MAXHOSTNAMELEN): Likewise.
-
-Fri Jun 20 11:06:09 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * include/sys/wait.h: correct operator precidence bug
- in WIFSIGNALED
-
-Thu Jun 19 12:58:45 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- Handle unblocked pending signals on sig_mask changes
- * exceptions.cc (return_handler): renamed to set_process_mask
- (set_process_mask): new; use to set process mask instead of direct
- u->self->sig_mask manipulations.
- * winsup.h: rename return_handler proto to set_process_mask
- * signal.cc: throughout file, call set_process_mask() instead of
- direct manipulations of u->self->sig_mask.
- (pause): new
- * cygwin.din: add pause() export
- * syscalls.cc (system): correct return value
-
-Wed Jun 18 22:01:56 1997 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: add $(srcdir)/../newlib/libc/sys/cygwin32 to
- the list of includes since that's where sys/dirent.h is
- supposed to live
- * include/sys/dirent.h: moved to newlib/libc/sys/cygwin32/sys
-
-Wed Jun 18 13:56:47 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * signal.cc (sigsuspend): deal with pending unblocked signals
- * winsup.h: add proto for return_handler (sigset_t)
-
-Wed Jun 18 02:02:13 1997 Geoffrey Noer <noer@cygnus.com>
-
- respaced console.cc, fhandler.cc, syscalls.cc, pinfo.cc,
- fork.cc, spawn.cc
-
-Tue Jun 17 14:57:09 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * cygwin.din: add getpgid, killpg exports, delete duplicate
- random export
- * fork.cc (cygwin_fork_helper1): inherit pgid and sid on fork
- * misc.cc (cygwin32_*env): save environ value in __cygwin_environ
- too. Is __cygwin_environ variable really neccessary? Why not
- export cygwin.dll's environ variable with "__cygwin_environ" name?
- * pinfo.cc (pinfo::init_self): initialize pgid and sid
- * signal.cc (kill_worker): new
- (_kill): rewritten to support process groups
- (killpg): new
- * spawn.cc (_spawnwe): inherit pgid and sid on spawn family calls
- * stubs.cc (setpgrp, getpgrp): remove stubs
- * syscalls.cc (setpgid, getpgid, setpgrp, getpgrp): new
- * termios.cc (setpgid): remove stub
- * utils/ps.cc (main): add pgid to output, change output
- format
- * wait.cc (wait_for_any): add intpid argument, arrays ctable and
- ptable have now fixed MAXIMUM_WAIT_OBJECTS size to avoid extra
- scan of process table, changes for process groups support.
- (wait4): misc changes to support process groups
- * winsup.h (pinfo class): add new variables pgid, sid.
- Define __cygwin_environ.
-
-Mon Jun 16 18:30:21 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * spawn.cc (spawn_guts): set child->hProcess and child->hThread,
- CloseHandle on pi.hThread at end of spawn_guts instead of right
- after starting the child process,
- _P_WAIT needs to be handled separately from _P_OVERLAY
-
-Sun Jun 15 23:51:10 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * cygwin.din: remove setenv/getenv-related exports,
- export cygwin32_ equivalents
- * exec.cc: check ?
- * misc.cc (cygwin32_getenv): new
- (cygwin32_putenv): new
- cygwin32_setenv): new
- (cygwin32_unsetenv): new
- * spawn.cc: call cygwin32_getenv instead of getenv,
- call spawn with *u->envptr instead of environ
- * winsup.h: define **environ as extern, define *cygwin32_getenv
-
-Sun Jun 15 20:51:09 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * Makefile.in: add ../libiberty/random.o to EXTRA_OFILES
- * cygwin.din: remove exports of tgetent and _tgetent, added random
- * exception.cc (exceptions_init): make OurThread handle
- noniherittable, remove unused buf array.
- (return_handler): add restmask argument (sig_mask value before
- calling signal handler)
- (call_handler): save sig_mask in user's stack before calling signal
- handler, change PulseEvent() call to SetEvent() -- there were
- losses of signal_arrived events if main thread was not in wait
- state.
- (ctrl_c_handler): add support for SIGIO signal.
- * fhandler.cc (fhandler_base::linearize/delinearize):
- save/restore async_ flag
- (fhandler_base::fhandler_base): clear async_ flag
- * fhandler.h: add async_ as new variable in fhandler_base,
- add get_async/set_async functions
- * misc.cc (tgetent): remove stub
- * net.cc (fhandler_socket::write): raise SIGPIPE if write to
- disconnected socket.
- (cygwin32_accept): check the result of find_unused_handle() before
- accept() call, set errno if no more file descriptors available.
- (fhandler_socket::ioctl): add support for async I/O on sockets
- * pinfo.cc (pinfo::clearout): clear sig_pending mask
- * syscalls.cc (readv, writev): rewrite
- * window.cc (WndProc): add support for async I/O
- * winsup.h: define WM_ASYNCIO
-
-Mon Jun 9 18:51:09 1997 Geoffrey Noer <noer@cygnus.com>
-
- * include/winsock.h: fix protection wrapper name
-
-Fri Jun 6 12:41:09 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * include/Windows32/Defines.h: Define CommonDlgExtendedError
- return values (CDERR_*, PDERR_*, CFERR_*, FNERR_*). Define
- TEXTMETRIC tmPitchAndFamily values (TMPF_*).
-
- * include/dlgs.h: New file; just includes windows.h.
- * include/cderr.h: Likewise.
-
- * libcmain.cc (main): Don't pass the program name to WinMain.
-
- * cygwin.din: Export strlwr and strupr.
-
- * include/winreg.h: New file; just includes windows.h.
- * include/winsock.h: New file; just includes windows.h and
- Windows32/Sockets.h.
- * include/Windows32/Sockets.h: Don't define u_char, et. al. if
- _SYS_TYPES_H is defined. Undefine fd_set if it is defined.
-
- * include/Windows32/Functions.h: Define MoveMemory, FillMemory,
- and ZeroMemory as macros.
-
- * times.cc (_timezone, _daylight, _tzname): New global variables.
- (tzset): New function.
- * cygwin.din: Don't set _timezone to timezone. Export tzset and
- _tzset. Export _timezone, _daylight, and _tzname.
-
- * dcrt0.cc (__cygwin_environ): New global variable.
- (dll_crt0_1): Set __cygwin_environ to environ.
- * cygwin.din: Export __cygwin_environ.
-
-Thu Jun 5 17:52:02 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * times.cc (gettimeofday): Check return values and set tz_dsttime
- correctly.
-
-Wed Jun 4 00:04:33 1997 Geoffrey Noer <noer@cygnus.com>
-
- * fhandler.cc (fhandler_pipe::lseek): new virtual function
- * fhandler.h: add lseek to fhandler_pipe class
-
-Tue Jun 3 19:20:47 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * include/Windows32/Defines.h (IMAGE_DOS_SIGNATURE): Define.
- (IMAGE_NT_SIGNATURE): Define.
- * include/Windows32/Structures.h (IMAGE_DOS_HEADER): Define.
-
-Tue Jun 3 13:05:26 1997 Geoffrey Noer <noer@cygnus.com>
-
- * console.cc: respace
- * fhandler.h: add virtual off_t lseek to fhandler_socket and
- fhandler_tty defs, respacing
-
-Mon Jun 3 12:21:20 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * cygwin.din: export wait3, wait4
- * dcrt0.cc (_exit): call fill_rusage
- * exceptions.cc (ctrl_c_handler): increment rusage_self.ru_nsignals++
- * fhandler.cc (fhandler_pipe::fhandler_pipe): new stub
- * fhandler.h: add fhandler_pipe class
- * hinfo.cc (hinfo_vec::build_fhandler): call
- GetNumberOfConsoleInputEvents instead of GetConsoleScreenBufferInfo,
- handle fhandler_pipe class
- * pinfo.cc: include sys/resource.h,
- (pinfo::clearout): erase memory associated with rusage_self
- and rusage_children
- * resource.cc (getrusage): rewrite
- (add_timeval): new helper function
- (add_rusage): new helper function
- (fill_rusage): new helper function
- * shared.cc (create_shared_fd_table): pass file mapping handle to
- children letting them close it
- * spawn.cc (spawn_guts): call fill_rusage and add_rusage as
- appropriate
- (cwait): ditto
- * times.cc (__to_clock_t): add flag arg which says whether or not
- to substract FACTOR from total
- (times): also fill in tms_cstime and tms_cutime, add flag arg to
- __to_clock_t calls
- (totimeval): add extra flag passed on to __to_clock_t
- (gettimeofday): add extra flag passed on to totimeval
- * wait.cc (wait_for_single): add extra rusage arg, change
- wait_found calls to account for extra arg
- (wait_for_any): ditto
- (_wait): call wait4 instead of waitpid
- (wait_found): add rusage arg, deal with it calling add_rusage as
- appropriate
- (wait_pid): now just calls wait4
- (wait4): was wait_pid but adds extra rusage arg and deals with it
- (wait3): new, calls wait4
- * winsup.h: include sys/resource.h, add rusage_self and
- rusage_children to pinfo class, fix totimeval proto, add protos
- for fill_rusage and add_rusage
- * passwd.cc: include termios.h
- (getpass): new
- * stubs.cc (getpass): delete old stub
-
-Tue Jun 3 14:51:47 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * times.cc (ftime): New function.
- * cygwin.din: Export ftime.
-
-Mon Jun 2 14:34:00 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * include/limits.h: NGROUPS_MAX should be 0
- * include/asm/socket.h: add missing additional options
- including SO_SNDBUF, SO_RCVBUF, et al
- * include/sys/wait.h: include sys/resource.h, add protos for
- wait3() and wait4().
-
-Mon Jun 2 15:26:35 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * utils/configure.in: Call AC_PROG_INSTALL.
- * utils/configure: Rebuild.
-
-Mon Jun 2 11:44:14 1997 Geoffrey Noer <noer@cygnus.com>
-
- * grp.cc (getgroups): new
- * cygwin.din: export getgroups
-
-Fri May 30 16:47:38 1997 Geoffrey Noer <noer@cygnus.com>
-
- * uname.cc (uname): completely rewrite, using more of the
- SYSTEM_INFO struct to figure out information (now x86 type is
- set correctly in Windows 95.
- * version.h: increment CYGWIN_DLL_VERSION_MINOR
- * include/Windows32/Structures.h: SYSTEM_INFO struct's first
- member is dwOemId, not dwOemID according to MS docs
-
-Fri May 30 16:47:38 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * window.cc: new file
- * Makefile.in: add window.cc to lists of source, object files,
- and dependencies.
- * console.cc: include <stdlib.h>, scroll_screen() added to
- fhandler_console class,
- add support for default screen attributes,
- (open): set default_color on tty open
- (linearize/delinearize): pass default_color to the child process
- (clear_screen): fix Win95-specific bug, add support for
- default_color.
- (clear_to_eol): remove
- (fhandler_console::fhandler_console): set default_color to
- white on black
- (char_command): add invisible screen attribute, misc changes
- (FakeReadFile): do not convert AltGr-char to ESC-char sequence
- to support international keyboards.
- * cygwin.din: export setitimer, getitimer
- * dcrt0.cc (dll_crt0_1): add call to window_init(), uppercase
- environment vars only if started by a win32 process.
- (_exit): add call to window_terminate()
- * fhandler.cc: add mode argument to open() calls,
- (fhandler_base::open): do not check for symlink in path_conv
- calls, calls to set/get_file_attribute() instead of NTRead/WriteEA.
- (fhandler_base::fstat): use get_file_attribute if possible
- (fhandler_disk_file::open): remove unneeded unixattr checks
- * fhandler.h: changes to support above.
- * fork.cc (cygwin_fork_helper_1): pass umask value to the child,
- call window_init() in child
- * ntea.cc: enable EA calls, add FILE_FLAG_BACKUP_SEMANTICS
- to CreateFile calls to support EA of directories.
- * path.cc (symlink): add mode argument to _open call, remove
- unneeded stuff
- (symlink_check_worker): add checks for "system" attribute and EA.
- * security.cc (get/set_file_attribute): new. Calls EA code now,
- placeholders for NTFS security support.
- * signal.cc (alarm): remove in favor of new implementation in
- window.cc
- (RemoteThread): remove
- (_kill): use window messages to emulate signals on both NT and Win95
- * spawn.cc (spawn_guts): call window_terminate on exec()
- (cwait): correct return result code
- (_spawnve): add umask inheritance, some bug fixes
- * syscalls.cc (_open): add mode argument, umask support
- (umask): rewritten
- (chmod): try to set file attributes, set system bit on symlinks
- (stat_worker): fix nlinks of directories, add mode argument
- to _open() call.
- * syscalls.h: add mode argument to _open() prototype
- * winsup.h: changes to support above
-
-Tue May 27 12:22:19 1997 Geoffrey Noer <noer@cygnus.com>
-
- * times.cc (gettimeofday): return 0 on success instead of 1
- (utimes): init res to 0
-
-Wed May 21 11:29:24 1997 Geoffrey Noer <noer@cygnus.com>
-
- * include/limits.h: define NGROUPS_MAX
-
-Tue May 20 14:13:59 1997 Geoffrey Noer <noer@cygnus.com>
-
- * passwd.cc: rename function setpwend to setpwent (typo)
- * cygwin.din: ditto, also remove name__C9type_info from
- exports list.
-
-Wed May 14 17:38:39 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * signal.cc (sleep): call WaitForSingleObject instead of Sleep
- (usleep): ditto
-
-Wed May 7 15:34:07 1997 Geoffrey Noer <noer@cygnus.com>
-
- Public gnu-win32 beta 18 release made
-
-Sun May 4 15:34:07 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from Mikey <jeffdb@netzone.com>:
- * console.cc (FakeReadFile): FlushConsoleInputBuffer if
- flags & ENABLE_LINE_INPUT and then return ReadFile
-
-Fri May 2 10:53:10 1997 Geoffrey Noer <noer@cygnus.com>
-
- * signal.cc: make exported functions extern "C"
- * include/cygwin32/socket.h: replace values assigned to
- IP_ definitions with ones suitable for use with WinSock.
- * cygwin.din: add exports for sigpending, sigsuspend, remove
- exports for __9type_infoPCc and before__9type_infoRC9type_info
- * winsup.h: remove signal-related protos from winsup.h in favor
- of newlib/libc/include/sys/signal.h
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * signal.cc: (sigpending) new
- (sigsuspend): new
- * utils/termcap: replace with one from Linux
-
-Tue Apr 29 19:03:29 1997 Geoffrey Noer <noer@cygnus.com>
-
- * utils/ps.cc: print Win32 pid as unsigned int so Windows 95
- pids don't show up as negative values
-
-Tue Apr 29 17:20:57 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * spawn.cc (spawn_guts): allocate new cygwin PID for a child
- created with spawn(!_P_OVERLAY)
-
-Tue Apr 29 13:24:59 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * console.cc: assorted console fixes
- * select.cc (fd_socket_map::convert_to_unix_fdset): only
- do full debug_printf if used_ valid
- * exceptions.cc: correct constants used for checking size of
- stack (should be negated)
- * fhandler.cc (fhandler_base::open): fix syscall_printf typo
-
- patch from marcus@cathcart.sysc.pdx.edu (Marcus Daniels):
- * include/sys/mman.h: define MAP_ANON MAP_ANONYMOUS (typo fix)
-
-Mon Apr 28 15:19:44 1997 Geoffrey Noer <noer@cygnus.com>
-
- * cygwin.din: remove libgcc2.a internal functions
-
-Mon Apr 28 14:57:04 1997 Michael Meissner <meissner@cygnus.com>
-
- * cygwin.din (before__9type_infoRC9type_info): Remove, the
- type_info::before(type_info const &) function no longer seems to
- exist.
-
-Mon Apr 28 14:19:44 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * console.cc (undo_input): new
- (scroll_screen): new
- (fhandler_console::output_tcsetattr): fix debug printf
- (fhandler_console::input_tcsetattr): no longer call set_w_binary
- (fhandler_console::cursor_get): fix base_chars
- (fhandler_console::char_command): make savex, savey globals,
- add char buf, add code to handle clears better, many other
- additions
- (fhandler_console::write_normal): assorted fixes
- (fhandler_console::write): move screen scroll code to
- scroll_screen(), support Reset Linux terminal, Restore cursor
- position, Save cursor position, Skip orig_colors
- (FakeReadFile): enlarge keytable to include shift/control/alt
- values
- Command set still missing set pelette, character sets, and
- UTF codes.
-
-Mon Apr 28 12:19:44 1997 Geoffrey Noer <noer@cygnus.com>
-
- * fhandler.cc (fhandler_base::open): only include
- FILE_SHARE_DELETE in shared when running NT (Win 95 doesn't
- support it).
-
-Thu Apr 24 18:57:21 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from Jeremy Allison <jra@cygnus.com>:
- Correct problem caused by setting /dev/null fd to -1 which is
- same as INVALID_HANDLE_VALUE.
- * fhandler.h: set DEV_NULL_HANDLE_VALUE to -2
- * fhandler.cc (fhandler_dev_null::open): set handle to
- DEV_NULL_HANDLE_VALUE instead of INVALID_HANDLE_VALUE
- * hinfo.cc (hinfo_vec::build_fhandler): add case for
- handle == (HANDLE) DEV_NULL_HANDLE_VALUE
-
-Thu Apr 24 15:12:13 1997 Geoffrey Noer <noer@cygnus.com>
-
- * fhandler.cc (fhandler_base::write): catch return of raw_write
- and return -1 if it failed
-
-Thu Apr 24 10:42:01 1997 Geoffrey Noer <noer@cygnus.com>
-
- path.cc (symlink): restore chmod call for now since the NTEA code
- isn't quite up to the task yet.
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * exceptions.cc (ctrl_c_handler): corrections to Apr 18 patch
- * fhandler.cc: ditto
- * dcrt0.cc (dll_crt0_1): move console title setting code,
- set up default signal handlers
- * fork.cc (cygwin_fork_helper1): also set child->sigs and
- child->sig_mask
- * spawn.cc (spawn_guts): if mode _P_OVERLAY, set up child
- signal handlers.
-
-Mon Apr 21 22:29:49 1997 Geoffrey Noer <noer@cygnus.com>
-
- * include/Windows32/ASCIIFunctions.h: remove old def of
- GetEnvironmentStringsA, add new one based on def from Functions.h
- * include/Windows32/Functions.h: define GetEnvironmentStrings as
- GetEnvironmentStringsA when not unicode, remove definition of
- GetEnvironmentStrings in favor of ones in ASCIIFunctions.h and
- UnicodeFunctions.h
- * include/Windows32/Defines.h: add missing XTYP_ definitions,
- change value of XTYPF_NOBLOCK to 0x0002 from 0x2
- * include/Windows32/Sockets.h: comment out redefinitions of
- errno.h-type constants since MS doesn't define them and we
- have our own in errno.h
-
-Fri Apr 18 10:40:30 1997 Geoffrey Noer <noer@cygnus.com>
-
- * include/Windows32/Structures.h: add typedefs for
- LPDLGITEMTEMPLATE, PDLGITEMTEMPLATE.
- * include/Windows32/Defines.h: define FW_REGULAR FW_NORMAL
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * exceptions.cc (ctrl_c_handler): do not reset signal
- handler to SIG_DFL while processing the signal, instead
- block the signal while handler executes.
- * signal.cc (_raise): fixes related to the above
-
-Thu Apr 17 23:50:50 1997 Geoffrey Noer <noer@cygnus.com>
-
- * path.h: increase path length in mount table to MAX_PATH
- in size instad of 30. This will increase cygwin.dll memory
- usage by 20K. We need to remove static allocations from
- path code.
-
-Thu Apr 17 10:11:50 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * exceptions.cc (ctrl_c_handler): CTRL_CLOSE_EVENT should
- generate SIGHUP instead of SIGQUIT
- * signal.cc (_raise): rewrite
-
-Wed Apr 16 10:42:46 1997 Geoffrey Noer <noer@cygnus.com>
-
- * version.h: increment CYGWIN_DLL_VERSION_MINOR
- * syscalls.cc (system): use spawnvp instead of fork/exec
- * ntea.cc: make all functions return false for now; they
- were causing an obscene performance hit
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * console.cc (FakeReadFile): patch to support EINTR, EIO
- * exceptions.cc: add support for return_handler, remove
- control-C counter
- (return_handler): new
- (ctrl_c_handler): handle SIGCHLD, other assorted fixes
- * fhandler.cc (fstat): reset errno to 0
- * passwd.cc (search_for): correct location of a debug printf
- * select.cc: patches to handle signals better, respacing
- * signal.cc (_raise): misc fixes
- (_kill): call OpenProcess with PROCESS_ALL_ACCESS instead of
- PROCESS_TERMINATE
- * spawn.cc: more signal fixes
- * syscalls.cc: add two new errors to errmap[]
- (_stat_worker): fill out buf struct when stating directories
- * wait.cc (wait_for_single): use INFINITE instead of large value
- for timeouts
- (wait_for_any): init nprocinfo to 1, not 0, other small fixes
- * winsup.h: add signal_arrived to per_process class, reduce
- amount of reserved space, add sig_pending to pinfo class
-
-Tue Apr 15 17:01:34 1997 Geoffrey Noer <noer@cygnus.com>
-
- * utils/mkpasswd.c: change default shell to /bin/sh
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * utils/kill.cc: support sending numbered signals using
- signal code instead of just calling TerminateProcess
-
-Tue Apr 15 15:24:55 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * utils/Makefile.in (INSTALL): Set to @INSTALL@.
- (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
- (INSTALL_DATA): Set to @INSTALL_DATA@.
- (INSTALL_XFORM): Remove.
- (install): Depend upon installdirs. Use $(program_transform_name)
- directly, rather than using $(INSTALL_XFORM).
- (installdirs): New target.
-
-Mon Apr 14 16:32:05 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * utils/Makefile.in (INSTALL): Change install.sh to install-sh.
-
-Mon Apr 14 12:33:22 1997 Geoffrey Noer <noer@cygnus.com>
-
- * registry.cc: change key name to "Cygnus Solutions" instead
- of "Cygnus Support"
- * security.cc: don't include windows.h, already in winsup.h
- * Makefile.in: add dependencies section entries for security.cc
- and ntea.cc
-
-Fri Apr 11 00:03:49 1997 Geoffrey Noer <noer@cygnus.com>
-
- * dcrt0.cc: add harmless cast to FreeEnvironmentStrings call
- * registry.cc: added more presumed-harmless casts
- * shared.cc: and another, and respacing
- * utils/Makefile.in: don't need to link with -lkernel32 since it's
- included automatically
- * fhandler.cc: fhandler_console and FakeReadFile moved to
- console.cc, stop including sys/stat.h, sys/param.h, sys/types.h,
- stdio.h, ctype.h, pwd.h, grp.h, stdlib.h
- reordered/respaced code so now we have all of fhandler_base, then
- all of fhandler_disk_file, then all of fhandler_tty, etc...
- (fhandler_base::ioctl): delete unused switch statement
- * console.cc: added fhandler_console and FakeReadFile from
- fhandler.cc, add includes necessary for this code
- * grp.cc, Makefile.in: fix copyright dates
- * ntea.cc: include string.h
-
-Thu Apr 10 22:00:43 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * path.cc (symlink): do NTWriteEA instead of chmod using same
- flags
-
-Thu Apr 10 17:36:43 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from gunther.ebert@ixos-leipzig.de (Gunther Ebert):
- * Makefile.in: add libnetapi32.a to DLL_IMPORTS list, build security.o
- * fhandler.cc (get_file_owner): new
- (get_file_group): new
- (fhandler_base::fstat): do another path_conv and check for error,
- use get_file_owner and get_file_group to set buf->st_uid and
- buf->st_gid
- * fhandler.h: add protos for get_file_owner() and get_file_group()
- * grp.cc (add_grp_line): new helper function
- (read_etc_group): new helper function
- (getgrgid): rewritten, no longer a stub
- (getgrnam): rewritten, no longer a stub
- (endgrent): rewritten, no longer a stub
- (getgrent): rewritten, no longer a stub
- * include/Windows32/ASCIIFunctions.h, include/Windows32/Base.h,
- include/Windows32/Functions.h, include/Windows32/Defines.h,
- include/Windows32/Structures.h, include/Windows32/UnicodeFunctions.h:
- misc security/uid-related additions
- * passwd.cc (add_pwd_line): new
- (read_etc_passwd): new
- (search_for): rewrite
- (setpwend): rewritten, no longer a stub
- (getpwent): rewritten, no longer a stub
- (endpwent): rewritten, no longer a stub
- * security.cc: new file
- (get_world_sid): new
- (world_full_access): new
- (get_id_from_sid): new
- (is_nt): new
- * stubs.cc (endgrent): remove
- (getgrent): remove
- * syscalls.cc (rel2abssd): new
- (set_process_privileges): new
- (chown): now implemented for real for NT, still a stub in Win95
- (_stat_worker): use get_file_owner and get_file_group to set
- buf->st_uid and buf->st_gid
- * uinfo.cc: add protos for read_etc_passwd, read_etc_group
- (uinfo_init): call read_etc_passwd(), read_etc_group()
- * utils/Makefile.in: build mkpasswd, mkgroup
- * utils/mkgroup.c: new, use to make an /etc/group file
- * utils/mkpasswd.c: new, use to make an /etc/passwd file
- * winsup.h: add protos for is_nt(), get_id_from_sid()
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * Makefile.in: build ntea.o
- * dcrt0.cc (dll_crt0_1): move console title code here from spawn_guts
- * exceptions.cc (ctrl_c_handler): small signal fixes, prepare
- things so we can eventually reset the signal handler to SIG_DFL
- * fhandler.cc (fhandler_disk_file::open): first check for EA info
- about exec/symlink status before doing it the hard way
- (fhandler_make_pipe): u->self->hmap.build_fhandler takes extra arg
- (fhandler_base::open): make use of NTEA
- * fhandler.h: remove init_std_file_from_handle, build_fhandler
- protos
- * hinfo.cc: include mywinsock.h and sys/socket.h, define
- __INSIDE_CYGWIN_NET__, __INSIDE_CYGWIN32__
- (hinfo_vec::build_fhandler): takes an additional handle arg,
- call GetConsoleScreenBufferInfo with it to see if are
- fhandler_console, call GetCommState with it to see if we're
- an fhandler_tty, call getpeername with it to see if we wamt
- fhandler_socket. Old determining methods still work too.
- * path.cc (symlink): chmod file to ((S_IFLNK) | (STD_RBITS) |
- (STD_WBITS) | (STD_XBITS)) permissions
- * select.cc: include stdio.h
- (cygwin32_select): fix typo (missing an &),
- assorted fixes for mixed socket/handles case
- * shared.cc (create_shared_fd_table): set sa.bInheritHandle to 1
- to support reparenting
- * signal.cc (_kill): add FIXME, cleanup return codes
- * spawn.cc (spawn_guts): remove console title code, add code
- to support reparenting of child processes
- * syscalls.cc: add new third arg to hmap.build_fhandler calls
- (chmod): make use of NTWriteEA
- * ntea.cc: new file, NTEA handling routines
- * times.cc: fix value of NSPERSEC
- (utimes): fix return value
- * wait.cc: changes to support reparenting, change INFINITE to
- constant 500 to avoid "blocking win32 syscalls and signals"
- problem
- * winsup.h: add NTReadEA, NTWriteEA protos, define REPARENTING,
- fix build_fhandler proto to add new arg, add handles hrProcess and
- hrThread
-
-Tue Apr 9 00:25:33 1997 Geoffrey Noer <noer@cygnus.com>
-
- * libcerr.cc: remove fixed size of sys_errlist array, figure out
- sys_nerr from the sizeof the array rather than hard coding it.
- * shared.cc (open_shared_file_map): add typecast
- * signal.cc (_kill): SIGKILL should avoid exception handler
- * fork.cc (cygwin_fork_helper1): don't call ExitProcess with a
- negative arg on recreate_mmaps_after_fork failure
- * include/Windows32/Defines.h: define VER_PLATFORM_WIN32_WINDOWS
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * dcrt0.cc: move reent_data from private address space to cygwin.dll
- * fork.cc: copy parent's reent_data to the child
- * cygwin.din: export reent_data
- * winsup.h: add as public struct _reent reent_save to pinfo class
-
- another patch from sos@prospect.com.ru (Sergey Okhapkin):
- * winsup.h: add ctrl_c_handler prototype
- * exceptions.cc (init_exceptions): don't use u->self->hThread
- since for a spawned process, this contains thread id of parent
- Win32 process, not the child's. Instead use GetCurrent* funcs
- to get thread handle.
- (ctrl_c_handler): add more signal support, especially for kill
- * signal.cc (_kill): more signal support, using CreateRemoteThread
- under NT. Win95 only supports SIGKILL since it doesn't have this
- call.
- * syscalls.cc (windows_95): first version check should be an &
- of 0x80000000 instead of 0x8000000
- (close_all_files): hmap[i] doesn't always exist, for now comment
- out code
-
- patch from marcus@sysc.pdx.edu (Marcus Daniels):
- * path.cc (skip_n_slashes): new local function
- (symlink_check_worker): new local function, used to be symlink_check
- (symlink_check): calls symlink_check_worker and returns
- whether path is a symlink or not.
- (symlink_expand): new local function, expand a symlink into
- a file or directory path using symlink_check_worker
- (path_conv::path_conv): takes extra follow_mode arg
- (symlink_follow): call symlink_expand
- * fhandler.cc, syscalls.cc: fix path_conv references
- * path.h: fix path_conv prototype
-
-Mon Mar 24 19:44:28 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * select.cc: fix Feb 19 patch to select
- * syscalls.cc: add statfs() and fstatfs() calls
- * include/sys/vfs.h: new header file to support these
- * cygwin.din: add them to dll export list
-
-Tue Mar 18 18:10:24 1997 Geoffrey Noer <noer@cygnus.com>
-
- * dcrt0.cc: change idata3 asm section to have five null fields
- instead of eight to conform to how MS does this section.
-
-Sun Mar 9 13:10:55 1997 Geoffrey Noer <noer@cygnus.com>
-
- * include/sys/resource.h: add missing struct members to rusage struct
- * resource.cc: added setting of missing fields, mostly to 0 until
- we investigate how to set correct values.
-
-Wed Feb 19 17:44:06 1997 Jeremy Allison <jra@cygnus.com>
-
- * select.cc: Added fixes from sos@prospect.com.ru (Sergey Okhapkin)
- to implement blocking select on sockets/handles. This isn't
- the way I finally want to do this, but I won't get chance
- to do the re-write for a month or two so...
- * include/Windows32/Defines.h: Added defines for NT ACL
- stuff.
-
-Tue Feb 18 12:28:11 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * fhandler.cc: support reverse index escapes in console code
-
-Fri Feb 14 18:55:01 1997 Jeremy Allison <jra@cygnus.com>
-
- * path.cc: Fixed normalize_posix_path() so that double slashes
- are removed, except for those starting a UNC path. The command
- ls .///////FILE_IN_DIRECTORY works now.
-
-Thu Feb 13 14:06:04 1997 Geoffrey Noer <noer@cygnus.com>
-
- * path.cc: remove SLASH_P define and
- * winsup.h: define it here instead
- patch from scottk@utig.ig.utexas.edu (Scott Kempf):
- dirsearch.cc (opendir): fix problem with accessing "/"
-
-Mon Feb 10 13:57:11 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * misc.cc: replace nice () stub with Win32 implementation
- * spawn.cc
- * fork.cc: use priority returned by GetPriorityClass
-
-Wed Feb 5 16:56:23 1997 Geoffrey Noer <noer@cygnus.com>
-
- * fhandler.cc, syscalls.cc: minor reformat
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * spawn.cc: set console title to reflect what's running
- * winsup.h: TITLESIZE define added
-
-Mon Feb 3 16:53:10 1997 Geoffrey Noer <noer@cygnus.com>
-
- * fhandler.h: fix typo
- * fhandler.cc: check_execable_p should only take one arg now
-
-Mon Feb 3 16:16:39 1997 Jeremy Allison <jra@cygnus.com>
-
- * fhandler.cc: Removed open_helper, turned it into
- fhandler_base::open and added fhandler_disk_file::open. More
- correct C++.
- fhandler_disk_file: Moved check_execable_p into fhandler_disk_file.
- tty ports are now closed correctly.
- * fhandler.h: Changes to support the above.
-
-Fri Jan 31 19:14:34 1997 Geoffrey Noer <noer@cygnus.com>
-
- * fhandler.cc (fhandler_base::open_helper): new function
- containing the common open() code. symlink and executable
- status defaults to 0.
- (fhandler_tty::open): new function that calls
- fhandler_base::open_helper
- (fhandler_base::open): remove common code now in open_helper,
- leaving symlink checking and executable checking
- * fhandler.h: changes for the above, open_helper is protected
-
-Thu Jan 30 15:23:15 1997 Geoffrey Noer <noer@cygnus.com>
-
- * hinfo.cc: also treat com3 and com4 as special files
- * spawn.cc (spawn_guts): check return of WaitForSingleObject
- in _P_WAIT case, some reformatting
-
-Tue Jan 28 10:46:16 1997 Jeremy Allison <jra@cygnus.com>
-
- * net.cc: Added errors "WSAEINVAL", "WSAEFAULT" as these
- can be returned for net calls.
- * fhandler.cc: Added FILE_SHARE_DELETE to open share modes.
- Much closer to POSIX on NT now (ignored on '95).
-
-Fri Jan 17 13:32:26 1997 Geoffrey Noer <noer@cygnus.com>
-
- * configure.in:
- * utils/configure.in: define LIB_AC_PROG_CC to get around
- autoconf 1.12 problem. Invoke it instead of AC_PROG_CC.
- * configure:
- * utils/configure: regenerate
-
-Thu Jan 16 12:35:41 1997 Geoffrey Noer <noer@cygnus.com>
-
- * mmap.cc: added missing copyright notice
-
-Tue Jan 14 12:51:12 1997 Jeremy Allison <jra@cygnus.com>
-
- * cygwin.din: Added get_osfhandle, cwait and all the
- spawn functions.
- * exec.cc: Added include of process.h. Changed call to
- spawn_guts to add extra parameter.
- * libcerr.cc: Added extra error messages. Ensured
- messages start at zero.
- * spawn.cc: Changed spawn_guts to do wait and nowait
- calls. Added all spawn functions.
- * syscalls.cc: Added get_osfhandle.
- * winsup.h: Removed incorrect spawn definitions,
- corrected prototypes for spawn_guts and file_exists
- calls.
- * include/io.h: New file. Added for get_osfhandle.
-
-Thu Jan 9 14:20:01 1997 Jeremy Allison <jra@cygnus.com>
-
- * exceptions.h: Moved from winsup to winsup/include.
- * include/mywinsock.h: Added getprotobynumber and
- getservbyport.
- * Makefile.in: Moved exceptions.h dependency.
- * cygwin.din: Added cygwin32_getprotobynumber and
- cygwin32_getservbyport.
- * net.cc: Added cygwin32_getprotobynumber and
- cygwin32_getservbyport.
-
-Wed Jan 8 14:15:35 1997 Jeremy Allison <jra@cygnus.com>
-
- * fhandler.cc: Fix from Scott Kempf (scottk@rimu.ig.utexas.edu)
- to ensure creation_disposition is set correctly in open.
-
-Fri Jan 3 12:10:22 1997 Jeremy Allison <jra@cygnus.com>
-
- * fork.cc: Added parameter to recreate_mmaps_after_fork
- in child, and added set_child_mmap_ptr() call in parent.
- Needed as cygwin.dll statics are not copied accros a fork.
- * mmap.cc: Added parameter to recreate_mmaps_after_fork,
- added set_child_mmap_ptr() call.
- * winsup.h: Added mmap_ptr to pinfo struct. Removed obsolete
- comments.
- * Makefile.in: Added -I../libio, needed to rebuild source
- using STL. Also added -nostdinc++ on recommendation of
- Mike Stump (mrs@cygnus.com).
-
-Thu Jan 2 17:23:10 1997 Jeremy Allison <jra@cygnus.com>
-
- * dcrt0.cc: Added a call to initialize winsock on app
- init.
- * fork.cc: Added call so child initializes winsock before
- returning from the fork. This makes many network daemons
- run correctly that did not before (apache soon...).
- * net.cc: Removed calls to checkinit, this is now done on
- app startup. Renamed checkinit to socket_checkinit and
- removed static scope.
- * winsup.h: Added prototype for socket_checkinit().
-
-Thu Jan 2 12:25:06 1997 Jeremy Allison <jra@cygnus.com>
-
- * dcrt0.cc (api_fatal): Check that u and u->self are
- not zero before indirecting through them.
- * fork.cc: Changed security descriptor for fork
- mutexes to allow access by all.
- * pinfo.cc: Changed security descriptor for shared
- area to allow access by all.
- * shared.cc: Added get_null_sd() call to return
- security descriptor allowing access by all. Needed
- when a cygwin32 service is running and also interactive
- cygwin32 apps by the current logged in user.
- * winsup.h: Added prototype for get_null_sd().
diff --git a/winsup/cygwin/ChangeLog-1998 b/winsup/cygwin/ChangeLog-1998
deleted file mode 100644
index aa657e0..0000000
--- a/winsup/cygwin/ChangeLog-1998
+++ /dev/null
@@ -1,4490 +0,0 @@
-Thu Dec 31 16:50:32 1998 DJ Delorie <dj@cygnus.com>
-
- * mmap.cc: replaced all references to libstdc++ templates with
- inline classes to remove build dependency on libstdc++
-
-Thu Dec 31 00:02:40 1998 Geoffrey Noer <noer@cygnus.com>
-
- * sysdef/uuid.def: remove useless stub.
- * sysdef/oldnames.def: ditto.
- * sysdef/largeint.def: ditto.
- * sysdef/rpcndr.def: ditto.
-
-Wed Dec 30 20:33:09 1998 Geoffrey Noer <noer@cygnus.com>
-
- * utils/cygcheck.cc: clean up misc. warnings relating to
- signed vs. unsigned, char * vs. const char *, etc...
-
-Wed Dec 30 21:41:25 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (do_exit): Remove previous dwProcessId
- change as it presumes too much knowledge about signalling
- in the wrong place in the code.
- * sigproc.cc (sigproc_terminate): Move the dwProcessId
- assignment here but only do it when it is necessary or
- programs will die abnormally.
- * fhandler.h: Add raw_write method to fhandler_serial.
- * fhandler_serial.cc (raw_write): New method. Accommodates
- overlapped I/O that now must be used with serial.
- * utils/kill.cc (main): Allow `0' signal. Just checks
- for existence of process.
-
-Wed Dec 30 00:01:18 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/cygwin/version.h: bump API_MINOR to 8 to mark
- recently exported _ctype_, _sys_errlist, _sys_nerr. Briefly
- describe all API_MINOR changes to date.
-
-Wed Dec 30 01:31:34 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (do_exit): Set myself->dwProcessId so that
- some exit routines will not falsely believe that this
- process has been execed.
- * select.cc (peek_serial): Remove debugging statements.
- * sigproc.cc (sigproc_terminate): Detect state where
- myself->dwProcessId == 0 as indicative of not being
- an exec stub.
-
-Tue Dec 29 21:13:33 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (alloc_stack_hard_way): Fix a couple of thinkos
- in calculating size of the new stack. Just use the size
- passed from the parent.
- (dll_crt0_1): Set up new frame pointers here, if appropriate.
- * fork.cc (fork): Move frame pointer setup into dll_crt0_1.
-
-Tue Dec 29 12:57:38 1998 Geoffrey Noer <noer@cygnus.com>
-
- * utils/mkpasswd.c: Include wchar.h.
- * utils/mkgroup.c: Ditto.
-
-Tue Dec 29 12:53:23 1998 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: remove dep for libcerr.o
-
-Mon Dec 28 22:02:15 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h: Make fhandler_serial io_status public since
- select needs it. Add 'saw_error' field to select_record so
- that select can detect error conditions.
- * fhandler_serial.cc (fhandler_serial::raw_read): Detect
- "operation aborted" error and retry. This seems to indicate
- an attempt to retry an overlapped operation.
- * select.cc (select_stuff::wait): Honor saw_error field when
- appropriate.
- (peek_serial): Rewrite to operate similarly to
- fhandler_serial::raw_read.
- * include/sys/termios.h: CBAUD mask was still not right.
-
-Mon Dec 28 09:09:27 1998 Christopher Faylor <cgf@cygnus.com>
-
- * libcerr.cc: Make obsolete. Move into errno.cc
- * libctype.c: Make obsolete. Use newlib table.
- * Makefile.in: Remove obsolete entries from LIBCOS. Define
- __INSIDE_CYGWIN__ explicitly for .c -> .o compilation.
- * cygwin.din: New exports: _ctype_, _sys_errlist, _sys_nerr.
- * errno.cc: Move _sys_errlist and _sys_nerr here.
- * dlfcn.cc: Reorganize includes to put ctype.h after winsup.h
- so that __INSIDE_CYGWIN__ will be defined for use in ctype.h.
- * fhandler_console.cc: Ditto.
- * fhandler_tty.cc: Ditto.
- * path.cc: Ditto.
- * spawn.cc: Ditto.
-
-Sat Dec 26 00:20:48 1998 Christopher Faylor <cgf@cygnus.com>
-
- patch from Corinna Vinschen <corinna.vinschen@cityweb.de>:
- * include/Windows32/CommonFunction.h: Added proto for
- NetUserChangePassword().
-
-Thu Dec 24 16:15:40 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (dll_crt0_1): Add more debugging output.
- * ioctl.cc (ioctl): Can't use TC[GS]ET ioctls for pty master as
- it conflicts with TIOCPKT.
- * passwd.cc (passwd): Bypass tc[gs]etattr call in favor of appropriate
- method or conversion confusion will result due to attempts to
- appropriately convert to old-style termios structures in tc[gs]etattr.
- * strace.cc (strace_vsprintf): Define t explicitly.
- * termios.cc (tcsetattr): Reorganize to allow meaningful debugging
- output.
- (tcgetattr): Ditto.
-
-Wed Dec 23 15:02:11 1998 Christopher Faylor <cgf@cygnus.com>
-
- * winsup.h: Reorganize include order to allow thread-safe build.
-
-Wed Dec 23 11:45:33 1998 DJ Delorie <dj@cygnus.com>
-
- * strace.cc (strace_microseconds): new function; returns elapsed
- time in microseconds, using performance counters if available.
- (strace_vsprintf): print timestamps and deltas as microseconds,
- not seconds.
-
-Wed Dec 23 11:35:02 1998 DJ Delorie <dj@cygnus.com>
-
- * times.cc (__to_clock_t): Change return value to unsigned long
- long to prevent overflow.
-
-Tue Dec 22 19:37:55 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h: Reflect fhandler_*::init argument reordering.
- Add dup and init methods to fhandler_serial.
- * fhandler.cc (fhandler_base::init): Reorder arguments to mirror
- open().
- * fhandler_console.cc (fhandler_console::init): Ditto. Initialize
- using fhandler_base rather than fhandler_serial as console is
- now being slowly uncouple from fhandler_serial.
- * fhandler_serial.cc (fhandler_serial::fhandler_serial): Set size
- of data structure or suffer strange behavior on exec().
- (raw_read): Add debugging output.
- (fhandler_serial::init): New method.
- (fhandler_serial::open): Detect call from init method and avoid
- calling fhandler_base::open. Don't worry about non-blocking reads
- since they are now handled correctly by _read().
- (fhandler_serial::tcsetattr): Honor ICANON in a kludgey sort of way.
- (fhandler_serial::tcgetattr): Ditto.
- (fhandler_serial::dup): New method. Ensures duplication of all
- elements of fhandler_serial class.
- * fhandler_tty.cc (fhandler_tty_master::init): Reflect init argument
- reordering.
- (fhandler_tty_slave::init): Ditto.
- * hinfo.cc (hinfo::init_std_file_from_handle): Remove unnecessary
- argument.
- (hinfo_init): Reflect change to init_std_file_from_handle.
- (cygwin_attach_handle_to_fd): Use more appropriate types for
- arguments.
- (hinfo::build_fhandler): Add some slop to allocated buffer just
- for paranoia's sake.
- (hinfo::dup2): Avoid dereferencing a NULL pointer when oldfd==newfd.
- * pipe.cc (make_pipe): Reflect init argument change.
- * shared.h: Another immigrant from winsup.h
- * winsup.h: Reflect change to init_std_file_from_handle. Relocate
- a declaration to shared.h so that it can be used in fhandler.h.
- * include/sys/cygwin.h: Reflect change to cygwin_attach_handle_to_fd.
-
-Mon Dec 21 16:22:48 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.cc (fhandler_base::open): Detect serial device as a special
- case requiring an overlapped open.
- * fhandler.h (fhandler_serial): Add several methods. Add new 'fixup after
- fork required' field.
- * fhandler_serial.cc (raw_read): Rewrite to come closer to handling VMIN
- VTIME parameters and to allow EINTR.
- (fhandler_serial::open): Initialize overlapped event here. Make error
- messages more explicit.
- (fhandler_serial::close): Close status event.
- (fhandler_serial::tcsetattr): Store vtime_ as milliseconds. Attempt to
- handle VMIN > 0, VTIME == 0 better.
- (fhandler_serial::fixup_after_fork): Initialize a new event handle after
- a fork.
- (fhandler_serial::de_linearize): Ditto.
- * hinfo.cc (hinfo::fixup_after_fork): Call fork fixer upper if close_on_exec
- of need_fork_fixup set.
-
-Sun Dec 20 16:05:25 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/shellapi.h: replace with stub that includes windows.h
- like similar headers already do.
- * scandir.cc (scandir): add parens around assignment used as truth
- value.
-
-Sat Dec 19 00:42:44 1998 Christopher Faylor <cgf@cygnus.com>
-
- * thread.cc: Fix copyright info.
- * thread.h: Ditto.
- * libcmain.cc: gcc is now more picky about requiring a type
- for main(), so add one.
- * include/pthread.h: Add attribution for net contributor.
-
-Fri Dec 18 19:21:30 1998 Geoffrey Noer <noer@cygnus.com>
-
- * pthread.cc: fix copyright header.
- * shared.h: ditto.
-
-Fri Dec 18 19:21:30 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from Corinna Vinschen <corinna.vinschen@cityweb.de>:
- * cygwin.din: export scandir and alphasort.
- * Makefile.in: add scandir.o to deps
- * scandir.cc: New file with scandir and alphasort implementations.
- * include/cygwin/version.h: bump API_MINOR to 7.
-
-Fri Dec 18 16:44:07 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/pthread.h: clean up, remove C++-style comments,
- remove pthread_getsequence_np proto.
-
-Fri Dec 18 15:26:33 1998 Christopher Faylor <cgf@cygnus.com>
-
- Throughout, prepend cygwin_ to functions that are exported
- as cygwin_* which previously needed to be aliased.
-
- * path.cc (cygwin_conv_to_win32_path): Resolve symbolic links.
- Return success or failure value.
- (cygwin_conv_to_full_win32_path): Ditto.
- (cygwin_conv_to_posix_path): Return success or failure value.
- (cygwin_win32_to_posix_path_list): Ditto.
- (cygwin_posix_to_win32_path_list): Ditto.
- * shared.h: New include file that incorporates parts of
- winsup.h, fhandler_tty.h, path.h, and delqueue.h.
- * Makefile.in: Remove old include files.
- * cygwin.din: cygwin_* aliases are no longer required.
- * libccrt0.cc: Store api_minor in per_process structure.
- * select.cc: Change meaning of second argument to ready_for_read
- to indicate whether read_ahead should be ignored.
- * fhandler.h: Reflect change in second argument to ready_for_read.
- * syscalls.cc (_read): Ditto.
- * termios.cc: Throughout, detect attempt to use old style termios
- structure and convert as appropriate.
- * ioctl.cc (ioctl): Detect use of ioctl requiring termios field
- and call appropriate tc[gs]et* function to handle it.
- * fhandler_console.cc (fhandler_console::ioctl): Remove TC* calls
- that are now handled in main ioctl.
- * fhandler_tty.cc (fhandler_tty_slave::ioctl): Ditto.
- * include/cygwin/version.h: Added TERMIOS defines. Bump API_MINOR
- to 6.
- * include/sys/cygwin.h: Reflect change in return value for some
- cygwin_conv_* calls.
- * include/sys/termios.h: Reformat slightly. Add conversion macros
- for dealing with old style termios structure.
- * include/pthread.h: add
-
-Fri Dec 18 15:03:33 1998 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Cleanup pthread usage.
-
-Fri Dec 18 14:35:59 1998 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Remove obsolete header dependency for
- thread-safe build.
-
-Fri Dec 18 14:16:04 1998 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (sig_handle): Avoid suspending top-level
- processes.
- * trace.cc: Remove unneeded include.
-
-Thu Dec 17 19:19:53 1998 Geoffrey Noer <noer@cygnus.com>
-
- * cygwin.din: remove pthread_getsequence_np, _reent_clib
-
-Thu Dec 17 16:48:15 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/cygwin/version.h: correct two typos in comments
-
-Thu Dec 17 19:11:31 1998 Christopher Faylor <cgf@cygnus.com>
-
- patch from Corinna Vinschen <corinna.vinschen@cityweb.de>:
- * include/Windows32/Defines.h: Add values for using Windows
- function `DeviceIoControl()'.
-
-Thu Dec 17 18:00:34 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (dll_crt0_1): exception_list is not a struct.
- * debug.cc (thread_stub): Ditto.
-
-Thu Dec 17 08:24:37 1998 Christopher Faylor <cgf@cygnus.com>
-
- * cygwin.din: Remove leading underscores from pthread functions.
- * include/cygwin/version.h: Bump DLL major version to 21, DLL minor
- version to 0, and API_MINOR to 5.
-
-Wed Dec 16 22:54:16 1998 Christopher Faylor <cgf@cygnus.com>
-
- Merge in thread-safe branch changes.
-
-Wed Dec 16 22:54:16 1998 Christopher Faylor <cgf@cygnus.com>
-
- * pthread.cc: Include winsup.h.
-
-Wed Dec 16 22:54:16 1998 Christopher Faylor <cgf@cygnus.com>
-
- * thread.cc: Reformat.
- * pthread.cc: New file.
- * cygwin.din: Add pthread interface functions
-
-Wed Dec 16 22:54:16 1998 Christopher Faylor <cgf@cygnus.com>
-
- * configure.in: Add some --enable options.
- * configure: Regenerate.
- * Makefile.in: Reorganize CFLAGS to recognize new --enable options.
-
-Wed Dec 16 22:54:16 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fork.cc (stack_base): Store slightly different information
- in child_info_fork structure for later use in alloc_stack_hard_way.
- (fork): Set frame pointer information if stack has been reallocated.
- * dcrt0.cc (alloc_stack_hard_way): Reflect change in
- child_info_fork structure.
- (dll_crt0_1): Make thread initializers "static" and NO_COPY or death
- of the main thread causes death of other threads.
- * winsup.h (child_info_fork): Change structure.
-
-Wed Dec 16 22:54:16 1998 Christopher Faylor <cgf@cygnus.com>
-
- * thread.h: Remove extraneous declaration.
- * include/sys/strace.h: Make a new thread_printf function
- for use by new thread-safe code.
- * thread.cc: Use thread_printf throughout.
-
-Wed Dec 16 22:54:16 1998 Christopher Faylor <cgf@cygnus.com>
-
- patch from Marco Fuykschot (marco@ddi.nl)
- * Throughout sources add locking control for preliminary
- thread-safe cygwin operation.
-
-Wed Dec 16 22:54:16 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (getprogname): Should be a static.
- (alloc_stack): Extend to allow forking from another
- thread.
- (alloc_stack_hard_way): New function used by alloc_stack.
- (dll_crt0_1); Don't pass parameters since stack may be
- "funny". Use statics instead. Move fork/spawn checking
- into dll_crt0.
- (dll_crt0): Do fork spawn checking here. alloc_stack()
- will call dll_crt0_1 if forked from a non-main thread.
- * fork.cc (stack_base): New function determines base
- (and other values) of this thread's stack.
- (fork): Use new PROC_FORK1 method for forking. Provides
- more data to forkee. Use stack_base to set stack
- values.
- * winsup.h (child_info_fork): Changes for PROC_FORK1.
-
-Wed Dec 16 16:15:29 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/shellapi.h: fix typo in DragQueryPoint proto.
-
-Mon Dec 14 12:37:43 1998 Geoffrey Noer <noer@cygnus.com>
-
- * net.cc: minor respacing
- (get_ifconf): new local function, combines get_winnt_ifconf and
- get_win95_ifconf.
- (get_win95_ifconf): delete
- (get_winnt_ifconf): delete
- (fhandler_socket::ioctl): adjust ifconf calls in light of above,
- check returned value for safety.
- * include/cygwin/version.h: bump CYGWIN_VERSION_API_MINOR to 4
- in honor of newly supported socket ioctls.
-
- patch from Corinna Vinschen <corinna.vinschen@cityweb.de>:
- * include/asm/socket.h: Added defines for ioctl() calls
- SIOCGIFADDR, SIOCGIFBRDADDR and SIOCGIFNETMASK.
- * net.cc (get_winnt_ifconf): Check the registry entries
- instead of just calling get_win95_ifconf(). Added what argument
- to support the new ioctl() calls.
- (get_win95_ifconf): Check the Windows 9x registry entries as
- described by Tim Newsham.
- (fhandler_socket::ioctl): Support the ioctl() commands
- SIOCGIFADDR, SIOCGIFBRDADDR and SIOCGIFNETMASK.
- (get_if_flags): Check for a down interface.
-
-Wed Dec 9 18:11:31 1998 Geoffrey Noer <noer@cygnus.com>
-
- * fhandler.cc (fhandler_disk_file::open): check for shell scripts
- regardless of Win32 OS type.
-
-Sun Dec 6 19:38:11 1998 Christopher Faylor <cgf@cygnus.com>
-
- patch from Corinna Vinschen <corinna.vinschen@cityweb.de>:
- * fhandler_console.cc (fhandler_console::tcgetattr): Fix typo.
- ISIG should be ored with c_lflag.
-
-Tue Dec 1 16:28:56 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/utmp.h: delete, moved to newlib/libc/sys/cygwin/sys.
-
-Thu Dec 3 15:41:51 1998 Geoffrey Noer <noer@cygnus.com>
-
- Released 20.1 update.
-
-Thu Dec 3 22:24:18 1998 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (set_process_mask): Add `sync' parameter
- to control whether signals should be synched on exit.
- (handle_sigsuspend): Provide second argument to set_process_mask -
- don't sync.
- (call_handler): Ditto for asm handler.
- * signal.cc (sigprocmask): Ensure that signals are synchronized
- by calling set_process_mask with sync == 1.
- * sigproc.cc (__release_signal_mutex): Third argument is not
- strictly a BOOL, so change it.
- * sigproc.h: Reflect above parameter changes.
-
-Thu Dec 3 15:30:44 1998 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (peek_console): Work around NT bug that
- caused strange behavior with ReadFile after this
- function was invoked.
-
-Tue Dec 1 14:43:35 1998 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc (sigproc_init): Set maintid and signal_mutex early
- to avoid races in wait_sig initialization.
- (__get_signal_mutex): Improve debug output.
- (__release_signal_mutex): Ditto.
- * spawn.cc (spawn_guts): Allocate more space for string when building
- up from #! and absolute path is not known. Otherwise weird stuff
- like infinite recursion or unknown file errors occur.
-
-Tue Dec 1 08:34:18 1998 Christopher Faylor <cgf@cygnus.com>
-
- * mkvers.sh: Accommodate lack of timezone in date output so that
- year shows up correctly.
-
-Mon Nov 30 14:30:51 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * times.cc (times): Altered function so that on non-Windows-NT systems
- it does not use the GetProcessTimes() API which is not supported.
-
-Mon Nov 30 00:38:54 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc: Fix incorrect use of struct on exception_list
- typedef.
- * debug.cc (thread_stub): Ditto.
- * dll_init.cc: Ditto.
- * include/Windows32/Structures.h: Correct typo where
- typedef SYSTEM_POWER_STATUS was being used as a struct.
-
-Sun Nov 29 22:03:17 1998 Christopher Faylor <cgf@cygnus.com>
-
- patch from Corinna Vinschen <corinna.vinschen@cityweb.de>:
- * fhandler_console.cc (fhandler_console::ioctl):
- Added ioctl commands TCGETA, TCSETA, TCSETAW, TCSETAF.
-
-Fri Nov 27 22:30:58 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h: Set aside NOEINTR bit. When this is set
- cygwin will not allow the read on this device to be
- interrupted by a signal.
- * pipe (_pipe): Set NOEINTR bit for read end of pipes
- created using this method. The vague rationale for this
- is that these pipes are supposed to be more like Windows
- pipes than UNIX pipes.
- * syscalls.cc (_pipe): Honor NOEINTR flag.
- * getopt.c: Clean up some gcc warnings.
- * libcerr.c: Ditto.
-
-Fri Nov 27 21:56:03 1998 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (SIG_NONMASKABLE): Update for new signal
- mask method.
- (handle_sigsuspend): Release of signal mutex must be
- synchronous -- the signal must be delivered before the
- function returns. Otherwise, there will be races in
- the caller code.
- * sigproc.cc (sigproc_terminate): Minor cleanup.
-
-Thu Nov 26 20:26:17 1998 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (call_handler): Attempt to work around
- potential race when setting signal_arrived. This
- particularly affects sigsuspend.
- (handle_sigsuspend): Reset signal_arrived prior to
- grabbing the mutex. This should reduce the probability
- of a race.
- * sigproc.cc (sig_send): Don't reset signal_arrived in
- the SIGSUSPEND case since this could introduce a race.
-
-Thu Nov 26 12:19:16 1998 Christopher Faylor <cgf@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * select.cc (MAKEready): Don't wait for signal prior to
- testing for read. That introduces an unnecessary delay.
-
-Wed Nov 25 23:03:47 1998 Christopher Faylor <cgf@cygnus.com>
-
- * winsup.h: Make `isdirsep' an alias for SLASH_P.
- Implement isabspath convenience macro.
- Change sigprotect to a macro since it appears to
- be impossible to send __FILE__ type macros to a
- constructor. Change use of sig_protect throughout.
- * dcrt0.cc (dll_crt0_1): Use new path macro.
- * dlfcn.cc (get_full_path_of_dll): Ditto.
- * path.cc (path_conv::path_conv): Ditto.
- (normalize_posix_path): Ditto.
- (slashify): Ditto.
- (backslashify): Ditto.
- * syscalls.cc (num_entries): Ditto.
- * lock.cc: Redefine lock methods to pass debug info to
- {get,release}_signal_mutex.
- * environ.cc (environ_init): Correct strncmp test for
- TERM=, otherwise it's impossible to set TERM.
- * exceptions.cc: Eliminate lock_cs and unlock_cs macros.
- Use {get,release}_signal_mutex throughout.
- (signal_init): Don't initialize signal_mutex here.
- (set_process_mask): Remove vestiges of old mutex code.
- (handle_sigsuspend): Ditto.
- (call_handler): Move signal_arrived SetEvent back here.
- It was being triggered too often before.
- Detect when the signal thread is exiting.
- (sig_handle): Remove inappropriate SetEvent(signal_arrived).
- (events_terminate): Move close of signal_mutex elsewhere.
- * glob.cc: Increase "MAXPATHLEN" size for arguments that
- are not necessarily pathnames.
- * pinfo.cc (lpfu): Lower timeout for reporting possible
- problem with INFINITE wait.
- * sigproc.cc (wake_wait_subproc): Make this a macro with
- no arguments so that its use in the code is a little
- clearer.
- (proc_terminate): Eliminate signal blocking here since
- this should already be handled by the caller.
- (sigproc_init): It makes sense to initialize signal_mutex
- here, so do so.
- (__allow_sig_dispatch): Rename. Take debugging arguments.
- Pass arguments on to release_signal_mutex.
- (__block_sig_dispatch): Rename. Take debugging arguments.
- Pass arguments on to get_signal_mutex. Detect signal
- thread exiting confition.
- (__get_signal_mutex): Take debugging arguments. Maintain
- a stack of nested mutex calls for later display in
- __release_signal_mutex. Detect signal thread exit
- condition. Don't bother with locking if signal thread is
- executing or if just an exec stub.
- (__release_signal_mutex): Don't bother with locking if signal
- thread is executing or if just an exec stub.
- * sigproc.h: Reflect renamed functions above. Provide
- wrappers to pass in diagnostic information.
- * spawn.cc (spawn_guts): More fixes to deal with nested
- #! and to properly report posix argv[0] when invoked as a
- script.
-
-Wed Nov 25 12:41:12 1998 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Reinstate libwinspool.a/winspool.drv creation.
-
-Tue Nov 24 18:48:56 1998 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: add CFLAGS_COMMON and CFLAGS_CONFIG to CFLAGS
- and CXXFLAGS in FLAGS_TO_PASS.
-
- * include/sys/select.h: new file with select proto. Avoid
- potential conflict with Winsock inclusion by Cygwin internals.
- * include/sys/socket.h: remove select proto.
- * winsup.h: define __INSIDE_CYGWIN__. Include windows.h after
- Unix include files.
- * include/mywinsock.h: delete file
- * include/Windows32/Sockets.h: add ndef __INSIDE_CYGWIN__s
- around portions that conflict with Unix definitions. This
- yields what used to be mywinsock.h which is a blend of Unix
- sockets and Winsock needed by Cygwin internals.
- * exceptions.cc: define Win32_Winsock to include
- Windows32/Sockets.h. No longer define __INSIDE_CYGWIN__.
- * hinfo.cc: ditto
- * net.cc: ditto
- * select.cc: ditto
-
- * include/exceptions.h: change wrapper define to _EXCEPTIONS_H.
- * include/sys/resource.h: move includes outside __cplusplus check.
- * include/sys/wait.h: ditto.
-
-Sun Nov 22 23:33:19 1998 Geoffrey Noer <noer@cygnus.com>
-
- * sigproc.cc (__release_signal_mutex): revert Nov 3d change.
-
-Sun Nov 22 17:04:44 1998 Christopher Faylor <cgf@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * regexp/Makefile.in: Add additional bits necessary to
- allow correct installation of include file.
-
-Fri Nov 20 17:04:48 1998 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Set "Warn about writable strings" option in CFLAGS.
- * fhandler_tty.h: Fix for writable strings detection.
- * grp.cc (add_grp_line): Ditto.
- * mkvers.sh: Ditto.
- * path.h: Ditto.
- * registry.cc: (reg_key::reg_key): Ditto.
- * smallprint.c (__small_vsprintf): Ditto.
- * tty.cc (tty::get_event): Ditto.
- * winsup.h: Give up on read_ready_thread. Move sig_protect
- here since it needs to use information set up after the sigproc.h
- include.
- * dcrt0.cc: Ditto.
- * debug.cc (WFSO): New function. Used to ensure that
- function shows up on stack trace.
- (WFMO): Ditto.
- * debug.h: Define the above.
- * exceptions.cc (ctrl_c_handler): Record last signal
- for signal handler.
- * select.cc (MAKEready): New macro for constructing
- fhandler_*::ready_for_read function.
- (fhandler_*::ready_for_read): Use macro to construct this
- method throughout.
- * sigproc.cc (sig_send): Work around race on process termination
- where the event being waited for may disappear.
- (sigproc_terminate): #ifdef code here that attempted to deal with
- the above condition in sig_send.
- * sigproc.h: Move sig_protect to winsup.h.
- * spawn.cc (perhaps_suffix): Don't return pointer into an
- automatic variable.
- (find_exec): Always point known_suffix to something.
- * syscalls.cc (read_handler): Refine debug output.
- (read_ready_thread): Delete.
- (_read): Eliminate use of read_ready_thread. Call ready_for_read
- directly as appropriate.
-
-Thu Nov 19 15:26:40 1998 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: remove -Wunused since that's already in -Wall
- * dlfcn.cc (check_path_access): rename winenv arg to mywinenv
- * path.cc (symlink): change save_errno var to saved_errno
- * spawn.cc (find_exec): rename winenv arg to mywinenv
- (spawn_guts): rename sigprotect handle to starting_here
- * winsup.h: remove trailing comma from process_state flags
- enum
- * utils/aclocal.m4: regenerate
- * utils/configure: regenerate
-
-Thu Nov 19 11:16:38 1998 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Use correct libpthread.a target when
- thread-safe is enabled.
-
-Thu Nov 19 10:49:27 1998 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (path_conv): Correct error reporting.
-
-Wed Nov 18 20:07:50 1998 Geoffrey Noer <noer@cygnus.com>
-
- * utils/Makefile.in: remove termcap file install rule
-
-Wed Nov 18 18:14:18 1998 Geoffrey Noer <noer@cygnus.com>
-
- More minor cleanup:
- * environ.cc (winenv): don't define len twice.
- * fork.cc (sync_with_parent): should NOT use rc since
- this is a macro and that could have interfered with rc in
- the calling function. Renamed to psync_rc.
- * fhandler_serial.cc (fhandler_serial::open): change
- access to myaccess since it shadows global decl.
- * hinfo.cc: ditto throughout
- * path.cc: ditto throughout
- (path_conv::path_conv): change error to err.
-
-Wed Nov 18 16:17:58 1998 Geoffrey Noer <noer@cygnus.com>
-
- * profil.c: include stdio.h
- (print_prof): comment out unused func
- (profile_ctl): should return an int
-
-Wed Nov 18 16:17:58 1998 Geoffrey Noer <noer@cygnus.com>
-
- * utils/ps.cc: include sys/cygwin.h, make pname buf
- MAXPATH in size.
-
- patch from Corinna Vinschen <corinna.vinschen@cityweb.de>:
- * utils/ps.cc (main): converting windows paths to posix
- paths in output.
-
-Wed Nov 18 15:34:46 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/wchar.h: include stddef.h.
-
-Wed Nov 18 17:39:15 1998 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc (environ_init): Fix incorrect TERM= detection.
-
-Tue Nov 17 17:28:09 1998 Geoffrey Noer <noer@cygnus.com>
-
- * gcrt0.c: include stdlib.h, add proto for monstartup.
-
-Tue Nov 17 16:47:42 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/wchar.h: add protos for wcslen and wcscmp.
- * syscalls.cc: minor reformat.
-
-Tue Nov 17 15:38:45 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.cc (fhandler_base::fhandler_base): Default non-disk
- devices to binary mode.
- * fhandler.h: Reformat slightly.
-
-Tue Nov 17 11:19:23 1998 Christopher Faylor <cgf@cygnus.com>
-
- * external.cc (fillout_pinfo): Copy progname using strcpy to
- save on time.
- * path.h: Add new enums for more fine-grained control
- of path_conv.
- * dir.cc (opendir): Use enum argument to path_conv.
- (mkdir): Ditto.
- (rmdir): Ditto.
- * dlfcn.cc (get_full_path_of_dll): Ditto.
- * fhandler.h: Add new set_readahead_valid to set actual
- readahead.
- * fhandler.cc (raw_read): Remove extraneous variable.
- (fhandler_base::read): Rework to allow readahead when
- not text mode.
- (fhandler_disk_file::fstat): get_symlink_p() only returns
- true/false now.
- (fhandler_disk_file::fhandler_disk_file): Use enum argument
- to path_conv.
- (fhandler_disk_file::open): Ditto.
- * spawn.cc (perhaps_suffix): Ditto.
- * syscalls.cc (_unlink): Ditto.
- (_link): Ditto.
- (stat_worker): Ditto.
- (_rename): Ditto.
- * fhandler_serial.cc (fhandler_serial::open): Always reset timeouts.
- * path.cc (path_conv::path_conv): Honor new enum arguments.
- Specifically, use SYMLINK_CONTENTS for readlink interface.
- (readlink): Use SYMLINK_CONTENTS argument to path_conv.
- * select.cc: Rework serial support which has apparently never
- worked.
-
-Mon Nov 16 16:15:20 1998 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: FLAGS_TO_PASS should pass CFLAGS and CXXFLAGS
- not ALL_CFLAGS and ALL_CXXFLAGS. Rework handling of CFLAGS
- variables to remove duplication and make it possible to
- build mingw directory.
-
-Mon Nov 16 09:40:21 1998 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (_open): Use new macro to check for
- NULL or empty pathname and return appropriate error.
- * path.cc (check_null_empty_path*): Move macro to
- path.h.
- * path.h: Move macros here.
-
-Sun Nov 15 20:23:10 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/cygwin/version.h: bump API_MINOR to 3 to mark
- addition of dll_noncygwin_dllcrt0 to exports list.
-
-Sun Nov 15 23:05:21 1998 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (check_null_empty_path): New macro.
- (check_null_empty_path_errno): Ditto.
- (path_conv::path_conv): Check for NULL and empty
- path names here and set appropriate error.
- (conv_to_win32_path): Ditto.
- (conv_to_full_win32_path): Ditto.
- (conv_to_posix_path): Ditto.
- (conv_to_full_posix_path): Ditto.
- (mount_info::conv_wo_win32_path): Back out previous
- change.
- (mount_info::conv_to_posix_path): Ditto.
-
-Sun Nov 15 19:29:19 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/limits.h: define CHILD_MAX to be 63.
- * sysconf.cc (sysconf): return CHILD_MAX when asked for
- instead of _POSIX_CHILD_MAX.
-
-Sun Nov 15 18:25:22 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from Mumit Khan <khan@xraylith.wisc.edu>:
- * path.cc (mount_info::conv_to_posix_path): Handle NULL and
- empty pathnames.
- (mount_info::conv_to_win32_path): Likewise.
-
-Sun Nov 15 18:09:06 1998 Geoffrey Noer <noer@cygnus.com>
-
- * cygwin.din: export dll_noncygwin_dllcrt0.
- * {libccrt0.cc, winsup.h}: minor reformat.
-
-Sat Nov 14 22:14:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc (environ_init): Use sizeof for string lengths
- rather than hard-coded values.
-
- patch from Mumit Khan <khan@xraylith.wisc.edu>:
- * dll_init.cc (dll_foreign_dllcrt0): Rename to
- dll_noncygwin_dllcrt0.
- * winsup.h: Ditto.
- * include/cygwin/cygwin_dll.h: Ditto.
-
-Sat Nov 14 14:09:33 1998 Christopher Faylor <cgf@cygnus.com>
-
- * hinfo.cc (hinfo::de_linearize_fd_array): Reset first fd
- for open to zero after an exec.
-
-Sat Nov 14 01:29:23 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fork.cc (fork): No need for intermediate jmp_buf variable.
-
- patch from Mumit Khan <khan@xraylith.wisc.edu>:
- * libccrt0.cc (cygwin_attach_foreign_dll): New function.
- * dll_init.cc (dll_foreign_dllcrt0): New function to initialize
- DLLs loaded by non-cygwin apps.
- (dll_dllcrt0_1): Initialize process table entry.
- (dll_dllcrt0): Revert last change to do partial initialization.
- * winsup.h (dll_foreign_dllcrt0): Prototype.
- * include/cygwin/cygwin_dll.h (_cygwin_foreign_dll_entry): New
- entry point that does partial initialization for non-cygwin apps.
-
-Fri Nov 13 16:17:28 1998 Geoffrey Noer <noer@cygnus.com>
-
- Assorted -Wall cleanup:
- * utils/mount.cc (show_mounts): remove unused var i.
- * utils/cygcheck.cc (dll_info): comment out unused var ofs.
- (dump_sysinfo): return a void, not an int. Comment out unused
- var len in two places. Add parens around assignment used as
- truth value.
- * utils/kill.cc (main): remove unused var i
- * utils/mkpasswd: include <ctype.h> and <stdlib.h>.
- (enum_users): remove unused var rc.
- (enum_local_groups): ditto.
- * utils/ps.cc (main): Add parens around assignments used as
- truth values.
- * utils/mkgroup.c: include <ctype.h> and <stdlib.h>.
- (enum_groups): return void, not int. Remove unused var rc.
- * gmon.c: include <stdio.h> and <unistd.h>.
- (_mcleanup): remove unused vars buf and profdir.
-
-Fri Nov 13 16:17:28 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from Corinna Vinschen <corinna.vinschen@cityweb.de>:
- * include/sys/sysmacros.h: new file, define major, minor, makedev
-
-Fri Nov 13 17:03:52 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc: Reflect a variable name change.
- * fhandler.h: *::ready_for read takes an additional argument.
- * fhandler_console.cc (get_non_ascii_key): New function derived
- from fhandler_console::read1.
- (fhandler_console::read1): Use new function.
- * select.cc (*::ready_for_read): Add new "nonblocking" argument.
- (peek_console): Be more diligent in detecting when a usable
- character has been entered or false positives will be returned.
- (fhandler_tty_common::ready_for_read): Detect attempt to perform
- a "background" read.
- * syscalls.cc (read_handler): Remove code for dealing with slow
- devices. Just deal with non-blocking here.
- (read_ready_thread): Renamed function. Rewritten to only detect
- when an fd has data ready to be read. Actual reads happen in
- the main thread.
- (_read): Rely on read_handler to read data for everything. Use
- the read_ready_thread to indicate when data is ready to be read.
- Gut the read_thread_info class since it no longer needs to return
- much information.
- * winsup.h: Reflect above changes to read_thread_info. Rename
- to read_ready_thread_info.
-
-Fri Nov 13 15:09:26 1998 Christopher Faylor <cgf@cygnus.com>
-
- patch from Corinna Vinschen <corinna.vinschen@cityweb.de> and
- Ron Parker <rdparker@butlermfg.org>:
- * path.cc (mount_info::conv_to_win32_path): Refined recognition of
- UNC devices.
-
-Fri Nov 13 12:37:00 1998 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Fix a typo.
-
-Fri Nov 13 10:59:43 1998 DJ Delorie <dj@cygnus.com>
-
- * Makefile.in: "make" uses new "ld -shared" by default internally.
-
-Fri Nov 13 00:58:38 1998 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (find_exec): Make sure that return value is correct
- in all cases. Document.
- * fhandler.h (fhandler_tty_common): Give unit number to constructor.
- * fhandler_tty.cc (fhandler_tty_slave::fhandler_tty_slave): Give
- unit number to descriptor. Create correct UNIX path name for
- tty so that ttyname() will work correctly.
- * select.cc (fhandler_tty_common::ready_for_read): Don't worry
- about read_for_read since the tty read routines are already
- interruptible.
- * syscalls.cc (_read): Reset read thread events on signal.
-
- patch from Mumit Khan <khan@xraylith.wisc.edu>:
- * dlfcn.cc (ctype.h): Include.
- (check_access): Document.
- (check_path_access): Document.
- (get_full_path_to_dll): Rework to handle general filenames and
- symlinks.
-
-Thu Nov 12 17:01:52 1998 DJ Delorie <dj@cygnus.com>
-
- * Makefile.in (shared): "make shared" uses the new "ld -shared"
- * cygwin.din: add LIBRARY and BASE tags for "ld -shared"
-
-Wed Nov 11 17:16:17 1998 Christopher Faylor <cgf@cygnus.com>
-
- * configure.in: Add --enable options for various cygwin defines
- including preliminary thread-safe defines.
- * configure: Regenerate
- * Makefile.in: Honor new --enable options.
- * glob.h: Move BSD defines to sys/cdefs.h.
- * include/sys/cdefs.h: Move __P definition here.
-
-Wed Nov 11 14:00:45 1998 DJ Delorie <dj@cygnus.com>
-
- * cygwin.din (getpwnam): remove duplicates
-
-Tue Nov 10 18:27:09 1998 Geoffrey Noer <noer@cygnus.com>
-
- * utils/aclocal.m4: regenerate with aclocal
- * utils/configure.in: don't call AM_CYGWIN32
- * utils/configure: regenerate
-
-Tue Nov 10 15:56:03 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from Gary V. Vaughan <gvaughan@oranda.demon.co.uk>:
- * dlfcn.cc (dlopen): return an introspective handle to the
- current module if name arg is NULL. The Single UNIX
- Specification, Version 2 has this as a requirement.
-
-Mon Nov 9 16:29:27 1998 Geoffrey Noer <noer@cygnus.com>
-
- * errno.cc (strerror): all errnos in
- newlib/libc/include/sys/errno.h are now listed here.
-
-Mon Nov 9 16:29:27 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/cygwin/version.h: up DLL version, bump API_MINOR to 2
- to mark following change.
-
- patch from Mumit Khan <khan@xraylith.wisc.edu>:
- * cygwin.din: add exports for some of the newlib bessel
- functions (j1, jn, y1, yn).
-
-Mon Nov 9 15:10:06 1998 Geoffrey Noer <noer@cygnus.com>
-
- * syscalls.cc (_link): rewrite FIXME.
-
-Mon Nov 9 14:51:03 1998 Geoffrey Noer <noer@cygnus.com>
-
- * errno.cc (strerror): add string for EDEADLOCK.
-
- patch from Corinna Vinschen <corinna.vinschen@cityweb.de>:
- * errno.cc (errmap[]): add END_OF_MEDIA and additional Win32
- error codes.
-
-Sun Nov 8 21:28:01 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h: fhandler_pipe cannot be is_slow under
- Windows9[58]. There is no way to check for EOF on a pipe
- without performing a read on that system.
- * syscalls.cc (read_handler): Don't check for ready_for_read
- unless this is a "slow" device.
- * winsup.h: Reorganize to accomdate fhandler.h requirement
- for os_type.
-
-Sat Nov 7 23:27:05 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h (fhandler_console): Add a new function declaration.
- * fhandler_console.cc (fhandler_console::read1): New function
- renamed from console_read to allow use of class fields.
- Detect readahead situation when doing line buffering and
- buffer does not contain \n.
- (fhandler_console::read): Reflect function name change.
- * select.cc (cygwin_select): Changes for better handling
- of < 1000 usec timeouts.
- (select_stuff::wait): Perform a poll on timeout to
- set any fd's that may have become active.
- (peek_pipe): More debugging. Honor write_ready if set.
- (peek_console): Can't always use WaitForSingleObject.
- Detect readahead conditions set in fhandler_console::read1.
- Honor write_ready if set.
- (peek_windows): Honor write_ready if set.
- * times.cc (__to_clock_t): Return clock_t value.
- (times): Add some debugging printfs.
-
-Fri Nov 6 20:15:20 1998 Christopher Faylor <cgf@cygnus.com>
-
- patch from Corinna Vinschen <corinna.vinschen@cityweb.de>:
- * spawn.cc (spawn_guts): find_exec() argument mismatch
- resulted in inability to run !# scripts which did not
- begin with '/'.
-
-Tue Nov 3 16:12:59 1998 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (handle_exceptions): Don't wait for signal
- completion.
- (ctrl_c_handler): Ditto.
- * fhandler.h (fhandler_*): Declare new ready_for_read functions.
- * select.cc: Reorganize all methods into a peek_*, a poll_*,
- and a fhandler_*::ready_for_read. This is to allow the _read
- function to query the state of an fd without starting a thread.
- * signal.cc (kill_worker): If sending a signal from a non-main thread
- don't wait for completion.
- * sigproc.h (myself_nowait_nonmain): New define for use by sig_send.
- * sigproc.cc (sig_send): Honor myself_nowait_nonmain. Don't wait
- if not in main thread.
- (__release_signal_mutex): Revert to calling ReleaseMutex only
- once or mutex is released prematurely.
- * syscalls.cc (read_handler): Use new ready_for_read method to
- determine if an fd has data for reading. This function optionally
- blocks until there is data to read.
- (read_helper): Add debugging statement.
- (_read): Move signal_arrived reset to before sig_protect to avoid
- a race. Force read_handler thread to longjmp back to read_handler
- function on signal.
-
-Tue Nov 3 12:18:31 1998 DJ Delorie <dj@cygnus.com>
-
- * utils/cygcheck.cc (dump_sysinfo): Note when not finding a
- program (like cpp) on the path is a good thing.
-
-Tue Nov 3 01:26:08 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from Kazuhiro Fujieda <fujieda@jaist.ac.jp>:
- * environ.cc (environ_init): correct size arg to parse_options
-
-Mon Nov 2 21:40:32 1998 Christopher Faylor <cgf@cygnus.com>
-
- * regexp/regexp.c (regatom): Respond to compiler warning.
-
-Mon Nov 2 21:36:48 1998 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (handle_exceptions): cygwin should not
- print exception information if the exception is trapped
- via signal().
- Also use consistent timings for lock_cs() throughout.
-
-Mon Nov 2 16:46:28 1998 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: For now, also include newlib/libc/sys/cygwin.
- Eventually will stop including newlib/libc/sys/cygwin32.
-
-Mon Nov 2 19:38:30 1998 Christopher Faylor <cgf@cygnus.com>
-
- patch from Corinna Vinschen <corinna.vinschen@cityweb.de>:
- * syscall.cc (gethostname): function deleted
- * net.cc (gethostname): new function 'gethostname' which
- first calls wsock32::gethostname and only if it fails,
- calls GetComputerNameA.
-
-Wed Oct 28 17:57:53 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/cygwin/version.h: up DLL version to 20.0 in honor
- of new Net release.
-
-Wed Oct 28 17:57:53 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from Mumit Khan <khan@xraylith.wisc.edu>:
- * dll_init.cc (doGlobalCTORS): Fix invocation order.
- (doGlobalDTORS): Likewise.
-
-Wed Oct 28 17:57:53 1998 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: add include/exceptions.h to dll_init.cc deps.
-
- patch from Mumit Khan <khan@xraylith.wisc.edu>:
- * dll_init.cc (exceptions.h): Include.
- (dll_dllcrt0_1): New function to initialize Cygwin DLL guts
- properly when a non-Cygwin app uses the Cygwin DLL.
- (dll_dllcrt0): Call dll_dllcrt0_1 when user_data is NULL.
-
-Tue Oct 27 17:35:00 1998 Geoffrey Noer <noer@cygnus.com>
-
- * syslog.cc: drop "32" from CYGWIN32_LOG_NAME
-
-Tue Oct 27 16:09:09 1998 DJ Delorie <dj@cygnus.com>
-
- * utils/cygcheck.cc (usage): cygwhich->cygcheck
-
-Mon Oct 26 17:47:10 1998 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: fix deps for dll_entry.o and dll_main.o,
- add dep for glob.o.
-
- patch from Mumit Khan <khan@xraylith.wisc.edu>:
- * dll_entry.cc: New file for user DLL entry point.
- * dll_main.cc: New file for user DLL main.
- * Makefile.in (LIBCOS): Add dll_entry.o and dll_main.o.
-
-Mon Oct 26 13:47:10 1998 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: add back install of include/net which was
- removed by accident.
-
-Mon Oct 26 15:25:22 1998 Christopher Faylor <cgf@cygnus.com>
-
- * strace.cc (get_strace_mutex): Don't reset last windows
- error.
- (strace_printf): Preserve last windows error.
-
-Mon Oct 26 11:01:46 1998 Christopher Faylor <cgf@cygnus.com>
-
- * uname.cc (uname): Remove slash from system name.
-
-Mon Oct 26 02:11:44 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/asm/byteorder.h: add missing __cplusplus wrapper.
-
-Mon Oct 26 00:46:33 1998 Christopher Faylor <cgf@cygnus.com>
-
- * uname.cc (uname): Remove space from the system name.
-
-Sun Oct 25 23:47:56 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_console.cc (console_read): Several typos caused flaky
- behavior when \r or \n detected under ENABLE_LINE_INPUT. Also ignore
- first \n detected under ENABLE_LINE_INPUT if it isn't preceded by a \r.
- This avoids problems when switching from "raw" mode into "cooked mode.
-
-Sun Oct 25 12:28:21 1998 Geoffrey Noer <noer@cygnus.com>
-
- * cygwin.din: remove unnecessary __cygwin32_stack_trace and
- __cygwin_stack_trace exports.
-
-Sat Oct 24 21:18:46 1998 Christopher Faylor <cgf@cygnus.com>
-
- patch from Corinna Vinschen <corinna.vinschen@cityweb.de>:
- * path.cc (symlink): Standard protection for symlink should
- be 0777.
- * syscalls.cc (num_entries): Calculated links for directory
- entry should only include directories.
-
-Sat Oct 24 20:51:08 1998 Christopher Faylor <cgf@cygnus.com>
-
- * mkvers.sh: Modify check for CVS/Tag to work around ash bug.
- * sigproc.cc (wait_sig): Fix detection of non-blockable signals.
-
-Fri Oct 23 18:24:43 1998 Geoffrey Noer <noer@cygnus.com>
-
- * environ.cc: CYGWIN32 environment variable is now called CYGWIN
- * window.cc: lose "32" in Cygwin32WndClass
- * syslog.cc: lose "32" in WIN95_EVENT_LOG_PATH and
- CYGWIN32_LOG_NAME.
-
-Fri Oct 23 16:32:59 1998 Geoffrey Noer <noer@cygnus.com>
-
- * utils/cygcheck.cc: reformat, add copyright notice
-
-Fri Oct 23 18:15:28 1998 DJ Delorie <dj@cygnus.com>
-
- * utils/cygcheck.cc: new file
- * utils/Makefile.in: build cygcheck.exe
-
-Fri Oct 23 16:48:41 1998 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (signals_init): Add error to api_fatal.
- (events_init): Ditto. Collapse printfs into one.
- (winsock_init): Ditto.
- * net.cc (winsock_init): Remove "Cygwin" from error message.
-
-Fri Oct 23 13:48:10 1998 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: install include/cygwin headers, losing the "32".
- * include/cygwin32: remove
-
-Fri Oct 23 14:36:31 1998 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc (environ_init): Avoid reallocating environ array.
- * exec.cc: Increase number of arguments to 1024 throughout.
- * fhandler.cc (fhandler_disk_file::open): Revert to checking
- a file for '#!' to find out if it is executable but add
- extra check for NTEA which, if set, eliminates the need for
- the read.
- * sigproc.cc (sigproc_terminate): Close hwait_sig and set it
- to NULL prior to closing other handles since this flags some
- routines that the process is going down.
-
-Fri Oct 23 00:31:27 1998 Geoffrey Noer <noer@cygnus.com>
-
- * utils/*: remove "32"s from cygwin32_foo function calls
-
-Fri Oct 23 00:24:27 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/cygwin/version.h: increment CYGWIN_VERSION_DLL_MINOR
- and CYGWIN_VERSION_API_MINOR since I'm changing the API in a
- meaningful but backwards-compatible fashion.
-
- * exceptions.cc: strip "32" from cygwin32_exception_handler
- debug printfs
-
- * net.cc: strip "32" from all net functions
- * select.cc, syscalls.cc, winsup.h: lose "32" from cygwin32_select
- * cygwin.din: adjust for these changes (no backwards
- compatability issues here).
-
- * cygwin.din: rename all cygwin32_foo functions, aliasing as
- cygwin_foo for backwards compat. for now but intend to lose them
- at a later date.
- * include/sys/cygwin.h: copy all cygwin32_ protos and make them
- usable without the "32". We will remove the cygwin32_ ones at a
- later date.
- * external.cc, external.h: lose "32" from cygwin32_internal
- * shared.cc, winsup.h: lose "32" in cygwin32_getshared
- * path.cc, path.h: lose "32" in cygwin32_foo comments
- * dll_init.cc: lose "32" in cygwin32_detach_dll
- * hinfo.cc: lose "32" in cygwin32_attach_handle_to_fd
- * libccrt0.cc: lose "32" in refs to cygwin32_attach_dll
- * pinfo.cc: lose "32" in cygwin32_winpid_to_pid
-
- * include/cygwin32: remove all files except cygwin32_dll.h which
- some people may already be including. Aim to remove this
- remaining file at a later date.
- * include/cygwin: move all include/cygwin32 files here.
- * cygwin/cygwin_dll.h: change protos to reflect loss of "32"s
- * include/net/if.h, include/netinet/in.h, include/netinet/ip.h,
- include/netinet/ip_icmp.h, include/asm/socket.h:
- include/sys/socket.h: include the headers in include/cygwin
- * Makefile.in, winsup.h: fix references to
- include/cygwin32/version.h
-
- * libcctype.c, smallprint.c, test.c: lose "32" in Cygwin32 refs in
- comments
- * include/dlfcn.h, include/exceptions.h, include/mapi.h,
- include/winsock.h, include/mywinsock.h: ditto
- * config/*: ditto
- * profil.c: ditto, and respace
-
-Thu Oct 22 22:52:40 1998 Geoffrey Noer <noer@cygnus.com>
-
- * net.cc, exceptions.cc, hinfo.cc, select.cc,
- include/mywinsock.h: rename __INSIDE_CYGWIN32__ to
- __INSIDE_CYGWIN__
-
-Thu Oct 22 17:39:06 1998 Geoffrey Noer <noer@cygnus.com>
-
- First round of Cygwin32 -> Cygwin renaming. In all files,
- rename Cygwin32 to Cygwin in comments.
- * CYGWIN32_LICENSE: delete and
- * CYGWIN_LICENSE: add it back under this name
-
-Thu Oct 22 20:10:24 1998 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc: Eliminate cs mutex. Just use signal_mutex
- throughout. Rename sig_dispatch_mutex to signal_mutex throughout.
- (lock_cs): Rewrite to be a front-end for get_signal_mutex.
- (unlock_cs): Rewrite to be a front-end for release_signal_mutex.
- (set_process_mask): Synchronize signals after resetting mask.
- * sigproc.cc (release_signal_mutex): Report on success or
- failure of signal_mutex release.
- * include/Windows32/Defines.h (FILE_FLAG_WRITE_THROUGH): Make
- unsigned to avoid a compiler warning.
-
-Thu Oct 22 14:23:49 1998 Geoffrey Noer <noer@cygnus.com>
-
- * utils/Makefile.in: disable building cygwin.exe.
-
-Thu Oct 22 14:16:10 1998 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (sig_handle): Minimize life of cs lock during
- handling of signals to reduce the potential for a race.
-
-Thu Oct 22 10:23:19 1998 Christopher Faylor <cgf@cygnus.com>
-
- * include/sys/strace.h: Minor addition from threadsafe-branch.
-
-Thu Oct 22 09:03:18 1998 Christopher Faylor <cgf@cygnus.com>
-
- * debug.cc (close_handle): Error condition needs a return value.
- * environ.cc (parse_thing): char pointers should all be constant.
- (add): Ditto.
- * heap.cc (heap_init): Provide a little more information in
- fatal printf. Use api_fatal to print errors.
- * sigproc.cc (sigproc_terminate): Move code executed on
- thread termination here from wait_sig since this function
- may actually be executing in the signal thread.
- * strace.cc (strace_open): Argument should be const.
- (strace_init): Ditto.
- * winsup.h: Ditto.
- * include/cygwin32/version.h: Note that original shared memory
- version was 0 for 98r2.
-
-Wed Oct 21 08:41:39 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (__api_fatal): Remove "cygwin" identifier.
- * fhandler.cc (fhandler_disk_file::open): Set symlink flag
- appropriately for previous change.
- * shared.cc (shared_name): Initialize static buffer to
- (hopefully) force it into NO_COPY segment.
- * mkvers.sh: Reorganize, add cvs tag detection, and output
- cygwin "info" defines.
-
-Tue Oct 20 18:42:50 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/cygwin32/version.h: rewrite versioning comments,
- updating for new scheme but keeping historical information.
-
-Mon Oct 19 23:45:24 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/windows.h: remove Objective-C BOOL ifdef, now taken
- care of within the include/Windows32 header files.
- * fhandler_console.cc: fix KeyEvent references in light of
- changes to the KeyEvent struct in the Windows32 headers.
-
- Update include/Windows32 header files. Changes from
- Mumit Khan <khan@xraylith.wisc.edu>, Corinna Vinschen
- <corinna.vinschen@cityweb.de>, and me.
- * include/Windows32/CommonFunctions.h: new file, contents from
- Functions.h.
- * include/Windows32/*.h: Misc updates.
-
-Mon Oct 19 20:26:15 1998 Christopher Faylor <cgf@cygnus.com>
-
- * debug.cc: Throughout, avoid calling *_printf while lock
- is active. Previous lock count was not thread-safe.
- * fhandler_console.cc (console_read): Avoid sending a
- \r to caller if ENABLE_LINE_INPUT.
- (fhandler_console::read): Rely on console_read to handle
- \r\n conversion.
-
-Mon Oct 19 12:10:09 1998 Christopher Faylor <cgf@cygnus.com>
-
- * mkvers.sh: Use more portable constructs to allow running
- this with /bin/sh, bash, and ksh.
-
-Mon Oct 19 11:19:58 1998 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (mount_info::from_registry): Missed "b15.0" part
- for writing mount information back to registry.
- (mount_info::init): Remove obsolete stuff.
-
-Mon Oct 19 10:42:17 1998 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Avoid newer GNU make construction when building
- version.cc.
-
-Mon Oct 19 00:09:06 1998 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: invoke mkvers.sh with $(SHELL)
-
-Sun Oct 18 15:19:17 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.cc (set_name): Accept unit argument for generating
- win32_name.
- (fhandler_base::fhandler_base): Ditto.
- (fhandler_dev_floppy::fhandler_dev_floppy): Ditto.
- (fhandler_dev_tape::fhandler_dev_tape): Ditto.
- (fstat): Set symlink bit only if symlink_p is positive.
- * fhandler.h: Reflect unit argument changes.
- * fhandler_serial.cc (fhandler_serial::fhandler_serial): Accept
- unit argument for generating win32_name.
- * hinfo.cc (hinfo::build_fhandler): Pass unit argument to constructor
- where apropriate.
- * path.cc (path_conv::path_conv): Set symlink_p to a positive
- value if !nofollow, negative otherwise.
- (windows_device_names): Can't default to \dev\comx. \dev part
- doesn't work.
- (get_device_number): Accept just "comN" for backwards compatibility.
-
-Sat Oct 17 01:58:15 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (globify): Fix problem with argument corruption
- due to use of pointer freed by realloc.
-
-Sat Oct 17 00:10:53 1998 Christopher Faylor <cgf@cygnus.com>
-
- Change NOT_OPEN_FD to dtable.not_open throughout.
- * Makefile.in: Change .dll name to cygwin1.dll. Increment
- the '1' when there are API/shared memory changes. Make
- version.cc file every time .dll is linked. Remove datestamp
- stuff.
- * mkvers.sh: New file. Creates version.cc.
- * cygwin.din: Export setdtablesize.
- * dcrt0.cc: Remove obsolete version variables.
- (build_argv): Use issep() macro rather than isspace since
- isspace includes whitespace that the shell does not consider
- a command separator.
- (check_sanity_and_sync): Use new cygwin version defines and
- structures for compatibility checking.
- (dll_crt0_1): Ditto.
- (__api_fatal): Renamed from api_fatal. Now always called from
- macro which tacks program name to beginning of fmt. Increase
- size of buffer.
- * environ.cc (regopt): Use new reg_key class constructor
- functionality.
- * net.cc (getdomainname): Ditto.
- * path.cc (read_mounts): Ditto.
- (mount_info::from_registry): Ditto.
- (mount_info::to_registry): Ditto.
- (hash_path_name): No need for this to be a "C" function.
- * external.cc (cygwin32_internal): Export version info strings.
- * external.h: Add CW_GETVERSIONINFO.
- * fhandler.cc (fhandler_base::write): Eliminate use of MIN macro.
- * init.cc (set_dllname): Obsolete function. Handled in version.cc.
- (dll_entry): Remove reference to set_dllname.
- * libccrt0.cc (this_proc): Renamed from cygwin_statu.
- (cygwin_crt0_common): Record api version in this_proc.
- * mmap.cc (recreate_mmaps_after_fork): No need for this to be
- a "C" function.
- * syscalls.cc (close_all_files): Ditto.
- * pinfo.cc (lock_pinfo_for_update): Eliminate a compiler warning.
- * registry.cc: Eliminate reg_session class. Augment reg_key to handle
- functionality of reg_session.
- * registry.h: Ditto.
- * shared.cc (shared_name): No need for this to be a "C" function.
- Use new cygwin version structure.
- (shared_info::initialize): Use new reg_key class constructor
- functionality.
- * smallprint.c (__small_vsprintf): Accept %P as a format specifier.
- Signifies the program name.
- * spawn.cc (spawn_guts): Quote *all* of the stuff the dcrt0.c considers
- special.
- * tty.cc (tty::inuse_event_exists): Remove debugging printf. It results
- in too much output to strace log.
- * uinfo.cc: Add a needed include.
- * uname.cc (uname): Use new cygwin version structure to fill in utsname
- fields.
- * winsup.h: Regroup into sections. Add new version structure.
- * include/utmp.h: Move login/logout function declarations here.
- * include/cygwin32/version.h: Define new CYGWIN version/info
- stuff here.
-
-Fri Oct 16 00:13:35 1998 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: enable building mingw subdir by default
-
-Thu Oct 15 12:01:08 1998 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (spawn_guts): Set all security attributes
- for CreateProcess so that sexec will work properly.
-
-Thu Oct 15 08:49:12 1998 Christopher Faylor <cgf@cygnus.com>
-
- * hinfo.cc (hinfo::dup2): Avoid a null pointer dereference
- in a debugging printf.
-
-Wed Oct 14 18:06:51 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from Corinna Vinschen <corinna.vinschen@cityweb.de>:
- * fhandler_console.cc (fhandler_console::dup): reset
- default_color since the console fhandler forgets its default
- colorizing when it's `dup'ed.
- (fhandler_console::fhandler_console): remove unnecessary
- erasing in constructor of fhandler_console.
-
-Mon Oct 12 22:20:59 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fcntl.cc (fcntl): According to the "Single UNIX Specification",
- F_DUPFD should *not* close its argument. Revert to previous
- behavior.
- * hinfo.cc (dup2): Guard against closing target fd too early.
- * pinfo.cc: Always initialize myself to a dummy value so that
- myself != NULL checks are avoided.
- * include/sys/strace.h (strace): Remove NULL check for myself.
- * dcrt0.cc (api_fatal): Ditto.
- * exceptions.cc (handle_exceptions): Ditto.
- * signal.cc (sigprocmask): Ditto.
- (_raise): Ditto.
- * strace.cc (get_strace_mutex): Ditto.
-
-Mon Oct 12 15:19:47 1998 DJ Delorie <dj@cygnus.com>
-
- * utils/ps.cc (main): use const char *pname
-
-Fri Oct 9 12:32:23 1998 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (getw): Simplify.
-
-Thu Oct 8 23:09:34 1998 Geoffrey Noer <noer@cygnus.com>
-
- * times.cc: add missing syscall_printfs to time functions,
- slight reformatting.
-
-Thu Oct 8 21:56:37 1998 DJ Delorie <dj@cygnus.com>
-
- * hinfo.cc (cygwin32_attach_handle_to_fd): allow to pass -1
- for dup() simulation; return allocated fd.
- * pinfo.cc (lock_pinfo_for_update): if the mutex is broken,
- fail instead of looping. If you do loop, don't use 100% CPU.
-
-Thu Oct 8 18:33:02 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc: Add another per-thread object for strace.
- (quoted): Fix misconception of method used to quote
- quotes.
- (globify): Optionally output arguments.
- (build_argv): Ditto.
- (dll_crt0_1): Fix typo in line reassignment.
- * debug.cc (class locker): Avoid calling lock multiple times.
- * exceptions.cc (call_handler): Set strace recursion flag
- to zero when invoking a signal handler.
- * fcntl.cc (_fcntl): F_DUPFD should close its argument.
- * fork.cc (fork): Move determination of parent process to
- a safer place.
- * sigproc.cc (get_sig_dispatch_mutex): Rename. Use macro
- interface to provide the name of the caller for strace output.
- (release_sig_dispatch_mutex): Ditto.
- * sigproc.h: Define *_dispatch_mutex wrappers.
- * strace.cc (strace_printf): Use new per-thread object to
- guard against recursion.
- * winsup.h: Define per_thread_strace_protect. Redo per_thread
- base class for a little more clarity.
-
-Wed Oct 7 22:30:43 1998 Geoffrey Noer <noer@cygnus.com>
-
- * fhandler_tty.h: up NTTYs from 16 to 128
-
-Wed Oct 7 09:15:55 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_console.cc (console_read): Distinguish between
- 0 byte return from CTRL-C and EOF condition.
-
-Tue Oct 6 22:31:44 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (build_argv): Rewrite. Now: 1) allocates argv on
- the fly, 2) inserts '@' files as they are found, 3) uses
- sh-style quoting using either " or ' which may be embedded
- in an argument.
- (insert_file): Don't scan command line. Accept already
- parsed arguments from build_argv.
- (quoted): New function for parsing quoted strings.
- (globify): Don't scan argv list. Accept element from
- build_argv which will be tacked to end of argv as it
- is being built. Extend quoting options to allow
- tilde, braces, and quotes.
- (dcrt0_dll_1): Simplify argv processing. Just call
- build_argv, which handles everything.
-
-Tue Oct 6 11:04:43 1998 Christopher Faylor <cgf@cygnus.com>
-
- Change Create[A-Z]* calls throughout to use sec_none_nih
- to avoid subprocesses accidentally inheriting handles.
- * grp.cc: Hold group structures in group_buf rather than
- an image of the /etc/group file.
- (parse_grp): New function to parse a group line into a
- struct group.
- (add_grp_line): Use parse_grp to add line from /etc/group
- into internal cache.
- (read_etc_group): Avoid redundant feof call. Set up
- default group.
- (getgrgid): Just return appropriate entry from group_buf
- rather than reparsing internal representation.
- (getgrnam): Ditto.
- (getgrent): Ditto.
- * hinfo.cc (hinfo::select_*): Set errno value when attempt
- is made to use an unopened fd.
- * passwd.cc: Hold passwd structures in passwd_buf rather than
- an image of the /etc/passwd file.
- (parse_pw): New function to parse a passwd line into a
- struct passwd.
- (add_pw_line): Use parse_pw to add line from /etc/passwd
- into internal cache.
- (read_etc_passwd): Avoid redundant feof call.
- (search_for): Just scan passwd_buf for matching entries.
- (getpwent): Just return appropriate entry from passwd_buf
- rather than reparsing internal representation.
-
-Mon Oct 5 18:06:31 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from Corinna Vinschen <corinna.vinschen@cityweb.de>:
- * sysdef/kernel32.def: add missing GetDiskFreeSpaceEx lines
-
-Sat Oct 3 23:52:23 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (si): Initialize so that NO_COPY will work.
- * debug.cc (class locker): Fix previous change. Critical
- sections are still required, so protect them if operating
- in main thread to avoid signal problems.
- Make any previously static use of locker global since that
- appears to be the only foolproof way of marking the variable
- NO_COPY. Rename these variables to something that is not
- likely to be collided with.
- * exceptions.cc (call_handler): Signal arrival of a dispatched
- signal here and wait a long time for the mutex before giving
- up. Should increase performance slightly.
- * sigproc.cc (maintid): New external symbol.
- * sigproc.cc (maintid): Make this global since it is used
- in other places now.
- (sig_dispatch_pending): Don't wait for wait_sig to complete
- if there are no pending signals. Avoids a race and should
- be faster.
- (wait_sig): Don't set signal_arrived event here. Do it in
- call_handler.
- * strace.cc (strace_printf): Remove previous recursion check
- since it is not signal safe.
- * syscalls.cc (_read): Remove duplicate CreateEvent typo.
-
-Fri Oct 2 09:54:42 1998 DJ Delorie <dj@cygnus.com>
-
- * strace.cc (strace_printf): protect against recursion
-
-Thu Oct 1 17:08:47 1998 Geoffrey Noer <noer@cygnus.com>
-
- * utils/ps.cc (main): add more detailed usage printfs
-
-Thu Oct 1 11:05:16 1998 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Fix typo in debug.o dependency.
- * debug.cc (class locker): Give up on using critical sections
- since they are not safe to use in the main thread due to signals.
-
-Wed Sep 30 22:34:42 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fork.cc (fork): Close parent's parent_alive handle
- if there is one or suffer a handle leak.
- * syscalls.cc (_read): Make all events no access and
- non-inheritable or suffer potential handle leak.
- * windows.cc (gethwnd): Ditto.
-
-Wed Sep 30 17:22:29 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/io.h: add missing setmode proto
-
-Tue Sep 29 23:33:11 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_tty.cc (fhandler_pty_master::close): Make sure
- both sides of both pipes associated with a tty master are
- closed or suffer handle leaks.
-
-Tue Sep 29 16:55:00 1998 Geoffrey Noer <noer@cygnus.com>
-
- * path.cc (mount_info::init): remove default mounts for
- raw devices.
- * utils/mount.cc (reset_mounts): ditto
- (main, usage): new -f flag disables warning messages about
- missing mount point directories. Two new flags, disabled for
- now: -c will create missing mount point directory, -g will
- select adding the mount point to the global registry location.
- * include/sys/mount.h: add MOUNT_GLOBAL define, for future use.
-
-Tue Sep 29 14:20:30 1998 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (exception): Use %p to denote some hex
- values.
- * winsup.h (read_info): Add jmp_buf to structure. Required
- for syscalls.cc change below.
-
-Mon Sep 28 19:36:41 1998 Syd Polk <spolk@cygnus.com>
-
- * include/{tchar.h, direct.h}: Added so that
- tcl8.1a2 can be compiled with cygwin.
-
-Mon Sep 28 19:36:41 1998 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (thread_reset): Yet another method for
- handling interruptible reads.
- (_read): Use thread_reset to reset reads after a signal.
-
-Sun Sep 27 21:11:46 1998 Christopher Faylor <cgf@cygnus.com>
-
- * cygwin.din: New alias for __cygwin32_stack_trace.
- * debug.cc (find_handle): Avoid leaving function without
- unlocking.
- (newh): Ditto.
- * exceptions.cc (__cygwin32_stack_trace): Rename to just
- `stack'. Shortens stack trace output.
- (exception): Use %p to distinguish register values.
- * fhandler_console.cc (fhandler_console::init): Remove
- debugging sig_protect.
- * init.cc (dll_entry): Move definition to avoid a
- compiler warning.
- * path.cc (mount_info::conv_to_win32_path): Detect
- case of root directory when setting win32 relative
- path.
- (mount): Remove obsolete label.
- * syscalls.cc (thread_sync): New function for exiting
- the read helper thread.
- (_read): Use new method for exiting the read helper
- thread.
-
-Sun Sep 27 11:25:06 1998 Christopher Faylor <cgf@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * delqueue.cc (delqueue_list::process_queue): Clear queue
- entry if file cannot be deleted for a reason other than
- sharing violation.
-
-Fri Sep 25 08:52:50 1998 Christopher Faylor <cgf@cygnus.com>
-
- * debug.cc: locker variables should all be static.
- * syscalls.cc (_read): Call ForceCloseHandle on
- thread handle since it is protected.
-
-Thu Sep 24 18:59:25 1998 Geoffrey Noer <noer@cygnus.com>
-
- * path.cc (mount): don't verify that path is an existing
- directory. Instead
- * utils/mount.cc: verify that path is an existing directory
- and print warning if it's not. Still do the mount.
-
-Thu Sep 24 11:45:04 1998 Christopher Faylor <cgf@cygnus.com>
-
- * debug.cc: locker class variables must be NO_COPY since
- they contain data that should not be precisely duplicated
- after a fork. This hopefully fixes a "SIGSEGV" problem.
- * select.cc (peek_pipe): Pipes apparently should set both
- "read" and "exception" flags on EOF.
-
-Wed Sep 23 18:26:31 1998 DJ Delorie <dj@cygnus.com>
-
- * doc/doctool.c (main): typo checking for --help
-
-Wed Sep 23 17:46:06 1998 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (symlink_check_one): Try much harder to ensure that
- CloseHandle is called on the file which was opened to check
- for a symlink. Avoid obsolete check for NULL buf.
-
-Wed Sep 23 17:11:50 1998 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (_read): Close thread handle or suffer a leak.
- * dir.cc (opendir): Simplify logic.
- (readdir): Ditto. Close handle explicitly when hit end
- of files.
- (rewinddir): Close directory handle or suffer leak.
- (closedir): Simplify logic.
-
-Wed Sep 23 14:42:12 1998 Christopher Faylor <cgf@cygnus.com>
-
- patch from DJ Delorie <dj@cygnus.com>:
- * path.cc (symlink_check_one): Don't re-define res or symlinks
- will be undetectable.
-
-Wed Sep 23 12:02:39 1998 Christopher Faylor <cgf@cygnus.com>
-
- * Change calls to api_fatal throughout to avoid need for \n
- (see below).
- Adapt some *_printf()/ExitProcess combinations to use api_fatal.
- * winsup.h (SIGTOMASK): Generate signal mask correctly for
- programs linked with newer cygwins.
- * dcrt0.cc (check_sanity_and_check): Set subtract constant for
- signal mask calculation based on whether binary was linked with
- "older" or "newer" cygwin.
- (do_global_ctors): Accept a second argument indicating whether
- the ctors should always be run. Necessary in forked processes
- for cygwin constructors which may do more than just allocate memory.
- (checkout): Remove obsolete function.
- (dll_crt0_1): Remove obsolete function call. Call do_global_ctors
- with second argument TRUE.
- (api_fatal): Change to a print-style function, allowing arguments.
- Always emit a "\n" after a message.
- (__main): Do not force running of constructors in forked processes.
- * exceptions.cc (call_handler): Simplify arguments passed to this
- function. Eliminate potential race by setting signal masks here.
- (sig_handle): Just calculate current sigaction pointer once.
- Change call_handler arguments.
- * fhandler_console.cc (fhandler_console::write_normal): Output
- unknown characters to screen.
- (fhandler_console::write): Make signal protection synchronous.
- * fork.cc (fork): Reorganize slightly to eliminate a compiler warning.
- * init.cc (dll_entry): Temporarily remove freeing of waitq_storage
- on thread detach until a more robust scheme is developed.
- * signal.cc (signal): Make signal protection synchronous.
- (sigaction): Ditto.
- * sigproc.cc (get_sig_dispatch_mutex): More debug info.
- (release_sig_dispatch_mutex): Work around potential bug in windows
- with double allocation of a mutex when WaitForSingleObject is
- interrupted. Save errno here only if about to call sig_send
- where it may be changed.
- (wait_sig): Remove unnecessary sig_sign stuff. Add some debugging
- output.
- * termios.cc (tcflow): Signal protection.
- (tcgetattr): Ditto.
- (tcsetattr): Make signal protection synchronous.
- * winsup.h: Add new extern for SIGTOMASK macro. Use it in SIGTOMASK
- macro. Move errno stuff to end so that it can benefit from previous
- declarations.
- * configure.in: Move AC_CANONICAL_SYSTEM up a little to avoid having
- configure generate some code (like the check for host type) twice.
- * configure: Regenerate.
-
-Wed Sep 23 11:49:55 1998 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (symlink_check_one): Fix handle leak resulting
- from open of file to check for symlink magic. Suggested
- by Corinna Vinschen <corinna.vinschen@cityweb.de> .
-
-Wed Sep 23 08:33:26 1998 Christopher Faylor <cgf@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * fhandler_tty.cc (process_ioctl): Use console handle
- for ioctl operations.
-
-Tue Sep 22 23:58:20 1998 Geoffrey Noer <noer@cygnus.com>
-
- based on patch from sos@prospect.com.ru (Sergey Okhapkin):
- * utils/ps.cc (main): rewrite ps to give it more options,
- including a, e, f, l, and u.
-
-Tue Sep 22 15:18:41 1998 Geoffrey Noer <noer@cygnus.com>
-
- * path.cc (umount): remove initial system_printf
- (mount): stat path, verify that it's an existing directory,
- otherwise fail.
- (strncasematch, strcasematch): return 0 instead of FALSE
- * utils/mount.cc (reset_mounts): reset / to System drive,
- not C: as was done in the old days.
-
-Mon Sep 21 18:18:18 1998 Geoffrey Noer <noer@cygnus.com>
-
- * path.cc (mount, umount, setmntent, getmntent, endmntent):
- make extern "C"
-
-Mon Sep 21 20:37:16 1998 DJ Delorie <dj@cygnus.com>
-
- * doc/configure.in: don't try to find cc until we can correctly
- configure it for a native cc in a cross build.
-
-Mon Sep 21 17:17:14 1998 Geoffrey Noer <noer@cygnus.com>
-
- * fhandler.cc (fhandler_disk_file::check_execable_p):
- don't check for .shc since that's non-standard. Check for
- .exe first.
-
-Mon Sep 21 14:57:50 1998 Geoffrey Noer <noer@cygnus.com>
-
- * doc/Makefile.in: reference -db2html in case docbook
- tools aren't installed.
-
-Mon Sep 21 14:43:40 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from DJ Delorie <dj@cygnus.com>:
- * doc/doctool.c (scan_file): correct off by one error in
- malloc
-
-Mon Sep 21 14:28:38 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h (select_record): Clear memory in constructor.
-
-Mon Sep 21 08:49:22 1998 Christopher Faylor <cgf@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * select.h: Use unsigned int to hold count in fd_set
- structure or suffer alignment problems.
- (WINSOCK_FD_ZERO): Back out previous change as it
- is no longer needed due to the above.
-
-Sat Sep 19 22:58:18 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_console.cc (console_read): Keep looping in
- ENABLE_LINE_INPUT mode when no characters are read.
- This apparently means that a CTRL-C has been hit.
- * select.cc (select_record::operator new): Remove.
- (setlect_stuff::~select_stuff): Use delete to remove
- record.
- (pipe_cleanup): Remove unneeded statement.
- (poll_socket): Add debugging statement.
- (start_thread_socket): Add debugging statements.
- * fhandler.h: Remove new operator from select_record.
- * select.h: Make WINSOCK_FD_ZERO more aggressive.
- * sigproc.cc (allow_sig_dispatch): Use new errno
- saving method.
- * syscalls.cc (_read): Reorganize stack freeing
- code to avoid overhead when it's not needed and
- to actually decommit stack memory.
-
-Sat Sep 19 19:16:32 1998 Christopher Faylor <cgf@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * select.cc (socket_cleanup): Avoid using a pointer
- after it has been deleted.
-
-Fri Sep 18 13:57:37 1998 Christopher Faylor <cgf@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * Makefile.in: Really remove extra slash in INCLUDES.
- Previous change didn't work.
- pipe.cc (make_pipe): set close-on-exec flag for non-inheritable
- pipes.
-
-Thu Sep 17 15:26:14 1998 Christopher Faylor <cgf@cygnus.com>
-
- * doc/Makefile.in: Add dummy install target.
-
-Thu Sep 17 12:30:49 1998 Christopher Faylor <cgf@cygnus.com>
-
- * winsup.h (per_thread*): New classes for storing and
- manipulating per_thread information.
- (threadstuff): New array of per_thread objects which are
- manipulated after a fork.
- (read_helper_thread_info): read() thread local storage.
- (waitq_storage): wait() thread local storage.
- * debug.cc (class locker): New class for generic locking
- of debug table manipulation. Use this throughout for
- locking access to thread/debug tables.
- (debug_init): Remove in favor of automatic constructor.
- * debug.h: Ditto.
- * fork.cc (fork): Iterate through threadstuff looking
- for thread information to clear out. Should solve some
- problems for Windows 95/98.
- * init.cc (dll_entry): Remove thread storage initialization.
- Use per_thread class for DLL_THREAD_DETEACH.
- * sigproc.cc: Use system_printf rather than alert_printf
- throughout since system_printf now has the same functionality.
- (sigproc_init): Use method to initialize per-thread storage.
- * sigproc.h: Remove waitq_storage declaration.
- * syscalls.cc (_read): Use per_thread class to manipulate
- per-thread information.
- * wait.cc (wait4): Ditto.
-
-Wed Sep 16 12:58:49 1998 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.c (_read): Lower timeout for signal detection after
- EOF on device. Should fix recent configure performance problems.
- * Makefile.in: Extend clean target into regexp directory.
-
-Wed Sep 16 11:44:14 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.cc (fhandler_base::set_name): Honor no_free_names().
- (fhandler_base::linearize): Remove unneeded check for NULL
- get_win32_name().
- (fhandler_disk_file::fhandler_disk_file): Set path names
- to a standard constant. They should eventually be filled
- out by fhandler_disk_file::open.
- (fhandler_disk_file::open): Detect if win32_path_name_ is
- a dummy path. Fill it out from real_path, if so.
- * hinfo.cc (hinfo::init_std_file_from_handle): Improve debugging
- statement.
- (hinfo::linearize_fd_array): Remove unneeded check for NULL
- get*_name ().
- * path.cc (path_conv::path_conv): Correct problem with
- symlinks found at places like E:\.
-
-Wed Sep 16 02:25:33 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * fhandler.cc (fhandler_disk_file::open): fix typo.
-
-Tue Sep 15 23:52:44 1998 Christopher Faylor <cgf@cygnus.com>
-
- * winsup.h: Remove side effects from SLASH_P.
-
-Tue Sep 15 18:36:08 1998 Ben Elliston <bje@cygnus.com>
-
- * sysdef/kernel32.def: Add definition for the Win32 API function
- `TryEnterCriticalSection'.
-
-Tue Sep 15 12:26:48 1998 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Remove extra slash in INCLUDES.
- * hinfo.cc (hinfo::dup2): Always clear close-on-exec
- flag for duplicated handle (problem and fix determined
- by Sergey Okhapkin, sos@prospect.com.ru).
- * fhandler.cc (fhandler_base::set_name): Avoid use of empty
- path names.
- (fhandler_base::raw_read): Show error code on failure.
- (fhandler_base::linearize): Avoid copying NULL names.
- (fhandler_base::open): Use NULL detection in small_printf.
- (fhandler_base::dup): Move set_close_on_exec_flag to dup2
- so it is caught in all cases.
- (fhandler_disk_file::fhandler_disk_file): Set "no free names"
- flag.
- (fhandler_disk_file::open): Clear "no free names" flag since
- names have been allocated to the fhandler structure at this point.
- * fhandler.h (set_no_free_names): Newconditional "no free names"
- function.
- * hinfo.cc (hinfo::dup2): Clear close on exec here.
- (hinfo::linearize_fd_array): Avoid copying NULL names.
- * path.cc (normalize_posix_path): Avoid copying trailing slash
- if root.
- (nofinalslash): Rename variable.
- * path.h: Add flag for future use.
- * regexp/regerror.c: Avoid including RCS strings in product.
- * regexp/regsub.c: Ditto.
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * select.cc (thread_pipe): Sleep for 10ms on every iteration.
- (start_thread_pipe): Set the handle in the select structure
- so that it will be properly identified in select_stuff::wait.
-
-Tue Sep 15 12:28:30 1998 DJ Delorie <dj@cygnus.com>
-
- * added documentation and doctool.c
-
-Tue Sep 15 08:37:26 1998 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Fix LIBGCC definition for native builds.
- Remove CFCOMMON in favor of configure solution.
- * configure.in: Default CXXFLAGS to be == CFLAGS.
- * configure: regenerate.
-
-Sun Sep 13 19:52:04 1998 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: include ../libio when building
-
-Sun Sep 13 19:30:58 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/cygwin32/version.h: bump version minor now that
- we've merged in all that new code...
-
-Sun Sep 13 21:34:33 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (do_global_ctors): Reverse call order
- of constructors thanks to insight from Mumit Khan
- (hkan@xraylith.wisc.edu).
- (do_global_dtors): Reflect above change: invoke destructors
- in the proper order.
- * smallprint.c (__small_vsprintf): Gracefully detect a
- null pointer for '%s' format.
- * syscalls.cc (_read): Set correct flags to retrieve stack
- information or suffer sporadic failures due to uninitialized
- flag.
- * regexp/regexp.c: Comment out RCS string. This provides
- no useful information in the .dll.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- Merge in experimental-980602 branch changes.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (symlink_check_one): known_suffix needs to be
- determined here in some cases, so deal with it here.
- (path_conv::path_conv): More effort needed to propagate
- the known_suffix back to caller in every case.
- (has_suffix): Return suffix found.
- (readlink): Avoid two passes through symlink_check_one.
- * spawn.cc (find_exec): Propagate known_suffix from
- perhaps_suffix back to caller, if appropriate.
- (spawn_guts): Use suffix returned from find_exec to
- determine if file should be scanned as a script when
- a #! file is found. Avoids a duplicate call to
- perhaps_suffix.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * path.h (suffix_info): New struct for dealing with standard
- suffix (.exe, .bat, etc.) information.
- (path_conv): Constructor now takes a suffix_info argument.
- (std_suffixes) Standard array of suffixes to consider "special".
- * path.cc (path_conv): Constructor now takes a suffix_info
- argument. Record any known suffix in path_conv known_suffix
- field.
- (has_suffix): New function for determining if a path already
- has a known suffix.
- (next_suffix): New function for returning the next suffix from
- a list of suffixes.
- (symlink_check_one): Take an optional suffix_info argument
- for suffixes to consider or tack on.
- * spawn.cc (std_suffixes): Standard list of executable suffixes.
- (perhaps_suffix): Pass std_suffixes to path_conv. Use
- new known_suffix field in path_conv to determine if a
- suffix has been detected.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- Substitute new str{,n}casematch for strcasecmp throughout.
- This implementation is faster since it only tests equality.
-
- Change fhandler*::open throughout to return true/false
- since the pointer returned was never used for anything.
-
- * Use strcasestr throughout for case insensitive matches for
- filenames.
- * Makefile.in: Use GNU make construct for determining gcc lib.
- * dcrt0.cc (check_sanity_and_sync): Make error message more
- explicit.
- * debug.h: Better defines for dummy functions when !DEBUGGING.
- * fhandler.cc (fhandler_base::fstat): Don't bother zeroing buf
- here since it is always done in the caller.
- (fhandler_base::~fhandler_base): Recognize cases where *_path_name_
- should not be freed.
- (fhandler_disk_file::open): Split into two functions. First
- function performs a path_conv and does testing on same. This
- calls new fhandler_disk_file::open with path_conv data. New
- function is called by stat_worker to avoid extra path tests and
- mallocs.
- Also, fix long standing off-by-one typo looking for #! magic.
- Also, reapply test for != WinNT when checking files for magic.
- Otherwise there is a tremendous slowdown in file opening, especially
- for stat().
- * fhandler.h: Add support for setting/detecting when *_path_name
- should not be freed.
- Add new fhandler_disk_file::open declaration.
- * hinfo.cc (digits): Remove obsolete function.
- (hinfo::build_fhandler): Add default name for FH_DISK.
- * path.cc (path_prefix_p_): Don't check beyond len1 for leading
- slash. Responsible for reported performance problems?
- (path_conv::path_conv): Ensure that fileattr is filled out
- correctly in all cases. Return immediately when a file
- is detected in !follow_mode.
- (nofinalslash): Simplify.
- (strncasematch): New function similar to strncasecmp except
- that it only checks for =/!= and benchmarks faster than same.
- (strcasematch): Ditto, re. strcasecmp.
- (strcasestr): New function which does a case-insensitive strstr.
- Needed for filename matching.
- * smallprint.c (__small_vsprintf): Fix off-by-one in %.ns processing.
- * spawn.cc (exe_exts): Make global for eventual use by other modules.
- * syscalls.cc (_fstat): Zero buf prior to use.
- (stat_worker): Rename from _stat_worker. Reorganize to minimize
- mallocs and path name conversions. Should now perform only one
- path conversion and 0 malloc/frees.
- * winsup.h: Declare new functions.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- Clean up error messages throughout using new strace_printf
- options.
- * smallprint.c (__small_vsprintf): Add %E option for printing
- error code. Understand %.n syntax.
- * strace.cc (strace_vsprintf): Common routine for formatting
- strace output. Default to always ending with \n unless
- string ends with \b.
- (strace_write): Common routine for writing to strace output.
- (strace_printf): Use above two routines.
- (system_printf): Ditto.
- * path.cc (path_conv): Scan path to be converted from right
- to left for efficiency. Implement extension searching
- which is passed from spawn to symlink_check_one to minimize
- overhead.
- (symlink_check_one): Check extensions for existence for use
- with spawn.
- (readlink): Accommodate changes to symlink_check_one.
- * spawn.cc (perhaps_suffix): Use new extension checking
- capabilities of path_conv.
- (find_exec_1): Delete.
- (find_exec): Generalize to allow searching on any PATH like
- environment variable.
- * dllfcn.cc (check_path_access): Use find_exec to find a path.
- This also ensures that paths are in Windows format which was
- not the case before.
- * environ.cc (conv_envvars): Add LD_LIBRARY_PATH.
- * fork.cc (fork): Clean up dll loading slightly.
- * Makefile.in: Turn on compiler warnings.
- * winsup.h (save_errno): New class for saving errno from
- being clobbered.
- * include/sys/strace.h: Make system_printf a macro similar
- to strace_printf_wrapper.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc (sig_send): Attempt to work around Windows strangeness
- when thread interrupted while waiting for completion event.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc: Remove debugging function DELETEME ().
- * fhandler.cc (fhandler_base::fstat): Respond to compiler warning.
- * signal.cc (sleep): Reset signal_arrived event before using it or
- we could wake up immediately.
- (usleep): Ditto.
- (pause): Ditto.
- * spawn.cc (spawn_guts): Ditto. Respond to compiler warning.
- * sigproc.cc (sig_send): More debugging info.
- (sig_dispatch_mutex): Only ping wait_sig when needed.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (socket_cleanup): Close thread handle or suffer
- handle leak.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (verify_true): New function.
- (fhandler_socket::select_*): Use verify_true for verification
- function to avoid multiple calls to socket select.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (select_stuff::wait): Scan entire list of fds
- when WFMO wakes up.
- (set_bits): Add some strace debugging output.
- (thread_socket): Ditto.
- (verify_ok): Return result of set_bits rather than always 1.
- (start_thread_socket): Set the handle in the select structure
- so that it will be properly identified in select_stuff::wait.
- (fhandler_windows::select_read): Verification routine should
- be `poll_windows'.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc: Change some sigproc_printfs to only occur when
- #ifdef DEBUGGING.
- * spawn.cc (perhaps_suffix): Search for (PROG is the pathname to
- the executable file) PROG.exe, PROG.com, PROG.bat, PROG.cmd, and
- PROG and return extension found or NULL if no matching file.
- (spawn_guts): If the file name of the executable ends in either
- .exe, .com, .bat, or .cmd we assume that it is not a script file
- and therefore do not open the file to determine if it is.
- Fix "wait_failed" error when exec() called and non-cygwin parent.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dir.cc (rmdir): Set correct errno when non-empty directory and
- Windows9x.
- * pipe.cc (pipe): Use binary mode by default for pipes.
- * syscalls.cc (_read): Wait for terminated thread to exit before
- clearing its stack memory.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * hinfo.cc (hinfo::fixup_after_fork): Start initial fd search
- to zero forked processes so that a close(0)/dup(fd) will work.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_windows::set_close_on_exec: Deal with possible
- NULL handle.
- (fhandler_windows::fixup_after_fork): Ditto.
- * select.cc (select_stuff:wait): Handle return from
- MsgWaitForMultipleObjects correctly for windows case.
- * sigproc.cc (sig_send): Reset completion event for main thread.
- * syscalls.cc (_read): Better handling of stack free condition.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (call_handler): Exit earlier if just running
- in an exec'ed stub since the stub may own the sig_dispatch mutex,
- but we still want to exit.
- * select.cc (select_stuff::wait): Fix check for window activity
- from MsgWaitForMultipleObjects. Handle infinite wait correctly.
- (poll_windows): Add debugging output.
- * spawn.cc (spawn_guts): Protect against signals interrupting
- at an inopportune moment.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (select_stuff:test_and_set): Take appropriate action
- when a select record uses a window_handle.
- (fhandler_windows::select_read): Set handle and windows_handle
- appropriately.
- (fhandler_windows::select_write): Ditto.
- (fhandler_windows::select_except): Ditto.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (cygwin32_select): Need to reset signal_arrived before
- testing it or suffer loop.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fork.cc (resume_child): Give up on SuspendThread synchronization
- and use subproc_ready/forker_finished events.
- (sync_with_parent): Ditto.
- * sigproc.cc (wait_sig): Make sigcomplete_main manual reset to
- allow handling of nested interrupts.
- (wait_sig): Fix stupid typo on exit that would cause a
- loop to run for a long time. Are exits faster now?
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (unlock_cs): Leave decision to release
- sig_dispatch_mutex to the caller.
- (set_process_mask): Call release_sig_dispatch_mutex explicitly
- if needed.
- (handle_sigsuspend): unlock_cs no longer takes an argument.
- (call_handler): Try to acquire the strace mutex prior to
- suspending the main thread to ensure that the mutex is always
- released.
- (sig_handle): Call release_sig_dispatch_mutex explicitly.
- * fhandler_console.cc (fhandler_console::write): Protect against
- signals while writing.
- * signal.cc (signal): Protect against signal dispatch.
- (sigaction): Ditto.
- * sigproc.cc (sig_dispatch_pending): Return status no longer needed.
- (sig_send): Assume pending_signals if sending signal to self.
- (allow_sig_dispatch): Accept synchronize argument to control whether
- to wait for wait_sig to do its thing.
- (release_sig_dispatch_mutex): Just awaken wait_sig loop and wait
- for acknowledgement if waitfor is TRUE.
- (wait_sig): Don't ever zero pending_signals to avoid a possible race.
- Set pending_signals for blocked signals, too.
- * sigproc.h: Add __SIGFLUSH signal.
- (class sig_protect): Allow destructor to wait for signal dispatch,
- or not given constructor argument.
- * strace.cc (get_strace_mutex): Renamed from waitfor_strace_mutex.
- (release_strace_mutex): External function for use by call_handler.
- This replaces raw calls to ReleaseMutex throughout.
- * syscalls.cc (_read): Use sig_protect to protect against signals.
- Other cosmetic cleanups.
- (_close): Protect function with sig_protect.
- * termios.cc (tcsetattr): Protect function with sig_protect.
-
-Thu Sep 10 21:09:51 1998 DJ Delorie <dj@cygnus.com>
-
- * syscalls.cc (_read): typo in matching printf format to args.
-
- * fhandler.cc (write): Switch to the Microsoft/DJGPP way of
- writing out text files: pass \r but prepend \r to \n.
- (read): Don't collapse multiple \r's.
-
- * delqueue.cc: rewritten for speed. Don't check *every* entry in
- the list if we know the list is empty, plus check for duplicates.
- * delqueue.h: ditto.
- * path.cc (path_conv): If a path component is missing, short-
- circuit the symlink check.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h: Reorder fhandler status field so that device is
- in lower bits. This allows gcc to optimize access to the device.
- * hinfo.cc: Inline not_open().
- * winsup.h: Inline hinfo::not_open(). Make hinfo::[] operator a
- simple array reference.
- * strace.cc: Change strace() to a macro.
- * include/sys/strace.h: Ditto.
- * syscalls.cc (read_handler): New function. Called directly from
- _read for "non-slow" devices or via read_handler for slow devices.
- (_read): Use read_handler for reading.
- (read_helper): Ditto.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (do_exit): Don't ignore signals if reparenting.
- Besides being a race, this screws up the process which is
- actually executing.
- * fork.cc (fork): Don't create a new process group when
- forking or subprocesses won't respond to CTRL-C.
- * syscalls.cc (_read): Ensure correct setting of EINTR errno.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fork.cc (sync_with_child): Consider it a success if the child
- has set the subproc_ready signal regardless of whether it has
- exited or not.
- * init.cc (dll_entry): Set read_helper_thread_info stuff to 0
- on dll initialization. Windows 95 seems to keep garbage here,
- despite documentation to the contrary.
- * syscalls.cc (_read): Report on errors to create read_helper
- events.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (compute_argc): Limit debug_printf string argument size
- or suffer a buffer overrun.
- (do_exit): Add debugging statement.
- * exceptions.cc (call_handler): Remove extraneous sigproc_printf.
- Consolidate signal_arrived event with sig_was_dispatched.
- (events_terminate): Consolidate signal_arrived event with
- sig_was_dispatched.
- * fhandler.h: Rename a field to something more mnemonic.
- * fhandler_tty.cc: Throughout: Only set up fhandler_tty_master when
- actually using ttys. Change tty_master `f' field to `console'.
- * tty.cc: Ditto.
- * fork.cc (sync_with_child): Add more information to "child died"
- error.
- * hinfo.cc (hinfo::build_fhandler): Call tty master constructor
- when appropriate.
- * select.cc (select_stuff::wait): Consolidate signal_arrived event
- with sig_was_dispatched.
- * sigproc.h: Ditto.
- * syscalls.cc (_read): Ditto.
- * winsup.h: Ditto.
- * sigproc.cc: Ditto, throughout.
- (block_sig_dispatch): Don't reset signal_arrived. Causes races.
- * spawn.cc (spawn_guts): Limit debug_printf string argument size
- or suffer a buffer overrun.
- * include/sys/strace.h: Implement strace_minimal for very minimal
- output which, hopefully, will not affect the behavior of traced
- programs as much.
-
-Thu Sep 10 21:09:51 1998 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: build libwinspool.a with the dll name winspool.drv
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (build_argv): Remove verbose debug_printf.
- (dll_crt0_1): Use shared data handle passed in from parent process
- when appropriate. Remove extraneous debug_printf.
- * environ.cc (getwinenv): New function. Returns (possibly cached)
- native version of an environment variable.
- (win_env::add_cache): Add cached version of posix and win env
- variables to local table.
- (posify): Modify for use with native caching.
- (setenv): Convert special environment variables to native here,
- when they are set.
- (struct parse_thing): Simplify struct.
- (struct parse_things): Extend table to accommodate "envcache"
- setting.
- (parse_options): Add "envcache" option to control whether special
- environment variables are cached. Simplify handling of remembered
- parameters.
- (winenv): Modify for use with getwinenv.
- * exceptions.cc (unlock_cs): release_sig_dispatch takes an argument
- now.
- (set_process_mask): unlock_cs now wakens wait_sig when appropriate.
- (handle_sigsuspend): Reorganize to take advantage of new behavior
- of release_sig_dispatch_mutex and hopefully avoid a race.
- (handle_sig): Avoid waking wait_sig if we couldn't get the dispatch
- mutex.
- * exec.cc (strccpy): Change to modify second argument to point
- to position where "parse" stopped so that it doesn't have to be
- recalculated by the caller.
- (sexecvpe): Use find_exec () to find program to run. If you've
- got a function for this, you might as well use it.
- * fhandler_tty.cc (fhandler_pty_master::process_input_to_slave):
- Report on signal being sent in termios_printf. Use kill_pgrp
- interface.
- * fork.cc (fork_copy): Just copy everything at once rather than
- in individual pieces.
- (fork): Potentially move up sbrk() when DEBUGGING so that parent
- and child heaps are in sync. Pass cygwin_shared_h to child.
- * path.cc (path_conv::path_conv): Make sure that a file is not
- a symlink when returning immediately.
- * sigproc.cc (sig_dispatch_pending): Return TRUE if signals were
- pending.
- (sigproc_init): Move sig_was_dispatched initialization here so
- that it will always be available to other functions which rely
- on it. Otherwise these functions would have to wait for wait_sig
- to complete its initialization.
- (sig_send): Rework SIGSUSPEND handling.
- (release_sig_dispatch_mutex): Wait for signal to be dispatched
- after releasing mutex if argument is TRUE.
- (wait_sig): Remove sig_was_dispatched initialization from here.
- * sigproc.h: release_sig_dispatch takes an argument.
- * spawn.cc (perhaps_suffix): Take an optional argument indicating
- whether the path has already been converted to win32.
- (find_exec_1): Use getwinenv to get windows version of PATH. Use
- windows version of individual directories to avoid posix lookups.
- (spawn_guts): Call strace_dump here to cause strace output to
- be slightly more synced when using strace caching.
- (spawnvpe): Use find_exec () to find program to run. If you've
- got a function for this, you might as well use it.
- * syscalls.cc (_read): Only block signals for "slow" devices.
- * winsup.h: Changes needed for previous checkin and getwinenv.
-
-Thu Sep 10 21:09:51 1998 DJ Delorie <dj@cygnus.com>
-
- * path.cc (path_conv): bug fix when path ends in slash
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.cc (fhandler_base::set_name): Use fhandler
- method for determining native name. Avoid path_conv
- when possible.
- (fhandler_disk_file::get_native): New function, returns
- windows name of disk file.
- * fhandler.h: Add get_native() method to fhandler_*
- classes.
- * fhandler_serial.cc (fhandler_serial::get_native): Return
- windows name of serial port.
- * fhandler_tty.cc (fhandler_tty_master::init): Use consistent
- name for tty master.
- * fork.cc (fork_copy): Experimental change to avoid loop.
- * grp.cc (add_grp_line): Use realloc to extend group buffer.
- * hinfo.cc (hinfo::release): fd object should be deleted,
- not freed or suffer a memory leak.
- (init_std_file_from_handle): Reset first_fd_for_open to
- signal that std* locations have been opened. Avoids use
- of these locations prior to full dtable setup.
- * passwd.cc (add_pwd_line): Use realloc to extend passwd buffer.
- * path.cc (path_conv::path_conv): Avoid checking for symlinks on
- network shares. Check for existence of file prior to taking
- it apart for symlink checking (this needs more work).
- (windows_device_names): Make global.
- (get_device_number): Detect tty master.
- * sigproc.cc (wait_sig): Maintain a flag which indicates when
- signals are queued due to the wait_sig's inability to get a
- sig_dispatch mutex.
- (sig_dispatch_pending): Don't wake up the wait_sig thread if
- unless there are signals queued (see above) or force argument.
- (allow_sig_dispatch): Only wait for signal dispatch if something
- is queued.
- * sigproc.h: allow_sig_dispatch takes a (defaulted) argument now.
- * syscalls.cc (_open): Use default hinfo::find_unused_handle call.
- * net.cc: Ditto, throughout.
- * pipe.cc: Ditto.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (do_exit): Ignore user initiated signals here.
- * fhandler.cc (fhandler_disk_file::open): Detect error condition
- on fhandler_base::open.
- * fhandler_console.cc (undo_input): Respond to compiler warnings.
- * grp.cc (getgrgid): Ditto.
- * times.cc (_tzname): Ditto.
- * fhandler_tty.cc (fhandler_Tty_slave::open): Cosmetic changes.
- * fork.cc: Clean up debugging output.
- * pinfo.cc (pinfo_init): Set pgid and sid to different values
- initially. Let user program set sid appropriately if it is
- to be the owner of a tty.
- * sigproc.cc (allow_sig_dispatch): Try harder to detect when we
- should wait for a signal dispatch.
- * strace.cc (strace_open): Revert to previous mutex behavior.
- * include/sys/strace.h: Ditto.
- * syscalls.cc (_open): Detect error from fhandler open.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- Global changes:
- Store win32 name in fhandler structure to avoid multiple translations.
- Support close_on_exec at the Win32 level for all but sockets.
- Respond to gcc warnings.
- Use single fstat() call for devices.
- *::set_close_on_exec modified.
- * dir.cc (opendir): Use win32 name in stat to speed things
- up a little.
- * debug.cc: New file. Provides routines for extra debugging
- when -DDEBUGGING is specified.
- * debug.h: New file. Definitions for debug.cc.
- * exceptions.cc (signals_init): Break out signal initialization
- from exceptions.
- (dump_status): Add thread name to stack dump output.
- (handle_exceptions): Renamed.
- (set_process_mask): Don't ever mask non-maskable signals.
- (ctrl_c_handler): Preliminary change to allow propagation of
- cygwin signals back to gdb.
- (sig_handle): Call do_exit directly from signal thread rather than
- attempting to redirect the main thread.
- * fhandler.cc (set_name): Store win32 name in fhandler structure.
- (*::open) name field is extraneous now. Use get_win32_name () to
- retrieve stored win32 name.
- (fhandler_base::fstat): Default to performing fstat on a device.
- (fhandler_disk_file::fstat): Renamed from fhandler_base::fstat.
- Operate only on disk files.
- (fhandler_base::set_close_on_exec_flag): New function sets flag
- without touching the handle.
- (fhandler_base::~fhandler_base): Free unix/win32 path names.
- (fhandler_disk_file::close): Only call delqueue.process_queue from
- this function since disk files are the only things that can
- be unlinked, currently.
- (fhandler_dev_null::open): Delete.
- (set_inheritence): New function. Set handle inheritence.
- (fhandler_*::fork_fixup): New functions. Inherit fhandler data
- after a fork.
- fhandler.h: *::set_output_handle - new method.
- Setup methods for use by select().
- fork.cc (fork): Call fixup_after_fork in child to inherit
- handles marked as non-inheritable on CreateProcess.
- hinfo.cc (hinfo::build_fhandler): Use new function to detect
- devices.
- (dup_for_exec): Delete obsolete function.
- (hinfo::dup2): Remove extraneous tests.
- (hinfo::select_*): Interfaces into select().
- (hinfo::release): Free fd in dtable.
- (hinfo::fixup_after_fork): New function. Inherit close-on-exec
- handles from parent after fork.
- path.cc (mount_info::posix_path_p): Make inline.
- (path_conv::path_conv): Short circuit when path resolves to a device.
- (digits): Move here from hinfo.cc.
- (windows_device_names): Win32 names for Cygwin devices.
- (get_device_number): New function. Return devie number given device
- name.
- (win32_device_name): New function. Decode a windows device name
- and an optional "unit".
- (mount_info::conv_to_win32_path): Short circuit when path resolves to
- a device.
- * path.h: add device and unit fields to path_conv class.
- * select.cc: Rewrite for more structure, more OO.
- * sigproc.cc: (get_sig_dispatch_mutex): New function.
- (release_sig_dispatch_mutex): New function.
- * sigproc.h: sig_protect class. Automatic protection from signals
- when used.
- * syscalls.cc (stat_dev): New function.
- (stat_worker): Short-circuit when a cygwin device is detected.
- * utils/ps.cc: Don't lock_pinfo when -f. Compress format to fit
- more on a line.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (dll_crt0_1): Register name for main thread.
- * exceptions.cc (dump_status): Add thread name to diagnostic output.
- (__cygwin32_exception_handler): Rename to handle_exceptions. Avoid
- creating a .core file.
- * exec.cc (sexecve): Reflect spawn_guts argument change.
- * fhandler_tty.cc (fhandler_tty_master::init): Use makethread to
- create a new thread.
- * select.cc: Create pipe/socket threads each time select is called.
- Use thread termination as indication of fd readiness.
- * sigproc.cc (sigproc_init): Use makethread to create a new thread.
- (wait_sig): Simplify default signal call slightly.
- * spawn.cc (spawn_guts): Accept child pinfo pointer rather than
- pid. Reorganize so that common initialization is handled once.
- * strace.cc: Set strace_mutex to NULL initially to catch CreateMutex
- errors.
- * window.cc (gethwnd): Use makethread to create a new thread.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Add debug.o target.
- * cygwin.din: Separate pipe from _pipe.
- * dcrt0.cc (alloc_stack): New, more precise method for allocating
- stack space after a fork.
- (dll_crt0_1): Use new child_proc_info class to retrieve information
- from possible parent process. Remove #ifdef erroneously checked in.
- Remove extraneous syscall_printf.
- * exceptions.cc (signals_init): New function.
- * fhandler.cc (fhandler_make_pipe): Move to pipe.cc.
- * fhandler.h (fhandler_base): New = operator preserves unix_path_name_.
- * fhandler_tty.cc: Strip some tty functions from here into tty.cc.
- * fork.cc: Remove obsolete ifdefs. Reorganize, streamline with new
- fork.
- * hinfo.cc: Speed up build_fhandler.
- * libccrt0.cc: Remove obsolete ifdefs.
- * pinfo.cc (pinfo_init): Simplified by new fork/spawn info passing
- method.
- * pipe.cc (make_pipe): Moved from fhandler.cc. Handles MS-style
- _pipe.
- (pipe): Use new arguments to make_pipe.
- (_pipe): New MS-compatible function.
- * shared.cc: cygwin_shared_h make global so that it can be inherited
- via new fork/spawn info passing method.
- (open_shared_file_map): Detect if shared info is already set up from
- fork/spawn.
- * sigproc.cc (sigproc_init): Initialize signals with signals_init here.
- Use new fork/spawn info passing method.
- * spawn.cc (spawn_guts): Pass information in a structure to spawned
- process. Identify structure type with a "magic number".
- * strace.cc (strace_printf): Only print program full path spec once
- to save space and clutter. Preserve any windows error.
- * syscalls.cc (_open): Detect and avoid error return from
- build_fhandler.
- * tty.cc: Accept some non-fhandler functions formerly found in
- fhandler_tty.cc
- * winsup.h (pinfo): Remove some fields obsoleted by new fork/spawn
- info passing method.
- (child_info*): New classes for passing information to forked/spawned
- process.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Add debug.o target.
- * console.cc (fhandler_console::char_command): Fix failed merge.
- * dcrt0.cc (alloc_stack): New, more precise method for allocating
- stack space after a fork.
- (dll_crt0_1): Use new child_proc_info class to retrieve information
- from possible parent process. Remove #ifdef erroneously checked in.
- Remove extraneous syscall_printf.
-
-Thu Sep 10 21:09:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- Global changes:
- Replace pinfo hmap entry with "dtable" reference.
- Replace cygwin_shared .t field with '.tty' and allow indexing via
- tty into this array.
- Make fhandler_ constructors set the size of the structure into any
- created class.
- Change fhandler settings into a bit mask. Use methods to access.
- Record device type in fhandler class.
- Remove old linearize/de_linearize code in favor of newer method
- uses more bullet-proof method for determing device type of inherited
- files.
- Protect various important handles from closing when operating
- under -DDEBUGGING.
- * dcrt0.cc (do_global_ctors): Renamed, made static and reused
- for calling from dll_crt0_1 to initialize cygwin.dll constructors.
- (do_global_dtors): Renamed.
- (dll_crt0_1): mark noreturn. Use new do_global_ctors function.
- Call debug_init to initialize features turned on by -DDEBUGGING.
- Call dtable_init to initialize dtable, hinfo_init to initialize
- standard fds.
- (dll_crt0): Mark noreturn. Move constructor calls to dll_crt0_1.
- (__main): Use new do_global_ctors ().
- Remove OLDWAY and _PPC_ conditionals.
- * environ.cc (environ_init): Use appropriate strace printf.
- * exceptions.cc (set_process_mask): Don't ever mask out unmaskable
- signals.
- * init.cc (dll_entry): Initialize storage for read_helper.
- * pinfo.cc (init_from_exec): Delete obsolete function.
- * sigproc.cc (sig_send): Implement myself_nowait to allow
- sending a signal to myself without waiting for synchronization.
- (wait_sig): Change method for determining whether signal should
- be examined slightly.
- * strace.cc (strace_printf): Add ability to report on thread from
- which message originated.
- (threadname): New function
- * syscalls.cc (read_helper): New function. Invoked in separate thread
- from _read.
- (_read): Use a separate thread for reads that can be interrupted
- with a TerminateThread(). Allows EINTR.
- (setdtablesize): Use new method for extending the size. Callable
- from anywhere.
- (getdtablesize): Use new method for getting the current dtable size.
- * tty.cc: Remove use count in favor of a method which checks tty
- availability via an event. Some code cleanup.
- (tty::inuse): New function for determining if a tty is
- in use by any process.
- (tty_list::terminate): Use new method for determining if a tty is in
- use. Should avoid hangs waiting for non-existent processes to
- free up a tty.
- (tty::common_init): Common initialization for tty/pty master.
- (fhandler_tty_master::init): New function.
- (do_output): Use new method for determining if a tty is in use.
- (fhandler_pty_master::open): Use comon initialization code.
- (fhandler_pty_master::ptsname): static buffer is ok now.
- * tty.h: Reflect inuse changes and tty.cc cleanup.
- * winsup.h: Include debug.h for use when -DDEBUGGING. Remove
- stuff previously here which was conditionally compiled with -DDEBUGGING.
- (hinfo_vec): Rename to hinfo. Maintain argv style list of pointers
- to open fds. Add methods to deal with above changes.
- (pinfo): Removals due to above changes.
- (shared_info): Rename t to tty.
- Add common defines to extern "C" section.
-
-Wed Sep 9 22:24:50 1998 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (path_prefix_p_): Rewrite to avoid false match
- against root when remote path or \\x style disk device.
- * include/sys/strace.h: Implement new macro for use by
- malloc_printf which does not default to "on" if STRACE=1.
- This avoids massive strace logs.
-
-Tue Sep 8 11:31:42 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (dll_crt0_1): Remove ill-advised ifdef NEEDOEM.
-
-Thu Sep 3 17:54:18 1998 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Speed up dll links.
- * path.cc (chdir): Fix previous change.
-
-Mon Aug 31 12:23:33 1998 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (chdir): Protect free from potential signal race.
-
-Fri Aug 28 15:59:27 1998 Geoffrey Noer <noer@cygnus.com>
-
- * dlfcn.h: delete, move it
- * include/dlfcn.h: here
-
-Thu Aug 27 14:20:38 1998 Christopher Faylor <cgf@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * path.cc (path_conv::path_conv): remove trailing backslash from
- full win32 name, otherwise the last component of the path isn't
- checked for symlink.
-
-Wed Aug 26 14:15:22 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h (fhandler_base): Make set_name() public and implement
- clear_name() to accommodate dup2.
- * hinfo.cc (dup2): Previous change exposed problem with dup2.
- Same unix_path_name_ ptr was being used in two separate fds.
- Fix this.
-
-Wed Aug 26 12:10:27 1998 Christopher Faylor <cgf@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * malloc.cc: Use malloc_printf throughout.
- * path.cc (getcwd_inner): Allocate buffer with realloc to
- avoid a memory leak.
- * syscalls.cc (_close): delete unix_path_name_ explicitly since
- destructor is never called.
- * include/sys/strace.h: Add strace_malloc stuff.
-
-Mon Aug 24 15:45:59 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/sys/ioctl.h: variable names in protos should start
- with two leading underscores.
- * include/sys/mman.h: ditto.
- * include/sys/mount.h: ditto.
- * include/sys/resource.h: ditto.
- * include/sys/smallprint.h: ditto.
- * include/sys/socket.h: ditto.
- * include/sys/strace.h: ditto.
- * include/sys/vfs.h: ditto.
- * include/sys/wait.h: ditto.
- * include/mntent.h: ditto.
-
-Tue Aug 18 17:00:20 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from Trevor Yann (TYann@vet.com.au):
- * uname.cc (uname): report processor type for win98
-
-Tue Aug 18 16:09:13 1998 Christopher Faylor <cgf@cygnus.com>
-
- * fork.cc (cygwin_fork_helper1): Start initial fd search
- to zero forked processes so that a close(0)/dup(fd) will work.
-
-Mon Aug 17 16:58:09 1998 Christopher Faylor <cgf@cygnus.com>
-
- * winsup.h (hinfo): Remember initial fd to start searching
- for new fds. This avoid assigning std/in/out/err to
- files opened early in initialization.
- (hinfo_vec::find_unused_handle): New default way to search
- for a new handle. Avoids using std/in/out/err until the
- proper time in the initialization.
- * fhandler.cc (fhandler_make_pipe): Use default method for
- finding unused handle.
- * net.cc: Ditto throughout.
- * pipe.cc (dup): Ditto.
- * syscalls.cc (_open): Ditto.
- * hinfo.cc (hinfo_vec::init_std_file): Set initial fd for open
- search to include std/in/out/err.
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * spawn.cc (perhaps_suffix): Use translated win32 path when
- determining if a .exe extension should be added or suffer adding
- a .exe extension twice.
-
-Mon Aug 10 15:08:49 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/cygwin32/version.h: up minor version number
-
-Mon Aug 10 07:04:13 1998 DJ Delorie <dj@cygnus.com>
-
- * delqueue.cc: rewritten for speed. Don't check *every* entry in
- the list if we know the list is empty, plus check for duplicates.
- * delqueue.h: ditto.
-
-Sat Aug 8 14:03:52 1998 Eric Bachalo <ebachalo@cygnus.com>
-
- * spawn.cc (perhaps_suffix): If report_failure_p is non-zero this
- function will search for (PROG is the pathname to the executable
- file) PROG.exe, PROG, PROG.com, PROG.bat, and PROG.cmd and return
- either the full path name if found or NULL if not.
- (spawn_guts): If the file name of the executable end in either
- .exe, .com, .bat, or .cmd we assume that it is not a script file
- and therefore do not open the file to determine if it is.
-
-Thu Aug 6 22:25:38 1998 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (path_conv): If a path component is missing, short-
- circuit the symlink check. Bug fix for case where path ends
- in a slash.
- (path_conv::path_conv): Make sure that a file is not
- a symlink when returning immediately. Avoid checking for
- symlinks on network shares. Check for existence of file prior
- to taking it apart for symlink checking (this needs more work).
-
-Sun Aug 2 19:17:59 1998 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (cleanup_pipe_thread): Cleanup thread handle or suffer
- handle leak.
- (cleanup_socket_thread): Ditto.
- * sigproc.cc (proc_subproc): Make wait thread manual reset to
- solve problem with nested waits not waiting correctly.
- * fhandler_tty (fhandler_tty_slave::open): Don't create the output
- mutex, just open it. If it can't be opened, its an error.
-
-Wed Jul 29 12:08:19 1998 Eric Bachalo <ebachalo@loony.cygnus.com>
-
- * include/Windows32/Defines.h: Added Virtual-Key Code defines
- for the Win95 keys - VK_LWIN, VK_RWIN, and VK_APPS.
-
-Tue Jul 21 14:47:59 1998 DJ Delorie <dj@cygnus.com>
-
- * path.cc (path_prefix_p): optimize calls by comparing first
- characters inline.
- (path_conv): optimize by not checking both foo and foo/ for
- symbolic links.
-
-Tue Jul 21 14:39:03 1998 Christopher Faylor <cgf@cygnus.com>
-
- * pinfo.cc (pinfo_init): Set myself->sid to 1 so that
- a program started up outside of cygwin will not trump
- other opens of ttys. Fixes problem with pgid change below.
-
-Tue Jul 21 12:59:21 1998 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (chdir): Force chdir to disk device to go to the root
- directory.
-
-Tue Jul 21 09:32:23 1998 Christopher Faylor <cgf@cygnus.com>
-
- * pinfo.cc (pinfo_init): 0 is a very bad value for a default pgid.
-
-Fri Jul 16 15:09:50 1998 Stan Cox <scox@cygnus.com>
-
- * (gcrt0.c, gmon.c, profil.c, mcount.c, gmon.h, profil.h,
- config/i386/profile.h): New files for gprof cygwin support.
- Some code contributed by Tim Newsham for Secure Networks, Inc.
- * Makefile.in (LIBGMON_A, GMON_START, GMON_OFILES): New for gprof.
-
-Mon Jul 13 19:29:00 1998 Eric Bachalo <ebachalo@loony.cygnus.com>
-
- * dcrt0.cc (insert_files): Now both -@file and @file work as
- command line file insertion options.
- * fhandler_serial.cc (fhandler_serial::open): Enabled RTS Control
- Line by default to make full handshaking cables work for the
- D10V board. (CDB.fRtsControl)
- (fhandler_serial::tcsetattr): same as above
-
-Wed Jul 8 15:53:35 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (dll_crt0_1): Avoid redundant strace_printf.
-
-Wed Jul 8 15:05:10 1998 DJ Delorie <dj@cygnus.com>
-
- * fhandler.cc (fhandler_base::lseek): Note lseek so that next
- write() can check for the Win95 "gap" bug.
- (fhandler_base::write): If Win95 and lseek past eof
- followed by write, use WriteFile to force the "gap" to be filled
- with zeros rather than left to the "undefined" data Win32 specifies.
- (fhandler_base::fhandler_base): initialize check_win95_lseek_bug_.
- * fhandler.h (class fhandler_base): Add check_win95_lseek_bug_
- for bug: when seek past EOF and write, win95 fills with random
- data (security hole).
-
-Thu Jul 2 10:45:15 1998 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc (winenv): Be more paranoid when restoring special
- win32 environment variables beginning with '='.
-
-Thu Jul 2 09:19:32 1998 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc: Previous change was not rigorous enough.
- Track environment variables to convert in a structure which
- records the correct function for converting the environment
- variable from/to POSIX format.
- (isspecial): New function.
- (parse_options): Use template to initialize parse array.
- (posify): Use new conversion function.
- (winenv): Ditto. Also restore special win32 environment variables
- beginning with '='.
- * path.cc (conv_path_list): Source argument should be const.
- (win32_to_posix_path_list): Ditto.
- (posix_to_win32_path_list): Ditto.
- * path.h: Reflect changes to path.cc.
-
-Tue Jun 30 14:00:32 1998 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc (winenv): Avoid converting environment variables to
- windows style if they begin with something like a 'C:'.
-
-Sun Jun 28 20:59:16 1998 Christopher Faylor <cgf@cygnus.com>
-
- * include/Windows32/Structures.h (MINMAXINFO): Add a missing
- *LP...
-
-Thu Jun 25 10:45:38 1998 Christopher Faylor <cgf@cygnus.com>
-
- * signal.cc (sigpending): Stop from always reporting pending signals
- when no signals are actually pending.
-
-Tue Jun 23 15:38:45 1998 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Add a new target.
- * cygwin.din: Add cygwin32_internal interface.
- * dcrt0.cc (dll_crt0_1): Don't call main if no main set. Allows
- initialization from a .dll.
- * utils/ps.cc: Use new internal/external interface to cygwin to
- provide an unchanging interface to some cygwin internals.
- * external.h: Preliminary stab at an interface to cygwin32 for
- getting at the "naughty bits".
- * external.cc: External interfaces to some cygwin internal stuff.
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * exceptions.cc (sig_handle): When abnormally terminating,
- close_all_files in signal thread context to prevent socket hangs.
-
-Thu Jun 18 15:17:06 1998 Christopher Faylor <cgf@cygnus.com>
-
- * pinfo.cc (pinfo_list::allocate_pid): Wrap pids at SHRT_MAX
- or ash complains.
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * window.cc (WndProc): Always kill timer before starting up
- a new one or eventually suffer a timer proliferation.
-
-Mon Jun 15 09:40:30 1998 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc: Cosmetic change.
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * syscalls.cc (system): Ignore SIGINT, SIGQUIT and SIGCHLD while
- in a system() call.
-
-Thu Jun 11 18:37:02 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/sys/syslog.h: add missing LOG_LOCALn bits
-
-Tue Jun 9 22:29:26 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dll_init.cc (DllNameIterator::operator const char* ()): Add
- a missing \n to a *_printf.
- * fhandler_tty.cc (fhandler_tty_slave::dup): Ditto.
- (fhandler_tty_slave::ioctl): Ditto.
- * errno.cc (errmap): Add an unrepresented windows error.
- Simplify table.
-
-Tue Jun 9 17:21:44 1998 Christopher Faylor <cgf@cygnus.com>
-
- * errno.cc (errmap): Make sure that errmap array is
- terminated with a NULL or suffer a SIGSEGV.
-
-Tue Jun 9 10:30:02 1998 Christopher Faylor <cgf@cygnus.com>
-
- Change `sprintf' to `__small_sprintf' throughout cygwin.
- * cygwin.din: Don't export exception handler.
- * exceptions.cc (__cygwin32_exception_handler): Rename to
- handle_exceptions. Make static. Redo core file generation
- slightly so that __small_sprintf can be used.
- (call_handler): Remove use of `rethere' in asm code. Don't
- probe stack as this is potentially dangerous unless done
- meticulously.
- * select.cc (select): Redo to create thread whenever needed
- for pipe/socket. Thread termination denotes fd readiness.
-
-Mon Jun 8 14:31:11 1998 Christopher Faylor <cgf@cygnus.com>
-
- * hinfo.cc (set_std_handle): New function to set windows
- "standard" handles from cygwin handles.
- (hinfo_vec::dup2): Set windows standard handle if appropriate.
- * syscalls.cc (_open): Set windows standard handle if appropriate.
-
-Sun Jun 7 16:34:00 1998 Christopher Faylor <cgf@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * fhandler_console.cc (fhandler_console::scroll_screen): Add a
- workaround for Win95 ScrollConsoleScreenBuffer bug which allowed
- scrolling to work correctly in both directions.
- (fhandler_console::char_command): Simulate underscore with cyan
- instead of magenta like on a real linux console.
-
-Sat Jun 6 00:01:18 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc: Remove obsolete PPC and OLDWAY defines.
- * exceptions.cc: Remove obsolete PPC defines.
-
-Fri Jun 5 22:18:01 1998 Christopher Faylor <cgf@cygnus.com>
-
- * utils/Makefile.in: install should build products if necessary.
-
-Fri Jun 5 17:47:11 1998 Geoffrey Noer <noer@cygnus.com>
-
- * errno.cc (seterrno): shouldn't & against 0xff since there
- are error codes above 255.
-
-Fri Jun 5 14:35:36 1998 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (ctrl_c_handler): Ignore CTRL_LOGOFF_EVENT or
- everybody gets signalled when a user logs off. Allow program
- to clean up when receiving a CTRL_CLOSE_EVENT or CTRL_SHUTDOWN_EVENT.
- * spawn.cc (_spawnve): Delete hmap.vec from created child since
- it just gets overwritten in the child anyway.
- * pinfo.cc (lpfu): u -> user_data.
-
-Thu Jun 4 22:45:12 1998 Geoffrey Noer <noer@cygnus.com>
-
- * mmap.cc (mprotect): 3rd arg to VirtualProtect call should
- be new_prot, not prot. Also, fix check for PROT_NONE (==,
- not &).
-
-Wed Jun 3 16:37:43 1998 Geoffrey Noer <noer@cygnus.com>
-
- * exceptions.cc: Fix typo in comment
- (ctrl_c_handler): Add comments, return FALSE on CTRL_CLOSE_EVENT,
- CTRL_LOGOFF_EVENT, and CTRL_SHUTDOWN_EVENT events. Otherwise,
- we handle the console event ourselves, send a SIGINT, and return
- TRUE.
-
-Wed Jun 3 14:36:08 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * path.cc (conv_to_win32_path, conv_to_full_win32_path): resolve
- symlinks before converting.
-
-Wed Jun 3 02:11:23 1998 Geoffrey Noer <noer@cygnus.com>
-
- * exceptions.cc (ctrl_c_handler): return zero when a
- CTRL_LOGOFF_EVENT occurs.
-
-Wed Jun 3 01:01:17 1998 Geoffrey Noer <noer@cygnus.com>
-
- Reorganize fhandler-related file layout.
- * Makefile.in: Remove console.o, add fhandler_console.o. Add
- fhandler_serial.o. Remove tty.o, add fhandler_tty.o.
- * fhandler_console.cc: Was console.cc.
- * console.cc: Delete.
- * fhandler_serial.cc: Was code in fhandler.cc.
- * fhandler.cc: Delete fhandler_serial routines.
- * fhandler.h: Fix comments describing fhandler file layout.
- * fhandler_tty.cc: Was code in tty.cc.
- * tty.h: Delete.
- * fhandler_tty.h: Was tty.h.
- * tty.cc: Delete code moved to fhandler_tty.cc.
- * winsup.h: Include fhandler_tty.h instead of tty.h.
-
-Tue Jun 2 23:34:42 1998 Geoffrey Noer <noer@cygnus.com>
-
- Don't need processor-specific sysdef directories:
- * sysdef/powerpc: remove all files
- * sysdef/i386: move all files to top of sysdef directory
- * configure.in: stop setting processor-specific sysdef variable
- * configure: regenerate
- * Makefile.in: build .a files from top-level sysdef files.
-
-Tue Jun 2 16:52:18 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from lhall@rfk.com (Larry Hall):
- * console.cc (fhandler_console::fhandler_console): call
- fillin_info() to check if console attributes have already been
- set. If so, set the default foreground color to be the default
- for the console, otherwise set it to white.
- (fhandler_console::char_command): use the default color to set fg,
- bg, and bold for all cases.
-
-Mon Jun 1 14:05:01 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dir.cc (writable_directory): Avoid a malloc.
- (opendir): Convert to fully qualified path spec. Use inode from
- stat as hash instead of recalculating.
- (readdir): Try hard to generate the same inode for filenames
- as inodes returned from stat(). Handle '.' and '..' inodes
- differently than normal files. Note that '..' will still fail
- in certain pathological conditions.
- * fhandler.cc (fstat): Preserve errno around path conversion.
- * path.cc (path_conf::path_conv): Add an extra argument signifying
- whether caller wants a fully qualified Windows spec.
- (get_current_directory_name): New function. Retrieves current
- directory name into internal buffer.
- (getcwd_inner): Reorganize. Use get_current_directory_name()
- to retrieve a (possibly cached) directory name.
- (hash_path_name): Move function here from syscalls.cc. Rewrite to
- deal (simplistically) with non-absolute path specs. Use
- get_current_directory_name to absolutize path.
- * path.h: Reflect additional argument for path_conv.
- * select.cc (cygwin32_select): Remove newline from select_printf().
- * syscalls.cc (hash_path_name): Move to path.cc.
- (stat_worker): Always use full path spec so that inodes are
- calculated correctly.
- * uinfo.cc (getlogin): Make extern "C".
- * include/sys/resource.h: Put extern "C" around this file.
-
-Mon Jun 1 13:16:03 1998 Christopher Faylor <cgf@cygnus.com>
-
- * console.cc: Comment out small_printfs which issue errors
- on things like invalid escape sequences. This is very much
- unlike a normal terminal, or even like linux which console.cc
- purports to emulate.
- (console_read): Renamed from FakeReadConsole. Streamline
- slightly.
- (fhandler_console::read): Ditto.
-
-Fri May 29 22:41:18 1998 Geoffrey Noer <noer@cygnus.com>
-
- * hinfo.cc: Include unistd.h, not fcntl.h.
-
-Fri May 29 21:38:10 1998 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (mount_info::binary_win32_path_p): Don't allow
- the root mount to replace a //drive or //host specification.
-
-Fri May 29 08:20:28 1998 Geoffrey Noer <noer@cygnus.com>
-
- * winsup.h: Remove exports section in favor of external
- include files. Fix some comments.
- * {console.cc, fcntl.cc, pipe.cc}: Include unistd.h.
- * dcrt0.cc (__main): Make extern "C".
- * strace.cc: Include time.h.
- * wait.cc (_wait): Make extern "C".
- * version.h: Bump minor version to 3 in honor of /dev/windows
- support.
-
-Fri May 29 03:11:28 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * Makefile.in: Add fhandler_windows.o target
- * fhandler.h: Include <sys/ioctl.h>. fhandler_windows: new
- fhandler class that handles access to Windows message queue.
- (fhandler_base::is_windows): new virtual member function
- * fhandler_windows.cc: New file, fhandler_windows class
- implementation.
- * hinfo.cc (hinfo_vec::build_fhandler): build fhandler_windows
- class for "/dev/windows". Include <sys/ioctl.h>.
- * select.cc: New fd_windows_map class
- (fd_windows_map::convert_to_unix_fdset): New, check for Windows
- messages in a queue.
- (cygwin32_select): check for windows fd is passed to select call,
- increase size of harray by one to support windows pseudo-handle,
- do MsgWaitForMultipleObjects if windows fd passed to select call.
-
-Thu May 28 18:22:24 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * utils/cygpath.cc: New file.
- * utils/Makefile.in (PROGS): Add cygpath$(EXEEXT).
- (cygpath$(EXEEXT)): Ne target.
-
- * include/sys/cygwin.h: Declare more path conversion functions.
-
-Thu May 28 15:56:26 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/sys/ioctl.h: need to include <sys/cdefs.h>
- * syscalls.h: remove ioctl proto
-
-Wed May 27 01:34:06 1998 Geoffrey Noer <noer@cygnus.com>
-
- * cygwin.din: add sethostent/endhostent exports
- * net.cc (sethostent, endhostent): new stubs
-
-Fri May 22 17:31:50 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/cygwin32/in.h: correct typo in IPPORT_WHOIS define
-
-Fri May 22 17:00:48 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/sys/ioctl.h: add ioctl proto
-
-Wed May 20 18:52:31 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/sys/param.h: delete, file overlaps with newlib's.
- Move it to newlib/libc/sys/cygwin32/sys where such files
- are supposed to go.
-
-Wed May 20 18:20:35 1998 Geoffrey Noer <noer@cygnus.com>
-
- * select.cc (auto_del_fd_set_map::auto_del_fd_set_map): correct
- C++ problem -- can't use parens in call to new.
-
-Wed May 20 17:03:25 1998 Geoffrey Noer <noer@cygnus.com>
-
- based on patch from newsham@lava.net (Tim Newsham):
- * select.cc: FIXMEs added/adjusted
- (select_sleep): new static select helper function
- (cleanup_sockthread): ditto
- (cleanup_pipethread): ditto
- (cygwin32_select): remove degenerate goto in favor of calling
- select_sleep, call cleanup_sockthread and cleanup_pipethread
- instead of previously duplicated code.
-
-Wed May 20 02:21:37 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from Christopher Faylor <cgf@cygnus.com>
- * fhandler.cc (fhandler_serial::raw_read): When
- vmin_ == 0, vtime_ > 0, don't force only one char at a time
- to be read.
- (fhandler_serial::tcsetattr): set to.ReadIntervalTimeout
- and to.ReadTotalTimeoutMultiplier appropriately so reads
- will time out properly when vmin_ == 0, vtime_ > 0.
-
-Tue May 19 09:05:46 1998 Christopher Faylor <cgf@cygnus.com>
-
- * init.cc (set_dllname): Use consistent "cygwin32" name for dll
- if the name of the dll is actually cygwin. This will allow
- better interoperability between dlls which have been renamed,
- i.e., cygwindevo.dll -> cygwin98r1.dll.
-
-Mon May 18 22:39:35 1998 Christopher Faylor <cgf@cygnus.com>
-
- * winsup.h: Remove sig* undefs since this is now done in newlib.
- Define SIGTOMASK define for use by signal mask operations.
- * exceptions.cc (__cygwin32_exception_handler): Use SIGTOMASK.
- (sig_handle): Ditto
- * signal.cc (sigpending): Ditto.
- (sigaddset): Use SIGTOMASK. Disallow signal 0.
- (sigdelset): Ditto.
- (sigismember): Ditto.
- * strace.cc (strace_printf): It is possible for strace_mutex to
- be an invalid handle. Open the mutex if so. Call ReleaseMutex
- until exhausted since a signal may have interrupted an strace_printf.
- (strace_dump): Call ReleaseMutex until exhausted.
- * tty.cc (do_output): Remove strace printf to avoid filling up strace
- output.
- (fhandler_tty_slave::read): Use SIGTOMASK.
-
-Mon May 18 09:11:38 1998 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (dll_crt0_1): Clear errno before calling main.
-
-Thu May 14 00:37:01 1998 Geoffrey Noer <noer@cygnus.com>
-
- * dcrt0.cc: add comments, reformatting
-
-Wed May 13 17:47:23 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * times.cc (to_time_t): prevent stat from returning incorrect
- file modification time (one second less) on fat partitions due
- to round-up error.
-
-Wed May 13 16:03:07 1998 Geoffrey Noer <noer@cygnus.com>
-
- * select.cc: add comments, FIXMEs, respace, delete old
- sockets-only case that was previously commented out.
- (cygwin32_select): in case where handles and sockets are
- set, don't check that always_ready_used is zero (that case is
- covered before).
- * syscalls.cc: delete unused file_queue struct.
-
-Tue May 12 18:36:25 1998 Geoffrey Noer <noer@cygnus.com>
-
- * syscalls.cc (get_os_type): add FIXME
-
-Tue May 5 14:02:12 1998 Christopher Faylor <cgf@cygnus.com>
-
- Throughout Cygwin replace use of "sa" SECURITY_ATTRIBUTE variables
- with appropriate global variables.
- * shared.cc (shared_init): Initialize global security attribute
- variables for use in various places around cygwin.
- * fork.cc (fork_init): Remove. Functionality replaced by above.
- * dcrt0.cc (dll_crt0_1): Remove obsolete fork_init() call.
-
-Sat May 2 17:40:51 1998 Christopher Faylor <cgf@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * tty.cc (create_tty_master): Fill in ut_host utmp field with
- local host name instead of "local" to avoid "who" command timeouts.
-
-Fri May 1 22:38:20 1998 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc: Add a global to control com port reset behavior.
- (parse_options): Recognize "reset_com" as a CYGWIN32 option.
- * fhandler.cc (fhandler_serial::raw_read): Handle vmin and vtime
- more like UNIX.
- (fhandler_serial::open): Revive code to reset com port on open.
- Only reset the port if reset_com global is not set and if this
- function is being called explicitly by open.
- (fhandler_serial::tcsetattr): Make CRTSCTS flow control more
- like UNIX -- it should turn on hardware handshaking in both
- directions. Handle vmin and vtime in a manner more consistent
- with UNIX.
- (fhandler_serial::tcgetattr): Reflect CRTSCTS changes above when
- reporting this state.
- * include/sys/termios.h: Move CRTSCTS and CRTSXOFF (sic) into
- 16 bits or they will never be capable of being set.
-
-Thu Apr 30 15:05:45 1998 Christopher Faylor <cgf@cygnus.com>
-
- * console.cc (fhandler_console::init): If resetting stdin,
- make sure to reset the ConsoleCtrlHandler.
- * exceptions.cc (set_console_handler): New function broken out
- of init_exceptions(). Sets the function responsible for handling
- CTRL-C.
- (init_exceptions): Snipped out set_console_handler.
-
-Thu Apr 30 14:11:30 1998 Christopher Faylor <cgf@cygnus.com>
-
- * include/sys/cygwin.h: Remove cygnus-specific declaration.
- * winsup.h: Move cygnus-specific cygwin32_attach_handle_to_fd
- declaration here. This function may eventually be replaced by
- an osf_* function.
-
-Tue Apr 28 17:07:46 1998 Geoffrey Noer <noer@cygnus.com>
-
- * passwd.cc (parse, getpass): remove unneeded uses of NO_COPY
- * grp.cc (getgrgid, getgrnam): ditto
-
-Tue Apr 28 16:18:03 1998 Geoffrey Noer <noer@cygnus.com>
-
- * version.h: bump minor version to 2
- * errno.cc: add FIXME
-
-Wed Apr 22 15:43:56 1998 Geoffrey Noer <noer@cygnus.com>
-
- * syscalls.cc (cygname): delete
- * shared.cc (shared_name): new, was cygname
- * strace.cc, exceptions.cc, sigproc.cc, shared.cc: fix
- cygname references in light of above
-
-Wed Apr 22 14:12:09 1998 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (fd_set_map::remove_pair_by_handle): minor optimization
- * strace.cc (strace_printf): change format for consistency
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * dcrt0.cc (dll_crt0): Call global constructors explicitly
- * tty.cc (create_tty_master): Remove code which attempted to
- invoke tty constructor
-
-Tue Apr 21 16:18:27 1998 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc (ucenv): inline
- (posify): Ditto
- (environ_init): remove obsolete function use
- * path.cc (symlink_check_one): Set errno here where appropriate.
- (readlink): Rely on errno set by symlink_check_one rather than
- defaulting to EINVAL. Should fix problems with RCS.
-
-Tue Apr 21 15:36:41 1998 Christopher Faylor <cgf@cygnus.com>
-
- * Implement a NOSTRACE preprocessor define to allow building
- Cygwin32 without any STRACE code.
- * configure.in: Add entries for architecture specific programs
- to allow easier cross-compile builds
- * configure: Ditto
- * Makefile.in: Ditto
- * console.cc (fhandler_console::char_command): Fix two problems
- with cursor position report: 1) it reported position relative
- to beginning of buffer rather than beginning of screen, 2) it
- reported y, x in reversed order
- * dcrt0.cc: Remove NO_COPY from variables that don't need it.
- Remove variables obsoleted by NO_COPY.
- (dll_crt0_1): strace settings are now inherited. Don't try
- to initialize strace early. Remove initialization of variables
- which are now handled automatically by NO_COPY. Set error mode
- for Cygwin32 to fail on critical errors rather than popping up
- a dialog box.
- * spawn.cc (spawn_guts): Always use default error mode when
- spawning a new process. Move error message to more generally
- useful location. Terminate signal handling in a cygwin parent
- process or two processes will be handling signals.
- (_spawnve): Inherit strace stuff
- * exceptions.cc (events_init): Provide more information on
- "Catastrophic failure". Change error message wording slightly.
- * fork.cc: Remove obsolete structure
- (cygwin_fork_helper1): Remove use of obsolete structure. Inherit
- strace settings in child processes.
- * sigproc.cc (sigproc_init): Set wait_sig priority immediately
- after thread creation.
- * smallprint.c: Remove unneeded include
- * strace.cc: Reorganize to handle NOSTRACE
- (strace_open): Use strace entries in pinfo structure which are
- now inherited
- (strace_dump): ditto
- (strace_init): preprocessor define STRACE_HHMMSS causes strace
- output to use alternate log file format.
- (strace_printf): ditto
- * syscalls.cc (access): Remove SetErrorMode in favor of global
- cygwin32 setting in dll_crt0_1.
- * fhandler.cc: Handle NOSTRACE
- * tty.cc: Ditto
- * window.cc: Ditto
- * include/sys/strace.h: Ditto
- * winsup.h: Move strace_file handle from per_process to pinfo so
- that it can be inherited. Remove obsolete pinfo entry.
-
-Tue Apr 21 14:30:52 1998 Christopher Faylor <cgf@cygnus.com>
-
- * hinfo.cc (cygwin32_attach_handle_to_fd): New function
- * include/sys/cygwin.h: Ditto.
- * cygwin.din: Export new cygwin-specific function
-
-Tue Apr 21 02:32:08 1998 Geoffrey Noer <noer@cygnus.com>
-
- * syscalls.cc: comment out file_queue struct that doesn't
- seem to be used for anything anymore. Don't need to include
- stdarg.h or sys/socket.h. Include utmp.h. Minor respacing.
- Move all functions from misc.cc here.
- (_read): change strace debug printf function name to _read
- (logout): rename success to res
- * misc.cc: delete file
- * Makefile.in: adjust for above change
-
-Tue Apr 21 01:45:05 1998 Geoffrey Noer <noer@cygnus.com>
-
- * dir.cc: new file for directory-related functions, was
- dirsearch.cc.
- (mkdir, rmdir, writable_directory): move here from syscalls.cc,
- writable_directory no longer static
- * dirsearch.cc: delete file
- * winsup.h: add proto for writable_directory.
- * errno.cc: new file for errno-related functions, move errmap
- struct here from syscalls.cc
- (seterrno): move from syscalls.cc
- (strerror): move from strerror.cc
- * strerror.cc: delete file
- * syscalls.cc: delete everything moved to any of the above files
- * Makefile.in: adjustments for above
-
-Thu Apr 17 16:43:23 1998 Geoffrey Noer <noer@cygnus.com>
-
- * termios.cc: add comments, add extern "C" in front of exported
- calls, move debugging local functions to end of file
- * winsup.h: remove fork_terminate proto for function that is no
- longer with us. Add strccpy proto.
- * spawn.cc (_spawnve): make static
- (strccpy): remove in favor of identical function in exec.cc
- * exec.cc (strccpy): no longer static
-
- patch from newsham@lava.net (Tim Newsham):
- * select.cc (cygwin32_select): fix off by one error, stop
- using memcpy to copy memory over itself
-
-Thu Apr 16 16:23:00 1998 Geoffrey Noer <noer@cygnus.com>
-
- * net.cc: respace, put all fhandler_socket functions together
- (getsockopt): fix case statement bug resulting in faulty strace
- output
- (setsockopt): ditto
- * shared.cc: throughout, rename global h to cygwin_shared_h
- * strerror.cc: make error global a local variable
- * fhandler.h: add comments, add virtual function always_read_ready
- to fhandler_serial which should return zero to allow non-blocking
- serial I/O.
- * Makefile.in: select.cc should depend on select.h
-
-Wed Apr 15 16:14:01 1998 Geoffrey Noer <noer@cygnus.com>
-
- * select.h: new file, containing macros used by select.cc.
- * select.cc: remove them from here, include select.h
-
-Wed Apr 15 15:23:55 1998 Geoffrey Noer <noer@cygnus.com>
-
- * ntea.cc (NTReadEARaw): mark as static, don't check allow_ntea
- since this is only accessed by functions that have already checked
- it.
-
-Tue Apr 14 14:07:54 1998 Geoffrey Noer <noer@cygnus.com>
-
- * cygwin.din: export truncate call
-
-Mon Apr 13 23:15:13 1998 Geoffrey Noer <noer@cygnus.com>
-
- Throughout Cygwin32, rename *u for per_process data *user_data.
- Likewise, rename *s for shared memory data *cygwin_shared.
- Respace where necessary.
- * registry.cc: minor respace
- * registry.h: ditto
- * net.cc: ditto
- * fhandler.cc (fhandler_base::read): don't redeclare int len
- * syslog.cc: add FIXME, reformatting, remove extern "C" around
- whole file, add before exported functions
- (syslog): rename second cp char pointer cp2
- (setlogmask): comment out unused function
-
-Mon Apr 13 17:55:43 1998 Geoffrey Noer <noer@cygnus.com>
-
- * environ.cc (parse_options): add "ntea" setting to CYGWIN32
- env variable. Setting determines whether NTEA is used or not.
- * ntea.cc: Add allow_ntea global which is inited to FALSE.
- Now instead of immediately returning FALSE, make all
- functions check allow_ntea variable and use or not use NTEA
- based on its value.
- * ps.cc (main): widen Win32_pid field by one to better handle
- Win 95 pids.
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * shared.cc (shared_info::initialize): increase default
- heap_chunk_size to 128 mb to get around the problem that
- Cygwin32 still can't cope with a split heap properly.
-
-Wed Apr 8 18:04:07 1998 Geoffrey Noer <noer@cygnus.com>
-
- * net.cc (cygwin32_bind, cygwin32_getsockname, cygwin32_listen,
- cygwin32_shutdown): if should check sock, not s.
-
-Wed Apr 8 15:00:46 1998 Geoffrey Noer <noer@cygnus.com>
-
- Eliminate warnings revealed by -Wshadow -Wall:
- * console.cc (FakeReadFile): fix aggregate with partly bracketed
- initializer (add missing brackets).
- * tty.cc (fhandler_tty_slave::close): remove unused variable tty
- (fhandler_tty_slave::dup): ditto
- (fhandler_tty_slave::send_ioctl_request): ditto
-
-Wed Apr 8 03:04:11 1998 Geoffrey Noer <noer@cygnus.com>
-
- Eliminate warnings revealed by -Wshadow -Wall:
- * console.cc (FakeReadFile): change variable name index to
- modifier_index.
- (fhandler_console::read): remove second definition of flags
- * dcrt0.cc (build_argv): rename s to start, e to end
- (insert_files): reformat, add parens around assign used as truth
- value, make i a DWORD, remove dup def of i.
- * dlfcn.cc (set_dl_error): rename s to str
- (checkAccess): rename to check_access
- (checkPathAccess): rename to check_path_access
- (getFullPathOfDll): rename to get_full_path_of_dll, don't
- redeclare len
- * dll_init.cc (DllList::detachDll): rename index to dll_index
- * fork.cc (cygwin_fork_helper1): rename index to dll_index,
- reformat slightly, rename res in dll load section to loadres,
- don't redeclare rc two additional times
- (dump_jmp_buf): rename s to sbuf
- * grp.cc (initgroups): rename group arg to grp
- * hinfo.cc (digits): rename s to str
- (hinfo_vec::build_fhandler): rename first buf variable to
- buf_info, the second to buff.
- (hinfo_vec::linearize_fd_array): cast sizeof return to int,
- declare i in for loop
- (hinfo_vec::de_linearize_fd_array): declare i in for loop
- * misc.cc (nice): rename pri to priority, index to curr
- (cygname): rename s to str
- (login): rename tty to currtty
- (logout) put missing parens around arg to sizeof calls
- * net.cc (DuplicateSocket): rename function to duplicate_socket,
- rename s arg to sock
- (fhandler_socket::fhandler_socket): rename s arg to sock
- (socketpair): rename sin to sock_in
- (cygwin32_rexec): rename passwd arg to password
- * passwd.cc (parse): rename stat array to tmpbuf
- * resource.cc (fill_rusage): rename creation to creation_time,
- exit to exit_time, kernel to kernel_time, user to user_time
- (getrusage): rename rusage arg to rusage_in
- * sigproc.cc (proc_terminate): move i declaration outside of
- loop, get rid of extra declaration
- (getsem): rename s to str
- (proc_strace): declare i at top of function, remove extra two
- declarations of it later
- * smallprint.c: include ctype.h for isalnum proto
- (__small_vsprintf): put parens around assign used as truth value
- * spawn.cc (spawn_guts): rename both s variables to str, remove
- redeclarations of i
- * strace.cc (mark): rename s arg to str
- * syscalls.cc (chown): remove unused vars group, passwd
- (access): rename s to st
- (ctermid): rename s to str
- * termios.cc (cfsetospeed, cfsetispeed): rename s to speed
- * times.cc (times): rename creation to creation_time,
- exit to exit_time, kernel to kernel_time, user to user_time
- (time_t_to_filetime, timeval_to_filetime): rename time to time_in
- * tty.cc (create_tty_master): rename utmp variable our_utmp
- (fhandler_tty_master::init): rename ttynum arg ttynum_in
-
-Tue Apr 7 17:18:05 1998 Geoffrey Noer <noer@cygnus.com>
-
- * syscalls.cc (seterrno): add FIXME
- * path.cc (symlink_check_one): change comment wording
-
- patch from Tom Tromey (tromey@cygnus.com)
- * syscalls.cc (access): Call SetErrorMode to turn off critical
- errors dialog.
-
- patch from Mikey (jeffdb@netzone.com):
- * fhandler.cc (fhandler_disk_file::open): under Win95, set
- S_IXOTH|S_IXGRP|S_IXGRP if the first two bytes of a file contain
- a '#!'.
- (fhandler_disk_file::check_execable_p): consider shell scripts
- execable
-
-Mon Apr 6 20:55:06 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/sys/cygwin.h: add protos for cygwin32 path conversion
- functions.
-
-Wed Apr 1 16:12:58 1998 Geoffrey Noer <noer@cygnus.com>
-
- * {fhandler.cc, fhandler.h, hinfo.cc, console.cc}: Rename
- fhandler_tty class to fhandler_serial
-
-Tue Mar 31 16:27:36 1998 Geoffrey Noer <noer@cygnus.com>
-
- * ntea.cc: temporarily disable reading/writing NTEA information
- due to the large penalty incurred on NT fat partitions.
-
-Fri Mar 27 13:35:30 1998 Geoffrey Noer <noer@cygnus.com>
-
- * environ.cc (parse_options): change struct to union to avoid
- references to uninitialized fields.
-
-Thu Mar 26 19:03:00 1998 Eric Bachalo <ebachalo@cygnus.com>
-
- * dcrt0.cc (insert_files): added this function to replace
- -@file in the command line with the contents of the file
- (dll_crt0_1): calls insert_files before building argv
-
-Wed Mar 25 15:25:26 1998 Geoffrey Noer <noer@cygnus.com>
-
- And more:
- * {fhandler.cc, fhandler.h, tty.cc, net.cc, console.cc}: make
- ioctl calls' cmd arg unsigned, ditto for access arg of init calls.
- * console.cc (fhandler_console::fillin_info): add parens around
- assignment used as truth value.
- (FakeReadFile): make copied_chars a size_t
- (fhandler_console::read): make i in loop unsigned
- * environ.cc (setenv): make l_value unsigned, add parens around
- assignments used as truth values.
- * exceptions.cc (call_handler): supposed to return an int and
- wasn't at the end of control flow. Now returns 1 there.
- * fhandler.h (~fhandler_base): destructor should be marked virtual
- * misc.cc (login): add parens around assignment used as truth
- value.
- * net.cc: cast INVALID_SOCKET to int in comparisons
- (fhandler_socket::ioctl): remove int cast to FIONBIO since cmd
- is now unsigned
- (get_win95_ifconf): add cast to signed vs unsigned int comparison.
- * ntea.cc (NTReadEA): add cast to signed vs unsigned int
- comparison.
- * path.cc (getcwd_inner): make len a size_t
- * pinfo.cc (cygwin32_winpid_to_pid): add comment
- * select.cc (cygwin32_select): make wait_ret an int
- * signal.cc (kill_worker): add parens around assignments used as
- truth values.
- * sigproc.cc (wait_sig): make rc a DWORD
- (sig_send): add parens around assignment used as truth value.
- * strace.cc: make inqueue global a static DWORD
- * tty.cc (do_output): add cast to signed vs unsigned int
- comparison.
- (fhandler_pty_master::open): remove unused handle nh
-
-Tue Mar 24 18:03:59 1998 Geoffrey Noer <noer@cygnus.com>
-
- More spring cleaning:
- * net.cc: move LOAD macro definition out of winsock_init,
- correction to make it valid ANSI C++.
- * grp.cc (read_etc_group): pass default line directly to
- add_grp_line call
-
-Mon Mar 23 19:21:00 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Christopher Faylor):
- * spawn.cc (spawn_guts): Don't call close_all_files if a cygwin
- process has been spawned. Otherwise, we close tty handles twice.
-
-Fri Mar 20 23:01:24 1998 Geoffrey Noer <noer@cygnus.com>
-
- * pinfo.cc (pinfo_list::init): Initialize next_pid to PBASE.
- (pinfo_list::operator []): Now index is given by pid mod size().
- (pinfo_list::allocate_pid): Allow more pid numbers than spaces in
- the process table. Pids now can range from PBASE (1000) to
- INT_MAX. At that point they wrap to 1000 again. For speed, use
- modular arithmetic to map pids into table.
- * winsup.h: move PBASE to pinfo.cc, rename next_pid_index to
- next_pid
- * utils/ps.cc (main): reorg of what's printed where, listing pid
- first.
-
-Thu Mar 19 15:05:07 1998 Geoffrey Noer <noer@cygnus.com>
-
- * winsup.h: Change section name in NO_COPY definition. We were
- using a .data$nocopy section to avoid copying certain data on
- fork. The linker used to include this between __data_start__ and
- __data_end__, but that broke building the cygwin32 dll. The fix
- is to rename the section ".data_cygwin_nocopy" and explictly
- include it after __data_end__.
-
-Wed Mar 18 15:03:51 1998 Geoffrey Noer <noer@cygnus.com>
-
- * tty.h: fix ttyslot proto; it returns an int
- * glob.h: fix glob proto; it returns an int
-
-Mon Mar 16 16:16:40 1998 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: stop installing the dll in the lib directory as
- well as the bindir.
- * environ.cc (parse_options): don't need to call malloc
-
-Mon Mar 16 11:56:23 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Christopher Faylor):
- * tty.cc (fhandler_tty_slave::dup): Don't set flags to 0. Flags
- have already been set in wrapper.
- * net.cc: Rename `s' variable which shadows global `s'.
- * termios.cc: ditto
- * time.cc: ditto
-
-Tue Mar 10 15:54:04 1998 Geoffrey Noer <noer@cygnus.com>
-
- * version.h: up CYGWIN_DLL_VERSION_MINOR
-
-Tue Mar 10 15:41:29 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Christopher Faylor):
- * spawn.cc (spawn_guts): Make argument handling after `#! pgm'
- handle spaces similarly to UNIX. Close "linearized" file handles
- when a non-cygwin32 binary is executed or suffer hangs on exit.
- Reorganize lpReserved2 buffer to avoid conflicts with Microsoft
- usage which resulted in incorrect stdin/stdout operation with
- programs compiled using MSVC.
- * pinfo.cc (pinfo_init): Accommodate change to lpReserved2
- organization.
-
-Mon Mar 9 19:27:17 1998 Geoffrey Noer <noer@cygnus.com>
-
- * syscalls.cc (_open): modify to take a variable number of
- arguments to match newlib's fcntl.h.
- * environ.cc (parse_options): rewrite struct known to conform
- to ANSI standards. Can't statically initialize, so do so
- dynamically at the beginning of the function instead.
-
- patch from jeffdb@netzone.com (Mikey):
- * dcrt0.cc (build_argv, compute_argc): need to escape quotes
-
-Sat Feb 28 16:41:54 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * fhandler.cc (fhandler_base::init): call set_flags based on
- access arg.
- * net.cc: include fcntl.h
- (fhandler_socket::fhandler_socket): made sockets O_RDWR
-
-Thu Feb 26 23:41:54 1998 Geoffrey Noer <noer@cygnus.com>
-
- Beta 19 release made.
-
-Sun Feb 22 23:46:31 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * Makefile.in: Do not link cygwinb19.dll with libwsock32.a
- * exceptions.cc: add proto for i_WSACleanup.
- (sig_handle): call *i_WSACleanup if winsock was inited.
- * hinfo.cc: add proto for i_getpeername.
- (hinfo_vec::build_fhandler): call *i_getpeername if winsock
- was inited
- * net.cc: wsock32, i_wsockimports - new globals. Throughout
- file, call winsock functions via indirect pointers.
- (winsock_init): dynamically load wsock32.dll and resolve addresses
- of exports.
- (cygwin32_rcmd, cygwin32_rexec, cygwin32_rresvport): resolve
- addresses of exports.
- * select.cc: add protos for i___WSAFDIsSet, i_WSAGetLastError,
- i_select, i_socket, i_closesocket. WINSOCK_FD_ISSET changed to
- use indirect pointer. Direct winsock calls changed to indirect.
- (cygwin32_select): initialize winsock before calling select in
- degenerate case.
- * winsup.h: remove protos for ScreenRows, ScreenCols,
- ScreenGetCursor, ScreenSetCursor.
-
-Sun Feb 22 17:44:55 1998 Geoffrey Noer <noer@cygnus.com>
-
- * environ.cc (parse_options): comment out -- no longer
- compiles with egcs. Will rewrite/enable later.
-
-Sun Feb 22 13:49:10 1998 Geoffrey Noer <noer@cygnus.com>
-
- * syscalls.h: remove protos for _open, _read, _write since
- they are in newlib headers that are already included
- * syscalls.cc (_read): return int, not ssize_t
- (_write): ditto
-
-Sat Feb 21 14:21:17 1998 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: rename dll to cygwindevo.dll
-
-Sat Feb 21 01:33:56 1998 Geoffrey Noer <noer@cygnus.com>
-
- * cygwin.din: remove dup definition of endpwent
-
-Thu Feb 19 14:20:21 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/cygwin32/cygwin_dll.h: Correct protection wrapper
-
-Tue Feb 17 20:21:24 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/Windows32/Structures.h: tagBITMAPFILEHEADER should
- be packed.
-
-Tue Feb 17 19:34:41 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Christopher Faylor):
- * cygwin.din: export sigpause
- * signal.cc (sigpause): New "compatibility interface" to
- sigsuspend function. Used currently by inetutils.
-
-Tue Feb 17 11:43:27 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * tty.h (class tty): Add slave_opened field.
- * tty.cc (fhandler_tty_master::init): Initialize slave_opened.
- (do_output): Only return with EOF if the slave has been opened.
- (fhandler_tty_slave::open): Set slave_opened.
- (fhandler_pty_master::open): Initialize slave_opened.
-
- * tty.cc (fhandler_pty_master::read): Change type of n to DWORD.
- If there are no characters to read, and the descriptor is in
- nonblocking mode, just return EGAIN.
-
-Mon Feb 16 15:11:25 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * tty.h (class tty): Remove handle_pid and slave_handles fields.
- (class tty_list): Add getcount method.
- * tty.cc (tty::init): Initialize input_handle and output_handle.
- (tty_list::free_tty): If we just freed the last reference to this
- tty, close input_handle and output_handle.
- (fhandler_tty_master::init): Don't initialize handle_pid and
- slave_handles.
- (do_output): Instead of just calling ReadFile, loop using
- PeekNamedPipe and check whether the tty has been closed. Return 0
- on EOF and -1 on error.
- (process_output): Only print debugging error message if error
- occurs in do_output.
- (fhandler_tty_slave::open): Always duplicate handles from master.
- Never close handles in source. Don't change slave_handles.
- (fhandler_tty_slave::close): Don't change slave_handles, and don't
- close tty handles.
- (fhandler_tty_slave::linearize): Call attach_tty.
- (fhandler_tty_slave::de_linearize): Don't call attach_tty.
- (fhandler_tty_slave::dup): Don't increment slave handles.
- (fhandler_pty_master::open): Don't initialize handle_pid and
- slave_handles.
- (fhandler_pty_master::close): Don't check slave_handles, and don't
- close tty handles.
- (fhandler_pty_master::read): Handle EOF return value from
- do_output.
- (fhandler_pty_master::linearize): Call attach_tty.
- (fhandler_pty_master::de_linearize): Don't call attach_tty.
-
- * fork.cc (cygwin_fork_helper1): Copy strace_mask from parent to
- child.
-
-Thu Feb 12 20:33:57 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Christopher Faylor):
- * utils/cygwin.cc: Modify -s option to use new strace_mask entry
- in pinfo. Prepare for future ability to specify an strace file.
-
-Thu Feb 12 11:57:26 1998 Geoffrey Noer <noer@cygnus.com>
-
- * grp.cc (read_etc_group): add a default /etc/group in memory
- if /etc/group isn't found
- (getgrnam): return NULL if requested group isn't found instead
- of returning a default group
-
-Wed Feb 11 15:59:10 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * strace.cc (strace_open): do not close u->strace_file if it
- points to stderr.
- * malloc.cc (malloc_init): do not check for application's malloc
- in a forkee, this breaks memory coherency in a forkee and forker.
- use_internal_malloc flag now copies on fork.
-
-Tue Feb 10 18:11:30 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Christopher Faylor)
- Throughout sources, mark statics and globals as NO_COPY where
- appropriate.
- * fork.cc (cygwin_fork_helper1): Remove #if 0 around fork_copy of
- cygwin data/bss. Remove __malloc_copy since it is no longer
- necessary.
-
-Tue Feb 10 15:30:19 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Christopher Faylor)
- * console.cc (fhandler_console::write): Implement xterm style
- escape sequences for setting title in the console title bar.
- * fhandler.h: Define constants for console title escape sequence.
-
-Tue Feb 10 14:16:17 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/a.out.h: remove junk chars introduced by mailer
- when this header was sent to us
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * libccrt0.cc: rename cygwin_attach_dll to cygwin32_attach_dll
-
- patch from cgf@bbc.com (Christopher Faylor):
- * environ.cc: fix off by one problem
-
-Mon Feb 9 14:56:00 1998 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: add registry.h to environ.o deps
-
-Mon Feb 9 14:42:24 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (DLL_OFILES): Rename dllinit.o to dll_init.o.
-
- * tty.cc (fhandler_tty_slave::close): Don't close the tty handles
- if the slave and the master are the same process.
-
- * path.cc (read_mounts): Change key parameter to reference, to
- avoiding running the destructor.
-
-Mon Feb 9 13:53:50 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Christopher Faylor):
- Moves all environment manipulation into environ.cc.
- Switches to CYGWIN32 for settings:
- set CYGWIN32=[no]title [no]strip_title [no]binmode [no]glob
- strace=mask:cache,file [no]tty
- (set STRACE=whatever is still honored).
- Propagates tty settings to all subprocesses regardless of
- unsetting of environment variable.
- Moves strace mask into pinfo structure for easier future
- manipulation by external program. Moves strace_file into the
- vacated position for automatic use in forked processes.
- Propagates old title to execed processes so that they can
- correctly restore the correct title when they exit.
- * console.cc: Use PID_USETTY setting in process_state so that
- tty state can be easily inherited.
- (set_console_title): New function to set console title.
- * syscalls.cc: Use PID_USETTY setting in process_state so that
- tty state can be easily inherited.
- * tty.cc: Ditto.
- * hinfo.cc: Ditto.
- (hinfo_vec::de_linearize_fd_array): Return last location in buffer
- for further potential processing.
- * dcrt0.cc: Add global variables for control of glob and title,
- set by environ_init. Mark some variables as NO_COPY.
- Remove routines and variables for dealing with environment.
- (dll_crt0_1): Move environment initialization into separate
- function. Honor 'noglob' CYGWIN32 setting.
- * environ.cc (environ_init): New function to initialize the
- environ table. Also scans for CYGWIN32 environment variable,
- setting appropriate values.
- (ucenv): New function. Upper cases an environment variable.
- (parse_options): New function. Parse CYGWIN_* environment
- variable.
- (posify): New function. Convert a Windows env path spec to
- cygwin.
- (env_sort): New function. Sort an environ block.
- (winenv): New function. Returns a windows style environment
- block.
- * fhandler.cc (fhandler_base::read): Reflect change to location of
- strace_mask.
- * fork.cc (cygwin_fork_helper1): Remove save/restore of some
- settings since this is automatic now with new dll data copy. Save
- PID_USETTY setting in child process_state.
- * strace.h: Cosmetic change.
- * pinfo.cc (pinfo_init): Call environ_init here since it may
- affect further processing in this function. Use old console title
- from "parent" process if execed process. Reflect change to
- location of strace_mask.
- * spawn.cc (spawn_guts): Remove environment manipulation code.
- Use new winenv function call instead. Save old title in block of
- memory copied to newly execed process if title is being displayed.
- * strace.cc: Changes to reflect new location for strace_mask and
- strace_file. These are now automatically inherited on fork.
- * winsup.h: Move strace_mask into pinfo to allow possible
- manipulation by other processes. Put u->strace_file in uptr
- structure so that it will be automatically duplicated on fork,
- removing the necessity of initializing strace in a forked
- process. Add functions/variables associated with environment
- manipulation and console title setting.
-
-Mon Feb 9 03:06:56 1998 Geoffrey Noer <noer@cygnus.com>
-
- Extensive reformatting in new files from next patch.
- Rename dllinit.h file to dll_init.h and likewise for dll_init.cc.
- Rename cygwin_detach_dll to cygwin32_detach_dll throughout.
- Similarly, rename cygwin_attach_dll and _cygwin_dll_entry.
- And rename sanityAndSyncCheck to check_sanity_and_sync.
- Also:
- * dll_init.h: don't include winsup.h
- * dll_init.cc: include winsup.h here instead
- * dlfcn.cc: include winsup.h, don't include windows.h
- * cygwin.din: rename cygwin_detach_dll to cygwin32_detach_dll.
-
- patch from giac@dalim.de (Philippe Giacinti):
- Copy data areas of cygwin-compiled dlls on fork(),
- implement dlopen/dlsym/dlclose/dlerror calls.
- * Makefile.in: add dlfcn.o and dllinit.o to DLL_OFILES, add
- dllinit.h dependencies
- * cygwin.din: dll_dllcrt0, cygwin_detach_dll, dlopen, dlclose,
- dlsym, dlerror, dlfork -- new exports.
- * dcrt0.cc: include dllinit.h, mark u pointer as NO_COPY.
- (sanityAndSyncCheck): new, code moved from dll_crt0_1.
- Initialize all linked dlls before calling main().
- * dlfcn.cc: new file.
- * dllinit.cc: new file.
- * dllinit.h: new file.
- * exceptions.cc: mark some variables with NO_COPY.
- * fork.cc: include dllinit.h; declare cygwin.dll data/bss
- start/end.
- (cygwin_fork_helper1): copy data/bss of cygwin.dll itself to child
- process (the code is disabled now); copy data areas of
- linked/loaded dlls (if any); free loaded dll list on cleanup.
- * include/cygwin32/cygwin_dll.h: new file.
- * include/dlfcn.h: new file.
- * libccrt0.cc (cygwin_crt0_common): new, code derived from
- cygwin_crt0, MainFunc parameter added.
- (cygwin_crt0): call cygwin_crt0_common.
- (cygwin_attach_dll): new.
- * shared.cc: mark some data as NO_COPY
- * strace.cc: mark some data as NO_COPY
- * winsup.h: add dll_dllcrt0 proto, NO_COPY macro.
-
-Sun Feb 8 17:51:26 1998 Geoffrey Noer <noer@cygnus.com>
-
- * getopt.c: new. Import Berkeley getopt code modified for use
- in Cygnus' kerberos implementation (including the writing of
- getopt_long by Chris Provenzano (proven@cygnus.com)) then modified
- a bit more to get it working in Cygwin32. Although we were
- going to remove getopt, it appears that too many programs would
- need fixing to remove it completely. Whether getopt should be
- included in Cygwin32 should be decided at a later time.
- * include/getopt.h: new. Import Berkeley getopt.h.
- * Makefile.in: add getopt.o to LIBCOS
- * utils/Makefile.in: remove include of ../../include since
- getopt.h is now in winsup/include, also revert recent change
- of addition of GETOPT_OBJS.
-
-Fri Feb 6 16:28:19 1998 Geoffrey Noer <noer@cygnus.com>
-
- * cygwin.din: remove set_new_handler and cygwin_set_attributes
- exports
- * version.h: up major version number
- * Makefile.in: rename dll to cygwinb19.dll
- * syscalls.cc (cygwin_set_attributes): axe
-
-Thu Feb 5 18:28:37 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/Windows32/Functions.h: add protos for
- DdeCmpStringHandles and DdeCreateDataHandle
- * Makefile.in: stop including ../libiberty/getopt* since
- we aren't exporting or using them
- * utils/Makefile.in: add new variable for libiberty getopt objs
- which is linked in for cygwin.exe
-
-Thu Feb 5 17:59:12 1998 Geoffrey Noer <noer@cygnus.com>
-
- syscalls.cc: move ppc dll_entry asm code to...
- dcrt0.cc: ...here
-
- Import new globbing code from NetBSD 1.3
- * glob: delete subdirectory
- * glob.c: new file
- * glob.h: new file
- * Makefile.in: remove glob from submakes, remove glob/libglob.a
- from DLL_IMPORTS, fix dcrt0 glob.h dependency
- * configure.in: don't configure glob subdirectory
- * configure: regenerate
- * dcrt0.cc: include glob.h, not glob/glob.h.
- (globify): don't call glob with GLOB_NOESCAPE which isn't a valid
- flag with this glob
-
-Wed Feb 4 16:14:13 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- Allow system administrator to enter into the HKLM registry tree
- a predefined mount table inherittable by all cygwin users. The
- predefined mounts are non-mandatory so the user's mount table has
- a higher priority than the default one. Cygwin reads HKLM tree
- in read-only mode.
- * path.cc (read_mounts): new, code derived from
- mount_info::from_registry().
- (mount_info::from_registry): call read_mounts from user's table,
- then from system-wide mount table.
- * registry.cc (reg_session::reg_session): key and access arguments
- added.
- (reg_key::init): access argument added.
- (reg_key::reg_key): access argument added.
- * registry.h (class reg_key): init prototype changed, default
- argument of reg_key added.
- (class reg_session): default arguments of constructor added.
-
-Wed Feb 4 15:38:59 1998 Geoffrey Noer <noer@cygnus.com>
-
- * include/a.out.h: new coff header file
-
-Wed Feb 4 01:55:18 1998 Geoffrey Noer <noer@cygnus.com>
-
- * uinfo.cc: define DEFAULT_UID/GID here
- * winsup.h: removed DEFAULT_UID/GID defs and unused
- set_console_title proto. Did some major reorganizing,
- and a little reformatting, commenting.
-
-Tue Feb 3 23:59:23 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- Replace u->self and this_procinfo () with new `myself' pointer
- wherever appropriate. Also replace get_pid() calls with a
- simple ->pid reference.
-
-Mon Feb 2 12:34:49 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * console.cc (FakeReadFile): limit bytes to read to 30000 due to
- Win NT 4.0 SP3 bug. Kill foreground process group with SIGWINCH
- on console buffer size change if tty support enabled.
- * include/sys/termios.h: define more constants.
- * tty.cc (fhandler_pty_master::ioctl): kill foreground process
- group with SIGWINCH on window resizing.
-
-Mon Feb 2 12:14:49 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * dcrt0.cc (dll_crt0_1): Initialize u->self here, early in a
- forked process so the correct pid is used in strace output and so
- signals do not end up being erroneously sent to the parent.
- * exceptions.cc: Make a global variable static. Some minor
- optimizations.
- (call_handler): Make sure that the signal mask is restored when
- sig_dispatch mutex is unavailable.
- Reorder asm statements to prevent clobbering of flags register by
- preceding ors or risk random inexplicable behavior when returning
- from a signal handler.
- * fork.cc (cygwin_fork_helper1): Put setjmp restore in child's
- pinfo. Have the child figure out its pid earlier in the
- initialization process. Don't print a "child failed" error if the
- child failed during initialization due to a CTRL-C. This is still
- not quite right (see comment).
- * sigproc.cc (sig_send): Remove unlock/lock_pinfo or suffer
- consistent hangs in zsh. Make {allow,block}_sig_dispatch globally
- available.
- (wait_sig): Fix problem where blocked signals would still be
- processed if queued. Add debugging SIGNOQUEUE conditional to turn
- off signal queueing, making cygwin more like traditional UNIX.
- * sigproc.h: Add {allow,block}_sig_dispatch functions.
-
-Mon Jan 26 17:33:57 1998 Geoffrey Noer <noer@cygnus.com>
-
- * path.cc (mount_info::init): don't hardcode C: as the default
- slash mount. Instead, use the drive letter that the OS is loaded
- on.
-
-Mon Jan 26 13:33:57 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * fork.cc (cygwin_fork_helper): Move setting PID_INITIALIZING
- process_state here to avoid erroneously setting it permanently
- via proc_register().
- * pinfo.cc (pinfo_init): Delay notifying "parent" when execing
- until this process is ready to receive signals or risk a race
- condition if exec parent calls sigproc_terminate prior to
- the child exec.
- * sigproc.cc (proc_subproc): Don't set PID_INITIALIZING here.
- It is too late in the process creation.
- (sig_send): Reset sigsuspend mutex prior to use to avoid a race.
- (wait_sig): Create sigsuspend mutex as an auto reset to attempt
- to avoid a race condition. Notify parent that this process is
- ready if we were execed (code moved from pinfo_init). Change
- PulseEvents to SetEvents to avoid races
- * spawn.cc (spawn_guts): Move setting PID_INITIALIZING
- process_state here to help avoid race.
-
-Fri Jan 23 12:31:37 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * malloc.cc (malloc_critical_section): New static variable.
- (malloc_init): New function.
- (__malloc_lock, __malloc_unlock): New functions.
- * winsup.h (malloc_init): Declare.
- * heap.cc (heap_init): Call malloc_init.
-
-Thu Jan 22 18:46:40 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * tty.h (class tty): Change slave_handles to int.
- * tty.cc (fhandler_tty_slave::open): Check for invalid tty
- handles. If this is the first slave, set slave_handles to 2;
- otherwise, increment slave_handles.
- (fhandler_tty_slave::close): Only close the tty handles if the
- slave_handles field drops to 1.
- (fhandler_tty_slave::write): Add a debugging message if WriteFile
- fails.
- (fhandler_tty_slave::dup): Set ttynum of new fhandler. Increment
- slave_handles if appropriate.
- (fhandler_pty_master::close): Only close the tty handles if the
- tty is no longer allocated.
-
- * tty.h (class tty): Add handle_pid and slave_handles fields.
- * tty.cc (attach_tty): Call connect_tty even if use_tty is not
- set.
- (detach_tty): Don't check use_tty.
- (fhandler_tty_master::init): Initialize handle_pid and
- slave_handles of tty.
- (do_input): Treat \r as end of line character.
- (do_output): Only set output_done_event if it is not NULL.
- (fhandler_tty_slave::open): Don't worry if we can't open
- output_done_event. Check slave_handles field of tty to decide
- from where to duplicate the handles. Call detach_tty on error.
- If we are now the owner of the slave handles, mark the tty
- appropriately.
- (fhandler_tty_slave::close): Only close output_done_event if it is
- not NULL. Check for errors from CloseHandle. Close the tty
- handles if we own them.
- (fhandler_tty_slave::write): Only wait for output_done_event if it
- is not NULL.
- (fhandler_tty_slave::read): If nobody owns the tty, return EOF.
- (fhandler_tty_slave::dup): Attach the tty. Don't duplicate
- output_done_event if it is NULL. Detach the tty on error.
- (fhandler_pty_master::open): Initialize handle_pid and
- slave_handles of tty. Don't create output_done_event.
- (fhandler_pty_master::close): Only close output_done_event if it
- is not NULL. Check for errors from CloseHandle. Only close the
- tty handles if we own them.
- (fhandler_pty_master::read): Only set output_done_event if it is
- not NULL.
- * hinfo.cc (de_linearize_fd_array): Don't set use_tty just because
- we find a tty to delinearize.
-
-Wed Jan 21 21:58:27 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * sigproc.cc: Changes in wait_sig/sig_send semaphore/event
- signaling to attempt to eliminate races.
-
-Tue Jan 20 16:11:05 1998 Geoffrey Noer <noer@cygnus.com>
-
- Remove last remnants of the mixed case handling support.
- * path.cc (path_conv::path_conv): remove mixed_p init
- (mount_info::from_registry): don't check for fmixed
- (mount_info::to_registry): ditto
- (mount_item::getmntent): when setting ret.mnt_opts, only consider
- text vs binary flag
- (mount_item::init): remove init of mixed
- * path.h: remove mixed_p, mixed from path_conv class. Remove
- unmixedcaseify proto.
- * include/sys/mount.h: comment out MOUNT_MIXED define, protect
- header against multiple inclusion
-
- A little header file cleanup. Mostly to protect headers against
- multiple inclusion. Some aren't strictly speaking necessary but...
- * include/sys/cygwin.h: protect header against multiple inclusion
- * include/sys/smallprint.h: ditto, also add cplusplus wrapper
- * include/sys/strace.h: comment last endif
- * include/cygwin32/in.h: change _LINUX_IN_H protect defines
- to _CYGWIN32_IN_H
- * include/arpa/inet.h: protect header against multiple inclusion
- * include/asm/types.h: ditto
- * include/net/if.h: ditto
- * include/netinet/ip.h: ditto
- * include/netinet/ip_icmp.h: ditto
- * include/netinet/in.h: ditto, remove commented out real header
- file
- * include/fcntl.h: protect header against multiple inclusion
- * include/memory.h: ditto
- * include/mntent.h: ditto
- * include/strings.h: ditto
- * include/syslog.h: ditto
- * include/termio.h: ditto
-
-Tue Jan 20 12:51:59 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * strace.cc (strace_stderr): New static variable.
- (strace_init): Set strace_stderr.
- (system_printf): If not strace_stderr, use debug_printf to put the
- message in a trace file.
-
- * fhandler.h (fhandler_pty_master): Add neednl_ field.
- * tty.h (RESTART_OUTPUT_EVENT): Change to be different from
- IOCTL_DONE_EVENT.
- * tty.cc (fhandler_tty_master::init): Initialize neednl_.
- (do_output): Handle a length of one by using neednl_ to record an
- expansion of \n to \r\n which doesn't fit. Never expand \r to
- \r\n. Correct order of \r\n.
- (fhandler_tty_slave::open): Improve error handling. Use
- DUPLICATE_CLOSE_SOURCE to close the pipes in the master process.
- (fhandler_tty_slave::dup): Duplicate the handles, rather than
- calling fhandler_tty_slave::open.
- (fhandler_pty_master::open): Initialize neednl_.
- (fhandler_pty_master::read): Return EOF for ERROR_BROKEN_PIPE,
- rather than error. Set errno correctly.
- * hinfo.cc (digits): New static function.
- (build_fhandler): Always accept /dev/ptmx and /dev/ttyDDD, even if
- use_tty is not set. use_tty now only controls the interpretation
- of /dev/tty.
-
-Mon Jan 19 14:49:45 1998 Geoffrey Noer <noer@cygnus.com>
-
- * sigproc.cc (sig_send): lock_pinfo_for_update during this
- function
-
-Fri Jan 16 18:09:59 1998 Geoffrey Noer <noer@cygnus.com>
-
- * sigproc.cc (sigproc_init): if we can't create a signal
- thread or can't create sync_proc_subproc mutex, fail with
- an api_fatal call rather than just returning
-
-Fri Jan 16 18:08:49 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- Changed signal handling to use one semaphore and one shared
- memory array which is manipulated via Interlocked*() functions.
- * exceptions.cc (lock_cs): Comment. Report on error.
- (unlock_cs): Add debugging statement.
- (sig_dispatch_pending): Remove obsolete function.
- (set_process_mask): Adapt to new signal method.
- (call_handler): Clear wait()ing threads here while main thread is
- suspended to avoid timing screwups. Avoid calling the handler if
- can't get dispatch mutex (code moved from sig_handle). Return
- status of acquiring the sig_dispatch mutex.
- (sighandle): Adapt to new signal method. Reorganize to *always*
- honor sig_dispatch mutex or suffer deadlock on fatal signals when
- someone else has the mutex and we're attempting to cleanup.
- (events_init): Reflect change in cygname() arguments.
- * fork.cc (stack_dummy): New function. Returns address of
- argument to determine bounds for eventual stack copy.
- (cygwin_fork_helper1): Call subproc_init to start up subproc
- thread if it is not alreay started. Ensure that signals are
- blocked while forked process is initializing. Change method of
- calculation for lower stack bounds to slightly more foolproof
- method. Preserve some global settings in forked process.
- * misc.cc (cygname): Remove an unused argument.
- * pinfo.cc (pinfo_list::allocate_pid): Add a useful debugging
- statement.
- * shared.cc (open_shared_file_map): Reflect change in cygname()
- arguments.
- * signal.cc (kill_pgrp): Avoid killing dead processes. Don't
- kill processes in my pgrp if not also in my ctty.
- (sigaction): Adapt to new signal method.
- (sigpending): Adapt to new signal method.
- * sigproc.cc: Many changes to adapt to new signal method. Also
- delay waits for thread initialization until the thread needs to be
- contacted.
- * sigproc.h: Ditto.
- * spawn.cc (spawn_guts): Fix potential off-by-one error(?) in
- transcribing the argument list and add paranoid code to detect
- future overruns. Change priority to highest so that waiting
- process will clear out quickly.
- (_spawnve): Call subproc_init() to start up subproc thread if is
- not already started.
- * strace.cc (strace_printf): Increase size of internal buffer so
- that long argument lists printed from spawn_guts do not overrun it
- so easily.
- * wait.cc (wait4): Set status flag to -1 prior to exit. This will
- cause previous wait that was interrupted by a signal which
- dispatched to another wait to return the correct error value.
- * winsup.h (pinfo): Add _sigtodo array for new signal method.
- Remove obsolete field. Reflect change in cygname arguments.
-
-Thu Jan 15 13:07:07 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * syscalls.cc (mkdir): Don't permit the directory to be created if
- the parent directory is not writable.
-
- * syscalls.cc (fchmod): Call chmod with the path name, rather than
- just returning zero.
-
- * syscalls.cc (writable_directory): New static function.
- (_unlink): Don't permit the file to be removed if the directory is
- not writable.
- (rename): Don't permit the rename if either the source or
- destination directory is not writable.
-
- * syscalls.cc (chown): Set username and groupname lengths to UNLEN
- + 1, rather than 100. If getpwuid fails, try to look up the real
- user name to see if it is the same. Don't report an error if
- there is no security mapping.
-
-Wed Jan 14 15:34:20 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * syscalls.cc (setegid): New function which just returns ENOSYS.
- (chroot): Likewise.
- * cygwin.din: Export setegid, _setegid, chroot, and _chroot.
-
- * syscalls.cc (setmode): Rename from _setmode. Change to return
- the old mode. Remove old setmode function.
- * cygwin.din: Make _setmode an alias for setmode.
-
-Wed Jan 14 14:46:00 1998 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: don't strip cygwin.dll by default
- * winsup.h: minor reformatting, removed/reworded some comments
-
-Mon Jan 12 13:53:03 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- Speed up cygwin pid calculation by staying in the range
- 1000 through (1000 + PSIZE - 1).
- * pinfo.cc (pinfo_list::init): Change to reflect new pid
- calculation method.
- (pinfo_list::operator []): Ditto.
- (pinfo_list::allocate_pid): Ditto.
- * winsup.h (pinfo): Move pid and ppid into non-zeroed region since
- they are always set by allocate_pid.
- (pinfo_list): Change pid_base to next_pid_index to reflect new pid
- calculation method.
- (PBASE): New constant for new pid calcuation method.
-
-Sat Jan 10 12:06:38 1998 Geoffrey Noer <noer@cygnus.com>
-
- * syscalls.cc (process_deletion_queue): remove wrapper function
- (close_all_files): call s->delqueue.process_queue instead of
- going through wrapper.
- * fhandler.cc (fhandler_base::close): call
- s->delqueue.process_queue instead of using above wrapper.
- * winsup.h: remove process_deletion_queue proto
- * delqueue.h: up MAX_DELQUEUES_PENDING to 100 for now. Rename
- v to dqueue for clarity.
- * delqueue.cc: v renamed to dqueue throughout. Add FIXME
- describing why this whole delqueue system needs rewriting.
-
-Fri Jan 9 13:18:44 1998 Geoffrey Noer <noer@cygnus.com>
-
- Remove some historical baggage:
- * syscalls.cc (cygwin_set_attributes): remove commented-out code,
- add FIXME since this function should go away next time an
- incompatible change to cygwin.din is made. Stop including
- include/sys/cygwin.h.
- * include/sys/cygwin.h: remove cygwin_set_attributes proto.
- Remove CYGWIN_FMODE_ALL_BINARY define.
- * hinfo (hinfo_vec::init_std_file_from_handle): remove old
- commented-out code
- * path.cc (unmixedcaseify): delete commented-out function
- (mixedcaseify): ditto
- * strerror.cc (strerror): delete commented-out code section
-
-Tue Jan 6 18:51:40 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- Conform to POSIX method for sending SIGHUP to stopped processes.
- * dcrt0.cc (do_exit): Use new kill_pgrp function to kill orphaned
- children on group leader exit iff the children are stopped (per
- POSIX).
- * signal.cc (kill_worker): Negative signal now means to send
- a SIGCONT after the signal, to wake up the target process.
- (_kill): Break out pgrp handling into separate function.
- (kill_pgrp): New function pulled from _kill to send signals
- to processes in a given pgrp.
-
-Tue Jan 6 14:37:43 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Chris Faylor):
- * fhandler.cc (fhandler_base::open): include
- FILE_FLAG_BACKUP_SEMANTICS in file_attributes when file is
- a directory. Allows opening of directory as a file. Allows
- use of handle to perform some operations on both directories and
- files.
- (fhandler_base::fstat): Loop when attempting to get volume serial
- number. Works around an apparent Windows NT 3.51 bug.
- * times.cc (utimes): use FILE_FLAG_BACKUP_SEMANTICS flag
- to allow accessing directory times (may only work under NT;
- until now it didn't work under either OS).
- * winsup.h: Add O_DIROPEN constant.
-
-Mon Jan 5 19:18:01 1998 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: make winsup.h depend on winsup.h in accordance
- with below
-
- patch from cgf@bbc.com (Chris Faylor):
- * {*.cc, *.h}: Remove include files already present in winsup.h.
- Change empty function parameter lists to (void) where appropriate.
-
- * fork.cc: Clean up include files. Minor change to CreateProcess
- parameter list.
- * signal.cc: Remove ifdef'ed stuff.
- * smallprint.c: Add a necessary include file.
- * winsup.h: Add a common include file. Add a function declaration
- for kill_pgrp.
-
-Mon Jan 5 18:30:37 1998 Geoffrey Noer <noer@cygnus.com>
-
- Fix spoofing of directory inodes.
- * syscalls.cc (hash_path_name): instead of initializing the
- hash to zero, take the value of the initial hash as a new
- argument.
- (_stat_worker): fix up hash_path_name reference in light of above
- * dirsearch.cc (opendir): initialize dir->__d_dirhash to the
- hash of the full directory name so readdir can make use of it.
- (readdir): compute d_ino by combining the directory hash
- calculated by opendir with the hash of the filename.
- * fhandler.cc: fix up hash_path_name reference in light of above
-
- * winsup.h: remove unnecessary protos for getkey, kbhit. Adjust
- hash_path_name proto.
diff --git a/winsup/cygwin/ChangeLog-1999 b/winsup/cygwin/ChangeLog-1999
deleted file mode 100644
index f2da41f..0000000
--- a/winsup/cygwin/ChangeLog-1999
+++ /dev/null
@@ -1,3562 +0,0 @@
-Sat Dec 25 12:46:25 1999 Christopher Faylor <cgf@cygnus.com>
-
- * dlfcn.cc (dlsym): Use correct HANDLE type for GetProcAddress.
- (dlclose): Ditto for FreeLibrary.
- * fhandler_windows.cc (fhandler_windows::set_close_on_exec): Properly
- coerce arguments to set_inheritance.
- (fhandler_windows::fixup_after_fork): Ditto for fork_fixup.
- * libcmain.cc (main): Simplify.
- * select.cc (peek_windows): Properly coerce argument to PeekMessage.
-
-Sat Dec 25 12:30:25 1999 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Eliminate unneeded .y SUFFIX.
- * dcrt0.cc (__api_fatal): Make "C".
- (do_global_ctors): Make __stdcall.
- (getprogname): Ditto.
- (insert_file): Ditto.
- (globify): Ditto.
- (build_argv): Ditto.
- (do_exit): Ditto.
- * debug.cc (regthread): Ditto.
- (makethread): Ditto.
- (threadname): Ditto.
- (find_handle): Ditto.
- (handle_list): Ditto.
- (add_handle): Ditto.
- * debug.h: Reflect changes to __stdcall.
- * shared.h: Ditto.
- * winsup.h: Ditto.
-
-Sat Dec 25 12:09:10 1999 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * path.cc (symlink): Don't return error if target is a symlink to a
- nonexistent file.
-
-1999-12-23 DJ Delorie <dj@cygnus.com
-
- * Makefile.in: add support for "make check"
- * shared.cc: if $CYGWIN_TESTING is set, use a private shared area
- * cygrun.c: new, used to isolate dll-in-test
- * testsuite/*: new, rudimentary testsuite framework
-
-Wed Dec 22 01:05:44 1999 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (globify): Properly handle embedded tildes in variable
- names. Treat a c:\foo style path spec as "special", i.e., don't
- interpret the backslashes as quoting characters.
-
-Fri Dec 17 10:49:13 1999 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (symlink): Return error if the target exists.
-
-Thu Dec 16 22:36:45 1999 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc: Change method for accessing com in windows_device_names to
- allow > 2 com ports.
-
-Thu Dec 16 00:49:30 1999 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Only build winver.o and version.o when required.
-
-Sat Dec 11 11:06:45 1999 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (path_conv::path_conv): Ensure that a trailing slash is added
- to "x:" specifications.
-
-Fri Dec 10 20:22:41 1999 Christopher Faylor <cgf@cygnus.com>
-
- * debug.cc (WFSO): Make __stdcall.
- (WFMO): Ditto.
- * debug.h: Reflect above changes.
- * exceptions.cc (sig_set_errno): Set errno to be in effect after a
- signal handler.
- (handle_sigsuspend): Use set_sig_errno to ensure that the correct errno
- is set after a signal handler.
- (interrupt_now): Accommodate default errno field in stack.
- (intterupt_on_return): Ditto.
- (sigreturn): Pop, test, and possibly restore saved errno on return from
- signal handler.
- * fhandler_console.cc (fhandler_console::read): Set errno to be in
- effect after a signal handler.
- * fhandler_serial.cc (fhandler_serial::raw_read): Ditto.
- * select.cc (cygwin_select): Ditto.
- (select_stuff:wait): Ditto.
- (peek_serial): Ditto.
- * syscalls.cc (_read): Ditto.
- * wait.cc (wait4): Ditto.
- * winsup.h (signal_dispatch): Add "saved_errno" field.
-
-Thu Dec 9 23:35:45 1999 Christopher Faylor <cgf@cygnus.com>
-
- * debug.cc (threadname_init): Use new_muto macro to set up a static
- buffer for a muto.
- (debug_init): Ditto.
- (WFSO): Reinstate wrapper for WaitForSingleObject.
- (WFMO): Reinstate wrapper for WaitForMultipleObject.
- * debug.h: Declare the above two wrappers.
- * exceptions.cc (events_init): Use new_muto macro to set up a static
- buffer for a muto.
- * sigproc.cc (sigproc_init): Ditto.
- * sync.cc (muto::acquire): Don't bump waiters if we already own the
- muto.
- * sync.h (new): New operator.
- (delete): Ditto.
- (new_muto): New macro.
-
-Dec 08 23:50:00 1999 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (get_nt_attribute): Add debug output. Correct behaviour
- in case of NULL ACL.
- * syscalls.cc (stat_worker): Allow remote drives to get stat info from
- fh.fstat().
- * include/winnt.h: Add defines for W2K ACL control flags.
- * include/cygwin/socket.h: Add missing PF_NETBIOS.
-
-Wed Dec 8 23:06:07 1999 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Ensure that winver.o is a dependency for building the
- dll.
- * mkvers.sh: Attempt to call windres in a fashion that accommodates
- older and newer versions.
- * winver.c: Reorganize slightly to accommodate older versions of
- windres.
- * fhandler.cc (fhandler_disk_file::fstat): Avoid using Windows "inodes"
- on disks which do not support them.
-
-Tue Dec 7 21:15:11 1999 Christopher Faylor <cgf@cygnus.com>
-
- * dll_init.cc (DllList::forkeeLoadDlls): Reverse order of Free/Load
- Library calls to ensure that references are resolved.
- * path.cc (mount_info::conv_to_win32_path): Ensure that returned
- windows paths are always normalized regardless of whether they were in
- windows format to begin with.
-
-Tue Dec 7 08:48:22 1999 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc (parse_options): Properly detect end of known array.
-
-Mon Dec 6 22:32:04 1999 Christopher Faylor <cgf@cygnus.com>
-
- * mkvers.sh: Generate winver.o from winver.rc and various other things
- from include/cygwin/version.h
- * winver.rc: New file (adapted from donation by Mumit Khan
- <khan@xraylith.wisc.edu>).
- * configure.in: Find windres.
- * configure: Regenerate.
- * Makefile.in: Link winver.o into cygwin1.dll.
-
-Mon Dec 6 13:04:47 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * init.cc (dynamically_loaded): New global variable.
- (dll_entry): Use.
- * winsup.h (dynamically_loaded): Declare.
- * dcrt0.cc (do_global_ctors): Likewise.
- (set_os_type): Make static again.
- (dll_crt0_1): Handle dynamically_loaded case.
- * dll_init.cc (dll_dllcrt0_1): Delete.
- (dll_dllcrt0): Handle dynamically_loaded case.
- (dll_noncygwin_dllcrt0): Mark obsolescent.
- * libccrt0.cc (cygwin_attach_noncygwin_dll): Delete.
- * pinfo.cc (pinfo_init): Don't inherit parent fds if dynamically
- loaded.
- * include/cygwin/cygwin_dll.h (cygwin_attach_noncygwin_dll): Delete
- prototype.
- (_cygwin_noncygwin_dll_entry): Mark obsolescent.
-
-Mon Dec 6 11:09:41 1999 Christopher Faylor <cgf@cygnus.com>
-
- * configure.in: Make threadsafe the default.
- * configure: regenerate.
- * utils/strace.cc: Fix a compiler warning.
-
-Sun Dec 5 15:49:43 1999 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc (parse_options): Reinstate unions in parse_things, to
- save space.
-
-Fri Dec 3 22:52:05 1999 Christopher Faylor <cgf@cygnus.com>
-
- Implement new signal-handling scheme which ensures that a program will
- not be interrupted while in a system or cygwin DLL.
- * Makefile.in: Add sync.o and dll_ofiles target.
- * dcrt0.cc (alloc_stack_hard_way): Add more defensive code to ensure
- that the stack is really grown.
- (alloc_stack): Ditto.
- (dll_crt0_1): Reorganize some initialization routines to ensure that
- they occur after the heap has been initialized.
- * debug.cc: Use muto for locks. Eliminate attempts to avoid being
- interrupted by signals.
- (threadname_init): New function.
- (debug_init): Ditto.
- * debug.h: Declare debug_init and threadname_init.
- * exceptions.cc (stack_info::stack_info): Don't check for previous use
- of get().
- (handle_sigsuspend): Simply using new signal-handling scheme.
- (interruptible): New function. Determines if PC should be interrupted.
- (interrupt_now): New function. Causes immediate signal dispatch.
- (interrupt_on_return): New function. Causes signal dispatch on return
- from cygwin or system routine.
- (call_handler): Simplify to use new signal-handling scheme.
- (set_process_mask): Use mask_sync muto to synchronize setting of
- process signal mask.
- (sig_handle_tty_stop): New function. Called when have to stop process
- now.
- (sig_handle): Simplify to use new signal-handling scheme.
- (set_process_mask): Ditto.
- (events_init): Allocate mask_sync muto.
- (unused_sig_wrapper): New function. Encapsulates assembly language
- signal handling support.
- * fhandler.h (class select_stuff): Accommodate new signal-handling
- scheme.
- * fhandler_console.cc (fhandler_console): Simplify to use new
- signal-handling scheme.
- * fhandler_serial.cc (fhandler_serial::raw_read): Ditto.
- * fhandler_termios.cc (bg_check): Ditto.
- * fhandler_tty.cc (process_input): Ditto.
- (fhandler_tty_slave::open): Ditto.
- (fhandler_tty_slave::send_ioctl_request): Ditto.
- * fork.cc: Ditto.
- * path.cc (chdir): Ditto.
- * select.cc: Ditto, throughout.
- * shared.h: Eliminate unneeded signal enum.
- * signal.cc (signal): Simplify to use new signal-handling scheme.
- (sleep): Ditto.
- (usleep): Ditto.
- (sigprocmask): Ditto.
- (sigaction): Ditto.
- (pause): Use handle_sigsuspend to pause for signal.
- * sigproc.cc: Change signal_arrived handle to global_signal_arrived
- class. Change various mutex handles to mutos.
- (proc_subproc): Simplify to use new signal-handling scheme. Use muto
- for locking.
- (get_proc_lock): Ditto.
- (proc_terminate): Ditto.
- (sig_dispatch_pending): Make a "C" function. Return status of pending
- signals.
- (sigproc_init): Initialize global_signal_arrived. Simplify to use new
- signal-handling scheme. Initialize sync_proc_subproc muto.
- (sig_send): Eliminate __SIGSUSPEND considerations. Simplify to use new
- signal-handling scheme.
- (__allow_sig_dispatch): Delete.
- (__block_sig_dispatch): Delete.
- (__get_signal_mutex): Delete.
- (__release_signal_mutex): Delete.
- (__have_signal_mutex): Delete.
- (wait_sig): Simplify to use new signal-handling scheme.
- * sigproc.h: Implement signal_arrived classes.
- * smallprint.c (__small_vsprintf): Avoid printing a leading '*' in
- function name with %F format.
- * spawn.cc (spawn_guts): Simplify to use new signal-handling scheme.
- (iscmd): Don't consider a filename to be a "command" unless it contains
- a ':'.
- * syscalls.cc (_read): Ditto.
- (_open): Ditto.
- (_close): Ditto.
- * termios.cc (tcsendbreak): Ditto.
- (tcdrain): Ditto.
- (tcflush): Ditto.
- (tcflow): Ditto.
- (tcsetattr): Ditto.
- (tcgetattr): Ditto.
- * winsup.h: Reorganize include files. Add preliminary __sig_protect
- implementation.
- * cygwin/version.h: Bump current version to 1.1.0.
-
-Thu Dec 2 22:19:40 1999 Christopher Faylor <cgf@cygnus.com>
-
- * sync.cc (muto::muto): Use an event rather than a semaphore for wait
- synchronization.
- (muto::acquire): Rewrite to use an event and try to remove races.
- (muto::release): Ditto.
-
-1999-12-02 DJ Delorie <dj@cygnus.com>
-
- * environ.cc (parse_options): switch to a static initializer;
- templates are sensitive to g++ bugs.
-
-Fri Nov 26 12:04:23 1999 Christopher Faylor <cgf@cygnus.com>
-
- * net.cc (cygwin_bind): Ensure that non-Unix domain socket operations
- return success correctly.
-
-Wed Nov 24 21:37:58 1999 Christopher Faylor <cgf@cygnus.com>
-
- * net.cc (cygwin_bind): Guard against incorrectly setting res to zero
- when there is an error condition.
-
-Tue Nov 23 17:49:55 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.cc (fhandler_base::fhandler_base): Use better initialization
- scheme.
- * fork.cc (stack_base): Eliminate unneeded asm stuff.
- * select.cc: Sprinkle in some comments.
- * include/winnt.h: Add more CONTEXT.
-
-Nov 23 20:51:00 1999 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_bind): Use struct sockaddr_un in AF_UNIX code. Set
- errno to ENAMETOOLONG if length of pathname exceeds limit in AF_UNIX
- code. Sets errno to EADDRINUSE in AF_UNIX code if file system socket
- object already exists.
- * syscalls.cc (setsid): Set errno to EPERM if current process is
- already process group leader.
- * uinfo.cc (internal_getlogin): Rearrange for better debug output. Set
- pi->psid to NULL if SID can't be determined.
- * include/cygwin/socket.h: Add AF_LOCAL and PF_LOCAL
- (same as AF_UNIX) for POSIX compatibility.
- * include/sys/un.h: Add UNIX_PATH_LEN define. Added SUN_LEN macro for
- POSIX compatibility.
-
-Sun Nov 21 22:55:04 1999 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc (parse_options): Return immediately after dealing with
- NULL argument. Don't try to process it.
-
-Tue Nov 16 23:29:17 1999 Christopher Faylor <cgf@cygnus.com>
-
- * signal.cc (kill_worker): Guard against NULL dereference when thread
- safe.
-
-Sat Oct 30 00:59:38 1999 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Some general cleanup.
- * smallprint.c (__small_vsprintf): Accommodate new format for
- __PRETTY_FUNCTION__.
-
-Wed Oct 27 16:13:36 1999 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (mount_info::from_registry): Don't allow the same posix path
- into the mount table more than once.
- * utils/mount.cc (main): Add some orthogonality to the options.
-
-Tue Oct 26 21:55:49 1999 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc (environ_init): Turn off ntsec by default.
-
-Wed Oct 27 00:14:11 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * fhandler.cc (fhandler_base::lseek): Take readahead into account.
-
-Tue Oct 26 16:46:54 1999 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (_unlink): Return EISDIR when attempting to unlink a
- directory.
-
-Mon Oct 25 18:05:23 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.cc (fhandler_base::read): Fix previous fix.
-
-Mon Oct 25 13:46:44 1999 Christopher Faylor <cgf@cygnus.com>
-
- * dll_init.cc (add): Avoid allocating name for "LINK"ed DLLs.
- (DllList::forkeeLoadDlls): Only reload DLLs if they have been
- dlopen'ed.
- * grp.cc (parse_grp): Assign gr_mem when it is determined.
-
-Sun Oct 24 21:55:48 1999 Christopher Faylor <cgf@cygnus.com>
-
- * dll_init.cc (struct dll): Add module name.
- (add): Add additional 'name' parameter for recording in dll structure.
- (reserve_upto): New function.
- (release_upto): Ditto.
- (DllList::forkeeLoadedDlls): Ditto.
- (DllList::forkeeStartLoadDlls): Remove.
- (DllList::forkeeEndLoadedDlls): Ditto.
- (DllNameIterator::*): Eliminate class.
- (LinkedDllNameIterator::*): Ditto.
- * dll_init.h: Reflect above changes.
- * fork.cc (fork): Don't generate a list of dlls to load in the parent.
- Let the child do it. Use new DllList::forkeeLoadDlls to load DLLs.
- * smallprint.c (__small_vsprintf): No need for a sign on a Win32 error.
- (small_printf): Move function here from strace().
- * strace.cc (small_printf): Move to smallprint.c
- * include/sys/strace.h: Always declare small_printf.
-
-Sun Oct 24 02:22:13 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.cc (fhandler_base::read): Work around C bug.
-
-Tue Oct 19 22:10:21 1999 Christopher Faylor <cgf@cygnus.com>
-
- * dll_init.cc: Add some external symbols to allow thread-safe
- compilation.
-
-Tue Oct 19 21:09:42 1999 Christopher Faylor <cgf@cygnus.com>
-
- Make minor changes throughout to accommodate new gcc merge.
- * Makefile.in: Remvoe -fpermissive option when compiling using g++.
- * dcrt0.cc (noload): Mark as "unused" to avoid a compiler warning.
- * exceptions.cc (sigreturn): Make this "extern" since it essentially
- *is* extern.
- * fork.cc (sync_with_parent): Modify to cause the macro to be
- considered void.
- * heap.cc (sbrk): Remove debugging code.
- * passwd.cc (getpass): Don't use fprintf to print the prompt.
- * path.cc (mount_info::conv_to_win32_path): Accommodate compiler
- warning.
- * select.cc (cygwin_select): Experimental version of select which
- handles fd_sets with non-standard FD_SETSIZE.
- (select_stuff::wait): Ditto.
- * termios.cc (tcgetattr): Avoid a compiler warning.
- (cftospeed): Ditto.
- (cftispeed): Ditto.
- * uinfo.cc (netapi32_init): Ditto.
- * winsup.h (api_fatal): Simplify and avoid a compiler warning.
- * include/sys/strace.h (system_printf): Ditto.
- (strace_printf_wrap): Modify to cause the macro to be considered void.
- (strace_printf_wrap1): Ditto.
-
-1999-10-19 DJ Delorie <dj@cygnus.com>
-
- * Makefile.in (.cc.o): add -fpermissive to avoid g++'s conformance
- madness.
- * environ.cc (_findenv): rename to my_findenv to avoid newlib
- prototype.
- * syscalls.cc (logout): remove braces around _PATH_UTMP
-
-Sat Oct 16 22:53:02 1999 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (mount_info::cygdrive_posix_path): Properly terminate string
- after Oct 11 change below.
-
-Fri Oct 15 23:02:39 1999 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (stack_info): Reimplement stack handling routines in
- new stack_info class.
- (stack_info::brute_force): Just fill out the same structure as
- StackWalk.
- (stack_info::walk): Just fill out stack info.
- (stack): Use stack_info class stuff to iterate over and display the
- stack.
-
-Fri Oct 15 00:32:13 1999 Christopher Faylor <cgf@cygnus.com>
-
- * include/cygwin/version.h: Bump some versions.
-
-Oct 5 11:45:00 1999 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc (dll_crt0_1): Delete calls to get_WHOEVER_sid. Move call to
- uinfo_init() to the end of the function.
- * fhandler.cc (get_file_owner): Substitute call to get_id_from_sid()
- with call to get_uid_from_sid().
- (get_file_group): Substitute call to get_id_from_sid() with call to
- get_gid_from_sid().
- * fork.cc (fork): Copy new pinfo members to child.
- * grp.cc (parse_grp): Rewritten. Saves gr_passwd and all user names in
- gr_mem.
- (read_etc_group): Variable `group_sem' avoids endless loop.
- * passwd.cc (read_etc_passwd): Variable `passwd_sem' avoids endless
- loop.
- * security.cc (get_sid): New function to generate SID from int values.
- (get_ssid): New function to generate SID from string.
- (get_pw_sid): New function to generate SID from pw_gecos entry.
- (get_gr_sid): New function to generate SID from gr_passwd entry.
- (get_admin_sid): Rewritten to avoid using heap space.
- (get_system_sid): Ditto.
- (get_creator_owner_sid): Ditto.
- (get_world_sid): Ditto.
- (get_id_from_sid): Try to read SIDs from /etc/passwd or /etc/group
- files before using RID or Lookup... function.
- (legal_sid_type): New function.
- (lookup_name): Rewritten to use the logon server info, if any.
- (alloc_sd): Try to use SID from /etc/passwd and /etc/group files before
- call to lookup_name().
- (alloc_sd): New parameter for logon server.
- (set_nt_attribute): Ditto.
- (set_file_attribute): Ditto.
- * shared.cc (sec_user): If SID is saved in myself, use it instead of
- calling lookup_name().
- * shared.h: struct pinfo got extended user information.
- * spawn.cc (spawn_guts): method for forcing reread /etc files changed.
- (_spawnve): Copy new pinfo members to child.
- * syscalls.cc (chown): Change call to set_file_attribute().
- (chmod): Ditto.
- * uinfo.cc (internal_getlogin): New function.
- (uinfo_init): Calls internal_getlogin() now.
- (getlogin): Uses myself->username now.
- * winsup.h: extern HANDLE netapi32_handle; Change prototypes for
- set_file_attribute(), lookup_name(), get_id_from_sid(). New inline
- functions get_uid_from_sid() and get_gid_from_sid().
- * utils/mkgroup.c: Adapt to the new ntsec features.
- * utils/mkpasswd.c: Ditto.
-
-Thu Oct 14 23:46:03 1999 Christopher Faylor <cgf@cygnus.com>
-
- Replace calls to GetCurrentProcess() with hMainProc throughout.
- * autoload.h: Implement LoadDLLinitnow() function to force the loading
- of a DLL.
- * cygwin.din: Export cygwin_stackdump.
- * dcrt0.cc (dll_crt0): Set up hMainProc and hMainThread here.
- * dll_init.cc (dll_dllcrt0_1): Ditto.
- * environ.cc (parse_options): New "oldstack" option for forcing the use
- of the old stack walking code.
- * exceptions.cc (signals_init): Remove.
- (err_printf): Remove. Use small_printf throughout.
- (sfta): New helper function for StackWalk.
- (sgmb): Ditto.
- (stack_brute_force): Renamed from old stack walk function. Now uses
- frame pointer from context handler.
- (stack_walk): New function. Uses Windows API to walk the stack.
- (stack): Reimplement to attempt to load imagehlp.dll. If this succeeds
- use stack_walk() to display stack info, otherwise use
- stack_brute_force.
- (cygwin_stackdump): Temporary (?) function for displaying a stack dump
- from the called location.
- (stackdump): Accept new parameters for passing to stack().
- (handle_exceptions): Call stackdump with new parameters needed to walk
- the stack.
- * fhandler.cc (fhandler_base::read): Fix potential buffer overrun. Fix
- end of buffer problems when \r is not followed by a \n.
- (fhandler_base::lseek): Avoid flushing read ahead when not moving the
- file pointer.
- * fhandler_termios.cc (fhandler_termios::set_ctty): Add a debugging
- statement.
- * sigproc.cc (sigproc_init): Eliminate obsolete signals_init function.
- * winsup.h: Add some declarations.
-
-Wed Oct 13 09:02:32 1999 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * path.cc (readlink): Return errno correctly when it can't find the
- target symlink.
-
-Tue Oct 12 13:02:08 1999 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (setsid): Only reset sid/pgid when NOT process group
- leader.
- * tty.cc (tty_list::allocate_tty): Don't set sid to myself. The first
- tty open should do that.
-
-Mon Oct 11 23:13:29 1999 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (noload): Issue appropriate Windows error.
- * fhandler_termios.cc (fhandler_termios::ctty): Don't automatically set
- sid, etc., unless the current pid associated with the tty's sid does
- not exist.
- * path.cc (mount_info::cygdrive_posix_path): Avoid copying beyond the
- end of buffer or suffer garbage.
- * pinfo.cc (pinfo_init): Restore sid behavior of a year ago. The sid
- should be the same as the pid to be equivalent to UNIX.
- (pinfo_list::operator []): Add more bounds checking.
-
-Sun Oct 10 14:08:30 1999 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (select): Return error if n > FD_SETSIZE. This is a
- temporary fix.
-
-Sun Oct 10 13:56:14 1999 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (iscygdrive_device): Be more precise in detecting when a
- "cygdrive" device. This should allow 'mkdir -p' to work correctly.
-
-Fri Oct 08 08:55:31 1999 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * path.cc (symlink_check_one): set errno to EINVAL on socket files
- same as normal files.
-
-1999-10-06 DJ Delorie <dj@cygnus.com>
-
- * include/oaidl.h (IDispatch.GetIDsOfNames): Use DISPID* not DISPID
-
-1999-10-06 DJ Delorie <dj@cygnus.com>
-
- * exceptions.cc (err_printf): new function; print to stderr
- without strace's clutter. The stacktrace functions use this, so
- the stacktrace files should be cleaner.
- (exception): Print segment registers also
- (stack): include a peek at the function's arguments
-
-Tue Oct 5 16:33:17 1999 Christopher Faylor <cgf@cygnus.com>
-
- * hinfo.cc (hinfo::extend): Eliminate inappropriate test for boundary
- condition.
-
-1999-10-04 DJ Delorie <dj@cygnus.com>
-
- * config/i386/longjmp.c: don't restore %fs (Paul Sokolovsky
- <paul-ml@is.lg.ua>)
-
-1999-10-04 DJ Delorie <dj@cygnus.com>
-
- * localtime.c (tzsetwall): Handle Asian Windows strings correctly
- (from Kazuhiro Fujieda <fujieda@jaist.ac.jp>).
-
-Sat Oct 2 23:00:00 1999 Corinna Vinschen <corinna@vinschen.de>
-
- * include/lm*.h: Correct multiple problems in lan manager
- header files.
-
-Sun Oct 3 14:29:53 1999 Christopher Faylor <cgf@cygnus.com>
-
- * sysdef/imagehlp.def: New file. Definitions for imagehlp.dll.
- * include/imagehlp.h: Ditto.
- * include/winbase.h: YA missing structure.
-
-Fri Oct 1 11:16:00 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (alloc_sd): Correct setting of FILE_DELETE_CHILD.
- (get_file_attribute): Read ntea attributes only if ntsec is disabled.
- * syscalls.cc (_unlink): Don't queue file into delqueue if DeleteFile
- returns ERROR_ACCESS_DENIED.
-
-1999-09-30 Mumit Khan <khan@xraylith.wisc.edu>
-
- * init.cc (dll_entry): Remove static_load case.
- * dcrt0.c (set_os_type): Make it externally visible.
- * dll_init.cc (dll_dllcrt0_1): Update noncygwin initialization for
- post-b20.1 code.
-
-1999-09-30 DJ Delorie <dj@cygnus.com>
-
- * times.cc: declare _timezone and _daylight properly
-
-Wed Sep 29 23:57:40 1999 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (do_exit): Remove EXIT_SIGNAL mask when exiting. It is not
- correct given changes to really_exit.
- * select.cc (peek_serial): Work around apparent Windows bug.
-
-1999-09-29 Norbert Schulze <Norbert.Schulze@rhein-neckar.de>
-
- * times.cc (timezone): revert 'return TZ if set' patch.
- * times.cc (timezone): uses now tzset() and _timezone.
- * times.cc (gettimeofday): ditto.
- * localtime.c (tzsetwall): no negative minutes if offset is negativ.
- * localtime.c (tzsetwall): minutes place holder was missing if
- minutes == 0 and seconds !=0 (h:0:s).
- * localtime.c (tzsetwall): if timezone has no daylight saving
- (tz.StandardDate.wMonth==0) generate no daylight saving parameters.
-
-Sat Sep 25 15:11:04 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_termios.cc (fhandler_termios::bg_check): Accept a new
- argument to control whether we should worry about blocking signals.
- * fhandler.h: Ditto.
- * syscalls.cc (read_handler): Accept a new argument for passing to
- bg_check.
- (read): Inform read_handler if signals are blocked or not.
- * termios.cc: Throughout, reorganize to always block signals before
- calling bg_check.
-
-Sat Sep 25 13:36:06 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h (fhandler_termios::line_edit): Add an extra argument.
- * fhandler_serial.cc (fhandler_serial::open): Maintain consisten
- fAbortOnError state.
- * fhandler_termios.cc (fhandler_termios::line_edit): Use new
- "always_accept" argument to control whether input_done is set
- regardless of canonical state.
- * fork.cc (vfork): Duplicate "parent's" fd table.
- * hinfo.cc (hinfo::dup_worker): New method.
- (dup2): Use new dup_worker method.
- (hinfo::fixup_after_fork): Lock dtable prior to operating on it.
- (hinfo::vfork_child_dup): New method. Duplicates dtable for vfork.
- (hinfo::vfork_parent_restore): New method. Restores dtable when vfork
- exits.
- * net.cc (set_winsock_errno): Make global.
- * pipe.cc (pipe): Default mode to binary unless *explicitly* set to
- text.
- * select.cc (set_bits): Test that {read,write,except}_selected are
- active before setting a bit.
- (peek_pipe): Short circuit tests if we're not checking for readable
- or "except"able handles.
- (thread_socket): Use read check for exitsock as old method relied on
- undocumented, unreliable behavior.
- (start_thread_socket): Perform more setup on exitsock to improve thread
- exit signalling.
- (socket_cleanup): Connect to the exitsock to force thread_socket thread
- exit.
- * winsup.h (hinfo): Add preliminary vfork stuff.
- * include/winsock.h: Add shutdown() how types.
- * include/sys/socket.h: Add socketpair declaration.
-
-1999-09-22 DJ Delorie <dj@cygnus.com>
-
- * syscalls.cc (chown): never return ENOSYS - just pretend it
- works.
-
-Wed Sep 22 00:47:56 1999 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (MAKEready): Need to initialize 'fd' or open tests in
- peek fail.
-
-Mon Sep 20 17:07:37 1999 Christopher Faylor <cgf@cygnus.com>
-
- * smallprint.c (__small_vsprintf): Fix '%+' handling.
-
-Thu Sep 16 21:48:13 1999 Christopher Faylor <cgf@cygnus.com>
-
- * utils/cygcheck.cc (dump_sysinfo): Deal with a new compiler error.
- * utils/strace.cc (make_command_line): Change to a void * argument, as
- is required for SetConsoleCtrlHandler.
-
-Thu Sep 16 20:47:12 1999 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (__api_fatal): Rearrange slightly.
- * fhandler.h (set_ctty): Change to void.
- * fhandler_termios.cc (fhandler_termios::set_ctty): Ditto.
- * select.cc (thread_pipe): Change to a void * argument, as is required
- for thread functions.
- (thread_socket): Ditto.
- (thread_serial): Ditto.
- * include/winbase.h: Mark ExitProcess as noexit.
-
-Thu Sep 16 18:32:12 1999 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (ctrl_c_handler): Make WINAPI, as required by
- SetConsoleCtrlHandler.
-
-Thu Sep 16 17:48:05 1999 Christopher Faylor <cgf@cygnus.com>
-
- * debug.cc (thread_stub): Make WINAPI, as required by CreateThread.
- * fhandler_tty.cc (process_input): Ditto.
- (process_output): Ditto.
- (process_ioctl): Ditto.
- * select.cc (thread_pipe): Ditto.
- (thread_serial): Ditto.
- (thread_socket): Ditto.
- * sigproc.cc (wait_proc): Ditto.
- (wait_sig): Ditto.
- * window.cc (winMain): Ditto.
-
-Wed Sep 15 20:58:37 1999 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (call_handler): Let fatal signals through regardless of
- signal_mutex.
- * fhandler.h (fhandler_base): Make bg_check virtual.
- (fhandler_termios::bg_check): Eliminate the second argument.
- * fhandler_console.cc (fhandler_console::ioctl): Check for background
- operation.
- * fhandler_termios.cc (fhandler_termios::bg_check): Eliminate the
- second argument. A negative arg 1 means the same thing.
- * ioctl.cc (ioctl): Add debugging output.
- * syscalls.cc (_write): Eliminate second argument to bg_check.
- * termios.cc (tcsendbreak): Check for background operation.
- (tcdrain): Ditto.
- (tcflush): Ditto.
- (tcflow): Ditto.
- (tcsetattr): Reorganize on similar lines to above routine.
-
-Wed Sep 15 15:25:04 1999 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (peek_pipe): Only set read_ready if bg_check returns <= 0.
- (peek_console): Ditto. Correct PeekConsole conditional so that the for
- loop breaks eventually.
-
-Wed Sep 15 00:21:40 1999 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (set_console_handler): Allocate security stuff here
- since it is needed earlier in the process now. Allocate a shared event
- for use in synchronizing CTRL-C events that happen while the process is
- still initializing.
- (ctrl_c_handler): Use the above event to synchronize with the cygwin
- startup process, waiting for the signal thread to come alive before
- trying to send a signal.
- (signals_init): Don't call set_console_handler() here, since it is now
- handled much earlier in cygwin initialization.
- * shared.cc (shared_init): Move out security setup.
- * sigproc.cc (wait_sig): Activate the console_handler_thread_waiter so
- that any waiting thread which is handling ctrl-c's will wake up and
- send a signal, if appropriate.
-
-Tue Sep 14 23:49:39 1999 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (ctrl_c_handler): Handle ctrl-c events ourself, using
- the "UNIX way".
- * fhandler_console (tty_list::get_tty): New function.
- * shared.h: Add some additional things to tty_min class for handling
- ctrl-c.
-
-1999-09-14 DJ Delorie <dj@cygnus.com>
-
- * dir.cc (rmdir): return ENOTDIR for regular files on 9x
-
-Tue Sep 14 00:01:59 1999 Christopher Faylor <cgf@cygnus.com>
-
- * debug.h (ForceCloseHandle2): New macro.
- * fhandler.cc (set_inheritance): Accept name of handle as optional
- third argument. Use this in ForceCloseHandle2/ProtecHandle2.
- * fhandler.h: Implement bg_check() method.
- * fhandler_console.cc (get_tty_stuff): Initialize more tty stuff.
- (fhandler_console::read): Check for background read.
- * fhandler_termios.cc (fhandler_termios::bg_check): New function.
- Performs appropriate action given background read or write.
- * fhandler_tty.cc (fhandler_tty_slave::write): Replace background check
- code with new method.
- (fhandler_tty_slave::read): Ditto.
- (fhandler_tty_common::set_close_on_exec): Pass output_mutex name to
- set_inheritance.
- * select.cc: Throughout check that the fd is still open before polling.
- (peek_pipe): Check for background read.
- (peek_console): Ditto.
- * shared.h: Move ntty from tty into tty_min.
- * syscalls.cc (read_handler): Check for background read.
- (_write): Check for background write.
-
-Sat Sep 11 16:24:21 1999 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (iscygdrive_device): New macro.
- (mount_info::conv_to_win32_path): Only attempt "cygdrive" translation
- when passed /cygdrive/something.
- (mount_info::write_cygdrive_info_to_registry): Store in-memory copy of
- cygdrive prefix automatically.
- (mount_info::read_cygdrive_info_from_registry): Reorganize for new
- write_cygdrive_info_to_registry functionality.
- (mount): Ditto.
-
-Fri Sep 10 15:44:11 1999 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (pathconf): Make first arg 'const'.
-
-1999-09-10 DJ Delorie <dj@cygnus.com>
-
- * exec.cc (_execve): check for an empty environment
-
-Wed Sep 8 10:24:12 1999 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (dll_crt0_1): Generalize test for initial zeroes in
- exec/fork block.
- * fhandler.cc (fhandler_disk_file::open): Don't attempt #! detection on
- non-disk files.
- * fhandler.h: Use generic status bit set/clear macros. Use bitmask for
- fhandler_termios state.
- * fhandler_console.cc: Rename "tty_stuff" to more descriptive
- "shared_console_info".
- (fhandler_console::read): Reset console state before a read if
- appropriate.
- (fhandler_console::open): Improve check for setting console state.
- (fhandler_console::fixup_after_fork): Ditto.
- (set_console_state_for_spawn): New function.
- * fhandler_termios.cc (fhandler_termios::tcinit): Use new method for
- determining if initialized.
- * fhandler_tty.cc (fhandler_tty::init_console): Avoid sending handle to
- init or it will be closed.
- * fork.cc (per_thread::set): Make this method non-inline, temporarily.
- * select.cc (peek_console): Call set_input_state to ensure that the
- console is in the correct state.
- * shared.h (child_info): Make zero element an array for future
- tweaking.
- (tty_min): Change initialized element to a bit field. Define bit field
- macros for manipulating it.
- * sigproc.cc (wait_sig): Wake up every half second in a (vain?) attempt
- to work around Windows 98 hanging problem.
- (wait_subproc): Ditto.
- * spawn.cc (spawn_guts): Use new "set_console_state_for_spawn" prior to
- starting a process.
- * winsup.h: Define generic macros for manipulating a method's status
- field.
- (per_thread): Move inline method to fork.
-
-Mon Sep 6 13:36:34 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_tty.cc (fhandler_tty_master::init_console): Remove retrieval
- of stderr handle since it is not required for correct init operation.
- * hinfo.cc (hinfo_init): Reorganize to accommodate potential closing of
- console handles by fhandler_console::init.
- (init_std_file_from_handle): Set standard handle as appropriate.
- (hinfo::de_linearize_fd_arry): Ditto.
- * fhandler_console.cc (fhandler_console::init): Conditionally close
- handle only if it is valid.
-
-Sun Sep 5 22:43:21 1999 Christopher Faylor <cgf@cygnus.com>
-
- * utils/cygcheck.cc: Make sure that GetDiskFreeSpaceExA is defined as a
- __stdcall function or the stack will suffer. For now, don't sort mount
- output as more work copying the individual mntent elements is required.
-
-Sat Sep 4 19:01:00 1999 Christopher Faylor <cgf@cygnus.com>
-
- * include/glob.h: Ensure that glob*() functions can be properly accessed by
- programs using the DLL.
-
-Sat Sep 4 18:49:04 1999 Christopher Faylor <cgf@cygnus.com>
-
- * heap.cc (heap_init): Tweak debugging output.
- * sigproc.cc (sig_send): Catch obvious impossible values from
- GetLastError.
-
-Sat Sep 4 18:43:49 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_tty.cc (fhandler_tty_slave::open): Protect against signal
- dispatch.
- (fhandler_tty_slave::write): Only wait a fixed amount of time to
- receive a an output_done_event.
- (fhandler_tty_slave::tcflush): Protect against signal dispatch.
-
-Sat Sep 4 18:30:42 1999 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (handle_sig): Temporarily remove OutputDebugString. It
- seemed to be causing sporadic hangs.
- (call_handler): Save and restore di and si.
- (sigreturn): Ditto.
-
-Fri Sep 3 23:07:44 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_termios.cc (fhandler_termios::line_edit): Properly deal with
- sending characters to slave when !iscanon.
-
-Fri Sep 3 18:15:00 1999 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_raw.cc (fhandler_dev_raw::fstat): Add S_ISCHR to mode bits.
- * fhandler_tape.cc (fhandler_dev_tape::fstat): Erase setting of S_ISCHR
- since it's set in fhandler_dev_raw::fstat now.
-
-Thu Sep 2 22:11:03 1999 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (mount_info::conv_to_win32_path): Fix problem with
- calculating relative path at root.
-
-Wed Sep 1 23:24:43 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.cc (fhandler_base::fhandler_base): Don't use default binmode
- for console.
-
-Wed Sep 1 20:51:05 1999 Christopher Faylor <cgf@cygnus.com>
-
- * smallprint.c (__small_vsprintf): Allow field width argument with 'l'
- modifier. Consolidate processing of field width.
- * uname.cc (uname): Eliminate space in "release" field.
-
-Tue Aug 24 10:46:24 1999 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * fhandler_console.cc (write_normal): Write '\n' corresponding to
- DWN if the cursor is out of the window.
-
-Wed Aug 25 22:16:46 1999 Christopher Faylor <cgf@cygnus.com>
-
- * smallprint.c (rn): Deal with positive as well as negative signs.
- (__small_vprintf): Handle '+', 'l', and '%' format types.
-
-Wed Aug 25 00:38:49 1999 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (dll_crt0_1): Zero heap information in user_data to
- work around mutant startup code.
-
-Tue Aug 24 00:03:22 1999 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc (sig_send): One more end-of-process race detection.
-
-Mon Aug 23 21:37:07 1999 Christopher Faylor <cgf@cygnus.com>
-
- Throughout, remove malloc.h.
- * debug.cc: Initialize handle list so that it will not be copied on
- fork.
- * exceptions.cc (_sigreturn): Zero windows error on exit. It's
- meaningless after a signal dispatch.
- * fhandler_console.cc (fhandler_console::de_linearize): Improve error
- messages.
- * shared.h: Increment fork magic number.
- * sigproc.cc (sigproc_terminate): Close all handles prior to calling
- proc_terminate if running in signal thread.
- (sig_send): Eliminate bogus ResetEvent on a semaphore. Add code for
- potentially dealing with problems when this code is interrupted via a
- signal dispatch.
- * times.cc (timezone): Use __small_sprintf.
- * uname.cc (uname): Ditto. Also use strcpy instead of sprintf where
- appropriate.
-
-1999-08-23 DJ Delorie <dj@envy.delorie.com>
-
- * localtime.c: export timezone, daylight, tzname as _*
- * times.cc: don't export timezone, daylight, tzname
- (timezone): return TZ if set.
- (cygwin_tzset): not needed.
-
-Thu Aug 19 13:46:47 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fork.cc (fork): Remove pinfo lock. It is in allocate_pid, now.
- * spawn.cc (_spawnve): Ditto.
- * pinfo.cc (pinfo_init): Ditto.
- (lock_pinfo_for_update): Impreove debug output.
- (pinfo_list::allocate_pid): Lock pinfo mutex here.
-
-1999-08-19 DJ Delorie <dj@cygnus.com>
-
- * Makefile.in (tooldir): If we're building natively, drop the
- $(target_alias) on include and lib's install (i.e. /usr/include
- instead of /usr/include/i686-cygwin).
-
-Thu Aug 19 01:11:25 1999 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc (sig_send): Avoid a race with proc thread when executing
- due to a signal.
-
-Wed Aug 18 16:37:59 1999 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * fhandler_console (fhandler_console::fillin_info): Avoid setting
- scroll_region.Bottom when it is not known.
- (fhandler_console::write_normal): Add various fixes for console
- scrolling.
-
-Wed Aug 18 16:18:22 1999 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc: Add more precise end-of-process detection.
-
-Wed Aug 18 00:03:47 1999 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc (sig_send): Work around apparent Windows bug which
- occasionally results in bogus error messages when a signal is
- dispatched.
-
-1999-08-17 DJ Delorie <dj@cygnus.com>
-
- * localtime.c (tzsetwall): Deduce TZ more accurately.
-
-Tue Aug 17 18:00:03 1999 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (peek_pipe): Correct detection of process group for
- backgrounded processes.
-
-Tue Aug 17 10:24:49 1999 Christopher Faylor <cgf@cygnus.com>
-
- * include/winnt.h: Fix typo in IMAGE_FIRST_SECTION definition.
-
-Sun Aug 15 19:11:49 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * gcrt0.c (__eprol): Avoid namespace pollution.
- (_monstartup): Turn into a constructor function and prevent multiple
- invocations.
-
-Mon Aug 16 10:03:00 Corinna Vinschen <corinna@vinschen.de>
-
- * utils/mkgroup.c: Correct call to LookupAccountSid for retrieval of
- 'None'.
-
-Mon Aug 16 00:24:29 1999 Christopher Faylor <cgf@cygnus.com>
-
- * debug.cc (locker): Improve signal mutex locking.
- * exceptions.cc (sig_handle): Pass STOP signals to call_handler to
- ensure honoring of signal_mutex.
- (call_handler): Move STOP code here after acquistion of signal_mutex.
- * fhandler_tty.cc (fhandler_tty_common::__acquire_output_mutex): Track
- lockers for debugging.
- (fhandler_tty_common::__release_output_mutex): Ditto.
- (fhandler_slave::write): Fix faulty signal blocking code.
- * fork.cc (fork_copy): Remove ancient if 0.
- (fork): Conditionalize "FORKDEBUG" under DEBUGGING.
- * sigproc.cc (proc_terminate): Reduce pinfo lock time.
- (sigproc_terminate): Set sig_loop_wait after getting signal_mutex.
- (__get_signal_mutex): Reorganize for less strace output when not
- DEBUGGING.
- (__release_signal_mutex): Ditto. Reorganize case where !sig_loop_wait.
- (have_signal_mutex): Returns true if current thread has the mutex.
- * wait.cc (wait4): Change debugging message.
-
-Sat Aug 14 0:10:00 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::raw_read): Set correct errno from Win32
- error when ReadFile fails.
- (fhandler_base::raw_write): In case of ERROR_DISK_FULL, return
- bytes_written only if bytes_written > 0.
- * errno.cc: Map ERROR_DISK_FULL to ENOSPC.
-
-Fri Aug 13 14:22:12 1999 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (peek_pipe): Honor ignra argument.
-
-Fri Aug 13 00:45:00 1999 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (spawn_guts): Ensure that hExeced is set to proper state
- when parent has exited.
-
-Thu Aug 12 14:09:30 1999 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc (getsem): Fix typo which prevented sending signals to
- other processes.
-
-Wed Aug 11 22:06:33 1999 Christopher Faylor <cgf@cygnus.com>
-
- * cygwin.din: Export glob and globfree.
- * glob.h: Move to include.
- * Makefile.in: Correct glob.h dependencies.
-
-Wed Aug 11 19:41:04 1999 Sergey Okhapkin <sos@prospect.com.ru>
-
- * fhandler.cc (fhandler_disk_file::fstat): Check if the file is unix
- domain socket.
- (fhandler_disk_file::open): Call set_socket_p().
- * fhandler.h: Add new fhandler type flags (FH_LOCAL, FH_FIFO).
- (fhandler_base): get/set_socket_p - new member functions.
- (fhandler_socket::addr_family): Add new member, currently unused.
- (fhandler_socket::get/set_addr_family): Add new functions to access
- addr_family.
- * include/sys/un.h: New file.
- * net.cc: Include <sys/un.h>
- (cygwin_socket): Always create socket of AF_INET family, store
- argument's family.
- (get_inet_addr): New static function. Converts AF_UNIX requests into
- corresponding AF_INET requests.
- (cygwin_sendto): Use get_inet_addr().
- (cygwin_connect): Likewise.
- (cygwin_accept): Check for sockaddr length.
- (cygwin_bind): Implement AF_UNIX.
- * path.h (PATH_SOCKET): Add new enum value.
- (path_conv::issocket): Add new member function.
- (SOCKET_COOKIE): Add new define.
- * syscalls.cc (chmod): Mark socket files with system file attribute.
-
-Wed Aug 11 17:22:46 1999 Corinna Vinschen <corinna@vinschen.de>
-
- * utils/mkgroup.c (main): Generate "None" group when
- invoked via mkgroup -l.
-
-Tue Aug 10 21:30:31 1999 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (peek_pipe): Handle type ahead where appropriate.
- * sigproc.cc (proc_can_be_signalled): Revert to previous method for
- determining signalability.
- (getsem): Move PID_INITIALIZING test here.
- * wait.cc (wait4): Improve debug output slightly.
-
-Mon Aug 9 23:27:44 1999 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (do_exit): Add additional check for valid hExeced.
- * exceptions.cc (call_handler): Implement a raceless way to track
- pending_signals.
- * signal.cc (kill_worker): Make calls from non-main threads synchronous
- or signals from a tty thread don't work right.
- * sigproc.cc (sig_send): Localize pending_signals assignment to only
- the wait_sig thread.
- (__get_signal_mutex): Don't attempt to grab a mutex if signal_mutex
- hasn't been assigned yet. Add more strace debugging information when
- -DDEBUGGING.
- (__release_signal_mutex): Don't attempt to release a mutex if
- signal_mutex hasn't been assigned yet. Add more strace debugging
- output.
- (wait_sig): Attempt to eliminate race in setting of pending_signals.
- * spawn.cc (spawn_guts): Set hExeced to INVALID_HANDLE_VALUE so that it
- will be obvious when a process is actually just an execed stub.
- * strace.cc (strace_vsprintf): Output a "!" after the pid when
- executing in an execed stub.
-
-Mon Aug 9 17:17:13 1999 Christopher Faylor <cgf@cygnus.com>
-
- Throughout, eliminate in() and out() macros.
- * winsup.h (tty_attached): Accept an argument indicating the pinfo
- structure to query.
- * exceptions.cc (really_exit): Cosmetic change.
- * external.cc (fillout_pinfo): Use queried pinfo structure for
- determining tty number, not *our* number.
- * net.cc: More workarounds.
- * path.cc (get_device_number): Supply argument to tty_attached.
- * syscalls.cc (ctermid): Ditto.
- * strace.cc (strace_dump): Remove.
- * include/sys/strace.h: Eliminate obsolete stuff.
-
-Sun Aug 8 22:54:45 1999 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (call_handler): Process all signals on return from a
- signal dispatch.
- * sigproc.cc (proc_can_be_signalled): Guard against waiting too long
- when exiting.
- (proc_exists): Don't report an exited process as "existing".
- (proc_terminate): Close handle prior to testing for existence so that
- proc_exists will not always return TRUE. Eliminate use of zap_subproc.
- (stopped_or_terminated): Eliminate use of zap_subproc.
- (zap_subproc): Delete.
-
-Sun Aug 8 22:17:36 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_tty.cc (fhandler_tty_master::init): hThread must remain
- open. Previous change to close it was wrong.
-
-Sun Aug 8 20:35:33 1999 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc: Initalize NO_COPY variables.
- * pinfo.cc (record_death): Don't be so insistent about getting
- the pinfo lock.
- * sigproc.cc (proc_terminate): Tighten the region protected by
- the pinfo lock.
- * spawn.cc (spawn_guts): Eliminate the pinfo lock when reparenting
- as it is no longer required.
- (_spawnve): Tighten the region protected by the pinfo lock.
-
-Sun Aug 8 18:26:51 1999 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc (sig_send): Add more unfortunate guards against a
- system call being interrupted by a signal dispatch.
-
-Sat Aug 7 15:38:42 1999 Christopher Faylor <cgf@cygnus.com>
-
- * security.cc (get_admin_sid): Ensure that returned buf is not copied
- on a fork.
- (get_system_sid): Ditto.
- (get_create_owner_sid): Ditto.
- (get_world_sid): Ditto.
-
-Sat Aug 7 15:17:25 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_tty.cc (process_input): Reset signal_arrived event prior to
- calling console read as this is now a requirement for functions which
- detect signal_arrived.
- (fhandler_tty_master::write): Allow signals to operate prior to raising
- SIGTTOU.
- (fhandler_tty_master::read): Allow signals to operate prior to raising
- SIGTTIN.
- * select.cc (peek_pipe): Detect attempt to read from tty not in our
- process group as a "read_ready" event.
- * include/shellapi.h: Add missing defines.
- * utils/ps.cc: Output windows pid as unsigned for Windows 9x.
-
-Sat Aug 7 14:30:00 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (get_creator_owner_sid): New function.
- * shared.cc (sec_user): calls `get_creator_owner_sid' in creation
- of the security attributes structure additionally.
-
-Fri Aug 6 13:04:40 1999 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (spawn_guts): Allow failure from OpenProcess. The parent
- may have exited due to 7/31 change.
-
-Thu Aug 5 22:54:07 1999 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc (wait_for_me): Break out as a common function to check
- that the current process is ready to handle signals.
- (proc_can_be_signalled): Treat myself differently.
-
-Thu Aug 5 21:24:20 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_console.cc (fhandler_console): Don't call tcinit here.
- (fhandler_console::read): Don't reset signal_arrived here.
- * syscalls.cc (_read): Set it here instead.
- * fhandler_termios.cc (fhandler_termios::line_edit): Only call
- accept_input when input is ready. Ignore iscanon in this case.
- * fhandler_tty.cc (fhandler_tty_slave::init): Don't call tcinit here.
-
-Thu Aug 5 16:02:25 1999 Christopher Faylor <cgf@cygnus.com>
-
- * strace.cc (handle_output_debug_string): Ignore errors reading
- from child memory as they seem to occur due to a process exiting.
- (close_handle): New, defensive code.
-
-Thu Aug 5 13:32:43 1999 Christopher Faylor <cgf@cygnus.com>
-
- * strace.cc (remove_handle): New function.
- (add_child): Speed up slightly.
- (proc_child): Use output of remove_child in CloseHandle.
-
-Thu Aug 5 12:38:50 1999 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (dll_crt0_1): Don't protect subproc_ready if it is NULL.
- (do_exit): Avoid calling close_all_files if exiting from exec stub.
- * net.cc: Reorganize to work around some compiler bugs.
- * spawn.cc (spawn_guts): Set hExeced only after child stuff has been
- completely initialized.
- * syscalls.cc (_open): Protect against signals.
- * utils/strace.cc (warn): New function.
- (add_child): Issue warning when can't duplicate child process handle.
-
-Wed Aug 4 21:35:28 1999 Christopher Faylor <cgf@cygnus.com>
-
- * psapi.h: New file.
-
-Thu Aug 4 10:28:00 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc: Eliminate MALLOC_CHECK calls.
- (lookup_name): New function simplifies the retrieval of user and group
- names.
- (alloc_sd): Call `lookup_name' instead of `LookupAccountName'.
- * shared.cc (sec_user): Call `lookup_name' instead of
- `LookupAccountName'. Eliminate 'free' call on stack space.
- * winsup.h: Declare `lookup_name'.
-
-Wed Aug 4 16:24:02 1999 Christopher Faylor <cgf@cygnus.com>
-
- * a.out.h: Fix cut and paste from mime email typos.
-
-Mon Aug 2 19:08:48 1999 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Fix utils dependency. Make clean more assertive.
- * path.cc (mount_info::conv_to_win32_path): Fill in correct destination
- when a device name is detected.
- * syscalls.cc (chown): Always succeed when referencing a cygwin device.
- (chmod): Ditto.
- * net.cc (get_ifconf): Eliminate holdover from previous change.
-
-Mon Aug 2 13:07:44 1999 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (do_global_ctors): Remove previous change. It was just
- wrong.
-
-Sun Aug 1 23:21:28 1999 Christopher Faylor <cgf@cygnus.com>
-
- Throughout rename 'slave_alive' handle to 'inuse'.
- * shared.h: Implement tty_attached() macro to determine when an actual
- tty is associated with the process.
- (class tty): Add some methods for manipulating an "inuse" event that is
- common to both master and slave parts of a tty.
- * dcrt0.cc (do_exit): Use tty_attached() to determine if signal should
- be sent to process group.
- * external.cc (fillout_pinfo): Return -1 if tty is not attached (i.e,
- attached to a console).
- * fhandler.h: Move more stuff into fhandler_tty_common and out from sub
- classes.
- * fhandler_console.cc (fhandler_console::read): Send SIGWINCH signal to
- *correct* process group.
- (fhandler_console::open): Fix incorrect argument ordering in set_ctty.
- (fhandler_console::de_linearize): Remove unneeded handle resets.
- * fhandler_tty.cc (fhandler_tty_slave::open): Fix incorrect argument
- ordering in set_ctty. Use tty create_inuse method to create inuse
- event.
- (fhandler_tty_slave::close): Delete.
- (fhandler_tty_slave::dup): Delete.
- (fhandler_tty_slave::write): Minor cleanup of flow of control.
- (fhandler_tty_common::dup): Subsume fhandler_tty_slave dup method.
- (fhandler_pty_master::fhandler_pty_master): Zero inuse field.
- (fhandler_pty_master::open): Set inuse field.
- (fhandler_tty_common::close): New, superclass method.
- (fhandler_tty_common::set_close_on_exec): Handle inuse field.
- (fhandler_tty_common::fixup_after_fork): Ditto.
- (fhandler_tty_slave::set_close_on_exec): Delete.
- (fhandler_tty_slave::fixup_after_fork): Delete.
- * path.cc (get_device_number): Use tty_attached() to figure out
- /dev/tty.
- * select.cc (peek_console): Send SIGWINCH signal to *correct* process
- group.
- * tty.cc (tty::master_alive): New method.
- (tty::create_inuse): New method.
-
-Sun Aug 1 16:23:22 1999 Christopher Faylor <cgf@cygnus.com>
-
- * net.cc (get_ifconf): Use alloca for temporary buffer.
-
-Sun Aug 1 01:38:20 1999 Christopher Faylor <cgf@cygnus.com>
-
- Modify de_linearize methods throughout to set unix and msdos path
- names.
- * dcrt0.cc (do_exit): Only remove shared memory when we're done with
- it.
- * exceptions.cc (try_to_debug): Move static variable outside of the
- function so that it can more easily be set with gdb.
- * fhandler_console.cc (fhandler_console::open): Handles are typically
- hexadecimal in debugging output.
- (fhandler_console::open): Do not open inherit console handles by
- default.
- (fhandler_console::dup): Just use open method to "duplicate" a console
- handle.
- (fhandler_console::fixup_after_fork): Do *not* close handles here since
- they have not been inherited.
- (fhandler_console::de_linearize): Ditto.
- * utils/strace.cc (create_child): Correct debugging flags when not
- tracking forked processes.
-
-Sat Jul 31 20:10:58 1999 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (do_global_ctors): Ensure that ctors are not called more
- than once per session.
- * fork.cc (fork): Use sig_protect to protect against signals during
- fork.
- * pinfo.cc (lpfu): Show windows pid in debugging message as this is
- generally more useful.
- * pinfo.cc (unlock_pinfo): Issue an error if ReleaseMutex fails.
- (pinfo::record_death): Actually unlock pinfo on exit rather than allow
- ExitProcess to do this since ExitProcess can sometimes take a *long*
- time.
- * spawn.cc (spawn_guts): Ensure that pinfo is always unlocked.
-
-Thu Jul 29 23:43:24 1999 Christopher Faylor <cgf@cygnus.com>
-
- Throughout, consolidate pgid processing for console and tty into
- fhandler_termios and tty_min.
- * debug.h: Make WF?O functions the defaults for dealing with Waits.
- These functions attempt to work around signal interrupt problems.
- * debug.cc: Ditto.
- * exceptions.cc (call_handler): Don't wait a long time for second
- attempt to get signal mutex.
- * fhandler_console.cc (fhandler_console::open): Set the "controlling
- tty".
- * fhandler_termios.cc: Move the ctty and pgid functions here.
- (fhandler_termios::line_edit): Fix debug output.
- * fhandler_tty.cc (fhandler_tty_slave_write): Use sig_protect to
- protect against output_mutex deadlock.
- * fork.cc (get_vfork_val): Conditionalize with NEWVFORK.
- * syscalls.cc (setsid): Add debugging output.
- (setpgid): Reorganize and add debugging output.
- * tty.cc (tty::init): Use a method to clear the sid.
-
-Thu Jul 29 23:42:53 1999 Christopher Faylor <cgf@cygnus.com>
-
- Patch from Egor Duda <deo@logos-m.ru>:
- * grp.cc (read_etc_group): Use a default /etc/group entry when one
- doesn't exist.
- (getgrgid): Ditto.
- * passwd.cc (read_etc_passwd): Use a default /etc/passwd entry when one
- doesn't exist.
- (search_for): Ditto.
- * uinfo.cc (read_etc_group): Remove some defines.
- * winsup.h: Move them here.
-
-1999-07-29 Bernd Schmidt <bernds@cygnus.co.uk>
-
- * Makefile.in (SUBDIRS_AFTER): Build mingw before utils.
- * utils/Makefile.in (MINGW_LDFLAGS): Add "-B../mingw/"
-
-
-Tue Jul 27 23:31:28 1999 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc: Add experimental vfork_storage initialization.
- (do_exit): Ditto.
- * exec.cc: Use _spawnve throughout as a common interface for execing a
- program.
- * fork.cc (vfork): Add beginnings of true vfork support.
- * path.cc (sort_by_posix_name): Remove special casing of zero length
- names since they should now be eliminated earlier on.
- (sort_by_native_name): Ditto.
- (mount_info::del_item): Remove hole from mount table specifically, here
- or suffer weird behavior. Suggested by Andrew Dalgleish
- <andrewd@axonet.com.au>.
- * shared.cc: Make SHAREDVER "unsigned" to avoid a compiler warning.
- * spawn.cc : Accommodate additional argument to _spawnve, throughout.
- (_spawnve): Make this a global function and take an hToken argument so
- that it can be used by sexecve. Accommodate experimental vfork
- functionality.
- * winsup.h: Add initial support for per-thread vfork stuff.
- * include/cygwin/version.h: Bump shared memory version number.
-
-Mon Jul 26 20:59:58 1999 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (sort_by_posix_name): Report two zero length strings as being
- equal or suffer an infinite loop.
- (sort_by_native_name): Ditto.
- * shared.cc (shared_info::initialize): Refuse to use a different DLL's
- shared memory.
- * shared.h: Fix mask for child_info sanity test.
-
-Sun Jul 18 16:30:31 1999 Christopher Faylor <cgf@cygnus.com>
-
- * security.cc: Various changes from Corinna.
-
-Sat Jul 17 22:33:45 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fork.cc (fork): Change DuplicateHandle slightly.
- * security.cc (get_nt_attribute): Ignore error return from
- set_process_privileges.
- (set_nt_attribute): Ditto.
-
-Sat Jul 17 00:45:34 1999 Christopher Faylor <cgf@cygnus.com>
-
- * debug.h: Fix ForceCloseHandle1 in non-debug case.
-
-Fri Jul 16 23:47:31 1999 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc (proc_can_be_signalled): Accommodate different flavors of
- myself.
- * include/ddeml.h: Add missing struct.
- * include/wingdi.h: Add missing defines.
-
-Fri Jul 16 23:01:30 1999 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Attempt to cope when srcdir is a relative pathname.
- * fork.cc (fork): Pass handle to parent process to fixup_after_fork.
- Eliminate excess unlock_pinfos.
- * hinfo.cc (hinfo::fixup_after_fork): Use inherited parent handle
- rather than try to open the parent process explicitly.
- * pinfo.cc (record_death): Cosmetic change.
- * sigproc.cc (wait_sig): Add a debugging statement.
- * winsup.h: Reflect change of argument for fixup_after_fork.
-
-Fri Jul 16 11:07:55 1999 Christopher Faylor <cgf@cygnus.com>
-
- * shared.h: Eliminate record_death_nolock. Just pass an argument to
- record_death.
- * pinfo.cc (record_death_nolock): Ditto.
- * dcrt0.cc (__api_fatal): Use record_death with FALSE argument rather
- than record_death_nolock.
- * exceptions.cc (really_exit): Ditto.
- * fork.cc (fork): Remove debugging statement.
-
-Wed Jul 14 22:08:52 1999 Christopher Faylor <cgf@cygnus.com>
-
- Throughout, make parent_alive a local variable. Rename 'alive_parent'
- to 'my_parent_is_alive'.
- * autoload.h: Improve the description of the autoload mechanism.
- * dcrt0.cc: Define parent_alive here.
- (dll_crt0_1): When debugging, rotect handles inherited from fork/exec.
- Force signal thread to finish initializing prior to calling main.
- (dll_crt0): Reorganize child_info stuff to allow common initialization.
- Accept parent_alive handle from invoker and ensure that this is not
- inherited by other processes.
- (do_exit): Ensure that exit_state is not duplicated by a fork.
- (__api_fatal): Call 'try_to_debug' directly.
- * debug.cc: Increase the size of the handle list.
- (threadname): Add an optional argument to control locking.
- * exceptions.cc (error_start_init): Make this a "C" function.
- (try_to_debug): Ditto. Also, use Sleep rather than pause and loop so
- that gdb can get in to interrupt things.
- (sig_handle):
- * external.cc (fillout_pinfo): Reorganize slightly and plan for the
- future.
- * fhandler.h: Add an argument to show the name of the handle for error
- messages to fork_fixup.
- * fhandler.cc (fhandler_base::fork_fixup): Ditto.
- (set_inheriting): Rename a variable for clarity.
- (fhandler_base::fixup_after_fork): Pass in the name of the handle to
- fork_fixup.
- * fhandler_tty (fhandler_tty_common:fixup_after_fork): Ditto.
- (fhandler_tty_slave:fixup_after_fork): Ditto.
- (fhandler_tty_master:fixup_after_fork): Ditto.
- * fhandler_windows.cc (fhandler_windows::fixup_after_fork): Ditto.
- * fhandler_console.cc (fhandler_console::open): Specifically open
- console with ENABLE_PROCESSED_INPUT.
- * fork.cc (sync_with_child): Call abort when DEBUGGING and there's an
- error.
- (resume_child): Ditto. Also, allow an ERROR_INVALID_HANDLE error if it
- can't be duplicated as they seem to occur occasionally when the parent
- copies the stack.
- (fork): Use init_child_info to initialize structure passed to child.
- Remove start time setting in favor of common function. Don't mess with
- parent's parent_alive.
- * heap.cc (sbrk): Simply code slightly.
- * hinfo.cc (hinfo::dup2): Improve error handling.
- * pinfo.cc (set_myself): Set start time here since it is called by
- everything which sets myself.
- (pinfo_init): Remove start_time setting in favor of common function.
- * shared.h (pinfo): Reorganize so that signal stuff falls into section
- of pinfo which is automatically zeroed when a new pid is initialized.
- (PROC_MAGIC): Increment to detect cygwin1.dll's memory passing
- disparities.
- * sigproc.cc (proc_alive): Make this a function. Wait for target pid
- to initialize.
- (my_parent_is_alive): Rename from alive_parent.
- (proc_can_be_signalled): Renamed from proc_alive macro.
- (proc_exits): Use proc_can_be_signaleed().
- (proc_subproc): Don't put parent_alive in child.
- (proc_terminate): Close hwait_subproc in a race-safe way. Ditto
- sync_proc_subproc.
- (sigproc_terminate): Always terminate proc_subproc thread first or it
- may try to use signal thread as it is going away. Wait for signal
- thread to exit.
- (sig_send): Use proc_can_be_signalled().
- (init_child_info): New function. Initializes memory block passed by
- spawn/fork.
- (mutex_stack): Add thread name field.
- (sig_wait): Set active state after all handles have been set up and
- before protecting the handles. Use ForceCloseHandle to close
- subproc_ready as it is now protected. Close signal_mutex here.
- * sigproc.h: Accommodate alive_parent rename.
- * spawn.cc Use init_child_info to initilize memory block passed to
- subprocess.
- * strace.cc (__system_printf): Write to screen before writing to strace
- log. Only write to strace log if we're actually stracing.
- * winsup.h: Declare the 'action on error' functions.
- * utils/Makefile.in: (Patch from Egor Duda <deo@logos-m.ru>) Compile
- strace using -mno-cygwin.
- * utils/strace.cc: Allow ingw concession from Egor Duda. Attempt to
- allow CTRL-C when stracing.
-
-Thu Jul 14 0:39:00 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (alloc_sd): Delete special handling of uid/gid 513.
-
-Thu Jul 13 15:01:00 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (get_file_owner): Fix typo.
- * path.cc (path_conv::path_conv) : Change `return' to `goto end' in
- case of SYMLINK_IGNORE is set.
-
-Mon Jul 5 21:33:00 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (WriteSD): Doesn't set errno if BackupWrite()
- returns ERROR_INVALID_SECURITY_DESCR (which happens on FAT).
-
-Sat Jul 10 13:17:20 1999 Christopher Faylor <cgf@cygnus.com>
-
- * utils/strace.cc (error): Actually output error message.
- (add_child): Duplicate inherited child process handle with all of the
- privileges that we need.
-
-Fri Jul 9 01:37:23 1999 Geoffrey Noer <noer@cygnus.com>
-
- * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 14
- in honor of snprintf and vnsprintf additions.
-
-Fri Jul 9 00:04:03 1999 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (path_conv::path_conv): Correct buffer overflow condition.
- * fhandler_console.cc (fhandler_console::open): *Need* to enable
- processed input or CTRL-C won't stop anything unless it's at a prompt.
- (fhandler_console::input_tcsetattr): Ditto.
-
-Thu Jul 8 18:27:49 1999 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Add malloc debugging options.
- * dcrt0.cc (api_fatal): Call abort when debugging so that the debugger
- will pop up.
- * debug.cc (close_handle): Unlock in pathological case.
- * fhandler_console.cc (fhandler_console::read): Always respond to
- windows size changes.
- (fhandler_console::open): Always set things to ~ENABLE_PROCESSED_INPUT
- so that we can control INTR character. Don't set pgid here.
- (fhandler_console::input_tcsetattr): Turn on windows event so that we
- can see screen resizes.
- (fhandler_console::init): Don't set pgid here.
- * fhandler_termios (fhandler_termios::tcinit): Set pgid here.
- * fhandler.h: Fix set_has_acls method return.
- * utils/strace.h: Pass CTRL-Cs to child process.
-
-Wed Jul 7 23:59:50 1999 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Improve dependencies.
- * autoload.h: Work around "function unused" messages for autoload init
- functions.
- * configure.in: Use CHECK_TOOL to find CC so that it will get the
- proper host alias.
- * configure: Regenerate.
- * dcrt0.cc (do_exit): Minor reorganization of termination function
- calls.
- * debug.cc (close_handle): Issue an error when an attempt is makde to
- close a handle with a name different from the one used to record it
- previously.
- * debug.h: Implement new macros for storing arbitrary handle names.
- * exceptions.cc (handle_signal): Terminate the main thread when exiting
- due to signal in signal thread.
- * fhandler.h: Add an extra 'fd' argument to all ready_for_read methods.
- * select.cc: Ditto, throughout.
- * fhandler_console (get_tty_stuff): Protect the tty_stuff handle here.
- * fhandler_termios.cc (fhandler_termios::line_edit): Accommodate fd
- argument to ready_for_read.
- * fhandler_tty.cc (fhandler_tty_master::init): Close an unneeded thread
- handle.
- * fork.cc (fork): Use standard name when protecting process handle.
- * spawn.cc (spawn_guts): Ditto.
- * shared.cc (open_shared_file_map): Protect cygwin_shared handle here.
- * sigproc.cc: Throughout, close child process handle using standard
- name.
- * syscalls.cc (read_handler): Check that fd is still open prior to
- performing an operation. Supply fd argument for ready_for_read.
- * (_read): Supply fd argument for read_for_read.
- * tty.cc (tty_list::terminate): Close unneeded handles as tty is
- closing down.
- (tty_list::allocate): Protect against signals.
-
-Mon Jul 5 14:52:40 1999 Christopher Faylor <cgf@cygnus.com>
-
- * cygwin.din: Export new snprintf and vnsprintf functions courtesy of
- Egor Duda <deo@logos-m.ru>.
-
-Sun Jul 4 23:54:43 1999 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (sigbegin): New function. Called prior to dispatching
- to signal handler.
- (sigreturn): New function. Called after signal handler returns.
- (set_process_mask): Make stdcall.
- (call_handler): Remove sigwrap asm stuff in favor of new
- sigbegin/sigreturn scheme.
- * winsup.h: Change set_process_mask declaration.
-
-Sun Jul 4 22:00:14 1999 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (stat_worker): Previous change to check for extension
- found dots not in the filename part. Fix this.
-
-Sat Jul 3 23:22:55 1999 Christopher Faylor <cgf@cygnus.com>
-
- * include/wincon.h: Add some missing defines.
- * environ.cc: Remove extern which is now in winsup.h.
- * fhandler.cc (get_file_owner): Rename argument. Test for allow_ntsec.
- (get_file_group): Ditto.
- (fhandler_disk_file::fstat): Use new method inode checking.
- * fhandler.h: Rename a method.
- * security.cc (set_file_attribute): Take an additional argument to
- determine if ntsec security setting should be used.
- * dir.cc (mkdir): Pass acl info to set_file_attribute.
- * syscalls.cc (chown): Ditto.
- (chmod): Ditto.
- * winsup.h: Define allow_ntsec here.
-
-Sat Jul 3 15:09:34 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.cc (fhandler_disk_file:;fstat): Move check of disk volume to
- path_conv. Use new methods for determining if file system is ACL
- capable.
- (fhandler_disk_file::open): Set "has acls" flag here.
- * fhandler.h: Store acl information in fhandler base class.
- * path.cc (path_conv): Set acl information on successful return.
- * path.h: Add acl info to path_conv class.
- * security.cc (get_file_attribute): Set ENOSYS if can't get extended
- attributes.
- * syscalls.cc (chown): Pass acl information from path_conv to
- get_file_attributes.
- (chmod): Ditto.
- (stat_worker): Ditto.
- * uinfo.cc: Make all exported functions extern "C".
- * winsup.h: Add rootdir() declaration.
-
-Fri Jul 2 15:13:08 1999 Christopher Faylor <cgf@cygnus.com>
-
- * autoload.h: New file.
-
-Thu Jul 1 23:16:34 1999 Christopher Faylor <cgf@cygnus.com>
-
- * net.cc (cygwin_gethostname): Use new win32_gethostname to
- disambiguate between cygwin and winsock version.
- * tty.cc (creat_tty_master): Disambiguate by using cygwin_gethostname
- to find the hostname.
- * winsup.h: Declare cygwin_gethostname.
-
-Thu Jul 1 22:36:31 1999 Christopher Faylor <cgf@cygnus.com>
-
- Throughout, remove check for winsock initialization and indirect
- references to winsock functions in favor of new dynamic DLL loading
- method.
-
- * Makefile.in: Remove unneeded libraries.
- * cygwin.din: Make gethostname == cygwin_gethostname like other network
- functions.
- * dcrt0.cc: Implement new "autoload" functionality for loading DLLs and
- functions as they are needed. Add autoload functions for user32.dll.
- (cygwin_dll_func_load): New function.
- (dll_crt0): Issue a fatal error message if attempt to mix different
- version DLLs is detected.
- (api_fatal): Correct inexplicable use of buf + 8 when printing error
- message into a buffer.
- * fhandler.h: Cosmetic fixes.
- * fhandler_tty.cc (fhandler_tty::close): Temporarily "if 0" out code
- which sends EOF pulse to children. This should only happen when last
- parent fd closes.
- * heap.cc (sbrk): Implement new sbrk mechanism which returns memory to
- Windows when top of heap decreases beyond a page boundary.
- (getpagesize): New function.
- * fork.cc (fork): Save new heap values in stuff passed to child.
- * hinfo.cc (hinfo::build_fhandler): Don't do any checking on a handle
- if the handle is NULL. Assume that it is a disk file.
- * net.cc: Redo winsock functions to use dynamic loading scheme.
- * shared.cc (shared_info::initialize): Cosmetic change.
- * shared.h: Change magic number for memory block sent to child
- processes. Accommodate new heap information in child_info.
- * sigproc.cc (sig_dispatch_pending): Remove some memory debugging checks.
- (__release_signal_mutex): Ditto.
- * syscalls.cc (stat_worker): Don't attempt the .exe hack unless the
- previous attempt to open the file resulted in an "ERROR_FILE_NOT_FOUND"
- and the file did not already contain an extension.
- * times.cc: Initialize static NO_COPY variables throughout or they will
- not actually be NO_COPY.
- * winsup.h: Rename heap fields in per_process to accommodate new sbrk.
- Eliminate winsock stuff invalidated by dynamic loading change.
- * include/winsock.h: Make this file C++ safe.
-
-Sun Jun 27 17:07:34 1999 Christopher Faylor <cgf@cygnus.com>
-
- * debug.h: Don't define MALLOC_DEBUG by default.
- * fhandler.cc (fhandler_base::set_name): Always set names to NULL. Add
- more slop to end of win32_path_name.
- (fhandler_base::de_linearize): Set names to NULL. They'll be assigned
- by the caller.
- (fhandler_disk_file::get_native): Delete.
- * fhandler.h: Ditto.
- * hinfo.cc (hinfo::de_linearize_fd_array): Set path names after the
- structure has been "delinearized".
- * malloc.cc: Add debugging versions of malloc functions.
- * syscalls.cc (stat_worker): Eliminate static buffer for thread safety.
-
-Wed Jun 23 22:53:00 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_disk_file::fstat): If get_file_attribute()
- signals a nonexistant acl, fstat sets default attributes now.
-
-Wed Jun 23 10:22:56 1999 Geoffrey Noer <noer@cygnus.com>
-
- * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 13.
-
-Wed Jun 23 10:39:07 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * cygwin.din (gamma, gammaf, lgamma, lgammaf): Export.
- (j0,j0f,j1,j1f,jn,jnf): Export underscore versions as well.
-
-Mon Jun 21 21:34:06 1999 Christopher Faylor <cgf@cygnus.com>
-
- Sprinkle MALLOC_CHECK macro throughout. When turned on, this will give
- a slightly better idea of where memory corruption occurs. Add slightly
- modified versions of "error_start" code from Egor Duda
- <deo@logos-m.ru>.
- * Makefile.in: Add `utils' target.
- * dcrt0.cc (do_exit): Attempt to detect loop conditions where do_exit
- is called reentrantly and avoid the previously executed code in this
- case.
- * debug.h: Define MALLOC_CHECK macro for use with malloc debugging.
- * environ.cc (environ_init): Add more slop at end of environ string
- just to work around buggy programs.
- (parse_options): Add error_start option to control core dumping or gdb
- invocation.
- * exceptions.cc (stackdump): New function. Dumps stack to stderr.
- (error_start_init): New function. Initialize action on "core dumping"
- error.
- (handle_exceptions.cc): Use stackdump command to dump stack. Call
- try_to_debug.
- (set_process_mask): Must be __stdcall or compiler get's confused.
- (sig_handle): Detect SIGQUIT and SIGABRT. Do a "stackdump" for these.
- * fhandler.cc (get_file_owner): Add an argument to determine if
- function should check for NT security.
- (get_file_group): Ditto.
- (fhandler_base::set_name): Don't free "fhandler_disk_dummy_name" path
- names.
- (rootdir): New function, pulled from the pages of syscalls.cc.
- Determines the root dir of a given path.
- (fhandler_disk_file::fstat): Get volume information of file in question
- to determine if inodes are permanent and acls are available. This
- replaces previous WinNT test.
- (fhandler_base::~fhandler_base): free "fhandler_disk_dummy_name" path
- names.
- * fhandler.h: Change get_file_* declarations.
- * fhandler_console.cc: Back out most of scroll fixes from April 17.
- They caused weird scrolling behavior.
- * fhandler_tty.cc (fhandler_pty_master::accept_input): Add debugging
- message.
- * security.cc (get_file_attribute): Add additional "check for ACL"
- argument.
- * path.cc (symlink_check_one): Use new argument to get_file_attribute.
- * sigproc.cc (wait_subproc): Don't exit wait loop if WaitForMultipleObject
- returns an error. Instead, loop for a while in case this is an expected
- error.
- * sigproc.h: Remove __stdcall from set_process_mask.
- * spawn.cc (linebuf): Use initializers to set initial values.
- (linebuf::append): Be defensive and ensure that enough space is
- allocated for the new argument.
- (linebuf::prepend): Ditto.
- (spawn_guts): Correct logic which broke up program argument in a #!
- script.
- * syscalls.cc (chown): Use new argument to get_file_attribute.
- (chmod): Use new argument to get_file_owner and get_file_group.
- (stat_worker): Ditto.
- (statfs): Break out code that determined the root directory of a given
- path. Use new rootdir function instead.
- * winsup.h: Reflect new get_file_attribute argument.
- * include/sys/strace.h: Add "NOTALL" flag so that voluminous debugging
- output can be avoided.
- * utils/strace.cc: Honor NOTALL flag. Run at a higher priority.
-
-Mon Jun 14 18:33:08 1999 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.c (stat_worker): Consolidate calls to fh.fstat for both
- directories and normal files.
- * fhandler_tty.cc (fhandler_pty_master::close): Ensure that an "EOF
- pulse" is sent to any executing child processes.
- * path.cc (symlink_check_one): Check for ':\n' as well as '#!' to
- determine if a file is executable.
-
-Mon Jun 14 16:04:00 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_tty.cc (fhandler_pty_master::accept_input): Set read_retval
- prior to performing a write to avoid a potential race condition.
- * fhandler_termios.cc (fhandler_termios::line_edit): Don't set
- read_retval here. It has to be set in an fhandler_tty accept_input.
- * select.cc (peek_pipe): Fix typo which caused read_selected to be
- tested twice rather than except_selected.
- * shared.h (class tty_min): Remove read_retval from here.
- (class tty) Put it here.
-
-Mon Jun 14 13:08:58 1999 Christopher Faylor <cgf@cygnus.com>
-
- * utils/Makefile.in: Consolidate and simplify.
-
-Mon Jun 14 12:43:32 1999 Christopher Faylor <cgf@cygnus.com>
-
- Throughout, remove reliance on strace_* fields in pinfo class. Use
- global instead. Remove STRACE_DUMP and STRACE_CACHE logic.
- * pinfo.cc (set_myself): New function.
- * dcrt0.cc (dll_crt0_1): Use the new function.
- * environ.cc (parse_options): Remove strace environment variable logic.
- (environ_init): Ditto.
- * exceptions.cc (call_handler): Remove strace mutex considerations.
- * fhandler_termios (fhandler_termios::line_edit): Remove STRACE_CACHE
- logic.
- * localtime.cc: Define 'lint' to eliminate warnings.
- * smallprint.c (__small_vsprintf): Remove text formatting of windowss
- errors. This is now done in the 'strace' program.
- * strace.cc: Define 'strace_active' variable to control whether strace
- should be carried out.
- (strace_open): Delete.
- (strace_init): Delete.
- (get_strace_mutex): Delete.
- (release_strace_mutex): Delete.
- (strace_vsprintf): Preserve last error.
- (strace_write): Communicate with strace program using
- OutputDebugString.
- (strace_dump): Delete.
- (mark): Gut.
- * winsup.h: Remove a declaration. Add a new one.
- * include/sys/strace.h: Modify to accommodate new strace scheme.
- * utils/Makefile.in: Build strace.exe
- * utils/strace.cc: New file.
-
-Sat Jun 12 22:22:00 1999 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_disk_file::fstat): Must compute i-node numbers
- via `get_namehash' for Windows 9x.
-
-Sat Jun 12 10:54:00 1999 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::read): Returns correct value
- if raw_read fails.
- * fhandler_raw.cc: More trace output.
- * fhandler_floppy.cc: Ditto.
- * fhandler_tape.cc: Ditto.
-
-Thu Jun 10 14:01:05 1999 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.c (handle_exceptions): Use ".stackdump"
- extension instead of ".core".
- * path.cc (mount_info::read_mounts): Prescan the mount lists
- for /cygdrive stuff to delete rather than attempting to
- delete it in the main "add mount loop".
- (mount_item::getmntent): Fix "system"/"user" determination.
- * winsup.h: Use void methods in thread classes where
- appropriate.
-
-Wed Jun 9 23:16:04 1999 Christopher Faylor <cgf@cygnus.com>
-
- * mkvers.sh: Issue error if can't find version information.
-
-1999-06-09 DJ Delorie <dj@cygnus.com>
-
- * localtime.c: new file; public domain timezone handling routines.
- * tz_posixrules.h: new file; POSIX default timezone data
- * times.cc: comment out localtime, gmtime, replace tzset with
- cygwin_tzset
- * Makefile.in: add localtime.c
-
-Wed Jun 9 00:49:04 1999 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (spawn_guts): Correctly handle #! processing when line
- ends with white space. Also correctly handle scripts that do not
- begin with #!.
-
-Mon Jun 7 17:04:36 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_console.cc (fhandler_console::open): Need to initialize
- tc here, too.
- (fhandler_console::init): Initialize tc earlier.
-
-Mon Jun 7 00:02:51 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h (fhandler_termios): Move tc initialization
- into init method, etc.
- (fhandler_tty_common): Ditto.
- * fhandler_console.cc (fhandler_console::fhandler_console):
- Move tc initialization to init method.
- (fhandler_console::init): Initialize tc stuff here.
- (fhandler_console::dup): Ditto.
- (fhandler_console::fixup_after_fork): Ditto.
- (fhandler_console::de_linearize): Ditto.
- * fhandler_termios (tcinit): Rename constructor.
- Accept force argument to force termios initialization.
- * fhandler_tty.cc (fhandler_tty_master::init): Move tc initialization
- to common_init.
- (fhandler_tty_common::dup): Use tcinit () to initialize tc field.
- * tty.cc (tty::common_init): Ditto.
-
-Sun Jun 6 22:19:09 1999 Christopher Faylor <cgf@cygnus.com>
-
- * tty.cc (tty_list::terminate): Add \n to output message.
- (tty::init): Clear slave_opened field or we can't reopen
- ttys.
-
-Fri Jun 4 23:58:17 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_tty.cc (fhandler_tty_slave::open): Reorganize
- slightly to avoid a race with get_ttyp()->was_opened.
-
-1999-06-04 DJ Delorie <dj@cygnus.com>
-
- * times.cc (totimeval): scale sub properly.
- (gettimeofday): don't bias by timezone.
-
-Thu Jun 3 13:24:17 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h (fhandler_tty_common): Add two new methods.
- * fhandler_tty.cc: Use new {acquire,release}_output_mutex
- methods throughout for output_mutex.
- (fhandler_tty_common::__acquire_output_mutex): New method.
- (fhandler_tty_common::__release_output_mutex): New method.
- * shared.h (get_output_mutex): Rename to open_output_mutex.
-
-Wed Jun 2 16:06:26 1999 Geoffrey Noer <noer@cygnus.com>
-
- * utils/mkpasswd.c (main): account for long int args to printfs.
-
-Wed Jun 2 16:08:08 1999 Christopher Faylor <cgf@cygnus.com>
-
- * smallprint.c (__small_vsprintf): Conditionalize display of
- textual messages under CYGWIN_TEXT_ERROR.
- * ntea.cc: Remove debugging code.
-
-Wed Jun 2 16:04:00 1999 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc (dll_crt0_1): Call the functions `get_admin_sid',
- `get_system_sid' and `get_world_sid' before heap initialization
- to avoid heap fragmentation.
- * security.cc (get_nt_attribute): Don't allocate memory
- anymore. All memory is taken from stack.
- (set_nt_attribute): Ditto.
- (alloc_sd): Ditto. Change parameters to get a pointer to a
- preallocated security descriptor and a pointer to it's length.
- * shared.cc (sec_user): Don't allocate memory anymore. All
- memory is taken from stack. Change parameters to receive a
- pointer to a preallocated security buffer.
- * shared.h: Change prototype for `sec_user' and `sec_user_nih'.
- * sigproc.cc (getsem): Change call to `sec_user'. Additonally
- buffer for `sec_user'.
- * spawn.cc (spawn_guts): Ditto.
- Change all error output in function `sec_user' and in module
- `security.cc' from error text to error number output.
-
-Tue Jun 2 21:54:21 1999 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (get_if_flags): Change the UP and RUNNING state
- of disconnected RAS interfaces to true.
-
-Thu Jun 1 22:47:00 1999 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (get_system_sid): New function to create
- a SID for the well known group of local system.
- (alloc_sd): New function.
- (alloc_sd): Give ALL permissions to `system'.
- * shared.cc (sec_user): Give ALL permissions to `system'.
- (sec_user): Provide additionalparameter for a second SID.
- This is used for `CreateProcessAsUser' call.
- (sec_user_nih): Ditto.
- * shared.h: Change prototypes for `sec_user' and
- `sec_user_nih'.
- * spawn.cc (spawn_guts): Now using `sec_user' in
- `CreateProcessAsUser' call, if ntsec is set.
-
-Thu Jun 1 14:17:00 1999 Corinna Vinschen <corinna@vinschen.de>
-
- * utils/mkpasswd.c: Change to output native names of
- well known groups `Everyone' (SID 0) and `system' (SID 18).
- * utils/mkgroup.c: Ditto plus output of native name of
- well known group `None' (SID 513).
-
-Mon May 31 22:10:57 1999 Christopher Faylor <cgf@cygnus.com>
-
- * path.h: Use bit mask flags in path_conv to save exec,
- symlink, binary status. Use methods to access and set
- these flags.
- * fhandler.cc: Use methods to access path_conv flags
- throughout.
- * path.cc: (symlink-check_one): Accept a bitmask flags
- variable to accommodate path_conv changes.
- (path_conv::path_conv): Propagate path_flags from mount
- table to path_conv class. Avoid walking the mount table
- twice to find "binary" info.
- (mount_info::conv_to_win32_path): Accept additional flags
- argument. Don't add trailing slash if not required.
- Fill out both paths when cygdrive.
- (mount_info::cygdrive_win32_path): Change debugging output
- slightly.
- (mount_info::set_flags_from_win32_path): Generalize from
- mount_info::binary_win32_path_p.
- (mount_item::getmntent): Honor MOUNT_EXEC flag.
- * shared.h: Add new method to mount_info class.
- * include/sys/mount.h: Add a comment.
- * utils/mount.cc: Accept -x to force a mountpoint to default
- to executable permission. Rename automount stuff to cygdrive.
-
-Mon May 31 19:00:00 1999 Corinna Vinschen <corinna@vinschen.de>
-
- * environ.cc (environ_init): Set ntsec option by default
- if running under NT.
- * security.cc (set_nt_attribute): Delete superfluoues code.
- * shared.cc (sec_user): Don't set owner in created security
- descriptor.
- * sigproc.cc (getsem): Use `sec_user' instead of `sec_user_nih'.
- * spawn.cc (spawn_guts): Set security attribute of
- `CreateProcess' to `sec_user' if ntsec is set, `sec_all_nih'
- otherwise.
-
-Mon May 31 19:27:36 1999 Christopher Faylor <cgf@cygnus.com>
-
- Throughout, change "automount" to cygdrive.
- Throughout, change mount flags from signed to unsigned.
-
- * path.cc (iscygdrive): New macro.
- (normalize_posix_path): Tack a '/' on the end of constructed
- path only if there isn't one there already.
- (mount_info::init): Simplify slightly.
- (mount_info::conv_to_win32_path): Don't search for automount
- stuff in the mount table. Instead special case the cygdrive
- handling so that it will always be acceptable to use /cygdrive
- regardless of other mounts.
- (mount_info::cygdrive_posix_path): Rename from
- build_automount_mountpoint_path. Fully build a posix path
- given inputs.
- (mount_info::cygdrive_win32_path): New function.
- (mount_info::conv_to_posix_path): Precalculate the length
- of the pathbuf for multiple uses. Just use cygdrive_posix_path
- to derive a /cygdrive/x/foo style path.
- (mount_info::read_mounts): Don't read /cygdrive/x mounts from
- the registry. Delete them.
- (mount_info::from_registry): Read cygdrive info earlier for
- subsequent use by other mount routines.
- (mount_info::add_reg_mount): Cosmetic changes.
- (mount_info::read_cygdrive_info_from_registry): Always add
- trailing slash to cygdrive. Precalculate the length of the
- cygdrive.
- (mount_item::getmntent): Cosmetic changes.
- (mount): Return EINVAL on attempt to add a mount point which
- begins with the current cygdrive.
- * path.h: Remove unused script_p from path_conv class.
- * shared.h: Add cygdrive_length to mount_list. Add new
- cygdrive_win32_path method.
- * include/sys/mount.h: Use enums for MOUNT_ constants.
-
-1999-05-29 Keith Seitz <keiths@cygnus.com>
-
- * errno.cc (errmap): Map ERROR_NEGATIVE_SEEK to EINVAL.
-
-Fri May 28 21:43:56 1999 Christopher Faylor <cgf@cygnus.com>
-
- * times.cc (to_time_t): Rewrite slightly to avoid compiler
- overoptimization.
-
-Fri May 28 21:10:33 1999 Corinna Vinschen <corinna@vinschen.de>
-
- * sigproc.cc (getsem): Set security attribute of process
- semaphore to `sec_user_nih()', if ntsec is set, `sec_none_nih'
- otherwise.
-
-Wed May 26 22:56:51 1999 Christopher Faylor <cgf@cygnus.com>
-
- Rename inuse_event and inuse_event_exists to "slave_alive"
- throughout.
- * shared.h: Eliminate inuse_event. Replace with a boolean.
- Elminate slave_opened.
- Add some function declarations used by new methods.
- * fhandler_tty.cc (fhandler_pty_master::hit_eof): Use better
- method for determining EOF for pty master.
- (fhandler_tty_slave::open): Use method to acquire output_mutex.
- Always create "inuse_event". Delete call to slave_opened.
- (fhandler_tty_slave::write): Reorganize debugging output
- slightly.
- (fhandler_tty_master::close): Eliminate reference to inuse_event.
- * tty.cc (tty_list::terminate): Eliminate call to slave_opened.
- (tty_list::connect_tty): Use new exists() method to find out if
- a tty exists.
- (tty_list::allocate_tty): Rename argument for clarity. Use
- new exists method to determine tty existence.
- (tty::inuse): Delete.
- (tty::init): Remove reference to inuse_event.
- (tty::common_init): Ditto.
- (tty::slave_opened): Delete.
- * winsup.h: Move some function declarations to shared.h.
-
-Mon May 24 22:10:34 1999 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (WriteSD): Don't set errno, if BackupWrite()
- returns ERROR_NOT_SUPPORTED.
- * security.cc (set_nt_attribute): Change condition for
- calling LookupAccountName() with domain name again.
- * shared.cc (sec_user): Ditto.
-
-Mon May 24 22:10:34 1999 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winnt.h: Temporary erased definitions of QuadPart
- in LARGE_INTEGER and ULARGE_INTEGER.
- * security.cc (set_nt_attribute): Set standard attributes so
- that reading and writing attributes for user and administrators
- isn't hindered.
-
-Mon May 24 22:10:34 1999 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (ReadSD): New function.
- * security.cc (WriteSD): Ditto.
- * security.cc (get_admin_sid): Moved from shared.cc.
- * security.cc (set_process_privileges): Moved from syscalls.cc,
- shortened, changed return typ to int. Sets errno now.
- * security.cc (set_file_attributes): Return type changed to int.
- * security.cc (get_file_attributes): Ditto.
- * security.cc (set_nt_attributes): Ditto. Cares for setting
- of S_ISVTX now.
- * security.cc (get_nt_attributes): Ditto.
- * syscalls.cc (rel2abssd): #if 0'ed.
- * syscalls.cc (set_process_privileges): Moved to security.cc.
- * syscalls.cc (chown): Rewritten.
- * syscalls.cc (chmod): Change call order of the functions
- set_file_attributes() and SetFileAttributesA().
- * fhandler.cc (fhandler_base::fstat): Change check for
- return value of get_file_attributes().
- * ntea.cc (NTReadEA): returns TRUE now, if allow_ntea is unset.
- * ntea.cc (NTWriteEA): returns TRUE now, if allow_ntea is unset.
- * shared.cc (get_admin_sid): Moved to security.cc.
- * path.cc (symlink_check_one): Change check for return value
- of get_file_attributes().
-
-Mon May 24 22:10:34 1999 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (get_world_sid): Rewrite.
- * security.cc (world_full_access): Delete.
- * grp.cc: Use gid 0 as default gid.
- * grp.cc (read_etc_group): Look for account name of world group.
- * fhandler.cc (fhandler_base::open): Call `set_file_attribute'
- only in case of disk file.
-
-Mon May 24 22:10:34 1999 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (get_file_attribute): Patched incorrect test
- for symlink.
- * security.cc (set_file_attribute): ditto.
-
-Mon May 24 22:10:34 1999 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc: Special handling for user and/or administrators
- permissions to write (extended) attributes.
-
-Mon May 24 22:10:34 1999 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc: Don't allow 513(none) as user or group.
-
-Mon May 24 22:10:34 1999 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc: new functions `set_nt_attribute()', `get_nt_attribute()'
- and `set_file_attribute()' with additional parameters `uid' and `gid',
- to support real NT security.
- * winsup.h: Prototype for `set_file_attribute()' with four
- parameters.
- * dir.cc (mkdir): Calls `set_file_attribute()' now.
- * syscalls.cc (chown): ditto.
- * syscalls.cc (chmod): ditto, with correct uid/gid.
-
-Mon May 24 22:10:34 1999 Corinna Vinschen <corinna@vinschen.de>
-
- * shared.cc: New function `get_admin_sid()' to get a SID
- of the administrators group or of administrator.
- New functions `sec_user()' and `sec_user_nih()' to get
- SECURITY_ATTRIBUTES with all permissions for the user and
- the administtrator group.
- * shared.h: Prototypes for the above new functions `sec_user()'
- and `sec_user_nih()'.
- * sigproc.cc (getsem): Create process semaphore with
- permissions set by `sec_user()'.
-
-Mon May 24 20:29:29 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_console.cc (fhandler_console::output_tcsetattr):
- ONLRET was erroneously used in place of ONLCR.
- (fhandler_console::read): Honor get_r_no_interrupt () so
- that interrupts don't screw up tty reading.
- * fhandler.h: Add some methods to fhandler_tty_master.
- * fhandler_termios.cc (fhandler_termios::fhandler_termios):
- ONLRET was erroneously used in place of ONLCR.
- * fhandler_tty.cc (fhandler_tty_master::init): Associating
- console capabilities with the tty capabilities is a bad
- idea. Go back to using the console's own.
- (fhandler_tty_master::fixup_after_fork): New method.
- (fhandler_tty_master::de_linearize): New method.
- (fhandler_tty_master::init_console): New method.
-
-Mon May 24 09:58:02 1999 Christopher Faylor <cgf@cygnus.com>
-
- * include/rapi.h: Add some more definitions.
-
-Sat May 22 21:45:01 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * scandir.cc (scandir): Handle errno correctly. Do preallocation to
- reduce realloc calls.
- (alphasort): Use strcoll, not strcmp.
-
-Sat May 22 19:03:47 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * dll_init.cc (DllList::recordDll): Forkee must reload dlopened
- DLLs. Also use strcasematch, not strcmp to compare file name.
-
-Wed May 19 14:38:57 1999 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (linebuf::prepend): Fix possible reference to
- uninitialized memory.
- * winsup.h: Remove WINSUP_NO_CLASS_DEFS workaround.
- * libccrt0.cc: Ditto.
- * utils/cygwin.cc: Ditto.
- * utils/mount.cc: Ditto.
- * utils/ps.cc: Ditto.
-
-Sun May 16 17:22:50 1999 Christopher Faylor <cgf@cygnus.com>
-
- * include/winnt.h: Revert the previous reversion. The problem
- with this include file was completely misdiagnosed.
-
-Sun May 16 16:05:07 1999 Christopher Faylor <cgf@cygnus.com>
-
- * sysdef/rapi.def: New definition file for RAPI.DLL.
- * include/rapi.h: Preliminary RAPI declarations.
-
-Sun May 16 15:37:15 1999 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Remove more obsolete code.
-
-Fri May 14 19:30:53 1999 Christopher Faylor <cgf@cygnus.com>
-
- * include/winbase.h: Change conditional to correctly refer
- to UNDER_CE rather than UNICODE.
- * include/winnt.h: Update MIPS and SHx CONTEXT definitions.
-
-Tue May 11 21:19:59 1999 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (call_handler): Restore previously removed
- 'leave' command as its absence causes programs to crash. It
- should never have been deleted.
-
-Tue May 11 12:04:02 1999 Norbert Schulze <Norbert.Schulze@rhein-neckar.de>
-
- * times.cc (timezone): Properly adjust for daylight savings time.
- (gettimeofday): Ditto.
- (localtime): Ditto.
- (tzset): Ditto.
-
-Mon May 10 23:31:36 1999 Christopher Faylor <cgf@cygnus.com>
-
- * include/winnt.h: Revert to previous version. There are problems
- with the previous checkin.
- * fhandler_console.cc (fhandler_console::de_linearize): Add defensive
- code to ensure that console handles are opened correctly.
-
-Sun May 9 22:31:31 1999 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Forgot to remove a reference to the deleted targets
- below.
-
-Fri May 7 17:28:12 1999 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Remove obsolete code.
- * exceptions.cc (set_process_mask): Make this a __stdcall.
- * sigproc.h: Fix declaration of set_process_mask.
- * include/winnls.h: Add new code page defines.
- * include/winnt.h: Various fixes from Anders Norlander
- <anorland@hem2.passagen.se>.
-
-Tue May 4 22:20:05 1999 Christopher Faylor <cgf@cygnus.com>
-
- * include/winnt.h: Fix CONTEXT pointer typedefs.
-
-Mon May 3 11:32:32 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * smallprint.c (__small_vsprintf): Display textual messages
- for "%E" format type.
- * dlfcn.cc (set_dl_error): Lose the "Win32 ".
-
-Sun May 2 12:22:17 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * utils/Makefile.in (EXE_LDFLAGS): Provide default.
-
-1999-04-30 DJ Delorie <dj@cygnus.com>
-
- * winsup.h (WINSUP_NO_CLASS_DEFS): if defined, don't include class
- definitions (work around gcc bug)
- * libccrt0.cc (WINSUP_NO_CLASS_DEFS): define
- * utils/cygwin.cc (WINSUP_NO_CLASS_DEFS): define
- * utils/mount.cc (WINSUP_NO_CLASS_DEFS): define
- * utils/ps.cc (WINSUP_NO_CLASS_DEFS): define
-
-Thu Apr 29 13:55:57 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * shared.h (read_mounts): Change prototype to accept a reference
- to reg_key, not a copy.
- * path.cc (read_mounts): Likewise.
-
-Thu Apr 29 11:06:37 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * configure.in (EXE_LDFLAGS): Always add newlib if part of the
- build tree.
- * configure: Regenerate.
-
- * utils/Makefile.in (INCLUDES): Add newlib include directories.
- (LDFLAGS): Replace this with
- (ALL_LDFLAGS): this to avoid being overridden from higher level
- Makefiles.
-
-Wed Apr 28 17:01:12 1999 Christopher Faylor <cgf@cygnus.com>
-
- * include/winnt.h: Add some handheld support.
- * shared.cc (open_shared): Don't call OpenFileMapping with
- a null name pointer. If the name is NULL it can't be opened.
-
-Fri Apr 23 00:28:38 1999 Christopher Faylor <cgf@cygnus.com>
-
- * winsup.h: Always clear memory in thread .create method or
- suffer uninitialized pointers, etc.
-
-Wed Apr 21 03:56:54 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_console.cc (fhandler_console::fhandler_console):
- Set fork_fixup flag to ensure that shared info is duplicated.
- (get_tty_stuff): Ensure that tty_stuff is initialized.
- (fhandler_console::fixup_after_fork): Really force tc and
- tty_stuff initialization. Close console handles or suffer
- handle leak. (needs to be fixed)
- (fhandler_console::de_linearize): Force tc and tty_stuff
- initialization.
-
-Mon Apr 19 14:54:46 1999 Geoffrey Noer <noer@cygnus.com>
-
- * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 12.
-
-Sat Apr 17 15:35:34 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_console (fhandler_console::fixup_after_fork): Make sure
- that new shared memory for console is initialized.
- (fhandler_console::scroll_screen): Set region bottom correctly.
- (fhandler_console::write_normal): Fix win95 problem where attribute
- was propagated to scrolled region.
- * include/wingdi.h: Fix GOBJENUMPROC prototype.
-
-Wed Apr 7 20:00:00 1999 John Fortin (fortinj@ibm.net)
-
- * pthread.cc (pthread_suspend): New function.
- (pthread_continue): Ditto.
- * include/pthread.h: added pthread_suspend and pthread_continue
- prototypes.
- * cygwin.din: added above functions.
- * thread.h: Add 'bool suspended' to class MTitem. Prototype
- __pthread_suspend __pthread_continue.
- * thread.cc (__pthread_suspend): New function.
- (__pthread_continue): New function.
-
-Sun Apr 4 23:00:00 1999 John Fortin (fortinj@ibm.net)
-
- * pthread.cc (pthread_join): New function.
- (pthread_detach): New function.
- * include/pthread.h: added pthread_join and pthread_detach prototypes.
- * cygwin.din: added above functions for exports.
- * thread.h: Added char joinable to MTitem class. Add void *
- return_ptr to ThreadItem class to receive pointer from pthread_exit
- and pthread_join. Add __pthread_join and __pthread_detach prototypes.
- * thread.cc: Change thread_init_wrapper to set item->return_ptr=ret
- and comment out item->used = false. Need to look at this more.
- (__pthread_join): New function.
- (__pthread_detach): New function.
- (__pthread_exit): Implement ( was NOT_IMP ).
- * thread.cc (MTinterface::FindNextUnused) : Use joinable != 'Y' as
- an additional conditional. We may need to use this info in
- pthread_join.
-
-Mon Apr 5 23:09:06 1999 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (do_exit): Change a variable name to minimize confusion.
- * fhandler.h (fhandler_tty): Remove ttyp field in favor of get_ttyp
- method.
- * fhandler_tty.cc: Use get_ttyp () method to retrieve pointer to
- tty device throughout.
- (fhandler_tty_master::init): Point console tc at tty's tc so
- that they share the same termios structure.
- * select.cc (fhandler_tty_common::ready_for_read): Use get_ttyp
- method.
- * tty.cc (tty::common_init): Ditto.
-
-Mon Apr 5 00:22:30 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_console.cc (fhandler_console::char_command): Make
- setting of scrolling region cause the cursor to be placed at
- the beginning of the scrolling region.
- * thread.cc (__pthread_kill): Defend against item->sigs being
- uninitialized.
- (__pthread_sigmask): Defened against item->sigs being uninitialized.
-
-Wed Mar 31 22:52:18 1999 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (dll_crt0): Restore pointer to shared console
- terminfo structure. This allows subprocesses to set
- sticky console attributes.
- * fhandler_console.cc (get_tty_styff): New function. Returns
- pointer to shared console terminfo structure, allocating shared
- memory if required.
- (fhandler_console::fhandler_console): Use get_tty_stuff().
- (fhandler_console::de_linearize): Ditto.
- * fork.cc (fork): Save shared console handle for export to
- subprocesses.
- * spawn.cc (spawn_guts): Ditto.
- * shared.cc (open_shared_file_map): Rewrite to use generic
- open_shared() function.
- (open_shared): New function. Generic shared memory open
- used by console and cygwin shared memory.
- * shared.h: Define new stuff used by above.
-
-Wed Mar 31 01:46:23 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h (fhandler_tty): Set tc = ttyp.
- * fhandler_tty.cc (fhandler_tty_master::init): Ditto.
- (fhandler_tty_common::dup): Ditto.
- * tty.cc (tty::common_init): Ditto.
-
-Wed Mar 31 01:43:06 1999 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (mount_info::conv_to_win32_path): Reorganize to
- correctly handle //x syntax.
-
-Tue Mar 30 14:42:05 1999 Christopher Faylor <cgf@cygnus.com>
-
- * strace.cc (strace_vsprintf): Fix incorrect buffer reference.
-
-Mon Mar 29 22:46:16 1999 Christopher Faylor <cgf@cygnus.com>
-
- * debug.cc (__lock): Return value for gcc bug workaround.
- (__unlock): Ditto.
- * fhandler_tty.cc (fhandler_tty_master::init): Remove extraneous
- console initialization. Set termios to sensical values before
- initializing the console.
- (fhandler_tty_slave): Add some debugging output.
- * strace.cc: Conditionalize stuff not required by STRACE_HHMMSS.
- (strace_vsprintf): Remove dependency on time() for STRACE_HHMMSS.
-
-Mon Mar 29 10:50:00 Corinna Vinschen <corinna.vinschen@cityweb.de>
-
- * utils/passwd.c (GetPW): Correct cast in call to `NetUserGetInfo'.
-
-Sun Mar 28 16:54:57 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h: Remove tty_stuff field from fhandler_console
- class. Use global instead to allow all console opens to
- use same settings.
- * fhandler_console.cc: Add new global.
- (fhandler_console::tcgetattr): Use new global for initialization.
- (fhandler_console::de_linearize): Ditto.
- * fhandler_termios.cc (fhandler_termios::fhandler_termios): Don't
- reinitialize an already initialized termios. Do not honor
- CYGWIN=binmode for console output. It's too confusing.
- * shared.h: Add `initialized' field to tty_min.
-
-Sun Mar 28 01:55:32 1999 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (path_prefix_p_): Add defensive code.
- (slash_drive_prefix_p): Use macro to detect whether a character
- is a path separator.
- (mount_info::conv_to_win32_path): Rewrite to correctly handle
- relative paths.
- * strace.cc (strace_printf): Remove extraneous save of LastError.
- * winsup.h (per_thread): Return TlsSetValue value. This seems
- to work around a g++ bug.
-
-Thu Mar 25 13:00:00 Corinna Vinschen <corinna.vinschen@cityweb.de>
-
- * fhandler_raw.cc (fhandler_dev_raw::dup): New method.
- * fhandler_tape.cc (fhandler_dev_tape::dup(): Ditto.
- * fhandler.h: Added prototypes for the formentioned methods.
-
-Wed Mar 24 23:00:00 Corinna Vinschen <corinna.vinschen@cityweb.de>
-
- * fhandler_raw.cc (fhandler_dev_raw::linearize):
- Only calling base class implementation now.
- * fhandler_raw.cc (fhandler_dev_raw::de_linearize):
- Only calling base class implementation and allocating devbuf now.
- * fhandler_tape.cc (fhandler_dev_tape::linearize): Erased.
- * fhandler_tape.cc (fhandler_dev_tape::de_linearize): Erased.
- * fhandler_tape.cc (fhandler_dev_tape::fhandler_dev_tape):
- Additional call to `set_cb()'.
- * fhandler_floppy.cc (fhandler_dev_floppy::fhandler_dev_floppy):
- Ditto.
- * fhandler.h: Erased prototypes for linearize and de_linearize
- methods of class fhandler_dev_tape.
-
-Thu Mar 25 14:05:57 1999 Christopher Faylor <cgf@cygnus.com>
-
- * signal.cc (pause): Make sure that signal has been dispatched
- prior to pause returning.
-
-Wed Mar 24 20:04:21 1999 Christopher Faylor <cgf@cygnus.com>
-
- Change get_input_handle to get_io_handle throughout.
- Change output_handle_ to output_handle throughout.
- Use sys/termios.h only where needed.
- * Makefile.in: Add new object.
- * fhandler.cc (fhandler_base::puts_readahead): New function.
- Adds a string to the read ahead buffer.
- (fhandler_base::put_readahead): New function. Adds a character
- to the read ahead buffer.
- (fhandler_base::get_readahead): New function. Gets a character
- from the read ahead buffer.
- (fhandler_base::peek_readahead): New function. Returns character
- at beginning or end of read ahead buffer.
- (fhandler_base::set_readahead_valid): Augmented from fhandler.h.
- (fhandler_base::eat_readahead): Eat a character from the read
- ahead buffer.
- (fhandler_base::de_linearize): Reset read ahead info.
- (fhandler_base::read): Honor new read ahead mechanism.
- (fhandler_base::fhandler_base): Don't set binmode to default
- if it has already been explicitly set.
- * fhandler.h: Add *BINSET flags to track whether the binary
- mode has been turned on or off explicitly.
- (fhandler_base): Add elements for new read ahead method. Remove
- old `readahead_'.
- (fhandler_termios): New base class.
- (fhandler_console): Use fhandler_termios base class.
- Add new de_linearize method.
- (fhandler_tty_common): Rewrite to use fhandler_termios base class.
- (fhandler_pty_master): Ditto.
- (fhandler_tty_master): Ditto.
- * fhandler_console (fhandler_console::read): Rewrite to use functions
- from fhandler_termios and read ahead for line editing.
- (fhandler_console::read1): Remove.
- (fhandler_console::open): Interruptible I/O is now handled in the
- read function. Mark this.
- (fhandler_console::output_tcsetattr): Use ONLRET to control
- binary behavior since it is more closely analgous.
- (fhandler_console::input_tcsetattr): Don't set console flags if
- there is no change or Windows 95 will eat input.
- (fhandler_console::tcsetattr): Use ONLRET to control binary behavior
- since it is more closely analgous.
- (fhandler_console::fhandler_console): Accommodate fhandler_termios
- base class.
- (fhandler_console::init): Ditto.
- (fhandler_console::igncr_enabled): Ditto.
- (fhandler_console::char_command): Use new read ahead method.
- (fhandler_console::de_linearize): New function.
- * fhandler_serial.cc: Need additional include.
- * fhandler_tty.cc (fhandler_tty_master::fhandler_tty_master):
- Accommodate fhandler_termios base class.
- (fhandler_tty_master::init): Ditto.
- (fhandler_tty_master::accept_input): New function. Sends
- (possibly line-edited) input to slave.
- (process_input): Use line editing capabilities of fhandler_termios
- base class when processing input.
- (fhandler_tty_slave::open): Accommodate fhandler_termios base class.
- (fhandler_tty_slave::tcgetattr): Ditto.
- (fhandler_tty_slave::ioctl): Ditto.
- (fhandler_pty_master::fhandler_pty_master): Ditto.
- (fhandler_pty_master::read): Ditto.
- (fhandler_tty_slave::dup): Be more paranoid about setting output
- handle in case of error.
- * fhandler_tty.h: Accommodate new tty_min base class in tty class.
- * hinfo.cc (hinfo::build_fhandler): Send tty 'unit' to constructor.
- * select.cc (peek_console): Send resize event to window regardless
- of tty setting. Eliminate ReadFile kludge.
- * shared.h (tty_min): Rename termios field to avoid conflict.
- * tty.cc (create_tty_master): Send tty number to build_fhandler.
- (tty::common_init): Remove termios initialization. It's handled
- via fhandler_termios, now.
- * fhandler_termios: New file. Contains methods for dealing with
- fhandler_termios class.
-
-Wed Mar 24 19:22:04 1999 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (call_handler): Reorder to work around
- gcc bug.
-
-Sun Mar 21 21:26:43 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_serial.cc (fhandler_serial::raw_read): Protect
- against uninitialized variable. Output debug info if
- ClearCommError fails. Clear overlapped I/O on error or
- signal.
- (fhandler_serial::tcflow): Output debug info at start of
- routine.
- (fhandler_serial::tcsetattr): Add more debugging output.
- Avoid re-setting parameters if there has been no change.
- Setting parameters via SetCommState seems to cause loss of
- input on Windows 9[58].
-
-Wed Mar 17 12:56:25 1999 Geoffrey Noer <noer@cygnus.com>
-
- * include/winbase.h: Fix AllocateAndInitializeSid proto.
-
-Tue Mar 16 21:55:12 1999 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (handle_exceptions): Always wait for sig_send
- to exit or races can result.
-
-Tue Mar 16 13:04:34 1999 Geoffrey Noer <noer@cygnus.com>
-
- * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 11.
-
-Tue Mar 16 15:44:10 1999 Christopher Faylor <cgf@cygnus.com>
-
- * cygwin.din: Export telldir/seekdir.
-
-Tue Mar 16 13:50:51 1999 Corinna Vinschen <corinna.vinschen@cityweb.de>
-
- * dir.cc: Change unused struct member __d_find_first_called to
- __d_position for use in new functions.
- (telldir): New function. Returns current position in DIR stream.
- (seekdir): New function. Seeks to new position in DIR stream.
-
-Mon Mar 15 19:17:23 1999 Geoffrey Noer <noer@cygnus.com>
-
- * sysdef/comctl32.def: Add InitCommonControlsEx.
-
-Mon Mar 15 19:45:10 1999 Christopher Faylor <cgf@cygnus.com>
-
- * dir.cc (mkdir): Remove final slash from a directory if
- appropriate or windwows won't create the directory.
- * errno.cc: Change text for EAGAIN to something a little
- more sensical.
- * exceptions.cc (call_handler): Add a debug message.
- * fhandler.cc (fhandler_base::open): Don't attempt to set
- the position of a com device.
- * fhandler_serial.cc (fhandler_serial::raw_read): Reset
- overlapped event if not armed. Don't attempt to find out
- if characters are available if vmin_.
- (fhandler_serial::raw_write): Clear pending I/O when
- necessary.
- (fhandler_serial::open): Set comm state to current rather
- than zeroing.
- (fhandler_serial::tcflush): Don't use "queue" as a flag.
- TCI* defines are not bit masks.
- * select.cc (peek_serial): Add debugging output.
- * sigproc.cc (wait_sig): Minor cleanup.
- * path.cc (nofinalslash): Make global.
- * winsup.h: Ditto.
-
-Mon Mar 15 16:31:29 1999 Geoffrey Noer <noer@cygnus.com>
-
- * include/winnt.h: Add RID defs/protos from MSDN docs.
- (SECURITY_*_RID, DOMAIN_*_RID*, etc.)
- * include/richedit.h: Add missing SCF_* defines.
- * include/commctrl.h: Add missing PBM_ defines, PBRANGE struct.
-
-Mon Mar 15 12:54:48 1999 Geoffrey Noer <noer@cygnus.com>
-
- * Makefile.in: Don't install include/Windows32 since it doesn't
- exist any more.
- * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 10.
-
-1999-03-12 DJ Delorie <dj@cygnus.com>
-
- * net.cc (gethostbyname): support a.b.c.d notation internally,
- in case there's no DNS at least partial support is there.
-
-Thu Mar 11 21:27:41 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * cygwin.din: Added references to new fast-math routines.
-
-Wed Mar 10 19:22:46 1999 Geoffrey Noer <noer@cygnus.com>
-
- * include/commdlg.h: Add missing PageSetupDlg defines.
-
-Tue Mar 9 14:28:14 1999 Geoffrey Noer <noer@cygnus.com>
-
- * include/*.h: Switch Win32 API header file set to the one written
- by Anders Norlander <anorland@hem2.passagen.se>. Headers now
- fit the standard Win32 API header layout and are more complete.
- These correspond to Anders' headers, version 0.1.5. Please read
- sysdef/README for more information.
- * include/Windows32/*.h: Delete in favor of above definitions.
-
- Changes to support the above:
- * fhandler_console.cc (fhandler_console::char_command): Add newly
- needed cast to DWORD *.
- * fhandler_serial.cc (fhandler_serial::raw_read): Make n, minchars
- DWORDs.
- * fhandler_tty.cc: Include limits.h.
- (fhandler_pty_master::doecho): Second arg is now DWORD.
- (fhandler_pty_master::process_input_to_sl): Make n, written DWORD.
- (fhandler_pty_master::process_slave_outpu): Make n DWORD.
- (fhandler_tty_slave::close): Make towrite, n DWORDs.
- (fhandler_tty_slave::write): Make n DWORD.
- * fhandler.h: Adjust fhandler_pty_master::doecho proto.
- * hinfo.cc: Include file reordering.
- * malloc.cc: Ditto.
- * net.cc: Ditto.
- * fhandler_tape.cc (get_ll): Need to reference .u in
- LARGE_INTEGER usages.
- * ntea.cc: Ditto.
- * pinfo.cc: Include limits.h.
- * spawn.cc: Ditto.
- * uinfo.cc: Ditto.
- * uname.cc (uname): sysinfo struct now has anon union.
- Adjust sprintf for dwProcessorType being a long now.
- * syscalls.cc: Include limits.h and lmcons.h. Throughout,
- reference .u in LARGE_INTEGER usages.
- (logout): Make rd a DWORD.
-
- * utils/mkgroup.c: Always include lmaccess.h and lmapibuf.h.
- Include stdio.h.
- (enum_groups): Adjust for longs in fprintfs.
- (main): Ditto.
- * utils/mkpasswd.c: Include lmaccess.h and lmapibuf.h.
- (enum_users): Adjust for longs in fprintfs.
- (main): Ditto.
- (enum_local_groups): Ditto.
- * utils/passwd.c: Remove many Win32 API defines now in new
- Win32 headers. Include lmaccess.h, lmerr.h, lmcons.h,
- lmapibuf.h.
- (PrintPW): Adjust for longs in fprintfs.
-
-Wed Mar 3 21:14:45 1999 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc (environ_init): Fix off-by-one error in initial
- environment allocation.
- * fhandler_serial.cc (fhandler_serial::tcflush): Use different
- method for flushing since serial handles are now opened for
- overlapped I/O.
- * select.cc (cygwin_select): Make degenerate case interruptible.
- * sigproc.cc (proc_exists): Recognize all kinds of myself pointers
- as "existing".
-
-Tue Feb 16 23:00:48 1999 Christopher Faylor <cgf@cygnus.com>
-
- * include/Windows32/Functions.h: Correct two #ifndefs that were
- switched.
-
-Mon Feb 15 22:41:54 1999 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (spawn_guts): Fix incorrect arg length when
- constructing new arguments for #!.
-
-Fri Feb 12 13:25:50 1999 Drew Moseley <dmoseley@cygnus.com>
-
- * Makefile.in (install-info): Test for file existence before installing.
-
-Fri Feb 12 13:17:49 1999 Corinna Vinschen <corinna.vinschen@cityweb.de>
-
- * fhandler.cc (fhandler_disk_file::fstat): Handles directories,
- returns unique i-node number.
- * syscalls.cc (stat_worker): On WinNT, stat_worker calls
- fhandler_disk_file::fstat for directories, too.
-
-1999-02-10 DJ Delorie <dj@cygnus.com>
-
- * doc/doctool.c (scan_directory): check for opendir failing,
- add closedir.
-
-Tue Feb 9 13:02:25 1999 Geoffrey Noer <noer@cygnus.com>
-
- * utils/mount.cc: Add fixme.
- * doc/doctool.c: Correct typo in comment.
-
-Mon Feb 8 17:29:58 1999 Christopher Faylor <cgf@cygnus.com>
-
- * include/Windows32/UnicodeFunctions.h: Fix incorrect use of
- BOOL -> WINBOOL.
- * Windows32/ASCIIFunctions.h: Ditto.
-
-Fri Feb 5 09:38:25 1999 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (mount_info::add_item): Ensure that drive names
- are added using X: notation.
-
-Thu Feb 4 00:28:58 1999 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (path_prefix_p_): Recognize ':' as a path separator.
- (mount_info::conv_to_posix_path): Detect case where a '/' has
- to be added to a path being constructed.
- (realpath): Ensure that the full path name is returned.
-
-Wed Feb 3 22:57:42 1999 Christopher Faylor <cgf@cygnus.com>
-
- * shared.h (mount_info): Add two separate arrays to track
- reverse sorting of win32/posix paths.
- * path.cc (sort_by_posix_name): New function. Sorts by
- posix path.
- (sort_by_native_name): Rename from sort_by_name.
- (mount_info::conv_to_win32_path): Use native sort order
- when iterating through mount table.
- (mount_info::binary_win32_path_p): Ditto.
- (mount_info::getmntent): Ditto.
- (mount_info::conv_to_posix_path): Use posix sort order
- when iterating through mount table.
- (sort): Use two arrays to track sorting of mount table.
- (mount_info::add_item): Simplify slightly.
-
-Wed Feb 3 15:17:54 1999 Christopher Faylor <cgf@cygnus.com>
-
- * cygwin.din: Remove DATA attribute which was erroneously
- added to __errno.
-
-Tue Feb 2 23:10:18 1999 Geoffrey Noer <noer@cygnus.com>
-
- * path.cc: Fix comment regarding UNC paths in mount table.
- (mount_info::conv_to_win32_path): Add back code to handle
- //<drive> paths for now. The plan is still to remove it again at
- a later date.
- (mount_info::slash_drive_to_win32_path): New. Convert a //<drive>
- path to a Win32 path. Bring back from among the recently departed
- path functions.
- * shared.h: Add mount_info proto for slash_drive_to_win32_path.
-
-Tue Feb 2 22:52:43 1999 Geoffrey Noer <noer@cygnus.com>
-
- * include/lmaccess.h: Add stub.
- * include/shlobj.h: Add stub.
-
-Tue Feb 2 22:34:06 1999 Christopher Faylor <cgf@cygnus.com>
-
- * shared.h: Change magic number associated with fork/exec
- information as a temporary measure to eliminate strange
- core dumps with multiple versions of cygwin1.dll.
-
-1999-02-02 Brendan Kehoe <brendan@cygnus.com>
-
- * Makefile.in (readme.txt): Add missing -I$(srcdir)/doc.
-
-Tue Feb 2 01:10:31 1999 Geoffrey Noer <noer@cygnus.com>
-
- * sysdef/*: Replace all files with new ones by Anders
- Norlander <anorland@hem2.passagen.se>. Please read sysdef/README
- for more information.
-
-Mon Feb 1 14:55:11 1999 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (sort_by_name): Sort based on length of native_path
- to ensure maximal match when converting from native -> UNIX.
- * cygwin.din: Make more data variables DATA.
-
-Mon Feb 1 13:31:43 1999 Geoffrey Noer <noer@cygnus.com>
-
- * fhandler_tape.cc: Change all fhandler_tape private functions
- to be named foo_bar_baz-style instead of FooBarBaz. Add some
- parens around logical ors/ands for clarity. Respace.
- * fhandler.h: Change protos here in light of above.
-
-Thu Jan 28 11:00:00 Corinna Vinschen <corinna.vinschen@cityweb.de>
-
- * errno.cc: Support for Windows errors ERROR_CRC and ERROR_NO_READY
- and for error ENOMEDIUM.
-
-Wed Jan 27 01:05:39 1999 Christopher Faylor <cgf@cygnus.com>
-
- * dir.cc (rmdir): Correct errno setting when attempting to rmdir
- a non-directory.
-
-Tue Jan 26 17:36:12 1999 Geoffrey Noer <noer@cygnus.com>
-
- * registry.cc (reg_key::build_reg): Add FIXME.
-
-Tue Jan 26 01:30:48 1999 Geoffrey Noer <noer@cygnus.com>
-
- * path.cc (mount_info::from_registry): Import old v1 mounts
- only if current mount layout doesn't exist yet in both user
- and system areas (when had_to_create_mount_areas == 2).
- (mount_info::import_v1_mounts): New, was upgrade_v1_mounts.
- (mount_info::from_v1_registry): Add missing comma in reg_key
- creation call.
- (mount_info::init): Init had_to_create_mount_areas to zero.
- * external.cc (cygwin_internal): Fix reference to
- upgrade_v1_mounts.
- * shared.h: Change upgrade_v1_mounts proto to import_v1_mounts.
- Add new had_to_create_mount_areas variable in mount_info class.
- * registry.cc (reg_key::build_reg): Increment
- had_to_create_mount_areas whenever we create a new mount area.
-
- * include/sys/mount.h: Don't define MOUNT_EXEC until we actually
- implement this functionality.
-
- * utils/mount.cc (do_mount): Print warning messages after the
- actual mount attempt so we don't see warnings when mount fails.
- (usage): Change name of --upgrade-old-mounts flag to
- --import-old-mounts.
- (main): Ditto.
-
-Mon Jan 25 23:56:50 1999 Geoffrey Noer <noer@cygnus.com>
-
- * errno.cc (seterrno_from_win_error): New. Given a Windows
- error code, set errno accordingly.
- (seterrno): Just call seterrno_from_win_error with the
- error code returned by a call to GetLastError.
- * winsup.h: Define __seterrno_from_win_error.
- * path.cc: Clean up more function description comments.
- (mount_info::add_reg_mount): Don't need res, just return the
- right values.
- (del_reg_mount): Return int, not void. If we're deleting a
- system mount, set errno to EACCES and return -1 if we don't
- have a valid key handle. If mount delete fails, set errno
- accordingly and return -1. Otherwise, return zero for success.
- (cygwin_umount): Delete mount from registry first, only remove
- from internal table if successful.
- * shared.h: Make del_reg_mount proto return int.
-
-Mon Jan 25 22:40:15 1999 Geoffrey Noer <noer@cygnus.com>
-
- * path.cc (mount_info::mount_slash): Add mount to registry
- first, only add to internal table if successful.
- (mount_info::conv_to_posix_path): Ditto.
- (mount): Ditto.
- (mount_info::add_reg_mount): Return int, not void. If we're
- writing a system mount, first check if we have a valid key handle.
- If we don't, set errno to EACCES and return -1. Otherwise return
- zero for success.
- * shared.h: Make add_reg_mount proto return int.
-
-Mon Jan 25 20:40:26 1999 Geoffrey Noer <noer@cygnus.com>
-
- * path.cc (mount_info::init): Don't read automount info here.
- (mount_info::from_registry): Read it here instead. Also, read
- system registry info in KEY_READ mode.
- (mount_info::read_mounts): Read mount info with KEY_READ access
- permissions.
-
-Mon Jan 25 19:12:31 1999 Geoffrey Noer <noer@cygnus.com>
-
- * path.cc: Improve several function description comments.
- (mount_info::init): Read automount information from the
- registry before potentially automounting slash.
- (mount_info::conv_to_posix_path): Create automount with
- automount_flags flags.
- (mount): Now flags is more than just a toggle so we
- must check it in a different manner. And simply check
- MOUNT_AUTO as the indicator. If we want to change the
- automount_prefix, also change automount_flags as appropriate.
- Fix args to syscall_printf.
- (write_automount_info_to_registry): New. Was
- write_automount_prefix_to_registry.
- (read_automount_info_from_registry): New. Was
- read_automount_prefix_from_registry.
- * shared.h: Adjust protos for function renames just mentioned.
- * include/sys/mount.h: Delete MOUNT_CHANGE_AUTOMOUNT_PREFIX
- since we don't really need it.
- * utils.cc (mount): Pass MOUNT_AUTO as indicator of desire to
- change automount prefix.
- (show_mounts): Change spacing so there's room for "system,auto"
- in Type column.
-
-Mon Jan 25 13:17:40 1999 Geoffrey Noer <noer@cygnus.com>
-
- * path.cc: Change all references from "automount root" to
- "automount prefix", avoiding potential nomenclature confusion
- with the root of the file system.
- (read_automount_prefix_from_registry): New. Was
- read_automount_root_from_registry.
- (read_automount_prefix_from_registry): New. Was
- read_automount_root_from_registry. Also read the default
- flags for automounts from registry at the same time.
- (write_automount_prefix_to_registry): New. Was
- write_automount_root_to_registry. Also set automount flags
- in registry using new auto_flags arg.
- (mount): Add flags arg to write_automount_prefix_to_registry call.
- * shared.h: Add automount_flags variable to mount_info class.
- Adjust protos for function renames listed above.
-
- * include/sys/mount.h: Comment out MOUNT_MIXED and MOUNT_SILENT
- whose values could be reused now that we're using a new mount
- layout. Change MOUNT_CHANGE_AUTOROOT to
- MOUNT_CHANGE_AUTOMOUNT_PREFIX.
-
- * utils/mount.cc (change_automount_prefix): New. Was
- change_automount_root. Add new flags argument so it's possible
- to change the default automount flags.
- (main): Option name change from --change-automount-root to
- --change-automount-prefix.
- (usage): Update in light of option changes.
- * utils/umount.cc (remove_all_automounts): Also need to check
- for mnt_type looking like "system,auto" now that it's possible
- for automounts to be located in the system registry.
-
-Mon Jan 25 08:59:04 1999 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (linebuf::add): Ensure that there is always
- enough space for line being added. Always null terminate.
- (linebuf::prepend): Ditto.
-
-Sat Jan 23 01:30:16 1999 Geoffrey Noer <noer@cygnus.com>
-
- Make mount.exe able to upgrade mounts:
- * external.cc: Fix file description.
- (cygwin_internal): Handle CW_READ_V1_MOUNT_TABLES case, in
- which case call upgrade_v1_mounts to upgrade old registry
- area mounts.
- * external.h: Add CW_READ_V1_MOUNT_TABLES to enum.
- * shared.h: Make upgrade_v1_mounts public.
-
- * utils/mount.cc: Include winsup.h, external.h, undef errno since
- it's defined by winsup.h.
- (usage): Add --upgrade-old-mounts option to usage info.
- (main): Handle --upgrade-old-mounts flag by calling
- cygwin_internal with the right constant.
-
-Sat Jan 23 00:40:17 1999 Geoffrey Noer <noer@cygnus.com>
-
- First pass at mount table backwards compatibility with v1
- mounts:
- * path.cc (mount_info::from_registry): For now, upgrade from
- old v1 mount registry area if nmounts==0 after reading new mount
- areas.
- (mount_info::read_v1_mounts): New function. Given a regkey, read
- the mounts in the old v1 registry layout corresponding to the key.
- A "which" arg tells us which registry we're reading so that we
- can include MOUNT_SYSTEM when reading old system mounts.
- (mount_info::from_v1_registry): New function. Retrieve old v1
- mount table area mounts.
- (mount_info::upgrade_v1_mounts): New function. Retrieve old
- v1 mounts, add them to the current registry mount location.
- (mount_info::to_registry): New function. For every mount in
- the internal mount table, add it to the correct registry.
- * shared.h: Add protos for new mount_info functions --
- from_v1_registry, read_v1_mounts, upgrade_v1_mounts, to_registry.
- Don't need class name in protos for
- build_automount_mountpoint_path, write_automount_root_to_registry,
- and read_automount_root_from_registry.
-
-Fri Jan 22 22:45:07 1999 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (spawn_guts): Arg 2 missing from special case
- command/cmd handling.
-
-Fri Jan 22 22:40:32 1998 Corinna Vinschen <corinna.vinsche@cityweb.de>
-
- * fhandler_raw.cc (fhandler_dev_raw::raw_read): bytes_to_read
- corrected to multiple of 512 bytes instead of multiple to
- devbufsiz. Insert break on ReadFile returned 0 Bytes.
-
-Fri Jan 22 15:50:49 1999 Christopher Faylor <cgf@cygnus.com>
-
- * mkvers.sh: Fix handling of CVS tag output.
- * errno.cc: Mark exported data as __declspec(dllexport).
- * times.cc: Ditto.
- * fhandler.cc (fhandler_base::open): Yet another stab
- at correcting handling of binmode/textmode ramifications.
- * path.cc (hash_path_name): Make /. == '' for purposes
- of generating a hash.
-
-Fri Jan 22 11:45:28 1999 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (slash_unc_prefix_p): Generalize to allow
- either type of slash.
- (mount_info::add_item): Don't disallow UNC specs in
- the mount table.
- * utils/Makefile.in: Always use current stub library.
-
-Fri Jan 22 08:52:36 1999 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc (regopt): Use correct registry key for Program
- Options given new mount layout.
- * cygwin.din: export __mb_cur_max from newlib.
-
-Thu Jan 21 16:52:20 1999 Geoffrey Noer <noer@cygnus.com>
-
- * path.cc (cygwin_split_path): Adjust two FIXMEs.
- (mount_info::write_automount_root_to_registry): Return int,
- 0 on success, -1 if path is problematic.
- (mount): Check return of write_automount_root_to_registry
- and act appropriately. Do syscall_printf when adjusting automount
- as well as regular mount.
- * shared.h: mount_info::write_automount_root_to_registry now
- returns an int.
- * utils/mount.cc (main): don't sanity-check automount path
- here, instead let the DLL take care of that.
-
-Thu Jan 21 17:12:26 1999 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (spawn_guts): Rewrite argument handling for
- cleaner, one-pass operation.
- (linebuf::add): New method for adding arguments to end
- of the argument list.
- (linebuf::prepend): New method for pushing arguments on
- the front of the argument list.
-
-Wed Jan 20 19:06:30 1999 Geoffrey Noer <noer@cygnus.com>
-
- * path.cc (mount_info::mount_slash): only call add_reg_mount if
- add_item succeeded.
- (mount_info::add_item): Fail if native path doesn't start with
- <drive letter>: or if posix path doesn't start with a slash.
-
-Wed Jan 20 19:06:30 1999 Geoffrey Noer <noer@cygnus.com>
-
- * fhandler_raw.cc: Correct copyright date, reformat.
- * fhandler_floppy.cc: Ditto.
- * fhandler_tape.cc: Ditto.
-
-Wed Jan 20 17:54:02 1999 Geoffrey Noer <noer@cygnus.com>
-
- Remove //<drive>/ support. Add support for automounts in
- user registry area.
- * path.cc: Rewrite, reformat docs at top in light of removing
- //<drive>/ support and new automount support. Add more function
- description comments.
- (slash_drive_prefix_p): Remove function.
- (build_slash_drive_prefix): Ditto.
- (slash_drive_to_win32_path): Ditto.
- (mount_info::init): After everything else, read the automount_root
- by calling read_automount_root_from_registry().
- (mount_info::mount_slash): Automount slash with MOUNT_AUTO.
- (mount_info::conv_to_win32_path): Remove //<drive>/ support code.
- (mount_info::build_automount_mountpoint_path): Construct the name
- of an automount POSIX path, given automount_root and the Win32
- path that needs to be automounted.
- (mount_info::conv_to_posix_path): Automount missing drive letter
- and call conv_to_posix_path again if path isn't covered by the
- mount table but starts with "<letter>:".
- (mount_info::read_automount_root_from_registry): New function.
- Read in the value of automount_root from the current_user
- registry mount area. If there isn't one, use default of
- "/cygdrive" and write that to the registry by calling
- write_automount_root_to_registry().
- (write_automount_root_to_registry): Write a value of
- automount_root to the user registry area.
- (mount_info::del_item): Add new flags arg to specify which
- registry to delete the mount from.
- (mount_info::del_reg_mount): Ditto.
- (mount_item::getmntent): Use mount_info mnt_foo strings to store
- strings passed back in the mntent struct. Otherwise if you
- delete a mount item while using getmntent, the pointer may
- change on the user. Add ",auto" to mnt_type if MOUNT_AUTO flag is
- set.
- (mount): Add support to set auto_root to path if flags is set
- to the special MOUNT_CHANGE_AUTOROOT flag otherwise do the normal
- thing.
- (umount): Call cygwin_umount with flags value of 0.
- (cygwin_umount): New exported function. Same as umount but
- takes an additional flag argument that specifies which registry
- area from which umount should remove the mount point.
- * cygwin.din: Export the cygwin_umount call.
- * shared.h (mount_info): Add public automount_root string.
- Add public proto for write_automount_root_to_registry().
- Add private protos for build_automount_mountpoint_path() and
- read_automount_root_from_registry(). Add flags arg to del_item
- and del_reg_mount protos. Add strings used by getmntent et al
- including mnt_type, mnt_opts, mnt_fsname, mnt_dir. (Can't just
- pass back pointers to mount paths because they may change as
- a result of a umount call.
-
- * include/sys/mount.h: Add new MOUNT_AUTO and
- MOUNT_CHANGE_AUTOROOT flags. Add proto for cygwin_umount
- function.
- * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 9.
-
- * utils/mount.cc: Change missing_dir_warning flag to force
- and init to FALSE instead of TRUE. Throughout swap names and
- setting as appropriate. Include errno.h.
- (usage): Remove info about --reset. Add info for new
- --change-automount-root option.
- (main): Don't check the --reset flag. Call change_automount_root
- if invoked with --change-automount-root. Only call do_mount
- if !mount_already_exists unless force flag is TRUE. Otherwise
- fail.
- (mount_already_exists): New helper function. Returns 1
- if the mount point of the same registry location is already
- mounted.
- (reset_mounts): Remove function.
- (change_automount_root): New function that changes the
- automount root in the registry via Cygwin by passing the new
- path to mount() with the special MOUNT_CHANGE_AUTOROOT flag.
- * utils/umount.cc: Add progname, set to argv[0]. Include string.h.
- (usage): New function to print out usage info.
- (main): Loop through argcs. Handle new flags to remove all mounts
- of a specific type including --remove-all-mounts,
- --remove-user-mounts, --remove-system-mounts, and
- --remove-auto-mounts. New flag to specify removing a system
- mount. Call cygwin_umount instead of umount, providing flags
- as appropriate.
- (remove_all_mounts): New function. Remove all mounts in
- both tables.
- (remove_all_automounts): Remove all mounts marked auto.
- (remove_all_user_mounts): Remove all user mounts, including auto
- mounts.
- (remove_all_system_mounts): Remove all system mounts.
-
- * registry.cc (reg_key::get_string): Fix description comment.
- * strace.cc: Minor reformatting.
-
-Wed Jan 20 17:49:20 1999 DJ Delorie <dj@cygnus.com>
-
- * fhandler.cc (raw_write): Make sure that a disk full error
- is properly signalled.
- (fhandler_base::open): Only tapes are read/write, cd-roms may be
- read-only (from Corinna).
-
-Wed Jan 20 10:46:48 Corinna Vinschen <corinna.vinschen@cityweb.de>
-
- [applied by DJ Delorie <dj@cygnus.com>]
-
- * fhandler_raw.cc (fhandler_dev_raw::writebuf): Writes only
- as much bytes as needed, instead of full buffer size.
-
- * fhandler_tape.cc (fhandler_dev_tape::close): Corrected error
- handling in case of error while writing buffer content to dev.
-
- * fhandler_floppy.cc (fhandler_dev_floppy::close): Ditto.
-
- * fhandler_tape.cc (fhandler_dev_tape::writebuf): Delete function
-
- * fhandler_floppy.cc (fhandler_dev_floppy::writebuf): Ditto.
-
- Patch suggested by Ron Parker <rdparker@butlermfg.org>
- * path.cc (mount_info::conv_to_win32_path): Change the
- recognition of UNC devices, to support also paths of type
- `\\.\UNC\'.
-
- * fhandler_tape.cc (fhandler_dev_tape::close): Fixed rewind
- to block 1 instead of block 0 on rewind tapes in case of
- uncaught signal (e.g. Ctrl-C).
-
- * path.cc (get_raw_device_number): New static function,
- checks path for windows raw device.
-
- * path.cc (get_device_number): Change for recognition of
- windows raw device paths by calling `get_raw_device_number()'.
-
- * path.h: Change prototype for `get_device_number()'.
-
- * Makefile.in: Added file 'fhandler_raw.o' to dependencies.
-
- * include/cygwin/rdevio.h: New file to support ioctl commands
- on random access raw devices. At the time only get/set buffersize
- for raw_read/raw_write.
-
- * fhandler.h: Change class hierarchy. 'fhandler_dev_floppy'
- and 'fhandler_dev_tape' are now derived classes of
- 'fhandler_dev_raw', which is derived from 'fhandler_base'.
-
- * fhandler_raw.cc: New file for implementation of class
- 'fhandler_dev_raw' which is now base class for support of
- mass storage raw devices.
-
- * fhandler_dev_tape.cc: Rewritten.
-
- * fhandler_dev_floppy.cc: Rewritten. Now supporting correct
- lseek (seeking only to positions on 512 byte boundaries,
- like supported from WinNT).
-
- * Makefile.in: Added file 'fhandler_floppy.o' to dependencies.
-
- * fhandler_floppy.cc: New file to support raw devices
- including multi volume operations.
-
- * fhandler.cc: Delete 'fhandler_dev_floppy' implementation.
-
- * fhandler.h: Extend class fhandler_dev_floppy.
-
- * fhandler_tape.cc: Rewrite for correct support
- of multi volume operations. Supports Setmarks now.
-
- * fhandler.h: Add private method `clear()' to class
- fhandler_dev_tape.
-
- * Makefile.in: Add file 'fhandler_tape.o' to dependencies.
-
- * path.cc (mount_info::conv_to_win32_path): Change the
- recognition of UNC devices, to support devices, which
- are not partitions, too.
-
- * fhandler.h: Extend struct 'fhandler_dev_tape' for tape support.
- Add method 'fstat' to fhandler_dev_floppy to get S_ISBLK().
-
- * fhandler.cc (fhandler_base::open): In any case 'access_' has to
- be GENERIC_READ | GENERIC_WRITE for tapes, to allow tape control.
- No 'SetFilePointer' for tapes.
-
- * fhandler_tape.cc: New file to support rewind (/dev/stX) and
- norewind (/dev/nstX) tapes. Supports ioctl() calls, described
- in...
-
- * include/sys/mtio.h, include/cygwin/mtio.h: New header files
- for tape support.
-
-Sat Jan 16 21:59:36 1999 Geoffrey Noer <noer@cygnus.com>
-
- * registry.h: Delete; move contents into shared.h except for
- posix_path_p() routine which disappears.
- * {Makefile.in, environ.cc, net.cc, path.cc, registry.cc,
- shared.cc}: No longer include registry.h.
- * dcrt0.cc (dll_crt0_1): don't check posix_path_p()
-
- * include/mntent.h (struct mntent): Drop const from strings.
- * include/sys/mount.h: Change MOUNT_GLOBAL flag that nobody has
- used yet to MOUNT_SYSTEM. Add MOUNT_EXEC flag.
- * include/cygwin/version.h: Bump CYGWIN_VERSION_MOUNT_REGISTRY to
- 2. Change CYGWIN_INFO_CYGWIN_REGISTRY_NAME to "Cygwin".
- Change CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME to "mounts v2".
-
- * registry.cc (reg_key::reg_key): Default key doesn't end in
- "mounts" any more.
- (reg_key::kill): Return error code from RegDeleteKeyA.
- * path.cc: Reformat, reorder functionality, add comments
- throughout.
- (mount_info::init): Automount slash if it's not already mounted.
- (mount_info::mount_slash): New private helper function.
- (mount_info::binary_win32_path_p): Check flags to determine
- if mount is binary or not, not binary_p.
- (mount_info::read_mounts): Remove unneeded access argument. Use
- RegEnumKeyEx to enumerate mount points in current registry
- location where each key name returned is a posix_path mount
- location. Use a subkey reg_key to read the posix_path's
- corresponding native_path and flags.
- (mount_info::from_registry): Access HKEY_LOCAL_MACHINE registry
- with full access privs (which will fail if not administrator).
- Fix registry path used to initialize HKEY_LOCAL_MACHINE reg_key.
- (mount_info::to_registry): Delete function. Replaced by
- add_reg_mount.
- (mount_info::add_reg_mount): New function which adds a specified
- mount point to the registry.
- (mount_info::del_reg_mount): New function which deletes the
- posix_path argument from the highest priority registry table it
- can (first user, than system-wide).
- (sort_by_name): If the two posix_paths are the same, then
- differentiate between them looking at MOUNT_SYSTEM in their flags.
- (mount_info::add_item): Also make sure that neither path is NULL.
- Never claim mount point is busy: replace an existing posix_path
- as long as it came from the same registry location.
- (mount_info::del_item): Also make sure that neither path is NULL.
- (mount_item::getmntent): Use mnt_type field to store user vs.
- system registry location string. Cast all strings to char *.
- Handle flags instead of binary_p. Change names of strings
- returned in mnt_opts field.
- (mount_item::init): Set flags, instead of dealing with binary_p
- and silent_p.
- (mount): Call add_reg_mount instead of to_registry.
- (umount): Call del_reg_mount instead of to_registry.
- (path_conv::path_conv): Remove reference to silent_p.
- * path.h (path_conv): Remove silent_p.
-
- * utils/mount.cc: Add -s to usage (was a commented-out -g).
- Or in MOUNT_SYSTEM if -s flag given. Add similar commented-out
- support for future MOUNT_EXEC flag that will be added with -e.
- (reset_mounts): Automount slash with zero for flags, not
- MOUNT_SILENT which we no longer use for anything.
- * utils/umount.cc: Also print out usage if the first argument
- starts with a dash.
-
-Fri Jan 15 11:27:51 1999 DJ Delorie <dj@cygnus.com>
-
- * strace.cc: add macros to protect against buffer overruns
- (strace_printf): increase buffer from 6000 to 1000 to build devo
- * include/sys/strace.h: allow -DNOSTRACE again
-
-Fri Jan 15 11:27:51 1999 DJ Delorie <dj@cygnus.com>
-
- * dcrt0.cc (alloc_stack): add 16384 to work around Win95 page
- fault during builds
- * fork.cc (fork): try various things to avoid page faults during
- win95 builds.
-
-Fri Jan 15 11:18:23 1999 DJ Delorie <dj@cygnus.com>
-
- * fhandler.cc (raw_write): check for disk full.
-
-Fri Jan 15 11:18:23 1999 DJ Delorie <dj@cygnus.com>
-
- * init.cc (dll_entry): if the DLL is being LoadLibrary'd,
- initialize some things.
- * heap.cc (_sbrk): detect uninitialized heap and initialize
- * dcrt0.cc (user_data): initialize to something useful.
- (do_global_ctors): make global for init.cc
-
-Thu Jan 14 02:16:44 1999 Geoffrey Noer <noer@cygnus.com>
-
- * dll_init.cc: Add missing FIXME in comment.
- * fhandler_console: Ditto.
-
-Thu Jan 14 00:53:25 1999 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (iscmd): New function.
- (spawn_guts): Treat command /c and cmd /c as special
- cases. Don't quote arguments to these programs if
- there are exactly three arguments.
- * dcrt0.cc (dll_crt0_1): Initialize exceptions prior
- to fork to allow forked processes to "dump core".
- * errno.cc (seterrno): No need for this to be extern "C".
- * winsup.h: Ditto.
-
-Wed Jan 13 19:06:08 1999 Geoffrey Noer <noer@cygnus.com>
-
- * registry.cc: Add comments corresponding to various reg_key
- functions, minor reformatting.
- (reg_key::reg_key): Delete already-commented-out function
-
-Wed Jan 13 15:41:34 1999 DJ Delorie <dj@cygnus.com>
-
- * errno.cc (_sys_errlist): Add "extern" to work around new gcc
- restrictions.
-
-Mon Jan 11 14:56:27 1999 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (spawn_guts): Fix problem with #! and relative
- directories.
-
-Mon Jan 11 09:00:29 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_console.cc (fhandler_console::read1): Handle EOF as a
- specific case.
-
-Sun Jan 10 23:44:22 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h: Define __fmode for convenience. Use throughout.
- * environ.cc (parse_options): Use O_TEXT when nobinmode.
- * fhandler.cc (fhandler_base::open): Don't honor __fmode
- when disk file. Default to O_TEXT if no mode is specified.
- (fhandler_base::fhandler_base): Don't honor __fmode when disk
- file. Otherwise default to O_BINARY.
- * pipe.cc (make_pipe): Default to O_BINARY if no mode specified.
-
-Sat Jan 9 20:58:34 1999 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Correct previously messed up patch.
- * thread.h: Add back a needed include.
- * sigproc.cc (sigproc_init): Work around problem with older
- compilers.
- * wait.cc (wait4): Ditto.
- * winsup.h (per_thread_waitq): Ditto.
- * include/Windows32/CommonFunctions.h: Temporary change to
- work around problems with older compilers.
-
-Fri Jan 8 12:53:53 1999 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc (parse_options): Add "forkchunk" debug setting.
- Takes a value which is used to limit the size of individual memory
- copies in a fork.
- * fork.cc (fork_copy): Rewrite slightly to allow copying of
- individual chunks of memory rather than all in one gulp.
- Controlled by chunksize global variable.
-
-Thu Jan 7 22:02:18 1999 Christopher Faylor <cgf@cygnus.com>
-
- patch from Corinna Vinschen <corinna.vinschen@cityweb.de>:
- * utils/passwd.c: New file.
- * utils/Makefile.in: Add dependencies for passwd.
- * syscalls.cc (chmod): Change permission checking in case
- of readonly test.
- (stat_dev): Change default permission bits to allow writing
- for all users.
- (chown): Retry LookupAccountName with username set to domain\\username,
- if returned SID-Type is not SidTypeUser.
-
-
-Thu Jan 7 17:50:49 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.cc (fhandler_base::set_name): Fix bug which
- disallowed '%' in a file name.
-
-Thu Jan 7 00:21:41 1999 Geoffrey Noer <noer@cygnus.com>
-
- * path.cc: Add comments.
- * path.h: Correct file description comment.
-
-Tue Jan 5 16:07:15 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_serial.cc (fhandler_serial::raw_read): Be more defensive
- about not calling problematic functions when the overlapped I/O is
- armed. Reset the overlapped event prior to calling read or suffer
- an "operation aborted".
- * select.cc (peek_serial): Ditto.
-
-Mon Jan 4 15:16:22 1999 Geoffrey Noer <noer@cygnus.com>
-
- Eliminate warnings:
- * utils/mount.cc (show_mounts): make format a const char *.
- * utils/ps.cc (main): make literal strings const char *s.
- * utils/cygpath.cc (long_options): cast literal strings to char *s.
- (main):
-
-Sun Jan 3 20:46:12 1999 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (peek_console): Remove #if 0 around NT code workaround.
-
-Sat Jan 2 00:04:01 1999 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Remove include directories made obsolete by
- recent changes to mmap.cc. Also remove libraries that appear
- to be unnecessary for linking.
- * mkvers.sh: Put contents of .snapshot-date, if available, into
- the DLL.
-
-Fri Jan 1 22:44:49 1999 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h (fhandler_serial): Add flag to track state of
- overlapped serial I/O. Add overlapped_setup method for common
- setup of overlapped structure.
- * fhandler_serial.cc (fhandler_serial::overlapped_setup): New
- method. Sets up the overlapped structure for overlapped serial I/O.
- (fhandler_serial::raw_read): Use overlapped_armed flag to avoid
- calling functions which perform overlapped operations if overlapped
- I/O is in already progress. This should only be the case if a
- previous operation was interrupted or select has detected serial I/O.
- (fhandler_serial::open): Use overlapped_setup.
- (fhandler_serial::fixup_after_fork): Ditto.
- (fhandler_serial::de_linearize): Ditto.
- (fhandler_serial::dup): Ditto.
- (fhandler_serial::tcsetattr): Fix typo which caused IGNPAR
- to be ignored.
- * hinfo.cc (hinfo::select_read): Set saw_error to zero explicitly
- to avoid spurious reporting of select errors.
- (hinfo::select_write): Ditto.
- (hinfo::select_except): Ditto.
- * select.cc (peek_serial): Use overlapped_armed to avoid calling
- functions which perform overlapped operations if overlapped I/O
- is already in progress.
diff --git a/winsup/cygwin/ChangeLog-2000 b/winsup/cygwin/ChangeLog-2000
deleted file mode 100644
index 54494e6..0000000
--- a/winsup/cygwin/ChangeLog-2000
+++ /dev/null
@@ -1,4150 +0,0 @@
-Tue Dec 27 1:08:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Add symbols for `getrlimit' and `setrlimit'.
- * exceptions.cc (stackdump): Avoid creating stackdump when
- `rlim_core' is 0.
- * resource.cc: New global variable `rlim_core'.
- (getrlimit): New function.
- (setrlimit): Ditto.
- include/cygwin/version.h: Bump minor API version to 32 due to
- adding `getrlimit' and `setrlimit'.
- include/sys/resource.h: Add defines, types and prototypes for
- `getrlimit' and `setrlimit'.
-
-Mon Dec 25 22:18:42 2000 Christopher Faylor <cgf@cygnus.com>
-
- * autoload.h: Make DLL initializers global to avoid inlining.
- * exceptions.cc (interrupt_setup): Reorganize arguments to allow use of
- regparm.
- (interrupt_now): Ditto.
- (interrupt_on_return): Ditto.
- (call_handler): Ditto.
-
-Mon Dec 25 13:36:44 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/cygwin/version.h: Bump DLL minor version number to 8.
-
-Wed Dec 20 13:37:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc: Add load statement for SetSecurityDescriptorControl.
- * security.cc (alloc_sd): Always set SE_DACL_PROTECTED flag on
- Win2K and higher.
-
-Wed Dec 20 01:02:13 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (reset_signal_arrived): Make global to avoid inlining.
-
-Wed Dec 20 00:57:10 2000 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_serial.cc (fhandler_serial::raw_read): Always find number of
- bytes ready to be read whether overlapped_armed or not.
-
-Tue Dec 19 21:39:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (remove): New function, overriding the newlib
- implementation.
-
-Tue Dec 19 16:26:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * environ.cc (struct parse_thing): Add entry for new CYGWIN option
- `smbntsec'.
- * path.cc (path_conv::check): Check path for being a remote path.
- If so and `allow_smbntsec' is set to FALSE, set has_acls to FALSE.
- * security.cc: Add global definition for `allow_smbntsec'.
- * security.h: Add extern declaration for `allow_smbntsec'.
- * fhandler.cc (fhandler_disk_file::open): Eliminate extern declaration
- of `allow_ntsec'.
- * syscalls.cc: Ditto.
-
-Fri Dec 15 18:54:42 2000 Bradley A. Town <townba@pobox.com>
-
- * fhandler_console.cc (read): Add support for xterm-style mouse event
- reporting.
- (fhandler_console::char_command): Honor mouse events.
- (fhandler_console::open): Enable mouse input events.
- (fhandler_console::input_tcsetattr): Ditto.
- * select.cc (peek_console): Add check for mouse events.
-
-Fri Dec 15 17:23:17 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (normalize_posix_path): Calculate path name length overruns
- more dynamically.
- (normalize_win32_path): Ditto.
- * Makefile.in: Avoid scanning the directory twice for *.d files.
-
-Thu Dec 14 23:37:51 2000 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h (fhandler_console): Add additional argument to
- char_command method.
- * fhandler_console.cc (fhandler_console::read): Revert previously
- misapplied patch.
- (fhandler_console::char_command): Add a second argument.
- (fhandler_console::write): Recognize when a '?' is found after a
- <esc>[.
-
-Tue Dec 5 17:06:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_rexec): Eliminate superfluous call to
- `set_socket_inheritance'.
- * include/sys/socket.h: Add SUS defines for option values to `shutdown'.
-
-Sun Dec 10 17:19:04 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/sysexits: New file.
-
-2000-12-09 Egor Duda <deo@logos-m.ru>
-
- * autoload.cc: Autoload CharToOemA.
- * dcrt0.cc (dll_crt0_1): Translate command line to OEM if current
- codepage is OEM.
- * environ.cc: Add new option 'codepage' to CYGWIN environment variable.
- * fhandler_clipboard.cc (fhandler_clipboard::read): Read clipboard in
- OEM mode if current codepage is OEM.
- * fhandler_console.cc (fhandler_console::read): Only translate console
- input if current codepage is ANSI.
- * fhandler_console.cc (fhandler_console::write_normal): Translate
- output data if current codepage is ANSI.
- * pinfo.cc (codepage_init): New function. Setup current codepage from
- CYGWIN environment variable and set codepage for file APIs.
- * security.cc (read_sd): Translate file name to it if current codepage
- is OEM.
- * winsup.h: (sys_wcstombs,sys_mbstowcs): Use current codepage for
- translations between multibyte and widechar string and vice versa.
-
-Sat Dec 9 16:29:45 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (normalize_win32_path): Check for explicit use of two slashes
- at the beginning of a path. These should be treated specially
- regardless of whether they are UNC paths or old-style //a paths. Avoid
- adding cwd to a path if the path already begins with '/'.
-
-Fri Dec 8 22:21:01 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (normalize_win32_path): Reorganize logic to accommodate
- chroot. Always check for MAX_PATH overrun. Avoid adding one too many
- backslashes when src path begins with a slash. From Corinna Vinschen.
- * winsup.h: Force demangling for dll_crt0 for newer compilers.
-
-Thu Dec 7 12:10:00 2000 Edward M. Lee <tailbert@yahoo.com>
-
- * cygwin.din: Declare strtok_r for the import lib. Already in the DLL.
-
-Wed Dec 6 15:39:18 2000 Earnie Boyd <earnie_boyd@yahoo.com>
-
- * include/sys/uio.h (readv): Correct prototype.
- (writev): Ditto.
-
-Tue Dec 5 17:06:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/sys/uio.h: Include <sys/cdefs.h>. Use __BEGIN_DECL and
- __END_DECL.
- Add declarations for `readv' and `writev'.
-
-Mon Dec 4 20:49:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in: Change `-nostartfiles' to `-nostdlib' to avoid
- automatic linking with default libraries when linking new-cygwin1.dll.
- Link with libgcc.a and libstdc++.a explicitly.
-
-Sun Dec 3 01:20:25 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (normalize_win32_path): Handle UNC paths better.
- (slash_unc_prefix_p): Allow backslash UNC paths.
-
-Sun Dec 3 00:20:25 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Remove some extra cruft.
-
-Sun Dec 3 00:13:26 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Use CXX to build the DLL.
- * configure.in: Find correct c++ compiler.
- * configure: Regenerate.
- * path.cc (normalize_posix_path): Put correct drive at beginning of \foo style paths.
- (chdir): Don't send non-posix path to cygcwd.set.
-
-Sat Dec 2 22:26:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (get_inet_addr ): Close AF_UNIX socket file after reading.
-
-Wed Nov 29 18:25:53 2000 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * cygheap.cc (chgheap_root::operator =): Check root dir properly.
-
-Thu Nov 29 18:11:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_inet_aton): Return nonzero if the address
- is valid, zero if not according to Linux man page.
-
-Mon Nov 27 21:09:50 2000 Kelley Cook <kelley.cook@home.com>
-
- * mmap.cc (munmap): Check that mmap and munmap length match.
-
-Tue Nov 28 18:08:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_disk_file::open): Check for buggy CreateFile
- condition.
- * path.cc (path_conv::check): Get file system type in call to
- GetVolumeInformation to check for file systems with buggy CreateFile.
- * path.h (enum path_types): Add PATH_HASBUGGYOPEN.
- (class path_conv): Add methods `has_buggy_open' and
- `set_has_buggy_open'.
-
-Sun Nov 26 16:26:14 2000 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.cc (is_at_eof): New function.
- (fhandler_base::raw_read): Detect special case where last error ==
- ERROR_NOACCESS but the file is at EOF. Most UNIXes do not consider
- this to be an error.
-
-Sun Nov 26 14:37:29 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/cygwin/version.h: Bump DLL minor version number to 7.
-
-Sat Nov 25 11:27:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/version.h: Bump minor API version due to adding
- inet_aton.
-
-Sat Nov 25 11:07:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_inet_aton): New function.
- * cygwin.din: Export cygwin_inet_aton as inet_aton.
-
-Sat Nov 25 01:57:42 2000 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * path.cc (mount_info::read_cygdrive_info_from_registry): Read system
- cygdrive prefix with KEY_READ.
- (mount_info::get_cygdrive_info): Ditto.
-
-Wed Nov 22 11:18:02 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: new-temp.a -> new-templib.a
-
-Mon Nov 20 17:04:43 2000 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (spawn_guts): Quoting was still wrong. Keep trying to
- fix it.
-
-Mon Nov 20 14:26:38 2000 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (spawn_guts): YA tweak for dealing with arcane rules of
- quoting in "normal" Microsoft programs.
- * child_info.h: Bump fork magic number.
- * include/sys/mount.h: Add an entry for mixed mode.
-
-Fri Nov 17 12:28:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (normalize_posix_path): Special care for root directory
- in case of files beginning with a dot.
-
-Fri Nov 17 12:28:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * syslog.cc (syslog): Add users SID to NT syslog entry.
-
-Thu Nov 16 15:59:58 2000 Bradley A. Town <townba@pobox.com>
-
- * fhandler_console.cc: New member variable `dwBufferSize' for `info'.
- (fillin_info): Set `dwBufferSize' to the size of the console buffer.
- (clear_screen): Use width of console buffer to calculate how many
- spaces to clear.
-
-Thu Nov 16 15:24:45 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Make import library creation 'make -j2' friendly.
-
-Thu Nov 16 10:28:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * uinfo.cc (uinfo_init): Call `cygwin_set_impersonation_token' to
- reset `cygheap->user.token' to INVALID_HANDLE_VALUE.
-
-Thu Nov 16 00:18:15 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (interrupt_setup): Don't set signal mask here or races
- occur with main thread. Set it in sigdelayed instead.
- (sigreturn): Reflect change in stack order of ebp and flags.
- (sigdelayed): Set stack frame correctly. Call set_process_mask here
- with flags for last trapped signal.
- (signal_dispatch): Add newmask.
- * sigproc.cc (wait_sig): Eliminate ill-considered attempt to halt
- looping signal processors.
- * perthread.h (signal_dispatch): Add newmask field.
-
-Wed Nov 15 22:08:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * uinfo.cc (internal_getlogin): Change parameter list to reflect
- that `token' is member of cygheap_user now.
- (uinfo_init): Use modified internal_getlogin.
- * syscalls.cc (seteuid): Ditto.
-
-Wed Nov 15 21:56:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.h: Move `token' and `impersonated' from class _pinfo
- to class cygheap_user.
- * pinfo.h: Ditto.
- * fork.cc (fork_child): Change usage of `token' and `impersonated'
- accordingly.
- (fork_parent): Ditto.
- * security.cc (cygwin_set_impersonation_token): Ditto.
- * sigproc.cc (proc_subproc): Ditto.
- * spawn.cc (spawn_guts): Ditto.
- * syscalls.cc (seteuid): Ditto.
- * uinfo.cc (uinfo_init): Ditto.
-
-Wed Nov 15 9:59:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * spawn.cc (spawn_guts): Revert patch to ignore chroot settings
- on creating native Win32 environment.
-
-Wed Nov 15 01:44:37 2000 Christopher Faylor <cgf@cygnus.com>
-
- * fork.cc (slow_pid_reuse): Off-by-one.
-
-Wed Nov 15 01:20:24 2000 Christopher Faylor <cgf@cygnus.com>
-
- Throughout use myself->ppid_handle rather than parent_alive.
- * child_info.h (child_info): Eliminate parent_alive.
- * dcrt0.cc (dll_crt0_1): Call fork_init for debugging pid creation.
- * fork.cc (fork_child): Reflect change to fixup_mmaps_after_fork
- arguments.
- (slow_pid_reuse): New function to grab last 'n' pids to prevent pid
- reuse.
- (fork_parent): Move last_fork_proc into slow_pid_reuse.
- fork_pids debugging. Eliminate unnecessary call to set_child_mmap_ptr.
- (fork_init): New debugging function.
- * mmap.cc (fixup_mmaps_after_fork): Renamed from
- recreate_mmaps_after_fork. Rely on copied data after a fork.
- (set_child_mmap_ptr): Eliminate.
- * pinfo.h (_pinfo): Eliminate parent_alive, mmap_ptr and reflect above
- changes.
- * spawn.cc (spawn_guts): Eliminate vestiges of "old way" of sending new
- hProc to parent process.
-
-Wed Nov 15 0:51:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.cc (cygheap_root::cygheap_root): New function.
- (cygheap_root::~cygheap_root): Ditto.
- (cygheap_root::operator=): Ditto.
- (cygheap_user::~cygheap_user): Ditto.
- (cygheap_user::set_name): Ditto.
- (cygheap_user::set_logsrv): Ditto.
- (cygheap_user::set_domain): Ditto.
- (cygheap_user::set_sid): Ditto.
- * cygheap.h (cygheap_root): New class.
- (cygheap_user): Ditto.
- (init_cygheap): Change type of `root' member to cygheap_root.
- Add `user' member.
- * dir.cc (opendir): Use new `cygheap_root' class.
- * dcrt0.cc (dll_crt0_1): Use new `cygheap_user' class.
- * fork.cc (fork_parent): Ditto.
- * grp.cc (getgroups): Ditto.
- * passwd.cc (search_for): Ditto.
- * path.cc: Use new `cygheap_root' class throughout.
- * pinfo.h (_pinfo): Remove `use_psid'. Move `username', `psid',
- `logsrv', `domain', `orig_{uid,gid}' and `real_{uid,gid}' to
- cygheap_user class.
- * security.cc: Use new `cygheap_user' class throughout.
- * shared.cc (sec_user): Ditto.
- * sigproc.cc (proc_subproc): Remove copy statements for user
- related information moved to `cygheap_user' class.
- * spawn.cc (spawn_guts): Invalidate current chroot settings
- when creating Windows environment. Use new `cygheap_user' class.
- * syscalls.cc: Use new `cygheap_user' class throughout.
- * uinfo.cc: Ditto.
- (internal_getlogin): Change parameters to reflect the
- move of user information to cygheap.
-
-Tue Nov 14 17:05:00 2000 Eric Fifer <efifer@dircon.co.uk>
-
- * dir.cc (rewinddir): Always set __d_position = 0, so next
- call to readdir() will restart the directory scan.
-
-Tue Nov 14 00:51:28 2000 Christopher Faylor <cgf@cygnus.com>
-
- * cygheap.h (init_cygheap): New struct holding values that live in the
- Cygwin heap.
- * child_info.h (child_info): Change pointer type of cygheap to
- init_cygheap.
- * cygheap.cc (init_cheap): Point cygheap_max after contents of cygheap.
- Move some stuff into cygheap.h.
- * dir.cc (opendir): Change to use root and rootlen in cygheap rather
- than in myself.
- (mkdir): Change to use umask in cygheap rather than in myself.
- * path.cc: Ditto, throughout.
- * syscalls.cc (_open): Ditto. Change to use umask in cygheap rather
- than in myself.
- (chroot): Change to allocate root dir on the cygwin heap.
- (umask): Change to use umask in cygheap rather than in myself.
- (cygwin_bind): Ditto.
- * sigproc.cc (proc_subproc): Don't copy umask or root stuff as this
- happens automatically now.
- * pinfo.h (_pinfo): Migrate stuff out of here and into init_cheap.
- * dcrt0.cc (dll_crt0_1): Call cygheap_init later in startup for first
- cygwin process.
-
-Sun Nov 12 23:01:35 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (get_device_number): Allow /dev/ttySn to designate a com
- port.
-
-Sat Nov 11 23:55:19 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.h: Add __attribute__ ((regparm(x))) to commonly used functions.
- * pinfo.h: Ditto.
- * sigproc.h: Ditto.
- * sync.h: Ditto.
-
-Fri Nov 10 13:48:44 2000 Bradley A. Town <townba@pobox.com>
-
- * dcrt0.cc: New global variable `ignore_case_with_glob'.
- (dll_crt0_1): Disable case-insensitive globbing before calling `main'.
- * environ.cc (glob_init): New static function to set or clear
- `ignore_case_with_glob'.
- (known): Changed "glob" entry to call `glob_init'.
- * glob.c (match): Use case-insensitive globbing if needed.
-
-Thu Nov 9 14:30:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc (readdir): Avoid reading from the beginning when
- readdir is called after a previous call has returned NULL.
-
-Wed Nov 8 21:00:31 2000 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (peek_pipe): Deal with pending newline in pty_master.
-
-Wed Nov 8 15:35:32 2000 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc (_addenv): malloc space for setenv if cygwin1.dll is used
- in conjunction with older binaries.
- (environ_init): Ditto.
-
-Wed Nov 8 08:49:27 2000 Jason Tishler <jt@dothill.com>
-
- * external.cc (get_cygdrive_info): New function.
- * external.cc (get_cygdrive_prefixes): Change to use get_cygdrive_info
- but toss the user and system flags.
- * external.cc (cygwin_internal): Add new CW_GET_CYGDRIVE_INFO case.
- * path.cc (mount_info::get_cygdrive_prefixes): Remove method.
- * path.cc (mount_info::get_cygdrive_info): New method. Actually,
- get_cygdrive_info is really an enhanced version of
- get_cygdrive_prefixes renamed to get_cygdrive_info that also gets the
- user and system flags.
- * shared_info.h (get_cygdrive_prefixes): Remove method.
- * shared_info.h (get_cygdrive_info): New method.
- * include/cygwin/version.h: Bump minor API version due to adding
- CW_GET_CYGDRIVE_INFO to cygwin_internal.
- * include/sys/cygwin.h (cygwin_getinfo_types): Add
- CW_GET_CYGDRIVE_INFO.
-
-Tue Nov 7 20:58:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc: Add autoload statement for `WSASetLastError'.
- * net.cc (cygwin_connect): Change error code to WSAEINPROGRESS
- when connect returns WSAEWOULDBLOCK.
-
-Mon Nov 6 15:11:57 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (sigthread::init): Reinstitute sigthread lock as a critical
- section.
- (dll_crt0_1): Move sigthread lock initialization to earlier in startup.
- * exceptions.cc (interrupt_on_return): Remove previous kludgy attempt
- to detect an invalid frame.
- (call_handler): Eliminate inner for loop. Grab signal critical section
- lock where appropriate.
- * sigproc.cc (proc_subproc): Restore uid setting.
- * sigproc.h (sigthread): Reinstitute sigthread lock as a critical
- section.
- (sigframe): Grab the sigthread lock before clearing frame to avoid
- having the signal thread use an invalid frame.
-
-Mon Nov 6 11:11:42 2000 Jason Tishler <jt@dothill.com>
-
- * path.cc (mount_info::read_cygdrive_info_from_registry): Use
- CYGWIN_INFO_CYGDRIVE_PREFIX, CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX, and
- CYGWIN_INFO_CYGDRIVE_FLAGS.
- * path.cc (mount_info::write_cygdrive_info_to_registry): Use
- CYGWIN_INFO_CYGDRIVE_PREFIX and CYGWIN_INFO_CYGDRIVE_FLAGS.
- * path.cc (mount_info::remove_cygdrive_info_from_registry): Ditto.
- * path.cc (mount_info::get_cygdrive_prefixes): Use
- CYGWIN_INFO_CYGDRIVE_PREFIX.
- * include/cygwin/version.h: Add CYGWIN_INFO_CYGDRIVE_FLAGS,
- CYGWIN_INFO_CYGDRIVE_PREFIX, and CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX.
-
-Mon Nov 6 11:10:44 2000 Jason Tishler <jt@dothill.com>
-
- * errno.cc (strerror): Change EAGAIN case to return "Resource
- temporarily unavailable" instead of "No more processes".
-
-Mon Nov 6 01:04:35 2000 Christopher Faylor <cgf@cygnus.com>
-
- * child_info.h (child_info): Add pppid_handle for closing the parent's
- parent handle.
- * dcrt0.cc (_dll_crt0): Close parent's parent handle when spawned or
- forked.
- * debug.cc (add_handle): Correct erroneous reference to handle
- structure when printing warning.
- * exceptions.cc (interrupt_now): Always return 1.
- (interrupt_on_return): Accept a sigthread argument. Check to see if
- this argument has been trashed prior to setting up the stack return.
- (call_handler): Add a loop around attempts to dispatch signals to
- detect case where interrupt_on_return fails.
- (_sigdelayed): Set up a temporary frame pointer prior to calling stuff
- that could trigger an interrupt or the stack walking code will be very
- confused.
- * fork.cc (fork_parent): Move a lot of the setup of the child process
- into proc_subproc.
- * spawn.cc (spawn_guts): Ditto. Use ppid_handle to contact logical
- parent when reparenting execed process.
- * pinfo.h (_pinfo): Remember the logical handle of the parent process.
- * sigproc.cc (proc_subproc): Record most stuff necessary for the _pinfo
- structure that is inferrable from myself when adding children.
- (wait_sig): Always set 'pending_signals' flag when about to kick off
- the signal scanning loop. Reset it only if there are no pending
- signals.
-
-Sun Nov 5 13:46:23 2000 Christopher Faylor <cgf@cygnus.com>
-
- * pinfo (wait_subproc): Son of neverending debug tweaking.
-
-Sun Nov 5 11:45:15 2000 Christopher Faylor <cgf@cygnus.com>
-
- * pinfo (wait_subproc): Neverending debug tweaking.
-
-Sun Nov 5 01:34:51 2000 Christopher Faylor <cgf@cygnus.com>
-
- * pinfo.cc (winpids:add): New method.
- (winpids::enumNT): New method renamed from EnumProcessesNT.
- Use add method to add elements to the lists.
- (winpids::enum9x): New method renamed from EnumProcesses9x.
- Use add method to add elements to the lists.
- (winpids::enum_init): Accept 'winpid' parameter to control whether
- to add all windows pids to the list.
- (winpids::release): New method.
- * pinfo.h (winpids): Reflect above changes.
- * signal.cc (kill_pgrp): Ditto.
- * external.cc (fillout_pinfo): Ditto.
-
-Sat Nov 4 22:07:03 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (handle_sigsuspend): Record frame here for signalling.
- (set_process_mask): Ditto.
-
-Sat Nov 4 14:24:10 2000 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc (wait_subproc): Still more debugging cleanup.
-
-Sat Nov 4 00:51:38 2000 Christopher Faylor <cgf@cygnus.com>
-
- * pinfo.cc (EnumProcessesNT): Avoid 0 pids.
- (EnumProcesses9x): Ditto.
- * sigproc.cc (remove_child): Eliminate.
- (proc_subproc): Move remove_child stuff here.
- (wait_subproc): Synchronize with proc_subproc when error occurs. Add
- more debugging info.
- * sigproc.h (procstuff): Add an entry.
- * spawn.cc (spawn_guts): Add sigframe here.
-
-Fri Nov 3 20:07:14 2000 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc (wait_subproc): Refine debug output.
-
-Thu Nov 2 23:01:20 2000 Christopher Faylor <cgf@cygnus.com>
-
- * pinfo.cc (pinfo::init): Reverse order of setting status and pid info
- in an execed process to avoid a race.
- * sigproc.cc (wait_subproc): Print more info when a WFSO error occurs.
- * automode.c: New file.
- * syscalls.cc (close_all_files): Streamline slightly.
- * cygheap.cc (ccalloc): Clear *entire* allocated array.
-
-Thu Nov 2 01:58:03 2000 Christopher Faylor <cgf@cygnus.com>
-
- * ntdll.h: Remove IO_COUNTERS definition since it is now in winnt.h.
-
-Thu Nov 2 00:10:23 2000 Christopher Faylor <cgf@cygnus.com>
-
- * pinfo.cc (EnumProcessesNT): New function. Eliminates dependence on
- psapi.h.
- (EnumProcesses9x): Rename from EnumProcessesW95. Change arguments to
- be more useful for cygwin.
- (winpids::init): Accommodate argument changes.
- (enum_init): Ditto.
- * pinfo.h (winpids): Make pidlist dynamically extendable by storing it
- as a pointer and remembering the size.
- * ntdll.h: Add extra definitions needed for EnumProcessesNT. Reformat
- via 'indent'.
-
-Wed Nov 1 21:08:23 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (interruptible): Remove obsolete tests.
- (sigreturn): Construct pseudo-frame-pointer so that signal handler can
- figure out where to put return address when signals are coming in
- quickly.
- * path.cc (cwdstuff::get): Allow length 0 buffer length when buffer
- when NULL.
-
-Tue Oct 31 18:12:56 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.h (has_exec_chars): Standard function for checking for
- executable magic numbers.
- * path.cc (symlink_info::check): Use the above function.
- * fhandler.cc (fhandler_disk_file::open): Ditto.
-
-Tue Oct 31 17:57:52 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (_readlink): Return ENOENT when file does not exist.
-
-Tue Oct 31 23:35:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_dev_raw): Add method `fixup_after_exec'.
-
-Tue Oct 31 22:39:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_dev_raw): Add definition for method
- `fixup_after_fork'.
- * fhandler_raw.cc (fhandler_dev_raw::fhandler_dev_raw): Add
- `set_need_fixup_after_fork' call.
- (fhandler_dev_raw::~fhandler_dev_raw): Revert to user space
- allocation.
- (fhandler_dev_raw::open): Ditto.
- (fhandler_dev_raw::dup): Ditto. Reset buffer pointer.
- (fhandler_dev_raw::fixup_after_fork): New function.
- * fhandler_tape.cc (fhandler_dev_tape::open): Revert to user space
- memory allocation.
- (fhandler_dev_tape::ioctl): Ditto. Change behaviour on MTSETBLK when
- new size is 1.
-
-Tue Oct 31 20:56:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_tape.cc (fhandler_dev_tape::open): Fix memory allocation.
- Use Cygwin heap instead of user heap.
- (fhandler_dev_tape::ioctl): Ditto.
-
-Tue Oct 31 12:00:06 2000 Christopher Faylor <cgf@cygnus.com>
-
- * pinfo.cc (enum_init): Don't suffer silently if we can't load the
- process enumerators.
-
-Mon Oct 30 16:54:26 2000 Christopher Faylor <cgf@cygnus.com>
-
- * signal.cc (kill_pgrp): Revert 25-Oct change.
- (kill_worker): Ditto.
-
-Sun Oct 29 20:52:31 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/cygwin/version.h: Bump DLL minor version number to 6.
-
-Sat Oct 28 01:39:53 2000 Christopher Faylor <cgf@cygnus.com>
-
- * configure.in: Eliminate subdir stuff.
- * configure: Regenerate.
- * include/getopt.h (option): Make name field 'const'.
-
-Fri Oct 27 20:51:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc: New file keeping all autoload stuff.
- * Makefile.in: Add autoload.o to dependencies.
- * dcrt0.cc: Move all autoload stuff to autoload.cc.
- * fhandler_mem.cc: Ditto.
- * net.cc: Ditto.
- * uinfo.cc: Ditto.
-
-Fri Oct 27 11:37:20 2000 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc (wait_sig): Add braces to avoid confusion.
-
-Fri Oct 27 11:48:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc: New file.
- * Makefile.in: Add fhandler_socket.o to dependencies.
- * fhandler.h: Change comment.
- * net.cc Move all fhandler_socket methods to fhandler_socket.cc.
- * winsup.h: Add declaration for `ws2_32_handle'.
-
-Thu Oct 26 11:51:59 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * dtable.cc (dtable::release): Check for socket. Change
- cnt_need_fixup_before accordingly.
- (dtable::dup2): Ditto.
- (dtable::fixup_before_fork): New method.
- (dtable::fixup_before_exec): Ditto.
- * dtable.h (class dtable): Add member `cnt_need_fixup_before'. Add
- definition for methods `dec_need_fixup_before', `inc_need_fixup_before',
- `need_fixup_before', `fixup_before_exec' and `fixup_before_fork'.
- * fhandler.h (class fhandler_base): Slight rearrangements. Add
- definitions for methods `fixup_before_fork_exec'.
- (class fhandler_socket): Eliminate superfluous constructor.
- Add member `prot_info_ptr'. Add destructor. Add definitions for
- methods `dup', `fixup_before_fork_exec', `fixup_after_fork' and
- `fixup_after_exec'.
- * fork.cc (fork_parent): Care for file types which need a fixup
- before fork. Start child in suspended state then.
- * net.cc: New global variable `ws2_32_handle' and `wsadata'.
- (fdsock): Check for Winsock version. Call `set_socket_inheritance'
- only if Winsock version < 2.0. Care for `need_fixup' count in fdtab.
- (cygwin_socket): Eliminate call to `set_socket_inheritance'.
- (cygwin_accept): Ditto.
- (cygwin_rcmd): Ditto.
- (cygwin_rresvport): Ditto.
- (cygwin_rexec): Ditto.
- (socketpair): Ditto.
- (fhandler_socket::fhandler_socket): Set `need_fork_fixup'. Allocate
- space for the WSAPROTOCOL_INFOA struct used in fixup.
- (fhandler_socket::~fhandler_socket): New destructor.
- (fhandler_socket::fixup_before_fork_exec): New method.
- (fhandler_socket::fixup_after_fork): Ditto.
- (fhandler_socket::dup): Ditto.
- (wsock_init): New static function.
- (LoadDLLinitfunc (wsock32)): Rearranged.
- (LoadDLLinitfunc (ws2_32)): New function.
- (dummy_autoload): Add autoload statemants for `WSADuplicateSocketA'
- and `WSASocketA'.
- * spawn.cc (spawn_guts): Care for file types which need a fixup
- before exec. Start child in suspended state then.
-
-Wed Oct 25 20:49:59 2000 Christopher Faylor <cgf@cygnus.com>
-
- * signal.cc (kill_pgrp): Don't limit sending of signals to stopped
- processes when sig < 0.
- (kill_worker): Only send SIGCONT to stopped processes when sendSIGCONT.
-
-Wed Oct 25 13:56:39 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (sig_handle): Just make sure that wait_sig loops when
- receiving a SIGCONT. Don't block waiting for completion that will
- never occur.
-
-Wed Oct 25 09:59:14 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dtable.cc (dtable::fixup_after_exec): Use variable rather than
- constantly indexing into fds array.
- (dtable::fixup_after_fork): Ditto.
-
-Wed Oct 25 10:43:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::fcntl): Treat O_NONBLOCK and OLD_O_NDELAY
- as exactly the same. If one is set, both are set.
- * net.cc (fhandler_socket::fcntl): Ditto.
-
-Tue Oct 24 23:58:35 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (do_exit): Remove debugging statement.
-
-Tue Oct 24 23:45:09 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (do_exit): Don't bother looking for pgrp children to send
- SIGHUP if process has never created any children.
- * fork.cc (fork): Set flag indicating that there is another process
- with our process group.
- * spawn.cc (spawn_guts): Ditto.
- * pinfo.h (set_has_pgid_children): New methods for setting when process
- has children in its process group.
- * syscalls.cc (setpgid): Clear has_gid_children if pgid changes.
-
-Tue Oct 24 20:38:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * ntdll.h: New file.
- * fhandler_mem.cc: Move ntdll.dll specific definitions and
- declarations to ntdll.h.
- * sysconf.cc (sysconf): Add support for _SC_NPROCESSORS_CONF,
- _SC_NPROCESSORS_ONLN, _SC_PHYS_PAGES and _SC_AVPHYS_PAGES.
-
-Tue Oct 24 20:00:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::fcntl): Behave properly when passed
- previous version of O_NDELAY.
- * syscalls.cc: Move OLD_O_NDELAY to winsup.h.
- * winsup.h: Define OLD_O_NDELAY now.
-
-Mon Oct 23 21:47:55 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (signal_exit): Kill any executing child process if
- we're dying.
- * path.h: Remove unneeded extern.
- * spawn.cc (std_suffixes): Make static. Don't set dwProcessId here
- since it makes the process unsignalable. Set strace flag that this is
- an execed process stub.
- * strace.cc (strace::vsprntf): Use strace flag to indicate when to
- visually flag that this is an exec stub.
- * include/sys/strace.h (strace): Add 'execing' flag.
-
-Mon Oct 23 16:43:33 2000 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc (proc_subproc): Don't send a false positive if WNOHANG and
- no processes are available for waiting.
-
-Mon Oct 23 22:27:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::fcntl): Setting flags in F_SETFL
- branch according to Linux documentation.
-
-Mon Oct 23 21:43:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fcntl.cc (_fcntl): Rearrange as wrapper function. Move all
- functionality except F_DUPFD to fhandler classes.
- * fhandler.cc (fhandler_base::fcntl): New method.
- * net.cc (fhandler_socket::fcntl): Ditto.
- * fhandler.h (class fhandler_base): Add method prototype for fcntl().
- (class fhandler_socket): Ditto.
-
-Mon Oct 23 12:44:35 2000 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc (proc_subproc): Correctly handle flags for WNOHANG case.
-
-Mon Oct 23 10:00:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc: Eliminate C++ comments throughout.
-
-Sun Oct 22 23:33:00 2000 Christopher Faylor <cgf@cygnus.com>
-
- * fork.cc (fork): Set sigframe here, since it can pause for a
- considerable amount of time.
- * environ.cc (_addenv): Add debugging.
- * fhandler.cc: Eliminate unneeded include.
- * smallprint.c: Ditto.
-
-Sun Oct 22 12:07:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * pinfo.cc (pinfo_init): Eliminate call to `set_process_privileges'.
- * security.cc (write_sd): Call `set_process_privileges' on the first
- call to `write_sd'.
- (set_process_privileges): Eliminate adjusting SE_BACKUP_NAME privilege.
-
-Sat Oct 21 16:57:23 2000 Christopher Faylor <cgf@cygnus.com>
-
- * pinfo.cc (pinfo::init): Make PID_EXECED signal creation as well as
- PID_IN_USE.
-
-Sat Oct 21 01:52:54 2000 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (spawn_guts): Don't do the reparenting step if we notice
- that the child has exited prior to sending the subprocess_ready signal
- (?).
-
-Sat Oct 21 00:46:36 2000 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h (fhandler_console): Remove tcsetpgrp.
- * fhandler_console.cc (fhandler_console::tcsetpgrp): Eliminate.
- * fork.cc (fork_parent): Avoid returning same pid twice in a row
- regardless of OS.
- * pinfo.cc (pinfo::init): Rename create argument to flags and treat it
- as such.
- * signal.cc (set_sigcatchers): New function.
- (signal): Use set_sigcatchers to increment or decrement sigcatcher
- tracker.
- (sigaction): Ditto. Add debugging output.
- * spawn.cc (spawn_guts): Always quote first argv[0] argument when it's
- a COMSPEC shell.
-
-2000-10-20 DJ Delorie <dj@redhat.com>
-
- * times.cc (to_time_t): pass zero time as epoch
- * fhandler.cc (fstat): copy atime/ctime from mtime if they're zero
-
-Thu Oct 19 23:31:41 2000 Christopher Faylor <cgf@cygnus.com>
-
- * external.cc (fillout_pinfo): Pass PID_NOREDIR flag to pinfo init to
- avoid finding execed processes twice.
- * signal.cc (kill_pgrp): Ditto.
- * spawn.cc (spawn_guts): Avoid passing first argument to CreateProcess
- when running a windows shell so that CreateProcess will locate the
- shell. Reorganize so that correct error is returned when CreateProcess
- fails.
-
-Thu Oct 19 13:55:31 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (sigthread::init): Correct overzealous ifdef.
- * exceptions.cc (call_handler): Avoid calling sigthread acquire lock.
- * sigproc.h (sigthread): Comment out lock for now.
- * sync.cc (muto::acquire): Add a minor optimization.
-
-2000-10-18 DJ Delorie <dj@redhat.com>
-
- * Makefile.in: add miscfuncs.cc
- * miscfuncs.cc: new, miscellaneous functions
- * winsup.h: define table-driven tolower/toupper
- * environ.cc: use them
- * fhandler_console.cc: ditto
- * fhandler_termios: ditto
- * path.cc: ditto
- (strncasematch, strcasematch, strcasestr): move to miscfuncs.cc
-
-Wed Oct 18 20:50:27 2000 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.h (sigthread): Eliminate locking for now since per thread
- signalling is not available.
- * dcrt0.cc (sigthread::init): Ditto.
- (dll_crt0_1): Move set_process_privileges call (temporarily?) to
- pinfo_init.
- (pinfo_init): Only call set_process_privileges when allow_ntsec.
-
-2000-10-18 DJ Delorie <dj@redhat.com>
-
- * dcrt0.cc (dll_crt0_1): init cygcwd before forkee branch
-
- * environ.cc (conv_start_chars): Cache a table of "first
- characters" for environment variables needing conversion.
- (getwinenv): Use it.
- (environ_init): Create it, also check first chars for TERM and
- CYGWIN.
-
- * path.cc: Use lookup table for case insensitive comparisons.
-
-Wed Oct 18 00:48:49 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (call_handler): Make signal pending if sigsave.sig is
- still active.
- * syscalls.cc (_read): Don't clear errno.
- * sigproc.cc (wait_sig): Don't scan the waiting process list after a
- SIGCHLD if there are no zombies to reap.
- * winsup.h: Use __builtin_strcmp.
- * environ.cc (posify): Don't initialize len unless it is required
- (from DJ Delorie <dj@redhat.com>).
-
-Tue Oct 17 14:50:31 2000 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc (proc_subproc): Remove unneeded test for correct process
- in PROC_ADDCHILD. Return 0 when terminated child has just been
- reparented.
- (wait_subproc): Only send SIGCHLD when proc_subproc returns != 0.
- * strace.cc (strace::vsprntf): Only strip .exe extension from program
- name.
-
-2000-10-16 Charles Wilson <cwilson@ece.gatech.edu>
-
- * fhandler_clipboard.cc: new file
- * Makefile.in: include fhandler_clipboard.o in DLL_OFILES list.
- * fhandler.h: add FH_CLIPBOARD to the devices enum.
- (fhandler_dev_clipboard): new
- * path.cc (windows_device_names): add "\\dev\\clipboard"
- (get_device_number): check for "clipboard"
- * dcrt0.cc: declare a few more functions from winuser.h
- * dtable.cc (dtable::build_fhandler): check for FH_CLIPBOARD in
- switch().
-
-Mon Oct 16 21:36:57 2000 Christopher Faylor <cgf@cygnus.com>
-
- * debug.cc (add_handle): Issue warning on attempts to add the same
- handle more than once.
- * fhandler_tty.cc (fhandler_tty_slave::open): Protect some handles.
- (fhandler_tty_common::close): Use proper name when closing handles.
- (fhandler_pty_master::close): Don't close to_slave or from_slave since
- they've already been closed earlier in the function.
- * sigproc.cc (proc_subproc): Don't protect vchild->hProcess. Expect
- that the caller will do this, instead.
- * tty.cc (tty_list::terminate): Use proper name when closing handles.
- (tty::make_pipes): Protect some handles.
-
-Mon Oct 16 18:37:22 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Remove some obsolete stuff.
- * dcrt0.cc (dll_crt0_1): Call signal_fixup_after_exec where appropriate.
- Set myself->uid from parent version.
- Just use ThreadItem Init method. Close or store hexec_proc as appropriate.
- (_dll_crt0): Store user_data->forkee here so that proper tests can be made
- subsequently.
- (do_exit): Remove hExeced stuff.
- * environ.cc (environ_init): Accept environ count as well as environ pointer.
- * environ.h: Reflect above change.
- * pinfo.cc (pinfo_init): Ditto. Accept environ count.
- (fixup_in_spawned_child): Remove.
- * spawn.cc (spawn_guts): Move signal code to dll_crt0_1. Don't suspend
- execing process since it is no longer necessary. Store envc.
- * exceptions.cc (signal_fixup_after_exec): New function.
- (call_handler): Remove hExeced test.
- * child_info.h (cygheap_exec_info): Store envc as well as envp.
- (child_info_spawn): Store hexec_proc so that it can be closed in child.
- * path.cc (normalize_posix_path): Avoid intermediate use of temporary cwd buf.
- (normalize_win32_path): Ditto.
- (cwdstuff::get_initial): Always set lock.
- * sigproc.h: Remove hExeced.
- * strace.cc (strace::vsprntf): Modify to accommodate for lack of hExeced.
- * thread.cc (MTinterface::Init): Merge Init1 and ClearReent into this method.
- (MTinterface::Init1): Eliminate.
- (MTinterface::ClearReent): Eliminate.
- * thread.h: Reflect above changes.
- * include/sys/strace.h (strace): Make microseconds() public.
-
-Sun Oct 15 21:54:52 2000 Christopher Faylor <cgf@cygnus.com>
-
- Make various functions 'regparm', throughout.
- * pinfo.h (_pinfo): Inline simple signal manipulation functions.
- Requires inclusion of thread.h which was removed from .cc files, where
- appropriate. throughout.
- * pinfo.cc: Eliminate signal manipulation functions.
- (_pinfo::exit): Calculate total rusage for exiting process here.
- * cygheap.cc (size2bucket): Eliminate.
- (init_buckets): Ditto.
- (_cmalloc): Calculate size and bits in a loop rather than going through
- a function call.
- (_crealloc): Use stored array index to calculate allocated size.
- * spawn.cc (spawn_guts): Use _pinfo exit method to exit, calculating
- cpu usage.
-
-Sat Oct 14 21:24:16 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (set_console_handler): Don't allocate
- console_handler_thread_waiter. It is obsolete.
- (ctrl_c_handler): Don't use console_handler_thread_waiter.
- * path.cc (hash_path_name): Fix handling of relative names. Make case
- insensitive.
- * path.h (suffix_info): Use initializers.
- * pinfo.h (_pinfo): Avoid initializers for null case.
- * resource.cc (fill_rusage): Zero rest of rusage structure.
- * security.cc (set_process_privileges): Don't reopen parent process.
- Just use hMainProc.
- * signal.cc (signal): Track when a signal handler has been used.
- (sigaction): Ditto.
- * sigproc.cc (pchildren): Use default initializer.
- (zombies): Ditto.
- (sigproc_terminate): Avoid closing handles that will be closed on exit
- anyway.
- (wait_sig): Send signal to "parent" on EXECing, not FORKing.
- (wait_subproc): Send SIGCHLD here rather than in proc_wait to avoid
- potential muto conflicts.
- * sigproc.h (sigthread): Don't initialize to zero. It's the default.
- * spawn.cc (spawn_guts): Fill in resources from exec parent prior to
- termination.
- * sync.h (muto): Don't initialize to zero.
- * syscalls.cc (close_all_files): Use one lock around entire loop and
- call fhandler close/release stuff directly.
- (_read): Don't use ready_for_read if there are not signal handlers
- active.
-
-Sat Oct 14 12:24:24 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (dll_crt0_1): Fix display of "title".
- (do_exit): Use pinfo exit method to exit.
- (__api_fatal): Ditto.
- * exceptions.cc (signal_exit): Ditto.
- * fork.cc (fork_child): Remove debugging stuff. Use pinfo_fixup_after
- fork in place of exec_fixup_after_fork.
- * pinfo.cc (pinfo_fixup_after_fork): New method.
- (pinfo_fixup_in_spawned_child): Ditto.
- (_pinfo::exit): New method.
- (_pinfo::init): Remove recursion. Detect pathological case where pinfo
- structure already exists for new pid.
- * pinfo.h (_pinfo): Reorganize slightly. Add new method and new
- function declarations.
- * sigproc.cc (proc_exists): Previous simplification was a little to
- simple. Try harder to detect if a process exists.
- (proc_terminate): Use PID_EXITED setting to determine if process is
- still around.
- (WFSO): Remove debugging statement.
- (WFMO): Ditto.
- * spawn.cc (exec_fixup_after_fork): Eliminate.
- (spawn_guts): Always set old_title to NULL. Is it really needed? Move
- hexec_proc to pinfo.cc. Call pinfo_fixup_in_spawned_child to eliminate
- handle link after a spawn.
- * include/sys/cygwin.h: Remove PID_NOT_IN_USE. Add PID_EXITED.
-
-Sat Oct 14 10:54:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Add symbol hstrerror.
- * net.cc: Change meaning of member `s' of struct host_errmap.
- (set_host_errno): Fix error in loop condition.
- (hstrerror): Ditto.
- (herror): Add appropriate functionality.
- * include/netdb.h: Add declaration of hstrerror.
- * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 29.
-
-Sat Oct 14 01:45:25 2000 Christopher Faylor <cgf@cygnus.com>
-
- * cygheap.cc (cygheap_fixup_in_child): Don't page round cygheap copied
- from parent.
- * dcrt0.cc (do_exit): Don't cleanup pinfo on exit. That happens
- automatically now.
- * exceptions.cc (signal_exit): Ditto.
- * fork.cc (fork_parent): Use stack_here value passed in from fork().
- (fork): Figure out top of stack here and pass it to fork_parent.
- * pinfo.cc (_pinfo::record_death): Eliminate.
- * pinfo.h (_pinfo): Ditto.
- * sigproc.cc (proc_exists): Simplify.
- (proc_terminate): Ditto.
- (remove_zombie): Don't cleanup pinfo stuff.
- (wait_sig): Send subproc_ready signal whether execed or spawned.
- * spawn.cc (spawn_guts): Always create subproc_ready event. Use it for
- both exec and spawn.
- (_spawnve): Send proper mode to spawn_guts when mode != _P_OVERLAY.
-
-Thu Oct 12 23:11:05 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dtable.cc (dtable::fixup_after_fork): Revert thinko below.
- * pinfo.cc (set_myself): Show pid in initial strace line.
-
-Thu Oct 12 17:58:03 2000 Christopher Faylor <cgf@cygnus.com>
-
- * child_info: Bump child_info "version".
- (child_info): Move some fields from child_info_spawn to here.
- * cygheap.cc: Make cygheap pointers NOCOPY.
- * dcrt0.cc (dll_crt0_1): Copy cygwin heap here regardless of whether
- we've been forked or execed.
- * dtable.cc (dtable::fixup_after_fork): Just release close-on-exec fds.
- * exceptions.cc (stackdump): Respond to C warning.
- * fork.cc: Reorganize to minimize stack copying.
- (fork_child): New function.
- (fork_parent): Ditto.
- (sync_with_child): Don't suspend the forkee.
- (sync_with_parent): Ditto. Make into a function.
- * heap.cc (heap_init): Add some debugging output.
- * path.cc (path_conv::check): Add an assertion.
- (has_suffix): Ditto.
- * security.cc (get_pw_sid): Defend against NULL.
- * sigproc.cc (proc_subproc): Fix debugging output.
- (wait_sig): Ditto.
- * strace.cc: Make statics NO_COPY throughout.
- (strace::vsprntf): Defend against NULL.
-
-Thu Oct 12 00:25:29 2000 Christopher Faylor <cgf@cygnus.com>
-
- * errno.cc (seterrno_from_win_error): Fix debugging output.
- * fhandler.cc (fhandler_base::fstat): Move to inline method in
- fhandler.h.
- (fhandler_base::set_io_handle): Ditto.
- * fhandler.h (fhandler_base): Make some methods inline.
- * fhandler_console.cc (fhandler_console::write_normal): Make buffer
- larger.
- * sigproc.h (sigframe::sigframe): Actually use set ebp parameter
- correctly.
- * spawn.cc (spawn_guts): Set dwProcessId when exec'ing. Just exit
- immediately after reparenting.
- * syscalls.cc: Sprinkle sigframe stuff throughout.
- * wait.cc (wait4): Set signal frame here.
-
-Tue Oct 10 19:54:06 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (__api_fatal): Don't rely on small_printf to display errors.
- Always display problems to the console, if possible.
-
-Tue Oct 10 15:21:10 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (cwdstuff::get): Set EINVAL when length is zero.
-
-Mon Oct 9 14:07:04 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (mount_info::cygdrive_posix_path): Handle e:foo construction
- correctly.
-
-Mon Oct 9 16:44:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_mem.cc (fhandler_dev_mem::fhandler_dev_mem):
- Fix debug output.
-
-Mon Oct 9 15:58:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_mem.cc: Eliminate unused include statements.
- (fhandler_dev_mem::fhandler_dev_mem): Check for 9X/ME.
-
-Mon Oct 9 15:11:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_dev_mem): Erase member `init_phase' and
- member function `init'.
- * fhandler_mem.cc: Add typedefs for NT internal data types
- `SYSTEM_INFORMATION_CLASS' and `SYSTEM_BASIC_INFORMATION'.
- Add prototype for `NtQuerySystemInformation' function.
- (fhandler_dev_mem::fhandler_dev_mem): Takes over initialization task
- from `init'. Use `NtQuerySystemInformation' function to evaluate the
- size of physical memory instead of interval search.
- (fhandler_dev_mem::init): Eliminated.
- (fhandler_dev_mem::open): Don't call `init'.
- (fhandler_dev_mem::read): Eliminate check for `init_phase'.
- (dummy_autoload): Add load statement for `NtQuerySystemInformation'.
-
-Sun Oct 8 22:38:40 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dtable.cc (set_std_handle): Use std_consts array to control
- SetStdHandle settings.
- (dtable::fixup_after_fork): Ditto.
- * exceptions.cc (set_sig_errno): Remove some debugging output.
- * path.cc (path_conv::check): Don't OR need_directory with flags sent
- to symlink_info::check.
- (symlink_info::check): Use PATH_ALL_EXEC to determine when a file is
- executable.
- * path.h (path_types): Add PATH_ALL_EXEC.
- (isexec): Use PATH_ALL_EXEC so that cygexec types will be considered
- executable.
- * pinfo.h (_pinfo): Add a process handle that is kept open throughout
- the life of a cygwin pid.
- * sigproc.cc (proc_exists): Remove hopefully obsolete stuff.
- (proc_subproc): Set up process handle that is kept open throughout the
- life of a cygwin pid. Reorganize PROC_WAIT stuff to use common code.
- (proc_terminate): Close pid lifetime process handle.
- (checkstate): Cleanup.
- (stopped_or_terminated): Move zombie cleanup.
- (remove_zombie): To here.
- * spawn.cc (spawn_guts): Reorganize reparenting code for 1247th time.
-
-Sat Oct 7 13:59:15 2000 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h (fhandler_base): Remove obsolete _rpos and _rsize
- elements.
- * fhandler.cc (fhandler_base::open): Ditto.
- * fhandler.cc (fhandler_base::fhandler_base): Ditto.
- (fhandler_base::read): Ditto. Add more debugging output. Don't issue
- a \r when \r\n detected.
- * pipe.cc (make_pipe): Streamline slightly. Make debug output more
- interesting.
- * strace.cc (strace::vsprintf): Use __progname where appropriate to
- distinguish strace output when exec'ing.
-
-Sat Oct 7 19:25:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_dev_mem): Add methods mmap, munmap and msync.
- Add `unit' member.
- * fhandler_mem.cc (fhandler_dev_mem): Initialize `unit' as well.
- (init): Care for differences between /dev/mem, /dev/kmem (not
- implemented yet) and /dev/port.
- (open): Change debug message to reflect the device.
- (mmap): New function.
- (munmap): Ditto.
- (msync): Ditto.
- (fstat): Use unit when setting st_dev in stat structure.
- * mmap.cc (mmap): Handle MAP_ANONYMOUS flag.
- Change error handling slightly.
- * path.cc (get_device_number): Handle /dev/port.
-
-Fri Oct 6 23:21:29 2000 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (_read): Behave properly when passed previous version of
- O_NDELAY. Fix up debugging output.
-
-Thu Oct 5 20:34:48 2000 Christopher Faylor <cgf@cygnus.com>
-
- * net.cc (set_socket_inheritance): Rename from duplicate_socket. Use
- NT specific call when appropriate.
- (__set_winsock_errno): Rename from set_winsock_errno. Accept function
- and line as arguments.
- * path.cc (path_conv::check): Continue the neverending battle to make
- cygwin properly understand that path specs ending in a slash require
- that the path refer to a directory. Windows does not do this by
- default.
- (symlink_info::check): Remove ENOTDIR test. Move it to
- path_conv::check.
- * path.h: Remove obsolete constant.
- * winsup.h (set_winsock_errno): New macro.
-
-Thu Oct 5 14:58:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h: Add mmap(), munmap() and msync() to fhandler_base
- and fhandler_disk_file.
- * mmem.cc (mmap): Eliminated device dependent implementation details.
- These are moved to the appropriate fhandler class.
- (munmap): Ditto.
- (msync): Ditto.
- (fhandler_base::mmap): New method.
- (fhandler_base::munmap): Ditto.
- (fhandler_base::msync): Ditto.
- (fhandler_disk_file::mmap): Ditto.
- (fhandler_disk_file::munmap): Ditto.
- (fhandler_disk_file::msync): Ditto.
-
-Thu Oct 5 01:52:43 2000 Christopher Faylor <cgf@cygnus.com>
-
- * net.cc: General cleanup.
- (fdsock): Return pointer to created fhandler_socket.
- (cygwin_socket): Use pointer returned by fdsock. Return correct errno
- when fd < 0.
-
-Thu Oct 5 00:48:40 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (interruptible): Add extra debugging.
- * sigproc.h (wait_sig): Fill in frame pointer, by default, prior to
- calling or suffer confusion due to September 7 change below.
-
-Wed Oct 4 23:10:27 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/netinet/tcp.h: Remove winsock.h include.
- * include/sys/cygwin.h: Move windows specific reference within
- conditional.
-
-Thu Oct 5 1:13:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/sys/mman.h: Add missing MAP_FAILED macro.
-
-Wed Oct 4 18:48:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_dev_mem): Add method `init'. Add members
- `mem_size' and `init_phase'.
- * fhandler_mem.cc (init): New function to figure out the size of
- the physical memory.
- (open): Add checking for illegal flags. Change usage of access mode.
- (write): Add intended functionality.
- (read): Add parameter checking. Eliminate page size constant. Use
- getpagesize() instead. Don't touch errno and don't create debug output
- while init() is running.
- (lseek): Add bounds checking. Fix SEEK_END.
- (fstat): Eliminate page size constant. Use getpagesize() instead.
- (dup): Add intended functionality.
-
-Mon Oct 2 22:15:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc: Add LoadDLLFunc statement for RegEnumValueA().
- * net.cc: Change comments related to get_ifconf.
- (get_2k_ifconf): Eliminate `type' variable. Eliminate `sa' parameter.
- (get_nt_ifconf): Ditto.
- (get_9x_ifconf): Ditto. Rewritten.
- (get_ifconf): Change calls to OS specific functions.
-
-Mon Oct 2 15:15:01 2000 Christopher Faylor <cgf@cygnus.com>
-
- * signal.cc (sigaction): Allow new action == oldaction.
-
-Mon Oct 2 11:05:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_mem.cc: Load ntdll functions via autoload method.
- (load_ntdll_funcs): Eliminated.
-
-Sun Oct 1 16:36:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_mem.cc (load_ntdll_funcs): Add missing __stdcall qualifiers.
-
-Sun Oct 1 22:20:39 2000 Christopher Faylor <cgf@cygnus.com>
-
- * cygheap.cc (cygheap_init): Born again function.
- (_cmalloc): Reorganize to accommodate muto locking.
- (_cfree): Use muto lock to avoid multi-thread problems.
- * cygheap.h (incygheap): Just use cygheap_max to find upper cygwin heap
- bounds.
- * dcrt0.cc (dll_crt0_1): Reinstitute cygheap_init call.
- * path.cc (getcwd): Just return cwdstuff::get result, allowing correct
- handling of negative length.
- (cwdstuff::get): Malloc a buffer if one is not available.
-
-Sun Oct 1 2:56:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in: Add fhandler_mem.o to the dependencies.
- * dtable.cc (dtable::build_fhandler): Add case for FH_MEM.
- * fhandler.h: Add FH_MEM device type. Add class fhandler_dev_mem.
- * fhandler_mem.cc: New file. Implementation of class fhandler_dev_mem.
- * path.cc: Add /dev/mem to windows_device_names.
- (get_device_number): Add FH_MEM type.
-
-Sat Sep 30 00:43:42 2000 Christopher Faylor <cgf@cygnus.com>
-
- * cygheap.cc (init_cheap): Set aside space for heap walk pointer.
- (_csbrk): Make logic for detecting when to alloc cognizant of
- initialization condition.
- (_cmalloc): Use a structure to hold bucket size and heap chain pointer.
- Store pointer to next freed block in bucket size location so that it
- will be easy to see if a block is allocated.
- (_cfree): Store pointer to next freed block in bucket size location.
- (_crealloc): Use macro to retrieve bucket size.
- (cygheap_init): Eliminate.
- (cygheap_fixup_in_child): Add second argument to determine if we were
- execed or not. In execed case, walk the heap, cleaning up any orphaned
- blocks.
- * cygheap.h: Add a "MAX" value to cygheap_types. Remove cygheap_init
- declaration. Accommodate new argument to cygheap_fixup_in child.
- * fork.cc (fork): Accommodate extra argument to cygheap_fixup_in_child.
- * dcrt0.cc (dll_crt0_1): Ditto. Remove call to cygheap_init.
-
-Fri Sep 29 21:49:27 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (symlink_info::check): Set executable bit for a file if the
- first two characters are 'MZ' to mirror spawn_guts check.
-
-Sat Sep 30 03:34:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.h: Add `winME' to os_type symbols.
- * dcrt0.cc (set_os_type): Identify Windows ME systems.
- * (host_dependent_constants::init): Care for winME.
- * uname.cc (uname): Ditto.
-
-Thu Sep 28 01:46:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (get_ifconf): Code cleanup. Split. Call os dependent
- subfunctions instead.
- (get_9x_ifconf): New function for 9X systems, called by get_ifconf.
- (get_nt_ifconf): New function for NT systems, called by get_ifconf.
- (get_2k_ifconf): New function for W2K systems, called by get_ifconf.
-
-Wed Sep 27 01:10:07 2000 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (spawn_guts): Attempt to accommodate archaic windows quoting
- mechanism when dealing with '\' and '"'.
-
-Mon Sep 25 20:47:04 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (quoted): Fix problem where ' quoted strings were skipped.
- * fhandler.h (fhandler_socket::~fhandler_socket): Delete declaration.
- * net.cc: Remove unnecessary "number_of_sockets" usage.
- (fhandler_socket::fhandler_socket): Ditto.
- (fhandler_socket::~fhandler_socket): Delete definition.
- * spawn.cc (spawn_guts): Force first argument passed to CreateProcess
- as a command line to be windows style.
-
-2000-09-25 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (av::dup_maybe): Make function void rather than void *.
- * environ.cc (environ_init): Remember to reparse CYGWIN if envp is
- supplied.
- * heap.cc (_sbrk): Remember frame for signal handling.
- * syscalls.cc (read_handler): Eliminate.
- (_read): Move read_handler code here. Reorganize for one path through
- 'ready_for_read'.
-
-Tue Sep 19 09:46:36 2000 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (spawn_guts): Use actual program argument passed in for
- argv[0] as originally suggested by Kazuhiro Fujieda
- <fujieda@jaist.ac.jp>.
-
-Mon Sep 18 23:17:19 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.h: Create new input path flag PATH_NEEDDIR.
- * path.cc (path::check): Detect trailing slash before converting to
- windows path. Tell symlink_info::check to check for directory if one is
- found.
- (symlink_info::check): Set errno when path is not a directory if
- pflags & PATH_NEEDDIR.
-
-Mon Sep 18 19:44:08 2000 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_tty.cc (fhandler_tty_slave::write): Correct typo which
- caused resetting of windows error to ERROR_IO_DEVICE to be ignored.
-
-Mon Sep 18 17:15:37 2000 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * path.cc (mount_info::read_mounts): Don't delete mount entries of
- which mount points have the cygdrive prefix.
- * (mount_info::add_reg_mount): Properly catch errors on registry
- operations.
- * (mount_info::write_cygdrive_info_to_registry): Ditto.
- * (mount_info::del_reg_mount): Cosmetic changes to be consistent
- with other methods.
- * (mount_info::add_item): Check arguments more precisely.
- Increment nmounts only when registry operations succeed.
-
-Sun Sep 17 22:18:39 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (interruptible): Return 0 if given an address in
- uncommitted memory.
-
-2000-09-16 Egor Duda <deo@logos-m.ru>
-
- * signal.cc (sleep): If interrupted by signal, return the
- requested time minus the time actually slept.
-
-Fri Sep 15 22:30:40 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (handle_exceptions): Just "core dump" if SIGSEGV in
- signal thread.
- * external.cc (fillout_pinfo): Fix compiler warning.
- * sigproc.h: Eliminate special asm naming for sig_dispatch_pending.
- * sigproc.cc (sig_send): Remove debugging statements.
-
-Wed Sep 13 14:56:47 2000 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (av): Hide 'calloced' field and limit cstrduping to class
- methods only.
- (spawn_guts): Use methods for manipulating most newargv stuff.
-
-2000-09-13 Egor Duda <deo@logos-m.ru>
-
- * child_info.h (child_info_spawn::~child_info_spawn): Avoid
- memory leaks in cygheap.
- * spawn.cc (spawn_guts): Ditto.
-
-Wed Sep 13 14:28:03 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (quoted): Return next character after a quoted string when
- not doing special quote processing. Also ensure that non-NULL is
- returned in all circumstances.
-
-Wed Sep 13 10:26:16 2000 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (spawn_guts): Ensure that argv[0] is correctly set to the
- full path when a script is detected. Suggested by Kazuhiro Fujieda
- <fujieda@jaist.ac.jp>.
-
-Tue Sep 12 22:33:30 2000 Christopher Faylor <cgf@cygnus.com>
-
- * external.cc (fillout_pinfo): Handle explicit pids correctly.
-
-Tue Sep 12 14:37:32 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (normalize_posix_path): Fix more slashdot madness.
-
-Tue Sep 12 12:29:29 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Make clean target remove *.d.
-
-Mon Sep 11 13:19:15 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (normalize_posix_path): Correctly deal with a "." parameter.
-
-Sun Sep 10 20:23:35 2000 Christopher Faylor <cgf@cygnus.com>
-
- * cygheap.cc (init_cheap): Just use any old address for the cygwin
- heap.
- * exceptions.cc (signal_exit): Don't terminate the main thread. Just
- try to exit in this thread really quickly.
- * signal.cc (kill_pgrp): Fix typo which caused pinfo structure to be
- assigned incorrectly.
-
-Sun Sep 10 12:40:49 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (dll_crt0_1): Initialize thread and debug stuff before
- handling exec/fork.
- * dtable.cc (dtable::fixup_after_exec): Always clear out the read ahead
- buffer whether closing or adjusting.
- * path.cc (chdir): Avoid a compiler warning.
-
-Sat Sep 9 23:29:17 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (chdir): Use the full path for cwd_win32. Consider attempts
- to chdir to strings of dots > 2 to be an error. Pass 'dir' argument to
- cygcwd.set.
- (cwdstuff::set): Need to treat arguments from chdir differently.
- * path.h (cwdstuff): Add an argument to set.
-
-Fri Sep 8 11:50:09 2000 Christopher Faylor <cgf@cygnus.com>
-
- * lib/_cygwin_crt0_common.cc: Add missing header files.
-
-Thu Sep 7 23:07:21 2000 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.h (sigframe::set): Eliminate second argument. Default bp to
- current frame pointer rather than using this within the function, which
- is unstable when this method is not inlined.
- * net.cc: Eliminate use of second argument to sigframe.set throughout.
- * select.cc (cygwin_select): Ditto.
- * sigproc.cc (sig_send): Ditto.
-
-Thu Sep 7 22:45:16 2000 Christopher Faylor <cgf@cygnus.com>
-
- Break out more header info into separate files. Use appropriate
- header files throughout.
- * shared.h: Remove.
- * cygwin_version.h: New file.
- * delqueue.h: New file.
- * environ.h: New file.
- * host_dependent.h: New file.
- * perprocess.h: New file.
- * registry.h: New file.
- * security.h: New file.
-
-Thu Sep 7 12:14:43 2000 Christopher Faylor <cgf@cygnus.com>
-
- Split out tty and shared_info stuff into their own headers and use
- throughout. Include sys/termios.h for files which need it.
- * tty.h: New file.
- * shared_info.h: New file.
- * fhandler.h: Move inline methods that rely on tty stuff to
- fhandler_console.cc.
- * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Set
- output_done_event immediately after reading data to speed up tty output
- processing.
- (process_output): Set write_error to errno or zero.
- (fhandler_tty_slave::write): Check previous write error prior to
- writing to slave end of pipe. This allows tty output to be slightly
- less synchronous.
- * fhandler_console.cc (fhandler_console::tcsetpgrp): Moved here from
- fhandler.h.
- (fhandler_console::set_input_state): Ditto.
-
-Wed Sep 6 21:11:13 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (signal_exit): Reset all mutos owned by the main
- thread.
- * fhandler.h: Define *_output_mutex macros for serializing tty output.
- (fhandler_termios): Remove restart_output_event. Define dummy output
- mutex methods.
- (fhandler_pty_master): Remove unneeded fixup_after_fork method.
- * fhandler_termios.cc (fhandler_termios::line_edit): Acquire
- output_mutex when CTRL-S is hit. Release it on CTRL-Q.
- * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Remove
- inappropriate OutputStopped test here. Just use the output mutex.
- (fhandler_pty_master::fhandler_pty_master): Remove obsolete reference
- to restart_output_event.
- (fhandler_tty_common::close): Ditto.
- (fhandler_pty_master::set_close_on_exec): Ditto.
- (fhandler_pty_master::fixup_after_fork): Delete.
- * tty.cc (tty::common_init): Ditto.
- * sync.cc (muto::reset): New method.
- * sync.h: Declare above method.
-
-Wed Sep 6 16:56:38 2000 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc: Add include file for proper definitions.
- * spawn.cc: Ditto.
- * winsup.h: Define cfree to avoid newlib pollution.
-
-Wed Sep 6 14:11:51 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in (CFLAGS): Ensure that -MD is always added even when
- CFLAGS is overwritten.
-
-Wed Sep 6 02:40:12 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (cwdstuff::get_initial): Keep caching alive.
- (mount_info::conv_to_win32_path): Fill out relative path in failing
- case.
-
-Tue Sep 5 21:36:15 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (normalize_posix_path): Deal with error return from cygcwd.get.
- (normalize_win32_path): Ditto.
- (mount_info::conv_to_win32_path): Ditto.
- (cwdstuff::get): Set buf to NULL on error.
-
-Tue Sep 5 17:49:34 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (readlink): 'max' should be a 'min' or we'll suffer
- buffer overflow.
-
-Mon Sep 4 22:53:58 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (cwd_win32): Eliminate.
- (cwd_posix): Eliminate.
- (cwd_hash): Eliminate.
- (cwdstuff::init): Rename from cwd_init.
- (cwdstuff::fixup_after_exec): Rename from cwd_fixup_after_exec.
- (cwdstuff::get): Rename from get_cwd_inner.
- (normalize_posix_path): Eliminate cwd argument. Just calculate when
- necessary.
- (normalize_win32_path): Ditto.
- (mount_info::conv_to_win32_path): Eliminate cwd retrieval here.
- (mount_info::conv_to_posix_path): Ditto.
- (hash_path_name): Accommodate additional methods in cwdstuff.
- (get_cwd_win32): Eliminate.
- (getcwd): Use cwdstuff methods. Properly handle case where buf == NULL
- and len < 0.
- (cwdstuff::get_hash): New method.
- (cwdstuff::get_initial): New method.
- (cwdstuff::set): New method.
- (cwdstuff::get): New method.
- (cwdstuff::copy): New method.
- * path.h: Move cwdstuff struct here. Add a bunch of stuff to cwdstuff.
- Make cygcwd an extern.
- * spawn.cc (spawn_guts): Use copy method to get copies of cwd info to
- pass to execed process.
- * dcrt0.cc (dll_crt0_1): Use cygcwd methods for cwd initialization.
-
-2000-09-03 Egor Duda <deo@logos-m.ru>
-
- * path.cc (readlink): Check if buffer length is positive.
- Truncate output to buffer length. Don't terminate buffer
- with '\0'.
-
-Sun Sep 3 00:38:40 2000 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc (environ_init): Don't free the new environment table after
- we've just copied stuff to it.
-
-Sun Sep 3 00:07:32 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Add cygheap.o.
- * child_info.h: Add specific exec class.
- * cygheap.h: New file. Contains declarations for cygwin heap.
- * cygheap.cc: New file. Implements cygwin heap functions.
- * dcrt0.cc (quoted): Simplify due to new method for passing arguments
- between cygwin programs.
- (alloc_stack_hard_way): Attempt to handle overlapped stack.
- (dll_crt0_1): Move child_info processing here. Accommodate new method
- for passing arguments between cygwin programs. Initialize cygwin heap.
- Establish __argc and __argv variables.
- (_dll_crt0): Move most of child_info processing to dll_crt0_1.
- (cygwin_dll_init): Remove duplication.
- * dtable.cc (dtable::extend): Allocate dtable using cygwin heap.
- (dtable::build_fhandler): Ditto for fhandler type being constructed.
- (dtable::dup_worker): Free new fhandler from cygwin heap on error.
- (dtable::select_*): Don't assume that this == fdtab.
- (dtable::linearize_fd_array): Delete.
- (dtable::delinearize_fd_array): Delete.
- (dtable::fixup_after_exec): New file.
- (dtable::vfork_child_dup): Use cygwin heap.
- (dtable::vfork_parent_restore): Ditto.
- * dtable.h: Remove obsolete methods. Add new method.
- * environ.cc (posify): Eliminate already_posix parameter and logic.
- (envsize): New function.
- (_addenv): Use envsize.
- (environ_init): Accept an argument pointing to an existing environment
- list. If supplied, allocate space for this in the the program's heap.
- * fhandler.cc (fhandler_base::operator =): Move here from fhandler.h.
- Use cygwin heap to allocate filenames.
- (fhandler_base::set_name): Allocate/free names from cygwin heap.
- (fhandler_base::linearize): Delete.
- (fhandler_base::de_linearize): Delete.
- (fhandler_base::operator delete): Free from cygwin heap.
- (fhandler_base::~fhandler_base): Ditto.
- * fhandler.h: Accommodate elimination of *linearize and other changes
- above.
- * fhandler_console.cc (fhandler_console::fixup_after_exec): Rename from
- de_linearize.
- * heap.h: New file.
- * fhandler_tty.cc (fhandler_tty_slave::fhandler_tty_slave): Use cygwin
- heap for name. fhandler_tty::fixup_after_exec): Rename from
- de_linearize.
- * fork.cc (fork): Call cygheap_fixup_in_child.
- * heap.cc: Use declarations in heap.h.
- * malloc.cc: Sprinkle assertions throughout to catch attempts to
- free/realloc something from the cygwin heap.
- * path.cc: Throughout, eliminate use of per-thread cache for cwd. Use
- cwd_* functions rather than cwd_* variables to access cwd_win32 and
- cwd_posix.
- (cwd_win32): New function.
- (cwd_posix): New function.
- (cwd_hash): New function.
- (cwd_fixup_after_exec): New function.
- * path.h: Accommodate path.cc changes.
- * pinfo.cc (pinfo_init): Accept a pointer to an environment table.
- Pass this to environ_init. Eliminate old 'title' tests.
- * pinfo.h: Accommodate above change in argument.
- * spawn.cc (struct av): New method for building argv list.
- (av::unshift): New method.
- (spawn_guts): Allocate everything that the child process needs in the
- cygwin heap and pass a pointer to this to the child. Build argv list
- using new method. Eliminate delinearize stuff.
- * thread.h: Eliminate _cwd_win32 and _cwd_posix buffers.
- * winsup.h: Eliminate obsolete functions. Add envsize() declaration.
-
-2000-09-02 Egor Duda <deo@logos-m.ru>
-
- * Makefile.in: Remove "make check" support. It is now in
- winsup/Makefile.in.
-
-Fri Sep 1 21:17:03 2000 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc (mychild): New function.
- (proc_subproc): Use mychild() to determine if a specific pid is valid
- for wait()ing.
-
-Fri Sep 1 16:57:44 2000 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc (sigproc_init): Create wait_sig_inited without auto-reset
- to avoid potential races.
- (init_child_info): Avoid unneeded test.
-
-Fri Sep 1 16:51:26 2000 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc (proc_info): Rename proc_exists which takes a pid to
- "pid_exists".
- * shared.h: Split out "child_info" stuff into a new header file and
- use where necessary.
- Declare pid_exists.
- * child_info.h: New file.
-
-Thu Aug 31 16:06:21 2000 Christopher Faylor <cgf@cygnus.com>
-
- * errno.cc (set_errno_from_win_error): Actually use arguments to
- strace_printf.
-
-2000-08-30 DJ Delorie <dj@redhat.com>
-
- * times.cc (gettimeofday): use GetSystemTimeAsFileTime to avoid a
- conversion
- (FACTOR): correct value
- (genf): set milliseconds to zero, DOW to 4.
-
-2000-08-29 Egor Duda <deo@logos-m.ru>
-
- * grp.cc (getgroups): fail with EINVAL if array is not large
- enough to hold all supplementary group IDs.
-
-Mon Aug 28 22:03:21 2000 Christopher Faylor <cgf@cygnus.com>
-
- * signal.cc (_raise): New function.
- * exceptions.cc (unused_sig_wrapper): Remove _raise.
- * sigproc.h (class sigframe): Default frames to skip to zero or suffer
- from exuberant optimization.
- * fhandler_tty.cc (fhandler_tty::write): Set appropriate errno when
- WriteFile to pipe fails.
-
-Fri Aug 25 23:44:48 2000 Christopher Faylor <cgf@cygnus.com>
-
- * pinfo.h (pinfo): Un-inline release.
- * pinfo.cc (pinfo::release): Move here from pinfo.h.
- * sigproc.cc (proc_terminate): Remove bogus 'pinfo child' which caused
- strange destruction of random regions of memory when destructor was
- invoked.
-
-Fri Aug 25 21:25:32 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (dll_crt0_1): Move set_os_type.
- (_dll_crt0): To here.
- (cygwin_dll_init): And here.
- * external.cc (fillout_pinfo): Use more foolproof method for scanning
- for pids.
- * pinfo.cc (set_myself): Eliminate myself_identity.init.
- * sigproc.cc (wait_sig): Do it here instead to reduce the amount of
- time where there could potentially be two processes with the same pid.
- * spawn.cc (spawn_guts): Eliminate duplicate initialization.
- * include/sys/cygwin.h: Mark unused PID_* elements.
-
-Fri Aug 25 21:49:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * exec.cc (_execve): Change definition according to declaration in
- newlib/libc/include/sys/unistd.h.
-
-Thu Aug 24 22:17:19 2000 Christopher Faylor <cgf@cygnus.com>
-
- * external.cc (cygwin_internal): Add CW_INIT_EXCEPTIONS to allow cygwin
- exception handling on threads not created by cygwin.
- * sigproc.cc (proc_terminate): Don't release pinfo structs since we are
- exiting.
- * include/sys/cygwin.h: Add CW_INIT_EXCEPTIONS.
-
-Thu Aug 24 17:16:14 2000 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (cygwin_select): Correct logic for "always_ready" fds or
- when there is no wait specified.
- * syslog.cc (pass_handler::set_message): Zero the buffer prior to
- setting it.
-
-2000-08-24 Egor Duda <deo@logos-m.ru>
-
- * include/cygwin/core_dump.h: New file, contains structures used in
- cygwin core core files.
- * include/sys/procfs.h: New file, needed to autoconfigure cygwin core
- dumps support in bfd.
-
-Thu Aug 24 13:50:15 2000 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc (parse_thing): nobinmode should force O_TEXT.
- (regopt): Use correct path to find LOCAL_MACHINE registry options.
- * fhandler.cc (fhandler_base::open): Set binary mode only when binmode
- == O_BINARY.
- * pipe.cc (pipe): Pipe handling should rely on binmode not _fmode now
- that the two are different.
-
-Thu Aug 24 13:21:09 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/sys/cygwin.h (strace_printf_wrap): Force printing when
- _STRACE_SYSTEM.
- (strace_printf_wrap1): Ditto.
-
-Thu Aug 24 12:30:17 2000 Christopher Faylor <cgf@cygnus.com>
-
- * debug.h: Allow some debug defines for use in header files.
-
-Wed Aug 23 23:00:24 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (dll_crt0_1): Move exception list and constructor stuff
- earlier in the process. Use new second argument to set_myself.
- (cygwin_dll_init): Initialize exception list and constructor stuff
- here.
- (_dll_crt0): And here. Also, deal with inherited pinfo shared memory
- region from parent.
- * pinfo.cc (set_myself): Accept a second argument signifying the a
- shared memory region, passed from an execing parent.
- (pinfo_init): Ditto.
- * pinfo.h: Ditto.
- * shared.h (child_info): Add a handle field to pass to child.
- * spawn.cc (spawn_guts): Create a shared handle to pass to an execed
- child.
- * winsup.h: Remove extraneous declaration.
-
-Wed Aug 23 10:51:57 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/sys/cygwin.h: Protect class definitions.
-
-Tue Aug 22 13:57:36 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (symlink_info::check): Clear error on each iteration of
- extension check.
-
-Tue Aug 22 11:23:59 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Don't include '.d' file if there are none generated yet.
-
-Tue Aug 22 11:08:11 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/sys/cygwin.h: Declare some thread classes.
- * include/mntent.h: Avoid declaring functions.
-
-Tue Aug 22 01:08:01 2000 Christopher Faylor <cgf@cygnus.com>
-
- * winsup.h: Eliminate inclusion of most of the cygwin .h files. Use .h
- files only in sources which require them.
- * Makefile.in: Generate dependencies with -MD option.
-
-Mon Aug 21 23:49:05 2000 Christopher Faylor <cgf@cygnus.com>
-
- * cygerrno.h: New file. Use this throughout whenever errno
- manipulation is required.
- * errno.cc: Use DWORD to hold Windows errors.
- (geterrno_from_win_error): New function.
- (seterrno_from_win_error): Use geterrno_from_win_error to convert
- supplied windows error (suggested by Corinna Vinschen).
- * path.cc (symlink_info): Add error element.
- * path.cc (path_conv::check): Remove errno setting. Use new
- symlink_info errno element to set path_conv error, where appropriate.
- (symlink_info::check): Set error element rather than attempting to
- manipulate errno. Add more checks for trailing / and /.. even though
- they are currently useless. Avoid setting EINVAL.
-
-Mon Aug 21 23:49:05 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (normalize_posix_path): Correct check for trailing /.
-
-2000-08-21 DJ Delorie <dj@redhat.com>
-
- * include/cygwin/cygwin_dll.h (DECLARE_CYGWIN_DLL): hinstance,
- not handle.
-
-Fri Aug 18 11:11:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * dtable.cc (dtable::dup2): Extend fdtab if newfd is out of current
- allocated bounds.
-
-Sat Aug 12 01:47:28 2000 Christopher Faylor <cgf@cygnus.com>
-
- * mkvers.sh: Properly trap exit removal of temp file. Remove debugging
- statement.
-
-Sat Aug 12 01:37:56 2000 Christopher Faylor <cgf@cygnus.com>
-
- * poll.cc: Make winsup.h the first include file, re 2000-08-02 change.
-
-Sat Aug 12 01:33:12 2000 Christopher Faylor <cgf@cygnus.com>
-
- * winsup.h: Split out dtable definitions into separate header file.
- * dtable.h: New file.
- * sigproc.h: Eliminate pinfo.h usage here. Use it in source files that
- need it.
-
-Sat Aug 12 01:08:11 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Use dtable.o rather than hinfo.o.
-
-Sat Aug 12 00:47:11 2000 Christopher Faylor <cgf@cygnus.com>
-
- Rename hinfo -> dtable. Name the former dtable array 'fdtab'.
-
-Fri Aug 11 14:47:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * poll.cc: Allow any descriptor and any number of descriptors.
- Allocate fd_set struct sdynamically.
-
-Fri Aug 11 14:47:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * poll.cc: Add bounds checking for file descriptors. Return POLLNVAL
- if fd is invalid. Return POLLERR for each valid fd if cygwin_select
- returned with error.
- include/sys/poll.h: Change POLLERR comment according to above change.
-
-Thu Aug 10 21:54:29 2000 Christopher Faylor <cgf@cygnus.com>
-
- * syslog.cc (syslog): Use a less malloc-intensive method for allocating
- the buffer. Also fix a buffer overrun.
-
-Thu Aug 10 15:31:39 2000 Christopher Faylor <cgf@cygnus.com>
-
- * winsup.h: Change strchr inline for strange gcc problem.
- * select.cc (select_stuff::wait): Bounds check w4 array.
-
-Thu Aug 10 15:17:53 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dir.cc (readdir): Ensure that errno is *only* set when we've run out
- of filenames.
- * fhandler.cc (fhandler_disk_file::fstat): Use modern method for saving
- errno, making it effective for the whole function.
-
-Tue Aug 8 22:25:39 2000 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (allocfd_set): Zero allocated fd_set.
- (cygwin_select): Move fd_set copying logic from ::wait to here. Use
- common return through sell.poll.
- (select_stuff::wait): Just return success or failure and let caller
- fill in fd_set.
- * pinfo.h (pinfo): Eliminate self-referential pointer to sidbuf since
- pinfo structure exists at random locations now.
- * fork.cc (fork): Use 'use_psid' element to control when the psid is
- relevant.
- * shared.cc (sec_user): Ditto.
- * spawn.cc (spawn_guts): Ditto.
- * uinfo.cc (internal_getlogin): Ditto.
- * syscall.cc (seteuid): Ditto. Set use_psid element.
-
-Tue Aug 8 13:20:00 2000 Bob Wilson <bwilson@tensilica.com>
-
- * fhandler_serial.cc (tcsendbreak): "sleeptime" argument to usleep()
- must be in units of microseconds, not milliseconds.
-
-Mon Aug 7 00:11:35 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/cygwin/cygwin_dll.h: Remove extraneous (and incorrect)
- declarations.
-
-Fri Aug 4 00:00:46 2000 Christopher Faylor <cgf@cygnus.com>
-
- * hinfo.cc (hinfo::find_unused_handle): Just check for table entry ==
- NULL since we are already bounds checked by default.
- * thread.cc (ResourceLocks::Lock): Streamline this function since it is
- called a lot.
- (ReleaseResourceLock): Ditto.
-
-Thu Aug 3 20:44:39 2000 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (fhandler_console::select_read): Call set_cursor_maybe
- since select may block and cursor may not be visible.
- * select.cc (fhandler_console::select_write): Ditto.
- * select.cc (fhandler_console::select_except): Ditto.
-
-Thu Aug 3 09:01:14 2000 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Set
- length field correctly when "need_nl".
-
-Wed Aug 2 22:58:07 2000 Christopher Faylor <cgf@cygnus.com>
-
- * fork.cc (vfork): Store complete stack frame in vfork_save structure
- for later recovery.
- * spawn.cc (spawn_guts): Reorganize slightly to consolidate handling
- when there is a CreateProcess error.
- (_spawnve): Only longjmp back to vfork handling when a process has been
- successfuly started.
- * winsup.h (vfork_save): Extend to include frame info. Remove obsolete
- cpplus conditionals.
-
-Wed Aug 2 15:14:51 2000 Christopher Faylor <cgf@cygnus.com>
-
- * strace.cc (strace::prntf): Make second argument the function name,
- rather than use special format options.
- (strace::vprntf): Ditto.
- (getfunc): New function.
- * include/sys/strace.h: Reflect above changes.
- * smallprint.c (__small_vsprintf): Eliminate '%F' formatting.
- * pinfo.cc (set_myself): Modify for new strace::prntf parameter.
- * errno.cc (seterrno_from_win_error): Ditto.
- * fhandler_tty.cc (fhandler_tty_common::__acquire_output_mutex): Ditto.
- * fhandler_tty.cc (fhandler_tty_common::__release_output_mutex): Ditto.
-
-Wed Aug 2 13:20:04 2000 Christopher Faylor <cgf@cygnus.com>
-
- * regexp/regexp.c: Add winsup.h.
-
-2000-08-02 DJ Delorie <dj@redhat.com>
-
- * winsup.h: take out protections of environ, errno, allow C use
- * *.cc: put winsup.h before other headers (for __INSIDE_CYGWIN__);
- use cur_environ() instead of just environ
- * times.cc: remove import protections
- * glob.c: add winsup.h
- * localtime.c: ditto
- * smallprint.c: ditto
- * Makefile.in: don't __INSIDE_CYGWIN__ as it messes up profiling.
-
-Wed Aug 2 11:22:53 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/sys/strace.h: Fix strace definition.
-
-Tue Aug 1 23:37:08 2000 Christopher Faylor <cgf@cygnus.com>
-
- * strace.h: Add kludgy workarounds to avoid using deprecated methods
- for variable argument macros when possible.
- * sigproc.cc: Throughout, use sigproc_printf rather than sip_printf.
- * strace.cc (strace::prntf): Remove 'active' check, since callers are
- supposed to ensure this.
- (__system_printf): Remove. Subsumed by strace::prntf.
- * winsup.h: Define "NEW_MACRO_VARARGS" to indicate when to use new
- macro varargs capability.
-
-Sun Jul 30 13:54:35 2000 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_console.cc: Remove VK_DIVIDE detection.
- (get_nonascii_key): Simplify previous patch to return ascii char if it
- is non-zero. Add a second "temporary buffer" argument to help with
- thread safety.
- * select.cc (peek_console): Pass a temporary buffer argument to
- get_nonascii_key.
-
-Sat Jul 29 14:32:12 2000 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_console.cc: Add VK_DIVIDE detection. Return virtual keycode
- if it is not detected and it is less than ' '.
-
-Sat Jul 29 13:33:49 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (chdir): Avoid trailing dot calculation when chdir == '/'
- or we end up with an empty string.
-
-Sat Jul 29 12:11:33 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/cygwin/version.h: Bump DLL minor version number to 5 due
- to all of the changes below.
-
-Sat Jul 29 12:01:32 2000 Christopher Faylor <cgf@cygnus.com>
-
- Redefine process structure to avoid a fixed size table. Redefine
- pinfo/_pinfo classes. Use these throughout.
- * dcrt0.cc (dll_crt0_1): Accommodate set_myself argument change.
- (__api_fatal): Accommodate _pinfo::record_death argument change.
- * exceptions.cc (really_exit): Ditto.
- (sig_handle_tty_stop): Use pinfo constructor to access process info.
- (events_init): Don't create pinfo_mutex since it is no longer required.
- * external.cc (fillout_pinfo): Use winpids class to iterate over all
- system pids.
- (cygwin_internal): lock_pinfo_for_update and unlock_pinfo are now
- noops.
- * fhandler_termios.cc (fhandler_termios::set_ctty): Use pinfo
- constructor to access process info.
- * fork.cc (fork): Reorganize to initialize child info after the child
- has started since that is when we know the child's winpid, which is
- necessary to allocate the pinfo shared memory.
- * mmap.cc (recreate_mmaps_after_fork): Change arg type to _pinfo.
- * pinfo.cc: Rename pinfo methods to _pinfo throughout. Eliminate
- pinfo_list stuff.
- (set_myself): Accept a pid argument now. Call pinfo initializer to
- initialize myself. Detect when this is an "execed" process and create
- an "indirect" pid block.
- (pinfo_init): Accommodate set_myself arg change.
- (procinfo): Remove.
- (pinfo::lock_pinfo): Remove.
- (pinfo::unlock_pinfo): Remove.
- (pinfo::init): New method. Allocates shared memory space for process
- pinfo structure.
- (pinfo::record_death): Don't call locking functions.
- (cygwin_winpid_to_pid): Simplify by using new pinfo constructor.
- (EnumProcessesW95): New function for iterating over processes on
- Windows 95.
- (winpids::winpids): New constructor for winpids class. Sets up a list
- of process ids.
- (enum_init): Initialize w95/wnt pid enumerators.
- * shared.cc (shared-info::initialize): Remove pid initialization.
- * shared.h: Move pinfo stuff into pinfo.h.
- (class shared_info): Remove pinfo_list element.
- * signal.cc (kill_worker): Use pinfo constructor to access process
- info.
- (kill_pgrp): Ditto. Use winpids methods to access list of processes.
- * sigproc.cc: Throughout, modify to use _pinfo where appropriate.
- (proc_exists (pid_t)): New function. Determines if a process exists
- based on the pid.
- (proc_exists (_pinfo *p): Use new proc_exists function above.
- (proc_subproc): Copy pinfo stuff around rather than _pinfo pointers.
- Try to be careful about releasing shared memory when we don't need it
- anymore. Remove pinfo locks.
- (remove_zombies): Remove pinfo memory when zombie is going away.
- * sigproc.h: Reflect _pinfo/pinfo changes in sigproc.cc.
- * spawn.cc (spawn_guts): Eliminate pinfo *child argument. Reorganize
- to only initialize child pinfo after process has been started and we
- know the windows pid.
- (_spawnve): Reflect spawn_guts changes.
- * syscalls.cc (setpgid): Use pinfo constructor to access process info.
- (getpgid): Ditto.
- (internal_getlogin): Use _pinfo.
- * winsup.h: Eliminate pinfo_mutex. Eliminate spawn_guts declaration
- since it is static now. Reflect set_myself argument change.
- * include/sys/cygwin.h: Add some PID_* enums to accommodate new pinfo
- stuff.
-
-Sat Jul 29 12:13:27 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/cygwin/version.h: Update minor version for cygdrive changes
- below.
-
-Sat Jul 29 11:59:29 2000 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc (parse_thing): Make binmode a DWORD.
- * hinfo.cc (hinfo::init_std_file_from_handle): Use 'binmode' to
- determine default open mode.
- * winsup.h: Declare binmode.
-
-Sat Jul 29 00:16:35 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/cygwin/cygwin_dll.h: Update for modern compilers.
- * lib/cygwin_crt0.c: Inexplicably need to define alloca for newer
- compilers.
- * fhandler.h (fhandler_console): Add new method.
- * fhandler.cc (fhandler_console::set_cursor_maybe): New method.
- (fhandler_console::read): Set cursor if it has moved to make it
- visible.
-
-Thu Jul 27 22:54:28 2000 Jason Tishler <jt@dothill.com>
-
- * dcrt0.cc (dummy_autoload): Add load statement for RegDeleteValueA.
- * external.cc (get_cygdrive_prefixes): New function.
- (cygwin_internal): Add CW_GET_CYGDRIVE_PREFIXES case.
- * path.cc (mount_info::read_cygdrive_info_from_registry): Read system
- cygdrive prefix if user one is undefined.
- (mount_info::write_cygdrive_info_to_registry): Write cygdrive prefix to
- the appropriate registry hive. Overwrite in-memory copy of cygdrive,
- if appropriate.
- (mount_info::remove_cygdrive_info_from_registry): New method.
- (mount_info::get_cygdrive_prefixes): New method.
- (cygwin_umount): Remove cygdrive prefix, if appropriate.
- * registry.cc (reg_key::killvalue): New method.
- * shared.h (class reg_key): Add killvalue,
- remove_cygdrive_info_to_registry, and get_cygdrive_prefixes
- declarations.
- * include/sys/cygwin.h (cygwin_getinfo_types): Add
- CW_GET_CYGDRIVE_PREFIXES.
-
-Thu Jul 27 23:33:32 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/cygwin/version.h: Bump DLL minor version number to 4.
-
-2000-07-27 DJ Delorie <dj@redhat.com>
-
- * testsuite/winsup.api/winsup.exp: ignore stdout by default
- * testsuite/winsup.api/crlf.c: non-verbose by default
-
- * winsup.h: prune out windows headers we don't normally need
- * assert.cc: add wingdi.h and winuser.h
- * fhandler_console.cc: ditto
- * fhandler_windows.cc: ditto
- * select.cc: ditto
- * spawn.cc: ditto
- * strace.cc: ditto
- * tty.cc: ditto
- * window.cc: ditto
- * hinfo.cc: add winsock.h
- * syscalls.cc: add winnls.h
- * uinfo.cc: ditto
-
-Thu Jul 27 10:24:36 2000 Egor Duda <deo@logos-m.ru>
-
- * fhandler.cc (fhandler_disk_file::fstat): Allow block calculation to
- succeed for files >= 2GB and <= 4GB.
-
-Wed Jul 26 16:05:04 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (signal_exit): Renamed from "really_exit". Always sets
- EXIT_SIGNAL bit and reorganizes exit value for backwards cygwin
- handling.
- (handle_exceptions): Call signal_exit. Set "core dumped" bit.
- (sig_handle): Call signal_exit. Set "core dumped" bit appropriately.
-
-Wed Jul 26 20:44:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * environ.cc (posify): Revert previous patch.
- (_addenv): Remove check_null_empty_path from here.
- (putenv): Call check_nullempty_path.
- (setenv): Call check_nullempty_path for name as well here.
- Don't report an error if value is empty string.
- (environ_init): Revert usage of newp.
-
-Wed Jul 26 14:32:38 2000 Egor Duda <deo@logos-m.ru>
-
- * syscalls.cc (stat_worker): Make stat return correct st_blocks for
- files with size bigger than 2Gb and less than 4Gb
-
-Wed Jul 26 17:43:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (lookup_name): Search on local machine first if
- myself->domain is not empty.
-
-2000-07-26 DJ Delorie <dj@cygnus.com>
-
- * fhandler_console.cc (fhandler_console::read): Explicitly set cursor
- to make it visible while waiting in WaitForMultipleObjects.
-
-Wed Jul 26 10:59:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * passwd.cc: Change name of passwd_in_memory_p to passwd_state.
- Change type to enum. Change storage class to static. Adjust comments.
- (read_etc_passwd): Set passwd_state to different values when loaded
- from file in contrast to being emulated.
- (search_for): Return default passwd entry if passwd is emulated or
- it's a request for the current user. Otherwise return NULL.
-
-Tue Jul 25 21:50:42 2000 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (statfs): Use path_conv method to convert input path.
-
-Tue Jul 25 21:40:51 2000 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (_link): Avoid extraneous call to
- cygwin_conv_to_win32_path.
-
-Tue Jul 25 21:11:15 2000 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc (_addenv): New function. Subsumes functionality of
- putenv/setenv. Does not allocate space for putenv case.
- (putenv): Use _addenv to add a value to the environment.
- (setenv): Ditto.
- (environ_init): Don't malloc space for each entry in the environment
- table. Just use the space from GetEnvironmentStrings.
- (posify): Don't free the src argument since it is no longer malloced.
-
-Mon Jul 24 21:10:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (_link): Corrected previous patch.
-
-Mon Jul 24 13:26:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_dev_random): Add members for managing
- pseudo randomness.
- * fhandler_random.cc: Rearrange. Use pseudo random number generator
- as entropy source if system entropy isn't available and if device is
- used as /dev/urandom. Allow initializing device by calling write().
-
-Sun Jul 23 23:11:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h: Add comment.
-
-Sun Jul 23 20:00:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_dev_raw): Add private member `varblkop'
- to be set when variable blocksize mode is on.
- * fhandler_raw.cc: Eliminate `\n' from trace output.
- (clear): Set `varblkop' to 0.
- (dup): Copy varblkop as well.
- (writebuf): Care for variable blocksize.
- (open): Ditto.
- (raw_read): Ditto.
- (raw_write): Ditto.
- * fhandler_tape.cc (open): Ditto.
- (ioctl): Ditto. Some cleanups.
-
-Sat Jul 22 18:40:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- Patch suggested by Kazuhiro Fujieda <fujieda@jaist.ac.jp>.
- * winsup.h: Add new macros sys_wcstombs and sys_mbstowcs.
- * syscalls.cc (_link): Replace calls to mbstowcs by call to
- sys_mbstowcs.
- * uinfo.cc (internal_getlogin): Replace calls to wcstombs and
- mbstowcs by calls to sys_wcstombs and sys_mbstowcs. Replace
- usage of constants by meaningful defines. Use result of
- GetSystemDirectory for HOMEPATH and HOMEDRIVE as a last resort.
-
-Fri Jul 21 21:33:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * spawn.cc (span_guts): Retrieve security attributes before setting
- psid to NULL.
-
-Fri Jul 21 12:03:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (acl_worker): Use stat_suffixes in call to path_conv
- just as in `stat_worker'.
-
-Wed Jul 19 22:24:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * spawn.cc (spawn_guts): Don't restore impersonation in case
- of _P_OVERLAY. Clean up slightly. Accommodate comments.
-
-Wed Jul 19 22:11:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * shared.h (class pinfo): New members `root' and `rootlen'.
- * syscalls.cc (chroot): Set new root for process.
- * path.cc (getcwd_inner): Add parameter to force use of
- new root from chroot() call.
- (ischrootpath): New macro.
- (normalize_posix_path): Care for changed root dir.
- (normalize_win32_path): Ditto.
- (getcwd_inner): Ditto.
- (chdir): Eliminate trailing path component consisting
- entirely of dots.
- * fork.cc (fork): Copy pinfo members regarding chroot().
- * spawn.cc (_spawnve): Ditto.
- * dir.cc (opendir): Don't use computed win32 path if
- chroot() took place.
-
-Mon Jul 17 22:21:34 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dll_init.cc (dll_list::alloc): Fix debugging output.
-
-Mon Jul 17 14:57:53 2000 Christopher Faylor <cgf@cygnus.com>
-
- Throughout, eliminate third argument to path_conv and use new PC_*
- constants for second argument.
- * dcrt0.cc (dll_crt0_1): Reorganize to allow more initialization prior
- to returning due to dynamic loading.
- * path.h: Generalize SYMLINK_* constants to PC_*.
- (path_conv): Create a new method. Fold third argument into second.
- * dll_init.cc (dll_list::alloc): Try harder to find space to allocate
- dll struct.
- (dll_dllcrt0): Don't check sanity if we've already called dll_crt0.
- * path.cc (path_conv::check): Don't check for a null or empty path
- unless specifically told with a flag setting.
- (check_null_empty_path): New function, adapted from macro.
- * syscalls.cc (_rename): Use already-determined file attributes rather
- than checking again.
- * lib/cygwin/cygwin_attach.dll.c (cygwin_attach_dll): Use a static
- per_process structure since this is apparently supposed to be zeroed.
- * lib/cygwin_crt0.c (cygwin_crt0): Zero per_process structure sent to
- older DLLs.
-
-Mon Jul 17 19:39:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- Patch suggested by Eric Fifer <EFifer@sanwaint.com>
- * poll.cc (poll): Fix erroneous negations.
-
-Mon Jul 17 17:56:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * environ.cc (setenv): Use __cygwin_environ instead of
- environ after reallocating environment space.
-
-Sun Jul 16 20:23:21 2000 Christopher Faylor <cgf@cygnus.com>
-
- * _cygwin_crt0_common.cc: Undef 'environ' or suffer compiler error.
-
-Sun Jul 16 16:03:00 2000 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc: Use new definition of "environ" throughout.
- (environ_init): Explicitly initialize __cygwin_environ.
- (cur_environ): New function. Detects when user has updated
- their environment.
- * exec.cc: Use 'environ' define throughout rather than __cygwin_environ.
- * spawn.cc: Ditto.
- * winsup.h: Declare cur_environ, main_environ, environ.
-
-Sun Jul 16 13:23:04 2000 Christopher Faylor <cgf@cygnus.com>
-
- * acconfig.h: Add support for NEWVFORK.
- * config.h.in: Ditto.
- * configure.in: Add --enable-vfork option.
- * configure: Regenerate.
- * dcrt0.cc (quoted): Detect and fix up quoted backslashes.
- * sigproc.cc (proc_subproc): Correctly name handle of newly added child
- process to avoid erroneous debugging messages about closing the wrong
- handle.
-
-Sun Jul 16 02:30:09 2000 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (spawn_guts): Use \ for quoting '"'.
- * dcrt0.cc (quoted): Understand \ quoting for '"'.
-
-Sun Jul 16 00:32:58 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (build_argv): Strip quotes from argv[0] since it should
- never be globified.
-
-Sat Jul 15 00:32:41 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dll_init.cc (dll_list::alloc): Round correctly. Use VirtualAlloc
- since shared file mapping is unnecessary.
- (dll_list::detach): Release memory via VirtualFree since there we no
- longer use shared file mapping.
-
-Fri Jul 14 22:40:22 2000 Christopher Faylor <cgf@cygnus.com>
-
- * hinfo.cc (hinfo::linearize_fd_array): Make max_used_fd an int so that
- we can detect when there are no fds to pass.
- * dcrt0.cc (host_dependent_constants::init): Revert Sat Mar 18 01:32:04
- 2000 change.
- (dll_crt0_1): Set "cygwin_finished_initializing" flag.
- (dll_crt0): Don't perform memcpy if uptr is already set to internal
- structure.
- (_dll_crt0): Remember location of programs envptr.
- * dll_init.h (per_module, dll, dll_list): Revamp.
- * dll_init.cc: Revamp. Use new classes.
- * fork.cc (fork): Use new revamped dll, dll_list, and per_module stuff.
- * environ.cc: Use __cygwin_environ throughout rather than the
- user_data->envptr.
- * exec.cc: Ditto.
- * spawn.cc: Ditto.
- * winsup.h: Declare update_envptrs, cygwin_finished_initializing.
- * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Revert previous
- change.
- * lib/cygwin_attach_dll.cc (cygwin_attach_dll): Always pass in own
- per_process structure or we end up overwriting information from the
- main program.
-
-Wed Jul 12 00:46:00 2000 Christopher Faylor <cgf@cygnus.com>
-
- * debug.cc (thread_stub): Use impure_ptr in place of reent_data.
- * dll_init.cc (dll_dllcrt0): Replace erroneous use of local symbol with
- correct __cygwin_user_data->impure_ptr.
-
-Wed Jul 12 00:01:03 2000 Christopher Faylor <cgf@cygnus.com>
-
- * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Don't reset
- environ if already set.
-
-Mon Jul 10 19:07:03 2000 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_console.cc (fhandler_console::read): Unicode interface
- to ReadConsoleInput only exists on W2K, so use workaround from
- Kazuhiro Fujieda <fujieda@jaist.ac.jp>.
-
-Mon Jul 10 11:30:00 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in (install): Install textmode.o as well as binmode.o.
- * fhandler_console.cc (fhandler_console::read): Use UNICODE when
- reading from the console and translate to ASCII from that.
-
-Sun Jul 9 21:52:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * spawn.cc (spawn_guts): Close handle `hToken' only if it's not
- copied from myself->token.
- * syscalls.cc (seteuid): Replace CopySid by memcpy which is foolproof
- here.
-
-Sun Jul 9 01:19:06 2000 Christopher Faylor <cgf@cygnus.com>
-
- * cygwin.din: Export _getmode and getmode to allow querying of binary
- state of an fd.
- * external.cc (cygwin_internal): Add handling of perfile_table setting.
- * fhandler.cc (perfile_table): New global.
- (fhandler_base::get_default_fmode): New method to return a file's
- default mode based on its name.
- (fhandler_base::open): Use get_default_mode method to determine a
- file's mode. Record file mode in file flags.
- * fhandler.h (fhandler_base): Declare get_default_fmode
- * syscalls.cc (getmode): New function.
- * sys/cygwin.h (__cygwin_perfile): New structure.
- (cygwin_getinfo_types): Move outside of WINVER conditional.
- (per_process): Move inside of WINVER conditional.
-
-Sat Jul 8 00:15:01 2000 Christopher Faylor <cgf@cygnus.com>
-
- * external.cc (cygwin_internal): Export __cygwin_user_data.
- * include/sys/cygwin.h: Allow definition of per_process even when not
- compiling with C++.
- (cygwin_getinfo_types): Add CW_USER_DATA.
- * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Get
- __cygwin_user_data pointer from cygwin_internal. If it doesn't exist,
- return failure. Use either this pointer or passed in pointer
- throughout. Clear forkee.
- * lib/crt0.h: Accommodate argument changes to _cygwin_crt0_common.
- * lib/cygwin_attach_dll.c (cygwin_attach_dll): Reorganize to allow use
- of newer binaries with older DLLs. Detect older DLLs when
- _cygwin_crt0_common returns 0 and allocate space for a per_process
- structure on the stack.
- * lib/cygwin_crt0.c (cygwin_crt0): Ditto.
-
-Fri Jul 7 10:31:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/sys/cygwin.h: Hide internal data types in per_process
- when not __INSIDE_CYGWIN__.
-
-Wed Jul 5 18:56:58 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (__cygwin_user_data): Initialize.
- (dll_crt0_1): Eliminate user_data initialization.
- (dll_crt0): Set up impure_ptr_ptr for older executables.
- (cygwin_dll_init): Eliminate user_data initializations.
- (__api_fatal): Don't check for user_data initialization.
- * dll_init.cc (struct dll): Store entire contents of per_process rather
- than just a pointer.
- (add): Ditto.
- (initOneDll): Don't check for user_data initialization.
- (DllList::recordDll): Store contents of per_process argument.
- (DllList::detachDll): Pass address of per_process field.
- (DllList::initAll): Ditto.
- (DllList::doGlobalDestructorsOfDlls): Ditto.
- (DllListIterator::operator *): Ditto.
- (dll_dllcrt0): Default to __cygwin_user_data if arg is NULL.
- * include/sys/cygwin.h: Reorganize per_process to eliminate obsolete
- fields and accommodate new way of initializing.
- * lib/_cygwin_crt0_common: Initialize _impure_ptr from
- __cygwin_user_data.impure_ptr.
-
-2000-07-04 Vadim Egorov <egorovv@mailandnews.com>
-
- * exceptions.cc (try_to_debug): Prevent recursive spawning of JIT
- debugger. Treat special event from debugger as command to continue.
-
-Mon Jul 4 19:29:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * poll.cc (poll): Zero out `open_fds' as well.
-
-Mon Jul 4 1:22:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/version.h: Bump API minor version to 24.
-
-2000-07-04 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * security.cc (read_sd): Eliminate OemToChar.
-
-Mon Jul 4 18:57:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * poll.cc: New file. Implement `poll' system call.
- * include/poll.h: Ditto.
- * include/sys/poll.h: Ditto.
- * Makefile.in: Add poll.o as dependency.
- * cygwin.din: Add poll and _poll symbols.
-
-2000-07-04 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * dcrt0.cc (dll_crt0_1): Eliminate SetFileApisToOEM and CharToOem.
- * (dummy_autoload): Add functions used in fhandler_console.
- * fhandler_console.cc (fhandler_console::read): Use ENCHANCED_KEY flag
- to distinguish extended keys. Translate an input character from the
- OEM code page to the ANSI code page.
- * (fhandler_console::write_normal): Translate output characters from
- the ANSI code page to the OEM code page.
- * syscalls.cc (_link): Use MultiByteToWideChar instead of OemToCharW.
-
-Mon Jul 3 16:09:16 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (stack_info::walk): Use method to find offset.
- (handle_exceptions): Be more assertive in finding ebp for use under
- W2K. Create a dummy stack frame for cases where program is dying and a
- stack dump is being output.
- (sig_handle): Fill out a GetThreadContext for use with a user-generated
- "core dump".
-
-Mon Jul 3 10:53:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/socket.h: Remove SOCK_PACKET define since it's
- not supported by Windows sockets.
-
-Sun Jul 2 21:50:48 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (user32_init): Add primitive guard against concurrent
- attempts to call this function. Also add temporary debugging code to
- display a message if the function is called multiple times.
- (api32_init): Ditto.
-
-Sun Jul 2 10:39:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.h: Define MAX_SID_LEN and new MAX_HOST_NAME.
- * fork.cc (fork): Use above defines instead of numerical constants.
- * shared.cc (sec_user): Ditto.
- * shared.h (class pinfo): Ditto.
- * syscall.cc (seteuid): Ditto.
- * spawn.cc (_spawnve): Ditto. Eliminate conditional.
- (spawn_guts): Set child->uid = USHRT_MAX when user context will be
- changed in child process.
- * uinfo.cc (uinfo_init): Check for myself->uid instead of myself->psid
- to avoid reloading of /etc/passwd on process startup if ntsec is off.
- Use above defines instead of numerical constants.
- * security.cc: Move define for MAX_SID_LEN to winsup.h.
-
-Sun Jul 2 1:57:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * uinfo.cc (uinfo_init): Eliminate calls to read_etc_group()
- and read_etc_passwd().
-
-2000-06-28 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * assert.cc (__assert): Reduce dependency on newlib.
- * exec.cc: Eliminate unnecessary inclusion of ctype.h.
- * glob.c: Ditto.
- * hinfo.cc: Ditto.
- * init.cc: Ditto.
- * strace.cc: Ditto.
- * tty.cc: Ditto.
- * grp.cc (parse_grp): Eliminate atoi.
- * passwd.cc (grab_int): Ditto.
- * grp.cc (getgroups): Eliminate str{n,}casecmp.
- * path.cc (get_raw_device_number): Ditto.
- * path.cc (sort_by_native_name): Ditto.
- * spawn.cc (iscmd): Ditto.
- * uinfo.cc (internal_getlogin): Ditto.
-
-Sat Jul 1 11:43:32 2000 Christopher Faylor <cgf@cygnus.com>
-
- * binmode.c (cygwin_premain0): Fix erroneous clearing of bit.
- * textmode.c (cygwin_premain0): Ditto.
-
-Sat Jul 1 00:24:04 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (_dll_crt0): Renamed from dll_crt0 ().
- * winsup.h: Accommodate above change.
- * cygwin.din: Ditto.
- * lib/cygwin_crt0.c: Ditto.
-
-Fri Jun 30 23:21:40 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Use variables rather than configure constructs where
- appropriate.
- (LIBCOS): Find additional stub library stuff in their own subdirectory.
- * dcrt0.cc: Convert user_data pointer to static __cygwin_user_data
- area.
- (do_global_ctors): Check magic_bisquit for initialization.
- (dll_crt0_1): First group of premain functions prior to fd
- initialization. Run second group before calling main.
- (dll_crt0 ()): New function, called from new initialization code.
- (dll_crt0 (per_process *uptr)): Call new dll_crt0 () function on
- initialization.
- * debug.cc (thread_stub): Initialize bottom of stack with per-thread
- info.
- * environ.cc (parse_thing): Use binmode global to control
- CYGWIN=binmode behavior.
- * fhandler.cc (fhandler_base::open): Allow explicit setting of __fmode
- to O_BINARY or O_TEXT to override disk mount settings.
- * libcmain.cc: Move to lib subdirectory.
- * libccrt0.cc: Ditto.
- * dll_main.cc: Ditto.
- * dll_entry.cc: Ditto.
- * getopt.c: Ditto.
- * thread.cc (thread_init_wrapper): Call ExitThread explicitly rather
- than returning, as a preliminary step towards placing per thread info
- at the bottom of the stack.
- * winsup.h: Move per_process class to include/sys/cygwin.h. Declare
- new dll_crt0().
- * include/cygwin/version.h: Bump API minor version.
- * binmode.c: New file.
- * textmode.c: Ditto.
- * perthread.h: Ditto.
- * lib/_cygwin_crt0_common.cc: Ditto.
- * lib/crt0.h: Ditto.
- * lib/cygwin_attach_dll.c: Ditto.
- * lib/cygwin_crt0.c: Ditto.
- * lib/dll_entry.cc: Ditto.
- * lib/dll_main.cc: Ditto.
- * lib/getopt.c: Ditto.
- * lib/libcmain.c: Ditto.
- * lib/premain0.c: Ditto.
- * lib/premain1.c: Ditto.
- * lib/premain2.c: Ditto.
- * lib/premain3.c: Ditto.
-
-Wed Jun 28 19:36:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (seteuid): Initialize pi.token before calling
- internal_getlogin().
- * uinfo.cc (internal_getlogin): Use impersonation token instead
- of process token in case of active impersonation. Add some comments.
- (uinfo_init): Initializing myself->token and myself->impersonated
- before calling internal_getlogin(). Add some comments.
-
-Mon Jun 26 18:32:41 2000 Christopher Faylor <cgf@cygnus.com>
-
- * windows.cc (setitimer): Round up when < 1000 usecs.
-
-Mon Jun 26 17:34:54 2000 Christopher Faylor <cgf@cygnus.com>
-
- * hinfo.cc (hinfo::dup2): Eliminate compiler warning.
-
-Mon Jun 26 11:25:29 2000 Christopher Faylor <cgf@cygnus.com>
-
- * hinfo.cc (hinfo::dup2): Guard against out of bounds newfd.
-
-Sat Jun 24 23:43:06 2000 Christopher Faylor <cgf@cygnus.com>
-
- * grp.cc (read_etc_group): Open file in text mode.
- * pwd.cc (read_etc_passwd): Ditto.
- * shared.h: Bump PROC_MAGIC.
-
-Sat Jun 24 19:30:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fork.cc (fork): Fix error in copying SID pointer.
- * spawn.cc (_spawnve): Ditto.
- * passwd.cc: Remove static from `passwd_in_memory_p'.
- (read_etc_passwd): Remove static.
- * uinfo.cc: Move global declaration of `read_etc_group' and
- `group_in_memory_p' into `uinfo_init'.
- (internal_getlogin): Try to get SID from current process first.
- (uinfo_init): Don't set uid and gid if `myself' has a valid SID.
- Only load /etc/passwd and /etc/group in that case.
-
-Sat Jun 24 12:29:59 2000 Christopher Faylor <cgf@cygnus.com>
-
- * shared.cc (shared_info::initialize): Improve error message clarity.
- * mkvers.sh: Eliminate debugging output.
-
-Thu Jun 22 17:50:59 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Autogenerate cygwin.def when appropriate.
- * include/sys/cygwin.h: Correct prototype.
-
-Thu Jun 22 17:05:04 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/sys/cygwin.h: Don't define parts of this file that rely on
- Windows headers unless the Windows header was previously included.
-
-Thu Jun 22 20:45:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * registry.cc (load_registry_hive): Use HKEY_USERS when checking
- for existing user hive.
- Use MAX_PATH instead of numerical constant for array size.
- Use return code of RegLoadKeyA instead of GetLastError for error output.
-
-Thu Jun 22 14:27:04 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Add new-libcygwin.a back to all_host target.
-
-Wed Jun 21 14:32:42 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Add *.def to clean operation.
-
-Wed Jun 21 13:18:23 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Add *.exe to clean operation.
-
-Wed Jun 21 01:02:38 2000 Christopher Faylor <cgf@cygnus.com>
-
- * mkvers.sh: Fix sed usage for older seds.
-
-Tue Jun 20 20:46:28 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Don't touch winver_stamp if mkvers.sh was unsuccessful.
-
-Tue Jun 20 17:41:30 2000 Christopher Faylor <cgf@cygnus.com>
-
- * mkvers.sh: Fix problem with handling of CVS tags causing .rc syntax
- errors.
-
-Tue Jun 20 13:38:12 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Change to build the DLL during a cross-compiler build.
-
-Mon Jun 19 20:46:33 2000 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (socket_cleanup): Shutdown I/O on dummy sockets prior to
- closing them.
-
-Mon Jun 19 19:35:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc: Add load statements for `GetSidIdentifierAuthority'
- and `RegLoadKeyA'.
- * registry.cc (get_registry_hive_path): New function.
- (load_registry_hive): Ditto.
- * security.cc (convert_sid_to_string_sid): New function.
- (get_ssid): Renamed to `convert_string_sid_to_sid'.
- (get_pw_sid): Call `convert_string_sid_to_sid' instead of `get_ssid'.
- (get_gr_sid): Ditto.
- (get_admin_sid): Ditto.
- (get_system_sid): Ditto.
- (get_creator_owner_sid): Ditto.
- (get_world_sid): Ditto.
- * shared.h: New prototypes for `get_registry_hive_path' and
- `load_registry_hive'.
- * spawn.cc (spawn_guts): Set child->psid to NULL to force calling
- `internal_getlogin' from child process in case of changing user context.
- Call `load_registry_hive' in case of changing user context.
- (_spawnve): Copy user infos only if user context remains the same.
- * uinfo.cc: Add load statement for `NetUserGetInfo'.
- Remove load statement for `NetGetDCName'.
- (internal_getlogin): Rewrite to speed up process startup
- and to correct user environment in case user context changes.
- (uinfo_init): Call internal_getlogin only if myself->psid is NULL,
- that is user context changes.
- * winsup.h: Add prototypes for `convert_sid_to_string_sid',
- `convert_string_sid_to_sid' and `get_pw_sid'.
-
-Sun Jun 18 13:42:50 2000 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h (set_name): Don't use 'unix' as name since this is defined
- by gcc now.
- * fhandler.cc (set_name): Ditto.
-
-2000-06-17 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * winsup.h (isabspath): Don't report `C:foo' as an absolute path.
-
-Sat Jun 17 13:51:48 2000 Christopher Faylor <cgf@cygnus.com>
-
- * configure.in: Detect "cross-hosting" situation and set appropriate
- variables in Makefile to avoid building excess stuff.
- * configure: Regenerate.
- * Makefile.in: Accommodate above change.
-
-Sat Jun 17 19:52:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * pinfo.cc (pinfo_init): Revert previous patch.
-
-Sat Jun 17 13:29:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * pinfo.cc (pinfo_init): Add missing initializers.
- * uinfo.cc (internal_getlogin): Request domain infos only
- when ntsec is ON.
-
-Fri Jun 16 19:27:27 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Just use library files from this tree when building
- cygrun.exe.
- * path.cc (chdir): Don't set cache to offending chdir. Change comment
- to reflect current reality.
-
-Fri Jun 16 20:55:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Define symbols for `cygwin_logon_user' and
- `cygwin_set_impersonation_token'.
- * dcrt0.cc (dll_crt0_1): Eliminate superfluous conditional
- statements.
- Add load statements for `ImpersonateLoggedOnUser', `LogonUserA'
- and `RevertToSelf'.
- * fork.cc (fork): Care for correct impersonation of parent
- and child process.
- * security.cc (cygwin_set_impersonation_token): New function.
- (cygwin_logon_user): Ditto.
- shared.h (class pinfo): New members `orig_uid', `orig_gid',
- `real_uid' nad `real_gid'.
- spawn.cc (spawn_guts): Care for impersonation when starting
- child process in a different user context.
- * syscalls.cc (setgid): Call `setegid' now. Set real_gid.
- (setuid): Call `seteuid' now. Set real_uid.
- (seteuid): Functionality moved from setuid to here. Care for
- correct impersonation.
- (setegid): Functionality moved from setgid to here.
- * uinfo.cc (uinfo_init): Initialization of additional pinfo
- members.
- (getuid): Return real uid.
- (getgid): Return real gid.
- (geteuid): Return effective uid.
- (getegid): Return effective gid.
- include/sys/cygwin.h: Add prototypes for `cygwin_logon_user' and
- `cygwin_set_impersonation_token'.
- include/cygwin/version.h: Bump API minor version to 22.
-
-Thu Jun 15 15:43:50 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (normalize_posix_path): Convert path to POSIX if it seems to
- be a Windows path.
-
-2000-06-15 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * path.cc (mount_info::add_item): Eliminate a trailing backslash
- included in a native path starting with '//[A-Za-z]/...'.
- * path.cc (mount_info::del_item): Accept a native path as its target.
-
-Wed Jun 14 23:47:19 2000 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc (conv_envvars): Detect and convert all environment
- variables used by libiberty's choose-temp.c
-
-Tue Jun 13 12:41:41 2000 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * path.cc (mount_info::add_item): The previous patch can't handle
- the case of overwriting a mount entry.
-
-Tue Jun 13 00:17:04 2000 Christopher Faylor <cgf@cygnus.com>
-
- * thread.h: Shorten "current_directory" variables to "cwd_*"
- throughout.
- * path.cc: Ditto.
- (normalize_posix_path): Add some extra debugging info.
- (chdir): Ditto. Store chdir'ed posix and MS-DOS directory names in
- "cache" here rather than trying to derive them later.
-
-Sun Jun 11 15:57:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_random.cc (read): Call CryptAquireContext with
- CRYPT_VERIFYCONTEXT.
-
-Thu Jun 8 22:49:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (path_conv::check): Erase two lines checked in
- by mistake.
-
-Thu Jun 8 15:53:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_disk_file::open): Check for directory
- to set O_DIROPEN on directories anyway.
-
-2000-06-07 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * path.cc (mount_info::init): Eliminate the mount_slash feature.
- (mount_slash): Eliminated.
- (mount_info::read_mounts): Eliminate looking up existing entries. The
- loop for deleting cygpath entries is done only when such entries exist.
- (mount_info::from_registry): Eliminate sorting.
- (mount_info::add_item): Call add_reg_mount if necessary. Check nmounts
- more precisely. Use strcasematch in looking up existing entries.
- (mount_info::del_item): Call del_reg_mount if necessary. Use
- strcasematch. Use memmove instead of memcpy.
- (mount_info::import_v1_registry): Everything is done in this method.
- (mount_info::to_registry): Eliminated.
- (mount_info::from_v1_registry): Eliminated.
- (cygwin_umount): Simply call del_item.
- * shared.h: Modify the declaration of add_item and del_item. Remove the
- declaration of from_v1_registry.
-
-Wed Jun 7 23:56:10 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/cygwin/version.h: Bump DLL minor version number to 3.
-
-2000-06-07 DJ Delorie <dj@cygnus.com>
-
- * cygwin.din: add cygwin_dll_init
- * dcrt0.cc (cygwin_dll_init): new
- (dll_crt0_1): short circuit if manually loaded
- * path.cc (mount_info::init): don't init if manually loaded
-
-Wed Jun 7 13:47:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/netinet/in_systm.h: New file.
- * include/cygwin/in_systm.h: Ditto.
-
-Thu Jun 1 01:55:45 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc: Remove unneeded include.
- * dcrt0.cc: Wrap LoadDLLfunc stuff in dummy function.
- * init.cc: Ditto.
- * uinfo.cc: Ditto.
-
-2000-05-31 DJ Delorie <dj@cygnus.com>
-
- * include/cygwin/version.h: use decimal, NOT octal
-
-Wed May 31 16:40:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_disk_file::open): Check for executable
- even if ntsec is on if filesystem doesn't support ACLs.
-
-Wed May 31 15:57:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc: Use LoadDLLfuncEx for loading Crypto API functions
- with parameter `notimp' set to 1.
-
-Tue May 30 16:58:33 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (mount_info::conv_to_win32_path): Previous patch was too
- aggressive in adding a trailing slash.
-
-Mon May 29 20:31:01 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Remove libadvapi32.a.
- * autoload.h: Add additional field to autoload block for handling
- unimplemented functions.
- (LoadDLLfuncEx): New function which accepts additional parameter for
- controlling unimplemented function behavior.
- (LoadDLLfunc): Use LoadDLLfuncEx.
- * dcrt0.cc: Use new arguments for LoadDLLfunc. Add advapi32 routines.
- (noload): Rewrite in assembler. Handle new unimplemented function
- type.
- * exceptions.cc: Eliminate another vestige of StackWalk stuff.
- * net.cc: Use new arguments for LoadDLLfunc.
- * uinfo.cc: Ditto.
-
-Mon May 29 20:18:47 2000 Christopher Faylor <cgf@cygnus.com>
-
- * config.h.in: Remove obsolete define.
- * path.h (isdrive): New macro.
- * dcrt0.cc (globify): Use new macro to determine if a string refers to
- an MS-DOS drive.
- * environ.cc (winenv): Ditto.
- * spawn.cc (find_exec): Ditto.
- * path.cc (get_raw_device_number): Ditto.
- (mount_info::conv_to_posix_path): Ditto.
- (chdir): Ditto.
- (cygwin_posix_path_list_p): Ditto.
- (cygwin_split_path): Ditto.
- (path_conv::check): Move tmp_buf to beginning of function since it can
- be used earlier in the loop. Use tmp_buf rather than 'root' to hold
- root information.
- (mount_info::conv_to_win32_path): Add trailing slash to end of mount
- path when it translates to a drive. Add defensive code to avoid
- writing beyond the end of 'dst'.
-
-Sat May 27 15:57:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_random.cc (read): Use CRYPT_MACHINE_KEYSET in
- call to CryptAcquireContext() to serve users that did not
- log in interactively.
-
-Fri May 26 11:16:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * errno.cc (errmap): Map ERROR_BAD_NET_NAME to errno ENOSHARE.
-
-Fri May 26 02:23:35 2000 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.h (sigframe::set): Accept a default frame pointer.
- * sigproc.cc (sig_send): Use passed in frame pointer, if appropriate.
-
-Thu May 25 17:44:25 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dir.cc (rmdir): Use file attributes that have already been discovered
- by path_conv.
-
-2000-05-25 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * dir.cc (rmdir): Correct the manner in checking the target directory.
-
-Wed May 24 21:59:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc (writable_directory): Comment out previous code,
- return always 1 for now.
- (mkdir): Call set_file_attribute explicitely with S_IFDIR mode bit.
- * syscalls.cc (chown_worker): Ditto.
- (chmod): Ditto.
- * security.cc (get_nt_attribute): Fix error in debug output.
- Never set FILE_DELETE_CHILD for files.
- Construct appropriate inherit attribute according to file type.
-
-2000-05-23 DJ Delorie <dj@cygnus.com>
-
- * syscalls.cc (_cygwin_istext_for_stdio): New, for newlib
- * include/cygwin/version.h: Bump API number for detect old
- programs using old getc/putc macros
-
-2000-05-23 DJ Delorie <dj@cygnus.com>
-
- * dir.cc (writable_directory): handle root directories
-
-Tue May 23 10:09:26 2000 Christopher Faylor <cgf@cygnus.com>
-
- * uname.cc (uname): Use a "s" to denote a snapshot to avoid confusion
- with the number "5".
-
-Tue May 23 10:01:07 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (mount_info::conv_to_posix_path): Avoid putting a trailing
- slash on a directory name when the ms-dos path spec is a root directory
- of a device.
- * registry.cc (reg_key::build_reg): Set 'key_is_invalid' flag rather
- than using an INVALID_HANDLE_KEY.
- (reg_key::get_int): Test for key validity before performing registry
- operations.
- (reg_key::set_int): Ditto.
- (reg_key::get_string): Ditto.
- (reg_key::set_string): Ditto.
- (reg_key::kill): Ditto.
- (reg_key::~reg_key): Ditto.
-
-Tue May 23 01:13:33 2000 Christopher Faylor <cgf@cygnus.com>
-
- * mkvers.sh: Use snapshot date as build date since it is more
- interesting.
- * uname.cc (uname): Detect if this is a snapshot build and add an "S"
- to the version number. Report the snapshot date as the release date.
-
-Mon May 22 17:11:25 2000 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc (regopt): Scan HKLM if HKCU scan fails.
-
-Mon May 16 23:39:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc (rmdir): Care for misleading error messages
- when trying to remove a directory on a samba share.
- Eliminate superfluous else branch.
- * syscalls.cc (_rename): Additional check for ERROR_FILE_EXISTS
- if MoveFile fails.
-
-Sun May 21 20:51:44 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (dll_crt0_1): Move uinfo_init call to before sigproc_init to
- avoid a race.
- (noload): Add an extra argument for debugging.
- * uinfo.cc (uinfo_init): Eliminate test for multiple calls.
- (getlogin): Assume that uinfo_init has already been called.
-
-Sat May 20 01:34:57 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (interruptible): Add an argument to control whether
- function just checks for validity. Flag module handle == 0 as
- noninterrupible.
- (call_handler): Always acquire and release ebp lock. Loop for only a
- fixed amount of time attempting to grab mutos and find an interruptible
- PC.
-
-2000-05-19 DJ Delorie <dj@cygnus.com>
-
- * syscalls.cc (setmode): change mode of any matching FILE* also.
-
-Thu May 18 17:28:19 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Remove external.h dependency.
- * dcrt0.cc (sigthread::init): Move here from sigproc.h.
- * sigproc.h (sigthread): Move init to dcrt0.cc.
-
-Thu May 18 01:28:02 2000 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (thread_pipe): Add paranoid check to ensure thread
- termination.
- * external.cc: Eliminate obsolete include.
- * getopt.c (getopt_long): Fix compiler warning.
- * shared.h: Moved PID_ definitions to include/sys/cygwin so that they
- can be used by external programs.
- * include/sys/cygwin.h: Move external definitions here. Include
- sys/resource.h to avoid having to do this everywhere.
-
-Thu May 18 01:04:02 2000 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.h (sigframe): Don't set frame info unless tid matches this
- thread id.
-
-Wed May 17 23:13:32 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (dll_crt0_1): Initialize mainthread stuff here before
- anything needs it.
- * sigproc.cc (sigproc_init): Move mainthread initialization out of
- here.
- * sigproc.h (sigthread): Add init() method.
- (sigframe): Don't try to initialize muto.
- * sync.cc: Undef WaitForSingleObject to avoid recursion.
-
-2000-05-17 DJ Delorie <dj@cygnus.com>
-
- * testsuite/winsup.api/crlf.c: New
- * testsuite/winsup.api/iospeed.c: New
-
-Wed May 17 01:05:52 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (mount_info::cygdrive_posix_path): Don't add trailing slash
- if referring to something like c:\.
- * dcrt0.cc (dll_crt0_1): Move uinfo initialization prior to sig_send
- initialization to give signal thread a chance to finish.
- * debug.cc (WFSO): Move to sigproc.cc
- (WFMO): Ditto.
- * exceptions.cc (interruptible): Allocate slightly more space for
- directory just for paranoia's sake.
- (call_handler): Eliminate nonmain argument. Determine if main thread
- has set a frame pointer and use it if so.
- (sig_handle): Eliminate nonmain argument.
- * net.cc: Record frame information in appropriate routines throughout.
- * select.cc (select): Ditto.
- * sigproc.cc: Use sigthread structure to record mainthread id
- throughout.
- (sig_send): Record frame information for signal handler.
- (wait_sig): Reflect argument change in sig_handle.
- (WFSO): Move here and record frame information for signal handler.
- (WFMO): Ditto.
- * sigproc.h: Implement new "sigthread" class. Implement "sigframe"
- class for manipulating signal frame info.
- * thread.cc (__pthread_kill): Use standard _kill() function rather than
- calling sig_send directly.
- * winsup.h: Eliminate ebp element from signal_dispatch class.
-
-Tue May 16 23:39:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- Patch suggested by John Rowley <wjr@bgs.ac.uk>
- * fhandler_tape.cc (fhandler_dev_tape::ioctl): Check
- for filemark feature on MTWEOF operation.
-
-Tue May 16 11:49:13 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/cygwin/in.h (AF_INET6): Use correct in6_addr struct.
-
-Mon May 15 00:35:35 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/cygwin/version.h: Bump DLL minor version number to 2.
-
-Sun May 14 23:41:24 2000 Christopher Faylor <cgf@cygnus.com>
-
- * shared.h: Bump PROC_MAGIC.
- * include/cygwin/version.h: Bump API minor to accommodate two recent
- exports.
-
-2000-05-13 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/cygwin/socket.h (AF_INET6): Use same value as winsock2.
-
-2000-05-12 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/cygwin/in.h (struct in6_addr): Fix spelling.
- * include/cygwin/socket.h (AF_INET6, PF_INET6): Define macros.
- (AF_MAX, PF_MAX): Bump to 32 to leave room for future expansion.
-
-Fri May 12 21:35:54 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (build_argv): Remove unneeded variable.
- * select.cc (peek_pipe): Don't check for "ready" if it's already set.
- (peek_console): Ditto.
- (peek_serial): Ditto.
- (peek_socket): Ditto.
- (peek_windows): Ditto.
-
-Fri May 12 20:31:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_raw.cc (write_file, read_file): New wrapper functions
- for WriteFile and ReadFile to get rid of ERROR_MEDIA_CHANGED
- and ERROR_BUS_RESET in case of first access to tape.
- (fhandler_dev_raw::raw_write): Use write_file instead of WriteFile.
- (fhandler_dev_raw::raw_read): Use read_file instead of ReadFile.
-
-Fri May 12 01:04:57 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in (DLL_OFILES): Sort.
- * fhandler_tty.cc (fhandler_tty_slave::send_ioctl_request): Eliminate.
- (fhandler_tty_slave::ioctl): Rewrite to avoid races.
-
-2000-05-11 Mumit Khan <khan@xraylith.wisc.edu>
-
- * mmap.cc (list::erase): Increment loop counter.
- (map::erase): Likewise.
-
-Thu May 11 00:54:00 2000 Charles Wilson <cwilson@ece.gatech.edu>
-
- * cygwin.din: insure that regsub() is included in
- cygwin1.dll
-
-Tue May 9 18:59:41 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Use appropriate VARIABLE to refer to cygwin.def in load
- line.
-
-Thu May 9 23:53:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::puts_readahead): Change
- while condition to disallow wild runs.
-
-Thu May 9 15:24:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- Patch suggested by <lha@stacken.kth.se>
- * window.cc (setitimer): Check for overflow condition
- in tv_sec.
-
-Thu May 9 0:47:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- Patch suggested by Eric Fifer <EFifer@sanwaint.com>
- * errno.cc: Change mapping of ERROR_BAD_PATHNAME to ENOENT.
-
-Thu May 9 0:47:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink::info): Treat non readable files
- as normal non symlink files.
-
-2000-05-08 Paul K. Fisher <pfisher@plexware.com>
-
- * include/pthread.h (pthread_detach): Add missing prototype.
- (pthread_join): same.
-
-2000-05-08 DJ Delorie <dj@cygnus.com>
-
- * fhandler.cc (lock): use signed math to allow checking ranges
- properly.
-
-Sat May 6 23:22:25 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (insert_file): Eliminate unused parameter.
- (build_argv): Ditto.
- * exceptions.cc (stack): Eliminate unused parameters.
- (stackdump): Ditto.
- (cygwin_stackdump): Reflect above changes.
- (sig_handle): Ditto.
- * fhandler.cc (fhandler_base::set_inheritance): Use kludge to avoid
- unused parameter warning.
-
-2000-05-06 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/wchar.h (wcscmp, wcslen): Fix prototypes.
- * syscalls.cc (wcslen, wcscmp): Adjust.
-
-Fri May 5 23:32:07 2000 Christopher Faylor <cgf@cygnus.com>
-
- * errno.cc (errmap): Correct DIRECTORY mapping to ENOTDIR.
-
-2000-05-04 Mumit Khan <khan@xraylith.wisc.edu>
-
- * Makefile.in (install): Install profile startup and library.
-
-Wed May 3 21:54:11 2000 Christopher Faylor <cgf@cygnus.com>
-
- * configure.in: Use -gstabs+ as compile debug option. This seems to
- promote better handling of symbols.
- * configure: Regenerate.
- * delqueue.cc (delqueue_list::process_queue): Allow ERROR_ACCESS_DENIED
- to indicate that a file is being shared under Windows 95.
- * syscalls.cc (_unlink): Use full path name. Take special action for
- Windows 95. Assume that an ERROR_ACCESS_DENIED indicates a sharing
- violation unless it's on a remote drive. Punt if there is an
- ERROR_ACCESS_DENIED on a remote drive.
-
-Wed May 3 18:07:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * errno.cc (errmap): Map ERROR_BAD_NETPATH to new errno ENOSHARE.
- (_sys_errlist): Add entry for ENOSHARE.
- (strerror): Add case for ENOSHARE.
- * syscalls.cc (stat_worker): Check for errno ENOSHARE.
-
-Wed May 3 17:28:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in: Add dependencies for fhandler_random.o
- * fhandler.h: Add device type FH_RANDOM. Add class
- fhandler_dev_random.
- * fhandler_random.cc: New file. Implementation of
- fhandler_dev_random.
- * hinfo.cc (build_fhandler): Add case for FH_RANDOM.
- * path.cc: Add device names for random devices to
- windows_device_names.
- (get_device_number): Add if branch for random devices.
- (win32_device_name): Add device name generation for
- random devices.
- winsup.h: Include <wincrypt.h>.
-
-2000-05-02 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * path.cc (mount_info::conv_to_win32_path): Previous patch
- failed to set flags on a win32 path.
-
-Tue May 2 11:34:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (read_sd): Return 1 on success because we
- can't rely on the returned SD size from GetFileSecurity.
-
-Tue May 2 2:22:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc: Add dynamic load code for `OemToCharA' from user32.dll.
- * security.cc (read_sd): Call `OemToCharA' to make
- `GetFileSecurity' happy on filenames with umlauts.
-
-Wed Apr 26 23:23:23 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (normalize_win32_path): Don't add a trailing slash when one
- already exists.
- (mount_info::conv_to_win32_path): Use existing code for dealing with
- relative path names when input is already a win32 path.
-
-2000-04-26 DJ Delorie <dj@cygnus.com>
-
- * Makefile.in (install): install regexp.h
-
-Wed Apr 26 16:20:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (stat_worker): Previous patch could succeed
- in stating a non-existant file.
-
-Wed Apr 26 01:07:16 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (interruptible): Allocate slightly more space for
- directory name check. Windows 95 seems to null-terminate the directory
- otherwise.
- (interrupt_on_return): Issue a fatal error if we can't find the
- caller's stack.
-
-Tue Apr 25 16:50:54 2000 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (find_exec): Accept a path_conv argument rather than a
- buffer so that the caller can find things out about a translated path.
- (perhaps_suffix): Ditto.
- (spawn_guts): Allocate path_conv stuff here so that we can find out
- stuff about the translated path (this is work in progress).
- * environ.cc (environ_init): Accept an as-yet unused argument
- indicating whether we were invoked from a cygwin parent or not.
- (winenv): Ditto.
- (posify): Accept an argument indicating whether the path has already
- been translated.
- * dlfcn.cc (check_access): Provide a path_conv buffer to find_exec.
- * exec.cc (sexecvpe): Ditto.
- * path.cc (path_conv::check): Rename from path_conv::path_conv.
- (mount_item::getmntent): Recognize "Cygwin executable" bit.
- (symlink_info::check): Remove debugging statements.
- * path.h (class path_conv): Add iscygexec method. Rewrite constructor
- to call "check" method to allow multiple operations on a path_conv
- variable.
- * pinfo.cc (pinfo_init): Pass argument to environ_init.
- * shared.h: Bump PROC_MAGIC.
- * winsup.h: Reflect above changes to function arguments.
- * include/sys/mount.h: Add MOUNT_CYGWIN_EXEC type.
-
-Thu Apr 25 21:35:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (stat_worker): Previous patch failed to stat
- each drives root dir on 9X.
-
-Thu Apr 25 16:37:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_disk_file::open): Check for allow_ntsec
- when determining exec flag.
- * path.cc (symlink_info::check): Remove call to get_file_attribute().
- * security.cc (read_sd): Rename, ditto for variables to conform
- to common naming convention. Use GetFileSecurity() instead of
- BackupRead() to avoid permission problems when reading ACLs.
- (write_sd): Same renaming as for read_sd().
- (alloc_sd): Change default permissions according to Linux permissions
- for group and world when write permission is set.
- * syscalls.cc (stat_worker): Avoid different permission problems
- when requesting file informations.
-
-Thu Apr 25 10:50:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc: Avoid a warning in declaration inet_network.
-
-Mon Apr 24 17:38:25 2000 Thorsten Otto <t.otto@germanynet.de>
-
- * fhandler_console.cc (fhandler_console::read): Detect extended keycode
- information for Windows 9x so that function keys will work correctly.
-
-2000-04-24 Vadim Egorov <egorovv@mailandnews.com>
-
- * net.cc (cygwin_inet_network): new function.
- * cygwin.din (inet_network): new export
-
-Fri Apr 21 10:37:08 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (normalize_posix_path): Previous two patches were still
- incorrect so rewrite this function to deal with trailing dots.
- (mount_info::conv_to_win32_path): Just check for '/' where appropriate.
- Eliminate nofinalslash call since it is handled in normalize_posix_path
- now.
-
-Thu Apr 20 17:32:42 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (handle_exceptions): Search further for stack info to
- accommodate Windows 95.
-
-Thu Apr 20 16:39:18 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (normalize_posix_path): Previous change failed to take root
- access into account.
-
-Thu Apr 20 11:26:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (_link): Check new link path for trailing dot.
-
-Thu Apr 20 00:32:03 2000 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h (fhandler_base::hclose): New virtual method.
- (fhandler_base::set_inheritance): Make this a method so that we can use
- the appropriate close methods.
- * fhandler.cc (fhandler_base::set_inheritance): Ditto.
- * path.cc (normalize_posix_path): Eliminate /. trailing path
- component.
-
-Wed Apr 20 0:19:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (setuid): Allow switching user context after
- successful call to ImpersonateLogedOnUser (NT only).
- (setgid): Ditto.
- (seteuid): Call setuid.
- (setegid): Call setgid.
-
-Wed Apr 19 22:00:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * uinfo.cc (internal_getlogin): Use NetGetDCName() instead
- of NetGetAnyDCName().
-
-Mon Apr 17 12:08:47 2000 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * syscalls.cc (_rename): Try MoveFile() at first before
- MoveFileEx(..., MOVEFILE_REPLACE_EXISTING).
-
-Tue Apr 18 19:15:29 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (globify): Don't use \ quoting when apparently quoting a DOS
- path spec, even within a quoted string.
-
-Sun Apr 16 18:54:21 2000 Christopher Faylor <cgf@cygnus.com>
-
- * init.cc (dll_entry): Use better check for determining when to set
- thread specific stuff.
- * syscalls.cc (_unlink): Continue with chmod'ing file even if
- DELETE_ON_CLOSE succeeds, if file still exists.
-
-Fri Apr 14 23:51:15 2000 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_console.cc (keytable): Add support for keypad 5 key, which
- MS seems to think is equivalent to VK_CLEAR.
- * debug.cc (thread_stub): Eliminate initialization of reent stuff.
- * init.cc (dll_entry): Move it here.
-
-Thu Apr 13 18:32:26 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (insert_file): Avoid freeing previously allocated argument
- list.
- * path.cc (symlink_info::check): Rename from symlink_check_one. Use
- new symlink_info struct for communication.
- (path_conv::path_conv): Use symlink_info structure for communication
- with symlink_info::check. Fix typo which resulted in symbolic links
- always being resolved.
- (readlink): Use stat_suffixes array when resolving a link.
- * syscalls.cc (stat_suffixes): Make global.
-
-Thu Apr 13 20:50:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/version.h: Bump minor api to reflect export change.
-
-Thu Apr 13 8:48:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (conv_to_win32_path): Detect a win32 path
- if path contains backslashes.
- * cygwin.din: Add symbol for `lacl'.
- * security.cc (ReadSD): Add debug output.
- (acl_worker): New static function.
- (acl): Call acl_worker now.
- (lacl): New function.
- (facl): Call acl_worker now.
- * include/cygwin/acl.h: Add prototype for `lacl'.
-
-Wed Apr 12 18:48:33 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (path_conv::path_conv): Ensure that suffix is correctly
- copied to path when we've found a symlink but aren't following
- symlinks.
-
-Sat Apr 8 00:46:14 2000 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.cc (fhandler_disk_file::fstat): Allocate enough space for
- root dir determination or overflow an array.
-
-Sat Apr 8 00:08:53 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (sigsave): Copy on fork so that we can restore correct
- behavior in forked process.
- (interruptible): Flag as interruptible when running in main process
- module.
- (interrupt_setup): Save return address and address of return address.
- (signal_fixup_after_fork): New function. Uses above two values to
- restore proper behavior to forked process.
- (interrupt_on_return): Pass return address address to interupt_setup.
- (interrupt_now): Pass NULL for return address address to
- interrupt_setup.
- * fork.cc (fork): Call signal_fixup_after_fork.
- * shared.h: Lint cleanups.
- * winsup.h: Ditto.
-
-Mon Apr 3 14:10:44 2000 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h (select_stuff): Eliminate use of 'total'.
- * select.cc (cygwin_select): Ditto.
- (select_stuff::wait): Use maximum size for w4 rather than calculating
- what will fit.
-
-Mon Apr 03 13:58:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * grp.cc (parse_grp): Save empty array instead of
- NULL in gr_mem if no supplementary group is given.
-
-Sun Apr 02 16:02:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (chown_worker): Use previous uid/gid if
- new uid/gid is -1.
-
-Fry Mar 31 22:55:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (chown_worker): New static function with
- chown functionality.
- (chown): Call chown_worker with SYMLINK_FOLLOW.
- (fchown): New function. Call chown_worker with SYMLINK_FOLLOW.
- (lchown): New function. Call chown_worker with SYMLINK_IGNORE.
- * cygwin.din: Add symbols for fchown, lchown.
-
-Fry Mar 31 11:18:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink): Call `set_file_attribute()' and
- `SetFileAttributeA()' instead of `chmod()' to set
- uid/gid correct.
-
-Wed Mar 29 22:49:56 2000 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h (select_record): Explicitly zero elements of this class.
- (select_stuff): Ditto.
- * select.cc (cygwin_select): Eliminate memset zero of sel.
-
-Tue Mar 28 16:45:42 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Use default rules when compiling cygrun.o.
- * dcrt0.cc (host_dependent_constants::init): Limit non-NT platforms to
- 32K chunks when copying regions during a fork.
- * path.cc (symlink_check_one): Add temporary debugging output.
- Simplify PATH_EXEC test.
- * syscalls.cc (stat_suffixes): Null terminate this list.
-
-Sat Mar 25 20:46:39 2000 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (symlink_check_one): Recognize symlink settings from the
- mount table.
- * path.h: Make PATH_SYMLINK an alias for MOUNT_SYMLINK.
- * syscalls.cc (stat_worker): Use extension search mechanism in
- path_conv to look for .exe rather than trying to special case it here.
- * mount.h: Make MOUNT_SYMLINK a real option.
-
-Sat Mar 25 00:22:32 2000 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc: Add TMPDIR to the list of environment variables which are
- converted to POSIX format.
- * sigproc.cc (proc_terminate): Don't attempt to delete when a muto
- pointer is NULL.
-
-Sun Mar 19 12:01:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (stat_worker): Set st_nlink to 1 on remote drives.
-
-Sat Mar 18 23:04:27 2000 Christopher Faylor <cgf@cygnus.com>
-
- * times.cc: Fix extern declarations for variables that are exported but
- used by this modules.
-
-Sat Mar 18 01:32:04 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (host_dependent_constants::init): Eliminate DELETE flag
- from shared constant.
-
-Sat Mar 18 01:24:25 2000 Christopher Faylor <cgf@cygnus.com>
-
- * delqueue.cc (delqueue_list::queue_file): Add some debugging.
- * path.h (class path_conv): Add a char * operator for the most common
- case.
- * syscalls.cc (_unlink): Rewrite to use FILE_FLAG_DELETE_ON_CLOSE when
- possible (i.e., on NT).
-
-Fri Mar 17 18:16:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- Patch suggested by Eric Fifer <EFifer@sanwaint.com>
- * fhandler.cc (fhandler_base::open): Call set_file_attribute()
- only if a file is really created.
-
-Thu Mar 16 14:15:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (set_process_privileges): Remove `static'.
- (get_nt_attribute): Returns uid and gid additionally. Remove call
- to set_process_privileges().
- (get_file_attribute): Returns uid and gid additionally. Don't
- call ntea if ntsec is ON.
- (set_nt_attribute): Remove call to set_process_privileges().
- Don't call ntea if ntsec is ON.
- (acl): Remove call to set_process_privileges().
- * dcrt0.cc (dll_crt0_1): Call set_process_privileges().
- * winsup.h: New prototype for set_process_privileges(),
- changed prototype for get_file_attribute().
- * fhandler.cc (get_file_owner): Discard function.
- (get_file_group): Ditto.
- (fhandler_disk_file::fstat): Discard calls to get_file_owner() and
- get_file_group().
- * path.cc (path_conv::path_conv): New debugging output for result
- of GetVolumeInformation().
- (mount_info::conv_to_win32_path): Call backslashify() with pathbuf
- instead of src_path.
- * syscalls.cc (chown): Reformat slightly.
- (chmod): Replace get_file_owner() and get_file_group() calls
- by a call to get_file_attribute(). Discard local variable has_acls.
- Reformat slightly.
- (stat_worker): Root dir check now done by a call to rootdir().
- Don't call num_entries() on remote drives.
- Discard local variable has_acls.
-
-Wed Mar 15 20:38:06 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * errno.cc: Map ERROR_NOACCESS to EFAULT.
-
-Wed Mar 15 14:25:38 2000 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (spawn_guts): Restore dependency on signal_arrived. It's
- needed to wake up the WaitForSingleObject.
-
-Tue Mar 14 23:41:16 2000 Christopher Faylor <cgf@cygnus.com>
-
- Pipe changes throughout suggested by Eric Fifer <EFifer@sanwaint.com>
- * debug.cc (threadname_init): Pass name of lock as arg 2 of new_muto.
- * malloc.cc (malloc_init): Ditto.
- * sigproc.cc (sigproc_init): Ditto.
- * exceptions.cc (events_init): Ditto.
- (call_handler): Eliminate special case for hExeced. Report locked
- thread in debugging output.
- * fhandler.cc (fhandker_pipe::fhandler_pipe): Propagate device type to
- base class.
- * fhandler.h (fhandler_pipe): Ditto.
- * hinfo.cc (hinfo::build_fhandler): Pass specific type of pipe to
- constructor.
- * spawn.cc (spawn_guts): Eliminate dependency on signal when waiting
- for subprocess.
- * strace.cc: Remove obsolete #ifdef.
- * sync.cc (muto::muto): Save the name of the muto.
- (muto:~muto): Also release the muto.
- * sync.h: Add a muto name field.
- * select.cc (peek_pipe): Avoid doing a PeekNamedPipe on the write end
- of a pipe.
-
-Sun Mar 12 01:14:33 2000 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.cc (fhandler_base::get_readahead_into_buffer): New function.
- * fhandler.h: Declare new function. Add extra argument to
- process_slave_output.
- * fhandler_console.cc (fhandler_console::read): Move read ahead code to
- new function.
- * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Move
- common code here.
- (fhandler_tty_slave::read): Understand readahead.
- (fhandler_pty_master::read): Move code to process_slave_output.
- * select.cc (peek_pipe): Avoid performing certain checks when non-read
- and on inappropriate fh types.
-
-Sat Mar 11 22:47:43 2000 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_console.cc (fhandler_console::read): Don't even think about
- breaking on interrupt if executing in a "cygwin" thread.
- * fhandler_tty.cc (fhandler_pty_master::process_slave_output):
- Streamline, simplify code.
- * sigproc.cc (sig_send): Remove debugging statement.
-
-Fri Mar 10 13:20:50 2000 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc: Set wait_sig priority to normal.
-
-Fri Mar 10 13:03:06 2000 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc (wait_sig): Add addtional debugging output.
-
-Thu Mar 9 15:25:01 2000 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc: Eliminate oldstack CYGWIN option.
- * exceptions.cc (sfta): Eliminate obsolete function.
- (sgmb): Eliminate obsolete function.
- (class stack_info): Remove MS method for walking the stack.
- (stack_info::init): Just initialize required fields.
- (stack_info::brute_force): Rename to stack_info::walk.
- (handle_exceptions): Pass derived frame pointer to sig_send.
- (interrupt_setup): Clear saved frame pointer here.
- (interrupt_on_return): thestack is no longer a pointer.
- (call_handler): Accept a flag to indicate when a signal was sent from
- other than the main thread. Use saved frame pointer for determining
- where to place signal handler call.
- (sig_handle): Accept "nonmain" argument. Pass it to call_handler.
- * fhandler_tty.cc (fhandler_tty_common::__acquire_output_mutex): Change
- debugging output slightly.
- * (fhandler_tty_common::__release_output_mutex): Ditto.
- (fhandler_tty_slave::read): Fix a comment, remove a goto.
- * sigproc.cc (sig_send): Accept an optional frame pointer argument for
- use when suspending the main process. sigcomplete_main is an autoreset
- event now. Save frame pointer for non-main operation.
- (wait_sig): Make sigcomplete_main an autoreset event. Eliminate
- NOSIGQUEUE. Pass rc to sig_handle to signify if this was a nonmain
- process.
- * sigproc.h: Reflect change to sig_send argument.
- * syscalls.cc (swab): Eliminate swab function since it is now available
- in newlib.
- * winsup.h (signal_dispatch): Change CONTEXT cx to DWORD ebp.
-
-Tue Mar 7 13:31:10 2000 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc (sig_send): Eliminate sync_sig_send synchronization since
- it didn't seem to affect the "bash hangs" problem.
-
-Tue Mar 7 13:17:56 2000 Christopher Faylor <cgf@cygnus.com>
-
- * mcount.c: Remove strace.h include.
-
-Tue Mar 7 00:29:34 2000 Christopher Faylor <cgf@cygnus.com>
-
- Throughout use strace class in place of individual functions and
- variables.
- * cygwin.din: Eliminate _strace_wm.
- * sigproc.cc (wait_sig): Temporarily add more debugging output.
- * include/cygwin/version.h: Bump minor api to reflect export change.
-
-Sun Mar 5 01:17:05 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (call_handler): Streamline to use only one call to
- ResumeThread.
- * sigproc.cc (sig_send): Use a muto around the ReleaseSemaphore.
- Remove priority setting since it didn't solve anything.
-
-Tue Feb 29 00:46:09 2000 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc (sig_send): Temporarily set priority to highest while
- sending a signal.
-
-Mon Feb 28 11:23:29 2000 Christopher Faylor <cgf@cygnus.com>
-
- * pinfo.cc (set_myself): Add build date to strace output.
-
-Mon Feb 28 11:17:30 2000 Eric Fifer <EFifer@sanwaint.com>
-
- * sigproc.cc (proc_subproc): Only clear wait event when not attending
- to a signal.
-
-Mon Feb 28 00:08:09 2000 Christopher Faylor <cgf@cygnus.com>
-
- * configure.in: Remove --enable-strace-hhmmss option.
- * configure: Regenerate.
-
-Sun Feb 27 23:11:57 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (set_os_type): Record OS name string.
- (getprogname): Eliminate obsolete function.
- (dll_crt0_1): Move initial strace initialization output to set_myself.
- * exceptions.cc (interruptible): Add debugging output.
- (interrupt_setup): New function.
- (interrupt_now): Use interrupt_setup to set up common interrupt handler
- stuff.
- (interrupt_on_return): Ditto.
- (call_handler): Move signal_arrived arm and clear threads to region
- where signalled thread is suspended or suffer races.
- * pinfo.cc (set_myself): Output interesting information when strace is
- first initialized. Initialize progname here.
- * sigproc.cc (sig_dispatch_pending): Modify to ensure that flush signal
- are sent synchronously.
- * strace.cc (strace_vsprintf): Move code into strace program.
- * uname.cc (uname): Use 'osname' global to construct cygwin name +
- Windows type + version.
-
-Fri Feb 25 19:26:42 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (interruptible): Make a little more structured.
- (call_handler): Allow signals to be sent even if signalled thread is
- stopped. Change order of signal_arrived arming/waiting threads
- clearing to eliminate a race.
- (reset_signal_arrived): New helper function.
- * malloc.cc (malloc_init): Use mutos so that signal handler can keep
- track of who owns the lock.
- (__malloc_lock): Ditto.
- (__malloc_unlock): Ditto.
- * sync.h (new_muto): Actually use a muto for the "buffer".
- * Makefile.in: Fix a dependency.
-
-2000-02-25 DJ Delorie <dj@cygnus.com>
-
- * Makefile.in: fix "make check" support and cygrun.
-
-Thu Feb 24 15:56:00 2000 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.c (_read): Clear errno before doing any read operation.
-
-Thu Feb 24 14:45:06 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (call_handler): Use new muto linked list to look for
- all potential mutos owned by suspended thread. Clear waiting threads
- while thread is stopped.
- (proc_subproc): Clarify debugging output.
- * sync.h (class muto): Add 'next' field.
- (new_muto): Keep linked list alive.
-
-Thu Feb 24 00:59:15 2000 Christopher Faylor <cgf@cygnus.com>
-
- Fix final round of gcc warnings relating to unused parameters.
- * debug.cc (iscygthread): New function.
- * debug.h: Declare it.
- * exceptions.cc (set_process_mask): Flush pending signals.
- (handle_sigsuspend): No need to flush pending signals.
- (call_handler): Refine previous tests of muto ownership. Only clear
- wait()'s when we have definitely responded to a signal.
- * fhandler_console.cc (fhandler_console::read): Don't set EINTR if
- executing in a "cygwin" thread.
- * sigproc.cc (proc_subproc): Use second argument to control whether
- CLEARWAIT actually sets "signalled" flag.
- * sync.h (muto): Add 'unstable' method.
-
-Wed Feb 23 21:59:44 2000 Christopher Faylor <cgf@cygnus.com>
-
- * hinfo.cc (hinfo::extend): Clean up debugging output.
-
-Wed Feb 23 21:34:58 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (interruptible): Change method for determining if
- something is interruptible.
- (call_handler): Avoid suspending a thread if it owns a muto. Only set
- signal_arrived if the thread was actually interrupted.
- (events_init): Initialize module information needed by interruptible().
- * init.cc (dll_entry): Record module handle of main for use by
- interruptible().
- (proc_subproc): Reorganize handling of terminated child so that the
- bulk of the processing comes from the signal thread.
- (wait_sig): Force processing of waiting threads if SIGCHLD is not
- processed.
-
-Tue Feb 22 23:06:01 2000 Christopher Faylor <cgf@cygnus.com>
-
- Respond to more g++ warnings relating to initializing structures.
-
-Mon Feb 21 18:36:37 2000 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.cc (set_inheritance): Revert previous patch which got rid of
- 'name' parameter.
-
-Mon Feb 21 00:19:40 2000 Christopher Faylor <cgf@cygnus.com>
-
- Respond to a multitude of new g++ warnings.
-
-Sun Feb 20 22:10:21 2000 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc (getwinenv): Make __stdcall.
- (winenv): Ditto.
- * malloc.cc (strdup): New function. Occludes newlib version.
- (_strdup_r): Ditto.
- * winsup.h: Reflect above __stdcall changes.
-
-Sun Feb 20 21:31:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_disk_file::fstat): Modify get_file_attribute
- return value if FILE_ATTRIBUTE_READONLY is set.
-
-Thu Feb 17 11:00:23 2000 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc (environ_init): Cosmetic change.
-
-Mon Feb 7 16:50:44 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: cygrun needs libshell32.a.
-
-Sun Feb 6 22:17:58 2000 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc (proc_subproc): Simplify case for when a child process is
- stopped since new signal handler ensures the desired behavior.
-
-Sun Feb 6 21:52:33 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Fix install target so that directories will be created
- when necessary.
-
-Sun Feb 6 18:12:17 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: exceptions.cc should depend on autoload.h.
- * exceptions.cc: Undef DECLSPEC_IMPORT prior to including imagehlp.h to
- avoid defining StackWalk as "import".
- (call_handler): Minor optimizations.
- (sig_handle_tty_stop): Fix typo in previous checkin.
- * sigproc.cc (sigproc_init): Ditto, for signal_arrived initialization.
-
-Sat Feb 5 15:37:37 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (isquote): Convert to inline function.
-
-Sat Feb 5 00:26:01 2000 Christopher Faylor <cgf@cygnus.com>
-
- Throughout, rename global_signal_arrived to signal_arrived.
- Throughout, eliminate use of arm_signals and __signal_arrived.
- Throughout, revert to use of simple call to WaitForSingleObject or
- WaitForMultipleObjects.
- * debug.h: Eliminate obsolete function declaration.
- * exceptions.cc (sigWaitForSingleObject): Eliminate obsolete function
- definition.
- * fhandler.h: Reflect change to select_stuff wait method.
- * fhandler_tape.cc (get_ll): Accommodate new w32api LARGE_INTEGER
- definition.
- * ntea.c (NTReadEARaw): Ditto.
- (NTWriteEA): Ditto.
- * security.cc (ReadSD): Ditto.
- (WriteSD): Ditto.
- * syscalls.cc (_link): Ditto.
- * uname.cc (uname): Eliminate PPC switch.
-
-2000-02-01 Salvador Eduardo Tropea <salvador@inti.gov.ar>
-
- * include/io.h: add return type to setmode()
-
-2000-01-27 DJ Delorie <dj@cygnus.com>
-
- * include/netdb.h (h_errno): change __imp_ to dllimport
- * cygwin.din (reent_data): add DATA
-
-Thu Jan 27 01:07:14 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (call_handler): Add debugging output.
- * select.cc (MAKEready): Arm signals earlier.
- * sigproc.cc (__signal_arrived:arm): Move debugging version of this
- method here.
- (__signal_arrived::release): Ditto.
- * sigproc.h: Recognize debugging versions of above two methods.
- (arm_signals::WaitForMultipleObjects): Don't release signal lock unless
- signal arrived.
- (arm_signals::WaitForMultipleSingleObject): Ditto.
- (arm_signals::MsgWaitForMultipleObjects): Ditto.
-
-Thu Jan 27 00:19:26 2000 Christopher Faylor <cgf@cygnus.com>
-
- * sync.h (new_muto): Workaround change in gcc behavior.
-
-Wed Jan 26 12:57:13 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Ensure that all required libraries are built prior
- to linking cygrun.exe.
-
-Tue Jan 25 21:26:57 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (sig_handle): Crudely work around potential problem
- when main thread has a lock but is killed by a fatal signal.
- * fhandler_tty.cc (fhandler_pty_master::write): Don't perform line
- editing on the pty master (so why do we need the second argument to
- line_edit, then?)
- * thread.cc: Reformat to GNU standards.
-
-2000-01-11 DJ Delorie <dj@cygnus.com>
-
- * ROADMAP: new
-
-2000-01-11 DJ Delorie <dj@cygnus.com>
-
- * fhandler_zero.cc: new, emulate /dev/zero
- * testsuite/winsup.api/devzero.c: new, test /dev/zero
- * Makefile.in: build fhandler_zero.o
- * fhandler.h: add support for /dev/zero
- * hinfo.cc: ditto
- * path.cc: ditto
-
-2000-01-11 DJ Delorie <dj@cygnus.com>
-
- * mmap.cc (mmap): MSDN says *one* of FILE_MAP_*, fix flags for
- MAP_PRIVATE.
-
-Mon Jan 10 01:11:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (acl_access): New function.
- * syscalls.cc (access): Call acl_access if ntsec is on.
-
-Mon Jan 10 01:11:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (get_file_owner): Use of ReadSD() instead of
- GetFileSecurity().
- (get_file_group): Ditto.
-
-Sun Jan 9 15:43:07 2000 Christopher Faylor <cgf@cygnus.com>
-
- * debug.cc (struct thread_start): Add a flag to determine whether a
- field is in use. Eliminate thread_start_ix since it was not
- thread-safe.
- (thread_stub): Use notavail flag to control whether the entry in
- start_buf can be reused.
- (makethread): Ditto.
-
-Sun Jan 9 20:18:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (alloc_sd): Rearrange order of ACE creation.
- (setacl): Optimize creation of ACEs related to inheritance. Code
- cleanup.
- (aclcheck): Disable check for existance of DEF_)CLASS_OBJ.
-
-Sat Jan 8 18:42:32 2000 Christopher Faylor <cgf@cygnus.com>
-
- * mkvers.h: Reorg fix.
-
-Sat Jan 8 20:00:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Add new acl API calls.
- * grp.cc (getgroups): Change to work for any username.
- * security.cc (get_id_from_sid): Change to work with acl API.
- (is_grp_member): New function.
- (get_nt_attribute): Rewritten.
- (add_access_allowed_ace): New function.
- (add_access_denied_ace): Ditto.
- (alloc_sd): Rewritten.
- (setacl): New function.
- (getace): Ditto.
- (searchace): Ditto.
- (getacl): Ditto.
- (acl): Ditto.
- (facl): Ditto.
- (aclcheck): Ditto.
- (acecmp): Ditto.
- (aclsort): Ditto.
- (acltomode): Ditto.
- (aclfrommode): Ditto.
- (acltopbits): Ditto.
- (aclfrompbits): Ditto.
- (permtostr): Ditto.
- (acltotext): Ditto.
- (permfromstr): Ditto.
- (aclfromtext): Ditto.
- * syscalls.cc (access): Set errno again when needed.
- * include/cygwin/acl.h: New file.
- * include/sys/acl.h: Ditto.
-
-Sat Jan 8 14:46:19 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Add cygwin DLL specific CFLAGS define.
-
-Fri Jan 7 21:01:57 2000 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (interrupt_on_return): Properly coerce assignment of
- sigsave.func.
-
-2000-01-07 Mumit Khan <khan@xraylith.wisc.edu>
-
- * acconfig.h: New file.
- * configure.in Add check for memset builtin.
- (AC_CONFIG_HEADER): Use.
- (STRACE_HHMMSS): Define instead of substituting.
- (_MT_SAFE): Likewise.
- (_CYG_THREAD_FAILSAFE): Likewise.
- (DEBUGGING): Likewise.
- (MT_SAFE): Substitute as a yes/no variable.
- * Makefile.in: Remove DEBUGGING, STRACE_HHMMSS, and THREAD_FAILSAFE
- variables and add DEFS. Update usage of MT_SAFE to reflect yes/no
- values. Add config.h to winsup.h dependency.
- (CFLAGS_CONFIG): Update.
- (INCLUDES): Prepend `-I.'.
- * utils/Makefile.in (INCLUDES): Likewise.
- * winsup.h: Conditionally include config.h.
- * thread.cc: Likewise.
- * config.h.in: Generate new file.
- * configure: Regenerate.
-
-
-Fri Jan 7 16:21:01 2000 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (dll_crt0): Allow signal handling for dynamically loaded
- case.
-
-Thu Jan 6 00:30:12 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink_check_one): Initialize local variable `unixattr'
- before calling `get_file_attribute'.
- * syscalls.cc (chown): Ditto.
- * security.cc (get_nt_attribute): Eliminate attribute copying from
- world to user/group in case of missing ACEs.
- (alloc_sd): Set special rights for administrators group only if it's
- neither owner nor group.
- * utils/mkpasswd.c: Create entry for local group administrators (SID
- 544).
-
-Thu Jan 6 00:21:31 2000 Christopher Faylor <cgf@cygnus.com>
-
- Change function calls to __stdcall throughout.
- * exceptions.cc (handle_exceptions): Probe stack for return address to
- use with new signal method. Fill out sigsave.cx with this information.
- (call_handler): Use sigsave.cx if it is available, rather than trying
- to find the context of the main thread.
- (interrupt_on_return): Use address of context rather than
- pass-by-reference.
- (interrupt_now): Ditto.
-
-Thu Jan 6 00:21:31 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * grp.cc (getgroups): Return supplementary groups now.
- * include/limits.h: Define NGROUP_MAX as 16 now.
diff --git a/winsup/cygwin/ChangeLog-2001 b/winsup/cygwin/ChangeLog-2001
deleted file mode 100644
index 140b2a9..0000000
--- a/winsup/cygwin/ChangeLog-2001
+++ /dev/null
@@ -1,5337 +0,0 @@
-2001-12-31 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Strip path when installing library.
-
-2001-12-30 Christopher Faylor <cgf@redhat.com>
-
- * include/getopt.h: Fix define.
-
-2001-12-30 Christopher Faylor <cgf@redhat.com>
- Ralf Habacker <Ralf.Habacker@freenet.de>
-
- * speclib: New file.
- * Makefile.in: Create library versions of automode.o, textmode.o, and
- binmode.o for easier use on command line. Create libpthread.a, libm.a,
- and libc.a with subsets of exports found in libcygwin.a.
-
-2001-12-30 Ralf Habacker <Ralf.Habacker@freenet.de>
-
- * cygmagic: Eliminate unneeded use of 'tr' and 'bc'.
-
-2001-12-30 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (open_local_policy): Use POLICY_EXECUTE instead of
- enumerating user rights.
-
-2001-12-29 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (open_local_policy): Initialize lsa handle to NULL.
- Request only needed access rights in call to LsaOpenPolicy().
- (create_token): Check for NULL lsa pointer.
-
-2001-12-28 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Add symbols for endutent(), getutent(), getutid(),
- getutline(), setutent() and utmpname().
- * syscalls.cc (setutent): New function.
- (endutent): Ditto.
- (utmpname): Ditto.
- (getutent): Ditto.
- (getutid): Ditto.
- (getutline): Ditto.
- * include/cygwin/version.h: Bump API minor version.
-
-2001-12-26 Christopher Faylor <cgf@redhat.com>
-
- * cygmagic: Add define name to warning.
- * dcrt0.cc (_dll_crt0): Check for changes in child_info size.
- (multiple_cygwin_problem): Avoid "proc" errors when testing. Just
- assume new cygwin proc.
- * shared_info.h (mount_info): Add 'cb' element for sanity checks.
- (shared_info): Ditto.
- * child_info.h (child_info): Add fhandler_union_size element for sanity
- checking.
- * shared.cc (open_shared): Detect shared region size mismatch between
- parent and child.
- (shared_info::initialize): Detect shared region size mismatch with
- expectation.
- (memory_Init): Ditto.
- * sigproc.cc (init_child_info): Correctly set cb in passed structure.
- * shared.cc (open_shared):
-
-2001-12-26 Christopher Faylor <cgf@redhat.com>
-
- * include/getopt.h: Protect a declaratin.
-
-2001-12-26 Robert Collins <rbtcollins@hotmail.com>
-
- * thread.cc (pthread_cond::Signal): Use a separate flag for signal
- detection and broadcast semantics.
- (__pthread_cond_dowait): Ditto.
- * thread.h (pthread_cond): New flag for testing when a waiter has
- woken.
-
-2001-12-26 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Quote arguments to shell scripts.
- (clean): Remove new *_magic.h autogenerated files.
-
-2001-12-25 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Autogenerate some header files which provide magic
- numbers. Force dependencies for files which depend on autogenerated
- headers to ensure that they are always built.
- * child_info.h (child_info): Add new fields to accommodate new magic
- number header stuff.
- * dcrt0.cc: Rely on "child_info_magic.h" to ensure that correct
- child_info magic numbers are used.
- (dll_crt0_1): Temporarily remove _cygwin_testing_magic test.
- (_dll_crt0): Do more testing on magic numbers from fork_info structure.
- Call "multiple_cygwin_problem" where appropriate.
- (multiple_cygwin_problem): Rename from multiple_cygwin_die. Issue a
- warning or die, as appropriate based on cygwin version/magic number
- mismatch.
- * pinfo.cc (pinfo::exit): Don't attempt to dereference `this' if it
- doesn't exist. This can happen when a fatal error occurs early in
- process initialization.
- * shared.cc: Rely on "shared_info_magic.h" to accommodate that new
- magic number header stuff.
- (shared_info::initialize): Use new magic number stuff, for shared
- region.
- (memory_init): Ditto, for mount table.
- * shared_info.h: Accomodate new magic number stuff for shared region
- and mount table.
- * sigproc.cc: Rely on "child_info_magic.h" to accommodate new magic
- number header stuff.
- (init_child_info): Initialize new fields in child_info) to accomodate
- magic numbers.
- * winsup.h: Rename multiple_cygwin_die to multiple_cygwin_problem.
- * include/cygwin/version.h: Define macros for manipulating version
- magic.
- * cygmagic: New shell script for generating magic numbers.
-
-2001-12-20 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump API minor version for below changes.
-
-2001-12-19 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (VPATH): Add regex directory.
- (NM): new variable.
- (OBSOLETE_FUNCTIONS): Ditto.
- (NEW_FUNCTIONS): Ditto.
- (install-headers): Install regex.h.
- (install-man): New target.
- (install): Use new target.
- (DLL_OFILES): Add v8_reg* stuff.
- (new-cygwin1.dll): Eliminate stamp-cygwin-lib creation.
- (libcygwin.a): Remove obsolete functions from import lib. Add new functions.
- * configure.in: Detect 'nm' tool.
- * configure: Regenerate.
- * cygwin.din: Export posix_reg* functions. Eliminate export of v8 reg* functions.
- This is now handled in object files themselves.
- * regex/*: New files.
- * regexp/v8_*.c: New files, renamed from non v8_ equivalents.
-
-2001-12-17 Corinna Vinschen <corinna@vinschen.de>
-
- * include/getopt.h: Don't define getopt_long() and friends when
- included through unistd.h.
-
-2001-12-17 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (dtable::init_std_file_from_handle): Avoid initializing
- using an invalid handle.
-
-2001-12-16 David Billinghurst <David.Billinghurst@riotinto.com>
-
- * include/limits.h: Define LLONG_MIN, LLONG_MAX, ULLONG_MAX.
-
-2001-12-11 Christopher Faylor <cgf@redhat.com>
-
- * include/getopt.h: Add HAVE_DECL_GETOPT to save pain elsewhere.
-
-2001-12-10 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.h (fhandler_serial::ev): New class member.
- * fhandler_serial.cc (fhandler_serial::raw_read): Use class member for
- event status.
- * select.cc (peek_serial): Ditto.
-
-2001-12-07 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (path_conv::check): Use full path name for determining
- attributes when /cygdrive/x/foo.
-
-2001-12-06 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (path_conv::check): Reset FH_CYGDRIVE if iterating through
- path.
-
-2001-12-06 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (path_conv::check): Don't complain if /dev/x/foo when x
- doesn't exist.
- (mount_info::conv_to_win32_path): Keep translating when a /cygdrive is
- found. Don't attempt to translate to a device name when devn ==
- FH_CYGDRIVE.
- (cygwin_conv_to_win32_path): Set buffer to empty on error.
- (cygwin_conv_to_full_win32_path): Ditto.
-
- * window.cc: Include unistd.h to verify definitions.
-
-2001-12-05 Christopher Faylor <cgf@redhat.com>
-
- * dir.cc (opendir): Detect error return from build_fhandler_from_name.
-
-2001-12-04 David Rothenberger <daveroth@acm.org>
-
- * net.cc (cygwin_getsockopt): Dereference optlen pointer when passing
- to __check_null_invalid_struct_errno.
-
-2001-12-03 Christopher Faylor <cgf@redhat.com>
-
- * net.cc (cygwin_getsockopt): Allow NULL optval.
- (cygwin_setsockopt): Ditto.
- (cygwin_recvfrom): Allow NULL from.
-
- * path.cc (mount_info::read_cygdrive_info_from_registry): Don't write
- cygdrive to registry if it doesn't exist.
-
-2001-12-03 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (mount_info::conv_to_win32_path): Avoid returning error if
- cygdrive == '/'.
- (mount_info::cygdrive_win32_path): Return 0 if invalid cygdrive path.
-
-2001-11-30 Christopher Faylor <cgf@redhat.com>
-
- * debug.cc (makethread): Eliminate unneeded function call.
- * miscfuncs.cc (tls_ix): Predefine.
- * perthread.h (set_reent): Eliminate.
- (get_reent): Ditto.
- * winbase.h (my_tlsalloc): Use global stack base pointer. Set newly
- allocated location to NULL.
- (my_tlssetvalue): Use global stack base pointer.
- (my_tlsgetvalue): Ditto.
-
-2001-11-27 Christopher Faylor <cgf@redhat.com>
-
- * winsup.h: Reorganize to avoid use of experimental stuff.
- * shortcut.cc: Move winsup.h first in include order.
-
-2001-11-27 Christopher Faylor <cgf@redhat.com>
-
- * cygwin.din (ualarm): New export.
- * dcrt0.cc (_dll_crt0): Add experimental tls storage declaration.
- (dll_crt0): Ditto.
- * debug.cc (thread_stub): Ditto.
- * thread.cc: Minor cleanup.
- (__pthread_create): Add experimental tls storage declaration.
- * miscfuncs.cc: Define tls index.
- * winsup.h: Declare experimental tls storage.
-
- * window.cc (alarm): Use old timer return from setitimer.
- (ualarm): New function. From Alexandr V. Shutko.
-
-2001-11-26 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (libcygwin.a): Use ar commands to build libcygwin.a since
- adding an archive doesn't work the way we want it to.
-
-2001-11-24 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_disk_file.cc (fhandler_cygdrive::readdir): Avoid reporting
- inaccessible drives.
-
-2001-11-24 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_hstrerror): Allow s == NULL.
- (cygwin_rcmd): Add parameter checking.
- (cygwin_rexec): Ditto.
-
-2001-11-24 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_inet_ntoa): Add parameter checking.
- (cygwin_inet_network): Return INADDR_NONE instead of 0 in case of
- EFAULT.
- (cygwin_hstrerror): Add parameter checking.
- (cygwin_rresvport): Ditto.
- (socketpair): Ditto.
- * winsup.h (check_null_str): Add extern declaration.
-
-2001-11-24 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (path_conv::check): Tighten FH_CYGDRIVE check to avoid
- matching trailing component, like other devices.
-
-2001-11-24 Christopher Faylor <cgf@redhat.com>
-
- * autoload.cc (IsDebuggerPresent): Make conditional load since it is
- not available everywhere.
-
- * path.cc (mount_info::conv_to_win32_path): Only consider /cygdrive to
- be FH_CYGDRIVE, not /cygdrive/x.
-
-2001-11-24 Christopher Faylor <cgf@redhat.com>
-
- * net.cc (inet_makeaddr): Revert previous change.
-
-2001-11-23 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (chdir): Allow 'cd /cygdrive'.
-
-2001-11-23 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (dtable::vfork_parent_restore): Add debugging statement.
-
- * exceptions.cc (try_to_debug): Spin only as long as we don't have a
- debugger attached.
-
- * fhandler.h (fhandler_base::set_nohandle): New method.
- (fhandler_base::get_nohandle): New method.
- * fhandler.cc (fhandler_base::dup): Avoid duplicating handle if there
- is no handle.
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Set nohandle
- flag on dummy fd.
-
-2001-11-23 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Make intermediate library for eventual inclusion in
- libcygwin.a
-
- * fhandler.h (fhandler_pipe::fhandler_pipe): Remove default argument
- setting since it is no longer used.
-
- * miscfuncs.cc (check_null_str): New function.
- (check_null_str_errno): Ditto.
- * net.cc: Add defensive buffer checking throughout.
- (cygwin_sendto): Protect against invalid fd.
- (cygwin_recvfrom): Ditto.
- (cygwin_getpeername): Ditto.
- (cygwin_recv): Ditto.
- (cygwin_send): Ditto.
- * winsup.h: Declare a new function.
-
-2001-11-23 Corinna Vinschen <corinna@vinschen.de>
-
- * select.cc (set_bits): Fix conditional for setting fd in exceptfds.
- * dtable.cc (dtable::build_fhandler): Create fhandler_pipe using
- correct device type.
- * path.cc (get_devn): Set correct pipe device type from device name.
-
-2001-11-22 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (conv_path_list): Fix wild indexing into path due to
- conflicting methods for setting src pointer.
-
- * dir.cc (opendir): Only pass path_conv argument to opendir, since name
- is already part of the fhandler.
- * dtable.cc (dtable::build_fhandler): Accomodate new FH_CYGDRIVE type.
- * fhandler.cc (fhandler_base::opendir): Nuke name argument.
- * fhandler.h: Add FH_CYGDRIVE to "device" enum.
- (fhandler_base::opendir): Nuke name argument.
- (fhandler_disk_file::opendir): Ditto.
- (fhandler_disk_file::fhandler_disk_file): Declare new method which
- passes devtype through.
- (fhandler_cygdrive): Add elements for tracking drives.
- (fhandler_cygdrive::set_drives): Declare new method.
- (fhandler_cygdrive::iscygdrive_root): Declare new method.
- (fhandler_cygdrive::opendir): Declare new method.
- (fhandler_cygdrive::readdir): Declare new method.
- (fhandler_cygdrive::telldir): Declare new method.
- (fhandler_cygdrive::seekdir): Declare new method.
- (fhandler_cygdrive::rewinddir): Declare new method.
- (fhandler_cygdrive::closedir): Declare new method.
- (fhandler_cygdrive::fstat): Declare new method.
- * fhandler_disk_file.cc (fhandler_disk_file::fhandler_disk_file):
- Define new method which passes devtype through.
- (fhandler_disk_file::open): Tweak debug output.
- (fhandler_disk_file::opendir): Nuke first argument. Use info from
- path_conv and class rather than calling fstat.
- (fhandler_cygdrive::set_drives): New method.
- (fhandler_cygdrive::iscygdrive_root): New method.
- (fhandler_cygdrive::opendir): New method.
- (fhandler_cygdrive::readdir): New method.
- (fhandler_cygdrive::telldir): New method.
- (fhandler_cygdrive::seekdir): New method.
- (fhandler_cygdrive::rewinddir): New method.
- (fhandler_cygdrive::closedir): New method.
- (fhandler_cygdrive::fstat): New method.
- * path.cc (iscygdrive_device): Assume cygdriveness is already verified.
- (path_conv::check): Treat FH_CYGDRIVE "method" as a special case,
- setting file attributes as needed.
- (mount_info::conv_to_win32_path): Allow stand-alone /cygdrive, meaning
- "the directory which contains all of the drives on the system".
- (fillout_mntent): Use cyg_tolower for conversions.
- (mount_info::cygdrive_win32_path): Replace unused argument with unit
- number.
- * shared_info.h (mount_info::cygdrive_win32_path): Reflect argument
- change.
-
-2001-11-21 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (DLL_OFILES): Add fhandler_disk_file.o.
- * cygheap.h (cygheap_fdnew::operator =): New operator.
- * dir.cc: Add invalid struct checking throughout. Use methods for all
- directory manipulation throughout.
- * fhandler.cc: Move fhandler_disk_file stuff to own file.
- (fhandler_base::opendir): New method.
- (fhandler_base::readdir): New method.
- (fhandler_base::telldir): New method.
- (fhandler_base::seekdir): New method.
- (fhandler_base::rewinddir): New method.
- (fhandler_base::closedir): New method.
- * fhandler_disk_file.cc: New file.
- * fhandler.h (fhandler_base): Declare new virtual methods.
- (fhandler_disk_file): Ditto.
- (fhandler_cygdrive): New class.
-
- * path.cc (conv_path_list): Use strccpy to break apart path.
-
-2001-11-17 Nick Duffek <nick@duffek.com>
-
- * path.cc (conv_path_list): Copy source paths before modifying them.
-
-2001-11-17 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_raw.cc (fhandler_dev_raw::clear): Don't reset unit.
- * fhandler_tape.cc (fhandler_dev_tape::fhandler_dev_tape): Add debug
- output.
-
-2001-11-15 Egor Duda <deo@logos-m.ru>
-
- * include/pthread.h (PTHREAD_COND_INITIALIZER): Define.
- * thread.cc (__pthread_cond_destroy): Add support for
- PTHREAD_COND_INITIALIZER.
- (__pthread_cond_init): Ditto.
- (__pthread_cond_broadcast): Ditto.
- (__pthread_cond_signal): Ditto.
- (__pthread_cond_dowait): Ditto.
- (__pthread_mutex_init): Handle PTHREAD_MUTEX_INITIALIZER correctly,
- don't return error when it's passed as parameter.
- * winsup.h (check_null_invalid_struct): Call correct function.
-
-2001-11-14 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc: Add stdlib.h include for alloca declaration.
- * poll.cc: Ditto.
- * termios.cc: Ditto.
-
-2001-11-14 Christopher Faylor <cgf@redhat.com>
-
- * syscalls.cc (_write): Only allow zero length when fd is valid.
-
-2001-11-14 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_disk_file::fstat): Add setting access time
- and creation time to last modification time for files on filesystems
- not supporting multiple timestamps.
- (fhandler_disk_file::fstat_helper): Set access time and creation
- time in incoming Windows structure instead of in stat buf to avoid
- incorrectly overwriting Epoch timestamp.
-
-2001-11-14 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.h: Remove alloca definition since it's now defined through
- inclusion of stdlib.h.
- * lib/cygwin_crt0.c: Ditto.
-
-2001-11-13 Christopher Faylor <cgf@redhat.com>
-
- * syscalls.cc (_write): Allow zero length as per SUSv2.
-
-2001-11-13 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc (mkdir): Add HIDDEN file attribute if file has leading dot
- and HIDDEN_DOT_FILES is defined.
- * fhandler.cc (fhandler_base::open): Ditto.
- * path.cc (symlink): Ditto.
- * syscalls.cc (_rename): Ditto and remove HIDDEN file attribute if
- new filename does not begin with a dot.
-
-2001-11-12 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_console.cc (fhandler_console::read): Revert 2001-10-23
- change to only honor keydown events.
-
-2001-11-11 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump version to 1.3.6.
-
-2001-11-10 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (dtable::build_fhandler): Don't increment console fd count
- if new operation fails. Increment fork_fixup field here.
- (dtable::dup2): Don't increment fork_fixup field here.
- * net.cc (fdsock): Ditto.
-
-2001-11-08 Corinna Vinschen <corinna@vinschen.de>
-
- * select.cc: Set errno using set_sig_errno() throughout.
- * signal.cc (signal): Always set SA_RESTART flag.
- * syscalls.cc (_read): Revert previous patch.
-
-2001-11-08 Corinna Vinschen <corinna@vinschen.de>
-
- * select.cc (fhandler_tty_slave::ready_for_read): Return 0 on EBADF.
- * syscalls.cc (_read): If ready_for_read() failed, save errno from
- being overwritten by signal handler call.
-
-2001-11-07 Corinna Vinschen <corinna@vinschen.de>
-
- * lib/getopt.c (getopt_internal): Reset optind to 1 only if optreset
- is not set.
-
-2001-11-06 Christopher Faylor <cgf@redhat.com>
-
- * select.cc (fhandler_tty_slave::ready_for_read): Correct inverted
- not_open test.
-
-2001-11-05 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump version to 1.3.5.
-
-2001-11-05 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap_record::find_empty): Add input parameter check.
-
-2001-11-04 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (dtable::build_fhandler): Fix debug_printf to avoid SEGV
- due to incorrect parameter placement.
-
-2001-11-04 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.h (fhandler_pipe::broken_pipe): Renamed from saweof.
- (fhandler_pipe::set_eof): Reflect above change.
- * pipe.cc (fhandler_pipe::fhandler_pipe): Ditto.
- (fhandler_pipe::read): Ditto.
- (fhandler_pipe::hiteof): Ditto.
-
-2001-11-04 Christopher Faylor <cgf@redhat.com>
-
- * pipe.cc (fhandler_pipe::read): Narrow eof return to just the "broken
- pipe" test.
-
-2001-11-04 Christopher Faylor <cgf@redhat.com>
-
- * select.cc: Add more comments throughout. Use bool 'true' where
- appropriate throughout.
- (fhandler_socket::select_read): Remove duplicate setting for *_ready
- which inadvertently overrode previous, correct setting.
- (fhandler_socket::select_write): Ditto.
-
-2001-11-03 Christopher Faylor <cgf@redhat.com>
-
- * select.cc (verify_console): New function.
- (verify_windows): Ditto.
- (fhandler_console::select_read): Really do need to verify that there is
- something to read.
- (fhandler_console::select_windows): Ditto.
-
-2001-11-03 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.h (fhandler_base::ready_for_read): Remove unused argument.
- (fhandler_tty_slave::ready_for_read): Ditto.
- (select_record): Remove poll, initialize peek.
- * select.cc: Remove all poll functions, throughout. Change second
- argument of peek_* functions to 'bool' throughout. Specifically
- initialize *_ready variables throughout.
- (select_stuff::poll): Subsume previous poll functionality.
- (peek_pipe): Don't grab guard mutex when in select loop.
- select()/read() is racy by design so there is no need to worry about a
- race in select().
- (fhandler_base::ready_for_read): Remove unused argument.
- (fhandler_tty_slave::ready_for_read): Ditto.
- * syscalls.cc (_read): Eliminate third argument in ready_for_read call.
-
-2001-11-03 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (get_supplementary_group_sidlist): New function.
- (get_group_sidlist): Call get_supplementary_group_sidlist() to
- retrieve list of supplementary groups SIDs from /etc/group and
- add them to the user's group list.
-
-2001-11-03 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.cc (fhandler_base::read): Return just read ahead characters
- if slow device.
- * fhandler.h (fhandler_base::set_eof): New virtual method.
- (fhandler_pipe::set_eof): New method.
- * pipe.cc (fhandler_pipe::fhandler_pipe): Clear saweof flag.
- (fhandler_pipe::read): Return immediately if hit eof.
- (fhandler_pipe::hit_eof): Return true if saweof flag is set.
- * select.cc (peek_pipe): Don't call PeekNamedPipe if we couldn't grab
- the guard mutex.
-
-2001-11-02 Egor Duda <deo@logos-m.ru>
-
- * dll_init.h (class dll_list): Reorder functions to avoid compiler
- "can't inline" warnings.
- * security.h (class cygsid): Ditto.
- * sigproc.cc (get_proc_lock): Ditto.
- * sigproc.h (class sigframe): Ditto.
- * sync.h (class muto): Ditto.
-
-2001-11-02 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.h (fhandler_base::get_guard): Actually MAKE virtual as
- previously indicated.
- * pipe.cc (make_pipe): Remove extraneous set_errno.
- * syscalls.cc (_open): Ditto.
- * select.cc (peek_pipe): Need to check that there is still something to
- read from the pipe after acquiring the mutex since another
- process/thread could have eaten the input before we got to acquiring
- the lock. (Thanks to Nick Duffek for this inspiration.)
-
-2001-11-01 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.h: Change Windows 'BOOL's to c++ 'bool's for all variables.
- * select.cc (fhandler_base::ready_for_read): Set read_ready to zero
- prior to testing it or it will be uninitialized.
-
- * Makefile.in (CFLAGS): Move setting to Makefile.common.
-
-2001-11-01 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.h (cygheap_fdmanip::isopen): Set appropriate errno if fd not
- open.
- * select.cc (fhandler_base::ready_for_read): Release an open guard
- mutex when exiting with an error condition.
- * syscalls.cc (_read): Check frequently for closed fd as a kludge until
- something better is invented.
-
-2001-11-01 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (dtable::build_fhandler): Issue internal error on unknown
- device.
- * fhandler.cc (fhandler_base::close): Show both name and handle in
- debugging output.
-
- * fhandler.h (fhandler_base::get_guard): New virtual method.
- (fhandler_pipe::get_guard): New method.
- (fhandler_socket::ready_for_read): Delete declaration.
- (fhandler_pipe::ready_for_read): Ditto.
- (fhandler_serial::ready_for_read): Ditto.
- (fhandler_console::ready_for_read): Ditto.
- (fhandler_tty_common::ready_for_read): Ditto.
- (fhandler_windows::ready_for_read): Ditto.
- (struct select_record::peek): Declare new method.
- * select.cc (MAKEready): Delete.
- (peek_pipe): Use get_guard method to retrieve potential guard mutex
- handle.
- (fhandler_base::ready_for_read): Rewrite as generic ready-for-read
- handler. Should only be called for "slow" devices.
- (fhandler_socket::ready_for_read): Delete definition.
- (fhandler_pipe::ready_for_read): Ditto.
- (fhandler_serial::ready_for_read): Ditto.
- (fhandler_console::ready_for_read): Ditto.
- (fhandler_tty_common::ready_for_read): Ditto.
- (fhandler_windows::ready_for_read): Ditto.
- (fhandler_pipe::select_read): Fill in new peek record in select_record
- structure.
- (fhandler_console::select_read): Ditto.
- (fhandler_tty_common::select_read): Ditto.
- (fhandler_serial::select_read): Ditto.
- (fhandler_socket::select_read): Ditto.
- (fhandler_socket::select_read): Ditto.
- (fhandler_tty_slave::ready_for_read): Check for tty not open. Set
- errnos appropriately.
- * syscalls.cc (_read): Allow ready_for_read to set errno.
-
- * pinfo.cc (pinfo::init): Return spawn/NO_WAIT process as valid if it
- is initializing.
- * sigproc.cc (getsem): Adjust wait for process to initialize downward
- to avoid huge waits.
-
-2001-10-31 Christopher Faylor <cgf@redhat.com>
-
- * environ.cc: Set reset_com to false to mimic linux behavior more
- closely.
-
-2001-10-31 Corinna Vinschen <corinna@vinschen.de>
-
- * dtable.cc (dtable::vfork_child_dup): Revert impersonation
- before duplicating fhandler.
-
-2001-10-30 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (signal_exit): Weight the odds against the main thread
- running when signal thread is exiting.
-
-2001-10-30 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (sigproc_terminate): Don't signal main thread when exiting.
- * sigproc.h (sigframe): Decorate some methods with `inline'.
- (new_muto): Coerce pointer to new to void *.
-
-2001-10-30 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.cc (fhandler_base::fork_fixup): Pass old handle to
- setclexec_pid.
-
-2001-10-30 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.h (cygheap_fdmanip::cygheap_fdmanip): Clear fh.
- (cygheap_fdmanip::isopen): New method.
- * syscalls.cc (_read): Avoid accessing closed fd.
-
- * path.h (fe_types): New enum.
- (path_conv::set_path): New method.
- (find_exec): Change null_if_not_found argument to something more
- generic.
- * spawn.cc (find_exec): Default to returning the POSIX path rather than
- the windows path, unless instructed otherwise.
- (spawn_guts): Force call to find_exec to use native paths.
- * dlfcn.cc (check_path_access): Accommodate new find_exec arguments.
- * environ.h (win_env::get_posix): New method.
-
-2001-10-30 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::close): Add error handling.
-
-2001-10-30 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::dup): Revert previous change.
-
-2001-10-30 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (dtable::dup2): Add some debugging. Use methods from
- passed in class rather than cygheap->fdtab.
- * fhandler_socket.cc (fhandler_socket::fixup_before_fork_exec): Add
- more debugging output.
- (fhandler_socket::dup): Allocate new space for prot_info_ptr for
- duplicated entry.
- (fhandler_socket::close): Loop closesocket() as long as WSAEWOULDBLOCK
- is returned.
- * syscalls.cc (stat_worker): Always delete fh if it has been created.
-
-2001-10-29 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (is_group_member): Call NetLocalGroupGetMembers() for
- local machine only.
- (get_user_local_groups): Ditto for NetLocalGroupEnum().
-
-2001-10-29 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.cc (fhandler_base::set_name): Set namehash here to catch
- name changes.
- (fhandler_base::open): Remove namehash setting.
- (fhandler_base::fstat): Subtract 1 from arbitrary time setting to avoid
- strange ls -l granularity problem.
-
-2001-10-29 Christopher Faylor <cgf@redhat.com>
-
- * select.cc (MAKEready): Remove extraneous select_read.
-
-2001-10-29 Corinna Vinschen <corinna@vinschen.de>
-
- * uinfo.cc (internal_getlogin): Set environment variable $HOME
- from either /etc/passwd or $HOMEDRIVE/$HOMEPATH if necessary.
-
-2001-10-29 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.h (fhandler_serial::fhandler_serial): Change to only accept
- unit argument.
- * fhandler_serial.cc (fhandler_serial::fhandler_serial): Ditto.
- (fhandler_serial::open): Avoid else when previous clause is a return().
- * path.cc (get_devn): Alias /dev/ttyS0 -> /dev/com1, etc.
- (get_device_number): Reallow standalone "com1" as a valid name for
- /dev/com1.
-
-2001-10-26 Christopher Faylor <cgf@redhat.com>
-
- * select.cc (MAKEready): Check for read_ready in loop since select_read
- could set it.
- (peek_socket): Check ready/write/except specifically since they could
- have been set even prior to peek_socket call.
-
-2001-10-24 Christopher Faylor <cgf@redhat.com>
-
- * shared_info.h (MOUNT_VERSION): Change to a smaller, still arbitrary
- number.
- * shared.cc (open_shared): Accept a number to denote the shared memory
- region.
- (memory_init): Use shared memory version as part of the object name of
- the shared region. Ditto for the mount table.
- * path.cc (CYGWIN_REGNAME): New define used in place of
- CYGWIN_INFO_CYGWIN_REGISTRY_NAME throughout.
- * external.cc (cygwin_internal): Implement CW_[GS]ET_CYGWIN_REGISTRY_NAME.
- * cygheap.h (init_cygheap::cygwin_regname): New element.
-
-2001-10-23 Christopher Faylor <cgf@redhat.com>
-
- Ensure that all fhandler_*::read definitions are __stdcall throughout.
- * fhandler.cc (fhandler_base::set_inheritance): Be more defensive in
- debugging code.
- * fhandler.h: Adjust regparms throughout to reflect passing 'this'
- parameter.
- * fhandler_console.cc (fhandler_console::read): Remove unneeded test.
- Only honor "key down" events.
- * miscfuncs.cc (strcasestr): Reorganize for efficient code use.
- (check_null_empty_str_errno): Ditto.
- (__check_null_invalid_struct_errno): Ditto.
- (__check_invalid_read_ptr_errno): Ditto.
- * syscalls.cc (_read): Return 0 when length == 0, as per Single UNIX
- Specification.
-
-2001-10-22 Christopher Faylor <cgf@redhat.com>
-
- * debug.cc (set_errno): Return value of errno that was set, just like
- the macro.
- (setclexec_pid): Replace old handle with new handle.
- * debug.h: Reflect change in arguments for setclexec_pid.
- * fhandler.cc (fhandler_base::set_inheritance): Ditto.
- (fhandler_base::fork_fixup): Ditto.
- * cygerrno.h: Reflect return value change for set_errno.
-
-2001-10-22 Christopher Faylor <cgf@redhat.com>
-
- Remove 'cb' parameter and modify fhandler_* constructors throughout.
- * dtable.cc (dtable::build_fhandler): Remove debugging output which
- uses 'cb'.
- * exec.cc (execvp): New function.
- (execvpe): Ditto.
- * fhandler.cc (fhandler_base::fhandler_base): Use constructor
- initialization.
- * fhandler.h (fhandler_tty_common::fhandler_tty_common): Ditto.
- * fhandler_clipboard.cc (fhandler_dev_clipboard::fhandler_dev_clipboard):
- Ditto.
- * fhandler_console.cc (fhandler_console::fhandler_console): Ditto.
- * fhandler_raw.cc (fhandler_dev_raw::fhandler_dev_raw): Ditto.
- * fhandler_serial.cc (fhandler_serial::fhandler_serial): Ditto.
- * fhandler_tty.cc (fhandler_tty_master::fhandler_tty_master): Ditto.
- (fhandler_tty_slave::fhandler_tty_slave): Ditto.
- (fhandler_pty_master::fhandler_pty_master): Ditto.
- * fhandler_windows.cc (fhandler_windows::fhandler_windows): Ditto.
-
-2001-10-22 Corinna Vinschen <corinna@vinschen.de>
-
- Patch suggested by Ian Ray <ian.ray@nokia.com>:
- * syscalls.cc (seteuid): Unset environment variables HOMEDRIVE and
- HOMEPATH before calling internal_getlogin().
- * uinfo.cc (internal_getlogin): Use default HOMEPATH and HOMEDRIVE
- from environment if both are present, else query NetUserGetInfo().
-
-2001-10-22 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (get_2k_ifconf): Change multiple IP address naming scheme
- to Linux style.
-
-Sun Oct 21 19:04:37 2001 Alexander Gottwald <ago@informatik.tu-chemnitz.de>
-
- * net.cc (get_2k_ifconf): Added support for multiple IP addresses on
- one interface.
-
-2001-10-22 Corinna Vinschen <corinna@vinschen.de>
-
- * miscfuncs.cc (__check_invalid_read_ptr_errno): Return error, if any.
-
-2001-10-21 Christopher Faylor <cgf@redhat.com>
-
- * resource.cc (fill_rusage): Perform paranoid zero structure passed to
- GetProcessMemoryInfo.
-
-2001-10-22 Robert Collins <rbtcollins@hotmail.com>
-
- * autoload.cc: Autoload GetProcessMemoryInfo.
- * resource.cc (fill_rusage): Calculate ru_maxrss and ru_majflt entries.
- (Bug report on this from Guido Serassio in the squid project).
- This requires including psapi.h.
-
-2001-10-20 Christopher Faylor <cgf@redhat.com>
-
- * dll_init.cc (dll_list::alloc): Increase retry count to 1000.
-
-2001-10-20 Christopher Faylor <cgf@redhat.com>
-
- * miscfuncs.cc (__check_invalid_read_ptr_errno): New function.
- * syscalls.c (_write): Validate that write buffer is accessible for
- reading, not writing.
- * winsup.h: Declare new function, increase regparmization of check_*
- functions.
-
-2001-10-19 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (getcwd): Allow len == 0 when buf == NULL.
-
-2001-10-18 Christopher Faylor <cgf@redhat.com>
-
- * syscalls.cc (_read): Validate input pointer.
- (_write): Ditto.
- (system): Ditto.
-
-2001-10-16 Frederic Devernay <Frederic.Devernay@sophia.inria.fr>
-
- * poll.cc (poll): Call cygwin_select() if any fd is valid.
-
-2001-10-16 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_raw.cc (fhandler_dev_raw::open): Eliminate compatibility
- code since no Win32 device names are used anymore.
- * fhandler_tape.cc (fhandler_dev_tape::tape_set_blocksize): Allow
- 0 as blocksize to indicate variable blocksize.
- * path.cc (win32_device_name): Generate NT internal device names
- using upper/lower case names for readability.
- Generate \DosDevices\<letter>: device name for mount table
- compatibility devices.
-
-2001-10-16 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_tape.cc (fhandler_dev_tape::tape_status): Report
- EOTWarningZoneSize in get->mt_eotwarningzonesize.
- * include/cygwin/mtio.h: Define DEFTAPE.
- (struct mtget): Add member `mt_eotwarningzonesize'. Add a comment.
- * include/cygwin/version.h: Bump API minor version to 47.
-
-2001-10-16 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.cc (fhandler_base::fork_fixup): Guard against compiler
- warning.
-
-2001-10-16 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc: Add load statement for `NtOpenFile'.
- * fhandler.h (fhandler_dev_raw::get_unit): New method.
- (fhandler_dev_tape::norewind): Eliminate.
- (fhandler_dev_tape::is_rewind_device): New method.
- * fhandler_raw.cc (fhandler_dev_raw::open): Open new
- fixed device name devices using NT internal method.
- Keep calling fhandler_base::open() for old mount table
- device mapping compatibility devices.
- (fhandler_dev_raw::fstat): Eliminate. Settings are done
- by fhandler_base::fstat() already.
- * fhandler_tape.cc: Remove `norewind' usage throughout.
- * ntdll.h: Define FILE_SYNCHRONOUS_IO_NONALERT.
- Define struct _IO_STATUS_BLOCK.
- Declare NtOpenFile().
- * path.cc (get_raw_device_number): Add new approach for
- using fixed device names.
- (win32_device_name): Ditto.
- (get_device_number): Ditto. Require POSIX path to begin
- with "/dev/".
- (mount_info::conv_to_win32_path): Call win32_device_name()
- instead of get_device_number() after evaluating mount points
- to allow changing the win32 destination path again.
- * security.cc (str2buf2uni): Remove `static' to be able to
- call function from fhandler_dev_raw::open().
- * wincap.cc: Set flag has_raw_devices appropriately.
- * wincap.h: Add flag has_raw_devices.
-
-2001-10-16 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.h (cygheap_fdget::cygheap_fdget): Remove debugging operation
- from set_errno.
-
-2001-10-16 Christopher Faylor <cgf@redhat.com>
-
- * mmap.cc (mmap): Assign 'fh' from cygheap_fdget. Use 'fh' everywhere.
-
-2001-10-15 Christopher Faylor <cgf@redhat.com>
-
- * cygerrno.h (set_errno): Define more informative version of this
- function for debugging.
- (__set_errno): Declare when DEBUGGING.
- * cygheap.h (cygheap_fdget::cygheap_fdget): Add a flag to control when
- errno is set.
- * debug.cc (__set_errno): New function.
- * fcntl.cc (_fcntl): Fix so that correct fd is used for second argument
- to dup2.
- * syscalls.cc (_cygwin_istext_for_stdio): Don't set errno here when
- using cygheap_fdget.
-
-2001-10-15 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.cc (fhandler_base::fork_fixup): Don't protect handle.
-
- * dlfcn.cc: Fix to confirm to coding standards.
-
- Reorganize includes throughout to accommodate new cygheap.h usage.
- * cygheap.h (cygheap_fdmanip): New class: simplifies locking and
- retrieval of fds from cygheap->fdtab.
- (cygheap_fdget): Ditto.
- (cygheap_fdnew): Ditto.
- * fcntl.cc (_fcntl): Use new method to lock fdtab and retrieve info.
- * ioctl.cc (ioctl): Ditto.
- * mmap.cc (mmap): Ditto.
- * net.cc: Ditto, throughout.
- * passwd.cc (getpass): Ditto.
- * path.cc (fchdir): Ditto.
- * pipe.cc (make_pipe): Ditto.
- * sec_acl.cc (facl): Ditto.
- * syscalls.cc: Ditto, throughout.
- * termios.cc: Ditto, throughout.
-
-2001-10-15 Corinna Vinschen <corinna@vinschen.de>
-
- * uname.cc (uname): Use `wProcessorLevel' unless OS sets it wrong.
- Use `dwProcessorType' then instead.
- * wincap.cc: Set flag has_valid_processorlevel appropriately.
- * wincap.h: Add flag has_valid_processorlevel.
-
-2001-10-14 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (dtable::build_fhandler_from_name): Use PC_FULL to
- determine path name.
- * path.cc (fchdir): Remove rel -> abs path conversion.
-
-Sun Oct 14 08:10:12 2001 Gary R. Van Sickle
-
- * fork.cc (fork_parent): Correct the "unable to allocate
- forker_finished event" error message. It named the wrong event before.
-
-2001-10-13 Christopher Faylor <cgf@redhat.com>
-
- * autoload.cc (load_wsock32): Declare dummy function to force loading
- of winsock.
- * fhandler.cc (fhandler_base::set_inheritance): Make debugging output
- more verbose.
- * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Force loading
- of winsock32 if winsock2 not available.
- * net.cc (set_socket_inheritance): Use DuplicateHandle in all cases to
- set inheritance correctly.
- (fdsock): Use winsock2_active macro to determine when to set socket
- inheritance. Remove fdtab resource locking since this function should
- already be protected.
- (cygwin_accept): Simplify logic. Ensure that fdtab unlock is not
- called inappropriately.
- (cygwin_rcmd): Use fdtab locking.
- (cygwin_rresvport): Ditto.
- (cygwin_rexec): Ditto.
- * select.cc (peek_socket): Set errno appropriately if winsock select
- fails.
-
-2001-10-13 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * winsup.h: Declare check_pty_fds.
- * syscalls.cc (check_pty_fds): Rename from check_ttys_fds. Also check
- pty master.
- (setsid): Use check_pty_fds.
- * dtable.cc (dtable::dec_console_fds): Add check on pty fds.
-
-2001-10-13 Ralf Habacker <Ralf.Habacker@freenet.de>
-
- * fhandler_dsp.cc (fhandler_dsp::ioctl): Return 0 for successful
- SNDCTL_DSP_GETBLKSIZE operation.
-
-2001-10-13 Christopher Faylor <cgf@redhat.com>
-
- Remove obsolete 'name' arg from fhandler_* constructors throughout.
- * winsup.h (winsock_active): New macro.
- (winsock2_active): Ditto.
- * autoload.cc (wsock_init): Use new macros to decide if winsock or
- winsock2 is loaded.
- (nonexist_wsock32): Dummy function to force winsock load.
- (nonexist_ws2_32): Dummy function to force winsock2 load.
- * fhandler.h (fhandler_socket::fstat): Declare new method. Currently
- unused.
- * fhandler_socket.cc (fhandler_socket::fixup_before_fork_exec): Check
- that winsock2 is active before trying WSADuplicateSocketA.
- (fhandler_socket::fixup_after_fork): Add extra check for
- winsock2_active. Otherwise use iffy procedures for Windows 95.
- (fhandler_socket::fixup_after_exec): Add debugging.
- (fhandler_socket::dup): Add debugging.
- (fhandler_socket::fstat): New method.
- (fhandler_socket::set_close_on_exec): Attempt to perform iffy stuff on
- Windows 95.
-
- * errno.cc (_sys_nerr): Work around compiler strangeness.
-
- * pinfo.cc (winpids::add): Add extra element at end of allocated array
- for setting to NULL.
- (winpids::enumNT): Ditto.
- (winpids::init): Don't modify pidlist if it hasn't been allocated
- (possibly due to malloc problem).
-
-2001-10-12 Christopher Faylor <cgf@redhat.com>
-
- * autoload.cc (wsock_init): Reorganize slightly to accommodate a new
- compiler.
-
-2001-10-11 Egor Duda <deo@logos-m.ru>
-
- * net.cc (cygwin_sendto): Use correct socket address when sending
- data to AF_UNIX socket.
-
-Wed Oct 10 16:10:41 2001 Alexander Gottwald <ago@informatik.tu-chemnitz.de>
-
- * net.cc (get_95_ifconf): Using other registry values pointing to
- correct networkdevice identification for Windows95.
-
-Tue Oct 9 22:22:45 2001 Christopher Faylor <cgf@cygnus.com>
-
- Throughout, rename PROC_FORK1 to PROC_FORK.
- * child_info.h: Rename PROC_* to _PROC_*. Define PROC_* with
- additional testing magic. Eliminate old PROC_FORK and rename
- PROC_FORK1 to PROC_FORK.
- * dcrt0.cc (_cygwin_testing_magic): New variable. Added to magic
- number in proc_info.
- (alloc_stack): Eliminate old PROC_FORK test.
- (dll_crt0_1): Ditto. Use _PROC_* enums for test. Subtract
- _cygwin_testing_magic from child_proc_info->type so that normal cygwin
- programs invoked by test suite programs do not consider themselves to
- be in a cygwin environment.
- (_dll_crt0): Ditto. Move environment checks to initial_env function to
- conserve on stack space.
- (initial_env): New function. Checks for testing and debugging
- environment variables.
- * init.cc (cygwin_hmodule): Move declaration.
- * winsup.h: Declare variables used for cygwin testing.
-
-Tue Oct 9 19:17:53 2001 Christopher Faylor <cgf@cygnus.com>
-
- * uinfo.cc (internal_getlogin): Reorganize slightly to minimize work in
- default condition.
-
-Tue Oct 9 18:53:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_disk_file::open): Add missing case clash check.
-
-Mon Oct 8 01:47:27 2001 Christopher Faylor <cgf@cygnus.com>
-
- * dtable.cc (dtable::build_fhandler): Allocate correct amount for given
- fhandler class.
- * fhandler.h (fhandler_union): Properly define rather than relying on
- fhandler_console being "big enough".
-
-Mon Oct 8 00:25:18 2001 Christopher Faylor <cgf@cygnus.com>
-
- * external.cc (fillout_pinfo): Reset counter whenever we initialize the
- pid list.
-
-Sun Oct 7 17:16:05 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (normalize_posix_path): Don't eat a '.' after a '\\' since it
- has special meaning on NT.
-
- * syscalls.cc (access): Use stat_worker.
-
-Fri Oct 5 21:01:14 2001 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.cc (fhandler_base::fork_fixup): Protect dup'ed handle and
- record it as non-inheritable for debugging purposes in case there is a
- subsequent fork or exec.
- * fhandler_tty.cc (fhandler_tty_common::fixup_after_fork): Allow
- fork_fixup to call ProtectHandle.
-
-Fri Oct 5 14:22:47 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (get_raw_device_number): Correct length arguments for
- wdeveqn.
-
-Fri Oct 5 11:05:32 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (getcwd): Allow NULL first argument.
-
-Fri Oct 5 00:31:35 2001 Christopher Faylor <cgf@cygnus.com>
-
- * heap.h (inheap): Check for NULL.
-
-Thu Oct 4 23:17:49 2001 Christopher Faylor <cgf@cygnus.com>
-
- Add second path_conv * argument to fstat()s throughout.
- * fhandler.h: Change read and fstat to regparm/stdcall throughout.
- (fhandler_base::fstat): Just declare. Don't define.
- (fhandler_disk_file::fstat_helper): Declare.
- * fhandler.cc (fhandler_base::fstat): Move here from fhandler.h, adapt
- from former stat_dev().
- (fhandler_disk_file::fstat): Move most of the disk-file-specific logic
- from stat_worker to here. Use fstat_helper to derive final fstat
- output.
- (fhandler_disk_file::fstat_helper): New method, renamed from former
- fstat method.
- (num_entries): Moved here from syscalls.cc.
- * fhandler_mem.cc (fhandler_dev_mem::fstat): Use base class to
- initialize most stuff. Invert has_physical_mem_access test for
- establishing permissions.
- * fhandler_raw.cc (fhandler_dev_raw::fstat): Eliminate unneed test and
- memory clearing. Use base class to initialize most stuff.
- * syscalls.cc (stat_dev): Eliminate.
- (stat_worker): Simply call fstat method to generate fstat output. Move
- all device specific code to appropriate fstats.
-
- * dir.cc (opendir): Pass correct arg to stat_worker to allow following
- symlinks.
-
-Thu Oct 4 21:37:57 2001 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (perhaps_suffix): Return NULL on non-existence of file as
- well as "directoryness". Previous code modified on 2001/09/30 actually
- had an arguable bug which was unmasked by the change on that day.
-
-Thu Oct 4 20:52:42 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (path_conv::check): Return ENOTDIR when leading device and
- trailing component.
-
-Thu Oct 4 18:49:23 2001 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (stat_worker): Make global. Accept path_conv parameter
- for passing information back to caller.
- * winsup.h: Declare stat_worker.
- * dir.cc (opendir): Use stat_worker rather than stat and pass path_conv
- parameter to stat_worker for later inspection.
-
-2001-10-04 Karellen (karellen@boreworms.com)
-
- * syslog.cc (syslog): Teach syslog about syslog priorities other than
- LOG_ERR, LOG_WARNING and LOG_INFO
-
-Thu Oct 4 15:50:03 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (path_conv::check): Don't perform file system or rootdir
- checks on devices.
-
-Wed Oct 3 19:40:36 2001 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (dll_crt0_1): Don't close hexec_proc if it is NULL.
-
- * fork.cc (vfork): Add debugging statements.
-
- * path.cc (get_device_number): Make static. Rewrite to inspect both unix
- and windows paths.
- (get_raw_device_number): Just check for parts of raw device that we
- care about.
- (get_devn): New function, pulled from get_device_number.
- (win32_device_name): Accommodate arg changes to get_device_number.
- (mount_info::get_device_number): Call get_device_number on translated
- Windows path.
-
- * spawn.cc (spawn_guts): Don't treat P_VFORK differently from P_NOWAIT.
- Add handle to child's shared region to child so that it will be
- preserved if the parent goes away.
- * fhandler.h: Throughout, simplify to one open method for all fhandler
- classes, requiring a path_conv first element.
- * fhandler.cc (fhandler_base::open): Remove obsolete method.
- Generalize to require path_conv * as first argument.
- (fhandler_disk_file::open): Remove obsolete method.
- (fhandler_disk_file::open): Use path_conv pointer rather than
- reference.
- * fhandler_clipboard.cc (fhandler_dev_clipboard::dup): Use new open
- method.
- (fhandler_dev_clipboard::open): Accommodate new argument for open
- methods.
- * fhandler_console.cc (fhandler_console::open): Ditto.
- (fhandler_console::dup): Use new open method.
- (fhandler_console::fixup_after_fork): Ditto.
- (fhandler_console::fixup_after_exec): Ditto.
- * fhandler_dsp.cc (fhandler_dev_dsp::open): Accommodate new argument for
- open methods.
- * fhandler_floppy.cc (fhandler_dev_floppy::open): Ditto.
- * fhandler_mem.cc (fhandler_dev_mem::open): Ditto.
- * fhandler_random (fhandler_dev_random::open): Ditto.
- * fhandler_raw.cc (fhandler_dev_raw::open): Ditto.
- * fhandler_serial.cc (fhandler_serial::open): Ditto.
- * fhandler_tape.cc (fhandler_dev_tape::open): Ditto.
- * fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
- (fhandler_pty_master::open): Ditto.
- * fhandler_windows.cc (fhandler_windows::open): Ditto.
- * fhandler_zero.cc (fhandler_dev_zero::open): Ditto.
- * fhandler_socket.cc (fhandler_socket::set_connect_secret): Accommodate
- new argument for open methods.
- * syscalls.cc (_open): Ditto.
- (stat_worker): Ditto.
-
-Tue Oct 2 23:49:18 2001 Christopher Faylor <cgf@cygnus.com>
-
- * cygheap.cc (cfree): Remove malloc debugging probe.
- * dlmalloc.c (errprint): Remove abort() call which causes interesting
- error message printing to abort prematurely.
- * environ.cc: Sprinkle MALLOC_CHECKs liberally throughout.
- (_addenv): Allocate two empty elements at end of environ to
- (apparently) work around problems with some buggy applications.
- (winenv): Avoid calling alloca if no forced environment variable is
- present.
-
- * exceptions.cc (open_stackdumpfile): Don't print "Dumping stack trace
- to..." when running in a cygwin environment (i.e., the parent is a
- cygwin process).
-
- * dtable.cc (dtable::init_std_file_from_handle): Move device type
- detection code from build_fhandler here since it is only used by this
- function.
- (dtable::build_fhandler_from_name): New method. Renamed from
- dtable::build_fhandler.
- (dtable::build_fhandler): Use build_fhandler_from_name.
- (cygwin_attach_handle_to_fd): Ditto.
- * syscalls.cc (_open): Ditto.
- (stat_worker): Ditto.
- * dtable.h (dtable::build_fhandler_from_name): Rename declaration from
- dtable::build_fhandler.
-
-Mon Oct 1 16:52:23 2001 Christopher Faylor <cgf@cygnus.com>
-
- * dtable.h (dtable::build_fhandler): Make path_conv parameter
- non-optional.
- (dtable::init_std_file_from_handle): Eliminate name parameter.
- * dtable.cc (stdio_init): Don't pass bogus name to
- init_std_file_from_handle. The function will figure out the name
- itself.
- (dtable::init_std_file_from_handle): Eliminate name parameter. Assume
- that we're always called with an appropriate fd. Pass name as NULL if
- we can't simply figure it out from context.
- (cygwin_attach_handle_to_fd): Pass path_conv argument to
- build_fhandler.
- (dtable::build_fhandler): Make path_conv argument mandatory. Eliminate
- specific call to get_device_number. With unknown device names, set
- name from handle context for parsing by path_conv.
- (dtable::build_fhandler): Pass path_conv argument to build_fhandler.
- * path.h (path_conv::set_isdisk): Set disk device type.
- (path_conv::is_device): Don't consider FH_DISK a "device".
- * syscalls.cc (_open): Pass path_conv argument by reference.
- (stat_worker): Ditto.
- (_rename): Use path_conv operators. Add bounds to DeleteFile/MoveFile
- for loop.
-
-Mon Oct 1 14:25:00 2001 Charles Wilson <cwilson@ece.gatech.edu>
-
- * cygwin.din: export strtoll and strtoull
-
-Sun Sep 30 22:51:41 2001 Christopher Faylor <cgf@cygnus.com>
-
- Add "path.h" include throughout, where needed. Use new path_conv
- methods and operators to simplify testing for directory and attributes,
- throughout.
- * path.h (path_conv::exists): New method.
- (path_conv::has_attribute): Ditto.
- (path_conv::isdir): Ditto.
- (path_conv::DWORD &): New operator.
- (path_conv::int &): Ditto.
- * dir.cc (rmdir): Eliminate a goto.
- * dtable.cc (dtable::build_fhandler): Accept opt and suffix info for
- path_conv.check. Return fh == NULL on path_conv error. Pass unit to
- set_name as appropriate.
- (dtable::reset_unix_path_name): New method.
- * dtable.h (dtable): Declare new method. Reflect arg changes to
- build_fhandler.
- * fhandler.cc (fhandler_disk_dummy_name): Eliminate.
- (fhandler_base::set_name): Expect paths to be NULL. Build
- unix_path_name from win32_path_name when it is a device.
- (fhandler_base::reset_unix_path_name): New method.
- (fhandler_base::raw_read): Report EISDIR when ERROR_INVALID_FUNCTION
- or ERROR_INVALID_PARAMETER and reading a directory.
- (fhandler_disk_file::fstat): Don't call stat_dev since we should now
- never be calling fhandler_disk_file methods with devices.
- (fhandler_base::fhandler_base): Clear {unix,win32}_path_name.
- (fhandler_base::~fhandler_base): Always free {unix,win32}_path_name.
- (fhandler_disk_file::fhandler_disk_file): Remove set_no_free_names
- kludge.
- (fhandler_disk_file::open): Ditto.
- * fhandler.h (fhandler_base::no_free_names): Eliminate.
- (fhandler_base::set_no_free_names): Ditto.
- * fhandler_tty.cc (fhandler_tty_slave::fhandler_tty_slave): Don't set
- unix_path_name here.
- * path.cc (fchdir): Lock fd table throughout. Use new
- dtable::reset_unix_path_name method to reset path.
- * syscalls.cc (stat_worker): Reorganize to always call fstat method.
- Pass path_conv method to fhandler_*::open.
- (chroot): Elminate a goto.
-
-Sun Sep 30 17:37:43 2001 Christopher Faylor <cgf@cygnus.com>
-
- * environ.cc (winenv): Allocate exact amount of space needed for forced
- windows environment variable rather than just using MAX_PATH.
-
-Sun Sep 30 17:10:18 2001 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Depend on stamp to ensure rebuilding. Remove stamp file
- when we've just built the DLL.
-
-Mon Oct 1 00:34:00 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * thread.cc (pthread_cond_dowait): Hopefully eliminate a race on multiple thread
- wakeups.
-
-Sat Sep 29 18:26:00 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * pthread.cc (pthread_cond_timedwait): Deleted - exported from thread.cc.
- (pthread_cond_wait): Deleted - exported from thread.cc.
- * thread.cc (pthread_cond::BroadCast): Update to use the new syntax for
- verifyable_object_isvalid ().
- (pthread_cond::Signal): Ditto. Also attempt to fix the lost signal race
- with pthread_cond::TimedWait().
- (check_valid_pointer): Change definiton to void const *.
- (verifyable_object_isvalid): Add new parameter to allow identification of
- static initializers, and return a enum rather than magic numbers.
- (__pthread_create): Ditto.
- (__pthread_cleanup): Ditto.
- (__pthread_attr_init): Ditto.
- (__pthread_attr_getinheritsched): Ditto.
- (__pthread_attr_getschedparam): Ditto.
- (__pthread_attr_getschedpolicy): Ditto.
- (__pthread_attr_getscope): Ditto.
- (__pthread_attr_setdetachstate): Ditto.
- (__pthread_attr_getdetachstate): Ditto.
- (__pthread_attr_setinheritsched): Ditto.
- (__pthread_attr_setschedparam): Ditto.
- (__pthread_attr_setschedpolicy): Ditto.
- (__pthread_attr_setscope): Ditto.
- (__pthread_attr_setstacksize): Ditto.
- (__pthread_attr_getstacksize): Ditto.
- (__pthread_attr_destroy): Ditto.
- (__pthread_join): Ditto.
- (__pthread_detach): Ditto.
- (__pthread_suspend): Ditto.
- (__pthread_continue): Ditto.
- (__pthread_getschedparam): Ditto.
- (__pthread_getsequence_np): Ditto.
- (__pthread_key_create): Ditto.
- (__pthread_key_delete): Ditto.
- (__pthread_setschedparam): Ditto.
- (__pthread_setspecific): Ditto.
- (__pthread_getspecific): Ditto.
- (__pthread_cond_destroy): Ditto.
- (__pthread_cond_init): Ditto.
- (__pthread_cond_broadcast): Ditto.
- (__pthread_cond_signal): Ditto.
- (__pthread_condattr_init): Ditto.
- (__pthread_condattr_getpshared): Ditto.
- (__pthread_condattr_setpshared): Ditto.
- (__pthread_condattr_destroy): Ditto.
- (__pthread_kill): Ditto.
- (__pthread_mutex_init): Ditto.
- (__pthread_mutex_getprioceiling): Ditto.
- (__pthread_mutex_lock): Ditto.
- (__pthread_mutex_trylock): Ditto.
- (__pthread_mutex_unlock): Ditto.
- (__pthread_mutex_destroy): Ditto.
- (__pthread_mutex_setprioceiling): Ditto.
- (__pthread_mutexattr_getprotocol): Ditto.
- (__pthread_mutexattr_getpshared): Ditto.
- (__pthread_mutexattr_gettype): Ditto.
- (__pthread_mutexattr_init): Ditto.
- (__pthread_mutexattr_destroy): Ditto.
- (__pthread_mutexattr_setprotocol): Ditto.
- (__pthread_mutexattr_setprioceiling): Ditto.
- (__pthread_mutexattr_getprioceiling): Ditto.
- (__pthread_mutexattr_setpshared): Ditto.
- (__pthread_mutexattr_settype): Ditto.
- (__sem_init): Ditto.
- (__sem_destroy): Ditto.
- (__sem_wait): Ditto.
- (__sem_trywait): Ditto.
- (__sem_post): Ditto.
- (__pthread_cond_dowait): New function, contains core logic from
- __pthread_cond_wait and __pthread_cond_timedwait. Decrement (*cond)->waiting
- before reentering the cond access mutex to allow detection of lost signals.
- (__pthread_cond_timedwait): Rename to pthread_cond_timedwait, and call
- __pthread_cond_dowait after calculating the wait length.
- (__pthread_cond_wait): Rename to pthread_cond_wait, and call
- __pthread_cond_dowait.
- * thread.h: New enum for use with verifyable_object_isvalid.
- Remove the extern exporting of __pthread_cond_timedwait and __pthread_cond_wait.
-
-Fri Sep 28 21:18:50 2001 Christopher Faylor <cgf@cygnus.com>
-
- * pipe.cc (fhandler_pipe::fixup_after_fork): New method.
- * fhandler.h (fhandler_pipe::fixup_after_fork): Declare new method.
-
-Fri Sep 28 03:23:04 2001 Christopher Faylor <cgf@cygnus.com>
-
- * passwd.cc (read_etc_passwd): Bother with unlocking when not
- in cygwin initialization.
- * grp.cc (read_etc_group): Ditto.
-
-Fri Sep 28 02:57:03 2001 Christopher Faylor <cgf@cygnus.com>
-
- * passwd.cc (read_etc_passwd): Don't bother with locking when
- in cygwin initialization since there is only one thread.
- * grp.cc (read_etc_group): Ditto.
-
-Fri Sep 28 01:50:09 2001 Christopher Faylor <cgf@cygnus.com>
-
- * pipe.cc (fhandler_pipe::hit_eof): Return correct value when there is
- no EOF event available.
-
-Sat Sep 28 00:34:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap): Move setting the access after evaluating fd.
- Remove useless comment. Explain copy-on-write problem of 9x
- more detailed. Don't set access to FILE_MAP_COPY on 9x only
- when anonymous mapping is requested.
- (fhandler_disk_file::mmap): Remove useless device check.
- Add debug output.
-
-Fri Sep 27 07:35:00 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * Makefile.in: Only stamp winver_stamp on success.
-
-Wed Sep 26 16:02:35 2001 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (peek_pipe): REALLY only grab mutex when we actually got
- something from the pipe.
-
-Tue Sep 25 21:25:00 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * thread.cc (pthread_cond::BroadCast): Use address with verifyable_object_isvalid().
- (pthread_cond::Signal): Ditto.
- (__pthread_create): Ditto.
- (__pthread_cleanup): Ditto.
- (__pthread_attr_init): Ditto.
- (__pthread_attr_getinheritsched): Ditto.
- (__pthread_attr_getschedparam): Ditto.
- (__pthread_attr_getschedpolicy): Ditto.
- (__pthread_attr_getscope): Ditto.
- (__pthread_attr_setdetachstate): Ditto.
- (__pthread_attr_getdetachstate): Ditto.
- (__pthread_attr_setinheritsched): Ditto.
- (__pthread_attr_setschedparam): Ditto.
- (__pthread_attr_setschedpolicy): Ditto.
- (__pthread_attr_setscope): Ditto.
- (__pthread_attr_setstacksize): Ditto.
- (__pthread_attr_getstacksize): Ditto.
- (__pthread_attr_destroy): Ditto.
- (__pthread_join): Ditto.
- (__pthread_detach): Ditto.
- (__pthread_suspend): Ditto.
- (__pthread_continue): Ditto.
- (__pthread_getschedparam): Ditto.
- (__pthread_getsequence_np): Ditto.
- (__pthread_key_create): Ditto.
- (__pthread_key_delete): Ditto.
- (__pthread_setschedparam): Ditto.
- (__pthread_setspecific): Ditto.
- (__pthread_getspecific): Ditto.
- (__pthread_cond_destroy): Ditto.
- (__pthread_cond_init): Ditto.
- (__pthread_cond_broadcast): Ditto.
- (__pthread_cond_signal): Ditto.
- (__pthread_cond_timedwait): Ditto.
- (__pthread_cond_wait): Ditto.
- (__pthread_condattr_init): Ditto.
- (__pthread_condattr_getpshared): Ditto.
- (__pthread_condattr_setpshared): Ditto.
- (__pthread_condattr_destroy): Ditto.
- (__pthread_kill): Ditto.
- (__pthread_mutex_init): Ditto.
- (__pthread_mutex_getprioceiling): Ditto.
- (__pthread_mutex_lock): Ditto.
- (__pthread_mutex_trylock): Ditto.
- (__pthread_mutex_unlock): Ditto.
- (__pthread_mutex_destroy): Ditto.
- (__pthread_mutex_setprioceiling): Ditto.
- (__pthread_mutexattr_getprotocol): Ditto.
- (__pthread_mutexattr_getpshared): Ditto.
- (__pthread_mutexattr_gettype): Ditto.
- (__pthread_mutexattr_init): Ditto.
- (__pthread_mutexattr_destroy): Ditto.
- (__pthread_mutexattr_setprotocol): Ditto.
- (__pthread_mutexattr_setprioceiling): Ditto.
- (__pthread_mutexattr_getprioceiling): Ditto.
- (__pthread_mutexattr_setpshared): Ditto.
- (__pthread_mutexattr_settype): Ditto.
- (__sem_init): Ditto.
- (__sem_destroy): Ditto.
- (__sem_wait): Ditto.
- (__sem_trywait): Ditto.
- (__sem_post): Ditto.
- (verifyable_object_isvalid): Recieve a pointer to a pointer for verification.
- (__pthread_mutexattr_getprotocol): Fix typo in magic number.
- (__pthread_mutexattr_getpshared): Ditto.
- (__pthread_mutexattr_gettype): Ditto.
- * thread.h (verifyable_object_isvalid): Change prototype to recieve a pointer to a
- pointer for verification.
- * include/pthread.h: Fix typo for __cleanup_routine_type typedef. (Contrib from Net).
-
-Tue Sep 25 02:09:42 2001 Christopher Faylor <cgf@redhat.com>
-
- * select.cc (fhandler_tty_common::ready_for_read): Rewrite to correctly
- call peek_pipe.
-
-Mon Sep 24 18:46:39 2001 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (peek_pipe): Only grab mutex when we actually got something
- from the pipe.
-
-Mon Sep 24 17:41:03 2001 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.h (fhandler_pipe::hit_eof): New method.
- (writepipe_exists): New class element.
- (orig_pid): Ditto.
- (id): Ditto.
- (is_slow): Eliminate.
- * pipe.cc (fhandler_pipe::set_close_on_exec): Set inheritance on
- writepipe_exists, if it exists.
- (fhandler_pipe::hit_eof): New method, modelled after tty.
- (fhandler_pipe::dup): Duplicate writepipe_exists, if it exists.
- (make_pipe): Set up a dummy event for pipes on windows 9x. The
- nonexistence of this event means that the write side of the
- pipe has closed.
- (_dup): Move to syscalls.cc
- (_dup2): Ditto.
-
- * dtable.cc (dtable::build_fhandler): Fill out set_names here, if
- appropriate.
- * syscalls.cc (_open): Call set_names in build_fhandler.
-
-Sun Sep 23 16:55:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (_open): Set name in fhandler object after successful
- creation.
- (stat_dev): Set device type to block device in FH_FLOPPY case.
-
-Sun Sep 23 11:15:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * dtable.cc (dtable::build_fhandler): Initialize unit when using
- optional path_conv argument.
-
-Sat Sep 22 17:33:45 2001 Christopher Faylor <cgf@cygnus.com>
- Corinna Vinschen <corinna@vinschen.de>
-
- * dtable.cc (dtable::build_fhandler): Accept an optional path_conv
- argument. If available, use this to calculate path name and device
- number.
- * dtable.h (dtable): Reflect above change.
- * fhandler.h (fhandler_base): Declare virtual method which accepts
- path_conv rather than path string as first argument.
- * fhandler.cc (fhandler_base::open): Define above new method.
- * syscalls.cc (_open): Set aside a path_conv variable for use in
- build_fhandler and subsequent call to open.
-
-Sat Sep 22 12:44:57 2001 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (setup_handler): Always relinquish lock after we've
- interrupted.
- * fhandler.cc: Move pipe methods to pipe.cc.
- * fhandler.h (fhandler_pipe): Add new methods.
- * fork.cc (sync_with_parent): Make error messages more informative.
- * pipe.cc (fhandler_pipe::fhandler_pipe): Move here from fhandler.cc.
- (fhandler_pipe::lseek): Ditto.
- (fhandler_pipe::set_close_on_exec): New method.
- (fhandler_pipe::read): Ditto.
- (fhandler_pipe::close): Ditto.
- (fhandler_pipe::dup): Ditto.
- (make_pipe): Create the guard mutex on the read side of the pipe.
- * select.cc (peek_pipe): Use guard_mutex to discover if we have the
- right to read on this pipe.
- (fhandler_pipe::readh_for_read): Pass the read pipe guard mutex to
- peek_pipe.
- * syscalls.cc (_read): Always detect signal catchers, for now.
-
- * debug.cc (makethread): Eliminate hack to make thread inheritable.
- * sigproc.cc (subproc_init): Don't use hack to make thread inheritable.
-
-Thu Sep 20 16:48:44 2001 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.cc (fhandler_base::set_inheritance): Just use
- DUPLICATE_CLOSE_SOURCE to change inheritance. Eliminate all other
- logic dealing with closed handles.
- * fhandler.h (fhandler_base::set_inheritance): Reflect above change.
- * fhandler_tty.cc (fhandler_tty_common::set_close_on_exec): Ditto.
-
-Thu Sep 20 13:34:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::fixup_after_exec): Close
- socket only when not using Winsock2.
-
-Thu Sep 20 13:20:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_socket::fixup_after_exec): Remove inline
- implementation.
- (fhandler_dev_raw::fixup_after_exec): Ditto.
- * fhandler_raw.cc (fhandler_dev_raw::fixup_after_fork): Don't
- duplicate buffer on fork to avoid memory leak.
- (fhandler_dev_raw::fixup_after_exec): New implementation equal to
- former fixup_after_fork() implementation.
- * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Do
- nothing when not using Winsock2.
- (fhandler_socket::fixup_after_exec): New implementation.
- (fhandler_socket::set_close_on_exec): Never call set_inheritance().
-
-Thu Sep 20 9:55:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::set_inheritance): If available,
- use SetHandleInformation() to set inheritance.
- * wincap.cc: Set flag has_set_handle_information_on_console_handles
- appropriately.
- * wincap.h: Add flag has_set_handle_information_on_console_handles.
-
-Wed Sep 19 12:24:09 2001 Christopher Faylor <cgf@cygnus.com>
-
- * lib/getopt.c (__progname): Don't declare if not compiling for cygwin.
-
-Wed Sep 19 18:07:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * lib/getopt.c (getopt_long): Avoid compiler warning.
-
-Wed Sep 19 11:52:42 2001 Christopher Faylor <cgf@cygnus.com>
-
- * lib/getopt.c: Use __progname==__argv[0] when not compiling for cygwin.
-
- * scandir.cc (scandir): Use correct default when compar == NULL.
-
-Wed Sep 19 17:49:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::fhandler_socket): Revert
- memory allocation to use cmalloc again.
-
-Tue Sep 18 21:04:26 2001 Christopher Faylor <cgf@cygnus.com>
-
- * cygwin.din (__argv): Export.
- (__argc): Ditto.
- (__progname): Ditto.
- * include/getopt.h (getopt_long): constify arguments.
- * lib/getopt.c: Import new file from NetBSD.
-
-Tue Sep 18 18:21:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap): Don't reuse anonymous memory in MAP_FIXED case.
-
-Mon Sep 17 17:29:25 2001 Christopher Faylor <cgf@cygnus.com>
-
- * include/io.h: Add access declaration.
-
-Mon Sep 17 14:04:27 2001 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (rmdir): Set cwd to some other location if attempting to
- rmdir current working directory.
-
-Sun Sep 16 23:04:31 2001 Christopher Faylor <cgf@cygnus.com>
-
- * dtable.h (not_open): Assure inline.
- * fhandler.h (operator []): Make const.
-
-Sun Sep 16 23:02:57 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * sync.cc (muto::~muto): Fix typo which stopped muto event handle from
- ever being closed.
-
-2001-09-16 Egor Duda <deo@logos-m.ru>
-
- * path.cc (symlink): Check arguments for validity.
- (getcwd): Ditto.
- * syscalls.cc (ftruncate): Ditto.
- * times.cc (times): Ditto.
- * uname.cc (uname): Ditto.
-
-Sat Sep 15 22:54:49 2001 Christopher Faylor <cgf@cygnus.com>
-
- * net.cc (dup_servent_ptr): Detect old Windows 95 misaligned structure
- and realign appropriately.
-
-Sat Sep 15 00:28:40 2001 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Generate libcygwin.a during the link pass rather than as
- a separate dlltool step.
- * dcrt0.cc (_dll_crt0): pppid_handle could be NULL. Don't close it if
- so.
-
-Fri Sep 14 20:48:18 2001 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (dll_crt0_1): Create vfork main storage here so that it can
- be queried in waitsig later.
- * sigproc.cc (wait_sig): Don't deliver a signal if in a vfork.
- * sigproc.h (sigframe::init): New method.
- (sigframe): Use init.
- * perthread.h: Declare main_vfork.
- * fork.cc (vfork): Deliver all signals on parent return from vfork.
-
-Fri Sep 14 10:21:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc (_dll_crt0()): Don't call wincap.init() here.
-
-Fri Sep 14 00:37:54 2001 Christopher Faylor <cgf@cygnus.com>
-
- * fork.cc (vfork): Avoid recursive vforks.
-
-Fri Sep 14 00:18:52 2001 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h (fhandler_pipe::is_slow): Return true only if pipes are
- reliable (i.e., not Win9x).
- * wincap.cc: Make statics NO_COPY to avoid fork overhead.
-
-Thu Sep 13 23:01:00 2001 Christopher Faylor <cgf@cygnus.com>
-
- * grp.cc (read_etc_group): Just reuse group_buf storage for subsequent
- reread of /etc/group.
- * passwd.cc (read_etc_passwd): Just reuse passwd_buf storage for
- subsequent reread of /etc/passwd.
-
-Thu Sep 13 20:46:05 2001 Christopher Faylor <cgf@cygnus.com>
-
- * cygheap.cc (dup_now): New function.
- (cygheap_setup_for_child): Accept new argument controlling whether to
- delay copying of cygheap to shared memory region.
- (cygheap_setup_for_child_cleanup): Accept new arguments controlling
- whether to copy cygheap at this point.
- * cygheap.h: Reflect above changes.
- * fork.cc (fork_parent): Break copying of cygheap into two parts when
- fork_fixup is required so that the child can see the parent's changes.
- (vfork): Do stack cleanup prior to forcing a fork error.
- * spawn.cc (spawn_guts): Ditto.
-
-Thu Sep 13 17:14:59 2001 Christopher Faylor <cgf@cygnus.com>
-
- * cygheap.cc (ccalloc): Pass correct length to creturn so that
- cygheap_max is correctly calculated.
-
-Wed Sep 12 21:06:38 2001 Christopher Faylor <cgf@cygnus.com>
-
- * sync.cc (muto::acquire): Fix while/if typo.
-
-Wed Sep 12 23:06:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * wincap.cc (wincapc::init): Simplify W2K/XP case.
-
-Wed Sep 12 23:02:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * wincap.cc (wincapc::init): Set os name to "NT" on XP, too.
-
-Wed Sep 12 19:00:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in: Build wincap.o.
- * wincap.cc: New file.
- * wincap.h: Ditto.
- * autoload.cc: Add dynamic load statement for `CreateHardLinkA'.
- * dcrt0.cc (os_being_run): Eliminated.
- (osname): Ditto.
- (iswinnt): Ditto.
- (set_os_type): Ditto.
- (dll_crt0_1): Call wincap.init() instead of set_os_type().
- (_dll_crt0): Ditto.
- * environ.cc (set_chunksize): New function.
- (parse_thing): `forkchunk' setting now invokes function `set_chunksize'.
- * fork.cc (chunksize): Eliminated. Moved to be member of wincap.
- * host_dependent.h: Removed.
- * syscalls.cc (_link): Try using `CreateHardLinkA' first, if available.
- * cygheap.cc, dcrt0.cc, delqueue.cc, dir.cc,
- environ.cc, fhandler.cc, fhandler.h, fhandler_console.cc,
- fhandler_mem.cc, fork.cc, mmap.cc, net.cc, pinfo.cc, pinfo.h,
- security.cc, syscalls.cc, sysconf.cc, syslog.cc, thread.cc,
- times.cc, tty.cc, uinfo.cc, uname.cc, winsup.h: Use new wincap
- capability check throughout.
- * winsup.h: Include wincap.h. Eliminate extern declarations of
- `os_being_run' and `iswinnt'. Eliminate `os_type" definition.
- * include/cygwin/version.h: Bump version to 1.3.4.
-
-Wed Sep 12 01:03:36 2001 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (call_signal_handler_now): Add additional guard against
- inappropriately calling signal handler.
- * syscalls.cc (_read): Reset errno if not exiting due to signal.
-
-Wed Sep 12 13:03:00 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * autoload.cc (LoadDLLfuncEx): Auto load TryEnterCriticalSection - it's
- an NT only call.
- * thread.cc (pthread_cond::TimedWait): Use critical sections for NT.
- (pthread_cond::fixup_after_fork): Don't detect bad apps.
- (pthread_mutex::pthread_mutex): Use critical sections for NT.
- (pthread_mutex::~pthread_mutex): Ditto.
- (pthread_mutex::Lock): Ditto.
- (pthread_mutex::TryLock): Ditto.
- (pthread_mutex::UnLock): Ditto.
- (pthread_mutex::fixup_after_fork): Ditto. Also do not detect bad apps.
- (__pthread_mutex_trylock): Move WIN32 specific test into the class
- method.
- (__pthread_mutex_destroy): Prevent dereferencing passed pointer without
- valid address.
- * thread.h (pthread_mutex): Use critical sections for NT.
-
-Tue Sep 11 21:55:37 2001 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.h (sigframe::unregister): Return true/false whether this
- frame is capable of responding to signals.
- * exceptions.cc (sigframe::call_signal_handler): Don't call signal
- handler if it is not armed for this thread.
-
-Tue Sep 11 11:23:10 2001 Christopher Faylor <cgf@cygnus.com>
-
- * cygwin.din: Remove cygwin_getshared.
- * shared.cc: Ditto.
- * include/cygwin/version.h: Bump API minor number.
-
-Tue Sep 11 11:14:11 2001 Dmitry Timoshkov <dmitry@baikal.ru>
-
- * dtable.cc (dtable::build_fhandler): Fix incorrect test for socket.
-
-Tue Sep 11 21:22:00 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * thread.cc (pthread_cond::~pthread_cond): Fix incorrect use of
- InterlockExchangePointer.
- (pthread_mutex::~pthread_mutex): Ditto.
- (semaphore::~semaphore): Ditto.
-
-Tue Sep 11 18:15:00 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * dcrt0.cc (cygwin_finished_initializing): Copy _mtinterf on fork.
- * fork.cc (fork_child): Fixup thread-related structures after fork.
- * thread.cc (MTinterface::Init): Initialise the new mutex, condition
- and semaphore lists.
- (MTinterface::fixup_after_fork): Iterate through each list and fixup
- the objects.
- (pthread_cond::pthread_cond): Add this to the condition list.
- (pthread_cond::~pthread_cond): Remove this from the condition list.
- (pthread_cond::fixup_after_fork): Recreate as best we can the pre-fork
- state.
- (pthread_mutex::pthread_mutex): Add this to the mutex list.
- (pthread_mutex::~pthread_mutex): Remove this from the mutex list.
- (pthread_mutex::fixup_after_fork): Recreate as best we can the pre-fork
- state.
- (semaphore::semaphore): Store the initial value, and add this to the
- semaphore list.
- (semaphore::~semaphore): Remove this from the semaphore list.
- (semaphore::Post): Increment the current semaphore value.
- (semaphore::TryWait): Decrement the current semaphore value.
- (semaphore::Wait): Ditto.
- (semaphore::fixup_after_fork): Recreate the pre-fork state as best we
- can.
- * thread.h (pthread_mutex): New members to allow fixup_after_fork.
- (pthread_cond): Ditto.
- (semaphore): Ditto.
- (MTinterface): New list heads for tracking conds and semaphores.
-
-Sun Sep 9 22:11:27 2001 Christopher Faylor <cgf@cygnus.com>
-
- * dtable.cc (dtable::fixup_after_fork): Use SetStdHandle appropriately
- on inherited fds.
-
-Sun Sep 9 20:09:11 2001 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.cc (NZOMBIES): Reduce substantially to minimize memory use.
-
-Mon Sep 10 08:28:00 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * thread.h (MT_Interface): Remove pshared mutex array. Add a
- threadsafe list for mutex tracking (for fixup after fork).
- * thread.cc (MTInterface::Init): Remove pshared mutex array.
- (pthread_mutex::pthread_mutex): Remove pshared mutex functionality.
- Fail with EINVAL on attempts to use pshared functionality.
- (__pthread_mutex_getpshared): Remove.
- (__pthread_cond_timedwait): Remove pshared mutex functionality.
- (__pthread_cond_wait): Ditto.
- (__pthread_mutex_init): Ditto.
- (__pthread_mutex_getprioceiling): Ditto.
- (__pthread_mutex_lock): Ditto.
- (__pthread_mutex_trylock): Ditto.
- (__pthread_mutex_unlock): Ditto.
- (__pthread_mutex_destroy): Ditto.
- (__pthread_mutex_setprioceiling): Ditto.
- (__pthread_mutexattr_setpshared): Ditto.
-
-Sun Sep 9 23:09:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * pwdgrp.h (pwdgrp_check::set_last_modified): Call GetFileTime()
- instead of GetFileInformationByHandle().
-
-Sun Sep 9 15:59:53 2001 Christopher Faylor <cgf@cygnus.com>
-
- * heap.h (inheap): Rewrite macro to accommodate removal of brk macros
- below.
-
-Sun Sep 9 15:02:44 2001 Christopher Faylor <cgf@cygnus.com>
-
- * cygheap.cc (cygheap_fixup_in_child): Clear cygheap->base so that heap
- is not forced to start at the same place in execed process.
- * heap.cc: Remove brk* macros for clarity throughout.
- * heap.h: Ditto.
- * shared.cc (shared_info::initialize): Move heap_chunk test into
- heap_chunk_size().
- (heap_chunk_size): Check for chunk size here. Don't go to registry if
- heap_chunk_in_mb is already set.
-
- * smallprint.c (console_printf): Add Windows 95 concessions.
-
-Sun Sep 9 13:01:06 2001 Christopher Faylor <cgf@cygnus.com>
-
- * child_info.h (PROC_MAGIC): Bump magic number.
-
-Sun Sep 9 18:36:00 2001 Corinna Vinschen <corinna@vinschen.de>
- Christopher Faylor <cgf@cygnus.com>
-
- * cygheap.cc (init_cygheap::etc_changed): New method to signal
- a change in /etc.
- * cygheap.h (struct init_cygheap): Add member `etc_changed_h'
- and method `etc_changed'.
- * grp.cc (enum grp_state): Eliminate.
- (class grp_check): Ditto.
- (group_state): Define as `class pwdgrp_check'.
- (parse_grp): Remeber path and modification time of /etc/group file.
- * passwd.cc (enum_pwd_state): Eliminate.
- (class pwd_check): Ditto.
- (passwd_state): Define as `class pwdgrp_check'.
- (read_etc_passwd): Remember path and modification time of /etc/passwd
- file.
- * pwdgrp.h: New file.
- (enum pwdgrp_state): Substitutes `pwd_state' and `grp_state'.
- (class pwdgrp_check): Substitutes `pwd_check' and `grp_check'.
-
-Sun Sep 9 14:31:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/version.h: Bump API minor version to 45 according
- to adding the gamm*_r functions.
-
-Sat Sep 8 23:32:18 2001 Christopher Faylor <cgf@cygnus.com>
-
- * fork.cc (fork_parent): Stop malloc activity while fork is in control
- of the heap.
- * sigproc.cc (NZOMBIES): Rename from ZOMBIEMAX for clarity.
- (zombies): Revert to original behavior. Allocating zombie array
- resulted in performance hit.
- * winsup.h: Declare malloc lock routines.
-
-Fri Sep 7 21:35:35 2001 Christopher Faylor <cgf@cygnus.com>
-
- * cygwin.din: Add gamm*_r function exports.
-
-Fri Sep 7 17:11:11 2001 Christopher Faylor <cgf@cygnus.com>
-
- * cygheap.h (init_cygheap): Move heap pointers here.
- * include/sys/cygwin.h (perprocess): Remove heap pointers.
- * dcrt0.cc (__cygwin_user_data): Reflect obsolete perprocess stuff.
- (_dll_crt0): Don't initialize heap pointers.
- (cygwin_dll_init): Ditto.
- (release_upto): Use heap pointers from cygheap.
- * heap.h: Ditto.
- * fork.cc (fork_parent): Ditto. Don't set heap pointers in ch.
- (fork_child): Remove obsolete sigproc_fixup_after_fork.
- * shared.cc (memory_init): Reorganize so that cygheap initialization is
- called prior to regular heap since regular heap uses cygheap now.
- * sigproc.cc (proc_subproc): Eliminate zombies allocation.
- (sigproc_init): Move zombies alloation here. Don't free up array on
- fork, just reuse it.
- (sigproc_fixup_after_fork): Eliminate.
- * sigproc.h: Ditto.
- * include/cygwin/version.h: Reflect change to perprocess structure.
-
-Fri Sep 7 10:53:34 2001 Jason Tishler <jason@tishler.net>
-
- * poll.cc (poll): Change implementation to only call select() when no
- invalid file descriptors are specified.
-
-Fri Sep 7 10:27:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * include/limits.h: Define PIPE_BUF.
- * syscalls.cc (fpathconf): Use PIPE_BUF instead of numerical constant.
- (pathconf): Ditto.
-
-Thu Sep 6 20:04:05 2001 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_socket.cc (fhandler_socket::fhandler_socket): Ensure that
- prot_info_ptr is zeroed for later use.
-
-Thu Sep 6 14:03:49 2001 Christopher Faylor <cgf@cygnus.com>
-
- * cygheap.cc (cygheap_fixup_in_child): Don't consider a NULL bucket as
- a candidate for deletion. It is actually the end of a linked list
- chain.
-
- * exceptions.cc (open_stackdumpfile): Default to "unknown" program name
- if myself->progname hasn't been filled out yet.
-
-Thu Sep 6 01:16:44 2001 Christopher Faylor <cgf@cygnus.com>
-
- Move appropriate variables to NO_COPY segment, throughout.
-
-Thu Sep 6 00:40:35 2001 Christopher Faylor <cgf@cygnus.com>
-
- Remove initialization of static or global values to zero, throughout.
- This just needlessly grows the size of the DLL.
- * tty.cc (tty::alive): Make inuse handle non-inheriting on open, just
- for thread safety.
-
-Wed Sep 5 23:36:03 2001 Christopher Faylor <cgf@cygnus.com>
-
- * cygheap.h (init_cygheap): Move bucket array here from cygheap.cc.
- * cygheap.cc: Throughout use bucket array from cygheap.
-
- * sigproc.cc (proc_subproc): Dynamically allocate zombie buffer to save
- DLL space.
- (sigproc_fixup_after_fork): Free zombie array after a fork.
- * sigproc.h (sigproc_fixup_after_fork): Declare.
-
-2001-09-06 Egor Duda <deo@logos-m.ru>
-
- * dir.cc (mkdir): Expand buffer for security descriptor to 4K to avoid
- stack corruption.
- * fhandler.cc (fhandler_base::open): Ditto.
- * path.cc (symlink): Ditto.
-
-Wed Sep 5 21:35:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * winver.rc: Change copyright to include 2001.
-
-Wed Sep 5 12:12:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_floppy.cc (fhandler_floppy::lseek): Remove iswinnt check.
-
-Wed Sep 5 11:34:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::close): Change 2MSL value
- according to MSDN.
-
-Wed Sep 5 10:14:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_connect): Add WSAEALREADY and WSAEINVAL handling
- for non-blocking sockets.
-
-Tue Sep 4 22:42:13 2001 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (ctrl_c_handler): Only send SIGINT when we have a
- controlling terminal and we are the head of the process group.
-
-Tue Sep 4 16:48:14 2001 Christopher Faylor <cgf@cygnus.com>
-
- * thread.cc (InterlockedExchangePointer): Don't define if it already
- exists.
-
-Tue Sep 4 22:14:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * uname.cc (uname): Eliminate os specific retrieving of x86
- processor type.
-
-2001-09-04 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * fhandler_console.cc (fhandler_console::char_command): Save the cursor
- position relative to the top of the window.
- * fhandler_cc (fhandler_console::write): Ditto.
-
-Mon Sep 3 21:06:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc (opendir): Write version information to __d_dirent->d_version.
-
-Mon Sep 3 18:34:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Add `dirfd'.
- * dir.cc (dirfd): New function.
- (opendir): Open a directory file descriptor and save it in
- __d_dirent->d_fd.
- (closedir): Close directory file descriptor.
- * include/cygwin/version.h: Bump API minor version to 44.
-
-Sun Sep 2 22:09:31 2001 Christopher Faylor <cgf@cygnus.com>
-
- * child_info.h: Modify magic number.
- * dcrt0.cc (_cygwin_testing): Define.
- (_dll_crt0): Set _cygwin_testing if CYGWIN_TESTING environment variable
- exists. Don't issue "conflicting versions" error if _cygwin_testing is
- true.
- * shared.cc (shared_name): Use _cygwin_testing global rather than
- testing the environment.
- * syscalls.cc (_write): Remove debugging info.
-
-Sat Sep 1 01:37:13 2001 Christopher Faylor <cgf@cygnus.com>
-
- * tty.cc (tty::create_inuse): Eliminate unneeded argument.
- * tty.h: Reflect above change.
- * fhandler_tty.cc: Reflect argument reduction in tty::create_inuse,
- throughout. Always make inuse inheritable.
-
-Sat Sep 1 01:10:07 2001 Christopher Faylor <cgf@cygnus.com>
-
- * debug.cc (mark_closed): Rename from debug_mark_closed and make
- static.
- (setclexec_pid): New function for marking saved handle as
- close-on-exec.
- (delete_handle): New function.
- (debug_fixup_after_fork): New function.
- * debug.h: Declare new functions, remove obsolete ones.
- * fork.cc (debug_fixup_after_fork): Call to cleanup close-on-exec
- handles.
-
- * fhandler.cc (fhandler_disk_file::close): Minor reorg.
- (fhandler_base::set_inheritance): Set flag appropriately for debugging
- when close-on-exec so forked process can delete closed handles.
- * tty.h (open_output_mutex): Eliminate unneeded argument.
- (open_input_mutex): Ditto.
- * fhandler_tty.cc (fhandler_tty_slave::open): reflect open_*_mutex
- argument changes.
- * fhandler.h (fhandler_socket): Make saw_shutdown_* functions type
- bool.
- * tty.cc (tty::get_event): Eliminate unneeded argument.
- (tty::common_init): Reflect change to get_event. Events should always
- be inherited.
-
-Fri Aug 31 21:39:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (create_token): Change initialization of `exp' to comply
- with new LARGE_INTEGER definition in winnt.h.
-
-Fri Aug 31 13:58:51 2001 Christopher Faylor <cgf@cygnus.com>
-
- * cygwin.sc: Revert to previous NO_COPY behavior.
- * winsup.h: Ditto.
- * sigproc.cc: Ditto.
- * autoload.cc: Ditto.
-
-Fri Aug 31 00:56:26 2001 Christopher Faylor <cgf@cygnus.com>
-
- * cygwin.sc: New file -- linker script for building cygwin DLL.
- * Makefile.in: Use linker script to control location of cygheap.
- * cygheap.cc (buckets): Make static.
- (init_cheap): Remove special iswinnt handling. Allocate cygheap at a
- fixed location. Display more info when allocation fails.
- (cygheap_fixup_in_child): Try harder to move cygheap to correct
- location. Display more info when allocation fails.
- * fhandler.h (fhandler_socket): Add macros for tracking socket shutdown
- state.
- * net.cc (cygwin_shutdown): Set appropriate shutdown value for future
- use.
- * select.cc (select_stuff::cleanup): New method.
- (cygwin_select): Call cleanup explicitly to avoid a race.
- (select_stuff:~select_stuff): Call cleanup chain via cleanup method.
- (fhandler_socket::select_read): Set *_ready when shutdown has been
- called on the socket.
- (fhandler_socket::select_write): Ditto.
- (fhandler_socket::select_except): Ditto.
-
- * winsup.h: Move NO_COPY to "COMMON" section.
- * autoload.cc (wsock_started): Avoid initializing NO_COPY value.
- * sigproc.cc: Remove initialization from NO_COPY variables.
- (sigproc_init): Initialize sig_loop_wait here, rather than via
- initialization.
- (subproc_init): Initialize proc_loop_wait here, rather than via
- initialization.
-
-Thu Aug 30 10:19:00 2001 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (select_read): Add setting read_ready flag.
- (select_write): Add setting write_ready flag.
-
-Wed Aug 29 00:40:42 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (path_conv::check): Avoid splitting off leading '/' in path
- component when building a symlink.
-
-Wed Aug 29 0:45:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * resource.cc (getrlimit): Return actual values on RLIMIT_STACK.
-
-Tue Aug 28 16:37:17 2001 Christopher Faylor <cgf@cygnus.com>
-
- * dir.cc (rmdir): Report ENOENT when file doesn't exist rather than
- ENOTDIR.
-
-Mon Aug 27 11:58:19 2001 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (cygwin_select): Ensure that arguments are zeroed on
- timeout.
- (select_stuff::wait): Ditto.
-
-2001-08-24 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * syscalls.cc (check_tty_fds): New function. Check whether there is a
- fd referring to pty slave.
- (setsid): Don't detach console if the process has a pty slave.
-
-Fri Aug 24 8:54:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (free_addr_list): Add define for symmetry.
- (free_hostent_ptr): Use free_addr_list to free h_addr_list element.
-
-Thu Aug 23 16:00:09 2001 Jason Tishler <jason@tishler.net>
-
- * net.cc (dup_addr_list): New static function.
- (dup_hostent_ptr): Use dup_addr_list instead of dup_char_list in order
- to handle embedded null characters.
-
-Wed Aug 22 22:23:14 2001 Christopher Faylor <cgf@cygnus.com>
-
- * dtable.cc (dtable::dup2): Allow extension of fd table by dup2.
- * syscalls.cc: Minor code cleanup.
- (fpathconf): Check for bad fd before doing anything else.
- * termios.cc (tcsetattr): Don't convert to new termios if bad fd.
- (tcgetattr): Minor debugging tweak.
-
-Wed Aug 22 23:41:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_inet_ntoa): Rearrange previous patch to use
- thread local buffer space when compiled thread safe.
- (cygwin_getprotobyname): Ditto.
- (cygwin_getprotobynumber): Ditto.
- (cygwin_getservbyname): Ditto.
- (cygwin_getservbyport): Ditto.
- (cygwin_gethostbyname): Ditto.
- (cygwin_gethostbyaddr): Ditto. Move near to cygwin_gethostbyname.
- * thread.h (struct _winsup_t): Add pointers for above used buffer space.
- * passwd.cc (getpwduid): Remove initializing passwd.
- (setpwent): Ditto.
- (endpwent): Ditto.
- (setpassent): Ditto.
-
-Wed Aug 22 13:41:09 2001 Christopher Faylor <cgf@cygnus.com>
-
- * smallprint.c (console_printf): New function.
- * dcrt0.cc (dll_crt0_1): Use console_printf for debugging output.
- * debug.cc (debug_mark_closed): New function.
- (close_handle): Use debug_mark_closed.
- * debug.h: Declare new functions.
- * dtable.cc (dtable::build_fhandler): Remove unneeded extern.
- * spawn.cc: Cosmetic changes.
- * winsup.h: Define NO_COPY for C files, too. Declare a global.
-
-Wed Aug 22 17:31:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (free_char_list): New static function.
- (dup_char_list): Ditto.
- (free_protoent_ptr): Ditto.
- (dup_protoent_ptr): Ditto.
- (free_servent_ptr): Ditto.
- (dup_servent_ptr): Ditto.
- (free_hostent_ptr): Ditto.
- (dup_hostent_ptr): Ditto.
- (cygwin_inet_ntoa): Use local static buffer to allow propagating of
- the result to child processes.
- (cygwin_getprotobyname): Ditto.
- (cygwin_getprotobynumber): Ditto.
- (cygwin_getservbyname): Ditto.
- (cygwin_getservbyport): Ditto.
- (cygwin_gethostbyname): Ditto.
- (cygwin_gethostbyaddr): Ditto.
-
-Mon Aug 20 11:56:19 2001 Christopher Faylor <cgf@cygnus.com>
-
- * cygheap.cc (init_cheap): Allocate cygheap in shared memory for Windows NT.
-
-Thu Aug 16 09:38:59 2001 Jason Tishler <jason@tishler.net>
-
- * fhandler_socket.cc (fhandler_socket::create_secret_event): Relax
- security of secret_event so AF_UNIX socket clients can connect to
- servers even if running under a different user account.
- (fhandler_socket::check_peer_secret_event): Ditto.
-
-Thu Aug 16 16:26:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * resource.cc (getrlimit): Return getdtablesize () as current limit
- on RLIMIT_NOFILE.
- * syscalls.cc (getdtablesize): Return OPEN_MAX if current dtable size
- is less than OPEN_MAX, the current dtable size otherwise.
- * sysconf.cc (sysconf): Return getdtablesize () on _SC_OPEN_MAX.
-
-Thu Aug 16 16:17:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * resource.cc (getrlimit): Return OPEN_MAX as current limit
- on RLIMIT_NOFILE.
- * syscalls.cc (getdtablesize): Return OPEN_MAX.
- * sysconf.cc (sysconf): Return OPEN_MAX on _SC_OPEN_MAX.
- * include/limits.h (OPEN_MAX): Define as 256.
-
-Wed Aug 15 12:43:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * times.cc (utimes): Revert previous change. Just open the
- file using FILE_WRITE_ATTRIBUTES instead of GENERIC_WRITE
- on NT/W2K.
-
-Wed Aug 15 12:18:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (set_nt_attribute): Return always -1 in case of
- a failure.
- * times.cc (utimes): On NTFS with ntsec ON, change the file's
- security descriptor temporarily to acquire write access if
- opening the file failed.
-
-Wed Aug 15 9:42:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::is_nonblocking): New method.
- (fhandler_base::set_nonblocking): Ditto.
- * fhandler.h (fhandler_base): Declare new methods `is_nonblocking' and
- `set_nonblocking'.
- * fhandler_socket.cc (fhandler_socket::ioctl): Use `set_nonblocking'.
- * fhandler_tty.cc (fhandler_pty_master::process_slave_output):
- Use `is_nonblocking'.
- (fhandler_tty_slave::read): Ditto.
- (fhandler_tty_slave::ioctl): Use `set_nonblocking'.
- (fhandler_pty_master::ioctl): Ditto.
- * net.cc (cygwin_sendto): Fallback to winsock 1 functionality
- in case of nonblocking IO.
- (cygwin_recvfrom): Ditto.
- (cygwin_recv): Ditto.
- (cygwin_send): Ditto.
- * syscalls.cc (_read): Use `is_nonblocking'.
-
-Tue Aug 14 11:05:26 2001 Christopher Faylor <cgf@cygnus.com>
-
- * include/cygwin/version.h: Bump API version.
-
-2001-08-14 Egor Duda <deo@logos-m.ru>
-
- * spawn.cc (spawn_guts): Enable appropriate privilege before
- loading user's registry hive.
-
-Mon Aug 13 22:34:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::fcntl): Use new O_NONBLOCK_MASK define.
- * fhandler.h: Move definitions of O_NOSYMLINK, O_DIROPEN and
- OLD_O_NDELAY from winsup.h to here. Add O_NONBLOCK_MASK define.
- * fhandler_socket.cc (fhandler_socket::close): Add hack to allow
- a graceful shutdown even if shutdown() hasn't been called by the
- application. Add debug output.
- (fhandler_socket::ioctl): Set fhandler's NONBLOCK flag according
- to FIONBIO setting.
- (fhandler_socket::fcntl): Use new O_NONBLOCK_MASK define. Actually
- set `request' before using it.
- * fhandler_tty.cc: Use new O_NONBLOCK_MASK define throughout.
- (fhandler_tty_slave::ioctl): Set fhandler's NONBLOCK flag according
- to FIONBIO setting.
- (fhandler_pty_master::ioctl): Ditto.
- * net.cc (wsock_event::prepare): Compare WSACreateEvent return code
- with `WSA_INVALID_EVENT' according to MSDN.
- * syscalls.cc (_read): Use new O_NONBLOCK_MASK define.
-
-Wed Aug 8 15:24:59 2001 Christopher Faylor <cgf@cygnus.com>
-
- * include/wchar.h: Define __need_wint_t.
-
-Wed Aug 8 11:46:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (alloc_sd): Revert to setting inheritance attribute for
- permissions given to directories. Never set inheritance on NULL ACE.
-
-Tue Aug 7 18:11:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (alloc_sd): Don't set FILE_DELETE_CHILD for group
- if S_ISVTX attribute is given.
- * dir.cc (mkdir): Allow immediate setting of S_ISUID, S_ISGID and
- S_ISVTX attribute.
- * syscalls.cc (_open): Ditto.
-
-Tue Aug 7 16:24:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc (mkdir): Set security attributes correctly for
- CreateDirectoryA () call if ntsec is on. Don't call
- set_file_attributes () then.
- * fhandler.cc (fhandler_base::open): Ditto for CreateFileA () call.
- * path.cc (symlink): Ditto.
- * security.cc (set_security_attribute): New function.
- * security.h: Add declaration for `allow_ntea' and
- `set_security_attribute'.
-
-Tue Aug 7 10:54:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * grp.cc (class grp_check): New class. Make `group_state'
- a member of class grp_check.
- (read_etc_group): Free former allocated memory on reread.
- * passwd.cc (class pwd_check): New class Make `passwd_state'
- a member of class pwd_check.
- (read_etc_passwd): Free former allocated memory on reread.
-
-Tue Aug 7 01:13:58 2001 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_console.cc (get_tty_stuff): Don't initialize shared memory
- console area if it is already initialized.
-
- * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Augment debugging
- info.
-
-Mon Aug 6 19:58:43 2001 Christopher Faylor <cgf@cygnus.com>
-
- * cygheap.cc (cygheap_root::set): Avoid treating '/' specially.
-
- * fhandler.cc (fhandler_base::fcntl): Only set specific O_NDELAY style
- flag passed in from application.
- * fhandler_socket.cc (fhandler_socket::fcntl): Ditto.
- * fhandler.h: Set constant for future use.
- * winsup.h: Define OLD_O_NDELAY only for old programs.
- * include/cygwin/version.h: Define
- CYGWIN_VERSION_CHECK_FOR_OLD_O_NONBLOCK.
-
-Sat Aug 4 16:52:03 2001 Christopher Faylor <cgf@cygnus.com>
-
- Throughout, change check for running under Windows NT to 'iswinnt'.
- * dcrt0.cc (set_os_type): Set 'iswinnt' appropriately.
- * cygheap.cc (init_cheap): Revert to using VirtualAlloc for allocating
- cygheap.
- (cygheap_setup_for_child_cleanup): New function. Standard function to
- call after calling CreateProcess to cleanup cygheap info passed to
- child.
- (cygheap_fixup_in_child): Copy cygheap from shared memory into
- allocated space under Windows 9x or if can't relocate shared space
- under NT.
- * cygheap.h: Declare new function.
- * spawn.cc (spawn_guts): Use cygheap_fixup_in_child.
- * fork.cc (fork_parent): Ditto.
- * winsup.h: Declare iswinnt.
-
-2001-08-04 Egor Duda <deo@logos-m.ru>
-
- * dtable.cc (dtable::release): Avoid messing with console when
- closing socket.
-
-Fri Aug 3 14:02:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_accept): Allow NULL peer and len parameters.
- * include/cygwin/socket.h: Define socklen_t as int.
-
-Fri Aug 3 13:04:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (fchdir): Set the fhandler's path to absolute value to ensure
- changing to the correct directory even if the fhandler originally
- points to a relative path.
-
-Thu Aug 2 17:59:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (set_file_attribute): Clean up. Don't call
- `set_nt_attribute' when ntsec isn't set.
-
-Sat Jul 28 22:30:55 2001 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (alloc_stack_hard_way): Make half-hearted attempt to deal
- with growing stack under Windows 95.
-
-Fri Jul 27 12:36:07 2001 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Add install-lib and install-headers.
-
-Fri Jul 27 12:28:12 2001 Christopher Faylor <cgf@cygnus.com>
-
- * cygwin.din: Export sys_errlist, sys_nerr.
- * include/cygwin/version.h: Bump minor version number.
-
-Fri 27 Jul 2001 10:29:00 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (get_user_primary_group): Fix compiler warning.
- (alloc_sd): Add DELETE permission for user when S_IWUSR is given.
-
-Thu Jul 26 16:43:39 2001 Pieter de Visser <pieterdv@knoware.nl>
-
- * thread.cc (__pthread_equal): Invert return value so that true is
- returned when threads are equal.
-
-Thu Jul 26 15:50:38 2001 Charles Wilson <cwilson@ece.gatech.edu>
- Christopher Faylor <cgf@cygnus.com>
-
- * cygwin.din: Export __signgam.
- * include/cygwin/version.h: Bump minor version number.
-
-Thu Jul 26 15:19:50 2001 Christopher Faylor <cgf@cygnus.com>
-
- Throughout, reorganize header file inclusion to put security.h prior to
- fhandler.h.
- * fhandler.h (fhandler_base::get_inheritance): New method.
- * fhandler_socket.cc (fhandler_socket::create_secret_event): Use proper
- close-on-exec inheritance when creating.
- (fhandler_socket::check_peer_secret_event): Create handle as
- non-inheritable.
-
-2001-07-25 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * syscalls.cc (setsid): Detach process from its console if the current
- controlling tty is the console and already closed.
- * dtable.h (class dtable): Add members to count descriptors referring
- to the console.
- * dtable.cc (dtable::dec_console_fds): New function to detach process
- from its console.
- (dtable::release): Decrement the counter of console descriptors.
- (dtable::build_fhandler): Increment it.
- * exception.cc (ctrl_c_handler): Send SIGTERM to myself when catch
- CTRL_SHUTDOWN_EVENT.
-
-Tue 24 Jul 2001 02:28:00 PM Trevor Forbes <t4bs@hotmail.com>
-
- * thread.cc (verifyable_object_isvalid): Don't validate
- PTHREAD_MUTEX_INITIALIZER pointer as it will cause an exception
- in IsBadWritePtr() when running GDB.
-
-Wed 25 Jul 2001 23:46:00 Corinna Vinschen <corinna@vinschen.de>
-
- * localtime.c: Changed whole file to become C++ clean. Rename to
- localtime.cc.
- * localtime.cc (tzload): Preserve errno.
-
-Fri 20 Jul 2001 11:15:50 PM EDT Christopher Faylor <cgf@cygnus.com>
-
- * cygheap.cc (cygheap_fixup_in_child): Attempt Win95 workaround.
- * dtable.cc (dtable::dup_worker): Add debugging output.
- (dtable::vfork_child_dup): Correctly set close_on_exec.
- * fhandler.cc (fhandler_base::fork_fixup): Don't mess with handle if
- there is no need to get it from the parent.
- * fhandler_tty.cc (fhandler_tty_common::close): Add debugging output.
-
-Fri 20 Jul 2001 09:15:00 Mark Bradshaw <bradshaw@staff.crosswalk.com>
-
- * dir.cc (readdir): Protect FindNextFileA against INVALID_HANDLE_VALUE.
-
-Wed 18 Jul 2001 01:00:47 PM EDT Christopher Faylor <cgf@cygnus.com>
-
- * cygheap.cc (_cmalloc): Use correct constants for size calculation.
- * dcrt0.cc (dll_crt0_1): Move uid initialization earlier.
- * fork.cc (fork_parent): Move cygheap_setup_in_child to just prior to
- CreateProcess so that all contents of cygheap are copied.
- * spawn.cc (spawn_guts): Ditto.
-
-Wed 18 Jul 2001 12:54:17 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (get_user_groups): Call Net function with NULL server
- name under specific error conditions.
- (is_group_member): Ditto.
- (get_user_local_groups): Ditto.
- (get_user_primary_group): Ditto.
-
-Wed 18 Jul 2001 11:56:00 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (_unlink): Explicitly check for non-existant file.
-
-Tue 17 Jul 2001 10:19:00 Corinna Vinschen <corinna@vinschen.de>
-
- * delqueue.h: Remove obsolete file.
-
-Mon 16 Jul 2001 10:47:17 PM EDT Christopher Faylor <cgf@cygnus.com>
-
- * child_info.h: Bump magic number.
- (class child_info): Add an element.
- * cygheap.cc (init_cheap): Allocate cygwin heap in shared memory area.
- (cygheap_fixup_in_child): Map cygwin heap, passed from parent via
- shared memory into correct address.
- (cygheap_setup_for_child): New function.
- * cygheap.h: Declare new functions.
- * dcrt0.cc (dll_crt0_1): Accommodate new cygheap_fixup_in_child
- arguments. Avoid protecting subproc_ready unless it is spawn/nowait.
- * fork.cc (fork_parent): Use new cygheap_setup_for_child function to
- setup cygwin heap info. Close passed cygheap shared memory handle.
- * spawn.cc (spawn_guts): Ditto. Also, reorganize to avoid
- synchronization between parent and child in non-P_OVERLAY case.
- * sigproc.cc (wait_sig): Only signal subproc_ready when execing.
-
-Mon 16 Jul 2001 15:21:00 Corinna Vinschen <corinna@vinschen.de>
-
- * grp.cc: Add missing Copyright date 2001.
-
-Mon 16 Jul 2001 00:11:00 Corinna Vinschen <corinna@vinschen.de>
-
- Change well_known_admin_sid to well_known_admins_sid throughout.
- * sec_acl.cc (setacl): Never set DELETE permission. Set
- FILE_DELETE_CHILD only on readable and executable directories.
- * sec_helper.cc: Add constructor for `well_known_null_sid'.
- * security.cc (get_nt_attribute): Set S_ISVTX for directories if
- FILE_WRITE_DATA and FILE_EXECUTE but not FILE_DELETE_CHILD is set.
- Add evaluation of S_ISVTX, S_ISGID and S_ISUID from NULL ACE.
- (alloc_sd): Never set DELETE permission. Set FILE_DELETE_CHILD
- only on readable and executable directories.
- Add creation of NULL ACE for S_ISVTX, S_ISGID and S_ISUID permissions.
- * security.h: Add extern declaration for `well_known_null_sid'.
-
-Fri 13 Jul 2001 08:08:49 PM EDT Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (stat_worker): Simplify previous change.
-
-Fri Jul 13 13:13:09 2001 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (_unlink): Correct (?) logic which determines when
- to report an access violation and when to queue file for eventual
- deletion.
- (stat_worker): Check for invalid buf argument.
-
-Tue Jul 10 23:01:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (fhandler_disk_file::mmap): Try to open file mappings
- by a unified name when running under 9x/ME. If that failes, create
- the file mapping using the unified name.
-
-Mon Jul 9 10:43:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * uinfo.cc (internal_getlogin): Add pointer check.
-
-Mon Jul 9 10:05:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (alloc_sd): Don't set inheritance attribute for
- permissions given to directories.
-
-Thu Jun 28 22:19:08 2001 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_dsp.cc (fhandler_dev_dsp::ioctl): Return 0 for success.
-
-Wed Jun 27 22:19:07 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (path_conv::check): Add signal protection here since
- retrieving info about remote shares can take some time.
-
-Wed Jun 27 23:30:00 2001 Robert Collins <rbtcollins@hotmail.com>
- Christopher Faylor <cgf@cygnus.com>
-
- Change check_null_empty_path* to check_null_empty_str* throughout.
- * path.h (check_null_empty_str_errno): Convert to a function prototype.
- * path.cc (check_null_empty_str): Move to miscfuncs.cc.
- * miscfuncs.cc (check_null_empty_str_errno): New function.
- (__check_null_invalid_struct): Ditto.
- (__check_null_invalid_struct_errno): Ditto.
- (check_null_empty_str): Change from VirtualQuery to IsBadWritePtr.
- * thread.cc (check_valid_pointer): Ditto.
- * resource.cc (getrlimit): Use check_null_invalid_struct macro for
- checking validity of pointer.
- (setrlimit): Ditto.
-
-Tue Jun 26 16:59:16 2001 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.cc (fhandler_disk_file::fstat): Don't rely on exactly 3
- characters being read for executable test since we could be checking
- for less than that.
- * syscalls.cc (stat_worker): Try opening the file the "correct" way
- first so that #! processing can potentially happen. If that fails,
- then use "query open" method.
-
- * spawn.cc (spawn_guts): Delay processing of signal until after we've
- notified parent about reparenting.
-
-Tue Jun 26 10:47:24 2001 Christopher Faylor <cgf@cygnus.com>
-
- * mmap.cc: Clean up *ResourceLock calls throughout.
-
-Tue Jun 26 22:10:00 2001 Robert Collins rbtcollins@hotmail.com
-
- * thread.cc (pthread_cond::TimedWait): Check for WAIT_TIMEOUT as well
- as WAIT_ABANDONED.
- (__pthread_cond_timedwait): Calculate a relative wait from the abstime
- parameter.
-
-Sun Jun 24 17:38:19 2001 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (interrupt_setup): Move actions from setup_handler to
- here.
- (setup_handler): Move actions after a successful interrupt to
- interrupt_setup.
- * fork.cc (vfork): Augment debugging output.
- * sigproc.cc (proc_subproc): Ditto.
- * spawn.cc (spawn_guts): Ditto. Correctly fill out progname when spawn
- NO_WAIT. Call signal handler when a signal arrives.
- * sigproc.h: Declare a function.
-
-Fri Jun 22 16:50:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h class fhandler_socket): Declare new method
- `set_close_on_exec'.
- * fhandler_socket.cc (fhandler_socket::set_close_on_exec):
- New method.
-
-Fri Jun 22 16:12:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_tape.cc (fhandler_dev_tape::tape_erase): Set size
- parameter to value expected by GetTapeParameters().
-
-Thu Jun 21 22:01:39 2001 Marius Gedminas <mgedmin@delfi.lt>
-
- * fhandler_console.cc (fhandler_console::read): Detect AltGr more
- robustly on WinNT.
-
-2001-06-22 Robert Collins <rbbtcollins@hotmail.com>
-
- * thread.cc (__pthread_cond_timedwait): Lock the waiting mutex before
- the condition protect mutex to avoid deadlocking. (Found by Greg Smith).
- (__pthread_cond_wait): Ditto.
-
-2001-06-30 Egor Duda <deo@logos-m.ru>
-
- * fhandler.cc (fhandler_base::open): Work around windows bug when
- CreateFile() with dwDesiredAccess == 0 called on remote share returns
- valid handle even if file doesn't exist.
-
-2001-06-20 Egor Duda <deo@logos-m.ru>
-
- * fhandler_socket.cc (fhandler_socket::signal_secret_event): New
- function.
- * fhandler.h: Declare it.
- * fhandler_socket.cc (fhandler_socket::create_secret_event): Don't
- signal secret event immediately.
- (fhandler_socket::check_peer_secret_event): Do it after peer event
- was opened.
- * net.cc (cygwin_connect): Or if socket is non-blocking.
- (cygwin_accept): Ditto.
-
-Mon Jun 18 17:09:25 2001 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_tty.cc (fhandler_tty_slave::init): Revert 2001-06-16 change.
-
- * fork.cc (fork_copy): Print more debugging info.
- (fork_parent): Change order of arguments to accomdate buggy gcc.
- (fork): Ditto.
-
-Sun Jun 17 18:54:46 2001 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (_unlink): Reorganize to try harder to delete file with
- DeleteFile and to recover more gracefully if FILE_FLAG_DELETE_ON_CLOSE
- doesn't work properly.
-
-Sat Jun 16 13:06:49 2001 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (sig_handle_tty_stop): Reset PID_STOPPED if not
- actually stopping.
- * fhandler_console.cc (fhandler_console::fixup_after_fork): Don't set
- controlling terminal if just inheriting a handle.
- (fhandler_console::fixup_after_exec): Ditto.
- * fhandler_tty.cc (fhandler_tty_slave::init): Ditto.
- * signal.cc (kill_worker): Set appropriate errno if proc_exists
- determines that process does not really exist.
-
-Fri Jun 15 14:34:19 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (path_conv::check): Deal more robustly with foo/ behavior.
-
-Fri Jun 15 11:15:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_tape.cc (fhandler_dev_tape::tape_status): Set size
- parameter to value expected by GetTapeParameters().
-
-Thu Jun 14 20:19:46 2001 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.cc (fhandler_disk_file::fstat): Properly set executable bits
- for directory when !ntsec && !ntea. Also move common code prior to
- call to get_attributes.
-
-Fri June 15 09:25:00 Robert Collins <rbtcollins@hotmail.com>
-
- * thread.cc (pthread_cond::Signal): Release the condition access
- variable correctly.
-
-2001-06-14 Egor Duda <deo@logos-m.ru>
-
- * fhandler.cc (fhandler_base::open): Set win32 access flags to 0, when
- requested.
- * fhandler.h: New status flag FH_QUERYOPEN.
- (fhandler::get_query_open): New function.
- (fhandler::set_query_open): Ditto.
- * syscalls.cc (stat_worker): Request query-only open mode.
-
-2001-06-12 Egor Duda <deo@logos-m.ru>
-
- * environ.cc (set_file_api_mode): New function. Move setting
- of file APIs mode (OEM/ANSI) here.
- (codepage_init): From here.
- * winsup.h (set_file_api_mode): Declare it.
- * fork.cc (fork_child): Set file APIs mode in forkee.
-
-Mon Jun 11 14:19:49 2001 Christopher Faylor <cgf@cygnus.com>
-
- * pinfo.cc: Use autoloaded ToolHelp functions throughout for Win9x.
- * autoload.cc: Autoload ToolHelp functions.
-
- * sigproc.cc (proc_subproc): Incorporate SIGCHLD == SIG_IGN special
- handling of zombie processes. Ensure that zombie processes which are
- at the end of the zombie array are properly cleaned up.
-
-Mon Jun 11 11:18:56 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (chdir): Fix call to path_conv constructor so that it REALLY
- doesn't check for the null/non-empty path.
-
-Sun Jun 10 23:34:09 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (path_conv::update_fs_info): Don't consider remote drives to
- be NTFS. Set root_dir before invoking GetDriveType (from Kazuhiro
- Fujieda <fujieda@jaist.ac.jp>). Eliminate extra checks for rootdir.
-
-Sun Jun 10 20:19:47 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (chdir): Pre-check path for validity before eating trailing
- space. Then, ensure that path_conv doesn't check the path for validity
- again.
-
-Sun Jun 10 12:56:00 2001 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (sigdelayed): Ensure that signal is cleared as
- the last operation or suffer races.
- * sigproc.cc (proc_subproc): Deal with zombie array overflow.
-
-Sun Jun 10 11:56:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Add fchdir symbols.
- * path.cc (chdir): Guard against invalid parameter.
- (fchdir): New function.
- * include/cygwin/version.h: Bump API minor version to 40.
- * uinfo.cc (internal_getlogin): Remove unused variable.
-
-Sat Jun 9 23:20:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (seteuid): Set environment variables USERNAME and
- USERDOMAIN before impersonation to workaround a LookupAccountSid()
- misbehaviour.
- * uinfo.cc (internal_getlogin): Revert most of the previous change.
- Don't set environment variables USERNAME and USERDOMAIN. That's
- the job of seteuid() now. Try to get logon server from Lsa
- only if logon server isn't already known.
-
-Thu Jun 7 15:54:32 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * thread.cc (pthread_cond::Broadcast): Don't print error messages on
- invalid mutexs - user programs are allowed to call
- pthread_cond_broadcast like that.
- (__pthread_cond_timedwait): Initialise themutex properly.
- (__pthread_cond_wait): Initialise themutex properly.
-
-Tue Jun 5 19:56:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_console.cc (fhandler_console::dup): Allocate space for
- savebuf on Cygwin heap.
- (fhandler_console::char_command): Ditto. Use correct values for size.
-
-2001-06-05 Egor Duda <deo@logos-m.ru>
-
- * security.h (NTWriteEA): Change prototype.
- * ntea.cc (NTReadEA): Don't check for global ntea setting, now
- it's caller responsibility.
- (NTWriteEA): Ditto.
- * security.cc (get_file_attribute): Read attribute from EA only
- if 'ntea' is enabled.
- (set_file_attribute): Ditto.
- * path.h: (class path_conv): Add members to store file system
- information.
- (path_conv::get_drive_type): New function.
- * syscalls.cc (stat_worker): Use it.
- * path.cc (path_conv::update_fs_info): New functions.
- (path_conv::check): Get file system information from device where
- file resides. On NTFS, try to read symlink contents from EA.
- (get_symlink_ea): New function.
- (set_symlink_ea): Ditto.
- (symlink): Store symlink in extended attribute, if possible.
-
-Tue Jun 5 11:18:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_disk_file::fstat): Always reset file position
- to original value after checking for executable magic.
-
-Mon Jun 4 16:21:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.h (cygheap_user::cygheap_user): Initialize token to
- INVALID_HANDLE_VALUE.
- * uinfo.cc (uinfo_init): Close token handle if needed.
-
-Sun Jun 3 20:52:13 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (normalize_posix_path): Revert .. check removed by previous
- changes.
- * cygheap.h: Temporarily declare path_prefix_p here.
-
-Mon Jun 4 0:14:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (wsock_event): Add destructor.
-
-Sun Jun 3 09:49:55 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * dlfcn.cc (dlclose): Do not call FreeLibrary if the symbol to close
- was obtained by dlopen(NULL,...).
-
-Sat Jun 2 23:11:52 2001 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (sleep): Try to be a little more accomodating of signal
- arrival. Ensure that the signal handler is called.
-
-Sat Jun 2 14:07:28 2001 Christopher Faylor <cgf@cygnus.com>
-
- * cygheap.cc (cygheap_root::cygheap_root): Remove constructor.
- (cygheap_root::~cygheap_root): Remove destructor.
- (cygheap_root::operator =): Remove.
- (cygheap_root::set): New method.
- * cygheap.h (cygheap_root): Reflect above changes. Store root info in
- mount-like structure.
- (cygheap_root:posix_ok): New method.
- (cygheap_root::ischroot_native): Ditto.
- (cygheap_root::unchroot): Ditto.
- (cygheap_root::exists): Ditto.
- (cygheap_root::posix_length): Ditto.
- (cygheap_root::posix_path): Ditto.
- (cygheap_root::native_length): Ditto.
- (cygheap_root::native_path): Ditto.
- * dir.cc (opendir): Remove special chroot test.
- * path.cc (path_prefix_p): Remove front end.
- (normalize_posix_path): Reorganize chroot tests to accommodate new
- convention of allowing paths using posix chroot prefix.
- (path_conv::check): Pass a "already ran normalize" option to
- conv_to_win32_path. Return if there is an error from this function.
- (mount_info::conv_to_win32_path): Add extra argument. Don't call
- normalize_posix_path if caller has already done so. Substitute chroot
- setting, if any, for root translation. Add chroot checking to final
- output step.
- * shared_info (mount_info): Accommodate additional argument to
- conv_to_win32_path.
- * syscalls.cc (chroot): Store both normalized posix path and native
- path in chroot.
-
-Fri Jun 1 10:57:19 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (chdir): Really make sure that isspace gets only an unsigned
- char.
-
-Fri Jun 1 13:45:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (_rename): Handle the case that `foo' is renamed to
- `bar' while `bar.lnk' is an existing shortcut-symlink.
-
-Thu May 31 15:57:57 2001 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.cc (fhandler_disk_file::fstat): Avoid clearing S_IFMT bits
- since we've already pre-cleared everything anyway.
-
-Wed May 30 23:51:32 2001 Earnie Boyd <earnie_boyd@yahoo.com>
-
- * path.cc (chdir): Always send unsigned chars to isspace since newlib's
- isspace doesn't deal well with "negative" chars.
-
-Wed May 30 23:51:32 2001 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.cc (fhandler_disk_file::open): Propagate remote status of
- file garnered from path_conv. Move #! checking to fstat.
- (fhandler_disk_file::fstat): Reorganize st_mode setting to eliminate
- duplication. Move check for #! here from fhandler::open.
-
- * fhandler.h (fhandler_base::isremote): New method.
- (fhandler_base::set_isremote): Ditto.
- (fhandler_base::set_execable_p): Also record "don't care if executable
- state".
- (fhandler_base::dont_care_if_execable): New method.
- * path.cc (path_conv::check): Clear new flags. Appropriately set
- vol_flags, drive_type, and is_remote_drive.
- * path.h: Add new flags and methods for manipulating them.
- * syscalls.cc (_unlink): Use isremote() to determine if a path is
- remote rather than calling GetDriveType.
- (stat_worker): Ditto.
- * security.cc (get_file_attribute): Or attribute with result of
- NTReadEA to be consistent with get_nt_attribute.
-
-Tue May 29 19:02:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * sec_helper.cc (cygsid::getfrompw): Change parameter to `const'.
- (cygsid::getfromgr): Ditto.
- * security.cc: Use `sys_mbstowcs' and `sys_wcstombs' throughout.
- (extract_nt_dom_user): Try to get user and domain from SID in
- pw->pw_gecos first.
- * security.h (class cygsid): Change parameter of getfrompw() and
- getfromgr() to `const'.
- * uinfo.cc (internal_getlogin): Change order for evaluating user
- information in winNT case. Drop usage of NetWkstaUserGetInfo().
-
-Mon May 28 21:34:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * shortcut.c (check_shortcut): Treat only Cygwin shortcuts as symlinks.
-
-Fri May 25 11:07:07 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (symlink_info::check): Correctly set 'ext_tacked_on'. Use
- this to determine if user specified 'foo.lnk' explicitly. Reorganize
- slightly to get rid of one goto.
-
-Fri May 25 10:15:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink_info::check): Add a check to return correctly
- if incoming `*.lnk' file is not a symlink.
-
-Thu May 24 15:46:50 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (slash_drive_prefix_p): Remove.
- (mount_info::slash_drive_to_win32_path): Ditto.
- (mount_info::conv_to_win32_path): Remove slash drive prefix check.
- (mount_info::add_item): Ditto.
- (mount_info::del_item): Ditto.
- * shared_info.h (mount_info): Remove slash_drive_to_win32_path
- declaration.
-
-Thu May 24 01:17:33 2001 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (handle_exceptions): Bump repeat count for debugging
- kick out.
-
- * fhandler.h (fhandler_dev_dsp): Add a fixup_after_exec.
- * fhandler_dsp.cc (class Audio): Add TOT_BLOCK_SIZE to enum.
- (operator new): New.
- (bigwavebuffer): Declare using TOT_BLOCK_SIZE to avoid buffer overruns.
- (Audio::Audio): Optimize slightly.
- (fhandler_dev_dsp::open): Allocate s_audio using static buffer.
- (fhandler_dev_dsp::fixup_after_exec): New function. Ditto.
-
-Wed May 23 17:45:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (seteuid): Restrict overriding external provided
- user tokens to ntsec. Don't test external tokens for primary
- group to evaluate if it should be overridden. Restrict creating
- internal tokens to ntsec.
-
-Wed May 23 10:11:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (chown_worker): Don't check for ENOSYS.
-
-Tue May 22 12:20:07 2001 Christopher Faylor <cgf@cygnus.com>
-
- * signal.cc (sleep): Protect with sigframe.
-
-Tue May 22 17:58:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (get_file_attribute): Don't set errno.
-
-Mon May 21 15:08:00 2001 Christopher Faylor <cgf@cygnus.com>
-
- * configure.in: Allow --enable-newvfork to turn NEWVFORK on and off.
- * configure: Regenerate.
-
-Mon May 21 11:46:01 2001 Christopher Faylor <cgf@cygnus.com>
-
- * include/cygwin/version.h: Bump minor version number.
-
-Sun May 20 13:26:25 2001 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_dsp.cc: Reformat to GNU standards.
- (s_audio): Change to a pointer throughout.
- (fhandler_dev_dsp::open): Initialize s_audio, if required.
-
-Sat May 19 23:40:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc: Add load statements for `LookupAccountNameW',
- `LsaClose', `LsaEnumerateAccountRights', `LsaFreeMemory',
- `LsaOpenPolicy', `LsaQueryInformationPolicy', `NetLocalGroupEnum',
- `NetLocalGroupGetMembers', `NetServerEnum', `NetUserGetGroups' and
- `NtCreateToken'.
- * ntdll.h: Add declaration for `NtCreateToken'.
- * sec_helper.cc: Add `well_known_local_sid', `well_known_dialup_sid',
- `well_known_network_sid', `well_known_batch_sid',
- `well_known_interactive_sid', `well_known_service_sid' and
- `well_known_authenticated_users_sid'.
- (cygsid::string): Define as const method.
- (cygsid::get_sid): Set psid to NO_SID on error.
- (cygsid::getfromstr): Ditto.
- (cygsid::getfrompw): Simplify.
- (cygsid::getfromgr): Check for gr == NULL.
- (legal_sid_type): Move to security.h.
- (set_process_privilege): Return -1 on error, otherwise 0 or 1 related
- to previous privilege setting.
- * security.cc (extract_nt_dom_user): Remove `static'.
- (lsa2wchar): New function.
- (open_local_policy): Ditto.
- (close_local_policy): Ditto.
- (get_lsa_srv_inf): Ditto.
- (get_logon_server): Ditto.
- (get_logon_server_and_user_domain): Ditto.
- (get_user_groups): Ditto.
- (is_group_member): Ditto.
- (get_user_local_groups): Ditto.
- (sid_in_token_groups): Ditto.
- (get_user_primary_group): Ditto.
- (get_group_sidlist): Ditto.
- (get_system_priv_list): Ditto.
- (get_priv_list): Ditto.
- (get_dacl): Ditto.
- (create_token): Ditto.
- (subauth): Return immediately if SE_TCB_NAME can't be assigned.
- Change all return statements in case of error to jumps to `out'
- label. Add `out' label to support cleanup.
- * security.h: Add extern declarations for `well_known_local_sid',
- `well_known_dialup_sid', `well_known_network_sid',
- `well_known_batch_sid', `well_known_interactive_sid',
- `well_known_service_sid' and `well_known_authenticated_users_sid'.
- Add extern declarations for functions `create_token',
- `extract_nt_dom_user' and `get_logon_server_and_user_domain'.
- (class cygsid): Add method `assign'. Change operator= to call new
- `assign' method. Add `debug_print' method.
- (class cygsidlist): New class.
- (legal_sid_type): Moved from sec_helper.cc to here.
- * spawn.cc (spawn_guts) Revert reversion of previous patch.
- Call `RevertToSelf' and `ImpersonateLoggedOnUser' instead of `seteuid'
- again.
- * syscalls.cc (seteuid): Rearranged. Call `create_token' now when
- needed. Call `subauth' if `create_token' fails. Try setting token
- owner and primary group only if token was not explicitely created
- by `create_token'.
- * uinfo.cc (internal_getlogin): Try harder to generate correct user
- information. Especially don't trust return value of `GetUserName'.
-
-Sat May 19 21:16:07 2001 Christopher Faylor <cgf@cygnus.com>
-
- * fork.cc (fork_parent): Move atforkprepare call here.
- (fork): From here.
-
-Sat May 19 18:35:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc: Add missing load statement for `CancelIo'.
-
-Sat May 19 01:22:43 2001 Christopher Faylor <cgf@cygnus.com>
-
- * grp.cc (read_etc_group): Don't copy mutex on fork.
- * pwd.cc (read_etc_passwd): Ditto.
- * autoload.cc (LoadDLLfuncEx): Use LoadDLLprime to initialize DLL
- specific area.
-
-Fri May 18 10:31:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (wsock_event::wait): Explicitely cancel IO when a signal
- arrived to avoid data loss. Fallback to blocking IO when canceling
- fails.
-
-Thu May 17 15:29:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (cygwin_set_impersonation_token): Never destroy
- previous token object.
- (subauth): Create token source with well defined identifier.
-
-Wed May 16 23:27:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * uinfo.cc (uinfo_init): Just set user token to INVALID_HANDLE_VALUE.
- Token value is already invalid at that point.
-
-Wed May 16 21:34:00 2001 Fred Yankowski <fred@ontosys.com>
-
- * net.cc (errmap): Add missing mapping from WSAEINTR to EINTR.
-
-Wed May 16 09:20:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * sec_helper.cc (legal_sid_type): Fix conditional. Change to
- inline function.
-
-Wed May 16 01:01:48 2001 Christopher Faylor <cgf@cygnus.com>
-
- * autoload.h: Eliminate.
- * autoload.cc: Pull in autoload.h. Eliminate many macros. Rewrite to
- avoid necessity of initialization routines. Just use a standard one.
- (wsock_init): New function. Moved from net.cc.
- * net.cc (wsock_init): Move to autoload.cc.
- (wsadata): Make global.
- * dtable.cc (dtable::build_fhandler): Use more reliable method for
- checking if net stuff has been loaded.
-
-Tue May 15 19:52:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * fork.cc (fork): Eliminate superfluous call to getuid().
- * security.h: New define `NO_SID'. Remove declarations of functions
- moved to methods into class cygsid.
- (class cygsid): Declare new methods `getfromstr', `get_sid',
- `getfrompw', `getfromgr', `get_rid', `get_uid', `get_gid', `string'
- and new constructors and operators =, == and !=.
- Declare new global cygsids `well_known_XXX_sid' substituting the
- corresponding `get_XXX_sid' functions. Remove declarations of
- these functions.
- * sec_helper.cc (well_known_admin_sid): New global variable.
- (well_known_system_sid): Ditto
- (well_known_creator_owner_sid): Ditto
- (well_known_world_sid): Ditto
- (cygsid::string): New method, substituting `convert_sid_to_string_sid'.
- (cygsid::get_sid): New method, substituting `get_sid'.
- (cygsid::getfromstr): New method, substituting
- `convert_string_sid_to_sid'.
- (cygsid::getfrompw): New method, substituting `get_pw_sid'.
- (cygsid::getfromgr): New method, substituting `get_gr_sid'.
- (cygsid::get_id): New method, substituting `get_id_from_sid'.
- (get_admin_sid): Eliminated.
- (get_system_sid): Ditto.
- (get_creator_owner_sid): Ditto.
- (get_world_sid): Ditto.
- * grp.cc: Use new cygsid methods and well known sids throughout.
- * registry.cc: Ditto.
- * sec_acl.cc: Ditto.
- * security.cc: Ditto.
- * shared.cc: Ditto.
- * syscalls.cc (seteuid): Ditto. Eliminate redundant conditional.
- * uinfo.cc (internal_getlogin): Ditto.
- * spawn.cc (spawn_guts) Revert previous patch.
-
-Tue May 15 10:20:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::ioctl): Convert s_addr
- field to host byte order before comparing with INADDR_LOOPBACK.
-
-Tue May 15 9:03:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc: Add autoload statements for ws2_32 functions
- `WSACloseEvent', `WSACreateEvent', `WSAGetOverlappedResult',
- `WSARecv', `WSARecvFrom', `WSASend', `WSASendTo' and `WSASetEvent',
- `WSAWaitForMultipleEvents'.
- * net.cc: Define wsock_evt.
- (wsock_event): New class.
- (cygwin_sendto): Use overlapped socket io if available.
- (cygwin_recvfrom): Ditto.
- (cygwin_recv): Ditto.
- (cygwin_send): Ditto.
- * security.cc (subauth): Set Win32 error to 0 to safely ask for the
- error code of dynamically loaded function `LsaRegisterLogonProcess'.
-
-Mon May 14 15:37:29 2001 Christopher Faylor <cgf@cygnus.com>
-
- * errno.cc (_sys_errlist): Add missing commas.
-
-Mon May 14 16:13:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (subauth): Check if Secur32.dll could be loaded.
-
-Sun May 13 22:49:04 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (path_conv::check): Revert allow_ntsec check so that volume
- info is always retrieved and isdisk setting is properly set.
-
-Sun May 13 14:02:36 2001 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_tty.cc (fhandler_tty_common::dup): Preserve O_NOCTTY when
- duping a filehandle.
-
-Sat May 12 18:19:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc (rmdir): Rearrange slightly to allow removing directories
- even when R/O attribute is set.
-
-Fri May 11 16:53:38 2001 Christopher Faylor <cgf@cygnus.com>
-
- * external.cc (fillout_pinfo): Use correct pids.
- * path.cc (mount_info::conv_to_win32_path): Correct test for whether to
- include a slash.
-
-Fri May 11 01:04:17 2001 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (handle_exceptions): Don't print message when executing
- from a cygwin program.
-
-2001-05-10 Egor Duda <deo@logos-m.ru>
- Christopher Faylor <cgf@redhat.com>
-
- * environ.cc (winenv): Always add SYSTEMDRIVE and SYSYEMROOT to
- win32-style environment if they don't already exist.
-
-2001-05-10 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * path.cc (mount_info::conv_to_win32_path): Treat UNC paths the same as
- paths including `:' or `\'.
-
-Wed May 9 14:46:32 2001 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h (fhandler_termios::echo_erase): Declare new method.
- * fhandler_termios.cc (fhandler_termios::echo_erase): New method for
- echoing erase characters.
- (fhandler_termios::line_edit): Check the echo flag before echoing
- control characters (from Kazuhiro Fujieda <fujieda@jaist.ac.jp>).
-
-Wed May 9 10:43:30 2001 Christopher Faylor <cgf@cygnus.com>
-
- * include/pthread.h: Remove C++ comment.
-
-Tue May 8 11:09:59 2001 Christopher Faylor <cgf@cygnus.com>
-
- * cygheap.cc (_cfree): Add regparm attribute.
- (_crealloc): Ditto.
-
- * dcrt0.cc (dll_crt0_1): Default to always checking for executable for now.
-
- * dtable.cc (dtable::not_open): Move method.
- * dtable.h (dtable): Here.
-
- * exceptions.cc (ctrl_c_handler): Don't expect process group leader to
- handle a signal if it doesn't exist.
-
- * fhandler.h (fhandler_base): Make openflags protected.
-
- * localtime.c (tzsetwall): Check for __CYGWIN__ as well as __WIN32__.
-
- * path.cc (path_conv::check): Add some comments. Change strcat to assignment.
-
- * lib/_cygwin_S_IEXEC.cc (_cygwin_bob__): Eliminate.
-
- * fhandler_tty.cc (fhandler_console::dup): Set controlling terminal if necessary.
- * fhandler_tty.cc (fhandler_tty_slave::dup): Ditto.
-
-Mon May 7 21:33:17 2001 Christopher Faylor <cgf@cygnus.com>
-
- * include/sys/file.h: Revert special X_OK usage. Just make it a
- constant.
-
-Sun May 6 17:05:00 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * thread.h (pthread_cond): New element cond_access to allow atomic
- broadcasts.
- * thread.cc (pthread_cond::pthread_cond): Initialise cond_access.
- (pthread_cond::~pthread_cond): Destroy cond_access.
- (pthread_cond::Broadcast): Use cond_access.
- (pthread_cond::Signal): Use cond_access.
- (pthread_cond_wait): Use cond_access.
- (pthread_cond_timedwait): Use cond_access.
-
-Sun May 6 11:55:40 2001 Christopher Faylor <cgf@cygnus.com>
-
- * string.h (cygwin_strchr): Make 'static inline' so that things will
- still work when optimized.
-
-Sat May 5 01:04:11 2001 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (handle_exceptions): Vastly increase test for exception
- loop guard variable.
-
-Fri May 4 22:23:33 2001 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (stack_info): Add some controls.
- (stack_info::init): Add extra arguments to control method of
- initialization.. If we have a known good frame, set things up so that
- this frame is not skipped the first time through. Record whether
- caller cares about arguments or not.
- (stack_info::walk): Don't store arguments if they're unwanted.
- (stackdump): Add isexception parameter for use when called by exception
- handler.
- (cygwin_stackdump): Accommodate extra argument to stackdump.
- (handle_exceptions): Ditto.
- (sig_handle): Ditto.
- (interrupt_on_return): Accommodate extra arguments to stack walk
- initialization.
-
-Fri May 4 21:05:20 2001 Christopher Faylor <cgf@cygnus.com>
-
- * localtime.c: Revert exclusion of windows.h.
-
-Fri May 4 17:03:16 2001 Christopher Faylor <cgf@cygnus.com>
-
- * string.h: Fix last-minute typo.
-
-Fri May 4 16:49:34 2001 Christopher Faylor <cgf@cygnus.com>
-
- * pinfo.h: Correctly set __SIGOFFSET.
-
- * path.cc (hash_path_name): Avoid calling library functions for simple
- copying of characters.
-
- * shortcut.c: Use WIN32_LEAN_AND_MEAN.
- * smallprint.c: Ditto.
-
- * environ.cc (getwinenv): Minor clarity fix.
-
- * localtime.c: No need to include windows.h
-
- * string.h: New file.
-
-Fri May 4 16:37:30 2001 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (ctrl_c_handler): Always send signal to process if it
- has no tty.
-
-2001-05-04 Egor Duda <deo@logos-m.ru>
-
- * fhandler_socket.cc (set_connect_secret): Use /dev/urandom to
- generate secret cookie.
-
-Thu May 3 16:37:55 2001 Christopher Faylor <cgf@cygnus.com>
-
- * include/pthread.h (pthread_cleanup_push): Eliminate space preceding
- arguments.
- (pthread_cleanup_pop): Ditto.
-
-Thu May 3 18:16:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (wsock_init): Rename `was_in_progress' to `wsock_started'
- for clearness.
-
-Thu May 3 10:44:16 2001 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (handle_exceptions): Break out of "loop" if the
- debugger doesn't seem to be attaching to our process.
-
-Wed May 2 20:18:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc: Use new definition of LoadDLLinitfunc throughout.
- Redefine wrapper for wsock32.dll and ws2_32.dll.
- (std_dll_init): New function.
- * autoload.h: Rename LoadDLLinitfunc to LoadDLLinitfuncdef.
- Add new defines LoadDLLinitfunc and LoadDLLstdfunc.
- * net.cc (wsock_init): Add guard variable handling. Take care
- to call WSAStartup only once. Load WSAStartup without using
- autoload wrapper to eliminate recursion. Eliminate FIONBIO
- and srandom stuff.
-
-Tue May 1 01:26:15 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (mount_info::conv_to_win32_path): More path tweaking.
-
-Tue May 1 00:34:46 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (mount_info::conv_to_win32_path): Fix debugging output to
- avoid a SIGSEGV. Avoid double backslashes in middle of filename.
-
-Mon Apr 30 21:51:14 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (mkrelpath): New function.
- (mount_info::conv_to_win32_path): Eliminate now-unneeded relative path
- name arg and processing.
- (path_conv::check): Accommodate relative path names again. Accommodate
- one extra argument in mount_info::conv_to_win32_path. Tack trailing
- slash on end of relative path as a side effect, like before.
- * shared_info.h (mount_info::conv_to_win32_path): Reflect new argument
- ordering.
-
-Mon Apr 30 22:09:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc: Add LoadDLLinitfunc for secur32.dll.
- Add LoadDLLfuncEx statements for AllocateLocallyUniqueId@4,
- DuplicateTokenEx@24, LsaNtStatusToWinError@4,
- LsaDeregisterLogonProcess@4, LsaFreeReturnBuffer@4,
- LsaLogonUser@56, LsaLookupAuthenticationPackage@12,
- LsaRegisterLogonProcess@12,
- * environ.cc: Add extern declaration for `subauth_id'.
- (subauth_id_init): New function for setting `subauth_id'.
- (struct parse_thing): Add entry for `subauth_id'.
- * fork.cc (fork_parent): Call `RevertToSelf' and
- `ImpersonateLoggedOnUser' instead of `seteuid'.
- * security.cc: Define global variable `subauth_id'.
- (extract_nt_dom_user): New function.
- (cygwin_logon_user): Call `extract_nt_dom_user' now.
- (str2lsa): New static function.
- (str2buf2lsa): Ditto.
- (str2buf2uni): Ditto.
- (subauth): Ditto.
- * security.h: Add prototype for `subauth'.
- * spawn.cc (spawn_guts): Use cygheap->user.token only if impersonated.
- Use `cygsid' type. Remove impersonation before allowing access to
- workstation/desktop to everyone. Call `RevertToSelf' and
- `ImpersonateLoggedOnUser' instead of `seteuid'.
- * syscalls.cc (seteuid): Rearranged to allow using subauthentication
- to retrieve user tokens when needed.
-
-Mon Apr 30 20:26:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * uinfo.cc (internal_getlogin): Formatting change.
-
-Mon Apr 30 19:58:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * grp.cc: Eliminate MAX_DOMAIN_NAME define.
- (read_etc_group): Substitute MAX_DOMAIN_NAME by
- INTERNET_MAX_HOST_NAME_LENGTH.
- * passwd.cc (parse_pwd): Don't force pw_name to be lower case.
- * sec_helper.cc: Substitute MAX_USER_NAME by UNLEN,
- MAX_COMPUTERNAME_LENGTH by INTERNET_MAX_HOST_NAME_LENGTH throughout.
- (lookup_name): Slight cleanup.
- * security.cc (alloc_sd): Substitute MAX_USER_NAME by UNLEN.
- * security.h: Define DEFAULT_UID as DOMAIN_USER_RID_ADMIN and
- DEFAULT_GID as DOMAIN_ALIAS_RID_ADMINS.
- * shared.cc (memory_init): Substitute MAX_USER_NAME by UNLEN.
- * thread.h: Ditto.
- * uinfo.cc (internal_getlogin): Substitute MAX_USER_NAME by UNLEN.
- Substitute MAX_COMPUTERNAME_LENGTH and MAX_HOST_NAME by
- INTERNET_MAX_HOST_NAME_LENGTH.
- * winsup.h: Include lmcons.h. Eliminate MAX_USER_NAME and
- MAX_HOST_NAME. Move DEFAULT_UID and DEFAULT_GID to security.h.
-
-Mon Apr 30 12:35:40 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (path_conv::check): Don't use path_flags when converting to
- MS-DOS syntax unless parsing tail of path component. Stop parsing path
- when we reach the 'root' of the path. Correctly copy tail to path
- component.
-
-Sun Apr 29 22:28:06 2001 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (INIT_EXCEPTION_HANDLER): Eliminate.
- (init_exceptions): Just use init_exception_handler.
- (open_stackdumpfile): New function.
- (stack_info::first_time): Eliminate.
- (stack_info::init): Set up fields to avoid "first_time" consideration.
- (stack_info::walk): Remove "first_time" consideration.
- (stackdump): Change arguments to accept initial frame pointer and open
- stack file flag.
- (stack): Eliminate.
- (cygwin_stackdump): Use stackdump() rather than stack().
- (try_to_debug): Remove all synchronization logic. Just keep looping in
- exception handler until debugger notices us. Return 1 if successfully
- started debugger.
- (handle_exceptions): Just return if we know that we're debugging.
- Reorganize to avoid creating a stackdump file if we are starting a
- debugger. Return from exception handler if debugger started
- successfully.
- (sig_handle): Create a stackdump only if debugger wasn't started.
- * winsup.h (try_to_debug): Add an argument.
-
-Sun Apr 29 21:41:25 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (symlink_info::check): Remove extra arguments, move
- functionality back to path_conv::check. Clear symlink bit from pflags
- argument before detecting if this is a symlink.
- (path_conv::check): Convert posix path here instead of
- symlink_info::check. Only grab volflags when using ntsec.
- (symlink_info::check_case): Just replace appropriate part of input
- path.
-
-Sat Apr 28 19:36:13 2001 Christopher Faylor <cgf@cygnus.com>
-
- Throughout, change 'tty_attached' to 'real_tty_attached', for clarity.
- Throughout, change 'OutputStopped' to 'output_stopped', for
- consistency.
- * dtable.cc (stdio_init): Set controlling tty if not set by stdio
- opens.
- * exceptions.cc (ctrl_c_handler): Avoid special pgid checking if no tty
- is associated with the process.
- (Suggested by Tim Baker <dbaker@direct.ca>)
- * external.cc (fillout_pinfo): Return actual tty number for ctty.
- * fhandler_console.cc (get_tty_stuff): Set ctty when shared memory is
- allocated. Accept flags input from open().
- (set_console_ctty): New function.
- (fhandler_console::open): Pass flags to get_tty_stuff and rely on this
- function to set the ctty, if appropriate.
- * fhandler_termios.cc (fhandler_termios::set_ctty): Move to tty_min
- class.
- * fhandler_tty.cc (fhandler_tty_slave::open): Use tc field to access
- set_ctty().
- * tty.h (TTY_CONSOLE): Move to include/sys/cygwin.h.
- (tty_min): Add set_ctty class here.
- * include/sys/cygwin.h (TTY_CONSOLE): New home here.
-
- * path.cc (symlink_info): Make contents an actual buffer. Pass more
- flags to case_check.
- (path_conv::check): Reorganize to do parsing based on posix path rather
- than native path.
- (symlink_info::check): Expect posix path as input. Translate to native
- path here. Accept path_conv flags. Stop parsing if not a symlink
- regardless of whether previous path was a symlink.
-
-2001-04-27 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * thread.cc (thread_init_wrapper): Use _REENT_INIT to initialize the
- reent structure of newlib.
-
-Fri Apr 27 14:02:24 2001 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.h (sig_send): Add exception parameter to sig_send.
- * sigproc.cc (sig_send): Ditto. Use it when setting frame info.
- * exceptions.cc (handle_exceptions): Use exception flag when calling
- sig_send.
-
-2001-04-27 Egor Duda <deo@logos-m.ru>
-
- * tty.cc (tty::make_pipes): Set to_slave pipe mode to nonblocking.
- * fhandler_tty.cc (fhandler_pty_master::accept_input): If pipe buffer
- is full, give slave a chance to read data.
-
-2001-04-26 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * security.cc (alloc_sd): Add unrelated ACCESS_ALLOWED_ACE behind
- the `everyone' ACE.
-
-Wed Apr 25 15:07:37 2001 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.h [sigthread]: Add exception field.
- [sigframe::~sigframe]: Clear exception field.
- [sigframe::set]: Set exception field from caller.
- * sigproc.cc (sig_send): Set exception field when frame pointer is
- passed in.
- * exceptions.cc (interrupt_on_return): Always treat exception as
- interruptible.
-
-2001-04-25 Egor Duda <deo@logos-m.ru>
-
- * cygwin.din: Export asctime_r, ctime_r, gmtime_r, localtime_r
- * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 39
-
-Wed Apr 25 10:57:36 2001 Christopher Faylor <cgf@cygnus.com>
-
- * include/cygwin/version.h: Bump minor version number.
- * childinfo.h: Bump child structure magic number.
-
-2001-04-25 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * uinfo.cc (internal_getlogin): Return pointer to struct passwd.
- (uinfo_init): Accommodate the above change.
- * syscalls.cc (seteuid): Ditto.
-
-Tue Apr 25 11:08:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc: Add LoadDLLfunc statements for SetTokenInformation@16.
- * cygheap.cc: Include security.h.
- * grp.cc (internal_getgrent): New function.
- (getgroups): Rearranged using `internal_getgrent' and the new
- `cygsid' class.
- * passwd.cc (internal_getpwent): New function.
- * sec_acl.cc: Use new `cygsid' class throughout.
- (acl_access): Use `internal_getgrent' instead of `getgrent'.
- * sec_helper.cc: Use new `cygsid' class throughout.
- (get_id_from_sid): Use `internal_getgrent' instead of `getgrent'.
- Use `internal_getpwent' instead of `getpwent'.
- * security.cc: Use new `cygsid' class throughout.
- * security.h: Move `MAX_SID_LEN' from winsup.h to here.
- Add extern declarations for `internal_getgrent' and `internal_getpwent'.
- (class cygsid): New class.
- * shared.cc (sec_user): Use new `cygsid' class.
- * syscalls.cc (seteuid): Try to set owner to user and primary group to
- current group in impersonation token before performing impersonation.
- (setegid): Try to set primary group in process token to the new group
- if ntsec is on.
- * uinfo.cc (internal_getlogin): Use new `cygsid' class.
- Try to set owner to user and primary group to current group in process
- token if the process has been started from a non cygwin process.
- (uinfo_init): Set primary group only if the process has been started
- from a non cygwin process.
- * winsup.h: Move define for `MAX_SID_LEN' to security.h.
-
-Mon Apr 16 23:20:00 2001 Andy Younger <andylyounger@hotmail.com>
-
- * fhandler_dsp.cc: Improved handling of 8 bit playback modes.
- Put in mock support for SNDCTL_DSP_SETFRAGMENT.
-
-Tue Apr 24 23:51:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * passwd.cc (getpwnam_r): Add pw_passwd handling as well.
- (getpwuid_r): Ditto.
-
-Tue Apr 24 23:43:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * passwd.cc (getpwnam_r): Use correct offsets into buffer.
- Copy pw_gecos field as well.
- (getpwuid_r): Ditto.
-
-2001-04-24 Egor Duda <deo@logos-m.ru>
-
- * dlmalloc.c: New file. Port of Doug Lea's malloc
- * dlmalloc.h: Ditto.
- * Makefile.in: Add support for MALLOC_DEBUG
- * config.h.in: Ditto.
- * winsup.h: Ditto.
- * configure.in: Add --enable-malloc-debugging option.
- * configure: Regenerate.
- * debug.h: Include declarations for debugging malloc.
- * tty.cc (grantpt): Fix definition.
- (unlockpt): Ditto.
-
-Mon Apr 23 22:00:29 2001 Christopher Faylor <cgf@cygnus.com>
-
- Remove trailing underscore from fhandler_base and friends, throughout.
- * fhandler.h (fhandler_base::set_open_status): New method. Stores
- original open status.
- (fhandler_base::get_open_status): New method. Retrieves original open
- status.
- (fhandler_base::reset_to_open_binmode): New method.
- * fhandler.cc (fhandler_base::open): Save open status.
- (fhandler_base::init): Ditto.
- * fhandler_clipboard.cc (fhandler_clipboard::open): Ditto.
- * fhandler_console.cc (fhandler_console::open): Ditto.
- * fhandler_dsp.cc (fhandler_dsp::open): Ditto.
- * fhandler_dev_mem.cc (fhandler_dev_mem::open): Ditto.
- * fhandler_dev_random.cc (fhandler_dev_random::open): Ditto.
- * fhandler_serial.cc (fhandler_serial::open): Ditto.
- * fhandler_tty_slave.cc (fhandler_tty_slave::open): Ditto.
- * fhandler_tty_master.cc (fhandler_tty_master::open): Ditto.
- * fhandler_dev_zero.cc (fhandler_dev_zero::open): Ditto.
- * syscalls.cc (setmode): Rework so that 0 mode value causes reversion
- to open state.
-
- * fhandler_tty_slave.cc (fhandler_tty_slave::read): Use correct
- multiplier when converting from deciseconds to milliseconds.
-
-Mon Apr 23 13:28:35 2001 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.h (fhandler_base::clear_r_binary): New method.
- (fhandler_base::clear_w_binary): New method.
- * syscalls.cc (setmode): Accept 0 as mode value. Resets text/binary
- behavior for fd to default.
-
-Mon Apr 23 12:46:07 2001 Christopher Faylor <cgf@cygnus.com>
-
- * net.cc [errmap]: Add '0' condition.
- (find_winsock_errno): Don't translate no error to EPERM.
-
-Sun Apr 22 20:48:24 2001 Christopher Faylor <cgf@cygnus.com>
-
- * include/cygwin/version.h: Bump Cygwin version and API version.
-
-Mon Apr 23 9:27:00 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * thread.cc (MTinterface::Init): Always initialise per process variables.
-
-Sun Apr 22 19:18:18 2001 Christopher Faylor <cgf@cygnus.com>
-
- * features.h: Reinstate as wrapper for sys/features.h.
-
-Mon Apr 23 0:10:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (alloc_sd): Reformat comment.
- * shared.cc: Drop function declarations already in security.h.
-
-Sun Apr 22 12:17:57 2001 Christopher Faylor <cgf@cygnus.com>
-
- * shortcut.c (check_shortcut): Close input file handle before
- returning.
- * path.cc (check_sysfile): Ditto.
- (symlink_info::check): Rely on opened file handle being closed by
- symlink checking routines. Set ext_tacked_on when .lnk is detected.
-
-Sat Apr 21 19:26:05 2001 Christopher Faylor <cgf@cygnus.com>
-
- * thread.cc (MTinterface::Init): Remove accidentally checked in code.
-
-Sun Apr 22 00:22:00 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * passwd.cc (getpwuid): Check for thread cancellation.
- (getpwuid_r): Ditto.
- (getpwname): Ditto.
- (getpwnam_r): Ditto.
- * thread.h (pthread_mutex): New constructors for pshared operation.
- (MTinterface): Associative array for pshared mutex's.
- * thread.cc (MTinterface::Init): Initailize pshared mutex array.
- (pthread_cond::BroadCast): Implementation notes.
- (pthread_cond::TimedWait): Remove use of SignalObjectAndWait on non-NT systems.
- (pthread_mutex::pthread_mutex(unsigned short)): New function.
- (pthread_mutex::pthread_mutex (pthread_mutex_t *, pthread_mutexattr *)):New function.
- (pthread_mutex::pthread_mutex(pthread_mutexattr *)): Fail on pshared mutex's.
- (__pthread_mutex_getpshared): New function.
- (__pthread_join): Check for thread cancellation.
- (__pthread_cond_timedwait): Support pshared mutex's.
- (__pthread_cond_wait): Ditto.
- (__pthread_condattr_setpshared): Error on PROCESS_SHARED requests.
- (__pthread_mutex_init): Support pshared mutex's.
- (__pthread_mutex_getprioceiling): Ditto.
- (__pthread_mutex_lock): Ditto.
- (__pthread_mutex_trylock): Ditto.
- (__pthread_mutex_unlock): Ditto.
- (__pthread_mutex_destroy): Ditto.
- (__pthread_mutex_setprioceiling): Ditto.
- (__pthread_mutexattr_setpshared): Support PTHREAD_PROCESS_PSHARED requests.
-
-Fri Apr 20 19:38:29 2001 Christopher Faylor <cgf@cygnus.com>
-
- * cygwin.din: Add *scanf and *scan_r functions.
-
-Fri Apr 20 22:25:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (set_process_privileges): Swap out.
- * sec_helper.cc (set_process_privilege): Rename from
- `set_process_privileges'. Takes the privilege to enable or disable
- as parameter now.
- * security.h: Add prototype for `set_process_privileges'.
-
-2001-04-19 Egor Duda <deo@logos-m.ru>
-
- * path.cc (path_conv::check): Always initialize member variables.
-
-Fri Apr 20 12:27:49 2001 Christopher Faylor <cgf@cygnus.com>
-
- * include/sys/file.h: More cleanup for X_OK.
-
-Fri Apr 20 11:48:45 2001 Christopher Faylor <cgf@cygnus.com>
-
- * include/sys/file.h: Move X_OK protection earlier.
-
- * dtable.cc (dtable::vfork_child_fixup): Avoid closing already closed
- handles.
-
-Fri Apr 20 16:29:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * grp.cc (getgroups): Change so that SIDs get compared instead
- of strings to SIDs.
-
-Fri Apr 20 14:50:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in: Add object files `sec_helper.cc' and `sec_acl.cc'.
- * security.cc: Swap out several functions.
- * sec_acl.cc: New file. Move Sun compatibel ACL functions from
- `security.cc' to here.
- * sec_helper.cc: New file. Move security helper functions from
- `security.cc' to here.
- * security.h: Changed to accommodate the above changes.
-
-Fri Apr 20 14:12:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * grp.cc: Replace `group_in_memory_p' by `group_state'.
- Eliminate group_sem throughout.
- (enum grp_state): New enumeration type.
- (read_etc_group): Make race safe.
- * security.cc: Eliminate group_sem throughout.
-
-Thu Apr 19 9:40:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap): Drop usage of the same memory area if the same
- region of the same file is mapped twice.
-
-Wed Apr 18 16:53:54 2001 Christopher Faylor <cgf@cygnus.com>
-
- Throughout, change fdtab references to cygheap->fdtab.
- * child_info.h (cygheap_exec_info): Eliminate special fdtab stuff.
- * spawn.cc (spawn_guts): Ditto.
- * cygheap.cc (cygheap_init): Initialize fdtab, if appropriate.
- * cygheap.h (CYGHEAPSIZE): Include size of init_cygheap.
- (_cmalloc_entry): Include fdtab here.
- * dtable.h (dtable): Declare/define new methods.
- * dtable.cc (dtable::vfork_child_fixup): New method.
- (dtable::fixup_after_exec): Remove unneeded extra arguments.
- * dcrt0.cc (dll_crt0_1): Ditto.
-
- * environ.cc (getwinenv): Use case sensitive comparison.
- (winenv): Make a copy of environment cache to avoid realloc problems
- when duplicate environment variables exist in the environment. (From
- Egor Duda)
-
- * net.cc (cygwin_socket): Revert Apr 14 change.
-
- * include/sys/file.h: Protect against previous X_OK definition.
-
-Tue Apr 17 12:18:28 2001 Christopher Faylor <cgf@cygnus.com>
-
- * passwd.cc: Eliminate passwd_sem throughout.
- * security.cc: Ditto.
-
-Tue Apr 17 12:18:28 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * cygwin.din: Export New functions.
- * passwd.cc (read_etc_passwd): Make race safe.
- (getpwuid_r): New function.
- (getpwnam_r): New function.
-
-2001-04-18 Egor Duda <deo@logos-m.ru>
-
- * grp.cc (getgroups): Avoid crash if passwd field if /etc/group is
- empty.
-
-Tue Apr 17 19:05:44 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.h (path_conv::add_ext_from_sym): Declare.
- * path.cc (path_conv::add_ext_from_sym): Convert to pure inline method.
-
-Tue Apr 17 18:50:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (windows_device_names): Add missing NULL element.
-
-Tue Apr 17 12:14:54 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (windows_device_names): Move dsp to proper location.
-
-Tue Apr 17 13:44:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (path_conv::check): Set case_clash even if pcheck_case
- is set to PCHECK_ADJUST when a case clash is given for the last
- component in path.
- (symlink_info::case_check): Ditto.
- * syscalls.cc (_rename): Avoid overwriting an already existing file
- if a case clash is given even if pcheck_case is set to PCHECK_ADJUST.
-
-Tue Apr 17 2:07:07 2001 Christopher Faylor <cgf@cygnus.com>
-
- * config.h.in: Turn off VFORK again.
-
-Mon Apr 16 23:45:24 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.h (cwdstuff): Move class.
- * cygheap.h (cwdstuff): To here.
- (init_cygheap): Add cwd field.
- * child_info.h (cygheap_exec_info): Eliminate cwd stuff.
- (child_info_spawn): Ditto.
- * dcrt0.cc (dll_crt0_1): Remove cygcwd.fixup_after_exec call. Convert
- cygcwd reference to cygheap->cwd.
- * path.cc: Ditto, throughout.
- (cwdstuff::copy): Eliminate.
- (cwdstuff::fixup_after_exec): Ditto.
- * spawn.cc (spawn_guts): Eliminate call to cygcwd.copy.
-
- * fhandler.h (FH_OSS_DSP): Move into "fast" device category.
-
-Mon Apr 16 19:19:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc: Move fh_paging_file from some functions to be
- a global static variable.
- (class mmap_record): Add `devtype_' member to remember
- the device type of the file. Add declaration for methods
- `get_device', `alloc_fh' and `free_fh'.
- (mmap_record::mmap_record): Initialize `devtype_' correctly.
- (mmap_record::alloc_fh): New method.
- (mmap_record::free_fh): Ditto.
- (munmap): Use new mmap_record::alloc_fh and mmap_record::free_fh
- methods to create a correct fhandler.
- (msync): Ditto.
- (fixup_mmaps_after_fork): Ditto.
-
-Mon Apr 16 16:01:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * grp.cc (getgroups): If `allow_ntsec' is set, use the process token
- information to evaluate the groups list.
-
-Mon Apr 16 00:08:02 2001 Christopher Faylor <cgf@cygnus.com>
-
- * features.h: Remove this file as it is now being supplied by newlib.
-
-Sun Apr 15 23:23:29 2001 Christopher Faylor <cgf@cygnus.com>
-
- * autoload.cc: Add winmm functions needed by fhandler_dsp.cc.
-
-Sun Apr 15 22:53:52 2001 Andy Younger <andylyounger@hotmail.com>
-
- * fhandler_dsp.cc: New file. Implements OSS like /dev/dsp.
- * include/sys/soundcard.h: New file. User land includes for OSS
- /dev/dsp.
- * fhandler.h: Add new class fhandler_dev_dsp and a FH_OSS_DSP
- definition.
- * dtable.cc (dtable::build_fhandler): Allow creation of the /dev/dsp
- device.
- * path.cc (windows_device_names): Add /dev/dsp into list of device
- names.
- * Makefile.in (DLL_OFILES): Add fhandler_dsp.o.
-
-Sun Apr 15 16:36:27 2001 Christopher Faylor <cgf@cygnus.com>
-
- * uname.c (uname): Default n in in86 to 6 if Windows returns > 6.
-
-Sun Apr 15 15:56:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (add_ext_from_sym): Redefine to call `add_ext_from_sym_'.
- (add_ext_from_sym_): New inline function.
-
-Sat Apr 14 19:23:52 2001 Christopher Faylor <cgf@cygnus.com>
-
- * config.h.in: Turn on VFORK by default.
-
-Sat Apr 14 18:04:35 2001 Christopher Faylor <cgf@cygnus.com>
-
- * net.cc (cygwin_socket): Set SO_LINGER to small value so closed UNIX
- domain sockets will not stay around.
-
-Sat Apr 14 18:01:43 2001 Pierre A. Humblet <Pierre.Humblet@ieee.org>
-
- * select.cc (socket_cleanup): Set SO_LINGER to small value so closed
- dummy sockets do not stay around. Use correct value for second argument
- to shutdown.
-
-Sat Apr 14 17:04:00 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * thread.h (MTinterface): Add threadcount.
- * thread.cc (MTinterface::Init): Set threadcount to 1.
- (__pthread_create): Increment threadcount.
- (__pthread_exit): Decrement threadcount and call exit() from the last thread.
-
-Fri Apr 13 11:34:24 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * fork.cc (fork_child): Call the __pthread_atforkchild function.
- (fork_parent): Call the __pthread_atforkparent function.
- * cygwin.din: Export pthread_atfork.
- * thread.h (callback): New class.
- (MTinterface): Use it.
- * thread.cc (__pthread_atforkprepare): New function.
- (__pthread_atforkparent): New function.
- (__pthread_atforkchild): New function.
- (__pthread_atfork): New function.
- * pthread.cc (pthread_atfork): New function.
-
-Fri Apr 13 9:52:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (add_ext_from_sym): New define evaluating `known'suffix'.
- (path_conv::check): Use add_ext_from_sym throughout.
-
-Thu Apr 12 23:19:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc (mkdir): Check for case clash.
- * environ.cc: Add extern declaration for `pcheck_case'.
- (check_case_init): New function.
- (struct parse_thing): Add "check_case" option.
- * errno.cc (_sys_nerrlist): Add text for ECASECLASH.
- (strerror): Add case branch for ECASECLASH.
- * fhandler.cc (fhandler_disk_file::open): Check for case clash.
- * path.cc: Add global variable `pcheck_case'.
- (struct symlink_info): Add member `case_clash' and method `case_check'.
- (path_prefix_p_): Call `pathnmatch' instead of `strncasematch'.
- (pathnmatch): New funtion.
- (pathmatch): Ditto.
- (path_conv::check): Add handling for case checking.
- (symlink): Check for case clash.
- (symlink_info::check): Add parameter for case checking.
- Handle case checking.
- (symlink_info::case_check): New method.
- (chdir): Don't use unconverted path if pcheck_case==PCHECK_STRICT.
- * path.h: Add extern declarations for `pathmatch' and
- `pathnmatch'.
- (enum case_checking): New enumeration type describing
- the case checking behaviour of path conversion routines.
- (class path_conv): Add member `case_clash'.
- * syscalls.cc (_link): Check for case clash.
-
-Thu Apr 12 12:49:53 2001 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (mkfifo): New function stub.
-
-2001-04-12 Robert Collins <rbtcollins@hotmail.com>
-
- * configure.in: Remove PTH_ALLOW.
- * cygwin.din: Remove @PTH_ALLOW@ prefixes to pthread functions. Add
- new pthread exports.
- * pthread.cc: New wrapper functions for the above new exports.
- * sched.cc (valid_sched_parameters): New function.
- (sched_setparam): Use it.
- (sched_set_thread_priority): New function. Used by pthread_sched*.
- * thread.cc (pthread_key_destructor::InsertAfter): New function.
- (pthread_key_destructor::UnlinkNext): New function.
- (pthread_key_destructor::Next): New function.
- (pthread_key_destructor_list::Insert): New function.
- (pthread_key_destructor_list::Remove): New function.
- (pthread_key_destructor_list::Pop): New function.
- (pthread_key_destructor::pthread_key_destructor): New function.
- (pthread_key_destructor_list::IterateNull): New function.
- (MTinterface::Init): Initialise new member.
- (pthread::pthread): Initialise new members.
- (pthread::create): Copy new attributes. Set the new thread priority.
- (pthread_attr::pthread_attr): Initialise new members.
- (pthread_key::pthread_key): Setup destructor function.
- (pthread_key::~pthread_key): Remove destructor function.
- (pthread_mutexattr::pthread_mutexattr): New function.
- (pthread_mutexattr::~pthread_mutexattr): New function.
- (__pthread_once): New function.
- (__pthread_cleanup): New function.
- (__pthread_cancel): New function.
- (__pthread_setcancelstate): New function.
- (__pthread_setcanceltype): New function.
- (__pthread_testcancel): New function.
- (__pthread_attr_getinheritsched): New function.
- (__pthread_attr_getschedparam): New function.
- (__pthread_attr_getschedpolicy): New function.
- (__pthread_attr_getscope): New function.
- (__pthread_attr_setinheritsched): New function.
- (__pthread_attr_setschedparam): New function.
- (__pthread_attr_setschedpolicy): New function.
- (__pthread_attr_setscope): New function.
- (__pthread_exit): Call any key destructors on thread exit.
- (__pthread_join): Use the embedded attr values.
- (__pthread_detach): Use the embedded attr values.
- (__pthread_getconcurrency): New function.
- (__pthread_getschedparam): New function.
- (__pthread_key_create): Pass the destructor on object creation.
- (__pthread_key_delete): Correct incorrect prototype.
- (__pthread_setconcurrency): New function.
- (__pthread_setschedparam): New function.
- (__pthread_cond_timedwait): Support static mutex initialisers.
- (__pthread_cond_wait): Ditto.
- (__pthread_mutex_getprioceiling): New function.
- (__pthread_mutex_lock): Support static mutex initialisers.
- (__pthread_mutex_trylock): Ditto.
- (__pthread_mutex_unlock): Ditto.
- (__pthread_mutex_destroy): Ditto.
- (__pthread_mutex_setprioceiling): New function.
- (__pthread_mutexattr_getprotocol): New function.
- (__pthread_mutexattr_getpshared): New function.
- (__pthread_mutexattr_gettype): New function.
- (__pthread_mutexattr_init): New function.
- (__pthread_mutexattr_destroy): New function.
- (__pthread_mutexattr_setprotocol): New function.
- (__pthread_mutexattr_setprioceiling): New function.
- (__pthread_mutexattr_getprioceiling): New function.
- (__pthread_mutexattr_setpshared): New function.
- (__pthread_mutexattr_settype): New function. Remove stubs for non
- MT_SAFE compilation.
- * thread.h: Remove duplicate #defines. Add prototypes for new
- functions in thread.cc.
- (pthread_key_destructor): New class.
- (pthread_key_destructor_list): New class.
- (pthread_attr): Add new members.
- (pthread): Remove members that are duplicated in the pthread_attr
- class.
- (pthread_mutex_attr): Add new members.
- (pthread_once): New class.
- * include/pthread.h: Add prototypes for new functions exported from
- cygwin1.dll. Remove typedefs.
- * include/sched.h: Add prototypes for new functions in sched.cc.
- * include/cygwin/types.h: Add typedefs from pthread.h
-
-Tue Apr 10 22:02:53 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (struct symlink_info): Add extn and ext_tacked_on fields.
- (path_conv::check): Only tack on extension if a known one didn't
- already exist.
- (suffix_scan::has): Return pointer to known extension.
- (symlink_info::check): Record location of extension, if any.
-
-2001-04-09 Egor Duda <deo@logos-m.ru>
-
- * fhandler.h (class fhandler_socket): Add members and methods to
- support secure connections on AF_UNIX sockets.
- * fhandler_socket.cc (fhandler_socket::set_connect_secret): New method.
- (fhandler_socket::get_connect_secret): Ditto.
- (fhandler_socket::create_secret_event): Ditto.
- (fhandler_socket::close_secret_event): Ditto.
- (fhandler_socket::check_peer_secret_event): Ditto.
- (fhandler_socket::fixup_after_fork): Duplicate secret event to child.
- (fhandler_socket::dup): Copy address family.
- (fhandler_socket::close): Close secret event.
- * net.cc (get_inet_addr): Read secret cookie.
- (cygwin_connect): Check if peer knows secret cookie value.
- (cygwin_accept): Ditto. Copy address family to newly created socket.
- (cygwin_bind): Generate and write secret cookie.
- (wsock_init): Initialize random number generator.
-
-Sun Apr 8 20:40:58 2001 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Put -lgcc last in list of libraries, since stdc++
- library needs it.
- * cygwin.din: Remove obsolete "__empty" export.
- * exceptions.cc (call_signal_handler_now): Force inclusion of function
- even when -finline-functions is specified.
- * sigproc.h: Remove obsolete call_signal_handler declaration.
-
-Sun Apr 8 20:36:55 2001 Benjamin Riefenstahl <Benjamin.Riefenstahl@epost.de>
-
- * fhandler_console.cc (cp_get_internal): New function.
- (cp_convert): New function.
- (con_to_str): New function.
- (str_to_con): New function.
- (fhandler_console::read): Replace OemToCharBuff with con_to_str.
- (fhandler_console::write_normal): Replace CharToOemBuff with str_to_con.
-
-Thu Apr 5 22:41:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (stat_worker): Fix conditional which still allowed
- successful stat'ing of non-existant files.
-
-Wed Apr 4 10:37:44 2001 Christopher Faylor <cgf@cygnus.com>
-
- * child_info.h: Bump magic number for fork/exec/spawn.
-
-Tue Apr 3 20:06:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * errno.cc (errmap): Map ERROR_FILE_INVALID to ENXIO.
-
-Mon Apr 2 22:48:58 2001 Christopher Faylor <cgf@cygnus.com>
-
- * cygrun.c (main): Fix compiler warning.
- * gmon.c (_mcleanup): Ditto.
- * profil.c (profile_off): Ditto.
-
- * net.cc (find_winsock_errno): New function.
- (__set_winsock_errno): Use find_winsock_errno.
- (cygwin_setsockopt): Detect SO_ERROR for debugging.
- (cygwin_getsockopt): Ditto. Translate error when getsockopt returns
- SO_ERROR.
- * winsup.h: regparmize __set_winsock_errno.
- * include/sys/strace.h: Document that strace functions can't use
- regparm.
-
-2001-04-02 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * fhandler.cc (fhandler_disk_file::open): Avoid checking a magic
- number of a directory.
-
-Mon Apr 2 00:24:08 2001 Christopher Faylor <cgf@cygnus.com>
-
- * shared_info.h (mount_info): Remove mnt_ elements.
- * thread.h (struct _winsup_t): Add mnt_ elements.
- * path.cc (fillout_mntent): Use mnt_ elements from reent_winsup ().
-
-Sun Apr 1 20:10:34 2001 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (sigframe::call_signal_handler): Return value of
- call_signal_handler_now.
- * sigproc.h (sigframe): Use constructor.
- * syscalls.cc (_read): Correct errno test prior to calling signal
- handler.
-
-Sun Apr 1 00:38:06 2001 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (sigframe::call_signal_handler): Move outside of "C"
- block or some compilers will complain.
-
-Sun Apr 1 00:24:14 2001 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (call_signal_handler_now): Rename from
- call_signal_handler to avoid C++ confusion.
-
-Sun Apr 1 00:08:15 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (fillout_mntent): Always remove drive root directories from
- future consideration by "/cygdrive" reporting.
- (cygdrive_getmnt): Avoid reporting removable drives or drives with no
- media mounted.
-
-Sat Mar 31 21:56:19 2001 Christopher Faylor <cgf@cygnus.com>
-
- * thread.h (struct _winsup_t): Remove obsolete elements. Add
- available_drives element.
- * path.cc (mount_info::getmntent): Report "/cygdrive" drives when
- mounted drives are exhausted.
- (fillout_mntent): New function.
- (mount_item::getmntent): Use fillout_mntent.
- (cygdrives_mntent): New function. Returns next available "/cygdrive".
- (setmntent): Initialize available "/cygdrives".
- * syscalls.cc: Remove some if 0'ed code.
- * times.cc (timezone): Use more descriptive variable name.
-
-Sat Mar 31 18:59:52 2001 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.h (class sigframe): Implement 'unregister()' method.
- (sigframe::~sigframe): Use unregister method.
- (sigframe::call_signal_handler): Declare new method.
- * exceptions.cc (sigframe::call_signal_handler): New method.
- Unregisters current sigframe before calling signal handler.
- (setup_handler): Clear waiting threads prior to arming signal_arrived.
- * syscalls.cc (_read): Change goto to loop. Recalculate sigframe
- inside of loop so that constructor is called when appropriate.
- * wait.cc (wait4): Ditto.
-
- * signal.cc: Change "sig" to "signal" in debugging messages throughout.
- * sigproc.cc: Ditto.
-
-Sat Mar 31 17:12:08 2001 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_serial.cc (fhandler_serial::raw_write): Close protected
- handles with ForceCloseHandle or suffer spurious warnings.
-
-Sat Mar 31 16:23:32 2001 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler.cc (fhandler_base::read): Remove special handling of CTRL-Z.
-
-Sat Mar 31 11:09:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_console): Add members `insert_mode'.
- * fhandler_console.cc (fhandler_console::dup): Duplicate `insert_mode'.
- (fhandler_console::fhandler_console): Initialize `insert_mode'.
- (fhandler_console::char_command): Add terminal capabilities
- "enter insert mode" = \E[4h and "exit insert mode" = \E[4l.
- Care for insert mode on terminal capability "repeat char" = \E[x;yb.
- (fhandler_console::write_normal): Care for insert mode before writing
- to the console.
- (array keytable): Add keymapping for modified cursor and control
- block keys (xterm like).
-
-Fri Mar 30 13:02:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_console): Add members `savebufsiz' and
- `savebuf' to allow save/restore of screen.
- * fhandler_console.cc (fhandler_console::dup): Duplicate `savebufsiz'
- and `savebuf'.
- (fhandler_console::fhandler_console): Initialize `savebufsiz' and
- `savebuf'.
- (fhandler_console::char_command): Add terminal capabilities
- "save screen content" = \E[?47h and "restore screen content" = \E[?47l.
-
-Wed Mar 28 19:28:50 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (chdir): Eat trailing whitespace on input path.
-
-Tue Mar 27 22:38:42 2001 Christopher Faylor <cgf@cygnus.com>
-
- * lib/_cygwin_S_IEXEC.c: Remove "const" from globals or they never seem
- to be defined. Wrap definitions in extern "C". Include winsup.h to
- assure proper definitions.
-
- * dcrt0.cc (dll_crt0_1): Call stdio_init after premain run so that
- binmode.o, etc., will control default stdio settings.
- * dtable.cc (dtable::init_std_file_from_handle): Allow __fmode to force
- binmode/textmode settings. Default pipes to binmode.
-
-Tue Mar 27 11:31:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap): Fix conditional for previous patch.
-
-Mon Mar 26 18:48:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap): Outflank copy-on-write problem on 9x by
- setting access mode to FILE_MAP_READ when read access is requested.
-
-Sun Mar 25 20:12:21 2001 Christopher Faylor <cgf@cygnus.com>
-
- * dlfcn.cc (check_access): Eliminate.
- (check_path_access): Use passed in path_conv buf.
- (get_full_path_of_dll): Use passed in name buf to avoid a static. Rip
- out most of the path checking since LoadLibrary will do all of this
- automatically.
- (dlopen): Set errno when appropriate (may not be compliant?).
- * environ.cc (posify): Don't pass in "native" path if it seems to
- actually be posix.
-
-Thursday Mar 22 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * fhandler.h (fhandler_dev_clipboard): Extend to support writing.
- * fhandler_clipboard.cc (fhandler_dev_clipboard::fhandler_dev_clipboard):
- Initialize new fields. Open clipboard here.
- (fhandler_dev_clipboard::dup): New method.
- (fhandler_dev_clipboard::open): Accommodate new fields. Register
- clipboard here, if appropriate.
- (set_clipboard): New function. Moves buffer to clipboard.
- (fhandler_dev_clipboard::write): Truly implement clipboard writing.
- (fhandler_dev_clipboard::read): Reimplement to allow successive reads.
- (fhandler_dev_clipboard::lseek): Truly implement seeks in clipboard.
- (fhandler_dev_clipboard::close): Clear out new fields. Support
- sequential reads and sequential writes. Support for binary data via a
- native clipboard format.
-
-2001-03-22 Egor Duda <deo@logos-m.ru>
-
- * fhandler_console.cc (fhandler_console::set_default_attr): Update
- console color attributes on tty reset.
-
-Wed Mar 21 22:12:36 2001 Christopher Faylor <cgf@cygnus.com>
-
- * autoload.cc (kernel32_init): New function for kernel32 autoload
- initialization.
- (SignalObjectAndWait): Add conditional load of this function when it is
- available.
-
-2001-03-21 Robert Collins <rbtcollins@hotmail.com>
-
- * sched.cc: New file. Implement sched*.
- * include/sched.h: New file. User land includes for sched*.
- * Makefile.in: Add sched.o
- * cygwin.din: Add exports for sched*.
-
-Tue Mar 20 14:48:46 2001 Christopher Faylor <cgf@cygnus.com>
-
- * dtable.cc: Guard against new winsock.h/winsock2.h warnings when
- mixing winsock*.h and sys/types.h.
- * fhandler_socket.cc: Ditto.
- * net.cc: Ditto.
- * select.cc: Ditto.
- * exceptions.cc: Remove unneeded define.
-
-Mon Mar 19 17:43:29 2001 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (interruptible): Update debugging output.
- (setup_handler): Ensure that wait_sig loop wakes up when we punt on
- sending a signal.
- * poll.cc (poll): Add signal guard here.
-
-2001-03-19 Egor Duda <deo@logos-m.ru>
-
- * tty.h (tty::create_inuse): Add new parameter to allow non-
- inheritable 'inuse' events.
- * tty.cc (tty::create_inuse): Use new parameter.
- * fhandler_tty.cc (fhandler_tty_master::init): Ditto.
- * fhandler_tty.cc (fhandler_pty_master::open): Ditto.
- * fhandler_tty.cc (fhandler_tty_master::init): Create master_alive
- event.
- * tty.cc (tty_list::terminate): Close master_alive event.
- * fhandler_tty.cc (fhandler_tty_common::close): Send EOF to slaves
- when master side is closed.
-
-Mon Mar 19 14:32:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (map::get_list_by_fd): Avoid calling `get_namehash' when
- file descriptor is -1.
-
-Sat Mar 17 18:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (check_posix_perm): New static function.
- (fpathconf): Add _PC_POSIX_PERMISSIONS and _PC_POSIX_SECURITY
- support.
- (pathconf): Ditto.
- * include/cygwin/version.h: Bump API minor number to 37.
-
-2001-03-18 Egor Duda <deo@logos-m.ru>
-
- * fhandler.h (fhandler_tty_slave): Declare new methods.
- * select.cc (fhandler_tty_slave::select_read): New method.
- * select.cc (fhandler_tty_slave::ready_for_read): Ditto.
- * select.cc (verify_tty_slave): New function.
- * fhandler_termios.cc (fhandler_termios::line_edit): Empty input
- buffer on signal.
- * fhandler_tty.cc (fhandler_tty_slave::read): Check for input data
- after reading from pipe. Reset event if input pipe is empty.
- * tty.h (class tty): Allow creating events with manual reset.
- * tty.cc (tty::get_event): Use manual_reset flag.
- * tty.cc (tty::common_init): Create input_available_event with
- manual reset.
-
-Sat Mar 17 21:48:03 2001 Christopher Faylor <cgf@cygnus.com>
-
- * external.cc (fillout_pinfo): Match windows pid, as well as cygwin pid
- when passed in pid. Don't prematurely break when searching for a pid.
-
- * thread.h (_winsup_t): Eliminate unneeded field.
-
-Sat Mar 17 20:46:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (get_95_ifconf): Use strcasematch instead of strcasecmp.
- * syscalls.cc (_unlink): Ditto.
- (_rename): Ditto.
-
-Sat Mar 17 12:43:15 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (suffix_scan::next): Avoid searching for foo.lnk twice when
- input is "foo".
-
-Sat Mar 17 18:10:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_socket): Set protocol to 0 when address family is
- AF_UNIX to avoid WSAEPROTONOSUPPORT error.
-
-Sat Mar 17 09:51:32 2001 Mathew Brozowski <brozow@tavve.com>
-
- * net.cc (cygwin_socket): Pass protocol parameter to socket call.
-
-Sat Mar 17 02:05:38 2001 Christopher Faylor <cgf@cygnus.com>
-
- * dir.cc (readdir): Use strcasematch for consistency.
- * path.cc (symlink_info): Eliminate known_suffix.
- (path_conv::check): Always copy ext_here to end of buffer, if found.
- (suffix_scan): Eliminate ext_here, add suffixes_start.
- (suffix_scan::has): Eliminate an argument. Reorganize. Always return
- pointer to end of input path.
- (suffix_scan::next): Take a second pass through the suffix list looking
- for .lnk.
- (symlink_info::check): Eliminate known_suffix usage.
-
-Sat Mar 17 00:10:52 2001 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (stat_dev): Give devices full read/write by default.
-
-Saturday Mar 17 3:45 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * thread.cc (MTinterface::CreateCond): Check for null attr pointer.
-
-Fri Mar 16 21:13:23 2001 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_termios.cc (fhandler_termios::line_edit): Don't accept input
- when a signal is sent or we'll end up in an EOF/signal race.
-
-Fri Mar 16 20:25:40 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc: Translate scan states from defines to enums.
- (suffix_scan): Rename state to nextstate for clarity.
- (lnk_match): Change to allow multiple states to indicate that a .lnk
- has been matched.
- (suffix_scan::has): Eliminate a goto. Handle .lnk as a special case,
- since a .lnk may also need to be tacked on the end of a .lnk.
- (suffix_scan::next): Don't increment next state. Set it specifically.
- Recognize new .lnk states.
-
-Saturday Mar 17 01:19 2001 Robert Collins rbtcollins@hotmail.com
-
- * cygwin.din: Export the new functions.
- * pthread.cc (pthread_cond_*): Add wrapper functions that call
- __pthread_cond* functions.
- * thread.cc (__pthread_cond_*): Implement the pthread_cond* functions.
- * thread.h: Add new class entries and prototypes for __pthread_cond*
- functions.
- * include/pthread.h: user land header prototypes for pthread_cond*
- functions and related defines.
-
-Wed Mar 14 16:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * environ.cc (parse_options): Use strtok_r instead of strtok.
- * security.cc (convert_string_sid_to_sid): Ditto.
- (aclfromtext): Ditto. Fix buffer usage.
-
-Wed Mar 14 10:11:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (lnk_suffixes): Remove.
- (class suffix_scan): Add `lnk_state' flag.
- (suffix_scan::lnk_match): Return state of `lnk_state' now.
- (suffix_scan::has): Changed behaviour if file has `.lnk' suffix.
- (suffix_scan::next): Set `lnk_state' where appropriate.
- (symlink_info::check): Fix a wrong `break'.
- * syscalls.cc (chown_worker): Change debug statement to reflect
- lchown fix.
- (lchown): Call chown_worker with `PC_SYM_NOFOLLOW' instead of
- `PC_SYM_IGNORE'.
-
-Tue Mar 13 13:52:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_disk_file::fstat): Add correct modes to
- symlinks when stat'ing on FAT or FAT32 file systems.
-
-2001-03-12 Egor Duda <deo@logos-m.ru>
-
- * fhandler.h (fhandler_termios::fixup_after_exec): New function.
- * fhandler_termios.cc (fhandler_termios::fixup_after_fork): New
- function. Fixup output handle.
- * fhandler_tty.cc (fhandler_tty_common::fixup_after_fork): Output
- handle is now fixed up in fhandler_termios::fixup_after_fork().
-
-2001-03-12 Egor Duda <deo@logos-m.ru>
-
- * fhandler.h (fhandler_termios::fhandler_termios): Enable fixup
- after fork.
- * fhandler_console.cc (fhandler_console::fhandler_console): Fixup
- after fork is now enabled in the base class constructor.
-
-Mon Mar 12 11:19:41 2001 Christopher Faylor <cgf@cygnus.com>
-
- * mkvers.sh: Include config.h so that DEBUGGING is correctly defined.
-
-Mon Mar 12 09:47:55 2001 Christopher Faylor <cgf@cygnus.com>
-
- * spawn.cc (spawn_guts): Don't set EXIT_REPARENTING if parent process
- is not a cygwin process (suggested by Jason Gouger
- <cygwin@jason-gouger.com>).
-
-Sun Mar 11 16:00:58 2001 Christopher Faylor <cgf@cygnus.com>
-
- * child_info.h: Bump magic number for fork/exec/spawn.
-
-Sat Mar 10 20:54:47 2001 Christopher Faylor <cgf@cygnus.com>
-
- * autoload.cc (noload): Use proper method for multiline strings or
- newer gcc's complain.
- * exceptions.cc (unused_sig_wrapper): Ditto.
- * fhandler.h (fhandler_base): Make get_io_handle and friends return
- self.
- * fhandler_tty.cc (fhandler_pty_common::close_on_exec): Accommodate
- DEBUGGING flag to avoid spurious warnings when inheritance is set.
-
-Sat Mar 10 16:52:12 2001 Christopher Faylor <cgf@cygnus.com>
-
- * shortcut.c (PATH_ALL_EXEC): Add parentheses to avoid a compiler
- warning.
-
- * exceptions.cc (setup_handler): Clarify debugging message.
- * sigproc.cc (proc_subproc): Remove PROC_CHILDSTOPPED test. It is
- handled by normal PROC_CLEARWAIT case.
- (wait_sig): Eliminate "dispatched" tracking. Remove __SIGCHILDSTOPPED
- test. Decrement counter again before jumping out of
- InterlockedDecrement loop so that subsequent InterlockedIncrement will
- keep the counter at the correctly decremented value and also detect
- when there are pending signals.
- * sigproc.h: Remove __SIGCHILDSTOPPED element.
- (procstuff): Remove PROC_CHILDSTOPPED element.
-
-Sat Mar 10 15:22:44 2001 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (_rename): Set errno to ENOENT when an old path doesn't
- exist (from Kazuhiro Fujieda <fujieda@jaist.ac.jp>). Also set EACCES
- when directory is not writable.
-
-Wed Mar 7 15:49:47 2001 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (_read): Change definition to return ssize_t to be
- consistent with read.
- (_write): Change definition to return ssize_t to be consistent with
- write.
-
-Wed Mar 7 01:08:21 2001 Christopher Faylor <cgf@cygnus.com>
-
- * sigproc.h (sigthread): Declare new methods. Create new winapi_lock
- field.
- (sigframe:;set): Call get_winapi_lock after frame is set so that signal
- handler thread knows not to call SuspendThread.
- (sigframe::~sigframe): Release winapi_lock.
- * exceptions.cc (sigthread::get_winapi_lock): New method.
- (sigthread::release_winapi_lock): New method.
- (setup_handler): Use get_winapi_lock to ensure that signalled thread is
- not blocked in a Windows API.
-
- * path.h (path_types): Avoid broken GCC warning.
-
-Tue Mar 6 14:02:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (suffix_scan::has): Change order of conditionals
- to allow checking for .lnk suffixes even if in_suffixes is empty.
-
-Tue Mar 6 13:02:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.c (cygwin_premain0): Add missing parameter.
- * binmode.c (cygwin_premain0): Ditto.
- * textmode.c (cygwin_premain0): Ditto.
-
-Tue Mar 6 12:04:00 2001 Jason Tiller <jtiller@sjm.com>
-
- * auto_load.cc: Add "GetKeyboardLayout" entry in the list of
- Win32 User32.DLL exports to provide.
- * fhandler.h (class fhandler_console): Add meta_mask private
- member to remember which keystroke modifiers should generate
- META.
- * fhandler_console.cc (fhandler_console::read): Modify code that
- tests a keystroke for a META-escaped key to use the 'meta_mask'
- variable.
- (fhandler_console::fhandler_console): Add definition for
- variable "meta_mask" used to determine if a keystroke should be
- preceded by META in the client console stream. Set meta_mask
- based on whether or not user's keyboard language is English -
- non-English keyboards pass AltGr (right <ALT>) unmolested,
- whereas English keyboards now interpret left- and right-<ALT>
- as META.
-
-Mon Mar 5 20:15:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * include/a.out.h: Add copyright hint.
- * include/fcntl.h: Ditto.
- * include/lastlog.h: Ditto.
- * include/memory.h: Ditto.
- * include/mntent.h: Ditto.
- * include/paths.h: Ditto.
- * include/poll.h: Ditto.
- * include/syslog.h: Ditto.
- * include/termio.h: Ditto.
- * include/tzfile.h: Ditto.
- * include/arpa/inet.h: Ditto.
- * include/asm/byteorder.h: Ditto.
- * include/asm/socket.h: Ditto.
- * include/asm/types.h: Ditto.
- * include/cygwin/if.h: Ditto.
- * include/cygwin/mtio.h: Ditto.
- * include/cygwin/rdevio.h: Ditto.
- * include/cygwin/socket.h: Ditto.
- * include/net/if.h: Ditto.
- * include/netinet/in.h: Ditto.
- * include/netinet/in_systm.h: Ditto.
- * include/netinet/ip.h: Ditto.
- * include/netinet/ip_icmp.h: Ditto.
- * include/netinet/tcp.h: Ditto.
- * include/sys/cdefs.h: Ditto.
- * include/sys/cygwin.h: Ditto.
- * include/sys/ioctl.h: Ditto.
- * include/sys/mman.h: Ditto.
- * include/sys/mount.h: Ditto.
- * include/sys/mtio.h: Ditto.
- * include/sys/procfs.h: Ditto.
- * include/sys/resource.h: Ditto.
- * include/sys/smallprint.h: Ditto.
- * include/sys/socket.h: Ditto.
- * include/sys/strace.h: Ditto.
- * include/sys/syslog.h: Ditto.
- * include/sys/sysmacros.h: Ditto.
- * include/sys/termio.h: Ditto.
- * include/sys/termios.h: Ditto.
- * include/sys/uio.h: Ditto.
- * include/sys/un.h: Ditto.
- * include/sys/utsname.h: Ditto.
- * include/sys/vfs.h: Ditto.
- * include/sys/wait.h: Ditto.
- * regexp/regerror.c: Ditto.
- * regexp/regexp.h: Ditto.
- * regexp/regmagic.h: Ditto.
-
-Mon Mar 5 01:25:03 2001 Christopher Faylor <cgf@cygnus.com>
-
- * dlopen.c (dlopen): Return NULL when name is NULL (suggested by
- chrisiasci@aol.com).
-
- * cygwin.din: Add a new, internally used export -
- _check_for_executable.
- * dcrt0.cc (dll_crt0_1): Set _check_for_executable for older binaries.
- Pass user_data to premain functions.
- * fhandler.cc (fhandler_disk_file::open): Only check for executable if
- the linked program is interested in the executable bit.
- (fhandler_disk_file::check_execable_p): Delete.
- * fhandler.h (executable_states): New enumeration of various states of
- executable bit caring.
- (fhandler_base::set_execable_p): New method.
-
- * fhandler_termios.cc (fhandler_termios::line_edit): Flag when a signal
- has been sent to the tty. Return -1 when this is so.
- * fhandler_console.cc (fhandler_console::read): Return -1 when signal
- sending character encountered.
-
- * path.cc (path_conv::check): Record when path refers to a disk device.
- Move executable extension check here.
- (check_sysfile): Accommodate new EXEC path states.
- (has_suffix): Remove.
- (next_suffix): Remove.
- (class suffix_scan): New clas.
- (suffix_scan::has): New method.
- (suffix_scan:next): New method.
- (symlink_info::check): Use suffix_scan method to control for scanning
- for suffixes.
- * path.h (path_conv::exec_state): New method.
- * perprocess.h: Make "C" friendly.
- * include/cygwin/version.h: Define CYGWIN_VERSION_CHECK_FOR_S_IEXEC.
- Bump CYGWIN_VERSION_API_MINOR.
- * include/sys/cygwin.h: Change premain declarations.
-
- * winsup.h: Move __cplusplus test to after builtin defines.
-
-2001-03-04 Egor Duda <deo@logos-m.ru>
-
- * fhandler.h (class fhandler_tty_common): New mutex and event to
- syncronize input on master tty with slave tty.
- * fhandler_tty.cc (fhandler_pty_master::accept_input): Use them to
- syncronize with slave.
- * fhandler_tty.cc (fhandler_tty_slave::read): Use input mutex and
- event to syncronize with master. Do not limit amount of data read
- from master to vmin value. Interrupt on signal and return already
- read data, if any.
- * fhandler_tty.cc (fhandler_tty_slave::open): Handle input mutex and
- event.
- * fhandler_tty.cc (fhandler_tty_common::close): Ditto.
- * fhandler_tty.cc (fhandler_tty_common::set_close_on_exec): Ditto.
- * fhandler_tty.cc (fhandler_tty_common::fixup_after_fork): Ditto.
- * fhandler_tty.cc (fhandler_tty_common::dup): Ditto.
- * tty.h (tty::open_input_mutex): New function.
- * tty.cc (tty::common_init): Create input mutex and event.
-
-Fri Mar 2 13:32:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc (readdir): Fix creating path in symlink check.
-
-Fri Mar 2 12:33:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc (readdir): Fix shortcut==symlink condition.
- * environ.cc: Add extern decl for `allow_winsymlinks'.
- (struct parse_thing): Add entry for `[no]winsymlinks'.
- * path.cc (symlink): Change to be able to create both,
- symlink==shortcut and symlink==systemfile, dependent of
- the setting of `allow_winsymlinks'.
- * security.cc (cygwin_logon_user): Add debug output.
- * shortcut.c: Add defines from path.h.
- (has_exec_chars): Copy from path.h.
- (check_shortcut): Check for executable file condition if not a
- shortcut.
-
-Thu Mar 1 21:06:07 2001 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (sig_handle_tty_stop): Ignore attempts to suspend a
- process if started by non-cygwin parent.
-
-Thu Mar 1 20:48:11 2001 Christopher Faylor <cgf@cygnus.com>
-
- * select.cc (peek_console): Don't report read_ready on mouse events
- unless we are looking for mouse events.
- * fhandler.h (fhandler_console::mouse_aware): New method.
-
-Wed Feb 28 15:10:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * uinfo.cc: Eliminate `#include <wchar.h>'.
-
-2001-02-28 Egor Duda <deo@logos-m.ru>
-
- * fhandler_floppy.cc (fhandler_dev_floppy::lseek): Determine
- drive geometry or partition size to allow seeking from the end of
- raw floppy device. Don't allow positioning past the end of media or
- to offsets bigger then max off_t.
-
-2001-02-27 Egor Duda <deo@logos-m.ru>
-
- * fhandler.h (class fhandler_console): Make all variables that
- describe "state" of console to be members of fhandler_console.
- default_color is now the color which is set when console recieves
- reset command.
- * fhandler_console.cc (fhandler_console::fhandler_console): Turn
- mouse handling and raw keyboard mode off by default. Initialize
- state information.
- * fhandler.cc (fhandler_console::set_raw_win32_keyboard_mode): New
- function.
- * fhandler_console.cc (fhandler_console::set_default_attr): New
- function. Reset console attributes to default values.
- * fhandler_console.cc (fhandler_console::open): Reset attributes.
- * fhandler_console.cc (fhandler_console::get_win32_attr): New function.
- Calculate win32-style console attribute based on terminal attributes.
- * fhandler_console.cc (fhandler_console::set_cursor_maybe): Use
- member variable.
- * fhandler_console.cc (fhandler_console::read): If in raw-win32
- keyboard mode, encode win32 keyboard events in \033{x;y;z;t;u;wK
- sequences.
- * fhandler_console.cc (fhandler_console::dup): Copy all state
- information to the dup()ed handle.
- * fhandler_console.cc (fhandler_console::scroll_screen): Use current
- fill-in attribute.
- * fhandler_console.cc (fhandler_console::clear_screen): Ditto.
- * fhandler_console.cc (fhandler_console::char_command): Check if we
- saw '?' symbol by member variable. Set terminal attributes on \033[Xm
- commands. \033[24m - turn off underline mode, \033[27m - turn off
- reverse mode, \033[39m - restore default foreground color.
- \033[49m - restore default background color. \033[2000h - turn on raw
- keyboard mode, \033[2000l - turn off raw keyboard mode.
- * fhandler_console.cc (fhandler_console::write): Set attribues to
- default values on reset command.
-
-2001-02-26 Mike Simons <msimons@moria.simons-clan.com>
-
- * times.cc (settimeofday): Replace function stub with working code.
-
-Mon Feb 26 10:42:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * strace.cc (strace::vprntf): Move prntf functionality to this function
- adding an va_list interface to strace.
- (strace::printf): Calls strace::vprntf now.
- (strace_printf): New function providing an extern "C" interface to
- trace output.
- * include/sys/strace.h: Make plain C clean.
- (class strace): Add `vprntf' method.
-
-Mon Feb 26 0:10:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * shortcut.c: Remove #include <sys/strace.h>.
-
-Sun Feb 25 10:32:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink): Add a ".lnk" suffix regardless. Add a comment.
-
-Sun Feb 25 10:18:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * shortcut.c (check_shortcut): Change symlink condition.
-
-Fri Feb 23 10:42:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (fhandler_disk_file::mmap): Use `addr' correctly.
- * fhandler_mem.cc (fhandler_dev_mem::mmap): Ditto.
-
-Thu Feb 22 17:09:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink): Keep relative paths relative in the DOS
- path inside of a shortcut. If that's impossible or the target
- path is already absolute save an absolute path.
-
-Thu Feb 22 15:33:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * cygerrno.h: Revert previous patch.
- * errno.cc: Ditto.
- * dir.cc: Eliminate `dir_suffixes'.
- (opendir): Remove usage of `dir_suffixes'.
- (rmdir): Ditto.
- * fhandler.cc (fhandler_disk_file::open): Remove usage of
- `inner_suffixes'.
- * path.cc: Rename `inner_suffixes' to `lnk_suffixes'.
- (path_conv::check): Remove usage of `inner_suffixes'.
- (symlink): Ditto.
- (symlink_info::check): Handle checking for `.lnk' in path_conv
- exclusively here.
- (chdir): Remove usage of `dir_suffixes'.
- * shortcut.c: Eliminate debug_printf lines.
- (check_shortcut): Don't set error except on failing ReadFile.
- * spawn.cc: Remove ".lnk" from `std_suffixes'.
- * syscalls.cc (_unlink): Remove usage of `inner_suffixes'.
- Remove ".lnk" from `stat_suffixes'.
- (_rename): Add check for renaming a symlink to keep the ".lnk"
- suffix after renaming.
-
-Thu Feb 22 13:38:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * shortcut.c: New file. Provides a C interface to reading of
- Windows shortcuts to avoid compiler flag `-fvtable-thunks'.
- * shortcut.h: Ditto.
- * Makefile.in: Add shortcut.o to DLL_OFILES.
- * cygerrno.h: Provide a C interface to `geterrno_from_win_error' for
- using in shortcut.c.
- * errno.cc (geterrno_from_win_error): Define as extern "C".
- * path.cc (struct symlink_info): Remove methods `check_shortcut' and
- `check_sysfile'.
- (shortcut_header): Move to shortcut.c.
- (shortcut_initalized): Ditto.
- (create_shortcut_header): Ditto.
- (cmp_shortcut_header): Ditto.
- (symlink_info::check_shortcut): Ditto. Reorganize as a plain C function.
- (symlink_info::check_sysfile): Redefine as a global function using the
- same parameter list as `check_shortcut' for clearness.
- (symlink_info::check): Change parameter list for calls to
- `check_shortcut' and `check_sysfile'.
-
-Thu Feb 22 12:04:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_disk_file::open): Use `inner_suffixes' when
- resolving real_path.
- * path.cc (symlink): Ditto for win32_topath.
-
-Wed Feb 21 22:41:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in: Add `-lshell32 -luuid' to link pass for new-cygwin1.dll.
- * autoload.cc: Add LoadDLLinitfunc for ole32.dll.
- Add LoadDLLfuncEx statements for CoInitialize@4, CoUninitialize@0
- and CoCreateInstance@20.
- * dir.cc (dir_suffixes): New datastructure.
- (readdir): Check for R/O *.lnk files to hide the suffix.
- (opendir): Use `dir_suffixes' in path conversion.
- (rmdir): Ditto.
- * fhandler.cc (fhandler_disk_file::fstat): Add S_IFLNK flag
- before calling `get_file_attribute'. Take FILE_ATTRIBUTE_READONLY
- into account only if the file is no symlink.
- * path.cc (inner_suffixes): New datastructure.
- (SYMLINKATTR): Eliminated.
- (path_conv::check): Use `inner_suffixes' on inner path components.
- (shortcut_header): New global static variable.
- (shortcut_initalized): Ditto.
- (create_shortcut_header): New function.
- (cmp_shortcut_header): Ditto.
- (symlink): Create symlinks by creating windows shortcuts. Preserve
- the old code.
- (symlink_info::check_shortcut): New method.
- (symlink_info::check_sysfile): Ditto.
- (symlink_info::check): Check for shortcuts. Move code reading
- old system attribute symlinks into symlink_info::check_sysfile().
- (chdir): Use `dir_suffixes' in path conversion.
- * security.cc (get_file_attribute): Check for S_IFLNK flag.
- Force 0777 permissions then.
- * spawn.cc (std_suffixes): Add ".lnk" suffix.
- * syscalls.cc (_unlink): Use `inner_suffixes' in path conversion.
- Check for shortcut symlinks to eliminate R/O attribute before
- calling DeleteFile().
- (stat_suffixes): Add ".lnk" suffix.
- (stat_worker): Force 0777 permissions if file is a symlink.
-
-2001-02-21 Egor Duda <deo@logos-m.ru>
-
- * sigproc.cc (getsem): Make semaphore always non-inheritable.
-
-Mon Feb 19 22:25:53 2001 Christopher Faylor <cgf@cygnus.com>
-
- * dcrt0.cc (locale_init): Remove.
-
-2001-02-15 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * cygwin.din: Export rand48 functions.
- * thread.cc (MTinterface::Init): Remove the initialization of
- `reent_data'.
- * dcrt0.cc: Add the initalizer to the declaration of `reent_data'.
- * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 35.
-
-2001-02-16 Egor Duda <deo@logos-m.ru>
-
- * signal.cc (signal): Prohibit setting handlers for SIGKILL and
- SIGSTOP
- * signal.cc (sigaction): Ditto
- * syscalls.cc (_lseek): Return EINVAL on invalid input
-
-Wed Feb 14 14:54:40 2001 Christophe Iasci <chrisiasci@aol.com>
-
- * dlfcn.cc (dlopen): Do not call LoadLibrary with a NULL pointer, when
- the library is not found
-
-2001-02-14 Egor Duda <deo@logos-m.ru>
-
- * fhandler_console.cc (fhandler_console::char_command): Ignore unknown
- rendition codes in \033[xx;yym control sequences
-
-Fri Feb 9 23:19:01 2001 Christopher Faylor <cgf@cygnus.com>
-
- * fork.cc (fork_parent): Return EAGAIN when can't record pid.
- * pinfo.h (pinfo::remember): Return value of call to proc_subproc.
- * sigproc.cc (proc_subproc): Return error if can't record pid.
-
-Fri Feb 9 12:17:27 2001 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (mknod): Add valid parameters.
-
-Thu Feb 8 22:09:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap): Check for reusing a mapping only on MAP_SHARED
- and on MAP_PRIVATE|MAP_ANON in the special case of offset 0.
-
-Thu Feb 8 21:57:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (class list): Add member `hash'.
- (list::list): Initialize `hash'.
- (list::get_list_by_fd): Use filepath hash value to get the correct
- mapping list if it's not an anonymous mapping.
- (map::add_list): Initialize `hash' with filepath hash value.
- (mmap): Check for reusing a mapping only on MAP_SHARED.
-
-Wed Feb 7 18:47:36 2001 Christopher Faylor <cgf@cygnus.com>
-
- * signal.cc (killpg): Correct first argument.
-
-Wed Feb 7 22:22:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc: Add LoadDLLinitfunc for iphlpapi.dll.
- Add LoadDLLfuncEx statements for GetIfTable@12 and GetIpAddrTable@12.
- * fhandler_socket.cc (fhandler_socket::ioctl): Move variable
- definitions to the beginning of the function to allow better debugging.
- Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU.
- * net.cc: Include iphlpapi.h.
- (get_2k_ifconf): Rewritten. Uses IP Helper API now.
- (get_nt_ifconf): Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC
- and SIOCGIFMTU.
- (get_95_ifconf): Ditto. Renamed from `get_9x_ifconf'.
- (get_ifconf): Name loopback `lo' instead of `lo0' as in Linux.
- Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU.
- Call `get_95_ifconf' only on Windows 95, `get_nt_ifconf' only
- on Windows NT < Service Pack 3, `get_2k_ifconf otherwise.
- * include/asm/socket.h: Add defines for SIOCGIFHWADDR, SIOCGIFMETRIC
- and SIOCGIFMTU.
- * include/cygwin/if.h: Add `ifr_hwaddr', `ifr_metric' and `ifr_mtu'.
- (struct ifreq): Add `ifru_hwaddr'.
-
-Tue Feb 6 15:04:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (stat_worker): Add a check for the special case when
- a process creates a file using mode 000 using ntsec.
-
-Mon Feb 5 17:00:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Always add GENERIC_READ access
- when opening raw disk devices.
- * fhandler_floppy.cc (fhandler_dev_floppy::lseek): Implement bytewise
- access.
- * fhandler_raw.cc (fhandler_dev_raw::open): Always open raw disk device
- binary.
- (fhandler_dev_raw::raw_write): Don't drop read buffer content when
- writing after read.
-
-Mon Feb 5 13:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap_record::fixup_map): New method to duplicate
- the memory protection in a just forked child.
- (mmap): Realign gran_len to page boundary only on anonymous
- mapping before saving in the mmap_record.
- (munmap): Cleanup code.
- (msync): Ditto.
- (fixup_mmaps_after_fork): Ditto. Call mmap_record::fixup_map now.
-
-Thu Feb 1 23:08:29 2001 Christopher Faylor <cgf@cygnus.com>
-
- * cygheap.cc (creturn): Correctly calculate cygheap_max.
-
-Wed Jan 31 10:04:58 2001 Christopher Faylor <cgf@cygnus.com>
-
- * shared.cc (shared_info::initialize): Reduce size of heap.
-
-Wed Jan 31 13:22:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * include/sys/resource.h: Fix typo.
-
-Wed Jan 31 13:20:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * include/sys/resource.h: Add RLIMIT_NLIMITS and RLIM_NLIMITS.
-
-Tue Jan 30 18:15:23 2001 Christopher Faylor <cgf@cygnus.com>
-
- * include/cygwin/version.h: Bump version to 1.3.0.
-
-Tue Jan 30 8:55:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * pinfo.cc (pinfo::init): Use INVALID_HANDLE_VALUE instead of
- explicit cast (HANDLE) 0xffffffff.
- * shared.cc (open_shared): Ditto.
-
-Mon Jan 29 17:15:22 2001 Bill Hegardt <bill@troyxcd.com>
-
- * fhandler_serial.cc (raw_write): Use local copy of OVERLAPPED
- structure instead of shared structure to fix a race condition between
- read/write.
-
-Mon Jan 29 14:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap): Remove obsolete check for MAP_SHARED|MAP_ANON as
- being invalid.
-
-Mon Jan 29 10:23:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap_record::find_empty): Fix loop condition.
-
-Sun Jan 28 19:40:40 2001 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (_link): Make sure that newpath does not exist. Set
- errno if it does.
-
-Sun Jan 28 19:29:08 2001 Christopher Faylor <cgf@cygnus.com>
-
- * cygheap.cc (init_cheap): Don't specify a load address for the heap.
- It doesn't work on #!*& Windows 9x.
- (cygheap_init): Move GetUserName to memory_init.
- * dcrt0.cc (dll_crt0_1): Call new memory_init functin, eliminate call
- to heap_init.
- * heap.cc (heap_init): Improve error output.
- * heap.h: Correct some declarations.
- * shared.cc (mount_table_init): Remove.
- (memory_init): Renamed from shared_init. Reorganize to accommodate
- strange Windows 9x problems with cygheap/heap interaction.
- * shared_info.h: Rename shared_init to memory_init.
-
-Sun Jan 28 01:25:33 2001 Christopher Faylor <cgf@cygnus.com>
-
- * include/cygwin/version.h: Bump API version.
-
-Sun Jan 28 01:18:22 2001 Christopher Faylor <cgf@cygnus.com>
-
- * cygheap.cc (init_cheap): Move username initialization.
- (cygheap_init): Here.
- * shared_info.h (mount_info): Add a sys_mount_table_counter field.
- (shared_info): Ditto.
- * path.cc (mount_info::conv_to_win32_path): Check that our mount table
- is in sync with the system mount table and reinitialize it if not.
- (mount_info::add_reg_mount): Bump sys_mount_table counters if the
- system mount table changes.
- (mount_info::del_reg_mount): Ditto.
- (mount_info::write_cygdrive_info_to_registry): Ditto.
- (mount_info::remove_cygdrive_info_from_registry): Ditto.
-
-Sun Jan 28 00:28:30 2001 Christopher Faylor <cgf@cygnus.com>
-
- Throughout, change 'cygwin_shared.mount' to 'mount_table'.
- * child_info.h (child_info): Move shared_h, console_h to cygheap. Add
- mount_h.
- * cygheap.h (init_cygheap): Add shared_h, console_h.
- * cygheap.cc (init_cheap): Initialize heap at a fixed location after
- the shared memory regions. Initialize cygheap->user name here.
- * dcrt0.cc (dll_crt0_1): Call getpagesize () to initialize constants.
- Remove cygheap_init since it is done in shared_init now.
- (_dll_crt0): Initialize mount_h, remove shared_h and console_h
- initialization.
- * fhandler_console.cc (console_shared_h): Eliminate.
- (get_tty_stuff): Use cygheap->console_h rather than console_shared_h.
- * heap.cc (heap_init): Use page size constant calculated earlier in
- initialization.
- * shared.cc: Eliminate cygwin_shared_h. Add cygwin_mount_h.
- (mount_table_init): New function for initializing a user mount table.
- (open_shared_file_map): Use constant for shared memory region.
- Initialize cygheap and mount table here.
- (open_shared): Improve debugging output.
- (shared_info::initialize): Eliminate call to mount.init.
- (shared_terminate): Use cygheap->shared_h. Close cygwin_mount_h.
- (open_shared_file_map): Eliminate.
- * shared_info.h (mount_info): Add a version field.
- (shared_align_past): New macro for calculating location for shared
- memory regions.
- * sigproc.cc (init_child_info): Eliminate shared_h, console_h.
- * spawn.cc (spawn_guts): Pass on cygwin_mount_h iff not a different
- user.
- * syscalls.cc (system_info): New global holding system memory defaults.
- (getpagesize): Use system_info.
- * uinfo.cc (internal_getlogin): Only fill in user name if nonexistent.
- * winsup.h: Declare system_info.
-
- * passwd.cc (read_etc_passwd): Use cygheap->user.name () rather than
- retrieving the name again.
-
-Sat Jan 27 10:18:02 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.cc (path_conv::check): Detect when path has symlinks.
- (symlink_info::check): Remove debugging stuff.
- (chdir): Use posix'ized win32 path if cd'ed to a path using symlinks.
-
-Fri Jan 26 21:20:28 2001 Christopher Faylor <cgf@cygnus.com>
-
- * exceptions.cc (sigreturn): Call any pending signals prior to
- resetting the signal mask so that stacked signals behave correctly.
- (sigdelayed): Avoid a race where a signal could end up calling an
- incorrect signal handler if two signals come in close together.
-
-Tue Jan 23 21:56:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (fhandler_disk_file::mmap): Call CreateFileMapping with
- len != 0 only when performing an anonymous mapping.
-
-Mon Jan 22 15:35:28 2001 Christopher Faylor <cgf@cygnus.com>
-
- * path.h: Add a new constant.
- * syscalls.cc (_read): Oscillate errno check.
-
-Mon Jan 22 15:27:12 2001 Christopher Faylor <cgf@cygnus.com>
-
- * include/cygwin/version.h: Bump API to reflect setlogmask.
-
-Sun Jan 21 22:40:25 2001 Jason Tishler <jt@dothill.com>
-
- * cygwin.din: Add export for setlogmask().
- * syslog.cc (setlogmask): New function.
-
-Thu Jan 18 10:27:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * resource.cc (setrlimit): Support RLIMIT_NOFILE.
-
-Wed Jan 17 23:23:12 2001 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (setdtablesize): Call with amount to increment not total
- amount. Return success or failure error code.
-
-Wed Jan 17 09:47:13 2001 Christopher Faylor <cgf@cygnus.com>
-
- * autoload.cc (LoadDLLinitfunc): Remove debugging statement.
-
- * exceptions.cc (sig_handle_tty_stop): Move setting of PID_STOPPED to
- earlier in interrupt.
- (interrupt_setup): i.e., here.
- (sig_handle): Don't queue multiple SIGSTOPS.
- * fhandler.h (bg_check_types): Enumerate return value of bg_check for
- clarity.
- * signal.cc (kill_pgrp): Minor cleanup.
- * fhandler_termios.cc (fhandler_termios::bg_check): Use enumerated type
- for function return. Don't raise signal if a signal is already queued.
- * fhandler_console.cc (fhandler_console::read): Use enumerated return
- type for bg_check.
- * select.cc: Ditto, throughout.
- * read.cc: Ditto, throughout.
- * termios.cc: Ditto, throughout.
- (_read): YA interrupt detect simplification.
- * wait.cc (wait4): Ditto.
-
-Wed Jan 17 10:56:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.cc (cygheap_user::~cygheap_user): Temporarily
- disable free'ing memory.
-
-Tue Jan 16 18:01:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap): Initialize fh to avoid compiler warnings.
-
-Mon Jan 15 21:07:00 2001 Christopher Faylor <cgf@cygnus.com>
-
- * wait.cc (wait4): Rename variable for consistency. Allow restartable
- signal behavior.
-
-Mon Jan 15 23:15:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap): Add more parameter checking. Change error output
- in case of EINVAL. Treat mmapping /dev/zero like MAP_ANONYMOUS.
-
-Mon Jan 15 20:34:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc: include <unistd.h>. Define some bit operations for
- the new page map.
- (mmap_record): Change type of base_address_ to caddr_t.
- Add map_map_ member. Add several methods to manipulate map_map_.
- (mmap_record::alloc_map): New method.
- (mmap_record::free_map): Ditto.
- (mmap_record::find_empty): Ditto.
- (mmap_record::map_map): Ditto.
- (mmap_record::unmap_map): Ditto.
- (list::add_record): Change return type to `mmap_record *'.
- Allocate page map.
- (list::match): New method.
- (mmap): Partly rewritten to take care for the new page map. Add some
- parameter checking.
- (munmap): Ditto.
-
-Mon Jan 15 13:50:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * heap.cc (heap_init): Fix extern declaration of getpagesize.
- * syscalls.cc (getpagesize): Fix another typo.
-
-Mon Jan 15 12:48:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (getpagesize): Save pagesize in global variable to
- avoid calling GetSystemInfo too often.
- * heap.cc (getpagesize): Eliminate.
- (heap_init): Use getpagesize function from syscalls.cc.
-
-Mon Jan 15 11:56:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * sysconf.cc (sysconf): return `getpagesize ()' on _SC_PAGESIZE
- request to avoid implementing the same twice.
-
-Sun Jan 14 14:07:50 2001 Christopher Faylor <cgf@cygnus.com>
-
- * syscalls.cc (_read): Use more lightweight method for determining if
- read has been interrupted by a signal.
-
-Fri Jan 12 00:35:15 2001 Christopher Faylor <cgf@cygnus.com>
-
- * debug.h: Add regparm attributes to some functions.
-
- * signal.cc (sigaction): Don't treat SIGCONT specially.
-
- * exceptions.cc (interrupt_setup): Save sa_flags of interrupted signal
- for later use.
- (sig_handler): Default any stopping signal to SIGSTOP.
- (call_signal_handler): New function.
- (sigdelayed0): New function.
- * sigproc.cc (sigproc_init): Initialize SIGSTOP sigaction for special
- behavior.
- * sigproc.h: Define call_signal_handler.
- * syscalls.cc (_read): Allow restartable signal behavior.
-
-Thu Jan 11 13:17:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_base): New method `fixup_mmap_after_fork'.
- (fhandler_disk_file: Ditto.
- (fhandler_dev_mem): Ditto.
- * fhandler_mem.cc (fhandler_dev_mem::open): Set OBJ_INHERIT attribute
- for device\physicalmemory handle.
- (fhandler_dev_mem::mmap): Ditto.
- * fhandler_mem.cc (fhandler_dev_mem::fixup_mmap_after_fork): New
- method.
- * mmap.cc (mmap_record): Add private `fdesc_' member. Change
- constructor accordingly.
- (get_fd): New method.
- (mmap): Use new mmap_record constructor.
- (fhandler_base::fixup_mmap_after_fork): New method.
- (fhandler_disk_file::fixup_mmap_after_fork): Ditto.
- (fixup_mmaps_after_fork): Call `fixup_mmap_after_fork' of appropriate
- fhandler class.
-
-Wed Jan 10 22:08:30 2001 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * sigproc.cc (wait_sig): Allow SIGCONT when stopped.
-
-Tue Jan 9 16:55:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- Patch suggested by René Møller Fonseca <fonseca@mip.sdu.dk>
- * include/sys/socket.h: Change prototype to have 2nd parameter `const'.
- * net.cc (cygwin_bind): Change 2nd parameter to `const'.
-
-Sun Jan 7 22:59:37 2001 Christopher Faylor <cgf@cygnus.com>
-
- * pinfo.cc (codepage_init): Move function.
- * environ.cc (codepage_init): To here.
- * exceptoins.cc (SIG_NONMASKABLE): Remove SIGCONT from consideration
- since it is supposed to be maskable.
- * signal.cc (sigaction): Ditto.
- * sigproc.cc (wait_sig): Ditto.
- * winsup.h: Eliminate global declaration of codepage_init.
-
-Thu Jan 5 9:33:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * resource.cc (getrlimit): Set errno on EFAULT instead of returning
- it.
- (setrlimit): Ditto.
-
-Thu Jan 5 3:38:00 2001 David Sainty <David.Sainty@optimation.co.nz>
-
- * resource.cc (setrlimit): Prevent failing with an error when the
- operation would not have changed anything.
-
-Thu Jan 4 10:29:54 2001 Earnie Boyd <earnie_boyd@yahoo.com>
-
- * thread.cc: Need LONG_MAX definition.
-
-Wed Jan 3 13:47:23 2001 Christopher Faylor <cgf@cygnus.com>
-
- * thread.cc (MTinterface::CreateSemaphore): Correctly set semaphore
- max.
-
-Wed Jan 3 09:44:51 2001 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler_console.cc (fhandler_console::read): Restore missing test
- for code page before doing OemToCharBuff.
-
-Wed Jan 3 09:20:20 2001 Jason Tishler <jt@dothill.com>
-
- * include/cygwin/version.h: Fix typo in CYGWIN_VERSION_DLL_COMBINED
- macro.
diff --git a/winsup/cygwin/ChangeLog-2002 b/winsup/cygwin/ChangeLog-2002
deleted file mode 100644
index 68cf380..0000000
--- a/winsup/cygwin/ChangeLog-2002
+++ /dev/null
@@ -1,6655 +0,0 @@
-2002-12-30 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (events_init): Display name of mutex on failure.
-
-2002-12-30 Christopher Faylor <cgf@redhat.com>
-
- * windows.cc (setitimer): Return ENOSYS on invalid argument.
-
-2002-12-28 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_termios.cc (fhandler_termios::line_edit): Perform echo
- before input is accepted or suffer a "race".
-
-2002-12-27 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.h (fhandler_tty_master::set_winsize): Declare new function.
- * fhandler_console.cc (fhandler_console::send_winch_maybe): If
- appropriate, call tty master function to handle screen size change.
- * fhandler_tty.cc (fhandler_tty_master::set_winsize): New function.
- (fhandler_tty_master::init): Call set_winsize to set initial screen
- size.
-
-2002-12-26 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_tty.cc (fhandler_tty_master::init): Set initial size of tty
- to that of console in which tty is operating.
- (process_input): Semi-revert previous change. Need to just use current
- terminfo settings since this function is running in a thread, blocked
- when the terminfo changes.
-
-2002-12-26 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.h (fhandler_termios::line_edit): Replace third argument with
- passed-in termios struct.
- * fhandler_console.cc (fhandler_console::read): Prior to loop, make a
- copy of current termios for passing to line_edit prior so that all
- characters are processed consistently.
- * fhandler_tty.cc (fhandler_pty_master::write): Ditto.
- (process_input): Make a copy of curent termios prior to read for use in
- subsequent line_edit.
- * fhandler_termios.cc (fhandler_termios::line_edit): Replace third
- parameter with passed-in termios struct and use it throughout rather
- than the data from the current fhandler_termios class.
-
-2002-12-25 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number.
-
-2002-12-25 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (events_init): Initialize critical section to control
- exiting via signal.
- (signal_exit): Enter critical section early to avoid exit races with
- main thread.
- * dcrt0.cc (do_exit): Use exit_lock critical section to avoid races.
-
-2002-12-25 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (cygthread::detach): Set errno with set_sig_errno so
- that EINTR is properly restored after signal.
-
-2002-12-21 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Default fhandler objects to -fomit-frame-pointer.
- Eliminate redundant CFLAGS settings.
-
-2002-12-20 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.h (line_edit_status): Reorganize so that tests for error
- condition can be < or >.
- * fhandler_tty.cc (fhandler_pty_master::write): Don't return after
- sending a signal.
-
- * fhandler_termios.cc (fhandler_termios::line_edit): Trivial change to
- use built-in bool types.
-
-2002-12-19 Pierre Humblet <pierre.humblet@ieee.org>
-
- * localtime.cc (tzsetwall): Set lcl_is_set and lcl_TZname
- in the Cygwin specific part of the routine.
-
-2002-12-19 Pierre Humblet <pierre.humblet@ieee.org>
-
- * fhandler.cc (fhandler_base::open): Use "flags" rather than "mode"
- in Win9X directory code.
-
-2002-12-19 Steve Osborn <bub@io.com>
-
- * fhandler.h (line_edit_status): Add a new element.
- * fhandler_termios.cc (fhandler_termios::line_edit): After
- accept_input, handle both potential error condition and pipe full
- conditions.
- * fhandler_tty.cc (fhandler_pty_master::accept_input): Return -1 on
- error.
- (fhandler_pty_master::write): Handle pipe full condition.
-
-2002-12-16 Steve Osborn <bub@io.com>
- Christopher Faylor <cgf@redhat.com>
-
- * fhandler_termios.cc (fhandler_termios::line_edit): Return
- line_edit_error and remove last char from readahead buffer if
- accept_input() fails.
- * fhandler_tty.cc (fhandler_pty_master::accept_input): Return 0 and
- restore readahead buffer when tty slave pipe is full.
-
-2002-12-16 Christopher Faylor <cgf@redhat.com>
-
- * pinfo.cc (_pinfo::cmdline): Allocate sufficient space for myself
- command line args.
-
-2002-12-14 Steve Osborn <bub@io.com>
-
- * fhandler_termios.cc (fhandler_termios::line_edit): Call
- accept_input() in character processing loop. Set return value
- independently of input_done.
-
-2002-12-14 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.cc (fhandler_base::read): Signal event, if necessary, and
- raw_read hasn't done so.
-
-2002-12-14 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.cc (fhandler_base::raw_read): Reset priorities to minimize
- window where thread termination may cause data loss.
- (fhandler_base::read): Always return at end of function. Just set len
- to copied_chars when len is zero. Return immediately after raw_read if
- len <= 0. Remove in_len setting and just check end instead. Fix CRLF
- handling at end of buffer.
-
-2002-12-14 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc (dll_crt0_1): Call well known SID initializer function.
- * security.h (cygsid::init): Declare new static method.
- * sec_helper.cc (cygsid::init): New method for initializing well
- known SIDs.
-
-2002-12-14 Pierre Humblet <pierre.humblet@ieee.org>
-
- * security.h: Declare well_known_creator_group_sid.
- * sec_helper.cc: Define and initialize well_known_creator_group_sid.
-
-2002-12-14 Corinna Vinschen <corinna@vinschen.de>
-
- * netdb.cc: Remove strtok_r comment.
-
-2002-12-14 Pierre Humblet <pierre.humblet@ieee.org>
-
- * security.cc (get_user_local_groups): Use LookupAccountSid to find the
- local equivalent of BUILTIN.
-
-2002-12-14 Christopher Faylor <cgf@redhat.com>
-
- * pipe.cc (make_pipe): Set fork fixup flag for read pipe.
-
-2002-12-14 Christopher Faylor <cgf@redhat.com>
-
- * winbase.h: Turn on inline versions of Interlocked* by default.
-
-2002-12-14 Gary R. Van Sickle <g.r.vansickle@worldnet.att.net>
-
- * winbase.h: Fixup inline asm functions. Add ilockcmpexch.
-
-2002-12-13 Christopher Faylor <cgf@redhat.com>
-
- Throughout, change fhandler_*::read and fhandler_*::raw_read to void
- functions whose second arguments are both the length and the return
- value.
- * fhandler.cc (fhandler_base::read): Rework slightly to use second
- argument as input/output. Tweak CRLF stuff.
- (fhandler_base::readv): Accommodate fhandler_*::read changes.
- * cygthread.h (cygthread::detach): Declare as taking optional handle
- argument.
- (cygthread::detach): When given a handle argument, wait for the handle
- to be signalled before waiting for thread to detach. Return true when
- signal detected.
-
-2002-12-12 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in: Add MINGW_LDFLAGS when linking cygrun.exe.
-
-2002-12-10 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.h (cygthread::stack_ptr): New element.
- (cygthread::detach): Accept a "wait_for_signal" argument.
- (cygthread::terminate_thread): New function.
- * cygthread.cc (cygthread::stub): Set stack pointer argument.
- (cygthread::terminate_thread): New function. Forcibly terminate
- thread.
- (cygthread::detach): Optionally wait for signals and kill thread when
- signal arrives.
- * exceptions.cc (signal_exit): Set signal_arrived prior to exiting to
- wake up anything blocking on signals.
- * fhandler.h (fhandler_base::set_r_no_interrupt): Change to accept bool
- argument.
- (fhandler_pipe::ready_for_read): Declare.
- * pipe.cc (pipeargs): New structure.
- (read_pipe): New thread stub wrapper for normal pipe read.
- (fhandler_pipe::read): Modify to call reader in a cygthread,
- terminating on signal, as appropriate.
- * select.cc (fhandler_pipe::ready_for_read): Define new function.
-
-2002-12-10 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (free_protoent_ptr): Add missing free() for base structure.
- (free_servent_pt): Ditto.
- (free_hostent_pt): Ditto.
-
-2002-12-10 Craig McGeachie <slapdau@yahoo.com.au>
-
- * netdb.cc (parse_alias_list): Change strtok calls to strtok_r.
- (parse_services_line): Ditto.
- (parse_protocol_line): Ditto.
-
-2002-12-10 Pierre Humblet <pierre.humblet@ieee.org>
-
- * pwdgrp.h (pwdgrp_check::pwdgrp_state): Replace by
- pwdgrp_check::isinitializing ().
- (pwdgrp_check::isinitializing): Create.
- * passwd.cc (grab_int): Change type to unsigned, use strtoul and set
- the pointer content to 0 if the field is invalid.
- (parse_pwd): Move validity test after getting pw_gid.
- (read_etc_passwd): Replace "passwd_state <= " by
- passwd_state::isinitializing ().
- (internal_getpwuid): Ditto.
- (internal_getpwnam): Ditto.
- (getpwent): Ditto.
- (getpass): Ditto.
- * grp.cc (parse_grp): Use strtoul for gr_gid and verify the validity.
- (read_etc_group): Replace "group_state <= " by
- group_state::isinitializing ().
- (internal_getgrgid): Ditto.
- (getgrent32): Ditto.
- (internal_getgrent): Ditto.
-
-2002-12-10 Pierre Humblet <pierre.humblet@ieee.org>
-
- * security.h: Move declarations of internal_getgrent,
- internal_getpwsid and internal_getgrsid to pwdgrp.h.
- * pwdgrp.h: Declare internal_getpwsid, internal_getpwnam,
- internal_getpwuid, internal_getgrsid, internal_getgrgid,
- internal_getgrnam, internal_getgrent and internal_getgroups.
- Delete "emulated" from enum pwdgrp_state.
- (pwdgrp_check::isuninitialized): Create.
- (pwdgrp_check::pwdgrp_state): Change state to initializing
- rather than to uninitialized.
- (pwdgrp_read::gets): Remove trailing CRs.
- * passwd.cc (grab_string): Don't look for NLs.
- (grab_int): Ditto.
- (parse_pwd): Don't look for CRs. Return 0 if entry is too short.
- (search_for): Delete.
- (read_etc_passwd): Simplify tests to actually read the file.
- Set state to loaded before making internal_getpwXX calls.
- Replace search_for calls by equivalent internal_pwgetXX calls.
- (internal_getpwsid): Use passwd_state.isuninitialized to decide
- to call read_etc_passwd.
- (internal_getpwuid): Create.
- (internal_getpwnam): Create.
- (getpwuid32): Simply call internal_getpwuid.
- (getpwuid_r32): Call internal_getpwuid.
- (getpwnam): Simply call internal_getpwnam.
- (getpwnam_r): Call internal_getpwnam.
- * grp.cc (parse_grp): Don't look for CRs. Adjust blank space.
- (add_grp_line): Adjust blank space.
- (class group_lock): Ditto.
- (read_etc_group): Simplify tests to actually read the file.
- Set state to loaded before making internal_getgrXX calls.
- Replace getgrXX calls by equivalent internal calls.
- (internal_getgrsid): Use group_state.isuninitialized to decide
- to call read_etc_group.
- (internal_getgrgid): Create.
- (internal_getgrnam): Create.
- (getgroups32): Simply call internal_getgrgid.
- (getgrnam32): Simply call internal_getgrnam.
- (internal_getgrent): Call group_state.isuninitialized.
- (internal_getgroups): Create from the former getgroups32, using
- two of the four arguments. Set gid to myself->gid and username
- to cygheap->user.name ().
- (getgroups32): Simply call internal_getgroup.
- (getgroups): Call internal_getgroup instead of getgroups32.
- (setgroups32): Call internal versions of get{pw,gr}XX.
- * sec_helper.cc: Include pwdgrp.h.
- (is_grp_member): Call internal versions of get{pw,gr}XX.
- * security.cc: Include pwdgrp.h.
- (alloc_sd): Call internal versions of get{pw,gr}XX.
- * syscalls.cc: Include pwdgrp.h.
- (seteuid32): Call internal versions of get{pw,gr}XX.
- (setegid32): Ditto.
- * uinfo.cc: Include pwdgrp.h.
- (internal_getlogin): Call internal versions of get{pw,gr}XX.
- (cygheap_user::ontherange): Ditto.
- * sec_acl.cc: Include pwdgrp.h.
- (setacl): Call internal versions of get{pw,gr}XX.
- (acl_access): Ditto and simplify logic.
- (aclfromtext): Ditto.
-
-2002-12-09 2002-12-02 Egor Duda <deo@logos-m.ru>
-
- * lib/pseudo-reloc.c: New file.
- * lib/_cygwin_crt0_common.cc: Perform pseudo-relocs during
- initialization of cygwin binary (.exe or .dll).
-
-2002-12-06 Christopher Faylor <cgf@redhat.com>
-
- * cygwin.din: Reflect name change from strtodf to strtof. Export
- strtof.
- * include/cygwin/version.h: Bump API minor number.
-
-2002-12-04 Steve Osborn <bub@io.com>
-
- * fhandler.h (fhandler_termios::line_edit): Change return from an int
- to an enum to allow the function to return an error.
- * fhandler_console.cc (fhandler_console::read): Update the line_edit
- call to use the new enum.
- * fhandler_termios.cc (fhandler_termios::line_edit): Change return from
- an int to an enum to allow the function to return an error. Put
- put_readahead call before doecho for future patch.
- * fhandler_tty.cc (fhandler_pty_master::write): Change to call
- line_edit one character at a time, and stop if an error occurs.
-
-2002-12-04 Craig McGeachie <slapdau@yahoo.com.au>
-
- * netdb.cc: New file.
- * Makeile.in (DLL_OFILES): Add reference to the new netdb.cc file.
- * cygwin.din : Add new aliased exports for service and protocol
- enumerations in netdb.cc.
-
-2002-12-04 Thomas Pfaff <tpfaff@gmx.net>
-
- * cxx.cc: New file. Implement new, new[], delete and delete[]
- operators and __cxa_pure_virtual if compiled by gcc >=3.
- * Makefile.in (DLL_OFILES): Add cxx.o.
- Remove libstdc++.a from cygwin1.dll link step.
-
-2002-11-29 Steve Osborn <bub@io.com>
-
- * fhandler_tty.cc (fhandler_pty_master::accept_input): Move
- read_retval assignment to prevent race condition. Remove read_retval
- from return statement.
-
-2002-11-29 Christopher Faylor <cgf@redhat.com>
-
- * pinfo.h (winpids::set): Renamed from init.
- (winpids::init): New declaration.
- (winpids::cs): Ditto.
- (winpids::winpids): Use set rather than init.
- * external.cc (fillout_pinfo): Ditto.
- * dcrt0.cc (dll_crt0_1): Call winpids::init.
- * pinfo.cc (winpids::set): Renamed from init. Wrap calls in critical
- section.
- (winpids::init): New function.
- (winpids::cs): Define.
-
-2002-11-28 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (sig_dispatch_pending): Remove assertion.
-
-2002-11-27 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number.
-
-2002-11-27 Mikael Ylikoski <my@post.utfors.se>
-
- * fhandler_socket.cc (fhandler_socket::sendto): Fix potential
- unitialized value return.
-
-2002-11-27 Christopher Faylor <cgf@redhat.com>
-
- * cygwin.din: Export pthread_getsequence_np.
- * include/cygwin/version.h: Bump API minor version.
-
-2002-11-26 Jason Tishler <jason@tishler.net>
-
- * cygwin.din: Export nl_langinfo().
- * include/cygwin/version.h: Bump API minor version.
-
-2002-11-26 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_tty.cc (fhandler_pty_master::accept_input): Just use a
- normal Sleep or suffer amazing pauses when other tty apps are running.
- (fhandler_pty_master::process_slave_output): Ditto.
-
-2002-11-25 Pierre Humblet <pierre.humblet@ieee.org>
-
- * passwd.cc (read_etc_passwd): Never add an entry when starting
- on Win95/98/ME if a default entry is present.
- * uinfo.cc (internal_getlogin): Look for the default uid if needed.
- Always call user.set_name ().
-
-2002-11-25 Corinna Vinschen <corinna@vinschen.de>
-
- * sec_acl.cc (getacl): Set errno to ENOSPC if command is GETACL and
- nentries is less than the number of entries in the file's ACL.
-
-2002-11-24 Corinna Vinschen <corinna@vinschen.de>
-
- * sec_acl.cc: Fix some formatting. Only set and check `other' bits in
- a_perm throughout. Use ILLEGAL_GID id for all entries having no id.
- (setacl): Fix inheritance condition.
- (getacl): Set all permission bits in CLASS_OBJ and DEF_CLASS_OBJ
- entries. Remove DENY bits before returning to calling function.
- (acltomode): Fix usage of searchace(). If available, use CLASS_OBJ
- to mask GROUP_OBJ permissions.
- (aclfrommode): Fix usage of searchace(). If available, set CLASS_OBJ
- permissions to same value as GROUP_OBJ permissions.
-
-2002-11-24 Pierre Humblet <pierre.humblet@ieee.org>
-
- * sec_acl.cc (getace): Fix the behavior when allow and
- deny entries are present in arbitrary order.
- (getacl): Report the actual number of entries when
- aclbufp is NULL, even if nentries is zero. Fix the mask
- reporting, handle the case where the owner and group sids
- are equal and streamline the code.
- (acl_worker): Take allow_ntsec into account.
-
-2002-11-05 Thomas Pfaff <tpfaff@gmx.net>
-
- * dcrt0.cc (dll_crt0_1): Add call to pthread::initMainThread to
- initialize mainthread when it is safe to call new.
- * init.cc (dll_entry): Change call to store reents in tls key.
- * thread.cc (_reent_clib) : Change call to get reents from tls
- key.
- (_reent_winsup): Ditto.
- (MTinterface::Init): Key handling changed. Remove initialization
- of member variables.
- (MTinterface::fixup_after_fork): Reinitialize mainthread object
- after fork. Reset threadount to 1.
- (pthread::initMainThread): Create mainthread object dynamically.
- and initialize with valid handles.
- (pthread::self): Remove calls to create thread objects.
- (pthread::setTlsSelfPointer): Change call to store thread self
- handle in tls key.
- (pthread::getTlsSelfPointer): New static method.
- (pthread::exit): Remove setTlsSelfPointer call.
- (pthread::initCurrentThread): New method.
- (pthread::thread_init_wrapper): Change call to store thread self
- handle in tls key.
- (pthread::join): Check for a valid joiner.
- (pthreadNull::pthreadNull): Mark Null object as detached.
- (pthreadNull::exit): Terminate thread via ExitThread.
- * thread.h (pthread::initMainThread): Change parameter in function
- call.
- (pthread::getTlsSelfPointer): New static method.
- (pthread::initCurrentThread): New method.
- (MTinterface::reent_key): Remove.
- (MTinterface::thread_self_dwTlsIndex): Ditto..
- (MTinterface::indexallocated): Ditto.
- (MTinterface::mainthread): Ditto.
- (MTinterface::reent_key): New member.
- (MTinterface::thread_self_key): Ditto.
- (MTinterface::MTinterface): Initialize all members.
-
-2002-11-23 Christopher Faylor <cgf@redhat.com>
-
- * wait.cc (wait4): Force pending signal delivery before waiting for
- process completion.
-
-2002-11-23 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number.
-
-2002-11-22 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (handle_sigsuspend): Force pending signal delivery
- before waiting for signals to happen.
- * signal.cc (sleep): Force pending signal delivery before sleeping.
- (usleep): Ditto.
- (signal): Force pending signal delivery before manipulating signal
- stuff.
- (sigprocmask): Ditto.
- (kill_worker): Ditto.
- (abort): Ditto.
- (sigaction): Ditto.
- * syscalls.cc (readv): Force pending signal delivery before I/O.
- (writev): Ditto.
- (open): Ditto.
- * net.cc: Ditto, throughout.
- * sigproc.cc (sig_dispatch_pending): Deliver any pending signals prior
- to returning.
-
- * tty.cc (tty::make_pipes): Increase pipe buffer size.
-
-2002-11-22 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Fix comment.
-
-2002-11-21 Igor Pechtchanski <pechtcha@cs.nyu.edu>
-
- * external.cc (cygwin_internal): Fix va_arg references.
-
-2002-11-21 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (sigthread::get_winapi_lock): Just do standard 'give up
- timeslice' wait.
- (setup_handler): Revamp YA to attempt to deliver signal multiple times
- on failure rather than punting to wait_sig.
- * miscfuncs.cc (low_priority_sleep): Accept INFINITE sleep to mean
- "don't reset the priority after setting it to idle". Return previous
- priority.
- * winsup.h (SLEEP_0_STAY_LOW): Define.
- (low_priority_sleep): Return an int.
- * sigproc.h: Define WAIT_SIG_PRIORITY here.
- * sigproc.cc: Remove WAIT_SIG_PRIORITY definition.
-
-2002-11-20 Pierre Humblet <pierre.humblet@ieee.org>
-
- * security.h: Declare internal_getpwsid and internal_getgrsid.
- Undeclare internal_getpwent. Define DEFAULT_UID_NT. Change
- DEFAULT_GID.
- * passwd.cc (internal_getpwsid): New function.
- (internal_getpwent): Suppress.
- (read_etc_passwd): Make static. Rewrite the code for the completion
- line. Set curr_lines to 0.
- (parse_pwd): Change type to static int. Return 0 for short lines.
- (add_pwd_line): Pay attention to the value of parse_pwd.
- (search_for): Do not look for nor return the DEFAULT_UID.
- * grp.cc (read_etc_group): Make static. Free gr_mem and set
- curr_lines to 0. Always call add_pwd_line. Rewrite the code for the
- completion line.
- (internal_getgrsid): New function.
- (parse_grp): If grp.gr_mem is empty, set it to &null_ptr.
- Never NULL gr_passwd.
- (getgrgid32): Only return the default if ntsec is off and the gid is
- ILLEGAL_GID.
- * sec_helper.cc (cygsid::get_id): Use getpwsid and getgrsid.
- (cygsid_getfrompw): Clean up last line.
- (cygsid_getfromgr): Ditto.
- (is_grp_member): Use getpwuid32 and getgrgid32.
- * uinfo.cc (internal_getlogin): Set DEFAULT_GID at start.
- Use getpwsid. Move the read of /etc/group after the second access
- to /etc/passwd. Change some debug_printf.
-
-2002-11-20 Steven O'Brien <steven.obrien2@ntlworld.com>
-
- * poll.cc (poll): ...but set POLLIN instead.
-
-2002-11-20 Pierre Humblet <pierre.humblet@ieee.org>
-
- * security.cc (get_attribute_from_acl): Always test "anti",
- just in case an access_denied ACE follows an access_allowed.
- Handle the case owner_sid == group_sid, with a FIXME.
- Remove unnecessary tests for non-NULL PSIDs.
- (alloc_sd): Use existing owner and group sids if {ug}id == -1.
- Handle case where owner_sid == group_sid.
- Do not call is_grp_member. Try to preserve canonical ACE order.
- Remove unnecessary tests for non-NULL PSIDs. Reorganize
- debug_printf's.
- (get_initgroups_sidlist): Put well_known_system_sid on left
- side of ==.
- (add_access_denied_ace): Only call GetAce if inherit != 0.
- (add_access_allowed_ace): Ditto. Use appropriate sizeof.
- * syscalls.cc (chown_worker): Pass {ug}id equal to -1 to
- alloc_sd, which removes the need to obtain old_{ug}id.
- (chmod): Remove call to get_file_attribute (), simply pass
- {ug}id equal to -1 to alloc_sd.
-
-2002-11-20 Corinna Vinschen <corinna@vinschen.de>
-
- * poll.cc (poll): Don't set POLLERR if a listening socket has a
- pending connect. Don't use errno value from call to
- fhandler_socket::recvfrom().
-
-2002-11-19 Christopher Faylor <cgf@redhat.com>
-
- * net.cc: Sprinkle sigframes throughout.
-
-2002-11-16 Christopher Faylor <cgf@redhat.com>
-
- * tty.cc (tty::make_pipes): Make pipe buffer larger.
-
-2002-11-15 Pierre Humblet <pierre.humblet@ieee.org>
-
- * grp.cc (getgroups32): Protect against closing cygheap->user.token.
-
-2002-11-15 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump API_MINOR to accommodate below
- changes.
-
-002-11-14 Sergey Okhapkin <sos@prospect.com.ru>
-
- * cygwin.din (siginterrupt): New export.
- * signal.cc (siginterrupt): New.
-
-2002-11-15 Sergey Okhapkin <sos@prospect.com.ru>
-
- * select.cc (peek_serial): Don't call PurgeComm() to avoid characters
- loss.
-
-2002-11-14 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (setup_handler): Add debugging output. Set thread
- priority to idle if pending signals to allow other threads to get into
- interruptible state.
- * miscfuncs.cc (sys_mbstowcs): Save current thread in variable to avoid
- an OS call.
- * wait.cc (wait_sig): Reset thread priority each time through loop
- since the priority may have been set down to deal with pending signals.
-
-2002-11-14 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_serial.cc (fhandler_serial::tcgetattr): Don't take any
- special action when vmin_ == 0.
-
-2002-11-14 Corinna Vinschen <corinna@vinschen.de>
-
- * grp.cc (getgroups32): Revert previous patch. Use impersonation
- token if process is in impersonated state.
- * sec_helper.cc (is_grp_member): Rewrite. Call getgroups32 only
- for current user. Scan passwd and group info otherwise.
-
-2002-11-14 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_console.cc (fhandler_console::write): Allow characters >=
- 0177 to be displayed in the title bar.
-
-2002-11-14 Corinna Vinschen <corinna@vinschen.de>
-
- * grp.cc (getgroups32): Don't use access token of current user when
- retrieving group info for another user.
-
-2002-11-13 Christopher Faylor <cgf@redhat.com>
-
- * dll_init.cc (dll_list::detach): Eliminate reliance on passed in dll
- address. Infer from module of caller instead.
- (cygwin_detach_dll): Ignore dll_index argument.
- * dll_init.h (dll_list::detach): Reflect argument change above.
-
-2002-11-13 Christopher Faylor <cgf@redhat.com>
-
- * ioctl.cc (ioctl): Always print ioctl results, even when it's a tty.
-
-2002-11-13 Christopher Faylor <cgf@redhat.com>
-
- * winsup.h (low_priority_sleep): Declare.
-
-2002-11-13 Christopher Faylor <cgf@redhat.com>
-
- * miscfuncs.cc (low_priority_sleep): New function. Use throughout
- where code is supposed to be giving up time slice.
-
- * fhandler_console.cc (fhandler_console::read): Switch button 2/3
- output escape sequences to be consistent with xterm.
-
-2002-11-12 Pierre Humblet <pierre.humblet@ieee.org>
-
- * syscalls.cc (chmod): Simplify conditional.
- * sec_helper (cygsid::getfromstr): Reorganize to remove
- calls to strcpy and strtok_r.
- (cygsid::getfromgr): Change type to __uid32_t instead of int.
- Keep only the allow_ntsec branch. Never call LookupAccountSid
- which calls PDCs, simply return -1 in case of failure.
- Use cygsid == instead of calling EqualSid and remove test
- for NULL psid.
- * security.h: Declare cygsid::getfromgr as __uid32_t.
-
-2002-11-10 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc: Run indent.
-
-2002-11-10 Alexander Gottwald <Alexander.Gottwald@s1999.tu-chemnitz.de>
-
- * autoload.cc (GetIfEntry): Add symbol.
- * net.cc (get_2k_ifconf): Get the interface entries with the GetIfEntry
- call intead of the GetIfTable call. Clean-up multiple IP address naming.
-
-2002-11-09 Sergey Okhapkin <sos@prospect.com.ru>
-
- * fhandler.h (class fhandler_pipe): New ioctl() method.
- * pipe.cc (fhandler_pipe::ioctl): New.
-
-2002-11-07 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_serial.cc (fhandler_serial::ioctl): Fix typo.
-
-2002-11-07 Christopher January <chris@atomice.net>
-
- * include/cygwin/fs.h: New file.
- * include/cygwin/hdreg.h: New file.
- * fhandler_floppy.cc (fhandler_floppy::ioctl): Add implementation for
- HDIO_GETGEO, BLKGETSIZE, BLKGETSIZE64, BLKRRPART and BLKSSZGET ioctls.
-
-2002-11-07 Gilles Courcoux <Gilles.Courcoux@col.bsf.alcatel.fr>
-
- * fhandler_socket.cc (fhandler_socket::ioctl): Return correct flags
- for loopback interface when name is given on input instead of address.
-
-2002-11-07 Jason Tishler <jason@tishler.net>
-
- * cygwin.din: Export fseeko() and ftello().
- * include/cygwin/version.h: Bump API minor version.
-
-2002-11-06 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_console.cc (keytable[]): Revert previous change. It would
- break too many things.
-
-2002-11-06 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_console.cc (keytable[]): Redefine F1 - F5 to something a
- little more sensical.
-
-2002-11-06 Sergey Okhapkin <sos@prospect.com.ru>
-
- * syscalls.cc (getutid): Use UT_IDLEN where appropriate.
-
-2002-11-06 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump API minor number for below export.
-
-2002-11-06 Sergey Okhapkin <sos@prospect.com.ru>
-
- * cygwin.din (pututline): New exported function.
- * syscalls.cc (login): Use pututiline().
- (setutent): Open utmp as read/write.
- (endutent): Check if utmp file is open.
- (utmpname): call endutent() to close current utmp file.
- (getutid): Enable all cases, use strncmp() to compare ut_id fields.
- (pututline): New.
- * tty.cc (create_tty_master): Set ut_pid to current pid.
-
-2002-11-05 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_serial.cc (fhandler_serial::ioctl): Don't try to figure out
- if OS has the capability to retrieve RTS/CTS. Just set default values
- if DeviceIoControl fails. (suggested by Sergey Okhapkin)
-
-2002-11-05 Sergey Okhapkin <sos@prospect.com.ru>
-
- * fhandler_serial.cc (fhandler_serial::raw_read): Use correct type for
- minchars.
- (fhandler_serial::ioctl): Set errno if the ClearCommError fails.
- (fhandler_serial::tcsetattr): Use correct value for vmin_.
- (fhandler_serial::tcgetattr): Ditto.
-
-2002-11-05 Thomas Pfaff <tpfaff@gmx.net>
-
- * fhandler_socket.cc (fhandler_socket::recvmsg): Call if from == NULL
- WSARecvFrom with fromlen = NULL.
-
-2002-11-04 Christopher Faylor <cgf@redhat.com>
-
- * pinfo.cc (_pinfo::commune_send): Fix thinko in previous checkin.
-
-2002-11-04 Christopher Faylor <cgf@redhat.com>
-
- * pinfo.cc (_pinfo::commune_send): Set priority low when sleeping,
- waiting for commune completion so that we don't spin waiting for lower
- priority processes.
-
-2002-11-04 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (WAIT_SIG_PRIORITY): Bump to THREAD_PRIORITY_TIME_CRITICAL.
-
-2002-11-04 Christopher Faylor <cgf@redhat.com>
-
- * pinfo.cc (_pinfo::commune_send): Initialize buffer or suffer random
- crashes.
-
-2002-11-04 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_process.cc (fhandler_process::fill_filebuf): Deal with error
- condition from cmdline retrieval.
-
-2002-11-04 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (WAIT_SIG_PRIORITY): Bump to highest priority.
-
-2002-11-04 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number.
-
-2002-11-03 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_serial.cc (fhandler_serial::ioctl): Reformat. Set errno
- appropriately. Exit from the bottom. Correctly deal with third
- argument for TCFLSH. (Suggested by Sergey Okhapkin)
-
-2003-11-03 Sergey Okhapkin <sos@prospect.com.ru>
-
- * fhandler_tty.cc (fhandler_tty_slave::ioctl): Do nothing if the new
- window size is equal to the old one. Send SIGWINCH if slave connected
- to a pseudo tty.
- (fhandler_pty_master::ioctl): Do nothing if the new window size is
- equal to the old one.
-
-2002-10-31 Pierre Humblet <pierre.humblet@ieee.org>
-
- * fhandler.cc (fhandler_base::open): Verify pc isn't NULL.
-
-2002-10-30 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number.
-
-2002-10-30 Christopher Faylor <cgf@redhat.com>
-
- * external.cc (cygwin_internal): Implement CW_CMDLINE.
- * pinfo.h (SIGCOMMUNE): New signal type.
- (commune_result): New structure for commune functions.
- (picom): New enum for commune functions.
- (_pinfo::hello_pid): New. Pid who's communicating with me.
- (_pinfo::tothem): New. Handle of communicating pipe.
- (_pinfo::fromthem): Ditto.
- (_pinfo::commune_recv): Declare.
- (_pinfo::commune_send): Declare.
- (_pinfo::alive): Declare.
- (_pinfo::cmdline): Declare.
- (_pinfo::lock): Declare.
- * pinfo.cc (set_myself): Initialize new _pinfo lock.
- (_pinfo::alive): Define. Determines if process still exists.
- (_pinfo::commune_recv): Define. Receive info from another cooperating process.
- (_pinfo::commune_send): Define. Send info to another cooperating process.
- (_pinfo::cmdline): Define. Determine command line of a given process.
- * include/sys/cygwin.h (CW_CMDLINE): Define.
-
- *sigproc.cc (talktome): Communicate with any processes who want to talk
- to me.
- (wait_sig): Honor __SIGCOMMUNE.
-
- * fhandler.cc (fhandler_virtual::fixup_after_exec): Declare.
- * fhandler_proc.cc: Use malloc/free/realloc throughout rather than
- cmalloc since buffers don't need to be propagated to subprocesses.
- * fhandler_registry.cc: Ditto.
- * fhandler_virtual.cc: Ditto.
- (fhandler_virtual::fixup_after_exec): Define.
- * fhandler_process.cc: Ditto for malloc/free/realloc.
- (process_listin): Add "cmdline".
- (fhandler_process::fill_filebuf): Implement PROCESS_CMDLINE.
-
- * miscfuncs.cc (isalpha_array): New array populated with xor values for
- alpha characters to switch from one case to another.
- * string.h (cygwin_strcasematch): New asm implementation of case match.
- * string.h (cygwin_nstrcasematch): New asm implementation of counted
- case match.
-
-2002-10-24 Pierre Humblet <pierre.humblet@ieee.org>
-
- * pwdgrp.h (pwdgrp_read::open): Compare fh to INVALID_HANDLE_VALUE.
-
-2002-10-22 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Nevermind.
- Revert everything to previous state wrt ntsec and exec bits.
-
-2002-10-22 Christopher Faylor <cgf@redhat.com>
-
- * shared.cc (shared_info::initialize): Use correct value for version
- comparison.
- * include/cygwin/version.h (CYGWIN_VERSION_MAGIC): Use all of a DWORD
- for magic calculation.
-
-2002-10-22 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Oops. Only
- do the executable thing for #! scripts since .exe files wouldn't be
- executable in ntsec case regardless.
-
-2002-10-22 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Always
- consider .exe files and '#!' shell scripts to be executable.
-
-2002-10-22 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (cygthread::exiting): New variable.
- (cygthread::initialized): Delete.
- (cygthread::stub): Use exiting variable to determine when to exit.
- (cygthread::runner): Delete.
- (cygthread_protect): New variable.
- (cygthread::init): Don't start runner thread. Initialize muto for list
- protection.
- (cygthread::freerange): Return pointer to cygthread.
- (cygthread::operator new): Change logic to start threads on an
- as-needed basis.
- (cygthread::detach): Don't zero id.
- (cygthread::terminate): Don't kill any executing threads. Just set
- exiting flag.
- * cygthread.h (cygthread): Reflect above changes.
- * dcrt0.cc (dll_crt0_1): Move cygthread initialization later.
-
- * fork.cc (fork_child): Do fdtab fixup after dll fixup or (apparently)
- winsock may allocate memory in dll load address.
-
-2002-10-22 Pierre Humblet <pierre.humblet@ieee.org>
-
- * sec_helper.cc (cygsid::get_id): If the sid matches a sid stored in
- cygheap->user, return the uid or gid from myself.
- * security.cc (alloc_sd): If gid == myself->gid, return the group sid
- from cygheap->user. Remove the test for uid == original_uid, which is
- counter-productive.
-
-2002-10-22 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.cc (cygheap_fixup_in_child): Use user_heap element in
- cygheap.
- (init_cheap): Ditto for declaration.
- * fork.cc (fork_parent): Use user_heap element in cygheap.
- * heap.h (inheap): Ditto.
- * heap.cc (sbrk): Ditto.
- (heap_init): Ditto. Reorganize to shrink heap chunk as required and
- record new value in cygheap.
- * dcrt0.cc (dll_crt0_1): More "move the cygthread init" games.
- * shared.cc (open_shared): Rework memory protection to properly deal
- with relocated shared segment.
- (shared_info::heap_chunk_size): Rename element to 'heap_chunk'.
- * shared_info.h (shared_info): Ditto for declaration.
- * strace.cc (strace::hello): Report on heap chunk size from cygheap
- since it may shrink.
-
-2002-10-20 Christopher Faylor <cgf@redhat.com>
-
- Change _function() to function() throughout.
- * cygwin.din: Remove last vestiges (?) of newlib wrappers.
-
-2002-10-20 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (cygthread::detach): Always wait for event or suffer an
- apparently inavoidable race.
- * dcrt0.cc (dll_crt0_1): Allocate threads after stack has been
- relocated.
- * debub.cc (lock_debug): Don't acquire lock on exit.
- * fork.cc (fork_child): Recreate mmaps before doing anything else since
- Windows has a habit of using blocks of memory in the child that could
- previously have been occupied by shared memory in the parent.
- * mmap.cc (fhandler_disk_file::fixup_mmap_after_fork): Issue error here
- and provide some details about what went wrong.
- (fixup_mmaps_after_fork): Remove error message.
- * shared.cc (open_shared): Move warning message so that more detail is
- possible.
- * sigproc.cc (sigproc_init): Initialize sync_proc_subproc to avoid a
- race.
- (sigproc_terminate): Specifically wait for process thread to terminate.
-
-2002-10-20 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (cygthread::stub): Fix typo.
- (cygthread::terminate): Don't zero thread handle prior to using it.
-
-2002-10-20 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (wait_sig): Remove obsolete sigchld logic.
-
-2002-10-20 Christopher Faylor <cgf@redhat.com>
-
- Rename _kill() to kill() throughout. Rename _raise() to raise()
- throughout. Rename _pid() to pid() throughout.
- * Makefile.in: Compile some objects with -fomit-frame-pointer.
- * cygwin.din: Reverse aliasing for _kill.
- * syscalls.cc (_getpid_r): New function, implemented for newlib
- compatibility.
-
- * shared.cc (open_shared): Remove reserving of memory since previous
- change eliminate the need for this hack.
-
-2002-10-19 Christopher Faylor <cgf@redhat.com>
-
- * fork.cc (fork_child): Move pinfo fixup later to attempt some minor
- gains from concurrency with cythread::init.
-
-2002-10-18 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (dll_crt0_1): Initialize cygwin threads here only when not
- forking.
- * fork.cc (fork_child): Initialize cygwin thread later in process to
- avoid allocating memory for thread stacks.
- * shared.cc (open_shared): Issue warning if NT and shared segment is
- relocated.
-
-2002-10-18 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc: Bump number of cygthreads up to accommodate
- applications which use ttys.
-
-2002-10-18 Christopher Faylor <cgf@redhat.com>
-
- * fork.cc (fork_child): Move mmap initialization.
- * shared.cc (shared_info::heap_chunk_size): Store info as megabytes.
- Search HKEY_LOCAL_MACHINE as well as HKEY_CURRENT_USER.
- * shared_info.h (shared_info::initial_heap_size): Change element name
- to reflect new functionality.
- * strace.cc (strace::hello): Report on initial heap size.
-
-2002-10-18 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.cc (verifyable_object_isvalid): Test for a valid object
- pointer before testing for static ptr.
-
-2002-10-17 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (dtable::init_std_file_from_handle): Force "devices" to
- always be in binary mode. Temporary fix until ssh is rebuilt?
-
-2002-10-17 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (dtable::set_file_pointers_for_exec): New function.
- * dtable.h (dtable::set_file_pointers_for_exec): Declare new function.
- * spawn.cc (spawn_guts): Call dtable::set_file_pointers_for_exec to set
- pointers to EOF when execing non-cygwin applications.
-
-2002-10-17 Robert Collins <rbtcollins@hotmail.com>
-
- * thread.h (pthread_mutex::isGoodInitializerOrBadObject): Declare.
- * thread.cc (pthread_mutex::isGoodInitializerOrBadObject): Implement.
- (pthread_mutex::init): Use isGoodInitializerOrBadObject to avoid
- unneeded SEGV's during debugging.
-
-2002-10-17 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.cc (verifyable_object_isvalid): Test for static object first.
-
-2002-10-16 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_tty.cc (fhandler_tty_slave::read): Attempt #527 to properly
- implement VMIN/VTIME.
-
-2002-10-15 Christopher Faylor <cgf@redhat.com>
-
- * shared.cc (open_shared): Revert to "old" method for shared memory
- location if !wincap.needs_memory_protection.
- * wincap.cc: Implement needs_memory_protection throughout.
- * wincap.h: Ditto.
-
-2002-10-15 Christopher Faylor <cgf@redhat.com>
-
- * child_info.h (CURR_CHILD_INFO_MAGIC): Reset.
- (child_info_fork::mount_table): Remove.
- (child_info_fork::myself_addr): Remove.
- * fork.cc (fork_child): Don't set either of the above.
- * dcrt0.cc (dll_crt0_1): Call memory_init as early as possible.
- * fhandler_console.cc (console_state): Move to shared_info.h.
- (fhandler_console::get_tty_stuff): Reflect open_shared arg change.
- * pinfo.cc (myself_addr): Remove definition.
- (pinfo::init): Get myself address from open_shared.
- * pinfo.h (myself_addr): Remove declaration.
- * shared.cc (open_shared): Rework so that known shared memory locations
- are protected. Take shared memory type as fifth argument.
- (memory_init): Reflect open_shared arg change.
- * shared_info.h (shared_locations): New enum.
- (console_state): Move here.
- (open_shared): Reflect open_shared arg change in declaration.
-
-2002-10-14 Christopher Faylor <cgf@redhat.com>
-
- * child_info.h (CURR_CHILD_INFO_MAGIC): Reset.
- (child_info_fork::heaptop): Remove obsolete element.
- (child_info_fork::heabbase): Ditto.
- (child_info_fork::heapptr): Ditto.
- (child_info_fork::mount_table): New element.
- (child_info_fork::myself_addr): Ditto.
- * dcrt0.cc (dll_crt0_1): Set mount_table and myself_addr when forking.
- (initial_env): Add newline to "sleeping" message.
- * dll_init.cc (reserve_upto): Accommodate cygwin heap when freeing
- memory. Make debugging output a little more descriptive.
- * fork.cc (fork_parent): Save mount_table and myself_addr.
- * pinfo.cc (myself_addr): New variable.
- (set_myself): Pass PID_MYSELF flag to init.
- (pinfo::init): Honor PID_MYSELF. Save address where myself shared
- memory resides in myself_addr, for fork.
- * pinfo.h (myself_addr): Declare.
- * shared.cc (memory_init): On fork, use previously saved address for
- location of mount table.
- * include/sys/cygwin.h (PID_MYSELF): New value.
-
- * dtable.cc (dtable::stdio_init): Don't pass access type to
- init_std_file_from_handle. It's always the same.
- (dtable::init_std_file_from_handle): Remove access type argument.
- Assume read/write.
- * dtable.h (dtable::init_std_file_from_handle): Ditto for declaration.
-
- * exceptions.cc (try_to_debug): Don't try to debug if already being
- debugged.
-
- * fhandler_console.cc (shared_console_info_save): New variable.
- (fhandler_console::get_tty_stuff): Save address of shared console stuff
- for fork.
-
-2002-10-13 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (cygthread::stub): Reintroduce clearing of __name but do
- it before SetEvent to eliminate a race.
- (cygthread::terminate): Accumulate list of threads to check for
- termination and call WaitForMultipleObjects on list rather than waiting
- for each thread individually.
- * sigproc.cc (subproc_init): Zap hwait_subproc thread handle since it
- is no longer used.
-
-2002-10-13 Christopher Faylor <cgf@redhat.com>
-
- * spawn.cc (spawn_guts): Fix so that cygthread::terminate is *really*
- called only for exec.
-
-2002-10-13 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (cygthread::stub): Don't zero __name here. That
- introduces a race.
-
-2002-10-13 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number.
-
-2002-10-13 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (cygthread::stub): Don't create event for long-running
- threads. Initialize thread_sync event here which is used to Suspend
- using an event rather than relying on SuspendThread/ResumeThread.
- (cygthread::init): Save handle to runner thread for future termination.
- (cygthread::cygthread): Only resume thread when it is actually
- suspended. Otherwise signal thread completion event.
- (cygthread::terminate): Forcibly terminate runner thread and any helper
- threads. Call DisableThreadLibrary calls if execing.
- * cygthread.h (cygthread::thread_sync): Declare.
- * dcrt0.cc (do_exit): Eliminate calls to obsolete window_terminate and
- shared_terminate.
- * exceptions.cc (events_terminate): Don't bother closing title_mutex
- since it is going away anyway.
- * pinfo.cc (_pinfo::exit): Call cygthread::terminate to ensure that
- threads are shut down before process exit or otherwise strange races
- seem to occur.
- * shared.cc (shared_terminate): Eliminate.
- * shared.h (shared_terminate): Eliminate declaration.
- * winsup.h (window_terminate): Eliminate declaration.
- * spawn.cc (spawn_guts): Call cygthread::terminate early in process if
- execing. Call DisableThreadLibrary calls if execing.
- * window.cc (Winmain): Call ExitThread to force exit.
- (window_terminate): Eliminate.
-
- * dcrt0.cc (do_exit): Track exit state more closely.
-
-2002-10-10 Christopher Faylor <cgf@redhat.com>
-
- * window.cc (gethwnd): Use SetThreadPriority method.
-
-2002-10-10 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (new-cygwin1.dll): Reorganize library order.
-
- * dcrt0.cc (do_exit): Move thread stuff after vfork stuff or threads
- are terminated during vfork.
- * sigproc.cc (proc_terminate): Grab proc lock prior to signalling
- subproc thread exit to avoid an extra "wait-for-thread-to-exit".
-
-2002-10-09 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (cygthread::stub): Don't create an event for "cygself"
- threads. Assume that they exit via an ExitThread call.
- * cygthread.h (cygthread::SetThreadPriority): New function.
- (cygthread::zap_h): New function.
- * dcrt0.cc (do_exit): Move cygthread::terminate earlier and establish
- exit_state guard.
- * fhandler.h (fhandler_tty_master::output_thread): Delete.
- * fhandler_tty.cc (fhandler_tty_master::init): Set priority for threads
- via method. Zap handles when done. Don't treat process_output
- specially.
- (process_output): Call ExitThread directly.
- (fhandler_tty_master::fixup_after_fork): Don't worry about
- output_thread.
- (fhandler_tty_master::fixup_after_exec): Ditto.
- * sigproc.cc (proc_terminate): Don't detach from hwait_subproc. Just
- let it exit.
- (sigproc_init): Close thread handle after initialization.
- (wait_sig): Use GetCurrentThread() as SetThreadPriority call rather
- than *event* handle. Call ExitThread directly on termination.
- (wait_subproc): Call ExitThread directly on termination.
- * tty.cc (tty_list::terminate): Don't attempt to detach from
- output_thread.
-
-2002-10-08 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.cc (dup_now): Make fatal error a little more informative.
- (cygheap_setup_for_child): Detect when default size of shared region is
- less than the current size and allocate that much.
- (_cbrk): Just return NULL on inability to allocate.
- (_cmalloc): Ditto.
- * cygheap.h (CYGHEAPSIZE): Change size to reflect newer, tinier
- fhandler sizes.
- * spawn.cc (av::error): New element, reflects potential errno from cmalloc.
- (av::~av): Don't free NULL pointers.
- (av::replace0_maybe): Detect out-of-memory conditions.
- (av::dup_maybe): Ditto.
- (av::dup_all): Ditto.
- (av::unshift): Ditto.
- (spawn_guts): Set errno and return if argv creation ran into problems.
-
- * fhandler.h (fhandler_union): Change member names to something safer.
-
- * fhandler_console.cc (fhandler_console::get_tty_stuff): Always set
- fhandler_console::dev_state regardless of whether shared region is
- initialized.
-
- * cygthread.cc (cygthread::runner): Use ExitThread rather than return
- (planning for future).
-
-2002-10-08 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.h (dev_console): New class.
- (fhandler_console::dev_state): New class element.
- (fhandler_console::mouse_aware): Use dev_state element.
- (fhandler_console::get_tty_stuff): Declare new function.
- * fhandler_console.cc: Use dev_state fhandler_console element,
- throughout.
- (fhandler_console::get_tty_stuff): Move to fhandler_console class.
- Incorporate dev_console information. Move constructor stuff here.
-
-2002-10-07 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (dtable::init_std_file_from_handle): Try to mimic standard
- open behavior with files redirected from stdin/stdout/stderr, i.e.,
- fmode settings take precedence over mount settings.
-
-2002-10-07 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (unknown_file): New variable.
- (dtable::init_std_file_from_handle): Don't set binmode if we couldn't
- determine the actual file name on stdin/stdout/stderr.
- (handle_to_fn): Return unknown_file when can't determine filename.
-
-2002-10-07 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (do_exit): Call DisableThreadLibraryCalls since we don't
- need to track thread detaches.
- * init.cc (dll_entry): Reorganize slightly. Fix api_fatal message.
-
-2002-10-05 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (cygthread::stub): Very minor cleanup.
- (cygthread::stub): Report overflows in cygwin thread pool when
- DEBUGGING is on and special environment variable is not set.
- (cygthread::terminate): Set event only when event actually exists.
- * exceptions.cc (signal_exit): Set priority of main thread to low
- before setting current thread to high.
-
-2002-10-01 Robert Collins <rbtcollins@hotmail.com>
-
- * thread.cc (pthread_key::keys): Copy on fork. Add a comment explaining
- why.
- (pthreadNull::_instance): Copy on fork. Absolutely no state exists
- in pthreadNull.
-
-2002-09-30 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver_transport_pipes.cc (transport_layer_pipes::accept):
- Remove trailing \n from debug_printf.
-
-2002-09-30 Christopher Faylor <cgf@redhat.com>
-
- * thread.cc (pthread_mutex::initMutex): Remove \n from api_fatal.
-
-2002-09-30 Christopher Faylor <cgf@redhat.com>
-
- * thread.cc (pthread::precreate): Use explicit "no inherit" option when
- creating mutex.
- (pthread_mutex::nativeMutex::init): Ditto.
-
-2002-09-30 Christopher Faylor <cgf@redhat.com>
-
- * thread.cc (pthread_key::keys): Do not copy on fork.
- (pthread_mutex::mutexInitializationLock): Ditto.
- (pthreadNull::_instance): Ditto.
-
-2002-09-30 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (unused_sig_wrapper): Still need additional level of
- indirection when setting errno.
-
-2002-09-30 Robert Collins <rbtcollins@hotmail.com>
-
- * thread.cc (pthread_mutex::initMutex): Use the wrapper init call.
- (pthread_mutex::nativeMutex::init): Implement.
- (pthread_mutex::nativeMutex::lock): Ditto.
- (pthread_mutex::nativeMutex::unlock): Ditto.
- (pthread_mutex::init): Use the wrapper lock and unlockcalls.
- * thread.h (pthread_mutex): Move mutexInitializationLock into a
- nativeMutex wrapper class.
-
-2002-09-30 Christopher Faylor <cgf@redhat.com>
-
- Remove \n from calls to strace class printfs throughout.
-
-2002-09-30 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (unused_sig_wrapper): Accommodate newer compilers.
-
-2002-09-29 Christopher Faylor <cgf@redhat.com>
-
- * security.cc (allow_ntsec): Default to zero.
- * environ.cc (environ_init): Set allow_ntsec to TRUE by default,
- assuming OS allows it.
-
-2002-09-29 Christopher Faylor <cgf@redhat.com>
-
- * environ.cc (environ_init): Avoid a compiler warning.
- * path.cc (path_conv::check): Ditto.
- * path.h (path_conv::operator int): Ditto.
- * regex/engine.c: Ditto throughout.
- * regex/regcomp.c: Ditto throughout.
- * regex/regexec.c: Ditto throughout.
-
-2002-09-29 Christopher Faylor <cgf@redhat.com>
-
- * thread.cc: Use "%E" in *_printf throughout rather than calling
- GetLastError. GNUify comments.
- (__pthread_mutex_lock): Don't return error on EBUSY since that just
- means that the mutex has already been initialized.
-
-2002-09-30 Robert Collins <rbtcollins@hotmail.com>
-
- * pthread.cc (pthread_mutex_init): Use new pthread_mutex::init.
- * thread.cc: Change __pthread_mutex_init to pthread_mutex::init
- throughout.
- (MTinterface::Init): Initialise pthread_mutex support.
- (pthread_mutex::mutexInitializationLock): Instantiate.
- (pthread_mutex::initMutex): New method.
- (__pthread_cond_dowait): Don't dereference untrusted pointers.
- Use the new pthread_mutex::init method.
- (__pthread_condattr_init): Don't dereference untrusted pointers.
- (__pthread_mutex_init): Rename to pthread_mutex::init.
- Lock and release mutexInitializationLock to prevent races on
- mutex initialisation.
- * thread.h (pthread_mutex::initMutex): New method, initialise
- pthread_mutex supporting state on process initialisation.
- (pthread_mutex::init): Initialise a single mutex.
- (pthread_mutex::mutexInitializationLock): A win32 mutex for
- syncronising pthread mutex initialisation.
- (__pthread_mutex_init): Remove this.
-
-2002-09-28 Christopher Faylor <cgf@redhat.com>
-
- * thread.h (verifyable_object:~verifyable_object): Make virtual.
-
-2002-09-28 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.h (cygthread::terminate): Declare new function.
- (cygthread::initialized): Change to 'int'.
- * cygthread.cc (cygthread::stub): Exit thread if initialized < 0.
- (cygthread::new): Ditto.
- (cygthread::runner): Ditto. Set initialized using xor to preserve
- sign.
- (cygthread::terminate): New function.
- * dcrt0.cc (do_exit): Call cygthread::terminate.
-
-2002-09-27 Robert Collins <rbtcollins@hotmail.com>
-
- * thread.cc (pthread_key::run_destructor): Run_destructor is not
- const as it needs to set the key value.
- * thread.h (pthread_key::run_destructor): Ditto.
-
-2002-09-27 Robert Collins <rbtcollins@hotmail.com>
-
- * thread.cc (pthread_key::run_destructor): Follow opengroup algorithm.
- I.e. only run the destructor NON-NULL key values, and reset the key
- to NULL before running the destructor. Reported by Thomas Pfaff.
-
-2002-09-25 Christopher Faylor <cgf@redhat.com>
-
- * cygrun.c (main): Fix setting of CYGWIN environment variable.
-
- * Makefile.in: Remove linking of unnecessary libraries.
-
-2002-09-24 Christopher January <chris@atomice.net>
-
- * fhandler_proc.cc (format_process_stat): make ctty a real device
- number.
- (format_process_status): use effective uid/gid as real and saved
- uid/gid.
-
-2002-09-24 Corinna Vinschen <corinna@vinschen.de>
-
- * errno.cc (errmap): Map ERROR_INVALID_ADDRESS to new errno code
- EOVERFLOW.
- (_sys_errlist): Add entries for EILSEQ and EOVERFLOW.
- (strerror): Ditto.
- * mmap.cc (map_map): Set errno in case of error.
- (mmap64): Remove setting errno explicitely to ENOMEM.
-
-2002-09-24 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (map_map): Add debug output.
- (mmap64): Evaluate gran_len correctly even if offset isn't 0.
-
-2002-09-22 Christopher Faylor <cgf@redhat.com>
-
- More GNUify non-GNU formatted functions calls throughout.
-
-2002-09-22 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (DLL_O_FILES): Restore formatting.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- GNUify non-GNU formatted functions calls throughout.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver_shm.cc (with_strerr): Remove macro.
- (server_shmmgr::segment_t::~segment_t): Remove calls to with_strerr.
- (server_shmmgr::segment_t::attach): Ditto.
- (server_shmmgr::new_segment): Ditto.
- * shm.cc (with_strerr): Remove macro.
- (client_shmmgr::shmdt): Remove calls to with_strerr.
- (client_shmmgr::attach): Ditto.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * include/sys/ipc.h: Move to "include/cygwin/ipc.h".
- * include/sys/msg.h: Move to "include/cygwin/msg.h".
- * include/sys/sem.h: Move to "include/cygwin/sem.h".
- * include/sys/shm.h: Move to "include/cygwin/shm.h".
- * include/cygwin/ipc.h: New file.
- * include/cygwin/msg.h: Ditto.
- * include/cygwin/sem.h: Ditto.
- * include/cygwin/shm.h: Ditto.
- * cygserver_shm.h: Update includes.
- * msg.cc: Ditto.
- * sem.cc: Ditto.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * safe_memory.h (safe_delete): Make a templated function.
- * cygserver.cc (~server_request): Update use of safe_delete.
- (main): Ditto.
- * cygserver_client.cc (client_request::handle_request): Ditto.
- (client_request::make_request): Ditto.
- * cygserver_process.cc (~process_cleanup): Ditto.
- (process::remove): Ditto.
- (process::cleanup): Ditto.
- (process_cache::process): Ditto.
- * cygserver_shm.cc (server_shmmgr::segment_t::detach): Ditto.
- (server_shmmgr::delete_segment): Ditto.
- * shm.cc (client_shmmgr::shmdt): Ditto.
- * threaded_queue.cc (~threaded_queue): Ditto.
- (threaded_queue::worker_loop): Ditto.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * safe_memory.h: Replace #include <new> with an explicit
- definition of the placement new operator.
- (safe_delete): Remove unnecessary ## operator.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver_shm.cc (class server_shmmgr): Remove `cleanup_t'
- friend declaration.
- (cleanup_t::cleanup_t): Use the segment's shmid as the key rather
- than the segment pointer itself.
- (cleanup_t::segptr): Remove method.
- (cleanup_t::shmid): New method.
- (cleanup_t::cleanup): Update for new key value.
- (server_shmmgr::find (segment_t *)): Remove method.
- * include/cygwin/cygserver_process.h (cleanup_routine::key): Make
- method const.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * include/cygwin/cygserver_process.h
- (cleanup_routine::_key): New field.
- (cleanup_routine::cleanup_routine): Initialise new field with new
- argument.
- (cleanup_routine::operator==): New method.
- (cleanup_routine::key): New method.
- (cleanup_routine::cleanup): Make argument non-const.
- (process::is_active): New method.
- (process::remove): Ditto.
- (process::check_exit_code): Rename method.
- * cygserver_process.cc (process::add): Reorganize code.
- (process::remove): New method.
- (process::check_exit_code): Rename method.
- (process::cleanup): Use new `process::is_active' method.
- (process_cache::process): Ditto.
- (process_cache::sync_wait_array): Ditto.
- (process_cache::check_and_remove_process): Ditto.
- * cygserver_shm.cc (server_shmmgr): Make `cleanup_t' a friend.
- (segment_t::detach): Make argument non-const. Remove cleanup
- object from client if appropriate.
- (cleanup_t::_segptr): Remove field.
- (cleanup_t::cleanup_t): Initialise parent explicitly. Remove
- field.
- (cleanup_t::segptr): New method.
- (cleanup_t::cleanup): Add error checking and reporting.
- (server_shmmgr::shmdt): Make argument non-const.
- (server_shmmgr::find (segment_t *)): New method.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver.cc (client_request_shutdown::client_request_shutdown):
- Comment out verbose tracing statement.
- * cygserver_client.cc
- (client_request_get_version::client_request_get_version): Ditto.
- (client_request_attach_tty::client_request_attach_tty): Ditto.
- * cygserver_shm.cc (client_request_shm::client_request_shm):
- Ditto.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver_transport_pipes.cc (transport_layer_pipes::listen):
- Set `_is_listening_endpoint' appropriately.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * include/cygwin/cygserver_transport.h
- (transport_layer_base::listen): Change return type.
- (transport_layer_base::connect): Ditto.
- * include/cygwin/cygserver_transport_pipes.h
- (transport_layer_pipes::listen): Change return type.
- (transport_layer_pipes::connect): Ditto.
- (transport_layer_pipes::_sec_none_nih): Remove unused field.
- (transport_layer_pipes::_is_listening_endpoint): New field.
- * cygserver_transport_pipes.cc: Synchronize with sockets code.
- (transport_layer_pipes::transport_layer_pipes): Initialise new
- field. Separate out asserts.
- (transport_layer_pipes::listen): Change return type. Add asserts.
- (transport_layer_pipes::accept): Add asserts.
- (transport_layer_pipes::read): Change conditional to an assert.
- Add assert.
- (transport_layer_pipes::write): Ditto.
- (transport_layer_pipes::connect): Change return type. Change
- conditional to an assert. Add asserts. Rationalize error code
- slightly.
- (transport_layer_pipes::impersonate_client): Add asserts.
- * include/cygwin/cygserver_transport_sockets.h
- (transport_layer_sockets::listen): Change return type.
- (transport_layer_sockets::connect): Ditto.
- (transport_layer_sockets::_addr): Change type of field.
- (transport_layer_sockets::_addr_len): Ditto.
- (transport_layer_sockets::_is_accepted_endpoint): New field.
- (transport_layer_sockets::_is_listening_endpoint): Ditto.
- * cygserver_transport_sockets.cc
- (MAX_CONNECT_RETRY): New constant.
- (transport_layer_sockets::transport_layer_sockets): Initialise new
- fields. Only initialise the socket address where necessary.
- (transport_layer_sockets::listen): Change return type. Rewrite.
- (transport_layer_sockets::accept): Add asserts. Add tracing
- statements. Use a local variable to hold the accepted address.
- (transport_layer_sockets::close): Add tracing statements. Unlink
- the UNIX domain socket file as appropriate. Close the socket
- cleanly.
- (transport_layer_sockets::read): Rewrite method.
- (transport_layer_sockets::write): Ditto.
- (transport_layer_sockets::connect): Change return type. Rewrite.
- * cygserver.cc (server_submission_loop::request_loop): Run the
- listening thread at high priority with special handling for
- shutdown.
- (main): Print the request error code rather than errno in shutdown
- request code. Install signal handlers with sigaction(2) to avoid
- setting SA_RESTART. Check value of the listen method call, now it
- has one.
- * cygserver_client.cc (client_request::make_request): Check new
- return value on connect method call.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * include/cygwin/cygserver_transport_pipes.h
- (cygserver_transport_pipes::_sd): Rename field.
- (cygserver_transport_pipes::_sec_none_nih): Ditto.
- (cygserver_transport_pipes::_sec_all_nih): Ditto.
- (cygserver_transport_pipes::_pipe_name): Ditto.
- (cygserver_transport_pipes::_hPipe): Ditto.
- (cygserver_transport_pipes::_is_accepted_endpoint): Ditto.
- * cygserver_transport_pipes.cc
- (transport_layer_pipes::transport_layer_pipes): Rename fields.
- (transport_layer_pipes::init_security): Ditto.
- (transport_layer_pipes::listen): Ditto.
- (transport_layer_pipes::accept): Ditto.
- (transport_layer_pipes::close): Ditto.
- (transport_layer_pipes::read): Ditto.
- (transport_layer_pipes::write): Ditto.
- (transport_layer_pipes::connect): Ditto.
- (transport_layer_pipes::impersonate_client): Ditto.
- (transport_layer_pipes::revert_to_self): Ditto.
- * include/cygwin/cygserver_transport_sockets.h
- (cygserver_transport_sockets::_fd): Rename field.
- (cygserver_transport_sockets::_addr): Ditto.
- (cygserver_transport_sockets::_addr_len): Ditto.
- * cygserver_transport_sockets.cc
- (transport_layer_sockets::transport_layer_sockets): Rename fields.
- (transport_layer_sockets::listen): Ditto.
- (transport_layer_sockets::accept): Ditto.
- (transport_layer_sockets::close): Ditto.
- (transport_layer_sockets::read): Ditto.
- (transport_layer_sockets::write): Ditto.
- (transport_layer_sockets::connect): Ditto.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver_shm.cc (with_strerr): Fix use of %p format.
- * shm.cc (client_shmmgr::shmat): Ditto.
- (client_shmmgr::shmctl): Ditto.
- (client_shmmgr::shmdt): Ditto.
- (client_shmmgr::attach): Ditto.
-
-2002-09-22 Christopher Faylor <cgf@redhat.com>
-
- * woutsup.h (system_printf): Remove extraneous semicolon from macro
- definition.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver_transport_pipes.cc
- (transport_layer_pipes::connect): Use ProtectHandle in DLL code.
- (transport_layer_pipes::close): Use ForceCloseHandle in DLL code.
-
-2002-09-22 Nicholas Wourms <nwourms@netscape.com>
-
- * threaded_queue.h (class queue_submission_loop): Correct friend
- declaration for GCC 3.1.1.
- * include/cygwin/cygserver_process.h (class process): Ditto.
- (class process_cache): Ditto.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver_shm.cc (server_shmmgr::shmdt): Only call
- delete_segment if the segment exists [sic].
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * safe_memory.h: Include <new> rather than <new.h> for gcc 3.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * safe_memory.h: New file extracted from "woutsup.h".
- * woutsup.h: Move the "safe" new/delete macros into the new
- "safe_memory.h" header file and include that here.
- * cygserver_client.cc: Explicitly include "safe_memory.h" for
- client-side code.
- (client_request::make_request): Use the "safe" new/delete macros
- unconditionally, i.e. use them on the client side as well as on
- the server side.
- * cygserver_transport.cc: Explicitly include "safe_memory.h" for
- client-side code.
- (create_server_transport): Use the "safe" new/delete macros
- unconditionally, i.e. use them on the client side as well as on
- the server side.
- * shm.cc: Include "safe_memory.h".
- (client_shmmgr::instance): Use the "safe" new/delete macros.
- (client_shmmgr::shmdt): Ditto.
- (client_shmmgr::new_segment): Ditto.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver_process (process::process): Add the client's cygpid
- and winpid to all tracing statements as appropriate.
- (process::exit_code): Ditto.
- (process_cache::check_and_remove_process): Ditto.
- * cygserver_shm.cc (server_shmmgr::shmat): Ditto.
- (server_shmmgr::shmdt): Ditto.
- (server_shmmgr::shmctl): Add a process object argument and remove
- the explicit cygpid argument. Add the client's cygpid and winpid
- to all tracing statements as appropriate.
- (server_shmmgr::shmget): Ditto.
- (client_request_shm::serve): Update for the new signature of the
- shmctl and shmget methods.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver.cc (client_request_shutdown::serve): Don't set the
- shutdown flag directly, but send a SIGINT, as the signal handler
- sets the flag and the signal breaks the pause(2) in the main loop.
- (print_usage): Add new options.
- (main): Add new --cleanup-threads and --request-threads options to
- set the number of threads used by the daemon. Use pause(2) rather
- the win32 Sleep in the main loop.
- * shm.cc (shmat): Add sigframe.
- (shmctl): Ditto.
- (shmdt): Ditto.
- (shmget): Ditto.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver_shm.cc: Automatically detach processes from any
- segments they are attached to at exit.
- (class server_shmmgr::attach_t): New class.
- (server_shmmgr::segment_t::IS_DELETED): Rename and make private.
- (server_shmmgr::segment_t::_sequence): Make private.
- (server_shmmgr::segment_t::_flg): Ditto.
- (server_shmmgr::segment_t::_hFileMap): Ditto.
- (server_shmmgr::segment_t::_attach_head): New private field.
- (server_shmmgr::segment_t::segment_t): Initialise new fields.
- Make non-inline.
- (server_shmmgr::segment_t::~segment_t): New method.
- (server_shmmgr::segment_t::is_deleted): Ditto.
- (server_shmmgr::segment_t::is_pending_delete): Ditto.
- (server_shmmgr::segment_t::mark_deleted): Ditto.
- (server_shmmgr::segment_t::attach): Ditto.
- (server_shmmgr::segment_t::detach): Ditto.
- (server_shmmgr::segment_t::find): Ditto.
- (class server_shmmgr::cleanup_t): New class.
- (server_shmmgr::_shm_atts): New private field.
- (server_shmmgr::shmat): Add a process object argument to replace
- the removed process_cache, cygpid and winpid arguments. Remove
- the process_cache manipulations. Move body of code to the
- segment_t::attach method. Increment _shm_atts when required.
- Update tracing statements.
- (server_shmmgr::shmdt): Add a process object argument to replace
- the removed cygpid argument. Move body of code to the
- segment_t::detach method. Decrement _shm_atts when required.
- Update tracing statements.
- (server_shmmgr::shmget): Use the new segment_t::is_deleted method.
- (server_shmmgr::server_shmmgr): Initialise the new _shm_atts
- field.
- (server_shmmgr::delete_segment): Remove the CloseHandle code, as
- this is now done in the segment_t destructor.
- (client_request_shm::serve): Look up the client's process object
- and pass to the server_shmmgr::shmat and server_shmmgr::shmdt
- methods rather than passing the cache, winpid and cygpid.
- * cygserver_process.h: Add a cygpid to the process object to make
- it more useful and then pass process objects rather than winpids
- where possible.
- (cleanup_routine::cleanup): Change argument to be a pointer to a
- process object.
- (class process): Re-order fields for no discernible reason.
- (process::_cygpid): New field.
- (process::process): Add a cygpid argument.
- (process::winpid): New method.
- (process::cygpid): Ditto.
- (process::add): Make public, as it always should have been.
- (process_cache::process): Add a cygpid argument.
- * cygserver_process.cc (process::process): Add a cygpid argument
- and use it to initialise the `_cygpid' field. Re-order
- initialisers to match new field order.
- (process::cleanup): Pass `this' rather than just the winpid to
- cleanup_routine::cleanup.
- (process_cache::process): Add a cygpid argument and pass it to the
- process object constructor.
- * include/sys/shm.h (shmatt_t): Make unsigned as per SUSv3.
- (shm_info::shm_atts): New field.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver_shm.cc (class server_shmmgr::segment_t): Add `_'
- prefix to the names of all fields.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * msg.cc: New file of stub functions, no functionality.
- * sem.cc: Ditto.
- * shm.cc (client_shmmgr::shmctl): Add support for an out shm_info
- buffer for the SHM_INFO command.
- (client_shmmgr::shmget): Use %X to print keys.
- * include/sys/ipc.h: Comment all fields and values.
- (IPC_PRIVATE): Change to be non-negative.
- * include/sys/msg.h: New file with SUSv3 and ipcs(8) interfaces.
- * include/sys/sem.h: Ditto.
- * include/sys/shm.h: Comment all fields and values.
- (struct shm_info): New struct.
- * cygserver_shm.h (client_request_shm::shminfo): Rename.
- (client_request_shm::shm_info): New method.
- (client_request_shm::_parameters.out.hFileMap): Move into union.
- (client_request_shm::_parameters.out.shminfo): Rename.
- (client_request_shm::_parameters.out.shm_info): New field.
- * cygserver_shm.cc (server_shmmgr::_shm_ids): Rename.
- (server_shmmgr::_shm_tot): New field.
- (server_shmmgr::shmctl): Rename `out_shminfo' argument. Add
- `out_shm_info' argument. Fill in the `out_shm_info' argument in
- the SHM_INFO command.
- (server_shmmgr::shmget): Check `shmflg' against the mode of
- existing segments as per Stevens 1990, p. 123.
- (server_shmmgr::server_shmmgr): Initialise the new `_shm_tot'
- field.
- (server_shmmgr::new_segment): Set ENOMEM if CreateFileMapping
- fails. Pass `size' to new_segment.
- (server_shmmgr::new_segment): Add size argument and use it to
- check against and update the new `_shm_tot' field.
- (server_shmmgr::delete_segment): Update the new `_shm_tot' field.
- * Makefile.in (DLL_OFILES): Add new DLL object files.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver_transport_pipes.cc: The main change is to make the
- client try harder to connect to the server if it's previously
- connected, and so has good grounds for believing that the server
- is running.
- (MAX_WAIT_NAMED_PIPE_RETRY): Change to be an enumerator.
- (WAIT_NAMED_PIPE_TIMEOUT): Ditto.
- (transport_layer_pipes::accept): Use interlocked operators on
- `pipe_instance'.
- (transport_layer_pipes::close): Rearrange so that FlushFileBuffers
- and DisconnectNamedPipe are only called for accepted endpoints.
- Use interlocked operators on `pipe_instance'.
- (transport_layer_pipes::read): Use set_errno where required.
- (transport_layer_pipes::write): Ditto.
- (transport_layer_pipes::connect): Add local static variable
- `assume_cygserver'. Set it if a connection is made to cygserver,
- clear it if a connection is not made even after retrying. If set,
- ignore all errors from CreateFile and retry the connection. Catch
- the situation where WaitNamedPipe fails to wait [sic] and add a
- `Sleep (0)' so that the server gets a chance to run.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * dcrt0.cc: Only check for cygserver if and when required.
- (dll_crt0_1): Remove call to `cygserver_init ()'.
- * fhandler_tty.cc (fhandler_tty_slave::open): Change the cygserver
- logic to allow for the fact that `cygserver_init ()' may not yet
- have been called.
- (fhandler_tty_slave::cygserver_attach_tty): Tweak the cygserver
- request logic to conform to the practice elsewhere in the code.
- * tty.cc (tty::common_init): Add an explicit call to
- `cygserver_init ()' if it hasn't already been called.
- * include/cygwin/cygserver.h (CYGSERVER_UNAVAIL): Rename from
- `CYGSERVER_DEAD'.
- (client_request_get_version::check_version): Make available in
- cygserver as well the DLL.
- (check_cygserver_available): Ditto. Remove `check_version_too'
- argument.
- (cygserver_init): Ditto. And likewise.
- * cygserver_client.cc (client_request_get_version::check_version):
- Make available in cygserver as well the DLL.
- (client_request::make_request): This may now be called without
- `cygserver_init ()' having been called first. Detect this and
- call it as required. Add tracing.
- (check_cygserver_available): Make available in cygserver as well
- the DLL. Remove `check_version_too' argument and always check the
- version information. And since this is called from within
- `cygserver_init ()', force `cygserver_running' before calling
- `client_request::make_request ()'.
- (cygserver_init): Make available in cygserver as well the DLL.
- Remove `check_version_too' argument.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver_shm.cc: Implement the ipcs(8) interfaces, IPC_INFO,
- SHM_STAT and SHM_INFO.
- (server_shmmgr::segment_t::sequence): New static field.
- (server_shmmgr::segment_t::key): Remove field, use the new
- ds.shm_perm.key field instead.
- (server_shmmgr::segment_t::shmid): Remove field.
- (server_shmmgr::segment_t::intid): New field.
- (server_shmmgr::segment_t::segment_t): Use the `key' argument to
- initialise `ds.shm_perm.key'. Change from using `shmid' to
- `intid'.
- (server_shmmgr::_shmseg_cnt): Renamed from `_shmid_cnt'.
- (server_shmmgr::_intid_max): Renamed from `_shmid_max.
- (server_shmmgr::shmat): Move the out arguments to the start of the
- argument list. Rename the `pid' argument as `cygpid'. Add
- tracing. Pass an intid to `find ()', not a shmid.
- (server_shmmgr::shmctl): Add separate out arguments. Rename the
- `pid' argument as `cygpid'. Add support for the ipcs(8)
- interfaces. Add tracing. Pass an intid to `find ()', not a
- shmid.
- (server_shmmgr::shmdt): Rename the `pid' argument as `cygpid'.
- Add tracing. Pass an intid to `find ()', not a shmid.
- (server_shmmgr::shmget): Add a separate out arguments. Rename the
- `pid' argument as `cygpid'. Add tracing.
- (server_shmmgr::server_shmmgr): Update for new field names.
- (server_shmmgr::find_by_key): Update for the new `ds.shm_perm.key'
- field.
- (server_shmmgr::find): Update to use the new `segment_t::intid'
- field.
- (server_shmmgr::new_segment): Rename the `pid' argument as
- `cygpid'. Check that the requested size is within bounds. Handle
- new error result from `new_segment (key, HANDLE)'.
- (server_shmmgr::new_segment): Work with intids, not shmids. Check
- that the new intid is within bounds. Update for new field names.
- (server_shmmgr::delete_segment): Pass an intid to `find ()', not a
- shmid. Update for new field names.
- (client_request_shm::serve): Check that the incoming message
- length is the size of the `_parameters.in' struct, not of the
- whole in/out parameter union. Likewise, set the outgoing message
- length to the size of the `_parameters.out' struct. Update for
- the new server_shmmgr interfaces.
- * include/sys/ipc.h (ipc_perm::key): New field.
- * include/sys/shm.h (SHM_INFO): New constant.
- * cygserver_ipc.h (IPCMNI): New constant.
- (ipc_int2ext): Add `sequence' argument and munge this into the
- external ipc id.
- (ipc_ext2int_subsys): Unmunge the sequence number from the
- external ipc id.
- (ipc_ext2int): Ditto.
- (ipc_inc_id): Remove.
- (ipc_dec_id): Remove.
- * cygserver_shm.h (SHMMAX): New constant.
- (SHMMIN): Ditto.
- (SHMMNI): Ditto.
- (SHMSEG): Ditto.
- (SHMALL): Ditto.
- (client_request_shm::_parameters): Re-arrange as a union of two
- separate structs, one for in arguments, the other for out.
- (client_request_shm::shmid): Update for the new parameter layout.
- (client_request_shm::ds): Ditto.
- (client_request_shm::info): New method.
- * shm.cc (client_shmmgr::_shmat_cnt): New static field.
- (client_shmmgr::shmat): Add locking. Add tracing.
- (client_shmmgr::shmctl): Update for ipcs(8) commands. Add
- tracing. Add more argument checking.
- (client_shmmgr::shmdt): Add locking. Add tracing. Update the new
- `_shmat_cnt' field.
- (client_shmmgr::shmget): Add tracing.
- (client_shmmgr::fixup_shms_after_fork): Add tracing. Add
- consistency checking.
- (client_shmmgr::attach): Add more tracing.
- (client_shmmgr::new_segment): Update the new `_shmat_cnt' field.
- (client_request_shm::client_request_shm): Update for the new
- parameter layout. Set the outgoing message length to the size of
- the `_parameters.in' struct, not of the whole in/out parameter
- union.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * shm.cc: Remove the use of a static client_shmmgr object.
- (client_shmmgr::_instance): New static variable.
- (client_shmmgr::instance): Allocate a new shmmgr on the heap,
- rather than using a local static object.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver_transport.cc (create_server_transport): Fix
- cut-and-paste error.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver_client.cc (client_request::handle_request): Don't
- bother with the client request activity marker when compiled with
- debugging output.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver_transport_pipes.cc
- (MAX_WAIT_NAMED_PIPE_RETRY): New constant.
- (WAIT_NAMED_PIPE_TIMEOUT): Ditto.
- (transport_layer_pipes::close): The `pipe' field is now either
- NULL or a valid handle, and it should never have the value
- `INVALID_HANDLE_VALUE'.
- (transport_layer_pipes::read): Ditto.
- (transport_layer_pipes::write): Ditto.
- (transport_layer_pipes::connect): Ditto.
- (transport_layer_pipes::impersonate_client): Ditto.
- (transport_layer_pipes::connect): Ditto. New, but still bogus,
- retry logic.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver_shm.cc (server_shmmgr::server_shmmgr): All fields have
- to be initialized now that the singleton is no longer static.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver_shm.cc (server_shmmgr::_instance): New static field.
- (server_shmmgr::_instance_once): Ditto.
- (server_shmmgr::initialise_instance): New static method.
- (server_shmmgr::instance): Use a pthread_once_t rather than
- relying on a local static variable.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * woutsup.h: Remove all uses of the C++ new and delete operators
- throughout cygserver until they are fully thread-safe.
- (safe_new0): New macro to replace the C++ new operator.
- (safe_new): Ditto.
- (safe_delete): New macro to replace the C++ delete operator.
- * cygserver_client.cc (client_request::handle_request): Replace
- all uses of the C++ new and delete operators with the new macros
- from "woutsup.h".
- (client_request::make_request): Ditto.
- * cygserver_process.cc (~process_cleanup): Ditto.
- (process::cleanup): Ditto.
- (process_cache::process): Ditto.
- (process_cache::check_and_remove_process): Ditto.
- * cygserver_shm.cc (server_shmmgr::new_segment): Ditto.
- (server_shmmgr::delete_segment): Ditto.
- * cygserver_transport.cc (create_server_transport): Ditto.
- * cygserver_transport_pipes.cc
- (transport_layer_pipes::accept): Ditto.
- * cygserver_transport_sockets.cc
- (transport_layer_sockets::accept): Ditto.
- * threaded_queue.cc (~threaded_queue): Ditto.
- (threaded_queue::worker_loop): Ditto.
- (threaded_queue::stop): Replace sleep(3) with win32 Sleep.
- * cygserver.cc (~server_request): Replace all uses of the C++ new
- and delete operators with the new macros from "woutsup.h".
- (server_submission_loop::request_loop): Ditto.
- (main): Ditto. Replace sleep(3) with win32 Sleep. Replace
- iostreams with FILEs.
- (print_usage): Replace iostreams with FILEs.
- (print_version): Ditto.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver_transport_sockets.cc
- (transport_layer_sockets::accept): Rename local variable
- `accept_fd' to avoid shadowing the `fd' field.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygwin_ipc.h: Moved (back) to "include/sys/ipc.h".
- * cygwin_shm.h: Moved (back) to "include/sys/shm.h".
- * include/sys/ipc.h: New file.
- * include/sys/shm.h: New file.
- * cygserver_shm.h: Update for new header file locations.
- * ipc.cc: Ditto.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver_client.cc (client_request::make_request): Comment out
- a verbose tracing statement.
- * cygserver_process.cc (process_cache::sync_wait_array): Fix
- broken assert.
- * include/cygwin/cygserver.h (class client_request): Remove excess
- use of `class' qualifier in declarations.
- (class client_request_get_version): Ditto.
- (class client_request_shutdown): Ditto.
- (class client_request_attach_tty): Ditto.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver_ipc.h: New file.
- * cygserver_shm.h: Re-written from scratch.
- * cygserver_shm.cc: Ditto.
- * shm.cc: Ditto.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * threaded_queue.h (class queue_request): Re-write.
- (threaded_queue_thread_function): Remove.
- (class queue_process_param): Remove.
- (class threaded_queue): Re-write.
- (class queue_submission_loop): New version of the old
- `queue_process_param' class.
- (TInterlockedExchangePointer): New templated function.
- (TInterlockedCompareExchangePointer): Ditto.
- * threaded_queue.cc (worker_function): Remove.
- (class threaded_queue): Re-write.
- (class queue_process_param): Remove.
- (class queue_submission_loop): New version of the old
- `queue_process_param' class.
- * include/cygwin/cygserver_process.h (process_cleanup): Re-write.
- (class process_process_param): Remove.
- (class cleanup_routine): Re-write.
- (class process): Re-write.
- (class process_cache): Re-write.
- * cygserver_process.cc (process_cleanup): Re-write.
- (class process_process_param): Remove.
- (class cleanup_routine): Re-write.
- (class process): Re-write.
- (class process_cache): Re-write.
- * cygserver.cc (request_count): Remove unused variable.
- (class server_request): Move methods inline.
- (class server_process_param): Remove.
- (class server_request_queue): Remove.
- (request_queue): Move into `main ()' and change type to
- `threaded_queue'.
- (request_loop): Remove.
- (class server_submission_loop): New version of the old
- `server_process_param' class.
- (shutdown_server): New variable.
- (client_request_shutdown::serve): Set `shutdown_server' to trigger
- shutdown.
- (handle_signal): Ditto.
- (main): Install signal handler for SIGINT rather than SIGQUIT.
- Use new interfaces for the `request_queue' and the `cache'.
- Create a `server_submission_loop' and add to the `request_queue'.
- Add check for the `shutdown_server' variable to the main loop.
- * cygserver_shm.cc (client_request_shm::serve): Release the
- process object after use.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver_client.cc (client_request::handle_request): Correct
- tracing statement.
- * cygserver_transport_pipes.cc: Remove local definition of
- FILE_FLAG_FIRST_PIPE_INSTANCE constant.
- * cygwin_ipc.h: Update copyright notice.
- * cygwin_shm.h: Ditto.
- * woutsup.h: Add definition of _WIN32_WINNT.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver_client (client_request::make_request): Replace my
- inappropriate use of set_errno () with error_code () throughout.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * include/cygwin/cygserver.h: Add forward declarations of class
- transport_layer_base and class process_cache to reduce
- dependencies between header files.
- * include/cygwin/cygserver_process.h: Add include of
- "threaded_queue.h".
- * cygserver.cc: Remove unnecessary cygserver header files.
- * cygserver_client.cc: Ditto.
- * cygserver_process.cc: Ditto.
- * cygserver_shm.cc: Ditto.
- * cygserver_shm.h: Ditto.
- * cygserver_transport_pipes.cc: Ditto.
- * dcrt0.cc: Ditto.
- * fhandler_tty.cc: Ditto.
- * tty.cc: Ditto.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver_shm.h: Replace <sys/shm.h> with "cygwin_shm.h" after
- merge from HEAD.
- * cygwin_ipc.h: Update with changes to include/sys/ipc.h lost in
- merge from HEAD.
- * cygwin_shm.h: Ditto.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver.cc: The tests for a duplicate server instance are now
- the responsibility of the transport layer.
- (request_loop): Use new `recoverable' flag in call to
- `cygserver_transport::accept ()' and shutdown on an unrecoverable
- error.
- (main): Never call `cygserver_init ()'. Fake `cygserver_running'
- just for sending a shutdown request.
- * cygserver_client.cc (client_request::send): Comment out
- message-size tracing statements as verbose.
- (client_request::handle): Ditto.
- (client_request_get_version::check_version): #ifdef as DLL-only.
- (check_cygserver_available): Ditto.
- (cygserver_init): Ditto.
- * include/cygwin/cygserver.h
- (client_request_get_version::check_version): #ifdef as DLL-only.
- (check_cygserver_available): Ditto.
- (cygserver_init): Ditto.
- * include/cygwin/cygserver_transport.h
- (transport_layer_base::impersonate_client): #ifdef as
- cygserver-only.
- (transport_layer_base::revert_to_self): Ditto.
- (transport_layer_base::listen): Ditto.
- (transport_layer_base::accept): Ditto. Add a `recoverable' out
- flag for error handling.
- * include/cygwin/cygserver_transport_sockets.h: Ditto.
- * include/cygwin/cygserver_transport_pipes.h: Ditto.
- (transport_layer_pipes): Change type of the `pipe_name' field.
- Remove the `inited' field, as unnecessary. Add new
- `is_accepted_endpoint' field.
- * include/cygwin/cygserver_transport.cc
- (transport_layer_base::impersonate_client): #ifdef as
- cygserver-only.
- (transport_layer_base::revert_to_self): Ditto.
- * include/cygwin/cygserver_transport_sockets.cc
- (transport_layer_sockets::listen): #ifdef as cygserver-only.
- (transport_layer_sockets::accept): #ifdef as cygserver-only.
- Analyse any errno from `accept ()' and set `recoverable' as
- appropriate.
- * cygserver_transport_pipes.cc: Add local #define of
- `FILE_FLAG_FIRST_PIPE_INSTANCE'.
- (pipe_instance_lock_once): New variable.
- (pipe_instance_lock): Ditto.
- (pipe_instance): Ditto.
- (initialise_pipe_instance_lock): New function.
- (transport_layer_pipes::transport_layer_pipes): Change
- initialization of `pipe_name'. Initialize `is_accepted_endpoint'
- as appropriate. Remove use of `inited'.
- (transport_layer_pipes::impersonate_client): #ifdef as
- cygserver-only.
- (transport_layer_pipes::revert_to_self): Ditto.
- (transport_layer_pipes::listen): Ditto.
- (transport_layer_pipes::accept): Ditto. Keep track of how often
- many named pipes have been created, in the `pipe_instance'
- variable, and pass the `FILE_FLAG_FIRST_PIPE_INSTANCE' flag on the
- open of the first instance. Analyse the error code from
- `CreateNamedPipe ()' and set the `recoverable' flag as
- appropriate.
- (transport_layer_pipes::close): Update the `pipe_instance' count.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * woutsup.h (cygserver_running): Add declaration.
- (api_fatal): Eliminate.
- * include/cygwin/cygserver.h
- (client_request_get_version::check_version): Change return type to
- bool.
- (check_cygserver_available): New function.
- (cygserver_init): Add check_version_too argument.
- * cygserver_client.cc (allow_daemon): Make a bool.
- (client_request_get_version::make_request): See errno on error.
- Remove special case for CYGSERVER_REQUEST_GET_VERSION; this is now
- handled in cygserver_init().
- (client_request_get_version::check_version): Use syscall_printf()
- instead of api_fatal(). Return true if cygserver version is
- compatible.
- (check_cygserver_available): New function; code moved here from
- cygserver_init().
- (cygserver_init): Move some code into check_cygserver_available().
- * cygserver.cc (__set_errno): Copy from debug.cc so that
- set_errno() can be used when __OUTSIDE_CYGWIN__.
- (main): Call cygserver_init() to set up cygserver_running and add
- checks against this to (try and) prevent multiple copies of
- cygserver running simultaneously. Remember to delete all
- transport connections so that (one day) the transport classes can
- tidy up on cygserver shutdown.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver.cc (main): Adjust tracing output for a cleaner display
- when compiled without --enable-debugging.
- * threaded_queue.cc (threaded_queue::cleanup): Ditto.
- (queue_process_param::stop): Ditto.
- * include/cygwin/cygserver.h
- (client_request::make_request): Make non-virtual.
- (client_request::send): Make virtual and protected, not private.
- (client_request_attach_tty::send): New virtual method.
- * cygserver_client.cc: Use the `msglen()' accessor rather than
- `_header.msglen' throughout.
- (client_request_attach_tty::send): New method.
- (client_request::make_request): Remove the explicit close of
- `transport' as it is closed on deletion.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * include/cygwin/cygserver.h: Change the client_request classes to
- give greater encapsulation and to allow variable length requests
- and replies.
- (enum cygserver_request_code): Now client_request::request_code_t.
- (class request_header): Now client_request::header_t. Make a
- union of the request_code and the error_code. The `cb' field,
- which was the buffer length, is now the `size_t msglen' field.
- (struct request_get_version): Now
- client_request_get_version::request_get_version.
- (struct request_shutdown): Remove unused type.
- (struct request_attach_tty): Now
- client_request_attach_tty::request_attach_tty.
- (client_request::_buf): Make field const.
- (client_request::_buflen): New const private field.
- (client_request::request_code): New accessor.
- (client_request::error_code): Ditto.
- (client_request::msglen): Ditto.
- (client_request::handle_request): New static method.
- (client_request::make_request): New virtual method.
- (client_request::handle): New method.
- (client_request::send): Make private.
- (client_request_get_version::check_version): New method.
- (client_request_get_version::serve): Make private.
- (client_request_get_version::version): Ditto.
- (client_request_shutdown::serve): Ditto.
- (client_request_attach_tty::req): Ditto.
- (client_request_attach_tty::serve): Ditto.
- (client_request_attach_tty::from_master): Make method const.
- (client_request_attach_tty::from_master): Ditto.
- * cygserver_client.cc
- (client_request_get_version::client_request_get_version): Track
- changes to the client_request classes.
- (client_request_attach_tty::client_request_attach_tty): Ditto.
- (client_request_get_version::check_version): New method to
- encapsulate code from cygserver_init().
- (client_request_shutdown::client_request_shutdown): Move into
- "cygserver.cc".
- (client_request::send): Track changes to the client_request
- classes. Add more error checking.
- (client_request::handle_request): New static method containing the
- first half of the old server_request::process() code.
- (client_request::make_request): New method to replace the old
- cygserver_request() function.
- (client_request::handle): New method containing the second half of
- the old server_request::process() code.
- (cygserver_init): Track changes to the client_request classes. In
- particular, some code moved into the
- client_request_get_version::check_version() method.
- * cygserver.cc (client_request_attach_tty::serve): Track changes
- to the client_request classes. In particular, only return a reply
- body if some handles are successfully duplicated for the client.
- And remove goto's.
- (client_request_get_version::serve): Track changes to the
- client_request classes.
- (client_request_shutdown::serve): Ditto.
- (class client_request_invalid): Dead, and so young too.
- (server_request::request_buffer): Remove unnecessary field.
- (client_request_shutdown::client_request_shutdown): Moved here
- from "cygserver_client.cc".
- (server_request::process): Implementation moved into the new
- client_request::handle_request() and client_request::handle()
- methods.
- * cygserver_shm.h (class client_request_shm): Put client- and
- server-specific interfaces inside #ifdef/#ifndef __INSIDE_CYGWIN__
- guards.
- (client_request_shm::serve): Make private.
- * cygserver_shm.cc
- (client_request_shm::client_request_shm): Track changes to the
- client_request classes.
- (client_request_shm::serve): Ditto
- * shm.cc (client_request_shm::client_request_shm): Ditto. Use
- alloc_sd() rather than set_security_attribute() to get access to
- the SECURITY_DESCRIPTOR length, so that we can use it to set the
- request body length.
- (shmat): Track changes to the client_request classes. In
- particular, allocate client_request objects on the stack rather
- than on the heap, and use the client_request::make_request()
- method rather than the old cygserver_request() function.
- (shmdt): Ditto.
- (shmctl): Ditto.
- (shmget): Ditto.
- * fhandler_tty.cc (fhandler_tty_slave::cygserver_attach_tty): Ditto.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * include/cygwin/cygserver_transport.h
- (cygserver_transport::read): Change buffer type to void *.
- (cygserver_transport::write): Ditto.
- * include/cygwin/cygserver_transport_sockets.h
- (cygserver_transport_sockets::read): Ditto.
- (cygserver_transport_sockets::write): Ditto.
- * include/cygwin/cygserver_transport_pipes.h
- (cygserver_transport_pipes::read): Ditto.
- (cygserver_transport_pipes::write): Ditto.
- * cygserver_transport_sockets.cc
- (cygserver_transport_sockets::read): Ditto.
- (cygserver_transport_sockets::write): Ditto.
- * cygserver_transport_pipes.cc
- (cygserver_transport_pipes::read): Ditto. Set errno on error, to
- match behaviour of cygserver_transport_sockets class.
- (cygserver_transport_pipes::write): Ditto.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver.cc (version): New static variable.
- (server_request_queue::add_connection): Remove my gratuitous use
- of studly caps.
- (setup_privileges): Declare static.
- (handle_signal): Ditto.
- (longopts): Make a local variable of main().
- (opts): Ditto.
- (print_usage): New function.
- (print_version): Ditto (tip of the hat to Joshua Daniel Franklin
- for inspiration here).
- (main): More argument checking. Add --help and --version options.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * include/cygwin/cygserver.h (client_request::serve): Make pure
- virtual.
- * cygserver.cc (client_request::serve): Remove definition of pure
- virtual method.
- (class client_request_invalid): New class.
- (server_request::process): Use new client_request_invalid
- class. And remove goto's.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver.cc (class server_request): Add virtual destructor.
- (server_request_queue::addConnection): New method to replace bad
- virtual add() method.
- (request_loop): Replace call to queue->add() with call to
- queue->addConnection().
- (server_request::server_request): Use field initialization.
- (server_request::~server_request): New virtual destructor.
- (server_request::process): Remove close and delete of
- transport_layer_base object. It is deleted by the server_request's
- own destructor and closed by its own destructor.
- * include/cygwin/cygserver.h
- (client_request::operator request_header): Remove unused method.
- * cygserver_client.cc: Ditto.
- * include/cygwin/cygserver_process.h
- (class cleanup_routine): Add virtual destructor.
- (cleanup_routine::cleanup): Make pure virtual.
- (class process_cache): Make destructor non-virtual.
- (process_cache::add): Ditto.
- * cygserver_process.cc
- (cleanup_routine::~cleanup_routine): New virtual destructor.
- * include/cygwin/cygserver_transport.h
- (class transport_layer_base): Add virtual destructor.
- * cygserver_transport.cc
- (transport_layer_base::~transport_layer_base): New virtual
- destructor.
- * include/cygwin/cygserver_transport_pipes.h
- (class transport_layer_pipes): Add virtual destructor.
- * cygserver_transport_pipes.cc
- (transport_layer_pipes::~transport_layer_pipes): New virtual
- destructor.
- (transport_layer_pipes::close): Null out handle after closing.
- * include/cygwin/cygserver_transport_sockets.h
- (class transport_layer_sockets): Add virtual destructor.
- * cygserver_transport_sockets.cc
- (transport_layer_sockets::~transport_layer_sockets): New virtual
- destructor.
- (transport_layer_sockets::close): Null out fd after closing.
- * threaded_queue.h (class queue_request): Add virtual destructor.
- (queue_request::process): Make pure virtual.
- * threaded_queue.cc (~queue_request): New virtual destructor.
- (queue_request::process): Remove definition of pure virtual
- method.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * include/cygwin/cygserver.h (client_request::send): Make
- non-virtual.
- (class client_request_attach_tty): Put client- and server-specific
- interfaces inside #ifdef/#ifndef __INSIDE_CYGWIN__ guards.
- * cygserver_client.cc: Ditto.
- (cygserver_init): Fix error handling.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver.cc: Throughout the code, check and correct level of
- the XXX_printf() functions used. Comment out several of the
- debug_printf() calls with "// verbose:". Reformat and correct
- typos of some of the XXX_printf() formats.
- * cygserver_process.cc: Ditto.
- * cygserver_shm.cc: Ditto.
- * cygserver_transport_pipes.cc: Ditto.
- * cygserver_transport_sockets.cc: Ditto.
- * shm.cc (hi_ulong): New function to allow printing of a 64-bit
- key with current small_printf implementation.
- (lo_ulong): Ditto.
- (client_request_shm::client_request_shm): Use hi_ulong() and
- lo_ulong() in call to debug_printf().
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver_shm.cc: Remove #define __INSIDE_CYGWIN__ from around
- <sys/shm.h> as it no longer contains any internal code.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * include/sys/ipc.h (IPC_PRIVATE): Add cast to key_t.
- (IPC_INFO): New flag for ipcs(8).
- (IPC_RMID IPC_SET IPC_STAT): Renumber.
- * include/sys/shm.h (SHM_RDONLY SHM_RND): Renumber with distinct
- values [sic].
- (class _shmattach): Internal type moved to "cygserver_shm.h".
- (class shmnode): Ditto.
- (class shmid_ds): Ditto.
- (struct shmid_ds): Add spare fields.
- (struct shminfo): New type for IPC_INFO interface.
- * cygserver_shm.h: Remove obsolete #if 0 ... #endif block.
- (class shm_cleanup): Remove unused class.
- (struct _shmattach): Internal type moved from <sys/shm.h>.
- (struct shmnode): Ditto.
- (struct int_shmid_ds): Ditto. Renamed to avoid name clash with
- public interface struct shmid_ds. Use the shmid_bs structure as a
- field.
- * cygserver_shm.cc: Remove obsolete #if 0 ... #endif block.
- (client_request_shm::serve): Update for redefinition of
- int_shmid_ds structure.
- * shm.cc (build_inprocess_shmds): Ditto.
- (fixup_shms_after_fork): Ditto.
- (shmctl): Ditto.
- (shmget): Ditto. Remove obsolete #if 0 ... #endif code.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * include/cygwin/cygserver_transport.h
- (transport_layer_base::transport_layer_base): Remove since it is
- now redundant.
- (transport_layer_base::listen): Make a pure virtual method.
- (transport_layer_base::accept): Ditto.
- (transport_layer_base::close): Ditto.
- (transport_layer_base::read): Ditto.
- (transport_layer_base::write): Ditto.
- (transport_layer_base::connect): Ditto.
- * cygserver_transport.cc
- (transport_layer_base::transport_layer_base): Remove since it is
- now redundant.
- (transport_layer_base::listen): Remove since it is now a pure
- virtual method.
- (transport_layer_base::accept): Ditto.
- (transport_layer_base::close): Ditto.
- (transport_layer_base::read): Ditto.
- (transport_layer_base::write): Ditto.
- (transport_layer_base::connect): Ditto.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygserver.cc (check_and_dup_handle): Only use security code if
- running on NT, i.e. if wincap.has_security().
- (client_request_attach_tty::serve): Add check for has_security().
- * cygserver_process.cc (process_cache::process): Use DWORD winpid
- throughout to avoid win32 vs. cygwin pid confusion.
- (process::process): Ditto.
- * cygserver_shm.cc (client_request_shm::serve): Only use security
- code if running on NT, i.e. if wincap.has_security().
- * cygserver_shm.h (client_request_shm::parameters.in): Replace the
- ambiguous pid field with cygpid and winpid fields.
- (client_request_shm::client_request_shm): Reduce to only two
- client-side constructors: one for SHM_CREATE, another for all the
- other requests.
- * shm.cc (client_request_shm::client_request_shm):
- Ditto. Initialize cygpid and winpid fields here. On NT initialize
- sd_buf here using set_security_attribute() to make use of the euid
- and egid.
- (shmat): Use new client_request_shm constructor.
- (shmdt): Ditto.
- (shmctl): Ditto.
- (shmget): Ditto. Remove security code, now performed in the
- relevant client_request_shm constructor.
- * include/cygwin/cygserver_process.h: (class cleanup_routine):
- Change winpid type to DWORD.
- (class process): Ditto.
-
-2002-09-22 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * woutsup.h: New file.
- * cygserver.cc: Use "woutsup.h" and new XXX_printf macros.
- (getfunc): New function, copied verbatim from "strace.cc".
- (__cygserver__printf): New function.
- * cygserver_client.cc: Use "woutsup.h" and new XXX_printf macros.
- * cygserver_process.cc: Ditto.
- * cygserver_shm.cc: Ditto.
- * cygserver_transport.cc: Ditto.
- * cygserver_transport_pipes.cc: Ditto.
- * cygserver_transport_sockets.cc: Ditto.
- * threaded_queue.cc: Ditto.
- * shm.cc: Remove trailing \n from XXX_printf format strings.
- * Makefile.in: Remove special __OUTSIDE_CYGWIN__ case for
- cygserver_shm.cc.
-
-2002-09-21 Christopher Faylor <cgf@redhat.com>
-
- * init.cc (dll_entry): Temporarily disable thread detach code.
-
-2002-09-21 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.cc (fhandler_base::dup): Don't set handle on failure.
- Caller has already taken care of that.
- * fhandler_console.cc (fhandler_console::open): Initialize handles to
- NULL.
- (fhandler_console::close): Ditto.
-
-2002-09-21 Christopher Faylor <cgf@redhat.com>
-
- GNUify non-GNU formatted functions calls throughout.
-
-2002-09-21 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * cygwin_ipc.h: Move to "include/cygwin/ipc.h".
- * cygwin_shm.h: Move to "include/cygwin/shm.h".
- * include/cygwin/ipc.h: New file.
- * include/cygwin/shm.h: New file.
- * ipc.c:c Update <cygwin/ipc.h> include.
- * cygserver_shm.cc: Update <cygwin/shm.h> include.
- * shm.cc: Ditto.
-
-2002-09-21 Robert Collins <rbtcollins@hotmail.com>
-
- * pthread.cc: Use class::call for converted pthread and semaphore
- calls.
- * thread.cc: Convert various __pthread_call and __sem_call to
- pthread::call and sem::call throughout.
- * pthread.h (__pthread_cancel): Convert to pthread::cancel.
- (__pthread_join): Convert to pthread::join.
- (__pthread_detach): Convert to pthread::detach.
- (__pthread_create): Convert to pthread::create.
- (__pthread_once): Convert to pthread::once.
- (__pthread_atfork): Convert to pthread::atfork.
- (__pthread_suspend): Convert to pthread::suspend.
- (__pthread_continue): Convert to pthread::resume.
- (__sem_init): Convert to semaphore::init.
- (__sem_destroy): Convert to semaphore::destroy.
- (__sem_wait): Convert to semaphore::wait.
- (__sem_trywait): Convert to semaphore::trywait.
- (__sem_post): Convert to semaphore::post.
-
-2002-09-21 Robert Collins <rbtcollins@hotmail.com>
-
- * thread.cc: Finish the removal of the separate pthread_key
- destructor list.
- Remove all pthread_key_destructor and pthread_key_destructor_list
- references throughout.
- (pthread::exit): Call the new pthread_key interface to activate
- destructors.
- (pthread_key::keys): Change into a list.
- (pthread_key::saveAKey): New method, used via forEach.
- (pthread_key::restoreAKey): Ditto.
- (pthread_key::destroyAKey): Ditto.
- (pthread_key::fixup_before_fork): Use the List::forEach functionality.
- (pthread_key::fixup_after_fork): Ditto.
- (pthread_key::runAllDestructors): New method implementation.
- (pthread_key::pthread_key): Use List::Insert rather than custom list
- code.
- (pthread_key::~pthread_key): Use List::Remove for the same reason.
- * thread.h: Remove all pthread_key_destructor and
- pthread_key_destructor_list references throughout.
- (List): Move the interface above pthread_key in the header.
- Use atomic operations during insert and delete.
- (List::forEach): A generic interface for doing something on each node.
- (pthread_key::runAllDestructors): New method, run all destructors.
- (pthread_key::fork_buf): Make private.
- (pthread_key::run_destructor): Ditto.
- (pthread_key::saveAKey): New method for clearer source.
- (pthread_key::restoreAKey): Ditto.
- (pthread_key::destroyAKey): Ditto.
- (MTinterface::destructors): Remove.
-
-2002-09-21 Robert Collins <rbtcollins@hotmail.com>
-
- * thread.cc: Partial refactoring of pthread_key destructor
- handling. Loosely based on Thomas Pfaff's work.
- (pthread_key_destructor_list::Insert): Remove.
- (pthread_key_destructor_list::Pop): Remove.
- (pthread_key_destructor_list::IterateNull): Call the key's
- run_destructor method.
- (pthread_key::pthread_key): Initialize new member.
- (pthread_key::get): Mark as const for correctness.
- (pthread_key::run_destructor): Implement.
- * thread.h (pthread_key::get): Mark as const for correctness.
- (pthread_key::run_destructor): Declare.
- (List): New template class that implements a generic list.
- (pthread_key_destructor_list): Inherit from List, and remove
- now duplicate functions.
-
-2002-09-21 Robert Collins <rbtcollins@hotmail.com>
-
- * thread.cc: Change verifyable_object_isvalid calls with
- PTHREAD_CONDATTR_MAGIC, PTHREAD_MUTEXATTR_MAGIC, PTHREAD_COND_MAGIC,
- SEM_MAGIC to objecttype::isGoodObject() calls throughout.
- (pthread_condattr::isGoodObject): Implement.
- (pthread_mutex::isGoodInitializer): Implement.
- (pthread_mutex::isGoodInitializerOrObject): Minor bugfix in the
- check for verifyable_object_isvalid result.
- (pthread_mutexattr::isGoodObject): Implement.
- (pthread_cond::isGoodObject): Ditto.
- (pthread_cond::isGoodInitializer): Ditto.
- (pthread_cond::isGoodInitializerOrObject): Ditto.
- (semaphore::isGoodObject): Ditto.
- * thread.h (pthread_mutex::isGoodInitializer): Declare.
- (pthread_condattr::isGoodObject): Ditto.
- (pthread_cond::isGoodObject): Const correctness.
- (pthread_cond::isGoodInitializer): Declare.
- (pthread_cond::isGoodInitializerOrObject): Ditto.
- (semaphore::isGoodObject): Const correctness.
-
-2002-09-21 Robert Collins <rbtcollins@hotmail.com>
-
- * thread.cc: Change verifyable_object_isvalid calls with
- PTHREAD_MUTEX_MAGIC and PTHREAD_KEY_MAGIC and PTHREAD_ATTR_MAGIC to
- ::isGoodObject() calls throughout.
- (MTinterface::Init): Remove dead code.
- (pthread_attr::isGoodObject): Implement.
- (pthread_key::isGoodObject): Implement.
- (pthread_mutex::isGoodObject): Implement.
- (pthread_mutex::isGoodInitializerOrObject): Implement.
- (pthread::isGoodObject): Update signature.
- * thread.h (pthread_key::isGoodObject): Declare.
- (pthread_attr::isGoodObject): Ditto.
- (pthread_mutex::isGoodObject): Ditto.
- (pthread_mutex::isGoodInitializerOrObject): Ditto.
- (pthread::isGoodObject): Change to a const parameter for const
- correctness.
- (pthread_mutexattr::isGoodObject): Declare.
- (pthread_condattr::isGoodObject): Ditto.
- (pthread_cond::isGoodObject): Ditto.
- (semaphore::isGoodObject): Ditto.
-
-2002-09-19 Christopher Faylor <cgf@redhat.com>
-
- Cleanup calls to CreateFile throughout.
- * dcrt0.cc (__api_fatal): Correctly check for failing return from CreateFile.
- * assert.cc (__assert): Don't check return value from CreateFile for NULL.
- * fhandler_console.cc (set_console_state_for_spawn): Ditto.
- * fork.cc (fork_parent): Ditto.
-
-2002-09-18 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (cygthread::initialized): Avoid copying on fork or some
- threads may not end up in the pool.
- (cygthread::new): Avoid race when checking for initialized. Add
- debugging code.
-
-2002-09-18 Pierre Humblet <pierre.humblet@ieee.org>
-
- * fhandler.cc (fhandler_base::raw_read): Add case for
- ERROR_INVALID_HANDLE due to Win95 directories.
- (fhandler_base::open): Handle errors due to Win95 directories.
- (fhandler_base::close): Add get_nohandle () test.
- (fhandler_base::set_close_on_exec): Ditto.
- (fhandler_base::fork_fixup): Ditto.
- (fhandler_base::lock): Change error code to Posix EINVAL.
- (fhandler_base::dup): If get_nohandle (), set new value to
- INVALID_HANDLE_VALUE instead of NULL.
- * fhandler_disk_file.cc (fhandler_disk_file::fstat): Call fstat_by_name
- if get_nohandle (). Remove extraneous element from strpbrk.
- (fhandler_disk_file::open): Remove test for Win95 directory.
-
- * fhandler_random.cc (fhandler_dev_random::open): Add set_nohandle ().
- * fhandler_clipboard.cc (fhandler_dev_clipboard::open): Ditto.
- * fhandler_zero.cc (fhandler_dev_zero::open): Ditto.
- (fhandler_dev_zero::close): Delete.
- * fhandler.h (class fhandler_dev_zero): Ditto.
-
-2002-09-17 Robert Collins <rbtcollins@hotmail.com>
-
- * thread.cc (pthread_key::set): Preserve GetLastError(). Reported
- by Thomas Pffaf.
-
-2002-09-17 Robert Collins <rbtcollins@hotmail.com>
-
- This work inspires by Thomas Pfaff's pthread_fork patch (1).
- * fork.cc (fork_child): Remove MTinterface fixup call, it's
- adsorbed by pthread::atforkchild.
- Rename __pthread_atforkchild to pthread::atforkchild to give
- access to private members.
- (fork_parent): Rename __pthread_atforkparent to
- pthread::atforkparent to give it access to private members.
- Ditto for __pthread_atforkprepare.
- * thread.cc: Fix some formatting problems throughout.
- (MTinterface::fixup_before_fork): Implement.
- (MTinterface::fixup_after_fork): Fix pthread_keys.
- (pthread_key::keys): Implement.
- (pthread_key::fixup_before_fork): Ditto.
- (pthread_key::fixup_after_fork): Ditto.
- (pthread_key::pthread_key): Add to pthread_key::keys.
- (pthread_key::~pthread_key): Remove from pthread_key::keys.
- (pthread_key::saveKeyToBuffer): Implement.
- (pthread_key::recreateKeyFromBuffer): Ditto.
- (pthread::atforkprepare): Prepare all MT classes for fork.
- (pthread::atforkchild): And fix them up afterwards.
- * thread.h (pthread_key): Buffer the key value during
- fork in fork_buf.
- List the keys needing to be fixed up in a linked list with
- head pthread_key::keys.
- (pthread): Move atfork cygwin internal calls into the class.
- (MTInterface): Provide a fixup_before_fork for objecst that
- need to save state.
- (__pthread_atforkprepare): Remove.
- (__pthread_atforkparent): Remove.
- (__pthread_atforkchild): Remove.
-
-2002-09-16 Christopher Faylor <cgf@redhat.com>
-
- * init.cc: Cleanup slightly and remove obsolete code.
-
-2002-09-11 Robert Collins <rbtcollins@hotmail.com>
-
- * init.cc (dll_entry): On thread detach, if the thread hasn't
- exit()ed, do so.
- * pthread.cc (pthread_getsequence_np): Remove the
- __pthread_getsequence_np wrapper. This requires errno.h.
- * thread.cc (pthread::self): Instantiate a new pthread object
- when called and none exists. return a NULL object if instantiation
- fails.
- (pthread::precreate): Factor out common code.
- (pthread::postcreate): Ditto.
- (pthread::create): Ditto.
- (pthread::exit): Remove the TLS value when we exit to prevent
- double exits.
- (MTinterface::Init): Bugfix - don't mark the TLS index as created
- if one was not allocated.
- Apply Extract Method to move pthread specific initialisation into
- pthread.
- (pthread::initMainThread): Extracted method from MTinterface::Init.
- (pthread::setTlsSelfPointer): Extracted method from various pthread
- calls, to make reading those functions easier.
- (pthread::setThreadIdtoCurrent): Ditto.
- (pthread::cancel_self): Bring into the .cc file, it's only used
- within the class.
- (pthread::getThreadId): Ditto.
- (pthread::thread_init_wrapper): Apply Extract Method to the TLS
- setting logic.
- (pthread::isGoodObject): Extracted method from various pthread
- wrapper calls, for clarity of reading.
- (pthread::getsequence_np): Converted from __pthread_getsquence_np.
- (__pthread_create): Apply Extract Method to the object validation.
- (__pthread_cancel): Ditto.
- (__pthread_join): Ditto.
- (__pthread_detach): Ditto.
- (__pthread_suspend): Ditto.
- (__pthread_continue): Ditto.
- (__pthread_getschedparam): Ditto.
- (__pthread_getsequence_np): Remove.
- (__pthread_setschedparam): Apply Extract Method to the object
- validation.
- (pthreadNull::getNullpthread): New method, return the pthreadNull
- object.
- (pthreadNull::pthreadNull): Private constructor to prevent accidental
- use.
- (pthreadNull::~pthreadNull): Prevent compile warnings.
- (pthreadNull::create): Override pthread behaviour.
- (pthreadNull::exit): Ditto.
- (pthreadNull::cancel): Ditto.
- (pthreadNull::testcancel): Ditto.
- (pthreadNull::setcancelstate): Ditto.
- (pthreadNull::setcanceltype): Ditto.
- (pthreadNull::push_cleanup_handler): Ditto.
- (pthreadNull::pop_cleanup_handler): Ditto.
- (pthreadNull::getsequence_np): Ditto.
- (pthreadNull::_instance): Ditto.
- * thread.h (pthread): Declare pre- and post-create.
- Move GetThreadId to private scope and rename to getThreadId.
- Move setThreadIdtoCurrent to private scope.
- Make create virtual.
- Make ~pthread virtual.
- Declare initMainThread.
- Declare isGoodObject.
- Make exit virtual.
- Make cancel virtual.
- Make testcancel virtual.
- Make setcancelstate virtual.
- Make setcanceltype virtual.
- Make push_cleanup_handler virtual.
- Make pop_cleanup_handler virtual.
- Declare getsequence_np.
- Declare setTlsSelfPointer.
- (pthreadNull): New null object class for pthread.
- (__pthread_getsequence_np): Remove.
-
-2002-09-13 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (seteuid32): Treat ILLEGAL_UID invalid.
- (setegid32): Treat ILLEGAL_GID invalid.
-
-2002-09-10 Pierre Humblet <pierre.humblet@ieee.org>
-
- * grp.cc (initgroups): Call groups::clear_supp to free the
- supplementary group sids that may have been set by setgroups.
- * security.cc (cygsidlist::free_sids): Also zero the class members.
- * security.h (groups::clear_supp): New.
- Rename cygsidlist_unknown to cygsidlist_empty.
-
-2002-09-08 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_tty.cc (fhandler_tty_slave::open): Don't protect
- input/output handles since they are not properly manipulated later.
- * tty.cc (tty::make_pipes): Ditto.
-
-2002-09-06 Christopher Faylor <cgf@redhat.com>
-
- * winsup.h (_WIN32_WINNT): Protect.
-
-2002-09-06 Christopher Faylor <cgf@redhat.com>
-
- * winsup.h (_WIN32_WINNT): Define.
-
-2002-09-03 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (DLL_OFILES): Drop shortcut.o.
- * path.cc: Move all shortcut functions from shortcut.c to here.
- (check_shortcut): Implement without using COM interface.
- * path.h: Move definition of SHORTCUT_HDR_SIZE to here.
- * shortcut.c: Remove.
- * shortcut.h: Ditto.
-
-2002-09-03 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * fhandler.h (fhandler_socket::read): Remove method.
- (fhandler_socket::write): Ditto.
- (fhandler_socket::readv): New method.
- (fhandler_socket::writev): Ditto.
- (fhandler_socket::recvmsg): Add new optional argument.
- (fhandler_socket::sendmsg): Ditto.
- * fhandler.cc (fhandler_socket::read): Remove method.
- (fhandler_socket::write): Ditto.
- (fhandler_socket::readv): New method.
- (fhandler_socket::writev): Ditto.
- (fhandler_socket::recvmsg): Use win32's scatter/gather IO where
- possible.
- (fhandler_socket::sendmsg): Ditto.
- * net.cc (cygwin_recvmsg): Check the msghdr's iovec fields.
- (cygwin_sendmsg): Ditto. Add omitted sigframe.
-
-2002-09-02 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * cygwin.din: Revert exporting new wchar functions.
- * include/cygwin/version.h: Change comment for API minor 62.
-
-2002-09-02 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (dll_crt0_1): Remove getpagesize() call.
- * shared.cc (memory_init): Move it here.
-
-2002-08-31 Christopher January <chris@atomice.net>
-
- * fhandler_proc.cc: Add <sys/param.h> include.
- (format_proc_uptime): Use KernelTime and UserTime only as they include
- the other counters.
- (format_proc_stat): KernelTime includes IdleTime, so subtract IdleTime
- from KernelTime. Make number of 'jiffies' per second same as HZ define.
- * fhandler_process.cc: Add <sys/param.h> include.
- (format_process_stat): Make number of 'jiffies' per second same as
- HZ define. Use KernelTime and UserTime only to calculate start_time.
-
-2002-08-30 Christopher Faylor <cgf@redhat.com>
-
- (inspired by a patch from Egor Duda)
- * select.cc (fhandler_tty_slave::ready_for_read): Remove.
- * fhandler.h (fhandler_tty_slave::ready_for_read): Remove declaration.
- * fhandler_tty.cc (fhandler_tty_slave::fhandler_tty_slave): Set "don't
- need ready for read" flag.
- (fhandler_tty_slave::read): Don't do anything special with vtime when
- vmin == 0.
-
-2002-08-30 Egor Duda <deo@logos-m.ru>
-
- * autoload.cc (GetConsoleWindow): Correct parameter count.
-
-2002-08-30 Christopher January <chris@atomice.net>
- Christopher Faylor <cgf@redhat.com>
-
- * tty.cc (tty_list::allocate_tty): Use GetConsoleWindow, if available.
- Call FindWindow in a loop.
- * autoload.cc (GetConsoleWindow): Export
-
-2002-08-30 Christopher Faylor <cgf@redhat.com>
-
- * miscfuncs.cc (check_iovec_for_read): Don't check buffer when zero
- length iov_len.
- (check_iovec_for_write): Ditto.
-
-2002-08-27 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * fhandler.h (fhandler_base::readv): New method.
- (fhandler_base::writev): Ditto.
- * fhandler.cc (fhandler_base::readv): New method.
- (fhandler_base::writev): Ditto.
- * syscalls.cc (_read): Delegate to readv(2).
- (_write): Ditto, mutatis mutandi.
- (readv): Rewrite, based on the old _read code, to use the new
- fhandler_base::readv method. Improve access mode handling and ensure
- all calls reach the final strace statement.
- (writev): Ditto, mutatis mutandi.
- * include/sys/uio.h (struct iovec): Change field types to match SUSv3.
- * winsup.h (check_iovec_for_read): New function.
- (check_iovec_for_write): Ditto.
- * miscfuncs.cc (check_iovec_for_read): Ditto.
- (check_iovec_for_write): Ditto.
-
-2002-08-30 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Add more prototypes for new wchar functions in newlib.
-
-2002-08-30 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Add prototypes for new wchar functions in newlib.
- * include/cygwin/version.h: Bump API minor number.
-
-2002-08-29 Boris Schaeling <boriss@web.de>
- Corinna Vinschen <corinna@vinschen.de>
-
- * poll.cc (poll): Peek sockets ready for read to see if there's
- actually data.
-
-2002-08-28 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (hthreads): Remove unneeded global.
- (cygthread::simplestub): New static member function.
- (cygthread::runner): Don't set hthreads.
- (cygthread::freerange): New member function.
- (cygthread::operator new): Call freerange if all cygwin slots are used
- up.
- (cygthread::exit_thread): Don't mess with event if freerange thread.
- (cygthread::detach): Ditto.
- * cygthread.h (class cygthread): Declare new member functions and
- variables.
-
-2002-08-28 Christopher Faylor <cgf@redhat.com>
-
- * malloc.cc: Protect some definitions to avoid a compile time warning.
-
-2002-08-27 Nicholas Wourms <nwourms@netscape.net>
-
- * cygwin.din: Export getc_unlocked, getchar_unlocked,
- putc_unlocked, putchar_unlocked functions.
- * include/cygwin/version.h: Bump api minor.
-
-2002-08-28 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::recvfrom): Eliminate flags
- not understood by WinSock.
- (fhandler_socket::sendto): Ditto. If WinSock sendto() returns
- WSAESHUTDOWN, change errno to EPIPE and raise SIGPIPE if MSG_NOSIGNAL
- isn't set in flags.
- * include/cygwin/socket.h: Define MSG_WINMASK and MSG_NOSIGNAL.
- * include/cygwin/version.h: Bump API minor number.
-
-2002-08-28 Corinna Vinschen <corinna@vinschen.de>
-
- * poll.cc (poll): Eliminate erroneous POLLERR conditional.
-
-2002-08-26 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * fhandler_socket.cc (fhandler_socket::check_peer_secret_event):
- Fix strace message.
- (fhandler_socket::connect): Remove sigframe.
- (fhandler_socket::accept): Ditto.
- (fhandler_socket::getsockname): Ditto.
- (fhandler_socket::getpeername): Ditto.
- (fhandler_socket::recvfrom): Ditto.
- (fhandler_socket::recvmsg): Ditto.
- (fhandler_socket::sendto): Ditto.
- (fhandler_socket::sendmsg): Ditto.
- (fhandler_socket::close): Ditto.
- (fhandler_socket::ioctl): Ditto.
- * ioctl.cc (ioctl): Add sigframe.
- * net.cc (cygwin_sendto): Ditto.
- (cygwin_recvfrom): Ditto.
- (cygwin_recvfrom): Ditto.
- (cygwin_connect): Ditto.
- (cygwin_shutdown): Ditto.
- (cygwin_getpeername): Ditto.
- (cygwin_accept): Ditto. Improve strace message.
- (cygwin_getsockname): Ditto. Ditto.
- (cygwin_recvmsg): Ditto. Ditto.
- (cygwin_sendmsg): Fix strace message.
-
-2002-08-27 Christopher Faylor <cgf@redhat.com>
-
- * child_info.h: Add _PROC_WHOOPS enum value.
- (CURR_CHILD_INFO_MAGIC): Update.
- (child_info::magic): Make 'long'.
- * cygheap.h: Export _cygheap_start.
- * cygheap.cc: Don't declare _cygheap_start.
- * cygmagic: Use cksum to produce checksums. Append 'U' to end of
- checksum.
- * dcrt0.cc (initial_env): Calculate sleep ms before reusing buffer.
- (_dll_crt0): Detect cygheap mismatch as indicative of different cygwin
- version. Set child_proc_info to NULL when _PROC_WHOOPS.
- (multiple_cygwin_problem): If child_info specific problem, then set
- child_proc_info type to _PROC_WHOOPS.
- * shared_info.h (CURR_MOUNT_MAGIC): Update.
- (CURR_SHARED_MAGIC): Ditto.
-
-2002-08-25 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * fhandler.h (fhandler_socket::recvfrom): Fix prototype.
- (fhandler_socket::sendto): Ditto.
- * fhandler_socket.cc (fhandler_socket::recvfrom): Ditto.
- (fhandler_socket::sendto): Ditto.
- * include/sys/socket.h (recv): Fix prototype.
- (recvfrom): Ditto.
- (send): Ditto.
- (sendto): Ditto.
- * net.cc (cygwin_sendto): Ditto. Improve strace message
- (cygwin_recvfrom): Ditto. Ditto.
- (cygwin_setsockopt): Improve strace message.
- (cygwin_getsockopt): Ditto.
- (cygwin_connect): Ditto.
- (cygwin_accept): Ditto.
- (cygwin_bind): Ditto.
- (cygwin_getsockname): Ditto.
- (cygwin_getpeername): Ditto.
- (cygwin_recv): Fix prototype.
- (cygwin_send): Ditto.
- (cygwin_recvmsg): Improve strace message.
- (cygwin_sendmsg): Ditto.
-
-2002-08-25 Pierre Humblet <Pierre.Humblet@ieee.org>
-
- * sec_acl.cc (getacl): Check ace_sid == well_known_world_sid
- before owner_sid and group_sid so that well_known_world_sid
- means "other" even when owner_sid and/or group_sid are Everyone.
- * security.cc (get_attribute_from_acl): Created from code common
- to get_nt_attribute() and get_nt_object_attribute(), with same
- reordering as in getacl() above.
- (get_nt_attribute): Call get_attribute_from_acl().
- (get_nt_object_attribute): Ditto.
-
-2002-08-26 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (cygrunk.exe): Make a -mno-cygwin program.
- * cygrun.c (main): Export CYGWIN=ntsec unless otherwise set.
-
- * shared.cc (shared_name): Only add build date to shared name when
- *testing*.
-
-2002-08-24 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (DLL_IMPORTS): Move libuuid.a and libshell32.a to list
- rather than referring to them via -l. Add DLL imports last in link
- line for new-cygwin.dll and cygrun.exe.
-
-2002-08-19 Christopher Faylor <cgf@redhat.com>
-
- * pinfo.h (pinfo::remember): Arrange for destructor call if
- proc_subproc returns error.
- * sigproc.cc (zombies): Store 1 + total zombies since proc_subproc uses
- NZOMBIES element.
-
-2002-08-19 Corinna Vinschen <corinna@vinschen.de>
-
- * pwdgrp.h (pwdgrp_read::pwdgrp_read): Remove.
- (pwdgrp_read::~pwdgrp_read): Ditto.
- (pwdgrp_read::open): Reset fh to NULL instead of INVALID_HANDLE_VALUE.
- (pwdgrp_read::close): Ditto.
-
-2002-08-19 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.h (fhandler_console::send_winch_maybe): New method.
- * fhandler_console.cc (set_console_state_for_spawn): Remove if 0'ed
- code.
- (fhandler_console::send_winch_maybe): Define new method.
- (fhandler_console::read): Use send_winch_maybe where appropriate.
- (fhandler_console::init): Just call all tcsetattr rather than
- output_tcsetattr.
- * select.cc (peek_console): Reorganize so that send_winch_maybe is
- called for everything but keyboard input.
-
-2002-08-18 Christopher Faylor <cgf@redhat.com>
-
- * perthread.h (vfork_save): Add ctty, sid, pgid, exitval fields.
- (vfork_save::restore_pid): New method.
- (vfork_save::restore_exit): New method.
- * fork.cc (vfork): Save ctty, sid, pgid and restore them when returning
- to "parent". Use exitval field if exiting but never created a new
- process.
- * syscalls.cc (setsid): Detect when in "vfork" and force an actual fork
- so that pid will be allocated (UGLY!).
- (getsid): New function.
- * dcrt0.cc (do_exit): Use vfork_save::restore_exit method for returning
- from a vfork.
- * spawn.cc (spawnve): Use vfork_save::{restore_pid,restore_exit}
- methods for returning from vfork.
- * cygwin.din: Export getsid.
- * include/cygwin/version.h: Bump api minor number.
-
- * malloc.cc: #ifdef sYSTRIm for when MORECORE_CANNOT_TRIM is true.
-
-2002-08-18 Christopher Faylor <cgf@redhat.com>
-
- * cygmalloc.h (MORECORE_CANNOT_TRIM): Define.
-
-2002-08-18 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (sigCONT): Define.
- * sigproc.h (sigCONT): Declare.
- (wait_sig): Create sigCONT event here.
- * exceptions.cc (sig_handle_tty_stop): Wait for sigCONT event rather
- than stopping thread.
- (sig_handle): Set sigCONT event as appropriate on SIGCONT rather than
- calling ResumeThread.
-
-2002-08-17 Christopher Faylor <cgf@redhat.com>
-
- * malloc.cc: Update to 2.7.2.
- * malloc_wrapper.cc (malloc_init): Call user level mallocs to determine
- if the malloc routines have been overridden.
-
-2002-08-16 Christopher Faylor <cgf@redhat.com>
-
- * winsup.h: Remove malloc_*lock functions.
-
-2002-08-16 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Add support for new malloc.o and renamed
- malloc_wrapper.o. Use -fomit-frame-pointer for malloc.o compilation.
- * malloc_wrapper.cc: New file. Rename from malloc.cc. Add support for
- more malloc functions. Eliminate export_* calls. Just use straight
- malloc names. Remove unused argument from malloc lock functions.
- * cygwin.din: Just export straight malloc names. Add malloc_stats,
- malloc_trim, malloc_usable_size, mallopt, memalign, valloc.
- * dcrt0.cc (__cygwin_user): Eliminate export_* malloc entries.
- * fork.cc (fork_parent): Remove unused argument from malloc_lock
- argument.
- * malloc.cc: New file. Doug Lea's malloc v2.7.1.
- * cygmalloc.h: New file.
- * include/cygwin/version.h: Bump API_MINOR.
-
- * sync.h (muto::acquire): Use appropriate number for regparm attribute.
- (muto::reset): Ditto.
- (muto::release): Ditto.
-
-2002-08-16 Pavel Tsekov <ptsekov@gmx.net>
-
- * exceptions.cc (interrupt_setup): Ensure that the previous signal mask
- is properly saved.
-
-2002-08-15 Thomas Pfaff <tpfaff@gmx.net>
-
- * dcrt0.cc: Modify define for CYGWIN_GUARD.
- (alloc_stack_hard_way): Just use CYGWIN_GUARD in VirtualAlloc call.
-
-2002-08-11 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * fhandler.h (fhandler_socket::recv): Remove method.
- (fhandler_socket::send): Ditto.
- * fhandler_socket.cc (fhandler_socket::recv): Ditto.
- (fhandler_socket::send): Ditto.
- (fhandler_socket::read): Delegate to fhandler_socket::recvfrom.
- (fhandler_socket::write): Delegate to fhandler_socket::sendto.
- (fhandler_socket::sendto): Check for null `to' address.
- * net.cc (cygwin_sendto): Check for zero request length.
- (cygwin_recvfrom): Ditto. Fix signature, use void *buf.
- (cygwin_recv): Delegate to cygwin_recvfrom.
- (cygwin_send): Delegate to cygwin_sendto.
-
-2002-08-11 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (cygthread::cygthread): Close another race.
-
-2002-08-11 Christopher Faylor <cgf@redhat.com>
-
- * assert.cc (__assert): Call debugger on assertion failure if
- debugging.
- * dcrt0.cc (dll_crt0_1): Just wait for signal thread to go live rather
- than going through the overhead of invoking it.
- * fork.cc (fork_child): Ditto.
- * exceptions.cc (signal_fixup_after_fork): Call sigproc_init here.
- * sigproc.cc (proc_can_be_signalled): Assume that the signal thread is
- live.
- (sig_dispatch): Ditto.
- (sig_send): Ditto.
- (wait_for_sigthread): Rename from "wait_for_me". Assume that
- wait_sig_inited has been set and that this function is only called from
- the main thread.
- * sigproc.h (wait_for_sigthread): Declare new function.
-
-2002-08-08 Christopher Faylor <cgf@redhat.com>
-
- * environ.cc (parse_options): Remember the "no" part of any options for
- later export.
-
-2002-08-07 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * winsup.h (__check_null_invalid_struct): Make ptr argument non-const.
- (__check_null_invalid_struct_errno): Ditto.
- * miscfuncs.cc (__check_null_invalid_struct): Ditto.
- (__check_null_invalid_struct_errno): Ditto.
- (__check_invalid_read_ptr_errno): Remove superfluous cast.
- * net.cc (get): Set appropriate errno if fd is not a socket.
- (cygwin_sendto): Fix parameter checking.
- (cygwin_recvfrom): Ditto.
- (cygwin_setsockopt): Ditto.
- (cygwin_getsockopt): Ditto.
- (cygwin_connect): Ditto.
- (cygwin_gethostbyaddr): Ditto.
- (cygwin_accept): Ditto.
- (cygwin_bind): Ditto.
- (cygwin_getsockname): Ditto.
- (cygwin_listen): Ditto.
- (cygwin_getpeername): Ditto.
- (cygwin_send): Ditto.
- (cygwin_shutdown): Ditto. Move sigframe to fhandler_socket.
- (cygwin_recvmsg): Fix parameter checking. Add tracing.
- (cygwin_sendmsg): Ditto.
- * fhandler_socket.cc (fhandler_socket::shutdown): Add sigframe.
- * resource.cc (setrlimit): Fix parameter checking.
-
-2002-08-08 Joe Buehler <jbuehler@hekimian.com
-
- * sec_helper.cc (sec_acl): remove extraneous arg to debug_printf.
-
-2002-08-07 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * fhandler_socket.cc (fhandler_socket::accept): Fix FIONBIO call.
-
-2002-08-06 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.cc (_csbrk): Avoid !cygheap considerations.
- (cygheap_init): Deal with unintialized cygheap issues here.
- (cheap_init): Move cygheap_max setting here.
-
-2002-08-06 Christopher Faylor <cgf@redhat.com>
- Conrad Scott <conrad.scott@dsl.pipex.com
-
- * cygheap.cc (_csbrk): Allocate some slop initially. Don't erroneously
- add sbrk amount to returned value in initial case.
-
-2002-08-06 Christopher Faylor <cgf@redhat.com>
-
- * spawn.cc (spawn_guts): Don't set mount_h here.
- * sigproc.cc (init_child_info): Set it here instead.
- * shared.cc (cygwin_mount_h): Make NO_COPY.
-
-2002-08-06 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (cygthread::stub): Accept flag to pass info structure to
- thread function.
- (cygthread::operator new): Add defensive debugging output.
- (cygthread::cygthread): Add debugging output. Set name after thread
- has been awakened to avoid a race.
- (cygthread::exit_thread): Use handle operator rather than using ev
- directly.
- (cygthread::exit_thread): Reorganize to provide debugging. Set __name
- to NULL.
- * cygthread.h (cygself): Define.
- * fhandler_tty.cc (fhandler_tty_master::init): Use cygself as argument
- so that invoked thread can access its own info.
- (process_output): Derive cygthread info of thread from thread argument.
- * sigproc.cc (sigproc_init): Use cygself as argument so that invoked
- thread can access its own info.
- (wait_sig): Derive cygthread info of thread from thread argument.
-
-2002-08-06 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * debug.h (handle_list::allocated): Remove field.
- * debug.cc (newh): Don't malloc extra entries.
- (add_handle): Downgrade strace message level.
- (delete_handle): Remove case for `allocated' entries.
-
-2002-08-05 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (cygthread::stub): Change event creation to manual
- reset. Set __name after calling SetEvent to prevent races.
- (cygthread::detach): Always reset event here to prevent races.
-
-2002-08-03 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * debug.h (WaitForMultipleObjects): Correct typo.
-
-2002-08-01 Pierre Humblet <Pierre.Humblet@ieee.org>
-
- * security.cc (verify_token): Do not reject a token just because
- the supplementary group list is missing Everyone or a groupsid
- equal to usersid, or because the primary group is not in the token,
- as long as it is equal to the usersid.
- * syscalls.cc (seteuid32): Use common code for all successful returns.
- * grp.cc (getgroups32): Never includes Everyone in the output.
-
-2002-08-01 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (cygthread::exit_thread): Define new method.
- * cygthread.h (cygthread::exit_thread): Declare new method.
- * fhandler.h (fhandler_tty_master::hThread): Delete.
- (fhandler_tty_master::output_thread): Define.
- * fhandler_tty.cc (fhandler_tty_master::fhandler_tty_master): Adjust
- constructor.
- (fhandler_tty_master::init): Use cygthread rather than handle.
- (process_output): Use cygthread method to exit.
- (fhandler_tty_master::fixup_after_fork): Set output_thread to NULL
- after fork.
- (fhandler_tty_master::fixup_after_exec): Set output_thread to NULL
- after spawn/exec.
- * tty.cc (tty_list::terminate): Detach from output_thread using
- cygthread method.
-
-2002-08-01 Christopher Faylor <cgf@redhat.com>
-
- * syscalls.cc (_link): Revert previous change and just always
- dereference the oldpath.
-
-2002-08-01 Christopher Faylor <cgf@redhat.com>
-
- * syscalls.cc (link): Properly deal with a link to a symlink.
-
-2002-08-01 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc: Remove cruft.
-
-2002-08-01 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (DLL_OFILES): Add cygthread.o.
- * dcrt0.cc (dll_crt0_1): Eliminate various thread initialization
- functions in favor of new cygthread class.
- * debug.cc: Remove thread manipulation functions.
- * debug.h: Ditto.
- * external.cc (cygwin_internal): Use cygthread method for determining
- thread name. Remove capability for setting thread name.
- * fhandler_console.cc (fhandler_console::read): Use cygthread method
- rather than iscygthread function.
- * fhandler_tty.cc (fhandler_tty_master::fhandler_tty_master): Use
- cygthread methods to create threads.
- (fhandler_tty_common::__acquire_output_mutex): Use cygthread method to
- retrieve thread name.
- * select.cc (pipeinf): Use cygthread pointer rather than handle.
- (start_thread_pipe): Ditto.
- (pipe_cleanup): Ditto.
- (serialinf): Ditto.
- (start_thread_serial): Ditto.
- (serial_cleanup): Ditto.
- (socketinf): Ditto.
- (start_thread_socket): Ditto.
- (socket_cleanup): Ditto.
- * sigproc.cc (hwait_sig): Ditto.
- (hwait_subproc): Ditto.
- (proc_terminate): Ditto.
- (sigproc_terminate): Ditto.
- (sigproc_init): Initialize cygthread hwait_sig pointer.
- (subproc_init): Initialize cygthread hwait_subproc pointer.
- (wait_sig): Rely on cygthread HANDLE operator.
- * strace.cc (strace::vsprntf): Use cygthread::name rather than threadname.
- * window.cc (gethwnd): Use cygthread method to initialize thread.
-
-2002-07-31 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * fhandler.h (fhandler_base::get_r_no_interrupt): Make non-virtual.
- * net.cc (fdsock): Call set_r_no_interrupt.
-
-2002-07-30 Christopher Faylor <cgf@redhat.com>
-
- * syscalls.cc (_read): Clarify debugging output.
-
-2002-07-30 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.h (fhandler_base::get_r_no_interrupt): Make virtual.
-
-2002-07-30 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_disk_file.cc (fhandler_cygdrive::set_drives): Incorporate .
- and .. processing here.
- (fhandler_cygdrive::readdir): Assume . and .. are already in pdrive.
- (fhandler_cygdrive::seekdir): Ditto.
-
-2002-07-29 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (dll_crt0_1): Move debug_fixup_after_fork_exec.
- * cygheap.cc (cygheap_fixup_in_child): Call debug_fixup_after_fork_exec
- immediately after cygheap has been set up.
-
-2002-07-29 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc: Change some formatting.
- * include/cygwin/version.h: Bump API minor version.
-
-2002-07-28 Pierre Humblet <Pierre.Humblet@ieee.org>
-
- * cygheap.h (class cygheap_user): Add member groups.
- * security.h (class cygsidlist): Add members type and maxcount, methods
- position, addfromgr, alloc_sids and free_sids and operator+= (const
- PSID psid). Modify contains () to call position () and optimize add ()
- to use maxcount.
- (class user_groups): Create. Update declarations of verify_token and
- create_token.
- * security.cc (cygsidlist::alloc_sids): New.
- (cygsidlist::free_sids): New.
- (get_token_group_sidlist): Create from get_group_sidlist.
- (get_initgroups_sidlist): Create from get_group_sidlist.
- (get_group_sidlist): Suppress.
- (get_setgroups_sidlist): Create.
- (verify_token): Modify arguments. Add setgroups case.
- (create_token): Modify arguments. Call get_initgroups_sidlist and
- get_setgroups_sidlist as needed. Set SE_GROUP_LOGON_ID from auth_pos
- outside of the loop. Rename the various group sid lists consistently.
- * syscalls.cc (seteuid32): Modify to use cygheap->user.groups.
- (setegid32): Call cygheap->user.groups.update_pgrp.
- * grp.cc (setgroups): Create.
- (setgroups32): Create.
- * uinfo.cc (internal_getlogin): Initialize and update
- user.groups.pgsid.
- * cygwin.din: Add setgroups and setgroups32.
-
-2002-07-28 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_console.cc (fhandler_console::read): Use appropriate
- kill_pgrp method.
- * select.cc (peek_console): Ditto.
- * fhandler_termios.cc (fhandler_termios::bg_check): Send "stopped"
- signal to entire process group as dictated by SUSv3.
- * termios.cc (tcsetattr): Detect when stopped signal sent and force a
- stop before setting anything.
-
-2002-07-26 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump API version to indicate that ntsec is
- on by default now.
-
-2002-07-26 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * fhandler_registry.cc (fhandler_registry::close): Return any error
- result to the caller.
- * syscalls.cc (_close): Return result of fhandler::close to the caller.
-
-2002-07-25 Christopher Faylor <cgf@redhat.com>
-
- * security.cc (allow_ntsec): Default to on.
- (allow_smbntsec): Default to off.
-
-2002-07-24 David MacMahon <davidm@smartsc.com>
-
- * times.cc (to_time_t): Always round time_t down to nearest second.
-
-2002-07-25 Egor Duda <deo@logos-m.ru>
-
- * Makefile.in: Check if API version is updated when exports are
- changed and stop if not so.
-
-2002-07-24 Egor Duda <deo@logos-m.ru>
-
- * include/cygwin/version.h: Bump minor API version.
-
-2002-07-24 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_serial.cc: Change 'must_init_serial_line capability'
- to 'supports_reading_modem_output_lines' throughout (negated meaning).
- * wincap.cc: Ditto.
- * wincap.h: Ditto.
-
-2002-07-23 Nicholas Wourms <nwourms@netscape.net>
-
- * cygwin.din (fcloseall): Add symbol for export.
- (fcloseall_r): Ditto.
-
-2002-07-24 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (path_conv::check): Always set fileattr when component == 0.
- (readlink): Use path_conv method rather than field.
- * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Ditto,
- throughout.
- * path.h (path_conv): Make fileattr private.
- * exceptions.cc (try_to_debug): Default to idle priority when looping.
-
-2002-07-23 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_serial.cc: Use must_init_serial_line capability throughout.
- * wincap.cc: Set flag must_init_serial_line appropriately.
- * wincap.h: Add flag must_init_serial_line.
-
-2002-07-23 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (get_group_sidlist): Create group list from /etc files
- even if DC is available but access fails.
-
-2002-07-22 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_serial.cc: Fix formatting problems introduced by below
- changes.
-
-2002-07-22 Jacek Trzcinski <jacek@certum.pl>
-
- * fhandler.h (class fhandler_serial): Add new members of the class -
- rts,dtr and method ioctl(). Variables rts and dtr important for Win 9x
- only.
- * fhandler_serial.cc (fhandler_serial::open): Add initial setting of
- dtr and rts. Important for Win 9x only.
- (fhandler_serial::ioctl): New function. Implements commands TIOCMGET,
- TIOCMSET and TIOCINQ.
- (fhandler_serial::tcflush): Fix found error.
- (fhandler_serial::tcsetattr): Add settings of rts and dtr. Important
- for Win 9x only.
- * termios.h: Add new defines as a support for ioctl() function on
- serial device.
-
-2002-07-20 Christopher Faylor <cgf@redhat.com>
-
- * autoload.cc (LoadDLLprime): Add jmp call to allow streamlining of
- later jmp rewrite.
- (doit): Avoid use of cx register. Just change one word to avoid races.
-
-2002-07-18 Pierre Humblet <pierre.humblet@ieee.org>
-
- * security.cc (get_unix_group_sidlist): Create.
- (get_supplementary_group_sidlist): Evolve into get_unix_group_sidlist.
- (get_user_local_groups): Add check for duplicates.
- (get_user_primary_group): Suppress.
- (get_group_sidlist): Silently ignore PDC unavailability.
- Call get_unix_group_sidlist() before get_user_local_groups().
- Remove call to get_supplementary_group_sidlist(). Never call
- get_user_primary_group() as the passwd group is always included.
- Add well_known_authenticated_users_sid in only one statement.
-
-2002-07-19 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_serial.cc (fhandler_serial::tcflush): Fix typo.
-
-2002-07-15 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (get_group_sidlist): Fix formatting.
-
-2002-07-14 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (initial_env): Force path and CYGWIN_DEBUG contents to lower
- case.
- * exceptions.cc (error_start_init): Use the name derived from
- GetModuleName rather than myself->progname.
-
-2002-07-14 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (dll_crt0_1): Move debug_init call back to here. Avoid a
- compiler warning.
- * shared.cc (memory_init): Remove debug_init call.
- * debug.h (handle_list): Change "clexec" to "inherited".
- * debug.cc: Remove a spurious declaration.
- (setclexec): Conditionalize away since it is currently unused.
- (add_handle): Use inherited field rather than clexec.
- (debug_fixup_after_fork_exec): Ditto. Move debugging output to
- delete_handle.
- (delete_handle): Add debugging output.
- * fhandler.cc (fhandler_base::set_inheritance): Don't bother setting
- inheritance in debugging table since the handle was never protected
- anyway.
- (fhandler_base::fork_fixup): Ditto.
-
- * exceptions.cc (debugger_command): Revert.
-
-2002-07-14 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * debug.cc (clexec): Add missing `hl = hl->next'.
-
-2002-07-14 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (cygrun.exe): Add a -lcygwin on the end.
-
-2002-07-14 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (cygserver.exe): Add -lstdc++.
- (cygrun.exe): Move -lgcc last.
-
-2002-07-13 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (dll_crt0_1): Delay closing of some handles until cygheap
- has been set up.
- (break_here): New function, for debugging.
- (initial_env): Add program name to "Sleeping" message. Implement new
- "CYGWIN_DEBUG" environment variable option.
- * exceptions.cc (debugger_command): Add argument to dumper call.
- * strace.cc (strace::hello): Use winpid if cygwin pid is unavailable.
- (strace::vsprntf): Ditto.
-
-2002-07-13 Christopher Faylor <cgf@redhat.com>
-
- * debug.h (handle_list): Move here from debug.cc. Add "inherit" flag
- functionality.
- * cygheap.cc (init_cheap): Move cygheap_max calculation to _csbrk.
- (_csbrk): Reorganize to not assume first allocation is <= 1 page.
- (cygheap_setup_for_child): Mark protected handle as inheritable.
- * cygheap.h (cygheap_debug): New struct.
- (init_cygheap): Add new structure when debugging.
- * dcrt0.cc (dll_crt0_1): Remove call to debug_init. Close ppid_handle
- here, if appropriate. Don't protect subproc_ready, since it is already
- protected in the parent. Call memory_init prior to ProtectHandle to
- ensure that cygheap is set up. Call debug_fixup_after_fork_exec when
- appropriate.
- (_dll_crt0): Don't close ppid_handle here.
- * debug.cc: Use cygheap debug structure rather than static elements
- throughout.
- (add_handle): Don't issue a warning if attempt to protect handle in
- exactly the same way from exactly the same place. Add pid info to
- warning output. Accept additional argument controlling whether handle
- is to be inherited. Add pid to stored information.
- (debug_fixup_after_fork_exec): Renamed from debug_fixup_after_fork.
- Reorganize to avoid erroneously skipping handles.
- (mark_closed): Add pid info to warning output.
- (setclexec): Rename from setclexec_pid.
- * fhandler.cc (fhandler_base::get_default_fmode): Minor reorg.
- (fhandler_base::fstat): Add debugging output.
- (fhandler_base::set_inheritance): Call setclexec rather than
- setclexec_pid.
- (fhandler_base::fork_fixup): Ditto.
- * fhandler_console.cc (get_tty_stuff): Mark protected handle as
- inheritable.
- * fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
- * tty.cc (tty::make_pipes): Ditto.
- (tty::common_init): Ditto.
- * fork.cc (fork_parent): Ditto.
- (fork_child): Close protected handles with correct name. Remove
- debug_fixup_after_fork call.
- * fhandler_socket.cc (fhandler_socket::create_secret_event): Mark
- protected handle as inheritable/non-inheritable, as appropriate.
- * shared.cc (memory_init): Mark protected handle as inheritable.
- Call debug_init here.
- * sigproc.cc (wait_sig): Close protected handle with correct name.
- * spawn.cc (spawn_guts): Rename spr to subproc_ready and mark it as
- inheritable.
-
- * exceptions.cc (debugger_command): Try to run dumper.exe, if found.
-
- * syscalls.cc (fstat64): Don't follow symlinks for path_conv lookup
- since path is already resolved.
-
-2002-07-12 Christopher Faylor <cgf@redhat.com>
-
- * cygwin.din: Change erroneous entries.
-
-2002-07-11 Pavel Tsekov <ptsekov@gmx.net>
-
- * fhandler_disk_file.cc (fhandler_disk_file::open): Don't
- move the file pointer to the end of file if O_APPEND is
- specified in the open flags.
-
-2002-07-09 Christopher Faylor <cgf@redhat.com>
-
- * debug.cc: Avoid explicit zeroing of globals.
- (lock_debug): Make locker a static member. Avoid unlocking when
- already unlocked (from Conrad Scott).
- (debug_init): Initialize lock_debug::locker here.
- * fork.cc (fork_child): Fix up fdtab earlier to avoid some (but not
- all) confusion with close-on-exec craziness.
-
-2002-07-05 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_socket::is_unconnected): Constify.
- (fhandler_socket::is_connect_pending): Ditto.
- (fhandler_socket::is_connected): Ditto.
- (fhandler_socket::set_connect_state): New method.
- (struct select_record): Add member `except_on_write'.
- (select_record::select_record): Initialize all bool values to `false'.
- * fhandler_socket.cc: Use set_connect_state() method throughout.
- (fhandler_socket::connect): Set state always to connected if connection
- isn't pending.
- * net.cc (cygwin_getsockopt): Revert erroneous previous patch.
- * select.cc (set_bits): Check for `except_on_write'. Set fd in
- write_fds if set. Set connect state to connected if fd has been
- returned by WINSOCK_SELECT.
- (peek_socket): Check for `except_on_write'.
- (start_thread_socket): Ditto.
- (fhandler_socket::select_write): Don't set `write_ready' if connect
- is pending. Set `except_on_write' if connect is pending.
-
-2002-07-05 Christopher Faylor <cgf@redhat.com>
-
- * ntdll.h (_SYSTEM_PROCESSOR_TIMES): Force eight byte alignment.
- (_SYSTEM_TIME_OF_DAY_INFORMATION): Ditto.
-
- * path.cc (suffix_scan::has): Reorganize to eliminate double scanning
- for for .exe (in the typical case).
-
-2002-07-05 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (UNCONNECTED): New define.
- (CONNECT_PENDING): Ditto.
- (CONNECTED): Ditto.
- (class fhandler_socket): Add member `had_connect_or_listen'.
- Add member functions `is_unconnected', `is_connect_pending' and
- `is_connected'.
- * fhandler_socket.cc (fhandler_socket::connect): Set member
- `had_connect_or_listen' according to return code of WinSock
- call.
- (fhandler_socket::listen): Ditto.
- * net.cc (cygwin_getsockopt): Modify SO_ERROR return value in
- case of socket with pending connect().
- * select.cc (peek_socket): Only add socket to matching fd_set
- if it's not "ready". Call WINSOCK_SELECT only if at least one
- socket is in one of the fd_sets.
- (start_thread_socket): Only add socket to matching fd_set
- if it's not "ready".
- (fhandler_socket::select_write): Set write_ready to true also
- if socket isn't connected or listening.
-
-2002-07-04 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::set_sun_path): Don't free
- memory here. Allow NULL parameter.
-
-2002-07-04 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::dup): Add missing copy operation
- on sun_path.
-
-2002-07-03 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number.
-
-2002-07-03 Christopher Faylor <cgf@redhat.com>
-
- * include/sys/statfs.h: New header file.
-
-2002-07-03 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (cygwin_attach_handle_to_fd): Default to implicit bin mode
- if none specified.
- * fhandler.cc (fhandler_base::init): Make bin argument a guarantee
- rather than a suggestion.
- * path.cc (path_conv::check): Load flag returned from
- cygwin_conv_to_win32_path into path_flags.
-
-2002-07-03 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * tty.cc (tty::common_init): Reverse logic of cygserver check in
- call to SetKernelObjectSecurity.
-
-2002-07-03 Thomas Pfaff <tpfaff@gmx.net>
-
- * autoload.cc (WSAEventSelect): Define new autoload function.
- (WSAEnumNetworkEvents): Ditto.
- * fhandler_socket.cc (fhandler_socket::accept): If socket is
- in blocking mode wait for incoming connection and signal.
-
-2002-07-02 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.cc (init_cheap): Rearrange error message.
- (cygheap_fixup_in_child): Ditto.
- * dtable.cc: Remove if 0'ed code.
- * fhandler_dsp.cc (fhandler_dev_dsp::open): Force binmode.
- * sec_helper.cc (cygsid::get_id): Use system_printf for error message.
- * tty.cc (tty::common_init): Ditto.
-
-2002-07-02 Christopher Faylor <cgf@redhat.com>
-
- * net.cc (cygwin_getpeername): Defend against NULL pointer dereference.
-
-2002-07-02 Egor Duda <deo@logos-m.ru>
-
- * include/cygwin/version.h: Bump API minor version.
-
-2002-07-01 Pierre Humblet <pierre.humblet@ieee.org>
-
- * security.cc (get_logon_server): Interpret a zero length
- domain as the local domain.
- (get_group_sidlist): Add authenticated users SID to SYSTEM's group
- list instead of SYSTEM itself.
- (verify_token): Accept the primary group sid if it equals
- the token user sid.
-
-2002-07-02 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din (__fpclassifyd): Add symbol.
- (__fpclassifyf): Ditto.
- (__signbitd): Ditto.
- (__signbitf): Ditto.
-
-2002-07-02 Corinna Vinschen <corinna@vinschen.de>
-
- * security.h (DONT_INHERIT): Eliminate definition.
- (INHERIT_ALL): Ditto.
- (INHERIT_ONLY): Ditto.
- * sec_acl.cc: Use appropriate defines from accctrl.h instead of the
- above throughout.
- * security.cc: Ditto.
-
-2002-07-01 Pierre Humblet <pierre.humblet@ieee.org>
-
- * syscalls.c (seteuid32): Return immediately if the program is not
- impersonated and both uid and gid are original.
- (setegid32): Return immediately if the new gid is the current egid.
-
-2002-07-01 Christopher Faylor <cgf@redhat.com>
-
- * syscalls.cc (seteuid32): Fix incorrect placement of Pierre's patch
- below.
-
-2002-07-01 Christopher Faylor <cgf@redhat.com>
-
- * syscalls.cc (seteuid32): Fix incorrect use of system_printf.
-
-2002-07-02 Christopher January <chris@atomice.net>
-
- * autoload.cc (GetSecurityInfo): Define new autoload function.
- (RegQueryInfoKeyA): Ditto.
- * fhandler.h (fhandler_virtual::fill_filebuf): Change return type to
- bool.
- (fhandler_proc::fill_filebuf): Ditto.
- (fhandler_registry::fill_filebuf): Ditto.
- (fhandler_process::fill_filebuf): Ditto.
- (fhandler_registry::value_name): Add new member.
- (fhandler_registry::close): Add new method.
- (fhandler_process::p): Remove member.
- * fhandler_proc.cc (fhandler_proc::open): Add set_nohandle after
- calling superclass method. Check return value of fill_filebuf.
- (fhandler_proc::fill_filebuf): Change return type to bool. Add return
- statement.
- * fhandler_process.cc (fhandler_process::open): Add set_nohandle after
- calling superclass method. Remove references to p. Check return value
- of fill_filebuf.
- (fhandler_process::fill_filebuf): Change return type to bool. Don't
- use dereference operator on p. Add return statement.
- (fhandler_process::format_process_stat): Fix typo.
- * fhandler_registry.cc: Add static open_key declaration.
- (fhandler_registry::exists): Assume path is already normalised. Try
- opening the path as a key in its own right first, before reverting to
- enumerating subkeys and values of the parent key.
- (fhandler_registry::fstat): Add additional code to return more relevant
- information about the registry key/value.
- (fhandler_registry::readdir): Explicitly set desired access when
- opening registry key. Remove output of buf from debug_printf format
- string.
- (fhandler_registry::open): Use set_io_handle to store registry key
- handle. Set value_name member. Move code to read a value from the
- registry to fill_filebuf. Add call to fill_filebuf.
- (fhandler_registry::close): New method.
- (fhandler_registry::fill_filebuf): Change return type to bool. Add
- code to read a value from registry.
- (fhandler_registry::open_key): Make function static. Use KEY_READ as
- desired access unless this is the last path component. Check the
- return value of RegOpenKeyEx for an error instead of hKey.
- * fhandler_virtual.cc (fhandler_virtual::lseek): Check the return value
- of fill_filebuf.
- (fhandler_virtual::open): Remove call to set_nohandle.
- (fhandler_virtual::fill_filebuf): Change return type to bool. Add
- return statement.
- * security.cc (get_nt_object_attribute): New function.
- (get_object_attribute): New function.
- * security.h (get_object_attribute): New function declaration.
-
-2002-07-01 Pierre Humblet <pierre.humblet@ieee.org>
-
- * syscalls.c (seteuid32): Do not return an error when the token cannot
- be created only because of a problem with the gid.
-
-2002-07-01 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_clipboard.c (fhandler_dev_clipboard::open): Force text mode.
- * fhandler_console.cc (fhandler_console::open): *Really* force binary
- mode rather than make it optional.
- * fhandler_proc.cc (fhandler_proc::open): Ditto.
- * fhandler_process.cc (fhandler_process::open): Ditto.
- * fhandler_random.cc (fhandler_dev_random::fhandler_dev_random): Ditto.
- * fhandler_raw.cc (fhandler_dev_raw::open): Ditto.
- * fhandler_registry.cc (fhandler_registry::open): Ditto.
- * fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
- * fhandler_virtual.cc (fhandler_virtual::open): Ditto.
- * fhandler_windows.cc (fhandler_windows::open): Ditto.
- * fhandler_zero.cc (fhandler_dev_zero::open): Ditto.
- * net.cc (fdsock): Ditto.
- * path.cc (set_flags): Add more debugging.
-
-2002-07-01 Christopher Faylor <cgf@redhat.com>
-
- * debug.cc (threads): Avoid initialization.
- * uinfo.cc (cygheap_user::ontherange): (from Corinna Vinschen) Actually
- make below changes work.
-
-2002-07-01 Christopher Faylor <cgf@redhat.com>
-
- * uinfo.cc (cygheap_user::ontherange): Make cygwin root the last resort
- for HOMEPATH/HOMEDRIVE for consistency with HOME.
-
-2002-07-01 Corinna Vinschen <corinna@vinschen.de>
-
- * shared.cc (sec_none): Move to sec_helper.cc.
- (sec_none_nih): Ditto.
- (sec_all): Ditto.
- (sec_all_nih): Ditto.
- (get_null_sd): Ditto.
- (sec_acl): Ditto.
- (__sec_user): Ditto.
- * sec_helper.cc (sec_none): Move from shared.cc to here.
- (sec_none_nih): Ditto.
- (sec_all): Ditto.
- (sec_all_nih): Ditto.
- (get_null_sd): Ditto.
- (sec_acl): Ditto.
- (__sec_user): Ditto.
-
-2002-06-30 Christopher Faylor <cgf@redhat.com>
-
- * uinfo.cc (cygheap_user::ontherange): Potentially set HOME from
- existing homepath and homedrive cygheap_user fields (not currently used
- yet). Set HOME to / if no other alternative.
- (cygheap_user::test_uid): Simplify.
-
-2002-06-30 Christopher Faylor <cgf@redhat.com>
-
- * environ.cc (parse_options): Use setenv to potentially replace CYGWIN
- value on export. Fixes broken behavior since November 2000 changes.
- (regopt): Return indication of whether or not something has been parsed
- from the registry.
- (environ_init): Only attempt to export CYGWIN variable when values were
- set from the registry. It is exported automatically otherwise.
-
-2002-06-30 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.h (fhandler_process::pid): New field.
- (fhandler_process::fstat): Remove unneeded array. Set pid element.
- (fhandler_process::open): Ditto.
- (fhandler_process::fill_filebuf): Handle case where 'p' field is NULL.
-
-2002-06-30 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.h (fhandler_process::p): New field.
- (fhandler_process:fill_filebuf): Revert to same definition as virtual
- in parent class.
- (fhandler_process::open): Fill out p field rather than passing as an
- argument.
- (fhandler_process::fill_filebuf): Use p pointer rather than argument.
-
-2002-06-29 Pierre Humblet <pierre.humblet@ieee.org>
-
- * security.cc (extract_nt_dom_user): Check for all buffer overflows.
- Call LookupAccountSid after trying to get domain & user from passwd.
- (get_group_sidlist): Obtain the domain and user by calling
- extract_nt_dom_user instead of LookupAccountSid.
-
-2002-06-29 Christopher Faylor <cgf@redhat.com>
-
- * uinfo.cc (cygheap_user::test_uid): Use standard issetuid test.
-
-2002-06-29 Christopher Faylor <cgf@redhat.com>
-
- * autoload.cc (NetGetDCName): Change to make this an optional load
- function.
- * cygheap.h (cygheap_user::logsrv): Return NULL when operation fails.
- (cygheap_user::winname): Ditto.
- (cygheap_user::domain): Ditto.
- * uinfo.cc (cygheap_user::env_logsrv): Save results in temp variable.
- (cygheap_user::env_userprofile): Ditto.
-
-2002-06-29 Christopher Faylor <cgf@redhat.com>
-
- * environ.cc (spenv::retrieve): Detect return of env_dontadd from
- cygheap_user methods.
- (build_env): Avoid incrementing environment pointer if not actually
- adding to the environment. That could result in garbage in the
- environment table. Be more defensive when reallocing envblock.
-
-2002-06-29 Christopher Faylor <cgf@redhat.com>
-
- * uinfo.cc (cygheap_user::test_uid): Return NULL or further tests are
- sorta useless.
- (cygheap_user::env_domain): Recalculate if name is missing.
-
-2002-06-29 Christopher Faylor <cgf@redhat.com>
-
- * environ.cc (spenv::from_cygheap): Still need to take setuid into
- consideration.
-
-2002-06-28 Christopher Faylor <cgf@redhat.com>
-
- * uinfo.cc (cygheap_user::env_logsrv): Return "almost_null" in case
- where no domain or username is "SYSTEM".
-
-2002-06-28 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.h (cygheap_user): Reorg to accommodate environment caching.
- (cygheap_user::logsrv): New method.
- (cygheap_user::winname): Ditto.
- (cygheap_user::domain): Ditto.
- (cygheap_user::test_uid): Ditto.
- * cygheap.cc (cygheap_user::set_name): Reflect name "pwinname" name
- change.
- * environ.cc (getwinenveq): New function.
- (penv::from_cygheap): penv::from_cygheap): Change arguments.
- (spenv::retrieve): Ditto for call. Use getwinenveq to retrieve info
- from environment. Always return value from cygwin environment, if it
- exists.
- * environ.h (getwinenveq): Declare.
- * uinfo.cc (cygheap_user::ontherange): Use logsrv() rather than
- env_logsrv().
- (cygheap_user::test_uid): Define new method.
- (cygheap_user::env_logsrv): Accept environment arguments. Use test_uid
- to find info.
- (cygheap_user::env_domain): Ditto.
- (cygheap_user::env_userprofile): Ditto.
- (cygheap_user::env_homepath): Ditto.
- (cygheap_user::env_homedrive): Ditto.
- (cygheap_user::env_name): Ditto.
-
-2002-06-27 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.cc (cfree_and_set): New function.
- (cygheap_user::set_name): Use cfree_and_set to reset members.
- * cygheap.h (cygheap_user): Delete static members.
- (cygheap_user::puserprof): New member.
- (cfree_and_set): Declare.
- * dcrt0.cc (almost_null): Define.
- * environ.cc (env_dontadd): Redefine as "almost_null".
- * winsup.h (almost_null): Declare.
- * syscalls.cc (cfree_and_set): Remove unused variable.
- * uinfo.cc (cygheap_user::homepath_env_buf): Eliminate.
- (cygheap_user::homedrive_env_buf): Ditto.
- (cygheap_user::userprofile_env_buf): Ditto.
- (cygheap_user::ontherange): YA change to try to preserve existing
- HOMEPATH and HOMEDRIVE. Return almost_null values when variables
- should not actually exist.
- (cygheap_user::env_logsrv): Ditto.
- (cygheap_user::env_domain): Ditto.
- (cygheap_user::env_userprofile): Ditto.
-
-2002-06-27 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc (dll_crt0_1): Let __progname point to the applications
- basename. Move eliminating ".exe" suffix from argv[0] so that it
- always also affects __progname.
-
-2002-06-27 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.cc (pthread::create): Add trace printf to get CreateThread
- LastError.
-
-2002-06-27 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (list::match): Check using pagesize aligned size.
-
-2002-06-26 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): Force
- FindFirstFile on first file of directory when asking for x:\ .
-
-2002-06-26 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.cc (cygheap_user::set_name): Correct thinko in below change.
-
-2002-06-26 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.cc (cygheap_user::set_name): Avoid clearing things when just
- setting name to itself or during first time initialization.
-
- * environ.cc (check_case_init): Make case insensitive.
-
-2002-06-26 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_socket::bind): Add method definition.
- (fhandler_socket::connect): Ditto.
- (fhandler_socket::listen): Ditto.
- (fhandler_socket::accept): Ditto.
- (fhandler_socket::getsockname): Ditto.
- (fhandler_socket::getpeername): Ditto.
- (fhandler_socket::recvfrom): Ditto.
- (fhandler_socket::recvmsg): Ditto.
- (fhandler_socket::sendto): Ditto.
- (fhandler_socket::sendmsg): Ditto.
- (fhandler_socket::shutdown): Ditto.
- * fhandler_socket.cc (get_inet_addr): Move here from net.cc.
- (fhandler_socket::bind): New method.
- (fhandler_socket::connect): Ditto.
- (fhandler_socket::listen): Ditto.
- (fhandler_socket::accept): Ditto.
- (fhandler_socket::getsockname): Ditto.
- (fhandler_socket::getpeername): Ditto.
- (fhandler_socket::recvfrom): Ditto.
- (fhandler_socket::recvmsg): Ditto.
- (fhandler_socket::sendto): Ditto.
- (fhandler_socket::sendmsg): Ditto.
- (fhandler_socket::shutdown): Ditto.
- * net.cc: Various formatting cleanups throughout.
- (get_inet_addr): Move to fhandler_socket.cc.
- (cygwin_bind): Move base functionality to appropriate fhandler_socket
- method.
- (cygwin_connect): Ditto.
- (cygwin_listen): Ditto.
- (cygwin_accept): Ditto.
- (cygwin_getsockname): Ditto.
- (cygwin_getpeername): Ditto.
- (cygwin_recvfrom): Ditto.
- (cygwin_recvmsg): Ditto.
- (cygwin_sendto): Ditto.
- (cygwin_sendmsg): Ditto.
- (cygwin_shutdown): Ditto.
-
-2002-06-26 Corinna Vinschen <corinna@vinschen.de>
-
- * pwdgrp.h (pwdgrp_read::~pwdgrp_read): Avoid compiler warning.
-
-2002-06-26 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (_dcrt0): Be more defensive when reserved block is used and
- it's not cygwin info.
-
-2002-06-26 Christopher Faylor <cgf@redhat.com>
-
- * autoload (noload): Avoid clobbering bx register.
-
- * environ.cc (codepage_init): Use case insensitive match.
-
- * fhandler_console.cc (cp_get_internal): Delete.
- (con_to_str): Use get_cp to derive code page.
- (str_to_con): Ditto.
- * miscfuncs.cc (get_cp): New function.
- (sys_wcstombs): New function. Converted from macro.
- (sys_mbstowcs): Ditto.
- * winsup.h: Reflect above changes.
-
-2002-06-26 Christopher Faylor <cgf@redhat.com>
-
- * winsup.h: Minor cleanup.
- * path.h (path_conv::[]): New operator.
- * syscalls.cc (_link): Use path_conv operators rather than methods,
- where appropriate. Minor white space cleanup.
-
-2002-06-26 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number.
-
-2002-06-25 Thomas Pfaff <tpfaff@gmx.net>
-
- * include/pthread.h (PTHREAD_CANCELED): Define a reasonable value.
- * pthread.cc (pthread_exit): Call method instead of function.
- (pthread_setcancelstate): Ditto.
- (pthread_setcanceltype): Ditto.
- (pthread_testcancel): Ditto.
- * thread.h (pthread::cancel_event): New member.
- (__pthread_cancel_self): New prototype.
- (pthread::exit): New Method.
- (pthread::cancel): Ditto.
- (pthread::testcancel): Ditto.
- (pthread::cancel_self): Ditto.
- (pthread::static_cancel_self): Ditto.
- (pthread::setcancelstate): Ditto.
- (pthread::setcanceltype): Ditto.
- (__pthread_cancel): Give c++ linkage.
- (__pthread_exit): Remove.
- (__pthread_setcancelstate): Ditto.
- (__pthread_setcanceltype): Ditto.
- (__pthread_testcancel): Ditto.
- * thread.cc (pthread::pthread): Inititialize cancel_event.
- (pthread::~pthread): Close cancel_event if needed.
- (pthread::create): Create cancel_event.
- (pthread::exit): New method. Replacement for __pthread_exit.
- (pthread::cancel): New method.
- (pthread::testcancel): Ditto.
- (pthread::static_cancel_self); New static method.
- (pthread::setcancelstate): New method. Replacement for
- __pthread_setcancelstate.
- (pthread::setcanceltype): New method. Replacement for
- __pthread_setcanceltype.
- (pthread::pop_cleanup_handler): Add lock for async cancel safe
- cancellation.
- (pthread::thread_init_wrapper): Change __pthread_exit to
- thread->exit().
- (__pthread_cancel): Call method thread->cancel().
- (__pthread_exit): Remove.
- (__pthread_setcancelstate): Ditto.
- (__pthread_setcanceltype): Ditto.
- (__pthread_testcancel): Ditto.
-
-2002-06-25 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (sm): Make NO_COPY.
-
-2002-06-25 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (chown): Convert uid to 32 bit.
- (lchown): Ditto.
- (fchown): Ditto.
-
-2002-06-24 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (dtable::find_unused_handle): Avoid coercion.
-
-2002-06-24 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (fhandler_base::dup2): Cleanup. Ensure that lock is turned
- off in error condition.
-
-2002-06-24 Corinna Vinschen <corinna@vinschen.de>
-
- * uinfo.cc (internal_getlogin): Set myself->uid and myself->gid instead
- of user.real_uid and user.real_gid.
- (uinfo_init): Evaluate orig_uid and real_uid from myself->uid. Ditto
- for gid.
-
-2002-06-23 Pierre Humblet <pierre.humblet@ieee.org>
-
- * security.cc (get_group_sidlist): Add pw argument and use pw->pw_name
- in call to get_supplementary_group_sidlist.
- (create_token): Add pw argument and use it in call to
- get_group_sidlist.
- * security.h: Add pw argument in declaration of create_token.
- * syscalls.cc (seteuid32): Add pw argument in call to create_token.
-
-2002-06-23 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * fhandler.cc (fhandler_base::fstat): Set S_IFIFO for pipes.
- * fhandler_socket.cc (fhandler_socket.cc::fstat): Set S_IFSOCK.
-
-2002-06-23 Christopher Faylor <cgf@redhat.com>
-
- * lib/_cygwin_S_IEXEC.cc: Remove obsolete file.
-
-2002-06-23 Christopher Faylor <cgf@redhat.com>
-
- Use cygwin_{shm,ipc}.h instead of /sys/{shm,ipc}.h throughout.
- * sys/ipc.h: Remove.
- * sys/shm.h: Remove.
- * cygwin_ipc.h: New file.
- * cygwin_shm.h: New file.
-
-2002-06-23 Christopher Faylor <cgf@redhat.com>
-
- * cygwin.sc: Add recent changes from ld sources.
-
-2002-06-23 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * winsup.h: Move #ifdef EXPCGF code into "winbase.h".
- * winbase.h: #ifdef EXPCGF code moved here from "winsup.h".
-
-2002-06-12 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.h (pthread::cleanup_stack): Rename cleanup_handlers to
- cleanup_stack.
- * thread.cc (pthread::pthread): Ditto.
- (pthread::create): Fix mutex verification.
- (pthread::push_cleanup_handler): Renam cleanup_handlers to
- cleanup_stack. Remvoe Mutex calls, use InterlockedExchangePointer
- instead.
- (pthread::pop_cleanup_handler): Rename cleanup_handlers to
- cleanup_stack.
- (pthread::pop_all_cleanup_handlers): Ditto.
- (__pthread_once): Check state first and return if already done.
- (__pthread_join): Revert DEADLOCK test to __pthread_equal call.
- (__pthread_detach): Unlock mutex before deletion.
-
-2002-06-21 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (cygrun.exe): Move -lgcc where it will do some good.
-
-2002-06-21 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (stat64_to_stat32): Correctly evaluate st_rdev.
- (fstat64): Set st_rdev to same value as st_dev.
- (stat_worker): Ditto.
-
-2002-06-21 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (alloc_sd): Carefully check owner_sid again after trying
- SIDs from cygheap.
-
-2002-06-21 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (alloc_sd): Remove unnecessary retrieval of owner name.
- Check uid for current user first and use SIDs from cygheap if so.
- Set errno to EINVAL if user SID isn't retrievable. Just print user SID
- as debug output.
- Don't bail out if group SID isn't retrievable. Change debug output
- appropriately.
-
-2002-06-21 Christopher Faylor <cgf@redhat.com>
-
- * errno.cc: Change text description for EBADF throughout.
-
-2002-06-20 Pierre Humblet <pierre.humblet@ieee.org>
-
- * uinfo.cc (cygheap_user::ontherange): Use env_name for NetUserGetInfo.
- (cygheap_user::env_logsrv): Verify env_domain is valid.
- * environ.cc: Include child_info.h and keep spenvs[] sorted.
- (environ_init): Check child_proc_info instead of myself->ppid_handle.
-
-2002-06-19 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.cc (fhandler_base::set_flags): Change priority of "linked
- in" default binmode setting so that it has priority over optional
- setting.
-
-2002-06-19 Christopher Faylor <cgf@redhat.com>
-
- Use hMainProc where appropriate, throughout.
- * environ.cc (spenv::retrieve): Add debugging statements.
-
- * pinfo.cc (set_myself): Don't call strace.hello if already stracing.
- * strace.cc (strace): Move NO_COPY keyword so that it will actually
- take effect.
-
-2002-06-19 Corinna Vinschen <corinna@vinschen.de>
-
- * uinfo.cc (cygheap_user::ontherange): Call NetUserGetInfo() only with
- non-NULL logserver parameter.
-
-2002-06-16 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.h (cygheap_user::issetuid): New method.
- * dtable.cc (dtable::vfork_child_dup): Use new method to determine if
- we are in "setuid mode."
- * fork.cc (fork_parent): Ditto.
- * spawn.cc (spawn_guts): Ditto.
- * syscalls.cc (seteuid32): Ditto.
- (setegid32): Ditto.
- * environ.cc (spenv::retrieve): (Suggested by Pierre Humblet) Do
- potential recalculation of cygheap_user stuff when in setuid mode.
- Return special value when environment variable should be calculated but
- not added.
- (build_env): Don't add retrieved value to dstp if it is 'dont_add'.
-
-2002-06-16 Christopher Faylor <cgf@redhat.com>
-
- Changes suggested by Pierre Humblet.
- * environ.cc (NL): New macro.
- (conv_envvars): Use NL macro to fill in name and namelen.
- (spenv::namelen): New field.
- (spenvs): Use NL to fill in name and namelen.
- (spenv::retrieve): Eliminate length argument. Instead, use namelen
- throughout.
- (build_env): Don't calculate length of initial FOO= part of
- environment. Accommodate spenv::retrive argument change.
-
-2002-06-16 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.h (cygheap_user::winname): New field.
- * cygheap.cc (cygheap_user::set_name): Clear winname when name changes.
- * uinfo.cc (cygheap_user::env_logsrv): Avoid calculating server when
- Windows user == SYSTEM.
- (cygheap_user::env_domain): Set winname here too.
- (cygheap_user::env_userprofile): Eliminate superfluous tests.
- (cygheap_user::env_name): Seed winname by calling env_domain().
-
-2002-06-12 Pierre Humblet <pierre.humblet@ieee.org>
-
- * spawn.cc (spawn_guts): Revert removal of ciresrv.moreinfo->uid =
- ILLEGAL_UID.
-
-2002-06-15 Christopher Faylor <cgf@redhat.com>
-
- * child_info.h (child_proc_info): Declare as base class.
- (spawn_info): Declare as alias of child_proc_info to aid debugging.
- (fork_info): Ditto.
- * cygheap.cc (cygheap_fixup_in_child): Use child_proc_info global
- rather than parameter.
- * cygheap.h (cygheap_fixup_in_child): Reflect above change in
- declaration.
- * dcrt0.cc (_dll_crt0): Move 'si' definition here. Assign
- child_proc_info.
- (dll_crt0_1): Accommodate cygheap_fixup_in_child and *_info changes.
- * environ.cc (spenv::retrieve): Make regparm.
- * environ.h (environ_init): Ditto.
- (win_env::add_cache): Ditto.
- (build_env): Ditto.
- (getwinenv): Ditto.
- * fork.cc (sync_with_parent): Use fork_info global.
- (fork_child): Ditto.
-
-2002-06-14 Christopher Faylor <cgf@redhat.com>
-
- * uinfo.cc (cygheap_user::ontherange): Don't set HOMEDRIVE or HOMEPATH
- unless one or the other is specified.
-
-2002-06-14 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.h (cygheap_user::userprofile_env_buf): New static member.
- * environ.cc (build_env): Add debugging statement.
- (spenvs): Switch functions for USERDOMAIN and USERNAME.
- * spawn.cc (spawn_guts): Move environment initialization prior to
- cygheap_setup_for_child or environment info will never be copied to
- child.
-
-2002-06-14 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.h (cygheap_user): Add static members to hold home{drive,path}
- info.
- * uinfo.cc (cygheap_user::ontherange): Use static class members for
- local HOME* storage.
-
-2002-06-14 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.cc (cygheap_user::set_logsrv): Remove.
- (cygheap_user::set_domain): Ditto.
- * cygheap.h (cygheap_user::set_logsrv): Remove declaration.
- (cygheap_user::set_domain): Ditto.
- (cygheap_user::env_domain): Declare new method.
- (cygheap_user::env_name): Ditto.
- * environ.cc (spenvs): Add two environment variables.
- * spawn.cc (spawn_guts): Call build_env after RevertToSelf. Always set
- ciresrv.mount_h.
- (cygheap_user::ontherange): Recalculate homedrive/homepath if they are
- empty. Use env_logsrv to get logon server.
- (cygheap_user::env_logsrv): Calculate server name here rather than
- relying on it having been previously calculated.
- (cygheap_user::env_domain): Ditto for domain name.
- (cygheap-user::env_name): New method.
-
-2002-06-12 Pierre Humblet <pierre.humblet@ieee.org>
-
- * syscalls.cc (seteuid32): Do not get or set the environment. Do not
- call LookupAccountSid nor internal_getlogin. Set cygheap->user name
- and sid from the passwd entry.
- * uinfo.cc (uinfo_init): Only call internal_getlogin when starting from
- a non Cygwin process and use the values returned in user.
- (internal_getlogin): Simplify to case where starting from a non Cygwin
- process. Store return values in user and return void. Do not set the
- Windows default environment.
- * dcrt0.cc (dll_crt0_1): Call uinfo_init only when needed. Do not set
- myself->uid nor reset user.sid.
- * spawn.cc (spawn_guts): Get the sid from cygheap->user. Always
- RevertToSelf(). Don't set uid in impersonated case.
- * cygheap.cc (cygheap_user::set_sid): Do not set orig_sig.
- (cygheap_user::set_orig_sid): New.
- * cygheap.h: Declare cygheap_user::set_sid.
- * winsup.h: Add argument to uinfo_init().
-
-2002-06-14 Corinna Vinschen <corinna@vinschen.de>
-
- * environ.cc (build_env): If realloc moves envblock, move s with it.
-
-2002-06-13 Nicholas S. Wourms <nwourms@netscape.net>
-
- * winver.rc: Add more words to copyright.
-
-2002-06-13 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.cc (cygheap_user::set_name): Revert previous change.
- * environ.cc (spenv::retrieve): Check return value of call to
- cygheap->user.*from_cygheap().
-
-2002-06-13 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.cc (cygheap_user::set_name): Remove setting homedrive and
- homepath to NULL.
- (cygheap_user::set_logsrv): Fix free'ing of plogsrv.
- * cygheap.h (cygheap_user::cygheap_user): Initialize homedrive and
- homepath to NULL.
-
-2002-06-13 Christopher Faylor <cgf@redhat.com>
-
- * security.cc (get_logon_server): Use strcasematch rather than
- strcasecmp.
-
-2002-06-12 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (chdir): Minor cleanup.
-
-2002-06-12 Christopher Faylor <cgf@redhat.com>
-
- * environ.cc (build_env): Correctly fill out windows environment block
- with win32 paths rather than posix paths.
-
-2002-06-12 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.cc (cygheap_user::set_name): Set homedrive and homepath to
- NULL on user name change.
- (cygheap_user::set_logsrv): Allocate enough space for leading \\ so
- that we can put this in the environment, if needed.
- * cygheap.h (homebodies): New enum.
- (cygheap_user::homedrive): New field.
- (cygheap_user::homepath): Ditto.
- (cygheap_user::env_logsrv): New method.
- (cygheap_user::env_homepath): New method.
- (cygheap_user::env_homedrive): New method.
- (cygheap_user::env_userprofile): New method.
- (cygheap_user::ontherange): New method.
- * environ.cc (envsize): Eliminate debugging argument.
- (environ_init): Assume that envc counts number of elments not total
- size.
- (spenv): New class.
- (spenvs): New array, rename from forced_winenv_vars, using spenv.
- (spenv::retrieve): New method.
- (build_env): Rename from 'winenv' -- one stop shopping for building new
- environment blocks for both windows and "unix".
- * environ.h (build_env: Declare.
- (winenv): Delete declaration.
- (envsize): Ditto.
- * spawn.cc (spawn_guts): Use build_env to build windows and cygwin
- environment blocks.
- * uinfo.cc (internal_getlogin): Eliminate environment manipulation.
- Default to info from GetUserName if it exists. Move HOMEPATH and
- HOMEDRIVE stuff elsewhere. Move HOME setting elsewhere. Only set HOME
- environment variable in processes that are not parented by a cygwin
- process.
- (cygheap_user::ontherange): Define new method.
- (cygheap_user::env_logsrv): Ditto.
- (cygheap_user::env_homepath): Ditto.
- (cygheap_user::env_homedrive): Ditto.
- (cygheap_user::env_userprofile): Ditto.
-
-2002-06-11 Christopher Faylor <cgf@redhat.com>
-
- * spawn.cc (spawn_guts): More hToken removal cleanup.
-
-2002-06-09 Pierre Humblet <pierre.humblet@ieee.org>
-
- * spawn.cc (spawn_guts): Define sec_attribs and call sec_user_nih()
- only once.
-
-2002-06-10 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Ensure that -MD gets added to CFLAGS regardless of
- CFLAGS command-line setting.
-
- * cygwin.din: Export sexec* functions as function which returns ENOSYS
- (i.e., sexec* is deprecated).
- * dtable.cc (dtable::vfork_child_dup): Ensure that impersonation is
- restored even on failure.
- * exec.cc: Throughout, remove references to sexec* and _spawnve.
- * pinfo.h: Remove _spawnve declaration.
- * spawn.cc: Rename _spawnve to spawnve and use throughout.
- (spawn_guts): Eliminate hToken argument and processing of same. Just
- perform special actions if impersonating.
- (spawnve): Rename from _spawnve.
-
-2002-06-10 Christopher Faylor <cgf@redhat.com>
-
- * include/sys/strace.h (strace): Avoid use of constructor.
-
-2002-06-10 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (dll_crt0_1): Initialize wincap and check for sanity before
- running global ctors.
- * wincap.h (wincap): Eliminate constructor. Default is to zero memory,
- anyway.
- * wincap.cc (wincap): Copy this on fork to avoid initialization in
- forked processes.
-
-2002-06-10 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_socket::fixup_after_fork): Revert patch from
- 2002-06-04.
- * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Ditto.
- (fhandler_socket::dup): Ditto.
- * net.cc (fdsock): Make sockets explicitely noninheritable on NT.
-
-2002-06-09 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Correctly
- set number of links for directory, if appropriate.
-
-2002-06-10 Robert Collins <rbtcollins@hotmail.com>
-
- * thread.cc: Variation of a patch from Thomas Pffaf.
- (__pthread_detach): Cleanup thread object if the thread has terminated.
- (__pthread_join): Change order of error checks, and lock against
- join/detach/exit races.
- (__pthread_exit): Lock object against join/detach/exit races.
- (pthread::thread_init_wrapper): Ditto.
- (thread_init_wrapper): Rename to pthread::thread_init_wrapper.
- (pthread::create): Check that the mutex initialized correctly.
- (pthread::push_cleanup_handler): Lock against potential cancellation
- race. NB: this may not be required if pthread_cleanup_push is non-
- cancelable.
- * thread.h (pthread::mutex): New member.
- (thread_init_wrapper): Rename to pthread::thread_init_wrapper.
- (pthread::thread_init_wrapper_: New static member.
-
-2002-06-10 Robert Collins <rbtcollins@hotmail.com>
-
- * cygwin.din: Add _pthread_cleanup_push and _pthread_cleanup_pop.
- * pthread.cc: Change __pthread_self to pthread::self() thruoghout.
- (_pthread_cleanup_push): New function.
- (_pthread_cleanup_pop): Ditto.
- * thread.cc: Thanks to Thomas Pfaff for the pthread cleanup_push,_pop
- patch, this work is derived from that.
- Change __pthread_self to pthread::self() thruoghout.
- (__pthread_self): Rename to pthread::self.
- (pthread::self): New method.
- (pthread::pthread): Initialize new member.
- (pthread::push_cleanup_handler): New method.
- (pthread::pop_cleanup_handler): New method.
- (pthread::pop_all_cleanup_handlers): New method.
- (__pthread_exit): Pop all cleanup handlers.
- * thread.h (pthread::push_cleanup_handler): Declare.
- (pthread::pop_cleanup_handler): Ditto.
- (pthread::pop_all_cleanup_handlers): Ditto.
- (pthread::self): New static method.
- (__pthread_exit): Give C++ linkage.
- (__pthread_join): Ditto.
- (__pthread_detach): Ditto.
- (__pthread_self): Remove.
-
-2002-04-24 Thomas Pfaff <tpfaff@gmx.net>
-
- * include/pthread.h (__pthread_cleanup_handler): New structure.
- (pthread_cleanup_push): Rewritten.
- (pthread_cleanup_pop): Ditto.
- (_pthread_cleanup_push): New prototype.
- (_pthread_cleanup_pop): Ditto.
-
-2002-04-24 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.cc (thread_init_wrapper): Check if thread is already joined.
- (__pthread_join): Set joiner first.
- (__pthread_detach): Ditto.
-
-2002-06-10 Robert Collins <rbtcollins@hotmail.com>
-
- * cygserver_transport.cc (create_server_transport): Finish the split
- out of sockets code from transport_layer_base. Thanks to Nicholas
- Wourms and Conrad Scott for catching this.
-
-2002-06-08 Christopher Faylor <cgf@redhat.com>
-
- * pinfo.cc (pinfo_dummy): Initialize to correct size.
-
-2002-06-08 Christopher Faylor <cgf@redhat.com>
-
- * path.cc: Change MOUNT_AUTO to MOUNT_CYGDRIVE throughout.
- * shared_info.h (CURR_MOUNT_MAGIC): Update.
-
-2002-06-08 Christopher Faylor <cgf@redhat.com>
-
- * external.cc (cygwin_internal): Make v1 mount table access invalid.
- * path.cc (mount_info::init): Remove had_to_create_mount_areas initialization.
- (mount_info::from_registry): Remove v1 table import.
- (mount_info::read_v1_mounts): Eliminate.
- (mount_info::import_v1_mounts): Ditto.
- * shared_info.h (mount_info): Ditto for both of above.
- * sys/mount.h (MOUNT_DEVFS): New enum.
- (MOUNT_PROC): Ditto.
-
-2002-06-08 Christopher Faylor <cgf@redhat.com>
-
- * include/wchar.h: Define __need_size_t.
-
-2002-06-07 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_socket.cc (fhandler_socket::fstat): Don't assume that socket
- is unix-domain socket.
-
-2002-06-07 Christopher Faylor <cgf@redhat.com>
-
- * times.cc (hires_ms::prime): Set init flag.
-
-2002-06-07 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * times.cc (hires_ms::prime): Adjust epoch of initime_us from 1601 to
- 1970.
-
-2002-06-06 Christopher Faylor <cgf@redhat.com>
-
- * autoload.cc (timeGetDevCaps): Define new autoload function.
- (timeGetTime): Ditto.
- (timeBeginPeriod): Ditto.
- (timeEndPeriod): Ditto.
- * hires.h (hires_base): New class. Rename from hires.
- (hires_us): New class.
- (hires_ms): New class.
- * strace.cc (strace::microseconds): Use hires_us class.
- * times.cc (gettimeofday): Use hires-ms class.
- (hires_us::prime): Rename from hires::prime.
- (hires_us::usecs): Rename from hires:usecs.
- (hires_ms::prime): New method.
- (hires_ms::usecs): New method.
- (hires_ms::~hires_ms): New destructor.
-
-2002-06-06 Christopher Faylor <cgf@redhat.com>
-
- * autoload.cc (noload): Correctly save argument count register.
-
-2002-06-05 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * fhandler.cc (fhandler_base::fstat): Initialise tv_nsec member of
- st_atim, st_mtim, and st_ctim fields.
- * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Ditto.
- * fhandler_process.cc (fhandler_process::fstat): Ditto.
- * glob.c (stat32_to_STAT): Copy across the whole st_atim, st_mtime, and
- st_ctim fields.
- * syscalls.cc (stat64_to_stat32): Ditto.
- * times.cc (to_timestruc_t): New function.
- (time_as_timestruc_t): New function.
- * winsup.h: Add to_timestruc_t and time_as_timestruc_t functions.
- * include/cygwin/stat.h: Replace time_t with timestruc_t throughout for
- all file times, removing the st_spare1, st_spare2, and st_spare3 fields
- in the process. Add macros to access tv_sec fields by old names.
- * include/cygwin/types.h: Typedef timespec_t and timestruc_t as struct
- timespec.
-
-2002-06-03 Pierre Humblet <pierre.humblet@ieee.org>
-
- * sec_helper.cc (lookup_name): Suppress.
- * security.cc (alloc_sd): Remove logsrv argument.
- Remove two calls to lookup_name.
- (set_security_attribute): Remove logsrv argument.
- Remove logsrv argument in call to alloc_sd.
- (set_nt_attribute): Remove logsrv argument.
- Remove logsrv argument in call to set_security_attribute.
- (set_file_attribute): Remove logsrv argument.
- Remove logsrv argument in call to set_nt_attribute.
- (set_file_attribute): Remove logsrv argument.
- Remove logsrv argument in call to set_file_attribute.
- * syscalls.cc (chown_worker): Remove logserver argument in
- call to set_file_attribute.
- (chmod): Ditto.
- * shm.cc (shmget): Remove logsrv argument in call to alloc_sd.
- * uinfo.cc (internal_getlogin): Replace calls to
- lookup_name by call to LookupAccountName.
- * security.h: Remove logsrv in declarations of set_file_attribute
- and alloc_sd. Remove declaration of lookup_name.
-
-2002-06-05 Christopher Faylor <cgf@redhat.com>
-
- * child_info.h (CHILD_INFO_MAGIC): Oops. Revert previous change. gcc
- 3.1 bug?
-
-2002-06-05 Christopher Faylor <cgf@redhat.com>
-
- * child_info.h (CHILD_INFO_MAGIC): Update.
-
-2002-06-05 Christopher Faylor <cgf@redhat.com>
-
- * strace.cc (strace::hello): Set inited, when appropriate.
-
-2002-06-05 Christopher Faylor <cgf@redhat.com>
-
- * cygwin.din: Eliminate some newlib wrappers.
- * path.cc (get_devn): Only consider first 99 potential com devices.
- (get_device_number): Ditto.
- * times.cc (_times): Eliminate.
- (_times): Rename from times().
-
-2002-06-05 Christopher Faylor <cgf@redhat.com>
-
- * dir.cc (rmdir): Streamline. Detect attempts to remove directories
- from "read-only" virtual devices. (Suggested by Pavel Tsekov)
- * syscalls.cc (unlink): Detect attempts to remove directories from
- "read-only" virtual devices. (From Pavel Tsekov)
-
-2002-06-05 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (handle_to_fn): Check error return value from NtQueryObject
- first before seeing if name buffer is NULL.
-
- * grp.cc (read_etc_group): Fix gcc warning regarding snprintf format.
- * passwd.cc (read_etc_passwd): Ditto.
-
-2002-04-18 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.h (pthread::joiner): New member.
- * thread.cc (pthread::pthread): Initialize joiner to NULL
- (pthread::create): Increment of thread counter moved from
- __pthread_create to this location.
- (__pthread_create): Increment thread counter removed.
- (thread_init_wrapper): Set joiner to self when thread was created
- detached.
- (__pthread_exit): delete thread when it is detached and not
- joined.
- (__pthread_join): Check for deadlock and delete thread when it has
- terminated.
- (__pthread_detach): Set joiner to self when thread state
- changed to detached.
-
-2002-06-05 Corinna Vinschen <corinna@vinschen.de>
-
- * grp.cc (read_etc_group): When emulating nonexisting group file on
- NT systems, read primary group SID from process token. Use that info
- to create correct group entry. On error or on 9x systems fallback
- to emulating Administrators group as before.
- * passwd.cc (read_etc_passwd): When emulating nonexisting passwd file
- on NT systems, read user and primary group SID from process token.
- Use that info to create correct passwd entry. On error or on 9x
- systems fallback to emulating user with Administrator user id and
- Administrators group as before.
-
-2002-06-05 Corinna Vinschen <corinna@vinschen.de>
-
- * grp.cc (etc_group): Removed.
- (parse_grp): Make line parameter nonconst. Don't copy data into new
- allocated memory. Check for CR instead of LF to accomodate new
- read method.
- (add_grp_line): Make line parameter nonconst.
- (read_etc_group): Rearrange using new pwdgrp_read class.
- * passwd.cc (parse_pwd): Don't copy data into new allocated memory.
- Check for CR instead of LF to accomodate new read method.
- (read_etc_passwd): Rearrange using new pwdgrp_read class.
- * pwdgrp.h (pwdgrp_check::set_last_modified): Use different
- parameters.
- (class pwdgrp_read): New class for opening and reading passwd and
- group files.
-
-2002-06-04 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (handle_to_fn): Attempt to handle "raw" accesses to remote
- shares.
- * path.cc (mount_info::conv_to_win32_path): Set flags to binary when
- mount entry is not found.
- (mount_info::set_flags_from_win32_path): Ditto.
-
-2002-06-04 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (handle_to_fn): Correct placement and length of name
- buffer. (Suggested by Pavel Tsekov)
-
-2002-06-04 Christopher Faylor <cgf@redhat.com>
-
- Remove fcntl.h includes throughout.
- * fhandler.h: Move fcntl.h include here.
- (fhandler_base::set_flags): Accept supplied_bin argument. Make
- non-inlined.
- * dtable.cc (dtable::init_std_file_from_handle): Just use binmode from
- pc.
- (reset_to_open_binmode): Use set_flags.
- * cygwin.din (open): Avoid newlib wrapper.
- (read): Ditto.
- (unlink): Ditto.
- (write): Ditto.
- * fhandler.cc (fhandler_base::set_flags): Accept supplied_bin argument.
- Make binmode decisions here.
- (fhandler_base::open): Avoid using pc if it is NULL. Eliminate binmode
- logic. Just call set_flags with binmode argument.
- (fhandler_base::init): Call set_flags with binmode argument.
- * fhandler_clipboard.cc (fhandler_dev_clipboard::open): Ditto.
- * fhandler_console.cc (fhandler_console::open): Ditto.
- (fhandler_console::init): Force binary on open.
- * fhandler_disk_file.cc (fhandler_disk_file::open): Don't set binmode
- here. Let it happen in base class.
- * fhandler_dsp.cc (fhandler_dev_dsp::open): Force binmode open. Set
- return value appropriately if unable to open.
- * fhandler_proc.cc (fhandler_proc::open): Make sure flags are set
- before open_status.
- * fhandler_process.cc (fhandler_process::open): Ditto.
- * fhandler_registry.cc (fhandler_registry::open): Ditto.
- * fhandler_random.cc (fhandler_dev_random::fhandler_dev_random): Ditto.
- * fhandler_raw.cc (fhandler_dev_raw::open): Force O_BINARY by default.
- * fhandler_serial.cc (fhandler_serial::init): Ditto.
- * fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
- (fhandler_pty_master::open): Ditto.
- * fhandler_virtual.cc (fhandler_virtual::open): Ditto.
- * fhandler_windows.cc (fhandler_windows::open): Ditto.
- * fhandler_zero.cc (fhandler_dev_zero::open): Ditto.
- * net.cc (fdsock): Ditto.
- * path.cc (path_conv::check): Avoid checking for executable extension
- when directory. (Suggested by Pavel Tsekov)
- (set_flags): Set PATH_TEXT explicitly, when appropriate.
- (mount_info::conv_to_win32_path): Use set_flags() to set path flags.
- * path.h (PATH_TEXT): New enum.
- (path_conv::binmode): Return appropriate constant based on binmode.
- * pipe.cc (make_pipe): Set binmode to O_TEXT xor O_BINARY.
- * syscalls.cc (setmode_helper): Make debugging message a little
- clearer.
- (setmode): Set binmode via set_flags.
-
-2002-06-04 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_socket): Add private method
- fixup_after_fork (bool, HANDLE).
- * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Move
- functionality to new private method. Add closing parent socket
- if not called from dup(). Create method new calling private method
- with appropriate parameter.
- (fhandler_socket::fixup_after_exec): Call private method
- fixup_after_fork with appropriate parameter.
- (fhandler_socket::dup): Ditto.
-
-2002-06-04 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_dsp.cc (fhandler_dev_dsp::open): Set errno to EACCES if
- requested mode isn't supported.
-
-2002-06-03 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.cc (fhandler_base::open): Don't set binmode if already set.
- Don't check for file. Files should already be set. Report on binary
- mode for debugging.
- (fhandler_base::fhandler_base): Don't set default binmode here. That's
- for later.
- * fhandler_console.cc (fhandler_console::output_tcsetattr): Don't set
- binmode, ever, for console.
- * fhandler_disk_file.cc (fhandler_disk_file::open): Always set the
- binary mode to the value derived from mount table.
- * path.cc (mount_info::conv_to_win32_path): Default to binmode if path
- does not translate into anything in the mount table.
-
-2002-06-03 Corinna Vinschen <corinna@vinschen.de>
-
- * external.cc (cygwin_internal): Add CW_EXTRACT_DOMAIN_AND_USER
- handling to call extract_nt_dom_user() from applications.
- * include/sys/cygwin.h (cygwin_getinfo_types): Add
- CW_EXTRACT_DOMAIN_AND_USER.
-
-2002-06-03 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (stat64_to_stat32): Transform st_dev correctly.
- (fstat64): Add evaluating st_ino and st_dev.
- (stat_worker): Evaluate st_dev as 32 bit value.
- * include/cygwin/stat.h: Use new dev_t definition throughout.
- * include/cygwin/types.h: Define __dev16_t and __dev32_t. Define
- dev_t according to __CYGWIN_USE_BIG_TYPES__ setting.
- * include/sys/sysmacros.h: Define major, minor and makedev
- according to __CYGWIN_USE_BIG_TYPES__ setting.
-
-2002-06-03 Pierre Humblet <pierre.humblet@ieee.org>
-
- * syscalls.cc (setegid32): Verify the correctness of the gid
- of the group returned by getgrgid32.
-
-2002-06-03 Pierre Humblet <pierre.humblet@ieee.org>
-
- * security.cc (lsa2wchar): Suppressed.
- (get_lsa_srv_inf): Suppressed.
- (get_logon_server_and_user_domain): Suppressed.
- (get_logon_server): Essentially new.
- (get_user_groups): Add "domain" argument. Only lookup the
- designated server and use "domain" in LookupAccountName.
- (is_group_member): Simplify the arguments.
- (get_user_local_groups): Simplify the arguments. Do only a
- local lookup. Use "BUILTIN" and local domain in LookupAccountName.
- (get_user_primary_group). Only lookup the designated server.
- (get_group_sidlist): Remove logonserver argument. Do not lookup
- any server for the SYSTEM account.
- (create_token): Delete logonserver and call to get_logon_server.
- Adjust arguments of get_group_sidlist, see above.
- * security.h: Delete declaration of get_logon_server_and_user_domain
- and add declaration of get_logon_server.
- * uinfo.cc (internal_get_login): Call get_logon_server instead of
- get_logon_server_and_user_domain.
-
-2002-06-02 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (handle_to_fn): Use largest match for device. Correctly
- (?) deal with remote drive weirdness.
-
-2002-06-02 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): Check
- specifically for non-existent file, first.
- (fhandler_disk_file::fstat): Perform fd open on files with funny
- characters.
-
-2002-06-02 Christopher January <chris@atomice.net>
-
- * fhandler_process.cc (fhandler_process::open): Set fileid.
-
-2002-06-02 Christopher Faylor <cgf@redhat.com>
-
- Remove unneeded sigproc.h includes throughout.
- * fhandler.h (fhandler_proc::fill_filebuf): Take a pinfo argument.
- * fhandler_proc.cc (fhandler_proc::get_proc_fhandler): Simplify search
- for given pid.
- (fhandler_proc::readdir): Assume that pid exists if it shows up in the
- winpid list.
- * fhandler_process.cc (fhandler_process::open): Simplify search for
- given pid. Call fill_filebuf with pinfo argument.
- (fhandler_process::fill_filebuf): Pass pinfo here and assume that it
- exists.
- * pinfo.h (pinfo::remember): Define differently if sigproc.h is not
- included.
-
-2002-06-02 Christopher Faylor <cgf@redhat.com>
-
- * dll_init.cc (dll_list::detach): Don't run destructor on exit.
-
-2002-06-01 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.cc (fhandler_base::fstat): Move dev and ino calculation into
- caller.
- * syscalls.cc (stat_worker): Calculate dev and ino calculation here, if
- zero.
- * fhandler_proc.cc (fhandler_proc::fhandler_proc): Minor reorg for
- debugging.
- * fhandler_process.cc (fhandler_process::exists): Return 0 on
- nonexistence.
- (fhandler_process::fstat): Simplify pid logic.
- * fhandler_tape.cc (fhandler_dev_tape::fstat): Minor reformatting.
-
-2002-06-01 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (chdir): Don't allow cd'ing to a non-directory virtual path.
-
-2002-05-31 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_disk_file.cc (readdir): Move inode calculation into caller.
- (fhandler_cygdrive::readdir): Add "." and "..".
- * dir.cc (readdir): Move inode calculation here so that fhandler
- readdirs can benefit.
-
-2002-05-31 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_console.cc (fhandler_console::open): Reinstate setting of
- flags.
-
- * dtable.cc (dtable::init_std_file_from_handle): Default to using
- binmode derived from path_conv, when required.
- * fhandler.h (fhandler_base::get_w_binary): Default to binmode if
- nothing else is specified.
- * fhandler.h (fhandler_base::get_r_binary): Ditto.
-
- * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_handle): Work
- around g++ warning.
-
- * path.cc (path_conv::check): Remove a debugging statement.
-
-2002-05-31 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_console.cc (fhandler_console::open): Always default to
- binmode.
- (fhandler_console::write_normal): Don't honor binmode setting. There
- is already a termios setting for this.
- (fhandler_console::init): Correct argument order in init call.
-
-2002-05-31 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.cc (fhandler_base::open): Make default open mode == binmode.
- (fhandler_base::init): Set open flags based on derived binmode argument.
-
-2002-05-31 Christopher Faylor <cgf@redhat.com>
-
- * dll_init.cc (dll_list::init): Eliminate unneeded debugging statement.
-
-2002-05-31 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_proc.cc (fhandler_proc::readdir): Set errno when no more
- files.
- * fhandler_process.cc (fhandler_process::readdir): Ditto.
- * fhandler_registry.cc (fhandler_registry::readdir): Ditto.
-
-2002-05-30 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (path_conv::check): Set fileattr to INVALID_FILE_ATTRIBUTES
- for nonexistent virtual device path.
- (chdir): Set correct errno when attempt is made to cd to nonexistent
- virtual device path.
-
-2002-05-30 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fstat): Always call
- fstat_by_name if fd is not opened to allow fstat_by_name to properly
- set errno.
-
-2002-05-30 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc: Replace autoload statments for ZwXXX by NtXXX.
- Drop ZwQuerySystemInformation since NtQuerySystemInformation was
- already available.
- * fhandler_proc.cc (format_proc_uptime): Replace call to
- ZwQuerySystemInformation by call to NtQuerySystemInformation.
- (format_proc_stat): Ditto.
- * fhandler_process.cc (format_process_stat): Replace call to
- ZwQueryInformationProcess by call to NtQueryInformationProcess.
- (get_process_state): Ditto.
- (get_mem_values): Ditto. Replace call to ZwQueryVirtualMemory by
- call to NtQueryVirtualMemory.
- * ntdll.h: Cleanup. Drop ZwQuerySystemInformation since
- NtQuerySystemInformation was already available. Replace declarations
- of ZwXXX functions by declarations of NtXXX.
- * pinfo.cc (winpids::enumNT): Replace call to ZwQuerySystemInformation
- by call to NtQuerySystemInformation.
-
-2002-05-29 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.cc (binmode): Default to binmode when mode is not known.
-
-2002-05-29 Christopher Faylor <cgf@redhat.com>
-
- * include/sys/cygwin.h (EXTERNAL_PINFO_VERSION): Reinstate.
- * external.cc (fillout_pinfo): Use it.
-
-2002-05-29 Corinna Vinschen <corinna@vinschen.de>
-
- * external.cc (fillout_pinfo): Use new version define.
- * include/sys/cygwin.h (external_pinfo): Define
- EXTERNAL_PINFO_VERSION_16_BIT and EXTERNAL_PINFO_VERSION_32_BIT
- instead of just EXTERNAL_PINFO_VERSION.
-
-2002-05-29 Christopher Faylor <cgf@redhat.com>
-
- * external.cc (fillout_pinfo): Set new version field in external_pinfo
- structure.
- * include/sys/cygwin.h (external_pinfo): Replace strace_file with
- version field.
-
-2002-05-29 Corinna Vinschen <corinna@vinschen.de>
-
- Change internal uid datatype from __uid16_t to __uid32_t
- throughout.
- * cygwin.din: Export new symbols getpwuid32, getpwuid_r32, getuid32,
- geteuid32, setuid32, seteuid32.
- * passwd.cc (getpwuid32): New function.
- (getpwuid_r32): Ditto.
- * syscalls.cc (seteuid32): Ditto.
- (setuid32): Ditto.
- * uinfo.cc (getuid32): Ditto.
- (geteuid32): Ditto.
- * winsup.h (uid16touid32): New macro, correct casting from __uid16_t
- to __uid32_t.
- (gid16togid32): Ditto fir gids.
- (getuid32): Declare.
- (geteuid32): Ditto.
- (getpwuid32): Ditto.
- * include/sys/cygwin.h (struct external_pinfo): Add members uid32 and
- gid32.
-
-2002-05-29 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/socket.h: Protect some symbols against multiple
- definition.
- * include/netinet/ip.h: Ditto.
- * include/netinet/tcp.h: Ditto.
-
-2002-05-29 Wu Yongwei <adah@netstd.com>
-
- * include/netinet/ip.h: Replace by BSD derived version of the file.
- * include/netinet/tcp.h: Ditto.
- * include/netinet/udp.h: New file.
- * include/cygwin/ip.h: Remove.
-
-2002-05-29 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (dtable::init_std_file_from_handle): Attempt stronger
- detection of invalid handle.
- (handle_to_fn): Detect pathological condition where NT resets the
- buffer pointer to NULL on an invalid handle.
-
-2002-05-28 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Properly
- check for whether we should be opening the file to search for #!
- characters. Set path_conv structure execability, too, when
- appropriate.
-
-2002-05-28 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (set_security_attribute): Call getegid32() instead of
- getegid().
- * include/cygwin/grp.h: Declare getegid32().
-
-2002-05-28 Corinna Vinschen <corinna@vinschen.de>
-
- Change internal gid datatype from __gid16_t to __gid32_t
- throughout.
- * cygwin.din: Export new symbols chown32, fchown32, getegid32,
- getgid32, getgrgid32, getgrnam32, getgroups32, initgroups32, lchown32,
- setgid32, setegid32, getgrent32.
- * grp.cc (grp32togrp16): New static function.
- (getgrgid32): New function.
- (getgrnam32): Ditto.
- (getgrent32): Ditto.
- (getgroups32): Change name of internal function from getgroups.
- (getgroups32): New function.
- (initgroups32): Ditto.
- * syscalls.cc (chown32): Ditto.
- (lchown32): Ditto.
- (fchown32): Ditto.
- (setegid32): Ditto.
- (setgid32): Ditto.
- * uinfo.cc (getgid32): Ditto.
- (getegid32): Ditto.
- * include/cygwin/grp.h: Remove declaration of getgrgid() and getgrnam().
- Declare getgrgid32() and getgrnam32() instead. Declare getgid32().
-
-2002-05-27 Christopher Faylor <cgf@redhat.com>
-
- * autoload.cc (noload): Properly mask low order word for determining
- number of bytes to pop.
-
-2002-05-27 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fstat): Minor logic
- cleanup.
-
-2002-05-27 Christopher Faylor <cgf@redhat.com>
-
- * autoload.cc (LoadFuncEx): Define via new LoadFuncEx2 macro.
- (LoadFuncEx2): Adapt from LoadFuncEx. Provides control of return
- value for nonexistent function.
- (NtQueryObject): Declare.
- (IsDebuggerPresent): Declare via LoadFuncEx2 and always return true if
- not available.
- * debug.h (being_debugged): Just rely on IsDebuggerPresent return
- value.
- * dtable.cc (handle_to_fn): New function.
- (dtable::init_std_file_from_handle): Attempt to derive std handle's
- name via handle_to_fn.
- (dtable::build_fhandler_from_name): Fill in what we can in path_conv
- structure when given a handle and path doesn't exist.
- * fhandler.cc (fhandler_base::open): Don't set the file pointer here.
- Use pc->exists () to determine if file exists rather than calling
- GetFileAttributes again.
- * fhandler.h (fhandler_base::exec_state_isknown): New method.
- (fhandler_base::fstat_helper): Add extra arguments to declaration.
- (fhandler_base::fstat_by_handle): Declare new method.
- (fhandler_base::fstat_by_name): Declare new method.
- * fhandler_disk_file (num_entries): Make __stdcall.
- (fhandler_base::fstat_by_handle): Define new method.
- (fhandler_base::fstat_by_name): Define new method.
- (fhandler_base:fstat): Call fstat_by_{handle,name} as appropriate.
- (fhandler_disk_file::fstat_helper): Accept extra arguments for filling
- out stat structure. Move handle or name specific stuff to new methods
- above.
- (fhandler_disk_file::open): Use real_path->exists rather than calling
- GetFileAttributes again.
- * ntdll.h (FILE_NAME_INFORMATION): Define new structure.
- (OBJECT_INFORMATION_CLASS): Partially define new enum.
- (OBJECT_NAME_INFORMATION): Define new structure.
- (NtQueryInformationFile): New declaration.
- (NtQueryObject): New declaration.
- * path.cc (path_conv::fillin): Define new method.
- * path.h (path_conv::fillin): Declare new method.
- (path_conv::drive_thpe): Rename from 'get_drive_type'.
- (path_conv::volser): Declare new method.
- (path_conv::volname): Declare new method.
- (path_conv::root_dir): Declare new method.
- * syscalls.cc (fstat64): Send real path_conv to fstat as second
- argument.
-
-2002-05-24 Pierre Humblet <pierre.humblet@ieee.org>
-
- * security.cc (lsa2str): New function.
- (get_priv_list): Call lsa2str instead of sys_wcstombs.
-
-2002-05-22 Pierre Humblet <pierre.humblet@ieee.org>
-
- * syscalls.cc (seteuid): Do not take allow_ntsec into account.
- Attempt to use an existing or new token even when the uid
- matches orig_uid, but the gid is not in the process token.
- Major reorganization after several incremental changes.
- (setegid): Do not take allow_ntsec into account. Minor
- reorganization after several incremental changes.
-
-2002-05-26 Christopher Faylor <cgf@redhat.com>
-
- * debug.h (being_debugged): New macro.
- * dtable.cc (dtable::extend): Use new macro.
- * exceptions.cc (try_to_debug): Ditto.
- * strace.cc (strace::hello): Only output debugging info when we think
- we're being debugged.
-
-2002-05-25 Robert Collins <rbtcollins@hotmail.com>
-
- * winsup.h: Remove duplicate declarations of malloc_lock and
- malloc_unlock.
-
-2002-05-24 Christopher Faylor <cgf@redhat.com>
-
- Remove unneeded sync.h, where appropriate, throughout.
- Remove unneeded heap.h, where appropriate, throughout.
- Remove unneeded exceptions.h, where appropriate, throughout.
- Remove unneeded perprocess.h, where appropriate, throughout.
-
-2002-05-22 Pierre Humblet <pierre.humblet@ieee.org>
-
- * security.cc (create_token): Call __sec_user() instead of
- sec_user() to remove dependence on allow_ntsec. Verify that
- the returned sd is non-null.
-
-2002-05-25 Robert Collins <rbtcollins@hotmail.com>
-
- * gmon.c (fake_sbrk): Correctly return -1 on failed malloc's.
-
-2002-05-24 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (dtable::build_fhandler_from_name): Just pass posix path
- along to set_name via return_and_clear_normalized_path.
- (dtable::build_fhandler): New method with const char * argument.
- (dtable::reset_unix_path_name): Eliminate.
- (dtable::dup_worker): Use correct build_fhandler method.
- * mmap.cc (mmap_record::alloc_fh): Ditto.
- * dtable.h (dtable::build_fhandler): New method.
- (dtable::reset_unix_path_name): Eliminate.
- * fhandler.cc (fhandler_base::set_name): Assume that unix_name has
- already been cmalloced.
- (fhandler_base::reset_unix_path_name): Eliminate.
- (fhandler_base::~fhandler_base): Coercion for cfree.
- * fhandler.h (fhandler_base::unix_path_name): Make const char *.
- (fhandler_base::win32_path_name): Ditto.
- (fhandler_base::reset_unix_path_name): Eliminate.
- * fhandler_disk_file.cc (fhandler_cygdrive::set_drives): Accommodate
- const char *ness of win32_path_name.
- * fhandler_socket.cc (fhandler_socket::fstat): Accommodate new set_name
- requirements.
- * path.cc (path_conv::return_and_clear_normalized_path): New method.
- (path_conv::clear_normalized_path): Eliminate.
- (path_conv::~path_conv): Ditto.
- (path_conv::check): Accommodate new build_fhandler method.
- * path.h (path_conv::~path_conv): Eliminate.
- (path_conv::clear_normalized_path): Ditto.
- (path_conv::return_and_clear_normalized_path): Declare new method.
-
-2002-05-23 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (path_conv::check): Make sure any trailing path component is
- part of potential normalized posix path.
-
-2002-05-23 Christopher Faylor <cgf@redhat.com>
-
- * smallprint.c (__small_vsprintf): Implement '%o' after all these
- years.
-
-2002-05-22 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.h (fhandler_virtual::exists): Eliminate path argument.
- (fhandler_proc::exists): Ditto.
- (fhandler_registry::exists): Ditto.
- (fhandler_process::exists): Ditto.
- * fhandler_proc.cc (fhandler_proc::exists): Ditto. Use built-in name.
- * fhandler_process.cc (fhandler_process::exists): Ditto.
- (fstat): Ditto.
- * fhandler_registry.cc (fhandler_registry::exists): Ditto.
- (fhandler_registry::fstat): Ditto.
- * fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
- * path.cc (path_conv::check): Ditto. Add debugging.
-
-2002-05-22 Christopher Faylor <cgf@redhat.com>
-
- * syscalls.cc (dup): Always call dup2 for error handling.
-
-2002-05-22 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/types.h: Revert previous patch.
-
-2002-05-22 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/types.h: Define pthread stuff only if _POSIX_THREADS
- is defined.
-
-2002-05-19 Pierre Humblet <pierre.humblet@ieee.org>
-
- * security.cc (open_local_policy): Initialize lsa to
- INVALID_HANDLE_VALUE instead of NULL.
- (get_logon_server_and_user_domain): Test for INVALID_HANDLE_VALUE
- instead of NULL.
- (create_token): Both of the above.
-
-2002-05-18 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fstat): Make handling of
- nlink consistent for remote files.
-
-2002-05-18 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (path_conv::check): Always set executable bit for executable
- extension.
-
-2002-05-17 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.cc (fhandler_base::lseek): Avoid calling SetFilePointer with
- high order part of 64 bit address on OS's which do not support that
- kind of operation. Otherwise Windows 95 will become confused.
-
-2002-05-16 Pierre Humblet <pierre.humblet@ieee.org>
-
- * fhandler_raw.cc (fhandler_dev_raw::open): Replace set_errno()
- by __seterrno_from_win_error().
- * security.cc (open_local_policy): Ditto.
- (get_lsa_srv_inf): Ditto.
- (get_user_groups): Ditto.
- (get_user_primary_group): Ditto.
- (create_token): Ditto.
- (subauth): Ditto.
-
-2002-05-17 Corinna Vinschen <corinna@vinschen.de>
-
- * times.cc (utimes): Use FILE_WRITE_ATTRIBUTES even on 9x/Me when
- opening file for writing timestamp.
- * wincap.cc: Remove flag has_specific_access_rights.
- * wincap.h: Ditto.
-
-2002-05-13 Pierre Humblet <pierre.humblet@ieee.org>
-
- * syscalls.cc (seteuid): Set default dacl in process token.
- Replace in-line code by call to verify_token().
- (setegid): Reverse change from 2002-01-21. Add call to
- RevertToSelf and set primary group in impersonation token.
- * security.cc (create_token): Store pgrpsid in token security
- descriptor, except if it already appears in my_grps.
- Use sec_acl() in place of get_dacl().
- (verify_token): Create from code in seteuid(), with tighter checks.
- (get_dacl): Deleted.
- (get_group_sidlist): Add argument to indicate if pgrpsid is already
- in the groups.
- * security.h: Define verify_token().
- * autoload.cc: Load GetKernelObjectSecurity().
-
-2002-05-13 Mark Bradshaw <bradshaw@staff.crosswalk.com>
-
- * cygwin.din: Add strlcat and strlcpy.
- * include/cygwin/version.h: Increment API minor version number.
-
-2002-05-09 Pierre Humblet <pierre.humblet@ieee.org>
-
- * shared.cc (__sec_user): Split into sec_acl() and call orig_sid().
- (sec_acl): Create from part of __sec_user(), except creator/owner.
- * security.h: Define sec_acl() and MAX_DACL_LEN.
-
-2002-05-12 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_disk_file.cc (fhandler_disk_file::open): Avoid using
- O_DIROPEN when OS doesn't support it. Return proper errno in that
- case.
-
-2002-05-12 Christopher Faylor <cgf@redhat.com>
-
- * syscalls.cc (_read): Change error to EBADF if attempt to read from a
- non-readable fd.
-
-2002-05-11 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.h (executable_states): For now, make dont_care_if_executable
- equivalent to not_executable.
- * sys/mount.h: Define MOUNT_NOTEXEC.
- * path.h (fs_info): New class.
- (path_conv): Move fs-specific fields to new 'fs' structure.
- (path_conv::update_fs_info): Move to fs_info and rename to just 'update'.
- * path.cc (fs_info::update): Ditto. Return 'true' if successful.
- (fillout_mntent): Add ',noexec' to list of reported options.
-
-2002-05-11 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_virtual.cc (fhandler_virtual::close): Quiet a compiler
- warning.
-
-2002-05-10 Christopher January <chris@atomice.net>
-
- * autoload.cc: Add dynamic load statements for
- 'ZwQueryInformationProcess' and 'ZwQueryVirtualMemory'.
- * fhandler.h: Change type of bufalloc and filesize members of
- fhandler_virtual from int to size_t. Change type of position member
- from __off32_t to __off64_t. Add new fileid member to fhandler_virtual
- class. Make seekdir take an __off64_t argument. Make lseek take an
- __off64_t argument. Add fill_filebuf method to fhandler_virtual. Add
- fill_filebuf method to fhandler_proc. Add fill_filebuf method to
- fhandler_registry. Add fill_filebuf method to fhandler_process. Add
- saved_pid and saved_p members to fhandler_process.
- * fhandler_proc.cc (proc_listing_array): Add 'loadavg', 'meminfo', and 'stat'.
- (proc_fhandlers array): Ditto.
- (fhandler_proc::open): Use fill_filebuf to flesh out the file contents.
- (fhandler_proc::fill_filebuf): New method.
- (fhandler_proc::format_proc_meminfo): Ditto.
- (fhandler_proc::format_proc_stat): Ditto.
- (fhandler_proc::format_proc_uptime): Ditto.
- * fhandler_process.cc (process_listing): Add 'stat' and 'statm'.
- (fhandler_process::fstat): Find the _pinfo structure for the process
- named in the filename. Return ENOENT if the process is no longer
- around. Set the gid and uid fields of the stat structure.
- (fhandler_process::open): Store pid and pointer to _pinfo structure in
- saved_pid and saved_p respectively. Use fill_filebuf to flesh out file
- contents.
- (fhandler_proc::fill_filebuf): New method.
- (format_process_stat): New function.
- (format_process_status): Ditto.
- (format_process_statm): Ditto.
- (get_process_state): Ditto.
- (get_mem_values): Ditto.
- * fhandler_registry.cc (fhandler_registry::seekdir): Change argument
- type from __off32_t to __off64_t.
- (fhandler_registry::fill_filebuf): New method.
- * fhandler_virtual.cc (fhandler_virtual::seekdir): Change argument type
- from __off32_t to __off64_t.
- (fhandler_virtual::lseek): Ditto.
- (fhandler_virtual::fill_filebuf): New method.
- (fhandler_virtual::fhandler_virtual): Initialise fileid to -1.
- * wincap.cc: Set flag has_process_io_counters appropriately.
- * wincap.h: Add flag has_process_io_counters.
-
-2002-05-09 Christopher Faylor <cgf@redhat.com>
-
- * syscalls.cc (_write): Change error to EBADF if attempt to write to a
- non-writeable fd.
-
-2002-05-08 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.h (class cygheap_user): Add member `orig_psid'.
- Add method `orig_sid()'.
- * cygheap.cc (cygheap_user::set_sid): Maintain orig_psid.
-
-2002-04-28 Norbert Schulze <norbert.schulze@web.de>
-
- * localtime.cc (tzsetwall): Use wildabbr if generated timezone name
- length < 3.
-
-2002-05-05 Pierre Humblet <pierre.humblet@ieee.org>
-
- * spawn.cc (spawn_guts): Move call to set_process_privilege()
- to load_registry_hive().
- * registry.cc (load_registry_hive): ditto.
- * fork.cc (fork_parent): Call sec_user_nih() only once.
-
-2002-05-04 Christopher January <chris@atomice.net>
-
- * path.h (path_conv::path_conv): Initialise normalized_path to NULL.
-
-2002-05-03 Christopher Faylor <cgf@redhat.com>
-
- * net.cc (getdomainname): Change second argument of getdomainname to
- size_t.
-
-2002-05-03 Christopher January <chris@atomice.net>
-
- * fhandler_proc.cc (proc_listing): Add '.' and '..' to directory
- listing.
- (fhandler_proc::open): Change use of mode to flags. If the file does
- not exist already, fail with EROFS if O_CREAT flag is set. Change
- EROFS error to EACCES error when writing to a file. Use cmalloc to
- allocate memory for filebuf.
- (fhandler_proc::close): Use cfree to free filebuf.
- (fhandler_proc::get_proc_fhandler): Properly detect attempts to access
- unknown subdir.
- * fhandler_process.cc (process_listing): Add '.' and '..' to directory
- listing.
- (fhandler_process::open): Use cmalloc to allocate memory for filebuf.
- (fhandler_process::close): Use cfree to free filebuf.
- * fhandler_registry.cc (registry_listing): Add . and '..' to directory
- listing.
- (fhandler_registry::open): Move check for open for writing before
- open_key. Use cmalloc to allocate memory for filebuf.
- (fhandler_registry::close): Use cfree to free filebuf.
- (fhandler_registry::telldir): Use lower 16 bits of __d_position as
- position in directory.
- (fhandler_registry::seekdir): Ditto.
- * fhandler_virtual.cc (fhandler_virtual::write): Change EROFS error to
- EACCES error.
- (fhandler_virtual::open): Set the NOHANDLE flag.
- (fhandler_virtual::dup): Add call to fhandler_base::dup. Allocate
- child's filebuf using cmalloc. Copy filebuf from parent to child.
- (fhandler_virtual::close): Use cfree to free filebuf.
- (fhandler_virtual::~fhandler_virtual): Ditto.
- (from Chris Faylor <cgf@redhat.com>).
- (fhandler_registry::readdir): Add support for '.' and '..' files in
- subdirectories of /proc/registry.
- * path.cc (path_conv::check): Do not return ENOENT if a file is not
- found in /proc.
-
-2002-05-02 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_proc.cc (fhandler_proc::fstat): Use fhandler name rather
- than path_conv name.
- (fhandler_proc::open): Ditto.
- * fhandler_process.cc (fhandler_process::fstat): Use fhandler name
- rather than path_conv name.
- (fhandler_process::open): Ditto.
- * fhandler_registry.cc (fhandler_registry::fstat): Use fhandler name
- rather than path_conv name.
- (fhandler_registry::open): Ditto.
- * path.cc (path_conv::check): Don't copy posix path when virtual.
- (mount_info::conv_to_win32_path): Don't zero string when isproc. Just
- derive normal windows path.
-
- * path.h (path_conv::clear_normalized_path): Declare new method.
- * path.cc (path_conv::clear_normalized_path): Define new method.
- * dtable.cc (build_fhandler_from_name): Clear normalized path when
- finished to conserve space.
-
-2002-05-02 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_proc.cc (fhandler_proc::fstat): Prime with information from
- fhandler_base::fstat. Use defines rather than constants for permission
- settings.
-
-2002-04-30 Eric Blake <ebb9@email.byu.edu>
-
- * path.cc (hash_path_name): Improve hash function strength.
-
-2002-05-02 Robert Collins <rbtcollins@hotmail.com>
-
- * thread.cc (__pthread_cond_dowait): Fix a race on signalling from a
- thread woken by the same condition variable it's signalling on. Thanks
- to Michael Beach for the report and test case.
-
-2002-05-02 Christopher Faylor <cgf@redhat.com>
-
- * path.h (pathconv_arg): Add PC_POSIX.
- (path_conv): Add normalized_path field.
- * path.cc (path_conv::~path_conv): New destructor.
- (path_conv::check): Set normalized_path, where appropriate.
- * dtable.cc (build_fhandler_from_name): Use normalized path from
- path_conv.
- * syscalls.cc (chroot): Ditto.
-
- * cygheap.h: Remove path_prefix_p declaration.
-
-2002-02-26 Christopher January <chris@atomice.net>
- Christopher Faylor <cgf@redhat.com> (minor fixups)
-
- * Makefile.in: Add fhandler_proc.o, fhandler_registry.o,
- fhandler_process.o and fhandler_virtual.o.
- * dtable.cc (dtable::build_fhandler): Add entries for FH_PROC,
- FH_REGISTRY and FH_PROCESS. Set unix_name to the normalized posix
- path.
- * fhandler.h: Add constants for FH_PROC, FH_REGISTRY and FH_PROCESS.
- Add class declarations for fhandler_virtual, fhandler_proc,
- fhandler_registry and fhandler_virtual. Update fhandler_union
- accordingly.
- * fhandler_proc.cc: New file. Add implementation for fhandler_proc.
- * fhandler_virtual.cc: New file. Add implementation for
- fhandler_virtual.
- * fhandler_process.cc: New file. Add implementation for
- fhandler_process.
- * fhandler_registry.cc: New file. Add implementation for
- fhandler_registry.
- * path.cc (isproc): New macro.
- (isvirtual_dev): Ditto.
- * path.cc (path_conv::check): Add check for virtual devices.
- * path.cc (mount_info::conv_to_win32_path): Convert paths in /proc to
- empty Win32 paths.
- * path.cc (chdir): Replace check for FH_CYGDRIVE with more generic
- isvirtual_dev macro. Force setting of posix path for virtual
- fhandlers.
- * path.h (path_prefix_p): Declare.
-
-
-Wed May 1 16:06:02 2002 Jason Tishler <jason@tishler.net>
-
- * include/cygwin/types.h: Include <sys/sysmacros.h>.
-
-Wed Apr 17 11:27:04 2002 Jason Tishler <jason@tishler.net>
-
- * security.cc (get_lsa_srv_inf): Prevent extraneous backslashes for
- the NT Domain case.
-
-2002-04-12 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_accept): Set socket type for accepted socket.
- (socketpair): Set socket type for both sockets.
-
-2002-04-12 Egor Duda <deo@logos-m.ru>
-
- * fhandler.h (class fhandler_socket): New member to store socket type.
- (fhandler_socket::get_socket_type): Access it.
- (fhandler_socket::set_socket_type): Ditto.
- * net.cc (cygwin_socket): Store socket type.
- (cygwin_connect): Disable security checks for connectionless sockets.
- (cygwin_accept): Ditto.
-
-2002-04-09 Mark Bradshaw <bradshaw@staff.crosswalk.com>
-
- * cygwin.din: Add strptime.
- * include/cygwin/version.h: Increment API version number.
-
-2002-04-09 Corinna Vinschen <corinna@vinschen.de>
-
- * fork.cc (fork_child): Call fixup_mmaps_after_fork() somewhat earlier.
-
-2002-04-09 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Set read-only bit in
- file_attributes when adequate.
-
-2002-03-28 Christopher Faylor <cgf@redhat.com>
-
- * times.cc (gettimeofday): Fix typo in previous patch.
-
-2002-03-27 Wu Yongwei <adah@netstd.com>
-
- * times.cc (gettimeofday): Revert to setting timezone info if tz !=
- NULL.
-
-2002-03-21 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Always set
- st_[ug]id to value derived from get_file_attributes.
-
-2002-03-21 Christopher Faylor <cgf@redhat.com>
-
- * spawn.cc (find_exec): Return input if file not found.
-
-2002-03-19 Boris Schaeling <boriss@web.de>
-
- * poll.cc (poll): Add support for invalid descriptors.
-
-2002-03-15 Robert Collins <rbtcollins@hotmail.com>
-
- * fhandler.h (fhandler_termios::lseek): Override lseek.
- * fhandler_termios.cc (fhandler_termios::lseek): Implement this.
-
-2002-03-15 Christopher Faylor <cgf@redhat.com>
-
- * cygserver.cc: Include stdlib.h for exit declaration.
- * threaded_queue.cc: Ditto.
-
-2002-03-15 Christopher Faylor <cgf@redhat.com>
-
- * pinfo.cc (pinfo::init): Use PID_ALLPIDS flag to control when a
- redirected block should be marked as nonexistent.
- (winpids::add): Use PID_ALLPIDS when looking for all pids.
- * cygwin.h (PID_ALLPIDS): New enum element.
-
-2002-03-15 Corinna Vinschen <corinna@vinschen.de>
-
- * glob.c (stat32_to_STAT): New function.
- (g_lstat): Call user space functions always with 32 bit struct stat
- as a workaround.
- (g_stat): Ditto.
- * include/glob.h (struct glob): Don't prototype function pointers
- when compiling Cygwin.
-
-2002-03-14 Christopher Faylor <cgf@redhat.com>
-
- * pinfo.cc (pinfo::init): Properly handle execed process stub when
- PID_NOREDIR is specified.
-
-2002-03-13 Boris Schaeling <boriss@web.de>
-
- * poll.cc (poll): Remove variable open_fds. Rearrange and add code to
- fix settings of revents.
-
-2002-03-13 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap_record::map_map): Return -1 if VirtualProtect fails.
- (list::erase): New method with no argument. Erase latest record
- added.
- (mmap64): Fail if map_map() fails.
-
-2002-03-12 Corinna Vinschen <corinna@vinschen.de>
-
- * sysconf.cc (sysconf): Fix condition.
-
-2002-03-11 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (msync): Check area given by addr and len for being a
- contigeous mmap'd region.
-
-2002-03-11 Corinna Vinschen <corinna@vinschen.de>
-
- * fork.cc (fork_child): Call fixup_mmaps_after_fork() before
- closing parent process handle. Call fixup_mmaps_after_fork()
- with parent process handle as parameter.
- * mmap.cc (mmap_record::access): New method.
- (fixup_mmaps_after_fork): Take process handle as parameter.
- In case of FILE_MAP_COPY access, copy valid memory regions to child.
- * pinfo.h (fixup_mmaps_after_fork): Change prototype accordingly.
-
-2002-03-07 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (NetGetDCName): Add symbol.
- (NetServerEnum): Remove symbol.
- * security.cc (get_lsa_srv_inf): Call NetGetDCName() instead of
- NetServerEnum() since it's faster. Don't call it at all if machine
- is not a domain member.
-
-2002-03-06 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (normalize_posix_path): Avoid runs of '.'s > 2.
-
-2002-03-05 Christopher Faylor <cgf@redhat.com>
-
- * errno.cc: Change EPERM associated text to "Operation not permitted"
- throughout.
-
-2002-03-05 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_socket.cc (fhandler_socket::close): Respond to signals while
- looping, waiting for socket to close. Superstitiously clear last error
- when WSAEWOULDBLOCK.
-
-2002-03-05 Robert Collins <rbtcollins@hotmail.com>
-
- * cygserver_transport_pipes.cc (transport_layer_pipes::transport_layer_pipes):
- Always init - until static members work correctly.
- * shm.cc (shmget): Initialize the security descriptor - thanks Corinna!
- * include/sys/ipc.h: Make the ipc control constants partitioned off from the sem
- control constants.
-
-2002-03-04 Christian Lestrade <christian.lestrade@free.fr>
-
- * include/sys/termios.h: Define _POSIX_VDISABLE. Define CCEQ macro.
- * fhandler_termios.cc: Include <sys/termios.h>.
- (line_edit): Recognize disabled c_cc[] chars. Ignore VDISCARD when
- not in ICANON mode.
-
-2002-03-04 Dmitry Timoshkov <dmitry@baikal.ru>
-
- * syscalls.cc (truncate64): Use ftruncate64 directly to not lose
- upper 32 bits.
-
-2002-03-04 Robert Collins <rbtcollins@hotmail.com>
-
- * cygserver_shm.cc (delete_shmnode): New function.
- (client_request_shm::serve): Use it.
-
-2002-03-04 Robert Collins <rbtcollins@hotmail.com>
-
- * cygserver_shm.cc (client_request_shm::serve): Implement SHM_DETACH.
- * shm.cc (shmdt): Implement.
-
-2002-03-04 Robert Collins <rbtcollins@hotmail.com>
-
- * cygserver_shm.cc: Run indent.
- (deleted_head): New global for storing shm id's pending deletion.
- (client_request_shm::serve): Return ENOSYS for invalid request types.
- Implement SHM_DEL - delete a shm id.
- * cygserver_shm.h (SHM_DEL): New type value.
- * shm.cc (delete_inprocess_shmds): New function, does what it's name implies.
- (shmctl): Implement shm_rmid control type.
-
-2002-03-04 Robert Collins <rbtcollins@hotmail.com>
-
- * Makefile.in (install): Remove install-bin to allow make install to work.
-
-2002-03-03 Robert Collins <rbtcollins@hotmail.com>
-
- * shm.cc (shmat): Prevent a compile error.
- (shmdt): Set errno as this function is incomplete.
-
-2002-02-28 Christopher Faylor <cgf@redhat.com>
-
- * times.cc: Remove if 0'd code. Clean up slightly.
-
-2002-02-28 Robert Collins <rbtcollins@hotmail.com>
-
- * Merge cygwin_daemon into head minus the new shm and ipc exports.
-
-2002-02-28 Robert Collins <rbtcollins@hotmail.com>
-
- * fhandler_tty.cc (fhandler_tty_slave::open): More debugging.
- (fhandler_tty_slave::read): Fix printf type for the handle.
- * tty.cc (tty::common_init): Add a FIXME for security.
-
-2002-01-29 Robert Collins <rbtcollins@hotmail.com>
-
- * Makefile.in (OBJS): Remove duplicate localtime.o.
-
-2002-01-17 Robert Collins <rbtcollins@hotmail.com>
-
- * cygserver.cc (check_and_dup_handle): Consolidate the two variants for
- simplicity.
- Add Some basic debug output.
- (client_request_attach_tty::serve): Use the new debug_printf for clarity.
- Mark the duplicated handles as inheritable - fixup_after_fork() doesn't reopen
- tty's.
-
-2002-01-16 Robert Collins <rbtcollins@hotmail.com>
-
- * cygserver.cc (transport): Correct scope.
- (client_request_attach_tty::serve): Add more debug information.
- Fix erroneous use of transport instead of conn.
- * cygserver_transport_pipes.cc (transport_layer_pipes::close): More debug.
- (transport_layer_pipes::read): Ditto.
- (transport_layer_pipes::write): Ditto.
- (transport_layer_pipes::impersonate_client): Ditto.
-
-Mon Oct 8 7:41:00 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * cygserver.cc (server_request::process): Rename client_request_shm_get to
- client_request_shm.
- * cygserver_process.cc (process_cache::add): Rename to add_task.
- Use process_cleanup instead of process_request.
- (process_cache::remove_process): New method.
- (process::process): Initialize new members.
- (process::~process): New member.
- (process::cleanup): New method.
- (process::add_cleanup_routine): New method.
- (process_request::process): Rename to process_cleanup.
- Call the process object's cleanup method and then delete it.
- (process_process_param::request_loop): Remove the signalling process.
- * cygserver_shm.cc: Globally rename client_request_shm_get to client_request_shm.
- (client_request_shm_get::serve): Handle attach request counting.
- * cygserver_shm.h: Globally rename client_request_shm_get to client_request_shm.
- (class shm_cleanup): New class.
- * shm.cc: Globally rename client_request_shm_get to client_request_shm.
- (client_request_shm::client_request_shm): New constructor for attach requests.
- (shmat): Use it.
- * include/cygwin/cygserver_process.h (class process_request): Rename to
- process_cleanup.
- (class cleanup_routine): New class.
- (class process): New members and methods to allow calling back when the process
- terminates.
-
-Thu Oct 4 14:12:00 2001 Robert Collins <rbtcollins@hotmail.com>
- * cygserver.cc (request_loop): Make static.
- (main): Use new cache constructor syntax.
- Start cache worker threads.
- Cleanup the cache at shutdown.
- * cygserver_process.cc: Run indent.
- (process_cache::process_cache): Add a trigger to use when adding a process.
- (process_cache::process): Move process_entry to process.
- Insert at the end of the list.
- Trigger the request loop when new process's inserted.
- (process_cache::process_requests): Do it.
- (process_cache::add): New method.
- (process_cache::handle_snapshot): New method.
- (process::process): Merge in the process_entry fields.
- (process::handle): Make a stub function.
- (process::exit_code): New method.
- (process_request::process): New method.
- (process_process_param::request_loop): New method.
- * cygserver_shm.cc: New header dependency - threaded_queue.h.
- * threaded_queue.cc (threaded_queue::cleanup): Clearer messages.
- (queue_process_param::stop): Short spinlock on interruptible threads.
- * threaded_queue.h (class threaded_queue): New constructor.
- * include/cygwin/cygserver_process.h (process_request): New class.
- (process_entry): Remove.
- (process): Merge in process_entry.
- (process_cache): Inherit from threaded_queue.
-
-Tue Oct 2 23:24:00 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * cygserver.cc (class server_process_param): Use new constructor syntax.
- * cygserver_process.cc (process_cache::~process_cache): New function.
- * threaded_queue.cc: Define condition debug_printf.
- Run indent.
- (threaded_queue::cleanup): Move queue_process_param guts to a method.
- (threaded_queue::process_requests): Ditto.
- (queue_process_param::queue_process_param): New method.
- (queue_process_param::~queue_process_param): Ditto.
- (queue_process_param::start): Ditto.
- (queue_process_param::stop): Ditto.
- * threaded_queue.h (class queue_process_param): Add support for
- interruptible request loops.
- * cygwin/include/cygwin/cygserver_process.h (class process_cache): Add
- destructor.
-
-Tue Oct 2 23:24:00 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * cygserver_client.cc: New flag allow_daemon to disable the daemon completely.
- (cygserver_request): Check it.
- (cygserver_init): Ditto.
- * environ.cc (parse_thing): Add (no)daemon option.
-
-Tue Oct 2 23:00:00 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * shm.cc: Update to handle include changes from HEAD.
-
-Tue Oct 2 16:06:00 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * Makefile.in: Remove cygserver_shm.o from cygwin1.dll.
- Rename cygserver_shm_outside.o to cygserver_shm.o.
- * cygserver.cc (server_request::process): Use the new client_request
- constructor.
- * cygserver_client.cc: Remove the #ifdef's stubs for the server method
- within cygwin.
- (client_request_attach_tty::client_request_attach_tty): Use the new
- client_request constructor.
- (client_request_shutdown::client_request_shutdown): Ditto.
- (client_request::client_request): Ditto.
- * cygserver_shm.cc (client_request_shm_get::serve): Remove the
- #ifdef'd stub for in-cygwin builds.
- (client_request_shm_get::client_request_shm_get): Use the new
- client_request constructor, and remove the in-cygwin variants.
- * cygserver_shm.h (class client_request_shm_get): #ifndef test the
- serve method - it's only used in cygserver.
- * shm.cc (client_request_shm_get::client_request_shm_get): New function.
- * include/cygwin/cygserver.h (request_header): New constructor.
- (class client_request): Use it.
- New constructor accepting the header size.
- #ifndef test the server method - it's only used within cygserver.
- (client_request_get_version): #ifdef test the server method.
- (client_request_shutdown): Ditto.
- (client_request_attach_tty): Ditto.
-
-Tue Oct 2 9:57:00 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * Makefile.in: add threaded_queue.o to cygserver.exe.
- * cygserver.cc: Include threaded_queue.h
- (class server_request): Inherit from queue_request.
- (class server_process_param): Inherit from queue_process_param.
- (class server_request_queue): Inherit from threaded_queue.
- (request_loop): Adjust for new types.
- (server_request_queue::process_requests): Remove guts to
- threaded_queue::process_requests.
- (server_request::server_request): Adjust for new types.
- (worker_function): Delete.
- (server_request_queue::create_workers): Delete.
- (server_request_queue::cleanup): Delete.
- (server_request_queue::add): Move guts to threaded_queue::add.
- * threaded_queue.cc: New file.
- * threaded_queue.h: New file.
-
-Mon Oct 1 12:38:00 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * cygserver.cc (client_request::serve): New function.
- * cygserver_process.cc: Inlude <pthread.h> for pthread_once.
- (process_cache::process_cache): Initialise a crtiical section for write access.
- (process_cache::process): Use the critical section. Also add missing entries to
- the cache.
- (do_process_init): New function to initalise class process static variables.
- (process::process): Ensure that the process access critical section is
- initialised.
- (process::handle): Close the handle of old process's when they have terminated
- and we are returning the handle for a process with the same pid.
- * cygserver_shm.cc: Run indent.
- Include cygserver_process.h to allow process cache functionality.
- (client_request_shm_get::serve): New parameter for process cache support.
- Use the process cache, not OpenProcess to get a handle to the originating process.
- Fix a handle leak with token_handle.
- * cygserver_shm.h (class client_request_shm_get): Update ::serve for process
- cache support.
- * cygserver_transport_pipes.cc: Redefine debug_printf to be conditional on DEBUG.
- * include/cygwin/cygserver.h: Do not implement client_request::serve in the
- header.
- * include/cygwin/cygserver_process.h (class process_cache): Add a write access
- critical section to prevent races when requests from a multithreaded
- application arrive.
-
-Sun Sep 30 23:41:00 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * Makefile.in: Add cygserver_process.o to cygserver.exe.
- * cygserver.cc: Include signal.h and cygwin_version.h.
- Define debug_printf as a macro.
- Define DEBUG to a value.
- (client_request_attach_tty::serve): Add beginning of process cache support.
- Change from #ifdef DEBUG to work with new DEBUG style.
- (client_request_get_version::serve): Add beginning of process cache support.
- (class server_request): New prototype for support of process cache.
- (class queue_process_param): New class to allow request loop threading.
- (class server_request_queue): Add beginning of process cache support.
- Allow request loop threading.
- (request_loop): Thread function for request loops.
- (server_request_queue::process_requests): Initiator for threaded request loops.
- (client_request_shutdown::serve): Add beginning of process cache support.
- (server_request::server_request): Ditto.
- (server_request::process): Use debug_printf. Add beginning of process cache
- support.
- (server_request_queue::cleanup): Kill off any request loop threads.
- (server_request_queue::add): Add beginning of process cache support.
- (handle_signal): Trigger a shutdown.
- (main): Print out some useful info at startup - version, date time.
- Add process cache support.
- Spawn a separate thread for the transport request loop, thus allowing concurrent
- support for multiple transports.
- * cygserver_client.cc (client_request_get_version::serve): Add process cache
- support.
- (client_request_attach_tty::serve): Add process cache support.
- (client_request_shutdown::serve): Add process cache support.
- * cygsserver_process.cc: New file with the process cache support.
- * cygserver_shm.cc: Redefine debug_printf to allow conditional output.
- * cygwin.din: Export shmdt().
- * shm.cc: Run indent.
- Update FIXME's.
- (shmdt): New function.
- * include/cygwin/cygserver.h (class client_request): Add process cache support.
- (class client_request_get_version): Ditto.
- (class client_request_shutdown): Ditto.
- (class client_request_attach_tty): Ditto.
- * include/cygwin/cygserver_process.h: New header for process cache support.
-
-Sun Sep 30 8:52:00 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * include/cygwin/cygserver_transport.h: Add copyright header.
- * include/cygwin/cygserver_transport_pipes.h: Ditto.
- * include/cygwin/cygserver_transport_sockets.h: Ditto.
-
-Sat Sep 29 20:40:00 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * Makefile.in: Add cygserver_transport_sockets.o to DLL_OFILES.
- Add cygserver_transport_sockets_outside.o to cygserver.exe.
- * cygserver.cc: Include new include files.
- * cygserver_client.cc: Ditto.
- * cygserver_shm.h: No need to include <sys/socket.h> now.
- * cygerver_transport.cc: Include new include files.
- (transport_layer_base::transport_layer_base): Strip back to a stub.
- (transport_layer_base::listen): Ditto.
- (transport_layer_base::accept): Ditto.
- (transport_layer_base::close): Ditto.
- (transport_layer_base::read): Ditto.
- (transport_layer_base::write): Ditto.
- (transport_layer_base::connect): Ditto.
- * cygserver_transport_pipes.cc: Include new header
- "cygwin/cygserver_transport_pipes.h".
- * cygserver_transport_sockets.cc: New file.
- * dcrt0.cc: No need to include <sys/socket.h> now.
- * fhandler_tty.cc: Ditto.
- * tty.cc: Ditto.
- * include/cygwin/cygserver_transport.h: Strip the base class to a stub.
- Remove the cygserver_transport_pipes class.
- * include/cygwin/cygserver_transport_pipes.h: New file.
- * include/cygwin/cygserver_transport_sockets.h: New file.
-
-Tue Sep 25 16:22:00 2001 Robert Collins <rbtcollins@hotmail.com>
-
- * autoload.cc: Add dynamic load statement for 'ImpersonateNamedPipeClient'.
- * Makefile.in: Add new object files, and build instructions for cygserver.exe.
- * cygwin.din: Export ftok, shmat, shmctl and shmget.
- * dcrt0.cc: Additional includes for cygserver support.
- (dll_crt0_1): Initialise the cygserver client.
- * fhandler.h (fhandler_tty): New method cygserver_attach_tty.
- * fhandler_tty.cc: Additional includes for cygserver support.
- (fhandler_tty_slave::open): Attempt to use the cygserver when obtaining
- handles from the parent process. On failure or 9x use the current method.
- (fhandler_tty_slave::cygserver_attach_tty): New function.
- * fork.cc (fork_child): Fixup shm memory mapped areas.
- * pinfo.h: Declare fixup_shms_after_fork().
- * security.h: Declare alloc_sd().
- * tty.cc: Additonal includes to support cygserver.
- (tty::common_init): Don't allow others to open us if the cygserver is running.
- * winsup.h: Declare cygserver_running.
- * cygserver.cc: New file.
- * cygserver_client.cc: New file.
- * cygserver_shm.cc: New file.
- * cygserver_shm.h: New file.
- * cygserver_transport.cc: New file.
- * cygserver_transport_pipes.cc: New file.
- * ipc.cc: New file.
- * shm.cc: New file.
- * include/cygwin/cygserver.h: New file.
- * include/cygwin/cygserver_transport.h: New file.
- * include/sys/ipc.h: New file.
- * include/sys/shm.h: New file.
-
-2002-02-28 Robert Collins <rbtcollins@hotmail.com>
-
- * thread.cc (semaphore::TryWait): Set errno as required by posix 1003.1.
- (__sem_wait): Ditto.
- (__sem_trywait): Ditto.
-
-2002-02-27 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number.
-
-2002-02-23 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din (fstat64): New symbol.
- (ftruncate64): Ditto.
- (lseek64): Ditto.
- (lstat64): Ditto.
- (mmap64): Ditto.
- (seekdir64): Ditto.
- (stat64): Ditto.
- (telldir64): Ditto.
- (truncate64): Ditto.
- * dir.cc (telldir64): New function.
- (telldir): Call telldir64().
- (seekdir64): New function.
- (seekdir): Call seekdir64().
- * fhandler.h: Redefine all methods using __off32_t to use __off64_t.
- * fhandler.cc: Use __off64_t and struct __stat64 throughout.
- * fhandler_clipboard.cc: Ditto.
- * fhandler_disk_file.cc: Ditto.
- * fhandler_dsp.cc: Ditto.
- * fhandler_floppy.cc: Ditto.
- * fhandler_mem.cc: Ditto.
- * fhandler_random.cc: Ditto.
- * fhandler_socket.cc: Ditto.
- * fhandler_tape.cc: Ditto.
- * fhandler_zero.cc: Ditto.
- * pipe.cc: Ditto.
- * glob.c: Ditto, call lstat64 and stat64 in Cygwin.
- * mmap.cc: Use __off64_t throughout.
- (mmap64): New function.
- * sec_acl.cc (acl_worker): Use struct __stat64, call stat64 and lstat64.
- * syscalls.cc (lseek64): New function.
- (stat64_to_stat32): Ditto.
- (fstat64): Ditto.
- (stat64): Ditto.
- (lstat64): Ditto.
- (ftruncate64): Ditto.
- (truncate64): Ditto.
- (_fstat): Call fstat64.
- (_stat): Call stat64.
- (cygwin_lstat): Rename to avoid declaration problem. Call lstat64.
- (stat_worker): Use struct __stat64.
- (access): Ditto.
- (ftruncate): Call ftruncate64.
- (truncate): Call truncate64.
- * wincap.cc: Set flag has_64bit_file_access appropriately.
- * wincap.h: Add flag has_64bit_file_access.
- * winsup.h (ILLEGAL_SEEK): Define as __off64_t.
- (stat_dev): Declare using struct __stat64.
- (stat_worker): Ditto.
- * include/cygwin/stat.h (struct __stat32): Define if compiling Cygwin.
- (struct __stat64): Ditto.
- (struct stat): Revert definition with explicitly sized datatypes.
- Eliminate sized field names.
- * include/cygwin/types.h (blksize_t): New type.
- (__blkcnt32_t): Ditto.
- (__blkcnt64_t): Ditto.
- (blkcnt_t): Ditto.
-
-2002-02-22 Christopher Faylor <cgf@redhat.com>
-
- * sync.h (new_muto): Just accept an argument which denotes the name of
- the muto. Use this argument to construct static storage.
- * cygheap.cc (cygheap_init): Reflect above change.
- * exceptions.cc (events_init): Ditto.
- * malloc.cc (malloc_init): Ditto.
- * path.cc (cwdstuff::init): Ditto.
- * cygheap.h (cwdstuff): Change name of lock element to make it less
- generic.
- * path.cc (cwdstuff::get_hash): Ditto.
- (cwdstuff::get_initial): Ditto.
- (cwdstuff::set): Ditto.
- (cwdstuff::get): Ditto.
- * sigproc.cc (proc_subproc): Ditto.
-
- * debug.cc (lock_debug): Change to method. Use method rather than
- macro throughout.
-
- * tty.h (tty_min::kill_pgrp): Declare new method.
- * fhandler_termios.cc (tty_min::kill_pgrp): New method.
- (fhandler_termios::line_edit): Use new method for killing process.
- * dcrt0.cc (do_exit): Ditto.
-
- * dtable.cc (dtable::get_debugger_info): New method for inheriting
- dtable info from a debugger.
- * tty.cc (tty_init): Attempt to grab file handle info from parent
- debugger, if appropriate.
-
- # dtable.cc (dtable::stdio_init): Make this a method.
- (dtable::init_std_file_from_handle): Don't set fd unless it's not open.
- (dtable::build_fhandler_from_name): Move name setting to
- dtable::build_fhandler.
- (dtable::build_fhandler): Add win32 name parameter.
- * dcrt0.cc (dll_crt0_1): Change to use dtable stdio_init.
- * dtable.h (dtable): Reflect build_fhandler parameter change.
- * mmap.cc (mmap_record::alloc_fh): Don't set name parameter in
- build_fhandler.
- * net.cc (fdsock): Remove set_name call since it is now handled by
- build_fhandler.
-
- * sigproc.cc (proc_subproc): Release muto as early as possible.
-
-2001-02-22 Corinna Vinschen <corinna@vinschen.de>
-
- * smallprint.c (rn): Allow long long values.
- (__small_vsprintf): Add 'D', 'U' and 'X' formats for long long
- parameters.
-
-2002-02-19 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.cc (fhandler_base::puts_readahead): Remove default parameter
- setting. Newer gcc's complain about this.
- (fhandler_base::set_readahead_valid): Ditto.
- * fhandler_dsp.cc (Audio::open): Ditto.
- (fhandler_dev_dsp::open): Ditto.
-
-2002-02-19 Christopher Faylor <cgf@redhat.com>
-
- * fork.cc (fork_parent): Use sec_user_nih to control process/thread
- inheritance/permission.
- * spawn.cc (spawn_guts): Ditto.
- * security.cc (create_token): Initialize token so that it is not tested
- for bogus value later. Use sec_user to control process/thread
- creation.
- * security.h (__sec_user): Rename declaration from sec_user.
- (sec_user_nih): Declare here as inline function wrapper for __sec_user.
- (sec_user): Ditto.
- * sigproc.cc (czombies): Allocate a character array for zombies to
- avoid constructor overhead
- (extremely hackish, I know).
- (cpchildren): Ditto.
- (pchildren): New define.
- (zombies): Ditto.
- (getsem): Use sec_user_nih to control semaphore inheritance/permission.
-
-2002-02-16 Christopher Faylor <cgf@redhat.com>
-
- * times.cc (hires::prime): Restore thread priority on failure
- condition.
-
- * uinfo.cc (uinfo_init): Use more robust method for determining if
- process was invoked from a non-cygwin process.
-
- * sync.h (muto::init): Eliminate "inheritance" parameter.
- (new_muto): Reflect removal of parameter.
- * sync.cc (muto::init): Ditto.
- * cygheap.cc (cygheap_init): Ditto.
- * debug.cc (threadname_init): Ditto.
- * exceptions.cc (events_init): Ditto.
- * malloc.cc (malloc_init): Ditto.
- * path.cc (cwdstuff::init): Ditto.
- * sigproc.cc (sigproc_init): Ditto.
-
- * grp.cc (group_lock): Use different method for locking with static
- member.
- (read_etc_group): REALLY ensure that read lock mutex is released.
- * passwd.cc (passwd_lock): Use different method for locking with static
- member.
- (read_etc_passwd): REALLY ensure that read lock mutex is released.
-
- * shared.cc (sec_user): Correct reversed inheritance test.
-
-2002-02-15 Christopher Faylor <cgf@redhat.com>
-
- * hires.h (hires::usecs): Rename from utime. Accept an argument.
- * strace.cc (strace::microseconds): Use hires class for calculating
- times.
- * sync.h (new_muto): Use NO_COPY explicitly in declaration.
- * times.cc (gettimeofday): Reflect change in usecs argument.
- (hires::usecs): Ditto. Changed name from utime.
- * winsup.h (NO_COPY): Add nocommon attribute to force setting aside
- space for variable.
- * regcomp.c (REQUIRE): Add a void cast to bypass a warning.
-
-2002-02-15 Christopher Faylor <cgf@redhat.com>
-
- * hires.h: New file.
- * times.cc (gettimeofday): Use hires class for calculating current time.
- (hires::prime): New method.
- (hires::utime): Ditto.
-
-2002-02-14 Christopher Faylor <cgf@redhat.com>
-
- * include/sys/cygwin.h (cygwin_getinfo_types): New CW_STRACE_ACTIVE.
- * external.cc (cygwin_internal): Handle CW_STRACE_ACTIVE.
-
-2002-02-14 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (unused_sig_wrapper): Eliminate unused parameter to
- asm.
- * external.cc (cygwin_internal): Change CW_STRACE_ON to
- CW_STRACE_TOGGLE.
- * strace.cc (strace::hello): Toggle strace on and off.
- * sync.cc (muto::init): Rename from constructor.
- * sync.h (muto::new): Delete.
- (muto::delete): Ditto.
- (new_muto): Simplify. Use muto.init for nearly everything.
- * uinfo.cc (uinfo_init): Avoid closing a NULL handle.
- * include/sys/cygwin.h (cygwin_getinfo_types): Rename CW_STRACE_OFF to
- CW_STRACE_TOGGLE. Delete CW_STRACE_OFF.
- * include/sys/strace.h (strace): Add "inited" field.
-
-2001-02-12 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/acl.h: Fix definition of aclent_t.
-
-2002-02-10 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (DLL_OFILES): Consolidate object files.
-
-2002-02-10 Corinna Vinschen <corinna@vinschen.de>
-
- * child_info.h, cygheap.h, fhandler_clipboard.cc, fhandler_dsp.cc,
- fhandler_floppy.cc, fhandler_mem.cc, fhandler_random.cc,
- fhandler_tape.cc, fhandler_zero.cc, grp.cc, mmap.cc, passwd.cc,
- pinfo.cc, pinfo.h, pipe.cc, sec_acl.cc, sec_helper.cc, security.cc,
- security.h, thread.h, uinfo.cc, include/cygwin/acl.h: Fix copyright.
-
-2002-02-10 Corinna Vinschen <corinna@vinschen.de>
-
- * child_info.h, cygheap.h, dcrt0.cc, dir.cc, fhandler.cc, fhandler.h,
- fhandler_clipboard.cc, fhandler_disk_file.cc, fhandler_dsp.cc,
- fhandler_floppy.cc, fhandler_mem.cc, fhandler_random.cc,
- fhandler_tape.cc, fhandler_zero.cc, grp.cc, mmap.cc, passwd.cc,
- pinfo.cc, pinfo.h, pipe.cc, sec_acl.cc, sec_helper.cc, security.cc,
- security.h, spawn.cc, syscalls.cc, thread.h, uinfo.cc, winsup.h:
- Change usage of uid_t to __uid16_t, gid_t to __gid16_t and
- off_t to __off32_t throughout. Use INVALID_UID, INVALID_GID and
- INVALID_SEEK instead casting -1 to the appropriate type.
- * winsup.h: Define INVALID_UID, INVALID_GID and INVALID_SEEK.
- * include/cygwin/acl.h: Define internal __aclent16_t and __aclent32_t
- types. Don't declare acl functions when compiling Cygwin.
- * include/cygwin/grp.h: Declare getgrgid() and getgrnam() with
- correct types for internal usage.
-
-2002-02-10 Corinna Vinschen <corinna@vinschen.de>
-
- Patch suggested by Pierre A. Humblet <Pierre.Humblet@ieee.org>:
- * uinfo.cc (internal_getlogin): Try evaluating user by SID even if
- ntsec is off.
- (uinfo_init): Set primary group even if ntsec is off.
-
-2002-02-09 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/grp.h: New file.
- * include/cygwin/stat.h: Ditto.
- * include/cygwin/types.h: Add definitions for __off32_t,
- __off64_t, off_t, __uid16_t, __uid32_t, uid_t, __gid16_t,
- __gid32_t and gid_t.
- * include/sys/cygwin.h: Use correct uid and gid types.
-
-2002-02-09 Corinna Vinschen <corinna@vinschen.de>
-
- * dtable.cc (dtable::dup2): Revert previous patch.
- * fhandler.h: Ditto.
- (fhandler_socket::recv): Define new method.
- (fhandler_socket::send): Ditto.
- * fhandler_socket.cc (fhandler_socket::recv): New method.
- (fhandler_socket::send): Ditto.
- (fhandler_socket::read): Call fhandler_socket::recv() now.
- (fhandler_socket::write): Call fhandler_socket::send() now.
- * net.cc (class wsock_event): Move definition to wsock_event.h.
- (fdsock): Revert previous patch.
- (cygwin_recv): Move implementation to fhandler_socket::recv().
- (cygwin_send): Move implementation to fhandler_socket::send().
- * wsock_event.h: New file.
-
-2002-02-06 Alexander Gottwald <Alexander.Gottwald@s1999.tuchemnitz.de>
-
- * net.cc (get_2k_ifconf): Create interface entries for tokenring cards.
-
-2002-02-08 Corinna Vinschen <corinna@vinschen.de>
-
- * dtable.cc (dtable::dup2): Store fd for fhandler_socket.
- * fhandler.h (fhandler_base::set_fd): New virtual method.
- (fhandler_base::get_fd): Ditto.
- (fhandler_socket::set_fd): Ditto.
- (fhandler_socket::get_fd): Ditto.
- * fhandler_socket.cc (fhandler_socket::read): Call cygwin_recv instead
- of native Winsock recv.
- (fhandler_socket::write): Call cygwin_send instead of native Winsock
- send.
- * net.cc (fdsock): Store fd in fhandler_socket.
-
-2002-02-07 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_getsockname): Fix handling of NULL sun_path.
-
-2002-01-29 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (getdomainname): Fix registry key for 9x systems, too.
-
-2002-01-29 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (getdomainname): Fix registry key for NT systems.
-
-2002-01-28 Christopher Faylor <cgf@redhat.com>
-
- * external.cc (cygwin_internal): Initialize various internal settings
- if required to allow use of some things from user loaded DLL.
- (CW_STRACE_ON): Add new feature.
- (CW_CYGWIN_PID_TO_WINPID): Ditto.
- * pinfo.cc (set_myself): Call "strace.hello" to initiate possible
- strace session.
- (pinfo::init): Guard against dereferencing uninitialized myself.
- * sigproc.cc (wait_sig): Call strace.hello() when __SIGTRACE "signal"
- received.
- * strace.cc (strace::hello): New method.
- * wincap.cc (wincapc::init): Avoid initializing if already initialized.
- * wincap.h (wincapc::wincapc): New method.
- * include/sys/cygwin.h: Add new CW_ enums. Kludge typedefs of
- {g,u}id_t if required.
- * strace.h (strace::hello): Declare new method.
-
-2002-01-28 Earnie Boyd <earnie@users.sf.net>
-
- * include/sys/strace.h (_STRACE_ON): Define.
- (_STRACE_OFF): Ditto.
-
-2002-01-24 Christopher Faylor <cgf@redhat.com>
-
- * speclib: Ensure that temporary def file is removed.
-
-2002-01-23 Christopher Faylor <cgf@redhat.com>
-
- * speclib: Use rm -f to remove temp file just to quiet any potential
- warnings.
-
-2002-01-23 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (create_token): Use sec_user() to create
- SECURITY_ATTRIBUTES structure for primary token. Use
- MAXIMUM_ALLOWED access rights instead of TOKEN_ALL_ACCESS.
-
-2002-01-23 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink): Fix check for already existing file.
-
-2002-01-21 Christopher Faylor <cgf@redhat.com>
-
- * cygmagic: Suppress error output when figuring out if sum takes an
- option.
-
-2002-01-21 Christopher Faylor <cgf@redhat.com>
-
- * cygmagic: Attempt to figure out if sum takes an option.
-
-2002-01-21 DJ Delorie <dj@redhat.com>
-
- * Makefile.in (libpthread.a): Pass the assembler also.
- (libm.a): Ditto.
- (libc.a): Ditto.
- * speclib: Specify the assembler to dlltool.
-
-2002-01-21 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number.
-
-2002-01-21 Corinna Vinschen <corinna@vinschen.de>
-
- * grp.cc (getgrgid): Don't return default gid entry when ntsec is on.
- * syscalls.cc (setegid): Don't set primary group in process token.
-
-2002-01-21 Christopher Faylor <cgf@redhat.com>
-
- * speclib: Don't use /dev/null as DLL name. Just default to what's
- already in .def file.
-
-2002-01-21 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (sig_handle): Remove last vestiges of SA_NOCLDSTOP code
- which caused SIGCHLD to be ignored.
-
-2002-01-20 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number.
-
-2002-01-20 Christopher Faylor <cgf@redhat.com>
-
- * syscalls.cc (regfree): Make dll_export.
-
-2002-01-20 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (ctrl_c_handler): Convert windows pid to cygwin pid
- when detecting if we should actually handle CTRL-C.
-
-2002-01-19 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (new-cygwin1.dll): Revert previous change. libsupc++.a
- is only available in libstdc++-v3.
-
-2002-01-19 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (sig_handle_tty_stop): Don't send SIGCHLD if parent
- doesn't want it.
- (sig_handle): Don't check for SA_NOCLDSTOP here. We don't have enough
- information.
-
-2002-01-19 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number.
-
-2002-01-19 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (new-cygwin1.dll): Just use -lsupc++ for link.
- * sigproc.cc (proc_exists): Change existence criteria.
- * sync.h (new_muto): Add volatile to definition to avoid gcc
- optimization problems.
-
-2002-01-19 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/version.h: Bump API minor version to 51.
-
-2002-01-19 Mark Bradshaw <bradshaw@staff.crosswalk.com>
-
- * cygwin.din: Add recvmsg and sendmsg.
- * net.cc: Add cygwin_recvmsg and cygwin_sendmsg.
- * /usr/include/sys/socket.h: Add recvmsg and sendmsg.
-
-2002-01-19 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (create_token): Close processes token handle as soon
- as it's not used anymore.
-
-2002-01-17 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in: Add fnmatch.o to DLL_OFILES.
- * cygwin.din: Add fnmatch export symbol.
- * fnmatch.c: New file.
- * include/fnmatch.h: Ditto.
- * include/cygwin/version.h: Bump API minor version to 50.
-
-2002-01-15 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (fchdir): Call chdir with full windows path.
-
-2002-01-14 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc: Use INVALID_FILE_ATTRIBUTES instead of "(DWORD) -1"
- for file attributes throughout.
- * fhandler.cc: Ditto.
- * fhandler_disk_file.cc: Ditto.
- * path.cc: Ditto.
- * path.h: Ditto.
- * syscalls.cc: Ditto.
- * times.cc (utimes): Use path_conv::isdir() instead of explicit
- GetFileAttributes() call.
-
-2002-01-13 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (multiple_cygwin_problem): Clarify logic and make
- CYGWIN_MISMATCH_OK more powerful.
-
-2002-01-10 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (sig_handle): Accept a second argument indicating
- whether the signal came from this process or not.
- * sigproc.h: Reflect sig_handle arg change.
- * signal.cc (kill_pgrp): Add sigframe info.
- (abort): New function. Eliminates newlib function of same name.
- * sigproc.cc (wait_sig): Pass "signal from this process" value as arg
- 2.
-
-2002-01-10 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (pathconf): Guard _PC_PATH_MAX branch against invalid
- file parameter.
-
-2002-01-09 Christopher Faylor <cgf@redhat.com>
- Robert Collins <rbtcollins@hotmail.com>
-
- * exceptions.cc (early_stuff_init): Rename from misnamed
- set_console_handler.
- (ctrl_c_handler): Attempt to work around potential signal duplication
- during process startup.
- (sig_handle): Ignore SIGINT when we're just an "exec stub".
- * spawn.cc (spawn_guts): Store pid of spawned process in global for use
- by ctrl_c_handler.
- * dcrt0.cc (dll_crt0_1): Call renamed initialization function.
- * winsup.h: Reflect function name change.
-
-2002-01-08 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_accept): Set sun_path for newly connected socket.
-
-2002-01-07 Ralf Habacker <Ralf.Habacker@freenet.de>
-
- * Makefile.in: Add uninstall target.
-
-2002-01-07 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (getsem): Clean up debugging output.
-
-2002-01-07 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (getsem): Set errno when unable to create own semaphore.
- Reorganize to make clearer that error should only come from initial
- creation of process semaphore.
-
-2002-01-06 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (dtable::init_std_file_from_handle): Add some defensive
- code to invalid handle case.
-
-2002-01-06 Corinna Vinschen <corinna@vinschen.de>
-
- * ioctl.cc (ioctl): Make third argument optional.
- * include/sys/ioctl.h: Ditto in declaration.
- * dtable.cc (dtable::init_std_file_from_handle): Revert previous
- bogus patch.
- * window.cc (WndProc): Raise SIGURG instead of SIGIO in case of FD_OOB
- message.
-
-2002-01-05 Christopher Faylor <cgf@redhat.com>
-
- * dir.cc (opendir): Guarantee release of alloced fhandler structure on
- error.
-
-2002-01-05 Corinna Vinschen <corinna@vinschen.de>
-
- * exceptions.cc (sig_handle): Set default action for SIGURG to SIG_IGN.
-
-2002-01-05 Corinna Vinschen <corinna@vinschen.de>
-
- * dtable.cc (dtable::init_std_file_from_handle): Don't treat NULL
- handle as errorneous.
-
-2002-01-04 Christopher Faylor <cgf@redhat.com>
-
- * cygmagic: Change logic for equality test.
-
-2002-01-04 Christopher Faylor <cgf@redhat.com>
-
- * dir.cc (opendir): Don't attempt to call sub-opendir if ENOENT.
-
-2002-01-04 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc: Replace usage of AF_UNIX by Posix compliant AF_LOCAL
- throughout.
- (socketpair): Explicitly allow SOCK_STREAM and SOCK_DGRAM socket types
- in families AF_UNIX and AF_LOCAL. Explicitly allow PF_UNSPEC, PF_LOCAL
- and PF_INET protocols. Return error otherwise. Implement datagram
- socketpairs.
-
-2002-01-01 Christopher Faylor <cgf@redhat.com>
-
- * speclib: Remove temp files automatically.
-
-2002-01-01 Corinna Vinschen <corinna@vinschen.de>
- * fhandler.h (fhandler_socket::sun_path): New private member.
- (fhandler_socket::set_sun_path): New method.
- (fhandler_socket::get_sun_path): Ditto.
- * fhandler_socket.cc (fhandler_socket::fhandler_socket): Initialize
- sun_path to NULL.
- (fhandler_socket::~fhandler_socket): Free sun_path if needed.
- (fhandler_socket::set_sun_path): New method.
- * net.cc (cygwin_bind): Set sun_path to path of local socket file.
- (cygwin_getsockname): Add code to return correct sockaddr for unix
- domain sockets.
diff --git a/winsup/cygwin/ChangeLog-2003 b/winsup/cygwin/ChangeLog-2003
deleted file mode 100644
index 6c16579..0000000
--- a/winsup/cygwin/ChangeLog-2003
+++ /dev/null
@@ -1,5678 +0,0 @@
-2003-12-31 Christopher Faylor <cgf@redhat.com>
-
- * cygwin.din: Make crt0 functions NOSIGFE.
- * include/cygwin/version.h: Gratuitous comment change.
- * lib/_cygwin_crt0_common.cc: Remove unneeded declaration.
-
-2003-12-29 Christopher Faylor <cgf@redhat.com>
-
- * cygtls.h (_threadinfo::stack): Increase stack size to accommodate
- nested signal handlers. Reorganize to cause potential SEGV on stack
- overflow.
- * sigproc.cc (no_signals_available): Check sendsig value rather than
- relying on obsolete sig_loop_wait.
- (sigproc_terminate): Ditto.
- (proc_can_be_signalled): Check sendsig value even for myself.
- * tlsoffsets.h: Regenerate.
-
-2003-12-29 Christopher Faylor <cgf@redhat.com>
-
- Move open_fhs from fhandler.h to cygheap.h for easier tracking.
- Accommodate this change throughout.
- * dtable.cc (dtable::add_archetype): Use correct count when iterating
- through *active* archetypes.
- * dtable.cc (dtable::fixup_after_exec): Close handle if close_on_exec
- and archetype exists since archetype currently does not set windows
- close-on-exec flag (FIXME).
- * fhandler_tty.cc (fhandler_tty_slave::open): Change debugging output
- slightly.
- (fhandler_tty_slave::close): Ditto.
- (fhandler_tty_slave::fixup_after_fork): Just report on inherited use
- counts since since archetype currently does not set windows
- close-on-exec flag (FIXME).
- * pinfo.cc (_pinfo::set_ctty): Change debugging output slightly.
- * cygheap.cc (cygheap_init): Remove open_fhs accommodation and use
- count reporting.
- * perthread.h (vfork_save::fhctty): New element.
- * perthread.h (vfork_save::open_fhs): New element.
- * fork.cc (vfork): Muck around with ctty and open_fhs stuff, both of
- which are now saved in the vfork_save structure.
-
-2003-12-27 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.h (fhandler_tty_slave::archetype): Make public.
- (report_tty_counts): New macro. Use throughout for reporting tty use
- counts.
- * dtable.cc (dtable::vfork_child_dup): Add debugging output for
- usecount increment. Increment open_fhs if appropriate.
- (dtable::vfork_parent_restore): "Close" artificially bumped ctty.
- (dtable::vfork_child_fixup): Close ctty since it was bumped prior to
- vfork. Save open_fhs around close since the closing of these handles
- has no effect on the console.
- * fhandler_tty.cc (fhandler_tty_slave::open): Reorganize calls to allow
- for easier tracking of usecount modification.
- (fhandler_tty_slave::open): Ditto.
-
-2003-12-26 Christopher Faylor <cgf@redhat.com>
-
- * syscalls.cc (close_all_files): Simplify logic around closing ctty.
-
-2003-12-26 Christopher Faylor <cgf@redhat.com>
-
- * pinfo.cc (_pinfo::set_ctty): *Always* call close on opened ctty since
- it counts as an opened handle.
-
-2003-12-26 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.h (fhandler_tty_master::fixup_after_fork): Remove
- declaration.
- (fhandler_tty_master::fixup_after_exec): Ditto.
- * fhandler_tty.cc (fhandler_tty_master::init): Fix so that children do
- not inherit master tty handles.
- (fhandler_tty_master::fixup_after_fork): Remove, since it was never
- used.
- (fhandler_tty_master::fixup_after_exec): Ditto.
- * pinfo.cc (_pinfo::set_ctty): Increment open_fhs when ctty is set.
- * cygheap.cc (cygheap_init): Ditto.
- * syscalls.cc (setsid): *Always* call close on opened ctty since the
- archetype is associated with the ctty and it counts as an opened
- handle.
- * tty.cc (tty::common_init): Don't protect input/output mutex since it
- confuses subsequent fork/execs when CYGWIN=tty.
-
- * fhandler_process.cc (fhandler_process::fill_filebuf): Properly set
- "file size" for "<defunct>" reporting when filebuf is zero length.
-
-2003-12-26 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (try_to_debug): Fix off-by-one problem when resetting
- environment variable after error_start detected.
-
- * fhandler_tty_slave.cc (fhandler_tty_slave::close): Clarify debug
- message.
- * syscalls.cc (setsid): Don't increment usecount here, since it will be
- automatically decremented on close.
-
-2003-12-26 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (setup_handler): Protect against a race.
-
-2003-12-26 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (mount_item::build_win32): Backslashify paths in non-managed
- case.
-
-2003-12-25 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (reent_data): Reluctantly resurrect.
- (__cygwin_user_data::impure_ptr): Ditto.
- (_dll_crt0): Reluctantly initialize _impure_ptr here.
- (initialize_main_tls): Eliminate local_clib initialization since it now
- happens in init_thread.
- * init.cc (dll_entry): Reluctantly remove code which set _impure_ptr to
- the main thread's local_clib.
- * perthread.h (reent_data): Remove obsolete declaration.
-
- * sigproc.cc (proc_subproc): Add more debugging output.
- (get_proc_lock): Ditto.
-
- *dcrt0.cc (dll_crt0_1): Allocate argv[0] via malloc since main thread
- could exit.
-
-2003-12-23 Christopher Faylor <cgf@redhat.com>
-
- * fork.cc (fork_child): After a pthread/fork, ensure that impure
- pointer stuff which resides in parent is propagated to child thread.
-
-2003-12-23 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (set_signal_mask): Redefine to not pass by address.
- Report calculated mask in debugging output.
- * sigproc.h (set_signal_mask): Reflect above change in declaration.
-
-2003-12-22 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (mount_item::build_win32): Take path apart before feeding it
- to fnmunge.
-
-2003-12-21 Christopher Faylor <cgf@redhat.com>
-
- Throughout, change use of _reent_winsup()-> to _my_tls.locals.
- instead.
- Throughout, remove obsolete MT_SAFE/_CYG_THREAD_FAILSAFE considerations.
- Througout, add cygtls.h include.
- * Makefile.in (DLL_OFILES): Add cygtls.o. Add some more objects to the
- -fomit-frame-pointer list.
- * acconfig.h: Remove obsolete settings.
- * config.h.in: Ditto.
- * bsdlib.cc: Add cygtls.h include.
- * configure.in: Remove --enable-extra-threadsafe-checking.
- * configure: Regenerate.
- * cygtls.h (_local_storage): New struct renamed from _winsup_t (sic).
- (_threadinfo:local_clib): Add new field.
- (_threadinfo::locals): Ditto.
- (_threadinfo::init_thread): Accept second _reent * argument.
- (_threadinfo::call): Define as regparm.
- (CYGTLS_PADSIZE): Remove unnecessary slop.
- (_getreent): Define as a macro.
- * thread.h: Remove _CYG_THREAD_FAILSAFE and MT_SAFE stuff.
- (_winsup_t): Move to cygtls.h.
- (ResourceLocks::ResourceLocks): Eliminate empty constructor.
- (MTinterface::reents): Eliminate.
- (MTinterface::thread_self_key): Eliminate.
- (MTinterface::MTinterface): Eliminate.
- * dcrt0.cc: Include stdio.h for _impure_ptr initialization.
- (do_global_ctors): Remove run_ctors_p (sic) considerations. Don't call
- atexit here.
- (__main): Initialize destructors for user here.
- (dll_crt0_1): Accept a dummy argument. Don't call init_thread here.
- Don't set _impure_ptr here. Call do_global_ctors after more things
- have been initialized.
- (_dll_crt0): Define zeros buffer as max of needed size of
- CYGTLS_PADSIZE so that it can be used for two purposes while minimizing
- stack usage. Initialize _impure_ptr specifically, for speed. Call
- dll_crt0_1 with buffer argument.
- (cygwin_dll_init): Call dll_crt0_1 with dummy argument.
- * dtable.cc (dtable::find_unused_handle): Remove call to
- AssertResourceOwner.
- * exceptions.cc: Move _threadinfo stuff to new file.
- * cygtls.cc: New file.
- * gentls_offsets: Accommodate increasing complexity of cygtls.h.
- * hires.h (hires_base::~hires_base): Remove.
- * init.cc (dll_entry): Remove setting of reents.
- * thread.cc: Remove syslog.h include.
- (__getreent): Simplify to use _my_tls.
- (_reent_winsup): Delete.
- (AssertResourceOwner): Delete.
- (MTinterface::Init): Remove setting of _clib and _winsup, with all that
- entails.
- (MTinterface::fixup_after_fork): Ditto.
- (pthread::thread_init_wrapper): Ditto. Also remove call to
- set_tls_self_pointer.
- (pthread::set_tls_self_pointer): Eliminate.
- (pthread::get_tls_self_pointer): Just return _my_tls.tid;
- (__reent_t::init_clib): Eliminate.
- * tlsoffsets.h: Regenerate.
-
-2003-12-17 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (proc_subproc): Simplify code to just remove all zombies
- if SIGCHLD == SIG_IGN.
-
-2003-12-17 Christopher Faylor <cgf@redhat.com>
-
- * pinfo.h (pinfo::operator ==): Add a way to check for _pinfo types.
- * sigproc.cc (proc_subproc): Ensure that zombie is removed when SIGCHLD
- == SIG_IGN but still allow wait()ing threads to wake up.
-
-2003-12-16 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (set_signal_mask): Report on input argument rather than
- getsigmask.
-
- * fhandler.h (fhandler_base): Make friends with close_all_files.
- * pinfo.cc (_pinfo::set_ctty): Add more debugging.
- * sigproc.cc (proc_can_be_signalled): Detect state when signal handler
- thread is gone in target process as an EPERM situation. Set errno to
- ESRCH if process doesn't exist.
- (sigproc_terminate): Set sendsig to illegal value when closed.
- (sig_send): Rely on proc_can_be_signalled setting the proper errno.
- * syscalls.cc (close_all_files): Detect when all ttys are closed prior
- to calling close_all_files. The ctty needs to be closed explicitly in
- this case.
-
-2003-12-16 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/ipc.h: Include sys/types.h.
-
-2003-12-15 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.cc (pthread::init_main_thread): Make sure that the main thread
- has valid handles.
- (pthread::create_cancel_event): Fix error message.
-
-2003-12-14 Christopher Faylor <cgf@redhat.com>
-
- * winsup.h (access_worker): Declare with added fhandler_base parameter.
- * syscalls.cc (access_worker): Accommodate extra fhandler_base
- argument. Use it instead of stat_worker to determine stat information,
- when appropriate.
- * fhandler.cc (fhandler_base::device_access_denied): Pass fhandler
- pointer to access_worker so that it can use the proper method for
- determining stat information.
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Ditto.
- * path.cc (path_conv::check): Add read-only attribute to /cygdrive
- default settings.
-
-2003-12-14 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (ctrl_c_handler): Remove this thread from the signal
- handler chain.
-
-2003-12-14 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (cygthread::stub): Revert previous change and again
- subsume cygthread::stub2. Just return from function now since
- ExitThread is guaranteed by automatic _threadinfo wrapper. Define as
- per ThreadProc convention.
- (cygthread::stub2): Remove.
- (cygthread::simplestub): Perform similar operations to cygthread::stub.
- (cygthread::simplestub2): Remove.
- * cygthread.h (cygthread::stub): Declare as per ThreadProc convention.
- (cygthread::stub2): Remove declaration.
- (cygthread::simplestub): Declare as per ThreadProc convention.
- (cygthread::simplestub2): Remove declaration.
- * cygtls.h (_threadinfo::call): Define first argument as per ThreadProc
- convention.
- (_threadinfo::call2): Ditto.
- (_tlsbase): Define as char * pointer.
- (_tlstop): New definition.
- (_main_tls): Define here.
- * dcrt0.cc (alloc_stack): Revert previous change which called
- init_thread since information would be overwritten by fork later
- anyway.
- (dll_crt0_1): Use _tlsbase and _tlstop for setting stack bottom, top.
- * exceptions.cc: Move _main_tls declaration to cygtls.h.
- (_threadinfo::call): Define first argument as per ThreadProc
- convention.
- (_threadinfo::call2): Call ExitThread with thread function return
- value.
- (_threadinfo::init_thread): Don't initialize cygtls to zero if input
- arg is NULL.
- * fork.cc (fork_child): Reset _main_tls here. Reinitialize parts of
- _my_tls after copying data from parent.
- * init.cc (threadfunc_fe): New function. Front-end for all threads
- created in cygwin processes.
- (munge_threadfunc): New function.
- (dll_entry): Call munge_threadfunc to force the call of a thread
- wrapper.
- * thread.cc (pthread::thread_init_wrapper): Perform similar operations
- to cygthread::stub.
- (pthread::thread_init_wrapper2): Remove.
- * thread.h (pthread::thread_init_wrapper): Declare as per ThreadProc
- convention.
- (pthread::thread_init_wrapper2): Remove declaration.
- * window.cc (Winmain): Just return from function now since ExitThread
- is guaranteed by automatic _threadinfo wrapper.
-
-2003-12-12 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (dtable::delete_archetype): Add debugging.
- (dtable::release): Move archetype deletion here.
- (dtable::vfork_child_dup): Increment ctty usecount to catch later
- close_all_files case in parent/child.
- (dtable::vfork_child_fixup): Avoid using cygheap->foo where this should
- really be using local references. Call close on archetyped handles
- since the handles haven't had the noninherit flag set.
- * fhandler_tty.cc (fhandler_tty_slave::close): Remove archetype
- deletion code. Add defensive error message when DEBUGGING.
- (fhandler_tty_common::set_close_on_exec): Use more robust method for
- checking whether to set handles into noninherit if there is an
- archetype associated with the fhandler.
-
-2003-12-12 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (alloc_stack): Move _main_tls if stack is relocated.
-
-2003-12-11 Christopher Faylor <cgf@redhat.com>
-
- * miscfuncs.cc (low_priority_sleep): Correct thinko which caused
- SetPriority to be called unnecessarily.
- * thread.cc (pthread::init_main_thread): Call new create_cancel_event
- function.
- (pthread::precreate): Ditto.
- (pthread::postcreate): Remove cancel_event creation.
- (pthread::create_cancel_event): Define new function.
- * thread.h (pthread::create_cancel_event): Declare new function.
-
-2003-12-11 Brian Ford <ford@vss.fsi.com>
-
- * fhandler_serial.cc (fhandler_serial::tcflush): Simplify. Remove
- read polling loop to avoid a hang with streaming devices.
-
-2003-12-11 Christopher Faylor <cgf@redhat.com>
-
- * pinfo.cc (_pinfo::set_ctty): Correct stupid typo.
-
-2003-12-11 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.h (cygheap_types): Add HEAP_ARCHETYPES.
- (init_cheap::ctty): Change to pointer.
- * dtable.h (dtable::find_archetype): Declare new function.
- (dtable::add_archetype): Declare new function.
- (dtable::delete_archetype): Declare new function.
- (dtable::narchetypes): Declare.
- (dtable::farchetypes): Declare.
- (dtable::initial_archetype_size): Declare.
- (dtable::dtable): Initialize new fields.
- (dtable::initial_archetype_size): Declare.
- * dtable.cc (dtable::find_archetype): Define new function.
- (dtable::add_archetype): Define new function.
- (dtable::delete_archetype): Define new function.
- (dtable::initial_archetype_size): Define.
- * fhandler.h (fhandler_base::archetype): Declare.
- (fhandler_base::usecount): Declare.
- * fhandler.cc (fhandler_base::fhandler_base): Initialize new fields.
- * fhandler_console.cc (fhandler_console::get_tty_stuff): Pass NULL to
- third argument of set_ctty.
- * fhandler_tty.cc (fhandler_tty_slave::open): Accommodate new archetype
- method to create only one instance of a tty.
- (fhandler_tty_slave::close): Don't close handles unless archetype
- usecount is zero. When that happens, close archetype too.
- (fhandler_tty_slave::dup): Just copy archetype. Set use count
- appropriately. Set ctty, if appropriate.
- (fhandler_tty_common::dup): Remove slave considerations.
- (fhandler_tty_common::set_close_on_exec): Remove cygheap->ctty
- considerations.
- * pinfo.cc (_pinfo::set_ctty): Accommodate new archetype methods.
- * pinfo.h (_pinfo::set_ctty): Make third argument explicit.
- * syscalls.cc (close_all_files): Decrement controlling tty use count
- before closing all handles to allow controlling tty to be closed.
- Remove previous controlling tty considerations.
-
-2003-12-09 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_tty.cc (fhandler_tty_common::dup): Just copy cygheap->ctty
- to child if duping the current ctty.
- (fhandler_tty_common::close): Move debugging statement earlier in function.
- (fhandler_tty_slave::close): Return success when closing ctty.
- * syscalls.cc (close_all_files): Avoid calling fhandler_tty_slave close
- method so that open_fhs will not be decremented when closing cygheap
- ctty.
- (setsid): Ditto.
- * dcrt0.cc (do_exit): Reorganize to avoid leaving a critical section
- active after vfork.
- * fhandler.h (fhandler_tty_slave::get_unit): Remove regparm parameter
- since it can't work in a virtualized function.
-
-2003-12-08 Christopher Faylor <cgf@redhat.com>
-
- * pinfo.cc (_pinfo::set_ctty): Don't copy over existing ctty if it is
- active.
-
-2003-12-08 Christopher Faylor <cgf@redhat.com>
-
- * thread.cc (pthread::precreate): Delete duplicate setting of
- cancel_event.
-
-2003-12-08 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.h (fhandler_tty_slave::ttyname): Use name from pc since it
- is guaranteed to be accurate.
- * fhandler_tty.cc (fhandler_tty_slave::open): Increment open_fhs
- appropriate when copying ctty.
- (fhandler_tty_slave::close): Remove special case handling for
- exit_state. Use ctty < 0 check instead.
- (fhandler_tty_common::close): Set io_handle to NULL after closing.
- * syscalls.cc (close_all_files): Specifically close cygheap->ctty, if
- appropriate.
-
-2003-12-07 Christopher Faylor <cgf@redhat.com>
-
- * spawn.cc (spawn_guts): Change type back to 'int' after erroneous
- change below.
- * wait.cc (wait4): Move sawsig initialization inside loop.
-
-2003-12-07 Christopher Faylor <cgf@redhat.com>
-
- Change use of BOOL, TRUE, FALSE to bool, true, false, as appropriate,
- throughout.
-
-2003-12-07 Pierre Humblet <pierre.humblet@ieee.org>
-
- * tty.cc (tty::common_init): Remove call to SetKernelObjectSecurity and
- edit some comments.
-
-2003-12-07 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.h (init_cygheap::ctty): Add new element.
- * devices.in (device::parse): Remove special handling for /dev/tty.
- * devices.cc: Regenerate.
- * dtable.cc (build_fh_pc): Don't reset /dev/tty device. Let the device
- opener do that.
- * fhandler_termios.cc (tty_min::set_ctty): Redefine to _pinfo class.
- * fhandler_tty.cc (fhandler_tty_common::set_close_on_exec): Avoid
- setting noninherit flag for ctty.
- * tty.h: Move BOOLs to bools.
- (tty_min::set_ctty): Redeclare to _pinfo class.
- * pinfo.cc (_pinfo::set_ctty): Define new function based on
- tty_min::set_ctty. Change first argument from tty number to tty_min
- class.
- * pinfo.h (_pinfo::set_ctty): Declare.
- * fhandler_console.cc (fhandler_console::get_tty_stuff): Reflect move
- of set_ctty to _pinfo class.
- * fhandler_tty.cc (fhandler_tty_slave::open): Treat FH_TTY specially.
- Use saved cygheap value if it exists. Otherwise convert to real device
- and save on first time open.
- (fhandler_tty_common::dup): Potentially set controlling tty if duping a
- slave tty.
- * syscalls.cc (setsid): Close controlling tty in cygheap.
- * tty.cc: Change some BOOLs to bools.
-
-2003-12-07 Pierre Humblet <pierre.humblet@ieee.org>
-
- * syscalls.cc (locked_append): New.
- (updwtmp): Remove mutex code and call locked_append.
- (pututline): Ditto.
-
-2003-12-06 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (_threadinfo::remove): Avoid a linked list walk.
-
-2003-12-06 Christopher Faylor <cgf@redhat.com>
-
- * cygtls.h (_threadinfo::find_tls): New function.
- * exceptions.cc (_threadinfo::find_tls): Rename from find_tls. Use
- critical section to protect access to linked list.
-
-2003-12-06 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (_threadinfo::remove): Avoid returning without
- unlocking critical section in the (hopefully impossible) case of an
- unrecognized thread.
-
-2003-12-06 Christopher Faylor <cgf@redhat.com>
-
- * cygtls.h: Add more "don't parse this" guards.
- (_threadinfo::init_thread): Rename from 'init'.
- (_threadinfo::init): Declare new function.
- (_threadinfo::protect_linked_list): Declare new critical section.
- * dcrt0.cc (dll_crt0_1): Call init_thread to initialize thread stuff.
- (_dll_crt0): Call _threadinfo::init prior to invoking dll_crt0_1.
- * exceptions.cc (_threadinfo::init_thread): Rename from 'init'.
- (_threadinfo::init): Define new function. Protect linked list
- manipulation with new critical section.
- (_threadinfo::call): Reflect function name change.
- (_threadinfo::remove): Protect linked list manipulation with new
- critical section
- * gentls_offsets: Rework to allow multi-line "don't parse this"
- protection.
- * init.cc (dll_entry): Don't remove threads info stuff here since the
- remove function uses a critical section which can't be used during
- thread creation or destruction.
- * thread.cc (pthread::exit): Call _threadinfo remove function here.
-
-2003-12-05 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (cygthread::stub2): Remove myself from the list of
- threads monitored by signals since this thread will never call raise or
- sigwait.
- (cygthread::simplestub2): Ditto. Set ev here.
- (cygthread::cygthread): Don't set ev here for freerange thread.
-
-2003-12-04 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (slash_unc_prefix_p): Allow '.' as a valid character after
- '\\' in a UNC path.
-
-2003-12-04 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (setup_handler): Remove ill-advised debugging output.
-
-2003-12-04 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/types.h (struct __fcntl64): Fix datatype of l_start.
-
-2003-12-03 Corinna Vinschen <corinna@vinschen.de>
-
- Substitute 0x7fffffff and 0xffffffff by INT32_MAX and UINT32_MAX
- throughout, except in assembler code.
-
-2003-12-03 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::lock): Use UINT32_MAX
- instead of 0xffffffff. Accommodate Win 9x bug in evaluating length
- of area to lock when given length is 0.
-
-2003-12-03 Pierre Humblet <pierre.humblet@ieee.org>
-
- * fhandler_disk_file.cc (fhandler_disk_file::lock): Interchange
- values of off_low and off_high.
-
-2003-12-03 Corinna Vinschen <corinna@vinschen.de>
-
- * fcntl.cc (fcntl_worker): Remove static storage class.
- * flock.cc (flock): Use struct __flock64. Call fcntl_worker.
- Use Cygwin errno functions instead of accessing errno directly.
- * winsup.h: Declare fcntl_worker.
-
-2003-12-03 Corinna Vinschen <corinna@vinschen.de>
-
- * fcntl.cc: Whitespace cleanup.
-
-2003-12-03 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (cygthread::stub): Properly establish _threadinfo
- environment.
- (cygthread::stub2): New function.
- (cygthread::simplestub): Ditto.
- (cygthread::simplestub2): New function.
- * cygthread.h (cygthread::stub2): Declare new function.
- (cygthread::simplestub2): Ditto.
- * cygtls.h (_threadinfo::call): Declare new function.
- (_threadinfo::call2): Ditto.
- * dcrt0.cc (dll_crt0_1): Accommodate new _threadinfo::init which
- doesn't return pointer to tls.
- (_dll_crt0): Remove obsolete DECLARE_TLS_STORAGE.
- (dll_crt0): Ditto.
- * exceptions.cc (_threadinfo::call): New function.
- (_threadinfo::call2): Ditto.
- (_threadinfo::init): Don't return pointer.
- * thread.cc (pthread::thread_init_wrapper): Properly establish
- _threadinfo environment.
- (pthread::thread_init_wrapper2): New function.
- * thread.h (pthread::thread_init_wrapper): Remove noreturn attribute
- (pthread::thread_init_wrapper2): Declare new function.
- * winbase.h: Remove obsolete code.
-
-2003-12-02 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Change the way that -f options are appended to CFLAGS,
- slightly.
-
-2003-12-02 Christopher Faylor <cgf@redhat.com>
-
- * fcntl.cc (_fcntl): Silence a compiler warning.
-
-2003-12-02 Pierre Humblet <pierre.humblet@ieee.org>
-
- * pinfo.cc (pinfo::init): Use shared_name to construct the mapname.
-
-2003-12-01 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.cc (pthread_rwlock::add_reader): Remove mx parameter for
- List_insert call.
- (pthread::prepare): Ensure race safeness when adding function
- pointers to atfork lists by using List_insert.
- * thread.h (List_insert): Use InterlockedCompareExchangePointer to
- ensure race safeness without using a mutex.
- (List_remove): Use InterlockedCompareExchangePointer to
- ensure race safeness with List_insert.
- (List::insert): Remove mx parameter for List_insert call.
-
-2003-12-01 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (OBSOLETE_FUNCTIONS): Add fcntl.
- (NEW_FUNCTIONS): Add fcntl64.
- * cygwin.din: Export fcntl64. Make fcntl being SIGFE.
- * fcntl.cc (fcntl_worker): New function.
- (fcntl64): New function.
- (_fcntl): Call fcntl_worker. Convert 32 bit flock structure into
- 64 bit flock structure and vice versa.
- * fhandler.cc (fhandler_base::lock): Change 2nd parameter to
- struct __flock64 *.
- * fhandler_disk_file.cc (fhandler_disk_file::lock): Ditto. Rework
- to be 64 bit aware.
- * fhandler.h: Accommodate above method argument changes.
- * include/cygwin/types.h: Add struct __flock32 and __flock64.
- Define struct flock according to setting of __CYGWIN_USE_BIG_TYPES__.
- * include/cygwin/version.h: Bump API minor number.
-
-2003-12-01 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.cc (cygheap_init): Set cygheap->shared_prefix.
- * cygheap.h (struct init_cygheap): Add shared_prefix.
- * shared.cc (shared_name): Use cygheap->shared_prefix.
-
-2003-12-01 Pierre Humblet <pierre.humblet@ieee.org>
-
- * shared.cc (shared_name): Take into account the SE_CREATE_GLOBAL_NAME
- privilege when building the name string.
- (open_shared): Remove the call to OpenFileMapping.
- (shared_info::initialize): Move cygheap initialization to ...
- (memory_init): ... here. Suppress now useless shared_h variable.
- (user_shared_initialize): Make tu a cygpsid.
-
-2003-12-01 Dr. Volker Zell <Dr.Volker.Zell@oracle.com>
-
- * include/tzfile.h: Remove duplicate definition of TM_SUNDAY.
- * localtime.cc: Point TZDIR to the /usr/share/zoneinfo directory used
- by the tzcode package.
-
-2003-11-30 Corinna Vinschen <corinna@vinschen.de>
-
- * flock.cc: Renamed from flock.c.
-
-2003-11-29 Christopher Faylor <cgf@redhat.com>
-
- * pinfo.h: Remove global_sigs declaration.
- * siginfo.h: Move global_sigs declaration here.
- * Makefile.in: Remove duplicate compiler flag.
-
-2003-11-29 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (_threadinfo::pop): Zero *contents* of popped stack
- location rather than the actual stack pointer.
-
-2003-11-29 Nicholas Wourms <nwourms@netscape.net>
-
- * Makefile.in: (DLL_OFILES): Add flock.o.
- * cygwin.din: Export flock.
- * flock.c: New file.
- * include/sys/file.h: Include sys/cdefs.h.
- Add function prototype for flock().
- Add some comments from BSD's header for further clarity.
- (L_SET, L_CURR, L_INCR, L_XTND): Redefine as the macros
- SEEK_SET, SEEK_CUR, SEEK_CUR, & SEEK_END respectively.
- (LOCK_SH,LOCK_EX,LOCK_NB,LOCK_UN): New macros for flock().
- * include/cygwin/version.h: Bump API minor number.
-
-2003-11-28 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (no_signals_available): Fix so that non-zero exit state is
- a true condition rather than errnoneously only checking other states
- when exist_state was zero.
-
-2003-11-28 Christopher Faylor <cgf@redhat.com>
-
- * pinfo.h (_pinfo::getthread2signal): Remove obsolete function.
- * cygtls.h (_threadinfo): Define tid more precisely.
- (_threadinfo::operator HANDLE): Define.
- * exceptions.cc (_threadinfo::interupt_now): Use _threadinfo HANDLE
- operator to derive thread handle.
- (setup_handler): Ditto.
- * sigproc.cc: Reorganize includes. Fix no_signals_available test to
- properly return true when !sig_wait_loop.
-
-2003-11-28 Christopher Faylor <cgf@redhat.com>
-
- * pinfo.h (_pinfo::getsig): Remove obsolete function, here and
- throughout.
- * exceptions.cc: Ditto.
- * fhandler_termios.cc: Ditto.
- * signal.cc: Ditto.
- * sigproc.cc: Ditto.
-
- * Makefile.in: Revert previous change which made a cygwin.din newer
- than a version.h a warning rather than an error.
-
-2003-11-28 Christopher Faylor <cgf@redhat.com>
-
- * cygwin.din: Re-add inexplicably missing semaphore/msg functions.
-
-2003-11-28 Christopher Faylor <cgf@redhat.com>
-
- * gendevices: Issue error when shilka is missing.
-
-2003-11-28 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/signal.h: New file.
-
-2003-11-28 Christopher Faylor <cgf@redhat.com>
-
- Eliminate use of sigframe and sigthread throughout.
- * Makefile.in (DLL_OFILES): Add sigfe.o. Remove reliance on cygwin.def
- from cygwin0.dll dependency since dependence on sigfe.o implies that.
- Generate def file on the fly using 'gendef'.
- * configure.in: Don't auto-generate cygwin.def.
- * configure: Regenerate.
- * cygwin.din: Add SIGFE stuff where appropriate.
- * dcrt0.cc (dll_crt0_1): Initialize cygwin tls early in process
- startup. Set _main_tls to address of the main thread's cygwin tls.
- * debug.h: Remove now unneeded WFSO and WFMO declarations.
- * exceptions.cc (_last_thread): Define.
- (set_thread_state_for_signals): New function.
- (reset_thread_exception_for_signals): Ditto.
- (init_thread_for_signals): Ditto.
- (delete_thread_for_signals): Ditto.
- (capture_thread_for_signals): Ditto.
- (handle_exceptions): Set return address explicitly for exceptions prior
- to calling sig_send.
- (interrupt_on_return): Eliminate.
- (setup_handler): Add preliminary implementation for dealing with
- thread-specific signals by querying _main_tls.
- (signal_exit): Use cygthread::main_thread_id instead of mainthread.id.
- (call_signal_handler_now): For now, just handle the main thread.
- * fork.cc (vfork): Save and restore main _my_tls.
- * gendef: New file. Generates def file and sigfe.s file.
- * gentls_offsets: New file. Generates offsets for perl to use in
- sigfe.s.
- * how-signals-work.txt: Mention that info is obsolete.
- * init.cc (dll_entry): Initialize cygwin tls storage here.
- * miscfuncs.cc (low_priority_sleep): Make a C function for easier
- calling from asm.
- * perthread.h (vfork_save::tls): New element.
- * signal.cc (nanosleep): Replace previous use of
- sigframe.call_signal_handler_now with straight call to
- call_signal_handler_now.
- (abort): Ditto.
- * syscalls.cc (readv): Ditto.
- * termios.cc (tcsetattr): Ditto.
- * wait.cc (wait4): Ditto.
- * sigproc.cc (sig_dispatch_pending): Ditto.
- (sig_send): Ditto.
- * sigproc.h: Declare call_signal_handler_now.
- * thread.cc (pthread::thread_init_wrapper): Initialize cygwin tls.
- Remove obsolete and unworking signal stuff.
- * thread.h (verifyable_object::sigs): Eliminate.
- (verifyable_object::sigmask): Eliminate.
- (verifyable_object::sigtodo): Eliminate.
- (verifyable_object::exit): Make attribute noreturn.
- (verifyable_object::thread_init_wrapper): Ditto.
- (pthread_null::exit): Ditto.
- * winbase.h (__stackbase): Always define.
- * winsup.h (low_priority_sleep): Declare as a "C" function.
- * include/cygwin/version.h: Bump API version to reflect sigwait export.
-
- * include/sys/queue.h: Protect SLIST_ENTRY from previous declaration.
-
- * signal.cc (sigwait): Implement.
-
- * select.cc (fhandler_base::ready_for_read): Add debugging output.
-
- * devices.h: Define more device pointers via their storage.
- * devices.in: Don't parse things like /dev/inet/tcp, as they really
- have no meaning.
- * devices.cc: Regenerate.
- * gendevices: Set proper protection for output file.
-
- * cygtls.h: New file.
- * gendef: New file.
- * gentls_offsets: New file.
- * tlsoffsets.h: New file. Autogenerated.
- * config/i386/longjmp.c: Remove. File subsumed by gendef output.
- * config/i386/makefrag: Remove obsolete file.
-
- * fhandler.cc: Remove spurious access_worker declaration.
-
- * spawn.cc (spawnve): Make debugging output more accurate.
-
- * cygwin-gperf: Remove.
- * devices.cc: Remove.
-
-2003-11-28 Christopher Faylor <cgf@redhat.com>
-
- * speclib: Use correct EOF marker. Ensure that directory is actually
- deleted when running under Windows.
-
-2003-11-27 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_disk_file.cc (fhandler_disk_file::readdir): Reorganize to
- avoid inappropriate .lnk extensions with munged filenames under managed
- mode.
-
-2003-11-26 Corinna Vinschen <corinna@vinschen.de>
-
- * sec_helper.cc (set_process_privilege): Rename restore_priv to
- priv_luid.
-
-2003-11-26 Pierre Humblet <pierre.humblet@ieee.org>
-
- * sec_helper.cc (set_process_privilege): Call LookupPrivilegeValue
- before opening the token.
-
-2003-11-26 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc (mkdir): Use local security_descriptor. Call
- set_security_attribute appropriately.
- * external.cc (cygwin_internal): Ditto.
- * fhandler.cc (fhandler_base::open): Ditto.
- * fhandler_socket.cc (fhandler_socket::bind): Ditto.
- * path.cc (symlink_worker): Ditto.
- * sec_acl.cc (setacl): Ditto. Call read_sd appropriately.
- (getace): Ditto.
- * sec_helper.cc (security_descriptor::malloc): New method.
- (security_descriptor::realloc): New method.
- (security_descriptor::free): New method.
- * security.cc (read_sd): Get security_descriptor as parameter instead
- of PSECURITY_DESCRIPTOR and a size. Drop unnecessary parameter check.
- Allocate the security_descriptor buffer according to size returned by
- a call to GetFileSecurity. Return buffer size on success.
- (write_sd): Get security_descriptor as parameter instead of
- PSECURITY_DESCRIPTOR and a size.
- (get_nt_attribute): Use local security_descriptor.
- (get_nt_object_attribute): Ditto in case of type == SE_REGISTRY_KEY.
- Allocate security_descriptor buffer according to size returned by
- a call to RegGetKeySecurity.
- (alloc_sd): Make static. Get security_descriptor as parameter instead
- of PSECURITY_DESCRIPTOR and a size. Drop unnecessary parameter check.
- (set_security_attribute): Get security_descriptor as parameter instead
- of PSECURITY_DESCRIPTOR and a size.
- (set_nt_attribute): Use local security_descriptor.
- (check_file_access): Ditto.
- * security.h: Add class security_descriptor.
- (read_sd): Change declaration to get security_descriptor as parameter
- instead of PSECURITY_DESCRIPTOR and a size.
- (write_sd): Ditto.
- (set_security_attribute): Ditto.
- (alloc_sd): Remove declaration.
- * thread.cc (semaphore::semaphore): Use local security_descriptor. Call
- set_security_attribute appropriately.
-
-2003-11-26 Corinna Vinschen <corinna@vinschen.de>
-
- * sec_acl.h (getace): Use FILE_*_BITS as permission mask.
- * security.cc (get_attribute_from_acl): Ditto.
- * security.h (FILE_READ_BITS): Define to match also GENERIC bits.
- (FILE_WRITE_BITS): Ditto.
- (FILE_EXEC_BITS): Ditto.
-
-2003-11-25 Christopher Faylor <cgf@redhat.com>
-
- * thread.cc: Minor whitespace cleanup. Remove some obsolete code.
-
-2003-11-24 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (build_fh_name): Set error in dummy fhandler when one is
- noted during path_conv.
- * fhandler.h (fhandler_base::set_error): New method.
-
-2003-11-24 Christopher Faylor <cgf@redhat.com>
-
- * configure.in: Avoid using cygserver unless hosting on cygwin.
-
-2003-11-23 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (sig_send): Correct below checkin. Use
- thisframe.call_signal_handler.
-
-2003-11-23 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (proc_exists): A zombie process does not exist.
- (sig_send): Improve debugging output. Wait for pipe to be created
- before trying to send to it. Call call_signal_handler_now if sending a
- signal to myself.
-
-2003-11-22 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (check_sanity_and_sync): Correct api major version check so
- that newer dlls will work with older apps but not vice versa.
-
-2003-11-21 Christopher Faylor <cgf@redhat.com>
-
- * sem.cc: Always include signal.h to handle SIGSYS raise when
- !USE_SERVER.
- * shm.cc: Ditto.
-
-2003-11-21 Christopher Faylor <cgf@redhat.com>
-
- * msg.cc: Always include signal.h to handle SIGSYS raise when
- !USE_SERVER.
-
-2003-11-20 Christopher Faylor <cgf@redhat.com>
-
- * configure.in: Make --use-server the default. Remove powerpc target.
- * configure: Regenerate.
-
-2003-11-20 Corinna Vinschen <corinna@vinschen.de>
-
- * msg.cc (msgctl): Raise SIGSYS if call not available.
- (msgget): Ditto.
- (msgrcv): Ditto.
- (msgsnd): Ditto.
- * sem.cc (semctl): Ditto.
- (semget): Ditto.
- (semop): Ditto.
- * shm.cc (shmat): Ditto.
- (shmctl): Ditto.
- (shmget): Ditto.
- (shmdt): Ditto.
-
-2003-11-19 Corinna Vinschen <corinna@vinschen.de>
-
- * cygserver.h (client_request::request_code_t): Add
- CYGSERVER_REQUEST_MSG and CYGSERVER_REQUEST_SEM.
- (admininstrator_group_sid): Add extern declaration.
- * cygserver_ipc.h: Rewrite.
- * cygserver_msg.h: New file.
- * cygserver_sem.h: New file.
- * cygserver_shm.h: More or less rewrite.
- * cygwin.din: Add msgctl, msgget, msgrcv, msgsnd, semctl, semget and
- semop.
- * msg.cc: Rewrite.
- * safe_memory.h: Remove.
- * sem.cc: Rewrite.
- * shm.cc: Rewrite.
- * include/cygwin/ipc.h: Use appropriate guard.
- (struct ipc_perm): Add seq.
- (IPCID_TO_IX): New define from BSD.
- (IPCID_TO_SEQ): Ditto.
- (IXSEQ_TO_IPCID): Ditto.
- (IPC_R): Ditto.
- (IPC_W): Ditto.
- (IPC_M): Ditto.
- * include/cygwin/msg.h: Use appropriate guard. #ifdef _KERNEL all stuff
- not explicitely defined by SUSv3. Use signed types in structs to match
- types used in BSD.
- (msgqnum_t): Define unsigned.
- (msglen_t): Ditto.
- (struct msqid_ds): Add msg_first and msg_last.
- (struct msginfo): Remove msgpool. Add msgssz and msgseg.
- * include/cygwin/sem.h: Use appropriate guard. #ifdef _KERNEL all stuff
- not explicitely defined by SUSv3. Use signed types in structs to match
- types used in BSD.
- (SEM_UNDO): Define appropriately.
- (struct semid_ds): Add sem_base.
- (struct seminfo): Add semmap and semusz.
- (SEM_A): New define from BSD.
- (SEM_R): Ditto.
- (SEM_ALLOC): Ditto.
- (union semun): Define.
- * include/cygwin/shm.h: Use appropriate guard. #ifdef _KERNEL all stuff
- not explicitely defined by SUSv3. Use signed types in structs to match
- types used in BSD.
- (SHMLBA): Define using cygwin_internal(CW_GET_SHMLBA) call.
- (struct shmid_ds): Add shm_internal.
- (struct shm_info): Rename shm_ids to used_ids as in BSD. Add define
- for shm_ids.
- * include/cygwin/sysproto.h: New file.
- * include/cygwin/version.h: Bump API minor number.
- * include/sys/ipc.h: New file.
- * include/sys/msg.h: New file.
- * include/sys/queue.h: New file from BSD.
- * include/sys/sem.h: New file.
- * include/sys/shm.h: New file.
- * include/sys/sysproto.h: New file.
-
-2003-11-19 Corinna Vinschen <corinna@vinschen.de>
-
- * dtable.cc (build_fh_pc): Resurrect accidentally removed
- DEV_CYGDRIVE_MAJOR case.
-
-2003-11-17 Brian Ford <ford@vss.fsi.com>
-
- * fhandler.cc (fhandler_base::lseek): Include high order offset
- bits in return value.
-
-2003-11-17 Corinna Vinschen <corinna@vinschen.de>
-
- * bsdlib.cc (getprogname): New function.
- (setprogname): New funtion.
- * cygwin.din: Export getprogname and setprogname.
- * include/cygwin/version.h: Bumb API version number.
-
-2003-11-15 Christopher Faylor <cgf@redhat.com>
-
- * include/limits.h: Revert unsanctioned changes below.
- * include/cygwin/config.h: Ditto.
- * include/sys/param.h: Ditto.
-
-2003-11-14 Robert Collins <rbtcollins@hotmail.com>
- Ron Parker <rdparker@butlermfg.com>
-
- * bsdlib.cc: Update throughout to use CYG_MAX_PATH rather than MAX_PATH.
- * cygheap.h: Ditto.
- * dcrt0.cc: Ditto.
- * delqueue.cc: Ditto.
- * dlfcn.cc: Ditto.
- * dll_init.cc: Ditto.
- * dll_init.h: Ditto.
- * dtable.cc: Ditto.
- * environ.cc: Ditto.
- * environ.h: Ditto.
- * exceptions.cc: Ditto.
- * external.cc: Ditto.
- * fhandler_disk_file.cc: Ditto.
- * fhandler_proc.cc: Ditto.
- * fhandler_process.cc: Ditto.
- * fhandler_raw.cc: Ditto.
- * fhandler_registry.cc: Ditto.
- * fhandler_socket.cc: Ditto.
- * fhandler_virtual.cc: Ditto.
- * miscfuncs.cc: Ditto.
- * mmap.cc: Ditto.
- * netdb.cc: Ditto.
- * path.cc: Ditto.
- * path.h: Ditto.
- * pinfo.cc: Ditto.
- * pinfo.h: Ditto.
- * pthread.cc: Ditto.
- * registry.cc: Ditto.
- * shared.cc: Ditto.
- * shared_info.h: Ditto.
- * smallprint.c: Ditto.
- * spawn.cc: Ditto.
- * strace.cc: Ditto.
- * syscalls.cc: Ditto.
- * thread.h: Ditto.
- * uinfo.cc: Ditto.
- * winsup.h: Ditto.
- * include/limits.h: Ditto.
- * include/cygwin/config.h: Ditto.
- * include/sys/param.h: Ditto.
-
-2003-11-12 Brian Ford <ford@vss.fsi.com>
-
- * dtable.cc (build_fh_pc): Use DEV_SERIAL_MAJOR to catch all serial
- ports. Remove redundant FH_CYGDRIVE case since it is handled by
- DEV_CYGDRIVE_MAJOR.
-
-2003-11-11 Christopher Faylor <cgf@redhat.com>
- Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.cc (pthread::exit): Cleanup on thread exit.
- (__reent_t::init_clib): Set thread local clib __cleanup var
- appropriately.
-
-2003-11-10 Christopher Faylor <cgf@redhat.com>
-
- * miscfuncs.cc (low_priority_sleep): Make a "C" function.
- * winsup.h (low_priority_sleep): Revert previous change to declaration.
-
-2003-11-10 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.h (low_priority_sleep): Fix declaration to avoid linker
- warning.
-
-2003-11-10 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.cc (__reent_t::init_clib): Set thread local clib
- __sdidinit var appropriately.
-
-2003-11-08 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (ftruncate64): Log length as long long.
- (logout): Erase ut_host. Don't write wtmp entry. Return 1 only
- if matching utmp entry has been found, 0 otherwise.
-
-2003-11-08 Corinna Vinschen <corinna@vinschen.de>
-
- * external.cc (cygwin_internal): Add CW_GET_UID_FROM_SID and
- CW_GET_GID_FROM_SID handling.
- * include/cygwin/version.h: Bump API minor number.
- * include/sys/cygwin.h (cygwin_getinfo_types): Add
- CW_GET_UID_FROM_SID and CW_GET_GID_FROM_SID.
-
-2003-11-07 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Reorganize to
- handle freeing of memory on error condition.
-
-2003-11-07 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (cygthread::freerange): Set inuse count. Avoid setting
- ev from h as h would be NULL at this point.
- (cygthread::operator new): Issue debugging info when overflowing the
- thread pool.
- (cygthread::cygthread): Set ev from h here after h has been initialized.
-
-2003-11-06 Corinna Vinschen <corinna@vinschen.de>
-
- * bsdlib.cc (_vwarnx): New function.
- (vwarn): Ditto.
- (vwarnx): Ditto.
- (warn): Ditto.
- (warnx): Ditto.
- (verr): Ditto.
- (verrx): Ditto.
- (err): Ditto.
- (errx): Ditto.
- * cygwin.din: Export above functions.
- * include/err.h: New file.
- * include/cygwin/version.h: Bump API minor number.
-
-2003-11-06 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (getshmlba): New function.
- * external.cc (cygwin_internal): Add CW_GET_SHMLBA handling.
- * mmap.cc (mmap64): Call getshmlba to evaluate granularity.
- * winsup.h (getshmlba): Add declaration.
- * include/cygwin/version.h: Bump API minor number.
- * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_GET_SHMLBA.
-
-2003-11-06 Christopher Faylor <cgf@redhat.com>
-
- * winsup.h: Declare access_worker.
-
-2003-11-05 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/types.h: Fix preprocessor guards for vm_offset_t and
- vm_size_t. Add typedef for vm_object_t.
-
-2003-11-05 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Detect attempt
- to open a directory which lacks read privileges.
-
-2003-11-04 Corinna Vinschen <corinna@vinschen.de>
-
- * external.cc (cygwin_internal): Add CW_GET_POSIX_SECURITY_ATTRIBUTE
- handling.
- * include/cygwin/version.h: Bump API minor number.
- * include/sys/cygwin.h (cygwin_getinfo_types): Add
- CW_GET_POSIX_SECURITY_ATTRIBUTE.
-
- * exceptions.cc (init_global_security): Move from here...
- * sec_helper.cc (init_global_security): ...to here.
-
-2003-11-04 Christopher Faylor <cgf@redhat.com>
-
- * net.cc (dup_ent): Use IsBadStringPtr for alignment checks. Don't use
- a known bad pointer.
-
-2003-11-03 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (dup_ent): Move Win 95 misalignment recogition before
- trying to evaluate string length.
-
-2003-10-31 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.cc (pthread::thread_init_wrapper): Initialize exception
- handling.
-
-2003-10-31 Thomas Pfaff <tpfaff@gmx.net>
-
- Rename pthread::running to pthread::valid throughout.
-
- * thread.h: (pthread::suspend_all_except_self): New static method.
- (pthread::resume_all): Ditto.
- (pthread::suspend_except_self): New method.
- (pthread::resume): Ditto.
- * thread.cc (pthread::suspend_except_self): Implement.
- (pthread::resume): Ditto.
-
-2003-10-29 Danny Smith <dannysmith@users.sourceforege.net>
-
- * include/stdint.h: Prevent signed->unsigned conversion for 32 and
- 64 bit min value constants.
-
-2003-10-28 Igor Pechtchanski <pechtcha@cs.nyu.edu>
-
- * path.cc (dot_special_chars): New global variable.
- (special_name): Make files ending in "." special.
- (fnunmunge): Allow encoded ".".
- (mount_item::fnmunge): Handle trailing ".".
-
-2003-10-28 Christopher Faylor <cgf@redhat.com>
-
- * include/stdint.h: Duplicate below effort for rest of *64_*.
-
-2003-10-28 Christopher Faylor <cgf@redhat.com>
-
- * include/stdint.h: Correctly define INT64_MAX.
-
-2003-10-27 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.h (fast_mutex::init): Initialize lock_counter.
-
-2003-10-27 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (OBSOLETE_FUNCTION): Add tmpfile.
- (NEW_FUNCTIONS): Add _tmpfile64 -> tmpfile translation.
- * cygwin.din: Export _tmpfile64
- * include/cygwin/version.h: Bump api minor number.
-
-2003-10-27 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Add sem_close, sem_getvalue, sem_open and sem_timedwait.
- * pthread.cc (+mangle_sem_name): New function.
- (sem_open): Ditto.
- (sem_close: Ditto.
- (sem_timedwait): Ditto.
- (sem_getvalue): Ditto.
- * thread.cc (semaphore::semaphore): Rearrange member initialization.
- Use appropriate security attribute for process shared semaphores.
- (semaphore::semaphore): New constructor for named semaphores.
- (semaphore::~semaphore): Care for semaphore name.
- (semaphore::_post): Accommodate failing ReleaseSemaphore. Use value
- returned by ReleaseSemaphore vor currentvalue.
- (semaphore::_getvalue): New method.
- (semaphore::_timedwait): Ditto.
- (semaphore::_fixup_after_fork): Rearrange. Don't fail for process
- shared semaphores.
- (semaphore::open): New method.
- (semaphore::timedwait): Ditto.
- (semaphore::post): Fix return value. Set errno appropriately.
- (semaphore::getvalue): New method.
- * thread.h (class semaphore): Add prototypes for open, getvalue,
- timedwait, _getvalue, _timedwait. Add prototypes for new constructor.
- Add name member.
- * include/semaphore.h: Add prototypes for sem_open, sem_close,
- sem_timedwait and sem_getvalue.
- include/cygwin/version.h: Bump API minor number.
-
-2003-10-27 Corinna Vinschen <corinna@vinschen.de>
-
- * miscfunc.cc (__check_invalid_read_ptr): New function.
- * winsup.h: Declare.
-
-2003-10-26 Corinna Vinschen <corinna@vinschen.de>
-
- * security.h (cygpsid::debug_print): Avoid compiler warnings.
-
-2003-10-25 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (normalize_posix_path): Test runs of more than two
- dots for being a run of only dots. Let it pass if not.
-
-2003-10-25 Brian Ford <ford@vss.fsi.com>
-
- * fhandler.cc (fhandler_base::ioctl): Handle FIONBIO.
-
-2003-10-24 Thomas Pfaff <tpfaff@gmx.net>
-
- Rename native_mutex to fast_mutex throughout.
- Rename pthread_key::save_key_to_buffer to
- pthread_key::_fixup_before_fork throughout.
- Rename pthread_key::recreate_key_from_buffer to
- pthread_key::_fixup_after_fork throughout.
-
- * thread.cc (native_mutex::init): Remove.
- (native_mutex::lock): Ditto.
- (native_mutex::unlock): Ditto.
- (pthread::push_cleanup_handler): InterlockedExchangePointer
- is not needed here.
- (pthread_rwlock::pthread_rwlock): Initialize readers list mutex.
- (pthread_rwlock::add_reader): Add reader via List_insert.
- (pthread_rwlock::lookup_reader): Lock list while walking through.
- (pthread_cond::init): Locking the init mutex is now void.
- (pthread_rwlock::init): Ditto.
- (pthread_mutex::init): Ditto.
- * thread.h: Include security.h.
- (fast_mutex): New class. Replacement for native_mutex.
- (List_insert): New template function.
- (List_remove): Ditto.
- (List::List): Initialize synchronising mutex.
- (List::fixup_after_fork): New method.
- (List::insert): Add node via List_insert.
- (List::remove): Remove node via List_remove.
- (List::pop): Remove.
- (List::for_each): Lock list while walking through.
- (List::mx_init): New method.
- (pthread_mutex::fixup_after_fork): Fixup mutex list after fork.
- (pthread::fixup_after_fork): Ditto.
- (pthread_conds::fixup_after_fork): Ditto.
- (pthread_rwlock::fixup_after_fork): Ditto.
- (semaphore::fixup_after_fork): Ditto.
- (pthread_rwlock::readers_mx): New member.
-
-2003-10-24 Brian Ford <ford@vss.fsi.com>
-
- * fhandler.cc (fhandler_base::fcntl): Don't clobber O_APPEND when
- both O_NONBLOCK/O_NDELAY are set for F_SETFL.
-
-2003-10-24 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (win32_device_name): Fix comment.
-
-2003-10-23 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_tty.cc (fhandler_tty_slave::ioctl): Properly set return
- value in FIONBIO case.
-
-2003-10-23 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_proc.cc (format_proc_partitions): Use new device code
- to get major and minor device numbers. Fix size evaluation.
-
-2003-10-22 Corinna Vinschen <corinna@vinschen.de>
-
- * external.cc (cygwin_internal): Add CW_GET_ERRNO_FROM_WINERROR
- handling.
- * include/cygwin/version.h: Bump API minor number.
- * include/sys/cygwin.h (cygwin_getinfo_types): Add
- CW_GET_ERRNO_FROM_WINERROR.
-
-2003-10-22 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in: Add $(LIBSERVER) rule.
- * cygserver.h: Moved from include/cygwin to here.
- * cygserver_ipc.h: Moved from ../cygserver to here.
- * cygserver_shm.h: Ditto.
- * cygwin.din: Add shmat, shmctl, shmdt and shmget.
- * fhandler_tty.cc (fhandler_tty_slave::open): Don't warn about handle
- dup'ing if not build with USE_SERVER.
- * shm.cc: Include cygerrno.h unconditionally.
- (shmat): Set errno to ENOSYS and return -1 if not build with
- USE_SERVER.
- (shmctl): Ditto.
- (shmdt): Ditto.
- (shmget): Ditto.
- * woutsup.h: Remove.
- * include/cygwin/cygserver_process.h: Moved to ../cygserver directory.
- * include/cygwin/cygserver_transport.h: Ditto.
- * include/cygwin/cygserver_transport_pipes.h: Ditto.
- * include/cygwin/cygserver_transport_sockets.h: Ditto.
- * include/cygwin/version.h: Bump API minor number.
-
-2003-10-16 Pierre Humblet <pierre.humblet@ieee.org>
-
- * syscalls.cc (seteuid32): Always construct a default DACL including
- the new sid, Admins and SYSTEM and copy it to the new thread token.
- * security.cc (create_token): Use a NULL default DACL in NtCreateToken.
-
-2003-10-14 Micha Nelissen <M.Nelissen@student.tue.nl>
-
- * dcrt0.cc: Remove local variable alternate_charset_active.
- * fhandler.h: Add variable alternate_charset_active, functions
- str_to_con, con_to_str to dev_console structure.
- * fhandler_console.cc (con_to_str): Move function into dev_console
- class.
- (str_to_con): Ditto.
- (fhandler_console::read): Call con_to_str on dev_state.
- (fhandler_console::write_normal): Call str_to_con on dev_state.
- (fhandler_console::char_command): Change active_charset_active
- assignment to be on dev_state.
- * winsup.h: Remove global external variable alternate_charset_active.
-
-2003-10-13 Micha Nelissen <M.Nelissen@student.tue.nl>
-
- * fhandler_console.cc (char_command): Add escape sequence for codepage
- ansi <-> oem switching for ncurses frame drawing capabilities.
- * dcrt0.cc: Add local variable alternate_charset_active.
- * winsup.h: Add global external variable alternate_charset_active.
-
-2003-10-14 Corinna Vinschen <corinna@vinschen.de>
-
- * exceptions.cc (ctrl_c_handler): Don't send SIGHUP on
- CTRL_LOGOFF_EVENT to processes running in invisible Windows Stations.
- * window.cc (has_visible_window_station): New function.
- * winsup.h: Add declaration for has_visible_window_station.
-
-2003-10-10 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_tty.cc (fhandler_tty_slave::open): Don't create a new window
- station if one already exists.
-
-2003-10-10 Christopher Faylor <cgf@redhat.com>
-
- * shared.cc (shared_info::initialize): Remove myself check since
- hMainProc initialization will allow user initialization to work.
-
-2003-10-09 Yitzchak Scott-Thoennes <sthoenna@efn.org>
-
- * include/sys/mman.h (MAP_FAILED): Define as void *.
-
-2003-10-08 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (hMainProc): Initialize to useful value for use when dll is
- dynamically loaded.
- * shared.cc (shared_info::initialize): Don't initialize user stuff if
- myself doesn't exist.
-
-2003-10-08 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (unlink): Don't even try DELETE_ON_CLOSE technique on
- systems not supporting it.
-
-2003-10-02 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (dll_crt0_1): Call newlib __sinit routine to ensure that
- stdio buffers are initialized to avoid thread initialization races.
-
-2003-10-01 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (win32_device_name): Only fill out destination buffer when
- it's really a device.
-
-2003-09-30 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Add YA method for generating devices.cc.
- * child_info.h: YA update of another magic number.
- * gendevices: New file.
- * devices.in: New file.
- * devices.cc: Regenerate.
- * devices.shilka: Remove.
- * devices.h: Correctly define device pointers.
- (device): Remove now obsolete fields.
- (device::native): Renamed from device::fmt.
- * dtable.cc (build_fh_dev): Simplify in light of new unit parsing
- scheme.
- (build_fh_pc): Ditto.
- * path.cc (win32_device_name): Ditto.
- * fhandler.h (fhandler_base::get_native_name): Reflect renaming of fmt
- to native.
- * fhandler_tty.cc (fhandler_tty_mster::init): Initialize slave device
- prior to reporting unit.
-
-2003-09-30 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::fstat): Drop FH_FLOPPY case.
-
-2003-09-30 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_dev_raw): Add method fstat.
- * fhandler_raw.cc (fhandler_dev_raw::fstat): New method.
-
-2003-09-30 Corinna Vinschen <corinna@vinschen.de>
-
- * devices.h (enum fh_devices): Remove DEV_RAWDRIVE_MAJOR and
- FH_RAWDRIVE.
- * devices.shilka (dev_rawdrive_storage): Remove.
- (unit_devices): Remove pointer to dev_rawdrive_storage.
- (uniq_devices): Remove rawdrive entry.
- * dtable.cc (build_fh_pc): Remove DEV_RAWDRIVE_MAJOR case.
- * path.cc (win32_device_name): ditto.
-
-2003-09-29 Corinna Vinschen <corinna@vinschen.de>
-
- * syslog.cc (vsyslog): Print debug message if ReportEventA fails.
-
-2003-09-28 Pierre Humblet <pierre.humblet@ieee.org>
-
- * sigproc.cc (proc_subproc): Restrict permissions on ppid_handle.
-
-2003-09-28 Christopher Faylor <cgf@redhat.com>
-
- * devices.shilka (device::parse): Restore check for tty in unit
- handling, but without the previous typo.
- * devices.cc: Regenerate.
- * devices.h (DEV_CYGDRIVE_MAJOR): Change major number to one used by
- linux for "user-mode virtual block device".
-
-2003-09-28 Corinna Vinschen <corinna@vinschen.de>
-
- * devices.h: Move a few device major numbers. Fix typo of FH_UDP.
- * device.shilka: Remove /dev/hd device entries, rename all device_hd*
- to device_sd*.
- (device::parse): Disallow units outside lower and upper bounds.
- * dtable.cc (build_fh_pc): Fix typo of FH_UDP.
- * path.cc (win32_device_name): Fix win32 name creation to match new
- device handling.
-
-2003-09-27 Christopher Faylor <cgf@redhat.com>
-
- * device.shilka (device::parse): Allow units on other than tty.
-
-2003-09-27 Corinna Vinschen <corinna@vinschen.de>
-
- * wincap.cc (wincapc::init): Allow requesting server info for NT4 SP6.
-
-2003-09-27 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (symlink_info::check): Use new introducer for mknod'ed files.
- (parse_device): Ditto.
- * syscalls.cc (mknod_worker): Ditto.
-
-2003-09-27 Christopher Faylor <cgf@redhat.com>
-
- * devices.shilka: Add /dev/sda disk devices.
- * devices.cc: Regenerate.
-
-2003-09-27 Christopher Faylor <cgf@redhat.com>
-
- * cygwin-shilka: Remove '#line directives' or suffer debugging oddities.
- Use -length option so that device prefixes are used.
- * devices.cc: Regenerate.
- * syscalls.cc (ttyname): Add debugging output.
-
-2003-09-26 Vaclav Haisman <V.Haisman@sh.cvut.cz>
-
- * wincap.h (wincaps::is_server): New flag.
- (wincapc::version): Change type to OSVERSIONINFOEX.
- (wincapc::is_server): New function.
- * wincap.cc (wincap_unknown::is_server): New initializer.
- (wincap_95): Ditto.
- (wincap_95osr2): Ditto.
- (wincap_98): Ditto.
- (wincap_me): Ditto.
- (wincap_nt3): Ditto.
- (wincap_nt4): Ditto.
- (wincap_nt4sp4): Ditto.
- (wincap_2000): Ditto.
- (wincap_xp): Ditto.
- (wincapc::init): Adapt to OSVERSIONINFOEX. Add detection of NT server
- systems.
- * sched.cc: Include windows.h and registry.h.
- (sched_rr_get_interval): Re-implement for NT systems.
-
-2003-09-26 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_tty.cc (fhandler_tty_slave::ioctl): Properly set
- ioctl_request event when window size changes. Store failing errno in
- ioctl_retval (needed?).
-
-2003-09-26 Pavel Tsekov <ptsekov@gmx.net>
-
- * fhandler_console.c (fhandler_console::read): Record the state of the
- SHIFT, CTRL and ALT keys at the time of the last keyboard input event.
- (fhandler_console::ioctl): Handle requests to retrieve the keyboard
- modifiers via the TIOCLINUX command.
- * fhandler_tty.c (fhandler_tty_slave::read): Ditto.
- * include/sys/termios.h (TIOCLINUX): New macro definition.
-
-2003-09-26 Pierre Humblet <pierre.humblet@ieee.org>
-
- * pinfo.cc (pinfo::init): Do not give FILE_MAP_WRITE access to Everybody.
- * exceptions.cc (sig_handle_tty_stop): Do not create pinfo parent with
- PID_MAP_WRITE.
- * fhandler_process.cc (fhandler_process::fill_filebuf): Ditto for pinfo p.
- * signal.cc (kill_worker): Ditto for pinfo dest.
-
-2003-09-26 Pierre Humblet <pierre.humblet@ieee.org>
-
- * pinfo.h (pinfo::set_acl): Declare.
- * pinfo.cc (pinfo_fixup_after_fork): Duplicate with no rights.
- (pinfo::set_acl): New.
- * spawn.cc (spawn_guts): Call myself.set_acl.
-
-2003-09-26 Pierre Humblet <pierre.humblet@ieee.org>
-
- * uinfo.cc (cygheap_user::init): Make sure the current user appears
- in the default DACL. Rearrange to decrease the indentation levels.
- Initialize the effec_cygsid directly.
- (internal_getlogin): Do not reinitialize myself->gid. Open the process
- token with the required access.
- * cygheap.h (class cygheap_user): Delete members pid and saved_psid.
- Create members effec_cygsid and saved_cygsid.
- (cygheap_user::set_sid): Define inline.
- (cygheap_user::set_saved_sid): Ditto.
- (cygheap_user::sid): Modify.
- (cygheap_user::saved_sid): Modify.
- * cygheap.cc (cygheap_user::set_sid): Delete.
- (cygheap_user::set_saved_sid): Ditto.
- * sec_helper.cc (sec_acl): Set the correct acl size.
- * autoload.cc (FindFirstFreeAce): Add.
- * security.h: Define ACL_DEFAULT_SIZE.
-
-2003-09-26 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (munmap): Use correct address and length parameters when
- calling fhandler's munmap.
-
-2003-09-26 Corinna Vinschen <corinna@vinschen.de>
-
- * spawn.cc (spawn_guts): Set errno to E2BIG if command line is
- longer than CreateProcess allows (32K).
-
-2003-09-25 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (build_fh_name): Return pointer to a 'nodevice' rather than
- a NULL pointer or suffer SEGVs with invalid paths.
-
-2003-09-25 Christopher Faylor <cgf@redhat.com>
-
- * fork.cc (fork_parent): Detect failed pinfo constructor.
- * spawn.cc (spawn_guts): Don't overwrite ENOMEM errno on failed pinfo
- constructor.
-
-2003-09-25 Christopher Faylor <cgf@redhat.com>
-
- * spawn.cc (spawnve): Remove vfork short circuit and let caller deal
- with error return.
-
-2003-09-25 Pierre Humblet <pierre.humblet@ieee.org>
- Christopher Faylor <cgf@redhat.com>
-
- * spawn.cc (spawn_guts): Catch potential error from pinfo.remember.
- Change debug messages to make sense. Pass correct value to pinfo
- constructor. Ensure cleanup after errors. Always reimpersonate after
- errors.
-
-2003-09-25 Christopher Faylor <cgf@redhat.com>
-
- * spawn.cc (spawn_guts): Move system signal handling stuff after
- CreateProcess error check.
-
-2003-09-25 Pierre Humblet <pierre.humblet@ieee.org>
-
- * shared_info.h: Update CURR_USER_MAGIC, CURR_SHARED_MAGIC and
- SHARED_INFO_CB.
- (mount_info::cb): Delete.
- (mount_info::version): Delete.
- (shared_info::delqueue): Delete.
- * Makefile.in: Do magic for USER_MAGIC, class user_info, instead
- of for mount_info.
-
-2003-09-24 Christopher Faylor <cgf@redhat.com>
-
- * include/tzfile.h: Add some missing entries.
-
-2003-09-24 Christopher Faylor <cgf@redhat.com>
-
- * include/paths.h: Add some missing entries.
-
-2003-09-24 Christopher Faylor <cgf@redhat.com>
-
- * shared_info.h (CURR_MOUNT_MAGIC): Fix.
-
- * sigproc.cc (sigpacket): New structure.
- (sig_send): Fill out sigpacket structure to send to signal thread
- rather than racily sending separate packets.
- (wait_sig): Use sigpacket structure to receive info from signal sender.
-
-2003-09-24 Pierre Humblet <pierre.humblet@ieee.org>
-
- * shared_info.h (class user_info): New.
- (cygwin_user_h): New.
- (user_shared): New.
- (enum shared_locations): Replace SH_MOUNT_TABLE by SH_USER_SHARED;
- (mount_table): Change from variable to macro.
- * shared.cc: Use sizeof(user_info) in "offsets".
- (user_shared_initialize): Add "reinit" argument to indicate need
- to reinitialize the mapping. Replace "mount_table" by "user_shared"
- throughout. Call user_shared->mountinfo.init and
- user_shared->delqueue.init.
- (shared_info::initialize): Do not call delqueue.init.
- (memory_init): Add argument to user_shared_initialize.
- * child_info.h (child_info::mount_h): Delete.
- (child_info::user_h): New.
- * sigpproc.cc (init_child_info): Use user_h instead of mount_h.
- * dcrt0.cc (_dll_crt0): Ditto.
- * fhandler_disk_file.cc (fhandler_disk_file::close): Use
- user_shared->delqueue instead of cygwin_shared->delqueue.
- * fhandler_virtual.cc (fhandler_virtual::close): Ditto.
- * syscalls.cc (close_all_files): Ditto.
- (unlink): Ditto.
- (seteuid32): Add argument to user_shared_initialize.
-
-2003-09-24 Christopher Faylor <cgf@redhat.com>
-
- * devices.cc: New file.
- * devices.gperf: New file.
- * devices.shilka: New file.
- * cygwin-gperf: New file.
- * cygwin-shilka: New file.
- * fhandler_fifo.cc: New file.
- * fhandler_nodevice.cc : New file.
-
-2003-09-24 Christopher Faylor <cgf@redhat.com>
-
- Reorganize headers so that path.h precedes fhandler.h throughout.
- Remove device argument and unit arguments from fhandler constructors
- throughout. Remove pc arguments to fhandler functions and use internal
- pc element instead, throughout. Use dev element in pc throughout. Use
- major/minor elements rather than units and device numbers previously in
- fhandler class. Use correct methods for fhandler file names rather
- than directly accessing file name variables, throughout.
- * Makefile.in (DLL_OFILES): Add devices.o, fhandler_fifo.o
- * dcrt0.cc (dll_crt0_1): Call device::init.
- * devices.h: Renumber devices based on more Linux-like major/minor
- numbers. Add more devices. Declare standard device storage.
- (device): Declare struct.
- * dir.cc (opendir): Use new 'build_fh_name' to construct a fhandler_*
- type.
- * dtable.cc (dtable::get_debugger_info): Ditto.
- (cygwin_attach_handle_to_fd): Ditto.
- (dtable::release): Remove special FH_SOCKET case in favor of generic
- "need_fixup_before" test.
- (dtable::init_std_file_from_handle): Use either build_fh_dev or
- build_fh_name to build standard fhandler.
- (dtable::build_fh_name): Renamed from dtable::build_fhandler_from_name.
- Move out of dtable class. Don't accept a path_conv argument. Just
- build it here and pass it to:
- (build_fh_pc): Renamed from dtable::build_fhandler. Move out of dtable
- class. Use intrinsic device type in path_conv to create new fhandler.
- (build_fh_dev): Renamed from dtable::build_fhandler. Move out of
- dtable class. Simplify arguments to just take new 'device' type and a
- name. Just return pointer to fhandler rather than trying to insert
- into dtable.
- (dtable::dup_worker): Accommodate above build_fh name changes.
- (dtable::find_fifo): New (currently broken) function.
- (handle_to_fn): Use strechr for efficiency.
- * dtable.h: Reflect above build_fh name changes and argument
- differences.
- (fhandler_base *&operator []): Return self rather than copy of self.
- * fhandler.cc (fhandler_base::operator =): Use pc element to set
- normalized path.
- (fhandler_base::set_name): Ditto.
- (fhandler_base::raw_read): Use method to access name.
- (fhandler_base::write): Correctly use get_output_handle rather than
- get_handle.
- (handler_base::device_access_denied): New function.
- (fhandler_base::open): Eliminate pc argument and use pc element of
- fhandler_base throughout.
- (fhandler_base::fstat): Detect if device is based in filesystem and use
- fstat_fs to calculate stat, if so.
- (fhandler_base::fhandler_base): Eliminate handling of file names and,
- instead, just free appropriate component from pc.
- (fhandler_base::opendir): Remove path_conv parameter.
- * fhandler.h: Remove all device flags.
- (fhandler_base::pc): New element.
- (fhandler_base::set_name): Change argument to path_conv.
- (fhandler_base::error): New function.
- (fhandler_base::exists): New function.
- (fhandler_base::pc_binmode): New function.
- (fhandler_base::dev): New function.
- (fhandler_base::open_fs): New function.
- (fhandler_base::fstat_fs): New function.
- (fhandler_base::fstat_by_name): New function.
- (fhandler_base::fstat_by_handle): New function.
- (fhandler_base::isfifo): New function.
- (fhandler_base::is_slow): New function.
- (fhandler_base::is_auto_device): New function.
- (fhandler_base::is_fs_special): New function.
- (fhandler_base::device_access_denied): New function.
- (fhandler_base::operator DWORD&): New operator.
- (fhandler_base::get_name): Return normalized path from pc.
- (fhandler_base::get_win32_name): Return windows path from pc.
- (fhandler_base::isdevice): Renamed from is_device.
- (fhandler_base::get_native_name): Return device format.
- (fhandler_fifo): New class.
- (fhandler_nodevice): New class.
- (select_stuff::device_specific): Remove array.
- (select_stuff::device_specific_pipe): New class element.
- (select_stuff::device_specific_socket): New class element.
- (select_stuff::device_specific_serial): New class element.
- (select_stuff::select_stuff): Initialize new elements.
- * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Move to base
- class from fhandler_disk_file.
- (fhandler_base::fstat_by_name): Ditto.
- (fhandler_base::fstat_by_name): Ditto.
- (fhandler_disk_file::open): Move most functionality into
- fhandler_base::open_fs.
- (fhandler_base::open_fs): New function.
- (fhandler_disk_file::close): Move most functionality into
- fhandler_base::close_fs.
- (fhandler_base::close_fs): New function.
- * fhandler_mem.cc (fhandler_dev_mem::open): Use device name in
- debugging output.
- * fhandler_socket.cc (fhandler_socket::set_connect_secret): Copy
- standard urandom device into appropriate place.
- (fhandler_socket::accept): Reflect change in fdsock return value.
- * fhandler_tty.cc: See "throughouts" above.
- * net.cc: Accommodate fdsock change throughout.
- (fdsock): Return success or failure, accept fd argument and device
- argument.
- * path.cc (symlink_info::major): New element.
- (symlink_info::minor): New element.
- (symlink_info::parse_device): Declare new function.
- (fs_info::update): Accommodate changes in path_conv class.
- (path_conv::fillin): Ditto.
- (path_conv::return_and_clear_normalized_path): Eliminate.
- (path_conv::set_normalized_path): New function.
- (path_conv::path_conv): Set info in dev element. Use path_conv methods
- Check for FH_FS rather than FH_BAD to indicate when to fill in
- filesystem stuff. where appropriate rather than direct access. Use
- set_normalized_path to set normalized path.
- (windows_device_names): Eliminate.
- (get_dev): Ditto.
- (get_raw_device_number): Ditto.
- (get_device_number): Ditto.
- (win32_device_name): Call new device name parser to do most of the
- heavy lifting.
- (mount_info::conv_to_win32_path): Fill in dev field as appropriate.
- (symlink_worker): Handle new device files.
- (symlink_info::check): Ditto.
- (symlink_info::parse_device): Define new function.
- * path.h (executable_states): Move here from fhandler.h.
- (fs_info): Rename variables to *_storage and create methods for
- accessing same.
- (path_conv): Add dev element, remove devn and unit and adjust inline
- methods to accommodate.
- (set_normalized_path): Declare new function.
- * pinfo.cc (_pinfo::commune_recv): Add broken support for handling
- fifos.
- (_pinfo::commune_send): Ditto.
- * pipe.cc (fhandler_pipe::close): check for existence of handle before
- closing it.
- (handler_pipe::create): Rename from make_pipe. Change arguments to
- accept fhandler_pipe array. Accommodate fifos.
- (pipe): Rework to deal with fhandler_pipe::create changes.
- (_pipe): Ditto.
- * select.cc: Use individual device_specific types throughout rather
- than indexing with obsolete device number.
- (set_bits): Use is_socket call rather than checking device number.
- * shared_info.h (CURR_MOUNT_MAGIC): Update.
- (conv_to_win32_path): Reflect addition of device argument.
- * syscalls.cc (mknod_worker): New function.
- (open): Use build_fh_name to build fhandler.
- (chown_worker): Detect if this is an 'auto' device rather than an
- on-filesystem device and handle appropriately.
- (chmod_device): New function.
- (chmod): Detect if this is an 'auto' device rather than an
- on-filesystem device and handle appropriately. Use chmod_device to set
- mode of in-filesystem devices.
- (stat_worker): Eliminate path_conv argument. Call build_fh_name to
- construct fhandler. Use fh->error() rather than pc->error to detect
- errors in fhandler construction.
- (access_worker): New function pulled from access. Accommodate
- in-filesystem devices.
- (access): Use access_worker.
- (fpathconf): Detect if this is an 'auto' device rather than an
- on-filesystem device and handle appropriately.
- (mknod_worker): New function.
- (mknod32): New function.
- (chroot): Free normalized path -- assuming it was actually cmalloced.
- * tty.cc (create_tty_master): Tweak for new device class.
- (tty::common_init): Ditto.
- * winsup.h (stat_worker): Remove.
- (symlink_worker): Declare.
-
- * exceptions.cc (set_process_mask): Just call sig_dispatch_pending and
- don't worry about pending_signals since sig_dispatch_pending should
- always do the right thing now.
- (sig_handle): Reorganize SIGCONT handling to more closely conform to
- SUSv3.
- * pinfo.h: Move __SIG enum to sigproc.h.
- (PICOM_FIFO): New enum element.
- (_pinfo): Remove 'thread2signal' stuff throughout class.
- (_pinfo::commune_send): Make varargs.
- (_pinfo::sigtodo): Eliminate.
- (_pinfo::thread2signal): Ditto.
- * signal.cc (kill_worker): Eliminate call to setthread2signal.
- * sigproc.cc (local_sigtodo): Eliminate.
- (getlocal_sigtodo): Ditto.
- (sigelem): New class.
- (pending_signals): New class.
- (sigqueue): New variable, start of sigqueue linked list.
- (sigcatch_nonmain): Eliminate.
- (sigcatch_main): Eliminate.
- (sigcatch_nosync): Eliminate.
- (sigcomplete_nonmain): Eliminate.
- (pending_signals): Eliminate.
- (sig_clear): Call signal thread to clear pending signals, unless
- already in signal thread.
- (sigpending): Call signal thread to get pending signals.
- (sig_dispatch_pending): Eliminate use of pending_signals and just check
- sigqueue.
- (sigproc_terminate): Eliminate all of the obsolete semaphore stuff.
- Close signal pipe handle.
- (sig_send): Eliminate all of the obsolete semaphore stuff and use pipe
- to send signals.
- (getevent): Eliminate.
- (pending_signals::add): New function.
- (pending_signals::del): New function.
- (pending_signals::next): New function.
- (wait_sig): Eliminate all of the obsolete semaphore stuff. Use pipe to
- communicate and maintain a linked list of signals.
- * sigproc.h: Move __SIG defines here. Add __SIGPENDING.
- (sig_dispatch_pending): Remove "C" specifier.
- (sig_handle): Accept a mask argument.
- * thread.cc: Remove signal handling considerations throughout.
-
-2003-09-22 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (do_exit): Eliminate "C" linkage. Call events_terminate
- early.
- (exit_states): Move out of source file into header file.
- * winsup.h: Move exit_states here. Remove "C" linkage from do_exit
- declaration.
- * debug.cc (lock_debug): Remove explicit (and incorrect) external for
- exit_state.
- * sigproc.cc (sig_dispatch_pending): Don't flush signals if exiting.
-
-2003-09-20 Christopher Faylor <cgf@redhat.com>
-
- * spawn.cc (pthread_cleanup): New struct.
- (do_cleanup): New function.
- (spawn_guts): Initialize struct for pthread_cleanup handling to ensure
- proper restoration of signals if/when thread is cancelled. Restore
- settings using pthread_cancel_pop.
-
-2003-09-19 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number to 6.
-
-2003-09-19 Christopher Faylor <cgf@redhat.com>
-
- * thread.h (__reent_t::init_clib): Declare new function.
- * thread.cc (__reent_t::init_clib): Define new function.
- (pthread::thread_init_wrapper): Use __reent_t::init_clib to init local
- clib storage and set std{in,out,err} appropriately.
-
-2003-09-19 Christopher Faylor <cgf@redhat.com>
-
- * syscalls.cc (system): Strip signal considerations from here so that
- they are not inherited by a child process.
- * spawn.cc (spawn_guts): Handle system() signal stuff here.
- * winsup.h (_P_SYSTEM): Define.
-
-2003-09-18 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_tty.cc (fhandler_pty_master::process_slave_output):
- Handle buf == NULL as flushing the buffer.
- (fhandler_tty_slave::read): Handle ptr == NULL as flushing the buffer.
- (fhandler_tty_slave::tcflush): Implement input queue flushing by
- calling read with NULL buffer.
- (fhandler_pty_master::tcflush): Ditto, calling process_slave_output.
- * termios.cc (tcflush): Check for legal `queue' value. Return
- EINVAL otherwise.
-
-2003-09-16 Brian Ford <ford@vss.fsi.com>
-
- * syscalls.cc (gethostid): Add lpFreeBytesAvailable argument to
- GetDiskFreeSpaceEx call since NT4 requires it.
-
-2003-09-16 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_process.cc (fhandler_process::fill_filebuf): Open pinfo with
- PID_MAP_RW.
- * sigproc.cc (talktome): Ditto for winpids.
-
-2003-09-16 Christopher Faylor <cgf@redhat.com>
-
- * pinfo.h (winpids::pid_access): New element.
- (winpids::winpids): Rejigger to set pinfo_access.
- * pinfo.cc (winpids::add): Try to open shared memory region with
- supplied pinfo_access first, then default to readonly.
- * fhandler_termios.cc (tty_min::kill_pgrp): When getting list of pids
- to work with, suggest opening with PID_MAP_RW.
- * signal.cc (kill_pgrp): Ditto.
- * sigproc.cc (sig_send): Perform a write check on todo prior to
- attempting to increment it. Return EACCES if we can't write to it.
-
-2003-09-16 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.cc (cygheap_user::set_saved_sid): Rename from set_orig_sid.
- * cygheap.h (class cygheap_user): Rename orig_psid, orig_uid and
- orig_gid to saved_psid, saved_uid and saved_gid respectively.
- Rename methods orig_sid and set_orig_sid to saved_sid and set_saved_sid
- respectively.
- * sec_helper.cc (sec_acl): Accommodate above changes.
- * spawn.cc (spawn_guts): Ditto.
- * uinfo.cc (uinfo_init): Ditto.
-
-2003-09-15 Christopher Faylor <cgf@redhat.com>
-
- * getopt.c (opterr): Reinstate initialization.
- (optind): Ditto.
- (optopt): Ditto.
- * pinfo.cc: Include cygheap.h or suffer compile error.
- * shared.h: Reset magic number.
-
-2003-09-15 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (sig_handle_tty_stop): Fix boneheaded mistake by using
- correct check for parent state rather than inverted check.
-
-2003-09-15 Pierre Humblet <pierre.humblet@ieee.org>
-
- * security.h (__sec_user): Add "access2" argument.
- (sec_acl): Add "original" and "access2" arguments.
- (sec_user): Add "sid2" and "access2" argument. Remove dependence on
- allow_ntsec.
- (sec_user_nih): Ditto.
- * sec_helper.cc (__sec_user): Add "has_security" test.
- Call sec_acl with new arguments, letting it handle original_sid.
- (sec_acl): Add "original" and "access2" arguments. Handle original_sid
- depending on flag but avoiding duplicates. Use "access2" for sid2.
- * pinfo.cc (pinfo::init): Use security attributes created by sec_user
- when creating the mapping.
- * security.cc (create_token): Adjust arguments in call to sec_acl.
- Call sec_user instead of __sec_user.
- * syscall.cc (seteuid32): Adjust arguments in call to sec_acl. Remove
- now unnecessary test. Remove useless conversions to psid.
- * dcrt0.cc (dll_crt0_1): Call cygsid::init before pinfo_init.
-
-2003-09-13 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Make malloc_wrapper -fomit-frame-pointer.
-
- * cygwin.din: Remove extraneous mallinfo definition.
-
- * dcrt0.cc (quoted): Use strechr for efficiency.
-
- * fhandler.cc (fhandler_base::write): Correctly use get_output_handle
- rather than get_handle.
- (fhandler_base::lseek): Use method for accessing name in debug output.
-
-2003-09-13 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_disk_file.cc (path_conv::ndisk_links): Fix potential
- off-by-one problem when first file in a directory is a directory.
-
-2003-09-13 Pierre Humblet <pierre.humblet@ieee.org>
-
- * include/sys/cygwin.h: Rename PID_UNUSED to PID_MAP_RW.
- * pinfo.cc (pinfo_init): Initialize myself->gid.
- (pinfo::init): Create the "access" variable, set it appropriately and
- use it to specify the requested access.
- * exceptions.cc (sig_handle_tty_stop): Add PID_MAP_RW in pinfo parent.
- * signal.cc (kill_worker): Ditto for pinfo dest.
- * syscalls.cc (setpgid): Ditto for pinfo p.
-
-2003-09-13 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number to 5.
-
-2003-09-12 Christopher Faylor <cgf@redhat.com>
-
- * thread.cc (MTinterface::fixup_after_fork): Remove code which
- potentially overwrote _impure pointer with contents of thread which
- invoked fork since this eliminates important information like the
- pointer to the atexit queue.
-
-2003-09-12 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_disk_file.cc (path_conv::ndisk_links): Fix problem where
- search characters overwrote the path instead of being tacked on the
- end.
-
-2003-09-12 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (_dll_crt0): Accommodate breaking apart of early_stuff_init.
- * exceptions.cc (early_stuff_init): Delete.
- (init_console_handler): New function - top half of early_stuff_init.
- (init_global_security): New function - bottom half of early_stuff_init.
- (sig_handle): Avoid special hExeced test for SIGINT. Just terminate
- the captive process.
- (signal_exit): Add debugging output.
- * fhandler_tty.cc (fhandler_tty_slave::open): Don't allocate a console
- if one already seems to exist. Properly initialize ctrl-c handling if
- we do allocate a console.
- * winsup.h (early_stuff_init): Delete declaration.
- (init_console_handler): New declaration.
- (init_global_security): New declaration.
-
-2003-09-11 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_disk_file.cc (path_conv::ndisk_links): Rename from
- num_entries. Accept an argument and calculate any extra links needed
- based on missing . and .. entries.
- (fhandler_disk_file::fstat_helper): Always call pc->ndisks_links() to
- calculate the number of links.
- * path.h (path_conv::ndisk_links): Declare.
-
-2003-09-11 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (normalize_posix_path): Put check for '//' prefix back to
- denote a UNC path.
- (slash_unc_prefix_p): Remove vestige of old //c method for accessing
- drives.
-
-2003-09-11 Christopher Faylor <cgf@redhat.com>
-
- * dir.cc (rmdir): Add more samba workarounds.
-
-2003-09-11 Corinna Vinschen <corinna@vinschen.de>
-
- * shared.cc (user_shared_initialize): Revert length attribute for name
- variable to be just UNLEN + 1.
-
-2003-09-10 Pierre Humblet <pierre.humblet@ieee.org>
-
- * shared_info.h (shared_info::initialize): Remove argument.
- * cygheap.h (cygheap_user::init): New declaration.
- * uinfo.cc (cygheap_user::init): New.
- (internal_getlogin): Move functionality to cygheap_user::init. Open
- the process token to update the group sid.
- * shared.cc (user_shared_initialize): Get the user information from
- cygheap->user.
- (shared_info::initialize): Remove argument. Call cygheap->user.init
- instead of cygheap->user.set_name.
- (memory_init): Do not get the user name and do not pass it to
- shared_info::initialize.
- * registry.cc (get_registry_hive_path): Make csid a cygpsid.
- (load_registry_hive): Ditto.
-
-2003-09-10 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_disk_file.cc (num_entries): Take . and .. into account if
- they do not exist since cygwin simulates them.
- (fhandler_cygdrive::fstat): Ditto.
- (fhandler_cygdrive::readdir): Don't do any specific tests on
- __d_position when seeing if a drive exists.
-
-2003-09-10 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (DLL_OFILES): Add getopt.o and iruserok.o.
- * cygwin.din: Export __check_rhosts_file, __rcmd_errstr, optarg,
- opterr, optind, optopt, optreset, getopt, getopt_long, iruserok
- and ruserok.
- * getopt.c: Moved from lib to here. Define opt* variables as
- dllexport.
- * iruserok.c: Moved from lib to here. Rearrange function order.
- Prefer using 64/32 bit functions.
- * syscalls.cc (shell_fp): Define as struct __sFILE64.
- (getusershell): Use fopen64 instead of fopen.
- * winsup.h: Add declarations for seteuid32, fopen64,
- cygwin_gethostbyname and cygwin_inet_addr.
- * include/getopt.h: Declare opt* variables dllimport.
- * include/cygwin/version.h: Bump API minor number.
-
-2003-09-10 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (sig_handle_tty_stop): Check parent PID_NOCLDSTOP
- rather than erroneously checking *my own* sigtodo.
-
-2003-09-10 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Add some more -fomit-frame-pointer files.
-
- * path.cc (conv_path_list_buf_size): Free normalized_path or suffer
- memory leak.
- * syscalls.cc (chroot): Ditto.
-
-2003-09-10 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (DLL_OFILES): Add bsdlib.o.
- * autoload.cc (RegisterServiceProcess): Add.
- * bsdlib.cc: New file.
- (daemon): New function.
- (login_tty): Ditto.
- (openpty): Ditto.
- (forkpty): Ditto.
- * cygwin.din: Export daemon, forkpty, login_tty, logwtmp, updwtmp,
- openpty and revoke.
- * syscalls.cc (updwtmp): New function, writing to wtmp exclusively.
- (logwtmp): Ditto.
- (login): Call updwtmp instead of writing to wtmp by itself.
- (logout): Ditto.
- * tty.cc (revoke): New funtion.
- * include/paths.h: Define _PATH_DEVNULL.
- * include/pty.h: New header.
- * include/cygwin/version.h: Bump API minor number.
- * include/sys/utmp.h: Declare logwtmp with const arguments.
- Declare updwtmp.
- * lib/iruserok.c: New file.
- (ruserok): New function.
- (iruserok): Ditto.
- (__ivaliduser): Ditto.
- (__icheckhost): Ditto.
-
-2003-09-10 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::fstat): Don't use PC_POSIX.
-
-2003-09-09 Pierre Humblet <pierre.humblet@ieee.org>
-
- * shared_info.h: Include security.h.
- (open_shared): Add psa argument.
- (user_shared_initialize): New declaration.
- * security.h: Add _SECURITY_H guard.
- (sec_user): Use sec_none in the no ntsec case.
- * spawn.cc (spawn_guts): Remove call to load_registry_hive.
- * syscalls (seteuid32): If warranted, call load_registry_hive,
- user_shared_initialize and RegCloseKey(HKEY_CURRENT_USER).
- * shared.cc (user_shared_initialize): New.
- (open_shared): Add and use psa argument.
- (memory_init): Move mount table initialization to
- user_shared_initialize. Call it.
-
-2003-09-09 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap64): Change address types from caddr_t to void *
- according to SUSv3.
- (mmap): Ditto.
- (munmap): Ditto.
- (msync): Ditto.
- (mprotect): Ditto. Move to before the fhandler methods.
- * include/sys/mman.h: Change prototypes accordingly.
-
-2003-09-08 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (dlL_crt0_1): Set __argc_safe after __argc is absolutely
- know to be set.
- * exceptions.cc (sig_handle_tty_stop): Don't reset sigCONT event since
- it is reset automatically.
- * fork.cc (fork): Remove obsolete usage of PID_SPLIT_HEAP.
- * include/sys/cygwin.h: Ditto.
- * sigproc.cc (sig_send): Use sigframe init method to set frame since it
- checks for previous ownership of the frame.
- * sigproc.h (sigframe::init): Accept an "is_exception" argument.
-
-2003-09-08 Christopher Faylor <cgf@redhat.com>
-
- * dir.cc (readdir): Reinstate setting of old ino field for legacy
- applications.
- * dirent.h (dirent): Rename unused field to __ino32.
-
-2003-09-08 Christopher Faylor <cgf@redhat.com>
-
- * passwd.cc (getpwnam_r): Initialize pw_comment field.
-
-2003-09-08 Christopher Faylor <cgf@redhat.com>
-
- * passwd.cc (getpwuid_r32): Initialize pw_comment field.
-
-2003-09-08 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (wait_sig_inited): Remove assertion since it is racy.
-
-2003-09-08 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Export endusershell, getusershell and setusershell.
- * syscalls.cc (getusershell): New function.
- (setusershell): Ditto.
- (endusershell): Ditto.
- * include/cygwin/version.h: Bump API minor number.
-
-2003-09-08 Nicholas Wourms <nwourms@netscape.net>
-
- * cygwin.din: Export argz_add argz_add_sep argz_append argz_count
- argz_create argz_create_sep argz_delete argz_extract argz_insert
- argz_next argz_replace argz_stringify envz_add envz_entry envz_get
- envz_merge envz_remove envz_strip
- * include/cygwin/version.h: Bump api minor number.
-
-2003-09-07 Christopher Faylor <cgf@redhat.com>
-
- Throughout, remove __d_u.__d_data fields from DIR structure.
- * include/sys/dirent.h (dirent): Remvoe old_d_ino.
- (DIR): Make __d_dirhash a 64 bit value. Remove __d_data and __d_u.
- Add __flags.
- * dir.cc (opendir_states): New enum.
- (opendir): Clear new DIR __flags field.
- (readdir): Fill in '.' and '..' entries if we hit EOF and we haven't
- seen them already. Nuke setting of old_d_ino.
- (rewinddir): Reset DIR __flags field.
- (seekdir64): Ditto.
- * fhandler_disk_file.cc (fhandler_cygdrive::fhandler_cygdrive): Remove
- special handling of "." and ".." since they are now handled
- automatically.
-
-2003-09-07 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/in.h: Don't define ipv6 stuff unless we call for it
- specifically since it isn't really implemented yet.
-
-2003-09-07 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.cc (_csbrk): More left coercion cleanup.
- * fhandler_tty.cc (fhandler_tty_slave::read): Ditto.
- (fhandler_tty_slave::write): Ditto.
- * fhandler_windows.cc (fhandler_windows::read): Ditto.
- * heap.cc (sbrk): Ditto.
-
-2003-09-07 Pierre Humblet <pierre.humblet@ieee.org>
-
- * signal.cc (nanosleep): Improve test for valid values. Round delay up
- to resolution. Fix test for negative remainder. Use timeGetTime
- through gtod.
- (sleep): Round up return value.
-
-2003-09-07 Pierre Humblet <pierre.humblet@ieee.org>
- Christopher Faylor <cgf@redhat.com>
-
- * hires.h (HIRES_DELAY_MAX): Define.
- (hires_ms::minperiod): Declare static.
- (hires_ms::resolution): New.
- (hires_ms::dmsecs): New.
- (hires_ms::prime): Return UINT.
- (gtod): Declare.
- * times.cc (hires_ms::prime): Always calculate minperiod and set it to
- 1 in case of failure. Return minperiod.
- (hires_ms::resolution): Define.
- (hires_ms::~hires_ms): Delete.
- (hires_ms::usecs): Check minperiod to prime.
- (gtod) Define as global.
-
-2003-09-06 Christopher Faylor <cgf@redhat.com>
-
- Remove left coercion throughout.
-
-2003-09-04 Pierre Humblet <pierre.humblet@ieee.org>
-
- * hires.h (hires_ms::~hires_ms): Delete declaration.
- * times.cc (hires_ms::~hires_ms): Delete definition..
-
-2003-09-04 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (__argc_safe): New variable.
- (dll_crt0_1): Store argc in __argc_safe, which will theoretically
- remain untouched by the user.
- * fhandler_console.cc (fhandler_console::read): Silence some compiler
- warnings.
- * fhandler_raw.cc (fhandler_dev_raw::raw_read): Ditto.
- * pinfo.cc (_pinfo::commune_recv): Carefully bound argv scan and check
- for potentially bad pointers since user could have set argv cell to
- anythinw.
- * cygheap.h (CYGHEAPSIZE): Bump up size.
-
-2003-09-04 Corinna Vinschen <corinna@vinschen.de>
-
- * sysconf.cc (sysconf): Return more accurate value for _SC_AVPHYS_PAGES.
-
-2003-09-04 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc: Restructure. Add, remove and rewrite comments throughout
- for better readability. Change function names for better
- understanding.
- (MAP_SET): Accommodate name change from map_map_ to page_map_.
- (MAP_CLR): Ditto.
- (MAP_ISSET): Ditto.
- (mmap_record::page_map_): Rename from page_map_.
- (mmap_record::get_map): Remove.
- (mmap_record::alloc_page_map): Rename from alloc_map. Return bool
- indicating success of cygheap memory allocation.
- (mmap_record::free_page_map): Rename from free_map.
- (mmap_record::fixup_page_map): Rename from fixup_map.
- (mmap_record::find_unused_pages): Rename from find_empty.
- (mmap_record::map_pages): Rename from map_map.
- (mmap_record::unmap_pages): Rename from unmap_map.
- (class list): Make all class members private.
- (list::list): Remove.
- (list::~list): Remove.
- (list::get_fd): New attribute reader.
- (list::get_hash): Ditto.
- (list::get_record): Ditto.
- (list::add_record): Manage all allocation for mmap_records. Check
- for failed memory allocation and return NULL if so.
- (list::set): New function.
- (list::del_record): Rename from erase. Return true if last mmap_record
- has been deleted, false otherwise. Check for legal incoming index
- value.
- (list::erase): Remove erase/0.
- (list::search_record): Rename from match.
- (map::map): Remove.
- (map::~map): Remove.
- (map::add_list): Manage all allocation for lists. Check for failed
- memory allocation and return NULL if so.
- (map::get_list): New method.
- (map::del_list): Rename from erase. Check for legal incoming index
- value.
- (mmap64): Check for failed mmap_record memory allocation. Return
- with MAP_FAILED and errno set to ENOMEM if so.
- (munmap): Rearrange loop using new list and mmap_record accessor
- functions. Rename loop index variables for better understanding.
- Check if list can be deleted after last mmap_record in it has been
- deleted.
- (msync): Rearrange loop using new list and mmap_record accessor
- functions. Rename loop index variables for better understanding.
- (fixup_mmaps_after_fork): Ditto.
-
-2003-09-03 Christopher Faylor <cgf@redhat.com>
-
- * cxx.cc (new): Fix formatting. Just return result of ccalloc rather
- than calling memset explicitly.
-
-2003-09-03 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (set_process_mask): Set pending signals only when
- signals become unmasked.
- * sigproc.cc (pending_signals): Flip back to a global.
- (wait_sig): Don't set pending signals when there is an armed semaphore
- or signal is blocked.
-
- * shared.cc (shared_info::initialize): Add a username parameter for
- user-mode mounts. Reorganize to try to avoid startup race.
- (memory_init): Move some stuff into shared_info::initialize.
- * shared_info.h (shared_info::initialize): Change declaration.
- (CURR_SHARED_MAGIC): Update.
-
-2003-09-01 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number to 4.
-
-2003-09-01 Christopher Faylor <cgf@redhat.com>
-
- * net.cc (dup_ent): Restore check for NULL input.
-
-2003-08-31 Christopher Faylor <cgf@redhat.com>
-
- * include/sys/cygwin.h: Don't define cygwin-specific things if
- !__CYGWIN__.
-
-2003-08-31 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.cc (cygheap_init): Allocate space for sigaction array in
- cygheap.
- * cygheap.h (cygheap_types): Add HEAP_SIGS.
- * exceptions.cc (signal_fixup_after_exec): Remove from this file.
- * pinfo.h (pinfo::getsig): Just return global_sigs array.
- (pinfo::sigs): Delete.
- * sigproc.cc (signal_fixup_after_exec): Move it here.
- (global_sigs): New global array, moved from pinfo structure.
- (sigalloc): New function. Allocate global sigaction array here.
- (proc_subproc): Remove copysigs call. It's automatic now.
- * include/sys/cygwin.h (PID_NOCLDSTOP): New value.
- * signal.cc (sigaction): Set myself->PID_NODCLDSTOP when appropriate.
- * sigproc.h (sigalloc): Declare.
-
- * fnmatch.c (fnmatch): Use C90 parameters.
- (rangematch): Ditto.
-
- * fhandler.cc (fhandler_base::raw_read): Use right coercion to avoid a
- compiler warning.
-
-2003-08-31 Christopher Faylor <cgf@redhat.com>
-
- * net.cc (dup_ent): Make debugging output consistent.
-
-2003-08-31 Christopher Faylor <cgf@redhat.com>
-
- Use dup_ent rather than specific dup_*_ptr functions throughout.
- * (gen_ent): Delete.
- (dup_ent): Subsume gen_ent functionality.
- (dup_host_ptr): Delete.
- (dup_proto_ptr): Ditto.
- (dup_servent_ptr): Ditto.
-
-2003-08-31 Christopher Faylor <cgf@redhat.com>
-
- * net.cc (gen_ent): Invert sense of null check so that debug output
- makes sense.
-
-2003-08-31 Christopher Faylor <cgf@redhat.com>
-
- * net.cc (free_char_list): Delete.
- (dup_addr_list): Delete.
- (dup_char_list): Delete.
- (free_hostent_ptr): Delete.
- (free_protoent_ptr): Delete.
- (free_servent_ptr): Delete.
- (DWORD_round): New function.
- (strlen_round): New function. Returns strlen rounded up to word size.
- (dup_ent): New, generic function to duplicate a {host,proto,serv}ent
- structure.
- (gen_ent): New macro. Generates a generic dup_{host,proto,serv}ent_ptr
- function.
- (cygwin_getservbyname): Remove call to free_servent_ptr, pass
- servent_buf to dup_servent_ptr.
- (cygwin_getservbyport): Ditto.
- (cygwin_gethostbyname): Ditto for hostent.
- (cygwin_gethostbyaddr): Ditto.
- (cygwin_getprotobyname): Ditto for protoent.
- (cygwin_getprotobynumber): Ditto.
-
-2003-08-31 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (MALLOC_OFILES): Always fill in with correct malloc
- object.
- * configure.in: Fill in MALLOC_OFILES with either debugging or regular
- malloc.
- * configure: Regenerate.
- * dlmalloc.c: Make various fruitless changes to attempt to get to work.
- * dlmalloc.h: Ditto.
- * malloc.cc (free): Check malloc pool when debugging.
-
- * path.cc (win32_device_name): Eliminate compiler warning.
-
- * sigproc.cc (sig_dispatch_pending): Remove use of was_pending. Let
- thisframe.call_signal_handler decide if handler should be called rather
- than using bogus was_pending check.
-
- * exceptions.cc (interrupt_setup): Remove accidentally checked in
- debugging code.
-
-2003-08-30 Christopher Faylor <cgf@redhat.com>
-
- * heap.cc (sbrk): Save rounded address in user_heap_max.
-
-2003-08-30 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (sig_dispatch_pending): Remove explicit call to
- thisframe.call_signal_handler.
-
-2003-08-30 Christopher Faylor <cgf@redhat.com>
-
- Remove some cygserver files.
-
-2003-08-28 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.h: Make some functions regparm.
- * sigproc.cc (checkstate): Make regparm.
- (getevent): Change parameters in declaration, rename from getsem, make regparm.
- (sig_send): Recognize that nosync is now an event. Remove some old
- cruft from previous interrupt anywhere signal handler.
- (getevent): Change parameters in definition, rename from getsem.
- Allocate event rather than semaphore.
- (wait_sig): Treat sigcatch_nosync as an event.
-
-2003-08-28 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (sigreturn): Fix problem where old return address was
- not properly restored for a nested signal.
-
-2003-08-27 Christopher Faylor <cgf@redhat.com>
-
- * autoload.cc (SwitchToThread): Declare as autoload function.
- * cygthread.h (cygthread::main_thread_id): Make public.
- * exceptions.cc (setup_handler): Remove unneeded priority stuff.
- Rename label to reflect what it does. Add debugging for idiotic
- Windows NT problem. Change debugging output to include signal number.
- * miscfuncs.cc (low_priority_sleep): If available, use SwitchToThread
- function to give time slice to other threads.
- * wincap.cc: Properly define have_switch_to_thread throughout.
- * wincap.h (wincap::switch_to_thread): New element.
-
-2003-08-27 Christopher Faylor <cgf@redhat.com>
-
- * syscalls.cc (mount): Don't check win32_path when doing cygdrive
- mount.
-
-2003-08-27 Christopher Faylor <cgf@redhat.com>
-
- * specdir: Correctly remove temporary directory prior to use.
-
-2003-08-27 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (wait_sig): Count number of iterations through
- 'more_signals' loop and issue a warning if DEBUGGING and excessive.
- (WFSO): When debugging and infinite timeout, loop.
-
-2003-08-26 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/stat.h: Allow definition of internal stat structures
- also when compiling newlib.
-
-2003-08-25 Christopher Faylor <cgf@redhat.com>
-
- Throughout, change USE_CYGSERVER to USE_SERVER.
- * Makefile.in (LIBSERVER): Define and use.
- * configure.in: Set LIBSERVER as appropriate.
- * configure: Regenerate.
- * acconfig.h: Regenerate.
- * environ.cc: Rename allow_daemon to allow_server. Only recognize when
- USE_SERVER is defined.
-
-2003-08-23 Christopher Faylor <cgf@redhat.com>
-
- * syscalls.cc (_remove_r): Define.
-
-2003-08-22 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.h (enum cygheap_types): Add HEAP_MMAP.
- (CYGHEAPSIZE): Add another 64K.
- * mmap.cc: Use cmalloc, ccalloc and crealloc with HEAP_MMAP type
- throughout.
-
-2003-08-22 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.cc (user_heap_info::max): New field.
- * heap.cc (heap_init): Save pointer to end of heap reserved memory.
- (sbrk): Don't attempt to commit memory beyond end of heap reserved
- memory. Attempt to honor comment and reserve commitbytes if heapchunk
- fails.
-
-2003-08-20 Pierre Humblet <pierre.humblet@ieee.org>
-
- * exceptions.cc (sigreturn): Don't clobber ebp in recursive signal
- calls.
-
-2003-08-22 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (sig_handle): Change so that default signals indicate
- success.
-
-2003-08-21 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (wait_sig): Remove redundant test in do/while.
-
-2003-08-21 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (wait_sig): Avoid infinite loop.
-
-2003-08-20 Christopher Faylor <cgf@redhat.com>
-
- * speclib: Reenable removal of temp files.
-
-2003-08-20 Christopher Faylor <cgf@redhat.com>
-
- * miscfuncs.cc (low_priority_sleep): Sleep at same priority as main
- thread.
- * sigproc.cc (wait_sig): Keep looping if there are more signals to
- consider and we are flushing signals.
- (sig_send): Put nonsync signals in the correct bucket.
-
-2003-08-20 Christopher Faylor <cgf@redhat.com>
-
- * speclib: Fix created lib to avoid "File truncated" problems.
-
-2003-08-20 Pierre Humblet <pierre.humblet@ieee.org>
-
- * exceptions.cc (interrupt_setup): Set sigsave.sig last to avoid a
- race.
-
-2003-08-20 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (wait_sig): Ensure that myself->getsigtodo array is
- flushed on a __SIGFLUSH.
-
-2003-08-20 Pierre Humblet <pierre.humblet@ieee.org>
- Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (_sigreturn): Handle nested signals without growing the
- stack.
-
-2003-08-19 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (pending_signals): Remove unneeded declaration.
- * sigproc.cc (pending_signals): Make static.
- (wait_sig): Use defined values rather than integers for rc. Never scan
- both todo arrays as this could cause hangs if signals arrive from two
- different sources. Rename saw_pending_signals to saw_failed_interrupt.
- Exit loop when signal found. Enter low-priority sleep, if necessary,
- after finished signalling completion. Set pending_signals when blocked
- (from Pierre Humblet).
-
-2003-08-19 Christopher Faylor <cgf@redhat.com>
-
- * signal.cc (sigpending): Move.
- * sigproc.cc (sigpending): To here.
- (getlocal_sigtodo): Return process-local signal array.
- (sigpending): Accommodate new process-local signal array.
- (sig_send): Ditto.
- (sig_set_pending): Ditto.
- (wait_sig): Ditto.
-
-2003-08-19 Christopher Faylor <cgf@redhat.com>
-
- Throughout, eliminate argument to sig_dispatch_pending.
- * exceptions.cc (setup_handler): Move non-interruptible condition
- handling (back) to wait_sig.
- (set_process_mask): Don't worry about calling sig_dispatch_pending from
- sigthread since it is detected in the function anyway.
- (sig_handle): Eliminate thisproc arg. Don't call sig_dispatch_pending
- on SIGCONT since that should happen automatically.
- * sigproc.cc (sig_dispatch_pending): Eliminate justwake argument. Just
- return when called from sigthread.
- (wait_sig): Change some variables to bool. Change inner while to an
- if. Move uninterruptible signal handling here.
- (sigproc_terminate): Don't call sig_dispatch_pending. Just increment
- semaphore on exit.
-
- * speclib: Use slightly different (but still flawed) method for
- determining symbols to extract from libraries.
-
-2003-08-18 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (sigdelayed): Fix race where signal handler could get
- the wrong mask (as suggested by Pierre Humblet).
-
-2003-08-18 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (mount): Add null/empty check for input parameters.
- (umount): Add null/empty check for input parameters.
-
-2003-08-17 Pierre Humblet <pierre.humblet@ieee.org>
-
- * grp.cc (read_group): Revert previous change.
- * uinfo.cc (pwdgrp::load): Always reset curr_lines.
-
-2003-08-17 Corinna Vinschen <corinna@vinschen.de>
-
- * errno.cc (errmap): Map ERROR_INVALID_BLOCK_LENGTH to EIO.
- * fhandler_raw.cc (fhandler_dev_raw::raw_read): Set more accurate
- errnos instead of EACCES.
- (fhandler_dev_raw::raw_write): Ditto.
-
-2003-08-17 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (special_name): Accommodate all special names with
- extensions.
-
-2003-08-15 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap64): Avoid crash if file size is less than requested
- map length.
-
-2003-08-13 Igor Pechtchanski <pechtcha@cs.nyu.edu>
-
- * path.cc (special_name): Add checks for some specials followed by
- a "." and a FIXME comment.
-
-2003-08-13 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Accommodate change from cygwin_lstat to lstat.
- * syscalls.cc: Add defines to avoid declaration issues when
- renaming cygwin_lstat back to lstat.
- (lstat): Reverted name change from cygwin_lstat.
-
-2003-08-12 Corinna Vinschen <corinna@vinschen.de>
-
- * include/sys/param.h (NBBY): Define if not defined.
-
-2003-08-12 Nicholas Wourms <nwourms@netscape.net>
-
- * include/sys/param.h (setbit): Add new bitmap related macro.
- (clrbit): Likewise.
- (isset): Likewise.
- (isclr): Likewise.
- (howmany): Add new counting/rounding macro.
- (rounddown): Likewise.
- (roundup): Likewise.
- (roundup2): Likewise.
- (powerof2): Likewise
- (MIN): Add macro for calculating min.
- (MAX): Add macro for calculating max.
-
-2003-08-09 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number to 3.
-
-2003-08-08 Gerrit P. Haase <gp@familiehaase.de>
-
- * include/stdint.h: Correctly define INT32_MIN.
-
-2003-08-08 David Rothenberger <daveroth@acm.org>
-
- * grp.cc (read_group): Set __group32.gr_mem pointer back to &null_ptr
- after free() is called.
-
-2003-08-05 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Rework to accommodate new speclib arguments.
- * speclib: Rework to extract everything from libcygwin.a rather than
- building things from existing object files.
-
-2003-08-05 Pavel Tsekov <ptsekov@gmx.net>
-
- * path.cc (cygdrive_getmntent): Do not skip over drives of type
- DRIVE_REMOVABLE.
-
-2003-08-05 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.cc (fhandler_base::lseek): Be more paranoid when
- constructing offsets from 64 bit value.
- * syscalls.cc (logout): Avoid temp buffer memcpy since new scheme does
- not require it.
- (utmp_data): Rework as a macro which returns a pointer into a buffer.
- (getutent): Use new buffer allocation mechanism to grab a utmp buffer.
- (getutid): Ditto.
- (pututline): Ditto.
-
-2003-08-05 Pavel Tsekov <ptsekov@gmx.net>
-
- * fhandler_disk_file.cc (fhandler_cygdrive::readdir): Do not change
- 'errno' if end of directory condition is encountered as per SUSv2.
- * fhandler_proc.cc (fhandler_proc::readdir): Ditto.
- * fhandler_process (fhandler_process::readdir): Ditto.
- * fhandler_registry (fhandler_registry::readdir): Ditto.
-
-2003-07-30 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (_dll_crt0): Move strace.microseconds initialization to
- after pthread initialization.
- (dll_crt0_1): i.e., here.
-
-2003-07-28 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_base.cc (fhandler_base::readv): Rework to properly return
- number of bytes from read.
-
-2003-07-28 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number to 2.
-
-2003-07-26 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (ctrl_c_handler): Send SIGHUP when events occur only if
- there is a tty associated with the process. Send SIGHUP on
- CTRL_LOGOFF_EVENT.
-
- * fhandler_tty.cc (fhandler_tty_slave::open): Adjust console open
- handle counter regardless of whether this is a pty or tty.
- (fhandler_tty_slave::open): Ditto.
- (fhandler_tty_slave::dup): Ditto.
- (fhandler_tty_common::set_close_on_exec): Ditto.
- (fhandler_tty_master::init_console): Decrement console open handle
- counter after init since it will now be handled by all tty open.
- * syscalls.cc (setsid): Rework debugging output slightly.
-
-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-25 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/socket.h: Conditionalize [AP]F_INET6 define.
-
-2003-07-25 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (OBSOLETE_FUNCTION): Add fdopen.
-
-2003-07-25 Christopher Faylor <cgf@redhat.com>
-
- * cygwin.din: Export _fdopen64
- * Makefile.in (NEW_FUNCTIONS): Add _fdopen64 -> fdopen translation.
- * include/cygwin/version.h: Bump api minor number.
-
- * ntdll.h: Remove (now) duplicate FILE_SYNCHRONOUS_IO_NONALERT
- definition.
-
-2003-07-24 Christopher Faylor <cgf@redhat.com>
-
- * environ.cc (check_case_init): Use strncasematch.
-
- * cygwin.din: Export __mempcpy.
- * cygwin/version.h: Bump api minor number.
-
-2003-07-21 Pavel Tsekov <ptsekov@gmx.net>
-
- * mmap.cc: Use proper format specifiers for _off64_t and size_t in
- format strings passed to syscall_printf () and debug_printf ()
- throughout.
-
-2003-07-18 Pierre Humblet <pierre.humblet@ieee.org>
-
- * security.cc (verify_token): Fix white space and style.
- Use type bool instead of BOOL and char. Use alloca
- instead of malloc and free for my_grps.
-
-2003-07-17 Corinna Vinschen <corinna@vinschen.de>
-
- * sysconf.cc (sysconf): Fix OPEN_MAX patch. Return page size on
- _SC_PAGESIZE again.
-
-2003-07-14 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.h (class cygheap_user): Use INVALID_HANDLE_VALUE as invalid
- value for tokens.
- * syscalls.cc (seteuid32): Ditto. Set new_token to process token if
- process token is suitable.
- * uinfo.cc (uinfo_init): Initialize tokens in cygheap user info
- to INVALID_HANDLE_VALUE.
-
-2003-07-14 Pierre Humblet <pierre.humblet@ieee.org>
-
- * cygheap.h (enum impersonation): Delete.
- (cygheap_user::impersonation_state): Delete.
- (cygheap_user::current_token): New.
- (cygheap_user::issetuid): Modify to use current_token.
- (cygheap_user::token): Ditto.
- (cygheap_user::deimpersonate): Ditto.
- (cygheap_user::reimpersonate): Ditto.
- (cygheap_user::has_impersonation_tokens): Ditto.
- (cygheap_user::close_impersonation_tokens): Ditto.
- * security.cc (cygwin_set_impersonation_token): Always set the token.
- (verify_token): Change type of gsid to cygpsid.
- (get_file_attribute): Use the effective ids.
- * syscalls.cc (seteuid32): Modify to use cygheap_user::current_token.
- * uinfo.cc (uinfo_init) Do not set cygheap->user.impersonation_state.
-
-2003-07-12 Christopher Faylor <cgf@redhat.com>
-
- * pinfo.cc (_pinfo::commune_send): Fix bounds test so that poll of
- communicating pid actually stops eventually.
-
-2003-07-10 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (get_device_number): Remove special com? consideration.
- (special_chars): Make static.
- (special_introducers): New.
- (special_char): Allow specified valid_chars args.
- (fnunmunge): Handle aux-like filenames correctly.
- (special_name): Add con, conin$, conout$.
- (mount_item::fnmunge): Use __small_sprintf return value to calculate
- increments.
-
-2003-07-09 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number to 1.
-
-2003-07-09 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_proc.cc (format_proc_stat): Use correctly sized constants
- for filling in zeros on 98.
-
-2003-07-09 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_proc.cc (fhandler_proc::fill_filebuf): Allocate more space
- for stat buffer.
- (format_proc_stat): Reorganize to accumulate and report on all cpus.
-
-2003-07-09 Christopher Faylor <cgf@redhat.com>
-
- * sysconf.cc (sysconf): Return processors online rather than bitmask
- for _SC_NPROCESSORS_ONLN.
-
-2003-07-08 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.cc (creturn): Set appropriate errno when out of memory.
- (ccalloc): Only issue system_printf when debugging.
- * dtable.cc (dtable::extend): Only allocate 100 * the incremental growth
- size max. Set errno appropriately.
- (dtable::build_fhandler): Check for error from set_name.
- * fhandler.cc (fhandler_base::set_name): Set errno and return error on OOM.
- * fhandler.h (fhandler_base::set_name): Change to bool.
- * fhandler_process.cc (format_process_stat): Fix formatting.
- * resource.cc (getrlimit): Return greater of OPEN_MAX or fd table size.
- * sysconf.cc (sysconf): Ditto.
-
-2003-07-07 Christopher Faylor <cgf@redhat.com>
-
- * rmsym: Don't use ranlib.
-
-2003-07-07 Christopher Faylor <cgf@redhat.com>
-
- * newsym: Reenable removal of tmp directory. Just use ar to generate
- archive index.
- * Makefile.in: Don't send ranlib to newsym or rmsym.
-
-2003-07-07 Christopher Faylor <cgf@redhat.com>
-
- * newsym: Create objects that are closer to those created by dlltool so
- as not to confuse --export-all-symbols.
- * rmsym: Be a little more accepting of object filenames now that
- dlltool can create different format files.
-
-2003-07-06 Christopher Faylor <cgf@redhat.com>
-
- * newsym: Oops. Revert below change.
-
-2003-07-06 Christopher Faylor <cgf@redhat.com>
-
- * newsym: Use correct prefix for generating imports.
- * pinfo.cc (_pinfo::commune_send): Don't wait forever for a response
- from another process.
-
-2003-07-06 Christopher Faylor <cgf@redhat.com>
-
- * syscalls.cc (gethostid): Set thread affinity so that results are
- predictable.
-
-2003-07-05 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (list::match): Add parameters to return valid address and
- length back to munmap(). Evaluate intersection between given
- area and mapped area and return it, if any.
- (mmap64): On regular files, don't allow mappings beginning beyond
- EOF. Return with errno set to ENXIO instead.
- (munmap): Rewrite SUSv3 conformant. Check if given memory area is
- valid. Unmap all maps inside given memory area. Don't return error
- if no mapping has been unmapped.
-
-2003-07-05 N Stephens <nigel@mips.com>
-
- * fhandler.h (fhandler_socket::get_connect_state): New method to
- return socket connection state.
- * fhandler_socket.cc (dup): Copy socket connect state to new file
- handle.
- * net.cc (cygwin_rcmd): Mark file handles of sockets returned by
- rcmd() as CONNECTED state.
- (cygwin_rexec): Similarly for rexec().
- (socketpair): Mark both ends of a new socket pair as CONNECTED.
-
-2003-07-04 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (fhandler_disk_file::mmap): Fix address test.
-
-2003-07-03 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (fillout_mntent): Change "posix" to "managed".
-
-2003-07-02 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.h (FH_ENC): New enum.
- (fhandler_base::get_encoded): New function.
- (fhandler_base::set_encoded): Ditto.
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Set encoded flag
- in fhandler, as appropriate.
- (fhandler_disk_file::readdir): Unmunge filename as appropriate based on
- new encoding flag.
- * path.cc (normalize_posix_path): Don't punt on files with colons.
- (special_char): New function.
- (mount_item::fnmunge): Ditto.
- (fnunmunge): Ditto.
- (special_name): Ditto.
- (mount_item::build_win32): Avoid drive considerations when file is
- encoded.
- (mount_info::conv_to_win32_path): Handle encoded filenames.
- (mount_info::conv_to_posix_path): Ditto.
- (fillout_mntent): Add posix string when directory is encoded.
- * path.h (fnunmunge): Declare.
- (path_conv::is_encoded): Declare.
-
-2003-07-03 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_tty.cc (fhandler_tty_slave::open): Conditionalize a little
- more of the cygserver stuff so that ttys actually work.
-
-2003-07-03 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap64): Allow MAP_FIXED with pagesize granularity (4K).
- If a non-zero addr is given, align it to the next lower 64K boundary.
- (fhandler_disk_file::mmap): If a non-zero address is given, try
- mapping using the given address first. If it fails and flags is not
- MAP_FIXED, try again with NULL address.
-
-2003-07-01 Christopher Faylor <cgf@redhat.com>
-
- * thread.cc: Remove _MT_SAFE conditional.
-
-2003-07-01 Christopher Faylor <cgf@redhat.com>
-
- * configure.in: Fix --enable-server option.
- * configure: Regenerate.
-
-2003-07-01 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Remove cygserver stuff.
- * acconfig.h: Add USE_CYGSERVER define.
- * config.h.in: Regenerate.
- * configure.in: Add --enable-server setting.
- * configure: Regenerate.
- * fhandler_tty.cc (fhandler_tty_slave::open): Conditionalize
- compilation of cygserver stuff.
- * fork.cc (fork_child): Ditto.
- * shm.cc: Ditto.
- * tty.cc (tty::common_init): Ditto.
-
- * dcrt0.cc: Use bool rather than BOOL for CYGWIN environment variable
- definitions.
- * environ.cc: Ditto.
- * ntea.cc: Ditto.
- * security.cc: Ditto.
- * security.h: Ditto.
- * syscalls.cc (check_posix_perm): Remove externs that were already
- declared in a header.
- * winsup.h: Ditto. Declare _MT_SAFE here. Delete it someday since
- cygwin should always be _MT_SAFE.
-
-2003-07-01 Christopher Faylor <cgf@redhat.com>
-
- * thread.cc: Remove _MT_SAFE conditional.
-
-2003-07-01 Christopher Faylor <cgf@redhat.com>
-
- * configure.in: Fix --enable-server option.
- * configure: Regenerate.
-
-2003-07-01 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Remove cygserver stuff.
- * acconfig.h: Add USE_CYGSERVER define.
- * config.h.in: Regenerate.
- * configure.in: Add --enable-server setting.
- * configure: Regenerate.
- * fhandler_tty.cc (fhandler_tty_slave::open): Conditionalize
- compilation of cygserver stuff.
- * fork.cc (fork_child): Ditto.
- * shm.cc: Ditto.
- * tty.cc (tty::common_init): Ditto.
-
- * dcrt0.cc: Use bool rather than BOOL for CYGWIN environment variable
- definitions.
- * environ.cc: Ditto.
- * ntea.cc: Ditto.
- * security.cc: Ditto.
- * security.h: Ditto.
- * syscalls.cc (check_posix_perm): Remove externs that were already
- declared in a header.
- * winsup.h: Ditto. Declare _MT_SAFE here. Delete it someday since
- cygwin should always be _MT_SAFE.
-
-2003-06-30 Pierre Humblet <pierre.humblet@ieee.org>
-
- * cygheap.h (enum impersonation): New enum.
- (cygheap_user::token): Delete.
- (cygheap_user::impersonated): Delete.
- (cygheap_user::external_token): New member.
- (cygheap_user::internal_token): New member.
- (cygheap_user::impersonation_state): New member.
- (cygheap_user::issetuid): Modify.
- (cygheap_user::token): New method.
- (cygheap_user::deimpersonate): New method.
- (cygheap_user::reimpersonate): New method.
- (cygheap_user::has_impersonation_tokens): New method.
- (cygheap_user::close_impersonation_tokens): New method.
- * dtable.cc (dtable::vfork_child_dup): Use new cygheap_user methods.
- * fhandler_socket.cc (fhandler_socket::dup): Ditto.
- * fork.cc (fork_child): Ditto.
- (fork_parent): Ditto.
- * grp.cc (internal_getgroups): Ditto.
- * security.cc (verify_token): Ditto.
- (check_file_access): Ditto.
- (cygwin_set_impersonation_token): Detect conflicts. Set
- user.external_token.
- * spawn.cc (spawn_guts): Use new cygheap_user methods.
- * syscalls.cc (seteuid32): Rearrange to use the two tokens
- in cygheap_user.
- (setegid32): Use new cygheap_user methods.
- * uinfo.cc: (internal_getlogin): Ditto.
-
-2003-06-25 Doru Carastan <doru.carastan@mvista.com>
-
- * Makefile.in: Use INSTALL_PROGRAM to install the cygwin DLL.
-
-2003-06-24 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.cc (MTinterface::fixup_after_fork): Fix thread list after
- fork.
- (pthread::threads): Instantiate.
- (pthread::pthread): Initialize running and suspendend.
- Initialize next with NULL.
- Add thread to thread list if it is not the null_pthread.
- (pthread::~pthread): Remove thread from thread list if it is
- not the null_pthread.
- (pthread::postcreate): Set running flag.
- (pthread::exit): Reset running flag.
- (pthread::cancel): Try to cancel thread only if still running.
- (pthread::_fixup_after_fork): Implement.
- (pthread::detach): Check if thread is still running before detach.
- * thread.h (pthread::running): New member.
- (pthread::next): Ditto.
- (pthread::fixup_after_fork): New static method.
- (pthread::threads): New static method.
- (pthread::_fixup_after_fork): New method.
-
-2003-06-20 Christopher Faylor <cgf@redhat.com>
-
- * pinfo.cc (_pinfo::commune_send): Don't attempt to communicate with a
- pure windows process.
-
-2003-06-18 Pierre Humblet <pierre.humblet@ieee.org>
-
- * autoload.cc (GetNetworkParams): Add.
- * net.cc (getdomainname): Call GetNetworkParams and read the
- DhcpDomain registry value if warranted.
-
-2003-06-17 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (mount): Do more strict checking on posix path arguments.
-
-2003-06-15 Christopher Faylor <cgf@redhat.com>
-
- Throughout, remove "include <errno.h>" from files which already include
- cygerrno.h.
-
-2003-06-15 Thomas Pfaff <tpfaff@gmx.net>
-
- * include/cygwin/config.h (__DYNAMIC_REENT__): Define.
- * include/cygwin/version.h: Bump API minor version.
- * cygwin.din: Export __getreent
- * cygerrno.h: Include errno.h. Fix places where _impure_ptr is used
- directly to store the errno value.
- * debug.cc (__set_errno): Ditto.
- * errno.cc: Remove _RRENT_ONLY define to get errno.cc compiled.
- * signal.cc: Rename _reent_clib to _REENT throughout.
- * thread.h (reent_clib): Remove prototype.
- * thread.cc (reent_clib): Rename reent_clib to __getreent. Return
- _impure_ptr until MTinterface is initialized.
- (reent_winsup): Fix a possible SEGV when _r == NULL. Return NULL
- instead.
- * MTinterface::fixup_after_fork: Switch reent back to _impure_ptr to
- keep signal handling running when fork is called from a thread other
- than the mainthread.
-
-2003-06-12 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.cc (pthread_attr_init): Revert change from 2003-06-11
- to return 0 if attribute is already initialized back to EBUSY.
- (pthread_condattr_init): Ditto.
- (pthread_rwlockattr_init): Ditto.
- (pthread_mutexattr_init): Ditto.
-
-2003-06-12 Corinna Vinschen <corinna@vinschen.de>
-
- * exceptions.cc (ctrl_c_handler): Don't send a signal on
- CTRL_SHUTDOWN_EVENT. Add a comment to rationalize the patch.
-
-2003-06-11 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.cc (pthread_attr_init): Return 0 if attribute is already
- initialized.
- Fix return code if out of memory.
- (pthread_condattr_init): Ditto.
- (pthread_rwlockattr_init): Ditto.
- (pthread_mutexattr_init): Return 0 if attribute is already
- initialized.
-
-2003-06-09 Pierre Humblet <pierre.humblet@ieee.org>
-
- * spawn.cc (spawn_guts): Call CreateProcess while impersonated,
- when the real {u,g}ids and the groups are original.
- Move RevertToSelf and ImpersonateLoggedOnUser to the main line.
- * uinfo.cc (uinfo_init): Reorganize. If CreateProcess was called
- while impersonated, preserve the uids and gids and call
- ImpersonateLoggedOnUser. Preserve the uids and gids on Win9X.
-
- * exceptions.cc (error_start_init): Quote the pgm in the command.
-
-2003-06-07 Christopher Faylor <cgf@redhat.com>
-
- * poll.cc: Define FD_SETSIZE to ridiculously large number so that there
- will be no artificially small limits.
-
-2003-06-07 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_tty.cc (fhandler_tty_slave::close): Free the console when
- last tty closes.
-
-2003-06-07 Thomas Pfaff <tpfaff@gmx.net>
-
- * fhandler_socket.cc (fhandler_socket::connect): Change error
- handling for nonblocking connects to return EALREADY when
- connect is called more than once for the same socket.
-
-2003-06-06 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Add vsyslog.
- * fhandler.cc (fhandler_base::write): Only make file sparse if the
- seeked area is >= 128K.
- * syslog.cc (vsyslog): New function, overtaking functionality from
- syslog.
- (syslog): Just call vsyslog.
- * include/cygwin/version.h: Bump API minor.
- * include/sys/syslog.h: Add vsyslog declaration.
-
-2003-06-05 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (cygthread::terminate_thread): Change system_printf to
- debug_printf.
-
-2003-06-04 Christopher Faylor <cgf@redhat.com>
-
- * shared.cc (shared_info::heap_chunk_size): Be really defensive about
- making sure that heap_chunk is set.
-
-2003-06-04 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (conv_path_list): Use correct value when calculating length
- to avoid a potential SEGV.
-
-2003-06-03 Pierre Humblet <pierre.humblet@ieee.org>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fstat): Mark the pc
- as non-executable if the file cannot be opened for read. Retry query
- open only if errno is EACCES. Never change the mode, even if it is 000
- when query open() fails.
-
-2003-06-03 Christopher Faylor <cgf@redhat.com>
-
- * configure.in: Allow any i?86 variant.
- * configure: Regenerate.
-
-2003-06-03 Corinna Vinschen <corinna@vinschen.de>
- Thomas Pfaff <tpfaff@gmx.net>
-
- * fhandler_socket.cc (connect_thread): Remove.
- (accept_thread): Remove.
- (fhandler_socket::connect): Remove all special blocking handling.
- (fhandler_socket::accept): Ditto.
- * net.cc (cygwin_connect): Make blocking sockets temporarily
- non-blocking and call cygwin_select on them to be interruptible.
- (cygwin_accept): Ditto.
-
-2003-06-02 Christopher Faylor <cgf@redhat.com>
-
- * spawn.cc (spawn_guts): Don't hang around if the parent doesn't exist.
-
-2003-06-02 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.h (cygthread::terminate_thread): Mark private.
- * cygthread.cc (cygthread::terminate_thread): Deallocate free_range
- thread stuff.
-
-2003-06-02 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::accept): Rename `signalled'
- to `interrupted' as used in fhandler_socket::connect.
-
-2003-06-02 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::connect): Simplify previous
- patch.
- (fhandler_socket::accept): Ditto.
-
-2003-06-02 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc: Include cygthread.h.
- (class sock_event): Remove.
- (thread_connect): New function.
- (thread_accept): Ditto.
- (fhandler_socket::connect): Use cygthread instead of socket event
- handling for blocking sockets.
- (fhandler_socket::accept): Ditto.
-
-2003-06-02 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.cc (fhandler_base::write): Correct minor printf formatting
- style glitch.
-
-2003-06-01 Pierre Humblet <pierre.humblet@ieee.org>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): Assume
- an existing directory is a root if FindFirstFile fails.
-
-2003-05-30 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (mount_info::conv_to_win32_path): gcc warning about chroot_ok
- was actually valid. Fix it.
-
-2003-05-30 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.cc (init_cheap): Temporarily remove inline that newer gcc's
- have problems with.
-
- * path.cc (path_conv::check): Rework has_acls logic slightly. Uncouple
- exec tests away from filesystem tests.
-
-2003-05-30 Corinna Vinschen <corinna@vinschen.de>
-
- * include/sys/param.h: Add DEV_BSIZE.
-
-2003-05-29 Pierre Humblet <pierre.humblet@ieee.org>
- Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::dup): Rearrange. Fix
- conditional.
-
-2003-05-28 Christopher Faylor <cgf@redhat.com>
-
- * mkvers.sh: Avoid "-dontuse" tags.
-
- * path.cc (path_conv::check): Set exec state based on known situations.
-
- * path.cc (mount_item::fnmunge): New function.
- (mount_item::build_win32): New function.
- (mount_info::conv_to_win32_path): Use build_win32 to build windows
- path.
- * path.h (mount_item::fnmunge): Declare new function.
- (mount_item::build_win32): Ditto.
- * sys/mount.h (MOUNT_ENC): Define.
-
-2003-05-28 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::dup): If running impersonated,
- revert to original account before calling fixup_before_fork_exec
- and impersonate again afterwards. Change comment accordingly.
- Clean up error handling and debug output.
-
-2003-05-27 Thomas Pfaff <tpfaff@gmx.net>
-
- * fhandler_socket.cc (sock_event::~sock_event): New method.
- (sock_event::load): Change to void. Check if winsock2 is available.
- (socke_event::wait): Return 0 if interruptible mode is not available.
- (fhandler_socket::connect): Remove checks for winsock2 availability.
- (fhandler_socket::accept): Ditto.
-
-2003-05-27 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::dup): First try duplicating
- using WSADuplicateSocket/WSASocket, if that fails, try DuplicateHandle.
-
-2003-05-27 Bill C. Riemers <cygwin@docbill.net>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Filter
- permissions through umask on FAT or if ntsec is off.
-
-2003-05-26 Pierre Humblet <pierre.humblet@ieee.org>
-
- * syscalls.cc (statfs): Call GetDiskFreeSpaceEx before GetDiskFreeSpace.
-
-2003-05-26 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (is_at_eof): Fix conditional. Use INVALID_FILE_SIZE
- instead of numeric constant.
-
-2003-05-26 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::connect): Guard calls to
- sock_event methods by a check for WinSock2 availability.
- (fhandler_socket::accept): Ditto.
-
-2003-05-26 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h: Rename FH_W95LSBUG flag to FH_LSEEKED.
- (fhandler_base::set_did_lseek): Rename from set_check_win95_lseek_bug.
- (fhandler_base::get_did_lseek): Rename from get_check_win95_lseek_bug.
- (fhandler_base::set_fs_flags): New method.
- (fhandler_base::get_fs_flags): Ditto.
- * fhandler.cc (fhandler_base::write): Make 64 bit clean. Convert file
- to a "sparse" file when writing after a long lseek (>64K) beyond EOF.
- (fhandler_base::lseek): Call set_did_lseek() instead of
- set_check_win95_lseek_bug().
- (fhandler_base::fhandler_base): Initialize fs_flags to 0.
- * fhandler_disk_file.cc (fhandler_disk_file::open): Don't create files
- as "sparse" unconditionally. Set fs_flags member.
-
-2003-05-25 Pierre Humblet <pierre.humblet@ieee.org>
-
- * autoload.cc (GetDiskFreeSpaceEx): Add.
- * syscalls.cc (statfs): Call full_path.root_dir() instead of
- rootdir(full_path). Use GetDiskFreeSpaceEx when available and
- report space available in addition to free space.
- * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name):
- Do not call FindFirstFile for disk root directories.
-
-2003-05-24 Joe Buehler <jhpb@draco.hekimian.com>
-
- * fhandler_process.cc (format_process_stat): Use PagefileUsage
- instead of VirtualSize.
- (get_mem_values): Ditto.
-
-2003-05-21 Corinna Vinschen <corinna@vinschen.de>
-
- * shared_info.h: Match shared_name declaration with below change.
- * shared.cc (shared_name): Use incoming char * parameter instead of
- local static buffer.
- (open_shared): Accommodate new calling convention for shared_name.
- * exceptions.cc (events_init): Ditto.
- * sigproc.cc (getsem): Ditto.
- * syscalls.cc (login): Ditto.
- (logout): Ditto.
- (pututline): Ditto.
-
-2003-05-20 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (secret_event_name): Return void. Use incoming
- char * parameter instead of local static buffer.
- (fhandler_socket::create_secret_event): Accommodate new calling
- convention for secret_event_name.
- (fhandler_socket::close_secret_event): Ditto.
-
-2003-05-20 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (SECRET_EVENT_NAME): Remove.
- (ENTROPY_SOURCE_NAME): Ditto.
- (secret_event_name): New static function. Create shared event name
- with "Global\" prefix on systems supporting terminal services.
- (fhandler_socket::set_connect_secret): Fix conditional.
- (fhandler_socket::create_secret_event): Create secret event using
- secret_event_name().
- (fhandler_socket::close_secret_event): Ditto.
- * shared.cc (shared_name): Create shared object name with "Global\"
- prefix on systems supporting terminal services.
- * wincap.cc: Set has_terminal_services capability throughout.
- (wincap_2003): New global object representing Windows 2003 Server
- capabilities.
- (wincapc::init): Accommodate Windows 2003 Server.
- * wincap.h (struct wincaps): Add has_terminal_services capability.
-
-2003-05-20 Charles Wilson <cygwin@cwilson.fastmail.fm>
-
- * winsup/cygwin/include/cygwin/version.h: Bump API minor version.
- * winsup/cygwin/include/cygwin/types.h: Define key_t as long long.
- * winsup/cygwin/cygwin.din: Add ftok, _ftok.
- * winsup/cygwin/ipc.cc (ftok): Rework implementation.
-
-2003-05-18 Joe Buehler <jhpb@hekimian.com>
-
- * spawn.cc (spawn_guts): Show more of command line in strace output.
-
-2003-05-15 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.h (pthread::init_mainthread): Remove function parameter.
- (MTinterface::Init): Ditto.
- * thread.cc (MTinterface::Init): Remove function parameter.
- Always initialize reent_key.
- (pthread::init_mainthread): Remove function parameter.
- (MTinterface::fixup_after_fork): Fix pthread::init_mainthread call.
- * dcrt0.cc (dll_crt_0_1) Fix calls to MTinterface::Init and
- pthread::init_mainthread.
- Call pthread::init_mainthread only when not forked.
-
-2003-05-15 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_proc.cc (format_proc_meminfo): Make swap memory output
- Linux style values.
-
-2003-05-13 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/config.h: Define __USE_INTERNAL_STAT64 appropriately.
-
-2003-05-12 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (CYGWIN_START): Define as crt0.o. Add to TARGET_LIBS.
- * fhandler.h (fhandler_virtual::fstat): Remove useless declaration.
- * fhandler_virtual.cc: Remove _COMPILING_NEWLIB define.
- * ipc.cc (ftok): Use stat64.
- * syscalls.cc (_fstat64): Remove alias.
- (_fstat): Ditto.
- (_stat): Ditto.
- (_fstat64_r): New function.
- (_fstat_r): Ditto.
- (_stat64_r): Ditto.
- (stat_r): Ditto.
- * crt0.o: New file, moved from newlib.
- * include/sys/param.h: Ditto.
- * include/sys/utime.h: Ditto.
- * include/sys/utmp.h: Ditto.
- * include/sys/dirent.h: Ditto. Expose different struct dirent,
- dependening of the environment.
-
-2003-05-11 Corinna Vinschen <corinna@vinschen.de>
-
- Replace ino_t by __ino64_t throughout.
-
-2003-05-11 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/types.h: Add key_t typedef.
-
-2003-05-10 Christopher Faylor <cgf@redhat.com>
-
- * dir.cc (readdir): Fill out new old_d_ino field.
- * fhandler.h (fhandler_base::namehash): Define as ino_t.
- (fhandler_base::get_namehash): Ditto.
- * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Accommodate
- new 64 bit st_ino.
- * fhandler_socket.cc (fhandler_socket::fstat): Ditto.
- * path.cc (hash_path_name): Return ino_t.
- * syscalls.cc (stat64_to_stat32): Convert 64 bit inode to 32 bit.
- * winsup.h (hash_path_name): Declare as returning ino_t.
- * include/cygwin/stat.h (__stat32): Use 32 bit st_ino.
- (__stat64): Use 64 bit st_ino.
- * include/cygwin/types.h (__ino64_t): Define.
- (__ino32_t): Ditto.
- (ino_t): Define appropriately.
-
-2003-05-10 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (NEW_FUNCTIONS): All 32/64 from 0.79 API get
- leading underscore.
- * cygwin.din: Ditto.
- * include/cygwin/version.h: Bump API minor number.
-
-2003-05-09 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/config.h: New file.
-
-2003-05-09 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (cygthread::detach): Prioritize waiting for I/O
- completion over waiting for signal delivery.
-
-2003-05-06 Thomas Pfaff <tpfaff@gmx.net>
-
- * signal.cc (nanosleep): Do not wait twice for signal arrival.
-
-2003-05-03 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/types.h: Fix erroneous definition of ino_t from
- 2003-04-28.
-
-2003-05-03 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (chown_worker): Allow chown'ing of socket files.
-
-2003-04-30 Thomas Pfaff <tpfaff@gmx.net>
-
- * Makefile.in: Revert patch from 2003-04-17.
-
-2003-04-28 Brian Ford <ford@vss.fsi.com>
-
- * profil.h (PROFADDR): Prevent overflow when text segments are larger
- than 256k.
- * profil.c (profthr_func): Raise thread priority for more accurate
- sampling.
-
-2003-04-26 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (hash_path_name): Use ino_t as type.
-
-2003-04-26 Christopher Faylor <cgf@redhat.com>
-
- * errno.cc (_sys_nerr): Fix compile error erroneously checked in on
- 2003-04-23.
-
-2003-04-25 Corinna Vinschen <corinna@vinschen.de>
-
- * include/netinet/ip.h: Include netinet/in_systm.h and netinet/in.h
- to allow standalone usage (autoconf).
-
-2003-04-23 Christopher Faylor <cgf@redhat.com>
-
- * fork.cc: Change SLOW_PID_REUSE to NO_SLOW_PID_REUSE and invert ifdef
- sense throughout.
-
-2003-04-22 Christopher Faylor <cgf@redhat.com>
-
- * select.cc (fhandler_pipe::ready_for_read): Assure that get_guard is
- called for successful non-blocking pipe reads.
-
-2003-04-22 Corinna Vinschen <corinna@vinschen.de>
-
- * include/inttypes.h: New file.
- * include/stdint.h: New file.
- * include/cygwin/in.h: Include stdint.h instead of sys/types.h.
- * include/cygwin/types.h: Include stdint.h. Remove typedefs for
- intN_t and uintN_t since these are defined in stdint.h now.
-
-2003-04-21 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL major number to 1005. Change DLL
- minor number to 0. Bump API minor number.
-
-2003-04-20 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (CreateWindowStationA): Add.
- (SetProcessWindowStation): Add.
-
-2003-04-19 Christopher Faylor <cgf@redhat.com>
-
- * wincap.h (wincaps:pty_needs_alloc_console): New element.
- (wincapc:pty_needs_alloc_console): New function.
- * wincap.cc: Add pty_needs_alloc_console throughout.
- * fhandler_tty.cc (fhandler_tty_slave::open): Open an "invisible"
- console on first pty allocation.
-
-2003-04-18 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_tty.cc (fhandler_tty_slave::open): Allocate a console
- whenever a pty is allocated.
-
-2003-04-18 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Use ${nostdlib} variable.
-
-2003-04-18 Diego Biurrun <diego@biurrun.de>
-
- * fhandler_proc.cc (format_proc_cpuinfo): Change /proc/cpuinfo "vendor
- id" string to "vendor_id" to conform with Linux systems.
-
-2003-04-17 Christopher Faylor <cgf@redhat.com>
-
- * syscalls.cc (setsid): Don't call FreeConsole if ctty is already < 0.
-
-2003-04-17 Thomas Pfaff <tpfaff@gmx.net>
-
- * Makefile.in: Add finline-functions optimization to CXXFLAGS.
- * autoload.cc (LoadDLLprime): Rename std_dll_init to
- _std_dll_init.
- (std_dll_init): Remove name mangling prototype. Add attributes
- used and noinline.
- (wsock_init): Ditto.
- Change wsock_init to _wsock_init in wsock32 and ws2_32
- LoadDLLprime.
- * exceptions.cc (unused_sig_wrapper): Remove prototype. Add
- attributes used and noinline.
- * pwdgrp.h ((pwdgrp (passwd *&)): Remove inline code.
- (pwdgrp (__group32 *&)): Ditto.
- * grp.cc (pwdgrp (passwd *&)): Outline constructor.
- (pwdgrp (__group32 *&)): Ditto.
-
-2003-04-17 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.h (pthread::equal): New static method.
- * thread.cc: Rename pthread_equal to pthread::equal throughout.
- (pthread_equal): Use pthread::equal to compare threads ids.
-
-2003-04-15 Christopher Faylor <cgf@redhat.com>
-
- * termios.cc (setspeed): New function.
- (cfsetospeed): Use setspeed to set speed.
- (cfsetispeed): Use setspeed to set speed.
-
-2003-04-15 Chris January <chris@atomice.net>
-
- * autoload.cc: Add load statement for UuidCreate, and
- UuidCreateSequential.
- * cpuid.h: New file.
- * cygwin.din: Export gethostid.
- * fhandler_proc.cc (cpuid): Move to cpuid.h.
- (can_set_flag): Move to cpuid.h.
- * syscalls.cc (gethostid): New function.
- * version.h: Bump api minor version number to 83.
-
-2003-04-15 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.h (pthread_rwlock::release): New method.
- * thread.cc (pthread_rwlock::unlock): Use release to signal waiting
- threads.
- (pthread_rwlock::rdlock_cleanup): Signal waiting threads after a
- cancelation.
- (pthread_rwlock::wrlock_cleanup): Ditto.
-
-2003-04-13 Pierre Humblet <pierre.humblet@ieee.org>
-
- * mkvers.sh: Prefix day with 0 in date only when day < 10.
-
-2003-04-11 Pierre Humblet <pierre.humblet@ieee.org>
-
- * security.cc (get_info_from_sd): New function.
- (get_nt_attribute): Only call read_sd and get_info_from_sd.
- Return void.
- (get_file_attribute): Move sd error handling to get_info_from_sd.
- and symlink handling to fhandler_disk_file::fstat_helper.
- (get_nt_object_attribute): Only call read_sd and get_info_from_sd.
- Return void.
- (get_object_attribute): Remove symlink handling and simply return -1
- when ntsec is off.
- * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): For
- symlinks set the attribute, call get_file_attribute to get the ids
- and return. In the normal case call get_file_attribute with the
- addresses of the buffer ids and do not recheck if the file is a socket.
-
-2003-04-10 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (cygthread::stub): Initialize stack pointer earlier.
- (cygthread::simplestub): Initialize stack pointer.
- (cygthread::terminate_thread): Account for possibility that stack
- pointer has not been set. Issue warnings for unusual conditions.
-
-2003-04-10 Corinna Vinschen <corinna@vinschen.de>
-
- * regex/regex.h: Define regoff_t as _off_t.
- * regex/regex2.h: Ditto.
-
-2003-04-10 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Export wcscoll, wcswidth and wcwidth.
- * include/cygwin/version.h: Bump API minor number.
-
-2003-04-10 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.h: Change 'avail' cygthread element to 'inuse' throughout.
- * cygthread.cc: Ditto.
- (cygthread::stub): Don't initialize already initialized events.
- (cygthread::freerange): Don't create thread here.
- (cygthread::cygthread): Create thread here. Die if thread not created.
- (cygthread::operator new): Simplify. Just grab a thread structure from
- the pool. Don't try to start the thread.
- (cygthread::terminate_thread): Don't close event handles. Just reuse
- them. Call MEM_RELEASE rather than MEM_DECOMMIT (from Joe uehler).
-
-2003-04-08 Bob Cassels <bcassels@abinitio.com>
-
- * fhandler_console.cc (fhandler_console::read) Handle certain key up
- events, to allow pasting accented characters and typing them using the
- "alt + numerics" sequences.
-
-2003-04-07 Christopher Faylor <cgf@redhat.com>
-
- * include/limits.h (IOV_MAX): Set to a number which is small enough to
- use in an array.
-
-2003-04-04 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.h (cygthread::avail): Make LONG for easier use with
- Interlocked* functions.
- * cygthread.cc (cygthread::init): Eliminate unneeded muto.
- (cygthread::operator new): Don't lock. Instead change use of avail
- variable into tri-state: available (1), not available (-1),
- uninitialized (0).
- (cygthread::terminate_thread): Set avail to uninitialized.
- (cygthread::detach): Eliminate local 'avail'. Always set avail to 1
- unless signalled.
-
-2003-04-04 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (cygthread::operator new): Be more defensive when messing with
- threads that are marked "unavailable".
-
-2003-04-03 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_console.cc (CONVERT_LIMIT): Use a size for the 21st century.
-
-2003-04-03 Corinna Vinschen <corinna@vinschen.de>
-
- * external.cc (check_ntsec): Return general ntsec state on NULL
- filename. Check wincap.is_security() additionally.
-
-2003-04-02 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (EXTRA_OFILES): Remove debugging object.
-
-2003-04-02 Jason Tishler <jason@tishler.net>
- Christopher Faylor <cgf@redhat.com>
-
- * external.cc (check_ntsec): New function.
- (cygwin_internal): Add CW_CHECK_NTSEC handling to call check_ntsec()
- from applications.
- * include/cygwin/version.h: Bump API minor number.
- * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_CHECK_NTSEC.
-
-2003-04-02 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (cygthread::new): Add more defensive debugging.
-
-2003-04-01 Pierre Humblet <pierre.humblet@ieee.org>
-
- * fhandler.cc (fhandler_base::fstat): Set the uid and gid fields
- from the current effective ids.
- * fhandler_socket.cc (fhandler_socket::fstat): Keep the uid and gid set
- by fhandler_base::fstat.
- * security.cc (get_nt_attribute): Do not test wincap.has_security ().
- (get_nt_object_attribute): Ditto.
- (get_file_attribute): Add test for wincap.has_security ().
- (get_object_attribute): Ditto.
-
-2003-04-01 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc: Change __off32_t to _off_t and __off64_t to _off64_t
- throughout.
- * fhandler.cc: Ditto.
- * fhandler.h: Ditto.
- * fhandler_clipboard.cc: Ditto.
- * fhandler_disk_file.cc: Ditto.
- * fhandler_dsp.cc: Ditto.
- * fhandler_floppy.cc: Ditto.
- * fhandler_mem.cc: Ditto.
- * fhandler_proc.cc: Ditto.
- * fhandler_process.cc: Ditto.
- * fhandler_random.cc: Ditto.
- * fhandler_registry.cc: Ditto.
- * fhandler_tape.cc: Ditto.
- * fhandler_termios.cc: Ditto.
- * fhandler_virtual.cc: Ditto.
- * fhandler_zero.cc: Ditto.
- * mmap.cc: Ditto.
- * pipe.cc: Ditto.
- * syscalls.cc: Ditto.
- * winsup.h: Ditto.
- * include/cygwin/stat.h: Ditto.
- * include/cygwin/types.h: Ditto. Remove definition of __off32_t
- and __off64_t.
-
-2003-03-31 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (setup_handler): Make sure winapi lock is released when
- exiting loop.
-
-2003-03-30 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/fs.h: Remove unneeded include.
- * include/cygwin/in.h: Include sys/types.h rather than cygwin/types.h.
-
-2003-03-29 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (login): Fix comment.
- (logout): Ditto.
-
-2003-03-29 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc: Slightly cleanup all utmp functions.
- (login): Use mutex to secure against concurrent access to wtmp file.
- (logout): Rewrite using POSIX calls.
- (utmp_fd): Initialized to -1 now. Any value < 0 is treated as closed
- in subsequent functions.
- (utmp_readonly): New variable, indicating utmp file open for reading
- only.
- (internal_setutent): New function implementing setutent().
- (setutent): Call internal_setutent now.
- (endutent): Reset utmp_readonly.
- (getutent): Return immediately if utmp file can't be opened.
- (getutid): Ditto.
- (getutline): Ditto.
- (pututline): Ditto. Use mutex to secure against concurrent access to
- utmp file.
-
-2003-03-28 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Remove EXE_LDFLAGS. Fix fhandler_CFLAGS typo. Recognize .s suffix.
- * configure.in: Remove EXE_LDFLAGS.
- * configure: Regenerate.
-
-2003-03-28 Christopher Faylor <cgf@redhat.com>
-
- * include/sys/cygwin.h: Declare cygwin_internal as unsigned long.
- * external.cc (cygwin_internal): Define as unsigned long.
-
-2003-03-27 Christopher Faylor <cgf@redhat.com>
-
- * include/sys/cygwin.h: Move cygwin_internal outside of WINVER
- conditional.
-
-2003-03-27 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.cc: Change 1==foo equations to foo==1 throughout.
-
-2003-03-27 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.h: Change class names, methods, members and local vars
- according to the GNU coding style.
- * thread.cc: Ditto.
- * dcrt0.cc (dll_crt0_1): Rename pthread::initMainThread call to
- pthread::init_mainthread.
- * pthread.cc (pthead_getsequence_np): Rename pthread::isGoodObject
- call to pthread::is_good_object.
-
-2003-03-27 Joe Buehler <jhpb@draco.hekimian.com>
-
- * autoload.cc: Add RegGetKeySecurity().
- * security.cc (get_nt_object_attribute): Use RegGetKeySecurity() for
- performance.
-
-2003-03-25 Christopher Faylor <cgf@redhat.com>
- Joe Buehler <jhpb@draco.hekimian.com>
-
- * fork.cc (fork_parent): Don't copy signals from parent to child here.
- * sigproc.cc (proc_subproc): Copy signals from parent to child pinfo
- here.
-
-2003-03-23 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.h (class List): Move inline code inside class declaration.
- (List::forEach): Change callback parameter to template class member
- function pointer.
- (pthread_keys::fixup_before_fork): Change to inline. Use List::forEach
- to fixup keys.
- (pthread_keys::fixup_after_fork): Ditto.
- (pthread_keys::runAllDestructors): Ditto.
- (pthread_key::saveAKey): Remove.
- (pthread_key::restoreAKey): Ditto.
- (pthread_key::destroyAKey): Ditto.
- (pthread_key::run_destructor): Rename to runDestructor.
- (pthread_mutex::fixup_after_fork): Change to inline. Use List::forEach
- to fixup mutexes after a fork.
- (pthread_mutex::FixupAfterFork): New method.
- (pthread_mutex::mutexes): New member.
- (pthread_cond::fixup_after_fork): Change to inline. Use List::forEach
- to fixup conds after a fork.
- (pthread_cond::FixupAfterFork): New method.
- (pthread_cond::conds): New member.
- (pthread_rwlock::fixup_after_fork): Change to inline. Use
- List::forEach to fixup rwlocks after a fork.
- (pthread_rwlock::FixupAfterFork): New method.
- (pthread_rwlock::rwlocks): New member.
- (semaphore::fixup_after_fork): Change to inline. Use List::forEach to
- fixup mutexes after a fork.
- (semaphore::FixupAfterFork): New method.
- (semaphore::semaphores): New member.
- (MTinterface::mutexs): Remove.
- (MTinterface::conds): Ditto.
- (MTinterface::rwlocks): Ditto.
- (MTinterface::semaphores): Ditto.
- (pthread_equal): Add extern "C".
- (pthread_mutex_lock): Ditto.
-
- * thread.cc (MTinterface::fixup_after_fork): Change fixup_after_fork
- calls for pthread objects.
- (semaphore::conds): Instantiate.
- (pthread_cond::pthread_cond): Use List::Insert rather than custom list
- code.
- (pthread_cond::~pthread_cond): Use List::Remove rather than custom list
- code.
- (pthread_cond::fixup_after_fork): Rename to FixupAfterFork.
- (pthread_rwlock::rwlocks): Instantiate.
- (pthread_rwlock::pthread_crwlock): Use List::Insert rather than custom
- list code.
- (pthread_rwlock::~pthread_rwlock): Use List::Remove rather than custom
- list code.
- (pthread_rwlock::fixup_after_fork): Rename to FixupAfterFork.
- (pthread_key::saveAKey): Remove.
- (pthread_key::fixup_before_fork): Ditto.
- (pthread_key::restoreAKey): Ditto.
- (pthread_key::fixup_after_fork): Ditto.
- (pthread_key::destroyAKey): Ditto.
- (pthread_key::runAllDestructors): Ditto.
- (pthread_key::run_destructor): Rename to runDestructor.
- (pthread_mutex::mutexes): Instantiate.
- (pthread_mutex::pthread_mutex): Use List::Insert rather than custom
- list code.
- (pthread_mutex::~pthread_mutex): Use List::Remove rather than custom
- list code.
- (pthread_mutex::fixup_after_fork): Rename to FixupAfterFork.
- (semaphore::conds): Instantiate.
- (semaphore::semaphore): Use List::Insert rather than custom list code.
- (semaphores::~semaphore): Use List::Remove rather than custom list
- code.
- (semaphore::fixup_after_fork): Rename to FixupAfterFork.
-
-2003-03-22 Christopher Faylor <cgf@redhat.com>
-
- * pipe.cc (fhandler_pipe::dup): Don't dup input_handle if it doesn't
- exist.
-
-2003-03-22 Christopher Faylor <cgf@redhat.com>
-
- * syscalls.cc (unlink): Be more defensive when SetFileAttributes is
- called. Fix typo in debugging output.
-
-2003-03-21 Christopher Faylor <cgf@redhat.com>
-
- * fork.cc: Conditionalize use of slow_pid_reuse throughout. It's not
- necessary for newer versions of bash.
-
-2003-03-20 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::sendto): Restrict EPIPE and
- SIGPIPE handling to connection oriented sockets. Add comment.
-
-2003-03-19 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.h (signal_fixup_after_exec): Eliminate argument in declaration.
- * exceptions.cc (signal_fixup_after_exec): Eliminate argument in
- definition. Don't reset signal handlers after spawm. Just treat like
- fork/exec.
- * dcrt0.cc (dll_crt0_1): Don't pass PROC_SPAWN argument to
- signal_fixup_after_exec.
- * syscalls.cc (unlink): Don't change attributes of file if not readonly/system.
- Ditto for resetting of arguments.
-
-2003-03-19 Corinna Vinschen <corinna@vinschen.de>
-
- * glob.c: Eliminate __INSIDE_CYGWIN__ preprocessor conditionals
- throughout.
-
-2003-03-19 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Fix
- wrong usage of S_IFDIR.
- * security.cc (get_attribute_from_acl): Ditto.
- (get_file_attribute): Fix wrong usage of S_IFLNK.
- (get_object_attribute): Ditto.
- (alloc_sd): Fix wrong usage of S_IFDIR.
- * syscalls.cc (chmod): Allow chmod'ing of socket files.
-
-2003-03-19 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES):
- Define.
- * glob.c (g_lstat): Use CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES
- instead of numerical constants.
- (g_stat): Ditto.
-
-2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
-
- * pthread.cc (pthread_attr_init): Remove
- (pthread_attr_destroy): Ditto.
- (pthread_attr_setdetachstate): Ditto.
- (pthread_attr_getdetachstate): Ditto.
- (pthread_attr_setstacksize): Ditto.
- (pthread_attr_getstacksize): Ditto.
- (pthread_attr_setinheritsched): Ditto.
- (pthread_attr_getinheritsched): Ditto.
- (pthread_attr_setschedparam): Ditto.
- (pthread_attr_getschedparam): Ditto.
- (pthread_attr_setschedpolicy): Ditto.
- (pthread_attr_getschedpolicy): Ditto.
- (pthread_attr_setscope): Ditto.
- (pthread_attr_getscope): Ditto.
- (pthread_attr_setstackaddr): Ditto.
- (pthread_attr_getstackaddr): Ditto.
- (pthread_key_create): Ditto.
- (pthread_key_delete): Ditto.
- (pthread_setspecific): Ditto.
- (pthread_getspecific): Ditto.
- (pthread_kill): Ditto.
- (pthread_sigmask): Ditto.
- (pthread_equal): Ditto.
- (pthread_mutex_lock): Ditto.
- (pthread_mutex_trylock): Ditto.
- (pthread_mutex_unlock): Ditto.
- (pthread_mutex_destroy): Ditto.
- (pthread_mutex_setprioceiling): Ditto.
- (pthread_mutex_getprioceiling): Ditto.
- (pthread_mutexattr_destroy): Ditto.
- (pthread_mutexattr_getprioceiling): Ditto.
- (pthread_mutexattr_getprotocol): Ditto.
- (pthread_mutexattr_getpshared): Ditto.
- (pthread_mutexattr_gettype): Ditto.
- (pthread_mutexattr_init): Ditto.
- (pthread_mutexattr_setprioceiling): Ditto.
- (pthread_mutexattr_setprotocol): Ditto.
- (pthread_mutexattr_setpshared): Ditto.
- (pthread_mutexattr_settype): Ditto.
- (pthread_cond_destroy): Ditto.
- (pthread_cond_signal): Ditto.
- (pthread_cond_broadcast): Ditto.
- (pthread_condattr_init): Ditto.
- (pthread_condattr_destroy): Ditto.
- (pthread_condattr_getpshared): Ditto.
- (pthread_condattr_setpshared): Ditto.
- (pthread_rwlock_destroy): Ditto.
- (pthread_rwlock_rdlock): Ditto.
- (pthread_rwlock_tryrdlock): Ditto.
- (pthread_rwlock_wrlock): Ditto.
- (pthread_rwlock_trywrlock): Ditto.
- (pthread_rwlock_unlock): Ditto.
- (pthread_rwlockattr_init): Ditto.
- (pthread_rwlockattr_getpshared): Ditto.
- (pthread_rwlockattr_setpshared): Ditto.
- (pthread_rwlockattr_destroy): Ditto.
- (pthread_getconcurrency): Ditto.
- (pthread_setconcurrency): Ditto.
- (pthread_getschedparam): Ditto.
- (pthread_setschedparam): Ditto.
-
- * thread.h (__pthread_attr_init): Remove prototype.
- (__pthread_attr_destroy): Ditto.
- (__pthread_attr_setdetachstate): Ditto.
- (__pthread_attr_getdetachstate): Ditto.
- (__pthread_attr_setstacksize): Ditto.
- (__pthread_attr_getstacksize): Ditto.
- (__pthread_attr_setinheritsched): Ditto.
- (__pthread_attr_getinheritsched): Ditto.
- (__pthread_attr_setschedparam): Ditto.
- (__pthread_attr_getschedparam): Ditto.
- (__pthread_attr_setschedpolicy): Ditto.
- (__pthread_attr_getschedpolicy): Ditto.
- (__pthread_attr_setscope): Ditto.
- (__pthread_attr_getscope): Ditto.
- (__pthread_attr_setstackaddr): Ditto.
- (__pthread_attr_getstackaddr): Ditto.
- (__pthread_key_create): Ditto.
- (__pthread_key_delete): Ditto.
- (__pthread_setspecific): Ditto.
- (__pthread_getspecific): Ditto.
- (__pthread_kill): Ditto.
- (__pthread_sigmask): Ditto.
- (__pthread_equal): Ditto.
- (__pthread_mutex_lock): Ditto.
- (__pthread_mutex_trylock): Ditto.
- (__pthread_mutex_unlock): Ditto.
- (__pthread_mutex_destroy): Ditto.
- (__pthread_mutex_setprioceiling): Ditto.
- (__pthread_mutex_getprioceiling): Ditto.
- (__pthread_mutexattr_destroy): Ditto.
- (__pthread_mutexattr_getprioceiling): Ditto.
- (__pthread_mutexattr_getprotocol): Ditto.
- (__pthread_mutexattr_getpshared): Ditto.
- (__pthread_mutexattr_gettype): Ditto.
- (__pthread_mutexattr_init): Ditto.
- (__pthread_mutexattr_setprioceiling): Ditto.
- (__pthread_mutexattr_setprotocol): Ditto.
- (__pthread_mutexattr_setpshared): Ditto.
- (__pthread_mutexattr_settype): Ditto.
- (__pthread_cond_destroy): Ditto.
- (__pthread_cond_signal): Ditto.
- (__pthread_cond_broadcast): Ditto.
- (__pthread_condattr_init): Ditto.
- (__pthread_condattr_destroy): Ditto.
- (__pthread_condattr_getpshared): Ditto.
- (__pthread_condattr_setpshared): Ditto.
- (__pthread_rwlock_destroy): Ditto.
- (__pthread_rwlock_rdlock): Ditto.
- (__pthread_rwlock_tryrdlock): Ditto.
- (__pthread_rwlock_wrlock): Ditto.
- (__pthread_rwlock_trywrlock): Ditto.
- (__pthread_rwlock_unlock): Ditto.
- (__pthread_rwlockattr_init): Ditto.
- (__pthread_rwlockattr_getpshared): Ditto.
- (__pthread_rwlockattr_setpshared): Ditto.
- (__pthread_rwlockattr_destroy): Ditto.
- (__pthread_getconcurrency): Ditto.
- (__pthread_setconcurrency): Ditto.
- (__pthread_getschedparam): Ditto.
- (__pthread_setschedparam): Ditto.
-
- * thread.cc: Rename __pthread_equal to pthread_equal throughout.
- Change pthread_self parameter appropriate.
- (__pthread_attr_init): Remove __ prefix. Change to extern "C".
- (__pthread_attr_destroy): Ditto.
- (__pthread_attr_setdetachstate): Ditto.
- (__pthread_attr_getdetachstate): Ditto.
- (__pthread_attr_setstacksize): Ditto.
- (__pthread_attr_getstacksize): Ditto.
- (__pthread_attr_setinheritsched): Ditto.
- (__pthread_attr_getinheritsched): Ditto.
- (__pthread_attr_setschedparam): Ditto.
- (__pthread_attr_getschedparam): Ditto.
- (__pthread_attr_setschedpolicy): Ditto.
- (__pthread_attr_getschedpolicy): Ditto.
- (__pthread_attr_setscope): Ditto.
- (__pthread_attr_getscope): Ditto.
- (__pthread_attr_setstackaddr): Ditto.
- (__pthread_attr_getstackaddr): Ditto.
- (__pthread_key_create): Ditto.
- (__pthread_key_delete): Ditto.
- (__pthread_setspecific): Ditto.
- (__pthread_getspecific): Ditto.
- (__pthread_kill): Ditto.
- (__pthread_sigmask): Ditto.
- (__pthread_equal): Ditto.
- (__pthread_mutex_lock): Ditto.
- (__pthread_mutex_trylock): Ditto.
- (__pthread_mutex_unlock): Ditto.
- (__pthread_mutex_destroy): Ditto.
- (__pthread_mutex_setprioceiling): Ditto.
- (__pthread_mutex_getprioceiling): Ditto.
- (__pthread_mutexattr_destroy): Ditto.
- (__pthread_mutexattr_getprioceiling): Ditto.
- (__pthread_mutexattr_getprotocol): Ditto.
- (__pthread_mutexattr_getpshared): Ditto.
- (__pthread_mutexattr_gettype): Ditto.
- (__pthread_mutexattr_init): Ditto.
- (__pthread_mutexattr_setprioceiling): Ditto.
- (__pthread_mutexattr_setprotocol): Ditto.
- (__pthread_mutexattr_setpshared): Ditto.
- (__pthread_mutexattr_settype): Ditto.
- (__pthread_cond_destroy): Ditto.
- (__pthread_cond_signal): Ditto.
- (__pthread_cond_broadcast): Ditto.
- (__pthread_condattr_init): Ditto.
- (__pthread_condattr_destroy): Ditto.
- (__pthread_condattr_getpshared): Ditto.
- (__pthread_condattr_setpshared): Ditto.
- (__pthread_rwlock_destroy): Ditto.
- (__pthread_rwlock_rdlock): Ditto.
- (__pthread_rwlock_tryrdlock): Ditto.
- (__pthread_rwlock_wrlock): Ditto.
- (__pthread_rwlock_trywrlock): Ditto.
- (__pthread_rwlock_unlock): Ditto.
- (__pthread_rwlockattr_init): Ditto.
- (__pthread_rwlockattr_getpshared): Ditto.
- (__pthread_rwlockattr_setpshared): Ditto.
- (__pthread_rwlockattr_destroy): Ditto.
- (__pthread_getconcurrency): Ditto.
- (__pthread_setconcurrency): Ditto.
- (__pthread_getschedparam): Ditto.
- (__pthread_setschedparam): Ditto.
-
-2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
-
- * cygwin.din: Add pthread_rwlock_destroy, pthread_rwlock_init,
- pthread_rwlock_rdlock, pthread_rwlock_tryrdlock,
- pthread_rwlock_wrlock, pthread_rwlock_trywrlock,
- pthread_rwlock_unlock, pthread_rwlockattr_init,
- pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared,
- and pthread_rwlockattr_destroy.
- * include/cygwin/version.h: Bump API minor number.
- * include/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Define a
- reasonable value.
- Add prototypes for pthread_rwlock_destroy, pthread_rwlock_init,
- pthread_rwlock_rdlock, pthread_rwlock_tryrdlock,
- pthread_rwlock_wrlock, pthread_rwlock_trywrlock,
- pthread_rwlock_unlock, pthread_rwlockattr_init,
- pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared,
- and pthread_rwlockattr_destroy.
- * thread.h (PTHREAD_ONCE_MAGIC): Remove superflous semicolon.
- (PTHREAD_RWLOCK_MAGIC): New define.
- (PTHREAD_RWLOCKATTR_MAGIC): Ditto.
- (pthread_rwlockattr): New class.
- (pthread_rwlock): Ditto.
- (MTinterface::rwlocks): New member.
- (MTinterface::MTinterface): Initialize rwlocks.
- Add prototypes for __pthread_rwlock_destroy,
- __pthread_rwlock_wrlock, __pthread_rwlock_trywrlock,
- __pthread_rwlock_unlock, __pthread_rwlockattr_init,
- __pthread_rwlockattr_getpshared, __pthread_rwlockattr_setpshared,
- and __pthread_rwlockattr_destroy.
- * thread.cc (MTinterface::Init): Initialize rwlock internal mutex.
- (MTinterface::fixup_after_fork): Fixup rwlocks after fork.
- (pthread_rwlockattr::isGoodObject): Implement.
- (pthread_rwlockattr::pthread_rwlockattr): Ditto.
- (pthread_rwlockattr::~pthread_rwlockattr): Ditto.
- (pthread_rwlock::initMutex): Ditto.
- (pthread_rwlock::pthread_rwlock): Ditto.
- (pthread_rwlock::~pthread_rwlock): Ditto.
- (pthread_rwlock::RdLock): Ditto.
- (pthread_rwlock::TryRdLock): Ditto.
- (pthread_rwlock::WrLock): Ditto.
- (pthread_rwlock::TryWrLock): Ditto.
- (pthread_rwlock::UnLock): Ditto.
- (pthread_rwlock::addReader): Ditto.
- (pthread_rwlock::removeReader): Ditto.
- (pthread_rwlock::lookupReader): Ditto.
- (pthread_rwlock::RdLockCleanup): Ditto.
- (pthread_rwlock::WrLockCleanup): Ditto.
- (pthread_rwlock::fixup_after_fork): Ditto.
- (pthread_rwlock::isGoodObject): Ditto.
- (pthread_rwlock::isGoodInitializer): Ditto.
- (pthread_rwlock::isGoodInitializerOrObject): Ditto.
- (pthread_rwlock::isGoodInitializerOrBadObject): Ditto.
- (__pthread_rwlock_destroy): Ditto.
- (pthread_rwlock::init): Ditto.
- (__pthread_rwlock_rdlock): Ditto.
- (__pthread_rwlock_tryrdlock): Ditto.
- (__pthread_rwlock_wrlock): Ditto.
- (__pthread_rwlock_trywrlock): Ditto.
-
-2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.h (pthread_cond::ExitingWait): Remove.
- (pthread_cond::mutex): Ditto.
- (pthread_cond::cond_access): Ditto.
- (pthread_cond::win32_obj_id): Ditto.
- (pthread_cond::TimedWait): Ditto.
- (pthread_cond::BroadCast): Ditto.
- (pthread_cond::Signal): Ditto.
- (pthread_cond::waiting): Change type to unsigned long.
- (pthread_cond::pending): New member.
- (pthread_cond::semWait): Ditto.
- (pthread_cond::mtxIn): Ditto.
- (pthread_cond::mtxOut): Ditto.
- (pthread_cond::mtxCond): Ditto.
- (pthread_cond::UnBlock): New method.
- (pthread_cond::Wait): Ditto.
- * thread.cc: Update list of cancellation points.
- (pthread_cond::pthread_cond): Rewrite.
- (pthread_cond::~pthread_cond): Ditto.
- (pthread_cond::TimedWait): Remove.
- (pthread_cond::BroadCast): Ditto.
- (pthread_cond::Signal): Ditto.
- (pthread_cond::UnBlock): Implement.
- (pthread_cond::Wait): Ditto.
- (pthread_cond::fixup_after_fork): Rewrite.
- (pthread_mutex::fixup_after_fork): Remove DETECT_BAD_APP
- conditional.
- (__pthread_cond_broadcast): Just return 0 if the condition is
- not initialized. Call pthread_cond::UnBlock to release blocked
- threads.
- (__pthread_cond_signal): Ditto.
- (__pthread_cond__dowait): Rewrite.
- (pthread_cond_timedwait): Add pthread_testcancel call. Fix
- waitlength calculation.
- (pthread_cond_wait): Add pthread_testcancel call.
-
-2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
-
- * include/pthread.h (PTHREAD_MUTEX_NORMAL): New define.
- * thread.cc: Remove errno.h include.
- (pthread::precreate): Change internal mutex type to normal.
- (pthread_mutex::canBeUnlocked): Implement.
- (pthread_mutex::pthread_mutex): Initialize lock_counter with 0.
- (pthread_mutex::Lock): Rename to _Lock. Add self parameter.
- Change lock_counter logic. Update SetOwner call.
- (pthread_mutex::TryLock): Rename to _TryLock. Add self parameter.
- Change lock_counter logic. Update SetOwner call.
- (pthread_mutex::UnLock): Rename to _UnLock. Add self parameter.
- Change lock_counter logic.
- (pthread_mutex::Destroy): Rename to _Destroy. Update TryLock call.
- (pthread_mutex::SetOwner): Move to thread.h as inline.
- (pthread_mutex::LockRecursive): Ditto.
- (pthread_mutex::fixup_after_fork): Change lock_counter logic.
- (__pthread_mutexattr_settype): Add PTHREAD_MUTEX_NORMAL to valid
- types check.
- * thread.h: Include errno.h and limits.h.
- (MUTEX_LOCK_COUNTER_INITIAL): Remove.
- (MUTEX_OWNER_ANONYMOUS): New define.
- (pthread_mutex::canBeUnlocked): New static method.
- (pthread_mutex::lock_counter): Change type to unsigned long.
- (pthread_mutex::GetPthreadSelf): New method.
- (pthread_mutex::Lock): Call _Lock with pthread_self pointer.
- (pthread_mutex::TryLock): Call _TryLock with pthread_self pointer.
- (pthread_mutex::UnLock): Call _UnLock with pthread_self pointer.
- (pthread_mutex::Destroy): Call _Destroy with pthread_self pointer.
- (pthread_mutex::SetOwner): Moved from thread.cc as inline.
- (pthread_mutex::LockRecursive): Ditto.
- (pthread_mutex::_Lock): New method.
- (pthread_mutex::_TryLock): New method.
- (pthread_mutex::_UnLock): New method.
- (pthread_mutex::_Destroy): New method.
-
-2003-03-18 Christopher January <chris@atomice.net>
-
- * fhandler_proc.cc (format_proc_cpuinfo): Use IsProcessorFeaturePresent
- only on Windows NT. Read CPU Mhz value only on NT. Revert previous
- change so cpuid instruction is called even on non-NT systems.
-
-2003-03-17 Corinna Vinschen <corinna@vinschen.de>
-
- * glob.c (g_lstat): Change API minor test to match API minor number
- change in previous patch.
- (g_stat): Ditto.
-
-2003-03-17 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Reorganize last two api versions so that
- btowc and trunc exports show up before previous bump since there has
- been no exported version of the DLL with the 64 bit changes yet but
- 1.3.22 will have the btowc and trunc.
-
-2003-03-17 Christopher Faylor <cgf@redhat.com>
-
- * cygwin.din: Export btowc, trunc.
- * include/cygwin/version.h: Reflect new exports.
- * syscalls.cc (_stat): Rename to stat to avoid newlib wrapper.
- * syscalls.cc (_fstat): Ditto.
-
-2003-03-16 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_console.cc (fhandler_console::close): Correct check for
- current tty. Add debugging output when console is freed.
- (set_console_state_for_spawn): Add debugging output.
- * fhandler_tty.cc (fhandler_tty_slave::open): Don't decrement console
- open flag when vforking.
- * sigproc.cc (sigproc_terminate): Fix debugging output.
- * spawn.cc (handle): Eliminate second argument.
- (spawn_guts): Reflect elimination of argument change to handle.
- * syscalls.cc (setsid): Add debugging output when console is freed.
-
-2003-03-14 Christopher Faylor <cgf@redhat.com>
-
- * syscalls.cc (rename): Revert assumption that DELETE_ON_CLOSE works on
- Win9x.
-
-2003-03-13 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number to 23.
-
-2003-03-13 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (IsProcessorFeaturePresent): Add.
- * fhandler_proc.cc (format_proc_cpuinfo): Add case for 9x systems.
-
-2003-03-13 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_proc.cc (format_proc_cpuinfo): Fix vendor id in cpuid case.
-
-2003-03-13 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_rcmd): Use correct file descriptor in call to fdsock.
- (cygwin_rexec): Ditto.
-
-2003-03-13 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_tty.cc (fhandler_tty_slave::close): Fix typo in debug
- output.
-
- * syscalls.cc (rename): Assume that DELETE_ON_CLOSE works on Win9x.
-
-2003-03-11 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::dup): Don't call
- fhandler_base::dup() but call DuplicateHandle directly instead to have
- control over socket inheritence.
-
-2003-03-11 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::dup): On NT systems avoid
- using WinSock2 socket duplication methods. Add comment.
-
-2003-03-11 Pierre Humblet <pierre.humblet@ieee.org>
-
- * fhandler_socket.cc (fhandler_socket::fixup_after_fork):
- Set io_handle to INVALID_SOCKET in case of failure.
- (fhandler_socket::dup): Return 0 if the io_handle is valid.
-
-2003-03-10 Corinna Vinschen <corinna@vinschen.de>
-
- * sec_acl.cc (setacl): Don't handle DELETE flag specially.
- * security.cc (alloc_sd): Ditto.
-
-2003-03-09 Corinna Vinschen <corinna@vinschen.de>
-
- * winver.rc: Change Copyright hint to include 2003.
-
-2003-03-09 Corinna Vinschen <corinna@vinschen.de>
-
- Switch to 32/64 datatypes:
- * Makefile.in (OBSOLETE_FUNCTIONS): Add open acl aclcheck aclfrommode
- aclfrompbits aclfromtext aclsort acltomode acltopbits acltotext chown
- facl fchown fgetpos fopen freopen fseeko fsetpos fstat ftello
- ftruncate getegid geteuid getgid getgrent getgrgid getgrnam getgroups
- getpwuid getpwuid_r getuid initgroups lchown lseek lstat mknod mmap
- seekdir setegid seteuid setgid setgroups setregid setreuid setuid stat
- telldir truncate.
- (NEW_FUNCTIONS): Add _open64 acl32 aclcheck32 aclfrommode32
- aclfrompbits32 aclfromtext32 aclsort32 acltomode32 acltopbits32
- acltotext32 chown32 facl32 fchown32 fgetpos64 fopen64 freopen64
- fseeko64 fsetpos64 fstat64 ftello64 ftruncate64 getegid32 geteuid32
- getgid32 getgrent32 getgrgid32 getgrnam32 getgroups32 getpwuid32
- getpwuid_r32 getuid32 initgroups32 lchown32 lseek64 lstat64 mknod32
- mmap64 seekdir64 setegid32 seteuid32 setgid32 setgroups32 setregid32
- setreuid32 setuid32 stat64 telldir64 truncate64 to substitute the
- above.
- * cygserver_shm.h (class client_request_shm): Change uid_t and gid_t
- members to __uid32_t and __gid32_t.
- * cygwin.din: Add symbols acl32 aclcheck32 aclfrommode32
- aclfrompbits32 aclfromtext32 aclsort32 acltomode32 acltopbits32
- acltotext32 facl32 fgetpos64 fopen64 freopen64 fseeko64 fsetpos64
- _fstat64 ftello64 _lseek64 mknod32 _open64.
- * glob.c: Include perprocess.h.
- (globtilde): Call getpwuid32 and getuid32 instead of getpwuid and
- getuid.
- (g_lstat): Check for applications API version to call the appropriate
- typed gl_lstat function.
- (g_stat): Ditto for gl_stat.
- * shm.cc (client_request_shm::client_request_shm): Call geteuid32
- and getegid32 instead of geteuid and getegid throughout.
- * syscalls.cc (_open64): New alias for open.
- (_lseek64): New alias for lseek64.
- (_fstat64): New alias for fseek64.
- (mknod32): New function.
- (mknod): Calls mknod32 now.
- * winsup.h: Make function declarations for getuid32, geteuid32,
- and getpwuid32 accessible for plain C sources. Add declarations
- for getegid32 and getpwnam.
- * include/cygwin/version.h: Bum API minor number to 78.
- * include/sys/cygwin.h: Guard C++ specific members of struct
- per_process against inclusion in plain C sources.
- * include/sys/mman.h (mman): Add guard to avoid type clash when
- compiling Cygwin.
-
-2003-03-09 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number to 22.
-
-2003-03-09 Christopher Faylor <cgf@redhat.com>
-
- Do some minor reformatting of 'extern "C"' use throughout.
-
-2003-03-06 Christopher January <chris@atomice.net>
-
- * autoload.cc (GetSystemTimes): Define new autoload function.
- * fhandler_proc.cc (proc_listing): Add cpuinfo and partitions entries.
- (fhandler_proc::fill_filebuf): Add PROC_CPUINFO and PROC_PARTITIONS
- cases.
- (format_proc_uptime): Use GetSystemTimes if available.
- (read_value): New macro.
- (print): New macro.
- (cpuid): New function.
- (can_set_flag): New function.
- (format_proc_cpuinfo): New function.
- (format_proc_partitions): New function.
-
-2003-03-09 Christopher Faylor <cgf@redhat.com>
-
- * syscalls.cc (unlink): Attempt to be more clever about setting
- attributes of file. Only open file in query mode to avoid having to
- mess with security stuff for reading.
-
-2003-03-09 Corinna Vinschen <corinna@vinschen.de>
-
- * rmsym: Fix regular expression.
-
-2003-03-09 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Change from using new-* to cygwin0 for temporary
- targets.
-
-2003-03-09 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/socket.h: Set SOMAXCONN to Winsock2 value.
-
-2003-03-08 Christopher Faylor <cgf@redhat.com>
-
- * syscalls.cc (unlink): Always attempt to use FILE_FLAG_CLOSE_ON_DELETE
- to delete files since this allows us to preserve the protection of hard
- linked files.
- (link): Generate full path for potentially recalculated .lnk target.
-
-2003-03-08 Christopher Faylor <cgf@redhat.com>
-
- Revert below changes regarding _pinfo::cmdline.
-
-2003-03-08 Corinna Vinschen <corinna@vinschen.de>
-
- * external.cc (cygwin_internal): Change n to __off64_t to match change
- of _pinfo::cmdline.
- * fhandler.h (class fhandler_virtual): Change filesize member to
- __off64_t.
- * fhandler_proc.cc (format_proc_meminfo): Change to return __off64_t.
- (format_proc_stat): Ditto.
- (format_proc_uptime): Ditto.
- * fhandler_process.cc (format_process_stat): Ditto.
- (format_process_status): Ditto.
- (format_process_statm): Ditto.
- * pinfo.cc (_pinfo::cmdline): Expect __off64_t parameter.
- * pinfo.h (class _pinfo): Change declaration of cmdline accordingly.
-
-2003-03-07 Christopher Faylor <cgf@redhat.com>
-
- * path.h (PATH_LNK): New enum val.
- (path_conv::is_lnk_symlink): New function. True if path represents
- .lnk style symlink.
- * path.cc (check_shortcut): Set PATH_LNK in pflags when appropriate.
- (symlink_info::check): Ditto. Remove PATH_LNK from pflags initially.
- * syscalls.cc (unlink): Always remove readonly attribute from a symlink
- regardless of type.
- (link): (from Corinna Vinschen) Allow links to symlinks. Reset
- attributes on a symlink after successful link creation.
- (chmod): Use is_lnk_symlink where appropriate.
- (rename): Ditto.
-
-2003-03-07 Pierre Humblet <pierre.humblet@ieee.org>
-
- * tty.cc (create_tty_master): Call GetComputerName instead of
- cygwin_gethostname. Set ut_id.
- * syscalls.cc (login): Call endutent.
- (setutent): Do not seek after a fresh open.
-
-2003-03-07 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (seteuid32): Fix formatting.
-
-2003-03-04 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.cc (MTinterface::fixup_after_fork): Initialize mainthread
- prior to pthread objects.
-
-2003-03-04 Jason Tishler <jason@tishler.net>
-
- * fhandler_socket.cc (fhandler_socket::dup): Initialize type.
-
-2003-03-03 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.h (fhandler_tty_slave::close): Declare new function.
- (fhandler_tty_slave::dup): Declare new function.
- (fhandler_tty_slave::fixup_after_function): Declare new function.
- * fhandler_tty.cc (fhandler_tty_slave_open): Only increment
- fhandler_console::open_fhs when associated with a pty.
- (fhandler_tty_slave::close): Define new function. Decrement
- fhandler_console::open_fhs when associated with a pty.
- (fhandler_tty_slave::dup): Define new function. Increment
- fhandler_console::open_fhs when associated with a pty.
- (fhandler_tty_slave::fixup_after_fork): Define new function. Increment
- fhandler_console::open_fhs when associated with a pty.
-
-2003-03-03 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_tty.cc (fhandler_pty_slave::open): Grudgingly increment
- fhandler_console::open_fhs here.
- (fhandler_pty_slave::close): Ditto for close.
-
-2003-03-02 Christopher Faylor <cgf@redhat.com>
-
- * lib/getopt.c: Refresh from NetBSD sources.
-
-2003-03-02 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_console.cc (fhandler_console::close): Don't decrement
- in use counter if in vfork fixup stage.
-
-2003-03-02 Christopher Faylor <cgf@redhat.com>
-
- * lib/getopt.c: Nuke use of unneeded BSDisms.
-
-2003-03-02 Christopher Faylor <cgf@redhat.com>
-
- * dll_init.cc (dll_list::load_after_fork): Don't revert to LoadLibrary
- if LoadLibraryEx fails.
- * dtable.cc (dtable::dec_console_fds): Eliminate.
- (dtable::release): Don't treat console specially.
- (dtable::build_fhandler): Ditto.
- * dtable.h (console_fds): Eliminate.
- (dtable::dec_console_fds): Eliminate.
- (dtable::inc_console_fds): Eliminate.
- * fhandler.h (fhandler_console::open_fhs): New static element.
- * fhandler_console.cc (fhandler_console::open): Increment open_fs.
- (fhandler_console::close): Call FreeConsole if no more open consoles
- and ctty is not associated with the console.
- * syscalls.cc (setsid): Simplify check for when to call FreeConsole.
- (check_pty_fds): Eliminate definition.
- * winsup.h (check_pty_fds): Eliminate declaration.
-
-2003-03-02 Christopher Faylor <cgf@redhat.com>
-
- * dll_init.cc (dll_list::load_after_fork): Fix typo where result of
- LoadLibrary was ignored.
-
-2003-03-01 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::bind): Open and write socket
- file using Win32 calls.
-
-2003-03-01 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (get_inet_addr): Open and read socket file using
- Win32 calls.
-
-2003-02-28 Christopher Faylor <cgf@redhat.com>
-
- * cygwin.din: Wrap atexit and exit with cygwin, thread-safe functions.
- * dcrt0.cc (cygwin_atexit): New function.
- (cygwin_exit): Ditto.
-
-2003-02-28 Pierre Humblet <pierre.humblet@ieee.org>
-
- * syscalls.cc (fstat64): Pass get_name () to pc.
- (access): Pass fn to stat_worker.
-
-2003-03-27 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (class sock_event): New class managing Winsock
- events for interruptible socket calls.
- (fhandler_socket::connect): Move support for interruptible call to
- class sock_event. Use class object instead.
- (fhandler_socket::accept): Ditto. Remove useless casts.
-
-2003-03-27 Thomas Pfaff <tpfaff@gmx.net>
-
- * fhandler_socket.cc (fhandler_socket::connect): Add support for
- an interruptable connect.
-
-2003-02-27 Pierre Humblet <pierre.humblet@ieee.org>
-
- * uinfo.cc (internal_getlogin): Only update user.groups.pgsid
- if the call to set the primary group succeeds.
-
-2003-02-27 Christopher Faylor <cgf@redhat.com>
-
- * cygthread::detach: Improve error message.
-
-2003-02-26 Pierre Humblet <pierre.humblet@ieee.org>
-
- * sec_helper.cc (get_sids_info): debug_print owner_sid and group_sid.
-
-2003-02-25 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap64): Fix returned address by taking the granularity
- into account.
-
-2003-02-23 Pierre Humblet <pierre.humblet@ieee.org>
-
- * syslog.cc (syslog): Do not unlock the file before closing it
- and remove debug_printf about stream errors.
-
-2003-02-22 Christopher Faylor <cgf@redhat.com>
-
- * cygmalloc.h: Remove MORECORE_CANNOT_TRIM. It's not true.
- # cygwin.din: Export mallinfo.
- # malloc_wrapper.cc (mallinfo): New function.
-
-2003-02-22 Pierre Humblet <pierre.humblet@ieee.org>
-
- * syslog.cc (syslog): Do not print the Windows pid. Print the Cygwin
- pid as an unsigned decimal. On Win95 print a timestamp and attempt to
- lock the file up to four times in 3 ms.
-
-2003-02-21 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::fhandler_socket): Fix compiler
- warning.
- (fhandler_socket::fstat): Simplify. Set st_uid/st_gid to effective
- uid/gid of current process in case of open sockets.
-
-2003-02-21 Corinna Vinschen <corinna@vinschen.de>
-
- * dtable.cc (dtable::build_fhandler_from_name): Set some fhandler
- data on sockets to evaluate AF_LOCAL sockets correctly.
- (dtable::build_fhandler): Set unit number on sockets.
- * fhandler.h (fhandler_socket): Add unit number.
- (fhandler_socket::get_unit): New method.
- * fhandler_socket.cc (fhandler_socket::fhandler_socket): Set unit
- number.
- (fhandler_socket::fstat): Reorganize to return more Linux-like
- values.
- * net.cc: include ctype.h.
- (fdsock): Set unit number when building fhandler.
- * path.cc (path_conv::check): Set device type to FH_SOCKET if file
- is a AF_UNIX socket.
- (get_devn): Evaluate unit for virtual socket devices.
- (win32_device_name): Set windows path for sockets to unix_path with
- just backslashes to keep the different names.
- * syscalls.cc (fstat64): Don't override st_ino, st_dev and st_rdev
- for sockets.
- (stat_worker): Ditto.
-
-2003-02-21 Pierre Humblet <pierre.humblet@ieee.org>
-
- * autoload.cc (AccessCheck): Add.
- (DuplicateToken): Add.
- * security.h (check_file_access): Declare.
- * syscalls.cc (access): Convert path to Windows, check existence
- and readonly attribute. Call check_file_access instead of acl_access.
- * security.cc (check_file_access): Create.
- * sec_acl (acl_access): Delete.
-
-2003-02-19 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.cc (fhandler_base::open): Move some filesystem specific
- stuff.
- (fhandler_disk_file::open): Accept some filesystem specific stuff.
- * sigproc.cc (wait_for_sigthread): Become slightly more thread safe.
- (sig_send): Don't assume that signal thread is ready.
-
-2003-02-20 Corinna Vinschen <corinna@vinschen.de>
-
- * wincap.h (wincap): Remove unnecessary definition of
- supports_sparse_files.
- * wincap.cc: Ditto.
-
-2003-02-20 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Check descriptor
- created by cygheap_fdnew constructor.
- * fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
- * fhandler_socket.cc (fhandler_socket::accept): Ditto and move
- creation of file descriptor behind blocking OS call.
- * net.cc (cygwin_socket): Ditto.
- (cygwin_rcmd): Ditto.
- (cygwin_rresvport): Ditto.
- (cygwin_rexec): Ditto.
- (socketpair): Ditto.
-
-2003-02-20 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (GetCompressedFileSize): Add.
- * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Compute
- st_blocks value from GetCompressedFileSize() if available.
-
-2003-02-18 Vaclav Haisman <V.Haisman@sh.cvut.cz>
-
- * wincap.h (wincaps::supports_sparse_files): New flag.
- (wincapc::supports_sparse_files): New method.
- * wincap.cc (wincap_unknown): Define value for the new flag.
- (wincap_95): Ditto.
- (wincap_95osr2): Ditto.
- (wincap_98): Ditto.
- (wincap_98se): Ditto.
- (wincap_me): Ditto.
- (wincap_nt3): Ditto.
- (wincap_nt4): Ditto.
- (wincap_nt4sp4): Ditto.
- (wincap_2000): Ditto.
- (wincap_xp): Ditto.
- * path.h (path_conv::fs_flags): New method.
- * fhandler_disk_file.cc: Include winioctl.h for DeviceIoControl.
- (fhandler_disk_file::open): Set newly created and truncated files as
- sparse on platforms that support it.
-
-2003-02-17 Pierre Humblet <pierre.humblet@ieee.org>
-
- * grp.cc (internal_getgroups): Handle properly tokens with
- no groups. Fix bug introduced on 2003-02-04.
-
-2003-02-16 Christopher Faylor <cgf@redhat.com>
-
- * cygwin.din: Export all appropriate newlib libm functions. Sort.
- * include/cygwin/version.h: Bump API minor number.
-
-2003-02-15 Christopher Faylor <cgf@redhat.com>
-
- * cygwin.din: Export all appropriate newlib libc functions.
- * include/cygwin/version.h: Bump API minor number.
-
-2003-02-14 Jason Tishler <jason@tishler.net>
-
- * mmap.cc (mprotect): Add missing break.
-
-2003-02-13 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (try_to_debug): Don't reset priority when returning
- from non-waitloop call.
-
-2003-02-13 Vaclav Haisman <V.Haisman@sh.cvut.cz>
- Christopher Faylor <cgf@redhat.com>
-
- * fhandler_console.cc (fhandler_console::write_normal): Use MessageBeep
- for bell sound.
- * autoload.cc (MessageBeep): Add.
-
-2003-02-13 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/types.h: Use correct ifdef guard for u_ definitions.
-
-2003-02-13 Christopher Faylor <cgf@redhat.com>
-
- * environ.cc (environ_init): Use strechr.
-
-2003-02-13 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/in.h (sockaddr_in): Fix typo.
-
-2003-02-12 Christopher Faylor <cgf@redhat.com>
-
- * path.h (path_conv): Reorganize slightly.
-
-2003-02-12 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_tty.cc (process_input): Add sanity check to ensure that
- console typeahead is cleared on signal.
-
-2003-02-12 Christopher Faylor <cgf@redhat.com>
-
- * spawn.cc (linebuf::~linebuf): Resurrect commented out (for
- debugging?) code.
-
-2003-02-10 Ralf Habacker <ralf.habacker@freenet.de>
-
- * include/cygwin/in.h (in_attr_t): Define new type.
- * include/arpa/inet.h (inet_addr): Change return type to in_addr_t.
- (inet_lnaof): Ditto.
- (inet_netof): Ditto.
- (inet_network): Ditto.
-
-2003-02-10 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/types.h: Move many *_t typedefs here. Protect them
- with ifdefs.
- * fhandler_disk_file.cc (fhandler_disk_file::fstat): Change ntsec_atts to mode_t.
- * security.cc (get_attribute_from_acl): Accept mode_t attribute.
- (get_nt_attribute): Ditto.
- (get_file_attribute): Ditto.
- (get_nt_object_attribute): Ditto.
- (get_object_attribute): Ditto.
- * security.h: Reflect above changes.
- * syscalls.cc (chown_worker): Change attrib to mode_t.
-
-2003-02-08 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number to 21.
-
-2003-02-07 Christopher Faylor <cgf@redhat.com>
-
- * malloc.cc (DEFAULT_MMAP_THRESHOLD): Bump down to 16MB thanks to below
- changes.
-
-2003-02-07 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap_record::alloc_map): De-inline. Add offset and length
- parameter. Only protect pages actually unused currently. Do job
- of map_map() when initializing a map.
- (mmap_record::map_map): Reduce functionality for the reuse case
- of private anonymous mapping.
- (mmap_record::fixup_map): Format change.
- (list::add_record): Add offset and length parameter to call
- mmap_record::alloc_map() correctly.
- (mmap64): Rename `l' variable to `map_list'. Accommodate above changes.
- (munmap): Rename `l' variable to `map_list'.
- (msync): Ditto.
- (fhandler_disk_file::mmap): Streamline code.
- (mprotect): Ditto.
- (fixup_mmaps_after_fork): Rename `l' variable to `map_list'.
-
-2003-02-07 Vaclav Haisman <V.Haisman@sh.cvut.cz>
- Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (try_to_debug): Set priority of current thread rather
- than the main thread. Make busy waiting loop less busy. Restore
- priority when function returns.
-
-2003-02-07 Christopher Faylor <cgf@redhat.com>
-
- * malloc.cc (DEFAULT_MMAP_THRESHOLD): Set high to avoid mmaps.
-
-2003-02-07 Christopher Faylor <cgf@redhat.com>
-
- * pipe.cc (fhandler_pipe::close): Avoid extraneous this->.
-
-2003-02-06 Christopher Faylor <cgf@redhat.com>
-
- * heap.cc (heap_init): Remove debugging code.
-
-2003-02-06 Pierre Humblet <pierre.humblet@ieee.org>
-
- * security.h: Introduce names UNKNOWN_UID and UNKNOWN_GID and delete
- declaration of is_grp_member.
- * uinfo.cc (internal_getlogin): Use UNKNOWN_GID.
- * passwd.cc (pwdgrp::read_passwd): Use UNKNOWN_UID.
- * grp.cc (pwdgrp::read_group): Change group name to provide better
- feedback.
- (getgrgid): Use gid16togid32.
- * sec_helper.cc (is_grp_member): Delete.
-
-2003-02-05 Christopher Faylor <cgf@redhat.com>
-
- * path.cc: Change 'to_posix_p' to 'to_posix' throughout.
- (conv_path_list_buf_size): Accommodate relative paths.
-
-2003-02-05 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (etc::dir_changed): Fix debug printf.
-
-2003-02-05 Corinna Vinschen <corinna@vinschen.de>
-
- * sec_acl.cc (setacl): Move all permission settings to beginning of
- loop. Set default rights to same values as in alloc_sd(). Set DELETE
- for owner and default owner only if S_IWOTH is given.
-
-2003-02-05 Pierre Humblet <pierre.humblet@ieee.org>
-
- * sec_acl.cc: Change all __aclent16_t to __aclent32_t except in
- wrapper function definitions. Replace call to the aclXYZ functions by
- calls aclXYZ32.
- (searchace): Change type of third argument to __uid32_t and use
- ILLEGAL_UID instead of -1;
- (setacl): Remove some initializations. Only give STANDARD_RIGHTS_WRITE
- for S_IWOTH. Replace -1 by ILLEGAL_UID.
- (getacl): Change type of owner_sid, group_sid and ace_sid to cygpsid.
- In last else clause, suppress second call to ace_sid.get_id and use
- TRUE in first call. Replace EqualSid by ==.
- (acl_access): Call internal_getgroups in USER and GROUP cases.
- (acecmp: Define static.
- (acl32): Create from 16 bit type.
- (facl32): Ditto.
- (lacl32): Ditto.
- (aclcheck32): Ditto.
- (aclsort32): Ditto.
- (acltomode32): Ditto.
- (aclfrommode32): Ditto.
- (acltopbits32): Ditto.
- (aclfrompbits32): Ditto.
- (acltotext32): Ditto.
- (aclfromtext32): Ditto, and use strechr.
- (acl16to32): Create.
- (acl): Make it a wrapper function.
- (facl): Ditto.
- (lacl): Ditto.
- (aclcheck): Ditto.
- (aclsort): Ditto.
- (acltomode): Ditto.
- (aclfrommode): Ditto.
- (acltopbits): Ditto.
- (aclfrompbits): Ditto.
- (acltotext): Ditto.
- (aclfromtext): Ditto.
- * security.cc (write_sd): Call set_process_privilege and check
- ownership.
- (alloc_sd): Remove call to set_process_privilege and the owner check.
-
-2003-02-05 Christopher Faylor <cgf@redhat.com>
-
- * include/sys/cygwin.h: Use C-style comments.
-
-2003-02-05 Pierre Humblet <pierre.humblet@ieee.org>
-
- * sec_helper.cc (get_sids_info): New function.
- * security.cc (extract_nt_dom_user): Simplify with strechr.
- (get_user_groups): Initialize glen to MAX_SID_LEN.
- (get_user_local_groups): Ditto.
- (get_attribute_from_acl): Define ace_sid as cygpsid.
- (get_nt_attribute): Define owner_sid and group_sid as cygpsid.
- Call get_sids_info instead of cygsid.get_{u,g}id and is_grp_member.
- (get_nt_object_attribute): Ditto.
- (alloc_sd): Define ace_sid as cygpsid.
-
-2003-02-04 Thomas Pfaff <tpfaff@gmx.net>
-
- * syscalls.cc (struct system_cleanup_args): New struct.
- (system_cleanup): New function.
- (system): Use pthread_cleanup_push and _pop to save and restore
- signal handlers and sigprocmask.
-
-2003-02-04 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink): Create security attributes so that only the
- user can modify the symlink.
- * security.cc (set_security_attribute): Remove symlink special
- handling.
-
-2003-02-04 Pierre Humblet <pierre.humblet@ieee.org>
-
- * grp.cc (internal_getgroups): Do not return without closing
- the process handle.
-
-2003-02-04 Pierre Humblet <pierre.humblet@ieee.org>
-
- * security.h (class cygpsid): New class.
- (class cygsid): Use cygpsid as base. Remove members psid, get_id,
- get_uid, get_gid, string, debug_printf and the == and != operators.
- (cygsidlist::clear_supp): Only do work if setgroups has been called.
- * sec_helper.cc: Define sid_auth NO_COPY.
- (cygpsid::operator==): New operator.
- (cygpsid::get_id): New function.
- (cygpsid::string): New function.
- (cygsid::string): Delete.
- (cygsid::get_id): Delete.
- * pwdgrp.h: Change arguments of internal_getpwsid,
- internal_getgrsid and internal_getgroups to cygpsid.
- * passwd.cc (internal_getpwsid): Change argument from cygsid to cygpsid.
- * grp.cc (internal_getgrsid): Ditto.
- (internal_getgroups): Ditto.
-
-2003-02-03 Christopher Faylor <cgf@redhat.com>
-
- Eliminate most unneeded this-> pointers throughout.
-
-2003-02-03 Pierre Humblet <pierre.humblet@ieee.org>
-
- * security.h: Add third argument to set_process_privilege.
- * autoload.cc: Add OpenThreadToken.
- * sec_helper.cc (set_process_privilege): Add and use use_thread
- argument.
- * security.cc (alloc_sd): Modify call to set_process_privilege.
- Remember the result in each process. If failed and file owner is not
- the user, fail.
-
-2003-02-03 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::recvfrom): Return buffer
- length and don't set errno in case of WSAEMSGSIZE error.
- (fhandler_socket::recvmsg): Ditto.
-
-2003-02-01 Christopher Faylor <cgf@redhat.com>
-
- * grp.cc (getgrent32): Only refresh group entries when at beginning.
- (internal_getgrsid): Only refresh if uninitialized.
- (internal_getgrent): Ditto.
- * passwd.cc (getpwent): Only refresh passwd entries when at beginning.
- (pwdgrp::read_passwd): linebuf *cannot* be NO_COPY.
- (internal_getpwsid): Only refresh if uninitialized.
- (getpass): No need to refresh passwd data here.
- * pwdgrp.h (refresh): Eliminate default.
-
-2003-01-31 Christopher Faylor <cgf@redhat.com>
-
- * dlfcn.cc (dlerror): Only report load errors once per error.
-
-2003-01-31 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_serial.cc (fhandler_serial::open): Avoid extraneous setting
- of res.
-
- * termios.cc (tcsetattr): Correctly record errno after tcsetattr call.
-
-2003-01-31 Troy Curtiss <troyc@usa.net>
-
- * fhandler_serial.cc (fhandler_serial::tcsetattr): Add error-checking
- so that if any Win32 SetComm*() calls fail, errno gets set to EINVAL
- and tcsetattr() returns -1. Catch invalid bitrates, mostly. If baud
- rate setting is B0, just drop DTR and leave Win32 DCB bitrate as-is
- since 0 is not a valid Win32 setting.
- (fhandler_serial::tcgetattr): If DTR is low, populate the bitrate as
- B0, otherwise get it from the DCB.
-
-2003-01-31 Christopher Faylor <cgf@redhat.com>
-
- * passwd.cc (pwdgrp::read_passwd): linebuf *must* be static (from
- Pierre Humblet).
- * pwdgrp.h (pwdgrp::refresh): Avoid calling read function if we already
- have lock since that means we are in the process of reading the file.
-
-2003-01-31 Jason Tishler <jason@tishler.net>
-
- * shared.cc (shared_info::heap_chunk_size): Use correct variable when
- reading HKLM.
-
-2003-01-30 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_registry.cc (fhandler_registry::exists): Fix off-by-one
- error when inspecting path.
-
-2003-01-29 Christopher Faylor <cgf@redhat.com>
-
- * lib/getopt.c: Allow environment variable control of POSIXLY_INCORRECT
- behavior.
-
-2003-01-28 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::accept): On successful execution
- set connection state of returned socket to CONNECTED.
-
-2003-01-27 Christopher Faylor <cgf@redhat.com>
-
- * passwd.cc (pwdgrp::parse_passwd): Be more unforgiving about
- non-numeric fields.
-
-2003-01-26 Christopher Faylor <cgf@redhat.com>
-
- * uinfo.cc (pwdgrp::next_num): Remove check for NULL since it is no
- longer a valid return from next_str.
- (pwdgrp::add_line): Duh. Revert to use strchr.
-
-2003-01-26 Christopher Faylor <cgf@redhat.com>
-
- * string.h (strechr): New function.
- * uinfo.cc (pwdgrp::next_str): Search only for input char in string.
- Return EOS on failure. Don't check for NULL since it shouldn't be
- possible.
- (pwdgrp::add_line): Revert to replacing '\n' in input line with '\0'.
- (pwdgrp::next_num): Pass explicit separator character to next_str.
- * grp.cc (pwdgrp::parse_group): Ditto.
- * passwd.cc (pwdgrp::parse_passwd): Ditto. Revamp test for garbage
- input.
- * pwdgrp.h (pwdgrp::next_str): Don't use default parameter.
-
-2003-01-26 Christopher Faylor <cgf@redhat.com>
-
- * uinfo.cc (pwdgrp::load): Regularize strace output. Add warning for
- CreateFile failure.
-
-2003-01-26 Christopher Faylor <cgf@redhat.com>
-
- * passwd.cc (pwdgrp::parse_passwd): Eliminate use of memset. The
- structure should always be completely filled out.
- * grp.cc (pwdgrp::parse_group): Ditto.
-
-2003-01-26 Christopher Faylor <cgf@redhat.com>
-
- * grp.cc (pwdgrp::parse_group): Fix off-by-one problem in allocating
- gr_mem.
-
-2003-01-26 Christopher Faylor <cgf@redhat.com>
-
- * include/sys/strace.h (paranoid_printf): Define as not being part of
- "all" output.
-
-2003-01-25 Christopher Faylor <cgf@redhat.com>
-
- * pwdgrp.h (pwdgrp::next_num): Rename from next_int. Returns
- true/false if parse operation succeeded.
- (pwdgrp::reparse): Remove.
- (pwdgrp::raw_ptr): New function. Returns pointer in line.
- (pwdgrp::next_num): New functions for parsing other than unsigned long.
- * grp.cc (pwdgrp::parse_group): Reinstate previous parsing behavior.
- Don't fill in fields with NULL and assign empty gr_mem to known pointer
- rather than doing a pointless calloc. Streamline gr_mem parsing.
- Don't increment curr_lines here.
- * passwd.cc (pwdgrp::parse_passwd): Use new behavior of next_num.
- Don't increment curr_lines here.
- * uinfo.cc (pwdgrp::next_str): Keep returning EOL if out of data.
- (pwdgrp::reparse): Remove.
- (pwdgrp::next_num): Rename from next_int. Return bool indicating
- success of parse, argument returns value parsed.
- (pwdgrp::add_line): Increment curr_lines here on successful parse.
- (pwdgrp::load): (from Pierre Humblet) Don't return status. Just report
- it here.
-
-2003-01-25 Christopher Faylor <cgf@redhat.com>
-
- * pwdgrp.cc (pwdgrp::reparse): Declare.
- * uinfo.cc (pwdgrp::reparse): Define.
- * grp.cc (pwdgrp::parse_group): Use reparse.
-
-2003-01-25 Pierre Humblet <pierre.humblet@ieee.org>
-
- * syscalls.cc (seteuid32): On Win95 get the pw entry. If it exists
- update the euid and call cygheap->user.set_name. Remove special
- handling of ILLEGAL_UID.
- (setgid32): Add a debug_printf. On Win95, always set the egid.
- Remove special handling of ILLEGAL_GID. Do not compare gid and gr_gid.
- * child_info.h (class cygheap_exec_info): Remove uid.
- * spawn.cc (spawn_guts): Do not set ciresrv.moreinfo->uid.
- * dcrto.cc (dll_crt0_1): Always call uinfo_init.
- * uinfo.cc (uinfo_init): Reorganize and close handle if needed.
- (cygheap_user::ontherange): Do not call internal_getpwnam if pw is NULL.
-
-2003-01-24 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_console.cc (fhandler_console::send_winch_maybe): Reset
- scroll region if size changes.
-
-2003-01-24 Pierre Humblet <pierre.humblet@ieee.org>
- Jason Tishler <jason@tishler.net>
-
- * cygwin.din: Export setreuid32, setreuid, setregid32, setregid.
- * syscalls.cc (setreuid32): New function.
- (setreuid): Ditto.
- (setregid32): Ditto.
- (setregid): Ditto.
- * include/cygwin/version.h: Bump API minor number.
-
-2003-01-23 Christopher Faylor <cgf@redhat.com>
-
- * pwdrp.h (pwdgrp::refresh): Lock entire test prior to reading.
-
-2003-01-23 Christopher Faylor <cgf@redhat.com>
-
- * grp.cc (pwdgrp::parse_group): Eliminate arg and use class member
- instead. Use next_str and next_int to parse arguments.
- * passwd.cc (pwdgrp::parse_passwd): Ditto.
- (grab_string): Eliminate.
- (grab_int): Ditto.
- * pwdgrp.h (pwdgrp::parse): Eliminate input arg.
- (pwdgrp::parse_passwd): Reflect above change.
- (pwdgrp::parse_group): Reflect above change.
- (pwdgrp::next_str): New function.
- (pwdgrp::next_int): Ditto.
- (pwdgrp::gets): Eliminate.
- * uinfo.cc (pwdgrp::next_str): New function.
- (pwdgrp::next_int): Ditto.
- (pwdgrp::add_line): Subsume gets.
- (pwdgrp::gets): Eliminate.
- (pwdgrp::load): Just call add_line to parse input buffer.
-
-2003-01-22 Thomas Pfaff <tpfaff@gmx.net>
-
- * include/pthread.h (PTHREAD_MUTEX_RECURSIVE): Revert changes from
- 2003-01-09 mutex patch.
- (PTHREAD_MUTEX_ERRORCHECK): Ditto.
-
-2003-01-22 Corinna Vinschen <corinna@vinschen.de>
-
- * cygrun.c: Move from here to ../testsuite.
- * Makefile.in: Remove cygrun.exe dependencies.
-
-2003-01-21 Jason Tishler <jason@tishler.net>
-
- * cygwin.din: Export nanosleep().
- * signal.cc (nanosleep): New function.
- (sleep): Move old functionality to nanosleep(). Call nanosleep().
- (usleep): Remove old functionality. Call nanosleep().
- * include/cygwin/version.h: Bump API minor number.
-
-2003-01-21 Christopher Faylor <cgf@redhat.com>
-
- * grp.cc: Call gr.refresh() rather than doing isunitialized tests
- throughout.
- (gr): Use constructor (sigh).
- (pwdgrp::parse_group): Rename from parse_grp.
- (pwdgrp::read_group): Rename from read_etc_group. Just call gr.load
- with a single argument.
- * passwd.cc: Call pr.refresh() rather than doing isunitialized tests
- throughout.
- (pr): Use constructor (sigh).
- (pwdgrp::parse_passwd): Rename from "parse_pwd".
- (pwdgrp::read_passwd): Rename from read_etc_passwd. Just call pr.load
- with a single argument.
- * pwdgrp.h (pwdgrp_state): Eliminate.
- (pwdgrp): Reflect above renamings.
- (pwdgrp::etc_ix): Rename from pwd_ix.
- (pwdgrp::read): New element.
- (pwdgrp::lock): New element.
- (pwdgrp::refresh): New function.
- (pwdgrp::load): Eliminate variations which take buffer arguments.
- (pwdgrp::pwdgrp): New constructors. Initialize mutex here.
- * uinfo.cc (pwdgrp::load): Accommodate pwd_ix -> etc_ix renaming.
- (pwdgrp::load): Set initialized state to true rather than setting state
- to loaded.
-
-2003-01-21 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number.
-
-2003-01-21 Pierre Humblet <pierre.humblet@ieee.org>
-
- * path.h (etc::change_possible): Revert the type to bool.
- (etc::set_last_modified): Remove obsolete function.
- * path.cc (etc::change_possible): Revert type to bool.
- (etc::test_file_change): Do not test for negative values of
- change_possible and do not set it to -res.
- (etc::dir_changed): When the handle is NULL, call memset instead of
- test_file_changed. When the handle is invalid, return true. Detect
- filename change in /etc.
- (etc::file_changed): Remove unneeded check for !fn[n].
- * uinfo.cc (pwdgrp::load): Eliminate spurious setting of fh to NULL.
- * pwdgrp.h (pwdgrp::operator =): Eliminate.
-
-2003-01-19 Christopher Faylor <cgf@redhat.com>
-
- * pwdgrp.h (etc): Move to path.h.
- (pwdgrp::max_lines): New field.
- (pwdgrp::curr_lines): New field.
- (pwdgrp::pwdgrp_buf): Ditto.
- (pwdgrp_buf_elem_size): Ditto.
- (pwdgrp_parse): Ditto.
- (pwdgrp::gets): Just declare here.
- (pwdgrp::load): Ditto. Just take one argument.
- (pwdgrp::load): Define overloaded function accepting passwd buf.
- (pwdgrp::load): Define overloaded function accepting group buf.
- * grp.cc: Use pwdgrp elements rather than standalone static variables
- throughout.
- (curr_lines): Eliminate.
- (max_lines): Ditto.
- (add_grp_line): Ditto.
- (parse_grp): Define as returning boolean. Accept void * arg and line
- count. Coerce first argument into __group32 buf reference. Increment
- curr_line as appropriate.
- (read_etc_group): Pass pwdgrp buffer to gr.load.
- * passwd.cc: Use pwdgrp elements rather than standalone static variables
- throughout.
- (curr_lines): Eliminate.
- (max_lines): Ditto.
- (add_grp_line): Ditto.
- (parse_passwd): Define as returning boolean. Accept void * arg and line
- count. Coerce first argument into passwd buf reference. Increment
- curr_line as appropriate.
- (read_etc_group): Pass pwdgrp buffer to pr.load.
- * path.cc (etc::fn): Extend buffer size to allow index by 1 rather than
- zero.
- (etc::last_modified): Ditto.
- (etc::change_possible): Ditto. Renamed from sawchange. Change to
- signed char since elements are now tri-state.
- (etc::init): Assume "handle" is 1 based rather than 0.
- (etc::test_file_change): New function. Sets change_possible based on
- file date comparison.
- (etc::dir_changed): Check file states immediately after changed_h is
- initialized to avoid a race.
- (etc::file_changed): Use test_file_change to detect if file needs to be
- updated.
- * path.h (etc): Move class here from pwdgrp.h.
- * uinfo.cc: Move etc:: functions to path.cc. Move pwdgrp functions
- here.
- (pwdgrp::gets): Eliminate buf checks. Just check eptr and set lptr.
- (pwdgrp::add_line): New function.
- (pwdgrp::load): Call generic add_line function which will call correct
- parser.
-
-2003-01-17 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.cc: Change most 'int's to 'unsigned's.
- (_cmalloc): Only check for size of malloced region when calculating
- bucket. Add overhead when performing the sbrk. Previous change broke
- _crealloc.
-
-2003-01-17 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (initialize_env): Use colon for CYGWIN_DEBUG separator.
- * grp.cc: Change most statics to NO_COPY throughout.
- * passwd.cc: Ditto.
-
-2003-01-17 Christopher Faylor <cgf@redhat.com>
-
- * pwdgrp.h: Change some BOOLs to bools.
- (pwdgrp::pwdgrp): Remove unneeded constructor.
- * passwd.cc: Change BOOL to bool throughout.
-
-2003-01-17 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Add strerror_r.
- * include/cygwin/version.h: Bump API minor number.
-
-2003-01-17 Christopher Faylor <cgf@redhat.com>
-
- * uinfo.cc (etc::dir_changed): Don't print a warning if can't open
- /etc, unless debugging.
-
-2003-01-17 Pierre Humblet <pierre.humblet@ieee.org>
-
- * grp.cc (read_etc_group): On NT, add a line for gid = -1. Change name
- "unknown" to "mkgroup".
- (internal_getgrgid): Do not return default in nontsec case.
- (internal_getgroups): Add argument srchsid and look for it in groups if
- not NULL.
- * passwd.cc (read_etc_passwd): On NT, add a line for uid = -1. Use
- same default uid for Win95 and NT. Call cygheap_user::ontherange to
- initialize HOME.
-
-2003-01-16 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.cc (init_cygheap::etc_changed): Move to uinfo.cc.
- * cygheap.h (init_cygheap::etc_changed_h): Remove.
- (init_cygheap::etc_changed): Ditto.
- * grp.cc (group_state): Remove. Use gr instead throughout.
- (gr): Define as class pwdgrp.
- (read_etc_group): Remove gr definition. Remove calls to
- set_last_modified and close. Pass add_grp to gr.load to load file.
- * passwd.cc (passwd_state): Remove. Use pr instead, throughout.
- (pr): Define as class pwdgrp.
- (read_etc_passwd): Remove pr definition. Remove calls to
- set_last_modified and close. Pass add_pwd_line to pr.load to load
- file.
- * pwdgrp.h (etc): New helper class for pwdgrp.
- (pwdgrp): Combine pwdgrp_check and pwdgrp_read into one class. Remove
- file_w32 and last_modified fields.
- (pwdgrp::set_last_modified): Remove.
- (pwdgrp::isinitializing): Remove FindFirstFile stuff. Move to
- etc::file_changed.
- (pwdgrp::load): Rename from 'open'. Call etc::init to initialize etc
- scanning. Close file handle after reading buffer into memory. Parse
- buffer by calling second argument.
- (pwdgrp::gets): Reorganize slightly to rely on eptr starting at
- beginning of buffer.
- (pwdgrp::close): Remove.
- * uinfo.cc (etc::dir_changed): New function.
- (etc::init): Ditto.
- (etc::file_changed): Ditto.
- (etc::set_last_modified): Ditto.
-
-2003-01-16 Jason Tishler <jason@tishler.net>
-
- * mmap.cc (fixup_mmaps_after_fork): Add ERROR_NOACCESS to the list of
- ReadProcessMemory() error codes that trigger a retry with temporary
- PAGE_READONLY access. Note that this can occur on NT 4.0.
-
-2003-01-15 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (normalize_posix_path): Convert win32 path separators to
- slashes when full path is specified.
-
-2003-01-15 Pierre Humblet <pierre.humblet@ieee.org>
-
- * cmalloc.cc (_cmalloc): Fix memory leak.
-
-2003-01-15 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc: Fix copyright date.
- * fhandler_dsp.cc: Ditto.
- * mmap.cc: Ditto.
- * net.cc: Ditto.
- * ntdll.h: Ditto.
- * signal.cc: Ditto.
- * syscalls.cc: Ditto.
- * uname.cc: Ditto.
- * wait.cc: Ditto.
-
-2003-01-14 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (fixup_mmaps_after_fork): Copy protection to child process.
- Change ambiguous debug output.
-
-2003-01-14 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap_record::access): Change argument type to caddr_t
- for strictness.
- (mprotect): Protect against calling VirtualProtect() for shared
- pages on 9x/Me.
- (fixup_mmaps_after_fork): If ReadProcessMemory() fails, try to
- change protection of parent page to PAGE_READONLY, then try again.
- Revert protection afterwards.
-
-2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
-
- * syscalls.cc (system): Add pthread_testcancel call.
- * thread.cc: Update list of cancellation points.
-
-2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
-
- * wait.cc: Include thread.h
- (wait4): Add pthread_testcancel call.
- Wait for child process and cancellation event.
- * thread.cc: Update list of cancellation points.
-
-2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
-
- * signal.cc (sleep): Add pthread_testcancel call.
- Wait for signal and cancellation event.
- (usleep): Ditto.
-
-2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
-
- * exceptions.cc (handle_sigsuspend): Add pthread_testcancel call.
- Wait for signal and cancellation event.
- * thread.cc: Update list of cancellation points.
-
-2003-01-14 David Huang <davehzhr@hotmail.com>
-
- * fhandler_dsp.cc (fhandler_dsp::ioctl): Add limited support for
- SNDCTL_DSP_GETFMTS.
-
-2003-01-12 Christopher Faylor <cgf@redhat.com>
-
- * ntdll.h: Fix typo.
-
-2003-01-12 Corinna Vinschen <corinna@vinschen.de>
-
- * uname.cc (uname): Use cygwin_gethostname() to retrieve hostname.
-
-2003-01-12 Pierre Humblet <pierre.humblet@ieee.org>
-
- * sec_acl.cc (search_ace): Use id == -1, instead of < 0, as wildcard.
- (setacl): Start the search for a matching default at the next entry.
- Invalidate the type of merged entries instead of clearing it.
- Use well_known_creator for default owner and owning group and do
- not try to merge non-default and default entries in these cases.
- (getacl): Recognize well_known_creator for default owner and group.
- (acl_worker): Improve errno settings and streamline the nontsec case.
- * security.cc (write_sd): Remove the call to set_process_privilege.
- (alloc_sd): If the owner changes, call set_process_privilege and return
- immediately on failure. Change inheritance rules: on new directories add
- inherit only allow ACEs for creator_owner, creator_group and everyone.
- Preserve all inheritances through chmod and chown calls. Introduce
- isownergroup to implement the uid == gid case, to keep the inheritance
- code simple. Do not initialize owner_sid and group_sid and stop using
- the variable psd.
-
-2003-01-10 Christopher Faylor <cgf@redhat.com>
-
- * net.cc: Use gethostname define from winsock2.h.
-
-2003-01-10 Christopher Faylor <cgf@redhat.com>
-
- * path.cc: Unrevert below reversion except for
- mount_info::conv_to_posix_path part.
-
-2003-01-10 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc: Revert patch from 2003-01-09 to normalize a windows path
- rather than converting to posix.
-
-2003-01-10 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (gethostname): Make call optional, return 1 if function
- can't get loaded.
- * net.cc (cygwin_gethostname): Call GetComputerName if return value
- of gethostname is non-zero.
-
-2003-01-10 Charles Wilson <cwilson@ece.gatech.edu>
-
- * cygwin.din: Add asprintf and vasprintf, as well as the reentrant
- versions and underscore variants.
- * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR.
-
-2003-01-10 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_gethostname): Fix call to wsock function gethostname.
-
-2003-01-09 Christopher Faylor <cgf@redhat.com>
-
- * cygthread.cc (cygthread::cygthread): Be more noisy about odd
- condition.
- * miscfuncs.cc (low_priority_sleep): Sleep in regular priority if
- that's what we're currently running at.
-
-2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
-
- * include/semaphore.h: Modify typedef for sem_t.
- * include/cygwin/types.h: Modify typedefs for pthread_t,
- pthread_mutex_t, pthread_key_t, pthread_attr_t,
- pthread_mutexattr_t, pthread_condattr_t, pthread_cond_t,
- pthread_rwlock_t and pthread_rwlockattr_t.
-
-2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.h (WAIT_CANCELED): New define.
- (pthread::cancelable_wait): New static method.
- * thread.cc (pthread::cancelable_wait): Implement.
- (semaphore::Wait): Wait on semaphore and thread cancellation.
- (pthread::join): Wait on joined thread and thread cancellation.
- (semaphore::wait): Add testcancel to check for thread
- cancellation even if the semaphore is available.
-
-2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
-
- * include/pthread.h: Add define for errorchecking mutexes.
- Change default mutex type.
- * thread.cc (pthread_cond::TimedWait): Update mutex unlock
- calls.
- (pthread_mutex::pthread_mutex): New implement.
- (pthread_mutex::~pthread_mutex): Ditto.
- (pthread_mutex::Lock): Ditto.
- (pthread_mutex::TryLock): Ditto.
- (pthread_mutex::UnLock): Ditto.
- (pthread_mutex::Destroy): Implement new method.
- (pthread_mutex::SetOwner): Ditto.
- (pthread_mutex::LockRecursive): Ditto.
- (pthread_mutex::fixup_after_fork): Restore locking state after
- fork.
- (__pthread_mutex_lock): Return pthread_mutex::Lock errorcode.
- (__pthread_mutex_trylock): Return pthread_mutex::TryLock
- errorcode.
- (__pthread_mutex_unlock): Return pthread_mutex::UnLock
- errorcode.
- (__pthread_mutex_destroy): Call pthread_mutex::Destroy to
- destroy mutex.
- (__pthread_mutexattr_settype): Allow errorchecking and recursive
- types.
- * thread.h (MUTEX_LOCK_COUNTER_INITIAL): New define.
- (pthread_mutex::criticalsection): Remove.
- (pthread_mutex::lock_counter): New member.
- (pthread_mutex::recursion_counter): Ditto.
- (pthread_mutex::owner): Ditto.
- (pthread_mutex::type): Ditto.
- (pthread_mutex::Destroy): New method.
- (pthread_mutex::SetOwner): Ditto.
- (pthread_mutex::LockRecursive): Ditto.
-
-2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
-
- * pthread.cc (pthread_cond_init): Use new pthread_cond::init.
- * thread.cc: Some white spaces cleanups.
- Change __pthread_cond_init to pthread_cond::init throughout.
- (nativeMutex): Move class methods outside pthread_mutex.
- (MTinterface::Init): Initialize pthread_cond init lock.
- (pthread_cond::condInitializationLock): Instantiate.
- (pthread_cond::initMutex): New Method.
- (pthread_cond::isGoodInitializerOrBadObject): Ditto.
- * thread.h: Some white spaces cleanups.
- (nativeMutex): Move class declaration outside pthread_mutex.
- (pthread_cond::condInitializationLock): New static member.
- (pthread_cond::initMutex): New Method.
- (pthread_cond::isGoodInitializerOrBadObject): Ditto.
- (__pthread_cond_init): Remove prototype.
-
-2003-01-09 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (num_entries): Return 2 as link count if
- directory unreadable.
-
-2003-01-09 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (get_nt_attribute): Always return -1 when read_sd()
- fails.
- (get_file_attribute): Set permissions to 0 and owner/group to -1
- if security descriptor is unreadable.
-
-2003-01-09 Christopher Faylor <cgf@redhat.com>
-
- Use isdirsep rather than SLASH_P throughout.
- * path.cc (iscygdrive): Disallow /cygdrive\x.
- (normalize_posix_path): "Normalize" a windows path, if detected, rather
- than converting to posix.
-
-2003-01-06 Troy Curtiss <troyc@usa.net>
-
- * fhandler_serial.cc (fhandler_serial::tcsetattr): Add support and
- capability checking for B230400 bitrate.
- (fhandler_serial::tcgetattr): Add support for B230400 bitrate.
- * include/sys/termios.h: Add B230400 definition for Posix support of
- 230.4Kbps.
-
-2003-01-05 Christopher Faylor <cgf@redhat.com>
-
- * pinfo.cc (_pinfo::commune_send): Use myself->lock rather than just
- lock when leaving.
-
-2003-01-03 Christopher Faylor <cgf@redhat.com>
-
- * dtable.h (dtable::in_vfork_cleanup): New function. True if vfork
- cleanup needed.
- * dtable.cc (dtable::vfork_parent_restore): Remove assertion.
- * pipe.cc (fhandler_pipe::close): Don't close read_state during
- fork_fixup since it wasn't inherited.
-
-2003-01-01 Christopher Faylor <cgf@redhat.com>
-
- * passwd.cc (getpwuid_r32): Revert previous change.
-
-2003-01-01 Christopher Faylor <cgf@redhat.com>
-
- * sysconf.cc (sysconf): Return arbitrary values for
- _SC_GETGR_R_SIZE_MAX, _SC_LOGIN_NAME_MAX, _SC_GETPW_R_SIZE_MAX.
-
- * passwd.cc (getpwuid_r32): Add uid/gid fields to size check
- calculation.
-
diff --git a/winsup/cygwin/ChangeLog-2004 b/winsup/cygwin/ChangeLog-2004
deleted file mode 100644
index ebb6962..0000000
--- a/winsup/cygwin/ChangeLog-2004
+++ /dev/null
@@ -1,3848 +0,0 @@
-2004-12-30 Christopher Faylor <cgf@timesys.com>
-
- * devices.cc (device::isfs): Return true for the logical case of
- devn == FH_FS.
-
-2004-12-28 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (_pinfo::dup_proc_pipe): DUPLICATE_CLOSE_SOURCE closes the
- handle regardless, so revert previous change.
-
-2004-12-27 Christopher Faylor <cgf@timesys.com>
-
- * cygthread.cc (cygthread::stub): Add better debug output.
- (cygthread::cygthread): Ditto.
- (cygthread::terminate_thread): Ditto. Move inuse test earlier or
- suffer infinite loop.
- * pinfo.cc (_pinfo::dup_proc_pipe): Close handle if DuplicateHandle
- fails and process no longer exists.
- * spawn.cc (spawn_guts): Create process in suspended state if OS
- demands it.
- * wincap.cc: Add "start_proc_suspended" throughout.
- * wincap.h (wincaps): Ditto.
- (wincapc): Ditto.
-
-2004-12-27 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (_pinfo::exit): Beef up debugging output.
- * sigproc.cc (proc_subproc): Detached children apparently need a ppid
- of 1.
-
-2004-12-26 Christopher Faylor <cgf@timesys.com>
-
- * init.cc (dll_entry): Previous code reversion was ill-advised. Revert
- it.
- * sigproc.cc (child_info::sync): Ditto.
- * pinfo.cc (_pinfo::exit): Don't set myself.procinfo to NULL since it
- is no longer required.
-
-2004-12-26 Christopher Faylor <cgf@timesys.com>
-
- * init.cc (dll_entry): Remove exit code setting.
- * pinfo.cc (pinfo::init): Initialize exitcode to unset state rather
- than SIGTERM.
- (proc_waiter): Detect if exit code is unset and use status from
- GetExitCodeProcess.
- * sigproc.cc (child_info::sync): Remove exit code detection here since
- proc_waiter now (again) detects it.
-
-2004-12-25 Christopher Faylor <cgf@timesys.com>
-
- * fhandler.cc (fhandler_base::fchmod): Do the right thing when changing
- an "on disk" device or fifo.
- (fhandler_base::fchown): Ditto for changing ownership.
- * fhandler_disk_file.cc (fhandler_base::fstat_helper): Accommodate
- device files on ntfs partitions.
- * path.cc (path_conv::check): Use isfs function to figure out if a path
- exists on a filesystem to make sure that device files are caught.
-
-2004-12-24 Christopher Faylor <cgf@timesys.com>
-
- * child_info.h (CURR_CHILD_INFO_MAGIC): Update.
- (child_info::parent_wr_proc_pipe): Eliminate.
- * pinfo.h (_pinfo::alert_parent): Move here from pinfo class.
- (_pinfo::dup_proc_pipe): New method.
- (_pinfo::sync_proc_pipe): Ditto.
- * exceptions.cc (sig_handle_tty_stop): Reflect move of alert_parent.
- * init.cc (dll_entry): Exit with status one if main process called
- ExitProcess.
- * pinfo.cc (set_myself): Remove handling of parent_wr_proc_pipe.
- (_pinfo::exit): Reflect move of alert_parent. Set procinfo to NULL to
- flag that we are exiting normally. Always use exitcode when exiting
- (although this could be a little racy).
- (pinfo::init): Set default exit to SIGTERM. This will be the exit code
- reported if process is terminated.
- (_pinfo::dup_proc_pipe): New function.
- (pinfo::wait): Duplicate wr_proc_pipe to the right place. Use
- dup_proc_pipe to move the pipe to the child.
- (_pinfo::sync_proc_pipe): New function.
- (_pinfo::alert_parent): Move to _pinfo. Make sure that wr_proc_pipe is
- ours before using it.
- * sigproc.cc (child_info::child_info): Remove handling of
- parent_wr_proc_pipe.
- * spawn.cc (spawn_guts): Pass our wr_proc_pipe to the child when
- execing. Ensure that exit code of cygwin process started from windows
- is correctly set.
-
-2004-12-23 Pierre Humblet <pierre.humblet@ieee.org>
- Christopher Faylor <cgf@timesys.com>
-
- * path.h (path_conv::set_normalized_path): Add second argument and fill
- it in throughout.
- * path.cc (path_conv::check): Declare, set and use "strip_tail".
- (path_conv::set_normalized_path): Add and use second argument,
- replacing all tail stripping tests.
-
-2004-12-23 Christopher Faylor <cgf@timesys.com>
-
- * cygthread.cc (cygthread::cygthread): Guard debugging variable with
- "ifdef DEBUGGING".
- (cygthread::release): Ditto.
-
-2004-12-23 Christopher Faylor <cgf@timesys.com>
- Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (path_conv::check): Don't strip the trailing slash from a
- path consisting only of two slashes.
-
-2004-12-23 Christopher Faylor <cgf@timesys.com>
-
- * cygthread.cc (cygthread::stub): Detect if thread function wants to
- release itself here, to avoid a race.
- (cygthread::release): Clear more stuff. Add a diagnostic for an
- internal error.
- * cygthread.h (auto_release): New function.
- * pinfo.h (pinfo::remember): Add an argument to denote whether child is
- detached.
- * fork.cc (fork_parent): Reflect change in arguments to
- pinfo::remember.
- * pinfo.cc (_pinfo::exit): Signal exit more forcibly.
- (proc_waiter): Use cygthread::auto_release to signify that
- cygthread::stub should release the thread. This should avoid a race.
- (pinfo::alert_parent): Don't signify an error when wr_proc_pipe == NULL.
- * sigproc.cc (proc_subproc): Add support for PROC_DETACHED_CHILD.
- * sigproc.h: Ditto.
- * spawn.cc (spawn_guts): Specify whether child is detached or not when
- calling pinfo::remember.
-
-2004-12-22 Christopher Faylor <cgf@timesys.com>
-
- * cygheap.cc (cygheap_setup_for_child): Add api_fatal to catch failing
- MapViewOfFileEx.
- * cygthread.cc (cygthread::stub): Previous change to make diagnostic
- output more informative was really a bust. Try again. Capture previous
- name in a new field in cygthread for diagnostic purposes.
- (cygthread::cygthread): Ditto.
- (cygthread::release): Add an argument to control whether h should be cleared
- or not.
- (cygthread::terminate_thread): Use 'inuse' for tests rather than 'h'.
- (cygthread): Add some diagnostic fields.
- (cygthread::release): Add an argument.
- * pinfo.cc (proc_waiter): Accommodate change to cygthread::release.
-
-2004-12-22 Christopher Faylor <cgf@timesys.com>
-
- * cygthread.cc (cygthread::stub): Make diagnostic output more informative.
-
-2004-12-22 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (proc_waiter): Zero wait_thread in child to avoid races with
- process termination.
- * cygthread.cc (cygthread::terminate): Clumsily detect when h has gone away
- and attempt no further action.
-
-2004-12-22 Christopher Faylor <cgf@timesys.com>
-
- * cygthread.h (cygthread::release): Just declare here.
- * cygthread.cc (cygthread::release): Define here. Use
- InterlockedExchange to set inuse or suffer potential races.
- (cygthread::terminate): Use release().
-
-2004-12-22 Chris January <chris@atomice.net>
-
- * fhandler_process.cpp (format_process_status): Use tabs in formatting
- instead of spaces.
-
-2004-12-22 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (set_normalized_path): Allow empty pathnames.
-
-2004-12-21 Christopher Faylor <cgf@timesys.com>
-
- * spawn.cc (spawn_guts): Force parent to forget about P_DETACH'ed
- process.
-
-2004-12-20 Christopher Faylor <cgf@timesys.com>
-
- * path.cc (normalize_win32_path): Remove unneeded check for dots.
-
-2004-12-20 Christopher Faylor <cgf@timesys.com>
-
- * path.cc (normalize_posix_path): Remove unneeded check for dots.
- (path_conv::set_normalized_path): Strip trailing dots, similarly to
- what had previously been done for the win32 path.
-
-2004-12-18 Christopher Faylor <cgf@timesys.com>
-
- * path.cc (normalize_win32_path): Make third arg pass-by reference.
- Reorganize slightly to eliminate extra variables.
- (normalize_posix_path): Ditto.
- (path_conv::check): Reflect change in arguments.
- (mount_info::conv_to_posix_path): Ditto.
- (mount_info::add_item): Ditto.
-
-2004-12-18 Christopher Faylor <cgf@timesys.com>
-
- * child_info.h (CURR_CHILD_INFO_MAGIC): Use updated value.
-
-2004-12-18 Christopher Faylor <cgf@timesys.com>
- Pierre Humblet <pierre.humblet@ieee.org>
-
- * path.cc (path_conv::check): Check the output Win32 path for trailing
- spaces and dots, not the input path. Disallow all use of foo./bar
- since consistently getting this right is time consuming. Remove
- strange test for "unc\" since no one seems to know what it's for.
-
-2004-12-18 Chris January <chris@atomice.net>
-
- * fhandler_proc.cc (proc_listing): Add entry for "self".
- (proc_fhandlers): Add entry for "self".
- * fhandler_process.cc (fhandler_process::fstate): Handle "self".
- (fhandler_process::open): Handle "self".
-
-2004-12-17 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc (proc_subproc): Fix long-standing problem. Only wait for
- "all processes" if pid == -1 -- not just if pid is negative.
- (proc_can_be_signalled): Fix another long-standing problem. Set
- correct errno when detecting an exited process.
-
-2004-12-16 Thomas Wolff <towo@computer.org>
-
- * fhandler_console.cc (get_win32_attr): Avoid inappropriate intensity
- interchanging that used to render reverse output unreadable when
- non-reversed text is bright.
-
-2004-12-15 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Add utmpx symbols.
- * syscalls.cc: Include utmpx.h. Implement utmpx functions as stubs
- to utmp functions.
- (copy_ut_to_utx): New static function.
- (pututline): Change from void to struct utmp * as on Linux.
- (setutxent): New function.
- (endutxent): New function.
- (getutxent): New function.
- (getutxid): New function.
- (getutxline): New function.
- (pututxline): New function.
- * include/utmpx.h: New file.
- * include/cygwin/utmp.h: New file.
- * include/cygwin/version.h: Bump API minor number.
- * include/sys/utmp.h: Include cygwin/utmp.h. Move stuff common with
- utmpx functionality there.
- (pututline): Declare struct utmp *.
-
-2004-12-14 Corinna Vinschen <corinna@vinschen.de>
-
- * tty.cc (tty_list::terminate): Guard releasing the tty with tty_mutex.
- (tty::init): Set master_pid to 0.
-
-2004-12-14 Thomas Wolff <towo@computer.org>
-
- * fhandler_console.cc (read): Consider offset within scrolling
- region of the console window.
-
-2004-12-13 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.h (cwdstuff::get_drive): Release cwd_lock.
-
-2004-12-12 Bas van Gompel <cygwin-patch@bavag.tmfweb.nl>
-
- * fhandler.cc (fhandler_base::puts_readahead): Fix end-condition.
-
-2004-12-10 Corinna Vinschen <corinna@vinschen.de>
-
- * errno.cc (errmap): Map ERROR_INVALID_ADDRESS to EINVAL instead of
- EOVERFLOW.
-
-2004-12-10 Christopher Faylor <cgf@timesys.com>
-
- * include/sys/strace.h: Don't output paranoid_printf by default.
-
-2004-12-09 Christopher Faylor <cgf@timesys.com>
-
- * lib/libcmain.c (main): Properly deal with quoted first argument.
-
-2004-12-06 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.h (proc_pipe::*): Delete class.
- * pinfo.cc (proc_pipe::*): Ditto.
-
-2004-12-05 Christopher Faylor <cgf@timesys.com>
-
- * fork.cc (fork_parent): Reinstate "childhProc" protection. Don't
- close hProcess handle here since it is used to ensure that a new
- process isn't created with the old pid after the old pid exits.
- * spawn.cc (spawn_guts): Ditto.
- * pinfo.cc (proc_waiter): Don't send any signals if we've execed since
- this process doesn't officially exist.
- * pinfo.h (pinfo::pid_handle): Eliminate. Just use hProc.
- * sigproc.cc (sig_send): Don't send any signals if our sendsig doesn't
- exist. That's a sign that we are execing.
- (remove_proc): Eliminate pid_handle close.
-
-2004-12-05 Christopher Faylor <cgf@timesys.com>
-
- * cygthread.h (cygthread::terminate_thread): Make public.
- * pinfo.h (pinfo::wait_thread): New element.
- * pinfo.cc (pinfo::wait): Store "handle" to started thread in pinfo.
- * sigproc.cc (proc_terminate): Kill any threads waiting for a process
- pipe.
-
-2004-12-05 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc (mychild): Reimplement as list scan.
- (proc_subproc): Don't mess with pinfo if it's myself.
-
-2004-12-05 Christopher Faylor <cgf@timesys.com>
-
- * child_info.h (child_info_types): Label enum for _PROC constants.
- (child_info::child_info): New constructor.
- (child_info::~child_info): New destructor.
- (child_info::sync): Declare new function.
- (child_info_fork::child_info_fork): New constructor.
- (child_info_spawn::child_info_spawn): Remove old constructor.
- (child_info_spawn::child_info_spawn): New constructor.
- * dcrt0.cc (dll_crt0_0): Use correct sizeof when doing sanity check on
- passed in child_info. Signal readiness to parent when not forking (and
- not spawning).
- * fork.cc (sync_with_child): Delete.
- (resume_child): Remove extra argument.
- (sync_with_parent): Use child_info method to sync with parent.
- (fork_child): Don't close fork_info->subproc_ready since that is now
- handled by the destructor.
- (fork_parent): Remove subproc_ready stuff. Use child_info sync method
- for waiting.. Set start time here for child. Rename "forked" to
- "child".
- (fork): Check ch.subproc_ready for validity here.
- * pinfo.h (_pinfo::exec_sendsig): Temp storage for exec stub which may
- be staying around to handle non-cygwin captive process.
- (_pinfo::exec_dwProcessId): Ditto.
- (_pinfo::_lock): Renamed from lock.
- (_pinfo::lock): New method.
- (_pinfo::unlock): Ditto.
- (_pinfo::initialize_lock): Ditto.
- * pinfo.cc (set_myself): Use initialize_lock method to initialize
- myself lock. Set "exec" fields in _pinfo to zero to indicate that
- we've started successfully. Set start time here when appropriate.
- (_pinfo::commune_send): Use pinfo lock/unlock methods.
- (proc_waiter): Remove special case for non-cywin processes.
- Reinstitute handling for PID_NOCLDSTOP.
- * sigproc.cc (proc_subproc): Set proper EAGAIN errno when process table
- is filled.
- (sig_send): Use exec_* fields from _pinfo for sending signals if the
- the _pinfo sendsig never materializes.
- (child_info::child_info): New constructor, renamed from init_child_info.
- Zeroes child_info structure and sets appropriate fields in structure
- based on chtype.
- (child_info::~child_info): New destructor. Closes subproc_ready if it
- exists.
- (child_info_fork::child_info_fork): New constructor.
- (child_info_spawn::child_info_spawn): New constructor.
- (child_info::ready): New function. Signals parent when child is ready.
- (child_info::sync): New function. Wait for child to signal us or
- process to die.
- (remove_proc): Remove closing of hProcess since this should now be
- handled shortly after process creation.
- * spawn.cc (spawn_guts): Use child_info_spawn constructor rather than
- init_child_info. Save exec_sendsig and exec_dwProcessId in execing
- _pinfo. Rely on child_info constructor to properly set
- parent_wr_proc_pipe in ciresrv. Revert to previous determination on
- whether to start a process in suspended mode. Remove reparenting
- stuff. Just keep a stub around if starting a non-cygwin process.
-
-2004-12-05 Bas van Gompel <cygwin-patch@bavag.tmfweb.nl>
-
- * fhandler.cc (fhandler_base::read): Remove superfluous check in
- __small_printf format for strace.
-
-2004-12-05 Bas van Gompel <cygwin-patch@bavag.tmfweb.nl>
-
- * fhandler.cc (fhandler_base::read): Don't debug_printf garbage when
- copied_chars is zero.
-
-2004-12-03 Christopher Faylor <cgf@timesys.com>
-
- * environ.cc (environ_init): Alloc space for TERM if it is not set,
- like all of the other environment variables.
-
-2004-12-02 Christopher Faylor <cgf@timesys.com>
-
- * child_info.h (child_info_fork::parent_wr_proc_pipe): New element.
- * fork.cc (fork_parent): Set parent_wr_proc.
- * pinfo.cc (set_myself): Close child_proc_info->parent_wr_proc if it
- exists rather than trying to get value from parent _pinfo.
-
-2004-12-02 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.h (enum parent_aleter): New enum.
- (pinfo::alert_parent): Declare as returning a value.
- (pinfo::parent_alive): New function.
- * pinfo.cc (pinfo::alert_parent): Set wr_proc_pipe to invalid non-NULL
- value when parent disappears. Return success of operation.
- (proc_waiter): Use __ALERT_* enum for control since these are not really signals.
- Implement __ALERT_ALIVE.
- * sigproc.cc (my_parent_is_alive): Eliminate.
- * sigproc.h (my_parent_is_alive): Ditto for declaration.
- (__SIGREPARENT): Eliminate.
-
-2004-12-02 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (pinfo::wait): Use better name for cygthread.
-
-2004-12-03 Pierre Humblet <pierre.humblet@ieee.org>
-
- * registry.h (reg_key::reg_key): Change arguments.
- * shared_info.h (class mount_info): Remove had_to_create_mount_areas.
- * registry.cc (reg_key::reg_key): Change constructors to always handle
- HKLM and to avoid relying on HKCU.
- Do not set mount_table->had_to_create_mount_areas.
- * path.cc (mount_info::conv_to_win32_path): Improve update of
- sys_mount_table_counter.
- (mount_info::read_mounts): Use new reg_key constructor.
- (mount_info::add_reg_mount): Ditto.
- (mount_info::del_reg_mount): Ditto.
- (mount_info::read_cygdrive_info_from_registry): Ditto.
- (mount_info::write_cygdrive_info_to_registry): Ditto.
- Update cygwin_shared->sys_mount_table_counter after registry update.
- (mount_info::get_cygdrive_info): Ditto.
- * shared.cc (shared_info::heap_chunk_size): Use new reg_key constructor.
- * environ.cc (regopt): Ditto.
-
-2004-12-01 Christopher Faylor <cgf@timesys.com>
-
- * include/features.h: Include sys/cdefs.h, like linux.
-
-2004-12-01 Christopher Faylor <cgf@timesys.com>
-
- * syscalls.cc (truncate64): Don't second-guess errno if open fails.
- * devices.in: Don't allow /dev/com0.
-
-2004-11-25 Christopher Faylor <cgf@timesys.com>
-
- * environ.cc (putenv): Accommodate recent newlib change in argument to
- putenv.
-
-2004-11-25 Christopher Faylor <cgf@timesys.com>
-
- * child_info.h (child_info_spawn::hexec_proc): Eliminate.
- * dcrt0.cc (dll_crt0_0): Remove hexec_proc stuff.
- * fork.cc (fork_child): Remove call to pinfo_fixup_after_fork.
- * pinfo.cc (set_myself): Close and zero pid_handle if set.
- (pinfo_fixup_after_fork): Delete.
- (proc_waiter): Don't close vchild.hProcess here. Do that when we are
- remove the vchild from procs. Save hProcess as pid_handle only on
- first reparent operation.
- (pinfo::wait): Don't set pid_handle here.
- (pinfo::alert_parent): Always try to send signal. If unsuccessful then
- close and zero wr_proc_pipe.
- * pinfo.h (pinfo::pinfo): Make sure that appropriate parts of the class
- are zeroed on construction.
- (pinfo::alert_parent): Take char argument.
- (pinfo_fixup_after_fork): Delete declaration.
- (hexec_proc): Ditto.
- * sigproc.cc (remove_proc): Close pid_handle and hProcess if
- appropriate.
- * spawn.cc (spawn_guts): Set cygheap->pid_handle on first exec.
-
-2004-11-25 Christopher Faylor <cgf@timesys.com>
-
- * cygheap.h (init_cygheap::pid_handle): New element.
- * pinfo.cc (set_myself): Clear previously existing cygheap->pid_handle
- when a new process has been started.
- (pinfo::wait): Make sure that a handle to the newly forked/spawned
- process is kept around so that the pid will not be reused.
- * pinfo.h (_pinfo::pid_handle): Move.
- (pinfo::pid_handle): to here.
- * spawn.cc (spawn_guts): Create a pid_handle in cygheap prior to
- spawning to ensure that the pid does not get reused during the lifetime
- of the "cygwin pid".
-
-2004-11-25 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.h (pinfo::alert_parent): New function.
- * exceptions.cc (sig_handle_tty_stop): Use alert_parent to send
- "signals" to parent.
- * fork.cc (fork_parent): Don't close pi.hProcess. Let the waiter
- thread do that.
- * pinfo.cc (proc_waiter): Detect case where process exits without
- setting the exit code and use value from GetExitCodeProcess.
- Reluctantly implement __SIGREPARENT.
- (pinfo::alert_parent): Define.
- * sigproc.h (__SIGREPARENT): New enum.
- * spawn.cc (spawn_guts): Send reparent signal to parent on exec.
- Always create process in suspended state to avoid races.
-
-2004-11-25 Christopher Faylor <cgf@timesys.com>
-
- Remove cygthread.h in favor of cygtls.h throughout since cygtls now
- includes cygthread.h. Eliminate ppid_handle usage throughout.
- * child_info.h: Regenerate magic number
- (child_info): Remove pppid_handle.
- * cygthread.h (cygthread::release): New method. Frees thread without
- waiting.
- * cygthread.cc (cygthread::stub): Set _ctinfo in _mytls to point to
- information for executing thread. Don't call SetEvent if thread is no
- longer in use.
- (cygthread::simplestub): Ditto.
- * cygtls.h (_cygtls::_ctinfo): New element contains pointer to
- information about executing cygthread, if any.
- * dcrt0.cc: Remove last vestiges of per_thread stuff.
- (dll_crt0_0): Ditto. Remove accommodation for ppid_handle.
- (do_exit): Remove obsolete reparenting test.
- (_exit): Exit with a more SUSv3-like exit value.
- * dtable.cc (dtable::stdio_init): Check for myself->cygstarted rather
- than myself->ppid_handle to see if we were started by a cygwin process.
- * exceptions.cc (open_stackdumpfile): Ditto.
- (handle_exceptions): Ditto.
- (ctrl_c_handler): Ditto.
- (sig_handle_tty_stop): Ditto. Let parent send signal to itself on
- STOP.
- (sigpacket::process): Comment out vfork test.
- (signal_exit): Use more SUSv3-like exit value on signal.
- * external.cc (fillout_pinfo): Don't set hProcess.
- * fork.cc: Remove VFORK cruft.
- (per_thread::set): Delete.
- (fork_child): Remove perthread stuff.
- (fork_parent): Remove obsolete subproc_init. Accommodate new method
- for tracking subprocesses.
- * pinfo.cc (set_myself): Accommodate new pinfo/_pinfo layout. Set some
- things here that used to be set in wait_sig.
- (_pinfo::exit): Set exitcode here. Close process pipe.
- (_pinfo::commune_send): Accommodeate new pinfo/_pinfo layout.
- (proc_waiter): New function. Waits, in a thread for subprocess to go
- away.
- (pinfo::wait): New function. Initialization for proc_waiter.
- * pinfo.h (_pinfo::exitcode): New element.
- (_pinfo::cygstarted): Ditto.
- (_pinfo::wr_proc_pipe): Ditto.
- (_pinfo::ppid_handle): Delete.
- (_pinfo::hProcess): Delete.
- (_pinfo::lock): Delete.
- (pinfo::hProcess): New element.
- (pinfo::lock): Ditto.
- (pinfo::wait): Declare new function.
- (pinfo::preserve): Define new function.
- * sigproc.cc: Remove old stuff from wait_subproc thread based method.
- (zombies): Remove.
- (procs): New.
- (my_parent_is_alive): Just check that the parent pid exists.
- (mychild): Just use pinfo methods to determine if child is mine.
- (proc_subproc): Revamp PROC_ADDCHILD to use pinfo::wait. Remove
- PROC_CHILDTERMINATED logic. Use different method to remove processes
- from list when SIGCHLD == SIG_IGN.
- (proc_terminate): Gut.
- (subproc_init): Delete.
- (init_child_info): Remove setting of pppid_handle.
- (checkstate): Revamp to only scan procs array.
- (remove_proc): Rename from remove_zombie. Don't close hProcess or
- pid_handle. Don't release memory if it's myself.
- (stopped_or_terminated): Change logic to handle new consolidated
- proc/zombie array.
- (wait_subproc): Delete.
- * sigproc.h: Remove obsolete EXIT_* defines.
- (subproc_init): Remove declaration.
- * spawn.cc (spawn_guts): Remove reparenting stuff. Use standard wait
- logic to wait for child if started from a non-cygwin process.
- * tlsoffsets.h: Regenerate.
- * tty.cc (tty_init): Check for myself->cygstarted rather than
- myself->ppid_handle to see if we were started by a cygwin process.
- * include/sys/signal.h (external_pinfo::exitcode): Replace hProcess.
- * include/sys/wait.h (WCOREDUMP): Define.
-
- * fhandler_tty.cc (fhandler_tty_slave::read): Add debugging output for
- timeout case.
- * signal.cc (abort): Flag that we are exiting with the ABORT signal.
-
-2004-11-22 Christopher Faylor <cgf@timesys.com>
-
- * select.cc (select_stuff::test_and_set): Remove extraneous tests of
- "window_handle".
-
-2004-11-20 Pierre Humblet <pierre.humblet@ieee.org>
-
- * fhandler.cc (fhandler::write): Remove debug_printf.
- * pipe.cc (fhandler_pipe::create): Edit syscall_printf format.
-
-2004-11-20 Pierre Humblet <pierre.humblet@ieee.org>
-
- * cygheap.h (cygheap_user::get_windows_id): New method.
- * registry.h (get_registry_hive_path): Change argument type.
- (load_registry_hive): Ditto.
- * registry.cc (get_registry_hive_path): Change argument type and take
- Win9x keys into account.
- (load_registry_hive): Ditto.
- * uinfo.cc (cygheap_user::env_userprofile): Use get_windows_id, even
- for SYSTEM.
- * shared.cc (user_shared_initialize): Use get_windows_id.
- * syscalls.cc (seteuid32): Load the registry hive and reload the user
- shared also on Win9x.
-
-2004-11-11 Christopher Faylor <cgf@timesys.com>
-
- * include/cygwin/version.h: Bump DLL minor number to 13.
-
-2004-10-28 Christopher Faylor <cgf@timesys.com>
-
- * fork.cc (NPIDS_HELD): Reduce to former number now that bash problem
- has been identified.
-
-2004-10-28 Pierre Humblet <pierre.humblet@ieee.org>
-
- * path.cc (mount_info::from_registry): Deimpersonate while
- accessing HKLM.
- (mount_info::read_cygdrive_info_from_registry): Ditto.
- * cygheap.h: Define NO_IMPERSONATION.
- (cygheap_user::issetuid): Replace INVALID_HANDLE_VALUE by
- NO_IMPERSONATION.
- (cygheap_user::has_impersonation_tokens): Ditto.
- (cygheap_user::close_impersonation_tokens): Ditto.
- * uinfo.cc (uinfo_init): Ditto.
- * syscalls.cc (seteuid32): Ditto.
- * security.cc (set_impersonation_token): Ditto.
-
-2004-10-26 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.cc (_cygtls::fixup_after_fork): Wipe out exitsock local since
- it should not be used by the child.
- * select.cc (start_thread_socket): Turn off inheritance for exitsock.
- Don't add exitsock to exception mask since it should never get an
- exception.
- (socket_cleanup): Change some debug messages for consistency.
- * fhandler_socket.cc (fhandler_socket::dup): Change comment wording
- slightly.
-
-2004-10-26 Pierre Humblet <pierre.humblet@ieee.org>
-
- * registry.cc (get_registry_hive_path): Simplify and add a
- debug_printf in case of failure.
- (load_registry_hive): Revert the 2004-04-19 change.
-
-2004-10-20 Christopher Faylor <cgf@timesys.com>
-
- * select.cc (start_thread_socket): Remove attempt to delay reading of
- exitsock or suffer occasional mysterious 60 second hangs.
- (socket_cleanup): Empty the exitsock here after the thread has
- terminated.
-
-2004-10-19 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_console.cc (fhandler_console::fixup_after_exec): Fix error
- message.
-
-2004-10-12 Christopher Faylor <cgf@timesys.com>
-
- * select.cc (start_thread_socket): Remove unused code.
-
-2004-10-11 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Revert previous checkin.
-
-2004-10-10 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.h (exitsock): New element.
- (exitsock_sin): Ditto.
- * cygtls.cc (_cygtls::init_thread): Initialize exitsock to invalid handle.
- (_cygtls::call2): Close exitsock if it is valid.
- * select.cc (struct socketinf): Remove sin element.
- (start_thread_socket): Initialize one SOCK_DGRAM socket per thread
- instead of (apparently) expensive opening and closing of socket with
- each select call.
- (socket_cleanup): Send a byte to the exitsock socket as a way to
- potentially signal a waiting-for-socket thread to exit.
- * tlsoffsets.h: Regenerate.
-
-2004-10-07 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.h (class cygheap_user): Add psystemroot member and
- env_systemroot method.
- * environ.cc (struct spenv): Add add_always member.
- (spenvs): Accommodate new add_always member. Add
- cygheap_user::env_systemroot method to SYSTEMROOT entry.
- (build_env): Check add_always member when adding missing environment
- variables from spenvs.
- * uinfo.cc (cygheap_user::env_systemroot): New method.
-
-2004-10-07 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc (dll_crt0_0): Drop duplicated line.
-
-2004-10-07 Christopher Faylor <cgf@timesys.com>
-
- * spawn.cc (pthread_cleanup::oldmask): Default to invalid signal mask.
- (do_cleanup): Test for invalid signal mask to decide whether to restore
- the mask rather than assuming zero mask indicates that there is nothing
- to do.
-
-2004-10-07 Mark Paulus <mark.paulus@mci.com>
-
- * fhandler_tty.cc (fhandler_tty_slave::read): Use previously
- evaluated time_to_wait value.
-
-2004-10-05 Pierre Humblet <pierre.humblet@ieee.org>
-
- * external.cc (check_ntsec): Do not call wincap.has_security.
- * path.cc (path_conv::check): Ditto.
- * security.cc (get_object_attribute): Ditto.
- (get_file_attribute): Ditto.
-
-2004-10-05 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
-
- * pinfo.cc (_pinfo::commune_send): Correct debugging output.
-
-2004-10-04 Christopher Faylor <cgf@timesys.com>
-
- * include/cygwin/signal.h: Add siginterrupt definition.
-
-2004-10-02 Pierre Humblet <pierre.humblet@ieee.org>
-
- * path.h (enum path_types): Delete PATH_ISDISK.
- (path_conv::isdisk): Delete method.
- (path_conv::set_isdisk): Ditto.
- * path.cc (path_conv::check): Do not call set_isdisk.
- * uinfo.cc(pwdgrp::load): Do not call pc.isdisk.
-
-2004-09-28 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Disallow attempts
- to set the process group to a nonexistent process group.
-
-2004-09-27 Corinna Vinschen <corinna@vinschen.de>
-
- * lib/_cygwin_crt0_common.cc: Revert patch from 2004-09-16. Brakes
- newly built DLLs.
-
-2004-09-24 Christopher Faylor <cgf@timesys.com>
- Sergey Ivanov <seriv@parkheights.dyndns.org>
-
- * path.cc (mount_info::read_cygdrive_info_from_registry): Default
- /cygdrive to binary mode.
-
-2004-09-22 Pierre Humblet <pierre.humblet@ieee.org>
-
- * path.cc (normalize_win32_path): Only look for : in second position.
- Avoid infinite loop with names starting in double dots.
- (mount_info::conv_to_win32_path): Do not worry about a trailing dot.
- (hash_path_name): Ditto.
-
-2004-09-20 Christopher Faylor <cgf@timesys.com>
-
- * exceptions.cc (sig_handle_tty_stop): Set flag earlier.
-
-2004-09-20 Christopher Faylor <cgf@timesys.com>
-
- * exceptions.cc (sig_handle_tty_stop): Set flag that we are in a cygwin
- function to avoid a probably erroneous stack walk.
-
-2004-09-17 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (unlink): Don't use "delete on close" on remote shares.
-
-2004-09-17 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din (_impure_ptr): Add export again. There are libs out there.
-
-2004-09-16 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din (_impure_ptr): Don't export.
- (reent_data): Export.
- * lib/_cygwin_crt0_common.cc (_impure_ptr): Drop entirely. Don't
- initialize _impure_ptr or u->impure_ptr_ptr.
-
-2004-09-15 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din (_impure_ptr): Export.
- (reent_data): Don't export.
- * dcrt0.cc (reent_data): Drop.
- (__cygwin_user_data): Initialize impure_ptr as GLOBAL_REENT.
- (_dll_crt0): Initialize _impure_ptr as GLOBAL_REENT.
- * lib/_cygwin_crt0_common.cc (_impure_ptr): Drop. Declare extern as
- dllimport instead.
-
-2004-09-14 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.h: Add alignment kludge to fix disparity between compilers.
- * tlsoffsets.h: Regenerate.
-
- * fork.cc (slow_pid_reuse): Use define to control number of pids held
- to prevent pid reuse.
-
-2004-09-14 Sam Steingold <sds@gnu.org>
-
- * autoload.cc (EnumProcessModules): Add.
- * dlfcn.cc (dlsym): Handle RTLD_DEFAULT using EnumProcessModules().
- * include/dlfcn.h (RTLD_DEFAULT): Define to NULL.
-
-2004-09-13 Christopher Faylor <cgf@timesys.com>
-
- * fork.cc (slow_pid_reuse): Temporarily double the number of pids held
- to prevent pid reuse.
-
-2004-09-12 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc (wait_sig): Ensure that waiting threads are awoken after
- returning from a hold condition.
-
-2004-09-12 Christopher Faylor <cgf@timesys.com>
-
- * child_info.h (CURR_CHILD_INFO_MAGIC): Update.
-
-2004-09-11 Pierre Humblet <pierre.humblet@ieee.org>
- Christopher Faylor <cgf@timesys.com>
-
- * exceptions.cc: (ctrl_c_handler): Do nothing while a Cygwin subprocess
- is starting.
-
-2004-09-10 Christopher Faylor <cgf@timesys.com>
-
- * child_info.h (init_child_info): Remove pid argument from declaration.
- * cygheap.h (init_cygheap::pid): New element.
- * dcrt0.cc (dll_crt0_0): Eliminate handling of now-noexistent cygpid
- parameter in child_info struct. Set forkee to 'true' rather than
- cygpid since the pid value was never used.
- (dll_crt0_1): Ditto.
- (_dll_crt0): Ditto.
- * fork.cc (fork_child): Don't wait for sigthread. This is handled in
- the fork call now.
- (fork_parent): Remove obsolete pid argument from init_child_info call.
- Don't do anything special with cygpid when DEBUGGING.
- (fork): Delay all signals during fork.
- (fork_init): Don't do anything special when DEBUGGING.
- * pinfo.cc (set_myself): Remove pid parameter. Use new pid field in
- cygheap.
- (pinfo_init): Don't pass pid argument to set_myself.
- * sigproc.cc (sig_send): Wait for dwProcessId to be non-zero as well as
- sendsig.
- (init_child_info): Eliminate handling of pid.
- (wait_sig): Implement method to temporarily hold off sending signals.
- * sigproc.h (__SIGHOLD): New enum.
- (__SIGNOHOLD): Ditto.
- * spawn.cc (spawn_guts): Remove obsolete pid argument from
- init_child_info call.
-
-2004-09-10 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::dup): Use debug_printf.
-
-2004-09-10 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in: Create libutil.a from bsdlib.o exports.
- * bsdlib.cc (logwtmp): Move from syscalls.cc to here.
- (login): Ditto.
- (logout): Ditto.
-
- * winsup.h (EXPORT_ALIAS): New macro.
- * exec.cc: Define alias symbols using EXPORT_ALIAS macro.
- * syscalls.cc: Ditto.
- * times.cc: Ditto.
-
-2004-09-09 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_tape.cc (fhandler_dev_tape::open): Fix typo.
-
-2004-09-09 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
-
- * pipe.cc (create_selectable_pipe): Work around bug in Windows 95
- where CreateNamedPipe returns NULL.
-
-2004-09-08 Pierre Humblet <pierre.humblet@ieee.org>
-
- * cygheap.h (cwdstuff::drive_length): New member.
- (cwdstuff::get_drive): New method.
- * path.cc (normalize_win32_path): Simplify by using cwdstuff::get_drive.
- (mount_info::conv_to_win32_path): Use cwdstuff::get_drive as default for /.
- (cwdstuff::set): Initialize drive_length.
-
-2004-09-07 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.cc (_cygtls::init_thread): Set __sdidinit to negative value to
- indicate that it is "special".
- * thread.cc (pthread::exit): If __sdidinit is < 0, it was never really
- initialized so reset it to 0 before calling _reclaim_reent.
-
-2004-09-05 Christopher Faylor <cgf@timesys.com>
-
- * include/cygwin/version.h: Bump DLL minor number to 12.
-
-2004-09-03 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc: Fix a few more strace_prints.
-
-2004-09-02 Christopher Faylor <cgf@timesys.com>
-
- Regularize most strace_prints throughout so that %E is always preceded
- by a comma and elminate most uses of "foo = %s" to "foo %s".
-
-2004-09-02 Bob Byrnes <byrnes@curl.com>
- Christopher Faylor <cgf@timesys.com>
-
- * autoload.cc (NtQueryInformationFile): Return nonzero on error.
- * ntdll.h (FILE_PIPE_LOCAL_INFORMATION): Add.
- (NtQueryInformationFile): Fix types for last two arguments.
- * pipe.cc: Include stdlib.h, limits.h, and ntdll.h.
- (create_selectable_pipe): New function to create a pipe that can be
- used with NtQueryInformationFile for select.
- (fhandler_pipe::create): Call create_selectable_pipe instead of
- CreatePipe.
- (pipe): Use DEFAULT_PIPEBUFSIZE as argument to create_pipe.
- * select.cc: Include limits.h and ntdll.h.
- (peek_pipe): Add select_printf output. Call NtQueryInformationFile to
- implement select for write on pipes.
- (fhandler_pipe::select_read): Reorder field assignments to be
- consistent with fhandler_pipe::select_write.
- (fhandler_pipe::select_write): Initialize startup, verify, cleanup, and
- write_ready fields for select_record.
- (fhandler_pipe::select_except): Tweak indentation to be consistent with
- fhandler_pipe::select_write.
-
-2004-08-30 Pierre Humblet <pierre.humblet@ieee.org>
-
- * fork.cc (fork_parent): Return the cygpid directly derived from the
- winpid.
-
-2004-08-30 Christopher Faylor <cgf@timesys.com>
-
- * fork.cc (fork_parent): Record child's pid when we're sure that it has
- been filled out by the child.
- * pinfo.cc (pinfo::init): Trivial change.
-
-2004-08-29 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Allow to report
- success on systems with ntsec and ntea set.
-
-2004-08-28 Pierre Humblet <pierre.humblet@ieee.org>
-
- * fhandler.cc (fhandler_base::write): In the lseek_bug case, set EOF
- before zero filling. Combine similar error handling statements.
-
-2004-08-28 Pierre Humblet <pierre.humblet@ieee.org>
-
- * syscalls.cc (ftruncate64): On 9x, call write with a zero length
- to zero fill when the file is extended.
-
-2004-08-24 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (link): Avoid compiler warning.
-
-2004-08-21 Corinna Vinschen <corinna@vinschen.de>
-
- * environ.cc (set_ntea): New function.
- (set_ntsec): Ditto.
- (set_smbntsec): Ditto.
- (parse_thing): Change ntea, ntsec and smbntsec settings to call
- appropriate functions.
-
-2004-08-20 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_tape.cc (fhandler_dev_tape::raw_read): Use ?: instead of
- if/else.
- (fhandler_dev_tape::raw_write): Return -1 in case of error.
-
-2004-08-19 Corinna Vinschen <corinna@vinschen.de>
-
- * errno.cc (_sys_errlist): Change various text to their english Linux
- counterparts. Unify layout.
- (strerror): Remove switch statement.
-
-2004-08-19 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Set shared flags to 0 when
- opening a tape device.
-
-2004-08-19 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::dup): Increment dtable's
- need_fixup_before counter on successful dup.
- * net.cc (cygwin_getpeername): Add file descriptor to debug output.
-
-2004-08-17 Pierre Humblet <pierre.humblet@ieee.org>
-
- * fhandler.h (fhandler_dev_dsp:~fhandler_dev_dsp): Delete.
- (fhandler_dev_dsp::open_count): Delete.
- (fhandler_dev_dsp::close_audio_in): New method declaration.
- (fhandler_dev_dsp::close_audio_in): Ditto.
- * fhandler_dsp.cc: Add and edit debug_printf throughout.
- (fhandler_dev_dsp::Audio::denyAccess): Delete.
- (fhandler_dev_dsp::Audio::fork_fixup): Ditto.
- (fhandler_dev_dsp::Audio::getOwner): Ditto.
- (fhandler_dev_dsp::Audio::clearOwner): Ditto.
- (fhandler_dev_dsp::Audio::owner_): Ditto.
- (fhandler_dev_dsp::Audio::setformat): Ditto, rename to setconvert.
- (fhandler_dev_dsp::Audio::lock): Ditto, move to queue.
- (fhandler_dev_dsp::Audio::unlock): Ditto.
- (fhandler_dev_dsp::Audio::lock_): Ditto.
- (fhandler_dev_dsp::Audio::bufferIndex_): New member, from Audio_out
- and Audio_in.
- (fhandler_dev_dsp::Audio::pHdr_): Ditto.
- (fhandler_dev_dsp::Audio::wavehdr_): Ditto.
- (fhandler_dev_dsp::Audio::bigwavebuffer_): ditto.
- (fhandler_dev_dsp::Audio::Qisr2app_): Ditto.
- (fhandler_dev_dsp::Audio::setconvert): New method, from old setformat.
- (fhandler_dev_dsp::Audio::queue::lock): New method.
- (fhandler_dev_dsp::Audio::queue::unlock): Ditto.
- (fhandler_dev_dsp::Audio::queue::dellock): Ditto.
- (fhandler_dev_dsp::Audio::queue::isvalid): Ditto.
- (fhandler_dev_dsp::Audio::queue::lock_): New member.
- (fhandler_dev_dsp::Audio::queue::depth1_): Delete.
- (fhandler_dev_dsp::Audio_out::fork_fixup): New method.
- (fhandler_dev_dsp::Audio_out::isvalid): New method.
- (fhandler_dev_dsp::Audio_out::start): Remove arguments.
- (fhandler_dev_dsp::Audio_out::parsewav): Change arguments and set
- internal state.
- (fhandler_dev_dsp::Audio_out::emptyblocks): Delete.
- (fhandler_dev_dsp::Audio_out::Qapp2app_): Ditto.
- (fhandler_dev_dsp::Audio_out::Qisr2app_): Ditto, move to Audio.
- (fhandler_dev_dsp::Audio_out::bufferIndex_): Ditto.
- (fhandler_dev_dsp::Audio_out::pHdr_): Ditto.
- (fhandler_dev_dsp::Audio_out::wavehdr_): Ditto.
- (fhandler_dev_dsp::Audio_out::bigwavefuffer_): Ditto.
- (fhandler_dev_dsp::Audio_out::freq_): New member.
- (fhandler_dev_dsp::Audio_out::bits_): New member.
- (fhandler_dev_dsp::Audio_out::channels_): New member.
- (fhandler_dev_dsp::Audio_in::fork_fixup): New method.
- (fhandler_dev_dsp::Audio_in::isvalid): New method.
- (fhandler_dev_dsp::Audio_in::Qapp2app_): Delete.
- (fhandler_dev_dsp::Audio_in::Qisr2app_): Ditto, move to Audio.
- (fhandler_dev_dsp::Audio_in::bufferIndex_): Ditto.
- (fhandler_dev_dsp::Audio_in::pHdr_): Ditto.
- (fhandler_dev_dsp::Audio_in::wavehdr_): Ditto.
- (fhandler_dev_dsp::Audio_in::bigwavefuffer_): Ditto.
- (fhandler_dev_dsp::Audio::queue::queue): Simplify.
- (fhandler_dev_dsp::Audio::queue::send): Use lock.
- (fhandler_dev_dsp::Audio::queue::query): Do not use depth1_.
- (fhandler_dev_dsp::Audio::queue::recv): Ditto.
- (fhandler_dev_dsp::Audio::Audio): Adapt to new class members.
- (fhandler_dev_dsp::Audio::~Audio): Ditto
- (fhandler_dev_dsp::Audio_out::start): Reorganize.
- (fhandler_dev_dsp::Audio_out::stop): Simplify.
- (fhandler_dev_dsp::Audio_out::init): Reset the queue and clear flag.
- (fhandler_dev_dsp::Audio_out::write): Reorganize to allocate audio_out.
- (fhandler_dev_dsp::Audio_out::buf_info): Use appropriate block size.
- (fhandler_dev_dsp::Audio_out::callback_sampledone): Do not use lock.
- (fhandler_dev_dsp::Audio_out::waitforspace): Simplify.
- (fhandler_dev_dsp::Audio_out::waitforallsent):Ditto.
- (fhandler_dev_dsp::Audio_out::sendcurrent): Reorganize.
- Clear flag before requeuing.
- (fhandler_dev_dsp::Audio_out::parsewav):
- (fhandler_dev_dsp::Audio_in::start): Reorganize.
- (fhandler_dev_dsp::Audio_in::stop): Simplify.
- (fhandler_dev_dsp::Audio_in::queueblock): Ditto.
- Requeue header in case of error.
- (fhandler_dev_dsp::Audio_in::init): Reset the queue and clear flag.
- (fhandler_dev_dsp::Audio_in::waitfordata): Simplify.
- Do not UnprepareHeader if the flag is zero.
- (fhandler_dev_dsp::Audio_in::buf_info): Ditto.
- (fhandler_dev_dsp::Audio_in::callback_blockfull): Do not use lock.
- (fhandler_dev_dsp::open_count): Delete.
- (fhandler_dev_dsp::open): Only check existence, do not allocate
- anything. Set flags appropriately. Create archetype.
- (fhandler_dev_dsp::write): Call archetype as needed. Create audio_out.
- (fhandler_dev_dsp::read): Call archetype as needed. Create audio_in.
- (fhandler_dev_dsp::close): Call archetype as needed.
- Call close_audio_in and close_audio_out.
- (fhandler_dev_dsp::close_audio_in): New function.
- (fhandler_dev_dsp::close_audio_out): New function.
- (fhandler_dev_dsp::dup): Use archetypes.
- (fhandler_dev_dsp::ioctl): Call archetype as needed. Reorganize for
- new structures.
- (fhandler_dev_dsp::fixup_after_fork): Call archetype as needed.
- (fhandler_dev_dsp::fixup_after_exec): Call archetype as needed.
- Clear audio_in and audio_out.
-
-2004-08-14 Pierre Humblet <pierre.humblet@ieee.org>
-
- * fhandler.cc (fhandler_base::open_9x): Set file attributes
- for new files.
-
-2004-08-11 Christopher Faylor <cgf@timesys.com>
-
- * net.cc (cygwin_gethostbyname): Show failing host name on error.
-
-2004-08-10 Christopher Faylor <cgf@redhat.com>
-
- * select.cc (select_stuff::wait): Correctly check for w4 array bounds.
-
-2004-08-03 Corinna Vinschen <corinna@vinschen.de>
-
- * errno.cc (errmap): Add ERROR_TOO_MANY_LINKS -> EMLINK mapping.
- * syscalls.cc (link): Only copy files if FS doesn't support hard links.
-
-2004-07-26 Christopher January <chris@atomice.net>
-
- * fhandler_proc.cc (format_proc_cpuinfo): Remove Intel-specific flags
- from /proc/cpuinfo on non-Intel processors. Added new AMD-specific
- flags. Changed Intel flag names to match Linux.
-
-2004-07-24 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (dll_crt0_0): Use proper boolean arguments.
- * pinfo.cc (pinfo::init): Don't consider MapViewOfFileEx error to be
- fatal if exiting.
- * pinfo.h (pinfo::init): Eliminate default argument and supply the
- argument in the one case that needed it.
-
-2004-07-24 Corinna Vinschen <corinna@vinschen.de>
- Christopher Faylor <cgf@timesys.com>
-
- * autoload.cc (GetNativeSystemInfo): Add.
- (IsWow64Process): Add.
- * init.cc (respawn_wow64_process): New function.
- (dll_entry): If process has been started from a 64 bit
- process, call respawn_wow64_process.
- * uname.cc (uname): On 64 bit systems, use GetNativeSystemInfo.
- Show actual CPU type.
-
-2004-07-23 Corinna Vinschen <corinna@vinschen.de>
-
- * dtable.cc (dtable::get_debugger_info): Make stderr r/w according
- to SUSv3.
-
-2004-07-22 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_tty.cc (fhandler_tty_slave::open): Use requested flag
- values also when copying fhandler from archetype.
-
-2004-07-22 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (pinfo::init): Print handle in hex when MapViewOfFile fails.
-
-2004-07-20 Corinna Vinschen <corinna@vinschen.de>
-
- * shm.cc: Whitespace fixes.
-
-2004-07-20 Christopher Faylor <cgf@timesys.com>
-
- * Makefile.in (clean): Remove cygwin.def since it is autogenerated.
-
-2004-07-19 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_dsp.cc (fhandler_dev_dsp::Audio_out::init): Fix non-ISO
- expression.
- * fhandler_floppy.cc (fhandler_dev_floppy::open): Remove unused
- variable.
- * fhandler_proc.cc (format_proc_meminfo): Fix compiler warning.
-
-2004-07-16 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (pinfo::init): Guard against MapViewOfFileEx failure.
-
-2004-07-15 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap_record::alloc_page_map): Mark pages as allocated even
- on Windows 9x, FWIW.
-
-2004-07-15 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mprotect): When MAP_WRITE protection is requested, use
- READWRITE or WRITECOPY protection, whatever has been used when the
- page has been allocated initially.
-
-2004-07-15 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_dev_raw): Remove is_writing flag.
- Remove declaration of writebuf.
- (class fhandler_dev_floppy): Remove declaration of close.
- * fhandler_floppy.cc (fhandler_dev_floppy::close): Delete.
- (fhandler_dev_floppy::lseek): Remove calls to writebuf. Set
- eom_detected to false after successful seek.
- * fhandler_raw.cc (fhandler_dev_raw::writebuf): Delete.
- (fhandler_dev_raw::raw_read): Remove calls to writebuf.
- (fhandler_dev_raw::raw_write): Always invalidate buffer.
-
-2004-07-15 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (class mmap_record): Fix return type of get_offset.
- (mmap_record::fixup_page_map): Fix off by one error.
- (list::search_record): Use long as type of "start" argument in both,
- declaration and definition. Use long as type for local variable "i".
-
-2004-07-14 Dave Korn <dk@artimi.com>
-
- * fhandler_registry.cc (registry_listing): Correct typo.
- (fhandler_registry::fill_filebuf): Set size of newly expanded buffer
- prior to calling RegQueryValueEx.
-
-2004-07-14 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_raw.cc (fhandler_dev_raw::raw_write): Remove buffered
- write entirely.
-
-2004-07-07 Corinna Vinschen <corinna@vinschen.de>
-
- * spawn.cc (spawn_guts): Check if script is executable.
-
-2004-06-30 Corinna Vinschen <corinna@vinschen.de>
-
- * times.cc (hires_ms::usecs): Don't overreact.
-
-2004-06-30 Corinna Vinschen <corinna@vinschen.de>
-
- * times.cc (hires_ms::usecs): Reinit timer when system time overflows.
-
-2004-06-27 Christopher Faylor <me@cgf.cx>
-
- * thread.cc (__cygwin_lock_lock): Don't bother locking when there is
- only one known thread.
- (__cygwin_lock_unlock): Ditto for unlocking.
-
-2004-06-23 Tomas Ukkonen <tomas.ukkonen@iki.fi>
-
- * fhandler_proc.cc (format_proc_cpuinfo): Test CPU vendor and print
- AMD specific 3dnow capabilities.
-
-2004-06-23 Pierre Humblet <pierre.humblet@ieee.org>
-
- * fhandler_socket.cc (fhandler_socket::release): Call
- WSASetLastError last.
-
-2004-06-21 Christopher Faylor <cgf@alum.bu.edu>
-
- * autoload.cc (wsock_init): Keep lock while modifying return address.
-
-2004-06-17 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Remove 9x specific code.
-
-2004-06-17 Pierre Humblet <pierre.humblet@ieee.org>
-
- * fhandler.cc (fhandler_base::open_9x): Do not check for null name.
- Move debug_printf to common code line.
- (fhandler_base::open): Ditto. Initialize upath. Remove second argument
- of pc.get_nt_native_path.
- * path.h (path_conv::get_nt_native_path): Remove second argument.
- * path.cc (path_conv::get_nt_native_path): Ditto. Call str2uni_cat.
- * security.h (str2buf2uni_cat): Delete declaration.
- (str2uni_cat): New declaration.
- * security.cc (str2buf2uni): Get length from sys_mbstowcs call.
- (str2buf2uni_cat): Delete function.
- (str2uni_cat): New function.
- * miscfuncs.cc (sys_mbstowcs): Add debug_printf.
-
-2004-06-17 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Substitute FILE_SUPERSEDE with
- FILE_OVERWRITE_IF.
-
-2004-06-09 Christopher Faylor <cgf@alum.bu.edu>
-
- * include/cygwin/version.h: REALLY bump dll minor version to 11.
-
-2004-06-08 Egor Duda <deo@corpit.ru>
-
- * include/cygwin/ipc.h: Make IPC_INFO visible only for ipc system
- utilities, to make it consistent with declaration of struct seminfo.
-
-2004-06-08 Pierre Humblet <pierre.humblet@ieee.org>
-
- * path.cc (fchdir): Pass the Posix path to chdir.
-
-2004-06-07 Christopher Faylor <cgf@alum.bu.edu>
-
- * dtable.cc (dtable::find_fifo): Release lock after fifo found (still
- racy).
- * fhandler.h (fhandler_fifo::get_io_handle): New fifo-specific method.
- * fhandler_fifo.cc (fhandler_fifo::close): Close output_handle only if
- it is open.
- (fhandler_fifo::open_not_mine): Reorganize slightly. Don't call _pinfo
- methods when the fifo is owned by me or suffer dtable lock_cs deadlock.
- (fhandler_fifo::open): Call open_not_mine first, otherwise open myself
- (racy).
- * pinfo.cc (_pinfo::commune_recv): Duplicate fifo handles here in
- requesting processes arena to avoid one potential race (of many).
- (_pinfo::commune_send): Move all PICOM_FIFO code under one case
- statement.
-
- * thread.cc (pthread::init_mainthread) Use existing hMainProc handle
- rather than calling GetCurrentProcess.
-
-2004-06-04 Christopher Faylor <cgf@alum.bu.edu>
-
- * winbase.h (ilockincr): Add more neverending changes from the
- inexplicable world of gcc asm constraint magic. Should stop random
- crashes.
- (ilockdecr): Ditto.
-
-2004-06-03 Christopher Faylor <cgf@alum.bu.edu>
-
- * autoload.cc (IsDosDeviceName_U): Define.
- * ntdll.h (IsDosDeviceName_U): Declare.
- * fhandler.cc (fhandler_base::open): Check to see if win32_name is a
- dos device and just call the 9x open if so.
-
-2004-06-03 Christopher Faylor <cgf@alum.bu.edu>
-
- * winbase.h (ilockincr): More changes from the inexplicable world of
- gcc asm magic.
- (ilockdecr): Ditto.
-
-2004-06-03 Christopher Faylor <me@cgf.cx>
-
- * winbase.h (ilockincr): YA correction to ensure correct operation with
- no optimization.
- (ilockdecr): Ditto.
-
-2004-06-03 Corinna Vinschen <corinna@vinschen.de>
-
- * cygserver.h (CYGWIN_SERVER_VERSION_API): Bump.
-
-2004-06-03 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/ipc.h (IPC_KEY_IS_SHMID): Redefine to a more sensible
- value.
-
-2004-06-02 Christopher Faylor <cgf@alum.bu.edu>
-
- * cygheap.cc (cmalloc): Add debugging hook.
-
-2004-06-02 Christophe Jaillet <christophe.jaillet@wanadoo.fr>
-
- * spawn.cc (find_exec): Use has_slash to determine if path has a slash
- rather than calculating this twice.
-
-2004-05-30 Pierre Humblet <pierre.humblet@ieee.org>
-
- * path.cc (mount_info::add_item): Make sure native path has drive
- or UNC form. Call normalize_xxx_path instead of [back]slashify.
- Remove test for double slashes. Reorganize to always debug_print.
-
-2004-05-28 Pierre Humblet <Pierre.Humblet@ieee.org>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Only try to open
- the file if it uses an acl.
-
-2004-05-28 Pierre Humblet <Pierre.Humblet@ieee.org>
-
- * path.cc (chdir): Always use the normalized_path as posix_cwd, except
- if it starts with a drive.
-
-2004-05-25 Christopher Faylor <cgf@alum.bu.edu>
-
- * winbase.h: Semi-revert previous patch as it caused strange behavior.
- Use syntax similar to that recommended in mingw-dvlpr.
-
-2004-05-25 Christopher Faylor <cgf@alum.bu.edu>
-
- * include/cygwin/version.h: Bump DLL minor number to 11.
-
-2004-05-25 Christopher Faylor <cgf@alum.bu.edu>
-
- * winbase.h: Add proper attributions for memory operands throughout.
-
-2004-05-24 Christopher Faylor <cgf@alum.bu.edu>
-
- * include/cygwin/version.h: Bump api minor version number.
-
-2004-05-24 Christopher Faylor <cgf@alum.bu.edu>
-
- * cygwin.din: Export atoll.
-
-2004-05-20 Christopher Faylor <cgf@alum.bu.edu>
-
- * tty.cc (tty_list::allocate_tty): Leave tty_mutex armed on successful
- return from !with_console
- * fhandler_tty.cc (fhandler_pty_master::open): Release tty_mutex here
- after all initialization is done.
-
-2004-05-17 Corinna Vinschen <corinna@vinschen.de>
-
- * grp.cc (getgrgid_r): Replace struct group by struct __group32 in
- argument definition.
- (getgrnam_r): Ditto.
-
-2004-05-17 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Add symbols flockfile, ftrylockfile, funlockfile,
- getgrgid_r, getgrnam_r and getlogin_r.
- * grp.cc (getgrgid_r): New function.
- (getgrnam_r): Ditto.
- * syscalls.cc (flockfile): Ditto.
- (ftrylockfile): Ditto.
- (funlockfile): Ditto.
- * sysconf.cc (sysconf): Return LOGIN_NAME_MAX in case of
- _SC_LOGIN_NAME_MAX.
- * thread.cc (__cygwin_lock_trylock): Define int. Return value from
- call to pthread_mutex_trylock.
- * uinfo.cc (getlogin_r): New function.
- * include/limits.h: Define LOGIN_NAME_MAX.
- * include/cygwin/version.h: Bump API minor number.
- * include/sys/lock.h: Add declarations for __cygwin_lock_xxx functions.
- * include/sys/stdio.h: Add define for _ftrylockfile.
-
-2004-05-17 Christopher Faylor <cgf@alum.bu.edu>
-
- * tty.cc (tty_list::init): Move hmaster initialization earlier to
- prevent compilation error.
-
-2004-05-17 Christopher Faylor <cgf@alum.bu.edu>
-
- Change the name "title_mutex" to "tty_mutex" throughout.
- * tty.h (tty_list::allocate_tty): Turn argument into a boolean.
- * tty.cc (tty_list::init): Protect entire allocation operation with
- tty_mutex (formerly title_mutex) to protect against allocation races.
-
-2004-05-16 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::recvfrom): Use original flags
- value in each WSARecvFrom call.
- (fhandler_socket::recvmsg): Ditto. Reformat slightly.
-
-2004-05-15 Christopher Faylor <cgf@alum.bu.edu>
-
- * cygthread.cc (cygthread::is): Eliminate.
- * cygthread.h (cygthread::is): Eliminate declaratin.
- * fhandler_console.cc (fhandler_console::read): Only wait for
- signal_arrived in the main thread.
- * fhandler_socket.cc: Include new "wininfo.h".
- (fhandler_socket::ioctl): Use 'winmsg' rather than 'gethwnd()'.
- * sync.cc (muto::grab): Define new function.
- (muto::acquire): Use tls pointer rather than tid.
- (muto::acquired): Ditto.
- (muto::reset): Delete.
- (muto::release): Ditto. Also implement "close on last release".
- * sync.h (muto::tid): Delete.
- (muto::tls): New field.
- (muto::ismine): Delete.
- (muto::owner): Delete.
- (muto::unstable): Delete.
- (muto::reset): Delete.
- (muto::upforgrabs): New method.
- (muto::grab): Ditto.
- (new_muto_name): New define.
- * wininfo.h: New file.
- (wininfo): New class.
- * window.cc: Rework throughout to use winfo class for controlling
- invisible window operation.
- (gethwnd): Delete definition.
- * winsup.h (gethwnd): Delete declaration.
-
-2004-05-15 Christopher Faylor <cgf@alum.bu.edu>
-
- * cygheap.h: Remove some parameter names from declarations throughout.
- (cygheap::set): Reflect changes in declaration for arguments and return
- value from previous checkin.
-
-2004-05-15 Pierre Humblet <pierre.humblet@ieee.org>
-
- * cygheap.h (cwdstuff::set): Modify return value and arguments.
- * path.cc (chdir): Specify PC_POSIX. Do not call SetCurrentDirectory.
- Set posix_cwd in a way that does not break find.exe. Change call to
- cwd.set.
- (cwdstuff::get_initial): Do not call GetCurrentDirectory here.
- (cwdstuff::set): Call SetCurrentDirectory and GetCurrentDirectory as
- needed.
-
-2004-05-12 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (path_conv::check): Don't bail out with error if path is "//".
-
-2004-05-12 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.h (struct init_cygheap): Add mt_h member.
- * fhandler_tape.cc (mt_h): Drop in favor of cygheap based handle.
- (mtinfo_init): Use cygheap->mt_h handle. Protect it.
-
-2004-05-12 Pierre Humblet <pierre.humblet@ieee.org>
-
- * tty.h: Remove the %d or %x from all cygtty strings.
- (tty::open_output_mutex): Only declare.
- (tty::open_input_mutex): Ditto.
- (tty::open_mutex): New definition.
- * fhandler_tty.cc (fhandler_tty_slave::open): Declare buf with
- size CYG_MAX_PATH and replace __small_printf calls by shared_name.
- * tty.cc (tty::create_inuse): Ditto.
- (tty::get_event): Ditto.
- (tty::common_init): Ditto.
- (tty::open_output_mutex): New method definition.
- (tty::open_input_mutex): Ditto.
- (tty::open_mutex): New method.
-
-2004-05-11 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Set file attributes to correct
- value when creating files.
- * path.h (class path_conv): Add write accessor for file_attributes.
-
-2004-05-10 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_socket): Add "owner" status flag.
- * fhandler_socket.cc (wait): Take flag parameter to take FD_OOB into
- account. Don't wait infinitely.
- (fhandler_socket::recvfrom): Also wait for FD_OOB if socket owner.
- (fhandler_socket::recvmsg): Ditto.
- (fhandler_socket::sendto): Ditto.
- (fhandler_socket::sendmsg): Ditto.
- (fhandler_socket::fcntl): Set owner status flag if F_SETOWN with own
- pid is called.
-
-2004-05-09 Pierre Humblet <pierre.humblet@ieee.org>
-
- * environ.cc (build_env): Only try to construct required-but-missing
- variables while issetuid.
-
-2004-05-08 Pierre Humblet <pierre.humblet@ieee.org>
- Christopher Faylor <cgf@timesys.com>
-
- * syscalls.cc: Include environ.h.
- (chroot): Set errno in case of path error. Call getwinenv.
- * environ.cc: Remove the NO_COPY attribute of conv_envvars.
-
-2004-05-07 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_mem.cc (fhandler_dev_mem::fhandler_dev_mem): Move
- initialization of "mem_size" from here...
- (fhandler_dev_mem::open): ...to here. Fix typo in FH_PORT case.
-
-2004-05-07 Gerd Spalink <Gerd.Spalink@t-online.de>
-
- * fhandler_dsp.cc (fhandler_dev_dsp::Audio_out::stop): Move delete of
- bigwavebuffer_ so that it is always cleaned, also in child processes.
- (fhandler_dev_dsp::Audio_in::stop): Ditto.
- (fhandler_dev_dsp::close): Stop audio play immediately in case of
- abnormal exit.
-
-2004-05-07 Corinna Vinschen <corinna@vinschen.de>
-
- Revert code reversion from 2004-04-03. So, revert to async I/O again.
- * fhandler.h (status): Add "closed" flag.
- (prepare): New method declaration.
- (wait): Ditto.
- (release): Ditto.
- * fhandler_socket.cc: Don't include wsock_event.h.
- (fhandler_socket::prepare): New method, moved from wsock_event.
- (fhandler_socket::wait): Ditto.
- (fhandler_socket::release): New method.
- (fhandler_socket::recvfrom): Simplify loop.
- (fhandler_socket::recvmsg): Ditto.
- (fhandler_socket::sendto): Ditto.
- (fhandler_socket::sendmsg): Ditto.
- * net.cc: Don't include wsock_event.h.
- (wsock_event::prepare): Remove.
- (wsock_event::wait): Ditto.
- * wsock_event.h: Remove.
-
-2004-05-06 Christopher Faylor <cgf@alum.bu.edu>
-
- * thread.cc (pthread::create): Move postcreate call to avoid a
- potential race.
- (pthread::cancelable_wait): Don't allow signal interrupt unless main
- thread.
-
-2004-05-07 Pierre Humblet <pierre.humblet@ieee.org>
- Christopher Faylor <cgf@timesys.com>
-
- * path.cc (mount_info::conv_to_posix_path): Return proper status when
- chrooted.
-
-2004-05-06 Pierre Humblet <pierre.humblet@ieee.org>
-
- * path.cc (path_conv::check): Strip trailing dots and spaces and
- return error if the final component had only dots and spaces.
- (normalize_posix_path): Revert 2004-04-30.
- (chdir): Do not check for trailing spaces. Do not set native_dir
- to c:\ for virtual devices. Pass only native_dir to cwd.set.
- (cwdstuff::set): Assume posix_cwd is already normalized.
-
-2004-05-04 Christopher Faylor <cgf@alum.bu.edu>
-
- * path.cc (normalize_win32_path): Detect components with only dots.
- Remove a final . if it follows '\\'.
- (mount_info::conv_to_win32_path): Only backslashify the path when no
- mount is found.
- (chdir): Do not look for components with only dots.
-
-2004-05-04 Pierre Humblet <pierre.humblet@ieee.org>
- Christopher Faylor <cgf@alum.bu.edu>
-
- * path.cc (is_unc_share): Remove redundant tests.
-
-2004-05-04 Corinna Vinschen <corinna@vinschen.de>
-
- * crt0.o (mainCRTStartup): 16 byte align stack for main function.
-
-2004-05-04 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (check_sysfile): Don't scan string twice.
-
-2004-05-03 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc (writable_directory): Remove.
- (mkdir): Remove call to writable_directory.
- * syscalls.cc (unlink): Ditto.
- (rename): Ditto.
- * winsup.h (writable_directory): Remove declaration.
-
-2004-04-30 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Call path_conv::get_nt_native_path
- for evaluating NT path.
- * path.cc (normalize_posix_path): Remove trailing dots and spaces.
- (path_conv::get_nt_native_path): New function.
- * path.h (class path_conv): Declare get_nt_native_path method.
-
-2004-04-30 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Fix NT native path evaluation
- to allow opening serial ports.
-
-2004-04-30 DJ Delorie <dj@redhat.com>
-
- * init.cc (threadfunc_fe): Hack to make thread stacks always 16
- byte aligned.
-
-2004-04-21 Yitzchak Scott-Thoennes <sthoenna@efn.org>
-
- * syscalls.cc (lseek64): Fix debug_printf format string.
- (truncate64): Ditto.
-
-2004-04-21 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::lseek): Force res to -1 on error.
-
-2004-04-20 Christopher Faylor <cgf@alum.bu.edu>
-
- * path.cc (is_unc_share): Rename from slash_unc_prefix_p throughout.
-
-2004-04-20 Pierre Humblet <pierre.humblet@ieee.org>
-
- * path.cc (normalize_posix_path): Process all Posix paths and map three
- or more initial slashes to a single one. Simplify processing following
- two initial slashes.
- (normalize_win32_path): Make last argument non-optional and do not
- check for NULL value.
-
-2004-04-20 Pierre Humblet <pierre.humblet@ieee.org>
-
- * fhandler_disk_file.cc (fhandler_base::open_fs): Change
- set_file_attribute call to indicate that NT security isn't used.
- (fhandler_disk_file::fchmod): Rearrange to isolate 9x related
- statements.
- Do not set FILE_ATTRIBUTE_SYSTEM.
- (fhandler_disk_file::fchown): Check noop case first.
- * fhandler.cc (fhandler_base::open9x): Remove ntsec related statements.
- (fhandler_base::set_name): Do not set namehash.
- * fhandler.h (fhandler_base::get_namehash): Compute and set namehash if
- needed.
- * syscalls.cc (access): Verify that fh is not NULL. Do not set PC_FULL.
- (chmod): Ditto.
- (chown_worker): Ditto.
- (stat_worker): Ditto. Verify if the path exists.
-
-2004-04-20 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Remove special DEV_FLOPPY_MAJOR
- treatment.
- * fhandler_raw.cc (fhandler_dev_raw::open): Simplify write-only case.
- * fhandler_tape.cc (fhandler_dev_tape::raw_write): Add accidentally
- dropped condition.
-
-2004-04-20 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Add FILE_READ_ATTRIBUTES when
- only GENERIC_WRITE access is requested.
-
-2004-04-19 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/mtio.h (GMT_ASYNC): New define.
- (MT_ST_ASYNC_WRITES): Remove "Not supported" comment.
-
-2004-04-19 Corinna Vinschen <corinna@vinschen.de>
-
- * errno.cc (errmap): Handle ERROR_IO_PENDING.
- * fhandler.cc (fhandler_base::open): Make tape I/O asynchronous.
- * fhandler.h (class fhandler_dev_tape): Add mt_evt member.
- * fhandler_tape.cc (mtinfo_drive::initialize): Initialize async_writes.
- (mtinfo_drive::close): Handle async writes.
- (mtinfo_drive::read): Add mt_evt parameter. Use overlapped I/O.
- (mtinfo_drive::async_wait): New function.
- (mtinfo_drive::write): Add mt_evt parameter. Use overlapped I/O.
- Handle async writes.
- (mtinfo_drive::_set_pos): Handle async writes.
- (mtinfo_drive::set_partition): Ditto.
- (mtinfo_drive::prepare): Ditto.
- (mtinfo_drive::get_status): Drop useless "else". Handle async_writes
- flag.
- (mtinfo_drive::set_options): Handle async_writes flags.
- (fhandler_dev_tape::close): Close mt_evt handle.
- (fhandler_dev_tape::raw_read): Create mt_evt handle and use in call
- to mtinfo_drive::read.
- (fhandler_dev_tape::raw_write): Create mt_evt handle and use in call
- to mtinfo_drive::write.
- * mtinfo.h (MTINFO_VERSION): Bump.
- (enum dirty_state): Add async_write_pending state.
- (class mtinfo_drive): Add OVERLAPPED struct "ov". Add async_writes
- flag.
- (mtinfo_drive::async_wait): Add declaration.
- (mtinfo_drive::read): Add mt_evt parameter.
- (mtinfo_drive::write): Ditto.
-
- * registry.cc (load_registry_hive): Call enable_restore_privilege
- instead of set_process_privilege.
-
-2004-04-19 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_tape.cc (mtinfo_drive::_set_pos): Take additional dont_wait
- parameter. Use in call to SetTapePosition.
- (mtinfo_drive::set_pos): Accommodate _set_pos calls to above change.
- (mtinfo_drive::set_partition): Ditto.
- * mtinfo.h (mtinfo_drive::_set_pos): Change declaration accordingly.
-
-2004-04-16 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (NtCreateFile): Add.
- * dir.cc (mkdir): Change set_file_attribute call to indicate that
- NT security isn't used.
- * fhandler.cc (fhandler_base::open_9x): New method, created from
- fhandler_base::open.
- (fhandler_base::open): Rearrange to use NtCreateFile instead of
- CreateFile.
- * fhandler.h (enum query_state): Redefine query_null_access to
- query_stat_control. query_null_access isn't allowed in NtCreateFile.
- (fhandler_base::open_9x): Declare.
- * fhandler_disk_file.cc (fhandler_base::fstat_fs): Use
- query_stat_control first, query_read_control if that fails.
- (fhandler_disk_file::fchmod): Call enable_restore_privilege before
- trying to open for query_write_control. Don't fall back to
- opening for query_read_control.
- (fhandler_disk_file::fchown): Ditto.
- (fhandler_disk_file::facl): Only request restore privilege and query
- access necessary for given cmd.
- * fhandler_raw.cc (fhandler_dev_raw::open): Call fhandler_base::open
- instead of opening device here.
- * ntdll.h (NtCreateFile): Declare.
- * path.cc (symlink_worker): Change set_file_attribute call to indicate
- that NT security isn't used.
- * sec_acl.cc (getacl): Fix bracketing.
- * sec_helper.cc (enable_restore_privilege): New function.
- * security.cc (str2buf2uni_cat): New function.
- (write_sd): Don't request restore permission here.
- * security.h (set_process_privileges): Drop stale declaration.
- (str2buf2uni): Declare.
- (str2buf2uni_cat): Declare.
- (enable_restore_privilege): Declare.
- * syscalls.cc (fchown32): Return immediate success on 9x.
-
-2004-04-15 Christopher Faylor <cgf@alum.bu.edu>
-
- * autoload.cc (dll_chain1): Rename to dll_chain. Remove old dll_chain
- code.
- (wsock_init): Avoid unneeded winsock_active tests.
- * winsup.h (winsock_active): Delete.
-
-2004-04-15 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Try opening
- in query_read mode if query_write fails.
- * fhandler_disk_file.cc (fhandler_disk_file::fchown): Ditto.
- * fhandler_disk_file.cc (fhandler_disk_file::facl): Ditto.
-
-2004-04-14 Corinna Vinschen <corinna@vinschen.de>
-
- * ntdll.h: Fix copyright date.
- * sec_acl.cc (acl_worker): Delete allocated fhandler.
- * syscalls.cc (chown_worker): Ditto.
- (chmod): Ditto.
- (stat_worker): Use get_namehash instead of hash_path_name.
-
-2004-04-14 Corinna Vinschen <corinna@vinschen.de>
-
- * sec_acl.cc (getacl): Avoid compiler warning.
- * security.cc (write_sd): Ditto. Fix error handling.
-
-2004-04-14 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (fstat64): Use get_namehash instead of hash_path_name.
-
-2004-04-14 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Simplify access evaluation
- expression.
- (fhandler_base::facl): New method.
- * fhandler.h: Declare facl method in fhandler_base,
- fhandler_disk_file and fhandler_virtual.
- * fhandler_disk_file.cc (fhandler_disk_file::facl): New method.
- * fhandler_virtual.cc (fhandler_virtual::facl): New method.
- * sec_acl.cc: Remove forward declaration for aclsort32 and acl32.
- (setacl): Remove static. Add and use handle parameter.
- (getacl): Ditto.
- (acl_worker): Reorganize to call fhandler's facl method eventually.
- (facl32): Ditto.
- * security.cc (get_nt_object_security): Remove static.
- * security.h: Add extern declarations for get_nt_object_security,
- aclsort32, acl32, getacl and setacl.
-
-2004-04-14 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Accommodate query_write_control
- query_state.
- (fhandler_base::fchown): New method.
- * fhandler.h: Declare fchown method in fhandler_base,
- fhandler_disk_file and fhandler_virtual.
- (enum query_state): Add query_write_control.
- * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Set query_state
- to query_write_control. Only remove FILE_ATTRIBUTE_READONLY if not
- setting security descriptor.
- (fhandler_disk_file::fchown): New method.
- * fhandler_virtual.cc (fhandler_virtual::fchown): New method.
- * sec_acl.cc (setacl): Call write_sd with additional handle attribute.
- * security.cc (write_sd): Take handle argument. Only request owner
- if getting SE_RESTORE_NAME privilege failed. Only open file if
- NtSetSecurityObject failed or handle is NULL.
- (set_nt_attribute): Call write_sd with additional handle attribute.
- * security.h (write_sd): Declare with additional handle argument.
- * syscalls.cc (chown_worker): Reorganize to call fhandler's fchown
- method eventually.
- (fchown): Ditto.
-
-2004-04-14 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (NtSetSecurityObject): Add.
- * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Only request
- READ_CONTROL rights when opening the file.
- * ntdll.h (NtSetSecurityObject): Add declaration.
- * security.cc (write_sd): Call NtSetSecurityObject instead of
- BackupWrite.
- (get_nt_object_security): Don't free security descriptor here.
-
-2004-04-14 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (ttyname): Use buffer of length TTY_NAME_MAX + 1.
- * sysconf.cc (sysconf): Handle _SC_TTY_NAME_MAX request.
- * include/limits.h: Define TTY_NAME_MAX and _POSIX_TTY_NAME_MAX.
-
-2004-04-14 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Export rand_r and ttyname_r.
- * syscalls.cc (ttyname_r): New function.
- (ttyname): Move functionality to ttyname_r. Call it from here.
- * include/cygwin/version.h: Bump API minor number.
-
-2004-04-14 Pierre Humblet <pierre.humblet@ieee.org>
-
- * path.h (path_conv::set_symlink): Add argument.
- (path_conv::get_symlink_length): New method.
- (path_conv::symlink_length): New member.
- * path.cc (path_conv::check): Pass symlen to set_symlink.
- * fhandler_disk_file.cc (fhandler_base::fstat_helper): For symlinks
- set st_size from get_symlink_length.
-
-2004-04-13 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (set_nt_attribute): Only call get_nt_object_security
- if handle is NULL.
-
-2004-04-13 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc (mkdir): Call set_file_attribute with additional handle
- argument.
- * fhandler.cc (fhandler_base::fchmod): New method.
- * fhandler.h: Declare fchmod method in fhandler_base,
- fhandler_disk_file and fhandler_virtual.
- * fhandler_disk_file.cc (fhandler_disk_file::fchmod): New method.
- (fhandler_base::open_fs): Call set_file_attribute with additional
- handle argument.
- * fhandler_virtual.cc (fhandler_virtual::fchmod): New method.
- * path.cc (symlink_worker): Call set_file_attribute with additional
- handle argument.
- * security.cc (get_nt_object_security): New function.
- (get_nt_object_attribute): Call get_nt_object_security.
- (set_nt_attribute): Add handle argument. Call get_nt_object_security
- first, read_sd only if that fails.
- (set_file_attribute): Add handle argument.
- * security.h (set_file_attribute): Declare with additional handle
- argument.
- * syscalls.cc (stat_suffixes): Move to beginning of file.
- (chown_worker): Call set_file_attribute with additional handle argument.
- (chmod): Reorganize to call fhandler's fchmod method eventually.
- (fchmod): Ditto.
-
-2004-04-13 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (NtQuerySecurityObject): Add.
- * ntdll.h (STATUS_BUFFER_TOO_SMALL): Add definition.
- (NtQuerySecurityObject): Add declaration.
- * security.cc (get_nt_object_attribute): Always use
- NtQuerySecurityObject to retrieve security descriptor.
-
-2004-04-13 Gerd Spalink <Gerd.Spalink@t-online.de>
-
- * fhandler_dsp.cc (fhandler_dev_dsp::Audio_out::stop): Add optional
- boolean argument so that playing can be stopped without playing
- pending buffers.
- (fhandler_dev_dsp::ioctl): Stop playback immediately for
- SNDCTL_DSP_RESET. Do not reset audio parameters in this case.
- Add support for ioctl SNDCTL_DSP_GETISPACE.
- (fhandler_dev_dsp::Audio_out::emptyblocks): Now returns the number of
- completely empty blocks.
- (fhandler_dev_dsp::Audio_out::buf_info): p->fragments is now the number
- of completely empty blocks. This conforms with the OSS specification.
- (fhandler_dev_dsp::Audio_out::parsewav): Ignore wave headers that are
- not aligned on four byte boundary.
- (fhandler_dev_dsp::Audio_in::buf_info): New, needed for
- SNDCTL_DSP_GETISPACE.
-
-2004-04-13 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.h (IMPLEMENT_STATUS_FLAG): New macro to define status flag
- accessor methods unambiguously.
- * fhandler.h: Use IMPLEMENT_STATUS_FLAG throughout where possible.
- * fhandler_termios.cc (fhandler_termios::tcinit): Call corrected
- accessor for initialized status flag.
- * mtinfo.h (class mtinfo_drive): Use IMPLEMENT_STATUS_FLAG throughout.
- * path.cc (fs_info::update): Remove duplicate call to flags().
- * path.h (struct fs_info): Use IMPLEMENT_STATUS_FLAG where possible.
- (path_conv::is_auto_device): Fix spacing.
- * tty.h (class tty_min): Use IMPLEMENT_STATUS_FLAG throughout.
-
-2004-04-12 Christopher Faylor <cgf@alum.bu.edu>
-
- * thread.cc (pthread::thread_init_wrapper): Wait later to get more
- parallel behavior.
-
-2004-04-12 Christopher Faylor <cgf@alum.bu.edu>
-
- * thread.cc (pthread::create): Use thread mutex to control
- synchronization rather than creating a suspended thread. Wait for
- "cancellation event" to indicate that started thread has been properly
- initialized.
- (pthread::thread_init_wrapper): Use set_tls_self_pointer() to set tid
- and cygtls. Signal with cancel_event when done.
-
-2004-04-12 Pierre Humblet <pierre.humblet@ieee.org>
-
- * path.cc (path_conv::check): Fix "tail filling" logic.
-
-2004-04-11 Christopher Faylor <cgf@alum.bu.edu>
-
- * cygheap.h: Replace inexplicably removed closing brace.
-
-2004-04-11 Christopher Faylor <cgf@alum.bu.edu>
-
- * cygheap.h (CYGHEAP_SLOP): Reduce drastically to avoid collisions.
-
-2004-04-11 Pierre Humblet <pierre.humblet@ieee.org>
-
- * dtable.cc (dtable::extend): Change order of memcpy and cfree.
-
-2004-04-10 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (sync): Define void according to SUSv3.
-
-2004-04-10 Corinna Vinschen <corinna@vinschen.de>
-
- * sec_acl.cc (setacl): Use correct offset when trying to combine
- standard and default entry of same type.
-
-2004-04-10 Pierre Humblet <pierre.humblet@ieee.org>
-
- * fhandler.cc (rootdir): Add and use second argument.
- * winsup.h (rootdir): Add second argument in declaration.
- * path.cc (fs_info::update): Modify call to rootdir.
- * syscalls.cc (check_posix_perm): Ditto.
- (statfs): Ditto. Move syscall_printf near top.
-
-2004-04-10 Corinna Vinschen <corinna@vinschen.de>
-
- * Use new unified status_flag accessor methods from classes fhandler_*,
- tty_min, mtinfo and fs_info thoroughout.
- * fhandler.h: Redefine all set_close_on_exec methods to take a bool
- argument.
- (enum conn_state): Rename from connect_state.
- (class fhandler_base): Rename some status flags to align with
- accessor method names. Drop encoded flag entirely. Unify status
- accessor methods. Const'ify all read accessor methods.
- (class fhandler_socket): Ditto.
- (class fhandler_dev_raw): Ditto.
- * fhandler_disk_file.cc (fhandler_base::fstat_fs): Use fs.fs_is_fat()
- instead of evaluating FATness of file system here.
- (fhandler_disk_file::opendir): Drop call to set_encoded().
- (fhandler_disk_file::readdir): Use pc.isencoded() directly.
- * mtinfo.h (class mtinfo_drive): Const'ify all read accessor methods.
- * path.cc (fsinfo_cnt): Add.
- (fs_info::update): Accommodate class changes. Evaluate file system
- name specific flags right here. Add thread safety for reading and
- writing global fsinfo array.
- * path.h (enum path_types): Drop values for flags kept in fs already.
- (struct fs_info): Move status informatin into private struct type
- status_flags. Add accessor methods. Remove path and file system
- name string arrays in favor of status bits.
- (class path_conv): Use new fs_info status information where
- appropriate.
- (path_conf::fs_has_ea): Rename from fs_fast_ea.
- (path_conf::fs_has_acls): New method.
- (path_conf::root_dir): Remove.
- (path_conf::volname): Remove.
- * syscalls (statfs): Evaluate root dir locally.
- * tty.h (class tty_min): Unify status accessor methods. Const'ify
- all read accessor methods.
-
-2004-04-09 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.h (pthread::init_mainthread): Remove parameter forked.
- (pthread::set_tls_self_pointer): New static function.
- * thread.cc (MTinterface::fixup_after_fork): Change call to
- pthread::init_mainthread.
- (pthread::init_mainthread): Remove parameter forked. Simplify thread
- self pointer handling.
- (pthread::self): Set thread self pointer to null_pthread if thread has
- not been initialized.
- (pthread::set_tls_self_pointer): New static function.
-
-2004-04-05 Pierre Humblet <pierre.humblet@ieee.org>
-
- * path.cc (path_conv::check): Optimize symlink replacements.
-
-2004-04-09 Pierre Humblet <pierre.humblet@ieee.org>
-
- * path.cc (normalize_posix_path): Add "tail" argument and set it.
- Always have a final slash for directories. Pass 3rd argument to
- normalize_win32_path.
- (path_conv::check): Pass tail to normalize_posix_path. Set
- need_directory and remove final slash after that call. Remove last
- argument to mount_table->conv_to_win32_path(). Remove noop dostail
- check. Remove fs.update() from inner loop. Improve tail finding
- search.
- (normalize_win32_path): Add and set tail argument.
- (mount_item::build_win32): Avoid calling strcpy.
- (mount_info::conv_to_win32_path): Remove third argument and simplify
- because the source is normalized. Keep /proc path in Posix form. Call
- win32_device_name() only once.
- (mount_info::conv_to_posix_path): Add and use 3rd argument to
- normalize_win32_path to avoid calling strlen.
- (cwdstuff::set): Add 3rd argument to normalize_posix_path and remove
- final slash if any.
- * shared_info.h (mount_info::conv_to_win32_path): Remove last argument
- in declaration.
-
-2004-04-09 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_dev_raw): Move status bits into protected
- bitfield struct type status_flags. Drop unused has_written bit.
- Add accessor methods.
- (fhandler_dev_raw::clear): Remove.
- (fhandler_dev_raw::reset_devbuf): Remove.
- * fhandler_floppy.cc (fhandler_dev_floppy::lseek): Use accessor method
- for is_writing.
- * fhandler_raw.cc: Use status accessor methods throughout.
- (fhandler_dev_raw::clear): Remove.
- (fhandler_dev_raw::fhandler_dev_raw): Drop clear call.
- (fhandler_dev_raw::~fhandler_dev_raw): Ditto.
- * fhandler_tape.cc: Use mtinfo::status accessor methods throughout.
- (mtinfo_drive::close): Fix conditional to enable BSD semantics
- correctly.
- (mtinfo_drive::get_status): Rename from mtinfo_drive::status.
- * mtinfo.h (class mtinfo_drive): Move status bits into private bitfield
- struct type status_flags. Add accessor methods.
- Rename status method to get_status.
-
-2004-04-09 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (fsinfo): Global storage for file system information.
- (fs_info::update): Store file system information also in fsinfo and
- short circuit GetVolumeInformation by using alredy stored file system
- information.
-
-2004-04-09 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_base::status): Declare private.
- (fhandler_base::open_status): Ditto.
- (class fhandler_socket): Move status bits into private bitfield struct
- type status_flags. Change accessor methods appropriately.
- * fhandler_socket.cc (fhandler_socket::fhandler_socket): Accommodate
- above status bit changes.
- * tty.h: Remove status bit enumerator.
- (TTYISSETF): Remove.
- (TTYSETF): Remove.
- (TTYCLEARF): Remove.
- (TTYCONDSETF): Remove.
- (tty_min::status): Define as private bitfield struct type status_flags.
- Add appropriate accessor methods.
- * fhandler_console.cc: Use tty_min::status accessor methods throughout.
- * fhandler_termios.cc: Ditto.
- * winsup.h (__ISSETF): Remove.
- (__SETF): Remove.
- (__CLEARF): Remove.
- (__CONDSETF): Remove.
-
-2004-04-09 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::write): Use bool parameter in calls to
- set_did_lseek.
- (fhandler_base::fhandler_base): Accommodate new status and open_status
- constructor.
- * fhandler.h: Remove status bit enumerator.
- (FHDEVN): Remove.
- (FHISSETF): Remove.
- (FHSETF): Remove.
- (FHCLEARF): Remove.
- (FHCONDSETF): Remove.
- (FHSTATOFF): Remove.
- (UNCONNECTED, CONNECT_PENDING, CONNECTED): Substitute by enum
- connect_state.
- (fhandler_base::status): Define as bitfield struct type status_flags.
- Remove unused flags entirely. Accommodate all status access methods.
- (open_status): Define as bitfield struct type status_flags.
- (fhandler_socket): Move socket related status bits to here. Redefine
- had_connect_or_listen to be part of these status bits. Accommodate
- related access methods.
- * fhandler_disk_file.cc (fhandler_base::fstat_helper): Use pc.issymlink
- instead of dropped method get_symlink_p.
- (fhandler_base::open_fs): Remove setting dropped status flags.
- * fhandler_socket.cc: Use values from enum connect_state throughout.
- (fhandler_socket::fhandler_socket): Initialize status bits.
- * fhandler_virtual.cc (fhandler_virtual::open): Remove setting dropped
- status flags.
- * net.cc: Use values from enum connect_state throughout.
- * select.cc: Ditto.
- * shared_info.h: Protect struct console_state using _FHANDLER_H_
- instead of FHDEVN.
-
-2004-04-09 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (get_file_attribute): Fix conditional.
-
-2004-04-08 Christopher Faylor <cgf@bosbc.com>
-
- * child_info.h: Update CHILD_INFO_MAGIC after 2004-04-03 change.
-
-2004-04-08 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (hash_path_name): Replace hash algorithm with SDBM.
-
-2004-04-08 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Set query access mode according
- to query_open setting.
- (fhandler_base::fhandler_base): Initialize query_open.
- * fhandler.h (FH_QUERYOPEN): Drop.
- (enum query_state): Add.
- (class fhandler_base): Add query_open member.
- (fhandler_base::get_query_open): Redefine to use query_open.
- (fhandler_base::set_query_open): Ditto.
- * fhandler_disk_file.cc (fhandler_base::fstat_fs): Remove O_DIROPEN
- from open_flags since it's added in open_fs anyway. Remove
- query_open_already. Use new query_open settings. Rearrange slightly.
- (fhandler_base::fstat_helper): Add get_io_handle as parameter to
- get_file_attribute.
- * security.cc (get_nt_object_attribute): Make returning an int.
- Return -1 on error, 0 otherwise.
- (get_file_attribute): Take an object handle as argument. Move down
- to allow calling get_nt_object_attribute in case a non-NULL handle
- is given.
- * security.h (get_file_attribute): Add handle to argument list.
- * syscalls.cc (chown_worker): Accommodate new definition of
- get_file_attribute.
-
-2004-04-07 Pierre Humblet <pierre.humblet@ieee.org>
-
- * path.cc (path_prefix_p): Optimize test order.
-
-2004-04-06 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (EXTRALIBS): Add libtextreadmode.a.
- (INSTOBJS): Add textreadmode.o.
- * textreadmode.c: New file.
-
-2004-04-06 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_base::fstat_helper): Request
- compressed size only if the matching attributes are set. Use
- NtQueryInformationFile instead of GetCompressedFileSize.
- (fhandler_base::fstat_by_handle): Remove NT 3.5 cruft since
- local.dwVolumeSerialNumber isn't used subsequently.
- * ntdll.h: Add typedefs for FILE_COMPRESSION_INFORMATION and
- FILE_INFORMATION_CLASS.
-
-2004-04-06 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_raw.cc (fhandler_dev_raw::open): Actually use "options".
-
-2004-04-04 Gerd Spalink <Gerd.Spalink@t-online.de>
-
- * fhandler_dsp.cc (fhandler_dev_dsp::ioctl): Add implementation
- for ioctl codes SNDCTL_DSP_CHANNELS and SNDCTL_DSP_GETCAPS.
-
-2004-04-03 Christopher Faylor <cgf@bosbc.com>
-
- * child_info.h (child_info::cygheap_reserve_sz): Rename from
- cygheap_alloc_sz.
- * cygheap.cc: Rename alloc_sz to reserve_sz throughout.
-
-2004-04-03 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_socket): Remove has_been_closed member.
- * fhandler_socket.cc (fhandler_socket::recvfrom): Revert to
- overlapped I/O.
- (fhandler_socket::recvmsg): Ditto.
- (fhandler_socket::sendto): Ditto.
- (fhandler_socket::sendmsg): Ditto.
- * net.cc (wsock_event::prepare): Ditto.
- (wsock_event::wait): Ditto. Evaluate overlapped result also after
- calling CancelIo (thanks to Patrick Samson <p_samson@yahoo.com>).
- (wsock_event::release): Remove.
- * wsock_event.h: Revert to overlapped I/O.
-
-2004-04-02 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (wsock_event::release): Use NULL handle in call to
- WSAEventSelect to resolve KB 168349.
-
-2004-04-01 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::recvfrom): Rearrange loop
- so that WSARecvFrom is always called before waiting.
- (fhandler_socket::recvmsg): Ditto.
-
-2004-04-01 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (wsock_event::wait): Make wsa_err an int. Don't set
- ret to 0 if any error has happened.
-
-2004-04-01 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::sendto): Drop out of loop if
- has_been_closed gets set.
- (fhandler_socket::sendmsg): Ditto.
- * net.cc (wsock_event::wait): Don't initialize evts. Don't try to
- evaluate network events if WSAEnumNetworkEvents fails.
- (wsock_event::release): Save last WSA error and set it again unless
- resetting to blocking socket fails.
- * wsock_event.h (class wsock_event): Remove destructor.
-
-2004-03-31 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_tape.cc (mtinfo::initialize): Fix fatal error message.
-
-2004-03-31 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::recvfrom): Always initialize
- ret to 0 when using in Winsock call.
- (fhandler_socket::recvmsg): Ditto.
- (fhandler_socket::sendto): Ditto.
- (fhandler_socket::sendmsg): Ditto.
-
-2004-03-31 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_tape.cc (mtinfo_drive::get_pos): Only set partition if
- GetTapePosition returned a non-zero partition number.
- (mtinfo_drive::create_partitions): Reinitialize to partition 0.
- Support TAPE_DRIVE_INITIATOR and TAPE_DRIVE_FIXED partitioning.
- (mtinfo_drive::set_partition): Initialize new partition.
- (mtinfo_drive::status): Readd accidentally dropped setting of mt_resid.
-
- * net.cc (wsock_event::prepare): Always print debug output in case
- of error.
-
-2004-03-31 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::sendmsg): Add SIGPIPE handling.
-
-2004-03-31 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::recvfrom): Initialize res to
- SOCKET_ERROR. Use SOCKET_ERROR instead of -1 throughout.
- (fhandler_socket::recvmsg): Ditto.
- (fhandler_socket::sendto): Ditto.
- (fhandler_socket::sendmsg): Ditto.
- * net.cc (wsock_event::prepare): Call WSASetLastError instead of
- SetLastError.
- (wsock_event::wait): Use SOCKET_ERROR instead of -1.
-
-2004-03-30 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.h (pthread::init_mainthread): Add parameter forked. Set
- forked default to false..
- * thread.cc (MTinterface::fixup_after_fork): Call
- pthread::init_mainthread with forked = true.
- (pthread::init_mainthread): Add parameter forked. Do not change thread
- self pointer when forked.
-
-2004-03-30 Corinna Vinschen <corinna@vinschen.de>
-
- * shm.cc (shmat): If shmid is unknown, call a special variation
- of shmget to retrieve the shared memory segment from Cygserver
- instead of failing immediately.
- * include/cygwin/ipc.h (IPC_KEY_IS_SHMID): New internal flag for
- shmget when called from shmat.
-
-2004-03-29 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_socket): Add has_been_closed member.
- * fhandler_socket.cc (fhandler_socket::fhandler_socket): Initialize
- has_been_closed to 0.
- (fhandler_socket::recvfrom): Use new asynchronous I/O driven
- wsock_event methods.
- (fhandler_socket::recvmsg): Ditto.
- (fhandler_socket::sendto): Ditto.
- (fhandler_socket::sendmsg): Ditto.
- * net.cc (wsock_event::prepare): Reimplement using asynchronous I/O.
- (wsock_event::wait): Ditto.
- (wsock_event::release): New method.
- * wsock_event.h (class wsock_event): Remove ovr member. Accommodate
- new implementation of prepare and wait methods. Add release method.
-
-2004-03-29 Thomas Pfaff <tpfaff@gmx.net>
-
- * thread.cc (pthread::atforkprepare): Call
- MT_INTERFACE->fixup_before_fork at the end of atforkprepare.
-
-2004-03-29 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (wsock_event::wait): Change scope of local "len" variable.
-
-2004-03-28 Corinna Vinschen <corinna@vinschen.de>
-
- * shm.cc (shmat): Return (void *) -1 on error instead of NULL.
-
-2004-03-27 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_nodevice.cc (fhandler_nodevice::open): Assume that errno has
- already been set if pc.error is nonzero.
-
-2004-03-26 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.cc (cygheap_fixup_in_child): Improve strace output.
-
-2004-03-26 Corinna Vinschen <corinna@vinschen.de>
-
- * errno.cc (errmap): Map ERROR_SHARING_VIOLATION to EBUSY,
- ERROR_EOM_OVERFLOW and ERROR_NO_DATA_DETECTED to EIO. Add mappings
- for ERROR_NO_MEDIA_IN_DRIVE, ERROR_DEVICE_REQUIRES_CLEANING and
- ERROR_DEVICE_DOOR_OPEN.
- * fhandler.h (class fhandler_dev_raw): Drop varblkop member.
- (fhandler_dev_raw::is_eom): De-virtualize.
- (fhandler_dev_raw::is_eof): Ditto.
- (class fhandler_dev_tape): Drop lasterr and dp member. Add mt_mtx
- member. Drop all private methods formerly used by ioctl.
- (fhandler_dev_tape::is_rewind_device): Use get_minor for clarity.
- (fhandler_dev_tape::driveno): New method.
- (fhandler_dev_tape::drive_init): New method.
- (fhandler_dev_tape::clear): Remove method.
- (fhandler_dev_tape::is_eom): Ditto.
- (fhandler_dev_tape::is_eof): Ditto.
- (fhandler_dev_tape::write_file): Ditto.
- (fhandler_dev_tape::read_file): Ditto.
- (fhandler_dev_tape::_lock): New method.
- (fhandler_dev_tape::unlock): New method.
- (fhandler_dev_tape::raw_read): New method.
- (fhandler_dev_tape::raw_write): New method.
- * fhandler_raw.cc (fhandler_dev_raw::is_eom): New method.
- (fhandler_dev_raw::is_eof): New method.
- (fhandler_dev_raw::open): Allow setting write through option by
- using the O_TEXT flag as ... flag.
- (fhandler_dev_raw::writebuf): Remove usage of varblkop and other
- tape specific code.
- (fhandler_dev_raw::raw_read): Ditto.
- (fhandler_dev_raw::dup): Ditto.
- * fhandler_tape.cc: Rewrite tape operations entirely. Implement
- new tape driver classes mtinfo, mtinfo_drive and mtinfo_part.
- Reduce fhandler_dev_tape methods to mostly just calling appropriate
- mtinfo_drive methods.
- (mtinfo_init): New function adding the mtinfo shared memory area.
- * mtinfo.h: New file, containing the definition of the new tape
- driver classes.
- * shared.cc: Include mtinfo.h.
- (offsets): Add entry for mtinfo shared memory area.
- (memory_init): Call mtinfo_init.
- * shared_info.h (shared_locations): Add SH_MTINFO shared location.
- * include/cygwin/mtio.h: Change and add various comments. Add GMT_xxx
- macros for new generic flags. Add MT_ST_xxx bitfield definitions
- for MTSETDRVBUFFER ioctl.
- * include/cygwin/version.h: Bump API minor version number.
-
-2004-03-26 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (path_conv::check): Use 'strchr' rather than 'strrchr' to
- find end of string, for efficiency.
-
-2004-03-26 Thomas Pfaff <tpfaff@gmx.net>
-
- * include/cygwin/_types.h: New file.
- * include/sys/lock.h: Ditto.
- * include/sys/stdio.h: Ditto.
- * thread.cc: Include sys/lock.h
- (__cygwin_lock_init): New function.
- (__cygwin_lock_init_recursive): Ditto.
- (__cygwin_lock_fini): Ditto.
- (__cygwin_lock_lock): Ditto.
- (__cygwin_lock_trylock): Ditto.
- (__cygwin_lock_unlock): Ditto.
- (pthread::atforkprepare): Lock file pointer before fork.
- (pthread::atforkparent): Unlock file pointer after fork.
- (pthread::atforkchild): Ditto.
-
-2004-03-26 Corinna Vinschen <corinna@vinschen.de>
-
- * sem.cc (semget): Fix debug string.
- (semop): Ditto.
- * shm.cc (fixup_shms_after_fork): Ditto.
- (shmat): Ditto.
- (shmdt): Ditto.
- (shmget): Ditto.
-
-2004-03-26 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (wait_sig): Make sure that SIGCHLD is handled regardless
- of whether a signal is queued.
-
-2004-03-26 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (wait_sig): Report if not trying to send signal due to
- queued signal.
-
-2004-03-25 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (normalize_posix_path): Reorganize to short circuit to DOS
- path handling whenever a '\' is detected.
-
- * signal.cc (sigaction): Make strace output more informative.
- * sigproc.cc (pending_signals::add): Just index directly into signal
- array rather than treating the array as a heap.
- (pending_signals::del): Ditto.
- (wait_sig): Don't send signal if we already have a similar signal
- queued.
- * sigproc.h (call_signal_handler_now): Remove obsolete declaration.
-
-2004-03-23 Gerd Spalink <Gerd.Spalink@t-online.de>
-
- * fhandler_dsp.cc (fhandler_dev_dsp::write): Remove type
- cast from argument to audio_out_->parsewav() to make reference
- work properly. Now .wav file headers are properly discarded.
-
-2004-03-23 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_base::fstat_fs): Use created
- handle regardless of nohandle state. Clean up afterwards.
-
-2004-03-23 Gerd Spalink <Gerd.Spalink@t-online.de>
-
- * autoload.cc: Load eight more functions for waveIn support.
- * fhandler.h (class fhandler_dev_dsp): Add class Audio, class Audio_in
- and class Audio_out members and audio_in_, audio_out_ pointers so
- that future changes are restricted to file fhandler_dsp.cc.
- * fhandler_dsp.cc (fhandler_dev_dsp::Audio): Add this class to treat
- things common to audio recording and playback.
- Add more format conversions.
- (fhandler_dev_dsp::Audio::queue): New queues for buffer management
- to fix incomplete cleanup of buffers passed to the wave device.
- (fhandler_dev_dsp::Audio_in): New, added class to implement audio
- recording.
- (fhandler_dev_dsp::Audio_out): Rework to use functionality provided
- by fhandler_dev_dsp::Audio. Allocate memory audio buffers late,
- just before write.
- (fhandler_dev_dsp::Audio_out::start): Size of wave buffer allocated
- here depends on audio rate/bits/channels.
- (fhandler_dev_dsp::Audio_in::start): Ditto.
- (fhandler_dev_dsp::setupwav): Replaced by following function.
- (fhandler_dev_dsp::Audio_out::parsewav): Does not setup wave device
- any more. Discard wave header properly.
- (fhandler_dev_dsp::open): Add O_RDONLY and_RDWR as legal modes.
- Protect against re-open. Activate fork_fixup.
- (fhandler_dev_dsp::ioctl): Protect against actions when audio is
- active. SNDCTL_DSP_GETFMTS only returns formats supported by
- mmsystem wave API, not all supported formats. SNDCTL_DSP_GETBLKSIZE
- result now depends on current audio format.
- (fhandler_dev_dsp::fixup_after_fork): Call fork_fixup for the Audio
- classes to let them duplicate the CRITICAL_SECTION.
-
-2004-03-19 Pierre Humblet <pierre.humblet@ieee.org>
- Christopher Faylor <cgf@redhat.com>
-
- * init.cc (munge_threadfunc): Handle all instances of search_for.
- (prime_threads): Test threadfunc_ix[0].
-
-2004-03-21 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.cc (init_cheap): Set initial_sz to something or suffer
- spurious output.
- (cygheap_fixup_in_child): Set alloc_sz to passed in size to ensure that
- children will have the right size heap.
- (_csbrk): Make output conditional on DEBUGGING.
-
-2004-03-21 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.cc (init_cheap): Conditionalize debugging code.
-
-2004-03-21 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.cc (init_cheap): Add ability to specify minimal cygwin heap
- size when debugging.
- (_csbrk): Report error in allocation to stderr.
- (ccalloc): Ditto.
- * dtable.cc (dtable::find_fifo): Remove use of atoms.
- * dtable.h (dtable::find_fifo): Ditto.
- * fhandler.h (fhandler_fifo): Ditto.
- * fhandler_fifo.cc (fhandler_fifo::fhandler_fifo): Ditto.
- (fhandler_fifo::set_use): Ditto.
- (fhandler_fifo::open_not_mine): Ditto.
- (fhandler_fifo::open): Ditto.
- * pinfo.cc (_pinfo::commune_recv): Ditto.
- (_pinfo::commune_send): Ditto.
-
-2004-03-19 Pierre Humblet <pierre.humblet@ieee.org>
-
- * dir.cc (rmdir): Reorganize error handling to reduce indentation.
-
-2004-03-19 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number to 10.
-
-2004-03-18 Christopher Faylor <cgf@redhat.com>
-
- * child_info.h (CURR_CHILD_INFO_MAGIC): Reset to new value.
- (child_info::cygheap_alloc_sz): New field.
- * cygheap.cc (init_cheap): Reduce size of cygwin stack until minimal
- hit when attempting initial allocation.
- (cygheap_setup_for_child): Use alloc_sz to create secondary memory
- mapped entry. Store alloc_sz in cygheap_alloc_sz.
- (cygheap_fixup_in_child): Use cygheap_alloc_sz to map parent's cygheap.
- * cygheap.h (_CYGHEAPSIZE_SLOP): New define.
- (CYGHEAPSIZE): Use _CYGHEAPSIZE_SLOP.
-
-2004-03-18 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_proc.cc (format_proc_meminfo): On NT, try to figure out
- real swap file usage by requesting SystemPagefileInformation. Use
- GlobalMemoryStatus as fallback.
- * ntdll.h (_SYSTEM_INFORMATION_CLASS): Add SystemPagefileInformation.
- (struct _SYSTEM_PAGEFILE_INFORMATION): Define.
-
-2004-03-17 Christopher Faylor <cgf@redhat.com>
-
- * pipe.cc (fhandler_pipe::dup): Fix debugging message.
-
-2004-03-17 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number to 9.
-
-2004-03-16 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (proc_terminate): Release sync_proc_subproc when done
- terminating or suffer potential hangs.
- (get_proc_lock): Reorganize debugging output slightly.
-
-2004-03-15 Christopher Faylor <cgf@redhat.com>
-
- * cygtls.cc (_cygtls::fixup_after_fork): Just manipulate the signal
- stack if a signal occurred during the parent's fork. Otherwise leave
- it alone.
-
-2004-03-15 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (try_to_debug): Report on tid of caller.
-
- * sync.cc (muto::acquire): Fix some races.
- * sync.h (muto): Expose some fields for easier debugging.
-
-2004-03-15 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_dev_tape::tape_get_pos): Declare with extra
- parameter for partition number.
- (fhandler_dev_tape::_tape_set_pos): Ditto.
- (fhandler_dev_tape::tape_partition): New method.
- (fhandler_dev_tape::tape_set_partition): New method.
- * fhandler_tape.cc (fhandler_dev_tape::open): Call private methods
- directly instead of ioctl.
- (fhandler_dev_tape::ioctl): Use long erase on MTERASE by default.
- Don't use absolute positioning on MTSEEK. Call tape_set_partition
- on MTSETPART, tape_partition on MTMKPART.
- (fhandler_dev_tape::tape_get_pos): Add partition number parameter.
- Prefer logical position information over absolute position information.
- Return partition number.
- (fhandler_dev_tape::_tape_set_pos): Add partition number parameter.
- Use in SetTapePosition.
- (fhandler_dev_tape::tape_set_pos): Remove special TAPE_ABSOLUTE_BLOCK
- handling.
- (fhandler_dev_tape::tape_erase): Rewind before erasing.
- (fhandler_dev_tape::tape_status): Rearrange slightly. Try to get a
- MediaType even if no tape is loaded. Store active partition in
- mt_resid as on Linux.
- (fhandler_dev_tape::tape_partition): New method.
- (fhandler_dev_tape::tape_set_partition): New method.
- * include/cygwin/mtio.h: Fix copyright. Add comment to explain
- mt_resid content.
- * include/cygwin/version.h: Bump API minor number.
-
-2004-03-14 Christopher Faylor <cgf@redhat.com>
-
- * cygtls.cc (_cygtls::remove): Call remove_wq even when we can't
- necessarily get the cygtls table lock.
- * cygtls.h (_cygtls::remove_wq): Add wait argument.
- * sigproc.cc (_cygtls::remove_wq): Honor wait argument when acquiring
- lock.
- (proc_terminate): Don't NULL sync_proc_subproc since other threads may
- still try to access it.
-
-2004-03-14 Corinna Vinschen <corinna@vinschen.de>
-
- * errno.cc (errmap): Map ERROR_BEGINNING_OF_MEDIA and
- ERROR_SETMARK_DETECTED to EIO instead of ESPIPE.
- Handle ERROR_FILEMARK_DETECTED.
- * fhandler_tape.cc (TAPE_FUNC): Add comment that ERROR_BUS_RESET
- has still to be handled correctly.
- (fhandler_dev_tape::open): Accommodate fact that get.mt_dsreg
- also contains density code.
- (fhandler_dev_tape::ioctl): Rearrange slightly. Reset devbuf also on
- MTNOP, MTWSM, MTSETBLK, MTSETDRVBUFFER, MTSETPART and MTMKPART.
- (fhandler_dev_tape::tape_set_pos): Rearrange. Match behaviour to
- the Linux tape driver.
- (fhandler_dev_tape::tape_status): Call IOCTL_STORAGE_GET_MEDIA_TYPES_EX
- if available. Return device type and density code in appropriate
- mtget members.
- * wincap.h (wincaps::has_ioctl_storage_get_media_types_ex): New element.
- * wincap.cc: Implement above element throughout.
- * include/cygwin/mtio.h: Add tape device types as returned by
- IOCTL_STORAGE_GET_MEDIA_TYPES_EX.
- (MT_TAPE_INFO): Use above type codes.
- (struct mtget): Change mt_dsreg comment.
-
-2004-03-14 Pierre Humblet <pierre.humblet@ieee.org>
-
- * dir.cc (rmdir): Construct real_dir with flag PC_FULL.
- Use a loop instead of recursion to handle the current directory.
-
-2004-03-14 Christopher Faylor <cgf@redhat.com>
-
- * cygtls.cc (_cygtls::remove): Call remove_wq to ensure that wait stuff
- is removed from proc_subproc linked list.
- * cygtls.h (_cygtls::remove_wq): Declare.
- * sigproc.cc (_cygtls::remove_wq): Define.
- (proc_subproc): Label event handle appropriately.
- * spawn.cc (spawn_guts): Return -1 when wait() fails for spawn types
- that require waiting.
-
-2004-03-13 Corinna Vinschen <corinna@vinschen.de>
-
- * errno.cc (errmap): Handle ERROR_BUS_RESET.
- * fhandler.h (fhandler_dev_raw::write_file): New method, created
- from former static function.
- (fhandler_dev_raw::read_file): Ditto.
- (reset_devbuf): New inline method.
- (class fhandler_dev_tape): Add TAPE_GET_DRIVE_PARAMETERS
- member `dp'.
- (fhandler_dev_tape::write_file): New method.
- (fhandler_dev_tape::read_file): Ditto.
- (fhandler_dev_tape::tape_get_feature): Convert to inline method.
- (fhandler_dev_tape::tape_error): New method, created from former
- static function.
- (fhandler_dev_tape::tape_get_blocksize): Remove declaration.
- * fhandler_raw.cc (fhandler_dev_raw::write_file): New method, created
- from former static function.
- (fhandler_dev_raw::read_file): Ditto.
- (fhandler_dev_raw::writebuf): Accommodate the fact that no devbuf
- exists under variable block size condition.
- (fhandler_dev_raw::raw_read): Ditto. Add local p pointer to simplify
- pointer arithmetic.
- (fhandler_dev_raw::raw_write): Always set devbufend to 0 when starting
- with writing. Accommodate the fact that no devbuf exists under
- variable block size condition.
- * fhandler_tape.cc: Various formatting changes.
- (TAPE_FUNC): New macro. Use throughout as tape function loop.
- (get_ll): Convert into macro.
- (IS_EOM): New macro.
- (IS_EOF): New macro.
- (fhandler_dev_tape::is_eom): Use IS_EOM macro.
- (fhandler_dev_tape::is_eof): Use IS_EOF macro.
- (fhandler_dev_tape::write_file): New method.
- (fhandler_dev_tape::read_file): New method.
- (fhandler_dev_tape::open): Get drive information block here once.
- (fhandler_dev_tape::lseek): Remove unneeded duplicate code.
- (fhandler_dev_tape::dup): Duplicate drive information block.
- (fhandler_dev_tape::ioctl): Remove drvbuf in variable block size mode.
- Return ERROR_INVALID_BLOCK_LENGTH instead of ERROR_MORE_DATA if
- buffer contains data which would get lost on buffer size changing.
- Use absolute tape positioning also if drive only supports logical
- block positioning.
- (fhandler_dev_tape::tape_error): New method, created from former
- static function.
- (fhandler_dev_tape::tape_get_pos): Allow logical block reporting.
- Workaround tape driver bug.
- (fhandler_dev_tape::_tape_set_pos): Reset device buffer and flags
- after successful repositioning.
- (fhandler_dev_tape::tape_set_pos): Allow logical block positioning.
- Workaround tape driver bug.
- (fhandler_dev_tape::tape_erase): Use dp instead of calling
- GetTapeParameters.
- (fhandler_dev_tape::tape_prepare): Ditto.
- (fhandler_dev_tape::tape_get_blocksize): Remove.
- (fhandler_dev_tape::tape_set_blocksize): Don't call tape_get_blocksize.
- Error handling already done in fhandler_dev_tape::ioctl.
- (fhandler_dev_tape::tape_status): Remove local `dp' variable.
- Accommodate logical tape reporting. Call tape_get_feature instead
- of accessing feature words directly.
- (fhandler_dev_tape::tape_compression): Use dp instead of calling
- GetTapeParameters. Fix resetting datcompression.
-
-2004-03-12 Christopher Faylor <cgf@redhat.com>
-
- * wait.cc (wait4): Initialize pointer on entry. Avoid calling
- call_signal_handler twice since that guarantees exiting with errno set
- to EINTR.
-
-2004-03-12 Corinna Vinschen <corinna@vinschen.de>
-
- * exceptions.cc (sigpacket::process): Simplify code slightly.
-
-2004-03-11 Christopher Faylor <cgf@redhat.com>
-
- * cygtls.h (waitq): Declare structure here.
- (_cygtls::wq): Declare.
- * cygtls.cc (_cygtls::fixup_after_fork): Clear wq.thread_ev to avoid
- using an invalid event handle in forked process.
- * dcrt0.cc (waitq_storage): Delete.
- (threadstuff): Remove waitq_storage.
- * perthread.h (per_thread_waitq): Delete.
- (waitq_storage): Delete declaration.
- * sigproc.cc (sigproc_init): Remove perthread waitq consideration.
- * sigproc.h (waitq): Delete declaration.
- * wait.cc (wait4): Use _my_tls waitq structure rather than per_thread.
-
-2004-03-11 Pierre Humblet <pierre.humblet@ieee.org>
-
- * cygtls.h (_cygtls::newmask): Delete member.
- (_cygtls::deltamask): New member.
- * gendef (_sigdelayed): Replace the call to set_process_mask by a call
- to set_process_mask_delta.
- * exceptions.cc (handle_sigsuspend): Do not filter tempmask. Or
- SIG_NONMASKABLE in deltamask as a flag.
- (_cygtls::interrupt_setup): Set deltamask only.
- (set_process_mask_delta): New function.
- (_cygtls::call_signal_handler): Replace the first call to
- set_process_mask by a call to set_process_mask_delta.
- * tlsoffsets.h: Regenerate.
-
-2004-03-11 Christopher Faylor <cgf@redhat.com>
-
- * cygtls.cc (_cygtls::fixup_after_fork): Remove unneeded setting of
- oldmask.
- * exceptions.cc: Remove some __I386__ conditionals.
- (handle_exceptions): Move ppid test to outside of a loop for
- efficiency.
- (setup_handler): Make debugging output more wordy.
- (_cygtls::call_signal_handler): To avoid a race, use lock/unlock to
- synchronize with signal thread and ensure that signal_arrived event has
- actually been set.
- * gendef (_sigfe): Use ebx for all sigstack manipulations to ensure
- that the register is saved. Move setting of incyg to within stack lock
- to avoid setup_handler confusion.
- (_sigbe): Use ebx for all sigstack manipulations to ensure that the
- register is saved.
- (_cygtls::pop): Ditto.
- (_cygtls::lock): Ditto.
- (stabilize_sig_stack): Ditto.
- (setjmp): Ditto.
- (longjmp): Ditto.
-
-2004-03-08 Jaakko Hyvatti <jaakko.hyvatti@iki.fi>
-
- * fhandler_serial.cc (fhandler_serial::ioctl): Implement TIOCSBRK and
- TIOCCBRK.
- * include/sys/termios.h: Define TIOCSBRK and TIOCCBRK.
-
-2004-03-08 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (setup_handler): Avoid suspending a thread if it is in
- a cygwin function, in an exception, spinning, or locked.
- * gendef (_sigfe): Move incyg setting earlier.
- (sigreturn): Set incyg flag to avoid interrupting called cygwin
- functions.
- (sigdelayed): Ditto.
- (stabilize_sig_stack): Ditto.
-
- * sigproc.cc (proc_subproc): Don't restore process lock early in exec
- case.
-
- * cygtls.h: Reorganize fields in _cygtls slightly.
- * tlsoffsets.h: Regenerate.
-
-2004-03-06 Christopher Faylor <cgf@redhat.com>
-
- * fork.cc (fork_parent): Save parent pid in a temporary variable since
- child could conceivably exit before function returns, rendering the
- child's shared memory area invalid.
-
- * cygtls.h (_cygtls::incyg): Declare new field.
- (_cygtls::in_exception): Define new function.
- * exceptions.cc (setup_handler): Remove locked flag. Use 'incyg' flag
- and in_exception function to determine when we're in a cygwin function.
- (_cygtls::call_signal_handler): Decrement incyg flag prior to calling a
- handler. Increment it on return.
- * gendef (_sigfe): Increment incyg flag. Use testl for zero testing
- rather than orl, for consistency.
- (_sigbe): Decrement incyg flag. Use testl for zero testing rather than
- orl, for consistency.
- (_cygtls::pop): Use testl for zero testing rather than orl, for
- consistency.
- (stabilize_sig_stack): Ditto.
-
- * tlsoffsets.h: Regenerate.
-
-2004-03-05 Christopher Faylor <cgf@redhat.com>
-
- * gendef (sigdelayed): Handle return here rather than going through
- sigbe to ensure that flags are properly restored.
-
-2004-03-04 Thomas Pfaff <tpfaff@gmx.net>
-
- * include/pthread.h (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): New
- define.
- (PTHREAD_NORMAL_MUTEX_INITIALIZER_NP): Ditto.
- (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Ditto.
- * thread.cc (pthread_mutex::is_good_initializer): Check for all
- posssible initializers
- (pthread_mutex::is_good_initializer_or_object): Ditto.
- (pthread_mutex::is_good_initializer_or_bad_object): Ditto.
- (verifyable_object_isvalid): Support up to three static initializers.
- (verifyable_object_isvalid (void const *,long)): Remove.
- (pthread_cond::is_good_initializer_or_bad_object): Remove unneeded
- objectState var.
- (pthread_cond::init): Condition remains unchanged when creation has
- failed.
- (pthread_rwlock::is_good_initializer_or_bad_object): Remove unneeded
- objectState var.
- (pthread_rwlock::init): Rwlock remains unchanged when creation has
- failed.
- (pthread_mutex::init): Remove obsolete comment. Mutex remains
- unchanged when creation has failed. Add support for new initializers.
- (pthread_mutex_getprioceiling): Do not create mutex, just return
- ENOSYS.
- (pthread_mutex_lock): Simplify.
- (pthread_mutex_trylock): Remove unneeded local themutex.
- (pthread_mutex_unlock): Just return EPERM if mutex is not initialized.
- (pthread_mutex_setprioceiling): Do not create mutex, just return
- ENOSYS.
- * thread.h (verifyable_object_isvalid): Support up to three static
- initializers.
- (verifyable_object_isvalid (void const *,long)): Remove prototype.
- (pthread_mutex::init): Add optional initializer to parameter list.
-
-2004-03-03 Christopher Faylor <cgf@redhat.com>
-
- * gendef (sigreturn): Call stabilize_sig_stack to ensure that there are
- no pending signals. Restore edx later.
- (sigdelayed): Save edx earlier.
-
- * malloc_wrapper.cc (malloc_init): Add some more debugging output.
-
-2004-03-02 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_raw.cc (fhandler_dev_raw::raw_read): When reading with
- variable block size, read only one block, read directly into user
- supplied buffer, return ENOMEM if user supplied buffer is smaller
- than size of next block to read. Use read2 instead of bytes_to_read
- to count number of bytes read.
- * fhandler_tape.cc (fhandler_dev_tape::open): Add debug output.
-
-2004-02-26 Brian Ford <ford@vss.fsi.com>
-
- * miscfuncs.cc (check_invalid_virtual_addr): Assure the last page
- in the range is always tested. Add appropriate const.
- * mmap.cc (mmap_record::alloc_fh): Remove unused static path_conf object.
-
-2004-02-25 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (setup_handler): Signal event for any sigwaitinfo, if it
- exists, to force signal to be handled. Zero event here to prevent
- races.
- * signal.cc (sigwaitinfo): Use local handle value for everything since
- signal thread could zero event element at any time. Detect when
- awaking due to thread not in mask and set return value and errno
- accordingly. Don't set signal number to zero unless we've recognized
- the signal.
- * sigproc.cc (sigq): Rename from sigqueue throughout.
-
- * thread.cc (pthread::join): Handle signals received while waiting for
- thread to terminate.
-
-2004-02-25 Christopher Faylor <cgf@redhat.com>
-
- * cygwin.din: Export sighold, sigqueue.
- * exceptions.cc (sighold): Define new function.
- * signal.cc (handle_sigprocmask): Set correct errno for invalid signal.
- Simplify debugging output.
- (sigqueue): Define new function.
- * include/cygwin/signal.h (sighold): Declare new function.
- (sigqueue): Ditto.
- * include/cygwin/version.h: Bump API minor version number.
- * include/limits.h (TIMER_MAX): Define.
- (_POSIX_TIMER_MAX): Ditto.
-
-2004-02-25 Brian Ford <ford@vss.fsi.com>,
- Corinna Vinschen <corinna@vinschen.de>
-
- * miscfuncs.cc (check_invalid_virtual_addr): New function.
- * winsup.h (check_invalid_virtual_addr): Declare.
- * mmap.cc (munmap): Call check_invalid_virtual_addr instead of
- IsBadReadPtr.
-
-2004-02-24 Christopher Faylor <cgf@redhat.com>
-
- * gendef (stabilize_sig_stack): Correctly align this pointer for call
- to _cygtls::call_signal_handler.
- * gentls_offsets: Output sizeof field.
- * tlsoffsets.h: Regenerate.
-
-2004-02-24 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (_dll_crt0): Don't check sync_startup if threadfunc_ix is set.
-
- * external.cc (cygwin_internal): Implement CW_GET_BINMODE.
- * include/sys/cygwin.h: Declare CW_GET_BINMODE.
-
-2004-02-24 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (_dll_crt0): Add some stern internal errors.
-
-2004-02-24 Corinna Vinschen <corinna@vinschen.de>
-
- * thread.cc (pthread::cancelable_wait): Rearrange slightly.
- Add do_sig_wait parameter. Wait for signal_arrived if set to true.
- Return WAIT_SIGNALED if signal arrived.
- (pthread_cond::wait): Accommodate change to pthread::cancelable_wait.
- (pthread::join): Ditto.
- (semaphore::_timedwait): Ditto.
- (semaphore::_wait): Ditto. Change to return int to allow status
- feedback.
- (semaphore::wait): Return return value from semaphore::_wait.
- * thread.h (WAIT_SIGNALED): New definition.
- (pthread::cancelable_wait): Change declaration. Define do_sig_wait
- as false by default to not interfere with existing calls accidentally.
- (semaphore::_wait): Declare int.
-
-2004-02-21 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (sigpacket::process): Make sure that tls is filled in
- for SIGSTOP condition.
- (_cygtls::call_signal_handler): Restore signal mask using saved oldmask
- rather than current oldmask.
-
-2004-02-20 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (conv_path_list): Return error condition.
- (copy1): New function.
- (copyenc): New function.
- (mount_item::fnmunge): Return error condition. Use new functions to
- copy strings.
- (mount_item::build_win32): Ditto.
- (mount_info::conv_to_win32_path): Return error condition.
- (cygwin_conv_to_posix_path): Return result of path conversion.
- (cygwin_conv_to_full_posix_path): Ditto.
- (return_with_errno): New macro.
- (cygwin_win32_to_posix_path_list): Use new macro to potentially set
- errno.
- (cygwin_posix_to_win32_path_list): Ditto.
- * path.h (mount_item::fnmunge): Add size argument.
- (mount_item::build_win32): Ditto.
-
-2004-02-20 Corinna Vinschen <corinna@vinschen.de>
-
- * getopt.c: Avoid useless compiler warnings.
-
-2004-02-20 Corinna Vinschen <corinna@vinschen.de>
-
- * getopt.c: Replace with latest vanilla(!) OpenBSD version 1.16.
-
-2004-02-18 Christopher Faylor <cgf@redhat.com>
-
- * fork.cc (fork_child): Invert sense of test which defeated correct
- handling in a fork from a non-main thread.
-
- * dcrt0.cc (initial_env): Eliminate parameter and just send DebugBreak
- when appropriate.
- (dll_crt0_0): Reflect parameter change to initial_env.
- (dll_crt0_1): Don't call initial_env.
-
-2004-02-18 Christopher Faylor <cgf@redhat.com>
-
- * gendef (stabilize_sig_stack): New function.
- (setjmp): Import, add sig stack handling. Store sig stack info.
- (longjmp): Call stabilize_sig_stack. Restore sig stack info.
- * config/i386/setjmp.c: Remove.
-
-2004-02-17 Corinna Vinschen <corinna@vinschen.de>
-
- * fork.cc (fork_child): Move fixup_shms_after_fork so that
- signal_arrived is initialized when calling it.
-
-2004-02-17 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (clean): Clean libserver, too.
-
- * fhandler.cc (fhandler_base::~fhandler_base): Remove path_conv cleanup.
- * syscalls.cc (chroot): Ditto.
- * path.cc (path_conv::~path_conv): Define new destructor.
- (conv_path_list_buf_size): Remove explicit path_conv cleanup.
- * path.h (path_conv::~path_conv): Declare new destructor.
-
-2004-02-16 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Compile flock.o with -fomit-frame-pointer.
-
-2004-02-16 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Compile dlfcn.o with -fomit-frame-pointer.
-
-2004-02-16 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Compile delqueue.o with -fomit-frame-pointer.
-
-2004-02-16 Pierre Humblet <pierre.humblet@ieee.org>
-
- * syscalls.cc (rename): Do not test the MoveFile error code
- where MoveFileEx exists.
-
-2004-02-15 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.cc (_csbrk): Report more debugging details on failing
- condition.
-
-2004-02-14 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Compile syscalls.o with -fomit-frame-pointer.
-
- * sigproc.cc: Eliminate unused variable.
-
-2004-02-14 Corinna Vinschen <corinna@vinschen.de>
-
- * getopt.c: Replace with latest NetBSD version 1.16. Keep Cygwin
- specific changes as minimal as possible.
-
-2004-02-13 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (proc_subproc): Change warning back to silent debug
- output.
-
-2004-02-13 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (alloc_stack_hard_way): Revert to previous implementation.
- (alloc_stack): Ditto.
- * exceptions.cc (ctrl_c_handler): Add debugging output.
-
-2004-02-13 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (clean): Remove sigfe.s.
- (sigfe.s): Ensure that sigfe.s will be regenerated if it does not exist.
- * dll_init.cc (dll_dllcrt0): Simplify initializing tests.
-
- * exceptions.cc (setup_handler): Detect when stub caller is either
- spinning or has acquired the lock after being suspended to avoid
- windows problems with suspending a win32 API call.
-
- * cygtls.h (_cygtls::spinning): Declare new element.
- * gendef: Remove unused _siglist_index and _siglist declaration.
- (_sigfe): Set spinning element when potentially looping, waiting for lock.
- (_sigbe): Ditto.
- (_cygtls::lock): Ditto.
- (_longjmp): Ditto.
- * tlsoffsets.h: Regenerate.
- * pinfo.cc (_pinfo::exit): Set final exit state here. Call sigproc_terminate if
- invoked with 'norecord'. Clear any residual _cygtls stuff.
- * winsup.h (exit_states): Define ES_FINAL.
- * spawn.cc (spawn_guts): Don't call proc_terminate specifically when
- execing. Let _pinfo::exit handle that case.
-
- * sigproc.cc (wait_subproc): Always exit loop early when proc_loop_wait.
-
- * init.cc (munge_threadfunc): Eliminate unused argument.
- (dll_entry): Reflect above change in call to munge_threadfunc.
-
-2004-02-11 Christopher Faylor <cgf@redhat.com>
-
- * gendef (_sigbe): Zero location on pop.
- (_cygtls::pop): Ditto.
-
-2004-02-11 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (alloc_stack_hard_way): Eliminate second argument.
- (alloc_stack): Remove use of 'b' throughout.
-
-2004-02-11 Christopher Faylor <cgf@redhat.com>
-
- Rename _threadinfo to _cygtls, throughout.
- * cygtls.h (_cygtls::call_signal_handler): Rename from
- call_signal_handler_now.
- (_cygtls::push): Make second argument mandatory.
- (_cygtls::fixup_after_fork): Declare new function.
- (_cygtls::lock): Ditto.
- * cygtls.cc (_cygtls::fixup_after_fork): Define new function.
- * dcrt0.cc (cygwin_finished_initializing): Define as bool.
- (alloc_stack): Use _tlstop rather than arbitrary variable in probably
- vain attempt to avoid strange fork problem on CTRL-C.
- (dll_crt0_0): Remove obsolete winpids::init call.
- * dll_init.cc (dll_dllcrt0): Detect forkee condition as equivalent to
- initializing.
- * winsup.h (cygwin_finished_initializing): Declare as bool.
- * exceptions.cc (handle_exceptions): Rely on
- cygwin_finished_initializing to determine how to handle exception
- during process startup.
- (_cygtls::call_signal_handler): Rename from call_signal_handler_now.
- (_cygtls::interrupt_now): Fill in second argument to push.
- (signal_fixup_after_fork): Eliminate.
- (setup_handler): Initialize locked to avoid potential inappropriate
- unlock. Resume thread if it has acquired the stack lock.
- (ctrl_c_handler): Just exit if ctrl-c is hit before cygiwn has finished
- initializing.
- * fork.cc (sync_with_child): Don't call abort since it can cause exit
- deadlocks.
- (sync_with_child): Change debugging output slightly.
- (fork_child): Set cygwin_finished_initializing here. Call _cygtls fork
- fixup and explicitly call sigproc_init.
- (fork_parent): Release malloc lock on fork failure.
- (vfork): Call signal handler via _my_tls.
- * sigproc.cc (sig_send): Ditto.
- * syscalls.cc (readv): Ditto.
- * termios.cc (tcsetattr): Ditto.
- * wait.cc (wait4): Ditto.
- * signal.cc (nanosleep): Ditto.
- (abort): Ditto.
- (kill_pgrp): Avoid killing self if exiting.
- * sync.cc (muto::acquire): Remove (temporarily?) ill-advised
- exiting_thread check.
- * gendef (_sigfe): Be more agressive in protecting stack pointer from
- other access by signal thread.
- (_cygtls::locked): Define new function.
- (_sigbe): Ditto.
- (_cygtls::pop): Protect edx.
- (_cygtls::lock): Use guaranteed method to set eax to 1.
- (longjmp): Aggressively protect signal stack.
- * miscfuncs.cc (low_priority_sleep): Reduce "sleep time" for secs == 0.
- * pinfo.cc (winpids::set): Counterintuitively use malloc's lock to
- protect simultaneous access to the pids list since there are
- pathological conditions which can cause malloc to call winpid.
- (winpids::init): Eliminate.
- * pinfo.h (winpids::cs): Eliminate declaration.
- * pinfo.h (winpids::init): Eliminate definition.
-
-2004-02-11 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (get_nt_object_attribute): Fix error handling.
-
-2004-02-09 Ralf Habacker <ralf.habacker@freenet.de>
-
- * fhandler_socket.cc (fhandler_socket::ioctl): Add FIONREAD handling.
-
-2004-02-08 Christopher Faylor <cgf@redhat.com>
-
- * debug.h (console_printf): Define for non-debugging condition.
-
- * cygtls.h (_threadinfo::lock): Remove wait argument.
- (_threadinfo::interrupt_setup): Remove retaddr argument.
- * exceptions.cc (_threadinfo::interrupt_setup): Ditto.
- (_threadinfo::interrupt_now): Accommodate change to interrupt_setup
- argument.
- (setup_handler): Ditto. Always lock sig stack prior to determining
- interrupt method.
- * gendef (_sigfe): Correct thinko regarding cmpxchg.
- (_sigbe): Ditto.
- (_threadinfo::lock): Ditto.
- (_threadinfo::pop): Eliminate left-over stack unlock.
- * sigproc.cc (proc_subproc): Change debugging output to printed
- warning.
-
-2004-02-08 Christopher Faylor <cgf@redhat.com>
-
- * localtime.cc (localtime_r): Call tzset.
-
- * Makefile.in: Make version.h/cygwin.din version check a warning since
- it is not foolproof.
-
- * cygheap.h (CYGHEAPSIZE): Bump size down.
-
- * cygtls.h (_threadinfo::stacklock): New element.
- (_threadinfo::pop): Make regparm.
- (_threadinfo::lock): New function.
- (_threadinfo::unlock): New function.
- * cygtls.cc (_threadinfo::push): Wait for a lock on the stack before
- performing the operation.
- (_threadinfo::pop): Move to another file.
- * cygwin.din: More SIGFE changes.
- * exceptions.cc (try_to_debug): Always display messages on console.
- (handle_exceptions): Unwind stack only when actually about to call
- sig_send.
- (setup_handler): Lock stack prior to performing any operations.
- * gendef (_sigfe): Ditto.
- (_sigbe): Ditto.
- (_threadinfo::pop): Ditto. Move here.
- * gen_tlsoffsets: Generate positive offsets.
- * tlsoffsets.h: Regenerate.
-
-2004-02-06 Corinna Vinschen <corinna@vinschen.de>
-
- * cygserver.h (CYGWIN_SERVER_VERSION_API): Bump.
- * cygserver_ipc.h (struct proc): Add signal_arrived member.
- (ipc_set_proc_info): Inititalize blk.signal_arrived.
-
-2004-02-06 Pierre Humblet <pierre.humblet@ieee.org>
-
- * uinfo.cc (cygheap_user::init): Use sec_user_nih to build a
- security descriptor. Set both the process and the default DACLs.
- * fork.cc (fork_parent): Use sec_none_nih security attributes.
- * spawn.cc (spawn_guts): Ditto.
-
-2004-02-05 Christopher Faylor <cgf@redhat.com>
-
- * cygwin.din: Make many more functions SIGFE.
- * include/cygwin/version.h (CYGWIN_VERSION_SHARED_DATA): Bump.
-
-2004-02-05 Pierre Humblet <pierre.humblet@ieee.org>
-
- * security.h (SID): New macro.
- (well_known_*_sid): Change type to cygpsid.
- (cygsid::init): Delete declaration.
- * sec_helper.cc (well_known_*_sid): Define using above SID macro.
- (cygsid::init): Delete.
- * dcrt0.cc (dll_crt0_0): Do not call cygsid::init.
- * security.cc (get_user_local_groups): Change the second argument type
- to cygpsid.
-
-2004-02-03 Christopher Faylor <cgf@redhat.com>
-
- * cygtls.h (_local_storage::signamebuf): Increase size to prevent
- overflow on really odd values.
- * tlsoffsets.h: Regenerate.
-
-2004-02-03 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (DLL_OFILES): Add strsig.o.
- * cygtls.h (_local_storage::signamebuf): New element.
- * sysconf.cc (sysconf): Implement _SC_RTSIG_MAX.
- * tlsoffsets.h: Regenerate.
- * include/limits.h (_POSIX_RTSIG_MAX): New define.
- (RTSIG_MAX): Ditto.
- * include/cygwin/signal.h (SIGRTMIN): New define.
- (SIGRTMAX): Ditto.
- (NSIG): Bump.
- * strsig.cc: New file.
-
-2004-02-03 Jason Tishler <jason@tishler.net>
-
- * window.cc (Winmain): Show windows error code in error output when
- RegisterClass fails.
-
-2004-02-02 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.h (*::fixup_after_exec): Eliminate unused handle argument.
- * fhandler.h (dtable::fixup_after_exec): Eliminate unused handle
- argument.
- * dcrt0.cc (dll_crt0_1): Reflect elimination of unused handle argument
- to fixup_after_exec.
- * dtable.cc (dtable::fixup_after_exec): Ditto.
- * fhandler_console.cc (fhandler_console::fixup_after_exec): Ditto.
- * fhandler_dsp.cc (fhandler_dsp::fixup_after_exec): Ditto.
- * fhandler_raw.cc (fhandler_raw::fixup_after_exec): Ditto.
- * fhandler_socket.cc (fhandler_socket::fixup_after_exec): Ditto.
- * fhandler_virtual.cc (fhandler_virtual::fixup_after_exec): Ditto.
- * pipe.cc (fhandler_pipe::fixup_after_exec): Ditto.
-
-2004-02-02 Pierre Humblet <pierre.humblet@ieee.org>
-
- * spawn.cc (spawn_guts): Do not set ciresrv.parent.
- * child_info.h (child_info_spawn::~child_info_spawn): Do not close
- parent. Update CURR_CHILD_INFO_MAGIC.
- * dcrt0.cc (dll_crt0_0): Do not close spawn_info->parent. Pass NULL to
- cygheap->fdtab.fixup_after_exec().
-
-2004-02-02 Christopher Faylor <cgf@redhat.com>
-
- Throughout, change name from set_inheritance to set_no_inheritance to
- better reflect input arguments of this function.
-
- * cygheap.h (CYGHEAPSIZE): Increase size of cygheap to something closer
- to the 21st century.
-
-2004-02-02 Corinna Vinschen <corinna@vinschen.de>
-
- * cygerrno.h (set_errno): Replace semicolon with comma in non-DEBUGGING
- version to avoid compile time error.
-
-2004-02-01 Christopher Faylor <cgf@redhat.com>
-
- * cygerrno.h (set_errno): Set global errno whenever setting thread
- specific version.
- * debug.cc (__set_errno): Ditto.
-
- * exceptions.cc (handle_sigsuspend): Remove spurious
- sig_dispatch_pending call.
- (set_signal_mask): When there seem to be pending signals to dispatch,
- tell signal_dispatch_pending/sig_send not to specifically call any
- handlers.
- * sigproc.h (sig_dispatch_pending): Change declaration to void.
- * sigproc.cc (sig_dispatch_pending): Change definition to void. Take
- an argument to determine whether to tell sig_send to wait for handler
- to be called.
- * sigproc.cc (sig_send): Don't call signal handler when sig ==
- __SIGFLUSHFAST.
- (wait_sig): Honor __SIGFLUSHFAST. Guard against sigpacket::process
- nuking si_signo.
- * sigproc.h (__SIGFLUSHFAST): Define new special signal.
- (sig_dispatch_pending): Change declaration to void. Take optional
- boolean argument.
-
- * fork.cc (vfork): Add debugging output.
-
-2004-01-26 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (sig_handle_tty_stop): Avoid races by waiting for both
- signal_arrived and for sigCONT.
- (sigpacket::process): Enforce sending of both signal_arrived and
- sigCONT, where appropriate.
- * gendef (sigreturn): Save tls pointer in ebx so that it can jump into
- sigdelayed and use the same register.
-
-2004-01-26 Christopher Faylor <cgf@redhat.com>
-
- * cygtls.cc (_threadinfo::init_thread): Add more local reent stdio
- initialization.
- * dcrt0.cc (initial_env): Can it really be true that XP doesn't allow
- attaching a debugger during DLL attach? Add temporary workaround.
- (dll_crt0_0): Ensure that _impure_ptr stdio is initialized before any
- threads.
- (dll_crt0_1): Move _impure_ptr initialization to dll_crt0_0.
- * exceptions.cc (try_to_debug): Reinstate old method for looping while
- debugging.
- * syscalls.cc (_cygwin_istext_for_stdio): Regularize debugging output.
- Remove hopefully extraneous check.
- (setmode_helper): Add debugging output for improbable case. Use
- "binary" rather "raw" for consistency.
-
-2004-01-25 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.cc (fhandler_base::fhaccess): Avoid always setting errno to
- EACCESS when return value is < 0. Rely on errno being set properly.
-
-2004-01-25 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (proc_subproc): Don't protect *child's* handle.
-
-2004-01-24 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.h (fhandler_base::fhaccess): Return int for compatibility
- with access.
- * fhandler.cc (fhandler_base::fhaccess): Return int. Use consistent
- variable name for exit value. Exit at bottom, printing debugging
- information, like other cygwin functions.
-
-2004-01-23 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.cc (init_cygheap::close_ctty): Protect YA vforkism.
- * fhandler.h (fhandler_base::has_acls): Make pass through for path_conv
- method.
- (fhandler_base::isremote): Ditto.
- (fhandler_base::is_fs_special): Ditto.
- (fhandler_base::has_attribute): Ditto. Define new function.
- (fhandler_base::fhaccess): Declare new function based on access_worker.
- (fhandler_base::set_has_acls): Eliminate obsolete function.
- (fhandler_base::set_isremote): Ditto.
- * fhandler.cc (fhandler_base::fhaccess): Move from syscalls.cc and into
- fhandler_base class. Use fhandler methods to access data rather than
- path_conv stuff.
- (fhandler_base::device_access_denied): Use fhaccess method.
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Ditto.
- (fhandler_base::open_fs): Remove calls to obsolete functions.
- * fhandler_virtual.cc (fhandler_virtual::open): Ditto.
- * winsup.h (access_worker): Remove obsolete access_worker declaration.
- *syscalls.cc (access_worker): Move function to fhandler.cc.
- (access): Use fhaccess method.
-
- * pinfo.cc (_pinfo::set_ctty): Clarify debugging output.
- * sigproc.cc (sig_dispatch_pending): Ditto.
- * syscalls.cc (setsid): Perform minor rearrangement.
-
-2004-01-23 Pierre Humblet <pierre.humblet@ieee.org>
-
- * fhandler_socket.cc (fhandler_socket::create_secret_event): Avoid
- creating multiple handles. Always allow event inheritance but set the
- handle inheritance appropriately. Improve error handling.
- (fhandler_socket::check_peer_secret_event): Improve error handling.
- (fhandler_socket::close_secret_event): Simply call CloseHandle.
- (fhandler_socket::set_close_on_exec): Set secret event inheritance.
-
-2004-01-23 Christopher Faylor <cgf@redhat.com>
-
- * configure.in: Remove NEWVFORK default.
- * configure: Regenerate.
- * dcrt0.cc: Conditionalize vfork stuff throughout.
- * dtable.cc: Ditto.
- * perthread.h: Ditto.
- * pipe.cc (fhandler_pipe::close): Ditto.
- * spawn.cc (spawnve): Ditto.
- * syscalls.cc (setsid): Ditto.
- * exceptions.cc (sigpacket::process): Use macro to refer to vfork pid.
-
- * debug.cc (verify_handle): Define new function.
- * debug.h (VerifyHandle): Define new macro.
- (verify_handle): Declare new function
- * fhandler.cc (fhandler_base::dup): Verify that dup'ed handle is not
- supposed to be in use.
- (fhandler_base::set_inheritance): Ditto.
- (fhandler_base::fork_fixup): Ditto.
- * fhandler_socket.cc (fhandler_socket::dup): Ditto.
- * fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
- * net.cc (set_socket_inheritance): Ditto.
- * pinfo.cc (pinfo_fixup_after_exec): Ditto.
- * sigproc.cc (proc_subproc): Ditto.
- (sig_send): Ditto.
- * spawn.cc (spawn_guts): Ditto.
- * thread.cc (pthread::init_mainthread): Ditto.
- * pipe.cc (fhandler_pipe::close): Close read_state with
- ForceCloseHandle since it was protected.
- (fhandler_pipe::fixup_after_exec): Protect read_state handle.
- (fhandler_pipe::dup): Correctly close open handles on error condition.
- Verify that dup'ed handle is not supposed to be in use.
- (fhandler_pipe::create): Protect read_state.
-
-2004-01-23 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (sig_handle_tty_stop): Fix boneheaded mistake by using
- correct check for parent state rather than inverted check mistakenly
- introduced on 2003-09-15.
-
-2004-01-22 Brian Ford <ford@vss.fsi.com>
-
- * fhandler_serial.cc (fhandler_serial::raw_write): Prevent a deadlock
- when the input buffer overflows.
- (fhandler_serial::raw_read): Correct to print the actual error and only
- call PurgeComm when necessary.
-
-2004-01-22 Christopher Faylor <cgf@redhat.com>
-
- * dcrt0.cc (reent_data): Make global.
- * cygwin.din: Reexport reent_data.
-
-2004-01-22 Christopher Faylor <cgf@redhat.com>
-
- * cygtls.cc (_threadinfo::remove): Don't assume that we are removing
- _my_tls.
- * exceptions.cc (setup_handler): Improve debugging output.
- (call_signal_handler_now): Remove ill-advised debugger call.
- * sigproc.cc (sigcomplete_main): Delete.
- (sig_send): Honor FIXME and avoid using main thread's completion event
- for everything or suffer races.
- (pending_signals::add): Default stored mask to current process mask
- rather than mask at time of signal send.
- (wait_sig): Add debugging output.
- * sigproc.h (sigpacket::mask_storage): Delete.
-
-2004-01-22 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.cc (fhandler_base::open): Revert isfs change.
-
-2004-01-21 Christopher Faylor <cgf@redhat.com>
-
- * devices.in: Change raw com device to more correct form.
-
-2004-01-21 Christopher Faylor <cgf@redhat.com>
-
- * fhandler.cc (fhandler_base::open): Use major numbers rather than
- device numbers to control special behavior for devices which take
- units.
- * fhandler_raw.cc (fhandler_dev_raw::writebuf): Ditto.
- (fhandler_dev_raw::fstat): Ditto.
- (fhandler_dev_raw::open): Ditto.
- (fhandler_dev_raw::ioctl): Ditto.
-
-2004-01-21 Nicholas Wourms <nwourms@netscape.net>
-
- * signal.cc (sigaction): Fix if-statement typo.
-
-2004-01-21 Christopher Faylor <cgf@redhat.com>
-
- * cygtls.cc (handle_threadlist_exception): Change logic, improve
- debugging output.
-
-2004-01-21 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_tty.cc (fhandler_tty::ioctl): Semi-revert 2003-09-26 change
- for TIOCSWINSZ. It is not an error for ioctl_request_event to be
- missing.
-
-2004-01-20 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (pending_signals::save): New function.
- (pending_signals::restore): Ditto.
- (sig_clear): Save/restore current queue pointer.
- (wait_sig): Delete signals marked as such.
- * sigproc.h (__SIGDELETE): New enum.
-
-2004-01-20 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number to 8.
-
- * cygmalloc.h: Make more concessions to attempts to get debugging
- malloc working.
- * debug.h: Ditto.
- * dlmalloc.cc: Ditto.
- * dlmalloc.h: Ditto.
- * malloc_wrapper.cc: Ditto.
-
- * perthread.h (perthread::create): Use calloc to ensure zeroed memory.
-
-2004-01-20 Christopher Faylor <cgf@redhat.com>
-
- * sec_acl.cc (setacl): Make sure sd_ret is large enough.
-
-2004-01-19 Christopher Faylor <cgf@redhat.com>
-
- * sigproc.cc (sigproc_terminate): Don't close sendsig handle when
- execing since we're not closing what we think we're closing.
- (sig_send): Improve debugging when exiting due to no_signals_available.
-
- * wincap.h (wincaps::cant_debug_dll_entry): New element.
- * wincap.cc: Implement above element throughout.
- * dcrt0.cc (initial_env): Accommodate changes necessary to allow
- initial debugging for systems which do not allow debugging in
- dll_entry.
- (dll_crt0_0): Add initial_env call back here.
-
- * Makefile.in (install-man): Use mandir as target for installation.
-
-2004-01-19 Christopher Faylor <cgf@redhat.com>
-
- * include/cygwin/version.h: Bump DLL minor number to 7 (should have been
- done earlier).
-
-2004-01-19 Christopher Faylor <cgf@redhat.com>
-
- * cygwin/include/signal.h: Add copyright notice.
-
- * cygwin.din: Make clock SIGFE. Add clock_gettime, sigwaitinfo,
- timer_create, timer_delete, timer_settime.
- * include/cygwin/version.h: Reflect above additions.
- * fork.cc (fork_child): Call fixup_timers_after_fork.
- * signal.cc (sigwait): Remove unused variable.
- * timer.cc: New file.
- (clock_gettime): Define new function.
- (timer_tracker): Define new struct used by timer functions.
- (timer_tracker::timer_tracker): New function.
- (to_us): New function.
- (timer_thread): New function.
- (timer_tracker::settime): New function.
- (timer_create): New function.
- (timer_settime): New function.
- (timer_delete): New function.
- (fixup_timers_after_fork): New function.
- * cygthread.cc: Bump thread count.
-
-2004-01-17 Christopher Faylor <cgf@redhat.com>
-
- * signal.cc (sigwaitinfo): Define new function.
- (sigwait): Redefine based on sigwaitinfo.
- * include/cygwin/signal.h (sigwaitinfo): Declare.
- (sigwait): Ditto.
-
-2004-01-17 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (dtable::vfork_parent_restore): Avoid double close of ctty
- when ctty == ctty_on_hold.
-
-2004-01-16 Christopher Faylor <cgf@redhat.com>
-
- * cygtls.h (_threadinfo::threadkill): New element.
- (_threadinfo::set_threadkill): Declare new function.
- (_threadinfo::reset_threadkill): Declare new function.
- * dcrt0.cc (dcrt0_1): Call here so that it will be possible to attach
- to running process with #(*& Windows Me/9x.
- (initial_env): Try to initialize strace if uninitialized.
- * gendef: Don't zero signal if threadkill is set since that will happen
- in the called function.
- * signal.cc (sigwait): Ensure cleanup in error conditions.
- * sigproc.cc (sig_send): Clear packet mask storage.
- (wait_subproc): Fill in child exit code in siginfo_t structure.
- * thread.cc (pthread_kill): Set threadkill flag.
- * tlsoffsets.h: Regenerate.
-
-2004-01-16 Christopher Faylor <cgf@redhat.com>
-
- Throughout, use siginfo_t to fill out all signal information for
- "kernel" signals.
- * cygtls.h (_threadinfo::set_siginfo): Declare new function.
- * cygtls.cc (_threadinfo::set_siginfo): Define new function.
- * dcrt0.cc (do_exit): Accommodate siginfo_t considerations.
- * exceptions.cc (handle_exceptions): Ditto.
- (sig_handle_tty_stop): Ditto.
- (ctrl_c_handler): Use killsys() to send signal.
- (sigpacket::process): Rename from sig_handle. Use siginfo_t field from
- sigpacket for everything.
- (tty_min::kill_pgrp): Accommodate siginfo_t considerations.
- (fhandler_termios::bg_check): Ditto.
- * fhandler_tty.cc (fhandler_tty_slave::ioctl): Use killsys() to send signal.
- * signal.cc (kill_worker): Rewrite to use siginfo_t second argument.
- (kill_pgrp): Ditto.
- (kill0): Define new function pulled from kill().
- (kill): Rewrite as frontend to kill0.
- (killsys): Define new function.
- * sigproc.cc (sigelem): Eliminate.
- (sigpacket): Move to sigproc.h. Subsume sigelem.
- (pending_signals): Use sigpacket rather than sigelem for everything.
- (sig_clear): Ditto.
- (wait_sig): Ditto.
- (sig_send): Rewrite to use siginfo_t argument.
- (sig_send): New function wratpper to sig_send with siginfo_t argument.
- (wait_subproc): Accommodate siginfo_t considerations.
- * thread.cc (pthread_kill): Ditto.
- * sigproc.h (sigpacket): Move here.
- (sigpacket::process): Declare "new" function.
- (sig_handle): Eliminate declaration.
- (sig_send): Declare with new paramaters.
- (killsys): Declare new function.
- (kill_pgrp): Declare.
- * winsup.h: Move some signal-specific stuff to sigproc.h.
- * include/cygwin/signal.h: Tweak some siginfo_t stuff.
-
-2004-01-16 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_console.cc (fhandler_console::close): Remove obsolete test
- for vfork_cleanup.
- * pipe.cc (fhandler_pipe::close): Add comment.
-
-2004-01-16 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.cc (init_cygheap::close_ctty): Don't NULL ctty if it is still
- active.
-
-2004-01-16 Christopher Faylor <cgf@redhat.com>
-
- * dtable.cc (dtable::vfork_parent_restore): Store ctty_on_hold prior to
- calling close_all_files since it will be zeroed.
-
-2004-01-15 Christopher Faylor <cgf@redhat.com>
-
- * gentls_offsets: Reinstate unlink of temp files.
-
-2004-01-14 Christopher Faylor <cgf@redhat.com>
-
- * fhandler_console.cc (fhandler_console::close): Fix debugging output.
- (fhandler_console::fixup_after_fork): Decrement open_fhs prior to call
- to fhandler_console::open since this would cause incrementing too much
- incrementing in child processes. (Probably needs to be handled more
- elegantly someday)
- (fhandler_console::fixup_after_exec): Ditto.
-
-2004-01-14 Christopher Faylor <cgf@redhat.com>
-
- * cygtls.h (_threadinfo::call): Remove regparm declaration to work
- around compiler bug.
-
-2004-01-13 Christopher Faylor <cgf@redhat.com>
-
- * autoload.cc (TryEnterCriticalSection): Remove.
- * dcrt0.cc (dll_crt0_0): Delete inappropriate setting of
- _my_tls.stackptr to NULL since it has really bad consequences. Make
- 'si' an automatic variable.
-
-2004-01-13 Christopher Faylor <cgf@redhat.com>
-
- * cygtls.cc (_threadinfo::init_thread): Correct thinko which caused
- thread list to be allocated every time.
- * cygtls.h (CYGTLS_PADSIZE): Define as const int.
- * sync.h: Make multiple inclusion safe.
- (muto::next): Eliminate.
- (muto::exiting_thread): New variable.
- (muto::set_exiting_thread): New function.
- (new_muto): Change to use different section for mutos since c++ give
- inexplicable warning in some cases otherwise.
- (new_muto1): Ditto.
- * dcrt0.cc (do_exit): Call muto::set_exiting_thread here.
- * sync.cc (muto_start): Eliminate.
- (muto::acquire): Always give exiting thread a lock. Never give thread
- a lock if exiting.
- (muto::release): Ditto for releasing.
- * dtable.cc (dtable::init_lock): Unline function and define here.
- * dtable.h (lock_cs): Define as a muto since critical sections seem to
- work oddly on Windows Me.
- (lock): Accommodate switch to muto.
- (unlock): Ditto.
- * exceptions.cc (setup_handler): Don't worry about acquiring mutos
- since that hasn't mattered for a long time.
- (signal_exit): Ditto: muto stuff will be handled automatically on exit
- now.
-
-2004-01-12 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (DLL_IMPORTS): Link advapi32 to ensure proper DLL
- initialization.
- * autoload.cc (RegCloseKey): Arbitrarily choose this function as a
- "seed" to pull the advapi32 link library in. So, comment out the
- autoloading.
- * cygtls.cc (_threadinfo::init_thread): Just clear CYGTLS_PADSIZE.
- (_threadinfo::remove): Add debugging.
- (_threadinfo::find_tls): Ditto.
- * cygtls.h (_threadinfo::padding): Make zero length (for now?).
- * dcrt0.cc (dll_crt0_0): Move more initialization here from dll_crt0_1.
- (dll_crt0_1): See above.
- * dtable.h (dtable::lock): Remove commented out critical section
- locking.
- * dtable.h (dtable::init_lock): Remove commented out critical section
- locking.
- * dtable.h (dtable::unlock): Remove commented out critical section
- locking.
- * exceptions.cc (interruptible): bool'ize.
- * init.cc (threadfunc_fe): Revert to storing threadfunc at stack
- bottom.
- (munge_threadfunc): Ditto. Avoid adding overhead to
- calibration_thread.
- (prime_threads): Don't initialize tls stuff.
- (dll_entry): Make minor change to initialization order.
- * tlsoffsets.h: Regenerate.
-
- * sigproc.cc (wait_sig): Add sanity check for end of process thread
- exit.
-
- * select.h: Make minor formatting change.
-
-2004-01-10 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Add still more -fomit-frame-pointer functions.
- * dtable.h (dtable::lock): New function.
- (dtable::unlock): New function.
- (dtable::init_lock): New function.
- * cygheap.h (HEAP_TLS): Declare new enum value.
- (init_cygheap::threadlist): Declare new array.
- (init_cygheap::sthreads): Declare new variable.
- (cygheap_fdmanip::~cygheap_fdmanip): Use new dtable lock/unlock
- functions.
- (cygheap_fdnew::cygheap_fdnew): Ditto.
- (cygheap_fdget::cygheap_fdget): Ditto.
- * dtable.cc (dtable_init): Initialize fdtab critical section.
- (dtable::fixup_after_fork): Ditto.
- (dtable::fixup_after_exec): Ditto.
- (dtable::dup2): Use lock/unlock calls to protect access to fdtab.
- (dtable::find_fifo): Ditto.
- (dtable::fixup_before_fork): Ditto.
- (dtable::fixup_before_exec): Ditto.
- (dtable::set_file_pointers_for_exec): Ditto.
- (dtable::vfork_child_dup): Ditto.
- (dtable::vfork_parent_restore): Ditto.
- * syscalls.cc (close_all_files): Ditto.
- * sync.h (muto::acquired): Declare new function.
- (new_muto1): Declare new macro used to specify name of muto storage.
- * sync.cc (muto::acquired): Define new function.
-
- * cygthread.cc (cygthread::stub): Remove signal chain removal call
- since it is handled during initialization now.
- * cygthread.cc (cygthread::simplestub): Remove signal chain removal
- call since it is handled during initialization now.
- * cygtls.cc (sentry): New class used for locking. Use throughout.
- (_threadinfo::reset_exception): Don't pop stack.
- (_threadinfo::find_tls): Move from exceptions.cc.
- (_threadinfo::init_thread): Initialize array of threads rather than
- linked list. Take second argument indicating thread function for this
- thread.
- (_threadinfo::remove): Search thread array rather than linked list.
- Use sentry to lock. Only unlock if we got the lock.
- (_threadinfo::find_tls): Ditto for first two.
- (handle_threadlist_exception): Handle exceptions when manipulating the
- thread list in case of premature thread termination.
- (_threadinfo::init_threadlist_exceptions): Ditto.
- * cygtls.h (TLS_STACK_SIZE): Decrease size.
- (_threadinfo::padding): Add element to avoid overwriting lower part of
- stack.
- (_threadinfo::remove): Add a "wait" argument to control how long we
- wait for a lock before removing.
- * exceptions.cc (init_exception_handler): Make global. Take argument
- to control exception handler being set.
- (ctrl_c_handler): Wait forever when removing self from signal chain.
- (_threadinfo::find_tls): Move to cygtls.cc.
- (sig_handle): Reorganize detection for thread-specific signals.
- * heap.cc (heap_init): Rework slightly. Make fatal error more verbose.
- Remove malloc initialization since it can't happen during dll attach.
- * init.cc (search_for): Move address to search for on stack here.
- (threadfunc_ix): Ditto for stack offset. Make shared so that stack
- walk potentially only has to be done once when cygwin processes are
- running.
- (threadfunc_fe): Use standard tls to store thread function (may change
- back later).
- (calibration_thread): New function. Potentially called to find
- threadfunc_ix.
- (munge_threadfunc): Search for "search_for" value on stack. Output
- warning when thread func not found on stack. Use standard tls to store
- thread function.
- (prime_threads): New function. Called to prime thread front end.
- (dll_entry): Call dll_crt0_0 here when DLL_PROCESS_ATTACH. Call
- prime_threads here. Try to remove thread from signal list here.
- * sigproc.cc (wait_sig): Initialize threadlist exception stuff here.
- * thread.cc (pthread::exit): Pass argument to signal list remove
- function.
- * thread.h: Remove obsolete *ResourceLock defines.
-
- * tlsoffsets.h: Regenerate.
-
- * winsup.h (spf): Define temporary debug macro to be deleted later.
-
- * dcrt0.cc (dll_crt0_0): New function, called during DLL
- initialization. Mainly consists of code pulled from dll_crt0_1.
- (dll_crt0_1): See above.
- (_dll_crt0): Wait for initial calibration thread to complete, if
- appropriate. Move some stuff to dll_crt0_0.
- (initialize_main_tls): Accommodate argument change to
- _thread_info::init_thread.
- * fork.cc (fork_child): Ditto.
- (sync_with_child): Fix debug message.
- * external.cc (cygwin_internal): Remove special considerations for
- uninitialized dll since initialization happens during dll attach now.
-
- * dlfcn.cc (dlopen): Remove obsolete *ResourceLock calls.
- (dlclose): Ditto.
-
-2004-01-05 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.h (init_cygheap::close_ctty): Declare new function.
- * cygheap.cc (init_cygheap::close_ctty): Define new function.
- * syscalls.cc (close_all_files): Use close_ctty.
- (setsid): Ditto.
-
- * cygthread.cc (cygthread::stub): Remove exception initialization.
- * cygthread.cc (cygthread::stub): Remove exception initialization.
- (cygthread::simplestub): Ditto.
- * thread.cc (pthread::thread_init_wrapper): Ditto.
- * cygtls.cc (_last_thread): Make static.
- (_threadinfo::call2): Initialize exception handler here.
- (_threadinfo::find_tls): Move here.
- * exceptions.cc (_threadinfo::find_tls): Move.
-
- * dcrt0.cc (__api_fatal): Add prefix info to message here rather than
- including it in every call to function.
- * winsup.h (api_fatal): Accommodate above change.
- * debug.cc (add_handle): Don't do anything if cygheap not around.
- (mark_closed): Ditto.
-
- * dll_init.cc (dll_list::detach): Fix debug output.
- * fork.cc (sync_with_child): Ditto.
- (vfork): Improve debug output.
- * heap.cc (heap_init): Ditto.
-
- * exceptions.cc (try_to_debug): Clarify message when debugger attaches.
-
-2004-01-03 Christopher Faylor <cgf@redhat.com>
-
- * exceptions.cc (_threadinfo::interrupt_now): Avoid double call to
- sigdelayed.
- * pinfo.cc (_pinfo::commune_send): Avoid inexplicable test which caused
- most pids to be shown as "<defunct>" on Win9x.
-
-2004-01-02 Christopher Faylor <cgf@redhat.com>
-
- * cygheap.h (init_cygheap): Play more vfork shell games and move
- ctty_on_hold and open_fhs_on_hold (back) here.
- * dcrt0.cc (_dll_crt0): Just set impure_ptr_ptr here and let later
- initialization deal with tls.
- * dtable.cc (dtable::vfork_child_fixup): Move ctty considerations here.
- (dtable:vfork_parent_restore): And here.
- * fork.cc (vfork): Reflect change to ctty handling.
- * perthread.h (vfork_save::fhctty): Eliminate.
-
- * cygwin.din: Make more exports NOSIGFE that will never be interrupted
- by a signal.
-
- * init.cc (dll_entry): Set stackptr to NULL to catch problems earlier.
diff --git a/winsup/cygwin/ChangeLog-2005 b/winsup/cygwin/ChangeLog-2005
deleted file mode 100644
index a44ab58..0000000
--- a/winsup/cygwin/ChangeLog-2005
+++ /dev/null
@@ -1,5813 +0,0 @@
-2005-12-31 Corinna Vinschen <corinna@vinschen.de>
-
- * syslog.cc (vsyslog): Decrement len if trailing \n has been removed.
- Add \n when writing to stderr if LOG_PERROR option is set.
-
-2005-12-31 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/in.h: Drop including stdint.h. Move definition
- of in_port_t and in_addr_t to top of file and use throughout. Use
- sa_family_t type where appropriate.
- (struct in6_addr): Change `unsigned char' to `uint8_t'.
- (struct sockaddr_in6): Add sin6_scope_id member. Add comments.
- * include/cygwin/socket.h: Include stdint.h. Move definition of
- socklen_t to top of file. Define sa_family_t. Define struct
- sockaddr_storage as per SUSv3.
- * include/sys/un.h: Include cygwin/socket.h. Use sa_family_t type.
-
-2005-12-29 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_tty.cc (fhandler_tty_common::__acquire_output_mutex): Use
- strace method rather than accessing field directly.
- (fhandler_tty_common::__release_output_mutex): Ditto.
-
-2005-12-29 Christopher Faylor <cgf@timesys.com>
-
- * child_info.h (CURR_CHILD_INFO_MAGIC): Reset.
- (child_info::dwProcessId): Delete.
- (child_info::straced): New variable.
- (child_info::handle_fork): New member function.
- * dcrt0.cc (in_forkee): New global variable.
- (__cygwin_user_data::forkee): Mark as obsolete.
- (do_global_ctors): Use in_forkee rather than user_data->forkee.
- (get_cygwin_startup_info): Ditto. Deal with new straced field to allow
- strace to deal with children of attached processes.
- (initial_env): Accommodate changes to strace::hello.
- (child_info_fork::handle_fork): Rename from plain old 'handle_fork'.
- Move alloc_stack() call elsewhere.
- (dll_crt0_0): Fill out more of user_data. Reference handle_fork via
- fork_info. Add some debugging output.
- (_dll_crt0): Don't wait for sync thread if sync_startup is invalid.
- Zero sync_startup here. Call alloc_stack() here, if appropriate.
- (dll_crt0_1): Use in_forkee rather than user_data->forkee.
- (dll_crt0): Ditto.
- * malloc_wrapper.cc (malloc_init): Ditto.
- * dll_init.cc (in_forkee): Remove local static version of this
- variable.
- (dll_list::load_after_fork): Don't set in_forkee here.
- * external.cc (cygwin_internal): Use strace method rather than
- accessing field directly.
- * fhandler.cc (fhandler_base::read): Ditto.
- * fhandler_tty.cc (fhandler_tty_common::__acquire_output_mutex): Ditto.
- * fork.cc (frok::parent): Invoke strace write_childpid to communicate
- with potential strace.
- (child_copy): Add more detail to debugging output.
- * init.cc (calibration_id): New static variable.
- (prime_threads): Set sync_startup to invalid handle if we already know
- about thread_func_ix. Use static calibration_id to hold calibration
- thread id.
- * munge_threadfunc (munge_threadfunc): Don't try to debug if we don't
- find threadfunc_ix.
- (dll_entry): Avoid calling munge_threadfunc and _cygtls::remove on
- non-cygwin threads invoked during process startup.
- * pinfo.cc (set_myself): Always call strace.hello here regardless of
- DEBUGGING.
- * sigproc.cc (child_info::child_info): Remove spurious handling of
- dwProcessId. Set straced as appropriate.
- * spawn.cc (spawn_guts): Rename ciresrv to ch. Invoke strace
- write_childpid to communicate with potential strace.
- * strace.cc: Include child_info.h.
- (strace::hello): Remove inited test. Use active() method to test if
- strace has been activated. Handle case where we are started before
- (mypid): New function.
- (strace::vsprntf): Try to deal more intelligently with case where
- progname may not be filled out. Put pid in parentheses if it is a
- windows pid rather than a cygwin pid. myself has been filled out.
- (strace::write_childpid): New function for notifying strace about the
- creation of children.
- (strace::vprntf): Use strace method rather than accessing field
- directly.
- (strace_printf): Ditto.
- (strace::wm): Ditto.
- * winsup.h (in_forkee): Declare.
- * include/sys/strace.h (strace::write_childpid): Declare new function.
- (strace::attached): Define new function.
- (strace::active): Ditto.
- (strace::active_val): Ditto.
- (_STRACE_ON): Delete.
- (_STRACE_OFF): Ditto.
- (define_strace0): Use strace method rather than accessing field
- directly.
- (strace_printf_wrap): Ditto.
- (strace_printf_wrap1): Ditto.
-
-2005-12-28 Christopher Faylor <cgf@timesys.com>
-
- * environ.cc (win_env::add_cache): Don't add variables to the
- environment during initialization.
-
-2005-12-27 Corinna Vinschen <corinna@vinschen.de>
-
- * exceptions.cc (_cygtls::handle_exceptions): Drop redundant `break'.
-
-2005-12-27 Corinna Vinschen <corinna@vinschen.de>
-
- * exceptions.cc (inside_kernel): Rename from interruptible.
- Accommodate change throughout file.
-
-2005-12-27 Corinna Vinschen <corinna@vinschen.de>
-
- * exceptions.cc (interruptible): New function, code stripped from
- _cygtls::interrupt_now.
- (_cygtls::handle_exceptions): Handle STATUS_DATATYPE_MISALIGNMENT as
- SIGBUS error. Differ between unmapped memory (SEGV_MAPERR) and access
- violation (SEGV_ACCERR) in case of STATUS_ACCESS_VIOLATION. Write
- kernel log message in case of uncatched STATUS_ACCESS_VIOLATION.
- (_cygtls::interrupt_now): Just call interruptible now instead of
- evaluating interruptibility here.
-
-2005-12-27 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (path_conv::check): Rework loop removing trailing dots
- and spaces.
-
- * syslog.cc (vklog): Set facility to LOG_KERN if not set.
-
-2005-12-26 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (__api_fatal): Simplify to just use strace mechamisms.
- (do_exit): Move minimal_printf...
- * pinfo.cc (pinfo::exit): ...into here.
- * strace.cc (strace::vprntf): Guarantee output to the console when
- system_printf/api_fatal.
-
- * heap.cc (heap_init): Wait a second before issuing an error when
- ERROR_INVALID_ADDRESS since this is probably due to a CTRL-C handler
- sneaking in, using the memory that we want to use for the heap, and,
- eventually exiting.
-
-2005-12-23 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.cc (_cygtls::handle_threadlist_exception): Make an error
- fatal.
- * cygtls.h (sockaddr_in): Use header rather than defining our own
- structure.
- * exceptions.cc (_cygtls::interrupt_setup): Use exact contents of
- sa_mask rather than assuming that current sig should be masked, too.
- (_cygtls::call_signal_handler): Use more aggressive locking.
- * gendef (_sigbe): Wait until later before releasing incyg.
- (_sigreturn): Remove more arguments to accommodate quasi-sa_sigaction
- support.
- (_sigdelayed): Push arguments for sa_sigaction. More work needed here.
- * signal.cc (sigaction): Implement SA_NODEFER.
- * tlsoffsets.h: Regenerate.
-
- * sigproc.cc (wait_sig): Use default buffer size or Windows 9x
- complains.
-
- * pinfo.cc (_onreturn::dummy_handle): Remove.
- (_onreturn::h): Make this a pointer.
- (_onreturn::~_onreturn): Detect whether pointer is NULL rather than
- value is NULL.
- (_onreturn::_onreturn): Set h to NULL initially.
- (_onreturn::no_close_p_handle): Set h to NULL.
- (winpids::add): Initialize onreturn with value from p.hProcess
- immediately.
-
-2005-12-22 Christopher Faylor <cgf@timesys.com>
-
- * fork.cc (fork): Honor error return from sig_send. Don't continue
- with fork if we couldn't suspend signals.
- * sigproc.cc (sig_send): Set sigCONT event when we see __SIGNOHOLD.
- (wait_sig): Remove holding_signals. Create pipe with a buffer which
- will theoretically cause blocking if there is nothing reading on the
- pipe. Wait for sigCONT at end of loop when we have a __SIGHOLD.
-
-2005-12-22 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_base::issymlink): New method.
- * syscalls.cc (open): Handle O_NOFOLLOW flag.
- * include/fcntl.h (_FNOFOLLOW): New define.
- (O_NOFOLLOW): Ditto.
- * include/cygwin/version.h: Bump API minor number.
-
-2005-12-22 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (winpids::add): Increment nelem when winpid is true since we
- don't care if it's a cygwin process in that case.
-
-2005-12-22 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (winpids::release): Fix typo.
-
-2005-12-21 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (pinfo::init): Clarify comment slightly.
- (_onreturn): New helper class.
- (winpids:add): Remove copied stuff. Try to put process handle into
- pinfo in question and use _onreturn class to control when to close it.
- (winpids::release): Remove use of copied array. Free procinfo when
- hProcess is NULL. Otherwise call release and call CloseHandle on
- hProcess.
- * pinfo.h (winpids::copied): Remove throughout class.
-
-2005-12-21 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (pinfo::init): Remove spurious low_priority_sleep.
-
-2005-12-21 Christopher Faylor <cgf@timesys.com>
-
- * spawn.cc (spawn_guts): Hide the window whenever ctty == -1, not just
- when we have no console.
-
-2005-12-21 Christopher Faylor <cgf@timesys.com>
-
- * cygheap.cc (init_cygheap::manage_console_count): Revert previous
- change. Handle this a different way.
- * external.cc (cygwin_internal): Accommodate extra
- hook_or_detect_cygwin argument.
- * hookapi.cc (cygwin_internal): Fill in subsys variable with the
- subsystem of the executable.
- * spawn.cc (av::iscui): New variable.
- (spawn_guts): Hide window when we don't have a console and this isn't
- NT/XP/2003.
- (av::fixup): Set iscui flag.
- * winsup.h (hook_or_detect_cygwin): Accommodate extra argument.
-
-2005-12-21 Christopher Faylor <cgf@timesys.com>
-
- * cygheap.cc (init_cygheap::manage_console_count): Don't call
- FreeConsole on 9x/Me.
-
-2005-12-21 Corinna Vinschen <corinna@vinschen.de>
-
- * (fhandler_disk_file::fchown): Remove execute bits from "sensible"
- permissions. Use same setting as in symlink.
-
-2005-12-21 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_base::fstat_helper): Fix inode number
- debug output.
- (fhandler_disk_file::fchown): Always set sensible permission values
- when creating the ACL for symlinks.
-
-2005-12-20 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.h (flush_file_buffers): Define as inline function.
- * miscfuncs.cc (flush_file_buffers): Remove.
-
-2005-12-20 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.h (flush_file_buffers): Declare new function.
- (FLushFileBuffers): New define.
- * miscfuncs.cc (flush_file_buffers): Define new function.
-
-2005-12-20 Christopher Faylor <cgf@timesys.com>
-
- * fhandler.h (fhandler_termios::fixup_after_exec): Make non-inlined.
- * fhandler_termios.cc (fhandler_termios::fixup_after_exec): Don't call
- fixup_after_fork if close_on_exec'ed.
-
-2005-12-19 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.h (_cygtls::interrupt_now): Subsume interruptible().
- (interruptible): Delete.
- (setup_handler): Remove interruptible call and just use return from
- interrupt_now.
-
-2005-12-19 Christopher Faylor <cgf@timesys.com>
-
- * fhandler.h (set_console_state_for_spawn): Add an argument to the
- declaration.
- * fhandler_console.cc (set_console_state_for_spawn): Ditto for the
- definition. Only set invisible console for non-cygwin process. Remove
- debugging leftover.
- * spawn.cc (spawn_guts): Pass argument denoting whether this is a
- cygwin process to set_console_state_for_spawn and only call this
- function when exec'ing.
-
-2005-12-19 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (fhandler_dev_zero::mmap): Call VirtualFree(MEM_RELEASE)
- with zero length parameter, otherwise it fails.
- (fhandler_dev_zero::munmap): Ditto.
-
-2005-12-18 Christopher Faylor <cgf@timesys.com>
-
- * fhandler.h (fhandler_console::invisible_console): Declare new
- variable.
- (fhandler_pipe::fixup_in_child): Declare new function.
- (fhandler_console::need_invisible): Ditto.
- (fhandler_console::has_a): Ditto.
- * fhandler_console.cc (set_console_state_for_spawn): Eliminate return
- value. Set up an invisible console if necessary prior to spawning.
- (fhandler_console::invisible_console): Define.
- * fhandler_tty.cc (fhandler_tty_slave::open): Use
- fhandler_console::invisible_console to setup an invisible console.
- * pipe.cc (fhandler_pipe::fixup_in_child): Define new function from
- fixup_after_exec.
- (fhandler_pipe::fixup_after_exec): Use fixup_in_child when appropriate.
- (fhandler_pipe::fixup_after_fork): Ditto.
- * spawn.cc (handle): Reorganize and modernize a little.
- (spawn_guts): Rely on set_console_state_for_spawn to set the console
- into the right state but don't create the process with "detached" flag
- if we have no controlling tty since that confuses 'cmd'.
- * dtable.cc (dtable::stdio_init): Don't set console as controlling
- terminal if we have an invisible console.
-
- * sigproc.cc (child_info::sync): Use correct name in ForceCloseHandle1.
-
-2005-12-18 Christopher Faylor <cgf@timesys.com>
-
- * include/sys/dirent.h: Change __deprecated_d_ino to __invalid_d_ino
- throughout to make things a little clearer.
- * dir.cc (readdir_worker): Reflect above change.
-
-2005-12-16 Christopher Faylor <cgf@timesys.com>
-
- * winsup.h (child_copy): Change prototype to match new functionality.
- * cygheap.cc (cygheap_fixup_in_child): Accommodate new child_copy
- arguments.
- * dcrt0.cc (dll_data_start): Move definition here from fork.
- (dll_data_end): Ditto.
- (dll_bss_start): Ditto.
- (dll_bss_end): Ditto.
- (handle_fork): New function. Called when forked to deal with fork
- issues and copy data to this process from the parent.
- (dll_crt0_0): Call handle_fork when _PROC_FORK condition.
- (dll_crt0): Don't copy user_data when we've forked. Don't zero first
- element of main_environment ever.
- (cygwin_dll_init): Ditto.
- * fork.cc (child_copy): Rename from fork_copy and change arguments so
- that each pair of things to copy gets its own descriptor.
- (frok::child): Remove fixup_mmaps_after_fork call here. Move to
- handle_fork in dcrt0.cc.
- (frok::parent): Use child_copy rather than fork_copy and accommodate
- changes in parameters.
-
- * exceptions.cc (setup_handler): Delay test of whether we're locked
- until after GetThreadContext has been called since there are apparently
- cases where SuspendThread does not cause an immediate thread
- suspension.
-
-2005-12-16 Christopher Faylor <cgf@timesys.com>
-
- * init.cc (dll_entry): Call prime_threads after dll_crt0_0 to avoid
- conflicts between heap allocation and thread stack allocation.
-
-2005-12-16 Christopher Faylor <cgf@timesys.com>
-
- * hookapi.cc (putmem): Remove query of previous memory protection since
- we get that for free the first time we call VirtualProtect.
-
-2005-12-15 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (fhandler_dev_zero::fixup_mmap_after_fork): Use
- system_printf like any other fixup_mmap_after_fork.
-
-2005-12-14 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (ACCFLAGS): Remove macro.
- (fhandler_base::get_default_fmode): Use O_ACCMODE instead of ACCFLAGS
- and or'ed read/write flags.
- (fhandler_base::open_9x): Use O_ACCMODE instead of or'ed read/write
- flags.
- (fhandler_base::open): Ditto.
- * fhandler_disk_file.cc (fhandler_base::open_fs): Ditto.
- * fhandler_mem.cc (fhandler_dev_mem::open): Ditto.
- * fhandler_raw.cc (fhandler_dev_raw::open): Ditto.
-
-2005-12-14 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open_9x): Handle O_SYNC and O_DIRECT
- flags.
- (fhandler_base::open): Ditto.
- * fhandler_floppy.cc (fhandler_dev_floppy::open): Don't allocate devbuf
- in O_DIRECT case.
- * fhandler_raw.cc (fhandler_dev_raw::ioctl): Don't allow buffer
- changes in O_DIRECT case. Allow returning a buffer size 0, which
- indicates O_DIRECT.
- * fhandler_tape.cc (fhandler_dev_tape::open): Use O_SYNC flag to
- hand down the !buffer_writes case. Don't allocate devbuf in O_DIRECT
- case.
- (fhandler_dev_tape::raw_read): Don't mess with devbuf if it's NULL.
- * include/fcntl.h: Define _FDIRECT, O_DIRECT, O_DSYNC and O_RSYNC.
- * include/cygwin/version.h: Bump API minor version.
-
-2005-12-13 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.cc (_cygtls::remove): Don't bother if we're exiting.
- * sigproc.cc (_cygtls::remove_wq): Ditto.
-
-2005-12-13 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_tty.cc (fhandler_tty::open): Enhance comment.
-
-2005-12-13 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_tty.cc (fhandler_tty::open): Close newly created window
- station after switching to original window station.
-
-2005-12-13 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_tty.cc (fhandler_tty::open): Add a comment.
-
-2005-12-12 Christopher Faylor <cgf@timesys.com>
-
- * times.cc (hires_ms::usecs): Subtract from slop from system time or
- we'll always end up priming the pump.
-
-2005-12-12 Nick Duffek <nick@duffek.com>
-
- * times.cc (systime): Correct precision referenced in comment.
-
-2005-12-12 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_tty.cc (fhandler_tty_slave::open): Don't free original
- windows station since that will cause strange problems displaying
- fonts. Reset windows station to original station after creating
- console.
- * times.cc (hires_ms::usecs): Only reprime when calculated time is less
- than system time.
-
-2005-12-12 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (winpids::add): Don't copy procinfo when there is no cygwin
- process associated with the pid, i.e., procinfo == NULL.
-
-2005-12-12 Christopher Faylor <cgf@timesys.com>
-
- * times.cc (hires_ms::usecs): Correct order when checking if high
- precision time is <= current time.
-
-2005-12-12 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (size_copied): New convenience macro.
- (winpids::add): Alias the element that we are working on for slightly
- better clarity. Honor the "make_copy" flag.
- (winpids::release): Free and zero procinfo field if it was allocated
- via malloc.
- (winpids::~winpids): Free copied array.
- * pinfo.h (class pinfo): Make winpids class a friend.
- (winpids::make_copy): New field.
- (winpids::copied): New array.
- (winpids::reset): Reset npids after releasing pinfos or suffer a memory
- leak.
- (winpids::winpids): Try harder to zero all fields in the class.
-
-2005-12-12 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (GetSystemTimes): Remove.
-
-2005-12-12 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_proc.cc (format_proc_uptime): Drop usage of GetSystemTimes.
- Use NtQuerySystemInformation to evaluate uptime and idle_time from
- all CPU's processor times. Fallback to GetTickCount.
-
-2005-12-12 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (gen_create_protect): Always generate WRITECOPY protection
- for private maps.
- (fixup_mmaps_after_fork): Fix calculation of WRITECOPY protection for
- VirtualProtect. Add some words to the comment.
-
-2005-12-10 Christopher Faylor <cgf@timesys.com>
-
- * dirent.h: Change the rest of the d_ino's to __deprecated_d_ino.
-
-2005-12-10 Christopher Faylor <cgf@timesys.com>
-
- * malloc.cc: Update to version 2.8.3.
- * cygmalloc.h (MSPACE): Remove unneeded definition.
-
-2005-12-08 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_raw.cc (fhandler_dev_raw::ioctl): Only allow 0, 1 or a
- multiple of 512 as new buffersize.
-
-2005-12-08 Pekka Pessi <ppessi@gmail.com>
- Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::recvfrom): Mask flags with
- MSG_WINMASK for Windows socket calls.
- (fhandler_socket::recvmsg): Ditto.
- (fhandler_socket::sendmsg): Ditto.
-
-2005-12-07 Christopher Faylor <cgf@timesys.com>
-
- * hires.h (hires_ms::initime_ms): Delete.
- (hires_ms::initime_us): Just define as LONGLONG.
- (hires_ms::uptime): New function.
- * select.cc (select_stuff::wait): Use gtod for timing to attempt to
- avoid windows 32 bit wraparound.
- * times.cc (systime): New function.
- (times): Replace GetTickCount with gtod.uptime.
- (hires_us::prime): Use systime() to calculate system time rather than
- calling GetSystemTimeAsFileTime directly.
- (hires_ms::prime): Ditto. Eliminate initime_ms.
- (hires_ms::usecs): Try harder to detect wraparound.
-
- * fhandler_proc.cc (format_proc_partitions): Set drive_size to zero to
- avoid a compiler warning.
-
-2005-12-07 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_proc.cc (format_proc_partitions): Use modern IOCTLs
- to determine drive size as far as possible.
-
-2005-12-07 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_raw.cc (fhandler_dev_raw::ioctl): Fix INVALID_PARAMETER
- condition. Only copy devbuf to buf if buf is non-NULL.
-
-2005-12-07 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_raw.cc (fhandler_dev_raw::ioctl): Fix setting devbuf
- when rd_parm is 0 or 1.
-
-2005-12-07 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_floppy.cc (fhandler_dev_floppy::lseek): Fix test for
- valid file position at EOM.
-
-2005-12-07 Christopher Faylor <cgf@timesys.com>
-
- * include/cygwin/stdlib.h: Guard compilation of *unsetenv* in newlib.
-
-2005-12-07 Corinna Vinschen <corinna@vinschen.de>
-
- * exceptions.cc (_cygtls::handle_exceptions): In case of a
- STATUS_ACCESS_VIOLATION, check if the page is a mmaped page beyond
- a file's EOF. Generate SIGBUS instead of SIGSEGV then.
- * mmap.cc (__PROT_ATTACH): New define.
- (__PROT_FILLER): Ditto.
- (fh_anonymous): Rename from fh_paging_file;
- (fh_disk_file): New global static variable.
- (attached): New inline function.
- (filler): Ditto.
- (gen_create_protect): Split off from gen_protect to use the file's
- access mode to create mapping always with maximum allowed protections.
- (gen_protect): Accommodate pages attached beyond EOF. Use symbolic
- values instead of numerics when possible. Drop create parameter.
- (gen_access): Use file's access mode instead of protection.
- (CreateMapping9x): Create named mapping names so that different
- creation access modes result in different mappings.
- (CreateMappingNT): Only reserve attached pages, don't commit them.
- (MapViewNT): Ditto. Set AT_ROUND_TO_PAGE for all non-NULL base
- addresses.
- (mmap_func_t): Define CreateMapping and MapView function pointers
- with additional openflags parameter.
- (class mmap_record): Add openflags member.
- (mmap_record::mmap_record): Add openflags parameter.
- (mmap_record::get_openflags): New accessor.
- (mmap_record::attached): Call global attached function.
- (mmap_record::filler): Call global filler function.
- (mmap_record::gen_create_protect): Call global gen_create_protect
- function.
- (mmap_record::gen_protect): Drop create parameter.
- (mmap_record::alloc_fh): Set fhandler's access flags.
- (list::search_record): Accommodate filler pages.
- (list::set): Use inode number as hash value.
- (map::get_list_by_fd): Check hash value against file's inode number.
- (mmap_is_attached_page): New function to evaluate if a given address
- is on a attached page. Called from _cygtls::handle_exceptions.
- (mmap_worker): New function to do mapping and bookkeeping in a
- single call.
- (mmap64): Use roundup2 to round length to pagesize alignment.
- Initialize global fhandlers. Simplify anonymous initialization.
- Add SUSv3 compatible check of file open mode vs. requested protection.
- Try creating new file handles to allow maximum page protection.
- Allow creating attached pages in case of mapping beyond EOF.
- Close new file handle if one has been created.
- (munmap): Align len to pagesize.
- (msync): Rework argument checks. Align len to pagesize.
- (mprotect): Ditto. Accommodate attached pages.
- (mlock): Use roundup/rounddown macros instead of homemade expressions.
- (munlock): Add page alignment as in mlock.
- (fhandler_dev_zero::munmap): Fix unmapping of non-private mappings.
- (fhandler_dev_zero::fixup_mmap_after_fork): Accommodate filler pages.
- (fixup_mmaps_after_fork): Don't fail if attached pages couldn't be
- created in child. Avoid superfluous call to VirtualFree. Check for
- original allocation protection to fix PAGE_WRITECOPY protection.
- * ntdll.h: Revert deletion of AT_ROUND_TO_PAGE define.
- * winsup.h (mmap_is_attached_page): Declare.
-
-2005-12-05 Christopher Faylor <cgf@timesys.com>
-
- * include/cygwin/stdlib.h: New file.
- * environ.cc (unsetenv): Change to return -1 on input error.
- * include/cygwin/version.h: Add more description to latest api bump.
-
-2005-12-05 Christopher Faylor <cgf@timesys.com>
-
- * dir.cc (readdir_workdir): Only fill out d_ino when linked into older
- app.
- * include/cygwin/version.h: Bump api minor number to 147, reflecting
- obsolescence of d_ino.
- (CYGWIN_VERSION_USER_API_VERSION_COMBINED): New convenience macro.
- (CYGWIN_VERSION_CHECK_FOR_NEEDS_D_INO): New convenience macro.
- * include/sys/dirent.h: Change d_ino field to __deprecated_d_ino.
-
-2005-12-05 Christopher Faylor <cgf@timesys.com>
-
- Remove unneeded whitespace.
- * cygtls.cc (_cygtls::set_state): Delete.
- (_cygtls::reset_exception): Ditto.
- (_cygtls::init_thread): Set initialized state directly here.
- (_cygtls::push): Remove exception argument. Don't treat exceptions
- specially.
- * cygtls.h (_cygtls::push): Ditto.
- (_cygtls::isinitialized): Don't treat exceptions specially.
- (_cygtls::reset_exception): Delete.
- (_cygtls::set_state): Ditto.
- (_cygtls::handle_exceptions): Don't push ebp on the stack prior to
- calling sig_send. Just set incyg instead.
- (_cygtls::interrupt_setup): Accommodate _cygtls::push argument change.
- (_cygtls::interrupt_now): Ditto.
- (setup_handler): Don't treat exceptions specially.
- * gendef (longjmp): Always zero incyg flag.
-
-2005-12-04 Corinna Vinschen <corinna@vinschen.de>
-
- * environ.cc (spenvs): Add "windir" as an "always export" variable
- to accommodate WinSock on Windows 95.
-
-2005-12-02 Christopher Faylor <cgf@timesys.com>
-
- * include/exceptions.h (exception_list): Revert previous change.
- Windows doesn't care.
- (exception_handler): Use real exception_list parameter type rather than
- void *
- * tlsoffsets.h: Regenerate.
- * cygtls.h (_cygtls::handle_exceptions): Use real exception_list
- parameter type rather than void *.
- (handle_threadlist_exception): Ditto.
- (init_exception_handler): Ditto.
- * cygtls.cc (_cygtls::handle_threadlist_exception ): Ditto.
- (_cygtls::init_exception_handler): Add kludge to terminate linked list
- with a loop, which seems to solve problem of RtlUnwind causing problems
- * exceptions.cc (rtl_unwind): Use real exception_list parameter type
- rather than void *.
- (_cygtls::handle_exceptions): Ditto.
-
-2005-12-02 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.h (_cygtls::el): New field.
- (_cygtls::handle_exceptions): New function declaration.
- (_cygtls::handle_threadlist_exception): Ditto.
- (_cygtls::init_exception_handler): Ditto.
- (_cygtls::init_threadlist_exceptions): Remove arg from declaration.
- * cygtls.cc (_cygtls::call2): Don't initialize exceptions here.
- (_cygtls::init_thread): Do it here instead and use member function.
- (_cygtls::handle_threadlist_exception): Move into _cygtls class.
- (_cygtls::init_exception_handler): Ditto. Rely on existence of 'el'
- memmber in _cygtls.
- (_cygtls::init_threadlist_exceptions): Ditto.
- * dcrt0.cc (dll_crt0_1): Remove exception_list definition and setting
- since it now commonly resides in the tls.
- * exceptions.cc (init_exception_handler): Move to cygtls.cc.
- (init_exceptions): Ditto.
- (rtl_unwind): New, safe wrapper function for RtlUnwind.
- (_cygtls::handle_exceptions): Move to _cygtls. Call rtl_unwind to
- unwind frames and eliminate copying of structures. Put address of
- failing instruction in si_addr, not the address on the stack. Return 0
- to indicate that we've handled this exception.
- * external.cc (cygwin_internal): Make CW_INIT_EXCEPTIONS a no-op.
- * sigproc.cc (wait_sig): Accommodate argument change to
- _cygtls::init_threadlist_exceptions.
- * tlsoffsets.h: Regenerate.
- * include/exceptions.h (exception_list): Add more stuff to the
- exception list. Apparently windows needs this?
- (init_exceptions): Remove bogus declaration.
-
- * include/cygwin/signal.h (SI_USER): Redefine as zero as per SUSv3.
- * include/cygwin/version.h: Bump API minor version number to 146.
-
- * thread.cc (pthread_kill): Set si_pid and si_uid.
-
- * timer.cc (timer_thread): Set si_code to SI_TIMER.
-
-2005-12-01 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (getstack): Try harder to modify memory.
- (alloc_stack): Alloc page prior to stack top, too.
-
-2005-12-01 Christopher Faylor <cgf@timesys.com>
-
- * devices.h (_major): Revert previous ill-advised change.
- (_minor): Ditto.
-
-2005-12-01 Christopher Faylor <cgf@timesys.com>
-
- * exceptions.cc (handle_exceptions): Translate a guard page exception
- to a "SIGBUS".
-
-2005-12-01 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc: Make debug output more consistently. Fix some comments.
- (gen_protect): Convert to inline function.
- (gen_access): Ditto.
- (mmap_record::gen_protect): Add create parameter as in global function.
- (mmap_record::alloc_page_map): Change condition so that always the
- correct protection setting is set after mapping has been established.
- (mmap64): For anonymous mappings set offset always to 0.
- (fixup_mmaps_after_fork): Always call fixup_mmap_after_fork method
- with the MAP_FIXED flag set.
-
-2005-12-01 Christopher Faylor <cgf@timesys.com>
-
- * devices.h (_minor): Coerce argument to proper type before
- manipulating.
- (_major): Ditto.
- (device::is_fs_special): New function.
- * fhandler_disk_file.cc (fhandler_base::fstat_helper): Set the size to
- 0 for devices rather than reporting the size of the symlink.
- (fhandler_disk_file::readdir): Use is_fs_special to determine if .lnk
- should be stripped.
- * path.cc: Rename symlink_info::is_symlink to symlink_info::issymlink
- throughout.
- (symlink_info::isdevice): New field.
- (path_conv::check): Use 'isdevice' to determine if just-parsed entity
- is a device rather than relying on non-zero major/minor.
- (symlink_info::parse_device): Set isdevice to true if we've discovered
- a device.
- (symlink_info::check): Clear isdevice field prior to processing. Use
- isdevice to control debugging output.
- (symlink_info::set): Set isdevice to false.
- * path.h (path_conv::is_fs_special): New function.
- * devices.cc: Regenerate.
-
-2005-11-30 Christopher Faylor <cgf@timesys.com>
-
- * times.cc (hires_ms::prime): Remove debugging stuff.
- (hires_ms::usecs): Ditto.
-
-2005-11-30 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (list::try_map): New method, implementing trying to map
- within another already existing map, moved from mmap64 here.
- (mmap64): Just call try_map now.
- (fhandler_dev_zero::fixup_mmap_after_fork): Always create new private
- map with PAGE_READWRITE protection.
- (fixup_mmaps_after_fork): Fix comment.
-
-2005-11-29 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/version.h: Bump API minor version.
-
-2005-11-29 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_dev_zero::mmap): Add method.
- (fhandler_dev_zero::munmap): Ditto.
- (fhandler_dev_zero::msync): Ditto.
- (fhandler_dev_zero::fixup_mmap_after_fork): Ditto.
- * mmap.cc: Implement anonymous mapping using fhandler_dev_zero class.
- Implement private anonymous maps using VirtualAlloc/VirtualFree. Fix
- or add some more comments.
- (fh_paging_file): Change to type fhandler_dev_zero.
- (priv): New static inline function to avoid having lots of flag bit
- tests in the code. Use throughout were appropriate.
- (fixed): Ditto.
- (anonymous): Ditto.
- (noreserve): Ditto.
- (autogrow): Ditto.
- (gen_protect): Never generate PAGE_WRITECOPY protection for
- private anonymous maps.
- (gen_access): Drop FILE_MAP_EXECUTE handling since it's not supported
- correctly on 9x.
- (VirtualProt9x): Move comment from mmap64 here.
- (mmap_record::mmap_record): Gegerate correct device entry for
- anonymous maps, though unused right now.
- (mmap_record::priv): Call global priv function.
- (mmap_record::fixed): Call global fixed function.
- (mmap_record::anonymous): Call global anonymous function.
- (mmap_record::noreserve): Call global noreserve function.
- (mmap_record::autogrow): Call global autogrow function.
- (list::anonymous): New method. Use throughout were appropriate.
- (mmap_record::compatible_flags): Drop now useless ifdef.
- (mmap_record::alloc_page_map): Accommodate private anonymous maps.
- (mmap_record::map_pages): Accommodate MAP_NORESERVE mappings.
- (mmap_record::unmap_pages): Accommodate private anonymous maps.
- (mmap64): Simplify argument check. Don't remove the MAP_PRIVATE flag
- for anonymous mappings on 9x anymore since that's now handled
- gracefully.
- (mprotect): Accommodate MAP_NORESERVE mappings. Fix case when
- non-mmap areas are just MEM_RESERVEd.
- (fhandler_dev_zero::mmap): Implement anonymous mapping here.
- (fhandler_dev_zero::munmap): Ditto.
- (fhandler_dev_zero::msyn): Ditto.
- (fhandler_dev_zero::fixup_mmap_after_fork): Ditto.
- (fixup_mmaps_after_fork): Accommodate private anonymous maps. Enhance
- debug output in case VirtualProtect fails.
- * include/sys/mman.h: Really define MAP_NORESERVE now.
-
-2005-11-28 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (NtCreateSection): Define.
- * cygheap.cc (_csbrk): Call getpagesize instead of getshmlba.
- * dcrt0.cc (dll_crt0_0): Call mmap_init.
- * external.cc (cygwin_internal): Call getpagesize instead of getshmlba.
- * fhandler.h (fhandler_base::mmap): Change access to prot parameter.
- (fhandler_base::fixup_mmap_after_fork): Ditto.
- (fhandler_disk_file::mmap): Ditto.
- (fhandler_disk_file::fixup_mmap_after_fork): Ditto.
- (fhandler_dev_mem::mmap): Ditto.
- (fhandler_dev_mem::fixup_mmap_after_fork): Ditto.
- * fhandler_mem.cc (fhandler_dev_mem::write): Call getsystempagesize
- instead of getpagesize.
- (fhandler_dev_mem::read): Ditto.
- (fhandler_dev_mem::fstat): Ditto.
- (fhandler_dev_mem::mmap): Move to mmap.cc.
- (fhandler_dev_mem::munmap): Ditto.
- (fhandler_dev_mem::msync): Ditto.
- (fhandler_dev_mem::fixup_mmap_after_fork): Ditto.
- * fhandler_proc.cc (format_proc_meminfo): Call getsystempagesize
- instead of getpagesize.
- * fhandler_process.cc (format_process_stat): Ditto.
- (format_process_status): Ditto.
- (get_mem_values): Ditto.
- * mmap.cc: Fix formatting. Try to make more readable and modular.
- Take advantage of pagesize==granularity.
- (gen_protect): New static function to evaluate Windows
- protection bits from POSIX protection and flags.
- (gen_access): Ditto for Windows access mode.
- (VirtualProt9x): Wrapper function to call VirtualProtect on 9x.
- (VirtualProtNT): Ditto for NT.
- (VirtualProtEx9x): Ditto for VirtualProtectEx on 9x.
- (VirtualProtExNT): Ditto for NT.
- (CreateMapping9x): Wrapper function for creating a mapping handle on 9x.
- (CreateMappingNT): Ditto for NT.
- (MapView9x): Wrapper function to map a view on 9x.
- (MapViewNT): Ditto for NT.
- (mmap_funcs_9x): Structure containing function pointers to wrapper
- functions for 9x.
- (mmap_funcs_nt): Ditto for NT.
- (mmap_func): Pointer to wrapper functions used in subsequent code.
- (mmap_init): Initialize mmap_func depending on OS.
- (class mmap_record): Use sensible member names. Add POSIX protection
- member. Drop Windows access flags member. Constify more methods.
- Use accessors instead of direct member access inside of own methods.
- (mmap_record::gen_protect): Class wrapper to evaluate matching
- Windows protection bits.
- (mmap_record::gen_access): Ditto for Windows access flags.
- (mmap_record::compatible_flags): New function to check if flags are
- compatible with flags of existing map.
- (list::add_record): Drop offset and length arguments.
- (class map): Change counters to unsigned. Match usage throughout.
- (mmapped_areas): Convert from pointer to global struct.
- (mmap_record::alloc_page_map): Simplify.
- (mmap_record::map_pages): Ditto.
- (mmap_record::fixup_page_map): Delete.
- (mmap64): Simplify. Add workaround for Windows 98 bug. Fix bug on
- NT that existing anonymous mappings weren't searched for a match.
- (munmap): Add workaround for Windows 98 bug.
- (msync): Simplify.
- (mprotect): Handle existing maps correctly.
- (mlock): Add local pagesize variable and enlightening comment.
- (fhandler_disk_file::mmap): Main functionality now in CreateMapping/
- MapView wrapper functions.
- (fhandler_disk_file::fixup_mmap_after_fork): Call MapView wrapper.
- (fhandler_dev_mem::mmap): Moved from fhandler_mem.cc. Simplify by
- calling MapViewNT.
- (fhandler_dev_mem::munmap): Moved from fhandler_mem.cc.
- (fhandler_dev_mem::msync): Ditto.
- (fhandler_dev_mem::fixup_mmap_after_fork): Ditto. Call MapViewNT.
- (fixup_mmaps_after_fork): Restructure and hopefully speed up loop for
- setting protection and memory content on MAP_PRIVATE maps.
- * ntdll.h (AT_ROUND_TO_PAGE): Remove define.
- (AT_EXTENDABLE_FILE): Add define.
- (NtCreateSection): Add prototype.
- * syscalls.cc (getpagesize): Return granularity as pagesize now.
- (getsystempagesize): New function to retrieve "real" pagesize.
- (getshmlba): Delete since it's replaced by getpagesize now.
- * wincap.h (wincaps::has_mmap_alignment_bug): New element.
- * wincap.cc: Implement above element throughout.
- * winsup.h (getshmlba): Drop prototype.
- (getsystempagesize): Add prototype.
- (mmap_init): Ditto.
- * include/sys/mman.h: (Not yet) define MAP_NORESERVE.
-
-2005-11-28 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_base::fstat_helper): Don't rely on
- has_acl() state for evaluating inodes. Temporarily(?) enable "real"
- inodes for remote drives.
-
-2005-11-25 Christopher Faylor <cgf@timesys.com>
-
- * heap.cc: Remove spurious getpagesize declaration.
-
-2005-11-25 Christian Franke <Christian.Franke@t-online.de>
-
- * exceptions.cc (ctrl_c_handler): Distinguish CTRL-BREAK from CTRL-C in
- some cases.
-
-2005-11-23 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_tty.cc (fhandler_tty_slave::open): Reset the current windows
- station whenever ctty == -1 regardles of whether there's a windows
- station already assigned. Close the old windows station in this
- situation.
- * pinfo.cc (_pinfo::set_ctty): Reinstate incrementing of console count
- when recording ctty so that the current tty is always around.
- * autoload.cc (CloseWindowStation): Define.
-
-2005-11-18 Christopher Faylor <cgf@timesys.com>
-
- * strptime.cc (_strptime): Fix gcc warnings.
-
-2005-11-18 Christopher Faylor <cgf@timesys.com>
-
- * memmem.cc: Move from here.
- * lib/memmem.cc: Move to here.
-
-2005-11-18 Corinna Vinschen <corinna@vinschen.de>
-
- * libc: Add subdirectory.
- * Makefile.in (VPATH): Add libc subdir.
- (DLL_OFILES): Add strptime.o and timelocal.o.
- * cygwin.din: Export timelocal and timegm.
- * localtime.cc: Define STD_INSPIRED unconditionally.
- * include/cygwin/time.h (timelocal): Add declaration.
- (timegm): Ditto.
- * include/cygwin/version.h: Bump API minor version.
- * libc/strptime.cc: New file.
- * libc/timelocal.cc: New file.
- * libc/timelocal.h: New file.
-
-2005-11-18 Christopher Faylor <cgf@timesys.com>
-
- * include/cygwin/sys_time.h: Move futimes and lutimes declaration here
- from newlib.
-
-2005-11-18 Christopher Faylor <cgf@timesys.com>
-
- * times.cc (timezone): Put back (void).
- * include/cygwin/time.h: Add more cygwin stuff from newlib.
-
-2005-11-18 Christopher Faylor <cgf@timesys.com>
-
- * include/cygwin/sys_time.h: Rename from include/cygwin/time.h.
- * include/cygwin/time.h: New file.
-
-2005-11-17 Christopher Faylor <cgf@timesys.com>
-
- * fork.cc (fork): Move top-of-stack calculation later.
-
- * pinfo.cc (_pinfo::set_ctty): Use __ctty to print current console in
- debugging output.
-
-2005-11-17 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_tty.cc (fhandler_tty_slave::open): Don't expect that
- service applications have no window station attached.
-
-2005-11-16 Christopher Faylor <cgf@timesys.com>
-
- * times.cc (hires_ms::prime): Don't escalate the priority.
-
-2005-11-14 Christopher Faylor <cgf@timesys.com>
-
- * include/sys/elf64.h: Fix types to reflect linux usage.
-
-2005-11-14 Corinna Vinschen <corinna@vinschen.de>
- Christopher Faylor <cgf@timesys.com>
-
- * fhandler.h (fhandler_console::fixup_after_fork_exec): Define with
- additional bool parameter.
- (fhandler_console::fixup_after_exec): Accommodate
- fixup_after_fork_exec's parameter.
- (fhandler_console::fixup_after_fork): Ditto.
- * fhandler_console.cc (fhandler_console::fixup_after_fork_exec): Avoid
- opening new console only when close_on_exec AND execing.
-
-2005-11-14 Christopher Faylor <cgf@timesys.com>
-
- * fhandler.h (fhandler_console::fixup_after_fork_exec): Declare new function.
- (fhandler_console::fixup_after_fork): Use fixup_after_fork_exec.
- (fhandler_console::fixup_after_exec): Ditto.
- * fhandler_console.cc (fhandler_console::fixup_after_fork): Delete definition.
- (fhandler_console::fixup_after_fork_exec): Rename from fixup_after_exec.
- * pinfo.cc (_pinfo::set_ctty): Don't play with console count here.
- * syscalls.cc (close_all_files): Don't close cygheap ctty if hExeced
- since the child will be copying information from us.
- (setsid): Use myctty() rather than raw ctty #.
-
-2005-11-13 Christopher Faylor <cgf@timesys.com>
-
- * cygheap.h (init_cygheap::manage_console_count): Declare new function.
- (init_cygheap::console_count): Renamed from open_fhs. Make private.
- * cygheap.cc (init_cygheap::manage_console_count): Define new function.
- * dtable.cc (dtable::fixup_after_exec): Always call fixup_after_exec on
- elements of fd even when they are about to be closed.
- * fhandler.h (report_tty_counts): Remove open_fhs from debugging
- output.
- * fhandler_console.cc (fhandler_console::open): Use
- manage_console_count rather than manipulating count directly.
- (fhandler_console::close): Ditto.
- (fhandler_console::fixup_after_fork): Ditto.
- (fhandler_console::fixup_after_exec): Ditto. Don't close handles if
- close_on_exec.
- * fhandler_tty.cc (fhandler_tty_slave::open): Use
- manage_console_count() rather than manipulating count directly.
- Reflect change in arguments to report_tty_counts().
- (fhandler_tty_slave::close): Ditto for both.
- (fhandler_tty_slave::dup): Ditto for both.
- (fhandler_tty_slave::ioctl): Use myctty() rather than raw ctty #.
- (fhandler_tty_slave::fixup_after_fork): Reflect change in arguments to
- report_tty_counts().
- (fhandler_tty_master::init_console): Use manage_console_count() rather
- than manipulating count directly.
- * fhandler_clipboard.cc (fhandler_dev_clipboard::fixup_after_exec):
- Don't perform any operations if close_on_exec.
- * fhandler_dsp.cc (fhandler_dev_dsp::fixup_after_exec): Ditto.
- * fhandler_raw.cc (fhandler_dev_raw::fixup_after_exec): Ditto.
- * fhandler_serial.cc (fhandler_serial::fixup_after_exec): Ditto.
- * pinfo.h (_pinfo::_ctty): Declare new function.
- (myctty): Declare new macro.
- (__ctty): Declare new macro.
- * pinfo.cc (_pinfo::_ctty): Define new function.
- (_pinfo::set_ctty): Use manage_console_count() rather than manipulating
- count directly.
- * signal.cc (kill_pgrp): Use myctty() and __ctty() macros rather than
- raw ctty #.
- * syscalls.cc (setsid): Ditto. Use manage_console_count() rather than
- manipulating count directly.
-
-2005-11-13 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::recvfrom): Just return 0 (EOF)
- in case of WSAESHUTDOWN.
- (fhandler_socket::recvmsg): Ditto.
- * poll.cc (poll): Set revents to POLLIN instead of POLLHUP. Add comment.
-
-2005-11-11 Christopher Faylor <cgf@timesys.com>
-
- * cygheap.h (init_cygheap::_gtod): Remove.
- * cygwin.din: Export clock_getres and clock_setres.
- * hires.h (hires_ms::minperiod): Delete declaration.
- (hires_ms::began_period): Ditto.
- (hires_ms::prime): Make void.
- (hires_ms::resolution): Just define here.
- (hires_ms::usecs): Remove unneeded argument.
- (gtod): Redeclare as a variable.
- * timer.cc (timer_thread): Eliminate argument to gtod.usecs().
- (timer_tracker::gettime): Ditto.
- (timer_tracker::settime): Ditto.
- * times.cc (gettimeofday): Ditto.
- (hires_ms::began_period): Delete declaration.
- (hires_us::prime): Remove debugging.
- (hires_ms::prime): Make void. Eliminate period stuff.
- (hires_ms::usecs): Eliminate argument to gtod.usecs().
- (hires_ms::resolution): New function.
- (clock_getres): Ditto.
- (clock_setres): Ditto.
- * version.h: Bump API version to 143.
- * include/cygwin/time.h: New file.
-
-2005-11-10 Christopher Faylor <cgf@timesys.com>
-
- * times.cc (hires_ms::prime): Comment out call to timeBeginPeriod for
- now.
- (hires_ms::usecs): Call prime if haven't called began_period().
-
- * param.h: Don't define stuff that is already defined in endian.h.
-
-2005-11-10 Christopher Faylor <cgf@timesys.com>
-
- * include/endian.h: Remove USE_BSD ifdef since it is never defined on
- Cygwin.
-
-2005-11-10 Corinna Vinschen <corinna@vinschen.de>
-
- * syslog.cc (setlogmask): Don't mask the mask.
- (vsyslog): Fix priority check.
-
-2005-11-10 Scott Finneran <scottf@pacom.com>
-
- * include/cygwin/signal.h: Add missing sigrelse prototype.
-
-2005-11-08 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_base.cc (fhandler_base::readv): Free buf, not a pointer into
- the middle of buf.
-
-2005-11-08 Christopher Faylor <cgf@timesys.com>
-
- * memmem.cc: New file.
- * include/cygwin/version.h: Bump API version number to 142.
- * cygwin.din: Export memmem.
- * Makefile.in: Build memmem.o.
-
-2005-11-08 Christopher Faylor <cgf@timesys.com>
-
- * environ.cc (spenvs): Make "SYSTEMDRIVE" an "always export".
-
-2005-11-07 Corinna Vinschen <corinna@vinschen.de>
-
- * times.cc (futimes): Redirect to utimes_worker if given file
- descriptor is opened R/O.
-
-2005-11-06 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (dll_crt0_0): Initialize security data first so that it can
- be used by subsequent handle creation.
-
-2005-11-04 Christopher Faylor <cgf@timesys.com>
-
- * cygheap.h (init_cygheap::_gtod): New hires_ms element.
- * hires.h (hires_ms::minperiod): Remove static designation.
- (hires::began_period): New field.
- * signal.cc: Include headers required for cygheap.h now that gtod lives
- in the cygheap.
- * timer.c: Ditto.
- * times.cc (gtod): Delete variable.
- (gtod::minperiod): Ditto.
- (gtod::began_period): Define.
- (hires_ms::prime): Add more debugging output. Call timeBeginPeriod
- only when !began_period.
-
-2005-11-04 Christopher Faylor <cgf@timesys.com>
-
- * times.cc (hires_ms::prime): More debugging.
- (hires_ms::usecs): Ditto.
-
-2005-11-03 Christopher Faylor <cgf@timesys.com>
-
- * times.cc (stupid_printf): Define and use throughout -- temporarily.
-
-2005-11-03 Christopher Faylor <cgf@timesys.com>
-
- * times.cc (hires_ms::prime): Add lots of temporary debugging output.
-
-2005-11-02 Christopher Faylor <cgf@timesys.com>
-
- * times.cc (hires_ms::minperiod): Make copy-on-fork.
- (gettimeofday): Remove temporary debugging.
- (hires_us::prime): Add lots of temporary debugging output.
-
-2005-11-02 Christopher Faylor <cgf@timesys.com>
-
- * times.cc (gettimeofday): Add temporary debugging output.
-
-2005-11-01 Christopher Faylor <cgf@timesys.com>
-
- * include/sys/cygwin.h: Define CYGWIN_SIGNAL_STRING.
- * exceptins.cc (sigpacket::process): Send a _CYGWIN_SIGNAL_STRING to
- gdb if the process is being debugged. A WIP.
-
-2005-10-29 Christopher Faylor <cgf@timesys.com>
-
- * exceptions.cc (signal_exit): Eliminate setting of main thread
- priority since process lock should make that unnecessary.
- * fork.cc (stack_base): Eliminate.
- (frok::parent): Subsume stack_base and just set stack stuff here.
- Report on priority class in debugging output.
- * spawn.cc (spawn_guts): Report on priority class in debugging output.
-
-2005-10-29 Christopher Faylor <cgf@timesys.com>
-
- * fork.cc (frok::child): Change order of cleanup prior to return.
- (fork): Save more of the stack.
-
- * gendef: Fix some comments.
-
- * sigproc.cc (wait_sig): Clarify debug output.
-
-2005-10-29 Christopher Faylor <cgf@timesys.com>
-
- * child_info.h (CHILD_INFO_MAGIC): Reset.
-
-2005-10-24 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (_pinfo::fds): Lock fdtab while enumerating.
-
-2005-10-24 Corinna Vinschen <corinna@vinschen.de>
-
- * spawn.cc (spawn_guts): Don't leave the function with return inside
- pthread cleanup brackets.
-
-2005-10-24 Christopher Faylor <cgf@timesys.com>
-
- * cygheap.h (cygheap_fdenum): Remove start_fd stuff.
- (cygheap_fdenum::rewind): Ditto.
- * pipe.cc (fhandler_pipe::open): Lock fdtab while enumerating.
- * times.cc (utimes_worker): Ditto.
-
-2005-10-23 Christopher Faylor <cgf@timesys.com>
-
- * cygheap.h (cygheap_fdenum::cygheap_fdenum): Record locked state or
- suffer deadlocks.
- (class locked_process): Move to another header.
- * sync.h (lock_process): Define here.
- * cygtls.cc (_cygtls::fixup_after_fork): Reset spinning state as well
- as stacklock state.
- * dcrt0.cc (lock_process::locker): Define.
- (dtable::lock_cs): Delete.
- (dll_crt0_0): Initialize process lock here ASAP.
- * dtable.cc (dtable_init): Eliminate call to init_lock().
- (dtable::fixup_after_fork): Ditto.
- (dtable::init_lock): Delete definition.
- * dtable.h (dtable::init_lock): Delete declaration.
- (dtable::lock): Use process lock rather than dtable-specific lock.
- (dtable::unlock): Ditto.
-
- * sigproc.cc (sigproc_init): Minor change to debugging output.
-
- * times.cc (utime_worker): Use build_fh_pc rather than reinterpreting
- the posix path name again. Return any error from path_conv immediately.
-
-2005-10-22 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::connect): Don't restrict
- WSAEINVAL -> WSAEISCONN conversion to nonblocking sockets.
- (fhandler_socket::accept): Use event driven technique to implement
- interuptible accept.
- (fhandler_socket::wait): Allow FD_ACCEPT handling.
- * net.cc (cygwin_accept): Remove workaround for allowing blocking
- accept. That's entirely in fhandler_socket::accept now.
-
-2005-10-22 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_socket): Add timeout parameter to wait()
- method.
- * fhandler_socket.cc (fhandler_socket::connect): Use event driven
- technique (prepare/wait/release) to implement interuptible connect.
- (fhandler_socket::wait): Add timeout parameter. Allow FD_CONNECT
- handling.
- * net.cc (cygwin_connect): Remove braindead workaround for allowing
- blocking connect. That's entirely in fhandler_socket::connect now.
-
-2005-10-22 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/version.h: Fix typo.
-
-2005-10-21 Christopher Faylor <cgf@timesys.com>
-
- * dir.cc (rmdir): Eliminate nonsensical code.
-
- * fork.cc (fork): Move exit debug_printf to last statement.
-
-2005-10-20 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din (futimes): Export.
- (lutimes): Export.
- * times.cc (utimes_worker): Created from utimes, add nofollow flag
- to implement utimes and lutimes.
- (utimes): Just call utimes_worker.
- (lutimes): New function.
- (futimes): Ditto.
- * include/cygwin/version.h: Bump API minor version.
-
-2005-10-19 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc (child_info::sync): Move check for !wr_proc_pipe lower.
- * spawn.cc (spawn_guts): Correct check for top-level process.
-
-2005-10-19 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc: Revert loading rcmd, rexec, rresvport and inet_network
- from wsock32.dll since these symbols are not exported from ws2_32.dll.
-
-2005-10-19 Christopher Faylor <cgf@timesys.com>
-
- * times.cc (utimes): Only consider fds opened with write access.
-
-2005-10-19 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_disk_file.cc (fhandler_base::utimes_fs): Use existing handle
- if fhandler has one.
- * times.cc (utimes): Scan open fds for matching paths and use existing
- fhandler if one exists.
-
-2005-10-19 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (_pinfo::dup_proc_pipe): Make warning more severe by
- actually printing it.
- (_pinfo::alert_parent): Fix comment. Don't send to parent if we are in
- an exec stub.
-
-2005-10-18 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.cc (handle_threadlist_exception): Improve diagnostic output.
-
- * sigproc.cc (child_info::sync): Only clear hProcess when execing.
- (wait_sig): Protect readsig handle.
-
-2005-10-18 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (NtLockVirtualMemory): Import.
- (NtUnlockVirtualMemory): Import.
- (GetProcessWorkingSetSize): Import.
- (SetProcessWorkingSetSize): Import.
- * cygwin.din (mlock): Export.
- (munlock): Export.
- * mmap.cc (mlock): New function.
- (munlock): Ditto.
- * ntdll.h (STATUS_WORKING_SET_QUOTA): Define.
- (LOCK_VM_IN_WSL): Define.
- (LOCK_VM_IN_RAM): Define.
- (NtLockVirtualMemory): Declare.
- (NtUnlockVirtualMemory): Declare.
- * sysconf.cc (sysconf): Implement _SC_MEMLOCK_RANGE.
- * wincap.h: Implement has_working_virtual_lock throughout.
- * wincap.cc: Ditto.
- * include/cygwin/version.h: Bump API minor version.
- * include/sys/mman.h (mlock): Declare,
- (munlock): Declare.
-
-2005-10-18 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc (child_info::sync): Use correct name when closing to
- prevent warnings when DEBUGGING.
- * spawn.cc (spawn_guts): Set myself.hProcess to pi.hProcess since this
- may have been zeroed by the previous sync.
-
-2005-10-18 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc (child_info::sync): Fix typo which caused hProcess to
- never be cleared. Only clear hProcess when not forking.
-
-2005-10-17 Christopher Faylor <cgf@timesys.com>
-
- Change process_lock to lock_process throughout.
- Change all calls to new cygthread to handle extra argument, throughout.
- * cygthread.h (cygthread::callproc): Declare new method.
- (cygthread::cygthread): Add optional length argument to allow copying
- arguments to executing thread.
- * cygthread.cc (cygthread::callproc): Define new method.
- (cygthread::stub): Use callfunc to invoke thread func to allow
- potentially allocating stack memory which will be returned.
- (cygthread::simplestub): Ditto.
- (cygthread::cygthread): Accept arglen argument. Reset ev here prior to
- activating thread. Wait for ev after activating thread if we're
- copying contents to the thread. Wait until the end before setting h,
- to allow thread synchronization.
- (cygthread::release): Don't reset ev here. Rely on that happening the next
- time the thread is activated.
- * pinfo.h (commune_process): Rename declaration from _pinfo::commune_process.
- * pinfo.cc (commune_process): Ditto for definition. Modify slightly to allow
- running as a separate cygthread.
- * sigproc.cc (child_info::sync): Always wait for both subproc_ready and
- any hProcess if we have a cygwin parent.
- (talktome): Change argument to be a pointer to siginfo_t. Contiguously
- allocate whole siginfo_t structure + any needed extra for eventual passing
- to commune_process thread.
- (wait_sig): Accommodate change in talktome argument.
-
- * pipe.cc (fhandler_pipe::fixup_after_exec): Remove debugging.
-
-2005-10-17 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc: Never load wsock32.dll. Load all wsock32 function
- from ws2_32. Rearrange symbol order accordingly. None of the ws2_32
- functions is optional right now.
- (wsadata): Move from net.cc here. Define NO_COPY.
- (wsock_init): Drop unused symbols ws2_32_handle and wsock32_handle.
- (load_wsock32): Remove.
- (WSACleanup): Remove.
- * fhandler_socket.cc: Drop Winsock 1 accommodations throughout.
- (fhandler_socket::readv): Accommodate new POSIX style struct msghdr.
- (fhandler_socket::writev): Ditto.
- (fhandler_socket::recvmsg): Ditto. Handle "old" applications using
- former struct msghdr correctly.
- * net.cc: Drop Winsock 1 accommodations throughout.
- (wsadata): Move definition to autoload.cc.
- (set_socket_inheritance): Remove.
- (convert_ws1_ip_optname): New static function to convert Winsock1
- IPPROTO_IP option values into Winsock2 IPPROTO_IP option values.
- (cygwin_setsockopt): Remove wrong and incomplete cleartext printing
- of optname. For "old" applications, convert optname from Winsock1
- to Winsock2 values before using them. Add comment to describe the
- IP_TOS weirdness on W2K and above.
- (cygwin_getsockopt): Remove wrong and incomplete cleartext printing
- of optname. For "old" applications, convert optname from Winsock1
- to Winsock2 values before using them.
- * select.cc (start_thread_socket): Forget about winsock2_active.
- * winsup.h (wsock32_handle): Remove declaration.
- (ws2_32_handle): Ditto.
- (netapi32_handle): Ditto.
- (wsadata): Ditto.
- (winsock2_active): Remove definition.
- * include/cygwin/socket.h: Change formatting slightly.
- (socklen_t): Move definition up in file.
- (struct msghdr): Convert to POSIX style.
- (struct cmsghdr): New type.
- (CMSG_ALIGN): New macro.
- (CMSG_LEN): Ditto.
- (CMSG_SPACE): Ditto.
- (CMSG_FIRSTHDR): Ditto.
- (CMSG_NXTHDR): Ditto.
- (CMSG_DATA): Ditto.
- (SCM_RIGHTS): Ditto.
- (struct OLD_msghdr): Define old msghdr structure for Cygwin internal
- purposes.
- (MSG_TRUNC): New macro.
- (MSG_CTRUNC): Ditto.
- (IP_OPTIONS): Redefine IPPROTO_IP option values to Winsock2 values.
- Keep Winsock1 values for Cygwin internal purposes.
- * include/cygwin/version.h: Bump API minor version.
- (CYGWIN_VERSION_CHECK_FOR_USING_ANCIENT_MSGHDR): Define to check for
- applications using old struct msghdr.
- (CYGWIN_VERSION_CHECK_FOR_USING_WINSOCK1_VALUES): Define to check for
- applications using old Winsock1 IPPROTO_IP values.
-
-2005-10-13 David Rothenberger <daveroth@acm.org>
- Christopher Faylor <cgf@timesys.com>
-
- * Makefile.in (MKDIRP): Just use raw $(INSTALL) rather than
- $(INSTALL_DATA). Create directories with 755 permissions.
-
-2005-10-12 Christopher Faylor <cgf@timesys.com>
-
- * dir.cc (mkdir): Abandon use of PC_WRITABLE.
- (rmdir): Ditto.
- * path.h (PC_WRITABLE): Delete.
- * path.cc (path_conv::check): Remove PC_WRITABLE accommodations.
- Revisit later.
-
-2005-10-12 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::rmdir): Convert an
- ERROR_INVALID_FUNCTION into an ERROR_FILE_NOT_FOUND. Add comment
- to explain why.
-
-2005-10-11 Christopher Faylor <cgf@timesys.com>
-
- * Makefile.in: Make sure that directories are created prior to copying
- to them.
-
-2005-10-11 Christopher Faylor <cgf@timesys.com>
-
- * net.cc (cygwin_gethostbyname): Remove debugging.
-
-2005-10-11 Corinna Vinschen <corinna@vinschen.de>
-
- * syslog.cc (try_connect_syslogd): Add priority parameter. Use writev
- to add the priority to the message in a syslog conformant way.
- (vsyslog): If facility isn't set in the priority, use default facility
- as given in call to openlog. Fix agressive use of spaces in syslog
- output. Call try_connect_syslogd with priority parameter.
-
-2005-10-11 Christopher Faylor <cgf@timesys.com>
-
- * (symlink_info::set_error): Change to return bool if input error
- should be ignored.
- (symlink_info::check): Treat path as a normal file if set_error returns
- false.
-
-2005-10-03 Christopher Faylor <cgf@timesys.com>
-
- * cygheap.h (class process_lock): New class.
- * dtable.h (class dtable): Add class process_lock as a friend.
- * dcrt0.cc (get_exit_lock): Delete.
- (do_exit): Use process_lock class instead of get_exit_lock.
- * exceptions.cc (signal_exit): Ditto.
- * pinfo.cc (pinfo::exit): Ditto.
- (_pinfo::commune_process): Set process lock around this whole function.
- (_pinfo::commune_request): Use process_lock rather than myself.lock.
- * pinfo.h (pinfo::_lock): Delete.
- (pinfo::initialize_lock): Delete.
- (pinfo::lock): Delete.
- (pinfo::unlock): Delete.
- * winsup.h (get_exit_lock): Delete declaration.
-
-2005-10-03 Corinna Vinschen <corinna@vinschen.de>
-
- * uname.cc (uname): Disable use of GetNativeSystemInfo.
-
-2005-10-01 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (get_exit_lock): Use myself.lock rather than exit_lock.
- * exceptions.cc (exit_lock): Delete.
- (events_init): Don't init exit_lock.
- * (_pinfo::commune_process): Add per-PICOM debugging.
- * sigproc.cc (talktome): Add some temporary debugging statements.
-
- * fhandler_proc.cc (format_proc_cpuinfo): Cosmetic change.
- (format_proc_partitions): Ditto.
- * syscalls.cc (locked_append): Ditto.
-
-2005-09-30 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (do_exit): Don't set ES_SET_MUTO here. Call get_exit_lock()
- instead.
- (get_exit_lock): New function. Grabs the lock and sets initial
- exit_state.
- * exceptions.cc (try_to_debug): Use low_priority_sleep.
- (sigpacket::process): Avoid handler if this is an exec stub.
- (signal_exit): Use get_exit_lock rather than manipulating the exit_lock
- critical section directly.
- * pinfo.cc (pinfo::exit): Ditto.
- * winsup.h (get_exit_lock): Declare.
- (exit_lock): Delete declaration.
-
-2005-09-30 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc: Change calls to pc.set_attributes into
- calls to pc.file_attributes throughout.
- * path.h (class path_conv): Remove superfluous set_attributes method.
-
-2005-09-30 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_floppy.cc (fhandler_dev_floppy::get_drive_info): Use
- fhandler method to access major device number. Add comment to
- explain floppy weirdness.
-
-2005-09-30 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Also use
- attributes stored in this->pc if call to GetFileInformationByHandle
- failed.
-
-2005-09-30 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Only write
- attributes if call to GetFileInformationByHandle was successful.
-
-2005-09-29 Christopher Faylor <cgf@timesys.com>
-
- * fork.cc (frok::parent): Simplify error messages. Don't issue an
- error when child.remember fails.
- (fork): When appropriate, build up an error message from grouped.error.
-
-2005-09-29 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_floppy.cc (fhandler_dev_floppy::get_drive_info): Don't call
- EX ioctls on floppy drives.
-
-2005-09-29 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc (mkdir): Check for trailing /. or /.. component.
- (rmdir): Ditto.
- * path.cc (has_dot_last_component): New function.
- * path.h (has_dot_last_component): Add declaration.
-
-2005-09-29 Corinna Vinschen <corinna@vinschen.de>
-
- * crt0.cc: Remove PPC considerations.
- (WinMainCRTStartup): Add symbol as alias to mainCRTStartup.
-
-2005-09-28 Christopher Faylor <cgf@timesys.com>
-
- Change name from commune_recv to commune_process throughout.
- Change name from commune_send to commune_request throughout.
- * pinfo.h (PICOM_EXTRASTR): New flag.
- (PICOM_FIFO): Define with new flag.
- (_pinfo::hello_pid): Delete.
- (_pinfo::tothem): Delete.
- (_pinfo::fromthem): Delete.
- (_pinfo::commune_process): Rename from commune_recv. Add a siginfo_t
- argument to declaration.
- (_pinfo::commune_request): Rename from commune_send. Change DWORD to
- __uint32_t in declaration.
- * pinfo.cc (_pinfo::commune_process): Rename from commune_recv. Add
- siginfo_t argument. Use information from argument rather than reading
- from another pipe. Synchronize with other process's commune event.
- (_pinfo::commune_request): Rename from commune_send. Change DWORD to
- __uint32 in argument. Fill out information in new siginfo_t element
- and rely on extended operation of sig_send rather than trying to deal
- with synchronization issues here. Use process handle and read pipe
- information filled out by sig_send to gather information from the other
- process.
- * sigproc.cc (sig_send): Take special action if "communing" to ensure
- synchronization with the other process and to return information about
- the other process to the caller.
- (talktome): Accept a siginfo_t and handle arguments. Read additional
- information from the signal pipe when _si_commune._si_code has the
- PICOM_EXTRASTR flag set.
- (wait_sig): Pass the transmitted siginfo_t struct and the pipe handle
- to talktome. Close pipe read handle as soon as possible after we
- detect that we're exiting.
-
-2005-09-28 Christopher Faylor <cgf@timesys.com>
-
- * hookapi.cc (hook_or_detect_cygwin): Correct inverted test for whether
- to allocate a buffer by always allocating a buffer.
-
-2005-09-28 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_dev_raw): Delete current_position and
- eof_detected status flag. Delete is_eom and is_eof methods.
- Move drive_size, bytes_per_sector, eom_detected status flag, as well
- as the methods read_file, write_file, raw_read and raw_write to ...
- (class fhandler_dev_floppy): ... here. Remove is_eom and is_eof
- methods. Add dup method.
- * fhandler_floppy.cc (IS_EOM): New macro.
- (fhandler_dev_floppy::is_eom): Remove.
- (fhandler_dev_floppy::is_eof): Remove.
- (fhandler_dev_floppy::fhandler_dev_floppy): Initialize status flags.
- (fhandler_dev_floppy::get_drive_info): Only call EX functions on
- systems supporting them and stop suffering strange delays.
- (fhandler_dev_floppy::read_file): Move here, drop setting
- current_position.
- (fhandler_dev_floppy::write_file): Move here, drop setting
- current_position.
- (fhandler_dev_floppy::open): Rearrange comment.
- (fhandler_dev_floppy::dup): New method.
- (fhandler_dev_floppy::get_current_position): New inline method. Use
- instead of former current_position were appropriate.
- (fhandler_dev_floppy::raw_read): Move here. Drop EOF handling.
- (fhandler_dev_floppy::raw_write): Move here. Drop EOF handling.
- (fhandler_dev_floppy::lseek): Remove useless conditions. Convert
- sector_aligned_offset to LARGE_INTEGER to improve SetFilePointer call.
- (fhandler_dev_floppy::ioctl): Move blocksize check in RDSETBLK case
- to here.
- * fhandler_raw.cc (fhandler_dev_raw::is_eom): Remove.
- (fhandler_dev_raw::is_eof): Remove.
- (fhandler_dev_raw::write_file): Remove.
- (fhandler_dev_raw::read_file): Remove.
- (fhandler_dev_raw::raw_read): Remove.
- (fhandler_dev_raw::raw_write): Remove.
- (fhandler_dev_raw::dup): Drop copying removed members.
- (fhandler_dev_raw::ioctl): Drop blocksize testing.
- * wincap.h: Implement has_disk_ex_ioctls throughout.
- * wincap.cc: Ditto.
- (wincap_vista): Preliminary wincaps for Windows Vista/Longhorn.
- (wincapc::init): Add Vista/Longhorn handling.
-
-2005-09-28 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (getstack): New function.
- (alloc_stack): Use tls stuff for stack info rather than calling
- VirtualQuery.
- (dll_crt0_0): Initialize _impure_ptr stuff much earlier. Move
- init_console_handler here.
- * fork.cc (class frok): New class renamed from local fork() struct.
- (stack_base): Change argument type. Use tls stuff to determine stack
- info rather than calling VirtualQuery.
- (frok::child): Rename from fork_child. Eliminate now unneeded
- arguments.
- (frok::parent): Rename from fork_parent and ditto. Set error and errno
- as appropriate. Fixup impersonation in cleanup, if needed. Try harder
- to set errno appropriately.
- (fork): Define "grouped" as a frok type. Deal with errors from
- fork_parent here.
- * init.cc (dll_entry): Remove init_console_handler call.
-
-2005-09-28 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (_pinfo::dup_proc_pipe): Ignore error if the child process
- has just gone away.
-
-2005-09-27 Christopher Faylor <cgf@timesys.com>
-
- * init.cc (prime_threads): Make this static, as it should be.
- (dll_entry): Apply cosmetic changes to define closer to the way MSDN
- suggests.
-
-2005-09-27 Corinna Vinschen <corinna@vinschen.de>
-
- * pthread.cc (mangle_sem_name): Use cygheap->shared_prefix instead
- of fiddling with wincap.has_terminal_services manually.
-
-2005-09-27 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.cc (cygheap_init): Add GLOBAL_PRIV to hProcToken explicitely
- since hProcImpToken isn't initialized here.
- * shared.cc (open_shared): Always print mapname instead of name in
- debug output.
-
-2005-09-27 Christopher Faylor <cgf@timesys.com>
-
- * strace.cc (strace::vsprntf): Avoid printing a zero pid.
-
-2005-09-27 Corinna Vinschen <corinna@vinschen.de>
-
- * init.cc (dll_entry): Call IsWow64Process with GetCurrentProcess
- as process handle since hMainProc isn't initialized here.
-
-2005-09-27 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_floppy.cc (fhandler_dev_floppy::get_drive_info): Always
- try IOCTL_DISK_GET_DRIVE_GEOMETRY_EX and
- IOCTL_DISK_GET_PARTITION_INFO_EX ioctls first, to allow access to GPT
- partitioned disks. Fall back to old non-EX ioctls otherwise.
- Add comment to explain NT4 weirdness.
-
-2005-09-26 Corinna Vinschen <corinna@vinschen.de>
-
- * errno.cc (errmap): Map ERROR_SEEK and ERROR_SECTOR_NOT_FOUND.
-
-2005-09-26 Christopher Faylor <cgf@timesys.com>
-
- * exceptions.cc (_cygtls::call_signal_handler): Minor cleanup.
-
-2005-09-26 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_dev_raw): Add drive information members
- drive_size, current_position and bytes_per_sector.
- (fhandler_dev_floppy::get_drive_info): Declare.
- * fhandler_floppy.cc (fhandler_dev_floppy::is_eom): Define ERROR_SEEK
- and ERROR_SECTOR_NOT_FOUND as end-of-medium conditions.
- (fhandler_dev_floppy::get_drive_info): New method to have one function
- retrieving drive info.
- (fhandler_dev_floppy::open): Call get_drive_info to get drive
- information right from the start.
- (fhandler_dev_floppy::lseek): Use and set drive information members.
- Especially keep track of current_position.
- (fhandler_dev_floppy::ioctl): Ditto.
- * fhandler_raw.cc (fhandler_dev_raw::write_file): Keep track of
- current_position.
- (fhandler_dev_raw::read_file): Ditto.
- (fhandler_dev_raw::raw_read): Never try to read beyond end-of-medium.
- (fhandler_dev_raw::dup): Handle new drive information members.
-
-2005-09-26 Christopher Faylor <cgf@timesys.com>
-
- * exceptions.cc (handle_exceptions): Just set si_code to SI_KERNEL
- first and let it be overridden.
-
-2005-09-26 Yitzchak Scott-Thoennes <sthoenna@efn.org>
-
- * exceptions.cc (_cygtls::call_signal_handler): Call signal handler
- with extra siginfo_t * and void * parameters when SA_SIGINFO flag is
- set.
- * signal.cc (signal): Clear SA_SIGINFO flag.
- (sigqueue): Fix incorrect setting of si_code.
- * sigproc.cc (signal_fixup_after_exec): Clear SA_SIGINFO flag when
- setting handler to SIG_DFL.
-
-2005-09-26 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (proc_waiter): Properly fill out si_code as according to SUSv3.
-
-2005-09-26 Christopher Faylor <cgf@timesys.com>
-
- * exceptions.cc (handle_exceptions): Properly fill out si_code as
- according to SUSv3.
-
-2005-09-25 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc (wait_sig): Cosmetic change.
- * pinfo.cc (pinfo::exit): Don't explicitly remove myself since some
- other thread may still be using it.
-
-2005-09-24 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc (sigproc_terminate): More reversion of
- always-exit-from-sigthread change.
-
-2005-09-23 Christopher Faylor <cgf@timesys.com>
-
- * shared.cc (open_shared): Add crucial bit of debugging info.
-
-2005-09-23 Christopher Faylor <cgf@timesys.com>
-
- Semi-reversion of always-exit-from-sigthread change of 2005-09-15.
- * exceptions.cc (sigpacket::process): Eliminate return after call to
- reinstated noreturn function.
- (signal_exit): Allow function to exit when a captive process has been
- terminated.
- * pinfo.cc (pinfo::exit): Enter exit_lock here. Once again exit here
- under control of exit_lock.
- * sigproc.cc (sig_send): Don't wait for completion if process is exiting.
- Remove special __SIGEXIT accommodations.
- (wait_sig): Just exit the thread when a __SIGEXIT has been detected.
- Don't exit the process.
-
-2005-09-23 Christopher Faylor <cgf@timesys.com>
-
- * net.cc (cygwin_gethostbyname): Remove debugging cruft.
-
-2005-09-23 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (pinfo::exit): Call ExitProcess if called from signal
- thread.
-
-2005-09-23 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (pinfo::exit): Eliminate use of _my_tls.thread_handle.
- * tlsoffsets.h: Regenerate.
-
-2005-09-23 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.h (struct _cygtls::thread_handle): Remove/revert.
- * sigproc.h (struct sipacket::thread_handle): Put thread_handle here.
- * sigproc.cc (sigproc_terminate): Move setting of thread_handle...
- (sig_send): ...to here. Put it in packet being sent. Only close
- pack.wakeup when we're waiting for completion.
- (wait_sig): Use thread_handle directly from received packet.
-
-2005-09-22 Christopher Faylor <cgf@timesys.com>
-
- * cygheap.cc (cygheap_fixup_in_child): It's not just for exec.
- * cygtls.h (struct _cygtls::thread_handle): New field.
- * dcrt0.cc (exit_lock): Remove declaration.
- * winsup.h (exit_lock): Add declaration.
- * exceptions.cc (sigpacket::process): Properly return after
- signal_exit.
- * pinfo.cc (pinfo::exit): Only exit the process if
- _my_tls.thread_handle has not been filled out -- which should be an
- impossible event.
- * sigproc.cc (sigproc_terminate): Fillout _my_tls.thread_handle to
- provide something for wait_sig to wait for. Use the siginfo_t version
- of sig_send and fill out the tls argument with _my_tls.
- (wait_sig): Wait for the thread specified in pack.tls or (for now)
- complain bitterly if it doesn't exit.
- * tlsoffsets.h: Regenerate.
-
-2005-09-22 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (set_myself): Call strace.hello unconditionally when
- DEBUGGING.
- (pinfo::init): Sleep and issue debugging output before looping when a
- PID_EXITED is found.
-
-2005-09-22 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_base::fstat_helper): Fix copy/paste
- bug.
-
-2005-09-22 Christopher Faylor <cgf@timesys.com>
-
- * strace.cc (strace::vsprntf): Avoid accessing myself->pid if !myself.
-
-2005-09-22 Christopher Faylor <cgf@timesys.com>
-
- * include/sys/strace.h (_STRACE_ON): Remove semicolon from definition.
- (_STRACE_OFF): Remove semicolon from definition.
-
-2005-09-22 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_base::fstat_helper): Declare with additional
- file attributes argument.
- * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Use
- file attributes evaluated from NtQueryFileInformation or
- FileInformationByHandle in call to fstat_helper.
- Set pc.fileattr from just evaluated file attributes here.
- (fhandler_base::fstat_by_name): Use file attributes evaluated from
- FindFileFirst or default attribute in call to fstat_helper.
- Set pc.fileattr from just evaluated file attributes here.
- (fhandler_base::fstat_helper): Use file attributes given as argument,
- not file attributes stored in this fhandler, since this information
- is potentially wrong. Add comment to explain this.
- * path.h (has_attribute): New global inline function.
- (path_conv::set_attributes): New method to change fileattr.
-
-2005-09-21 Christopher Faylor <cgf@timesys.com>
-
- * cygthread.cc (cygthread::operator new): Just use getenv() to look for
- CYGWIN_FREERANGE_NOCHECK since the Windows environment may be truncated
- by being previously execed.
-
-2005-09-20 Christopher Faylor <cgf@timesys.com>
-
- * spawn.cc (av::fixup): Just blindly run any file if it has a .bat or
- .cmd extension.
-
-2005-09-19 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (do_exit): Only call sigproc_terminate from one location --
- pinfo::exit.
- * pinfo.cc (pinfo::exit): Move sigproc_terminate later so that signals
- can be processed while waiting for hExeced child.
- (pinfo::maybe_set_exit_code_from_windows): Set exit code from sigExeced
- if it is non-zero. Set exit_state to ES_EXEC_EXIT prior to waiting for
- captive process exit code.
- * exceptions.cc (sigExeced): New global variable.
- (signal_exit): Remove noreturn attribute from declaration.
- (signal_exit): Just terminate captive process and return if hExeced on
- the theory that the exit will be subsequently handled in the main
- thread.
- * sigproc.cc (sigproc_terminate): Eliminate test for
- ES_SIGPROCTERMINATE and use ES_FINAL instead.
- (sig_send): Use no_signals_available instead of duplicate test.
- * winsup.h (ES_EXEC_EXIT): New enum.
- (ES_SIGPROCTERMINATE): Delete.
-
-2005-09-19 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc (talktome): Take siginfo_t argument. Don't scan all pids
- trying to find one that's talking to me. Just use the pid from
- siginfo_t.
- (wait_pid): Pass siginfo_t argument to talktome.
-
-2005-09-17 Christopher Faylor <cgf@timesys.com>
-
- * pipe.cc (fhandler_pipe::open): Use 'cfree' to free buffer since it is
- now allocated by cmalloc.
-
-2005-09-17 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_inet_ntop): Change len argument to socklen_t to
- follow SUSv3.
- * include/arpa/inet.h (inet_ntop): Ditto.
- * include/cygwin/in.h: Include cygwin/socket.h to get socklen_t.
-
-2005-09-16 Christopher Faylor <cgf@timesys.com>
-
- * environ.cc (build_env): Use "kilo"bytes not "mega"bytes. Return
- immediately on error.
- * spawn.cc (spawn_guts): Set return value to -1 on error from
- build_env.
-
-2005-09-16 Christopher Faylor <cgf@timesys.com>
-
- * environ.cc (build_env): Clear envblock and return NULL on attempt to
- use env var > 32K.
- * spawn.cc (spawn_guts): Set E2BIG if build_env detects an error.
-
-2005-09-16 Christopher Faylor <cgf@timesys.com>
-
- * environ.cc (environ_init): Protect with a 'myfault' in case
- GetEnvironmentStrings misbehaves.
-
-2005-09-16 Christopher Faylor <cgf@timesys.com>
-
- * environ.cc (environ_init): Add debugging output with value returned
- from GetEnvironmentStrings.
-
-2005-09-16 Christopher Faylor <cgf@timesys.com>
-
- * environ.cc (environ_init): Issue an error if GetEnvironmentStrings
- fails and return.
-
-2005-09-15 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.h (EXITCODE_SET): Move out of range of Windows error.
- (EXITCODE_NOSET): Ditto.
- * sigproc.cc (no_signals_available): Remove check for hwait_sig. Just
- rely on my_sendsig. Pass in an argument controlling when it is
- appropriate to test EXITCODE_SET.
- (proc_can_be_signalled): Remove checks for myself since this function
- is never called in that context.
- (sigproc_init): Pre-initialize my_sendsig to non-zero so that
- proc_can_be_signalled will know that we expect to be signalable soon.
- (sig_send): Change debugging output.
-
-2005-09-15 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc (no_signals_available): Return true if sending to self
- from the signal thread.
- (wait_sig): Correct so that WaitForSingleObject is called when
- hMainThread is != 0, rather than the reverse.
-
- * cygheap.cc (cygheap_fixup_in_child): Clarify potential error message.
-
- * fork.cc (fork_copy): Cosmetic change.
-
-2005-09-15 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc (wait_sig): Reorganize exit case so that ExitProcess is
- always called, since that is the intent of sending a __SIGEXIT. Wait
- forever for main thread to go away since, presumably, the main thread
- told us it was going away.
-
-2005-09-14 Christopher Faylor <cgf@timesys.com>
-
- * spawn.cc (av::fixup): Avoid breaking out of the wrong "loop".
-
-2005-09-14 Christopher Faylor <cgf@timesys.com>
-
- * hookapi.cc (hook_or_detect_cygwin): Simplify very slightly.
- * spawn.cc (av::fixup): Guard against problems reading an executable
- which does not match Microsoft's documentation about PE format.
-
-2005-09-14 Christopher Faylor <cgf@timesys.com>
-
- * spawn.cc (av::error): Eliminate.
- (av::av): Remove reference to error.
- (av::replace0_maybe): Ditto.
- (av::dup_maybe): Ditto.
- (av::dup_all): Ditto.
- (av::unshift): Ditto.
- (spawn_guts): On a fault, return E2BIG only if ENOMEM has been set.
- Otherwise return EFAULT.
-
-2005-09-14 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.h (san): New structure.
- (cygtls::andreas): New element. Replaces _myfault and _myfault_errno.
- (cygtls::fault_guarded): Use andreas.
- (cygtls::return_from_fault): Ditto.
- (cygtls::setup_fault): Add a parameter denoting where to store old
- fault handler, if any and use it to "stack" faults.
- (cygtls::reset_fault): Restore fault from parameter.
- (myfault::sebastian): New variable.
- (myfault::~myfault): Pass sebastian to reset_fault.
- (myfault::myfault): Store old fault values in sebastian.
-
-2005-09-14 Christopher Faylor <cgf@timesys.com>
-
- * heap.cc (heap_init): Revert 2005-09-11 patch as it seems to
- inexplicably cause problems with emacs.
-
-2005-09-14 Christopher Faylor <cgf@timesys.com>
-
- Remove some more unneeded 'return;'s throughout.
-
-2005-09-14 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.h: Protect declaration so that it only happens when
- __INSIDE_CYGWIN__.
-
-2005-09-14 Christopher Faylor <cgf@timesys.com>
-
- * exceptions.cc (sigtid): Remove declaration.
- (handle_exceptions): Use _sig_tls rather than sigtid to determine if
- this is the signal thread.
- (set_signal_mask): Ditto for conditionalized CGF code.
- * pinfo.cc (pinfo::exit): Exit the thread if we forcefully terminated
- the main thread.
- * sigproc.cc (sigtid): Delete.
- (_sig_tls): Define.
- (sig_clear): Use _sig_tls rather than sigtid to determine if this is
- the signal thread.
- (sig_dispatch_pending): Ditto.
- (wait_sig): Set _sig_tls here.
-
-2005-09-13 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (do_exit): Move sigproc_terminate call later since signal
- handling was still needed for subsequent stuff. Call sigproc_terminate
- with new exit_state value.
- * pinfo.cc (pinfo::exit): Call sigproc_terminate with new exit_state
- value.
- * sigproc.cc (proc_terminate): Remove unnecessary (void) parameter.
- (sigproc_terminate): Ditto. Add new argument to accept exit state to
- be set.
- (wait_sig): Reorganize __SIGEXIT handling. Add more debugging output.
- * winsup.h (sigproc_terminate): Declare with new exit_state argument.
- (exit_states): Reorganize to reflect new exit ordering of
- sigproc_terminate.
-
-2005-09-13 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (do_exit): Rely on sigproc_terminate to set exit_state
- appropriately.
- * pinfo.cc (pinfo::exit): Always call sigproc_terminate here. Rely on
- sigproc_terminate to signal signal thread to handle eventual process
- exit.
- * sigproc.cc (no_signals_available): Change criteria for determining if
- this process can handle signals to itself.
- (my_sendsig): New variable. Copy of my sendsig handle.
- (proc_can_be_signalled): Don't send signals if exit code is set.
- (sigproc_terminate): Use and set exit_state appropriately to determine
- when to do anything. Send __SIGEXIT to self to control process exit.
- (sig_send): Use my_sendsig for sending signals. Don't call
- proc_can_be_signalled for myself since the criteria is now different
- for sending signals to myself.
- (wait_sig): Copy myself->sendsig to my_sendsig for future use. Exit
- signal loop when __SIGEXIT is received. Wait for main thread to exit
- and use its exit status to actually exit process.
- * sigproc.h (__SIGEXIT): New enum.
-
-2005-09-13 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (alloc_stack): Eliminate superfluous "return;".
- * debug.cc (add_handle): Ditto.
- * devices.in (device::parse): Ditto.
- * dtable.cc (dtable::vfork_parent_restore): Ditto.
- (dtable::vfork_child_fixup): Ditto.
- * environ.cc (parse_options): Ditto.
- * errno.cc (seterrno_from_win_error): Ditto.
- * exceptions.cc (sig_handle_tty_stop): Ditto.
- (set_signal_mask): Ditto.
- * fhandler.cc (fhandler_base::read): Ditto.
- (fhandler_base::operator delete): Ditto.
- (fhandler_base::seekdir): Ditto.
- (fhandler_base::rewinddir): Ditto.
- * fhandler_console.cc (fhandler_console::read): Ditto.
- (fhandler_console::fixup_after_exec): Ditto.
- * sigproc.cc (sigproc_init): Ditto.
- (sigproc_terminate): Ditto.
-
- * devices.cc: Regenerate.
-
-2005-09-13 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc (wait_sig): Be more defensive about detecting when we're
- exiting.
-
-2005-09-12 Christopher Faylor <cgf@timesys.com>
-
- * cygthread.cc (cygthread::cygthread): Add more info to fatal error.
-
- * fhandler_disk_file.cc (fhandler_disk_file::readdir): Temporarily
- remove insertion of /dev into root directory.
- * path.cc (path_conv::check): Ditto.
-
-2005-09-11 Christopher Faylor <cgf@timesys.com>
-
- * heap.cc (heap_init): Allocate heap from top down as a hedge against
- subsequent ERROR_INVALID_ADDRESS in forked processes when CTRL-C is
- pressed.
-
-2005-09-09 Christopher Faylor <cgf@timesys.com>
-
- * heap.cc (heap_init): Be slightly more aggressive when trying to
- allocate heap. Change fatal error message to avoid confusion with
- cygheap.
-
- * spawn.cc (linebuf::finish): New function.
- (linebuf::add): Cosmetic change.
- (spawn_guts): Only avoid building windows command line if the program
- being executed was actually mounted with -X. Don't return E2BIG if we
- hit the 32K size and we're executing a detected cygwin program. Just
- silently truncate the windows command line, instead.
-
-2005-09-08 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_serial.cc (fhandler_serial::tcgetattr): Just zero c_cflag
- here rather than clearing CBAUD after the fact.
- * termios.cc (tcgetattr): Revert previous change.
-
-2005-09-08 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_serial.cc (fhandler_serial::ioctl): Always return 0 for
- window size.
- * termios.cc (tcgetattr): Clear out baud part of c_cflag since it is
- always ignored.
-
-2005-09-08 Corinna Vinschen <corinna@vinschen.de>
-
- * exceptions.cc (ctrl_c_handler): Disable any special CTRL_LOGOFF_EVENT
- handling and add longish comment about the reasons.
-
-2005-09-07 Christopher Faylor <cgf@timesys.com>
-
- * hookapi.cc (rvadelta): Change argument to DWORD to eliminate a
- compiler warning.
-
- * path.h (path_conv::set_cygexec): New function.
- * spawn.cc (av::iscygwin): Eliminate.
- (av::av): Don't initialize iscygwin.
- (spawn_guts): Just use real_path.iscygexec for all tests.
- (av::fixup): Short circuit test if .exe extension and known cygexec.
- Set cygexec flag appropriately if we find that program uses cygwin1.dll.
-
-2005-09-06 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (initial_env): Don't attempt stracing if dynamically loaded.
- (dll_crt0_0): Move console initialization earlier.
- * init.cc (dll_entry): Move console initialization here.
- * exceptions.cc (init_console_handler): Fully remove any old console
- handler.
- (handle_sigsuspend): Make cancelable when called from non-main thread.
-
- * spawn.cc (spawn_guts): Don't fill out windows argv if we've deduced
- that this is a cygwin-using program.
- (av::fixup): Always check executables to see if they are using
- cygwin1.dll. Don't consider .com files to be scripts.
- * hookapi.cc (rvadelta): New function.
- (PEHeaderFromHModule): Simplify slightly.
- (hook_or_detect_cygwin): Use passed in name argument for "HMODULE"
- rather than incorrectly reading current program. Calculate delta
- needed to read image data and file names if this isn't a real
- "HMODULE".
-
-2005-09-06 Corinna Vinschen <corinna@vinschen.de>
-
- * thread.h: Revert patch from 2005-09-05.
- * thread.cc (pthread_mutex::can_be_unlocked): Return true also if
- mutex is owned by MUTEX_OWNER_ANONYMOUS.
-
-2005-09-05 Christopher Faylor <cgf@timesys.com>
-
- * cygheap.cc (cygheap_init): Eliminate debugging #if.
-
- * fork.cc (fork_parent): Don't issue errors if "somebody" has set the
- PID_EXITED flag on a child. Don't close process handle if it has
- potentially already been closed.
- * pinfo.cc (winpids::add): Eliminate PID_ALLPIDS handling which was
- obsoleted by previous changes.
-
- * spawn.cc (av::fixup): Do win16 detection for .com files. Make sure
- that buffer has been unmapped in all cases.
-
-2005-09-05 Corinna Vinschen <corinna@vinschen.de>
-
- * thread.h (pthread_mutex::get_pthread_self): Remove.
- (pthread_mutex::lock): Use ::pthread_self as self parameter.
- (pthread_mutex::trylock): Ditto.
- (pthread_mutex::unlock): Ditto.
- (pthread_mutex::destroy): Ditto.
-
-2005-09-02 Dave Korn <dave.korn@artimi.com>
-
- * Makefile.in (CXXFLAGS): Use 'override' to correctly set flags to
- generate dependencies when invoked from top-level make.
-
-2005-08-28 Christopher Faylor <cgf@timesys.com>
-
- * exceptions.cc (set_process_mask_delta): Conditionalize debugging
- output.
- * sigproc.cc (proc_subproc): Make strace output a little more verbose.
-
-2005-08-28 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.h (__ljfault): Declare.
- (_cygtls::return_from_fault): Use __ljfault.
- * exceptions.cc (set_signal_mask): Revert previous checkin.
- * gendef (__sjfault): Split out into a separate function which doesn't
- bother with any special signal locking.
- (_ljfault): Return from a __sjfault without bothering with signals.
-
-2005-08-28 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.h (_local_storage::strerror_buf): Allocate more space.
- * errno.cc (strerror_worker): New function, adapted from strerror.
- (strerror): Use strerror_worker.
- * tlsoffsets.h: Regenerate.
-
- * exceptions.cc (set_signal_mask): Minimize time during which mask_sync
- is held.
-
-2005-08-28 Christopher Faylor <cgf@timesys.com>
-
- * cygwin.din: Correct readdir_r typo.
-
-2005-08-27 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
-
- * dir.cc (readdir_r): Invert sense on error test.
-
-2005-08-25 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (normalize_posix_path): Keep two leading slashes
- intact throughout.
- (normalize_win32_path): Revert to only checking for slash.
- (realpath): Convert drive letters to cygdrive paths before
- doing anything else.
- * shared_info.h (mount_info::cygdrive_posix_path): Make public.
-
-2005-08-25 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (realpath): Drop call to mount_info::conv_to_posix_path
- in favor of calling path_conv with PC_POSIX flag. Align error
- handling closer to POSIX. As on Linux, return user space allocated
- memory if second parameter is NULL.
-
-2005-08-25 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (normalize_win32_path): Honor network paths. Fold more
- than two leading dir separators into one. Check for dir separator
- instead of just slashes to handle incoming Win32 paths correctly.
-
-2005-08-25 Christopher Faylor <cgf@timesys.com>
-
- * errno.cc (errmap): Translate ERROR_NO_MORE_ITEMS to ENMFILE.
-
-2005-08-24 Christopher Faylor <cgf@timesys.com>
-
- * exceptions.cc (handle_sigsuspend): Just sleep forever if called from
- non-main thread.
- (sigpacket:process): Simplify logic which determines when and how a
- signal is masked. Don't trigger sigwait if there is a signal handler.
- * sigproc.cc (wait_sig): Update comment. Try to process a signal which
- is in the queue if it isn't queued for the target thread (this is still
- not right).
-
-2005-08-24 Christopher Faylor <cgf@timesys.com>
-
- * spawn.cc (perhaps_suffix): Record errno-type error value in third
- argument.
- (find_exec): On error, set errno returned from perhaps_suffix.
- (spawn_guts): Ditto.
-
-2005-08-24 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_virtual.cc (fhandler_virtual::close): Don't free filebuf if
- it's NULL.
- * pinfo.cc (_pinfo::commune_send): Fix test for incorrect number of
- bytes read from pipe.
-
-2005-08-24 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (endusershell): Reset shell_fp to NULL to allow
- subsequent getusershell calls.
-
-2005-08-24 Christopher Faylor <cgf@timesys.com>
-
- * path.cc (path_conv::check): Fill in fileattr for /dev, defaulting to
- directory if /dev doesn't actually exist.
- (win32_device_name): Don't consider FH_DEV to be a device since it's
- really a directory which should go through mount processing.
-
-2005-08-24 Christopher Faylor <cgf@timesys.com>
-
- * cygheap.h (cygheap_types): Add HEAP_COMMUNE.
- * fhandler_proc.cc: Use cygheap rather than user heap for allocation of
- filebuf throughout.
- * fhandler_registry.cc: Ditto.
- * fhandler_virtual.cc: Ditto.
- * fhandler_process.cc: Ditto.
- (get_mem_values): Use malloc/realloc/free rather than new.
- * pinfo.cc (_pinfo::commune_send): Allocate on cygwin heap rather than
- user heap. Avoid calling ReadFile when correct number of characters
- have been read or suffer buffer corruption.
- (_pinfo::fd): Allocate on cygwin heap rather than user heap.
- (_pinfo::fds): Ditto.
- (_pinfo::root): Ditto.
- (_pinfo::cwd): Ditto.
- (_pinfo::cmdline): Ditto.
-
- * devices.h (FH_DEV): New define.
- * devices.in: Detect lone /dev.
- * devices.cc: Regenerate.
- * path.cc (path_conv::check): Treat FH_DEV as a special case.
-
-2005-08-23 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.h (set_signal_mask): Remove default on second parameter and
- make pass by reference.
- * signal.cc (abort): Accommodate change to set_signal_mask.
- * select.cc (pselect): Ditto.
- * exceptions.cc (handle_sigsuspend): Ditto.
- (ctrl_c_handler): Ditto.
- (sighold): Ditto.
- (sigrelse): Ditto.
- (set_process_mask_delta): Ditto.
- (_cygtls::call_signal_handler): Ditto.
-
- * fhandler_disk_file.cc (fhandler_disk_file::readdir): Return ENMFILE
- if __handle is not set. Set __handle to NULL when out of files.
- (fhandler_disk_file::rewinddir): Don't close handle if it's NULL.
- (fhandler_disk_file::closedir): Ditto.
-
-2005-08-22 Christopher Faylor <cgf@timesys.com>
-
- * dir.cc (readdir_worker): Make static. Only add '.' and '..' when
- readdir fails due to ENMFILE.
- * fhandler_disk_file.cc (fhandler_disk_file::readdir): Only close
- handle on error != ENMFILE.
-
-2005-08-22 Corinna Vinschen <corinna@vinschen.de>
-
- * mtinfo.h (mtinfo_drive::error): Fix argument bug in debug_printf call.
-
-2005-08-20 Christopher Faylor <cgf@timesys.com>
-
- * cygerrno.h (geterrno_from_win_error): Change declaration to default
- to using GetLastError and EACCESS.
- * cygwin.din: Export readdir_r.
- * include/cygwin/version.h: Bump API version number to 138.
- * syscalls.cc (readdir_worker): New function, renamed from old
- readdir() function.
- (readdir): Use readdir_worker.
- (readdir_r): New function.
- * fhandler.h (fhandler_base::readdir): Accommodate second argument
- indicating dirent buffer.
- (fhandler_disk_file::readdir): Ditto.
- (fhandler_cygdrive::readdir): Ditto.
- (fhandler_proc::readdir): Ditto.
- (fhandler_netdrive::readdir): Ditto.
- (fhandler_registry::readdir): Ditto.
- (fhandler_process::readdir): Ditto.
- * fhandler.cc (fhandler_base::readdir): Ditto.
- * fhandler_disk_file.cc (fhandler_disk_file::readdir): Ditto.
- * fhandler_cygdrive.cc (fhandler_cygdrive::readdir): Ditto.
- * fhandler_proc.cc (fhandler_proc::readdir): Ditto.
- * fhandler_netdrive.cc (fhandler_netdrive::readdir): Ditto.
- * fhandler_registry.cc (fhandler_registry::readdir): Ditto.
- * fhandler_process.cc (fhandler_process::readdir): Ditto.
- * include/sys/dirent.h (readdir_r): Add declaration.
-
-2005-08-19 Christopher Faylor <cgf@timesys.com>
-
- * fhandler.h (dirent_states): Add dirent_saw_proc.
- * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fill in "proc"
- if it is the root dir and it is missing.
-
-2005-08-19 Christopher Faylor <cgf@timesys.com>
-
- * fhandler.h (dirent_states): Add dirent_isroot, dirent_saw_cygdrive,
- dirent_saw_dev.
- * dir.cc (opendir): Don't zero __flags here. Push that responsibility
- to opendir methods.
- (seekdir): Preserve dirent_isroot in __flags.
- (rewinddir): Ditto.
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Set
- dirent_isroot appropriately.
- (fhandler_disk_file::readdir): Fill in "cygdrive" and "dev" if it is
- the root dir and they are missing.
- * fhandler_process.cc (fhandler_process::opendir): Set __flags here.
- * fhandler_virtual.cc (fhandler_virtual::opendir): Set __flags here.
-
-2005-08-19 Christopher Faylor <cgf@timesys.com>
-
- * winsup.h (create_pipe): Declare new function.
- (CreatePipe): New define.
- * miscfuncs.cc (create_pipe): Define new function.
-
-2005-08-18 Christopher Faylor <cgf@timesys.com>
-
- * fhandler.h (fhandler_tty_common::lseek): Declare new method.
- (fhandler_tty_slave::lseek): Delete old method.
- (fhandler_tty_master::lseek): Delete old method.
- * fhandler_tty.cc (fhandler_tty_common::lseek): Define new method.
-
-2005-08-18 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::recvfrom): Always initialize
- ret to 0.
- (fhandler_socket::recvmsg): Ditto.
-
-2005-08-18 Corinna Vinschen <corinna@vinschen.de>
-
- * errno.cc (strerror): Check errnum for underflow.
-
-2005-08-17 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (dll_crt0_1): Tweak debugging stuff.
-
-2005-08-17 Pavel Tsekov <ptsekov@gmx.net>
-
- * fhandler_tty.cc (fhandler_tty_common::close): Rearrange the code so
- that the master end of the input and output pipes is closed before
- signalling an EOF event to the slave.
- (fhandler_pty_master::close): Likewise.
-
-2005-08-14 Corinna Vinschen <corinna@vinschen.de>
-
- * init.cc (respawn_wow64_process): Make inline function. Remove
- "noreturn" attribute. Add additional check if parent process is
- actually a 64 bit process.
- (dll_entry): Only test WOW64 processes with a stack in the usual
- "dangerous" process space area.
-
-2005-08-11 Troy Curtiss <trcurtiss@gmail.com>
-
- * fhandler_serial.cc (fhandler_serial::tcgetattr): Return current baud
- rate regardless of current DTR state.
-
-2005-08-11 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc: Remove ld_preload declaration.
- * winsup.h: Move ld_preload declaration here.
- * fork.cc (fork_child): Call ld_preload() before returning.
-
-2005-08-11 Christopher Faylor <cgf@timesys.com>
-
- * child_info. (CURR_CHILD_INFO_MAGIC): Refresh.
- (child_info::child_info()): New constructor.
- (child_info_spawn::child_info_spawn()): Ditto.
- (child_info_spawn::operator new): New operator.
- (child_info_spawn::set): New function.
- * spawn.cc (av()): New constructor.
- (av::operator new): New operator.
- (av::set): New function.
- (spawn_guts): Reorganize so that classes which allocate are defined
- early in the function so that it can be properly cleaned up after an
- efault. Set errno to E2BIG in the event of a SEGV situation.
-
-2005-08-08 Christopher Faylor <cgf@timesys.com>
-
- * include/sys/cdefs.h: Remove extra line.
-
-2005-08-08 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (get_reg_security): New static function.
- (get_nt_object_security): Call get_reg_security for registry keys
- to circumvent problems with predefined registry keys.
-
-2005-08-08 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_process.cc (fhandler_process::open): Allow opening of
- /proc/<pid>/fd for reading.
- * fhandler_registry.cc (fhandler_registry::open): Ditto for registry
- keys.
-
-2005-08-08 Christopher Faylor <cgf@timesys.com>
-
- * include/sys/cdefs.h (__CONCAT): Define.
- * include/elf.h: New file.
- * include/sys/elf32.h: Ditto.
- * include/sys/elf64.h: Ditto.
- * include/sys/elf_common.h: Ditto.
- * include/sys/elf_generic.h: Ditto.
-
-2005-08-08 Christopher Faylor <cgf@timesys.com>
-
- * cygwin.sc: Use simpler method to align .cygheap.
- * dllfixdbg: Just copy .stab and .stabstr sections when making
- cygwin1.dbg, rather than relying on objcopy to keep only the debug
- sections since objcopy seems to get it wrong.
-
-2005-08-08 Corinna Vinschen <corinna@vinschen.de>
-
- * dtable.cc (build_fh_pc): Check setting fh to fhandler_nodevice for
- NULL, too.
-
-2005-08-08 Corinna Vinschen <corinna@vinschen.de>
-
- * ftw.c: Include winsup.h.
- * nftw.c: Ditto.
- * include/ftw.h: Guard declarations appropriately.
-
-2005-08-08 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (DLL_OFILES): Add fts.o, ftw.o, nftw.o.
- * cygwin.din: Export fts_children, fts_close, fts_get_clientptr,
- fts_get_stream, fts_open, fts_read, fts_set, fts_set_clientptr,
- ftw, nftw.
- * fts.c: New file, imported from FreeBSD.
- * ftw.c: Ditto.
- * nftw.c: Ditto.
- * include/fts.h: Ditto.
- * include/ftw.h: Ditto.
- * include/cygwin/version.h: Bump API minor number.
-
-2005-08-07 Christopher Faylor <cgf@timesys.com>
-
- * Makefile.in (dtable_CFLAGS): Use -fomit-frame-pointer and
- -fcheck-new.
- * cygheap.cc (cmalloc): Only emit system_printf warnings on failure if
- DEBUGGING.
- (crealloc): Ditto.
- (ccalloc): Ditto.
- * dtable.cc (build_fh_name): Treat NULL return from cnew as indicative
- of EMFILE condition.
- (build_fh_dev): Ditto.
- (dtable::dup_worker): Handle NULL return from build_fh_pc.
- (dtable::vfork_child_dup): Trust dup_worker to set errno.
- * fhandler.h (fhandler_base::new): Mark as nothrow.
-
-2005-08-07 Christopher Faylor <cgf@timesys.com>
-
- * dllfixdbg: New perl script.
- * configure.in: Detect objcopy, objdump, strip.
- * configure: Regenerate.
- * Makefile.in: Pass target objcopy/objdump to new dllfixdbg script.
- Remove previous perl check.
- * cygwin.sc: Add .gnu_debuglink_overlay section for eventual
- replacement with .gnu_debuglink section. Revert move of cygheap to end
- of image.
-
-2005-08-06 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in: Allow previous patch to work in a 64 bit environment.
-
-2005-08-06 Christopher Faylor <cgf@timesys.com>
-
- * Makefile.in: Warn when end of cygheap is not on 64k boundary.
- * cygwin.sc: Try harder to ensure that cygheap is on a 64k boundary.
- Move cygheap to end of image to stop interference from unstripped debug
- regions.
-
-2005-08-06 Christopher Faylor <cgf@timesys.com>
-
- * include/endian.h: Move everything into this file and define things
- more like linux.
- * include/cygwin/types.h: Include endian.h.
- * include/sys/dirent.h: Define DT_* types and conversion macros.
-
- * pinfo.cc (pinfo::init): Remove special handling for PID_ALLPIDS and
- execed code, even though it probably still isn't quite right.
-
-2005-08-05 Michael Gorse <mgorse@alum.wpi.edu>
-
- * thread.cc (pthread::create(3 args)): Make bool.
- (pthread_null::create): Ditto.
- (pthread::create(4 args)): Check return of inner create rather than
- calling is_good_object().
- * thread.h: Ditto.
-
-2005-08-05 Vaclav Haisman <v.haisman@sh.cvut.cz>
-
- * fhandler_tty.cc (fhandler_tty_slave::tcflush): Return either 0 or -1.
-
-2005-08-05 Corinna Vinschen <corinna@vinschen.de>
-
- * thread.cc (pthread_cond_timedwait): Check abstime for validity
- according to SUSv3. Rewrite timeout check and waitlength calculation
- to avoid overflow problems.
-
-2005-08-02 Yitzchak Scott-Thoennes <sthoenna@efn.org>
-
- * include/sys/termios.h: Define TIOCMBIS and TIOCMBIC.
- * fhandler.h (class fhandler_serial): Declare switch_modem_lines.
- * fhandler_serial.cc (fhandler_serial::switch_modem_lines): New
- static function to set or clear DTR and/or RTS.
- (fhandler_serial::ioctl): Use switch_modem_lines for TIOCMSET
- and new TIOCMBIS and TIOCMBIC.
- * include/cygwin/version.h: Bump API minor number.
-
-2005-07-29 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_disk_file.cc (fhandler_base::pread): Don't move file offset
- pointer after I/O.
- (fhandler_base::pwrite): Ditto.
-
-2005-07-29 Christopher Faylor <cgf@timesys.com>
-
- * fhandler.h (fhandler_base::pread): Declare new function.
- (fhandler_base::pwrite): Ditto.
- (fhandler_disk_file::pread): Ditto.
- (fhandler_disk_file::pwrite): Ditto.
- * fhandler.cc (fhandler_base::pread): Define new function.
- (fhandler_base::pwrite): Ditto.
- * fhandler_disk_file.cc (fhandler_base::pread): Ditto.
- (fhandler_base::pwrite): Ditto.
- * syscalls.cc (pread): Define new function.
- (pwrite): Ditto.
- * cygwin.din: Export pread, pwrite.
-
- * include/sys/ioctl.h: Guard some _IO* declarations to avoid conflict
- with socket.h.
-
-2005-07-29 Christopher Faylor <cgf@timesys.com>
-
- * include/sys/ioctl.h: Add some linux defines.
-
-2005-07-29 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (pinfo::init): Put back accidentally removed debug_printf.
-
-2005-07-29 Arto Huusko <arto.huusko@wmdata.fi>
-
- * cygthread.cc (cygthread::simplestub): Wait for h to be filled out
- by main thread before assigning it.
-
-2005-07-29 Arto Huusko <arto.huusko@wmdata.fi>
-
- * pinfo.cc (pinfo::init): Sleep before retrying open_shared().
-
-2005-07-29 Arto Huusko <arto.huusko@wmdata.fi>
-
- * fork.cc (fork_parent): Fix null deref if pinfo creation fails.
-
-2005-07-28 Christopher Faylor <cgf@timesys.com>
-
- * cygmalloc.h (MSPACES): Define. This dropped through the cracks after
- the last malloc update.
- * dcrt0.cc: Fix a comment.
- * malloc.cc (internal_malloc): Fix definition so that it can be safely
- coerced.
-
-2005-07-27 Christopher Faylor <cgf@timesys.com>
-
- * include/cygwin/in.h (INET_ADDRSTRLEN): Add new definition.
-
-2005-07-27 Christopher Faylor <cgf@timesys.com>
-
- * gendef: Use nocr to remove \r's from input.
- gendef (nocr): New function.
-
-2005-07-27 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_clipboard.cc (fhandler_dev_clipboard::close): Set membuffer
- to NULL.
- (fhandler_dev_clipboard::fixup_after_exec): Don't call close here.
- Just set variables directly.
-
-2005-07-25 Christopher Faylor <cgf@timesys.com>
-
- * include/byteswap.h: New file.
-
-2005-07-25 Christopher Faylor <cgf@timesys.com>
-
- * include/cygwin/types.h: Define loff_t.
-
-2005-07-16 Christopher Faylor <cgf@timesys.com>
-
- * child_info.h (child_info::sync): Pass pid and HANDLE rather than
- using pinfo.
- (child_info::child_info): Accept an argument controlling whether to
- create proc_subproc.
- (child_info_spawn::child_info_spawn): Ditto.
- * sigproc.cc (child_info::child_info): Ditto.
- (child_info_spawn::child_info_spawn): Ditto.
- (child_info::sync): Use passed in pid and HANDLE.
- * fork.cc (fork_parent): Reflect additional arguments required for
- child_info::sync.
- * hookapi.cc (hook_or_detect_cygwin): Rename. Change so that NULL 'fn'
- argument just returns "true", indicating that program uses cygwin1.dll.
- * spawn.cc (av::win16_exe): New element.
- * spawn.cc (av::iscygwin): New element.
- (av::fixup): New function.
- (spawn_guts): Protect against SEGV. Use fixup function to detect when
- it is safe to wait for a spawned (as opposed to an execed) program.
- Reflect changes in child_info::sync arguments.
- * external.cc (cygwin_internal): Reflect function renaming to
- hook_or_detect_cygwin.
-
- * cygheap.cc (cygheap_fixup_in_child): Close handle after debug fixup
- has been done to prevent false positives in handle collision.
-
- * exceptions.cc (try_to_debug): Notify debugger if already being
- debugged.
-
-2005-07-09 Christopher Faylor <cgf@timesys.com>
-
- * path.cc (mount): Only check win32_path when we know we need it.
-
-2005-07-09 Nicholas Wourms <nwourms@gmail.com>
-
- * cygwin.din (getline): Export.
- (getdelim): Export.
- * include/sys/stdio.h (getline): Replace macro with function prototype.
- (getdelim): Likewise.
- * include/cygwin/version.h: Bump API minor number.
-
-2005-07-08 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din (__getline): Export.
- (__getdelim): Export.
- * include/sys/stdio.h (getline): Define as __getline.
- (getdelim): Define as __getdelim.
- * include/cygwin/version.h: Bump API minor number.
-
-2005-07-06 Christopher Faylor <cgf@timesys.com>
-
- Eliminate (void) cast on standalone function calls throughout.
-
-2005-07-05 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (cygwin_exit): Mark as "noreturn".
- * sigproc.cc (child_info::ready): Don't signal parent that we are a
- cygwin process if we are dynamically loaded.
-
-2005-07-05 Christopher Faylor <cgf@timesys.com>
-
- * malloc.cc: Update to version 2.8.2.
-
-2005-07-05 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_tape.cc (fhandler_dev_tape::close): Don't do "extra stuff"
- when we know we're execing.
-
-2005-07-04 Christopher Faylor <cgf@timesys.com>
-
- Change foo (void) to foo () for all c++ functions throughout.
- Remove all fhandler_*::dump functions throughout.
-
- * fhandler.h (fhandler_dev_mem::close): Remove pass-through function in
- favor of virtual method.
- (handler_dev_raw::close): Ditto.
- (fhandler_dev_clipboard::fixup_after_exec): New method.
- * fhandler_dev_mem.cc (fhandler_dev_mem::close): Eliminate pass through
- function in favor of virtual method.
- * fhandler_dev_raw.cc (fhandler_dev_raw::close): Ditto.
- * fhandler_clipboard.cc (fhandler_dev_clipboard::close): Don't go to
- extra effort when execing.
- (fhandler_dev_clipboard::fixup_after_exec): New function.
- * fhandler_console.cc (fhandler_console::close): Don't do "extra stuff"
- when we know we're execing.
- * fhandler_disk_file.cc (fhandler_disk_file::close): Ditto.
- * fhandler_dsp.cc (fhandler_dev_dsp::close): Ditto.
- * fhandler_fifo.cc (fhandler_fifo.cc::close): Ditto. function in favor
- of base function.
- * fhandler_random.cc (fhandler_dev_random::close): Ditto.
- * fhandler_registry.cc (fhandler_registry::close): Ditto.
- * fhandler_tty.cc (fhandler_tty_slave::close): Ditto.
- * fhandler_virtual.cc (fhandler_virtual::close): Ditto.
-
- * pinfo.cc (proc_waiter): Remove unneeded hExeced declaration.
- * sigproc.cc: Ditto.
- * winsup.h (hExeced): Define here.
-
- * fhandler_virtual.cc (fhandler_virtual::fixup_after_exec): Just call
- close() to reinitialize things to known state.
-
-2005-07-04 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.h (_cygtls): Perform minor reformatting.
-
- * winsup.h (close_all_files): Reflect argument change.
- * dtable.cc (close_all_files): Ditto.
- * dtable.h: Ditto.
- * fhandler.h: Ditto.
- * spawn.cc (spawn_guts): Move close_all_files back to its original
- location in first P_OVERLAY test but use argument denoting that handles
- are only supposed to be closed, not released (more work to be done
- here).
- * syscalls.cc (close_all_files): Take an argument denoting whether to
- release closed files or not.
-
- * path.cc (symlink): Change argument names to reflect linux man page.
- (symlink_worker): Ditto. Also appropriately set ENOENT for empty
- strings.
-
-
-2005-07-04 Pierre Humblet <pierre.humblet@ieee.org>
-
- * cygheap.h (struct init_cygheap): Delete cygwin_regname member.
- * external.cc (cygwin_internal): Use cygpsid::get_id for
- CW_GET_UID_FROM_SID and CW_GET_GID_FROM_SID.
- Turn CW_SET_CYGWIN_REGISTRY_NAME and CW_GET_CYGWIN_REGISTRY_NAME
- into noops.
-
-2005-07-03 Christopher Faylor <cgf@timesys.com>
-
- * thread.cc (pthread_mutex::init): Remove unneeded efault/mutex check.
-
-2005-07-02 Christopher Faylor <cgf@timesys.com>
-
- * thread.h (verifyable_object_state verifyable_object_isvalid): Delete
- function declaration that should have been static.
- * thread.cc (verifyable_object_state verifyable_object_isvalid): Make
- inline static.
- (pthread*::is_good_object): Move to directly after
- verifyable_object_state verifyable_object_isvalid and make inline.
- (check_valid_pointer): Delete function.
- (pthread_cond_timedwait): Use myfault to detect valid pointer.
- (pthread_mutex::init): Ditto.
-
-2005-07-02 Christopher Faylor <cgf@timesys.com>
-
- Replace valid memory checks with new myfault class "exception
- handling", almost everywhere. Leave some thread.cc stuff alone for
- now.
- * cygtls.h: Kludge some definitions to avoid including a problematic
- windows header.
- (_cygtls::_myfault): New entry.
- (_cygtls::_myfault_errno): Ditto.
- (_cygtls::fault_guarded): New function.
- (_cygtls::setup_fault): Ditto.
- (_cygtls::return_from_fault): Ditto.
- (_cygtls::clear_fault): Ditto.
- (myfault): New class.
- * exceptions.cc (handle_exceptions): Handle case of guarded fault in
- system routine.
- * gendef: Add another entry point for setjmp that the compiler doesn't
- know about and won't complain about.
- * gentls_offsets: Just include windows.h rather than kludging a HANDLE
- def.
- * miscfuncs.cc (check_null_str): Delete.
- (check_null_empty_str): Ditto.
- (check_null_empty_str_errno): Ditto.
- (check_null_str_errno): Ditto.
- (__check_null_invalid_struct): Ditto.
- (__check_null_invalid_struct_errno): Ditto.
- (__check_invalid_read_ptr): Ditto.
- (__check_invalid_read_ptr_errno): Ditto.
- (dummytest): New function.
- (check_iovec_for_read): Delete.
- (chec_iovec): Rename from check_iovec_for_write. Take a read/write
- parameter.
- * tlsoffsets.h: Regenerate.
- * winsup.h: Remove check_* declarations.
- (check_iovec_for_read): Delete declaration. Turn into a define
- instead.
- (check_iovec_for_write): Ditto.
- (check_iovec): New declaration.
-
- * thread.h: Use ifdef guard name consistent with other header files.
-
-2005-07-02 Christopher Faylor <cgf@timesys.com>
-
- * include/cygwin/version.h: Bump DLL minor number to 19.
-
-2005-06-30 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::readv): Use malloc/free instead of alloca.
- (fhandler_base::writev): Ditto.
-
-2005-06-29 Christopher Faylor <cgf@timesys.com>
-
- * cygerrno.h: Make multi-inclusion safe.
- * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Deal with EINTR.
- * dcrt0.cc (dll_crt0_0): Accommodate init_console_handler argument
- change.
- * winsup.h: Ditto.
- * fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
- * exceptions.cc (init_console_handler): Ditto. Ignore console events
- if we're not attached to a terminal.
- * fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
- * wincap.cc: Implement has_null_console_handler_routine throughout.
- * wincap.h: Ditto.
-
-2005-06-29 Christopher Faylor <cgf@timesys.com>
-
- * autoload.cc (LoadDLLprime): Use a more descriptive name for autoload
- text sections.
- * cygwin.sc: Ditto.
-
-2005-06-27 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::facl): Add missing break.
-
-2005-06-24 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (path_conv::check): Don't strip trailing dots and spaces
- at the start of the path.
-
-2005-06-24 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (rootdir): Don't set errno.
- * syscalls.cc (statvfs): Set errno to ENOTDIR if rootdir() failed.
-
-2005-06-22 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_dev_tape): Add declaration for
- fixup_after_fork and set_close_on_exec.
- * fhandler_tape.cc (fhandler_dev_tape::open): Create mt_mtx mutex
- inheritable.
- (fhandler_dev_tape::close): Close mt_mtx.
- (fhandler_dev_tape::dup): Duplicate mt_mtx and mt_evt as necessary.
- (fhandler_dev_tape::fixup_after_fork): New method.
- (fhandler_dev_tape::set_close_on_exec): New method.
-
-2005-06-21 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (get_initgroups_sidlist): Drop special_pgrp parameter.
- (get_setgroups_sidlist): Avoid duplicate groups in group list.
- (create_token): Remove special_pgrp local variable. Accommodate
- change to get_initgroups_sidlist call.
-
-2005-06-21 Corinna Vinschen <corinna@vinschen.de>
-
- * uinfo.cc (uinfo_init): Call reimpersonate to set the main thread's
- impersonation token.
-
-2005-06-20 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_proc.cc (format_proc_partitions): Only list recognized
- partitions. Use partition number given by PartitionNumber member.
-
-2005-06-18 Corinna Vinschen <corinna@vinschen.de>
-
- * glob.c: (glob0): New local variable `limit`. Use in calls to glob1
- and globextend.
- (glob1): Add `limit' parameter.
- (glob2): Ditto.
- (glob3): Ditto.
- (globextend): Ditto. Implement GLOB_LIMIT handling.
- * include/glob.h (GLOB_LIMIT): New define.
- * include/cygwin/version.h: Bump API minor number.
-
-2005-06-17 Christopher Faylor <cgf@timesys.com>
-
- * wincap.h (wincaps::detect_win16_exe): Declare.
- (wincapc::detect_win16_exe): Implement.
- * wincap.cc: Populate detect_win16_exe where appropriate.
- * spawn.cc (spawn_guts): Only go out of the way to detect 16-bit apps
- on systems which are flummoxed by them.
-
-2005-06-17 Christopher Faylor <cgf@timesys.com>
-
- * spawn.cc (spawn_guts): Detect when executing a 16-bit application and
- avoid setting the process pipe since this causes conniptions in Windows
- 9x.
-
-2005-06-17 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din (inet_pton): Export.
- (inet_ntop): Export.
- * net.cc (cygwin_inet_pton): Implement inet_pton for AF_INET for now.
- (cygwin_inet_ntop): Implement inet_ntop for AF_INET for now.
- * include/arpa/inet.h (inet_pton): Declare.
- (inet_ntop): Declare.
- * include/cygwin/version.h: Bump API minor number.
-
-2005-06-17 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_union): Add missing members corresponding to
- fhandler_fifo and fhandler_netdrive.
-
-2005-06-16 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (statvfs): Handle the case when GetDiskFreeSpaceEx
- succeeds but GetDiskFreeSpace fails by faking bytes-per-sector and
- sectors-per-cluster values.
-
-2005-06-15 Christopher Faylor <cgf@timesys.com>
-
- * cygthread.cc (cygthread::detach): Fix debugging output.
- * dcrt0.cc (dll_crt0_1): Create signal_arrived early -- before any
- filename manipulation.
- * sigproc.cc (sigproc_init): Don't create signal_arrived here.
- * fork.cc (fork_child): Ditto.
- * sigproc.h (create_signal_arrived): Declare.
-
-2005-06-14 Christopher Faylor <cgf@timesys.com>
-
- * path.cc (path_conv::check): Always reset to FH_FS when component != 0
- and FH_NETDRIVE to fix problems with strict case checking.
-
-2005-06-12 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::recvmsg): Avoid SEGV in OpenSSH
- when trying to pass file descriptor by setting msg->msg_accrightslen
- to 0.
-
-2005-06-11 Christopher Faylor <cgf@timesys.com>
-
- * Makefile.in: Avoid initial heap allocation since cygwin has its own
- heap.
-
-2005-06-11 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_console.cc (fhandler_console::read): Fix a compiler warning.
-
-2005-06-10 Christopher Faylor <cgf@timesys.com>
-
- * include/pthread.h: Change PTHREAD_MUTEX_DEFAULT to
- PTHREAD_MUTEX_NORMAL. Revert PTHREAD_MUTEX_INITIALIZER to
- PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP since that is actually closer
- to what linux does.
- * thread.h (cw_cancel_action): New enum.
- (cancelable_wait): Use cw_cancel_action as third argument.
- * thread.cc (cancelable_wait): Ditto. Don't wait for cancel if
- cancel_action == cw_no_cancel.
- (pthread::create): Don't wait for cancel event since that is racy.
- (pthread_mutex::pthread_mutex): Set default to PTHREAD_MUTEX_ERRORCHECK.
- (pthread_mutexattr::pthread_mutexattr): Ditto.
- (pthread_mutex::_lock): Tell cancelable_wait not to wait for
- cancellation event.
- (semaphore::_timedwait): Accommodate change in cancelable_wait args.
- (pthread::join): Ditto.
-
-2005-06-10 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::sendto): Always initialize
- ret to 0.
- (fhandler_socket::sendmsg): Ditto.
-
-2005-06-10 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din (imaxabs): Export.
- (imaxdiv): Export.
- (llabs): Export.
- (lldiv): Export.
- (strtoimax): Export.
- (strtoumax): Export.
- * include/inttypes.h (imaxabs): Activate declaration.
- (imaxdiv): Ditto.
- (strtoimax): Ditto.
- (strtoumax): Ditto.
- * include/cygwin/version.h: Bump API minor.
-
-2005-06-09 Christopher Faylor <cgf@timesys.com>
-
- * cygthread.cc (cygthread::detach): Improve diagnostics for what should
- be an impossible failure condition.
-
-2005-06-09 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.h (_local_storage::setmode_file): New element.
- (_local_storage::setmode_mode): New element.
- * tlsoffsets.h: Regenerate.
- * cygwin.din (setmode): Define as cygwin_getmode.
- * syscalls.cc (setmode_helper): Use setmode_* variables from tls rather
- than using unthreadsafe static.
- (setmode): Break out fwalk stuff.
- (cygwin_setmode): New function. Put fwalk stdio stuff here.
-
-2005-06-09 Christopher Faylor <cgf@timesys.com>
-
- * thread.cc (pthread_mutex::_lock): Use cancelable_wait rather than
- WaitForSingleObject.
-
-2005-06-09 Christopher Faylor <cgf@timesys.com>
-
- * cygwin.sc: Place .cygwin_dll_common in a more sensible spot.
-
-2005-06-09 Christopher Faylor <cgf@timesys.com>
-
- * cygwin.sc: Place .cygwin_dll_common.
- * init.cc (threadfunc_ix): Use a more common name for the section name.
-
-2005-06-09 Christopher Faylor <cgf@timesys.com>
-
- * include/pthread.h (PTHREAD_MUTEX_INITIALIZER): Change to
- PTHREAD_NORMAL_MUTEX_INITIALIZER_NP to be closer to linux default.
-
-2005-06-09 Christopher Faylor <cgf@timesys.com>
-
- * thread.cc (cancelable_wait): No-op change to make sure that res is
- always a valid WFMO return.
-
-2005-06-09 Christopher Faylor <cgf@timesys.com>
-
- Change pthread::cancelable_wait to just cancelable_wait, throughout.
- * thread.h (cw_sig_wait): New enum.
- (fast_mutex::lock): Use cancelable_wait with resumable signal.
- (cancelable_wait): Change fourth argument to cw_sig_wait enum.
- * thread.cc (cancelable_wait): Ditto. Loop on signal detection if
- fourth argument == cw_sig_resume.
-
-2005-06-08 Christopher Faylor <cgf@timesys.com>
-
- * cygwin.sc: Apparently nonloading sections need to go last.
-
-2005-06-08 Christopher Faylor <cgf@timesys.com>
-
- * cygwin.sc: Restore resource and reloc sections and use more modern
- syntax for stabs sections.
-
-2005-06-08 Christopher Faylor <cgf@timesys.com>
-
- * environ.cc (spenvs): Remove cut/paste error which associated
- CYGWIN_DEBUG with HOME.
-
-2005-06-08 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (cygwin_logon_user): Run LogonUser in the primary
- process token context. Fix potential handle leak.
-
-2005-06-07 Corinna Vinschen <corinna@vinschen.de>
-
- * pinfo.cc (pinfo::init): Define sa_buf as PSECURITY_ATTRIBUTES and
- allocate dynamically.
- (pinfo::set_acl): Replace sa_buf by dynamically allocated acl_buf.
- * sec_acl.cc (setacl): Allocate acl dynamically.
- * sec_helper.cc (sec_acl): Add test for alignment of acl when
- DEBUGGING is defined.
- (__sec_user): Same for sa_buf.
- * security.cc (verify_token): Define sd_buf as PSECURITY_DESCRIPTOR
- and allocate dynamically.
- (alloc_sd): Allocate acl dynamically.
- security.h (sec_user_nih): Change first parameter to
- SECURITY_ATTRIBUTES *.
- (sec_user): Ditto.
- * sigproc.cc (wait_sig): Define sa_buf as PSECURITY_ATTRIBUTES and
- allocate dynamically.
- * syscalls.cc (seteuid32): Define dacl_buf as PACL and allocate
- dynamically.
- * uinfo.cc (cygheap_user::init): Define sa_buf as PSECURITY_ATTRIBUTES
- and allocate dynamically.
- * winbase.h (ilockincr): Mark first argument of inline assembly as
- earlyclobber.
- (ilockdecr): Ditto.
-
-2005-06-07 Christopher Faylor <cgf@timesys.com>
-
- * cygthread.cc (cygthread::detach): Make error message a little more
- detailed.
- * fhandler.cc (fhandler_base::raw_read): Ditto for debug message.
- * dcrt0.cc (do_exit): Add some more synchronization tests.
- * fhandler_fifo.cc (fhandler_fifo::dup): Don't duplicate a nonexistent
- handle. Use derived return value rather than always retuning 0.
- * fhandler_netdrive.cc (fhandler_netdrive::exists): Wnet -> WNet.
- * winsup.h (exit_states): Add a couple of new exit states.
-
-2005-06-06 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink_info::check): If GetFileAttributes returns
- with ERROR_SHARING_VIOLATION, the file exists.
-
-2005-06-06 Corinna Vinschen <corinna@vinschen.de>
-
- * uname.cc (uname): Change "amd64" to "x86_64" as on Linux.
-
-2005-06-06 Corinna Vinschen <corinna@vinschen.de>
-
- * uname.cc (uname): Add missing break.
-
-2005-06-05 Christopher Faylor <cgf@timesys.com>
-
- * Makefile.in: Build sync.o with -fomit-frame-pointer and -O3.
-
-2005-06-05 Christopher Faylor <cgf@timesys.com>
-
- * sync.cc (muto::acquire): Remove unneeded brackets and fix whitespace.
-
-2005-06-04 Christopher Faylor <cgf@timesys.com>
-
- * malloc.cc: Update to Doug Lea's malloc v2.8.0.
-
-2005-06-03 Max Kaehn <slothman@electric-cloud.com>
-
- * dcrt0.cc (cygwin_dll_init): Initialize main_environ and cygtls. Add
- comment to explain the caveats of this method.
- * how-cygtls-works.txt: New file.
-
-2005-06-02 Christopher Faylor <cgf@timesys.com>
-
- * dlfcn.cc (get_full_path_of_dll): Use a relative path when converting
- so that the standard Windows rules for finding a library will be used
- if no path is given. Stop explicitly searching /usr/bin since that is
- now in effect.
-
-2005-06-01 Christopher Faylor <cgf@timesys.com>
-
- Revert 2005-05-30 close_all_files changes.
- * spawn.cc (spawn_guts): When execing, close all files after the child
- has synced with us.
-
-2005-06-01 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fchown): Make sure that
- disk open is called in case we're passed in a non-existent device.
-
-2005-06-01 Christopher Faylor <cgf@timesys.com>
-
- * include/machine/stdlib.h: New file.
-
-2005-06-01 Christopher Faylor <cgf@timesys.com>
-
- * thread.h (List_remove): Revert most of 2005-05-30 change.
-
-2005-06-01 Christopher Faylor <cgf@timesys.com>
-
- * cygwin.sc: Don't output .reloc or .rsrc sections. Clean up stuff
- around .cygheap and use a workaround to get things working with newer
- (broken?) binutils.
-
-2005-05-31 Christopher Faylor <cgf@timesys.com>
-
- * cygheap.cc (cygheap_end): Remove bogus section attribute.
- * cygwin.sc: Make __cygheap_mid absolute. Remove unused _cygheap_foo.
-
-2005-05-30 Christopher Faylor <cgf@timesys.com>
-
- * child_info.h (child_info::cygheap_h): Delete.
- (child_info::dwProcessId): New field.
- * cygheap.cc (init_cheap): Delete.
- (dup_now): Ditto.
- (cygheap_setup_for_child): Ditto.
- (cygheap_setup_for_child_cleanup): Ditto.
- (cygheap_fixup_in_child): Simplify. Use new "child_copy" function to
- copy heap from parent.
- (_csbrk): Don't attempt allocation if within cygheap section. Fix so
- that more than one allocation will succeed.
- (cygheap_init): Reset possibly-nonzero region to zero.
- * cygheap.h (cygheap_setup_for_child): Delete declaration.
- (cygheap_setup_for_child_cleanup): Ditto.
- (cygheap_start): Define as an array.
- * cygwin.sc: Modernize. Remove unneeded sections. Define cygheap
- here.
- * dcrt0.cc (do_exit): Reflect argument change to close_all_files.
- * dtable.cc (dtable::vfork_parent_restore): Ditto.
- * dtable.h: Ditto.
- * fhandler.h: Ditto.
- * fork.cc (fork_copy): Call ReadProcessMemory if there is no thread
- (indicating that we're execing).
- (fork_child): Don't mess with hParent.
- (fork_parent): Remove hParent stuff. It happens earlier now.
- Remove call to cygheap_setup_for_child* stuff.
- (fork): Put child_info_stuff in grouped structure. Issue error if
- parent handle is not set.
- (child_copy): New function.
- * sigproc.cc (child_info::child_info): Put cygheap settings here. Set
- parent handle.
- (child_info::~child_info): Close parent handle if it exists.
- * spawn.cc (spawn_guts): Reorganize so that ciresrv is allocated at
- only the last minute so that cygheap changes are reflected. Delete
- cygheap_setup* calls.
- * syscalls.cc (close_all_files): Add an argument to flag when the fd
- entry should be released.
- * winsup.h (close_all_files): Add an argument to close_all_files
- declaration. Declare child_copy.
-
-2005-05-30 Vaclav Haisman <v.haisman@sh.cvut.cz>
-
- * thread.h (List_remove): Make node parameter const. Use simple
- comparison and assignment rather than InterlockedCompareExchangePointer
- since access is already synchronized.
-
-2005-05-30 Christopher Faylor <cgf@timesys.com>
-
- * dlfcn.cc (set_dl_error): Use UNIX error rather than Windows error.
-
-2005-05-29 Christopher Faylor <cgf@timesys.com>
-
- * cygmagic: Remove debugging cruft missed on 2005-05-21.
-
-2005-05-29 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (path_conv::check): Move component to function scope. Set
- PATH_RO only on *real* FH_NETDRIVEs or on non-FH_NETDRIVE virtual
- paths. Allow non-retrievable shares to be handled as files.
-
-2005-05-29 Eric Blake <ebb9@byu.net>
-
- * include/limits.h (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Always define.
-
-2005-05-28 Christopher Faylor <cgf@timesys.com>
-
- * thread.h (pthread_key::set): Inline.
- (pthread_key::get): Ditto.
- * thread.cc (pthread::set): Delete.
- (pthread::get): Ditto.
-
-2005-05-28 Christopher Faylor <cgf@timesys.com>
-
- * cygwin.din: Remove signal front end from pthread_[gs]etspecific.
-
-2005-05-28 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_tty.cc (fhandler_tty_slave:tcflush): Use signed comparison.
-
-2005-05-28 Christopher Faylor <cgf@timesys.com>
-
- * times.cc (time_ms::usecs): Coerce comparison to signed or whole test
- is a no-op.
-
-2005-05-27 Christopher Faylor <cgf@timesys.com>
-
- * cygheap.h: Reference _cygheap_start via .cygheap section.
-
- * environ.cc: Fix force_into_environment typo throughout.
- (spenvs): Export CYGWIN_DEBUG if DEBUGGING.
-
-2005-05-26 Christopher Faylor <cgf@timesys.com>
-
- * include/cygwin/version.h: Bump DLL minor number to 18.
-
-2005-05-25 Pierre Humblet <pierre.humblet@ieee.org>
-
- * fhandler.h (fhandler_base::mkdir): New virtual method.
- (fhandler_base::rmdir): Ditto.
- (fhandler_disk_file:mkdir): New method.
- (fhandler_disk_file:rmdir): Ditto.
- * dir.cc (mkdir): Implement with fhandlers.
- (rmdir): Ditto.
- * fhandler.cc (fhandler_base::mkdir): New virtual method.
- (fhandler_base::rmdir): Ditto.
- (fhandler_disk_file::mkdir): New method.
- (fhandler_disk_file::rmdir): Ditto.
-
-2005-05-24 Christopher Faylor <cgf@timesys.com>
-
- * include/cygwin/version.h: Bump API minor number to 129.
-
-2005-05-24 Christopher Faylor <cgf@timesys.com>
-
- * cygwin.din: Export mkdtemp.
- * mktemp.cc: New file.
- * Makefile.in (DLL_OFILES): Add mktemp.o
-
-2005-05-23 Eric Blake <ebb9@byu.net>
-
- * include/stdint.h (INTMAX_C, UINTMAX_C): Fix definition.
-
-2005-05-21 Christopher Faylor <cgf@timesys.com>
-
- * spawn.cc (find_exec): Accept a PATH-like string in place of an
- environment variable.
- * dlfcn.cc (get_full_path_of_dll): Search /usr/bin (for windows
- compatibility) and /usr/lib (for UNIX compatibility) when looking for
- shared libraries.
- * environ.cc (conv_envvars): Put back LD_LIBRARY_PATH since it is used
- by get_full_path_of_dll().
- * errno.cc (errmap): Map MOD_NOT_FOUND to ENOENT.
-
- * cygmagic: Remove debugging cruft.
-
-2005-05-19 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/in.h: Add comment.
-
-2005-05-19 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/in.h: Define IPPROTO_xxx values as macros to
- accommodate SUSv3.
-
-2005-05-19 Christopher Faylor <cgf@timesys.com>
-
- * include/limits.h: Include features.h, as on linux.
-
-2005-05-19 Christopher Faylor <cgf@timesys.com>
-
- * include/endian.h: New file.
-
-2005-05-19 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.sc: Add Dwarf-2 debug sections.
-
-2005-05-19 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap64): Make granularity an automatic variable.
-
-2005-05-19 Christopher Faylor <cgf@timesys.com>
-
- * fhandler.h (fhandler_cygdrive::seekdir): Delete declaration.
- (fhandler_cygdrive::seekdir): Delete.
-
-2005-05-19 Pierre Humblet <pierre.humblet@ieee.org>
-
- * fhandler.h (fhandler_cygdrive::iscygdrive_root): Delete method.
- (fhandler_cygdrive::telldir): Delete declaration.
- * fhandler_disk_file.cc: Remove all uses of
- fhandler_cygdrive::iscygdrive_root.
- (fhandler_disk_file::mkdir): New method.
- (fhandler_disk_file::rmdir): Ditto.
- (fhandler_cygdrive::telldir): Delete.
-
-2005-05-18 Christopher Faylor <cgf@timesys.com>
-
- * external.cc: Move pids declaration to file scope and use less
- enthusiastic constructor.
- * pinfo.h (winpids::winpids): Remove default setting.
- * fhandler_fifo.cc (fhandler_fifo::open_not_mine): Accommodate removal
- of default setting.
- * fhandler_proc.cc (fhandler_proc::readdir): Ditto.
-
-2005-05-18 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.h (_local_storage::unknown_thread_name): New buffer.
- * tlsoffsets.h: Regenerate.
- * cygthread.cc (cygthread::name): Use new thread-local buffer.
- * exceptions.cc (handle_exceptions): Avoid unnecessary initialization
- of static variables to zero.
- * fork.cc (slow_pid_reuse) Ditto.
-
-2005-05-18 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap64): Avoid compiler warning.
- * ntea.cc (NTReadEA): Ditto.
- * hires.h (hires_base): Remove useless usecs function.
-
-2005-05-18 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_netdrive.cc (fhandler_netdrive::telldir): Remove since it's
- equivalent to fhandler_virtual::telldir now anyway.
- * fhandler.h (class fhandler_netdrive): Remove telldir.
-
-2005-05-18 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_netdrive.cc (fhandler_netdrive::telldir): Implement.
- (fhandler_netdrive::seekdir): Implement.
- (fhandler_netdrive::closedir): Call rewinddir to have only one point
- of calling WNetCloseEnum.
-
-2005-05-17 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_netdrive): Add method rewinddir.
- * fhandler_netdrive.cc (struct netdriveinf): New structure to
- store thread arguments.
- (thread_netdrive): Thread handling all potentially blocking
- WNet... calls.
- (create_thread_and_wait): Start and wait for above thread.
- (fhandler_netdrive::exists): Change to call create_thread_and_wait
- instead of calling WNet... function.
- (fhandler_netdrive::readdir): Ditto. Fix error handling.
- (fhandler_netdrive::rewinddir): New method.
-
-2005-05-17 Corinna Vinschen <corinna@vinschen.de>
-
- * external.cc (cygwin_internal): Avoid compiler warning.
-
-2005-05-16 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (dll_crt0_0): Don't do fixup_after_exec if dynamically
- loaded since the state of fds is unknown at this point.
-
-2005-05-16 Christopher Faylor <cgf@timesys.com>
-
- * include/sys/cygwin.h (enum cygwin_getinfo_types): Add CW_DEBUG_SELF.
- * external.cc (cygwin_internal): Implement CW_DEBUG_SELF.
-
- * init.cc (dll_entry): Minor rearrangement of code.
-
-2005-05-16 Christopher Faylor <cgf@timesys.com>
-
- * path.cc (path_conv::check): Remove embedded dots before slashes.
-
-2005-05-16 Corinna Vinschen <corinna@vinschen.de>
-
- * environ.cc (conv_envvars): Remove LD_LIBRARY_PATH entirely.
- It doesn't belong here.
-
-2005-05-15 Corinna Vinschen <corinna@vinschen.de>
-
- * environ.cc (conv_envvars): Treat LD_LIBRARY_PATH as path list.
-
-2005-05-14 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Check
- return code from GetFileSize and set file size to 0 if necessary.
- * fhandler_netdrive.cc (fhandler_netdrive::fstat): Set permissions
- to read/execute for all.
-
-2005-05-13 Christopher Faylor <cgf@timesys.com>
-
- * path.cc (normalize_posix_path): Do normalization on . and .. after
- a '//'.
-
-2005-05-13 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_netdrive::readdir): Remove useless comment.
-
-2005-05-13 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (WNetGetResourceParentA): Import.
- (WNetOpenEnumA): Import.
- (WNetEnumResourceA): Import.
- (WNetCloseEnum): Import.
- * fhandler.h (fhandler_netdrive::telldir): Add declaration.
- (fhandler_netdrive::seekdir): Ditto.
- (fhandler_netdrive::closedir): Ditto.
- * fhandler_netdrive.cc: Drop explicit including windows.h. Include
- winnetwk.h instead of shlwapi.h. Include dirent.h.
- (fhandler_netdrive::readdir): Implement.
- (fhandler_netdrive::telldir): New method.
- (fhandler_netdrive::seekdir): New method.
- (fhandler_netdrive::closedir): Ditto.
-
-2005-05-13 Christopher Faylor <cgf@timesys.com>
-
- Remove PC_FULL from path_conv usage throughout.
- * path.h (enum pathconv_arg): Change PC_FULL to PC_NOFULL.
- * path.cc (path_conv::check): Test for PC_NOFULL rather than !PC_FULL.
- (cygwin_conv_to_win32_path): Use PC_NOFULL to force non-absolute path.
-
-2005-05-13 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_netdrive.cc (fhandler_netdrive::exists): Assert that "//"
- exists.
-
-2005-05-12 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.cc (_cygtls::remove): Eliminate compiler warning.
-
- * dir.cc (mkdir): Check path for writability.
- (rmdir): Ditto. Remove check for special directories.
- * path.cc (path_conv::check): Set PATH_RO for virtual devices. Set
- error if read-only and asked for writability.
- * path.h (pathconv_arg): Add PC_WRITABLE.
- (path_types): Add PATH_RO.
- (path_conv::isro): Add (currently unused) check for read-only
- filesystem. Return "ENOSHARE" when we know a share doesn't exist.
- * include/sys/mount.h: Add MOUNT_RO flag.
- * autoload.cc (WNetGetResourceInformationA): Import.
- * fhandler_netdrive.cc (fhandler_netdrive::exists): Detect actual
- existence of remote system rather than always assuming that it exists.
-
-2005-05-11 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (do_global_dtors): Don't call dll_global_dtors here.
- (__main): Reinstate atexit of do_global_dtors.
- (cygwin_exit): Call dll_global_dtors here.
- (do_exit): And here.
-
-
-2005-05-10 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.cc (_cygtls::remove): Clear exitsock after close.
- * fhandler_console.cc (fhandler_console::write_normal): Store character
- in a local variable for potential future inspection.
-
-2005-05-10 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (DLL_OFILES): Add fhandler_mailslot.o.
- * devices.h (FH_KMSG): Define new device.
- * devices.in: Add "/dev/kmsg" entry.
- * devices.cc: Regenerate.
- * dtable.cc (build_fh_pc): Handle case FH_KMSG.
- * fhandler.h (class fhandler_mailslot): New class.
- (class select_stuff): Add device_specific_mailslot pointer.
- * fhandler_mailslot.cc: New file.
- * select.cc (peek_mailslot): New function.
- (verify_mailslot): Ditto.
- (struct mailslotinf): New stuct to handle select on mailslots.
- (thread_mailslot): New function.
- (start_thread_mailslot): Ditto.
- (mailslot_cleanup): Ditto.
- (fhandler_mailslot::select_read): New method.
- * syslog.cc (klog_guard): New muto.
- (dev_kmsg): Local mailslot for kernel message device.
- (vklog): New function.
- (klog): Ditto.
- * winsup.h (vklog): Declare.
- (klog): Ditto.
- * include/sys/syslog.h: Define _PATH_KLOG.
-
-2005-05-10 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (dll_crt0_1): Call cygwin_exit to ensure that destructors
- are handled correctly.
-
-2005-05-10 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (path_conv::check): Set correct file attributes for socket
- files.
-
-2005-05-09 Pierre Humblet <pierre.humblet@ieee.org>
-
- * fhandler.h (class fhandler_netdrive): New class.
- * fhandler_netdrive.cc (fhandler_netdrive::fhandler_netdrive): New constructor.
- (fhandler_netdrive::exists): New method.
- (fhandler_netdrive::fstat): Ditto.
- (fhandler_netdrive::readdir): Ditto.
- (fhandler_netdrive::open): Ditto.
- * dtable.cc (build_fh_pc): Handle case FH_NETDRIVE.
- * path.cc (isvirtual_dev): Add FH_NETDRIVE.
- (mount_info::conv_to_win32_path): Detect netdrive device and bypass mount
- search for network paths.
-
-2005-05-08 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (get_cygwin_startup_info): New function pulled from
- dll_crt0_0.
- (dll_crt0_0): Use get_cygwin_startup_info to retrieve cygwin-specific
- startup pointer.
- * external.cc (cygwin_internal): Implement CW_ARGV and CW_ENVP.
- * include/sys/cygwin.h: Implement CW_ARGV and CW_ENVP.
-
-2005-05-07 Christopher Faylor <cgf@timesys.com>
-
- * path.cc (normalize_posix_path): Don't treat '//' specially since
- newer versions of bash now get this right.
-
-2005-05-07 Christopher Faylor <cgf@timesys.com>
-
- * devices.cc: Regenerate with correct name for dev_netdrive_storage.
-
-2005-05-06 Christopher Faylor <cgf@timesys.com>
-
- * Makefile.in (DLL_O_FILES): Add fhandler_netdrive.o.
- * fhandler_netdrive.cc: Placeholder file for future development.
- * devices.h (FH_NETDRIVE): Define new virtual device type.
- (netdrive_dev): Define.
- * devices.in (dev_netdrive_storage): Define.
- * devices.cc: Regenerate.
-
-2005-05-04 Corinna Vinschen <corinna@vinschen.de>
-
- * cygerrno.h (__set_errno): Remove useless parentheses.
-
-2005-05-04 Corinna Vinschen <corinna@vinschen.de>
-
- * cygerrno.h (__set_errno): Define as inline function here.
- (set_errno): Always define as call to __set_errno.
- * debug.cc (__set_errno): Move to cygerrno.h.
-
-2005-05-03 Christopher Faylor <cgf@timesys.com>
-
- * shared.cc (user_shared_initialize): Rework locking so that nothing is
- checked until cb is non-zero.
-
-2005-05-03 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Don't treat
- inability to open file as failure if only SetFileAttributes is
- going to be called. Only call set_file_attribute if really necessary.
-
-2005-05-03 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (get_inet_addr): Add missing __seterrno call.
-
-2005-05-01 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_tty.cc (fhandler_tty_slave::read): Actually read input when
- vmin == vtime == 0.
-
-2005-04-30 Christopher Faylor <cgf@timesys.com>
-
- * environ.cc (spenv::force_into_environment): Rename from add_always.
- (spenv::add_if_exists): Rename from force.
- (build_env): Accommodate name changes. Make sure that stuff that is
- always supposed to be in the environment is actually added to the
- environment.
-
- * shared.cc (open_shared): Restore VirtualFree eliminated by 2005-04-28
- change.
-
-2005-04-30 Christopher Faylor <cgf@timesys.com>
-
- * errno.cc (errmap): Sort table.
-
-2005-04-29 Christopher Faylor <cgf@timesys.com>
-
- * errno.cc (errmap): Map ERROR_NETNAME_DELETED to ENOSHARE.
-
-2005-04-28 Corinna Vinschen <corinna@vinschen.de>
-
- * shared_info.h (cygwin_shared_address): Bump to a higher value to avoid
- collision with large data areas.
-
-2005-04-28 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_console.cc (fhandler_console::get_tty_stuff): Accommodate
- changes to open_shared arguments.
- * fhandler_tape.cc (mtinfo_init): Ditto.
- * pinfo.cc (pinfo::init): Use open_shared rather than win32 mmap calls.
- * shared.cc (user_shared_initialize): Ditto.
- (memory_init): Ditto.
- (open_shared): Change to allow use a smore general mmap handler.
- * shared_info.h (shared_locations): Add SH_JUSTCREATE, SH_JUSTOPEN.
- (open_shared): Change declaration to match new usage.
-
- * autoload.cc (LoadDLLfuncEx2): Define in terms of LoadDLLfuncEx3.
- (LoadDLLfuncEx3): New macro.
-
-2005-04-27 Christopher Faylor <cgf@timesys.com>
-
- * fhandler.cc (fhandler_base::open_9x): Remove (broken) check for
- O_CREAT|O_EXCL.
- * syscalls.cc (open): Do O_CREAT|O_EXCL check here first.
-
-2005-04-26 Christopher Faylor <cgf@timesys.com>
-
- * environ.cc (build_env): Ensure that win32 array is properly filled in
- when a missing value has to be generated.
-
-2005-04-26 Christopher Faylor <cgf@timesys.com>
-
- * include/cygwin/version.h: Bump DLL minor number to 17.
-
-2005-04-24 Pavel Tsekov <ptsekov@gmx.net>
-
- * how-to-debug-cygwin.txt: Fix typo.
-
-2005-04-22 Christopher Faylor <cgf@timesys.com>
-
- * shared.cc (user_shared_initialize): Implement locking similar to
- shared_info when initializing shared region.
-
-2005-04-22 Christopher Faylor <cgf@timesys.com>
-
- * fhandler.h (dev_console::set_color): Define new function.
- (dev_console::set_default_attr): Ditto, moved from fhandler_console.
- (dev_console::fillin_info): Ditto. Accommodate this change throughout
- this file.
- (fhandler_console::get_win32_attr): Eliminate.
- * fhandler_console.cc (fhandler_console::get_tty_stuff): Properly set
- default attributes on initialization.
- (fhandler_console::open): Set current attributes rather than default
- color on open.
- (fhandler_console::get_win32_attr): Eliminate.
- (dev_console::set_color): New function. Move get_win32_attr stuff
- here.
- (dev_console::set_default_attr): New function, moved from
- fhandler_console.
- (dev_console::fillin_info): Ditto.
- (fhandler_console::char_command): Call set_color to set screen
- characteristics.
-
-2005-04-22 Christopher Faylor <cgf@timesys.com>
-
- * fhandler.cc (fhandler_base::read): Remove unused signal state tweaks.
- * fhandler.h (fhandler_pipe::create_selectable): Declare.
- (fhandler_fifo::close_one_end): Declare.
- * fhandler_fifo.cc (fhandler_fifo::close_one_end): Define.
- (fhandler_fifo::open_not_mine): Use close_one_end to close appropriate
- end of pipe.
- * pinfo.cc (_pinfo::commune_recv): Ditto.
- * pipe.cc (fhandler_pipe::create_selectable): Rename from
- create_selectable_pipe. Reorganize.
- (fhandler_pipe::create): Use create_selectable.
-
-2005-04-21 Christopher Faylor <cgf@timesys.com>
-
- * shared.cc (shared_info::initialize): Test previous version of shared
- memory magic rather than current version when determining if there has
- been a shared memory mismatch.
-
-2005-04-20 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc (proc_subproc): Fix handling of waiting for pids with zero
- value.
-
- * strace.cc (strace::hello): Report parent pid of executing process.
-
-2005-04-20 Christopher Faylor <cgf@timesys.com>
-
- * path.cc (path_conv::check): Fix problem reading symlinks introduced
- in below change by reverting the change and adding an additional test
- for nonexistent files in /proc.
-
-2005-04-20 Christopher Faylor <cgf@timesys.com>
-
- * path.cc (path_conv::check): Punt when attempting to access a
- nonexistent directory or file in /proc.
-
-2005-04-19 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (alloc_sd): Remove DELETE bit from user's ACE if
- allow_traverse is set.
-
-2005-04-19 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din (pselect): Export.
- * select.cc (pselect): New function.
- * include/cygwin/version.h: Bump API minor number.
- * include/sys/select.h: Include signal.h. Declare pselect.
-
-2005-04-18 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (enum conn_state): Add connect_failed state.
- * fhandler_socket.cc (fhandler_socket::connect): Set connect_state to
- connect_failed when connect failed.
- * poll.cc (poll): Change errno to EINVAL if allocating memory fails,
- according to SUSv3. Add socket descriptors always to except_fds. Test
- for failed connect and set revents flags appropriately.
- * select.cc (set_bits): Set connect_state to connect_failed when
- select indicates failed nonblocking connect.
- (fhandler_dev_null::select_except): Set except_ready to false so that
- /dev/null is not always in except state.
- (peek_socket): Fix bogus conditional.
- (fhandler_socket::select_write): Treat all connect_states except
- unconnected equivalent to return consistent results.
- (fhandler_windows::select_except): Set except_ready to false so that
- /dev/windows is not always in except state.
-
-2005-04-18 Christopher Faylor <cgf@timesys.com>
-
- * include/cygwin/version.h: Bump DLL minor number to 16.
-
-2005-04-18 Pierre Humblet <pierre.humblet@ieee.org>
-
- * grp.cc (initgroups32): Return the correct value.
-
-2005-04-16 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_base::utimes_fs): Ignore
- ERROR_NOT_SUPPORTED to workaround Win9x weirdness.
- * path.cc (symlink_info::check): Remap ERROR_INVALID_FUNTION to
- ERROR_FILE_NOT_FOUND for the same reason.
-
-2005-04-16 Corinna Vinschen <corinna@vinschen.de>
- Pierre Humblet <pierre.humblet@ieee.org>
-
- * security.h (cygsidlist::addfromgr): Allow duplicate entries.
- (get_server_groups): Declare new function.
- * security.cc (is_group_member): Simplify.
- (get_server_groups): New function.
- (get_initgroups_sidlist): Call get_server_groups.
- (verify_token): Allow token when supplementary sids are not in
- /etc/group but are in the token.
- Streamline the code.
- * grp.cc (initgroups32): New implementation.
- (getgroups32): Handle case where the supplementary groups are set.
-
-2005-04-16 Corinna Vinschen <corinna@vinschen.de>
-
- * environ.cc (environ_init): Don't set traverse checking as default.
-
-2005-04-16 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_base::utimes_fs): Drop touching
- ChangeTime.
-
-2005-04-16 Christopher Faylor <cgf@timesys.com>
-
- * fhandler.cc (fhandler::dup): Duplicate flags, too.
- * fhandler.h (fhandler_fifo::owner): Eliminate.
- * fhandler_disk_file.cc (fhandler_base::fstat_fs): Handle on-disk
- devices better.
- (fhandler_base::fstat_helper): Ditto.
- * fhandler_fifo.cc (fhandler_fifo::fhandler_fifo): Don't initialize
- obsolete "owner".
- (fhandler_fifo::open_not_mine): Add some debugging. Duplicate correct
- handle when we own it.
- (fhandler_fifo::open): Set flags from input, not from first pipe. Flag
- that fork fixup is needed.
- (fhandler_fifo::dup): Set errno correctly when DuplicateHandle fails.
- * pinfo.cc (commune_send): Add debugging for fifo.
-
- * cygwin/version.h: Bump API minor version to 127 to reflect exporting
- of sigrelese.
-
-2005-04-14 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * syscalls.cc (setuid32): Correct debugging output.
-
-2005-04-14 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (do_global_dtors): Run DLL dtors.
- (__main): Don't rely on atexit to run dtors.
- (do_exit): Specifically call do_global_dtors here.
- (cygwin_exit): Ditto.
- * dll_init.cc (dll_global_dtors): Make global. Only run dtors once.
- (dll_list::init): Just set flag that dtors should be run. Don't rely on atexit.
- * dll_init.h (dll_global_dtors): Declare.
-
- * exceptions.cc (sigrelse): Define.
-
- * path.h (is_fs_device): New method.
- (is_lnk_special): Ditto.
- * fhandler_disk_file.cc (fhandler_disk_file::link): Use
- "is_lnk_special" rather than "is_lnk_symlink".
- * syscalls.cc (rename): Ditto.
-
- * hookapi.cc (ld_preload): Use colon as a separator rather than space.
-
-2005-04-13 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_socket): Remove utimes.
- * fhandler_socket.cc (fhandler_socket::utimes): Remove.
-
-2005-04-13 Corinna Vinschen <corinna@vinschen.de>
-
- * cygerrno.h (__seterrno_from_nt_status): Define. Always set Win32
- error code as well as errno. Use throughout where errno is set from
- NT status.
- (set_errno): Evaluate val only once.
- * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Fix typo in
- debug output.
- * fhandler_mem.cc (fhandler_dev_mem::open): Rely on
- __seterrno_from_nt_status setting Win32 error code in debug output.
- * fhandler_proc.cc (format_proc_uptime): Ditto.
- (format_proc_stat): Ditto.
- * fhandler_process.cc (format_process_stat): Ditto.
- * sysconf.cc (sysconf): Ditto.
-
-2005-04-13 Christopher Faylor <cgf@timesys.com>
-
- * fhandler.h (fhandler_base::utimes_fs): New method.
- * fhandler.cc (fhandler_base::utimes): Call utimes_fs if on-disk
- special file.
- * fhandler_disk_file.cc (fhandler_disk_file::utimes): Use utimes_fs.
- (fhandler_base::utimes_fs): Handle on-disk device files.
-
-2005-04-13 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::utimes): Don't set errno
- if open fails, it has already been set by open.
-
-2005-04-12 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (NtQueryVolumeInformationFile): Add.
- * fhandler.cc (fhandler_base::raw_write): Don't touch has_changed flag.
- * fhandler.h (enum change_state): Remove.
- (fhandler_base::status): Revert has_changed to a simple bit.
- (fhandler_base::fstat_helper): Add nAllocSize parameter. Rename
- ftCreationTime to ftChangeTime.
- * fhandler_disk_file.cc: Call fstat_helper with additional
- allocation size throughout.
- (fhandler_base::fstat_by_handle): Use NT native functions to get
- full file information on NT. Call fstat_helper with LastWriteTime
- as ctime, if ChangeTime is not available.
- (fhandler_base::fstat_by_name): Call fstat_helper with LastWriteTime
- as ctime.
- (fhandler_base::fstat_helper): Add comment. Drop special FAT
- handling since it's useless. Use nAllocSize for st_blocks if available.
- (fhandler_disk_file::touch_ctime): Only touch LastWriteTime.
- (fhandler_disk_file::fchmod): Set has_changed on 9x only.
- (fhandler_disk_file::fchown): Don't set has_changed.
- (fhandler_disk_file::facl): Ditto.
- (fhandler_disk_file::ftruncate): Ditto.
- (fhandler_disk_file::link): Set has_changed on 9x only and on original
- file only.
- (fhandler_base::open_fs): Don't set has_changed in O_TRUNC case.
- * ntdll.h (FILE_BASIC_INFORMATION): Define.
- (FILE_STANDARD_INFORMATION): Define.
- (FILE_INTERNAL_INFORMATION): Define.
- (FILE_EA_INFORMATION): Define.
- (FILE_ACCESS_INFORMATION): Define.
- (FILE_POSITION_INFORMATION): Define.
- (FILE_MODE_INFORMATION): Define.
- (FILE_ALIGNMENT_INFORMATION): Define.
- (FILE_NAME_INFORMATION): Don't define with arbitrary FileName size.
- (FILE_ALL_INFORMATION): Define.
- (FILE_INFORMATION_CLASS): Add FileAllInformation.
- (FILE_FS_VOLUME_INFORMATION): Define.
- (FS_INFORMATION_CLASS): Define.
- (NtQueryVolumeInformationFile): Define.
-
-2005-04-11 Corinna Vinschen <corinna@vinschen.de>
-
- Revert previous patch.
- * autoload.cc (GetVolumePathNamesForVolumeNameA): Remove.
- (GetVolumeNameForVolumeMountPointA): Add.
- * syscalls.cc (sync): Rewrite guid case to skip floppies also on
- Windows 2000.
-
-2005-04-11 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (sync): Use renamed has_get_volume_pathnames wincap.
- * wincap.h (wincaps::has_get_volume_pathnames): Rename from
- has_guid_volumes
- * wincap.cc: Accommodate above rename throughout. Set to false on
- Windows 2000.
-
-2005-04-08 Christopher Faylor <cgf@timesys.com>
-
- * pipe.cc (fhandler_pipe::open): Remove O_CREAT limitation.
-
-2005-04-07 Corinna Vinschen <corinna@vinschen.de>
-
- * syslog.cc (try_connect_guard): Remove useless conditionalized code.
-
-2005-04-07 Corinna Vinschen <corinna@vinschen.de>
-
- * syslog.cc: Include sys/socket.h.
- (try_connect_guard): New static variable.
- (syslogd_inited): Ditto.
- (syslogd_sock): Ditto.
- (try_connect_syslogd): New function to connect and write syslog to
- local syslogd.
- (vsyslog): Log to stderr if LOG_PERROR flag has been given to openlog.
- Try logging to syslogd. Use Event Log resp. log file as fallback.
- (closelog): Close socket to syslogd.
- * include/sys/syslog.h (_PATH_LOG): Define.
- (INTERNAL_NOPRI): Define if SYSLOG_NAMES is defined.
- (INTERNAL_MARK): Ditto.
- (struct _code): Ditto.
- (prioritynames): Ditto.
- (facilitynames): Ditto.
-
-2005-04-06 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (get_inet_addr): Add type parameter to return
- unix socket type. Read socket type from unix socket file.
- (fhandler_socket::bind): Write socket type to unix socket file.
- (fhandler_socket::connect): Return with errno EPROTOTYPE if
- socket type of socket doesn't match socket type of unix socket
- trying to connect to.
-
-2005-04-06 Pierre Humblet <pierre.humblet@ieee.org>
-
- * security.h (cygsidlist::addfromgr): Avoid duplicate entries.
- * grp.cc (initgrousp): Add syscall_printf.
- (setgroups): Add syscall_printf and make sure sids are added only once.
-
-2005-04-06 Christopher Faylor <cgf@timesys.com>
-
- * net.cc (cygwin_getservbyname): Return (possibly NULL) return value of
- dup_ent rather than assuming that tls buffer is valid.
- (cygwin_getservbyport): Ditto.
- (cygwin_gethostbyname): Ditto.
- (cygwin_gethostbyaddr): Ditto.
-
-2005-04-05 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.cc (_cygtls::remove): Don't free or close stuff if we're being
- called in a "non-standard" way.
-
-2005-04-05 Christopher Faylor <cgf@timesys.com>
-
- * sync.h (muto::initforce): Delete flawed implementation.
- * pwdgrp.h (pwdgrp::pglock): Make static.
- * grp.cc (pwdgrp::pwdgrp): Eliminate use of initforce.
-
-2005-04-05 Christopher Faylor <cgf@timesys.com>
-
- * sync.h (muto::initforce): Force initialization even when name !=
- NULL.
- * grp.cc (pwdgrp::pwdgrp): Use initforce since the enclosing structure
- is !NO_COPY.
-
-2005-04-05 Christopher Faylor <cgf@timesys.com>
-
- * sync.h (muto::operator int): New operator.
- (locker): Remove unused class.
- (new_muto): Delete.
- (new_muto1): Ditto.
- (new_muto_name): Ditto.
- * cygheap.cc (cygheap_setup_for_child): Reflect use of static storage
- for muto rather than pointer.
- (_csbrk): Ditto.
- (_cmalloc): Ditto.
- (_cmalloc): Ditto.
- (_cfree): Ditto.
- * cygheap.h (cwdstuff::cwd_lock): Ditto.
- (cwdstuff::get_drive): Ditto.
- * cygmalloc.h (__malloc_lock): Ditto.
- (__malloc_unlock): Ditto.
- * cygtls.cc (sentry::lock): Ditto.
- (sentry::sentry): Ditto.
- (~sentry): Ditto.
- (_cygtls::init): Ditto.
- * dcrt0.cc: Ditto.
- (cygwin_atexit): Ditto.
- (cygwin_exit): Ditto.
- * debug.cc (lock_debug::locker): Ditto.
- (lock_debug::lock_debug): Ditto.
- (lock_debug::unlock): Ditto.
- (debug_init): Ditto.
- * dtable.cc (dtable::init_lock): Ditto.
- * dtable.h (dtable::lock_cs): Ditto.
- (dtable::lock): Ditto.
- (dtable::unlock): Ditto.
- * exceptions.cc (mask_sync): Ditto.
- (sighold): Ditto.
- (set_process_mask_delta): Ditto.
- (set_signal_mask): Ditto.
- (events_init): Ditto.
- * grp.cc (pwdgrp::pwdgrp): Ditto.
- * malloc_wrapper.cc (mallock): Ditto.
- (malloc_init): Ditto.
- * path.cc (cwdstuff::cwd_lock): Ditto.
- (cwdstuff::get_hash): Ditto.
- (cwdstuff::get_hash): Ditto.
- (cwdstuff::init): Ditto.
- (cwdstuff::set): Ditto.
- (cwdstuff::get): Ditto.
- * pwdgrp.h (pwdgrp::pglock): Ditto.
- (pwdgrp::refresh): Ditto.
- * sigproc.cc (sync_proc_subproc): Ditto.
- (get_proc_lock): Ditto.
- (proc_subproc): Ditto.
- (_cygtls::remove_wq): Ditto.
- (proc_terminate): Ditto.
- (sigproc_init): Ditto.
- * timer.cc (lock_timer_tracker::protect): Ditto.
- (lock_timer_tracker::lock_timer_tracker): Ditto.
- (lock_timer_tracker::~lock_timer_tracker): Ditto.
- * wininfo.cc (wininfo::_lock;): Ditto.
- (wininfo::winthread): Ditto.
- (operator HWND): Ditto.
- (wininfo::lock): Ditto.
- (wininfo::release): Ditto.
- * wininfo.h (wininfo::_lock;): Ditto.
-
-2005-04-04 Christopher Faylor <cgf@timesys.com>
-
- * path.cc (path_conv::check): Only check for PC_NO_ACCESS_CHECK in end
- component.
-
-2005-04-04 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc (dll_crt0_1): Don't call set_cygwin_privileges on 9x.
-
- * fhandler.h (enum change_state): Add.
- (fhandler_base::status): Add a bit to has_changed flag.
- (fhandler_base::has_changed): Implement with type change_state.
- * fhandler.cc (fhandler_base::raw_write): Accommodate type change
- of has_changed.
- * fhandler_disk_file.cc (fhandler_disk_file::touch_ctime): Also
- touch modification time if has_changed == data_changed.
- (fhandler_disk_file::fchmod): Also open on 9x, otherwise we can't
- touch ctime. Accommodate type change of has_changed.
- (fhandler_disk_file::fchown): Accommodate type change of has_changed.
- (fhandler_disk_file::facl): Ditto.
- (fhandler_disk_file::ftruncate): Ditto.
- (fhandler_disk_file::link): Ditto.
- (fhandler_base::open_fs): Ditto.
-
-2005-04-03 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.cc (cygheap_init): Accommodate set_process_privilege change.
- * cygheap.h (cygheap_user::curr_primary_token): New member.
- (cygheap_user::primary_token): New method.
- (cygheap_user::deimpersonate): Always revert to processes'
- impersonation token.
- (cygheap_user::reimpersonate): Set processes' or setuid token as
- necessary.
- (cygheap_user::has_impersonation_tokens): Look for curr_primary_token
- value.
- (cygheap_user::close_impersonation_tokens): Close curr_primary_token
- here if necessary. Don't reset token values to NO_IMPERSONATION since
- that's done in uinfo_init anyway.
- (init_cygheap::luid): New LUID array keeping privilege LUIDs.
- * cygtls.cc (_cygtls::init_thread): Call cygheap->user.reimpersonate.
- * dcrt0.cc (hProcToken): New global variable to keep process token.
- (hProcImpToken): Ditto for process impersonation token.
- (dll_crt0_0): Open process token here once. Duplicate to create
- hProcImpToken.
- (dll_crt0_1): Call set_cygwin_privileges.
- * environ.cc (allow_ntea): Drop duplicate declaration.
- (allow_smbntsec): Ditto.
- (set_traverse): Only set allow_traverse here.
- (environ_init): Ditto.
- * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Drop call to
- enable_restore_privilege.
- (fhandler_disk_file::fchown): Ditto.
- (fhandler_disk_file::facl): Ditto.
- * fork.cc (fork_child): Move call to cygheap->user.reimpersonate after
- syn with parent. Call set_cygwin_privileges.
- * grp.cc (internal_getgroups): Use hProcImpToken instead of opening
- process token.
- * path.cc (fs_info::update): Bypass traverse checking when retrieving
- volume information using push/pop_thread_privileges.
- * registry.cc (load_registry_hive): Drop setting restore privilege
- since it's already set if available.
- * sec_helper.cc: Include cygtls.h.
- (cygpriv): Privilege string array.
- (privilege_luid): New function, evaluate LUID from cygpriv_idx.
- (privilege_luid_by_name): New function, evaluate LUID from privilege
- string.
- (privilege_name): New function, evaluate privilege string from
- cygpriv_idx.
- (set_privilege): New static function called by set_process_privilege
- and set_thread_privilege. Call privilege_luid to get privilege LUID.
- Fix bug in return value evaluation. Improve debug output.
- (set_cygwin_privileges): New function.
- (set_process_privilege): Remove.
- (enable_restore_privilege): Remove.
- * security.cc (allow_traverse): New global variable.
- (sys_privs): Change type to cygpriv_idx and store privilege indices
- instead of strings.
- (SYSTEM_PRIVILEGES_COUNT): Renamed from SYSTEM_PERMISSION_COUNT.
- (get_system_priv_list): Don't use numerical constant in malloc call.
- Use privilege_luid to get privilege LUIDs.
- (get_priv_list): Call privilege_luid_by_name to get LUIDs. Improve
- inner privilege LUID comparison loop.
- (create_token): Enable create token privilege using
- push/pop_self_privileges. Use hProcToken instead of opening process
- token. Use default DACL when duplicating token.
- (subauth): Enable tcb privilege using push/pop_self_privileges.
- Use sec_none instead of homw made security attributes when duplicating
- token.
- (check_file_access): Don't duplicate access token, use active
- impersonation token as is.
- * security.h (enum cygpriv_idx): New enumeration type enumerating
- possible privileges.
- (privilege_luid): Declare new function.
- (privilege_luid_by_name): Ditto.
- (privilege_name): Ditto.
- (allow_traverse): Declare.
- (set_privilege): Declare function.
- (set_process_privilege): Define as macro.
- (enable_restore_privilege): Remove declaration.
- (_push_thread_privilege): Define macro.
- (push_thread_privilege): Ditto.
- (pop_thread_privilege): Ditto.
- (pop_self_privilege): Ditto.
- * spawn.cc (spawn_guts): Use cygheap->user.primary_token instead of
- cygheap->user.token.
- * syscalls.cc (statvfs): Bypass traverse checking when retrieving
- volume information using push/pop_thread_privileges. Rearrange code
- to simplify push/pop bracketing.
- (seteuid32): Use hProcToken instead of opening process token. Call
- cygheap->user.deimpersonate instead of RevertToSelf. Create
- impersonation token from primary internal or external token. Set
- cygheap->user.curr_primary_token and cygheap->user.current_token
- privileges once here. Drop "failed" and "failed_ptok" labels.
- Drop setting DefaultDacl of process token.
- (setegid32): Use hProcToken and hProcImpToken instead of opening
- process token. Always reimpersonate afterwards.
- * uinfo.cc (cygheap_user::init): Use hProcToken instead of opening
- process token.
- (internal_getlogin): Ditto. Set hProcImpToken, too.
- (uinfo_init): Initialize cygheap->user.curr_primary_token.
- * winsup.h (hProcToken): Declare.
- (hProcImpToken): Declare.
-
-2005-04-03 Corinna Vinschen <corinna@vinschen.de>
-
- Unify usage of CYG_MAX_PATH throughout. Change buffers from
- size CYG_MAX_PATH + 1 to CYG_MAX_PATH. Change length tests
- accordingly.
-
-2005-04-02 Christopher Faylor <cgf@timesys.com>
-
- * include/cygwin/version.h: Bump DLL minor number to 15.
-
-2005-04-01 Corinna Vinschen <corinna@vinschen.de>
-
- * fork.cc (fork_child): Add missing __stdcall.
-
-2005-04-01 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc (create_signal_arrive): New (temporary?) function to
- create signal_arrived event.
- (sigproc_init): Use create_signal_arrived.
- * fork.cc (fork_child): Create signal_arrived early.
-
-2005-04-01 Corinna Vinschen <corinna@vinschen.de>
-
- * fork.cc (fork_child): Fixup SYSV IPC shared memory before fixing
- up fdtab.
-
-2005-03-31 Corinna Vinschen <corinna@vinschen.de>
-
- * gentls_offsets: Add '-m32' flag to native compiler call to satisfy
- cross platform builds.
-
-2005-03-31 Corinna Vinschen <corinna@vinschen.de>
-
- * errno.cc (NO_SYSTEM_RESOURCES): Map to EAGAIN.
- (NONPAGED_SYSTEM_RESOURCES): Ditto.
- (PAGED_SYSTEM_RESOURCES): Ditto.
- (WORKING_SET_QUOTA): Ditto.
- (PAGEFILE_QUOTA): Ditto.
- (COMMITMENT_LIMIT): Ditto.
-
-2005-03-30 Christopher Faylor <cgf@timesys.com>
-
- * environ.cc (spenvs): Re-force SYSTEMROOT to always be included in
- environment.
- (build_env): Ditto.
-
-2005-03-30 Christopher Faylor <cgf@timesys.com>
-
- * environ.cc (spenv::retrieve): Revert most of previous change.
- (build_env): Ditto. Rework to track environment variables which need
- to always be in the windows environment in a separate array.
-
-2005-03-30 Igor Pechtchanski <pechtcha@cs.nyu.edu>
-
- * path.cc (symlink_info::case_check): Ignore trailing characters
- in paths when comparing case.
-
-2005-03-30 Christopher Faylor <cgf@timesys.com>
-
- * environ.h (win_env::immediate): Declare new field.
- (win_env::operator = ): Declare new operator.
- (win_env::reset): Declare new function.
- (win_env::~win_env): Declare new destructor.
- (getwinenv): Add optional third argument to declaration.
- * environ.cc (conv_envvars): Accommodate immediate field.
- (win_env::operator =): Define new operator.
- (win_env::~win_env): Define new destructor.
- (win_env::add_cache): Add value to environment immediately if
- "immediate" is set.
- (getwinenv): Accept optional third argument which will be used to store
- "cached" values to avoid overwriting real cache.
- (spenv::force): Declare new field.
- (spenvs): Accommodate force field. Add "PATH=" with force set to true.
- (spenv::retrieve): Avoid duping anything if we're not building an
- envblock.
- (build_env): Ditto. Use size of potentially constructed new
- environment block to determine if we need to create an environment
- block. Pass getwinenv temporary storage to avoid inappropriately
- overwriting the environment cache.
-
-2005-03-29 Eric Blake <ebb9@byu.net>
-
- * include/limits.h (NAME_MAX): New define.
- (PATH_MAX): POSIX allows PATH_MAX to include trailing NUL.
-
-2005-03-29 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (is_floppy): Make externally available.
- * path.h (is_floppy): Declare.
- * syscalls.cc (sync): Check for floppies on A: and B: in guid case.
- Don't call setmntent in non-guid case but evaluate drive bit mask
- locally.
-
-2005-03-29 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_process.cc: Re-add exename.
-
-2005-03-28 Christopher Faylor <cgf@timesys.com>
-
- * include/ctype.h: Accommodate building in newlib.
-
-2005-03-28 Christopher Faylor <cgf@timesys.com>
-
- * timer.cc (getitimer): Check that ovalue is a valid pointer, not just
- NULL.
-
-2005-03-28 Christopher Faylor <cgf@timesys.com>
-
- * timer.cc (timer_tracker::settime): Set times to zero when just
- cancelling a timer.
-
-2005-03-28 Christopher Faylor <cgf@timesys.com>
-
- * cygthread.cc (cygthread::detach): Revert to just waiting for thread
- event since waiting for anything else is racy.
- * timer.cc (timer_tracker::hcancel): Rename from cancel.
- (timer_tracker::cancel): New method.
- (timer_tracker::th): Remove.
- (timer_tracker::~timer_tracker): Call cancel method.
- (timer_tracker::timer_tracker): Ditto.
- (timer_tracker::timer_tracker): Always, clear cancel, even though it is
- probably not strictly necessary for ttstart.
- (timer_thread): Accommodate cancel -> hcancel rename.
- (timer_tracker::settime): Ditto.
- (timer_tracker::gettime): Ditto.
- (timer_delete): Ditto.
-
- * cygwin.din: Export _ctype_.
- * include/ctype.h: Mark that _ctype_ is imported.
-
-2005-03-28 Christopher Faylor <cgf@timesys.com>
-
- * timer.cc (timer_tracker::timer_tracker): Eliminate simple
- constructor.
- (ttstart): Fully initialize.
-
- * errno.cc: Fix typo introduced in previous change.
-
-2005-03-28 Eric Blake <ebb9@byu.net>
-
- * errno.cc (FILENAME_EXCED_RANGE): Map to ENAMETOOLONG.
-
-2005-03-27 Christopher Faylor <cgf@timesys.com>
-
- * signal.cc (nanosleep): Revert tv_sec < 0 check as it is fixed
- properly in the below change to hires.h.
-
-2005-03-27 Pierre Humblet <pierre.humblet@ieee.org>
-
- * times.cc (hires_ms::usecs): Compare the difference.
- * hires.h: Add parentheses to HIRES_DELAY_MAX.
-
-2005-03-26 Christopher Faylor <cgf@timesys.com>
-
- * timer.cc (nanosleep): Treat tv_sec < 0 as invalid.
-
- * include/search.h: Make declarations consistent with newlib.
-
-2005-03-26 Pierre Humblet <pierre.humblet@ieee.org>
- Christopher Faylor <cgf@timesys.com>
-
- * wininfo.h (wininfo::timer_active): Delete.
- (wininfo::itv): Ditto.
- (wininfo::start_time): Ditto.
- (wininfo::window_started): Ditto.
- (wininfo::getitimer): Ditto.
- (wininfo::setitimer): Ditto.
- (wininfo::wininfo): Ditto.
- (wininfo::lock): New method.
- (wininfo::release): Ditto.
- * window.cc: Use new lock/acquire wininfo methods throughout.
- (wininfo::wininfo): Delete
- (wininfo::getitimer): Ditto.
- (wininfo::setitimer): Ditto.
- (getitimer): Ditto.
- (setitimer): Ditto.
- (ualarm): Ditto.
- (alarm): Ditto.
- (wininfo::lock): Define new function.
- (wininfo::release): Ditto.
- (wininfo::process): Delete WM_TIMER handling.
- * timer.cc (struct timetracker): Delete it, flags. Add it_interval,
- interval_us, sleepto_us, running, init_muto(), syncthread, and
- gettime().
- (ttstart): Make NO_COPY.
- (lock_timer_tracker): New class.
- (timer_tracker::timer_tracker): Distinguish ttstart case.
- (timer_tracker::~timer_tracker): New destructor. Clean out events, and
- reset magic.
- (timer_tracker::init_muto): New method.
- (to_us): Round up as per POSIX.
- (timer_thread): Reorganize to match timer_tracker::settime and
- timer_tracker::gettime. Call sig_send without wait. Call
- auto_release.
- (timer_tracker::settime): Reorganize logic to avoid race. Call gettime
- to recover old value.
- (timer_tracker::gettime): New method.
- (timer_create): Properly set errno on invalid timerid. Use new
- lock_timer_tracker method.
- (timer_delete): Ditto. Simplify code slightly.
- (timer_gettime): New function.
- (fixup_timers_after_fork): Reinit ttstart.
- (getitimer): New implementation.
- (setitimer): Ditto.
- (ualarm): Ditto.
- (alarm): Ditto.
- * cygwin.din: Export timer_gettime.
- * winsup.h: Remove has has_visible_window_station declaration.
-
-2005-03-26 Christopher Faylor <cgf@timesys.com>
-
- * Makefile.in (DLL_OFILES): Add lsearch.o.
- * cygthread.h (cygthread::notify_detached): New element.
- (cygthread::cygthread): Take optional fourth argument signifying event
- to signal on thread completion.
- * cygthread.cc (cygthread::stub): Signal notify_detached event, if it
- exists.
- (cygthread::cygthread): Initialize notify_detached from fourth argument.
- (cygthread::detach): Wait for notify_detached field is present.
-
- * lsearch.cc: New file.
- * search.h: Ditto.
- * include/cygwin/version.h: Bump API minor number to 126.
- * cygwin.din: Export lsearch, lfind.
-
-2005-03-23 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_socket::secret_event): Remove.
- (fhandler_socket::af_local_set_secret): New function combining former
- set_connect_secret and get_connect_secret into one function.
- (fhandler_socket::af_local_setblocking): Rename from eid_setblocking.
- (fhandler_socket::af_local_unsetblocking): Rename from
- eid_unsetblocking.
- (fhandler_socket::af_local_set_cred): New method.
- (fhandler_socket::af_local_copy): New method.
- (fhandler_socket::af_local_recv_secret): New method.
- (fhandler_socket::af_local_send_secret): New method.
- (fhandler_socket::af_local_recv_cred): Rename from eid_recv.
- (fhandler_socket::af_local_send_cred): Rename from eid_send.
- (fhandler_socket::af_local_accept): New method.
- (fhandler_socket::af_local_set_sockpair_cred): Rename from
- set_socketpair_eids.
- (fhandler_socket::eid_accept): Remove.
- (fhandler_socket::eid_connect): Remove.
- (fhandler_socket::set_connect_secret): Remove.
- (fhandler_socket::get_connect_secret): Remove.
- (fhandler_socket::create_secret_event): Remove.
- (fhandler_socket::check_peer_secret_event): Remove.
- (fhandler_socket::signal_secret_event): Remove.
- (fhandler_socket::close_secret_event): Remove.
- (fhandler_socket::sec_event_accept): Remove.
- (fhandler_socket::sec_event_connect): Remove.
- * fhandler_socket.cc (secret_event_name): Remove.
- (fhandler_socket::af_local_set_sockpair_cred): Rename from
- set_socketpair_eids.
- (fhandler_socket::af_local_setblocking): Rename from eid_setblocking.
- (fhandler_socket::af_local_unsetblocking): Rename from
- eid_unsetblocking.
- (fhandler_socket::af_local_recv_secret): New function to receive
- AF_LOCAL connect secret over socket itself.
- (fhandler_socket::af_local_send_secret): New function to send AF_LOCAL
- connect secret over socket itself.
- (fhandler_socket::af_local_recv_cred): Rename from eid_recv.
- (fhandler_socket::af_local_send_cred): Rename from eid_send.
- (fhandler_socket::eid_connect): Remove.
- (fhandler_socket::af_local_connect): Take over connect side handling
- of AF_LOCAL secret and credential handshake.
- (fhandler_socket::eid_accept): Remove.
- (fhandler_socket::af_local_accept): New method, take over accept side
- handling of AF_LOCAL secret and credential handshake.
- (fhandler_socket::af_local_set_cred): New method, set eid credentials
- to start values.
- (fhandler_socket::af_local_copy): New method, copy secret and
- credentials to another socket.
- (fhandler_socket::af_local_set_secret): New function combining former
- set_connect_secret and get_connect_secret into one function.
- (fhandler_socket::create_secret_event): Remove.
- (fhandler_socket::signal_secret_event): Remove.
- (fhandler_socket::close_secret_event): Remove.
- (fhandler_socket::check_peer_secret_event): Remove.
- (fhandler_socket::sec_event_connect): Remove.
- (fhandler_socket::sec_event_accept): Remove.
- (fhandler_socket::fixup_after_fork): Drop secret_event handling.
- (fhandler_socket::bind): Call af_local_set_secret.
- (fhandler_socket::connect): Call af_local_set_cred and af_local_connect.
- (fhandler_socket::listen): Call af_local_set_cred.
- (fhandler_socket::accept): Call af_local_copy and af_local_accept on
- accepted socket.
- (fhandler_socket::close): Don't call close_secret_event.
- (fhandler_socket::set_close_on_exec): Don't set secret_event
- inheritance.
- * net.cc (cygwin_getsockopt): Add debug output.
- (socketpair): Call af_local_set_sockpair_cred instead of
- set_socketpair_eids.
- * select.cc (set_bits): Drop AF_LOCAL special handling in case
- of except bit set.
-
-2005-03-23 Christopher Faylor <cgf@timesys.com>
-
- * include/ctype.h: Always define macros when inside cygwin.
- (isblank): New macro.
-
-2005-03-23 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_socket::eid_connect): Make private.
- (fhandler_socket::set_connect_secret): Ditto.
- (fhandler_socket::get_connect_secret): Ditto.
- (fhandler_socket::create_secret_event): Ditto. Remove secret argument.
- (fhandler_socket::check_peer_secret_event): Ditto.
- (fhandler_socket::signal_secret_event): Make private.
- (fhandler_socket::close_secret_event): Ditto.
- (fhandler_socket::sec_event_accept): New private method.
- (fhandler_socket::sec_event_connect): Ditto.
- (fhandler_socket::af_local_connect): New public method.
- * fhandler_socket.cc: Use 'struct sockaddr' and 'struct sockaddr_in'
- rather than just 'sockaddr' and 'sockaddr_in' throughout.
- (fhandler_socket::eid_connect): Drop AF_LOCAL/SOCK_STREAM test.
- (fhandler_socket::create_secret_event): Remove secret argument.
- Always use connect_secret instead.
- (fhandler_socket::check_peer_secret_event): Ditto.
- (fhandler_socket::sec_event_connect): New method, combining entire
- secret event handshake on connect side.
- (fhandler_socket::af_local_connect): New method, combining secret
- event handshake and eid credential transaction on connect side, to
- be called from select.
- (fhandler_socket::sec_event_accept): New method, combining entire
- secret event handshake on accept side.
- (fhandler_socket::connect): Drop secret, use connect_secret instead.
- Move entire secret event handshake to sec_event_connect.
- (fhandler_socket::accept): Move entire secret event handshake to
- sec_event_accept.
- * select.cc (set_bits): Just call af_local_connect here.
-
-2005-03-23 Christopher Faylor <cgf@timesys.com>
-
- * include/cygwin/version.h: Change comment for most recent API version
- bump to reflect new additions to the DLL and to remove change obsoleted
- by the previous checkin.
-
-2005-03-23 Christopher Faylor <cgf@timesys.com>
-
- * include/ctype.h: New file.
- * ctype.cc: Ditto.
- * Makefile.in: Add ctype.o to DLL_OFILES.
- * cygwin.din: Remove _ctype_ptr (for now?).
-
-2005-03-22 Christopher Faylor <cgf@timesys.com>
-
- * Makefile.in (DLL_OFILES): Add hookapi.o. Eliminate some cruft.
- * cygheap.h (cygheap_types): Add new enum: HEAP_1_HOOK.
- (hook_chain): New struct.
- (init_cygheap::hooks): Define new element.
- * cygheap.cc (cygheap_fixup_in_child): Zero hook chain on exec.
- * dcrt0.cc (dll_crt0_1): Call ld_preload just before calling main function.
- * external.cc (cygwin_internal): Implement CW_HOOK.
- * fork.cc (fork_child): Call fixup_hooks_after_fork.
- * init.cc (cygwin_hmodule): Reinstate after a long absence.
- * include/sys/cygwin.h: Define CW_HOOK.
- * hookapi.cc: New file.
-
- * select.cc (start_thread_socket): Add debugging output.
-
- * fhandler_disk_file.cc (fhandler_disk_file::fchmod): gcc 4.x
- accommodation.
-
- * fhandler_socket.cc (fhandler_socket::connect): Make sure that err is
- initialized.
-
-2005-03-22 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din (__ctype_ptr): Export.
- * include/cygwin/version.h: Bump API minor version.
-
-2005-03-21 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class cygthread): Remove forward declaration.
-
-2005-03-21 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class cygthread): Forward declare.
- (fhandler_socket::sec_pipe): Remove.
- (fhandler_socket::eid_pipe_name): Remove.
- (fhandler_socket::eid_setblocking): New private method.
- (fhandler_socket::eid_unsetblocking): Ditto
- (fhandler_socket::eid_recv): Ditto
- (fhandler_socket::eid_send): Ditto
- (fhandler_socket::eid_accept): Ditto
- (fhandler_socket::eid_connect): New public method.
- * fhandler_socket.cc (ASYNC_MASK): Move to beginning of file.
- (fhandler_socket::eid_pipe_name): Remove.
- (fhandler_socket::set_socketpair_eids): Move down to fhandler_socket
- methods.
- (fhandler_socket::fhandler_socket): Drop initializing sec_pipe.
- (fhandler_socket::~fhandler_socket): Drop closing sec_pipe.
- (fhandler_socket::eid_setblocking): New method.
- (fhandler_socket::eid_unsetblocking): New method.
- (fhandler_socket::eid_recv): New method.
- (fhandler_socket::eid_send): New method.
- (fhandler_socket::eid_connect): New method.
- (fhandler_socket::eid_accept): New method.
- (fhandler_socket::dup): Drop sec_pipe handling.
- (fhandler_socket::connect): Fix WinSock error handling. Prepare
- eid credential transaction. Call eid_connect on successful connect.
- (fhandler_socket::listen): Drop creating sec_pipe.
- (fhandler_socket::accept): Slightly simplify code. Call eid_accept
- on accepted socket.
- (fhandler_socket::getpeereid): Reshuffle code for readability. Fix
- test for invalid pid.
- * select.cc (set_bits): Call eid_connect on successfully connected
- socket.
-
-2005-03-19 Christopher Faylor <cgf@timesys.com>
-
- * child_info.h (fork_info): Use different method to alias variable.
- (spawn_info): Ditto.
- * cxx.cc (__cxa_guard_acquire): New function (needed for gcc 4.x).
- (__cxa_guard_release): Ditto.
- * devices.in: Make sure stuff is correctly bracketed (for gcc 4.x).
- * devices.cc: Regenerate.
- * fhandler.h (fhandler_disk_file::fchmod): Avoid left coercion (for gcc
- 4.x).
- * smallprint.c (__rn): Declare as __fastcall since gcc 4.x complains
- about use of regparm, for some reason.
- * sync.h (sync::init_lock): Remove.
- * sync.cc (sync::init_lock): Ditto.
-
-2005-03-18 Christopher Faylor <cgf@timesys.com>
-
- * net.cc (cygwin_getprotobyname): Don't try to be fancy with return
- values.
- (cygwin_getprotobynumber): Ditto.
-
-2005-03-17 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::utimes): Handle opening
- directories under 9x gracefully.
-
-2005-03-17 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::connect): Always set sun_path
- in case of a successful or pending connect.
- (fhandler_socket::accept): Don't run secret event and eid credential
- transactions if OS accept returned WSAEWOULDBLOCK.
-
-2005-03-16 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_tape.cc (get_ll): This is a generally useful function so
- move it
- * winsup.h (get_ll): to here.
- * security.cc (get_token_group_sidlist): Use get_ll to figure out the
- long long version of the luid since QuadPart is not part of the
- standard Windows API.
-
-2005-03-16 Christopher Faylor <cgf@timesys.com>
-
- * dir.cc: Rename opendir_* to dirent_* throughout.
- (opendir_states): Move and rename.
- * fhandler.h (dirent_states): to here.
- * fhandler_disk_file.cc (fhandler_disk_file::readdir): Use raw readdir
- when skipping through entries since it is keeping track of "." and
- "..".
- (fhandler_cygdrive::seekdir): Use fhandler_disk_file::readdir to do
- everything.
- * fhandler_virtual.cc (fhandler_virtual::opendir): Set flag indicating
- that we provide . and ..
- (fhandler_virtual::seekdir): Ditto.
- (fhandler_virtual::rewinddir): Ditto.
- * fhandler_registry.cc (fhandler_registry::rewinddir): Ditto.
-
-2005-03-16 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.cc (free_local): New macro.
- (_cygtls::remove): Use free_local to free known-malloced local
- variables.
- * cygtls.h: Mark some variables as "malloced".
- * net.cc (enum struct_type): Rename from is_* to t_* for clarity.
- (dump_protoent): Delete.
- (dup_ent): New macro.
- (__dup_ent): Renamed from dup_ent. Change arguments for convenience.
- Replace first argument with newly alloced value. Allocate a rounded
- number of bytes in an attempt to try to reuse space. Subsume
- "dump_protent".
- (cygwin_getprotobyname): Simplify using new dup_ent functionality.
- (cygwin_getprotobynumber): Ditto.
- (cygwin_getservbyname): Ditto.
- (cygwin_getservbyport): Ditto.
- (cygwin_gethostname): Ditto.
- (cygwin_gethostbyname): Ditto.
- * tlsoffsets.h: Regenerate.
-
- * syslog.cc (openlog): Use NULL rather than 0, for consistency with the
- rest of cygwin.
- (pass_handler::initialize): Use unbuffered I/O in pass one.
-
-2005-03-15 Christopher Faylor <cgf@timesys.com>
-
- * errno.cc (errmap): Correct typo in previous change.
-
-2005-03-15 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.cc (_cygtls::remove): Free process_ident, if it exists.
-
- * errno.cc (errmap): ERROR_DISK_CORRUPT -> EIO.
-
-2005-03-11 Christopher Faylor <cgf@timesys.com>
-
- * path.h (pathconv_arg): Define PC_NO_ACCESS_CHECK.
- (path_types): Define PATH_NO_ACCESS_CHECK == PC_NO_ACCESS_CHECK.
- * path.cc (symlink_info::check_sysfile): Move to symlink_info class and
- eliminate arguments that are part of class. Use set_error.
- (symlink_info::check_shortcut): Ditto.
- (symlink_info::set_error): New function.
- (path_conv::check): Pass PC_NO_ACCESS_CHECK to symlink_info::check.
- (symlink_info::check): Preserve PC_NO_ACCESS_CHECK in pflags. Use
- set_error.
-
-2005-03-10 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (is_floppy): New function.
- (setmntent): Drop floppy drives on A: and B: from logical drive DWORD.
- * syscalls.cc (sync): Don't sync floppies on A: and B:.
-
-2005-03-10 Christopher Faylor <cgf@timesys.com>
-
- * autoload.cc (LoadDLLprime): Use nocopy segment or forked processes
- will not initialize properly.
-
-2005-03-10 Christopher Faylor <cgf@timesys.com>
-
- * autoload.cc (LoadDLLprime): Scrap use of .linkonce and just use an
- ifdef guard to load .foo_init into data segment.
-
- * dcrt0.cc (initial_env): Allow colon or space as CYGWIN_DEBUG
- separator for consistency.
-
-2005-03-09 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.h (pinfo::pinfo): Clear more elements in the constructor.
-
-2005-03-09 Christopher Faylor <cgf@timesys.com>
-
- * net.cc (dup_ent): Revert older stupid test for null. Don't copy name
- if it is NULL.
-
-2005-03-09 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::eid_pipe_name): Fix format
- string.
- (fhandler_socket::connect): Set sun_path before running eid credential
- transaction. Run transaction only if OS connect was successful.
- (fhandler_socket::accept): Run transaction only if OS accept was
- successful.
-
-2005-03-09 Corinna Vinschen <corinna@vinschen.de>
-
- * signal.cc (sigprocmask): Rename first parameter to "how".
- (handle_sigprocmask): Ditto. Check "how" for being a valid "how" value.
- Fix call order in case of wrong "how" value.
-
-2005-03-09 Christopher Faylor <cgf@timesys.com>
-
- * net.cc (dup_ent): Revert previous stupid change.
-
-2005-03-09 Christopher Faylor <cgf@timesys.com>
-
- * net.cc (dup_ent): Avoid dereferencing a null pointer in a debug_printf.
-
-2005-03-09 Christopher Faylor <cgf@timesys.com>
-
- * path.cc (path_conv::check): Treat ENOSHARE similarly to ENOENT when
- determining if there was a problem with a symlink.
-
-2005-03-08 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::listen): Don't limit the number
- of pipe instances.
-
-2005-03-08 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (pinfo::exit): Right shift exit value by eight when not
- started in a cygwin environment.
-
-2005-03-07 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap64): Handle MAP_AUTOGROW flag.
- (fhandler_disk_file::mmap): Ditto. Clean conditional for readability.
- * include/sys/mman.h: Add MAP_AUTOGROW flag.
- * include/cygwin/version.h: Bump API minor version.
-
-2005-03-08 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (dll_crt0_0): Eliminate muto::init call.
- * sync.h (locker): New, currently unused class.
- (muto::init): Eliminate.
- * sync.cc (muto::init): Ditto.
- (muto::init): Eliminate critical section lock and instead use name as a
- guard to prevent against multiple attempts to initialize the same muto.
-
- * pinfo.cc (pinfo::init): Set myself procinfo when not execing and pid
- matches windows pid or cygwin pid.
-
-2005-03-06 Pavel Tsekov <ptsekov@gmx.net>
-
- * path.cc (mount_info::read_cygdrive_info_from_registry): Use the user
- prefix if it exists.
-
-2005-03-06 Christopher Faylor <cgf@timesys.com>
-
- * sync.h (sync::init_lock): Declare new static member.
- (sync::init()): Declare new static function.
- * sync.cc (sync::init): Define.
- (sync::init): Lock attempt to initialize a muto to stop multiple
- threads from colliding.
- * dcrt0.cc (dll_crt0_0): Initialize muto environment.
-
-2005-03-06 Christopher Faylor <cgf@timesys.com>
-
- * path.cc (special_name): Reorganize to always detect the use of
- special names first, before detecting special characters.
-
-2005-03-04 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_clipboard.cc: Use int for cygnativeformat rather than UINT
- as that is what is returned by GetPriorityClipboardFormat.
- (fhandler_dev_clipboard::read): Ditto for the format variable.
-
-2005-03-04 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open_9x): Satisfy query_open values.
-
-2005-03-04 Pierre Humblet <pierre.humblet@ieee.org>
-
- * fhandler_socket.cc (fhandler_socket::ioctl): Only cancel
- WSAAsyncSelect when async mode is on.
-
-2005-03-03 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din (utmpxname): Export.
- * syscalls.cc (utmpxname): Create export alias to utmpname.
- * include/utmpx.h: Define ut_name and ut_xtime if not already defined.
- (utmpxname): Add prototype.
- * include/sys/utmp.h: Only define ut_name if not already defined.
- * include/cygwin/version.h: Bump API minor version.
-
-2005-03-03 Christopher Faylor <cgf@timesys.com>
-
- * cygthread.cc (cygthread::detach): Use a slightly higher priority when
- waiting for thread signalling.
-
-2005-03-02 Christopher Faylor <cgf@timesys.com>
-
- * autoload.cc (std_dll_init): Save and restore fpu control register
- around LoadAddress to prevent loaded dlls (like msvcrt.dll) from
- setting unwanted stuff.
-
-2005-03-02 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.cc (_cygtls::remove): Don't attempt any removal activities if
- exitsock is zero.
-
-2005-03-02 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.cc (_cygtls::init_thread): Move exitsock setting later. It
- should always be set.
- (_cygtls::remove): Detect zero exitsock. Not quite sure why this is needed.
-
-2005-03-02 Christopher Faylor <cgf@timesys.com>
-
- * autoload.cc (LoadDLLprime): Mask error code to low-order 16 bits.
- (noload): Preserve sign when returning error code.
-
-2005-03-02 Christopher Faylor <cgf@timesys.com>
-
- * spawn.cc (do_cleanup): Properly restore SIGINT/SIGQUIT even if they
- had previously been SIG_DFL.
-
-2005-03-01 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::touch_ctime): Replace
- GetSystemTime/SystemTimeToFileTime with GetSystemTimeAsFileTime.
- * times.cc (time_as_timestruc_t): Ditto.
- (time): Ditto.
-
-2005-03-01 Christopher Faylor <cgf@timesys.com>
-
- * include/cygwin/version.h: Bump DLL minor number to 14.
-
-2005-03-01 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_clipboard.cc (fhandler_dev_clipboard::write): Never set
- errno to 0.
- (fhandler_dev_clipboard::read): Ditto.
- * fhandler_windows.cc (fhandler_windows::read): Ditto.
- * scandir.cc (scandir): Ditto.
- * syscalls.cc (_fstat64_r): Ditto.
- (_fstat_r): Ditto.
- (_stat64_r): Ditto.
- (_stat_r): Ditto.
-
- * mmap.cc (mmap64): Fix /dev/zero mapping.
-
-2005-02-28 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_socket): Declare new method
- set_socketpair_eids.
- * fhandler_socket.cc (fhandler_socket::set_socketpair_eids): New method.
- (fhandler_socket::dup): Duplicate sec_pipe if necessary.
- (fhandler_socket::listen): Only create sec_pipe if named pipes are
- available. Initialized sec_peer_pid to 0 as on Linux.
- (fhandler_socket::connect): Only run eid credential transaction if
- named pipes are available. Fake otherwise. Initialized sec_peer_pid
- to 0 as on Linux.
- (fhandler_socket::accept): Ditto.
- (fhandler_socket::close): Move closing sec_pipe handle from here...
- (fhandler_socket::~fhandler_socket): ... to here.
- * net.cc (socketpair): Set eid credentials by calling
- fhandler_socket::set_socketpair_eids() on both socket ends.
- * wincap.h (wincaps::has_named_pipes): New element.
- * wincap.cc: Implement above element throughout.
-
-2005-02-26 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc (_pinfo::set_ctty): Move function
- * pinfo.cc (_pinfo::set_ctty): to here.
-
- * fhandler_mem.cc (fhandler_dev_mem::fstat): Don't fill out structure
- if this is an on-disk device rather than an "auto" device.
- * fhandler_raw.cc (fhandler_dev_raw::fstat): Ditto.
-
- * path.cc (normalize_posix_path): Don't treat a standalone '//' as
- introducing a UNC path.
- (normalize_win32_path): Ditto.
-
-2005-02-26 Christopher Faylor <cgf@timesys.com>
-
- * debug.cc (delete_handle): Report on handle value in debugging output.
-
- * pinfo.h (_pinfo::exists): Declare "new" function.
- (_pinfo::kill): Ditto.
- * fhandler_termios.cc (tty_min::kill_pgrp): Use _pinfo::exists rather
- than proc_exists.
- * pinfo.cc (pinfo::init): Ditto. Don't do a low_priority_sleep(0) when
- looping to find exec'ed procinfo.
- (pinfo::release): Be more careful about unmapping and closing.
- * signal.cc (_pinfo::kill): Rename from kill_worker. Accommodate entry
- into _pinfo class.
- (kill0): Use _pinfo::kill rather than kill_worker.
- (kill_pgrp): Ditto. Use _pinfo::exists rather than proc_exists.
- * sigproc.cc (_pinfo::exists): Rename from proc_exists.
- (pid_exists): Use _pinfo::exists rather than proc_exists.
- (remove_proc): Ditto.
- * sigproc.h (proc_exists): Delete declaration.
-
-2005-02-25 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_base): Declare fixup_mmap_after_fork
- with additional flags parameter. Change offset parameter to _off64_t.
- (class fhandler_disk_file): Ditto.
- (class fhandler_dev_mem): Ditto.
- * fhandler_mem.cc (fhandler_dev_mem::fixup_mmap_after_fork):
- Accommodate new parameters.
- * mmap.cc: Include ntdll.h.
- (class mmap_record): Add flags member.
- (mmap_record::mmap_record): Add flags parameter.
- (mmap_record::get_flags): New method.
- (class map): Add next_anon_addr member to store next anonymous mapping
- address suggestion.
- (map::get_next_anon_addr): New method.
- (map::set_next_anon_addr): New method.
- (mmap64): Don't align offset and length to granularity in case of
- MAP_ANONYMOUS on NT. Check for already existing mapping only on 9x.
- Call mmap_record::mmap_record with additional flags argument.
- (fhandler_base::fixup_mmap_after_fork): Accommodate new parameters.
- (fhandler_disk_file::mmap): Use NtMapViewOfSection with
- AT_ROUND_TO_PAGE flag for anonymous mappings on NT. If addr is NULL,
- try to map adjacent to previous mapping.
- (fhandler_disk_file::fixup_mmap_after_fork): Add flags argument.
- Change offset parameter to _off64_t. Use NtMapViewOfSection to
- re-create anonymous mappings on NT.
- (fixup_mmaps_after_fork): Accommodate new parameters when calling
- fhandler's fixup_mmaps_after_fork function.
- * ntdll.h (AT_ROUND_TO_PAGE): New define.
-
-2005-02-25 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap64): Handle anonymous MAP_FIXED request on
- non-granulation boundary.
-
-2005-02-25 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (class mmap_record): Declare new map_pages method with
- address parameter.
- (mmap_record::map_pages): New method with address parameter.
- (mmap64): Evaluate access mode before checking if already existing
- mapping can be used.
- Only use existing mapping if requested access mode matches the one
- in the existing mapping.
- Add check for existing mapping for anonymous MAP_FIXED case.
-
-2005-02-23 Corinna Vinschen <corinna@vinschen.de>
-
- * localtime.cc: Implement setting __tzrule's offset member using
- newlib's __gettzinfo () interface.
- (__tzrule): Remove.
- (timezone): Define as long according to POSIX.
-
-2005-02-23 Eric Blake <ebb9@byu.net>
-
- * devices.in (parsedisk): Fix typo.
- * devices.cc: Regenerate.
-
-2005-02-23 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din (getpeereid): Export.
- * fhandler.h (class fhandler_socket): Add pipe and id members to
- exchange eid credentials for AF_LOCAL sockets.
- (eid_pipe_name): Declare new method.
- (getpeereid): Ditto.
- * fhandler_socket.cc (fhandler_socket::eid_pipe_name): New method.
- (fhandler_socket::fhandler_socket): Initialize sec_pipe.
- (fhandler_socket::connect): Exchange eid credentials with accepting
- socket process.
- (fhandler_socket::listen): Prepare eid credential transaction.
- (fhandler_socket::accept): Exchange eid credentials with connecting
- socket process.
- (fhandler_socket::close): Close eid credentials pipe if open.
- (fhandler_socket::getpeereid): New method.
- * net.cc (cygwin_getsockopt): Add SO_PEERCRED handling.
- (getpeereid): New function.
- * include/asm/socket.h (SO_PEERCRED): Define.
- * include/cygwin/socket.h (struct ucred): Define new type.
- * include/cygwin/version.h: Bump API minor version.
-
-2005-02-23 Corinna Vinschen <corinna@vinschen.de>
-
- * include/sys/statvfs.h (ST_RDONLY): Define.
- (ST_NOSUID): Define.
-
-2005-02-23 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din (fstatvfs): Export.
- (statvfs): Export.
- * syscalls.cc: Include sys/statvfs.h.
- (statvfs): New function. Move statfs functionality here.
- (fstatvfs): New function.
- (statfs): Just call statvfs and copy structure. Check validity of
- incoming struct statfs pointer.
- * include/cygwin/types.h (fsblkcnt_t): Define.
- (fsfilcnt_t): Define.
- * include/cygwin/version.h: Bump API minor version.
- * include/sys/statvfs.h: New file.
-
-2005-02-23 Corinna Vinschen <corinna@vinschen.de>
-
- * devices.h: Switch FH_ZERO and FH_PORT as on Linux. Add FH_FULL.
- * devices.in: Add /dev/full.
- * devices.cc: Regenerate.
- * dtable.cc (build_fh_pc): Add FH_FULL.
- * fhandler.cc (fhandler_base::fstat): Set FH_FULL permission bits
- correctly.
- * fhandler_zero.cc (fhandler_dev_zero::write): Set errno to ENOSPC
- and return -1 if device is FH_FULL.
-
-2005-02-22 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_disk_file.cc (fhandler_cygdrive::closedir): Return 0 when
- closing cygdrive_root.
-
-2005-02-22 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din (basename): Export.
- (dirname): Export.
- * path.cc (basename): New function.
- (dirname): New function.
- * include/libgen.h: New file.
- * include/cygwin/version.h: Bump API minor version.
-
-2005-02-22 Corinna Vinschen <corinna@vinschen.de>
-
- * select.cc (peek_pipe): Disable new pipe code until there's
- a working substitute.
-
-2005-02-22 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din (fdatasync): Export.
- * fhandler.cc (fhandler_base::fsync): Return with EINVAL if no
- handle is available.
- * syscalls.cc (fdatasync): Create export alias to fsync.
- * include/cygwin/version.h: Bump API minor version.
-
-2005-02-20 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_base::fstat_helper): Declare with additional
- dwVolumeSerialNumber argument. Drop default values for last three
- arguments.
- * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Pass
- dwVolumeSerialNumber from GetFileInformationByHandle to fstat_helper.
- (fhandler_base::fstat_by_name): Pass pc.volser () to fstat_helper.
- Accommodate dropping default values for last three arguments of
- fstat_helper.
- (fhandler_base::fstat_helper): Add dwVolumeSerialNumber argument.
- Use for st_dev member unless 0 in which case pc.volser () is used.
-
-2005-02-20 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (FindFirstVolumeA): Add.
- (FindNextVolumeA): Add.
- (FindVolumeClose): Add.
- (GetVolumePathNamesForVolumeNameA): Add.
- * fhandler.h (class fhandler_base): Declare new method fsync.
- * fhandler.cc (fhandler_base::fsync): New method.
- * syscalls.cc (fsync): Move functionality into fhandler method fsync.
- Just call this method from here.
- (sync_worker): New static function.
- (sync): Fill with life for NT systems.
- * wincap.h (wincaps::has_guid_volumes): New element.
- * wincap.cc: Implement above element throughout.
-
-2005-02-20 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (enum query_state): Add query_write_attributes state.
- (fhandler_base::status.query_open): Add a bit to make room for more
- states.
- (class fhandler_base): Declare new method utimes.
- (class fhandler_socket): Ditto.
- (class fhandler_disk_file): Ditto.
- (fhandler_disk_file::fhandler_disk_file): Add constructor with
- path_conv parameter.
- * fhandler.cc (fhandler_base::open): Add query_write_attributes
- handling.
- (fhandler_base::utimes): New method.
- * fhandler_disk_file.cc (fhandler_disk_file::link): Simplify.
- Open file with query_write_attributes instead of query_write_control.
- (fhandler_disk_file::utimes): New method.
- (fhandler_disk_file::fhandler_disk_file): Add constructor with
- path_conv parameter setting pc member immediately.
- * fhandler_socket.cc (fhandler_socket::fchmod): Use new
- fhandler_disk_file constructor.
- (fhandler_socket::fchown): Ditto.
- (fhandler_socket::facl): Ditto.
- (fhandler_socket::link): Ditto.
- (fhandler_socket::utimes): New method.
- * times.cc: Include dtable.h.
- (timeval_to_filetime): Make non-static.
- (utimes): Move functionality into fhandler method utimes. Just call
- this method from here.
- * winsup.h: Simplify declarations of time helper functions.
- (timeval_to_filetime): Add extern declaration.
-
-2005-02-19 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_base): Declare new method link.
- (class fhandler_socket): Ditto.
- (class fhandler_disk_file): Ditto.
- * fhandler.cc (fhandler_base::open): Add FILE_WRITE_ATTRIBUTES
- to query_write_control access flags.
- (fhandler_base::link): New method.
- * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Don't try to
- open with O_WRONLY since query_write_control includes
- FILE_WRITE_ATTRIBUTES.
- (fhandler_disk_file::fchown): Ditto.
- (fhandler_disk_file::facl): Ditto.
- (fhandler_disk_file::link): New method. Touch st_ctime on successful
- link.
- * fhandler_socket.cc (fhandler_socket::link): New method.
- * syscalls.cc (link): Move functionality into fhandler method link.
- Just call this method from here.
-
-2005-02-19 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_socket): Declare new methods fchown,
- fchmod and facl.
- * fhandler_socket.cc (fhandler_socket::fstat): Handle AF_LOCAL
- sockets.
- (fhandler_socket::fchmod): New method.
- (fhandler_socket::fchown): New method.
- (fhandler_socket::facl): New method.
-
-2005-02-19 Corinna Vinschen <corinna@vinschen.de>
-
- * localtime.cc: Temporary implementation of setting __tzrule's offset
- member to be used by strftime.
- (__tzrule): New global variable.
- (tzparse): Set __tzrule's offset member appropriately.
-
-2005-02-17 Christopher Faylor <cgf@timesys.com>
-
- * path.cc (path_conv::check): Set fs flag when a unix-domain socket
- is detected.
-
-2005-02-17 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fstat): Set st_ctime if
- has_changed flag is set.
- (fhandler_disk_file::touch_ctime): Reset has_changed flag on success.
-
-2005-02-17 Corinna Vinschen <corinna@vinschen.de>
-
- * times.cc (utimes): Open files with FILE_WRITE_ATTRIBUTES first,
- if that fails, try opeing with GENERIC_WRITE. Fix comments.
-
-2005-02-15 Christopher Faylor <cgf@timesys.com>
-
- * path.h (path_conv::issocket): Return true if device == FH_UNIX rather
- than expecting path_conv to set a flag.
-
-2005-02-11 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::raw_write): Mark as changed on
- successful write.
- * fhandler.h (fhandler_base::status_flags): Add 'has_changed' flag.
- * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Call
- fhandler_disk_file's own open and close instead of open_fs and
- close_fs. Mark as changed on success.
- (fhandler_disk_file::fchown): Ditto.
- (fhandler_disk_file::facl): Ditto.
- (fhandler_disk_file::ftruncate): Ditto.
- (fhandler_base::open_fs): Mark as changed when O_TRUNC flag on existing
- file is set.
- (fhandler_disk_file::close): Set st_ctime if has_changed flag is set.
-
-2005-02-11 Christopher Faylor <cgf@timesys.com>
-
- * cygthread.cc (cygthread::release): Reset ev here if it exists.
- (cygthread::terminate_thread): Eliminate racy code which reset ev and
- thread_sync. Remove a few nonsensical inuse checks. Exit at the
- bottom.
- (cygthread::detach): Rewrite to again try to ensure that we don't say
- we're signalled when we are not signalled.
- * fhandler.cc (fhandler_base::raw_read): Revert to signalling read
- success quickly.
- * pipe.cc (fhandler_pipe::close): Use base method to close handle.
- * sigproc.h (WAIT_SIG_PRIORITY): Just trundle along at normal priority
- to allow the pipe thread to do its thing if possible.
-
- * pinfo.h (pinfo::zap_cwd): Declare new function.
- (pinfo::zap_cwd): Move 'cd out of the way code' here.
- (pinfo::exit): Use it here.
- * spawn.cc (spawn_guts): And here.
-
-2005-02-11 Corinna Vinschen <corinna@vinschen.de>
-
- * times.cc (utimes): Open files with GENERIC_WRITE on file systems
- not supporting ACLs.
-
-2005-02-09 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::ftruncate): Fix checking
- lseek return code.
-
-2005-02-08 Corinna Vinschen <corinna@vinschen.de>
-
- * times.cc (timeval_to_filetime): Define first parameter const.
- (utimes): Define second parameter to const according to SUSv3.
- (utime): Ditto.
- * include/sys/utime.h (utime) : Change declaration accordingly.
-
-2005-02-08 Corinna Vinschen <corinna@vinschen.de>
-
- * cygthread.cc (cygthread::detach): Just test thread handle after
- signal arrived, don't wait infinitely for it.
-
-2005-02-08 Christopher Faylor <cgf@timesys.com>
-
- * pipe.cc (fhandler_pipe::read): Remove hold over from old read_state
- implementation.
-
-2005-02-06 Yitzchak Scott-Thoennes <sthoenna@efn.org>
-
- * net.cc (cygwin_gethostbyname): Be more picky about what's a numeric
- address string, and use tls in that case too.
-
-2005-02-07 Christopher Faylor <cgf@timesys.com>
-
- * exceptions.cc: Make windows_system_directory non-static.
- * pinfo.cc (pinfo::exit): Change innocuous cd'ed location to one that
- is more likely to exist.
-
-2005-02-06 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (path_conv::check): Leave symlink expansion loop in case
- a not-ENOENT error happens.
-
- * cygheap.h (cygheap_fdmanip::fhandler_pipe *): New cast operator.
- * pinfo.cc (_pinfo::commune_recv): Add PICOM_PIPE_FHANDLER handling.
- (_pinfo::commune_send): Ditto.
- (_pinfo::pipe_fhandler): New method.
- * pinfo.h (enum picom): Add PICOM_PIPE_FHANDLER.
- (_pinfo::pipe_fhandler): Declare.
- * pipe.cc (fhandler_pipe::open): Rewrite. Allow to open foreign
- pipe handles.
-
-2005-02-03 Christopher Faylor <cgf@timesys.com>
-
- * cygthread.h (cygthread::terminate_thread): Reflect return value.
- * cygthread.cc (cygthread::detach): Be more careful about ensuring that
- sigwait is properly waited for to avoid later missynchronization.
- (cygthread::terminate_thread): Return true if thread was actually
- terminated and all handles were closed.
- * fhandler_base.cc (fhandler_base::raw_read): Use signal_read_state
- rather than raw calls to win32 api.
- (fhandler_base::read): Ditto.
- * fhandler.h (fhandler_pipe::fixup_after_exec): Use method to create
- read_state signalling.
- (fhandler_pipe::create): Ditto.
-
- * Makefile.in: Make some more files -fomit-frame-pointer.
-
-2005-02-02 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_base::ftruncate): Define new virtual method.
- (fhandler_disk_file::ftruncate): Ditto.
- * fhandler.cc (fhandler_base::ftruncate): New method.
- * fhandler_disk_file.cc (fhandler_disk_file::ftruncate): Ditto.
- * syscalls.cc (ftruncate64): Move functionality into fhandlers.
- Call fhandler method from here.
-
-2005-02-02 Corinna Vinschen <corinna@vinschen.de>
-
- * pipe.cc (fhandler_pipe::dup): Fix conditionals in case of error.
-
-2005-02-02 Corinna Vinschen <corinna@vinschen.de>
-
- * times.cc (utimes): Mark st_ctime for update according to SUSv3.
-
-2005-02-01 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_proc.cc (format_proc_partitions): Remove PartitionType check
- since it could skip over partitions that are actually interesting.
-
-2005-02-01 Christopher Faylor <cgf@timesys.com>
-
- * cygthread.cc (cygthread::terminate_thread): Wait briefly for
- notification event in the event that the thread was actually in the
- process of exiting.
-
- * pipe.cc (fhandler_pipe::dup): read_state is not supposed to be
- inheritable. Fix that.
-
- * path.cc (path_conv::check): Set symlen = 0 to avoid a compiler
- warning.
-
- * devices.h (devices::parsedisk): Declare new function.
- * devices.in (devices::parsedisk): Define new function.
- * dtable.cc (dtable::init_std_file_from_handle): Use device numbers
- rather than name.
- * fhandler_proc.cc (format_proc_partitions): Use parsedisk to generate
- disk names from numeric codes. (This was broken on two of my
- systems previously and is still broken now)
-
-2005-02-01 Corinna Vinschen <corinna@vinschen.de>
-
- * pipe.cc (fhandler_pipe::open): Allow re-opening of /proc/<pid>/fd
- pipes of the current process.
-
-2005-02-01 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::get_proc_fd_name): Don't generate
- "device:" entry.
- * fhandler.h (fhandler_socket::open): New method.
- (fhandler_pipe::open): New method.
- * fhandler_proc.cc (fhandler_proc::exists): Return -2 in case of
- /proc/self.
- * fhandler_process.cc (fhandler_process::exists): Return -2 in
- case of symlinks, -3 for pipes and -4 for sockets.
- (fhandler_process::fstat): Handle pipes and sockets.
- (fhandler_process::open): Handle opening /proc/<pid>/fd.
- (fhandler_process::fill_filebuf): Generate empty names for
- non exisiting file descriptors.
- * fhandler_socket.cc (fhandler_socket::get_proc_fd_name): Always
- generate "socket:[number]" strings as on Linux.
- (fhandler_socket::open): New method.
- (fhandler_socket::fstat): Always return socket type.
- * path.cc (symlink_info::set): Remove unused second parameter.
- (path_conv::check): Handle pipes and sockets in /proc.
- Set correct device type for AF_LOCAL sockets.
- * pinfo.cc (_pinfo::commune_recv): Generate empty names for
- non exisiting file descriptors.
- (_pinfo::fd): Ditto.
- * pipe.cc (fhandler_pipe::open): New method.
-
-2005-01-31 Christopher Faylor <cgf@timesys.com>
-
- * path.h (path_conv::set_name): Declare new function.
- * path.cc (path_conv::set_name): Define new function.
- * fhandler.h (fhandler_dev_null::open): Declare new function.
- * fhandler.cc (fhandler_dev_null::open): Define new function.
-
-2005-01-31 Christopher Faylor <cgf@timesys.com>
-
- * smallprint.c (rnarg): Use long rather than unsigned long so that we
- get proper sign extension.
-
-2005-01-31 Corinna Vinschen <corinna@vinschen.de>
-
- * environ.cc (set_traverse): New function.
- (parse_thing): Add "traverse" option. Sort options alphabetically.
- (environ_init): On NT, switch on traverse checking by default.
-
-2005-01-31 Christopher Faylor <cgf@timesys.com>
-
- * smallprint.c (__rn): Regparmize.
-
-2005-01-31 Christopher Faylor <cgf@timesys.com>
-
- * smallprint.c (rnarg): New macro.
- (rnargLL): Ditto.
- (__rn): Rename from 'rn', add a mask argument, and use the mask
- argument to control how many significant digits to care about.
- (__small_vsprintf): Use __rn, rnarg, rnargLL, as appropriate.
-
-2005-01-31 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (pinfo::exit): Only return low-order 16 bits when exiting.
-
-2005-01-31 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_process.cc (format_process_maps): Get destbuf argument by
- reference. Allow resizing of destbuf as necessary. Fix string
- handling.
-
-2005-01-31 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.h (class cygheap_fdenum): New class to enumerate used
- fhandlers.
- * dtable.h (class dtable): Add cygheap_fdenum as friend class.
- * fhandler.h (fhandler_base::get_proc_fd_name): New virtual method
- to return a name for /proc/<pid>/fd.
- (fhandler_socket::get_proc_fd_name): Ditto.
- (fhandler_pipe::get_proc_fd_name): Ditto.
- (fhandler_virtual::opendir): Make virtual method.
- (fhandler_process::opendir): New method.
- * fhandler.cc (fhandler_base::get_proc_fd_name): New method.
- * fhandler_process.cc: Include ctype.h.
- (PROCESS_FD): Define.
- (process_listing): Add "fd".
- (fhandler_process::exists): Fix comment. Return 1 in case of "fd"
- directory. Handle files below "fd".
- (fhandler_process::fstat): Drop "self" handling. Set correct link
- count for directories.
- (fhandler_process::opendir): New method to handle "fd" directory.
- (fhandler_process::readdir): Add "fd" handling.
- (fhandler_process::open): Drop "self" handling.
- (fhandler_process::fill_filebuf): Ditto. Add "fd" handling. Fix
- "maps" output string.
- * fhandler_registry.cc (fhandler_registry::fstat): Set correct link
- count for directories.
- * fhandler_socket.cc (fhandler_socket::get_proc_fd_name): New method.
- * path.cc (symlink_info::set): Fix thinko.
- * pinfo.cc (_pinfo::commune_recv): Rename pathbuf to path throughout.
- Drop local path variable in PICOM_FIFO case. Fix debug output.
- Close handles as early as possible. Add PICOM_FDS and PICOM_FD
- handling.
- (_pinfo::commune_send): Add PICOM_FDS and PICOM_FD handling.
- (_pinfo::fd): New method.
- (_pinfo::fds): New method.
- * pinfo.h (enum picom): Add PICOM_FDS and PICOM_FD.
- (_pinfo::fd): Declare.
- (_pinfo::fds): Declare.
- * pipe.cc (fhandler_pipe::get_proc_fd_name): New method.
-
-2005-01-29 Corinna Vinschen <corinna@vinschen.de>
-
- * smallprint.c (rn): Change uval to unsigned long long to fix 64 bit
- handling.
- * fhandler_process.cc (format_process_maps): Print major, minor and
- inode numbers correctly.
-
-2005-01-29 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (GetModuleFileNameExA): Add.
- (GetModuleInformation): Add.
- (QueryWorkingSet): Add.
- * fhandler.h (fhandler_virtual::get_filebuf): New method.
- * fhandler_proc.cc (PROC_SELF): Define.
- (proc_fhandlers): Change type of self to FH_PROC.
- (fhandler_proc::exists): Return -3 if self.
- (fhandler_proc::fstat): Handle self as symlink.
- (fhandler_proc::fill_filebuf): Handle self.
- * fhandler_process.cc: Include psapi.h.
- (PROCESS_EXENAME): Remove.
- (PROCESS_MAPS): Define.
- (PROCESS_ROOT): Define.
- (PROCESS_EXE): Define.
- (PROCESS_CWD): Define.
- (process_listing): Remove "exename", add "maps, "root", "exe" and
- "cwd" elements.
- (fhandler_process::exists): Return -2 for symlinks.
- (fhandler_process::fstat): Handle symlinks.
- (fill_filebuf): Evaluate pid if pid is 0. Use exename handling for
- exe. Handle maps, root and cwd.
- (format_process_maps): New function evaluating "maps".
- * path.cc (symlink_info::set): New method to fill symlink_info
- with data matching virtual symlinks.
- (path_conv::check): Handle virtual symlinks.
- * pinfo.cc (_pinfo::commune_recv): Add PICOM_CWD and PICOM_ROOT
- handling.
- (_pinfo::commune_send): Ditto.
- (_pinfo::root): New function.
- (_pinfo::cwd): New function.
- * pinfo.h (enum picom): Add PICOM_CWD and PICOM_ROOT.
- (_pinfo::root): Declare.
- (_pinfo::cwd): Declare.
-
-2005-01-29 Christopher Faylor <cgf@timesys.com>
-
- * cygthread.cc (new): Add a little more debugging.
- * thread.cc (pthread_null::exit): Add a _my_tls.remove() for safety.
-
-2005-01-28 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.cc (cygtls::call2): Move socket cleanup.
- (cygtls::remove): Move socket cleanup here. Don't use _my_tls to
- reference it.
-
-2005-01-26 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (pinfo::init): Avoid a compiler warning.
-
-2005-01-25 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (setpriority): Implement PRIO_PGRP, PRIO_USER and
- setting priority in other Cygwin processes.
- (getpriority): Implement PRIO_PGRP, PRIO_USER and getting nice value
- from other processes.
-
-2005-01-26 Pierre Humblet <pierre.humblet@ieee.org>
-
- * path.cc (path_conv::check): Return ENOTDIR rather than ENOENT
- when a component is not a directory. Remove unreachable code.
- (digits): Delete.
-
-2005-01-25 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.h (pinfo::init): Make third parameter non-optional and
- propagate change throughout.
- * pinfo.cc (set_myself): Pass INVALID_HANDLE_POINTER if h is NULL.
- (pinfo::init): Make third parameter non-optional. Eliminate use of
- PID_EXECED as an argument. Put setting of handle back inside loop but
- reorganize to try to open it only when necessary.
-
-2005-01-25 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Export getpriority and setpriority.
- * fork.cc (fork_parent): Copy parent's nice value into child.
- * spawn.cc (spawn_guts): Ditto.
- * miscfuncs.cc (winprio_to_nice): New function.
- (nice_to_winprio): Ditto.
- * pinfo.cc (pinfo_init): If parent is not a Cygwin process, set
- default nice value according to current Win32 priority class.
- * pinfo.h (class _pinfo): Add nice member.
- * syscalls.cc (setpriority): New function, only implementing
- PRIO_PROCESS for now.
- (getpriority): Ditto.
- (nice): Just call setpriority.
- * wincap.h (wincaps::has_extended_priority_class): New element.
- * wincap.cc: Implement above element throughout.
- * winsup.h: Add prototypes for winprio_to_nice and nice_to_winprio.
- * include/limits.h (NZERO): New define.
- * include/cygwin/types.h (id_t): New datatype.
- * include/cygwin/version.h: Bump API minor version.
- * include/sys/resource.h: Add PRIO_XXX defines and prototypes for
- getpriority and setpriority.
-
-2005-01-25 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (realpath): Allow to expand with .exe suffix.
-
-2005-01-22 Christopher Faylor <cgf@timesys.com>
-
- * spawn.cc (spawn_guts): Perform same "cd" as in pinfo::exit below to
- make sure that a stub process does not keep the current working
- directory busy after the "execed" process has exited.
-
-2005-01-22 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (pinfo::init): Move everything but the MapViewOfFileEx out
- of the loop since trying multiple times to call CreateFileMapping
- doesn't make much sense. Try to structure the loop a little better so
- that exiting with a break does the right thing.
- (pinfo::release): Release shared memory area if it exists and close
- handle if it exists.
-
-2005-01-22 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (pinfo::maybe_set_exit_code_from_windows): Make sure that
- process has exited before getting an error code.
- (pinfo::exit): "cd" to innocuous location before exiting to make sure
- that process does not keep the current working directory busy while it
- is in the process of really exiting.
-
-2005-01-18 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (CoInitialize): Remove.
- (CoUninitialize): Remove.
- (CoCreateInstance): Remove.
- (CoTaskMemFree): Add.
- (SHGetDesktopFolder): Add.
- * path.cc (shortcut_header): Remove.
- (shortcut_initalized): Remove.
- (GUID_shortcut): New static GUID.
- (struct win_shortcut_hdr): New struct describing Windows shortcut
- header structure.
- (symlink_worker): Rewrite creating Windows shortcuts. Create
- ITEMIDLIST if target exists. Only write once.
- (cmp_shortcut_header): Use win_shortcut_hdr structure for comparison.
- (check_shortcut): Rewrite to read only once from file. Allow skipping
- an ITIMIDLIST in the file.
-
-2005-01-16 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.h (maybe_set_exit_code_from_windows): Renamed from
- set_exit_state.
- * pinfo.cc (pinfo::exit): Use renamed function.
- (proc_waiter): Ditto. Make a copy of input argument to avoid problems
- when procs array is shuffled. Flag when copy is made so that
- remove_proc knows when it is safe to reshuffle.
- * sigproc.cc (proc_terminate): Don't flag process_state as PID_EXITED.
- (remove_proc): Wait for waiter to finish copying pinfo element before
- moving it (an actual wait should be an extremely rare event).
-
-2005-01-15 Christopher Faylor <cgf@timesys.com>
-
- * init.cc (dll_entry): Remove unused extern.
-
- * include/sys/cygwin.h: Remove PID_ZOMBIE.
- * pinfo.h: Rename EXITCODE_* defines.
- (pinfo::set_exit_state): Remove parameter.
- * pinfo.cc (set_exit_state): Remove parameter. Reverse sense of test
- so that exitcode is checked for having been set rather than not having
- been set. Set flag when exitcode has been established. Don't set
- PID_STATE here.
- (pinfo::init): Remove exitcode initialization.
- (pinfo::exit): Reflect change in EXITCODE_* naming. Set flag when
- exitcode has been established. Reflect change in arguments to
- set_process_state.
- (proc_waiter): Reflect change in arguments to set_process_state. Set
- process_state here and only here.
- * fhandler_process.cc (fhandler_process::fill_filebuf): Reflect removal
- of PID_ZOMBIE define.
- (format_process_stat): Ditto.
- (format_process_status): Ditto.
- * sigproc.cc (pid_exists): Ditto.
- (stopped_or_terminated): Ditto. Make sure that only low-order 16 bits of
- exitcode are used.
- * spawn.cc (spawn_guts): Reflect change in EXITCODE_* naming.
-
-2005-01-15 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc (sig_send): Don't complain if attempt to send signal to
- myself fails after I've "execed".
-
-2005-01-14 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::facl): Pretend successful
- SETACL if no acls are available.
- * fhandler.cc (fhandler_base::facl): Implement to return sensible
- values on GETACL and GETACLCNT. Pretend successful SETACL.
- * fhandler_virtual.cc (fhandler_virtual::facl): Ditto.
-
-2005-01-13 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_disk_file::touch_ctime): Declare.
- * fhandler_disk_file.cc (fhandler_disk_file::touch_ctime): New method
- to set file's ctime.
- (fhandler_disk_file::fchmod): Try opening file for writing first.
- Set file's ctime on success.
- (fhandler_disk_file::fchown): Ditto.
- (fhandler_disk_file::facl): Ditto.
-
-2005-01-13 Corinna Vinschen <corinna@vinschen.de>
-
- * pinfo.cc (pinfo::exit): Don't access self after releasing it.
- * path.h (path_conv::path_conv): Fill path with native device
- name in case of device argument.
-
-2005-01-13 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_serial.cc (fhandler_serial::dup): Call overlapped_setup
- for child, not for parent.
-
-2005-01-13 Christopher Faylor <cgf@timesys.com>
-
- * init.cc (dll_entry): Nuke attempt to set exit code since parent will
- use windows exit code if needed.
- * pinfo.cc (pinfo::exit): Move release() here to minimize pid creation
- race (suggested by Pierre Humblet).
-
-2005-01-12 Christopher Faylor <cgf@timesys.com>
-
- Reorganize header file inclusion throughout so that cygerrno.h comes
- first.
- * fhandler.h (select_record::thread_errno): Save any encountered errno
- here.
- (select_record::set_select_errno): New function.
- (select_record::saw_error): New function.
- (select_record::select_record): Initialize thread_errno to zero.
- * select.cc (set_handle_or_return_if_not_open): Set thread_errno on
- failure.
- (select_stuff::wait): Record errno for later resurrection in calling
- thread.
- (peek_serial): Ditto.
-
-2005-01-12 Christopher Faylor <cgf@timesys.com>
-
- * syscalls.cc (system): Use "/bin/sh" as per linux and (sorta) SUSv3.
-
-2005-01-12 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (pinfo::exit): Don't assume that this == myself.
-
-2005-01-11 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (pinfo::init): Don't close input handle on temporary (?)
- failure.
-
-2005-01-11 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.h (_pinfo::set_exit_state): Declare new function.
- (pinfo::exit): Move here from _pinfo::exit.
- * sigproc.cc (child_info::sync): Use new function to set exitcode and
- process_state.
- * pinfo.cc (_pinfo::exit): Ditto.
- (proc_waiter): Ditto.
- (_pinfo::set_exit_state): Define new function.
- (_pinfo::dup_proc_pipe): Close handle when there is no parent process
- around to care about the exit value.
- * dcrt0.cc (dll_crt0_0): Move subproc_ready synchronization later to
- make sure that myself is still mapped in parent.
- (do_exit): Reflect movement to pinfo::exit.
- (__api_fatal): Ditto.
- * exceptions.cc (signal_exit): Ditto.
- * errno.cc (errmap): Map PROC_NOT_FOUND.
- * init.cc (dll_entry): Release myself before exiting.
- * sigproc.cc (proc_can_be_signalled): Set errno appropriately.
- (sig_send): Ditto. Also remove ill-advised test for !myself->sendsig
- since this is an indication of a process which is still initializating
- -- it is not an error.
- (child_info::sync): Don't set exitcode here. Assume that will happen
- in proc_waiter, if necessary.
- * spawn.cc (spawn_guts): Delay "wait_for_myself" logic until later.
- Don't wait at all if the process has already exited. Reflect movement
- to pinfo::exit.
-
-2005-01-11 Corinna Vinschen <corinna@vinschen.de>
-
- * environ.cc (build_env): Disallow empty strings and strings starting
- with '=' in Win32 environment.
-
-2005-01-08 Pierre Humblet <pierre.humblet@ieee.org>
-
- * syscalls.cc (seteuid32): Only change the default dacl when
- seteuid succeeds. Do not close HKCU.
-
-2005-01-06 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_process.cc: Use strcasematch instead of strcasecmp
- throughout.
-
-2005-01-06 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (rename): Fix behaviour in case of renaming directories
- according to SUSv3.
-
-2005-01-06 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_base::open_fs): Don't allow
- opening directories for writing.
-
-2005-01-06 Christopher Faylor <cgf@timesys.com>
-
- * timer.cc (timer_thread): Pass sigev pointer value as per SuSv3 rather
- than pointer to sigev.
-
-2005-01-05 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (multiple_cygwin_problem): Reorganize error message to not
- always talk about a "version" when it's not a version.
- (dll_crt0_0): Change info passed to multiple_cygwin_problem to be a
- little more precise.
- * shared.cc (user_shared_initialize): Ditto.
- (shared_info::initialize): Ditto.
-
-2005-01-03 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (_pinfo::dup_proc_pipe): Can't close proc pipe when execing
- or we will suffer an exit code race.
-
-2005-01-03 Corinna Vinschen <corinna@vinschen.de>
-
- * signal.cc (abort): Call _GLOBAL_REENT's __cleanup.
-
-2005-01-03 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (setmode): Call _fwalk with _GLOBAL_REENT.
-
-2005-01-01 Christopher Faylor <cgf@timesys.com>
-
- * cygthread.cc (cygthread::stub): Set inuse to false when exiting.
- (cygthread::cygthread): Actually pass name as argument to debugging
- output to avoid SEGV when strace'ing.
- (cygthread::release): Don't set stack_ptr to NULL, since it is only set
- once on first entry to a stub not on each stub iteration.
- (cygthead::exit_thread): Remove obsolete function.
- * cygthread.h (cygthread::exit_thread): Ditto.
-
-2005-01-01 Christopher Faylor <cgf@timesys.com>
-
- * shared.cc (open_shared): Don't attempt VirtualAlloc magic if first
- attempt to map memory fails.
diff --git a/winsup/cygwin/ChangeLog-2006 b/winsup/cygwin/ChangeLog-2006
deleted file mode 100644
index bab3336..0000000
--- a/winsup/cygwin/ChangeLog-2006
+++ /dev/null
@@ -1,3571 +0,0 @@
-2006-12-21 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::readdir): Improve debug
- output.
-
-2006-12-20 Corinna Vinschen <corinna@vinschen.de>
-
- Partially revert change from 2006-10-22. GetSecurityInfo messes up
- user information on NT4.
- * sec_helper.cc (security_descriptor::malloc): Drop LocalAlloc
- considerations.
- (security_descriptor::realloc): Ditto.
- (security_descriptor::free): Ditto.
- * security.cc (get_reg_security): Reinstantiate.
- (get_nt_object_security): Revert to using NtQuerySecurityObject.
- * security.h (class security_descriptor): Drop type member.
- Accommodate throughout.
- (security_descriptor::size): Constify.
- (security_descriptor::copy): Ditto.
-
-2006-12-18 Christopher Faylor <me@cgf.cx>
-
- * pinfo.cc (set_myself): Use a more foolproof method for determining if
- the current process was started from another cygwin process.
-
-2006-12-15 Pierre A. Humblet <Pierre.Humblet@ieee.org>
-
- * libc/minires-os-if.c (cygwin_query): Remove ERROR_PROC_NOT_FOUND case.
- (get_dns_info): Verify DnsQuery exists. Use autoloaded GetNetworkParams.
-
-2006-12-13 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.h (clear_procimptoken): Close hProcImpToken in a safer way.
-
-2006-12-13 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (lsaauth): Initialize lsa to INVALID_HANDLE_VALUE to
- avoid potential access violation.
-
-2006-12-12 Corinna Vinschen <corinna@vinschen.de>
-
- * environ.cc (subauth_id_init): Remove.
- (parse_thing): Drop "subauth_id" option.
- * security.cc (get_token_group_sidlist): Drop comments concerning
- subauthentication.
- (create_token): Back out subauthentication related changes.
- (subauth): Remove.
- * security.h (create_token): Remove declaration.
- (subauth): Ditto.
- * syscalls.cc (seteuid32): Drop subauthentication handling entirely.
-
-2006-12-12 Corinna Vinschen <corinna@vinschen.de>
-
- * environ.cc (set_traverse): Remove.
- (parse_thing): Drop "traverse" option.
- * path.cc (fs_info::update): Don't request SE_CHANGE_NOTIFY_PRIV
- privilege.
- * sec_helper.cc (set_cygwin_privileges): Ditto.
- * security.cc (allow_traverse): Remove.
- (alloc_sd): Drop special allow_traverse code.
- * security.h (allow_traverse): Drop declaration.
- * syscalls.cc (statvfs): Don't request SE_CHANGE_NOTIFY_PRIV privilege.
-
-2006-12-12 Corinna Vinschen <corinna@vinschen.de>
-
- Partially revert change from 2005-04-03, always running under an
- impersonation token, which collides with Vista UAC.
- * cygheap.h (deimpersonate): revert to self instead of impersonating
- hProcImpToken.
- (reimpersonate): Only impersonate if setuid.
- * dcrt0.cc (dll_crt0_0): Don't initialize hProcImpToken here.
- (dll_crt0_1): Set privileges on hProcToken.
- * fork.cc (frok::child): Set privileges on hProcToken. Close handle to
- hProcImpToken.
- * grp.cc (internal_getgroups): Use hProcToken instead of hProcImpToken.
- * security.cc (check_access): Create hProcImpToken on demand here.
- * security.h (set_process_privilege): Set privileges on hProcToken.
- (_push_thread_privilege): Use hProcToken instead of hProcImpToken.
- (pop_thread_privilege): If not setuid'ed, revert to self.
- * syscalls.cc (setegid32): Drop setting primary group on hProcImpToken.
- Close handle to hProcImpToken.
- * uinfo.cc (internal_getlogin): Ditto.
- * winsup.h (clear_procimptoken): New inline function.
-
-2006-12-12 Christopher Faylor <me@cgf.cx>
-
- * syscalls.cc (popen): Allow '[rw][bt]'.
-
-2006-12-12 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/minires.c (res_ninit): Drop handling for LOCALDOMAIN environment
- variable.
-
-2006-12-11 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (DLL_OFILES): Add minires-os-if.o and minires.o.
- (SUBLIBS): Add libresolv.a.
- Add rule for libresolv.a.
- * autoload.cc: Fix return code handling for IP Helper API in case
- of being unable to load iphlpapi.dll.
- (DnsQuery_A): Define.
- (DnsRecordListFree): Define.
- * cygwin.din: Export resolver functions.
- * include/resolv.h: New header.
- * include/arpa/nameser.h: New header.
- * include/arpa/nameser_compat.h: New header.
- * include/cygwin/version.h: Bump API minor number.
- * libc/minires-os-if.c: New file.
- * libc/minires.c: New file.
- * libc/minires.h: New file.
-
-2006-12-11 Christopher Faylor <me@cgf.cx>
-
- * sigproc.cc (child_info::child_info): Move old comment about msv_count
- here. Edit it slightly to reflect new sensibilities.
-
-2006-12-11 Christopher Faylor <me+cygwin@cgf.cx>
-
- * child_info.h (child_info_spawn::__stdin): New element.
- (child_info_spawn::__stdin): Ditto.
- (CURR_CHILD_INFO_MAGIC): Regenerate.
- * dcrt0.cc (check_sanity_and_sync): Minor cleanup.
- (child_info_spawn::handle_spawn): Handle new __std* elements by calling
- move_fd.
- * dtable.cc (dtable::move_fd): Define new function.
- * dtable.h (dtable::move_fd): Declare new function.
- * fhandler.h (fhandler_pipe::popen_pid): Declare new element.
- * fhandler.h (fhandler_pipe::get_popen_pid): Define new function.
- * fhandler.h (fhandler_pipe::set_popen_pid): Ditto.
- * pipe.cc (fhandler_pipe::fhandler_pipe): Zero popen_pid.
- (fhandler_pipe::dup): Ditto.
- * spawn.cc (handle): Change second argument to bool.
- (spawn_guts): Accept __stdin/__stdout arguments and set them
- appropriately in child_info structure and in STARTUPINFO structure.
- * syscalls.cc (popen): New cygwin-specific implementation using spawn.
- (pclose): Ditto.
- * winsup.h (spawn_guts): Accommodate new arguments for spawn_guts.
-
- * fhandler.cc (fhandler_base::set_no_inheritance): Make second arg a bool.
- * fhandler.h (fhandler_base::set_no_inheritance): Ditto for declaration.
-
- * child_info.h (child_info::msv_count): Rename from the now-inappropriate
- "zero".
- (child_info_spawn::filler): Add filler to work around Vista bug.
- (child_info_fork::filler): Ditto.
- * dcrt0.cc (get_cygwin_startup_info): Remove "zero" check since it is
- now always filled out.
- * fork.cc (frok::parent): Move ch.zero manipulation to constructor.
- * spawn.cc (spawn_guts): Ditto. Remove _ch wrapper.
- * sigproc.cc (child_info::child_info): Initialize msv_count.
-
- * shared.cc (shared_info::heap_slop_size): Remove noisy system_printfs.
- * shared_info.h (CURR_SHARED_MAGIC): Regenerate.
-
-2006-12-11 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (rootdir): Fix typo in comment.
- * syscalls.cc (try_to_bin): Ditto.
-
-2006-12-10 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (SHFileOperationA): Drop definition.
- * ntdll.h (struct _FILE_RENAME_INFORMATION): Define.
- * path.cc (fs_info::update): Note length of rootdir prefix in
- root_len.
- (get_nt_native_path): New function, taking over functionality of
- path_conv::get_nt_native_path.
- (path_conv::get_nt_native_path): Just call get_nt_native_path.
- * path.h (get_nt_native_path): Declare.
- (struct fs_info): New member root_len.
- (fs_info::length): New inline method returning root_len.
- (path_conv::rootdir): New inline method returning rootdir prefix.
- * syscalls.cc (try_to_bin): Rewrite using only system calls.
- (unlink_nt): Call try_to_bin with additional handle to open file
- parameter.
- (statvfs): Use path_conv::rootdir method.
- * wincap.h: Define has_recycle_dot_bin throughout.
- * wincap.cc: Ditto.
-
-2006-12-10 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (rootdir): Clarify comment.
-
-2006-12-10 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (rootdir): Don't look for volume mount points on remote
- shares.
-
-2006-12-10 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (rootdir): Drop useless post-increment. Take volume
- mount points into account.
- (check_posix_perm): Allocate space for root directory big enough.
-
-2006-12-09 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (try_to_bin): Add comment that this is not possibly
- the final version.
-
-2006-12-07 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (unlink_nt): Open native symlinks with
- FILE_OPEN_REPARSE_POINT flag.
-
-2006-12-07 Corinna Vinschen <corinna@vinschen.de>
-
- * ntdll.h (STATUS_DELETE_PENDING): Define.
- (struct _FILE_DISPOSITION_INFORMATION): Define.
- * syscalls.cc (unlink_9x): new function to delete file on 9x.
- * syscalls.cc (unlink_nt): new function to delete file on NT.
- (unlink): Simplify. Move OS dependent stuff into aforementioned
- functions. Also handle FILE_ATTRIBUTE_HIDDEN as R/O-like flag.
-
-2006-12-07 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (SHFileOperationA): Define.
- * syscalls.cc (try_to_bin): New function trying to move a file to
- the recycle bin.
- (unlink): Fix arguments used in CreateFile for delete on close.
- Before closing the handle, try to move the file to the recycle bin.
-
-2006-12-07 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.h (struct cwdstuff): Add "sync" member and accompanying
- "keep_in_sync" methods.
- * external.cc (cygwin_internal): Call above keep_in_sync method when
- CW_SYNC_WINENV is requested.
- * path.cc (cwdstuff::init): Don't change to windows_system_directory
- if keep_in_sync is requested.
- (cwdstuff::keep_in_sync): New method.
- (cwdstuff::set): Take sync flag into account.
-
-2006-12-06 Corinna Vinschen <corinna@vinschen.de>
-
- * termios.cc: Change include order to accommodate change to sys/ioctl.h.
-
-2006-12-06 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_mem.cc (fhandler_dev_mem::open): Fix comment.
- * wincap.cc (has_physical_mem_access): Reflect the fact that physical
- memory access has been made a protected operation beginning with
- 2003 Server.
-
-2006-12-06 Eric Blake <ebb9@byu.net>
-
- * include/sys/ioctl.h: Pick up termios.h, for TIOCGWINSZ.
-
-2006-12-06 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.h (WINVER): Set to 0x0600 to cover Vista.
-
-2006-12-06 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::rmdir): Fix typo.
-
-2006-12-05 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (cwdstuff::init): Don't change to windows_system_directory
- if Cygwin DLL has been loaded dynamically.
-
-2006-12-05 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (cwdstuff::set): Don't try to open directory on systems not
- supporting that.
-
-2006-12-05 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc (get_cygwin_startup_info): Fix comment.
- * wincap.cc (wincapc::init): Always reset needs_count_in_si_lpres2 to
- false on non 64-bit systems.
-
-2006-12-05 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc (get_cygwin_startup_info): Change zeros to DWORD array.
- Expect first DWORD in child_info struct being set to non-zero if
- wincap.needs_count_in_si_lpres2 is set. Add comment to explain why.
- * fork.cc (frok::parent): Set ch.zero[0] to a sensible count value
- if wincap.needs_count_in_si_lpres2 is set.
- * spawn.cc (spawn_guts): Ditto. Add filler bytes after ch on stack
- to accommodate needs_count_in_si_lpres2.
- * wincap.h: Define needs_count_in_si_lpres2 throughout.
- * wincap.cc: Ditto.
-
-2006-11-29 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc (mkdir): Check last path component for "..".
- (rmdir): Don't check last path component for "..".
- * fhandler_disk_file.cc (fhandler_disk_file::rmdir): Drop kludge
- which tries to allow deleting the current working directory.
- * path.cc (has_dot_last_component): Add parameter to indicate testing
- for "..". Take trailing slash into account.
- (symlink_info::posixify): Rely on cygheap->cwd.win32 having a
- useful value.
- (cwdstuff::init): Initialize cygheap->cwd with current working
- directory. Change to windows_system_directory afterwards.
- (cwdstuff::set): Never call SetCurrentDirectory here. Just check
- if changing into target directory would be allowed. Add comment to
- explain why.
- * path.h (has_dot_last_component): Declare with second parameter.
- * pinfo.cc (pinfo::zap_cwd): Remove.
- (pinfo::exit): Drop call to zap_cwd.
- * pinfo.h (class pinfo): Remove declaration of zap_cwd.
- * spawn.cc (spawn_guts): Set current working directory for non-Cygwin
- child applications. Drop call to zap_cwd.
-
-2006-11-28 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (create_token): Revert erroneous change to test
- subauth_token for INVAILD_HANDLE_VALUE.
- * syscalls.cc (seteuid32): Set create_token's subauth_token parameter
- back to NULL.
-
-2006-11-28 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Fix previous patch to handle the
- SYSTEM attribute as well.
-
-2006-11-27 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Fix handling of files with
- HIDDEN attribute set.
-
-2006-11-27 Christopher Faylor <cgf@timesys.com>
-
- * include/cygwin/signal.h: Add __extension__ to various anonymous
- unions and structs. (thanks to V.Haisman)
-
-2006-11-27 Corinna Vinschen <corinna@vinschen.de>
-
- * cyglsa.h: New header file.
- * environ.cc: Disable subauth settings.
- * grp.cc: Accommodate cygsidlist's count now being a method.
- * sec_helper.cc (SECURITY_MANDATORY_INTEGRITY_AUTHORITY): Remove.
- (mandatory_medium_integrity_sid): Remove.
- (mandatory_high_integrity_sid): Remove.
- (mandatory_system_integrity_sid): Remove.
- (fake_logon_sid): Add.
- (cygsid::get_sid): Add well_known parameter. Set well_known_sid
- accordingly.
- (cygsid::getfromstr): Ditto.
- (cygsidlist::alloc_sids): Move here from security.cc.
- (cygsidlist::free_sids): Ditto.
- (cygsidlist::add): Move here from security.h. Add well_known parameter.
- Set well_known_sid accordingly. Don't allow duplicate SIDs.
- * security.cc: Include cyglsa.h and cygwin/version.h. Throughout
- accommodate cygsidlist's count now being a method. Throughout drop
- redundant "contains" tests.
- (get_user_local_groups): Add local groups as well known SIDs.
- (get_token_group_sidlist): Add well known groups as well known SIDs.
- (get_server_groups): Ditto. Only call get_unix_group_sidlist after
- get_user_local_groups to maintain "well_known_sid" attribute.
- (get_initgroups_sidlist): Add well known groups as well known SIDs.
- (get_setgroups_sidlist): Add usersid and struct passwd parameter to
- allow calling get_server_groups from here.
- (get_system_priv_list): Make static. Return size of TOKEN_PRIVILEGES
- structure.
- (get_priv_list): Ditto.
- (create_token): Accommodate above changes. Drop misguided attempt to
- add MIC SIDs to created user token. Print returned token as hex value.
- (subauth): Disable.
- (lsaauth): New function implementing client side of LSA authentication.
- * security.h (class cygsid): Add well_known_sid attribute. Accommodate
- throughout. Add *= operator to create a well known SID.
- (class cygsidlist): Rename count to cnt. Make count a method.
- (cygsidlist::add): Move to sec_helper.cc.
- (cygsidlist::operator *=): New method to add well known SID.
- (cygsidlist::non_well_known_count): New method returning number of
- non well known SIDs in list.
- (cygsidlist::next_non_well_known_sid): New method returning next non
- well known SID by index.
- (mandatory_medium_integrity_sid): Drop declaration.
- (mandatory_high_integrity_sid): Drop declaration.
- (mandatory_system_integrity_sid): Drop declaration.
- (fake_logon_sid): Add declaration.
- (subauth): Disable declaration.
- (lsaauth): Add declaration.
- * syscalls.cc (seteuid32): Disable subauthentication. Add LSA
- authentication.
- * wincap.h: Define needs_logon_sid_in_sid_list throughout.
- * wincap.cc: Ditto.
-
-2006-11-23 Corinna Vinschen <corinna@vinschen.de>
-
- * security.h (DBGSID): Define for debugging purposes.
- (MKSID): Rename from SID so as to not hide SID definition from winnt.h.
- * sec_helper.cc: Change SID to MKSID throughout.
-
-2006-11-23 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (get_ipv6_funcs): Fix formatting.
-
-2006-11-23 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (fs_info::update): Define GETVOLINFO_VALID_MASK and TEST_GVI.
- Change FS_IS_SAMBA and FS_IS_SAMBA_WITH_QUOTA and their usage
- accordingly. Define FS_IS_NETAPP_DATAONTAP. Recognize NetApp device
- and store in is_netapp flag. Mark NetApp device as having no good
- inodes.
- * path.h (struct fs_info): Add is_netapp flag. Add matching accessors.
-
-2006-11-23 Thomas Wolff <towo@computer.org>
-
- * fhandler_console.cc (set_color): Avoid (again) inappropriate
- intensity interchanging that used to render reverse output unreadable
- when (non-reversed) text is bright.
- See http://sourceware.org/bugzilla/show_bug.cgi?id=514
-
-2006-11-23 Joe Loh <joel@pivot3.com>
-
- * devices.h: Add additional SCSI disk block device numbers per
- http://www.kernel.org/pub/linux/docs/device-list/devices.txt
- up to 128 devices.
- * devices.in: Ditto.
- (device::parsedisk): Add additonal else-if cases for decoding base
- and drive indices.
- * devices.cc: Regenerate.
- * dtable.cc (build_fh_pc): Add additional DEV_SD{2..7}_MAJOR cases.
-
-2006-11-09 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (EqualPrefixSid): Define.
- * security.cc (create_token): Drop grps_buf. Use alloca instead.
- Only add the MIC SID to the TOKEN_GROUPS list for the NtCreateToken
- call. If the subauthentication token exists, use its MIC SID.
- Set SID Attributes for the MIC SID to 0.
-
-2006-11-08 Corinna Vinschen <corinna@vinschen.de>
-
- * sec_helper.cc (sid_auth): Remove.
- (well_known_this_org_sid): New well known sid.
- (SECURITY_MANDATORY_INTEGRITY_AUTHORITY): Define.
- (mandatory_medium_integrity_sid): New well known sid.
- (mandatory_high_integrity_sid): Ditto.
- (mandatory_system_integrity_sid): Ditto.
- (cygsid::get_sid): Use local SID_IDENTIFIER_AUTHORITY. Allow all
- authorities fitting in a UCHAR.
- * security.cc (get_token_group_sidlist): Always add the local
- group to the token. Add comment. Add "This Organization" group
- if available in incoming group list.
- (get_server_groups): Only add world and authenticated users groups
- if not already in list.
- (create_token): Add matching mandatory integrity SID to group list
- on systems supporting Mandatory Integrity Control.
- * security.h (well_known_this_org_sid): Define.
- (mandatory_medium_integrity_sid): Define.
- (mandatory_high_integrity_sid): Define.
- (mandatory_system_integrity_sid): Define.
- * wincap.h: Define has_mandatory_integrity_control throughout.
- * wincap.cc: Ditto.
-
-2006-11-07 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (check_posix_perm): Moved here from syscalls.cc.
- (fhandler_base::fpathconf): New method implementing (f)pathconf.
- * fhandler.h (class fhandler_base): Declare fpathconf method.
- * path.cc (path_conv::check): Replace MAX_LINK_DEPTH with SYMLOOP_MAX.
- * path.h (MAX_LINK_DEPTH): Delete.
- * syscalls.cc (check_posix_perm): Move to fhandler.cc.
- (fpathconf): Call fhandler's fpathconf method.
- (pathconf): Build fhandler and call fhandler's fpathconf method.
- * sysconf.cc (sysconf): Reorder switch according to order of flags
- in sys/unistd.h. Add handling for some missing flags.
- * include/limits.h: Reorder according to SUSv3 description. Add some
- missing definitions. Add comments.
- * include/sys/syslimits.h: New file overriding newlib's syslimits.h
- file.
-
-2006-11-06 Corinna Vinschen <corinna@vinschen.de>
-
- * dtable.cc (build_fh_pc): Add missing DEV_SD1_MAJOR case (Thanks to
- Joe Loh for noticing).
-
-2006-11-02 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink_info::posixify): Fix comment.
-
-2006-11-02 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink_info::check): Eliminate PATH_REP bit from pflags.
-
-2006-11-02 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink_info::posixify): New method converting NT and DOS
- paths in symlinks to POSIX.
- (symlink_info::check_shortcut): Allocate buf allowing for a trailing 0.
- Call posixify on the result.
- (symlink_info::check_sysfile): Read from file into local buffer.
- Eliminate old b16 considerations. Call posixify on the result.
- (symlink_info::check_reparse_point): Don't use PrintName but
- SubstituteName which is relevant for Windows' path handling.
- Call posixify on the result.
-
-2006-11-01 Corinna Vinschen <corinna@vinschen.de>
-
- * security.h (cygpriv_idx): Add privileges new in Vista.
- * security.cc (sys_privs): Ditto.
- * sec_helper.cc (cygpriv): Ditto. Fix comment.
-
-2006-10-31 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.h (struct user_heap_info): Add slop member.
- * heap.cc (heap_init): Add slop factor to heap allocation. Add
- comment.
- * mmap.cc (MapViewNT): Allocate memory maps top down.
- (fhandler_dev_zero::mmap): Ditto.
- * shared.cc (shared_info::heap_slop_size): New method.
- (shared_info::heap_chunk_size): Don't use debug_printf at early stage.
- * shared_info.h (SHARED_INFO_CB): Accommodate change to shared_info.
- (CURR_SHARED_MAGIC): Ditto.
- (class shared_info): Add heap_slop member. Declare heap_slop_size.
- * wincap.h: Define heapslop throughout.
- * wincap.cc: Ditto.
-
-2006-10-31 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Drop
- directory attribute for reparse points to avoid mistreating.
- (fhandler_base::fstat_by_name): Ditto.
- * path.cc (symlink_info::check_reparse_point): New method testing
- reparse points for symbolic links.
- (symlink_info::check_shortcut): Move file attribute tesat to calling
- function.
- (symlink_info::check): Add handling for reparse points.
- * path.h (enum path_types): Add PATH_REP to denote reparse point based
- symlinks.
- (path_conv::is_rep_symlink): New method.
- * syscalls.cc (unlink): Handle reparse points.
-
-2006-10-27 Corinna Vinschen <corinna@vinschen.de>
-
- * shared.cc (open_shared): Drop useless attempt from 2006-08-11.
-
-2006-10-27 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc (__api_fatal): Drop spare argument to __small_sprintf.
- * smallprint.c (__small_vsprintf): Preserve GetLastError value.
- * winsup.h (api_fatal): Simplify. Drop duplicate filename arg.
-
-2006-10-23 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::rewinddir): Fix comment.
-
-2006-10-23 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::rewinddir): Accommodate
- buggy RestartScan behaviour of Windows 2000.
- * wincap.h: Define has_buggy_restart_scan throughout.
- * wincap.cc: Ditto.
-
-2006-10-22 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::facl): Fix whitespace.
- * external.cc: Update copyright.
- * fhandler.cc: Ditto.
- * sec_helper.cc: Ditto.
- * security.h: Ditto.
- * security.cc: Ditto.
- (check_registry_access): Return -1 if W_OK is requested.
-
-2006-10-22 Corinna Vinschen <corinna@vinschen.de>
-
- * external.cc (cygwin_internal): Use security_descriptor::copy method.
- * sec_helper.cc (security_descriptor::malloc): Use own free method.
- Set type.
- (security_descriptor::realloc): Handle the case that psd has been
- allocated using LocalAlloc. Set type.
- (security_descriptor::free): Ditto.
- * security.cc (get_nt_attribute): Remove.
- (get_reg_security): Remove.
- (get_nt_object_security): Use GetSecurityInfo which handles all
- securable objects.
- (get_nt_object_attribute): Remove.
- (get_object_attribute): Call get_nt_object_security instead of
- get_nt_object_attribute.
- (get_file_attribute): Ditto.
- (check_registry_access): Call get_nt_object_security instead of
- get_reg_security.
- * security.h (cygpsid::operator PSID): Make method const, not the
- result.
- (class security_descriptor): Add type member. Accommodate throughout.
- (security_descriptor::copy): New method.
- (security_descriptor::operator PSECURITY_DESCRIPTOR *): New operator.
-
-2006-10-22 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::fhaccess): Check if opening registry
- actually created a handle. This handles the registry root dir.
- * fhandler_registry.cc (fhandler_registry::open): Set io_handle in
- case of opening one of the predefined registry keys.
-
-2006-10-21 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::fhaccess): Call check_registry_access
- for registry keys/values if ntsec is on.
- * security.cc (check_access): New static function derived from
- check_file_access, but object type agnostic.
- (check_file_access): Only do file specific stuff. Call check_access.
- (check_registry_access): New access check function for registry keys/
- values.
- * security.h (check_registry_access): Declare.
-
-2006-10-21 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_registry.cc (fhandler_registry::fstat): Set restrictive
- permission and ownership if key can't be opened for reading security.
- (open_key): If opening key fails, retry opening with backup intent.
-
-2006-10-20 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_getnameinfo): Fix typo in comment.
-
-2006-10-19 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_base::set_name): Make virtual.
- (class fhandler_registry): Add wow64 and prefix_len members.
- Declare set_name method.
- * fhandler_proc.cc (PROC_REGISTRY32): Define.
- (PROC_REGISTRY64): Define.
- (proc_listing): Add "registry32" and "registry64" elements.
- (proc_fhandlers): Add corresponding FH_REGISTRY values.
- * fhandler_registry.cc (registry_len): Drop static value in favor of
- class member prefix_len. Use preifx_len instead of registry_len
- throughout.
- (fhandler_registry::set_name): Define. Set wow64 and prefix_len
- according to directory prefix.
- (fhandler_registry::fhandler_registry): Set wow64 and prefix_len to
- default values.
- (open_key): Add wow64 argument. Handle wow64 in call to RegOpenKeyEx.
- Use fhandler_registry member wow64 in this place throughout.
-
-2006-10-19 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_proc.cc: Drop superfluous definition of _WIN32_WINNT.
- * miscfuncs.cc: Ditto.
- * sched.cc: Ditto.
-
-2006-10-17 Corinna Vinschen <corinna@vinschen.de>
-
- * glob.c: Remove.
- * glob.cc: New file. Latest glob version from FreeBSD plus Cygwin
- specific changes (__stat64/__stat32, ignore_case_with_glob,
- drop collate functions).
- (glob3): Return GLOB_ABORTED in case directory is unreadable and
- GLOB_ERR is set, as demanded by SUSv3.
- * glob.h: Import latest version from FreeBSD.
-
-2006-10-17 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.h (WINVER): Define instead of _WIN32_WINNT. Set to 0x0502.
- (_NO_W32_PSEUDO_MODIFIERS): Define.
-
-2006-10-16 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Drop redundant
- access check.
-
-2006-10-16 Corinna Vinschen <corinna@vinschen.de>
-
- * include/asm/byteorder.h: Fix copyright dates.
-
-2006-10-16 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (PrivilegeCheck): Define.
- * fhandler.cc (fhandler_base::open): Always try opening with backup
- resp. restore intent.
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Always try
- opening with backup intent.
- (fhandler_disk_file::readdir): Ditto when trying to retrieve file id
- explicitely.
- * security.cc (check_file_access): Replace pbuf with correctly
- PPRIVILEGE_SET typed pset. Check explicitely for backup and/or restore
- privileges when AccessCheck fails, to circumvent AccessCheck
- shortcoming. Add comment to explain.
-
-2006-10-13 Christopher Faylor <cgf@timesys.com>
-
- * winsup.h: Turn off DEBUGGING.
-
-2006-10-13 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (Wow64DisableWow64FsRedirection): Define.
- (Wow64RevertWow64FsRedirection): Define.
- * security.cc (cygsuba_installed): New shared variable to store result
- of cygsuba.dll installation test.
- (subauth): Check if cygsuba.dll has been installed and registered
- before issuing the (sub)authentication.
-
-2006-10-12 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (create_token): Fix condition for source identifier.
-
-2006-10-11 Corinna Vinschen <corinna@vinschen.de>
-
- * select.cc (struct socketinf): Convert ser_num and w4 to dynamically
- allocated arrays. Add max_w4 member to keep track.
- (thread_socket): Make timeout depending on number of sockets to wait
- for. Loop WFMO over all sockets.
- (start_thread_socket): Handle any number of sockets. Fix typo. Don't
- close socket event in out of memory condition.
- (socket_cleanup): Free ser_num and w4.
-
-2006-10-06 David Jade <d3@mutable.net>
-
- * path.cc (path_conv::get_nt_native_path): Properly detect \\?\ paths.
- (mount_info::conv_to_win32_path): Update comment.
- * fhandler_disk_file.cc (path_conv::ndisk_links): Use backslashes
- to make NT kernel functions work for \\?\GLOBALROOT paths.
-
-2006-10-09 Corinna Vinschen <corinna@vinschen.de>
-
- * devices.in: Raise number of handled serial ports to 64.
- * devices.cc: Regenerate.
-
-2006-09-17 Danny Smith <dannysmith@clear.net.nz>
-
- * include/asm/byteorder.h: Correct typo.
-
-2006-09-17 Danny Smith <dannysmith@clear.net.nz>
-
- * include/asm/byteorder.h: Don't #define n* macros if -fnoinline is
- specified.
-
-2006-09-07 Christopher Faylor <cgf@timesys.com>
-
- * environ.cc (build_env): Don't put an empty environment variable into
- the environment. Optimize use of "len".
- * errno.cc (ERROR_MORE_DATA): Translate to EMSGSIZE rather than EAGAIN.
-
-2006-08-31 Corinna Vinschen <corinna@vinschen.de>
-
- * grp.cc (initgroups32): Run get_server_groups under original token.
- * syscalls.cc (seteuid32): Slightly reorganize code creating a token.
-
-2006-08-27 Christopher Faylor <cgf@timesys.com>
-
- * child_info.h (child_info_spawn::~child_info_spawn): Don't close
- myself_pinfo handle when spawning.
-
-2006-08-20 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Fix formatting.
-
-2006-08-20 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (DIR_NUM_ENTRIES): Set to 100 to maximize
- performance on remote shares.
- (fhandler_disk_file::opendir): Move comment about Samba weirdness into
- fhandler_disk_file::readdir. Don't disallow
- FileIdBothDirectoryInformation on Samba.
- (fhandler_disk_file::readdir): Workaround Samba problem with
- FileIdBothDirectoryInformation by rereading already read entries
- using FileBothDirectoryInformation. Change comment about Samba
- weirdness explaining this change.
-
-2006-08-20 Hideki Iwamoto <h-iwamoto@kit.hi-ho.ne.jp>
-
- * fhandler_disk_file.cc (fhandler_disk_file::pread): Properly check for
- non-error return from lseek.
-
-2006-08-17 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_serial.cc (raw_read): Evaluate minchars taking the
- vmin_ > ulen case into account. Simplify evaluating the bytes to read.
- Don't use bytes in Queue value from ClearCommError call in case vtime_
- is > 0. Reformat GetOverlappedResult call. Simplify call to ReadFile.
-
-2006-08-14 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (subauth): Initialize user_token to NULL. Add comment.
-
-2006-08-11 Corinna Vinschen <corinna@vinschen.de>
-
- * shared.cc (open_shared): Desperately try to get shared memory, only
- when DEBUGGING enabled for now.
-
-2006-08-10 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (_onreturn::~onreturn): Don't attempt to close a NULL
- handle.
-
-2006-08-10 Christopher Faylor <cgf@timesys.com>
-
- * winsup.h: Turn on DEBUGGING by default for now.
-
-2006-08-10 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::lock): Handle
- ERROR_NOT_LOCKED returned from UnlockFileEx.
-
-2006-08-09 Corinna Vinschen <corinna@vinschen.de>
-
- * path.h (SYMLINK_EA_NAME): Remove.
- (SHORTCUT_HDR_SIZE): Ditto.
-
-2006-08-09 Christopher Faylor <cgf@timesys.com>
-
- * autoload.cc (GetHandleInformation): Declare new function.
- (SetHandleInformation): Ditto.
- * debug.cc (add_handle): Use SetHandleInformation to protect handle.
- (close_handle): Use SetHandleInformation to unprotect handle.
-
- * spawn.cc (spawn_guts): Move detached test outside of P_OVERLAY block.
-
-2006-08-07 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (NtSetInformationFile): Define.
- * cygwin.din: Export posix_fadvise and posix_fallocate.
- * fhandler.cc (fhandler_base::fadvise): New method.
- (fhandler_base::ftruncate): Add allow_truncate parameter.
- * fhandler.h (class fhandler_base): Add fadvise method. Accommodate
- new parameter to ftruncate.
- (class fhandler_pipe): Add fadvise and ftruncate methods.
- (class fhandler_disk_file): Add fadvise method. Accommodate new
- parameter to ftruncate.
- * fhandler_disk_file.cc (fhandler_disk_file::fadvise): New method.
- (fhandler_disk_file::ftruncate): Accommodate new allow_truncate
- parameter. Set EOF using NtSetInformationFile on NT.
- * ntdll.h (struct _FILE_END_OF_FILE_INFORMATION): Define.
- (NtSetInformationFile): Declare.
- * pipe.cc (fhandler_pipe::fadvise): New method.
- (fhandler_pipe::ftruncate): Ditto.
- * syscalls.cc (posix_fadvise): New function.
- (posix_fallocate): Ditto.
- (ftruncate64): Accommodate second parameter to fhandler's ftruncate
- method.
- * include/fcntl.h: Add POSIX_FADV_* flags. Add declarations of
- posix_fadvise and posix_fallocate.
- * include/cygwin/version.h: Bump API minor number.
-
-2006-08-02 Christopher Faylor <cgf@timesys.com>
-
- * environ.cc (env_win32_to_posix_path_list): Declare.
- (conv_envvars): Use env_win32_to_posix_path_list rather than
- cygwin_win32_to_posix_path_list.
- (posify): Translate back to win32 path if errno is EIDRM.
- * environ.h: Update copyright. Define ENV_CVT.
- * path.cc (conv_path_list): If converting for the environment and
- removed an element set errno to ENV_CVT.
- (env_win32_to_posix_path_list): New function.
-
-2006-08-01 Christopher Faylor <cgf@timesys.com>
-
- * environ.cc (dos_file_warning): Declare.
- (parse_thing): Add "dosfilewarning". Alphabetize.
- * path.cc (normalize_posix_path): Return -1 when MS-DOS path detected.
- (warn_msdos): New function.
- (path_conv::check): Call if !PC_NOWARN and MS-DOS path detected.
- (cygwin_conv_to_win32_path): Set PC_NOWARN when calling path_conv.
- (cygwin_conv_to_full_win32_path): Ditto.
- * path.h (pathconv_arg::PC_NOWARN): Define.
- * shared_info.h (user_info::warned_msdos): New field.
- (CURR_USER_MAGIC): Reset.
-
-2006-07-31 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::recv_internal): Fix a problem
- with poll(2) after shutdown(SHUT_RD) has been called on the local side.
- * poll.cc (poll): Use POSIX type nfds_t for second parameter. Drop
- special socket handling for POLLIN. Add comment to explain why.
- * include/sys/poll.h: Declare nfds_t. Use as type for second parameter
- in poll(2) declaration.
-
-2006-07-31 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::evaluate_events): Circumvent
- potential race condition.
- (fhandler_socket::recv_internal): Fix MSG_PEEK bug on blocking sockets
- and simplify recv loop.
- (fhandler_socket::send_internal): Only lock when changing wsock_events.
-
-2006-07-31 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc: Drop LoadDLLprime for wsock32 since no wsock32 function
- is used anymore. Drop all unused ws2_32.dll functions.
-
-2006-07-28 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (struct wsa_event): Define here.
- (class fhandler_socket): Make wsock_evt private again.
- (fhandler_socket::wsock_event): New read accessor for wsock_evt.
- (fhandler_socket::serial_number): New read accessor to get the
- socket's serial number.
- (fhandler_socket::ready_for_read): Just return true.
- * fhandler_socket.cc (struct wsa_event): Move definition to fhandler.h.
- * select.cc (struct socketinf): Add serial number vector.
- (start_thread_socket): Identify duplicate sockets by their serial
- number, not (wrongly) by their wsock_evt.
-
-2006-07-27 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc: Revert misguided attempt to handle FD_CLOSE error
- conditions in evaluate_events.
- (search_wsa_event_slot): Move wrongly placed memset in
- fhandler_socket::init_events here.
- (fhandler_socket::init_events): Initially set FD_WRITE event for
- connectionless sockets.
- * poll.cc (poll): Don't add sockets always to except_fds since select
- is now supposed to do it right.
- * select.cc (set_bits): Set connection state correctly for failed
- af_local_connect on local sockets. Remove socket special handling
- for except_selected descriptors.
- (peek_socket): Try to set the read/write/exception bits actually
- correctly.
-
-2006-07-27 Brian Ford <Brian.Ford@FlightSafety.com>
-
- * fhandler_socket.cc (fhandler_socket::recvmsg): Remove unused tot
- argument. All callers changed.
- (fhandler_socket::sendmsg): Likewise.
- * net.cc (cygwin_recvmsg): Likewise.
- (cygwin_sendmsg): Likewise, and prevent calling sendmsg whith an
- invalid iovec.
- * fhandler.h (fhandler_socket::recvmsg): Adjust prototype.
- (fhandler_socket::sendmsg): Likewise.
-
-2006-07-27 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_socket): Remove prot_info_ptr.
- (fhandler_socket::fixup_before_fork_exec): Remove.
- (fhandler_socket::fixup_after_exec): Remove.
- (fhandler_socket::need_fixup_before): Remove.
- * fhandler_socket.cc (fhandler_socket::fhandler_socket): Drop
- initializing prot_info_ptr. Remove unused code.
- (fhandler_socket::~fhandler_socket): Drop free'ing prot_info_ptr.
- (struct wsa_event): Rename connect_errorcode to errorcode.
- (fhandler_socket::evaluate_events): Handle FD_CLOSE error condition
- as FD_CONNECT error condition, except, never reset an FD_CLOSE error
- condition. Always set FD_WRITE after successfully recorded FD_CONNECT.
- (fhandler_socket::fixup_before_fork_exec): Remove.
- (fhandler_socket::fixup_after_fork): Revert to using handle duplication.
- (fhandler_socket::fixup_after_exec): Remove.
- (fhandler_socket::dup): Revert to using handle duplication.
- (fhandler_socket::send_internal): Only call wait_for_events in case
- of WSAEWOULDBLOCK condition.
- (fhandler_socket::set_close_on_exec): Call
- fhandler_base::set_close_on_exec.
- * net.cc (fdsock): Just set socket to inheritable on non-NT. Don't
- call inc_need_fixup_before.
- * select.cc (peek_socket): Don't set except_ready on every FD_CLOSE,
- just on error.
-
-2006-07-26 Brian ford <Brian.Ford@FlightSafety.com>
-
- * fhandler.cc (fhandler_base::read): Call get_readahead_into_buffer
- instead of duplicating it.
-
-2006-07-26 Corinna Vinschen <corinna@vinschen.de>
-
- * shared.cc (offsets): Define as offsets relative to cygwin_hmodule
- instead of addresses.
- (off_addr): New macro.
- (open_shared): Use offsets array accordingly. Remove unused code.
- * shared_info.h (cygwin_shared_address): Remove.
-
-2006-07-26 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.h (struct init_cygheap): Remove shared_h and mt_h members.
- * fhandler_tape.cc (mt): Define as DLL shared area in
- .cygwin_dll_common instead of as dynamically allocated area.
- Change referencing throughout.
- * mtinfo.h (mt_h): Remove entirely.
- (mt): Remove extern declaration.
- * shared.cc (cygwin_shared_area): New global cygwin_shared
- variable located in .cygwin_dll_common.
- (offsets): Define shared region addresses descending from
- cygwin_shared_address.
- (open_shared): Replace usage of SH_CYGWIN_SHARED by SH_USER_SHARED.
- (memory_init): Set cygwin_shared just by pointing to cygwin_shared_area.
- * shared_info.h (shared_locations): Remove SH_CYGWIN_SHARED and
- SH_MTINFO.
- (cygwin_shared_address): Define as DLL start address.
- * tty.h (tty_min::tty_min): Remove constructor.
-
-2006-07-25 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/in6.h: Guard in_port_t typedef more restrictive to
- avoid compiler warning.
-
-2006-07-25 Christopher Faylor <cgf@timesys.com>
-
- * security.cc (get_logon_server): Remove nret and use dret for
- everything to avoid a g++ warning.
-
-2006-07-25 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/version.h: Bump DLL version to 1.7.0.
-
-2006-07-25 Corinna Vinschen <corinna@vinschen.de>
-
- * select.h: Remove.
- * fhandler_socket.cc: Don't include select.h.
- * select.cc: Ditto.
-
-2006-07-25 Corinna Vinschen <corinna@vinschen.de>
-
- * cygtls.h: Drop socket related includes.
- (struct _local_storage): Remove exitsock and exitsock_sin. Add
- select_sockevt.
- * cygtls.cc: Accommodate above change throughout.
- * fhandler.h (class fhandler_socket): Make wsock_evt public.
- * fhandler_socket.cc (fhandler_socket::fhandler_socket): Accommodate
- reordering members.
- (fhandler_socket::evaluate_events): Drop FD_CONNECT event as soon as
- it gets read once. Never remove FD_WRITE event here.
- (fhandler_socket::wait_for_events): Wait 50 ms instead of INFINITE for
- socket events.
- (fhandler_socket::accept): Fix conditional. Set wsock_events members
- of accepted socket to useful start values.
- (fhandler_socket::recv_internal): Always drop FD_READ/FD_OOB events from
- wsock_events after the call to WSARecvFrom.
- (fhandler_socket::send_internal): Drop FD_WRITE event from wsock_events
- if the call to WSASendTo fails with WSAEWOULDBLOCK. Fix return value
- condition.
- * select.cc (struct socketinf): Change to accommodate using socket event
- handling.
- (peek_socket): Use event handling for peeking socket.
- (thread_socket): Ditto.
- (start_thread_socket): Ditto.
- (socket_cleanup): Same here.
- * tlsoffsets.h: Regenerate.
-
-2006-07-23 Christopher Faylor <cgf@timesys.com>
-
- * include/cygwin/version.h: Bump DLL minor version number to 22.
-
-2006-07-20 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_socket): Rearrange slightly to keep
- event handling methods and members together. Drop owner status flag.
- Split wait method. Rename event handling methods for readability.
- * fhandler_socket.cc (struct wsa_event): Add owner field.
- (LOCK_EVENTS): New macro.
- (UNLOCK_EVENTS): Ditto.
- (fhandler_socket::init_events): rename from prepare.
- (fhandler_socket::evaluate_events): First half of former wait method.
- Do everything but wait. Allow specifiying whether or not events from
- event_mask should be erased from wsock_events->events. Simplify
- OOB handling. Allow sending SIGURG to any process (group).
- (fhandler_socket::wait_for_events): Second half of former wait method.
- Call evaluate_events and wait in a loop if socket is blocking.
- (fhandler_socket::release_events): Rename from release.
- (fhandler_socket::connect): Accommodate above name changes.
- (fhandler_socket::accept): Ditto.
- (fhandler_socket::recv_internal): Ditto.
- (fhandler_socket::send_internal): Ditto.
- (fhandler_socket::close): Ditto.
- (fhandler_socket::fcntl): Always set owner to given input value on
- F_SETOWN. Handle F_GETOWN.
- * net.cc (fdsock): Accommodate above name changes.
-
-2006-07-20 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::wait): Set Winsock errno to
- WSAEWOULDBLOCK instead of WSAEINPROGRESS.
-
-2006-07-19 Corinna Vinschen <corinna@vinschen.de>
-
- * pinfo.cc (commune_process): Don't add extra \0 to cmdline.
- (_pinfo::cmdline): Ditto process internal.
-
-2006-07-19 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (msync): Disable rounding up len. Fix bug in access check
- loop.
-
-2006-07-19 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink_worker): Return EEXIST if newpath exists.
-
-2006-07-18 Christopher Faylor <cgf@timesys.com>
-
- * tty.cc (tty_list::terminate): Don't enter the busy loop if we don't
- own the master.
-
-2006-07-18 Silvio Laguzzi <slaguzzi@data-al.de>
-
- * sec_acl.cc (acltotext32): Add missing handling of default ACL entry
- types.
-
-2006-07-18 Brian Ford <Brian.Ford@FlightSafety.com>
- Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.h (mmap_region_status): New enum.
- (mmap_is_attached_or_noreserve_page): Adjust prototype and rename
- as below.
- * mmap.cc (mmap_is_attached_or_noreserve_page): Rename
- mmap_is_attached_or_noreserve. Add region length parameter.
- Return enum above.
- * exceptions.cc (_cygtls::handle_exceptions): Accommodate above.
- * fhandler.cc (fhandler_base::raw_read): Call above for NOACCESS
- errors and retry on success to allow reads into untouched
- MAP_NORESERVE buffers.
-
-2006-07-18 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_floppy.cc (fhandler_dev_floppy::ioctl): Fix typo in lint
- directive.
-
-2006-07-18 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din (posix_openpt): Export.
- * tty.cc (posix_openpt): New function.
- * include/cygwin/stdlib.h (posix_openpt): Declare.
- * include/cygwin/version.h: Bump API minor number.
-
-2006-07-17 Christopher Faylor <cgf@timesys.com>
-
- GCC 4.1 fixes.
- * cygheap.h (cygheap_user): Remove unneeded class names from function
- declaration.
- * fhandler.h (fhandler_base): Ditto.
- (fhandler_dev_floppy): Ditto.
- (fhandler_console): Ditto.
- * wininfo.h (wininfo): Ditto.
- * exceptions.cc (sigpacket::process): Avoid compiler errors about gotos
- and initialization.
- * fhandler_fifo.cc (fhandler_fifo::open): Ditto.
- * fhandler_floppy.cc (fhandler_dev_floppy::ioctl): Ditto.
- * fhandler_tty.cc (fhandler_tty_slave::ioctl): Ditto.
- * mmap.cc (mmap64): Ditto.
- * pipe.cc (fhandler_pipe::open): Ditto.
- * spawn.cc (spawn_guts): Ditto.
-
- * sec_helper.cc: Fix some comments.
- (get_null_sd): Move file-scope static to only function where it is
- used.
-
-2006-07-14 Christopher Faylor <cgf@timesys.com>
-
- * fork.cc (fork): Lock the process before forking to prevent things
- like new fds from being opened, etc.
- * sync.h (lock_process::dont_bother): New function.
-
-2006-07-14 Christopher Faylor <cgf@timesys.com>
-
- * include/cygwin/types.h: Update copyright.
-
-2006-07-14 Christopher Faylor <cgf@timesys.com>
-
- * cygwin.sc: Make sure there's something in the cygheap.
- * dllfixdbg: Accommodate newer binutils which put the gnu_debuglink at
- the end rather than at the beginning.
-
-2006-07-14 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (get_token_group_sidlist): Always add the interactive
- group to the token. Add comment. Create logon_id group SID by
- copying it from incoming group list.
- (create_token): Add subauth_token parameter. Use information in
- subauth_token if present. Tweak SourceIdentifier if subauth_token
- is present for debugging purposes.
- * security.h (create_token): Add subauth_token parameter in declaration.
- * syscalls.cc (seteuid32): Call subauth first. Call create_token
- regardless. Use subauth token in call to create_token if subauth
- succeeded.
-
-2006-07-13 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc (waitq_head): Don't initialize to zero.
- * sigproc.h: Update copyright, fix whitespace.
-
-2006-07-13 Christopher Faylor <cgf@timesys.com>
-
- * fhandler.cc (fhandler_base::raw_read): Only return EISDIR when we're
- really trying to read a directory.
-
- * sigproc.cc: Use "Static" where appropriate.
-
-2006-07-13 Corinna Vinschen <corinna@vinschen.de>
-
- * include/netinet/in.h: Update copyright.
-
-2006-07-13 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc: Update copyright.
- * include/pthread.h: Ditto.
-
-2006-07-13 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::wait): Rework function so that
- WaitForMultipleObjects is really only called when necessary.
-
-2006-07-13 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap64): Drop MAP_NORESERVE flag for non-anonymous,
- non-private mappings.
- (mmap_record::unmap_pages): Only check noreserve flag which now implies
- anonymous and private.
- (mprotect): Ditto.
- (fixup_mmaps_after_fork): Ditto.
-
-2006-07-13 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap64): Drop MAP_RESERVED flag for all non-anonymous,
- non-private mappings.
-
-2006-07-13 Corinna Vinschen <corinna@vinschen.de>
-
- * exceptions.cc (_cygtls::handle_exceptions): Call new
- mmap_is_attached_or_noreserve_page function in case of access violation
- and allow application to retry access on noreserve pages.
- * mmap.cc (mmap_is_attached_or_noreserve_page): Changed from
- mmap_is_attached_page. Handle also noreserve pages now. Change
- comment accordingly.
- * winsup.h (mmap_is_attached_or_noreserve_page): Declare instead of
- mmap_is_attached_page.
-
-2006-07-12 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap_record::alloc_page_map): Don't call VirtualProtect
- on maps created with MAP_NORESERVE.
-
-2006-07-12 Corinna Vinschen <corinna@vinschen.de>
-
- * include/netdb.h: Declare rcmd, rcmd_af, rexec, rresvport,
- rresvport_af, iruserok, iruserok_sa, ruserok.
-
-2006-07-12 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (DLL_OFILES): Drop iruserok.o. Add rcmd.o.
- * autoload.cc (rcmd): Drop definition.
- * cygwin.din: Export bindresvport, bindresvport_sa, iruserok_sa,
- rcmd_af, rresvport_af.
- * net.cc (cygwin_rcmd): Remove.
- (last_used_bindresvport): Rename from last_used_rrecvport.
- (cygwin_bindresvport_sa): New function implementing bindresvport_sa.
- (cygwin_bindresvport): New function implementing bindresvport.
- (cygwin_rresvport): Remove.
- * include/cygwin/version.h: Bump API minor number.
- * include/netinet/in.h: Declare bindresvport and bindresvport_sa.
- * libc/iruserok.c: Remove file.
- * libc/rcmd.cc: New file implementing rcmd, rcmd_af, rresvport,
- rresvport_af, iruserok_sa, iruserok and ruserok.
-
-2006-07-12 Corinna Vinschen <corinna@vinschen.de>
-
- * include/pthread.h: Define PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT and
- PTHREAD_PRIO_PROTECT only if _POSIX_THREAD_PRIO_INHERIT is defined.
-
-2006-07-12 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::getsockname): Return valid
- result for unbound sockets.
-
-2006-07-11 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Handle
- wsock_mtx and wsock_evt on fork, thus handling close_on_exec correctly.
- (fhandler_socket::fixup_after_exec): Drop misguided attempt to handle
- close_on_exec here.
- (fhandler_socket::dup): Call fixup_after_fork with NULL parent.
- Add comment.
- (fhandler_socket::set_close_on_exec): Handle wsock_mtx and wsock_evt.
-
-2006-07-10 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_socket): Add wsock_mtx, wsock_evt
- and wsock_events members. Remove closed status flag, add listener
- status flag. Accommodate new implementation of socket event handling
- methods. Declare recv* and send* functions ssize_t as the POSIX
- equivalents.
- (fhandler_socket::recv_internal): Declare.
- (fhandler_socket::send_internal): Ditto.
- * fhandler_socket.cc (EVENT_MASK): Define mask of selected events.
- (fhandler_socket::fhandler_socket): Initialize new members.
- (fhandler_socket::af_local_setblocking): Don't actually set the
- socket to blocking mode. Keep sane event selection.
- (fhandler_socket::af_local_unsetblocking): Don't actually set the
- socket to previous blocking setting, just remember it.
- (struct wsa_event): New structure to keep event data per shared
- socket.
- (NUM_SOCKS): Define number of shared sockets concurrently handled by
- all active Cygwin processes.
- (wsa_events): New shared datastructure keeping all wsa_event records.
- (socket_serial_number): New shared variable to identify shared sockets.
- (wsa_slot_mtx): Global mutex to serialize wsa_events access.
- (search_wsa_event_slot): New static function to select a new wsa_event
- slot for a new socket.
- (fhandler_socket::prepare): Rewrite. Prepare event selection
- per new socket.
- (fhandler_socket::wait): Rewrite. Wait for socket events in thread
- safe and multiple process safe.
- (fhandler_socket::release): Rewrite. Close per-socket descriptor
- mutex handle and event handle.
- (fhandler_socket::dup): Duplicate wsock_mtx and wsock_evt. Fix
- copy-paste error in debug output.
- (fhandler_socket::connect): Accommodate new event handling.
- (fhandler_socket::listen): Set listener flag on successful listen.
- (fhandler_socket::accept): Accommodate new event handling.
- (fhandler_socket::recv_internal): New inline method centralizing
- common recv code.
- (fhandler_socket::recvfrom): Call recv_internal now.
- (fhandler_socket::recvmsg): Ditto. Streamline copying from iovec
- to WSABUF.
- (fhandler_socket::send_internal): New inline method centralizing
- common send code.
- (fhandler_socket::sendto): Call send_internal now.
- (fhandler_socket::sendmsg): Ditto. Streamline copying from iovec
- to WSABUF.
- (fhandler_socket::close): Call release now.
- (fhandler_socket::ioctl): Never actually switch to blocking mode.
- Just keep track of the setting.
- * net.cc (fdsock): Call prepare now.
- (cygwin_connect): Revert again to event driven technique.
- (cygwin_accept): Ditto.
- * poll.cc (poll): Don't call recvfrom on a listening socket.
- Remove special case for failing recvfrom.
- * include/sys/socket.h: Declare recv* and send* functions ssize_t as
- requested by POSIX.
-
-2006-07-10 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/inet_addr.c: Define __INSIDE_CYGWIN_NET__.
- * libc/inet_network.c: Ditto.
-
-2006-07-07 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::wait): Disable SA_RESTART
- handling for now.
-
-2006-07-07 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_inet_ntop): Fix data type of forth parameter.
-
-2006-07-07 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (DLL_OFILES): Add inet_addr.o and inet_network.o.
- * autoload.cc (inet_addr): Drop definition.
- (inet_ntoa): Ditto.
- * net.cc: Forward declare cygwin_inet_aton and cygwin_inet_ntop.
- (cygwin_inet_ntoa): Call cygwin_inet_ntop instead of Winsock inet_ntoa.
- (cygwin_inet_addr): Remove here.
- (cygwin_inet_aton): Ditto.
- (cygwin_inet_network): Ditto.
- * libc/inet_addr.c: New file implementing cygwin_inet_aton and
- cygwin_inet_addr.
- * libc/inet_network.c: New file implementing cygwin_inet_network.
-
-2006-07-06 Christopher Faylor <cgf@timesys.com>
-
- * hookapi.cc: Add comment header
- (putmem): Make static.
- (get_export): Ditto.
- (rvadelta): Ditto. Don't assume that a section which ends where the
- import_rva begins is the import list.
-
- * child_info.h: Update copyright.
- * fork.cc: Ditto.
-
-2006-07-06 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/in6.h (struct in6_addr): Fix typo.
-
-2006-07-06 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Export in6addr_any, in6addr_loopback, freeaddrinfo,
- gai_strerror, getaddrinfo, getnameinfo.
- * fhandler_socket.cc: Include cygwin/in6.h.
- (get_inet_addr): Accommodate AF_INET6 usage.
- (fhandler_socket::connect): Ditto.
- (fhandler_socket::listen): Ditto.
- (fhandler_socket::sendto): Ditto.
- * net.cc: Include cygwin/in6.h.
- (in6addr_any): Define.
- (in6addr_loopback): Define.
- (cygwin_socket): Accommodate AF_INET6 usage.
- (socketpair): Bind socketpairs only to loopback for security.
- (inet_pton4): New static function.
- (inet_pton6): Ditto.
- (cygwin_inet_pton): New AF_INET6 aware inet_pton implementation.
- (inet_ntop4): New static function.
- (inet_ntop6): Ditto.
- (cygwin_inet_ntop): New AF_INET6 aware inet_ntop implementation.
- (ga_aistruct): New static function.
- (ga_clone): Ditto.
- (ga_echeck): Ditto.
- (ga_nsearch): Ditto.
- (ga_port): Ditto.
- (ga_serv): Ditto.
- (ga_unix): Ditto.
- (gn_ipv46): Ditto.
- (ipv4_freeaddrinfo): Ditto.
- (ipv4_getaddrinfo): Ditto.
- (ipv4_getnameinfo): Ditto.
- (gai_errmap_t): New structure holding error code - error string mapping.
- (cygwin_gai_strerror): New function implementing gai_strerror.
- (w32_to_gai_err): New static function.
- (get_ipv6_funcs): Ditto.
- (load_ipv6_funcs): Ditto.
- (cygwin_freeaddrinfo): New function implementing freeaddrinfo.
- (cygwin_getaddrinfo): New function implementing getaddrinfo.
- (cygwin_getnameinfo): New function implementing getnameinfo.
- * include/netdb.h: Include stdint.h and cygwin/socket.h. Define
- data types and macros used by getaddrinfo and friends. Declare
- freeaddrinfo, gai_strerror, getaddrinfo and getnameinfo.
- * include/cygwin/in.h: Add IPv6 related IPPROTOs. Remove definition
- of struct sockaddr_in6. Include cygwin/in6.h instead.
- * include/cygwin/in6.h: New header file defining IPv6 releated
- data types and macros.
- * include/cygwin/socket.h: Enable AF_INET6 and PF_INET6. Add
- IPv6 related socket options.
- * include/cygwin/version.h: Bump API minor number.
-
-2006-07-06 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (DsGetDcNameA): Define.
- (NetGetAnyDCName): Define.
- * security.cc: Include dsgetdc.h.
- (DsGetDcNameA): Declare.
- (DS_FORCE_REDISCOVERY): Define.
- (get_logon_server): Add bool parameter to control rediscovery of DC.
- Use DsGetDcNameA function if supported, NetGetDCName/NetGetAnyDCName
- otherwise.
- (get_server_groups): Rediscover DC if get_user_groups fails and
- try again.
- (get_reg_security): Use correct error code macro when testing
- RegGetKeySecurity return value.
- * security.h (get_logon_server): Remove default vaue from wserver
- parameter. Add rediscovery parameter.
- * uinfo.cc (cygheap_user::env_logsrv): Accommodate rediscovery parameter
- in call to get_logon_server.
-
-2006-07-05 Christopher Faylor <cgf@timesys.com>
-
- * sortdin: Ignore all leading underscores when deriving a sort key.
- * cygwin.din: Resort.
-
-2006-07-05 Christopher Faylor <cgf@timesys.com>
-
- * sortdin: New program.
- * cygwin.din: Sort.
-
-2006-07-05 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_socket::wait): Reset default timeout to 10ms.
-
-2006-07-05 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (path_conv::check): Ignore has_ea setting, it's always unset
- at this point anyway.
- (get_symlink_ea): Remove.
- (set_symlink_ea): Remove.
- (symlink_worker): Drop writing symlink into NTFS extended attributes.
- (symlink_info::check): Drop reading symlinks from NTFS extended
- attributes.
-
-2006-07-04 Christopher Faylor <cgf@timesys.com>
-
- * libc/rexec.cc (cygwin_rexec): Obvious (?) fix to correct a gcc
- warning - set port to zero first thing in the function.
-
-2006-07-04 Corinna Vinschen <corinna@vinschen.de>
-
- * signal.cc (signal): Set sa_mask to sig.
-
-2006-07-04 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (DLL_OFILES): Add rexec.o.
- * autoload.cc (inet_network): Drop definition.
- (rexec): Ditto.
- * net.cc (rexec): Drop extern declaration.
- (inet_network): Ditto.
- (cygwin_inet_network): Implement using inet_addr.
- (cygwin_rexec): Remove.
- * libc/rexec.cc: New file.
-
-2006-07-04 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::listen): Allow listening on
- unbound INET socket.
-
-2006-07-04 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_socket::wait): Set default timeout to INFINITE.
-
-2006-07-03 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (NtQueryEaFile): Define.
- (NtSetEaFile): Define.
- * fhandler.cc (fhandler_base::open): Use appropriate open flags
- in query case when allow_ntea is set.
- * ntdll.h (struct _FILE_GET_EA_INFORMATION): Define.
- (struct _FILE_FULL_EA_INFORMATION): Define.
- (NtQueryEaFile): Declare.
- (NtSetEaFile): Declare.
- * ntea.cc (read_ea): Rename from NTReadEA and rewrite using
- NtQueryEaFile.
- (write_ea): Rename from NTWriteEA and rewrite using NtSetEaFile.
- * path.cc (get_symlink_ea): Make static. Add handle parameter to
- accommodate new read_ea call.
- (set_symlink_ea): Make static. Add handle parameter to accommodate new
- write_ea call.
- (symlink_worker): Call set_symlink_ea while file is still open.
- (symlink_info::check): Call get_symlink_ea after file has been opened.
- * security.cc (get_file_attribute): Accommodate new read_ea call.
- (set_file_attribute): Accommodate new write_ea call.
- * security.h (read_ea): Change declaration accordingly.
- (write_ea): Ditto.
-
-2006-07-03 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * fhandler.h (class dev_console): Add `metabit' indicating the
- current meta key mode.
- * fhandler_console.cc (fhandler_console::read): Set the top bit of
- the character if metabit is true.
- * fhandler_console.cc (fhandler_console::ioctl): Implement
- KDGKBMETA and KDSKBMETA commands.
- * fhandler_tty.cc (process_ioctl): Support KDSKBMETA.
- (fhandler_tty_slave::ioctl): Send KDGKBMETA and KDSKBMETA to the
- master.
- * include/cygwin/kd.h: New file for the meta key mode.
- * include/sys/kd.h: New file.
-
-2006-07-03 Eric Blake <ebb9@byu.net>
-
- * include/stdint.h (UINT8_C, UINT16_C): Unsigned types smaller
- than int promote to signed int.
-
-2006-07-03 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_sendto): Define appropriate parameters using
- socklen_t type according to SUSv3.
- (cygwin_recvfrom): Ditto.
- (cygwin_setsockopt): Ditto.
- (cygwin_getsockopt): Ditto.
- (cygwin_connect): Ditto.
- (cygwin_accept): Ditto.
- (cygwin_bind): Ditto.
- (cygwin_getsockname): Ditto.
- (cygwin_getpeername): Ditto.
- (cygwin_recv): Ditto.
- (cygwin_send): Ditto.
- * include/cygwin/socket.h (socklen_t): Typedef and define.
- * include/sys/socket.h: Declare socket functions using socklen_t type.
-
-2006-07-02 Christopher Faylor <cgf@timesys.com>
-
- * include/cygwin/version.h: Bump DLL minor version number to 21.
-
-2006-06-30 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_sendto): Allow zero-sized packets.
- (cygwin_sendmsg): Ditto.
-
-2006-06-26 Corinna Vinschen <corinna@vinschen.de>
-
- Revert patches from 2005-10-22 and 2006-06-14 to use event driven
- accept and connect back to using select:
- * fhandler.h (class fhandler_socket): Remove accept_mtx.
- * fhandler_socket.cc (fhandler_socket::fhandler_socket): Drop
- initializing accept_mtx.
- (fhandler_socket::accept): Drop event handling.
- (fhandler_socket.cc (fhandler_socket::connect): Ditto.
- (fhandler_socket::dup): Drop accept_mtx handling.
- (fhandler_socket::listen): Ditto.
- (fhandler_socket::prepare): Ditto.
- (fhandler_socket::release): Ditto.
- (fhandler_socket::close): Ditto.
- * net.cc (cygwin_accept): Revert to calling cygwin_select to
- implement interuptible accept.
- (cygwin_connect): Ditto for connect.
-
-2006-06-22 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_fifo.cc (fhandler_fifo::open): Release process lock and grab
- a system-wide mutex to prevent a deadlock and a race.
- * sync.h (lock_process): Make fhandler_fifo a friend.
-
- * smallprint.c (__small_vsprintf): Cosmetic change.
-
-2006-06-15 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Export __srget_r, __swbuf_r.
- * include/cygwin/version.h: Bump API minor number to 156.
-
-2006-06-14 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_socket): Add private mutex handle
- accept_mtx.
- * fhandler_socket.cc (fhandler_socket::fhandler_socket): Initialize
- accept_mtx to NULL.
- (fhandler_socket::dup): Duplicate accept_mtx, if available.
- (fhandler_socket::listen): Create accept_mtx before trying to listen.
- (fhandler_socket::prepare): Wait for accept_mtx if available to
- serialize accepts on the same socket.
- (fhandler_socket::release): Release accept_mtx.
- (fhandler_socket::close): Close accept_mtx on successful closesocket.
-
-2006-06-12 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_tty.cc (fhandler_pty_master::close): Always close
- from_master/to_master since we always have copies of these handles.
-
-2006-06-12 Corinna Vinschen <corinna@vinschen.de>
-
- * include/sys/wait.h: Move definition of wait constants from here...
- * include/cygwin/wait.h: ...to here. New file.
- * include/cygwin/stdlib.h: Include cygwin/wait.h to conform with SUSv3.
-
-2006-06-12 Pierre Humblet Pierre.Humblet@ieee.org
-
- * heap.cc (heap_init): Only commit if allocsize is not zero.
-
-2006-06-12 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (fdsock): Disable raising buffer sizes. Add comment to
- explain why.
-
-2006-06-04 Christopher Faylor <cgf@timesys.com>
-
- * ioctl.cc (ioctl): Accommodate change in reported pty master device
- number.
- * select.cc (peek_pipe): Ditto.
-
-2006-06-04 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.h (CYGTLS_PADSIZE): Reset to a size that XP SP1 seems to like.
- * tlsoffsets.h: Regenerate.
-
-2006-06-03 Christopher Faylor <cgf@timesys.com>
-
- * cygthread.cc (cygthread::terminate_thread): In debugging output, use
- name of thread being terminated rather than thread doing the
- terminating.
-
- * fhandler.h (fhandler_pty_master::slave): Delete.
- (fhandler_pty_master::get_unit): Ditto.
- (fhandler_pty_master::setup): Change argument declaration to
- accommodate new usage.
- * fhandler_tty.cc (fhandler_tty_master::init): Remove obsolete slave
- assignment. Pass argument to setup indicating that this is a tty.
- (fhandler_tty_slave::open): Use dev() method rather than referencing
- pc.dev directly.
- (fhandler_pty_master::open): Don't create archetype based on ptym
- device number. Set device number to use DEV_TTYM_MAJOR and tty number.
- Pass argument to setup indicating that this is a pty.
- (fhandler_pty_master::setup): Change single argument to a flag
- indicating whether we're creating a pty and use appropriately.
- Calculate 't' variable here rather than in caller.
-
- * fhandler_dsp.cc (fhandler_dev_dsp::open): Use dev() method rather
- than referencing pc.dev directly.
-
-2006-06-03 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (dll_crt0_0): Call tty_list::init_session here.
- (dll_crt0_1): Reflect renaming from tty_init to tty::init_session.
- (do_exit): Reflect moving of tty_terminate into tty_list.
- * exceptions.cc (events_init): Move tty_mutex stuff elsewhere.
- * fhandler_console.cc (set_console_title): Use lock_ttys class.
- * fhandler_termios.cc (fhandler_termios::bg_check): Make debug output
- more accurate.
- * fhandler_tty.cc (fhandler_tty_slave::open): Reflect move of
- attach_tty into tty_list class. Don't attempt to grab master end of
- pty if master doesn't exist.
- (fhandler_pty_master::open): Reflect move of allocate_tty into tty_list
- class. Use lock_ttys::release to release mutex. Improve debugging
- output.
- (fhandler_pty_master::setup): Remove if 0'ed block. Fix argument to
- SetNamedPipeHandleState.
- * pinfo.cc (_pinfo::set_ctty): Lock ttys before setting sid/pgid.
- Improve debugging. Add temporary debugging.
- * tty.cc (tty_list::init_session): New function.
- (tty::init_session): Rename from tty_init. Reflect move of attach_tty
- to tty_list class.
- (tty::create_master): Rename from create_tty_master.
- (tty_list::attach): Rename from attach_tty. Reflect renaming of
- connect_tty to connect. Ditto for allocate_tty.
- (tty_terminate): Delete.
- (tty_list::terminate): Subsume tty_terminate. Use lock_ttys rather
- than manipulating mutex directly.
- (tty_list::allocate): Rename from allocate_tty. Use lock_ttys rather
- than manipulating mutex directly. Don't set sid here since linux
- apparently doesn't do this. Reflect move of create_tty_master into
- tty.
- (lock_ttys::lock_ttys): Define new constructor.
- (lock_ttys::release): New function.
- * tty.h (tty::exists): Return false immediately if !master_pid.
- (tty::set_master_closed): Define new function.
- (tty::create_master): Ditto.
- (tty::init_session): Ditto.
- (tty_list::mutex): New field.
- (tty_list::allocate): Define new function.
- (tty_list::connect): Ditto.
- (tty_list::attach): Ditto.
- (tty_list::init_session): Ditto.
- (lock_ttys): New class.
- (tty_init): Delete declaration.
- (tty_terminate): Ditto.
- (attach_tty): Ditto.
- (create_tty_master): Ditto.
-
-2006-06-03 Christopher Faylor <cgf@timesys.com>
-
- * Makefile.in (libdl.a): New library.
-
-2006-06-03 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_tty.cc (fhandler_pty_master::close): Don't close handles if
- we don't own them.
- (fhandler_pty_master::setup): Make sure that original handle is closed
- when changing inheritance.
- (fhandler_pty_master::fixup_after_fork): Set from_master/to_master to
- arch value always.
- (fhandler_pty_master::fixup_after_exec): Clear from_master/to_master
- when close_on_exec.
-
-2006-06-03 Christopher Faylor <cgf@timesys.com>
-
- * cygheap.cc (init_cygheap::close_ctty): Remove obsolete code.
- * dcrt0.cc (child_info_spawn::handle_spawn): Signal ready after we've
- run fixup_after_exec.
- * dtable.cc (dtable::fixup_after_exec): Add debugging output.
- * fhandler_tty.cc (fhandler_pty_master::doecho): Use class version of
- to_master.
- (fhandler_tty_common::close): Remove obsolete code.
- (fhandler_tty_slave::fixup_after_exec): Don't close, since this is done
- in dtable's fixup_after_exec. (revisit later?)
- (fhandler_pty_master::fixup_after_exec): Ditto.
-
-2006-06-02 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.h (CYGTLS_PADSIZE): Bump up or suffer a regrettable collision
- with the call chain.
- * tlsoffsets.h: Regenerate.
-
- * dcrt0.cc (break_here): Define unconditionally for use elsewhere.
- Call DebugBreak, if appropriate.
- (initial_env): Rely on break_here() to call DebugBreak.
- * exceptions.cc (try_to_debug): Ditto.
-
-2006-06-02 Christopher Faylor <cgf@timesys.com>
-
- * fhandler.cc (fhandler_base::fixup_after_exec): Declare here.
- * fhandler.h (fhandler_base::fixup_after_exec): Make non-inline.
- (fhandler_termios::fixup_after_fork): Delete declaration.
- (fhandler_termios::fixup_after_exec): Ditto.
- (fhandler_tty_common::inuse): Remove.
- (fhandler_tty_common::dup): Delete declaration.
- (fhandler_tty_common::fixup_after_fork): Ditto.
- (fhandler_tty_slave::fixup_after_exec): Declare new function.
- (fhandler_pty_master::dwProcessId): New variable.
- (fhandler_pty_master::from_master): Ditto.
- (fhandler_pty_master::to_master): Ditto.
- (fhandler_pty_master::setup): New function.
- (fhandler_pty_master::fixup_after_fork): Ditto.
- (fhandler_pty_master::fixup_after_exec): Ditto.
- * fhandler_termios.cc (fhandler_termios::fixup_after_exec): Delete
- definition.
- (fhandler_termios::fixup_after_fork): Ditto.
- * fhandler_tty.cc (fhandler_tty_master::init): Use fhandler_pty_master
- setup function rather than obsolete tty::common_init. Delete obsolete
- inuse setting.
- (fhandler_tty_slave::fhandler_tty_slave): Set inuse to NULL here.
- (fhandler_tty_slave::open): Change debugging output for clarity. Check
- for different things when doing a sanity check on the tty. Reflect the
- fact that master_pid now is the cygwin pid rather than the windows pid.
- Use "arch" rather than "archetype" for consistency.
- (fhandler_tty_slave::close): Close inuse here.
- (fhandler_tty_slave::dup): Remove old if 0'ed code.
- (fhandler_pty_master::dup): New function. Handles pty master
- archetype.
- (fhandler_pty_master::fhandler_pty_master): Zero pty_master specific
- fields.
- (fhandler_pty_master::open): Implement using archetypes, similar to
- slave. Use fhandler_pty_master setup function rather than obsolete
- tty::common_init. Don't set inuse.
- (fhandler_tty_common::close): Don't deal with inuse. Delete old if
- 0'ed code.
- (fhandler_pty_master::close): Implement using archetypes. Close
- from_master and to_master.
- (fhandler_tty_common::set_close_on_exec): Just set close_on_exec flag
- here since everything uses archetypes now.
- (fhandler_tty_common::fixup_after_fork): Delete definition.
- (fhandler_tty_slave::fixup_after_exec): Define new function.
- (fhandler_pty_master::setup): New function, derived from
- tty::common_init.
- (fhandler_pty_master::fixup_after_fork): New function.
- (shared_info.h): Reset SHARED_INFO_CB to reflect new tty size.
- * tty.cc (tty_list::terminate): Close individual handles from
- tty_master.
- (tty::master_alive): Delete.
- (tty::make_pipes): Ditto.
- (tty::common_init): Ditto.
- * tty.h (tty::from_slave): Delete.
- (tty::to_slave): Ditto.
- (tty::common_init): Delete declaration.
- (tty::make_pipes): Ditto.
- (tty::master_pid): Define as pid_t since it is now a cygwin pid.
-
-2006-06-01 Christopher Faylor <cgf@timesys.com>
-
- * cygheap.cc (cygheap_fixup_in_child): Don't close parent handle here.
- Let the caller do that.
- * dcrt0.cc (child_info_spawn::handle_spawn): Close parent handle here
- to allow fixup_after_exec functions to use it.
-
- * cygtls.cc (_cygtls::call2): Avoid calling exit thread if called with
- *crt0_1 functions.
- * cygtls.h (_cygtls::isinitialized): Check that we actually have a tls
- before seeing if it is initialized.
- * gendef (_sigfe_maybe): Ditto.
- * dcrt0.cc (dll_crt0_1): Remove static, use just one argument.
- * dll_init.cc (dllcrt0_info): New structure.
- (dll_dllcrt0): Change into a front-end to renamed dll_dllcrt0_1 so that
- we'll always be assured of having something like a tls.
- (dll_dllcrt0_1): New function, basically renamed from from dll_dllcrt0.
- Unconditionally call _my_tls.init_exception_handler now that we are
- assured of having a tls. Change variable name from "linking" to "linked".
- * winsup.h (dll_crt0_1): Declare.
- (dll_dllcrt0_1): Ditto.
-
-2006-05-30 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.cc (_cygtls::call2): Don't call ExitThread on the main thread.
-
-2006-05-29 Christopher Faylor <cgf@timesys.com>
-
- * winf.h (MAXCYGWINCMDLEN): Set down size to 30000 or suffer fork
- errors.
-
-2006-05-28 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc (child_info::proc_retry): Mask all of the bits we're
- interested in, which includes bits above and below 0xc0000000.
-
-2006-05-27 Christopher Faylor <cgf@timesys.com>
-
- * dll_init.cc (dll_dllcrt0): Previous change didn't work very well with
- fork. Semi-revert it but change name of variable to something that
- makes better sense.
-
-2006-05-27 Christopher Faylor <cgf@timesys.com>
-
- * thread.cc (verifyable_object_isvalid): Check for NULL specifically.
-
-2006-05-27 Christopher Faylor <cgf@timesys.com>
-
- * dll_init.cc (dll_dllcrt0): Call _my_tls.init_exception_handler if
- we've finished initializing (Thanks to Gary Zablackis for noticing this
- problem). Just use cygwin_finished_initializing rather than defining a
- separate variable.
-
-2006-05-25 Christopher Faylor <cgf@timesys.com>
-
- * debug.h (ModifyHandle): Define new macro.
- (modify_handle): Declare new function.
- * debug.cc (modify_handle): Define new function.
- * fhandler.h (fhandler_base::fork_fixup): Change return value from void
- to bool.
- * fhandler.cc (fhandler_base::fork_fixup): Return true if fork fixup has
- been done.
- * pipe.cc (fhandler_pipe::set_close_on_exec): Set inheritance of
- protected handle via ModifyHandle if DEBUGGING.
- (fhandler_pipe::fixup_after_fork): Protect guard handle if fork fixup
- has been done.
-
-2006-05-24 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.cc (_cygtls::call): Call call2 using _my_tls.
- (_cygtls::init_exception_handler): Always replace existing exception
- handler with cygwin exception handler.
- * cygtls.h (_cygtls::call2): Remove static designation.
- * dcrto.cc (dll_crt0_1): Define in a way that allows calling via
- _cygtls::call.
- (_initialize_main_tls): Delete.
- (_dll_crt0): Call dll_crt0_1 via cygtls::call. Set _main_tls here.
- * external.cc (cygwin_internal): Implement CW_CYGTLS_PADSIZE.
- * include/sys/cygwin.h (CW_CYGTLS_PADSIZE): Define.
- * tlsoffsets.h: Regenerate.
-
-2006-05-24 Christopher Faylor <cgf@timesys.com>
-
- * configure.in: Update to newer autoconf.
- (thanks to Steve Ellcey)
- * configure: Regenerate.
- * aclocal.m4: New file.
-
-2006-05-23 Lev Bishop <lev.bishop+cygwin@gmail.com>
-
- * fhandler.cc (readv): Remove nonsensical assert.
-
-2006-05-23 Christopher Faylor <cgf@timesys.com>
-
- * select.cc (start_thread_socket): Delay setting thread local exitsock
- until we know it's correct. Return correct value on error.
-
-2006-05-23 Lev Bishop <lev.bishop+cygwin@gmail.com>
- Christopher Faylor <cgf@timesys.com>
-
- * select.cc (start_thread_socket): Clean up exitsock in case of error.
- Use si->exitcode consistently.
-
-2006-05-21 Christopher Faylor <cgf@timesys.com>
-
- * child_info.h (_CI_SAW_CTRL_C): New enum.
- (CURR_CHILD_INFO_MAGIC): Reset.
- (saw_ctrl_c): New function.
- (set_saw_ctrl_c): Ditto.
- * sigproc.cc (child_info::proc_retry): Return EXITCODE_OK if we get
- STATUS_CONTROL_C_EXIT and we actually saw a CTRL-C.
- * spawn.cc (dwExeced): Delete.
- (chExeced): New variable.
- (spawn_guts): Set chExeced;
- * exceptions.cc (dwExeced): Delete declaration.
- (chExeced): Declare.
- (ctrl_c_handler): Detect if we're an exec stub process and set a flag,
- if so.
-
- * fhandler_tty.cc (fhandler_tty_common::__release_output_mutex): Add
- extra DEBUGGING test.
-
- * pinfo.cc: Fix comment.
-
-2006-05-21 Christopher Faylor <cgf@timesys.com>
-
- * fhandle.h (fhandler_pipe::create_guard): Revert change which
- eliminated SECURITY_ATTRIBUTES argument.
- * pipe.cc (fhandler_pipe::open): Duplicate guard from other process and
- protect it appropriately. Eliminate unneeded writepipe_exists
- temporary variable. Set inheritance appropriately.
- (fhandler_pipe::set_close_on_exec): Revert change which eliminated
- handling guard inheritance.
- (fhandler_pipe::fixup_after_fork): Ditto. Use correct name of entity
- being checked by fork_fixup.
- (fhandler_pipe::fixup_after_exec): Don't bother with guard here.
- (fhandler_pipe::dup): Cosmetic changes and revert creation of
- writepipe_exists as noninheritable.
- (fhandler_pipe::create): Revert change which eliminated
- SECURITY_ATTRIBUTES argument. Revert change which always made
- writepipe_exists noninheritable.
-
-2006-05-21 Christopher Faylor <cgf@timesys.com>
-
- * debug.cc (add_handle): Print handle value when collision detected.
- * dtable.cc (dtable::stdio_init): Cosmetic change.
- * fhandler.h (fhandler_base::create_read_state): Protect handle.
- (fhandler_pipe::create_guard): Ditto. Always mark the handle as
- inheritable.
- (fhandler_pipe::is_slow): Return boolean value rather than numeric 1.
- * pipe.cc (fhandler_pipe::fhandler_pipe): Always flag that we need fork
- fixup.
- (fhandler_pipe::open): Don't pass security attributes to create_guard.
- (fhandler_pipe::set_close_on_exec): Don't handle guard here.
- (fhandler_pipe::close): Accommodate now-protected guard handle.
- (fhandler_pipe::fixup_in_child): Don't protect read_state here.
- (fhandler_pipe::fixup_after_exec): Close guard handle if close_on_exec.
- (fhandler_pipe::fixup_after_fork): Don't bother with guard here.
- (fhandler_pipe::dup): Don't set res to non-error prematurely. Use
- boolean values where appropriate. Protect guard and read_state.
- (fhandler_pipe::create): Don't call need_fork_fixup since it is now the
- default. Don't protect read_state or guard.
-
- * pipe.cc (fhandler_base::ready_for_read): Use bool values for "avail".
-
- * spawn.cc (spawn_guts): Set cygheap->pid_handle as inheritable when
- protecting.
-
-2006-05-15 Lev Bishop <lev.bishop+cygwin@gmail.com>
- Christopher Faylor <cgf@timesys.com>
-
- * select.cc (fhandler_pipe::ready_for_read): Actually get the guard
- mutex for blocking reads.
-
-2006-05-20 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_tty.cc (fhandler_tty::close): Remove problematic hExeced guard.
-
-2006-05-20 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_tty.cc (fhandler_tty_slave::open): Reinstate call to
- need_invisible on first pty open.
-
-2006-05-18 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_console.cc (fhandler_console::need_invisible): Allocate an
- invisible window station when ctty != TTY_CONSOLE.
-
-2006-05-16 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.cc (_cygtls::remove): Don't test for initialization since
- this function will always be called when _my_tls is initialized.
- * init.cc (dll_entry): Don't attempt to remove tls info if _my_tls is
- obviously not even available.
-
-2006-05-15 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc (no_signals_available): Detect hwait_sig ==
- INVALID_HANDLE_VALUE.
- (wait_sig): Set hwait_sig to INVALID_HANDLE_VALUE on __SIGEXIT.
-
-2006-05-15 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.cc (_cygtls::init_thread): Zero entire _my_tls structure and
- no more.
- * cygtls.h (_my_tls::padding): Delete.
- (CYGTLS_PADSIZE): Redefine concept of padding to mean padding at the
- end of the stack.
- * dcrt0.cc (initialize_main_tls): Change return to void.
- * gentls_offsets: Treat const specially, too. Keep going after a '}'
- is found. Change negative offset calculation to use CYGTLS_PADSIZE.
- * init.cc (_my_oldfunc): New variable.
- (threadfunc_fe): Use stored tls value for oldfunc rather than blindly
- writing to the stack.
- (munge_threadfunc): Set oldfunc in tls.
- (dll_entry): Initialize tls allocation.
- * tlsoffsets.h: Regenerate.
-
-2006-05-13 Christopher Faylor <cgf@timesys.com>
-
- * ntdll.h (STATUS_INVALID_INFO_CLASS): Conditionalize.
-
-2006-05-10 Brian Dessent <brian@dessent.net>
-
- * Makefile.in (clean): Also delete *.dbg.
-
-2006-05-08 Christian Franke <Christian.Franke@t-online.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix typo which
- caused test for ".." to be skipped.
-
-2006-05-02 Christopher Faylor <cgf@timesys.com>
-
- * external.cc (cygwin_internal): Set errno on failure.
-
-2006-04-27 Corinna Vinschen <corinna@vinschen.de>
-
- * pipe.cc (DEFAULT_PIPEBUFSIZE): Raise to 64K.
-
-2006-04-26 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_base): Change fstat_helper prototype
- to take file size and inode number as 64 bit values.
- * fhandler_disk_file.cc (FS_IS_SAMBA): Move to path.cc
- (FS_IS_SAMBA_WITH_QUOTA): Ditto.
- (path_conv::hasgood_inode): Delete.
- (path_conv::is_samba): Delete.
- (path_conv::isgood_inode): Centralized function to recognize
- a good inode number.
- (fhandler_base::fstat_by_handle): Constify fvi_size and fai_size.
- Accommodate argument change in fstat_helper.
- (fhandler_base::fstat_by_name): Ditto.
- (fhandler_base::fstat_helper): Accommodate argument change. Call
- path_conv::isgood_inode to recognize good inodes.
- (fhandler_disk_file::opendir): Explain Samba weirdness here.
- Call path_conv::fs_is_samba instead of path_conv::is_samba.
- (fhandler_disk_file::readdir): Add STATUS_INVALID_INFO_CLASS
- as valid return code from NtQueryDirectoryFile to indicate that
- FileIdBothDirectoryInformation is not supported.
- Call path_conv::isgood_inode to recognize good inodes.
- * ntdll.h (STATUS_INVALID_INFO_CLASS): Define.
- * path.cc (fs_info::update): Rework file system recognition
- and set appropriate flags.
- * path.h (struct fs_info): Add is_ntfs, is_samba and is_nfs flags.
- Constify pure read accessors.
-
-2006-04-24 Christopher Faylor <cgf@timesys.com>
-
- * environ.cc (getearly): Force correct dereference order when
- inspecting environ table.
-
-2006-04-24 Corinna Vinschen <corinna@vinschen.de>
-
- * select.cc (thread_pipe): Raise sleep time only every 8th iteration.
- (thread_mailslot): Ditto.
-
-2006-04-23 Corinna Vinschen <corinna@vinschen.de>
- Christopher Faylor <cgf@timesys.com>
-
- * select.cc (thread_pipe): Raise sleep time dynamically to speed up
- select on pipes when copying lots of data.
- (thread_mailslot): Ditto for mailslots.
-
-2006-04-22 Christopher Faylor <cgf@timesys.com>
-
- * signal.cc (abort): On second thought, just set incyg once.
-
-2006-04-22 Christopher Faylor <cgf@timesys.com>
-
- * signal.cc (abort): Set incyg manually to help get a reliable gdb
- stack trace.
- * cygwin.din (abort): Make NOSIGFE.
-
-2006-04-21 Pierre Humblet Pierre.Humblet@ieee.org
- Christopher Faylor <cgf@timesys.com>
-
- * environ.cc (getearly): Use GetEnvironmentVariable and cmalloc instead
- of GetEnvironmentStrings.
- (environ_init): Revert rawenv stuff.
-
-2006-04-21 Christopher Faylor <cgf@timesys.com>
-
- * environ.cc (rawenv): Make this variable a file-scope static.
- (getearly): Rename 's' variable to 'len' since 's' is used fairly
- consistently throughout cygwin as a string variable. Remove rawenv
- declaration. Perform other minor cleanups.
- (environ_init): Remove rawenv declaration. Only set rawenv to
- GetEnvironmentStrings() if it has not already been set. Properly free
- rawenv in all cases.
-
-2006-04-21 Christopher Faylor <cgf@timesys.com>
-
- * tty.h (tty::hwnd): Move to tty_min.
- (tty::gethwnd): Ditto.
- (tty::sethwnd): Ditto.
- (tty_min::hwnd): Receive variable from tty class.
- (tty_min::gethwnd): Receive function from tty classs.
- (tty_min::sethwnd): Ditto.
- * dtable.cc (dtable::stdio_init): Only call init_console_handler when
- we actually own the console.
- * fhandler_console.cc (fhandler_console::get_tty_stuff): Set tty's hwnd
- to non-zero value.
- * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Semi-reinstate
- handling of console when pgrp is set.
-
-2006-04-21 Pierre Humblet <Pierre.Humblet@ieee.org>
- Corinna Vinschen <corinna@vinschen.de>
-
- * environ.cc (getearly): New function.
- (findenv_func): New function pointer, predefined to getearly.
- (getenv): Call findenv function over the findenv_func pointer.
- (environ_init): Change findenv_func pointer to my_findenv after Cygwin
- environment is initialized.
-
-2006-04-21 Lars Munch <lars@segv.dk>
-
- * include/asm/byteorder.h (__ntohl): Fix the missing uint32_t.
-
-2006-04-21 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::wait): Reorder setting
- WSAError to avoid spurious errors with WSAError set to 0.
-
-2006-04-21 Corinna Vinschen <corinna@vinschen.de>
-
- * include/asm/byteorder.h: Include stdint.h. Per standard, change
- datatypes in ntohX and htonX functions to uintXX_t types.
-
-2006-04-18 Christopher Faylor <cgf@timesys.com>
-
- * exceptions.cc (ctrl_c_handler): Only exit TRUE on CTRL_LOGOFF_EVENT
- when we have actually handled the event.
-
-2006-04-17 Eric Blake <ebb9@byu.net>
-
- * mktemp.cc (_gettemp): Open temp files in binary mode.
-
-2006-04-14 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::readdir): Use UINT32_MAX
- instead of UINT_MAX.
-
-2006-04-14 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (path_conv::hasgood_inode): Make inline.
- Drop remote fs handling entirely since unreliable inode numbers
- are now recognized differently.
- (path_conv::is_samba): Make inline.
- (fhandler_disk_file::opendir): Reformat comment.
- (fhandler_base::fstat_helper): Special case remote file systems
- returning (unreliable) 32 bit inode numbers.
- (fhandler_disk_file::readdir): Ditto.
- * fhandler_netdrive.cc (fhandler_netdrive::readdir): Ditto.
-
-2006-04-13 Christopher Faylor <cgf@timesys.com>
-
- * spawn.cc (spawn_guts): Move ch.set() call back to where it was
- supposed to be.
-
-2006-04-13 Corinna Vinschen <corinna@vinschen.de>
-
- * sysconf.cc (sysconf): Add _SC_THREADS, _SC_THREAD_ATTR_STACKSIZE,
- _SC_THREAD_PRIORITY_SCHEDULING, _SC_THREAD_PROCESS_SHARED,
- _SC_THREAD_SAFE_FUNCTIONS, _SC_TIMERS handling.
-
-2006-04-12 Corinna Vinschen <corinna@vinschen.de>
- Christopher Faylor <cgf@timesys.com>
-
- * spawn.cc (spawn_guts): Revert patch which treated derived cygwin
- programs differently from those which are mounted with -X. Pass extra
- argument to linebuf::fromargv.
- * winf.h (MAXCYGWINCMDLEN): New define.
- (linebuf::finish): Add a new argument denoting when command line
- overflow is ok.
- (linebuf::fromargv): Ditto.
- * winf.cc (linebuf::finish): Implement above change.
- (linebuf::fromargv): Ditto.
-
-2006-04-11 Christopher Faylor <cgf@timesys.com>
-
- * Makefile.in (DLL_OFILES): Add winf.o.
- * spawn.cc: Move command line handling stuff into winf.cc.
- * winf.h: New file.
- * winf.cc: New file.
-
-2006-04-05 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_socket.cc: Move iptypes.h include after winsock2 since it
- now relies on it.
- * net.cc: Ditto.
-
-2006-04-05 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (dll_crt0_0): Move user_data->{resourcelocks,threadinterface}
- initialization here from dll_crt0_1.
- (dll_crt0_1): See above.
-
-2006-04-04 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (fdsock): Raise default SO_RCVBUF/SO_SNDBUF buffer sizes to
- the same values as on Linux.
-
-2006-04-03 Christopher Faylor <cgf@timesys.com>
-
- * child_info.h (CURR_CHILD_INFO_MAGIC): Update.
- (child_info_fork::alloc_stack): Move into this class.
- (child_info_fork::alloc_stack_hard_way): Ditto.
- * dcrt0.cc (child_info_fork::alloc_stack): Ditto.
- (child_info_fork::alloc_stack_hard_way): Ditto.
- (_dll_crt0): Reference alloc_stack via fork_info.
-
-2006-04-03 Corinna Vinschen <corinna@vinschen.de>
-
- * spawn.cc (linebuf::finish): Drop argument. Don't check command line
- length.
- (spawn_guts): Remove wascygexec. Check real_path.iscygexec instead.
- Accommodate change to linebuf::finish.
-
-2006-04-03 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (sm): Delete.
- (alloc_stack_hard_way): Figure out where the stack lives here rather
- than relying on previously filled out information which has been
- invalid since 1.5.19.
-
-2006-03-31 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (FS_IS_SAMBA_WITH_QUOTA): New define.
- (path_conv::hasgood_inode): Recognize Samba with quota support
- compiled in.
- (path_conv::is_samba): Ditto. Fix comment to include Samba version
- numbers for later reference.
-
-2006-03-30 Corinna Vinschen <corinna@vinschen.de>
-
- * security.h (sec_user_nih): Make sid1 argument mandatory.
- (sec_user): Ditto.
-
-2006-03-29 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc (wait_for_sigthread): Use the current user sid when
- setting up the signal pipe rather than relying on (eventually) the
- effective sid.
-
-2006-03-29 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (child_info_fork::handle_fork): Set uid/gid in myself so
- that it can be used by subsequent startup functions.
- (dll_crt0_0): Issue a warning if DuplicateTokenEx fails and DEBUGGING.
- (dll_crt0_1): Move user_data->{resourcelocks,threadinterface}
- initialization here from dll_crt0_0.
- * fork.cc (frok::child): Tell wait_for_sigthread that this is fork.
- (frok::parent): Only initialize start_time once. Tighten time when
- we're "deimpersonated".
- * sigproc.cc (signal_fixup_after_exec): Rework (futiley) sa_buf stuff.
- Add debugging output.
- (wait_for_sigthread): Accept an argument which illustrates whether we
- are forked or not.
- (wait_sig): Avoid using myself pointer.
- * winsup.h ((wait_for_sigthread): Reflect change to argument.
-
-2006-03-26 Christopher Faylor <cgf@timesys.com>
-
- * spawn.cc (spawn_guts): Close handles if we know that we will not be
- seeing a sync event from the child.
-
-2006-03-26 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc (wait_sig): Move myself manipulation...
- (wait_for_sigthread): ...to here.
-
-2006-03-24 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_floppy.cc: Include ntdef.h and ntdll.h.
- (fhandler_dev_floppy::get_drive_info): Rearrange so that now
- NtQueryVolumeInformationFile is called on drives which don't support
- IOCTL_DISK_GET_DRIVE_GEOMETRY.
- * ntdll.h (struct _FILE_FS_SIZE_INFORMATION): Add.
- (enum _FSINFOCLASS): Add missing values.
-
-2006-03-23 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_console.cc (fhandler_console::fixup_after_fork_exec): Make
- error message more explicit.
- * pinfo.cc (_pinfo::commune_request): Don't lock process unless we're
- looking for fifos.
-
-2006-03-23 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (child_info_spawn::handle_spawn): Don't initialize the
- console handler here.
- * dtable.cc (dtable::stdio_init): Initialize console handler here.
-
-2006-03-23 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc (sigalloc): Don't set SA_RESTART here.
- * signal.cc (_SA_NORESTART): New flag.
- (sigaction_worker): New function, derived from sigaction. Don't set
- internal flags unless called internally.
- (sigaction): Use sigaction_worker.
- (signal): Honor new _SA_NORESTART flag.
- (siginterrupt): Set _SA_NORESTART flag appropriately. Use
- sigaction_worker to set flags.
- * include/cygwin/signal.h: Define _SA_INTERNAL_MASK here.
-
-2006-03-22 Corinna Vinschen <corinna@vinschen.de>
-
- * thread.cc (pthread_mutex::is_good_initializer_or_bad_object): Delete.
- (pthread_cond::is_good_initializer_or_bad_object): Delete.
- (pthread_rwlock::is_good_initializer_or_bad_object): Delete.
- (pthread_cond::init): Remove disabled code. Guard assignment to
- object to initialize against access violation.
- (pthread_rwlock::init): Ditto.
- (pthread_mutex::init): Ditto.
-
-2006-03-22 Eric Blake <ebb9@byu.net>
-
- * fhandler.cc (fcntl): Print flags in hex.
-
-2006-03-22 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (dll_crt0_0): Semi-revert 2006-03-14 change which moved
- pinfo_init and uinfo_init here.
- (dll_crt0_1): Ditto.
- (__dll_crt0): Ditto. Don't call update_envptrs here.
- (dll_crt0_1): Ditto. Move wait_for_sigthread call here from dll_crt0_0.
- * environ.cc (environ_init): Call it here instead.
- * sigproc.cc (my_readsig): New static variable.
- (wait_for_sigthread): Set up read pipe here since we are assured that
- we have the proper privileges when this is called.
- (talktome): Eliminate second argument since it is available as a global
- now.
- (wait_sig): Reflect use of my_readsig.
-
-2006-03-22 Corinna Vinschen <corinna@vinschen.de>
-
- * thread.cc (pthread_cond::init): Disable validity test of object
- to initialize since test of uninitialized content is unreliable.
- (pthread_rwlock::init): Ditto.
- (pthread_mutex::init): Ditto.
-
-2006-03-21 Christopher Faylor <cgf@timesys.com>
-
- * signal.cc (signal): Don't set SA_RESTART here.
- (siginterrupt): White space.
- * sigproc.cc (sigalloc): Set SA_RESTART here, on initialization.
-
-2006-03-21 Christopher Faylor <cgf@timesys.com>
-
- * child_info.h (child_status): Fix typo which made it impossible to set
- iscygwin.
- (child_info::isstraced): Booleanize.
- (child_info::iscygwin): Ditto.
- * sigproc.cc (child_info::child_info): Minor cleanup of flag setting.
- * spawn.cc (spawn_guts): Only close_all_files when we know the process
- has started successfully.
-
- * exceptions.cc (init_console_handler): Fix indentation.
-
-2006-03-20 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (dll_crt0_0): Call SetErrorMode earlier.
- * pinfo.cc (_pinfo::dup_proc_pipe): Reset wr_proc_pipe on failure.
- Return previous pipe handle.
- * pinfo.h (_pinfo::dup_proc_pipe): Reflect change to return value.
- * spawn.cc (spawn_guts): Restore previous proc pipe on retry or if
- process exits before synchronization.
-
-2006-03-20 Christopher Faylor <cgf@timesys.com>
-
- * child_info.h (child_status): New enum.
- (child_info::flag): Rename from 'straced'.
- (child_info::isstraced): New function.
- (child_info::iscygwin): Ditto.
- (child_info_fork::handle_fork): Reparmize.
- (child_info_fork::handle_failure): Ditto.
- (child_info_spawn::handle_spawn): New function.
- * dcrt0.cc (get_cygwin_startup_info): Use isstraced method.
- (child_info_spawn::handle_spawn): Define new function from code
- previously in dll_crt0_0.
- (dll_crt0_0): Move spawn stuff into handle_spawn. Only call
- init_console_handler for fork case.
- * sigproc.cc (child_info::child_info): Set flag appropriately.
- (child_info::proc_retry): Treat exit code as "funny" if it's a cygwin
- process.
- * spawn.cc (spawn_guts): Remove commented out flag setting.
-
-2006-03-19 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (commune_process): Fix randomly invalid pointer which caused
- fifos to work incorrectly.
-
-2006-03-19 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (dll_crt0_0): Oops. We need to bother with setting
- init_console_handler in the fork/exec case.
-
-2006-03-19 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (dll_crt0_0): Don't bother with setting init_console_handler
- here since it will be set later when we discover if we have a ctty or
- not.
- * exceptions.cc (init_console_handler): Properly remove NULL handler.
-
-2006-03-18 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.h (EXITCODE_OK): Define new constant.
- * sigproc.cc (child_info::sync): Return EXITCODE_OK if entering with
- exit_code == 0.
- (sig_send): Don't complain if sending signals while blocked if the
- sender isn't in the main thread.
-
-2006-03-18 Christopher Faylor <cgf@timesys.com>
-
- * child_info.h (CURR_CHILD_INFO_MAGIC): Regenerate.
- (child_info::retry): Move here from fork subclass.
- (child_info::exit_code): New field.
- (child_info::retry_count): Max retry count for process start.
- (child_info::proc_retry): Declare new function.
- (child_info_fork::retry): Move to parent.
- (child_info_fork::fork_retry): Ditto.
- * dcrt0.cc (child_info::fork_retry): Rename and move.
- (child_info_fork::handle_failure): Move.
- (dll_crt0_0): Initialize console handler based on whether we have a
- controlling tty or not. Avoid nonsensical check for fork where it can
- never occur.
- * environ.cc (set_proc_retry): Rename from set_fork_retry. Set
- retry_count in child_info.
- (parse_thing): Reflect above change.
- * exceptions.cc (dummy_ctrl_c_handler): Remove unused variable name.
- (ctrl_c_handler): Always return TRUE for the annoying
- CTRL_LOGOFF_EVENT.
- * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Remove call to
- init_console_handler.
- * fhandler_tty.cc (fhandler_tty_slave::open): Just call
- mange_console_count here and let it decide what to do with initializing
- console control handling.
- * fork.cc (fork_retry): Remove definition.
- (frok::parent): Define static errbuf and use in error messages (not
- thread safe yet). Close pi.hThread as soon as possible. Protect
- pi.hProcess as soon as possible. Don't set retry_count. That happens
- automatically in the constructor now. Accommodate name change from
- fork_retry to proc_retry.
- * init.cc (dll_entry): Turn off ctrl-c handling early until we know how
- it is supposed to be handled.
- * pinfo.cc (_pinfo::dup_proc_pipe): Remember original proc pipe value
- for failure error message. Tweak debug message slightly.
- * sigproc.cc (child_info::retry_count): Define.
- (child_info::child_info): Initialize retry count.
- (child_info::sync): Set exit code if process dies before
- synchronization.
- (child_info::proc_retry): Rename from child_info_fork::fork_retry. Use
- previously derived exit code. Be more defensive about what is
- classified as an error exit.
- (child_info_fork::handle_failure): Move here from dcrt0.cc.
- * spawn.cc (spawn_guts): Maintain error mode when starting new process
- to avoid annoying pop ups. Move deimpersonate call within new loop.
- Move envblock freeing to end. Loop if process dies prematurely with
- bad exit code.
- * syscalls.cc (setpgid): Remove hopefully unneeded call to
- init_console_handler.
-
-2006-03-15 Christopher Faylor <cgf@timesys.com>
-
- * cygheap.cc (init_cygheap::manage_console_count): Turn console control
- handler on/off depending on whether we have allocated a console or not.
- * dcrt0.cc (child_info_fork::fork_retry): Add more potential retry
- statuses.
- (dll_crt0_0): Turn on/off console control depending on whether we have
- a controlling tty or not.
- * exceptions.cc (init_console_handler): Change BOOL to bool.
- * fhandler_console.cc (fhandler_console::need_invisible): Cosmetic
- change.
- * winsup.h (init_console_handler): Reflect argument type change.
-
- * wincap.h (supports_setconsolectrlhandler_null): Remove duplicate
- capability throughout.
- * wincap.cc: Ditto.
-
-2006-03-14 Christopher Faylor <cgf@timesys.com>
-
- * child_info.h (child_info_fork::fork_retry): Declare new function.
- * dcrt0.cc (child_info_fork::fork_retry): Define new function.
- * fork.cc (frok::parent): Move retry decision into
- child_info_fork::fork_retry and honor what it tells us to do.
- * sigproc.cc (sig_send): Unhold signals on __SIGEXIT.
-
-2006-03-14 Christopher Faylor <cgf@timesys.com>
-
- * fork.cc (frok::parent): Improve error message.
-
-2006-03-14 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (main_environ): Initialize to &__cygwin_environment.
- (dll_crt0_1): Move resourcelocks, thread interface, pinfo_init, and
- uinfo_init...
- (dll_crt0_0): ...to here.
- (_dll_crt0): Call update_envptrs here after setting main_environ.
- * environ.cc (environ_init): Eliminate initted variable. Don't call
- update_envptrs here.
- * sigproc.cc (wait_sig): Use my_sendsig when calling CreatePipe to
- avoid a dereference.
-
-2006-03-13 Christopher Faylor <cgf@timesys.com>
-
- * child_info.h (child_info_fork::handle_failure): Declare new function.
- (child_info_fork::retry): New field.
- * dcrt0.cc (__api_fatal_exit_val): Define.
- (child_info_fork::handle_failure): Define new function.
- (__api_fatal): Exit using __api_fatal_exit_val value.
- * environ.cc (set_fork_retry): Set fork_retry based on CYGWIN
- environment variable.
- (parse_thing): Add "fork_retry" setting.
- * fork.cc (fork_retry): Define.
- (frok::parent): Reorganize to allow retry of failed child creation if
- child signalled that it was ok to do so.
- * heap.cc (heap_init): Signal parent via handle_failure when
- VirtualAlloc fails.
- * pinfo.h (EXITCODE_RETRY): Declare.
- * sigproc.cc (child_info::sync): Properly exit with failure condition
- if called for fork and didn't see subproc_ready.
- * spawn.cc (spawn_guts): Use windows pid as first argument.
- * winsup.h: Remove obsolete NEW_MACRO_VARARGS define.
- (__api_fatal_exit_val): Declare.
- (set_api_fatal_return): Define.
- (in_dllentry): Declare.
- * exceptions.cc (inside_kernel): Remove unneeded in_dllentry
- declaration.
-
-2006-03-13 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (dll_crt0_0): Reorganize so that sigproc_init is called a
- little later. Add a comment.
- * fork.cc (resume_child): Make void.
- (frok::parent): Only zero pi when necessary. Explicitly zero si. Set
- this_errno when child_copy fails. Accommodate change to resume_child.
- * sigproc.cc (sigalloc): Move global_sigs initialization here.
- (sigproc_init): Move global_sigs.
- (sig_send): Just check for flush signals once.
-
- * wincap.h: Define supports_setconsolectrlhandler_null throughout.
- * wincap.cc: Ditto.
-
-2006-03-13 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (LoadDLLfuncNt): New define to wrap NT native functions.
- Use for NT native functions throughout.
- * dtable.cc (handle_to_fn): Treat return value of NtQueryObject as
- NTSTATUS value.
-
-2006-03-12 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.cc (_cygtls::remove): Reset initialized flag right away if we
- were previously initialized.
- * cygtls.h (_cygtls::initialized): Move nearer to the end to catch
- situation when Windows 98 mysteriously changes parts of _my_tls when
- thread is detaching.
- * gendef (__sigfe_maybe): Simplify slightly.
- * tlsoffsets.h: Regenerate.
-
-2006-03-12 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.h (CYGTLS_INITIALIZED): Change to a little more unlikely value.
- (CYGTLSMAGIC): Delete.
- * dcrt0.cc (dll_crt0_0): Call sigproc_init during init startup.
- (_dll_crt0): Don't worry about sync_startup. Just wait for sigthread here.
- * dll_init.cc (cygwin_detach_dll): Only pick up tls version of retaddr
- if we have a valid tls.
- * fork.cc (frok::child): Remove sigproc_init initialization since it
- happens much earlier now.
- * gendef: Recognize SIGFE_MAYBE.
- (fefunc): Generate calls to _sigfe_maybe, if appropriate.
- (_sigfe_maybe): New function.
- * init.cc (search_for): Always initialize search_for, even on fork.
- (calibration_thread): Delete.
- (calibration_id): Delete.
- (prime_threads): Delete.
- (munge_threadfunc): Remove calibration_thread special case. Avoid
- calling thread function if we haven't yet hit the "search_for" thread.
- (dll_entry): Remove prime_threads call. Only call munge_threadfunc
- when hwait_sig is active. Ditto. for _my_tls.remove ();
- * sigproc.cc (hwait_sig): Make global.
- (sigproc_init): Don't bother with sync_startup.
- (sig_send): Treat flush as a no-op when signals are held.
- (wait_sig): Cause signals to be held after fork.
-
-2006-03-09 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (rename): Move existance check for oldpath further up
- to the start of the function. Avoid another case of a name collision
- if oldpath is a shortcut and a file or directory newpath already exists.
-
-2006-03-09 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (NtClose): Define.
- (NtOpenDirectoryObject): Define.
- (NtQueryDirectoryObject): Define.
- * fhandler_proc.cc: Include ctype.h and wchar.h.
- (format_proc_partitions): Revamp loop over existing harddisks by
- scanning the NT native \Device object directory and looking for
- Harddisk entries.
- * ntdll.h: Rearrange system call declarations alphabetically.
- (DIRECTORY_QUERY): Define.
- (struct _DIRECTORY_BASIC_INFORMATION): Define.
- (NtOpenDirectoryObject): Declare.
- (NtQueryDirectoryObject): Declare.
-
-2006-03-08 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.h (_cygtls::retaddr): New method.
- * dll_init.cc (cygwin_detach_dll): Use new tls method to find return
- address since this function is now signal guarded.
- (update_envptrs): Remove unneeded braces.
- * syscalls.cc (statvfs): Coerce full_path to avoid a gcc warning.
-
-2006-03-08 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (statvfs): Simplify path name expression.
-
-2006-03-08 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc: Include winioctl.h.
- (statvfs): Request correct volume size using DeviceIoControl if
- quotas are enforced on the file system.
-
-2006-03-03 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc (opendir): Fix indentation.
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Move storing
- fhandler in file descriptor table to some point very late in function
- to avoid double free'ing. Add comment to explain what happens.
- Add label free_mounts and don't forget to delete __DIR_mounts structure
- if NtOpenFile fails.
-
-2006-03-02 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (chroot): Disallow chroot into special directories.
- Return EPERM instead.
-
-2006-03-02 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (__DIR_mounts::check_missing_mount): Check
- cygdrive string length for those who have cygdrive mapped to "/".
-
-2006-03-01 Corinna Vinschen <corinna@vinschen.de>
-
- * sec_helper.cc (set_cygwin_privileges): Request SE_BACKUP_NAME
- privileges.
-
-2006-03-01 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_proc.cc (fhandler_proc::fstat): Always return fixed link
- count of 1 for /proc directory instead of incorrect PROC_LINK_COUNT.
-
-2006-03-01 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (enum dirent_states): Remove dirent_saw_cygdrive,
- dirent_saw_dev and dirent_saw_proc.
- (fhandler_cygdrive::open): Declare.
- (fhandler_cygdrive::close): Declare.
- * fhandler_disk_file.cc (class __DIR_mounts): Move to beginning of file.
- (__DIR_mounts::check_mount): New parameter to indicate if inode number
- is needed in calling function or not. Add /proc and /cygdrive handling.
- (__DIR_mounts::check_missing_mount): Ditto.
- (path_conv::ndisk_links): Use __DIR_mounts class to create correct
- hardlink count for directories with mount points in them.
- (fhandler_disk_file::readdir_helper): Remove /dev, /proc and /cygdrive
- handling.
- (fhandler_cygdrive::open): New method.
- (fhandler_cygdrive::close): New method.
- (fhandler_cygdrive::fstat): Always return fixed inode number 2 and
- fixed link count of 1. Drop call to set_drives.
- (fhandler_cygdrive::opendir): Drop call to get_namehash.
- (fhandler_cygdrive::readdir): Handle "." entry to return fixed inode
- number 2.
-
-2006-03-01 Christopher Faylor <cgf@timesys.com>
-
- * cygwin.din: Fix some erroneous SIGFE/NOSIGFE settings.
-
-2006-03-01 Christopher Faylor <cgf@timesys.com>
-
- * cygthread.cc (cygthread::callfunc): Revert below change. Make ev a
- manual reset event again. so that it will be reset by WaitFor*Object
- as appropriate.
- (cygthread::stub): Ditto.
- (cygthread::terminate_thread): Reset ev if it was found to have been
- set.
-
-2006-03-01 Christopher Faylor <cgf@timesys.com>
-
- * analyze_sigfe: New script.
- * dllfixdbg: Add copyright.
- * gendef: Ditto.
- * gendevices: Ditto.
- * gentls_offsets: Ditto.
-
-2006-03-01 Christopher Faylor <cgf@timesys.com>
-
- * cygthread.cc (cygthread::callfunc): Create ev as an auto-reset event
- so that it will be reset by WaitFor*Object as appropriate.
- (cygthread::stub): Ditto.
- (cygthread::terminate_thread): Remove forced setting of thread
- termination.
-
-2006-03-01 Corinna Vinschen <corinna@vinschen.de>
-
- * include/sys/dirent.h (struct __DIR): Rename __d_unused to
- __d_internal.
- * fhandler_disk_file.cc (struct __DIR_cache): Remove useless "typedef".
- (d_dirname): Remove useless "struct".
- (d_cachepos): Ditto.
- (d_cache): Ditto.
- (class __DIR_mounts): New class, implementing mount point tracking
- for readdir.
- (d_mounts): New macro for easy access to __DIR_mounts structure.
- (fhandler_disk_file::opendir): Allocate __DIR_mounts structure and
- let __d_internal element of dir point to it.
- (fhandler_disk_file::readdir_helper): Add mount points in the current
- directory, which don't have a real directory backing them.
- Don't generate an inode number for /dev. Add comment, why.
- (fhandler_disk_file::readdir): Move filling fname to an earlier point.
- Check if current entry is a mount point and evaluate correct inode
- number for it.
- (fhandler_disk_file::readdir_9x): Ditto.
- (fhandler_disk_file::rewinddir): Set all mount points in this directory
- to "not found" so that they are listed again after calling rewinddir().
- (fhandler_disk_file::closedir): Deallocate __DIR_mounts structure.
- * path.cc (mount_info::get_mounts_here): New method to evaluate a list
- of mount points in a given parent directory.
- * shared_info.h (class mount_info): Declare get_mounts_here.
-
-2006-02-28 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Use iscygdrive
- instead of isspecial.
- * path.h (path_conv::iscygdrive): New method.
-
-2006-02-28 Christopher Faylor <cgf@timesys.com>
-
- * exceptions.cc (_cygtls::interrupt_now): Remove "inside cygwin" check
- since some cygwin functions are meant to be interrupted.
-
-2006-02-28 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Export __isinff, __isinfd, __isnanf, __isnand.
- * include/cygwin/version.h: Bump API minor number to 155.
-
-2006-02-28 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc (readdir_worker): Use slash as path separator when evaluating
- namehash for paths below /proc.
- * fhandler_netdrive.cc (fhandler_netdrive::readdir): Use expensive
- inode number evaluation on share names.
-
-2006-02-27 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Only set
- d_cachepos under NT or suffer memory corruption.
- (fhandler_disk_file::readdir_helper): Avoid else with a return. Just
- calculate extension location once when doing symlink checks.
- (fhandler_disk_file::readdir): Make debug output more useful.
- (fhandler_disk_file::readdir_9x): Ditto. Eliminate redundant variable.
-
-2006-02-27 Christopher Faylor <cgf@timesys.com>
-
- * include/sys/termios.h (cfsetispeed): Just define as a function rather
- than resorting to a macro.
- (cfsetospeed): Ditto.
-
-2006-02-27 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc: Fix a comment.
-
-2006-02-27 Christopher Faylor <cgf@timesys.com>
-
- * cygthread.cc (cygthread::release): Add a comment.
-
-2006-02-27 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_netdrive.cc (fhandler_netdrive::fstat): Create unambiguous
- inode number.
- (fhandler_netdrive::readdir): Ditto.
-
-2006-02-24 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc (sigheld): Define new variable.
- (sig_dispatch_pending): Don't check sigq since that's racy.
- (sig_send): Set sigheld flag if __SIGHOLD is specified, reset it if
- __SIGNOHOLD is specified. Ignore flush signals if we're holding
- signals.
-
-2006-02-23 Christopher Faylor <cgf@timesys.com>
-
- * cygwin.din (_exit): Use signal front end.
- (exit): Ditto.
-
-2006-02-23 Christopher Faylor <cgf@timesys.com>
-
- * winsup.h (cygwin_hmodule): Declare.
- * exceptions.cc (inside_kernel): Reverse return values to reflect
- function name. Return true if we're in cygwin1.dll or if we're
- executing in dll_entry.
- (_cygtls::interrupt_now): Reflect reversal of inside_kernel return
- value.
- * hookapi.cc (cygwin_hmodule): Remove declaration.
- * init.cc (dll_entry): Use in_dllentry global to record that we are
- executing in dllentry.
-
-2006-02-22 Corinna Vinschen <corinna@vinschen.de>
-
- * exceptions.cc (_cygtls::interrupt_now): Reorder conditional
- to call inside_kernel only if this isn't locked.
-
-2006-02-22 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Add FILE_READ_ATTRIBUTES to
- access flags in case of query_read_control case, add FILE_READ_DATA
- in case of query_stat_control.
-
-2006-02-20 Christopher Faylor <cgf@timesys.com>
-
- * spawn.cc (av::fixup): Check for .bat and friends specifically now
- since these extensions are no longer automatically detected.
-
-2006-02-19 Christopher Faylor <cgf@timesys.com>
-
- * exceptions.cc (stackdump): Avoid dumping more than once.
-
-2006-02-19 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Use NtOpenFile
- to open the directory.
- (fhandler_disk_file::readdir): Use NT_SUCCESS to determine if status
- represents success.
-
-2006-02-19 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Drop generating
- path_conv for root.
-
-2006-02-18 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (FS_IS_SAMBA): Move out of
- path_conv::hasgood_inode.
- (path_conv::is_samba): New method.
- (fhandler_base::fstat_by_handle): Don't even try to use
- FileIdBothDirectoryInformation on Samba.
- * path.h (class path_conv): Declare is_samba method.
-
-2006-02-17 Christopher Faylor <cgf@timesys.com>
-
- * path.cc (conv_path_list): Eat empty paths when converting to POSIX.
- (cygwin_conv_to_win32_path): Deal with Cygwin's necessity of adding a
- '/' to the end of a path ending in '.'.
-
-2006-02-16 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Export sigignore and sigset.
- * exceptions.cc (sigset): New function.
- (sigignore): New function.
- * include/cygwin/signal.h (SIG_HOLD): Define.
- (sigignore): Declare.
- (sigset): Declare.
- * include/cygwin/version.h: Bump API minor number to 154.
-
-2006-02-13 Igor Peshansky <pechtcha@cs.nyu.edu>
-
- * include/mntent.h: Add missing #include.
-
-2006-02-13 Igor Peshansky <pechtcha@cs.nyu.edu>
-
- * gentls_offsets: Fix typo in error message.
-
-2006-02-10 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_process.cc (format_process_stat): Use cygwin-derived start
- time even on NT since it is the logical start time of the "process".
- * pinfo.cc (set_myself): Don't set start time when it should have
- already been set previously.
-
-2006-02-10 Brian Ford <Brian.Ford@FlightSafety.com>
-
- * times.cc (clock_getres): Use correct conversion from milliseconds to
- seconds/nanoseconds.
- (clock_setres): Use correct conversion to nanoseconds.
-
-2006-02-10 Christopher Faylor <cgf@timesys.com>
-
- * external.cc (sync_winenv): Rename from "setup_winenv". Use same
- mechanism as spawn to determine environment variables which should be
- converted back to windows form.
- (cygwin_internal): Reflect setup_winenv -> sync_winenv name change.
- * include/sys/cygwin.h: Ditto.
-
-2006-02-09 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Only set
- the dirent_get_d_ino flag on filesystems having useful File IDs.
- Add comment explaining why.
-
-2006-02-07 Corinna Vinschen <corinna@vinschen.de>
-
- * dtable.cc (handle_to_fn): Accommodate new argument order in call to
- sys_wcstombs.
- * fhandler_disk_file.cc (fhandler_disk_file::readdir): Call sys_wcstombs
- instead of just wcstombs to accommodate OEM codepages.
- * miscfuncs.cc (sys_wcstombs): Split len argument in source and target
- length. Always 0-terminate result in target string.
- * security.cc (lsa2wchar): Remove unused function.
- (lsa2str): Ditto.
- (get_lsa_srv_inf): Ditto.
- (get_logon_server): Accommodate new argument order in call to
- sys_wcstombs.
- (get_user_groups): Ditto.
- (get_user_local_groups): Ditto.
- (get_priv_list): Call sys_wcstombs directly instead of lsa2str.
- * uinfo.cc (cygheap_user::ontherange): Accommodate new argument order
- in call to sys_wcstombs.
- * winsup.h (sys_wcstombs): Change prototype to match new argument order.
-
-2006-02-07 Corinna Vinschen <corinna@vinschen.de>
-
- * init.cc (respawn_wow64_process): Exit with the exit code returned
- by the respawned process.
-
-2006-02-06 Christopher Faylor <cgf@timesys.com>
-
- Always zero all elements of siginfo_t throughout.
- * cygtls.h (_cygtls::thread_context): Declare new field.
- (_cygtls::thread_id): Ditto.
- (_cygtls::signal_exit): Move into this class.
- (_cygtls::copy_context): Declare new function.
- (_cygtls::signal_debugger): Ditto.
- * cygtls.cc (_cygtls::init_thread): Fill out thread id field.
- * exceptions.cc (exception): Change message when exception info is
- unknown. Copy context to thread local storage.
- (_cygtls::handle_exceptions): Avoid double test for fault_guarded.
- Reflect move of signal_exit to _cygtls class.
- (sigpacket::process): Copy context to thread local storage.
- (_cygtls::signal_exit): Move to _cygtls class. Call signal_debugger to
- notify debugger of exiting signal (WIP). Call stackdump here (WIP).
- (_cygtls::copy_context): Define new function.
- (_cygtls::signal_debugger): Ditto.
- * tlsoffsets.h: Regenerate.
- * include/cygwin.h (_fpstate): New internal structure.
- (ucontext): Declare new structure (WIP).
- (__COPY_CONTEXT_SIZE): New define.
-
- * exceptions.cc (_cygtls::interrupt_setup): Clear "threadkill" field
- when there is no sigwaiting thread.
- (setup_handler): Move event handling into interrupt_setup.
-
-2006-02-06 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::connect): Fix formatting.
- (fhandler_socket::wait): Handle SA_RESTART when signal arrives.
-
-2006-02-06 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/socket.h (CMSG_FIRSTHDR): Avoid compiler warning.
-
-2006-02-05 Corinna Vinschen <corinna@vinschen.de>
-
- * include/features.h: Add comment to explain what's going to happen
- here at one point.
- * include/sys/stdio.h: Guard getline and getdelim prototypes with
- _GNU_SOURCE to avoid collision with old-style declarations.
-
-2006-02-05 Corinna Vinschen <corinna@vinschen.de>
-
- * environ.cc (struct parse_thing): Add transparent_exe option.
- * fhandler_disk_file.cc (fhandler_disk_file::link): Accommodate
- transparent_exe option. Add .exe suffix for links to executable files,
- if transparent_exe is set.
- * fhandler_process.cc (fhandler_process::fill_filebuf): Remove .exe
- suffix if transparent_exe option is set.
- * path.cc (symlink_worker): Accommodate transparent_exe option.
- (realpath): Don't tack on .exe suffix if transparent_exe is set.
- * syscalls.cc (transparent_exe): New global variable.
- (unlink): Accommodate transparent_exe option.
- (open): Ditto.
- (link): Ditto.
- (rename): Ditto. Maybe add .exe suffix when renaming executable files.
- (pathconf): Accommodate transparent_exe option.
- * winsup.h: Declare transparent_exe.
-
-2006-02-05 Christopher Faylor <cgf@timesys.com>
- Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::readdir_9x): Remove
- useless code.
-
-2006-02-05 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::rewinddir): Remove label
- "out". Move test for NULL __handle ...
- (fhandler_disk_file::rewinddir_9x): ... here.
-
-2006-02-05 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc (rewinddir): Keep dirent_get_d_ino and dirent_set_d_ino flags.
-
-2006-02-05 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_disk_file.cc (fhandler_disk_file::readdir): Don't close dir
- handle when we hit EOF since rewwindir may reactivate it.
- (fhandler_disk_file::readdir_9x): Eliminate superfluous temporary
- variable.
- (fhandler_disk_file::closedir): Return EBADF when trying to close
- unopened DIR. Reorganize slightly. Return actual derived error value
- rather than always returning 0.
-
-2006-02-04 Christopher Faylor <cgf@timesys.com>
-
- * dir.cc (rmdir): Reorganize check for trailing dot to return correct
- error when directory does not exist.
-
-2006-02-03 Christopher Faylor <cgf@timesys.com>
-
- * dir.cc (mkdir): Reorganize check for trailing dot to return correct
- error when directory exists.
- * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Remove special
- test for path ending in '.'.
-
-2006-02-03 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (suffix_scan::lnk_match): Return true beginning with
- SCAN_APPENDLNK.
- (suffix_scan::next): Rearrange code to make .lnk append order slightly
- more deterministic.
- * spawn.cc (exe_suffixes): Try no suffix before .exe suffix to align
- evaluation with stat_suffixes.
- (dll_suffixes): Ditto.
-
-2006-02-02 Christopher Faylor <cgf@timesys.com>
-
- * cygwin/version.h: Mention CW_SETUP_WINENV in comment for API minor
- 153.
-
-2006-02-02 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din (updwtmpx): Export.
- * syscalls.cc (updwtmpx): New function.
- * include/utmpx.h (updwtmpx): Declare.
- * include/cygwin/version.h: Bump API minor number to 153.
-
-2006-02-02 Christopher Faylor <cgf@timesys.com>
-
- * external.cc (setup_winenv): New function.
- (cygwin_internal): Implement CW_SETUP_WINENV.
- * sys/cygwin.h (cygwin_getinfo_types): Define CW_SETUP_WINENV.
-
-2006-02-02 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (is_group_member): Fix comment.
-
-2006-02-02 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (is_group_member): Use local group info type 1. Test
- group for being a global group or a well-known SID before adding it
- to the group list. Add comment.
-
-2006-02-01 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (GetTcpTable): Define.
- * fhandler_socket.cc (address_in_use): New function to check if
- sockaddr_in address is already in use.
- (fhandler_socket::bind): Check if address is alreay in use in case of
- SO_REUSEADDR, to circumvent WinSock non-standard behaviour.
-
-2006-02-01 Corinna Vinschen <corinna@vinschen.de>
-
- * spawn.cc (dll_suffixes): Add .exe and "no suffix" to the list.
-
-2006-01-31 Corinna Vinschen <corinna@vinschen.de>
-
- * dlfcn.cc (check_path_access): Call find_exec with FE_DLL option.
- * path.h (enum fe_types): Add FE_DLL value.
- * spawn.cc (std_suffixes): Remove.
- (exe_suffixes): New suffix_info for executing files.
- (dll_suffixes): New suffix_info for searching shared libraries.
- (perhaps_suffix): Add opt argument. Use dll_suffixes if FE_DLL
- option is given, exe_suffixes otherwise.
- (find_exec): Propagate opt argument to perhaps_suffix. Drop suffix
- check when testing execute permission.
- (spawn_guts): Call perhaps_suffix with FE_NADA opt argument.
-
-2006-01-31 Christopher Faylor <cgf@timesys.com>
-
- * spawn.cc (av::fixup): Remove unused argument.
- (spawn_guts): Remove capitalization in debugging.
-
-2006-01-31 Corinna Vinschen <corinna@vinschen.de>
-
- * spawn.cc (find_exec): Only return files with execute permission set
- if ntsec is on. Don't check execute permission of Windows batch files.
- (av::fixup): Handle empty files gracefully. Drop execute permission
- test here.
- * path.cc (suffix_scan::next): Don't skip any suffix on first run.
-
-2006-01-31 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (cwdstuff::set): Don't set win32 error, only POSIX errno.
-
-2006-01-31 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (cwdstuff::set): When SetCurrentDirectory returns
- ERROR_INVALID_FUNCTION, bend it over to ERROR_FILE_NOT_FOUND. Add
- comment to explain why.
-
-2006-01-31 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc (readdir_worker): Add comment about writing old 32 bit d_ino.
- * include/cygwin/version.h: Bump API minor number to 152.
- (CYGWIN_VERSION_CHECK_FOR_NEEDS_D_INO): Remove.
-
-2006-01-30 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::rewinddir): Simplify
- conditional.
-
-2006-01-30 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (d_cachepos): Rename from d_pos to distinct
- clearly from __d_position. Change throughout.
- (fhandler_disk_file::rewinddir): Reset readdir cache on NT.
-
-2006-01-29 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (readdir_get_ino): Don't follow symlinks.
-
-2006-01-29 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_socket): Add saw_reuseaddr status flag.
- * fhandler_socket.cc (fhandler_socket::bind): Set socket to
- SO_EXCLUSIVEADDRUSE if application didn't explicitely set SO_REUSEADDR
- socket option, on systems supporting SO_EXCLUSIVEADDRUSE.
- * net.cc (cygwin_setsockopt): Set fhandler's saw_reuseaddr status flag
- if SO_REUSEADDR socket option has been successsfully set.
- * wincap.h (wincaps::has_exclusiveaddruse): New element.
- * wincap.cc: Implement above element throughout.
-
-2006-01-28 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::mkdir): In case or error,
- check for existance explicitely and set errno to EEXIST.
-
-2006-01-28 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (DIR_NUM_ENTRIES): New define determining
- minimum number of dir entries which fit into the readdir cache.
- (DIR_BUF_SIZE): Define globally as size of readdir cache.
- (struct __DIR_cache): New structure used for readdir caching on NT.
- (d_dirname): Accessor for struct __DIR_cache, use throughout.
- (d_pos): Ditto.
- (d_cache): Ditto.
- (fhandler_disk_file::opendir): Allocate __d_dirname to contain readdir
- cache on NT.
- (fhandler_disk_file::readdir): Use buf as pointer into readdir cache.
- Implement readdir caching.
-
-2006-01-28 Corinna Vinschen <corinna@vinschen.de>
-
- * include/sys/dirent.h (struct dirent): Revert misguided attempt to
- rename __d_unused1 to __d_fd.
-
-2006-01-27 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (NtQueryDirectoryFile): Define.
- * dir.cc (__opendir_with_d_ino): Just call opendir.
- (opendir): Remove CYGWIN_VERSION_CHECK_FOR_NEEDS_D_INO handling.
- (readdir_worker): Only try generating d_ino if it's 0.
- Utilize namehash of directories fhandler. Call readdir_get_ino to
- generate d_ino for "..".
- (seekdir64): Keep dirent_set_d_ino flag.
- * fhandler.h (enum dirent_states): Add dirent_get_d_ino.
- (class fhandler_disk_file): Declare new private methods readdir_helper
- and readdir_9x.
- * fhandler_disk_file.cc (path_conv::hasgood_inode): New method to
- evaluate if a filesystem has reliable inode numbers.
- (fhandler_base::fstat_by_handle): Accommodate structure member name
- change from IndexNumber to FileId.
- (fhandler_base::fstat_helper): Call hasgood_inode here.
- (fhandler_disk_file::opendir): Call fhaccess only for real files.
- Don't append '*' to __d_dirname here, move to readdir_9x. On NT,
- open directory handle here. Set dirent_get_d_ino and dirent_set_d_ino
- flags according to wincap and filesystem.
- (fhandler_disk_file::readdir_helper): New method to implement readdir
- postprocessing only once.
- (readdir_get_ino_by_handle): New static function.
- (readdir_get_ino): New function to centralize inode number evaluation
- in case inode number hasn't been returned by NtQueryDirectoryFile.
- (fhandler_disk_file::readdir): Move old functionality to readdir_9x.
- Call readdir_9x when on 9x/Me. Implement NT specific readdir here.
- (fhandler_disk_file::readdir_9x): Move 9x specific readdir here.
- (fhandler_disk_file::seekdir): Accommodate new NT readdir method.
- (fhandler_disk_file::closedir): Ditto.
- (fhandler_cygdrive::fstat): Set d_ino to namehash. Add comment.
- (fhandler_cygdrive::opendir): Call get_namehash to prepare later
- correct evaluation of d_ino.
- (fhandler_cygdrive::readdir): Replace recursion with loop. Evaluate
- drive's d_ino by calling readdir_get_ino.
- * fhandler_proc.cc (fhandler_proc::readdir): Set dirent_saw_dot and
- dirent_saw_dot_dot to avoid seeing . and .. entries twice.
- * fhandler_process.cc (fhandler_process::readdir): Ditto.
- * fhandler_registry.cc (fhandler_registry::readdir): Ditto.
- * ntdll.h (STATUS_INVALID_PARAMETER): New define.
- (STATUS_INVALID_LEVEL): New define.
- (struct _FILE_INTERNAL_INFORMATION): Rename member IndexNumber to
- FileId (as in Nebbitt).
- * path.h (path_conv::hasgood_inode): Now implemented in
- fhandler_disk_file.cc.
- * wincap.h (wincaps::has_fileid_dirinfo): New element.
- * wincap.cc: Implement above element throughout.
- * winsup.h (readdir_get_ino): Add declaration.
- * include/sys/dirent.h (struct dirent): Slightly rename structure
- members to accommodate changes.
- Remove __USE_EXPENSIVE_CYGWIN_D_INO handling and declaration of
- __opendir_with_d_ino.
-
-2006-01-27 Christopher Faylor <cgf@timesys.com>
-
- * spawn.cc (spawn_guts): Fix potential handle leak when failing exec.
-
-2006-01-27 Christopher Faylor <cgf@timesys.com>
-
- * exceptions.cc (inside_kernel): Fix to return true if we can't get the
- name of the DLL for the given memory block since we are not in kernel
- code.
-
-2006-01-26 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Fix bug in argument order to
- InitializeObjectAttributes call.
-
-2006-01-25 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix test for
- dirent_isroot to use the correct boolean operator.
-
-2006-01-25 Christopher Faylor <cgf@timesys.com>
-
- * ntdll.h: (temporarily?) Add more functions for querying directory.
-
-2006-01-24 Christopher Faylor <cgf@timesys.com>
-
- * dir.cc (readdir_worker): Turn off expensive inode calculation.
-
-2006-01-24 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_process.cc (fhandler_process::fill_filebuf): Disable
- stripping the .exe suffix from the link target in PROCESS_EXE and
- PROCESS_EXENAME case.
- * path.cc (realpath): Tack on .exe suffix if necessary.
-
-2006-01-24 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_base::fstat_helper): Try harder
- to determine remote file systems with reliable inode numbers. Add
- longish comment.
-
-2006-01-23 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Reset
- inheritance for duplicated socket.
-
-2006-01-20 Christopher Faylor <cgf@timesys.com>
-
- * include/cygwin/version.h: Bump API minor number to 151.
- * dir.cc (__opendir_with_d_ino): New function.
- (opendir): Set flag if we should be calculating inodes.
- (readdir_worker): Calculate d_ino by calling stat if the user has asked
- for it.
- (seekdir64): Maintain all persistent flag settings.
- * fhandler.h (dirent_states): Add dirent_set_d_ino.
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Reflect changes
- to dirent structure.
- * fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
- * include/sys/dirent.h (struct dirent): Coalesce two similar
- structures. Remove all shreds of the apparently highly confusing
- references to inodes. Add support for calculating a real inode if
- __USE_EXPENSIVE_CYGWIN_D_INO is defined.
-
-2006-01-20 Christopher Faylor <cgf@timesys.com>
-
- * include/sys/dirent.h: Add comments for people who are REALLY confused
- about whether they should be using something called __invalid_d_ino or
- not.
-
-2006-01-20 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::prepare): Fix debug output.
- (fhandler_socket::release): Add debug output for WSAEventSelect failure.
- (fhandler_socket::ioctl): Always cancel WSAEventSelect before switching
- to blocking mode. Only set nonblocking flag if ioctlsocket call
- succeeded. Only print new socket state if ioctlsocket call succeeded.
-
-2006-01-19 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Check posix path
- for root rather than windows path.
-
-2006-01-19 Christopher Faylor <cgf@timesys.com>
-
- * dir.cc (readdir_worker): Fill in invalid fields with -1. Accommodate
- name change from __ino32 to __invalid_ino32.
- * include/sys/dirent.h (__invalid_ino32): Rename from __ino32. Don't
- define unused d_type macros.
-
-2006-01-18 Christopher Faylor <cgf@timesys.com>
-
- * heap.cc (heap_init): Remove Sleep.
-
-2006-01-18 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (rresvport): Remove extern declaration.
-
-2006-01-18 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (rresvport): Remove.
- * net.cc (last_used_rrecvport): New global shared variable.
- (cygwin_rresvport): Implement rresvport without using rresvport from
- wsock32.
-
-2006-01-18 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/socket.h (struct sockaddr_storage): Fix typo in
- ss_family member name.
-
-2006-01-16 Christopher Faylor <cgf@timesys.com>
-
- * include/cygwin/version.h: Bump DLL minor version number to 20.
-
-2006-01-13 Corinna Vinschen <corinna@vinschen.de>
-
- * uname.cc (uname): Concatenate a "-WOW64" to utsname's sysname
- member to see when running under WOW64.
-
-2006-01-13 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_setsockopt): Ignore errors when setting IP_TOS on
- Windows 2000 and above. Clarify the comment about IP_TOS and move
- to the place where the magic happens.
- (get_ifconf): Remove unused code.
- * wincap.h (wincaps::has_disabled_user_tos_setting): New element.
- * wincap.cc: Implement above element throughout.
-
-2006-01-12 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_console.cc (set_console_state_for_spawn): Fix to recognize
- ttys >= 0.
-
-2006-01-12 Christopher Faylor <cgf@timesys.com>
-
- * fhandler.h (set_console_state_for_spawn): Whackamole the argument
- back to a bool.
- * spawn.cc (spawn_guts): Ditto, i.e., once again call
- set_console_state_for_spawn with an indication of whether we're about
- to start a cygwin process.
- * fhandler_console.cc (set_console_state_for_spawn): Don't set the
- console state if we know we're starting a cygwin process or if we're
- using a "real" tty.
-
-2006-01-10 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc (dll_crt0_0): Remove call to wincap.init.
- * init.cc (dll_entry): Rename is_wow64_proc to wow64_test_stack_marker.
- Call wincap.init here before doing anything else. Use wincap.is_wow64
- to determine if we're running in a WOW64 emulator.
- * mmap.cc (MapViewNT): Don't use AT_ROUND_TO_PAGE in WOW64, it's
- apparently not supported.
- (mmap64): Don't create mappings beyond EOF, which would need to use
- AT_ROUND_TO_PAGE, on WOW64.
- * wincap.cc (wincap): Throw into the .cygwin_dll_common section.
- (wincapc::init): Determine if running in WOW64 and set wow_64 flag.
- * wincap.h (class wincapc): Add wow64 member.
- (wincapc::is_wow64): New method.
-
-2006-01-10 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_proc.cc (format_proc_cpuinfo): Avoid leading whitespace in
- model name.
-
-2006-01-09 Christopher Faylor <cgf@timesys.com>
-
- * spawn.cc (spawn_guts): Reorganize slightly so that 16 bit check is
- done prior to check for command.com/cmd.com. Don't bother setting
- CREATE_SUSPENDED flag for a MS-DOS process since it doesn't work
- anyway. Avoid calling remember() when the child process has already
- exited.
- (av::fixup): Explicitly set cygexec flag to false on a 16 bit process.
-
-2006-01-09 Corinna Vinschen <corinna@vinschen.de>
-
- * include/getopt.h (getopt_long_only): Declare.
-
-2006-01-09 Eric Blake <ebb9@byu.net>
-
- * cygwin.din: Export getsubopt.
- * include/cygwin/version.h: Bump API minor version.
-
-2006-01-08 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_tty.cc (fhandler_tty_slave::dup): Don't assign a controlling
- terminal to a process when duped. Linux doesn't do this, so we won't
- either.
-
-2006-01-08 Christopher Faylor <cgf@timesys.com>
-
- * environ.cc (spenvs[]): windir -> WINDIR.
-
-2006-01-07 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_console.cc (fhandler_console::need_invisible): Remove
- duplicate test.
-
-2006-01-07 Christopher Faylor <cgf@timesys.com>
-
- * fhandler.h (set_console_state_for_spawn): Eliminate argument from
- declaration.
- * fhandler.cc (set_console_state_for_spawn): Eliminate argument from
- definition. Always check for invisible console.
- (fhandler_console::need_invisible): Don't do anything if the windows
- station is already not visible.
- * spawn.cc (spawn_guts): Accommodate change of argument to
- set_console_state_for_spawn.
-
-2006-01-05 Christopher Faylor <cgf@timesys.com>
-
- * sigproc.cc (no_signals_available): Use existence of signal thread
- handle to figure out if we can actually send signals rather than
- relying on my_sendsig.
- (hwait_sig): Make static.
- (sigproc_init): Don't set my_sendsig to anything special. Use new
- global static hwait_sig.
- (wait_sig): Set hwait_sig to NULL when we are exiting.
-
-2006-01-05 Christopher Faylor <cgf@timesys.com>
-
- * include/getopt.h: Accommodate recent unfortunate newlib changes.
-
-2006-01-05 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.cc (_cygtls::remove): Don't output debugging info if this
- isn't a cygwin thread.
- * sigproc.cc (sigproc_init): Move clearing of sync_startup here to
- lessen the likelihood of trying to deal with non-cygwin threads in
- dll_entry.
-
- * fhandler_console: Fix set_console_state_for_spawn comment.
-
-2006-01-05 Igor Peshansky <pechtcha@cs.nyu.edu>
-
- * spawn.cc (spawn_guts): Invert the argument to
- set_console_state_for_spawn.
-
-2006-01-04 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_console.cc (fhandler_console::need_invisible): Only try to
- open "CygwinInvisible" windows station if opening of default station
- fails. Use CloseWindowStation to close window station handle.
-
-2006-01-04 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_console.cc (fhandler_console::need_invisible): Open up the
- security of the newly created windows station.
-
-2006-01-04 Eric Blake <ebb9@byu.net>
-
- * path.cc (dot_special_chars): Add ", <, >, and |.
-
-2006-01-03 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_console.cc (beep): Use MB_OK which is documented as using
- the default bell rather than -1 which seems to behave differently on
- different versions of Windows.
-
-2006-01-03 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_process.cc (fhandler_process::readdir): Add missing argument
- to syscall_printf.
-
- * fhandler_console.cc (fhandler_console::need_invisible): Use made-up
- name for windows station rather than asking Windows to create one for
- us.
-
- * spawn.cc (spawn_guts): Don't mess with console if we're detaching.
-
-2006-01-03 Christopher Faylor <cgf@timesys.com>
-
- * dir.cc (readdir_worker): Minor code cleanup.
-
- * fhandler_console.cc (beep): Use a more Windows-generic wav file if
- the beep is missing. Use a more foolproof way to find out whether we
- should be recreating the missing key.
-
- * registry.h (reg_key::_disposition): New field.
- (reg_key::created): New function.
- * registry.cc (reg_key::reg_key): Set _disposition to zero by default.
- (reg_key::build_key): Fill in _disposition field.
-
-2006-01-03 Eric Blake <ebb9@byu.net>
-
- * dir.cc (readdir_worker): Ensure that saw_dot* flags are updated when
- not handling inodes.
-
-2006-01-02 Christopher Faylor <cgf@timesys.com>
-
- * fhandler_console.cc (beep): New function. Restores missing "Default
- Beep", if necessary.
- (fhandler_console::write_normal): Use beep().
-
-2006-01-02 Christopher Faylor <cgf@timesys.com>
-
- * dcrt0.cc (_dll_crt0): Remove more leftover debugging stuff.
- (cygwin_dll_init): Remove unneeded initializations. Call _dll_crt0
- rather than dll_crt0_1.
-
-2006-01-02 Corinna Vinschen <corinna@vinschen.de>
-
- * syslog.cc: Include sys/un.h instead of sys/socket.h.
- (syslogd_inited): Convert to enum type noting the exact result of
- trying to connect to syslog daemon. Use this way throughout.
- (connect_syslogd): New static function taking over the task to
- connect to syslog socket. Use correct struct sockaddr_un instead of
- struct sockaddr.
- (try_connect_syslogd): Call connect_syslogd. If write fails on
- connection oriented socket, try to reconnect to syslog socket and
- try to write again.
-
-2006-01-01 Christopher Faylor <cgf@timesys.com>
-
- * pinfo.cc (pinfo::exit): Swap signal and normal exit value when not
- started from a cygwin process - just like the good-old-days of B20.
-
-2006-01-01 Christopher Faylor <cgf@timesys.com>
-
- * strace.cc (strace::write_childpid): Remove debugging output.
-
-2006-01-01 Christopher Faylor <cgf@timesys.com>
-
- * cygtls.cc (_cygtls::remove): Remove left over debugging cruft which
- caused this function to always return prematurely.
-
-2006-01-01 Christopher Faylor <cgf@timesys.com>
-
- * exceptions.cc (sigpacket::process): Pass actual reference to signal's
- sigaction structure to setup_handler.
-
-2006-01-01 Christopher Faylor <cgf@timesys.com>
-
- * exceptions.cc (_cygtls::interrupt_setup): Implement SA_RESETHAND.
- * include/cygwin/signal.h: Define SA_ONESHOT and SA_NOMASK.
-
- * dcrt0.cc (get_cygwin_startup_info): Remove commented out code.
-
-2006-01-01 Corinna Vinschen <corinna@vinschen.de>
-
- * syslog.cc (vklog): Never log kernel messages using the vsyslog
- interface.
diff --git a/winsup/cygwin/ChangeLog-2007 b/winsup/cygwin/ChangeLog-2007
deleted file mode 100644
index 66cb331..0000000
--- a/winsup/cygwin/ChangeLog-2007
+++ /dev/null
@@ -1,2769 +0,0 @@
-2007-12-30 Dave Korn <dave.korn@artimi.com>
-
- * cygwin.din (_f_llrint, _f_llrintf, _f_llrintl, _f_lrint, _f_lrintf,
- _f_lrintl, _f_rint, _f_rintf, _f_rintl): Export fast *rint* functions.
- (lrint, lrintf, rint, rintf): Redirect exports to alias _f_ versions.
- (llrint, llrintf, llrintl, lrintl, rintl): Add exports aliasing _f_*
- versions likewise.
- * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
-
-2007-12-22 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_dev_random): Add dummy_offset member.
- * fhandler_random.cc (fhandler_dev_random::lseek): Fake seeking
- capability as on Linux.
-
-2007-12-20 Eric Blake <ebb9@byu.net>
-
- * libc/memmem.cc (memmem): Fix bug when searching for empty string.
-
-2007-12-19 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Export wcpcpy, wcpncpy.
- * include/cygwin/version.h: Bump API minor number.
-
-2007-12-16 Christopher Faylor <me+cygwin@cgf.cx>
-
- * dtable.cc (POSIX_NAMED_PIPE): New define.
- (POSIX_NAMED_PIPE_LEN): Ditto.
- (dtable::add_archetype): Use crealloc_abort.
- (dtable::init_std_file_from_handle): Specifically detect pipe
- stdin/stdout. Pass name to build_fh_dev so that proper name is
- recorded. Use binmode of fh if it is set before using
- get_default_mode. Set proper read/write access when calling init().
- (handle_to_fn): Handle pipes.
- * fhandler.cc (fhandler_base::wait_overlapped): Add some debugging.
- * fhandler.h (fhandler_base::set_name): Default to just setting the
- path_conv name.
- (fhandler_pipe::init): Declare.
- * pipe.cc (struct pipesync): New struct.
- (getov_result): New function. Blocks and retrieves the result of an
- overlay I/O operation.
- (pipe_handler): New function.
- (pipesync::pipesync): New function. Initializer for pipesync struct.
- (handler_pipe::init): Define. Detects attempts to set up a "native"
- pipe fhandler and creates a thread which accepts input from or output
- to the non-cygwin pipe, creating a cygwin pipe wrapper around the
- non-cygwin pipe.
- (fhandler_pipe::create): Add pipe-specific flags to call to init().
-
- * exceptions.cc (ctrl_c_handler): Lock process while we determine what
- to do.
-
-2007-12-14 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/socket.h: Include sys/uio.h instead of cygwin/uio.h.
- * include/cygwin/uio.h: Remove.
-
-2007-12-14 Corinna Vinschen <corinna@vinschen.de>
-
- * dtable.cc (dtable::set_file_pointers_for_exec): Reenable. Fix
- comment.
- * spawn.cc (spawn_guts): Call cygheap->fdtab.set_file_pointers_for_exec
- only for non-Cygwin processes.
-
-2007-12-13 Craig MacGregor <cmacgreg@gmail.com>
- Corinna Vinschen <corinna@vinschen.de>
-
- * poll.cc (poll): Return count of fds with events instead of total
- event count.
-
-2007-12-13 Corinna Vinschen <corinna@vinschen.de>
-
- * string.h: Guard cygwin internal string function definitions with
- __INSIDE_CYGWIN__.
-
-2007-12-12 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc: Include string.h.
- (initial_env): Use small_printf's %P specifier.
- * dll_init.cc (dll_list::alloc): Use PATH_MAX instead of CYG_MAX_PATH
- for path name buffer size.
- * dll_init.h (struct dll): Ditto.
- * environ.cc: Include string.h.
- (win_env::add_cache): Use temporary local buffer for path conversion.
- (posify): Ditto.
- * exceptions.cc (try_to_debug): Use CreateProcessW to allow long path
- names.
- * miscfuncs.cc: Drop unused implementations of strcasematch and
- strncasematch.
- (ch_case_eq): Drop.
- (strcasestr): Drop.
- (cygwin_wcscasecmp): New function.
- (cygwin_wcsncasecmp): New function.
- (cygwin_strcasecmp): New function.
- (cygwin_strncasecmp): New function.
- (cygwin_wcslwr): New function.
- (cygwin_wcsupr): New function.
- (cygwin_strlwr): New function.
- (cygwin_strupr): New function.
- * ntdll.h (RtlDowncaseUnicodeString): Declare.
- (RtlUpcaseUnicodeString): Declare.
- (RtlInt64ToHexUnicodeString): Fix typo in comment.
- * string.h: Disable not NLS aware implementations of strcasematch
- and strncasematch.
- (cygwin_strcasecmp): Declare.
- (strcasecmp): Define as cygwin_strcasecmp.
- (cygwin_strncasecmp): Declare.
- (strncasecmp): Define as cygwin_strncasecmp.
- (strcasematch):Define using cygwin_strcasecmp.
- (strncasematch):Define using cygwin_strncasecmp.
- (cygwin_strlwr): Declare.
- (strlwr): Define as cygwin_strlwr.
- (cygwin_strupr): Declare.
- (strupr): Define as cygwin_strupr.
- * wchar.h: New file.
- * wincap.cc (wincapc::init): Use "NT" as fix OS string.
- * winsup.h (strcasematch): Drop declaration.
- (strncasematch): Ditto.
- (strcasestr): Ditto.
-
-2007-12-11 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_base::fstat_helper): Fix R/O bit
- handling on filesystems without ACL support.
-
-2007-12-11 Corinna Vinschen <corinna@vinschen.de>
-
- * localtime.cc (tzset): Guard by a muto for thread safety.
-
-2007-12-11 Dave Korn <dave.korn@artimi.com>
-
- * cygheap.cc (_csbrk): Don't request zero bytes from VirtualAlloc,
- as windows treats that as an invalid parameter and returns an error.
-
-2007-12-11 Corinna Vinschen <corinna@vinschen.de>
-
- * localtime.cc (tzset): Call tzsetwall only if it hasn't been
- called before.
-
-2007-12-07 Corinna Vinschen <corinna@vinschen.de>
-
- * include/sys/cygwin.h: Include limits.h.
-
-2007-12-06 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc (initial_env): Use PATH_MAX instead of CYG_MAX_PATH for path
- name buffer size.
- (dll_crt0_1): Allocate new_argv0 with PATH_MAX size.
- * exceptions.cc (debugger_command): Set size to 2 * PATH_MAX + 20;
- (error_start_init): Use PATH_MAX instead of CYG_MAX_PATH for path
- name buffer size.
- * external.cc (fillout_pinfo): Always fill out ep.progname 0-terminated.
- Fill out ep.progname_long.
- * fhandler_process.cc (fhandler_process::fill_filebuf): Allocate
- buffer for executable filename with PATH_MAX size.
- * pinfo.cc: Throughout use PATH_MAX instead of CYG_MAX_PATH.
- * pinfo.h (class _pinfo): Set progname size to PATH_MAX.
- * smallprint.cc: Include limits.h. Use PATH_MAX instead of CYG_MAX_PATH
- for path name buffer size.
- * strace.cc (strace::vsprntf): Ditto.
- * include/sys/cygwin.h (EXTERNAL_PINFO_VERSION_32_LP): Define.
- (EXTERNAL_PINFO_VERSION): Set to EXTERNAL_PINFO_VERSION_32_LP.
- (struct external_pinfo): Add progname_long member.
- * include/sys/dirent.h: Correctly include limits.h instead of
- sys/limits.h.
-
-2007-12-05 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_tty.cc (fhandler_tty_slave::open): Use MAX_PATH instead of
- CYG_MAX_PATH for event name buffer size.
- (fhandler_pty_master::setup): Use MAX_PATH instead of CYG_MAX_PATH for
- mutex name buffer size.
- * netdb.cc: Drop old comment.
- (open_system_file): Set path buffer size to MAX_PATH instead of
- CYG_MAX_PATH. Drop conversion to posix path. Open file using win32
- path.
-
-2007-12-05 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_registry.cc: Use NAME_MAX + 1 instead of CYG_MAX_PATH
- throughout for subkey name buffer size.
- * fhandler_socket.cc (search_wsa_event_slot): Use MAX_PATH instead of
- CYG_MAX_PATH for mutex name buffer size.
- (fhandler_socket::init_events): Ditto.
- * fhandler_virtual.cc (fhandler_virtual::opendir): Check path length
- against PATH_MAX instead of against CYG_MAX_PATH.
- * registry.cc (get_registry_hive_path): Use PATH_MAX instead of
- CYG_MAX_PATH for registry value path buffer size.
- * shared.cc (open_shared): Use MAX_PATH instead of CYG_MAX_PATH
- for shared memory name buffer size.
- * thread.cc (semaphore::semaphore): Use MAX_PATH instead of CYG_MAX_PATH
- for semaphore name buffer size.
- * uinfo.cc (cygheap_user::env_userprofile): Use PATH_MAX instead of
- CYG_MAX_PATH for temporary path name buffer size.
- * winf.h (LINE_BUF_CHUNK): Define as MAX_PATH * 2.
- * include/sys/dirent.h: Include sys/limits.h. Define name buffer sizes
- using NAME_MAX.
-
-2007-12-04 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_fifo.cc (fhandler_fifo::open): Use MAX_NAME for pipe name
- buffer size.
- (fhandler_fifo::fstatvfs): Use same technique as in fhandler_socket.
- * fhandler_proc.cc (format_proc_partitions): Use NAME_MAX+1 for
- device name buffer size. Use MAX_PATH for device path buffer size.
-
-2007-12-03 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (GetModuleFileNameExW): Replace definition of
- GetModuleFileNameExA.
- * fhandler_process.cc (format_process_maps): Change modname type to
- WCHAR. Set buffer sizes to PATH_MAX. Call GetModuleFileNameExW
- instead of GetModuleFileNameExA. Call mount_info::conv_to_posix_path
- instead of cygwin_conv_to_full_posix_path. Set posix_modname to
- modname if that call fails.
- (format_process_stat): Set cmd buffer size to NAME_MAX + 1. Simplify
- setting cmd to process name.
- (format_process_status): Ditto.
- * path.cc (mount_info::conv_to_posix_path): Call sys_wcstombs
- correctly.
-
-2007-12-03 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/time.h: Remove redundant #endif.
-
-2007-12-01 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/time.h (daylight): Declare as extern symbol referring
- _daylight variable.
- (timezone): Only define if __timezonefunc__ is undefined.
-
-2007-12-01 Corinna Vinschen <corinna@vinschen.de>
- Brian Dessent <brian@dessent.net>
-
- * Makefile.in (OBSOLETE_FUNCTIONS): Add timezone.
- * include/cygwin/time.h: Drop conditional timezone definitions.
- (timezone): Declare as extern symbol referring _timezone variable.
-
-2007-11-28 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_tape.cc (mtinfo::initialize): Use MAX_PATH instead of
- CYG_MAX_PATH.
- * fhandler_tty.cc (fhandler_pty_master::ptsname): Set buffer size to
- TTY_NAME_MAX.
- * syscalls.cc (ttyname): Eliminate the `+ 1' from the name buffer size
- since TTY_NAME_MAX already counts the trailing NUL.
- * libc/bsdlib.cc (openpty): Set pts buffer size to TTY_NAME_MAX.
-
-2007-11-28 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::recv_internal): Add MSG_WAITALL
- handling. Use explicit flag values instead of MSG_WINMASK.
- (fhandler_socket::send_internal): Use explicit flag values instead of
- MSG_WINMASK.
- * include/cygwin/socket.h (MSG_WINMASK): Remove definition.
- (MSG_WAITALL): Define.
-
-2007-11-27 Corinna Vinschen <corinna@vinschen.de>
-
- * posix_ipc.cc (ipc_names): Rename max_len to prefix_len. Store
- the prefix len in it.
- (check_path): Take length parameter. Use this length insetad of
- calling strlen. Allow PATH_MAX length paths.
- (ipc_mutex_init): Use MAX_PATH instead of CYG_MAX_PATH.
- (ipc_cond_init): Ditto.
- (shm_open): Allocate local name buffer not bigger than necessary. Call
- check_path with additional length argument.
- (shm_unlink): Ditto.
- (mq_open): Ditto.
- (mq_unlink): Ditto.
- (sem_open): Ditto.
- (sem_unlink): Ditto.
-
-2007-11-27 Corinna Vinschen <corinna@vinschen.de>
-
- Drop old SetResourceLock stuff in favor of mutos.
- * dcrt0.cc (_reslock): Remove.
- (__cygwin_user_data): Accommodate removal of resourcelocks member.
- (dll_crt0_0): Don't initialize resourcelocks.
- * exceptions.cc (_cygtls::signal_exit): Drop resourcelocks handling.
- * mmap.cc (mmap_guard): New muto.
- (LIST_LOCK): Define.
- (LIST_UNLOCK): Define.
- (mmap_list::search_record): Remove.
- (mmap_list::try_map): Include code for anonymous case from
- mmap_list::search_record.
- (mmap_is_attached_or_noreserve): Access bookkeeping lists in a thread
- safe way.
- (mmap64): Replace SetResourceLock/ReleaseResourceLock by
- LIST_LOCK/LIST_UNLOCK. Lock at the latest possible point.
- (munmap): Replace SetResourceLock/ReleaseResourceLock by
- LIST_LOCK/LIST_UNLOCK.
- (msync): Ditto.
- (mprotect): Ditto.
- * thread.cc (ResourceLocks::Lock): Remove.
- (SetResourceLock): Remove.
- (ReleaseResourceLock): Remove.
- (ResourceLocks::Init): Remove.
- (ResourceLocks::Delete): Remove.
- * thread.h (SetResourceLock): Drop declaration.
- (ReleaseResourceLock): Ditto.
- (class ResourceLocks): Drop definition.
- * include/sys/cygwin.h (class ResourceLocks): Drop forward declaration.
- (struct per_process): Replace resourcelocks with additional unused2
- element.
- (per_process_overwrite): Accommodate above change.
-
-2007-11-27 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc: Convert usage of dynamically growing cmalloced arrays to
- cmalloced linked lists throughout.
- (class mmap_record): Add LIST_ENTRY element.
- (mmap_record::match): New method, taking over match algorithm from
- list::search_record.
- (class mmap_list): Rename from class list. Add LIST_ENTRY. Convert
- recs to a LIST_HEAD. Drop nrecs and maxrecs members.
- (mmap_list::get_record): Drop entirely.
- (mmap_list::free_recs): Drop entirely.
- (mmap_list::del_record): Take mmap_record to delete as parameter.
- (mmap_list::search_record): Convert to mmap_record::match.
- (class mmap_areas): Rename from class map. Convert lists to LIST_HEAD.
- (mmap_areas::get_list): Drop entirely.
- (mmap_areas::del_list): Take mmap_list to delete as parameter.
- (mprotect): Fix indentation.
-
-2007-11-26 Christopher Faylor <me+cygwin@cgf.cx>
-
- Change many cygheap allocation routines to their *_abort analogs.
- * cygheap.cc (cmalloc_abort): New function.
- (crealloc_abort): Ditto.
- (ccalloc_abort): Ditto.
-
-2007-11-23 Christopher Faylor <me+cygwin@cgf.cx>
-
- * cygheap.cc (_crealloc): Avoid memcpy when _cmalloc returns NULL.
-
-2007-11-08 Christopher Faylor <me+cygwin@cgf.cx>
-
- * dllfixdbg: Eliminate extra objcopy step.
-
-2007-11-07 Pedro Alves <pedro_alves@portugalmail.pt>
-
- * dllfixdbg: Pass --only-keep-debug to objcopy, instead of
- selecting the sections manually.
-
-2007-11-06 Corinna Vinschen <corinna@vinschen.de>
-
- * thread.cc (pthread_key_create): Drop check for incoming valid object.
-
-2007-11-06 Corinna Vinschen <corinna@vinschen.de>
-
- * shm.cc: Include sync.h
- (struct shm_shmid_list): Add ref_count member.
- (struct shm_attached_list): Remove hdl and size members. Add a parent
- member pointing to referenced shm_shmid_list entry.
- (shm_guard): New muto.
- (SLIST_LOCK): Define.
- (SLIST_UNLOCK): Define.
- (fixup_shms_after_fork): Use hdl and size members of parent
- shm_shmid_list entry.
- (shmat): Access sequential bookkeeping lists in a thread safe way.
- Accommodate change in list element layout. Align comments.
- (shmctl): Ditto.
- (shmdt): Ditto.
- (shmget): Ditto.
-
-2007-11-05 Corinna Vinschen <corinna@vinschen.de>
-
- * shm.cc (shmctl): On IPC_RMID don't unmap views and don't close handle
- if the map is still referenced to emulate Linux and BSD behaviour.
-
-2007-11-05 Corinna Vinschen <corinna@vinschen.de>
-
- * shm.cc (shmctl): On IPC_RMID also unmap all views on shared mem
- as well as connected shm_attached_list entry.
-
-2007-10-31 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (load_ipv6_funcs): Use MAX_PATH instead of CYG_MAX_PATH.
- (cygwin_getaddrinfo): Simplify formatting.
- (cygwin_getnameinfo): Ditto.
-
-2007-10-31 Corinna Vinschen <corinna@vinschen.de>
-
- * external.cc (get_cygdrive_info): Make inline.
- (get_cygdrive_prefixes): Remove.
- (cygwin_internal): Call get_cygdrive_info with NULL flag parameters
- instead of get_cygdrive_prefixes.
- * path.cc (mount_info::get_cygdrive_info): Allow NULL flag parameters.
-
-2007-10-30 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_base::fstat_helper): Don't remove
- write bits for directories with R/O attribute.
- (fhandler_base::fhaccess): Don't shortcircuit R/O attribute with W_OK
- scenarios for directories.
-
-2007-10-22 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.h (struct cwdstuff): Drop hash member. Drop get_hash,
- get_initial, and fixup_after_exec declarations.
- Convert win32 to UNICODE_STRING.
- (cwdstuff::get_drive): Convert win32 path in current codepage.
- (cwdstuff::set): Take native NT path.
- * ntdll.h (struct _TEB): Typedef.
- * path.cc (mount_info::conv_to_posix_path): Add variant taking
- wide char DOS paths.
- (symlink_info::posixify): Simplify concatenating cwd and relative path.
- (hash_path_name): Drop special relative path handling.
- (chdir): Drop special "drive only" handling. Call cwdstuff::set with
- native path.
- (cwdstuff::get_hash): Remove.
- (windows_system_directory): Remove.
- (_upp): Remove.
- (get_user_proc_parms): Make inline. Get PEB pointer by calling
- NtCurrentTeb.
- (cwdstuff::init): Simplify.
- (cwdstuff::set): Rework to handle incoming native NT path. Workaround
- a Vista problem with CWD handle in the user process parameter block.
- (cwdstuff::get): Simplify locking. Accommodate type change of win32.
- * shared_info.h (mount_info): Add declaration for new conv_to_posix_path
- method.
- * strfuncs.cc (sys_wcstombs): Return correct length of created
- multi-byte string.
-
-2007-10-19 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (__DIR_mounts::eval_ino): Make fname big enough
- to allow multibyte chars.
-
-2007-10-18 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Open native symlinks with
- FILE_OPEN_REPARSE_POINT flag. Fix typo in comment.
-
-2007-10-18 Corinna Vinschen <corinna@vinschen.de>
-
- * include/sys/param.h (MAXPATHLEN): Define as PATH_MAX.
-
-2007-10-14 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (is_at_eof): Rewrite using NT functions.
- (off_current): New static variable.
- (off_append): Ditto.
- (fhandler_base::raw_write): Use NtWriteFile. Accommodate O_APPEND here.
- (fhandler_base::write): Drop O_APPEND hack. Use NT functions.
- (fhandler_base::lseek): Rewrite using NT functions.
- * fhandler_disk_file.cc (fhandler_disk_file::fstatvfs): Add space in
- debug output.
- (fhandler_disk_file::ftruncate): Ditto.
- * ntdll.h (STATUS_DISK_FULL): Define.
- (FILE_USE_FILE_POINTER_POSITION): Define.
- (FILE_WRITE_TO_END_OF_FILE): Define.
-
-2007-10-13 Corinna Vinschen <corinna@vinschen.de>
-
- * ntdll.h (STATUS_END_OF_FILE): Define.
- * path.cc (symlink_info::check_shortcut): Use NT function to get file
- size. Reintroduce checking file size before reading it. Eliminiate
- close_it label.
- (symlink_info::check_sysfile): Check for EOF condition.
-
-2007-10-11 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (basename): Return pointer into the path argument itself.
- Shrink buf to 4 bytes. Use buf only for border cases.
- (dirname): Ditto.
-
-2007-10-10 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (struct symlink_info): Change size of contents member to
- be able to keep SYMLINK_MAX sized strings.
- (symlink_worker): Rework for long path names. When writing windows
- shortcuts, store pathname additionally "hidden" after the actual
- shortcut data to workaround size limitations of the description field.
- (symlink_info::check_shortcut): Drop file name parameter. Drop max
- file size check. Use NT functions. Use appended full path if
- available, description otherwise. Check symlink string length for
- not exceeding SYMLINK_MAX. Don't close file here.
- (symlink_info::check_sysfile): Drop file name parameter. Use NT
- functions. Check symlink string length for not exceeding SYMLINK_MAX.
- Don't close file here.
- (symlink_info::check_reparse_point): Drop file name parameter. Drop
- useless length checks. Allow SYMLINK_MAX length symlink strings.
- Don't close file here.
- (symlink_info::posixify): Allow SYMLINK_MAX length symlink strings.
- (symlink_info::check): Turn around checking for symlink file attributes.
- Use NT functions. Close symlink file here.
- * include/limits.h (PATH_MAX): Define as 32760. Change comment.
- (SYMLINK_MAX): Define as PATH_MAX - 1.
-
-2007-10-10 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::bind): Open file for deletion,
- too. Don't write to file and especially don't close handle if file
- couldn't be created. Set delete disposition if writing failed,
- instead of calling unlink_nt.
-
-2007-09-27 Corinna Vinschen <corinna@vinschen.de>
-
- * ntdll.h (struct _FILE_COMPRESSION_INFORMATION): Align with definition
- in w32api / MSDN.
- * fhandler_disk_file.cc (fhandler_base::fstat_helper): Accommodate
- change to struct _FILE_COMPRESSION_INFORMATION.
-
-2007-09-26 Corinna Vinschen <corinna@vinschen.de>
-
- * termios.cc (setspeed): Support new baud rates introduced 2007-02-05.
-
-2007-09-20 Corinna Vinschen <corinna@vinschen.de>
-
- * ntdll.h (STATUS_OBJECT_NAME_INVALID): Define.
-
-2007-09-18 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (fh_disk_file): Delete as global static variable and...
- (mmap64): ...define as local pointer to make mmap thread-safe.
- Accommodate throughout. Only initialize fh_disk_file after file could
- be opened with GENERIC_EXECUTE access. Call fstat_by_handle instead of
- fstat to avoid overhead.
-
-2007-09-18 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (set_file_sd): Open file with FILE_OPEN_FOR_BACKUP_INTENT
- too.
-
-2007-09-17 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink_info::check): Check for STATUS_OBJECT_NAME_INVALID.
- Add comment.
-
-2007-09-17 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Partly revert change from
- 2007-08-24: Call has_acls to avoid permission problems getting
- a handle to a file on a remote share. Add comment.
-
-2007-09-08 Brian Dessent <brian@dessent.net>
-
- * include/cygwin/config.h: Conditionalize inline __getreent()
- definition on _COMPILING_NEWLIB.
-
-2007-09-06 Brian Dessent <brian@dessent.net>
-
- * include/cygwin/config.h (__getreent): Define inline version.
-
-2007-09-06 Brian Dessent <brian@dessent.net>
-
- * include/sys/stdio.h (_flockfile): Don't try to lock a FILE
- that has the __SSTR flag set.
- (_ftrylockfile): Likewise.
- (_funlockfile): Likewise.
-
-2007-08-24 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (open): Don't follow symlinks if O_EXCL is given.
-
-2007-08-23 Corinna Vinschen <corinna@vinschen.de>
-
- * ntdll.h (STATUS_NO_SUCH_FILE): Define.
- * path.cc (get_nt_native_path): Reset upath.Length to 0 on each
- invocation.
- (symlink_info::check): Use NT native functions.
-
-2007-08-21 Corinna Vinschen <corinna@vinschen.de>
-
- * uinfo.cc (pwdgrp::load): Use NT native functions.
-
-2007-08-21 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_base::fstat_helper): Rewrite checking
- for executable file magic using a thread safe method and re-enable this
- code.
-
-2007-08-21 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (unlink_nt): Drop one local FILE_BASIC_INFORMATION struct.
-
-2007-08-21 Corinna Vinschen <corinna@vinschen.de>
-
- * ntdll.h (NtNotifyChangeDirectoryFile): Declare.
- (NtQueryAttributesFile): Move to maintain alphabetical order of
- declarations. Add comment to note that timestamp information returned
- by NtQueryAttributesFile is unreliable.
- * path.h (etc::changed_h): Move here.
- (etc::fn): Change type to OBJECT_ATTRIBUTES.
- (etc::last_modified): Change type to LARGE_INTEGER.
- (etc::init): Take PUNICODE_STRING as second argument.
- * path.cc: Accomodate above changes.
- (etc::test_file_change): Use NT native functions.
- (etc::dir_changed): Ditto.
- * uinfo.cc (pwdgrp::load): Call etc::init with NT native path.
-
-2007-08-21 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc: Change debugging output througout to print
- the NT status consistently. Use UNICODE path information if available.
-
-2007-08-20 Corinna Vinschen <corinna@vinschen.de>
-
- * hookapi.cc (ld_preload): Call LoadLibraryW.
- * path.h (path_conv::get_wide_win32_path_len): Define.
-
-2007-08-20 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (rootdir): Delete.
- * winsup.h (rootdir): Drop declaration.
-
-2007-08-19 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (fillout_mntent): Append backslash to drive-only paths before
- calling fs_info::update.
- * path.h (fs_info::clear): Simplify.
- (fs_info::fs_info): Add constructor.
-
-2007-08-17 Corinna Vinschen <corinna@vinschen.de>
-
- * spawn.cc (spawn_guts): Fix typo in comment.
-
-2007-08-17 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (CloseDesktop): Define.
- (CreateDesktopA): Define.
- (SetThreadDesktop): Define.
- * spawn.cc (spawn_guts): When starting a process under another user
- account, don't open up permissions on current window station and
- desktop. Instead, if not in interactive session, create a new per-user
- window station plus default desktop and use that for the child process.
-
-2007-08-16 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Handle S_IFSOCK
- mode bit by setting the SYSTEM attribute.
- * fhandler_socket.cc (fhandler_socket::fchmod): Add S_IFSOCK mode bit
- when calling fhandler_disk_file::fchmod. Don't set attributes here.
-
-2007-08-16 Corinna Vinschen <corinna@vinschen.de>
-
- * path.h (path_conv::operator char *): Delete.
- (path_conv::operator const char *): Delete.
- * dlfcn.cc: Throughout, replace path_conv::operator char * and
- path_conv::operator const char * by call to path_conv::get_win32
- for easier transition to UNICODE_PATHs.
- * fhandler_socket.cc: Ditto.
- * hookapi.cc: Ditto.
- * path.cc: Ditto.
- * spawn.cc: Ditto.
- * syscalls.cc: Ditto.
- * uinfo.cc: Ditto.
-
-2007-08-16 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc (readdir_worker): Convert w32name to PUNICODE_STRING.
- * sec_acl.cc (getacl): Convert debug output to print native NT path.
- * security.cc (set_file_attribute): Ditto.
- * syscalls.cc (try_to_bin): Ditto and fix buggy debug statement.
-
-2007-08-16 Corinna Vinschen <corinna@vinschen.de>
-
- * ntdll.h (RtlAcquirePebLock): Declare.
- (RtlReleasePebLock): Declare.
- * path.cc (cwdstuff::set): Change PEB only while it's locked.
-
-2007-08-16 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_base::get_namehash): Use NT native path.
- * fhandler_disk_file.cc (readdir_get_ino): Ditto in call to
- hash_path_name.
-
-2007-08-16 Corinna Vinschen <corinna@vinschen.de>
-
- * ntdll.h (RtlCreateUnicodeStringFromAsciiz): Fix declaration.
- (RtlUpcaseUnicodeChar): Declare.
- * path.cc (hash_path_name): Split into three functions, taking
- the path as char *, PWCSTR, or PUNICODE_STRING. Move implementation
- into PUNICODE_STRING-based function. Drop old drive-relative path
- consideration.
- * winsup.h (iswdirsep): Like isdirsep but for WCHARs.
- (isabspath_u): Like isabspath, for PUNICODE_STRINGs.
- (iswabspath): Like isabspath, for PWCHARs.
- (hash_path_name): Add new declarations.
-
-2007-08-15 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (get_nt_native_path): Allow to convert special paths which
- have no native NT path representation for simplified debug output.
- * syscalls.cc: Convert debug output to print native NT path.
- (unlink): Drop redundant debug output.
-
-2007-08-15 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::link): Drop superfluous
- test for trailing dot.
- * path.h (path_conv::operator []): Remove.
-
-2007-08-15 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (get_inet_addr): Use NT native functions for
- accessing the file representing the local socket.
- (fhandler_socket::bind): Ditto.
- * ntdll.h: Declare NtReadFile.
-
-2007-08-14 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (symlink_info::check): In case of ERROR_SHARING_VIOLATION and
- ERROR_ACCESS_DENIED, try to get file attributes by using directory
- functions.
-
-2007-08-14 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (fs_info::update): Correctly handle the volume root directory.
-
-2007-08-14 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_base::pc): Make public.
- * fhandler_disk_file.cc (fhandler_disk_file::link): Drop extern
- declaration of stat_suffixes. Use NT native path in debug output.
- (fhandler_base::utimes_fs): Simplify closeit case. Use close_fs
- to close newly opened file handle.
- (fhandler_base::open_fs): Use NT native path in debug output.
- * path.cc: Throughout drop extern declaration of stat_suffixes.
- * path.h (stat_suffixes): Declare.
- * sec_acl.cc (acl_worker): Drop extern declaration of stat_suffixes.
- * times.cc (utimes_worker): Take path_conv as parameter instead of
- single-byte pathnam, drop nofollow argument, accommodate throughout.
- Compare UNICODE paths when enumerating file descriptors. Fix
- formatting. Use NT native path in debug output.
-
-2007-08-13 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc: Call NtClose instead of CloseHandle throughout.
- (CreateMapping): Drop unused last argument. Accommodate throughout.
- (mmap64): Re-open file with execute permissions using NtOpenFile.
-
-2007-08-13 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_base::close_fs): Reintroduce (as inline function)
- for clearness.
- * fhandler_disk_file.cc (fhandler_base::fstat_fs): Revert previous
- change.
- (fhandler_base::open_fs): Ditto.
- * fhandler_socket.cc (fhandler_socket::close): Ditto.
-
-2007-08-13 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (DLL_OFILES): Remove delqueue.o.
- * delqueue.cc: Delete.
- * fhandler.h (fhandler_base::close_fs): Drop declaration.
- (fhandler_disk_file::close): Drop declaration.
- * fhandler_disk_file.cc (fhandler_base::fstat_fs): Call close instead of
- close_fs.
- (fhandler_base::fstat_helper): Use open FH_UNIX handle in call to
- get_file_attribute.
- (fhandler_base::open_fs): Call close instead of get_file_attribute.
- (fhandler_disk_file::close): Remove.
- (fhandler_base::close_fs): Remove.
- * fhandler_socket.cc (fhandler_socket::close): Just call
- fhandler_base::close for FH_UNIX sockets.
- * shared.cc (user_shared_initialize): Drop call to
- user_shared->delqueue.init.
- * shared_info.h (CURR_USER_MAGIC): Change according to below change.
- (MAX_DELQUEUES_PENDING): Remove.
- (class delqueue_list): Remove.
- (class user_info): Remove delqueue.
- * syscalls.cc (close_all_files): Drop call to
- user_shared->delqueue.process_queue.
- (unlink): Drop delqueue handling.
-
-2007-08-13 Corinna Vinschen <corinna@vinschen.de>
-
- * devices.in (dev_storage): Use native NT device name for kmsg mailslot.
- * devices.cc: Regenerate.
- * fhandler.cc (fhandler_base::operator =): Use path_conv assignment
- operator.
- (fhandler_base::set_name): Ditto.
- (fhandler_base::open): Use NT native path in debug output.
- * fhandler_mailslot.cc: Convert to NT native function calls.
- * ntdll.h (struct _FILE_MAILSLOT_SET_INFORMATION): Define.
- (NtCreateMailslotFile): Declare.
- * path.cc (path_conv::set_normalized_path): Don't set wide_path to NULL.
- (path_conv::set_name): Remove unused function.
- * path.h (path_conv::set_name): Drop declaration.
- (path_conv::operator =): Define.
-
-2007-08-12 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Remove HIDDEN_DOT_FILES code.
- * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Ditto.
- * path.cc (symlink_worker): Ditto.
-
-2007-08-12 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (getw): Remove redundant implementation.
- (putw): Ditto.
- (wcscmp): Ditto.
- (wcslen): Ditto.
- (memccpy): Ditto.
-
-2007-08-12 Corinna Vinschen <corinna@vinschen.de>
-
- * ntdll.h: Add descriptive comments to special Rtl functions.
- (STATUS_OBJECT_PATH_NOT_FOUND): Define.
- (STATUS_BUFFER_OVERFLOW): Define.
- (FILE_SUPERSEDED): Define.
- (FILE_OPENED): Define.
- (FILE_CREATED): Define.
- (FILE_OVERWRITTEN): Define.
- (FILE_EXISTS): Define.
- (FILE_DOES_NOT_EXIST): Define.
- (PIO_APC_ROUTINE): Typedef.
- (NtFsControlFile): Fix parameter types to use PIO_APC_ROUTINE.
- (NtWriteFile): Declare.
- (RtlInt64ToHexUnicodeString): Declare.
- * strfuncs.cc: Include ntdll.h.
- (RtlInt64ToHexUnicodeString): New function.
- * syscalls.cc (try_to_bin): Rewrite using native NT functions.
- Only try to create recycle bin after unsuccessfully trying to move
- file. Also try to create special files in recycle bin so that Windows
- Explorer isn't unnecessarily stampeded.
-
-2007-08-10 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (fillout_mntent): Fix calculation of unicode buffer size.
-
-2007-08-10 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (rename): Check oldpath and newpath for trailing dir
- separators, require them to be existing directories if so. Check
- for a request to change only the case of the filename. Check paths
- for case insensitve equality only once. Handle renaming a directory
- to another, existing directory by unlinking the destination directory
- first. If newpath points to an existing file with R/O attribute set,
- try to unset R/O attribute first. Augment hardlink test by not
- checking directories. If renaming fails with STATUS_ACCESS_DENIED,
- try to unlink existing destination filename and try renaming again.
- Drop useless test for non-empty directory. Always close fh at the
- end of the function.
-
-2007-08-09 Ernie Coskrey <Ernie.Coskrey@steeleye.com>
-
- * gendef (sigbe): Reset "incyg" while the stack lock is active to avoid
- a potential race.
-
-2007-08-09 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (rename): Close oldpath file handle immediately after
- trying to rename it. Use nfh handle when checking for non-empty
- newpath directory. Only change status if check_dir_not_empty really
- returns STATUS_DIRECTORY_NOT_EMPTY.
-
-2007-08-02 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (readdir_get_ino): Accommodate native symlinks.
- * syscalls.cc (rename): Ditto.
-
-2007-08-02 Christopher Faylor <me+cygwin@cgf.cx>
-
- * lib/Makefile: Add missed file to accommodate below changes.
-
-2007-08-02 Christopher Faylor <me+cygwin@cgf.cx>
-
- * lib/cygwin_attach_dll.c: Fix compiler warning.
- * lib/cygwin_crt0.c: Ditto.
-
-2007-08-02 Christopher Faylor <me+cygwin@cgf.cx>
-
- * dcrt0.cc (codepage_type): Remove definition.
- * strfuncs.cc: Move it here. New file with bits of miscfuncs.cc.
- * miscfuncs.cc: Remove wide character stuff.
-
-2007-08-02 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (rename): Move and add text to comment about testing
- oldpath and newpath referring to the same file. Test if oldpath
- has more than one hardlink before opening oldpath (idea by Eric Blake).
- Reorder test so that file id is tested before volume serial number.
-
-2007-08-02 Corinna Vinschen <corinna@vinschen.de>
-
- * path.h (struct fs_info): Drop root_len and name_hash members.
- (fsinfo::length): Remove.
- (path_conv::rootdir): Remove.
- * syscalls.cc (try_to_bin): Use rootdir function instead of
- path_conv::rootdir method.
-
-2007-08-02 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (path_conv::ndisk_links): Fix typo in call to
- NtClose.
-
-2007-08-01 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (rename): Check if oldpath and newpath refer to the
- same file. If so, return successfully and perform no other action,
- as per SUSv3.
-
-2007-08-01 Corinna Vinschen <corinna@vinschen.de>
-
- * ntdll.h (STATUS_ACCESS_DENIED): Define.
- * syscalls.cc (check_dir_not_empty): New static function.
- (unlink_nt): Move code checking for non-empty dir to check_dir_not_empty
- and call check_dir_not_empty instead.
- (rename): Add fault handler. Check oldpath and newpath for trailing
- . and .. path components and return EINVAL if so. Check oldpath
- for being on a vrtual file system. If renaming a dir fails with
- STATUS_ACCESS_DENIED, check if the target dir is non-empty and return
- ENOTEMPTY if so.
-
-2007-08-01 Corinna Vinschen <corinna@vinschen.de>
-
- * localtime.cc (tzsetwall): Don't set TZ.
-
-2007-08-01 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Drop
- usage of path_conv::volser().
- (fhandler_base::fstat_by_name): Ditto.
- * ntdll.h (STATUS_NO_MEDIA_IN_DEVICE): Define.
- (STATUS_OBJECT_NAME_NOT_FOUND): Define.
- (FILE_REMOVABLE_MEDIA, FILE_READ_ONLY_DEVICE, FILE_FLOPPY_DISKETTE)
- (FILE_WRITE_ONCE_MEDIA, FILE_REMOTE_DEVICE, FILE_DEVICE_IS_MOUNTED)
- (FILE_VIRTUAL_VOLUME, FILE_AUTOGENERATED_DEVICE_NAME)
- FILE_DEVICE_SECURE_OPEN): Define Device Characteristics.
- (struct _FILE_FS_DEVICE_INFORMATION): Define.
- * path.cc (MAX_FS_INFO_CNT): Remove.
- (fsinfo): Remove.
- (fsinfo_cnt): Remove.
- (fs_info::update): Rewrite using native NT functions. Drop fs_info
- cashing since it's incorrect.
- (path_conv::fillin): Use NtQueryInformationFile. Drop setting serial
- number.
- (path_conv::check): Accommodate new fs_info::update parameters.
- (fillout_mntent): Ditto.
- * path.h (fs_info): Drop serial, has_ea and drive_type status
- flags.
- (fs_info::update): Declare with new parameters.
- (path_conf::drive_type): Remove.
- (path_conf::fs_has_ea): Remove.
- (path_conf::volser): Remove.
-
-2007-08-01 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (check_posix_perms): Remove.
- (fhandler_base::fpathconf): Return value of pc.has_acls () instead
- of calling check_posix_perms.
-
-2007-08-01 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (rename): Use unchanged path_conv in condition.
-
-2007-08-01 Corinna Vinschen <corinna@vinschen.de>
-
- * smallprint.cc (__small_vsprintf): Add format specifier 'W' for
- PWCHAR arguments. Move wide char handling after char handling.
-
-2007-07-31 Corinna Vinschen <corinna@vinschen.de>
-
- * ntdll.h (RtlFreeAnsiString): Declare.
- * ntdll.h (RtlFreeOemString): Declare.
- * ntdll.h (RtlUnicodeStringToAnsiString): Declare.
- * ntdll.h (RtlUnicodeStringToOemString): Declare.
- * smallprint.cc: Renamed from smallprint.c. Drop unnecessary
- forward declarations.
- (__small_vsprintf): Add format specifiers 'C' for WCHAR arguments
- and 'S' for PUNICODE_STRING arguments.
-
-2007-07-31 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::link): Revert to checking
- for binary in case of .exe files.
- * ntdll.h (RtlPrefixUnicodeString): Declare.
- * path.cc (path_conv::is_binary): New method.
- * path.h (path_conv::is_binary): Declare.
- * syscalls.cc (rename_append_suffix): New static helper function for
- rename.
- (rename): Rewrite. New suffix tests. Use native NT functions.
-
-2007-07-30 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::facl): If file can't be
- opened for reading the ACLs, fall back to faking them.
- * sec_acl.cc (acl_worker): Handle non-existing files.
- * security.cc (get_file_attribute): Return ILLEGAL_UID/ILLEGAL_GID
- as owner/group for non-readable ACLs on file systems supporting them.
-
-2007-07-30 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (stat_worker): Don't call build_fh_pc with invalid pc.
-
-2007-07-29 Christopher Faylor <me+cygwin@cgf.cx>
-
- * fhandler.cc (fhandler_base::wait_overlapped): Handle read EOF better
- and issue a SIGPIPE when we get ERROR_NO_DATA.
-
-2007-07-29 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Don't allow
- FileAttributes set to 0 when calling NtSetInformationFile since it has
- a special meaning.
- (fhandler_disk_file::facl): Ditto.
- (fhandler_disk_file::link): Only set attributes after copying files.
- Use SetFileAttributesW.
- * syscalls.cc (unlink_nt): Only care for actual FILE_ATTRIBUTE_READONLY.
- Don't allow FileAttributes set to 0 when calling NtSetInformationFile.
- After marking for deletion, restore R/O attribute on files to
- accommodate hardlinks.
-
-2007-07-29 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::link): Use FILE_ANY_ACCESS.
- (fhandler_base::utimes_fs): Fix white space.
- (fhandler_disk_file::lock): Remove 9x blurb from comment.
- (fhandler_disk_file::mkdir): Use NtCreateFile/NtClose instead of
- CreateDirectoryA.
- (fhandler_disk_file::rmdir): Accommodate changes to unlink_nt.
- Simplify post-delete SMB-related tests. Use NtQueryAttributesFile
- instead of GetFileAttributes.
- * ntdll.h (STATUS_DIRECTORY_NOT_EMPTY): Define.
- (NtQueryAttributesFile): Declare.
- * syscalls.cc (unlink_nt): Return NTSTATUS. Drop setattrs parameter.
- Never use FILE_DELETE_ON_CLOSE, always use
- NtSetInformationFile(FileDispositionInformation) instead.
- Check for R/O attributes and open file with FILE_WRITE_ATTRIBUTES
- access if any of them are set. Remove R/O attributes before
- marking for delete if necessary. Revert them afterwards if necessary.
- (unlink): Accommodate changes to unlink_nt.
-
-2007-07-29 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc: Use get_handle throughout.
- (fhandler_disk_file::fchmod): Always try to open file with required
- access rights. Use NtSetInformationFile instead of SetFileAttributes.
- (fhandler_disk_file::facl): Use NtSetInformationFile instead of
- SetFileAttributes.
- (fhandler_base::utimes_fs): Change lastaccess and lastwrite to
- LARGE_INTEGER. Drop 9x directory case. Use NtSetInformationFile
- instead of SetFileAttributes. Drop temporarily changing R/O attribute
- since NtSetInformationFile(FileBasicInformation) also works on R/O
- files.
- * ntdll.h (STATUS_NOT_SUPPORTED): Define.
-
-2007-07-29 Christopher Faylor <me+cygwin@cgf.cx>
-
- * cygtls.h (_cygtls::inside_kernel): Move function declaration into
- _cygtls class.
- * exceptions.cc (_cygtls::inside_kernel): Move function definition into
- _cygtls class.
-
- * fhandler.cc (fhandler_base::wait_overlapped): Make return tri-state
- to detect when there is a EINTR situation. Add a pointer to a length
- parameter. Move GetOverlappedResult into this function.
- (fhandler_base::read_overlapped): Accommodate above changes and loop if
- we receive a restartable signal.
- (fhandler_base::write_overlapped): Ditto.
- * fhandler.h (fhandler_base::wait_overlapped): Reflect above changes.
- * fhandler_fifo.cc (fhandler_fifo::wait): Ditto.
-
-2007-07-28 Corinna Vinschen <corinna@vinschen.de>
-
- * ntdll.h (RtlEqualUnicodePathPrefix): Rename from RtlEqualPathPrefix.
- (RtlEqualUnicodePathSuffix): Rename from RtlEqualPathSuffix.
- * fhandler_disk_file.cc (fhandler_disk_file::link): Accommodate above
- change.
-
-2007-07-28 Corinna Vinschen <corinna@vinschen.de>
-
- * ntdll.h (RtlInitCountedUnicodeString): Swap order of string and length
- parameters to be the same as for RtlInitEmptyUnicodeString.
- (RtlEqualPathPrefix): New inline function.
- (RtlEqualPathSuffix): New inline function.
- * fhandler_disk_file.cc: Accommodate parameter order change of
- RtlInitEmptyUnicodeString throughout.
- (fhandler_disk_file::link): Do path checking in unicode. Call
- CopyFileW instead of CopyFileA.
-
-2007-07-27 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (CreateHardLinkA): Remove.
- * fhandler_disk_file.cc (fhandler_disk_file::link): Drop GetBinaryType
- test. Just check exe suffix instead. Tune creating new file name.
- Implement creating hard link using native NT functions which works
- on all platforms.
- * ntdll.h (STATUS_INVALID_DEVICE_REQUEST): Define.
- (struct _FILE_LINK_INFORMATION): Define.
-
-2007-07-27 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::ftruncate): Use
- NtQueryInformationFile instead of GetFileSize, NtFsControlFile instead
- of DeviceIoControl.
-
-2007-07-27 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_base::fstat_by_name): Use
- RtlSplitUnicodePath.
- (fhandler_disk_file::fstat): Rename oret to opened. Open file using NT
- functions right here. Try to open parent dir instead of root directory
- to avoid call to rootdir. Use NtFsControlFile.
- * ntdll.h (RtlSplitUnicodePath): Define.
-
-2007-07-27 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (is_volume_mountpoint): New static inline
- function.
- (path_conv::ndisk_links): Call is_volume_mountpoint.
- (fhandler_disk_file::readdir_helper): Ditto.
-
-2007-07-27 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (enum query_state): Drop redundant query_stat_control.
- * fhandler.cc (fhandler_base::open): Ditto. Add READ_CONTROL to
- access and FILE_OPEN_FOR_BACKUP_INTENT to create_options when opening
- for writing. Always set security attributes to avoid calling
- has_acls.
- * fhandler_disk_file.cc (fhandler_base::fstat_fs): Don't try to
- open file twice.
-
-2007-07-26 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc (readdir_worker): Drop dir parameter from call to
- readdir_get_ino.
- * fhandler.h (fhandler_disk_file::readdir_helper): Switch file name
- parameter to PUNICODE_STRING.
- * fhandler_disk_file.cc: Drop including ntdef.h.
- (class __DIR_mounts): Store mount points in UNICODE. Additionally
- store cygdrive prefix in unicode here. Change methods accordingly.
- (__DIR_mounts::eval_ino): Call new stat_worker instead of lstat64.
- (__DIR_mounts::~__DIR_mounts): New destructor to free UNICODE buffers.
- (path_conv::ndisk_links): Rewrite using native NT functions.
- (fhandler_base::fstat_by_handle): Use NAME_MAX instead of CYG_MAX_PATH.
- Always set pfvi->VolumeSerialNumber to non-0. Remove last resort
- code.
- (fhandler_base::fstat_by_name): Rewrite using native NT functions.
- (fhandler_base::fstat_fs): Always call fstat_by_name if fstat_by_handle
- fails.
- (fhandler_base::fstat_helper): Rely on dwVolumeSerialNumber.
- (fhandler_disk_file::facl): Call fstat_by_name if fstat_by_handle fails.
- (DIR_BUF_SIZE): Define using NAME_MAX instead of CYG_MAX_PATH.
- (__DIR_cache): Remove __name.
- (d_dirname): Remove.
- (fhandler_disk_file::opendir): Drop pathname length check.
- Remove outdated comment. Use get_name method instead of accessing
- pc.normalized_path directly.
- (readdir_get_ino): Drop unused dir parameter. Accomodate throughout.
- Allocate fname dynamically. Call new stat_worker instead of lstat64.
- Call NtOpenFile instead of CreateFile. Call NtClose instead of
- CloseHandle.
- (fhandler_disk_file::readdir_helper): Use native NT functions.
- Check for volume mount points and use correct inode number.
- (fhandler_disk_file::readdir): Simplify slightly.
- Use get_name instead of pc.normalized_path.
- (fhandler_disk_file::rewinddir): Use RtlInitUnicodeString.
- (fhandler_cygdrive::fstat): Ignore floppy drives. Set st_nlink
- correctly.
- (fhandler_cygdrive::readdir): Ignore floppy drives.
- * fhandler_netdrive.cc (fhandler_netdrive::readdir): Accommodate
- change to readdir_get_ino.
- * fhandler_proc.cc (PROC_DIR_COUNT): Define.
- (fhandler_proc::fstat): Evaluate correct link count for /proc.
- * ntdll.h (struct _FILE_DIRECTORY_INFORMATION): Define.
- (NtFsControlFile): Declare.
- (RtlAppendUnicodeToString): Declare.
- (RtlAppendUnicodeStringToString): Declare.
- (RtlCompareUnicodeString): Declare.
- (RtlCopyUnicodeString): Declare.
- (RtlCreateUnicodeStringFromAsciiz): Declare.
- (RtlEqualUnicodeString): Declare.
- (RtlFreeUnicodeString): Declare.
- (RtlInitEmptyUnicodeString): Declare.
- (RtlSecondsSince1970ToTime): Declare.
- (RtlInitEmptyUnicodeString): Define as inline function.
- (RtlInitCountedUnicodeString): Define as inline function.
- * path.cc (path_conv::check): New method with PUNICODE_STRING as path,
- preliminary implementation.
- (mount_info::get_mounts_here): Change to create UNICODE_STRINGs.
- Also copy cygpath prefix into UNICODE_STRING.
- (is_floppy): Drop 9x consideration.
- * path.h: Drop including ntdef.h.
- (path_conv::check): Add declaration.
- (path_conv::path_conv): Add constructor for UNICODE_STRING paths.
- * shared_info.h (mount_info::get_mounts_here): Change declaration.
- * syscalls.cc: Drop forward declaration of stat_worker.
- (stat_worke): Take path_conv as parameter. Drop nofollow flag.
- (stat64): Create matching path_conv and call stat_worker with it.
- (lstat64): Ditto.
- * winsup.h: Include ntdef.h.
- (stat_worker): Declare.
- (readdir_get_ino): Change declaration.
-
-2007-07-25 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (CreateToolhelp32Snapshot): Remove.
-
-2007-07-25 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (Process32First): Remove.
- (Process32Next): Remove.
-
-2007-07-25 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (NetWkstaUserGetInfo): Remove.
- (CharToOemBuffA): Remove.
- (KillTimer): Remove.
- (OemToCharBuffA): Remove.
- (SetTimer): Remove.
-
-2007-07-20 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (DLL_OFILES): Add sec_auth.o.
- * fhandler.cc (fhandler_base::fhaccess): Accommodate interface changes
- of access control functions throughout.
- * fhandler_disk_file.cc: Ditto.
- * fhandler_registry.cc: Ditto.
- * sec_acl.cc: Drop unnecessary includes.
- (setacl): Take path_conv instead of file name as parameter.
- Accommodate interface changes of access control functions.
- (getacl): Ditto.
- * sec_auth.cc: New file, taking over all authentication related
- functions from security.cc.
- * sec_helper.cc: Drop unnecessary includes.
- * security.cc: Ditto. Move all authentication related functions to
- sec_auth.cc.
- (ALL_SECURITY_INFORMATION): New define. Use throughout.
- (set_file_sd): New function, replacing read_sd and the file related
- part of get_nt_object_security.
- (get_reg_sd): Rename from get_reg_security. Drop type parameter.
- (get_reg_attribute): New function, replacing the registry related part
- of get_nt_object_security.
- (get_file_attribute): Take path_conv instead of file name as parameter.
- Use new get_file_sd call.
- (set_file_attribute): Ditto plus new set_file_sd. Drop unnecessary
- implementation without uid/gid parameters.
- (check_file_access): Take path_conv instead of file name as parameter.
- Use new get_file_sd call.
- (check_registry_access): Use new get_reg_sd call.
- * security.h: Accommodate above interface changes.
-
-2007-07-19 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (set_nt_attribute): Remove.
- (set_file_attribute): Do it yourself instead of calling
- set_nt_attribute.
-
-2007-07-19 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_base::fstat_by_name): Use
- NtQueryFullAttributesFile instead of FindFirstFile.
- (fhandler_base::fstat_fs): Drop check for exec_state. Drop check for
- invalid characters.
- * ntdll.h (struct _FILE_NETWORK_OPEN_INFORMATION): Define.
- (NtQueryFullAttributesFile): Declare.
-
-2007-07-19 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::open): Drop local wpath and upath
- variables. Call pc.get_object_attr to create object attributes.
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Ditto.
- * syscalls.cc (unlink_nt): Ditto.
- * path.cc (path_conv::set_normalized_path): Set wide_path to NULL.
- (path_conv::get_nt_native_path): Drop parameter. Create path in
- wide_path/uni_path members.
- (path_conv::get_object_attr): New method to create object attributes.
- (path_conv::get_wide_win32_path): New method to create Win32 wide path.
- (path_conv::check): Initialize wide_path to NULL.
- (path_conv::~path_conv): cfree wide_path.
- * path.h (class path_conv): New members wide_path and uni_path.
- Add declarations of get_object_attr and get_wide_win32_path.
- (path_conv::path_conv): Initialize wide_path to NULL.
- (path_conv::get_nt_native_path): Drop parameter.
-
-2007-07-19 Corinna Vinschen <corinna@vinschen.de>
-
- * sec_helper.cc: Remove unused code.
-
-2007-07-19 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (SetSecurityDescriptorControl): Drop.
- * security.cc (alloc_sd): Set security descriptor control flag without
- calling SetSecurityDescriptorControl function.
- * wincap.h (wincapc::has_dacl_protect): Rename from
- has_security_descriptor_control.
- * wincap.cc: Ditto throughout.
-
-2007-07-19 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (SetUserObjectSecurity): Drop.
- * pinfo.cc (pinfo::set_acl): Use NtSetSecurityObject instead of
- SetKernelObjectSecurity.
- * spawn.cc (spawn_guts): Use NtSetSecurityObject instead of
- SetUserObjectSecurity.
- * uinfo.cc (cygheap_user::init): Ditto.
-
-2007-07-19 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.h (init_cygheap::luid): Remove.
- * mmap.cc (mlock): Accommodate parameter change in call to
- push_thread_privilege.
- (munlock): Ditto.
- * ntdll.h (STATUS_NOT_ALL_ASSIGNED): Define.
- (NtAdjustPrivilegesToken): Declare.
- * sec_helper.cc (cygpriv): Reorder to match numerical privilege order.
- (privilege_luid): Take job of privilege_luid_by_name, using new
- cygpriv.
- (privilege_luid_by_name): Remove.
- (privilege_name): Accommodate new cygpriv array.
- (set_privilege): Call NtAdjustPrivilegesToken to avoid using advapi32.
- Accommodate changes to privilege_name.
- (set_cygwin_privileges): Simplify. Don't try to set
- SE_CREATE_GLOBAL_PRIVILEGE on systems not supporting it.
- * security.cc (sys_privs): Reorder to match numerical privilege order.
- Use real privilege values as defined in security.h.
- (get_system_priv_list): Drop unused grp_list argument. Create
- list of privileges according to new wincapc::max_sys_priv value.
- (get_priv_list): Call privilege_luid instead of privilege_luid_by_name.
- Make priv a local value instead of a pointer.
- (create_token): Accommodate parameter change in call to
- push_self_privilege.
- (lsaauth): Ditto.
- (check_access): Use privilege values directly instead of calling
- privilege_luid.
- * security.h: Define real privilege values.
- (cygpriv_idx): Remove.
- (privilege_luid): Change declaration.
- (privilege_luid_by_name): Drop declaration.
- (set_privilege): Change declaration.
- (set_process_privilege): Drop definition.
- (_push_thread_privilege): Accomodate new set_privilege parameters.
- * wincap.h (wincapc::max_sys_priv): New element.
- * wincap.cc: Implement above element throughout.
- (wincap_2000sp4): New wincaps structure.
- (wincap_xpsp1): Ditto.
- (wincap_xpsp2): Ditto.
- (wincapc::init): Use new wincaps.
- (wincapc::max_sys_priv): New element.
-
-2007-07-19 Corinna Vinschen <corinna@vinschen.de>
-
- * dcrt0.cc (dll_crt0_0): Call set_cygwin_privileges here, after
- initializing hProcToken.
- * sec_helper.cc (init_global_security): Don't call set_cygwin_privileges here.
-
-2007-07-18 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.h (shared_prefix): De-const.
- (shared_prefix_buf): Add static buffer for shared prefix to avoid
- additional allocation.
- * cygheap.cc (cygheap_init): Set cygheap->shared_prefix to
- cygheap->shared_prefix_buf and strcpy.
-
-2007-07-17 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::fhaccess): Add check for R/O file system.
- * security.cc (check_registry_access): Set errno to EROFS when checking
- for W_OK.
-
-2007-07-17 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Move setting
- cfd->nohandle where it won't crash.
-
-2007-07-16 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.h (cygheap_user::curr_imp_token): Rename from current_token.
- Accommodate change throughout Cygwin.
- (cygheap_user::imp_token): Rename from token. Accommodate change
- throughout Cygwin.
- (rcygheap_user::eimpersonate): Use primary token for impersonation.
- * grp.cc (internal_getgroups): Use primary impersonation token when
- impersonated.
- * security.h (_push_thread_privilege): Use primary impersonation token
- when impersonated.
-
-2007-07-14 Christopher Faylor <me+cygwin@cgf.cx>
-
- * init.cc (in_dllentry): Delete.
- (dll_entry): Remove assignment to deleted variable.
- * winsup.h (in_dllentry): Delete declaration.
- * exceptions.cc (inside_kernel): Use another method to see if we are in
- dll_entry phase.
-
-2007-07-13 Christopher Faylor <me+cygwin@cgf.cx>
-
- * init.cc (in_dllentry): Make NO_COPY to avoid spurious false
- positives.
-
-2007-07-09 Christopher Faylor <me+cygwin@cgf.cx>
-
- * debug.cc (close_handle): Change debug output format slightly.
-
- * dlfcn.cc (dlclose): Don't close handle returned from
- GetModuleHandle(NULL).
-
- * fhandler.h (fhandler_pipe::create): Remove obsolete argument.
- (fhandler_pipe::create): Ditto.
- * fhandler.cc (fhandler_pipe::create): Ditto.
- (fhandler_pipe::create): Ditto.
-
-2007-07-09 Christopher Faylor <me+cygwin@cgf.cx>
-
- * strsig.cc (__signals): New macro.
- (sys_sigabbrev): New array of signal strings, patterned after linux.
- (siglist): Use __signals.
- * include/cygwin/signal.h (sys_sigabbrev): Define.
- * include/cygwin/version.h: Bump API minor version to 177.
-
-2007-07-09 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc (closedir): Revert change from 2007-06-29.
- * fhandler.h (dirent_valid_fd): Drop.
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): If opening a
- real dir, use the underlying fhandler to keep track of the directory
- handle. In fdopendir case use original io_handle from fhandler. Use
- fhandler's io_handle in subsequent directory functions throughout.
- Create handle non-inheritable and set close-on-exec flag.
- (readdir_get_ino): Drop dirent_isroot case.
- (fhandler_disk_file::readdir): Handle dirent_isroot case here.
- (fhandler_disk_file::rewinddir): Revert change from 2007-07-05. Use
- NtClose instead of CloseHandle.
- * fhandler_virtual.cc (fhandler_virtual::opendir): Drop adding
- dirent_valid_fd flag. Set close-on-exec flag.
-
-2007-07-08 Christopher Faylor <me+cygwin@cgf.cx>
-
- * Makefile.in (DLL_OFILES): Add newly-imported random.o. Eliminate
- reliance on libiberty.
- * random.cc: Import from FreeBSD. Modify for Cygwin environment.
- * include/cygwin/stdlib.h (random): Reflect change in return value to
- be more linux/freebsd-like.
- (srandom): Ditto.
-
-2007-07-07 Christopher Faylor <me+cygwin@cgf.cx>
-
- * fhandler.h (fhandler_base::write): Remove __stdcall decoration.
- (fhandler_pipe::write): Ditto.
- (fhandler_fifo::write): Ditto.
-
-2007-07-07 Christopher Faylor <me+cygwin@cgf.cx>
-
- Preliminary change to make pipes interruptible and fifos reliable.
- * dtable.cc (dtable::find_fifo): Eliminate definition.
- * dtable.h (dtable::find_fifo): Ditto for declaration.
- * fhandler.cc (fhandler_base::raw_read): Remove pipe-specific stuff.
- (fhandler_base::fhandler_base): Ditto.
- (fhandler_base::close): Handle overlapped I/O structure if appropriate.
- (fhandler_base::dup): Ditto.
- (fhandler_base::fork_fixup): Ditto.
- (fhandler_base::setup_overlapped): Define new function.
- (fhandler_base::destroy_overlapped): Ditto.
- (fhandler_base::wait_overlapped): Ditto.
- (fhandler_base::read_overlapped): Ditto.
- (fhandler_base::write_overlapped): Ditto.
- * fhandler.h (fhandler_base::get_overlapped): Declare new function.
- (fhandler_base::setup_overlapped): Ditto.
- (fhandler_base::destroy_overlapped): Ditto.
- (fhandler_base::wait_overlapped): Ditto.
- (fhandler_base::read_overlapped): Ditto.
- (fhandler_base::write_overlapped): Ditto.
- (fhandler_base::get_guard): Eliminate.
- (fhandler_pipe::*): Rework to eliminate most Win9x related cruft,
- removing many variables and defining a new overlapped capability.
- (fhandler_fifo::*): Ditto.
- (fifo_state): Declare new enum.
- * fhandler_fifo.cc (fhandler_fifo::fhandler_fifo): Remove old Win9x
- stuff. Initialize overlapped handle to NULL.
- (fhandler_fifo::set_use): Eliminate.
- (fhandler_fifo::open_nonserver): Define.
- (fhandler_fifo::open): Rework to use named pipes and overlapped I/O.
- (fhandler_fifo::wait): Define new function to wait for named pipe
- connection.
- (fhandler_fifo::read): Rework to use wait() and new overlapped I/O
- functionality.
- (fhandler_fifo::write): Ditto.
- (fhandler_fifo::dup): Eliminate.
- * pinfo.cc (commune_process): Remove fifo handling.
- (_pinfo::commune_request): Ditto.
- * pinfo.h (picom): Ditto.
- * pipe.cc (fhandler_pipe::fhandler_pipe): Remove Win9x stuff.
- Initialize overlapped handle to NULL.
- (fhandler_pipe::open): Eliminate Win9x stuff.
- (fhandler_pipe::set_close_on_exec): Eliminate.
- (read_pipe): Eliminate.
- (fhandler_pipe::close): Ditto.
- (fhandler_pipe::fixup_after_exec): Ditto.
- (fhandler_pipe::fixup_in_child): Ditto.
- (fhandler_pipe::read): Rework to use overlapped I/O.
- (fhandler_pipe::write): New function using overlapped I/O.
- (fhandler_pipe::dup): Rework to eliminate Win9x stuff.
- (fhandler_pipe::create_selectable): Rework to eliminate Win9x and use
- overlapped I/O.
- * select.cc (peek_pipe): Rework to eliminate Win9x stuff and use
- overlapped I/O.
- (fhandler_base::ready_for_read): Ditto.
-
-2007-07-07 Christopher Faylor <me+cygwin@cgf.cx>
-
- * path.cc (symlink_info::check_shortcut): Handle device "symlinks"
- specially - don't posixify them.
-
-2007-07-07 Christopher Faylor <me+cygwin@cgf.cx>
-
- * fhandler_disk_file.cc: White space.
- * fhandler_proc.cc: Ditto.
- * fhandler_virtual.cc: Ditto.
-
-2007-07-07 Christopher Faylor <me+cygwin@cgf.cx>
-
- * fork.cc: White space.
- * net.cc: Ditto.
- * posix_ipc.cc: Ditto.
-
-2007-07-06 Corinna Vinschen <corinna@vinschen.de>
-
- * times.cc (gettimeofday): Align definition to POSIX.
-
-2007-07-06 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Export wcstol, wcstoll, wcstoul, wcstoull, wcsxfrm.
- * include/cygwin/version.h: Bump API minor number.
-
-2007-07-05 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Add missing
- OBJ_INHERIT flag when creating OBJECT_ATTRIBUTES.
- (fhandler_disk_file::rewinddir): Ditto.
-
-2007-07-04 Corinna Vinschen <corinna@vinschen.de>
-
- * times.cc: Define __timezonefunc__ before including time.h to protect
- definition of timezone function.
-
-2007-07-04 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/time.h: Switch to timezone variable by default. Add
- comment.
-
-2007-06-29 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Export fdopendir.
- * dir.cc (opendir): Call fhandler's opendir with fd set to -1.
- (fdopendir): New function.
- (seekdir64): Use dirent_info_mask.
- (rewinddir): Ditto.
- (closedir): Only release underlying file descriptor if it has been
- reserved by opendir itself.
- * fhandler.cc (fhandler_base::opendir): Accommodate new parameter.
- * fhandler.h (dirent_states): Add dirent_valid_fd and dirent_info_mask.
- (fhander_XXX::opendir): Add file descriptor parameter. Use regparms.
- (fhandler_procnet::opendir): Drop declaration.
- * fhandler_disk_file.cc (fhandler_disk_file::opendir): Ditto.
- If called from fdopendir, use existing handle to re-open directory
- with valid flags. Rename fd to cfd. Use only if no valid incoming fd.
- (fhandler_cygdrive::opendir): Accommodate new parameter.
- * fhandler_process.cc (fhandler_process::opendir): Ditto.
- * fhandler_procnet.cc (fhandler_procnet::opendir): Drop definition.
- * fhandler_virtual.cc (fhandler_virtual::opendir): Accommodate new
- parameter. Only create new file descriptor entry if called from
- opendir. Remove duplicated setting of dir->__flags.
- * posix.sgml: Add fdopendir to list of implemented Solaris functions.
- * include/cygwin/version.h: Bump API minor number.
- * include/sys/dirent.h: Declare fdopendir.
-
-2007-06-28 Brian Dessent <brian@dessent.net>
-
- * include/cygwin/version.h: Fix comment typo.
-
-2007-06-28 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din: Export stpcpy, stpncpy.
- * posix.sgml: Add stpcpy and stpncpy to list of implemented
- GNU extensions.
- * include/cygwin/version.h: Bump API minor number.
-
-2007-06-27 Corinna Vinschen <corinna@vinschen.de>
-
- * shared_info.h (SHARED_INFO_CB): Accommodate change to shared_info.
- (CURR_SHARED_MAGIC): Ditto.
- (class shared_info): Add heap_slop_inited member.
- * shared.cc (shared_info::heap_slop_size): Use heap_slop_inited to
- track initializing heap_slop since 0 is a valid value for heap_slop.
- Drop useless < 0 consideration.
-
-2007-06-27 Eric Blake <ebb9@byu.net>
-
- * assert.cc (__assert_func): New function, to match newlib header
- change.
- * cygwin.din: Export __assert_func.
- * include/cygwin/version.h: Bump API minor number.
-
-2007-06-21 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (WSAIoctl): Remove.
- * cygwin.din: Export freeifaddrs, getifaddrs.
- * fhandler_socket.cc (fhandler_socket::ioctl): Drop SOCKET parameter
- from get_ifconf.
- * net.cc: Include ifaddrs.h.
- (in_are_prefix_equal): Match addresses in network byte order.
- (ip_addr_prefix): Convert address into host byte order before
- testing with IN_LOOPBACK.
- (struct ifall): Define.
- (get_xp_ifs): Replace get_xp_ifconf. Return struct ifall array.
- (get_2k_ifs): Ditto, replace get_2k_ifconf.
- (get_nt_ifs): Ditto, replace get_nt_ifconf.
- (getifaddrs): New function.
- (freeifaddrs): New function.
- (get_ifconf): Call matching get_XX_ifs function and create
- ifc content from here. Drop lo fake since it's now in get_nt_ifs.
- * posix.sgml: Add freeifaddrs and getifaddrs to list of implemented
- BSD functions.
- * wincap.h (wincapc::has_broken_if_oper_status): New element.
- * wincap.cc: Implement above element throughout.
- * include/ifaddrs.h: New file.
- * include/cygwin/version.h: Bump API minor number.
-
-2007-06-20 Eric Blake <ebb9@byu.net>
-
- * cygwin.din: Export exp10, exp10f, pow10, pow10f, strcasestr,
- funopen, fopencookie.
- * include/cygwin/version.h: Bump API minor number.
- * posix.sgml: Minor improvements.
-
-2007-06-20 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/if.h (IFF_POINTOPOINT): Fix typo.
-
-2007-06-16 Christopher Faylor <me+cygwin@cgf.cx>
-
- * include/search.h: Reinstate node_t definition.
-
-2007-06-16 Christopher Faylor <me+cygwin@cgf.cx>
-
- * include/sys/cdefs.h: Remove in favor of newlib version.
-
-2007-06-14 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (GetIpForwardTable): Define.
- * fhandler_socket.cc (fhandler_socket::ioctl): Handle SIOCGIFDSTADDR.
- * net.cc (get_routedst): New static function to get destination
- address of point-to-point interfaces.
- (get_xp_ifconf): Handle SIOCGIFDSTADDR.
- (get_2k_ifconf): Ditto.
- (get_nt_ifconf): Ditto.
- (get_ifconf): Ditto.
- * include/asm/socket.h (SIOCGIFDSTADDR): Define.
- * include/cygwin/if.h (struct ifreq): Add ifru_dstaddr member.
- (ifr_dstaddr): Define.
- * include/cygwin/in.h: Cast ipv4 addresses correctly to in_addr_t in
- definitions.
-
-2007-06-12 Christopher Faylor <me+cygwin@cgf.cx>
-
- * signal.cc (usleep): Use useconds_t for the type as per POSIX.
-
-2007-06-12 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (DLL_OFILES): Add xsique.o.
- * cygwin.din (confstr): Make NOSIGFE.
- (insque): Export.
- (remque): Export.
- * lsearch.cc: Remove superfluous _SEARCH_PRIVATE define.
- * posix.sgml: Move insque to defined SUSv3 interfaces. Remove
- comment for remque.
- * include/search.h: Remove _SEARCH_PRIVATE guarded definitions.
- Add struct qelem definition. Add insque and remque declarations.
- * include/cygwin/version.h: Bump API minor number.
- * include/sys/queue.h: Remove insque/remque definitions so as not
- to collide with SUSv3 compatible declaration in search.h.
- * libc/xsique.cc: New file implementing insque and remque.
-
-2007-06-12 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::fstat): Set pipe permission bits more
- correctly.
-
-2007-06-11 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din (confstr): Export.
- * posix.sgml (confstr): Move to list of implemented SUSv3 functions.
- * sysconf.cc (confstr): Implement.
- * include/cygwin/version.h: Bump API minor number.
-
-2007-06-05 Corinna Vinschen <corinna@vinschen.de>
-
- * ansi.sgml: Delete.
- * misc-std.sgml: Delete.
- * posix.sgml: Rework entirely.
-
-2007-05-29 Corinna Vinschen <corinna@vinschen.de>
-
- * dtable.cc (dtable::set_file_pointers_for_exec): Call SetFilePointer
- correctly for 64 bit file access. Comment out functionality.
- * fhandler.cc (fhandler_base::open): Don't set append_mode.
- (fhandler_base::write): Check for O_APPEND instead of append_mode.
- Call SetFilePointer correctly for 64 bit file access. Handle
- errors from SetFilePointer.
- * fhandler.h (class fhandler_base): Drop append_mode status flag.
- * fhandler_disk_file.cc (fhandler_base::fstat_helper): Handle
- seeking correctly for 64 bit file access.
-
-2007-05-22 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (cwdstuff::set): Revert useless acquire check.
-
-2007-05-22 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (cwdstuff::set): Avoid double aquiring of cwd_lock.
- Open directory with inheriting enabled.
-
-2007-05-21 Christian Franke <franke@computer.org>
-
- * fhandler_floppy.cc (fhandler_dev_floppy::lseek): Don't invalidate
- devbuf if new position is within buffered range.
-
-2007-05-21 Eric Blake <ebb9@byu.net>
-
- * include/search.h (hsearch_r): Provide declaration.
-
-2007-05-21 Christian Franke <franke@computer.org>
- Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_floppy.cc (fhandler_dev_floppy::lseek): Set buf size to
- sector size. Simplify non-sector aligned case. Handle errors from
- raw_read.
-
-2007-05-15 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (adjust_socket_file_mode): New inline function.
- (fhandler_socket::fchmod): Squeeze mode through adjust_socket_file_mode
- before using it.
- (fhandler_socket::bind): Ditto.
-
-2007-03-19 Ryan C. Gordon <icculus@icculus.org>
-
- * path.cc (fs_info::update): Set and use is_cdrom.
- * path.cc (fillout_mntent): Set ret.mnt_type to something more
- Linux-like, based on data from fs_info. Move "system" and "user"
- strings from mnt_type to mnt_opts.
- * path.h (struct fs_info): Add is_cdrom field.
- * path.h (fs_info::clear): Initialize is_cdrom.
- * path.h (struct fs_info): Add IMPLEMENT_STATUS_FLAG(bool,is_cdrom).
- * path.h (class path_conv): Add fs_is_cdrom method. Add missing
- fs_is_netapp method.
-
-2007-05-14 Eric Blake <ebb9@byu.net>
-
- * cygwin.din (asnprintf, dprint, _Exit, vasnprintf, vdprintf): Export.
- * include/cygwin/version.h: Bump API minor number.
-
-2007-04-18 Brian Dessent <brian@dessent.net>
-
- * cygwin.sc: Remove duplicated .debug_macinfo section.
- * dllfixdbg: Also copy DWARF-2 sections into .dbg file.
-
-2007-04-06 Eric Blake <ebb9@byu.net>
-
- * include/stdint.h (WINT_MIN): Fix sign.
-
-2007-04-04 Eric Blake <ebb9@byu.net>
-
- * include/stdint.h (WINT_MIN, WINT_MAX): Fix definition.
-
-2007-03-30 Christopher Faylor <me@cgf.cx>
-
- * external.cc (cygwin_internal): Implement CW_SET_DOS_FILE_WARNING.
- * include/sys/cygwin.h: Define CW_SET_DOS_FILE_WARNING.
-
-2007-03-29 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.cc (cygheap_init): Fix formatting. Remove comment. Set
- shared_prefix depending only on terminal service capability.
- * dcrt0.cc (dll_crt0_1): Don't call set_cygwin_privileges here.
- * fhandler_fifo.cc (fhandler_fifo::open): Create the mutex as global
- object.
- * posix_ipc.cc (ipc_mutex_init): Use cygheap->shared_prefix.
- (ipc_cond_init): Ditto.
- * sec_helper.cc (privilege_name): Make static. Use LookupPrivilegeName
- directly to be independent of the state of cygheap.
- (set_privilege): Take a LUID as parameter instead of an index value.
- Only print debug output in case of failure.
- (set_cygwin_privileges): Add comment. Use LookupPrivilegeValue to
- get privilege LUIDs.
- (init_global_security): Call set_cygwin_privileges here.
- * security.h (privilege_name): Drop declaration.
- (set_privilege): Declare according to above change.
- (set_process_privilege): Call privilege_luid to get LUID.
- (_push_thread_privilege): Ditto.
- * shared.cc (open_shared): Add comment. On systems supporting the
- SeCreateGlobalPrivilege, try to create/open global shared memory first.
- Fall back to local shared memory if that fails.
- * thread.cc (semaphore::semaphore): Use cygheap->shared_prefix.
- * wincap.h (wincapc::has_create_global_privilege): New element.
- * wincap.cc: Implement above element throughout.
-
-2007-03-28 Christopher Faylor <me@cgf.cx>
-
- * spawn.cc (spawn_guts): Start pure-windows processes in a suspended
- state to avoid potential DuplicateHandle problems.
-
-2007-03-13 Eric Blake <ebb9@byu.net>
-
- * include/cygwin/stat.h (S_TYPEISMQ, S_TYPEISSEM, S_TYPEISSHM):
- Avoid compiler warnings.
-
-2007-03-07 Christopher Faylor <me@cgf.cx>
-
- * signal.cc (handle_sigprocmask): Remove extraneous
- sig_dispatch_pending.
-
-2007-03-07 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_proc.cc: Fix formatting. Drop setting errno when creating
- proc file content.
- (format_proc_uptime): Simplify.
- (format_proc_cpuinfo): Align more closely to output of Linux 2.6 kernel.
- Evaluate more data, especially for AMD CPUs.
-
-2007-03-06 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (fhandler_base::fstat_helper): Add creation time parameter.
- * glob.cc (stat32_to_stat64): Set st_birthtim to st_mtim.
-
-2007-03-06 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/stat.h (S_TYPEISMQ): Define.
- (S_TYPEISSEM): Dttio.
- (S_TYPEISSHM): Ditto.
-
-2007-03-06 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_mailslot.cc (fhandler_mailslot::fstat): Set new stat member
- st_birthtim to useful value.
- * fhandler_process.cc (fhandler_process::fstat): Ditto.
- * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Take
- additional parameter for creation time. Fill st_birthtim with it.
- Accomodate additional creation time parameter throughout.
- * fhandler_raw.cc (fhandler_dev_raw::fstat): Set new stat member
- st_birthtim to useful value.
- * fhandler.cc (fhandler_base::fstat): Ditto.
- * fhandler_registry.cc (fhandler_registry::fstat): Ditto.
- * include/cygwin/version.h: Bump API minor number.
- * include/cygwin/stat.h (struct __stat64): Replace st_spare4 with
- timestruc_t st_birthtim.
- (struct stat): Ditto if __CYGWIN_USE_BIG_TYPES__ is defined.
- (st_birthtime): Define if __CYGWIN_USE_BIG_TYPES__ is defined.
-
-2007-03-02 Corinna Vinschen <corinna@vinschen.de>
-
- * ntdll.h (struct _FILE_NAMES_INFORMATION): Define.
- * syscalls.cc (unlink_nt): Check shared directory for being empty
- before trying to move and mark for deletion.
-
-2007-03-02 Corinna Vinschen <corinna@vinschen.de>
-
- * security.cc (get_file_attribute): Avoid compiler warning.
-
-2007-03-01 Christopher Faylor <me@cgf.cx>
-
- * fork.cc (fork): Reset child to true after fork since it may have been
- reset by fork memory copies.
-
-2007-03-01 Christopher Faylor <me@cgf.cx>
-
- * Makefile (DLL_OFILES): Remove ntea.o
- * environ.cc (set_ntea): Delete.
- (parse_thing): Delete "ntea" setting.
- * fhandler.cc (fhandler_base::open): Remove allow_ntea considerations.
- (check_posix_perm): Ditto.
- * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Ditto.
- (fhandler_base::open_fs): Ditto.
- (fhandler_disk_file::mkdir): Ditto.
- * path.cc (symlink_worker): Ditto.
- * security.cc (get_file_attribute): Ditto.
- (set_file_attribute): Ditto.
- * security.h: Remove allow_ntea declaration.
-
-2007-02-27 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (close_user_proc_parms_cwd_handle): Remove.
- (cwdstuff::init): Don't call close_user_proc_parms_cwd_handle.
- Call set to set cwd with all-sharing handle.
- (cwdstuff::set): Fix comment. Don't close cwd handle. Set in
- user parameter block instead and close old cwd handle.
- * syscalls.cc (rename): Call unlink_nt instead of RemoveDirectory or
- DeleteFile to allow deleting shared files/directories.
-
-2007-02-27 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc(fhandler_base::open): Open with READ_CONTROL only in
- case of query_open flag set to query_read_control. Add case for
- new query_read_attributes flag.
- (fhandler_base::fstatvfs): New method.
- * fhandler.h (enum query_state): Add query_read_attributes flag.
- (class fhandler_base): Declare new virtual fstatvfs method.
- (class fhandler_socket): Ditto.
- (class fhandler_pipe): Ditto.
- (class fhandler_fifo): Ditto.
- (class fhandler_disk_file): Ditto.
- (class fhandler_virtual): Ditto.
- * fhandler_disk_file.cc (fhandler_base::fstat_fs): Open with
- query_read_attributes instead of query_read_control.
- (fhandler_disk_file::fstatvfs): New method.
- (fhandler_disk_file::facl): Open with query_read_attributes instead of
- query_read_control.
- * fhandler_fifo.cc (fhandler_fifo::fstatvfs): New method.
- * fhandler_socket.cc (fhandler_socket::fstatvfs): New method.
- (fhandler_socket::fchmod): Return with EBADF in the default case.
- (fhandler_socket::fchown): Ditto.
- (fhandler_socket::facl): Ditto.
- * fhandler_virtual.cc (fhandler_virtual::fstatvfs): Ditto.
- * ntdll.h (struct _FILE_FS_ATTRIBUTE_INFORMATION): Define.
- (struct _FILE_FS_FULL_SIZE_INFORMATION): Define.
- * pipe.cc (fhandler_pipe::fstatvfs): New method.
- * syscalls.cc (fstatvfs): Just call the fhandler's fstatvfs.
- (statvfs): Ditto.
- (fstatfs): Call fstatvfs.
- (statfs): Drop EFAULT handling.
-
-2007-02-26 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::fstat): Set all file times to arbitrary
- fixed value.
-
-2007-02-26 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_registry.cc (registry_listing): Drop name of HKEY_DYN_DATA.
- (registry_keys): Drop HKEY_DYN_DATA.
- * net.cc: Fix comment.
- * syslog.cc: Ditto.
-
-2007-02-26 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Drop comment.
- * mmap.cc (gen_access): Remove.
- (mmap_record::gen_access): Remove.
- (mmap64): Don't mention 9x any longer.
- * syscalls.cc (statvfs): Drop status code consideration for 9x.
- * libc/minires-os-if.c (get_registry_dns_items): Don't mention 9x any
- longer.
- (get_registry_dns): Drop getting registry key on 9x. Drop is9x
- variable.
-
-2007-02-23 Corinna Vinschen <corinna@vinschen.de>
-
- Throughout remove all usage of wincap.has_security.
- * environ.cc (environ_init): Drop setting allow_ntsec here.
- * grp.cc (initgroups32): Drop usage of label "out".
- * security.cc (allow_ntsec): Set to true by default.
- * syscalls.cc (seteuid32): Remove label success_9x.
- * wincap.cc: Remove has_security throughout.
- * wincap.h: Ditto.
-
-2007-02-23 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (class fhandler_pipe): Remove members writepipe_exists,
- orig_pid and id. Make hit_eof inline.
- * fhandler_fifo.cc (fhandler_fifo::open): Drop handling of
- writepipe_exists, orig_pid and id.
- * pipe.cc: Ditto throughout.
- (pipecount): Remove.
- (pipeid_fmt): Remove.
- (fhandler_pipe::hit_eof): Simplify. Move to fhandler.h.
- (fhandler_pipe::dup): Drop leave label.
- (fhandler_pipe::create): Drop has_unreliable_pipes case.
- * wincap.cc: Remove has_unreliable_pipes throughout.
- * wincap.h: Ditto.
-
-2007-02-23 Corinna Vinschen <corinna@vinschen.de>
-
- * devices.in: Change native device name to native NT device name for
- /dev/null, /dev/comX and /dev/ttySx.
- * devices.cc: Regenerate.
- * fhandler.cc (fhandler_base::open_9x): Remove.
- (fhandler_base::open): Don't test for DOS device name, don't call
- open_9x.
- (fhandler_dev_null::open): Remove.
- * fhandler.h (class fhandler_base): Drop open_9x declaration.
- (class fhandler_dev_null): Drop open declaration.
-
-2007-02-23 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_console.cc (fhandler_console::need_invisible): Drop
- pty_needs_alloc_console check.
- * spawn.cc (spawn_guts): Ditto.
- (av::fixup): Remove setting iscui.
- * syscalls.cc (rename): Drop has_move_file_ex checks. Remove 9x
- specific code.
- * wincap.cc: Remove has_move_file_ex and pty_needs_alloc_console
- throughout.
- * wincap.h: Ditto.
-
-2007-02-23 Corinna Vinschen <corinna@vinschen.de>
-
- * exceptions.cc (dummy_ctrl_c_handler): Remove.
- (init_console_handler): Drop has_null_console_handler_routine checks.
- * fhandler_raw.cc (fhandler_dev_raw::open): Drop has_raw_devices check.
- * fhandler_serial.cc (fhandler_serial::open): Drop
- .supports_reading_modem_output_lines check.
- * miscfuncs.cc (low_priority_sleep): Drop has_switch_to_thread check.
- * shared.cc (open_shared): Drop needs_memory_protection checks.
- * spawn.cc (spawn_guts): Drop start_proc_suspended check.
- * uname.cc (uname): Drop has_valid_processorlevel check.
- * wincap.cc: Remove has_raw_devices, has_valid_processorlevel,
- supports_reading_modem_output_lines, needs_memory_protection,
- has_switch_to_thread, start_proc_suspended and
- has_null_console_handler_routine throughout.
- * wincap.h: Ditto.
-
-2007-02-23 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::lseek): Drop 9x considerations.
- * fhandler_disk_file.cc (fhandler_disk_file::lock): Ditto.
- * wincap.cc: Remove lock_file_highword and has_64bit_file_access
- throughout.
- * wincap.h: Ditto.
-
-2007-02-22 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.h (struct cwdstuff): Remove sync member and keep_in_sync
- accessors.
- * external.cc (cygwin_internal): Drop call to cygheap->cwd.keep_in_sync.
- * fhandler_disk_file.cc (fhandler_disk_file::link): Always presume
- ability to create hard links.
- * path.cc (cwdstuff::init): Drop 9x considerations.
- (cwdstuff::keep_in_sync): Remove.
- (cwdstuff::set): Take NT for granted.
- * pinfo.h (cygwin_pid): Just return pid.
- * wincap.cc: Remove has_hard_links, can_open_directories,
- has_negative_pids, has_named_pipes, has_try_enter_critical_section,
- cant_debug_dll_entry and detect_win16_exe throughout.
- * wincap.h: Ditto.
-
-2007-02-22 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_console.cc (fhandler_console::read): Drop 9x specific
- handling of AltGr key.
- * mmap.cc: Take NT for granted throughout.
- * wincap.cc: Remove map_view_of_file_ex_sucks, altgr_is_ctrl_alt,
- has_working_copy_on_write, share_mmaps_only_by_name,
- virtual_protect_works_on_shared_pages, has_mmap_alignment_bug and
- has_working_virtual_lock throughout.
- * wincap.h: Ditto.
-
-2007-02-22 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::set_no_inheritance): Always use
- SetHandleInformation.
- * fhandler_disk_file.cc (fhandler_disk_file::lock): Always use
- UnlockFileEx/LockFileEx functions.
- * net.cc (fdsock): Don't bother to duplicate socket for inheritance.
- * sysconf.cc (get_nproc_values): Take NT for granted.
- (get_avphys): Ditto.
- * syslog.cc (WIN95_EVENT_LOG_PATH): Remove define.
- (get_win95_event_log_path): Remove.
- (vsyslog): Fix formatting. Take NT for granted.
- * wincap.cc: Remove has_lock_file_ex, has_signal_object_and_wait,
- has_eventlog, has_set_handle_information,
- has_set_handle_information_on_console_handles and supports_smp
- throughout.
- * wincap.h: Ditto.
-
-2007-02-22 Corinna Vinschen <corinna@vinschen.de>
-
- * dir.cc (rmdir): Move existance check in front of
- has_dot_last_component check. Simplify setting errno in latter case.
-
-2007-02-22 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.cc (fhandler_base::write): Remove wincap.has_lseek_bug case.
- Simplify seek beyond EOF case.
- * times.cc (times): Remove wincap.has_get_process_times case.
- * wincap.cc: Remove has_delete_on_close, has_page_guard,
- has_get_process_times and has_lseek_bug throughout.
- * wincap.h: Ditto.
-
-2007-02-22 Corinna Vinschen <corinna@vinschen.de>
-
- Throughout remove all usage of wincap.access_denied_on_delete.
- * dir.cc (rmdir): Add existance check to be errno-compatible with Linux.
- * fhandler_disk_file.cc (fhandler_disk_file::rmdir): Drop test for
- non-existent dir on 9x share.
- * syscalls.cc (unlink): Add comment.
- * wincap.cc: Remove access_denied_on_delete flag throughout.
- * wincap.h: Ditto.
-
-2007-02-22 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::closedir): Fix bug
- introduced by switching to NtClose.
-
-2007-02-22 Christopher Faylor <me@cgf.cx>
-
- * dcrt0.cc (child_info_fork::alloc_stack_hard_way): Change sense of
- guard test. Increase size of stack reserved and increase size before
- the current stack pointer. Use pointers when doing arithmetic.
- (dll_crt0_1): Initialize exception handler when we notice we're the
- child of a fork from non-main thread.
- * fork.cc (frok::parent): Make argument volatile.
- (frok::child): Ditto.
- (lock_signals): New class.
- (lock_pthread): Ditto.
- (hold_everhthing): Ditto.
- (frok::parent): Move atforkprepare and atforkparent to lock_pthread
- class.
- (fork): Make ischild boolean. Use hold_everything variable within
- limited scope to set various mutexes in such a way as to avoid
- deadlocks.
- * thread.h (pthread_mutex::tid): New variable, active when debugging
- for tracking thread id of owner.
- (pthread_mutex::set_owner): Set tid when debugging.
- * thread.cc (pthread_mutex::pthread_mutex): Clear tid.
- (pthread_mutex::_unlock): Ditto when unlocking.
- (pthread_mutex::fixup_after_fork): Set tid to special value after
- forking since owner is unknown.
-
-2007-02-22 Corinna Vinschen <corinna@vinschen.de>
-
- Throughout replace all usage of wincap.shared with the constant
- FILE_SHARE_VALID_FLAGS.
- * fhandler.cc (fhandler_base::open_9x): Drop local variable shared.
- * wincap.cc: Remove shared member throughout.
- * wincap.h: Ditto.
-
-2007-02-22 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (DLL_IMPORTS): Add libntdll.a.
- * autoload.cc: Remove all symbols from advapi32.dll, kernel32.dll and
- ntdll.dll available on all platforms since NT4.
-
- Throughout remove all usage of wincap.is_winnt.
- * dcrt0.cc (dll_crt0_0): Remove call to mmap_init.
- * fhandler.h (class fhandler_base): Remove has_changed flag.
- (fhandler_disk_file::touch_ctime): Remove declaration.
- (fhandler_disk_file::readdir_9x): Ditto.
- (fhandler_disk_file::touch_ctime): Remove.
- (fhandler_disk_file::readdir_9x): Remove.
- (fhandler_disk_file::closedir): Call NtClose instead of CloseHandle.
- * mmap.cc: Throughout call CreateMapping and MapView directly.
- (VirtualProt9x): Remove.
- (VirtualProtNT): Remove.
- (VirtualProtEx9x): Remove.
- (VirtualProtExNT): Remove.
- (VirtualProtect): Remove define.
- (VirtualProtectEx): Remove define.
- (CreateMapping9x): Remove.
- (CreateMappingNT): Rename to CreateMapping.
- (MapView9x): Remove.
- (MapViewNT): Rename to MapView.
- (struct mmap_func_t): Remove definition.
- (mmap_funcs_9x): Remove.
- (mmap_funcs_nt): Remove.
- (mmap_func): Remove.
- (mmap_init): Remove.
- * net.cc (getdomainname): Drop comment. Use NT4 registry key only.
- (get_95_ifconf): Remove.
- * pinfo.cc (winpids::enumNT): Rename to winpids::enum_processes.
- (winpids::enum9x): Remove.
- (winpids::set): Just call enum_processes directly.
- (winpids::enum_init): Ditto.
- * pinfo.h (class winpids): Drop enum_processes pointer. Rename
- enumNT to enum_processes. Drop enum9x declaration. Drop initialization
- of enum_processes throughout.
- * registry.cc (get_registry_hive_path): Just create NT key.
- (load_registry_hive): Only load NT specific file.
- * syscalls.cc (unlink_9x): Remove.
- (unlink): Just call unlink_nt.
- * wincap.cc: Remove is_winnt flag throughout.
- * wincap.h: Ditto.
- * winsup.h: Remove mmap_init declaration.
-
-2007-02-21 Corinna Vinschen <corinna@vinschen.de>
-
- * wincap.cc (wincap_unknown): Change settings for unknown to reflect
- the capabilities of NT4.
- (wincap_95): Remove.
- (wincap_95osr2): Remove.
- (wincap_98): Remove.
- (wincap_98se): Remove.
- (wincap_me): Remove.
- (wincap_nt3): Remove.
- (wincapc::init): Temporarily bail out on any 9x system.
-
-2007-02-20 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din (sem_unlink): Export.
- * posix_ipc.cc: Include thread.h and semaphore.h. Remove TODO
- comment.
- (ipc_names): Add max_len member. Set to maximum length of the path
- before tacking on the prefix path. Set prefix path for named semaphors
- to /dev/shm, as on Linux.
- (enum ipc_type_t): Change sem to semaphore to avoid name conflicts.
- (check_path): Detect empty paths. Use ipc_names's max_len member.
- Use __small_sprintf to create full object path name. Special case
- semaphores.
- (ipc_cond_init): Drop superfluous strcpy.
- (class ipc_flock): New class to simplify file locking in subsequent
- code.
- (struct mq_hdr): Raise size of mqh_uname to allow adding a unique
- LUID to the name.
- (mq_open): Fix formatting. Create unique synchronization object names
- using AllocateLocallyUniqueId.
- (struct sem_finfo): New structure defining named semaphore file content.
- (sem_open): Move here. Rework implementation to allow kernel
- persistent implementation of POSIX named semaphores.
- (_sem_close): Implement sem_close.
- (sem_close): Move here. Just call _sem_close with do_close parameter
- set to true.
- (sem_unlink): New function.
- * pthread.cc (mangle_sem_name): Remove.
- (sem_open): Move to posix_ipc.cc.
- (sem_close): Ditto.
- * syscalls.cc (close_all_files): Call semaphore::terminate here.
- * thread.cc: Fix formatting. Rearrange semaphore functions so that
- they are close together.
- (semaphore::semaphore): Rework to play nicely with new named semaphore
- implementation.
- (semaphore::_terminate): Call _sem_close if semaphore is a named
- semaphore.
- (semaphore::destroy): Don't destroy named semaphores. Return EINVAL
- instead.
- (semaphore::close): Only destroy named semaphores. Return EINVAL
- otherwise.
- (semaphore::open): Rework to play nicely with new named semaphore
- implementation. Loop through existing semaphores to be able to
- return same sem_t pointer as a former call on the same named semaphore.
- (semaphore::getinternal): New function called from _sem_close.
- * thread.h (class List): Make mx and head public.
- (class semaphore): Fix formatting. Align method declarations with
- implementation in thread.cc. Add members used for named semaphores.
- (semaphore::terminate): New static method.
- * include/semaphore.h: Redefine SEM_FAILED. Fix formatting.
- (sem_unlink): Add declaration.
- * include/cygwin/version.h: Bump API minor number.
-
-2007-02-20 Christopher Faylor <me@cgf.cx>
-
- * exceptions.cc (_cygtls::signal_exit): Only call myself.exit when when
- exit_state indicates that we've visited do_exit.
- * sync.h (lock_process::lock_process): Use renamed exit_state -
- ES_PROCESS_LOCKED.
- * winsup.h: Rename ES_MUTO_SET to ES_PROCESS_LOCKED.
-
-2007-02-20 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::bind): Remove printing wrong
- errno in debug output.
-
-2007-02-19 Christopher Faylor <me@cgf.cx>
-
- Remove extraneous whitespace.
- * pinfo.cc (commune_process): Use default argument to lock_process.
- * sigproc.cc: Update copyright.
- * select.cc: Ditto.
-
-2007-02-15 Corinna Vinschen <corinna@vinschen.de>
-
- * posix_ipc.cc (mq_open): Avoid compiler warning. Initialize mqhdr
- before using it in file exists case.
- * include/mqueue.h (mqd_t): Make non-pointer type.
-
-2007-02-15 Corinna Vinschen <corinna@vinschen.de>
-
- * posix_ipc.cc (ipc_mutex_init): Create global object name.
- (ipc_cond_init): Ditto.
- (struct mq_hdr): Add mqh_uname member to store synchronization object
- name.
- (mq_open): Create unique synchronization object name and store in
- mq_hdr->mqh_uname. Use this name in calls to ipc_mutex_init and
- ipc_cond_init.
-
-2007-02-14 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (DLL_OFILES): Add posix_ipc.o.
- * cygwin.din (mq_close): Export.
- (mq_getattr): Export.
- (mq_notify): Export.
- (mq_open): Export.
- (mq_receive): Export.
- (mq_send): Export.
- (mq_setattr): Export.
- (mq_timedreceive): Export.
- (mq_timedsend): Export.
- (mq_unlink): Export.
- * posix_ipc.cc: New file implementing the above functions. Move
- shm_open and shm_unlink from syscalls.cc here.
- * sysconf.cc (sca): Set value of _SC_MQ_OPEN_MAX to MQ_OPEN_MAX,
- _SC_MQ_PRIO_MAX to MQ_PRIO_MAX, _SC_MESSAGE_PASSING to
- _POSIX_MESSAGE_PASSING.
- * include/limits.h (MQ_OPEN_MAX): Define.
- (MQ_PRIO_MAX): Define.
- * include/mqueue.h: New file.
- * include/cygwin/version.h: Bump API minor number.
-
-2007-02-13 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/stdlib.h (valloc): Declare.
- (memalign): Declare.
-
-2007-02-09 Pierre A. Humblet <Pierre.Humblet@ieee.org>
-
- * libc/minires-os-if.c (write_record): Handle DNS_TYPE_SRV and
- some obsolete types.
-
-2007-02-08 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (check_shm): New static function to do path checking
- common to shm_open and shm_unlink. Check for /dev/shm existance.
- (shm_open): Call check_shm.
- (shm_unlink): Ditto.
-
-2007-02-08 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin.din (shm_open): Export.
- (shm_unlink): Export.
- * syscalls.cc (shm_open): New function.
- (shm_unlink): New function.
- * sysconf.cc (sca): Set value of _SC_SHARED_MEMORY_OBJECTS to
- _POSIX_SHARED_MEMORY_OBJECTS.
- * include/cygwin/version.h: Bump API minor number.
- * include/sys/mman.h (shm_open): Add prototype.
- (shm_unlink): Ditto.
-
-2007-02-08 Christopher Faylor <me@cgf.cx>
- Corinna Vinschen <corinna@vinschen.de>
-
- * cygmalloc.h (__set_ENOMEM): Declare.
- (MALLOC_FAILURE_ACTION): Call __set_ENOMEM.
- * malloc_wrapper.cc (malloc) Remove setting errno here.
- (realloc): Ditto.
- (calloc): Ditto.
- (memalign): Ditto.
- (valloc): Ditto.
- (posix_memalign): Save and restore errno.
-
-2007-02-07 Corinna Vinschen <corinna@vinschen.de>
-
- * cygmalloc.h (MALLOC_FAILURE_ACTION): Move to correct #if branch.
-
-2007-02-07 Corinna Vinschen <corinna@vinschen.de>
-
- * cygmalloc.h (MALLOC_FAILURE_ACTION): Define empty.
- * cygwin.din (posix_madvise): Export.
- (posix_memalign): Export.
- * fhandler.cc (fhandler_base::fpathconf): Return useful values in
- _PC_VDISABLE, _PC_SYNC_IO and _PC_SYMLINK_MAX cases.
- * malloc_wrapper.cc (malloc): Set errno here since it's not set in
- dlmalloc.c anymore.
- (realloc): Ditto.
- (calloc): Ditto.
- (memalign): Ditto.
- (valloc): Ditto.
- (posix_memalign): New function.
- * mmap.cc (posix_madvise): New function.
- * sysconf.cc (get_open_max): New function.
- (get_page_size): Ditto.
- (get_nproc_values): Ditto.
- (get_avphys): Ditto.
- (sc_type): New type.
- (sca): New array to map _SC_xxx options to sysconf return values.
- (sysconf): Reimplement using sca array.
- * include/limits.h: Add all missing values as defined by SUSv3.
- * include/pthread.h (PTHREAD_DESTRUCTOR_ITERATIONS): Move definition
- to sys/limits.h.
- (PTHREAD_KEYS_MAX): Ditto.
- * include/semaphore.h (SEM_VALUE_MAX): Ditto.
- * include/cygwin/stdlib.h (posix_memalign): Declare.
- * include/cygwin/version.h: Bump API minor number.
- * include/sys/mman.h: Add posix_madvise flags.
- (posix_madvise): Declare.
- * include/sys/termios.h (_POSIX_VDISABLE): Move definition to
- sys/limits.h.
-
-2007-02-05 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_serial.cc (fhandler_serial::tcsetattr): Add support for
- baud rates up to 3000000 baud. Add missing 128K and 256K cases.
- (fhandler_serial::tcgetattr): Ditto.
- * include/sys/termios.h: Add baud rate definitions from B460800 up to
- B3000000.
-
-2007-02-02 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (unlink_nt): Add missing assignment in case NtClose fails.
-
-2007-02-01 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (ga_dup): New function, taken from ga_clone with v4-in-v6
- mapping addition.
- (ga_clone): Just call ga_dup from here.
- (ga_duplist): New function to duplicate list of struct addrinfo.
- (ga_echeck): Don't check ai_flags, it already happened in
- cygwin_getaddrinfo.
- (cygwin_freeaddrinfo): Always call ipv4_freeaddrinfo.
- (cygwin_getaddrinfo): Use new wincap.supports_all_posix_ai_flags
- flag rather than wincap.has_gaa_on_link_prefix. Always duplicate
- WinSock's addrinfo list to a self-allocated list. Handle AI_V4MAPPED
- for pre-Vista platforms supporting getaddrinfo.
- * wincap.h (wincapc::supports_all_posix_ai_flags): New element.
- * wincap.cc: Implement above element throughout.
- * include/netdb.h: Note how AI_ADDRCONFIG is not supported pre-Vista.
- Remove superfluous comment.
-
-2007-02-01 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/socket.h: Add IPv6 socket options.
-
-2007-01-31 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_getaddrinfo): Fix thinko in AI_ADDRCONFIG handling.
-
-2007-01-31 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (cygwin_getaddrinfo): Check ai_flags for valid values.
- Handle AI_NUMERICSERV. Handle AI_ADDRCONFIG behaviour on Vista.
- * include/netdb.h (AI_NUMERICSERV): Add missing flag.
-
-2007-01-30 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::closedir): Add dir name
- to debug output.
- * syscalls.cc (try_to_bin): Enable code to move file to user specific
- recycler dir to eliminate Vista problem.
- (unlink_nt): Add comment that rename after opening for delete on close
- only fails on XP.
-
-2007-01-30 Corinna Vinschen <corinna@vinschen.de>
-
- * sigproc.cc (child_info::child_info): Set msv_count to non-zero
- value only on systems requiring it.
-
-2007-01-28 Corinna Vinschen <corinna@vinschen.de>
-
- * include/ftw.h: Include sys/cdefs.h.
-
-2007-01-26 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_disk_file.cc (fhandler_disk_file::rmdir): Implement rmdir
- on NT by calling unlink_nt. Check for directory here.
- * syscalls.cc (try_to_bin): Fix buggy debug_printf statement.
- (unlink_nt): Make non-static. Don't use delete-on-close semantics on
- directories. Explain why.
-
-2007-01-24 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (if_nametoindex): This time, really free IP_ADAPTER_ADDRESSES
- memory.
- (if_indextoname): Ditto.
-
-2007-01-24 Corinna Vinschen <corinna@vinschen.de>
-
- * security.h (pop_thread_privilege): Revert to previous state, not
- to token used for impersonation.
-
-2007-01-24 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.h (cygheap_user::deimpersonate): Always RevertToSelf.
-
-2007-01-23 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (gai_errmap): Add EAI_OVERFLOW entry. Fix formatting.
- (cygwin_gai_strerror): Drop using EAI_MAX.
- (w32_to_gai_err): Ditto.
- * include/netdb.h: Define EAI_OVERFLOW. Remove EAI_MAX.
-
-2007-01-23 Corinna Vinschen <corinna@vinschen.de>
-
- * include/netdb.h: Add AI_xxx flags available since Vista.
-
-2007-01-23 Corinna Vinschen <corinna@vinschen.de>
-
- * net.cc (if_nametoindex): Free IP_ADAPTER_ADDRESSES memory.
- (if_indextoname): Ditto.
- (if_nameindex): Ditto. Remove duplicate indexed entries in result.
-
-2007-01-21 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (WSAIoctl): Define.
- (SendARP): Define.
- * cygwin.din: Export if_freenameindex, if_indextoname, if_nameindex and
- if_nametoindex.
- * fhandler_procnet.cc: Drop including wchar.h. Drop definitions of
- GAA_FLAG_INCLUDE_ALL_INTERFACES, IP_ADAPTER_UNICAST_ADDRESS_VISTA.
- (fhandler_procnet::exists): Check for has_gaa_prefixes. Call
- get_adapters_addresses here.
- (fhandler_procnet::readdir): Ditto.
- (prefix): Move to net.cc.
- (fhandler_procnet::fill_filebuf): Call get_adapters_addresses here.
- Simplify allocation. Use AdapterName rather than FriendlyName as
- interface name. Use IfIndex if available, Ipv6IfIndex otherwise.
- (in6_are_prefix_equal): Move to net.cc.
- * fhandler_socket.cc: Define old SIOCGxxx values.
- (CONV_OLD_TO_NEW_SIO): Convert old SIOCGxxx value to new one.
- (struct __old_ifreq): Define old struct ifreq.
- (fhandler_socket::ioctl): Handle old SIOCGxxx values. Handle new
- SIOCGIFFRNDLYNAM command. Simplify copying ifreq data to user space.
- Call get_ifconf with additional SOCKET parameter.
- * net.cc (IP_ADAPTER_UNICAST_ADDRESS_LH): Define.
- (IP_ADAPTER_ADDRESSES_LH): Define.
- (SIO_GET_INTERFACE_LIST): Define.
- (sockaddr_in6_old): Define.
- (sockaddr_gen): Define.
- (INTERFACE_INFO): Define.
- (IN_LOOPBACK): Define.
- (in_are_prefix_equal): New static function.
- (ip_addr_prefix): New function, replaces prefix function, add AF_INET
- handling.
- (GAA_FLAG_INCLUDE_ALL_INTERFACES): Define.
- (get_adapters_addresses): New function.
- (WS_IFF_xxx): Define Winsock interface flag values.
- (convert_ifr_flags): New function to convert Winsock interface flag
- values to Cygwin interface flag values.
- (get_xp_ifconf): New get_ifconf implementation for XP SP1 and above.
- (get_2k_ifconf): Fix interface index. Fix formatting.
- (get_nt_ifconf): Fix formatting.
- (get_95_ifconf): Ditto.
- (get_ifconf): Take additional SOCKET parameter. Call get_xp_ifconf
- on XP SP1 and above.
- (if_nametoindex): New function.
- (if_indextoname): New function.
- (if_nameindex): New function.
- (if_freenameindex): New function.
- (in6_are_prefix_equal): Moved here from fhandler_procnet.cc.
- * wincap.cc (wincap_xp): Define has_gaa_prefixes as true by default.
- (wincapc::init): Assume has_osversioninfoex by default. Call
- GetVersionEx with OSVERSIONINFOEX first. Call with OSVERSIONINFO only
- if that fails. Simplify NT4 case and try to avoid strcmp. Check XP
- Service Pack using version.wServicePackMajor to avoid strcmp.
- * include/asm/socket.h (SIOCGIFFRNDLYNAM): Define.
- * include/cygwin/if.h: Fix formatting.
- (IFF_POINTTOPOINT): Define.
- (IFF_NOARP): Define.
- (IFF_LOWER_UP): Define.
- (IFF_DORMANT): Define.
- (struct if_nameindex): Define.
- (IFRF_FRIENDLYNAMESIZ): Define.
- (struct ifreq_frndlyname): Define.
- (IFNAMSIZ): Redefine as 44.
- (IF_NAMESIZE): Define.
- (struct ifreq): Redefine ifru_flags as int. Define ifru_data. Pad size
- to sizeof sockaddr_in6 for further extensions.
- (ifr_data): Define.
- (ifr_frndlyname): Define.
- (if_nametoindex): Declare.
- (if_indextoname): Declare.
- (if_nameindex): Declare.
- (if_freenameindex): Declare.
- * include/cygwin/version.h: Bump API minor number.
- (CYGWIN_VERSION_CHECK_FOR_OLD_IFREQ): Define check for old vs. new
- ifreq structure.
-
-2007-01-18 Corinna Vinschen <corinna@vinschen.de>
-
- * spawn.cc (spawn_guts): Don't set cwd for non-Cygwin child processes
- on NT to allow starting them in virtual directories.
-
-2007-01-18 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (list::hash): Fix type to __ino64_t.
- (list::get_hash): Ditto.
- (list::set): Add struct stat parameter. Use that instead of calling
- fstat.
- (map::get_list_by_fd): Ditto.
- (map::add_list): Ditto.
- (mmap_is_attached_or_noreserve): Call get_list_by_fd appropriately.
- (mmap_worker): Add pameters for map list and file stat information.
- Propagate to called functions.
- (mmap64): Use fstat on files early. Replace call to GetFileSize.
- Call get_list_by_fd and mmap_worker appropriately.
-
-2007-01-18 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_procnet.cc: Drop declaration of htonl and ntohs. Include
- asm/byteorder.h instead.
-
-2007-01-18 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/in6.h: Drop inclusion of asm/byteorder.h.
- * fhandler_procnet.cc: Declare htonl and ntohs here.
-
-2007-01-17 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (DLL_OFILES): Add fhandler_procnet.o.
- * autoload.cc (GetAdaptersAddresses): Define.
- * devices.h (FH_PROCNET): Define new device.
- * devices.in (dev_procnet_storage): Add "/proc/net" entry.
- * devices.cc: Regenerate.
- * dir.cc (readdir_worker): Use isproc_dev macro.
- * dtable.cc (build_fh_pc): Add FH_PROCNET.
- * fhandler.h (class fhandler_procnet): New class.
- * fhandler_proc.cc: Add "net" subdirectory handling.
- * fhandler_procnet.cc: New file handling "/proc/net" directory.
- * path.cc (isvirtual_dev): Move to path.h.
- * path.h (isproc_dev): New macro to identify /proc files by device.
- (isvirtual_dev): Moved here. Define using isproc_dev.
- * syscalls.cc (unlink): Use isproc_dev macro.
- * wincap.h (wincapc::has_gaa_prefixes): New element.
- (wincapc::has_gaa_on_link_prefix): New element.
- * wincap.cc: Implement above elements throughout.
- (wincapc::init): Check XP for service pack and set has_gaa_prefixes
- appropriately.
- * include/cygwin/in6.h: Include asm/byteorder.h.
-
-2007-01-17 Corinna Vinschen <corinna@vinschen.de>
-
- * include/asm/socket.h (SIOGIFINDEX): Define.
-
-2007-01-17 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (MapView9x): Note possible uselessness of retrying.
- (MapViewNT): Ditto.
- (mmap64): Fix pre-reservation to work for non NULL, non MAP_FIXED.
-
-2007-01-16 Corinna Vinschen <corinna@vinschen.de>
-
- * autoload.cc (RtlAnsiStringToUnicodeString): Define.
- (RtlOemStringToUnicodeString): Define.
- * ntdll.h (struct _RTL_USER_PROCESS_PARAMETERS): Define.
- (struct _PEB): Redefine with a bit of content.
- (RtlAnsiStringToUnicodeString): Declare.
- (RtlOemStringToUnicodeString): Declare.
- * path.cc: Include ntdll.h.
- (_upp): New global variable pointing to user process parameter block.
- (get_user_proc_parms): New static function to retrieve user process
- parameter block.
- (close_user_proc_parms_cwd_handle): New function to close handle to
- current working directory in user process parameter block.
- (cwdstuff::init): Drop redundant declaration of dynamically_loaded.
- Set current dir only on 9x. Call close_user_proc_parms_cwd_handle
- on NT instead.
- (cwdstuff::keep_in_sync): Only on 9x.
- (cwdstuff::set): Keep behaviour on 9x. On NT write cwd path into user
- process parameter block and set cwd handle to NULL. Fix comments to
- reflect new behaviour.
-
-2007-01-16 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::ioctl): Handle SIOCGIFINDEX.
- * net.cc (get_2k_ifconf): Ditto.
- (get_nt_ifconf): Fake SIOCGIFINDEX.
- (get_95_ifconf): Ditto.
- (get_ifconf): Handle SIOCGIFINDEX. Fake it for loopback on systems
- not supporting IP Helper Lib.
- * include/asm/socket.h (SIOCGIFINDEX): Define.
- * include/cygwin/if.h (struct ifreq): Add member for interface index.
- (ifr_ifindex): Define.
-
-2007-01-16 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/in6.h (struct ipv6_mreq): Change type of interface
- member to uint32_t.
- (struct in6_pktinfo): Ditto.
-
-2007-01-16 Corinna Vinschen <corinna@vinschen.de>
-
- * include/cygwin/in.h (struct ip_mreq_source): Define.
- (struct ip_msfilter): Define.
- (IP_MSFILTER_SIZE): Define.
- (struct in_pktinfo): Define.
- (struct group_req): Define.
- (struct group_source_req): Define.
- (struct group_filter): Define.
- (GROUP_FILTER_SIZE): Define.
- (INADDR_ALLRTRS_GROUP): Define.
- * include/cygwin/socket.h: Define protocol agnostic multicast options.
-
-2007-01-15 Corinna Vinschen <corinna@vinschen.de>
-
- * CYGWIN_LICENSE: Fix web pages and contact information.
-
-2007-01-15 Corinna Vinschen <corinna@vinschen.de>
-
- * ntdll.h: Adjust status definitions.
-
-2007-01-15 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.cc (cygheap_init): Add TODO comment.
-
-2007-01-15 Corinna Vinschen <corinna@vinschen.de>
-
- * ntdll.h (STATUS_SHARING_VIOLATION): Define.
-
-2007-01-13 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (unlink_nt): Don't move files to recycle bin which are
- not in use.
-
-2007-01-13 Christopher Faylor <me@cgf.cx>
-
- * glob.cc: Update copyright notice with latest from FreeBSD.
- (glob0): Use correct type for c variable to propagate previously
- detected protection.
-
-2007-01-12 Corinna Vinschen <corinna@vinschen.de>
-
- * cygheap.cc (_csbrk): Fix off-by-one error.
- * cygwin.sc: Give .cygheap a minimum size of 512K.
-
-2007-01-12 Christopher Faylor <me@cgf.cx>
-
- * external.cc (sync_winenv): Use cur_environ () rather than
- __cygwin_environ.
-
-2007-01-12 Corinna Vinschen <corinna@vinschen.de>
-
- * fork.cc (child_copy): Add missing Windows PID in debug output.
-
-2007-01-12 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc: Update copyright.
-
-2007-01-10 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc (mmap64): Pre-Reserve space for the whole mapping to get a
- useful, valid address before the actual mappings take place.
- Fix typo in comment.
-
-2007-01-10 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (sync): Use b_drive for B: drive (Thanks to Howard Chu).
-
-2007-01-09 Corinna Vinschen <corinna@vinschen.de>
-
- * syscalls.cc (getpagesize): Change condition for clarity.
- (getsystempagesize): Ditto.
-
-2007-01-09 Corinna Vinschen <corinna@vinschen.de>
-
- * mmap.cc: Do bookkeeping in 4K pages, rather than in 64K chunks.
-
-2007-01-07 Corinna Vinschen <corinna@vinschen.de>
-
- * security.h (setacl): Add parameter for writability flag.
- * sec_acl.cc (setacl): Ditto. Set to true if any ACE with write
- permissions is created.
- * fhandler_disk_file.cc (fhandler_disk_file::facl): Reset
- FILE_ATTRIBUTE_READONLY if ACL contains an ACE with write permissions.
-
-2007-01-05 Corinna Vinschen <corinna@vinschen.de>
-
- * include/strings.h: Don't include string.h. Only declare functions
- according to SUSv3.
-
-2007-01-04 Corinna Vinschen <corinna@vinschen.de>
-
- (get_ifconf): Set MTU for loopback to more correct value.
-
-2007-01-04 Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler_socket.cc (fhandler_socket::ioctl): Don't fake results
- for SIOCGIFFLAGS here. Call get_ifconf instead.
- * net.cc (get_2k_ifconf): Clean up code to generate interface name.
- Handle SIOCGIFFLAGS here.
- (get_nt_ifconf): Fake SIOCGIFFLAGS here.
- (get_95_ifconf): Ditto.
- (get_ifconf): Don't fake loopback on systems with IP Helper Lib.
- Set MTU for loopback to a more "modern" value.
-
-2007-01-04 Brian Ford <Brian.Ford@FlightSafety.com>
- Corinna Vinschen <corinna@vinschen.de>
-
- * fhandler.h (PREFERRED_IO_BLKSIZE): Define as 64K.
- * fhandler.cc (fhandler_base::fstat): Set st_blksize to
- PREFERRED_IO_BLKSIZE.
- * fhandler_disk_file.cc (fhandler_base::fstat_helper): Ditto.
- * fhandler_mailslot.cc (fhandler_mailslot::fstat): Ditto.
- * fhandler_raw.cc (fhandler_dev_raw::fstat): Ditto.
-
-2007-01-01 Christopher Faylor <me@cgf.cx>
-
- * spawn.cc (spawn_guts): Don't expect synchronization from a non-cygwin
- _P_NOWAIT process.
diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in
deleted file mode 100644
index 49baebc..0000000
--- a/winsup/cygwin/Makefile.in
+++ /dev/null
@@ -1,478 +0,0 @@
-# Makefile.in for Cygwin.
-# Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008 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.
-
-# This makefile requires GNU make.
-
-SHELL:=@SHELL@
-srcdir:=@srcdir@
-objdir:=.
-
-CONFIG_DIR:=$(srcdir)/config/@CONFIG_DIR@
-VPATH:=$(srcdir):$(CONFIG_DIR):$(srcdir)/regex:$(srcdir)/regexp:$(srcdir)/lib:$(srcdir)/libc
-
-target_alias:=@target_alias@
-build_alias:=@build_alias@
-host_alias:=@host_alias@
-prefix:=@prefix@
-
-program_transform_name:=@program_transform_name@
-exec_prefix:=@exec_prefix@
-bindir:=@bindir@
-libdir:=@libdir@
-mandir:=@mandir@
-sysconfdir:=@sysconfdir@
-ifeq ($(target_alias),$(host_alias))
-ifeq ($(build_alias),$(host_alias))
-tooldir:=$(exec_prefix)
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-datadir:=@datadir@
-infodir:=@infodir@
-includedir:=@includedir@
-
-override INSTALL:=@INSTALL@
-override INSTALL_PROGRAM:=@INSTALL_PROGRAM@
-override INSTALL_DATA:=@INSTALL_DATA@
-
-#
-# --enable options from configure
-#
-MT_SAFE:=@MT_SAFE@
-DEFS:=@DEFS@
-CCEXTRA:=
-CC:=@CC@
-# FIXME: Which is it, CC or CC_FOR_TARGET?
-CC_FOR_TARGET:=$(CC)
-CFLAGS=@CFLAGS@
-override CFLAGS+=-MMD ${$(*F)_CFLAGS} -fmerge-constants -ftracer $(CCEXTRA)
-CXX=@CXX@
-override CXXFLAGS=@CXXFLAGS@
-
-AR:=@AR@
-AR_FLAGS:=qv
-RANLIB:=@RANLIB@
-LD:=@LD@
-DLLTOOL:=@DLLTOOL@
-WINDRES:=@WINDRES@
-AS:=@AS@
-NM:=@NM@
-OBJCOPY:=@OBJCOPY@
-OBJDUMP:=@OBJDUMP@
-STRIP:=@STRIP@
-LDSCRIPT:=cygwin.sc
-MKDIRP:=$(INSTALL) -m 755 -d
-
-#
-# Include common definitions for winsup directory
-#
-include $(srcdir)/../Makefile.common
-
-@SET_MAKE@
-
-# Setup the testing framework, if you have one
-EXPECT = `if [ -f $${rootme}/../../expect/expect$(EXEEXT) ] ; then \
- echo $${rootme}/../../expect/expect$(EXEEXT) ; \
- else echo expect ; fi`
-
-RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
- echo $${srcdir}/../dejagnu/runtest ; \
- else echo runtest; fi`
-RUNTESTFLAGS =
-
-# Parameters used in building the cygwin.dll.
-# We build as cygwin0.dll and rename at install time to overcome
-# native rebuilding issues (we don't want the build tools to see a partially
-# built cygwin.dll and attempt to use it instead of the old one).
-
-DLL_NAME:=cygwin1.dll
-TEST_DLL_NAME:=cygwin0.dll
-TEST_LIB_NAME:=libcygwin0.a
-DEF_FILE:=cygwin.def
-DLL_ENTRY:=@DLL_ENTRY@
-
-LIBGMON_A:=libgmon.a
-CYGWIN_START:=crt0.o
-GMON_START:=gcrt0.o
-
-# Some things want these from libc, but they have their own static
-# data which apps can get to, which is a pain in the dll, so we
-# include them directly into the library.
-
-LIBCOS:=${sort ${addsuffix .o,${basename ${notdir ${wildcard $(srcdir)/lib/*.c}}}} \
- ${addsuffix .o,${basename ${notdir ${wildcard $(srcdir)/lib/*.cc}}}}}
-
-# Build all source files in the config directory
-
-EXTRA_DLL_OFILES:=${addsuffix .o,${basename ${notdir ${wildcard $(CONFIG_DIR)/*.c}}}}
-
-EXTRA_OFILES:=
-
-MALLOC_OFILES:=@MALLOC_OFILES@
-
-DLL_IMPORTS:=$(w32api_lib)/libkernel32.a $(w32api_lib)/libadvapi32.a $(w32api_lib)/libntdll.a
-
-MT_SAFE_OBJECTS:=
-# Please maintain this list in sorted order, with maximum files per 86 col line
-#
-DLL_OFILES:=assert.o autoload.o bsdlib.o ctype.o cxx.o cygheap.o cygthread.o \
- cygtls.o dcrt0.o debug.o devices.o dir.o dlfcn.o dll_init.o \
- dtable.o environ.o errno.o exceptions.o exec.o external.o fcntl.o \
- fhandler.o fhandler_clipboard.o fhandler_console.o fhandler_disk_file.o \
- fhandler_dsp.o fhandler_fifo.o fhandler_floppy.o fhandler_mailslot.o \
- fhandler_mem.o fhandler_netdrive.o fhandler_nodevice.o fhandler_proc.o \
- fhandler_process.o fhandler_procnet.o fhandler_random.o fhandler_raw.o \
- fhandler_registry.o fhandler_serial.o fhandler_socket.o fhandler_tape.o \
- fhandler_termios.o fhandler_tty.o fhandler_virtual.o fhandler_windows.o \
- fhandler_zero.o flock.o fnmatch.o fork.o fts.o ftw.o getopt.o glob.o \
- grp.o heap.o hookapi.o inet_addr.o inet_network.o init.o ioctl.o ipc.o \
- kernel32.o localtime.o lsearch.o malloc_wrapper.o minires-os-if.o \
- minires.o miscfuncs.o mktemp.o mmap.o msg.o mount.o net.o netdb.o nfs.o \
- nftw.o ntea.o passwd.o path.o pinfo.o pipe.o poll.o posix_ipc.o \
- pthread.o random.o regcomp.o regerror.o regexec.o regfree.o registry.o \
- resource.o rexec.o rcmd.o scandir.o sched.o sec_acl.o sec_auth.o \
- sec_helper.o security.o select.o sem.o setlsapwd.o shared.o shm.o \
- sigfe.o signal.o sigproc.o smallprint.o spawn.o strace.o strfuncs.o \
- strptime.o strsep.o strsig.o sync.o syscalls.o sysconf.o syslog.o \
- termios.o thread.o timer.o times.o tls_pbuf.o tty.o uinfo.o uname.o \
- wait.o wincap.o window.o winf.o xsique.o \
- $(EXTRA_DLL_OFILES) $(EXTRA_OFILES) $(MALLOC_OFILES) $(MT_SAFE_OBJECTS)
-
-GMON_OFILES:=gmon.o mcount.o profil.o
-
-OBSOLETE_FUNCTIONS:=open acl aclcheck aclfrommode aclfrompbits \
- aclfromtext aclsort acltomode acltopbits \
- acltotext chown facl fchown fcntl fdopen fgetpos fopen \
- freopen fseeko fsetpos fstat ftello ftruncate \
- getegid geteuid getgid getgrent getgrgid getgrnam \
- getgroups getpwuid getpwuid_r getuid initgroups \
- lchown lseek lstat mknod mmap seekdir setegid seteuid \
- setgid setgroups setregid setreuid setuid stat \
- telldir tmpfile truncate timezone
-
-NEW_FUNCTIONS:=open _open64 \
- acl _acl32 \
- aclcheck _aclcheck32 \
- aclfrommode _aclfrommode32 \
- aclfrompbits _aclfrompbits32 \
- aclfromtext _aclfromtext32 \
- aclsort _aclsort32 \
- acltomode _acltomode32 \
- acltopbits _acltopbits32 \
- acltotext _acltotext32 \
- chown _chown32 \
- facl _facl32 \
- fchown _fchown32 \
- fcntl _fcntl64 \
- fdopen _fdopen64 \
- fgetpos _fgetpos64 \
- fopen _fopen64 \
- freopen _freopen64 \
- fseeko _fseeko64 \
- fsetpos _fsetpos64 \
- fstat _fstat64 \
- ftello _ftello64 \
- ftruncate _ftruncate64 \
- getegid _getegid32 \
- geteuid _geteuid32 \
- getgid _getgid32 \
- getgrent _getgrent32 \
- getgrgid _getgrgid32 \
- getgrnam _getgrnam32 \
- getgroups _getgroups32 \
- getpwuid _getpwuid32 \
- getpwuid_r _getpwuid_r32 \
- getuid _getuid32 \
- initgroups _initgroups32 \
- lchown _lchown32 \
- lseek _lseek64 \
- lstat _lstat64 \
- mknod _mknod32 \
- mmap _mmap64 \
- seekdir _seekdir64 \
- setegid _setegid32 \
- seteuid _seteuid32 \
- setgid _setgid32 \
- setgroups _setgroups32 \
- setregid _setregid32 \
- setreuid _setreuid32 \
- setuid _setuid32 \
- stat _stat64 \
- telldir _telldir64 \
- tmpfile _tmpfile64 \
- truncate _truncate64
-
-API_VER:=$(srcdir)/include/cygwin/version.h
-
-PWD:=${shell pwd}
-LIB_NAME:=$(PWD)/libcygwin.a
-LIBSERVER:=@LIBSERVER@
-SUBLIBS:=$(PWD)/libpthread.a $(PWD)/libutil.a $(PWD)/libm.a $(PWD)/libc.a $(PWD)/libdl.a $(PWD)/libresolv.a
-EXTRALIBS:=libautomode.a libbinmode.a libtextmode.a libtextreadmode.a
-INSTOBJS:=automode.o binmode.o textmode.o textreadmode.o
-TARGET_LIBS:=$(LIB_NAME) $(CYGWIN_START) $(GMON_START) $(LIBGMON_A) $(SUBLIBS) $(INSTOBJS) $(EXTRALIBS)
-
-ifneq "${filter -O%,$(CFLAGS)}" ""
-cygheap_CFLAGS:=-fomit-frame-pointer
-cygthread_CFLAGS:=-fomit-frame-pointer
-cygtls_CFLAGS:=-fomit-frame-pointer
-delqueue_CFLAGS:=-fomit-frame-pointer
-devices_CFLAGS:=-fomit-frame-pointer -Os
-dir_CFLAGS:=-fomit-frame-pointer
-dlfcn_CFLAGS:=-fomit-frame-pointer
-dll_init_CFLAGS:=-fomit-frame-pointer
-dtable_CFLAGS:=-fomit-frame-pointer -fcheck-new
-fcntl_CFLAGS:=-fomit-frame-pointer
-fhandler_CFLAGS:=-fomit-frame-pointer
-fhandler_clipboard_CFLAGS:=-fomit-frame-pointer
-fhandler_console_CFLAGS:=-fomit-frame-pointer
-fhandler_disk_file_CFLAGS:=-fomit-frame-pointer
-fhandler_dsp_CFLAGS:=-fomit-frame-pointer
-fhandler_floppy_CFLAGS:=-fomit-frame-pointer
-fhandler_mem_CFLAGS:=-fomit-frame-pointer
-fhandler_netdrive_CFLAGS:=-fomit-frame-pointer
-fhandler_proc_CFLAGS:=-fomit-frame-pointer
-fhandler_process_CFLAGS:=-fomit-frame-pointer
-fhandler_random_CFLAGS:=-fomit-frame-pointer
-fhandler_raw_CFLAGS:=-fomit-frame-pointer
-fhandler_registry_CFLAGS:=-fomit-frame-pointer
-fhandler_serial_CFLAGS:=-fomit-frame-pointer
-fhandler_socket_CFLAGS:=-fomit-frame-pointer
-fhandler_syslog_CFLAGS:=-fomit-frame-pointer
-fhandler_tape_CFLAGS:=-fomit-frame-pointer
-fhandler_termios_CFLAGS:=-fomit-frame-pointer
-fhandler_tty_CFLAGS:=-fomit-frame-pointer
-fhandler_virtual_CFLAGS:=-fomit-frame-pointer
-fhandler_windows_CFLAGS:=-fomit-frame-pointer
-fhandler_zero_CFLAGS:=-fomit-frame-pointer
-flock_CFLAGS:=-fomit-frame-pointer
-grp_CFLAGS:=-fomit-frame-pointer
-malloc_CFLAGS:=-fomit-frame-pointer
-malloc_wrapper_CFLAGS:=-fomit-frame-pointer
-miscfuncs_CFLAGS:=-fomit-frame-pointer
-net_CFLAGS:=-fomit-frame-pointer
-passwd_CFLAGS:=-fomit-frame-pointer
-regcomp_CFLAGS=-fomit-frame-pointer
-regerror_CFLAGS=-fomit-frame-pointer
-regexec_CFLAGS=-fomit-frame-pointer
-regfree_CFLAGS=-fomit-frame-pointer
-shared_CFLAGS:=-fomit-frame-pointer
-sync_CFLAGS:=-fomit-frame-pointer -O3
-smallprint_CFLAGS:=-fomit-frame-pointer
-syscalls_CFLAGS:=-fomit-frame-pointer
-sysconf_CFLAGS:=-fomit-frame-pointer
-uinfo_CFLAGS:=-fomit-frame-pointer
-endif
-
-.PHONY: all force dll_ofiles install all_target install_target all_host install_host \
- install install-libs install-headers
-
-.SUFFIXES:
-.SUFFIXES: .c .cc .def .a .o .d .s
-
-all_host=@all_host@
-install_host=@install_host@
-
-all: all_target $(all_host)
-
-all_target: $(TARGET_LIBS)
-
-all_host: $(TEST_LIB_NAME)
-
-force:
-
-install: install-libs install-headers install-man install_target \
- $(install_host) $(install_target)
-
-uninstall: uninstall-libs uninstall-headers uninstall-man
-
-install-libs: $(TARGET_LIBS)
- @$(MKDIRP) $(bindir)
- $(INSTALL_PROGRAM) $(TEST_DLL_NAME) $(bindir)/$(DLL_NAME); \
- for i in $^; do \
- $(INSTALL_DATA) $$i $(tooldir)/lib/`basename $$i` ; \
- done
- cd $(tooldir)/lib && ln -sf libcygwin.a libg.a
-
-install-headers:
- cd $(srcdir); \
- for sub in `find include -name '[a-z]*' -type d -print | sort`; do \
- $(MKDIRP) $(tooldir)/$$sub; \
- for i in $$sub/*.h ; do \
- $(INSTALL_DATA) $$i $(tooldir)/$$sub/`basename $$i` ; \
- done ; \
- done ; \
- $(INSTALL_DATA) regex/regex.h $(tooldir)/include/regex.h
-
-install-man:
- @$(MKDIRP) $(mandir)/man2 $(mandir)/man3 $(mandir)/man5 $(mandir)/man7
- cd $(srcdir); \
- for i in `find . -type f -name '*.2'`; do \
- $(INSTALL_DATA) $$i $(mandir)/man2/`basename $$i` ; \
- done; \
- for i in `find . -type f -name '*.3'`; do \
- $(INSTALL_DATA) $$i $(mandir)/man3/`basename $$i` ; \
- done; \
- for i in `find . -type f -name '*.5'`; do \
- $(INSTALL_DATA) $$i $(mandir)/man5/`basename $$i` ; \
- done; \
- for i in `find . -type f -name '*.7'`; do \
- $(INSTALL_DATA) $$i $(mandir)/man7/`basename $$i` ; \
- done
-
-install_target:
-
-install_host:
-
-uninstall-libs: $(TARGET_LIBS)
- rm -f $(bindir)/$(DLL_NAME); \
- for i in $^; do \
- rm -f $(tooldir)/lib/$$i ; \
- done
-
-uninstall-headers:
- cd $(srcdir); \
- for sub in `find include -name '[a-z]*' -type d -print | sort`; do \
- for i in $$sub/*.h ; do \
- rm -f $(tooldir)/$$sub/`basename $$i` ; \
- done ; \
- done ; \
- rm -f $(tooldir)/include/regex.h
-
-uninstall-man:
- cd $(srcdir); \
- for i in `find . -type f -name '*.2'`; do \
- rm -f $(tooldir)/man/man2/`basename $$i` ; \
- done; \
- for i in `find . -type f -name '*.3'`; do \
- rm -f $(tooldir)/man/man3/`basename $$i` ; \
- done; \
- for i in `find . -type f -name '*.5'`; do \
- rm -f $(tooldir)/man/man5/`basename $$i` ; \
- done; \
- for i in `find . -type f -name '*.7'`; do \
- rm -f $(tooldir)/man/man7/`basename $$i` ; \
- done
-
-clean:
- -rm -f *.o *.dll *.dbg *.a *.exp junk *.base version.cc regexp/*.o winver_stamp *.exe *.d *stamp* *_magic.h sigfe.s cygwin.def
- -@$(MAKE) -C $(bupdir)/cygserver libclean
-
-maintainer-clean realclean: clean
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
- -rm -fr configure
-
-
-# Rule to build cygwin.dll
-$(TEST_DLL_NAME): $(LDSCRIPT) dllfixdbg $(DLL_OFILES) $(DLL_IMPORTS) $(LIBSERVER) $(LIBC) $(LIBM) $(API_VER) Makefile winver_stamp
- $(CXX) $(CXXFLAGS) -Wl,--gc-sections $(nostdlib) -Wl,-T$(firstword $^) \
- -Wl,--heap=0 -Wl,--out-implib,cygdll.a -shared -o $@ \
- -e $(DLL_ENTRY) $(DEF_FILE) $(DLL_OFILES) version.o winver.o \
- $(MALLOC_OBJ) $(LIBSERVER) $(LIBM) $(LIBC) \
- -lgcc $(DLL_IMPORTS)
- @$(word 2,$^) $(OBJDUMP) $(OBJCOPY) $@ ${patsubst %0.dll,%1.dbg,$@}
- @ln -f $@ new-$(DLL_NAME)
-
-# Rule to build libcygwin.a
-$(LIB_NAME): rmsym newsym $(TEST_DLL_NAME) $(LIBCOS)
- /bin/sh ${word 1,$^} ./cygdll.a "$(NM)" "$(AR)" $(OBSOLETE_FUNCTIONS) || exit 0
- /bin/sh ${word 2,$^} ./cygdll.a "$(AS)" "$(AR)" $(NEW_FUNCTIONS) || exit 0
- (echo create $(LIB_NAME); echo addmod $(LIBCOS); echo addlib cygdll.a; echo save) | $(AR) -M
- $(RANLIB) $@
-
-# Rule to make stub library used by testsuite
-# dependency set to $(LIB_NAME) to accommodate make -j2.
-# Otherwise dlltool gets confused. cgf (11-16-2000)
-$(TEST_LIB_NAME): $(LIB_NAME)
- perl -p -e 'BEGIN{binmode(STDIN); binmode(STDOUT);}; s/cygwin1/cygwin0/g' < $? > $@
-
-$(LIBSERVER): $(bupdir)/cygserver/Makefile
- $(MAKE) -C $(bupdir)/cygserver libcygserver.a
-
-dll_ofiles: $(DLL_OFILES)
-
-$(LIBGMON_A): $(GMON_OFILES) $(GMON_START)
- $(AR) rcv $(LIBGMON_A) $(GMON_OFILES)
-
-$(API_VER): $(srcdir)/cygwin.din
- @echo Error: Version info is older than DLL API!
-
-version.cc winver.o: winver_stamp
- @ :
-
-shared_info_magic.h: cygmagic shared_info.h
- /bin/sh ${word 1,$^} $@ "$(CC) -x c" ${word 2,$^} USER_MAGIC 'class user_info' SHARED_MAGIC 'class shared_info'
-
-child_info_magic.h: cygmagic child_info.h
- /bin/sh ${word 1,$^} $@ "$(CC) -x c" ${word 2,$^} CHILD_INFO_MAGIC 'class child_info'
-
-dcrt0.o sigproc.o: child_info_magic.h
-
-shared.o: shared_info_magic.h
-
-$(srcdir)/qevices.cc: cygwin-gperf devices.gperf devices.h
- $^ > $@
-
-$(srcdir)/devices.cc: gendevices devices.in devices.h
- ${wordlist 1,2,$^} $@
-
-$(PWD)/libpthread.a: speclib $(LIB_NAME) pthread.o thread.o
- /bin/sh ${word 1, $^} $@ "${NM}" "$(AR)" ${wordlist 2, 99, $^}
-
-$(PWD)/libutil.a: speclib $(LIB_NAME) bsdlib.o
- /bin/sh ${word 1, $^} $@ "${NM}" "$(AR)" ${wordlist 2, 99, $^}
-
-$(PWD)/libm.a: speclib $(LIB_NAME) $(LIBM)
- /bin/sh ${word 1, $^} $@ "${NM}" "$(AR)" ${wordlist 2, 99, $^}
-
-$(PWD)/libc.a: speclib $(LIB_NAME) $(PWD)/libm.a libpthread.a libutil.a
- /bin/sh ${word 1, $^} -v $@ "${NM}" "$(AR)" ${wordlist 2, 99, $^}
-
-$(PWD)/libdl.a: speclib $(LIB_NAME) dlfcn.o
- /bin/sh ${word 1, $^} $@ "${NM}" "$(AR)" ${wordlist 2, 99, $^}
-
-$(PWD)/libresolv.a: speclib $(LIB_NAME) minires.o
- /bin/sh ${word 1, $^} $@ "${NM}" "$(AR)" ${wordlist 2, 99, $^}
-
-lib%.a: %.o
- $(AR) cru $@ $?
-
-winver_stamp: mkvers.sh include/cygwin/version.h winver.rc $(DLL_OFILES)
- @echo "Making version.o and winver.o";\
- $(SHELL) ${word 1,$^} ${word 2,$^} ${word 3,$^} $(WINDRES) && \
- $(COMPILE_CXX) -c -o version.o version.cc && \
- touch $@
-
-Makefile: cygwin.din
-
-$(DEF_FILE): gendef cygwin.din $(srcdir)/tlsoffsets.h
- $^ $@ sigfe.s
-
-$(srcdir)/tlsoffsets.h: gentls_offsets cygtls.h
- $^ $@ $(COMPILE_CXX) -c
-
-sigfe.s: $(DEF_FILE)
- @[ -s $@ ] || \
- { rm -f $(DEF_FILE); $(MAKE) -s -j1 $(DEF_FILE); }; \
- [ -s $@ ] && touch $@
-
-sigfe.o: sigfe.s
- $(CC) -c -o $@ $?
-
-winsup.h: config.h
-
-deps:=${wildcard *.d}
-ifneq (,$(deps))
-include $(deps)
-endif
diff --git a/winsup/cygwin/ROADMAP b/winsup/cygwin/ROADMAP
deleted file mode 100644
index fd0387d..0000000
--- a/winsup/cygwin/ROADMAP
+++ /dev/null
@@ -1,129 +0,0 @@
-
- WINSUP ROADMAP
-
-The purpose of this document is to give the briefest overview of how
-the various parts of cygwin work together and where everything can be
-found. The intended audience is people developing the cygwin dll
-itself. Comments to dj@cygnus.com.
-
-=== cygwin1.dll source files
-
-- overhead
-.h winsup autoload debug external shared sync
-.cc assert dcrt0 debug external init ntea registry security
- shared smallprint strace sync
-.din cygwin
-.rc winver
-.sgml external shared
-
-- processes
-.h sigproc
-.cc exec fork pinfo resource signal sigproc spawn wait
-
-- signals
-.cc exceptions window
-
-- files and I/O
-.h delqueue fhandler path select
-.cc delqueue dir fhandler* dtable path pipe select tty
-.sgml dtable path
-
-- common unix functions
-.h dll_init tz_posixrules
-.cc dlfcn dll_init environ errno fcntl flog grp ioctl localtime
- malloc passwd scandir strsep syscalls sysconf syslog termios
-.c longjmp setjmp
-.sgml dll_init
-
-- unix emulation
-.cc heap mmap net times unifo uname
-
-
---- if MT_SAFE
-.h thread
-.cc pthread thread
-
---- from other places
-regex/*
-../libiberty/{random,strsignal}
-../newlib/* (libc)
-
-=== libcygwin.a source files
-
-libccrt0.cc
-libcmain.cc
-dll_entry.cc
-dll_main.cc
-getopt.c
-
-=== gmon (profiling, -pg)
-
-gcrt0.c
-gmon.c gmon.h
-mcount.c
-profil.c profil.h
-
-=== entry points
-
-- normal cygwin program
-
-newlib/libc/sys/cygwin/crt0.c has mainCRTStartup() and calls cygwin_crt0()
-
-libccrt0.cc has cygwin_crt0() and calls dll_crt0()
-
-dcrt0.cc - has dll_crt0()
-
-Note: dll_init.cc has nothing to do with initializing the cygwin dll.
-It initializes the dlls you have dl_open'd.
-
-- cygwin-built dll
-
-dll_entry.cc - has a macro for wrapping your dll startup function
- (equivalent of DllMain()) in such a way that you get your
- cygwin environment set up automatically when your dll is
- loaded.
-
-dll_main.cc - has empty DllMain() in case you don't have your own
-
-- manually loading cygwin1.dll
-
-init.cc - has dll_entry() which is called by the OS when the dll is
- loaded. It doesn't do much except note if you linked
- cygwin1.dll or are manually loading it.
-
-=== About "fhandlers"
-
-An fhandler is a file type handler. This is where the unix device
-emulation happens.
-
-dtable.cc maps posix file descriptors to a table of file handlers (type
-fhandler) in the dll. It's mostly concerned with managing the table
-of descriptors (open, dup, fork, select). Most of the posix I/O
-system calls (syscalls.cc) use the fdtab table to call the right
-fhandler directly.
-
-fhandler.cc is the base class; specific types are derived as
-appropriate (see fhandler.h). dtable.cc is in charge of selecting and
-creating a suitable fhandler when you open a file. path.cc handles
-emulated files in /dev (like /dev/null) by returning an FH_* value
-from get_device_number (which dtable.cc calls in dtable::build_fhandler).
-
-Note: if you're looking for read() and write(), they call _read() and
-_write() in syscalls.cc. The non-underscored ones are in
-newlib/libc/syscalls and just call the underscored ones.
-
-=== How "fork" works
-
-It all starts in fork() in fork.cc.
-
-Set up a pid in the shared memory area for the new child. Use
-setjmp() to capture state. First time (parent), set up some stuff and
-use CreateProcess to run a second copy of the same executable. The
-second copy will note in the shared memory area that it's a fork, and
-do the longjmp. They sync up and the parent copies all it's program
-memory to the child's address space. There's also code to reload
-dlls, map shared memory and mmap'd files, etc.
-
-Handling the special startup for the child is done in dcrt0.cc in many
-places. This case is triggered by a special StartupInfo structure
-that's passed from the parent to the child in CreateProcessA.
diff --git a/winsup/cygwin/acconfig.h b/winsup/cygwin/acconfig.h
deleted file mode 100644
index 53ac1fc..0000000
--- a/winsup/cygwin/acconfig.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Define if DEBUGGING support is requested. */
-#undef DEBUGGING
-
-/* Define if GCC supports builtin memset. */
-#undef HAVE_BUILTIN_MEMSET
-
-/* Define if MALLOC_DEBUGGING support is requested. */
-#undef MALLOC_DEBUG
-
-/* Define if using new vfork functionality. */
-#undef NEWVFORK
-
-/* Define if using cygserver */
-#undef USE_SERVER
diff --git a/winsup/cygwin/aclocal.m4 b/winsup/cygwin/aclocal.m4
deleted file mode 100644
index ecef424..0000000
--- a/winsup/cygwin/aclocal.m4
+++ /dev/null
@@ -1,875 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-# lib-prefix.m4 serial 4 (gettext-0.14.2)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
-dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
-dnl require excessive bracketing.
-ifdef([AC_HELP_STRING],
-[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
-[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
-
-dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
-dnl to access previously installed libraries. The basic assumption is that
-dnl a user will want packages to use other packages he previously installed
-dnl with the same --prefix option.
-dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
-dnl libraries, but is otherwise very convenient.
-AC_DEFUN([AC_LIB_PREFIX],
-[
- AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib-prefix],
-[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
- --without-lib-prefix don't search for libraries in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
- fi
- fi
-])
- if test $use_additional = yes; then
- dnl Potentially add $additional_includedir to $CPPFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's already present in $CPPFLAGS,
- dnl 3. if it's /usr/local/include and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- for x in $CPPFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $CPPFLAGS.
- CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- dnl Potentially add $additional_libdir to $LDFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's already present in $LDFLAGS,
- dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
- haveit=
- for x in $LDFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_libdir" = "X/usr/local/lib"; then
- if test -n "$GCC"; then
- case $host_os in
- linux*) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LDFLAGS.
- LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- fi
-])
-
-dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
-dnl acl_final_exec_prefix, containing the values to which $prefix and
-dnl $exec_prefix will expand at the end of the configure script.
-AC_DEFUN([AC_LIB_PREPARE_PREFIX],
-[
- dnl Unfortunately, prefix and exec_prefix get only finally determined
- dnl at the end of configure.
- if test "X$prefix" = "XNONE"; then
- acl_final_prefix="$ac_default_prefix"
- else
- acl_final_prefix="$prefix"
- fi
- if test "X$exec_prefix" = "XNONE"; then
- acl_final_exec_prefix='${prefix}'
- else
- acl_final_exec_prefix="$exec_prefix"
- fi
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
- prefix="$acl_save_prefix"
-])
-
-dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
-dnl variables prefix and exec_prefix bound to the values they will have
-dnl at the end of the configure script.
-AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
-[
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- acl_save_exec_prefix="$exec_prefix"
- exec_prefix="$acl_final_exec_prefix"
- $1
- exec_prefix="$acl_save_exec_prefix"
- prefix="$acl_save_prefix"
-])
-
-# lib-link.m4 serial 6 (gettext-0.14.3)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_PREREQ(2.50)
-
-dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
-dnl augments the CPPFLAGS variable.
-AC_DEFUN([AC_LIB_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
- ac_cv_lib[]Name[]_libs="$LIB[]NAME"
- ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
- ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
- ])
- LIB[]NAME="$ac_cv_lib[]Name[]_libs"
- LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
- INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
- dnl results of this search when this library appears as a dependency.
- HAVE_LIB[]NAME=yes
- undefine([Name])
- undefine([NAME])
-])
-
-dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
-dnl searches for libname and the libraries corresponding to explicit and
-dnl implicit dependencies, together with the specified include files and
-dnl the ability to compile and link the specified testcode. If found, it
-dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
-dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
-dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
-dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
-AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-
- dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
- dnl accordingly.
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
-
- dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
- dnl because if the user has installed lib[]Name and not disabled its use
- dnl via --without-lib[]Name-prefix, he wants to use it.
- ac_save_CPPFLAGS="$CPPFLAGS"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-
- AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS $LIB[]NAME"
- AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
- LIBS="$ac_save_LIBS"
- ])
- if test "$ac_cv_lib[]Name" = yes; then
- HAVE_LIB[]NAME=yes
- AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
- AC_MSG_CHECKING([how to link with lib[]$1])
- AC_MSG_RESULT([$LIB[]NAME])
- else
- HAVE_LIB[]NAME=no
- dnl If $LIB[]NAME didn't lead to a usable library, we don't need
- dnl $INC[]NAME either.
- CPPFLAGS="$ac_save_CPPFLAGS"
- LIB[]NAME=
- LTLIB[]NAME=
- fi
- AC_SUBST([HAVE_LIB]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- undefine([Name])
- undefine([NAME])
-])
-
-dnl Determine the platform dependent parameters needed to use rpath:
-dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
-dnl hardcode_direct, hardcode_minus_L.
-AC_DEFUN([AC_LIB_RPATH],
-[
- dnl Tell automake >= 1.10 to complain if config.rpath is missing.
- m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
- AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
- AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
- AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
- AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
- CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
- ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
- . ./conftest.sh
- rm -f ./conftest.sh
- acl_cv_rpath=done
- ])
- wl="$acl_cv_wl"
- libext="$acl_cv_libext"
- shlibext="$acl_cv_shlibext"
- hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
- hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
- hardcode_direct="$acl_cv_hardcode_direct"
- hardcode_minus_L="$acl_cv_hardcode_minus_L"
- dnl Determine whether the user wants rpath handling at all.
- AC_ARG_ENABLE(rpath,
- [ --disable-rpath do not hardcode runtime library paths],
- :, enable_rpath=yes)
-])
-
-dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
-AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
-[
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib$1-prefix],
-[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
- --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
- fi
- fi
-])
- dnl Search the library and its dependencies in $additional_libdir and
- dnl $LDFLAGS. Using breadth-first-seach.
- LIB[]NAME=
- LTLIB[]NAME=
- INC[]NAME=
- rpathdirs=
- ltrpathdirs=
- names_already_handled=
- names_next_round='$1 $2'
- while test -n "$names_next_round"; do
- names_this_round="$names_next_round"
- names_next_round=
- for name in $names_this_round; do
- already_handled=
- for n in $names_already_handled; do
- if test "$n" = "$name"; then
- already_handled=yes
- break
- fi
- done
- if test -z "$already_handled"; then
- names_already_handled="$names_already_handled $name"
- dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
- dnl or AC_LIB_HAVE_LINKFLAGS call.
- uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
- eval value=\"\$HAVE_LIB$uppername\"
- if test -n "$value"; then
- if test "$value" = yes; then
- eval value=\"\$LIB$uppername\"
- test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
- eval value=\"\$LTLIB$uppername\"
- test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
- else
- dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
- dnl that this library doesn't exist. So just drop it.
- :
- fi
- else
- dnl Search the library lib$name in $additional_libdir and $LDFLAGS
- dnl and the already constructed $LIBNAME/$LTLIBNAME.
- found_dir=
- found_la=
- found_so=
- found_a=
- if test $use_additional = yes; then
- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
- found_dir="$additional_libdir"
- found_so="$additional_libdir/lib$name.$shlibext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- else
- if test -f "$additional_libdir/lib$name.$libext"; then
- found_dir="$additional_libdir"
- found_a="$additional_libdir/lib$name.$libext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- fi
- fi
- fi
- if test "X$found_dir" = "X"; then
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- case "$x" in
- -L*)
- dir=`echo "X$x" | sed -e 's/^X-L//'`
- if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
- found_dir="$dir"
- found_so="$dir/lib$name.$shlibext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- else
- if test -f "$dir/lib$name.$libext"; then
- found_dir="$dir"
- found_a="$dir/lib$name.$libext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- fi
- fi
- ;;
- esac
- if test "X$found_dir" != "X"; then
- break
- fi
- done
- fi
- if test "X$found_dir" != "X"; then
- dnl Found the library.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
- if test "X$found_so" != "X"; then
- dnl Linking with a shared library. We attempt to hardcode its
- dnl directory into the executable's runpath, unless it's the
- dnl standard /usr/lib.
- if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
- dnl No hardcoding is needed.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $found_dir"
- fi
- dnl The hardcoding into $LIBNAME is system dependent.
- if test "$hardcode_direct" = yes; then
- dnl Using DIR/libNAME.so during linking hardcodes DIR into the
- dnl resulting binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $found_dir"
- fi
- else
- dnl Rely on "-L$found_dir".
- dnl But don't add it if it's already contained in the LDFLAGS
- dnl or the already constructed $LIBNAME
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
- fi
- if test "$hardcode_minus_L" != no; then
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
- dnl here, because this doesn't fit in flags passed to the
- dnl compiler. So give up. No hardcoding. This affects only
- dnl very old systems.
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- fi
- else
- if test "X$found_a" != "X"; then
- dnl Linking with a static library.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
- else
- dnl We shouldn't come here, but anyway it's good to have a
- dnl fallback.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
- fi
- fi
- dnl Assume the include files are nearby.
- additional_includedir=
- case "$found_dir" in
- */lib | */lib/)
- basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
- additional_includedir="$basedir/include"
- ;;
- esac
- if test "X$additional_includedir" != "X"; then
- dnl Potentially add $additional_includedir to $INCNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's /usr/local/include and we are using GCC on Linux,
- dnl 3. if it's already present in $CPPFLAGS or the already
- dnl constructed $INCNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- for x in $CPPFLAGS $INC[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $INCNAME.
- INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- fi
- dnl Look for dependencies.
- if test -n "$found_la"; then
- dnl Read the .la file. It defines the variables
- dnl dlname, library_names, old_library, dependency_libs, current,
- dnl age, revision, installed, dlopen, dlpreopen, libdir.
- save_libdir="$libdir"
- case "$found_la" in
- */* | *\\*) . "$found_la" ;;
- *) . "./$found_la" ;;
- esac
- libdir="$save_libdir"
- dnl We use only dependency_libs.
- for dep in $dependency_libs; do
- case "$dep" in
- -L*)
- additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
- dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 3. if it's already present in $LDFLAGS or the already
- dnl constructed $LIBNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
- haveit=
- if test "X$additional_libdir" = "X/usr/local/lib"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LIBNAME.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- haveit=
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LTLIBNAME.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- ;;
- -R*)
- dir=`echo "X$dep" | sed -e 's/^X-R//'`
- if test "$enable_rpath" != no; then
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $dir"
- fi
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $dir"
- fi
- fi
- ;;
- -l*)
- dnl Handle this in the next round.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
- ;;
- *.la)
- dnl Handle this in the next round. Throw away the .la's
- dnl directory; it is already contained in a preceding -L
- dnl option.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
- ;;
- *)
- dnl Most likely an immediate library name.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
- ;;
- esac
- done
- fi
- else
- dnl Didn't find the library; assume it is in the system directories
- dnl known to the linker and runtime loader. (All the system
- dnl directories known to the linker should also be known to the
- dnl runtime loader, otherwise the system is severely misconfigured.)
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- done
- done
- if test "X$rpathdirs" != "X"; then
- if test -n "$hardcode_libdir_separator"; then
- dnl Weird platform: only the last -rpath option counts, the user must
- dnl pass all path elements in one option. We can arrange that for a
- dnl single library, but not when more than one $LIBNAMEs are used.
- alldirs=
- for found_dir in $rpathdirs; do
- alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
- done
- dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
- acl_save_libdir="$libdir"
- libdir="$alldirs"
- eval flag=\"$hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- else
- dnl The -rpath options are cumulative.
- for found_dir in $rpathdirs; do
- acl_save_libdir="$libdir"
- libdir="$found_dir"
- eval flag=\"$hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- done
- fi
- fi
- if test "X$ltrpathdirs" != "X"; then
- dnl When using libtool, the option that works for both libraries and
- dnl executables is -R. The -R options are cumulative.
- for found_dir in $ltrpathdirs; do
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
- done
- fi
-])
-
-dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
-dnl unless already present in VAR.
-dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
-dnl contains two or three consecutive elements that belong together.
-AC_DEFUN([AC_LIB_APPENDTOVAR],
-[
- for element in [$2]; do
- haveit=
- for x in $[$1]; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X$element"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- [$1]="${[$1]}${[$1]:+ }$element"
- fi
- done
-])
-
-# lib-ld.m4 serial 3 (gettext-0.13)
-dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
-
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
-AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- acl_cv_prog_gnu_ld=yes ;;
-*)
- acl_cv_prog_gnu_ld=no ;;
-esac])
-with_gnu_ld=$acl_cv_prog_gnu_ld
-])
-
-dnl From libtool-1.4. Sets the variable LD.
-AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- [re_direlt='/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(acl_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- acl_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break ;;
- *)
- test "$with_gnu_ld" != yes && break ;;
- esac
- fi
- done
- IFS="$ac_save_ifs"
-else
- acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$acl_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_LIB_PROG_LD_GNU
-])
-
-dnl This provides configure definitions used by all the winsup
-dnl configure.in files.
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN([LIB_AC_PROG_CC_GNU],
-[AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc,
-[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
-cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi])])
-
-AC_DEFUN([LIB_AC_PROG_CC],
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_TOOL(CC, gcc, gcc)
-: ${CC:=gcc}
-AC_PROG_CC
-test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-])
-
-AC_DEFUN([LIB_AC_PROG_CXX],
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_TOOL(CXX, g++, g++)
-if test -z "$CXX"; then
- AC_CHECK_TOOL(CXX, g++, c++, , , )
- : ${CXX:=g++}
- AC_PROG_CXX
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-CXXFLAGS='$(CFLAGS)'
-])
-
diff --git a/winsup/cygwin/analyze_sigfe b/winsup/cygwin/analyze_sigfe
deleted file mode 100755
index 0b9b721..0000000
--- a/winsup/cygwin/analyze_sigfe
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/usr/bin/perl -s
-# Copyright 2006 Red Hat, Inc.
-#
-# This file is part of Cygwin.
-#
-# This software is a copyrighted work licensed under the terms of the
-# Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-# details.
-
-# This will do a crude test to see if the (NO)?SIGFE stuff is used properly
-# in cygwin.din. It is not perfect so do not use it to do a wholesale replacement.
-#
-# Input is the output of 'objdump --disassemble --demangle cygwin0.dll'.
-#
-use strict;
-use vars qw'$v';
-sub star($);
-
-my %funcs;
-my $func = '';
-
-$| = 1;
-while (<>) {
- /^610.....\s+<([^\(>]+).*?:/o and do {
- $func = $1;
- $funcs{$func} = {} unless defined $funcs{$func};
- next;
- };
- $func and /call\s+\S+\s+<([^\(>]+)/o and do {
- my $called = $1;
- $funcs{$func}{$called} = 1;
- if ($called =~ /^[A-Z].*@/o || ($called = $funcs{$called}{-uses_kernel})) {
- $funcs{$func}{-uses_kernel} ||= $called;
- my @a = ($func);
- while (my $f = shift @a) {
- for my $k (keys %funcs) {
- if ($funcs{$k}{$f} && !$funcs{$k}{-uses_kernel}) {
- $funcs{$k}{-uses_kernel} = $called;
- push(@a, $k);
- }
- }
- }
- }
- next;
- };
-}
-
-if ($v) {
- for my $k (sort keys %funcs) {
- print star($funcs{$k}), $k, $funcs{$k}{-uses_kernel} ? " ($funcs{$k}{-uses_kernel})\n" : "\n";
- my $indent = ' ';
- for (sort keys %{$funcs{$k}}) {
- next if /^-/o;
- print $indent, $_, star($funcs{$k});
- $indent = ' ';
- }
- print "\n";
- }
-}
-
-open(DIN, '<', 'cygwin.din') or die "$0: couldn't open cygwin.din - $!\n";
-while (<DIN>) {
- my $line = $_;
- /^LIBRARY\s+/o and next;
- /^\s*$/ and next;
- /^EXPORTS/o and next;
- / DATA$/o and next;
- my $sigfe = (/\s+((?:NO)?SIGFE)\s*$/o)[0] !~ /^NO/o;
- s/\s+((?:NO)?SIGFE)\s*$//o;
- my $func = (/\s+=\s+(\S+)/o)[0] || (/^\s*(\S+)/o)[0];
- if (!defined($funcs{$func})) {
- warn "hmm. couldn't find $func in disassembled output\n";
- } elsif (!!$funcs{$func}{-uses_kernel} != $sigfe) {
- warn "mismatch detected: $line";
- }
-}
-
-sub star($) {
- return $_[0]->{-uses_kernel} ? '*' : '';
-}
diff --git a/winsup/cygwin/assert.cc b/winsup/cygwin/assert.cc
deleted file mode 100644
index 8b8c181..0000000
--- a/winsup/cygwin/assert.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-/* assert.cc: Handle the assert macro for WIN32.
-
- Copyright 1997, 1998, 2000, 2001, 2007 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "security.h"
-#include <wingdi.h>
-#include <winuser.h>
-
-#include <assert.h>
-#include <stdlib.h>
-
-/* This function is called when the assert macro fails. This will
- override the function of the same name in newlib. */
-
-extern "C" void
-__assert (const char *file, int line, const char *failedexpr)
-{
- __assert_func (file, line, NULL, failedexpr);
-}
-
-extern "C" void
-__assert_func (const char *file, int line, const char *func,
- const char *failedexpr)
-{
- HANDLE h;
-
- /* If we don't have a console in a Windows program, then bring up a
- message box for the assertion failure. */
-
- h = CreateFile ("CONOUT$", GENERIC_WRITE, FILE_SHARE_WRITE, &sec_none_nih,
- OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
- if (h == INVALID_HANDLE_VALUE)
- {
- char *buf;
-
- buf = (char *) alloca (100 + strlen (failedexpr));
- __small_sprintf (buf, "Failed assertion\n\t%s\nat line %d of file %s%s%s",
- failedexpr, line, file,
- func ? "\nin function " : "", func ? func : "");
- MessageBox (NULL, buf, NULL, MB_OK | MB_ICONERROR | MB_TASKMODAL);
- }
- else
- {
- CloseHandle (h);
- small_printf ("assertion \"%s\" failed: file \"%s\", line %d%s%s\n",
- failedexpr, file, line,
- func ? ", function: " : "", func ? func : "");
- }
-
-#ifdef DEBUGGING
- try_to_debug ();
-#endif
- abort (); // FIXME: Someday this should work.
-
- /* NOTREACHED */
-}
diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc
deleted file mode 100644
index e69a332..0000000
--- a/winsup/cygwin/autoload.cc
+++ /dev/null
@@ -1,456 +0,0 @@
-/* autoload.cc: all dynamic load stuff.
-
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "miscfuncs.h"
-#define USE_SYS_TYPES_FD_SET
-#include <winsock2.h>
-
-bool NO_COPY wsock_started;
-
-/* Macro for defining "auto-load" functions.
- * Note that this is self-modifying code *gasp*.
- * The first invocation of a routine will trigger the loading of
- * the DLL. This will then be followed by the discovery of
- * the procedure's entry point, which is placed into the location
- * pointed to by the stack pointer. This code then changes
- * the "call" operand which invoked it to a "jmp" which will
- * transfer directly to the DLL function on the next invocation.
- *
- * Subsequent calls to routines whose transfer address has not been
- * determined will skip the "load the dll" step, starting at the
- * "discovery of the entry point" step.
- *
- * So, immediately following the the call to one of the above routines
- * we have:
- * DLL info (4 bytes) Pointer to a block of information concerning
- * the DLL (see below).
- * DLL args (4 bytes) The number of arguments pushed on the stack by
- * the call. If this is an odd value then this
- * is a flag that non-existence of this function
- * is not a fatal error
- * func name (n bytes) asciz string containing the name of the function
- * to be loaded.
- *
- * The DLL info block consists of the following
- * load_state (4 bytes) Pointer to a word containing the routine used
- * to eventually invoke the function. Initially
- * points to an init function which loads the
- * DLL, gets the process's load address,
- * changes the contents here to point to the
- * function address, and changes the call *(%eax)
- * to a jmp func. If the initialization has been
- * done, only the load part is done.
- * DLL handle (4 bytes) The handle to use when loading the DLL.
- * DLL locker (4 bytes) Word to use to avoid multi-thread access during
- * initialization.
- * extra init (4 bytes) Extra initialization function.
- * DLL name (n bytes) asciz string containing the name of the DLL.
- */
-
-/* LoadDLLprime is used to prime the DLL info information, providing an
- additional initialization routine to call prior to calling the first
- function. */
-#define LoadDLLprime(dllname, init_also) __asm__ (" \n\
-.ifndef " #dllname "_primed \n\
- .section .data_cygwin_nocopy,\"w\" \n\
- .align 4 \n\
-."#dllname "_info: \n\
- .long _std_dll_init \n\
- .long 0 \n\
- .long -1 \n\
- .long " #init_also " \n\
- .asciz \"" #dllname "\" \n\
- .text \n\
- .set " #dllname "_primed, 1 \n\
-.endif \n\
-");
-
-/* Create a "decorated" name */
-#define mangle(name, n) #name "@" #n
-
-/* Standard DLL load macro. May invoke a fatal error if the function isn't
- found. */
-#define LoadDLLfunc(name, n, dllname) \
- LoadDLLfuncEx (name, n, dllname, 0)
-#define LoadDLLfuncEx(name, n, dllname, notimp) \
- LoadDLLfuncEx2(name, n, dllname, notimp, 0)
-#define LoadDLLfuncEx2(name, n, dllname, notimp, err) \
- LoadDLLfuncEx3(name, n, dllname, notimp, err, 0)
-
-/* Main DLL setup stuff. */
-#define LoadDLLfuncEx3(name, n, dllname, notimp, err, fn) \
- LoadDLLprime (dllname, dll_func_load) \
- __asm__ (" \n\
- .section ." #dllname "_autoload_text,\"wx\" \n\
- .global _" mangle (name, n) " \n\
- .global _win32_" mangle (name, n) " \n\
- .align 8 \n\
-_" mangle (name, n) ": \n\
-_win32_" mangle (name, n) ": \n\
- .byte 0xe9 \n\
- .long -4 + 1f - . \n\
-1:movl (2f),%eax \n\
- call *(%eax) \n\
-2:.long ." #dllname "_info \n\
- .long (" #n "+" #notimp ") | (((" #err ") & 0xff) <<16) | (((" #fn ") & 0xff) << 24) \n\
- .asciz \"" #name "\" \n\
- .text \n\
-");
-
-/* DLL loader helper functions used during initialization. */
-
-/* The function which finds the address, given the name and overwrites
- the call so that future invocations go straight to the function in
- the DLL. */
-extern "C" void dll_func_load () __asm__ ("dll_func_load");
-
-/* Called by the primary initialization function "init_std_dll" to
- setup the stack and eliminate future calls to init_std_dll for other
- functions from this DLL. */
-extern "C" void dll_chain () __asm__ ("dll_chain");
-
-extern "C" {
-
-__asm__ (" \n\
- .text \n\
-msg1: \n\
- .ascii \"couldn't dynamically determine load address for '%s' (handle %p), %E\\0\"\n\
- \n\
- .align 32 \n\
-noload: \n\
- popl %edx # Get the address of the information block\n\
- movl 4(%edx),%eax # Should we 'ignore' the lack \n\
- test $1,%eax # of this function? \n\
- jz 1f # Nope. \n\
- decl %eax # Yes. This is the # of bytes + 1 \n\
- popl %edx # Caller's caller \n\
- addl %eax,%esp # Pop off bytes \n\
- andl $0xffff0000,%eax# upper word \n\
- subl %eax,%esp # adjust for possible return value \n\
- pushl %eax # Save for later \n\
- movl $127,%eax # ERROR_PROC_NOT_FOUND \n\
- pushl %eax # First argument \n\
- call _SetLastError@4 # Set it \n\
- popl %eax # Get back argument \n\
- sarl $16,%eax # return value in high order word \n\
- jmp *%edx # Return \n\
-1: \n\
- movl (%edx),%eax # Handle value \n\
- pushl 4(%eax) \n\
- leal 8(%edx),%eax # Location of name of function \n\
- push %eax \n\
- push $msg1 # The message \n\
- call ___api_fatal # Print message. Never returns \n\
- \n\
- .globl dll_func_load \n\
-dll_func_load: \n\
- movl (%esp),%eax # 'Return address' contains load info \n\
- addl $8,%eax # Address of name of function to load \n\
- pushl %eax # Second argument \n\
- movl -8(%eax),%eax # Where handle lives \n\
- movl 4(%eax),%eax # Address of Handle to DLL \n\
- pushl %eax # Handle to DLL \n\
- call _GetProcAddress@8# Load it \n\
- test %eax,%eax # Success? \n\
- jne gotit # Yes \n\
- jmp noload # Issue an error or return \n\
-gotit: \n\
- popl %edx # Pointer to 'return address' \n\
- subl %edx,%eax # Make it relative \n\
- addl $7,%eax # Tweak \n\
- subl $12,%edx # Point to jmp \n\
- movl %eax,1(%edx) # Move relative address after jump \n\
- jmp *%edx # Jump to actual function \n\
- \n\
- .global dll_chain \n\
-dll_chain: \n\
- pushl %eax # Restore 'return address' \n\
- jmp *%edx # Jump to next init function \n\
-");
-
-/* C representations of the two info blocks described above.
- FIXME: These structures confuse gdb for some reason. GDB can print
- the whole structure but has problems with the name field? */
-struct dll_info
-{
- DWORD load_state;
- HANDLE handle;
- LONG here;
- void (*init) ();
- char name[];
-};
-
-struct func_info
-{
- struct dll_info *dll;
- LONG decoration;
- char name[];
-};
-
-/* Mechanism for setting up info for passing to dll_chain routines. */
-union retchain
-{
- struct {long high; long low;};
- long long ll;
-};
-
-/* The standard DLL initialization routine. */
-__attribute__ ((used, noinline)) static long long
-std_dll_init ()
-{
- HANDLE h;
- struct func_info *func = (struct func_info *) __builtin_return_address (0);
- struct dll_info *dll = func->dll;
- retchain ret;
-
- if (InterlockedIncrement (&dll->here))
- do
- {
- InterlockedDecrement (&dll->here);
- low_priority_sleep (0);
- }
- while (InterlockedIncrement (&dll->here));
- else if (!dll->handle)
- {
- unsigned fpu_control = 0;
- __asm__ __volatile__ ("fnstcw %0": "=m" (fpu_control));
- if ((h = LoadLibrary (dll->name)) != NULL)
- {
- __asm__ __volatile__ ("fldcw %0": : "m" (fpu_control));
- dll->handle = h;
- }
- else if (!(func->decoration & 1))
- api_fatal ("could not load %s, %E", dll->name);
- else
- dll->handle = INVALID_HANDLE_VALUE;
- }
-
- InterlockedDecrement (&dll->here);
-
- /* Kludge alert. Redirects the return address to dll_chain. */
- __asm__ __volatile__ (" \n\
- movl $dll_chain,4(%ebp) \n\
- ");
-
- /* Set "arguments for dll_chain. */
- ret.low = (long) dll->init;
- ret.high = (long) func;
- return ret.ll;
-}
-
-/* Initialization function for winsock stuff. */
-WSADATA NO_COPY wsadata;
-__attribute__ ((used, noinline, regparm(1))) static long long
-wsock_init ()
-{
- static LONG NO_COPY here = -1L;
- struct func_info *func = (struct func_info *) __builtin_return_address (0);
- struct dll_info *dll = func->dll;
-
- while (InterlockedIncrement (&here))
- {
- InterlockedDecrement (&here);
- low_priority_sleep (0);
- }
-
- if (!wsock_started)
- {
- int (*wsastartup) (int, WSADATA *);
-
- /* Don't use autoload to load WSAStartup to eliminate recursion. */
- wsastartup = (int (*)(int, WSADATA *))
- GetProcAddress ((HMODULE) (dll->handle), "WSAStartup");
- if (wsastartup)
- {
- int res = wsastartup ((2<<8) | 2, &wsadata);
-
- debug_printf ("res %d", res);
- debug_printf ("wVersion %d", wsadata.wVersion);
- debug_printf ("wHighVersion %d", wsadata.wHighVersion);
- debug_printf ("szDescription %s", wsadata.szDescription);
- debug_printf ("szSystemStatus %s", wsadata.szSystemStatus);
- debug_printf ("iMaxSockets %d", wsadata.iMaxSockets);
- debug_printf ("iMaxUdpDg %d", wsadata.iMaxUdpDg);
- debug_printf ("lpVendorInfo %d", wsadata.lpVendorInfo);
-
- wsock_started = 1;
- }
- }
-
- /* Kludge alert. Redirects the return address to dll_chain. */
- __asm__ __volatile__ (" \n\
- movl $dll_chain,4(%ebp) \n\
- ");
-
- InterlockedDecrement (&here);
-
- volatile retchain ret;
- /* Set "arguments for dll_chain. */
- ret.low = (long) dll_func_load;
- ret.high = (long) func;
- return ret.ll;
-}
-
-LoadDLLprime (ws2_32, _wsock_init)
-
-/* 127 == ERROR_PROC_NOT_FOUND */
-LoadDLLfuncEx2 (DsGetDcNameW, 24, netapi32, 1, 127)
-LoadDLLfunc (NetApiBufferFree, 4, netapi32)
-LoadDLLfuncEx (NetGetAnyDCName, 12, netapi32, 1)
-LoadDLLfuncEx (NetGetDCName, 12, netapi32, 1)
-LoadDLLfunc (NetLocalGroupEnum, 28, netapi32)
-LoadDLLfunc (NetLocalGroupGetMembers, 32, netapi32)
-LoadDLLfunc (NetUserGetGroups, 28, netapi32)
-LoadDLLfunc (NetUserGetInfo, 16, netapi32)
-
-/* 0xc000007a == STATUS_PROCEDURE_NOT_FOUND */
-#define LoadDLLfuncNt(name, n, dllname) \
- LoadDLLfuncEx2(name, n, dllname, 1, 0xc000007a)
-LoadDLLfuncNt (NtCommitTransaction, 8, ntdll)
-LoadDLLfuncNt (NtCreateTransaction, 40, ntdll)
-LoadDLLfuncNt (NtRollbackTransaction, 8, ntdll)
-LoadDLLfuncNt (RtlGetCurrentTransaction, 0, ntdll)
-LoadDLLfuncNt (RtlSetCurrentTransaction, 4, ntdll)
-
-LoadDLLfuncEx (EnumProcessModules, 16, psapi, 1)
-LoadDLLfuncEx (GetModuleFileNameExW, 16, psapi, 1)
-LoadDLLfuncEx (GetModuleInformation, 16, psapi, 1)
-LoadDLLfuncEx (GetProcessMemoryInfo, 12, psapi, 1)
-LoadDLLfuncEx (QueryWorkingSet, 12, psapi, 1)
-
-LoadDLLfuncEx (LsaDeregisterLogonProcess, 4, secur32, 1)
-LoadDLLfuncEx (LsaFreeReturnBuffer, 4, secur32, 1)
-LoadDLLfuncEx (LsaLogonUser, 56, secur32, 1)
-LoadDLLfuncEx (LsaLookupAuthenticationPackage, 12, secur32, 1)
-LoadDLLfuncEx (LsaRegisterLogonProcess, 12, secur32, 1)
-
-LoadDLLfunc (CharNextExA, 12, user32)
-LoadDLLfunc (CloseClipboard, 0, user32)
-LoadDLLfunc (CloseDesktop, 4, user32)
-LoadDLLfunc (CloseWindowStation, 4, user32)
-LoadDLLfunc (CreateDesktopW, 24, user32)
-LoadDLLfunc (CreateWindowExA, 48, user32)
-LoadDLLfunc (CreateWindowStationW, 16, user32)
-LoadDLLfunc (DefWindowProcA, 16, user32)
-LoadDLLfunc (DispatchMessageA, 4, user32)
-LoadDLLfunc (EmptyClipboard, 0, user32)
-LoadDLLfunc (FindWindowA, 8, user32)
-LoadDLLfunc (GetClipboardData, 4, user32)
-LoadDLLfunc (GetForegroundWindow, 0, user32)
-LoadDLLfunc (GetKeyboardLayout, 4, user32)
-LoadDLLfunc (GetMessageA, 16, user32)
-LoadDLLfunc (GetPriorityClipboardFormat, 8, user32)
-LoadDLLfunc (GetProcessWindowStation, 0, user32)
-LoadDLLfunc (GetThreadDesktop, 4, user32)
-LoadDLLfunc (GetWindowThreadProcessId, 8, user32)
-LoadDLLfunc (GetUserObjectInformationW, 20, user32)
-LoadDLLfunc (MessageBeep, 4, user32)
-LoadDLLfunc (MessageBoxA, 16, user32)
-LoadDLLfunc (MsgWaitForMultipleObjects, 20, user32)
-LoadDLLfunc (OpenClipboard, 4, user32)
-LoadDLLfunc (PeekMessageA, 20, user32)
-LoadDLLfunc (PostMessageA, 16, user32)
-LoadDLLfunc (PostQuitMessage, 4, user32)
-LoadDLLfunc (RegisterClassA, 4, user32)
-LoadDLLfunc (RegisterClipboardFormatA, 4, user32)
-LoadDLLfunc (SendMessageA, 16, user32)
-LoadDLLfunc (SetClipboardData, 8, user32)
-LoadDLLfunc (SetThreadDesktop, 4, user32)
-LoadDLLfunc (SetProcessWindowStation, 4, user32)
-
-LoadDLLfunc (accept, 12, ws2_32)
-LoadDLLfunc (bind, 12, ws2_32)
-LoadDLLfunc (closesocket, 4, ws2_32)
-LoadDLLfunc (connect, 12, ws2_32)
-LoadDLLfunc (gethostbyaddr, 12, ws2_32)
-LoadDLLfunc (gethostbyname, 4, ws2_32)
-LoadDLLfuncEx2 (gethostname, 8, ws2_32, 1, 1)
-LoadDLLfunc (getpeername, 12, ws2_32)
-LoadDLLfunc (getprotobyname, 4, ws2_32)
-LoadDLLfunc (getprotobynumber, 4, ws2_32)
-LoadDLLfunc (getservbyname, 8, ws2_32)
-LoadDLLfunc (getservbyport, 8, ws2_32)
-LoadDLLfunc (getsockname, 12, ws2_32)
-LoadDLLfunc (getsockopt, 20, ws2_32)
-LoadDLLfunc (ioctlsocket, 12, ws2_32)
-LoadDLLfunc (listen, 8, ws2_32)
-LoadDLLfunc (setsockopt, 20, ws2_32)
-LoadDLLfunc (shutdown, 8, ws2_32)
-LoadDLLfunc (socket, 12, ws2_32)
-LoadDLLfunc (WSAAsyncSelect, 16, ws2_32)
-LoadDLLfunc (WSAEnumNetworkEvents, 12, ws2_32)
-LoadDLLfunc (WSAEventSelect, 12, ws2_32)
-LoadDLLfunc (WSAGetLastError, 0, ws2_32)
-LoadDLLfunc (WSARecvFrom, 36, ws2_32)
-LoadDLLfunc (WSASendTo, 36, ws2_32)
-LoadDLLfunc (WSASetLastError, 4, ws2_32)
-// LoadDLLfunc (WSAStartup, 8, ws2_32)
-LoadDLLfunc (WSAWaitForMultipleEvents, 20, ws2_32)
-
-// 50 = ERROR_NOT_SUPPORTED. Returned if OS doesn't supprot iphlpapi funcs
-LoadDLLfuncEx2 (GetAdaptersAddresses, 20, iphlpapi, 1, 50)
-LoadDLLfuncEx2 (GetExtendedTcpTable, 24, iphlpapi, 1, 50)
-LoadDLLfuncEx2 (GetIfEntry, 4, iphlpapi, 1, 50)
-LoadDLLfuncEx2 (GetIpAddrTable, 12, iphlpapi, 1, 50)
-LoadDLLfuncEx2 (GetIpForwardTable, 12, iphlpapi, 1, 50)
-LoadDLLfuncEx2 (GetNetworkParams, 8, iphlpapi, 1, 50)
-LoadDLLfuncEx2 (GetTcpTable, 12, iphlpapi, 1, 50)
-LoadDLLfuncEx2 (SendARP, 16, iphlpapi, 1, 50)
-
-LoadDLLfunc (CoTaskMemFree, 4, ole32)
-
-LoadDLLfuncEx (FindFirstVolumeA, 8, kernel32, 1)
-LoadDLLfuncEx (FindNextVolumeA, 12, kernel32, 1)
-LoadDLLfuncEx (FindVolumeClose, 4, kernel32, 1)
-LoadDLLfuncEx (GetConsoleWindow, 0, kernel32, 1)
-LoadDLLfuncEx (GetSystemWindowsDirectoryW, 8, kernel32, 1)
-LoadDLLfuncEx (GetVolumeNameForVolumeMountPointA, 12, kernel32, 1)
-LoadDLLfuncEx (GetSystemDEPPolicy, 0, kernel32, 1)
-LoadDLLfuncEx (GetProcessDEPPolicy, 12, kernel32, 1)
-LoadDLLfuncEx (SetProcessDEPPolicy, 4, kernel32, 1)
-
-LoadDLLfunc (SHGetDesktopFolder, 4, shell32)
-
-LoadDLLfuncEx (waveOutGetNumDevs, 0, winmm, 1)
-LoadDLLfuncEx (waveOutOpen, 24, winmm, 1)
-LoadDLLfuncEx (waveOutReset, 4, winmm, 1)
-LoadDLLfuncEx (waveOutClose, 4, winmm, 1)
-LoadDLLfuncEx (waveOutGetVolume, 8, winmm, 1)
-LoadDLLfuncEx (waveOutSetVolume, 8, winmm, 1)
-LoadDLLfuncEx (waveOutUnprepareHeader, 12, winmm, 1)
-LoadDLLfuncEx (waveOutPrepareHeader, 12, winmm, 1)
-LoadDLLfuncEx (waveOutWrite, 12, winmm, 1)
-LoadDLLfuncEx (timeGetDevCaps, 8, winmm, 1)
-LoadDLLfuncEx (timeGetTime, 0, winmm, 1)
-LoadDLLfuncEx (timeBeginPeriod, 4, winmm, 1)
-LoadDLLfuncEx (timeEndPeriod, 4, winmm, 1)
-
-LoadDLLfuncEx (waveInGetNumDevs, 0, winmm, 1)
-LoadDLLfuncEx (waveInOpen, 24, winmm, 1)
-LoadDLLfuncEx (waveInUnprepareHeader, 12, winmm, 1)
-LoadDLLfuncEx (waveInPrepareHeader, 12, winmm, 1)
-LoadDLLfuncEx (waveInAddBuffer, 12, winmm, 1)
-LoadDLLfuncEx (waveInStart, 4, winmm, 1)
-LoadDLLfuncEx (waveInReset, 4, winmm, 1)
-LoadDLLfuncEx (waveInClose, 4, winmm, 1)
-
-LoadDLLfunc (WNetGetProviderNameA, 12, mpr)
-LoadDLLfunc (WNetGetResourceInformationA, 16, mpr)
-LoadDLLfunc (WNetOpenEnumA, 20, mpr)
-LoadDLLfunc (WNetEnumResourceA, 16, mpr)
-LoadDLLfunc (WNetCloseEnum, 4, mpr)
-
-LoadDLLfuncEx (UuidCreate, 4, rpcrt4, 1)
-LoadDLLfuncEx (UuidCreateSequential, 4, rpcrt4, 1)
-
-LoadDLLfuncEx2 (DnsQuery_A, 24, dnsapi, 1, 127) // ERROR_PROC_NOT_FOUND
-LoadDLLfuncEx (DnsRecordListFree, 8, dnsapi, 1)
-}
diff --git a/winsup/cygwin/automode.c b/winsup/cygwin/automode.c
deleted file mode 100644
index f7cddfe..0000000
--- a/winsup/cygwin/automode.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* automode.c
-
- Copyright 2000 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <windows.h>
-#include <sys/fcntl.h>
-#include <sys/cygwin.h>
-
-extern int _fmode;
-void
-cygwin_premain0 (int argc, char **argv, struct per_process *myself)
-{
- static struct __cygwin_perfile pf[] =
- {
- {"", O_RDONLY | O_TEXT},
- {"", O_WRONLY | O_BINARY},
- {NULL, 0}
- };
- cygwin_internal (CW_PERFILE, pf);
-}
diff --git a/winsup/cygwin/binmode.c b/winsup/cygwin/binmode.c
deleted file mode 100644
index 50efff4..0000000
--- a/winsup/cygwin/binmode.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* binmode.c
-
- Copyright 2000 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <windows.h>
-#include <sys/fcntl.h>
-#include <sys/cygwin.h>
-
-extern int _fmode;
-void
-cygwin_premain0 (int argc, char **argv, struct per_process *myself)
-{
- _fmode &= ~_O_TEXT;
- _fmode |= _O_BINARY;
-}
diff --git a/winsup/cygwin/child_info.h b/winsup/cygwin/child_info.h
deleted file mode 100644
index 56858e7..0000000
--- a/winsup/cygwin/child_info.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/* child_info.h: shared child info for cygwin
-
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <setjmp.h>
-
-enum child_info_types
-{
- _PROC_EXEC,
- _PROC_SPAWN,
- _PROC_FORK,
- _PROC_WHOOPS
-};
-
-enum child_status
-{
- _CI_STRACED = 0x01,
- _CI_ISCYGWIN = 0x02,
- _CI_SAW_CTRL_C = 0x04
-};
-
-#define OPROC_MAGIC_MASK 0xff00ff00
-#define OPROC_MAGIC_GENERIC 0xaf00f000
-
-#define PROC_MAGIC_GENERIC 0xaf00fa00
-
-#define PROC_EXEC (_PROC_EXEC)
-#define PROC_SPAWN (_PROC_SPAWN)
-#define PROC_FORK (_PROC_FORK)
-
-#define EXEC_MAGIC_SIZE sizeof(child_info)
-
-/* Change this value if you get a message indicating that it is out-of-sync. */
-#define CURR_CHILD_INFO_MAGIC 0x7901d74eU
-
-/* NOTE: Do not make gratuitous changes to the names or organization of the
- below class. The layout is checksummed to determine compatibility between
- different cygwin versions. */
-class child_info
-{
-public:
- DWORD msv_count; // zeroed on < W2K3, set to pseudo-count on Vista
- DWORD cb; // size of this record
- DWORD intro; // improbable string
- unsigned long magic; // magic number unique to child_info
- unsigned short type; // type of record, exec, spawn, fork
- HANDLE subproc_ready; // used for synchronization with parent
- HANDLE user_h;
- HANDLE parent;
- init_cygheap *cygheap;
- void *cygheap_max;
- DWORD cygheap_reserve_sz;
- unsigned char flag;
- unsigned fhandler_union_cb;
- int retry; // number of times we've tried to start child process
- DWORD exit_code; // process exit code
- static int retry_count;// retry count;
- child_info (unsigned, child_info_types, bool);
- child_info (): subproc_ready (NULL), parent (NULL) {}
- ~child_info ();
- void ready (bool);
- bool sync (int, HANDLE&, DWORD) __attribute__ ((regparm (3)));
- DWORD proc_retry (HANDLE) __attribute__ ((regparm (2)));
- bool isstraced () const {return !!(flag & _CI_STRACED);}
- bool iscygwin () const {return !!(flag & _CI_ISCYGWIN);}
- bool saw_ctrl_c () const {return !!(flag & _CI_SAW_CTRL_C);}
- void set_saw_ctrl_c () {flag |= _CI_SAW_CTRL_C;}
-};
-
-class mount_info;
-class _pinfo;
-
-class child_info_fork: public child_info
-{
-public:
- HANDLE forker_finished;// for synchronization with child
- DWORD stacksize; // size of parent stack
- jmp_buf jmp; // where child will jump to
- void *stacktop; // location of top of parent stack
- void *stackbottom; // location of bottom of parent stack
- char filler[4];
- child_info_fork ();
- void handle_fork () __attribute__ ((regparm (1)));;
- bool handle_failure (DWORD) __attribute__ ((regparm (2)));
- void alloc_stack ();
- void alloc_stack_hard_way (volatile char *);
-};
-
-class fhandler_base;
-
-class cygheap_exec_info
-{
-public:
- char *old_title;
- int argc;
- char **argv;
- int envc;
- char **envp;
- HANDLE myself_pinfo;
-};
-
-class child_info_spawn: public child_info
-{
-public:
- cygheap_exec_info *moreinfo;
- int __stdin;
- int __stdout;
- char filler[4];
-
- ~child_info_spawn ()
- {
- if (moreinfo)
- {
- if (moreinfo->old_title)
- cfree (moreinfo->old_title);
- if (moreinfo->envp)
- {
- for (char **e = moreinfo->envp; *e; e++)
- cfree (*e);
- cfree (moreinfo->envp);
- }
- if (type != _PROC_SPAWN && moreinfo->myself_pinfo)
- CloseHandle (moreinfo->myself_pinfo);
- cfree (moreinfo);
- }
- }
- child_info_spawn (): moreinfo (NULL) {};
- child_info_spawn (child_info_types, bool);
- void *operator new (size_t, void *p) __attribute__ ((nothrow)) {return p;}
- void set (child_info_types ci, bool b) { new (this) child_info_spawn (ci, b);}
- void handle_spawn () __attribute__ ((regparm (1)));
-};
-
-void __stdcall init_child_info (DWORD, child_info *, HANDLE);
-
-extern "C" {
-extern child_info *child_proc_info;
-extern child_info_spawn *spawn_info asm ("_child_proc_info");
-extern child_info_fork *fork_info asm ("_child_proc_info");
-}
diff --git a/winsup/cygwin/config.h.in b/winsup/cygwin/config.h.in
deleted file mode 100644
index edfbfee..0000000
--- a/winsup/cygwin/config.h.in
+++ /dev/null
@@ -1,53 +0,0 @@
-/* config.h.in. Generated from configure.in by autoheader. */
-/* Define if DEBUGGING support is requested. */
-#undef DEBUGGING
-
-/* Define if GCC supports builtin memset. */
-#undef HAVE_BUILTIN_MEMSET
-
-/* Define if MALLOC_DEBUGGING support is requested. */
-#undef MALLOC_DEBUG
-
-/* Define if using new vfork functionality. */
-#undef NEWVFORK
-
-/* Define if using cygserver */
-#undef USE_SERVER
-
-/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
- systems. This function is required for `alloca.c' support on those systems.
- */
-#undef CRAY_STACKSEG_END
-
-/* Define to 1 if using `alloca.c'. */
-#undef C_ALLOCA
-
-/* Define to 1 if you have `alloca', as a function or macro. */
-#undef HAVE_ALLOCA
-
-/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
- */
-#undef HAVE_ALLOCA_H
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown */
-#undef STACK_DIRECTION
diff --git a/winsup/cygwin/config/i386/profile.h b/winsup/cygwin/config/i386/profile.h
deleted file mode 100644
index 748b89a..0000000
--- a/winsup/cygwin/config/i386/profile.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* $NetBSD: profile.h,v 1.6 1995/03/28 18:17:08 jtc Exp $ */
-
-/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)profile.h 8.1 (Berkeley) 6/11/93
- */
-
-#define _MCOUNT_DECL static inline void _mcount
-
-#define MCOUNT \
-void \
-mcount() \
-{ \
- int selfpc, frompcindex; \
- /* \
- * find the return address for mcount, \
- * and the return address for mcount's caller. \
- * \
- * selfpc = pc pushed by mcount call \
- */ \
- __asm __volatile ("movl 4(%%ebp),%0" : "=r" (selfpc)); \
- /* \
- * frompcindex = pc pushed by call into self. \
- */ \
- __asm __volatile ("movl (%%ebp),%0;movl 4(%0),%0" : "=r" (frompcindex));\
- _mcount(frompcindex, selfpc); \
-}
-
diff --git a/winsup/cygwin/configure b/winsup/cygwin/configure
deleted file mode 100755
index 50932c8..0000000
--- a/winsup/cygwin/configure
+++ /dev/null
@@ -1,6807 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61.
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-as_nl='
-'
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-if test "x$CONFIG_SHELL" = x; then
- if (eval ":") 2>/dev/null; then
- as_have_required=yes
-else
- as_have_required=no
-fi
-
- if test $as_have_required = yes && (eval ":
-(as_func_return () {
- (exit \$1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
- :
-else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0) || { (exit 1); exit 1; }
-
-(
- as_lineno_1=\$LINENO
- as_lineno_2=\$LINENO
- test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
- test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
-") 2> /dev/null; then
- :
-else
- as_candidate_shells=
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- case $as_dir in
- /*)
- for as_base in sh bash ksh sh5; do
- as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
- done;;
- esac
-done
-IFS=$as_save_IFS
-
-
- for as_shell in $as_candidate_shells $SHELL; do
- # Try only shells that exist, to save several forks.
- if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { ("$as_shell") 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-_ASEOF
-}; then
- CONFIG_SHELL=$as_shell
- as_have_required=yes
- if { "$as_shell" 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-(as_func_return () {
- (exit $1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = "$1" ); then
- :
-else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test $exitcode = 0) || { (exit 1); exit 1; }
-
-(
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
-
-_ASEOF
-}; then
- break
-fi
-
-fi
-
- done
-
- if test "x$CONFIG_SHELL" != x; then
- for as_var in BASH_ENV ENV
- do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- done
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
-
- if test $as_have_required = no; then
- echo This script requires a shell more modern than all the
- echo shells that I found on your system. Please install a
- echo modern shell, or manually run the script under such a
- echo shell if you do have one.
- { (exit 1); exit 1; }
-fi
-
-
-fi
-
-fi
-
-
-
-(eval "as_func_return () {
- (exit \$1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
- :
-else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0") || {
- echo No shell found that supports shell functions.
- echo Please tell autoconf@gnu.org about your system,
- echo including any error possibly output before this
- echo message
-}
-
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line after each line using $LINENO; the second 'sed'
- # does the real work. The second script uses 'N' to pair each
- # line-number line with the line containing $LINENO, and appends
- # trailing '-' during substitution so that $LINENO is not a special
- # case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # scripts with optimization help from Paolo Bonzini. Blame Lee
- # E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
- case `echo 'x\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- *) ECHO_C='\c';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-exec 7<&0 </dev/null 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-
-ac_unique_file="init.cc"
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-# endif
-#endif
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-# include <memory.h>
-# endif
-# include <string.h>
-#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-
-ac_subst_vars='SHELL
-PATH_SEPARATOR
-PACKAGE_NAME
-PACKAGE_TARNAME
-PACKAGE_VERSION
-PACKAGE_STRING
-PACKAGE_BUGREPORT
-exec_prefix
-prefix
-program_transform_name
-bindir
-sbindir
-libexecdir
-datarootdir
-datadir
-sysconfdir
-sharedstatedir
-localstatedir
-includedir
-oldincludedir
-docdir
-infodir
-htmldir
-dvidir
-pdfdir
-psdir
-libdir
-localedir
-mandir
-DEFS
-ECHO_C
-ECHO_N
-ECHO_T
-LIBS
-build_alias
-host_alias
-target_alias
-INSTALL_PROGRAM
-INSTALL_SCRIPT
-INSTALL_DATA
-build
-build_cpu
-build_vendor
-build_os
-host
-host_cpu
-host_vendor
-host_os
-target
-target_cpu
-target_vendor
-target_os
-CC
-CFLAGS
-LDFLAGS
-CPPFLAGS
-ac_ct_CC
-EXEEXT
-OBJEXT
-CXX
-CXXFLAGS
-ac_ct_CXX
-all_host
-install_host
-AR
-AS
-DLLTOOL
-LD
-NM
-OBJCOPY
-OBJDUMP
-RANLIB
-STRIP
-WINDRES
-ALLOCA
-CPP
-GREP
-EGREP
-SET_MAKE
-MALLOC_OFILES
-LIBSERVER
-DLL_ENTRY
-DEF_DLL_ENTRY
-CONFIG_DIR
-LIBOBJS
-LTLIBOBJS'
-ac_subst_files=''
- ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-CXX
-CXXFLAGS
-CCC
-CPP'
-
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval $ac_prev=\$ac_option
- ac_prev=
- continue
- fi
-
- case $ac_option in
- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *) ac_optarg=yes ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_dashdash$ac_option in
- --)
- ac_dashdash=yes ;;
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=*)
- datadir=$ac_optarg ;;
-
- -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
- | --dataroo | --dataro | --datar)
- ac_prev=datarootdir ;;
- -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
- | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
- datarootdir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
- eval enable_$ac_feature=no ;;
-
- -docdir | --docdir | --docdi | --doc | --do)
- ac_prev=docdir ;;
- -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
- docdir=$ac_optarg ;;
-
- -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
- ac_prev=dvidir ;;
- -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
- dvidir=$ac_optarg ;;
-
- -enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
- eval enable_$ac_feature=\$ac_optarg ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
- ac_prev=htmldir ;;
- -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
- | --ht=*)
- htmldir=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir=$ac_optarg ;;
-
- -localedir | --localedir | --localedi | --localed | --locale)
- ac_prev=localedir ;;
- -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
- localedir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst | --locals)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
- localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name=$ac_optarg ;;
-
- -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
- ac_prev=pdfdir ;;
- -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
- pdfdir=$ac_optarg ;;
-
- -psdir | --psdir | --psdi | --psd | --ps)
- ac_prev=psdir ;;
- -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
- psdir=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
- eval with_$ac_package=\$ac_optarg ;;
-
- -without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
- eval with_$ac_package=no ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries=$ac_optarg ;;
-
- -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- eval $ac_envvar=\$ac_optarg
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-# Be sure to have absolute directory names.
-for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
- datadir sysconfdir sharedstatedir localstatedir includedir \
- oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
-do
- eval ac_val=\$$ac_var
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) continue;;
- NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
- esac
- { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; }
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- { echo "$as_me: error: Working directory cannot be determined" >&2
- { (exit 1); exit 1; }; }
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- { echo "$as_me: error: pwd does not report name of working directory" >&2
- { (exit 1); exit 1; }; }
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then the parent directory.
- ac_confdir=`$as_dirname -- "$0" ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$0" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r "$srcdir/$ac_unique_file"; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
- test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
- { (exit 1); exit 1; }; }
- pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
- srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
- eval ac_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_env_${ac_var}_value=\$${ac_var}
- eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
- --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- --infodir=DIR info documentation [DATAROOTDIR/info]
- --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
- --mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
- --htmldir=DIR html documentation [DOCDIR]
- --dvidir=DIR dvi documentation [DOCDIR]
- --pdfdir=DIR pdf documentation [DOCDIR]
- --psdir=DIR ps documentation [DOCDIR]
-_ACEOF
-
- cat <<\_ACEOF
-
-System types:
- --build=BUILD configure for building on BUILD [guessed]
- --host=HOST cross-compile to build programs to run on HOST [BUILD]
- --target=TARGET configure for building compilers for TARGET [HOST]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-
- cat <<\_ACEOF
-
-Optional Features:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-debugging Build a cygwin DLL which has more consistency checking for debugging
- --enable-server Build a cygwin DLL which can communicate with cygserver
-
-Some influential environment variables:
- CC C compiler command
- CFLAGS C compiler flags
- LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
- nonstandard directory <lib dir>
- LIBS libraries to pass to the linker, e.g. -l<library>
- CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
- you have headers in a nonstandard directory <include dir>
- CXX C++ compiler command
- CXXFLAGS C++ compiler flags
- CPP C preprocessor
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d "$ac_dir" || continue
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
- cd "$ac_dir" || { ac_status=$?; continue; }
- # Check for guested configure.
- if test -f "$ac_srcdir/configure.gnu"; then
- echo &&
- $SHELL "$ac_srcdir/configure.gnu" --help=recursive
- elif test -f "$ac_srcdir/configure"; then
- echo &&
- $SHELL "$ac_srcdir/configure" --help=recursive
- else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi || ac_status=$?
- cd "$ac_pwd" || { ac_status=$?; break; }
- done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
- cat <<\_ACEOF
-configure
-generated by GNU Autoconf 2.61
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit
-fi
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by $as_me, which was
-generated by GNU Autoconf 2.61. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- echo "PATH: $as_dir"
-done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *\'*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- ac_configure_args="$ac_configure_args '$ac_arg'"
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-(
- for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- *) $as_unset $ac_var ;;
- esac ;;
- esac
- done
- (set) 2>&1 |
- case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- sed -n \
- "s/'\''/'\''\\\\'\'''\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
- ;; #(
- *)
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-)
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------------- ##
-## File substitutions. ##
-## ------------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- cat confdefs.h
- echo
- fi
- test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core core.conftest.* &&
- rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -n "$CONFIG_SITE"; then
- set x "$CONFIG_SITE"
-elif test "x$prefix" != xNONE; then
- set x "$prefix/share/config.site" "$prefix/etc/config.site"
-else
- set x "$ac_default_prefix/share/config.site" \
- "$ac_default_prefix/etc/config.site"
-fi
-shift
-for ac_site_file
-do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . "$cache_file";;
- *) . "./$cache_file";;
- esac
- fi
-else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val=\$ac_cv_env_${ac_var}_value
- eval ac_new_val=\$ac_env_${ac_var}_value
- case $ac_old_set,$ac_new_set in
- set,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-ac_config_headers="$ac_config_headers config.h"
-
-ac_aux_dir=
-for ac_dir in ../.. "$srcdir"/../..; do
- if test -f "$ac_dir/install-sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f "$ac_dir/install.sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f "$ac_dir/shtool"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ../.. \"$srcdir\"/../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in ../.. \"$srcdir\"/../.." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- done
- done
- ;;
-esac
-done
-IFS=$as_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. Don't cache a
- # value for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the value is a relative name.
- INSTALL=$ac_install_sh
- fi
-fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
- { (exit 1); exit 1; }; }
-
-{ echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
-if test "${ac_cv_build+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-echo "$as_me: error: invalid value of canonical build" >&2;}
- { (exit 1); exit 1; }; };;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
-if test "${ac_cv_host+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "x$host_alias" = x; then
- ac_cv_host=$ac_cv_build
-else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-echo "$as_me: error: invalid value of canonical host" >&2;}
- { (exit 1); exit 1; }; };;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-{ echo "$as_me:$LINENO: checking target system type" >&5
-echo $ECHO_N "checking target system type... $ECHO_C" >&6; }
-if test "${ac_cv_target+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "x$target_alias" = x; then
- ac_cv_target=$ac_cv_host
-else
- ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
- { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-echo "${ECHO_T}$ac_cv_target" >&6; }
-case $ac_cv_target in
-*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
-echo "$as_me: error: invalid value of canonical target" >&2;}
- { (exit 1); exit 1; }; };;
-esac
-target=$ac_cv_target
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_target
-shift
-target_cpu=$1
-target_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-target_os=$*
-IFS=$ac_save_IFS
-case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
- if test "x$ac_ct_CC" = x; then
- CC="gcc"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-else
- CC="$ac_cv_prog_CC"
-fi
-
-: ${CC:=gcc}
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-else
- CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
- 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 "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
- fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl.exe
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl.exe
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
- test -n "$ac_ct_CC" && break
-done
-
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-fi
-
-fi
-
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO: checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compiler --version >&5") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compiler -v >&5") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compiler -V >&5") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-#
-# List of possible output files, starting from the most likely.
-# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
-# only as a last resort. b.out is created by i960 compilers.
-ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
-#
-# The IRIX 6 linker writes into existing files which may not be
-# executable, retaining their permissions. Remove them first so a
-# subsequent execution test works.
-ac_rmfiles=
-for ac_file in $ac_files
-do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
- * ) ac_rmfiles="$ac_rmfiles $ac_file";;
- esac
-done
-rm -f $ac_rmfiles
-
-if { (ac_try="$ac_link_default"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link_default") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile. We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
- then :; else
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- fi
- # We set ac_cv_exeext here because the later test for it is not
- # safe: cross compilers may not add the suffix if given an `-o'
- # argument, so we may need to know it at that point already.
- # Even if this section looks crufty: it has the advantage of
- # actually working.
- break;;
- * )
- break;;
- esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-else
- ac_file=''
-fi
-
-{ echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6; }
-if test -z "$ac_file"; then
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
-fi
-{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
-{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6; }
-
-{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- break;;
- * ) break;;
- esac
-done
-else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
-if test "${ac_cv_objext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- for ac_file in conftest.o conftest.obj conftest.*; do
- test -f "$ac_file" || continue;
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_compiler_gnu=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_save_c_werror_flag=$ac_c_werror_flag
- ac_c_werror_flag=yes
- ac_cv_prog_cc_g=no
- CFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_cc_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- CFLAGS=""
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_c_werror_flag=$ac_save_c_werror_flag
- CFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_cc_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_cc_c89=$ac_arg
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6; } ;;
- xno)
- { echo "$as_me:$LINENO: result: unsupported" >&5
-echo "${ECHO_T}unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5
-echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
- { (exit 1); exit 1; }; }
-
-if test -n "$ac_tool_prefix"; then
- # 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 "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CXX="${ac_tool_prefix}g++"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
- { echo "$as_me:$LINENO: result: $CXX" >&5
-echo "${ECHO_T}$CXX" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CXX"; then
- ac_ct_CXX=$CXX
- # Extract the first word of "g++", so it can be a program name with args.
-set dummy g++; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CXX"; then
- ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CXX="g++"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
- { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-echo "${ECHO_T}$ac_ct_CXX" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
- if test "x$ac_ct_CXX" = x; then
- CXX="g++"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- CXX=$ac_ct_CXX
- fi
-else
- CXX="$ac_cv_prog_CXX"
-fi
-
-if test -z "$CXX"; then
- if test -n "$ac_tool_prefix"; then
- # 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 "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CXX="${ac_tool_prefix}g++"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
- { echo "$as_me:$LINENO: result: $CXX" >&5
-echo "${ECHO_T}$CXX" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CXX"; then
- ac_ct_CXX=$CXX
- # Extract the first word of "g++", so it can be a program name with args.
-set dummy g++; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CXX"; then
- ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CXX="g++"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
- { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-echo "${ECHO_T}$ac_ct_CXX" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
- if test "x$ac_ct_CXX" = x; then
- CXX="c++"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- CXX=$ac_ct_CXX
- fi
-else
- CXX="$ac_cv_prog_CXX"
-fi
-
- : ${CXX:=g++}
- ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -z "$CXX"; then
- if test -n "$CCC"; then
- CXX=$CCC
- else
- if test -n "$ac_tool_prefix"; then
- for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
- { echo "$as_me:$LINENO: result: $CXX" >&5
-echo "${ECHO_T}$CXX" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
- test -n "$CXX" && break
- done
-fi
-if test -z "$CXX"; then
- ac_ct_CXX=$CXX
- for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CXX"; then
- ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CXX="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
- { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-echo "${ECHO_T}$ac_ct_CXX" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
- test -n "$ac_ct_CXX" && break
-done
-
- if test "x$ac_ct_CXX" = x; then
- CXX="g++"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- CXX=$ac_ct_CXX
- fi
-fi
-
- fi
-fi
-# Provide some information about the compiler.
-echo "$as_me:$LINENO: checking for C++ compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compiler --version >&5") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compiler -v >&5") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compiler -V >&5") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_compiler_gnu=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; }
-GXX=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
-echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_save_cxx_werror_flag=$ac_cxx_werror_flag
- ac_cxx_werror_flag=yes
- ac_cv_prog_cxx_g=no
- CXXFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_cxx_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- CXXFLAGS=""
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
- CXXFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_cxx_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; }
-if test "$ac_test_CXXFLAGS" = set; then
- CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
- if test "$GXX" = yes; then
- CXXFLAGS="-g -O2"
- else
- CXXFLAGS="-g"
- fi
-else
- if test "$GXX" = yes; then
- CXXFLAGS="-O2"
- else
- CXXFLAGS=
- fi
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
- test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5
-echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-CXXFLAGS='$(CFLAGS)'
-
-
-case "$with_cross_host" in
- ""|*cygwin*)
- all_host="all_host"
- install_host="install_host"
- LIBSERVER='$(bupdir)/cygserver/libcygserver.a'
- ;;
- *)
- all_host=
- install_host=
- LIBSERVER=
- ;;
-esac
-
-test -n "$LIBSERVER" && cat >>confdefs.h <<\_ACEOF
-#define USE_SERVER 1
-_ACEOF
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
- { echo "$as_me:$LINENO: result: $AR" >&5
-echo "${ECHO_T}$AR" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_AR"; then
- ac_ct_AR=$AR
- # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_AR"; then
- ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_AR="ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
- { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-echo "${ECHO_T}$ac_ct_AR" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
- if test "x$ac_ct_AR" = x; then
- AR="ar"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- AR=$ac_ct_AR
- fi
-else
- AR="$ac_cv_prog_AR"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_AS+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-AS=$ac_cv_prog_AS
-if test -n "$AS"; then
- { echo "$as_me:$LINENO: result: $AS" >&5
-echo "${ECHO_T}$AS" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_AS"; then
- ac_ct_AS=$AS
- # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_AS"; then
- ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_AS="as"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_AS=$ac_cv_prog_ac_ct_AS
-if test -n "$ac_ct_AS"; then
- { echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
-echo "${ECHO_T}$ac_ct_AS" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
- if test "x$ac_ct_AS" = x; then
- AS="as"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- AS=$ac_ct_AS
- fi
-else
- AS="$ac_cv_prog_AS"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_DLLTOOL+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-DLLTOOL=$ac_cv_prog_DLLTOOL
-if test -n "$DLLTOOL"; then
- { echo "$as_me:$LINENO: result: $DLLTOOL" >&5
-echo "${ECHO_T}$DLLTOOL" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_DLLTOOL"; then
- ac_ct_DLLTOOL=$DLLTOOL
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_DLLTOOL"; then
- ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_DLLTOOL="dlltool"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
-if test -n "$ac_ct_DLLTOOL"; then
- { echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
-echo "${ECHO_T}$ac_ct_DLLTOOL" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
- if test "x$ac_ct_DLLTOOL" = x; then
- DLLTOOL="dlltool"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- DLLTOOL=$ac_ct_DLLTOOL
- fi
-else
- DLLTOOL="$ac_cv_prog_DLLTOOL"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # 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 "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_LD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$LD"; then
- ac_cv_prog_LD="$LD" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_LD="${ac_tool_prefix}ld"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-LD=$ac_cv_prog_LD
-if test -n "$LD"; then
- { echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_LD"; then
- ac_ct_LD=$LD
- # Extract the first word of "ld", so it can be a program name with args.
-set dummy ld; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_LD"; then
- ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_LD="ld"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_LD=$ac_cv_prog_ac_ct_LD
-if test -n "$ac_ct_LD"; then
- { echo "$as_me:$LINENO: result: $ac_ct_LD" >&5
-echo "${ECHO_T}$ac_ct_LD" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
- if test "x$ac_ct_LD" = x; then
- LD="ld"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- LD=$ac_ct_LD
- fi
-else
- LD="$ac_cv_prog_LD"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # 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 "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_NM+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$NM"; then
- ac_cv_prog_NM="$NM" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_NM="${ac_tool_prefix}nm"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-NM=$ac_cv_prog_NM
-if test -n "$NM"; then
- { echo "$as_me:$LINENO: result: $NM" >&5
-echo "${ECHO_T}$NM" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_NM"; then
- ac_ct_NM=$NM
- # Extract the first word of "nm", so it can be a program name with args.
-set dummy nm; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_NM"; then
- ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_NM="nm"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_NM=$ac_cv_prog_ac_ct_NM
-if test -n "$ac_ct_NM"; then
- { echo "$as_me:$LINENO: result: $ac_ct_NM" >&5
-echo "${ECHO_T}$ac_ct_NM" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
- if test "x$ac_ct_NM" = x; then
- NM="nm"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- NM=$ac_ct_NM
- fi
-else
- NM="$ac_cv_prog_NM"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}objcopy", so it can be a program name with args.
-set dummy ${ac_tool_prefix}objcopy; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_OBJCOPY+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$OBJCOPY"; then
- ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OBJCOPY="${ac_tool_prefix}objcopy"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-OBJCOPY=$ac_cv_prog_OBJCOPY
-if test -n "$OBJCOPY"; then
- { echo "$as_me:$LINENO: result: $OBJCOPY" >&5
-echo "${ECHO_T}$OBJCOPY" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OBJCOPY"; then
- ac_ct_OBJCOPY=$OBJCOPY
- # Extract the first word of "objcopy", so it can be a program name with args.
-set dummy objcopy; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_OBJCOPY"; then
- ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_OBJCOPY="objcopy"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
-if test -n "$ac_ct_OBJCOPY"; then
- { echo "$as_me:$LINENO: result: $ac_ct_OBJCOPY" >&5
-echo "${ECHO_T}$ac_ct_OBJCOPY" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
- if test "x$ac_ct_OBJCOPY" = x; then
- OBJCOPY="objcopy"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- OBJCOPY=$ac_ct_OBJCOPY
- fi
-else
- OBJCOPY="$ac_cv_prog_OBJCOPY"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
-set dummy ${ac_tool_prefix}objdump; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_OBJDUMP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-OBJDUMP=$ac_cv_prog_OBJDUMP
-if test -n "$OBJDUMP"; then
- { echo "$as_me:$LINENO: result: $OBJDUMP" >&5
-echo "${ECHO_T}$OBJDUMP" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OBJDUMP"; then
- ac_ct_OBJDUMP=$OBJDUMP
- # Extract the first word of "objdump", so it can be a program name with args.
-set dummy objdump; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_OBJDUMP"; then
- ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_OBJDUMP="objdump"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
-if test -n "$ac_ct_OBJDUMP"; then
- { echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
-echo "${ECHO_T}$ac_ct_OBJDUMP" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
- if test "x$ac_ct_OBJDUMP" = x; then
- OBJDUMP="objdump"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- OBJDUMP=$ac_ct_OBJDUMP
- fi
-else
- OBJDUMP="$ac_cv_prog_OBJDUMP"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- { echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
- if test "x$ac_ct_RANLIB" = x; then
- RANLIB="ranlib"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- RANLIB=$ac_ct_RANLIB
- fi
-else
- RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
- { echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
- ac_ct_STRIP=$STRIP
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_STRIP"; then
- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_STRIP="strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
- { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
- if test "x$ac_ct_STRIP" = x; then
- STRIP="strip"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- STRIP=$ac_ct_STRIP
- fi
-else
- STRIP="$ac_cv_prog_STRIP"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # 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 "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_WINDRES+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$WINDRES"; then
- ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-WINDRES=$ac_cv_prog_WINDRES
-if test -n "$WINDRES"; then
- { echo "$as_me:$LINENO: result: $WINDRES" >&5
-echo "${ECHO_T}$WINDRES" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_WINDRES"; then
- ac_ct_WINDRES=$WINDRES
- # Extract the first word of "windres", so it can be a program name with args.
-set dummy windres; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_WINDRES"; then
- ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_WINDRES="windres"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
-if test -n "$ac_ct_WINDRES"; then
- { echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5
-echo "${ECHO_T}$ac_ct_WINDRES" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
- if test "x$ac_ct_WINDRES" = x; then
- WINDRES="windres"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- WINDRES=$ac_ct_WINDRES
- fi
-else
- WINDRES="$ac_cv_prog_WINDRES"
-fi
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- break
-fi
-
- done
- ac_cv_prog_CPP=$CPP
-
-fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
-fi
-{ echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- :
-else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
-echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Extract the first word of "grep ggrep" to use in msg output
-if test -z "$GREP"; then
-set dummy grep ggrep; ac_prog_name=$2
-if test "${ac_cv_path_GREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_path_GREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
- # Check for GNU ac_path_GREP and select it if it is found.
- # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
- ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- echo 'GREP' >> "conftest.nl"
- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- ac_count=`expr $ac_count + 1`
- if test $ac_count -gt ${ac_path_GREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_GREP="$ac_path_GREP"
- ac_path_GREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-
- $ac_path_GREP_found && break 3
- done
-done
-
-done
-IFS=$as_save_IFS
-
-
-fi
-
-GREP="$ac_cv_path_GREP"
-if test -z "$GREP"; then
- { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-else
- ac_cv_path_GREP=$GREP
-fi
-
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
-echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
- then ac_cv_path_EGREP="$GREP -E"
- else
- # Extract the first word of "egrep" to use in msg output
-if test -z "$EGREP"; then
-set dummy egrep; ac_prog_name=$2
-if test "${ac_cv_path_EGREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_path_EGREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
- # Check for GNU ac_path_EGREP and select it if it is found.
- # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
- ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- echo 'EGREP' >> "conftest.nl"
- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- ac_count=`expr $ac_count + 1`
- if test $ac_count -gt ${ac_path_EGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_EGREP="$ac_path_EGREP"
- ac_path_EGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-
- $ac_path_EGREP_found && break 3
- done
-done
-
-done
-IFS=$as_save_IFS
-
-
-fi
-
-EGREP="$ac_cv_path_EGREP"
-if test -z "$EGREP"; then
- { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-else
- ac_cv_path_EGREP=$EGREP
-fi
-
-
- fi
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
-echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_header_stdc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_header_stdc=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then
- :
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then
- :
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then
- :
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-fi
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
-
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- eval "$as_ac_Header=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
-# for constant arguments. Useless!
-{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
-echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
-if test "${ac_cv_working_alloca_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <alloca.h>
-int
-main ()
-{
-char *p = (char *) alloca (2 * sizeof (int));
- if (p) return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- ac_cv_working_alloca_h=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_working_alloca_h=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
-echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
-if test $ac_cv_working_alloca_h = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ALLOCA_H 1
-_ACEOF
-
-fi
-
-{ echo "$as_me:$LINENO: checking for alloca" >&5
-echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
-if test "${ac_cv_func_alloca_works+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#else
-# ifdef _MSC_VER
-# include <malloc.h>
-# define alloca _alloca
-# else
-# ifdef 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);
- if (p) return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- ac_cv_func_alloca_works=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_func_alloca_works=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
-echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
-
-if test $ac_cv_func_alloca_works = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ALLOCA 1
-_ACEOF
-
-else
- # 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=\${LIBOBJDIR}alloca.$ac_objext
-
-cat >>confdefs.h <<\_ACEOF
-#define C_ALLOCA 1
-_ACEOF
-
-
-{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
-echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
-if test "${ac_cv_os_cray+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if defined CRAY && ! defined CRAY2
-webecray
-#else
-wenotbecray
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "webecray" >/dev/null 2>&1; then
- ac_cv_os_cray=yes
-else
- ac_cv_os_cray=no
-fi
-rm -f conftest*
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
-echo "${ECHO_T}$ac_cv_os_cray" >&6; }
-if test $ac_cv_os_cray = yes; then
- for ac_func in _getb67 GETB67 getb67; do
- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* 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
-#endif
-
-int
-main ()
-{
-return $ac_func ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- eval "$as_ac_var=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define CRAY_STACKSEG_END $ac_func
-_ACEOF
-
- break
-fi
-
- done
-fi
-
-{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
-echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
-if test "${ac_cv_c_stack_direction+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_c_stack_direction=0
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-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;
-}
-
-int
-main ()
-{
- return find_stack_direction () < 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_stack_direction=1
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_c_stack_direction=-1
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
-echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-_ACEOF
-
-
-fi
-
-{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
-set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
- @echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
- *@@@%%%=?*=@@@%%%*)
- eval ac_cv_prog_make_${ac_make}_set=yes;;
- *)
- eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
- SET_MAKE=
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-# Test for builtin mem* functions.
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-#include <string.h>
-void foo(char *s, int c, size_t n)
-{
- __builtin_memset(s, c, n);
-}
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- use_builtin_memset=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- use_builtin_memset=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-if test $use_builtin_memset = "yes"; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_BUILTIN_MEMSET 1
-_ACEOF
-
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-# Check whether --enable-debugging was given.
-if test "${enable_debugging+set}" = set; then
- enableval=$enable_debugging; case "${enableval}" in
-yes) cat >>confdefs.h <<\_ACEOF
-#define DEBUGGING 1
-_ACEOF
- ;;
-no) ;;
-esac
-
-fi
-
-
-# Check whether --enable-server was given.
-if test "${enable_server+set}" = set; then
- enableval=$enable_server; case "${enableval}" in
-yes) ;;
-no) LIBSERVER=;;
-esac
-
-fi
-
-
-MALLOC_OFILES=malloc.o
-
-
-
-case "$target_cpu" in
- i?86) DLL_ENTRY="_dll_entry@12"
- DEF_DLL_ENTRY="dll_entry@12"
- ALLOCA="_alloca"
- CONFIG_DIR="i386" ;;
- *) { { echo "$as_me:$LINENO: error: Invalid target processor \"$target_cpu\"" >&5
-echo "$as_me: error: Invalid target processor \"$target_cpu\"" >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-
-
-
-
-
-
-
-ac_config_files="$ac_config_files Makefile"
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
- for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- *) $as_unset $ac_var ;;
- esac ;;
- esac
- done
-
- (set) 2>&1 |
- case $as_nl`(ac_space=' '; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;; #(
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-) |
- sed '
- /^ac_cv_env_/b end
- t clear
- :clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
- if test -w "$cache_file"; then
- test "x$cache_file" != "x/dev/null" &&
- { echo "$as_me:$LINENO: updating cache $cache_file" >&5
-echo "$as_me: updating cache $cache_file" >&6;}
- cat confcache >$cache_file
- else
- { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-echo "$as_me: not updating unwritable cache $cache_file" >&6;}
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`echo "$ac_i" | sed "$ac_script"`
- # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
- # will be set to the directory where LIBOBJS objects are built.
- ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-as_nl='
-'
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line after each line using $LINENO; the second 'sed'
- # does the real work. The second script uses 'N' to pair each
- # line-number line with the line containing $LINENO, and appends
- # trailing '-' during substitution so that $LINENO is not a special
- # case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # scripts with optimization help from Paolo Bonzini. Blame Lee
- # E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
- case `echo 'x\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- *) ECHO_C='\c';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-
-# Save the log message, to keep $[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.61. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number and configuration settings, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
- --header=FILE[:TEMPLATE]
- instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Report bugs to <bug-autoconf@gnu.org>."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.61,
- with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2006 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=*)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- *)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- esac
-
- case $ac_option in
- # Handling of the options.
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- echo "$ac_cs_version"; exit ;;
- --debug | --debu | --deb | --de | --d | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
- ac_need_defaults=false;;
- --he | --h)
- # Conflict between --help and --header
- { echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1"
- ac_need_defaults=false ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-if \$ac_cs_recheck; then
- echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- CONFIG_SHELL=$SHELL
- export CONFIG_SHELL
- exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
- echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
- case $ac_config_target in
- "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
- "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
- test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
- tmp=
- trap 'exit_status=$?
- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./conf$$-$RANDOM
- (umask 077 && mkdir "$tmp")
-} ||
-{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-#
-# Set up the sed scripts for CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "$CONFIG_FILES"; then
-
-_ACEOF
-
-
-
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
- cat >conf$$subs.sed <<_ACEOF
-SHELL!$SHELL$ac_delim
-PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
-PACKAGE_NAME!$PACKAGE_NAME$ac_delim
-PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
-PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
-PACKAGE_STRING!$PACKAGE_STRING$ac_delim
-PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
-exec_prefix!$exec_prefix$ac_delim
-prefix!$prefix$ac_delim
-program_transform_name!$program_transform_name$ac_delim
-bindir!$bindir$ac_delim
-sbindir!$sbindir$ac_delim
-libexecdir!$libexecdir$ac_delim
-datarootdir!$datarootdir$ac_delim
-datadir!$datadir$ac_delim
-sysconfdir!$sysconfdir$ac_delim
-sharedstatedir!$sharedstatedir$ac_delim
-localstatedir!$localstatedir$ac_delim
-includedir!$includedir$ac_delim
-oldincludedir!$oldincludedir$ac_delim
-docdir!$docdir$ac_delim
-infodir!$infodir$ac_delim
-htmldir!$htmldir$ac_delim
-dvidir!$dvidir$ac_delim
-pdfdir!$pdfdir$ac_delim
-psdir!$psdir$ac_delim
-libdir!$libdir$ac_delim
-localedir!$localedir$ac_delim
-mandir!$mandir$ac_delim
-DEFS!$DEFS$ac_delim
-ECHO_C!$ECHO_C$ac_delim
-ECHO_N!$ECHO_N$ac_delim
-ECHO_T!$ECHO_T$ac_delim
-LIBS!$LIBS$ac_delim
-build_alias!$build_alias$ac_delim
-host_alias!$host_alias$ac_delim
-target_alias!$target_alias$ac_delim
-INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
-INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
-INSTALL_DATA!$INSTALL_DATA$ac_delim
-build!$build$ac_delim
-build_cpu!$build_cpu$ac_delim
-build_vendor!$build_vendor$ac_delim
-build_os!$build_os$ac_delim
-host!$host$ac_delim
-host_cpu!$host_cpu$ac_delim
-host_vendor!$host_vendor$ac_delim
-host_os!$host_os$ac_delim
-target!$target$ac_delim
-target_cpu!$target_cpu$ac_delim
-target_vendor!$target_vendor$ac_delim
-target_os!$target_os$ac_delim
-CC!$CC$ac_delim
-CFLAGS!$CFLAGS$ac_delim
-LDFLAGS!$LDFLAGS$ac_delim
-CPPFLAGS!$CPPFLAGS$ac_delim
-ac_ct_CC!$ac_ct_CC$ac_delim
-EXEEXT!$EXEEXT$ac_delim
-OBJEXT!$OBJEXT$ac_delim
-CXX!$CXX$ac_delim
-CXXFLAGS!$CXXFLAGS$ac_delim
-ac_ct_CXX!$ac_ct_CXX$ac_delim
-all_host!$all_host$ac_delim
-install_host!$install_host$ac_delim
-AR!$AR$ac_delim
-AS!$AS$ac_delim
-DLLTOOL!$DLLTOOL$ac_delim
-LD!$LD$ac_delim
-NM!$NM$ac_delim
-OBJCOPY!$OBJCOPY$ac_delim
-OBJDUMP!$OBJDUMP$ac_delim
-RANLIB!$RANLIB$ac_delim
-STRIP!$STRIP$ac_delim
-WINDRES!$WINDRES$ac_delim
-ALLOCA!$ALLOCA$ac_delim
-CPP!$CPP$ac_delim
-GREP!$GREP$ac_delim
-EGREP!$EGREP$ac_delim
-SET_MAKE!$SET_MAKE$ac_delim
-MALLOC_OFILES!$MALLOC_OFILES$ac_delim
-LIBSERVER!$LIBSERVER$ac_delim
-DLL_ENTRY!$DLL_ENTRY$ac_delim
-DEF_DLL_ENTRY!$DEF_DLL_ENTRY$ac_delim
-CONFIG_DIR!$CONFIG_DIR$ac_delim
-LIBOBJS!$LIBOBJS$ac_delim
-LTLIBOBJS!$LTLIBOBJS$ac_delim
-_ACEOF
-
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 86; then
- break
- elif $ac_last_try; then
- { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-
-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
-if test -n "$ac_eof"; then
- ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
- ac_eof=`expr $ac_eof + 1`
-fi
-
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
-_ACEOF
-sed '
-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
-s/^/s,@/; s/!/@,|#_!!_#|/
-:n
-t n
-s/'"$ac_delim"'$/,g/; t
-s/$/\\/; p
-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
-' >>$CONFIG_STATUS <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-:end
-s/|#_!!_#|//g
-CEOF$ac_eof
-_ACEOF
-
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[ ]*\):*/\1/
-s/:*$//
-s/^[^=]*=[ ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-fi # test -n "$CONFIG_FILES"
-
-
-for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
-do
- case $ac_tag in
- :[FHLC]) ac_mode=$ac_tag; continue;;
- esac
- case $ac_mode$ac_tag in
- :[FHL]*:*);;
- :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
-echo "$as_me: error: Invalid tag $ac_tag." >&2;}
- { (exit 1); exit 1; }; };;
- :[FH]-) ac_tag=-:-;;
- :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
- esac
- ac_save_IFS=$IFS
- IFS=:
- set x $ac_tag
- IFS=$ac_save_IFS
- shift
- ac_file=$1
- shift
-
- case $ac_mode in
- :L) ac_source=$1;;
- :[FH])
- ac_file_inputs=
- for ac_f
- do
- case $ac_f in
- -) ac_f="$tmp/stdin";;
- *) # Look for the file first in the build tree, then in the source tree
- # (if the path is not absolute). The absolute path cannot be DOS-style,
- # because $ac_f cannot contain `:'.
- test -f "$ac_f" ||
- case $ac_f in
- [\\/$]*) false;;
- *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
- esac ||
- { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-echo "$as_me: error: cannot find input file: $ac_f" >&2;}
- { (exit 1); exit 1; }; };;
- esac
- ac_file_inputs="$ac_file_inputs $ac_f"
- done
-
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- configure_input="Generated from "`IFS=:
- echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
- if test x"$ac_file" != x-; then
- configure_input="$ac_file. $configure_input"
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- fi
-
- case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin";;
- esac
- ;;
- esac
-
- ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- { as_dir="$ac_dir"
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
- { (exit 1); exit 1; }; }; }
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
- case $ac_mode in
- :F)
- #
- # CONFIG_FILE
- #
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
- esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-
-case `sed -n '/datarootdir/ {
- p
- q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p
-' $ac_file_inputs` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- ac_datarootdir_hack='
- s&@datadir@&$datadir&g
- s&@docdir@&$docdir&g
- s&@infodir@&$infodir&g
- s&@localedir@&$localedir&g
- s&@mandir@&$mandir&g
- s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s&@configure_input@&$configure_input&;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-$ac_datarootdir_hack
-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
- { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&5
-echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&2;}
-
- rm -f "$tmp/stdin"
- case $ac_file in
- -) cat "$tmp/out"; rm -f "$tmp/out";;
- *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
- esac
- ;;
- :H)
- #
- # CONFIG_HEADER
- #
-_ACEOF
-
-# Transform confdefs.h into a sed script `conftest.defines', that
-# substitutes the proper values into config.h.in to produce config.h.
-rm -f conftest.defines conftest.tail
-# First, append a space to every undef/define line, to ease matching.
-echo 's/$/ /' >conftest.defines
-# Then, protect against being on the right side of a sed subst, or in
-# an unquoted here document, in config.status. If some macros were
-# called several times there might be several #defines for the same
-# symbol, which is useless. But do not sort them, since the last
-# AC_DEFINE must be honored.
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
-# NAME is the cpp macro being defined, VALUE is the value it is being given.
-# PARAMS is the parameter list in the macro definition--in most cases, it's
-# just an empty string.
-ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
-ac_dB='\\)[ (].*,\\1define\\2'
-ac_dC=' '
-ac_dD=' ,'
-
-uniq confdefs.h |
- sed -n '
- t rset
- :rset
- s/^[ ]*#[ ]*define[ ][ ]*//
- t ok
- d
- :ok
- s/[\\&,]/\\&/g
- s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
- s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
- ' >>conftest.defines
-
-# Remove the space that was appended to ease matching.
-# Then replace #undef with comments. This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-# (The regexp can be short, since the line contains either #define or #undef.)
-echo 's/ $//
-s,^[ #]*u.*,/* & */,' >>conftest.defines
-
-# Break up conftest.defines:
-ac_max_sed_lines=50
-
-# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
-# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
-# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
-# et cetera.
-ac_in='$ac_file_inputs'
-ac_out='"$tmp/out1"'
-ac_nxt='"$tmp/out2"'
-
-while :
-do
- # Write a here document:
- cat >>$CONFIG_STATUS <<_ACEOF
- # First, check the format of the line:
- cat >"\$tmp/defines.sed" <<\\CEOF
-/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
-/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
-b
-:def
-_ACEOF
- sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
- echo 'CEOF
- sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
- ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
- sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
- grep . conftest.tail >/dev/null || break
- rm -f conftest.defines
- mv conftest.tail conftest.defines
-done
-rm -f conftest.defines conftest.tail
-
-echo "ac_result=$ac_in" >>$CONFIG_STATUS
-cat >>$CONFIG_STATUS <<\_ACEOF
- if test x"$ac_file" != x-; then
- echo "/* $configure_input */" >"$tmp/config.h"
- cat "$ac_result" >>"$tmp/config.h"
- if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
- { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
- else
- rm -f $ac_file
- mv "$tmp/config.h" $ac_file
- fi
- else
- echo "/* $configure_input */"
- cat "$ac_result"
- fi
- rm -f "$tmp/out12"
- ;;
-
-
- esac
-
-done # for ac_tag
-
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || { (exit 1); exit 1; }
-fi
-
diff --git a/winsup/cygwin/configure.in b/winsup/cygwin/configure.in
deleted file mode 100644
index 06124e9..0000000
--- a/winsup/cygwin/configure.in
+++ /dev/null
@@ -1,119 +0,0 @@
-dnl Autoconf configure script for Cygwin.
-dnl Copyright 1996, 1997, 1998, 2000, 2001, 2002, 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.59)dnl
-AC_INIT(init.cc)
-AC_CONFIG_HEADER(config.h)
-AC_CONFIG_AUX_DIR(../..)
-
-AC_PROG_INSTALL
-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"
- LIBSERVER='$(bupdir)/cygserver/libcygserver.a'
- ;;
- *)
- all_host=
- install_host=
- LIBSERVER=
- ;;
-esac
-
-test -n "$LIBSERVER" && AC_DEFINE(USE_SERVER)
-
-AC_SUBST(all_host)
-AC_SUBST(install_host)
-
-AC_CHECK_TOOL(AR, ar, ar)
-AC_CHECK_TOOL(AS, as, as)
-AC_CHECK_TOOL(DLLTOOL, dlltool, dlltool)
-AC_CHECK_TOOL(LD, ld, ld)
-AC_CHECK_TOOL(NM, nm, nm)
-AC_CHECK_TOOL(OBJCOPY, objcopy, objcopy)
-AC_CHECK_TOOL(OBJDUMP, objdump, objdump)
-AC_CHECK_TOOL(RANLIB, ranlib, ranlib)
-AC_CHECK_TOOL(STRIP, strip, strip)
-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_ARG_ENABLE(server,
-[ --enable-server Build a cygwin DLL which can communicate with cygserver],
-[case "${enableval}" in
-yes) ;;
-no) LIBSERVER=;;
-esac
-])
-
-MALLOC_OFILES=malloc.o
-
-dnl The only time we might want to transform the install names
-dnl is for unix x cygwin. Otherwise we don't. For now we don't
-dnl transform names.
-
-dnl if test "x$cross_compiling" = "xno" -a ; then
-dnl if test "x$program_transform_name" = "xs,x,x,"; then
-dnl program_transform_name=""
-dnl fi
-dnl if test "x$program_transform_name" = "x"; then
-dnl program_transform_name="s,^,$target_alias-,"
-dnl else
-dnl program_transform_name="$program_transform_name -e s,^,$target_alias-,"
-dnl fi
-dnl fi
-
-case "$target_cpu" in
- i?86) DLL_ENTRY="_dll_entry@12"
- DEF_DLL_ENTRY="dll_entry@12"
- ALLOCA="_alloca"
- CONFIG_DIR="i386" ;;
- *) AC_MSG_ERROR(Invalid target processor \"$target_cpu\") ;;
-esac
-
-AC_SUBST(MALLOC_OFILES)
-AC_SUBST(LIBSERVER)
-AC_SUBST(DLL_ENTRY)
-AC_SUBST(DEF_DLL_ENTRY)
-AC_SUBST(ALLOCA)
-AC_SUBST(CONFIG_DIR)
-AC_OUTPUT(Makefile)
diff --git a/winsup/cygwin/cpuid.h b/winsup/cygwin/cpuid.h
deleted file mode 100644
index 998bbbf..0000000
--- a/winsup/cygwin/cpuid.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#ifndef CPUID_H
-#define CPUID_H
-
-extern inline void
-cpuid (unsigned *a, unsigned *b, unsigned *c, unsigned *d, unsigned in)
-{
- asm ("cpuid"
- : "=a" (*a),
- "=b" (*b),
- "=c" (*c),
- "=d" (*d)
- : "a" (in));
-}
-
-extern inline bool
-can_set_flag (unsigned flag)
-{
- unsigned r1, r2;
- asm("pushfl\n"
- "popl %0\n"
- "movl %0, %1\n"
- "xorl %2, %0\n"
- "pushl %0\n"
- "popfl\n"
- "pushfl\n"
- "popl %0\n"
- "pushl %1\n"
- "popfl\n"
- : "=&r" (r1), "=&r" (r2)
- : "ir" (flag)
- );
- return ((r1 ^ r2) & flag) != 0;
-}
-
-#endif // !CPUID_H
diff --git a/winsup/cygwin/crt0.c b/winsup/cygwin/crt0.c
deleted file mode 100644
index 1421f65..0000000
--- a/winsup/cygwin/crt0.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* crt0.c.
-
- Copyright 2001, 2005 Red Hat, Inc.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* In the following ifdef'd i386 code, the FPU precision is set to 80 bits
- and all FPU exceptions are masked. The former is needed to make long
- doubles work correctly. The latter causes the FPU to generate NaNs and
- Infinities instead of signals for certain operations.
-*/
-
-#ifdef __i386__
-#define FPU_RESERVED 0xF0C0
-#define FPU_DEFAULT 0x033f
-
-/* For debugging on *#!$@ windbg. bp for breakpoint. */
-int __cygwin_crt0_bp = 0;
-#endif
-
-extern int main (int argc, char **argv);
-
-void cygwin_crt0 (int (*main) (int, char **));
-
-void
-mainCRTStartup ()
-{
-#ifdef __i386__
- (void)__builtin_return_address(1);
- asm volatile ("andl $-16,%%esp" ::: "%esp");
- if (__cygwin_crt0_bp)
- asm volatile ("int3");
-
- {
- volatile unsigned short cw;
-
- /* Get Control Word */
- __asm__ volatile ("fnstcw %0" : "=m" (cw) : );
-
- /* mask in */
- cw &= FPU_RESERVED;
- cw |= FPU_DEFAULT;
-
- /* set cw */
- __asm__ volatile ("fldcw %0" :: "m" (cw));
- }
-#endif
-
- cygwin_crt0 (main);
-}
-
-void WinMainCRTStartup(void) __attribute__ ((alias("mainCRTStartup")));
-
diff --git a/winsup/cygwin/ctype.cc b/winsup/cygwin/ctype.cc
deleted file mode 100644
index b656d3e..0000000
--- a/winsup/cygwin/ctype.cc
+++ /dev/null
@@ -1,112 +0,0 @@
-#include "winsup.h"
-extern "C" {
-#include <ctype.h>
-
-#define _CTYPE_DATA_0_127 \
- _C, _C, _C, _C, _C, _C, _C, _C, \
- _C, _C|_S, _C|_S, _C|_S, _C|_S, _C|_S, _C, _C, \
- _C, _C, _C, _C, _C, _C, _C, _C, \
- _C, _C, _C, _C, _C, _C, _C, _C, \
- _S|_B, _P, _P, _P, _P, _P, _P, _P, \
- _P, _P, _P, _P, _P, _P, _P, _P, \
- _N, _N, _N, _N, _N, _N, _N, _N, \
- _N, _N, _P, _P, _P, _P, _P, _P, \
- _P, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U, \
- _U, _U, _U, _U, _U, _U, _U, _U, \
- _U, _U, _U, _U, _U, _U, _U, _U, \
- _U, _U, _U, _P, _P, _P, _P, _P, \
- _P, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L, \
- _L, _L, _L, _L, _L, _L, _L, _L, \
- _L, _L, _L, _L, _L, _L, _L, _L, \
- _L, _L, _L, _P, _P, _P, _P, _C
-
-#define _CTYPE_DATA_128_256 \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- 0, 0, 0, 0, 0, 0, 0, 0, \
- 0, 0, 0, 0, 0, 0, 0, 0
-
-char ctype_b[128 + 256] = {
- _CTYPE_DATA_128_256,
- _CTYPE_DATA_0_127,
- _CTYPE_DATA_128_256
-};
-
-__asm__ (" \n\
- .data \n\
- .globl __ctype_ \n\
- .set __ctype_,_ctype_b+127 \n\
- .text \n\
-");
-
-#define makefunc(x) \
- static int __cdecl \
- c_##x (int c) \
- { \
- return x (c); \
- } \
- EXPORT_ALIAS(c_##x, x)
-
-makefunc(isalnum)
-makefunc(isalpha)
-makefunc(iscntrl)
-makefunc(isdigit)
-makefunc(isgraph)
-makefunc(islower)
-makefunc(isprint)
-makefunc(ispunct)
-makefunc(isspace)
-makefunc(isupper)
-makefunc(isxdigit)
-makefunc(tolower)
-makefunc(toupper)
-makefunc(isblank)
-makefunc(isascii)
-makefunc(toascii)
-}
-
-/*
- * Copyright (c) 1989 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
diff --git a/winsup/cygwin/cxx.cc b/winsup/cygwin/cxx.cc
deleted file mode 100644
index 1cee576..0000000
--- a/winsup/cygwin/cxx.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-/* cxx.cc
-
- 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. */
-
-#if (__GNUC__ >= 3)
-
-#include "winsup.h"
-#include <stdlib.h>
-
-void *
-operator new (size_t s)
-{
- void *p = calloc (1, s);
- return p;
-}
-
-void
-operator delete (void *p)
-{
- free (p);
-}
-
-void *
-operator new[] (size_t s)
-{
- return ::operator new (s);
-}
-
-void
-operator delete[] (void *p)
-{
- ::operator delete (p);
-}
-
-extern "C" void
-__cxa_pure_virtual (void)
-{
- api_fatal ("pure virtual method called");
-}
-
-extern "C" void
-__cxa_guard_acquire ()
-{
-}
-
-extern "C" void
-__cxa_guard_release ()
-{
-}
-#endif
diff --git a/winsup/cygwin/cygerrno.h b/winsup/cygwin/cygerrno.h
deleted file mode 100644
index e3b1011..0000000
--- a/winsup/cygwin/cygerrno.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* cygerrno.h: main Cygwin header file.
-
- Copyright 2000, 2001, 2002, 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. */
-
-#ifndef _CYGERRNO_H
-#define _CYGERRNO_H
-#include <errno.h>
-
-void __stdcall seterrno_from_win_error (const char *file, int line, DWORD code) __attribute__ ((regparm(3)));
-void __stdcall seterrno (const char *, int line) __attribute__ ((regparm(2)));
-int __stdcall geterrno_from_win_error (DWORD code = GetLastError (), int deferrno = 13 /*EACCESS*/) __attribute__ ((regparm(2)));
-
-#define __seterrno() seterrno (__FILE__, __LINE__)
-#define __seterrno_from_win_error(val) seterrno_from_win_error (__FILE__, __LINE__, val)
-#define __seterrno_from_nt_status(status) \
- ({ \
- DWORD winerr = RtlNtStatusToDosError (status); \
- SetLastError (winerr); \
- __seterrno_from_win_error (winerr); \
- })
-
-inline int
-__set_errno (const char *fn, int ln, int val)
-{
- debug_printf ("%s:%d val %d", fn, ln, val);
- return errno = _impure_ptr->_errno = val;
-}
-#define set_errno(val) __set_errno (__PRETTY_FUNCTION__, __LINE__, (val))
-
-#define get_errno() (errno)
-extern "C" void __stdcall set_sig_errno (int e);
-
-class save_errno
- {
- int saved;
- public:
- save_errno () {saved = get_errno ();}
- save_errno (int what) {saved = get_errno (); set_errno (what); }
- void set (int what) {set_errno (what); saved = what;}
- void reset () {saved = get_errno ();}
- ~save_errno () {set_errno (saved);}
- };
-
-extern const char *__sp_fn;
-extern int __sp_ln;
-#endif /*_CYGERRNO_H*/
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc
deleted file mode 100644
index bddc6ce..0000000
--- a/winsup/cygwin/cygheap.cc
+++ /dev/null
@@ -1,450 +0,0 @@
-/* cygheap.cc: Cygwin heap manager.
-
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Red Hat, Inc.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include "winsup.h"
-#include <assert.h>
-#include <stdlib.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "child_info.h"
-#include "heap.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include <unistd.h>
-#include <wchar.h>
-
-init_cygheap NO_COPY *cygheap;
-void NO_COPY *cygheap_max;
-
-extern "C" char _cygheap_mid[] __attribute__((section(".cygheap")));
-extern "C" char _cygheap_end[];
-
-static NO_COPY muto cygheap_protect;
-
-struct cygheap_entry
- {
- int type;
- struct cygheap_entry *next;
- char data[0];
- };
-
-#define NBUCKETS (sizeof (cygheap->buckets) / sizeof (cygheap->buckets[0]))
-#define N0 ((_cmalloc_entry *) NULL)
-#define to_cmalloc(s) ((_cmalloc_entry *) (((char *) (s)) - (unsigned) (N0->data)))
-
-#define CFMAP_OPTIONS (SEC_RESERVE | PAGE_READWRITE)
-#define MVMAP_OPTIONS (FILE_MAP_WRITE)
-
-extern "C" {
-static void __stdcall _cfree (void *) __attribute__((regparm(1)));
-static void *__stdcall _csbrk (int);
-}
-
-/* Called by fork or spawn to reallocate cygwin heap */
-void __stdcall
-cygheap_fixup_in_child (bool execed)
-{
- cygheap_max = child_proc_info->cygheap;
- cygheap = (init_cygheap *) cygheap_max;
- _csbrk ((char *) child_proc_info->cygheap_max - (char *) cygheap);
- child_copy (child_proc_info->parent, false, "cygheap", cygheap, cygheap_max, NULL);
- cygheap_init ();
- debug_fixup_after_fork_exec ();
- if (execed)
- {
- cygheap->hooks.next = NULL;
- cygheap->user_heap.base = NULL; /* We can allocate the heap anywhere */
- /* Walk the allocated memory chain looking for orphaned memory from
- previous execs */
- for (_cmalloc_entry *rvc = cygheap->chain; rvc; rvc = rvc->prev)
- {
- cygheap_entry *ce = (cygheap_entry *) rvc->data;
- if (!rvc->ptr || rvc->b >= NBUCKETS || ce->type <= HEAP_1_START)
- continue;
- else if (ce->type < HEAP_1_MAX)
- ce->type += HEAP_1_MAX; /* Mark for freeing after next exec */
- else
- _cfree (ce); /* Marked by parent for freeing in child */
- }
- }
-}
-
-int
-init_cygheap::manage_console_count (const char *something, int amount, bool avoid_freeing_console)
-{
- if (console_count == 0 && amount > 0)
- init_console_handler (true);
- console_count += amount;
- debug_printf ("%s: console_count %d, amount %d, %s, avoid_freeing_console %d",
- something, console_count, amount, myctty (), avoid_freeing_console);
- if (!avoid_freeing_console && amount <= 0 && !console_count && myself->ctty == -1)
- {
- BOOL res = FreeConsole ();
- debug_printf ("freed console, res %d", res);
- init_console_handler (false);
- }
- return console_count;
-}
-
-void
-init_cygheap::close_ctty ()
-{
- debug_printf ("closing cygheap->ctty %p", cygheap->ctty);
- cygheap->ctty->close ();
- cygheap->ctty = NULL;
-}
-
-#define nextpage(x) ((char *) (((DWORD) ((char *) x + granmask)) & ~granmask))
-#define allocsize(x) ((DWORD) nextpage (x))
-#ifdef DEBUGGING
-#define somekinda_printf debug_printf
-#else
-#define somekinda_printf malloc_printf
-#endif
-
-static void *__stdcall
-_csbrk (int sbs)
-{
- void *prebrk = cygheap_max;
- size_t granmask = getpagesize () - 1;
- char *newbase = nextpage (prebrk);
- cygheap_max = (char *) cygheap_max + sbs;
- if (!sbs || (newbase >= cygheap_max) || (cygheap_max <= _cygheap_end))
- /* nothing to do */;
- else
- {
- if (prebrk <= _cygheap_end)
- newbase = _cygheap_end;
-
- DWORD adjsbs = allocsize ((char *) cygheap_max - newbase);
- if (adjsbs && !VirtualAlloc (newbase, adjsbs, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE))
- {
- MEMORY_BASIC_INFORMATION m;
- if (!VirtualQuery (newbase, &m, sizeof m))
- system_printf ("couldn't get memory info, %E");
- somekinda_printf ("Couldn't reserve/commit %d bytes of space for cygwin's heap, %E",
- adjsbs);
- somekinda_printf ("AllocationBase %p, BaseAddress %p, RegionSize %p, State %p\n",
- m.AllocationBase, m.BaseAddress, m.RegionSize, m.State);
- __seterrno ();
- cygheap_max = (char *) cygheap_max - sbs;
- return NULL;
- }
- }
-
- return prebrk;
-}
-
-extern "C" void __stdcall
-cygheap_init ()
-{
- cygheap_protect.init ("cygheap_protect");
- if (!cygheap)
- {
- cygheap = (init_cygheap *) memset (_cygheap_start, 0,
- _cygheap_mid - _cygheap_start);
- cygheap_max = cygheap;
- _csbrk (sizeof (*cygheap));
- }
- if (!cygheap->fdtab)
- cygheap->fdtab.init ();
- if (!cygheap->sigs)
- sigalloc ();
-}
-
-/* Copyright (C) 1997, 2000 DJ Delorie */
-
-static void *_cmalloc (unsigned size) __attribute ((regparm(1)));
-static void *__stdcall _crealloc (void *ptr, unsigned size) __attribute ((regparm(2)));
-
-static void *__stdcall
-_cmalloc (unsigned size)
-{
- _cmalloc_entry *rvc;
- unsigned b, sz;
-
- /* Calculate "bit bucket" and size as a power of two. */
- for (b = 3, sz = 8; sz && sz < size; b++, sz <<= 1)
- continue;
-
- cygheap_protect.acquire ();
- if (cygheap->buckets[b])
- {
- rvc = (_cmalloc_entry *) cygheap->buckets[b];
- cygheap->buckets[b] = rvc->ptr;
- rvc->b = b;
- }
- else
- {
- rvc = (_cmalloc_entry *) _csbrk (sz + sizeof (_cmalloc_entry));
- if (!rvc)
- {
- cygheap_protect.release ();
- return NULL;
- }
-
- rvc->b = b;
- rvc->prev = cygheap->chain;
- cygheap->chain = rvc;
- }
- cygheap_protect.release ();
- return rvc->data;
-}
-
-static void __stdcall
-_cfree (void *ptr)
-{
- cygheap_protect.acquire ();
- _cmalloc_entry *rvc = to_cmalloc (ptr);
- DWORD b = rvc->b;
- rvc->ptr = cygheap->buckets[b];
- cygheap->buckets[b] = (char *) rvc;
- cygheap_protect.release ();
-}
-
-static void *__stdcall
-_crealloc (void *ptr, unsigned size)
-{
- void *newptr;
- if (ptr == NULL)
- newptr = _cmalloc (size);
- else
- {
- unsigned oldsize = 1 << to_cmalloc (ptr)->b;
- if (size <= oldsize)
- return ptr;
- newptr = _cmalloc (size);
- if (newptr)
- {
- memcpy (newptr, ptr, oldsize);
- _cfree (ptr);
- }
- }
- return newptr;
-}
-
-/* End Copyright (C) 1997 DJ Delorie */
-
-#define sizeof_cygheap(n) ((n) + sizeof (cygheap_entry))
-
-#define N ((cygheap_entry *) NULL)
-#define tocygheap(s) ((cygheap_entry *) (((char *) (s)) - (int) (N->data)))
-
-inline static void *
-creturn (cygheap_types x, cygheap_entry * c, unsigned len, const char *fn = NULL)
-{
- if (c)
- /* nothing to do */;
- else if (fn)
- api_fatal ("%s would have returned NULL", fn);
- else
- {
- set_errno (ENOMEM);
- return NULL;
- }
- c->type = x;
- char *cend = ((char *) c + sizeof (*c) + len);
- if (cygheap_max < cend)
- cygheap_max = cend;
- MALLOC_CHECK;
- return (void *) c->data;
-}
-
-inline static void *
-cmalloc (cygheap_types x, DWORD n, const char *fn)
-{
- cygheap_entry *c;
- MALLOC_CHECK;
- c = (cygheap_entry *) _cmalloc (sizeof_cygheap (n));
- return creturn (x, c, n, fn);
-}
-
-extern "C" void *
-cmalloc (cygheap_types x, DWORD n)
-{
- return cmalloc (x, n, NULL);
-}
-
-extern "C" void *
-cmalloc_abort (cygheap_types x, DWORD n)
-{
- return cmalloc (x, n, "cmalloc");
-}
-
-inline static void *
-crealloc (void *s, DWORD n, const char *fn)
-{
- MALLOC_CHECK;
- if (s == NULL)
- return cmalloc (HEAP_STR, n); // kludge
-
- assert (!inheap (s));
- cygheap_entry *c = tocygheap (s);
- cygheap_types t = (cygheap_types) c->type;
- c = (cygheap_entry *) _crealloc (c, sizeof_cygheap (n));
- return creturn (t, c, n, fn);
-}
-
-extern "C" void *__stdcall
-crealloc (void *s, DWORD n)
-{
- return crealloc (s, n, NULL);
-}
-
-extern "C" void *__stdcall
-crealloc_abort (void *s, DWORD n)
-{
- return crealloc (s, n, "crealloc");
-}
-
-extern "C" void __stdcall
-cfree (void *s)
-{
- assert (!inheap (s));
- _cfree (tocygheap (s));
- MALLOC_CHECK;
-}
-
-extern "C" void __stdcall
-cfree_and_set (char *&s, char *what)
-{
- if (s && s != almost_null)
- cfree (s);
- s = what;
-}
-
-inline static void *
-ccalloc (cygheap_types x, DWORD n, DWORD size, const char *fn)
-{
- cygheap_entry *c;
- MALLOC_CHECK;
- n *= size;
- c = (cygheap_entry *) _cmalloc (sizeof_cygheap (n));
- if (c)
- memset (c->data, 0, n);
- return creturn (x, c, n, fn);
-}
-
-extern "C" void *__stdcall
-ccalloc (cygheap_types x, DWORD n, DWORD size)
-{
- return ccalloc (x, n, size, NULL);
-}
-
-extern "C" void *__stdcall
-ccalloc_abort (cygheap_types x, DWORD n, DWORD size)
-{
- return ccalloc (x, n, size, "ccalloc");
-}
-
-extern "C" PWCHAR __stdcall
-cwcsdup (const PWCHAR s)
-{
- MALLOC_CHECK;
- PWCHAR p = (PWCHAR) cmalloc (HEAP_STR, wcslen (s) + 1);
- if (!p)
- return NULL;
- wcpcpy (p, s);
- MALLOC_CHECK;
- return p;
-}
-
-extern "C" PWCHAR __stdcall
-cwcsdup1 (const PWCHAR s)
-{
- MALLOC_CHECK;
- PWCHAR p = (PWCHAR) cmalloc (HEAP_1_STR, wcslen (s) + 1);
- if (!p)
- return NULL;
- wcpcpy (p, s);
- MALLOC_CHECK;
- return p;
-}
-
-extern "C" char *__stdcall
-cstrdup (const char *s)
-{
- MALLOC_CHECK;
- char *p = (char *) cmalloc (HEAP_STR, strlen (s) + 1);
- if (!p)
- return NULL;
- strcpy (p, s);
- MALLOC_CHECK;
- return p;
-}
-
-extern "C" char *__stdcall
-cstrdup1 (const char *s)
-{
- MALLOC_CHECK;
- char *p = (char *) cmalloc (HEAP_1_STR, strlen (s) + 1);
- if (!p)
- return NULL;
- strcpy (p, s);
- MALLOC_CHECK;
- return p;
-}
-
-void
-cygheap_root::set (const char *posix, const char *native, bool caseinsensitive)
-{
- if (*posix == '/' && posix[1] == '\0')
- {
- if (m)
- {
- cfree (m);
- m = NULL;
- }
- return;
- }
- if (!m)
- m = (struct cygheap_root_mount_info *) ccalloc (HEAP_MOUNT, 1, sizeof (*m));
- strcpy (m->posix_path, posix);
- m->posix_pathlen = strlen (posix);
- if (m->posix_pathlen >= 1 && m->posix_path[m->posix_pathlen - 1] == '/')
- m->posix_path[--m->posix_pathlen] = '\0';
-
- strcpy (m->native_path, native);
- m->native_pathlen = strlen (native);
- if (m->native_pathlen >= 1 && m->native_path[m->native_pathlen - 1] == '\\')
- m->native_path[--m->native_pathlen] = '\0';
- m->caseinsensitive = caseinsensitive;
-}
-
-cygheap_user::~cygheap_user ()
-{
-}
-
-void
-cygheap_user::set_name (const char *new_name)
-{
- bool allocated = !!pname;
-
- if (allocated)
- {
- if (strcasematch (new_name, pname))
- return;
- cfree (pname);
- }
-
- pname = cstrdup (new_name ? new_name : "");
- if (!allocated)
- return; /* Initializing. Don't bother with other stuff. */
-
- cfree_and_set (homedrive);
- cfree_and_set (homepath);
- cfree_and_set (plogsrv);
- cfree_and_set (pdomain);
- cfree_and_set (pwinname);
-}
diff --git a/winsup/cygwin/cygheap.h b/winsup/cygwin/cygheap.h
deleted file mode 100644
index fe2333c..0000000
--- a/winsup/cygwin/cygheap.h
+++ /dev/null
@@ -1,440 +0,0 @@
-/* cygheap.h: Cygwin heap manager.
-
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "hires.h"
-
-#undef cfree
-
-enum cygheap_types
-{
- HEAP_FHANDLER,
- HEAP_STR,
- HEAP_ARGV,
- HEAP_BUF,
- HEAP_MOUNT,
- HEAP_SIGS,
- HEAP_ARCHETYPES,
- HEAP_TLS,
- HEAP_COMMUNE,
- HEAP_1_START,
- HEAP_1_HOOK,
- HEAP_1_STR,
- HEAP_1_ARGV,
- HEAP_1_BUF,
- HEAP_1_EXEC,
- HEAP_1_MAX = 100,
- HEAP_2_STR,
- HEAP_MMAP = 200
-};
-
-#define incygheap(s) (cygheap && ((char *) (s) >= (char *) cygheap) && ((char *) (s) <= ((char *) cygheap_max)))
-
-struct _cmalloc_entry
-{
- union
- {
- DWORD b;
- char *ptr;
- };
- struct _cmalloc_entry *prev;
- char data[0];
-};
-
-struct cygheap_root_mount_info
-{
- char posix_path[CYG_MAX_PATH];
- unsigned posix_pathlen;
- char native_path[CYG_MAX_PATH];
- unsigned native_pathlen;
- bool caseinsensitive;
-};
-
-/* CGF: FIXME This doesn't belong here */
-
-class cygheap_root
-{
- /* Root directory information.
- This is used after a chroot is called. */
- struct cygheap_root_mount_info *m;
-
-public:
- bool posix_ok (const char *path)
- {
- if (!m)
- return 1;
- return path_prefix_p (m->posix_path, path, m->posix_pathlen,
- m->caseinsensitive);
- }
- bool ischroot_native (const char *path)
- {
- if (!m)
- return 1;
- return strncasematch (m->native_path, path, m->native_pathlen)
- && (path[m->native_pathlen] == '\\' || !path[m->native_pathlen]);
- }
- const char *unchroot (const char *path)
- {
- if (!m)
- return path;
- const char *p = path + m->posix_pathlen;
- if (!*p)
- p = "/";
- return p;
- }
- bool exists () {return !!m;}
- void set (const char *, const char *, bool);
- size_t posix_length () const { return m->posix_pathlen; }
- const char *posix_path () const { return m->posix_path; }
- size_t native_length () const { return m->native_pathlen; }
- const char *native_path () const { return m->native_path; }
-};
-
-enum homebodies
-{
- CH_HOMEDRIVE,
- CH_HOMEPATH,
- CH_HOME
-};
-
-class cygheap_user
-{
- /* Extendend user information.
- The information is derived from the internal_getlogin call
- when on a NT system. */
- char *pname; /* user's name */
- char *plogsrv; /* Logon server, may be FQDN */
- char *pdomain; /* Logon domain of the user */
- char *homedrive; /* User's home drive */
- char *homepath; /* User's home path */
- char *psystemroot; /* Value of SYSTEMROOT */
- char *pwinname; /* User's name as far as Windows knows it */
- char *puserprof; /* User profile */
- cygsid effec_cygsid; /* buffer for user's SID */
- cygsid saved_cygsid; /* Remains intact even after impersonation */
-public:
- __uid32_t saved_uid; /* Remains intact even after impersonation */
- __gid32_t saved_gid; /* Ditto */
- __uid32_t real_uid; /* Remains intact on seteuid, replaced by setuid */
- __gid32_t real_gid; /* Ditto */
- user_groups groups; /* Primary and supp SIDs */
-
- /* token is needed if set(e)uid should be called. It can be set by a call
- to `set_impersonation_token()'. */
- HANDLE external_token;
- HANDLE internal_token;
- HANDLE curr_primary_token;
- HANDLE curr_imp_token;
-
- /* CGF 2002-06-27. I removed the initializaton from this constructor
- since this class is always allocated statically. That means that everything
- is zero anyway so there is no need to initialize it to zero. Since the
- token initialization is always handled during process startup as well,
- I've removed the constructor entirely. Please reinstate this if this
- situation ever changes.
- cygheap_user () : pname (NULL), plogsrv (NULL), pdomain (NULL),
- homedrive (NULL), homepath (NULL),
- token (INVALID_HANDLE_VALUE) {}
- */
-
- ~cygheap_user ();
-
- void init ();
- void set_name (const char *new_name);
- const char *name () const { return pname; }
-
- const char *env_logsrv (const char *, size_t);
- const char *env_homepath (const char *, size_t);
- const char *env_homedrive (const char *, size_t);
- const char *env_userprofile (const char *, size_t);
- const char *env_domain (const char *, size_t);
- const char *env_name (const char *, size_t);
- const char *env_systemroot (const char *, size_t);
-
- const char *logsrv ()
- {
- const char *p = env_logsrv ("LOGONSERVER=", sizeof ("LOGONSERVER=") - 1);
- return (p == almost_null) ? NULL : p;
- }
- const char *winname ()
- {
- const char *p = env_name ("USERNAME=", sizeof ("USERNAME=") - 1);
- return (p == almost_null) ? NULL : p;
- }
- const char *domain ()
- {
- const char *p = env_domain ("USERDOMAIN=", sizeof ("USERDOMAIN=") - 1);
- return (p == almost_null) ? NULL : p;
- }
- BOOL set_sid (PSID new_sid) {return (BOOL) (effec_cygsid = new_sid);}
- BOOL set_saved_sid () { return (BOOL) (saved_cygsid = effec_cygsid); }
- PSID sid () { return effec_cygsid; }
- PSID saved_sid () { return saved_cygsid; }
- const char *ontherange (homebodies what, struct passwd * = NULL);
-#define NO_IMPERSONATION NULL
- bool issetuid () const { return curr_imp_token != NO_IMPERSONATION; }
- HANDLE primary_token () { return curr_primary_token; }
- HANDLE imp_token () { return curr_imp_token; }
- void deimpersonate ()
- {
- RevertToSelf ();
- }
- bool reimpersonate ()
- {
- if (issetuid ())
- return ImpersonateLoggedOnUser (primary_token ());
- return true;
- }
- bool has_impersonation_tokens ()
- { return external_token != NO_IMPERSONATION
- || internal_token != NO_IMPERSONATION
- || curr_primary_token != NO_IMPERSONATION; }
- void close_impersonation_tokens ()
- {
- if (curr_imp_token != NO_IMPERSONATION)
- CloseHandle (curr_imp_token);
- if (curr_primary_token != NO_IMPERSONATION
- && curr_primary_token != external_token
- && curr_primary_token != internal_token)
- CloseHandle (curr_primary_token);
- if (external_token != NO_IMPERSONATION)
- CloseHandle (external_token);
- if (internal_token != NO_IMPERSONATION)
- CloseHandle (internal_token);
- }
- PWCHAR get_windows_id (PWCHAR buf)
- {
- return effec_cygsid.string (buf);
- }
- char *get_windows_id (char *buf)
- {
- return effec_cygsid.string (buf);
- }
-
- const char *test_uid (char *&, const char *, size_t)
- __attribute__ ((regparm (3)));
-};
-
-/* cwd cache stuff. */
-
-class muto;
-
-struct cwdstuff
-{
- char *posix;
- UNICODE_STRING win32;
- HANDLE dir;
- DWORD drive_length;
- static muto cwd_lock;
- char *get (char *, int = 1, int = 0, unsigned = NT_MAX_PATH);
- HANDLE get_handle () { return dir; }
- DWORD get_drive (char * dst)
- {
- cwd_lock.acquire ();
- DWORD ret = sys_wcstombs (dst, NT_MAX_PATH, win32.Buffer, drive_length);
- cwd_lock.release ();
- return ret;
- }
- void init ();
- int set (PUNICODE_STRING, const char *, bool);
-};
-
-#ifdef DEBUGGING
-struct cygheap_debug
-{
- handle_list starth;
- handle_list *endh;
- handle_list freeh[500];
-};
-#endif
-
-struct user_heap_info
-{
- void *base;
- void *ptr;
- void *top;
- void *max;
- unsigned chunk;
- unsigned slop;
-};
-
-struct hook_chain
-{
- void **loc;
- const void *func;
- struct hook_chain *next;
-};
-
-struct init_cygheap
-{
- _cmalloc_entry *chain;
- char *buckets[32];
- cygheap_root root;
- cygheap_user user;
- user_heap_info user_heap;
- mode_t umask;
- HANDLE console_h;
- cwdstuff cwd;
- dtable fdtab;
-#ifdef DEBUGGING
- cygheap_debug debug;
-#endif
- struct sigaction *sigs;
-
- fhandler_tty_slave *ctty; /* Current tty */
-#ifdef NEWVFORK
- fhandler_tty_slave *ctty_on_hold;
-#endif
- struct _cygtls **threadlist;
- size_t sthreads;
- pid_t pid; /* my pid */
- HANDLE pid_handle; /* handle for my pid */
- struct { /* Equivalent to using LIST_HEAD. */
- struct inode_t *lh_first;
- } inode_list; /* Global inode pointer for adv. locking. */
- hook_chain hooks;
- void close_ctty ();
- int manage_console_count (const char *, int, bool = false) __attribute__ ((regparm (3)));
-private:
- int console_count;
-};
-
-
-#define _CYGHEAPSIZE_SLOP (128 * 1024)
-#define CYGHEAPSIZE (sizeof (init_cygheap) + (20000 * sizeof (fhandler_union)) + _CYGHEAPSIZE_SLOP)
-#define CYGHEAPSIZE_MIN (sizeof (init_cygheap) + (10000 * sizeof (fhandler_union)))
-
-extern init_cygheap *cygheap;
-extern void *cygheap_max;
-
-class cygheap_fdmanip
-{
- protected:
- int fd;
- fhandler_base **fh;
- bool locked;
- public:
- cygheap_fdmanip (): fh (NULL) {}
- virtual ~cygheap_fdmanip ()
- {
- if (locked)
- cygheap->fdtab.unlock ();
- }
- void release ()
- {
- cygheap->fdtab.release (fd);
- }
- operator int &() {return fd;}
- operator fhandler_base* &() {return *fh;}
- operator fhandler_socket* () const {return reinterpret_cast<fhandler_socket *> (*fh);}
- operator fhandler_pipe* () const {return reinterpret_cast<fhandler_pipe *> (*fh);}
- void operator = (fhandler_base *fh) {*this->fh = fh;}
- fhandler_base *operator -> () const {return *fh;}
- bool isopen () const
- {
- if (*fh)
- return true;
- set_errno (EBADF);
- return false;
- }
-};
-
-class cygheap_fdnew : public cygheap_fdmanip
-{
- public:
- cygheap_fdnew (int seed_fd = -1, bool lockit = true)
- {
- if (lockit)
- cygheap->fdtab.lock ();
- if (seed_fd < 0)
- fd = cygheap->fdtab.find_unused_handle ();
- else
- fd = cygheap->fdtab.find_unused_handle (seed_fd + 1);
- if (fd >= 0)
- {
- locked = lockit;
- fh = cygheap->fdtab + fd;
- }
- else
- {
- set_errno (EMFILE);
- if (lockit)
- cygheap->fdtab.unlock ();
- locked = false;
- }
- }
- void operator = (fhandler_base *fh) {*this->fh = fh;}
-};
-
-class cygheap_fdget : public cygheap_fdmanip
-{
- public:
- cygheap_fdget (int fd, bool lockit = false, bool do_set_errno = true)
- {
- if (lockit)
- cygheap->fdtab.lock ();
- if (fd >= 0 && fd < (int) cygheap->fdtab.size
- && *(fh = cygheap->fdtab + fd) != NULL)
- {
- this->fd = fd;
- locked = lockit;
- }
- else
- {
- this->fd = -1;
- if (do_set_errno)
- set_errno (EBADF);
- if (lockit)
- cygheap->fdtab.unlock ();
- locked = false;
- }
- }
-};
-
-class cygheap_fdenum : public cygheap_fdmanip
-{
- public:
- cygheap_fdenum (bool lockit = false)
- {
- locked = lockit;
- if (lockit)
- cygheap->fdtab.lock ();
- fd = -1;
- }
- int next ()
- {
- while (++fd < (int) cygheap->fdtab.size)
- if (*(fh = cygheap->fdtab + fd) != NULL)
- return fd;
- return -1;
- }
- void rewind ()
- {
- fd = -1;
- }
-};
-
-class child_info;
-void __stdcall cygheap_fixup_in_child (bool);
-extern "C" {
-void __stdcall cfree (void *) __attribute__ ((regparm(1)));
-void *__stdcall cmalloc (cygheap_types, DWORD) __attribute__ ((regparm(2)));
-void *__stdcall crealloc (void *, DWORD) __attribute__ ((regparm(2)));
-void *__stdcall ccalloc (cygheap_types, DWORD, DWORD) __attribute__ ((regparm(3)));
-void *__stdcall cmalloc_abort (cygheap_types, DWORD) __attribute__ ((regparm(2)));
-void *__stdcall crealloc_abort (void *, DWORD) __attribute__ ((regparm(2)));
-void *__stdcall ccalloc_abort (cygheap_types, DWORD, DWORD) __attribute__ ((regparm(3)));
-PWCHAR __stdcall cwcsdup (const PWCHAR) __attribute__ ((regparm(1)));
-PWCHAR __stdcall cwcsdup1 (const PWCHAR) __attribute__ ((regparm(1)));
-char *__stdcall cstrdup (const char *) __attribute__ ((regparm(1)));
-char *__stdcall cstrdup1 (const char *) __attribute__ ((regparm(1)));
-void __stdcall cfree_and_set (char *&, char * = NULL) __attribute__ ((regparm(2)));
-void __stdcall cygheap_init ();
-extern char _cygheap_start[] __attribute__((section(".idata")));
-}
diff --git a/winsup/cygwin/cyglsa.h b/winsup/cygwin/cyglsa.h
deleted file mode 100644
index c9edece..0000000
--- a/winsup/cygwin/cyglsa.h
+++ /dev/null
@@ -1,213 +0,0 @@
-/* cyglsa.h: Header file for Cygwin LSA authentication
-
- Copyright 2006 Red Hat, Inc.
-
- Written by Corinna Vinschen <corinna@vinschen.de>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for details. */
-
-#ifndef _CYGLSA_H
-#define _CYGLSA_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define CYG_LSA_PKGNAME "CygwinLsa"
-
-#define CYG_LSA_MAGIC_OLD1 0x0379f014LU
-/* First change to cyglsa_t.
- - Username and domain are now of type WCHAR instead of char.
- - domain is MAX_DOMAIN_NAME_LEN instead of INTERNET_MAX_HOST_NAME_LENGTH. */
-#define CYG_LSA_MAGIC 0x0379f115LU
-
-/* Datastructures not defined in w32api. */
-typedef PVOID *PLSA_CLIENT_REQUEST;
-
-typedef UNICODE_STRING SECURITY_STRING, *PSECURITY_STRING;
-
-typedef struct _SECPKG_CLIENT_INFO
-{
- LUID LogonId;
- ULONG ProcessID;
- ULONG ThreadID;
- BOOLEAN HasTcbPrivilege;
- BOOLEAN Impersonating;
- BOOLEAN Restricted;
-} SECPKG_CLIENT_INFO, *PSECPKG_CLIENT_INFO;
-
-typedef enum _SECPKG_NAME_TYPE
-{
- SecNameSamCompatible,
- SecNameAlternateId,
- SecNameFlat,
- SecNameDN,
- SecNameSPN
-} SECPKG_NAME_TYPE, *PSECPKG_NAME_TYPE;
-
-typedef struct _SECPKG_CALL_INFO
-{
- ULONG ProcessId;
- ULONG ThreadId;
- ULONG Attributes;
- ULONG CallCount;
-} SECPKG_CALL_INFO, *PSECPKG_CALL_INFO;
-
-/* The table returned by LsaApInitializePackage is actually a
- LSA_SECPKG_FUNCTION_TABLE even though that's not documented.
- We need only a subset of this table, basically the LSA_DISPATCH_TABLE
- plus the pointer to the GetClientInfo function. */
-typedef struct _LSA_SECPKG_FUNCS
-{
- NTSTATUS (NTAPI *CreateLogonSession)(PLUID);
- NTSTATUS (NTAPI *DeleteLogonSession)(PLUID);
- NTSTATUS (NTAPI *AddCredentials)(PLUID, ULONG, PLSA_STRING, PLSA_STRING);
- NTSTATUS (NTAPI *GetCredentials)(PVOID); /* wrong prototype, unused */
- NTSTATUS (NTAPI *DeleteCredentials)(PVOID); /* wrong prototype, unused */
- PVOID (NTAPI *AllocateLsaHeap)(ULONG);
- VOID (NTAPI *FreeLsaHeap)(PVOID);
- NTSTATUS (NTAPI *AllocateClientBuffer)(PLSA_CLIENT_REQUEST, ULONG, PVOID *);
- NTSTATUS (NTAPI *FreeClientBuffer)(PLSA_CLIENT_REQUEST, PVOID);
- NTSTATUS (NTAPI *CopyToClientBuffer)(PLSA_CLIENT_REQUEST, ULONG,
- PVOID, PVOID);
- NTSTATUS (NTAPI *CopyFromClientBuffer)(PLSA_CLIENT_REQUEST, ULONG,
- PVOID, PVOID);
- NTSTATUS (NTAPI *ImpersonateClient)(VOID);
- NTSTATUS (NTAPI *UnloadPackage)(VOID);
- NTSTATUS (NTAPI *DuplicateHandle)(HANDLE, PHANDLE);
- NTSTATUS (NTAPI *SaveSupplementalCredentials)(VOID);
- NTSTATUS (NTAPI *CreateThread)(PVOID); /* wrong prototype, unused */
- NTSTATUS (NTAPI *GetClientInfo)(PSECPKG_CLIENT_INFO);
- NTSTATUS (NTAPI *RegisterNotification)(PVOID); /* wrong prototype, unused */
- NTSTATUS (NTAPI *CancelNotification)(PVOID); /* wrong prototype, unused */
- NTSTATUS (NTAPI *MapBuffer)(PVOID); /* wrong prototype, unused */
- NTSTATUS (NTAPI *CreateToken)(PVOID); /* wrong prototype, unused */
- NTSTATUS (NTAPI *AuditLogon)(PVOID); /* wrong prototype, unused */
- NTSTATUS (NTAPI *CallPackage)(PVOID); /* wrong prototype, unused */
- NTSTATUS (NTAPI *FreeReturnBuffer)(PVOID); /* wrong prototype, unused */
- BOOLEAN (NTAPI *GetCallInfo)(PSECPKG_CALL_INFO);
- NTSTATUS (NTAPI *CallPackageEx)(PVOID); /* wrong prototype, unused */
- NTSTATUS (NTAPI *CreateSharedMemory)(PVOID); /* wrong prototype, unused */
- NTSTATUS (NTAPI *AllocateSharedMemory)(PVOID); /* wrong prototype, unused */
- NTSTATUS (NTAPI *FreeSharedMemory)(PVOID); /* wrong prototype, unused */
- NTSTATUS (NTAPI *DeleteSharedMemory)(PVOID); /* wrong prototype, unused */
- NTSTATUS (NTAPI *OpenSamUser)(PSECURITY_STRING, SECPKG_NAME_TYPE,
- PSECURITY_STRING, BOOLEAN, ULONG, PVOID *);
- NTSTATUS (NTAPI *GetUserCredentials)(PVOID, PVOID, PULONG, PVOID *, PULONG);
- NTSTATUS (NTAPI *GetUserAuthData)(PVOID, PUCHAR *, PULONG);
- NTSTATUS (NTAPI *CloseSamUser)(PVOID);
- NTSTATUS (NTAPI *ConvertAuthDataToToken)(PVOID, ULONG,
- SECURITY_IMPERSONATION_LEVEL,
- PTOKEN_SOURCE, SECURITY_LOGON_TYPE,
- PUNICODE_STRING, PHANDLE, PLUID,
- PUNICODE_STRING, PNTSTATUS);
- NTSTATUS (NTAPI *ClientCallback)(PVOID); /* wrong prototype, unused */
- NTSTATUS (NTAPI *UpdateCredentials)(PVOID); /* wrong prototype, unused */
- NTSTATUS (NTAPI *GetAuthDataForUser)(PSECURITY_STRING, SECPKG_NAME_TYPE,
- PSECURITY_STRING, PUCHAR *, PULONG,
- PUNICODE_STRING);
- NTSTATUS (NTAPI *CrackSingleName)(PVOID); /* wrong prototype, unused */
- NTSTATUS (NTAPI *AuditAccountLogon)(PVOID); /* wrong prototype, unused */
- NTSTATUS (NTAPI *CallPackagePassthrough)(PVOID); /* wrong prototype, unused */
-} LSA_SECPKG_FUNCS, *PLSA_SECPKG_FUNCS;
-
-typedef enum _LSA_TOKEN_INFORMATION_TYPE
-{
- LsaTokenInformationNull,
- LsaTokenInformationV1,
- LsaTokenInformationV2
-} LSA_TOKEN_INFORMATION_TYPE, *PLSA_TOKEN_INFORMATION_TYPE;
-
-typedef struct _LSA_TOKEN_INFORMATION_V2
-{
- LARGE_INTEGER ExpirationTime;
- TOKEN_USER User;
- PTOKEN_GROUPS Groups;
- TOKEN_PRIMARY_GROUP PrimaryGroup;
- PTOKEN_PRIVILEGES Privileges;
- TOKEN_OWNER Owner;
- TOKEN_DEFAULT_DACL DefaultDacl;
-} LSA_TOKEN_INFORMATION_V2, *PLSA_TOKEN_INFORMATION_V2;
-
-/* These structures are eqivalent to the appropriate Windows structures,
- using 32 bit offsets instead of pointers. These datastructures are
- used to transfer the logon information to the LSA authentication package.
- We can't use the LSA_TOKEN_INFORMATION_V2 structure directly, because
- its size differs between 32 bit and 64 bit Windows. */
-
-typedef DWORD OFFSET;
-
-typedef struct _CYG_SID_AND_ATTRIBUTES
-{
- OFFSET Sid;
- DWORD Attributes;
-} CYG_SID_AND_ATTRIBUTES, *PCYG_SID_AND_ATTRIBUTES;
-
-typedef struct _CYG_TOKEN_USER
-{
- CYG_SID_AND_ATTRIBUTES User;
-} CYG_TOKEN_USER, *PCYG_TOKEN_USER;
-
-typedef struct _CYG_TOKEN_GROUPS
-{
- DWORD GroupCount;
- CYG_SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY];
-} CYG_TOKEN_GROUPS, *PCYG_TOKEN_GROUPS;
-
-typedef struct _CYG_TOKEN_PRIMARY_GROUP
-{
- OFFSET PrimaryGroup;
-} CYG_TOKEN_PRIMARY_GROUP, *PCYG_TOKEN_PRIMARY_GROUP;
-
-typedef struct _CYG_TOKEN_OWNER
-{
- OFFSET Owner;
-} CYG_TOKEN_OWNER, *PCYG_TOKEN_OWNER;
-
-typedef struct _CYG_TOKEN_DEFAULT_DACL
-{
- OFFSET DefaultDacl;
-} CYG_TOKEN_DEFAULT_DACL, *PCYG_TOKEN_DEFAULT_DACL;
-
-typedef struct _CYG_LSA_TOKEN_INFORMATION
-{
- LARGE_INTEGER ExpirationTime;
- CYG_TOKEN_USER User;
- OFFSET Groups;
- CYG_TOKEN_PRIMARY_GROUP PrimaryGroup;
- OFFSET Privileges;
- CYG_TOKEN_OWNER Owner;
- CYG_TOKEN_DEFAULT_DACL DefaultDacl;
-} CYG_LSA_TOKEN_INFORMATION, *PCYG_LSA_TOKEN_INFORMATION;
-
-/* This is the structure created by security.cc:lsaauth(), which is given to
- LsaApLogonUser to create the token information returned to the LSA. */
-typedef struct
-{
- DWORD magic;
- DWORD checksum;
- WCHAR username[UNLEN + 1];
- WCHAR domain[MAX_DOMAIN_NAME_LEN + 1];
- ULONG inf_size;
- CYG_LSA_TOKEN_INFORMATION inf;
- BYTE data[1];
-} cyglsa_t;
-
-typedef struct
-{
- DWORD magic_pre;
- HANDLE token;
- DWORD magic_post;
-} cygprf_t;
-
-#define MAGIC_PRE 0x12345678UL
-#define MAGIC_POST 0x87654321UL
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CYGLSA_H */
diff --git a/winsup/cygwin/cygmagic b/winsup/cygwin/cygmagic
deleted file mode 100755
index a8ccc8c..0000000
--- a/winsup/cygwin/cygmagic
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-# cygmagic - Generate "magic numbers" from a structure.
-#
-# Copyright 2001, 2002 Red Hat, Inc.
-#
-# This file is part of Cygwin.
-#
-# This software is a copyrighted work licensed under the terms of the
-# Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-# details.
-
-file_magic=$1; shift
-gcc=$1; shift
-file=$1; shift
-trap "rm -f /tmp/$$.magic" 0 1 2 15
-cat <<EOF > $file_magic
-/* autogenerated - do not edit */
-#include "$file"
-EOF
-sumit() {
- cksum $*
-}
-
-while [ -n "$1" ]; do
- define=$1; shift
- struct=$1; shift
- sum=`$gcc -E $file | sed -n "/^$struct/,/^};/p" | sed -e 's/[ ]//g' -e '/^$/d' | sumit | awk '{printf "0x%xU", $1}'`
- echo "#define $define $sum"
- curr=`sed -n "s/^#[ ]*define CURR_$define[ ][ ]*\([^ ][^ ]*\)/\1/p" $file`
- [ "$curr" != "$sum" ] && echo "*** WARNING WARNING WARNING WARNING WARNING ***
-*** $file: magic number for $define changed old $curr != new $sum
-*** WARNING WARNING WARNING WARNING WARNING ***" 1>&2
-done >> $file_magic
-exit 0
diff --git a/winsup/cygwin/cygmalloc.h b/winsup/cygwin/cygmalloc.h
deleted file mode 100644
index 5c2a29a..0000000
--- a/winsup/cygwin/cygmalloc.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* cygmalloc.h: cygwin DLL malloc stuff
-
- Copyright 2002, 2003, 2004, 2005, 2007 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 __cplusplus
-extern "C" {
-#endif
-void dlfree (void *p) __attribute__ ((regparm (1)));
-void *dlmalloc (unsigned size) __attribute__ ((regparm (1)));
-void *dlrealloc (void *p, unsigned size) __attribute__ ((regparm (2)));
-void *dlcalloc (size_t nmemb, size_t size) __attribute__ ((regparm (2)));
-void *dlmemalign (size_t alignment, size_t bytes) __attribute__ ((regparm (2)));
-void *dlvalloc (size_t bytes) __attribute__ ((regparm (1)));
-size_t dlmalloc_usable_size (void *p) __attribute__ ((regparm (1)));
-int dlmalloc_trim (size_t) __attribute__ ((regparm (1)));
-int dlmallopt (int p, int v) __attribute__ ((regparm (2)));
-void dlmalloc_stats ();
-
-#ifndef __INSIDE_CYGWIN__
-extern "C" void __set_ENOMEM ();
-# define MALLOC_FAILURE_ACTION __set_ENOMEM ()
-# define USE_DL_PREFIX 1
-#else
-# define __malloc_lock() mallock.acquire ()
-# define __malloc_unlock() mallock.release ()
-extern muto mallock;
-#endif
-#ifdef __cplusplus
-}
-#endif
diff --git a/winsup/cygwin/cygserver.h b/winsup/cygwin/cygserver.h
deleted file mode 100644
index b549ed0..0000000
--- a/winsup/cygwin/cygserver.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/* cygserver.h
-
- Copyright 2001, 2002, 2003, 2004, 2008 Red Hat Inc.
-
- Written by Egor Duda <deo@logos-m.ru>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGSERVER_H_
-#define _CYGSERVER_H_
-
-#ifdef __GNUC__
-#define CYGSERVER_PACKED __attribute__ ((packed))
-#else
-#define CYGSERVER_PACKED
-#endif
-
-#define CYGWIN_SERVER_VERSION_MAJOR 1
-#define CYGWIN_SERVER_VERSION_API 4
-#define CYGWIN_SERVER_VERSION_MINOR 0
-#define CYGWIN_SERVER_VERSION_PATCH 0
-
-typedef enum {
- CYGSERVER_UNKNOWN = 0,
- CYGSERVER_OK,
- CYGSERVER_UNAVAIL
-} cygserver_states;
-
-/*---------------------------------------------------------------------------*
- * class client_request
- *---------------------------------------------------------------------------*/
-
-class transport_layer_base;
-
-#ifndef __INSIDE_CYGWIN__
-class process_cache;
-#endif
-
-class client_request
-{
-protected:
- typedef enum {
- CYGSERVER_REQUEST_INVALID,
- CYGSERVER_REQUEST_GET_VERSION,
- CYGSERVER_REQUEST_SHUTDOWN,
- CYGSERVER_REQUEST_ATTACH_TTY,
- CYGSERVER_REQUEST_MSG,
- CYGSERVER_REQUEST_SEM,
- CYGSERVER_REQUEST_SHM,
- CYGSERVER_REQUEST_SETPWD,
- CYGSERVER_REQUEST_LAST
- } request_code_t;
-
- struct header_t
- {
- size_t msglen;
- union
- {
- request_code_t request_code;
- ssize_t error_code;
- };
-
- header_t () {};
- header_t (request_code_t, size_t);
- } CYGSERVER_PACKED;
-
-public:
-#ifndef __INSIDE_CYGWIN__
- static void handle_request (transport_layer_base *, process_cache *);
-#endif
-
- client_request (request_code_t request_code,
- void *buf = NULL,
- size_t bufsiz = 0);
- virtual ~client_request ();
-
- request_code_t request_code () const { return _header.request_code; }
-
- ssize_t error_code () const { return _header.error_code; };
- void error_code (ssize_t error_code) { _header.error_code = error_code; };
-
- size_t msglen () const { return _header.msglen; };
- void msglen (size_t len) { _header.msglen = len; };
-
- int make_request ();
-
-protected:
- virtual void send (transport_layer_base *);
-
-private:
- header_t _header;
- void * const _buf;
- const size_t _buflen;
-
-#ifndef __INSIDE_CYGWIN__
- void handle (transport_layer_base *, process_cache *);
- virtual void serve (transport_layer_base *, process_cache *) = 0;
-#endif
-};
-
-/*---------------------------------------------------------------------------*
- * class client_request_get_version
- *---------------------------------------------------------------------------*/
-
-class client_request_get_version : public client_request
-{
-private:
- struct request_get_version
- {
- DWORD major, api, minor, patch;
- } CYGSERVER_PACKED;
-
-public:
- client_request_get_version ();
- bool check_version () const;
-
-private:
- struct request_get_version version;
-
-#ifndef __INSIDE_CYGWIN__
- virtual void serve (transport_layer_base *, process_cache *);
-#endif
-};
-
-/*---------------------------------------------------------------------------*
- * class client_request_shutdown
- *
- * Nb. This whole class is only !__INSIDE_CYGWIN__ since it is used
- * solely by cygserver itself.
- *---------------------------------------------------------------------------*/
-
-#ifndef __INSIDE_CYGWIN__
-
-class client_request_shutdown : public client_request
-{
-public:
- client_request_shutdown ();
-
-private:
- virtual void serve (transport_layer_base *, process_cache *);
-};
-
-#endif /* !__INSIDE_CYGWIN__ */
-
-/*---------------------------------------------------------------------------*
- * class client_request_attach_tty
- *---------------------------------------------------------------------------*/
-
-class client_request_attach_tty : public client_request
-{
-private:
- struct request_attach_tty
- {
- DWORD pid, master_pid;
- HANDLE from_master, to_master;
- } CYGSERVER_PACKED;
-
-public:
-#ifdef __INSIDE_CYGWIN__
- client_request_attach_tty (DWORD nmaster_pid,
- HANDLE nfrom_master, HANDLE nto_master);
-#else
- client_request_attach_tty ();
-#endif
-
- HANDLE from_master () const { return req.from_master; };
- HANDLE to_master () const { return req.to_master; };
-
-protected:
- virtual void send (transport_layer_base *);
-
-private:
- struct request_attach_tty req;
-
-#ifndef __INSIDE_CYGWIN__
- virtual void serve (transport_layer_base *, process_cache *);
-#endif
-};
-
-#ifndef __INSIDE_CYGWIN__
-extern PSID admininstrator_group_sid;
-#endif
-
-extern bool check_cygserver_available ();
-extern void cygserver_init ();
-
-#endif /* _CYGSERVER_H_ */
diff --git a/winsup/cygwin/cygserver_ipc.h b/winsup/cygwin/cygserver_ipc.h
deleted file mode 100644
index d25a3bd..0000000
--- a/winsup/cygwin/cygserver_ipc.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* cygserver_ipc.h
-
- Copyright 2002, 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. */
-
-#ifndef __CYGSERVER_IPC_H__
-#define __CYGSERVER_IPC_H__
-
-/*
- * Datastructure which is part of any IPC input parameter block.
- */
-struct vmspace {
- void *vm_map; /* UNUSED */
- struct shmmap_state *vm_shm;
-};
-
-struct proc {
- pid_t cygpid;
- DWORD winpid;
- __uid32_t uid;
- __gid32_t gid;
- int gidcnt;
- __gid32_t *gidlist;
- bool is_admin;
- struct vmspace *p_vmspace;
- HANDLE signal_arrived;
-};
-
-#ifdef __INSIDE_CYGWIN__
-inline void
-ipc_set_proc_info (proc &blk)
-{
- blk.cygpid = getpid ();
- blk.winpid = GetCurrentProcessId ();
- blk.uid = geteuid32 ();
- blk.gid = getegid32 ();
- blk.gidcnt = 0;
- blk.gidlist = NULL;
- blk.is_admin = false;
- blk.signal_arrived = signal_arrived;
-}
-#endif /* __INSIDE_CYGWIN__ */
-
-#ifndef __INSIDE_CYGWIN__
-class ipc_retval {
-private:
- union {
- int i;
- unsigned int u;
- vm_offset_t off;
- vm_object_t obj;
- };
-
-public:
- ipc_retval (int ni) { i = ni; }
-
- operator int () const { return i; }
- int operator = (int ni) { return i = ni; }
-
- operator unsigned int () const { return u; }
- unsigned int operator = (unsigned int nu) { return u = nu; }
-
- operator vm_offset_t () const { return off; }
- vm_offset_t operator = (vm_offset_t noff) { return off = noff; }
-
- operator vm_object_t () const { return obj; }
- vm_object_t operator = (vm_object_t nobj) { return obj = nobj; }
-};
-
-struct thread {
- class process *client;
- proc *ipcblk;
- ipc_retval td_retval[2];
-};
-#define td_proc ipcblk
-#define p_pid cygpid
-#endif
-
-#endif /* __CYGSERVER_IPC_H__ */
diff --git a/winsup/cygwin/cygserver_msg.h b/winsup/cygwin/cygserver_msg.h
deleted file mode 100644
index 37616bb..0000000
--- a/winsup/cygwin/cygserver_msg.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* cygserver_msg.h: Single unix specification IPC interface for Cygwin.
-
- Copyright 2003, 2008 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 __CYGSERVER_MSG_H__
-#define __CYGSERVER_MSG_H__
-
-#include <sys/types.h>
-#include <sys/sysproto.h>
-#ifndef _KERNEL
-#define _KERNEL 1
-#endif
-#include <cygwin/msg.h>
-
-#include "cygserver.h"
-#include "cygserver_ipc.h"
-
-#ifndef __INSIDE_CYGWIN__
-class transport_layer_base;
-class process_cache;
-#endif
-
-class client_request_msg : public client_request
-{
- friend class client_request;
-
-public:
- enum msgop_t
- {
- MSGOP_msgctl,
- MSGOP_msgget,
- MSGOP_msgrcv,
- MSGOP_msgsnd
- };
-
-private:
- union
- {
- struct
- {
- msgop_t msgop;
- proc ipcblk;
- union
- {
- struct msgctl_args ctlargs;
- struct msgget_args getargs;
- struct msgrcv_args rcvargs;
- struct msgsnd_args sndargs;
- };
- } in;
-
- union {
- int ret;
- ssize_t rcv;
- } out;
- } _parameters;
-
-#ifndef __INSIDE_CYGWIN__
- client_request_msg ();
- virtual void serve (transport_layer_base *, process_cache *);
-#endif
-
-public:
-
-#ifdef __INSIDE_CYGWIN__
- client_request_msg (int, int, struct msqid_ds *); // msgctl
- client_request_msg (key_t, int); // msgget
- client_request_msg (int, void *, size_t, long, int); // msgrcv
- client_request_msg (int, const void *, size_t, int); // msgsnd
-#endif
-
- int retval () const { return msglen () ? _parameters.out.ret : -1; }
- ssize_t rcvval () const { return _parameters.out.rcv; }
-};
-
-#ifndef __INSIDE_CYGWIN__
-int msginit ();
-int msgunload ();
-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 *);
-#endif
-
-#endif /* __CYGSERVER_MSG_H__ */
diff --git a/winsup/cygwin/cygserver_sem.h b/winsup/cygwin/cygserver_sem.h
deleted file mode 100644
index fdf6f8c..0000000
--- a/winsup/cygwin/cygserver_sem.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* cygserver_sem.h: Single unix specification IPC interface for Cygwin.
-
- Copyright 2003, 2008 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 __CYGSERVER_SEM_H__
-#define __CYGSERVER_SEM_H__
-
-#include <sys/types.h>
-#include <sys/sysproto.h>
-#ifndef _KERNEL
-#define _KERNEL 1
-#endif
-#include <cygwin/sem.h>
-
-#include "cygserver.h"
-#include "cygserver_ipc.h"
-
-#ifndef __INSIDE_CYGWIN__
-class transport_layer_base;
-class process_cache;
-#endif
-
-class client_request_sem : public client_request
-{
- friend class client_request;
-
-public:
- enum semop_t
- {
- SEMOP_semctl,
- SEMOP_semget,
- SEMOP_semop
- };
-
-private:
- union
- {
- struct
- {
- semop_t semop;
- proc ipcblk;
- union
- {
- struct semctl_args ctlargs;
- struct semget_args getargs;
- struct semop_args opargs;
- };
- } in;
-
- union {
- int ret;
- } out;
- } _parameters;
-
-#ifndef __INSIDE_CYGWIN__
- client_request_sem ();
- virtual void serve (transport_layer_base *, process_cache *);
-#endif
-
-public:
-
-#ifdef __INSIDE_CYGWIN__
- client_request_sem (int, int, int, union semun *); // semctl
- client_request_sem (key_t, int, int); // semget
- client_request_sem (int, struct sembuf *, size_t); // semop
-#endif
-
- int retval () const { return msglen () ? _parameters.out.ret : -1; }
-};
-
-#ifndef __INSIDE_CYGWIN__
-int seminit ();
-int semunload ();
-void semexit_myhook(void *arg, struct proc *p);
-
-int semctl (struct thread *, struct semctl_args *);
-int semget (struct thread *, struct semget_args *);
-int semop (struct thread *, struct semop_args *);
-#endif
-
-#endif /* __CYGSERVER_SEM_H__ */
diff --git a/winsup/cygwin/cygserver_setpwd.h b/winsup/cygwin/cygserver_setpwd.h
deleted file mode 100644
index 94ee299..0000000
--- a/winsup/cygwin/cygserver_setpwd.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* cygserver_setpwd.h: Set LSA private data password for current user.
-
- Copyright 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef __CYGSERVER_SETPWD_H__
-#define __CYGSERVER_SETPWD_H__
-
-#include <sys/types.h>
-#include "cygserver.h"
-
-#define CYGWIN_LSA_KEY_PREFIX L"L$CYGWIN_"
-
-#ifndef __INSIDE_CYGWIN__
-class transport_layer_base;
-class process_cache;
-#endif
-
-class client_request_setpwd : public client_request
-{
- friend class client_request;
-
-private:
- union
- {
- struct
- {
- WCHAR passwd[256];
- } in;
- } _parameters;
-
-#ifndef __INSIDE_CYGWIN__
- client_request_setpwd ();
- virtual void serve (transport_layer_base *, process_cache *);
-#endif
-
-public:
-
-#ifdef __INSIDE_CYGWIN__
- client_request_setpwd (PUNICODE_STRING);
-#endif
-};
-
-#ifdef __INSIDE_CYGWIN__
-unsigned long setlsapwd (const char *passwd);
-#endif
-
-#endif /* __CYGSERVER_SETPWD_H__ */
diff --git a/winsup/cygwin/cygserver_shm.h b/winsup/cygwin/cygserver_shm.h
deleted file mode 100644
index baa3e05..0000000
--- a/winsup/cygwin/cygserver_shm.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* cygserver_shm.h: Single unix specification IPC interface for Cygwin.
-
- Copyright 2003, 2008 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 __CYGSERVER_SHM_H__
-#define __CYGSERVER_SHM_H__
-
-#include <sys/types.h>
-#include <sys/sysproto.h>
-#ifndef _KERNEL
-#define _KERNEL 1
-#endif
-#include <cygwin/shm.h>
-
-#include "cygserver.h"
-#include "cygserver_ipc.h"
-
-#ifndef __INSIDE_CYGWIN__
-class transport_layer_base;
-class process_cache;
-#endif
-
-class client_request_shm : public client_request
-{
- friend class client_request;
-
-public:
- enum shmop_t
- {
- SHMOP_shmat,
- SHMOP_shmctl,
- SHMOP_shmdt,
- SHMOP_shmget,
- SHMOP_shmfork /* Called on fixup_after_fork */
- };
-
-private:
- union
- {
- struct
- {
- shmop_t shmop;
- proc ipcblk;
- struct shmat_args atargs;
- struct shmctl_args ctlargs;
- struct shmdt_args dtargs;
- struct shmget_args getargs;
- struct proc forkargs;
- } in;
-
- struct {
- union {
- int ret;
- vm_offset_t ptr;
- };
- vm_object_t obj;
- } out;
- } _parameters;
-
-#ifndef __INSIDE_CYGWIN__
- client_request_shm ();
- virtual void serve (transport_layer_base *, process_cache *);
-#endif
-
-public:
-
-#ifdef __INSIDE_CYGWIN__
- client_request_shm (int, const void *, int); // shmat
- client_request_shm (int, int, struct shmid_ds *); // shmctl
- client_request_shm (const void *); // shmdt
- client_request_shm (key_t, size_t, int); // shmget
- client_request_shm (proc *); // shmfork
-#endif
-
- int retval () const { return msglen () ? _parameters.out.ret : -1; }
- void *ptrval () const { return (void *)_parameters.out.ptr; }
- vm_object_t objval () const { return _parameters.out.obj; }
-};
-
-#ifndef __INSIDE_CYGWIN__
-void shminit ();
-int shmunload ();
-void shmexit_myhook (struct vmspace *vm);
-int cygwin_shmfork_myhook (struct thread *, struct proc *);
-
-int shmat (struct thread *, struct shmat_args *);
-int shmctl (struct thread *, struct shmctl_args *);
-int shmdt (struct thread *, struct shmdt_args *);
-int shmget (struct thread *, struct shmget_args *);
-#endif
-
-#endif /* __CYGSERVER_SHM_H__ */
diff --git a/winsup/cygwin/cygthread.cc b/winsup/cygwin/cygthread.cc
deleted file mode 100644
index 4c674ed..0000000
--- a/winsup/cygwin/cygthread.cc
+++ /dev/null
@@ -1,510 +0,0 @@
-/* cygthread.cc
-
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Red Hat, Inc.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "miscfuncs.h"
-#include <stdlib.h>
-#include "sigproc.h"
-#include "thread.h"
-#include "cygtls.h"
-
-#undef CloseHandle
-
-static cygthread NO_COPY threads[32];
-#define NTHREADS (sizeof (threads) / sizeof (threads[0]))
-
-DWORD NO_COPY cygthread::main_thread_id;
-bool NO_COPY cygthread::exiting;
-
-void
-cygthread::callfunc (bool issimplestub)
-{
- void *pass_arg;
- if (arg == cygself)
- pass_arg = this;
- else if (!arglen)
- pass_arg = arg;
- else
- {
- if (issimplestub)
- ev = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL);
- pass_arg = alloca (arglen);
- memcpy (pass_arg, arg, arglen);
- SetEvent (ev);
- }
- if (issimplestub)
- {
- /* Wait for main thread to assign 'h' */
- while (!h)
- low_priority_sleep (0);
- if (ev)
- CloseHandle (ev);
- ev = h;
- }
- /* Cygwin threads should not call ExitThread directly */
- func (pass_arg);
- /* ...so the above should always return */
-}
-
-/* Initial stub called by cygthread constructor. Performs initial
- per-thread initialization and loops waiting for another thread function
- to execute. */
-DWORD WINAPI
-cygthread::stub (VOID *arg)
-{
- cygthread *info = (cygthread *) arg;
- _my_tls._ctinfo = info;
- if (info->arg == cygself)
- {
- if (info->ev)
- {
- CloseHandle (info->ev);
- CloseHandle (info->thread_sync);
- }
- info->ev = info->thread_sync = info->stack_ptr = NULL;
- }
- else
- {
- info->stack_ptr = &arg;
- debug_printf ("thread '%s', id %p, stack_ptr %p", info->name (), info->id, info->stack_ptr);
- if (!info->ev)
- {
- info->ev = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL);
- info->thread_sync = CreateEvent (&sec_none_nih, FALSE, FALSE, NULL);
- }
- }
-
- while (1)
- {
- if (!info->__name)
-#ifdef DEBUGGING
- system_printf ("erroneous thread activation, name is NULL prev thread name = '%s'", info->__oldname);
-#else
- system_printf ("erroneous thread activation, name is NULL");
-#endif
- else
- {
- if (exiting)
- {
- info->inuse = false; // FIXME: Do we need this?
- return 0;
- }
-
- info->callfunc (false);
-
- HANDLE notify = info->notify_detached;
- /* If func is NULL, the above function has set that to indicate
- that it doesn't want to alert anyone with a SetEvent and should
- just be marked as no longer inuse. Hopefully the function knows
- what it is doing. */
- if (!info->func)
- info->release (false);
- else
- {
-#ifdef DEBUGGING
- info->func = NULL; // catch erroneous activation
- info->__oldname = info->__name;
-#endif
- info->__name = NULL;
- SetEvent (info->ev);
- }
- if (notify)
- SetEvent (notify);
- }
- switch (WaitForSingleObject (info->thread_sync, INFINITE))
- {
- case WAIT_OBJECT_0:
- continue;
- default:
- api_fatal ("WFSO failed, %E");
- break;
- }
- }
-}
-
-/* Overflow stub called by cygthread constructor. Calls specified function
- and then exits the thread. */
-DWORD WINAPI
-cygthread::simplestub (VOID *arg)
-{
- cygthread *info = (cygthread *) arg;
- _my_tls._ctinfo = info;
- info->stack_ptr = &arg;
- info->callfunc (true);
- return 0;
-}
-
-/* Start things going. Called from dll_crt0_1. */
-void
-cygthread::init ()
-{
- main_thread_id = GetCurrentThreadId ();
-}
-
-cygthread *
-cygthread::freerange ()
-{
- cygthread *self = (cygthread *) calloc (1, sizeof (*self));
- self->is_freerange = true;
- self->inuse = 1;
- return self;
-}
-
-void * cygthread::operator
-new (size_t)
-{
- cygthread *info;
-
- /* Search the threads array for an empty slot to use */
- for (info = threads; info < threads + NTHREADS; info++)
- if (!InterlockedExchange (&info->inuse, 1))
- {
- /* available */
-#ifdef DEBUGGING
- if (info->__name)
- api_fatal ("name not NULL? %s, id %p, i %d", info->__name, info->id, info - threads);
-#endif
- goto out;
- }
-
-#ifdef DEBUGGING
- if (!getenv ("CYGWIN_FREERANGE_NOCHECK"))
- api_fatal ("overflowed cygwin thread pool");
- else
- thread_printf ("overflowed cygwin thread pool");
-#endif
-
- info = freerange (); /* exhausted thread pool */
-
-out:
- return info;
-}
-
-cygthread::cygthread (LPTHREAD_START_ROUTINE start, size_t n, void *param,
- const char *name, HANDLE notify)
- : __name (name), func (start), arglen (n), arg (param), notify_detached (notify)
-{
- thread_printf ("name %s, id %p", name, id);
- HANDLE htobe;
- if (h)
- {
- if (ev)
- ResetEvent (ev);
- while (!thread_sync)
- low_priority_sleep (0);
- SetEvent (thread_sync);
- thread_printf ("activated name '%s', thread_sync %p for thread %p", name, thread_sync, id);
- htobe = h;
- }
- else
- {
- stack_ptr = NULL;
- htobe = CreateThread (&sec_none_nih, 0, is_freerange ? simplestub : stub,
- this, 0, &id);
- if (!htobe)
- api_fatal ("CreateThread failed for %s - %p<%p>, %E", name, h, id);
- thread_printf ("created name '%s', thread %p, id %p", name, h, id);
-#ifdef DEBUGGING
- terminated = false;
-#endif
- }
-
- if (n)
- {
- while (!ev)
- low_priority_sleep (0);
- WaitForSingleObject (ev, INFINITE);
- ResetEvent (ev);
- }
- h = htobe;
-}
-
-/* Return the symbolic name of the current thread for debugging.
- */
-const char *
-cygthread::name (DWORD tid)
-{
- const char *res = NULL;
- if (!tid)
- tid = GetCurrentThreadId ();
-
- if (tid == main_thread_id)
- return "main";
-
- for (DWORD i = 0; i < NTHREADS; i++)
- if (threads[i].id == tid)
- {
- res = threads[i].__name ?: "exiting thread";
- break;
- }
-
- if (!res)
- {
- __small_sprintf (_my_tls.locals.unknown_thread_name, "unknown (%p)", tid);
- res = _my_tls.locals.unknown_thread_name;
- }
-
- return res;
-}
-
-cygthread::operator
-HANDLE ()
-{
- while (!ev)
- low_priority_sleep (0);
- return ev;
-}
-
-void
-cygthread::release (bool nuke_h)
-{
- if (nuke_h)
- h = NULL;
-#ifdef DEBUGGING
- __oldname = __name;
- debug_printf ("released thread '%s'", __oldname);
-#endif
- __name = NULL;
- func = NULL;
- /* Must be last */
- if (!InterlockedExchange (&inuse, 0))
-#ifdef DEBUGGING
- api_fatal ("released a thread that was not inuse");
-#else
- system_printf ("released a thread that was not inuse");
-#endif
-}
-
-/* Forcibly terminate a thread. */
-bool
-cygthread::terminate_thread ()
-{
- bool terminated = true;
- debug_printf ("thread '%s', id %p, inuse %d, stack_ptr %p", __name, id, inuse, stack_ptr);
- while (inuse && !stack_ptr)
- low_priority_sleep (0);
-
- if (!inuse)
- goto force_notterminated;
-
- TerminateThread (h, 0);
- WaitForSingleObject (h, INFINITE);
- CloseHandle (h);
-
- if (!inuse || exiting)
- goto force_notterminated;
-
- if (ev && !(terminated = WaitForSingleObject (ev, 0) != WAIT_OBJECT_0))
- ResetEvent (ev);
-
- MEMORY_BASIC_INFORMATION m;
- memset (&m, 0, sizeof (m));
- VirtualQuery (stack_ptr, &m, sizeof m);
-
- if (!m.RegionSize)
- system_printf ("m.RegionSize 0? stack_ptr %p", stack_ptr);
- else if (!VirtualFree (m.AllocationBase, 0, MEM_RELEASE))
- debug_printf ("VirtualFree of allocation base %p<%p> failed, %E",
- stack_ptr, m.AllocationBase);
-
- if (is_freerange)
- free (this);
- else
- {
-#ifdef DEBUGGING
- terminated = true;
-#endif
- release (true);
- }
-
- goto out;
-
-force_notterminated:
- terminated = false;
-out:
- return terminated;
-}
-
-/* Detach the cygthread from the current thread. Note that the
- theory is that cygthreads are only associated with one thread.
- So, there should be never be multiple threads doing waits
- on the same cygthread. */
-bool
-cygthread::detach (HANDLE sigwait)
-{
- bool signalled = false;
- bool thread_was_reset = false;
- if (!inuse)
- system_printf ("called detach but inuse %d, thread %p?", inuse, id);
- else
- {
- DWORD res;
-
- if (!sigwait)
- /* If the caller specified a special handle for notification, wait for that.
- This assumes that the thread in question is auto releasing. */
- res = WaitForSingleObject (*this, INFINITE);
- else
- {
- /* Lower our priority and give priority to the read thread */
- HANDLE hth = GetCurrentThread ();
- LONG prio = GetThreadPriority (hth);
- ::SetThreadPriority (hth, THREAD_PRIORITY_BELOW_NORMAL);
-
- HANDLE w4[2];
- unsigned n = 2;
- DWORD howlong = INFINITE;
- w4[0] = sigwait;
- w4[1] = signal_arrived;
- /* For a description of the below loop see the end of this file */
- for (int i = 0; i < 2; i++)
- switch (res = WaitForMultipleObjects (n, w4, FALSE, howlong))
- {
- case WAIT_OBJECT_0:
- if (n == 1)
- howlong = 50;
- break;
- case WAIT_OBJECT_0 + 1:
- n = 1;
- if (i--)
- howlong = 50;
- break;
- case WAIT_TIMEOUT:
- break;
- default:
- if (!exiting)
- {
- system_printf ("WFMO failed waiting for cygthread '%s', %E", __name);
- for (unsigned j = 0; j < n; j++)
- switch (WaitForSingleObject (w4[j], 0))
- {
- case WAIT_OBJECT_0:
- case WAIT_TIMEOUT:
- break;
- default:
- system_printf ("%s handle %p is bad", (j ? "signal_arrived" : "semaphore"), w4[j]);
- break;
- }
- api_fatal ("exiting on fatal error");
- }
- break;
- }
- /* WAIT_OBJECT_0 means that the thread successfully read something,
- so wait for the cygthread to "terminate". */
- if (res == WAIT_OBJECT_0)
- WaitForSingleObject (*this, INFINITE);
- else
- {
- /* Thread didn't terminate on its own, so maybe we have to
- do it. */
- signalled = terminate_thread ();
- /* Possibly the thread completed *just* before it was
- terminated. Detect this. If this happened then the
- read was not terminated on a signal. */
- if (WaitForSingleObject (sigwait, 0) == WAIT_OBJECT_0)
- signalled = false;
- if (signalled)
- set_sig_errno (EINTR);
- thread_was_reset = true;
- }
- ::SetThreadPriority (hth, prio);
- }
-
- thread_printf ("%s returns %d, id %p", sigwait ? "WFMO" : "WFSO",
- res, id);
-
- if (thread_was_reset)
- /* already handled */;
- else if (is_freerange)
- {
- CloseHandle (h);
- free (this);
- }
- else
- {
- ResetEvent (*this);
- /* Mark the thread as available by setting inuse to zero */
- InterlockedExchange (&inuse, 0);
- }
- }
- return signalled;
-}
-
-void
-cygthread::terminate ()
-{
- exiting = 1;
-}
-
-/* The below is an explanation of synchronization loop in cygthread::detach.
- The intent is that the loop will always try hard to wait for both
- synchronization events from the reader thread but will exit with
- res == WAIT_TIMEOUT if a signal occurred and the reader thread is
- still blocked.
-
- case 0 - no signal
-
- i == 0 (howlong == INFINITE)
- W0 activated
- howlong not set because n != 1
- just loop
-
- i == 1 (howlong == INFINITE)
- W0 activated
- howlong not set because n != 1
- just loop (to exit loop) - no signal
-
- i == 2 (howlong == INFINITE)
- exit loop
-
- case 1 - signal before thread initialized
-
- i == 0 (howlong == INFINITE)
- WO + 1 activated
- n set to 1
- howlong untouched because i-- == 0
- loop
-
- i == 0 (howlong == INFINITE)
- W0 must be activated
- howlong set to 50 because n == 1
-
- i == 1 (howlong == 50)
- W0 activated
- loop (to exit loop) - no signal
-
- WAIT_TIMEOUT activated
- signal potentially detected
- loop (to exit loop)
-
- i == 2 (howlong == 50)
- exit loop
-
- case 2 - signal after thread initialized
-
- i == 0 (howlong == INFINITE)
- W0 activated
- howlong not set because n != 1
- loop
-
- i == 1 (howlong == INFINITE)
- W0 + 1 activated
- n set to 1
- howlong set to 50 because i-- != 0
- loop
-
- i == 1 (howlong == 50)
- W0 activated
- loop (to exit loop) - no signal
-
- WAIT_TIMEOUT activated
- loop (to exit loop) - signal
-
- i == 2 (howlong == 50)
- exit loop
-*/
diff --git a/winsup/cygwin/cygthread.h b/winsup/cygwin/cygthread.h
deleted file mode 100644
index da7172e..0000000
--- a/winsup/cygwin/cygthread.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* cygthread.h
-
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Red Hat, Inc.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGTHREAD_H
-#define _CYGTHREAD_H
-
-class cygthread
-{
- LONG inuse;
- DWORD id;
- HANDLE h;
- HANDLE ev;
- HANDLE thread_sync;
- void *stack_ptr;
- const char *__name;
-#ifdef DEBUGGING
- const char *__oldname;
- bool terminated;
-#endif
- LPTHREAD_START_ROUTINE func;
- unsigned arglen;
- VOID *arg;
- bool is_freerange;
- static bool exiting;
- HANDLE notify_detached;
- public:
- bool terminate_thread ();
- static DWORD WINAPI stub (VOID *);
- static DWORD WINAPI simplestub (VOID *);
- static DWORD main_thread_id;
- static const char * name (DWORD = 0);
- void callfunc (bool) __attribute__ ((noinline, regparm (2)));
- void auto_release () {func = NULL;}
- void release (bool);
- cygthread (LPTHREAD_START_ROUTINE, unsigned, LPVOID, const char *, HANDLE = NULL);
- cygthread () {};
- static void init ();
- bool detach (HANDLE = NULL);
- operator HANDLE ();
- void * operator new (size_t);
- static cygthread *freerange ();
- static void terminate ();
- bool SetThreadPriority (int nPriority) {return ::SetThreadPriority (h, nPriority);}
- void zap_h ()
- {
- CloseHandle (h);
- h = NULL;
- }
-};
-
-#define cygself NULL
-#endif /*_CYGTHREAD_H*/
diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc
deleted file mode 100644
index 3d15ae6..0000000
--- a/winsup/cygwin/cygtls.cc
+++ /dev/null
@@ -1,246 +0,0 @@
-/* cygtls.cc
-
- Copyright 2003, 2004, 2005, 2006, 2007, 2008 Red Hat, Inc.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#define USE_SYS_TYPES_FD_SET
-#include "thread.h"
-#include "cygtls.h"
-#include <syslog.h>
-#include <malloc.h>
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "sigproc.h"
-
-class sentry
-{
- static muto lock;
- int destroy;
-public:
- void init ();
- bool acquired () {return lock.acquired ();}
- sentry () {destroy = 0;}
- sentry (DWORD wait) {destroy = lock.acquire (wait);}
- ~sentry () {if (destroy) lock.release ();}
- friend void _cygtls::init ();
-};
-
-muto NO_COPY sentry::lock;
-
-static size_t NO_COPY nthreads;
-
-#define THREADLIST_CHUNK 256
-
-void
-_cygtls::init ()
-{
- if (cygheap->threadlist)
- memset (cygheap->threadlist, 0, cygheap->sthreads * sizeof (cygheap->threadlist[0]));
- else
- {
- cygheap->sthreads = THREADLIST_CHUNK;
- cygheap->threadlist = (_cygtls **) ccalloc_abort (HEAP_TLS, cygheap->sthreads,
- sizeof (cygheap->threadlist[0]));
- }
- sentry::lock.init ("sentry_lock");
-}
-
-/* Two calls to get the stack right... */
-void
-_cygtls::call (DWORD (*func) (void *, void *), void *arg)
-{
- char buf[CYGTLS_PADSIZE];
- _my_tls.call2 (func, arg, buf);
-}
-
-void
-_cygtls::call2 (DWORD (*func) (void *, void *), void *arg, void *buf)
-{
- init_thread (buf, func);
- DWORD res = func (arg, buf);
- remove (INFINITE);
- /* Don't call ExitThread on the main thread since we may have been
- dynamically loaded. */
- if ((void *) func != (void *) dll_crt0_1
- && (void *) func != (void *) dll_dllcrt0_1)
- ExitThread (res);
-}
-
-void
-_cygtls::init_thread (void *x, DWORD (*func) (void *, void *))
-{
- if (x)
- {
- memset (this, 0, sizeof (*this));
- stackptr = stack;
- if (_GLOBAL_REENT)
- {
- local_clib._stdin = _GLOBAL_REENT->_stdin;
- local_clib._stdout = _GLOBAL_REENT->_stdout;
- local_clib._stderr = _GLOBAL_REENT->_stderr;
- local_clib.__sdidinit = _GLOBAL_REENT->__sdidinit ? -1 : 0;
- local_clib.__cleanup = _GLOBAL_REENT->__cleanup;
- local_clib.__sglue._niobs = 3;
- local_clib.__sglue._iobs = &_GLOBAL_REENT->__sf[0];
- }
- local_clib._current_locale = "C";
- locals.process_logmask = LOG_UPTO (LOG_DEBUG);
- /* Initialize this thread's ability to respond to things like
- SIGSEGV or SIGFPE. */
- init_exception_handler (handle_exceptions);
- }
-
- thread_id = GetCurrentThreadId ();
- initialized = CYGTLS_INITIALIZED;
- locals.select_sockevt = INVALID_HANDLE_VALUE;
- errno_addr = &(local_clib._errno);
-
- if ((void *) func == (void *) cygthread::stub
- || (void *) func == (void *) cygthread::simplestub)
- return;
-
- cygheap->user.reimpersonate ();
-
- sentry here (INFINITE);
- if (nthreads >= cygheap->sthreads)
- {
- cygheap->threadlist = (_cygtls **)
- crealloc_abort (cygheap->threadlist, (cygheap->sthreads += THREADLIST_CHUNK)
- * sizeof (cygheap->threadlist[0]));
- memset (cygheap->threadlist + nthreads, 0, THREADLIST_CHUNK * sizeof (cygheap->threadlist[0]));
- }
-
- cygheap->threadlist[nthreads++] = this;
-}
-
-void
-_cygtls::fixup_after_fork ()
-{
- if (sig)
- {
- pop ();
- sig = 0;
- }
- stacklock = spinning = 0;
- locals.select_sockevt = INVALID_HANDLE_VALUE;
- wq.thread_ev = NULL;
-}
-
-#define free_local(x) \
- if (locals.x) \
- { \
- free (locals.x); \
- locals.x = NULL; \
- }
-
-void
-_cygtls::remove (DWORD wait)
-{
- initialized = 0;
- if (!locals.select_sockevt || exit_state >= ES_FINAL)
- return;
-
- debug_printf ("wait %p", wait);
- if (wait)
- {
- /* FIXME: Need some sort of atthreadexit function to allow things like
- select to control this themselves. */
- if (locals.select_sockevt != INVALID_HANDLE_VALUE)
- {
- CloseHandle (locals.select_sockevt);
- locals.select_sockevt = (HANDLE) NULL;
- }
- free_local (process_ident);
- free_local (ntoa_buf);
- free_local (protoent_buf);
- free_local (servent_buf);
- free_local (hostent_buf);
- }
-
- /* Free temporary TLS path buffers. */
- locals.pathbufs.destroy ();
-
- do
- {
- sentry here (wait);
- if (here.acquired ())
- {
- for (size_t i = 0; i < nthreads; i++)
- if (this == cygheap->threadlist[i])
- {
- if (i < --nthreads)
- cygheap->threadlist[i] = cygheap->threadlist[nthreads];
- debug_printf ("removed %p element %d", this, i);
- break;
- }
- }
- } while (0);
- remove_wq (wait);
-}
-
-void
-_cygtls::push (__stack_t addr)
-{
- *stackptr++ = (__stack_t) addr;
-}
-
-
-_cygtls *
-_cygtls::find_tls (int sig)
-{
- static int NO_COPY threadlist_ix;
-
- debug_printf ("sig %d\n", sig);
- sentry here (INFINITE);
-
- _cygtls *res = NULL;
- threadlist_ix = -1;
-
- myfault efault;
- if (efault.faulted ())
- cygheap->threadlist[threadlist_ix]->remove (INFINITE);
-
- while (++threadlist_ix < (int) nthreads)
- if (sigismember (&(cygheap->threadlist[threadlist_ix]->sigwait_mask), sig))
- {
- res = cygheap->threadlist[threadlist_ix];
- break;
- }
- return res;
-}
-
-void
-_cygtls::set_siginfo (sigpacket *pack)
-{
- infodata = pack->si;
-}
-
-/* Set up the exception handler for the current thread. The x86 uses segment
- register fs, offset 0 to point to the current exception handler. */
-
-extern exception_list *_except_list asm ("%fs:0");
-
-void
-_cygtls::init_exception_handler (exception_handler *eh)
-{
- el.handler = eh;
- /* Apparently Windows stores some information about an exception and tries
- to figure out if the SEH which returned 0 last time actually solved the
- problem, or if the problem still persists (e.g. same exception at same
- address). In this case Windows seems to decide that it can't trust
- that SEH and calls the next handler in the chain instead.
-
- At one point this was a loop (el.prev = &el;). This outsmarted the
- above behaviour. Unfortunately this trick doesn't work anymore with
- Windows 2008, which irremediably gets into an endless loop, taking 100%
- CPU. That's why we reverted to a normal SEH chain and changed the way
- the exception handler returns to the application. */
- el.prev = _except_list;
- _except_list = &el;
-}
diff --git a/winsup/cygwin/cygtls.h b/winsup/cygwin/cygtls.h
deleted file mode 100644
index 7aee1ae..0000000
--- a/winsup/cygwin/cygtls.h
+++ /dev/null
@@ -1,307 +0,0 @@
-/* cygtls.h
-
- Copyright 2003, 2004, 2005, 2008 Red Hat, Inc.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGTLS_H
-#define _CYGTLS_H
-
-#include <signal.h>
-#include <pwd.h>
-#include <grp.h>
-#include <sys/time.h>
-#define _NOMNTENT_FUNCS
-#include <mntent.h>
-#undef _NOMNTENT_FUNCS
-#include <setjmp.h>
-#include <exceptions.h>
-
-#define CYGTLS_INITIALIZED 0xc763173f
-
-#ifndef CYG_MAX_PATH
-# define CYG_MAX_PATH 260
-#endif
-
-#ifndef UNLEN
-# define UNLEN 256
-#endif
-
-#define TLS_STACK_SIZE 256
-
-#include "cygthread.h"
-
-#define TP_NUM_C_BUFS 10
-#define TP_NUM_W_BUFS 10
-
-#pragma pack(push,4)
-/* Defined here to support auto rebuild of tlsoffsets.h. */
-class tls_pathbuf
-{
- int c_cnt;
- int w_cnt;
- char *c_buf[TP_NUM_C_BUFS];
- WCHAR *w_buf[TP_NUM_W_BUFS];
-
-public:
- void destroy ();
- friend class tmp_pathbuf;
- friend class _cygtls;
-};
-
-class unionent
-{
-public:
- char *name;
- char **list;
- short port_proto_addrtype;
- short h_len;
- union
- {
- char *s_proto;
- char **h_addr_list;
- };
- enum struct_type
- {
- t_hostent, t_protoent, t_servent
- };
-};
-
-struct _local_storage
-{
- /*
- Needed for the group functions
- */
- struct __group16 grp;
- char *namearray[2];
- int grp_pos;
-
- /* console.cc */
- unsigned rarg;
-
- /* dlfcn.cc */
- int dl_error;
- char dl_buffer[256];
-
- /* passwd.cc */
- struct passwd res;
- char pass[_PASSWORD_LEN];
- int pw_pos;
-
- /* path.cc */
- struct mntent mntbuf;
- int iteration;
- unsigned available_drives;
- char mnt_type[80];
- char mnt_opts[80];
- char mnt_fsname[CYG_MAX_PATH];
- char mnt_dir[CYG_MAX_PATH];
-
- /* select.cc */
- HANDLE select_sockevt;
-
- /* strerror */
- char strerror_buf[sizeof ("Unknown error 4294967295")];
-
- /* sysloc.cc */
- char *process_ident; // note: malloced
- int process_logopt;
- int process_facility;
- int process_logmask;
-
- /* times.cc */
- char timezone_buf[20];
- struct tm _localtime_buf;
-
- /* uinfo.cc */
- char username[UNLEN + 1];
-
- /* net.cc */
- char *ntoa_buf; // note: malloced
- char signamebuf[sizeof ("Unknown signal 4294967295 ")];
-
- unionent *hostent_buf; // note: malloced
- unionent *protoent_buf; // note: malloced
- unionent *servent_buf; // note: malloced
-
- /* cygthread.cc */
- char unknown_thread_name[30];
-
- /* syscalls.cc */
- int setmode_file;
- int setmode_mode;
-
- /* All functions requiring temporary path buffers. */
- tls_pathbuf pathbufs;
-};
-
-typedef struct struct_waitq
-{
- int pid;
- int options;
- int status;
- HANDLE ev;
- void *rusage; /* pointer to potential rusage */
- struct struct_waitq *next;
- HANDLE thread_ev;
-} waitq;
-
-typedef struct
-{
- void *_myfault;
- int _myfault_errno;
- int _myfault_c_cnt;
- int _myfault_w_cnt;
-} san;
-
-/* Changes to the below structure may require acompanying changes to the very
- simple parser in the perl script 'gentls_offsets' (<<-- start parsing here).
- The union in this structure is used to force alignment between the version
- of the compiler used to generate tlsoffsets.h and the cygwin cross compiler.
-*/
-
-/*gentls_offsets*/
-#include "cygerrno.h"
-
-extern "C" int __sjfault (jmp_buf);
-extern "C" int __ljfault (jmp_buf, int);
-
-/*gentls_offsets*/
-
-typedef __uint32_t __stack_t;
-struct _cygtls
-{
- void (*func) /*gentls_offsets*/(int)/*gentls_offsets*/;
- exception_list el;
- int saved_errno;
- int sa_flags;
- sigset_t oldmask;
- sigset_t deltamask;
- HANDLE event;
- int *errno_addr;
- sigset_t sigmask;
- sigset_t sigwait_mask;
- siginfo_t *sigwait_info;
- struct ucontext thread_context;
- DWORD thread_id;
- unsigned threadkill;
- siginfo_t infodata;
- struct pthread *tid;
- union
- {
- struct _reent local_clib;
- char __dontuse[8 * ((sizeof(struct _reent) + 4) / 8)];
- };
- struct _local_storage locals;
- class cygthread *_ctinfo;
- san andreas;
- waitq wq;
- struct _cygtls *prev, *next;
- int sig;
- unsigned incyg;
- unsigned spinning;
- unsigned stacklock;
- __stack_t *stackptr;
- __stack_t stack[TLS_STACK_SIZE];
- unsigned initialized;
-
- /*gentls_offsets*/
- static CRITICAL_SECTION protect_linked_list;
- static void init ();
- void init_thread (void *, DWORD (*) (void *, void *));
- static void call (DWORD (*) (void *, void *), void *);
- void call2 (DWORD (*) (void *, void *), void *, void *) __attribute__ ((regparm (3)));
- static struct _cygtls *find_tls (int sig);
- void remove (DWORD);
- void push (__stack_t) __attribute__ ((regparm (2)));
- __stack_t pop () __attribute__ ((regparm (1)));
- __stack_t retaddr () {return stackptr[-1];}
- bool isinitialized () const
- {
- return initialized == CYGTLS_INITIALIZED;
- }
- bool interrupt_now (CONTEXT *, int, void *, struct sigaction&)
- __attribute__((regparm(3)));
- void __stdcall interrupt_setup (int sig, void *handler,
- struct sigaction& siga)
- __attribute__((regparm(3)));
-
- /* exception handling */
- static int handle_exceptions (EXCEPTION_RECORD *, exception_list *, CONTEXT *, void *);
- bool inside_kernel (CONTEXT *);
- void init_exception_handler (int (*) (EXCEPTION_RECORD *, exception_list *, CONTEXT *, void*));
- void signal_exit (int) __attribute__ ((noreturn, regparm(2)));
- void copy_context (CONTEXT *) __attribute__ ((regparm(2)));
- void signal_debugger (int) __attribute__ ((regparm(2)));
-
-#ifdef _THREAD_H
- operator HANDLE () const {return tid->win32_obj_id;}
-#endif
- void set_siginfo (struct sigpacket *) __attribute__ ((regparm (3)));
- void set_threadkill () {threadkill = true;}
- void reset_threadkill () {threadkill = false;}
- int call_signal_handler () __attribute__ ((regparm (1)));
- void remove_wq (DWORD) __attribute__ ((regparm (1)));
- void fixup_after_fork () __attribute__ ((regparm (1)));
- void lock () __attribute__ ((regparm (1)));
- void unlock () __attribute__ ((regparm (1)));
- bool locked () __attribute__ ((regparm (1)));
- void*& fault_guarded () {return andreas._myfault;}
- void return_from_fault ()
- {
- if (andreas._myfault_errno)
- set_errno (andreas._myfault_errno);
- /* Restore tls_pathbuf counters in case of error. */
- locals.pathbufs.c_cnt = andreas._myfault_c_cnt;
- locals.pathbufs.w_cnt = andreas._myfault_w_cnt;
- __ljfault ((int *) andreas._myfault, 1);
- }
- int setup_fault (jmp_buf j, san& old_j, int myerrno) __attribute__ ((always_inline))
- {
- old_j._myfault = andreas._myfault;
- old_j._myfault_errno = andreas._myfault_errno;
- old_j._myfault_c_cnt = andreas._myfault_c_cnt;
- old_j._myfault_w_cnt = andreas._myfault_w_cnt;
- andreas._myfault = (void *) j;
- andreas._myfault_errno = myerrno;
- /* Save tls_pathbuf counters. */
- andreas._myfault_c_cnt = locals.pathbufs.c_cnt;
- andreas._myfault_w_cnt = locals.pathbufs.w_cnt;
- return __sjfault (j);
- }
- void reset_fault (san& old_j) __attribute__ ((always_inline))
- {
- andreas._myfault = old_j._myfault;
- andreas._myfault_errno = old_j._myfault_errno;
- }
- /*gentls_offsets*/
-};
-#pragma pack(pop)
-
-const int CYGTLS_PADSIZE = 12700; /* FIXME: Find some way to autogenerate
- this value */
-/*gentls_offsets*/
-
-extern char *_tlsbase __asm__ ("%fs:4");
-extern char *_tlstop __asm__ ("%fs:8");
-#define _my_tls (*((_cygtls *) (_tlsbase - CYGTLS_PADSIZE)))
-extern _cygtls *_main_tls;
-extern _cygtls *_sig_tls;
-
-class myfault
-{
- jmp_buf buf;
- san sebastian;
-public:
- ~myfault () __attribute__ ((always_inline)) { _my_tls.reset_fault (sebastian); }
- inline int faulted (int myerrno = 0) __attribute__ ((always_inline))
- {
- return _my_tls.setup_fault (buf, sebastian, myerrno);
- }
-};
-
-#define __getreent() (&_my_tls.local_clib)
-
-#endif /*_CYGTLS_H*/ /*gentls_offsets*/
diff --git a/winsup/cygwin/cygwin-shilka b/winsup/cygwin/cygwin-shilka
deleted file mode 100755
index 9abbf23..0000000
--- a/winsup/cygwin/cygwin-shilka
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-c="$(basename $1 .shilka).c"
-shilka -length -strip -no-definitions $1 && \
-sed -e '1,4d' -e '/KR_reset.*;/d' -e '/KR_output_statistics.*;/d' \
- -e '/KR_reset.*)/,/}/d' -e '/KR_output_statistics.*)/,/}/d' \
- -e '/# *line/d' "$c" > $2 &&
-rm -f "$c"
-# -e "s%$c"'"%'"$2"'"%g'
diff --git a/winsup/cygwin/cygwin.din b/winsup/cygwin/cygwin.din
deleted file mode 100644
index 9c6385b..0000000
--- a/winsup/cygwin/cygwin.din
+++ /dev/null
@@ -1,1777 +0,0 @@
-LIBRARY "cygwin1.dll" BASE=0x61000000
-
-EXPORTS
-__argc DATA
-__argv DATA
-_check_for_executable DATA
-__check_rhosts_file DATA
-_ctype_ DATA
-__cygwin_environ DATA
-__cygwin_user_data DATA
-_daylight DATA
-h_errno DATA
-_impure_ptr DATA
-in6addr_any DATA
-in6addr_loopback DATA
-__mb_cur_max DATA
-optarg DATA
-opterr DATA
-optind DATA
-optopt DATA
-optreset DATA
-__progname DATA
-__rcmd_errstr DATA
-reent_data DATA
-sys_errlist = _sys_errlist DATA
-_sys_errlist DATA
-sys_nerr = _sys_nerr DATA
-sys_sigabbrev DATA
-_sys_nerr DATA
-_timezone DATA
-_tzname DATA
-_Exit SIGFE
-a64l NOSIGFE
-abort NOSIGFE
-_abort = abort SIGFE
-abs NOSIGFE
-_abs = abs NOSIGFE
-accept = cygwin_accept SIGFE
-access SIGFE
-_access = access SIGFE
-acl SIGFE
-_acl = acl SIGFE
-_acl32 = acl32 SIGFE
-aclcheck NOSIGFE
-_aclcheck = aclcheck NOSIGFE
-_aclcheck32 = aclcheck32 NOSIGFE
-aclfrommode SIGFE
-_aclfrommode = aclfrommode SIGFE
-_aclfrommode32 = aclfrommode32 SIGFE
-aclfrompbits SIGFE
-_aclfrompbits = aclfrompbits SIGFE
-_aclfrompbits32 = aclfrompbits32 SIGFE
-aclfromtext SIGFE
-_aclfromtext = aclfromtext SIGFE
-_aclfromtext32 = aclfromtext32 SIGFE
-aclsort SIGFE
-_aclsort = aclsort SIGFE
-_aclsort32 = aclsort32 SIGFE
-acltomode SIGFE
-_acltomode = acltomode SIGFE
-_acltomode32 = acltomode32 SIGFE
-acltopbits SIGFE
-_acltopbits = acltopbits SIGFE
-_acltopbits32 = acltopbits32 SIGFE
-acltotext SIGFE
-_acltotext = acltotext SIGFE
-_acltotext32 = acltotext32 SIGFE
-acos NOSIGFE
-_acos = acos NOSIGFE
-acosf NOSIGFE
-_acosf = acosf NOSIGFE
-acosh NOSIGFE
-_acosh = acosh NOSIGFE
-acoshf NOSIGFE
-_acoshf = acoshf NOSIGFE
-alarm SIGFE
-_alarm = alarm SIGFE
-_alloca NOSIGFE
-alphasort NOSIGFE
-_alphasort = alphasort NOSIGFE
-argz_add SIGFE
-__argz_add = argz_add SIGFE
-argz_add_sep SIGFE
-__argz_add_sep = argz_add_sep SIGFE
-argz_append SIGFE
-__argz_append = argz_append SIGFE
-argz_count NOSIGFE
-__argz_count = argz_count NOSIGFE
-argz_create SIGFE
-__argz_create = argz_create SIGFE
-argz_create_sep SIGFE
-__argz_create_sep = argz_create_sep SIGFE
-argz_delete SIGFE
-__argz_delete = argz_delete SIGFE
-argz_extract NOSIGFE
-__argz_extract = argz_extract NOSIGFE
-argz_insert SIGFE
-__argz_insert = argz_insert SIGFE
-argz_next NOSIGFE
-__argz_next = argz_next NOSIGFE
-argz_replace SIGFE
-__argz_replace = argz_replace SIGFE
-argz_stringify NOSIGFE
-__argz_stringify = argz_stringify NOSIGFE
-asctime SIGFE
-_asctime = asctime SIGFE
-asctime_r SIGFE
-_asctime_r = asctime_r SIGFE
-asin NOSIGFE
-_asin = asin NOSIGFE
-asinf NOSIGFE
-_asinf = asinf NOSIGFE
-asinh NOSIGFE
-_asinh = asinh NOSIGFE
-asinhf NOSIGFE
-_asinhf = asinhf NOSIGFE
-asnprintf SIGFE
-asprintf SIGFE
-_asprintf = asprintf SIGFE
-asprintf_r = _asprintf_r SIGFE
-_asprintf_r SIGFE
-__assert SIGFE
-__assert_func SIGFE
-__assertfail SIGFE
-atan NOSIGFE
-_atan = atan NOSIGFE
-atan2 NOSIGFE
-_atan2 = atan2 NOSIGFE
-atan2f NOSIGFE
-_atan2f = atan2f NOSIGFE
-atanf NOSIGFE
-_atanf = atanf NOSIGFE
-atanh NOSIGFE
-_atanh = atanh NOSIGFE
-atanhf NOSIGFE
-_atanhf = atanhf NOSIGFE
-atexit = cygwin_atexit SIGFE
-_atexit = cygwin_atexit SIGFE
-atof SIGFE
-_atof = atof SIGFE
-atoff SIGFE
-_atoff = atoff SIGFE
-atoi NOSIGFE
-_atoi = atoi NOSIGFE
-atol NOSIGFE
-_atol = atol NOSIGFE
-atoll NOSIGFE
-basename NOSIGFE
-bcmp NOSIGFE
-_bcmp = bcmp NOSIGFE
-bcopy NOSIGFE
-_bcopy = bcopy NOSIGFE
-bind = cygwin_bind SIGFE
-bindresvport = cygwin_bindresvport SIGFE
-bindresvport_sa = cygwin_bindresvport_sa SIGFE
-bsearch NOSIGFE
-_bsearch = bsearch NOSIGFE
-btowc NOSIGFE
-bzero NOSIGFE
-_bzero = bzero NOSIGFE
-cabs NOSIGFE
-_cabs = cabs NOSIGFE
-cabsf NOSIGFE
-_cabsf = cabsf NOSIGFE
-calloc SIGFE
-_calloc = calloc SIGFE
-cbrt NOSIGFE
-_cbrt = cbrt NOSIGFE
-cbrtf NOSIGFE
-_cbrtf = cbrtf NOSIGFE
-ceil NOSIGFE
-_ceil = ceil NOSIGFE
-ceilf NOSIGFE
-_ceilf = ceilf NOSIGFE
-cfgetispeed NOSIGFE
-cfgetospeed NOSIGFE
-cfmakeraw NOSIGFE
-cfsetispeed SIGFE
-cfsetospeed SIGFE
-chdir SIGFE
-_chdir = chdir SIGFE
-chmod SIGFE
-_chmod = chmod SIGFE
-chown SIGFE
-_chown = chown SIGFE
-_chown32 = chown32 SIGFE
-chroot SIGFE
-_chroot = chroot SIGFE
-cleanup_glue NOSIGFE
-clearerr SIGFE
-_clearerr = clearerr SIGFE
-clock SIGFE
-_clock = clock SIGFE
-clock_getres SIGFE
-clock_gettime SIGFE
-clock_setres SIGFE
-close SIGFE
-_close = close SIGFE
-closedir SIGFE
-_closedir = closedir SIGFE
-closelog SIGFE
-confstr NOSIGFE
-connect = cygwin_connect SIGFE
-copysign NOSIGFE
-_copysign = copysign NOSIGFE
-copysignf NOSIGFE
-_copysignf = copysignf NOSIGFE
-cos NOSIGFE
-_cos = cos NOSIGFE
-cosf NOSIGFE
-_cosf = cosf NOSIGFE
-cosh NOSIGFE
-_cosh = cosh NOSIGFE
-coshf NOSIGFE
-_coshf = coshf NOSIGFE
-creat SIGFE
-_creat = creat SIGFE
-ctermid SIGFE
-ctime SIGFE
-_ctime = ctime SIGFE
-ctime_r SIGFE
-_ctime_r = ctime_r SIGFE
-cuserid NOSIGFE
-_cuserid = cuserid NOSIGFE
-cwait SIGFE
-_cwait = cwait SIGFE
-cygwin32_attach_handle_to_fd = cygwin_attach_handle_to_fd SIGFE
-cygwin32_conv_to_full_posix_path = cygwin_conv_to_full_posix_path SIGFE
-cygwin32_conv_to_full_win32_path = cygwin_conv_to_full_win32_path SIGFE
-cygwin32_conv_to_posix_path = cygwin_conv_to_posix_path SIGFE
-cygwin32_conv_to_win32_path = cygwin_conv_to_win32_path SIGFE
-cygwin32_detach_dll = cygwin_detach_dll SIGFE_MAYBE
-cygwin32_internal = cygwin_internal SIGFE
-cygwin32_posix_path_list_p = cygwin_posix_path_list_p NOSIGFE
-cygwin32_posix_to_win32_path_list = cygwin_posix_to_win32_path_list SIGFE
-cygwin32_posix_to_win32_path_list_buf_size = cygwin_posix_to_win32_path_list_buf_size SIGFE
-cygwin32_split_path = cygwin_split_path NOSIGFE
-cygwin32_win32_to_posix_path_list = cygwin_win32_to_posix_path_list SIGFE
-cygwin32_win32_to_posix_path_list_buf_size = cygwin_win32_to_posix_path_list_buf_size SIGFE
-cygwin32_winpid_to_pid = cygwin_winpid_to_pid SIGFE
-cygwin_attach_handle_to_fd SIGFE
-cygwin_conv_path SIGFE
-cygwin_conv_path_list SIGFE
-cygwin_conv_to_full_posix_path SIGFE
-cygwin_conv_to_full_win32_path SIGFE
-cygwin_conv_to_posix_path SIGFE
-cygwin_conv_to_win32_path SIGFE
-cygwin_create_path SIGFE
-cygwin_detach_dll SIGFE_MAYBE
-cygwin_dll_init NOSIGFE
-cygwin_internal NOSIGFE
-cygwin_logon_user SIGFE
-cygwin_posix_path_list_p NOSIGFE
-cygwin_posix_to_win32_path_list SIGFE
-cygwin_posix_to_win32_path_list_buf_size SIGFE
-cygwin_set_impersonation_token SIGFE
-cygwin_split_path NOSIGFE
-cygwin_stackdump SIGFE
-cygwin_umount SIGFE
-cygwin_win32_to_posix_path_list SIGFE
-cygwin_win32_to_posix_path_list_buf_size SIGFE
-cygwin_winpid_to_pid SIGFE
-daemon SIGFE
-difftime NOSIGFE
-_difftime = difftime NOSIGFE
-dirfd SIGFE
-_dirfd = dirfd SIGFE
-dirname NOSIGFE
-div NOSIGFE
-_div = div NOSIGFE
-dlclose SIGFE
-dlerror NOSIGFE
-dlfork NOSIGFE
-_dll_crt0@0 NOSIGFE
-dll_crt0__FP11per_process NOSIGFE
-dll_dllcrt0 NOSIGFE
-dll_entry@12 NOSIGFE
-dll_noncygwin_dllcrt0 NOSIGFE
-dlopen SIGFE
-dlsym SIGFE
-dn_comp = __dn_comp SIGFE
-__dn_comp SIGFE
-dn_expand = __dn_expand SIGFE
-__dn_expand SIGFE
-dn_skipname = __dn_skipname SIGFE
-__dn_skipname SIGFE
-dprintf SIGFE
-drand48 NOSIGFE
-_drand48 = drand48 NOSIGFE
-drem NOSIGFE
-_drem = drem NOSIGFE
-dremf NOSIGFE
-_dremf = dremf NOSIGFE
-dup SIGFE
-_dup = dup SIGFE
-dup2 SIGFE
-_dup2 = dup2 SIGFE
-ecvt SIGFE
-_ecvt = ecvt SIGFE
-ecvtbuf SIGFE
-_ecvtbuf = ecvtbuf SIGFE
-ecvtf SIGFE
-_ecvtf = ecvtf SIGFE
-endgrent NOSIGFE
-_endgrent = endgrent NOSIGFE
-endhostent NOSIGFE
-endmntent NOSIGFE
-_endmntent = endmntent NOSIGFE
-endprotoent = cygwin_endprotoent SIGFE
-endpwent NOSIGFE
-_endpwent = endpwent NOSIGFE
-endservent = cygwin_endservent SIGFE
-endusershell SIGFE
-endutent SIGFE
-_endutent = endutent SIGFE
-endutxent SIGFE
-envz_add SIGFE
-__envz_add = envz_add SIGFE
-envz_entry NOSIGFE
-__envz_entry = envz_entry NOSIGFE
-envz_get NOSIGFE
-__envz_get = envz_get NOSIGFE
-envz_merge SIGFE
-__envz_merge = envz_merge SIGFE
-envz_remove SIGFE
-__envz_remove = envz_remove SIGFE
-envz_strip SIGFE
-__envz_strip = envz_strip SIGFE
-__eprintf SIGFE
-erand48 NOSIGFE
-_erand48 = erand48 NOSIGFE
-erf NOSIGFE
-_erf = erf NOSIGFE
-erfc NOSIGFE
-_erfc = erfc NOSIGFE
-erfcf NOSIGFE
-_erfcf = erfcf NOSIGFE
-erff NOSIGFE
-_erff = erff NOSIGFE
-err SIGFE
-__errno NOSIGFE
-errx SIGFE
-execl SIGFE
-_execl = execl SIGFE
-execle SIGFE
-_execle = execle SIGFE
-execlp SIGFE
-_execlp = execlp SIGFE
-execv SIGFE
-_execv = execv SIGFE
-execve SIGFE
-_execve = execve SIGFE
-execvp SIGFE
-_execvp = execvp SIGFE
-exit = cygwin_exit SIGFE
-_exit SIGFE
-exp NOSIGFE
-_exp = exp NOSIGFE
-exp10 NOSIGFE
-exp10f NOSIGFE
-exp2 NOSIGFE
-exp2f NOSIGFE
-expf NOSIGFE
-_expf = expf NOSIGFE
-expm1 NOSIGFE
-_expm1 = expm1 NOSIGFE
-expm1f NOSIGFE
-_expm1f = expm1f NOSIGFE
-_f_atan2 NOSIGFE
-__f_atan2 = _f_atan2 NOSIGFE
-_f_atan2f NOSIGFE
-__f_atan2f = _f_atan2f NOSIGFE
-_f_exp NOSIGFE
-__f_exp = _f_exp NOSIGFE
-_f_expf NOSIGFE
-__f_expf = _f_expf NOSIGFE
-_f_frexp NOSIGFE
-__f_frexp = _f_frexp NOSIGFE
-_f_frexpf NOSIGFE
-__f_frexpf = _f_frexpf NOSIGFE
-_f_ldexp NOSIGFE
-__f_ldexp = _f_ldexp NOSIGFE
-_f_ldexpf NOSIGFE
-__f_ldexpf = _f_ldexpf NOSIGFE
-_f_llrint NOSIGFE
-_f_llrintf NOSIGFE
-_f_llrintl NOSIGFE
-_f_log NOSIGFE
-__f_log = _f_log NOSIGFE
-_f_log10 NOSIGFE
-__f_log10 = _f_log10 NOSIGFE
-_f_log10f NOSIGFE
-__f_log10f = _f_log10f NOSIGFE
-_f_logf NOSIGFE
-__f_logf = _f_logf NOSIGFE
-_f_lrint NOSIGFE
-_f_lrintf NOSIGFE
-_f_lrintl NOSIGFE
-_f_pow NOSIGFE
-__f_pow = _f_pow NOSIGFE
-_f_powf NOSIGFE
-__f_powf = _f_powf NOSIGFE
-_f_rint NOSIGFE
-_f_rintf NOSIGFE
-_f_rintl NOSIGFE
-_f_tan NOSIGFE
-__f_tan = _f_tan NOSIGFE
-_f_tanf NOSIGFE
-__f_tanf = _f_tanf NOSIGFE
-fabs NOSIGFE
-_fabs = fabs NOSIGFE
-fabsf NOSIGFE
-_fabsf = fabsf NOSIGFE
-faccessat SIGFE
-facl SIGFE
-_facl = facl SIGFE
-_facl32 = facl32 SIGFE
-fchdir SIGFE
-_fchdir = fchdir SIGFE
-fchmod SIGFE
-_fchmod = fchmod SIGFE
-fchmodat SIGFE
-fchown SIGFE
-_fchown = fchown SIGFE
-_fchown32 = fchown32 SIGFE
-fchownat SIGFE
-fclose SIGFE
-_fclose = fclose SIGFE
-fcloseall SIGFE
-_fcloseall = fcloseall SIGFE
-fcloseall_r = _fcloseall_r SIGFE
-_fcloseall_r SIGFE
-fcntl SIGFE
-_fcntl = fcntl SIGFE
-_fcntl64 = fcntl64 SIGFE
-fcvt SIGFE
-_fcvt = fcvt SIGFE
-fcvtbuf SIGFE
-_fcvtbuf = fcvtbuf SIGFE
-fcvtf SIGFE
-_fcvtf = fcvtf SIGFE
-fdatasync SIGFE
-fdim NOSIGFE
-fdimf NOSIGFE
-fdopen SIGFE
-_fdopen = fdopen SIGFE
-_fdopen64 = fdopen64 SIGFE
-fdopendir SIGFE
-feof SIGFE
-_feof = feof SIGFE
-ferror SIGFE
-_ferror = ferror SIGFE
-fflush SIGFE
-_fflush = fflush SIGFE
-ffs NOSIGFE
-_ffs = ffs NOSIGFE
-fgetc SIGFE
-_fgetc = fgetc SIGFE
-fgetpos SIGFE
-_fgetpos = fgetpos SIGFE
-_fgetpos64 = fgetpos64 SIGFE
-fgets SIGFE
-_fgets = fgets SIGFE
-fgetwc SIGFE
-fgetws SIGFE
-fgetxattr SIGFE
-fileno SIGFE
-_fileno = fileno SIGFE
-finite NOSIGFE
-_finite = finite NOSIGFE
-finitef NOSIGFE
-_finitef = finitef NOSIGFE
-fiprintf SIGFE
-_fiprintf = fiprintf SIGFE
-flistxattr SIGFE
-flock SIGFE
-flockfile SIGFE
-floor NOSIGFE
-_floor = floor NOSIGFE
-floorf NOSIGFE
-_floorf = floorf NOSIGFE
-fma NOSIGFE
-fmaf NOSIGFE
-fmax NOSIGFE
-fmaxf NOSIGFE
-fmemopen SIGFE
-fmin NOSIGFE
-fminf NOSIGFE
-fmod NOSIGFE
-_fmod = fmod NOSIGFE
-fmodf NOSIGFE
-_fmodf = fmodf NOSIGFE
-fnmatch NOSIGFE
-_fnmatch = fnmatch NOSIGFE
-fopen SIGFE
-_fopen = fopen SIGFE
-_fopen64 = fopen64 SIGFE
-fopencookie SIGFE
-fork SIGFE
-_fork = fork SIGFE
-forkpty SIGFE
-fpathconf SIGFE
-__fpclassifyd NOSIGFE
-__fpclassifyf NOSIGFE
-fprintf SIGFE
-_fprintf = fprintf SIGFE
-fputc SIGFE
-_fputc = fputc SIGFE
-fputs SIGFE
-_fputs = fputs SIGFE
-fputwc SIGFE
-fputws SIGFE
-fread SIGFE
-_fread = fread SIGFE
-free SIGFE
-_free = free SIGFE
-freeaddrinfo = cygwin_freeaddrinfo SIGFE
-freeifaddrs SIGFE
-fremovexattr SIGFE
-freopen SIGFE
-_freopen = freopen SIGFE
-_freopen64 = freopen64 SIGFE
-frexp NOSIGFE
-_frexp = frexp NOSIGFE
-frexpf NOSIGFE
-_frexpf = frexpf NOSIGFE
-fscanf SIGFE
-_fscanf = fscanf SIGFE
-fscanf_r = _fscanf_r SIGFE
-_fscanf_r SIGFE
-fseek SIGFE
-_fseek = fseek SIGFE
-fseeko SIGFE
-_fseeko = fseeko SIGFE
-_fseeko64 = fseeko64 SIGFE
-fsetpos SIGFE
-_fsetpos = fsetpos SIGFE
-_fsetpos64 = fsetpos64 SIGFE
-fsetxattr SIGFE
-fstat SIGFE
-_fstat = fstat SIGFE
-_fstat64 = fstat64 SIGFE
-fstatat SIGFE
-fstatfs SIGFE
-_fstatfs = fstatfs SIGFE
-fstatvfs SIGFE
-fsync SIGFE
-_fsync = fsync SIGFE
-ftell SIGFE
-_ftell = ftell SIGFE
-ftello SIGFE
-_ftello = ftello SIGFE
-_ftello64 = ftello64 SIGFE
-ftime SIGFE
-_ftime = ftime SIGFE
-ftok SIGFE
-_ftok = ftok SIGFE
-ftruncate SIGFE
-_ftruncate = ftruncate SIGFE
-_ftruncate64 = ftruncate64 SIGFE
-ftrylockfile SIGFE
-fts_children SIGFE
-fts_close SIGFE
-fts_get_clientptr NOSIGFE
-fts_get_stream NOSIGFE
-fts_open SIGFE
-fts_read SIGFE
-fts_set NOSIGFE
-fts_set_clientptr NOSIGFE
-ftw SIGFE
-funlockfile SIGFE
-funopen SIGFE
-futimens SIGFE
-futimes SIGFE
-futimesat SIGFE
-fwide SIGFE
-fwrite SIGFE
-_fwrite = fwrite SIGFE
-gai_strerror = cygwin_gai_strerror NOSIGFE
-gamma NOSIGFE
-_gamma = gamma NOSIGFE
-gamma_r NOSIGFE
-_gamma_r = gamma_r NOSIGFE
-gammaf NOSIGFE
-_gammaf = gammaf NOSIGFE
-gammaf_r NOSIGFE
-_gammaf_r = gammaf_r NOSIGFE
-gcvt SIGFE
-_gcvt = gcvt SIGFE
-gcvtf SIGFE
-_gcvtf = gcvtf SIGFE
-get_osfhandle SIGFE
-_get_osfhandle = get_osfhandle SIGFE
-getaddrinfo = cygwin_getaddrinfo SIGFE
-getc SIGFE
-_getc = getc SIGFE
-getc_unlocked SIGFE
-_getc_unlocked = getc_unlocked SIGFE
-getchar SIGFE
-_getchar = getchar SIGFE
-getchar_unlocked SIGFE
-_getchar_unlocked = getchar_unlocked SIGFE
-getcwd SIGFE
-_getcwd = getcwd SIGFE
-getdelim = __getdelim SIGFE
-__getdelim SIGFE
-getdomainname SIGFE
-_getdomainname = getdomainname SIGFE
-getdtablesize NOSIGFE
-_getdtablesize = getdtablesize NOSIGFE
-getegid NOSIGFE
-_getegid = getegid NOSIGFE
-_getegid32 = getegid32 NOSIGFE
-getenv NOSIGFE
-_getenv = getenv NOSIGFE
-geteuid NOSIGFE
-_geteuid = geteuid NOSIGFE
-_geteuid32 = geteuid32 NOSIGFE
-getgid NOSIGFE
-_getgid = getgid NOSIGFE
-_getgid32 = getgid32 NOSIGFE
-getgrent SIGFE
-_getgrent = getgrent SIGFE
-_getgrent32 = getgrent32 SIGFE
-getgrgid SIGFE
-_getgrgid = getgrgid SIGFE
-_getgrgid32 = getgrgid32 SIGFE
-getgrgid_r SIGFE
-getgrnam SIGFE
-_getgrnam = getgrnam SIGFE
-_getgrnam32 = getgrnam32 SIGFE
-getgrnam_r SIGFE
-getgroups SIGFE
-_getgroups = getgroups SIGFE
-_getgroups32 = getgroups32 SIGFE
-gethostbyaddr = cygwin_gethostbyaddr SIGFE
-gethostbyname = cygwin_gethostbyname SIGFE
-gethostid SIGFE
-gethostname = cygwin_gethostname SIGFE
-_gethostname = cygwin_gethostname SIGFE
-getifaddrs SIGFE
-getitimer SIGFE
-getline = __getline SIGFE
-__getline SIGFE
-getlogin NOSIGFE
-_getlogin = getlogin NOSIGFE
-getlogin_r NOSIGFE
-getmntent SIGFE
-_getmntent = getmntent SIGFE
-getmode SIGFE
-_getmode = getmode SIGFE
-getnameinfo = cygwin_getnameinfo SIGFE
-getopt SIGFE
-getopt_long SIGFE
-getopt_long_only SIGFE
-getpagesize SIGFE
-_getpagesize = getpagesize SIGFE
-getpass SIGFE
-_getpass = getpass SIGFE
-getpeereid SIGFE
-getpeername = cygwin_getpeername SIGFE
-getpgid SIGFE
-getpgrp SIGFE
-_getpgrp = getpgrp SIGFE
-getpid NOSIGFE
-_getpid = getpid NOSIGFE
-getppid NOSIGFE
-_getppid = getppid NOSIGFE
-getpriority SIGFE
-getprogname NOSIGFE
-getprotobyname = cygwin_getprotobyname SIGFE
-getprotobynumber = cygwin_getprotobynumber SIGFE
-getprotoent = cygwin_getprotoent SIGFE
-getpwduid NOSIGFE
-_getpwduid = getpwduid NOSIGFE
-getpwent SIGFE
-_getpwent = getpwent SIGFE
-getpwnam SIGFE
-_getpwnam = getpwnam SIGFE
-getpwnam_r SIGFE
-getpwuid SIGFE
-_getpwuid = getpwuid SIGFE
-_getpwuid32 = getpwuid32 SIGFE
-getpwuid_r SIGFE
-_getpwuid_r32 = getpwuid_r32 SIGFE
-__getreent NOSIGFE
-getrlimit SIGFE
-_getrlimit = getrlimit SIGFE
-getrusage SIGFE
-_getrusage = getrusage SIGFE
-gets SIGFE
-_gets = gets SIGFE
-getservbyname = cygwin_getservbyname SIGFE
-getservbyport = cygwin_getservbyport SIGFE
-getservent = cygwin_getservent SIGFE
-getsid SIGFE
-getsockname = cygwin_getsockname SIGFE
-getsockopt = cygwin_getsockopt SIGFE
-getsubopt NOSIGFE
-gettimeofday SIGFE
-_gettimeofday = gettimeofday SIGFE
-getuid NOSIGFE
-_getuid = getuid NOSIGFE
-_getuid32 = getuid32 NOSIGFE
-getusershell SIGFE
-getutent SIGFE
-_getutent = getutent SIGFE
-getutid SIGFE
-_getutid = getutid SIGFE
-getutline SIGFE
-getutxent SIGFE
-getutxid SIGFE
-getutxline SIGFE
-getw SIGFE
-_getw = getw SIGFE
-getwc SIGFE
-getwchar SIGFE
-getwd SIGFE
-_getwd = getwd SIGFE
-getxattr SIGFE
-glob SIGFE
-_glob = glob SIGFE
-globfree SIGFE
-_globfree = globfree SIGFE
-gmtime SIGFE
-_gmtime = gmtime SIGFE
-gmtime_r SIGFE
-_gmtime_r = gmtime_r SIGFE
-grantpt NOSIGFE
-hcreate SIGFE
-hcreate_r SIGFE
-hdestroy SIGFE
-hdestroy_r SIGFE
-herror = cygwin_herror SIGFE
-hsearch SIGFE
-hsearch_r SIGFE
-hstrerror = cygwin_hstrerror NOSIGFE
-htonl NOSIGFE
-_htonl = htonl NOSIGFE
-htons NOSIGFE
-_htons = htons NOSIGFE
-hypot NOSIGFE
-_hypot = hypot NOSIGFE
-hypotf NOSIGFE
-_hypotf = hypotf NOSIGFE
-if_freenameindex SIGFE
-if_indextoname SIGFE
-if_nameindex SIGFE
-if_nametoindex SIGFE
-ilogb NOSIGFE
-_ilogb = ilogb NOSIGFE
-ilogbf NOSIGFE
-_ilogbf = ilogbf NOSIGFE
-imaxabs = llabs NOSIGFE
-imaxdiv = lldiv NOSIGFE
-index NOSIGFE
-_index = index NOSIGFE
-inet_addr = cygwin_inet_addr SIGFE
-inet_aton = cygwin_inet_aton SIGFE
-inet_makeaddr NOSIGFE
-inet_netof NOSIGFE
-inet_network = cygwin_inet_network SIGFE
-inet_ntoa = cygwin_inet_ntoa SIGFE
-inet_ntop = cygwin_inet_ntop SIGFE
-inet_pton = cygwin_inet_pton SIGFE
-infinity NOSIGFE
-_infinity = infinity NOSIGFE
-__infinity NOSIGFE
-infinityf NOSIGFE
-_infinityf = infinityf NOSIGFE
-initgroups SIGFE
-_initgroups32 = initgroups32 SIGFE
-initstate NOSIGFE
-insque NOSIGFE
-ioctl SIGFE
-_ioctl = ioctl SIGFE
-iprintf SIGFE
-_iprintf = iprintf SIGFE
-iruserok SIGFE
-iruserok_sa SIGFE
-isalnum NOSIGFE
-_isalnum = isalnum NOSIGFE
-isalpha NOSIGFE
-_isalpha = isalpha NOSIGFE
-isascii NOSIGFE
-_isascii = isascii NOSIGFE
-isatty SIGFE
-_isatty = isatty SIGFE
-isblank NOSIGFE
-iscntrl NOSIGFE
-_iscntrl = iscntrl NOSIGFE
-isdigit NOSIGFE
-_isdigit = isdigit NOSIGFE
-isgraph NOSIGFE
-_isgraph = isgraph NOSIGFE
-isinf NOSIGFE
-_isinf = isinf NOSIGFE
-__isinfd NOSIGFE
-isinff NOSIGFE
-_isinff = isinff NOSIGFE
-__isinff NOSIGFE
-islower NOSIGFE
-_islower = islower NOSIGFE
-isnan NOSIGFE
-_isnan = isnan NOSIGFE
-__isnand NOSIGFE
-isnanf NOSIGFE
-_isnanf = isnanf NOSIGFE
-__isnanf NOSIGFE
-isprint NOSIGFE
-_isprint = isprint NOSIGFE
-ispunct NOSIGFE
-_ispunct = ispunct NOSIGFE
-isspace NOSIGFE
-_isspace = isspace NOSIGFE
-isupper NOSIGFE
-_isupper = isupper NOSIGFE
-iswalnum NOSIGFE
-iswalpha NOSIGFE
-iswblank NOSIGFE
-iswcntrl NOSIGFE
-iswctype NOSIGFE
-iswdigit NOSIGFE
-iswgraph NOSIGFE
-iswlower NOSIGFE
-iswprint NOSIGFE
-iswpunct NOSIGFE
-iswspace NOSIGFE
-iswupper NOSIGFE
-iswxdigit NOSIGFE
-isxdigit NOSIGFE
-_isxdigit = isxdigit NOSIGFE
-j0 NOSIGFE
-_j0 = j0 NOSIGFE
-j0f NOSIGFE
-_j0f = j0f NOSIGFE
-j1 NOSIGFE
-_j1 = j1 NOSIGFE
-j1f NOSIGFE
-_j1f = j1f NOSIGFE
-jn NOSIGFE
-_jn = jn NOSIGFE
-jnf NOSIGFE
-_jnf = jnf NOSIGFE
-jrand48 NOSIGFE
-_jrand48 = jrand48 NOSIGFE
-kill SIGFE
-_kill = kill SIGFE
-killpg SIGFE
-l64a NOSIGFE
-labs NOSIGFE
-_labs = labs NOSIGFE
-lacl SIGFE
-_lacl = lacl SIGFE
-lchown SIGFE
-_lchown = lchown SIGFE
-_lchown32 = lchown32 SIGFE
-lcong48 NOSIGFE
-_lcong48 = lcong48 NOSIGFE
-ldexp NOSIGFE
-_ldexp = ldexp NOSIGFE
-ldexpf NOSIGFE
-_ldexpf = ldexpf NOSIGFE
-ldiv NOSIGFE
-_ldiv = ldiv NOSIGFE
-lfind NOSIGFE
-lgamma NOSIGFE
-_lgamma = lgamma NOSIGFE
-lgamma_r NOSIGFE
-_lgamma_r = lgamma_r NOSIGFE
-lgammaf NOSIGFE
-_lgammaf = lgammaf NOSIGFE
-lgammaf_r NOSIGFE
-_lgammaf_r = lgammaf_r NOSIGFE
-lgetxattr SIGFE
-link SIGFE
-_link = link SIGFE
-linkat SIGFE
-listen = cygwin_listen SIGFE
-listxattr SIGFE
-llabs NOSIGFE
-lldiv NOSIGFE
-llistxattr SIGFE
-llrint = _f_llrint NOSIGFE
-llrintf = _f_llrintf NOSIGFE
-llrintl = _f_llrintl NOSIGFE
-localeconv NOSIGFE
-_localeconv = localeconv NOSIGFE
-localtime SIGFE
-_localtime = localtime SIGFE
-localtime_r SIGFE
-_localtime_r = localtime_r SIGFE
-lockf SIGFE
-log NOSIGFE
-_log = log NOSIGFE
-log10 NOSIGFE
-_log10 = log10 NOSIGFE
-log10f NOSIGFE
-_log10f = log10f NOSIGFE
-log1p NOSIGFE
-_log1p = log1p NOSIGFE
-log1pf NOSIGFE
-_log1pf = log1pf NOSIGFE
-logb NOSIGFE
-_logb = logb NOSIGFE
-logbf NOSIGFE
-_logbf = logbf NOSIGFE
-logf NOSIGFE
-_logf = logf NOSIGFE
-login SIGFE
-login_tty SIGFE
-logout SIGFE
-logwtmp SIGFE
-longjmp NOSIGFE
-_longjmp = longjmp NOSIGFE
-lrand48 NOSIGFE
-_lrand48 = lrand48 NOSIGFE
-lremovexattr SIGFE
-lrint = _f_lrint NOSIGFE
-lrintf = _f_lrintf NOSIGFE
-lrintl = _f_lrintl NOSIGFE
-lround NOSIGFE
-lroundf NOSIGFE
-lsearch NOSIGFE
-lseek SIGFE
-_lseek = lseek SIGFE
-_lseek64 = lseek64 SIGFE
-lsetxattr SIGFE
-lstat SIGFE
-_lstat = lstat SIGFE
-_lstat64 = lstat64 SIGFE
-lutimes SIGFE
-__main NOSIGFE
-mallinfo SIGFE
-malloc SIGFE
-_malloc = malloc SIGFE
-malloc_stats SIGFE
-malloc_trim SIGFE
-malloc_usable_size SIGFE
-mallopt SIGFE
-matherr NOSIGFE
-_matherr = matherr NOSIGFE
-mblen NOSIGFE
-_mblen = mblen NOSIGFE
-mbrlen NOSIGFE
-mbrtowc NOSIGFE
-mbsinit NOSIGFE
-mbsrtowcs NOSIGFE
-mbstowcs NOSIGFE
-_mbstowcs = mbstowcs NOSIGFE
-mbtowc NOSIGFE
-_mbtowc = mbtowc NOSIGFE
-memalign SIGFE
-memccpy NOSIGFE
-_memccpy = memccpy NOSIGFE
-memchr NOSIGFE
-_memchr = memchr NOSIGFE
-memcmp NOSIGFE
-_memcmp = memcmp NOSIGFE
-memcpy NOSIGFE
-_memcpy = memcpy NOSIGFE
-memmem NOSIGFE
-memmove NOSIGFE
-_memmove = memmove NOSIGFE
-mempcpy NOSIGFE
-__mempcpy = mempcpy NOSIGFE
-memset NOSIGFE
-_memset = memset NOSIGFE
-mkdir SIGFE
-_mkdir = mkdir SIGFE
-mkdirat SIGFE
-mkdtemp SIGFE
-mkfifo SIGFE
-mkfifoat SIGFE
-mknod SIGFE
-_mknod = mknod SIGFE
-_mknod32 = mknod32 SIGFE
-mknodat SIGFE
-mkstemp SIGFE
-_mkstemp = mkstemp SIGFE
-mktemp SIGFE
-_mktemp = mktemp SIGFE
-mktime SIGFE
-_mktime = mktime SIGFE
-mlock SIGFE
-mmap SIGFE
-_mmap64 = mmap64 SIGFE
-modf NOSIGFE
-_modf = modf NOSIGFE
-modff NOSIGFE
-_modff = modff NOSIGFE
-mount SIGFE
-_mount = mount SIGFE
-mprotect SIGFE
-mq_close SIGFE
-mq_getattr SIGFE
-mq_notify SIGFE
-mq_open SIGFE
-mq_receive SIGFE
-mq_send SIGFE
-mq_setattr SIGFE
-mq_timedreceive SIGFE
-mq_timedsend SIGFE
-mq_unlink SIGFE
-mrand48 NOSIGFE
-msgctl SIGFE
-msgget SIGFE
-msgrcv SIGFE
-msgsnd SIGFE
-msync SIGFE
-munlock SIGFE
-munmap SIGFE
-nan NOSIGFE
-_nan = nan NOSIGFE
-nanf NOSIGFE
-_nanf = nanf NOSIGFE
-nanosleep SIGFE
-_nanosleep = nanosleep SIGFE
-nearbyint NOSIGFE
-nearbyintf NOSIGFE
-nextafter NOSIGFE
-_nextafter = nextafter NOSIGFE
-nextafterf NOSIGFE
-_nextafterf = nextafterf NOSIGFE
-nftw SIGFE
-nice SIGFE
-_nice = nice SIGFE
-nl_langinfo SIGFE
-_nl_langinfo = nl_langinfo SIGFE
-nrand48 NOSIGFE
-_nrand48 = nrand48 NOSIGFE
-ntohl NOSIGFE
-_ntohl = ntohl NOSIGFE
-ntohs NOSIGFE
-_ntohs = ntohs NOSIGFE
-on_exit SIGFE
-open SIGFE
-_open = open SIGFE
-_open64
-open_memstream SIGFE
-openat SIGFE
-opendir SIGFE
-__opendir_with_d_ino SIGFE
-openlog SIGFE
-_openlog = openlog SIGFE
-openpty SIGFE
-pathconf SIGFE
-_pathconf = pathconf SIGFE
-pause SIGFE
-pclose SIGFE
-_pclose = pclose SIGFE
-perror SIGFE
-_perror = perror SIGFE
-pipe SIGFE
-_pipe SIGFE
-poll SIGFE
-_poll = poll SIGFE
-popen SIGFE
-_popen = popen SIGFE
-posix_fadvise SIGFE
-posix_fallocate SIGFE
-posix_madvise SIGFE
-posix_memalign SIGFE
-posix_openpt SIGFE
-posix_regcomp = regcomp SIGFE
-posix_regerror = regerror SIGFE
-posix_regexec = regexec SIGFE
-posix_regfree = regfree SIGFE
-pow NOSIGFE
-_pow = pow NOSIGFE
-pow10 NOSIGFE
-pow10f NOSIGFE
-powf NOSIGFE
-_powf = powf NOSIGFE
-pread SIGFE
-printf SIGFE
-_printf = printf SIGFE
-pselect SIGFE
-pthread_atfork SIGFE
-pthread_attr_destroy SIGFE
-pthread_attr_getdetachstate SIGFE
-pthread_attr_getinheritsched SIGFE
-pthread_attr_getschedparam SIGFE
-pthread_attr_getschedpolicy SIGFE
-pthread_attr_getscope SIGFE
-pthread_attr_getstacksize SIGFE
-pthread_attr_init SIGFE
-pthread_attr_setdetachstate SIGFE
-pthread_attr_setinheritsched SIGFE
-pthread_attr_setschedparam SIGFE
-pthread_attr_setschedpolicy SIGFE
-pthread_attr_setscope SIGFE
-pthread_attr_setstacksize SIGFE
-pthread_cancel SIGFE
-_pthread_cleanup_pop SIGFE
-_pthread_cleanup_push SIGFE
-pthread_cond_broadcast SIGFE
-pthread_cond_destroy SIGFE
-pthread_cond_init SIGFE
-pthread_cond_signal SIGFE
-pthread_cond_timedwait SIGFE
-pthread_cond_wait SIGFE
-pthread_condattr_destroy SIGFE
-pthread_condattr_getpshared SIGFE
-pthread_condattr_init SIGFE
-pthread_condattr_setpshared SIGFE
-pthread_continue SIGFE
-pthread_create SIGFE
-pthread_detach SIGFE
-pthread_equal SIGFE
-pthread_exit SIGFE
-pthread_getconcurrency SIGFE
-pthread_getschedparam SIGFE
-pthread_getsequence_np SIGFE
-pthread_getspecific SIGFE
-pthread_join SIGFE
-pthread_key_create SIGFE
-pthread_key_delete SIGFE
-pthread_kill SIGFE
-pthread_mutex_destroy SIGFE
-pthread_mutex_getprioceiling SIGFE
-pthread_mutex_init SIGFE
-pthread_mutex_lock SIGFE
-pthread_mutex_setprioceiling SIGFE
-pthread_mutex_trylock SIGFE
-pthread_mutex_unlock SIGFE
-pthread_mutexattr_destroy SIGFE
-pthread_mutexattr_getprioceiling SIGFE
-pthread_mutexattr_getprotocol SIGFE
-pthread_mutexattr_getpshared SIGFE
-pthread_mutexattr_gettype SIGFE
-pthread_mutexattr_init SIGFE
-pthread_mutexattr_setprioceiling SIGFE
-pthread_mutexattr_setprotocol SIGFE
-pthread_mutexattr_setpshared SIGFE
-pthread_mutexattr_settype SIGFE
-pthread_once SIGFE
-pthread_rwlock_destroy SIGFE
-pthread_rwlock_init SIGFE
-pthread_rwlock_rdlock SIGFE
-pthread_rwlock_tryrdlock SIGFE
-pthread_rwlock_trywrlock SIGFE
-pthread_rwlock_unlock SIGFE
-pthread_rwlock_wrlock SIGFE
-pthread_rwlockattr_destroy SIGFE
-pthread_rwlockattr_getpshared SIGFE
-pthread_rwlockattr_init SIGFE
-pthread_rwlockattr_setpshared SIGFE
-pthread_self SIGFE
-pthread_setcancelstate SIGFE
-pthread_setcanceltype SIGFE
-pthread_setconcurrency SIGFE
-pthread_setschedparam SIGFE
-pthread_setspecific SIGFE
-pthread_sigmask SIGFE
-pthread_suspend SIGFE
-pthread_testcancel SIGFE
-ptsname SIGFE
-putc SIGFE
-_putc = putc SIGFE
-putc_unlocked SIGFE
-_putc_unlocked = putc_unlocked SIGFE
-putchar SIGFE
-_putchar = putchar SIGFE
-putchar_unlocked SIGFE
-_putchar_unlocked = putchar_unlocked SIGFE
-putenv SIGFE
-_putenv = putenv SIGFE
-puts SIGFE
-_puts = puts SIGFE
-pututline SIGFE
-_pututline = pututline SIGFE
-pututxline SIGFE
-putw SIGFE
-_putw = putw SIGFE
-putwc SIGFE
-putwchar SIGFE
-pwrite SIGFE
-qsort NOSIGFE
-_qsort = qsort NOSIGFE
-raise SIGFE
-_raise = raise SIGFE
-rand NOSIGFE
-_rand = rand NOSIGFE
-rand_r NOSIGFE
-random NOSIGFE
-rcmd = cygwin_rcmd SIGFE
-rcmd_af = cygwin_rcmd_af SIGFE
-read SIGFE
-_read = read SIGFE
-readdir SIGFE
-_readdir = readdir SIGFE
-readdir_r SIGFE
-readlink SIGFE
-_readlink = readlink SIGFE
-readlinkat SIGFE
-readv SIGFE
-_readv = readv SIGFE
-realloc SIGFE
-_realloc = realloc SIGFE
-realpath SIGFE
-recv = cygwin_recv SIGFE
-recvfrom = cygwin_recvfrom SIGFE
-recvmsg = cygwin_recvmsg SIGFE
-regcomp SIGFE
-regerror SIGFE
-regexec SIGFE
-regfree SIGFE
-remainder NOSIGFE
-_remainder = remainder NOSIGFE
-remainderf NOSIGFE
-_remainderf = remainderf NOSIGFE
-remove SIGFE
-_remove = remove SIGFE
-removexattr SIGFE
-remque NOSIGFE
-remquo NOSIGFE
-remquof NOSIGFE
-rename SIGFE
-_rename = rename SIGFE
-renameat SIGFE
-res_close = __res_close SIGFE
-__res_close SIGFE
-res_init = __res_init SIGFE
-__res_init SIGFE
-res_mkquery = __res_mkquery SIGFE
-__res_mkquery SIGFE
-res_nclose = __res_nclose SIGFE
-__res_nclose SIGFE
-res_ninit = __res_ninit SIGFE
-__res_ninit SIGFE
-res_nmkquery = __res_nmkquery SIGFE
-__res_nmkquery SIGFE
-res_nquery = __res_nquery SIGFE
-__res_nquery SIGFE
-res_nquerydomain = __res_nquerydomain SIGFE
-__res_nquerydomain SIGFE
-res_nsearch = __res_nsearch SIGFE
-__res_nsearch SIGFE
-res_nsend = __res_nsend SIGFE
-__res_nsend SIGFE
-res_query = __res_query SIGFE
-__res_query SIGFE
-res_querydomain = __res_querydomain SIGFE
-__res_querydomain SIGFE
-res_search = __res_search SIGFE
-__res_search SIGFE
-res_send = __res_send SIGFE
-__res_send SIGFE
-__res_state SIGFE
-revoke SIGFE
-rewind SIGFE
-_rewind = rewind SIGFE
-rewinddir SIGFE
-_rewinddir = rewinddir SIGFE
-rexec = cygwin_rexec SIGFE
-rindex NOSIGFE
-_rindex = rindex NOSIGFE
-rint = _f_rint NOSIGFE
-rintf = _f_rintf NOSIGFE
-rintl = _f_rintl NOSIGFE
-rmdir SIGFE
-_rmdir = rmdir SIGFE
-round NOSIGFE
-roundf NOSIGFE
-rresvport = cygwin_rresvport SIGFE
-rresvport_af = cygwin_rresvport_af SIGFE
-ruserok SIGFE
-sbrk SIGFE
-_sbrk = sbrk SIGFE
-scalb NOSIGFE
-_scalb = scalb NOSIGFE
-scalbf NOSIGFE
-_scalbf = scalbf NOSIGFE
-scalbln NOSIGFE
-scalblnf NOSIGFE
-scalbn NOSIGFE
-_scalbn = scalbn NOSIGFE
-scalbnf NOSIGFE
-_scalbnf = scalbnf NOSIGFE
-scandir SIGFE
-_scandir = scandir SIGFE
-scanf SIGFE
-_scanf = scanf SIGFE
-scanf_r = _scanf_r SIGFE
-_scanf_r SIGFE
-sched_get_priority_max SIGFE
-sched_get_priority_min SIGFE
-sched_getparam SIGFE
-sched_getscheduler NOSIGFE
-sched_rr_get_interval SIGFE
-sched_setparam SIGFE
-sched_setscheduler SIGFE
-sched_yield SIGFE
-seed48 NOSIGFE
-_seed48 = seed48 NOSIGFE
-seekdir SIGFE
-_seekdir = seekdir SIGFE
-_seekdir64 = seekdir64 SIGFE
-select = cygwin_select SIGFE
-_select = cygwin_select SIGFE
-sem_close SIGFE
-sem_destroy SIGFE
-sem_getvalue SIGFE
-sem_init SIGFE
-sem_open SIGFE
-sem_post SIGFE
-sem_timedwait SIGFE
-sem_trywait SIGFE
-sem_unlink SIGFE
-sem_wait SIGFE
-semctl SIGFE
-semget SIGFE
-semop SIGFE
-send = cygwin_send SIGFE
-sendmsg = cygwin_sendmsg SIGFE
-sendto = cygwin_sendto SIGFE
-setbuf SIGFE
-_setbuf = setbuf SIGFE
-setbuffer SIGFE
-setdtablesize SIGFE
-_setdtablesize = setdtablesize SIGFE
-setegid SIGFE
-_setegid = setegid SIGFE
-_setegid32 = setegid32 SIGFE
-setenv SIGFE
-_setenv = setenv SIGFE
-seteuid SIGFE
-_seteuid = seteuid SIGFE
-_seteuid32 = seteuid32 SIGFE
-setgid SIGFE
-_setgid = setgid SIGFE
-_setgid32 = setgid32 SIGFE
-setgrent NOSIGFE
-_setgrent = setgrent NOSIGFE
-setgroups SIGFE
-_setgroups = setgroups SIGFE
-_setgroups32 = setgroups32 SIGFE
-sethostent NOSIGFE
-setitimer SIGFE
-setjmp NOSIGFE
-_setjmp = setjmp NOSIGFE
-setlinebuf SIGFE
-setlocale NOSIGFE
-_setlocale = setlocale NOSIGFE
-setlogmask NOSIGFE
-setmntent SIGFE
-_setmntent = setmntent SIGFE
-setmode = cygwin_setmode SIGFE
-_setmode = cygwin_setmode SIGFE
-setpassent NOSIGFE
-_setpassent = setpassent NOSIGFE
-setpgid SIGFE
-_setpgid = setpgid SIGFE
-setpgrp SIGFE
-_setpgrp = setpgrp SIGFE
-setpriority SIGFE
-setprogname NOSIGFE
-setprotoent = cygwin_setprotoent SIGFE
-setpwent NOSIGFE
-_setpwent = setpwent NOSIGFE
-setregid SIGFE
-_setregid = setregid SIGFE
-setregid32 SIGFE
-_setregid32 = setregid32 SIGFE
-setreuid SIGFE
-_setreuid = setreuid SIGFE
-setreuid32 SIGFE
-_setreuid32 = setreuid32 SIGFE
-setrlimit SIGFE
-_setrlimit = setrlimit SIGFE
-setservent = cygwin_setservent SIGFE
-setsid SIGFE
-_setsid = setsid SIGFE
-setsockopt = cygwin_setsockopt SIGFE
-setstate NOSIGFE
-settimeofday SIGFE
-_settimeofday = settimeofday SIGFE
-setuid SIGFE
-_setuid = setuid SIGFE
-_setuid32 = setuid32 SIGFE
-setusershell SIGFE
-setutent SIGFE
-_setutent = setutent SIGFE
-setutxent SIGFE
-setvbuf SIGFE
-_setvbuf = setvbuf SIGFE
-setxattr SIGFE
-sexecl = sexecve_is_bad SIGFE
-sexecle = sexecve_is_bad SIGFE
-sexeclp = sexecve_is_bad SIGFE
-sexeclpe = sexecve_is_bad SIGFE
-sexecp = sexecve_is_bad SIGFE
-sexecv = sexecve_is_bad SIGFE
-sexecve = sexecve_is_bad SIGFE
-sexecvpe = sexecve_is_bad SIGFE
-shm_open SIGFE
-shm_unlink SIGFE
-shmat SIGFE
-shmctl SIGFE
-shmdt SIGFE
-shmget SIGFE
-shutdown = cygwin_shutdown SIGFE
-sigaction SIGFE
-sigaddset SIGFE
-sigdelset SIGFE
-sigemptyset NOSIGFE
-sigfillset NOSIGFE
-sighold SIGFE
-sigignore SIGFE
-siginterrupt SIGFE
-sigismember SIGFE
-signal SIGFE
-__signbitd NOSIGFE
-__signbitf NOSIGFE
-__signgam NOSIGFE
-significand NOSIGFE
-significandf NOSIGFE
-sigpause SIGFE
-sigpending SIGFE
-sigprocmask SIGFE
-sigqueue SIGFE
-sigrelse SIGFE
-sigset SIGFE
-sigsuspend SIGFE
-sigwait SIGFE
-sigwaitinfo SIGFE
-sin NOSIGFE
-_sin = sin NOSIGFE
-sincos NOSIGFE
-sincosf NOSIGFE
-sinf NOSIGFE
-_sinf = sinf NOSIGFE
-sinh NOSIGFE
-_sinh = sinh NOSIGFE
-sinhf NOSIGFE
-_sinhf = sinhf NOSIGFE
-siprintf SIGFE
-_siprintf = siprintf SIGFE
-sleep SIGFE
-_sleep = sleep SIGFE
-snprintf SIGFE
-_snprintf = snprintf SIGFE
-socket = cygwin_socket SIGFE
-socketpair SIGFE
-spawnl SIGFE
-_spawnl = spawnl SIGFE
-spawnle SIGFE
-_spawnle = spawnle SIGFE
-spawnlp SIGFE
-_spawnlp = spawnlp SIGFE
-spawnlpe SIGFE
-_spawnlpe = spawnlpe SIGFE
-spawnv SIGFE
-_spawnv = spawnv SIGFE
-spawnve SIGFE
-_spawnve = spawnve SIGFE
-spawnvp SIGFE
-_spawnvp = spawnvp SIGFE
-spawnvpe SIGFE
-_spawnvpe = spawnvpe SIGFE
-sprintf SIGFE
-_sprintf = sprintf SIGFE
-sqrt NOSIGFE
-_sqrt = sqrt NOSIGFE
-sqrtf NOSIGFE
-_sqrtf = sqrtf NOSIGFE
-srand NOSIGFE
-_srand = srand NOSIGFE
-srand48 NOSIGFE
-_srand48 = srand48 NOSIGFE
-srandom NOSIGFE
-__srget SIGFE
-__srget_r SIGFE
-sscanf SIGFE
-_sscanf = sscanf SIGFE
-sscanf_r = _sscanf_r SIGFE
-_sscanf_r SIGFE
-stat SIGFE
-_stat = stat SIGFE
-_stat64 = stat64 SIGFE
-statfs SIGFE
-_statfs = statfs SIGFE
-statvfs SIGFE
-stpcpy NOSIGFE
-stpncpy NOSIGFE
-strcasecmp NOSIGFE
-_strcasecmp = strcasecmp NOSIGFE
-strcasestr NOSIGFE
-strcat NOSIGFE
-_strcat = strcat NOSIGFE
-strchr NOSIGFE
-_strchr = strchr NOSIGFE
-strcmp NOSIGFE
-_strcmp = strcmp NOSIGFE
-strcoll NOSIGFE
-_strcoll = strcoll NOSIGFE
-strcpy NOSIGFE
-_strcpy = strcpy NOSIGFE
-strcspn NOSIGFE
-_strcspn = strcspn NOSIGFE
-strdup SIGFE
-_strdup = strdup SIGFE
-strerror SIGFE
-_strerror = strerror SIGFE
-strerror_r SIGFE
-_strerror_r = strerror_r SIGFE
-strftime SIGFE
-_strftime = strftime SIGFE
-strlcat NOSIGFE
-_strlcat = strlcat NOSIGFE
-strlcpy NOSIGFE
-_strlcpy = strlcpy NOSIGFE
-strlen NOSIGFE
-_strlen = strlen NOSIGFE
-strlwr NOSIGFE
-_strlwr = strlwr NOSIGFE
-strncasecmp NOSIGFE
-_strncasecmp = strncasecmp NOSIGFE
-strncat NOSIGFE
-_strncat = strncat NOSIGFE
-strncmp NOSIGFE
-_strncmp = strncmp NOSIGFE
-strncpy NOSIGFE
-_strncpy = strncpy NOSIGFE
-strndup SIGFE
-strnlen NOSIGFE
-strpbrk NOSIGFE
-_strpbrk = strpbrk NOSIGFE
-strptime SIGFE
-_strptime = strptime SIGFE
-strrchr NOSIGFE
-_strrchr = strrchr NOSIGFE
-strsep NOSIGFE
-_strsep = strsep NOSIGFE
-strsignal SIGFE
-strspn NOSIGFE
-_strspn = strspn NOSIGFE
-strstr NOSIGFE
-_strstr = strstr NOSIGFE
-strtod SIGFE
-_strtod = strtod SIGFE
-strtodf = strtof SIGFE
-_strtodf = strtof SIGFE
-strtof SIGFE
-strtoimax = strtoll NOSIGFE
-strtok NOSIGFE
-_strtok = strtok NOSIGFE
-strtok_r NOSIGFE
-_strtok_r = strtok_r NOSIGFE
-strtol NOSIGFE
-_strtol = strtol NOSIGFE
-_strtold SIGFE
-strtoll NOSIGFE
-_strtoll = strtoll NOSIGFE
-strtosigno NOSIGFE
-strtoul NOSIGFE
-_strtoul = strtoul NOSIGFE
-strtoull NOSIGFE
-_strtoull = strtoull NOSIGFE
-strtoumax = strtoull NOSIGFE
-strupr NOSIGFE
-_strupr = strupr NOSIGFE
-strxfrm NOSIGFE
-_strxfrm = strxfrm NOSIGFE
-swab NOSIGFE
-_swab = swab NOSIGFE
-__swbuf SIGFE
-__swbuf_r SIGFE
-symlink SIGFE
-_symlink = symlink SIGFE
-symlinkat SIGFE
-sync SIGFE
-sysconf SIGFE
-_sysconf = sysconf SIGFE
-syslog SIGFE
-_syslog = syslog SIGFE
-system SIGFE
-_system = system SIGFE
-tan NOSIGFE
-_tan = tan NOSIGFE
-tanf NOSIGFE
-_tanf = tanf NOSIGFE
-tanh NOSIGFE
-_tanh = tanh NOSIGFE
-tanhf NOSIGFE
-_tanhf = tanhf NOSIGFE
-tcdrain SIGFE
-_tcdrain = tcdrain SIGFE
-tcflow SIGFE
-_tcflow = tcflow SIGFE
-tcflush SIGFE
-_tcflush = tcflush SIGFE
-tcgetattr SIGFE
-_tcgetattr = tcgetattr SIGFE
-tcgetpgrp SIGFE
-_tcgetpgrp = tcgetpgrp SIGFE
-tcsendbreak SIGFE
-_tcsendbreak = tcsendbreak SIGFE
-tcsetattr SIGFE
-_tcsetattr = tcsetattr SIGFE
-tcsetpgrp SIGFE
-_tcsetpgrp = tcsetpgrp SIGFE
-tdelete SIGFE
-tdestroy NOSIGFE
-telldir SIGFE
-_telldir = telldir SIGFE
-_telldir64 = telldir64 SIGFE
-tempnam SIGFE
-_tempnam = tempnam SIGFE
-tfind NOSIGFE
-tgamma NOSIGFE
-tgammaf NOSIGFE
-time SIGFE
-_time = time SIGFE
-timegm NOSIGFE
-timelocal SIGFE
-timer_create SIGFE
-timer_delete SIGFE
-timer_gettime SIGFE
-timer_settime SIGFE
-times SIGFE
-_times = times SIGFE
-timezone SIGFE
-tmpfile SIGFE
-_tmpfile = tmpfile SIGFE
-_tmpfile64 = tmpfile64 SIGFE
-tmpnam SIGFE
-_tmpnam = tmpnam SIGFE
-toascii NOSIGFE
-_toascii = toascii NOSIGFE
-tolower NOSIGFE
-_tolower = tolower NOSIGFE
-toupper NOSIGFE
-_toupper = toupper NOSIGFE
-towctrans NOSIGFE
-towlower NOSIGFE
-towupper NOSIGFE
-trunc NOSIGFE
-truncate SIGFE
-_truncate = truncate SIGFE
-_truncate64 = truncate64 SIGFE
-truncf NOSIGFE
-tsearch SIGFE
-ttyname SIGFE
-_ttyname = ttyname SIGFE
-ttyname_r SIGFE
-ttyslot NOSIGFE
-twalk NOSIGFE
-tzset SIGFE
-_tzset = tzset SIGFE
-ualarm SIGFE
-_ualarm = ualarm SIGFE
-umask NOSIGFE
-_umask = umask NOSIGFE
-umount SIGFE
-_umount = umount SIGFE
-uname SIGFE
-_uname = uname SIGFE
-ungetc SIGFE
-_ungetc = ungetc SIGFE
-ungetwc SIGFE
-unlink SIGFE
-_unlink = unlink SIGFE
-unlinkat SIGFE
-unlockpt NOSIGFE
-unsetenv SIGFE
-_unsetenv = unsetenv SIGFE
-updwtmp SIGFE
-updwtmpx SIGFE
-usleep SIGFE
-_usleep = usleep SIGFE
-utime SIGFE
-_utime = utime SIGFE
-utimensat SIGFE
-utimes SIGFE
-_utimes = utimes SIGFE
-utmpname SIGFE
-_utmpname = utmpname SIGFE
-utmpxname SIGFE
-valloc SIGFE
-vasnprintf SIGFE
-vasprintf SIGFE
-_vasprintf = vasprintf SIGFE
-vasprintf_r = _vasprintf_r SIGFE
-_vasprintf_r SIGFE
-vdprintf SIGFE
-verr SIGFE
-verrx SIGFE
-vfiprintf SIGFE
-_vfiprintf = vfiprintf SIGFE
-vfork SIGFE
-_vfork = vfork SIGFE
-vfprintf SIGFE
-_vfprintf = vfprintf SIGFE
-vfscanf SIGFE
-_vfscanf = vfscanf SIGFE
-vfscanf_r = _vfscanf_r SIGFE
-_vfscanf_r SIGFE
-vhangup SIGFE
-_vhangup = vhangup SIGFE
-vprintf SIGFE
-_vprintf = vprintf SIGFE
-vscanf SIGFE
-_vscanf = vscanf SIGFE
-vscanf_r = _vscanf_r SIGFE
-_vscanf_r SIGFE
-vsnprintf SIGFE
-_vsnprintf = vsnprintf SIGFE
-vsprintf SIGFE
-_vsprintf = vsprintf SIGFE
-vsscanf SIGFE
-_vsscanf = vsscanf SIGFE
-vsscanf_r = _vsscanf_r SIGFE
-_vsscanf_r SIGFE
-vsyslog SIGFE
-vwarn SIGFE
-vwarnx SIGFE
-wait SIGFE
-_wait = wait SIGFE
-wait3 SIGFE
-wait4 SIGFE
-waitpid SIGFE
-_waitpid = waitpid SIGFE
-warn SIGFE
-warnx SIGFE
-wcpcpy NOSIGFE
-wcpncpy NOSIGFE
-wcrtomb NOSIGFE
-wcscat NOSIGFE
-wcschr NOSIGFE
-wcscmp NOSIGFE
-_wcscmp = wcscmp NOSIGFE
-wcscoll NOSIGFE
-wcscpy NOSIGFE
-wcscspn NOSIGFE
-wcslcat NOSIGFE
-wcslcpy NOSIGFE
-wcslen NOSIGFE
-_wcslen = wcslen NOSIGFE
-wcsncat NOSIGFE
-wcsncmp NOSIGFE
-wcsncpy NOSIGFE
-wcspbrk NOSIGFE
-wcsrchr NOSIGFE
-wcsrtombs NOSIGFE
-wcsspn NOSIGFE
-wcsstr NOSIGFE
-wcstol NOSIGFE
-wcstoll NOSIGFE
-wcstombs NOSIGFE
-_wcstombs = wcstombs NOSIGFE
-wcstoul NOSIGFE
-wcstoull NOSIGFE
-wcswidth NOSIGFE
-wcsxfrm NOSIGFE
-wctob NOSIGFE
-wctomb NOSIGFE
-_wctomb = wctomb NOSIGFE
-wctrans NOSIGFE
-wctype NOSIGFE
-wcwidth NOSIGFE
-wmemchr NOSIGFE
-wmemcmp NOSIGFE
-wmemcpy NOSIGFE
-wmemmove NOSIGFE
-wmemset NOSIGFE
-write SIGFE
-_write = write SIGFE
-writev SIGFE
-_writev = writev SIGFE
-y0 NOSIGFE
-y0f NOSIGFE
-y1 NOSIGFE
-y1f NOSIGFE
-yn NOSIGFE
-ynf NOSIGFE
diff --git a/winsup/cygwin/cygwin.sc b/winsup/cygwin/cygwin.sc
deleted file mode 100644
index 78e388e..0000000
--- a/winsup/cygwin/cygwin.sc
+++ /dev/null
@@ -1,141 +0,0 @@
-OUTPUT_FORMAT(pei-i386)
-SECTIONS
-{
- .text __image_base__ + __section_alignment__ :
- {
- *(.init)
- *(.text)
- *(SORT(.text$*))
- *(.glue_7t)
- *(.glue_7)
- ___CTOR_LIST__ = .; __CTOR_LIST__ = .;
- LONG (-1); *(SORT(.ctors.*)); *(.ctors); *(.ctor); LONG (0);
- ___DTOR_LIST__ = .; __DTOR_LIST__ = .;
- LONG (-1); *(SORT(.dtors.*)); *(.dtors); *(.dtor); LONG (0);
- *(.fini)
- /* ??? Why is .gcc_exc here? */
- *(.gcc_exc)
- etext = .;
- *(.gcc_except_table)
- }
- .autoload_text ALIGN(__section_alignment__) :
- {
- *(.*_autoload_text);
- }
- /* The Cygwin DLL uses a section to avoid copying certain data
- on fork. This used to be named ".data". The linker used
- to include this between __data_start__ and __data_end__, but that
- breaks building the cygwin32 dll. Instead, we name the section
- ".data_cygwin_nocopy" and explictly include it after __data_end__. */
- .data ALIGN(__section_alignment__) :
- {
- __data_start__ = .;
- *(.data)
- *(.data2)
- *(SORT(.data$*))
- __data_end__ = .;
- *(.data_cygwin_nocopy)
- }
- .rdata ALIGN(__section_alignment__) :
- {
- *(.rdata)
- *(SORT(.rdata$*))
- *(.eh_frame)
- }
- .pdata ALIGN(__section_alignment__) :
- {
- *(.pdata)
- }
- .bss ALIGN(__section_alignment__) :
- {
- __bss_start__ = .;
- *(.bss)
- *(COMMON)
- __bss_end__ = .;
- }
- .edata ALIGN(__section_alignment__) :
- {
- *(.edata)
- }
- .rsrc BLOCK(__section_alignment__) :
- {
- *(.rsrc)
- *(SORT(.rsrc$*))
- }
- .reloc BLOCK(__section_alignment__) :
- {
- *(.reloc)
- }
- .cygwin_dll_common ALIGN(__section_alignment__):
- {
- *(.cygwin_dll_common)
- }
- .gnu_debuglink_overlay ALIGN(__section_alignment__) (NOLOAD):
- {
- BYTE(0) /* c */
- BYTE(0) /* y */
- BYTE(0) /* g */
- BYTE(0) /* w */
- BYTE(0) /* i */
- BYTE(0) /* n */
- BYTE(0) /* 1 */
- BYTE(0) /* . */
- BYTE(0) /* d */
- BYTE(0) /* b */
- BYTE(0) /* g */
- BYTE(0) /* \0 */
- LONG(0) /* checksum */
- }
- .idata ALIGN(__section_alignment__) :
- {
- /* This cannot currently be handled with grouped sections.
- See pe.em:sort_sections. */
- SORT(*)(.idata$2)
- SORT(*)(.idata$3)
- /* These zeroes mark the end of the import list. */
- LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
- SORT(*)(.idata$4)
- SORT(*)(.idata$5)
- SORT(*)(.idata$6)
- SORT(*)(.idata$7)
- . = ALIGN(16);
- __cygheap_start = ABSOLUTE(.);
- . = ALIGN(0x10000);
- }
- .cygheap ALIGN(__section_alignment__) :
- {
- __cygheap_mid = .;
- *(.cygheap)
- . = . + (512 * 1024);
- . = ALIGN(512 * 1024);
- }
- __cygheap_end = ABSOLUTE(.);
- __cygheap_end1 = __cygheap_mid + SIZEOF(.cygheap);
- /DISCARD/ :
- {
- *(.debug$S)
- *(.debug$T)
- *(.debug$F)
- *(.drectve)
- }
- .stab ALIGN(__section_alignment__) (NOLOAD) :
- {
- *(.stab)
- }
- .stabstr ALIGN(__section_alignment__) (NOLOAD) :
- {
- *(.stabstr)
- }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_aranges) }
- .debug_pubnames ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_info) }
- .debug_abbrev ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_abbrev) }
- .debug_line ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_line) }
- .debug_frame ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_frame) }
- .debug_str ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_str) }
- .debug_loc ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_loc) }
- .debug_macinfo ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_macinfo) }
- .debug_ranges ALIGN(__section_alignment__) (NOLOAD) : { *(.debug_ranges) }
-}
diff --git a/winsup/cygwin/cygwin_version.h b/winsup/cygwin/cygwin_version.h
deleted file mode 100644
index 18bdf24..0000000
--- a/winsup/cygwin/cygwin_version.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* cygwin_version.h: shared info for cygwin
-
- Copyright 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <cygwin/version.h>
-
-extern "C" {
-/* This is for programs that want to access the shared data. */
-class shared_info *cygwin_getshared (void);
-
-struct cygwin_version_info
-{
- unsigned short api_major;
- unsigned short api_minor;
- unsigned short dll_major;
- unsigned short dll_minor;
- unsigned short shared_data;
- unsigned short mount_registry;
- const char *dll_build_date;
- char shared_id[sizeof (CYGWIN_VERSION_DLL_IDENTIFIER) + 64];
-};
-
-extern cygwin_version_info cygwin_version;
-extern const char *cygwin_version_strings;
-}
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
deleted file mode 100644
index 961e605..0000000
--- a/winsup/cygwin/dcrt0.cc
+++ /dev/null
@@ -1,1222 +0,0 @@
-/* dcrt0.cc -- essentially the main() for the Cygwin dll
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "miscfuncs.h"
-#include <unistd.h>
-#include <stdlib.h>
-#include "glob.h"
-#include <ctype.h>
-#include "sigproc.h"
-#include "pinfo.h"
-#include "cygerrno.h"
-#define NEED_VFORK
-#include "perprocess.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "child_info_magic.h"
-#include "cygtls.h"
-#include "shared_info.h"
-#include "cygwin_version.h"
-#include "dll_init.h"
-#include "heap.h"
-#include "tls_pbuf.h"
-
-#define MAX_AT_FILE_LEVEL 10
-
-#define PREMAIN_LEN (sizeof (user_data->premain) / sizeof (user_data->premain[0]))
-
-extern "C" void cygwin_exit (int) __attribute__ ((noreturn));
-
-HANDLE NO_COPY hMainProc = (HANDLE) -1;
-HANDLE NO_COPY hMainThread;
-HANDLE NO_COPY hProcToken;
-HANDLE NO_COPY hProcImpToken;
-
-muto NO_COPY lock_process::locker;
-
-bool display_title;
-bool strip_title_path;
-bool allow_glob = true;
-bool NO_COPY in_forkee;
-
-int __argc_safe;
-int __argc;
-char **__argv;
-#ifdef NEWVFORK
-vfork_save NO_COPY *main_vfork;
-#endif
-
-static int NO_COPY envc;
-char NO_COPY **envp;
-
-extern "C" void __sinit (_reent *);
-
-_cygtls NO_COPY *_main_tls;
-
-bool NO_COPY cygwin_finished_initializing;
-
-MTinterface _mtinterf;
-
-bool NO_COPY _cygwin_testing;
-
-char NO_COPY almost_null[1];
-
-extern "C"
-{
- /* This is an exported copy of environ which can be used by DLLs
- which use cygwin.dll. */
- char **__cygwin_environ;
- char ***main_environ = &__cygwin_environ;
- /* __progname used in getopt error message */
- char *__progname;
- struct per_process __cygwin_user_data =
- {/* initial_sp */ 0, /* magic_biscuit */ 0,
- /* dll_major */ CYGWIN_VERSION_DLL_MAJOR,
- /* dll_major */ CYGWIN_VERSION_DLL_MINOR,
- /* impure_ptr_ptr */ NULL, /* envptr */ NULL,
- /* malloc */ malloc, /* free */ free,
- /* realloc */ realloc,
- /* fmode_ptr */ NULL, /* main */ NULL, /* ctors */ NULL,
- /* dtors */ NULL, /* data_start */ NULL, /* data_end */ NULL,
- /* bss_start */ NULL, /* bss_end */ NULL,
- /* calloc */ calloc,
- /* premain */ {NULL, NULL, NULL, NULL},
- /* run_ctors_p */ 0,
- /* unused */ {0, 0, 0, 0, 0, 0, 0},
- /* UNUSED forkee */ 0,
- /* hmodule */ NULL,
- /* api_major */ CYGWIN_VERSION_API_MAJOR,
- /* api_minor */ CYGWIN_VERSION_API_MINOR,
- /* unused2 */ {0, 0, 0, 0, 0, 0},
- /* threadinterface */ &_mtinterf,
- /* impure_ptr */ _GLOBAL_REENT,
- };
- bool ignore_case_with_glob;
- int _check_for_executable = true;
-};
-
-int NO_COPY __api_fatal_exit_val = 1;
-char *old_title;
-char title_buf[TITLESIZE + 1];
-
-static void
-do_global_dtors ()
-{
- void (**pfunc) () = user_data->dtors;
- if (pfunc)
- {
- user_data->dtors = NULL;
- while (*++pfunc)
- (*pfunc) ();
- }
-}
-
-static void __stdcall
-do_global_ctors (void (**in_pfunc)(), int force)
-{
- if (!force && in_forkee)
- return; // inherit constructed stuff from parent pid
-
- /* Run ctors backwards, so skip the first entry and find how many
- there are, then run them. */
-
- void (**pfunc) () = in_pfunc;
-
- while (*++pfunc)
- ;
- while (--pfunc > in_pfunc)
- (*pfunc) ();
-}
-
-/*
- * Replaces @file in the command line with the contents of the file.
- * There may be multiple @file's in a single command line
- * A \@file is replaced with @file so that echo \@foo would print
- * @foo and not the contents of foo.
- */
-static bool __stdcall
-insert_file (char *name, char *&cmd)
-{
- HANDLE f;
- DWORD size;
- tmp_pathbuf tp;
-
- PWCHAR wname = tp.w_get ();
- sys_mbstowcs (wname, NT_MAX_PATH, name + 1);
- f = CreateFileW (wname,
- GENERIC_READ, /* open for reading */
- FILE_SHARE_READ, /* share for reading */
- &sec_none_nih, /* default security */
- OPEN_EXISTING, /* existing file only */
- FILE_ATTRIBUTE_NORMAL,/* normal file */
- NULL); /* no attr. template */
-
- if (f == INVALID_HANDLE_VALUE)
- {
- debug_printf ("couldn't open file '%s', %E", name);
- return false;
- }
-
- /* This only supports files up to about 4 billion bytes in
- size. I am making the bold assumption that this is big
- enough for this feature */
- size = GetFileSize (f, NULL);
- if (size == 0xFFFFFFFF)
- {
- debug_printf ("couldn't get file size for '%s', %E", name);
- return false;
- }
-
- int new_size = strlen (cmd) + size + 2;
- char *tmp = (char *) malloc (new_size);
- if (!tmp)
- {
- debug_printf ("malloc failed, %E");
- return false;
- }
-
- /* realloc passed as it should */
- DWORD rf_read;
- BOOL rf_result;
- rf_result = ReadFile (f, tmp, size, &rf_read, NULL);
- CloseHandle (f);
- if (!rf_result || (rf_read != size))
- {
- debug_printf ("ReadFile failed, %E");
- return false;
- }
-
- tmp[size++] = ' ';
- strcpy (tmp + size, cmd);
- cmd = tmp;
- return true;
-}
-
-static inline int
-isquote (char c)
-{
- char ch = c;
- return ch == '"' || ch == '\'';
-}
-
-/* Step over a run of characters delimited by quotes */
-static /*__inline*/ char *
-quoted (char *cmd, int winshell)
-{
- char *p;
- char quote = *cmd;
-
- if (!winshell)
- {
- char *p;
- strcpy (cmd, cmd + 1);
- if (*(p = strechr (cmd, quote)))
- strcpy (p, p + 1);
- return p;
- }
-
- const char *s = quote == '\'' ? "'" : "\\\"";
- /* This must have been run from a Windows shell, so preserve
- quotes for globify to play with later. */
- while (*cmd && *++cmd)
- if ((p = strpbrk (cmd, s)) == NULL)
- {
- cmd = strchr (cmd, '\0'); // no closing quote
- break;
- }
- else if (*p == '\\')
- cmd = ++p;
- else if (quote == '"' && p[1] == '"')
- {
- *p = '\\';
- cmd = ++p; // a quoted quote
- }
- else
- {
- cmd = p + 1; // point to after end
- break;
- }
- return cmd;
-}
-
-/* Perform a glob on word if it contains wildcard characters.
- Also quote every character between quotes to force glob to
- treat the characters literally. */
-static int __stdcall
-globify (char *word, char **&argv, int &argc, int &argvlen)
-{
- if (*word != '~' && strpbrk (word, "?*[\"\'(){}") == NULL)
- return 0;
-
- int n = 0;
- char *p, *s;
- int dos_spec = isdrive (word);
- if (!dos_spec && isquote (*word) && word[1] && word[2])
- dos_spec = isdrive (word + 1);
-
- /* We'll need more space if there are quoting characters in
- word. If that is the case, doubling the size of the
- string should provide more than enough space. */
- if (strpbrk (word, "'\""))
- n = strlen (word);
- char pattern[strlen (word) + ((dos_spec + 1) * n) + 1];
-
- /* Fill pattern with characters from word, quoting any
- characters found within quotes. */
- for (p = pattern, s = word; *s != '\000'; s++, p++)
- if (!isquote (*s))
- {
- if (dos_spec && *s == '\\')
- *p++ = '\\';
- *p = *s;
- }
- else
- {
- char quote = *s;
- while (*++s && *s != quote)
- {
- if (dos_spec || *s != '\\')
- /* nothing */;
- else if (s[1] == quote || s[1] == '\\')
- s++;
- *p++ = '\\';
- *p++ = *s;
- }
- if (*s == quote)
- p--;
- if (*s == '\0')
- break;
- }
-
- *p = '\0';
-
- glob_t gl;
- gl.gl_offs = 0;
-
- /* Attempt to match the argument. Return just word (minus quoting) if no match. */
- if (glob (pattern, GLOB_TILDE | GLOB_NOCHECK | GLOB_BRACE | GLOB_QUOTE, NULL, &gl) || !gl.gl_pathc)
- return 0;
-
- /* Allocate enough space in argv for the matched filenames. */
- n = argc;
- if ((argc += gl.gl_pathc) > argvlen)
- {
- argvlen = argc + 10;
- argv = (char **) realloc (argv, (1 + argvlen) * sizeof (argv[0]));
- }
-
- /* Copy the matched filenames to argv. */
- char **gv = gl.gl_pathv;
- char **av = argv + n;
- while (*gv)
- {
- debug_printf ("argv[%d] = '%s'", n++, *gv);
- *av++ = *gv++;
- }
-
- /* Clean up after glob. */
- free (gl.gl_pathv);
- return 1;
-}
-
-/* Build argv, argc from string passed from Windows. */
-
-static void __stdcall
-build_argv (char *cmd, char **&argv, int &argc, int winshell)
-{
- int argvlen = 0;
- int nesting = 0; // monitor "nesting" from insert_file
-
- argc = 0;
- argvlen = 0;
- argv = NULL;
-
- /* Scan command line until there is nothing left. */
- while (*cmd)
- {
- /* Ignore spaces */
- if (issep (*cmd))
- {
- cmd++;
- continue;
- }
-
- /* Found the beginning of an argument. */
- char *word = cmd;
- char *sawquote = NULL;
- while (*cmd)
- {
- if (*cmd != '"' && (!winshell || *cmd != '\''))
- cmd++; // Skip over this character
- else
- /* Skip over characters until the closing quote */
- {
- sawquote = cmd;
- cmd = quoted (cmd, winshell && argc > 0);
- }
- if (issep (*cmd)) // End of argument if space
- break;
- }
- if (*cmd)
- *cmd++ = '\0'; // Terminate `word'
-
- /* Possibly look for @file construction assuming that this isn't
- the very first argument and the @ wasn't quoted */
- if (argc && sawquote != word && *word == '@')
- {
- if (++nesting > MAX_AT_FILE_LEVEL)
- api_fatal ("Too many levels of nesting for %s", word);
- if (insert_file (word, cmd))
- continue; // There's new stuff in cmd now
- }
-
- /* See if we need to allocate more space for argv */
- if (argc >= argvlen)
- {
- argvlen = argc + 10;
- argv = (char **) realloc (argv, (1 + argvlen) * sizeof (argv[0]));
- }
-
- /* Add word to argv file after (optional) wildcard expansion. */
- if (!winshell || !argc || !globify (word, argv, argc, argvlen))
- {
- debug_printf ("argv[%d] = '%s'", argc, word);
- argv[argc++] = word;
- }
- }
-
- argv[argc] = NULL;
-
- debug_printf ("argc %d", argc);
-}
-
-/* sanity and sync check */
-void __stdcall
-check_sanity_and_sync (per_process *p)
-{
- /* Sanity check to make sure developers didn't change the per_process */
- /* struct without updating SIZEOF_PER_PROCESS [it makes them think twice */
- /* about changing it]. */
- if (sizeof (per_process) != SIZEOF_PER_PROCESS)
- api_fatal ("per_process sanity check failed");
-
- /* Make sure that the app and the dll are in sync. */
-
- /* Complain if older than last incompatible change */
- if (p->dll_major < CYGWIN_VERSION_DLL_EPOCH)
- api_fatal ("cygwin DLL and APP are out of sync -- DLL version mismatch %d < %d",
- p->dll_major, CYGWIN_VERSION_DLL_EPOCH);
-
- /* magic_biscuit != 0 if using the old style version numbering scheme. */
- if (p->magic_biscuit != SIZEOF_PER_PROCESS)
- api_fatal ("Incompatible cygwin .dll -- incompatible per_process info %d != %d",
- p->magic_biscuit, SIZEOF_PER_PROCESS);
-
- /* Complain if incompatible API changes made */
- if (p->api_major > cygwin_version.api_major)
- api_fatal ("cygwin DLL and APP are out of sync -- API version mismatch %d > %d",
- p->api_major, cygwin_version.api_major);
-}
-
-child_info NO_COPY *child_proc_info = NULL;
-
-#define CYGWIN_GUARD (PAGE_EXECUTE_READWRITE | PAGE_GUARD)
-
-void
-child_info_fork::alloc_stack_hard_way (volatile char *b)
-{
- void *new_stack_pointer;
- MEMORY_BASIC_INFORMATION m;
- void *newbase;
- int newlen;
- bool guard;
-
- if (!VirtualQuery ((LPCVOID) &b, &m, sizeof m))
- api_fatal ("fork: couldn't get stack info, %E");
-
- LPBYTE curbot = (LPBYTE) m.BaseAddress + m.RegionSize;
-
- if (stacktop > (LPBYTE) m.AllocationBase && stacktop < curbot)
- {
- newbase = curbot;
- newlen = (LPBYTE) stackbottom - (LPBYTE) curbot;
- guard = false;
- }
- else
- {
- newbase = (LPBYTE) stacktop - (128 * 1024);
- newlen = (LPBYTE) stackbottom - (LPBYTE) newbase;
- guard = true;
- }
-
- if (!VirtualAlloc (newbase, newlen, MEM_RESERVE, PAGE_NOACCESS))
- api_fatal ("fork: can't reserve memory for stack %p - %p, %E",
- stacktop, stackbottom);
- new_stack_pointer = (void *) ((LPBYTE) stackbottom - (stacksize += 8192));
- if (!VirtualAlloc (new_stack_pointer, stacksize, MEM_COMMIT,
- PAGE_EXECUTE_READWRITE))
- api_fatal ("fork: can't commit memory for stack %p(%d), %E",
- new_stack_pointer, stacksize);
- if (!VirtualQuery ((LPCVOID) new_stack_pointer, &m, sizeof m))
- api_fatal ("fork: couldn't get new stack info, %E");
-
- if (guard)
- {
- m.BaseAddress = (LPBYTE) m.BaseAddress - 1;
- if (!VirtualAlloc ((LPVOID) m.BaseAddress, 1, MEM_COMMIT,
- CYGWIN_GUARD))
- api_fatal ("fork: couldn't allocate new stack guard page %p, %E",
- m.BaseAddress);
- }
- if (!VirtualQuery ((LPCVOID) m.BaseAddress, &m, sizeof m))
- api_fatal ("fork: couldn't get new stack info, %E");
- stacktop = m.BaseAddress;
- b[0] = '\0';
-}
-
-void *getstack (void *) __attribute__ ((noinline));
-volatile char *
-getstack (volatile char * volatile p)
-{
- *p ^= 1;
- *p ^= 1;
- return p - 4096;
-}
-
-/* extend the stack prior to fork longjmp */
-
-void
-child_info_fork::alloc_stack ()
-{
- volatile char * volatile esp;
- __asm__ volatile ("movl %%esp,%0": "=r" (esp));
- if (_tlsbase != stackbottom)
- alloc_stack_hard_way (esp);
- else
- {
- char *st = (char *) stacktop - 4096;
- while (_tlstop >= st)
- esp = getstack (esp);
- stacksize = 0;
- }
-}
-
-extern "C" void
-break_here ()
-{
- static int NO_COPY sent_break;
- if (!sent_break++)
- DebugBreak ();
- debug_printf ("break here");
-}
-
-static void
-initial_env ()
-{
- if (GetEnvironmentVariableA ("CYGWIN_TESTING", NULL, 0))
- _cygwin_testing = 1;
-
-#ifdef DEBUGGING
- char buf[NT_MAX_PATH];
- DWORD len;
-
- if (GetEnvironmentVariableA ("CYGWIN_SLEEP", buf, sizeof (buf) - 1))
- {
- DWORD ms = atoi (buf);
- console_printf ("Sleeping %d, pid %u %P\n", ms, GetCurrentProcessId ());
- Sleep (ms);
- if (!strace.active () && !dynamically_loaded)
- strace.hello ();
- }
- if (GetEnvironmentVariableA ("CYGWIN_DEBUG", buf, sizeof (buf) - 1))
- {
- char buf1[NT_MAX_PATH];
- len = GetModuleFileName (NULL, buf1, NT_MAX_PATH);
- strlwr (buf1);
- strlwr (buf);
- char *p = strpbrk (buf, ":=");
- if (!p)
- p = (char *) "gdb.exe -nw";
- else
- *p++ = '\0';
- if (strstr (buf1, buf))
- {
- error_start_init (p);
- try_to_debug ();
- console_printf ("*** Sending Break. gdb may issue spurious SIGTRAP message.\n");
- break_here ();
- }
- }
-#endif
-
-}
-
-child_info *
-get_cygwin_startup_info ()
-{
- STARTUPINFO si;
-
- GetStartupInfo (&si);
- child_info *res = (child_info *) si.lpReserved2;
-
- if (si.cbReserved2 < EXEC_MAGIC_SIZE || !res
- || res->intro != PROC_MAGIC_GENERIC || res->magic != CHILD_INFO_MAGIC)
- res = NULL;
- else
- {
- if ((res->intro & OPROC_MAGIC_MASK) == OPROC_MAGIC_GENERIC)
- multiple_cygwin_problem ("proc intro", res->intro, 0);
- else if (res->cygheap != (void *) &_cygheap_start)
- multiple_cygwin_problem ("cygheap base", (DWORD) res->cygheap,
- (DWORD) &_cygheap_start);
-
- unsigned should_be_cb = 0;
- switch (res->type)
- {
- case _PROC_FORK:
- in_forkee = true;
- should_be_cb = sizeof (child_info_fork);
- /* fall through */;
- case _PROC_SPAWN:
- case _PROC_EXEC:
- if (!should_be_cb)
- should_be_cb = sizeof (child_info_spawn);
- if (should_be_cb != res->cb)
- multiple_cygwin_problem ("proc size", res->cb, should_be_cb);
- else if (sizeof (fhandler_union) != res->fhandler_union_cb)
- multiple_cygwin_problem ("fhandler size", res->fhandler_union_cb, sizeof (fhandler_union));
- if (res->isstraced ())
- {
- res->ready (false);
- for (unsigned i = 0; !being_debugged () && i < 10000; i++)
- low_priority_sleep (0);
- strace.hello ();
- }
- break;
- default:
- system_printf ("unknown exec type %d", res->type);
- /* intentionally fall through */
- case _PROC_WHOOPS:
- res = NULL;
- break;
- }
- }
-
- return res;
-}
-
-#define dll_data_start &_data_start__
-#define dll_data_end &_data_end__
-#define dll_bss_start &_bss_start__
-#define dll_bss_end &_bss_end__
-
-void
-child_info_fork::handle_fork ()
-{
- cygheap_fixup_in_child (false);
- memory_init ();
- myself.thisproc (NULL);
- myself->uid = cygheap->user.real_uid;
- myself->gid = cygheap->user.real_gid;
-
- child_copy (parent, false,
- "dll data", dll_data_start, dll_data_end,
- "dll bss", dll_bss_start, dll_bss_end,
- "user heap", cygheap->user_heap.base, cygheap->user_heap.ptr,
- NULL);
- /* step 2 now that the dll has its heap filled in, we can fill in the
- user's data and bss since user_data is now filled out. */
- child_copy (parent, false,
- "data", user_data->data_start, user_data->data_end,
- "bss", user_data->bss_start, user_data->bss_end,
- NULL);
-
- if (fixup_mmaps_after_fork (parent))
- api_fatal ("recreate_mmaps_after_fork_failed");
-}
-
-void
-child_info_spawn::handle_spawn ()
-{
- extern void fixup_lockf_after_exec ();
- HANDLE h;
- cygheap_fixup_in_child (true);
- memory_init ();
- if (!moreinfo->myself_pinfo ||
- !DuplicateHandle (hMainProc, moreinfo->myself_pinfo, hMainProc, &h, 0,
- FALSE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE))
- h = NULL;
- myself.thisproc (h);
- __argc = moreinfo->argc;
- __argv = moreinfo->argv;
- envp = moreinfo->envp;
- envc = moreinfo->envc;
- if (!dynamically_loaded)
- cygheap->fdtab.fixup_after_exec ();
- if (__stdin >= 0)
- cygheap->fdtab.move_fd (__stdin, 0);
- if (__stdout >= 0)
- cygheap->fdtab.move_fd (__stdout, 1);
- cygheap->user.groups.clear_supp ();
-
- ready (true);
-
- /* Need to do this after debug_fixup_after_fork_exec or DEBUGGING handling of
- handles might get confused. */
- CloseHandle (child_proc_info->parent);
- child_proc_info->parent = NULL;
-
- signal_fixup_after_exec ();
- if (moreinfo->old_title)
- {
- old_title = strcpy (title_buf, moreinfo->old_title);
- cfree (moreinfo->old_title);
- }
- fixup_lockf_after_exec ();
-}
-
-static DEP_SYSTEM_POLICY_TYPE dep_system_policy = (DEP_SYSTEM_POLICY_TYPE) -1;
-
-static void
-disable_dep ()
-{
- DWORD ppolicy;
- BOOL perm;
-
- if (dep_system_policy < 0)
- {
- dep_system_policy = GetSystemDEPPolicy ();
- debug_printf ("DEP System Policy: %d", (int) dep_system_policy);
- }
- if (dep_system_policy < OptIn)
- return;
- if (!GetProcessDEPPolicy (hMainProc, &ppolicy, &perm))
- {
- debug_printf ("GetProcessDEPPolicy: %E");
- return;
- }
- debug_printf ("DEP Process Policy: %d (permanent = %d)", ppolicy, perm);
- if (ppolicy > 0 && !perm && !SetProcessDEPPolicy (0))
- debug_printf ("SetProcessDEPPolicy: %E");
-}
-
-void __stdcall
-dll_crt0_0 ()
-{
- init_global_security ();
- initial_env ();
-
- SetErrorMode (SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
-
- /* Initialize signal processing here, early, in the hopes that the creation
- of a thread early in the process will cause more predictability in memory
- layout for the main thread. */
- if (!dynamically_loaded)
- sigproc_init ();
-
- lock_process::init ();
- _impure_ptr = _GLOBAL_REENT;
- _impure_ptr->_stdin = &_impure_ptr->__sf[0];
- _impure_ptr->_stdout = &_impure_ptr->__sf[1];
- _impure_ptr->_stderr = &_impure_ptr->__sf[2];
- _impure_ptr->_current_locale = "C";
- user_data->impure_ptr = _impure_ptr;
- user_data->impure_ptr_ptr = &_impure_ptr;
-
- if (!DuplicateHandle (GetCurrentProcess (), GetCurrentProcess (),
- GetCurrentProcess (), &hMainProc, 0, FALSE,
- DUPLICATE_SAME_ACCESS))
- hMainProc = GetCurrentProcess ();
-
- DuplicateHandle (hMainProc, GetCurrentThread (), hMainProc,
- &hMainThread, 0, false, DUPLICATE_SAME_ACCESS);
-
- OpenProcessToken (hMainProc, MAXIMUM_ALLOWED, &hProcToken);
- set_cygwin_privileges (hProcToken);
-
- device::init ();
- do_global_ctors (&__CTOR_LIST__, 1);
- cygthread::init ();
-
- child_proc_info = get_cygwin_startup_info ();
- if (!child_proc_info)
- memory_init ();
- else
- {
- cygwin_user_h = child_proc_info->user_h;
- switch (child_proc_info->type)
- {
- case _PROC_FORK:
- fork_info->handle_fork ();
- break;
- case _PROC_SPAWN:
- case _PROC_EXEC:
- spawn_info->handle_spawn ();
- break;
- }
- }
-
- user_data->threadinterface->Init ();
-
- _cygtls::init ();
-
- /* Initialize events */
- events_init ();
- tty_list::init_session ();
-
- /* FIXME: This is hopefully a temporary hack, at least until the support
- case at Microsoft has been closed one way or the other.
-
- The disable_dep function disables DEP for all Cygwin processes if
- the process runs on a Windows Server 2008 with Terminal Services
- installed. This combination (TS+DEP) breaks *some* Cygwin
- applications. The Terminal Service specific DLL tsappcmp.dll
- changes the page protection of some pages in the application's text
- segment from PAGE_EXECUTE_WRITECOPY to PAGE_WRITECOPY for no
- apparent reason. This occurs before any Cygwin or applicaton code
- had a chance to run. MS has no explanation for this so far, but is
- rather busy trying to avoid giving support for this problem (as of
- 2008-11-11).
-
- Unfortunately disabling DEP seems to have a not negligible
- performance hit. In the long run, either MS has to fix their
- problem, or we have to find a better workaround, if any exists.
- Idle idea: Adding EXECUTE protection to all text segment pages? */
- if (wincap.ts_has_dep_problem ())
- disable_dep ();
-
- debug_printf ("finished dll_crt0_0 initialization");
-}
-
-/* Take over from libc's crt0.o and start the application. Note the
- various special cases when Cygwin DLL is being runtime loaded (as
- opposed to being link-time loaded by Cygwin apps) from a non
- cygwin app via LoadLibrary. */
-void
-dll_crt0_1 (void *)
-{
- if (dynamically_loaded)
- sigproc_init ();
- check_sanity_and_sync (user_data);
-
- /* Initialize malloc and then call user_shared_initialize since it relies
- on a functioning malloc and it's possible that the user's program may
- have overridden malloc. We only know about that at this stage,
- unfortunately. */
- malloc_init ();
- user_shared_initialize ();
-
-#ifdef CGF
- int i = 0;
- const int n = 2 * 1024 * 1024;
- while (i--)
- small_printf ("cmalloc returns %p\n", cmalloc (HEAP_STR, n));
-#endif
-
- ProtectHandle (hMainProc);
- ProtectHandle (hMainThread);
-
- cygheap->cwd.init ();
-
- /* Initialize pthread mainthread when not forked and it is safe to call new,
- otherwise it is reinitalized in fixup_after_fork */
- if (!in_forkee)
- pthread::init_mainthread ();
-
-#ifdef DEBUGGING
- strace.microseconds ();
-#endif
-
- create_signal_arrived (); /* FIXME: move into wait_sig? */
-
- /* Initialize debug muto, if DLL is built with --enable-debugging.
- Need to do this before any helper threads start. */
- debug_init ();
-
-#ifdef NEWVFORK
- cygheap->fdtab.vfork_child_fixup ();
- main_vfork = vfork_storage.create ();
-#endif
-
- cygbench ("pre-forkee");
- if (in_forkee)
- {
- /* If we've played with the stack, stacksize != 0. That means that
- fork() was invoked from other than the main thread. Make sure that
- frame pointer is referencing the new stack so that the OS knows what
- to do when it needs to increase the size of the stack.
-
- NOTE: Don't do anything that involves the stack until you've completed
- this step. */
- if (fork_info->stacksize)
- {
- _tlsbase = (char *) fork_info->stackbottom;
- _tlstop = (char *) fork_info->stacktop;
- _my_tls.init_exception_handler (_cygtls::handle_exceptions);
- }
-
- longjmp (fork_info->jmp, true);
- }
-
-#ifdef DEBUGGING
- {
- extern void fork_init ();
- fork_init ();
- }
-#endif
- pinfo_init (envp, envc);
-
- if (!old_title && GetConsoleTitle (title_buf, TITLESIZE))
- old_title = title_buf;
-
- /* Allocate cygheap->fdtab */
- dtable_init ();
-
- uinfo_init (); /* initialize user info */
-
- wait_for_sigthread ();
- extern DWORD threadfunc_ix;
- if (!threadfunc_ix)
- system_printf ("internal error: couldn't determine location of thread function on stack. Expect signal problems.");
-
- /* Connect to tty. */
- tty::init_session ();
-
- if (!__argc)
- {
- PWCHAR wline = GetCommandLineW ();
- size_t size = sys_wcstombs (NULL, 0, wline);
- char *line = (char *) alloca (size);
- sys_wcstombs (line, size, wline);
-
- /* Scan the command line and build argv. Expand wildcards if not
- called from another cygwin process. */
- build_argv (line, __argv, __argc,
- NOTSTATE (myself, PID_CYGPARENT) && allow_glob);
-
- /* Convert argv[0] to posix rules if it's currently blatantly
- win32 style. */
- if ((strchr (__argv[0], ':')) || (strchr (__argv[0], '\\')))
- {
- char *new_argv0 = (char *) malloc (NT_MAX_PATH);
- cygwin_conv_path (CCP_WIN_A_TO_POSIX | CCP_RELATIVE, __argv[0],
- new_argv0, NT_MAX_PATH);
- __argv[0] = (char *) realloc (new_argv0, strlen (new_argv0) + 1);
- }
- }
-
- __argc_safe = __argc;
- if (user_data->premain[0])
- for (unsigned int i = 0; i < PREMAIN_LEN / 2; i++)
- user_data->premain[i] (__argc, __argv, user_data);
-
- /* Set up standard fds in file descriptor table. */
- cygheap->fdtab.stdio_init ();
-
- /* Set up __progname for getopt error call. */
- if (__argv[0] && (__progname = strrchr (__argv[0], '/')))
- ++__progname;
- else
- __progname = __argv[0];
- if (__progname)
- {
- char *cp = strchr (__progname, '\0') - 4;
- if (cp > __progname && ascii_strcasematch (cp, ".exe"))
- *cp = '\0';
- }
-
- /* Set new console title if appropriate. */
-
- if (display_title && !dynamically_loaded)
- {
- char *cp = __progname;
- if (strip_title_path)
- for (char *ptr = cp; *ptr && *ptr != ' '; ptr++)
- if (isdirsep (*ptr))
- cp = ptr + 1;
- set_console_title (cp);
- }
-
- cygwin_finished_initializing = true;
- /* Call init of loaded dlls. */
- dlls.init ();
-
- /* Execute any specified "premain" functions */
- if (user_data->premain[PREMAIN_LEN / 2])
- for (unsigned int i = PREMAIN_LEN / 2; i < PREMAIN_LEN; i++)
- user_data->premain[i] (__argc, __argv, user_data);
-
- debug_printf ("user_data->main %p", user_data->main);
-
- if (dynamically_loaded)
- {
- set_errno (0);
- return;
- }
-
- /* Disable case-insensitive globbing */
- ignore_case_with_glob = false;
-
- set_errno (0);
-
- MALLOC_CHECK;
- cygbench (__progname);
-
- /* Flush signals and ensure that signal thread is up and running. Can't
- do this for noncygwin case since the signal thread is blocked due to
- LoadLibrary serialization. */
- ld_preload ();
- if (user_data->main)
- cygwin_exit (user_data->main (__argc, __argv, *user_data->envptr));
- __asm__ (" \n\
- .global __cygwin_exit_return \n\
-__cygwin_exit_return: \n\
-");
-}
-
-extern "C" void __stdcall
-_dll_crt0 ()
-{
- main_environ = user_data->envptr;
- if (in_forkee)
- fork_info->alloc_stack ();
- else
- __sinit (_impure_ptr);
-
- _main_tls = &_my_tls;
- _main_tls->call ((DWORD (*) (void *, void *)) dll_crt0_1, NULL);
-}
-
-void
-dll_crt0 (per_process *uptr)
-{
- /* Set the local copy of the pointer into the user space. */
- if (!in_forkee && uptr && uptr != user_data)
- {
- memcpy (user_data, uptr, per_process_overwrite);
- *(user_data->impure_ptr_ptr) = _GLOBAL_REENT;
- }
- _dll_crt0 ();
-}
-
-/* This must be called by anyone who uses LoadLibrary to load cygwin1.dll.
- You must have CYGTLS_PADSIZE bytes reserved at the bottom of the stack
- calling this function, and that storage must not be overwritten until you
- unload cygwin1.dll, as it is used for _my_tls. It is best to load
- cygwin1.dll before spawning any additional threads in your process.
-
- See winsup/testsuite/cygload for an example of how to use cygwin1.dll
- from MSVC and non-cygwin MinGW applications. */
-extern "C" void
-cygwin_dll_init ()
-{
- static char **envp;
- static int _fmode;
-
- user_data->magic_biscuit = sizeof (per_process);
-
- user_data->envptr = &envp;
- user_data->fmode_ptr = &_fmode;
-
- _dll_crt0 ();
-}
-
-extern "C" void
-__main (void)
-{
- do_global_ctors (user_data->ctors, false);
- atexit (do_global_dtors);
-}
-
-exit_states NO_COPY exit_state;
-
-void __stdcall
-do_exit (int status)
-{
- syscall_printf ("do_exit (%d), exit_state %d", status, exit_state);
-
-#ifdef NEWVFORK
- vfork_save *vf = vfork_storage.val ();
- if (vf != NULL && vf->pid < 0)
- {
- exit_state = ES_NOT_EXITING;
- vf->restore_exit (status);
- }
-#endif
-
- lock_process until_exit (true);
-
- if (exit_state < ES_GLOBAL_DTORS)
- {
- exit_state = ES_GLOBAL_DTORS;
- dll_global_dtors ();
- }
-
- if (exit_state < ES_EVENTS_TERMINATE)
- {
- exit_state = ES_EVENTS_TERMINATE;
- events_terminate ();
- }
-
- UINT n = (UINT) status;
- if (exit_state < ES_THREADTERM)
- {
- exit_state = ES_THREADTERM;
- cygthread::terminate ();
- }
-
- if (exit_state < ES_SIGNAL)
- {
- exit_state = ES_SIGNAL;
- signal (SIGCHLD, SIG_IGN);
- signal (SIGHUP, SIG_IGN);
- signal (SIGINT, SIG_IGN);
- signal (SIGQUIT, SIG_IGN);
- }
-
- if (exit_state < ES_CLOSEALL)
- {
- exit_state = ES_CLOSEALL;
- close_all_files ();
- }
-
- myself->stopsig = 0;
-
- if (exit_state < ES_HUP_PGRP)
- {
- exit_state = ES_HUP_PGRP;
- /* Kill orphaned children on group leader exit */
- if (myself->has_pgid_children && myself->pid == myself->pgid)
- {
- siginfo_t si = {0};
- si.si_signo = -SIGHUP;
- si.si_code = SI_KERNEL;
- sigproc_printf ("%d == pgrp %d, send SIG{HUP,CONT} to stopped children",
- myself->pid, myself->pgid);
- kill_pgrp (myself->pgid, si);
- }
- }
-
- if (exit_state < ES_HUP_SID)
- {
- exit_state = ES_HUP_SID;
- /* Kill the foreground process group on session leader exit */
- if (getpgrp () > 0 && myself->pid == myself->sid && real_tty_attached (myself))
- {
- tty *tp = cygwin_shared->tty[myself->ctty];
- sigproc_printf ("%d == sid %d, send SIGHUP to children",
- myself->pid, myself->sid);
-
- /* CGF FIXME: This can't be right. */
- if (tp->getsid () == myself->sid)
- tp->kill_pgrp (SIGHUP);
- }
-
- }
-
- if (exit_state < ES_TITLE)
- {
- exit_state = ES_TITLE;
- /* restore console title */
- if (old_title && display_title)
- set_console_title (old_title);
- }
-
- if (exit_state < ES_TTY_TERMINATE)
- {
- exit_state = ES_TTY_TERMINATE;
- cygwin_shared->tty.terminate ();
- }
-
- myself.exit (n);
-}
-
-static NO_COPY muto atexit_lock;
-
-extern "C" int
-cygwin_atexit (void (*function)(void))
-{
- int res;
- atexit_lock.init ("atexit_lock");
- atexit_lock.acquire ();
- res = atexit (function);
- atexit_lock.release ();
- return res;
-}
-
-extern "C" void
-cygwin_exit (int n)
-{
- if (atexit_lock)
- atexit_lock.acquire ();
- exit (n);
-}
-
-extern "C" void
-_exit (int n)
-{
- do_exit (((DWORD) n & 0xff) << 8);
-}
-
-extern "C" void
-__api_fatal (const char *fmt, ...)
-{
- char buf[4096];
- va_list ap;
-
- va_start (ap, fmt);
- int n = __small_sprintf (buf, "%P: *** fatal error - ");
- __small_vsprintf (buf + n, fmt, ap);
- va_end (ap);
- strace.prntf (_STRACE_SYSTEM, NULL, "%s", buf);
-
-#ifdef DEBUGGING
- try_to_debug ();
-#endif
- myself.exit (__api_fatal_exit_val);
-}
-
-void
-multiple_cygwin_problem (const char *what, unsigned magic_version, unsigned version)
-{
- if (_cygwin_testing && (strstr (what, "proc") || strstr (what, "cygheap")))
- {
- child_proc_info->type = _PROC_WHOOPS;
- return;
- }
-
- if (GetEnvironmentVariableA ("CYGWIN_MISMATCH_OK", NULL, 0))
- return;
-
- if (CYGWIN_VERSION_MAGIC_VERSION (magic_version) == version)
- system_printf ("%s magic number mismatch detected - %p/%p", what, magic_version, version);
- else
- api_fatal ("%s mismatch detected - %p/%p.\n\
-This problem is probably due to using incompatible versions of the cygwin DLL.\n\
-Search for cygwin1.dll using the Windows Start->Find/Search facility\n\
-and delete all but the most recent version. The most recent version *should*\n\
-reside in x:\\cygwin\\bin, where 'x' is the drive on which you have\n\
-installed the cygwin distribution. Rebooting is also suggested if you\n\
-are unable to find another cygwin DLL.",
- what, magic_version, version);
-}
-
-#ifdef DEBUGGING
-void __stdcall
-cygbench (const char *s)
-{
- if (GetEnvironmentVariableA ("CYGWIN_BENCH", NULL, 0))
- small_printf ("%05d ***** %s : %10d\n", GetCurrentProcessId (), s, strace.microseconds ());
-}
-#endif
diff --git a/winsup/cygwin/debug.cc b/winsup/cygwin/debug.cc
deleted file mode 100644
index 87d35c7..0000000
--- a/winsup/cygwin/debug.cc
+++ /dev/null
@@ -1,242 +0,0 @@
-/* debug.cc
-
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
- Red Hat, Inc.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "security.h"
-#include "cygerrno.h"
-#ifdef DEBUGGING
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#endif
-
-#undef CloseHandle
-
-#ifdef DEBUGGING
-/* Here lies extra debugging routines which help track down internal
- Cygwin problems when compiled with -DDEBUGGING . */
-#define NFREEH (sizeof (cygheap->debug.freeh) / sizeof (cygheap->debug.freeh[0]))
-
-class lock_debug
-{
- static muto locker;
- bool acquired;
- public:
- lock_debug () : acquired (0)
- {
- if (locker.name && !exit_state)
- acquired = !!locker.acquire (INFINITE);
- }
- void unlock ()
- {
- if (locker.name && acquired)
- {
- locker.release ();
- acquired = false;
- }
- }
- ~lock_debug () {unlock ();}
- friend void debug_init ();
-};
-
-muto NO_COPY lock_debug::locker;
-
-static bool __stdcall mark_closed (const char *, int, HANDLE, const char *, bool);
-
-void
-debug_init ()
-{
- lock_debug::locker.init ("debug_lock");
-}
-
-/* Find a registered handle in the linked list of handles. */
-static handle_list * __stdcall
-find_handle (HANDLE h)
-{
- handle_list *hl;
- for (hl = &cygheap->debug.starth; hl->next != NULL; hl = hl->next)
- if (hl->next->h == h)
- goto out;
- cygheap->debug.endh = hl;
- hl = NULL;
-
-out:
- return hl;
-}
-
-void
-verify_handle (const char *func, int ln, HANDLE h)
-{
- handle_list *hl = find_handle (h);
- if (!hl)
- return;
- system_printf ("%s:%d - multiple attempts to add handle %p", func, ln, h);
-
- system_printf (" previously allocated by %s:%d(%s<%p>) winpid %d",
- hl->func, hl->ln, hl->name, hl->h, hl->pid);
-}
-
-void
-setclexec (HANDLE oh, HANDLE nh, bool not_inheriting)
-{
- handle_list *hl = find_handle (oh);
- if (hl)
- {
- hl = hl->next;
- hl->inherited = !not_inheriting;
- hl->h = nh;
- }
-}
-
-/* Create a new handle record */
-static handle_list * __stdcall
-newh ()
-{
- handle_list *hl;
- lock_debug here;
-
- for (hl = cygheap->debug.freeh; hl < cygheap->debug.freeh + NFREEH; hl++)
- if (hl->name == NULL)
- return hl;
-
- return NULL;
-}
-
-void __stdcall
-modify_handle (const char *func, int ln, HANDLE h, const char *name, bool inh)
-{
- handle_list *hl = find_handle (h);
- if (!hl)
- {
- system_printf ("%s:%d handle %s<%p> not found", func, ln, name, h);
- return;
- }
- hl->next->inherited = inh;
- debug_printf ("%s:%d set handle %s<%p> inheritance flag to %d", func, ln,
- name, h, inh);
-}
-
-/* Add a handle to the linked list of known handles. */
-void __stdcall
-add_handle (const char *func, int ln, HANDLE h, const char *name, bool inh)
-{
- handle_list *hl;
- lock_debug here;
-
- if (!cygheap)
- return;
-
- if ((hl = find_handle (h)))
- {
- hl = hl->next;
- if (hl->name == name && hl->func == func && hl->ln == ln)
- return;
- system_printf ("%s:%d - multiple attempts to add handle %s<%p>", func,
- ln, name, h);
- system_printf (" previously allocated by %s:%d(%s<%p>) winpid %d",
- hl->func, hl->ln, hl->name, hl->h, hl->pid);
- return;
- }
-
- if ((hl = newh ()) == NULL)
- {
- here.unlock ();
- debug_printf ("couldn't allocate memory for %s(%d): %s(%p)",
- func, ln, name, h);
- return;
- }
- hl->h = h;
- hl->name = name;
- hl->func = func;
- hl->ln = ln;
- hl->next = NULL;
- hl->inherited = inh;
- hl->pid = GetCurrentProcessId ();
- cygheap->debug.endh->next = hl;
- cygheap->debug.endh = hl;
- SetHandleInformation (h, HANDLE_FLAG_PROTECT_FROM_CLOSE, HANDLE_FLAG_PROTECT_FROM_CLOSE);
- debug_printf ("protecting handle '%s'(%p), inherited flag %d", hl->name, hl->h, hl->inherited);
-}
-
-static void __stdcall
-delete_handle (handle_list *hl)
-{
- handle_list *hnuke = hl->next;
- debug_printf ("nuking handle '%s' (%p)", hnuke->name, hnuke->h);
- hl->next = hl->next->next;
- memset (hnuke, 0, sizeof (*hnuke));
-}
-
-void
-debug_fixup_after_fork_exec ()
-{
- /* No lock needed at this point */
- handle_list *hl;
- for (hl = &cygheap->debug.starth; hl->next != NULL; /* nothing */)
- if (hl->next->inherited)
- hl = hl->next;
- else
- delete_handle (hl); // removes hl->next
-}
-
-static bool __stdcall
-mark_closed (const char *func, int ln, HANDLE h, const char *name, bool force)
-{
- handle_list *hl;
- lock_debug here;
-
- if (!cygheap)
- return true;
-
- if ((hl = find_handle (h)) && !force)
- {
- hl = hl->next;
- here.unlock (); // race here
- system_printf ("attempt to close protected handle %s:%d(%s<%p>) winpid %d",
- hl->func, hl->ln, hl->name, hl->h, hl->pid);
- system_printf (" by %s:%d(%s<%p>)", func, ln, name, h);
- return false;
- }
-
- handle_list *hln;
- if (hl && (hln = hl->next) && strcmp (name, hln->name))
- {
- system_printf ("closing protected handle %s:%d(%s<%p>)",
- hln->func, hln->ln, hln->name, hln->h);
- system_printf (" by %s:%d(%s<%p>)", func, ln, name, h);
- }
-
- if (hl)
- delete_handle (hl);
-
- return true;
-}
-
-/* Close a known handle. Complain if !force and closing a known handle or
- if the name of the handle being closed does not match the registered name. */
-bool __stdcall
-close_handle (const char *func, int ln, HANDLE h, const char *name, bool force)
-{
- bool ret;
- lock_debug here;
-
- if (!mark_closed (func, ln, h, name, force))
- return false;
-
- SetHandleInformation (h, HANDLE_FLAG_PROTECT_FROM_CLOSE, 0);
- ret = CloseHandle (h);
-
-#if 1 /* Uncomment to see CloseHandle failures */
- if (!ret)
- small_printf ("CloseHandle(%s<%p>) failed %s:%d, %E\n", name, h, func, ln);
-#endif
- return ret;
-}
-#endif /*DEBUGGING*/
diff --git a/winsup/cygwin/debug.h b/winsup/cygwin/debug.h
deleted file mode 100644
index b2333e6..0000000
--- a/winsup/cygwin/debug.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/* debug.h
-
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef MALLOC_DEBUG
-#define MALLOC_CHECK do {} while (0)
-#else
-#include <stdlib.h>
-#include "dlmalloc.h"
-#define MALLOC_CHECK ({\
- debug_printf ("checking malloc pool");\
- mallinfo ();\
-})
-#endif
-
-#if !defined(_DEBUG_H_)
-#define _DEBUG_H_
-
-#define being_debugged() \
- (IsDebuggerPresent () /* || GetLastError () == ERROR_PROC_NOT_FOUND*/)
-
-#ifndef DEBUGGING
-# define cygbench(s)
-# define ForceCloseHandle CloseHandle
-# define ForceCloseHandle1(h, n) CloseHandle (h)
-# define ForceCloseHandle2(h, n) CloseHandle (h)
-# define ModifyHandle(h, n) do {} while (0)
-# define ProtectHandle(h) do {} while (0)
-# define ProtectHandle1(h,n) do {} while (0)
-# define ProtectHandle2(h,n) do {} while (0)
-# define ProtectHandleINH(h) do {} while (0)
-# define ProtectHandle1INH(h,n) do {} while (0)
-# define ProtectHandle2INH(h,n) do {} while (0)
-# define debug_init() do {} while (0)
-# define setclexec(h, nh, b) do {} while (0)
-# define debug_fixup_after_fork_exec() do {} while (0)
-# define VerifyHandle(h) do {} while (0)
-# define console_printf small_printf
-
-#else
-
-# ifdef NO_DEBUG_DEFINES
-# undef NO_DEBUG_DEFINES
-# else
-# define CloseHandle(h) \
- close_handle (__PRETTY_FUNCTION__, __LINE__, (h), #h, FALSE)
-# define ForceCloseHandle(h) \
- close_handle (__PRETTY_FUNCTION__, __LINE__, (h), #h, TRUE)
-# define ForceCloseHandle1(h,n) \
- close_handle (__PRETTY_FUNCTION__, __LINE__, (h), #n, TRUE)
-# define ForceCloseHandle2(h,n) \
- close_handle (__PRETTY_FUNCTION__, __LINE__, (h), n, TRUE)
-# endif
-
-# define ModifyHandle(h, n) modify_handle (__PRETTY_FUNCTION__, __LINE__, (h), #h, n)
-
-# define ProtectHandle(h) add_handle (__PRETTY_FUNCTION__, __LINE__, (h), #h)
-# define ProtectHandle1(h, n) add_handle (__PRETTY_FUNCTION__, __LINE__, (h), #n)
-# define ProtectHandle2(h, n) add_handle (__PRETTY_FUNCTION__, __LINE__, (h), n)
-# define ProtectHandleINH(h) add_handle (__PRETTY_FUNCTION__, __LINE__, (h), #h, 1)
-# define ProtectHandle1INH(h, n) add_handle (__PRETTY_FUNCTION__, __LINE__, (h), #n, 1)
-# define ProtectHandle2INH(h, n) add_handle (__PRETTY_FUNCTION__, __LINE__, (h), n, 1)
-# define VerifyHandle(h) verify_handle (__PRETTY_FUNCTION__, __LINE__, (h))
-
-void debug_init ();
-void __stdcall add_handle (const char *, int, HANDLE, const char *, bool = false)
- __attribute__ ((regparm (3)));
-void __stdcall verify_handle (const char *, int, HANDLE)
- __attribute__ ((regparm (3)));
-bool __stdcall close_handle (const char *, int, HANDLE, const char *, bool)
- __attribute__ ((regparm (3)));
-extern "C" void console_printf (const char *fmt,...);
-void __stdcall cygbench (const char *s) __attribute__ ((regparm (1)));
-void __stdcall modify_handle (const char *, int, HANDLE, const char *, bool)
- __attribute__ ((regparm (3)));
-void setclexec (HANDLE, HANDLE, bool);
-void debug_fixup_after_fork_exec ();
-
-struct handle_list
- {
- HANDLE h;
- const char *name;
- const char *func;
- int ln;
- bool inherited;
- DWORD pid;
- struct handle_list *next;
- };
-
-#endif /*DEBUGGING*/
-#endif /*_DEBUG_H_*/
diff --git a/winsup/cygwin/devices.cc b/winsup/cygwin/devices.cc
deleted file mode 100644
index 3391ad5..0000000
--- a/winsup/cygwin/devices.cc
+++ /dev/null
@@ -1,43495 +0,0 @@
-
-
-#include "winsup.h"
-#include <sys/types.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <string.h>
-#include "devices.h"
-#include "sys/cygwin.h"
-#include "tty.h"
-#include "pinfo.h"
-typedef const device *KR_device_t;
-
-
-static KR_device_t KR_find_keyword (const char *KR_keyword, int KR_length);
-
-
-
-const device dev_cygdrive_storage =
- {"/cygdrive", {FH_CYGDRIVE}, "/cygdrive"};
-
-const device dev_fs_storage =
- {"", {FH_FS}, ""};
-
-const device dev_proc_storage =
- {"", {FH_PROC}, ""};
-
-const device dev_procnet_storage =
- {"", {FH_PROCNET}, ""};
-
-const device dev_netdrive_storage =
- {"", {FH_NETDRIVE}, ""};
-
-#if 0
-const device dev_dev_storage =
- {"/dev", {FH_DEV}, "/dev"};
-#endif
-
-const device dev_registry_storage =
- {"", {FH_REGISTRY}, ""};
-
-const device dev_piper_storage =
- {"", {FH_PIPER}, ""};
-
-const device dev_pipew_storage =
- {"", {FH_PIPEW}, ""};
-
-const device dev_tcp_storage =
- {"", {FH_TCP}, ""};
-
-const device dev_udp_storage =
- {"", {FH_UDP}, ""};
-
-const device dev_stream_storage =
- {"", {FH_STREAM}, ""};
-
-const device dev_dgram_storage =
- {"", {FH_DGRAM}, ""};
-
-const device dev_bad_storage =
- {"", {FH_BAD}, ""};
-#define BRACK(x) {x}
-
-static const device dev_storage[] =
-{
- {"/dev", BRACK(FH_DEV), "/dev"},
- {"/dev/clipboard", BRACK(FH_CLIPBOARD), "\\dev\\clipboard"},
- {"/dev/com1", BRACK(FHDEV(DEV_SERIAL_MAJOR, 0)), "\\??\\COM1"},
- {"/dev/com2", BRACK(FHDEV(DEV_SERIAL_MAJOR, 1)), "\\??\\COM2"},
- {"/dev/com3", BRACK(FHDEV(DEV_SERIAL_MAJOR, 2)), "\\??\\COM3"},
- {"/dev/com4", BRACK(FHDEV(DEV_SERIAL_MAJOR, 3)), "\\??\\COM4"},
- {"/dev/com5", BRACK(FHDEV(DEV_SERIAL_MAJOR, 4)), "\\??\\COM5"},
- {"/dev/com6", BRACK(FHDEV(DEV_SERIAL_MAJOR, 5)), "\\??\\COM6"},
- {"/dev/com7", BRACK(FHDEV(DEV_SERIAL_MAJOR, 6)), "\\??\\COM7"},
- {"/dev/com8", BRACK(FHDEV(DEV_SERIAL_MAJOR, 7)), "\\??\\COM8"},
- {"/dev/com9", BRACK(FHDEV(DEV_SERIAL_MAJOR, 8)), "\\??\\COM9"},
- {"/dev/com10", BRACK(FHDEV(DEV_SERIAL_MAJOR, 9)), "\\??\\COM10"},
- {"/dev/com11", BRACK(FHDEV(DEV_SERIAL_MAJOR, 10)), "\\??\\COM11"},
- {"/dev/com12", BRACK(FHDEV(DEV_SERIAL_MAJOR, 11)), "\\??\\COM12"},
- {"/dev/com13", BRACK(FHDEV(DEV_SERIAL_MAJOR, 12)), "\\??\\COM13"},
- {"/dev/com14", BRACK(FHDEV(DEV_SERIAL_MAJOR, 13)), "\\??\\COM14"},
- {"/dev/com15", BRACK(FHDEV(DEV_SERIAL_MAJOR, 14)), "\\??\\COM15"},
- {"/dev/com16", BRACK(FHDEV(DEV_SERIAL_MAJOR, 15)), "\\??\\COM16"},
- {"/dev/conin", BRACK(FH_CONIN), "conin"},
- {"/dev/conout", BRACK(FH_CONOUT), "conout"},
- {"/dev/console", BRACK(FH_CONSOLE), "\\dev\\console"},
- {"/dev/dsp", BRACK(FH_OSS_DSP), "\\dev\\dsp"},
- {"/dev/fd0", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 0)), "\\Device\\Floppy0"},
- {"/dev/fd1", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 1)), "\\Device\\Floppy1"},
- {"/dev/fd2", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 2)), "\\Device\\Floppy2"},
- {"/dev/fd3", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 3)), "\\Device\\Floppy3"},
- {"/dev/fd4", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 4)), "\\Device\\Floppy4"},
- {"/dev/fd5", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 5)), "\\Device\\Floppy5"},
- {"/dev/fd6", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 6)), "\\Device\\Floppy6"},
- {"/dev/fd7", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 7)), "\\Device\\Floppy7"},
- {"/dev/fd8", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 8)), "\\Device\\Floppy8"},
- {"/dev/fd9", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 9)), "\\Device\\Floppy9"},
- {"/dev/fd10", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 10)), "\\Device\\Floppy10"},
- {"/dev/fd11", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 11)), "\\Device\\Floppy11"},
- {"/dev/fd12", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 12)), "\\Device\\Floppy12"},
- {"/dev/fd13", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 13)), "\\Device\\Floppy13"},
- {"/dev/fd14", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 14)), "\\Device\\Floppy14"},
- {"/dev/fd15", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 15)), "\\Device\\Floppy15"},
- {"/dev/fifo", BRACK(FH_FIFO), "\\dev\\fifo"},
- {"/dev/full", BRACK(FH_FULL), "\\dev\\full"},
- {"/dev/kmem", BRACK(FH_KMEM), "\\dev\\mem"},
- {"/dev/kmsg", BRACK(FH_KMSG), "\\Device\\MailSlot\\cygwin\\dev\\kmsg"},
- {"/dev/mem", BRACK(FH_MEM), "\\dev\\mem"},
- {"/dev/nst0", BRACK(FHDEV(DEV_TAPE_MAJOR, 128)), "\\Device\\Tape0"},
- {"/dev/nst1", BRACK(FHDEV(DEV_TAPE_MAJOR, 129)), "\\Device\\Tape1"},
- {"/dev/nst2", BRACK(FHDEV(DEV_TAPE_MAJOR, 130)), "\\Device\\Tape2"},
- {"/dev/nst3", BRACK(FHDEV(DEV_TAPE_MAJOR, 131)), "\\Device\\Tape3"},
- {"/dev/nst4", BRACK(FHDEV(DEV_TAPE_MAJOR, 132)), "\\Device\\Tape4"},
- {"/dev/nst5", BRACK(FHDEV(DEV_TAPE_MAJOR, 133)), "\\Device\\Tape5"},
- {"/dev/nst6", BRACK(FHDEV(DEV_TAPE_MAJOR, 134)), "\\Device\\Tape6"},
- {"/dev/nst7", BRACK(FHDEV(DEV_TAPE_MAJOR, 135)), "\\Device\\Tape7"},
- {"/dev/nst8", BRACK(FHDEV(DEV_TAPE_MAJOR, 136)), "\\Device\\Tape8"},
- {"/dev/nst9", BRACK(FHDEV(DEV_TAPE_MAJOR, 137)), "\\Device\\Tape9"},
- {"/dev/nst10", BRACK(FHDEV(DEV_TAPE_MAJOR, 138)), "\\Device\\Tape10"},
- {"/dev/nst11", BRACK(FHDEV(DEV_TAPE_MAJOR, 139)), "\\Device\\Tape11"},
- {"/dev/nst12", BRACK(FHDEV(DEV_TAPE_MAJOR, 140)), "\\Device\\Tape12"},
- {"/dev/nst13", BRACK(FHDEV(DEV_TAPE_MAJOR, 141)), "\\Device\\Tape13"},
- {"/dev/nst14", BRACK(FHDEV(DEV_TAPE_MAJOR, 142)), "\\Device\\Tape14"},
- {"/dev/nst15", BRACK(FHDEV(DEV_TAPE_MAJOR, 143)), "\\Device\\Tape15"},
- {"/dev/nst16", BRACK(FHDEV(DEV_TAPE_MAJOR, 144)), "\\Device\\Tape16"},
- {"/dev/nst17", BRACK(FHDEV(DEV_TAPE_MAJOR, 145)), "\\Device\\Tape17"},
- {"/dev/nst18", BRACK(FHDEV(DEV_TAPE_MAJOR, 146)), "\\Device\\Tape18"},
- {"/dev/nst19", BRACK(FHDEV(DEV_TAPE_MAJOR, 147)), "\\Device\\Tape19"},
- {"/dev/nst20", BRACK(FHDEV(DEV_TAPE_MAJOR, 148)), "\\Device\\Tape20"},
- {"/dev/nst21", BRACK(FHDEV(DEV_TAPE_MAJOR, 149)), "\\Device\\Tape21"},
- {"/dev/nst22", BRACK(FHDEV(DEV_TAPE_MAJOR, 150)), "\\Device\\Tape22"},
- {"/dev/nst23", BRACK(FHDEV(DEV_TAPE_MAJOR, 151)), "\\Device\\Tape23"},
- {"/dev/nst24", BRACK(FHDEV(DEV_TAPE_MAJOR, 152)), "\\Device\\Tape24"},
- {"/dev/nst25", BRACK(FHDEV(DEV_TAPE_MAJOR, 153)), "\\Device\\Tape25"},
- {"/dev/nst26", BRACK(FHDEV(DEV_TAPE_MAJOR, 154)), "\\Device\\Tape26"},
- {"/dev/nst27", BRACK(FHDEV(DEV_TAPE_MAJOR, 155)), "\\Device\\Tape27"},
- {"/dev/nst28", BRACK(FHDEV(DEV_TAPE_MAJOR, 156)), "\\Device\\Tape28"},
- {"/dev/nst29", BRACK(FHDEV(DEV_TAPE_MAJOR, 157)), "\\Device\\Tape29"},
- {"/dev/nst30", BRACK(FHDEV(DEV_TAPE_MAJOR, 158)), "\\Device\\Tape30"},
- {"/dev/nst31", BRACK(FHDEV(DEV_TAPE_MAJOR, 159)), "\\Device\\Tape31"},
- {"/dev/nst32", BRACK(FHDEV(DEV_TAPE_MAJOR, 160)), "\\Device\\Tape32"},
- {"/dev/nst33", BRACK(FHDEV(DEV_TAPE_MAJOR, 161)), "\\Device\\Tape33"},
- {"/dev/nst34", BRACK(FHDEV(DEV_TAPE_MAJOR, 162)), "\\Device\\Tape34"},
- {"/dev/nst35", BRACK(FHDEV(DEV_TAPE_MAJOR, 163)), "\\Device\\Tape35"},
- {"/dev/nst36", BRACK(FHDEV(DEV_TAPE_MAJOR, 164)), "\\Device\\Tape36"},
- {"/dev/nst37", BRACK(FHDEV(DEV_TAPE_MAJOR, 165)), "\\Device\\Tape37"},
- {"/dev/nst38", BRACK(FHDEV(DEV_TAPE_MAJOR, 166)), "\\Device\\Tape38"},
- {"/dev/nst39", BRACK(FHDEV(DEV_TAPE_MAJOR, 167)), "\\Device\\Tape39"},
- {"/dev/nst40", BRACK(FHDEV(DEV_TAPE_MAJOR, 168)), "\\Device\\Tape40"},
- {"/dev/nst41", BRACK(FHDEV(DEV_TAPE_MAJOR, 169)), "\\Device\\Tape41"},
- {"/dev/nst42", BRACK(FHDEV(DEV_TAPE_MAJOR, 170)), "\\Device\\Tape42"},
- {"/dev/nst43", BRACK(FHDEV(DEV_TAPE_MAJOR, 171)), "\\Device\\Tape43"},
- {"/dev/nst44", BRACK(FHDEV(DEV_TAPE_MAJOR, 172)), "\\Device\\Tape44"},
- {"/dev/nst45", BRACK(FHDEV(DEV_TAPE_MAJOR, 173)), "\\Device\\Tape45"},
- {"/dev/nst46", BRACK(FHDEV(DEV_TAPE_MAJOR, 174)), "\\Device\\Tape46"},
- {"/dev/nst47", BRACK(FHDEV(DEV_TAPE_MAJOR, 175)), "\\Device\\Tape47"},
- {"/dev/nst48", BRACK(FHDEV(DEV_TAPE_MAJOR, 176)), "\\Device\\Tape48"},
- {"/dev/nst49", BRACK(FHDEV(DEV_TAPE_MAJOR, 177)), "\\Device\\Tape49"},
- {"/dev/nst50", BRACK(FHDEV(DEV_TAPE_MAJOR, 178)), "\\Device\\Tape50"},
- {"/dev/nst51", BRACK(FHDEV(DEV_TAPE_MAJOR, 179)), "\\Device\\Tape51"},
- {"/dev/nst52", BRACK(FHDEV(DEV_TAPE_MAJOR, 180)), "\\Device\\Tape52"},
- {"/dev/nst53", BRACK(FHDEV(DEV_TAPE_MAJOR, 181)), "\\Device\\Tape53"},
- {"/dev/nst54", BRACK(FHDEV(DEV_TAPE_MAJOR, 182)), "\\Device\\Tape54"},
- {"/dev/nst55", BRACK(FHDEV(DEV_TAPE_MAJOR, 183)), "\\Device\\Tape55"},
- {"/dev/nst56", BRACK(FHDEV(DEV_TAPE_MAJOR, 184)), "\\Device\\Tape56"},
- {"/dev/nst57", BRACK(FHDEV(DEV_TAPE_MAJOR, 185)), "\\Device\\Tape57"},
- {"/dev/nst58", BRACK(FHDEV(DEV_TAPE_MAJOR, 186)), "\\Device\\Tape58"},
- {"/dev/nst59", BRACK(FHDEV(DEV_TAPE_MAJOR, 187)), "\\Device\\Tape59"},
- {"/dev/nst60", BRACK(FHDEV(DEV_TAPE_MAJOR, 188)), "\\Device\\Tape60"},
- {"/dev/nst61", BRACK(FHDEV(DEV_TAPE_MAJOR, 189)), "\\Device\\Tape61"},
- {"/dev/nst62", BRACK(FHDEV(DEV_TAPE_MAJOR, 190)), "\\Device\\Tape62"},
- {"/dev/nst63", BRACK(FHDEV(DEV_TAPE_MAJOR, 191)), "\\Device\\Tape63"},
- {"/dev/nst64", BRACK(FHDEV(DEV_TAPE_MAJOR, 192)), "\\Device\\Tape64"},
- {"/dev/nst65", BRACK(FHDEV(DEV_TAPE_MAJOR, 193)), "\\Device\\Tape65"},
- {"/dev/nst66", BRACK(FHDEV(DEV_TAPE_MAJOR, 194)), "\\Device\\Tape66"},
- {"/dev/nst67", BRACK(FHDEV(DEV_TAPE_MAJOR, 195)), "\\Device\\Tape67"},
- {"/dev/nst68", BRACK(FHDEV(DEV_TAPE_MAJOR, 196)), "\\Device\\Tape68"},
- {"/dev/nst69", BRACK(FHDEV(DEV_TAPE_MAJOR, 197)), "\\Device\\Tape69"},
- {"/dev/nst70", BRACK(FHDEV(DEV_TAPE_MAJOR, 198)), "\\Device\\Tape70"},
- {"/dev/nst71", BRACK(FHDEV(DEV_TAPE_MAJOR, 199)), "\\Device\\Tape71"},
- {"/dev/nst72", BRACK(FHDEV(DEV_TAPE_MAJOR, 200)), "\\Device\\Tape72"},
- {"/dev/nst73", BRACK(FHDEV(DEV_TAPE_MAJOR, 201)), "\\Device\\Tape73"},
- {"/dev/nst74", BRACK(FHDEV(DEV_TAPE_MAJOR, 202)), "\\Device\\Tape74"},
- {"/dev/nst75", BRACK(FHDEV(DEV_TAPE_MAJOR, 203)), "\\Device\\Tape75"},
- {"/dev/nst76", BRACK(FHDEV(DEV_TAPE_MAJOR, 204)), "\\Device\\Tape76"},
- {"/dev/nst77", BRACK(FHDEV(DEV_TAPE_MAJOR, 205)), "\\Device\\Tape77"},
- {"/dev/nst78", BRACK(FHDEV(DEV_TAPE_MAJOR, 206)), "\\Device\\Tape78"},
- {"/dev/nst79", BRACK(FHDEV(DEV_TAPE_MAJOR, 207)), "\\Device\\Tape79"},
- {"/dev/nst80", BRACK(FHDEV(DEV_TAPE_MAJOR, 208)), "\\Device\\Tape80"},
- {"/dev/nst81", BRACK(FHDEV(DEV_TAPE_MAJOR, 209)), "\\Device\\Tape81"},
- {"/dev/nst82", BRACK(FHDEV(DEV_TAPE_MAJOR, 210)), "\\Device\\Tape82"},
- {"/dev/nst83", BRACK(FHDEV(DEV_TAPE_MAJOR, 211)), "\\Device\\Tape83"},
- {"/dev/nst84", BRACK(FHDEV(DEV_TAPE_MAJOR, 212)), "\\Device\\Tape84"},
- {"/dev/nst85", BRACK(FHDEV(DEV_TAPE_MAJOR, 213)), "\\Device\\Tape85"},
- {"/dev/nst86", BRACK(FHDEV(DEV_TAPE_MAJOR, 214)), "\\Device\\Tape86"},
- {"/dev/nst87", BRACK(FHDEV(DEV_TAPE_MAJOR, 215)), "\\Device\\Tape87"},
- {"/dev/nst88", BRACK(FHDEV(DEV_TAPE_MAJOR, 216)), "\\Device\\Tape88"},
- {"/dev/nst89", BRACK(FHDEV(DEV_TAPE_MAJOR, 217)), "\\Device\\Tape89"},
- {"/dev/nst90", BRACK(FHDEV(DEV_TAPE_MAJOR, 218)), "\\Device\\Tape90"},
- {"/dev/nst91", BRACK(FHDEV(DEV_TAPE_MAJOR, 219)), "\\Device\\Tape91"},
- {"/dev/nst92", BRACK(FHDEV(DEV_TAPE_MAJOR, 220)), "\\Device\\Tape92"},
- {"/dev/nst93", BRACK(FHDEV(DEV_TAPE_MAJOR, 221)), "\\Device\\Tape93"},
- {"/dev/nst94", BRACK(FHDEV(DEV_TAPE_MAJOR, 222)), "\\Device\\Tape94"},
- {"/dev/nst95", BRACK(FHDEV(DEV_TAPE_MAJOR, 223)), "\\Device\\Tape95"},
- {"/dev/nst96", BRACK(FHDEV(DEV_TAPE_MAJOR, 224)), "\\Device\\Tape96"},
- {"/dev/nst97", BRACK(FHDEV(DEV_TAPE_MAJOR, 225)), "\\Device\\Tape97"},
- {"/dev/nst98", BRACK(FHDEV(DEV_TAPE_MAJOR, 226)), "\\Device\\Tape98"},
- {"/dev/nst99", BRACK(FHDEV(DEV_TAPE_MAJOR, 227)), "\\Device\\Tape99"},
- {"/dev/nst100", BRACK(FHDEV(DEV_TAPE_MAJOR, 228)), "\\Device\\Tape100"},
- {"/dev/nst101", BRACK(FHDEV(DEV_TAPE_MAJOR, 229)), "\\Device\\Tape101"},
- {"/dev/nst102", BRACK(FHDEV(DEV_TAPE_MAJOR, 230)), "\\Device\\Tape102"},
- {"/dev/nst103", BRACK(FHDEV(DEV_TAPE_MAJOR, 231)), "\\Device\\Tape103"},
- {"/dev/nst104", BRACK(FHDEV(DEV_TAPE_MAJOR, 232)), "\\Device\\Tape104"},
- {"/dev/nst105", BRACK(FHDEV(DEV_TAPE_MAJOR, 233)), "\\Device\\Tape105"},
- {"/dev/nst106", BRACK(FHDEV(DEV_TAPE_MAJOR, 234)), "\\Device\\Tape106"},
- {"/dev/nst107", BRACK(FHDEV(DEV_TAPE_MAJOR, 235)), "\\Device\\Tape107"},
- {"/dev/nst108", BRACK(FHDEV(DEV_TAPE_MAJOR, 236)), "\\Device\\Tape108"},
- {"/dev/nst109", BRACK(FHDEV(DEV_TAPE_MAJOR, 237)), "\\Device\\Tape109"},
- {"/dev/nst110", BRACK(FHDEV(DEV_TAPE_MAJOR, 238)), "\\Device\\Tape110"},
- {"/dev/nst111", BRACK(FHDEV(DEV_TAPE_MAJOR, 239)), "\\Device\\Tape111"},
- {"/dev/nst112", BRACK(FHDEV(DEV_TAPE_MAJOR, 240)), "\\Device\\Tape112"},
- {"/dev/nst113", BRACK(FHDEV(DEV_TAPE_MAJOR, 241)), "\\Device\\Tape113"},
- {"/dev/nst114", BRACK(FHDEV(DEV_TAPE_MAJOR, 242)), "\\Device\\Tape114"},
- {"/dev/nst115", BRACK(FHDEV(DEV_TAPE_MAJOR, 243)), "\\Device\\Tape115"},
- {"/dev/nst116", BRACK(FHDEV(DEV_TAPE_MAJOR, 244)), "\\Device\\Tape116"},
- {"/dev/nst117", BRACK(FHDEV(DEV_TAPE_MAJOR, 245)), "\\Device\\Tape117"},
- {"/dev/nst118", BRACK(FHDEV(DEV_TAPE_MAJOR, 246)), "\\Device\\Tape118"},
- {"/dev/nst119", BRACK(FHDEV(DEV_TAPE_MAJOR, 247)), "\\Device\\Tape119"},
- {"/dev/nst120", BRACK(FHDEV(DEV_TAPE_MAJOR, 248)), "\\Device\\Tape120"},
- {"/dev/nst121", BRACK(FHDEV(DEV_TAPE_MAJOR, 249)), "\\Device\\Tape121"},
- {"/dev/nst122", BRACK(FHDEV(DEV_TAPE_MAJOR, 250)), "\\Device\\Tape122"},
- {"/dev/nst123", BRACK(FHDEV(DEV_TAPE_MAJOR, 251)), "\\Device\\Tape123"},
- {"/dev/nst124", BRACK(FHDEV(DEV_TAPE_MAJOR, 252)), "\\Device\\Tape124"},
- {"/dev/nst125", BRACK(FHDEV(DEV_TAPE_MAJOR, 253)), "\\Device\\Tape125"},
- {"/dev/nst126", BRACK(FHDEV(DEV_TAPE_MAJOR, 254)), "\\Device\\Tape126"},
- {"/dev/nst127", BRACK(FHDEV(DEV_TAPE_MAJOR, 255)), "\\Device\\Tape127"},
- {"/dev/null", BRACK(FH_NULL), "\\Device\\Null"},
- {"/dev/pipe", BRACK(FH_PIPE), "\\dev\\pipe"},
- {"/dev/port", BRACK(FH_PORT), "\\dev\\port"},
- {"/dev/ptmx", BRACK(FH_PTYM), "\\dev\\ptmx"},
- {"/dev/random", BRACK(FH_RANDOM), "\\dev\\random"},
- {"/dev/scd0", BRACK(FHDEV(DEV_CDROM_MAJOR, 0)), "\\Device\\CdRom0"},
- {"/dev/scd1", BRACK(FHDEV(DEV_CDROM_MAJOR, 1)), "\\Device\\CdRom1"},
- {"/dev/scd2", BRACK(FHDEV(DEV_CDROM_MAJOR, 2)), "\\Device\\CdRom2"},
- {"/dev/scd3", BRACK(FHDEV(DEV_CDROM_MAJOR, 3)), "\\Device\\CdRom3"},
- {"/dev/scd4", BRACK(FHDEV(DEV_CDROM_MAJOR, 4)), "\\Device\\CdRom4"},
- {"/dev/scd5", BRACK(FHDEV(DEV_CDROM_MAJOR, 5)), "\\Device\\CdRom5"},
- {"/dev/scd6", BRACK(FHDEV(DEV_CDROM_MAJOR, 6)), "\\Device\\CdRom6"},
- {"/dev/scd7", BRACK(FHDEV(DEV_CDROM_MAJOR, 7)), "\\Device\\CdRom7"},
- {"/dev/scd8", BRACK(FHDEV(DEV_CDROM_MAJOR, 8)), "\\Device\\CdRom8"},
- {"/dev/scd9", BRACK(FHDEV(DEV_CDROM_MAJOR, 9)), "\\Device\\CdRom9"},
- {"/dev/scd10", BRACK(FHDEV(DEV_CDROM_MAJOR, 10)), "\\Device\\CdRom10"},
- {"/dev/scd11", BRACK(FHDEV(DEV_CDROM_MAJOR, 11)), "\\Device\\CdRom11"},
- {"/dev/scd12", BRACK(FHDEV(DEV_CDROM_MAJOR, 12)), "\\Device\\CdRom12"},
- {"/dev/scd13", BRACK(FHDEV(DEV_CDROM_MAJOR, 13)), "\\Device\\CdRom13"},
- {"/dev/scd14", BRACK(FHDEV(DEV_CDROM_MAJOR, 14)), "\\Device\\CdRom14"},
- {"/dev/scd15", BRACK(FHDEV(DEV_CDROM_MAJOR, 15)), "\\Device\\CdRom15"},
- {"/dev/sda", BRACK(FH_SDA), "\\Device\\Harddisk0\\Partition0"},
- {"/dev/sdb", BRACK(FH_SDB), "\\Device\\Harddisk1\\Partition0"},
- {"/dev/sdc", BRACK(FH_SDC), "\\Device\\Harddisk2\\Partition0"},
- {"/dev/sdd", BRACK(FH_SDD), "\\Device\\Harddisk3\\Partition0"},
- {"/dev/sde", BRACK(FH_SDE), "\\Device\\Harddisk4\\Partition0"},
- {"/dev/sdf", BRACK(FH_SDF), "\\Device\\Harddisk5\\Partition0"},
- {"/dev/sdg", BRACK(FH_SDG), "\\Device\\Harddisk6\\Partition0"},
- {"/dev/sdh", BRACK(FH_SDH), "\\Device\\Harddisk7\\Partition0"},
- {"/dev/sdi", BRACK(FH_SDI), "\\Device\\Harddisk8\\Partition0"},
- {"/dev/sdj", BRACK(FH_SDJ), "\\Device\\Harddisk9\\Partition0"},
- {"/dev/sdk", BRACK(FH_SDK), "\\Device\\Harddisk10\\Partition0"},
- {"/dev/sdl", BRACK(FH_SDL), "\\Device\\Harddisk11\\Partition0"},
- {"/dev/sdm", BRACK(FH_SDM), "\\Device\\Harddisk12\\Partition0"},
- {"/dev/sdn", BRACK(FH_SDN), "\\Device\\Harddisk13\\Partition0"},
- {"/dev/sdo", BRACK(FH_SDO), "\\Device\\Harddisk14\\Partition0"},
- {"/dev/sdp", BRACK(FH_SDP), "\\Device\\Harddisk15\\Partition0"},
- {"/dev/sdq", BRACK(FH_SDQ), "\\Device\\Harddisk16\\Partition0"},
- {"/dev/sdr", BRACK(FH_SDR), "\\Device\\Harddisk17\\Partition0"},
- {"/dev/sds", BRACK(FH_SDS), "\\Device\\Harddisk18\\Partition0"},
- {"/dev/sdt", BRACK(FH_SDT), "\\Device\\Harddisk19\\Partition0"},
- {"/dev/sdu", BRACK(FH_SDU), "\\Device\\Harddisk20\\Partition0"},
- {"/dev/sdv", BRACK(FH_SDV), "\\Device\\Harddisk21\\Partition0"},
- {"/dev/sdw", BRACK(FH_SDW), "\\Device\\Harddisk22\\Partition0"},
- {"/dev/sdx", BRACK(FH_SDX), "\\Device\\Harddisk23\\Partition0"},
- {"/dev/sdy", BRACK(FH_SDY), "\\Device\\Harddisk24\\Partition0"},
- {"/dev/sdz", BRACK(FH_SDZ), "\\Device\\Harddisk25\\Partition0"},
- {"/dev/sda1", BRACK(FH_SDA | 1), "\\Device\\Harddisk0\\Partition1"},
- {"/dev/sda2", BRACK(FH_SDA | 2), "\\Device\\Harddisk0\\Partition2"},
- {"/dev/sda3", BRACK(FH_SDA | 3), "\\Device\\Harddisk0\\Partition3"},
- {"/dev/sda4", BRACK(FH_SDA | 4), "\\Device\\Harddisk0\\Partition4"},
- {"/dev/sda5", BRACK(FH_SDA | 5), "\\Device\\Harddisk0\\Partition5"},
- {"/dev/sda6", BRACK(FH_SDA | 6), "\\Device\\Harddisk0\\Partition6"},
- {"/dev/sda7", BRACK(FH_SDA | 7), "\\Device\\Harddisk0\\Partition7"},
- {"/dev/sda8", BRACK(FH_SDA | 8), "\\Device\\Harddisk0\\Partition8"},
- {"/dev/sda9", BRACK(FH_SDA | 9), "\\Device\\Harddisk0\\Partition9"},
- {"/dev/sda10", BRACK(FH_SDA | 10), "\\Device\\Harddisk0\\Partition10"},
- {"/dev/sda11", BRACK(FH_SDA | 11), "\\Device\\Harddisk0\\Partition11"},
- {"/dev/sda12", BRACK(FH_SDA | 12), "\\Device\\Harddisk0\\Partition12"},
- {"/dev/sda13", BRACK(FH_SDA | 13), "\\Device\\Harddisk0\\Partition13"},
- {"/dev/sda14", BRACK(FH_SDA | 14), "\\Device\\Harddisk0\\Partition14"},
- {"/dev/sda15", BRACK(FH_SDA | 15), "\\Device\\Harddisk0\\Partition15"},
- {"/dev/sdb1", BRACK(FH_SDB | 1), "\\Device\\Harddisk1\\Partition1"},
- {"/dev/sdb2", BRACK(FH_SDB | 2), "\\Device\\Harddisk1\\Partition2"},
- {"/dev/sdb3", BRACK(FH_SDB | 3), "\\Device\\Harddisk1\\Partition3"},
- {"/dev/sdb4", BRACK(FH_SDB | 4), "\\Device\\Harddisk1\\Partition4"},
- {"/dev/sdb5", BRACK(FH_SDB | 5), "\\Device\\Harddisk1\\Partition5"},
- {"/dev/sdb6", BRACK(FH_SDB | 6), "\\Device\\Harddisk1\\Partition6"},
- {"/dev/sdb7", BRACK(FH_SDB | 7), "\\Device\\Harddisk1\\Partition7"},
- {"/dev/sdb8", BRACK(FH_SDB | 8), "\\Device\\Harddisk1\\Partition8"},
- {"/dev/sdb9", BRACK(FH_SDB | 9), "\\Device\\Harddisk1\\Partition9"},
- {"/dev/sdb10", BRACK(FH_SDB | 10), "\\Device\\Harddisk1\\Partition10"},
- {"/dev/sdb11", BRACK(FH_SDB | 11), "\\Device\\Harddisk1\\Partition11"},
- {"/dev/sdb12", BRACK(FH_SDB | 12), "\\Device\\Harddisk1\\Partition12"},
- {"/dev/sdb13", BRACK(FH_SDB | 13), "\\Device\\Harddisk1\\Partition13"},
- {"/dev/sdb14", BRACK(FH_SDB | 14), "\\Device\\Harddisk1\\Partition14"},
- {"/dev/sdb15", BRACK(FH_SDB | 15), "\\Device\\Harddisk1\\Partition15"},
- {"/dev/sdc1", BRACK(FH_SDC | 1), "\\Device\\Harddisk2\\Partition1"},
- {"/dev/sdc2", BRACK(FH_SDC | 2), "\\Device\\Harddisk2\\Partition2"},
- {"/dev/sdc3", BRACK(FH_SDC | 3), "\\Device\\Harddisk2\\Partition3"},
- {"/dev/sdc4", BRACK(FH_SDC | 4), "\\Device\\Harddisk2\\Partition4"},
- {"/dev/sdc5", BRACK(FH_SDC | 5), "\\Device\\Harddisk2\\Partition5"},
- {"/dev/sdc6", BRACK(FH_SDC | 6), "\\Device\\Harddisk2\\Partition6"},
- {"/dev/sdc7", BRACK(FH_SDC | 7), "\\Device\\Harddisk2\\Partition7"},
- {"/dev/sdc8", BRACK(FH_SDC | 8), "\\Device\\Harddisk2\\Partition8"},
- {"/dev/sdc9", BRACK(FH_SDC | 9), "\\Device\\Harddisk2\\Partition9"},
- {"/dev/sdc10", BRACK(FH_SDC | 10), "\\Device\\Harddisk2\\Partition10"},
- {"/dev/sdc11", BRACK(FH_SDC | 11), "\\Device\\Harddisk2\\Partition11"},
- {"/dev/sdc12", BRACK(FH_SDC | 12), "\\Device\\Harddisk2\\Partition12"},
- {"/dev/sdc13", BRACK(FH_SDC | 13), "\\Device\\Harddisk2\\Partition13"},
- {"/dev/sdc14", BRACK(FH_SDC | 14), "\\Device\\Harddisk2\\Partition14"},
- {"/dev/sdc15", BRACK(FH_SDC | 15), "\\Device\\Harddisk2\\Partition15"},
- {"/dev/sdd1", BRACK(FH_SDD | 1), "\\Device\\Harddisk3\\Partition1"},
- {"/dev/sdd2", BRACK(FH_SDD | 2), "\\Device\\Harddisk3\\Partition2"},
- {"/dev/sdd3", BRACK(FH_SDD | 3), "\\Device\\Harddisk3\\Partition3"},
- {"/dev/sdd4", BRACK(FH_SDD | 4), "\\Device\\Harddisk3\\Partition4"},
- {"/dev/sdd5", BRACK(FH_SDD | 5), "\\Device\\Harddisk3\\Partition5"},
- {"/dev/sdd6", BRACK(FH_SDD | 6), "\\Device\\Harddisk3\\Partition6"},
- {"/dev/sdd7", BRACK(FH_SDD | 7), "\\Device\\Harddisk3\\Partition7"},
- {"/dev/sdd8", BRACK(FH_SDD | 8), "\\Device\\Harddisk3\\Partition8"},
- {"/dev/sdd9", BRACK(FH_SDD | 9), "\\Device\\Harddisk3\\Partition9"},
- {"/dev/sdd10", BRACK(FH_SDD | 10), "\\Device\\Harddisk3\\Partition10"},
- {"/dev/sdd11", BRACK(FH_SDD | 11), "\\Device\\Harddisk3\\Partition11"},
- {"/dev/sdd12", BRACK(FH_SDD | 12), "\\Device\\Harddisk3\\Partition12"},
- {"/dev/sdd13", BRACK(FH_SDD | 13), "\\Device\\Harddisk3\\Partition13"},
- {"/dev/sdd14", BRACK(FH_SDD | 14), "\\Device\\Harddisk3\\Partition14"},
- {"/dev/sdd15", BRACK(FH_SDD | 15), "\\Device\\Harddisk3\\Partition15"},
- {"/dev/sde1", BRACK(FH_SDE | 1), "\\Device\\Harddisk4\\Partition1"},
- {"/dev/sde2", BRACK(FH_SDE | 2), "\\Device\\Harddisk4\\Partition2"},
- {"/dev/sde3", BRACK(FH_SDE | 3), "\\Device\\Harddisk4\\Partition3"},
- {"/dev/sde4", BRACK(FH_SDE | 4), "\\Device\\Harddisk4\\Partition4"},
- {"/dev/sde5", BRACK(FH_SDE | 5), "\\Device\\Harddisk4\\Partition5"},
- {"/dev/sde6", BRACK(FH_SDE | 6), "\\Device\\Harddisk4\\Partition6"},
- {"/dev/sde7", BRACK(FH_SDE | 7), "\\Device\\Harddisk4\\Partition7"},
- {"/dev/sde8", BRACK(FH_SDE | 8), "\\Device\\Harddisk4\\Partition8"},
- {"/dev/sde9", BRACK(FH_SDE | 9), "\\Device\\Harddisk4\\Partition9"},
- {"/dev/sde10", BRACK(FH_SDE | 10), "\\Device\\Harddisk4\\Partition10"},
- {"/dev/sde11", BRACK(FH_SDE | 11), "\\Device\\Harddisk4\\Partition11"},
- {"/dev/sde12", BRACK(FH_SDE | 12), "\\Device\\Harddisk4\\Partition12"},
- {"/dev/sde13", BRACK(FH_SDE | 13), "\\Device\\Harddisk4\\Partition13"},
- {"/dev/sde14", BRACK(FH_SDE | 14), "\\Device\\Harddisk4\\Partition14"},
- {"/dev/sde15", BRACK(FH_SDE | 15), "\\Device\\Harddisk4\\Partition15"},
- {"/dev/sdf1", BRACK(FH_SDF | 1), "\\Device\\Harddisk5\\Partition1"},
- {"/dev/sdf2", BRACK(FH_SDF | 2), "\\Device\\Harddisk5\\Partition2"},
- {"/dev/sdf3", BRACK(FH_SDF | 3), "\\Device\\Harddisk5\\Partition3"},
- {"/dev/sdf4", BRACK(FH_SDF | 4), "\\Device\\Harddisk5\\Partition4"},
- {"/dev/sdf5", BRACK(FH_SDF | 5), "\\Device\\Harddisk5\\Partition5"},
- {"/dev/sdf6", BRACK(FH_SDF | 6), "\\Device\\Harddisk5\\Partition6"},
- {"/dev/sdf7", BRACK(FH_SDF | 7), "\\Device\\Harddisk5\\Partition7"},
- {"/dev/sdf8", BRACK(FH_SDF | 8), "\\Device\\Harddisk5\\Partition8"},
- {"/dev/sdf9", BRACK(FH_SDF | 9), "\\Device\\Harddisk5\\Partition9"},
- {"/dev/sdf10", BRACK(FH_SDF | 10), "\\Device\\Harddisk5\\Partition10"},
- {"/dev/sdf11", BRACK(FH_SDF | 11), "\\Device\\Harddisk5\\Partition11"},
- {"/dev/sdf12", BRACK(FH_SDF | 12), "\\Device\\Harddisk5\\Partition12"},
- {"/dev/sdf13", BRACK(FH_SDF | 13), "\\Device\\Harddisk5\\Partition13"},
- {"/dev/sdf14", BRACK(FH_SDF | 14), "\\Device\\Harddisk5\\Partition14"},
- {"/dev/sdf15", BRACK(FH_SDF | 15), "\\Device\\Harddisk5\\Partition15"},
- {"/dev/sdg1", BRACK(FH_SDG | 1), "\\Device\\Harddisk6\\Partition1"},
- {"/dev/sdg2", BRACK(FH_SDG | 2), "\\Device\\Harddisk6\\Partition2"},
- {"/dev/sdg3", BRACK(FH_SDG | 3), "\\Device\\Harddisk6\\Partition3"},
- {"/dev/sdg4", BRACK(FH_SDG | 4), "\\Device\\Harddisk6\\Partition4"},
- {"/dev/sdg5", BRACK(FH_SDG | 5), "\\Device\\Harddisk6\\Partition5"},
- {"/dev/sdg6", BRACK(FH_SDG | 6), "\\Device\\Harddisk6\\Partition6"},
- {"/dev/sdg7", BRACK(FH_SDG | 7), "\\Device\\Harddisk6\\Partition7"},
- {"/dev/sdg8", BRACK(FH_SDG | 8), "\\Device\\Harddisk6\\Partition8"},
- {"/dev/sdg9", BRACK(FH_SDG | 9), "\\Device\\Harddisk6\\Partition9"},
- {"/dev/sdg10", BRACK(FH_SDG | 10), "\\Device\\Harddisk6\\Partition10"},
- {"/dev/sdg11", BRACK(FH_SDG | 11), "\\Device\\Harddisk6\\Partition11"},
- {"/dev/sdg12", BRACK(FH_SDG | 12), "\\Device\\Harddisk6\\Partition12"},
- {"/dev/sdg13", BRACK(FH_SDG | 13), "\\Device\\Harddisk6\\Partition13"},
- {"/dev/sdg14", BRACK(FH_SDG | 14), "\\Device\\Harddisk6\\Partition14"},
- {"/dev/sdg15", BRACK(FH_SDG | 15), "\\Device\\Harddisk6\\Partition15"},
- {"/dev/sdh1", BRACK(FH_SDH | 1), "\\Device\\Harddisk7\\Partition1"},
- {"/dev/sdh2", BRACK(FH_SDH | 2), "\\Device\\Harddisk7\\Partition2"},
- {"/dev/sdh3", BRACK(FH_SDH | 3), "\\Device\\Harddisk7\\Partition3"},
- {"/dev/sdh4", BRACK(FH_SDH | 4), "\\Device\\Harddisk7\\Partition4"},
- {"/dev/sdh5", BRACK(FH_SDH | 5), "\\Device\\Harddisk7\\Partition5"},
- {"/dev/sdh6", BRACK(FH_SDH | 6), "\\Device\\Harddisk7\\Partition6"},
- {"/dev/sdh7", BRACK(FH_SDH | 7), "\\Device\\Harddisk7\\Partition7"},
- {"/dev/sdh8", BRACK(FH_SDH | 8), "\\Device\\Harddisk7\\Partition8"},
- {"/dev/sdh9", BRACK(FH_SDH | 9), "\\Device\\Harddisk7\\Partition9"},
- {"/dev/sdh10", BRACK(FH_SDH | 10), "\\Device\\Harddisk7\\Partition10"},
- {"/dev/sdh11", BRACK(FH_SDH | 11), "\\Device\\Harddisk7\\Partition11"},
- {"/dev/sdh12", BRACK(FH_SDH | 12), "\\Device\\Harddisk7\\Partition12"},
- {"/dev/sdh13", BRACK(FH_SDH | 13), "\\Device\\Harddisk7\\Partition13"},
- {"/dev/sdh14", BRACK(FH_SDH | 14), "\\Device\\Harddisk7\\Partition14"},
- {"/dev/sdh15", BRACK(FH_SDH | 15), "\\Device\\Harddisk7\\Partition15"},
- {"/dev/sdi1", BRACK(FH_SDI | 1), "\\Device\\Harddisk8\\Partition1"},
- {"/dev/sdi2", BRACK(FH_SDI | 2), "\\Device\\Harddisk8\\Partition2"},
- {"/dev/sdi3", BRACK(FH_SDI | 3), "\\Device\\Harddisk8\\Partition3"},
- {"/dev/sdi4", BRACK(FH_SDI | 4), "\\Device\\Harddisk8\\Partition4"},
- {"/dev/sdi5", BRACK(FH_SDI | 5), "\\Device\\Harddisk8\\Partition5"},
- {"/dev/sdi6", BRACK(FH_SDI | 6), "\\Device\\Harddisk8\\Partition6"},
- {"/dev/sdi7", BRACK(FH_SDI | 7), "\\Device\\Harddisk8\\Partition7"},
- {"/dev/sdi8", BRACK(FH_SDI | 8), "\\Device\\Harddisk8\\Partition8"},
- {"/dev/sdi9", BRACK(FH_SDI | 9), "\\Device\\Harddisk8\\Partition9"},
- {"/dev/sdi10", BRACK(FH_SDI | 10), "\\Device\\Harddisk8\\Partition10"},
- {"/dev/sdi11", BRACK(FH_SDI | 11), "\\Device\\Harddisk8\\Partition11"},
- {"/dev/sdi12", BRACK(FH_SDI | 12), "\\Device\\Harddisk8\\Partition12"},
- {"/dev/sdi13", BRACK(FH_SDI | 13), "\\Device\\Harddisk8\\Partition13"},
- {"/dev/sdi14", BRACK(FH_SDI | 14), "\\Device\\Harddisk8\\Partition14"},
- {"/dev/sdi15", BRACK(FH_SDI | 15), "\\Device\\Harddisk8\\Partition15"},
- {"/dev/sdj1", BRACK(FH_SDJ | 1), "\\Device\\Harddisk9\\Partition1"},
- {"/dev/sdj2", BRACK(FH_SDJ | 2), "\\Device\\Harddisk9\\Partition2"},
- {"/dev/sdj3", BRACK(FH_SDJ | 3), "\\Device\\Harddisk9\\Partition3"},
- {"/dev/sdj4", BRACK(FH_SDJ | 4), "\\Device\\Harddisk9\\Partition4"},
- {"/dev/sdj5", BRACK(FH_SDJ | 5), "\\Device\\Harddisk9\\Partition5"},
- {"/dev/sdj6", BRACK(FH_SDJ | 6), "\\Device\\Harddisk9\\Partition6"},
- {"/dev/sdj7", BRACK(FH_SDJ | 7), "\\Device\\Harddisk9\\Partition7"},
- {"/dev/sdj8", BRACK(FH_SDJ | 8), "\\Device\\Harddisk9\\Partition8"},
- {"/dev/sdj9", BRACK(FH_SDJ | 9), "\\Device\\Harddisk9\\Partition9"},
- {"/dev/sdj10", BRACK(FH_SDJ | 10), "\\Device\\Harddisk9\\Partition10"},
- {"/dev/sdj11", BRACK(FH_SDJ | 11), "\\Device\\Harddisk9\\Partition11"},
- {"/dev/sdj12", BRACK(FH_SDJ | 12), "\\Device\\Harddisk9\\Partition12"},
- {"/dev/sdj13", BRACK(FH_SDJ | 13), "\\Device\\Harddisk9\\Partition13"},
- {"/dev/sdj14", BRACK(FH_SDJ | 14), "\\Device\\Harddisk9\\Partition14"},
- {"/dev/sdj15", BRACK(FH_SDJ | 15), "\\Device\\Harddisk9\\Partition15"},
- {"/dev/sdk1", BRACK(FH_SDK | 1), "\\Device\\Harddisk10\\Partition1"},
- {"/dev/sdk2", BRACK(FH_SDK | 2), "\\Device\\Harddisk10\\Partition2"},
- {"/dev/sdk3", BRACK(FH_SDK | 3), "\\Device\\Harddisk10\\Partition3"},
- {"/dev/sdk4", BRACK(FH_SDK | 4), "\\Device\\Harddisk10\\Partition4"},
- {"/dev/sdk5", BRACK(FH_SDK | 5), "\\Device\\Harddisk10\\Partition5"},
- {"/dev/sdk6", BRACK(FH_SDK | 6), "\\Device\\Harddisk10\\Partition6"},
- {"/dev/sdk7", BRACK(FH_SDK | 7), "\\Device\\Harddisk10\\Partition7"},
- {"/dev/sdk8", BRACK(FH_SDK | 8), "\\Device\\Harddisk10\\Partition8"},
- {"/dev/sdk9", BRACK(FH_SDK | 9), "\\Device\\Harddisk10\\Partition9"},
- {"/dev/sdk10", BRACK(FH_SDK | 10), "\\Device\\Harddisk10\\Partition10"},
- {"/dev/sdk11", BRACK(FH_SDK | 11), "\\Device\\Harddisk10\\Partition11"},
- {"/dev/sdk12", BRACK(FH_SDK | 12), "\\Device\\Harddisk10\\Partition12"},
- {"/dev/sdk13", BRACK(FH_SDK | 13), "\\Device\\Harddisk10\\Partition13"},
- {"/dev/sdk14", BRACK(FH_SDK | 14), "\\Device\\Harddisk10\\Partition14"},
- {"/dev/sdk15", BRACK(FH_SDK | 15), "\\Device\\Harddisk10\\Partition15"},
- {"/dev/sdl1", BRACK(FH_SDL | 1), "\\Device\\Harddisk11\\Partition1"},
- {"/dev/sdl2", BRACK(FH_SDL | 2), "\\Device\\Harddisk11\\Partition2"},
- {"/dev/sdl3", BRACK(FH_SDL | 3), "\\Device\\Harddisk11\\Partition3"},
- {"/dev/sdl4", BRACK(FH_SDL | 4), "\\Device\\Harddisk11\\Partition4"},
- {"/dev/sdl5", BRACK(FH_SDL | 5), "\\Device\\Harddisk11\\Partition5"},
- {"/dev/sdl6", BRACK(FH_SDL | 6), "\\Device\\Harddisk11\\Partition6"},
- {"/dev/sdl7", BRACK(FH_SDL | 7), "\\Device\\Harddisk11\\Partition7"},
- {"/dev/sdl8", BRACK(FH_SDL | 8), "\\Device\\Harddisk11\\Partition8"},
- {"/dev/sdl9", BRACK(FH_SDL | 9), "\\Device\\Harddisk11\\Partition9"},
- {"/dev/sdl10", BRACK(FH_SDL | 10), "\\Device\\Harddisk11\\Partition10"},
- {"/dev/sdl11", BRACK(FH_SDL | 11), "\\Device\\Harddisk11\\Partition11"},
- {"/dev/sdl12", BRACK(FH_SDL | 12), "\\Device\\Harddisk11\\Partition12"},
- {"/dev/sdl13", BRACK(FH_SDL | 13), "\\Device\\Harddisk11\\Partition13"},
- {"/dev/sdl14", BRACK(FH_SDL | 14), "\\Device\\Harddisk11\\Partition14"},
- {"/dev/sdl15", BRACK(FH_SDL | 15), "\\Device\\Harddisk11\\Partition15"},
- {"/dev/sdm1", BRACK(FH_SDM | 1), "\\Device\\Harddisk12\\Partition1"},
- {"/dev/sdm2", BRACK(FH_SDM | 2), "\\Device\\Harddisk12\\Partition2"},
- {"/dev/sdm3", BRACK(FH_SDM | 3), "\\Device\\Harddisk12\\Partition3"},
- {"/dev/sdm4", BRACK(FH_SDM | 4), "\\Device\\Harddisk12\\Partition4"},
- {"/dev/sdm5", BRACK(FH_SDM | 5), "\\Device\\Harddisk12\\Partition5"},
- {"/dev/sdm6", BRACK(FH_SDM | 6), "\\Device\\Harddisk12\\Partition6"},
- {"/dev/sdm7", BRACK(FH_SDM | 7), "\\Device\\Harddisk12\\Partition7"},
- {"/dev/sdm8", BRACK(FH_SDM | 8), "\\Device\\Harddisk12\\Partition8"},
- {"/dev/sdm9", BRACK(FH_SDM | 9), "\\Device\\Harddisk12\\Partition9"},
- {"/dev/sdm10", BRACK(FH_SDM | 10), "\\Device\\Harddisk12\\Partition10"},
- {"/dev/sdm11", BRACK(FH_SDM | 11), "\\Device\\Harddisk12\\Partition11"},
- {"/dev/sdm12", BRACK(FH_SDM | 12), "\\Device\\Harddisk12\\Partition12"},
- {"/dev/sdm13", BRACK(FH_SDM | 13), "\\Device\\Harddisk12\\Partition13"},
- {"/dev/sdm14", BRACK(FH_SDM | 14), "\\Device\\Harddisk12\\Partition14"},
- {"/dev/sdm15", BRACK(FH_SDM | 15), "\\Device\\Harddisk12\\Partition15"},
- {"/dev/sdn1", BRACK(FH_SDN | 1), "\\Device\\Harddisk13\\Partition1"},
- {"/dev/sdn2", BRACK(FH_SDN | 2), "\\Device\\Harddisk13\\Partition2"},
- {"/dev/sdn3", BRACK(FH_SDN | 3), "\\Device\\Harddisk13\\Partition3"},
- {"/dev/sdn4", BRACK(FH_SDN | 4), "\\Device\\Harddisk13\\Partition4"},
- {"/dev/sdn5", BRACK(FH_SDN | 5), "\\Device\\Harddisk13\\Partition5"},
- {"/dev/sdn6", BRACK(FH_SDN | 6), "\\Device\\Harddisk13\\Partition6"},
- {"/dev/sdn7", BRACK(FH_SDN | 7), "\\Device\\Harddisk13\\Partition7"},
- {"/dev/sdn8", BRACK(FH_SDN | 8), "\\Device\\Harddisk13\\Partition8"},
- {"/dev/sdn9", BRACK(FH_SDN | 9), "\\Device\\Harddisk13\\Partition9"},
- {"/dev/sdn10", BRACK(FH_SDN | 10), "\\Device\\Harddisk13\\Partition10"},
- {"/dev/sdn11", BRACK(FH_SDN | 11), "\\Device\\Harddisk13\\Partition11"},
- {"/dev/sdn12", BRACK(FH_SDN | 12), "\\Device\\Harddisk13\\Partition12"},
- {"/dev/sdn13", BRACK(FH_SDN | 13), "\\Device\\Harddisk13\\Partition13"},
- {"/dev/sdn14", BRACK(FH_SDN | 14), "\\Device\\Harddisk13\\Partition14"},
- {"/dev/sdn15", BRACK(FH_SDN | 15), "\\Device\\Harddisk13\\Partition15"},
- {"/dev/sdo1", BRACK(FH_SDO | 1), "\\Device\\Harddisk14\\Partition1"},
- {"/dev/sdo2", BRACK(FH_SDO | 2), "\\Device\\Harddisk14\\Partition2"},
- {"/dev/sdo3", BRACK(FH_SDO | 3), "\\Device\\Harddisk14\\Partition3"},
- {"/dev/sdo4", BRACK(FH_SDO | 4), "\\Device\\Harddisk14\\Partition4"},
- {"/dev/sdo5", BRACK(FH_SDO | 5), "\\Device\\Harddisk14\\Partition5"},
- {"/dev/sdo6", BRACK(FH_SDO | 6), "\\Device\\Harddisk14\\Partition6"},
- {"/dev/sdo7", BRACK(FH_SDO | 7), "\\Device\\Harddisk14\\Partition7"},
- {"/dev/sdo8", BRACK(FH_SDO | 8), "\\Device\\Harddisk14\\Partition8"},
- {"/dev/sdo9", BRACK(FH_SDO | 9), "\\Device\\Harddisk14\\Partition9"},
- {"/dev/sdo10", BRACK(FH_SDO | 10), "\\Device\\Harddisk14\\Partition10"},
- {"/dev/sdo11", BRACK(FH_SDO | 11), "\\Device\\Harddisk14\\Partition11"},
- {"/dev/sdo12", BRACK(FH_SDO | 12), "\\Device\\Harddisk14\\Partition12"},
- {"/dev/sdo13", BRACK(FH_SDO | 13), "\\Device\\Harddisk14\\Partition13"},
- {"/dev/sdo14", BRACK(FH_SDO | 14), "\\Device\\Harddisk14\\Partition14"},
- {"/dev/sdo15", BRACK(FH_SDO | 15), "\\Device\\Harddisk14\\Partition15"},
- {"/dev/sdp1", BRACK(FH_SDP | 1), "\\Device\\Harddisk15\\Partition1"},
- {"/dev/sdp2", BRACK(FH_SDP | 2), "\\Device\\Harddisk15\\Partition2"},
- {"/dev/sdp3", BRACK(FH_SDP | 3), "\\Device\\Harddisk15\\Partition3"},
- {"/dev/sdp4", BRACK(FH_SDP | 4), "\\Device\\Harddisk15\\Partition4"},
- {"/dev/sdp5", BRACK(FH_SDP | 5), "\\Device\\Harddisk15\\Partition5"},
- {"/dev/sdp6", BRACK(FH_SDP | 6), "\\Device\\Harddisk15\\Partition6"},
- {"/dev/sdp7", BRACK(FH_SDP | 7), "\\Device\\Harddisk15\\Partition7"},
- {"/dev/sdp8", BRACK(FH_SDP | 8), "\\Device\\Harddisk15\\Partition8"},
- {"/dev/sdp9", BRACK(FH_SDP | 9), "\\Device\\Harddisk15\\Partition9"},
- {"/dev/sdp10", BRACK(FH_SDP | 10), "\\Device\\Harddisk15\\Partition10"},
- {"/dev/sdp11", BRACK(FH_SDP | 11), "\\Device\\Harddisk15\\Partition11"},
- {"/dev/sdp12", BRACK(FH_SDP | 12), "\\Device\\Harddisk15\\Partition12"},
- {"/dev/sdp13", BRACK(FH_SDP | 13), "\\Device\\Harddisk15\\Partition13"},
- {"/dev/sdp14", BRACK(FH_SDP | 14), "\\Device\\Harddisk15\\Partition14"},
- {"/dev/sdp15", BRACK(FH_SDP | 15), "\\Device\\Harddisk15\\Partition15"},
- {"/dev/sdq1", BRACK(FH_SDQ | 1), "\\Device\\Harddisk16\\Partition1"},
- {"/dev/sdq2", BRACK(FH_SDQ | 2), "\\Device\\Harddisk16\\Partition2"},
- {"/dev/sdq3", BRACK(FH_SDQ | 3), "\\Device\\Harddisk16\\Partition3"},
- {"/dev/sdq4", BRACK(FH_SDQ | 4), "\\Device\\Harddisk16\\Partition4"},
- {"/dev/sdq5", BRACK(FH_SDQ | 5), "\\Device\\Harddisk16\\Partition5"},
- {"/dev/sdq6", BRACK(FH_SDQ | 6), "\\Device\\Harddisk16\\Partition6"},
- {"/dev/sdq7", BRACK(FH_SDQ | 7), "\\Device\\Harddisk16\\Partition7"},
- {"/dev/sdq8", BRACK(FH_SDQ | 8), "\\Device\\Harddisk16\\Partition8"},
- {"/dev/sdq9", BRACK(FH_SDQ | 9), "\\Device\\Harddisk16\\Partition9"},
- {"/dev/sdq10", BRACK(FH_SDQ | 10), "\\Device\\Harddisk16\\Partition10"},
- {"/dev/sdq11", BRACK(FH_SDQ | 11), "\\Device\\Harddisk16\\Partition11"},
- {"/dev/sdq12", BRACK(FH_SDQ | 12), "\\Device\\Harddisk16\\Partition12"},
- {"/dev/sdq13", BRACK(FH_SDQ | 13), "\\Device\\Harddisk16\\Partition13"},
- {"/dev/sdq14", BRACK(FH_SDQ | 14), "\\Device\\Harddisk16\\Partition14"},
- {"/dev/sdq15", BRACK(FH_SDQ | 15), "\\Device\\Harddisk16\\Partition15"},
- {"/dev/sdr1", BRACK(FH_SDR | 1), "\\Device\\Harddisk17\\Partition1"},
- {"/dev/sdr2", BRACK(FH_SDR | 2), "\\Device\\Harddisk17\\Partition2"},
- {"/dev/sdr3", BRACK(FH_SDR | 3), "\\Device\\Harddisk17\\Partition3"},
- {"/dev/sdr4", BRACK(FH_SDR | 4), "\\Device\\Harddisk17\\Partition4"},
- {"/dev/sdr5", BRACK(FH_SDR | 5), "\\Device\\Harddisk17\\Partition5"},
- {"/dev/sdr6", BRACK(FH_SDR | 6), "\\Device\\Harddisk17\\Partition6"},
- {"/dev/sdr7", BRACK(FH_SDR | 7), "\\Device\\Harddisk17\\Partition7"},
- {"/dev/sdr8", BRACK(FH_SDR | 8), "\\Device\\Harddisk17\\Partition8"},
- {"/dev/sdr9", BRACK(FH_SDR | 9), "\\Device\\Harddisk17\\Partition9"},
- {"/dev/sdr10", BRACK(FH_SDR | 10), "\\Device\\Harddisk17\\Partition10"},
- {"/dev/sdr11", BRACK(FH_SDR | 11), "\\Device\\Harddisk17\\Partition11"},
- {"/dev/sdr12", BRACK(FH_SDR | 12), "\\Device\\Harddisk17\\Partition12"},
- {"/dev/sdr13", BRACK(FH_SDR | 13), "\\Device\\Harddisk17\\Partition13"},
- {"/dev/sdr14", BRACK(FH_SDR | 14), "\\Device\\Harddisk17\\Partition14"},
- {"/dev/sdr15", BRACK(FH_SDR | 15), "\\Device\\Harddisk17\\Partition15"},
- {"/dev/sds1", BRACK(FH_SDS | 1), "\\Device\\Harddisk18\\Partition1"},
- {"/dev/sds2", BRACK(FH_SDS | 2), "\\Device\\Harddisk18\\Partition2"},
- {"/dev/sds3", BRACK(FH_SDS | 3), "\\Device\\Harddisk18\\Partition3"},
- {"/dev/sds4", BRACK(FH_SDS | 4), "\\Device\\Harddisk18\\Partition4"},
- {"/dev/sds5", BRACK(FH_SDS | 5), "\\Device\\Harddisk18\\Partition5"},
- {"/dev/sds6", BRACK(FH_SDS | 6), "\\Device\\Harddisk18\\Partition6"},
- {"/dev/sds7", BRACK(FH_SDS | 7), "\\Device\\Harddisk18\\Partition7"},
- {"/dev/sds8", BRACK(FH_SDS | 8), "\\Device\\Harddisk18\\Partition8"},
- {"/dev/sds9", BRACK(FH_SDS | 9), "\\Device\\Harddisk18\\Partition9"},
- {"/dev/sds10", BRACK(FH_SDS | 10), "\\Device\\Harddisk18\\Partition10"},
- {"/dev/sds11", BRACK(FH_SDS | 11), "\\Device\\Harddisk18\\Partition11"},
- {"/dev/sds12", BRACK(FH_SDS | 12), "\\Device\\Harddisk18\\Partition12"},
- {"/dev/sds13", BRACK(FH_SDS | 13), "\\Device\\Harddisk18\\Partition13"},
- {"/dev/sds14", BRACK(FH_SDS | 14), "\\Device\\Harddisk18\\Partition14"},
- {"/dev/sds15", BRACK(FH_SDS | 15), "\\Device\\Harddisk18\\Partition15"},
- {"/dev/sdt1", BRACK(FH_SDT | 1), "\\Device\\Harddisk19\\Partition1"},
- {"/dev/sdt2", BRACK(FH_SDT | 2), "\\Device\\Harddisk19\\Partition2"},
- {"/dev/sdt3", BRACK(FH_SDT | 3), "\\Device\\Harddisk19\\Partition3"},
- {"/dev/sdt4", BRACK(FH_SDT | 4), "\\Device\\Harddisk19\\Partition4"},
- {"/dev/sdt5", BRACK(FH_SDT | 5), "\\Device\\Harddisk19\\Partition5"},
- {"/dev/sdt6", BRACK(FH_SDT | 6), "\\Device\\Harddisk19\\Partition6"},
- {"/dev/sdt7", BRACK(FH_SDT | 7), "\\Device\\Harddisk19\\Partition7"},
- {"/dev/sdt8", BRACK(FH_SDT | 8), "\\Device\\Harddisk19\\Partition8"},
- {"/dev/sdt9", BRACK(FH_SDT | 9), "\\Device\\Harddisk19\\Partition9"},
- {"/dev/sdt10", BRACK(FH_SDT | 10), "\\Device\\Harddisk19\\Partition10"},
- {"/dev/sdt11", BRACK(FH_SDT | 11), "\\Device\\Harddisk19\\Partition11"},
- {"/dev/sdt12", BRACK(FH_SDT | 12), "\\Device\\Harddisk19\\Partition12"},
- {"/dev/sdt13", BRACK(FH_SDT | 13), "\\Device\\Harddisk19\\Partition13"},
- {"/dev/sdt14", BRACK(FH_SDT | 14), "\\Device\\Harddisk19\\Partition14"},
- {"/dev/sdt15", BRACK(FH_SDT | 15), "\\Device\\Harddisk19\\Partition15"},
- {"/dev/sdu1", BRACK(FH_SDU | 1), "\\Device\\Harddisk20\\Partition1"},
- {"/dev/sdu2", BRACK(FH_SDU | 2), "\\Device\\Harddisk20\\Partition2"},
- {"/dev/sdu3", BRACK(FH_SDU | 3), "\\Device\\Harddisk20\\Partition3"},
- {"/dev/sdu4", BRACK(FH_SDU | 4), "\\Device\\Harddisk20\\Partition4"},
- {"/dev/sdu5", BRACK(FH_SDU | 5), "\\Device\\Harddisk20\\Partition5"},
- {"/dev/sdu6", BRACK(FH_SDU | 6), "\\Device\\Harddisk20\\Partition6"},
- {"/dev/sdu7", BRACK(FH_SDU | 7), "\\Device\\Harddisk20\\Partition7"},
- {"/dev/sdu8", BRACK(FH_SDU | 8), "\\Device\\Harddisk20\\Partition8"},
- {"/dev/sdu9", BRACK(FH_SDU | 9), "\\Device\\Harddisk20\\Partition9"},
- {"/dev/sdu10", BRACK(FH_SDU | 10), "\\Device\\Harddisk20\\Partition10"},
- {"/dev/sdu11", BRACK(FH_SDU | 11), "\\Device\\Harddisk20\\Partition11"},
- {"/dev/sdu12", BRACK(FH_SDU | 12), "\\Device\\Harddisk20\\Partition12"},
- {"/dev/sdu13", BRACK(FH_SDU | 13), "\\Device\\Harddisk20\\Partition13"},
- {"/dev/sdu14", BRACK(FH_SDU | 14), "\\Device\\Harddisk20\\Partition14"},
- {"/dev/sdu15", BRACK(FH_SDU | 15), "\\Device\\Harddisk20\\Partition15"},
- {"/dev/sdv1", BRACK(FH_SDV | 1), "\\Device\\Harddisk21\\Partition1"},
- {"/dev/sdv2", BRACK(FH_SDV | 2), "\\Device\\Harddisk21\\Partition2"},
- {"/dev/sdv3", BRACK(FH_SDV | 3), "\\Device\\Harddisk21\\Partition3"},
- {"/dev/sdv4", BRACK(FH_SDV | 4), "\\Device\\Harddisk21\\Partition4"},
- {"/dev/sdv5", BRACK(FH_SDV | 5), "\\Device\\Harddisk21\\Partition5"},
- {"/dev/sdv6", BRACK(FH_SDV | 6), "\\Device\\Harddisk21\\Partition6"},
- {"/dev/sdv7", BRACK(FH_SDV | 7), "\\Device\\Harddisk21\\Partition7"},
- {"/dev/sdv8", BRACK(FH_SDV | 8), "\\Device\\Harddisk21\\Partition8"},
- {"/dev/sdv9", BRACK(FH_SDV | 9), "\\Device\\Harddisk21\\Partition9"},
- {"/dev/sdv10", BRACK(FH_SDV | 10), "\\Device\\Harddisk21\\Partition10"},
- {"/dev/sdv11", BRACK(FH_SDV | 11), "\\Device\\Harddisk21\\Partition11"},
- {"/dev/sdv12", BRACK(FH_SDV | 12), "\\Device\\Harddisk21\\Partition12"},
- {"/dev/sdv13", BRACK(FH_SDV | 13), "\\Device\\Harddisk21\\Partition13"},
- {"/dev/sdv14", BRACK(FH_SDV | 14), "\\Device\\Harddisk21\\Partition14"},
- {"/dev/sdv15", BRACK(FH_SDV | 15), "\\Device\\Harddisk21\\Partition15"},
- {"/dev/sdw1", BRACK(FH_SDW | 1), "\\Device\\Harddisk22\\Partition1"},
- {"/dev/sdw2", BRACK(FH_SDW | 2), "\\Device\\Harddisk22\\Partition2"},
- {"/dev/sdw3", BRACK(FH_SDW | 3), "\\Device\\Harddisk22\\Partition3"},
- {"/dev/sdw4", BRACK(FH_SDW | 4), "\\Device\\Harddisk22\\Partition4"},
- {"/dev/sdw5", BRACK(FH_SDW | 5), "\\Device\\Harddisk22\\Partition5"},
- {"/dev/sdw6", BRACK(FH_SDW | 6), "\\Device\\Harddisk22\\Partition6"},
- {"/dev/sdw7", BRACK(FH_SDW | 7), "\\Device\\Harddisk22\\Partition7"},
- {"/dev/sdw8", BRACK(FH_SDW | 8), "\\Device\\Harddisk22\\Partition8"},
- {"/dev/sdw9", BRACK(FH_SDW | 9), "\\Device\\Harddisk22\\Partition9"},
- {"/dev/sdw10", BRACK(FH_SDW | 10), "\\Device\\Harddisk22\\Partition10"},
- {"/dev/sdw11", BRACK(FH_SDW | 11), "\\Device\\Harddisk22\\Partition11"},
- {"/dev/sdw12", BRACK(FH_SDW | 12), "\\Device\\Harddisk22\\Partition12"},
- {"/dev/sdw13", BRACK(FH_SDW | 13), "\\Device\\Harddisk22\\Partition13"},
- {"/dev/sdw14", BRACK(FH_SDW | 14), "\\Device\\Harddisk22\\Partition14"},
- {"/dev/sdw15", BRACK(FH_SDW | 15), "\\Device\\Harddisk22\\Partition15"},
- {"/dev/sdx1", BRACK(FH_SDX | 1), "\\Device\\Harddisk23\\Partition1"},
- {"/dev/sdx2", BRACK(FH_SDX | 2), "\\Device\\Harddisk23\\Partition2"},
- {"/dev/sdx3", BRACK(FH_SDX | 3), "\\Device\\Harddisk23\\Partition3"},
- {"/dev/sdx4", BRACK(FH_SDX | 4), "\\Device\\Harddisk23\\Partition4"},
- {"/dev/sdx5", BRACK(FH_SDX | 5), "\\Device\\Harddisk23\\Partition5"},
- {"/dev/sdx6", BRACK(FH_SDX | 6), "\\Device\\Harddisk23\\Partition6"},
- {"/dev/sdx7", BRACK(FH_SDX | 7), "\\Device\\Harddisk23\\Partition7"},
- {"/dev/sdx8", BRACK(FH_SDX | 8), "\\Device\\Harddisk23\\Partition8"},
- {"/dev/sdx9", BRACK(FH_SDX | 9), "\\Device\\Harddisk23\\Partition9"},
- {"/dev/sdx10", BRACK(FH_SDX | 10), "\\Device\\Harddisk23\\Partition10"},
- {"/dev/sdx11", BRACK(FH_SDX | 11), "\\Device\\Harddisk23\\Partition11"},
- {"/dev/sdx12", BRACK(FH_SDX | 12), "\\Device\\Harddisk23\\Partition12"},
- {"/dev/sdx13", BRACK(FH_SDX | 13), "\\Device\\Harddisk23\\Partition13"},
- {"/dev/sdx14", BRACK(FH_SDX | 14), "\\Device\\Harddisk23\\Partition14"},
- {"/dev/sdx15", BRACK(FH_SDX | 15), "\\Device\\Harddisk23\\Partition15"},
- {"/dev/sdy1", BRACK(FH_SDY | 1), "\\Device\\Harddisk24\\Partition1"},
- {"/dev/sdy2", BRACK(FH_SDY | 2), "\\Device\\Harddisk24\\Partition2"},
- {"/dev/sdy3", BRACK(FH_SDY | 3), "\\Device\\Harddisk24\\Partition3"},
- {"/dev/sdy4", BRACK(FH_SDY | 4), "\\Device\\Harddisk24\\Partition4"},
- {"/dev/sdy5", BRACK(FH_SDY | 5), "\\Device\\Harddisk24\\Partition5"},
- {"/dev/sdy6", BRACK(FH_SDY | 6), "\\Device\\Harddisk24\\Partition6"},
- {"/dev/sdy7", BRACK(FH_SDY | 7), "\\Device\\Harddisk24\\Partition7"},
- {"/dev/sdy8", BRACK(FH_SDY | 8), "\\Device\\Harddisk24\\Partition8"},
- {"/dev/sdy9", BRACK(FH_SDY | 9), "\\Device\\Harddisk24\\Partition9"},
- {"/dev/sdy10", BRACK(FH_SDY | 10), "\\Device\\Harddisk24\\Partition10"},
- {"/dev/sdy11", BRACK(FH_SDY | 11), "\\Device\\Harddisk24\\Partition11"},
- {"/dev/sdy12", BRACK(FH_SDY | 12), "\\Device\\Harddisk24\\Partition12"},
- {"/dev/sdy13", BRACK(FH_SDY | 13), "\\Device\\Harddisk24\\Partition13"},
- {"/dev/sdy14", BRACK(FH_SDY | 14), "\\Device\\Harddisk24\\Partition14"},
- {"/dev/sdy15", BRACK(FH_SDY | 15), "\\Device\\Harddisk24\\Partition15"},
- {"/dev/sdz1", BRACK(FH_SDZ | 1), "\\Device\\Harddisk25\\Partition1"},
- {"/dev/sdz2", BRACK(FH_SDZ | 2), "\\Device\\Harddisk25\\Partition2"},
- {"/dev/sdz3", BRACK(FH_SDZ | 3), "\\Device\\Harddisk25\\Partition3"},
- {"/dev/sdz4", BRACK(FH_SDZ | 4), "\\Device\\Harddisk25\\Partition4"},
- {"/dev/sdz5", BRACK(FH_SDZ | 5), "\\Device\\Harddisk25\\Partition5"},
- {"/dev/sdz6", BRACK(FH_SDZ | 6), "\\Device\\Harddisk25\\Partition6"},
- {"/dev/sdz7", BRACK(FH_SDZ | 7), "\\Device\\Harddisk25\\Partition7"},
- {"/dev/sdz8", BRACK(FH_SDZ | 8), "\\Device\\Harddisk25\\Partition8"},
- {"/dev/sdz9", BRACK(FH_SDZ | 9), "\\Device\\Harddisk25\\Partition9"},
- {"/dev/sdz10", BRACK(FH_SDZ | 10), "\\Device\\Harddisk25\\Partition10"},
- {"/dev/sdz11", BRACK(FH_SDZ | 11), "\\Device\\Harddisk25\\Partition11"},
- {"/dev/sdz12", BRACK(FH_SDZ | 12), "\\Device\\Harddisk25\\Partition12"},
- {"/dev/sdz13", BRACK(FH_SDZ | 13), "\\Device\\Harddisk25\\Partition13"},
- {"/dev/sdz14", BRACK(FH_SDZ | 14), "\\Device\\Harddisk25\\Partition14"},
- {"/dev/sdz15", BRACK(FH_SDZ | 15), "\\Device\\Harddisk25\\Partition15"},
- {"/dev/sdaa", BRACK(FH_SDAA), "\\Device\\Harddisk26\\Partition0"},
- {"/dev/sdab", BRACK(FH_SDAB), "\\Device\\Harddisk27\\Partition0"},
- {"/dev/sdac", BRACK(FH_SDAC), "\\Device\\Harddisk28\\Partition0"},
- {"/dev/sdad", BRACK(FH_SDAD), "\\Device\\Harddisk29\\Partition0"},
- {"/dev/sdae", BRACK(FH_SDAE), "\\Device\\Harddisk30\\Partition0"},
- {"/dev/sdaf", BRACK(FH_SDAF), "\\Device\\Harddisk31\\Partition0"},
- {"/dev/sdag", BRACK(FH_SDAG), "\\Device\\Harddisk32\\Partition0"},
- {"/dev/sdah", BRACK(FH_SDAH), "\\Device\\Harddisk33\\Partition0"},
- {"/dev/sdai", BRACK(FH_SDAI), "\\Device\\Harddisk34\\Partition0"},
- {"/dev/sdaj", BRACK(FH_SDAJ), "\\Device\\Harddisk35\\Partition0"},
- {"/dev/sdak", BRACK(FH_SDAK), "\\Device\\Harddisk36\\Partition0"},
- {"/dev/sdal", BRACK(FH_SDAL), "\\Device\\Harddisk37\\Partition0"},
- {"/dev/sdam", BRACK(FH_SDAM), "\\Device\\Harddisk38\\Partition0"},
- {"/dev/sdan", BRACK(FH_SDAN), "\\Device\\Harddisk39\\Partition0"},
- {"/dev/sdao", BRACK(FH_SDAO), "\\Device\\Harddisk40\\Partition0"},
- {"/dev/sdap", BRACK(FH_SDAP), "\\Device\\Harddisk41\\Partition0"},
- {"/dev/sdaq", BRACK(FH_SDAQ), "\\Device\\Harddisk42\\Partition0"},
- {"/dev/sdar", BRACK(FH_SDAR), "\\Device\\Harddisk43\\Partition0"},
- {"/dev/sdas", BRACK(FH_SDAS), "\\Device\\Harddisk44\\Partition0"},
- {"/dev/sdat", BRACK(FH_SDAT), "\\Device\\Harddisk45\\Partition0"},
- {"/dev/sdau", BRACK(FH_SDAU), "\\Device\\Harddisk46\\Partition0"},
- {"/dev/sdav", BRACK(FH_SDAV), "\\Device\\Harddisk47\\Partition0"},
- {"/dev/sdaw", BRACK(FH_SDAW), "\\Device\\Harddisk48\\Partition0"},
- {"/dev/sdax", BRACK(FH_SDAX), "\\Device\\Harddisk49\\Partition0"},
- {"/dev/sday", BRACK(FH_SDAY), "\\Device\\Harddisk50\\Partition0"},
- {"/dev/sdaz", BRACK(FH_SDAZ), "\\Device\\Harddisk51\\Partition0"},
- {"/dev/sdaa1", BRACK(FH_SDAA | 1), "\\Device\\Harddisk26\\Partition1"},
- {"/dev/sdaa2", BRACK(FH_SDAA | 2), "\\Device\\Harddisk26\\Partition2"},
- {"/dev/sdaa3", BRACK(FH_SDAA | 3), "\\Device\\Harddisk26\\Partition3"},
- {"/dev/sdaa4", BRACK(FH_SDAA | 4), "\\Device\\Harddisk26\\Partition4"},
- {"/dev/sdaa5", BRACK(FH_SDAA | 5), "\\Device\\Harddisk26\\Partition5"},
- {"/dev/sdaa6", BRACK(FH_SDAA | 6), "\\Device\\Harddisk26\\Partition6"},
- {"/dev/sdaa7", BRACK(FH_SDAA | 7), "\\Device\\Harddisk26\\Partition7"},
- {"/dev/sdaa8", BRACK(FH_SDAA | 8), "\\Device\\Harddisk26\\Partition8"},
- {"/dev/sdaa9", BRACK(FH_SDAA | 9), "\\Device\\Harddisk26\\Partition9"},
- {"/dev/sdaa10", BRACK(FH_SDAA | 10), "\\Device\\Harddisk26\\Partition10"},
- {"/dev/sdaa11", BRACK(FH_SDAA | 11), "\\Device\\Harddisk26\\Partition11"},
- {"/dev/sdaa12", BRACK(FH_SDAA | 12), "\\Device\\Harddisk26\\Partition12"},
- {"/dev/sdaa13", BRACK(FH_SDAA | 13), "\\Device\\Harddisk26\\Partition13"},
- {"/dev/sdaa14", BRACK(FH_SDAA | 14), "\\Device\\Harddisk26\\Partition14"},
- {"/dev/sdaa15", BRACK(FH_SDAA | 15), "\\Device\\Harddisk26\\Partition15"},
- {"/dev/sdab1", BRACK(FH_SDAB | 1), "\\Device\\Harddisk27\\Partition1"},
- {"/dev/sdab2", BRACK(FH_SDAB | 2), "\\Device\\Harddisk27\\Partition2"},
- {"/dev/sdab3", BRACK(FH_SDAB | 3), "\\Device\\Harddisk27\\Partition3"},
- {"/dev/sdab4", BRACK(FH_SDAB | 4), "\\Device\\Harddisk27\\Partition4"},
- {"/dev/sdab5", BRACK(FH_SDAB | 5), "\\Device\\Harddisk27\\Partition5"},
- {"/dev/sdab6", BRACK(FH_SDAB | 6), "\\Device\\Harddisk27\\Partition6"},
- {"/dev/sdab7", BRACK(FH_SDAB | 7), "\\Device\\Harddisk27\\Partition7"},
- {"/dev/sdab8", BRACK(FH_SDAB | 8), "\\Device\\Harddisk27\\Partition8"},
- {"/dev/sdab9", BRACK(FH_SDAB | 9), "\\Device\\Harddisk27\\Partition9"},
- {"/dev/sdab10", BRACK(FH_SDAB | 10), "\\Device\\Harddisk27\\Partition10"},
- {"/dev/sdab11", BRACK(FH_SDAB | 11), "\\Device\\Harddisk27\\Partition11"},
- {"/dev/sdab12", BRACK(FH_SDAB | 12), "\\Device\\Harddisk27\\Partition12"},
- {"/dev/sdab13", BRACK(FH_SDAB | 13), "\\Device\\Harddisk27\\Partition13"},
- {"/dev/sdab14", BRACK(FH_SDAB | 14), "\\Device\\Harddisk27\\Partition14"},
- {"/dev/sdab15", BRACK(FH_SDAB | 15), "\\Device\\Harddisk27\\Partition15"},
- {"/dev/sdac1", BRACK(FH_SDAC | 1), "\\Device\\Harddisk28\\Partition1"},
- {"/dev/sdac2", BRACK(FH_SDAC | 2), "\\Device\\Harddisk28\\Partition2"},
- {"/dev/sdac3", BRACK(FH_SDAC | 3), "\\Device\\Harddisk28\\Partition3"},
- {"/dev/sdac4", BRACK(FH_SDAC | 4), "\\Device\\Harddisk28\\Partition4"},
- {"/dev/sdac5", BRACK(FH_SDAC | 5), "\\Device\\Harddisk28\\Partition5"},
- {"/dev/sdac6", BRACK(FH_SDAC | 6), "\\Device\\Harddisk28\\Partition6"},
- {"/dev/sdac7", BRACK(FH_SDAC | 7), "\\Device\\Harddisk28\\Partition7"},
- {"/dev/sdac8", BRACK(FH_SDAC | 8), "\\Device\\Harddisk28\\Partition8"},
- {"/dev/sdac9", BRACK(FH_SDAC | 9), "\\Device\\Harddisk28\\Partition9"},
- {"/dev/sdac10", BRACK(FH_SDAC | 10), "\\Device\\Harddisk28\\Partition10"},
- {"/dev/sdac11", BRACK(FH_SDAC | 11), "\\Device\\Harddisk28\\Partition11"},
- {"/dev/sdac12", BRACK(FH_SDAC | 12), "\\Device\\Harddisk28\\Partition12"},
- {"/dev/sdac13", BRACK(FH_SDAC | 13), "\\Device\\Harddisk28\\Partition13"},
- {"/dev/sdac14", BRACK(FH_SDAC | 14), "\\Device\\Harddisk28\\Partition14"},
- {"/dev/sdac15", BRACK(FH_SDAC | 15), "\\Device\\Harddisk28\\Partition15"},
- {"/dev/sdad1", BRACK(FH_SDAD | 1), "\\Device\\Harddisk29\\Partition1"},
- {"/dev/sdad2", BRACK(FH_SDAD | 2), "\\Device\\Harddisk29\\Partition2"},
- {"/dev/sdad3", BRACK(FH_SDAD | 3), "\\Device\\Harddisk29\\Partition3"},
- {"/dev/sdad4", BRACK(FH_SDAD | 4), "\\Device\\Harddisk29\\Partition4"},
- {"/dev/sdad5", BRACK(FH_SDAD | 5), "\\Device\\Harddisk29\\Partition5"},
- {"/dev/sdad6", BRACK(FH_SDAD | 6), "\\Device\\Harddisk29\\Partition6"},
- {"/dev/sdad7", BRACK(FH_SDAD | 7), "\\Device\\Harddisk29\\Partition7"},
- {"/dev/sdad8", BRACK(FH_SDAD | 8), "\\Device\\Harddisk29\\Partition8"},
- {"/dev/sdad9", BRACK(FH_SDAD | 9), "\\Device\\Harddisk29\\Partition9"},
- {"/dev/sdad10", BRACK(FH_SDAD | 10), "\\Device\\Harddisk29\\Partition10"},
- {"/dev/sdad11", BRACK(FH_SDAD | 11), "\\Device\\Harddisk29\\Partition11"},
- {"/dev/sdad12", BRACK(FH_SDAD | 12), "\\Device\\Harddisk29\\Partition12"},
- {"/dev/sdad13", BRACK(FH_SDAD | 13), "\\Device\\Harddisk29\\Partition13"},
- {"/dev/sdad14", BRACK(FH_SDAD | 14), "\\Device\\Harddisk29\\Partition14"},
- {"/dev/sdad15", BRACK(FH_SDAD | 15), "\\Device\\Harddisk29\\Partition15"},
- {"/dev/sdae1", BRACK(FH_SDAE | 1), "\\Device\\Harddisk30\\Partition1"},
- {"/dev/sdae2", BRACK(FH_SDAE | 2), "\\Device\\Harddisk30\\Partition2"},
- {"/dev/sdae3", BRACK(FH_SDAE | 3), "\\Device\\Harddisk30\\Partition3"},
- {"/dev/sdae4", BRACK(FH_SDAE | 4), "\\Device\\Harddisk30\\Partition4"},
- {"/dev/sdae5", BRACK(FH_SDAE | 5), "\\Device\\Harddisk30\\Partition5"},
- {"/dev/sdae6", BRACK(FH_SDAE | 6), "\\Device\\Harddisk30\\Partition6"},
- {"/dev/sdae7", BRACK(FH_SDAE | 7), "\\Device\\Harddisk30\\Partition7"},
- {"/dev/sdae8", BRACK(FH_SDAE | 8), "\\Device\\Harddisk30\\Partition8"},
- {"/dev/sdae9", BRACK(FH_SDAE | 9), "\\Device\\Harddisk30\\Partition9"},
- {"/dev/sdae10", BRACK(FH_SDAE | 10), "\\Device\\Harddisk30\\Partition10"},
- {"/dev/sdae11", BRACK(FH_SDAE | 11), "\\Device\\Harddisk30\\Partition11"},
- {"/dev/sdae12", BRACK(FH_SDAE | 12), "\\Device\\Harddisk30\\Partition12"},
- {"/dev/sdae13", BRACK(FH_SDAE | 13), "\\Device\\Harddisk30\\Partition13"},
- {"/dev/sdae14", BRACK(FH_SDAE | 14), "\\Device\\Harddisk30\\Partition14"},
- {"/dev/sdae15", BRACK(FH_SDAE | 15), "\\Device\\Harddisk30\\Partition15"},
- {"/dev/sdaf1", BRACK(FH_SDAF | 1), "\\Device\\Harddisk31\\Partition1"},
- {"/dev/sdaf2", BRACK(FH_SDAF | 2), "\\Device\\Harddisk31\\Partition2"},
- {"/dev/sdaf3", BRACK(FH_SDAF | 3), "\\Device\\Harddisk31\\Partition3"},
- {"/dev/sdaf4", BRACK(FH_SDAF | 4), "\\Device\\Harddisk31\\Partition4"},
- {"/dev/sdaf5", BRACK(FH_SDAF | 5), "\\Device\\Harddisk31\\Partition5"},
- {"/dev/sdaf6", BRACK(FH_SDAF | 6), "\\Device\\Harddisk31\\Partition6"},
- {"/dev/sdaf7", BRACK(FH_SDAF | 7), "\\Device\\Harddisk31\\Partition7"},
- {"/dev/sdaf8", BRACK(FH_SDAF | 8), "\\Device\\Harddisk31\\Partition8"},
- {"/dev/sdaf9", BRACK(FH_SDAF | 9), "\\Device\\Harddisk31\\Partition9"},
- {"/dev/sdaf10", BRACK(FH_SDAF | 10), "\\Device\\Harddisk31\\Partition10"},
- {"/dev/sdaf11", BRACK(FH_SDAF | 11), "\\Device\\Harddisk31\\Partition11"},
- {"/dev/sdaf12", BRACK(FH_SDAF | 12), "\\Device\\Harddisk31\\Partition12"},
- {"/dev/sdaf13", BRACK(FH_SDAF | 13), "\\Device\\Harddisk31\\Partition13"},
- {"/dev/sdaf14", BRACK(FH_SDAF | 14), "\\Device\\Harddisk31\\Partition14"},
- {"/dev/sdaf15", BRACK(FH_SDAF | 15), "\\Device\\Harddisk31\\Partition15"},
- {"/dev/sdag1", BRACK(FH_SDAG | 1), "\\Device\\Harddisk32\\Partition1"},
- {"/dev/sdag2", BRACK(FH_SDAG | 2), "\\Device\\Harddisk32\\Partition2"},
- {"/dev/sdag3", BRACK(FH_SDAG | 3), "\\Device\\Harddisk32\\Partition3"},
- {"/dev/sdag4", BRACK(FH_SDAG | 4), "\\Device\\Harddisk32\\Partition4"},
- {"/dev/sdag5", BRACK(FH_SDAG | 5), "\\Device\\Harddisk32\\Partition5"},
- {"/dev/sdag6", BRACK(FH_SDAG | 6), "\\Device\\Harddisk32\\Partition6"},
- {"/dev/sdag7", BRACK(FH_SDAG | 7), "\\Device\\Harddisk32\\Partition7"},
- {"/dev/sdag8", BRACK(FH_SDAG | 8), "\\Device\\Harddisk32\\Partition8"},
- {"/dev/sdag9", BRACK(FH_SDAG | 9), "\\Device\\Harddisk32\\Partition9"},
- {"/dev/sdag10", BRACK(FH_SDAG | 10), "\\Device\\Harddisk32\\Partition10"},
- {"/dev/sdag11", BRACK(FH_SDAG | 11), "\\Device\\Harddisk32\\Partition11"},
- {"/dev/sdag12", BRACK(FH_SDAG | 12), "\\Device\\Harddisk32\\Partition12"},
- {"/dev/sdag13", BRACK(FH_SDAG | 13), "\\Device\\Harddisk32\\Partition13"},
- {"/dev/sdag14", BRACK(FH_SDAG | 14), "\\Device\\Harddisk32\\Partition14"},
- {"/dev/sdag15", BRACK(FH_SDAG | 15), "\\Device\\Harddisk32\\Partition15"},
- {"/dev/sdah1", BRACK(FH_SDAH | 1), "\\Device\\Harddisk33\\Partition1"},
- {"/dev/sdah2", BRACK(FH_SDAH | 2), "\\Device\\Harddisk33\\Partition2"},
- {"/dev/sdah3", BRACK(FH_SDAH | 3), "\\Device\\Harddisk33\\Partition3"},
- {"/dev/sdah4", BRACK(FH_SDAH | 4), "\\Device\\Harddisk33\\Partition4"},
- {"/dev/sdah5", BRACK(FH_SDAH | 5), "\\Device\\Harddisk33\\Partition5"},
- {"/dev/sdah6", BRACK(FH_SDAH | 6), "\\Device\\Harddisk33\\Partition6"},
- {"/dev/sdah7", BRACK(FH_SDAH | 7), "\\Device\\Harddisk33\\Partition7"},
- {"/dev/sdah8", BRACK(FH_SDAH | 8), "\\Device\\Harddisk33\\Partition8"},
- {"/dev/sdah9", BRACK(FH_SDAH | 9), "\\Device\\Harddisk33\\Partition9"},
- {"/dev/sdah10", BRACK(FH_SDAH | 10), "\\Device\\Harddisk33\\Partition10"},
- {"/dev/sdah11", BRACK(FH_SDAH | 11), "\\Device\\Harddisk33\\Partition11"},
- {"/dev/sdah12", BRACK(FH_SDAH | 12), "\\Device\\Harddisk33\\Partition12"},
- {"/dev/sdah13", BRACK(FH_SDAH | 13), "\\Device\\Harddisk33\\Partition13"},
- {"/dev/sdah14", BRACK(FH_SDAH | 14), "\\Device\\Harddisk33\\Partition14"},
- {"/dev/sdah15", BRACK(FH_SDAH | 15), "\\Device\\Harddisk33\\Partition15"},
- {"/dev/sdai1", BRACK(FH_SDAI | 1), "\\Device\\Harddisk34\\Partition1"},
- {"/dev/sdai2", BRACK(FH_SDAI | 2), "\\Device\\Harddisk34\\Partition2"},
- {"/dev/sdai3", BRACK(FH_SDAI | 3), "\\Device\\Harddisk34\\Partition3"},
- {"/dev/sdai4", BRACK(FH_SDAI | 4), "\\Device\\Harddisk34\\Partition4"},
- {"/dev/sdai5", BRACK(FH_SDAI | 5), "\\Device\\Harddisk34\\Partition5"},
- {"/dev/sdai6", BRACK(FH_SDAI | 6), "\\Device\\Harddisk34\\Partition6"},
- {"/dev/sdai7", BRACK(FH_SDAI | 7), "\\Device\\Harddisk34\\Partition7"},
- {"/dev/sdai8", BRACK(FH_SDAI | 8), "\\Device\\Harddisk34\\Partition8"},
- {"/dev/sdai9", BRACK(FH_SDAI | 9), "\\Device\\Harddisk34\\Partition9"},
- {"/dev/sdai10", BRACK(FH_SDAI | 10), "\\Device\\Harddisk34\\Partition10"},
- {"/dev/sdai11", BRACK(FH_SDAI | 11), "\\Device\\Harddisk34\\Partition11"},
- {"/dev/sdai12", BRACK(FH_SDAI | 12), "\\Device\\Harddisk34\\Partition12"},
- {"/dev/sdai13", BRACK(FH_SDAI | 13), "\\Device\\Harddisk34\\Partition13"},
- {"/dev/sdai14", BRACK(FH_SDAI | 14), "\\Device\\Harddisk34\\Partition14"},
- {"/dev/sdai15", BRACK(FH_SDAI | 15), "\\Device\\Harddisk34\\Partition15"},
- {"/dev/sdaj1", BRACK(FH_SDAJ | 1), "\\Device\\Harddisk35\\Partition1"},
- {"/dev/sdaj2", BRACK(FH_SDAJ | 2), "\\Device\\Harddisk35\\Partition2"},
- {"/dev/sdaj3", BRACK(FH_SDAJ | 3), "\\Device\\Harddisk35\\Partition3"},
- {"/dev/sdaj4", BRACK(FH_SDAJ | 4), "\\Device\\Harddisk35\\Partition4"},
- {"/dev/sdaj5", BRACK(FH_SDAJ | 5), "\\Device\\Harddisk35\\Partition5"},
- {"/dev/sdaj6", BRACK(FH_SDAJ | 6), "\\Device\\Harddisk35\\Partition6"},
- {"/dev/sdaj7", BRACK(FH_SDAJ | 7), "\\Device\\Harddisk35\\Partition7"},
- {"/dev/sdaj8", BRACK(FH_SDAJ | 8), "\\Device\\Harddisk35\\Partition8"},
- {"/dev/sdaj9", BRACK(FH_SDAJ | 9), "\\Device\\Harddisk35\\Partition9"},
- {"/dev/sdaj10", BRACK(FH_SDAJ | 10), "\\Device\\Harddisk35\\Partition10"},
- {"/dev/sdaj11", BRACK(FH_SDAJ | 11), "\\Device\\Harddisk35\\Partition11"},
- {"/dev/sdaj12", BRACK(FH_SDAJ | 12), "\\Device\\Harddisk35\\Partition12"},
- {"/dev/sdaj13", BRACK(FH_SDAJ | 13), "\\Device\\Harddisk35\\Partition13"},
- {"/dev/sdaj14", BRACK(FH_SDAJ | 14), "\\Device\\Harddisk35\\Partition14"},
- {"/dev/sdaj15", BRACK(FH_SDAJ | 15), "\\Device\\Harddisk35\\Partition15"},
- {"/dev/sdak1", BRACK(FH_SDAK | 1), "\\Device\\Harddisk36\\Partition1"},
- {"/dev/sdak2", BRACK(FH_SDAK | 2), "\\Device\\Harddisk36\\Partition2"},
- {"/dev/sdak3", BRACK(FH_SDAK | 3), "\\Device\\Harddisk36\\Partition3"},
- {"/dev/sdak4", BRACK(FH_SDAK | 4), "\\Device\\Harddisk36\\Partition4"},
- {"/dev/sdak5", BRACK(FH_SDAK | 5), "\\Device\\Harddisk36\\Partition5"},
- {"/dev/sdak6", BRACK(FH_SDAK | 6), "\\Device\\Harddisk36\\Partition6"},
- {"/dev/sdak7", BRACK(FH_SDAK | 7), "\\Device\\Harddisk36\\Partition7"},
- {"/dev/sdak8", BRACK(FH_SDAK | 8), "\\Device\\Harddisk36\\Partition8"},
- {"/dev/sdak9", BRACK(FH_SDAK | 9), "\\Device\\Harddisk36\\Partition9"},
- {"/dev/sdak10", BRACK(FH_SDAK | 10), "\\Device\\Harddisk36\\Partition10"},
- {"/dev/sdak11", BRACK(FH_SDAK | 11), "\\Device\\Harddisk36\\Partition11"},
- {"/dev/sdak12", BRACK(FH_SDAK | 12), "\\Device\\Harddisk36\\Partition12"},
- {"/dev/sdak13", BRACK(FH_SDAK | 13), "\\Device\\Harddisk36\\Partition13"},
- {"/dev/sdak14", BRACK(FH_SDAK | 14), "\\Device\\Harddisk36\\Partition14"},
- {"/dev/sdak15", BRACK(FH_SDAK | 15), "\\Device\\Harddisk36\\Partition15"},
- {"/dev/sdal1", BRACK(FH_SDAL | 1), "\\Device\\Harddisk37\\Partition1"},
- {"/dev/sdal2", BRACK(FH_SDAL | 2), "\\Device\\Harddisk37\\Partition2"},
- {"/dev/sdal3", BRACK(FH_SDAL | 3), "\\Device\\Harddisk37\\Partition3"},
- {"/dev/sdal4", BRACK(FH_SDAL | 4), "\\Device\\Harddisk37\\Partition4"},
- {"/dev/sdal5", BRACK(FH_SDAL | 5), "\\Device\\Harddisk37\\Partition5"},
- {"/dev/sdal6", BRACK(FH_SDAL | 6), "\\Device\\Harddisk37\\Partition6"},
- {"/dev/sdal7", BRACK(FH_SDAL | 7), "\\Device\\Harddisk37\\Partition7"},
- {"/dev/sdal8", BRACK(FH_SDAL | 8), "\\Device\\Harddisk37\\Partition8"},
- {"/dev/sdal9", BRACK(FH_SDAL | 9), "\\Device\\Harddisk37\\Partition9"},
- {"/dev/sdal10", BRACK(FH_SDAL | 10), "\\Device\\Harddisk37\\Partition10"},
- {"/dev/sdal11", BRACK(FH_SDAL | 11), "\\Device\\Harddisk37\\Partition11"},
- {"/dev/sdal12", BRACK(FH_SDAL | 12), "\\Device\\Harddisk37\\Partition12"},
- {"/dev/sdal13", BRACK(FH_SDAL | 13), "\\Device\\Harddisk37\\Partition13"},
- {"/dev/sdal14", BRACK(FH_SDAL | 14), "\\Device\\Harddisk37\\Partition14"},
- {"/dev/sdal15", BRACK(FH_SDAL | 15), "\\Device\\Harddisk37\\Partition15"},
- {"/dev/sdam1", BRACK(FH_SDAM | 1), "\\Device\\Harddisk38\\Partition1"},
- {"/dev/sdam2", BRACK(FH_SDAM | 2), "\\Device\\Harddisk38\\Partition2"},
- {"/dev/sdam3", BRACK(FH_SDAM | 3), "\\Device\\Harddisk38\\Partition3"},
- {"/dev/sdam4", BRACK(FH_SDAM | 4), "\\Device\\Harddisk38\\Partition4"},
- {"/dev/sdam5", BRACK(FH_SDAM | 5), "\\Device\\Harddisk38\\Partition5"},
- {"/dev/sdam6", BRACK(FH_SDAM | 6), "\\Device\\Harddisk38\\Partition6"},
- {"/dev/sdam7", BRACK(FH_SDAM | 7), "\\Device\\Harddisk38\\Partition7"},
- {"/dev/sdam8", BRACK(FH_SDAM | 8), "\\Device\\Harddisk38\\Partition8"},
- {"/dev/sdam9", BRACK(FH_SDAM | 9), "\\Device\\Harddisk38\\Partition9"},
- {"/dev/sdam10", BRACK(FH_SDAM | 10), "\\Device\\Harddisk38\\Partition10"},
- {"/dev/sdam11", BRACK(FH_SDAM | 11), "\\Device\\Harddisk38\\Partition11"},
- {"/dev/sdam12", BRACK(FH_SDAM | 12), "\\Device\\Harddisk38\\Partition12"},
- {"/dev/sdam13", BRACK(FH_SDAM | 13), "\\Device\\Harddisk38\\Partition13"},
- {"/dev/sdam14", BRACK(FH_SDAM | 14), "\\Device\\Harddisk38\\Partition14"},
- {"/dev/sdam15", BRACK(FH_SDAM | 15), "\\Device\\Harddisk38\\Partition15"},
- {"/dev/sdan1", BRACK(FH_SDAN | 1), "\\Device\\Harddisk39\\Partition1"},
- {"/dev/sdan2", BRACK(FH_SDAN | 2), "\\Device\\Harddisk39\\Partition2"},
- {"/dev/sdan3", BRACK(FH_SDAN | 3), "\\Device\\Harddisk39\\Partition3"},
- {"/dev/sdan4", BRACK(FH_SDAN | 4), "\\Device\\Harddisk39\\Partition4"},
- {"/dev/sdan5", BRACK(FH_SDAN | 5), "\\Device\\Harddisk39\\Partition5"},
- {"/dev/sdan6", BRACK(FH_SDAN | 6), "\\Device\\Harddisk39\\Partition6"},
- {"/dev/sdan7", BRACK(FH_SDAN | 7), "\\Device\\Harddisk39\\Partition7"},
- {"/dev/sdan8", BRACK(FH_SDAN | 8), "\\Device\\Harddisk39\\Partition8"},
- {"/dev/sdan9", BRACK(FH_SDAN | 9), "\\Device\\Harddisk39\\Partition9"},
- {"/dev/sdan10", BRACK(FH_SDAN | 10), "\\Device\\Harddisk39\\Partition10"},
- {"/dev/sdan11", BRACK(FH_SDAN | 11), "\\Device\\Harddisk39\\Partition11"},
- {"/dev/sdan12", BRACK(FH_SDAN | 12), "\\Device\\Harddisk39\\Partition12"},
- {"/dev/sdan13", BRACK(FH_SDAN | 13), "\\Device\\Harddisk39\\Partition13"},
- {"/dev/sdan14", BRACK(FH_SDAN | 14), "\\Device\\Harddisk39\\Partition14"},
- {"/dev/sdan15", BRACK(FH_SDAN | 15), "\\Device\\Harddisk39\\Partition15"},
- {"/dev/sdao1", BRACK(FH_SDAO | 1), "\\Device\\Harddisk40\\Partition1"},
- {"/dev/sdao2", BRACK(FH_SDAO | 2), "\\Device\\Harddisk40\\Partition2"},
- {"/dev/sdao3", BRACK(FH_SDAO | 3), "\\Device\\Harddisk40\\Partition3"},
- {"/dev/sdao4", BRACK(FH_SDAO | 4), "\\Device\\Harddisk40\\Partition4"},
- {"/dev/sdao5", BRACK(FH_SDAO | 5), "\\Device\\Harddisk40\\Partition5"},
- {"/dev/sdao6", BRACK(FH_SDAO | 6), "\\Device\\Harddisk40\\Partition6"},
- {"/dev/sdao7", BRACK(FH_SDAO | 7), "\\Device\\Harddisk40\\Partition7"},
- {"/dev/sdao8", BRACK(FH_SDAO | 8), "\\Device\\Harddisk40\\Partition8"},
- {"/dev/sdao9", BRACK(FH_SDAO | 9), "\\Device\\Harddisk40\\Partition9"},
- {"/dev/sdao10", BRACK(FH_SDAO | 10), "\\Device\\Harddisk40\\Partition10"},
- {"/dev/sdao11", BRACK(FH_SDAO | 11), "\\Device\\Harddisk40\\Partition11"},
- {"/dev/sdao12", BRACK(FH_SDAO | 12), "\\Device\\Harddisk40\\Partition12"},
- {"/dev/sdao13", BRACK(FH_SDAO | 13), "\\Device\\Harddisk40\\Partition13"},
- {"/dev/sdao14", BRACK(FH_SDAO | 14), "\\Device\\Harddisk40\\Partition14"},
- {"/dev/sdao15", BRACK(FH_SDAO | 15), "\\Device\\Harddisk40\\Partition15"},
- {"/dev/sdap1", BRACK(FH_SDAP | 1), "\\Device\\Harddisk41\\Partition1"},
- {"/dev/sdap2", BRACK(FH_SDAP | 2), "\\Device\\Harddisk41\\Partition2"},
- {"/dev/sdap3", BRACK(FH_SDAP | 3), "\\Device\\Harddisk41\\Partition3"},
- {"/dev/sdap4", BRACK(FH_SDAP | 4), "\\Device\\Harddisk41\\Partition4"},
- {"/dev/sdap5", BRACK(FH_SDAP | 5), "\\Device\\Harddisk41\\Partition5"},
- {"/dev/sdap6", BRACK(FH_SDAP | 6), "\\Device\\Harddisk41\\Partition6"},
- {"/dev/sdap7", BRACK(FH_SDAP | 7), "\\Device\\Harddisk41\\Partition7"},
- {"/dev/sdap8", BRACK(FH_SDAP | 8), "\\Device\\Harddisk41\\Partition8"},
- {"/dev/sdap9", BRACK(FH_SDAP | 9), "\\Device\\Harddisk41\\Partition9"},
- {"/dev/sdap10", BRACK(FH_SDAP | 10), "\\Device\\Harddisk41\\Partition10"},
- {"/dev/sdap11", BRACK(FH_SDAP | 11), "\\Device\\Harddisk41\\Partition11"},
- {"/dev/sdap12", BRACK(FH_SDAP | 12), "\\Device\\Harddisk41\\Partition12"},
- {"/dev/sdap13", BRACK(FH_SDAP | 13), "\\Device\\Harddisk41\\Partition13"},
- {"/dev/sdap14", BRACK(FH_SDAP | 14), "\\Device\\Harddisk41\\Partition14"},
- {"/dev/sdap15", BRACK(FH_SDAP | 15), "\\Device\\Harddisk41\\Partition15"},
- {"/dev/sdaq1", BRACK(FH_SDAQ | 1), "\\Device\\Harddisk42\\Partition1"},
- {"/dev/sdaq2", BRACK(FH_SDAQ | 2), "\\Device\\Harddisk42\\Partition2"},
- {"/dev/sdaq3", BRACK(FH_SDAQ | 3), "\\Device\\Harddisk42\\Partition3"},
- {"/dev/sdaq4", BRACK(FH_SDAQ | 4), "\\Device\\Harddisk42\\Partition4"},
- {"/dev/sdaq5", BRACK(FH_SDAQ | 5), "\\Device\\Harddisk42\\Partition5"},
- {"/dev/sdaq6", BRACK(FH_SDAQ | 6), "\\Device\\Harddisk42\\Partition6"},
- {"/dev/sdaq7", BRACK(FH_SDAQ | 7), "\\Device\\Harddisk42\\Partition7"},
- {"/dev/sdaq8", BRACK(FH_SDAQ | 8), "\\Device\\Harddisk42\\Partition8"},
- {"/dev/sdaq9", BRACK(FH_SDAQ | 9), "\\Device\\Harddisk42\\Partition9"},
- {"/dev/sdaq10", BRACK(FH_SDAQ | 10), "\\Device\\Harddisk42\\Partition10"},
- {"/dev/sdaq11", BRACK(FH_SDAQ | 11), "\\Device\\Harddisk42\\Partition11"},
- {"/dev/sdaq12", BRACK(FH_SDAQ | 12), "\\Device\\Harddisk42\\Partition12"},
- {"/dev/sdaq13", BRACK(FH_SDAQ | 13), "\\Device\\Harddisk42\\Partition13"},
- {"/dev/sdaq14", BRACK(FH_SDAQ | 14), "\\Device\\Harddisk42\\Partition14"},
- {"/dev/sdaq15", BRACK(FH_SDAQ | 15), "\\Device\\Harddisk42\\Partition15"},
- {"/dev/sdar1", BRACK(FH_SDAR | 1), "\\Device\\Harddisk43\\Partition1"},
- {"/dev/sdar2", BRACK(FH_SDAR | 2), "\\Device\\Harddisk43\\Partition2"},
- {"/dev/sdar3", BRACK(FH_SDAR | 3), "\\Device\\Harddisk43\\Partition3"},
- {"/dev/sdar4", BRACK(FH_SDAR | 4), "\\Device\\Harddisk43\\Partition4"},
- {"/dev/sdar5", BRACK(FH_SDAR | 5), "\\Device\\Harddisk43\\Partition5"},
- {"/dev/sdar6", BRACK(FH_SDAR | 6), "\\Device\\Harddisk43\\Partition6"},
- {"/dev/sdar7", BRACK(FH_SDAR | 7), "\\Device\\Harddisk43\\Partition7"},
- {"/dev/sdar8", BRACK(FH_SDAR | 8), "\\Device\\Harddisk43\\Partition8"},
- {"/dev/sdar9", BRACK(FH_SDAR | 9), "\\Device\\Harddisk43\\Partition9"},
- {"/dev/sdar10", BRACK(FH_SDAR | 10), "\\Device\\Harddisk43\\Partition10"},
- {"/dev/sdar11", BRACK(FH_SDAR | 11), "\\Device\\Harddisk43\\Partition11"},
- {"/dev/sdar12", BRACK(FH_SDAR | 12), "\\Device\\Harddisk43\\Partition12"},
- {"/dev/sdar13", BRACK(FH_SDAR | 13), "\\Device\\Harddisk43\\Partition13"},
- {"/dev/sdar14", BRACK(FH_SDAR | 14), "\\Device\\Harddisk43\\Partition14"},
- {"/dev/sdar15", BRACK(FH_SDAR | 15), "\\Device\\Harddisk43\\Partition15"},
- {"/dev/sdas1", BRACK(FH_SDAS | 1), "\\Device\\Harddisk44\\Partition1"},
- {"/dev/sdas2", BRACK(FH_SDAS | 2), "\\Device\\Harddisk44\\Partition2"},
- {"/dev/sdas3", BRACK(FH_SDAS | 3), "\\Device\\Harddisk44\\Partition3"},
- {"/dev/sdas4", BRACK(FH_SDAS | 4), "\\Device\\Harddisk44\\Partition4"},
- {"/dev/sdas5", BRACK(FH_SDAS | 5), "\\Device\\Harddisk44\\Partition5"},
- {"/dev/sdas6", BRACK(FH_SDAS | 6), "\\Device\\Harddisk44\\Partition6"},
- {"/dev/sdas7", BRACK(FH_SDAS | 7), "\\Device\\Harddisk44\\Partition7"},
- {"/dev/sdas8", BRACK(FH_SDAS | 8), "\\Device\\Harddisk44\\Partition8"},
- {"/dev/sdas9", BRACK(FH_SDAS | 9), "\\Device\\Harddisk44\\Partition9"},
- {"/dev/sdas10", BRACK(FH_SDAS | 10), "\\Device\\Harddisk44\\Partition10"},
- {"/dev/sdas11", BRACK(FH_SDAS | 11), "\\Device\\Harddisk44\\Partition11"},
- {"/dev/sdas12", BRACK(FH_SDAS | 12), "\\Device\\Harddisk44\\Partition12"},
- {"/dev/sdas13", BRACK(FH_SDAS | 13), "\\Device\\Harddisk44\\Partition13"},
- {"/dev/sdas14", BRACK(FH_SDAS | 14), "\\Device\\Harddisk44\\Partition14"},
- {"/dev/sdas15", BRACK(FH_SDAS | 15), "\\Device\\Harddisk44\\Partition15"},
- {"/dev/sdat1", BRACK(FH_SDAT | 1), "\\Device\\Harddisk45\\Partition1"},
- {"/dev/sdat2", BRACK(FH_SDAT | 2), "\\Device\\Harddisk45\\Partition2"},
- {"/dev/sdat3", BRACK(FH_SDAT | 3), "\\Device\\Harddisk45\\Partition3"},
- {"/dev/sdat4", BRACK(FH_SDAT | 4), "\\Device\\Harddisk45\\Partition4"},
- {"/dev/sdat5", BRACK(FH_SDAT | 5), "\\Device\\Harddisk45\\Partition5"},
- {"/dev/sdat6", BRACK(FH_SDAT | 6), "\\Device\\Harddisk45\\Partition6"},
- {"/dev/sdat7", BRACK(FH_SDAT | 7), "\\Device\\Harddisk45\\Partition7"},
- {"/dev/sdat8", BRACK(FH_SDAT | 8), "\\Device\\Harddisk45\\Partition8"},
- {"/dev/sdat9", BRACK(FH_SDAT | 9), "\\Device\\Harddisk45\\Partition9"},
- {"/dev/sdat10", BRACK(FH_SDAT | 10), "\\Device\\Harddisk45\\Partition10"},
- {"/dev/sdat11", BRACK(FH_SDAT | 11), "\\Device\\Harddisk45\\Partition11"},
- {"/dev/sdat12", BRACK(FH_SDAT | 12), "\\Device\\Harddisk45\\Partition12"},
- {"/dev/sdat13", BRACK(FH_SDAT | 13), "\\Device\\Harddisk45\\Partition13"},
- {"/dev/sdat14", BRACK(FH_SDAT | 14), "\\Device\\Harddisk45\\Partition14"},
- {"/dev/sdat15", BRACK(FH_SDAT | 15), "\\Device\\Harddisk45\\Partition15"},
- {"/dev/sdau1", BRACK(FH_SDAU | 1), "\\Device\\Harddisk46\\Partition1"},
- {"/dev/sdau2", BRACK(FH_SDAU | 2), "\\Device\\Harddisk46\\Partition2"},
- {"/dev/sdau3", BRACK(FH_SDAU | 3), "\\Device\\Harddisk46\\Partition3"},
- {"/dev/sdau4", BRACK(FH_SDAU | 4), "\\Device\\Harddisk46\\Partition4"},
- {"/dev/sdau5", BRACK(FH_SDAU | 5), "\\Device\\Harddisk46\\Partition5"},
- {"/dev/sdau6", BRACK(FH_SDAU | 6), "\\Device\\Harddisk46\\Partition6"},
- {"/dev/sdau7", BRACK(FH_SDAU | 7), "\\Device\\Harddisk46\\Partition7"},
- {"/dev/sdau8", BRACK(FH_SDAU | 8), "\\Device\\Harddisk46\\Partition8"},
- {"/dev/sdau9", BRACK(FH_SDAU | 9), "\\Device\\Harddisk46\\Partition9"},
- {"/dev/sdau10", BRACK(FH_SDAU | 10), "\\Device\\Harddisk46\\Partition10"},
- {"/dev/sdau11", BRACK(FH_SDAU | 11), "\\Device\\Harddisk46\\Partition11"},
- {"/dev/sdau12", BRACK(FH_SDAU | 12), "\\Device\\Harddisk46\\Partition12"},
- {"/dev/sdau13", BRACK(FH_SDAU | 13), "\\Device\\Harddisk46\\Partition13"},
- {"/dev/sdau14", BRACK(FH_SDAU | 14), "\\Device\\Harddisk46\\Partition14"},
- {"/dev/sdau15", BRACK(FH_SDAU | 15), "\\Device\\Harddisk46\\Partition15"},
- {"/dev/sdav1", BRACK(FH_SDAV | 1), "\\Device\\Harddisk47\\Partition1"},
- {"/dev/sdav2", BRACK(FH_SDAV | 2), "\\Device\\Harddisk47\\Partition2"},
- {"/dev/sdav3", BRACK(FH_SDAV | 3), "\\Device\\Harddisk47\\Partition3"},
- {"/dev/sdav4", BRACK(FH_SDAV | 4), "\\Device\\Harddisk47\\Partition4"},
- {"/dev/sdav5", BRACK(FH_SDAV | 5), "\\Device\\Harddisk47\\Partition5"},
- {"/dev/sdav6", BRACK(FH_SDAV | 6), "\\Device\\Harddisk47\\Partition6"},
- {"/dev/sdav7", BRACK(FH_SDAV | 7), "\\Device\\Harddisk47\\Partition7"},
- {"/dev/sdav8", BRACK(FH_SDAV | 8), "\\Device\\Harddisk47\\Partition8"},
- {"/dev/sdav9", BRACK(FH_SDAV | 9), "\\Device\\Harddisk47\\Partition9"},
- {"/dev/sdav10", BRACK(FH_SDAV | 10), "\\Device\\Harddisk47\\Partition10"},
- {"/dev/sdav11", BRACK(FH_SDAV | 11), "\\Device\\Harddisk47\\Partition11"},
- {"/dev/sdav12", BRACK(FH_SDAV | 12), "\\Device\\Harddisk47\\Partition12"},
- {"/dev/sdav13", BRACK(FH_SDAV | 13), "\\Device\\Harddisk47\\Partition13"},
- {"/dev/sdav14", BRACK(FH_SDAV | 14), "\\Device\\Harddisk47\\Partition14"},
- {"/dev/sdav15", BRACK(FH_SDAV | 15), "\\Device\\Harddisk47\\Partition15"},
- {"/dev/sdaw1", BRACK(FH_SDAW | 1), "\\Device\\Harddisk48\\Partition1"},
- {"/dev/sdaw2", BRACK(FH_SDAW | 2), "\\Device\\Harddisk48\\Partition2"},
- {"/dev/sdaw3", BRACK(FH_SDAW | 3), "\\Device\\Harddisk48\\Partition3"},
- {"/dev/sdaw4", BRACK(FH_SDAW | 4), "\\Device\\Harddisk48\\Partition4"},
- {"/dev/sdaw5", BRACK(FH_SDAW | 5), "\\Device\\Harddisk48\\Partition5"},
- {"/dev/sdaw6", BRACK(FH_SDAW | 6), "\\Device\\Harddisk48\\Partition6"},
- {"/dev/sdaw7", BRACK(FH_SDAW | 7), "\\Device\\Harddisk48\\Partition7"},
- {"/dev/sdaw8", BRACK(FH_SDAW | 8), "\\Device\\Harddisk48\\Partition8"},
- {"/dev/sdaw9", BRACK(FH_SDAW | 9), "\\Device\\Harddisk48\\Partition9"},
- {"/dev/sdaw10", BRACK(FH_SDAW | 10), "\\Device\\Harddisk48\\Partition10"},
- {"/dev/sdaw11", BRACK(FH_SDAW | 11), "\\Device\\Harddisk48\\Partition11"},
- {"/dev/sdaw12", BRACK(FH_SDAW | 12), "\\Device\\Harddisk48\\Partition12"},
- {"/dev/sdaw13", BRACK(FH_SDAW | 13), "\\Device\\Harddisk48\\Partition13"},
- {"/dev/sdaw14", BRACK(FH_SDAW | 14), "\\Device\\Harddisk48\\Partition14"},
- {"/dev/sdaw15", BRACK(FH_SDAW | 15), "\\Device\\Harddisk48\\Partition15"},
- {"/dev/sdax1", BRACK(FH_SDAX | 1), "\\Device\\Harddisk49\\Partition1"},
- {"/dev/sdax2", BRACK(FH_SDAX | 2), "\\Device\\Harddisk49\\Partition2"},
- {"/dev/sdax3", BRACK(FH_SDAX | 3), "\\Device\\Harddisk49\\Partition3"},
- {"/dev/sdax4", BRACK(FH_SDAX | 4), "\\Device\\Harddisk49\\Partition4"},
- {"/dev/sdax5", BRACK(FH_SDAX | 5), "\\Device\\Harddisk49\\Partition5"},
- {"/dev/sdax6", BRACK(FH_SDAX | 6), "\\Device\\Harddisk49\\Partition6"},
- {"/dev/sdax7", BRACK(FH_SDAX | 7), "\\Device\\Harddisk49\\Partition7"},
- {"/dev/sdax8", BRACK(FH_SDAX | 8), "\\Device\\Harddisk49\\Partition8"},
- {"/dev/sdax9", BRACK(FH_SDAX | 9), "\\Device\\Harddisk49\\Partition9"},
- {"/dev/sdax10", BRACK(FH_SDAX | 10), "\\Device\\Harddisk49\\Partition10"},
- {"/dev/sdax11", BRACK(FH_SDAX | 11), "\\Device\\Harddisk49\\Partition11"},
- {"/dev/sdax12", BRACK(FH_SDAX | 12), "\\Device\\Harddisk49\\Partition12"},
- {"/dev/sdax13", BRACK(FH_SDAX | 13), "\\Device\\Harddisk49\\Partition13"},
- {"/dev/sdax14", BRACK(FH_SDAX | 14), "\\Device\\Harddisk49\\Partition14"},
- {"/dev/sdax15", BRACK(FH_SDAX | 15), "\\Device\\Harddisk49\\Partition15"},
- {"/dev/sday1", BRACK(FH_SDAY | 1), "\\Device\\Harddisk50\\Partition1"},
- {"/dev/sday2", BRACK(FH_SDAY | 2), "\\Device\\Harddisk50\\Partition2"},
- {"/dev/sday3", BRACK(FH_SDAY | 3), "\\Device\\Harddisk50\\Partition3"},
- {"/dev/sday4", BRACK(FH_SDAY | 4), "\\Device\\Harddisk50\\Partition4"},
- {"/dev/sday5", BRACK(FH_SDAY | 5), "\\Device\\Harddisk50\\Partition5"},
- {"/dev/sday6", BRACK(FH_SDAY | 6), "\\Device\\Harddisk50\\Partition6"},
- {"/dev/sday7", BRACK(FH_SDAY | 7), "\\Device\\Harddisk50\\Partition7"},
- {"/dev/sday8", BRACK(FH_SDAY | 8), "\\Device\\Harddisk50\\Partition8"},
- {"/dev/sday9", BRACK(FH_SDAY | 9), "\\Device\\Harddisk50\\Partition9"},
- {"/dev/sday10", BRACK(FH_SDAY | 10), "\\Device\\Harddisk50\\Partition10"},
- {"/dev/sday11", BRACK(FH_SDAY | 11), "\\Device\\Harddisk50\\Partition11"},
- {"/dev/sday12", BRACK(FH_SDAY | 12), "\\Device\\Harddisk50\\Partition12"},
- {"/dev/sday13", BRACK(FH_SDAY | 13), "\\Device\\Harddisk50\\Partition13"},
- {"/dev/sday14", BRACK(FH_SDAY | 14), "\\Device\\Harddisk50\\Partition14"},
- {"/dev/sday15", BRACK(FH_SDAY | 15), "\\Device\\Harddisk50\\Partition15"},
- {"/dev/sdaz1", BRACK(FH_SDAZ | 1), "\\Device\\Harddisk51\\Partition1"},
- {"/dev/sdaz2", BRACK(FH_SDAZ | 2), "\\Device\\Harddisk51\\Partition2"},
- {"/dev/sdaz3", BRACK(FH_SDAZ | 3), "\\Device\\Harddisk51\\Partition3"},
- {"/dev/sdaz4", BRACK(FH_SDAZ | 4), "\\Device\\Harddisk51\\Partition4"},
- {"/dev/sdaz5", BRACK(FH_SDAZ | 5), "\\Device\\Harddisk51\\Partition5"},
- {"/dev/sdaz6", BRACK(FH_SDAZ | 6), "\\Device\\Harddisk51\\Partition6"},
- {"/dev/sdaz7", BRACK(FH_SDAZ | 7), "\\Device\\Harddisk51\\Partition7"},
- {"/dev/sdaz8", BRACK(FH_SDAZ | 8), "\\Device\\Harddisk51\\Partition8"},
- {"/dev/sdaz9", BRACK(FH_SDAZ | 9), "\\Device\\Harddisk51\\Partition9"},
- {"/dev/sdaz10", BRACK(FH_SDAZ | 10), "\\Device\\Harddisk51\\Partition10"},
- {"/dev/sdaz11", BRACK(FH_SDAZ | 11), "\\Device\\Harddisk51\\Partition11"},
- {"/dev/sdaz12", BRACK(FH_SDAZ | 12), "\\Device\\Harddisk51\\Partition12"},
- {"/dev/sdaz13", BRACK(FH_SDAZ | 13), "\\Device\\Harddisk51\\Partition13"},
- {"/dev/sdaz14", BRACK(FH_SDAZ | 14), "\\Device\\Harddisk51\\Partition14"},
- {"/dev/sdaz15", BRACK(FH_SDAZ | 15), "\\Device\\Harddisk51\\Partition15"},
- {"/dev/sdba", BRACK(FH_SDBA), "\\Device\\Harddisk52\\Partition0"},
- {"/dev/sdbb", BRACK(FH_SDBB), "\\Device\\Harddisk53\\Partition0"},
- {"/dev/sdbc", BRACK(FH_SDBC), "\\Device\\Harddisk54\\Partition0"},
- {"/dev/sdbd", BRACK(FH_SDBD), "\\Device\\Harddisk55\\Partition0"},
- {"/dev/sdbe", BRACK(FH_SDBE), "\\Device\\Harddisk56\\Partition0"},
- {"/dev/sdbf", BRACK(FH_SDBF), "\\Device\\Harddisk57\\Partition0"},
- {"/dev/sdbg", BRACK(FH_SDBG), "\\Device\\Harddisk58\\Partition0"},
- {"/dev/sdbh", BRACK(FH_SDBH), "\\Device\\Harddisk59\\Partition0"},
- {"/dev/sdbi", BRACK(FH_SDBI), "\\Device\\Harddisk60\\Partition0"},
- {"/dev/sdbj", BRACK(FH_SDBJ), "\\Device\\Harddisk61\\Partition0"},
- {"/dev/sdbk", BRACK(FH_SDBK), "\\Device\\Harddisk62\\Partition0"},
- {"/dev/sdbl", BRACK(FH_SDBL), "\\Device\\Harddisk63\\Partition0"},
- {"/dev/sdbm", BRACK(FH_SDBM), "\\Device\\Harddisk64\\Partition0"},
- {"/dev/sdbn", BRACK(FH_SDBN), "\\Device\\Harddisk65\\Partition0"},
- {"/dev/sdbo", BRACK(FH_SDBO), "\\Device\\Harddisk66\\Partition0"},
- {"/dev/sdbp", BRACK(FH_SDBP), "\\Device\\Harddisk67\\Partition0"},
- {"/dev/sdbq", BRACK(FH_SDBQ), "\\Device\\Harddisk68\\Partition0"},
- {"/dev/sdbr", BRACK(FH_SDBR), "\\Device\\Harddisk69\\Partition0"},
- {"/dev/sdbs", BRACK(FH_SDBS), "\\Device\\Harddisk70\\Partition0"},
- {"/dev/sdbt", BRACK(FH_SDBT), "\\Device\\Harddisk71\\Partition0"},
- {"/dev/sdbu", BRACK(FH_SDBU), "\\Device\\Harddisk72\\Partition0"},
- {"/dev/sdbv", BRACK(FH_SDBV), "\\Device\\Harddisk73\\Partition0"},
- {"/dev/sdbw", BRACK(FH_SDBW), "\\Device\\Harddisk74\\Partition0"},
- {"/dev/sdbx", BRACK(FH_SDBX), "\\Device\\Harddisk75\\Partition0"},
- {"/dev/sdby", BRACK(FH_SDBY), "\\Device\\Harddisk76\\Partition0"},
- {"/dev/sdbz", BRACK(FH_SDBZ), "\\Device\\Harddisk77\\Partition0"},
- {"/dev/sdba1", BRACK(FH_SDBA | 1), "\\Device\\Harddisk52\\Partition1"},
- {"/dev/sdba2", BRACK(FH_SDBA | 2), "\\Device\\Harddisk52\\Partition2"},
- {"/dev/sdba3", BRACK(FH_SDBA | 3), "\\Device\\Harddisk52\\Partition3"},
- {"/dev/sdba4", BRACK(FH_SDBA | 4), "\\Device\\Harddisk52\\Partition4"},
- {"/dev/sdba5", BRACK(FH_SDBA | 5), "\\Device\\Harddisk52\\Partition5"},
- {"/dev/sdba6", BRACK(FH_SDBA | 6), "\\Device\\Harddisk52\\Partition6"},
- {"/dev/sdba7", BRACK(FH_SDBA | 7), "\\Device\\Harddisk52\\Partition7"},
- {"/dev/sdba8", BRACK(FH_SDBA | 8), "\\Device\\Harddisk52\\Partition8"},
- {"/dev/sdba9", BRACK(FH_SDBA | 9), "\\Device\\Harddisk52\\Partition9"},
- {"/dev/sdba10", BRACK(FH_SDBA | 10), "\\Device\\Harddisk52\\Partition10"},
- {"/dev/sdba11", BRACK(FH_SDBA | 11), "\\Device\\Harddisk52\\Partition11"},
- {"/dev/sdba12", BRACK(FH_SDBA | 12), "\\Device\\Harddisk52\\Partition12"},
- {"/dev/sdba13", BRACK(FH_SDBA | 13), "\\Device\\Harddisk52\\Partition13"},
- {"/dev/sdba14", BRACK(FH_SDBA | 14), "\\Device\\Harddisk52\\Partition14"},
- {"/dev/sdba15", BRACK(FH_SDBA | 15), "\\Device\\Harddisk52\\Partition15"},
- {"/dev/sdbb1", BRACK(FH_SDBB | 1), "\\Device\\Harddisk53\\Partition1"},
- {"/dev/sdbb2", BRACK(FH_SDBB | 2), "\\Device\\Harddisk53\\Partition2"},
- {"/dev/sdbb3", BRACK(FH_SDBB | 3), "\\Device\\Harddisk53\\Partition3"},
- {"/dev/sdbb4", BRACK(FH_SDBB | 4), "\\Device\\Harddisk53\\Partition4"},
- {"/dev/sdbb5", BRACK(FH_SDBB | 5), "\\Device\\Harddisk53\\Partition5"},
- {"/dev/sdbb6", BRACK(FH_SDBB | 6), "\\Device\\Harddisk53\\Partition6"},
- {"/dev/sdbb7", BRACK(FH_SDBB | 7), "\\Device\\Harddisk53\\Partition7"},
- {"/dev/sdbb8", BRACK(FH_SDBB | 8), "\\Device\\Harddisk53\\Partition8"},
- {"/dev/sdbb9", BRACK(FH_SDBB | 9), "\\Device\\Harddisk53\\Partition9"},
- {"/dev/sdbb10", BRACK(FH_SDBB | 10), "\\Device\\Harddisk53\\Partition10"},
- {"/dev/sdbb11", BRACK(FH_SDBB | 11), "\\Device\\Harddisk53\\Partition11"},
- {"/dev/sdbb12", BRACK(FH_SDBB | 12), "\\Device\\Harddisk53\\Partition12"},
- {"/dev/sdbb13", BRACK(FH_SDBB | 13), "\\Device\\Harddisk53\\Partition13"},
- {"/dev/sdbb14", BRACK(FH_SDBB | 14), "\\Device\\Harddisk53\\Partition14"},
- {"/dev/sdbb15", BRACK(FH_SDBB | 15), "\\Device\\Harddisk53\\Partition15"},
- {"/dev/sdbc1", BRACK(FH_SDBC | 1), "\\Device\\Harddisk54\\Partition1"},
- {"/dev/sdbc2", BRACK(FH_SDBC | 2), "\\Device\\Harddisk54\\Partition2"},
- {"/dev/sdbc3", BRACK(FH_SDBC | 3), "\\Device\\Harddisk54\\Partition3"},
- {"/dev/sdbc4", BRACK(FH_SDBC | 4), "\\Device\\Harddisk54\\Partition4"},
- {"/dev/sdbc5", BRACK(FH_SDBC | 5), "\\Device\\Harddisk54\\Partition5"},
- {"/dev/sdbc6", BRACK(FH_SDBC | 6), "\\Device\\Harddisk54\\Partition6"},
- {"/dev/sdbc7", BRACK(FH_SDBC | 7), "\\Device\\Harddisk54\\Partition7"},
- {"/dev/sdbc8", BRACK(FH_SDBC | 8), "\\Device\\Harddisk54\\Partition8"},
- {"/dev/sdbc9", BRACK(FH_SDBC | 9), "\\Device\\Harddisk54\\Partition9"},
- {"/dev/sdbc10", BRACK(FH_SDBC | 10), "\\Device\\Harddisk54\\Partition10"},
- {"/dev/sdbc11", BRACK(FH_SDBC | 11), "\\Device\\Harddisk54\\Partition11"},
- {"/dev/sdbc12", BRACK(FH_SDBC | 12), "\\Device\\Harddisk54\\Partition12"},
- {"/dev/sdbc13", BRACK(FH_SDBC | 13), "\\Device\\Harddisk54\\Partition13"},
- {"/dev/sdbc14", BRACK(FH_SDBC | 14), "\\Device\\Harddisk54\\Partition14"},
- {"/dev/sdbc15", BRACK(FH_SDBC | 15), "\\Device\\Harddisk54\\Partition15"},
- {"/dev/sdbd1", BRACK(FH_SDBD | 1), "\\Device\\Harddisk55\\Partition1"},
- {"/dev/sdbd2", BRACK(FH_SDBD | 2), "\\Device\\Harddisk55\\Partition2"},
- {"/dev/sdbd3", BRACK(FH_SDBD | 3), "\\Device\\Harddisk55\\Partition3"},
- {"/dev/sdbd4", BRACK(FH_SDBD | 4), "\\Device\\Harddisk55\\Partition4"},
- {"/dev/sdbd5", BRACK(FH_SDBD | 5), "\\Device\\Harddisk55\\Partition5"},
- {"/dev/sdbd6", BRACK(FH_SDBD | 6), "\\Device\\Harddisk55\\Partition6"},
- {"/dev/sdbd7", BRACK(FH_SDBD | 7), "\\Device\\Harddisk55\\Partition7"},
- {"/dev/sdbd8", BRACK(FH_SDBD | 8), "\\Device\\Harddisk55\\Partition8"},
- {"/dev/sdbd9", BRACK(FH_SDBD | 9), "\\Device\\Harddisk55\\Partition9"},
- {"/dev/sdbd10", BRACK(FH_SDBD | 10), "\\Device\\Harddisk55\\Partition10"},
- {"/dev/sdbd11", BRACK(FH_SDBD | 11), "\\Device\\Harddisk55\\Partition11"},
- {"/dev/sdbd12", BRACK(FH_SDBD | 12), "\\Device\\Harddisk55\\Partition12"},
- {"/dev/sdbd13", BRACK(FH_SDBD | 13), "\\Device\\Harddisk55\\Partition13"},
- {"/dev/sdbd14", BRACK(FH_SDBD | 14), "\\Device\\Harddisk55\\Partition14"},
- {"/dev/sdbd15", BRACK(FH_SDBD | 15), "\\Device\\Harddisk55\\Partition15"},
- {"/dev/sdbe1", BRACK(FH_SDBE | 1), "\\Device\\Harddisk56\\Partition1"},
- {"/dev/sdbe2", BRACK(FH_SDBE | 2), "\\Device\\Harddisk56\\Partition2"},
- {"/dev/sdbe3", BRACK(FH_SDBE | 3), "\\Device\\Harddisk56\\Partition3"},
- {"/dev/sdbe4", BRACK(FH_SDBE | 4), "\\Device\\Harddisk56\\Partition4"},
- {"/dev/sdbe5", BRACK(FH_SDBE | 5), "\\Device\\Harddisk56\\Partition5"},
- {"/dev/sdbe6", BRACK(FH_SDBE | 6), "\\Device\\Harddisk56\\Partition6"},
- {"/dev/sdbe7", BRACK(FH_SDBE | 7), "\\Device\\Harddisk56\\Partition7"},
- {"/dev/sdbe8", BRACK(FH_SDBE | 8), "\\Device\\Harddisk56\\Partition8"},
- {"/dev/sdbe9", BRACK(FH_SDBE | 9), "\\Device\\Harddisk56\\Partition9"},
- {"/dev/sdbe10", BRACK(FH_SDBE | 10), "\\Device\\Harddisk56\\Partition10"},
- {"/dev/sdbe11", BRACK(FH_SDBE | 11), "\\Device\\Harddisk56\\Partition11"},
- {"/dev/sdbe12", BRACK(FH_SDBE | 12), "\\Device\\Harddisk56\\Partition12"},
- {"/dev/sdbe13", BRACK(FH_SDBE | 13), "\\Device\\Harddisk56\\Partition13"},
- {"/dev/sdbe14", BRACK(FH_SDBE | 14), "\\Device\\Harddisk56\\Partition14"},
- {"/dev/sdbe15", BRACK(FH_SDBE | 15), "\\Device\\Harddisk56\\Partition15"},
- {"/dev/sdbf1", BRACK(FH_SDBF | 1), "\\Device\\Harddisk57\\Partition1"},
- {"/dev/sdbf2", BRACK(FH_SDBF | 2), "\\Device\\Harddisk57\\Partition2"},
- {"/dev/sdbf3", BRACK(FH_SDBF | 3), "\\Device\\Harddisk57\\Partition3"},
- {"/dev/sdbf4", BRACK(FH_SDBF | 4), "\\Device\\Harddisk57\\Partition4"},
- {"/dev/sdbf5", BRACK(FH_SDBF | 5), "\\Device\\Harddisk57\\Partition5"},
- {"/dev/sdbf6", BRACK(FH_SDBF | 6), "\\Device\\Harddisk57\\Partition6"},
- {"/dev/sdbf7", BRACK(FH_SDBF | 7), "\\Device\\Harddisk57\\Partition7"},
- {"/dev/sdbf8", BRACK(FH_SDBF | 8), "\\Device\\Harddisk57\\Partition8"},
- {"/dev/sdbf9", BRACK(FH_SDBF | 9), "\\Device\\Harddisk57\\Partition9"},
- {"/dev/sdbf10", BRACK(FH_SDBF | 10), "\\Device\\Harddisk57\\Partition10"},
- {"/dev/sdbf11", BRACK(FH_SDBF | 11), "\\Device\\Harddisk57\\Partition11"},
- {"/dev/sdbf12", BRACK(FH_SDBF | 12), "\\Device\\Harddisk57\\Partition12"},
- {"/dev/sdbf13", BRACK(FH_SDBF | 13), "\\Device\\Harddisk57\\Partition13"},
- {"/dev/sdbf14", BRACK(FH_SDBF | 14), "\\Device\\Harddisk57\\Partition14"},
- {"/dev/sdbf15", BRACK(FH_SDBF | 15), "\\Device\\Harddisk57\\Partition15"},
- {"/dev/sdbg1", BRACK(FH_SDBG | 1), "\\Device\\Harddisk58\\Partition1"},
- {"/dev/sdbg2", BRACK(FH_SDBG | 2), "\\Device\\Harddisk58\\Partition2"},
- {"/dev/sdbg3", BRACK(FH_SDBG | 3), "\\Device\\Harddisk58\\Partition3"},
- {"/dev/sdbg4", BRACK(FH_SDBG | 4), "\\Device\\Harddisk58\\Partition4"},
- {"/dev/sdbg5", BRACK(FH_SDBG | 5), "\\Device\\Harddisk58\\Partition5"},
- {"/dev/sdbg6", BRACK(FH_SDBG | 6), "\\Device\\Harddisk58\\Partition6"},
- {"/dev/sdbg7", BRACK(FH_SDBG | 7), "\\Device\\Harddisk58\\Partition7"},
- {"/dev/sdbg8", BRACK(FH_SDBG | 8), "\\Device\\Harddisk58\\Partition8"},
- {"/dev/sdbg9", BRACK(FH_SDBG | 9), "\\Device\\Harddisk58\\Partition9"},
- {"/dev/sdbg10", BRACK(FH_SDBG | 10), "\\Device\\Harddisk58\\Partition10"},
- {"/dev/sdbg11", BRACK(FH_SDBG | 11), "\\Device\\Harddisk58\\Partition11"},
- {"/dev/sdbg12", BRACK(FH_SDBG | 12), "\\Device\\Harddisk58\\Partition12"},
- {"/dev/sdbg13", BRACK(FH_SDBG | 13), "\\Device\\Harddisk58\\Partition13"},
- {"/dev/sdbg14", BRACK(FH_SDBG | 14), "\\Device\\Harddisk58\\Partition14"},
- {"/dev/sdbg15", BRACK(FH_SDBG | 15), "\\Device\\Harddisk58\\Partition15"},
- {"/dev/sdbh1", BRACK(FH_SDBH | 1), "\\Device\\Harddisk59\\Partition1"},
- {"/dev/sdbh2", BRACK(FH_SDBH | 2), "\\Device\\Harddisk59\\Partition2"},
- {"/dev/sdbh3", BRACK(FH_SDBH | 3), "\\Device\\Harddisk59\\Partition3"},
- {"/dev/sdbh4", BRACK(FH_SDBH | 4), "\\Device\\Harddisk59\\Partition4"},
- {"/dev/sdbh5", BRACK(FH_SDBH | 5), "\\Device\\Harddisk59\\Partition5"},
- {"/dev/sdbh6", BRACK(FH_SDBH | 6), "\\Device\\Harddisk59\\Partition6"},
- {"/dev/sdbh7", BRACK(FH_SDBH | 7), "\\Device\\Harddisk59\\Partition7"},
- {"/dev/sdbh8", BRACK(FH_SDBH | 8), "\\Device\\Harddisk59\\Partition8"},
- {"/dev/sdbh9", BRACK(FH_SDBH | 9), "\\Device\\Harddisk59\\Partition9"},
- {"/dev/sdbh10", BRACK(FH_SDBH | 10), "\\Device\\Harddisk59\\Partition10"},
- {"/dev/sdbh11", BRACK(FH_SDBH | 11), "\\Device\\Harddisk59\\Partition11"},
- {"/dev/sdbh12", BRACK(FH_SDBH | 12), "\\Device\\Harddisk59\\Partition12"},
- {"/dev/sdbh13", BRACK(FH_SDBH | 13), "\\Device\\Harddisk59\\Partition13"},
- {"/dev/sdbh14", BRACK(FH_SDBH | 14), "\\Device\\Harddisk59\\Partition14"},
- {"/dev/sdbh15", BRACK(FH_SDBH | 15), "\\Device\\Harddisk59\\Partition15"},
- {"/dev/sdbi1", BRACK(FH_SDBI | 1), "\\Device\\Harddisk60\\Partition1"},
- {"/dev/sdbi2", BRACK(FH_SDBI | 2), "\\Device\\Harddisk60\\Partition2"},
- {"/dev/sdbi3", BRACK(FH_SDBI | 3), "\\Device\\Harddisk60\\Partition3"},
- {"/dev/sdbi4", BRACK(FH_SDBI | 4), "\\Device\\Harddisk60\\Partition4"},
- {"/dev/sdbi5", BRACK(FH_SDBI | 5), "\\Device\\Harddisk60\\Partition5"},
- {"/dev/sdbi6", BRACK(FH_SDBI | 6), "\\Device\\Harddisk60\\Partition6"},
- {"/dev/sdbi7", BRACK(FH_SDBI | 7), "\\Device\\Harddisk60\\Partition7"},
- {"/dev/sdbi8", BRACK(FH_SDBI | 8), "\\Device\\Harddisk60\\Partition8"},
- {"/dev/sdbi9", BRACK(FH_SDBI | 9), "\\Device\\Harddisk60\\Partition9"},
- {"/dev/sdbi10", BRACK(FH_SDBI | 10), "\\Device\\Harddisk60\\Partition10"},
- {"/dev/sdbi11", BRACK(FH_SDBI | 11), "\\Device\\Harddisk60\\Partition11"},
- {"/dev/sdbi12", BRACK(FH_SDBI | 12), "\\Device\\Harddisk60\\Partition12"},
- {"/dev/sdbi13", BRACK(FH_SDBI | 13), "\\Device\\Harddisk60\\Partition13"},
- {"/dev/sdbi14", BRACK(FH_SDBI | 14), "\\Device\\Harddisk60\\Partition14"},
- {"/dev/sdbi15", BRACK(FH_SDBI | 15), "\\Device\\Harddisk60\\Partition15"},
- {"/dev/sdbj1", BRACK(FH_SDBJ | 1), "\\Device\\Harddisk61\\Partition1"},
- {"/dev/sdbj2", BRACK(FH_SDBJ | 2), "\\Device\\Harddisk61\\Partition2"},
- {"/dev/sdbj3", BRACK(FH_SDBJ | 3), "\\Device\\Harddisk61\\Partition3"},
- {"/dev/sdbj4", BRACK(FH_SDBJ | 4), "\\Device\\Harddisk61\\Partition4"},
- {"/dev/sdbj5", BRACK(FH_SDBJ | 5), "\\Device\\Harddisk61\\Partition5"},
- {"/dev/sdbj6", BRACK(FH_SDBJ | 6), "\\Device\\Harddisk61\\Partition6"},
- {"/dev/sdbj7", BRACK(FH_SDBJ | 7), "\\Device\\Harddisk61\\Partition7"},
- {"/dev/sdbj8", BRACK(FH_SDBJ | 8), "\\Device\\Harddisk61\\Partition8"},
- {"/dev/sdbj9", BRACK(FH_SDBJ | 9), "\\Device\\Harddisk61\\Partition9"},
- {"/dev/sdbj10", BRACK(FH_SDBJ | 10), "\\Device\\Harddisk61\\Partition10"},
- {"/dev/sdbj11", BRACK(FH_SDBJ | 11), "\\Device\\Harddisk61\\Partition11"},
- {"/dev/sdbj12", BRACK(FH_SDBJ | 12), "\\Device\\Harddisk61\\Partition12"},
- {"/dev/sdbj13", BRACK(FH_SDBJ | 13), "\\Device\\Harddisk61\\Partition13"},
- {"/dev/sdbj14", BRACK(FH_SDBJ | 14), "\\Device\\Harddisk61\\Partition14"},
- {"/dev/sdbj15", BRACK(FH_SDBJ | 15), "\\Device\\Harddisk61\\Partition15"},
- {"/dev/sdbk1", BRACK(FH_SDBK | 1), "\\Device\\Harddisk62\\Partition1"},
- {"/dev/sdbk2", BRACK(FH_SDBK | 2), "\\Device\\Harddisk62\\Partition2"},
- {"/dev/sdbk3", BRACK(FH_SDBK | 3), "\\Device\\Harddisk62\\Partition3"},
- {"/dev/sdbk4", BRACK(FH_SDBK | 4), "\\Device\\Harddisk62\\Partition4"},
- {"/dev/sdbk5", BRACK(FH_SDBK | 5), "\\Device\\Harddisk62\\Partition5"},
- {"/dev/sdbk6", BRACK(FH_SDBK | 6), "\\Device\\Harddisk62\\Partition6"},
- {"/dev/sdbk7", BRACK(FH_SDBK | 7), "\\Device\\Harddisk62\\Partition7"},
- {"/dev/sdbk8", BRACK(FH_SDBK | 8), "\\Device\\Harddisk62\\Partition8"},
- {"/dev/sdbk9", BRACK(FH_SDBK | 9), "\\Device\\Harddisk62\\Partition9"},
- {"/dev/sdbk10", BRACK(FH_SDBK | 10), "\\Device\\Harddisk62\\Partition10"},
- {"/dev/sdbk11", BRACK(FH_SDBK | 11), "\\Device\\Harddisk62\\Partition11"},
- {"/dev/sdbk12", BRACK(FH_SDBK | 12), "\\Device\\Harddisk62\\Partition12"},
- {"/dev/sdbk13", BRACK(FH_SDBK | 13), "\\Device\\Harddisk62\\Partition13"},
- {"/dev/sdbk14", BRACK(FH_SDBK | 14), "\\Device\\Harddisk62\\Partition14"},
- {"/dev/sdbk15", BRACK(FH_SDBK | 15), "\\Device\\Harddisk62\\Partition15"},
- {"/dev/sdbl1", BRACK(FH_SDBL | 1), "\\Device\\Harddisk63\\Partition1"},
- {"/dev/sdbl2", BRACK(FH_SDBL | 2), "\\Device\\Harddisk63\\Partition2"},
- {"/dev/sdbl3", BRACK(FH_SDBL | 3), "\\Device\\Harddisk63\\Partition3"},
- {"/dev/sdbl4", BRACK(FH_SDBL | 4), "\\Device\\Harddisk63\\Partition4"},
- {"/dev/sdbl5", BRACK(FH_SDBL | 5), "\\Device\\Harddisk63\\Partition5"},
- {"/dev/sdbl6", BRACK(FH_SDBL | 6), "\\Device\\Harddisk63\\Partition6"},
- {"/dev/sdbl7", BRACK(FH_SDBL | 7), "\\Device\\Harddisk63\\Partition7"},
- {"/dev/sdbl8", BRACK(FH_SDBL | 8), "\\Device\\Harddisk63\\Partition8"},
- {"/dev/sdbl9", BRACK(FH_SDBL | 9), "\\Device\\Harddisk63\\Partition9"},
- {"/dev/sdbl10", BRACK(FH_SDBL | 10), "\\Device\\Harddisk63\\Partition10"},
- {"/dev/sdbl11", BRACK(FH_SDBL | 11), "\\Device\\Harddisk63\\Partition11"},
- {"/dev/sdbl12", BRACK(FH_SDBL | 12), "\\Device\\Harddisk63\\Partition12"},
- {"/dev/sdbl13", BRACK(FH_SDBL | 13), "\\Device\\Harddisk63\\Partition13"},
- {"/dev/sdbl14", BRACK(FH_SDBL | 14), "\\Device\\Harddisk63\\Partition14"},
- {"/dev/sdbl15", BRACK(FH_SDBL | 15), "\\Device\\Harddisk63\\Partition15"},
- {"/dev/sdbm1", BRACK(FH_SDBM | 1), "\\Device\\Harddisk64\\Partition1"},
- {"/dev/sdbm2", BRACK(FH_SDBM | 2), "\\Device\\Harddisk64\\Partition2"},
- {"/dev/sdbm3", BRACK(FH_SDBM | 3), "\\Device\\Harddisk64\\Partition3"},
- {"/dev/sdbm4", BRACK(FH_SDBM | 4), "\\Device\\Harddisk64\\Partition4"},
- {"/dev/sdbm5", BRACK(FH_SDBM | 5), "\\Device\\Harddisk64\\Partition5"},
- {"/dev/sdbm6", BRACK(FH_SDBM | 6), "\\Device\\Harddisk64\\Partition6"},
- {"/dev/sdbm7", BRACK(FH_SDBM | 7), "\\Device\\Harddisk64\\Partition7"},
- {"/dev/sdbm8", BRACK(FH_SDBM | 8), "\\Device\\Harddisk64\\Partition8"},
- {"/dev/sdbm9", BRACK(FH_SDBM | 9), "\\Device\\Harddisk64\\Partition9"},
- {"/dev/sdbm10", BRACK(FH_SDBM | 10), "\\Device\\Harddisk64\\Partition10"},
- {"/dev/sdbm11", BRACK(FH_SDBM | 11), "\\Device\\Harddisk64\\Partition11"},
- {"/dev/sdbm12", BRACK(FH_SDBM | 12), "\\Device\\Harddisk64\\Partition12"},
- {"/dev/sdbm13", BRACK(FH_SDBM | 13), "\\Device\\Harddisk64\\Partition13"},
- {"/dev/sdbm14", BRACK(FH_SDBM | 14), "\\Device\\Harddisk64\\Partition14"},
- {"/dev/sdbm15", BRACK(FH_SDBM | 15), "\\Device\\Harddisk64\\Partition15"},
- {"/dev/sdbn1", BRACK(FH_SDBN | 1), "\\Device\\Harddisk65\\Partition1"},
- {"/dev/sdbn2", BRACK(FH_SDBN | 2), "\\Device\\Harddisk65\\Partition2"},
- {"/dev/sdbn3", BRACK(FH_SDBN | 3), "\\Device\\Harddisk65\\Partition3"},
- {"/dev/sdbn4", BRACK(FH_SDBN | 4), "\\Device\\Harddisk65\\Partition4"},
- {"/dev/sdbn5", BRACK(FH_SDBN | 5), "\\Device\\Harddisk65\\Partition5"},
- {"/dev/sdbn6", BRACK(FH_SDBN | 6), "\\Device\\Harddisk65\\Partition6"},
- {"/dev/sdbn7", BRACK(FH_SDBN | 7), "\\Device\\Harddisk65\\Partition7"},
- {"/dev/sdbn8", BRACK(FH_SDBN | 8), "\\Device\\Harddisk65\\Partition8"},
- {"/dev/sdbn9", BRACK(FH_SDBN | 9), "\\Device\\Harddisk65\\Partition9"},
- {"/dev/sdbn10", BRACK(FH_SDBN | 10), "\\Device\\Harddisk65\\Partition10"},
- {"/dev/sdbn11", BRACK(FH_SDBN | 11), "\\Device\\Harddisk65\\Partition11"},
- {"/dev/sdbn12", BRACK(FH_SDBN | 12), "\\Device\\Harddisk65\\Partition12"},
- {"/dev/sdbn13", BRACK(FH_SDBN | 13), "\\Device\\Harddisk65\\Partition13"},
- {"/dev/sdbn14", BRACK(FH_SDBN | 14), "\\Device\\Harddisk65\\Partition14"},
- {"/dev/sdbn15", BRACK(FH_SDBN | 15), "\\Device\\Harddisk65\\Partition15"},
- {"/dev/sdbo1", BRACK(FH_SDBO | 1), "\\Device\\Harddisk66\\Partition1"},
- {"/dev/sdbo2", BRACK(FH_SDBO | 2), "\\Device\\Harddisk66\\Partition2"},
- {"/dev/sdbo3", BRACK(FH_SDBO | 3), "\\Device\\Harddisk66\\Partition3"},
- {"/dev/sdbo4", BRACK(FH_SDBO | 4), "\\Device\\Harddisk66\\Partition4"},
- {"/dev/sdbo5", BRACK(FH_SDBO | 5), "\\Device\\Harddisk66\\Partition5"},
- {"/dev/sdbo6", BRACK(FH_SDBO | 6), "\\Device\\Harddisk66\\Partition6"},
- {"/dev/sdbo7", BRACK(FH_SDBO | 7), "\\Device\\Harddisk66\\Partition7"},
- {"/dev/sdbo8", BRACK(FH_SDBO | 8), "\\Device\\Harddisk66\\Partition8"},
- {"/dev/sdbo9", BRACK(FH_SDBO | 9), "\\Device\\Harddisk66\\Partition9"},
- {"/dev/sdbo10", BRACK(FH_SDBO | 10), "\\Device\\Harddisk66\\Partition10"},
- {"/dev/sdbo11", BRACK(FH_SDBO | 11), "\\Device\\Harddisk66\\Partition11"},
- {"/dev/sdbo12", BRACK(FH_SDBO | 12), "\\Device\\Harddisk66\\Partition12"},
- {"/dev/sdbo13", BRACK(FH_SDBO | 13), "\\Device\\Harddisk66\\Partition13"},
- {"/dev/sdbo14", BRACK(FH_SDBO | 14), "\\Device\\Harddisk66\\Partition14"},
- {"/dev/sdbo15", BRACK(FH_SDBO | 15), "\\Device\\Harddisk66\\Partition15"},
- {"/dev/sdbp1", BRACK(FH_SDBP | 1), "\\Device\\Harddisk67\\Partition1"},
- {"/dev/sdbp2", BRACK(FH_SDBP | 2), "\\Device\\Harddisk67\\Partition2"},
- {"/dev/sdbp3", BRACK(FH_SDBP | 3), "\\Device\\Harddisk67\\Partition3"},
- {"/dev/sdbp4", BRACK(FH_SDBP | 4), "\\Device\\Harddisk67\\Partition4"},
- {"/dev/sdbp5", BRACK(FH_SDBP | 5), "\\Device\\Harddisk67\\Partition5"},
- {"/dev/sdbp6", BRACK(FH_SDBP | 6), "\\Device\\Harddisk67\\Partition6"},
- {"/dev/sdbp7", BRACK(FH_SDBP | 7), "\\Device\\Harddisk67\\Partition7"},
- {"/dev/sdbp8", BRACK(FH_SDBP | 8), "\\Device\\Harddisk67\\Partition8"},
- {"/dev/sdbp9", BRACK(FH_SDBP | 9), "\\Device\\Harddisk67\\Partition9"},
- {"/dev/sdbp10", BRACK(FH_SDBP | 10), "\\Device\\Harddisk67\\Partition10"},
- {"/dev/sdbp11", BRACK(FH_SDBP | 11), "\\Device\\Harddisk67\\Partition11"},
- {"/dev/sdbp12", BRACK(FH_SDBP | 12), "\\Device\\Harddisk67\\Partition12"},
- {"/dev/sdbp13", BRACK(FH_SDBP | 13), "\\Device\\Harddisk67\\Partition13"},
- {"/dev/sdbp14", BRACK(FH_SDBP | 14), "\\Device\\Harddisk67\\Partition14"},
- {"/dev/sdbp15", BRACK(FH_SDBP | 15), "\\Device\\Harddisk67\\Partition15"},
- {"/dev/sdbq1", BRACK(FH_SDBQ | 1), "\\Device\\Harddisk68\\Partition1"},
- {"/dev/sdbq2", BRACK(FH_SDBQ | 2), "\\Device\\Harddisk68\\Partition2"},
- {"/dev/sdbq3", BRACK(FH_SDBQ | 3), "\\Device\\Harddisk68\\Partition3"},
- {"/dev/sdbq4", BRACK(FH_SDBQ | 4), "\\Device\\Harddisk68\\Partition4"},
- {"/dev/sdbq5", BRACK(FH_SDBQ | 5), "\\Device\\Harddisk68\\Partition5"},
- {"/dev/sdbq6", BRACK(FH_SDBQ | 6), "\\Device\\Harddisk68\\Partition6"},
- {"/dev/sdbq7", BRACK(FH_SDBQ | 7), "\\Device\\Harddisk68\\Partition7"},
- {"/dev/sdbq8", BRACK(FH_SDBQ | 8), "\\Device\\Harddisk68\\Partition8"},
- {"/dev/sdbq9", BRACK(FH_SDBQ | 9), "\\Device\\Harddisk68\\Partition9"},
- {"/dev/sdbq10", BRACK(FH_SDBQ | 10), "\\Device\\Harddisk68\\Partition10"},
- {"/dev/sdbq11", BRACK(FH_SDBQ | 11), "\\Device\\Harddisk68\\Partition11"},
- {"/dev/sdbq12", BRACK(FH_SDBQ | 12), "\\Device\\Harddisk68\\Partition12"},
- {"/dev/sdbq13", BRACK(FH_SDBQ | 13), "\\Device\\Harddisk68\\Partition13"},
- {"/dev/sdbq14", BRACK(FH_SDBQ | 14), "\\Device\\Harddisk68\\Partition14"},
- {"/dev/sdbq15", BRACK(FH_SDBQ | 15), "\\Device\\Harddisk68\\Partition15"},
- {"/dev/sdbr1", BRACK(FH_SDBR | 1), "\\Device\\Harddisk69\\Partition1"},
- {"/dev/sdbr2", BRACK(FH_SDBR | 2), "\\Device\\Harddisk69\\Partition2"},
- {"/dev/sdbr3", BRACK(FH_SDBR | 3), "\\Device\\Harddisk69\\Partition3"},
- {"/dev/sdbr4", BRACK(FH_SDBR | 4), "\\Device\\Harddisk69\\Partition4"},
- {"/dev/sdbr5", BRACK(FH_SDBR | 5), "\\Device\\Harddisk69\\Partition5"},
- {"/dev/sdbr6", BRACK(FH_SDBR | 6), "\\Device\\Harddisk69\\Partition6"},
- {"/dev/sdbr7", BRACK(FH_SDBR | 7), "\\Device\\Harddisk69\\Partition7"},
- {"/dev/sdbr8", BRACK(FH_SDBR | 8), "\\Device\\Harddisk69\\Partition8"},
- {"/dev/sdbr9", BRACK(FH_SDBR | 9), "\\Device\\Harddisk69\\Partition9"},
- {"/dev/sdbr10", BRACK(FH_SDBR | 10), "\\Device\\Harddisk69\\Partition10"},
- {"/dev/sdbr11", BRACK(FH_SDBR | 11), "\\Device\\Harddisk69\\Partition11"},
- {"/dev/sdbr12", BRACK(FH_SDBR | 12), "\\Device\\Harddisk69\\Partition12"},
- {"/dev/sdbr13", BRACK(FH_SDBR | 13), "\\Device\\Harddisk69\\Partition13"},
- {"/dev/sdbr14", BRACK(FH_SDBR | 14), "\\Device\\Harddisk69\\Partition14"},
- {"/dev/sdbr15", BRACK(FH_SDBR | 15), "\\Device\\Harddisk69\\Partition15"},
- {"/dev/sdbs1", BRACK(FH_SDBS | 1), "\\Device\\Harddisk70\\Partition1"},
- {"/dev/sdbs2", BRACK(FH_SDBS | 2), "\\Device\\Harddisk70\\Partition2"},
- {"/dev/sdbs3", BRACK(FH_SDBS | 3), "\\Device\\Harddisk70\\Partition3"},
- {"/dev/sdbs4", BRACK(FH_SDBS | 4), "\\Device\\Harddisk70\\Partition4"},
- {"/dev/sdbs5", BRACK(FH_SDBS | 5), "\\Device\\Harddisk70\\Partition5"},
- {"/dev/sdbs6", BRACK(FH_SDBS | 6), "\\Device\\Harddisk70\\Partition6"},
- {"/dev/sdbs7", BRACK(FH_SDBS | 7), "\\Device\\Harddisk70\\Partition7"},
- {"/dev/sdbs8", BRACK(FH_SDBS | 8), "\\Device\\Harddisk70\\Partition8"},
- {"/dev/sdbs9", BRACK(FH_SDBS | 9), "\\Device\\Harddisk70\\Partition9"},
- {"/dev/sdbs10", BRACK(FH_SDBS | 10), "\\Device\\Harddisk70\\Partition10"},
- {"/dev/sdbs11", BRACK(FH_SDBS | 11), "\\Device\\Harddisk70\\Partition11"},
- {"/dev/sdbs12", BRACK(FH_SDBS | 12), "\\Device\\Harddisk70\\Partition12"},
- {"/dev/sdbs13", BRACK(FH_SDBS | 13), "\\Device\\Harddisk70\\Partition13"},
- {"/dev/sdbs14", BRACK(FH_SDBS | 14), "\\Device\\Harddisk70\\Partition14"},
- {"/dev/sdbs15", BRACK(FH_SDBS | 15), "\\Device\\Harddisk70\\Partition15"},
- {"/dev/sdbt1", BRACK(FH_SDBT | 1), "\\Device\\Harddisk71\\Partition1"},
- {"/dev/sdbt2", BRACK(FH_SDBT | 2), "\\Device\\Harddisk71\\Partition2"},
- {"/dev/sdbt3", BRACK(FH_SDBT | 3), "\\Device\\Harddisk71\\Partition3"},
- {"/dev/sdbt4", BRACK(FH_SDBT | 4), "\\Device\\Harddisk71\\Partition4"},
- {"/dev/sdbt5", BRACK(FH_SDBT | 5), "\\Device\\Harddisk71\\Partition5"},
- {"/dev/sdbt6", BRACK(FH_SDBT | 6), "\\Device\\Harddisk71\\Partition6"},
- {"/dev/sdbt7", BRACK(FH_SDBT | 7), "\\Device\\Harddisk71\\Partition7"},
- {"/dev/sdbt8", BRACK(FH_SDBT | 8), "\\Device\\Harddisk71\\Partition8"},
- {"/dev/sdbt9", BRACK(FH_SDBT | 9), "\\Device\\Harddisk71\\Partition9"},
- {"/dev/sdbt10", BRACK(FH_SDBT | 10), "\\Device\\Harddisk71\\Partition10"},
- {"/dev/sdbt11", BRACK(FH_SDBT | 11), "\\Device\\Harddisk71\\Partition11"},
- {"/dev/sdbt12", BRACK(FH_SDBT | 12), "\\Device\\Harddisk71\\Partition12"},
- {"/dev/sdbt13", BRACK(FH_SDBT | 13), "\\Device\\Harddisk71\\Partition13"},
- {"/dev/sdbt14", BRACK(FH_SDBT | 14), "\\Device\\Harddisk71\\Partition14"},
- {"/dev/sdbt15", BRACK(FH_SDBT | 15), "\\Device\\Harddisk71\\Partition15"},
- {"/dev/sdbu1", BRACK(FH_SDBU | 1), "\\Device\\Harddisk72\\Partition1"},
- {"/dev/sdbu2", BRACK(FH_SDBU | 2), "\\Device\\Harddisk72\\Partition2"},
- {"/dev/sdbu3", BRACK(FH_SDBU | 3), "\\Device\\Harddisk72\\Partition3"},
- {"/dev/sdbu4", BRACK(FH_SDBU | 4), "\\Device\\Harddisk72\\Partition4"},
- {"/dev/sdbu5", BRACK(FH_SDBU | 5), "\\Device\\Harddisk72\\Partition5"},
- {"/dev/sdbu6", BRACK(FH_SDBU | 6), "\\Device\\Harddisk72\\Partition6"},
- {"/dev/sdbu7", BRACK(FH_SDBU | 7), "\\Device\\Harddisk72\\Partition7"},
- {"/dev/sdbu8", BRACK(FH_SDBU | 8), "\\Device\\Harddisk72\\Partition8"},
- {"/dev/sdbu9", BRACK(FH_SDBU | 9), "\\Device\\Harddisk72\\Partition9"},
- {"/dev/sdbu10", BRACK(FH_SDBU | 10), "\\Device\\Harddisk72\\Partition10"},
- {"/dev/sdbu11", BRACK(FH_SDBU | 11), "\\Device\\Harddisk72\\Partition11"},
- {"/dev/sdbu12", BRACK(FH_SDBU | 12), "\\Device\\Harddisk72\\Partition12"},
- {"/dev/sdbu13", BRACK(FH_SDBU | 13), "\\Device\\Harddisk72\\Partition13"},
- {"/dev/sdbu14", BRACK(FH_SDBU | 14), "\\Device\\Harddisk72\\Partition14"},
- {"/dev/sdbu15", BRACK(FH_SDBU | 15), "\\Device\\Harddisk72\\Partition15"},
- {"/dev/sdbv1", BRACK(FH_SDBV | 1), "\\Device\\Harddisk73\\Partition1"},
- {"/dev/sdbv2", BRACK(FH_SDBV | 2), "\\Device\\Harddisk73\\Partition2"},
- {"/dev/sdbv3", BRACK(FH_SDBV | 3), "\\Device\\Harddisk73\\Partition3"},
- {"/dev/sdbv4", BRACK(FH_SDBV | 4), "\\Device\\Harddisk73\\Partition4"},
- {"/dev/sdbv5", BRACK(FH_SDBV | 5), "\\Device\\Harddisk73\\Partition5"},
- {"/dev/sdbv6", BRACK(FH_SDBV | 6), "\\Device\\Harddisk73\\Partition6"},
- {"/dev/sdbv7", BRACK(FH_SDBV | 7), "\\Device\\Harddisk73\\Partition7"},
- {"/dev/sdbv8", BRACK(FH_SDBV | 8), "\\Device\\Harddisk73\\Partition8"},
- {"/dev/sdbv9", BRACK(FH_SDBV | 9), "\\Device\\Harddisk73\\Partition9"},
- {"/dev/sdbv10", BRACK(FH_SDBV | 10), "\\Device\\Harddisk73\\Partition10"},
- {"/dev/sdbv11", BRACK(FH_SDBV | 11), "\\Device\\Harddisk73\\Partition11"},
- {"/dev/sdbv12", BRACK(FH_SDBV | 12), "\\Device\\Harddisk73\\Partition12"},
- {"/dev/sdbv13", BRACK(FH_SDBV | 13), "\\Device\\Harddisk73\\Partition13"},
- {"/dev/sdbv14", BRACK(FH_SDBV | 14), "\\Device\\Harddisk73\\Partition14"},
- {"/dev/sdbv15", BRACK(FH_SDBV | 15), "\\Device\\Harddisk73\\Partition15"},
- {"/dev/sdbw1", BRACK(FH_SDBW | 1), "\\Device\\Harddisk74\\Partition1"},
- {"/dev/sdbw2", BRACK(FH_SDBW | 2), "\\Device\\Harddisk74\\Partition2"},
- {"/dev/sdbw3", BRACK(FH_SDBW | 3), "\\Device\\Harddisk74\\Partition3"},
- {"/dev/sdbw4", BRACK(FH_SDBW | 4), "\\Device\\Harddisk74\\Partition4"},
- {"/dev/sdbw5", BRACK(FH_SDBW | 5), "\\Device\\Harddisk74\\Partition5"},
- {"/dev/sdbw6", BRACK(FH_SDBW | 6), "\\Device\\Harddisk74\\Partition6"},
- {"/dev/sdbw7", BRACK(FH_SDBW | 7), "\\Device\\Harddisk74\\Partition7"},
- {"/dev/sdbw8", BRACK(FH_SDBW | 8), "\\Device\\Harddisk74\\Partition8"},
- {"/dev/sdbw9", BRACK(FH_SDBW | 9), "\\Device\\Harddisk74\\Partition9"},
- {"/dev/sdbw10", BRACK(FH_SDBW | 10), "\\Device\\Harddisk74\\Partition10"},
- {"/dev/sdbw11", BRACK(FH_SDBW | 11), "\\Device\\Harddisk74\\Partition11"},
- {"/dev/sdbw12", BRACK(FH_SDBW | 12), "\\Device\\Harddisk74\\Partition12"},
- {"/dev/sdbw13", BRACK(FH_SDBW | 13), "\\Device\\Harddisk74\\Partition13"},
- {"/dev/sdbw14", BRACK(FH_SDBW | 14), "\\Device\\Harddisk74\\Partition14"},
- {"/dev/sdbw15", BRACK(FH_SDBW | 15), "\\Device\\Harddisk74\\Partition15"},
- {"/dev/sdbx1", BRACK(FH_SDBX | 1), "\\Device\\Harddisk75\\Partition1"},
- {"/dev/sdbx2", BRACK(FH_SDBX | 2), "\\Device\\Harddisk75\\Partition2"},
- {"/dev/sdbx3", BRACK(FH_SDBX | 3), "\\Device\\Harddisk75\\Partition3"},
- {"/dev/sdbx4", BRACK(FH_SDBX | 4), "\\Device\\Harddisk75\\Partition4"},
- {"/dev/sdbx5", BRACK(FH_SDBX | 5), "\\Device\\Harddisk75\\Partition5"},
- {"/dev/sdbx6", BRACK(FH_SDBX | 6), "\\Device\\Harddisk75\\Partition6"},
- {"/dev/sdbx7", BRACK(FH_SDBX | 7), "\\Device\\Harddisk75\\Partition7"},
- {"/dev/sdbx8", BRACK(FH_SDBX | 8), "\\Device\\Harddisk75\\Partition8"},
- {"/dev/sdbx9", BRACK(FH_SDBX | 9), "\\Device\\Harddisk75\\Partition9"},
- {"/dev/sdbx10", BRACK(FH_SDBX | 10), "\\Device\\Harddisk75\\Partition10"},
- {"/dev/sdbx11", BRACK(FH_SDBX | 11), "\\Device\\Harddisk75\\Partition11"},
- {"/dev/sdbx12", BRACK(FH_SDBX | 12), "\\Device\\Harddisk75\\Partition12"},
- {"/dev/sdbx13", BRACK(FH_SDBX | 13), "\\Device\\Harddisk75\\Partition13"},
- {"/dev/sdbx14", BRACK(FH_SDBX | 14), "\\Device\\Harddisk75\\Partition14"},
- {"/dev/sdbx15", BRACK(FH_SDBX | 15), "\\Device\\Harddisk75\\Partition15"},
- {"/dev/sdby1", BRACK(FH_SDBY | 1), "\\Device\\Harddisk76\\Partition1"},
- {"/dev/sdby2", BRACK(FH_SDBY | 2), "\\Device\\Harddisk76\\Partition2"},
- {"/dev/sdby3", BRACK(FH_SDBY | 3), "\\Device\\Harddisk76\\Partition3"},
- {"/dev/sdby4", BRACK(FH_SDBY | 4), "\\Device\\Harddisk76\\Partition4"},
- {"/dev/sdby5", BRACK(FH_SDBY | 5), "\\Device\\Harddisk76\\Partition5"},
- {"/dev/sdby6", BRACK(FH_SDBY | 6), "\\Device\\Harddisk76\\Partition6"},
- {"/dev/sdby7", BRACK(FH_SDBY | 7), "\\Device\\Harddisk76\\Partition7"},
- {"/dev/sdby8", BRACK(FH_SDBY | 8), "\\Device\\Harddisk76\\Partition8"},
- {"/dev/sdby9", BRACK(FH_SDBY | 9), "\\Device\\Harddisk76\\Partition9"},
- {"/dev/sdby10", BRACK(FH_SDBY | 10), "\\Device\\Harddisk76\\Partition10"},
- {"/dev/sdby11", BRACK(FH_SDBY | 11), "\\Device\\Harddisk76\\Partition11"},
- {"/dev/sdby12", BRACK(FH_SDBY | 12), "\\Device\\Harddisk76\\Partition12"},
- {"/dev/sdby13", BRACK(FH_SDBY | 13), "\\Device\\Harddisk76\\Partition13"},
- {"/dev/sdby14", BRACK(FH_SDBY | 14), "\\Device\\Harddisk76\\Partition14"},
- {"/dev/sdby15", BRACK(FH_SDBY | 15), "\\Device\\Harddisk76\\Partition15"},
- {"/dev/sdbz1", BRACK(FH_SDBZ | 1), "\\Device\\Harddisk77\\Partition1"},
- {"/dev/sdbz2", BRACK(FH_SDBZ | 2), "\\Device\\Harddisk77\\Partition2"},
- {"/dev/sdbz3", BRACK(FH_SDBZ | 3), "\\Device\\Harddisk77\\Partition3"},
- {"/dev/sdbz4", BRACK(FH_SDBZ | 4), "\\Device\\Harddisk77\\Partition4"},
- {"/dev/sdbz5", BRACK(FH_SDBZ | 5), "\\Device\\Harddisk77\\Partition5"},
- {"/dev/sdbz6", BRACK(FH_SDBZ | 6), "\\Device\\Harddisk77\\Partition6"},
- {"/dev/sdbz7", BRACK(FH_SDBZ | 7), "\\Device\\Harddisk77\\Partition7"},
- {"/dev/sdbz8", BRACK(FH_SDBZ | 8), "\\Device\\Harddisk77\\Partition8"},
- {"/dev/sdbz9", BRACK(FH_SDBZ | 9), "\\Device\\Harddisk77\\Partition9"},
- {"/dev/sdbz10", BRACK(FH_SDBZ | 10), "\\Device\\Harddisk77\\Partition10"},
- {"/dev/sdbz11", BRACK(FH_SDBZ | 11), "\\Device\\Harddisk77\\Partition11"},
- {"/dev/sdbz12", BRACK(FH_SDBZ | 12), "\\Device\\Harddisk77\\Partition12"},
- {"/dev/sdbz13", BRACK(FH_SDBZ | 13), "\\Device\\Harddisk77\\Partition13"},
- {"/dev/sdbz14", BRACK(FH_SDBZ | 14), "\\Device\\Harddisk77\\Partition14"},
- {"/dev/sdbz15", BRACK(FH_SDBZ | 15), "\\Device\\Harddisk77\\Partition15"},
- {"/dev/sdca", BRACK(FH_SDCA), "\\Device\\Harddisk78\\Partition0"},
- {"/dev/sdcb", BRACK(FH_SDCB), "\\Device\\Harddisk79\\Partition0"},
- {"/dev/sdcc", BRACK(FH_SDCC), "\\Device\\Harddisk80\\Partition0"},
- {"/dev/sdcd", BRACK(FH_SDCD), "\\Device\\Harddisk81\\Partition0"},
- {"/dev/sdce", BRACK(FH_SDCE), "\\Device\\Harddisk82\\Partition0"},
- {"/dev/sdcf", BRACK(FH_SDCF), "\\Device\\Harddisk83\\Partition0"},
- {"/dev/sdcg", BRACK(FH_SDCG), "\\Device\\Harddisk84\\Partition0"},
- {"/dev/sdch", BRACK(FH_SDCH), "\\Device\\Harddisk85\\Partition0"},
- {"/dev/sdci", BRACK(FH_SDCI), "\\Device\\Harddisk86\\Partition0"},
- {"/dev/sdcj", BRACK(FH_SDCJ), "\\Device\\Harddisk87\\Partition0"},
- {"/dev/sdck", BRACK(FH_SDCK), "\\Device\\Harddisk88\\Partition0"},
- {"/dev/sdcl", BRACK(FH_SDCL), "\\Device\\Harddisk89\\Partition0"},
- {"/dev/sdcm", BRACK(FH_SDCM), "\\Device\\Harddisk90\\Partition0"},
- {"/dev/sdcn", BRACK(FH_SDCN), "\\Device\\Harddisk91\\Partition0"},
- {"/dev/sdco", BRACK(FH_SDCO), "\\Device\\Harddisk92\\Partition0"},
- {"/dev/sdcp", BRACK(FH_SDCP), "\\Device\\Harddisk93\\Partition0"},
- {"/dev/sdcq", BRACK(FH_SDCQ), "\\Device\\Harddisk94\\Partition0"},
- {"/dev/sdcr", BRACK(FH_SDCR), "\\Device\\Harddisk95\\Partition0"},
- {"/dev/sdcs", BRACK(FH_SDCS), "\\Device\\Harddisk96\\Partition0"},
- {"/dev/sdct", BRACK(FH_SDCT), "\\Device\\Harddisk97\\Partition0"},
- {"/dev/sdcu", BRACK(FH_SDCU), "\\Device\\Harddisk98\\Partition0"},
- {"/dev/sdcv", BRACK(FH_SDCV), "\\Device\\Harddisk99\\Partition0"},
- {"/dev/sdcw", BRACK(FH_SDCW), "\\Device\\Harddisk100\\Partition0"},
- {"/dev/sdcx", BRACK(FH_SDCX), "\\Device\\Harddisk101\\Partition0"},
- {"/dev/sdcy", BRACK(FH_SDCY), "\\Device\\Harddisk102\\Partition0"},
- {"/dev/sdcz", BRACK(FH_SDCZ), "\\Device\\Harddisk103\\Partition0"},
- {"/dev/sdca1", BRACK(FH_SDCA | 1), "\\Device\\Harddisk78\\Partition1"},
- {"/dev/sdca2", BRACK(FH_SDCA | 2), "\\Device\\Harddisk78\\Partition2"},
- {"/dev/sdca3", BRACK(FH_SDCA | 3), "\\Device\\Harddisk78\\Partition3"},
- {"/dev/sdca4", BRACK(FH_SDCA | 4), "\\Device\\Harddisk78\\Partition4"},
- {"/dev/sdca5", BRACK(FH_SDCA | 5), "\\Device\\Harddisk78\\Partition5"},
- {"/dev/sdca6", BRACK(FH_SDCA | 6), "\\Device\\Harddisk78\\Partition6"},
- {"/dev/sdca7", BRACK(FH_SDCA | 7), "\\Device\\Harddisk78\\Partition7"},
- {"/dev/sdca8", BRACK(FH_SDCA | 8), "\\Device\\Harddisk78\\Partition8"},
- {"/dev/sdca9", BRACK(FH_SDCA | 9), "\\Device\\Harddisk78\\Partition9"},
- {"/dev/sdca10", BRACK(FH_SDCA | 10), "\\Device\\Harddisk78\\Partition10"},
- {"/dev/sdca11", BRACK(FH_SDCA | 11), "\\Device\\Harddisk78\\Partition11"},
- {"/dev/sdca12", BRACK(FH_SDCA | 12), "\\Device\\Harddisk78\\Partition12"},
- {"/dev/sdca13", BRACK(FH_SDCA | 13), "\\Device\\Harddisk78\\Partition13"},
- {"/dev/sdca14", BRACK(FH_SDCA | 14), "\\Device\\Harddisk78\\Partition14"},
- {"/dev/sdca15", BRACK(FH_SDCA | 15), "\\Device\\Harddisk78\\Partition15"},
- {"/dev/sdcb1", BRACK(FH_SDCB | 1), "\\Device\\Harddisk79\\Partition1"},
- {"/dev/sdcb2", BRACK(FH_SDCB | 2), "\\Device\\Harddisk79\\Partition2"},
- {"/dev/sdcb3", BRACK(FH_SDCB | 3), "\\Device\\Harddisk79\\Partition3"},
- {"/dev/sdcb4", BRACK(FH_SDCB | 4), "\\Device\\Harddisk79\\Partition4"},
- {"/dev/sdcb5", BRACK(FH_SDCB | 5), "\\Device\\Harddisk79\\Partition5"},
- {"/dev/sdcb6", BRACK(FH_SDCB | 6), "\\Device\\Harddisk79\\Partition6"},
- {"/dev/sdcb7", BRACK(FH_SDCB | 7), "\\Device\\Harddisk79\\Partition7"},
- {"/dev/sdcb8", BRACK(FH_SDCB | 8), "\\Device\\Harddisk79\\Partition8"},
- {"/dev/sdcb9", BRACK(FH_SDCB | 9), "\\Device\\Harddisk79\\Partition9"},
- {"/dev/sdcb10", BRACK(FH_SDCB | 10), "\\Device\\Harddisk79\\Partition10"},
- {"/dev/sdcb11", BRACK(FH_SDCB | 11), "\\Device\\Harddisk79\\Partition11"},
- {"/dev/sdcb12", BRACK(FH_SDCB | 12), "\\Device\\Harddisk79\\Partition12"},
- {"/dev/sdcb13", BRACK(FH_SDCB | 13), "\\Device\\Harddisk79\\Partition13"},
- {"/dev/sdcb14", BRACK(FH_SDCB | 14), "\\Device\\Harddisk79\\Partition14"},
- {"/dev/sdcb15", BRACK(FH_SDCB | 15), "\\Device\\Harddisk79\\Partition15"},
- {"/dev/sdcc1", BRACK(FH_SDCC | 1), "\\Device\\Harddisk80\\Partition1"},
- {"/dev/sdcc2", BRACK(FH_SDCC | 2), "\\Device\\Harddisk80\\Partition2"},
- {"/dev/sdcc3", BRACK(FH_SDCC | 3), "\\Device\\Harddisk80\\Partition3"},
- {"/dev/sdcc4", BRACK(FH_SDCC | 4), "\\Device\\Harddisk80\\Partition4"},
- {"/dev/sdcc5", BRACK(FH_SDCC | 5), "\\Device\\Harddisk80\\Partition5"},
- {"/dev/sdcc6", BRACK(FH_SDCC | 6), "\\Device\\Harddisk80\\Partition6"},
- {"/dev/sdcc7", BRACK(FH_SDCC | 7), "\\Device\\Harddisk80\\Partition7"},
- {"/dev/sdcc8", BRACK(FH_SDCC | 8), "\\Device\\Harddisk80\\Partition8"},
- {"/dev/sdcc9", BRACK(FH_SDCC | 9), "\\Device\\Harddisk80\\Partition9"},
- {"/dev/sdcc10", BRACK(FH_SDCC | 10), "\\Device\\Harddisk80\\Partition10"},
- {"/dev/sdcc11", BRACK(FH_SDCC | 11), "\\Device\\Harddisk80\\Partition11"},
- {"/dev/sdcc12", BRACK(FH_SDCC | 12), "\\Device\\Harddisk80\\Partition12"},
- {"/dev/sdcc13", BRACK(FH_SDCC | 13), "\\Device\\Harddisk80\\Partition13"},
- {"/dev/sdcc14", BRACK(FH_SDCC | 14), "\\Device\\Harddisk80\\Partition14"},
- {"/dev/sdcc15", BRACK(FH_SDCC | 15), "\\Device\\Harddisk80\\Partition15"},
- {"/dev/sdcd1", BRACK(FH_SDCD | 1), "\\Device\\Harddisk81\\Partition1"},
- {"/dev/sdcd2", BRACK(FH_SDCD | 2), "\\Device\\Harddisk81\\Partition2"},
- {"/dev/sdcd3", BRACK(FH_SDCD | 3), "\\Device\\Harddisk81\\Partition3"},
- {"/dev/sdcd4", BRACK(FH_SDCD | 4), "\\Device\\Harddisk81\\Partition4"},
- {"/dev/sdcd5", BRACK(FH_SDCD | 5), "\\Device\\Harddisk81\\Partition5"},
- {"/dev/sdcd6", BRACK(FH_SDCD | 6), "\\Device\\Harddisk81\\Partition6"},
- {"/dev/sdcd7", BRACK(FH_SDCD | 7), "\\Device\\Harddisk81\\Partition7"},
- {"/dev/sdcd8", BRACK(FH_SDCD | 8), "\\Device\\Harddisk81\\Partition8"},
- {"/dev/sdcd9", BRACK(FH_SDCD | 9), "\\Device\\Harddisk81\\Partition9"},
- {"/dev/sdcd10", BRACK(FH_SDCD | 10), "\\Device\\Harddisk81\\Partition10"},
- {"/dev/sdcd11", BRACK(FH_SDCD | 11), "\\Device\\Harddisk81\\Partition11"},
- {"/dev/sdcd12", BRACK(FH_SDCD | 12), "\\Device\\Harddisk81\\Partition12"},
- {"/dev/sdcd13", BRACK(FH_SDCD | 13), "\\Device\\Harddisk81\\Partition13"},
- {"/dev/sdcd14", BRACK(FH_SDCD | 14), "\\Device\\Harddisk81\\Partition14"},
- {"/dev/sdcd15", BRACK(FH_SDCD | 15), "\\Device\\Harddisk81\\Partition15"},
- {"/dev/sdce1", BRACK(FH_SDCE | 1), "\\Device\\Harddisk82\\Partition1"},
- {"/dev/sdce2", BRACK(FH_SDCE | 2), "\\Device\\Harddisk82\\Partition2"},
- {"/dev/sdce3", BRACK(FH_SDCE | 3), "\\Device\\Harddisk82\\Partition3"},
- {"/dev/sdce4", BRACK(FH_SDCE | 4), "\\Device\\Harddisk82\\Partition4"},
- {"/dev/sdce5", BRACK(FH_SDCE | 5), "\\Device\\Harddisk82\\Partition5"},
- {"/dev/sdce6", BRACK(FH_SDCE | 6), "\\Device\\Harddisk82\\Partition6"},
- {"/dev/sdce7", BRACK(FH_SDCE | 7), "\\Device\\Harddisk82\\Partition7"},
- {"/dev/sdce8", BRACK(FH_SDCE | 8), "\\Device\\Harddisk82\\Partition8"},
- {"/dev/sdce9", BRACK(FH_SDCE | 9), "\\Device\\Harddisk82\\Partition9"},
- {"/dev/sdce10", BRACK(FH_SDCE | 10), "\\Device\\Harddisk82\\Partition10"},
- {"/dev/sdce11", BRACK(FH_SDCE | 11), "\\Device\\Harddisk82\\Partition11"},
- {"/dev/sdce12", BRACK(FH_SDCE | 12), "\\Device\\Harddisk82\\Partition12"},
- {"/dev/sdce13", BRACK(FH_SDCE | 13), "\\Device\\Harddisk82\\Partition13"},
- {"/dev/sdce14", BRACK(FH_SDCE | 14), "\\Device\\Harddisk82\\Partition14"},
- {"/dev/sdce15", BRACK(FH_SDCE | 15), "\\Device\\Harddisk82\\Partition15"},
- {"/dev/sdcf1", BRACK(FH_SDCF | 1), "\\Device\\Harddisk83\\Partition1"},
- {"/dev/sdcf2", BRACK(FH_SDCF | 2), "\\Device\\Harddisk83\\Partition2"},
- {"/dev/sdcf3", BRACK(FH_SDCF | 3), "\\Device\\Harddisk83\\Partition3"},
- {"/dev/sdcf4", BRACK(FH_SDCF | 4), "\\Device\\Harddisk83\\Partition4"},
- {"/dev/sdcf5", BRACK(FH_SDCF | 5), "\\Device\\Harddisk83\\Partition5"},
- {"/dev/sdcf6", BRACK(FH_SDCF | 6), "\\Device\\Harddisk83\\Partition6"},
- {"/dev/sdcf7", BRACK(FH_SDCF | 7), "\\Device\\Harddisk83\\Partition7"},
- {"/dev/sdcf8", BRACK(FH_SDCF | 8), "\\Device\\Harddisk83\\Partition8"},
- {"/dev/sdcf9", BRACK(FH_SDCF | 9), "\\Device\\Harddisk83\\Partition9"},
- {"/dev/sdcf10", BRACK(FH_SDCF | 10), "\\Device\\Harddisk83\\Partition10"},
- {"/dev/sdcf11", BRACK(FH_SDCF | 11), "\\Device\\Harddisk83\\Partition11"},
- {"/dev/sdcf12", BRACK(FH_SDCF | 12), "\\Device\\Harddisk83\\Partition12"},
- {"/dev/sdcf13", BRACK(FH_SDCF | 13), "\\Device\\Harddisk83\\Partition13"},
- {"/dev/sdcf14", BRACK(FH_SDCF | 14), "\\Device\\Harddisk83\\Partition14"},
- {"/dev/sdcf15", BRACK(FH_SDCF | 15), "\\Device\\Harddisk83\\Partition15"},
- {"/dev/sdcg1", BRACK(FH_SDCG | 1), "\\Device\\Harddisk84\\Partition1"},
- {"/dev/sdcg2", BRACK(FH_SDCG | 2), "\\Device\\Harddisk84\\Partition2"},
- {"/dev/sdcg3", BRACK(FH_SDCG | 3), "\\Device\\Harddisk84\\Partition3"},
- {"/dev/sdcg4", BRACK(FH_SDCG | 4), "\\Device\\Harddisk84\\Partition4"},
- {"/dev/sdcg5", BRACK(FH_SDCG | 5), "\\Device\\Harddisk84\\Partition5"},
- {"/dev/sdcg6", BRACK(FH_SDCG | 6), "\\Device\\Harddisk84\\Partition6"},
- {"/dev/sdcg7", BRACK(FH_SDCG | 7), "\\Device\\Harddisk84\\Partition7"},
- {"/dev/sdcg8", BRACK(FH_SDCG | 8), "\\Device\\Harddisk84\\Partition8"},
- {"/dev/sdcg9", BRACK(FH_SDCG | 9), "\\Device\\Harddisk84\\Partition9"},
- {"/dev/sdcg10", BRACK(FH_SDCG | 10), "\\Device\\Harddisk84\\Partition10"},
- {"/dev/sdcg11", BRACK(FH_SDCG | 11), "\\Device\\Harddisk84\\Partition11"},
- {"/dev/sdcg12", BRACK(FH_SDCG | 12), "\\Device\\Harddisk84\\Partition12"},
- {"/dev/sdcg13", BRACK(FH_SDCG | 13), "\\Device\\Harddisk84\\Partition13"},
- {"/dev/sdcg14", BRACK(FH_SDCG | 14), "\\Device\\Harddisk84\\Partition14"},
- {"/dev/sdcg15", BRACK(FH_SDCG | 15), "\\Device\\Harddisk84\\Partition15"},
- {"/dev/sdch1", BRACK(FH_SDCH | 1), "\\Device\\Harddisk85\\Partition1"},
- {"/dev/sdch2", BRACK(FH_SDCH | 2), "\\Device\\Harddisk85\\Partition2"},
- {"/dev/sdch3", BRACK(FH_SDCH | 3), "\\Device\\Harddisk85\\Partition3"},
- {"/dev/sdch4", BRACK(FH_SDCH | 4), "\\Device\\Harddisk85\\Partition4"},
- {"/dev/sdch5", BRACK(FH_SDCH | 5), "\\Device\\Harddisk85\\Partition5"},
- {"/dev/sdch6", BRACK(FH_SDCH | 6), "\\Device\\Harddisk85\\Partition6"},
- {"/dev/sdch7", BRACK(FH_SDCH | 7), "\\Device\\Harddisk85\\Partition7"},
- {"/dev/sdch8", BRACK(FH_SDCH | 8), "\\Device\\Harddisk85\\Partition8"},
- {"/dev/sdch9", BRACK(FH_SDCH | 9), "\\Device\\Harddisk85\\Partition9"},
- {"/dev/sdch10", BRACK(FH_SDCH | 10), "\\Device\\Harddisk85\\Partition10"},
- {"/dev/sdch11", BRACK(FH_SDCH | 11), "\\Device\\Harddisk85\\Partition11"},
- {"/dev/sdch12", BRACK(FH_SDCH | 12), "\\Device\\Harddisk85\\Partition12"},
- {"/dev/sdch13", BRACK(FH_SDCH | 13), "\\Device\\Harddisk85\\Partition13"},
- {"/dev/sdch14", BRACK(FH_SDCH | 14), "\\Device\\Harddisk85\\Partition14"},
- {"/dev/sdch15", BRACK(FH_SDCH | 15), "\\Device\\Harddisk85\\Partition15"},
- {"/dev/sdci1", BRACK(FH_SDCI | 1), "\\Device\\Harddisk86\\Partition1"},
- {"/dev/sdci2", BRACK(FH_SDCI | 2), "\\Device\\Harddisk86\\Partition2"},
- {"/dev/sdci3", BRACK(FH_SDCI | 3), "\\Device\\Harddisk86\\Partition3"},
- {"/dev/sdci4", BRACK(FH_SDCI | 4), "\\Device\\Harddisk86\\Partition4"},
- {"/dev/sdci5", BRACK(FH_SDCI | 5), "\\Device\\Harddisk86\\Partition5"},
- {"/dev/sdci6", BRACK(FH_SDCI | 6), "\\Device\\Harddisk86\\Partition6"},
- {"/dev/sdci7", BRACK(FH_SDCI | 7), "\\Device\\Harddisk86\\Partition7"},
- {"/dev/sdci8", BRACK(FH_SDCI | 8), "\\Device\\Harddisk86\\Partition8"},
- {"/dev/sdci9", BRACK(FH_SDCI | 9), "\\Device\\Harddisk86\\Partition9"},
- {"/dev/sdci10", BRACK(FH_SDCI | 10), "\\Device\\Harddisk86\\Partition10"},
- {"/dev/sdci11", BRACK(FH_SDCI | 11), "\\Device\\Harddisk86\\Partition11"},
- {"/dev/sdci12", BRACK(FH_SDCI | 12), "\\Device\\Harddisk86\\Partition12"},
- {"/dev/sdci13", BRACK(FH_SDCI | 13), "\\Device\\Harddisk86\\Partition13"},
- {"/dev/sdci14", BRACK(FH_SDCI | 14), "\\Device\\Harddisk86\\Partition14"},
- {"/dev/sdci15", BRACK(FH_SDCI | 15), "\\Device\\Harddisk86\\Partition15"},
- {"/dev/sdcj1", BRACK(FH_SDCJ | 1), "\\Device\\Harddisk87\\Partition1"},
- {"/dev/sdcj2", BRACK(FH_SDCJ | 2), "\\Device\\Harddisk87\\Partition2"},
- {"/dev/sdcj3", BRACK(FH_SDCJ | 3), "\\Device\\Harddisk87\\Partition3"},
- {"/dev/sdcj4", BRACK(FH_SDCJ | 4), "\\Device\\Harddisk87\\Partition4"},
- {"/dev/sdcj5", BRACK(FH_SDCJ | 5), "\\Device\\Harddisk87\\Partition5"},
- {"/dev/sdcj6", BRACK(FH_SDCJ | 6), "\\Device\\Harddisk87\\Partition6"},
- {"/dev/sdcj7", BRACK(FH_SDCJ | 7), "\\Device\\Harddisk87\\Partition7"},
- {"/dev/sdcj8", BRACK(FH_SDCJ | 8), "\\Device\\Harddisk87\\Partition8"},
- {"/dev/sdcj9", BRACK(FH_SDCJ | 9), "\\Device\\Harddisk87\\Partition9"},
- {"/dev/sdcj10", BRACK(FH_SDCJ | 10), "\\Device\\Harddisk87\\Partition10"},
- {"/dev/sdcj11", BRACK(FH_SDCJ | 11), "\\Device\\Harddisk87\\Partition11"},
- {"/dev/sdcj12", BRACK(FH_SDCJ | 12), "\\Device\\Harddisk87\\Partition12"},
- {"/dev/sdcj13", BRACK(FH_SDCJ | 13), "\\Device\\Harddisk87\\Partition13"},
- {"/dev/sdcj14", BRACK(FH_SDCJ | 14), "\\Device\\Harddisk87\\Partition14"},
- {"/dev/sdcj15", BRACK(FH_SDCJ | 15), "\\Device\\Harddisk87\\Partition15"},
- {"/dev/sdck1", BRACK(FH_SDCK | 1), "\\Device\\Harddisk88\\Partition1"},
- {"/dev/sdck2", BRACK(FH_SDCK | 2), "\\Device\\Harddisk88\\Partition2"},
- {"/dev/sdck3", BRACK(FH_SDCK | 3), "\\Device\\Harddisk88\\Partition3"},
- {"/dev/sdck4", BRACK(FH_SDCK | 4), "\\Device\\Harddisk88\\Partition4"},
- {"/dev/sdck5", BRACK(FH_SDCK | 5), "\\Device\\Harddisk88\\Partition5"},
- {"/dev/sdck6", BRACK(FH_SDCK | 6), "\\Device\\Harddisk88\\Partition6"},
- {"/dev/sdck7", BRACK(FH_SDCK | 7), "\\Device\\Harddisk88\\Partition7"},
- {"/dev/sdck8", BRACK(FH_SDCK | 8), "\\Device\\Harddisk88\\Partition8"},
- {"/dev/sdck9", BRACK(FH_SDCK | 9), "\\Device\\Harddisk88\\Partition9"},
- {"/dev/sdck10", BRACK(FH_SDCK | 10), "\\Device\\Harddisk88\\Partition10"},
- {"/dev/sdck11", BRACK(FH_SDCK | 11), "\\Device\\Harddisk88\\Partition11"},
- {"/dev/sdck12", BRACK(FH_SDCK | 12), "\\Device\\Harddisk88\\Partition12"},
- {"/dev/sdck13", BRACK(FH_SDCK | 13), "\\Device\\Harddisk88\\Partition13"},
- {"/dev/sdck14", BRACK(FH_SDCK | 14), "\\Device\\Harddisk88\\Partition14"},
- {"/dev/sdck15", BRACK(FH_SDCK | 15), "\\Device\\Harddisk88\\Partition15"},
- {"/dev/sdcl1", BRACK(FH_SDCL | 1), "\\Device\\Harddisk89\\Partition1"},
- {"/dev/sdcl2", BRACK(FH_SDCL | 2), "\\Device\\Harddisk89\\Partition2"},
- {"/dev/sdcl3", BRACK(FH_SDCL | 3), "\\Device\\Harddisk89\\Partition3"},
- {"/dev/sdcl4", BRACK(FH_SDCL | 4), "\\Device\\Harddisk89\\Partition4"},
- {"/dev/sdcl5", BRACK(FH_SDCL | 5), "\\Device\\Harddisk89\\Partition5"},
- {"/dev/sdcl6", BRACK(FH_SDCL | 6), "\\Device\\Harddisk89\\Partition6"},
- {"/dev/sdcl7", BRACK(FH_SDCL | 7), "\\Device\\Harddisk89\\Partition7"},
- {"/dev/sdcl8", BRACK(FH_SDCL | 8), "\\Device\\Harddisk89\\Partition8"},
- {"/dev/sdcl9", BRACK(FH_SDCL | 9), "\\Device\\Harddisk89\\Partition9"},
- {"/dev/sdcl10", BRACK(FH_SDCL | 10), "\\Device\\Harddisk89\\Partition10"},
- {"/dev/sdcl11", BRACK(FH_SDCL | 11), "\\Device\\Harddisk89\\Partition11"},
- {"/dev/sdcl12", BRACK(FH_SDCL | 12), "\\Device\\Harddisk89\\Partition12"},
- {"/dev/sdcl13", BRACK(FH_SDCL | 13), "\\Device\\Harddisk89\\Partition13"},
- {"/dev/sdcl14", BRACK(FH_SDCL | 14), "\\Device\\Harddisk89\\Partition14"},
- {"/dev/sdcl15", BRACK(FH_SDCL | 15), "\\Device\\Harddisk89\\Partition15"},
- {"/dev/sdcm1", BRACK(FH_SDCM | 1), "\\Device\\Harddisk90\\Partition1"},
- {"/dev/sdcm2", BRACK(FH_SDCM | 2), "\\Device\\Harddisk90\\Partition2"},
- {"/dev/sdcm3", BRACK(FH_SDCM | 3), "\\Device\\Harddisk90\\Partition3"},
- {"/dev/sdcm4", BRACK(FH_SDCM | 4), "\\Device\\Harddisk90\\Partition4"},
- {"/dev/sdcm5", BRACK(FH_SDCM | 5), "\\Device\\Harddisk90\\Partition5"},
- {"/dev/sdcm6", BRACK(FH_SDCM | 6), "\\Device\\Harddisk90\\Partition6"},
- {"/dev/sdcm7", BRACK(FH_SDCM | 7), "\\Device\\Harddisk90\\Partition7"},
- {"/dev/sdcm8", BRACK(FH_SDCM | 8), "\\Device\\Harddisk90\\Partition8"},
- {"/dev/sdcm9", BRACK(FH_SDCM | 9), "\\Device\\Harddisk90\\Partition9"},
- {"/dev/sdcm10", BRACK(FH_SDCM | 10), "\\Device\\Harddisk90\\Partition10"},
- {"/dev/sdcm11", BRACK(FH_SDCM | 11), "\\Device\\Harddisk90\\Partition11"},
- {"/dev/sdcm12", BRACK(FH_SDCM | 12), "\\Device\\Harddisk90\\Partition12"},
- {"/dev/sdcm13", BRACK(FH_SDCM | 13), "\\Device\\Harddisk90\\Partition13"},
- {"/dev/sdcm14", BRACK(FH_SDCM | 14), "\\Device\\Harddisk90\\Partition14"},
- {"/dev/sdcm15", BRACK(FH_SDCM | 15), "\\Device\\Harddisk90\\Partition15"},
- {"/dev/sdcn1", BRACK(FH_SDCN | 1), "\\Device\\Harddisk91\\Partition1"},
- {"/dev/sdcn2", BRACK(FH_SDCN | 2), "\\Device\\Harddisk91\\Partition2"},
- {"/dev/sdcn3", BRACK(FH_SDCN | 3), "\\Device\\Harddisk91\\Partition3"},
- {"/dev/sdcn4", BRACK(FH_SDCN | 4), "\\Device\\Harddisk91\\Partition4"},
- {"/dev/sdcn5", BRACK(FH_SDCN | 5), "\\Device\\Harddisk91\\Partition5"},
- {"/dev/sdcn6", BRACK(FH_SDCN | 6), "\\Device\\Harddisk91\\Partition6"},
- {"/dev/sdcn7", BRACK(FH_SDCN | 7), "\\Device\\Harddisk91\\Partition7"},
- {"/dev/sdcn8", BRACK(FH_SDCN | 8), "\\Device\\Harddisk91\\Partition8"},
- {"/dev/sdcn9", BRACK(FH_SDCN | 9), "\\Device\\Harddisk91\\Partition9"},
- {"/dev/sdcn10", BRACK(FH_SDCN | 10), "\\Device\\Harddisk91\\Partition10"},
- {"/dev/sdcn11", BRACK(FH_SDCN | 11), "\\Device\\Harddisk91\\Partition11"},
- {"/dev/sdcn12", BRACK(FH_SDCN | 12), "\\Device\\Harddisk91\\Partition12"},
- {"/dev/sdcn13", BRACK(FH_SDCN | 13), "\\Device\\Harddisk91\\Partition13"},
- {"/dev/sdcn14", BRACK(FH_SDCN | 14), "\\Device\\Harddisk91\\Partition14"},
- {"/dev/sdcn15", BRACK(FH_SDCN | 15), "\\Device\\Harddisk91\\Partition15"},
- {"/dev/sdco1", BRACK(FH_SDCO | 1), "\\Device\\Harddisk92\\Partition1"},
- {"/dev/sdco2", BRACK(FH_SDCO | 2), "\\Device\\Harddisk92\\Partition2"},
- {"/dev/sdco3", BRACK(FH_SDCO | 3), "\\Device\\Harddisk92\\Partition3"},
- {"/dev/sdco4", BRACK(FH_SDCO | 4), "\\Device\\Harddisk92\\Partition4"},
- {"/dev/sdco5", BRACK(FH_SDCO | 5), "\\Device\\Harddisk92\\Partition5"},
- {"/dev/sdco6", BRACK(FH_SDCO | 6), "\\Device\\Harddisk92\\Partition6"},
- {"/dev/sdco7", BRACK(FH_SDCO | 7), "\\Device\\Harddisk92\\Partition7"},
- {"/dev/sdco8", BRACK(FH_SDCO | 8), "\\Device\\Harddisk92\\Partition8"},
- {"/dev/sdco9", BRACK(FH_SDCO | 9), "\\Device\\Harddisk92\\Partition9"},
- {"/dev/sdco10", BRACK(FH_SDCO | 10), "\\Device\\Harddisk92\\Partition10"},
- {"/dev/sdco11", BRACK(FH_SDCO | 11), "\\Device\\Harddisk92\\Partition11"},
- {"/dev/sdco12", BRACK(FH_SDCO | 12), "\\Device\\Harddisk92\\Partition12"},
- {"/dev/sdco13", BRACK(FH_SDCO | 13), "\\Device\\Harddisk92\\Partition13"},
- {"/dev/sdco14", BRACK(FH_SDCO | 14), "\\Device\\Harddisk92\\Partition14"},
- {"/dev/sdco15", BRACK(FH_SDCO | 15), "\\Device\\Harddisk92\\Partition15"},
- {"/dev/sdcp1", BRACK(FH_SDCP | 1), "\\Device\\Harddisk93\\Partition1"},
- {"/dev/sdcp2", BRACK(FH_SDCP | 2), "\\Device\\Harddisk93\\Partition2"},
- {"/dev/sdcp3", BRACK(FH_SDCP | 3), "\\Device\\Harddisk93\\Partition3"},
- {"/dev/sdcp4", BRACK(FH_SDCP | 4), "\\Device\\Harddisk93\\Partition4"},
- {"/dev/sdcp5", BRACK(FH_SDCP | 5), "\\Device\\Harddisk93\\Partition5"},
- {"/dev/sdcp6", BRACK(FH_SDCP | 6), "\\Device\\Harddisk93\\Partition6"},
- {"/dev/sdcp7", BRACK(FH_SDCP | 7), "\\Device\\Harddisk93\\Partition7"},
- {"/dev/sdcp8", BRACK(FH_SDCP | 8), "\\Device\\Harddisk93\\Partition8"},
- {"/dev/sdcp9", BRACK(FH_SDCP | 9), "\\Device\\Harddisk93\\Partition9"},
- {"/dev/sdcp10", BRACK(FH_SDCP | 10), "\\Device\\Harddisk93\\Partition10"},
- {"/dev/sdcp11", BRACK(FH_SDCP | 11), "\\Device\\Harddisk93\\Partition11"},
- {"/dev/sdcp12", BRACK(FH_SDCP | 12), "\\Device\\Harddisk93\\Partition12"},
- {"/dev/sdcp13", BRACK(FH_SDCP | 13), "\\Device\\Harddisk93\\Partition13"},
- {"/dev/sdcp14", BRACK(FH_SDCP | 14), "\\Device\\Harddisk93\\Partition14"},
- {"/dev/sdcp15", BRACK(FH_SDCP | 15), "\\Device\\Harddisk93\\Partition15"},
- {"/dev/sdcq1", BRACK(FH_SDCQ | 1), "\\Device\\Harddisk94\\Partition1"},
- {"/dev/sdcq2", BRACK(FH_SDCQ | 2), "\\Device\\Harddisk94\\Partition2"},
- {"/dev/sdcq3", BRACK(FH_SDCQ | 3), "\\Device\\Harddisk94\\Partition3"},
- {"/dev/sdcq4", BRACK(FH_SDCQ | 4), "\\Device\\Harddisk94\\Partition4"},
- {"/dev/sdcq5", BRACK(FH_SDCQ | 5), "\\Device\\Harddisk94\\Partition5"},
- {"/dev/sdcq6", BRACK(FH_SDCQ | 6), "\\Device\\Harddisk94\\Partition6"},
- {"/dev/sdcq7", BRACK(FH_SDCQ | 7), "\\Device\\Harddisk94\\Partition7"},
- {"/dev/sdcq8", BRACK(FH_SDCQ | 8), "\\Device\\Harddisk94\\Partition8"},
- {"/dev/sdcq9", BRACK(FH_SDCQ | 9), "\\Device\\Harddisk94\\Partition9"},
- {"/dev/sdcq10", BRACK(FH_SDCQ | 10), "\\Device\\Harddisk94\\Partition10"},
- {"/dev/sdcq11", BRACK(FH_SDCQ | 11), "\\Device\\Harddisk94\\Partition11"},
- {"/dev/sdcq12", BRACK(FH_SDCQ | 12), "\\Device\\Harddisk94\\Partition12"},
- {"/dev/sdcq13", BRACK(FH_SDCQ | 13), "\\Device\\Harddisk94\\Partition13"},
- {"/dev/sdcq14", BRACK(FH_SDCQ | 14), "\\Device\\Harddisk94\\Partition14"},
- {"/dev/sdcq15", BRACK(FH_SDCQ | 15), "\\Device\\Harddisk94\\Partition15"},
- {"/dev/sdcr1", BRACK(FH_SDCR | 1), "\\Device\\Harddisk95\\Partition1"},
- {"/dev/sdcr2", BRACK(FH_SDCR | 2), "\\Device\\Harddisk95\\Partition2"},
- {"/dev/sdcr3", BRACK(FH_SDCR | 3), "\\Device\\Harddisk95\\Partition3"},
- {"/dev/sdcr4", BRACK(FH_SDCR | 4), "\\Device\\Harddisk95\\Partition4"},
- {"/dev/sdcr5", BRACK(FH_SDCR | 5), "\\Device\\Harddisk95\\Partition5"},
- {"/dev/sdcr6", BRACK(FH_SDCR | 6), "\\Device\\Harddisk95\\Partition6"},
- {"/dev/sdcr7", BRACK(FH_SDCR | 7), "\\Device\\Harddisk95\\Partition7"},
- {"/dev/sdcr8", BRACK(FH_SDCR | 8), "\\Device\\Harddisk95\\Partition8"},
- {"/dev/sdcr9", BRACK(FH_SDCR | 9), "\\Device\\Harddisk95\\Partition9"},
- {"/dev/sdcr10", BRACK(FH_SDCR | 10), "\\Device\\Harddisk95\\Partition10"},
- {"/dev/sdcr11", BRACK(FH_SDCR | 11), "\\Device\\Harddisk95\\Partition11"},
- {"/dev/sdcr12", BRACK(FH_SDCR | 12), "\\Device\\Harddisk95\\Partition12"},
- {"/dev/sdcr13", BRACK(FH_SDCR | 13), "\\Device\\Harddisk95\\Partition13"},
- {"/dev/sdcr14", BRACK(FH_SDCR | 14), "\\Device\\Harddisk95\\Partition14"},
- {"/dev/sdcr15", BRACK(FH_SDCR | 15), "\\Device\\Harddisk95\\Partition15"},
- {"/dev/sdcs1", BRACK(FH_SDCS | 1), "\\Device\\Harddisk96\\Partition1"},
- {"/dev/sdcs2", BRACK(FH_SDCS | 2), "\\Device\\Harddisk96\\Partition2"},
- {"/dev/sdcs3", BRACK(FH_SDCS | 3), "\\Device\\Harddisk96\\Partition3"},
- {"/dev/sdcs4", BRACK(FH_SDCS | 4), "\\Device\\Harddisk96\\Partition4"},
- {"/dev/sdcs5", BRACK(FH_SDCS | 5), "\\Device\\Harddisk96\\Partition5"},
- {"/dev/sdcs6", BRACK(FH_SDCS | 6), "\\Device\\Harddisk96\\Partition6"},
- {"/dev/sdcs7", BRACK(FH_SDCS | 7), "\\Device\\Harddisk96\\Partition7"},
- {"/dev/sdcs8", BRACK(FH_SDCS | 8), "\\Device\\Harddisk96\\Partition8"},
- {"/dev/sdcs9", BRACK(FH_SDCS | 9), "\\Device\\Harddisk96\\Partition9"},
- {"/dev/sdcs10", BRACK(FH_SDCS | 10), "\\Device\\Harddisk96\\Partition10"},
- {"/dev/sdcs11", BRACK(FH_SDCS | 11), "\\Device\\Harddisk96\\Partition11"},
- {"/dev/sdcs12", BRACK(FH_SDCS | 12), "\\Device\\Harddisk96\\Partition12"},
- {"/dev/sdcs13", BRACK(FH_SDCS | 13), "\\Device\\Harddisk96\\Partition13"},
- {"/dev/sdcs14", BRACK(FH_SDCS | 14), "\\Device\\Harddisk96\\Partition14"},
- {"/dev/sdcs15", BRACK(FH_SDCS | 15), "\\Device\\Harddisk96\\Partition15"},
- {"/dev/sdct1", BRACK(FH_SDCT | 1), "\\Device\\Harddisk97\\Partition1"},
- {"/dev/sdct2", BRACK(FH_SDCT | 2), "\\Device\\Harddisk97\\Partition2"},
- {"/dev/sdct3", BRACK(FH_SDCT | 3), "\\Device\\Harddisk97\\Partition3"},
- {"/dev/sdct4", BRACK(FH_SDCT | 4), "\\Device\\Harddisk97\\Partition4"},
- {"/dev/sdct5", BRACK(FH_SDCT | 5), "\\Device\\Harddisk97\\Partition5"},
- {"/dev/sdct6", BRACK(FH_SDCT | 6), "\\Device\\Harddisk97\\Partition6"},
- {"/dev/sdct7", BRACK(FH_SDCT | 7), "\\Device\\Harddisk97\\Partition7"},
- {"/dev/sdct8", BRACK(FH_SDCT | 8), "\\Device\\Harddisk97\\Partition8"},
- {"/dev/sdct9", BRACK(FH_SDCT | 9), "\\Device\\Harddisk97\\Partition9"},
- {"/dev/sdct10", BRACK(FH_SDCT | 10), "\\Device\\Harddisk97\\Partition10"},
- {"/dev/sdct11", BRACK(FH_SDCT | 11), "\\Device\\Harddisk97\\Partition11"},
- {"/dev/sdct12", BRACK(FH_SDCT | 12), "\\Device\\Harddisk97\\Partition12"},
- {"/dev/sdct13", BRACK(FH_SDCT | 13), "\\Device\\Harddisk97\\Partition13"},
- {"/dev/sdct14", BRACK(FH_SDCT | 14), "\\Device\\Harddisk97\\Partition14"},
- {"/dev/sdct15", BRACK(FH_SDCT | 15), "\\Device\\Harddisk97\\Partition15"},
- {"/dev/sdcu1", BRACK(FH_SDCU | 1), "\\Device\\Harddisk98\\Partition1"},
- {"/dev/sdcu2", BRACK(FH_SDCU | 2), "\\Device\\Harddisk98\\Partition2"},
- {"/dev/sdcu3", BRACK(FH_SDCU | 3), "\\Device\\Harddisk98\\Partition3"},
- {"/dev/sdcu4", BRACK(FH_SDCU | 4), "\\Device\\Harddisk98\\Partition4"},
- {"/dev/sdcu5", BRACK(FH_SDCU | 5), "\\Device\\Harddisk98\\Partition5"},
- {"/dev/sdcu6", BRACK(FH_SDCU | 6), "\\Device\\Harddisk98\\Partition6"},
- {"/dev/sdcu7", BRACK(FH_SDCU | 7), "\\Device\\Harddisk98\\Partition7"},
- {"/dev/sdcu8", BRACK(FH_SDCU | 8), "\\Device\\Harddisk98\\Partition8"},
- {"/dev/sdcu9", BRACK(FH_SDCU | 9), "\\Device\\Harddisk98\\Partition9"},
- {"/dev/sdcu10", BRACK(FH_SDCU | 10), "\\Device\\Harddisk98\\Partition10"},
- {"/dev/sdcu11", BRACK(FH_SDCU | 11), "\\Device\\Harddisk98\\Partition11"},
- {"/dev/sdcu12", BRACK(FH_SDCU | 12), "\\Device\\Harddisk98\\Partition12"},
- {"/dev/sdcu13", BRACK(FH_SDCU | 13), "\\Device\\Harddisk98\\Partition13"},
- {"/dev/sdcu14", BRACK(FH_SDCU | 14), "\\Device\\Harddisk98\\Partition14"},
- {"/dev/sdcu15", BRACK(FH_SDCU | 15), "\\Device\\Harddisk98\\Partition15"},
- {"/dev/sdcv1", BRACK(FH_SDCV | 1), "\\Device\\Harddisk99\\Partition1"},
- {"/dev/sdcv2", BRACK(FH_SDCV | 2), "\\Device\\Harddisk99\\Partition2"},
- {"/dev/sdcv3", BRACK(FH_SDCV | 3), "\\Device\\Harddisk99\\Partition3"},
- {"/dev/sdcv4", BRACK(FH_SDCV | 4), "\\Device\\Harddisk99\\Partition4"},
- {"/dev/sdcv5", BRACK(FH_SDCV | 5), "\\Device\\Harddisk99\\Partition5"},
- {"/dev/sdcv6", BRACK(FH_SDCV | 6), "\\Device\\Harddisk99\\Partition6"},
- {"/dev/sdcv7", BRACK(FH_SDCV | 7), "\\Device\\Harddisk99\\Partition7"},
- {"/dev/sdcv8", BRACK(FH_SDCV | 8), "\\Device\\Harddisk99\\Partition8"},
- {"/dev/sdcv9", BRACK(FH_SDCV | 9), "\\Device\\Harddisk99\\Partition9"},
- {"/dev/sdcv10", BRACK(FH_SDCV | 10), "\\Device\\Harddisk99\\Partition10"},
- {"/dev/sdcv11", BRACK(FH_SDCV | 11), "\\Device\\Harddisk99\\Partition11"},
- {"/dev/sdcv12", BRACK(FH_SDCV | 12), "\\Device\\Harddisk99\\Partition12"},
- {"/dev/sdcv13", BRACK(FH_SDCV | 13), "\\Device\\Harddisk99\\Partition13"},
- {"/dev/sdcv14", BRACK(FH_SDCV | 14), "\\Device\\Harddisk99\\Partition14"},
- {"/dev/sdcv15", BRACK(FH_SDCV | 15), "\\Device\\Harddisk99\\Partition15"},
- {"/dev/sdcw1", BRACK(FH_SDCW | 1), "\\Device\\Harddisk100\\Partition1"},
- {"/dev/sdcw2", BRACK(FH_SDCW | 2), "\\Device\\Harddisk100\\Partition2"},
- {"/dev/sdcw3", BRACK(FH_SDCW | 3), "\\Device\\Harddisk100\\Partition3"},
- {"/dev/sdcw4", BRACK(FH_SDCW | 4), "\\Device\\Harddisk100\\Partition4"},
- {"/dev/sdcw5", BRACK(FH_SDCW | 5), "\\Device\\Harddisk100\\Partition5"},
- {"/dev/sdcw6", BRACK(FH_SDCW | 6), "\\Device\\Harddisk100\\Partition6"},
- {"/dev/sdcw7", BRACK(FH_SDCW | 7), "\\Device\\Harddisk100\\Partition7"},
- {"/dev/sdcw8", BRACK(FH_SDCW | 8), "\\Device\\Harddisk100\\Partition8"},
- {"/dev/sdcw9", BRACK(FH_SDCW | 9), "\\Device\\Harddisk100\\Partition9"},
- {"/dev/sdcw10", BRACK(FH_SDCW | 10), "\\Device\\Harddisk100\\Partition10"},
- {"/dev/sdcw11", BRACK(FH_SDCW | 11), "\\Device\\Harddisk100\\Partition11"},
- {"/dev/sdcw12", BRACK(FH_SDCW | 12), "\\Device\\Harddisk100\\Partition12"},
- {"/dev/sdcw13", BRACK(FH_SDCW | 13), "\\Device\\Harddisk100\\Partition13"},
- {"/dev/sdcw14", BRACK(FH_SDCW | 14), "\\Device\\Harddisk100\\Partition14"},
- {"/dev/sdcw15", BRACK(FH_SDCW | 15), "\\Device\\Harddisk100\\Partition15"},
- {"/dev/sdcx1", BRACK(FH_SDCX | 1), "\\Device\\Harddisk101\\Partition1"},
- {"/dev/sdcx2", BRACK(FH_SDCX | 2), "\\Device\\Harddisk101\\Partition2"},
- {"/dev/sdcx3", BRACK(FH_SDCX | 3), "\\Device\\Harddisk101\\Partition3"},
- {"/dev/sdcx4", BRACK(FH_SDCX | 4), "\\Device\\Harddisk101\\Partition4"},
- {"/dev/sdcx5", BRACK(FH_SDCX | 5), "\\Device\\Harddisk101\\Partition5"},
- {"/dev/sdcx6", BRACK(FH_SDCX | 6), "\\Device\\Harddisk101\\Partition6"},
- {"/dev/sdcx7", BRACK(FH_SDCX | 7), "\\Device\\Harddisk101\\Partition7"},
- {"/dev/sdcx8", BRACK(FH_SDCX | 8), "\\Device\\Harddisk101\\Partition8"},
- {"/dev/sdcx9", BRACK(FH_SDCX | 9), "\\Device\\Harddisk101\\Partition9"},
- {"/dev/sdcx10", BRACK(FH_SDCX | 10), "\\Device\\Harddisk101\\Partition10"},
- {"/dev/sdcx11", BRACK(FH_SDCX | 11), "\\Device\\Harddisk101\\Partition11"},
- {"/dev/sdcx12", BRACK(FH_SDCX | 12), "\\Device\\Harddisk101\\Partition12"},
- {"/dev/sdcx13", BRACK(FH_SDCX | 13), "\\Device\\Harddisk101\\Partition13"},
- {"/dev/sdcx14", BRACK(FH_SDCX | 14), "\\Device\\Harddisk101\\Partition14"},
- {"/dev/sdcx15", BRACK(FH_SDCX | 15), "\\Device\\Harddisk101\\Partition15"},
- {"/dev/sdcy1", BRACK(FH_SDCY | 1), "\\Device\\Harddisk102\\Partition1"},
- {"/dev/sdcy2", BRACK(FH_SDCY | 2), "\\Device\\Harddisk102\\Partition2"},
- {"/dev/sdcy3", BRACK(FH_SDCY | 3), "\\Device\\Harddisk102\\Partition3"},
- {"/dev/sdcy4", BRACK(FH_SDCY | 4), "\\Device\\Harddisk102\\Partition4"},
- {"/dev/sdcy5", BRACK(FH_SDCY | 5), "\\Device\\Harddisk102\\Partition5"},
- {"/dev/sdcy6", BRACK(FH_SDCY | 6), "\\Device\\Harddisk102\\Partition6"},
- {"/dev/sdcy7", BRACK(FH_SDCY | 7), "\\Device\\Harddisk102\\Partition7"},
- {"/dev/sdcy8", BRACK(FH_SDCY | 8), "\\Device\\Harddisk102\\Partition8"},
- {"/dev/sdcy9", BRACK(FH_SDCY | 9), "\\Device\\Harddisk102\\Partition9"},
- {"/dev/sdcy10", BRACK(FH_SDCY | 10), "\\Device\\Harddisk102\\Partition10"},
- {"/dev/sdcy11", BRACK(FH_SDCY | 11), "\\Device\\Harddisk102\\Partition11"},
- {"/dev/sdcy12", BRACK(FH_SDCY | 12), "\\Device\\Harddisk102\\Partition12"},
- {"/dev/sdcy13", BRACK(FH_SDCY | 13), "\\Device\\Harddisk102\\Partition13"},
- {"/dev/sdcy14", BRACK(FH_SDCY | 14), "\\Device\\Harddisk102\\Partition14"},
- {"/dev/sdcy15", BRACK(FH_SDCY | 15), "\\Device\\Harddisk102\\Partition15"},
- {"/dev/sdcz1", BRACK(FH_SDCZ | 1), "\\Device\\Harddisk103\\Partition1"},
- {"/dev/sdcz2", BRACK(FH_SDCZ | 2), "\\Device\\Harddisk103\\Partition2"},
- {"/dev/sdcz3", BRACK(FH_SDCZ | 3), "\\Device\\Harddisk103\\Partition3"},
- {"/dev/sdcz4", BRACK(FH_SDCZ | 4), "\\Device\\Harddisk103\\Partition4"},
- {"/dev/sdcz5", BRACK(FH_SDCZ | 5), "\\Device\\Harddisk103\\Partition5"},
- {"/dev/sdcz6", BRACK(FH_SDCZ | 6), "\\Device\\Harddisk103\\Partition6"},
- {"/dev/sdcz7", BRACK(FH_SDCZ | 7), "\\Device\\Harddisk103\\Partition7"},
- {"/dev/sdcz8", BRACK(FH_SDCZ | 8), "\\Device\\Harddisk103\\Partition8"},
- {"/dev/sdcz9", BRACK(FH_SDCZ | 9), "\\Device\\Harddisk103\\Partition9"},
- {"/dev/sdcz10", BRACK(FH_SDCZ | 10), "\\Device\\Harddisk103\\Partition10"},
- {"/dev/sdcz11", BRACK(FH_SDCZ | 11), "\\Device\\Harddisk103\\Partition11"},
- {"/dev/sdcz12", BRACK(FH_SDCZ | 12), "\\Device\\Harddisk103\\Partition12"},
- {"/dev/sdcz13", BRACK(FH_SDCZ | 13), "\\Device\\Harddisk103\\Partition13"},
- {"/dev/sdcz14", BRACK(FH_SDCZ | 14), "\\Device\\Harddisk103\\Partition14"},
- {"/dev/sdcz15", BRACK(FH_SDCZ | 15), "\\Device\\Harddisk103\\Partition15"},
- {"/dev/sdda", BRACK(FH_SDDA), "\\Device\\Harddisk104\\Partition0"},
- {"/dev/sddb", BRACK(FH_SDDB), "\\Device\\Harddisk105\\Partition0"},
- {"/dev/sddc", BRACK(FH_SDDC), "\\Device\\Harddisk106\\Partition0"},
- {"/dev/sddd", BRACK(FH_SDDD), "\\Device\\Harddisk107\\Partition0"},
- {"/dev/sdde", BRACK(FH_SDDE), "\\Device\\Harddisk108\\Partition0"},
- {"/dev/sddf", BRACK(FH_SDDF), "\\Device\\Harddisk109\\Partition0"},
- {"/dev/sddg", BRACK(FH_SDDG), "\\Device\\Harddisk110\\Partition0"},
- {"/dev/sddh", BRACK(FH_SDDH), "\\Device\\Harddisk111\\Partition0"},
- {"/dev/sddi", BRACK(FH_SDDI), "\\Device\\Harddisk112\\Partition0"},
- {"/dev/sddj", BRACK(FH_SDDJ), "\\Device\\Harddisk113\\Partition0"},
- {"/dev/sddk", BRACK(FH_SDDK), "\\Device\\Harddisk114\\Partition0"},
- {"/dev/sddl", BRACK(FH_SDDL), "\\Device\\Harddisk115\\Partition0"},
- {"/dev/sddm", BRACK(FH_SDDM), "\\Device\\Harddisk116\\Partition0"},
- {"/dev/sddn", BRACK(FH_SDDN), "\\Device\\Harddisk117\\Partition0"},
- {"/dev/sddo", BRACK(FH_SDDO), "\\Device\\Harddisk118\\Partition0"},
- {"/dev/sddp", BRACK(FH_SDDP), "\\Device\\Harddisk119\\Partition0"},
- {"/dev/sddq", BRACK(FH_SDDQ), "\\Device\\Harddisk120\\Partition0"},
- {"/dev/sddr", BRACK(FH_SDDR), "\\Device\\Harddisk121\\Partition0"},
- {"/dev/sdds", BRACK(FH_SDDS), "\\Device\\Harddisk122\\Partition0"},
- {"/dev/sddt", BRACK(FH_SDDT), "\\Device\\Harddisk123\\Partition0"},
- {"/dev/sddu", BRACK(FH_SDDU), "\\Device\\Harddisk124\\Partition0"},
- {"/dev/sddv", BRACK(FH_SDDV), "\\Device\\Harddisk125\\Partition0"},
- {"/dev/sddw", BRACK(FH_SDDW), "\\Device\\Harddisk126\\Partition0"},
- {"/dev/sddx", BRACK(FH_SDDX), "\\Device\\Harddisk127\\Partition0"},
- {"/dev/sdda1", BRACK(FH_SDDA | 1), "\\Device\\Harddisk104\\Partition1"},
- {"/dev/sdda2", BRACK(FH_SDDA | 2), "\\Device\\Harddisk104\\Partition2"},
- {"/dev/sdda3", BRACK(FH_SDDA | 3), "\\Device\\Harddisk104\\Partition3"},
- {"/dev/sdda4", BRACK(FH_SDDA | 4), "\\Device\\Harddisk104\\Partition4"},
- {"/dev/sdda5", BRACK(FH_SDDA | 5), "\\Device\\Harddisk104\\Partition5"},
- {"/dev/sdda6", BRACK(FH_SDDA | 6), "\\Device\\Harddisk104\\Partition6"},
- {"/dev/sdda7", BRACK(FH_SDDA | 7), "\\Device\\Harddisk104\\Partition7"},
- {"/dev/sdda8", BRACK(FH_SDDA | 8), "\\Device\\Harddisk104\\Partition8"},
- {"/dev/sdda9", BRACK(FH_SDDA | 9), "\\Device\\Harddisk104\\Partition9"},
- {"/dev/sdda10", BRACK(FH_SDDA | 10), "\\Device\\Harddisk104\\Partition10"},
- {"/dev/sdda11", BRACK(FH_SDDA | 11), "\\Device\\Harddisk104\\Partition11"},
- {"/dev/sdda12", BRACK(FH_SDDA | 12), "\\Device\\Harddisk104\\Partition12"},
- {"/dev/sdda13", BRACK(FH_SDDA | 13), "\\Device\\Harddisk104\\Partition13"},
- {"/dev/sdda14", BRACK(FH_SDDA | 14), "\\Device\\Harddisk104\\Partition14"},
- {"/dev/sdda15", BRACK(FH_SDDA | 15), "\\Device\\Harddisk104\\Partition15"},
- {"/dev/sddb1", BRACK(FH_SDDB | 1), "\\Device\\Harddisk105\\Partition1"},
- {"/dev/sddb2", BRACK(FH_SDDB | 2), "\\Device\\Harddisk105\\Partition2"},
- {"/dev/sddb3", BRACK(FH_SDDB | 3), "\\Device\\Harddisk105\\Partition3"},
- {"/dev/sddb4", BRACK(FH_SDDB | 4), "\\Device\\Harddisk105\\Partition4"},
- {"/dev/sddb5", BRACK(FH_SDDB | 5), "\\Device\\Harddisk105\\Partition5"},
- {"/dev/sddb6", BRACK(FH_SDDB | 6), "\\Device\\Harddisk105\\Partition6"},
- {"/dev/sddb7", BRACK(FH_SDDB | 7), "\\Device\\Harddisk105\\Partition7"},
- {"/dev/sddb8", BRACK(FH_SDDB | 8), "\\Device\\Harddisk105\\Partition8"},
- {"/dev/sddb9", BRACK(FH_SDDB | 9), "\\Device\\Harddisk105\\Partition9"},
- {"/dev/sddb10", BRACK(FH_SDDB | 10), "\\Device\\Harddisk105\\Partition10"},
- {"/dev/sddb11", BRACK(FH_SDDB | 11), "\\Device\\Harddisk105\\Partition11"},
- {"/dev/sddb12", BRACK(FH_SDDB | 12), "\\Device\\Harddisk105\\Partition12"},
- {"/dev/sddb13", BRACK(FH_SDDB | 13), "\\Device\\Harddisk105\\Partition13"},
- {"/dev/sddb14", BRACK(FH_SDDB | 14), "\\Device\\Harddisk105\\Partition14"},
- {"/dev/sddb15", BRACK(FH_SDDB | 15), "\\Device\\Harddisk105\\Partition15"},
- {"/dev/sddc1", BRACK(FH_SDDC | 1), "\\Device\\Harddisk106\\Partition1"},
- {"/dev/sddc2", BRACK(FH_SDDC | 2), "\\Device\\Harddisk106\\Partition2"},
- {"/dev/sddc3", BRACK(FH_SDDC | 3), "\\Device\\Harddisk106\\Partition3"},
- {"/dev/sddc4", BRACK(FH_SDDC | 4), "\\Device\\Harddisk106\\Partition4"},
- {"/dev/sddc5", BRACK(FH_SDDC | 5), "\\Device\\Harddisk106\\Partition5"},
- {"/dev/sddc6", BRACK(FH_SDDC | 6), "\\Device\\Harddisk106\\Partition6"},
- {"/dev/sddc7", BRACK(FH_SDDC | 7), "\\Device\\Harddisk106\\Partition7"},
- {"/dev/sddc8", BRACK(FH_SDDC | 8), "\\Device\\Harddisk106\\Partition8"},
- {"/dev/sddc9", BRACK(FH_SDDC | 9), "\\Device\\Harddisk106\\Partition9"},
- {"/dev/sddc10", BRACK(FH_SDDC | 10), "\\Device\\Harddisk106\\Partition10"},
- {"/dev/sddc11", BRACK(FH_SDDC | 11), "\\Device\\Harddisk106\\Partition11"},
- {"/dev/sddc12", BRACK(FH_SDDC | 12), "\\Device\\Harddisk106\\Partition12"},
- {"/dev/sddc13", BRACK(FH_SDDC | 13), "\\Device\\Harddisk106\\Partition13"},
- {"/dev/sddc14", BRACK(FH_SDDC | 14), "\\Device\\Harddisk106\\Partition14"},
- {"/dev/sddc15", BRACK(FH_SDDC | 15), "\\Device\\Harddisk106\\Partition15"},
- {"/dev/sddd1", BRACK(FH_SDDD | 1), "\\Device\\Harddisk107\\Partition1"},
- {"/dev/sddd2", BRACK(FH_SDDD | 2), "\\Device\\Harddisk107\\Partition2"},
- {"/dev/sddd3", BRACK(FH_SDDD | 3), "\\Device\\Harddisk107\\Partition3"},
- {"/dev/sddd4", BRACK(FH_SDDD | 4), "\\Device\\Harddisk107\\Partition4"},
- {"/dev/sddd5", BRACK(FH_SDDD | 5), "\\Device\\Harddisk107\\Partition5"},
- {"/dev/sddd6", BRACK(FH_SDDD | 6), "\\Device\\Harddisk107\\Partition6"},
- {"/dev/sddd7", BRACK(FH_SDDD | 7), "\\Device\\Harddisk107\\Partition7"},
- {"/dev/sddd8", BRACK(FH_SDDD | 8), "\\Device\\Harddisk107\\Partition8"},
- {"/dev/sddd9", BRACK(FH_SDDD | 9), "\\Device\\Harddisk107\\Partition9"},
- {"/dev/sddd10", BRACK(FH_SDDD | 10), "\\Device\\Harddisk107\\Partition10"},
- {"/dev/sddd11", BRACK(FH_SDDD | 11), "\\Device\\Harddisk107\\Partition11"},
- {"/dev/sddd12", BRACK(FH_SDDD | 12), "\\Device\\Harddisk107\\Partition12"},
- {"/dev/sddd13", BRACK(FH_SDDD | 13), "\\Device\\Harddisk107\\Partition13"},
- {"/dev/sddd14", BRACK(FH_SDDD | 14), "\\Device\\Harddisk107\\Partition14"},
- {"/dev/sddd15", BRACK(FH_SDDD | 15), "\\Device\\Harddisk107\\Partition15"},
- {"/dev/sdde1", BRACK(FH_SDDE | 1), "\\Device\\Harddisk108\\Partition1"},
- {"/dev/sdde2", BRACK(FH_SDDE | 2), "\\Device\\Harddisk108\\Partition2"},
- {"/dev/sdde3", BRACK(FH_SDDE | 3), "\\Device\\Harddisk108\\Partition3"},
- {"/dev/sdde4", BRACK(FH_SDDE | 4), "\\Device\\Harddisk108\\Partition4"},
- {"/dev/sdde5", BRACK(FH_SDDE | 5), "\\Device\\Harddisk108\\Partition5"},
- {"/dev/sdde6", BRACK(FH_SDDE | 6), "\\Device\\Harddisk108\\Partition6"},
- {"/dev/sdde7", BRACK(FH_SDDE | 7), "\\Device\\Harddisk108\\Partition7"},
- {"/dev/sdde8", BRACK(FH_SDDE | 8), "\\Device\\Harddisk108\\Partition8"},
- {"/dev/sdde9", BRACK(FH_SDDE | 9), "\\Device\\Harddisk108\\Partition9"},
- {"/dev/sdde10", BRACK(FH_SDDE | 10), "\\Device\\Harddisk108\\Partition10"},
- {"/dev/sdde11", BRACK(FH_SDDE | 11), "\\Device\\Harddisk108\\Partition11"},
- {"/dev/sdde12", BRACK(FH_SDDE | 12), "\\Device\\Harddisk108\\Partition12"},
- {"/dev/sdde13", BRACK(FH_SDDE | 13), "\\Device\\Harddisk108\\Partition13"},
- {"/dev/sdde14", BRACK(FH_SDDE | 14), "\\Device\\Harddisk108\\Partition14"},
- {"/dev/sdde15", BRACK(FH_SDDE | 15), "\\Device\\Harddisk108\\Partition15"},
- {"/dev/sddf1", BRACK(FH_SDDF | 1), "\\Device\\Harddisk109\\Partition1"},
- {"/dev/sddf2", BRACK(FH_SDDF | 2), "\\Device\\Harddisk109\\Partition2"},
- {"/dev/sddf3", BRACK(FH_SDDF | 3), "\\Device\\Harddisk109\\Partition3"},
- {"/dev/sddf4", BRACK(FH_SDDF | 4), "\\Device\\Harddisk109\\Partition4"},
- {"/dev/sddf5", BRACK(FH_SDDF | 5), "\\Device\\Harddisk109\\Partition5"},
- {"/dev/sddf6", BRACK(FH_SDDF | 6), "\\Device\\Harddisk109\\Partition6"},
- {"/dev/sddf7", BRACK(FH_SDDF | 7), "\\Device\\Harddisk109\\Partition7"},
- {"/dev/sddf8", BRACK(FH_SDDF | 8), "\\Device\\Harddisk109\\Partition8"},
- {"/dev/sddf9", BRACK(FH_SDDF | 9), "\\Device\\Harddisk109\\Partition9"},
- {"/dev/sddf10", BRACK(FH_SDDF | 10), "\\Device\\Harddisk109\\Partition10"},
- {"/dev/sddf11", BRACK(FH_SDDF | 11), "\\Device\\Harddisk109\\Partition11"},
- {"/dev/sddf12", BRACK(FH_SDDF | 12), "\\Device\\Harddisk109\\Partition12"},
- {"/dev/sddf13", BRACK(FH_SDDF | 13), "\\Device\\Harddisk109\\Partition13"},
- {"/dev/sddf14", BRACK(FH_SDDF | 14), "\\Device\\Harddisk109\\Partition14"},
- {"/dev/sddf15", BRACK(FH_SDDF | 15), "\\Device\\Harddisk109\\Partition15"},
- {"/dev/sddg1", BRACK(FH_SDDG | 1), "\\Device\\Harddisk110\\Partition1"},
- {"/dev/sddg2", BRACK(FH_SDDG | 2), "\\Device\\Harddisk110\\Partition2"},
- {"/dev/sddg3", BRACK(FH_SDDG | 3), "\\Device\\Harddisk110\\Partition3"},
- {"/dev/sddg4", BRACK(FH_SDDG | 4), "\\Device\\Harddisk110\\Partition4"},
- {"/dev/sddg5", BRACK(FH_SDDG | 5), "\\Device\\Harddisk110\\Partition5"},
- {"/dev/sddg6", BRACK(FH_SDDG | 6), "\\Device\\Harddisk110\\Partition6"},
- {"/dev/sddg7", BRACK(FH_SDDG | 7), "\\Device\\Harddisk110\\Partition7"},
- {"/dev/sddg8", BRACK(FH_SDDG | 8), "\\Device\\Harddisk110\\Partition8"},
- {"/dev/sddg9", BRACK(FH_SDDG | 9), "\\Device\\Harddisk110\\Partition9"},
- {"/dev/sddg10", BRACK(FH_SDDG | 10), "\\Device\\Harddisk110\\Partition10"},
- {"/dev/sddg11", BRACK(FH_SDDG | 11), "\\Device\\Harddisk110\\Partition11"},
- {"/dev/sddg12", BRACK(FH_SDDG | 12), "\\Device\\Harddisk110\\Partition12"},
- {"/dev/sddg13", BRACK(FH_SDDG | 13), "\\Device\\Harddisk110\\Partition13"},
- {"/dev/sddg14", BRACK(FH_SDDG | 14), "\\Device\\Harddisk110\\Partition14"},
- {"/dev/sddg15", BRACK(FH_SDDG | 15), "\\Device\\Harddisk110\\Partition15"},
- {"/dev/sddh1", BRACK(FH_SDDH | 1), "\\Device\\Harddisk111\\Partition1"},
- {"/dev/sddh2", BRACK(FH_SDDH | 2), "\\Device\\Harddisk111\\Partition2"},
- {"/dev/sddh3", BRACK(FH_SDDH | 3), "\\Device\\Harddisk111\\Partition3"},
- {"/dev/sddh4", BRACK(FH_SDDH | 4), "\\Device\\Harddisk111\\Partition4"},
- {"/dev/sddh5", BRACK(FH_SDDH | 5), "\\Device\\Harddisk111\\Partition5"},
- {"/dev/sddh6", BRACK(FH_SDDH | 6), "\\Device\\Harddisk111\\Partition6"},
- {"/dev/sddh7", BRACK(FH_SDDH | 7), "\\Device\\Harddisk111\\Partition7"},
- {"/dev/sddh8", BRACK(FH_SDDH | 8), "\\Device\\Harddisk111\\Partition8"},
- {"/dev/sddh9", BRACK(FH_SDDH | 9), "\\Device\\Harddisk111\\Partition9"},
- {"/dev/sddh10", BRACK(FH_SDDH | 10), "\\Device\\Harddisk111\\Partition10"},
- {"/dev/sddh11", BRACK(FH_SDDH | 11), "\\Device\\Harddisk111\\Partition11"},
- {"/dev/sddh12", BRACK(FH_SDDH | 12), "\\Device\\Harddisk111\\Partition12"},
- {"/dev/sddh13", BRACK(FH_SDDH | 13), "\\Device\\Harddisk111\\Partition13"},
- {"/dev/sddh14", BRACK(FH_SDDH | 14), "\\Device\\Harddisk111\\Partition14"},
- {"/dev/sddh15", BRACK(FH_SDDH | 15), "\\Device\\Harddisk111\\Partition15"},
- {"/dev/sddi1", BRACK(FH_SDDI | 1), "\\Device\\Harddisk112\\Partition1"},
- {"/dev/sddi2", BRACK(FH_SDDI | 2), "\\Device\\Harddisk112\\Partition2"},
- {"/dev/sddi3", BRACK(FH_SDDI | 3), "\\Device\\Harddisk112\\Partition3"},
- {"/dev/sddi4", BRACK(FH_SDDI | 4), "\\Device\\Harddisk112\\Partition4"},
- {"/dev/sddi5", BRACK(FH_SDDI | 5), "\\Device\\Harddisk112\\Partition5"},
- {"/dev/sddi6", BRACK(FH_SDDI | 6), "\\Device\\Harddisk112\\Partition6"},
- {"/dev/sddi7", BRACK(FH_SDDI | 7), "\\Device\\Harddisk112\\Partition7"},
- {"/dev/sddi8", BRACK(FH_SDDI | 8), "\\Device\\Harddisk112\\Partition8"},
- {"/dev/sddi9", BRACK(FH_SDDI | 9), "\\Device\\Harddisk112\\Partition9"},
- {"/dev/sddi10", BRACK(FH_SDDI | 10), "\\Device\\Harddisk112\\Partition10"},
- {"/dev/sddi11", BRACK(FH_SDDI | 11), "\\Device\\Harddisk112\\Partition11"},
- {"/dev/sddi12", BRACK(FH_SDDI | 12), "\\Device\\Harddisk112\\Partition12"},
- {"/dev/sddi13", BRACK(FH_SDDI | 13), "\\Device\\Harddisk112\\Partition13"},
- {"/dev/sddi14", BRACK(FH_SDDI | 14), "\\Device\\Harddisk112\\Partition14"},
- {"/dev/sddi15", BRACK(FH_SDDI | 15), "\\Device\\Harddisk112\\Partition15"},
- {"/dev/sddj1", BRACK(FH_SDDJ | 1), "\\Device\\Harddisk113\\Partition1"},
- {"/dev/sddj2", BRACK(FH_SDDJ | 2), "\\Device\\Harddisk113\\Partition2"},
- {"/dev/sddj3", BRACK(FH_SDDJ | 3), "\\Device\\Harddisk113\\Partition3"},
- {"/dev/sddj4", BRACK(FH_SDDJ | 4), "\\Device\\Harddisk113\\Partition4"},
- {"/dev/sddj5", BRACK(FH_SDDJ | 5), "\\Device\\Harddisk113\\Partition5"},
- {"/dev/sddj6", BRACK(FH_SDDJ | 6), "\\Device\\Harddisk113\\Partition6"},
- {"/dev/sddj7", BRACK(FH_SDDJ | 7), "\\Device\\Harddisk113\\Partition7"},
- {"/dev/sddj8", BRACK(FH_SDDJ | 8), "\\Device\\Harddisk113\\Partition8"},
- {"/dev/sddj9", BRACK(FH_SDDJ | 9), "\\Device\\Harddisk113\\Partition9"},
- {"/dev/sddj10", BRACK(FH_SDDJ | 10), "\\Device\\Harddisk113\\Partition10"},
- {"/dev/sddj11", BRACK(FH_SDDJ | 11), "\\Device\\Harddisk113\\Partition11"},
- {"/dev/sddj12", BRACK(FH_SDDJ | 12), "\\Device\\Harddisk113\\Partition12"},
- {"/dev/sddj13", BRACK(FH_SDDJ | 13), "\\Device\\Harddisk113\\Partition13"},
- {"/dev/sddj14", BRACK(FH_SDDJ | 14), "\\Device\\Harddisk113\\Partition14"},
- {"/dev/sddj15", BRACK(FH_SDDJ | 15), "\\Device\\Harddisk113\\Partition15"},
- {"/dev/sddk1", BRACK(FH_SDDK | 1), "\\Device\\Harddisk114\\Partition1"},
- {"/dev/sddk2", BRACK(FH_SDDK | 2), "\\Device\\Harddisk114\\Partition2"},
- {"/dev/sddk3", BRACK(FH_SDDK | 3), "\\Device\\Harddisk114\\Partition3"},
- {"/dev/sddk4", BRACK(FH_SDDK | 4), "\\Device\\Harddisk114\\Partition4"},
- {"/dev/sddk5", BRACK(FH_SDDK | 5), "\\Device\\Harddisk114\\Partition5"},
- {"/dev/sddk6", BRACK(FH_SDDK | 6), "\\Device\\Harddisk114\\Partition6"},
- {"/dev/sddk7", BRACK(FH_SDDK | 7), "\\Device\\Harddisk114\\Partition7"},
- {"/dev/sddk8", BRACK(FH_SDDK | 8), "\\Device\\Harddisk114\\Partition8"},
- {"/dev/sddk9", BRACK(FH_SDDK | 9), "\\Device\\Harddisk114\\Partition9"},
- {"/dev/sddk10", BRACK(FH_SDDK | 10), "\\Device\\Harddisk114\\Partition10"},
- {"/dev/sddk11", BRACK(FH_SDDK | 11), "\\Device\\Harddisk114\\Partition11"},
- {"/dev/sddk12", BRACK(FH_SDDK | 12), "\\Device\\Harddisk114\\Partition12"},
- {"/dev/sddk13", BRACK(FH_SDDK | 13), "\\Device\\Harddisk114\\Partition13"},
- {"/dev/sddk14", BRACK(FH_SDDK | 14), "\\Device\\Harddisk114\\Partition14"},
- {"/dev/sddk15", BRACK(FH_SDDK | 15), "\\Device\\Harddisk114\\Partition15"},
- {"/dev/sddl1", BRACK(FH_SDDL | 1), "\\Device\\Harddisk115\\Partition1"},
- {"/dev/sddl2", BRACK(FH_SDDL | 2), "\\Device\\Harddisk115\\Partition2"},
- {"/dev/sddl3", BRACK(FH_SDDL | 3), "\\Device\\Harddisk115\\Partition3"},
- {"/dev/sddl4", BRACK(FH_SDDL | 4), "\\Device\\Harddisk115\\Partition4"},
- {"/dev/sddl5", BRACK(FH_SDDL | 5), "\\Device\\Harddisk115\\Partition5"},
- {"/dev/sddl6", BRACK(FH_SDDL | 6), "\\Device\\Harddisk115\\Partition6"},
- {"/dev/sddl7", BRACK(FH_SDDL | 7), "\\Device\\Harddisk115\\Partition7"},
- {"/dev/sddl8", BRACK(FH_SDDL | 8), "\\Device\\Harddisk115\\Partition8"},
- {"/dev/sddl9", BRACK(FH_SDDL | 9), "\\Device\\Harddisk115\\Partition9"},
- {"/dev/sddl10", BRACK(FH_SDDL | 10), "\\Device\\Harddisk115\\Partition10"},
- {"/dev/sddl11", BRACK(FH_SDDL | 11), "\\Device\\Harddisk115\\Partition11"},
- {"/dev/sddl12", BRACK(FH_SDDL | 12), "\\Device\\Harddisk115\\Partition12"},
- {"/dev/sddl13", BRACK(FH_SDDL | 13), "\\Device\\Harddisk115\\Partition13"},
- {"/dev/sddl14", BRACK(FH_SDDL | 14), "\\Device\\Harddisk115\\Partition14"},
- {"/dev/sddl15", BRACK(FH_SDDL | 15), "\\Device\\Harddisk115\\Partition15"},
- {"/dev/sddm1", BRACK(FH_SDDM | 1), "\\Device\\Harddisk116\\Partition1"},
- {"/dev/sddm2", BRACK(FH_SDDM | 2), "\\Device\\Harddisk116\\Partition2"},
- {"/dev/sddm3", BRACK(FH_SDDM | 3), "\\Device\\Harddisk116\\Partition3"},
- {"/dev/sddm4", BRACK(FH_SDDM | 4), "\\Device\\Harddisk116\\Partition4"},
- {"/dev/sddm5", BRACK(FH_SDDM | 5), "\\Device\\Harddisk116\\Partition5"},
- {"/dev/sddm6", BRACK(FH_SDDM | 6), "\\Device\\Harddisk116\\Partition6"},
- {"/dev/sddm7", BRACK(FH_SDDM | 7), "\\Device\\Harddisk116\\Partition7"},
- {"/dev/sddm8", BRACK(FH_SDDM | 8), "\\Device\\Harddisk116\\Partition8"},
- {"/dev/sddm9", BRACK(FH_SDDM | 9), "\\Device\\Harddisk116\\Partition9"},
- {"/dev/sddm10", BRACK(FH_SDDM | 10), "\\Device\\Harddisk116\\Partition10"},
- {"/dev/sddm11", BRACK(FH_SDDM | 11), "\\Device\\Harddisk116\\Partition11"},
- {"/dev/sddm12", BRACK(FH_SDDM | 12), "\\Device\\Harddisk116\\Partition12"},
- {"/dev/sddm13", BRACK(FH_SDDM | 13), "\\Device\\Harddisk116\\Partition13"},
- {"/dev/sddm14", BRACK(FH_SDDM | 14), "\\Device\\Harddisk116\\Partition14"},
- {"/dev/sddm15", BRACK(FH_SDDM | 15), "\\Device\\Harddisk116\\Partition15"},
- {"/dev/sddn1", BRACK(FH_SDDN | 1), "\\Device\\Harddisk117\\Partition1"},
- {"/dev/sddn2", BRACK(FH_SDDN | 2), "\\Device\\Harddisk117\\Partition2"},
- {"/dev/sddn3", BRACK(FH_SDDN | 3), "\\Device\\Harddisk117\\Partition3"},
- {"/dev/sddn4", BRACK(FH_SDDN | 4), "\\Device\\Harddisk117\\Partition4"},
- {"/dev/sddn5", BRACK(FH_SDDN | 5), "\\Device\\Harddisk117\\Partition5"},
- {"/dev/sddn6", BRACK(FH_SDDN | 6), "\\Device\\Harddisk117\\Partition6"},
- {"/dev/sddn7", BRACK(FH_SDDN | 7), "\\Device\\Harddisk117\\Partition7"},
- {"/dev/sddn8", BRACK(FH_SDDN | 8), "\\Device\\Harddisk117\\Partition8"},
- {"/dev/sddn9", BRACK(FH_SDDN | 9), "\\Device\\Harddisk117\\Partition9"},
- {"/dev/sddn10", BRACK(FH_SDDN | 10), "\\Device\\Harddisk117\\Partition10"},
- {"/dev/sddn11", BRACK(FH_SDDN | 11), "\\Device\\Harddisk117\\Partition11"},
- {"/dev/sddn12", BRACK(FH_SDDN | 12), "\\Device\\Harddisk117\\Partition12"},
- {"/dev/sddn13", BRACK(FH_SDDN | 13), "\\Device\\Harddisk117\\Partition13"},
- {"/dev/sddn14", BRACK(FH_SDDN | 14), "\\Device\\Harddisk117\\Partition14"},
- {"/dev/sddn15", BRACK(FH_SDDN | 15), "\\Device\\Harddisk117\\Partition15"},
- {"/dev/sddo1", BRACK(FH_SDDO | 1), "\\Device\\Harddisk118\\Partition1"},
- {"/dev/sddo2", BRACK(FH_SDDO | 2), "\\Device\\Harddisk118\\Partition2"},
- {"/dev/sddo3", BRACK(FH_SDDO | 3), "\\Device\\Harddisk118\\Partition3"},
- {"/dev/sddo4", BRACK(FH_SDDO | 4), "\\Device\\Harddisk118\\Partition4"},
- {"/dev/sddo5", BRACK(FH_SDDO | 5), "\\Device\\Harddisk118\\Partition5"},
- {"/dev/sddo6", BRACK(FH_SDDO | 6), "\\Device\\Harddisk118\\Partition6"},
- {"/dev/sddo7", BRACK(FH_SDDO | 7), "\\Device\\Harddisk118\\Partition7"},
- {"/dev/sddo8", BRACK(FH_SDDO | 8), "\\Device\\Harddisk118\\Partition8"},
- {"/dev/sddo9", BRACK(FH_SDDO | 9), "\\Device\\Harddisk118\\Partition9"},
- {"/dev/sddo10", BRACK(FH_SDDO | 10), "\\Device\\Harddisk118\\Partition10"},
- {"/dev/sddo11", BRACK(FH_SDDO | 11), "\\Device\\Harddisk118\\Partition11"},
- {"/dev/sddo12", BRACK(FH_SDDO | 12), "\\Device\\Harddisk118\\Partition12"},
- {"/dev/sddo13", BRACK(FH_SDDO | 13), "\\Device\\Harddisk118\\Partition13"},
- {"/dev/sddo14", BRACK(FH_SDDO | 14), "\\Device\\Harddisk118\\Partition14"},
- {"/dev/sddo15", BRACK(FH_SDDO | 15), "\\Device\\Harddisk118\\Partition15"},
- {"/dev/sddp1", BRACK(FH_SDDP | 1), "\\Device\\Harddisk119\\Partition1"},
- {"/dev/sddp2", BRACK(FH_SDDP | 2), "\\Device\\Harddisk119\\Partition2"},
- {"/dev/sddp3", BRACK(FH_SDDP | 3), "\\Device\\Harddisk119\\Partition3"},
- {"/dev/sddp4", BRACK(FH_SDDP | 4), "\\Device\\Harddisk119\\Partition4"},
- {"/dev/sddp5", BRACK(FH_SDDP | 5), "\\Device\\Harddisk119\\Partition5"},
- {"/dev/sddp6", BRACK(FH_SDDP | 6), "\\Device\\Harddisk119\\Partition6"},
- {"/dev/sddp7", BRACK(FH_SDDP | 7), "\\Device\\Harddisk119\\Partition7"},
- {"/dev/sddp8", BRACK(FH_SDDP | 8), "\\Device\\Harddisk119\\Partition8"},
- {"/dev/sddp9", BRACK(FH_SDDP | 9), "\\Device\\Harddisk119\\Partition9"},
- {"/dev/sddp10", BRACK(FH_SDDP | 10), "\\Device\\Harddisk119\\Partition10"},
- {"/dev/sddp11", BRACK(FH_SDDP | 11), "\\Device\\Harddisk119\\Partition11"},
- {"/dev/sddp12", BRACK(FH_SDDP | 12), "\\Device\\Harddisk119\\Partition12"},
- {"/dev/sddp13", BRACK(FH_SDDP | 13), "\\Device\\Harddisk119\\Partition13"},
- {"/dev/sddp14", BRACK(FH_SDDP | 14), "\\Device\\Harddisk119\\Partition14"},
- {"/dev/sddp15", BRACK(FH_SDDP | 15), "\\Device\\Harddisk119\\Partition15"},
- {"/dev/sddq1", BRACK(FH_SDDQ | 1), "\\Device\\Harddisk120\\Partition1"},
- {"/dev/sddq2", BRACK(FH_SDDQ | 2), "\\Device\\Harddisk120\\Partition2"},
- {"/dev/sddq3", BRACK(FH_SDDQ | 3), "\\Device\\Harddisk120\\Partition3"},
- {"/dev/sddq4", BRACK(FH_SDDQ | 4), "\\Device\\Harddisk120\\Partition4"},
- {"/dev/sddq5", BRACK(FH_SDDQ | 5), "\\Device\\Harddisk120\\Partition5"},
- {"/dev/sddq6", BRACK(FH_SDDQ | 6), "\\Device\\Harddisk120\\Partition6"},
- {"/dev/sddq7", BRACK(FH_SDDQ | 7), "\\Device\\Harddisk120\\Partition7"},
- {"/dev/sddq8", BRACK(FH_SDDQ | 8), "\\Device\\Harddisk120\\Partition8"},
- {"/dev/sddq9", BRACK(FH_SDDQ | 9), "\\Device\\Harddisk120\\Partition9"},
- {"/dev/sddq10", BRACK(FH_SDDQ | 10), "\\Device\\Harddisk120\\Partition10"},
- {"/dev/sddq11", BRACK(FH_SDDQ | 11), "\\Device\\Harddisk120\\Partition11"},
- {"/dev/sddq12", BRACK(FH_SDDQ | 12), "\\Device\\Harddisk120\\Partition12"},
- {"/dev/sddq13", BRACK(FH_SDDQ | 13), "\\Device\\Harddisk120\\Partition13"},
- {"/dev/sddq14", BRACK(FH_SDDQ | 14), "\\Device\\Harddisk120\\Partition14"},
- {"/dev/sddq15", BRACK(FH_SDDQ | 15), "\\Device\\Harddisk120\\Partition15"},
- {"/dev/sddr1", BRACK(FH_SDDR | 1), "\\Device\\Harddisk121\\Partition1"},
- {"/dev/sddr2", BRACK(FH_SDDR | 2), "\\Device\\Harddisk121\\Partition2"},
- {"/dev/sddr3", BRACK(FH_SDDR | 3), "\\Device\\Harddisk121\\Partition3"},
- {"/dev/sddr4", BRACK(FH_SDDR | 4), "\\Device\\Harddisk121\\Partition4"},
- {"/dev/sddr5", BRACK(FH_SDDR | 5), "\\Device\\Harddisk121\\Partition5"},
- {"/dev/sddr6", BRACK(FH_SDDR | 6), "\\Device\\Harddisk121\\Partition6"},
- {"/dev/sddr7", BRACK(FH_SDDR | 7), "\\Device\\Harddisk121\\Partition7"},
- {"/dev/sddr8", BRACK(FH_SDDR | 8), "\\Device\\Harddisk121\\Partition8"},
- {"/dev/sddr9", BRACK(FH_SDDR | 9), "\\Device\\Harddisk121\\Partition9"},
- {"/dev/sddr10", BRACK(FH_SDDR | 10), "\\Device\\Harddisk121\\Partition10"},
- {"/dev/sddr11", BRACK(FH_SDDR | 11), "\\Device\\Harddisk121\\Partition11"},
- {"/dev/sddr12", BRACK(FH_SDDR | 12), "\\Device\\Harddisk121\\Partition12"},
- {"/dev/sddr13", BRACK(FH_SDDR | 13), "\\Device\\Harddisk121\\Partition13"},
- {"/dev/sddr14", BRACK(FH_SDDR | 14), "\\Device\\Harddisk121\\Partition14"},
- {"/dev/sddr15", BRACK(FH_SDDR | 15), "\\Device\\Harddisk121\\Partition15"},
- {"/dev/sdds1", BRACK(FH_SDDS | 1), "\\Device\\Harddisk122\\Partition1"},
- {"/dev/sdds2", BRACK(FH_SDDS | 2), "\\Device\\Harddisk122\\Partition2"},
- {"/dev/sdds3", BRACK(FH_SDDS | 3), "\\Device\\Harddisk122\\Partition3"},
- {"/dev/sdds4", BRACK(FH_SDDS | 4), "\\Device\\Harddisk122\\Partition4"},
- {"/dev/sdds5", BRACK(FH_SDDS | 5), "\\Device\\Harddisk122\\Partition5"},
- {"/dev/sdds6", BRACK(FH_SDDS | 6), "\\Device\\Harddisk122\\Partition6"},
- {"/dev/sdds7", BRACK(FH_SDDS | 7), "\\Device\\Harddisk122\\Partition7"},
- {"/dev/sdds8", BRACK(FH_SDDS | 8), "\\Device\\Harddisk122\\Partition8"},
- {"/dev/sdds9", BRACK(FH_SDDS | 9), "\\Device\\Harddisk122\\Partition9"},
- {"/dev/sdds10", BRACK(FH_SDDS | 10), "\\Device\\Harddisk122\\Partition10"},
- {"/dev/sdds11", BRACK(FH_SDDS | 11), "\\Device\\Harddisk122\\Partition11"},
- {"/dev/sdds12", BRACK(FH_SDDS | 12), "\\Device\\Harddisk122\\Partition12"},
- {"/dev/sdds13", BRACK(FH_SDDS | 13), "\\Device\\Harddisk122\\Partition13"},
- {"/dev/sdds14", BRACK(FH_SDDS | 14), "\\Device\\Harddisk122\\Partition14"},
- {"/dev/sdds15", BRACK(FH_SDDS | 15), "\\Device\\Harddisk122\\Partition15"},
- {"/dev/sddt1", BRACK(FH_SDDT | 1), "\\Device\\Harddisk123\\Partition1"},
- {"/dev/sddt2", BRACK(FH_SDDT | 2), "\\Device\\Harddisk123\\Partition2"},
- {"/dev/sddt3", BRACK(FH_SDDT | 3), "\\Device\\Harddisk123\\Partition3"},
- {"/dev/sddt4", BRACK(FH_SDDT | 4), "\\Device\\Harddisk123\\Partition4"},
- {"/dev/sddt5", BRACK(FH_SDDT | 5), "\\Device\\Harddisk123\\Partition5"},
- {"/dev/sddt6", BRACK(FH_SDDT | 6), "\\Device\\Harddisk123\\Partition6"},
- {"/dev/sddt7", BRACK(FH_SDDT | 7), "\\Device\\Harddisk123\\Partition7"},
- {"/dev/sddt8", BRACK(FH_SDDT | 8), "\\Device\\Harddisk123\\Partition8"},
- {"/dev/sddt9", BRACK(FH_SDDT | 9), "\\Device\\Harddisk123\\Partition9"},
- {"/dev/sddt10", BRACK(FH_SDDT | 10), "\\Device\\Harddisk123\\Partition10"},
- {"/dev/sddt11", BRACK(FH_SDDT | 11), "\\Device\\Harddisk123\\Partition11"},
- {"/dev/sddt12", BRACK(FH_SDDT | 12), "\\Device\\Harddisk123\\Partition12"},
- {"/dev/sddt13", BRACK(FH_SDDT | 13), "\\Device\\Harddisk123\\Partition13"},
- {"/dev/sddt14", BRACK(FH_SDDT | 14), "\\Device\\Harddisk123\\Partition14"},
- {"/dev/sddt15", BRACK(FH_SDDT | 15), "\\Device\\Harddisk123\\Partition15"},
- {"/dev/sddu1", BRACK(FH_SDDU | 1), "\\Device\\Harddisk124\\Partition1"},
- {"/dev/sddu2", BRACK(FH_SDDU | 2), "\\Device\\Harddisk124\\Partition2"},
- {"/dev/sddu3", BRACK(FH_SDDU | 3), "\\Device\\Harddisk124\\Partition3"},
- {"/dev/sddu4", BRACK(FH_SDDU | 4), "\\Device\\Harddisk124\\Partition4"},
- {"/dev/sddu5", BRACK(FH_SDDU | 5), "\\Device\\Harddisk124\\Partition5"},
- {"/dev/sddu6", BRACK(FH_SDDU | 6), "\\Device\\Harddisk124\\Partition6"},
- {"/dev/sddu7", BRACK(FH_SDDU | 7), "\\Device\\Harddisk124\\Partition7"},
- {"/dev/sddu8", BRACK(FH_SDDU | 8), "\\Device\\Harddisk124\\Partition8"},
- {"/dev/sddu9", BRACK(FH_SDDU | 9), "\\Device\\Harddisk124\\Partition9"},
- {"/dev/sddu10", BRACK(FH_SDDU | 10), "\\Device\\Harddisk124\\Partition10"},
- {"/dev/sddu11", BRACK(FH_SDDU | 11), "\\Device\\Harddisk124\\Partition11"},
- {"/dev/sddu12", BRACK(FH_SDDU | 12), "\\Device\\Harddisk124\\Partition12"},
- {"/dev/sddu13", BRACK(FH_SDDU | 13), "\\Device\\Harddisk124\\Partition13"},
- {"/dev/sddu14", BRACK(FH_SDDU | 14), "\\Device\\Harddisk124\\Partition14"},
- {"/dev/sddu15", BRACK(FH_SDDU | 15), "\\Device\\Harddisk124\\Partition15"},
- {"/dev/sddv1", BRACK(FH_SDDV | 1), "\\Device\\Harddisk125\\Partition1"},
- {"/dev/sddv2", BRACK(FH_SDDV | 2), "\\Device\\Harddisk125\\Partition2"},
- {"/dev/sddv3", BRACK(FH_SDDV | 3), "\\Device\\Harddisk125\\Partition3"},
- {"/dev/sddv4", BRACK(FH_SDDV | 4), "\\Device\\Harddisk125\\Partition4"},
- {"/dev/sddv5", BRACK(FH_SDDV | 5), "\\Device\\Harddisk125\\Partition5"},
- {"/dev/sddv6", BRACK(FH_SDDV | 6), "\\Device\\Harddisk125\\Partition6"},
- {"/dev/sddv7", BRACK(FH_SDDV | 7), "\\Device\\Harddisk125\\Partition7"},
- {"/dev/sddv8", BRACK(FH_SDDV | 8), "\\Device\\Harddisk125\\Partition8"},
- {"/dev/sddv9", BRACK(FH_SDDV | 9), "\\Device\\Harddisk125\\Partition9"},
- {"/dev/sddv10", BRACK(FH_SDDV | 10), "\\Device\\Harddisk125\\Partition10"},
- {"/dev/sddv11", BRACK(FH_SDDV | 11), "\\Device\\Harddisk125\\Partition11"},
- {"/dev/sddv12", BRACK(FH_SDDV | 12), "\\Device\\Harddisk125\\Partition12"},
- {"/dev/sddv13", BRACK(FH_SDDV | 13), "\\Device\\Harddisk125\\Partition13"},
- {"/dev/sddv14", BRACK(FH_SDDV | 14), "\\Device\\Harddisk125\\Partition14"},
- {"/dev/sddv15", BRACK(FH_SDDV | 15), "\\Device\\Harddisk125\\Partition15"},
- {"/dev/sddw1", BRACK(FH_SDDW | 1), "\\Device\\Harddisk126\\Partition1"},
- {"/dev/sddw2", BRACK(FH_SDDW | 2), "\\Device\\Harddisk126\\Partition2"},
- {"/dev/sddw3", BRACK(FH_SDDW | 3), "\\Device\\Harddisk126\\Partition3"},
- {"/dev/sddw4", BRACK(FH_SDDW | 4), "\\Device\\Harddisk126\\Partition4"},
- {"/dev/sddw5", BRACK(FH_SDDW | 5), "\\Device\\Harddisk126\\Partition5"},
- {"/dev/sddw6", BRACK(FH_SDDW | 6), "\\Device\\Harddisk126\\Partition6"},
- {"/dev/sddw7", BRACK(FH_SDDW | 7), "\\Device\\Harddisk126\\Partition7"},
- {"/dev/sddw8", BRACK(FH_SDDW | 8), "\\Device\\Harddisk126\\Partition8"},
- {"/dev/sddw9", BRACK(FH_SDDW | 9), "\\Device\\Harddisk126\\Partition9"},
- {"/dev/sddw10", BRACK(FH_SDDW | 10), "\\Device\\Harddisk126\\Partition10"},
- {"/dev/sddw11", BRACK(FH_SDDW | 11), "\\Device\\Harddisk126\\Partition11"},
- {"/dev/sddw12", BRACK(FH_SDDW | 12), "\\Device\\Harddisk126\\Partition12"},
- {"/dev/sddw13", BRACK(FH_SDDW | 13), "\\Device\\Harddisk126\\Partition13"},
- {"/dev/sddw14", BRACK(FH_SDDW | 14), "\\Device\\Harddisk126\\Partition14"},
- {"/dev/sddw15", BRACK(FH_SDDW | 15), "\\Device\\Harddisk126\\Partition15"},
- {"/dev/sddx1", BRACK(FH_SDDX | 1), "\\Device\\Harddisk127\\Partition1"},
- {"/dev/sddx2", BRACK(FH_SDDX | 2), "\\Device\\Harddisk127\\Partition2"},
- {"/dev/sddx3", BRACK(FH_SDDX | 3), "\\Device\\Harddisk127\\Partition3"},
- {"/dev/sddx4", BRACK(FH_SDDX | 4), "\\Device\\Harddisk127\\Partition4"},
- {"/dev/sddx5", BRACK(FH_SDDX | 5), "\\Device\\Harddisk127\\Partition5"},
- {"/dev/sddx6", BRACK(FH_SDDX | 6), "\\Device\\Harddisk127\\Partition6"},
- {"/dev/sddx7", BRACK(FH_SDDX | 7), "\\Device\\Harddisk127\\Partition7"},
- {"/dev/sddx8", BRACK(FH_SDDX | 8), "\\Device\\Harddisk127\\Partition8"},
- {"/dev/sddx9", BRACK(FH_SDDX | 9), "\\Device\\Harddisk127\\Partition9"},
- {"/dev/sddx10", BRACK(FH_SDDX | 10), "\\Device\\Harddisk127\\Partition10"},
- {"/dev/sddx11", BRACK(FH_SDDX | 11), "\\Device\\Harddisk127\\Partition11"},
- {"/dev/sddx12", BRACK(FH_SDDX | 12), "\\Device\\Harddisk127\\Partition12"},
- {"/dev/sddx13", BRACK(FH_SDDX | 13), "\\Device\\Harddisk127\\Partition13"},
- {"/dev/sddx14", BRACK(FH_SDDX | 14), "\\Device\\Harddisk127\\Partition14"},
- {"/dev/sddx15", BRACK(FH_SDDX | 15), "\\Device\\Harddisk127\\Partition15"},
- {"/dev/sr0", BRACK(FHDEV(DEV_CDROM_MAJOR, 0)), "\\Device\\CdRom0"},
- {"/dev/sr1", BRACK(FHDEV(DEV_CDROM_MAJOR, 1)), "\\Device\\CdRom1"},
- {"/dev/sr2", BRACK(FHDEV(DEV_CDROM_MAJOR, 2)), "\\Device\\CdRom2"},
- {"/dev/sr3", BRACK(FHDEV(DEV_CDROM_MAJOR, 3)), "\\Device\\CdRom3"},
- {"/dev/sr4", BRACK(FHDEV(DEV_CDROM_MAJOR, 4)), "\\Device\\CdRom4"},
- {"/dev/sr5", BRACK(FHDEV(DEV_CDROM_MAJOR, 5)), "\\Device\\CdRom5"},
- {"/dev/sr6", BRACK(FHDEV(DEV_CDROM_MAJOR, 6)), "\\Device\\CdRom6"},
- {"/dev/sr7", BRACK(FHDEV(DEV_CDROM_MAJOR, 7)), "\\Device\\CdRom7"},
- {"/dev/sr8", BRACK(FHDEV(DEV_CDROM_MAJOR, 8)), "\\Device\\CdRom8"},
- {"/dev/sr9", BRACK(FHDEV(DEV_CDROM_MAJOR, 9)), "\\Device\\CdRom9"},
- {"/dev/sr10", BRACK(FHDEV(DEV_CDROM_MAJOR, 10)), "\\Device\\CdRom10"},
- {"/dev/sr11", BRACK(FHDEV(DEV_CDROM_MAJOR, 11)), "\\Device\\CdRom11"},
- {"/dev/sr12", BRACK(FHDEV(DEV_CDROM_MAJOR, 12)), "\\Device\\CdRom12"},
- {"/dev/sr13", BRACK(FHDEV(DEV_CDROM_MAJOR, 13)), "\\Device\\CdRom13"},
- {"/dev/sr14", BRACK(FHDEV(DEV_CDROM_MAJOR, 14)), "\\Device\\CdRom14"},
- {"/dev/sr15", BRACK(FHDEV(DEV_CDROM_MAJOR, 15)), "\\Device\\CdRom15"},
- {"/dev/st0", BRACK(FHDEV(DEV_TAPE_MAJOR, 0)), "\\Device\\Tape0"},
- {"/dev/st1", BRACK(FHDEV(DEV_TAPE_MAJOR, 1)), "\\Device\\Tape1"},
- {"/dev/st2", BRACK(FHDEV(DEV_TAPE_MAJOR, 2)), "\\Device\\Tape2"},
- {"/dev/st3", BRACK(FHDEV(DEV_TAPE_MAJOR, 3)), "\\Device\\Tape3"},
- {"/dev/st4", BRACK(FHDEV(DEV_TAPE_MAJOR, 4)), "\\Device\\Tape4"},
- {"/dev/st5", BRACK(FHDEV(DEV_TAPE_MAJOR, 5)), "\\Device\\Tape5"},
- {"/dev/st6", BRACK(FHDEV(DEV_TAPE_MAJOR, 6)), "\\Device\\Tape6"},
- {"/dev/st7", BRACK(FHDEV(DEV_TAPE_MAJOR, 7)), "\\Device\\Tape7"},
- {"/dev/st8", BRACK(FHDEV(DEV_TAPE_MAJOR, 8)), "\\Device\\Tape8"},
- {"/dev/st9", BRACK(FHDEV(DEV_TAPE_MAJOR, 9)), "\\Device\\Tape9"},
- {"/dev/st10", BRACK(FHDEV(DEV_TAPE_MAJOR, 10)), "\\Device\\Tape10"},
- {"/dev/st11", BRACK(FHDEV(DEV_TAPE_MAJOR, 11)), "\\Device\\Tape11"},
- {"/dev/st12", BRACK(FHDEV(DEV_TAPE_MAJOR, 12)), "\\Device\\Tape12"},
- {"/dev/st13", BRACK(FHDEV(DEV_TAPE_MAJOR, 13)), "\\Device\\Tape13"},
- {"/dev/st14", BRACK(FHDEV(DEV_TAPE_MAJOR, 14)), "\\Device\\Tape14"},
- {"/dev/st15", BRACK(FHDEV(DEV_TAPE_MAJOR, 15)), "\\Device\\Tape15"},
- {"/dev/st16", BRACK(FHDEV(DEV_TAPE_MAJOR, 16)), "\\Device\\Tape16"},
- {"/dev/st17", BRACK(FHDEV(DEV_TAPE_MAJOR, 17)), "\\Device\\Tape17"},
- {"/dev/st18", BRACK(FHDEV(DEV_TAPE_MAJOR, 18)), "\\Device\\Tape18"},
- {"/dev/st19", BRACK(FHDEV(DEV_TAPE_MAJOR, 19)), "\\Device\\Tape19"},
- {"/dev/st20", BRACK(FHDEV(DEV_TAPE_MAJOR, 20)), "\\Device\\Tape20"},
- {"/dev/st21", BRACK(FHDEV(DEV_TAPE_MAJOR, 21)), "\\Device\\Tape21"},
- {"/dev/st22", BRACK(FHDEV(DEV_TAPE_MAJOR, 22)), "\\Device\\Tape22"},
- {"/dev/st23", BRACK(FHDEV(DEV_TAPE_MAJOR, 23)), "\\Device\\Tape23"},
- {"/dev/st24", BRACK(FHDEV(DEV_TAPE_MAJOR, 24)), "\\Device\\Tape24"},
- {"/dev/st25", BRACK(FHDEV(DEV_TAPE_MAJOR, 25)), "\\Device\\Tape25"},
- {"/dev/st26", BRACK(FHDEV(DEV_TAPE_MAJOR, 26)), "\\Device\\Tape26"},
- {"/dev/st27", BRACK(FHDEV(DEV_TAPE_MAJOR, 27)), "\\Device\\Tape27"},
- {"/dev/st28", BRACK(FHDEV(DEV_TAPE_MAJOR, 28)), "\\Device\\Tape28"},
- {"/dev/st29", BRACK(FHDEV(DEV_TAPE_MAJOR, 29)), "\\Device\\Tape29"},
- {"/dev/st30", BRACK(FHDEV(DEV_TAPE_MAJOR, 30)), "\\Device\\Tape30"},
- {"/dev/st31", BRACK(FHDEV(DEV_TAPE_MAJOR, 31)), "\\Device\\Tape31"},
- {"/dev/st32", BRACK(FHDEV(DEV_TAPE_MAJOR, 32)), "\\Device\\Tape32"},
- {"/dev/st33", BRACK(FHDEV(DEV_TAPE_MAJOR, 33)), "\\Device\\Tape33"},
- {"/dev/st34", BRACK(FHDEV(DEV_TAPE_MAJOR, 34)), "\\Device\\Tape34"},
- {"/dev/st35", BRACK(FHDEV(DEV_TAPE_MAJOR, 35)), "\\Device\\Tape35"},
- {"/dev/st36", BRACK(FHDEV(DEV_TAPE_MAJOR, 36)), "\\Device\\Tape36"},
- {"/dev/st37", BRACK(FHDEV(DEV_TAPE_MAJOR, 37)), "\\Device\\Tape37"},
- {"/dev/st38", BRACK(FHDEV(DEV_TAPE_MAJOR, 38)), "\\Device\\Tape38"},
- {"/dev/st39", BRACK(FHDEV(DEV_TAPE_MAJOR, 39)), "\\Device\\Tape39"},
- {"/dev/st40", BRACK(FHDEV(DEV_TAPE_MAJOR, 40)), "\\Device\\Tape40"},
- {"/dev/st41", BRACK(FHDEV(DEV_TAPE_MAJOR, 41)), "\\Device\\Tape41"},
- {"/dev/st42", BRACK(FHDEV(DEV_TAPE_MAJOR, 42)), "\\Device\\Tape42"},
- {"/dev/st43", BRACK(FHDEV(DEV_TAPE_MAJOR, 43)), "\\Device\\Tape43"},
- {"/dev/st44", BRACK(FHDEV(DEV_TAPE_MAJOR, 44)), "\\Device\\Tape44"},
- {"/dev/st45", BRACK(FHDEV(DEV_TAPE_MAJOR, 45)), "\\Device\\Tape45"},
- {"/dev/st46", BRACK(FHDEV(DEV_TAPE_MAJOR, 46)), "\\Device\\Tape46"},
- {"/dev/st47", BRACK(FHDEV(DEV_TAPE_MAJOR, 47)), "\\Device\\Tape47"},
- {"/dev/st48", BRACK(FHDEV(DEV_TAPE_MAJOR, 48)), "\\Device\\Tape48"},
- {"/dev/st49", BRACK(FHDEV(DEV_TAPE_MAJOR, 49)), "\\Device\\Tape49"},
- {"/dev/st50", BRACK(FHDEV(DEV_TAPE_MAJOR, 50)), "\\Device\\Tape50"},
- {"/dev/st51", BRACK(FHDEV(DEV_TAPE_MAJOR, 51)), "\\Device\\Tape51"},
- {"/dev/st52", BRACK(FHDEV(DEV_TAPE_MAJOR, 52)), "\\Device\\Tape52"},
- {"/dev/st53", BRACK(FHDEV(DEV_TAPE_MAJOR, 53)), "\\Device\\Tape53"},
- {"/dev/st54", BRACK(FHDEV(DEV_TAPE_MAJOR, 54)), "\\Device\\Tape54"},
- {"/dev/st55", BRACK(FHDEV(DEV_TAPE_MAJOR, 55)), "\\Device\\Tape55"},
- {"/dev/st56", BRACK(FHDEV(DEV_TAPE_MAJOR, 56)), "\\Device\\Tape56"},
- {"/dev/st57", BRACK(FHDEV(DEV_TAPE_MAJOR, 57)), "\\Device\\Tape57"},
- {"/dev/st58", BRACK(FHDEV(DEV_TAPE_MAJOR, 58)), "\\Device\\Tape58"},
- {"/dev/st59", BRACK(FHDEV(DEV_TAPE_MAJOR, 59)), "\\Device\\Tape59"},
- {"/dev/st60", BRACK(FHDEV(DEV_TAPE_MAJOR, 60)), "\\Device\\Tape60"},
- {"/dev/st61", BRACK(FHDEV(DEV_TAPE_MAJOR, 61)), "\\Device\\Tape61"},
- {"/dev/st62", BRACK(FHDEV(DEV_TAPE_MAJOR, 62)), "\\Device\\Tape62"},
- {"/dev/st63", BRACK(FHDEV(DEV_TAPE_MAJOR, 63)), "\\Device\\Tape63"},
- {"/dev/st64", BRACK(FHDEV(DEV_TAPE_MAJOR, 64)), "\\Device\\Tape64"},
- {"/dev/st65", BRACK(FHDEV(DEV_TAPE_MAJOR, 65)), "\\Device\\Tape65"},
- {"/dev/st66", BRACK(FHDEV(DEV_TAPE_MAJOR, 66)), "\\Device\\Tape66"},
- {"/dev/st67", BRACK(FHDEV(DEV_TAPE_MAJOR, 67)), "\\Device\\Tape67"},
- {"/dev/st68", BRACK(FHDEV(DEV_TAPE_MAJOR, 68)), "\\Device\\Tape68"},
- {"/dev/st69", BRACK(FHDEV(DEV_TAPE_MAJOR, 69)), "\\Device\\Tape69"},
- {"/dev/st70", BRACK(FHDEV(DEV_TAPE_MAJOR, 70)), "\\Device\\Tape70"},
- {"/dev/st71", BRACK(FHDEV(DEV_TAPE_MAJOR, 71)), "\\Device\\Tape71"},
- {"/dev/st72", BRACK(FHDEV(DEV_TAPE_MAJOR, 72)), "\\Device\\Tape72"},
- {"/dev/st73", BRACK(FHDEV(DEV_TAPE_MAJOR, 73)), "\\Device\\Tape73"},
- {"/dev/st74", BRACK(FHDEV(DEV_TAPE_MAJOR, 74)), "\\Device\\Tape74"},
- {"/dev/st75", BRACK(FHDEV(DEV_TAPE_MAJOR, 75)), "\\Device\\Tape75"},
- {"/dev/st76", BRACK(FHDEV(DEV_TAPE_MAJOR, 76)), "\\Device\\Tape76"},
- {"/dev/st77", BRACK(FHDEV(DEV_TAPE_MAJOR, 77)), "\\Device\\Tape77"},
- {"/dev/st78", BRACK(FHDEV(DEV_TAPE_MAJOR, 78)), "\\Device\\Tape78"},
- {"/dev/st79", BRACK(FHDEV(DEV_TAPE_MAJOR, 79)), "\\Device\\Tape79"},
- {"/dev/st80", BRACK(FHDEV(DEV_TAPE_MAJOR, 80)), "\\Device\\Tape80"},
- {"/dev/st81", BRACK(FHDEV(DEV_TAPE_MAJOR, 81)), "\\Device\\Tape81"},
- {"/dev/st82", BRACK(FHDEV(DEV_TAPE_MAJOR, 82)), "\\Device\\Tape82"},
- {"/dev/st83", BRACK(FHDEV(DEV_TAPE_MAJOR, 83)), "\\Device\\Tape83"},
- {"/dev/st84", BRACK(FHDEV(DEV_TAPE_MAJOR, 84)), "\\Device\\Tape84"},
- {"/dev/st85", BRACK(FHDEV(DEV_TAPE_MAJOR, 85)), "\\Device\\Tape85"},
- {"/dev/st86", BRACK(FHDEV(DEV_TAPE_MAJOR, 86)), "\\Device\\Tape86"},
- {"/dev/st87", BRACK(FHDEV(DEV_TAPE_MAJOR, 87)), "\\Device\\Tape87"},
- {"/dev/st88", BRACK(FHDEV(DEV_TAPE_MAJOR, 88)), "\\Device\\Tape88"},
- {"/dev/st89", BRACK(FHDEV(DEV_TAPE_MAJOR, 89)), "\\Device\\Tape89"},
- {"/dev/st90", BRACK(FHDEV(DEV_TAPE_MAJOR, 90)), "\\Device\\Tape90"},
- {"/dev/st91", BRACK(FHDEV(DEV_TAPE_MAJOR, 91)), "\\Device\\Tape91"},
- {"/dev/st92", BRACK(FHDEV(DEV_TAPE_MAJOR, 92)), "\\Device\\Tape92"},
- {"/dev/st93", BRACK(FHDEV(DEV_TAPE_MAJOR, 93)), "\\Device\\Tape93"},
- {"/dev/st94", BRACK(FHDEV(DEV_TAPE_MAJOR, 94)), "\\Device\\Tape94"},
- {"/dev/st95", BRACK(FHDEV(DEV_TAPE_MAJOR, 95)), "\\Device\\Tape95"},
- {"/dev/st96", BRACK(FHDEV(DEV_TAPE_MAJOR, 96)), "\\Device\\Tape96"},
- {"/dev/st97", BRACK(FHDEV(DEV_TAPE_MAJOR, 97)), "\\Device\\Tape97"},
- {"/dev/st98", BRACK(FHDEV(DEV_TAPE_MAJOR, 98)), "\\Device\\Tape98"},
- {"/dev/st99", BRACK(FHDEV(DEV_TAPE_MAJOR, 99)), "\\Device\\Tape99"},
- {"/dev/st100", BRACK(FHDEV(DEV_TAPE_MAJOR, 100)), "\\Device\\Tape100"},
- {"/dev/st101", BRACK(FHDEV(DEV_TAPE_MAJOR, 101)), "\\Device\\Tape101"},
- {"/dev/st102", BRACK(FHDEV(DEV_TAPE_MAJOR, 102)), "\\Device\\Tape102"},
- {"/dev/st103", BRACK(FHDEV(DEV_TAPE_MAJOR, 103)), "\\Device\\Tape103"},
- {"/dev/st104", BRACK(FHDEV(DEV_TAPE_MAJOR, 104)), "\\Device\\Tape104"},
- {"/dev/st105", BRACK(FHDEV(DEV_TAPE_MAJOR, 105)), "\\Device\\Tape105"},
- {"/dev/st106", BRACK(FHDEV(DEV_TAPE_MAJOR, 106)), "\\Device\\Tape106"},
- {"/dev/st107", BRACK(FHDEV(DEV_TAPE_MAJOR, 107)), "\\Device\\Tape107"},
- {"/dev/st108", BRACK(FHDEV(DEV_TAPE_MAJOR, 108)), "\\Device\\Tape108"},
- {"/dev/st109", BRACK(FHDEV(DEV_TAPE_MAJOR, 109)), "\\Device\\Tape109"},
- {"/dev/st110", BRACK(FHDEV(DEV_TAPE_MAJOR, 110)), "\\Device\\Tape110"},
- {"/dev/st111", BRACK(FHDEV(DEV_TAPE_MAJOR, 111)), "\\Device\\Tape111"},
- {"/dev/st112", BRACK(FHDEV(DEV_TAPE_MAJOR, 112)), "\\Device\\Tape112"},
- {"/dev/st113", BRACK(FHDEV(DEV_TAPE_MAJOR, 113)), "\\Device\\Tape113"},
- {"/dev/st114", BRACK(FHDEV(DEV_TAPE_MAJOR, 114)), "\\Device\\Tape114"},
- {"/dev/st115", BRACK(FHDEV(DEV_TAPE_MAJOR, 115)), "\\Device\\Tape115"},
- {"/dev/st116", BRACK(FHDEV(DEV_TAPE_MAJOR, 116)), "\\Device\\Tape116"},
- {"/dev/st117", BRACK(FHDEV(DEV_TAPE_MAJOR, 117)), "\\Device\\Tape117"},
- {"/dev/st118", BRACK(FHDEV(DEV_TAPE_MAJOR, 118)), "\\Device\\Tape118"},
- {"/dev/st119", BRACK(FHDEV(DEV_TAPE_MAJOR, 119)), "\\Device\\Tape119"},
- {"/dev/st120", BRACK(FHDEV(DEV_TAPE_MAJOR, 120)), "\\Device\\Tape120"},
- {"/dev/st121", BRACK(FHDEV(DEV_TAPE_MAJOR, 121)), "\\Device\\Tape121"},
- {"/dev/st122", BRACK(FHDEV(DEV_TAPE_MAJOR, 122)), "\\Device\\Tape122"},
- {"/dev/st123", BRACK(FHDEV(DEV_TAPE_MAJOR, 123)), "\\Device\\Tape123"},
- {"/dev/st124", BRACK(FHDEV(DEV_TAPE_MAJOR, 124)), "\\Device\\Tape124"},
- {"/dev/st125", BRACK(FHDEV(DEV_TAPE_MAJOR, 125)), "\\Device\\Tape125"},
- {"/dev/st126", BRACK(FHDEV(DEV_TAPE_MAJOR, 126)), "\\Device\\Tape126"},
- {"/dev/st127", BRACK(FHDEV(DEV_TAPE_MAJOR, 127)), "\\Device\\Tape127"},
- {"/dev/tty", BRACK(FH_TTY), "\\dev\\tty"},
- {"/dev/tty0", BRACK(FHDEV(DEV_TTYS_MAJOR, 0)), "\\dev\\tty0"},
- {"/dev/tty1", BRACK(FHDEV(DEV_TTYS_MAJOR, 1)), "\\dev\\tty1"},
- {"/dev/tty2", BRACK(FHDEV(DEV_TTYS_MAJOR, 2)), "\\dev\\tty2"},
- {"/dev/tty3", BRACK(FHDEV(DEV_TTYS_MAJOR, 3)), "\\dev\\tty3"},
- {"/dev/tty4", BRACK(FHDEV(DEV_TTYS_MAJOR, 4)), "\\dev\\tty4"},
- {"/dev/tty5", BRACK(FHDEV(DEV_TTYS_MAJOR, 5)), "\\dev\\tty5"},
- {"/dev/tty6", BRACK(FHDEV(DEV_TTYS_MAJOR, 6)), "\\dev\\tty6"},
- {"/dev/tty7", BRACK(FHDEV(DEV_TTYS_MAJOR, 7)), "\\dev\\tty7"},
- {"/dev/tty8", BRACK(FHDEV(DEV_TTYS_MAJOR, 8)), "\\dev\\tty8"},
- {"/dev/tty9", BRACK(FHDEV(DEV_TTYS_MAJOR, 9)), "\\dev\\tty9"},
- {"/dev/tty10", BRACK(FHDEV(DEV_TTYS_MAJOR, 10)), "\\dev\\tty10"},
- {"/dev/tty11", BRACK(FHDEV(DEV_TTYS_MAJOR, 11)), "\\dev\\tty11"},
- {"/dev/tty12", BRACK(FHDEV(DEV_TTYS_MAJOR, 12)), "\\dev\\tty12"},
- {"/dev/tty13", BRACK(FHDEV(DEV_TTYS_MAJOR, 13)), "\\dev\\tty13"},
- {"/dev/tty14", BRACK(FHDEV(DEV_TTYS_MAJOR, 14)), "\\dev\\tty14"},
- {"/dev/tty15", BRACK(FHDEV(DEV_TTYS_MAJOR, 15)), "\\dev\\tty15"},
- {"/dev/tty16", BRACK(FHDEV(DEV_TTYS_MAJOR, 16)), "\\dev\\tty16"},
- {"/dev/tty17", BRACK(FHDEV(DEV_TTYS_MAJOR, 17)), "\\dev\\tty17"},
- {"/dev/tty18", BRACK(FHDEV(DEV_TTYS_MAJOR, 18)), "\\dev\\tty18"},
- {"/dev/tty19", BRACK(FHDEV(DEV_TTYS_MAJOR, 19)), "\\dev\\tty19"},
- {"/dev/tty20", BRACK(FHDEV(DEV_TTYS_MAJOR, 20)), "\\dev\\tty20"},
- {"/dev/tty21", BRACK(FHDEV(DEV_TTYS_MAJOR, 21)), "\\dev\\tty21"},
- {"/dev/tty22", BRACK(FHDEV(DEV_TTYS_MAJOR, 22)), "\\dev\\tty22"},
- {"/dev/tty23", BRACK(FHDEV(DEV_TTYS_MAJOR, 23)), "\\dev\\tty23"},
- {"/dev/tty24", BRACK(FHDEV(DEV_TTYS_MAJOR, 24)), "\\dev\\tty24"},
- {"/dev/tty25", BRACK(FHDEV(DEV_TTYS_MAJOR, 25)), "\\dev\\tty25"},
- {"/dev/tty26", BRACK(FHDEV(DEV_TTYS_MAJOR, 26)), "\\dev\\tty26"},
- {"/dev/tty27", BRACK(FHDEV(DEV_TTYS_MAJOR, 27)), "\\dev\\tty27"},
- {"/dev/tty28", BRACK(FHDEV(DEV_TTYS_MAJOR, 28)), "\\dev\\tty28"},
- {"/dev/tty29", BRACK(FHDEV(DEV_TTYS_MAJOR, 29)), "\\dev\\tty29"},
- {"/dev/tty30", BRACK(FHDEV(DEV_TTYS_MAJOR, 30)), "\\dev\\tty30"},
- {"/dev/tty31", BRACK(FHDEV(DEV_TTYS_MAJOR, 31)), "\\dev\\tty31"},
- {"/dev/tty32", BRACK(FHDEV(DEV_TTYS_MAJOR, 32)), "\\dev\\tty32"},
- {"/dev/tty33", BRACK(FHDEV(DEV_TTYS_MAJOR, 33)), "\\dev\\tty33"},
- {"/dev/tty34", BRACK(FHDEV(DEV_TTYS_MAJOR, 34)), "\\dev\\tty34"},
- {"/dev/tty35", BRACK(FHDEV(DEV_TTYS_MAJOR, 35)), "\\dev\\tty35"},
- {"/dev/tty36", BRACK(FHDEV(DEV_TTYS_MAJOR, 36)), "\\dev\\tty36"},
- {"/dev/tty37", BRACK(FHDEV(DEV_TTYS_MAJOR, 37)), "\\dev\\tty37"},
- {"/dev/tty38", BRACK(FHDEV(DEV_TTYS_MAJOR, 38)), "\\dev\\tty38"},
- {"/dev/tty39", BRACK(FHDEV(DEV_TTYS_MAJOR, 39)), "\\dev\\tty39"},
- {"/dev/tty40", BRACK(FHDEV(DEV_TTYS_MAJOR, 40)), "\\dev\\tty40"},
- {"/dev/tty41", BRACK(FHDEV(DEV_TTYS_MAJOR, 41)), "\\dev\\tty41"},
- {"/dev/tty42", BRACK(FHDEV(DEV_TTYS_MAJOR, 42)), "\\dev\\tty42"},
- {"/dev/tty43", BRACK(FHDEV(DEV_TTYS_MAJOR, 43)), "\\dev\\tty43"},
- {"/dev/tty44", BRACK(FHDEV(DEV_TTYS_MAJOR, 44)), "\\dev\\tty44"},
- {"/dev/tty45", BRACK(FHDEV(DEV_TTYS_MAJOR, 45)), "\\dev\\tty45"},
- {"/dev/tty46", BRACK(FHDEV(DEV_TTYS_MAJOR, 46)), "\\dev\\tty46"},
- {"/dev/tty47", BRACK(FHDEV(DEV_TTYS_MAJOR, 47)), "\\dev\\tty47"},
- {"/dev/tty48", BRACK(FHDEV(DEV_TTYS_MAJOR, 48)), "\\dev\\tty48"},
- {"/dev/tty49", BRACK(FHDEV(DEV_TTYS_MAJOR, 49)), "\\dev\\tty49"},
- {"/dev/tty50", BRACK(FHDEV(DEV_TTYS_MAJOR, 50)), "\\dev\\tty50"},
- {"/dev/tty51", BRACK(FHDEV(DEV_TTYS_MAJOR, 51)), "\\dev\\tty51"},
- {"/dev/tty52", BRACK(FHDEV(DEV_TTYS_MAJOR, 52)), "\\dev\\tty52"},
- {"/dev/tty53", BRACK(FHDEV(DEV_TTYS_MAJOR, 53)), "\\dev\\tty53"},
- {"/dev/tty54", BRACK(FHDEV(DEV_TTYS_MAJOR, 54)), "\\dev\\tty54"},
- {"/dev/tty55", BRACK(FHDEV(DEV_TTYS_MAJOR, 55)), "\\dev\\tty55"},
- {"/dev/tty56", BRACK(FHDEV(DEV_TTYS_MAJOR, 56)), "\\dev\\tty56"},
- {"/dev/tty57", BRACK(FHDEV(DEV_TTYS_MAJOR, 57)), "\\dev\\tty57"},
- {"/dev/tty58", BRACK(FHDEV(DEV_TTYS_MAJOR, 58)), "\\dev\\tty58"},
- {"/dev/tty59", BRACK(FHDEV(DEV_TTYS_MAJOR, 59)), "\\dev\\tty59"},
- {"/dev/tty60", BRACK(FHDEV(DEV_TTYS_MAJOR, 60)), "\\dev\\tty60"},
- {"/dev/tty61", BRACK(FHDEV(DEV_TTYS_MAJOR, 61)), "\\dev\\tty61"},
- {"/dev/tty62", BRACK(FHDEV(DEV_TTYS_MAJOR, 62)), "\\dev\\tty62"},
- {"/dev/tty63", BRACK(FHDEV(DEV_TTYS_MAJOR, 63)), "\\dev\\tty63"},
- {"/dev/ttyS0", BRACK(FHDEV(DEV_SERIAL_MAJOR, 0)), "\\??\\COM1"},
- {"/dev/ttyS1", BRACK(FHDEV(DEV_SERIAL_MAJOR, 1)), "\\??\\COM2"},
- {"/dev/ttyS2", BRACK(FHDEV(DEV_SERIAL_MAJOR, 2)), "\\??\\COM3"},
- {"/dev/ttyS3", BRACK(FHDEV(DEV_SERIAL_MAJOR, 3)), "\\??\\COM4"},
- {"/dev/ttyS4", BRACK(FHDEV(DEV_SERIAL_MAJOR, 4)), "\\??\\COM5"},
- {"/dev/ttyS5", BRACK(FHDEV(DEV_SERIAL_MAJOR, 5)), "\\??\\COM6"},
- {"/dev/ttyS6", BRACK(FHDEV(DEV_SERIAL_MAJOR, 6)), "\\??\\COM7"},
- {"/dev/ttyS7", BRACK(FHDEV(DEV_SERIAL_MAJOR, 7)), "\\??\\COM8"},
- {"/dev/ttyS8", BRACK(FHDEV(DEV_SERIAL_MAJOR, 8)), "\\??\\COM9"},
- {"/dev/ttyS9", BRACK(FHDEV(DEV_SERIAL_MAJOR, 9)), "\\??\\COM10"},
- {"/dev/ttyS10", BRACK(FHDEV(DEV_SERIAL_MAJOR, 10)), "\\??\\COM11"},
- {"/dev/ttyS11", BRACK(FHDEV(DEV_SERIAL_MAJOR, 11)), "\\??\\COM12"},
- {"/dev/ttyS12", BRACK(FHDEV(DEV_SERIAL_MAJOR, 12)), "\\??\\COM13"},
- {"/dev/ttyS13", BRACK(FHDEV(DEV_SERIAL_MAJOR, 13)), "\\??\\COM14"},
- {"/dev/ttyS14", BRACK(FHDEV(DEV_SERIAL_MAJOR, 14)), "\\??\\COM15"},
- {"/dev/ttyS15", BRACK(FHDEV(DEV_SERIAL_MAJOR, 15)), "\\??\\COM16"},
- {"/dev/ttyS16", BRACK(FHDEV(DEV_SERIAL_MAJOR, 16)), "\\??\\COM17"},
- {"/dev/ttyS17", BRACK(FHDEV(DEV_SERIAL_MAJOR, 17)), "\\??\\COM18"},
- {"/dev/ttyS18", BRACK(FHDEV(DEV_SERIAL_MAJOR, 18)), "\\??\\COM19"},
- {"/dev/ttyS19", BRACK(FHDEV(DEV_SERIAL_MAJOR, 19)), "\\??\\COM20"},
- {"/dev/ttyS20", BRACK(FHDEV(DEV_SERIAL_MAJOR, 20)), "\\??\\COM21"},
- {"/dev/ttyS21", BRACK(FHDEV(DEV_SERIAL_MAJOR, 21)), "\\??\\COM22"},
- {"/dev/ttyS22", BRACK(FHDEV(DEV_SERIAL_MAJOR, 22)), "\\??\\COM23"},
- {"/dev/ttyS23", BRACK(FHDEV(DEV_SERIAL_MAJOR, 23)), "\\??\\COM24"},
- {"/dev/ttyS24", BRACK(FHDEV(DEV_SERIAL_MAJOR, 24)), "\\??\\COM25"},
- {"/dev/ttyS25", BRACK(FHDEV(DEV_SERIAL_MAJOR, 25)), "\\??\\COM26"},
- {"/dev/ttyS26", BRACK(FHDEV(DEV_SERIAL_MAJOR, 26)), "\\??\\COM27"},
- {"/dev/ttyS27", BRACK(FHDEV(DEV_SERIAL_MAJOR, 27)), "\\??\\COM28"},
- {"/dev/ttyS28", BRACK(FHDEV(DEV_SERIAL_MAJOR, 28)), "\\??\\COM29"},
- {"/dev/ttyS29", BRACK(FHDEV(DEV_SERIAL_MAJOR, 29)), "\\??\\COM30"},
- {"/dev/ttyS30", BRACK(FHDEV(DEV_SERIAL_MAJOR, 30)), "\\??\\COM31"},
- {"/dev/ttyS31", BRACK(FHDEV(DEV_SERIAL_MAJOR, 31)), "\\??\\COM32"},
- {"/dev/ttyS32", BRACK(FHDEV(DEV_SERIAL_MAJOR, 32)), "\\??\\COM33"},
- {"/dev/ttyS33", BRACK(FHDEV(DEV_SERIAL_MAJOR, 33)), "\\??\\COM34"},
- {"/dev/ttyS34", BRACK(FHDEV(DEV_SERIAL_MAJOR, 34)), "\\??\\COM35"},
- {"/dev/ttyS35", BRACK(FHDEV(DEV_SERIAL_MAJOR, 35)), "\\??\\COM36"},
- {"/dev/ttyS36", BRACK(FHDEV(DEV_SERIAL_MAJOR, 36)), "\\??\\COM37"},
- {"/dev/ttyS37", BRACK(FHDEV(DEV_SERIAL_MAJOR, 37)), "\\??\\COM38"},
- {"/dev/ttyS38", BRACK(FHDEV(DEV_SERIAL_MAJOR, 38)), "\\??\\COM39"},
- {"/dev/ttyS39", BRACK(FHDEV(DEV_SERIAL_MAJOR, 39)), "\\??\\COM40"},
- {"/dev/ttyS40", BRACK(FHDEV(DEV_SERIAL_MAJOR, 40)), "\\??\\COM41"},
- {"/dev/ttyS41", BRACK(FHDEV(DEV_SERIAL_MAJOR, 41)), "\\??\\COM42"},
- {"/dev/ttyS42", BRACK(FHDEV(DEV_SERIAL_MAJOR, 42)), "\\??\\COM43"},
- {"/dev/ttyS43", BRACK(FHDEV(DEV_SERIAL_MAJOR, 43)), "\\??\\COM44"},
- {"/dev/ttyS44", BRACK(FHDEV(DEV_SERIAL_MAJOR, 44)), "\\??\\COM45"},
- {"/dev/ttyS45", BRACK(FHDEV(DEV_SERIAL_MAJOR, 45)), "\\??\\COM46"},
- {"/dev/ttyS46", BRACK(FHDEV(DEV_SERIAL_MAJOR, 46)), "\\??\\COM47"},
- {"/dev/ttyS47", BRACK(FHDEV(DEV_SERIAL_MAJOR, 47)), "\\??\\COM48"},
- {"/dev/ttyS48", BRACK(FHDEV(DEV_SERIAL_MAJOR, 48)), "\\??\\COM49"},
- {"/dev/ttyS49", BRACK(FHDEV(DEV_SERIAL_MAJOR, 49)), "\\??\\COM50"},
- {"/dev/ttyS50", BRACK(FHDEV(DEV_SERIAL_MAJOR, 50)), "\\??\\COM51"},
- {"/dev/ttyS51", BRACK(FHDEV(DEV_SERIAL_MAJOR, 51)), "\\??\\COM52"},
- {"/dev/ttyS52", BRACK(FHDEV(DEV_SERIAL_MAJOR, 52)), "\\??\\COM53"},
- {"/dev/ttyS53", BRACK(FHDEV(DEV_SERIAL_MAJOR, 53)), "\\??\\COM54"},
- {"/dev/ttyS54", BRACK(FHDEV(DEV_SERIAL_MAJOR, 54)), "\\??\\COM55"},
- {"/dev/ttyS55", BRACK(FHDEV(DEV_SERIAL_MAJOR, 55)), "\\??\\COM56"},
- {"/dev/ttyS56", BRACK(FHDEV(DEV_SERIAL_MAJOR, 56)), "\\??\\COM57"},
- {"/dev/ttyS57", BRACK(FHDEV(DEV_SERIAL_MAJOR, 57)), "\\??\\COM58"},
- {"/dev/ttyS58", BRACK(FHDEV(DEV_SERIAL_MAJOR, 58)), "\\??\\COM59"},
- {"/dev/ttyS59", BRACK(FHDEV(DEV_SERIAL_MAJOR, 59)), "\\??\\COM60"},
- {"/dev/ttyS60", BRACK(FHDEV(DEV_SERIAL_MAJOR, 60)), "\\??\\COM61"},
- {"/dev/ttyS61", BRACK(FHDEV(DEV_SERIAL_MAJOR, 61)), "\\??\\COM62"},
- {"/dev/ttyS62", BRACK(FHDEV(DEV_SERIAL_MAJOR, 62)), "\\??\\COM63"},
- {"/dev/ttyS63", BRACK(FHDEV(DEV_SERIAL_MAJOR, 63)), "\\??\\COM64"},
- {"/dev/ttym", BRACK(FH_TTYM), "\\dev\\ttym"},
- {"/dev/urandom", BRACK(FH_URANDOM), "\\dev\\urandom"},
- {"/dev/windows", BRACK(FH_WINDOWS), "\\dev\\windows"},
- {"/dev/zero", BRACK(FH_ZERO), "\\dev\\zero"}
-};
-
-const device *console_dev = dev_storage + 20;
-const device *ttym_dev = dev_storage + 2513;
-const device *ttys_dev = dev_storage + 2385;
-const device *urandom_dev = dev_storage + 2514;
-
-
-static KR_device_t KR_find_keyword (const char *KR_keyword, int KR_length)
-{
-
- switch (KR_length)
- {
- case 4:
- if (strncmp (KR_keyword, "/dev", 4) == 0)
- {
-{
-return dev_storage + 0;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 8:
- switch (KR_keyword [7])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdz", 8) == 0)
- {
-{
-return dev_storage + 217;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty", 8) == 0)
- {
-{
-return dev_storage + 2384;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdy", 8) == 0)
- {
-{
-return dev_storage + 216;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdx", 8) == 0)
- {
-{
-return dev_storage + 215;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdw", 8) == 0)
- {
-{
-return dev_storage + 214;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdv", 8) == 0)
- {
-{
-return dev_storage + 213;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdu", 8) == 0)
- {
-{
-return dev_storage + 212;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdt", 8) == 0)
- {
-{
-return dev_storage + 211;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sds", 8) == 0)
- {
-{
-return dev_storage + 210;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdr", 8) == 0)
- {
-{
-return dev_storage + 209;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdq", 8) == 0)
- {
-{
-return dev_storage + 208;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- switch (KR_keyword [5])
- {
- case 's':
- if (strncmp (KR_keyword, "/dev/sdp", 8) == 0)
- {
-{
-return dev_storage + 207;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/dsp", 8) == 0)
- {
-{
-return dev_storage + 21;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdo", 8) == 0)
- {
-{
-return dev_storage + 206;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdn", 8) == 0)
- {
-{
-return dev_storage + 205;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- switch (KR_keyword [5])
- {
- case 's':
- if (strncmp (KR_keyword, "/dev/sdm", 8) == 0)
- {
-{
-return dev_storage + 204;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/mem", 8) == 0)
- {
-{
-return dev_storage + 42;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdl", 8) == 0)
- {
-{
-return dev_storage + 203;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdk", 8) == 0)
- {
-{
-return dev_storage + 202;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdj", 8) == 0)
- {
-{
-return dev_storage + 201;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdi", 8) == 0)
- {
-{
-return dev_storage + 200;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdh", 8) == 0)
- {
-{
-return dev_storage + 199;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdg", 8) == 0)
- {
-{
-return dev_storage + 198;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdf", 8) == 0)
- {
-{
-return dev_storage + 197;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sde", 8) == 0)
- {
-{
-return dev_storage + 196;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdd", 8) == 0)
- {
-{
-return dev_storage + 195;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdc", 8) == 0)
- {
-{
-return dev_storage + 194;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdb", 8) == 0)
- {
-{
-return dev_storage + 193;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sda", 8) == 0)
- {
-{
-return dev_storage + 192;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '9':
- switch (KR_keyword [6])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/st9", 8) == 0)
- {
-{
-return dev_storage + 2265;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sr9", 8) == 0)
- {
-{
-return dev_storage + 2249;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/fd9", 8) == 0)
- {
-{
-return dev_storage + 31;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '8':
- switch (KR_keyword [6])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/st8", 8) == 0)
- {
-{
-return dev_storage + 2264;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sr8", 8) == 0)
- {
-{
-return dev_storage + 2248;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/fd8", 8) == 0)
- {
-{
-return dev_storage + 30;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '7':
- switch (KR_keyword [6])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/st7", 8) == 0)
- {
-{
-return dev_storage + 2263;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sr7", 8) == 0)
- {
-{
-return dev_storage + 2247;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/fd7", 8) == 0)
- {
-{
-return dev_storage + 29;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '6':
- switch (KR_keyword [6])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/st6", 8) == 0)
- {
-{
-return dev_storage + 2262;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sr6", 8) == 0)
- {
-{
-return dev_storage + 2246;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/fd6", 8) == 0)
- {
-{
-return dev_storage + 28;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '5':
- switch (KR_keyword [6])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/st5", 8) == 0)
- {
-{
-return dev_storage + 2261;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sr5", 8) == 0)
- {
-{
-return dev_storage + 2245;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/fd5", 8) == 0)
- {
-{
-return dev_storage + 27;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '4':
- switch (KR_keyword [6])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/st4", 8) == 0)
- {
-{
-return dev_storage + 2260;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sr4", 8) == 0)
- {
-{
-return dev_storage + 2244;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/fd4", 8) == 0)
- {
-{
-return dev_storage + 26;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '3':
- switch (KR_keyword [6])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/st3", 8) == 0)
- {
-{
-return dev_storage + 2259;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sr3", 8) == 0)
- {
-{
-return dev_storage + 2243;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/fd3", 8) == 0)
- {
-{
-return dev_storage + 25;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '2':
- switch (KR_keyword [6])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/st2", 8) == 0)
- {
-{
-return dev_storage + 2258;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sr2", 8) == 0)
- {
-{
-return dev_storage + 2242;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/fd2", 8) == 0)
- {
-{
-return dev_storage + 24;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [6])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/st1", 8) == 0)
- {
-{
-return dev_storage + 2257;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sr1", 8) == 0)
- {
-{
-return dev_storage + 2241;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/fd1", 8) == 0)
- {
-{
-return dev_storage + 23;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '0':
- switch (KR_keyword [6])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/st0", 8) == 0)
- {
-{
-return dev_storage + 2256;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sr0", 8) == 0)
- {
-{
-return dev_storage + 2240;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/fd0", 8) == 0)
- {
-{
-return dev_storage + 22;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 9:
- switch (KR_keyword [7])
- {
- case 'z':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/sdz9", 9) == 0)
- {
-{
-return dev_storage + 601;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/sdz8", 9) == 0)
- {
-{
-return dev_storage + 600;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/sdz7", 9) == 0)
- {
-{
-return dev_storage + 599;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/sdz6", 9) == 0)
- {
-{
-return dev_storage + 598;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/sdz5", 9) == 0)
- {
-{
-return dev_storage + 597;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/sdz4", 9) == 0)
- {
-{
-return dev_storage + 596;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/sdz3", 9) == 0)
- {
-{
-return dev_storage + 595;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/sdz2", 9) == 0)
- {
-{
-return dev_storage + 594;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdz1", 9) == 0)
- {
-{
-return dev_storage + 593;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'y':
- switch (KR_keyword [8])
- {
- case 'm':
- if (strncmp (KR_keyword, "/dev/ttym", 9) == 0)
- {
-{
-return dev_storage + 2513;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '9':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty9", 9) == 0)
- {
-{
-return dev_storage + 2394;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdy9", 9) == 0)
- {
-{
-return dev_storage + 586;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '8':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty8", 9) == 0)
- {
-{
-return dev_storage + 2393;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdy8", 9) == 0)
- {
-{
-return dev_storage + 585;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '7':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty7", 9) == 0)
- {
-{
-return dev_storage + 2392;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdy7", 9) == 0)
- {
-{
-return dev_storage + 584;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '6':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty6", 9) == 0)
- {
-{
-return dev_storage + 2391;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdy6", 9) == 0)
- {
-{
-return dev_storage + 583;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '5':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty5", 9) == 0)
- {
-{
-return dev_storage + 2390;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdy5", 9) == 0)
- {
-{
-return dev_storage + 582;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '4':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty4", 9) == 0)
- {
-{
-return dev_storage + 2389;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdy4", 9) == 0)
- {
-{
-return dev_storage + 581;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '3':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty3", 9) == 0)
- {
-{
-return dev_storage + 2388;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdy3", 9) == 0)
- {
-{
-return dev_storage + 580;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '2':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty2", 9) == 0)
- {
-{
-return dev_storage + 2387;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdy2", 9) == 0)
- {
-{
-return dev_storage + 579;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty1", 9) == 0)
- {
-{
-return dev_storage + 2386;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdy1", 9) == 0)
- {
-{
-return dev_storage + 578;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/tty0", 9) == 0)
- {
-{
-return dev_storage + 2385;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'x':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/sdx9", 9) == 0)
- {
-{
-return dev_storage + 571;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/sdx8", 9) == 0)
- {
-{
-return dev_storage + 570;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/sdx7", 9) == 0)
- {
-{
-return dev_storage + 569;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/sdx6", 9) == 0)
- {
-{
-return dev_storage + 568;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/sdx5", 9) == 0)
- {
-{
-return dev_storage + 567;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/sdx4", 9) == 0)
- {
-{
-return dev_storage + 566;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/sdx3", 9) == 0)
- {
-{
-return dev_storage + 565;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/sdx2", 9) == 0)
- {
-{
-return dev_storage + 564;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdx1", 9) == 0)
- {
-{
-return dev_storage + 563;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'w':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/sdw9", 9) == 0)
- {
-{
-return dev_storage + 556;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/sdw8", 9) == 0)
- {
-{
-return dev_storage + 555;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/sdw7", 9) == 0)
- {
-{
-return dev_storage + 554;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/sdw6", 9) == 0)
- {
-{
-return dev_storage + 553;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/sdw5", 9) == 0)
- {
-{
-return dev_storage + 552;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/sdw4", 9) == 0)
- {
-{
-return dev_storage + 551;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/sdw3", 9) == 0)
- {
-{
-return dev_storage + 550;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/sdw2", 9) == 0)
- {
-{
-return dev_storage + 549;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdw1", 9) == 0)
- {
-{
-return dev_storage + 548;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'v':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/sdv9", 9) == 0)
- {
-{
-return dev_storage + 541;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/sdv8", 9) == 0)
- {
-{
-return dev_storage + 540;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/sdv7", 9) == 0)
- {
-{
-return dev_storage + 539;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/sdv6", 9) == 0)
- {
-{
-return dev_storage + 538;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/sdv5", 9) == 0)
- {
-{
-return dev_storage + 537;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/sdv4", 9) == 0)
- {
-{
-return dev_storage + 536;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/sdv3", 9) == 0)
- {
-{
-return dev_storage + 535;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/sdv2", 9) == 0)
- {
-{
-return dev_storage + 534;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdv1", 9) == 0)
- {
-{
-return dev_storage + 533;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'u':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/sdu9", 9) == 0)
- {
-{
-return dev_storage + 526;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/sdu8", 9) == 0)
- {
-{
-return dev_storage + 525;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/sdu7", 9) == 0)
- {
-{
-return dev_storage + 524;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/sdu6", 9) == 0)
- {
-{
-return dev_storage + 523;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/sdu5", 9) == 0)
- {
-{
-return dev_storage + 522;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/sdu4", 9) == 0)
- {
-{
-return dev_storage + 521;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/sdu3", 9) == 0)
- {
-{
-return dev_storage + 520;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/sdu2", 9) == 0)
- {
-{
-return dev_storage + 519;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdu1", 9) == 0)
- {
-{
-return dev_storage + 518;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 't':
- switch (KR_keyword [8])
- {
- case '9':
- switch (KR_keyword [5])
- {
- case 's':
- if (strncmp (KR_keyword, "/dev/sdt9", 9) == 0)
- {
-{
-return dev_storage + 511;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst9", 9) == 0)
- {
-{
-return dev_storage + 52;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '8':
- switch (KR_keyword [5])
- {
- case 's':
- if (strncmp (KR_keyword, "/dev/sdt8", 9) == 0)
- {
-{
-return dev_storage + 510;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst8", 9) == 0)
- {
-{
-return dev_storage + 51;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '7':
- switch (KR_keyword [5])
- {
- case 's':
- if (strncmp (KR_keyword, "/dev/sdt7", 9) == 0)
- {
-{
-return dev_storage + 509;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst7", 9) == 0)
- {
-{
-return dev_storage + 50;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '6':
- switch (KR_keyword [5])
- {
- case 's':
- if (strncmp (KR_keyword, "/dev/sdt6", 9) == 0)
- {
-{
-return dev_storage + 508;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst6", 9) == 0)
- {
-{
-return dev_storage + 49;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '5':
- switch (KR_keyword [5])
- {
- case 's':
- if (strncmp (KR_keyword, "/dev/sdt5", 9) == 0)
- {
-{
-return dev_storage + 507;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst5", 9) == 0)
- {
-{
-return dev_storage + 48;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '4':
- switch (KR_keyword [5])
- {
- case 's':
- if (strncmp (KR_keyword, "/dev/sdt4", 9) == 0)
- {
-{
-return dev_storage + 506;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst4", 9) == 0)
- {
-{
-return dev_storage + 47;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '3':
- switch (KR_keyword [5])
- {
- case 's':
- if (strncmp (KR_keyword, "/dev/sdt3", 9) == 0)
- {
-{
-return dev_storage + 505;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst3", 9) == 0)
- {
-{
-return dev_storage + 46;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '2':
- switch (KR_keyword [5])
- {
- case 's':
- if (strncmp (KR_keyword, "/dev/sdt2", 9) == 0)
- {
-{
-return dev_storage + 504;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst2", 9) == 0)
- {
-{
-return dev_storage + 45;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [5])
- {
- case 's':
- if (strncmp (KR_keyword, "/dev/sdt1", 9) == 0)
- {
-{
-return dev_storage + 503;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst1", 9) == 0)
- {
-{
-return dev_storage + 44;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/nst0", 9) == 0)
- {
-{
-return dev_storage + 43;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 's':
- switch (KR_keyword [8])
- {
- case 'g':
- if (strncmp (KR_keyword, "/dev/kmsg", 9) == 0)
- {
-{
-return dev_storage + 41;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '9':
- if (strncmp (KR_keyword, "/dev/sds9", 9) == 0)
- {
-{
-return dev_storage + 496;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/sds8", 9) == 0)
- {
-{
-return dev_storage + 495;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/sds7", 9) == 0)
- {
-{
-return dev_storage + 494;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/sds6", 9) == 0)
- {
-{
-return dev_storage + 493;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/sds5", 9) == 0)
- {
-{
-return dev_storage + 492;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/sds4", 9) == 0)
- {
-{
-return dev_storage + 491;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/sds3", 9) == 0)
- {
-{
-return dev_storage + 490;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/sds2", 9) == 0)
- {
-{
-return dev_storage + 489;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sds1", 9) == 0)
- {
-{
-return dev_storage + 488;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'r':
- switch (KR_keyword [8])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/port", 9) == 0)
- {
-{
-return dev_storage + 173;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/zero", 9) == 0)
- {
-{
-return dev_storage + 2516;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '9':
- if (strncmp (KR_keyword, "/dev/sdr9", 9) == 0)
- {
-{
-return dev_storage + 481;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/sdr8", 9) == 0)
- {
-{
-return dev_storage + 480;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/sdr7", 9) == 0)
- {
-{
-return dev_storage + 479;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/sdr6", 9) == 0)
- {
-{
-return dev_storage + 478;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/sdr5", 9) == 0)
- {
-{
-return dev_storage + 477;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/sdr4", 9) == 0)
- {
-{
-return dev_storage + 476;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/sdr3", 9) == 0)
- {
-{
-return dev_storage + 475;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/sdr2", 9) == 0)
- {
-{
-return dev_storage + 474;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdr1", 9) == 0)
- {
-{
-return dev_storage + 473;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'q':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/sdq9", 9) == 0)
- {
-{
-return dev_storage + 466;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/sdq8", 9) == 0)
- {
-{
-return dev_storage + 465;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/sdq7", 9) == 0)
- {
-{
-return dev_storage + 464;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/sdq6", 9) == 0)
- {
-{
-return dev_storage + 463;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/sdq5", 9) == 0)
- {
-{
-return dev_storage + 462;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/sdq4", 9) == 0)
- {
-{
-return dev_storage + 461;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/sdq3", 9) == 0)
- {
-{
-return dev_storage + 460;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/sdq2", 9) == 0)
- {
-{
-return dev_storage + 459;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdq1", 9) == 0)
- {
-{
-return dev_storage + 458;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'p':
- switch (KR_keyword [8])
- {
- case 'e':
- if (strncmp (KR_keyword, "/dev/pipe", 9) == 0)
- {
-{
-return dev_storage + 172;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '9':
- if (strncmp (KR_keyword, "/dev/sdp9", 9) == 0)
- {
-{
-return dev_storage + 451;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/sdp8", 9) == 0)
- {
-{
-return dev_storage + 450;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/sdp7", 9) == 0)
- {
-{
-return dev_storage + 449;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/sdp6", 9) == 0)
- {
-{
-return dev_storage + 448;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/sdp5", 9) == 0)
- {
-{
-return dev_storage + 447;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/sdp4", 9) == 0)
- {
-{
-return dev_storage + 446;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/sdp3", 9) == 0)
- {
-{
-return dev_storage + 445;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/sdp2", 9) == 0)
- {
-{
-return dev_storage + 444;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdp1", 9) == 0)
- {
-{
-return dev_storage + 443;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'o':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/sdo9", 9) == 0)
- {
-{
-return dev_storage + 436;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/sdo8", 9) == 0)
- {
-{
-return dev_storage + 435;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/sdo7", 9) == 0)
- {
-{
-return dev_storage + 434;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/sdo6", 9) == 0)
- {
-{
-return dev_storage + 433;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/sdo5", 9) == 0)
- {
-{
-return dev_storage + 432;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/sdo4", 9) == 0)
- {
-{
-return dev_storage + 431;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/sdo3", 9) == 0)
- {
-{
-return dev_storage + 430;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/sdo2", 9) == 0)
- {
-{
-return dev_storage + 429;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdo1", 9) == 0)
- {
-{
-return dev_storage + 428;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'n':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/sdn9", 9) == 0)
- {
-{
-return dev_storage + 421;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/sdn8", 9) == 0)
- {
-{
-return dev_storage + 420;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/sdn7", 9) == 0)
- {
-{
-return dev_storage + 419;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/sdn6", 9) == 0)
- {
-{
-return dev_storage + 418;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/sdn5", 9) == 0)
- {
-{
-return dev_storage + 417;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/sdn4", 9) == 0)
- {
-{
-return dev_storage + 416;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/sdn3", 9) == 0)
- {
-{
-return dev_storage + 415;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/sdn2", 9) == 0)
- {
-{
-return dev_storage + 414;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdn1", 9) == 0)
- {
-{
-return dev_storage + 413;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'm':
- switch (KR_keyword [5])
- {
- case 's':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/sdm9", 9) == 0)
- {
-{
-return dev_storage + 406;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/sdm8", 9) == 0)
- {
-{
-return dev_storage + 405;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/sdm7", 9) == 0)
- {
-{
-return dev_storage + 404;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/sdm6", 9) == 0)
- {
-{
-return dev_storage + 403;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/sdm5", 9) == 0)
- {
-{
-return dev_storage + 402;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/sdm4", 9) == 0)
- {
-{
-return dev_storage + 401;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/sdm3", 9) == 0)
- {
-{
-return dev_storage + 400;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/sdm2", 9) == 0)
- {
-{
-return dev_storage + 399;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdm1", 9) == 0)
- {
-{
-return dev_storage + 398;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/ptmx", 9) == 0)
- {
-{
-return dev_storage + 174;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/com9", 9) == 0)
- {
-{
-return dev_storage + 10;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/com8", 9) == 0)
- {
-{
-return dev_storage + 9;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/com7", 9) == 0)
- {
-{
-return dev_storage + 8;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/com6", 9) == 0)
- {
-{
-return dev_storage + 7;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/com5", 9) == 0)
- {
-{
-return dev_storage + 6;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/com4", 9) == 0)
- {
-{
-return dev_storage + 5;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/com3", 9) == 0)
- {
-{
-return dev_storage + 4;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/com2", 9) == 0)
- {
-{
-return dev_storage + 3;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/com1", 9) == 0)
- {
-{
-return dev_storage + 2;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'l':
- switch (KR_keyword [8])
- {
- case 'l':
- switch (KR_keyword [5])
- {
- case 'n':
- if (strncmp (KR_keyword, "/dev/null", 9) == 0)
- {
-{
-return dev_storage + 171;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/full", 9) == 0)
- {
-{
-return dev_storage + 39;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '9':
- if (strncmp (KR_keyword, "/dev/sdl9", 9) == 0)
- {
-{
-return dev_storage + 391;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/sdl8", 9) == 0)
- {
-{
-return dev_storage + 390;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/sdl7", 9) == 0)
- {
-{
-return dev_storage + 389;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/sdl6", 9) == 0)
- {
-{
-return dev_storage + 388;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/sdl5", 9) == 0)
- {
-{
-return dev_storage + 387;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/sdl4", 9) == 0)
- {
-{
-return dev_storage + 386;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/sdl3", 9) == 0)
- {
-{
-return dev_storage + 385;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/sdl2", 9) == 0)
- {
-{
-return dev_storage + 384;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdl1", 9) == 0)
- {
-{
-return dev_storage + 383;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'k':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/sdk9", 9) == 0)
- {
-{
-return dev_storage + 376;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/sdk8", 9) == 0)
- {
-{
-return dev_storage + 375;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/sdk7", 9) == 0)
- {
-{
-return dev_storage + 374;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/sdk6", 9) == 0)
- {
-{
-return dev_storage + 373;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/sdk5", 9) == 0)
- {
-{
-return dev_storage + 372;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/sdk4", 9) == 0)
- {
-{
-return dev_storage + 371;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/sdk3", 9) == 0)
- {
-{
-return dev_storage + 370;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/sdk2", 9) == 0)
- {
-{
-return dev_storage + 369;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdk1", 9) == 0)
- {
-{
-return dev_storage + 368;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'j':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/sdj9", 9) == 0)
- {
-{
-return dev_storage + 361;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/sdj8", 9) == 0)
- {
-{
-return dev_storage + 360;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/sdj7", 9) == 0)
- {
-{
-return dev_storage + 359;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/sdj6", 9) == 0)
- {
-{
-return dev_storage + 358;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/sdj5", 9) == 0)
- {
-{
-return dev_storage + 357;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/sdj4", 9) == 0)
- {
-{
-return dev_storage + 356;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/sdj3", 9) == 0)
- {
-{
-return dev_storage + 355;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/sdj2", 9) == 0)
- {
-{
-return dev_storage + 354;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdj1", 9) == 0)
- {
-{
-return dev_storage + 353;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'i':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/sdi9", 9) == 0)
- {
-{
-return dev_storage + 346;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/sdi8", 9) == 0)
- {
-{
-return dev_storage + 345;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/sdi7", 9) == 0)
- {
-{
-return dev_storage + 344;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/sdi6", 9) == 0)
- {
-{
-return dev_storage + 343;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/sdi5", 9) == 0)
- {
-{
-return dev_storage + 342;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/sdi4", 9) == 0)
- {
-{
-return dev_storage + 341;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/sdi3", 9) == 0)
- {
-{
-return dev_storage + 340;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/sdi2", 9) == 0)
- {
-{
-return dev_storage + 339;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdi1", 9) == 0)
- {
-{
-return dev_storage + 338;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'h':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/sdh9", 9) == 0)
- {
-{
-return dev_storage + 331;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/sdh8", 9) == 0)
- {
-{
-return dev_storage + 330;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/sdh7", 9) == 0)
- {
-{
-return dev_storage + 329;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/sdh6", 9) == 0)
- {
-{
-return dev_storage + 328;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/sdh5", 9) == 0)
- {
-{
-return dev_storage + 327;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/sdh4", 9) == 0)
- {
-{
-return dev_storage + 326;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/sdh3", 9) == 0)
- {
-{
-return dev_storage + 325;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/sdh2", 9) == 0)
- {
-{
-return dev_storage + 324;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdh1", 9) == 0)
- {
-{
-return dev_storage + 323;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'g':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/sdg9", 9) == 0)
- {
-{
-return dev_storage + 316;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/sdg8", 9) == 0)
- {
-{
-return dev_storage + 315;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/sdg7", 9) == 0)
- {
-{
-return dev_storage + 314;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/sdg6", 9) == 0)
- {
-{
-return dev_storage + 313;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/sdg5", 9) == 0)
- {
-{
-return dev_storage + 312;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/sdg4", 9) == 0)
- {
-{
-return dev_storage + 311;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/sdg3", 9) == 0)
- {
-{
-return dev_storage + 310;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/sdg2", 9) == 0)
- {
-{
-return dev_storage + 309;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdg1", 9) == 0)
- {
-{
-return dev_storage + 308;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'f':
- switch (KR_keyword [8])
- {
- case 'o':
- if (strncmp (KR_keyword, "/dev/fifo", 9) == 0)
- {
-{
-return dev_storage + 38;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '9':
- if (strncmp (KR_keyword, "/dev/sdf9", 9) == 0)
- {
-{
-return dev_storage + 301;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/sdf8", 9) == 0)
- {
-{
-return dev_storage + 300;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/sdf7", 9) == 0)
- {
-{
-return dev_storage + 299;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/sdf6", 9) == 0)
- {
-{
-return dev_storage + 298;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/sdf5", 9) == 0)
- {
-{
-return dev_storage + 297;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/sdf4", 9) == 0)
- {
-{
-return dev_storage + 296;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/sdf3", 9) == 0)
- {
-{
-return dev_storage + 295;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/sdf2", 9) == 0)
- {
-{
-return dev_storage + 294;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdf1", 9) == 0)
- {
-{
-return dev_storage + 293;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'e':
- switch (KR_keyword [8])
- {
- case 'm':
- if (strncmp (KR_keyword, "/dev/kmem", 9) == 0)
- {
-{
-return dev_storage + 40;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '9':
- if (strncmp (KR_keyword, "/dev/sde9", 9) == 0)
- {
-{
-return dev_storage + 286;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/sde8", 9) == 0)
- {
-{
-return dev_storage + 285;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/sde7", 9) == 0)
- {
-{
-return dev_storage + 284;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/sde6", 9) == 0)
- {
-{
-return dev_storage + 283;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/sde5", 9) == 0)
- {
-{
-return dev_storage + 282;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/sde4", 9) == 0)
- {
-{
-return dev_storage + 281;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/sde3", 9) == 0)
- {
-{
-return dev_storage + 280;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/sde2", 9) == 0)
- {
-{
-return dev_storage + 279;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sde1", 9) == 0)
- {
-{
-return dev_storage + 278;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'd':
- switch (KR_keyword [8])
- {
- case 'x':
- if (strncmp (KR_keyword, "/dev/sddx", 9) == 0)
- {
-{
-return dev_storage + 1879;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sddw", 9) == 0)
- {
-{
-return dev_storage + 1878;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sddv", 9) == 0)
- {
-{
-return dev_storage + 1877;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sddu", 9) == 0)
- {
-{
-return dev_storage + 1876;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sddt", 9) == 0)
- {
-{
-return dev_storage + 1875;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdds", 9) == 0)
- {
-{
-return dev_storage + 1874;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sddr", 9) == 0)
- {
-{
-return dev_storage + 1873;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sddq", 9) == 0)
- {
-{
-return dev_storage + 1872;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sddp", 9) == 0)
- {
-{
-return dev_storage + 1871;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sddo", 9) == 0)
- {
-{
-return dev_storage + 1870;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sddn", 9) == 0)
- {
-{
-return dev_storage + 1869;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sddm", 9) == 0)
- {
-{
-return dev_storage + 1868;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sddl", 9) == 0)
- {
-{
-return dev_storage + 1867;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sddk", 9) == 0)
- {
-{
-return dev_storage + 1866;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sddj", 9) == 0)
- {
-{
-return dev_storage + 1865;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sddi", 9) == 0)
- {
-{
-return dev_storage + 1864;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sddh", 9) == 0)
- {
-{
-return dev_storage + 1863;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sddg", 9) == 0)
- {
-{
-return dev_storage + 1862;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sddf", 9) == 0)
- {
-{
-return dev_storage + 1861;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdde", 9) == 0)
- {
-{
-return dev_storage + 1860;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddd", 9) == 0)
- {
-{
-return dev_storage + 1859;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sddc", 9) == 0)
- {
-{
-return dev_storage + 1858;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sddb", 9) == 0)
- {
-{
-return dev_storage + 1857;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdda", 9) == 0)
- {
-{
-return dev_storage + 1856;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '9':
- switch (KR_keyword [6])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdd9", 9) == 0)
- {
-{
-return dev_storage + 271;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/scd9", 9) == 0)
- {
-{
-return dev_storage + 185;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '8':
- switch (KR_keyword [6])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdd8", 9) == 0)
- {
-{
-return dev_storage + 270;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/scd8", 9) == 0)
- {
-{
-return dev_storage + 184;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '7':
- switch (KR_keyword [6])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdd7", 9) == 0)
- {
-{
-return dev_storage + 269;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/scd7", 9) == 0)
- {
-{
-return dev_storage + 183;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '6':
- switch (KR_keyword [6])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdd6", 9) == 0)
- {
-{
-return dev_storage + 268;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/scd6", 9) == 0)
- {
-{
-return dev_storage + 182;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '5':
- switch (KR_keyword [6])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdd5", 9) == 0)
- {
-{
-return dev_storage + 267;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/scd5", 9) == 0)
- {
-{
-return dev_storage + 181;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '4':
- switch (KR_keyword [6])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdd4", 9) == 0)
- {
-{
-return dev_storage + 266;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/scd4", 9) == 0)
- {
-{
-return dev_storage + 180;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '3':
- switch (KR_keyword [6])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdd3", 9) == 0)
- {
-{
-return dev_storage + 265;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/scd3", 9) == 0)
- {
-{
-return dev_storage + 179;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '2':
- switch (KR_keyword [6])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdd2", 9) == 0)
- {
-{
-return dev_storage + 264;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/scd2", 9) == 0)
- {
-{
-return dev_storage + 178;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [6])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdd1", 9) == 0)
- {
-{
-return dev_storage + 263;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/scd1", 9) == 0)
- {
-{
-return dev_storage + 177;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/scd0", 9) == 0)
- {
-{
-return dev_storage + 176;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'c':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdcz", 9) == 0)
- {
-{
-return dev_storage + 1465;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sdcy", 9) == 0)
- {
-{
-return dev_storage + 1464;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdcx", 9) == 0)
- {
-{
-return dev_storage + 1463;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdcw", 9) == 0)
- {
-{
-return dev_storage + 1462;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdcv", 9) == 0)
- {
-{
-return dev_storage + 1461;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdcu", 9) == 0)
- {
-{
-return dev_storage + 1460;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdct", 9) == 0)
- {
-{
-return dev_storage + 1459;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdcs", 9) == 0)
- {
-{
-return dev_storage + 1458;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdcr", 9) == 0)
- {
-{
-return dev_storage + 1457;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdcq", 9) == 0)
- {
-{
-return dev_storage + 1456;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdcp", 9) == 0)
- {
-{
-return dev_storage + 1455;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdco", 9) == 0)
- {
-{
-return dev_storage + 1454;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdcn", 9) == 0)
- {
-{
-return dev_storage + 1453;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdcm", 9) == 0)
- {
-{
-return dev_storage + 1452;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdcl", 9) == 0)
- {
-{
-return dev_storage + 1451;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdck", 9) == 0)
- {
-{
-return dev_storage + 1450;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdcj", 9) == 0)
- {
-{
-return dev_storage + 1449;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdci", 9) == 0)
- {
-{
-return dev_storage + 1448;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdch", 9) == 0)
- {
-{
-return dev_storage + 1447;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdcg", 9) == 0)
- {
-{
-return dev_storage + 1446;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdcf", 9) == 0)
- {
-{
-return dev_storage + 1445;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdce", 9) == 0)
- {
-{
-return dev_storage + 1444;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdcd", 9) == 0)
- {
-{
-return dev_storage + 1443;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcc", 9) == 0)
- {
-{
-return dev_storage + 1442;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdcb", 9) == 0)
- {
-{
-return dev_storage + 1441;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdca", 9) == 0)
- {
-{
-return dev_storage + 1440;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '9':
- if (strncmp (KR_keyword, "/dev/sdc9", 9) == 0)
- {
-{
-return dev_storage + 256;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/sdc8", 9) == 0)
- {
-{
-return dev_storage + 255;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/sdc7", 9) == 0)
- {
-{
-return dev_storage + 254;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/sdc6", 9) == 0)
- {
-{
-return dev_storage + 253;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/sdc5", 9) == 0)
- {
-{
-return dev_storage + 252;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/sdc4", 9) == 0)
- {
-{
-return dev_storage + 251;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/sdc3", 9) == 0)
- {
-{
-return dev_storage + 250;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/sdc2", 9) == 0)
- {
-{
-return dev_storage + 249;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdc1", 9) == 0)
- {
-{
-return dev_storage + 248;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'b':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdbz", 9) == 0)
- {
-{
-return dev_storage + 1049;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sdby", 9) == 0)
- {
-{
-return dev_storage + 1048;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdbx", 9) == 0)
- {
-{
-return dev_storage + 1047;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdbw", 9) == 0)
- {
-{
-return dev_storage + 1046;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdbv", 9) == 0)
- {
-{
-return dev_storage + 1045;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdbu", 9) == 0)
- {
-{
-return dev_storage + 1044;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdbt", 9) == 0)
- {
-{
-return dev_storage + 1043;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdbs", 9) == 0)
- {
-{
-return dev_storage + 1042;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdbr", 9) == 0)
- {
-{
-return dev_storage + 1041;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdbq", 9) == 0)
- {
-{
-return dev_storage + 1040;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdbp", 9) == 0)
- {
-{
-return dev_storage + 1039;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdbo", 9) == 0)
- {
-{
-return dev_storage + 1038;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdbn", 9) == 0)
- {
-{
-return dev_storage + 1037;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdbm", 9) == 0)
- {
-{
-return dev_storage + 1036;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdbl", 9) == 0)
- {
-{
-return dev_storage + 1035;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdbk", 9) == 0)
- {
-{
-return dev_storage + 1034;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdbj", 9) == 0)
- {
-{
-return dev_storage + 1033;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdbi", 9) == 0)
- {
-{
-return dev_storage + 1032;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdbh", 9) == 0)
- {
-{
-return dev_storage + 1031;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdbg", 9) == 0)
- {
-{
-return dev_storage + 1030;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdbf", 9) == 0)
- {
-{
-return dev_storage + 1029;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdbe", 9) == 0)
- {
-{
-return dev_storage + 1028;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdbd", 9) == 0)
- {
-{
-return dev_storage + 1027;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdbc", 9) == 0)
- {
-{
-return dev_storage + 1026;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbb", 9) == 0)
- {
-{
-return dev_storage + 1025;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdba", 9) == 0)
- {
-{
-return dev_storage + 1024;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '9':
- if (strncmp (KR_keyword, "/dev/sdb9", 9) == 0)
- {
-{
-return dev_storage + 241;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/sdb8", 9) == 0)
- {
-{
-return dev_storage + 240;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/sdb7", 9) == 0)
- {
-{
-return dev_storage + 239;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/sdb6", 9) == 0)
- {
-{
-return dev_storage + 238;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/sdb5", 9) == 0)
- {
-{
-return dev_storage + 237;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/sdb4", 9) == 0)
- {
-{
-return dev_storage + 236;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/sdb3", 9) == 0)
- {
-{
-return dev_storage + 235;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/sdb2", 9) == 0)
- {
-{
-return dev_storage + 234;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdb1", 9) == 0)
- {
-{
-return dev_storage + 233;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'a':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdaz", 9) == 0)
- {
-{
-return dev_storage + 633;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sday", 9) == 0)
- {
-{
-return dev_storage + 632;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdax", 9) == 0)
- {
-{
-return dev_storage + 631;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdaw", 9) == 0)
- {
-{
-return dev_storage + 630;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdav", 9) == 0)
- {
-{
-return dev_storage + 629;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdau", 9) == 0)
- {
-{
-return dev_storage + 628;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdat", 9) == 0)
- {
-{
-return dev_storage + 627;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdas", 9) == 0)
- {
-{
-return dev_storage + 626;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdar", 9) == 0)
- {
-{
-return dev_storage + 625;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdaq", 9) == 0)
- {
-{
-return dev_storage + 624;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdap", 9) == 0)
- {
-{
-return dev_storage + 623;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdao", 9) == 0)
- {
-{
-return dev_storage + 622;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdan", 9) == 0)
- {
-{
-return dev_storage + 621;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdam", 9) == 0)
- {
-{
-return dev_storage + 620;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdal", 9) == 0)
- {
-{
-return dev_storage + 619;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdak", 9) == 0)
- {
-{
-return dev_storage + 618;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdaj", 9) == 0)
- {
-{
-return dev_storage + 617;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdai", 9) == 0)
- {
-{
-return dev_storage + 616;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdah", 9) == 0)
- {
-{
-return dev_storage + 615;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdag", 9) == 0)
- {
-{
-return dev_storage + 614;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdaf", 9) == 0)
- {
-{
-return dev_storage + 613;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdae", 9) == 0)
- {
-{
-return dev_storage + 612;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdad", 9) == 0)
- {
-{
-return dev_storage + 611;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdac", 9) == 0)
- {
-{
-return dev_storage + 610;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdab", 9) == 0)
- {
-{
-return dev_storage + 609;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaa", 9) == 0)
- {
-{
-return dev_storage + 608;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '9':
- if (strncmp (KR_keyword, "/dev/sda9", 9) == 0)
- {
-{
-return dev_storage + 226;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/sda8", 9) == 0)
- {
-{
-return dev_storage + 225;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/sda7", 9) == 0)
- {
-{
-return dev_storage + 224;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/sda6", 9) == 0)
- {
-{
-return dev_storage + 223;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/sda5", 9) == 0)
- {
-{
-return dev_storage + 222;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/sda4", 9) == 0)
- {
-{
-return dev_storage + 221;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/sda3", 9) == 0)
- {
-{
-return dev_storage + 220;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/sda2", 9) == 0)
- {
-{
-return dev_storage + 219;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sda1", 9) == 0)
- {
-{
-return dev_storage + 218;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '9':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/st99", 9) == 0)
- {
-{
-return dev_storage + 2355;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/st98", 9) == 0)
- {
-{
-return dev_storage + 2354;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/st97", 9) == 0)
- {
-{
-return dev_storage + 2353;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/st96", 9) == 0)
- {
-{
-return dev_storage + 2352;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/st95", 9) == 0)
- {
-{
-return dev_storage + 2351;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/st94", 9) == 0)
- {
-{
-return dev_storage + 2350;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/st93", 9) == 0)
- {
-{
-return dev_storage + 2349;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/st92", 9) == 0)
- {
-{
-return dev_storage + 2348;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/st91", 9) == 0)
- {
-{
-return dev_storage + 2347;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/st90", 9) == 0)
- {
-{
-return dev_storage + 2346;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '8':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/st89", 9) == 0)
- {
-{
-return dev_storage + 2345;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/st88", 9) == 0)
- {
-{
-return dev_storage + 2344;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/st87", 9) == 0)
- {
-{
-return dev_storage + 2343;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/st86", 9) == 0)
- {
-{
-return dev_storage + 2342;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/st85", 9) == 0)
- {
-{
-return dev_storage + 2341;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/st84", 9) == 0)
- {
-{
-return dev_storage + 2340;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/st83", 9) == 0)
- {
-{
-return dev_storage + 2339;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/st82", 9) == 0)
- {
-{
-return dev_storage + 2338;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/st81", 9) == 0)
- {
-{
-return dev_storage + 2337;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/st80", 9) == 0)
- {
-{
-return dev_storage + 2336;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '7':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/st79", 9) == 0)
- {
-{
-return dev_storage + 2335;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/st78", 9) == 0)
- {
-{
-return dev_storage + 2334;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/st77", 9) == 0)
- {
-{
-return dev_storage + 2333;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/st76", 9) == 0)
- {
-{
-return dev_storage + 2332;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/st75", 9) == 0)
- {
-{
-return dev_storage + 2331;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/st74", 9) == 0)
- {
-{
-return dev_storage + 2330;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/st73", 9) == 0)
- {
-{
-return dev_storage + 2329;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/st72", 9) == 0)
- {
-{
-return dev_storage + 2328;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/st71", 9) == 0)
- {
-{
-return dev_storage + 2327;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/st70", 9) == 0)
- {
-{
-return dev_storage + 2326;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '6':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/st69", 9) == 0)
- {
-{
-return dev_storage + 2325;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/st68", 9) == 0)
- {
-{
-return dev_storage + 2324;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/st67", 9) == 0)
- {
-{
-return dev_storage + 2323;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/st66", 9) == 0)
- {
-{
-return dev_storage + 2322;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/st65", 9) == 0)
- {
-{
-return dev_storage + 2321;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/st64", 9) == 0)
- {
-{
-return dev_storage + 2320;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/st63", 9) == 0)
- {
-{
-return dev_storage + 2319;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/st62", 9) == 0)
- {
-{
-return dev_storage + 2318;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/st61", 9) == 0)
- {
-{
-return dev_storage + 2317;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/st60", 9) == 0)
- {
-{
-return dev_storage + 2316;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '5':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/st59", 9) == 0)
- {
-{
-return dev_storage + 2315;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/st58", 9) == 0)
- {
-{
-return dev_storage + 2314;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/st57", 9) == 0)
- {
-{
-return dev_storage + 2313;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/st56", 9) == 0)
- {
-{
-return dev_storage + 2312;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/st55", 9) == 0)
- {
-{
-return dev_storage + 2311;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/st54", 9) == 0)
- {
-{
-return dev_storage + 2310;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/st53", 9) == 0)
- {
-{
-return dev_storage + 2309;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/st52", 9) == 0)
- {
-{
-return dev_storage + 2308;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/st51", 9) == 0)
- {
-{
-return dev_storage + 2307;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/st50", 9) == 0)
- {
-{
-return dev_storage + 2306;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '4':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/st49", 9) == 0)
- {
-{
-return dev_storage + 2305;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/st48", 9) == 0)
- {
-{
-return dev_storage + 2304;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/st47", 9) == 0)
- {
-{
-return dev_storage + 2303;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/st46", 9) == 0)
- {
-{
-return dev_storage + 2302;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/st45", 9) == 0)
- {
-{
-return dev_storage + 2301;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/st44", 9) == 0)
- {
-{
-return dev_storage + 2300;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/st43", 9) == 0)
- {
-{
-return dev_storage + 2299;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/st42", 9) == 0)
- {
-{
-return dev_storage + 2298;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/st41", 9) == 0)
- {
-{
-return dev_storage + 2297;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/st40", 9) == 0)
- {
-{
-return dev_storage + 2296;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '3':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/st39", 9) == 0)
- {
-{
-return dev_storage + 2295;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/st38", 9) == 0)
- {
-{
-return dev_storage + 2294;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/st37", 9) == 0)
- {
-{
-return dev_storage + 2293;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/st36", 9) == 0)
- {
-{
-return dev_storage + 2292;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/st35", 9) == 0)
- {
-{
-return dev_storage + 2291;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/st34", 9) == 0)
- {
-{
-return dev_storage + 2290;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/st33", 9) == 0)
- {
-{
-return dev_storage + 2289;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/st32", 9) == 0)
- {
-{
-return dev_storage + 2288;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/st31", 9) == 0)
- {
-{
-return dev_storage + 2287;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/st30", 9) == 0)
- {
-{
-return dev_storage + 2286;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '2':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/st29", 9) == 0)
- {
-{
-return dev_storage + 2285;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/st28", 9) == 0)
- {
-{
-return dev_storage + 2284;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/st27", 9) == 0)
- {
-{
-return dev_storage + 2283;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/st26", 9) == 0)
- {
-{
-return dev_storage + 2282;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/st25", 9) == 0)
- {
-{
-return dev_storage + 2281;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/st24", 9) == 0)
- {
-{
-return dev_storage + 2280;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/st23", 9) == 0)
- {
-{
-return dev_storage + 2279;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/st22", 9) == 0)
- {
-{
-return dev_storage + 2278;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/st21", 9) == 0)
- {
-{
-return dev_storage + 2277;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/st20", 9) == 0)
- {
-{
-return dev_storage + 2276;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/st19", 9) == 0)
- {
-{
-return dev_storage + 2275;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/st18", 9) == 0)
- {
-{
-return dev_storage + 2274;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/st17", 9) == 0)
- {
-{
-return dev_storage + 2273;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/st16", 9) == 0)
- {
-{
-return dev_storage + 2272;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- switch (KR_keyword [6])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/st15", 9) == 0)
- {
-{
-return dev_storage + 2271;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sr15", 9) == 0)
- {
-{
-return dev_storage + 2255;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/fd15", 9) == 0)
- {
-{
-return dev_storage + 37;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '4':
- switch (KR_keyword [6])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/st14", 9) == 0)
- {
-{
-return dev_storage + 2270;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sr14", 9) == 0)
- {
-{
-return dev_storage + 2254;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/fd14", 9) == 0)
- {
-{
-return dev_storage + 36;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '3':
- switch (KR_keyword [6])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/st13", 9) == 0)
- {
-{
-return dev_storage + 2269;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sr13", 9) == 0)
- {
-{
-return dev_storage + 2253;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/fd13", 9) == 0)
- {
-{
-return dev_storage + 35;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '2':
- switch (KR_keyword [6])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/st12", 9) == 0)
- {
-{
-return dev_storage + 2268;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sr12", 9) == 0)
- {
-{
-return dev_storage + 2252;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/fd12", 9) == 0)
- {
-{
-return dev_storage + 34;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [6])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/st11", 9) == 0)
- {
-{
-return dev_storage + 2267;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sr11", 9) == 0)
- {
-{
-return dev_storage + 2251;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/fd11", 9) == 0)
- {
-{
-return dev_storage + 33;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '0':
- switch (KR_keyword [6])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/st10", 9) == 0)
- {
-{
-return dev_storage + 2266;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sr10", 9) == 0)
- {
-{
-return dev_storage + 2250;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/fd10", 9) == 0)
- {
-{
-return dev_storage + 32;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 10:
- switch (KR_keyword [9])
- {
- case 'n':
- if (strncmp (KR_keyword, "/dev/conin", 10) == 0)
- {
-{
-return dev_storage + 18;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '9':
- switch (KR_keyword [8])
- {
- case 'z':
- switch (KR_keyword [7])
- {
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcz9", 10) == 0)
- {
-{
-return dev_storage + 1849;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbz9", 10) == 0)
- {
-{
-return dev_storage + 1433;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaz9", 10) == 0)
- {
-{
-return dev_storage + 1017;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'y':
- switch (KR_keyword [7])
- {
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcy9", 10) == 0)
- {
-{
-return dev_storage + 1834;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdby9", 10) == 0)
- {
-{
-return dev_storage + 1418;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sday9", 10) == 0)
- {
-{
-return dev_storage + 1002;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'x':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddx9", 10) == 0)
- {
-{
-return dev_storage + 2233;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcx9", 10) == 0)
- {
-{
-return dev_storage + 1819;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbx9", 10) == 0)
- {
-{
-return dev_storage + 1403;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdax9", 10) == 0)
- {
-{
-return dev_storage + 987;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'w':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddw9", 10) == 0)
- {
-{
-return dev_storage + 2218;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcw9", 10) == 0)
- {
-{
-return dev_storage + 1804;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbw9", 10) == 0)
- {
-{
-return dev_storage + 1388;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaw9", 10) == 0)
- {
-{
-return dev_storage + 972;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'v':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddv9", 10) == 0)
- {
-{
-return dev_storage + 2203;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcv9", 10) == 0)
- {
-{
-return dev_storage + 1789;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbv9", 10) == 0)
- {
-{
-return dev_storage + 1373;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdav9", 10) == 0)
- {
-{
-return dev_storage + 957;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'u':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddu9", 10) == 0)
- {
-{
-return dev_storage + 2188;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcu9", 10) == 0)
- {
-{
-return dev_storage + 1774;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbu9", 10) == 0)
- {
-{
-return dev_storage + 1358;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdau9", 10) == 0)
- {
-{
-return dev_storage + 942;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 't':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddt9", 10) == 0)
- {
-{
-return dev_storage + 2173;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdct9", 10) == 0)
- {
-{
-return dev_storage + 1759;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbt9", 10) == 0)
- {
-{
-return dev_storage + 1343;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdat9", 10) == 0)
- {
-{
-return dev_storage + 927;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 's':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdds9", 10) == 0)
- {
-{
-return dev_storage + 2158;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcs9", 10) == 0)
- {
-{
-return dev_storage + 1744;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbs9", 10) == 0)
- {
-{
-return dev_storage + 1328;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdas9", 10) == 0)
- {
-{
-return dev_storage + 912;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'r':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddr9", 10) == 0)
- {
-{
-return dev_storage + 2143;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcr9", 10) == 0)
- {
-{
-return dev_storage + 1729;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbr9", 10) == 0)
- {
-{
-return dev_storage + 1313;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdar9", 10) == 0)
- {
-{
-return dev_storage + 897;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'q':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddq9", 10) == 0)
- {
-{
-return dev_storage + 2128;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcq9", 10) == 0)
- {
-{
-return dev_storage + 1714;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbq9", 10) == 0)
- {
-{
-return dev_storage + 1298;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaq9", 10) == 0)
- {
-{
-return dev_storage + 882;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'p':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddp9", 10) == 0)
- {
-{
-return dev_storage + 2113;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcp9", 10) == 0)
- {
-{
-return dev_storage + 1699;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbp9", 10) == 0)
- {
-{
-return dev_storage + 1283;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdap9", 10) == 0)
- {
-{
-return dev_storage + 867;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'o':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddo9", 10) == 0)
- {
-{
-return dev_storage + 2098;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdco9", 10) == 0)
- {
-{
-return dev_storage + 1684;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbo9", 10) == 0)
- {
-{
-return dev_storage + 1268;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdao9", 10) == 0)
- {
-{
-return dev_storage + 852;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'n':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddn9", 10) == 0)
- {
-{
-return dev_storage + 2083;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcn9", 10) == 0)
- {
-{
-return dev_storage + 1669;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbn9", 10) == 0)
- {
-{
-return dev_storage + 1253;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdan9", 10) == 0)
- {
-{
-return dev_storage + 837;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'm':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddm9", 10) == 0)
- {
-{
-return dev_storage + 2068;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcm9", 10) == 0)
- {
-{
-return dev_storage + 1654;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbm9", 10) == 0)
- {
-{
-return dev_storage + 1238;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdam9", 10) == 0)
- {
-{
-return dev_storage + 822;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'l':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddl9", 10) == 0)
- {
-{
-return dev_storage + 2053;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcl9", 10) == 0)
- {
-{
-return dev_storage + 1639;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbl9", 10) == 0)
- {
-{
-return dev_storage + 1223;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdal9", 10) == 0)
- {
-{
-return dev_storage + 807;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'k':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddk9", 10) == 0)
- {
-{
-return dev_storage + 2038;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdck9", 10) == 0)
- {
-{
-return dev_storage + 1624;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbk9", 10) == 0)
- {
-{
-return dev_storage + 1208;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdak9", 10) == 0)
- {
-{
-return dev_storage + 792;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'j':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddj9", 10) == 0)
- {
-{
-return dev_storage + 2023;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcj9", 10) == 0)
- {
-{
-return dev_storage + 1609;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbj9", 10) == 0)
- {
-{
-return dev_storage + 1193;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaj9", 10) == 0)
- {
-{
-return dev_storage + 777;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'i':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddi9", 10) == 0)
- {
-{
-return dev_storage + 2008;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdci9", 10) == 0)
- {
-{
-return dev_storage + 1594;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbi9", 10) == 0)
- {
-{
-return dev_storage + 1178;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdai9", 10) == 0)
- {
-{
-return dev_storage + 762;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'h':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddh9", 10) == 0)
- {
-{
-return dev_storage + 1993;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdch9", 10) == 0)
- {
-{
-return dev_storage + 1579;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbh9", 10) == 0)
- {
-{
-return dev_storage + 1163;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdah9", 10) == 0)
- {
-{
-return dev_storage + 747;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'g':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddg9", 10) == 0)
- {
-{
-return dev_storage + 1978;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcg9", 10) == 0)
- {
-{
-return dev_storage + 1564;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbg9", 10) == 0)
- {
-{
-return dev_storage + 1148;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdag9", 10) == 0)
- {
-{
-return dev_storage + 732;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'f':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddf9", 10) == 0)
- {
-{
-return dev_storage + 1963;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcf9", 10) == 0)
- {
-{
-return dev_storage + 1549;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbf9", 10) == 0)
- {
-{
-return dev_storage + 1133;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaf9", 10) == 0)
- {
-{
-return dev_storage + 717;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'e':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdde9", 10) == 0)
- {
-{
-return dev_storage + 1948;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdce9", 10) == 0)
- {
-{
-return dev_storage + 1534;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbe9", 10) == 0)
- {
-{
-return dev_storage + 1118;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdae9", 10) == 0)
- {
-{
-return dev_storage + 702;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'd':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddd9", 10) == 0)
- {
-{
-return dev_storage + 1933;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcd9", 10) == 0)
- {
-{
-return dev_storage + 1519;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbd9", 10) == 0)
- {
-{
-return dev_storage + 1103;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdad9", 10) == 0)
- {
-{
-return dev_storage + 687;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'c':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddc9", 10) == 0)
- {
-{
-return dev_storage + 1918;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcc9", 10) == 0)
- {
-{
-return dev_storage + 1504;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbc9", 10) == 0)
- {
-{
-return dev_storage + 1088;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdac9", 10) == 0)
- {
-{
-return dev_storage + 672;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'b':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddb9", 10) == 0)
- {
-{
-return dev_storage + 1903;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcb9", 10) == 0)
- {
-{
-return dev_storage + 1489;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbb9", 10) == 0)
- {
-{
-return dev_storage + 1073;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdab9", 10) == 0)
- {
-{
-return dev_storage + 657;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'a':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdda9", 10) == 0)
- {
-{
-return dev_storage + 1888;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdca9", 10) == 0)
- {
-{
-return dev_storage + 1474;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdba9", 10) == 0)
- {
-{
-return dev_storage + 1058;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaa9", 10) == 0)
- {
-{
-return dev_storage + 642;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'S':
- if (strncmp (KR_keyword, "/dev/ttyS9", 10) == 0)
- {
-{
-return dev_storage + 2458;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '9':
- if (strncmp (KR_keyword, "/dev/nst99", 10) == 0)
- {
-{
-return dev_storage + 142;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/nst89", 10) == 0)
- {
-{
-return dev_storage + 132;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/nst79", 10) == 0)
- {
-{
-return dev_storage + 122;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/nst69", 10) == 0)
- {
-{
-return dev_storage + 112;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty59", 10) == 0)
- {
-{
-return dev_storage + 2444;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst59", 10) == 0)
- {
-{
-return dev_storage + 102;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '4':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty49", 10) == 0)
- {
-{
-return dev_storage + 2434;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst49", 10) == 0)
- {
-{
-return dev_storage + 92;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '3':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty39", 10) == 0)
- {
-{
-return dev_storage + 2424;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst39", 10) == 0)
- {
-{
-return dev_storage + 82;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '2':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty29", 10) == 0)
- {
-{
-return dev_storage + 2414;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst29", 10) == 0)
- {
-{
-return dev_storage + 72;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty19", 10) == 0)
- {
-{
-return dev_storage + 2404;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/st119", 10) == 0)
- {
-{
-return dev_storage + 2375;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst19", 10) == 0)
- {
-{
-return dev_storage + 62;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/st109", 10) == 0)
- {
-{
-return dev_storage + 2365;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '8':
- switch (KR_keyword [8])
- {
- case 'z':
- switch (KR_keyword [7])
- {
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcz8", 10) == 0)
- {
-{
-return dev_storage + 1848;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbz8", 10) == 0)
- {
-{
-return dev_storage + 1432;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaz8", 10) == 0)
- {
-{
-return dev_storage + 1016;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'y':
- switch (KR_keyword [7])
- {
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcy8", 10) == 0)
- {
-{
-return dev_storage + 1833;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdby8", 10) == 0)
- {
-{
-return dev_storage + 1417;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sday8", 10) == 0)
- {
-{
-return dev_storage + 1001;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'x':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddx8", 10) == 0)
- {
-{
-return dev_storage + 2232;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcx8", 10) == 0)
- {
-{
-return dev_storage + 1818;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbx8", 10) == 0)
- {
-{
-return dev_storage + 1402;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdax8", 10) == 0)
- {
-{
-return dev_storage + 986;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'w':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddw8", 10) == 0)
- {
-{
-return dev_storage + 2217;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcw8", 10) == 0)
- {
-{
-return dev_storage + 1803;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbw8", 10) == 0)
- {
-{
-return dev_storage + 1387;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaw8", 10) == 0)
- {
-{
-return dev_storage + 971;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'v':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddv8", 10) == 0)
- {
-{
-return dev_storage + 2202;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcv8", 10) == 0)
- {
-{
-return dev_storage + 1788;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbv8", 10) == 0)
- {
-{
-return dev_storage + 1372;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdav8", 10) == 0)
- {
-{
-return dev_storage + 956;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'u':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddu8", 10) == 0)
- {
-{
-return dev_storage + 2187;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcu8", 10) == 0)
- {
-{
-return dev_storage + 1773;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbu8", 10) == 0)
- {
-{
-return dev_storage + 1357;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdau8", 10) == 0)
- {
-{
-return dev_storage + 941;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 't':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddt8", 10) == 0)
- {
-{
-return dev_storage + 2172;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdct8", 10) == 0)
- {
-{
-return dev_storage + 1758;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbt8", 10) == 0)
- {
-{
-return dev_storage + 1342;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdat8", 10) == 0)
- {
-{
-return dev_storage + 926;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 's':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdds8", 10) == 0)
- {
-{
-return dev_storage + 2157;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcs8", 10) == 0)
- {
-{
-return dev_storage + 1743;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbs8", 10) == 0)
- {
-{
-return dev_storage + 1327;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdas8", 10) == 0)
- {
-{
-return dev_storage + 911;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'r':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddr8", 10) == 0)
- {
-{
-return dev_storage + 2142;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcr8", 10) == 0)
- {
-{
-return dev_storage + 1728;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbr8", 10) == 0)
- {
-{
-return dev_storage + 1312;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdar8", 10) == 0)
- {
-{
-return dev_storage + 896;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'q':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddq8", 10) == 0)
- {
-{
-return dev_storage + 2127;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcq8", 10) == 0)
- {
-{
-return dev_storage + 1713;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbq8", 10) == 0)
- {
-{
-return dev_storage + 1297;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaq8", 10) == 0)
- {
-{
-return dev_storage + 881;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'p':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddp8", 10) == 0)
- {
-{
-return dev_storage + 2112;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcp8", 10) == 0)
- {
-{
-return dev_storage + 1698;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbp8", 10) == 0)
- {
-{
-return dev_storage + 1282;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdap8", 10) == 0)
- {
-{
-return dev_storage + 866;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'o':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddo8", 10) == 0)
- {
-{
-return dev_storage + 2097;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdco8", 10) == 0)
- {
-{
-return dev_storage + 1683;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbo8", 10) == 0)
- {
-{
-return dev_storage + 1267;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdao8", 10) == 0)
- {
-{
-return dev_storage + 851;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'n':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddn8", 10) == 0)
- {
-{
-return dev_storage + 2082;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcn8", 10) == 0)
- {
-{
-return dev_storage + 1668;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbn8", 10) == 0)
- {
-{
-return dev_storage + 1252;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdan8", 10) == 0)
- {
-{
-return dev_storage + 836;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'm':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddm8", 10) == 0)
- {
-{
-return dev_storage + 2067;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcm8", 10) == 0)
- {
-{
-return dev_storage + 1653;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbm8", 10) == 0)
- {
-{
-return dev_storage + 1237;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdam8", 10) == 0)
- {
-{
-return dev_storage + 821;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'l':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddl8", 10) == 0)
- {
-{
-return dev_storage + 2052;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcl8", 10) == 0)
- {
-{
-return dev_storage + 1638;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbl8", 10) == 0)
- {
-{
-return dev_storage + 1222;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdal8", 10) == 0)
- {
-{
-return dev_storage + 806;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'k':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddk8", 10) == 0)
- {
-{
-return dev_storage + 2037;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdck8", 10) == 0)
- {
-{
-return dev_storage + 1623;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbk8", 10) == 0)
- {
-{
-return dev_storage + 1207;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdak8", 10) == 0)
- {
-{
-return dev_storage + 791;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'j':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddj8", 10) == 0)
- {
-{
-return dev_storage + 2022;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcj8", 10) == 0)
- {
-{
-return dev_storage + 1608;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbj8", 10) == 0)
- {
-{
-return dev_storage + 1192;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaj8", 10) == 0)
- {
-{
-return dev_storage + 776;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'i':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddi8", 10) == 0)
- {
-{
-return dev_storage + 2007;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdci8", 10) == 0)
- {
-{
-return dev_storage + 1593;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbi8", 10) == 0)
- {
-{
-return dev_storage + 1177;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdai8", 10) == 0)
- {
-{
-return dev_storage + 761;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'h':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddh8", 10) == 0)
- {
-{
-return dev_storage + 1992;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdch8", 10) == 0)
- {
-{
-return dev_storage + 1578;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbh8", 10) == 0)
- {
-{
-return dev_storage + 1162;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdah8", 10) == 0)
- {
-{
-return dev_storage + 746;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'g':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddg8", 10) == 0)
- {
-{
-return dev_storage + 1977;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcg8", 10) == 0)
- {
-{
-return dev_storage + 1563;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbg8", 10) == 0)
- {
-{
-return dev_storage + 1147;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdag8", 10) == 0)
- {
-{
-return dev_storage + 731;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'f':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddf8", 10) == 0)
- {
-{
-return dev_storage + 1962;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcf8", 10) == 0)
- {
-{
-return dev_storage + 1548;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbf8", 10) == 0)
- {
-{
-return dev_storage + 1132;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaf8", 10) == 0)
- {
-{
-return dev_storage + 716;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'e':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdde8", 10) == 0)
- {
-{
-return dev_storage + 1947;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdce8", 10) == 0)
- {
-{
-return dev_storage + 1533;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbe8", 10) == 0)
- {
-{
-return dev_storage + 1117;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdae8", 10) == 0)
- {
-{
-return dev_storage + 701;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'd':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddd8", 10) == 0)
- {
-{
-return dev_storage + 1932;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcd8", 10) == 0)
- {
-{
-return dev_storage + 1518;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbd8", 10) == 0)
- {
-{
-return dev_storage + 1102;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdad8", 10) == 0)
- {
-{
-return dev_storage + 686;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'c':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddc8", 10) == 0)
- {
-{
-return dev_storage + 1917;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcc8", 10) == 0)
- {
-{
-return dev_storage + 1503;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbc8", 10) == 0)
- {
-{
-return dev_storage + 1087;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdac8", 10) == 0)
- {
-{
-return dev_storage + 671;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'b':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddb8", 10) == 0)
- {
-{
-return dev_storage + 1902;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcb8", 10) == 0)
- {
-{
-return dev_storage + 1488;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbb8", 10) == 0)
- {
-{
-return dev_storage + 1072;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdab8", 10) == 0)
- {
-{
-return dev_storage + 656;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'a':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdda8", 10) == 0)
- {
-{
-return dev_storage + 1887;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdca8", 10) == 0)
- {
-{
-return dev_storage + 1473;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdba8", 10) == 0)
- {
-{
-return dev_storage + 1057;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaa8", 10) == 0)
- {
-{
-return dev_storage + 641;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'S':
- if (strncmp (KR_keyword, "/dev/ttyS8", 10) == 0)
- {
-{
-return dev_storage + 2457;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '9':
- if (strncmp (KR_keyword, "/dev/nst98", 10) == 0)
- {
-{
-return dev_storage + 141;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/nst88", 10) == 0)
- {
-{
-return dev_storage + 131;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/nst78", 10) == 0)
- {
-{
-return dev_storage + 121;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/nst68", 10) == 0)
- {
-{
-return dev_storage + 111;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty58", 10) == 0)
- {
-{
-return dev_storage + 2443;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst58", 10) == 0)
- {
-{
-return dev_storage + 101;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '4':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty48", 10) == 0)
- {
-{
-return dev_storage + 2433;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst48", 10) == 0)
- {
-{
-return dev_storage + 91;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '3':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty38", 10) == 0)
- {
-{
-return dev_storage + 2423;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst38", 10) == 0)
- {
-{
-return dev_storage + 81;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '2':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty28", 10) == 0)
- {
-{
-return dev_storage + 2413;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst28", 10) == 0)
- {
-{
-return dev_storage + 71;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty18", 10) == 0)
- {
-{
-return dev_storage + 2403;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/st118", 10) == 0)
- {
-{
-return dev_storage + 2374;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst18", 10) == 0)
- {
-{
-return dev_storage + 61;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/st108", 10) == 0)
- {
-{
-return dev_storage + 2364;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '7':
- switch (KR_keyword [8])
- {
- case 'z':
- switch (KR_keyword [7])
- {
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcz7", 10) == 0)
- {
-{
-return dev_storage + 1847;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbz7", 10) == 0)
- {
-{
-return dev_storage + 1431;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaz7", 10) == 0)
- {
-{
-return dev_storage + 1015;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'y':
- switch (KR_keyword [7])
- {
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcy7", 10) == 0)
- {
-{
-return dev_storage + 1832;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdby7", 10) == 0)
- {
-{
-return dev_storage + 1416;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sday7", 10) == 0)
- {
-{
-return dev_storage + 1000;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'x':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddx7", 10) == 0)
- {
-{
-return dev_storage + 2231;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcx7", 10) == 0)
- {
-{
-return dev_storage + 1817;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbx7", 10) == 0)
- {
-{
-return dev_storage + 1401;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdax7", 10) == 0)
- {
-{
-return dev_storage + 985;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'w':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddw7", 10) == 0)
- {
-{
-return dev_storage + 2216;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcw7", 10) == 0)
- {
-{
-return dev_storage + 1802;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbw7", 10) == 0)
- {
-{
-return dev_storage + 1386;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaw7", 10) == 0)
- {
-{
-return dev_storage + 970;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'v':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddv7", 10) == 0)
- {
-{
-return dev_storage + 2201;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcv7", 10) == 0)
- {
-{
-return dev_storage + 1787;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbv7", 10) == 0)
- {
-{
-return dev_storage + 1371;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdav7", 10) == 0)
- {
-{
-return dev_storage + 955;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'u':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddu7", 10) == 0)
- {
-{
-return dev_storage + 2186;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcu7", 10) == 0)
- {
-{
-return dev_storage + 1772;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbu7", 10) == 0)
- {
-{
-return dev_storage + 1356;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdau7", 10) == 0)
- {
-{
-return dev_storage + 940;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 't':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddt7", 10) == 0)
- {
-{
-return dev_storage + 2171;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdct7", 10) == 0)
- {
-{
-return dev_storage + 1757;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbt7", 10) == 0)
- {
-{
-return dev_storage + 1341;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdat7", 10) == 0)
- {
-{
-return dev_storage + 925;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 's':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdds7", 10) == 0)
- {
-{
-return dev_storage + 2156;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcs7", 10) == 0)
- {
-{
-return dev_storage + 1742;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbs7", 10) == 0)
- {
-{
-return dev_storage + 1326;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdas7", 10) == 0)
- {
-{
-return dev_storage + 910;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'r':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddr7", 10) == 0)
- {
-{
-return dev_storage + 2141;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcr7", 10) == 0)
- {
-{
-return dev_storage + 1727;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbr7", 10) == 0)
- {
-{
-return dev_storage + 1311;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdar7", 10) == 0)
- {
-{
-return dev_storage + 895;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'q':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddq7", 10) == 0)
- {
-{
-return dev_storage + 2126;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcq7", 10) == 0)
- {
-{
-return dev_storage + 1712;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbq7", 10) == 0)
- {
-{
-return dev_storage + 1296;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaq7", 10) == 0)
- {
-{
-return dev_storage + 880;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'p':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddp7", 10) == 0)
- {
-{
-return dev_storage + 2111;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcp7", 10) == 0)
- {
-{
-return dev_storage + 1697;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbp7", 10) == 0)
- {
-{
-return dev_storage + 1281;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdap7", 10) == 0)
- {
-{
-return dev_storage + 865;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'o':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddo7", 10) == 0)
- {
-{
-return dev_storage + 2096;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdco7", 10) == 0)
- {
-{
-return dev_storage + 1682;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbo7", 10) == 0)
- {
-{
-return dev_storage + 1266;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdao7", 10) == 0)
- {
-{
-return dev_storage + 850;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'n':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddn7", 10) == 0)
- {
-{
-return dev_storage + 2081;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcn7", 10) == 0)
- {
-{
-return dev_storage + 1667;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbn7", 10) == 0)
- {
-{
-return dev_storage + 1251;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdan7", 10) == 0)
- {
-{
-return dev_storage + 835;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'm':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddm7", 10) == 0)
- {
-{
-return dev_storage + 2066;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcm7", 10) == 0)
- {
-{
-return dev_storage + 1652;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbm7", 10) == 0)
- {
-{
-return dev_storage + 1236;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdam7", 10) == 0)
- {
-{
-return dev_storage + 820;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'l':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddl7", 10) == 0)
- {
-{
-return dev_storage + 2051;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcl7", 10) == 0)
- {
-{
-return dev_storage + 1637;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbl7", 10) == 0)
- {
-{
-return dev_storage + 1221;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdal7", 10) == 0)
- {
-{
-return dev_storage + 805;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'k':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddk7", 10) == 0)
- {
-{
-return dev_storage + 2036;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdck7", 10) == 0)
- {
-{
-return dev_storage + 1622;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbk7", 10) == 0)
- {
-{
-return dev_storage + 1206;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdak7", 10) == 0)
- {
-{
-return dev_storage + 790;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'j':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddj7", 10) == 0)
- {
-{
-return dev_storage + 2021;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcj7", 10) == 0)
- {
-{
-return dev_storage + 1607;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbj7", 10) == 0)
- {
-{
-return dev_storage + 1191;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaj7", 10) == 0)
- {
-{
-return dev_storage + 775;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'i':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddi7", 10) == 0)
- {
-{
-return dev_storage + 2006;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdci7", 10) == 0)
- {
-{
-return dev_storage + 1592;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbi7", 10) == 0)
- {
-{
-return dev_storage + 1176;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdai7", 10) == 0)
- {
-{
-return dev_storage + 760;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'h':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddh7", 10) == 0)
- {
-{
-return dev_storage + 1991;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdch7", 10) == 0)
- {
-{
-return dev_storage + 1577;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbh7", 10) == 0)
- {
-{
-return dev_storage + 1161;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdah7", 10) == 0)
- {
-{
-return dev_storage + 745;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'g':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddg7", 10) == 0)
- {
-{
-return dev_storage + 1976;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcg7", 10) == 0)
- {
-{
-return dev_storage + 1562;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbg7", 10) == 0)
- {
-{
-return dev_storage + 1146;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdag7", 10) == 0)
- {
-{
-return dev_storage + 730;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'f':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddf7", 10) == 0)
- {
-{
-return dev_storage + 1961;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcf7", 10) == 0)
- {
-{
-return dev_storage + 1547;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbf7", 10) == 0)
- {
-{
-return dev_storage + 1131;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaf7", 10) == 0)
- {
-{
-return dev_storage + 715;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'e':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdde7", 10) == 0)
- {
-{
-return dev_storage + 1946;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdce7", 10) == 0)
- {
-{
-return dev_storage + 1532;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbe7", 10) == 0)
- {
-{
-return dev_storage + 1116;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdae7", 10) == 0)
- {
-{
-return dev_storage + 700;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'd':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddd7", 10) == 0)
- {
-{
-return dev_storage + 1931;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcd7", 10) == 0)
- {
-{
-return dev_storage + 1517;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbd7", 10) == 0)
- {
-{
-return dev_storage + 1101;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdad7", 10) == 0)
- {
-{
-return dev_storage + 685;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'c':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddc7", 10) == 0)
- {
-{
-return dev_storage + 1916;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcc7", 10) == 0)
- {
-{
-return dev_storage + 1502;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbc7", 10) == 0)
- {
-{
-return dev_storage + 1086;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdac7", 10) == 0)
- {
-{
-return dev_storage + 670;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'b':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddb7", 10) == 0)
- {
-{
-return dev_storage + 1901;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcb7", 10) == 0)
- {
-{
-return dev_storage + 1487;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbb7", 10) == 0)
- {
-{
-return dev_storage + 1071;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdab7", 10) == 0)
- {
-{
-return dev_storage + 655;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'a':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdda7", 10) == 0)
- {
-{
-return dev_storage + 1886;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdca7", 10) == 0)
- {
-{
-return dev_storage + 1472;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdba7", 10) == 0)
- {
-{
-return dev_storage + 1056;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaa7", 10) == 0)
- {
-{
-return dev_storage + 640;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'S':
- if (strncmp (KR_keyword, "/dev/ttyS7", 10) == 0)
- {
-{
-return dev_storage + 2456;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '9':
- if (strncmp (KR_keyword, "/dev/nst97", 10) == 0)
- {
-{
-return dev_storage + 140;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/nst87", 10) == 0)
- {
-{
-return dev_storage + 130;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/nst77", 10) == 0)
- {
-{
-return dev_storage + 120;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/nst67", 10) == 0)
- {
-{
-return dev_storage + 110;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty57", 10) == 0)
- {
-{
-return dev_storage + 2442;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst57", 10) == 0)
- {
-{
-return dev_storage + 100;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '4':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty47", 10) == 0)
- {
-{
-return dev_storage + 2432;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst47", 10) == 0)
- {
-{
-return dev_storage + 90;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '3':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty37", 10) == 0)
- {
-{
-return dev_storage + 2422;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst37", 10) == 0)
- {
-{
-return dev_storage + 80;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '2':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty27", 10) == 0)
- {
-{
-return dev_storage + 2412;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/st127", 10) == 0)
- {
-{
-return dev_storage + 2383;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst27", 10) == 0)
- {
-{
-return dev_storage + 70;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty17", 10) == 0)
- {
-{
-return dev_storage + 2402;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/st117", 10) == 0)
- {
-{
-return dev_storage + 2373;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst17", 10) == 0)
- {
-{
-return dev_storage + 60;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/st107", 10) == 0)
- {
-{
-return dev_storage + 2363;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '6':
- switch (KR_keyword [8])
- {
- case 'z':
- switch (KR_keyword [7])
- {
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcz6", 10) == 0)
- {
-{
-return dev_storage + 1846;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbz6", 10) == 0)
- {
-{
-return dev_storage + 1430;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaz6", 10) == 0)
- {
-{
-return dev_storage + 1014;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'y':
- switch (KR_keyword [7])
- {
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcy6", 10) == 0)
- {
-{
-return dev_storage + 1831;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdby6", 10) == 0)
- {
-{
-return dev_storage + 1415;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sday6", 10) == 0)
- {
-{
-return dev_storage + 999;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'x':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddx6", 10) == 0)
- {
-{
-return dev_storage + 2230;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcx6", 10) == 0)
- {
-{
-return dev_storage + 1816;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbx6", 10) == 0)
- {
-{
-return dev_storage + 1400;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdax6", 10) == 0)
- {
-{
-return dev_storage + 984;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'w':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddw6", 10) == 0)
- {
-{
-return dev_storage + 2215;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcw6", 10) == 0)
- {
-{
-return dev_storage + 1801;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbw6", 10) == 0)
- {
-{
-return dev_storage + 1385;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaw6", 10) == 0)
- {
-{
-return dev_storage + 969;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'v':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddv6", 10) == 0)
- {
-{
-return dev_storage + 2200;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcv6", 10) == 0)
- {
-{
-return dev_storage + 1786;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbv6", 10) == 0)
- {
-{
-return dev_storage + 1370;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdav6", 10) == 0)
- {
-{
-return dev_storage + 954;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'u':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddu6", 10) == 0)
- {
-{
-return dev_storage + 2185;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcu6", 10) == 0)
- {
-{
-return dev_storage + 1771;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbu6", 10) == 0)
- {
-{
-return dev_storage + 1355;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdau6", 10) == 0)
- {
-{
-return dev_storage + 939;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 't':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddt6", 10) == 0)
- {
-{
-return dev_storage + 2170;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdct6", 10) == 0)
- {
-{
-return dev_storage + 1756;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbt6", 10) == 0)
- {
-{
-return dev_storage + 1340;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdat6", 10) == 0)
- {
-{
-return dev_storage + 924;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 's':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdds6", 10) == 0)
- {
-{
-return dev_storage + 2155;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcs6", 10) == 0)
- {
-{
-return dev_storage + 1741;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbs6", 10) == 0)
- {
-{
-return dev_storage + 1325;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdas6", 10) == 0)
- {
-{
-return dev_storage + 909;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'r':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddr6", 10) == 0)
- {
-{
-return dev_storage + 2140;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcr6", 10) == 0)
- {
-{
-return dev_storage + 1726;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbr6", 10) == 0)
- {
-{
-return dev_storage + 1310;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdar6", 10) == 0)
- {
-{
-return dev_storage + 894;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'q':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddq6", 10) == 0)
- {
-{
-return dev_storage + 2125;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcq6", 10) == 0)
- {
-{
-return dev_storage + 1711;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbq6", 10) == 0)
- {
-{
-return dev_storage + 1295;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaq6", 10) == 0)
- {
-{
-return dev_storage + 879;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'p':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddp6", 10) == 0)
- {
-{
-return dev_storage + 2110;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcp6", 10) == 0)
- {
-{
-return dev_storage + 1696;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbp6", 10) == 0)
- {
-{
-return dev_storage + 1280;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdap6", 10) == 0)
- {
-{
-return dev_storage + 864;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'o':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddo6", 10) == 0)
- {
-{
-return dev_storage + 2095;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdco6", 10) == 0)
- {
-{
-return dev_storage + 1681;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbo6", 10) == 0)
- {
-{
-return dev_storage + 1265;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdao6", 10) == 0)
- {
-{
-return dev_storage + 849;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'n':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddn6", 10) == 0)
- {
-{
-return dev_storage + 2080;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcn6", 10) == 0)
- {
-{
-return dev_storage + 1666;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbn6", 10) == 0)
- {
-{
-return dev_storage + 1250;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdan6", 10) == 0)
- {
-{
-return dev_storage + 834;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'm':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddm6", 10) == 0)
- {
-{
-return dev_storage + 2065;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcm6", 10) == 0)
- {
-{
-return dev_storage + 1651;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbm6", 10) == 0)
- {
-{
-return dev_storage + 1235;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdam6", 10) == 0)
- {
-{
-return dev_storage + 819;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'l':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddl6", 10) == 0)
- {
-{
-return dev_storage + 2050;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcl6", 10) == 0)
- {
-{
-return dev_storage + 1636;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbl6", 10) == 0)
- {
-{
-return dev_storage + 1220;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdal6", 10) == 0)
- {
-{
-return dev_storage + 804;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'k':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddk6", 10) == 0)
- {
-{
-return dev_storage + 2035;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdck6", 10) == 0)
- {
-{
-return dev_storage + 1621;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbk6", 10) == 0)
- {
-{
-return dev_storage + 1205;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdak6", 10) == 0)
- {
-{
-return dev_storage + 789;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'j':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddj6", 10) == 0)
- {
-{
-return dev_storage + 2020;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcj6", 10) == 0)
- {
-{
-return dev_storage + 1606;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbj6", 10) == 0)
- {
-{
-return dev_storage + 1190;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaj6", 10) == 0)
- {
-{
-return dev_storage + 774;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'i':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddi6", 10) == 0)
- {
-{
-return dev_storage + 2005;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdci6", 10) == 0)
- {
-{
-return dev_storage + 1591;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbi6", 10) == 0)
- {
-{
-return dev_storage + 1175;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdai6", 10) == 0)
- {
-{
-return dev_storage + 759;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'h':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddh6", 10) == 0)
- {
-{
-return dev_storage + 1990;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdch6", 10) == 0)
- {
-{
-return dev_storage + 1576;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbh6", 10) == 0)
- {
-{
-return dev_storage + 1160;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdah6", 10) == 0)
- {
-{
-return dev_storage + 744;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'g':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddg6", 10) == 0)
- {
-{
-return dev_storage + 1975;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcg6", 10) == 0)
- {
-{
-return dev_storage + 1561;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbg6", 10) == 0)
- {
-{
-return dev_storage + 1145;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdag6", 10) == 0)
- {
-{
-return dev_storage + 729;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'f':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddf6", 10) == 0)
- {
-{
-return dev_storage + 1960;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcf6", 10) == 0)
- {
-{
-return dev_storage + 1546;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbf6", 10) == 0)
- {
-{
-return dev_storage + 1130;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaf6", 10) == 0)
- {
-{
-return dev_storage + 714;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'e':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdde6", 10) == 0)
- {
-{
-return dev_storage + 1945;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdce6", 10) == 0)
- {
-{
-return dev_storage + 1531;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbe6", 10) == 0)
- {
-{
-return dev_storage + 1115;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdae6", 10) == 0)
- {
-{
-return dev_storage + 699;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'd':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddd6", 10) == 0)
- {
-{
-return dev_storage + 1930;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcd6", 10) == 0)
- {
-{
-return dev_storage + 1516;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbd6", 10) == 0)
- {
-{
-return dev_storage + 1100;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdad6", 10) == 0)
- {
-{
-return dev_storage + 684;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'c':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddc6", 10) == 0)
- {
-{
-return dev_storage + 1915;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcc6", 10) == 0)
- {
-{
-return dev_storage + 1501;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbc6", 10) == 0)
- {
-{
-return dev_storage + 1085;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdac6", 10) == 0)
- {
-{
-return dev_storage + 669;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'b':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddb6", 10) == 0)
- {
-{
-return dev_storage + 1900;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcb6", 10) == 0)
- {
-{
-return dev_storage + 1486;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbb6", 10) == 0)
- {
-{
-return dev_storage + 1070;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdab6", 10) == 0)
- {
-{
-return dev_storage + 654;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'a':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdda6", 10) == 0)
- {
-{
-return dev_storage + 1885;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdca6", 10) == 0)
- {
-{
-return dev_storage + 1471;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdba6", 10) == 0)
- {
-{
-return dev_storage + 1055;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaa6", 10) == 0)
- {
-{
-return dev_storage + 639;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'S':
- if (strncmp (KR_keyword, "/dev/ttyS6", 10) == 0)
- {
-{
-return dev_storage + 2455;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '9':
- if (strncmp (KR_keyword, "/dev/nst96", 10) == 0)
- {
-{
-return dev_storage + 139;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/nst86", 10) == 0)
- {
-{
-return dev_storage + 129;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/nst76", 10) == 0)
- {
-{
-return dev_storage + 119;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/nst66", 10) == 0)
- {
-{
-return dev_storage + 109;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty56", 10) == 0)
- {
-{
-return dev_storage + 2441;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst56", 10) == 0)
- {
-{
-return dev_storage + 99;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '4':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty46", 10) == 0)
- {
-{
-return dev_storage + 2431;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst46", 10) == 0)
- {
-{
-return dev_storage + 89;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '3':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty36", 10) == 0)
- {
-{
-return dev_storage + 2421;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst36", 10) == 0)
- {
-{
-return dev_storage + 79;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '2':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty26", 10) == 0)
- {
-{
-return dev_storage + 2411;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/st126", 10) == 0)
- {
-{
-return dev_storage + 2382;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst26", 10) == 0)
- {
-{
-return dev_storage + 69;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty16", 10) == 0)
- {
-{
-return dev_storage + 2401;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/st116", 10) == 0)
- {
-{
-return dev_storage + 2372;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst16", 10) == 0)
- {
-{
-return dev_storage + 59;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/com16", 10) == 0)
- {
-{
-return dev_storage + 17;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/st106", 10) == 0)
- {
-{
-return dev_storage + 2362;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '5':
- switch (KR_keyword [7])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdz15", 10) == 0)
- {
-{
-return dev_storage + 607;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- switch (KR_keyword [8])
- {
- case 'S':
- if (strncmp (KR_keyword, "/dev/ttyS5", 10) == 0)
- {
-{
-return dev_storage + 2454;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/tty55", 10) == 0)
- {
-{
-return dev_storage + 2440;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/tty45", 10) == 0)
- {
-{
-return dev_storage + 2430;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/tty35", 10) == 0)
- {
-{
-return dev_storage + 2420;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/tty25", 10) == 0)
- {
-{
-return dev_storage + 2410;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty15", 10) == 0)
- {
-{
-return dev_storage + 2400;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdy15", 10) == 0)
- {
-{
-return dev_storage + 592;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdx15", 10) == 0)
- {
-{
-return dev_storage + 577;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdw15", 10) == 0)
- {
-{
-return dev_storage + 562;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdv15", 10) == 0)
- {
-{
-return dev_storage + 547;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdu15", 10) == 0)
- {
-{
-return dev_storage + 532;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/nst95", 10) == 0)
- {
-{
-return dev_storage + 138;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/nst85", 10) == 0)
- {
-{
-return dev_storage + 128;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/nst75", 10) == 0)
- {
-{
-return dev_storage + 118;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/nst65", 10) == 0)
- {
-{
-return dev_storage + 108;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/nst55", 10) == 0)
- {
-{
-return dev_storage + 98;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/nst45", 10) == 0)
- {
-{
-return dev_storage + 88;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/nst35", 10) == 0)
- {
-{
-return dev_storage + 78;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/nst25", 10) == 0)
- {
-{
-return dev_storage + 68;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [5])
- {
- case 's':
- if (strncmp (KR_keyword, "/dev/sdt15", 10) == 0)
- {
-{
-return dev_storage + 517;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst15", 10) == 0)
- {
-{
-return dev_storage + 58;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sds15", 10) == 0)
- {
-{
-return dev_storage + 502;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdr15", 10) == 0)
- {
-{
-return dev_storage + 487;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdq15", 10) == 0)
- {
-{
-return dev_storage + 472;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdp15", 10) == 0)
- {
-{
-return dev_storage + 457;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdo15", 10) == 0)
- {
-{
-return dev_storage + 442;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdn15", 10) == 0)
- {
-{
-return dev_storage + 427;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- switch (KR_keyword [5])
- {
- case 's':
- if (strncmp (KR_keyword, "/dev/sdm15", 10) == 0)
- {
-{
-return dev_storage + 412;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/com15", 10) == 0)
- {
-{
-return dev_storage + 16;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdl15", 10) == 0)
- {
-{
-return dev_storage + 397;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdk15", 10) == 0)
- {
-{
-return dev_storage + 382;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdj15", 10) == 0)
- {
-{
-return dev_storage + 367;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdi15", 10) == 0)
- {
-{
-return dev_storage + 352;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdh15", 10) == 0)
- {
-{
-return dev_storage + 337;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdg15", 10) == 0)
- {
-{
-return dev_storage + 322;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdf15", 10) == 0)
- {
-{
-return dev_storage + 307;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sde15", 10) == 0)
- {
-{
-return dev_storage + 292;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- switch (KR_keyword [8])
- {
- case 'x':
- if (strncmp (KR_keyword, "/dev/sddx5", 10) == 0)
- {
-{
-return dev_storage + 2229;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sddw5", 10) == 0)
- {
-{
-return dev_storage + 2214;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sddv5", 10) == 0)
- {
-{
-return dev_storage + 2199;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sddu5", 10) == 0)
- {
-{
-return dev_storage + 2184;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sddt5", 10) == 0)
- {
-{
-return dev_storage + 2169;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdds5", 10) == 0)
- {
-{
-return dev_storage + 2154;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sddr5", 10) == 0)
- {
-{
-return dev_storage + 2139;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sddq5", 10) == 0)
- {
-{
-return dev_storage + 2124;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sddp5", 10) == 0)
- {
-{
-return dev_storage + 2109;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sddo5", 10) == 0)
- {
-{
-return dev_storage + 2094;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sddn5", 10) == 0)
- {
-{
-return dev_storage + 2079;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sddm5", 10) == 0)
- {
-{
-return dev_storage + 2064;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sddl5", 10) == 0)
- {
-{
-return dev_storage + 2049;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sddk5", 10) == 0)
- {
-{
-return dev_storage + 2034;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sddj5", 10) == 0)
- {
-{
-return dev_storage + 2019;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sddi5", 10) == 0)
- {
-{
-return dev_storage + 2004;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sddh5", 10) == 0)
- {
-{
-return dev_storage + 1989;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sddg5", 10) == 0)
- {
-{
-return dev_storage + 1974;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sddf5", 10) == 0)
- {
-{
-return dev_storage + 1959;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdde5", 10) == 0)
- {
-{
-return dev_storage + 1944;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddd5", 10) == 0)
- {
-{
-return dev_storage + 1929;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sddc5", 10) == 0)
- {
-{
-return dev_storage + 1914;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sddb5", 10) == 0)
- {
-{
-return dev_storage + 1899;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdda5", 10) == 0)
- {
-{
-return dev_storage + 1884;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [6])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdd15", 10) == 0)
- {
-{
-return dev_storage + 277;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/scd15", 10) == 0)
- {
-{
-return dev_storage + 191;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'c':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdcz5", 10) == 0)
- {
-{
-return dev_storage + 1845;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sdcy5", 10) == 0)
- {
-{
-return dev_storage + 1830;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdcx5", 10) == 0)
- {
-{
-return dev_storage + 1815;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdcw5", 10) == 0)
- {
-{
-return dev_storage + 1800;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdcv5", 10) == 0)
- {
-{
-return dev_storage + 1785;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdcu5", 10) == 0)
- {
-{
-return dev_storage + 1770;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdct5", 10) == 0)
- {
-{
-return dev_storage + 1755;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdcs5", 10) == 0)
- {
-{
-return dev_storage + 1740;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdcr5", 10) == 0)
- {
-{
-return dev_storage + 1725;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdcq5", 10) == 0)
- {
-{
-return dev_storage + 1710;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdcp5", 10) == 0)
- {
-{
-return dev_storage + 1695;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdco5", 10) == 0)
- {
-{
-return dev_storage + 1680;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdcn5", 10) == 0)
- {
-{
-return dev_storage + 1665;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdcm5", 10) == 0)
- {
-{
-return dev_storage + 1650;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdcl5", 10) == 0)
- {
-{
-return dev_storage + 1635;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdck5", 10) == 0)
- {
-{
-return dev_storage + 1620;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdcj5", 10) == 0)
- {
-{
-return dev_storage + 1605;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdci5", 10) == 0)
- {
-{
-return dev_storage + 1590;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdch5", 10) == 0)
- {
-{
-return dev_storage + 1575;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdcg5", 10) == 0)
- {
-{
-return dev_storage + 1560;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdcf5", 10) == 0)
- {
-{
-return dev_storage + 1545;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdce5", 10) == 0)
- {
-{
-return dev_storage + 1530;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdcd5", 10) == 0)
- {
-{
-return dev_storage + 1515;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcc5", 10) == 0)
- {
-{
-return dev_storage + 1500;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdcb5", 10) == 0)
- {
-{
-return dev_storage + 1485;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdca5", 10) == 0)
- {
-{
-return dev_storage + 1470;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdc15", 10) == 0)
- {
-{
-return dev_storage + 262;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'b':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdbz5", 10) == 0)
- {
-{
-return dev_storage + 1429;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sdby5", 10) == 0)
- {
-{
-return dev_storage + 1414;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdbx5", 10) == 0)
- {
-{
-return dev_storage + 1399;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdbw5", 10) == 0)
- {
-{
-return dev_storage + 1384;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdbv5", 10) == 0)
- {
-{
-return dev_storage + 1369;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdbu5", 10) == 0)
- {
-{
-return dev_storage + 1354;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdbt5", 10) == 0)
- {
-{
-return dev_storage + 1339;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdbs5", 10) == 0)
- {
-{
-return dev_storage + 1324;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdbr5", 10) == 0)
- {
-{
-return dev_storage + 1309;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdbq5", 10) == 0)
- {
-{
-return dev_storage + 1294;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdbp5", 10) == 0)
- {
-{
-return dev_storage + 1279;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdbo5", 10) == 0)
- {
-{
-return dev_storage + 1264;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdbn5", 10) == 0)
- {
-{
-return dev_storage + 1249;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdbm5", 10) == 0)
- {
-{
-return dev_storage + 1234;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdbl5", 10) == 0)
- {
-{
-return dev_storage + 1219;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdbk5", 10) == 0)
- {
-{
-return dev_storage + 1204;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdbj5", 10) == 0)
- {
-{
-return dev_storage + 1189;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdbi5", 10) == 0)
- {
-{
-return dev_storage + 1174;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdbh5", 10) == 0)
- {
-{
-return dev_storage + 1159;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdbg5", 10) == 0)
- {
-{
-return dev_storage + 1144;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdbf5", 10) == 0)
- {
-{
-return dev_storage + 1129;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdbe5", 10) == 0)
- {
-{
-return dev_storage + 1114;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdbd5", 10) == 0)
- {
-{
-return dev_storage + 1099;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdbc5", 10) == 0)
- {
-{
-return dev_storage + 1084;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbb5", 10) == 0)
- {
-{
-return dev_storage + 1069;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdba5", 10) == 0)
- {
-{
-return dev_storage + 1054;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdb15", 10) == 0)
- {
-{
-return dev_storage + 247;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'a':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdaz5", 10) == 0)
- {
-{
-return dev_storage + 1013;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sday5", 10) == 0)
- {
-{
-return dev_storage + 998;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdax5", 10) == 0)
- {
-{
-return dev_storage + 983;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdaw5", 10) == 0)
- {
-{
-return dev_storage + 968;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdav5", 10) == 0)
- {
-{
-return dev_storage + 953;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdau5", 10) == 0)
- {
-{
-return dev_storage + 938;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdat5", 10) == 0)
- {
-{
-return dev_storage + 923;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdas5", 10) == 0)
- {
-{
-return dev_storage + 908;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdar5", 10) == 0)
- {
-{
-return dev_storage + 893;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdaq5", 10) == 0)
- {
-{
-return dev_storage + 878;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdap5", 10) == 0)
- {
-{
-return dev_storage + 863;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdao5", 10) == 0)
- {
-{
-return dev_storage + 848;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdan5", 10) == 0)
- {
-{
-return dev_storage + 833;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdam5", 10) == 0)
- {
-{
-return dev_storage + 818;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdal5", 10) == 0)
- {
-{
-return dev_storage + 803;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdak5", 10) == 0)
- {
-{
-return dev_storage + 788;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdaj5", 10) == 0)
- {
-{
-return dev_storage + 773;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdai5", 10) == 0)
- {
-{
-return dev_storage + 758;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdah5", 10) == 0)
- {
-{
-return dev_storage + 743;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdag5", 10) == 0)
- {
-{
-return dev_storage + 728;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdaf5", 10) == 0)
- {
-{
-return dev_storage + 713;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdae5", 10) == 0)
- {
-{
-return dev_storage + 698;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdad5", 10) == 0)
- {
-{
-return dev_storage + 683;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdac5", 10) == 0)
- {
-{
-return dev_storage + 668;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdab5", 10) == 0)
- {
-{
-return dev_storage + 653;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaa5", 10) == 0)
- {
-{
-return dev_storage + 638;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sda15", 10) == 0)
- {
-{
-return dev_storage + 232;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [8])
- {
- case '2':
- if (strncmp (KR_keyword, "/dev/st125", 10) == 0)
- {
-{
-return dev_storage + 2381;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/st115", 10) == 0)
- {
-{
-return dev_storage + 2371;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/st105", 10) == 0)
- {
-{
-return dev_storage + 2361;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '4':
- switch (KR_keyword [7])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdz14", 10) == 0)
- {
-{
-return dev_storage + 606;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- switch (KR_keyword [8])
- {
- case 'S':
- if (strncmp (KR_keyword, "/dev/ttyS4", 10) == 0)
- {
-{
-return dev_storage + 2453;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/tty54", 10) == 0)
- {
-{
-return dev_storage + 2439;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/tty44", 10) == 0)
- {
-{
-return dev_storage + 2429;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/tty34", 10) == 0)
- {
-{
-return dev_storage + 2419;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/tty24", 10) == 0)
- {
-{
-return dev_storage + 2409;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty14", 10) == 0)
- {
-{
-return dev_storage + 2399;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdy14", 10) == 0)
- {
-{
-return dev_storage + 591;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdx14", 10) == 0)
- {
-{
-return dev_storage + 576;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdw14", 10) == 0)
- {
-{
-return dev_storage + 561;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdv14", 10) == 0)
- {
-{
-return dev_storage + 546;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdu14", 10) == 0)
- {
-{
-return dev_storage + 531;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/nst94", 10) == 0)
- {
-{
-return dev_storage + 137;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/nst84", 10) == 0)
- {
-{
-return dev_storage + 127;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/nst74", 10) == 0)
- {
-{
-return dev_storage + 117;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/nst64", 10) == 0)
- {
-{
-return dev_storage + 107;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/nst54", 10) == 0)
- {
-{
-return dev_storage + 97;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/nst44", 10) == 0)
- {
-{
-return dev_storage + 87;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/nst34", 10) == 0)
- {
-{
-return dev_storage + 77;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/nst24", 10) == 0)
- {
-{
-return dev_storage + 67;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [5])
- {
- case 's':
- if (strncmp (KR_keyword, "/dev/sdt14", 10) == 0)
- {
-{
-return dev_storage + 516;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst14", 10) == 0)
- {
-{
-return dev_storage + 57;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sds14", 10) == 0)
- {
-{
-return dev_storage + 501;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdr14", 10) == 0)
- {
-{
-return dev_storage + 486;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdq14", 10) == 0)
- {
-{
-return dev_storage + 471;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdp14", 10) == 0)
- {
-{
-return dev_storage + 456;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdo14", 10) == 0)
- {
-{
-return dev_storage + 441;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdn14", 10) == 0)
- {
-{
-return dev_storage + 426;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- switch (KR_keyword [5])
- {
- case 's':
- if (strncmp (KR_keyword, "/dev/sdm14", 10) == 0)
- {
-{
-return dev_storage + 411;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/com14", 10) == 0)
- {
-{
-return dev_storage + 15;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdl14", 10) == 0)
- {
-{
-return dev_storage + 396;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdk14", 10) == 0)
- {
-{
-return dev_storage + 381;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdj14", 10) == 0)
- {
-{
-return dev_storage + 366;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdi14", 10) == 0)
- {
-{
-return dev_storage + 351;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdh14", 10) == 0)
- {
-{
-return dev_storage + 336;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdg14", 10) == 0)
- {
-{
-return dev_storage + 321;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdf14", 10) == 0)
- {
-{
-return dev_storage + 306;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sde14", 10) == 0)
- {
-{
-return dev_storage + 291;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- switch (KR_keyword [8])
- {
- case 'x':
- if (strncmp (KR_keyword, "/dev/sddx4", 10) == 0)
- {
-{
-return dev_storage + 2228;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sddw4", 10) == 0)
- {
-{
-return dev_storage + 2213;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sddv4", 10) == 0)
- {
-{
-return dev_storage + 2198;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sddu4", 10) == 0)
- {
-{
-return dev_storage + 2183;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sddt4", 10) == 0)
- {
-{
-return dev_storage + 2168;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdds4", 10) == 0)
- {
-{
-return dev_storage + 2153;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sddr4", 10) == 0)
- {
-{
-return dev_storage + 2138;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sddq4", 10) == 0)
- {
-{
-return dev_storage + 2123;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sddp4", 10) == 0)
- {
-{
-return dev_storage + 2108;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sddo4", 10) == 0)
- {
-{
-return dev_storage + 2093;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sddn4", 10) == 0)
- {
-{
-return dev_storage + 2078;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sddm4", 10) == 0)
- {
-{
-return dev_storage + 2063;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sddl4", 10) == 0)
- {
-{
-return dev_storage + 2048;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sddk4", 10) == 0)
- {
-{
-return dev_storage + 2033;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sddj4", 10) == 0)
- {
-{
-return dev_storage + 2018;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sddi4", 10) == 0)
- {
-{
-return dev_storage + 2003;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sddh4", 10) == 0)
- {
-{
-return dev_storage + 1988;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sddg4", 10) == 0)
- {
-{
-return dev_storage + 1973;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sddf4", 10) == 0)
- {
-{
-return dev_storage + 1958;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdde4", 10) == 0)
- {
-{
-return dev_storage + 1943;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddd4", 10) == 0)
- {
-{
-return dev_storage + 1928;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sddc4", 10) == 0)
- {
-{
-return dev_storage + 1913;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sddb4", 10) == 0)
- {
-{
-return dev_storage + 1898;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdda4", 10) == 0)
- {
-{
-return dev_storage + 1883;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [6])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdd14", 10) == 0)
- {
-{
-return dev_storage + 276;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/scd14", 10) == 0)
- {
-{
-return dev_storage + 190;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'c':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdcz4", 10) == 0)
- {
-{
-return dev_storage + 1844;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sdcy4", 10) == 0)
- {
-{
-return dev_storage + 1829;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdcx4", 10) == 0)
- {
-{
-return dev_storage + 1814;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdcw4", 10) == 0)
- {
-{
-return dev_storage + 1799;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdcv4", 10) == 0)
- {
-{
-return dev_storage + 1784;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdcu4", 10) == 0)
- {
-{
-return dev_storage + 1769;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdct4", 10) == 0)
- {
-{
-return dev_storage + 1754;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdcs4", 10) == 0)
- {
-{
-return dev_storage + 1739;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdcr4", 10) == 0)
- {
-{
-return dev_storage + 1724;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdcq4", 10) == 0)
- {
-{
-return dev_storage + 1709;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdcp4", 10) == 0)
- {
-{
-return dev_storage + 1694;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdco4", 10) == 0)
- {
-{
-return dev_storage + 1679;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdcn4", 10) == 0)
- {
-{
-return dev_storage + 1664;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdcm4", 10) == 0)
- {
-{
-return dev_storage + 1649;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdcl4", 10) == 0)
- {
-{
-return dev_storage + 1634;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdck4", 10) == 0)
- {
-{
-return dev_storage + 1619;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdcj4", 10) == 0)
- {
-{
-return dev_storage + 1604;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdci4", 10) == 0)
- {
-{
-return dev_storage + 1589;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdch4", 10) == 0)
- {
-{
-return dev_storage + 1574;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdcg4", 10) == 0)
- {
-{
-return dev_storage + 1559;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdcf4", 10) == 0)
- {
-{
-return dev_storage + 1544;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdce4", 10) == 0)
- {
-{
-return dev_storage + 1529;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdcd4", 10) == 0)
- {
-{
-return dev_storage + 1514;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcc4", 10) == 0)
- {
-{
-return dev_storage + 1499;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdcb4", 10) == 0)
- {
-{
-return dev_storage + 1484;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdca4", 10) == 0)
- {
-{
-return dev_storage + 1469;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdc14", 10) == 0)
- {
-{
-return dev_storage + 261;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'b':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdbz4", 10) == 0)
- {
-{
-return dev_storage + 1428;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sdby4", 10) == 0)
- {
-{
-return dev_storage + 1413;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdbx4", 10) == 0)
- {
-{
-return dev_storage + 1398;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdbw4", 10) == 0)
- {
-{
-return dev_storage + 1383;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdbv4", 10) == 0)
- {
-{
-return dev_storage + 1368;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdbu4", 10) == 0)
- {
-{
-return dev_storage + 1353;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdbt4", 10) == 0)
- {
-{
-return dev_storage + 1338;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdbs4", 10) == 0)
- {
-{
-return dev_storage + 1323;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdbr4", 10) == 0)
- {
-{
-return dev_storage + 1308;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdbq4", 10) == 0)
- {
-{
-return dev_storage + 1293;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdbp4", 10) == 0)
- {
-{
-return dev_storage + 1278;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdbo4", 10) == 0)
- {
-{
-return dev_storage + 1263;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdbn4", 10) == 0)
- {
-{
-return dev_storage + 1248;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdbm4", 10) == 0)
- {
-{
-return dev_storage + 1233;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdbl4", 10) == 0)
- {
-{
-return dev_storage + 1218;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdbk4", 10) == 0)
- {
-{
-return dev_storage + 1203;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdbj4", 10) == 0)
- {
-{
-return dev_storage + 1188;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdbi4", 10) == 0)
- {
-{
-return dev_storage + 1173;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdbh4", 10) == 0)
- {
-{
-return dev_storage + 1158;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdbg4", 10) == 0)
- {
-{
-return dev_storage + 1143;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdbf4", 10) == 0)
- {
-{
-return dev_storage + 1128;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdbe4", 10) == 0)
- {
-{
-return dev_storage + 1113;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdbd4", 10) == 0)
- {
-{
-return dev_storage + 1098;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdbc4", 10) == 0)
- {
-{
-return dev_storage + 1083;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbb4", 10) == 0)
- {
-{
-return dev_storage + 1068;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdba4", 10) == 0)
- {
-{
-return dev_storage + 1053;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdb14", 10) == 0)
- {
-{
-return dev_storage + 246;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'a':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdaz4", 10) == 0)
- {
-{
-return dev_storage + 1012;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sday4", 10) == 0)
- {
-{
-return dev_storage + 997;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdax4", 10) == 0)
- {
-{
-return dev_storage + 982;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdaw4", 10) == 0)
- {
-{
-return dev_storage + 967;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdav4", 10) == 0)
- {
-{
-return dev_storage + 952;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdau4", 10) == 0)
- {
-{
-return dev_storage + 937;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdat4", 10) == 0)
- {
-{
-return dev_storage + 922;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdas4", 10) == 0)
- {
-{
-return dev_storage + 907;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdar4", 10) == 0)
- {
-{
-return dev_storage + 892;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdaq4", 10) == 0)
- {
-{
-return dev_storage + 877;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdap4", 10) == 0)
- {
-{
-return dev_storage + 862;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdao4", 10) == 0)
- {
-{
-return dev_storage + 847;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdan4", 10) == 0)
- {
-{
-return dev_storage + 832;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdam4", 10) == 0)
- {
-{
-return dev_storage + 817;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdal4", 10) == 0)
- {
-{
-return dev_storage + 802;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdak4", 10) == 0)
- {
-{
-return dev_storage + 787;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdaj4", 10) == 0)
- {
-{
-return dev_storage + 772;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdai4", 10) == 0)
- {
-{
-return dev_storage + 757;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdah4", 10) == 0)
- {
-{
-return dev_storage + 742;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdag4", 10) == 0)
- {
-{
-return dev_storage + 727;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdaf4", 10) == 0)
- {
-{
-return dev_storage + 712;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdae4", 10) == 0)
- {
-{
-return dev_storage + 697;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdad4", 10) == 0)
- {
-{
-return dev_storage + 682;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdac4", 10) == 0)
- {
-{
-return dev_storage + 667;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdab4", 10) == 0)
- {
-{
-return dev_storage + 652;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaa4", 10) == 0)
- {
-{
-return dev_storage + 637;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sda14", 10) == 0)
- {
-{
-return dev_storage + 231;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [8])
- {
- case '2':
- if (strncmp (KR_keyword, "/dev/st124", 10) == 0)
- {
-{
-return dev_storage + 2380;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/st114", 10) == 0)
- {
-{
-return dev_storage + 2370;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/st104", 10) == 0)
- {
-{
-return dev_storage + 2360;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '3':
- switch (KR_keyword [7])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdz13", 10) == 0)
- {
-{
-return dev_storage + 605;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- switch (KR_keyword [8])
- {
- case 'S':
- if (strncmp (KR_keyword, "/dev/ttyS3", 10) == 0)
- {
-{
-return dev_storage + 2452;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/tty63", 10) == 0)
- {
-{
-return dev_storage + 2448;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/tty53", 10) == 0)
- {
-{
-return dev_storage + 2438;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/tty43", 10) == 0)
- {
-{
-return dev_storage + 2428;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/tty33", 10) == 0)
- {
-{
-return dev_storage + 2418;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/tty23", 10) == 0)
- {
-{
-return dev_storage + 2408;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty13", 10) == 0)
- {
-{
-return dev_storage + 2398;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdy13", 10) == 0)
- {
-{
-return dev_storage + 590;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdx13", 10) == 0)
- {
-{
-return dev_storage + 575;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdw13", 10) == 0)
- {
-{
-return dev_storage + 560;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdv13", 10) == 0)
- {
-{
-return dev_storage + 545;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdu13", 10) == 0)
- {
-{
-return dev_storage + 530;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/nst93", 10) == 0)
- {
-{
-return dev_storage + 136;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/nst83", 10) == 0)
- {
-{
-return dev_storage + 126;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/nst73", 10) == 0)
- {
-{
-return dev_storage + 116;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/nst63", 10) == 0)
- {
-{
-return dev_storage + 106;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/nst53", 10) == 0)
- {
-{
-return dev_storage + 96;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/nst43", 10) == 0)
- {
-{
-return dev_storage + 86;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/nst33", 10) == 0)
- {
-{
-return dev_storage + 76;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/nst23", 10) == 0)
- {
-{
-return dev_storage + 66;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [5])
- {
- case 's':
- if (strncmp (KR_keyword, "/dev/sdt13", 10) == 0)
- {
-{
-return dev_storage + 515;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst13", 10) == 0)
- {
-{
-return dev_storage + 56;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sds13", 10) == 0)
- {
-{
-return dev_storage + 500;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdr13", 10) == 0)
- {
-{
-return dev_storage + 485;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdq13", 10) == 0)
- {
-{
-return dev_storage + 470;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdp13", 10) == 0)
- {
-{
-return dev_storage + 455;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdo13", 10) == 0)
- {
-{
-return dev_storage + 440;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdn13", 10) == 0)
- {
-{
-return dev_storage + 425;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- switch (KR_keyword [5])
- {
- case 's':
- if (strncmp (KR_keyword, "/dev/sdm13", 10) == 0)
- {
-{
-return dev_storage + 410;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/com13", 10) == 0)
- {
-{
-return dev_storage + 14;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdl13", 10) == 0)
- {
-{
-return dev_storage + 395;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdk13", 10) == 0)
- {
-{
-return dev_storage + 380;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdj13", 10) == 0)
- {
-{
-return dev_storage + 365;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdi13", 10) == 0)
- {
-{
-return dev_storage + 350;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdh13", 10) == 0)
- {
-{
-return dev_storage + 335;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdg13", 10) == 0)
- {
-{
-return dev_storage + 320;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdf13", 10) == 0)
- {
-{
-return dev_storage + 305;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sde13", 10) == 0)
- {
-{
-return dev_storage + 290;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- switch (KR_keyword [8])
- {
- case 'x':
- if (strncmp (KR_keyword, "/dev/sddx3", 10) == 0)
- {
-{
-return dev_storage + 2227;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sddw3", 10) == 0)
- {
-{
-return dev_storage + 2212;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sddv3", 10) == 0)
- {
-{
-return dev_storage + 2197;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sddu3", 10) == 0)
- {
-{
-return dev_storage + 2182;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sddt3", 10) == 0)
- {
-{
-return dev_storage + 2167;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdds3", 10) == 0)
- {
-{
-return dev_storage + 2152;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sddr3", 10) == 0)
- {
-{
-return dev_storage + 2137;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sddq3", 10) == 0)
- {
-{
-return dev_storage + 2122;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sddp3", 10) == 0)
- {
-{
-return dev_storage + 2107;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sddo3", 10) == 0)
- {
-{
-return dev_storage + 2092;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sddn3", 10) == 0)
- {
-{
-return dev_storage + 2077;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sddm3", 10) == 0)
- {
-{
-return dev_storage + 2062;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sddl3", 10) == 0)
- {
-{
-return dev_storage + 2047;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sddk3", 10) == 0)
- {
-{
-return dev_storage + 2032;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sddj3", 10) == 0)
- {
-{
-return dev_storage + 2017;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sddi3", 10) == 0)
- {
-{
-return dev_storage + 2002;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sddh3", 10) == 0)
- {
-{
-return dev_storage + 1987;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sddg3", 10) == 0)
- {
-{
-return dev_storage + 1972;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sddf3", 10) == 0)
- {
-{
-return dev_storage + 1957;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdde3", 10) == 0)
- {
-{
-return dev_storage + 1942;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddd3", 10) == 0)
- {
-{
-return dev_storage + 1927;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sddc3", 10) == 0)
- {
-{
-return dev_storage + 1912;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sddb3", 10) == 0)
- {
-{
-return dev_storage + 1897;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdda3", 10) == 0)
- {
-{
-return dev_storage + 1882;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [6])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdd13", 10) == 0)
- {
-{
-return dev_storage + 275;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/scd13", 10) == 0)
- {
-{
-return dev_storage + 189;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'c':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdcz3", 10) == 0)
- {
-{
-return dev_storage + 1843;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sdcy3", 10) == 0)
- {
-{
-return dev_storage + 1828;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdcx3", 10) == 0)
- {
-{
-return dev_storage + 1813;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdcw3", 10) == 0)
- {
-{
-return dev_storage + 1798;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdcv3", 10) == 0)
- {
-{
-return dev_storage + 1783;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdcu3", 10) == 0)
- {
-{
-return dev_storage + 1768;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdct3", 10) == 0)
- {
-{
-return dev_storage + 1753;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdcs3", 10) == 0)
- {
-{
-return dev_storage + 1738;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdcr3", 10) == 0)
- {
-{
-return dev_storage + 1723;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdcq3", 10) == 0)
- {
-{
-return dev_storage + 1708;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdcp3", 10) == 0)
- {
-{
-return dev_storage + 1693;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdco3", 10) == 0)
- {
-{
-return dev_storage + 1678;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdcn3", 10) == 0)
- {
-{
-return dev_storage + 1663;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdcm3", 10) == 0)
- {
-{
-return dev_storage + 1648;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdcl3", 10) == 0)
- {
-{
-return dev_storage + 1633;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdck3", 10) == 0)
- {
-{
-return dev_storage + 1618;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdcj3", 10) == 0)
- {
-{
-return dev_storage + 1603;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdci3", 10) == 0)
- {
-{
-return dev_storage + 1588;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdch3", 10) == 0)
- {
-{
-return dev_storage + 1573;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdcg3", 10) == 0)
- {
-{
-return dev_storage + 1558;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdcf3", 10) == 0)
- {
-{
-return dev_storage + 1543;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdce3", 10) == 0)
- {
-{
-return dev_storage + 1528;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdcd3", 10) == 0)
- {
-{
-return dev_storage + 1513;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcc3", 10) == 0)
- {
-{
-return dev_storage + 1498;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdcb3", 10) == 0)
- {
-{
-return dev_storage + 1483;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdca3", 10) == 0)
- {
-{
-return dev_storage + 1468;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdc13", 10) == 0)
- {
-{
-return dev_storage + 260;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'b':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdbz3", 10) == 0)
- {
-{
-return dev_storage + 1427;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sdby3", 10) == 0)
- {
-{
-return dev_storage + 1412;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdbx3", 10) == 0)
- {
-{
-return dev_storage + 1397;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdbw3", 10) == 0)
- {
-{
-return dev_storage + 1382;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdbv3", 10) == 0)
- {
-{
-return dev_storage + 1367;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdbu3", 10) == 0)
- {
-{
-return dev_storage + 1352;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdbt3", 10) == 0)
- {
-{
-return dev_storage + 1337;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdbs3", 10) == 0)
- {
-{
-return dev_storage + 1322;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdbr3", 10) == 0)
- {
-{
-return dev_storage + 1307;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdbq3", 10) == 0)
- {
-{
-return dev_storage + 1292;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdbp3", 10) == 0)
- {
-{
-return dev_storage + 1277;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdbo3", 10) == 0)
- {
-{
-return dev_storage + 1262;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdbn3", 10) == 0)
- {
-{
-return dev_storage + 1247;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdbm3", 10) == 0)
- {
-{
-return dev_storage + 1232;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdbl3", 10) == 0)
- {
-{
-return dev_storage + 1217;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdbk3", 10) == 0)
- {
-{
-return dev_storage + 1202;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdbj3", 10) == 0)
- {
-{
-return dev_storage + 1187;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdbi3", 10) == 0)
- {
-{
-return dev_storage + 1172;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdbh3", 10) == 0)
- {
-{
-return dev_storage + 1157;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdbg3", 10) == 0)
- {
-{
-return dev_storage + 1142;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdbf3", 10) == 0)
- {
-{
-return dev_storage + 1127;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdbe3", 10) == 0)
- {
-{
-return dev_storage + 1112;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdbd3", 10) == 0)
- {
-{
-return dev_storage + 1097;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdbc3", 10) == 0)
- {
-{
-return dev_storage + 1082;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbb3", 10) == 0)
- {
-{
-return dev_storage + 1067;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdba3", 10) == 0)
- {
-{
-return dev_storage + 1052;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdb13", 10) == 0)
- {
-{
-return dev_storage + 245;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'a':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdaz3", 10) == 0)
- {
-{
-return dev_storage + 1011;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sday3", 10) == 0)
- {
-{
-return dev_storage + 996;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdax3", 10) == 0)
- {
-{
-return dev_storage + 981;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdaw3", 10) == 0)
- {
-{
-return dev_storage + 966;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdav3", 10) == 0)
- {
-{
-return dev_storage + 951;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdau3", 10) == 0)
- {
-{
-return dev_storage + 936;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdat3", 10) == 0)
- {
-{
-return dev_storage + 921;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdas3", 10) == 0)
- {
-{
-return dev_storage + 906;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdar3", 10) == 0)
- {
-{
-return dev_storage + 891;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdaq3", 10) == 0)
- {
-{
-return dev_storage + 876;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdap3", 10) == 0)
- {
-{
-return dev_storage + 861;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdao3", 10) == 0)
- {
-{
-return dev_storage + 846;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdan3", 10) == 0)
- {
-{
-return dev_storage + 831;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdam3", 10) == 0)
- {
-{
-return dev_storage + 816;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdal3", 10) == 0)
- {
-{
-return dev_storage + 801;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdak3", 10) == 0)
- {
-{
-return dev_storage + 786;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdaj3", 10) == 0)
- {
-{
-return dev_storage + 771;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdai3", 10) == 0)
- {
-{
-return dev_storage + 756;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdah3", 10) == 0)
- {
-{
-return dev_storage + 741;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdag3", 10) == 0)
- {
-{
-return dev_storage + 726;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdaf3", 10) == 0)
- {
-{
-return dev_storage + 711;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdae3", 10) == 0)
- {
-{
-return dev_storage + 696;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdad3", 10) == 0)
- {
-{
-return dev_storage + 681;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdac3", 10) == 0)
- {
-{
-return dev_storage + 666;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdab3", 10) == 0)
- {
-{
-return dev_storage + 651;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaa3", 10) == 0)
- {
-{
-return dev_storage + 636;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sda13", 10) == 0)
- {
-{
-return dev_storage + 230;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [8])
- {
- case '2':
- if (strncmp (KR_keyword, "/dev/st123", 10) == 0)
- {
-{
-return dev_storage + 2379;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/st113", 10) == 0)
- {
-{
-return dev_storage + 2369;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/st103", 10) == 0)
- {
-{
-return dev_storage + 2359;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '2':
- switch (KR_keyword [7])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdz12", 10) == 0)
- {
-{
-return dev_storage + 604;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- switch (KR_keyword [8])
- {
- case 'S':
- if (strncmp (KR_keyword, "/dev/ttyS2", 10) == 0)
- {
-{
-return dev_storage + 2451;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/tty62", 10) == 0)
- {
-{
-return dev_storage + 2447;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/tty52", 10) == 0)
- {
-{
-return dev_storage + 2437;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/tty42", 10) == 0)
- {
-{
-return dev_storage + 2427;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/tty32", 10) == 0)
- {
-{
-return dev_storage + 2417;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/tty22", 10) == 0)
- {
-{
-return dev_storage + 2407;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty12", 10) == 0)
- {
-{
-return dev_storage + 2397;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdy12", 10) == 0)
- {
-{
-return dev_storage + 589;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdx12", 10) == 0)
- {
-{
-return dev_storage + 574;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdw12", 10) == 0)
- {
-{
-return dev_storage + 559;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdv12", 10) == 0)
- {
-{
-return dev_storage + 544;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdu12", 10) == 0)
- {
-{
-return dev_storage + 529;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/nst92", 10) == 0)
- {
-{
-return dev_storage + 135;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/nst82", 10) == 0)
- {
-{
-return dev_storage + 125;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/nst72", 10) == 0)
- {
-{
-return dev_storage + 115;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/nst62", 10) == 0)
- {
-{
-return dev_storage + 105;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/nst52", 10) == 0)
- {
-{
-return dev_storage + 95;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/nst42", 10) == 0)
- {
-{
-return dev_storage + 85;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/nst32", 10) == 0)
- {
-{
-return dev_storage + 75;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/nst22", 10) == 0)
- {
-{
-return dev_storage + 65;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [5])
- {
- case 's':
- if (strncmp (KR_keyword, "/dev/sdt12", 10) == 0)
- {
-{
-return dev_storage + 514;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst12", 10) == 0)
- {
-{
-return dev_storage + 55;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sds12", 10) == 0)
- {
-{
-return dev_storage + 499;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdr12", 10) == 0)
- {
-{
-return dev_storage + 484;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdq12", 10) == 0)
- {
-{
-return dev_storage + 469;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdp12", 10) == 0)
- {
-{
-return dev_storage + 454;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdo12", 10) == 0)
- {
-{
-return dev_storage + 439;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdn12", 10) == 0)
- {
-{
-return dev_storage + 424;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- switch (KR_keyword [5])
- {
- case 's':
- if (strncmp (KR_keyword, "/dev/sdm12", 10) == 0)
- {
-{
-return dev_storage + 409;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/com12", 10) == 0)
- {
-{
-return dev_storage + 13;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdl12", 10) == 0)
- {
-{
-return dev_storage + 394;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdk12", 10) == 0)
- {
-{
-return dev_storage + 379;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdj12", 10) == 0)
- {
-{
-return dev_storage + 364;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdi12", 10) == 0)
- {
-{
-return dev_storage + 349;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdh12", 10) == 0)
- {
-{
-return dev_storage + 334;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdg12", 10) == 0)
- {
-{
-return dev_storage + 319;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdf12", 10) == 0)
- {
-{
-return dev_storage + 304;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sde12", 10) == 0)
- {
-{
-return dev_storage + 289;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- switch (KR_keyword [8])
- {
- case 'x':
- if (strncmp (KR_keyword, "/dev/sddx2", 10) == 0)
- {
-{
-return dev_storage + 2226;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sddw2", 10) == 0)
- {
-{
-return dev_storage + 2211;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sddv2", 10) == 0)
- {
-{
-return dev_storage + 2196;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sddu2", 10) == 0)
- {
-{
-return dev_storage + 2181;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sddt2", 10) == 0)
- {
-{
-return dev_storage + 2166;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdds2", 10) == 0)
- {
-{
-return dev_storage + 2151;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sddr2", 10) == 0)
- {
-{
-return dev_storage + 2136;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sddq2", 10) == 0)
- {
-{
-return dev_storage + 2121;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sddp2", 10) == 0)
- {
-{
-return dev_storage + 2106;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sddo2", 10) == 0)
- {
-{
-return dev_storage + 2091;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sddn2", 10) == 0)
- {
-{
-return dev_storage + 2076;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sddm2", 10) == 0)
- {
-{
-return dev_storage + 2061;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sddl2", 10) == 0)
- {
-{
-return dev_storage + 2046;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sddk2", 10) == 0)
- {
-{
-return dev_storage + 2031;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sddj2", 10) == 0)
- {
-{
-return dev_storage + 2016;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sddi2", 10) == 0)
- {
-{
-return dev_storage + 2001;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sddh2", 10) == 0)
- {
-{
-return dev_storage + 1986;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sddg2", 10) == 0)
- {
-{
-return dev_storage + 1971;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sddf2", 10) == 0)
- {
-{
-return dev_storage + 1956;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdde2", 10) == 0)
- {
-{
-return dev_storage + 1941;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddd2", 10) == 0)
- {
-{
-return dev_storage + 1926;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sddc2", 10) == 0)
- {
-{
-return dev_storage + 1911;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sddb2", 10) == 0)
- {
-{
-return dev_storage + 1896;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdda2", 10) == 0)
- {
-{
-return dev_storage + 1881;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [6])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdd12", 10) == 0)
- {
-{
-return dev_storage + 274;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/scd12", 10) == 0)
- {
-{
-return dev_storage + 188;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'c':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdcz2", 10) == 0)
- {
-{
-return dev_storage + 1842;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sdcy2", 10) == 0)
- {
-{
-return dev_storage + 1827;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdcx2", 10) == 0)
- {
-{
-return dev_storage + 1812;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdcw2", 10) == 0)
- {
-{
-return dev_storage + 1797;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdcv2", 10) == 0)
- {
-{
-return dev_storage + 1782;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdcu2", 10) == 0)
- {
-{
-return dev_storage + 1767;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdct2", 10) == 0)
- {
-{
-return dev_storage + 1752;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdcs2", 10) == 0)
- {
-{
-return dev_storage + 1737;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdcr2", 10) == 0)
- {
-{
-return dev_storage + 1722;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdcq2", 10) == 0)
- {
-{
-return dev_storage + 1707;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdcp2", 10) == 0)
- {
-{
-return dev_storage + 1692;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdco2", 10) == 0)
- {
-{
-return dev_storage + 1677;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdcn2", 10) == 0)
- {
-{
-return dev_storage + 1662;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdcm2", 10) == 0)
- {
-{
-return dev_storage + 1647;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdcl2", 10) == 0)
- {
-{
-return dev_storage + 1632;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdck2", 10) == 0)
- {
-{
-return dev_storage + 1617;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdcj2", 10) == 0)
- {
-{
-return dev_storage + 1602;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdci2", 10) == 0)
- {
-{
-return dev_storage + 1587;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdch2", 10) == 0)
- {
-{
-return dev_storage + 1572;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdcg2", 10) == 0)
- {
-{
-return dev_storage + 1557;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdcf2", 10) == 0)
- {
-{
-return dev_storage + 1542;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdce2", 10) == 0)
- {
-{
-return dev_storage + 1527;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdcd2", 10) == 0)
- {
-{
-return dev_storage + 1512;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcc2", 10) == 0)
- {
-{
-return dev_storage + 1497;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdcb2", 10) == 0)
- {
-{
-return dev_storage + 1482;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdca2", 10) == 0)
- {
-{
-return dev_storage + 1467;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdc12", 10) == 0)
- {
-{
-return dev_storage + 259;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'b':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdbz2", 10) == 0)
- {
-{
-return dev_storage + 1426;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sdby2", 10) == 0)
- {
-{
-return dev_storage + 1411;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdbx2", 10) == 0)
- {
-{
-return dev_storage + 1396;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdbw2", 10) == 0)
- {
-{
-return dev_storage + 1381;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdbv2", 10) == 0)
- {
-{
-return dev_storage + 1366;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdbu2", 10) == 0)
- {
-{
-return dev_storage + 1351;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdbt2", 10) == 0)
- {
-{
-return dev_storage + 1336;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdbs2", 10) == 0)
- {
-{
-return dev_storage + 1321;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdbr2", 10) == 0)
- {
-{
-return dev_storage + 1306;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdbq2", 10) == 0)
- {
-{
-return dev_storage + 1291;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdbp2", 10) == 0)
- {
-{
-return dev_storage + 1276;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdbo2", 10) == 0)
- {
-{
-return dev_storage + 1261;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdbn2", 10) == 0)
- {
-{
-return dev_storage + 1246;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdbm2", 10) == 0)
- {
-{
-return dev_storage + 1231;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdbl2", 10) == 0)
- {
-{
-return dev_storage + 1216;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdbk2", 10) == 0)
- {
-{
-return dev_storage + 1201;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdbj2", 10) == 0)
- {
-{
-return dev_storage + 1186;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdbi2", 10) == 0)
- {
-{
-return dev_storage + 1171;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdbh2", 10) == 0)
- {
-{
-return dev_storage + 1156;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdbg2", 10) == 0)
- {
-{
-return dev_storage + 1141;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdbf2", 10) == 0)
- {
-{
-return dev_storage + 1126;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdbe2", 10) == 0)
- {
-{
-return dev_storage + 1111;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdbd2", 10) == 0)
- {
-{
-return dev_storage + 1096;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdbc2", 10) == 0)
- {
-{
-return dev_storage + 1081;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbb2", 10) == 0)
- {
-{
-return dev_storage + 1066;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdba2", 10) == 0)
- {
-{
-return dev_storage + 1051;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdb12", 10) == 0)
- {
-{
-return dev_storage + 244;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'a':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdaz2", 10) == 0)
- {
-{
-return dev_storage + 1010;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sday2", 10) == 0)
- {
-{
-return dev_storage + 995;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdax2", 10) == 0)
- {
-{
-return dev_storage + 980;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdaw2", 10) == 0)
- {
-{
-return dev_storage + 965;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdav2", 10) == 0)
- {
-{
-return dev_storage + 950;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdau2", 10) == 0)
- {
-{
-return dev_storage + 935;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdat2", 10) == 0)
- {
-{
-return dev_storage + 920;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdas2", 10) == 0)
- {
-{
-return dev_storage + 905;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdar2", 10) == 0)
- {
-{
-return dev_storage + 890;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdaq2", 10) == 0)
- {
-{
-return dev_storage + 875;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdap2", 10) == 0)
- {
-{
-return dev_storage + 860;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdao2", 10) == 0)
- {
-{
-return dev_storage + 845;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdan2", 10) == 0)
- {
-{
-return dev_storage + 830;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdam2", 10) == 0)
- {
-{
-return dev_storage + 815;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdal2", 10) == 0)
- {
-{
-return dev_storage + 800;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdak2", 10) == 0)
- {
-{
-return dev_storage + 785;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdaj2", 10) == 0)
- {
-{
-return dev_storage + 770;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdai2", 10) == 0)
- {
-{
-return dev_storage + 755;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdah2", 10) == 0)
- {
-{
-return dev_storage + 740;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdag2", 10) == 0)
- {
-{
-return dev_storage + 725;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdaf2", 10) == 0)
- {
-{
-return dev_storage + 710;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdae2", 10) == 0)
- {
-{
-return dev_storage + 695;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdad2", 10) == 0)
- {
-{
-return dev_storage + 680;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdac2", 10) == 0)
- {
-{
-return dev_storage + 665;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdab2", 10) == 0)
- {
-{
-return dev_storage + 650;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaa2", 10) == 0)
- {
-{
-return dev_storage + 635;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sda12", 10) == 0)
- {
-{
-return dev_storage + 229;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [8])
- {
- case '2':
- if (strncmp (KR_keyword, "/dev/st122", 10) == 0)
- {
-{
-return dev_storage + 2378;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/st112", 10) == 0)
- {
-{
-return dev_storage + 2368;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/st102", 10) == 0)
- {
-{
-return dev_storage + 2358;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [7])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdz11", 10) == 0)
- {
-{
-return dev_storage + 603;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- switch (KR_keyword [8])
- {
- case 'S':
- if (strncmp (KR_keyword, "/dev/ttyS1", 10) == 0)
- {
-{
-return dev_storage + 2450;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/tty61", 10) == 0)
- {
-{
-return dev_storage + 2446;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/tty51", 10) == 0)
- {
-{
-return dev_storage + 2436;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/tty41", 10) == 0)
- {
-{
-return dev_storage + 2426;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/tty31", 10) == 0)
- {
-{
-return dev_storage + 2416;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/tty21", 10) == 0)
- {
-{
-return dev_storage + 2406;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty11", 10) == 0)
- {
-{
-return dev_storage + 2396;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdy11", 10) == 0)
- {
-{
-return dev_storage + 588;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdx11", 10) == 0)
- {
-{
-return dev_storage + 573;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdw11", 10) == 0)
- {
-{
-return dev_storage + 558;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdv11", 10) == 0)
- {
-{
-return dev_storage + 543;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdu11", 10) == 0)
- {
-{
-return dev_storage + 528;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/nst91", 10) == 0)
- {
-{
-return dev_storage + 134;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/nst81", 10) == 0)
- {
-{
-return dev_storage + 124;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/nst71", 10) == 0)
- {
-{
-return dev_storage + 114;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/nst61", 10) == 0)
- {
-{
-return dev_storage + 104;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/nst51", 10) == 0)
- {
-{
-return dev_storage + 94;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/nst41", 10) == 0)
- {
-{
-return dev_storage + 84;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/nst31", 10) == 0)
- {
-{
-return dev_storage + 74;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/nst21", 10) == 0)
- {
-{
-return dev_storage + 64;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [5])
- {
- case 's':
- if (strncmp (KR_keyword, "/dev/sdt11", 10) == 0)
- {
-{
-return dev_storage + 513;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst11", 10) == 0)
- {
-{
-return dev_storage + 54;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sds11", 10) == 0)
- {
-{
-return dev_storage + 498;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdr11", 10) == 0)
- {
-{
-return dev_storage + 483;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdq11", 10) == 0)
- {
-{
-return dev_storage + 468;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdp11", 10) == 0)
- {
-{
-return dev_storage + 453;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdo11", 10) == 0)
- {
-{
-return dev_storage + 438;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdn11", 10) == 0)
- {
-{
-return dev_storage + 423;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- switch (KR_keyword [5])
- {
- case 's':
- if (strncmp (KR_keyword, "/dev/sdm11", 10) == 0)
- {
-{
-return dev_storage + 408;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/com11", 10) == 0)
- {
-{
-return dev_storage + 12;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdl11", 10) == 0)
- {
-{
-return dev_storage + 393;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdk11", 10) == 0)
- {
-{
-return dev_storage + 378;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdj11", 10) == 0)
- {
-{
-return dev_storage + 363;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdi11", 10) == 0)
- {
-{
-return dev_storage + 348;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdh11", 10) == 0)
- {
-{
-return dev_storage + 333;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdg11", 10) == 0)
- {
-{
-return dev_storage + 318;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdf11", 10) == 0)
- {
-{
-return dev_storage + 303;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sde11", 10) == 0)
- {
-{
-return dev_storage + 288;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- switch (KR_keyword [8])
- {
- case 'x':
- if (strncmp (KR_keyword, "/dev/sddx1", 10) == 0)
- {
-{
-return dev_storage + 2225;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sddw1", 10) == 0)
- {
-{
-return dev_storage + 2210;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sddv1", 10) == 0)
- {
-{
-return dev_storage + 2195;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sddu1", 10) == 0)
- {
-{
-return dev_storage + 2180;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sddt1", 10) == 0)
- {
-{
-return dev_storage + 2165;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdds1", 10) == 0)
- {
-{
-return dev_storage + 2150;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sddr1", 10) == 0)
- {
-{
-return dev_storage + 2135;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sddq1", 10) == 0)
- {
-{
-return dev_storage + 2120;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sddp1", 10) == 0)
- {
-{
-return dev_storage + 2105;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sddo1", 10) == 0)
- {
-{
-return dev_storage + 2090;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sddn1", 10) == 0)
- {
-{
-return dev_storage + 2075;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sddm1", 10) == 0)
- {
-{
-return dev_storage + 2060;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sddl1", 10) == 0)
- {
-{
-return dev_storage + 2045;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sddk1", 10) == 0)
- {
-{
-return dev_storage + 2030;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sddj1", 10) == 0)
- {
-{
-return dev_storage + 2015;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sddi1", 10) == 0)
- {
-{
-return dev_storage + 2000;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sddh1", 10) == 0)
- {
-{
-return dev_storage + 1985;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sddg1", 10) == 0)
- {
-{
-return dev_storage + 1970;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sddf1", 10) == 0)
- {
-{
-return dev_storage + 1955;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdde1", 10) == 0)
- {
-{
-return dev_storage + 1940;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddd1", 10) == 0)
- {
-{
-return dev_storage + 1925;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sddc1", 10) == 0)
- {
-{
-return dev_storage + 1910;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sddb1", 10) == 0)
- {
-{
-return dev_storage + 1895;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdda1", 10) == 0)
- {
-{
-return dev_storage + 1880;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [6])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdd11", 10) == 0)
- {
-{
-return dev_storage + 273;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/scd11", 10) == 0)
- {
-{
-return dev_storage + 187;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'c':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdcz1", 10) == 0)
- {
-{
-return dev_storage + 1841;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sdcy1", 10) == 0)
- {
-{
-return dev_storage + 1826;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdcx1", 10) == 0)
- {
-{
-return dev_storage + 1811;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdcw1", 10) == 0)
- {
-{
-return dev_storage + 1796;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdcv1", 10) == 0)
- {
-{
-return dev_storage + 1781;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdcu1", 10) == 0)
- {
-{
-return dev_storage + 1766;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdct1", 10) == 0)
- {
-{
-return dev_storage + 1751;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdcs1", 10) == 0)
- {
-{
-return dev_storage + 1736;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdcr1", 10) == 0)
- {
-{
-return dev_storage + 1721;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdcq1", 10) == 0)
- {
-{
-return dev_storage + 1706;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdcp1", 10) == 0)
- {
-{
-return dev_storage + 1691;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdco1", 10) == 0)
- {
-{
-return dev_storage + 1676;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdcn1", 10) == 0)
- {
-{
-return dev_storage + 1661;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdcm1", 10) == 0)
- {
-{
-return dev_storage + 1646;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdcl1", 10) == 0)
- {
-{
-return dev_storage + 1631;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdck1", 10) == 0)
- {
-{
-return dev_storage + 1616;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdcj1", 10) == 0)
- {
-{
-return dev_storage + 1601;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdci1", 10) == 0)
- {
-{
-return dev_storage + 1586;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdch1", 10) == 0)
- {
-{
-return dev_storage + 1571;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdcg1", 10) == 0)
- {
-{
-return dev_storage + 1556;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdcf1", 10) == 0)
- {
-{
-return dev_storage + 1541;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdce1", 10) == 0)
- {
-{
-return dev_storage + 1526;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdcd1", 10) == 0)
- {
-{
-return dev_storage + 1511;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcc1", 10) == 0)
- {
-{
-return dev_storage + 1496;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdcb1", 10) == 0)
- {
-{
-return dev_storage + 1481;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdca1", 10) == 0)
- {
-{
-return dev_storage + 1466;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdc11", 10) == 0)
- {
-{
-return dev_storage + 258;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'b':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdbz1", 10) == 0)
- {
-{
-return dev_storage + 1425;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sdby1", 10) == 0)
- {
-{
-return dev_storage + 1410;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdbx1", 10) == 0)
- {
-{
-return dev_storage + 1395;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdbw1", 10) == 0)
- {
-{
-return dev_storage + 1380;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdbv1", 10) == 0)
- {
-{
-return dev_storage + 1365;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdbu1", 10) == 0)
- {
-{
-return dev_storage + 1350;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdbt1", 10) == 0)
- {
-{
-return dev_storage + 1335;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdbs1", 10) == 0)
- {
-{
-return dev_storage + 1320;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdbr1", 10) == 0)
- {
-{
-return dev_storage + 1305;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdbq1", 10) == 0)
- {
-{
-return dev_storage + 1290;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdbp1", 10) == 0)
- {
-{
-return dev_storage + 1275;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdbo1", 10) == 0)
- {
-{
-return dev_storage + 1260;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdbn1", 10) == 0)
- {
-{
-return dev_storage + 1245;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdbm1", 10) == 0)
- {
-{
-return dev_storage + 1230;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdbl1", 10) == 0)
- {
-{
-return dev_storage + 1215;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdbk1", 10) == 0)
- {
-{
-return dev_storage + 1200;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdbj1", 10) == 0)
- {
-{
-return dev_storage + 1185;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdbi1", 10) == 0)
- {
-{
-return dev_storage + 1170;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdbh1", 10) == 0)
- {
-{
-return dev_storage + 1155;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdbg1", 10) == 0)
- {
-{
-return dev_storage + 1140;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdbf1", 10) == 0)
- {
-{
-return dev_storage + 1125;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdbe1", 10) == 0)
- {
-{
-return dev_storage + 1110;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdbd1", 10) == 0)
- {
-{
-return dev_storage + 1095;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdbc1", 10) == 0)
- {
-{
-return dev_storage + 1080;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbb1", 10) == 0)
- {
-{
-return dev_storage + 1065;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdba1", 10) == 0)
- {
-{
-return dev_storage + 1050;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sdb11", 10) == 0)
- {
-{
-return dev_storage + 243;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'a':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdaz1", 10) == 0)
- {
-{
-return dev_storage + 1009;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sday1", 10) == 0)
- {
-{
-return dev_storage + 994;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdax1", 10) == 0)
- {
-{
-return dev_storage + 979;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdaw1", 10) == 0)
- {
-{
-return dev_storage + 964;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdav1", 10) == 0)
- {
-{
-return dev_storage + 949;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdau1", 10) == 0)
- {
-{
-return dev_storage + 934;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdat1", 10) == 0)
- {
-{
-return dev_storage + 919;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdas1", 10) == 0)
- {
-{
-return dev_storage + 904;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdar1", 10) == 0)
- {
-{
-return dev_storage + 889;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdaq1", 10) == 0)
- {
-{
-return dev_storage + 874;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdap1", 10) == 0)
- {
-{
-return dev_storage + 859;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdao1", 10) == 0)
- {
-{
-return dev_storage + 844;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdan1", 10) == 0)
- {
-{
-return dev_storage + 829;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdam1", 10) == 0)
- {
-{
-return dev_storage + 814;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdal1", 10) == 0)
- {
-{
-return dev_storage + 799;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdak1", 10) == 0)
- {
-{
-return dev_storage + 784;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdaj1", 10) == 0)
- {
-{
-return dev_storage + 769;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdai1", 10) == 0)
- {
-{
-return dev_storage + 754;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdah1", 10) == 0)
- {
-{
-return dev_storage + 739;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdag1", 10) == 0)
- {
-{
-return dev_storage + 724;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdaf1", 10) == 0)
- {
-{
-return dev_storage + 709;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdae1", 10) == 0)
- {
-{
-return dev_storage + 694;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdad1", 10) == 0)
- {
-{
-return dev_storage + 679;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdac1", 10) == 0)
- {
-{
-return dev_storage + 664;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdab1", 10) == 0)
- {
-{
-return dev_storage + 649;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaa1", 10) == 0)
- {
-{
-return dev_storage + 634;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/sda11", 10) == 0)
- {
-{
-return dev_storage + 228;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [8])
- {
- case '2':
- if (strncmp (KR_keyword, "/dev/st121", 10) == 0)
- {
-{
-return dev_storage + 2377;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/st111", 10) == 0)
- {
-{
-return dev_storage + 2367;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/st101", 10) == 0)
- {
-{
-return dev_storage + 2357;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '0':
- switch (KR_keyword [7])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdz10", 10) == 0)
- {
-{
-return dev_storage + 602;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- switch (KR_keyword [8])
- {
- case 'S':
- if (strncmp (KR_keyword, "/dev/ttyS0", 10) == 0)
- {
-{
-return dev_storage + 2449;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/tty60", 10) == 0)
- {
-{
-return dev_storage + 2445;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/tty50", 10) == 0)
- {
-{
-return dev_storage + 2435;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/tty40", 10) == 0)
- {
-{
-return dev_storage + 2425;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/tty30", 10) == 0)
- {
-{
-return dev_storage + 2415;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/tty20", 10) == 0)
- {
-{
-return dev_storage + 2405;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/tty10", 10) == 0)
- {
-{
-return dev_storage + 2395;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdy10", 10) == 0)
- {
-{
-return dev_storage + 587;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdx10", 10) == 0)
- {
-{
-return dev_storage + 572;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdw10", 10) == 0)
- {
-{
-return dev_storage + 557;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdv10", 10) == 0)
- {
-{
-return dev_storage + 542;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdu10", 10) == 0)
- {
-{
-return dev_storage + 527;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- switch (KR_keyword [8])
- {
- case '9':
- if (strncmp (KR_keyword, "/dev/nst90", 10) == 0)
- {
-{
-return dev_storage + 133;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/nst80", 10) == 0)
- {
-{
-return dev_storage + 123;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/nst70", 10) == 0)
- {
-{
-return dev_storage + 113;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/nst60", 10) == 0)
- {
-{
-return dev_storage + 103;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/nst50", 10) == 0)
- {
-{
-return dev_storage + 93;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/nst40", 10) == 0)
- {
-{
-return dev_storage + 83;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/nst30", 10) == 0)
- {
-{
-return dev_storage + 73;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/nst20", 10) == 0)
- {
-{
-return dev_storage + 63;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [5])
- {
- case 's':
- if (strncmp (KR_keyword, "/dev/sdt10", 10) == 0)
- {
-{
-return dev_storage + 512;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst10", 10) == 0)
- {
-{
-return dev_storage + 53;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sds10", 10) == 0)
- {
-{
-return dev_storage + 497;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdr10", 10) == 0)
- {
-{
-return dev_storage + 482;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdq10", 10) == 0)
- {
-{
-return dev_storage + 467;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdp10", 10) == 0)
- {
-{
-return dev_storage + 452;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdo10", 10) == 0)
- {
-{
-return dev_storage + 437;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdn10", 10) == 0)
- {
-{
-return dev_storage + 422;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- switch (KR_keyword [5])
- {
- case 's':
- if (strncmp (KR_keyword, "/dev/sdm10", 10) == 0)
- {
-{
-return dev_storage + 407;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/com10", 10) == 0)
- {
-{
-return dev_storage + 11;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdl10", 10) == 0)
- {
-{
-return dev_storage + 392;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdk10", 10) == 0)
- {
-{
-return dev_storage + 377;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdj10", 10) == 0)
- {
-{
-return dev_storage + 362;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdi10", 10) == 0)
- {
-{
-return dev_storage + 347;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdh10", 10) == 0)
- {
-{
-return dev_storage + 332;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdg10", 10) == 0)
- {
-{
-return dev_storage + 317;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdf10", 10) == 0)
- {
-{
-return dev_storage + 302;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sde10", 10) == 0)
- {
-{
-return dev_storage + 287;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- switch (KR_keyword [6])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdd10", 10) == 0)
- {
-{
-return dev_storage + 272;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/scd10", 10) == 0)
- {
-{
-return dev_storage + 186;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdc10", 10) == 0)
- {
-{
-return dev_storage + 257;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdb10", 10) == 0)
- {
-{
-return dev_storage + 242;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sda10", 10) == 0)
- {
-{
-return dev_storage + 227;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [8])
- {
- case '2':
- if (strncmp (KR_keyword, "/dev/st120", 10) == 0)
- {
-{
-return dev_storage + 2376;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/st110", 10) == 0)
- {
-{
-return dev_storage + 2366;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/st100", 10) == 0)
- {
-{
-return dev_storage + 2356;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 11:
- switch (KR_keyword [10])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/conout", 11) == 0)
- {
-{
-return dev_storage + 19;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/random", 11) == 0)
- {
-{
-return dev_storage + 175;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '9':
- switch (KR_keyword [9])
- {
- case '5':
- if (strncmp (KR_keyword, "/dev/ttyS59", 11) == 0)
- {
-{
-return dev_storage + 2508;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/ttyS49", 11) == 0)
- {
-{
-return dev_storage + 2498;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/ttyS39", 11) == 0)
- {
-{
-return dev_storage + 2488;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/ttyS29", 11) == 0)
- {
-{
-return dev_storage + 2478;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/ttyS19", 11) == 0)
- {
-{
-return dev_storage + 2468;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst119", 11) == 0)
- {
-{
-return dev_storage + 162;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/nst109", 11) == 0)
- {
-{
-return dev_storage + 152;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '8':
- switch (KR_keyword [9])
- {
- case '5':
- if (strncmp (KR_keyword, "/dev/ttyS58", 11) == 0)
- {
-{
-return dev_storage + 2507;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/ttyS48", 11) == 0)
- {
-{
-return dev_storage + 2497;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/ttyS38", 11) == 0)
- {
-{
-return dev_storage + 2487;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/ttyS28", 11) == 0)
- {
-{
-return dev_storage + 2477;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/ttyS18", 11) == 0)
- {
-{
-return dev_storage + 2467;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst118", 11) == 0)
- {
-{
-return dev_storage + 161;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/nst108", 11) == 0)
- {
-{
-return dev_storage + 151;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '7':
- switch (KR_keyword [9])
- {
- case '5':
- if (strncmp (KR_keyword, "/dev/ttyS57", 11) == 0)
- {
-{
-return dev_storage + 2506;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/ttyS47", 11) == 0)
- {
-{
-return dev_storage + 2496;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/ttyS37", 11) == 0)
- {
-{
-return dev_storage + 2486;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/ttyS27", 11) == 0)
- {
-{
-return dev_storage + 2476;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst127", 11) == 0)
- {
-{
-return dev_storage + 170;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/ttyS17", 11) == 0)
- {
-{
-return dev_storage + 2466;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst117", 11) == 0)
- {
-{
-return dev_storage + 160;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/nst107", 11) == 0)
- {
-{
-return dev_storage + 150;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '6':
- switch (KR_keyword [9])
- {
- case '5':
- if (strncmp (KR_keyword, "/dev/ttyS56", 11) == 0)
- {
-{
-return dev_storage + 2505;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/ttyS46", 11) == 0)
- {
-{
-return dev_storage + 2495;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/ttyS36", 11) == 0)
- {
-{
-return dev_storage + 2485;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/ttyS26", 11) == 0)
- {
-{
-return dev_storage + 2475;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst126", 11) == 0)
- {
-{
-return dev_storage + 169;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [5])
- {
- case 't':
- if (strncmp (KR_keyword, "/dev/ttyS16", 11) == 0)
- {
-{
-return dev_storage + 2465;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst116", 11) == 0)
- {
-{
-return dev_storage + 159;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/nst106", 11) == 0)
- {
-{
-return dev_storage + 149;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '5':
- switch (KR_keyword [7])
- {
- case 'y':
- switch (KR_keyword [9])
- {
- case '5':
- if (strncmp (KR_keyword, "/dev/ttyS55", 11) == 0)
- {
-{
-return dev_storage + 2504;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/ttyS45", 11) == 0)
- {
-{
-return dev_storage + 2494;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/ttyS35", 11) == 0)
- {
-{
-return dev_storage + 2484;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/ttyS25", 11) == 0)
- {
-{
-return dev_storage + 2474;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/ttyS15", 11) == 0)
- {
-{
-return dev_storage + 2464;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 't':
- switch (KR_keyword [9])
- {
- case '2':
- if (strncmp (KR_keyword, "/dev/nst125", 11) == 0)
- {
-{
-return dev_storage + 168;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/nst115", 11) == 0)
- {
-{
-return dev_storage + 158;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/nst105", 11) == 0)
- {
-{
-return dev_storage + 148;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'd':
- switch (KR_keyword [8])
- {
- case 'x':
- if (strncmp (KR_keyword, "/dev/sddx15", 11) == 0)
- {
-{
-return dev_storage + 2239;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sddw15", 11) == 0)
- {
-{
-return dev_storage + 2224;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sddv15", 11) == 0)
- {
-{
-return dev_storage + 2209;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sddu15", 11) == 0)
- {
-{
-return dev_storage + 2194;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sddt15", 11) == 0)
- {
-{
-return dev_storage + 2179;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdds15", 11) == 0)
- {
-{
-return dev_storage + 2164;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sddr15", 11) == 0)
- {
-{
-return dev_storage + 2149;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sddq15", 11) == 0)
- {
-{
-return dev_storage + 2134;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sddp15", 11) == 0)
- {
-{
-return dev_storage + 2119;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sddo15", 11) == 0)
- {
-{
-return dev_storage + 2104;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sddn15", 11) == 0)
- {
-{
-return dev_storage + 2089;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sddm15", 11) == 0)
- {
-{
-return dev_storage + 2074;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sddl15", 11) == 0)
- {
-{
-return dev_storage + 2059;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sddk15", 11) == 0)
- {
-{
-return dev_storage + 2044;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sddj15", 11) == 0)
- {
-{
-return dev_storage + 2029;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sddi15", 11) == 0)
- {
-{
-return dev_storage + 2014;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sddh15", 11) == 0)
- {
-{
-return dev_storage + 1999;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sddg15", 11) == 0)
- {
-{
-return dev_storage + 1984;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sddf15", 11) == 0)
- {
-{
-return dev_storage + 1969;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdde15", 11) == 0)
- {
-{
-return dev_storage + 1954;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddd15", 11) == 0)
- {
-{
-return dev_storage + 1939;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sddc15", 11) == 0)
- {
-{
-return dev_storage + 1924;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sddb15", 11) == 0)
- {
-{
-return dev_storage + 1909;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdda15", 11) == 0)
- {
-{
-return dev_storage + 1894;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'c':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdcz15", 11) == 0)
- {
-{
-return dev_storage + 1855;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sdcy15", 11) == 0)
- {
-{
-return dev_storage + 1840;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdcx15", 11) == 0)
- {
-{
-return dev_storage + 1825;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdcw15", 11) == 0)
- {
-{
-return dev_storage + 1810;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdcv15", 11) == 0)
- {
-{
-return dev_storage + 1795;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdcu15", 11) == 0)
- {
-{
-return dev_storage + 1780;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdct15", 11) == 0)
- {
-{
-return dev_storage + 1765;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdcs15", 11) == 0)
- {
-{
-return dev_storage + 1750;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdcr15", 11) == 0)
- {
-{
-return dev_storage + 1735;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdcq15", 11) == 0)
- {
-{
-return dev_storage + 1720;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdcp15", 11) == 0)
- {
-{
-return dev_storage + 1705;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdco15", 11) == 0)
- {
-{
-return dev_storage + 1690;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdcn15", 11) == 0)
- {
-{
-return dev_storage + 1675;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdcm15", 11) == 0)
- {
-{
-return dev_storage + 1660;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdcl15", 11) == 0)
- {
-{
-return dev_storage + 1645;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdck15", 11) == 0)
- {
-{
-return dev_storage + 1630;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdcj15", 11) == 0)
- {
-{
-return dev_storage + 1615;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdci15", 11) == 0)
- {
-{
-return dev_storage + 1600;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdch15", 11) == 0)
- {
-{
-return dev_storage + 1585;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdcg15", 11) == 0)
- {
-{
-return dev_storage + 1570;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdcf15", 11) == 0)
- {
-{
-return dev_storage + 1555;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdce15", 11) == 0)
- {
-{
-return dev_storage + 1540;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdcd15", 11) == 0)
- {
-{
-return dev_storage + 1525;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcc15", 11) == 0)
- {
-{
-return dev_storage + 1510;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdcb15", 11) == 0)
- {
-{
-return dev_storage + 1495;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdca15", 11) == 0)
- {
-{
-return dev_storage + 1480;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'b':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdbz15", 11) == 0)
- {
-{
-return dev_storage + 1439;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sdby15", 11) == 0)
- {
-{
-return dev_storage + 1424;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdbx15", 11) == 0)
- {
-{
-return dev_storage + 1409;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdbw15", 11) == 0)
- {
-{
-return dev_storage + 1394;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdbv15", 11) == 0)
- {
-{
-return dev_storage + 1379;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdbu15", 11) == 0)
- {
-{
-return dev_storage + 1364;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdbt15", 11) == 0)
- {
-{
-return dev_storage + 1349;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdbs15", 11) == 0)
- {
-{
-return dev_storage + 1334;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdbr15", 11) == 0)
- {
-{
-return dev_storage + 1319;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdbq15", 11) == 0)
- {
-{
-return dev_storage + 1304;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdbp15", 11) == 0)
- {
-{
-return dev_storage + 1289;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdbo15", 11) == 0)
- {
-{
-return dev_storage + 1274;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdbn15", 11) == 0)
- {
-{
-return dev_storage + 1259;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdbm15", 11) == 0)
- {
-{
-return dev_storage + 1244;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdbl15", 11) == 0)
- {
-{
-return dev_storage + 1229;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdbk15", 11) == 0)
- {
-{
-return dev_storage + 1214;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdbj15", 11) == 0)
- {
-{
-return dev_storage + 1199;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdbi15", 11) == 0)
- {
-{
-return dev_storage + 1184;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdbh15", 11) == 0)
- {
-{
-return dev_storage + 1169;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdbg15", 11) == 0)
- {
-{
-return dev_storage + 1154;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdbf15", 11) == 0)
- {
-{
-return dev_storage + 1139;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdbe15", 11) == 0)
- {
-{
-return dev_storage + 1124;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdbd15", 11) == 0)
- {
-{
-return dev_storage + 1109;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdbc15", 11) == 0)
- {
-{
-return dev_storage + 1094;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbb15", 11) == 0)
- {
-{
-return dev_storage + 1079;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdba15", 11) == 0)
- {
-{
-return dev_storage + 1064;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'a':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdaz15", 11) == 0)
- {
-{
-return dev_storage + 1023;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sday15", 11) == 0)
- {
-{
-return dev_storage + 1008;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdax15", 11) == 0)
- {
-{
-return dev_storage + 993;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdaw15", 11) == 0)
- {
-{
-return dev_storage + 978;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdav15", 11) == 0)
- {
-{
-return dev_storage + 963;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdau15", 11) == 0)
- {
-{
-return dev_storage + 948;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdat15", 11) == 0)
- {
-{
-return dev_storage + 933;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdas15", 11) == 0)
- {
-{
-return dev_storage + 918;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdar15", 11) == 0)
- {
-{
-return dev_storage + 903;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdaq15", 11) == 0)
- {
-{
-return dev_storage + 888;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdap15", 11) == 0)
- {
-{
-return dev_storage + 873;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdao15", 11) == 0)
- {
-{
-return dev_storage + 858;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdan15", 11) == 0)
- {
-{
-return dev_storage + 843;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdam15", 11) == 0)
- {
-{
-return dev_storage + 828;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdal15", 11) == 0)
- {
-{
-return dev_storage + 813;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdak15", 11) == 0)
- {
-{
-return dev_storage + 798;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdaj15", 11) == 0)
- {
-{
-return dev_storage + 783;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdai15", 11) == 0)
- {
-{
-return dev_storage + 768;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdah15", 11) == 0)
- {
-{
-return dev_storage + 753;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdag15", 11) == 0)
- {
-{
-return dev_storage + 738;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdaf15", 11) == 0)
- {
-{
-return dev_storage + 723;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdae15", 11) == 0)
- {
-{
-return dev_storage + 708;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdad15", 11) == 0)
- {
-{
-return dev_storage + 693;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdac15", 11) == 0)
- {
-{
-return dev_storage + 678;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdab15", 11) == 0)
- {
-{
-return dev_storage + 663;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaa15", 11) == 0)
- {
-{
-return dev_storage + 648;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '4':
- switch (KR_keyword [7])
- {
- case 'y':
- switch (KR_keyword [9])
- {
- case '5':
- if (strncmp (KR_keyword, "/dev/ttyS54", 11) == 0)
- {
-{
-return dev_storage + 2503;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/ttyS44", 11) == 0)
- {
-{
-return dev_storage + 2493;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/ttyS34", 11) == 0)
- {
-{
-return dev_storage + 2483;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/ttyS24", 11) == 0)
- {
-{
-return dev_storage + 2473;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/ttyS14", 11) == 0)
- {
-{
-return dev_storage + 2463;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 't':
- switch (KR_keyword [9])
- {
- case '2':
- if (strncmp (KR_keyword, "/dev/nst124", 11) == 0)
- {
-{
-return dev_storage + 167;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/nst114", 11) == 0)
- {
-{
-return dev_storage + 157;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/nst104", 11) == 0)
- {
-{
-return dev_storage + 147;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'd':
- switch (KR_keyword [8])
- {
- case 'x':
- if (strncmp (KR_keyword, "/dev/sddx14", 11) == 0)
- {
-{
-return dev_storage + 2238;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sddw14", 11) == 0)
- {
-{
-return dev_storage + 2223;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sddv14", 11) == 0)
- {
-{
-return dev_storage + 2208;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sddu14", 11) == 0)
- {
-{
-return dev_storage + 2193;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sddt14", 11) == 0)
- {
-{
-return dev_storage + 2178;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdds14", 11) == 0)
- {
-{
-return dev_storage + 2163;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sddr14", 11) == 0)
- {
-{
-return dev_storage + 2148;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sddq14", 11) == 0)
- {
-{
-return dev_storage + 2133;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sddp14", 11) == 0)
- {
-{
-return dev_storage + 2118;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sddo14", 11) == 0)
- {
-{
-return dev_storage + 2103;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sddn14", 11) == 0)
- {
-{
-return dev_storage + 2088;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sddm14", 11) == 0)
- {
-{
-return dev_storage + 2073;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sddl14", 11) == 0)
- {
-{
-return dev_storage + 2058;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sddk14", 11) == 0)
- {
-{
-return dev_storage + 2043;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sddj14", 11) == 0)
- {
-{
-return dev_storage + 2028;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sddi14", 11) == 0)
- {
-{
-return dev_storage + 2013;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sddh14", 11) == 0)
- {
-{
-return dev_storage + 1998;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sddg14", 11) == 0)
- {
-{
-return dev_storage + 1983;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sddf14", 11) == 0)
- {
-{
-return dev_storage + 1968;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdde14", 11) == 0)
- {
-{
-return dev_storage + 1953;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddd14", 11) == 0)
- {
-{
-return dev_storage + 1938;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sddc14", 11) == 0)
- {
-{
-return dev_storage + 1923;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sddb14", 11) == 0)
- {
-{
-return dev_storage + 1908;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdda14", 11) == 0)
- {
-{
-return dev_storage + 1893;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'c':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdcz14", 11) == 0)
- {
-{
-return dev_storage + 1854;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sdcy14", 11) == 0)
- {
-{
-return dev_storage + 1839;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdcx14", 11) == 0)
- {
-{
-return dev_storage + 1824;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdcw14", 11) == 0)
- {
-{
-return dev_storage + 1809;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdcv14", 11) == 0)
- {
-{
-return dev_storage + 1794;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdcu14", 11) == 0)
- {
-{
-return dev_storage + 1779;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdct14", 11) == 0)
- {
-{
-return dev_storage + 1764;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdcs14", 11) == 0)
- {
-{
-return dev_storage + 1749;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdcr14", 11) == 0)
- {
-{
-return dev_storage + 1734;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdcq14", 11) == 0)
- {
-{
-return dev_storage + 1719;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdcp14", 11) == 0)
- {
-{
-return dev_storage + 1704;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdco14", 11) == 0)
- {
-{
-return dev_storage + 1689;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdcn14", 11) == 0)
- {
-{
-return dev_storage + 1674;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdcm14", 11) == 0)
- {
-{
-return dev_storage + 1659;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdcl14", 11) == 0)
- {
-{
-return dev_storage + 1644;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdck14", 11) == 0)
- {
-{
-return dev_storage + 1629;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdcj14", 11) == 0)
- {
-{
-return dev_storage + 1614;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdci14", 11) == 0)
- {
-{
-return dev_storage + 1599;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdch14", 11) == 0)
- {
-{
-return dev_storage + 1584;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdcg14", 11) == 0)
- {
-{
-return dev_storage + 1569;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdcf14", 11) == 0)
- {
-{
-return dev_storage + 1554;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdce14", 11) == 0)
- {
-{
-return dev_storage + 1539;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdcd14", 11) == 0)
- {
-{
-return dev_storage + 1524;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcc14", 11) == 0)
- {
-{
-return dev_storage + 1509;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdcb14", 11) == 0)
- {
-{
-return dev_storage + 1494;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdca14", 11) == 0)
- {
-{
-return dev_storage + 1479;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'b':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdbz14", 11) == 0)
- {
-{
-return dev_storage + 1438;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sdby14", 11) == 0)
- {
-{
-return dev_storage + 1423;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdbx14", 11) == 0)
- {
-{
-return dev_storage + 1408;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdbw14", 11) == 0)
- {
-{
-return dev_storage + 1393;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdbv14", 11) == 0)
- {
-{
-return dev_storage + 1378;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdbu14", 11) == 0)
- {
-{
-return dev_storage + 1363;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdbt14", 11) == 0)
- {
-{
-return dev_storage + 1348;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdbs14", 11) == 0)
- {
-{
-return dev_storage + 1333;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdbr14", 11) == 0)
- {
-{
-return dev_storage + 1318;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdbq14", 11) == 0)
- {
-{
-return dev_storage + 1303;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdbp14", 11) == 0)
- {
-{
-return dev_storage + 1288;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdbo14", 11) == 0)
- {
-{
-return dev_storage + 1273;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdbn14", 11) == 0)
- {
-{
-return dev_storage + 1258;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdbm14", 11) == 0)
- {
-{
-return dev_storage + 1243;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdbl14", 11) == 0)
- {
-{
-return dev_storage + 1228;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdbk14", 11) == 0)
- {
-{
-return dev_storage + 1213;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdbj14", 11) == 0)
- {
-{
-return dev_storage + 1198;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdbi14", 11) == 0)
- {
-{
-return dev_storage + 1183;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdbh14", 11) == 0)
- {
-{
-return dev_storage + 1168;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdbg14", 11) == 0)
- {
-{
-return dev_storage + 1153;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdbf14", 11) == 0)
- {
-{
-return dev_storage + 1138;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdbe14", 11) == 0)
- {
-{
-return dev_storage + 1123;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdbd14", 11) == 0)
- {
-{
-return dev_storage + 1108;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdbc14", 11) == 0)
- {
-{
-return dev_storage + 1093;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbb14", 11) == 0)
- {
-{
-return dev_storage + 1078;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdba14", 11) == 0)
- {
-{
-return dev_storage + 1063;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'a':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdaz14", 11) == 0)
- {
-{
-return dev_storage + 1022;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sday14", 11) == 0)
- {
-{
-return dev_storage + 1007;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdax14", 11) == 0)
- {
-{
-return dev_storage + 992;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdaw14", 11) == 0)
- {
-{
-return dev_storage + 977;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdav14", 11) == 0)
- {
-{
-return dev_storage + 962;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdau14", 11) == 0)
- {
-{
-return dev_storage + 947;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdat14", 11) == 0)
- {
-{
-return dev_storage + 932;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdas14", 11) == 0)
- {
-{
-return dev_storage + 917;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdar14", 11) == 0)
- {
-{
-return dev_storage + 902;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdaq14", 11) == 0)
- {
-{
-return dev_storage + 887;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdap14", 11) == 0)
- {
-{
-return dev_storage + 872;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdao14", 11) == 0)
- {
-{
-return dev_storage + 857;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdan14", 11) == 0)
- {
-{
-return dev_storage + 842;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdam14", 11) == 0)
- {
-{
-return dev_storage + 827;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdal14", 11) == 0)
- {
-{
-return dev_storage + 812;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdak14", 11) == 0)
- {
-{
-return dev_storage + 797;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdaj14", 11) == 0)
- {
-{
-return dev_storage + 782;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdai14", 11) == 0)
- {
-{
-return dev_storage + 767;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdah14", 11) == 0)
- {
-{
-return dev_storage + 752;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdag14", 11) == 0)
- {
-{
-return dev_storage + 737;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdaf14", 11) == 0)
- {
-{
-return dev_storage + 722;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdae14", 11) == 0)
- {
-{
-return dev_storage + 707;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdad14", 11) == 0)
- {
-{
-return dev_storage + 692;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdac14", 11) == 0)
- {
-{
-return dev_storage + 677;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdab14", 11) == 0)
- {
-{
-return dev_storage + 662;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaa14", 11) == 0)
- {
-{
-return dev_storage + 647;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '3':
- switch (KR_keyword [7])
- {
- case 'y':
- switch (KR_keyword [9])
- {
- case '6':
- if (strncmp (KR_keyword, "/dev/ttyS63", 11) == 0)
- {
-{
-return dev_storage + 2512;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/ttyS53", 11) == 0)
- {
-{
-return dev_storage + 2502;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/ttyS43", 11) == 0)
- {
-{
-return dev_storage + 2492;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/ttyS33", 11) == 0)
- {
-{
-return dev_storage + 2482;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/ttyS23", 11) == 0)
- {
-{
-return dev_storage + 2472;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/ttyS13", 11) == 0)
- {
-{
-return dev_storage + 2462;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 't':
- switch (KR_keyword [9])
- {
- case '2':
- if (strncmp (KR_keyword, "/dev/nst123", 11) == 0)
- {
-{
-return dev_storage + 166;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/nst113", 11) == 0)
- {
-{
-return dev_storage + 156;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/nst103", 11) == 0)
- {
-{
-return dev_storage + 146;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'd':
- switch (KR_keyword [8])
- {
- case 'x':
- if (strncmp (KR_keyword, "/dev/sddx13", 11) == 0)
- {
-{
-return dev_storage + 2237;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sddw13", 11) == 0)
- {
-{
-return dev_storage + 2222;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sddv13", 11) == 0)
- {
-{
-return dev_storage + 2207;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sddu13", 11) == 0)
- {
-{
-return dev_storage + 2192;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sddt13", 11) == 0)
- {
-{
-return dev_storage + 2177;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdds13", 11) == 0)
- {
-{
-return dev_storage + 2162;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sddr13", 11) == 0)
- {
-{
-return dev_storage + 2147;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sddq13", 11) == 0)
- {
-{
-return dev_storage + 2132;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sddp13", 11) == 0)
- {
-{
-return dev_storage + 2117;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sddo13", 11) == 0)
- {
-{
-return dev_storage + 2102;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sddn13", 11) == 0)
- {
-{
-return dev_storage + 2087;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sddm13", 11) == 0)
- {
-{
-return dev_storage + 2072;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sddl13", 11) == 0)
- {
-{
-return dev_storage + 2057;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sddk13", 11) == 0)
- {
-{
-return dev_storage + 2042;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sddj13", 11) == 0)
- {
-{
-return dev_storage + 2027;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sddi13", 11) == 0)
- {
-{
-return dev_storage + 2012;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sddh13", 11) == 0)
- {
-{
-return dev_storage + 1997;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sddg13", 11) == 0)
- {
-{
-return dev_storage + 1982;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sddf13", 11) == 0)
- {
-{
-return dev_storage + 1967;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdde13", 11) == 0)
- {
-{
-return dev_storage + 1952;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddd13", 11) == 0)
- {
-{
-return dev_storage + 1937;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sddc13", 11) == 0)
- {
-{
-return dev_storage + 1922;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sddb13", 11) == 0)
- {
-{
-return dev_storage + 1907;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdda13", 11) == 0)
- {
-{
-return dev_storage + 1892;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'c':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdcz13", 11) == 0)
- {
-{
-return dev_storage + 1853;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sdcy13", 11) == 0)
- {
-{
-return dev_storage + 1838;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdcx13", 11) == 0)
- {
-{
-return dev_storage + 1823;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdcw13", 11) == 0)
- {
-{
-return dev_storage + 1808;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdcv13", 11) == 0)
- {
-{
-return dev_storage + 1793;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdcu13", 11) == 0)
- {
-{
-return dev_storage + 1778;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdct13", 11) == 0)
- {
-{
-return dev_storage + 1763;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdcs13", 11) == 0)
- {
-{
-return dev_storage + 1748;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdcr13", 11) == 0)
- {
-{
-return dev_storage + 1733;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdcq13", 11) == 0)
- {
-{
-return dev_storage + 1718;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdcp13", 11) == 0)
- {
-{
-return dev_storage + 1703;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdco13", 11) == 0)
- {
-{
-return dev_storage + 1688;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdcn13", 11) == 0)
- {
-{
-return dev_storage + 1673;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdcm13", 11) == 0)
- {
-{
-return dev_storage + 1658;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdcl13", 11) == 0)
- {
-{
-return dev_storage + 1643;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdck13", 11) == 0)
- {
-{
-return dev_storage + 1628;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdcj13", 11) == 0)
- {
-{
-return dev_storage + 1613;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdci13", 11) == 0)
- {
-{
-return dev_storage + 1598;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdch13", 11) == 0)
- {
-{
-return dev_storage + 1583;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdcg13", 11) == 0)
- {
-{
-return dev_storage + 1568;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdcf13", 11) == 0)
- {
-{
-return dev_storage + 1553;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdce13", 11) == 0)
- {
-{
-return dev_storage + 1538;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdcd13", 11) == 0)
- {
-{
-return dev_storage + 1523;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcc13", 11) == 0)
- {
-{
-return dev_storage + 1508;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdcb13", 11) == 0)
- {
-{
-return dev_storage + 1493;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdca13", 11) == 0)
- {
-{
-return dev_storage + 1478;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'b':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdbz13", 11) == 0)
- {
-{
-return dev_storage + 1437;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sdby13", 11) == 0)
- {
-{
-return dev_storage + 1422;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdbx13", 11) == 0)
- {
-{
-return dev_storage + 1407;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdbw13", 11) == 0)
- {
-{
-return dev_storage + 1392;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdbv13", 11) == 0)
- {
-{
-return dev_storage + 1377;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdbu13", 11) == 0)
- {
-{
-return dev_storage + 1362;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdbt13", 11) == 0)
- {
-{
-return dev_storage + 1347;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdbs13", 11) == 0)
- {
-{
-return dev_storage + 1332;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdbr13", 11) == 0)
- {
-{
-return dev_storage + 1317;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdbq13", 11) == 0)
- {
-{
-return dev_storage + 1302;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdbp13", 11) == 0)
- {
-{
-return dev_storage + 1287;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdbo13", 11) == 0)
- {
-{
-return dev_storage + 1272;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdbn13", 11) == 0)
- {
-{
-return dev_storage + 1257;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdbm13", 11) == 0)
- {
-{
-return dev_storage + 1242;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdbl13", 11) == 0)
- {
-{
-return dev_storage + 1227;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdbk13", 11) == 0)
- {
-{
-return dev_storage + 1212;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdbj13", 11) == 0)
- {
-{
-return dev_storage + 1197;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdbi13", 11) == 0)
- {
-{
-return dev_storage + 1182;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdbh13", 11) == 0)
- {
-{
-return dev_storage + 1167;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdbg13", 11) == 0)
- {
-{
-return dev_storage + 1152;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdbf13", 11) == 0)
- {
-{
-return dev_storage + 1137;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdbe13", 11) == 0)
- {
-{
-return dev_storage + 1122;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdbd13", 11) == 0)
- {
-{
-return dev_storage + 1107;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdbc13", 11) == 0)
- {
-{
-return dev_storage + 1092;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbb13", 11) == 0)
- {
-{
-return dev_storage + 1077;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdba13", 11) == 0)
- {
-{
-return dev_storage + 1062;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'a':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdaz13", 11) == 0)
- {
-{
-return dev_storage + 1021;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sday13", 11) == 0)
- {
-{
-return dev_storage + 1006;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdax13", 11) == 0)
- {
-{
-return dev_storage + 991;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdaw13", 11) == 0)
- {
-{
-return dev_storage + 976;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdav13", 11) == 0)
- {
-{
-return dev_storage + 961;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdau13", 11) == 0)
- {
-{
-return dev_storage + 946;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdat13", 11) == 0)
- {
-{
-return dev_storage + 931;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdas13", 11) == 0)
- {
-{
-return dev_storage + 916;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdar13", 11) == 0)
- {
-{
-return dev_storage + 901;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdaq13", 11) == 0)
- {
-{
-return dev_storage + 886;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdap13", 11) == 0)
- {
-{
-return dev_storage + 871;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdao13", 11) == 0)
- {
-{
-return dev_storage + 856;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdan13", 11) == 0)
- {
-{
-return dev_storage + 841;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdam13", 11) == 0)
- {
-{
-return dev_storage + 826;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdal13", 11) == 0)
- {
-{
-return dev_storage + 811;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdak13", 11) == 0)
- {
-{
-return dev_storage + 796;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdaj13", 11) == 0)
- {
-{
-return dev_storage + 781;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdai13", 11) == 0)
- {
-{
-return dev_storage + 766;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdah13", 11) == 0)
- {
-{
-return dev_storage + 751;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdag13", 11) == 0)
- {
-{
-return dev_storage + 736;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdaf13", 11) == 0)
- {
-{
-return dev_storage + 721;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdae13", 11) == 0)
- {
-{
-return dev_storage + 706;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdad13", 11) == 0)
- {
-{
-return dev_storage + 691;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdac13", 11) == 0)
- {
-{
-return dev_storage + 676;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdab13", 11) == 0)
- {
-{
-return dev_storage + 661;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaa13", 11) == 0)
- {
-{
-return dev_storage + 646;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '2':
- switch (KR_keyword [7])
- {
- case 'y':
- switch (KR_keyword [9])
- {
- case '6':
- if (strncmp (KR_keyword, "/dev/ttyS62", 11) == 0)
- {
-{
-return dev_storage + 2511;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/ttyS52", 11) == 0)
- {
-{
-return dev_storage + 2501;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/ttyS42", 11) == 0)
- {
-{
-return dev_storage + 2491;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/ttyS32", 11) == 0)
- {
-{
-return dev_storage + 2481;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/ttyS22", 11) == 0)
- {
-{
-return dev_storage + 2471;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/ttyS12", 11) == 0)
- {
-{
-return dev_storage + 2461;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 't':
- switch (KR_keyword [9])
- {
- case '2':
- if (strncmp (KR_keyword, "/dev/nst122", 11) == 0)
- {
-{
-return dev_storage + 165;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/nst112", 11) == 0)
- {
-{
-return dev_storage + 155;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/nst102", 11) == 0)
- {
-{
-return dev_storage + 145;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'd':
- switch (KR_keyword [8])
- {
- case 'x':
- if (strncmp (KR_keyword, "/dev/sddx12", 11) == 0)
- {
-{
-return dev_storage + 2236;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sddw12", 11) == 0)
- {
-{
-return dev_storage + 2221;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sddv12", 11) == 0)
- {
-{
-return dev_storage + 2206;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sddu12", 11) == 0)
- {
-{
-return dev_storage + 2191;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sddt12", 11) == 0)
- {
-{
-return dev_storage + 2176;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdds12", 11) == 0)
- {
-{
-return dev_storage + 2161;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sddr12", 11) == 0)
- {
-{
-return dev_storage + 2146;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sddq12", 11) == 0)
- {
-{
-return dev_storage + 2131;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sddp12", 11) == 0)
- {
-{
-return dev_storage + 2116;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sddo12", 11) == 0)
- {
-{
-return dev_storage + 2101;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sddn12", 11) == 0)
- {
-{
-return dev_storage + 2086;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sddm12", 11) == 0)
- {
-{
-return dev_storage + 2071;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sddl12", 11) == 0)
- {
-{
-return dev_storage + 2056;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sddk12", 11) == 0)
- {
-{
-return dev_storage + 2041;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sddj12", 11) == 0)
- {
-{
-return dev_storage + 2026;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sddi12", 11) == 0)
- {
-{
-return dev_storage + 2011;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sddh12", 11) == 0)
- {
-{
-return dev_storage + 1996;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sddg12", 11) == 0)
- {
-{
-return dev_storage + 1981;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sddf12", 11) == 0)
- {
-{
-return dev_storage + 1966;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdde12", 11) == 0)
- {
-{
-return dev_storage + 1951;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddd12", 11) == 0)
- {
-{
-return dev_storage + 1936;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sddc12", 11) == 0)
- {
-{
-return dev_storage + 1921;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sddb12", 11) == 0)
- {
-{
-return dev_storage + 1906;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdda12", 11) == 0)
- {
-{
-return dev_storage + 1891;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'c':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdcz12", 11) == 0)
- {
-{
-return dev_storage + 1852;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sdcy12", 11) == 0)
- {
-{
-return dev_storage + 1837;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdcx12", 11) == 0)
- {
-{
-return dev_storage + 1822;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdcw12", 11) == 0)
- {
-{
-return dev_storage + 1807;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdcv12", 11) == 0)
- {
-{
-return dev_storage + 1792;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdcu12", 11) == 0)
- {
-{
-return dev_storage + 1777;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdct12", 11) == 0)
- {
-{
-return dev_storage + 1762;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdcs12", 11) == 0)
- {
-{
-return dev_storage + 1747;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdcr12", 11) == 0)
- {
-{
-return dev_storage + 1732;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdcq12", 11) == 0)
- {
-{
-return dev_storage + 1717;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdcp12", 11) == 0)
- {
-{
-return dev_storage + 1702;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdco12", 11) == 0)
- {
-{
-return dev_storage + 1687;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdcn12", 11) == 0)
- {
-{
-return dev_storage + 1672;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdcm12", 11) == 0)
- {
-{
-return dev_storage + 1657;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdcl12", 11) == 0)
- {
-{
-return dev_storage + 1642;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdck12", 11) == 0)
- {
-{
-return dev_storage + 1627;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdcj12", 11) == 0)
- {
-{
-return dev_storage + 1612;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdci12", 11) == 0)
- {
-{
-return dev_storage + 1597;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdch12", 11) == 0)
- {
-{
-return dev_storage + 1582;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdcg12", 11) == 0)
- {
-{
-return dev_storage + 1567;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdcf12", 11) == 0)
- {
-{
-return dev_storage + 1552;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdce12", 11) == 0)
- {
-{
-return dev_storage + 1537;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdcd12", 11) == 0)
- {
-{
-return dev_storage + 1522;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcc12", 11) == 0)
- {
-{
-return dev_storage + 1507;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdcb12", 11) == 0)
- {
-{
-return dev_storage + 1492;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdca12", 11) == 0)
- {
-{
-return dev_storage + 1477;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'b':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdbz12", 11) == 0)
- {
-{
-return dev_storage + 1436;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sdby12", 11) == 0)
- {
-{
-return dev_storage + 1421;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdbx12", 11) == 0)
- {
-{
-return dev_storage + 1406;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdbw12", 11) == 0)
- {
-{
-return dev_storage + 1391;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdbv12", 11) == 0)
- {
-{
-return dev_storage + 1376;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdbu12", 11) == 0)
- {
-{
-return dev_storage + 1361;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdbt12", 11) == 0)
- {
-{
-return dev_storage + 1346;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdbs12", 11) == 0)
- {
-{
-return dev_storage + 1331;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdbr12", 11) == 0)
- {
-{
-return dev_storage + 1316;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdbq12", 11) == 0)
- {
-{
-return dev_storage + 1301;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdbp12", 11) == 0)
- {
-{
-return dev_storage + 1286;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdbo12", 11) == 0)
- {
-{
-return dev_storage + 1271;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdbn12", 11) == 0)
- {
-{
-return dev_storage + 1256;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdbm12", 11) == 0)
- {
-{
-return dev_storage + 1241;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdbl12", 11) == 0)
- {
-{
-return dev_storage + 1226;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdbk12", 11) == 0)
- {
-{
-return dev_storage + 1211;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdbj12", 11) == 0)
- {
-{
-return dev_storage + 1196;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdbi12", 11) == 0)
- {
-{
-return dev_storage + 1181;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdbh12", 11) == 0)
- {
-{
-return dev_storage + 1166;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdbg12", 11) == 0)
- {
-{
-return dev_storage + 1151;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdbf12", 11) == 0)
- {
-{
-return dev_storage + 1136;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdbe12", 11) == 0)
- {
-{
-return dev_storage + 1121;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdbd12", 11) == 0)
- {
-{
-return dev_storage + 1106;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdbc12", 11) == 0)
- {
-{
-return dev_storage + 1091;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbb12", 11) == 0)
- {
-{
-return dev_storage + 1076;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdba12", 11) == 0)
- {
-{
-return dev_storage + 1061;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'a':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdaz12", 11) == 0)
- {
-{
-return dev_storage + 1020;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sday12", 11) == 0)
- {
-{
-return dev_storage + 1005;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdax12", 11) == 0)
- {
-{
-return dev_storage + 990;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdaw12", 11) == 0)
- {
-{
-return dev_storage + 975;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdav12", 11) == 0)
- {
-{
-return dev_storage + 960;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdau12", 11) == 0)
- {
-{
-return dev_storage + 945;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdat12", 11) == 0)
- {
-{
-return dev_storage + 930;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdas12", 11) == 0)
- {
-{
-return dev_storage + 915;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdar12", 11) == 0)
- {
-{
-return dev_storage + 900;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdaq12", 11) == 0)
- {
-{
-return dev_storage + 885;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdap12", 11) == 0)
- {
-{
-return dev_storage + 870;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdao12", 11) == 0)
- {
-{
-return dev_storage + 855;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdan12", 11) == 0)
- {
-{
-return dev_storage + 840;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdam12", 11) == 0)
- {
-{
-return dev_storage + 825;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdal12", 11) == 0)
- {
-{
-return dev_storage + 810;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdak12", 11) == 0)
- {
-{
-return dev_storage + 795;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdaj12", 11) == 0)
- {
-{
-return dev_storage + 780;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdai12", 11) == 0)
- {
-{
-return dev_storage + 765;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdah12", 11) == 0)
- {
-{
-return dev_storage + 750;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdag12", 11) == 0)
- {
-{
-return dev_storage + 735;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdaf12", 11) == 0)
- {
-{
-return dev_storage + 720;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdae12", 11) == 0)
- {
-{
-return dev_storage + 705;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdad12", 11) == 0)
- {
-{
-return dev_storage + 690;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdac12", 11) == 0)
- {
-{
-return dev_storage + 675;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdab12", 11) == 0)
- {
-{
-return dev_storage + 660;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaa12", 11) == 0)
- {
-{
-return dev_storage + 645;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '1':
- switch (KR_keyword [7])
- {
- case 'y':
- switch (KR_keyword [9])
- {
- case '6':
- if (strncmp (KR_keyword, "/dev/ttyS61", 11) == 0)
- {
-{
-return dev_storage + 2510;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/ttyS51", 11) == 0)
- {
-{
-return dev_storage + 2500;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/ttyS41", 11) == 0)
- {
-{
-return dev_storage + 2490;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/ttyS31", 11) == 0)
- {
-{
-return dev_storage + 2480;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/ttyS21", 11) == 0)
- {
-{
-return dev_storage + 2470;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/ttyS11", 11) == 0)
- {
-{
-return dev_storage + 2460;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 't':
- switch (KR_keyword [9])
- {
- case '2':
- if (strncmp (KR_keyword, "/dev/nst121", 11) == 0)
- {
-{
-return dev_storage + 164;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/nst111", 11) == 0)
- {
-{
-return dev_storage + 154;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/nst101", 11) == 0)
- {
-{
-return dev_storage + 144;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'd':
- switch (KR_keyword [8])
- {
- case 'x':
- if (strncmp (KR_keyword, "/dev/sddx11", 11) == 0)
- {
-{
-return dev_storage + 2235;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sddw11", 11) == 0)
- {
-{
-return dev_storage + 2220;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sddv11", 11) == 0)
- {
-{
-return dev_storage + 2205;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sddu11", 11) == 0)
- {
-{
-return dev_storage + 2190;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sddt11", 11) == 0)
- {
-{
-return dev_storage + 2175;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdds11", 11) == 0)
- {
-{
-return dev_storage + 2160;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sddr11", 11) == 0)
- {
-{
-return dev_storage + 2145;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sddq11", 11) == 0)
- {
-{
-return dev_storage + 2130;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sddp11", 11) == 0)
- {
-{
-return dev_storage + 2115;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sddo11", 11) == 0)
- {
-{
-return dev_storage + 2100;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sddn11", 11) == 0)
- {
-{
-return dev_storage + 2085;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sddm11", 11) == 0)
- {
-{
-return dev_storage + 2070;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sddl11", 11) == 0)
- {
-{
-return dev_storage + 2055;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sddk11", 11) == 0)
- {
-{
-return dev_storage + 2040;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sddj11", 11) == 0)
- {
-{
-return dev_storage + 2025;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sddi11", 11) == 0)
- {
-{
-return dev_storage + 2010;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sddh11", 11) == 0)
- {
-{
-return dev_storage + 1995;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sddg11", 11) == 0)
- {
-{
-return dev_storage + 1980;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sddf11", 11) == 0)
- {
-{
-return dev_storage + 1965;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdde11", 11) == 0)
- {
-{
-return dev_storage + 1950;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddd11", 11) == 0)
- {
-{
-return dev_storage + 1935;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sddc11", 11) == 0)
- {
-{
-return dev_storage + 1920;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sddb11", 11) == 0)
- {
-{
-return dev_storage + 1905;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdda11", 11) == 0)
- {
-{
-return dev_storage + 1890;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'c':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdcz11", 11) == 0)
- {
-{
-return dev_storage + 1851;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sdcy11", 11) == 0)
- {
-{
-return dev_storage + 1836;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdcx11", 11) == 0)
- {
-{
-return dev_storage + 1821;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdcw11", 11) == 0)
- {
-{
-return dev_storage + 1806;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdcv11", 11) == 0)
- {
-{
-return dev_storage + 1791;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdcu11", 11) == 0)
- {
-{
-return dev_storage + 1776;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdct11", 11) == 0)
- {
-{
-return dev_storage + 1761;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdcs11", 11) == 0)
- {
-{
-return dev_storage + 1746;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdcr11", 11) == 0)
- {
-{
-return dev_storage + 1731;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdcq11", 11) == 0)
- {
-{
-return dev_storage + 1716;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdcp11", 11) == 0)
- {
-{
-return dev_storage + 1701;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdco11", 11) == 0)
- {
-{
-return dev_storage + 1686;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdcn11", 11) == 0)
- {
-{
-return dev_storage + 1671;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdcm11", 11) == 0)
- {
-{
-return dev_storage + 1656;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdcl11", 11) == 0)
- {
-{
-return dev_storage + 1641;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdck11", 11) == 0)
- {
-{
-return dev_storage + 1626;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdcj11", 11) == 0)
- {
-{
-return dev_storage + 1611;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdci11", 11) == 0)
- {
-{
-return dev_storage + 1596;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdch11", 11) == 0)
- {
-{
-return dev_storage + 1581;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdcg11", 11) == 0)
- {
-{
-return dev_storage + 1566;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdcf11", 11) == 0)
- {
-{
-return dev_storage + 1551;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdce11", 11) == 0)
- {
-{
-return dev_storage + 1536;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdcd11", 11) == 0)
- {
-{
-return dev_storage + 1521;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcc11", 11) == 0)
- {
-{
-return dev_storage + 1506;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdcb11", 11) == 0)
- {
-{
-return dev_storage + 1491;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdca11", 11) == 0)
- {
-{
-return dev_storage + 1476;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'b':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdbz11", 11) == 0)
- {
-{
-return dev_storage + 1435;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sdby11", 11) == 0)
- {
-{
-return dev_storage + 1420;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdbx11", 11) == 0)
- {
-{
-return dev_storage + 1405;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdbw11", 11) == 0)
- {
-{
-return dev_storage + 1390;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdbv11", 11) == 0)
- {
-{
-return dev_storage + 1375;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdbu11", 11) == 0)
- {
-{
-return dev_storage + 1360;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdbt11", 11) == 0)
- {
-{
-return dev_storage + 1345;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdbs11", 11) == 0)
- {
-{
-return dev_storage + 1330;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdbr11", 11) == 0)
- {
-{
-return dev_storage + 1315;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdbq11", 11) == 0)
- {
-{
-return dev_storage + 1300;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdbp11", 11) == 0)
- {
-{
-return dev_storage + 1285;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdbo11", 11) == 0)
- {
-{
-return dev_storage + 1270;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdbn11", 11) == 0)
- {
-{
-return dev_storage + 1255;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdbm11", 11) == 0)
- {
-{
-return dev_storage + 1240;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdbl11", 11) == 0)
- {
-{
-return dev_storage + 1225;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdbk11", 11) == 0)
- {
-{
-return dev_storage + 1210;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdbj11", 11) == 0)
- {
-{
-return dev_storage + 1195;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdbi11", 11) == 0)
- {
-{
-return dev_storage + 1180;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdbh11", 11) == 0)
- {
-{
-return dev_storage + 1165;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdbg11", 11) == 0)
- {
-{
-return dev_storage + 1150;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdbf11", 11) == 0)
- {
-{
-return dev_storage + 1135;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdbe11", 11) == 0)
- {
-{
-return dev_storage + 1120;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdbd11", 11) == 0)
- {
-{
-return dev_storage + 1105;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdbc11", 11) == 0)
- {
-{
-return dev_storage + 1090;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbb11", 11) == 0)
- {
-{
-return dev_storage + 1075;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdba11", 11) == 0)
- {
-{
-return dev_storage + 1060;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'a':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdaz11", 11) == 0)
- {
-{
-return dev_storage + 1019;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sday11", 11) == 0)
- {
-{
-return dev_storage + 1004;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdax11", 11) == 0)
- {
-{
-return dev_storage + 989;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdaw11", 11) == 0)
- {
-{
-return dev_storage + 974;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdav11", 11) == 0)
- {
-{
-return dev_storage + 959;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdau11", 11) == 0)
- {
-{
-return dev_storage + 944;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdat11", 11) == 0)
- {
-{
-return dev_storage + 929;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdas11", 11) == 0)
- {
-{
-return dev_storage + 914;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdar11", 11) == 0)
- {
-{
-return dev_storage + 899;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdaq11", 11) == 0)
- {
-{
-return dev_storage + 884;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdap11", 11) == 0)
- {
-{
-return dev_storage + 869;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdao11", 11) == 0)
- {
-{
-return dev_storage + 854;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdan11", 11) == 0)
- {
-{
-return dev_storage + 839;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdam11", 11) == 0)
- {
-{
-return dev_storage + 824;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdal11", 11) == 0)
- {
-{
-return dev_storage + 809;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdak11", 11) == 0)
- {
-{
-return dev_storage + 794;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdaj11", 11) == 0)
- {
-{
-return dev_storage + 779;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdai11", 11) == 0)
- {
-{
-return dev_storage + 764;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdah11", 11) == 0)
- {
-{
-return dev_storage + 749;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdag11", 11) == 0)
- {
-{
-return dev_storage + 734;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdaf11", 11) == 0)
- {
-{
-return dev_storage + 719;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdae11", 11) == 0)
- {
-{
-return dev_storage + 704;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdad11", 11) == 0)
- {
-{
-return dev_storage + 689;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdac11", 11) == 0)
- {
-{
-return dev_storage + 674;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdab11", 11) == 0)
- {
-{
-return dev_storage + 659;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaa11", 11) == 0)
- {
-{
-return dev_storage + 644;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case '0':
- switch (KR_keyword [7])
- {
- case 'y':
- switch (KR_keyword [9])
- {
- case '6':
- if (strncmp (KR_keyword, "/dev/ttyS60", 11) == 0)
- {
-{
-return dev_storage + 2509;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '5':
- if (strncmp (KR_keyword, "/dev/ttyS50", 11) == 0)
- {
-{
-return dev_storage + 2499;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '4':
- if (strncmp (KR_keyword, "/dev/ttyS40", 11) == 0)
- {
-{
-return dev_storage + 2489;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '3':
- if (strncmp (KR_keyword, "/dev/ttyS30", 11) == 0)
- {
-{
-return dev_storage + 2479;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '2':
- if (strncmp (KR_keyword, "/dev/ttyS20", 11) == 0)
- {
-{
-return dev_storage + 2469;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/ttyS10", 11) == 0)
- {
-{
-return dev_storage + 2459;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 't':
- switch (KR_keyword [9])
- {
- case '2':
- if (strncmp (KR_keyword, "/dev/nst120", 11) == 0)
- {
-{
-return dev_storage + 163;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '1':
- if (strncmp (KR_keyword, "/dev/nst110", 11) == 0)
- {
-{
-return dev_storage + 153;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case '0':
- if (strncmp (KR_keyword, "/dev/nst100", 11) == 0)
- {
-{
-return dev_storage + 143;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'd':
- switch (KR_keyword [8])
- {
- case 'x':
- if (strncmp (KR_keyword, "/dev/sddx10", 11) == 0)
- {
-{
-return dev_storage + 2234;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sddw10", 11) == 0)
- {
-{
-return dev_storage + 2219;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sddv10", 11) == 0)
- {
-{
-return dev_storage + 2204;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sddu10", 11) == 0)
- {
-{
-return dev_storage + 2189;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sddt10", 11) == 0)
- {
-{
-return dev_storage + 2174;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdds10", 11) == 0)
- {
-{
-return dev_storage + 2159;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sddr10", 11) == 0)
- {
-{
-return dev_storage + 2144;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sddq10", 11) == 0)
- {
-{
-return dev_storage + 2129;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sddp10", 11) == 0)
- {
-{
-return dev_storage + 2114;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sddo10", 11) == 0)
- {
-{
-return dev_storage + 2099;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sddn10", 11) == 0)
- {
-{
-return dev_storage + 2084;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sddm10", 11) == 0)
- {
-{
-return dev_storage + 2069;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sddl10", 11) == 0)
- {
-{
-return dev_storage + 2054;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sddk10", 11) == 0)
- {
-{
-return dev_storage + 2039;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sddj10", 11) == 0)
- {
-{
-return dev_storage + 2024;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sddi10", 11) == 0)
- {
-{
-return dev_storage + 2009;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sddh10", 11) == 0)
- {
-{
-return dev_storage + 1994;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sddg10", 11) == 0)
- {
-{
-return dev_storage + 1979;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sddf10", 11) == 0)
- {
-{
-return dev_storage + 1964;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdde10", 11) == 0)
- {
-{
-return dev_storage + 1949;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddd10", 11) == 0)
- {
-{
-return dev_storage + 1934;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sddc10", 11) == 0)
- {
-{
-return dev_storage + 1919;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sddb10", 11) == 0)
- {
-{
-return dev_storage + 1904;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdda10", 11) == 0)
- {
-{
-return dev_storage + 1889;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'c':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdcz10", 11) == 0)
- {
-{
-return dev_storage + 1850;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sdcy10", 11) == 0)
- {
-{
-return dev_storage + 1835;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdcx10", 11) == 0)
- {
-{
-return dev_storage + 1820;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdcw10", 11) == 0)
- {
-{
-return dev_storage + 1805;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdcv10", 11) == 0)
- {
-{
-return dev_storage + 1790;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdcu10", 11) == 0)
- {
-{
-return dev_storage + 1775;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdct10", 11) == 0)
- {
-{
-return dev_storage + 1760;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdcs10", 11) == 0)
- {
-{
-return dev_storage + 1745;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdcr10", 11) == 0)
- {
-{
-return dev_storage + 1730;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdcq10", 11) == 0)
- {
-{
-return dev_storage + 1715;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdcp10", 11) == 0)
- {
-{
-return dev_storage + 1700;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdco10", 11) == 0)
- {
-{
-return dev_storage + 1685;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdcn10", 11) == 0)
- {
-{
-return dev_storage + 1670;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdcm10", 11) == 0)
- {
-{
-return dev_storage + 1655;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdcl10", 11) == 0)
- {
-{
-return dev_storage + 1640;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdck10", 11) == 0)
- {
-{
-return dev_storage + 1625;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdcj10", 11) == 0)
- {
-{
-return dev_storage + 1610;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdci10", 11) == 0)
- {
-{
-return dev_storage + 1595;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdch10", 11) == 0)
- {
-{
-return dev_storage + 1580;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdcg10", 11) == 0)
- {
-{
-return dev_storage + 1565;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdcf10", 11) == 0)
- {
-{
-return dev_storage + 1550;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdce10", 11) == 0)
- {
-{
-return dev_storage + 1535;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdcd10", 11) == 0)
- {
-{
-return dev_storage + 1520;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcc10", 11) == 0)
- {
-{
-return dev_storage + 1505;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdcb10", 11) == 0)
- {
-{
-return dev_storage + 1490;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdca10", 11) == 0)
- {
-{
-return dev_storage + 1475;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'b':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdbz10", 11) == 0)
- {
-{
-return dev_storage + 1434;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sdby10", 11) == 0)
- {
-{
-return dev_storage + 1419;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdbx10", 11) == 0)
- {
-{
-return dev_storage + 1404;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdbw10", 11) == 0)
- {
-{
-return dev_storage + 1389;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdbv10", 11) == 0)
- {
-{
-return dev_storage + 1374;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdbu10", 11) == 0)
- {
-{
-return dev_storage + 1359;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdbt10", 11) == 0)
- {
-{
-return dev_storage + 1344;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdbs10", 11) == 0)
- {
-{
-return dev_storage + 1329;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdbr10", 11) == 0)
- {
-{
-return dev_storage + 1314;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdbq10", 11) == 0)
- {
-{
-return dev_storage + 1299;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdbp10", 11) == 0)
- {
-{
-return dev_storage + 1284;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdbo10", 11) == 0)
- {
-{
-return dev_storage + 1269;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdbn10", 11) == 0)
- {
-{
-return dev_storage + 1254;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdbm10", 11) == 0)
- {
-{
-return dev_storage + 1239;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdbl10", 11) == 0)
- {
-{
-return dev_storage + 1224;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdbk10", 11) == 0)
- {
-{
-return dev_storage + 1209;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdbj10", 11) == 0)
- {
-{
-return dev_storage + 1194;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdbi10", 11) == 0)
- {
-{
-return dev_storage + 1179;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdbh10", 11) == 0)
- {
-{
-return dev_storage + 1164;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdbg10", 11) == 0)
- {
-{
-return dev_storage + 1149;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdbf10", 11) == 0)
- {
-{
-return dev_storage + 1134;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdbe10", 11) == 0)
- {
-{
-return dev_storage + 1119;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdbd10", 11) == 0)
- {
-{
-return dev_storage + 1104;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdbc10", 11) == 0)
- {
-{
-return dev_storage + 1089;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbb10", 11) == 0)
- {
-{
-return dev_storage + 1074;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdba10", 11) == 0)
- {
-{
-return dev_storage + 1059;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 'a':
- switch (KR_keyword [8])
- {
- case 'z':
- if (strncmp (KR_keyword, "/dev/sdaz10", 11) == 0)
- {
-{
-return dev_storage + 1018;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'y':
- if (strncmp (KR_keyword, "/dev/sday10", 11) == 0)
- {
-{
-return dev_storage + 1003;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'x':
- if (strncmp (KR_keyword, "/dev/sdax10", 11) == 0)
- {
-{
-return dev_storage + 988;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'w':
- if (strncmp (KR_keyword, "/dev/sdaw10", 11) == 0)
- {
-{
-return dev_storage + 973;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'v':
- if (strncmp (KR_keyword, "/dev/sdav10", 11) == 0)
- {
-{
-return dev_storage + 958;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/sdau10", 11) == 0)
- {
-{
-return dev_storage + 943;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 't':
- if (strncmp (KR_keyword, "/dev/sdat10", 11) == 0)
- {
-{
-return dev_storage + 928;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 's':
- if (strncmp (KR_keyword, "/dev/sdas10", 11) == 0)
- {
-{
-return dev_storage + 913;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'r':
- if (strncmp (KR_keyword, "/dev/sdar10", 11) == 0)
- {
-{
-return dev_storage + 898;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'q':
- if (strncmp (KR_keyword, "/dev/sdaq10", 11) == 0)
- {
-{
-return dev_storage + 883;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/sdap10", 11) == 0)
- {
-{
-return dev_storage + 868;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'o':
- if (strncmp (KR_keyword, "/dev/sdao10", 11) == 0)
- {
-{
-return dev_storage + 853;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'n':
- if (strncmp (KR_keyword, "/dev/sdan10", 11) == 0)
- {
-{
-return dev_storage + 838;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'm':
- if (strncmp (KR_keyword, "/dev/sdam10", 11) == 0)
- {
-{
-return dev_storage + 823;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'l':
- if (strncmp (KR_keyword, "/dev/sdal10", 11) == 0)
- {
-{
-return dev_storage + 808;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'k':
- if (strncmp (KR_keyword, "/dev/sdak10", 11) == 0)
- {
-{
-return dev_storage + 793;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'j':
- if (strncmp (KR_keyword, "/dev/sdaj10", 11) == 0)
- {
-{
-return dev_storage + 778;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'i':
- if (strncmp (KR_keyword, "/dev/sdai10", 11) == 0)
- {
-{
-return dev_storage + 763;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'h':
- if (strncmp (KR_keyword, "/dev/sdah10", 11) == 0)
- {
-{
-return dev_storage + 748;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'g':
- if (strncmp (KR_keyword, "/dev/sdag10", 11) == 0)
- {
-{
-return dev_storage + 733;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'f':
- if (strncmp (KR_keyword, "/dev/sdaf10", 11) == 0)
- {
-{
-return dev_storage + 718;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'e':
- if (strncmp (KR_keyword, "/dev/sdae10", 11) == 0)
- {
-{
-return dev_storage + 703;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdad10", 11) == 0)
- {
-{
-return dev_storage + 688;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdac10", 11) == 0)
- {
-{
-return dev_storage + 673;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdab10", 11) == 0)
- {
-{
-return dev_storage + 658;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaa10", 11) == 0)
- {
-{
-return dev_storage + 643;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 12:
- switch (KR_keyword [5])
- {
- case 'w':
- if (strncmp (KR_keyword, "/dev/windows", 12) == 0)
- {
-{
-return dev_storage + 2515;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'u':
- if (strncmp (KR_keyword, "/dev/urandom", 12) == 0)
- {
-{
-return dev_storage + 2514;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/console", 12) == 0)
- {
-{
-return dev_storage + 20;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
- case 14:
- if (strncmp (KR_keyword, "/dev/clipboard", 14) == 0)
- {
-{
-return dev_storage + 1;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- default:
-{
-return NULL;
-
-}
- }
-}
-
-
-
-
-
-
-#undef BRACK
-void
-device::parse (const char *s)
-{
- size_t len = strlen (s);
- const device *dev = KR_find_keyword (s, len);
-
- if (!dev)
- *this = *fs_dev;
- else
- *this = *dev;
-}
-
-void
-device::init ()
-{
- /* nothing to do... yet */
-}
-
-void
-device::parse (_major_t major, _minor_t minor)
-{
- _dev_t dev = FHDEV (major, minor);
-
- devn = 0;
-
- for (unsigned i = 0; i < (sizeof (dev_storage) / sizeof (dev_storage[0])); i++)
- if (dev_storage[i].devn == dev)
- {
- *this = dev_storage[i];
- break;
- }
-
- if (!*this)
- devn = FHDEV (major, minor);
-}
-
-void
-device::parse (_dev_t dev)
-{
- parse (_major (dev), _minor (dev));
-}
-
-void
-device::tty_to_real_device ()
-{
- if (!real_tty_attached (myself))
- *this = myself->ctty < 0 ? dev_bad_storage : *console_dev;
- else
- parse (DEV_TTYS_MAJOR, myself->ctty);
-}
-
-void
-device::parsedisk (int drive, int part)
-{
- int base;
- if (drive < ('q' - 'a')) /* /dev/sda -to- /dev/sdp */
- base = DEV_SD_MAJOR;
- else if (drive < 32) /* /dev/sdq -to- /dev/sdaf */
- {
- base = DEV_SD1_MAJOR;
- drive -= 'q' - 'a';
- }
- else if (drive < 48) /* /dev/sdag -to- /dev/sdav */
- {
- base = DEV_SD2_MAJOR;
- drive -= 32;
- }
- else if (drive < 64) /* /dev/sdaw -to- /dev/sdbl */
- {
- base = DEV_SD3_MAJOR;
- drive -= 48;
- }
- else if (drive < 80) /* /dev/sdbm -to- /dev/sdcb */
- {
- base = DEV_SD4_MAJOR;
- drive -= 64;
- }
- else if (drive < 96) /* /dev/sdcc -to- /dev/sdcr */
- {
- base = DEV_SD5_MAJOR;
- drive -= 80;
- }
- else if (drive < 112) /* /dev/sdcs -to- /dev/sddh */
- {
- base = DEV_SD6_MAJOR;
- drive -= 96;
- }
- /* NOTE: This will cause multiple /dev/sddx entries in
- /proc/partitions if there are more than 128 devices */
- else /* /dev/sddi -to- /dev/sddx */
- {
- base = DEV_SD7_MAJOR;
- drive -= 112;
- }
- parse (base, part + (drive * 16));
-}
-
-
diff --git a/winsup/cygwin/devices.h b/winsup/cygwin/devices.h
deleted file mode 100644
index 9c8efa3..0000000
--- a/winsup/cygwin/devices.h
+++ /dev/null
@@ -1,297 +0,0 @@
-/* devices.h
-
- Copyright 2002, 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. */
-
-typedef unsigned short _major_t;
-typedef unsigned short _minor_t;
-typedef mode_t _mode_t;
-typedef __dev32_t _dev_t;
-
-#define FHDEV(maj, min) ((((unsigned) (maj)) << (sizeof (_major_t) * 8)) | (unsigned) (min))
-#define _minor(dev) ((dev) & ((1 << (sizeof (_minor_t) * 8)) - 1))
-#define _major(dev) ((dev) >> (sizeof (_major_t) * 8))
-
-enum fh_devices
-{
- FH_TTY = FHDEV (5, 0),
- FH_CONSOLE = FHDEV (5, 1),
- FH_PTYM = FHDEV (5, 2), /* /dev/ptmx */
- FH_CONIN = FHDEV (5, 255),
- FH_CONOUT = FHDEV (5, 254),
-
- DEV_TTYM_MAJOR = 128,
- FH_TTYM = FHDEV (DEV_TTYM_MAJOR, 0),
- FH_TTYM_MAX= FHDEV (DEV_TTYM_MAJOR, 255),
-
- DEV_TTYS_MAJOR = 136,
- FH_TTYS = FHDEV (DEV_TTYS_MAJOR, 0), /* FIXME: Should separate ttys and ptys */
- FH_TTYS_MAX= FHDEV (DEV_TTYS_MAJOR, 255), /* FIXME: Should separate ttys and ptys */
-
- DEV_SERIAL_MAJOR = 117,
- FH_SERIAL = FHDEV (117, 0), /* /dev/ttyS? */
-
- FH_WINDOWS = FHDEV (13, 255),
- FH_CLIPBOARD=FHDEV (13, 254),
-
- FH_PIPE = FHDEV (0, 255),
- FH_PIPER = FHDEV (0, 254),
- FH_PIPEW = FHDEV (0, 253),
- FH_FIFO = FHDEV (0, 252),
- FH_PROC = FHDEV (0, 250),
- FH_REGISTRY= FHDEV (0, 249),
- FH_PROCESS = FHDEV (0, 248),
-
- FH_FS = FHDEV (0, 247), /* filesystem based device */
-
- FH_NETDRIVE= FHDEV (0, 246),
- FH_DEV = FHDEV (0, 245),
- FH_PROCNET = FHDEV (0, 244),
-
- DEV_FLOPPY_MAJOR = 2,
- FH_FLOPPY = FHDEV (DEV_FLOPPY_MAJOR, 0),
-
- DEV_CDROM_MAJOR = 11,
- FH_CDROM = FHDEV (DEV_CDROM_MAJOR, 0),
-
- DEV_TAPE_MAJOR = 9,
- FH_TAPE = FHDEV (DEV_TAPE_MAJOR, 0),
- FH_NTAPE = FHDEV (DEV_TAPE_MAJOR, 128),
- FH_MAXNTAPE= FHDEV (DEV_TAPE_MAJOR, 255),
-
- DEV_SD_MAJOR = 8,
- DEV_SD1_MAJOR = 65,
- DEV_SD2_MAJOR = 66,
- DEV_SD3_MAJOR = 67,
- DEV_SD4_MAJOR = 68,
- DEV_SD5_MAJOR = 69,
- DEV_SD6_MAJOR = 70,
- DEV_SD7_MAJOR = 71,
- FH_SD = FHDEV (DEV_SD_MAJOR, 0),
- FH_SD1 = FHDEV (DEV_SD1_MAJOR, 0),
- FH_SD2 = FHDEV (DEV_SD2_MAJOR, 0),
- FH_SD3 = FHDEV (DEV_SD3_MAJOR, 0),
- FH_SD4 = FHDEV (DEV_SD4_MAJOR, 0),
- FH_SD5 = FHDEV (DEV_SD5_MAJOR, 0),
- FH_SD6 = FHDEV (DEV_SD6_MAJOR, 0),
- FH_SD7 = FHDEV (DEV_SD7_MAJOR, 0),
- FH_SDA = FHDEV (DEV_SD_MAJOR, 0),
- FH_SDB = FHDEV (DEV_SD_MAJOR, 16),
- FH_SDC = FHDEV (DEV_SD_MAJOR, 32),
- FH_SDD = FHDEV (DEV_SD_MAJOR, 48),
- FH_SDE = FHDEV (DEV_SD_MAJOR, 64),
- FH_SDF = FHDEV (DEV_SD_MAJOR, 80),
- FH_SDG = FHDEV (DEV_SD_MAJOR, 96),
- FH_SDH = FHDEV (DEV_SD_MAJOR, 112),
- FH_SDI = FHDEV (DEV_SD_MAJOR, 128),
- FH_SDJ = FHDEV (DEV_SD_MAJOR, 144),
- FH_SDK = FHDEV (DEV_SD_MAJOR, 160),
- FH_SDL = FHDEV (DEV_SD_MAJOR, 176),
- FH_SDM = FHDEV (DEV_SD_MAJOR, 192),
- FH_SDN = FHDEV (DEV_SD_MAJOR, 208),
- FH_SDO = FHDEV (DEV_SD_MAJOR, 224),
- FH_SDP = FHDEV (DEV_SD_MAJOR, 240),
- FH_SDQ = FHDEV (DEV_SD1_MAJOR, 0),
- FH_SDR = FHDEV (DEV_SD1_MAJOR, 16),
- FH_SDS = FHDEV (DEV_SD1_MAJOR, 32),
- FH_SDT = FHDEV (DEV_SD1_MAJOR, 48),
- FH_SDU = FHDEV (DEV_SD1_MAJOR, 64),
- FH_SDV = FHDEV (DEV_SD1_MAJOR, 80),
- FH_SDW = FHDEV (DEV_SD1_MAJOR, 96),
- FH_SDX = FHDEV (DEV_SD1_MAJOR, 112),
- FH_SDY = FHDEV (DEV_SD1_MAJOR, 128),
- FH_SDZ = FHDEV (DEV_SD1_MAJOR, 144),
- FH_SDAA = FHDEV (DEV_SD1_MAJOR, 160),
- FH_SDAB = FHDEV (DEV_SD1_MAJOR, 176),
- FH_SDAC = FHDEV (DEV_SD1_MAJOR, 192),
- FH_SDAD = FHDEV (DEV_SD1_MAJOR, 208),
- FH_SDAE = FHDEV (DEV_SD1_MAJOR, 224),
- FH_SDAF = FHDEV (DEV_SD1_MAJOR, 240),
- FH_SDAG = FHDEV (DEV_SD2_MAJOR, 0),
- FH_SDAH = FHDEV (DEV_SD2_MAJOR, 16),
- FH_SDAI = FHDEV (DEV_SD2_MAJOR, 32),
- FH_SDAJ = FHDEV (DEV_SD2_MAJOR, 48),
- FH_SDAK = FHDEV (DEV_SD2_MAJOR, 64),
- FH_SDAL = FHDEV (DEV_SD2_MAJOR, 80),
- FH_SDAM = FHDEV (DEV_SD2_MAJOR, 96),
- FH_SDAN = FHDEV (DEV_SD2_MAJOR, 112),
- FH_SDAO = FHDEV (DEV_SD2_MAJOR, 128),
- FH_SDAP = FHDEV (DEV_SD2_MAJOR, 144),
- FH_SDAQ = FHDEV (DEV_SD2_MAJOR, 160),
- FH_SDAR = FHDEV (DEV_SD2_MAJOR, 176),
- FH_SDAS = FHDEV (DEV_SD2_MAJOR, 192),
- FH_SDAT = FHDEV (DEV_SD2_MAJOR, 208),
- FH_SDAU = FHDEV (DEV_SD2_MAJOR, 224),
- FH_SDAV = FHDEV (DEV_SD2_MAJOR, 240),
- FH_SDAW = FHDEV (DEV_SD3_MAJOR, 0),
- FH_SDAX = FHDEV (DEV_SD3_MAJOR, 16),
- FH_SDAY = FHDEV (DEV_SD3_MAJOR, 32),
- FH_SDAZ = FHDEV (DEV_SD3_MAJOR, 48),
- FH_SDBA = FHDEV (DEV_SD3_MAJOR, 64),
- FH_SDBB = FHDEV (DEV_SD3_MAJOR, 80),
- FH_SDBC = FHDEV (DEV_SD3_MAJOR, 96),
- FH_SDBD = FHDEV (DEV_SD3_MAJOR, 112),
- FH_SDBE = FHDEV (DEV_SD3_MAJOR, 128),
- FH_SDBF = FHDEV (DEV_SD3_MAJOR, 144),
- FH_SDBG = FHDEV (DEV_SD3_MAJOR, 160),
- FH_SDBH = FHDEV (DEV_SD3_MAJOR, 176),
- FH_SDBI = FHDEV (DEV_SD3_MAJOR, 192),
- FH_SDBJ = FHDEV (DEV_SD3_MAJOR, 208),
- FH_SDBK = FHDEV (DEV_SD3_MAJOR, 224),
- FH_SDBL = FHDEV (DEV_SD3_MAJOR, 240),
- FH_SDBM = FHDEV (DEV_SD4_MAJOR, 0),
- FH_SDBN = FHDEV (DEV_SD4_MAJOR, 16),
- FH_SDBO = FHDEV (DEV_SD4_MAJOR, 32),
- FH_SDBP = FHDEV (DEV_SD4_MAJOR, 48),
- FH_SDBQ = FHDEV (DEV_SD4_MAJOR, 64),
- FH_SDBR = FHDEV (DEV_SD4_MAJOR, 80),
- FH_SDBS = FHDEV (DEV_SD4_MAJOR, 96),
- FH_SDBT = FHDEV (DEV_SD4_MAJOR, 112),
- FH_SDBU = FHDEV (DEV_SD4_MAJOR, 128),
- FH_SDBV = FHDEV (DEV_SD4_MAJOR, 144),
- FH_SDBW = FHDEV (DEV_SD4_MAJOR, 160),
- FH_SDBX = FHDEV (DEV_SD4_MAJOR, 176),
- FH_SDBY = FHDEV (DEV_SD4_MAJOR, 192),
- FH_SDBZ = FHDEV (DEV_SD4_MAJOR, 208),
- FH_SDCA = FHDEV (DEV_SD4_MAJOR, 224),
- FH_SDCB = FHDEV (DEV_SD4_MAJOR, 240),
- FH_SDCC = FHDEV (DEV_SD5_MAJOR, 0),
- FH_SDCD = FHDEV (DEV_SD5_MAJOR, 16),
- FH_SDCE = FHDEV (DEV_SD5_MAJOR, 32),
- FH_SDCF = FHDEV (DEV_SD5_MAJOR, 48),
- FH_SDCG = FHDEV (DEV_SD5_MAJOR, 64),
- FH_SDCH = FHDEV (DEV_SD5_MAJOR, 80),
- FH_SDCI = FHDEV (DEV_SD5_MAJOR, 96),
- FH_SDCJ = FHDEV (DEV_SD5_MAJOR, 112),
- FH_SDCK = FHDEV (DEV_SD5_MAJOR, 128),
- FH_SDCL = FHDEV (DEV_SD5_MAJOR, 144),
- FH_SDCM = FHDEV (DEV_SD5_MAJOR, 160),
- FH_SDCN = FHDEV (DEV_SD5_MAJOR, 176),
- FH_SDCO = FHDEV (DEV_SD5_MAJOR, 192),
- FH_SDCP = FHDEV (DEV_SD5_MAJOR, 208),
- FH_SDCQ = FHDEV (DEV_SD5_MAJOR, 224),
- FH_SDCR = FHDEV (DEV_SD5_MAJOR, 240),
- FH_SDCS = FHDEV (DEV_SD6_MAJOR, 0),
- FH_SDCT = FHDEV (DEV_SD6_MAJOR, 16),
- FH_SDCU = FHDEV (DEV_SD6_MAJOR, 32),
- FH_SDCV = FHDEV (DEV_SD6_MAJOR, 48),
- FH_SDCW = FHDEV (DEV_SD6_MAJOR, 64),
- FH_SDCX = FHDEV (DEV_SD6_MAJOR, 80),
- FH_SDCY = FHDEV (DEV_SD6_MAJOR, 96),
- FH_SDCZ = FHDEV (DEV_SD6_MAJOR, 112),
- FH_SDDA = FHDEV (DEV_SD6_MAJOR, 128),
- FH_SDDB = FHDEV (DEV_SD6_MAJOR, 144),
- FH_SDDC = FHDEV (DEV_SD6_MAJOR, 160),
- FH_SDDD = FHDEV (DEV_SD6_MAJOR, 176),
- FH_SDDE = FHDEV (DEV_SD6_MAJOR, 192),
- FH_SDDF = FHDEV (DEV_SD6_MAJOR, 208),
- FH_SDDG = FHDEV (DEV_SD6_MAJOR, 224),
- FH_SDDH = FHDEV (DEV_SD6_MAJOR, 240),
- FH_SDDI = FHDEV (DEV_SD7_MAJOR, 0),
- FH_SDDJ = FHDEV (DEV_SD7_MAJOR, 16),
- FH_SDDK = FHDEV (DEV_SD7_MAJOR, 32),
- FH_SDDL = FHDEV (DEV_SD7_MAJOR, 48),
- FH_SDDM = FHDEV (DEV_SD7_MAJOR, 64),
- FH_SDDN = FHDEV (DEV_SD7_MAJOR, 80),
- FH_SDDO = FHDEV (DEV_SD7_MAJOR, 96),
- FH_SDDP = FHDEV (DEV_SD7_MAJOR, 112),
- FH_SDDQ = FHDEV (DEV_SD7_MAJOR, 128),
- FH_SDDR = FHDEV (DEV_SD7_MAJOR, 144),
- FH_SDDS = FHDEV (DEV_SD7_MAJOR, 160),
- FH_SDDT = FHDEV (DEV_SD7_MAJOR, 176),
- FH_SDDU = FHDEV (DEV_SD7_MAJOR, 192),
- FH_SDDV = FHDEV (DEV_SD7_MAJOR, 208),
- FH_SDDW = FHDEV (DEV_SD7_MAJOR, 224),
- FH_SDDX = FHDEV (DEV_SD7_MAJOR, 240),
-
- FH_MEM = FHDEV (1, 1),
- FH_KMEM = FHDEV (1, 2), /* not implemented yet */
- FH_NULL = FHDEV (1, 3),
- FH_PORT = FHDEV (1, 4),
- FH_ZERO = FHDEV (1, 5),
- FH_FULL = FHDEV (1, 7),
- FH_RANDOM = FHDEV (1, 8),
- FH_URANDOM = FHDEV (1, 9),
- FH_KMSG = FHDEV (1, 11),
- FH_OSS_DSP = FHDEV (14, 3),
-
- DEV_CYGDRIVE_MAJOR = 98,
- FH_CYGDRIVE= FHDEV (DEV_CYGDRIVE_MAJOR, 0),
-
- DEV_TCP_MAJOR = 30,
- FH_TCP = FHDEV (DEV_TCP_MAJOR, 36),
- FH_UDP = FHDEV (DEV_TCP_MAJOR, 39),
- FH_ICMP = FHDEV (DEV_TCP_MAJOR, 33),
- FH_UNIX = FHDEV (DEV_TCP_MAJOR, 120),
- FH_STREAM = FHDEV (DEV_TCP_MAJOR, 121),
- FH_DGRAM = FHDEV (DEV_TCP_MAJOR, 122),
-
- FH_BAD = FHDEV (0, 0)
-};
-
-struct device
-{
- const char *name;
- union
- {
- _dev_t devn;
- struct
- {
- _minor_t minor;
- _major_t major;
- };
- };
- const char *native;
- _mode_t mode;
- bool dev_on_fs;
- static const device *lookup (const char *, unsigned int = UINT32_MAX);
- void parse (const char *);
- void parse (_major_t major, _minor_t minor);
- void parse (_dev_t dev);
- void parsedisk (int, int);
- inline bool setunit (unsigned n)
- {
- minor = n;
- return true;
- }
- static void init ();
- void tty_to_real_device ();
- inline operator int () const {return devn;}
- inline void setfs (bool x) {dev_on_fs = x;}
- inline bool isfs () const {return dev_on_fs || devn == FH_FS;}
- inline bool is_fs_special () const {return dev_on_fs && devn != FH_FS;}
-};
-
-extern const device *console_dev;
-extern const device *ttym_dev;
-extern const device *ttys_dev;
-extern const device *urandom_dev;
-
-extern const device dev_dgram_storage;
-#define dgram_dev (&dev_dgram_storage)
-extern const device dev_stream_storage;
-#define stream_dev (&dev_stream_storage)
-extern const device dev_tcp_storage;
-#define tcp_dev (&dev_tcp_storage)
-extern const device dev_udp_storage;
-#define udp_dev (&dev_udp_storage)
-
-extern const device dev_piper_storage;
-#define piper_dev (&dev_piper_storage)
-extern const device dev_pipew_storage;
-#define pipew_dev (&dev_pipew_storage)
-extern const device dev_proc_storage;
-#define proc_dev (&dev_proc_storage)
-extern const device dev_netdrive_storage;
-#define netdrive_dev (&dev_netdrive_storage)
-extern const device dev_cygdrive_storage;
-#define cygdrive_dev (&dev_cygdrive_storage)
-extern const device dev_fh_storage;
-#define fh_dev (&dev_fh_storage)
-extern const device dev_fs_storage;
-#define fs_dev (&dev_fs_storage)
diff --git a/winsup/cygwin/devices.in b/winsup/cygwin/devices.in
deleted file mode 100644
index e5d9720..0000000
--- a/winsup/cygwin/devices.in
+++ /dev/null
@@ -1,200 +0,0 @@
-%import {
-#include "winsup.h"
-#include <sys/types.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <string.h>
-#include "devices.h"
-#include "sys/cygwin.h"
-#include "tty.h"
-#include "pinfo.h"
-typedef const device *KR_device_t;
-}
-%type KR_device_t
-%local {
-const device dev_cygdrive_storage =
- {"/cygdrive", {FH_CYGDRIVE}, "/cygdrive"};
-
-const device dev_fs_storage =
- {"", {FH_FS}, ""};
-
-const device dev_proc_storage =
- {"", {FH_PROC}, ""};
-
-const device dev_procnet_storage =
- {"", {FH_PROCNET}, ""};
-
-const device dev_netdrive_storage =
- {"", {FH_NETDRIVE}, ""};
-
-#if 0
-const device dev_dev_storage =
- {"/dev", {FH_DEV}, "/dev"};
-#endif
-
-const device dev_registry_storage =
- {"", {FH_REGISTRY}, ""};
-
-const device dev_piper_storage =
- {"", {FH_PIPER}, ""};
-
-const device dev_pipew_storage =
- {"", {FH_PIPEW}, ""};
-
-const device dev_tcp_storage =
- {"", {FH_TCP}, ""};
-
-const device dev_udp_storage =
- {"", {FH_UDP}, ""};
-
-const device dev_stream_storage =
- {"", {FH_STREAM}, ""};
-
-const device dev_dgram_storage =
- {"", {FH_DGRAM}, ""};
-
-const device dev_bad_storage =
- {"", {FH_BAD}, ""};
-#define BRACK(x) {x}
-
-%storage_here
-}
-%%
-"/dev/tty", BRACK(FH_TTY), "\\dev\\tty"
-"/dev/tty%(0-63)d", BRACK(FHDEV(DEV_TTYS_MAJOR, {$1})), "\\dev\\tty{$1}", ttys_dev
-"/dev/console", BRACK(FH_CONSOLE), "\\dev\\console", console_dev
-"/dev/ttym", BRACK(FH_TTYM), "\\dev\\ttym", ttym_dev
-"/dev/ptmx", BRACK(FH_PTYM), "\\dev\\ptmx"
-"/dev/windows", BRACK(FH_WINDOWS), "\\dev\\windows"
-"/dev/dsp", BRACK(FH_OSS_DSP), "\\dev\\dsp"
-"/dev/conin", BRACK(FH_CONIN), "conin"
-"/dev/conout", BRACK(FH_CONOUT), "conout"
-"/dev/null", BRACK(FH_NULL), "\\Device\\Null"
-"/dev/zero", BRACK(FH_ZERO), "\\dev\\zero"
-"/dev/full", BRACK(FH_FULL), "\\dev\\full"
-"/dev/random", BRACK(FH_RANDOM), "\\dev\\random"
-"/dev/urandom", BRACK(FH_URANDOM), "\\dev\\urandom", urandom_dev
-"/dev/mem", BRACK(FH_MEM), "\\dev\\mem"
-"/dev/kmem", BRACK(FH_KMEM), "\\dev\\mem"
-"/dev/clipboard", BRACK(FH_CLIPBOARD), "\\dev\\clipboard"
-"/dev/port", BRACK(FH_PORT), "\\dev\\port"
-"/dev/com%(1-16)d", BRACK(FHDEV(DEV_SERIAL_MAJOR, {$1 - 1})), "\\??\\COM{$1}"
-"/dev/ttyS%(0-63)d", BRACK(FHDEV(DEV_SERIAL_MAJOR, {$1})), "\\??\\COM{$1 + 1}"
-"/dev/pipe", BRACK(FH_PIPE), "\\dev\\pipe"
-"/dev/fifo", BRACK(FH_FIFO), "\\dev\\fifo"
-"/dev/st%(0-127)d", BRACK(FHDEV(DEV_TAPE_MAJOR, {$1})), "\\Device\\Tape{$1}"
-"/dev/nst%(0-127)d", BRACK(FHDEV(DEV_TAPE_MAJOR, {$1 + 128})), "\\Device\\Tape{$1}"
-"/dev/fd%(0-15)d", BRACK(FHDEV(DEV_FLOPPY_MAJOR, {$1})), "\\Device\\Floppy{$1}"
-"/dev/scd%(0-15)d", BRACK(FHDEV(DEV_CDROM_MAJOR, {$1})), "\\Device\\CdRom{$1}"
-"/dev/sr%(0-15)d", BRACK(FHDEV(DEV_CDROM_MAJOR, {$1})), "\\Device\\CdRom{$1}"
-"/dev/sd%{a-z}s", BRACK(FH_SD{uc $1}), "\\Device\\Harddisk{ord($1) - ord('a')}\\Partition0"
-"/dev/sda%{a-z}s", BRACK(FH_SDA{uc $1}), "\\Device\\Harddisk{26 + ord($1) - ord('a')}\\Partition0"
-"/dev/sdb%{a-z}s", BRACK(FH_SDB{uc $1}), "\\Device\\Harddisk{52 + ord($1) - ord('a')}\\Partition0"
-"/dev/sdc%{a-z}s", BRACK(FH_SDC{uc $1}), "\\Device\\Harddisk{78 + ord($1) - ord('a')}\\Partition0"
-"/dev/sdd%{a-x}s", BRACK(FH_SDD{uc $1}), "\\Device\\Harddisk{104 + ord($1) - ord('a')}\\Partition0"
-"/dev/sd%{a-z}s%(1-15)d", BRACK(FH_SD{uc $1} | {$2}), "\\Device\\Harddisk{ord($1) - ord('a')}\\Partition{$2 % 16}"
-"/dev/sda%{a-z}s%(1-15)d", BRACK(FH_SDA{uc $1} | {$2}), "\\Device\\Harddisk{26 + ord($1) - ord('a')}\\Partition{$2 % 16}"
-"/dev/sdb%{a-z}s%(1-15)d", BRACK(FH_SDB{uc $1} | {$2}), "\\Device\\Harddisk{52 + ord($1) - ord('a')}\\Partition{$2 % 16}"
-"/dev/sdc%{a-z}s%(1-15)d", BRACK(FH_SDC{uc $1} | {$2}), "\\Device\\Harddisk{78 + ord($1) - ord('a')}\\Partition{$2 % 16}"
-"/dev/sdd%{a-x}s%(1-15)d", BRACK(FH_SDD{uc $1} | {$2}), "\\Device\\Harddisk{104 + ord($1) - ord('a')}\\Partition{$2 % 16}"
-"/dev/kmsg", BRACK(FH_KMSG), "\\Device\\MailSlot\\cygwin\\dev\\kmsg"
-"/dev", BRACK(FH_DEV), "/dev"
-%other {return NULL;}
-%%
-#undef BRACK
-void
-device::parse (const char *s)
-{
- size_t len = strlen (s);
- const device *dev = KR_find_keyword (s, len);
-
- if (!dev)
- *this = *fs_dev;
- else
- *this = *dev;
-}
-
-void
-device::init ()
-{
- /* nothing to do... yet */
-}
-
-void
-device::parse (_major_t major, _minor_t minor)
-{
- _dev_t dev = FHDEV (major, minor);
-
- devn = 0;
-
- for (unsigned i = 0; i < (sizeof (dev_storage) / sizeof (dev_storage[0])); i++)
- if (dev_storage[i].devn == dev)
- {
- *this = dev_storage[i];
- break;
- }
-
- if (!*this)
- devn = FHDEV (major, minor);
-}
-
-void
-device::parse (_dev_t dev)
-{
- parse (_major (dev), _minor (dev));
-}
-
-void
-device::tty_to_real_device ()
-{
- if (!real_tty_attached (myself))
- *this = myself->ctty < 0 ? dev_bad_storage : *console_dev;
- else
- parse (DEV_TTYS_MAJOR, myself->ctty);
-}
-
-void
-device::parsedisk (int drive, int part)
-{
- int base;
- if (drive < ('q' - 'a')) /* /dev/sda -to- /dev/sdp */
- base = DEV_SD_MAJOR;
- else if (drive < 32) /* /dev/sdq -to- /dev/sdaf */
- {
- base = DEV_SD1_MAJOR;
- drive -= 'q' - 'a';
- }
- else if (drive < 48) /* /dev/sdag -to- /dev/sdav */
- {
- base = DEV_SD2_MAJOR;
- drive -= 32;
- }
- else if (drive < 64) /* /dev/sdaw -to- /dev/sdbl */
- {
- base = DEV_SD3_MAJOR;
- drive -= 48;
- }
- else if (drive < 80) /* /dev/sdbm -to- /dev/sdcb */
- {
- base = DEV_SD4_MAJOR;
- drive -= 64;
- }
- else if (drive < 96) /* /dev/sdcc -to- /dev/sdcr */
- {
- base = DEV_SD5_MAJOR;
- drive -= 80;
- }
- else if (drive < 112) /* /dev/sdcs -to- /dev/sddh */
- {
- base = DEV_SD6_MAJOR;
- drive -= 96;
- }
- /* NOTE: This will cause multiple /dev/sddx entries in
- /proc/partitions if there are more than 128 devices */
- else /* /dev/sddi -to- /dev/sddx */
- {
- base = DEV_SD7_MAJOR;
- drive -= 112;
- }
- parse (base, part + (drive * 16));
-}
diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc
deleted file mode 100644
index 2b9125f..0000000
--- a/winsup/cygwin/dir.cc
+++ /dev/null
@@ -1,331 +0,0 @@
-/* dir.cc: Posix directory-related routines
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2006, 2007 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-
-#define _COMPILING_NEWLIB
-#include <dirent.h>
-
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "cygtls.h"
-
-extern "C" int
-dirfd (DIR *dir)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (dir->__d_cookie != __DIRENT_COOKIE)
- {
- set_errno (EBADF);
- syscall_printf ("-1 = dirfd (%p)", dir);
- return -1;
- }
- return dir->__d_fd;
-}
-
-/* Symbol kept for backward compatibility. Don't remove. Don't declare
- in public header file. */
-extern "C" DIR *
-__opendir_with_d_ino (const char *name)
-{
- return opendir (name);
-}
-
-/* opendir: POSIX 5.1.2.1 */
-extern "C" DIR *
-opendir (const char *name)
-{
- fhandler_base *fh;
- DIR *res;
-
- fh = build_fh_name (name, NULL, PC_SYM_FOLLOW);
- if (!fh)
- res = NULL;
- else if (fh->exists ())
- res = fh->opendir (-1);
- else
- {
- set_errno (ENOENT);
- res = NULL;
- }
-
- if (!res && fh)
- delete fh;
- return res;
-}
-
-extern "C" DIR *
-fdopendir (int fd)
-{
- DIR *res = NULL;
-
- cygheap_fdget cfd (fd);
- if (cfd >= 0)
- res = cfd->opendir (fd);
- return res;
-}
-
-static int
-readdir_worker (DIR *dir, dirent *de)
-{
- myfault efault;
- if (efault.faulted ())
- return EFAULT;
-
- if (dir->__d_cookie != __DIRENT_COOKIE)
- {
- syscall_printf ("%p = readdir (%p)", NULL, dir);
- return EBADF;
- }
-
- de->d_ino = 0;
- de->d_type = DT_UNKNOWN;
- memset (&de->__d_unused1, 0, sizeof (de->__d_unused1));
-
- int res = ((fhandler_base *) dir->__fh)->readdir (dir, de);
-
- if (res == ENMFILE)
- {
- if (!(dir->__flags & dirent_saw_dot))
- {
- strcpy (de->d_name, ".");
- dir->__flags |= dirent_saw_dot;
- dir->__d_position++;
- res = 0;
- }
- else if (!(dir->__flags & dirent_saw_dot_dot))
- {
- strcpy (de->d_name, "..");
- dir->__flags |= dirent_saw_dot_dot;
- dir->__d_position++;
- res = 0;
- }
- }
-
- if (!res && !de->d_ino)
- {
- bool is_dot = false;
- bool is_dot_dot = false;
-
- if (de->d_name[0] == '.')
- {
- if (de->d_name[1] == '\0')
- is_dot = true;
- else if (de->d_name[1] == '.' && de->d_name[2] == '\0')
- is_dot_dot = true;
- }
-
- if (is_dot_dot && !(dir->__flags & dirent_isroot))
- de->d_ino = readdir_get_ino (((fhandler_base *) dir->__fh)->get_name (),
- true);
- else
- {
- /* Compute d_ino by combining filename hash with directory hash. */
- de->d_ino = ((fhandler_base *) dir->__fh)->get_ino ();
- if (!is_dot && !is_dot_dot)
- {
- PUNICODE_STRING w32name =
- ((fhandler_base *) dir->__fh)->pc.get_nt_native_path ();
- DWORD devn = ((fhandler_base *) dir->__fh)->get_device ();
- /* Paths below /proc don't have a Win32 pendant. */
- if (isproc_dev (devn))
- de->d_ino = hash_path_name (de->d_ino, L"/");
- else if (w32name->Buffer[w32name->Length / sizeof (WCHAR) - 1]
- != L'\\')
- de->d_ino = hash_path_name (de->d_ino, L"\\");
- de->d_ino = hash_path_name (de->d_ino, de->d_name);
- }
- }
- }
- /* This fills out the old 32 bit d_ino field for old applications,
- build under Cygwin before 1.5.x. */
- de->__d_internal1 = de->d_ino;
-
- return res;
-}
-
-/* readdir: POSIX 5.1.2.1 */
-extern "C" struct dirent *
-readdir (DIR *dir)
-{
- int res = readdir_worker (dir, dir->__d_dirent);
- if (res == 0)
- return dir->__d_dirent;
- if (res != ENMFILE)
- set_errno (res);
- return NULL;
-}
-
-extern "C" int
-readdir_r (DIR *dir, dirent *de, dirent **ode)
-{
- int res = readdir_worker (dir, de);
- if (!res)
- *ode = de;
- else
- {
- *ode = NULL;
- if (res == ENMFILE)
- res = 0;
- }
- return res;
-}
-
-extern "C" _off64_t
-telldir64 (DIR *dir)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- if (dir->__d_cookie != __DIRENT_COOKIE)
- return 0;
- return ((fhandler_base *) dir->__fh)->telldir (dir);
-}
-
-/* telldir */
-extern "C" _off_t
-telldir (DIR *dir)
-{
- return telldir64 (dir);
-}
-
-extern "C" void
-seekdir64 (DIR *dir, _off64_t loc)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return;
-
- if (dir->__d_cookie != __DIRENT_COOKIE)
- return;
- dir->__flags &= dirent_info_mask;
- return ((fhandler_base *) dir->__fh)->seekdir (dir, loc);
-}
-
-/* seekdir */
-extern "C" void
-seekdir (DIR *dir, _off_t loc)
-{
- seekdir64 (dir, (_off64_t)loc);
-}
-
-/* rewinddir: POSIX 5.1.2.1 */
-extern "C" void
-rewinddir (DIR *dir)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return;
-
- if (dir->__d_cookie != __DIRENT_COOKIE)
- return;
- dir->__flags &= dirent_info_mask;
- return ((fhandler_base *) dir->__fh)->rewinddir (dir);
-}
-
-/* closedir: POSIX 5.1.2.1 */
-extern "C" int
-closedir (DIR *dir)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- if (dir->__d_cookie != __DIRENT_COOKIE)
- {
- set_errno (EBADF);
- syscall_printf ("-1 = closedir (%p)", dir);
- return -1;
- }
-
- /* Reset the marker in case the caller tries to use `dir' again. */
- dir->__d_cookie = 0;
-
- int res = ((fhandler_base *) dir->__fh)->closedir (dir);
-
- cygheap->fdtab.release (dir->__d_fd);
-
- free (dir->__d_dirname);
- free (dir->__d_dirent);
- free (dir);
- syscall_printf ("%d = closedir (%p)", res);
- return res;
-}
-
-/* mkdir: POSIX 5.4.1.1 */
-extern "C" int
-mkdir (const char *dir, mode_t mode)
-{
- int res = -1;
- fhandler_base *fh = NULL;
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- if (!(fh = build_fh_name (dir, NULL, PC_SYM_NOFOLLOW)))
- goto done; /* errno already set */;
-
- if (fh->error ())
- {
- debug_printf ("got %d error from build_fh_name", fh->error ());
- set_errno (fh->error ());
- }
- else if (has_dot_last_component (dir, true))
- set_errno (fh->exists () ? EEXIST : ENOENT);
- else if (!fh->mkdir (mode))
- res = 0;
- delete fh;
-
- done:
- syscall_printf ("%d = mkdir (%s, %d)", res, dir, mode);
- return res;
-}
-
-/* rmdir: POSIX 5.5.2.1 */
-extern "C" int
-rmdir (const char *dir)
-{
- int res = -1;
- fhandler_base *fh = NULL;
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- if (!(fh = build_fh_name (dir, NULL, PC_SYM_NOFOLLOW)))
- goto done; /* errno already set */;
-
- if (fh->error ())
- {
- debug_printf ("got %d error from build_fh_name", fh->error ());
- set_errno (fh->error ());
- }
- else if (!fh->exists ())
- set_errno (ENOENT);
- else if (has_dot_last_component (dir, false))
- set_errno (EINVAL);
- else if (!fh->rmdir ())
- res = 0;
-
- delete fh;
-
- done:
- syscall_printf ("%d = rmdir (%s)", res, dir);
- return res;
-}
diff --git a/winsup/cygwin/dlfcn.cc b/winsup/cygwin/dlfcn.cc
deleted file mode 100644
index 6319a3c..0000000
--- a/winsup/cygwin/dlfcn.cc
+++ /dev/null
@@ -1,162 +0,0 @@
-/* dlfcn.cc
-
- Copyright 1998, 2000, 2001, 2002, 2003, 2004, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <psapi.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include "path.h"
-#include "perprocess.h"
-#include "dlfcn.h"
-#include "cygtls.h"
-#include "tls_pbuf.h"
-
-static void __stdcall
-set_dl_error (const char *str)
-{
- strcpy (_my_tls.locals.dl_buffer, strerror (get_errno ()));
- _my_tls.locals.dl_error = 1;
-}
-
-/* Look for an executable file given the name and the environment
- variable to use for searching (eg., PATH); returns the full
- pathname (static buffer) if found or NULL if not. */
-inline const char * __stdcall
-check_path_access (const char *mywinenv, const char *name, path_conv& buf)
-{
- return find_exec (name, buf, mywinenv, FE_NNF | FE_NATIVE | FE_CWD | FE_DLL);
-}
-
-/* Search LD_LIBRARY_PATH for dll, if it exists.
- Return Windows version of given path. */
-static const char * __stdcall
-get_full_path_of_dll (const char* str, char *name)
-{
- int len = strlen (str);
-
- /* empty string or too long to be legal win32 pathname? */
- if (len == 0 || len >= PATH_MAX)
- return str; /* Yes. Let caller deal with it. */
-
- const char *ret;
-
- strcpy (name, str); /* Put it somewhere where we can manipulate it. */
-
- /* Add extension if necessary */
- if (str[len - 1] != '.')
- {
- /* Add .dll only if no extension provided. */
- const char *p = strrchr (str, '.');
- if (!p || strpbrk (p, "\\/"))
- strcat (name, ".dll");
- }
-
- path_conv real_filename;
-
- if (isabspath (name) ||
- (ret = check_path_access ("LD_LIBRARY_PATH=", name, real_filename)
- ?: check_path_access ("/usr/lib", name, real_filename)) == NULL)
- real_filename.check (name, PC_SYM_FOLLOW | PC_NULLEMPTY); /* Convert */
-
- if (!real_filename.error)
- ret = strcpy (name, real_filename.get_win32 ());
- else
- {
- set_errno (real_filename.error);
- ret = NULL;
- }
-
- return ret;
-}
-
-void *
-dlopen (const char *name, int)
-{
- void *ret;
-
- if (name == NULL)
- ret = (void *) GetModuleHandle (NULL); /* handle for the current module */
- else
- {
- tmp_pathbuf tp;
- char *buf = tp.c_get ();
- /* handle for the named library */
- const char *fullpath = get_full_path_of_dll (name, buf);
- if (!fullpath)
- ret = NULL;
- else
- {
- ret = (void *) LoadLibrary (fullpath);
- if (ret == NULL)
- __seterrno ();
- }
- }
-
- if (!ret)
- set_dl_error ("dlopen");
- debug_printf ("ret %p", ret);
-
- return ret;
-}
-
-void *
-dlsym (void *handle, const char *name)
-{
- void *ret = NULL;
- if (handle == RTLD_DEFAULT)
- { /* search all modules */
- HANDLE cur_proc = GetCurrentProcess ();
- HMODULE *modules;
- DWORD needed, i;
- if (!EnumProcessModules (cur_proc, NULL, 0, &needed))
- {
- dlsym_fail:
- set_dl_error ("dlsym");
- return NULL;
- }
- modules = (HMODULE*) alloca (needed);
- if (!EnumProcessModules (cur_proc, modules, needed, &needed))
- goto dlsym_fail;
- for (i = 0; i < needed / sizeof (HMODULE); i++)
- if ((ret = (void *) GetProcAddress (modules[i], name)))
- break;
- }
- else
- ret = (void *) GetProcAddress ((HMODULE)handle, name);
- if (!ret)
- set_dl_error ("dlsym");
- debug_printf ("ret %p", ret);
- return ret;
-}
-
-int
-dlclose (void *handle)
-{
- int ret = -1;
- if (handle == GetModuleHandle (NULL) || FreeLibrary ((HMODULE) handle))
- ret = 0;
- if (ret)
- set_dl_error ("dlclose");
- return ret;
-}
-
-char *
-dlerror ()
-{
- char *res;
- if (!_my_tls.locals.dl_error)
- res = NULL;
- else
- {
- _my_tls.locals.dl_error = 0;
- res = _my_tls.locals.dl_buffer;
- }
- return res;
-}
diff --git a/winsup/cygwin/dll_init.cc b/winsup/cygwin/dll_init.cc
deleted file mode 100644
index acd767d..0000000
--- a/winsup/cygwin/dll_init.cc
+++ /dev/null
@@ -1,462 +0,0 @@
-/* dll_init.cc
-
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Red Hat, Inc.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "cygerrno.h"
-#include "perprocess.h"
-#include "dll_init.h"
-#include "environ.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "pinfo.h"
-#include "cygtls.h"
-#include <wchar.h>
-
-extern void __stdcall check_sanity_and_sync (per_process *);
-
-dll_list NO_COPY dlls;
-
-static bool dll_global_dtors_recorded;
-
-/* Run destructors for all DLLs on exit. */
-void
-dll_global_dtors ()
-{
- int recorded = dll_global_dtors_recorded;
- dll_global_dtors_recorded = false;
- if (recorded && dlls.start.next)
- for (dll *d = dlls.end; d != &dlls.start; d = d->prev)
- d->p.run_dtors ();
-}
-
-/* Run all constructors associated with a dll */
-void
-per_module::run_ctors ()
-{
- void (**pfunc)() = ctors;
-
- /* Run ctors backwards, so skip the first entry and find how many
- there are, then run them. */
-
- if (pfunc)
- {
- int i;
- for (i = 1; pfunc[i]; i++);
-
- for (int j = i - 1; j > 0; j--)
- (pfunc[j]) ();
- }
-}
-
-/* Run all destructors associated with a dll */
-void
-per_module::run_dtors ()
-{
- void (**pfunc)() = dtors;
- for (int i = 1; pfunc[i]; i++)
- (pfunc[i]) ();
-}
-
-/* Initialize an individual DLL */
-int
-dll::init ()
-{
- int ret = 1;
-
- /* Why didn't we just import this variable? */
- *(p.envptr) = __cygwin_environ;
-
- /* Don't run constructors or the "main" if we've forked. */
- if (!in_forkee)
- {
- /* global contructors */
- p.run_ctors ();
-
- /* entry point of dll (use main of per_process with null args...) */
- if (p.main)
- ret = (*(p.main)) (0, 0, 0);
- }
-
- return ret;
-}
-
-/* Look for a dll based on name */
-dll *
-dll_list::operator[] (const PWCHAR name)
-{
- dll *d = &start;
- while ((d = d->next) != NULL)
- if (!wcscasecmp (name, d->name))
- return d;
-
- return NULL;
-}
-
-#define RETRIES 1000
-
-/* Allocate space for a dll struct contiguous with the just-loaded dll. */
-dll *
-dll_list::alloc (HINSTANCE h, per_process *p, dll_type type)
-{
- WCHAR name[NT_MAX_PATH];
- DWORD namelen = GetModuleFileNameW (h, name, sizeof (name));
-
- /* Already loaded? */
- dll *d = dlls[name];
- if (d)
- {
- d->count++; /* Yes. Bump the usage count. */
- return d; /* Return previously allocated pointer. */
- }
-
- SYSTEM_INFO s1;
- GetSystemInfo (&s1);
-
- int i;
- void *s = p->bss_end;
- DWORD n;
- MEMORY_BASIC_INFORMATION m;
- /* Search for space after the DLL */
- for (i = 0; i <= RETRIES; i++, s = (char *) m.BaseAddress + m.RegionSize)
- {
- if (!VirtualQuery (s, &m, sizeof (m)))
- return NULL; /* Can't do it. */
- if (m.State == MEM_FREE)
- {
- /* Couldn't find any. Uh oh. FIXME: Issue an error? */
- if (i == RETRIES)
- return NULL; /* Oh well. Couldn't locate free space. */
-
- /* Ensure that this is rounded to the nearest page boundary.
- FIXME: Should this be ensured by VirtualQuery? */
- n = (DWORD) m.BaseAddress;
- DWORD r = n % s1.dwAllocationGranularity;
-
- if (r)
- n = ((n - r) + s1.dwAllocationGranularity);
-
- /* First reserve the area of memory, then commit it. */
- if (VirtualAlloc ((void *) n, sizeof (dll), MEM_RESERVE, PAGE_READWRITE))
- d = (dll *) VirtualAlloc ((void *) n, sizeof (dll), MEM_COMMIT,
- PAGE_READWRITE);
- if (d)
- break;
- }
- }
-
- /* Did we succeed? */
- if (d == NULL)
- { /* Nope. */
-#ifdef DEBUGGING
- system_printf ("VirtualAlloc failed, %E");
-#endif
- __seterrno ();
- return NULL;
- }
-
- /* Now we've allocated a block of information. Fill it in with the supplied
- info about this DLL. */
- d->count = 1;
- d->namelen = namelen;
- wcscpy (d->name, name);
- d->handle = h;
- d->p = p;
- d->type = type;
- if (end == NULL)
- end = &start; /* Point to "end" of dll chain. */
- end->next = d; /* Standard linked list stuff. */
- d->next = NULL;
- d->prev = end;
- end = d;
- tot++;
- if (type == DLL_LOAD)
- loaded_dlls++;
- return d;
-}
-
-/* Detach a DLL from the chain. */
-void
-dll_list::detach (void *retaddr)
-{
- if (!myself || exit_state)
- return;
- MEMORY_BASIC_INFORMATION m;
- if (!VirtualQuery (retaddr, &m, sizeof m))
- return;
- HMODULE h = (HMODULE) m.AllocationBase;
-
- dll *d = &start;
- while ((d = d->next))
- if (d->handle != h)
- continue;
- else if (d->count <= 0)
- system_printf ("WARNING: trying to detach an already detached dll ...");
- else if (--d->count == 0)
- {
- d->p.run_dtors ();
- d->prev->next = d->next;
- if (d->next)
- d->next->prev = d->prev;
- if (d->type == DLL_LOAD)
- loaded_dlls--;
- if (end == d)
- end = d->prev;
- VirtualFree (d, 0, MEM_RELEASE);
- break;
- }
-}
-
-/* Initialization for all linked DLLs, called by dll_crt0_1. */
-void
-dll_list::init ()
-{
- /* Walk the dll chain, initializing each dll */
- dll *d = &start;
- dll_global_dtors_recorded = d->next != NULL;
- while ((d = d->next))
- d->init ();
-}
-
-#define A64K (64 * 1024)
-
-/* Mark every memory address up to "here" as reserved. This may force
- Windows NT to load a DLL in the next available, lowest slot. */
-static void
-reserve_upto (const PWCHAR name, DWORD here)
-{
- DWORD size;
- MEMORY_BASIC_INFORMATION mb;
- for (DWORD start = 0x10000; start < here; start += size)
- if (!VirtualQuery ((void *) start, &mb, sizeof (mb)))
- size = A64K;
- else
- {
- size = A64K * ((mb.RegionSize + A64K - 1) / A64K);
- start = A64K * (((DWORD) mb.BaseAddress + A64K - 1) / A64K);
-
- if (start + size > here)
- size = here - start;
- if (mb.State == MEM_FREE &&
- !VirtualAlloc ((void *) start, size, MEM_RESERVE, PAGE_NOACCESS))
- api_fatal ("couldn't allocate memory %p(%d) for '%W' alignment, %E\n",
- start, size, name);
- }
-}
-
-/* Release all of the memory previously allocated by "upto" above.
- Note that this may also free otherwise reserved memory. If that becomes
- a problem, we'll have to keep track of the memory that we reserve above. */
-static void
-release_upto (const PWCHAR name, DWORD here)
-{
- DWORD size;
- MEMORY_BASIC_INFORMATION mb;
- for (DWORD start = 0x10000; start < here; start += size)
- if (!VirtualQuery ((void *) start, &mb, sizeof (mb)))
- size = 64 * 1024;
- else
- {
- size = mb.RegionSize;
- if (!(mb.State == MEM_RESERVE && mb.AllocationProtect == PAGE_NOACCESS &&
- (((void *) start < cygheap->user_heap.base
- || (void *) start > cygheap->user_heap.top) &&
- ((void *) start < (void *) cygheap
- || (void *) start > (void *) ((char *) cygheap + CYGHEAPSIZE)))))
- continue;
- if (!VirtualFree ((void *) start, 0, MEM_RELEASE))
- api_fatal ("couldn't release memory %p(%d) for '%W' alignment, %E\n",
- start, size, name);
- }
-}
-
-/* Reload DLLs after a fork. Iterates over the list of dynamically loaded DLLs
- and attempts to load them in the same place as they were loaded in the parent. */
-void
-dll_list::load_after_fork (HANDLE parent, dll *first)
-{
- int try2 = 0;
- dll d;
-
- void *next = first;
- while (next)
- {
- DWORD nb;
- /* Read the dll structure from the parent. */
- if (!ReadProcessMemory (parent, next, &d, sizeof (dll), &nb) ||
- nb != sizeof (dll))
- return;
-
- /* We're only interested in dynamically loaded dlls.
- Hopefully, this function wouldn't even have been called unless
- the parent had some of those. */
- if (d.type == DLL_LOAD)
- {
- bool unload = true;
- HMODULE h = LoadLibraryExW (d.name, NULL, DONT_RESOLVE_DLL_REFERENCES);
-
- if (!h)
- system_printf ("can't reload %W", d.name);
- /* See if DLL will load in proper place. If so, free it and reload
- it the right way.
- It sort of stinks that we can't invert the order of the FreeLibrary
- and LoadLibrary since Microsoft documentation seems to imply that that
- should do what we want. However, since the library was loaded above,
- the second LoadLibrary does not execute it's startup code unless it
- is first unloaded. */
- else if (h == d.handle)
- {
- if (unload)
- {
- FreeLibrary (h);
- LoadLibraryW (d.name);
- }
- }
- else if (try2)
- api_fatal ("unable to remap %W to same address as parent(%p) != %p",
- d.name, d.handle, h);
- else
- {
- /* It loaded in the wrong place. Dunno why this happens but it always
- seems to happen when there are multiple DLLs attempting to load into
- the same address space. In the "forked" process, the second DLL always
- loads into a different location. */
- FreeLibrary (h);
- /* Block all of the memory up to the new load address. */
- reserve_upto (d.name, (DWORD) d.handle);
- try2 = 1; /* And try */
- continue; /* again. */
- }
- /* If we reached here, and try2 is set, then there is a lot of memory to
- release. */
- if (try2)
- {
- release_upto (d.name, (DWORD) d.handle);
- try2 = 0;
- }
- }
- next = d.next; /* Get the address of the next DLL. */
- }
- in_forkee = false;
-}
-
-struct dllcrt0_info
-{
- HMODULE h;
- per_process *p;
- int res;
- dllcrt0_info (HMODULE h0, per_process *p0): h(h0), p(p0) {}
-};
-
-extern "C" int
-dll_dllcrt0 (HMODULE h, per_process *p)
-{
- dllcrt0_info x (h, p);
-
- if (_my_tls.isinitialized ())
- dll_dllcrt0_1 (&x);
- else
- _my_tls.call ((DWORD (*) (void *, void *)) dll_dllcrt0_1, &x);
- return x.res;
-}
-
-void
-dll_dllcrt0_1 (VOID *x)
-{
- HMODULE& h = ((dllcrt0_info *)x)->h;
- per_process*& p = ((dllcrt0_info *)x)->p;
- int& res = ((dllcrt0_info *)x)->res;
-
- /* Windows apparently installs a bunch of exception handlers prior to
- this function getting called and one of them may trip before cygwin
- gets to it. So, install our own exception handler only.
- FIXME: It is possible that we may have to save state of the
- previous exception handler chain and restore it, if problems
- are noted. */
- _my_tls.init_exception_handler (_cygtls::handle_exceptions);
-
- if (p == NULL)
- p = &__cygwin_user_data;
- else
- *(p->impure_ptr_ptr) = __cygwin_user_data.impure_ptr;
-
- bool linked = !in_forkee && !cygwin_finished_initializing;
-
- /* Partially initialize Cygwin guts for non-cygwin apps. */
- if (dynamically_loaded && user_data->magic_biscuit == 0)
- dll_crt0 (p);
- else
- check_sanity_and_sync (p);
-
- dll_type type;
-
- /* If this function is called before cygwin has finished
- initializing, then the DLL must be a cygwin-aware DLL
- that was explicitly linked into the program rather than
- a dlopened DLL. */
- if (linked)
- type = DLL_LINK;
- else
- {
- type = DLL_LOAD;
- dlls.reload_on_fork = 1;
- }
-
- /* Allocate and initialize space for the DLL. */
- dll *d = dlls.alloc (h, p, type);
-
- /* If d == NULL, then something is broken.
- Otherwise, if we've finished initializing, it's ok to
- initialize the DLL. If we haven't finished initializing,
- it may not be safe to call the dll's "main" since not
- all of cygwin's internal structures may have been set up. */
- if (!d || (!linked && !d->init ()))
- res = -1;
- else
- res = (DWORD) d;
-}
-
-/* OBSOLETE: This function is obsolescent and will go away in the
- future. Cygwin can now handle being loaded from a noncygwin app
- using the same entry point. */
-
-extern "C" int
-dll_noncygwin_dllcrt0 (HMODULE h, per_process *p)
-{
- return dll_dllcrt0 (h, p);
-}
-
-extern "C" void
-cygwin_detach_dll (dll *)
-{
- HANDLE retaddr;
- if (_my_tls.isinitialized ())
- retaddr = (HANDLE) _my_tls.retaddr ();
- else
- retaddr = __builtin_return_address (0);
- dlls.detach (retaddr);
-}
-
-extern "C" void
-dlfork (int val)
-{
- dlls.reload_on_fork = val;
-}
-
-/* Called from various places to update all of the individual
- ideas of the environ block. Explain to me again why we didn't
- just import __cygwin_environ? */
-void __stdcall
-update_envptrs ()
-{
- for (dll *d = dlls.istart (DLL_ANY); d; d = dlls.inext ())
- *(d->p.envptr) = __cygwin_environ;
- *main_environ = __cygwin_environ;
-}
diff --git a/winsup/cygwin/dll_init.h b/winsup/cygwin/dll_init.h
deleted file mode 100644
index dd7dfb3..0000000
--- a/winsup/cygwin/dll_init.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* dll_init.h
-
- Copyright 1998, 1999, 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-struct per_module
-{
- char ***envptr;
- void (**ctors)(void);
- void (**dtors)(void);
- void *data_start;
- void *data_end;
- void *bss_start;
- void *bss_end;
- int (*main)(int, char **, char **);
- per_module &operator = (per_process *p)
- {
- envptr = p->envptr;
- ctors = p->ctors;
- dtors = p->dtors;
- data_start = p->data_start;
- data_end = p->data_end;
- bss_start = p->bss_start;
- bss_end = p->bss_end;
- main = p->main;
- return *this;
- }
- void run_ctors ();
- void run_dtors ();
-};
-
-
-typedef enum
-{
- DLL_NONE,
- DLL_LINK,
- DLL_LOAD,
- DLL_ANY
-} dll_type;
-
-struct dll
-{
- struct dll *next, *prev;
- per_module p;
- HMODULE handle;
- int count;
- dll_type type;
- int namelen;
- WCHAR name[NT_MAX_PATH];
- void detach ();
- int init ();
-};
-
-#define MAX_DLL_BEFORE_INIT 100
-
-class dll_list
-{
- dll *end;
- dll *hold;
- dll_type hold_type;
-public:
- dll start;
- int tot;
- int loaded_dlls;
- int reload_on_fork;
- dll *operator [] (const PWCHAR name);
- dll *alloc (HINSTANCE, per_process *, dll_type);
- void detach (void *);
- void init ();
- void load_after_fork (HANDLE, dll *);
- dll *inext ()
- {
- while ((hold = hold->next))
- if (hold_type == DLL_ANY || hold->type == hold_type)
- break;
- return hold;
- }
- dll *istart (dll_type t)
- {
- hold_type = t;
- hold = &start;
- return inext ();
- }
- friend void dll_global_dtors ();
-};
-
-extern dll_list dlls;
-void dll_global_dtors ();
diff --git a/winsup/cygwin/dll_init.sgml b/winsup/cygwin/dll_init.sgml
deleted file mode 100644
index a66c43c..0000000
--- a/winsup/cygwin/dll_init.sgml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-<sect1 id="func-cygwin-detach-dll">
-<title>cygwin_detach_dll</title>
-
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" void
-<function>cygwin_detach_dll</function></funcdef>
-<paramdef>int <parameter>dll_index</parameter></paramdef>
-</funcprototype></funcsynopsis>
-
-</sect1>
diff --git a/winsup/cygwin/dllfixdbg b/winsup/cygwin/dllfixdbg
deleted file mode 100755
index e3875a6..0000000
--- a/winsup/cygwin/dllfixdbg
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/usr/bin/perl
-# Copyright 2006, 2007 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.
-#
-use integer;
-use strict;
-sub xit($@);
-my $strip = $ARGV[0] eq '-s';
-shift if $strip;
-my $objdump = shift;
-my @objcopy = ((shift));
-my $dll = shift;
-my $dbg = shift;
-xit 0, @objcopy, '-R', '.gnu_debuglink_overlay', '--only-keep-debug', $dll, $dbg;
-xit 0, @objcopy, '-g', '--add-gnu-debuglink=' . $dbg, $dll;
-open(OBJDUMP, '-|', "$objdump --headers $dll");
-my %section;
-while (<OBJDUMP>) {
- my ($idx, $name, $size, $vma, $lma, $fileoff, $algn) = /^\s*(\d+)\s+(\.\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*$/;
- if ($name eq '.gnu_debuglink') {
- push(@objcopy, '--set-section-flag', '.gnu_debuglink=contents,readonly,debug,noload');
- $idx = $section{'.gnu_debuglink'}{-idx} if defined($section{'.gnu_debuglink'}{-idx});
- } elsif ($name eq '.gnu_debuglink_overlay') {
- push (@objcopy, '-R', '.gnu_debuglink_overlay');
- $section{'.gnu_debuglink'}{-idx} = $idx;
- next;
- }
- defined($idx) and
- $section{$name} = {-idx=>int($idx), -size=>hex($size), -vma=>hex($vma), -lma=>hex($lma), -fileoff=>hex($fileoff),
- -algn=>0x00001000};
-}
-close OBJDUMP;
-my $vma;
-for my $k (sort {$section{$a}{-idx} <=> $section{$b}{-idx}} keys %section) {
- if ($strip && $k =~ /\.(?:stab|debug)/o) {
- push(@objcopy, '-R', $k);
- next;
- }
- if (!defined($vma)) {
- $vma = $section{$k}{-vma};
- }
- if ($vma != $section{$k}{-vma}) {
- my $newvma = align($vma, $section{$k}{-algn});
- if ($newvma != $vma) {
- printf STDERR "$0: ERROR $k VMA 0x%08x != 0x%08x\n", $vma, $newvma;
- exit 1;
- }
- push(@objcopy, '--change-section-address', sprintf "$k=0x%08x", $vma);
- }
- $vma = align($vma + $section{$k}{-size}, $section{$k}{-algn});
-}
-
-warn "$0: ERROR final VMA (" . sprintf("0x%08x", $vma) . ") not on 64K boundary\n" if $vma != align($vma, 64 * 1024);
-push(@objcopy, $dll, @ARGV);
-xit 1, @objcopy;
-sub align {
- my $n = $_[0];
- my $align = $_[1] - 1;
- return ($n + $align) & ~$align;
-}
-
-sub xit($@) {
- my $execit = shift;
- print "+ @_\n";
- if ($execit) {
- exec @_ or die "$0: couldn't exec $_[0] - $!\n";
- } else {
- system @_ and die "$0: couldn't exec $_[0] - $!\n";
- }
-}
diff --git a/winsup/cygwin/dlmalloc.c b/winsup/cygwin/dlmalloc.c
deleted file mode 100644
index b64bed8..0000000
--- a/winsup/cygwin/dlmalloc.c
+++ /dev/null
@@ -1,3815 +0,0 @@
-/*
- * To do:
- * - strdup? maybe shouldn't bother yet, it seems difficult to get includes
- * right using dlmalloc.h
- * - add STD_C prototyping
- * - adhere to comment conventions
- * - maybe fix ALLOCFILL vs. MOATFILL in do_init_realloced_chunk()
- * - keep a list of mmaped regions for checking in malloc_update_mallinfo()
- * - I think memalign() is wrong: it aligns the chunk rather than the memory
- * portion of the chunk.
- * - "& -alignment" in memalign() is suspect: should use "& ~alignment"
- * instead?
- * - malloc.h doesn't need malloc_COPY or probably a bunch of other stuff
- * - add mallopt options for e.g. fill?
- * - come up with a non-BBC version of M_C
- * - document necessity of checking chunk address in do_check_chunk prior to
- * accessing any of its fields
- * Done:
- * minor speedup due to extend check before mremap
- * minor speedup due to returning malloc() result in memalign() if aligned
- * made malloc_update_mallinfo() check alloced regions at start of sbrk area
- * fixed bug: After discovering foreign sbrk, if old_top was MINSIZE, would
- * reduce old_top_size to 0, thus making inuse(old_top) return 0; other
- * functions would consequently attempt to access old_top->{fd,bk}, which
- * were invalid. This is in malloc_extend_top(), in the "double
- * fencepost" section.
- * Documentation:
- * malloc_usable_size(P) is equivalent to realloc(P, malloc_usable_size(P))
- *
- * $Log$
- * Revision 1.9 2004/05/12 16:21:18 cgf
- * remove keyword stuff
- *
- * Revision 1.1 1997/12/24 18:34:47 nsd
- * Initial revision
- *
- */
-/* ---------- To make a malloc.h, start cutting here ------------ */
-
-/*
- A version of malloc/free/realloc written by Doug Lea and released to the
- public domain. Send questions/comments/complaints/performance data
- to dl@cs.oswego.edu
-
-* VERSION 2.6.4 Thu Nov 28 07:54:55 1996 Doug Lea (dl at gee)
-
- Note: There may be an updated version of this malloc obtainable at
- ftp://g.oswego.edu/pub/misc/malloc.c
- Check before installing!
-
-* Why use this malloc?
-
- This is not the fastest, most space-conserving, most portable, or
- most tunable malloc ever written. However it is among the fastest
- while also being among the most space-conserving, portable and tunable.
- Consistent balance across these factors results in a good general-purpose
- allocator. For a high-level description, see
- http://g.oswego.edu/dl/html/malloc.html
-
-* Synopsis of public routines
-
- (Much fuller descriptions are contained in the program documentation below.)
-
- malloc(size_t n);
- Return a pointer to a newly allocated chunk of at least n bytes, or null
- if no space is available.
- free(Void_t* p);
- Release the chunk of memory pointed to by p, or no effect if p is null.
- realloc(Void_t* p, size_t n);
- Return a pointer to a chunk of size n that contains the same data
- as does chunk p up to the minimum of (n, p's size) bytes, or null
- if no space is available. The returned pointer may or may not be
- the same as p. If p is null, equivalent to malloc. Unless the
- #define realloc_ZERO_BYTES_FREES below is set, realloc with a
- size argument of zero (re)allocates a minimum-sized chunk.
- memalign(size_t alignment, size_t n);
- Return a pointer to a newly allocated chunk of n bytes, aligned
- in accord with the alignment argument, which must be a power of
- two.
- valloc(size_t n);
- Equivalent to memalign(pagesize, n), where pagesize is the page
- size of the system (or as near to this as can be figured out from
- all the includes/defines below.)
- pvalloc(size_t n);
- Equivalent to valloc(minimum-page-that-holds(n)), that is,
- round up n to nearest pagesize.
- calloc(size_t unit, size_t quantity);
- Returns a pointer to quantity * unit bytes, with all locations
- set to zero.
- cfree(Void_t* p);
- Equivalent to free(p).
- malloc_trim(size_t pad);
- Release all but pad bytes of freed top-most memory back
- to the system. Return 1 if successful, else 0.
- malloc_usable_size(Void_t* p);
- Report the number usable allocated bytes associated with allocated
- chunk p. This may or may not report more bytes than were requested,
- due to alignment and minimum size constraints.
- malloc_stats();
- Prints brief summary statistics on stderr.
- mallinfo()
- Returns (by copy) a struct containing various summary statistics.
- mallopt(int parameter_number, int parameter_value)
- Changes one of the tunable parameters described below. Returns
- 1 if successful in changing the parameter, else 0.
-
-* Vital statistics:
-
- Alignment: 8-byte
- 8 byte alignment is currently hardwired into the design. This
- seems to suffice for all current machines and C compilers.
-
- Assumed pointer representation: 4 or 8 bytes
- Code for 8-byte pointers is untested by me but has worked
- reliably by Wolfram Gloger, who contributed most of the
- changes supporting this.
-
- Assumed size_t representation: 4 or 8 bytes
- Note that size_t is allowed to be 4 bytes even if pointers are 8.
-
- Minimum overhead per allocated chunk: 4 or 8 bytes
- Each malloced chunk has a hidden overhead of 4 bytes holding size
- and status information.
-
- Minimum allocated size: 4-byte ptrs: 16 bytes (including 4 overhead)
- 8-byte ptrs: 24/32 bytes (including, 4/8 overhead)
-
- When a chunk is freed, 12 (for 4byte ptrs) or 20 (for 8 byte
- ptrs but 4 byte size) or 24 (for 8/8) additional bytes are
- needed; 4 (8) for a trailing size field
- and 8 (16) bytes for free list pointers. Thus, the minimum
- allocatable size is 16/24/32 bytes.
-
- Even a request for zero bytes (i.e., malloc(0)) returns a
- pointer to something of the minimum allocatable size.
-
- Maximum allocated size: 4-byte size_t: 2^31 - 8 bytes
- 8-byte size_t: 2^63 - 16 bytes
-
- It is assumed that (possibly signed) size_t bit values suffice to
- represent chunk sizes. `Possibly signed' is due to the fact
- that `size_t' may be defined on a system as either a signed or
- an unsigned type. To be conservative, values that would appear
- as negative numbers are avoided.
- Requests for sizes with a negative sign bit will return a
- minimum-sized chunk.
-
- Maximum overhead wastage per allocated chunk: normally 15 bytes
-
- Alignnment demands, plus the minimum allocatable size restriction
- make the normal worst-case wastage 15 bytes (i.e., up to 15
- more bytes will be allocated than were requested in malloc), with
- two exceptions:
- 1. Because requests for zero bytes allocate non-zero space,
- the worst case wastage for a request of zero bytes is 24 bytes.
- 2. For requests >= mmap_threshold that are serviced via
- mmap(), the worst case wastage is 8 bytes plus the remainder
- from a system page (the minimal mmap unit); typically 4096 bytes.
-
-* Limitations
-
- Here are some features that are NOT currently supported
-
- * No user-definable hooks for callbacks and the like.
- * No automated mechanism for fully checking that all accesses
- to malloced memory stay within their bounds.
- * No support for compaction.
-
-* Synopsis of compile-time options:
-
- People have reported using previous versions of this malloc on all
- versions of Unix, sometimes by tweaking some of the defines
- below. It has been tested most extensively on Solaris and
- Linux. It is also reported to work on WIN32 platforms.
- People have also reported adapting this malloc for use in
- stand-alone embedded systems.
-
- The implementation is in straight, hand-tuned ANSI C. Among other
- consequences, it uses a lot of macros. Because of this, to be at
- all usable, this code should be compiled using an optimizing compiler
- (for example gcc -O2) that can simplify expressions and control
- paths.
-
- __STD_C (default: derived from C compiler defines)
- Nonzero if using ANSI-standard C compiler, a C++ compiler, or
- a C compiler sufficiently close to ANSI to get away with it.
- DEBUG (default: NOT defined)
- Define to enable debugging. Adds fairly extensive assertion-based
- checking to help track down memory errors, but noticeably slows down
- execution.
- realloc_ZERO_BYTES_FREES (default: NOT defined)
- Define this if you think that realloc(p, 0) should be equivalent
- to free(p). Otherwise, since malloc returns a unique pointer for
- malloc(0), so does realloc(p, 0).
- HAVE_memcpy (default: defined)
- Define if you are not otherwise using ANSI STD C, but still
- have memcpy and memset in your C library and want to use them.
- Otherwise, simple internal versions are supplied.
- USE_memcpy (default: 1 if HAVE_memcpy is defined, 0 otherwise)
- Define as 1 if you want the C library versions of memset and
- memcpy called in realloc and calloc (otherwise macro versions are used).
- At least on some platforms, the simple macro versions usually
- outperform libc versions.
- HAVE_MMAP (default: defined as 1)
- Define to non-zero to optionally make malloc() use mmap() to
- allocate very large blocks.
- HAVE_MREMAP (default: defined as 0 unless Linux libc set)
- Define to non-zero to optionally make realloc() use mremap() to
- reallocate very large blocks.
- malloc_getpagesize (default: derived from system #includes)
- Either a constant or routine call returning the system page size.
- HAVE_USR_INCLUDE_malloc_H (default: NOT defined)
- Optionally define if you are on a system with a /usr/include/malloc.h
- that declares struct mallinfo. It is not at all necessary to
- define this even if you do, but will ensure consistency.
- INTERNAL_SIZE_T (default: size_t)
- Define to a 32-bit type (probably `unsigned int') if you are on a
- 64-bit machine, yet do not want or need to allow malloc requests of
- greater than 2^31 to be handled. This saves space, especially for
- very small chunks.
- INTERNAL_LINUX_C_LIB (default: NOT defined)
- Defined only when compiled as part of Linux libc.
- Also note that there is some odd internal name-mangling via defines
- (for example, internally, `malloc' is named `mALLOc') needed
- when compiling in this case. These look funny but don't otherwise
- affect anything.
- WIN32 (default: undefined)
- Define this on MS win (95, nt) platforms to compile in sbrk emulation.
- LACKS_UNISTD_H (default: undefined)
- Define this if your system does not have a <unistd.h>.
- MORECORE (default: sbrk)
- The name of the routine to call to obtain more memory from the system.
- MORECORE_FAILURE (default: -1)
- The value returned upon failure of MORECORE.
- MORECORE_CLEARS (default 0)
- True (1) if the routine mapped to MORECORE zeroes out memory (which
- holds for sbrk).
- DEFAULT_TRIM_THRESHOLD
- DEFAULT_TOP_PAD
- DEFAULT_MMAP_THRESHOLD
- DEFAULT_MMAP_MAX
- Default values of tunable parameters (described in detail below)
- controlling interaction with host system routines (sbrk, mmap, etc).
- These values may also be changed dynamically via mallopt(). The
- preset defaults are those that give best performance for typical
- programs/systems.
-
-
-*/
-
-
-
-
-/* Preliminaries */
-
-
-#ifndef __STD_C
-#ifdef __STDC__
-#define __STD_C 1
-#else
-#if __cplusplus
-#define __STD_C 1
-#else
-#define __STD_C 0
-#endif /*__cplusplus*/
-#endif /*__STDC__*/
-#endif /*__STD_C*/
-
-#ifndef Void_t
-#if __STD_C
-#define Void_t void
-#else
-#define Void_t char
-#endif
-#endif /*Void_t*/
-
-#define __MALLOC_H_INCLUDED
-
-#if __STD_C
-#include <stddef.h> /* for size_t */
-#else
-#include <sys/types.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/types.h>
-#include "cygmalloc.h"
-#define __INSIDE_CYGWIN__
-#include <stdio.h> /* needed for malloc_stats */
-#include <string.h>
-
-/*
- Compile-time options
-*/
-
-
-/*
- Debugging:
-
- Because freed chunks may be overwritten with link fields, this
- malloc will often die when freed memory is overwritten by user
- programs. This can be very effective (albeit in an annoying way)
- in helping track down dangling pointers.
-
- If you compile with -DDEBUG, a number of assertion checks are
- enabled that will catch more memory errors. You probably won't be
- able to make much sense of the actual assertion errors, but they
- should help you locate incorrectly overwritten memory. The
- checking is fairly extensive, and will slow down execution
- noticeably. Calling malloc_stats or mallinfo with DEBUG set will
- attempt to check every non-mmapped allocated and free chunk in the
- course of computing the summmaries. (By nature, mmapped regions
- cannot be checked very much automatically.)
-
- Setting DEBUG may also be helpful if you are trying to modify
- this code. The assertions in the check routines spell out in more
- detail the assumptions and invariants underlying the algorithms.
-
-*/
-
-#ifdef MALLOC_DEBUG
-#define DEBUG 1
-#define DEBUG1 1
-#define DEBUG2 1
-#define DEBUG3 1
-#endif
-
-#if DEBUG
-#include <assert.h>
-#else
-#define assert(x) ((void)0)
-#endif
-
-/*
- INTERNAL_SIZE_T is the word-size used for internal bookkeeping
- of chunk sizes. On a 64-bit machine, you can reduce malloc
- overhead by defining INTERNAL_SIZE_T to be a 32 bit `unsigned int'
- at the expense of not being able to handle requests greater than
- 2^31. This limitation is hardly ever a concern; you are encouraged
- to set this. However, the default version is the same as size_t.
-*/
-
-#ifndef INTERNAL_SIZE_T
-#define INTERNAL_SIZE_T size_t
-#endif
-
-/*
- realloc_ZERO_BYTES_FREES should be set if a call to
- realloc with zero bytes should be the same as a call to free.
- Some people think it should. Otherwise, since this malloc
- returns a unique pointer for malloc(0), so does realloc(p, 0).
-*/
-
-
-/* #define realloc_ZERO_BYTES_FREES */
-
-
-/*
- WIN32 causes an emulation of sbrk to be compiled in
- mmap-based options are not currently supported in WIN32.
-*/
-
-/* #define WIN32 */
-#ifdef WIN32
-#define MORECORE wsbrk
-#define HAVE_MMAP 0
-#endif
-
-
-/*
- HAVE_memcpy should be defined if you are not otherwise using
- ANSI STD C, but still have memcpy and memset in your C library
- and want to use them in calloc and realloc. Otherwise simple
- macro versions are defined here.
-
- USE_memcpy should be defined as 1 if you actually want to
- have memset and memcpy called. People report that the macro
- versions are often enough faster than libc versions on many
- systems that it is better to use them.
-
-*/
-
-#define HAVE_memcpy
-
-#ifndef USE_memcpy
-#ifdef HAVE_memcpy
-#define USE_memcpy 1
-#else
-#define USE_memcpy 0
-#endif
-#endif
-
-#if (__STD_C || defined(HAVE_memcpy))
-
-#if __STD_C
-void* memset(void*, int, size_t);
-void* memcpy(void*, const void*, size_t);
-#else
-Void_t* memset();
-Void_t* memcpy();
-#endif
-#endif
-
-#ifndef DEBUG3
-
-#if USE_memcpy
-
-/* The following macros are only invoked with (2n+1)-multiples of
- INTERNAL_SIZE_T units, with a positive integer n. This is exploited
- for fast inline execution when n is small. */
-
-#define malloc_ZERO(charp, nbytes) \
-do { \
- INTERNAL_SIZE_T mzsz = (nbytes); \
- if(mzsz <= 9*sizeof(mzsz)) { \
- INTERNAL_SIZE_T* mz = (INTERNAL_SIZE_T*) (charp); \
- if(mzsz >= 5*sizeof(mzsz)) { *mz++ = 0; \
- *mz++ = 0; \
- if(mzsz >= 7*sizeof(mzsz)) { *mz++ = 0; \
- *mz++ = 0; \
- if(mzsz >= 9*sizeof(mzsz)) { *mz++ = 0; \
- *mz++ = 0; }}} \
- *mz++ = 0; \
- *mz++ = 0; \
- *mz = 0; \
- } else memset((charp), 0, mzsz); \
-} while(0)
-
-#define malloc_COPY(dest,src,nbytes) \
-do { \
- INTERNAL_SIZE_T mcsz = (nbytes); \
- if(mcsz <= 9*sizeof(mcsz)) { \
- INTERNAL_SIZE_T* mcsrc = (INTERNAL_SIZE_T*) (src); \
- INTERNAL_SIZE_T* mcdst = (INTERNAL_SIZE_T*) (dest); \
- if(mcsz >= 5*sizeof(mcsz)) { *mcdst++ = *mcsrc++; \
- *mcdst++ = *mcsrc++; \
- if(mcsz >= 7*sizeof(mcsz)) { *mcdst++ = *mcsrc++; \
- *mcdst++ = *mcsrc++; \
- if(mcsz >= 9*sizeof(mcsz)) { *mcdst++ = *mcsrc++; \
- *mcdst++ = *mcsrc++; }}} \
- *mcdst++ = *mcsrc++; \
- *mcdst++ = *mcsrc++; \
- *mcdst = *mcsrc ; \
- } else memcpy(dest, src, mcsz); \
-} while(0)
-
-#else /* !USE_memcpy */
-
-/* Use Duff's device for good zeroing/copying performance. */
-
-#define malloc_ZERO(charp, nbytes) \
-do { \
- INTERNAL_SIZE_T* mzp = (INTERNAL_SIZE_T*)(charp); \
- long mctmp = (nbytes)/sizeof(INTERNAL_SIZE_T), mcn; \
- if (mctmp < 8) mcn = 0; else { mcn = (mctmp-1)/8; mctmp %= 8; } \
- switch (mctmp) { \
- case 0: for(;;) { *mzp++ = 0; \
- case 7: *mzp++ = 0; \
- case 6: *mzp++ = 0; \
- case 5: *mzp++ = 0; \
- case 4: *mzp++ = 0; \
- case 3: *mzp++ = 0; \
- case 2: *mzp++ = 0; \
- case 1: *mzp++ = 0; if(mcn <= 0) break; mcn--; } \
- } \
-} while(0)
-
-#define malloc_COPY(dest,src,nbytes) \
-do { \
- INTERNAL_SIZE_T* mcsrc = (INTERNAL_SIZE_T*) src; \
- INTERNAL_SIZE_T* mcdst = (INTERNAL_SIZE_T*) dest; \
- long mctmp = (nbytes)/sizeof(INTERNAL_SIZE_T), mcn; \
- if (mctmp < 8) mcn = 0; else { mcn = (mctmp-1)/8; mctmp %= 8; } \
- switch (mctmp) { \
- case 0: for(;;) { *mcdst++ = *mcsrc++; \
- case 7: *mcdst++ = *mcsrc++; \
- case 6: *mcdst++ = *mcsrc++; \
- case 5: *mcdst++ = *mcsrc++; \
- case 4: *mcdst++ = *mcsrc++; \
- case 3: *mcdst++ = *mcsrc++; \
- case 2: *mcdst++ = *mcsrc++; \
- case 1: *mcdst++ = *mcsrc++; if(mcn <= 0) break; mcn--; } \
- } \
-} while(0)
-
-#endif
-
-#else /* DEBUG3 */
-
-/* The trailing moat invalidates the above prediction about the nbytes
- parameter to malloc_ZERO and malloc_COPY. */
-
-#define malloc_ZERO(charp, nbytes) \
-do { \
- char *mzp = (char *)(charp); \
- long mzn = (nbytes); \
- while (mzn--) \
- *mzp++ = '\0'; \
-} while(0)
-
-#define malloc_COPY(dest,src,nbytes) \
-do { \
- char *mcsrc = (char *)(src); \
- char *mcdst = (char *)(dest); \
- long mcn = (nbytes); \
- while (mcn--) \
- *mcdst++ = *mcsrc++; \
-} while(0)
-
-#endif /* DEBUG3 */
-
-/*
- Define HAVE_MMAP to optionally make malloc() use mmap() to
- allocate very large blocks. These will be returned to the
- operating system immediately after a free().
-*/
-
-#ifndef HAVE_MMAP
-#define HAVE_MMAP 1
-#endif
-
-/*
- Define HAVE_MREMAP to make realloc() use mremap() to re-allocate
- large blocks. This is currently only possible on Linux with
- kernel versions newer than 1.3.77.
-*/
-
-#ifndef HAVE_MREMAP
-#ifdef INTERNAL_LINUX_C_LIB
-#define HAVE_MREMAP 1
-#else
-#define HAVE_MREMAP 0
-#endif
-#endif
-
-#if HAVE_MMAP
-
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-
-#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
-#define MAP_ANONYMOUS MAP_ANON
-#endif
-
-#endif /* HAVE_MMAP */
-
-/*
- Access to system page size. To the extent possible, this malloc
- manages memory from the system in page-size units.
-
- The following mechanics for getpagesize were adapted from
- bsd/gnu getpagesize.h
-*/
-
-#ifndef LACKS_UNISTD_H
-# include <unistd.h>
-#endif
-
-#ifndef malloc_getpagesize
-# ifdef _SC_PAGESIZE /* some SVR4 systems omit an underscore */
-# ifndef _SC_PAGE_SIZE
-# define _SC_PAGE_SIZE _SC_PAGESIZE
-# endif
-# endif
-# ifdef _SC_PAGE_SIZE
-# define malloc_getpagesize sysconf(_SC_PAGE_SIZE)
-# else
-# if defined(BSD) || defined(DGUX) || defined(HAVE_GETPAGESIZE)
-# if __STD_C
- extern size_t getpagesize(void);
-# else
- extern size_t getpagesize();
-# endif
-# define malloc_getpagesize getpagesize()
-# else
-# include <sys/param.h>
-# ifdef EXEC_PAGESIZE
-# define malloc_getpagesize EXEC_PAGESIZE
-# else
-# ifdef NBPG
-# ifndef CLSIZE
-# define malloc_getpagesize NBPG
-# else
-# define malloc_getpagesize (NBPG * CLSIZE)
-# endif
-# else
-# ifdef NBPC
-# define malloc_getpagesize NBPC
-# else
-# ifdef PAGESIZE
-# define malloc_getpagesize PAGESIZE
-# else
-# define malloc_getpagesize (4096) /* just guess */
-# endif
-# endif
-# endif
-# endif
-# endif
-# endif
-#endif
-
-
-
-/*
-
- This version of malloc supports the standard SVID/XPG mallinfo
- routine that returns a struct containing the same kind of
- information you can get from malloc_stats. It should work on
- any SVID/XPG compliant system that has a /usr/include/malloc.h
- defining struct mallinfo. (If you'd like to install such a thing
- yourself, cut out the preliminary declarations as described above
- and below and save them in a malloc.h file. But there's no
- compelling reason to bother to do this.)
-
- The main declaration needed is the mallinfo struct that is returned
- (by-copy) by mallinfo(). The SVID/XPG malloinfo struct contains a
- bunch of fields, most of which are not even meaningful in this
- version of malloc. Some of these fields are are instead filled by
- mallinfo() with other numbers that might possibly be of interest.
-
- HAVE_USR_INCLUDE_malloc_H should be set if you have a
- /usr/include/malloc.h file that includes a declaration of struct
- mallinfo. If so, it is included; else an SVID2/XPG2 compliant
- version is declared below. These must be precisely the same for
- mallinfo() to work.
-
-*/
-
-/* #define HAVE_USR_INCLUDE_malloc_H */
-
-#if HAVE_USR_INCLUDE_malloc_H
-#include "/usr/include/malloc.h"
-#else
-
-/* SVID2/XPG mallinfo structure */
-
-struct mallinfo {
- int arena; /* total space allocated from system */
- int ordblks; /* number of non-inuse chunks */
- int smblks; /* unused -- always zero */
- int hblks; /* number of mmapped regions */
- int hblkhd; /* total space in mmapped regions */
- int usmblks; /* unused -- always zero */
- int fsmblks; /* unused -- always zero */
- int uordblks; /* total allocated space */
- int fordblks; /* total non-inuse space */
- int keepcost; /* top-most, releasable (via malloc_trim) space */
-};
-
-/* SVID2/XPG mallopt options */
-
-#define M_MXFAST 1 /* UNUSED in this malloc */
-#define M_NLBLKS 2 /* UNUSED in this malloc */
-#define M_GRAIN 3 /* UNUSED in this malloc */
-#define M_KEEP 4 /* UNUSED in this malloc */
-
-#endif
-
-/* mallopt options that actually do something */
-
-#define M_TRIM_THRESHOLD -1
-#define M_TOP_PAD -2
-#define M_MMAP_THRESHOLD -3
-#define M_MMAP_MAX -4
-#define M_SCANHEAP -5
-#define M_FILL
-
-
-
-#ifndef DEFAULT_TRIM_THRESHOLD
-#define DEFAULT_TRIM_THRESHOLD (128 * 1024)
-#endif
-
-/*
- M_TRIM_THRESHOLD is the maximum amount of unused top-most memory
- to keep before releasing via malloc_trim in free().
-
- Automatic trimming is mainly useful in long-lived programs.
- Because trimming via sbrk can be slow on some systems, and can
- sometimes be wasteful (in cases where programs immediately
- afterward allocate more large chunks) the value should be high
- enough so that your overall system performance would improve by
- releasing.
-
- The trim threshold and the mmap control parameters (see below)
- can be traded off with one another. Trimming and mmapping are
- two different ways of releasing unused memory back to the
- system. Between these two, it is often possible to keep
- system-level demands of a long-lived program down to a bare
- minimum. For example, in one test suite of sessions measuring
- the XF86 X server on Linux, using a trim threshold of 128K and a
- mmap threshold of 192K led to near-minimal long term resource
- consumption.
-
- If you are using this malloc in a long-lived program, it should
- pay to experiment with these values. As a rough guide, you
- might set to a value close to the average size of a process
- (program) running on your system. Releasing this much memory
- would allow such a process to run in memory. Generally, it's
- worth it to tune for trimming rather tham memory mapping when a
- program undergoes phases where several large chunks are
- allocated and released in ways that can reuse each other's
- storage, perhaps mixed with phases where there are no such
- chunks at all. And in well-behaved long-lived programs,
- controlling release of large blocks via trimming versus mapping
- is usually faster.
-
- However, in most programs, these parameters serve mainly as
- protection against the system-level effects of carrying around
- massive amounts of unneeded memory. Since frequent calls to
- sbrk, mmap, and munmap otherwise degrade performance, the default
- parameters are set to relatively high values that serve only as
- safeguards.
-
- The default trim value is high enough to cause trimming only in
- fairly extreme (by current memory consumption standards) cases.
- It must be greater than page size to have any useful effect. To
- disable trimming completely, you can set to (unsigned long)(-1);
-
-
-*/
-
-
-#ifndef DEFAULT_TOP_PAD
-#define DEFAULT_TOP_PAD (0)
-#endif
-
-/*
- M_TOP_PAD is the amount of extra `padding' space to allocate or
- retain whenever sbrk is called. It is used in two ways internally:
-
- * When sbrk is called to extend the top of the arena to satisfy
- a new malloc request, this much padding is added to the sbrk
- request.
-
- * When malloc_trim is called automatically from free(),
- it is used as the `pad' argument.
-
- In both cases, the actual amount of padding is rounded
- so that the end of the arena is always a system page boundary.
-
- The main reason for using padding is to avoid calling sbrk so
- often. Having even a small pad greatly reduces the likelihood
- that nearly every malloc request during program start-up (or
- after trimming) will invoke sbrk, which needlessly wastes
- time.
-
- Automatic rounding-up to page-size units is normally sufficient
- to avoid measurable overhead, so the default is 0. However, in
- systems where sbrk is relatively slow, it can pay to increase
- this value, at the expense of carrying around more memory than
- the program needs.
-
-*/
-
-
-#ifndef DEFAULT_MMAP_THRESHOLD
-#define DEFAULT_MMAP_THRESHOLD (128 * 1024)
-#endif
-
-/*
-
- M_MMAP_THRESHOLD is the request size threshold for using mmap()
- to service a request. Requests of at least this size that cannot
- be allocated using already-existing space will be serviced via mmap.
- (If enough normal freed space already exists it is used instead.)
-
- Using mmap segregates relatively large chunks of memory so that
- they can be individually obtained and released from the host
- system. A request serviced through mmap is never reused by any
- other request (at least not directly; the system may just so
- happen to remap successive requests to the same locations).
-
- Segregating space in this way has the benefit that mmapped space
- can ALWAYS be individually released back to the system, which
- helps keep the system level memory demands of a long-lived
- program low. Mapped memory can never become `locked' between
- other chunks, as can happen with normally allocated chunks, which
- menas that even trimming via malloc_trim would not release them.
-
- However, it has the disadvantages that:
-
- 1. The space cannot be reclaimed, consolidated, and then
- used to service later requests, as happens with normal chunks.
- 2. It can lead to more wastage because of mmap page alignment
- requirements
- 3. It causes malloc performance to be more dependent on host
- system memory management support routines which may vary in
- implementation quality and may impose arbitrary
- limitations. Generally, servicing a request via normal
- malloc steps is faster than going through a system's mmap.
-
- All together, these considerations should lead you to use mmap
- only for relatively large requests.
-
-
-*/
-
-
-
-#ifndef DEFAULT_MMAP_MAX
-#if HAVE_MMAP
-#define DEFAULT_MMAP_MAX (64)
-#else
-#define DEFAULT_MMAP_MAX (0)
-#endif
-#endif
-
-/*
- M_MMAP_MAX is the maximum number of requests to simultaneously
- service using mmap. This parameter exists because:
-
- 1. Some systems have a limited number of internal tables for
- use by mmap.
- 2. In most systems, overreliance on mmap can degrade overall
- performance.
- 3. If a program allocates many large regions, it is probably
- better off using normal sbrk-based allocation routines that
- can reclaim and reallocate normal heap memory. Using a
- small value allows transition into this mode after the
- first few allocations.
-
- Setting to 0 disables all use of mmap. If HAVE_MMAP is not set,
- the default value is 0, and attempts to set it to non-zero values
- in mallopt will fail.
-*/
-
-
-
-
-/*
-
- Special defines for linux libc
-
- Except when compiled using these special defines for Linux libc
- using weak aliases, this malloc is NOT designed to work in
- multithreaded applications. No semaphores or other concurrency
- control are provided to ensure that multiple malloc or free calls
- don't run at the same time, which could be disasterous. A single
- semaphore could be used across malloc, realloc, and free (which is
- essentially the effect of the linux weak alias approach). It would
- be hard to obtain finer granularity.
-
-*/
-
-
-#ifdef INTERNAL_LINUX_C_LIB
-
-#if __STD_C
-
-Void_t * __default_morecore_init (ptrdiff_t);
-Void_t *(*__morecore)(ptrdiff_t) = __default_morecore_init;
-
-#else
-
-Void_t * __default_morecore_init ();
-Void_t *(*__morecore)() = __default_morecore_init;
-
-#endif
-
-#define MORECORE (*__morecore)
-#define MORECORE_FAILURE 0
-#define MORECORE_CLEARS 1
-
-#else /* INTERNAL_LINUX_C_LIB */
-
-#if __STD_C
-/* extern Void_t* sbrk(ptrdiff_t);*/
-#else
-extern Void_t* sbrk();
-#endif
-
-#ifndef MORECORE
-#define MORECORE sbrk
-#endif
-
-#ifndef MORECORE_FAILURE
-#define MORECORE_FAILURE -1
-#endif
-
-#ifndef MORECORE_CLEARS
-#define MORECORE_CLEARS 0
-#endif
-
-#endif /* INTERNAL_LINUX_C_LIB */
-
-#if defined(INTERNAL_LINUX_C_LIB) && defined(__ELF__)
-
-#define cALLOc __libc_calloc
-#define fREe __libc_free
-#define mALLOc __libc_malloc
-#define mEMALIGn __libc_memalign
-#define rEALLOc __libc_realloc
-#define vALLOc __libc_valloc
-#define pvALLOc __libc_pvalloc
-#define mALLINFo __libc_mallinfo
-#define mALLOPt __libc_mallopt
-
-#pragma weak calloc = __libc_calloc
-#pragma weak free = __libc_free
-#pragma weak cfree = __libc_free
-#pragma weak malloc = __libc_malloc
-#pragma weak memalign = __libc_memalign
-#pragma weak realloc = __libc_realloc
-#pragma weak valloc = __libc_valloc
-#pragma weak pvalloc = __libc_pvalloc
-#pragma weak mallinfo = __libc_mallinfo
-#pragma weak mallopt = __libc_mallopt
-
-#else
-
-#ifndef cALLOc
-#define cALLOc dlcalloc
-#endif
-#ifndef fREe
-#define fREe dlfree
-#endif
-#ifndef mALLOc
-#define mALLOc dlmalloc
-#endif
-#ifndef mEMALIGn
-#define mEMALIGn dlmemalign
-#endif
-#ifndef rEALLOc
-#define rEALLOc dlrealloc
-#endif
-#ifndef vALLOc
-#define vALLOc dlvalloc
-#endif
-#ifndef pvALLOc
-#define pvALLOc dlpvalloc
-#endif
-#ifndef mALLINFo
-#define mALLINFo dlmallinfo
-#endif
-#ifndef mALLOPt
-#define mALLOPt dlmallopt
-#endif
-
-#endif
-
-/* Public routines */
-
-#ifdef DEBUG2
-#define malloc(size) malloc_dbg(size, __FILE__, __LINE__)
-#define free(p) free_dbg(p, __FILE__, __LINE__)
-#define realloc(p, size) realloc_dbg(p, size, __FILE__, __LINE__)
-#define calloc(n, size) calloc_dbg(n, size, __FILE__, __LINE__)
-#define memalign(align, size) memalign_dbg(align, size, __FILE__, __LINE__)
-#define valloc(size) valloc_dbg(size, __FILE__, __LINE__)
-#define pvalloc(size) pvalloc_dbg(size, __FILE__, __LINE__)
-#define malloc_trim(pad) malloc_trim_dbg(pad, __FILE__, __LINE__)
-#define malloc_usable_size(p) malloc_usable_size_dbg(p, __FILE__, __LINE__)
-#define malloc_stats(void) malloc_stats_dbg(__FILE__, __LINE__)
-#define mallopt(flag, val) mallopt_dbg(flag, val, __FILE__, __LINE__)
-#define mallinfo(void) mallinfo_dbg(__FILE__, __LINE__)
-
-#if __STD_C
-Void_t* malloc_dbg(size_t, const char *, int);
-void free_dbg(Void_t*, const char *, int);
-Void_t* realloc_dbg(Void_t*, size_t, const char *, int);
-Void_t* calloc_dbg(size_t, size_t, const char *, int);
-Void_t* memalign_dbg(size_t, size_t, const char *, int);
-Void_t* valloc_dbg(size_t, const char *, int);
-Void_t* pvalloc_dbg(size_t, const char *, int);
-int malloc_trim_dbg(size_t, const char *, int);
-size_t malloc_usable_size_dbg(Void_t*, const char *, int);
-void malloc_stats_dbg(const char *, int);
-int mallopt_dbg(int, int, const char *, int);
-struct mallinfo mallinfo_dbg(const char *, int);
-#else
-Void_t* malloc_dbg();
-void free_dbg();
-Void_t* realloc_dbg();
-Void_t* calloc_dbg();
-Void_t* memalign_dbg();
-Void_t* valloc_dbg();
-Void_t* pvalloc_dbg();
-int malloc_trim_dbg();
-size_t malloc_usable_size_dbg();
-void malloc_stats_dbg();
-int mallopt_dbg();
-struct mallinfo mallinfo_dbg();
-#endif /* !__STD_C */
-
-#else /* !DEBUG2 */
-
-#if __STD_C
-
-Void_t* mALLOc(size_t);
-void fREe(Void_t*);
-Void_t* rEALLOc(Void_t*, size_t);
-Void_t* cALLOc(size_t, size_t);
-Void_t* mEMALIGn(size_t, size_t);
-Void_t* vALLOc(size_t);
-Void_t* pvALLOc(size_t);
-int malloc_trim(size_t);
-size_t malloc_usable_size(Void_t*);
-void malloc_stats(void);
-int mALLOPt(int, int);
-struct mallinfo mALLINFo(void);
-#else
-Void_t* mALLOc();
-void fREe();
-Void_t* rEALLOc();
-Void_t* cALLOc();
-Void_t* mEMALIGn();
-Void_t* vALLOc();
-Void_t* pvALLOc();
-int malloc_trim();
-size_t malloc_usable_size();
-void malloc_stats();
-int mALLOPt();
-struct mallinfo mALLINFo();
-#endif
-#endif /* !DEBUG2 */
-
-#ifdef __cplusplus
-}; /* end of extern "C" */
-#endif
-
-/* ---------- To make a malloc.h, end cutting here ------------ */
-
-#ifdef DEBUG2
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#undef malloc
-#undef free
-#undef realloc
-#undef calloc
-#undef memalign
-#undef valloc
-#undef pvalloc
-#undef malloc_trim
-#undef malloc_usable_size
-#undef malloc_stats
-#undef mallopt
-#undef mallinfo
-
-#if __STD_C
-Void_t* mALLOc(size_t);
-void fREe(Void_t*);
-Void_t* rEALLOc(Void_t*, size_t);
-Void_t* cALLOc(size_t, size_t);
-Void_t* mEMALIGn(size_t, size_t);
-Void_t* vALLOc(size_t);
-Void_t* pvALLOc(size_t);
-int malloc_trim(size_t);
-size_t malloc_usable_size(Void_t*);
-void malloc_stats(void);
-int mALLOPt(int, int);
-struct mallinfo mALLINFo(void);
-#else
-Void_t* mALLOc();
-void fREe();
-Void_t* rEALLOc();
-Void_t* cALLOc();
-Void_t* mEMALIGn();
-Void_t* vALLOc();
-Void_t* pvALLOc();
-int malloc_trim();
-size_t malloc_usable_size();
-void malloc_stats();
-int mALLOPt();
-struct mallinfo mALLINFo();
-#endif
-
-#include <ctype.h> /* isprint() */
-#ifdef DEBUG3
-#include <stdlib.h> /* atexit() */
-#endif
-
-#ifdef __cplusplus
-}; /* end of extern "C" */
-#endif
-
-#endif /* DEBUG2 */
-
-/*
- Emulation of sbrk for WIN32
- All code within the ifdef WIN32 is untested by me.
-*/
-
-
-#ifdef WIN32
-
-#define AlignPage(add) (((add) + (malloc_getpagesize-1)) & \
- ~(malloc_getpagesize-1))
-
-/* resrve 64MB to insure large contiguous space */
-#define RESERVED_SIZE (1024*1024*64)
-#define NEXT_SIZE (2048*1024)
-#define TOP_MEMORY ((unsigned long)2*1024*1024*1024)
-
-struct GmListElement;
-typedef struct GmListElement GmListElement;
-
-struct GmListElement
-{
- GmListElement* next;
- void* base;
-};
-
-static GmListElement* head = 0;
-static unsigned int gNextAddress = 0;
-static unsigned int gAddressBase = 0;
-static unsigned int gAllocatedSize = 0;
-
-static
-GmListElement* makeGmListElement (void* bas)
-{
- GmListElement* this;
- this = (GmListElement*)(void*)LocalAlloc (0, sizeof (GmListElement));
- ASSERT (this);
- if (this)
- {
- this->base = bas;
- this->next = head;
- head = this;
- }
- return this;
-}
-
-void gcleanup ()
-{
- BOOL rval;
- ASSERT ( (head == NULL) || (head->base == (void*)gAddressBase));
- if (gAddressBase && (gNextAddress - gAddressBase))
- {
- rval = VirtualFree ((void*)gAddressBase,
- gNextAddress - gAddressBase,
- MEM_DECOMMIT);
- ASSERT (rval);
- }
- while (head)
- {
- GmListElement* next = head->next;
- rval = VirtualFree (head->base, 0, MEM_RELEASE);
- ASSERT (rval);
- LocalFree (head);
- head = next;
- }
-}
-
-static
-void* findRegion (void* start_address, unsigned long size)
-{
- MEMORY_BASIC_INFORMATION info;
- while ((unsigned long)start_address < TOP_MEMORY)
- {
- VirtualQuery (start_address, &info, sizeof (info));
- if (info.State != MEM_FREE)
- start_address = (char*)info.BaseAddress + info.RegionSize;
- else if (info.RegionSize >= size)
- return start_address;
- else
- start_address = (char*)info.BaseAddress + info.RegionSize;
- }
- return NULL;
-
-}
-
-
-void* wsbrk (long size)
-{
- void* tmp;
- if (size > 0)
- {
- if (gAddressBase == 0)
- {
- gAllocatedSize = max (RESERVED_SIZE, AlignPage (size));
- gNextAddress = gAddressBase =
- (unsigned int)VirtualAlloc (NULL, gAllocatedSize,
- MEM_RESERVE, PAGE_NOACCESS);
- } else if (AlignPage (gNextAddress + size) > (gAddressBase +
-gAllocatedSize))
- {
- long new_size = max (NEXT_SIZE, AlignPage (size));
- void* new_address = (void*)(gAddressBase+gAllocatedSize);
- do
- {
- new_address = findRegion (new_address, new_size);
-
- if (new_address == 0)
- return (void*)-1;
-
- gAddressBase = gNextAddress =
- (unsigned int)VirtualAlloc (new_address, new_size,
- MEM_RESERVE, PAGE_NOACCESS);
- // repeat in case of race condition
- // The region that we found has been snagged
- // by another thread
- }
- while (gAddressBase == 0);
-
- ASSERT (new_address == (void*)gAddressBase);
-
- gAllocatedSize = new_size;
-
- if (!makeGmListElement ((void*)gAddressBase))
- return (void*)-1;
- }
- if ((size + gNextAddress) > AlignPage (gNextAddress))
- {
- void* res;
- res = VirtualAlloc ((void*)AlignPage (gNextAddress),
- (size + gNextAddress -
- AlignPage (gNextAddress)),
- MEM_COMMIT, PAGE_READWRITE);
- if (res == 0)
- return (void*)-1;
- }
- tmp = (void*)gNextAddress;
- gNextAddress = (unsigned int)tmp + size;
- return tmp;
- }
- else if (size < 0)
- {
- unsigned int alignedGoal = AlignPage (gNextAddress + size);
- /* Trim by releasing the virtual memory */
- if (alignedGoal >= gAddressBase)
- {
- VirtualFree ((void*)alignedGoal, gNextAddress - alignedGoal,
- MEM_DECOMMIT);
- gNextAddress = gNextAddress + size;
- return (void*)gNextAddress;
- }
- else
- {
- VirtualFree ((void*)gAddressBase, gNextAddress - gAddressBase,
- MEM_DECOMMIT);
- gNextAddress = gAddressBase;
- return (void*)-1;
- }
- }
- else
- {
- return (void*)gNextAddress;
- }
-}
-
-#endif
-
-
-
-/*
- Type declarations
-*/
-
-#ifdef DEBUG3
-# define MOATWIDTH 4 /* number of guard bytes at each end of
- allocated region */
-# define MOATFILL 5 /* moat fill character */
-# define ALLOCFILL 1 /* fill char for allocated */
-# define FREEFILL 2 /* and freed regions */
-#endif
-
-typedef struct malloc_chunk
-{
- INTERNAL_SIZE_T prev_size; /* Size of previous chunk (if free). */
- INTERNAL_SIZE_T size; /* Size in bytes, including overhead. */
- struct malloc_chunk* fd; /* double links -- used only if free. */
- struct malloc_chunk* bk;
-#ifdef DEBUG3
- const char *file; /* file and */
- int line; /* line number of [re]allocation */
- size_t pad; /* nr pad bytes at mem end, excluding moat */
- int alloced; /* whether the chunk is allocated -- less prone
- to segv than inuse(chunk) */
- char moat[MOATWIDTH]; /* actual leading moat is last MOATWIDTH bytes
- of chunk header; those bytes may follow this
- field due to header alignment padding */
-#endif
-} Chunk;
-
-typedef Chunk* mchunkptr;
-
-/*
-
- malloc_chunk details:
-
- (The following includes lightly edited explanations by Colin Plumb.)
-
- Chunks of memory are maintained using a `boundary tag' method as
- described in e.g., Knuth or Standish. (See the paper by Paul
- Wilson ftp://ftp.cs.utexas.edu/pub/garbage/allocsrv.ps for a
- survey of such techniques.) Sizes of free chunks are stored both
- in the front of each chunk and at the end. This makes
- consolidating fragmented chunks into bigger chunks very fast. The
- size fields also hold bits representing whether chunks are free or
- in use.
-
- An allocated chunk looks like this:
-
-
- chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Size of previous chunk, if allocated | |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Size of chunk, in bytes |P|
- mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | User data starts here... .
- . .
- . (malloc_usable_space() bytes) .
- . |
-nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Size of chunk |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
-
- Where "chunk" is the front of the chunk for the purpose of most of
- the malloc code, but "mem" is the pointer that is returned to the
- user. "Nextchunk" is the beginning of the next contiguous chunk.
-
- Chunks always begin on even word boundries, so the mem portion
- (which is returned to the user) is also on an even word boundary, and
- thus double-word aligned.
-
- Free chunks are stored in circular doubly-linked lists, and look like this:
-
- chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Size of previous chunk |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- `head:' | Size of chunk, in bytes |P|
- mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Forward pointer to next chunk in list |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Back pointer to previous chunk in list |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Unused space (may be 0 bytes long) .
- . .
- . |
-nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- `foot:' | Size of chunk, in bytes |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
- The P (PREV_INUSE) bit, stored in the unused low-order bit of the
- chunk size (which is always a multiple of two words), is an in-use
- bit for the *previous* chunk. If that bit is *clear*, then the
- word before the current chunk size contains the previous chunk
- size, and can be used to find the front of the previous chunk.
- (The very first chunk allocated always has this bit set,
- preventing access to non-existent (or non-owned) memory.)
-
- Note that the `foot' of the current chunk is actually represented
- as the prev_size of the NEXT chunk. (This makes it easier to
- deal with alignments etc).
-
- The two exceptions to all this are
-
- 1. The special chunk `top', which doesn't bother using the
- trailing size field since there is no
- next contiguous chunk that would have to index off it. (After
- initialization, `top' is forced to always exist. If it would
- become less than MINSIZE bytes long, it is replenished via
- malloc_extend_top.)
-
- 2. Chunks allocated via mmap, which have the second-lowest-order
- bit (IS_MMAPPED) set in their size fields. Because they are
- never merged or traversed from any other chunk, they have no
- foot size or inuse information.
-
- Available chunks are kept in any of several places (all declared below):
-
- * `av': An array of chunks serving as bin headers for consolidated
- chunks. Each bin is doubly linked. The bins are approximately
- proportionally (log) spaced. There are a lot of these bins
- (128). This may look excessive, but works very well in
- practice. All procedures maintain the invariant that no
- consolidated chunk physically borders another one. Chunks in
- bins are kept in size order, with ties going to the
- approximately least recently used chunk.
-
- The chunks in each bin are maintained in decreasing sorted order by
- size. This is irrelevant for the small bins, which all contain
- the same-sized chunks, but facilitates best-fit allocation for
- larger chunks. (These lists are just sequential. Keeping them in
- order almost never requires enough traversal to warrant using
- fancier ordered data structures.) Chunks of the same size are
- linked with the most recently freed at the front, and allocations
- are taken from the back. This results in LRU or FIFO allocation
- order, which tends to give each chunk an equal opportunity to be
- consolidated with adjacent freed chunks, resulting in larger free
- chunks and less fragmentation.
-
- * `top': The top-most available chunk (i.e., the one bordering the
- end of available memory) is treated specially. It is never
- included in any bin, is used only if no other chunk is
- available, and is released back to the system if it is very
- large (see M_TRIM_THRESHOLD).
-
- * `last_remainder': A bin holding only the remainder of the
- most recently split (non-top) chunk. This bin is checked
- before other non-fitting chunks, so as to provide better
- locality for runs of sequentially allocated chunks.
-
- * Implicitly, through the host system's memory mapping tables.
- If supported, requests greater than a threshold are usually
- serviced via calls to mmap, and then later released via munmap.
-
-*/
-
-
-
-
-
-
-/* sizes, alignments */
-
-#define SIZE_SZ sizeof(INTERNAL_SIZE_T)
-#define ALIGNMENT (SIZE_SZ + SIZE_SZ)
-#define ALIGN_MASK (ALIGNMENT - 1)
-#ifndef DEBUG3
-# define MEMOFFSET (2*SIZE_SZ)
-# define OVERHEAD SIZE_SZ
-# define MMAP_EXTRA SIZE_SZ /* for correct alignment */
-# define MINSIZE sizeof(Chunk)
-#else
-typedef union {
- char strut[(sizeof(Chunk) - 1) / ALIGNMENT + 1][ALIGNMENT];
- Chunk chunk;
-} PaddedChunk;
-# define MEMOFFSET sizeof(PaddedChunk)
-# define OVERHEAD (MEMOFFSET + MOATWIDTH)
-# define MMAP_EXTRA 0
-# define MINSIZE ((OVERHEAD + ALIGN_MASK) & ~ALIGN_MASK)
-#endif
-
-/* conversion from malloc headers to user pointers, and back */
-
-#define chunk2mem(p) ((Void_t*)((char*)(p) + MEMOFFSET))
-#define mem2chunk(mem) ((mchunkptr)((char*)(mem) - MEMOFFSET))
-
-/* pad request bytes into a usable size, including overhead */
-
-#define request2size(req) \
- ((long)((req) + OVERHEAD) < (long)MINSIZE ? MINSIZE : \
- ((req) + OVERHEAD + ALIGN_MASK) & ~ALIGN_MASK)
-
-/* Check if m has acceptable alignment */
-
-#define aligned_OK(m) (((unsigned long)((m)) & ALIGN_MASK) == 0)
-
-
-
-
-/*
- Physical chunk operations
-*/
-
-
-/* size field is or'ed with PREV_INUSE when previous adjacent chunk in use */
-
-#define PREV_INUSE 0x1
-
-/* size field is or'ed with IS_MMAPPED if the chunk was obtained with mmap() */
-
-#define IS_MMAPPED 0x2
-
-/* Bits to mask off when extracting size */
-
-#define SIZE_BITS (PREV_INUSE|IS_MMAPPED)
-
-
-/* Ptr to next physical malloc_chunk. */
-
-#define next_chunk(p) ((mchunkptr)( ((char*)(p)) + ((p)->size & ~PREV_INUSE) ))
-
-/* Ptr to previous physical malloc_chunk */
-
-#define prev_chunk(p)\
- ((mchunkptr)( ((char*)(p)) - ((p)->prev_size) ))
-
-
-/* Treat space at ptr + offset as a chunk */
-
-#define chunk_at_offset(p, s) ((mchunkptr)(((char*)(p)) + (s)))
-
-
-
-
-/*
- Dealing with use bits
-*/
-
-/* extract p's inuse bit */
-
-#define inuse(p)\
-((((mchunkptr)(((char*)(p))+((p)->size & ~PREV_INUSE)))->size) & PREV_INUSE)
-
-/* extract inuse bit of previous chunk */
-
-#define prev_inuse(p) ((p)->size & PREV_INUSE)
-
-/* check for mmap()'ed chunk */
-
-#if HAVE_MMAP
-# define chunk_is_mmapped(p) ((p)->size & IS_MMAPPED)
-#else
-# define chunk_is_mmapped(p) 0
-#endif
-
-/* set/clear chunk as in use without otherwise disturbing */
-
-#define set_inuse(p)\
-((mchunkptr)(((char*)(p)) + ((p)->size & ~PREV_INUSE)))->size |= PREV_INUSE
-
-#define clear_inuse(p)\
-((mchunkptr)(((char*)(p)) + ((p)->size & ~PREV_INUSE)))->size &= ~(PREV_INUSE)
-
-/* check/set/clear inuse bits in known places */
-
-#define inuse_bit_at_offset(p, s)\
- (((mchunkptr)(((char*)(p)) + (s)))->size & PREV_INUSE)
-
-#define set_inuse_bit_at_offset(p, s)\
- (((mchunkptr)(((char*)(p)) + (s)))->size |= PREV_INUSE)
-
-#define clear_inuse_bit_at_offset(p, s)\
- (((mchunkptr)(((char*)(p)) + (s)))->size &= ~(PREV_INUSE))
-
-
-
-
-/*
- Dealing with size fields
-*/
-
-/* Get size, ignoring use bits */
-
-#define chunksize(p) ((p)->size & ~(SIZE_BITS))
-
-/* Set size at head, without disturbing its use bit */
-
-#define set_head_size(p, s) ((p)->size = (((p)->size & PREV_INUSE) | (s)))
-
-/* Set size/use ignoring previous bits in header */
-
-#define set_head(p, s) ((p)->size = (s))
-
-/* Set size at footer (only when chunk is not in use) */
-
-#define set_foot(p, s) (((mchunkptr)((char*)(p) + (s)))->prev_size = (s))
-
-
-
-
-
-/*
- Bins
-
- The bins, `av_' are an array of pairs of pointers serving as the
- heads of (initially empty) doubly-linked lists of chunks, laid out
- in a way so that each pair can be treated as if it were in a
- malloc_chunk. (This way, the fd/bk offsets for linking bin heads
- and chunks are the same).
-
- Bins for sizes < 512 bytes contain chunks of all the same size, spaced
- 8 bytes apart. Larger bins are approximately logarithmically
- spaced. (See the table below.) The `av_' array is never mentioned
- directly in the code, but instead via bin access macros.
-
- Bin layout:
-
- 64 bins of size 8
- 32 bins of size 64
- 16 bins of size 512
- 8 bins of size 4096
- 4 bins of size 32768
- 2 bins of size 262144
- 1 bin of size what's left
-
- There is actually a little bit of slop in the numbers in bin_index
- for the sake of speed. This makes no difference elsewhere.
-
- The special chunks `top' and `last_remainder' get their own bins,
- (this is implemented via yet more trickery with the av_ array),
- although `top' is never properly linked to its bin since it is
- always handled specially.
-
-*/
-
-#define NAV 128 /* number of bins */
-
-typedef Chunk* mbinptr;
-
-/* access macros */
-
-#define bin_at(i) ((mbinptr)((char*)&(av_[2*(i) + 2]) - 2*SIZE_SZ))
-#define next_bin(b) ((mbinptr)((char*)(b) + 2 * sizeof(mbinptr)))
-#define prev_bin(b) ((mbinptr)((char*)(b) - 2 * sizeof(mbinptr)))
-
-/*
- The first 2 bins are never indexed. The corresponding av_ cells are instead
- used for bookkeeping. This is not to save space, but to simplify
- indexing, maintain locality, and avoid some initialization tests.
-*/
-
-#define top (bin_at(0)->fd) /* The topmost chunk */
-#define last_remainder (bin_at(1)) /* remainder from last split */
-
-
-/*
- Because top initially points to its own bin with initial
- zero size, thus forcing extension on the first malloc request,
- we avoid having any special code in malloc to check whether
- it even exists yet. But we still need to in malloc_extend_top.
-*/
-
-#define initial_top ((mchunkptr)(bin_at(0)))
-
-/* Helper macro to initialize bins */
-
-#define IAV(i) bin_at(i), bin_at(i)
-
-static mbinptr av_[NAV * 2 + 2] = {
- 0, 0,
- IAV(0), IAV(1), IAV(2), IAV(3), IAV(4), IAV(5), IAV(6), IAV(7),
- IAV(8), IAV(9), IAV(10), IAV(11), IAV(12), IAV(13), IAV(14), IAV(15),
- IAV(16), IAV(17), IAV(18), IAV(19), IAV(20), IAV(21), IAV(22), IAV(23),
- IAV(24), IAV(25), IAV(26), IAV(27), IAV(28), IAV(29), IAV(30), IAV(31),
- IAV(32), IAV(33), IAV(34), IAV(35), IAV(36), IAV(37), IAV(38), IAV(39),
- IAV(40), IAV(41), IAV(42), IAV(43), IAV(44), IAV(45), IAV(46), IAV(47),
- IAV(48), IAV(49), IAV(50), IAV(51), IAV(52), IAV(53), IAV(54), IAV(55),
- IAV(56), IAV(57), IAV(58), IAV(59), IAV(60), IAV(61), IAV(62), IAV(63),
- IAV(64), IAV(65), IAV(66), IAV(67), IAV(68), IAV(69), IAV(70), IAV(71),
- IAV(72), IAV(73), IAV(74), IAV(75), IAV(76), IAV(77), IAV(78), IAV(79),
- IAV(80), IAV(81), IAV(82), IAV(83), IAV(84), IAV(85), IAV(86), IAV(87),
- IAV(88), IAV(89), IAV(90), IAV(91), IAV(92), IAV(93), IAV(94), IAV(95),
- IAV(96), IAV(97), IAV(98), IAV(99), IAV(100), IAV(101), IAV(102), IAV(103),
- IAV(104), IAV(105), IAV(106), IAV(107), IAV(108), IAV(109), IAV(110), IAV(111),
- IAV(112), IAV(113), IAV(114), IAV(115), IAV(116), IAV(117), IAV(118), IAV(119),
- IAV(120), IAV(121), IAV(122), IAV(123), IAV(124), IAV(125), IAV(126), IAV(127)
-};
-
-
-
-/* field-extraction macros */
-
-#define first(b) ((b)->fd)
-#define last(b) ((b)->bk)
-
-/*
- Indexing into bins
-*/
-
-#define bin_index(sz) \
-(((((unsigned long)(sz)) >> 9) == 0) ? (((unsigned long)(sz)) >> 3): \
- ((((unsigned long)(sz)) >> 9) <= 4) ? 56 + (((unsigned long)(sz)) >> 6): \
- ((((unsigned long)(sz)) >> 9) <= 20) ? 91 + (((unsigned long)(sz)) >> 9): \
- ((((unsigned long)(sz)) >> 9) <= 84) ? 110 + (((unsigned long)(sz)) >> 12): \
- ((((unsigned long)(sz)) >> 9) <= 340) ? 119 + (((unsigned long)(sz)) >> 15): \
- ((((unsigned long)(sz)) >> 9) <= 1364) ? 124 + (((unsigned long)(sz)) >> 18): \
- 126)
-/*
- bins for chunks < 512 are all spaced 8 bytes apart, and hold
- identically sized chunks. This is exploited in malloc.
-*/
-
-#define MAX_SMALLBIN 63
-#define MAX_SMALLBIN_SIZE 512
-#define SMALLBIN_WIDTH 8
-
-#define smallbin_index(sz) (((unsigned long)(sz)) >> 3)
-
-/*
- Requests are `small' if both the corresponding and the next bin are small
-*/
-
-#define is_small_request(nb) (nb < MAX_SMALLBIN_SIZE - SMALLBIN_WIDTH)
-
-
-
-/*
- To help compensate for the large number of bins, a one-level index
- structure is used for bin-by-bin searching. `binblocks' is a
- one-word bitvector recording whether groups of BINBLOCKWIDTH bins
- have any (possibly) non-empty bins, so they can be skipped over
- all at once during during traversals. The bits are NOT always
- cleared as soon as all bins in a block are empty, but instead only
- when all are noticed to be empty during traversal in malloc.
-*/
-
-#define BINBLOCKWIDTH 4 /* bins per block */
-
-#define binblocks (bin_at(0)->size) /* bitvector of nonempty blocks */
-
-/* bin<->block macros */
-
-#define idx2binblock(ix) ((unsigned)1 << (ix / BINBLOCKWIDTH))
-#define mark_binblock(ii) (binblocks |= idx2binblock(ii))
-#define clear_binblock(ii) (binblocks &= ~(idx2binblock(ii)))
-
-
-
-
-
-/* Other static bookkeeping data */
-
-/* variables holding tunable values */
-
-static unsigned long trim_threshold = DEFAULT_TRIM_THRESHOLD;
-static unsigned long top_pad = DEFAULT_TOP_PAD;
-static unsigned int n_mmaps_max = DEFAULT_MMAP_MAX;
-static unsigned long mmap_threshold = DEFAULT_MMAP_THRESHOLD;
-#ifdef DEBUG2
-static int scanheap = 1;
-#endif
-
-/* The first value returned from sbrk */
-static char* sbrk_base = (char*)(-1);
-
-/* The maximum memory obtained from system via sbrk */
-static unsigned long max_sbrked_mem = 0;
-
-/* The maximum via either sbrk or mmap */
-static unsigned long max_total_mem = 0;
-
-/* internal working copy of mallinfo */
-static struct mallinfo current_mallinfo = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
-
-/* The total memory obtained from system via sbrk */
-#define sbrked_mem (current_mallinfo.arena)
-
-/* Tracking mmaps */
-
-static unsigned int n_mmaps = 0;
-static unsigned long mmapped_mem = 0;
-#if HAVE_MMAP
-static unsigned int max_n_mmaps = 0;
-static unsigned long max_mmapped_mem = 0;
-#endif
-
-
-
-/*
- Debugging support
-*/
-
-#if DEBUG
-
-#ifndef DEBUG2
-# define unless(cond, err, p) assert(cond)
-#else
-# define unless(cond, err, p) do { if (!(cond)) malloc_err(err, p); } while (0)
-
-/*
- * When debug_file is non-null, it and debug_line respectively contain the
- * file and line number of the current invocation of malloc(), calloc(),
- * realloc(), or free().
- */
-static const char *debug_file = NULL;
-static int debug_line;
-
-/*
- * Avoid dereferencing invalid chunk.file pointers by tracking the range of
- * valid ones. Could add an "unallocated" flag to init_freed_chunk() for
- * more protection, but that's probably not necessary.
- */
-static const char *debug_file_min = (char *)~0;
-static const char *debug_file_max = NULL;
-
-static char *itos(int n)
-{
-#define NDIGITS (sizeof(int) * 3)
- static char s[NDIGITS + 1];
- int i = NDIGITS;
- do {
- s[--i] = '0' + n % 10;
- n /= 10;
- } while (n);
- return s + i;
-#undef NDIGITS
-}
-
-static int recurs = 0;
-
-static void errprint(const char *file, int line, const char *err)
-{
- if (recurs++) {
- recurs--;
- return;
- }
-
- if (file) {
- write(2, file, strlen(file));
- if (line) {
- write(2, ":", 1);
- write(2, itos(line), strlen(itos(line)));
- }
- write(2, ": ", 2);
- }
- write(2, err, strlen(err));
- write(2, "\n", 1);
- recurs--;
-}
-
-static void malloc_err(const char *err, mchunkptr p)
-{
- /*
- * Display ERR on stderr, accompanying it with the caller's file and line
- * number if available. If P is non-null, also attempt to display the file
- * and line number at which P was most recently [re]allocated.
- *
- * This function's name begins with "malloc_" to make setting debugger
- * breakpoints here more convenient.
- */
- errprint(debug_file, debug_line, err);
-
-# ifndef DEBUG3
- p = 0; /* avoid "unused param" warning */
-# else
- if (p && p->file &&
- /* avoid invalid pointers */
- debug_file_min &&
- p->file >= debug_file_min &&
- p->file <= debug_file_max)
- errprint(p->file, p->line, "in block allocated here");
-# endif
-}
-
-#undef malloc
-#undef free
-#undef realloc
-#undef memalign
-#undef valloc
-#undef pvalloc
-#undef calloc
-#undef malloc_trim
-#undef malloc_usable_size
-#undef malloc_stats
-#undef mallopt
-#undef mallinfo
-
-static void malloc_update_mallinfo(void);
-
-/*
- * Define front-end functions for all user-visible entry points that may
- * trigger error().
- */
-#define skel(retdecl, retassign, call, retstmt) \
- retdecl \
- debug_file = file; \
- debug_line = line; \
- if (debug_file < debug_file_min) \
- debug_file_min = debug_file; \
- if (debug_file > debug_file_max) \
- debug_file_max = debug_file; \
- if (scanheap) \
- malloc_update_mallinfo(); \
- retassign call; \
- if (scanheap) \
- malloc_update_mallinfo(); \
- debug_file = NULL; \
- retstmt
-
-/*
- * The final letter of the names of the following macros is either r or v,
- * indicating that the macro handles functions with or without a return value,
- * respectively.
- */
-# define skelr(rettype, call) \
- skel(rettype ret;, ret = , call, return ret)
-/*
- * AIX's xlc compiler doesn't like empty macro args, so specify useless but
- * compilable retdecl, retassign, and retstmt args:
- */
-#define skelv(call) \
- skel(line += 0;, if (1), call, return)
-
-#define dbgargs const char *file, int line
-
-/*
- * Front-end function definitions:
- */
-Void_t* malloc_dbg(size_t bytes, dbgargs) {
- skelr(Void_t*, malloc(bytes));
-}
-void free_dbg(Void_t *mem, dbgargs) {
- skelv(free(mem));
-}
-Void_t* realloc_dbg(Void_t *oldmem, size_t bytes, dbgargs) {
- skelr(Void_t*, realloc(oldmem, bytes));
-}
-Void_t* memalign_dbg(size_t alignment, size_t bytes, dbgargs) {
- skelr(Void_t*, dlmemalign(alignment, bytes));
-}
-Void_t* valloc_dbg(size_t bytes, dbgargs) {
- skelr(Void_t*, dlvalloc(bytes));
-}
-Void_t* pvalloc_dbg(size_t bytes, dbgargs) {
- skelr(Void_t*, dlpvalloc(bytes));
-}
-Void_t* calloc_dbg(size_t n, size_t elem_size, dbgargs) {
- skelr(Void_t*, calloc(n, elem_size));
-}
-int malloc_trim_dbg(size_t pad, dbgargs) {
- skelr(int, malloc_trim(pad));
-}
-size_t malloc_usable_size_dbg(Void_t *mem, dbgargs) {
- skelr(size_t, malloc_usable_size(mem));
-}
-void malloc_stats_dbg(dbgargs) {
- skelv(malloc_stats());
-}
-int mallopt_dbg(int flag, int value, dbgargs) {
- skelr(int, dlmallopt(flag, value));
-}
-struct mallinfo mallinfo_dbg(dbgargs) {
- skelr(struct mallinfo, dlmallinfo());
-}
-
-#undef skel
-#undef skelr
-#undef skelv
-#undef dbgargs
-
-#endif /* DEBUG2 */
-
-/*
- These routines make a number of assertions about the states
- of data structures that should be true at all times. If any
- are not true, it's very likely that a user program has somehow
- trashed memory. (It's also possible that there is a coding error
- in malloc. In which case, please report it!)
-*/
-
-#ifdef DEBUG3
-static int memtest(void *s, int c, size_t n)
-{
- /*
- * Return whether the N-byte memory region starting at S consists
- * entirely of bytes with value C.
- */
- unsigned char *p = (unsigned char *)s;
- size_t i;
- for (i = 0; i < n; i++)
- if (p[i] != (unsigned char)c)
- return 0;
- return 1;
-}
-#endif /* DEBUG3 */
-
-#ifndef DEBUG3
-#define check_moats(P)
-#else
-#define check_moats do_check_moats
-static void do_check_moats(mchunkptr p)
-{
- INTERNAL_SIZE_T sz = chunksize(p);
- unless(memtest((char *)chunk2mem(p) - MOATWIDTH, MOATFILL,
- MOATWIDTH), "region underflow", p);
- unless(memtest((char *)p + sz - MOATWIDTH - p->pad, MOATFILL,
- MOATWIDTH + p->pad), "region overflow", p);
-}
-#endif /* DEBUG3 */
-
-#if __STD_C
-static void do_check_chunk(mchunkptr p)
-#else
-static void do_check_chunk(p) mchunkptr p;
-#endif
-{
- /* Try to ensure legal addresses before accessing any chunk fields, in the
- * hope of issuing an informative message rather than causing a segv.
- *
- * The following chunk_is_mmapped() call accesses p->size #if HAVE_MMAP.
- * This is unavoidable without maintaining a record of mmapped regions.
- */
- if (!chunk_is_mmapped(p))
- {
- INTERNAL_SIZE_T sz;
-
- unless((char*)p >= sbrk_base, "chunk precedes sbrk_base", p);
- unless((char*)p + MINSIZE <= (char*)top + chunksize(top),
- "chunk past sbrk area", p);
-
- sz = chunksize(p);
- if (p != top)
- unless((char*)p + sz <= (char*)top, "chunk extends beyond top", p);
- else
- unless((char*)p + sz <= sbrk_base + sbrked_mem,
- "chunk extends past sbrk area", p);
- }
- check_moats(p);
-}
-
-#if __STD_C
-static void do_check_free_chunk(mchunkptr p)
-#else
-static void do_check_free_chunk(p) mchunkptr p;
-#endif
-{
- INTERNAL_SIZE_T sz = chunksize(p);
- mchunkptr next = chunk_at_offset(p, sz);
-
- do_check_chunk(p);
-
- /* Check whether it claims to be free ... */
- unless(!inuse(p), "free chunk marked inuse", p);
-
- /* Unless a special marker, must have OK fields */
- if ((long)sz >= (long)MINSIZE)
- {
- unless((sz & ALIGN_MASK) == 0, "freed size defies alignment", p);
- unless(aligned_OK(chunk2mem(p)), "misaligned freed region", p);
- /* ... matching footer field */
- unless(next->prev_size == sz, "chunk size mismatch", p);
- /* ... and is fully consolidated */
- unless(prev_inuse(p), "free chunk not joined with prev", p);
- unless(next == top || inuse(next), "free chunk not joined with next", p);
-
- /* ... and has minimally sane links */
- unless(p->fd->bk == p, "broken forward link", p);
- unless(p->bk->fd == p, "broken backward link", p);
- }
- else /* markers are always of size SIZE_SZ */
- unless(sz == SIZE_SZ, "invalid small chunk size", p);
-}
-
-#if __STD_C
-static void do_check_inuse_chunk(mchunkptr p)
-#else
-static void do_check_inuse_chunk(p) mchunkptr p;
-#endif
-{
- mchunkptr next;
- do_check_chunk(p);
-
- if (chunk_is_mmapped(p))
- return;
-
- /* Check whether it claims to be in use ... */
-#ifdef DEBUG3
- unless(p->alloced, "memory not allocated", p);
-#endif
- unless(inuse(p), "memory not allocated", p);
-
- /* ... and is surrounded by OK chunks.
- Since more things can be checked with free chunks than inuse ones,
- if an inuse chunk borders them and debug is on, it's worth doing them.
- */
- if (!prev_inuse(p))
- {
- mchunkptr prv = prev_chunk(p);
- unless(next_chunk(prv) == p, "prev link scrambled", p);
- do_check_free_chunk(prv);
- }
- next = next_chunk(p);
- if (next == top)
- {
- unless(prev_inuse(next), "top chunk wrongly thinks prev is unused", p);
- unless(chunksize(next) >= MINSIZE, "top chunk too small", p);
- }
- else if (!inuse(next))
- do_check_free_chunk(next);
-}
-
-#if __STD_C
-static void do_check_malloced_chunk(mchunkptr p, INTERNAL_SIZE_T s)
-#else
-static void do_check_malloced_chunk(p, s) mchunkptr p; INTERNAL_SIZE_T s;
-#endif
-{
- INTERNAL_SIZE_T sz = chunksize(p);
- long room = sz - s;
-
- do_check_inuse_chunk(p);
-
- /* Legal size ... */
- unless((long)sz >= (long)MINSIZE, "chunk size too small", p);
- unless((sz & ALIGN_MASK) == 0, "malloced size defies alignment", p);
- unless(room >= 0, "chunk size too small for contents", p);
- unless(room < (long)MINSIZE, "chunk size leaves too much spare room", p);
-
- /* ... and alignment */
- unless(aligned_OK(chunk2mem(p)), "misaligned malloced region", p);
-
-
- /* ... and was allocated at front of an available chunk */
- unless(prev_inuse(p), "malloced from the middle of a free chunk", p);
-}
-
-#ifdef DEBUG3
-static void init_alloced_chunk(mchunkptr p, size_t bytes)
-{
- Void_t* mem = chunk2mem(p);
- p->file = debug_file;
- p->line = debug_line;
- p->pad = chunksize(p) - OVERHEAD - bytes;
- p->alloced = 1;
- memset((char *)mem + bytes, MOATFILL, p->pad + MOATWIDTH);
-}
-
-static void do_init_malloced_chunk(mchunkptr p, size_t bytes)
-{
- Void_t* mem = chunk2mem(p);
- init_alloced_chunk(p, bytes);
- memset((char *)mem - MOATWIDTH, MOATFILL, MOATWIDTH);
- memset(mem, ALLOCFILL, bytes);
-}
-
-static void do_init_realloced_chunk(mchunkptr p, size_t bytes,
- INTERNAL_SIZE_T oldsize)
-{
- Void_t* mem = chunk2mem(p);
- INTERNAL_SIZE_T newsize = chunksize(p);
- init_alloced_chunk(p, bytes);
- if (oldsize < newsize)
- /* This incorrectly leaves the leading pad area of the old trailing moat
- * set to MOATFILL rather than ALLOCFILL. An alternative is to save the
- * old p->pad in rEALLOc() below and pass it to this function.
- */
- memset((char *)mem + oldsize - OVERHEAD, ALLOCFILL,
- bytes - (oldsize - OVERHEAD));
-}
-
-static void do_check_freefill(mchunkptr p, long newsize,
- INTERNAL_SIZE_T oldsize)
-{
- /* The first newsize bytes of oldsize-byte chunk p are about to be
- * allocated. Issue a warning if any freefill locations in p that are about
- * to be overwritten do not contain the character FREEFILL.
- */
- size_t bytes, maxbytes;
- if (newsize <= 0)
- return;
- bytes = newsize - MEMOFFSET /* don't check p's header */
- + MEMOFFSET; /* header of split-off remainder */
- maxbytes = oldsize - OVERHEAD;
- if (bytes > maxbytes)
- bytes = maxbytes;
- unless(memtest(chunk2mem(p), FREEFILL, bytes),
- "detected write to freed region", p);
-}
-
-static void do_init_freed_chunk(mchunkptr p, INTERNAL_SIZE_T freehead,
- INTERNAL_SIZE_T freetail)
-{
- /* freehead and freetail are the number of bytes at the beginning of p and
- * end of p respectively that should already be initialized as free regions.
- */
- Void_t* mem = chunk2mem(p);
- size_t size = chunksize(p);
- size_t bytes = size - OVERHEAD;
- p->pad = 0;
- p->alloced = 0;
- memset((char *)mem - MOATWIDTH, MOATFILL, MOATWIDTH);
- memset((char *)mem + bytes, MOATFILL, MOATWIDTH);
-
- /* To avoid terrible O(n^2) performance when free() repeatedly grows a free
- * chunk, it's important not to free-fill regions that are already
- * free-filled.
- */
- if (freehead + freetail < size) {
- Void_t* start = !freehead ? mem : (char *)p + freehead - MOATWIDTH;
- size_t len = (char *)p + size - (char *)start -
- (!freetail ? MOATWIDTH : freetail - OVERHEAD);
- memset(start, FREEFILL, len);
- }
-}
-
-static void do_init_freeable_chunk(mchunkptr p)
-{
- /* Arrange for the subsequent fREe(p) not to generate any warnings. */
- init_alloced_chunk(p, chunksize(p) - OVERHEAD);
- memset((char *)chunk2mem(p) - MOATWIDTH, MOATFILL, MOATWIDTH);
-}
-
-static void do_maximize_chunk(mchunkptr p)
-{
- if (p->pad) {
- Void_t* mem = chunk2mem(p);
- size_t bytes = chunksize(p) - OVERHEAD - p->pad;
- memset((char *)mem + bytes, ALLOCFILL, p->pad);
- p->pad = 0;
- }
-}
-
-static int do_check_init(void)
-{
- /* Called from the first invocation of malloc_extend_top(), as detected by
- * sbrk_base == -1. Return whether this function allocated any memory.
- */
- static int state = 0; /* 1 => initializing, 2 => initialized */
- if (state == 1)
- return 0;
- unless(state == 0, "multiple calls to check_init", NULL);
- state++;
- atexit(malloc_update_mallinfo); /* calls malloc on WinNT */
- return sbrk_base != (char *)-1;
-}
-#endif /* DEBUG3 */
-
-static mchunkptr lowest_chunk;
-
-#define check_free_chunk(P) do_check_free_chunk(P)
-#define check_inuse_chunk(P) do_check_inuse_chunk(P)
-#define check_chunk(P) do_check_chunk(P)
-#define check_malloced_chunk(P,N) do_check_malloced_chunk(P,N)
-#else /* !DEBUG */
-#define check_free_chunk(P)
-#define check_inuse_chunk(P)
-#define check_chunk(P)
-#define check_malloced_chunk(P,N)
-#endif /* !DEBUG */
-
-#ifdef DEBUG3
-#define check_init do_check_init
-#define init_malloced_chunk do_init_malloced_chunk
-#define init_realloced_chunk do_init_realloced_chunk
-#define check_freefill do_check_freefill
-#define init_freed_chunk do_init_freed_chunk
-#define init_freeable_chunk do_init_freeable_chunk
-#define maximize_chunk do_maximize_chunk
-#else
-#define check_init() 0
-#define init_malloced_chunk(P,B)
-#define init_realloced_chunk(P,B,O)
-#define check_freefill(P,N,O)
-#define init_freed_chunk(P,H,T)
-#define init_freeable_chunk(P)
-#define maximize_chunk(P)
-#endif /* !DEBUG3 */
-
-
-
-/*
- Macro-based internal utilities
-*/
-
-
-/*
- Linking chunks in bin lists.
- Call these only with variables, not arbitrary expressions, as arguments.
-*/
-
-/*
- Place chunk p of size s in its bin, in size order,
- putting it ahead of others of same size.
-*/
-
-
-#define frontlink(P, S, IDX, BK, FD) \
-{ \
- if (S < MAX_SMALLBIN_SIZE) \
- { \
- IDX = smallbin_index(S); \
- mark_binblock(IDX); \
- BK = bin_at(IDX); \
- FD = BK->fd; \
- P->bk = BK; \
- P->fd = FD; \
- FD->bk = BK->fd = P; \
- } \
- else \
- { \
- IDX = bin_index(S); \
- BK = bin_at(IDX); \
- FD = BK->fd; \
- if (FD == BK) mark_binblock(IDX); \
- else \
- { \
- while (FD != BK && S < chunksize(FD)) FD = FD->fd; \
- BK = FD->bk; \
- } \
- P->bk = BK; \
- P->fd = FD; \
- FD->bk = BK->fd = P; \
- } \
-}
-
-
-/* take a chunk off a list */
-
-#define unlink(P, BK, FD) \
-{ \
- BK = P->bk; \
- FD = P->fd; \
- FD->bk = BK; \
- BK->fd = FD; \
-} \
-
-/* Place p as the last remainder */
-
-#define link_last_remainder(P) \
-{ \
- last_remainder->fd = last_remainder->bk = P; \
- P->fd = P->bk = last_remainder; \
-}
-
-/* Clear the last_remainder bin */
-
-#define clear_last_remainder \
- (last_remainder->fd = last_remainder->bk = last_remainder)
-
-
-
-
-
-
-/* Routines dealing with mmap(). */
-
-#if HAVE_MMAP
-
-#if __STD_C
-static mchunkptr mmap_chunk(size_t size)
-#else
-static mchunkptr mmap_chunk(size) size_t size;
-#endif
-{
- size_t page_mask = malloc_getpagesize - 1;
- mchunkptr p;
-
-#ifndef MAP_ANONYMOUS
- static int fd = -1;
-#endif
-
- if(n_mmaps >= n_mmaps_max) return 0; /* too many regions */
-
- size = (size + MMAP_EXTRA + page_mask) & ~page_mask;
-
-#ifdef MAP_ANONYMOUS
- p = (mchunkptr)mmap(0, size, PROT_READ|PROT_WRITE,
- MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
-#else /* !MAP_ANONYMOUS */
- if (fd < 0)
- {
- fd = open("/dev/zero", O_RDWR);
- if(fd < 0) return 0;
- }
- p = (mchunkptr)mmap(0, size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
-#endif
-
- if(p == (mchunkptr)-1) return 0;
-
- n_mmaps++;
- if (n_mmaps > max_n_mmaps) max_n_mmaps = n_mmaps;
-
- /* We demand that eight bytes into a page must be 8-byte aligned. */
- assert(aligned_OK(chunk2mem(p)));
-
- /* The offset to the start of the mmapped region is stored
- * in the prev_size field of the chunk; normally it is zero,
- * but that can be changed in memalign().
- */
- p->prev_size = 0;
- set_head(p, size|IS_MMAPPED);
-
- mmapped_mem += size;
- if ((unsigned long)mmapped_mem > (unsigned long)max_mmapped_mem)
- max_mmapped_mem = mmapped_mem;
- if ((unsigned long)(mmapped_mem + sbrked_mem) > (unsigned long)max_total_mem)
- max_total_mem = mmapped_mem + sbrked_mem;
- return p;
-}
-
-#if __STD_C
-static void munmap_chunk(mchunkptr p)
-#else
-static void munmap_chunk(p) mchunkptr p;
-#endif
-{
- INTERNAL_SIZE_T size = chunksize(p);
- int ret;
-
- assert (chunk_is_mmapped(p));
- assert(! ((char*)p >= sbrk_base && (char*)p < sbrk_base + sbrked_mem));
- assert((n_mmaps > 0));
- assert(((p->prev_size + size) & (malloc_getpagesize-1)) == 0);
-
- n_mmaps--;
- mmapped_mem -= (size + p->prev_size);
-
- ret = munmap((char *)p - p->prev_size, size + p->prev_size);
-
- /* munmap returns non-zero on failure */
- assert(ret == 0);
-}
-
-#if HAVE_MREMAP
-
-#if __STD_C
-static mchunkptr mremap_chunk(mchunkptr p, size_t new_size)
-#else
-static mchunkptr mremap_chunk(p, new_size) mchunkptr p; size_t new_size;
-#endif
-{
- size_t page_mask = malloc_getpagesize - 1;
- INTERNAL_SIZE_T offset = p->prev_size;
- INTERNAL_SIZE_T size = chunksize(p);
- char *cp;
-
- assert (chunk_is_mmapped(p));
- assert(! ((char*)p >= sbrk_base && (char*)p < sbrk_base + sbrked_mem));
- assert((n_mmaps > 0));
- assert(((size + offset) & (malloc_getpagesize-1)) == 0);
-
- new_size = (new_size + offset + MMAP_EXTRA + page_mask) & ~page_mask;
-
- cp = (char *)mremap((char *)p - offset, size + offset, new_size, 1);
-
- if (cp == (char *)-1) return 0;
-
- p = (mchunkptr)(cp + offset);
-
- assert(aligned_OK(chunk2mem(p)));
-
- assert(p->prev_size == offset);
- set_head(p, (new_size - offset)|IS_MMAPPED);
-
- mmapped_mem -= size + offset;
- mmapped_mem += new_size;
- if ((unsigned long)mmapped_mem > (unsigned long)max_mmapped_mem)
- max_mmapped_mem = mmapped_mem;
- if ((unsigned long)(mmapped_mem + sbrked_mem) > (unsigned long)max_total_mem)
- max_total_mem = mmapped_mem + sbrked_mem;
- return p;
-}
-
-#endif /* HAVE_MREMAP */
-
-#endif /* HAVE_MMAP */
-
-
-
-
-/*
- Extend the top-most chunk by obtaining memory from system.
- Main interface to sbrk (but see also malloc_trim).
-*/
-
-#if __STD_C
-static void malloc_extend_top(INTERNAL_SIZE_T nb)
-#else
-static void malloc_extend_top(nb) INTERNAL_SIZE_T nb;
-#endif
-{
- char* lim; /* return value from sbrk */
- INTERNAL_SIZE_T front_misalign; /* unusable bytes at front of sbrked space */
- INTERNAL_SIZE_T correction; /* bytes for 2nd sbrk call */
- char* new_lim; /* return of 2nd sbrk call */
- INTERNAL_SIZE_T top_size; /* new size of top chunk */
-
- mchunkptr old_top = top; /* Record state of old top */
- INTERNAL_SIZE_T old_top_size = chunksize(old_top);
- char* old_end = (char*)(chunk_at_offset(old_top, old_top_size));
-
- /* Pad request with top_pad plus minimal overhead */
-
- INTERNAL_SIZE_T sbrk_size = nb + top_pad + MINSIZE;
- unsigned long pagesz = malloc_getpagesize;
-
- /* If not the first time through, round to preserve page boundary */
- /* Otherwise, we need to correct to a page size below anyway. */
- /* (We also correct below if an intervening foreign sbrk call.) */
-
- if (sbrk_base != (char*)(-1))
- sbrk_size = (sbrk_size + (pagesz - 1)) & ~(pagesz - 1);
-
- else if (check_init()) {
- if (chunksize(top) - nb < (long)MINSIZE)
- malloc_extend_top(nb);
- return;
- }
-
- lim = (char*)(MORECORE (sbrk_size));
-
- /* Fail if sbrk failed or if a foreign sbrk call killed our space */
- if (lim == (char*)(MORECORE_FAILURE) ||
- (lim < old_end && old_top != initial_top))
- return;
-
- sbrked_mem += sbrk_size;
-
- if (lim == old_end) /* can just add bytes to current top */
- {
- top_size = sbrk_size + old_top_size;
- set_head(top, top_size | PREV_INUSE);
- }
- else
- {
-#ifdef SBRKDBG
- INTERNAL_SIZE_T padding = (char *)sbrk (0) - (lim + sbrk_size);
- sbrk_size += padding;
- sbrked_mem += padding;
-#endif
-
- if (sbrk_base == (char*)(-1)) /* First time through. Record base */
- sbrk_base = lim;
- else /* Someone else called sbrk(). Count those bytes as sbrked_mem. */
- sbrked_mem += lim - (char*)old_end;
-
- /* Guarantee alignment of first new chunk made from this space */
- front_misalign = (unsigned long)chunk2mem(lim) & ALIGN_MASK;
- if (front_misalign > 0)
- {
- correction = (ALIGNMENT) - front_misalign;
- lim += correction;
- }
- else
- correction = 0;
-
- /* Guarantee the next brk will be at a page boundary */
- correction += pagesz - ((unsigned long)(lim + sbrk_size) & (pagesz - 1));
-
- /* Allocate correction */
- new_lim = (char*)(MORECORE (correction));
- if (new_lim == (char*)(MORECORE_FAILURE)) return;
-
- sbrked_mem += correction;
-
- top = (mchunkptr)lim;
- top_size = new_lim - lim + correction;
- set_head(top, top_size | PREV_INUSE);
-#if DEBUG
- lowest_chunk = top;
-#endif
-
-#ifdef OTHER_SBRKS
- if (old_top != initial_top)
- {
-
- /* There must have been an intervening foreign sbrk call. */
- /* A double fencepost is necessary to prevent consolidation */
-
- /* If not enough space to do this, then user did something very wrong */
- if (old_top_size < MINSIZE)
- {
- set_head(top, PREV_INUSE); /* will force null return from malloc */
- return;
- }
-
- old_top_size -= 2*SIZE_SZ;
- chunk_at_offset(old_top, old_top_size )->size =
- SIZE_SZ|PREV_INUSE;
- chunk_at_offset(old_top, old_top_size + SIZE_SZ)->size =
- SIZE_SZ|PREV_INUSE;
- set_head_size(old_top, old_top_size);
- /* If possible, release the rest. */
- if (old_top_size >= MINSIZE) {
- init_freeable_chunk(old_top);
- fREe(chunk2mem(old_top));
- }
- }
-#endif /* OTHER_SBRKS */
- }
-
- init_freed_chunk(top, old_top == initial_top ? old_top_size : 0, 0);
-
- if ((unsigned long)sbrked_mem > (unsigned long)max_sbrked_mem)
- max_sbrked_mem = sbrked_mem;
- if ((unsigned long)(mmapped_mem + sbrked_mem) > (unsigned long)max_total_mem)
- max_total_mem = mmapped_mem + sbrked_mem;
-
- /* We always land on a page boundary */
- assert(((unsigned long)((char*)top + top_size) & (pagesz - 1)) == 0);
-}
-
-
-
-
-/* Main public routines */
-
-
-/*
- Malloc Algorthim:
-
- The requested size is first converted into a usable form, `nb'.
- This currently means to add 4 bytes overhead plus possibly more to
- obtain 8-byte alignment and/or to obtain a size of at least
- MINSIZE (currently 16 bytes), the smallest allocatable size.
- (All fits are considered `exact' if they are within MINSIZE bytes.)
-
- From there, the first successful of the following steps is taken:
-
- 1. The bin corresponding to the request size is scanned, and if
- a chunk of exactly the right size is found, it is taken.
-
- 2. The most recently remaindered chunk is used if it is big
- enough. This is a form of (roving) first fit, used only in
- the absence of exact fits. Runs of consecutive requests use
- the remainder of the chunk used for the previous such request
- whenever possible. This limited use of a first-fit style
- allocation strategy tends to give contiguous chunks
- coextensive lifetimes, which improves locality and can reduce
- fragmentation in the long run.
-
- 3. Other bins are scanned in increasing size order, using a
- chunk big enough to fulfill the request, and splitting off
- any remainder. This search is strictly by best-fit; i.e.,
- the smallest (with ties going to approximately the least
- recently used) chunk that fits is selected.
-
- 4. If large enough, the chunk bordering the end of memory
- (`top') is split off. (This use of `top' is in accord with
- the best-fit search rule. In effect, `top' is treated as
- larger (and thus less well fitting) than any other available
- chunk since it can be extended to be as large as necessary
- (up to system limitations).
-
- 5. If the request size meets the mmap threshold and the
- system supports mmap, and there are few enough currently
- allocated mmapped regions, and a call to mmap succeeds,
- the request is allocated via direct memory mapping.
-
- 6. Otherwise, the top of memory is extended by
- obtaining more space from the system (normally using sbrk,
- but definable to anything else via the MORECORE macro).
- Memory is gathered from the system (in system page-sized
- units) in a way that allows chunks obtained across different
- sbrk calls to be consolidated, but does not require
- contiguous memory. Thus, it should be safe to intersperse
- mallocs with other sbrk calls.
-
-
- All allocations are made from the the `lowest' part of any found
- chunk. (The implementation invariant is that prev_inuse is
- always true of any allocated chunk; i.e., that each allocated
- chunk borders either a previously allocated and still in-use chunk,
- or the base of its memory arena.)
-
-*/
-
-#if __STD_C
-Void_t* mALLOc(size_t bytes)
-#else
-Void_t* mALLOc(bytes) size_t bytes;
-#endif
-{
- mchunkptr victim; /* inspected/selected chunk */
- INTERNAL_SIZE_T victim_size; /* its size */
- int idx; /* index for bin traversal */
- mbinptr bin; /* associated bin */
- mchunkptr remainder; /* remainder from a split */
- long remainder_size; /* its size */
- int remainder_index; /* its bin index */
- unsigned long block; /* block traverser bit */
- int startidx; /* first bin of a traversed block */
- mchunkptr fwd; /* misc temp for linking */
- mchunkptr bck; /* misc temp for linking */
- mbinptr q; /* misc temp */
-
- INTERNAL_SIZE_T nb = request2size(bytes); /* padded request size; */
-
- /* Check for exact match in a bin */
-
- if (is_small_request(nb)) /* Faster version for small requests */
- {
- idx = smallbin_index(nb);
-
- /* No traversal or size check necessary for small bins. */
-
- q = bin_at(idx);
- victim = last(q);
-
- /* Also scan the next one, since it would have a remainder < MINSIZE */
- if (victim == q)
- {
- q = next_bin(q);
- victim = last(q);
- }
- if (victim != q)
- {
- victim_size = chunksize(victim);
- unlink(victim, bck, fwd);
- set_inuse_bit_at_offset(victim, victim_size);
- check_freefill(victim, victim_size, victim_size);
- init_malloced_chunk(victim, bytes);
- check_malloced_chunk(victim, nb);
-
- return chunk2mem(victim);
- }
-
- idx += 2; /* Set for bin scan below. We've already scanned 2 bins. */
-
- }
- else
- {
- idx = bin_index(nb);
- bin = bin_at(idx);
-
- for (victim = last(bin); victim != bin; victim = victim->bk)
- {
- victim_size = chunksize(victim);
- remainder_size = victim_size - nb;
-
- if (remainder_size >= (long)MINSIZE) /* too big */
- {
- --idx; /* adjust to rescan below after checking last remainder */
- break;
- }
-
- else if (remainder_size >= 0) /* exact fit */
- {
- unlink(victim, bck, fwd);
- set_inuse_bit_at_offset(victim, victim_size);
- check_freefill(victim, victim_size, victim_size);
- init_malloced_chunk(victim, bytes);
- check_malloced_chunk(victim, nb);
- return chunk2mem(victim);
- }
- }
-
- ++idx;
-
- }
-
- /* Try to use the last split-off remainder */
-
- if ( (victim = last_remainder->fd) != last_remainder)
- {
- victim_size = chunksize(victim);
- remainder_size = victim_size - nb;
-
- if (remainder_size >= (long)MINSIZE) /* re-split */
- {
- remainder = chunk_at_offset(victim, nb);
- set_head(victim, nb | PREV_INUSE);
- check_freefill(victim, nb, victim_size);
- init_malloced_chunk(victim, bytes);
- link_last_remainder(remainder);
- set_head(remainder, remainder_size | PREV_INUSE);
- set_foot(remainder, remainder_size);
- init_freed_chunk(remainder, remainder_size, 0);
- check_malloced_chunk(victim, nb);
- return chunk2mem(victim);
- }
-
- clear_last_remainder;
-
- if (remainder_size >= 0) /* exhaust */
- {
- set_inuse_bit_at_offset(victim, victim_size);
- check_freefill(victim, victim_size, victim_size);
- init_malloced_chunk(victim, bytes);
- check_malloced_chunk(victim, nb);
- return chunk2mem(victim);
- }
-
- /* Else place in bin */
-
- frontlink(victim, victim_size, remainder_index, bck, fwd);
- }
-
- /*
- If there are any possibly nonempty big-enough blocks,
- search for best fitting chunk by scanning bins in blockwidth units.
- */
-
- if ( (block = idx2binblock(idx)) <= binblocks)
- {
-
- /* Get to the first marked block */
-
- if ( (block & binblocks) == 0)
- {
- /* force to an even block boundary */
- idx = (idx & ~(BINBLOCKWIDTH - 1)) + BINBLOCKWIDTH;
- block <<= 1;
- while ((block & binblocks) == 0)
- {
- idx += BINBLOCKWIDTH;
- block <<= 1;
- }
- }
-
- /* For each possibly nonempty block ... */
- for (;;)
- {
- startidx = idx; /* (track incomplete blocks) */
- q = bin = bin_at(idx);
-
- /* For each bin in this block ... */
- do
- {
- /* Find and use first big enough chunk ... */
-
- for (victim = last(bin); victim != bin; victim = victim->bk)
- {
- victim_size = chunksize(victim);
- remainder_size = victim_size - nb;
-
- if (remainder_size >= (long)MINSIZE) /* split */
- {
- remainder = chunk_at_offset(victim, nb);
- set_head(victim, nb | PREV_INUSE);
- check_freefill(victim, nb, victim_size);
- unlink(victim, bck, fwd);
- init_malloced_chunk(victim, bytes);
- link_last_remainder(remainder);
- set_head(remainder, remainder_size | PREV_INUSE);
- set_foot(remainder, remainder_size);
- init_freed_chunk(remainder, remainder_size, 0);
- check_malloced_chunk(victim, nb);
- return chunk2mem(victim);
- }
-
- else if (remainder_size >= 0) /* take */
- {
- check_freefill(victim, victim_size, victim_size);
- set_inuse_bit_at_offset(victim, victim_size);
- unlink(victim, bck, fwd);
- init_malloced_chunk(victim, bytes);
- check_malloced_chunk(victim, nb);
- return chunk2mem(victim);
- }
-
- }
-
- bin = next_bin(bin);
-
- } while ((++idx & (BINBLOCKWIDTH - 1)) != 0);
-
- /* Clear out the block bit. */
-
- do /* Possibly backtrack to try to clear a partial block */
- {
- if ((startidx & (BINBLOCKWIDTH - 1)) == 0)
- {
- binblocks &= ~block;
- break;
- }
- --startidx;
- q = prev_bin(q);
- } while (first(q) == q);
-
- /* Get to the next possibly nonempty block */
-
- if ( (block <<= 1) <= binblocks && (block != 0) )
- {
- while ((block & binblocks) == 0)
- {
- idx += BINBLOCKWIDTH;
- block <<= 1;
- }
- }
- else
- break;
- }
- }
-
-
- /* Try to use top chunk */
-
- /* Require that there be a remainder, ensuring top always exists */
- if ( (remainder_size = chunksize(top) - nb) < (long)MINSIZE)
- {
-
-#if HAVE_MMAP
- /* If big and would otherwise need to extend, try to use mmap instead */
- if ((unsigned long)nb >= (unsigned long)mmap_threshold &&
- (victim = mmap_chunk(nb)) != 0) {
- init_malloced_chunk(victim, bytes);
- return chunk2mem(victim);
- }
-#endif
-
- /* Try to extend */
- malloc_extend_top(nb);
- if ( (remainder_size = chunksize(top) - nb) < (long)MINSIZE)
- return 0; /* propagate failure */
- }
-
- victim = top;
- set_head(victim, nb | PREV_INUSE);
- check_freefill(victim, nb, nb + remainder_size);
- init_malloced_chunk(victim, bytes);
- top = chunk_at_offset(victim, nb);
- set_head(top, remainder_size | PREV_INUSE);
- init_freed_chunk(top, remainder_size, 0);
- check_malloced_chunk(victim, nb);
- return chunk2mem(victim);
-
-}
-
-
-
-
-/*
-
- free() algorithm :
-
- cases:
-
- 1. free(0) has no effect.
-
- 2. If the chunk was allocated via mmap, it is release via munmap().
-
- 3. If a returned chunk borders the current high end of memory,
- it is consolidated into the top, and if the total unused
- topmost memory exceeds the trim threshold, malloc_trim is
- called.
-
- 4. Other chunks are consolidated as they arrive, and
- placed in corresponding bins. (This includes the case of
- consolidating with the current `last_remainder').
-
-*/
-
-
-#if __STD_C
-void fREe(Void_t* mem)
-#else
-void fREe(mem) Void_t* mem;
-#endif
-{
- mchunkptr p; /* chunk corresponding to mem */
- INTERNAL_SIZE_T hd; /* its head field */
- INTERNAL_SIZE_T sz; /* its size */
- int idx; /* its bin index */
- mchunkptr next; /* next contiguous chunk */
- INTERNAL_SIZE_T nextsz; /* its size */
- INTERNAL_SIZE_T prevsz; /* size of previous contiguous chunk */
- mchunkptr bck; /* misc temp for linking */
- mchunkptr fwd; /* misc temp for linking */
- int islr; /* track whether merging with last_remainder */
-
- if (mem == 0) /* free(0) has no effect */
- return;
-
- p = mem2chunk(mem);
- check_inuse_chunk(p);
-
- hd = p->size;
-
-#if HAVE_MMAP
- if (hd & IS_MMAPPED) /* release mmapped memory. */
- {
- munmap_chunk(p);
- return;
- }
-#endif
-
- sz = hd & ~PREV_INUSE;
- next = chunk_at_offset(p, sz);
- nextsz = chunksize(next);
- prevsz = 0; /* avoid compiler warnings */
-
- if (next == top) /* merge with top */
- {
- sz += nextsz;
-
- if (!(hd & PREV_INUSE)) /* consolidate backward */
- {
- prevsz = p->prev_size;
- p = chunk_at_offset(p, -(long)prevsz);
- sz += prevsz;
- unlink(p, bck, fwd);
- }
-
- set_head(p, sz | PREV_INUSE);
- top = p;
- init_freed_chunk(top, !(hd & PREV_INUSE) ? prevsz : 0, nextsz);
- if ((unsigned long)(sz) >= trim_threshold)
- malloc_trim(top_pad);
- return;
- }
-
- set_head(next, nextsz); /* clear inuse bit */
-
- islr = 0;
-
- if (!(hd & PREV_INUSE)) /* consolidate backward */
- {
- prevsz = p->prev_size;
- p = chunk_at_offset(p, -(long)prevsz);
- sz += prevsz;
-
- if (p->fd == last_remainder) /* keep as last_remainder */
- islr = 1;
- else
- unlink(p, bck, fwd);
- }
-
- if (!(inuse_bit_at_offset(next, nextsz))) /* consolidate forward */
- {
- sz += nextsz;
-
- if (!islr && next->fd == last_remainder) /* re-insert last_remainder */
- {
- islr = 1;
- link_last_remainder(p);
- }
- else
- unlink(next, bck, fwd);
- }
-
-
- set_head(p, sz | PREV_INUSE);
- set_foot(p, sz);
- if (!islr)
- frontlink(p, sz, idx, bck, fwd);
- init_freed_chunk(p, !(hd & PREV_INUSE) ? prevsz : 0,
- !inuse_bit_at_offset(next, nextsz) ? nextsz : 0);
-}
-
-
-
-
-
-/*
-
- Realloc algorithm:
-
- Chunks that were obtained via mmap cannot be extended or shrunk
- unless HAVE_MREMAP is defined, in which case mremap is used.
- Otherwise, if their reallocation is for additional space, they are
- copied. If for less, they are just left alone.
-
- Otherwise, if the reallocation is for additional space, and the
- chunk can be extended, it is, else a malloc-copy-free sequence is
- taken. There are several different ways that a chunk could be
- extended. All are tried:
-
- * Extending forward into following adjacent free chunk.
- * Shifting backwards, joining preceding adjacent space
- * Both shifting backwards and extending forward.
- * Extending into newly sbrked space
-
- Unless the #define realloc_ZERO_BYTES_FREES is set, realloc with a
- size argument of zero (re)allocates a minimum-sized chunk.
-
- If the reallocation is for less space, and the new request is for
- a `small' (<512 bytes) size, then the newly unused space is lopped
- off and freed.
-
- The old unix realloc convention of allowing the last-free'd chunk
- to be used as an argument to realloc is no longer supported.
- I don't know of any programs still relying on this feature,
- and allowing it would also allow too many other incorrect
- usages of realloc to be sensible.
-
-
-*/
-
-
-#if __STD_C
-Void_t* rEALLOc(Void_t* oldmem, size_t bytes)
-#else
-Void_t* rEALLOc(oldmem, bytes) Void_t* oldmem; size_t bytes;
-#endif
-{
- INTERNAL_SIZE_T nb; /* padded request size */
-
- mchunkptr oldp; /* chunk corresponding to oldmem */
- INTERNAL_SIZE_T oldsize; /* its size */
-
- mchunkptr newp; /* chunk to return */
- INTERNAL_SIZE_T newsize; /* its size */
- Void_t* newmem; /* corresponding user mem */
-
- mchunkptr next; /* next contiguous chunk after oldp */
- INTERNAL_SIZE_T nextsize; /* its size */
-
- mchunkptr prev; /* previous contiguous chunk before oldp */
- INTERNAL_SIZE_T prevsize; /* its size */
-
- mchunkptr remainder; /* holds split off extra space from newp */
- INTERNAL_SIZE_T remainder_size; /* its size */
-
- mchunkptr bck; /* misc temp for linking */
- mchunkptr fwd; /* misc temp for linking */
-
-#ifdef realloc_ZERO_BYTES_FREES
- if (bytes == 0) { fREe(oldmem); return 0; }
-#endif
-
-
- /* realloc of null is supposed to be same as malloc */
- if (oldmem == 0) return mALLOc(bytes);
-
- newp = oldp = mem2chunk(oldmem);
- newsize = oldsize = chunksize(oldp);
-
-
- nb = request2size(bytes);
-
- check_inuse_chunk(oldp);
-
-#if HAVE_MMAP
- if (chunk_is_mmapped(oldp))
- {
- if (oldsize - MMAP_EXTRA >= nb) {
- init_realloced_chunk(oldp, bytes, oldsize);
- return oldmem; /* do nothing */
- }
-#if HAVE_MREMAP
- newp = mremap_chunk(oldp, nb);
- if (newp) {
- init_realloced_chunk(newp, bytes, oldsize);
- return chunk2mem(newp);
- }
-#endif
- /* Must alloc, copy, free. */
- newmem = mALLOc(bytes);
- if (newmem == 0) return 0; /* propagate failure */
- malloc_COPY(newmem, oldmem, oldsize - OVERHEAD - MMAP_EXTRA);
- munmap_chunk(oldp);
- return newmem;
- }
-#endif
-
- if (oldsize < nb)
- {
-
- /* Try expanding forward */
-
- next = chunk_at_offset(oldp, oldsize);
- if (next == top || !inuse(next))
- {
- nextsize = chunksize(next);
-
- /* Forward into top only if a remainder */
- if (next == top)
- {
- if ((long)(nextsize + newsize) >= (long)(nb + MINSIZE))
- {
- check_freefill(next, nb - oldsize, nextsize);
- newsize += nextsize;
- top = chunk_at_offset(oldp, nb);
- set_head(top, (newsize - nb) | PREV_INUSE);
- init_freed_chunk(top, newsize - nb, 0);
- set_head_size(oldp, nb);
- init_realloced_chunk(oldp, bytes, oldsize);
- return chunk2mem(oldp);
- }
- }
-
- /* Forward into next chunk */
- else if (((long)(nextsize + newsize) >= (long)nb))
- {
- check_freefill(next, nb - oldsize, nextsize);
- unlink(next, bck, fwd);
- newsize += nextsize;
- goto split;
- }
- }
- else
- {
- next = 0;
- nextsize = 0;
- }
-
- /* Try shifting backwards. */
-
- if (!prev_inuse(oldp))
- {
- prev = prev_chunk(oldp);
- prevsize = chunksize(prev);
-
- /* try forward + backward first to save a later consolidation */
-
- if (next != 0)
- {
- /* into top */
- if (next == top)
- {
- if ((long)(nextsize + prevsize + newsize) >= (long)(nb + MINSIZE))
- {
- check_freefill(prev, nb, prevsize);
- check_freefill(next, nb - (prevsize + newsize), nextsize);
- unlink(prev, bck, fwd);
- newp = prev;
- newsize += prevsize + nextsize;
- newmem = chunk2mem(newp);
- malloc_COPY(newmem, oldmem, oldsize - OVERHEAD);
- top = chunk_at_offset(newp, nb);
- set_head(top, (newsize - nb) | PREV_INUSE);
- init_freed_chunk(top, newsize - nb, 0);
- set_head_size(newp, nb);
- init_realloced_chunk(newp, bytes, oldsize);
- return newmem;
- }
- }
-
- /* into next chunk */
- else if (((long)(nextsize + prevsize + newsize) >= (long)(nb)))
- {
- check_freefill(prev, nb, prevsize);
- check_freefill(next, nb - (prevsize + newsize), nextsize);
- unlink(next, bck, fwd);
- unlink(prev, bck, fwd);
- newp = prev;
- newsize += nextsize + prevsize;
- newmem = chunk2mem(newp);
- malloc_COPY(newmem, oldmem, oldsize - OVERHEAD);
- goto split;
- }
- }
-
- /* backward only */
- if (prev != 0 && (long)(prevsize + newsize) >= (long)nb)
- {
- check_freefill(prev, nb, prevsize);
- unlink(prev, bck, fwd);
- newp = prev;
- newsize += prevsize;
- newmem = chunk2mem(newp);
- malloc_COPY(newmem, oldmem, oldsize - OVERHEAD);
- goto split;
- }
- }
-
- /* Must allocate */
-
- newmem = mALLOc (bytes);
-
- if (newmem == 0) /* propagate failure */
- return 0;
-
- /* Avoid copy if newp is next chunk after oldp. */
- /* (This can only happen when new chunk is sbrk'ed.) */
-
- if ( (newp = mem2chunk(newmem)) == next_chunk(oldp))
- {
- newsize += chunksize(newp);
- newp = oldp;
- goto split;
- }
-
- /* Otherwise copy, free, and exit */
- malloc_COPY(newmem, oldmem, oldsize - OVERHEAD);
- fREe(oldmem);
- return newmem;
- }
-
-
- split: /* split off extra room in old or expanded chunk */
-
- if (newsize - nb >= MINSIZE) /* split off remainder */
- {
- remainder = chunk_at_offset(newp, nb);
- remainder_size = newsize - nb;
- set_head_size(newp, nb);
- set_head(remainder, remainder_size | PREV_INUSE);
- set_inuse_bit_at_offset(remainder, remainder_size);
- init_malloced_chunk(remainder, remainder_size - OVERHEAD);
- fREe(chunk2mem(remainder)); /* let free() deal with it */
- }
- else
- {
- set_head_size(newp, newsize);
- set_inuse_bit_at_offset(newp, newsize);
- }
-
- init_realloced_chunk(newp, bytes, oldsize);
- check_inuse_chunk(newp);
- return chunk2mem(newp);
-}
-
-
-
-
-/*
-
- memalign algorithm:
-
- memalign requests more than enough space from malloc, finds a spot
- within that chunk that meets the alignment request, and then
- possibly frees the leading and trailing space.
-
- The alignment argument must be a power of two. This property is not
- checked by memalign, so misuse may result in random runtime errors.
-
- 8-byte alignment is guaranteed by normal malloc calls, so don't
- bother calling memalign with an argument of 8 or less.
-
- Overreliance on memalign is a sure way to fragment space.
-
-*/
-
-
-#if __STD_C
-Void_t* mEMALIGn(size_t alignment, size_t bytes)
-#else
-Void_t* mEMALIGn(alignment, bytes) size_t alignment; size_t bytes;
-#endif
-{
- INTERNAL_SIZE_T nb; /* padded request size */
- char* m; /* memory returned by malloc call */
- mchunkptr p; /* corresponding chunk */
- char* lim; /* alignment point within p */
- mchunkptr newp; /* chunk to return */
- INTERNAL_SIZE_T newsize; /* its size */
- INTERNAL_SIZE_T leadsize; /* leading space befor alignment point */
- mchunkptr remainder; /* spare room at end to split off */
- long remainder_size; /* its size */
-
- /* If need less alignment than we give anyway, just relay to malloc */
-
- if (alignment <= ALIGNMENT) return mALLOc(bytes);
-
- /* Otherwise, ensure that it is at least a minimum chunk size */
-
- if (alignment < MINSIZE) alignment = MINSIZE;
-
- /* Call malloc with worst case padding to hit alignment. */
-
- nb = request2size(bytes);
- m = (char*)mALLOc(nb + alignment + MINSIZE);
-
- if (m == 0) return 0; /* propagate failure */
-
- p = mem2chunk(m);
-
- if ((((unsigned long)(m)) % alignment) == 0) /* aligned */
- {
- init_realloced_chunk(p, bytes, chunksize(p));
- return chunk2mem(p); /* nothing more to do */
- }
- else /* misaligned */
- {
- /*
- Find an aligned spot inside chunk.
- Since we need to give back leading space in a chunk of at
- least MINSIZE, if the first calculation places us at
- a spot with less than MINSIZE leader, we can move to the
- next aligned spot -- we've allocated enough total room so that
- this is always possible.
- */
-
- lim = (char*)mem2chunk(((unsigned long)(m + alignment - 1)) &
- ~(alignment - 1));
- if ((lim - (char*)p) < (long)MINSIZE) lim = lim + alignment;
-
- newp = (mchunkptr)lim;
- leadsize = lim - (char*)p;
- newsize = chunksize(p) - leadsize;
-
-#if HAVE_MMAP
- if(chunk_is_mmapped(p))
- {
- newp->prev_size = p->prev_size + leadsize;
- set_head(newp, newsize|IS_MMAPPED);
- init_malloced_chunk(newp, bytes);
- return chunk2mem(newp);
- }
-#endif
-
- /* give back leader, use the rest */
-
- set_head(newp, newsize | PREV_INUSE);
- set_inuse_bit_at_offset(newp, newsize);
- set_head_size(p, leadsize);
- init_freeable_chunk(p);
- fREe(chunk2mem(p));
- p = newp;
-
- assert (newsize >= nb && (((unsigned long)(chunk2mem(p))) % alignment) == 0);
- }
-
- /* Also give back spare room at the end */
-
- remainder_size = chunksize(p) - nb;
-
- if (remainder_size >= (long)MINSIZE)
- {
- remainder = chunk_at_offset(p, nb);
- set_head(remainder, remainder_size | PREV_INUSE);
- set_head_size(p, nb);
- init_freeable_chunk(remainder);
- fREe(chunk2mem(remainder));
- }
-
- init_malloced_chunk(p, bytes);
- check_inuse_chunk(p);
- return chunk2mem(p);
-
-}
-
-
-
-
-/*
- valloc just invokes memalign with alignment argument equal
- to the page size of the system (or as near to this as can
- be figured out from all the includes/defines above.)
-*/
-
-#if __STD_C
-Void_t* vALLOc(size_t bytes)
-#else
-Void_t* vALLOc(bytes) size_t bytes;
-#endif
-{
- return mEMALIGn (malloc_getpagesize, bytes);
-}
-
-/*
- pvalloc just invokes valloc for the nearest pagesize
- that will accommodate request
-*/
-
-
-#if __STD_C
-Void_t* pvALLOc(size_t bytes)
-#else
-Void_t* pvALLOc(bytes) size_t bytes;
-#endif
-{
- size_t pagesize = malloc_getpagesize;
- return mEMALIGn (pagesize, (bytes + pagesize - 1) & ~(pagesize - 1));
-}
-
-/*
-
- calloc calls malloc, then zeroes out the allocated chunk.
-
-*/
-
-#if __STD_C
-Void_t* cALLOc(size_t n, size_t elem_size)
-#else
-Void_t* cALLOc(n, elem_size) size_t n; size_t elem_size;
-#endif
-{
- mchunkptr p;
- INTERNAL_SIZE_T csz;
-
- INTERNAL_SIZE_T sz = n * elem_size;
-
- /* check if expand_top called, in which case don't need to clear */
-#if MORECORE_CLEARS
- mchunkptr oldtop = top;
- INTERNAL_SIZE_T oldtopsize = chunksize(top);
-#endif
- Void_t* mem = mALLOc (sz);
-
- if (mem == 0)
- return 0;
- else
- {
- p = mem2chunk(mem);
-
- /* Two optional cases in which clearing not necessary */
-
-
-#if HAVE_MMAP
- if (chunk_is_mmapped(p)) return mem;
-#endif
-
- csz = chunksize(p);
-
-#if MORECORE_CLEARS
- if (p == oldtop && csz > oldtopsize)
- {
- /* clear only the bytes from non-freshly-sbrked memory */
- csz = oldtopsize;
- }
-#endif
-
- malloc_ZERO(mem, csz - OVERHEAD);
- /* reinstate moat fill in pad region */
- init_realloced_chunk(p, sz, chunksize(p));
- return mem;
- }
-}
-
-
-
-/*
-
- Malloc_trim gives memory back to the system (via negative
- arguments to sbrk) if there is unused memory at the `high' end of
- the malloc pool. You can call this after freeing large blocks of
- memory to potentially reduce the system-level memory requirements
- of a program. However, it cannot guarantee to reduce memory. Under
- some allocation patterns, some large free blocks of memory will be
- locked between two used chunks, so they cannot be given back to
- the system.
-
- The `pad' argument to malloc_trim represents the amount of free
- trailing space to leave untrimmed. If this argument is zero,
- only the minimum amount of memory to maintain internal data
- structures will be left (one page or less). Non-zero arguments
- can be supplied to maintain enough trailing space to service
- future expected allocations without having to re-obtain memory
- from the system.
-
- Malloc_trim returns 1 if it actually released any memory, else 0.
-
-*/
-
-#if __STD_C
-int dlmalloc_trim(size_t pad)
-#else
-int malloc_trim(pad) size_t pad;
-#endif
-{
- long top_size; /* Amount of top-most memory */
- long extra; /* Amount to release */
- char* current_lim; /* address returned by pre-check sbrk call */
- char* new_lim; /* address returned by negative sbrk call */
-
- unsigned long pagesz = malloc_getpagesize;
-
- top_size = chunksize(top);
- extra = ((top_size - pad - MINSIZE + (pagesz-1)) / pagesz - 1) * pagesz;
-
- if (extra < (long)pagesz) /* Not enough memory to release */
- return 0;
-
- else
- {
-#ifdef OTHER_SBRKS
- /* Test to make sure no one else called sbrk */
- current_lim = (char*)(MORECORE (0));
- if (current_lim != (char*)(top) + top_size)
- return 0; /* Apparently we don't own memory; must fail */
-
- else
-#endif
- {
- new_lim = (char*)(MORECORE (-extra));
-
- if (new_lim == (char*)(MORECORE_FAILURE)) /* sbrk failed? */
- {
- /* Try to figure out what we have */
- current_lim = (char*)(MORECORE (0));
- top_size = current_lim - (char*)top;
- if (top_size >= (long)MINSIZE) /* if not, we are very very dead! */
- {
- sbrked_mem = current_lim - sbrk_base;
- set_head(top, top_size | PREV_INUSE);
- init_freed_chunk(top, top_size, 0);
- }
- check_chunk(top);
- return 0;
- }
-
- else
- {
- /* Success. Adjust top accordingly. */
- set_head(top, (top_size - extra) | PREV_INUSE);
- sbrked_mem -= extra;
- init_freed_chunk(top, top_size - extra, 0);
- check_chunk(top);
- return 1;
- }
- }
- }
-}
-
-
-
-/*
- malloc_usable_size:
-
- This routine tells you how many bytes you can actually use in an
- allocated chunk, which may be more than you requested (although
- often not). You can use this many bytes without worrying about
- overwriting other allocated objects. Not a particularly great
- programming practice, but still sometimes useful.
-
-*/
-
-#if __STD_C
-size_t dlmalloc_usable_size(Void_t* mem)
-#else
-size_t malloc_usable_size(mem) Void_t* mem;
-#endif
-{
- mchunkptr p;
- if (mem == 0)
- return 0;
- else
- {
- p = mem2chunk(mem);
- check_inuse_chunk(p);
- maximize_chunk(p);
- if(!chunk_is_mmapped(p))
- {
- if (!inuse(p)) return 0;
- return chunksize(p) - OVERHEAD;
- }
- return chunksize(p) - OVERHEAD - MMAP_EXTRA;
- }
-}
-
-
-
-
-/* Utility to update current_mallinfo for malloc_stats and mallinfo() */
-
-static void malloc_update_mallinfo(void)
-{
- int i;
- mbinptr b;
- mchunkptr p;
-#if DEBUG
- mchunkptr q;
-#endif
-
- INTERNAL_SIZE_T avail = chunksize(top);
- int navail = avail >= MINSIZE ? 1 : 0;
- check_freefill(top, avail, avail);
-
-#if DEBUG
- if (lowest_chunk)
- for (p = lowest_chunk;
- p < top && inuse(p) && chunksize(p) >= MINSIZE;
- p = next_chunk(p))
- check_inuse_chunk(p);
-#endif
-
- for (i = 1; i < NAV; ++i)
- {
- b = bin_at(i);
- for (p = last(b); p != b; p = p->bk)
- {
-#if DEBUG
- check_free_chunk(p);
- check_freefill(p, chunksize(p), chunksize(p));
- for (q = next_chunk(p);
- q < top && inuse(q) && chunksize(q) >= MINSIZE;
- q = next_chunk(q))
- check_inuse_chunk(q);
-#endif
- avail += chunksize(p);
- navail++;
- }
- }
-
- current_mallinfo.ordblks = navail;
- current_mallinfo.uordblks = sbrked_mem - avail;
- current_mallinfo.fordblks = avail;
- current_mallinfo.hblks = n_mmaps;
- current_mallinfo.hblkhd = mmapped_mem;
- current_mallinfo.keepcost = chunksize(top);
-
-}
-
-
-
-/*
-
- malloc_stats:
-
- Prints on stderr the amount of space obtain from the system (both
- via sbrk and mmap), the maximum amount (which may be more than
- current if malloc_trim and/or munmap got called), the maximum
- number of simultaneous mmap regions used, and the current number
- of bytes allocated via malloc (or realloc, etc) but not yet
- freed. (Note that this is the number of bytes allocated, not the
- number requested. It will be larger than the number requested
- because of alignment and bookkeeping overhead.)
-
-*/
-
-void dlmalloc_stats(void)
-{
- malloc_update_mallinfo();
- fprintf(stderr, "max system bytes = %10u\n",
- (unsigned int)(max_total_mem));
- fprintf(stderr, "system bytes = %10u\n",
- (unsigned int)(sbrked_mem + mmapped_mem));
- fprintf(stderr, "in use bytes = %10u\n",
- (unsigned int)(current_mallinfo.uordblks + mmapped_mem));
-#if HAVE_MMAP
- fprintf(stderr, "max mmap regions = %10u\n",
- (unsigned int)max_n_mmaps);
-#endif
-}
-
-/*
- mallinfo returns a copy of updated current mallinfo.
-*/
-
-struct mallinfo mALLINFo(void)
-{
- malloc_update_mallinfo();
- return current_mallinfo;
-}
-
-
-
-
-/*
- mallopt:
-
- mallopt is the general SVID/XPG interface to tunable parameters.
- The format is to provide a (parameter-number, parameter-value) pair.
- mallopt then sets the corresponding parameter to the argument
- value if it can (i.e., so long as the value is meaningful),
- and returns 1 if successful else 0.
-
- See descriptions of tunable parameters above.
-
-*/
-
-#if __STD_C
-int mALLOPt(int param_number, int value)
-#else
-int mALLOPt(param_number, value) int param_number; int value;
-#endif
-{
- switch(param_number)
- {
- case M_TRIM_THRESHOLD:
- trim_threshold = value; return 1;
- case M_TOP_PAD:
- top_pad = value; return 1;
- case M_MMAP_THRESHOLD:
- mmap_threshold = value; return 1;
- case M_MMAP_MAX:
-#if HAVE_MMAP
- n_mmaps_max = value; return 1;
-#else
- if (value != 0) return 0; else n_mmaps_max = value; return 1;
-#endif
- case M_SCANHEAP:
-#ifdef DEBUG2
- scanheap = value;
-#endif
- return 1;
-
- default:
- return 0;
- }
-}
-
-/*
-
-History:
-
- V2.6.3 Sun May 19 08:17:58 1996 Doug Lea (dl at gee)
- * Added pvalloc, as recommended by H.J. Liu
- * Added 64bit pointer support mainly from Wolfram Gloger
- * Added anonymously donated WIN32 sbrk emulation
- * Malloc, calloc, getpagesize: add optimizations from Raymond Nijssen
- * malloc_extend_top: fix mask error that caused wastage after
- foreign sbrks
- * Add linux mremap support code from HJ Liu
-
- V2.6.2 Tue Dec 5 06:52:55 1995 Doug Lea (dl at gee)
- * Integrated most documentation with the code.
- * Add support for mmap, with help from
- Wolfram Gloger (Gloger@lrz.uni-muenchen.de).
- * Use last_remainder in more cases.
- * Pack bins using idea from colin@nyx10.cs.du.edu
- * Use ordered bins instead of best-fit threshhold
- * Eliminate block-local decls to simplify tracing and debugging.
- * Support another case of realloc via move into top
- * Fix error occuring when initial sbrk_base not word-aligned.
- * Rely on page size for units instead of SBRK_UNIT to
- avoid surprises about sbrk alignment conventions.
- * Add mallinfo, mallopt. Thanks to Raymond Nijssen
- (raymond@es.ele.tue.nl) for the suggestion.
- * Add `pad' argument to malloc_trim and top_pad mallopt parameter.
- * More precautions for cases where other routines call sbrk,
- courtesy of Wolfram Gloger (Gloger@lrz.uni-muenchen.de).
- * Added macros etc., allowing use in linux libc from
- H.J. Lu (hjl@gnu.ai.mit.edu)
- * Inverted this history list
-
- V2.6.1 Sat Dec 2 14:10:57 1995 Doug Lea (dl at gee)
- * Re-tuned and fixed to behave more nicely with V2.6.0 changes.
- * Removed all preallocation code since under current scheme
- the work required to undo bad preallocations exceeds
- the work saved in good cases for most test programs.
- * No longer use return list or unconsolidated bins since
- no scheme using them consistently outperforms those that don't
- given above changes.
- * Use best fit for very large chunks to prevent some worst-cases.
- * Added some support for debugging
-
- V2.6.0 Sat Nov 4 07:05:23 1995 Doug Lea (dl at gee)
- * Removed footers when chunks are in use. Thanks to
- Paul Wilson (wilson@cs.texas.edu) for the suggestion.
-
- V2.5.4 Wed Nov 1 07:54:51 1995 Doug Lea (dl at gee)
- * Added malloc_trim, with help from Wolfram Gloger
- (wmglo@Dent.MED.Uni-Muenchen.DE).
-
- V2.5.3 Tue Apr 26 10:16:01 1994 Doug Lea (dl at g)
-
- V2.5.2 Tue Apr 5 16:20:40 1994 Doug Lea (dl at g)
- * realloc: try to expand in both directions
- * malloc: swap order of clean-bin strategy;
- * realloc: only conditionally expand backwards
- * Try not to scavenge used bins
- * Use bin counts as a guide to preallocation
- * Occasionally bin return list chunks in first scan
- * Add a few optimizations from colin@nyx10.cs.du.edu
-
- V2.5.1 Sat Aug 14 15:40:43 1993 Doug Lea (dl at g)
- * faster bin computation & slightly different binning
- * merged all consolidations to one part of malloc proper
- (eliminating old malloc_find_space & malloc_clean_bin)
- * Scan 2 returns chunks (not just 1)
- * Propagate failure in realloc if malloc returns 0
- * Add stuff to allow compilation on non-ANSI compilers
- from kpv@research.att.com
-
- V2.5 Sat Aug 7 07:41:59 1993 Doug Lea (dl at g.oswego.edu)
- * removed potential for odd address access in prev_chunk
- * removed dependency on getpagesize.h
- * misc cosmetics and a bit more internal documentation
- * anticosmetics: mangled names in macros to evade debugger strangeness
- * tested on sparc, hp-700, dec-mips, rs6000
- with gcc & native cc (hp, dec only) allowing
- Detlefs & Zorn comparison study (in SIGPLAN Notices.)
-
- Trial version Fri Aug 28 13:14:29 1992 Doug Lea (dl at g.oswego.edu)
- * Based loosely on libg++-1.2X malloc. (It retains some of the overall
- structure of old version, but most details differ.)
-
-*/
diff --git a/winsup/cygwin/dlmalloc.h b/winsup/cygwin/dlmalloc.h
deleted file mode 100644
index d7bd869..0000000
--- a/winsup/cygwin/dlmalloc.h
+++ /dev/null
@@ -1,93 +0,0 @@
-
-/*
- * Header file for BBCized version of Doug Lea's malloc.c, automatically
- * generated by
- * /source/prod/libbbc/compat/dlmalloc/cvt
- * from
- * /source/prod/libbbc/compat/dlmalloc/malloc.c
- *
- * bbclabel: autogenerated
- */
-#define _INCLUDE_MALLOC_H_ 1
-void malloc_outofmem(void (*)(void));
-
-
-struct mallinfo {
- int arena; /* total space allocated from system */
- int ordblks; /* number of non-inuse chunks */
- int smblks; /* unused -- always zero */
- int hblks; /* number of mmapped regions */
- int hblkhd; /* total space in mmapped regions */
- int usmblks; /* unused -- always zero */
- int fsmblks; /* unused -- always zero */
- int uordblks; /* total allocated space */
- int fordblks; /* total non-inuse space */
- int keepcost; /* top-most, releasable (via malloc_trim) space */
-};
-
-
-#define M_MXFAST 1 /* UNUSED in this malloc */
-#define M_NLBLKS 2 /* UNUSED in this malloc */
-#define M_GRAIN 3 /* UNUSED in this malloc */
-#define M_KEEP 4 /* UNUSED in this malloc */
-
-
-#define M_TRIM_THRESHOLD -1
-#define M_TOP_PAD -2
-#define M_MMAP_THRESHOLD -3
-#define M_MMAP_MAX -4
-#define M_SCANHEAP -5
-#define M_FILL
-
-#ifdef MALLOC_DEBUG
-
-#define dlmalloc(size) malloc_dbg(size, __FILE__, __LINE__)
-#define dlfree(p) free_dbg(p, __FILE__, __LINE__)
-#define dlrealloc(p, size) realloc_dbg(p, size, __FILE__, __LINE__)
-#define dlcalloc(n, size) calloc_dbg(n, size, __FILE__, __LINE__)
-#define dlmemalign(align, size) memalign_dbg(align, size, __FILE__, __LINE__)
-#define dlvalloc(size) valloc_dbg(size, __FILE__, __LINE__)
-#define dlpvalloc(size) pvalloc_dbg(size, __FILE__, __LINE__)
-#define dlmalloc_trim(pad) malloc_trim_dbg(pad, __FILE__, __LINE__)
-#define dlmalloc_usable_size(p) malloc_usable_size_dbg(p, __FILE__, __LINE__)
-#define dlmalloc_stats() malloc_stats_dbg(__FILE__, __LINE__)
-#define dlmallopt(flag, val) mallopt_dbg(flag, val, __FILE__, __LINE__)
-#define dlmallinfo() mallinfo_dbg(__FILE__, __LINE__)
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-void* malloc_dbg(size_t, const char *, int);
-void free_dbg(void*, const char *, int);
-void* realloc_dbg(void*, size_t, const char *, int);
-void* calloc_dbg(size_t, size_t, const char *, int);
-void* memalign_dbg(size_t, size_t, const char *, int);
-void* valloc_dbg(size_t, const char *, int);
-void* pvalloc_dbg(size_t, const char *, int);
-int malloc_trim_dbg(size_t, const char *, int);
-size_t malloc_usable_size_dbg(void*, const char *, int);
-void malloc_stats_dbg(const char *, int);
-int mallopt_dbg(int, int, const char *, int);
-struct mallinfo mallinfo_dbg(const char *, int);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* MALLOC_DEBUG */
-
-#ifndef MALLOC_DEBUG
-
-void* malloc(size_t);
-void free(void*);
-void* realloc(void*, size_t);
-void* calloc(size_t, size_t);
-void* memalign(size_t, size_t);
-void* valloc(size_t);
-void* pvalloc(size_t);
-int malloc_trim(size_t);
-size_t malloc_usable_size(void*);
-void malloc_stats(void);
-int mallopt(int, int);
-struct mallinfo mallinfo(void);
-#endif /* !MALLOC_DEBUG */
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
deleted file mode 100644
index d8d7c2b..0000000
--- a/winsup/cygwin/dtable.cc
+++ /dev/null
@@ -1,978 +0,0 @@
-/* dtable.cc: file descriptor support.
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008 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 __INSIDE_CYGWIN_NET__
-
-#include "winsup.h"
-#include <sys/socket.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <wchar.h>
-
-#define USE_SYS_TYPES_FD_SET
-#include <winsock.h>
-#include "pinfo.h"
-#include "cygerrno.h"
-#include "perprocess.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "tls_pbuf.h"
-#include "ntdll.h"
-#include "shared_info.h"
-
-static const NO_COPY DWORD std_consts[] = {STD_INPUT_HANDLE, STD_OUTPUT_HANDLE,
- STD_ERROR_HANDLE};
-
-static bool handle_to_fn (HANDLE, char *);
-
-#define WCLEN(x) ((sizeof (x) / sizeof (WCHAR)) - 1)
-char unknown_file[] = "some disk file";
-const WCHAR DEV_NULL[] = L"\\Device\\Null";
-
-const WCHAR DEVICE_PREFIX[] = L"\\device\\";
-const size_t DEVICE_PREFIX_LEN WCLEN (DEVICE_PREFIX);
-
-static const WCHAR DEV_NAMED_PIPE[] = L"\\Device\\NamedPipe\\";
-static const size_t DEV_NAMED_PIPE_LEN = WCLEN (DEV_NAMED_PIPE);
-
-static const WCHAR DEV_REMOTE[] = L"\\Device\\LanmanRedirector\\";
-static const size_t DEV_REMOTE_LEN = WCLEN (DEV_REMOTE);
-
-static const WCHAR DEV_REMOTE1[] = L"\\Device\\WinDfs\\Root\\";
-static const size_t DEV_REMOTE1_LEN = WCLEN (DEV_REMOTE1);
-
-/* Set aside space for the table of fds */
-void
-dtable_init ()
-{
- if (!cygheap->fdtab.size)
- cygheap->fdtab.extend (NOFILE_INCR);
-}
-
-void __stdcall
-set_std_handle (int fd)
-{
- if (fd == 0)
- SetStdHandle (std_consts[fd], cygheap->fdtab[fd]->get_handle ());
- else if (fd <= 2)
- SetStdHandle (std_consts[fd], cygheap->fdtab[fd]->get_output_handle ());
-}
-
-int
-dtable::extend (int howmuch)
-{
- int new_size = size + howmuch;
- fhandler_base **newfds;
-
- if (howmuch <= 0)
- return 0;
-
- if (new_size > (100 * NOFILE_INCR))
- {
- set_errno (EMFILE);
- return 0;
- }
-
- /* Try to allocate more space for fd table. We can't call realloc ()
- here to preserve old table if memory allocation fails */
-
- if (!(newfds = (fhandler_base **) ccalloc (HEAP_ARGV, new_size, sizeof newfds[0])))
- {
- debug_printf ("calloc failed");
- set_errno (ENOMEM);
- return 0;
- }
- if (fds)
- {
- memcpy (newfds, fds, size * sizeof (fds[0]));
- cfree (fds);
- }
-
- size = new_size;
- fds = newfds;
- debug_printf ("size %d, fds %p", size, fds);
- return 1;
-}
-
-void
-dtable::get_debugger_info ()
-{
- if (being_debugged ())
- {
- char std[3][sizeof ("/dev/ttyNNNN")];
- std[0][0] = std[1][0] = std [2][0] = '\0';
- char buf[sizeof ("cYgstd %x") + 32];
- sprintf (buf, "cYgstd %x %x %x", (unsigned) &std, sizeof (std[0]), 3);
- OutputDebugString (buf);
- for (int i = 0; i < 3; i++)
- if (std[i][0])
- {
- HANDLE h = GetStdHandle (std_consts[i]);
- fhandler_base *fh = build_fh_name (std[i]);
- if (!fh)
- continue;
- fds[i] = fh;
- if (!fh->open ((i ? (i == 2 ? O_RDWR : O_WRONLY) : O_RDONLY)
- | O_BINARY, 0777))
- release (i);
- else
- CloseHandle (h);
- /* Copy to Windows' idea of a standard handle, otherwise
- we have invalid standard handles when calling Windows
- functions (small_printf and strace might suffer, too). */
- SetStdHandle (std_consts[i], i ? fh->get_output_handle ()
- : fh->get_handle ());
- }
- }
-}
-
-/* Initialize the file descriptor/handle mapping table.
- This function should only be called when a cygwin function is invoked
- by a non-cygwin function, i.e., it should only happen very rarely. */
-
-void
-dtable::stdio_init ()
-{
- extern void set_console_ctty ();
- /* Set these before trying to output anything from strace.
- Also, always set them even if we're to pick up our parent's fds
- in case they're missed. */
-
- if (myself->cygstarted || ISSTATE (myself, PID_CYGPARENT))
- {
- tty_min *t = cygwin_shared->tty.get_tty (myself->ctty);
- if (t && t->getpgid () == myself->pid && t->gethwnd ())
- init_console_handler (true);
- return;
- }
-
- HANDLE in = GetStdHandle (STD_INPUT_HANDLE);
- HANDLE out = GetStdHandle (STD_OUTPUT_HANDLE);
- HANDLE err = GetStdHandle (STD_ERROR_HANDLE);
-
- init_std_file_from_handle (0, in);
-
- /* STD_ERROR_HANDLE has been observed to be the same as
- STD_OUTPUT_HANDLE. We need separate handles (e.g. using pipes
- to pass data from child to parent). */
- /* CV 2008-10-17: Under debugger control, std fd's have been potentially
- initialized in dtable::get_debugger_info (). In this case
- init_std_file_from_handle is a no-op, so, even if out == err we don't
- want to duplicate the handle since it will be unused. */
- if (out == err && (!being_debugged () || !not_open (2)))
- {
- /* Since this code is not invoked for forked tasks, we don't have
- to worry about the close-on-exec flag here. */
- if (!DuplicateHandle (hMainProc, out, hMainProc, &err, 0, true,
- DUPLICATE_SAME_ACCESS))
- {
- /* If that fails, do this as a fall back. */
- err = out;
- system_printf ("couldn't make stderr distinct from stdout");
- }
- }
-
- init_std_file_from_handle (1, out);
- init_std_file_from_handle (2, err);
-
- /* Assign the console as the controlling tty for this process if we actually
- have a console and no other controlling tty has been assigned. */
- if (!fhandler_console::need_invisible () && myself->ctty < 0)
- set_console_ctty ();
-}
-
-const int dtable::initial_archetype_size;
-
-fhandler_base *
-dtable::find_archetype (device& dev)
-{
- for (unsigned i = 0; i < farchetype; i++)
- if (archetypes[i]->get_device () == (unsigned) dev)
- return archetypes[i];
- return NULL;
-}
-
-fhandler_base **
-dtable::add_archetype ()
-{
- if (farchetype++ >= narchetypes)
- archetypes = (fhandler_base **) crealloc_abort (archetypes, (narchetypes += initial_archetype_size) * sizeof archetypes[0]);
- return archetypes + farchetype - 1;
-}
-
-void
-dtable::delete_archetype (fhandler_base *fh)
-{
- for (unsigned i = 0; i < farchetype; i++)
- if (fh == archetypes[i])
- {
- debug_printf ("deleting element %d for %s", i, fh->get_name ());
- if (i < --farchetype)
- archetypes[i] = archetypes[farchetype];
- break;
- }
-
- delete fh;
-}
-
-int
-dtable::find_unused_handle (int start)
-{
- do
- {
- for (size_t i = start; i < size; i++)
- /* See if open -- no need for overhead of not_open */
- if (fds[i] == NULL)
- return i;
- }
- while (extend (NOFILE_INCR));
- return -1;
-}
-
-void
-dtable::release (int fd)
-{
- if (!not_open (fd))
- {
- fhandler_base *arch = fds[fd]->archetype;
- delete fds[fd];
- if (arch && !arch->usecount)
- cygheap->fdtab.delete_archetype (arch);
- fds[fd] = NULL;
- }
-}
-
-extern "C" int
-cygwin_attach_handle_to_fd (char *name, int fd, HANDLE handle, mode_t bin,
- DWORD myaccess)
-{
- if (fd == -1)
- fd = cygheap->fdtab.find_unused_handle ();
- fhandler_base *fh = build_fh_name (name);
- cygheap->fdtab[fd] = fh;
- fh->init (handle, myaccess, bin ?: fh->pc_binmode ());
- return fd;
-}
-
-void
-dtable::init_std_file_from_handle (int fd, HANDLE handle)
-{
- CONSOLE_SCREEN_BUFFER_INFO buf;
- struct sockaddr sa;
- int sal = sizeof (sa);
- DCB dcb;
- unsigned bin = O_BINARY;
- device dev;
- tmp_pathbuf tp;
-
- dev.devn = 0; /* FIXME: device */
- first_fd_for_open = 0;
-
- if (!not_open (fd))
- return;
-
- SetLastError (0);
- DWORD access = 0;
- DWORD ft = GetFileType (handle);
- char name[NT_MAX_PATH];
- name[0] = '\0';
- if (ft == FILE_TYPE_UNKNOWN && GetLastError () == ERROR_INVALID_HANDLE)
- /* can't figure out what this is */;
- else if (ft == FILE_TYPE_PIPE)
- {
- if (handle_to_fn (handle, name))
- /* ok */;
- else if (fd == 0)
- dev = *piper_dev;
- else
- dev = *pipew_dev;
- if (name[0])
- access = FILE_CREATE_PIPE_INSTANCE;
- }
- else if (GetConsoleScreenBufferInfo (handle, &buf))
- {
- /* Console output */
- if (ISSTATE (myself, PID_USETTY))
- dev.parse (FH_TTY);
- else
- dev = *console_dev;
- }
- else if (GetNumberOfConsoleInputEvents (handle, (DWORD *) &buf))
- {
- /* Console input */
- if (ISSTATE (myself, PID_USETTY))
- dev.parse (FH_TTY);
- else
- dev = *console_dev;
- }
- else if (wsock_started && getpeername ((SOCKET) handle, &sa, &sal) == 0)
- /* socket */
- dev = *tcp_dev;
- else if (GetCommState (handle, &dcb))
- /* serial */
- dev.parse (DEV_TTYS_MAJOR, 0);
- else
- /* Try to figure it out from context - probably a disk file */
- handle_to_fn (handle, name);
-
- if (!name[0] && !dev)
- fds[fd] = NULL;
- else
- {
- fhandler_base *fh;
-
- if (dev)
- fh = build_fh_dev (dev);
- else
- fh = build_fh_name (name);
-
- if (fh)
- cygheap->fdtab[fd] = fh;
-
- if (name[0])
- {
- bin = fh->pc_binmode ();
- if (!bin)
- {
- bin = fh->get_default_fmode (O_RDWR);
- if (!bin && dev)
- bin = O_BINARY;
- }
- }
-
- if (dev == FH_TTY || dev == FH_CONSOLE)
- access |= GENERIC_READ | GENERIC_WRITE;
- else if (fd == 0)
- access |= GENERIC_READ;
- else
- access |= GENERIC_WRITE; /* Should be rdwr for stderr but not sure that's
- possible for some versions of handles */
- fh->init (handle, access, bin);
- set_std_handle (fd);
- paranoid_printf ("fd %d, handle %p", fd, handle);
- }
-}
-
-#define cnew(name) new ((void *) ccalloc (HEAP_FHANDLER, 1, sizeof (name))) name
-
-static fhandler_base *
-build_fh_name_worker (path_conv& pc, HANDLE h, unsigned opt, suffix_info *si)
-{
- if (pc.error)
- {
- fhandler_base *fh = cnew (fhandler_nodevice) ();
- if (fh)
- fh->set_error (pc.error);
- set_errno (fh ? pc.error : EMFILE);
- return fh;
- }
-
- if (!pc.exists () && h)
- pc.fillin (h);
-
- return build_fh_pc (pc);
-}
-fhandler_base *
-build_fh_name (const char *name, HANDLE h, unsigned opt, suffix_info *si)
-{
- path_conv pc (name, opt | PC_NULLEMPTY | PC_POSIX, si);
- return build_fh_name_worker (pc, h, opt, si);
-}
-
-#if 0 /* Not needed yet */
-#define cnew(name) new ((void *) ccalloc (HEAP_FHANDLER, 1, sizeof (name))) name
-fhandler_base *
-build_fh_name (const UNICODE_STRING *name, HANDLE h, unsigned opt, suffix_info *si)
-{
- path_conv pc (name, opt | PC_NULLEMPTY | PC_POSIX, si);
- return build_fh_name_worker (pc, h, opt, si);
-}
-#endif
-
-fhandler_base *
-build_fh_dev (const device& dev, const char *unix_name)
-{
- path_conv pc (dev);
- if (unix_name)
- pc.set_normalized_path (unix_name);
- else
- pc.set_normalized_path (dev.name);
- return build_fh_pc (pc);
-}
-
-#define fh_unset ((fhandler_base *) 1)
-fhandler_base *
-build_fh_pc (path_conv& pc)
-{
- fhandler_base *fh = fh_unset;
-
- switch (pc.dev.major)
- {
- case DEV_TTYS_MAJOR:
- fh = cnew (fhandler_tty_slave) ();
- break;
- case DEV_TTYM_MAJOR:
- fh = cnew (fhandler_tty_master) ();
- break;
- case DEV_CYGDRIVE_MAJOR:
- fh = cnew (fhandler_cygdrive) ();
- break;
- case DEV_FLOPPY_MAJOR:
- case DEV_CDROM_MAJOR:
- case DEV_SD_MAJOR:
- case DEV_SD1_MAJOR:
- case DEV_SD2_MAJOR:
- case DEV_SD3_MAJOR:
- case DEV_SD4_MAJOR:
- case DEV_SD5_MAJOR:
- case DEV_SD6_MAJOR:
- case DEV_SD7_MAJOR:
- fh = cnew (fhandler_dev_floppy) ();
- break;
- case DEV_TAPE_MAJOR:
- fh = cnew (fhandler_dev_tape) ();
- break;
- case DEV_SERIAL_MAJOR:
- fh = cnew (fhandler_serial) ();
- break;
- default:
- switch (pc.dev)
- {
- case FH_CONSOLE:
- case FH_CONIN:
- case FH_CONOUT:
- fh = cnew (fhandler_console) ();
- break;
- case FH_PTYM:
- fh = cnew (fhandler_pty_master) ();
- break;
- case FH_WINDOWS:
- fh = cnew (fhandler_windows) ();
- break;
- case FH_FIFO:
- fh = cnew (fhandler_fifo) ();
- break;
- case FH_PIPE:
- case FH_PIPER:
- case FH_PIPEW:
- fh = cnew (fhandler_pipe) ();
- break;
- case FH_TCP:
- case FH_UDP:
- case FH_ICMP:
- case FH_UNIX:
- case FH_STREAM:
- case FH_DGRAM:
- fh = cnew (fhandler_socket) ();
- break;
- case FH_FS:
- fh = cnew (fhandler_disk_file) ();
- break;
- case FH_NULL:
- fh = cnew (fhandler_dev_null) ();
- break;
- case FH_ZERO:
- case FH_FULL:
- fh = cnew (fhandler_dev_zero) ();
- break;
- case FH_RANDOM:
- case FH_URANDOM:
- fh = cnew (fhandler_dev_random) ();
- break;
- case FH_MEM:
- case FH_PORT:
- fh = cnew (fhandler_dev_mem) ();
- break;
- case FH_CLIPBOARD:
- fh = cnew (fhandler_dev_clipboard) ();
- break;
- case FH_OSS_DSP:
- fh = cnew (fhandler_dev_dsp) ();
- break;
- case FH_PROC:
- fh = cnew (fhandler_proc) ();
- break;
- case FH_REGISTRY:
- fh = cnew (fhandler_registry) ();
- break;
- case FH_PROCESS:
- fh = cnew (fhandler_process) ();
- break;
- case FH_PROCNET:
- fh = cnew (fhandler_procnet) ();
- break;
- case FH_NETDRIVE:
- fh = cnew (fhandler_netdrive) ();
- break;
- case FH_TTY:
- {
- if (myself->ctty == TTY_CONSOLE)
- fh = cnew (fhandler_console) ();
- else if (myself->ctty >= 0)
- fh = cnew (fhandler_tty_slave) ();
- break;
- }
- case FH_KMSG:
- fh = cnew (fhandler_mailslot) ();
- break;
- }
- }
-
- if (fh == fh_unset)
- fh = cnew (fhandler_nodevice) ();
-
- if (fh)
- fh->set_name (pc);
- else
- set_errno (EMFILE);
-
- debug_printf ("fh %p", fh);
- return fh;
-}
-
-fhandler_base *
-dtable::dup_worker (fhandler_base *oldfh)
-{
- fhandler_base *newfh = build_fh_pc (oldfh->pc);
- if (!newfh)
- debug_printf ("build_fh_pc failed");
- else
- {
- *newfh = *oldfh;
- newfh->set_io_handle (NULL);
- if (oldfh->dup (newfh))
- {
- cfree (newfh);
- debug_printf ("oldfh->dup failed");
- }
- else
- {
- newfh->close_on_exec (false);
- debug_printf ("duped '%s' old %p, new %p", oldfh->get_name (), oldfh->get_io_handle (), newfh->get_io_handle ());
- }
- }
- return newfh;
-}
-
-int
-dtable::dup2 (int oldfd, int newfd)
-{
- int res = -1;
- fhandler_base *newfh = NULL; // = NULL to avoid an incorrect warning
-
- MALLOC_CHECK;
- debug_printf ("dup2 (%d, %d)", oldfd, newfd);
- lock ();
-
- if (not_open (oldfd))
- {
- syscall_printf ("fd %d not open", oldfd);
- set_errno (EBADF);
- goto done;
- }
-
- if (newfd < 0)
- {
- syscall_printf ("new fd out of bounds: %d", newfd);
- set_errno (EBADF);
- goto done;
- }
-
- if (newfd == oldfd)
- {
- res = 0;
- goto done;
- }
-
- if ((newfh = dup_worker (fds[oldfd])) == NULL)
- {
- res = -1;
- goto done;
- }
-
- debug_printf ("newfh->io_handle %p, oldfh->io_handle %p",
- newfh->get_io_handle (), fds[oldfd]->get_io_handle ());
-
- if (!not_open (newfd))
- close (newfd);
- else if ((size_t) newfd < size)
- /* nothing to do */;
- else if (find_unused_handle (newfd) < 0)
- {
- newfh->close ();
- res = -1;
- goto done;
- }
-
- fds[newfd] = newfh;
-
- if ((res = newfd) <= 2)
- set_std_handle (res);
-
-done:
- MALLOC_CHECK;
- unlock ();
- syscall_printf ("%d = dup2 (%d, %d)", res, oldfd, newfd);
-
- return res;
-}
-
-select_record *
-dtable::select_read (int fd, select_record *s)
-{
- if (not_open (fd))
- {
- set_errno (EBADF);
- return NULL;
- }
- fhandler_base *fh = fds[fd];
- s = fh->select_read (s);
- s->fd = fd;
- s->fh = fh;
- s->thread_errno = 0;
- debug_printf ("%s fd %d", fh->get_name (), fd);
- return s;
-}
-
-select_record *
-dtable::select_write (int fd, select_record *s)
-{
- if (not_open (fd))
- {
- set_errno (EBADF);
- return NULL;
- }
- fhandler_base *fh = fds[fd];
- s = fh->select_write (s);
- s->fd = fd;
- s->fh = fh;
- s->thread_errno = 0;
- debug_printf ("%s fd %d", fh->get_name (), fd);
- return s;
-}
-
-select_record *
-dtable::select_except (int fd, select_record *s)
-{
- if (not_open (fd))
- {
- set_errno (EBADF);
- return NULL;
- }
- fhandler_base *fh = fds[fd];
- s = fh->select_except (s);
- s->fd = fd;
- s->fh = fh;
- s->thread_errno = 0;
- debug_printf ("%s fd %d", fh->get_name (), fd);
- return s;
-}
-
-void
-dtable::move_fd (int from, int to)
-{
- // close (to); /* It is assumed that this is close-on-exec */
- fds[to] = fds[from];
- fds[from] = NULL;
-}
-
-void
-dtable::set_file_pointers_for_exec ()
-{
-/* This is not POSIX-compliant so the function is only called for
- non-Cygwin processes. */
- LONG off_high = 0;
- lock ();
- fhandler_base *fh;
- for (size_t i = 0; i < size; i++)
- if ((fh = fds[i]) != NULL && fh->get_flags () & O_APPEND)
- SetFilePointer (fh->get_handle (), 0, &off_high, FILE_END);
- unlock ();
-}
-
-void
-dtable::fixup_after_exec ()
-{
- first_fd_for_open = 0;
- fhandler_base *fh;
- for (size_t i = 0; i < size; i++)
- if ((fh = fds[i]) != NULL)
- {
- fh->clear_readahead ();
- fh->fixup_after_exec ();
- if (fh->close_on_exec ())
- {
- if (fh->archetype)
- {
- debug_printf ("closing fd %d since it is an archetype", i);
- fh->close ();
- }
- release (i);
- }
- else if (i == 0)
- SetStdHandle (std_consts[i], fh->get_io_handle ());
- else if (i <= 2)
- SetStdHandle (std_consts[i], fh->get_output_handle ());
- }
-}
-
-void
-dtable::fixup_after_fork (HANDLE parent)
-{
- fhandler_base *fh;
- for (size_t i = 0; i < size; i++)
- if ((fh = fds[i]) != NULL)
- {
- if (fh->close_on_exec () || fh->need_fork_fixup ())
- {
- debug_printf ("fd %d (%s)", i, fh->get_name ());
- fh->fixup_after_fork (parent);
- }
- if (i == 0)
- SetStdHandle (std_consts[i], fh->get_io_handle ());
- else if (i <= 2)
- SetStdHandle (std_consts[i], fh->get_output_handle ());
- }
-}
-
-#ifdef NEWVFORK
-int
-dtable::vfork_child_dup ()
-{
- fhandler_base **newtable;
- lock ();
- newtable = (fhandler_base **) ccalloc (HEAP_ARGV, size, sizeof (fds[0]));
- int res = 1;
-
- /* Remove impersonation */
- cygheap->user.deimpersonate ();
- if (cygheap->ctty)
- {
- cygheap->ctty->usecount++;
- cygheap->console_count++;
- report_tty_counts (cygheap->ctty, "vfork dup", "incremented ", "");
- }
-
- for (size_t i = 0; i < size; i++)
- if (not_open (i))
- continue;
- else if ((newtable[i] = dup_worker (fds[i])) != NULL)
- newtable[i]->set_close_on_exec (fds[i]->close_on_exec ());
- else
- {
- res = 0;
- goto out;
- }
-
- fds_on_hold = fds;
- fds = newtable;
-
-out:
- /* Restore impersonation */
- cygheap->user.reimpersonate ();
-
- unlock ();
- return 1;
-}
-
-void
-dtable::vfork_parent_restore ()
-{
- lock ();
-
- fhandler_tty_slave *ctty_on_hold = cygheap->ctty_on_hold;
- close_all_files ();
- fhandler_base **deleteme = fds;
- fds = fds_on_hold;
- fds_on_hold = NULL;
- cfree (deleteme);
- unlock ();
-
- if (cygheap->ctty != ctty_on_hold)
- {
- cygheap->ctty = ctty_on_hold; // revert
- cygheap->ctty->close (); // Undo previous bump of this archetype
- }
- cygheap->ctty_on_hold = NULL;
-}
-
-void
-dtable::vfork_child_fixup ()
-{
- if (!fds_on_hold)
- return;
- debug_printf ("here");
- fhandler_base **saveme = fds;
- fds = fds_on_hold;
-
- fhandler_base *fh;
- for (int i = 0; i < (int) size; i++)
- if ((fh = fds[i]) != NULL)
- {
- fh->clear_readahead ();
- if (!fh->archetype && fh->close_on_exec ())
- release (i);
- else
- {
- fh->close ();
- release (i);
- }
- }
-
- fds = saveme;
- cfree (fds_on_hold);
- fds_on_hold = NULL;
-
- if (cygheap->ctty_on_hold)
- {
- cygheap->ctty_on_hold->close ();
- cygheap->ctty_on_hold = NULL;
- }
-}
-#endif /*NEWVFORK*/
-
-static void
-decode_tty (char *buf, WCHAR *w32)
-{
- int ttyn = wcstol (w32, NULL, 10);
- __small_sprintf (buf, "/dev/tty%d", ttyn);
-}
-
-/* Try to derive posix filename from given handle. Return true if
- the handle is associated with a cygwin tty. */
-static bool
-handle_to_fn (HANDLE h, char *posix_fn)
-{
- tmp_pathbuf tp;
- ULONG len = 0;
- OBJECT_NAME_INFORMATION dummy_oni;
- WCHAR *maxmatchdos = NULL;
- int maxmatchlen = 0;
-
- NtQueryObject (h, ObjectNameInformation, &dummy_oni, sizeof (dummy_oni), &len);
- if (!len)
- debug_printf ("NtQueryObject failed 1");
- else
- {
- OBJECT_NAME_INFORMATION *ntfn = (OBJECT_NAME_INFORMATION *) alloca (len + sizeof (WCHAR));
- NTSTATUS res = NtQueryObject (h, ObjectNameInformation, ntfn, len, NULL);
-
- if (!NT_SUCCESS (res))
- debug_printf ("NtQueryObject failed 2");
- // NT seems to do this on an unopened file
- else if (!ntfn->Name.Buffer)
- debug_printf ("nt->Name.Buffer == NULL");
- else
- {
- WCHAR *w32 = ntfn->Name.Buffer;
- size_t w32len = ntfn->Name.Length / sizeof (WCHAR);
- w32[w32len] = L'\0';
-
- if (wcscasecmp (w32, DEV_NULL) == 0)
- {
- strcpy (posix_fn, "/dev/null");
- return false;
- }
-
- if (wcsncasecmp (w32, DEV_NAMED_PIPE, DEV_NAMED_PIPE_LEN) == 0)
- {
- w32 += DEV_NAMED_PIPE_LEN;
- if (wcsncmp (w32, L"cygwin-", WCLEN (L"cygwin-")) != 0)
- return false;
- w32 += WCLEN (L"cygwin-");
- bool istty = wcsncmp (w32, L"tty", WCLEN (L"tty")) == 0;
- if (istty)
- decode_tty (posix_fn, w32 + WCLEN (L"tty"));
- else if (wcsncmp (w32, L"pipe", WCLEN (L"pipe")) == 0)
- strcpy (posix_fn, "/dev/pipe");
- return istty;
- }
-
-
- WCHAR fnbuf[64 * 1024];
- if (wcsncasecmp (w32, DEVICE_PREFIX, DEVICE_PREFIX_LEN) != 0
- || !QueryDosDeviceW (NULL, fnbuf, sizeof (fnbuf)))
- {
- sys_wcstombs (posix_fn, NT_MAX_PATH, w32, w32len);
- return false;
- }
-
- for (WCHAR *s = fnbuf; *s; s = wcschr (s, '\0') + 1)
- {
- WCHAR device[NT_MAX_PATH];
- if (!QueryDosDeviceW (s, device, sizeof (device)))
- continue;
- if (wcschr (s, ':') == NULL)
- continue;
- WCHAR *q = wcsrchr (device, ';');
- if (q)
- {
- WCHAR *r = wcschr (q, '\\');
- if (r)
- wcscpy (q, r + 1);
- }
- int devlen = wcslen (device);
- if (device[devlen - 1] == L'\\')
- device[--devlen] = L'\0';
- if (devlen < maxmatchlen)
- continue;
- if (wcsncmp (device, w32, devlen) != 0||
- (w32[devlen] != L'\0' && w32[devlen] != L'\\'))
- continue;
- maxmatchlen = devlen;
- maxmatchdos = s;
- debug_printf ("current match '%W' = '%W'\n", s, device);
- }
-
- if (maxmatchlen)
- {
- WCHAR *p = wcschr (w32 + DEVICE_PREFIX_LEN, L'\\');
- size_t n = wcslen (maxmatchdos);
- WCHAR ch;
- if (!p)
- ch = L'\0';
- else
- {
- if (maxmatchdos[n - 1] == L'\\')
- n--;
- w32 += maxmatchlen - n;
- ch = L'\\';
- }
- memcpy (w32, maxmatchdos, n * sizeof (WCHAR));
- w32[n] = ch;
- }
- else if (wcsncmp (w32, DEV_REMOTE, DEV_REMOTE_LEN) == 0)
- {
- w32 += DEV_REMOTE_LEN - 2;
- *w32 = L'\\';
- debug_printf ("remote drive");
- }
- else if (wcsncmp (w32, DEV_REMOTE1, DEV_REMOTE1_LEN) == 0)
- {
- w32 += DEV_REMOTE1_LEN - 2;
- *w32 = L'\\';
- debug_printf ("remote drive");
- }
-
- cygwin_conv_path (CCP_WIN_W_TO_POSIX | CCP_ABSOLUTE, w32, posix_fn,
- NT_MAX_PATH);
-
- debug_printf ("derived path '%W', posix '%s'", w32, posix_fn);
- return false;
- }
- }
-
- strcpy (posix_fn, unknown_file);
- return false;
-}
diff --git a/winsup/cygwin/dtable.h b/winsup/cygwin/dtable.h
deleted file mode 100644
index 9940292..0000000
--- a/winsup/cygwin/dtable.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* dtable.h: fd table definition.
-
- Copyright 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008 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. */
-
-/* Initial and increment values for cygwin's fd table */
-#define NOFILE_INCR 32
-
-#include "thread.h"
-#include "sync.h"
-
-class suffix_info;
-
-#define BFH_OPTS (PC_NULLEMPTY | PC_FULL | PC_POSIX)
-class dtable
-{
- fhandler_base **fds;
-#ifdef NEWVFORK
- fhandler_base **fds_on_hold;
-#endif
- fhandler_base **archetypes;
- unsigned narchetypes;
- unsigned farchetype;
- static const int initial_archetype_size = 8;
- int first_fd_for_open;
- void lock () {lock_process::locker.acquire ();}
- void unlock () {lock_process::locker.release ();}
-public:
- size_t size;
-
- dtable () : archetypes (NULL), narchetypes (0), farchetype (0), first_fd_for_open(3) {}
- void init () {first_fd_for_open = 3;}
-
- void move_fd (int, int);
- int vfork_child_dup ();
- void vfork_parent_restore ();
- void vfork_child_fixup ();
- fhandler_base *dup_worker (fhandler_base *oldfh);
- int extend (int howmuch);
- void fixup_after_fork (HANDLE);
- inline int not_open (int fd)
- {
- lock ();
- int res = fd < 0 || fd >= (int) size || fds[fd] == NULL;
- unlock ();
- return res;
- }
- int find_unused_handle (int start);
- int find_unused_handle () { return find_unused_handle (first_fd_for_open);}
- void release (int fd);
- void init_std_file_from_handle (int fd, HANDLE handle);
- int dup2 (int oldfd, int newfd);
- void fixup_after_exec ();
- inline fhandler_base *&operator [](int fd) const { return fds[fd]; }
- select_record *select_read (int fd, select_record *s);
- select_record *select_write (int fd, select_record *s);
- select_record *select_except (int fd, select_record *s);
- operator fhandler_base **() {return fds;}
- void stdio_init ();
- void get_debugger_info ();
- void set_file_pointers_for_exec ();
-#ifdef NEWVFORK
- bool in_vfork_cleanup () {return fds_on_hold == fds;}
-#endif
- fhandler_base *find_archetype (device& dev);
- fhandler_base **add_archetype ();
- void delete_archetype (fhandler_base *);
- friend void dtable_init ();
- friend void __stdcall close_all_files (bool);
- friend class fhandler_disk_file;
- friend class cygheap_fdmanip;
- friend class cygheap_fdget;
- friend class cygheap_fdnew;
- friend class cygheap_fdenum;
- friend class lock_process;
-};
-
-fhandler_base *build_fh_dev (const device&, const char * = NULL);
-fhandler_base *build_fh_name (const char *, HANDLE = NULL, unsigned = 0, suffix_info * = NULL);
-fhandler_base *build_fh_name (const UNICODE_STRING *, HANDLE = NULL, unsigned = 0, suffix_info * = NULL);
-fhandler_base *build_fh_pc (path_conv& pc);
-
-void dtable_init ();
-void stdio_init ();
-extern dtable fdtab;
-
-extern "C" int getfdtabsize ();
-extern "C" void setfdtabsize (int);
diff --git a/winsup/cygwin/dtable.sgml b/winsup/cygwin/dtable.sgml
deleted file mode 100644
index 73d8b78..0000000
--- a/winsup/cygwin/dtable.sgml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-<sect1 id="func-cygwin-attach-handle-to-fd">
-<title>cygwin_attach_handle_to_fd</title>
-
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" int
-<function>cygwin_attach_handle_to_fd</function></funcdef>
-<paramdef>char *<parameter>name</parameter></paramdef>
-<paramdef>int <parameter>fd</parameter></paramdef>
-<paramdef>HANDLE <parameter>handle</parameter></paramdef>
-<paramdef>int <parameter>bin</parameter></paramdef>
-<paramdef>int <parameter>access</parameter></paramdef>
-</funcprototype></funcsynopsis>
-
-<para>This function can be used to turn a Win32 "handle" into a
-posix-style file handle. <parameter>fd</parameter> may be -1 to
-make cygwin allocate a handle; the actual handle is returned
-in all cases.</para>
-
-</sect1>
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc
deleted file mode 100644
index 2c42675..0000000
--- a/winsup/cygwin/environ.cc
+++ /dev/null
@@ -1,1153 +0,0 @@
-/* environ.cc: Cygwin-adopted functions from newlib to manipulate
- process's environment.
-
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008 Red Hat, Inc.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include <wchar.h>
-#include <wctype.h>
-#include <ctype.h>
-#include <assert.h>
-#include <cygwin/version.h>
-#include <winnls.h>
-#include "pinfo.h"
-#include "perprocess.h"
-#include "path.h"
-#include "cygerrno.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "cygtls.h"
-#include "tls_pbuf.h"
-#include "registry.h"
-#include "environ.h"
-#include "child_info.h"
-
-extern bool dos_file_warning;
-extern bool allow_glob;
-extern bool ignore_case_with_glob;
-extern bool allow_winsymlinks;
-extern bool strip_title_path;
-bool reset_com = false;
-static bool envcache = true;
-static bool create_upcaseenv = false;
-#ifdef USE_SERVER
-extern bool allow_server;
-#endif
-
-static char **lastenviron;
-
-/* Helper functions for the below environment variables which have to
- be converted Win32<->POSIX. */
-extern "C" ssize_t env_PATH_to_posix (const void *, void *, size_t);
-
-ssize_t
-env_plist_to_posix (const void *win32, void *posix, size_t size)
-{
- return cygwin_conv_path_list (CCP_WIN_A_TO_POSIX | CCP_RELATIVE, win32,
- posix, size);
-}
-
-ssize_t
-env_plist_to_win32 (const void *posix, void *win32, size_t size)
-{
- return cygwin_conv_path_list (CCP_POSIX_TO_WIN_A | CCP_RELATIVE, posix,
- win32, size);
-}
-
-ssize_t
-env_path_to_posix (const void *win32, void *posix, size_t size)
-{
- return cygwin_conv_path (CCP_WIN_A_TO_POSIX | CCP_ABSOLUTE, win32,
- posix, size);
-}
-
-ssize_t
-env_path_to_win32 (const void *posix, void *win32, size_t size)
-{
- return cygwin_conv_path (CCP_POSIX_TO_WIN_A | CCP_ABSOLUTE, posix,
- win32, size);
-}
-
-#define ENVMALLOC \
- (CYGWIN_VERSION_DLL_MAKE_COMBINED (user_data->api_major, user_data->api_minor) \
- <= CYGWIN_VERSION_DLL_MALLOC_ENV)
-
-#define NL(x) x, (sizeof (x) - 1)
-/* List of names which are converted from dos to unix
- on the way in and back again on the way out.
-
- PATH needs to be here because CreateProcess uses it and gdb uses
- CreateProcess. HOME is here because most shells use it and would be
- confused by Windows style path names. */
-static win_env conv_envvars[] =
- {
- {NL ("PATH="), NULL, NULL, env_PATH_to_posix, env_plist_to_win32, true},
- {NL ("HOME="), NULL, NULL, env_path_to_posix, env_path_to_win32, false},
- {NL ("LD_LIBRARY_PATH="), NULL, NULL,
- env_plist_to_posix, env_plist_to_win32, true},
- {NL ("TMPDIR="), NULL, NULL, env_path_to_posix, env_path_to_win32, false},
- {NL ("TMP="), NULL, NULL, env_path_to_posix, env_path_to_win32, false},
- {NL ("TEMP="), NULL, NULL, env_path_to_posix, env_path_to_win32, false},
- {NULL, 0, NULL, NULL, 0, 0}
- };
-
-static unsigned char conv_start_chars[256] = {0};
-
-struct win_env&
-win_env::operator = (struct win_env& x)
-{
- name = x.name;
- namelen = x.namelen;
- toposix = x.toposix;
- towin32 = x.towin32;
- immediate = false;
- return *this;
-}
-
-win_env::~win_env ()
-{
- if (posix)
- free (posix);
- if (native)
- free (native);
-}
-
-void
-win_env::add_cache (const char *in_posix, const char *in_native)
-{
- MALLOC_CHECK;
- posix = (char *) realloc (posix, strlen (in_posix) + 1);
- strcpy (posix, in_posix);
- if (in_native)
- {
- native = (char *) realloc (native, namelen + 1 + strlen (in_native));
- strcpy (native, name);
- strcpy (native + namelen, in_native);
- }
- else
- {
- tmp_pathbuf tp;
- char *buf = tp.c_get ();
- strcpy (buf, name + namelen);
- towin32 (in_posix, buf, NT_MAX_PATH);
- native = (char *) realloc (native, namelen + 1 + strlen (buf));
- strcpy (native, name);
- strcpy (native + namelen, buf);
- }
- MALLOC_CHECK;
- if (immediate && cygwin_finished_initializing)
- {
- char s[namelen];
- size_t n = namelen - 1;
- memcpy (s, name, n);
- s[n] = '\0';
- SetEnvironmentVariable (s, native + namelen);
- }
- debug_printf ("posix %s", posix);
- debug_printf ("native %s", native);
-}
-
-
-/* Check for a "special" environment variable name. *env is the pointer
- to the beginning of the environment variable name. *in_posix is any
- known posix value for the environment variable. Returns a pointer to
- the appropriate conversion structure. */
-win_env * __stdcall
-getwinenv (const char *env, const char *in_posix, win_env *temp)
-{
- if (!conv_start_chars[(unsigned char)*env])
- return NULL;
-
- for (int i = 0; conv_envvars[i].name != NULL; i++)
- if (strncmp (env, conv_envvars[i].name, conv_envvars[i].namelen) == 0)
- {
- win_env *we = conv_envvars + i;
- const char *val;
- if (!cur_environ () || !(val = in_posix ?: getenv (we->name)))
- debug_printf ("can't set native for %s since no environ yet",
- we->name);
- else if (!envcache || !we->posix || strcmp (val, we->posix) != 0)
- {
- if (temp)
- {
- *temp = *we;
- we = temp;
- }
- we->add_cache (val);
- }
- return we;
- }
- return NULL;
-}
-
-/* Convert windows path specs to POSIX, if appropriate.
- */
-static void __stdcall
-posify (char **here, const char *value, char *outenv)
-{
- char *src = *here;
- win_env *conv;
-
- if (!(conv = getwinenv (src)))
- return;
-
- int len = strcspn (src, "=") + 1;
-
- /* Turn all the items from c:<foo>;<bar> into their
- mounted equivalents - if there is one. */
-
- memcpy (outenv, src, len);
- char *newvalue = outenv + len;
- if (!conv->toposix (value, newvalue, NT_MAX_PATH - len)
- || _impure_ptr->_errno != EIDRM)
- conv->add_cache (newvalue, *value != '/' ? value : NULL);
- else
- {
- /* The conversion routine removed elements from a path list so we have
- to recalculate the windows path to remove elements there, too. */
- char cleanvalue[strlen (value) + 1];
- conv->towin32 (newvalue, cleanvalue, sizeof cleanvalue);
- conv->add_cache (newvalue, cleanvalue);
- }
-
- debug_printf ("env var converted to %s", outenv);
- *here = strdup (outenv);
- free (src);
- MALLOC_CHECK;
-}
-
-/* Returns pointer to value associated with name, if any, else NULL.
- Sets offset to be the offset of the name/value combination in the
- environment array, for use by setenv(3) and unsetenv(3).
- Explicitly removes '=' in argument name. */
-
-static char * __stdcall
-my_findenv (const char *name, int *offset)
-{
- register int len;
- register char **p;
- const char *c;
-
- c = name;
- len = 0;
- while (*c && *c != '=')
- {
- c++;
- len++;
- }
-
- for (p = cur_environ (); *p; ++p)
- if (!strncmp (*p, name, len))
- if (*(c = *p + len) == '=')
- {
- *offset = p - cur_environ ();
- return (char *) (++c);
- }
- MALLOC_CHECK;
- return NULL;
-}
-
-/* Primitive getenv before the environment is built. */
-
-static char __stdcall *
-getearly (const char * name, int *)
-{
- char *ret;
- char **ptr;
- int len;
-
- if (spawn_info && (ptr = spawn_info->moreinfo->envp))
- {
- len = strlen (name);
- for (; *ptr; ptr++)
- if (strncasematch (name, *ptr, len) && (*ptr)[len] == '=')
- return *ptr + len + 1;
- }
- else if ((len = GetEnvironmentVariableA (name, NULL, 0))
- && (ret = (char *) cmalloc_abort (HEAP_2_STR, len))
- && GetEnvironmentVariableA (name, ret, len))
- return ret;
-
- return NULL;
-}
-
-static char * (*findenv_func)(const char *, int *) = (char * (*)(const char *, int *)) getearly;
-
-/* Returns ptr to value associated with name, if any, else NULL. */
-
-extern "C" char *
-getenv (const char *name)
-{
- int offset;
- return findenv_func (name, &offset);
-}
-
-static int __stdcall
-envsize (const char * const *in_envp)
-{
- const char * const *envp;
- for (envp = in_envp; *envp; envp++)
- continue;
- return (1 + envp - in_envp) * sizeof (const char *);
-}
-
-/* Takes similar arguments to setenv except that overwrite is
- either -1, 0, or 1. 0 or 1 signify that the function should
- perform similarly to setenv. Otherwise putenv is assumed. */
-static int __stdcall
-_addenv (const char *name, const char *value, int overwrite)
-{
- int issetenv = overwrite >= 0;
- int offset;
- char *p;
-
- unsigned int valuelen = strlen (value);
- if ((p = my_findenv (name, &offset)))
- { /* Already exists. */
- if (!overwrite) /* Ok to overwrite? */
- return 0; /* No. Wanted to add new value. FIXME: Right return value? */
-
- /* We've found the offset into environ. If this is a setenv call and
- there is room in the current environment entry then just overwrite it.
- Otherwise handle this case below. */
- if (issetenv && strlen (p) >= valuelen)
- {
- strcpy (p, value);
- return 0;
- }
- }
- else
- { /* Create new slot. */
- int sz = envsize (cur_environ ());
- int allocsz = sz + (2 * sizeof (char *));
-
- offset = (sz - 1) / sizeof (char *);
-
- /* Allocate space for additional element plus terminating NULL. */
- if (cur_environ () == lastenviron)
- lastenviron = __cygwin_environ = (char **) realloc (cur_environ (),
- allocsz);
- else if ((lastenviron = (char **) malloc (allocsz)) != NULL)
- __cygwin_environ = (char **) memcpy ((char **) lastenviron,
- __cygwin_environ, sz);
-
- if (!__cygwin_environ)
- {
-#ifdef DEBUGGING
- try_to_debug ();
-#endif
- return -1; /* Oops. No more memory. */
- }
-
- __cygwin_environ[offset + 1] = NULL; /* NULL terminate. */
- update_envptrs (); /* Update any local copies of 'environ'. */
- }
-
- char *envhere;
- if (!issetenv)
- /* Not setenv. Just overwrite existing. */
- envhere = cur_environ ()[offset] = (char *) (ENVMALLOC ? strdup (name) : name);
- else
- { /* setenv */
- /* Look for an '=' in the name and ignore anything after that if found. */
- for (p = (char *) name; *p && *p != '='; p++)
- continue;
-
- int namelen = p - name; /* Length of name. */
- /* Allocate enough space for name + '=' + value + '\0' */
- envhere = cur_environ ()[offset] = (char *) malloc (namelen + valuelen + 2);
- if (!envhere)
- return -1; /* Oops. No more memory. */
-
- /* Put name '=' value into current slot. */
- strncpy (envhere, name, namelen);
- envhere[namelen] = '=';
- strcpy (envhere + namelen + 1, value);
- }
-
- /* Update cygwin's cache, if appropriate */
- win_env *spenv;
- if ((spenv = getwinenv (envhere)))
- spenv->add_cache (value);
-
- MALLOC_CHECK;
- return 0;
-}
-
-/* Set an environment variable */
-extern "C" int
-putenv (char *str)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (*str)
- {
- char *eq = strchr (str, '=');
- if (eq)
- return _addenv (str, eq + 1, -1);
-
- /* Remove str from the environment. */
- unsetenv (str);
- }
- return 0;
-}
-
-/* Set the value of the environment variable "name" to be
- "value". If overwrite is set, replace any current value. */
-extern "C" int
-setenv (const char *name, const char *value, int overwrite)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (!*name)
- return 0;
- if (*value == '=')
- value++;
- return _addenv (name, value, !!overwrite);
-}
-
-/* Delete environment variable "name". */
-extern "C" int
-unsetenv (const char *name)
-{
- register char **e;
- int offset;
- myfault efault;
- if (efault.faulted () || *name == '\0' || strchr (name, '='))
- {
- set_errno (EINVAL);
- return -1;
- }
-
- while (my_findenv (name, &offset)) /* if set multiple times */
- /* Move up the rest of the array */
- for (e = cur_environ () + offset; ; e++)
- if (!(*e = *(e + 1)))
- break;
-
- return 0;
-}
-
-/* Minimal list of Windows vars which must be converted to uppercase.
- Either for POSIX compatibility of for backward compatibility with
- existing applications. */
-static struct renv {
- const char *name;
- const size_t namelen;
-} renv_arr[] = {
- { NL("ALLUSERSPROFILE=") }, // 0
- { NL("COMMONPROGRAMFILES=") }, // 1
- { NL("COMPUTERNAME=") },
- { NL("COMSPEC=") },
- { NL("HOME=") }, // 4
- { NL("HOMEDRIVE=") },
- { NL("HOMEPATH=") },
- { NL("NUMBER_OF_PROCESSORS=") }, // 7
- { NL("OS=") }, // 8
- { NL("PATH=") }, // 9
- { NL("PATHEXT=") },
- { NL("PROCESSOR_ARCHITECTURE=") },
- { NL("PROCESSOR_IDENTIFIER=") },
- { NL("PROCESSOR_LEVEL=") },
- { NL("PROCESSOR_REVISION=") },
- { NL("PROGRAMFILES=") },
- { NL("SYSTEMDRIVE=") }, // 16
- { NL("SYSTEMROOT=") },
- { NL("TEMP=") }, // 18
- { NL("TERM=") },
- { NL("TMP=") },
- { NL("TMPDIR=") },
- { NL("WINDIR=") } // 22
-};
-#define RENV_SIZE (sizeof (renv_arr) / sizeof (renv_arr[0]))
-/* Set of first characters of the above list of variables. */
-static const char idx_arr[] = "ACHNOPSTW";
-/* Index into renv_arr at which the variables with this specific character
- starts. */
-static const int start_at[] = { 0, 1, 4, 7, 8, 9, 16, 18, 22 };
-
-/* Turn environment variable part of a=b string into uppercase.
- Conditionally controlled by upcaseenv CYGWIN setting. */
-static __inline__ void
-ucenv (char *p, const char *eq)
-{
- if (create_upcaseenv)
- {
- /* Amazingly, NT has a case sensitive environment name list,
- but only sometimes.
- It's normal to have NT set your "Path" to something.
- Later, you set "PATH" to something else. This alters "Path".
- But if you try and do a naive getenv on "PATH" you'll get nothing.
-
- So we upper case the labels here to prevent confusion later but
- we only do it for processes that are started by non-Cygwin programs. */
- for (; p < eq; p++)
- if (islower (*p))
- *p = cyg_toupper (*p);
- }
- else
- {
- /* Hopefully as quickly as possible - only upcase specific set of important
- Windows variables. */
- char first = cyg_toupper (*p);
- const char *idx = strchr (idx_arr, first);
- if (idx)
- for (size_t i = start_at[idx - idx_arr];
- i < RENV_SIZE && renv_arr[i].name[0] == first;
- ++i)
- if (strncasematch (p, renv_arr[i].name, renv_arr[i].namelen))
- {
- strncpy (p, renv_arr[i].name, renv_arr[i].namelen);
- break;
- }
- }
-}
-
-/* Parse CYGWIN options */
-
-static NO_COPY bool export_settings = false;
-
-enum settings
- {
- justset,
- isfunc,
- setbit,
- set_process_state,
- };
-
-/* When BUF is:
- null or empty: disables globbing
- "ignorecase": enables case-insensitive globbing
- anything else: enables case-sensitive globbing */
-static void
-glob_init (const char *buf)
-{
- if (!buf || !*buf)
- {
- allow_glob = false;
- ignore_case_with_glob = false;
- }
- else if (ascii_strncasematch (buf, "ignorecase", 10))
- {
- allow_glob = true;
- ignore_case_with_glob = true;
- }
- else
- {
- allow_glob = true;
- ignore_case_with_glob = false;
- }
-}
-
-void
-set_file_api_mode (codepage_type cp)
-{
- if (cp == oem_cp)
- {
- SetFileApisToOEM ();
- debug_printf ("File APIs set to OEM");
- }
- else
- {
- SetFileApisToANSI ();
- debug_printf ("File APIs set to ANSI");
- }
-}
-
-void
-codepage_init (const char *buf)
-{
- if (!buf)
- buf = "ansi";
-
- if (ascii_strcasematch (buf, "oem"))
- {
- current_codepage = oem_cp;
- active_codepage = GetOEMCP ();
- }
- else if (ascii_strcasematch (buf, "utf8"))
- {
- current_codepage = utf8_cp;
- active_codepage = CP_UTF8;
- }
- else
- {
- if (!ascii_strcasematch (buf, "ansi"))
- debug_printf ("Wrong codepage name: %s", buf);
- /* Fallback to ANSI */
- current_codepage = ansi_cp;
- active_codepage = GetACP ();
- }
- set_file_api_mode (current_codepage);
-}
-
-static void
-set_chunksize (const char *buf)
-{
- wincap.set_chunksize (strtoul (buf, NULL, 0));
-}
-
-static void
-set_proc_retry (const char *buf)
-{
- child_info::retry_count = strtoul (buf, NULL, 0);
-}
-
-/* The structure below is used to set up an array which is used to
- parse the CYGWIN environment variable or, if enabled, options from
- the registry. */
-static struct parse_thing
- {
- const char *name;
- union parse_setting
- {
- bool *b;
- DWORD *x;
- int *i;
- void (*func)(const char *);
- } setting;
-
- enum settings disposition;
- char *remember;
- union parse_values
- {
- DWORD i;
- const char *s;
- } values[2];
- } known[] NO_COPY =
-{
- {"codepage", {func: &codepage_init}, isfunc, NULL, {{0}, {0}}},
- {"dosfilewarning", {&dos_file_warning}, justset, NULL, {{false}, {true}}},
- {"envcache", {&envcache}, justset, NULL, {{true}, {false}}},
- {"error_start", {func: &error_start_init}, isfunc, NULL, {{0}, {0}}},
- {"export", {&export_settings}, justset, NULL, {{false}, {true}}},
- {"forkchunk", {func: set_chunksize}, isfunc, NULL, {{0}, {0}}},
- {"glob", {func: &glob_init}, isfunc, NULL, {{0}, {s: "normal"}}},
- {"proc_retry", {func: set_proc_retry}, isfunc, NULL, {{0}, {5}}},
- {"reset_com", {&reset_com}, justset, NULL, {{false}, {true}}},
-#ifdef USE_SERVER
- {"server", {&allow_server}, justset, NULL, {{false}, {true}}},
-#endif
- {"strip_title", {&strip_title_path}, justset, NULL, {{false}, {true}}},
- {"title", {&display_title}, justset, NULL, {{false}, {true}}},
- {"tty", {NULL}, set_process_state, NULL, {{0}, {PID_USETTY}}},
- {"upcaseenv", {&create_upcaseenv}, justset, NULL, {{false}, {true}}},
- {"winsymlinks", {&allow_winsymlinks}, justset, NULL, {{false}, {true}}},
- {NULL, {0}, justset, 0, {{0}, {0}}}
-};
-
-/* Parse a string of the form "something=stuff somethingelse=more-stuff",
- silently ignoring unknown "somethings". */
-static void __stdcall
-parse_options (char *buf)
-{
- int istrue;
- char *p, *lasts;
- parse_thing *k;
-
- if (buf == NULL)
- {
- tmp_pathbuf tp;
- char *newbuf = tp.c_get ();
- newbuf[0] = '\0';
- for (k = known; k->name != NULL; k++)
- if (k->remember)
- {
- strcat (strcat (newbuf, " "), k->remember);
- free (k->remember);
- k->remember = NULL;
- }
-
- if (export_settings)
- {
- debug_printf ("%s", newbuf + 1);
- setenv ("CYGWIN", newbuf + 1, 1);
- }
- return;
- }
-
- buf = strcpy ((char *) alloca (strlen (buf) + 1), buf);
- for (p = strtok_r (buf, " \t", &lasts);
- p != NULL;
- p = strtok_r (NULL, " \t", &lasts))
- {
- char *keyword_here = p;
- if (!(istrue = !ascii_strncasematch (p, "no", 2)))
- p += 2;
- else if (!(istrue = *p != '-'))
- p++;
-
- char ch, *eq;
- if ((eq = strchr (p, '=')) != NULL || (eq = strchr (p, ':')) != NULL)
- ch = *eq, *eq++ = '\0';
- else
- ch = 0;
-
- for (parse_thing *k = known; k->name != NULL; k++)
- if (ascii_strcasematch (p, k->name))
- {
- switch (k->disposition)
- {
- case isfunc:
- k->setting.func ((!eq || !istrue) ?
- k->values[istrue].s : eq);
- debug_printf ("%s (called func)", k->name);
- break;
- case justset:
- if (!istrue || !eq)
- *k->setting.x = k->values[istrue].i;
- else
- *k->setting.x = strtol (eq, NULL, 0);
- debug_printf ("%s %d", k->name, *k->setting.x);
- break;
- case set_process_state:
- k->setting.x = &myself->process_state;
- /* fall through */
- case setbit:
- *k->setting.x &= ~k->values[istrue].i;
- if (istrue || (eq && strtol (eq, NULL, 0)))
- *k->setting.x |= k->values[istrue].i;
- debug_printf ("%s %x", k->name, *k->setting.x);
- break;
- }
-
- if (eq)
- *--eq = ch;
-
- int n = eq - p;
- p = strdup (keyword_here);
- if (n > 0)
- p[n] = ':';
- k->remember = p;
- break;
- }
- }
- debug_printf ("returning");
-}
-
-/* Set options from the registry. */
-static bool __stdcall
-regopt (const char *name, char *buf)
-{
- bool parsed_something = false;
- char lname[strlen (name) + 1];
- strlwr (strcpy (lname, name));
-
- for (int i = 0; i < 2; i++)
- {
- reg_key r (i, KEY_READ, CYGWIN_INFO_PROGRAM_OPTIONS_NAME, NULL);
-
- if (r.get_string (lname, buf, NT_MAX_PATH, "") == ERROR_SUCCESS)
- {
- parse_options (buf);
- parsed_something = true;
- break;
- }
- }
-
- MALLOC_CHECK;
- return parsed_something;
-}
-
-/* Initialize the environ array. Look for the CYGWIN environment
- environment variable and set appropriate options from it. */
-void
-environ_init (char **envp, int envc)
-{
- PWCHAR rawenv, w;
- int i;
- char *p;
- char *newp;
- int sawTERM = 0;
- bool envp_passed_in;
- bool got_something_from_registry;
- static char NO_COPY cygterm[] = "TERM=cygwin";
- myfault efault;
- tmp_pathbuf tp;
-
- if (efault.faulted ())
- api_fatal ("internal error reading the windows environment - too many environment variables?");
-
- if (!conv_start_chars[0])
- for (int i = 0; conv_envvars[i].name != NULL; i++)
- {
- conv_start_chars[(int) cyg_tolower (conv_envvars[i].name[0])] = 1;
- conv_start_chars[(int) cyg_toupper (conv_envvars[i].name[0])] = 1;
- }
-
- char *tmpbuf = tp.t_get ();
- got_something_from_registry = regopt ("default", tmpbuf);
- if (myself->progname[0])
- got_something_from_registry = regopt (myself->progname, tmpbuf)
- || got_something_from_registry;
-
- if (!envp)
- envp_passed_in = 0;
- else
- {
- envc++;
- envc *= sizeof (char *);
- char **newenv = (char **) malloc (envc);
- memcpy (newenv, envp, envc);
- cfree (envp);
-
- /* Older applications relied on the fact that cygwin malloced elements of the
- environment list. */
- envp = newenv;
- if (ENVMALLOC)
- for (char **e = newenv; *e; e++)
- {
- char *p = *e;
- *e = strdup (p);
- cfree (p);
- }
- envp_passed_in = 1;
- goto out;
- }
-
- /* Allocate space for environment + trailing NULL + CYGWIN env. */
- lastenviron = envp = (char **) malloc ((4 + (envc = 100)) * sizeof (char *));
-
- /* We need the CYGWIN variable content before we can loop through
- the whole environment, so that the wide-char to multibyte conversion
- can be done according to the "codepage" setting, as well as the
- uppercasing according to the "upcaseenv" setting. */
- if ((i = GetEnvironmentVariableA ("CYGWIN", NULL, 0)))
- {
- char *buf = (char *) alloca (i);
- GetEnvironmentVariableA ("CYGWIN", buf, i);
- parse_options (buf);
- }
-
- rawenv = GetEnvironmentStringsW ();
- if (!rawenv)
- {
- system_printf ("GetEnvironmentStrings returned NULL, %E");
- return;
- }
- debug_printf ("GetEnvironmentStrings returned %p", rawenv);
-
- /* Current directory information is recorded as variables of the
- form "=X:=X:\foo\bar; these must be changed into something legal
- (we could just ignore them but maybe an application will
- eventually want to use them). */
- for (i = 0, w = rawenv; *w != L'\0'; w = wcschr (w, L'\0') + 1, i++)
- {
- sys_wcstombs_alloc (&newp, HEAP_NOTHEAP, w);
- if (i >= envc)
- envp = (char **) realloc (envp, (4 + (envc += 100)) * sizeof (char *));
- envp[i] = newp;
- if (*newp == '=')
- *newp = '!';
- char *eq = strechr (newp, '=');
- ucenv (newp, eq); /* (possibly conditionally) uppercase env vars. */
- if (*newp == 'T' && strncmp (newp, "TERM=", 5) == 0)
- sawTERM = 1;
- if (*eq && conv_start_chars[(unsigned char) envp[i][0]])
- posify (envp + i, *++eq ? eq : --eq, tmpbuf);
- debug_printf ("%p: %s", envp[i], envp[i]);
- }
-
- if (!sawTERM)
- envp[i++] = strdup (cygterm);
- envp[i] = NULL;
- FreeEnvironmentStringsW (rawenv);
-
-out:
- findenv_func = (char * (*)(const char*, int*)) my_findenv;
- __cygwin_environ = envp;
- update_envptrs ();
- if (envp_passed_in)
- {
- p = getenv ("CYGWIN");
- if (p)
- parse_options (p);
- }
-
- if (got_something_from_registry)
- parse_options (NULL); /* possibly export registry settings to
- environment */
- MALLOC_CHECK;
-}
-
-/* Function called by qsort to sort environment strings. */
-static int
-env_sort (const void *a, const void *b)
-{
- const char **p = (const char **) a;
- const char **q = (const char **) b;
-
- return strcmp (*p, *q);
-}
-
-char * __stdcall
-getwinenveq (const char *name, size_t namelen, int x)
-{
- WCHAR name0[namelen - 1];
- WCHAR valbuf[32768]; /* Max size of an env.var including trailing '\0'. */
-
- name0[sys_mbstowcs (name0, sizeof name0, name, namelen - 1)] = L'\0';
- int totlen = GetEnvironmentVariableW (name0, valbuf, 32768);
- if (totlen > 0)
- {
- totlen = sys_wcstombs (NULL, 0, valbuf);
- if (x == HEAP_1_STR)
- totlen += namelen;
- else
- namelen = 0;
- char *p = (char *) cmalloc_abort ((cygheap_types) x, totlen);
- if (namelen)
- strcpy (p, name);
- sys_wcstombs (p + namelen, totlen, valbuf);
- debug_printf ("using value from GetEnvironmentVariable for '%W'", name0);
- return p;
- }
-
- debug_printf ("warning: %s not present in environment", name);
- return NULL;
-}
-
-struct spenv
-{
- const char *name;
- size_t namelen;
- bool force_into_environment; /* If true, always add to env if missing */
- bool add_if_exists; /* if true, retrieve value from cache */
- const char * (cygheap_user::*from_cygheap) (const char *, size_t);
-
- char *retrieve (bool, const char * const = NULL)
- __attribute__ ((regparm (3)));
-};
-
-#define env_dontadd almost_null
-
-/* Keep this list in upper case and sorted */
-static NO_COPY spenv spenvs[] =
-{
-#ifdef DEBUGGING
- {NL ("CYGWIN_DEBUG="), false, true, NULL},
-#endif
- {NL ("HOMEDRIVE="), false, false, &cygheap_user::env_homedrive},
- {NL ("HOMEPATH="), false, false, &cygheap_user::env_homepath},
- {NL ("LOGONSERVER="), false, false, &cygheap_user::env_logsrv},
- {NL ("PATH="), false, true, NULL},
- {NL ("SYSTEMDRIVE="), false, true, NULL},
- {NL ("SYSTEMROOT="), true, true, &cygheap_user::env_systemroot},
- {NL ("USERDOMAIN="), false, false, &cygheap_user::env_domain},
- {NL ("USERNAME="), false, false, &cygheap_user::env_name},
- {NL ("USERPROFILE="), false, false, &cygheap_user::env_userprofile},
- {NL ("WINDIR="), true, true, &cygheap_user::env_systemroot}
-};
-
-char *
-spenv::retrieve (bool no_envblock, const char *const env)
-{
- if (env && !ascii_strncasematch (env, name, namelen))
- return NULL;
-
- debug_printf ("no_envblock %d", no_envblock);
-
- if (from_cygheap)
- {
- const char *p;
- if (env && !cygheap->user.issetuid ())
- {
- debug_printf ("duping existing value for '%s'", name);
- /* Don't really care what it's set to if we're calling a cygwin program */
- return cstrdup1 (env);
- }
-
- /* Calculate (potentially) value for given environment variable. */
- p = (cygheap->user.*from_cygheap) (name, namelen);
- if (!p || (no_envblock && !env) || (p == env_dontadd))
- return env_dontadd;
- char *s = (char *) cmalloc_abort (HEAP_1_STR, namelen + strlen (p) + 1);
- strcpy (s, name);
- strcpy (s + namelen, p);
- debug_printf ("using computed value for '%s'", name);
- return s;
- }
-
- if (env)
- return cstrdup1 (env);
-
- return getwinenveq (name, namelen, HEAP_1_STR);
-}
-
-#define SPENVS_SIZE (sizeof (spenvs) / sizeof (spenvs[0]))
-
-/* Create a Windows-style environment block, i.e. a typical character buffer
- filled with null terminated strings, terminated by double null characters.
- Converts environment variables noted in conv_envvars into win32 form
- prior to placing them in the string. */
-char ** __stdcall
-build_env (const char * const *envp, PWCHAR &envblock, int &envc,
- bool no_envblock)
-{
- int len, n;
- const char * const *srcp;
- char **dstp;
- bool saw_spenv[SPENVS_SIZE] = {0};
-
- debug_printf ("envp %p", envp);
-
- /* How many elements? */
- for (n = 0; envp[n]; n++)
- continue;
-
- /* Allocate a new "argv-style" environ list with room for extra stuff. */
- char **newenv = (char **) cmalloc_abort (HEAP_1_ARGV, sizeof (char *) *
- (n + SPENVS_SIZE + 1));
-
- int tl = 0;
- char **pass_dstp;
- char **pass_env = (char **) alloca (sizeof (char *) * (n + SPENVS_SIZE + 1));
- /* Iterate over input list, generating a new environment list and refreshing
- "special" entries, if necessary. */
- for (srcp = envp, dstp = newenv, pass_dstp = pass_env; *srcp; srcp++)
- {
- bool calc_tl = !no_envblock;
- /* Look for entries that require special attention */
- for (unsigned i = 0; i < SPENVS_SIZE; i++)
- if (!saw_spenv[i] && (*dstp = spenvs[i].retrieve (no_envblock, *srcp)))
- {
- saw_spenv[i] = 1;
- if (*dstp == env_dontadd)
- goto next1;
- if (spenvs[i].add_if_exists)
- calc_tl = true;
- goto next0;
- }
-
- /* Add entry to new environment */
- *dstp = cstrdup1 (*srcp);
-
- next0:
- if (calc_tl)
- {
- *pass_dstp++ = *dstp;
- tl += strlen (*dstp) + 1;
- }
- dstp++;
- next1:
- continue;
- }
-
- assert ((srcp - envp) == n);
- /* Fill in any required-but-missing environment variables. */
- for (unsigned i = 0; i < SPENVS_SIZE; i++)
- if (!saw_spenv[i] && (spenvs[i].force_into_environment || cygheap->user.issetuid ()))
- {
- *dstp = spenvs[i].retrieve (false);
- if (*dstp && *dstp != env_dontadd)
- {
- *pass_dstp++ = *dstp;
- tl += strlen (*dstp) + 1;
- dstp++;
- }
- }
-
- envc = dstp - newenv; /* Number of entries in newenv */
- assert ((size_t) envc <= (n + SPENVS_SIZE));
- *dstp = NULL; /* Terminate */
-
- size_t pass_envc = pass_dstp - pass_env;
- if (!pass_envc)
- envblock = NULL;
- else
- {
- *pass_dstp = NULL;
- debug_printf ("env count %d, bytes %d", pass_envc, tl);
- win_env temp;
- temp.reset ();
-
- /* Windows programs expect the environment block to be sorted. */
- qsort (pass_env, pass_envc, sizeof (char *), env_sort);
-
- /* Create an environment block suitable for passing to CreateProcess. */
- PWCHAR s;
- envblock = (PWCHAR) malloc ((2 + tl) * sizeof (WCHAR));
- int new_tl = 0;
- for (srcp = pass_env, s = envblock; *srcp; srcp++)
- {
- const char *p;
- win_env *conv;
- len = strcspn (*srcp, "=") + 1;
- const char *rest = *srcp + len;
-
- /* Check for a bad entry. This is necessary to get rid of empty
- strings, induced by putenv and changing the string afterwards.
- Note that this doesn't stop invalid strings without '=' in it
- etc., but we're opting for speed here for now. Adding complete
- checking would be pretty expensive. */
- if (len == 1 || !*rest)
- continue;
-
- /* See if this entry requires posix->win32 conversion. */
- conv = getwinenv (*srcp, rest, &temp);
- if (conv)
- p = conv->native; /* Use win32 path */
- else
- p = *srcp; /* Don't worry about it */
-
- len = strlen (p) + 1;
- new_tl += len; /* Keep running total of block length so far */
-
- /* See if we need to increase the size of the block. */
- if (new_tl > tl)
- {
- tl = new_tl + 100;
- PWCHAR new_envblock =
- (PWCHAR) realloc (envblock, (2 + tl) * sizeof (WCHAR));
- /* If realloc moves the block, move `s' with it. */
- if (new_envblock != envblock)
- {
- s += new_envblock - envblock;
- envblock = new_envblock;
- }
- }
-
- int slen = sys_mbstowcs (s, len, p, len);
-
- /* See if environment variable is "special" in a Windows sense.
- Under NT, the current directories for visited drives are stored
- as =C:=\bar. Cygwin converts the '=' to '!' for hopefully obvious
- reasons. We need to convert it back when building the envblock */
- if (s[0] == L'!' && (iswdrive (s + 1) || (s[1] == L':' && s[2] == L':'))
- && s[3] == L'=')
- *s = L'=';
- s += slen + 1;
- }
- *s = L'\0'; /* Two null bytes at the end */
- assert ((s - envblock) <= tl); /* Detect if we somehow ran over end
- of buffer */
- }
-
- debug_printf ("envp %p, envc %d", newenv, envc);
- return newenv;
-}
-
-/* This idiocy is necessary because the early implementers of cygwin
- did not seem to know about importing data variables from the DLL.
- So, we have to synchronize cygwin's idea of the environment with the
- main program's with each reference to the environment. */
-extern "C" char ** __stdcall
-cur_environ ()
-{
- if (*main_environ != __cygwin_environ)
- {
- __cygwin_environ = *main_environ;
- update_envptrs ();
- }
-
- return __cygwin_environ;
-}
diff --git a/winsup/cygwin/environ.h b/winsup/cygwin/environ.h
deleted file mode 100644
index 78305a8..0000000
--- a/winsup/cygwin/environ.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* environ.h: Declarations for environ manipulation
-
- Copyright 2000, 2001, 2002, 2003, 2005, 2006, 2008 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. */
-
-/* Initialize the environment */
-void environ_init (char **, int)
- __attribute__ ((regparm (2)));
-
-/* The structure below is used to control conversion to/from posix-style
- file specs. Currently, only PATH and HOME are converted, but PATH
- needs to use a "convert path list" function while HOME needs a simple
- "convert to posix/win32". */
-struct win_env
- {
- const char *name;
- size_t namelen;
- char *posix;
- char *native;
- ssize_t (*toposix) (const void *, void *, size_t);
- ssize_t (*towin32) (const void *, void *, size_t);
- bool immediate;
- void add_cache (const char *in_posix, const char *in_native = NULL)
- __attribute__ ((regparm (3)));
- const char * get_native () const {return native ? native + namelen : NULL;}
- const char * get_posix () const {return posix ? posix : NULL;}
- struct win_env& operator = (struct win_env& x);
- void reset () {native = posix = NULL;}
- ~win_env ();
- };
-
-win_env * __stdcall getwinenv (const char *name, const char *posix = NULL, win_env * = NULL)
- __attribute__ ((regparm (3)));
-char * __stdcall getwinenveq (const char *name, size_t len, int)
- __attribute__ ((regparm (3)));
-
-void __stdcall update_envptrs ();
-extern "C" char **__cygwin_environ, ***main_environ;
-extern "C" char __stdcall **cur_environ ();
-char ** __stdcall build_env (const char * const *envp, PWCHAR &envblock,
- int &envc, bool need_envblock)
- __attribute__ ((regparm (3)));
-
-#define ENV_CVT -1
diff --git a/winsup/cygwin/errno.cc b/winsup/cygwin/errno.cc
deleted file mode 100644
index 2d8207c..0000000
--- a/winsup/cygwin/errno.cc
+++ /dev/null
@@ -1,363 +0,0 @@
-/* errno.cc: errno-related functions
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2008 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 _sys_nerr FOO_sys_nerr
-#define sys_nerr FOOsys_nerr
-#define _sys_errlist FOO_sys_errlist
-#include "winsup.h"
-#include "cygtls.h"
-#undef _sys_nerr
-#undef sys_nerr
-#undef _sys_errlist
-
-/* Table to map Windows error codes to Errno values. */
-/* FIXME: Doing things this way is a little slow. It's trivial to change
- this into a big case statement if necessary. Left as is for now. */
-
-#define X(w, e) {ERROR_##w, #w, e}
-
-static NO_COPY struct
-{
- DWORD w; /* windows version of error */
- const char *s; /* text of windows version */
- int e; /* errno version of error */
-} errmap[] =
-{
- /* FIXME: Some of these choices are arbitrary! */
- X (ACCESS_DENIED, EACCES),
- X (ACTIVE_CONNECTIONS, EAGAIN),
- X (ALREADY_EXISTS, EEXIST),
- X (BAD_DEVICE, ENODEV),
- X (BAD_NETPATH, ENOSHARE),
- X (BAD_NET_NAME, ENOSHARE),
- X (BAD_PATHNAME, ENOENT),
- X (BAD_PIPE, EINVAL),
- X (BAD_UNIT, ENODEV),
- X (BAD_USERNAME, EINVAL),
- X (BEGINNING_OF_MEDIA, EIO),
- X (BROKEN_PIPE, EPIPE),
- X (BUSY, EBUSY),
- X (BUS_RESET, EIO),
- X (CALL_NOT_IMPLEMENTED, ENOSYS),
- X (CANNOT_MAKE, EPERM),
- X (CHILD_NOT_COMPLETE, EBUSY),
- X (COMMITMENT_LIMIT, EAGAIN),
- X (CRC, EIO),
- X (DEVICE_DOOR_OPEN, EIO),
- X (DEVICE_IN_USE, EAGAIN),
- X (DEVICE_REQUIRES_CLEANING, EIO),
- X (DIRECTORY, ENOTDIR),
- X (DIR_NOT_EMPTY, ENOTEMPTY),
- X (DISK_CORRUPT, EIO),
- X (DISK_FULL, ENOSPC),
- X (DUP_NAME, ENOTUNIQ),
- X (EAS_DIDNT_FIT, ENOSPC),
- X (EAS_NOT_SUPPORTED, ENOTSUP),
- X (EA_LIST_INCONSISTENT, EINVAL),
- X (EA_TABLE_FULL, ENOSPC),
- X (END_OF_MEDIA, ENOSPC),
- X (EOM_OVERFLOW, EIO),
- X (FILEMARK_DETECTED, EIO),
- X (FILENAME_EXCED_RANGE, ENAMETOOLONG),
- X (FILE_CORRUPT, EEXIST),
- X (FILE_EXISTS, EEXIST),
- X (FILE_INVALID, ENXIO),
- X (FILE_NOT_FOUND, ENOENT),
- X (HANDLE_DISK_FULL, ENOSPC),
- X (HANDLE_EOF, ENODATA),
- X (INVALID_ADDRESS, EINVAL),
- X (INVALID_AT_INTERRUPT_TIME, EINTR),
- X (INVALID_BLOCK_LENGTH, EIO),
- X (INVALID_DATA, EINVAL),
- X (INVALID_DRIVE, ENODEV),
- X (INVALID_EA_NAME, EINVAL),
- X (INVALID_FUNCTION, EBADRQC),
- X (INVALID_HANDLE, EBADF),
- X (INVALID_NAME, ENOENT),
- X (INVALID_PARAMETER, EINVAL),
- X (INVALID_SIGNAL_NUMBER, EINVAL),
- X (IO_DEVICE, EIO),
- X (IO_PENDING, EAGAIN),
- X (LOCK_VIOLATION, EACCES),
- X (MAX_THRDS_REACHED, EAGAIN),
- X (META_EXPANSION_TOO_LONG, EINVAL),
- X (MOD_NOT_FOUND, ENOENT),
- X (MORE_DATA, EMSGSIZE),
- X (NEGATIVE_SEEK, EINVAL),
- X (NETNAME_DELETED, ENOSHARE),
- X (NOACCESS, EFAULT),
- X (NONPAGED_SYSTEM_RESOURCES, EAGAIN),
- X (NONE_MAPPED, EINVAL),
- X (NOT_CONNECTED, ENOLINK),
- X (NOT_ENOUGH_MEMORY, ENOMEM),
- X (NOT_OWNER, EPERM),
- X (NOT_READY, ENOMEDIUM),
- X (NOT_SAME_DEVICE, EXDEV),
- X (NOT_SUPPORTED, ENOSYS),
- X (NO_DATA, EPIPE),
- X (NO_DATA_DETECTED, EIO),
- X (NO_MEDIA_IN_DRIVE, ENOMEDIUM),
- X (NO_MORE_FILES, ENMFILE),
- X (NO_MORE_ITEMS, ENMFILE),
- X (NO_MORE_SEARCH_HANDLES, ENFILE),
- X (NO_PROC_SLOTS, EAGAIN),
- X (NO_SIGNAL_SENT, EIO),
- X (NO_SYSTEM_RESOURCES, EAGAIN),
- X (NO_TOKEN, EINVAL),
- X (OPEN_FAILED, EIO),
- X (OPEN_FILES, EAGAIN),
- X (OUTOFMEMORY, ENOMEM),
- X (PAGED_SYSTEM_RESOURCES, EAGAIN),
- X (PAGEFILE_QUOTA, EAGAIN),
- X (PATH_NOT_FOUND, ENOENT),
- X (PIPE_BUSY, EBUSY),
- X (PIPE_CONNECTED, EBUSY),
- X (PIPE_LISTENING, ECOMM),
- X (PIPE_NOT_CONNECTED, ECOMM),
- X (POSSIBLE_DEADLOCK, EDEADLOCK),
- X (PROCESS_ABORTED, EFAULT),
- X (PROC_NOT_FOUND, ESRCH),
- X (REM_NOT_LIST, ENONET),
- X (SETMARK_DETECTED, EIO),
- X (SHARING_BUFFER_EXCEEDED, ENOLCK),
- X (SHARING_VIOLATION, EBUSY),
- X (SIGNAL_PENDING, EBUSY),
- X (SIGNAL_REFUSED, EIO),
- X (THREAD_1_INACTIVE, EINVAL),
- X (TOO_MANY_LINKS, EMLINK),
- X (TOO_MANY_OPEN_FILES, EMFILE),
- X (WAIT_NO_CHILDREN, ECHILD),
- X (WORKING_SET_QUOTA, EAGAIN),
- X (WRITE_PROTECT, EROFS),
- X (SEEK, EINVAL),
- X (SECTOR_NOT_FOUND, EINVAL),
- { 0, NULL, 0}
-};
-
-extern "C" {
-const char *_sys_errlist[] NO_COPY_INIT =
-{
-/* NOERROR 0 */ "No error",
-/* EPERM 1 */ "Operation not permitted",
-/* ENOENT 2 */ "No such file or directory",
-/* ESRCH 3 */ "No such process",
-/* EINTR 4 */ "Interrupted system call",
-/* EIO 5 */ "Input/Output error",
-/* ENXIO 6 */ "No such device or address",
-/* E2BIG 7 */ "Argument list too long",
-/* ENOEXEC 8 */ "Exec format error",
-/* EBADF 9 */ "Bad file descriptor",
-/* ECHILD 10 */ "No child processes",
-/* EAGAIN 11 */ "Resource temporarily unavailable",
-/* ENOMEM 12 */ "Cannot allocate memory",
-/* EACCES 13 */ "Permission denied",
-/* EFAULT 14 */ "Bad address",
-/* ENOTBLK 15 */ "Block device required",
-/* EBUSY 16 */ "Device or resource busy",
-/* EEXIST 17 */ "File exists",
-/* EXDEV 18 */ "Invalid cross-device link",
-/* ENODEV 19 */ "No such device",
-/* ENOTDIR 20 */ "Not a directory",
-/* EISDIR 21 */ "Is a directory",
-/* EINVAL 22 */ "Invalid argument",
-/* ENFILE 23 */ "Too many open files in system",
-/* EMFILE 24 */ "Too many open files",
-/* ENOTTY 25 */ "Inappropriate ioctl for device",
-/* ETXTBSY 26 */ "Text file busy",
-/* EFBIG 27 */ "File too large",
-/* ENOSPC 28 */ "No space left on device",
-/* ESPIPE 29 */ "Illegal seek",
-/* EROFS 30 */ "Read-only file system",
-/* EMLINK 31 */ "Too many links",
-/* EPIPE 32 */ "Broken pipe",
-/* EDOM 33 */ "Numerical argument out of domain",
-/* ERANGE 34 */ "Numerical result out of range",
-/* ENOMSG 35 */ "No message of desired type",
-/* EIDRM 36 */ "Identifier removed",
-/* ECHRNG 37 */ "Channel number out of range",
-/* EL2NSYNC 38 */ "Level 2 not synchronized",
-/* EL3HLT 39 */ "Level 3 halted",
-/* EL3RST 40 */ "Level 3 reset",
-/* ELNRNG 41 */ "Link number out of range",
-/* EUNATCH 42 */ "Protocol driver not attached",
-/* ENOCSI 43 */ "No CSI structure available",
-/* EL2HLT 44 */ "Level 2 halted",
-/* EDEADLK 45 */ "Resource deadlock avoided",
-/* ENOLCK 46 */ "No locks available",
- "error 47",
- "error 48",
- "error 49",
-/* EBADE 50 */ "Invalid exchange",
-/* EBADR 51 */ "Invalid request descriptor",
-/* EXFULL 52 */ "Exchange full",
-/* ENOANO 53 */ "No anode",
-/* EBADRQC 54 */ "Invalid request code",
-/* EBADSLT 55 */ "Invalid slot",
-/* EDEADLOCK 56 */ "File locking deadlock error",
-/* EBFONT 57 */ "Bad font file format",
- "error 58",
- "error 59",
-/* ENOSTR 60 */ "Device not a stream",
-/* ENODATA 61 */ "No data available",
-/* ETIME 62 */ "Timer expired",
-/* ENOSR 63 */ "Out of streams resources",
-/* ENONET 64 */ "Machine is not on the network",
-/* ENOPKG 65 */ "Package not installed",
-/* EREMOTE 66 */ "Object is remote",
-/* ENOLINK 67 */ "Link has been severed",
-/* EADV 68 */ "Advertise error",
-/* ESRMNT 69 */ "Srmount error",
-/* ECOMM 70 */ "Communication error on send",
-/* EPROTO 71 */ "Protocol error",
- "error 72",
- "error 73",
-/* EMULTIHOP 74 */ "Multihop attempted",
-/* ELBIN 75 */ "Inode is remote (not really error)",
-/* EDOTDOT 76 */ "RFS specific error",
-/* EBADMSG 77 */ "Bad message",
- "error 78",
-/* EFTYPE 79 */ "Inappropriate file type or format",
-/* ENOTUNIQ 80 */ "Name not unique on network",
-/* EBADFD 81 */ "File descriptor in bad state",
-/* EREMCHG 82 */ "Remote address changed",
-/* ELIBACC 83 */ "Can not access a needed shared library",
-/* ELIBBAD 84 */ "Accessing a corrupted shared library",
-/* ELIBSCN 85 */ ".lib section in a.out corrupted",
-/* ELIBMAX 86 */ "Attempting to link in too many shared libraries",
-/* ELIBEXEC 87 */ "Cannot exec a shared library directly",
-/* ENOSYS 88 */ "Function not implemented",
-/* ENMFILE 89 */ "No more files",
-/* ENOTEMPTY 90 */ "Directory not empty",
-/* ENAMETOOLONG 91 */ "File name too long",
-/* ELOOP 92 */ "Too many levels of symbolic links",
- "error 93",
- "error 94",
-/* EOPNOTSUPP 95 */ "Operation not supported",
-/* EPFNOSUPPORT 96 */ "Protocol family not supported",
- "error 97",
- "error 98",
- "error 99",
- "error 100",
- "error 101",
- "error 102",
- "error 103",
-/* ECONNRESET 104 */ "Connection reset by peer",
-/* ENOBUFS 105 */ "No buffer space available",
-/* EAFNOSUPPORT 106 */ "Address family not supported by protocol",
-/* EPROTOTYPE 107 */ "Protocol wrong type for socket",
-/* ENOTSOCK 108 */ "Socket operation on non-socket",
-/* ENOPROTOOPT 109 */ "Protocol not available",
-/* ESHUTDOWN 110 */ "Cannot send after transport endpoint shutdown",
-/* ECONNREFUSED 111 */ "Connection refused",
-/* EADDRINUSE 112 */ "Address already in use",
-/* ECONNABORTED 113 */ "Software caused connection abort",
-/* ENETUNREACH 114 */ "Network is unreachable",
-/* ENETDOWN 115 */ "Network is down",
-/* ETIMEDOUT 116 */ "Connection timed out",
-/* EHOSTDOWN 117 */ "Host is down",
-/* EHOSTUNREACH 118 */ "No route to host",
-/* EINPROGRESS 119 */ "Operation now in progress",
-/* EALREADY 120 */ "Operation already in progress",
-/* EDESTADDRREQ 121 */ "Destination address required",
-/* EMSGSIZE 122 */ "Message too long",
-/* EPROTONOSUPPORT 123 */ "Protocol not supported",
-/* ESOCKTNOSUPPORT 124 */ "Socket type not supported",
-/* EADDRNOTAVAIL 125 */ "Cannot assign requested address",
-/* ENETRESET 126 */ "Network dropped connection on reset",
-/* EISCONN 127 */ "Transport endpoint is already connected",
-/* ENOTCONN 128 */ "Transport endpoint is not connected",
-/* ETOOMANYREFS 129 */ "Too many references: cannot splice",
-/* EPROCLIM 130 */ "Too many processes",
-/* EUSERS 131 */ "Too many users",
-/* EDQUOT 132 */ "Disk quota exceeded",
-/* ESTALE 133 */ "Stale NFS file handle",
-/* ENOTSUP 134 */ "Not supported",
-/* ENOMEDIUM 135 */ "No medium found",
-/* ENOSHARE 136 */ "No such host or network path",
-/* ECASECLASH 137 */ "Filename exists with different case",
-/* EILSEQ 138 */ "Invalid or incomplete multibyte or wide character",
-/* EOVERFLOW 139 */ "Value too large for defined data type",
-/* ECANCELED 140 */ "Operation canceled",
-/* ENOTRECOVERABLE 141 */ "State not recoverable",
-/* EOWNERDEAD 142 */ "Previous owner died"
-};
-
-int NO_COPY_INIT _sys_nerr = sizeof (_sys_errlist) / sizeof (_sys_errlist[0]);
-};
-
-int __stdcall
-geterrno_from_win_error (DWORD code, int deferrno)
-{
- for (int i = 0; errmap[i].w != 0; ++i)
- if (code == errmap[i].w)
- {
- syscall_printf ("windows error %u == errno %d", code, errmap[i].e);
- return errmap[i].e;
- }
-
- syscall_printf ("unknown windows error %u, setting errno to %d", code,
- deferrno);
- return deferrno; /* FIXME: what's so special about EACCESS? */
-}
-
-/* seterrno_from_win_error: Given a Windows error code, set errno
- as appropriate. */
-void __stdcall
-seterrno_from_win_error (const char *file, int line, DWORD code)
-{
- syscall_printf ("%s:%d windows error %d", file, line, code);
- set_errno (geterrno_from_win_error (code, EACCES));
-}
-
-/* seterrno: Set `errno' based on GetLastError (). */
-void __stdcall
-seterrno (const char *file, int line)
-{
- seterrno_from_win_error (file, line, GetLastError ());
-}
-
-extern char *_user_strerror _PARAMS ((int));
-
-static char *
-strerror_worker (int errnum)
-{
- char *res;
- if (errnum >= 0 && errnum < _sys_nerr)
- res = (char *) _sys_errlist [errnum];
- else
- res = NULL;
- return res;
-}
-
-/* strerror: convert from errno values to error strings */
-extern "C" char *
-strerror (int errnum)
-{
- char *errstr = strerror_worker (errnum);
- if (!errstr)
- __small_sprintf (errstr = _my_tls.locals.strerror_buf, "Unknown error %u",
- (unsigned) errnum);
- return errstr;
-}
-
-#if 0
-extern "C" int
-strerror_r (int errnum, char *buf, size_t n)
-{
- char *errstr = strerror_worker (errnum);
- if (!errstr)
- return EINVAL;
- if (strlen (errstr) >= n)
- return ERANGE;
- strcpy (buf, errstr);
- return 0;
-}
-#endif
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
deleted file mode 100644
index 950ab86..0000000
--- a/winsup/cygwin/exceptions.cc
+++ /dev/null
@@ -1,1434 +0,0 @@
-/* exceptions.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "miscfuncs.h"
-#include <wingdi.h>
-#include <winuser.h>
-#include <imagehlp.h>
-#include <stdlib.h>
-#include <syslog.h>
-#include <wchar.h>
-
-#include "pinfo.h"
-#include "cygtls.h"
-#include "sigproc.h"
-#include "shared_info.h"
-#include "perprocess.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "child_info.h"
-#include "ntdll.h"
-
-#define CALL_HANDLER_RETRY 20
-
-char debugger_command[2 * NT_MAX_PATH + 20];
-
-extern "C" {
-extern void sigdelayed ();
-};
-
-extern child_info_spawn *chExeced;
-int NO_COPY sigExeced;
-
-static BOOL WINAPI ctrl_c_handler (DWORD);
-static WCHAR windows_system_directory[1024];
-static size_t windows_system_directory_length;
-
-/* This is set to indicate that we have already exited. */
-
-static NO_COPY int exit_already = 0;
-static muto NO_COPY mask_sync;
-
-NO_COPY static struct
-{
- unsigned int code;
- const char *name;
-} status_info[] =
-{
-#define X(s) s, #s
- { X (STATUS_ABANDONED_WAIT_0) },
- { X (STATUS_ACCESS_VIOLATION) },
- { X (STATUS_ARRAY_BOUNDS_EXCEEDED) },
- { X (STATUS_BREAKPOINT) },
- { X (STATUS_CONTROL_C_EXIT) },
- { X (STATUS_DATATYPE_MISALIGNMENT) },
- { X (STATUS_FLOAT_DENORMAL_OPERAND) },
- { X (STATUS_FLOAT_DIVIDE_BY_ZERO) },
- { X (STATUS_FLOAT_INEXACT_RESULT) },
- { X (STATUS_FLOAT_INVALID_OPERATION) },
- { X (STATUS_FLOAT_OVERFLOW) },
- { X (STATUS_FLOAT_STACK_CHECK) },
- { X (STATUS_FLOAT_UNDERFLOW) },
- { X (STATUS_GUARD_PAGE_VIOLATION) },
- { X (STATUS_ILLEGAL_INSTRUCTION) },
- { X (STATUS_INTEGER_DIVIDE_BY_ZERO) },
- { X (STATUS_INTEGER_OVERFLOW) },
- { X (STATUS_INVALID_DISPOSITION) },
- { X (STATUS_IN_PAGE_ERROR) },
- { X (STATUS_NONCONTINUABLE_EXCEPTION) },
- { X (STATUS_NO_MEMORY) },
- { X (STATUS_PENDING) },
- { X (STATUS_PRIVILEGED_INSTRUCTION) },
- { X (STATUS_SINGLE_STEP) },
- { X (STATUS_STACK_OVERFLOW) },
- { X (STATUS_TIMEOUT) },
- { X (STATUS_USER_APC) },
- { X (STATUS_WAIT_0) },
- { 0, 0 }
-#undef X
-};
-
-/* Initialization code. */
-
-void
-init_console_handler (bool install_handler)
-{
- BOOL res;
-
- SetConsoleCtrlHandler (ctrl_c_handler, FALSE);
- SetConsoleCtrlHandler (NULL, FALSE);
- if (install_handler)
- res = SetConsoleCtrlHandler (ctrl_c_handler, TRUE);
- else
- res = SetConsoleCtrlHandler (NULL, TRUE);
- if (!res)
- system_printf ("SetConsoleCtrlHandler failed, %E");
-}
-
-extern "C" void
-error_start_init (const char *buf)
-{
- if (!buf || !*buf)
- {
- debugger_command[0] = '\0';
- return;
- }
-
- char pgm[NT_MAX_PATH];
- if (!GetModuleFileName (NULL, pgm, NT_MAX_PATH))
- strcpy (pgm, "cygwin1.dll");
- for (char *p = strchr (pgm, '\\'); p; p = strchr (p, '\\'))
- *p = '/';
-
- __small_sprintf (debugger_command, "%s \"%s\"", buf, pgm);
-}
-
-static void
-open_stackdumpfile ()
-{
- if (myself->progname[0])
- {
- const char *p;
- /* write to progname.stackdump if possible */
- if (!myself->progname[0])
- p = "unknown";
- else if ((p = strrchr (myself->progname, '\\')))
- p++;
- else
- p = myself->progname;
-
- WCHAR corefile[strlen (p) + sizeof (".stackdump")];
- UNICODE_STRING ucore;
- OBJECT_ATTRIBUTES attr;
- /* Create the UNICODE variation of <progname>.stackdump. */
- RtlInitEmptyUnicodeString (&ucore, corefile,
- sizeof corefile - sizeof (WCHAR));
- ucore.Length = sys_mbstowcs (ucore.Buffer,
- ucore.MaximumLength / sizeof (WCHAR),
- p, strlen (p)) * sizeof (WCHAR);
- RtlAppendUnicodeToString (&ucore, L".stackdump");
- /* Create an object attribute which refers to <progname>.stackdump
- in Cygwin's cwd. Stick to caseinsensitivity. */
- InitializeObjectAttributes (&attr, &ucore, OBJ_CASE_INSENSITIVE,
- cygheap->cwd.get_handle (), NULL);
- HANDLE h;
- IO_STATUS_BLOCK io;
- NTSTATUS status;
- /* Try to open it to dump the stack in it. */
- status = NtCreateFile (&h, GENERIC_WRITE | SYNCHRONIZE, &attr, &io,
- NULL, FILE_ATTRIBUTE_NORMAL, 0, FILE_OVERWRITE_IF,
- FILE_SYNCHRONOUS_IO_NONALERT
- | FILE_OPEN_FOR_BACKUP_INTENT
- | FILE_OPEN_FOR_RECOVERY, NULL, 0);
- if (NT_SUCCESS (status))
- {
- if (!myself->cygstarted)
- system_printf ("Dumping stack trace to %S", &ucore);
- else
- debug_printf ("Dumping stack trace to %S", &ucore);
- SetStdHandle (STD_ERROR_HANDLE, h);
- }
- }
-}
-
-/* Utilities for dumping the stack, etc. */
-
-static void
-exception (EXCEPTION_RECORD *e, CONTEXT *in)
-{
- const char *exception_name = NULL;
-
- if (e)
- {
- for (int i = 0; status_info[i].name; i++)
- {
- if (status_info[i].code == e->ExceptionCode)
- {
- exception_name = status_info[i].name;
- break;
- }
- }
- }
-
- if (exception_name)
- small_printf ("Exception: %s at eip=%08x\r\n", exception_name, in->Eip);
- else
- small_printf ("Signal %d at eip=%08x\r\n", e->ExceptionCode, in->Eip);
- small_printf ("eax=%08x ebx=%08x ecx=%08x edx=%08x esi=%08x edi=%08x\r\n",
- in->Eax, in->Ebx, in->Ecx, in->Edx, in->Esi, in->Edi);
- small_printf ("ebp=%08x esp=%08x program=%s, pid %u, thread %s\r\n",
- in->Ebp, in->Esp, myself->progname, myself->pid, cygthread::name ());
- small_printf ("cs=%04x ds=%04x es=%04x fs=%04x gs=%04x ss=%04x\r\n",
- in->SegCs, in->SegDs, in->SegEs, in->SegFs, in->SegGs, in->SegSs);
-}
-
-/* A class for manipulating the stack. */
-class stack_info
-{
- int walk (); /* Uses the "old" method */
- char *next_offset () {return *((char **) sf.AddrFrame.Offset);}
- bool needargs;
- DWORD dummy_frame;
-public:
- STACKFRAME sf; /* For storing the stack information */
- void init (DWORD, bool, bool); /* Called the first time that stack info is needed */
-
- /* Postfix ++ iterates over the stack, returning zero when nothing is left. */
- int operator ++(int) { return walk (); }
-};
-
-/* The number of parameters used in STACKFRAME */
-#define NPARAMS (sizeof (thestack.sf.Params) / sizeof (thestack.sf.Params[0]))
-
-/* This is the main stack frame info for this process. */
-static NO_COPY stack_info thestack;
-
-/* Initialize everything needed to start iterating. */
-void
-stack_info::init (DWORD ebp, bool wantargs, bool goodframe)
-{
-# define debp ((DWORD *) ebp)
- memset (&sf, 0, sizeof (sf));
- if (!goodframe)
- sf.AddrFrame.Offset = ebp;
- else
- {
- dummy_frame = ebp;
- sf.AddrFrame.Offset = (DWORD) &dummy_frame;
- }
- sf.AddrReturn.Offset = debp[1];
- sf.AddrFrame.Mode = AddrModeFlat;
- needargs = wantargs;
-# undef debp
-}
-
-extern "C" void _cygwin_exit_return ();
-
-/* Walk the stack by looking at successive stored 'bp' frames.
- This is not foolproof. */
-int
-stack_info::walk ()
-{
- char **ebp;
-
- if ((void (*) ()) sf.AddrPC.Offset == _cygwin_exit_return)
- return 0; /* stack frames are exhausted */
-
- if (((ebp = (char **) next_offset ()) == NULL) || (ebp >= (char **) cygwin_hmodule))
- return 0;
-
- sf.AddrFrame.Offset = (DWORD) ebp;
- sf.AddrPC.Offset = sf.AddrReturn.Offset;
-
- /* The return address always follows the stack pointer */
- sf.AddrReturn.Offset = (DWORD) *++ebp;
-
- if (needargs)
- {
- unsigned nparams = NPARAMS;
-
- /* The arguments follow the return address */
- sf.Params[0] = (DWORD) *++ebp;
- /* Hack for XP/2K3 WOW64. If the first stack param points to the
- application entry point, we can only fetch one additional
- parameter. Accessing anything beyond this address results in
- a SEGV. This is fixed in Vista/2K8 WOW64. */
- if (wincap.has_restricted_stack_args () && sf.Params[0] == 0x401000)
- nparams = 2;
- for (unsigned i = 1; i < nparams; i++)
- sf.Params[i] = (DWORD) *++ebp;
- }
-
- return 1;
-}
-
-static void
-stackdump (DWORD ebp, int open_file, bool isexception)
-{
- extern unsigned long rlim_core;
- static bool already_dumped;
-
- if (rlim_core == 0UL || (open_file && already_dumped))
- return;
-
- if (open_file)
- open_stackdumpfile ();
-
- already_dumped = true;
-
- int i;
-
- thestack.init (ebp, 1, !isexception); /* Initialize from the input CONTEXT */
- small_printf ("Stack trace:\r\nFrame Function Args\r\n");
- for (i = 0; i < 16 && thestack++; i++)
- {
- small_printf ("%08x %08x ", thestack.sf.AddrFrame.Offset,
- thestack.sf.AddrPC.Offset);
- for (unsigned j = 0; j < NPARAMS; j++)
- small_printf ("%s%08x", j == 0 ? " (" : ", ", thestack.sf.Params[j]);
- small_printf (")\r\n");
- }
- small_printf ("End of stack trace%s\n",
- i == 16 ? " (more stack frames may be present)" : "");
-}
-
-bool
-_cygtls::inside_kernel (CONTEXT *cx)
-{
- int res;
- MEMORY_BASIC_INFORMATION m;
-
- if (!isinitialized ())
- return true;
-
- memset (&m, 0, sizeof m);
- if (!VirtualQuery ((LPCVOID) cx->Eip, &m, sizeof m))
- sigproc_printf ("couldn't get memory info, pc %p, %E", cx->Eip);
-
- size_t size = (windows_system_directory_length + 6) * sizeof (WCHAR);
- PWCHAR checkdir = (PWCHAR) alloca (size);
- memset (checkdir, 0, size);
-
-# define h ((HMODULE) m.AllocationBase)
- /* Apparently Windows 95 can sometimes return bogus addresses from
- GetThreadContext. These resolve to a strange allocation base.
- These should *never* be treated as interruptible. */
- if (!h || m.State != MEM_COMMIT)
- res = true;
- else if (h == user_data->hmodule)
- res = false;
- else if (!GetModuleFileNameW (h, checkdir, windows_system_directory_length + 6))
- res = false;
- else
- {
- /* Skip potential long path prefix. */
- if (!wcsncmp (checkdir, L"\\\\?\\", 4))
- checkdir += 4;
- res = !wcsncasecmp (windows_system_directory, checkdir,
- windows_system_directory_length);
- }
- sigproc_printf ("pc %p, h %p, inside_kernel %d", cx->Eip, h, res);
-# undef h
- return res;
-}
-
-/* Temporary (?) function for external callers to get a stack dump */
-extern "C" void
-cygwin_stackdump ()
-{
- CONTEXT c;
- c.ContextFlags = CONTEXT_FULL;
- GetThreadContext (GetCurrentThread (), &c);
- stackdump (c.Ebp, 0, 0);
-}
-
-#define TIME_TO_WAIT_FOR_DEBUGGER 10000
-
-extern "C" int
-try_to_debug (bool waitloop)
-{
- WCHAR dbg_cmd[sizeof debugger_command];
-
- debug_printf ("debugger_command '%s'", debugger_command);
- if (*debugger_command == '\0')
- return 0;
- if (being_debugged ())
- {
- extern void break_here ();
- break_here ();
- return 0;
- }
-
- __small_sprintf (strchr (debugger_command, '\0'), " %u", GetCurrentProcessId ());
-
- LONG prio = GetThreadPriority (GetCurrentThread ());
- SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_HIGHEST);
- PROCESS_INFORMATION pi = {NULL, 0, 0, 0};
-
- STARTUPINFOW si = {0, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL};
- si.lpReserved = NULL;
- si.lpDesktop = NULL;
- si.dwFlags = 0;
- si.cb = sizeof (si);
-
- /* FIXME: need to know handles of all running threads to
- suspend_all_threads_except (current_thread_id);
- */
-
- /* if any of these mutexes is owned, we will fail to start any cygwin app
- until trapped app exits */
-
- lock_ttys::release ();
-
- /* prevent recursive exception handling */
- PWCHAR rawenv = GetEnvironmentStringsW () ;
- for (PWCHAR p = rawenv; *p != L'\0'; p = wcschr (p, L'\0') + 1)
- {
- if (wcsncmp (p, L"CYGWIN=", wcslen (L"CYGWIN=")) == 0)
- {
- PWCHAR q = wcsstr (p, L"error_start") ;
- /* replace 'error_start=...' with '_rror_start=...' */
- if (q)
- {
- *q = L'_' ;
- SetEnvironmentVariableW (L"CYGWIN", p + wcslen (L"CYGWIN=")) ;
- }
- break ;
- }
- }
-
- console_printf ("*** starting debugger for pid %u, tid %u\n",
- cygwin_pid (GetCurrentProcessId ()), GetCurrentThreadId ());
- BOOL dbg;
- sys_mbstowcs (dbg_cmd, sizeof debugger_command, debugger_command);
- dbg = CreateProcessW (NULL,
- dbg_cmd,
- NULL,
- NULL,
- FALSE,
- CREATE_NEW_CONSOLE | CREATE_NEW_PROCESS_GROUP,
- NULL,
- NULL,
- &si,
- &pi);
-
- if (!dbg)
- system_printf ("Failed to start debugger, %E");
- else
- {
- if (!waitloop)
- return dbg;
- SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_IDLE);
- while (!being_debugged ())
- low_priority_sleep (0);
- Sleep (2000);
- }
-
- console_printf ("*** continuing pid %u from debugger call (%d)\n",
- cygwin_pid (GetCurrentProcessId ()), dbg);
-
- SetThreadPriority (GetCurrentThread (), prio);
- return dbg;
-}
-
-extern "C" DWORD __stdcall RtlUnwind (void *, void *, void *, DWORD);
-static void __stdcall rtl_unwind (exception_list *, PEXCEPTION_RECORD) __attribute__ ((noinline, regparm (3)));
-void __stdcall
-rtl_unwind (exception_list *frame, PEXCEPTION_RECORD e)
-{
- __asm__ ("\n\
- pushl %%ebx \n\
- pushl %%edi \n\
- pushl %%esi \n\
- pushl $0 \n\
- pushl %1 \n\
- pushl $1f \n\
- pushl %0 \n\
- call _RtlUnwind@16 \n\
-1: \n\
- popl %%esi \n\
- popl %%edi \n\
- popl %%ebx \n\
-": : "r" (frame), "r" (e));
-}
-
-/* Main exception handler. */
-
-extern exception_list *_except_list asm ("%fs:0");
-
-extern "C" char *__progname;
-int
-_cygtls::handle_exceptions (EXCEPTION_RECORD *e, exception_list *frame, CONTEXT *in, void *)
-{
- static bool NO_COPY debugging;
- static int NO_COPY recursed;
- _cygtls& me = _my_tls;
-
- if (debugging && ++debugging < 500000)
- {
- SetThreadPriority (hMainThread, THREAD_PRIORITY_NORMAL);
- return 0;
- }
-
- /* If we've already exited, don't do anything here. Returning 1
- tells Windows to keep looking for an exception handler. */
- if (exit_already || e->ExceptionFlags)
- return 1;
-
- siginfo_t si = {0};
- si.si_code = SI_KERNEL;
- /* Coerce win32 value to posix value. */
- switch (e->ExceptionCode)
- {
- case STATUS_FLOAT_DENORMAL_OPERAND:
- case STATUS_FLOAT_DIVIDE_BY_ZERO:
- case STATUS_FLOAT_INVALID_OPERATION:
- case STATUS_FLOAT_STACK_CHECK:
- si.si_signo = SIGFPE;
- si.si_code = FPE_FLTSUB;
- break;
- case STATUS_FLOAT_INEXACT_RESULT:
- si.si_signo = SIGFPE;
- si.si_code = FPE_FLTRES;
- break;
- case STATUS_FLOAT_OVERFLOW:
- si.si_signo = SIGFPE;
- si.si_code = FPE_FLTOVF;
- break;
- case STATUS_FLOAT_UNDERFLOW:
- si.si_signo = SIGFPE;
- si.si_code = FPE_FLTUND;
- break;
- case STATUS_INTEGER_DIVIDE_BY_ZERO:
- si.si_signo = SIGFPE;
- si.si_code = FPE_INTDIV;
- break;
- case STATUS_INTEGER_OVERFLOW:
- si.si_signo = SIGFPE;
- si.si_code = FPE_INTOVF;
- break;
-
- case STATUS_ILLEGAL_INSTRUCTION:
- si.si_signo = SIGILL;
- si.si_code = ILL_ILLOPC;
- break;
-
- case STATUS_PRIVILEGED_INSTRUCTION:
- si.si_signo = SIGILL;
- si.si_code = ILL_PRVOPC;
- break;
-
- case STATUS_NONCONTINUABLE_EXCEPTION:
- si.si_signo = SIGILL;
- si.si_code = ILL_ILLADR;
- break;
-
- case STATUS_TIMEOUT:
- si.si_signo = SIGALRM;
- break;
-
- case STATUS_GUARD_PAGE_VIOLATION:
- si.si_signo = SIGBUS;
- si.si_code = BUS_OBJERR;
- break;
-
- case STATUS_DATATYPE_MISALIGNMENT:
- si.si_signo = SIGBUS;
- si.si_code = BUS_ADRALN;
- break;
-
- case STATUS_ACCESS_VIOLATION:
- switch (mmap_is_attached_or_noreserve ((void *)e->ExceptionInformation[1],
- 1))
- {
- case MMAP_NORESERVE_COMMITED:
- return 0;
- case MMAP_RAISE_SIGBUS: /* MAP_NORESERVE page, commit failed, or
- access to mmap page beyond EOF. */
- si.si_signo = SIGBUS;
- si.si_code = BUS_OBJERR;
- break;
- default:
- MEMORY_BASIC_INFORMATION m;
- VirtualQuery ((PVOID) e->ExceptionInformation[1], &m, sizeof m);
- si.si_signo = SIGSEGV;
- si.si_code = m.State == MEM_FREE ? SEGV_MAPERR : SEGV_ACCERR;
- break;
- }
- break;
-
- case STATUS_ARRAY_BOUNDS_EXCEEDED:
- case STATUS_IN_PAGE_ERROR:
- case STATUS_NO_MEMORY:
- case STATUS_INVALID_DISPOSITION:
- case STATUS_STACK_OVERFLOW:
- si.si_signo = SIGSEGV;
- si.si_code = SEGV_MAPERR;
- break;
-
- case STATUS_CONTROL_C_EXIT:
- si.si_signo = SIGINT;
- break;
-
- case STATUS_INVALID_HANDLE:
- /* CloseHandle will throw this exception if it is given an
- invalid handle. We don't care about the exception; we just
- want CloseHandle to return an error. This can be revisited
- if gcc ever supports Windows style structured exception
- handling. */
- return 0;
-
- default:
- /* If we don't recognize the exception, we have to assume that
- we are doing structured exception handling, and we let
- something else handle it. */
- return 1;
- }
-
- debug_printf ("In cygwin_except_handler exc %p at %p sp %p", e->ExceptionCode, in->Eip, in->Esp);
- debug_printf ("In cygwin_except_handler sig %d at %p", si.si_signo, in->Eip);
-
- bool masked = !!(me.sigmask & SIGTOMASK (si.si_signo));
- if (masked)
- syscall_printf ("signal %d, masked %p", si.si_signo,
- global_sigs[si.si_signo].sa_mask);
-
- debug_printf ("In cygwin_except_handler calling %p",
- global_sigs[si.si_signo].sa_handler);
-
- DWORD *ebp = (DWORD *) in->Esp;
- for (DWORD *bpend = (DWORD *) __builtin_frame_address (0); ebp > bpend; ebp--)
- if (*ebp == in->SegCs && ebp[-1] == in->Eip)
- {
- ebp -= 2;
- break;
- }
-
- if (me.fault_guarded ())
- me.return_from_fault ();
-
- me.copy_context (in);
-
- /* Temporarily replace windows top level SEH with our own handler.
- We don't want any Windows magic kicking in. This top level frame
- will be removed automatically after our exception handler returns. */
- _except_list->handler = _cygtls::handle_exceptions;
-
- if (masked
- || &me == _sig_tls
- || !cygwin_finished_initializing
- || (void *) global_sigs[si.si_signo].sa_handler == (void *) SIG_DFL
- || (void *) global_sigs[si.si_signo].sa_handler == (void *) SIG_IGN
- || (void *) global_sigs[si.si_signo].sa_handler == (void *) SIG_ERR)
- {
- /* Print the exception to the console */
- if (!myself->cygstarted)
- for (int i = 0; status_info[i].name; i++)
- if (status_info[i].code == e->ExceptionCode)
- {
- system_printf ("Exception: %s", status_info[i].name);
- break;
- }
-
- /* Another exception could happen while tracing or while exiting.
- Only do this once. */
- if (recursed++)
- system_printf ("Error while dumping state (probably corrupted stack)");
- else
- {
- if (try_to_debug (0))
- {
- debugging = true;
- return 0;
- }
-
- rtl_unwind (frame, e);
- open_stackdumpfile ();
- exception (e, in);
- stackdump ((DWORD) ebp, 0, 1);
- }
-
- if (e->ExceptionCode == STATUS_ACCESS_VIOLATION)
- {
- int error_code = 0;
- if (si.si_code == SEGV_ACCERR) /* Address present */
- error_code |= 1;
- if (e->ExceptionInformation[0]) /* Write access */
- error_code |= 2;
- if (!me.inside_kernel (in)) /* User space */
- error_code |= 4;
- klog (LOG_INFO, "%s[%d]: segfault at %08x rip %08x rsp %08x error %d",
- __progname, myself->pid,
- e->ExceptionInformation[1], in->Eip, in->Esp,
- ((in->Eip >= 0x61000000 && in->Eip < 0x61200000)
- ? 0 : 4) | (e->ExceptionInformation[0] << 1));
- }
-
- me.signal_exit (0x80 | si.si_signo); // Flag signal + core dump
- }
-
- si.si_addr = (void *) in->Eip;
- si.si_errno = si.si_pid = si.si_uid = 0;
- me.incyg++;
- sig_send (NULL, si, &me); // Signal myself
- me.incyg--;
- e->ExceptionFlags = 0;
- return 0;
-}
-
-/* Utilities to call a user supplied exception handler. */
-
-#define SIG_NONMASKABLE (SIGTOMASK (SIGKILL) | SIGTOMASK (SIGSTOP))
-
-/* Non-raceable sigsuspend
- * Note: This implementation is based on the Single UNIX Specification
- * man page. This indicates that sigsuspend always returns -1 and that
- * attempts to block unblockable signals will be silently ignored.
- * This is counter to what appears to be documented in some UNIX
- * man pages, e.g. Linux.
- */
-int __stdcall
-handle_sigsuspend (sigset_t tempmask)
-{
- if (&_my_tls != _main_tls)
- {
- cancelable_wait (signal_arrived, INFINITE, cw_cancel_self);
- return -1;
- }
-
- sigset_t oldmask = _my_tls.sigmask; // Remember for restoration
-
- set_signal_mask (tempmask, _my_tls.sigmask);
- sigproc_printf ("oldmask %p, newmask %p", oldmask, tempmask);
-
- pthread_testcancel ();
- cancelable_wait (signal_arrived, INFINITE);
-
- set_sig_errno (EINTR); // Per POSIX
-
- /* A signal dispatch function will have been added to our stack and will
- be hit eventually. Set the old mask to be restored when the signal
- handler returns and indicate its presence by modifying deltamask. */
-
- _my_tls.deltamask |= SIG_NONMASKABLE;
- _my_tls.oldmask = oldmask; // Will be restored by signal handler
- return -1;
-}
-
-extern DWORD exec_exit; // Possible exit value for exec
-
-extern "C" {
-static void
-sig_handle_tty_stop (int sig)
-{
- _my_tls.incyg = 1;
- /* Silently ignore attempts to suspend if there is no accommodating
- cygwin parent to deal with this behavior. */
- if (!myself->cygstarted)
- {
- myself->process_state &= ~PID_STOPPED;
- return;
- }
-
- myself->stopsig = sig;
- myself->alert_parent (sig);
- sigproc_printf ("process %d stopped by signal %d", myself->pid, sig);
- HANDLE w4[2];
- w4[0] = sigCONT;
- w4[1] = signal_arrived;
- switch (WaitForMultipleObjects (2, w4, TRUE, INFINITE))
- {
- case WAIT_OBJECT_0:
- case WAIT_OBJECT_0 + 1:
- reset_signal_arrived ();
- myself->alert_parent (SIGCONT);
- break;
- default:
- api_fatal ("WaitSingleObject failed, %E");
- break;
- }
- _my_tls.incyg = 0;
-}
-}
-
-bool
-_cygtls::interrupt_now (CONTEXT *cx, int sig, void *handler,
- struct sigaction& siga)
-{
- bool interrupted;
-
- if (incyg || spinning || locked () || inside_kernel (cx))
- interrupted = false;
- else
- {
- push ((__stack_t) cx->Eip);
- interrupt_setup (sig, handler, siga);
- cx->Eip = pop ();
- SetThreadContext (*this, cx); /* Restart the thread in a new location */
- interrupted = true;
- }
- return interrupted;
-}
-
-void __stdcall
-_cygtls::interrupt_setup (int sig, void *handler, struct sigaction& siga)
-{
- push ((__stack_t) sigdelayed);
- deltamask = siga.sa_mask & ~SIG_NONMASKABLE;
- sa_flags = siga.sa_flags;
- func = (void (*) (int)) handler;
- if (siga.sa_flags & SA_RESETHAND)
- siga.sa_handler = SIG_DFL;
- saved_errno = -1; // Flag: no errno to save
- if (handler == sig_handle_tty_stop)
- {
- myself->stopsig = 0;
- myself->process_state |= PID_STOPPED;
- }
-
- this->sig = sig; // Should always be last thing set to avoid a race
-
- if (!event)
- threadkill = false;
- else
- {
- HANDLE h = event;
- event = NULL;
- SetEvent (h);
- }
-
- /* Clear any waiting threads prior to dispatching to handler function */
- int res = SetEvent (signal_arrived); // For an EINTR case
- proc_subproc (PROC_CLEARWAIT, 1);
- sigproc_printf ("armed signal_arrived %p, sig %d, res %d", signal_arrived,
- sig, res);
-}
-
-extern "C" void __stdcall
-set_sig_errno (int e)
-{
- *_my_tls.errno_addr = e;
- _my_tls.saved_errno = e;
- // sigproc_printf ("errno %d", e);
-}
-
-static int setup_handler (int, void *, struct sigaction&, _cygtls *tls)
- __attribute__((regparm(3)));
-static int
-setup_handler (int sig, void *handler, struct sigaction& siga, _cygtls *tls)
-{
- CONTEXT cx;
- bool interrupted = false;
-
- if (tls->sig)
- {
- sigproc_printf ("trying to send sig %d but signal %d already armed",
- sig, tls->sig);
- goto out;
- }
-
- for (int i = 0; i < CALL_HANDLER_RETRY; i++)
- {
- tls->lock ();
- if (tls->incyg)
- {
- sigproc_printf ("controlled interrupt. stackptr %p, stack %p, stackptr[-1] %p",
- tls->stackptr, tls->stack, tls->stackptr[-1]);
- tls->interrupt_setup (sig, handler, siga);
- interrupted = true;
- tls->unlock ();
- break;
- }
-
- tls->unlock ();
- DWORD res;
- HANDLE hth = (HANDLE) *tls;
-
- /* Suspend the thread which will receive the signal.
- For Windows 95, we also have to ensure that the addresses returned by
- GetThreadContext are valid.
- If one of these conditions is not true we loop for a fixed number of times
- since we don't want to stall the signal handler. FIXME: Will this result in
- noticeable delays?
- If the thread is already suspended (which can occur when a program has called
- SuspendThread on itself) then just queue the signal. */
-
-#ifndef DEBUGGING
- sigproc_printf ("suspending mainthread");
-#else
- cx.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER;
- if (!GetThreadContext (hth, &cx))
- memset (&cx, 0, sizeof cx);
- sigproc_printf ("suspending mainthread PC %p", cx.Eip);
-#endif
- res = SuspendThread (hth);
- /* Just set pending if thread is already suspended */
- if (res)
- {
- ResumeThread (hth);
- break;
- }
- cx.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER;
- if (!GetThreadContext (hth, &cx))
- system_printf ("couldn't get context of main thread, %E");
- else
- interrupted = tls->interrupt_now (&cx, sig, handler, siga);
-
- res = ResumeThread (hth);
- if (interrupted)
- break;
-
- sigproc_printf ("couldn't interrupt. trying again.");
- low_priority_sleep (0);
- }
-
-out:
- sigproc_printf ("signal %d %sdelivered", sig, interrupted ? "" : "not ");
- return interrupted;
-}
-
-static inline bool
-has_visible_window_station ()
-{
- HWINSTA station_hdl;
- USEROBJECTFLAGS uof;
- DWORD len;
-
- /* Check if the process is associated with a visible window station.
- These are processes running on the local desktop as well as processes
- running in terminal server sessions.
- Processes running in a service session not explicitely associated
- with the desktop (using the "Allow service to interact with desktop"
- property) are running in an invisible window station. */
- if ((station_hdl = GetProcessWindowStation ())
- && GetUserObjectInformationW (station_hdl, UOI_FLAGS, &uof,
- sizeof uof, &len)
- && (uof.dwFlags & WSF_VISIBLE))
- return true;
- return false;
-}
-
-/* Keyboard interrupt handler. */
-static BOOL WINAPI
-ctrl_c_handler (DWORD type)
-{
- static bool saw_close;
- lock_process now;
-
- if (!cygwin_finished_initializing)
- {
- if (myself->cygstarted) /* Was this process created by a cygwin process? */
- return TRUE; /* Yes. Let the parent eventually handle CTRL-C issues. */
- debug_printf ("exiting with status %p", STATUS_CONTROL_C_EXIT);
- ExitProcess (STATUS_CONTROL_C_EXIT);
- }
-
- _my_tls.remove (INFINITE);
-
-#if 0
- if (type == CTRL_C_EVENT || type == CTRL_BREAK_EVENT)
- proc_subproc (PROC_KILLFORKED, 0);
-#endif
-
- /* Return FALSE to prevent an "End task" dialog box from appearing
- for each Cygwin process window that's open when the computer
- is shut down or console window is closed. */
-
- if (type == CTRL_SHUTDOWN_EVENT)
- {
-#if 0
- /* Don't send a signal. Only NT service applications and their child
- processes will receive this event and the services typically already
- handle the shutdown action when getting the SERVICE_CONTROL_SHUTDOWN
- control message. */
- sig_send (NULL, SIGTERM);
-#endif
- return FALSE;
- }
-
- if (myself->ctty != -1)
- {
- if (type == CTRL_CLOSE_EVENT)
- {
- sig_send (NULL, SIGHUP);
- saw_close = true;
- return FALSE;
- }
- if (!saw_close && type == CTRL_LOGOFF_EVENT)
- {
- /* The CTRL_LOGOFF_EVENT is sent when *any* user logs off.
- The below code sends a SIGHUP only if it is not performing the
- default activity for SIGHUP. Note that it is possible for two
- SIGHUP signals to arrive if a process group leader is exiting
- too. Getting this 100% right is saved for a future cygwin mailing
- list goad. */
- if (global_sigs[SIGHUP].sa_handler != SIG_DFL)
- {
- sig_send (myself_nowait, SIGHUP);
- return TRUE;
- }
- return FALSE;
- }
- }
-
- if (chExeced)
- {
- chExeced->set_saw_ctrl_c ();
- return TRUE;
- }
-
- /* We're only the process group leader when we have a valid pinfo structure.
- If we don't have one, then the parent "stub" will handle the signal. */
- if (!pinfo (cygwin_pid (GetCurrentProcessId ())))
- return TRUE;
-
- tty_min *t = cygwin_shared->tty.get_tty (myself->ctty);
- /* Ignore this if we're not the process group leader since it should be handled
- *by* the process group leader. */
- if (myself->ctty != -1 && t->getpgid () == myself->pid &&
- (GetTickCount () - t->last_ctrl_c) >= MIN_CTRL_C_SLOP)
- /* Otherwise we just send a SIGINT to the process group and return TRUE (to indicate
- that we have handled the signal). At this point, type should be
- a CTRL_C_EVENT or CTRL_BREAK_EVENT. */
- {
- int sig = SIGINT;
- /* If intr and quit are both mapped to ^C, send SIGQUIT on ^BREAK */
- if (type == CTRL_BREAK_EVENT
- && t->ti.c_cc[VINTR] == 3 && t->ti.c_cc[VQUIT] == 3)
- sig = SIGQUIT;
- t->last_ctrl_c = GetTickCount ();
- killsys (-myself->pid, sig);
- t->last_ctrl_c = GetTickCount ();
- return TRUE;
- }
-
- return TRUE;
-}
-
-/* Function used by low level sig wrappers. */
-extern "C" void __stdcall
-set_process_mask (sigset_t newmask)
-{
- set_signal_mask (newmask, _my_tls.sigmask);
-}
-
-extern "C" int
-sighold (int sig)
-{
- /* check that sig is in right range */
- if (sig < 0 || sig >= NSIG)
- {
- set_errno (EINVAL);
- syscall_printf ("signal %d out of range", sig);
- return -1;
- }
- mask_sync.acquire (INFINITE);
- sigset_t mask = _my_tls.sigmask;
- sigaddset (&mask, sig);
- set_signal_mask (mask, _my_tls.sigmask);
- mask_sync.release ();
- return 0;
-}
-
-extern "C" int
-sigrelse (int sig)
-{
- /* check that sig is in right range */
- if (sig < 0 || sig >= NSIG)
- {
- set_errno (EINVAL);
- syscall_printf ("signal %d out of range", sig);
- return -1;
- }
- mask_sync.acquire (INFINITE);
- sigset_t mask = _my_tls.sigmask;
- sigdelset (&mask, sig);
- set_signal_mask (mask, _my_tls.sigmask);
- mask_sync.release ();
- return 0;
-}
-
-extern "C" _sig_func_ptr
-sigset (int sig, _sig_func_ptr func)
-{
- sig_dispatch_pending ();
- _sig_func_ptr prev;
-
- /* check that sig is in right range */
- if (sig < 0 || sig >= NSIG || sig == SIGKILL || sig == SIGSTOP)
- {
- set_errno (EINVAL);
- syscall_printf ("SIG_ERR = sigset (%d, %p)", sig, func);
- return (_sig_func_ptr) SIG_ERR;
- }
-
- mask_sync.acquire (INFINITE);
- sigset_t mask = _my_tls.sigmask;
- /* If sig was in the signal mask return SIG_HOLD, otherwise return the
- previous disposition. */
- if (sigismember (&mask, sig))
- prev = SIG_HOLD;
- else
- prev = global_sigs[sig].sa_handler;
- /* If func is SIG_HOLD, add sig to the signal mask, otherwise set the
- disposition to func and remove sig from the signal mask. */
- if (func == SIG_HOLD)
- sigaddset (&mask, sig);
- else
- {
- /* No error checking. The test which could return SIG_ERR has already
- been made above. */
- signal (sig, func);
- sigdelset (&mask, sig);
- }
- set_signal_mask (mask, _my_tls.sigmask);
- mask_sync.release ();
- return prev;
-}
-
-extern "C" int
-sigignore (int sig)
-{
- return sigset (sig, SIG_IGN) == SIG_ERR ? -1 : 0;
-}
-
-/* Update the signal mask for this process and return the old mask.
- Called from sigdelayed */
-extern "C" sigset_t
-set_process_mask_delta ()
-{
- mask_sync.acquire (INFINITE);
- sigset_t newmask, oldmask;
-
- if (_my_tls.deltamask & SIG_NONMASKABLE)
- oldmask = _my_tls.oldmask; /* from handle_sigsuspend */
- else
- oldmask = _my_tls.sigmask;
- newmask = (oldmask | _my_tls.deltamask) & ~SIG_NONMASKABLE;
- sigproc_printf ("oldmask %p, newmask %p, deltamask %p", oldmask, newmask,
- _my_tls.deltamask);
- _my_tls.sigmask = newmask;
- mask_sync.release ();
- return oldmask;
-}
-
-/* Set the signal mask for this process.
- Note that some signals are unmaskable, as in UNIX. */
-extern "C" void __stdcall
-set_signal_mask (sigset_t newmask, sigset_t& oldmask)
-{
-#ifdef CGF
- if (&_my_tls == _sig_tls)
- small_printf ("********* waiting in signal thread\n");
-#endif
- mask_sync.acquire (INFINITE);
- newmask &= ~SIG_NONMASKABLE;
- sigset_t mask_bits = oldmask & ~newmask;
- sigproc_printf ("oldmask %p, newmask %p, mask_bits %p", oldmask, newmask,
- mask_bits);
- oldmask = newmask;
- if (mask_bits)
- sig_dispatch_pending (true);
- else
- sigproc_printf ("not calling sig_dispatch_pending");
- mask_sync.release ();
-}
-
-int __stdcall
-sigpacket::process ()
-{
- DWORD continue_now;
- struct sigaction dummy = global_sigs[SIGSTOP];
-
- if (si.si_signo != SIGCONT)
- continue_now = false;
- else
- {
- continue_now = myself->process_state & PID_STOPPED;
- myself->stopsig = 0;
- myself->process_state &= ~PID_STOPPED;
- /* Clear pending stop signals */
- sig_clear (SIGSTOP);
- sig_clear (SIGTSTP);
- sig_clear (SIGTTIN);
- sig_clear (SIGTTOU);
- }
-
- int rc = 1;
-
- sigproc_printf ("signal %d processing", si.si_signo);
- struct sigaction& thissig = global_sigs[si.si_signo];
-
- myself->rusage_self.ru_nsignals++;
-
- bool masked;
- void *handler;
- if (!hExeced || (void *) thissig.sa_handler == (void *) SIG_IGN)
- handler = (void *) thissig.sa_handler;
- else if (tls)
- return 1;
- else
- handler = NULL;
-
- _cygtls *use_tls = tls ?: _main_tls;
-
- if (si.si_signo == SIGKILL)
- goto exit_sig;
- if (si.si_signo == SIGSTOP)
- {
- sig_clear (SIGCONT);
- goto stop;
- }
-
- bool insigwait_mask;
- if ((masked = ISSTATE (myself, PID_STOPPED)))
- insigwait_mask = false;
- else if (tls)
- insigwait_mask = sigismember (&tls->sigwait_mask, si.si_signo);
- else
- {
- insigwait_mask = !handler && (tls = _cygtls::find_tls (si.si_signo));
- if (tls)
- use_tls = tls;
- }
-
- if (insigwait_mask)
- goto thread_specific;
-
- if (masked)
- /* nothing to do */;
- else if (sigismember (mask, si.si_signo))
- masked = true;
- else if (tls)
- masked = sigismember (&tls->sigmask, si.si_signo);
-
- if (masked)
- {
- sigproc_printf ("signal %d blocked", si.si_signo);
- rc = -1;
- goto done;
- }
-
- /* Clear pending SIGCONT on stop signals */
- if (si.si_signo == SIGTSTP || si.si_signo == SIGTTIN || si.si_signo == SIGTTOU)
- sig_clear (SIGCONT);
-
-#ifdef CGF
- if (being_debugged ())
- {
- char sigmsg[sizeof (_CYGWIN_SIGNAL_STRING " 0xffffffff")];
- __small_sprintf (sigmsg, _CYGWIN_SIGNAL_STRING " %p", si.si_signo);
- OutputDebugString (sigmsg);
- }
-#endif
-
- if (handler == (void *) SIG_DFL)
- {
- if (insigwait_mask)
- goto thread_specific;
- if (si.si_signo == SIGCHLD || si.si_signo == SIGIO || si.si_signo == SIGCONT || si.si_signo == SIGWINCH
- || si.si_signo == SIGURG)
- {
- sigproc_printf ("default signal %d ignored", si.si_signo);
- if (continue_now)
- SetEvent (signal_arrived);
- goto done;
- }
-
- if (si.si_signo == SIGTSTP || si.si_signo == SIGTTIN || si.si_signo == SIGTTOU)
- goto stop;
-
- goto exit_sig;
- }
-
- if (handler == (void *) SIG_IGN)
- {
- sigproc_printf ("signal %d ignored", si.si_signo);
- goto done;
- }
-
- if (handler == (void *) SIG_ERR)
- goto exit_sig;
-
- use_tls->set_siginfo (this);
- goto dosig;
-
-stop:
- /* Eat multiple attempts to STOP */
- if (ISSTATE (myself, PID_STOPPED))
- goto done;
- handler = (void *) sig_handle_tty_stop;
- thissig = dummy;
-
-dosig:
- /* Dispatch to the appropriate function. */
- sigproc_printf ("signal %d, about to call %p", si.si_signo, handler);
- rc = setup_handler (si.si_signo, handler, thissig, use_tls);
-
-done:
- tls = use_tls;
- if (continue_now)
- SetEvent (sigCONT);
- sigproc_printf ("returning %d", rc);
- return rc;
-
-thread_specific:
- use_tls->sig = si.si_signo;
- use_tls->set_siginfo (this);
- sigproc_printf ("releasing sigwait for thread");
- SetEvent (use_tls->event);
- goto done;
-
-exit_sig:
- if (si.si_signo == SIGQUIT || si.si_signo == SIGABRT)
- {
- CONTEXT c;
- c.ContextFlags = CONTEXT_FULL;
- GetThreadContext (hMainThread, &c);
- use_tls->copy_context (&c);
- si.si_signo |= 0x80;
- }
- sigproc_printf ("signal %d, about to call do_exit", si.si_signo);
- use_tls->signal_exit (si.si_signo); /* never returns */
-}
-
-/* Cover function to `do_exit' to handle exiting even in presence of more
- exceptions. We used to call exit, but a SIGSEGV shouldn't cause atexit
- routines to run. */
-void
-_cygtls::signal_exit (int rc)
-{
- if (hExeced)
- {
- sigproc_printf ("terminating captive process");
- TerminateProcess (hExeced, sigExeced = rc);
- }
-
- signal_debugger (rc & 0x7f);
- if ((rc & 0x80) && !try_to_debug ())
- stackdump (thread_context.ebp, 1, 1);
-
- lock_process until_exit (true);
- if (hExeced || exit_state > ES_PROCESS_LOCKED)
- myself.exit (rc);
-
- /* Starve other threads in a vain attempt to stop them from doing something
- stupid. */
- SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_TIME_CRITICAL);
-
- sigproc_printf ("about to call do_exit (%x)", rc);
- SetEvent (signal_arrived);
- do_exit (rc);
-}
-
-void
-events_init ()
-{
- mask_sync.init ("mask_sync");
- windows_system_directory[0] = L'\0';
- GetSystemDirectoryW (windows_system_directory, sizeof (windows_system_directory) / sizeof (WCHAR) - 2);
- PWCHAR end = wcschr (windows_system_directory, L'\0');
- if (end == windows_system_directory)
- api_fatal ("can't find windows system directory");
- if (end[-1] != L'\\')
- {
- *end++ = L'\\';
- *end = L'\0';
- }
- windows_system_directory_length = end - windows_system_directory;
- debug_printf ("windows_system_directory '%W', windows_system_directory_length %d",
- windows_system_directory, windows_system_directory_length);
-}
-
-void
-events_terminate ()
-{
- exit_already = 1;
-}
-
-int
-_cygtls::call_signal_handler ()
-{
- int this_sa_flags = 0;
- /* Call signal handler. */
- while (sig)
- {
- lock ();
- this_sa_flags = sa_flags;
- int thissig = sig;
-
- pop ();
- reset_signal_arrived ();
- sigset_t this_oldmask = set_process_mask_delta ();
- int this_errno = saved_errno;
- sig = 0;
- unlock (); // make sure synchronized
- incyg = 0;
- if (!(this_sa_flags & SA_SIGINFO))
- {
- void (*sigfunc) (int) = func;
- sigfunc (thissig);
- }
- else
- {
- siginfo_t thissi = infodata;
- void (*sigact) (int, siginfo_t *, void *) = (void (*) (int, siginfo_t *, void *)) func;
- /* no ucontext_t information provided yet */
- sigact (thissig, &thissi, NULL);
- }
- incyg = 1;
- set_signal_mask (this_oldmask, _my_tls.sigmask);
- if (this_errno >= 0)
- set_errno (this_errno);
- }
-
- return this_sa_flags & SA_RESTART;
-}
-
-extern "C" void __stdcall
-reset_signal_arrived ()
-{
- // NEEDED? WaitForSingleObject (signal_arrived, 10);
- ResetEvent (signal_arrived);
- sigproc_printf ("reset signal_arrived");
- if (_my_tls.stackptr > _my_tls.stack)
- debug_printf ("stackptr[-1] %p", _my_tls.stackptr[-1]);
-}
-
-void
-_cygtls::copy_context (CONTEXT *c)
-{
- memcpy (&thread_context, c, (&thread_context._internal - (unsigned char *) &thread_context));
-}
-
-void
-_cygtls::signal_debugger (int sig)
-{
- if (isinitialized () && being_debugged ())
- {
- char sigmsg[2 * sizeof (_CYGWIN_SIGNAL_STRING " ffffffff ffffffff")];
- __small_sprintf (sigmsg, _CYGWIN_SIGNAL_STRING " %d %p %p", sig, thread_id, &thread_context);
- OutputDebugString (sigmsg);
- }
-}
diff --git a/winsup/cygwin/exec.cc b/winsup/cygwin/exec.cc
deleted file mode 100644
index ee0709c..0000000
--- a/winsup/cygwin/exec.cc
+++ /dev/null
@@ -1,93 +0,0 @@
-/* exec.cc: exec system call support.
-
- Copyright 1996, 1997, 1998, 2000, 2001, 2002 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#define _execve __FOO_execve_
-#include "winsup.h"
-#include <process.h>
-#include "cygerrno.h"
-#include "path.h"
-#include "environ.h"
-#undef _execve
-
-/* This is called _execve and not execve because the real execve is defined
- in libc/posix/execve.c. It calls us. */
-
-extern "C" int
-execve (const char *path, char *const argv[], char *const envp[])
-{
- static char *const empty_env[] = { 0 };
- MALLOC_CHECK;
- if (!envp)
- envp = empty_env;
- return spawnve (_P_OVERLAY, path, argv, envp);
-}
-
-EXPORT_ALIAS (execve, _execve)
-
-extern "C" int
-execl (const char *path, const char *arg0, ...)
-{
- int i;
- va_list args;
- const char *argv[1024];
-
- va_start (args, arg0);
- argv[0] = arg0;
- i = 1;
- do
- argv[i] = va_arg (args, const char *);
- while (argv[i++] != NULL);
- va_end (args);
- MALLOC_CHECK;
- return execve (path, (char * const *) argv, cur_environ ());
-}
-
-extern "C" int
-execv (const char *path, char * const *argv)
-{
- MALLOC_CHECK;
- return execve (path, (char * const *) argv, cur_environ ());
-}
-
-extern "C" pid_t
-sexecve_is_bad ()
-{
- set_errno (ENOSYS);
- return 0;
-}
-
-/* Copy string, until c or <nul> is encountered.
- NUL-terminate the destination string (s1).
- Return pointer to terminating byte in dst string. */
-
-char * __stdcall
-strccpy (char *s1, const char **s2, char c)
-{
- while (**s2 && **s2 != c)
- *s1++ = *((*s2)++);
- *s1 = 0;
-
- MALLOC_CHECK;
- return s1;
-}
-
-extern "C" int
-execvp (const char *path, char * const *argv)
-{
- path_conv buf;
- return execv (find_exec (path, buf), argv);
-}
-
-extern "C" int
-execvpe (const char *path, char * const *argv, char *const *envp)
-{
- path_conv buf;
- return execve (find_exec (path, buf), argv, envp);
-}
diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc
deleted file mode 100644
index b880e07..0000000
--- a/winsup/cygwin/external.cc
+++ /dev/null
@@ -1,372 +0,0 @@
-/* external.cc: Interface to Cygwin internals from external programs.
-
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008 Red Hat, Inc.
-
- Written by Christopher Faylor <cgf@cygnus.com>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "shared_info.h"
-#include "cygwin_version.h"
-#include "cygerrno.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "heap.h"
-#include "cygtls.h"
-#include "child_info.h"
-#include "environ.h"
-#include "cygserver_setpwd.h"
-#include <unistd.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <iptypes.h>
-
-child_info *get_cygwin_startup_info ();
-
-static winpids pids;
-
-static external_pinfo *
-fillout_pinfo (pid_t pid, int winpid)
-{
- BOOL nextpid;
- static external_pinfo ep;
- static char ep_progname_long_buf[NT_MAX_PATH];
-
- if ((nextpid = !!(pid & CW_NEXTPID)))
- pid ^= CW_NEXTPID;
-
-
- static unsigned int i;
- if (!pids.npids || !nextpid)
- {
- pids.set (winpid);
- i = 0;
- }
-
- if (!pid)
- i = 0;
-
- memset (&ep, 0, sizeof ep);
- while (i < pids.npids)
- {
- DWORD thispid = pids.winpid (i);
- _pinfo *p = pids[i];
- i++;
-
- if (!p)
- {
- if (!nextpid && thispid != (DWORD) pid)
- continue;
- ep.pid = cygwin_pid (thispid);
- ep.dwProcessId = thispid;
- ep.process_state = PID_IN_USE;
- ep.ctty = -1;
- break;
- }
- else if (nextpid || p->pid == pid || (winpid && thispid == (DWORD) pid))
- {
- ep.ctty = p->ctty;
- ep.pid = p->pid;
- ep.ppid = p->ppid;
- ep.dwProcessId = p->dwProcessId;
- ep.uid = p->uid;
- ep.gid = p->gid;
- ep.pgid = p->pgid;
- ep.sid = p->sid;
- ep.umask = 0;
- ep.start_time = p->start_time;
- ep.rusage_self = p->rusage_self;
- ep.rusage_children = p->rusage_children;
- ep.progname[0] = '\0';
- strncat (ep.progname, p->progname, MAX_PATH - 1);
- ep.strace_mask = 0;
- ep.version = EXTERNAL_PINFO_VERSION;
-
- ep.process_state = p->process_state;
-
- ep.uid32 = p->uid;
- ep.gid32 = p->gid;
-
- ep.progname_long = ep_progname_long_buf;
- strcpy (ep.progname_long, p->progname);
- break;
- }
- }
-
- if (!ep.pid)
- {
- i = 0;
- pids.reset ();
- return 0;
- }
- return &ep;
-}
-
-static inline DWORD
-get_cygdrive_info (char *user, char *system, char *user_flags,
- char *system_flags)
-{
- int res = mount_table->get_cygdrive_info (user, system, user_flags,
- system_flags);
- return (res == ERROR_SUCCESS) ? 1 : 0;
-}
-
-static DWORD
-check_ntsec (const char *filename)
-{
- if (!filename)
- return true;
- path_conv pc (filename);
- return pc.has_acls ();
-}
-
-/* Copy cygwin environment variables to the Windows environment. */
-static void
-sync_winenv ()
-{
- int unused_envc;
- PWCHAR envblock = NULL;
- char **envp = build_env (cur_environ (), envblock, unused_envc, false);
- PWCHAR p = envblock;
-
- if (envp)
- {
- for (char **e = envp; *e; e++)
- cfree (*e);
- cfree (envp);
- }
- if (!p)
- return;
- while (*p)
- {
- PWCHAR eq = wcschr (p, L'=');
- if (eq)
- {
- *eq = L'\0';
- SetEnvironmentVariableW (p, ++eq);
- p = eq;
- }
- p = wcschr (p, L'\0') + 1;
- }
- free (envblock);
-}
-
-extern "C" unsigned long
-cygwin_internal (cygwin_getinfo_types t, ...)
-{
- va_list arg;
- va_start (arg, t);
-
- switch (t)
- {
- case CW_LOCK_PINFO:
- return 1;
-
- case CW_UNLOCK_PINFO:
- return 1;
-
- case CW_GETTHREADNAME:
- return (DWORD) cygthread::name (va_arg (arg, DWORD));
-
- case CW_SETTHREADNAME:
- {
- set_errno (ENOSYS);
- return 0;
- }
-
- case CW_GETPINFO:
- return (DWORD) fillout_pinfo (va_arg (arg, DWORD), 0);
-
- case CW_GETVERSIONINFO:
- return (DWORD) cygwin_version_strings;
-
- case CW_READ_V1_MOUNT_TABLES:
- set_errno (ENOSYS);
- return 1;
-
- case CW_USER_DATA:
- return (DWORD) &__cygwin_user_data;
-
- case CW_PERFILE:
- perfile_table = va_arg (arg, struct __cygwin_perfile *);
- return 0;
-
- case CW_GET_CYGDRIVE_PREFIXES:
- {
- char *user = va_arg (arg, char *);
- char *system = va_arg (arg, char *);
- return get_cygdrive_info (user, system, NULL, NULL);
- }
-
- case CW_GETPINFO_FULL:
- return (DWORD) fillout_pinfo (va_arg (arg, pid_t), 1);
-
- case CW_INIT_EXCEPTIONS:
- /* noop */ /* init_exceptions (va_arg (arg, exception_list *)); */
- return 0;
-
- case CW_GET_CYGDRIVE_INFO:
- {
- char *user = va_arg (arg, char *);
- char *system = va_arg (arg, char *);
- char *user_flags = va_arg (arg, char *);
- char *system_flags = va_arg (arg, char *);
- return get_cygdrive_info (user, system, user_flags, system_flags);
- }
-
- case CW_SET_CYGWIN_REGISTRY_NAME:
- case CW_GET_CYGWIN_REGISTRY_NAME:
- return 0;
-
- case CW_STRACE_TOGGLE:
- {
- pid_t pid = va_arg (arg, pid_t);
- pinfo p (pid);
- if (p)
- {
- sig_send (p, __SIGSTRACE);
- return 0;
- }
- else
- {
- set_errno (ESRCH);
- return (DWORD) -1;
- }
- }
-
- case CW_STRACE_ACTIVE:
- {
- return strace.active ();
- }
-
- case CW_CYGWIN_PID_TO_WINPID:
- {
- pinfo p (va_arg (arg, pid_t));
- return p ? p->dwProcessId : 0;
- }
- case CW_EXTRACT_DOMAIN_AND_USER:
- {
- WCHAR nt_domain[MAX_DOMAIN_NAME_LEN + 1];
- WCHAR nt_user[UNLEN + 1];
-
- struct passwd *pw = va_arg (arg, struct passwd *);
- char *domain = va_arg (arg, char *);
- char *user = va_arg (arg, char *);
- extract_nt_dom_user (pw, nt_domain, nt_user);
- if (domain)
- sys_wcstombs (domain, MAX_DOMAIN_NAME_LEN + 1, nt_domain);
- if (user)
- sys_wcstombs (user, UNLEN + 1, nt_user);
- return 0;
- }
- case CW_CMDLINE:
- {
- size_t n;
- pid_t pid = va_arg (arg, pid_t);
- pinfo p (pid);
- return (DWORD) p->cmdline (n);
- }
- case CW_CHECK_NTSEC:
- {
- char *filename = va_arg (arg, char *);
- return check_ntsec (filename);
- }
- case CW_GET_ERRNO_FROM_WINERROR:
- {
- int error = va_arg (arg, int);
- int deferrno = va_arg (arg, int);
- return geterrno_from_win_error (error, deferrno);
- }
- case CW_GET_POSIX_SECURITY_ATTRIBUTE:
- {
- path_conv dummy;
- security_descriptor sd;
- int attribute = va_arg (arg, int);
- PSECURITY_ATTRIBUTES psa = va_arg (arg, PSECURITY_ATTRIBUTES);
- void *sd_buf = va_arg (arg, void *);
- DWORD sd_buf_size = va_arg (arg, DWORD);
- set_security_attribute (dummy, attribute, psa, sd);
- if (!psa->lpSecurityDescriptor)
- return sd.size ();
- psa->lpSecurityDescriptor = sd_buf;
- return sd.copy (sd_buf, sd_buf_size);
- }
- case CW_GET_SHMLBA:
- {
- return getpagesize ();
- }
- case CW_GET_UID_FROM_SID:
- {
- cygpsid psid = va_arg (arg, PSID);
- return psid.get_id (false, NULL);
- }
- case CW_GET_GID_FROM_SID:
- {
- cygpsid psid = va_arg (arg, PSID);
- return psid.get_id (true, NULL);
- }
- case CW_GET_BINMODE:
- {
- const char *path = va_arg (arg, const char *);
- path_conv p (path, PC_SYM_FOLLOW | PC_NULLEMPTY);
- if (p.error)
- {
- set_errno (p.error);
- return (unsigned long) -1;
- }
- return p.binmode ();
- }
- case CW_HOOK:
- {
- const char *name = va_arg (arg, const char *);
- const void *hookfn = va_arg (arg, const void *);
- WORD subsys;
- return (unsigned long) hook_or_detect_cygwin (name, hookfn, subsys);
- }
- case CW_ARGV:
- {
- child_info_spawn *ci = (child_info_spawn *) get_cygwin_startup_info ();
- return (unsigned long) (ci ? ci->moreinfo->argv : NULL);
- }
- case CW_ENVP:
- {
- child_info_spawn *ci = (child_info_spawn *) get_cygwin_startup_info ();
- return (unsigned long) (ci ? ci->moreinfo->envp : NULL);
- }
- case CW_DEBUG_SELF:
- error_start_init (va_arg (arg, const char *));
- try_to_debug ();
- break;
- case CW_SYNC_WINENV:
- sync_winenv ();
- return 0;
- case CW_CYGTLS_PADSIZE:
- return CYGTLS_PADSIZE;
- case CW_SET_DOS_FILE_WARNING:
- {
- extern bool dos_file_warning;
- dos_file_warning = va_arg (arg, int);
- }
- break;
- case CW_SET_PRIV_KEY:
- {
- const char *passwd = va_arg (arg, const char *);
- return setlsapwd (passwd);
- }
-
- default:
- break;
- }
- set_errno (ENOSYS);
- return (unsigned long) -1;
-}
diff --git a/winsup/cygwin/external.sgml b/winsup/cygwin/external.sgml
deleted file mode 100644
index bbfdd0f..0000000
--- a/winsup/cygwin/external.sgml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-<sect1 id="func-cygwin-internal">
-<title>cygwin_internal</title>
-
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" DWORD
-<function>cygwin_internal</function></funcdef>
-<paramdef>cygwin_getinfo_types <parameter>t</parameter></paramdef>
-<paramdef><parameter>...</parameter></paramdef>
-</funcprototype></funcsynopsis>
-
-<para>This function gives you access to various internal data and functions.
-It takes two arguments. The first argument is a type from the 'cygwin_getinfo_types'
-enum. The second is an optional pointer.</para>
-<para>Stay away unless you know what you're doing.</para>
-
-</sect1>
-
diff --git a/winsup/cygwin/fcntl.cc b/winsup/cygwin/fcntl.cc
deleted file mode 100644
index 4426862..0000000
--- a/winsup/cygwin/fcntl.cc
+++ /dev/null
@@ -1,98 +0,0 @@
-/* fcntl.cc: fcntl syscall
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <unistd.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "cygtls.h"
-
-extern "C" int
-fcntl64 (int fd, int cmd, ...)
-{
- int res = -1;
- void *arg = NULL;
- va_list args;
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- cygheap_fdget cfd (fd, true);
- if (cfd < 0)
- goto done;
-
- va_start (args, cmd);
- arg = va_arg (args, void *);
- va_end (args);
-
- switch (cmd)
- {
- case F_DUPFD:
- res = dup2 (fd, cygheap_fdnew (((int) arg) - 1));
- break;
- case F_GETLK:
- case F_SETLK:
- case F_SETLKW:
- {
- struct __flock64 *fl = (struct __flock64 *) arg;
- fl->l_type &= F_RDLCK | F_WRLCK | F_UNLCK;
- res = cfd->lock (cmd, fl);
- }
- break;
- default:
- res = cfd->fcntl (cmd, arg);
- break;
- }
-done:
- syscall_printf ("%d = fcntl (%d, %d, %p)", res, fd, cmd, arg);
- return res;
-}
-
-extern "C" int
-_fcntl (int fd, int cmd, ...)
-{
- void *arg = NULL;
- va_list args;
- struct __flock32 *src = NULL;
- struct __flock64 dst;
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- va_start (args, cmd);
- arg = va_arg (args, void *);
- va_end (args);
- if (cmd == F_GETLK || cmd == F_SETLK || cmd == F_SETLKW)
- {
- src = (struct __flock32 *) arg;
- dst.l_type = src->l_type;
- dst.l_whence = src->l_whence;
- dst.l_start = src->l_start;
- dst.l_len = src->l_len;
- dst.l_pid = src->l_pid;
- arg = &dst;
- }
- int res = fcntl64 (fd, cmd, arg);
- if (cmd == F_GETLK)
- {
- src->l_type = dst.l_type;
- src->l_whence = dst.l_whence;
- src->l_start = dst.l_start;
- src->l_len = dst.l_len;
- src->l_pid = (short) dst.l_pid;
- }
- return res;
-}
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
deleted file mode 100644
index b573e4e..0000000
--- a/winsup/cygwin/fhandler.cc
+++ /dev/null
@@ -1,1786 +0,0 @@
-/* fhandler.cc. See console.cc for fhandler_console functions.
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <unistd.h>
-#include <stdlib.h>
-#include <sys/uio.h>
-#include <sys/acl.h>
-#include "cygerrno.h"
-#include "perprocess.h"
-#include "security.h"
-#include "cygwin/version.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "pinfo.h"
-#include <assert.h>
-#include <winioctl.h>
-#include "ntdll.h"
-#include "cygtls.h"
-#include "sigproc.h"
-#include "nfs.h"
-
-static NO_COPY const int CHUNK_SIZE = 1024; /* Used for crlf conversions */
-
-struct __cygwin_perfile *perfile_table;
-
-inline fhandler_base&
-fhandler_base::operator =(fhandler_base& x)
-{
- memcpy (this, &x, sizeof *this);
- pc = x.pc;
- rabuf = NULL;
- ralen = 0;
- raixget = 0;
- raixput = 0;
- rabuflen = 0;
- return *this;
-}
-
-int
-fhandler_base::puts_readahead (const char *s, size_t len)
-{
- int success = 1;
- while ((len == (size_t) -1 ? *s : len--)
- && (success = put_readahead (*s++) > 0))
- continue;
- return success;
-}
-
-int
-fhandler_base::put_readahead (char value)
-{
- char *newrabuf;
- if (raixput < rabuflen)
- /* Nothing to do */;
- else if ((newrabuf = (char *) realloc (rabuf, rabuflen += 32)))
- rabuf = newrabuf;
- else
- return 0;
-
- rabuf[raixput++] = value;
- ralen++;
- return 1;
-}
-
-int
-fhandler_base::get_readahead ()
-{
- int chret = -1;
- if (raixget < ralen)
- chret = ((unsigned char) rabuf[raixget++]) & 0xff;
- /* FIXME - not thread safe */
- if (raixget >= ralen)
- raixget = raixput = ralen = 0;
- return chret;
-}
-
-int
-fhandler_base::peek_readahead (int queryput)
-{
- int chret = -1;
- if (!queryput && raixget < ralen)
- chret = ((unsigned char) rabuf[raixget]) & 0xff;
- else if (queryput && raixput > 0)
- chret = ((unsigned char) rabuf[raixput - 1]) & 0xff;
- return chret;
-}
-
-void
-fhandler_base::set_readahead_valid (int val, int ch)
-{
- if (!val)
- ralen = raixget = raixput = 0;
- if (ch != -1)
- put_readahead (ch);
-}
-
-int
-fhandler_base::eat_readahead (int n)
-{
- int oralen = ralen;
- if (n < 0)
- n = ralen;
- if (n > 0 && ralen)
- {
- if ((int) (ralen -= n) < 0)
- ralen = 0;
-
- if (raixget >= ralen)
- raixget = raixput = ralen = 0;
- else if (raixput > ralen)
- raixput = ralen;
- }
-
- return oralen;
-}
-
-int
-fhandler_base::get_readahead_into_buffer (char *buf, size_t buflen)
-{
- int ch;
- int copied_chars = 0;
-
- while (buflen)
- if ((ch = get_readahead ()) < 0)
- break;
- else
- {
- buf[copied_chars++] = (unsigned char)(ch & 0xff);
- buflen--;
- }
-
- return copied_chars;
-}
-
-/* Record the file name. and name hash */
-void
-fhandler_base::set_name (path_conv &in_pc)
-{
- pc = in_pc;
-}
-
-char *fhandler_base::get_proc_fd_name (char *buf)
-{
- if (get_name ())
- return strcpy (buf, get_name ());
- if (dev ().name)
- return strcpy (buf, dev ().name);
- return strcpy (buf, "");
-}
-
-/* Detect if we are sitting at EOF for conditions where Windows
- returns an error but UNIX doesn't. */
-static int __stdcall
-is_at_eof (HANDLE h, DWORD err)
-{
- IO_STATUS_BLOCK io;
- FILE_POSITION_INFORMATION fpi;
- FILE_STANDARD_INFORMATION fsi;
-
- if (NT_SUCCESS (NtQueryInformationFile (h, &io, &fsi, sizeof fsi,
- FileStandardInformation))
- && NT_SUCCESS (NtQueryInformationFile (h, &io, &fpi, sizeof fpi,
- FilePositionInformation))
- && fsi.EndOfFile.QuadPart == fpi.CurrentByteOffset.QuadPart)
- return 1;
- SetLastError (err);
- return 0;
-}
-
-void
-fhandler_base::set_flags (int flags, int supplied_bin)
-{
- int bin;
- int fmode;
- debug_printf ("flags %p, supplied_bin %p", flags, supplied_bin);
- if ((bin = flags & (O_BINARY | O_TEXT)))
- debug_printf ("O_TEXT/O_BINARY set in flags %p", bin);
- else if (rbinset () && wbinset ())
- bin = rbinary () ? O_BINARY : O_TEXT; // FIXME: Not quite right
- else if ((fmode = get_default_fmode (flags)) & O_BINARY)
- bin = O_BINARY;
- else if (fmode & O_TEXT)
- bin = O_TEXT;
- else if (supplied_bin)
- bin = supplied_bin;
- else
- bin = wbinary () || rbinary () ? O_BINARY : O_TEXT;
-
- openflags = flags | bin;
-
- bin &= O_BINARY;
- rbinary (bin ? true : false);
- wbinary (bin ? true : false);
- syscall_printf ("filemode set to %s", bin ? "binary" : "text");
-}
-
-/* Normal file i/o handlers. */
-
-/* Cover function to ReadFile to achieve (as much as possible) Posix style
- semantics and use of errno. */
-void
-fhandler_base::raw_read (void *ptr, size_t& ulen)
-{
-#define bytes_read ulen
-
- int try_noreserve = 1;
- DWORD len = ulen;
-
-retry:
- ulen = (size_t) -1;
- BOOL res = ReadFile (get_handle (), ptr, len, (DWORD *) &ulen, NULL);
- if (!res)
- {
- /* Some errors are not really errors. Detect such cases here. */
-
- DWORD errcode = GetLastError ();
- switch (errcode)
- {
- case ERROR_BROKEN_PIPE:
- /* This is really EOF. */
- bytes_read = 0;
- break;
- case ERROR_MORE_DATA:
- /* `bytes_read' is supposedly valid. */
- break;
- case ERROR_NOACCESS:
- if (is_at_eof (get_handle (), errcode))
- {
- bytes_read = 0;
- break;
- }
- if (try_noreserve)
- {
- try_noreserve = 0;
- switch (mmap_is_attached_or_noreserve (ptr, len))
- {
- case MMAP_NORESERVE_COMMITED:
- goto retry;
- case MMAP_RAISE_SIGBUS:
- raise(SIGBUS);
- case MMAP_NONE:
- break;
- }
- }
- /*FALLTHRU*/
- case ERROR_INVALID_FUNCTION:
- case ERROR_INVALID_PARAMETER:
- case ERROR_INVALID_HANDLE:
- if (pc.isdir ())
- {
- set_errno (EISDIR);
- bytes_read = (size_t) -1;
- break;
- }
- default:
- syscall_printf ("ReadFile %s(%p) failed, %E", get_name (), get_handle ());
- __seterrno_from_win_error (errcode);
- bytes_read = (size_t) -1;
- break;
- }
- }
-#undef bytes_read
-}
-
-/* Cover function to WriteFile to provide Posix interface and semantics
- (as much as possible). */
-static LARGE_INTEGER off_current = { QuadPart:FILE_USE_FILE_POINTER_POSITION };
-static LARGE_INTEGER off_append = { QuadPart:FILE_WRITE_TO_END_OF_FILE };
-
-int
-fhandler_base::raw_write (const void *ptr, size_t len)
-{
- NTSTATUS status;
- IO_STATUS_BLOCK io;
-
- status = NtWriteFile (get_output_handle (), NULL, NULL, NULL, &io,
- (PVOID) ptr, len,
- (get_flags () & O_APPEND) ? &off_append : &off_current,
- NULL);
- if (!NT_SUCCESS (status))
- {
- if (status == STATUS_DISK_FULL && io.Information > 0)
- goto written;
- __seterrno_from_nt_status (status);
- if (get_errno () == EPIPE)
- raise (SIGPIPE);
- return -1;
- }
-written:
- return io.Information;
-}
-
-int
-fhandler_base::get_default_fmode (int flags)
-{
- int fmode = __fmode;
- if (perfile_table)
- {
- size_t nlen = strlen (get_name ());
- unsigned accflags = (flags & O_ACCMODE);
- for (__cygwin_perfile *pf = perfile_table; pf->name; pf++)
- if (!*pf->name && (pf->flags & O_ACCMODE) == accflags)
- {
- fmode = pf->flags & ~O_ACCMODE;
- break;
- }
- else
- {
- size_t pflen = strlen (pf->name);
- const char *stem = get_name () + nlen - pflen;
- if (pflen > nlen || (stem != get_name () && !isdirsep (stem[-1])))
- continue;
- else if ((pf->flags & O_ACCMODE) == accflags
- && pathmatch (stem, pf->name, !!pc.objcaseinsensitive ()))
- {
- fmode = pf->flags & ~O_ACCMODE;
- break;
- }
- }
- }
- return fmode;
-}
-
-bool
-fhandler_base::device_access_denied (int flags)
-{
- int mode = 0;
-
- if (flags & O_RDWR)
- mode |= R_OK | W_OK;
- if (flags & (O_WRONLY | O_APPEND))
- mode |= W_OK;
- if (!mode)
- mode |= R_OK;
-
- return fhaccess (mode);
-}
-
-int
-fhandler_base::fhaccess (int flags)
-{
- int res = -1;
- if (error ())
- {
- set_errno (error ());
- goto done;
- }
-
- if (!exists ())
- {
- set_errno (ENOENT);
- goto done;
- }
-
- if (!(flags & (R_OK | W_OK | X_OK)))
- return 0;
-
- if (is_fs_special ())
- /* short circuit */;
- else if (has_attribute (FILE_ATTRIBUTE_READONLY) && (flags & W_OK)
- && !pc.isdir ())
- goto eaccess_done;
- else if (has_acls ())
- {
- res = check_file_access (pc, flags);
- goto done;
- }
- else if (get_device () == FH_REGISTRY && open (O_RDONLY, 0) && get_handle ())
- {
- res = check_registry_access (get_handle (), flags);
- close ();
- return res;
- }
-
- struct __stat64 st;
- if (fstat (&st))
- goto done;
-
- if (flags & R_OK)
- {
- if (st.st_uid == myself->uid)
- {
- if (!(st.st_mode & S_IRUSR))
- goto eaccess_done;
- }
- else if (st.st_gid == myself->gid)
- {
- if (!(st.st_mode & S_IRGRP))
- goto eaccess_done;
- }
- else if (!(st.st_mode & S_IROTH))
- goto eaccess_done;
- }
-
- if (flags & W_OK)
- {
- if (st.st_uid == myself->uid)
- {
- if (!(st.st_mode & S_IWUSR))
- goto eaccess_done;
- }
- else if (st.st_gid == myself->gid)
- {
- if (!(st.st_mode & S_IWGRP))
- goto eaccess_done;
- }
- else if (!(st.st_mode & S_IWOTH))
- goto eaccess_done;
- }
-
- if (flags & X_OK)
- {
- if (st.st_uid == myself->uid)
- {
- if (!(st.st_mode & S_IXUSR))
- goto eaccess_done;
- }
- else if (st.st_gid == myself->gid)
- {
- if (!(st.st_mode & S_IXGRP))
- goto eaccess_done;
- }
- else if (!(st.st_mode & S_IXOTH))
- goto eaccess_done;
- }
-
- res = 0;
- goto done;
-
-eaccess_done:
- set_errno (EACCES);
-done:
- if (!res && (flags & W_OK) && get_device () == FH_FS
- && (pc.fs_flags () & FILE_READ_ONLY_VOLUME))
- {
- set_errno (EROFS);
- res = -1;
- }
- debug_printf ("returning %d", res);
- return res;
-}
-
-/* Open system call handler function. */
-int
-fhandler_base::open (int flags, mode_t mode)
-{
- int res = 0;
- HANDLE fh;
- ULONG file_attributes = 0;
- ULONG shared = (get_major () == DEV_TAPE_MAJOR ? 0 : FILE_SHARE_VALID_FLAGS);
- ULONG create_disposition;
- ULONG create_options;
- SECURITY_ATTRIBUTES sa = sec_none;
- security_descriptor sd;
- OBJECT_ATTRIBUTES attr;
- IO_STATUS_BLOCK io;
- NTSTATUS status;
- PFILE_FULL_EA_INFORMATION p = NULL;
- ULONG plen = 0;
-
- syscall_printf ("(%S, %p)", pc.get_nt_native_path (), flags);
-
- pc.get_object_attr (attr, sa);
-
- switch (query_open ())
- {
- case query_read_control:
- access = READ_CONTROL;
- create_options = FILE_OPEN_FOR_BACKUP_INTENT;
- break;
- case query_read_attributes:
- access = READ_CONTROL | FILE_READ_ATTRIBUTES;
- create_options = FILE_OPEN_FOR_BACKUP_INTENT;
- break;
- case query_write_control:
- access = READ_CONTROL | WRITE_OWNER | WRITE_DAC | FILE_WRITE_ATTRIBUTES;
- create_options = FILE_OPEN_FOR_BACKUP_INTENT | FILE_OPEN_FOR_RECOVERY;
- break;
- case query_write_attributes:
- access = READ_CONTROL | FILE_WRITE_ATTRIBUTES;
- create_options = FILE_OPEN_FOR_BACKUP_INTENT | FILE_OPEN_FOR_RECOVERY;
- break;
- default:
- if ((flags & O_ACCMODE) == O_RDONLY)
- {
- access = GENERIC_READ;
- create_options = FILE_OPEN_FOR_BACKUP_INTENT;
- }
- else if ((flags & O_ACCMODE) == O_WRONLY)
- {
- access = GENERIC_WRITE | READ_CONTROL | FILE_READ_ATTRIBUTES;
- create_options = FILE_OPEN_FOR_BACKUP_INTENT
- | FILE_OPEN_FOR_RECOVERY;
- }
- else
- {
- access = GENERIC_READ | GENERIC_WRITE;
- create_options = FILE_OPEN_FOR_BACKUP_INTENT
- | FILE_OPEN_FOR_RECOVERY;
- }
- if (flags & O_SYNC)
- create_options |= FILE_WRITE_THROUGH;
- if (flags & O_DIRECT)
- create_options |= FILE_NO_INTERMEDIATE_BUFFERING;
- if (get_major () != DEV_SERIAL_MAJOR && get_major () != DEV_TAPE_MAJOR)
- {
- create_options |= FILE_SYNCHRONOUS_IO_NONALERT;
- access |= SYNCHRONIZE;
- }
- break;
- }
-
- if (query_open () && pc.fs_is_nfs ())
- {
- /* Make sure we can read EAs of files on an NFS share. Also make
- sure that we're going to act on the file itself, even if it'a
- a symlink. */
- access |= FILE_READ_EA;
- if (query_open () >= query_write_control)
- access |= FILE_WRITE_EA;
- plen = sizeof nfs_aol_ffei;
- p = (PFILE_FULL_EA_INFORMATION) &nfs_aol_ffei;
- }
-
- if ((flags & O_TRUNC) && ((flags & O_ACCMODE) != O_RDONLY))
- {
- if (flags & O_CREAT)
- create_disposition = FILE_OVERWRITE_IF;
- else
- create_disposition = FILE_OVERWRITE;
- }
- else if (flags & O_CREAT)
- create_disposition = FILE_OPEN_IF;
- else
- create_disposition = FILE_OPEN;
-
- if ((flags & O_EXCL) && (flags & O_CREAT))
- create_disposition = FILE_CREATE;
-
- if (get_device () == FH_FS)
- {
- /* Add the reparse point flag to native symlinks, otherwise we open the
- target, not the symlink. This would break lstat. */
- if (pc.is_rep_symlink ())
- create_options |= FILE_OPEN_REPARSE_POINT;
-
- /* Starting with Windows 2000, when trying to overwrite an already
- existing file with FILE_ATTRIBUTE_HIDDEN and/or FILE_ATTRIBUTE_SYSTEM
- attribute set, CreateFile fails with ERROR_ACCESS_DENIED.
- Per MSDN you have to create the file with the same attributes as
- already specified for the file. */
- if (((flags & O_CREAT) || create_disposition == FILE_OVERWRITE)
- && has_attribute (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM))
- file_attributes |= pc.file_attributes ();
-
- if (flags & O_CREAT)
- {
- file_attributes |= FILE_ATTRIBUTE_NORMAL;
-
- /* If mode has no write bits set, we set the R/O attribute. */
- if (!(mode & (S_IWUSR | S_IWGRP | S_IWOTH)))
- file_attributes |= FILE_ATTRIBUTE_READONLY;
-
- /* If the file should actually be created and has ACLs,
- set files attributes, except on remote file systems.
- See below. */
- if (has_acls () && !pc.isremote ())
- {
- set_security_attribute (pc, mode, &sa, sd);
- attr.SecurityDescriptor = sa.lpSecurityDescriptor;
- }
- else if (pc.fs_is_nfs ())
- {
- /* When creating a file on an NFS share, we have to set the
- file mode by writing a NFS fattr3 structure with the
- correct mode bits set. */
- access |= FILE_WRITE_EA;
- plen = sizeof (FILE_FULL_EA_INFORMATION) + sizeof (NFS_V3_ATTR)
- + sizeof (fattr3);
- p = (PFILE_FULL_EA_INFORMATION) alloca (plen);
- p->NextEntryOffset = 0;
- p->Flags = 0;
- p->EaNameLength = sizeof (NFS_V3_ATTR) - 1;
- p->EaValueLength = sizeof (fattr3);
- strcpy (p->EaName, NFS_V3_ATTR);
- fattr3 *nfs_attr = (fattr3 *) (p->EaName
- + p->EaNameLength + 1);
- memset (nfs_attr, 0, sizeof (fattr3));
- nfs_attr->type = NF3REG;
- nfs_attr->mode = mode;
- }
- /* The file attributes are needed for later use in, e.g. fchmod. */
- pc.file_attributes (file_attributes);
- }
- }
-
- status = NtCreateFile (&fh, access, &attr, &io, NULL, file_attributes, shared,
- create_disposition, create_options, p, plen);
- if (!NT_SUCCESS (status))
- {
- /* Trying to create a directory should return EISDIR, not ENOENT. */
- PUNICODE_STRING upath = pc.get_nt_native_path ();
- if (status == STATUS_OBJECT_NAME_INVALID && (flags & O_CREAT)
- && upath->Buffer[upath->Length / sizeof (WCHAR) - 1] == '\\')
- set_errno (EISDIR);
- else
- __seterrno_from_nt_status (status);
- if (!nohandle ())
- goto done;
- }
-
- /* After some discussion on the samba-technical list, starting here:
- http://lists.samba.org/archive/samba-technical/2008-July/060247.html
-
- Always create files on a remote share using a NULL SD. Create
- correct permission bits afterwards, maintaing the owner and group
- information just like chmod.
-
- The reason to do this is to maintain the Windows behaviour when
- creating files on a remote share. Files on a remote share are
- created as the user used for authentication. In a domain that's
- usually the user you're logged in as. Outside of a domain you're
- authenticating using a local user account on the sharing machine.
- If the SIDs of the client machine are used, that's entirely
- unexpected behaviour.
-
- Doing it like we do here creates the expected SD in a domain as
- well as on standalone servers. */
- if ((flags & O_CREAT) && has_acls () && pc.isremote ())
- set_file_attribute (fh, pc, ILLEGAL_UID, ILLEGAL_GID, mode);
-
- set_io_handle (fh);
- set_flags (flags, pc.binmode ());
-
- res = 1;
- set_open_status ();
-done:
- debug_printf ("%x = NtCreateFile "
- "(%p, %x, %S, io, NULL, %x, %x, %x, %x, NULL, 0)",
- status, fh, access, pc.get_nt_native_path (), file_attributes,
- shared, create_disposition, create_options);
-
- syscall_printf ("%d = fhandler_base::open (%S, %p)",
- res, pc.get_nt_native_path (), flags);
- return res;
-}
-
-/* states:
- open buffer in binary mode? Just do the read.
-
- open buffer in text mode? Scan buffer for control zs and handle
- the first one found. Then scan buffer, converting every \r\n into
- an \n. If last char is an \r, look ahead one more char, if \n then
- modify \r, if not, remember char.
-*/
-void
-fhandler_base::read (void *in_ptr, size_t& len)
-{
- char *ptr = (char *) in_ptr;
- ssize_t copied_chars = get_readahead_into_buffer (ptr, len);
-
- if (copied_chars && is_slow ())
- {
- len = (size_t) copied_chars;
- goto out;
- }
-
- len -= copied_chars;
- if (!len)
- {
- len = (size_t) copied_chars;
- goto out;
- }
-
- raw_read (ptr + copied_chars, len);
- if (!copied_chars)
- /* nothing */;
- else if ((ssize_t) len > 0)
- len += copied_chars;
- else
- len = copied_chars;
-
- if (rbinary () || len <= 0)
- goto out;
-
- /* Scan buffer and turn \r\n into \n */
- char *src, *dst, *end;
- src = (char *) ptr;
- dst = (char *) ptr;
- end = src + len - 1;
-
- /* Read up to the last but one char - the last char needs special handling */
- while (src < end)
- {
- if (*src == '\r' && src[1] == '\n')
- src++;
- *dst++ = *src++;
- }
-
- /* If not beyond end and last char is a '\r' then read one more
- to see if we should translate this one too */
- if (src > end)
- /* nothing */;
- else if (*src != '\r')
- *dst++ = *src;
- else
- {
- char c1;
- size_t c1len = 1;
- raw_read (&c1, c1len);
- if (c1len <= 0)
- /* nothing */;
- else if (c1 == '\n')
- *dst++ = '\n';
- else
- {
- set_readahead_valid (1, c1);
- *dst++ = *src;
- }
- }
-
- len = dst - (char *) ptr;
-
-#ifndef NOSTRACE
- if (strace.active ())
- {
- char buf[16 * 6 + 1];
- char *p = buf;
-
- for (int i = 0; i < copied_chars && i < 16; ++i)
- {
- unsigned char c = ((unsigned char *) ptr)[i];
- __small_sprintf (p, " %c", c);
- p += strlen (p);
- }
- *p = '\0';
- debug_printf ("read %d bytes (%s%s)", copied_chars, buf,
- copied_chars > 16 ? " ..." : "");
- }
-#endif
-
-out:
- debug_printf ("returning %d, %s mode", len, rbinary () ? "binary" : "text");
-}
-
-int
-fhandler_base::write (const void *ptr, size_t len)
-{
- int res;
- IO_STATUS_BLOCK io;
- FILE_POSITION_INFORMATION fpi;
- FILE_STANDARD_INFORMATION fsi;
-
- if (did_lseek ())
- {
- did_lseek (false); /* don't do it again */
-
- if (!(get_flags () & O_APPEND)
- && NT_SUCCESS (NtQueryInformationFile (get_output_handle (),
- &io, &fsi, sizeof fsi,
- FileStandardInformation))
- && NT_SUCCESS (NtQueryInformationFile (get_output_handle (),
- &io, &fpi, sizeof fpi,
- FilePositionInformation))
- && fpi.CurrentByteOffset.QuadPart
- >= fsi.EndOfFile.QuadPart + (128 * 1024)
- && (pc.fs_flags () & FILE_SUPPORTS_SPARSE_FILES))
- {
- /* If the file system supports sparse files and the application
- is writing after a long seek beyond EOF, convert the file to
- a sparse file. */
- NTSTATUS status;
- status = NtFsControlFile (get_output_handle (), NULL, NULL, NULL,
- &io, FSCTL_SET_SPARSE, NULL, 0, NULL, 0);
- syscall_printf ("%p = NtFsControlFile(%S, FSCTL_SET_SPARSE)",
- status, pc.get_nt_native_path ());
- }
- }
-
- if (wbinary ())
- {
- debug_printf ("binary write");
- res = raw_write (ptr, len);
- }
- else
- {
- debug_printf ("text write");
- /* This is the Microsoft/DJGPP way. Still not ideal, but it's
- compatible.
- Modified slightly by CGF 2000-10-07 */
-
- int left_in_data = len;
- char *data = (char *)ptr;
- res = 0;
-
- while (left_in_data > 0)
- {
- char buf[CHUNK_SIZE + 1], *buf_ptr = buf;
- int left_in_buf = CHUNK_SIZE;
-
- while (left_in_buf > 0 && left_in_data > 0)
- {
- char ch = *data++;
- if (ch == '\n')
- {
- *buf_ptr++ = '\r';
- left_in_buf--;
- }
- *buf_ptr++ = ch;
- left_in_buf--;
- left_in_data--;
- if (left_in_data > 0 && ch == '\r' && *data == '\n')
- {
- *buf_ptr++ = *data++;
- left_in_buf--;
- left_in_data--;
- }
- }
-
- /* We've got a buffer-full, or we're out of data. Write it out */
- int nbytes;
- int want = buf_ptr - buf;
- if ((nbytes = raw_write (buf, want)) == want)
- {
- /* Keep track of how much written not counting additional \r's */
- res = data - (char *)ptr;
- continue;
- }
-
- if (nbytes == -1)
- res = -1; /* Error */
- else
- res += nbytes; /* Partial write. Return total bytes written. */
- break; /* All done */
- }
- }
-
- return res;
-}
-
-ssize_t
-fhandler_base::readv (const struct iovec *const iov, const int iovcnt,
- ssize_t tot)
-{
- assert (iov);
- assert (iovcnt >= 1);
-
- size_t len = tot;
- if (iovcnt == 1)
- {
- len = iov->iov_len;
- read (iov->iov_base, len);
- return len;
- }
-
- if (tot == -1) // i.e. if not pre-calculated by the caller.
- {
- len = 0;
- const struct iovec *iovptr = iov + iovcnt;
- do
- {
- iovptr -= 1;
- len += iovptr->iov_len;
- }
- while (iovptr != iov);
- }
-
- if (!len)
- return 0;
-
- char *buf = (char *) malloc (len);
-
- if (!buf)
- {
- set_errno (ENOMEM);
- return -1;
- }
-
- read (buf, len);
- ssize_t nbytes = (ssize_t) len;
-
- const struct iovec *iovptr = iov;
-
- char *p = buf;
- while (nbytes > 0)
- {
- const int frag = min (nbytes, (ssize_t) iovptr->iov_len);
- memcpy (iovptr->iov_base, p, frag);
- p += frag;
- iovptr += 1;
- nbytes -= frag;
- }
-
- free (buf);
- return len;
-}
-
-ssize_t
-fhandler_base::writev (const struct iovec *const iov, const int iovcnt,
- ssize_t tot)
-{
- assert (iov);
- assert (iovcnt >= 1);
-
- if (iovcnt == 1)
- return write (iov->iov_base, iov->iov_len);
-
- if (tot == -1) // i.e. if not pre-calculated by the caller.
- {
- tot = 0;
- const struct iovec *iovptr = iov + iovcnt;
- do
- {
- iovptr -= 1;
- tot += iovptr->iov_len;
- }
- while (iovptr != iov);
- }
-
- assert (tot >= 0);
-
- if (tot == 0)
- return 0;
-
- char *const buf = (char *) malloc (tot);
-
- if (!buf)
- {
- set_errno (ENOMEM);
- return -1;
- }
-
- char *bufptr = buf;
- const struct iovec *iovptr = iov;
- int nbytes = tot;
-
- while (nbytes != 0)
- {
- const int frag = min (nbytes, (ssize_t) iovptr->iov_len);
- memcpy (bufptr, iovptr->iov_base, frag);
- bufptr += frag;
- iovptr += 1;
- nbytes -= frag;
- }
- ssize_t ret = write (buf, tot);
- free (buf);
- return ret;
-}
-
-_off64_t
-fhandler_base::lseek (_off64_t offset, int whence)
-{
- NTSTATUS status;
- IO_STATUS_BLOCK io;
- FILE_POSITION_INFORMATION fpi;
- FILE_STANDARD_INFORMATION fsi;
-
- /* Seeks on text files is tough, we rewind and read till we get to the
- right place. */
-
- if (whence != SEEK_CUR || offset != 0)
- {
- if (whence == SEEK_CUR)
- offset -= ralen - raixget;
- set_readahead_valid (0);
- }
-
- switch (whence)
- {
- case SEEK_SET:
- fpi.CurrentByteOffset.QuadPart = offset;
- break;
- case SEEK_CUR:
- status = NtQueryInformationFile (get_handle (), &io, &fpi, sizeof fpi,
- FilePositionInformation);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- return -1;
- }
- fpi.CurrentByteOffset.QuadPart += offset;
- break;
- default: /* SEEK_END */
- status = NtQueryInformationFile (get_handle (), &io, &fsi, sizeof fsi,
- FileStandardInformation);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- return -1;
- }
- fpi.CurrentByteOffset.QuadPart = fsi.EndOfFile.QuadPart + offset;
- break;
- }
-
- debug_printf ("setting file pointer to %U", fpi.CurrentByteOffset.QuadPart);
- status = NtSetInformationFile (get_handle (), &io, &fpi, sizeof fpi,
- FilePositionInformation);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- return -1;
- }
- _off64_t res = fpi.CurrentByteOffset.QuadPart;
-
- /* When next we write(), we will check to see if *this* seek went beyond
- the end of the file and if so, potentially sparsify the file. */
- did_lseek (true);
-
- /* If this was a SEEK_CUR with offset 0, we still might have
- readahead that we have to take into account when calculating
- the actual position for the application. */
- if (whence == SEEK_CUR)
- res -= ralen - raixget;
-
- return res;
-}
-
-ssize_t __stdcall
-fhandler_base::pread (void *, size_t, _off64_t)
-{
- set_errno (ESPIPE);
- return -1;
-}
-
-ssize_t __stdcall
-fhandler_base::pwrite (void *, size_t, _off64_t)
-{
- set_errno (ESPIPE);
- return -1;
-}
-
-int
-fhandler_base::close ()
-{
- int res = -1;
-
- syscall_printf ("closing '%s' handle %p", get_name (), get_handle ());
- /* Delete all POSIX locks on the file. Delete all flock locks on the
- file if this is the last reference to this file. */
- if (unique_id)
- del_my_locks (false);
- if (nohandle () || CloseHandle (get_handle ()))
- res = 0;
- else
- {
- paranoid_printf ("CloseHandle (%d <%s>) failed", get_handle (),
- get_name ());
-
- __seterrno ();
- }
- destroy_overlapped ();
- return res;
-}
-
-int
-fhandler_base::ioctl (unsigned int cmd, void *buf)
-{
- int res;
-
- switch (cmd)
- {
- case FIONBIO:
- set_nonblocking (*(int *) buf);
- res = 0;
- break;
- default:
- set_errno (EINVAL);
- res = -1;
- break;
- }
-
- syscall_printf ("%d = ioctl (%x, %p)", res, cmd, buf);
- return res;
-}
-
-int
-fhandler_base::lock (int, struct __flock64 *)
-{
- set_errno (EINVAL);
- return -1;
-}
-
-int __stdcall
-fhandler_base::fstat (struct __stat64 *buf)
-{
- debug_printf ("here");
-
- if (is_fs_special ())
- return fstat_fs (buf);
-
- switch (get_device ())
- {
- case FH_PIPE:
- buf->st_mode = S_IFIFO | S_IRUSR | S_IWUSR;
- break;
- case FH_PIPEW:
- buf->st_mode = S_IFIFO | S_IWUSR;
- break;
- case FH_PIPER:
- buf->st_mode = S_IFIFO | S_IRUSR;
- break;
- case FH_FULL:
- buf->st_mode = S_IFCHR | S_IRUSR | S_IWUSR | S_IWGRP | S_IWOTH;
- break;
- default:
- buf->st_mode = S_IFCHR | STD_RBITS | STD_WBITS | S_IWGRP | S_IWOTH;
- break;
- }
-
- buf->st_uid = geteuid32 ();
- buf->st_gid = getegid32 ();
- buf->st_nlink = 1;
- buf->st_blksize = PREFERRED_IO_BLKSIZE;
- buf->st_ctim.tv_sec = 1164931200L; /* Arbitrary value: 2006-12-01 */
- buf->st_ctim.tv_nsec = 0L;
- buf->st_atim = buf->st_mtim = buf->st_birthtim = buf->st_ctim;
- return 0;
-}
-
-int __stdcall
-fhandler_base::fstatvfs (struct statvfs *sfs)
-{
- /* If we hit this base implementation, it's some device in /dev.
- Just call statvfs on /dev for simplicity. */
- path_conv pc ("/dev");
- fhandler_disk_file fh (pc);
- return fh.fstatvfs (sfs);
-}
-
-void
-fhandler_base::init (HANDLE f, DWORD a, mode_t bin)
-{
- set_io_handle (f);
- access = a;
- a &= GENERIC_READ | GENERIC_WRITE;
- int flags = 0;
- if (a == GENERIC_READ)
- flags = O_RDONLY;
- else if (a == GENERIC_WRITE)
- flags = O_WRONLY;
- else if (a == (GENERIC_READ | GENERIC_WRITE))
- flags = O_RDWR;
- set_flags (flags | bin);
- set_open_status ();
- debug_printf ("created new fhandler_base for handle %p, bin %d", f, rbinary ());
-}
-
-int
-fhandler_base::dup (fhandler_base *child)
-{
- debug_printf ("in fhandler_base dup");
-
- HANDLE nh;
- if (!nohandle ())
- {
- if (!DuplicateHandle (hMainProc, get_handle (), hMainProc, &nh, 0, TRUE,
- DUPLICATE_SAME_ACCESS))
- {
- debug_printf ("dup(%s) failed, handle %x, %E",
- get_name (), get_handle ());
- __seterrno ();
- return -1;
- }
-
- VerifyHandle (nh);
- child->set_io_handle (nh);
- }
- if (get_overlapped ())
- child->setup_overlapped ();
- return 0;
-}
-
-int fhandler_base::fcntl (int cmd, void *arg)
-{
- int res;
-
- switch (cmd)
- {
- case F_GETFD:
- res = close_on_exec () ? FD_CLOEXEC : 0;
- break;
- case F_SETFD:
- set_close_on_exec (((int) arg & FD_CLOEXEC) ? 1 : 0);
- res = 0;
- break;
- case F_GETFL:
- res = get_flags ();
- debug_printf ("GETFL: %p", res);
- break;
- case F_SETFL:
- {
- /*
- * Only O_APPEND, O_ASYNC and O_NONBLOCK/O_NDELAY are allowed.
- * Each other flag will be ignored.
- * Since O_ASYNC isn't defined in fcntl.h it's currently
- * ignored as well.
- */
- const int allowed_flags = O_APPEND | O_NONBLOCK_MASK;
- int new_flags = (int) arg & allowed_flags;
- /* Carefully test for the O_NONBLOCK or deprecated OLD_O_NDELAY flag.
- Set only the flag that has been passed in. If both are set, just
- record O_NONBLOCK. */
- if ((new_flags & OLD_O_NDELAY) && (new_flags & O_NONBLOCK))
- new_flags &= ~OLD_O_NDELAY;
- set_flags ((get_flags () & ~allowed_flags) | new_flags);
- }
- res = 0;
- break;
- default:
- set_errno (EINVAL);
- res = -1;
- break;
- }
- return res;
-}
-
-/* Base terminal handlers. These just return errors. */
-
-int
-fhandler_base::tcflush (int)
-{
- set_errno (ENOTTY);
- return -1;
-}
-
-int
-fhandler_base::tcsendbreak (int)
-{
- set_errno (ENOTTY);
- return -1;
-}
-
-int
-fhandler_base::tcdrain ()
-{
- set_errno (ENOTTY);
- return -1;
-}
-
-int
-fhandler_base::tcflow (int)
-{
- set_errno (ENOTTY);
- return -1;
-}
-
-int
-fhandler_base::tcsetattr (int, const struct termios *)
-{
- set_errno (ENOTTY);
- return -1;
-}
-
-int
-fhandler_base::tcgetattr (struct termios *)
-{
- set_errno (ENOTTY);
- return -1;
-}
-
-int
-fhandler_base::tcsetpgrp (const pid_t)
-{
- set_errno (ENOTTY);
- return -1;
-}
-
-int
-fhandler_base::tcgetpgrp ()
-{
- set_errno (ENOTTY);
- return -1;
-}
-
-void
-fhandler_base::operator delete (void *p)
-{
- cfree (p);
-}
-
-/* Normal I/O constructor */
-fhandler_base::fhandler_base () :
- status (),
- open_status (),
- access (0),
- io_handle (NULL),
- ino (0),
- openflags (0),
- rabuf (NULL),
- ralen (0),
- raixget (0),
- raixput (0),
- rabuflen (0),
- unique_id (0),
- archetype (NULL),
- usecount (0)
-{
-}
-
-/* Normal I/O destructor */
-fhandler_base::~fhandler_base ()
-{
- if (rabuf)
- free (rabuf);
-}
-
-/**********************************************************************/
-/* /dev/null */
-
-fhandler_dev_null::fhandler_dev_null () :
- fhandler_base ()
-{
-}
-
-void
-fhandler_base::set_no_inheritance (HANDLE &h, bool not_inheriting)
-{
- if (!SetHandleInformation (h, HANDLE_FLAG_INHERIT,
- not_inheriting ? 0 : HANDLE_FLAG_INHERIT))
- debug_printf ("SetHandleInformation failed, %E");
-#ifdef DEBUGGING_AND_FDS_PROTECTED
- if (h)
- setclexec (oh, h, not_inheriting);
-#endif
-}
-
-bool
-fhandler_base::fork_fixup (HANDLE parent, HANDLE &h, const char *name)
-{
- HANDLE oh = h;
- bool res = false;
- if (/* !is_socket () && */ !close_on_exec ())
- debug_printf ("handle %p already opened", h);
- else if (!DuplicateHandle (parent, h, hMainProc, &h, 0, !close_on_exec (),
- DUPLICATE_SAME_ACCESS))
- system_printf ("%s - %E, handle %s<%p>", get_name (), name, h);
- else
- {
- if (oh != h)
- VerifyHandle (h);
- res = true;
- }
- if (get_overlapped ())
- setup_overlapped ();
- return res;
-}
-
-void
-fhandler_base::set_close_on_exec (bool val)
-{
- if (!nohandle ())
- set_no_inheritance (io_handle, val);
- close_on_exec (val);
- debug_printf ("set close_on_exec for %s to %d", get_name (), val);
-}
-
-void
-fhandler_base::fixup_after_fork (HANDLE parent)
-{
- debug_printf ("inheriting '%s' from parent", get_name ());
- if (!nohandle ())
- fork_fixup (parent, io_handle, "io_handle");
- if (get_overlapped ())
- setup_overlapped ();
- /* POSIX locks are not inherited across fork. */
- if (unique_id)
- del_my_locks (true);
-}
-
-void
-fhandler_base::fixup_after_exec ()
-{
- debug_printf ("here for '%s'", get_name ());
- if (get_overlapped ())
- setup_overlapped ();
- if (unique_id && close_on_exec ())
- del_my_locks (false);
-}
-
-bool
-fhandler_base::is_nonblocking ()
-{
- return (openflags & O_NONBLOCK_MASK) != 0;
-}
-
-void
-fhandler_base::set_nonblocking (int yes)
-{
- int current = openflags & O_NONBLOCK_MASK;
- int new_flags = yes ? (!current ? O_NONBLOCK : current) : 0;
- openflags = (openflags & ~O_NONBLOCK_MASK) | new_flags;
-}
-
-int
-fhandler_base::mkdir (mode_t)
-{
- if (exists ())
- set_errno (EEXIST);
- else
- set_errno (EROFS);
- return -1;
-}
-
-int
-fhandler_base::rmdir ()
-{
- if (!exists ())
- set_errno (ENOENT);
- else if (!pc.isdir ())
- set_errno (ENOTDIR);
- else
- set_errno (EROFS);
- return -1;
-}
-
-DIR *
-fhandler_base::opendir (int fd)
-{
- set_errno (ENOTDIR);
- return NULL;
-}
-
-int
-fhandler_base::readdir (DIR *, dirent *)
-{
- return ENOTDIR;
-}
-
-_off64_t
-fhandler_base::telldir (DIR *)
-{
- set_errno (ENOTDIR);
- return -1;
-}
-
-void
-fhandler_base::seekdir (DIR *, _off64_t)
-{
- set_errno (ENOTDIR);
-}
-
-void
-fhandler_base::rewinddir (DIR *)
-{
- set_errno (ENOTDIR);
-}
-
-int
-fhandler_base::closedir (DIR *)
-{
- set_errno (ENOTDIR);
- return -1;
-}
-
-int
-fhandler_base::fchmod (mode_t mode)
-{
- extern int chmod_device (path_conv& pc, mode_t mode);
- if (pc.is_fs_special ())
- return chmod_device (pc, mode);
- /* By default, just succeeds. */
- return 0;
-}
-
-int
-fhandler_base::fchown (__uid32_t uid, __gid32_t gid)
-{
- if (pc.is_fs_special ())
- return ((fhandler_disk_file *) this)->fhandler_disk_file::fchown (uid, gid);
- /* By default, just succeeds. */
- return 0;
-}
-
-int
-fhandler_base::facl (int cmd, int nentries, __aclent32_t *aclbufp)
-{
- int res = -1;
- switch (cmd)
- {
- case SETACL:
- /* By default, just succeeds. */
- res = 0;
- break;
- case GETACL:
- if (!aclbufp)
- set_errno(EFAULT);
- else if (nentries < MIN_ACL_ENTRIES)
- set_errno (ENOSPC);
- else
- {
- aclbufp[0].a_type = USER_OBJ;
- aclbufp[0].a_id = myself->uid;
- aclbufp[0].a_perm = (S_IRUSR | S_IWUSR) >> 6;
- aclbufp[1].a_type = GROUP_OBJ;
- aclbufp[1].a_id = myself->gid;
- aclbufp[1].a_perm = (S_IRGRP | S_IWGRP) >> 3;
- aclbufp[2].a_type = OTHER_OBJ;
- aclbufp[2].a_id = ILLEGAL_GID;
- aclbufp[2].a_perm = S_IROTH | S_IWOTH;
- aclbufp[3].a_type = CLASS_OBJ;
- aclbufp[3].a_id = ILLEGAL_GID;
- aclbufp[3].a_perm = S_IRWXU | S_IRWXG | S_IRWXO;
- res = MIN_ACL_ENTRIES;
- }
- break;
- case GETACLCNT:
- res = MIN_ACL_ENTRIES;
- break;
- default:
- set_errno (EINVAL);
- break;
- }
- return res;
-}
-
-ssize_t
-fhandler_base::fgetxattr (const char *name, void *value, size_t size)
-{
- set_errno (ENOTSUP);
- return -1;
-}
-
-int
-fhandler_base::fsetxattr (const char *name, const void *value, size_t size,
- int flags)
-{
- set_errno (ENOTSUP);
- return -1;
-}
-
-int
-fhandler_base::fadvise (_off64_t offset, _off64_t length, int advice)
-{
- set_errno (EINVAL);
- return -1;
-}
-
-int
-fhandler_base::ftruncate (_off64_t length, bool allow_truncate)
-{
- set_errno (EINVAL);
- return -1;
-}
-
-int
-fhandler_base::link (const char *newpath)
-{
- set_errno (EINVAL);
- return -1;
-}
-
-int
-fhandler_base::utimens (const struct timespec *tvp)
-{
- if (is_fs_special ())
- return utimens_fs (tvp);
-
- set_errno (EINVAL);
- return -1;
-}
-
-int
-fhandler_base::fsync ()
-{
- if (!get_handle () || nohandle ())
- {
- set_errno (EINVAL);
- return -1;
- }
- if (pc.isdir ()) /* Just succeed. */
- return 0;
- if (FlushFileBuffers (get_handle ()))
- return 0;
- __seterrno ();
- return -1;
-}
-
-int
-fhandler_base::fpathconf (int v)
-{
- int ret;
-
- switch (v)
- {
- case _PC_LINK_MAX:
- return pc.fs_is_ntfs () || pc.fs_is_samba () || pc.fs_is_nfs ()
- ? LINK_MAX : 1;
- case _PC_MAX_CANON:
- if (is_tty ())
- return MAX_CANON;
- set_errno (EINVAL);
- break;
- case _PC_MAX_INPUT:
- if (is_tty ())
- return MAX_INPUT;
- set_errno (EINVAL);
- break;
- case _PC_NAME_MAX:
- /* NAME_MAX is without trailing \0 */
- if (!pc.isdir ())
- return NAME_MAX;
- ret = NT_MAX_PATH - strlen (get_name ()) - 2;
- return ret < 0 ? 0 : ret > NAME_MAX ? NAME_MAX : ret;
- case _PC_PATH_MAX:
- /* PATH_MAX is with trailing \0 */
- if (!pc.isdir ())
- return PATH_MAX;
- ret = NT_MAX_PATH - strlen (get_name ()) - 1;
- return ret < 0 ? 0 : ret > PATH_MAX ? PATH_MAX : ret;
- case _PC_PIPE_BUF:
- if (pc.isdir ()
- || get_device () == FH_FIFO || get_device () == FH_PIPE
- || get_device () == FH_PIPER || get_device () == FH_PIPEW)
- return PIPE_BUF;
- set_errno (EINVAL);
- break;
- case _PC_CHOWN_RESTRICTED:
- return 1;
- case _PC_NO_TRUNC:
- return 1;
- case _PC_VDISABLE:
- if (is_tty ())
- return _POSIX_VDISABLE;
- set_errno (EINVAL);
- break;
- case _PC_ASYNC_IO:
- case _PC_PRIO_IO:
- break;
- case _PC_SYNC_IO:
- return 1;
- case _PC_FILESIZEBITS:
- return FILESIZEBITS;
- case _PC_2_SYMLINKS:
- return 1;
- case _PC_SYMLINK_MAX:
- return SYMLINK_MAX;
- case _PC_POSIX_PERMISSIONS:
- case _PC_POSIX_SECURITY:
- if (get_device () == FH_FS)
- return pc.has_acls () || pc.fs_is_nfs ();
- set_errno (EINVAL);
- break;
- default:
- set_errno (EINVAL);
- break;
- }
- return -1;
-}
-
-/* Overlapped I/O */
-
-bool
-fhandler_base::setup_overlapped ()
-{
- OVERLAPPED *ov = get_overlapped ();
- memset (ov, 0, sizeof (*ov));
- return (ov->hEvent = CreateEvent (&sec_none_nih, true, false, NULL));
-}
-
-void
-fhandler_base::destroy_overlapped ()
-{
- OVERLAPPED *ov = get_overlapped ();
- if (ov && ov->hEvent)
- {
- CloseHandle (ov->hEvent);
- ov->hEvent = NULL;
- }
-}
-
-int
-fhandler_base::wait_overlapped (bool inres, bool writing, DWORD *bytes)
-{
- int res = 0;
- *bytes = (DWORD) -1;
- DWORD err;
- if (inres || ((err = GetLastError ()) == ERROR_IO_PENDING))
- {
-#ifdef DEBUGGING
- if (!get_overlapped ())
- system_printf ("get_overlapped is zero?");
- if (!get_overlapped ()->hEvent)
- system_printf ("hEvent is zero?");
-#endif
- DWORD n = 1;
- HANDLE w4[2];
- w4[0] = get_overlapped ()->hEvent;
- if (&_my_tls == _main_tls)
- w4[n++] = signal_arrived;
- HANDLE h = writing ? get_output_handle () : get_handle ();
- DWORD wfres = WaitForMultipleObjects (n, w4, false, INFINITE);
- if (wfres != WAIT_OBJECT_0)
- CancelIo (h);
- BOOL wores = GetOverlappedResult (h, get_overlapped (), bytes, false);
- bool signalled = !wores && (wfres == WAIT_OBJECT_0 + 1);
- if (signalled)
- {
- debug_printf ("got a signal");
- set_errno (EINTR);
- res = 0;
- err = 0;
- }
- else if (!wores)
- {
- err = GetLastError ();
- debug_printf ("general error");
- }
- else
- {
- debug_printf ("normal read");
- res = 1;
- err = 0;
- }
- }
-
- if (!err)
- /* nothing to do */;
- else if (err != ERROR_HANDLE_EOF && err != ERROR_BROKEN_PIPE)
- {
- debug_printf ("err %u", err);
- __seterrno_from_win_error (err);
- res = -1;
- }
- else
- {
- res = 1;
- *bytes = 0;
- err = 0;
- debug_printf ("EOF");
- }
-
- /* Make sure the event is unsignalled (this is a potential race in a multi-threaded
- app. Sigh.). Must do this after WFMO and GetOverlappedResult or suffer
- occasional sporadic problems:
- http://cygwin.com/ml/cygwin/2008-08/msg00511.html */
- ResetEvent (get_overlapped ()->hEvent);
- if (writing && (err == ERROR_NO_DATA || err == ERROR_BROKEN_PIPE))
- raise (SIGPIPE);
- return res;
-}
-
-void
-fhandler_base::read_overlapped (void *ptr, size_t& len)
-{
-#ifdef DEBUGGING
- assert (get_overlapped ());
- assert (get_overlapped ()->hEvent);
-#endif
- while (1)
- {
- bool res = ReadFile (get_handle (), ptr, len, (DWORD *) &len,
- get_overlapped ());
- int wres = wait_overlapped (res, false, (DWORD *) &len);
- if (wres || !_my_tls.call_signal_handler ())
- break;
- }
-}
-
-int
-fhandler_base::write_overlapped (const void *ptr, size_t len)
-{
- DWORD bytes_written;
-
- while (1)
- {
- bool res = WriteFile (get_output_handle (), ptr, len, &bytes_written,
- get_overlapped ());
- int wres = wait_overlapped (res, true, &bytes_written);
- if (wres < 0)
- return -1;
- if (wres || !_my_tls.call_signal_handler ())
- break;
- }
- return bytes_written;
-}
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
deleted file mode 100644
index fdaf7d5..0000000
--- a/winsup/cygwin/fhandler.h
+++ /dev/null
@@ -1,1427 +0,0 @@
-/* fhandler.h
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008 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 _FHANDLER_H_
-#define _FHANDLER_H_
-
-/* fcntl flags used only internaly. */
-#define O_NOSYMLINK 0x080000
-#define O_DIROPEN 0x100000
-
-/* newlib used to define O_NDELAY differently from O_NONBLOCK. Now it
- properly defines both to be the same. Unfortunately, we have to
- behave properly the old version, too, to accommodate older executables. */
-#define OLD_O_NDELAY (CYGWIN_VERSION_CHECK_FOR_OLD_O_NONBLOCK ? 4 : 0)
-
-/* Care for the old O_NDELAY flag. If one of the flags is set,
- both flags are set. */
-#define O_NONBLOCK_MASK (O_NONBLOCK | OLD_O_NDELAY)
-
-/* It appears that 64K is the block size used for buffered I/O on NT.
- Using this blocksize in read/write calls in the application results
- in a much better performance than using smaller values. */
-#define PREFERRED_IO_BLKSIZE ((blksize_t) 65536)
-
-extern const char *windows_device_names[];
-extern struct __cygwin_perfile *perfile_table;
-#define __fmode (*(user_data->fmode_ptr))
-extern const char proc[];
-extern const int proc_len;
-
-class select_record;
-class fhandler_disk_file;
-class inode_t;
-typedef struct __DIR DIR;
-struct dirent;
-struct iovec;
-struct __acl32;
-
-enum dirent_states
-{
- dirent_ok = 0x0000,
- dirent_saw_dot = 0x0001,
- dirent_saw_dot_dot = 0x0002,
- dirent_saw_eof = 0x0004,
- dirent_isroot = 0x0008,
- dirent_set_d_ino = 0x0010,
- dirent_get_d_ino = 0x0020,
- dirent_nfs_d_ino = 0x0040,
-
- /* Global flags which must not be deleted on rewinddir or seekdir. */
- dirent_info_mask = 0x0078
-};
-
-enum conn_state
-{
- unconnected = 0,
- connect_pending = 1,
- connected = 2,
- connect_failed = 3
-};
-
-enum line_edit_status
-{
- line_edit_ok = 0,
- line_edit_input_done = 1,
- line_edit_signalled = 2,
- line_edit_error = 3,
- line_edit_pipe_full = 4
-};
-
-enum bg_check_types
-{
- bg_error = -1,
- bg_eof = 0,
- bg_ok = 1,
- bg_signalled = 2
-};
-
-enum query_state {
- no_query = 0,
- query_read_control = 1,
- query_read_attributes = 2,
- query_write_control = 3,
- query_write_attributes = 4
-};
-
-class fhandler_base
-{
- friend class dtable;
- friend void close_all_files (bool);
-
- struct status_flags
- {
- unsigned rbinary : 1; /* binary read mode */
- unsigned rbinset : 1; /* binary read mode explicitly set */
- unsigned wbinary : 1; /* binary write mode */
- unsigned wbinset : 1; /* binary write mode explicitly set */
- unsigned nohandle : 1; /* No handle associated with fhandler. */
- unsigned uninterruptible_io : 1; /* Set if I/O should be uninterruptible. */
- unsigned did_lseek : 1; /* set when lseek is called as a flag that
- _write should check if we've moved
- beyond EOF, zero filling or making
- file sparse if so. */
- unsigned query_open : 3; /* open file without requesting either
- read or write access */
- unsigned close_on_exec : 1; /* close-on-exec */
- unsigned need_fork_fixup : 1; /* Set if need to fixup after fork. */
-
- public:
- status_flags () :
- rbinary (0), rbinset (0), wbinary (0), wbinset (0), nohandle (0),
- uninterruptible_io (0), did_lseek (0),
- query_open (no_query), close_on_exec (0), need_fork_fixup (0)
- {}
- } status, open_status;
-
- private:
- int access;
- HANDLE io_handle;
-
- __ino64_t ino; /* file ID or hashed filename, depends on FS. */
-
- protected:
- /* File open flags from open () and fcntl () calls */
- int openflags;
-
- char *rabuf; /* used for crlf conversion in text files */
- size_t ralen;
- size_t raixget;
- size_t raixput;
- size_t rabuflen;
-
- /* Used for advisory file locking. See flock.cc. */
- long long unique_id;
- void del_my_locks (bool);
-
- HANDLE read_state;
- int wait_overlapped (bool, bool, DWORD *) __attribute__ ((regparm (3)));
- bool setup_overlapped () __attribute__ ((regparm (1)));
- void destroy_overlapped () __attribute__ ((regparm (1)));
-
- public:
- class fhandler_base *archetype;
- int usecount;
-
- path_conv pc;
-
- virtual void set_name (path_conv &pc);
- virtual void set_name (const char *s) {pc.set_normalized_path (s);}
- int error () const {return pc.error;}
- void set_error (int error) {pc.error = error;}
- bool exists () const {return pc.exists ();}
- int pc_binmode () const {return pc.binmode ();}
- device& dev () {return pc.dev;}
- operator DWORD& () {return (DWORD&) pc;}
- virtual size_t size () const {return sizeof (*this);}
-
- virtual fhandler_base& operator =(fhandler_base &x);
- fhandler_base ();
- virtual ~fhandler_base ();
-
- /* Non-virtual simple accessor functions. */
- void set_io_handle (HANDLE x) { io_handle = x; }
-
- DWORD& get_device () { return dev ().devn; }
- DWORD get_major () { return dev ().major; }
- DWORD get_minor () { return dev ().minor; }
- virtual int get_unit () { return dev ().minor; }
-
- int get_access () const { return access; }
- void set_access (int x) { access = x; }
-
- int get_flags () { return openflags; }
- void set_flags (int x, int supplied_bin = 0);
-
- bool is_nonblocking ();
- void set_nonblocking (int);
-
- bool wbinary () const { return status.wbinset ? status.wbinary : 1; }
- bool rbinary () const { return status.rbinset ? status.rbinary : 1; }
-
- void wbinary (bool b) {status.wbinary = b; status.wbinset = 1;}
- void rbinary (bool b) {status.rbinary = b; status.rbinset = 1;}
-
- void set_open_status () {open_status = status;}
- void reset_to_open_binmode ()
- {
- set_flags ((get_flags () & ~(O_TEXT | O_BINARY))
- | ((open_status.wbinary || open_status.rbinary)
- ? O_BINARY : O_TEXT));
- }
-
- IMPLEMENT_STATUS_FLAG (bool, wbinset)
- IMPLEMENT_STATUS_FLAG (bool, rbinset)
- IMPLEMENT_STATUS_FLAG (bool, nohandle)
- IMPLEMENT_STATUS_FLAG (bool, uninterruptible_io)
- IMPLEMENT_STATUS_FLAG (bool, did_lseek)
- IMPLEMENT_STATUS_FLAG (query_state, query_open)
- IMPLEMENT_STATUS_FLAG (bool, close_on_exec)
- IMPLEMENT_STATUS_FLAG (bool, need_fork_fixup)
-
- int get_default_fmode (int flags);
-
- virtual void set_close_on_exec (bool val);
-
- LPSECURITY_ATTRIBUTES get_inheritance (bool all = 0)
- {
- if (all)
- return close_on_exec () ? &sec_all_nih : &sec_all;
- else
- return close_on_exec () ? &sec_none_nih : &sec_none;
- }
-
- virtual void fixup_after_fork (HANDLE);
- virtual void fixup_after_exec ();
- void create_read_state (LONG n)
- {
- read_state = CreateSemaphore (&sec_none_nih, 0, n, NULL);
- ProtectHandle (read_state);
- }
-
- void signal_read_state (LONG n)
- {
- ReleaseSemaphore (read_state, n, NULL);
- }
-
- bool get_readahead_valid () { return raixget < ralen; }
- int puts_readahead (const char *s, size_t len = (size_t) -1);
- int put_readahead (char value);
-
- int get_readahead ();
- int peek_readahead (int queryput = 0);
-
- int eat_readahead (int n);
-
- void set_readahead_valid (int val, int ch = -1);
-
- int get_readahead_into_buffer (char *buf, size_t buflen);
-
- bool has_acls () const { return pc.has_acls (); }
-
- bool isremote () { return pc.isremote (); }
-
- bool has_attribute (DWORD x) const {return pc.has_attribute (x);}
- const char *get_name () const { return pc.normalized_path; }
- const char *get_win32_name () { return pc.get_win32 (); }
- __dev32_t get_dev () { return pc.fs_serial_number (); }
- __ino64_t get_ino () { return ino ?: ino = hash_path_name (0, pc.get_nt_native_path ()); }
- long long get_unique_id () const { return unique_id; }
- /* Returns name used for /proc/<pid>/fd in buf. */
- virtual char *get_proc_fd_name (char *buf);
-
- virtual void hclose (HANDLE h) {CloseHandle (h);}
- virtual void set_no_inheritance (HANDLE &, bool);
-
- /* fixup fd possibly non-inherited handles after fork */
- bool fork_fixup (HANDLE, HANDLE &, const char *);
-
- virtual int open (int, mode_t = 0);
- int open_fs (int, mode_t = 0);
- virtual int close ();
- int close_fs () { return fhandler_base::close (); }
- virtual int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
- int __stdcall fstat_fs (struct __stat64 *buf) __attribute__ ((regparm (2)));
- int __stdcall fstat_helper (struct __stat64 *buf,
- FILETIME ftChangeTime,
- FILETIME ftLastAccessTime,
- FILETIME ftLastWriteTime,
- FILETIME ftCreationTime,
- DWORD dwVolumeSerialNumber,
- ULONGLONG nFileSize,
- LONGLONG nAllocSize,
- ULONGLONG nFileIndex,
- DWORD nNumberOfLinks,
- DWORD dwFileAttributes)
- __attribute__ ((regparm (3)));
- int __stdcall fstat_by_nfs_ea (struct __stat64 *buf) __attribute__ ((regparm (2)));
- int __stdcall fstat_by_handle (struct __stat64 *buf) __attribute__ ((regparm (2)));
- int __stdcall fstat_by_name (struct __stat64 *buf) __attribute__ ((regparm (2)));
- virtual int __stdcall fstatvfs (struct statvfs *buf) __attribute__ ((regparm (2)));
- int utimens_fs (const struct timespec *) __attribute__ ((regparm (2)));
- virtual int __stdcall fchmod (mode_t mode) __attribute__ ((regparm (1)));
- virtual int __stdcall fchown (__uid32_t uid, __gid32_t gid) __attribute__ ((regparm (2)));
- virtual int __stdcall facl (int, int, __acl32 *) __attribute__ ((regparm (3)));
- virtual ssize_t __stdcall fgetxattr (const char *, void *, size_t) __attribute__ ((regparm (3)));
- virtual int __stdcall fsetxattr (const char *, const void *, size_t, int) __attribute__ ((regparm (3)));
- virtual int __stdcall fadvise (_off64_t, _off64_t, int) __attribute__ ((regparm (3)));
- virtual int __stdcall ftruncate (_off64_t, bool) __attribute__ ((regparm (3)));
- virtual int __stdcall link (const char *) __attribute__ ((regparm (2)));
- virtual int __stdcall utimens (const struct timespec *) __attribute__ ((regparm (2)));
- virtual int __stdcall fsync () __attribute__ ((regparm (1)));
- virtual int ioctl (unsigned int cmd, void *);
- virtual int fcntl (int cmd, void *);
- virtual char const *ttyname () { return get_name (); }
- virtual void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
- virtual void __stdcall read_overlapped (void *ptr, size_t& len) __attribute__ ((regparm (3)));
- virtual int write (const void *ptr, size_t len);
- virtual int __stdcall write_overlapped (const void *ptr, size_t len);
- virtual ssize_t readv (const struct iovec *, int iovcnt, ssize_t tot = -1);
- virtual ssize_t writev (const struct iovec *, int iovcnt, ssize_t tot = -1);
- virtual ssize_t __stdcall pread (void *, size_t, _off64_t) __attribute__ ((regparm (3)));
- virtual ssize_t __stdcall pwrite (void *, size_t, _off64_t) __attribute__ ((regparm (3)));
- virtual _off64_t lseek (_off64_t offset, int whence);
- virtual int lock (int, struct __flock64 *);
- virtual int dup (fhandler_base *child);
- virtual int fpathconf (int);
-
- virtual HANDLE mmap (caddr_t *addr, size_t len, int prot,
- int flags, _off64_t off);
- virtual int munmap (HANDLE h, caddr_t addr, size_t len);
- virtual int msync (HANDLE h, caddr_t addr, size_t len, int flags);
- virtual bool fixup_mmap_after_fork (HANDLE h, int prot, int flags,
- _off64_t offset, DWORD size,
- void *address);
-
- void *operator new (size_t, void *p) __attribute__ ((nothrow)) {return p;}
-
- virtual void init (HANDLE, DWORD, mode_t);
-
- virtual int tcflush (int);
- virtual int tcsendbreak (int);
- virtual int tcdrain ();
- virtual int tcflow (int);
- virtual int tcsetattr (int a, const struct termios *t);
- virtual int tcgetattr (struct termios *t);
- virtual int tcsetpgrp (const pid_t pid);
- virtual int tcgetpgrp ();
- virtual bool is_tty () const { return false; }
- virtual bool isdevice () { return true; }
- virtual bool isfifo () { return false; }
- virtual char *ptsname () { return NULL;}
- virtual class fhandler_socket *is_socket () { return NULL; }
- virtual class fhandler_console *is_console () { return 0; }
- virtual int is_windows () {return 0; }
-
- virtual void raw_read (void *ptr, size_t& ulen);
- virtual int raw_write (const void *ptr, size_t ulen);
- virtual OVERLAPPED *get_overlapped () {return NULL;}
-
- /* Virtual accessor functions to hide the fact
- that some fd's have two handles. */
- virtual HANDLE& get_handle () { return io_handle; }
- virtual HANDLE& get_io_handle () { return io_handle; }
- virtual HANDLE& get_output_handle () { return io_handle; }
- virtual bool hit_eof () {return false;}
- virtual select_record *select_read (select_record *s);
- virtual select_record *select_write (select_record *s);
- virtual select_record *select_except (select_record *s);
- virtual int ready_for_read (int fd, DWORD howlong);
- virtual const char *get_native_name ()
- {
- return dev ().native;
- }
- virtual bg_check_types bg_check (int) {return bg_ok;}
- void clear_readahead ()
- {
- raixput = raixget = ralen = rabuflen = 0;
- rabuf = NULL;
- }
- void operator delete (void *);
- virtual void set_eof () {}
- virtual int mkdir (mode_t mode);
- virtual int rmdir ();
- virtual DIR *opendir (int fd) __attribute__ ((regparm (2)));
- virtual int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
- virtual _off64_t telldir (DIR *);
- virtual void seekdir (DIR *, _off64_t);
- virtual void rewinddir (DIR *);
- virtual int closedir (DIR *);
- virtual bool is_slow () {return false;}
- bool is_auto_device () {return isdevice () && !dev ().isfs ();}
- bool is_fs_special () {return pc.is_fs_special ();}
- bool issymlink () {return pc.issymlink ();}
- bool device_access_denied (int) __attribute__ ((regparm (2)));
- int fhaccess (int flags) __attribute__ ((regparm (2)));
-};
-
-class fhandler_mailslot : public fhandler_base
-{
- public:
- fhandler_mailslot ();
- int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
- int open (int flags, mode_t mode = 0);
- int write (const void *ptr, size_t len);
- int ioctl (unsigned int cmd, void *);
- select_record *select_read (select_record *s);
-};
-
-struct wsa_event
-{
- LONG serial_number;
- long events;
- int connect_errorcode;
- pid_t owner;
-};
-
-class fhandler_socket: public fhandler_base
-{
- private:
- int addr_family;
- int type;
- int connect_secret[4];
-
- wsa_event *wsock_events;
- HANDLE wsock_mtx;
- HANDLE wsock_evt;
- public:
- bool init_events ();
- int evaluate_events (const long event_mask, long &events, const bool erase);
- const HANDLE wsock_event () const { return wsock_evt; }
- const LONG serial_number () const { return wsock_events->serial_number; }
- private:
- int wait_for_events (const long event_mask);
- void release_events ();
-
- pid_t sec_pid;
- __uid32_t sec_uid;
- __gid32_t sec_gid;
- pid_t sec_peer_pid;
- __uid32_t sec_peer_uid;
- __gid32_t sec_peer_gid;
- void af_local_set_secret (char *);
- void af_local_setblocking (bool &, bool &);
- void af_local_unsetblocking (bool, bool);
- void af_local_set_cred ();
- void af_local_copy (fhandler_socket *);
- bool af_local_recv_secret ();
- bool af_local_send_secret ();
- bool af_local_recv_cred ();
- bool af_local_send_cred ();
- int af_local_accept ();
- public:
- int af_local_connect ();
- void af_local_set_sockpair_cred ();
-
- private:
- char *sun_path;
- struct status_flags
- {
- unsigned async_io : 1; /* async I/O */
- unsigned saw_shutdown_read : 1; /* Socket saw a SHUT_RD */
- unsigned saw_shutdown_write : 1; /* Socket saw a SHUT_WR */
- unsigned saw_reuseaddr : 1; /* Socket saw SO_REUSEADDR call */
- unsigned listener : 1; /* listen called */
- unsigned connect_state : 2;
- public:
- status_flags () :
- async_io (0), saw_shutdown_read (0), saw_shutdown_write (0),
- listener (0), connect_state (unconnected)
- {}
- } status;
-
- public:
- fhandler_socket ();
- ~fhandler_socket ();
- int get_socket () { return (int) get_handle(); }
- fhandler_socket *is_socket () { return this; }
-
- IMPLEMENT_STATUS_FLAG (bool, async_io)
- IMPLEMENT_STATUS_FLAG (bool, saw_shutdown_read)
- IMPLEMENT_STATUS_FLAG (bool, saw_shutdown_write)
- IMPLEMENT_STATUS_FLAG (bool, saw_reuseaddr)
- IMPLEMENT_STATUS_FLAG (bool, listener)
- IMPLEMENT_STATUS_FLAG (conn_state, connect_state)
-
- int bind (const struct sockaddr *name, int namelen);
- int connect (const struct sockaddr *name, int namelen);
- int listen (int backlog);
- int accept (struct sockaddr *peer, int *len);
- int getsockname (struct sockaddr *name, int *namelen);
- int getpeername (struct sockaddr *name, int *namelen);
- int getpeereid (pid_t *pid, __uid32_t *euid, __gid32_t *egid);
-
- int open (int flags, mode_t mode = 0);
- ssize_t readv (const struct iovec *, int iovcnt, ssize_t tot = -1);
- inline ssize_t recv_internal (struct _WSABUF *wsabuf, DWORD wsacnt,
- DWORD flags,
- struct sockaddr *from, int *fromlen);
- ssize_t recvfrom (void *ptr, size_t len, int flags,
- struct sockaddr *from, int *fromlen);
- ssize_t recvmsg (struct msghdr *msg, int flags);
-
- ssize_t writev (const struct iovec *, int iovcnt, ssize_t tot = -1);
- inline ssize_t send_internal (struct _WSABUF *wsabuf, DWORD wsacnt, int flags,
- const struct sockaddr *to, int tolen);
- ssize_t sendto (const void *ptr, size_t len, int flags,
- const struct sockaddr *to, int tolen);
- ssize_t sendmsg (const struct msghdr *msg, int flags);
-
- int ioctl (unsigned int cmd, void *);
- int fcntl (int cmd, void *);
- _off64_t lseek (_off64_t, int) { return 0; }
- int shutdown (int how);
- int close ();
- void hclose (HANDLE) {close ();}
- int dup (fhandler_base *child);
-
- void set_close_on_exec (bool val);
- void fixup_after_fork (HANDLE);
- char *get_proc_fd_name (char *buf);
-
- select_record *select_read (select_record *s);
- select_record *select_write (select_record *s);
- select_record *select_except (select_record *s);
- int ready_for_read (int, DWORD) { return true; }
- void set_addr_family (int af) {addr_family = af;}
- int get_addr_family () {return addr_family;}
- void set_socket_type (int st) { type = st;}
- int get_socket_type () {return type;}
- void set_sun_path (const char *path);
- char *get_sun_path () {return sun_path;}
-
- int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
- int __stdcall fstatvfs (struct statvfs *buf) __attribute__ ((regparm (2)));
- int __stdcall fchmod (mode_t mode) __attribute__ ((regparm (1)));
- int __stdcall fchown (__uid32_t uid, __gid32_t gid) __attribute__ ((regparm (2)));
- int __stdcall facl (int, int, __acl32 *) __attribute__ ((regparm (3)));
- int __stdcall link (const char *) __attribute__ ((regparm (2)));
- bool is_slow () {return true;}
-};
-
-class fhandler_pipe: public fhandler_base
-{
-private:
- pid_t popen_pid;
- OVERLAPPED io_status;
-public:
- fhandler_pipe ();
- OVERLAPPED *get_overlapped () {return &io_status;}
- void set_popen_pid (pid_t pid) {popen_pid = pid;}
- pid_t get_popen_pid () const {return popen_pid;}
- _off64_t lseek (_off64_t offset, int whence);
- select_record *select_read (select_record *s);
- select_record *select_write (select_record *s);
- select_record *select_except (select_record *s);
- char *get_proc_fd_name (char *buf);
- void raw_read (void *ptr, size_t& len);
- int raw_write (const void *, size_t);
- int open (int flags, mode_t mode = 0);
- int dup (fhandler_base *child);
- int ioctl (unsigned int cmd, void *);
- int __stdcall fstatvfs (struct statvfs *buf) __attribute__ ((regparm (2)));
- int __stdcall fadvise (_off64_t, _off64_t, int) __attribute__ ((regparm (3)));
- int __stdcall ftruncate (_off64_t, bool) __attribute__ ((regparm (3)));
- int ready_for_read (int fd, DWORD howlong);
- void init (HANDLE, DWORD, mode_t);
- static int create (fhandler_pipe *[2], unsigned, int);
- static int create_selectable (LPSECURITY_ATTRIBUTES, HANDLE&, HANDLE&, DWORD, const char * = NULL);
-};
-
-enum fifo_state
-{
- fifo_unknown,
- fifo_wait_for_client,
- fifo_wait_for_server,
- fifo_ok
-};
-class fhandler_fifo: public fhandler_base
-{
- fifo_state wait_state;
- HANDLE open_nonserver (const char *, unsigned, LPSECURITY_ATTRIBUTES);
- OVERLAPPED io_status;
- bool wait (bool) __attribute__ ((regparm (1)));
-public:
- fhandler_fifo ();
- void __stdcall read (void *, size_t&) __attribute__ ((regparm (3)));
- int write (const void *, size_t);
- int open (int, mode_t);
- bool isfifo () { return true; }
- int __stdcall fstatvfs (struct statvfs *buf) __attribute__ ((regparm (2)));
- OVERLAPPED *get_overlapped () {return &io_status;}
-};
-
-class fhandler_dev_raw: public fhandler_base
-{
- protected:
- char *devbuf;
- size_t devbufsiz;
- size_t devbufstart;
- size_t devbufend;
- struct status_flags
- {
- unsigned lastblk_to_read : 1;
- public:
- status_flags () : lastblk_to_read (0) {}
- } status;
-
- IMPLEMENT_STATUS_FLAG (bool, lastblk_to_read)
-
- fhandler_dev_raw ();
-
- public:
- ~fhandler_dev_raw ();
-
- int open (int flags, mode_t mode = 0);
-
- int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
-
- int dup (fhandler_base *child);
- int ioctl (unsigned int cmd, void *buf);
-
- void fixup_after_fork (HANDLE);
- void fixup_after_exec ();
-};
-
-class fhandler_dev_floppy: public fhandler_dev_raw
-{
- private:
- _off64_t drive_size;
- unsigned long bytes_per_sector;
- struct status_flags
- {
- unsigned eom_detected : 1;
- public:
- status_flags () : eom_detected (0) {}
- } status;
-
- IMPLEMENT_STATUS_FLAG (bool, eom_detected)
-
- inline _off64_t get_current_position ();
- int get_drive_info (struct hd_geometry *geo);
-
- BOOL write_file (const void *buf, DWORD to_write, DWORD *written, int *err);
- BOOL read_file (void *buf, DWORD to_read, DWORD *read, int *err);
-
- public:
- fhandler_dev_floppy ();
-
- int open (int flags, mode_t mode = 0);
- int dup (fhandler_base *child);
- void raw_read (void *ptr, size_t& ulen);
- int raw_write (const void *ptr, size_t ulen);
- _off64_t lseek (_off64_t offset, int whence);
- int ioctl (unsigned int cmd, void *buf);
-};
-
-class fhandler_dev_tape: public fhandler_dev_raw
-{
- HANDLE mt_mtx;
- HANDLE mt_evt;
-
- bool is_rewind_device () { return get_minor () < 128; }
- unsigned int driveno () { return (unsigned int) get_minor () & 0x7f; }
- void drive_init ();
-
- inline bool _lock ();
- inline int unlock (int ret = 0);
-
- public:
- fhandler_dev_tape ();
-
- virtual int open (int flags, mode_t mode = 0);
- virtual int close ();
-
- void raw_read (void *ptr, size_t& ulen);
- int raw_write (const void *ptr, size_t ulen);
-
- virtual _off64_t lseek (_off64_t offset, int whence);
-
- virtual int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
-
- virtual int dup (fhandler_base *child);
- virtual void fixup_after_fork (HANDLE parent);
- virtual void set_close_on_exec (bool val);
- virtual int ioctl (unsigned int cmd, void *buf);
-};
-
-/* Standard disk file */
-
-class fhandler_disk_file: public fhandler_base
-{
- int readdir_helper (DIR *, dirent *, DWORD, DWORD, PUNICODE_STRING fname) __attribute__ ((regparm (3)));
-
- public:
- fhandler_disk_file ();
- fhandler_disk_file (path_conv &pc);
-
- int open (int flags, mode_t mode);
- int lock (int, struct __flock64 *);
- bool isdevice () { return false; }
- int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
- int __stdcall fchmod (mode_t mode) __attribute__ ((regparm (1)));
- int __stdcall fchown (__uid32_t uid, __gid32_t gid) __attribute__ ((regparm (2)));
- int __stdcall facl (int, int, __acl32 *) __attribute__ ((regparm (3)));
- ssize_t __stdcall fgetxattr (const char *, void *, size_t) __attribute__ ((regparm (3)));
- int __stdcall fsetxattr (const char *, const void *, size_t, int) __attribute__ ((regparm (3)));
- int __stdcall fadvise (_off64_t, _off64_t, int) __attribute__ ((regparm (3)));
- int __stdcall ftruncate (_off64_t, bool) __attribute__ ((regparm (3)));
- int __stdcall link (const char *) __attribute__ ((regparm (2)));
- int __stdcall utimens (const struct timespec *) __attribute__ ((regparm (2)));
- int __stdcall fstatvfs (struct statvfs *buf) __attribute__ ((regparm (2)));
-
- HANDLE mmap (caddr_t *addr, size_t len, int prot, int flags, _off64_t off);
- int munmap (HANDLE h, caddr_t addr, size_t len);
- int msync (HANDLE h, caddr_t addr, size_t len, int flags);
- bool fixup_mmap_after_fork (HANDLE h, int prot, int flags,
- _off64_t offset, DWORD size, void *address);
- int mkdir (mode_t mode);
- int rmdir ();
- DIR *opendir (int fd) __attribute__ ((regparm (2)));
- int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
- _off64_t telldir (DIR *);
- void seekdir (DIR *, _off64_t);
- void rewinddir (DIR *);
- int closedir (DIR *);
-
- ssize_t __stdcall pread (void *, size_t, _off64_t) __attribute__ ((regparm (3)));
- ssize_t __stdcall pwrite (void *, size_t, _off64_t) __attribute__ ((regparm (3)));
-};
-
-class fhandler_cygdrive: public fhandler_disk_file
-{
- int ndrives;
- const char *pdrive;
- void set_drives ();
- public:
- fhandler_cygdrive ();
- int open (int flags, mode_t mode);
- int close ();
- DIR *opendir (int fd) __attribute__ ((regparm (2)));
- int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
- void rewinddir (DIR *);
- int closedir (DIR *);
- int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
-};
-
-class fhandler_serial: public fhandler_base
-{
- private:
- size_t vmin_; /* from termios */
- unsigned int vtime_; /* from termios */
- pid_t pgrp_;
- int rts; /* for Windows 9x purposes only */
- int dtr; /* for Windows 9x purposes only */
-
- public:
- int overlapped_armed;
- OVERLAPPED io_status;
- DWORD ev;
-
- /* Constructor */
- fhandler_serial ();
-
- int open (int flags, mode_t mode);
- int close ();
- void init (HANDLE h, DWORD a, mode_t flags);
- void overlapped_setup ();
- int dup (fhandler_base *child);
- void raw_read (void *ptr, size_t& ulen);
- int raw_write (const void *ptr, size_t ulen);
- int tcsendbreak (int);
- int tcdrain ();
- int tcflow (int);
- int ioctl (unsigned int cmd, void *);
- int switch_modem_lines (int set, int clr);
- int tcsetattr (int a, const struct termios *t);
- int tcgetattr (struct termios *t);
- _off64_t lseek (_off64_t, int) { return 0; }
- int tcflush (int);
- bool is_tty () const { return true; }
- void fixup_after_fork (HANDLE parent);
- void fixup_after_exec ();
-
- /* We maintain a pgrp so that tcsetpgrp and tcgetpgrp work, but we
- don't use it for permissions checking. fhandler_tty_slave does
- permission checking on pgrps. */
- virtual int tcgetpgrp () { return pgrp_; }
- virtual int tcsetpgrp (const pid_t pid) { pgrp_ = pid; return 0; }
- select_record *select_read (select_record *s);
- select_record *select_write (select_record *s);
- select_record *select_except (select_record *s);
- bool is_slow () {return true;}
-};
-
-#define acquire_output_mutex(ms) \
- __acquire_output_mutex (__PRETTY_FUNCTION__, __LINE__, ms);
-
-#define release_output_mutex() \
- __release_output_mutex (__PRETTY_FUNCTION__, __LINE__);
-
-class tty;
-class tty_min;
-class fhandler_termios: public fhandler_base
-{
- protected:
- HANDLE output_handle;
- virtual void doecho (const void *, DWORD) {};
- virtual int accept_input () {return 1;};
- public:
- tty_min *tc;
- fhandler_termios () :
- fhandler_base ()
- {
- need_fork_fixup (true);
- }
- HANDLE& get_output_handle () { return output_handle; }
- line_edit_status line_edit (const char *rptr, int nread, termios&);
- void set_output_handle (HANDLE h) { output_handle = h; }
- void tcinit (tty_min *this_tc, bool force = false);
- bool is_tty () const { return true; }
- int tcgetpgrp ();
- int tcsetpgrp (int pid);
- bg_check_types bg_check (int sig);
- virtual DWORD __acquire_output_mutex (const char *fn, int ln, DWORD ms) {return 1;}
- virtual void __release_output_mutex (const char *fn, int ln) {}
- void echo_erase (int force = 0);
- virtual _off64_t lseek (_off64_t, int);
-};
-
-enum ansi_intensity
-{
- INTENSITY_INVISIBLE,
- INTENSITY_DIM,
- INTENSITY_NORMAL,
- INTENSITY_BOLD
-};
-
-#define normal 0
-#define gotesc 1
-#define gotsquare 2
-#define gotarg1 3
-#define gotrsquare 4
-#define gotcommand 5
-#define gettitle 6
-#define eattitle 7
-#define MAXARGS 10
-
-class dev_console
-{
- WORD default_color, underline_color, dim_color;
-
- /* Used to determine if an input keystroke should be modified with META. */
- int meta_mask;
-
-/* Output state */
- int state_;
- int args_[MAXARGS];
- int nargs_;
- unsigned rarg;
- bool saw_question_mark;
- bool alternate_charset_active;
- bool metabit;
-
- char my_title_buf [TITLESIZE + 1];
-
- WORD current_win32_attr;
- ansi_intensity intensity;
- bool underline, blink, reverse;
- WORD fg, bg;
-
- /* saved cursor coordinates */
- int savex, savey;
-
- /* saved screen */
- COORD savebufsiz;
- PCHAR_INFO savebuf;
-
- struct
- {
- short Top, Bottom;
- } scroll_region;
- struct
- {
- SHORT winTop;
- SHORT winBottom;
- COORD dwWinSize;
- COORD dwBufferSize;
- COORD dwCursorPosition;
- WORD wAttributes;
- } info;
-
- COORD dwLastCursorPosition;
- DWORD dwLastButtonState;
- int nModifiers;
-
- bool insert_mode;
- bool use_mouse;
- bool raw_win32_keyboard_mode;
-
- inline UINT get_console_cp ();
- DWORD con_to_str (char *d, int dlen, WCHAR w);
- DWORD str_to_con (PWCHAR d, const char *s, DWORD sz);
- void set_color (HANDLE);
- bool fillin_info (HANDLE);
- void set_default_attr ();
-
- friend class fhandler_console;
-};
-
-/* This is a input and output console handle */
-class fhandler_console: public fhandler_termios
-{
- private:
- static dev_console *dev_state;
- static bool invisible_console;
-
- /* Used when we encounter a truncated multi-byte sequence. The
- lead bytes are stored here and revisited in the next write call. */
- struct {
- int len;
- unsigned char buf[4]; /* Max len of valid UTF-8 sequence. */
- } trunc_buf;
- PWCHAR write_buf;
-
-/* Output calls */
- void set_default_attr ();
-
- void clear_screen (int, int, int, int);
- void scroll_screen (int, int, int, int, int, int);
- void cursor_set (bool, int, int);
- void cursor_get (int *, int *);
- void cursor_rel (int, int);
- void write_replacement_char (const unsigned char *);
- const unsigned char *write_normal (unsigned const char*, unsigned const char *);
- void char_command (char);
- bool set_raw_win32_keyboard_mode (bool);
- int output_tcsetattr (int a, const struct termios *t);
-
-/* Input calls */
- int igncr_enabled ();
- int input_tcsetattr (int a, const struct termios *t);
- void set_cursor_maybe ();
-
- public:
- fhandler_console ();
-
- fhandler_console* is_console () { return this; }
-
- int open (int flags, mode_t mode = 0);
-
- int write (const void *ptr, size_t len);
- void doecho (const void *str, DWORD len) { (void) write (str, len); }
- void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
- int close ();
-
- int tcflush (int);
- int tcsetattr (int a, const struct termios *t);
- int tcgetattr (struct termios *t);
-
- /* Special dup as we must dup two handles */
- int dup (fhandler_base *child);
-
- int ioctl (unsigned int cmd, void *);
- void init (HANDLE, DWORD, mode_t);
- bool mouse_aware () {return dev_state->use_mouse;}
-
- select_record *select_read (select_record *s);
- select_record *select_write (select_record *s);
- select_record *select_except (select_record *s);
- void fixup_after_fork_exec (bool);
- void fixup_after_exec () {fixup_after_fork_exec (true);}
- void fixup_after_fork (HANDLE) {fixup_after_fork_exec (false);}
- void set_close_on_exec (bool val);
- void set_input_state ();
- void send_winch_maybe ();
- static tty_min *get_tty_stuff (int);
- bool is_slow () {return true;}
- static bool need_invisible ();
- static bool has_a () {return !invisible_console;}
-};
-
-class fhandler_tty_common: public fhandler_termios
-{
- public:
- fhandler_tty_common ()
- : fhandler_termios (), output_done_event (NULL),
- ioctl_request_event (NULL), ioctl_done_event (NULL), output_mutex (NULL),
- input_mutex (NULL), input_available_event (NULL)
- {
- // nothing to do
- }
- HANDLE output_done_event; // Raised by master when tty's output buffer
- // written. Write status in tty::write_retval.
- HANDLE ioctl_request_event; // Raised by slave to perform ioctl() request.
- // Ioctl() request in tty::cmd/arg.
- HANDLE ioctl_done_event; // Raised by master on ioctl() completion.
- // Ioctl() status in tty::ioctl_retval.
- HANDLE output_mutex, input_mutex;
- HANDLE input_available_event;
-
- DWORD __acquire_output_mutex (const char *fn, int ln, DWORD ms);
- void __release_output_mutex (const char *fn, int ln);
-
- tty *get_ttyp () { return (tty *) tc; }
-
- int close ();
- _off64_t lseek (_off64_t, int);
- void set_close_on_exec (bool val);
- select_record *select_read (select_record *s);
- select_record *select_write (select_record *s);
- select_record *select_except (select_record *s);
- bool is_slow () {return true;}
-};
-
-class fhandler_tty_slave: public fhandler_tty_common
-{
- HANDLE inuse; // used to indicate that a tty is in use
- public:
- /* Constructor */
- fhandler_tty_slave ();
-
- int open (int flags, mode_t mode = 0);
- int write (const void *ptr, size_t len);
- void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
- void init (HANDLE, DWORD, mode_t);
-
- int tcsetattr (int a, const struct termios *t);
- int tcgetattr (struct termios *t);
- int tcflush (int);
- int ioctl (unsigned int cmd, void *);
- int close ();
- int dup (fhandler_base *child);
- void fixup_after_fork (HANDLE parent);
- void fixup_after_exec ();
-
- select_record *select_read (select_record *s);
- int cygserver_attach_tty (HANDLE*, HANDLE*);
- int get_unit ();
- virtual char const *ttyname () { return pc.dev.name; }
-};
-
-class fhandler_pty_master: public fhandler_tty_common
-{
- int pktmode; // non-zero if pty in a packet mode.
-public:
- int need_nl; // Next read should start with \n
- DWORD dwProcessId; // Owner of master handles
-
- /* Constructor */
- fhandler_pty_master ();
-
- int process_slave_output (char *buf, size_t len, int pktmode_on);
- void doecho (const void *str, DWORD len);
- int accept_input ();
- int open (int flags, mode_t mode = 0);
- int write (const void *ptr, size_t len);
- void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
- int close ();
-
- int tcsetattr (int a, const struct termios *t);
- int tcgetattr (struct termios *t);
- int tcflush (int);
- int ioctl (unsigned int cmd, void *);
-
- char *ptsname ();
-
- HANDLE from_master, to_master;
- bool hit_eof ();
- bool setup (bool);
- int dup (fhandler_base *);
- void fixup_after_fork (HANDLE parent);
- void fixup_after_exec ();
-};
-
-class fhandler_tty_master: public fhandler_pty_master
-{
- public:
- /* Constructor */
- fhandler_console *console; // device handler to perform real i/o.
-
- fhandler_tty_master ();
- int init ();
- int init_console ();
- void set_winsize (bool);
- bool is_slow () {return true;}
-};
-
-class fhandler_dev_null: public fhandler_base
-{
- public:
- fhandler_dev_null ();
-
- select_record *select_read (select_record *s);
- select_record *select_write (select_record *s);
- select_record *select_except (select_record *s);
-};
-
-class fhandler_dev_zero: public fhandler_base
-{
- public:
- fhandler_dev_zero ();
- int open (int flags, mode_t mode = 0);
- int write (const void *ptr, size_t len);
- void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
- _off64_t lseek (_off64_t offset, int whence);
-
- virtual HANDLE mmap (caddr_t *addr, size_t len, int prot,
- int flags, _off64_t off);
- virtual int munmap (HANDLE h, caddr_t addr, size_t len);
- virtual int msync (HANDLE h, caddr_t addr, size_t len, int flags);
- virtual bool fixup_mmap_after_fork (HANDLE h, int prot, int flags,
- _off64_t offset, DWORD size,
- void *address);
-};
-
-class fhandler_dev_random: public fhandler_base
-{
- protected:
- HCRYPTPROV crypt_prov;
- long pseudo;
- _off64_t dummy_offset;
-
- bool crypt_gen_random (void *ptr, size_t len);
- int pseudo_write (const void *ptr, size_t len);
- int pseudo_read (void *ptr, size_t len);
-
- public:
- fhandler_dev_random ();
- int open (int flags, mode_t mode = 0);
- int write (const void *ptr, size_t len);
- void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
- _off64_t lseek (_off64_t offset, int whence);
- int close ();
- int dup (fhandler_base *child);
-};
-
-class fhandler_dev_mem: public fhandler_base
-{
- protected:
- DWORD mem_size;
- _off64_t pos;
-
- public:
- fhandler_dev_mem ();
- ~fhandler_dev_mem ();
-
- int open (int flags, mode_t mode = 0);
- int write (const void *ptr, size_t ulen);
- void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
- _off64_t lseek (_off64_t offset, int whence);
- int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
- int dup (fhandler_base *child);
-
- HANDLE mmap (caddr_t *addr, size_t len, int prot, int flags, _off64_t off);
- int munmap (HANDLE h, caddr_t addr, size_t len);
- int msync (HANDLE h, caddr_t addr, size_t len, int flags);
- bool fixup_mmap_after_fork (HANDLE h, int prot, int flags,
- _off64_t offset, DWORD size, void *address);
-} ;
-
-class fhandler_dev_clipboard: public fhandler_base
-{
- _off64_t pos;
- void *membuffer;
- size_t msize;
- bool eof;
- public:
- fhandler_dev_clipboard ();
- int is_windows () { return 1; }
- int open (int flags, mode_t mode = 0);
- int write (const void *ptr, size_t len);
- void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
- _off64_t lseek (_off64_t offset, int whence);
- int close ();
-
- int dup (fhandler_base *child);
- void fixup_after_exec ();
-};
-
-class fhandler_windows: public fhandler_base
-{
- private:
- HWND hWnd_; // the window whose messages are to be retrieved by read() call
- int method_; // write method (Post or Send)
- public:
- fhandler_windows ();
- int is_windows () { return 1; }
- int open (int flags, mode_t mode = 0);
- int write (const void *ptr, size_t len);
- void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
- int ioctl (unsigned int cmd, void *);
- _off64_t lseek (_off64_t, int) { return 0; }
- int close () { return 0; }
-
- void set_close_on_exec (bool val);
- void fixup_after_fork (HANDLE parent);
- select_record *select_read (select_record *s);
- select_record *select_write (select_record *s);
- select_record *select_except (select_record *s);
- bool is_slow () {return true;}
-};
-
-class fhandler_dev_dsp: public fhandler_base
-{
- public:
- class Audio;
- class Audio_out;
- class Audio_in;
- private:
- int audioformat_;
- int audiofreq_;
- int audiobits_;
- int audiochannels_;
- Audio_out *audio_out_;
- Audio_in *audio_in_;
- public:
- fhandler_dev_dsp ();
-
- int open (int flags, mode_t mode = 0);
- int write (const void *ptr, size_t len);
- void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
- int ioctl (unsigned int cmd, void *);
- _off64_t lseek (_off64_t, int);
- int close ();
- int dup (fhandler_base *child);
- void fixup_after_fork (HANDLE parent);
- void fixup_after_exec ();
- private:
- void close_audio_in ();
- void close_audio_out (bool immediately = false);
-};
-
-class fhandler_virtual : public fhandler_base
-{
- protected:
- char *filebuf;
- size_t bufalloc;
- _off64_t filesize;
- _off64_t position;
- int fileid; // unique within each class
- public:
-
- fhandler_virtual ();
- virtual ~fhandler_virtual();
-
- virtual int exists();
- DIR *opendir (int fd) __attribute__ ((regparm (2)));
- _off64_t telldir (DIR *);
- void seekdir (DIR *, _off64_t);
- void rewinddir (DIR *);
- int closedir (DIR *);
- int write (const void *ptr, size_t len);
- void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
- _off64_t lseek (_off64_t, int);
- int dup (fhandler_base *child);
- int open (int flags, mode_t mode = 0);
- int close ();
- int __stdcall fstat (struct stat *buf) __attribute__ ((regparm (2)));
- int __stdcall fstatvfs (struct statvfs *buf) __attribute__ ((regparm (2)));
- int __stdcall fchmod (mode_t mode) __attribute__ ((regparm (1)));
- int __stdcall fchown (__uid32_t uid, __gid32_t gid) __attribute__ ((regparm (2)));
- int __stdcall facl (int, int, __acl32 *) __attribute__ ((regparm (3)));
- virtual bool fill_filebuf ();
- char *get_filebuf () { return filebuf; }
- void fixup_after_exec ();
-};
-
-class fhandler_proc: public fhandler_virtual
-{
- public:
- fhandler_proc ();
- int exists();
- int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
- static DWORD get_proc_fhandler(const char *path);
-
- int open (int flags, mode_t mode = 0);
- int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
- bool fill_filebuf ();
-};
-
-class fhandler_netdrive: public fhandler_virtual
-{
- public:
- fhandler_netdrive ();
- int exists();
- int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
- void seekdir (DIR *, _off64_t);
- void rewinddir (DIR *);
- int closedir (DIR *);
- int open (int flags, mode_t mode = 0);
- int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
-};
-
-class fhandler_registry: public fhandler_proc
-{
- private:
- char *value_name;
- DWORD wow64;
- int prefix_len;
- public:
- fhandler_registry ();
- void set_name (path_conv &pc);
- int exists();
- int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
- _off64_t telldir (DIR *);
- void seekdir (DIR *, _off64_t);
- void rewinddir (DIR *);
- int closedir (DIR *);
-
- int open (int flags, mode_t mode = 0);
- int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
- bool fill_filebuf ();
- int close ();
- int dup (fhandler_base *child);
-};
-
-class pinfo;
-class fhandler_process: public fhandler_proc
-{
- pid_t pid;
- public:
- fhandler_process ();
- int exists();
- DIR *opendir (int fd) __attribute__ ((regparm (2)));
- int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
- int open (int flags, mode_t mode = 0);
- int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
- bool fill_filebuf ();
-};
-
-class fhandler_procnet: public fhandler_proc
-{
- pid_t pid;
- public:
- fhandler_procnet ();
- int exists();
- int readdir (DIR *, dirent *) __attribute__ ((regparm (3)));
- int open (int flags, mode_t mode = 0);
- int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
- bool fill_filebuf ();
-};
-
-struct fhandler_nodevice: public fhandler_base
-{
- fhandler_nodevice ();
- int open (int flags, mode_t mode = 0);
- // int __stdcall fstat (struct __stat64 *buf, path_conv *);
-};
-
-#define report_tty_counts(fh, call, use_op) \
- termios_printf ("%s %s, %susecount %d",\
- fh->ttyname (), call,\
- use_op, ((fhandler_tty_slave *) fh)->archetype->usecount);
-
-typedef union
-{
- char __base[sizeof (fhandler_base)];
- char __console[sizeof (fhandler_console)];
- char __cygdrive[sizeof (fhandler_cygdrive)];
- char __dev_clipboard[sizeof (fhandler_dev_clipboard)];
- char __dev_dsp[sizeof (fhandler_dev_dsp)];
- char __dev_floppy[sizeof (fhandler_dev_floppy)];
- char __dev_mem[sizeof (fhandler_dev_mem)];
- char __dev_null[sizeof (fhandler_dev_null)];
- char __dev_random[sizeof (fhandler_dev_random)];
- char __dev_raw[sizeof (fhandler_dev_raw)];
- char __dev_tape[sizeof (fhandler_dev_tape)];
- char __dev_zero[sizeof (fhandler_dev_zero)];
- char __disk_file[sizeof (fhandler_disk_file)];
- char __fifo[sizeof (fhandler_fifo)];
- char __mailslot[sizeof (fhandler_mailslot)];
- char __netdrive[sizeof (fhandler_netdrive)];
- char __nodevice[sizeof (fhandler_nodevice)];
- char __pipe[sizeof (fhandler_pipe)];
- char __proc[sizeof (fhandler_proc)];
- char __process[sizeof (fhandler_process)];
- char __pty_master[sizeof (fhandler_pty_master)];
- char __registry[sizeof (fhandler_registry)];
- char __serial[sizeof (fhandler_serial)];
- char __socket[sizeof (fhandler_socket)];
- char __termios[sizeof (fhandler_termios)];
- char __tty_common[sizeof (fhandler_tty_common)];
- char __tty_master[sizeof (fhandler_tty_master)];
- char __tty_slave[sizeof (fhandler_tty_slave)];
- char __virtual[sizeof (fhandler_virtual)];
- char __windows[sizeof (fhandler_windows)];
-} fhandler_union;
-
-struct select_record
-{
- int fd;
- HANDLE h;
- fhandler_base *fh;
- int thread_errno;
- bool windows_handle;
- bool read_ready, write_ready, except_ready;
- bool read_selected, write_selected, except_selected;
- bool except_on_write;
- int (*startup) (select_record *me, class select_stuff *stuff);
- int (*peek) (select_record *, bool);
- int (*verify) (select_record *me, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds);
- void (*cleanup) (select_record *me, class select_stuff *stuff);
- struct select_record *next;
- void set_select_errno () {__seterrno (); thread_errno = errno;}
- int saw_error () {return thread_errno;}
-
- select_record (fhandler_base *in_fh = NULL) : fd (0), h (NULL),
- fh (in_fh), thread_errno (0), windows_handle (false),
- read_ready (false), write_ready (false), except_ready (false),
- read_selected (false), write_selected (false),
- except_selected (false), except_on_write (false),
- startup (NULL), peek (NULL), verify (NULL), cleanup (NULL),
- next (NULL) {}
-};
-
-class select_stuff
-{
- public:
- ~select_stuff ();
- bool always_ready, windows_used;
- select_record start;
- void *device_specific_pipe;
- void *device_specific_socket;
- void *device_specific_serial;
- void *device_specific_mailslot;
-
- int test_and_set (int i, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds);
- int poll (fd_set *readfds, fd_set *writefds, fd_set *exceptfds);
- int wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds, DWORD ms);
- void cleanup ();
- select_stuff (): always_ready (0), windows_used (0), start (0),
- device_specific_pipe (0),
- device_specific_socket (0),
- device_specific_serial (0),
- device_specific_mailslot (0) {}
-};
-#endif /* _FHANDLER_H_ */
diff --git a/winsup/cygwin/fhandler_clipboard.cc b/winsup/cygwin/fhandler_clipboard.cc
deleted file mode 100644
index d4b9743..0000000
--- a/winsup/cygwin/fhandler_clipboard.cc
+++ /dev/null
@@ -1,296 +0,0 @@
-/* fhandler_dev_clipboard: code to access /dev/clipboard
-
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2008 Red Hat, Inc
-
- Written by Charles Wilson (cwilson@ece.gatech.edu)
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include <wchar.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-
-/*
- * Robert Collins:
- * FIXME: should we use GetClipboardSequenceNumber to tell if the clipboard has
- * changed? How does /dev/clipboard operate under (say) linux?
- */
-
-static const NO_COPY char *CYGWIN_NATIVE = "CYGWIN_NATIVE_CLIPBOARD";
-/* this is MT safe because windows format id's are atomic */
-static int cygnativeformat;
-
-fhandler_dev_clipboard::fhandler_dev_clipboard ()
- : fhandler_base (), pos (0), membuffer (NULL), msize (0),
- eof (true)
-{
- /* FIXME: check for errors and loop until we can open the clipboard */
- OpenClipboard (NULL);
- cygnativeformat = RegisterClipboardFormat (CYGWIN_NATIVE);
- CloseClipboard ();
-}
-
-/*
- * Special clipboard dup to duplicate input and output
- * handles.
- */
-
-int
-fhandler_dev_clipboard::dup (fhandler_base * child)
-{
- fhandler_dev_clipboard *fhc = (fhandler_dev_clipboard *) child;
-
- if (!fhc->open (get_flags (), 0))
- system_printf ("error opening clipboard, %E");
-
- fhc->membuffer = membuffer;
- fhc->pos = pos;
- fhc->msize = msize;
-
- return 0;
-}
-
-int
-fhandler_dev_clipboard::open (int flags, mode_t)
-{
- set_flags (flags | O_TEXT);
- eof = false;
- pos = 0;
- if (membuffer)
- free (membuffer);
- membuffer = NULL;
- if (!cygnativeformat)
- cygnativeformat = RegisterClipboardFormat (CYGWIN_NATIVE);
- nohandle (true);
- set_open_status ();
- return 1;
-}
-
-static int
-set_clipboard (const void *buf, size_t len)
-{
- HGLOBAL hmem;
- void *clipbuf;
- /* Native CYGWIN format */
- OpenClipboard (0);
- hmem = GlobalAlloc (GMEM_MOVEABLE, len + sizeof (size_t));
- if (!hmem)
- {
- system_printf ("Couldn't allocate global buffer for write");
- return -1;
- }
- clipbuf = GlobalLock (hmem);
- memcpy ((unsigned char *) clipbuf + sizeof (size_t), buf, len);
- *(size_t *) (clipbuf) = len;
- GlobalUnlock (hmem);
- EmptyClipboard ();
- if (!cygnativeformat)
- cygnativeformat = RegisterClipboardFormat (CYGWIN_NATIVE);
- if (!SetClipboardData (cygnativeformat, hmem))
- {
- system_printf
- ("Couldn't write native format to the clipboard %04x %x",
- cygnativeformat, hmem);
-/* FIXME: return an appriate error code &| set_errno(); */
- return -1;
- }
- CloseClipboard ();
- if (GlobalFree (hmem))
- {
- system_printf
- ("Couldn't free global buffer after write to the clipboard");
-/* FIXME: return an appriate error code &| set_errno(); */
- return 0;
- }
-
- /* CF_TEXT/CF_OEMTEXT for copying to wordpad and the like */
-
- OpenClipboard (0);
-
- len = sys_mbstowcs (NULL, 0, (const char *) buf, len);
- if (!len)
- {
- system_printf ("Invalid string");
- return -1;
- }
- hmem = GlobalAlloc (GMEM_MOVEABLE, (len + 1) * sizeof (WCHAR));
- if (!hmem)
- {
- system_printf ("Couldn't allocate global buffer for write");
- return -1;
- }
- clipbuf = GlobalLock (hmem);
- sys_mbstowcs ((PWCHAR) clipbuf, len, (const char *) buf);
- *((PWCHAR) clipbuf + len) = L'\0';
- GlobalUnlock (hmem);
- if (!SetClipboardData (CF_UNICODETEXT, hmem))
- {
- system_printf ("Couldn't write to the clipboard");
-/* FIXME: return an appriate error code &| set_errno(); */
- return -1;
- }
- CloseClipboard ();
- if (GlobalFree (hmem))
- {
- system_printf
- ("Couldn't free global buffer after write to the clipboard");
-/* FIXME: return an appriate error code &| set_errno(); */
- }
- return 0;
-}
-
-/* FIXME: arbitrary seeking is not handled */
-int
-fhandler_dev_clipboard::write (const void *buf, size_t len)
-{
- if (!eof)
- {
- /* write to our membuffer */
- size_t cursize = msize;
- void *tempbuffer = realloc (membuffer, cursize + len);
- if (!tempbuffer)
- {
- system_printf ("Couldn't realloc() clipboard buffer for write");
- return -1;
- }
- membuffer = tempbuffer;
- msize = cursize + len;
- memcpy ((unsigned char *) membuffer + cursize, buf, len);
-
- /* now pass to windows */
- if (set_clipboard (membuffer, msize))
- {
- /* FIXME: membuffer is now out of sync with pos, but msize is used above */
- set_errno (ENOSPC);
- return -1;
- }
-
- pos = msize;
-
- eof = false;
- return len;
- }
- else
- {
- /* FIXME: return 0 bytes written, file not open */
- return 0;
- }
-}
-
-void __stdcall
-fhandler_dev_clipboard::read (void *ptr, size_t& len)
-{
- HGLOBAL hglb;
- size_t ret;
- UINT formatlist[2];
- int format;
- if (eof)
- len = 0;
- else
- {
- formatlist[0] = cygnativeformat;
- formatlist[1] = CF_UNICODETEXT;
- OpenClipboard (0);
- if ((format = GetPriorityClipboardFormat (formatlist, 2)) <= 0)
- {
- CloseClipboard ();
-#if 0
- system_printf ("a non-accepted format! %d", format);
-#endif
- len = 0;
- }
- else
- {
- hglb = GetClipboardData (format);
- if (format == cygnativeformat)
- {
- unsigned char *buf = (unsigned char *) GlobalLock (hglb);
- size_t buflen = (*(size_t *) buf);
- ret = ((len > (buflen - pos)) ? (buflen - pos) : len);
- memcpy (ptr, buf + sizeof (size_t)+ pos , ret);
- pos += ret;
- if (pos + len - ret >= buflen)
- eof = true;
- GlobalUnlock (hglb);
- }
- else
- {
- int wret;
- PWCHAR buf;
- buf = (PWCHAR) GlobalLock (hglb);
- size_t glen = GlobalSize (hglb) / sizeof (WCHAR) - 1;
-
- /* This loop is necessary because the number of bytes returned
- by WideCharToMultiByte does not indicate the number of wide
- chars used for it, so we could potentially drop wide chars. */
- if (glen - pos > len)
- glen = pos + len;
- while ((wret = sys_wcstombs (NULL, 0, buf + pos, glen - pos))
- != -1
- && (size_t) wret > len)
- --glen;
- ret = sys_wcstombs ((char *) ptr, len, buf + pos, glen - pos);
- //ret = snprintf((char *) ptr, len, "%s", buf);//+pos);
- pos += ret;
- if (pos + len - ret >= wcslen (buf))
- eof = true;
- GlobalUnlock (hglb);
- }
- CloseClipboard ();
- len = ret;
- }
- }
-}
-
-_off64_t
-fhandler_dev_clipboard::lseek (_off64_t offset, int whence)
-{
- /* On reads we check this at read time, not seek time.
- * On writes we use this to decide how to write - empty and write, or open, copy, empty
- * and write
- */
- pos = offset;
- /* treat seek like rewind */
- if (membuffer)
- free (membuffer);
- msize = 0;
- return 0;
-}
-
-int
-fhandler_dev_clipboard::close ()
-{
- if (!hExeced)
- {
- eof = true;
- pos = 0;
- if (membuffer)
- {
- free (membuffer);
- membuffer = NULL;
- }
- msize = 0;
- }
- return 0;
-}
-
-void
-fhandler_dev_clipboard::fixup_after_exec ()
-{
- if (!close_on_exec ())
- {
- eof = false;
- pos = msize = 0;
- membuffer = NULL;
- }
-}
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
deleted file mode 100644
index 11cf706..0000000
--- a/winsup/cygwin/fhandler_console.cc
+++ /dev/null
@@ -1,1932 +0,0 @@
-/* fhandler_console.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "miscfuncs.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <winnls.h>
-#include <ctype.h>
-#include <sys/cygwin.h>
-#include <cygwin/kd.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "shared_info.h"
-#include "cygtls.h"
-#include "tls_pbuf.h"
-#include "registry.h"
-
-/* Don't make this bigger than NT_MAX_PATH as long as the temporary buffer
- is allocated using tmp_pathbuf!!! */
-#define CONVERT_LIMIT NT_MAX_PATH
-
-/*
- * Scroll the screen context.
- * x1, y1 - ul corner
- * x2, y2 - dr corner
- * xn, yn - new ul corner
- * Negative values represents current screen dimensions
- */
-
-#define srTop (dev_state->info.winTop + dev_state->scroll_region.Top)
-#define srBottom ((dev_state->scroll_region.Bottom < 0) ? dev_state->info.winBottom : dev_state->info.winTop + dev_state->scroll_region.Bottom)
-
-#define use_tty ISSTATE (myself, PID_USETTY)
-
-const char * get_nonascii_key (INPUT_RECORD&, char *);
-
-static console_state NO_COPY *shared_console_info;
-
-dev_console NO_COPY *fhandler_console::dev_state;
-
-/* Allocate and initialize the shared record for the current console.
- Returns a pointer to shared_console_info. */
-tty_min *
-fhandler_console::get_tty_stuff (int flags = 0)
-{
- if (dev_state)
- return &shared_console_info->tty_min_state;
-
- shared_locations sh_shared_console = SH_SHARED_CONSOLE;
- shared_console_info =
- (console_state *) open_shared (NULL, 0, cygheap->console_h,
- sizeof (*shared_console_info),
- sh_shared_console);
- dev_state = &shared_console_info->dev_state;
-
- ProtectHandleINH (cygheap->console_h);
- if (!shared_console_info->tty_min_state.ntty)
- {
- shared_console_info->tty_min_state.setntty (TTY_CONSOLE);
- shared_console_info->tty_min_state.setsid (myself->sid);
- myself->set_ctty (&shared_console_info->tty_min_state, flags, NULL);
-
- dev_state->scroll_region.Bottom = -1;
- dev_state->dwLastCursorPosition.X = -1;
- dev_state->dwLastCursorPosition.Y = -1;
- dev_state->underline_color = FOREGROUND_GREEN | FOREGROUND_BLUE;
- dev_state->dim_color = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE;
- dev_state->meta_mask = LEFT_ALT_PRESSED;
- /* Set the mask that determines if an input keystroke is modified by
- META. We set this based on the keyboard layout language loaded
- for the current thread. The left <ALT> key always generates
- META, but the right <ALT> key only generates META if we are using
- an English keyboard because many "international" keyboards
- replace common shell symbols ('[', '{', etc.) with accented
- language-specific characters (umlaut, accent grave, etc.). On
- these keyboards right <ALT> (called AltGr) is used to produce the
- shell symbols and should not be interpreted as META. */
- if (PRIMARYLANGID (LOWORD (GetKeyboardLayout (0))) == LANG_ENGLISH)
- dev_state->meta_mask |= RIGHT_ALT_PRESSED;
- dev_state->set_default_attr ();
- shared_console_info->tty_min_state.sethwnd ((HWND) INVALID_HANDLE_VALUE);
- }
-
- return &shared_console_info->tty_min_state;
-}
-
-void
-set_console_ctty ()
-{
- fhandler_console::get_tty_stuff ();
-}
-
-/* Return the tty structure associated with a given tty number. If the
- tty number is < 0, just return a dummy record. */
-tty_min *
-tty_list::get_tty (int n)
-{
- static tty_min nada;
- if (n == TTY_CONSOLE)
- return fhandler_console::get_tty_stuff ();
- else if (n >= 0)
- return &cygwin_shared->tty.ttys[n];
- else
- return &nada;
-}
-
-/* The results of GetConsoleCP() and GetConsoleOutputCP() cannot be
- cached, because a program or the user can change these values at
- any time. */
-inline DWORD
-dev_console::con_to_str (char *d, int dlen, WCHAR w)
-{
- return sys_wcstombs (d, dlen, &w, 1);
-}
-
-inline UINT
-dev_console::get_console_cp ()
-{
- return alternate_charset_active ? GetConsoleOutputCP () : get_cp ();
-}
-
-inline DWORD
-dev_console::str_to_con (PWCHAR d, const char *s, DWORD sz)
-{
- return MultiByteToWideChar (get_console_cp (), 0, s, sz, d, CONVERT_LIMIT);
-}
-
-bool
-fhandler_console::set_raw_win32_keyboard_mode (bool new_mode)
-{
- bool old_mode = dev_state->raw_win32_keyboard_mode;
- dev_state->raw_win32_keyboard_mode = new_mode;
- syscall_printf ("raw keyboard mode %sabled", dev_state->raw_win32_keyboard_mode ? "en" : "dis");
- return old_mode;
-};
-
-void
-fhandler_console::set_cursor_maybe ()
-{
- CONSOLE_SCREEN_BUFFER_INFO now;
-
- if (!GetConsoleScreenBufferInfo (get_output_handle (), &now))
- return;
-
- if (dev_state->dwLastCursorPosition.X != now.dwCursorPosition.X ||
- dev_state->dwLastCursorPosition.Y != now.dwCursorPosition.Y)
- {
- SetConsoleCursorPosition (get_output_handle (), now.dwCursorPosition);
- dev_state->dwLastCursorPosition = now.dwCursorPosition;
- }
-}
-
-void
-fhandler_console::send_winch_maybe ()
-{
- SHORT y = dev_state->info.dwWinSize.Y;
- SHORT x = dev_state->info.dwWinSize.X;
- dev_state->fillin_info (get_output_handle ());
-
- if (y != dev_state->info.dwWinSize.Y || x != dev_state->info.dwWinSize.X)
- {
- extern fhandler_tty_master *tty_master;
- dev_state->scroll_region.Top = 0;
- dev_state->scroll_region.Bottom = -1;
- if (tty_master)
- tty_master->set_winsize (true);
- else
- tc->kill_pgrp (SIGWINCH);
- }
-}
-
-void __stdcall
-fhandler_console::read (void *pv, size_t& buflen)
-{
- HANDLE h = get_io_handle ();
-
-#define buf ((char *) pv)
-
- int ch;
- set_input_state ();
-
- int copied_chars = get_readahead_into_buffer (buf, buflen);
-
- if (copied_chars)
- {
- buflen = copied_chars;
- return;
- }
-
- HANDLE w4[2];
- DWORD nwait;
- char tmp[60];
-
- w4[0] = h;
- if (&_my_tls != _main_tls)
- nwait = 1;
- else
- {
- w4[1] = signal_arrived;
- nwait = 2;
- }
-
- termios ti = tc->ti;
- for (;;)
- {
- int bgres;
- if ((bgres = bg_check (SIGTTIN)) <= bg_eof)
- {
- buflen = bgres;
- return;
- }
-
- set_cursor_maybe (); /* to make cursor appear on the screen immediately */
- switch (WaitForMultipleObjects (nwait, w4, FALSE, INFINITE))
- {
- case WAIT_OBJECT_0:
- break;
- case WAIT_OBJECT_0 + 1:
- goto sig_exit;
- default:
- goto err;
- }
-
- DWORD nread;
- INPUT_RECORD input_rec;
- const char *toadd = NULL;
-
- if (!ReadConsoleInputW (h, &input_rec, 1, &nread))
- {
- syscall_printf ("ReadConsoleInput failed, %E");
- goto err; /* seems to be failure */
- }
-
- /* check the event that occurred */
- switch (input_rec.EventType)
- {
- case KEY_EVENT:
-#define virtual_key_code (input_rec.Event.KeyEvent.wVirtualKeyCode)
-#define control_key_state (input_rec.Event.KeyEvent.dwControlKeyState)
-
- dev_state->nModifiers = 0;
-
-#ifdef DEBUGGING
- /* allow manual switching to/from raw mode via ctrl-alt-scrolllock */
- if (input_rec.Event.KeyEvent.bKeyDown &&
- virtual_key_code == VK_SCROLL &&
- ((control_key_state & (LEFT_ALT_PRESSED | LEFT_CTRL_PRESSED)) == (LEFT_ALT_PRESSED | LEFT_CTRL_PRESSED))
- )
- {
- set_raw_win32_keyboard_mode (!dev_state->raw_win32_keyboard_mode);
- continue;
- }
-#endif
-
- if (dev_state->raw_win32_keyboard_mode)
- {
- __small_sprintf (tmp, "\033{%u;%u;%u;%u;%u;%luK",
- input_rec.Event.KeyEvent.bKeyDown,
- input_rec.Event.KeyEvent.wRepeatCount,
- input_rec.Event.KeyEvent.wVirtualKeyCode,
- input_rec.Event.KeyEvent.wVirtualScanCode,
- input_rec.Event.KeyEvent.uChar.UnicodeChar,
- input_rec.Event.KeyEvent.dwControlKeyState);
- toadd = tmp;
- nread = strlen (toadd);
- break;
- }
-
-#define ich (input_rec.Event.KeyEvent.uChar.AsciiChar)
-#define wch (input_rec.Event.KeyEvent.uChar.UnicodeChar)
-#define ALT_PRESSED (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED)
-#define CTRL_PRESSED (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)
-
- /* Ignore key up events, except for left alt events with non-zero character
- */
- if (!input_rec.Event.KeyEvent.bKeyDown &&
- /*
- Event for left alt, with a non-zero character, comes from
- "alt + numerics" key sequence.
- e.g. <left-alt> 0233 => &eacute;
- */
- !(wch != 0
- // ?? experimentally determined on an XP system
- && virtual_key_code == VK_MENU
- // left alt -- see http://www.microsoft.com/hwdev/tech/input/Scancode.asp
- && input_rec.Event.KeyEvent.wVirtualScanCode == 0x38))
- continue;
-
- if (control_key_state & SHIFT_PRESSED)
- dev_state->nModifiers |= 1;
- if (control_key_state & RIGHT_ALT_PRESSED)
- dev_state->nModifiers |= 2;
- if (control_key_state & CTRL_PRESSED)
- dev_state->nModifiers |= 4;
- if (control_key_state & LEFT_ALT_PRESSED)
- dev_state->nModifiers |= 8;
-
- if (wch == 0 ||
- /* arrow/function keys */
- (input_rec.Event.KeyEvent.dwControlKeyState & ENHANCED_KEY))
- {
- toadd = get_nonascii_key (input_rec, tmp);
- if (!toadd)
- {
- dev_state->nModifiers = 0;
- continue;
- }
- nread = strlen (toadd);
- }
- else
- {
- nread = dev_state->con_to_str (tmp + 1, 59, wch);
- /* Determine if the keystroke is modified by META. The tricky
- part is to distinguish whether the right Alt key should be
- recognized as Alt, or as AltGr. */
- bool meta;
- meta = (control_key_state & ALT_PRESSED) != 0
- && ((control_key_state & CTRL_PRESSED) == 0
- || (wch <= 0x1f || wch == 0x7f));
- if (!meta)
- toadd = tmp + 1;
- else if (dev_state->metabit)
- {
- tmp[1] |= 0x80;
- toadd = tmp + 1;
- }
- else
- {
- tmp[0] = '\033';
- tmp[1] = cyg_tolower (tmp[1]);
- toadd = tmp;
- nread++;
- dev_state->nModifiers &= ~4;
- }
- }
-#undef ich
-#undef wch
-#undef ALT_PRESSED
-#undef CTRL_PRESSED
- break;
-
- case MOUSE_EVENT:
- send_winch_maybe ();
- if (dev_state->use_mouse)
- {
- MOUSE_EVENT_RECORD& mouse_event = input_rec.Event.MouseEvent;
-
- /* Treat the double-click event like a regular button press */
- if (mouse_event.dwEventFlags == DOUBLE_CLICK)
- {
- syscall_printf ("mouse: double-click -> click");
- mouse_event.dwEventFlags = 0;
- }
-
- /* Did something other than a click occur? */
- if (mouse_event.dwEventFlags)
- continue;
-
- /* Retrieve reported mouse position */
- int x = mouse_event.dwMousePosition.X;
- int y = mouse_event.dwMousePosition.Y;
-
- /* Adjust mouse position by scroll buffer offset */
- CONSOLE_SCREEN_BUFFER_INFO now;
- if (GetConsoleScreenBufferInfo (get_output_handle (), &now))
- {
- y -= now.srWindow.Top;
- x -= now.srWindow.Left;
- }
- else
- {
- syscall_printf ("mouse: cannot adjust position by scroll buffer offset");
- continue;
- }
-
- /* If the mouse event occurred out of the area we can handle,
- ignore it. */
- if ((x + ' ' + 1 > 0xFF) || (y + ' ' + 1 > 0xFF))
- {
- syscall_printf ("mouse: position out of range");
- continue;
- }
-
- /* Ignore unimportant mouse buttons */
- mouse_event.dwButtonState &= 0x7;
-
- /* This code assumes Windows never reports multiple button
- events at the same time. */
- int b = 0;
- char sz[32];
- if (mouse_event.dwButtonState == dev_state->dwLastButtonState)
- {
- syscall_printf ("mouse: button state unchanged");
- continue;
- }
- else if (mouse_event.dwButtonState < dev_state->dwLastButtonState)
- {
- b = 3;
- strcpy (sz, "btn up");
- }
- else if ((mouse_event.dwButtonState & 1) != (dev_state->dwLastButtonState & 1))
- {
- b = 0;
- strcpy (sz, "btn1 down");
- }
- else if ((mouse_event.dwButtonState & 2) != (dev_state->dwLastButtonState & 2))
- {
- b = 2;
- strcpy (sz, "btn2 down");
- }
- else if ((mouse_event.dwButtonState & 4) != (dev_state->dwLastButtonState & 4))
- {
- b = 1;
- strcpy (sz, "btn3 down");
- }
-
- /* Remember the current button state */
- dev_state->dwLastButtonState = mouse_event.dwButtonState;
-
- /* If a button was pressed, remember the modifiers */
- if (b != 3)
- {
- dev_state->nModifiers = 0;
- if (mouse_event.dwControlKeyState & SHIFT_PRESSED)
- dev_state->nModifiers |= 0x4;
- if (mouse_event.dwControlKeyState & (RIGHT_ALT_PRESSED|LEFT_ALT_PRESSED))
- dev_state->nModifiers |= 0x8;
- if (mouse_event.dwControlKeyState & (RIGHT_CTRL_PRESSED|LEFT_CTRL_PRESSED))
- dev_state->nModifiers |= 0x10;
- }
-
- b |= dev_state->nModifiers;
-
- /* We can now create the code. */
- sprintf (tmp, "\033[M%c%c%c", b + ' ', x + ' ' + 1, y + ' ' + 1);
- syscall_printf ("mouse: %s at (%d,%d)", sz, x, y);
-
- toadd = tmp;
- nread = 6;
- }
- break;
-
- case FOCUS_EVENT:
- case WINDOW_BUFFER_SIZE_EVENT:
- send_winch_maybe ();
- /* fall through */
- default:
- continue;
- }
-
- if (toadd)
- {
- line_edit_status res = line_edit (toadd, nread, ti);
- if (res == line_edit_signalled)
- goto sig_exit;
- else if (res == line_edit_input_done)
- break;
- }
- }
-
- while (buflen)
- if ((ch = get_readahead ()) < 0)
- break;
- else
- {
- buf[copied_chars++] = (unsigned char)(ch & 0xff);
- buflen--;
- }
-#undef buf
-
- buflen = copied_chars;
- return;
-
-err:
- __seterrno ();
- buflen = (size_t) -1;
- return;
-
-sig_exit:
- set_sig_errno (EINTR);
- buflen = (size_t) -1;
-}
-
-void
-fhandler_console::set_input_state ()
-{
- if (tc->rstcons ())
- input_tcsetattr (0, &tc->ti);
-}
-
-bool
-dev_console::fillin_info (HANDLE h)
-{
- bool ret;
- CONSOLE_SCREEN_BUFFER_INFO linfo;
-
- if ((ret = GetConsoleScreenBufferInfo (h, &linfo)))
- {
- info.winTop = linfo.srWindow.Top;
- info.winBottom = linfo.srWindow.Bottom;
- info.dwWinSize.Y = 1 + linfo.srWindow.Bottom - linfo.srWindow.Top;
- info.dwWinSize.X = 1 + linfo.srWindow.Right - linfo.srWindow.Left;
- info.dwBufferSize = linfo.dwSize;
- info.dwCursorPosition = linfo.dwCursorPosition;
- info.wAttributes = linfo.wAttributes;
- }
- else
- {
- memset (&info, 0, sizeof info);
- info.dwWinSize.Y = 25;
- info.dwWinSize.X = 80;
- info.winBottom = 24;
- }
-
- return ret;
-}
-
-void
-fhandler_console::scroll_screen (int x1, int y1, int x2, int y2, int xn, int yn)
-{
- SMALL_RECT sr1, sr2;
- CHAR_INFO fill;
- COORD dest;
-
- dev_state->fillin_info (get_output_handle ());
- sr1.Left = x1 >= 0 ? x1 : dev_state->info.dwWinSize.X - 1;
- if (y1 == 0)
- sr1.Top = dev_state->info.winTop;
- else
- sr1.Top = y1 > 0 ? y1 : dev_state->info.winBottom;
- sr1.Right = x2 >= 0 ? x2 : dev_state->info.dwWinSize.X - 1;
- if (y2 == 0)
- sr1.Bottom = dev_state->info.winTop;
- else
- sr1.Bottom = y2 > 0 ? y2 : dev_state->info.winBottom;
- sr2.Top = srTop;
- sr2.Left = 0;
- sr2.Bottom = srBottom;
- sr2.Right = dev_state->info.dwWinSize.X - 1;
- if (sr1.Bottom > sr2.Bottom && sr1.Top <= sr2.Bottom)
- sr1.Bottom = sr2.Bottom;
- dest.X = xn >= 0 ? xn : dev_state->info.dwWinSize.X - 1;
- if (yn == 0)
- dest.Y = dev_state->info.winTop;
- else
- dest.Y = yn > 0 ? yn : dev_state->info.winBottom;
- fill.Char.AsciiChar = ' ';
- fill.Attributes = dev_state->current_win32_attr;
- ScrollConsoleScreenBuffer (get_output_handle (), &sr1, &sr2, dest, &fill);
-
- /* ScrollConsoleScreenBuffer on Windows 95 is buggy - when scroll distance
- * is more than half of screen, filling doesn't work as expected */
-
- if (sr1.Top == sr1.Bottom)
- /* nothing to do */;
- else if (dest.Y <= sr1.Top) /* forward scroll */
- clear_screen (0, 1 + dest.Y + sr1.Bottom - sr1.Top, sr2.Right, sr2.Bottom);
- else /* reverse scroll */
- clear_screen (0, sr1.Top, sr2.Right, dest.Y - 1);
-}
-
-int
-fhandler_console::open (int flags, mode_t)
-{
- HANDLE h;
-
- tcinit (get_tty_stuff (flags));
-
- set_io_handle (NULL);
- set_output_handle (NULL);
-
- set_flags ((flags & ~O_TEXT) | O_BINARY);
-
- /* Open the input handle as handle_ */
- h = CreateFile ("CONIN$", GENERIC_READ | GENERIC_WRITE,
- FILE_SHARE_READ | FILE_SHARE_WRITE, &sec_none,
- OPEN_EXISTING, 0, 0);
-
- if (h == INVALID_HANDLE_VALUE)
- {
- __seterrno ();
- return 0;
- }
- set_io_handle (h);
- uninterruptible_io (true); // Handled explicitly in read code
-
- h = CreateFile ("CONOUT$", GENERIC_READ | GENERIC_WRITE,
- FILE_SHARE_READ | FILE_SHARE_WRITE, &sec_none,
- OPEN_EXISTING, 0, 0);
-
- if (h == INVALID_HANDLE_VALUE)
- {
- __seterrno ();
- return 0;
- }
- set_output_handle (h);
-
- if (dev_state->fillin_info (get_output_handle ()))
- {
- dev_state->current_win32_attr = dev_state->info.wAttributes;
- if (!dev_state->default_color)
- dev_state->default_color = dev_state->info.wAttributes;
- dev_state->set_default_attr ();
- }
-
- tc->rstcons (false);
- set_open_status ();
- cygheap->manage_console_count ("fhandler_console::open", 1);
-
- DWORD cflags;
- if (GetConsoleMode (get_io_handle (), &cflags))
- SetConsoleMode (get_io_handle (),
- ENABLE_WINDOW_INPUT | ENABLE_MOUSE_INPUT | cflags);
-
- debug_printf ("opened conin$ %p, conout$ %p", get_io_handle (),
- get_output_handle ());
-
- return 1;
-}
-
-int
-fhandler_console::close ()
-{
- CloseHandle (get_io_handle ());
- CloseHandle (get_output_handle ());
- if (!hExeced)
- cygheap->manage_console_count ("fhandler_console::close", -1);
- return 0;
-}
-
-/* Special console dup to duplicate input and output handles. */
-
-int
-fhandler_console::dup (fhandler_base *child)
-{
- fhandler_console *fhc = (fhandler_console *) child;
-
- if (!fhc->open (get_flags () & ~O_NOCTTY, 0))
- system_printf ("error opening console, %E");
-
- return 0;
-}
-
-int
-fhandler_console::ioctl (unsigned int cmd, void *buf)
-{
- switch (cmd)
- {
- case TIOCGWINSZ:
- int st;
-
- st = dev_state->fillin_info (get_output_handle ());
- if (st)
- {
- /* *not* the buffer size, the actual screen size... */
- /* based on Left Top Right Bottom of srWindow */
- ((struct winsize *) buf)->ws_row = dev_state->info.dwWinSize.Y;
- ((struct winsize *) buf)->ws_col = dev_state->info.dwWinSize.X;
- syscall_printf ("WINSZ: (row=%d,col=%d)",
- ((struct winsize *) buf)->ws_row,
- ((struct winsize *) buf)->ws_col);
- return 0;
- }
- else
- {
- syscall_printf ("WINSZ failed");
- __seterrno ();
- return -1;
- }
- return 0;
- case TIOCSWINSZ:
- bg_check (SIGTTOU);
- return 0;
- case KDGKBMETA:
- *(int *) buf = (dev_state->metabit) ? K_METABIT : K_ESCPREFIX;
- return 0;
- case KDSKBMETA:
- if ((int) buf == K_METABIT)
- dev_state->metabit = TRUE;
- else if ((int) buf == K_ESCPREFIX)
- dev_state->metabit = FALSE;
- else
- {
- set_errno (EINVAL);
- return -1;
- }
- return 0;
- case TIOCLINUX:
- if (* (int *) buf == 6)
- {
- * (int *) buf = dev_state->nModifiers;
- return 0;
- }
- else
- {
- set_errno (EINVAL);
- return -1;
- }
- }
-
- return fhandler_base::ioctl (cmd, buf);
-}
-
-int
-fhandler_console::tcflush (int queue)
-{
- int res = 0;
- if (queue == TCIFLUSH
- || queue == TCIOFLUSH)
- {
- if (!FlushConsoleInputBuffer (get_io_handle ()))
- {
- __seterrno ();
- res = -1;
- }
- }
- return res;
-}
-
-int
-fhandler_console::output_tcsetattr (int, struct termios const *t)
-{
- /* All the output bits we can ignore */
-
- DWORD flags = ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT;
-
- int res = SetConsoleMode (get_output_handle (), flags) ? 0 : -1;
- syscall_printf ("%d = tcsetattr (,%x) (ENABLE FLAGS %x) (lflag %x oflag %x)",
- res, t, flags, t->c_lflag, t->c_oflag);
- return res;
-}
-
-int
-fhandler_console::input_tcsetattr (int, struct termios const *t)
-{
- /* Ignore the optional_actions stuff, since all output is emitted
- instantly */
-
- DWORD oflags;
-
- if (!GetConsoleMode (get_io_handle (), &oflags))
- oflags = 0;
- DWORD flags = 0;
-
-#if 0
- /* Enable/disable LF -> CRLF conversions */
- rbinary ((t->c_iflag & INLCR) ? false : true);
-#endif
-
- /* There's some disparity between what we need and what's
- available. We've got ECHO and ICANON, they've
- got ENABLE_ECHO_INPUT and ENABLE_LINE_INPUT. */
-
- tc->ti = *t;
-
- if (t->c_lflag & ECHO)
- {
- flags |= ENABLE_ECHO_INPUT;
- }
- if (t->c_lflag & ICANON)
- {
- flags |= ENABLE_LINE_INPUT;
- }
-
- if (flags & ENABLE_ECHO_INPUT
- && !(flags & ENABLE_LINE_INPUT))
- {
- /* This is illegal, so turn off the echo here, and fake it
- when we read the characters */
-
- flags &= ~ENABLE_ECHO_INPUT;
- }
-
- if (t->c_lflag & ISIG)
- {
- flags |= ENABLE_PROCESSED_INPUT;
- }
-
- if (use_tty)
- {
- flags = 0; // ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT;
- tc->ti.c_iflag = 0;
- tc->ti.c_lflag = 0;
- }
-
- flags |= ENABLE_WINDOW_INPUT | ENABLE_MOUSE_INPUT;
-
- int res;
- if (flags == oflags)
- res = 0;
- else
- {
- res = SetConsoleMode (get_io_handle (), flags) ? 0 : -1;
- if (res < 0)
- __seterrno ();
- syscall_printf ("%d = tcsetattr (,%x) enable flags %p, c_lflag %p iflag %p",
- res, t, flags, t->c_lflag, t->c_iflag);
- }
-
- tc->rstcons (false);
- return res;
-}
-
-int
-fhandler_console::tcsetattr (int a, struct termios const *t)
-{
- int res = output_tcsetattr (a, t);
- if (res != 0)
- return res;
- return input_tcsetattr (a, t);
-}
-
-int
-fhandler_console::tcgetattr (struct termios *t)
-{
- int res;
- *t = tc->ti;
-
- t->c_cflag |= CS8;
-
- DWORD flags;
-
- if (!GetConsoleMode (get_io_handle (), &flags))
- {
- __seterrno ();
- res = -1;
- }
- else
- {
- if (flags & ENABLE_ECHO_INPUT)
- t->c_lflag |= ECHO;
-
- if (flags & ENABLE_LINE_INPUT)
- t->c_lflag |= ICANON;
-
- if (flags & ENABLE_PROCESSED_INPUT)
- t->c_lflag |= ISIG;
-
- /* What about ENABLE_WINDOW_INPUT
- and ENABLE_MOUSE_INPUT ? */
-
- /* All the output bits we can ignore */
- res = 0;
- }
- syscall_printf ("%d = tcgetattr (%p) enable flags %p, t->lflag %p, t->iflag %p",
- res, t, flags, t->c_lflag, t->c_iflag);
- return res;
-}
-
-fhandler_console::fhandler_console () :
- fhandler_termios ()
-{
- trunc_buf.len = 0;
-}
-
-void
-dev_console::set_color (HANDLE h)
-{
- WORD win_fg = fg;
- WORD win_bg = bg;
- if (reverse)
- {
- WORD save_fg = win_fg;
- win_fg = (win_bg & BACKGROUND_RED ? FOREGROUND_RED : 0) |
- (win_bg & BACKGROUND_GREEN ? FOREGROUND_GREEN : 0) |
- (win_bg & BACKGROUND_BLUE ? FOREGROUND_BLUE : 0) |
- (win_bg & BACKGROUND_INTENSITY ? FOREGROUND_INTENSITY : 0);
- win_bg = (save_fg & FOREGROUND_RED ? BACKGROUND_RED : 0) |
- (save_fg & FOREGROUND_GREEN ? BACKGROUND_GREEN : 0) |
- (save_fg & FOREGROUND_BLUE ? BACKGROUND_BLUE : 0) |
- (save_fg & FOREGROUND_INTENSITY ? BACKGROUND_INTENSITY : 0);
- }
-
- /* apply attributes */
- if (underline)
- win_fg = underline_color;
- /* emulate blink with bright background */
- if (blink)
- win_bg |= BACKGROUND_INTENSITY;
- if (intensity == INTENSITY_INVISIBLE)
- win_fg = win_bg;
- else if (intensity != INTENSITY_BOLD)
- /* nothing to do */;
- /* apply foreground intensity only in non-reverse mode! */
- else if (reverse)
- win_bg |= BACKGROUND_INTENSITY;
- else
- win_fg |= FOREGROUND_INTENSITY;
-
- current_win32_attr = win_fg | win_bg;
- if (h)
- SetConsoleTextAttribute (h, current_win32_attr);
-}
-
-#define FOREGROUND_ATTR_MASK (FOREGROUND_RED | FOREGROUND_GREEN | \
- FOREGROUND_BLUE | FOREGROUND_INTENSITY)
-#define BACKGROUND_ATTR_MASK (BACKGROUND_RED | BACKGROUND_GREEN | \
- BACKGROUND_BLUE | BACKGROUND_INTENSITY)
-void
-dev_console::set_default_attr ()
-{
- blink = underline = reverse = false;
- intensity = INTENSITY_NORMAL;
- fg = default_color & FOREGROUND_ATTR_MASK;
- bg = default_color & BACKGROUND_ATTR_MASK;
- set_color (NULL);
-}
-
-/*
- * Clear the screen context from x1/y1 to x2/y2 cell.
- * Negative values represents current screen dimensions
- */
-void
-fhandler_console::clear_screen (int x1, int y1, int x2, int y2)
-{
- COORD tlc;
- DWORD done;
- int num;
-
- dev_state->fillin_info (get_output_handle ());
-
- if (x1 < 0)
- x1 = dev_state->info.dwWinSize.X - 1;
- if (y1 < 0)
- y1 = dev_state->info.winBottom;
- if (x2 < 0)
- x2 = dev_state->info.dwWinSize.X - 1;
- if (y2 < 0)
- y2 = dev_state->info.winBottom;
-
- num = abs (y1 - y2) * dev_state->info.dwBufferSize.X + abs (x1 - x2) + 1;
-
- if ((y2 * dev_state->info.dwBufferSize.X + x2) > (y1 * dev_state->info.dwBufferSize.X + x1))
- {
- tlc.X = x1;
- tlc.Y = y1;
- }
- else
- {
- tlc.X = x2;
- tlc.Y = y2;
- }
- FillConsoleOutputCharacterA (get_output_handle (), ' ',
- num,
- tlc,
- &done);
- FillConsoleOutputAttribute (get_output_handle (),
- dev_state->current_win32_attr,
- num,
- tlc,
- &done);
-}
-
-void
-fhandler_console::cursor_set (bool rel_to_top, int x, int y)
-{
- COORD pos;
-
- dev_state->fillin_info (get_output_handle ());
- if (y > dev_state->info.winBottom)
- y = dev_state->info.winBottom;
- else if (y < 0)
- y = 0;
- else if (rel_to_top)
- y += dev_state->info.winTop;
-
- if (x > dev_state->info.dwWinSize.X)
- x = dev_state->info.dwWinSize.X - 1;
- else if (x < 0)
- x = 0;
-
- pos.X = x;
- pos.Y = y;
- SetConsoleCursorPosition (get_output_handle (), pos);
-}
-
-void
-fhandler_console::cursor_rel (int x, int y)
-{
- dev_state->fillin_info (get_output_handle ());
- x += dev_state->info.dwCursorPosition.X;
- y += dev_state->info.dwCursorPosition.Y;
- cursor_set (false, x, y);
-}
-
-void
-fhandler_console::cursor_get (int *x, int *y)
-{
- dev_state->fillin_info (get_output_handle ());
- *y = dev_state->info.dwCursorPosition.Y;
- *x = dev_state->info.dwCursorPosition.X;
-}
-
-#define BAK 1
-#define ESC 2
-#define NOR 0
-#define IGN 4
-#if 1
-#define ERR 5
-#else
-#define ERR NOR
-#endif
-#define DWN 6
-#define BEL 7
-#define TAB 8 /* We should't let the console deal with these */
-#define CR 13
-#define LF 10
-
-static const char base_chars[256] =
-{
-/*00 01 02 03 04 05 06 07 */ IGN, ERR, ERR, NOR, NOR, NOR, NOR, BEL,
-/*08 09 0A 0B 0C 0D 0E 0F */ BAK, TAB, DWN, ERR, ERR, CR, ERR, IGN,
-/*10 11 12 13 14 15 16 17 */ NOR, NOR, ERR, ERR, ERR, ERR, ERR, ERR,
-/*18 19 1A 1B 1C 1D 1E 1F */ NOR, NOR, ERR, ESC, ERR, ERR, ERR, ERR,
-/* ! " # $ % & ' */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*( ) * + , - . / */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*0 1 2 3 4 5 6 7 */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*8 9 : ; < = > ? */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*@ A B C D E F G */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*H I J K L M N O */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*P Q R S T U V W */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*X Y Z [ \ ] ^ _ */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*` a b c d e f g */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*h i j k l m n o */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*p q r s t u v w */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*x y z { | } ~ 7F */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*80 81 82 83 84 85 86 87 */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*88 89 8A 8B 8C 8D 8E 8F */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*90 91 92 93 94 95 96 97 */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*98 99 9A 9B 9C 9D 9E 9F */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*A0 A1 A2 A3 A4 A5 A6 A7 */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*A8 A9 AA AB AC AD AE AF */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*B0 B1 B2 B3 B4 B5 B6 B7 */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*B8 B9 BA BB BC BD BE BF */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*C0 C1 C2 C3 C4 C5 C6 C7 */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*C8 C9 CA CB CC CD CE CF */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*D0 D1 D2 D3 D4 D5 D6 D7 */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*D8 D9 DA DB DC DD DE DF */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*E0 E1 E2 E3 E4 E5 E6 E7 */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*E8 E9 EA EB EC ED EE EF */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*F0 F1 F2 F3 F4 F5 F6 F7 */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR,
-/*F8 F9 FA FB FC FD FE FF */ NOR, NOR, NOR, NOR, NOR, NOR, NOR, NOR };
-
-void
-fhandler_console::char_command (char c)
-{
- int x, y;
- char buf[40];
-
- switch (c)
- {
- case 'm': /* Set Graphics Rendition */
- for (int i = 0; i <= dev_state->nargs_; i++)
- switch (dev_state->args_[i])
- {
- case 0: /* normal color */
- dev_state->set_default_attr ();
- break;
- case 1: /* bold */
- dev_state->intensity = INTENSITY_BOLD;
- break;
- case 4:
- dev_state->underline = 1;
- break;
- case 5: /* blink mode */
- dev_state->blink = true;
- break;
- case 7: /* reverse */
- dev_state->reverse = true;
- break;
- case 8: /* invisible */
- dev_state->intensity = INTENSITY_INVISIBLE;
- break;
- case 9: /* dim */
- dev_state->intensity = INTENSITY_DIM;
- break;
- case 10: /* end alternate charset */
- dev_state->alternate_charset_active = false;
- break;
- case 11: /* start alternate charset */
- dev_state->alternate_charset_active = true;
- break;
- case 24:
- dev_state->underline = false;
- break;
- case 27:
- dev_state->reverse = false;
- break;
- case 30: /* BLACK foreground */
- dev_state->fg = 0;
- break;
- case 31: /* RED foreground */
- dev_state->fg = FOREGROUND_RED;
- break;
- case 32: /* GREEN foreground */
- dev_state->fg = FOREGROUND_GREEN;
- break;
- case 33: /* YELLOW foreground */
- dev_state->fg = FOREGROUND_RED | FOREGROUND_GREEN;
- break;
- case 34: /* BLUE foreground */
- dev_state->fg = FOREGROUND_BLUE;
- break;
- case 35: /* MAGENTA foreground */
- dev_state->fg = FOREGROUND_RED | FOREGROUND_BLUE;
- break;
- case 36: /* CYAN foreground */
- dev_state->fg = FOREGROUND_BLUE | FOREGROUND_GREEN;
- break;
- case 37: /* WHITE foreg */
- dev_state->fg = FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED;
- break;
- case 39:
- dev_state->fg = dev_state->default_color & FOREGROUND_ATTR_MASK;
- break;
- case 40: /* BLACK background */
- dev_state->bg = 0;
- break;
- case 41: /* RED background */
- dev_state->bg = BACKGROUND_RED;
- break;
- case 42: /* GREEN background */
- dev_state->bg = BACKGROUND_GREEN;
- break;
- case 43: /* YELLOW background */
- dev_state->bg = BACKGROUND_RED | BACKGROUND_GREEN;
- break;
- case 44: /* BLUE background */
- dev_state->bg = BACKGROUND_BLUE;
- break;
- case 45: /* MAGENTA background */
- dev_state->bg = BACKGROUND_RED | BACKGROUND_BLUE;
- break;
- case 46: /* CYAN background */
- dev_state->bg = BACKGROUND_BLUE | BACKGROUND_GREEN;
- break;
- case 47: /* WHITE background */
- dev_state->bg = BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED;
- break;
- case 49:
- dev_state->bg = dev_state->default_color & BACKGROUND_ATTR_MASK;
- break;
- }
- dev_state->set_color (get_output_handle ());
- break;
- case 'h':
- case 'l':
- if (!dev_state->saw_question_mark)
- {
- switch (dev_state->args_[0])
- {
- case 4: /* Insert mode */
- dev_state->insert_mode = (c == 'h') ? true : false;
- syscall_printf ("insert mode %sabled", dev_state->insert_mode ? "en" : "dis");
- break;
- }
- break;
- }
- switch (dev_state->args_[0])
- {
- case 47: /* Save/Restore screen */
- if (c == 'h') /* save */
- {
- CONSOLE_SCREEN_BUFFER_INFO now;
- COORD cob = { 0, 0 };
-
- if (!GetConsoleScreenBufferInfo (get_output_handle (), &now))
- break;
-
- dev_state->savebufsiz.X = now.srWindow.Right - now.srWindow.Left + 1;
- dev_state->savebufsiz.Y = now.srWindow.Bottom - now.srWindow.Top + 1;
-
- if (dev_state->savebuf)
- cfree (dev_state->savebuf);
- dev_state->savebuf = (PCHAR_INFO) cmalloc_abort (HEAP_1_BUF, sizeof (CHAR_INFO) *
- dev_state->savebufsiz.X * dev_state->savebufsiz.Y);
-
- ReadConsoleOutputW (get_output_handle (), dev_state->savebuf,
- dev_state->savebufsiz, cob, &now.srWindow);
- }
- else /* restore */
- {
- CONSOLE_SCREEN_BUFFER_INFO now;
- COORD cob = { 0, 0 };
-
- if (!GetConsoleScreenBufferInfo (get_output_handle (), &now))
- break;
-
- if (!dev_state->savebuf)
- break;
-
- WriteConsoleOutputW (get_output_handle (), dev_state->savebuf,
- dev_state->savebufsiz, cob, &now.srWindow);
-
- cfree (dev_state->savebuf);
- dev_state->savebuf = NULL;
- dev_state->savebufsiz.X = dev_state->savebufsiz.Y = 0;
- }
- break;
-
- case 1000: /* Mouse support */
- dev_state->use_mouse = (c == 'h') ? true : false;
- syscall_printf ("mouse support %sabled", dev_state->use_mouse ? "en" : "dis");
- break;
-
- case 2000: /* Raw keyboard mode */
- set_raw_win32_keyboard_mode ((c == 'h') ? true : false);
- break;
-
- default: /* Ignore */
- syscall_printf ("unknown h/l command: %d", dev_state->args_[0]);
- break;
- }
- break;
- case 'J':
- switch (dev_state->args_[0])
- {
- case 0: /* Clear to end of screen */
- cursor_get (&x, &y);
- clear_screen (x, y, -1, -1);
- break;
- case 1: /* Clear from beginning of screen to cursor */
- cursor_get (&x, &y);
- clear_screen (0, 0, x, y);
- break;
- case 2: /* Clear screen */
- clear_screen (0, 0, -1, -1);
- cursor_set (true, 0,0);
- break;
- default:
- goto bad_escape;
- }
- break;
-
- case 'A':
- cursor_rel (0, -(dev_state->args_[0] ? dev_state->args_[0] : 1));
- break;
- case 'B':
- cursor_rel (0, dev_state->args_[0] ? dev_state->args_[0] : 1);
- break;
- case 'C':
- cursor_rel (dev_state->args_[0] ? dev_state->args_[0] : 1, 0);
- break;
- case 'D':
- cursor_rel (-(dev_state->args_[0] ? dev_state->args_[0] : 1),0);
- break;
- case 'K':
- switch (dev_state->args_[0])
- {
- case 0: /* Clear to end of line */
- cursor_get (&x, &y);
- clear_screen (x, y, -1, y);
- break;
- case 2: /* Clear line */
- cursor_get (&x, &y);
- clear_screen (0, y, -1, y);
- break;
- case 1: /* Clear from bol to cursor */
- cursor_get (&x, &y);
- clear_screen (0, y, x, y);
- break;
- default:
- goto bad_escape;
- }
- break;
- case 'H':
- case 'f':
- cursor_set (true, (dev_state->args_[1] ? dev_state->args_[1] : 1) - 1,
- (dev_state->args_[0] ? dev_state->args_[0] : 1) - 1);
- break;
- case 'G': /* hpa - position cursor at column n - 1 */
- cursor_get (&x, &y);
- cursor_set (false, (dev_state->args_[0] ? dev_state->args_[0] - 1 : 0), y);
- break;
- case 'd': /* vpa - position cursor at line n */
- cursor_get (&x, &y);
- cursor_set (true, x, (dev_state->args_[0] ? dev_state->args_[0] - 1 : 0));
- break;
- case 's': /* Save cursor position */
- cursor_get (&dev_state->savex, &dev_state->savey);
- dev_state->savey -= dev_state->info.winTop;
- break;
- case 'u': /* Restore cursor position */
- cursor_set (true, dev_state->savex, dev_state->savey);
- break;
- case 'I': /* TAB */
- cursor_get (&x, &y);
- cursor_set (false, 8 * (x / 8 + 1), y);
- break;
- case 'L': /* AL - insert blank lines */
- dev_state->args_[0] = dev_state->args_[0] ? dev_state->args_[0] : 1;
- cursor_get (&x, &y);
- scroll_screen (0, y, -1, -1, 0, y + dev_state->args_[0]);
- break;
- case 'M': /* DL - delete lines */
- dev_state->args_[0] = dev_state->args_[0] ? dev_state->args_[0] : 1;
- cursor_get (&x, &y);
- scroll_screen (0, y + dev_state->args_[0], -1, -1, 0, y);
- break;
- case '@': /* IC - insert chars */
- dev_state->args_[0] = dev_state->args_[0] ? dev_state->args_[0] : 1;
- cursor_get (&x, &y);
- scroll_screen (x, y, -1, y, x + dev_state->args_[0], y);
- break;
- case 'P': /* DC - delete chars */
- dev_state->args_[0] = dev_state->args_[0] ? dev_state->args_[0] : 1;
- cursor_get (&x, &y);
- scroll_screen (x + dev_state->args_[0], y, -1, y, x, y);
- break;
- case 'S': /* SF - Scroll forward */
- dev_state->args_[0] = dev_state->args_[0] ? dev_state->args_[0] : 1;
- scroll_screen (0, dev_state->args_[0], -1, -1, 0, 0);
- break;
- case 'T': /* SR - Scroll down */
- dev_state->fillin_info (get_output_handle ());
- dev_state->args_[0] = dev_state->args_[0] ? dev_state->args_[0] : 1;
- scroll_screen (0, 0, -1, -1, 0, dev_state->info.winTop + dev_state->args_[0]);
- break;
- case 'X': /* ec - erase chars */
- dev_state->args_[0] = dev_state->args_[0] ? dev_state->args_[0] : 1;
- cursor_get (&x, &y);
- scroll_screen (x + dev_state->args_[0], y, -1, y, x, y);
- scroll_screen (x, y, -1, y, x + dev_state->args_[0], y);
- break;
- case 'Z': /* Back tab */
- cursor_get (&x, &y);
- cursor_set (false, ((8 * (x / 8 + 1)) - 8), y);
- break;
- case 'b': /* Repeat char #1 #2 times */
- if (dev_state->insert_mode)
- {
- cursor_get (&x, &y);
- scroll_screen (x, y, -1, y, x + dev_state->args_[1], y);
- }
- while (dev_state->args_[1]--)
- WriteFile (get_output_handle (), &dev_state->args_[0], 1, (DWORD *) &x, 0);
- break;
- case 'c': /* u9 - Terminal enquire string */
- strcpy (buf, "\033[?6c");
- puts_readahead (buf);
- break;
- case 'n':
- switch (dev_state->args_[0])
- {
- case 6: /* u7 - Cursor position request */
- cursor_get (&x, &y);
- y -= dev_state->info.winTop;
- /* x -= dev_state->info.winLeft; // not available yet */
- __small_sprintf (buf, "\033[%d;%dR", y + 1, x + 1);
- puts_readahead (buf);
- break;
- default:
- goto bad_escape;
- }
- break;
- case 'r': /* Set Scroll region */
- dev_state->scroll_region.Top = dev_state->args_[0] ? dev_state->args_[0] - 1 : 0;
- dev_state->scroll_region.Bottom = dev_state->args_[1] ? dev_state->args_[1] - 1 : -1;
- cursor_set (true, 0, 0);
- break;
- case 'g': /* TAB set/clear */
- break;
- default:
-bad_escape:
- break;
- }
-}
-
-static void
-beep ()
-{
- reg_key r (HKEY_CURRENT_USER, KEY_ALL_ACCESS, "AppEvents", "Schemes", "Apps",
- ".Default", ".Default", ".Current", NULL);
- if (r.created ())
- {
- char *buf = NULL;
- UINT len = GetWindowsDirectory (buf, 0);
- buf = (char *) alloca (len += sizeof ("\\media\\ding.wav"));
- UINT res = GetWindowsDirectory (buf, len);
- if (res && res <= len)
- r.set_string ("", strcat (buf, "\\media\\ding.wav"));
- }
- MessageBeep (MB_OK);
-}
-
-/* This gets called when we found an invalid UTF-8 character. We try with
- the default ANSI codepage. If that fails we just print a question mark.
- Looks ugly but is a neat and alomst sane fallback for many languages. */
-void
-fhandler_console::write_replacement_char (const unsigned char *char_p)
-{
- int n;
- WCHAR def_cp_chars[2];
- DWORD done;
-
- n = MultiByteToWideChar (GetACP (), 0, (const CHAR *) char_p, 1,
- def_cp_chars, 2);
- if (n)
- WriteConsoleW (get_output_handle (), def_cp_chars, n, &done, 0);
- else
- WriteConsoleW (get_output_handle (), L"?", 1, &done, 0);
-}
-
-const unsigned char *
-fhandler_console::write_normal (const unsigned char *src,
- const unsigned char *end)
-{
- /* Scan forward to see what a char which needs special treatment */
- DWORD done;
- DWORD buf_len;
- const unsigned char *found = src;
- const unsigned char *nfound;
- UINT cp = dev_state->get_console_cp ();
-
- /* First check if we have cached lead bytes of a former try to write
- a truncated multibyte sequence. If so, process it. */
- if (trunc_buf.len)
- {
- int cp_len = min (end - src, 4 - trunc_buf.len);
- memcpy (trunc_buf.buf + trunc_buf.len, src, cp_len);
- nfound = next_char (cp, trunc_buf.buf,
- trunc_buf.buf + trunc_buf.len + cp_len);
- /* Still truncated multibyte sequence? Keep in trunc_buf. */
- if (nfound == trunc_buf.buf)
- {
- trunc_buf.len += cp_len;
- return end;
- }
- /* Valid multibyte sequence? Process. */
- if (nfound)
- {
- buf_len = dev_state->str_to_con (write_buf,
- (const char *) trunc_buf.buf,
- nfound - trunc_buf.buf);
- WriteConsoleW (get_output_handle (), write_buf, buf_len, &done, 0);
- found = src + (nfound - trunc_buf.buf - trunc_buf.len);
- trunc_buf.len = 0;
- return found;
- }
- /* Give up, print replacement chars for trunc_buf... */
- for (int i = 0; i < trunc_buf.len; ++i)
- write_replacement_char (trunc_buf.buf + i);
- /* ... mark trunc_buf as unused... */
- trunc_buf.len = 0;
- /* ... and proceed. */
- }
-
- while (found < end
- && found - src < CONVERT_LIMIT
- && base_chars[*found] == NOR)
- {
- nfound = next_char (cp, found, end);
- if (!nfound) /* Invalid multibyte sequence. */
- break;
- if (nfound == found) /* Truncated multibyte sequence. */
- { /* Stick to it until the next write. */
- trunc_buf.len = end - found;
- memcpy (trunc_buf.buf, found, trunc_buf.len);
- return end;
- }
- found = nfound;
- }
-
- /* Print all the base ones out */
- if (found != src)
- {
- DWORD len = found - src;
- buf_len = dev_state->str_to_con (write_buf, (const char *) src, len);
- if (!buf_len)
- {
- debug_printf ("conversion error, handle %p",
- get_output_handle ());
- __seterrno ();
- return 0;
- }
-
- if (dev_state->insert_mode)
- {
- int x, y;
- cursor_get (&x, &y);
- scroll_screen (x, y, -1, y, x + buf_len, y);
- }
-
- register PWCHAR buf = write_buf;
- do
- {
- if (!WriteConsoleW (get_output_handle (), buf, buf_len, &done, 0))
- {
- debug_printf ("write failed, handle %p", get_output_handle ());
- __seterrno ();
- return 0;
- }
- buf_len -= done;
- buf += done;
- }
- while (buf_len > 0);
- if (len >= CONVERT_LIMIT)
- return found;
- }
-
- if (found < end)
- {
- int x, y;
- switch (base_chars[*found])
- {
- case BEL:
- beep ();
- break;
- case ESC:
- dev_state->state_ = gotesc;
- break;
- case DWN:
- cursor_get (&x, &y);
- if (y >= srBottom)
- {
- if (y >= dev_state->info.winBottom && !dev_state->scroll_region.Top)
- WriteConsoleW (get_output_handle (), L"\n", 1, &done, 0);
- else
- {
- scroll_screen (0, srTop + 1, -1, srBottom, 0, srTop);
- y--;
- }
- }
- cursor_set (false, ((tc->ti.c_oflag & ONLCR) ? 0 : x), y + 1);
- break;
- case BAK:
- cursor_rel (-1, 0);
- break;
- case IGN:
- cursor_rel (1, 0);
- break;
- case CR:
- cursor_get (&x, &y);
- cursor_set (false, 0, y);
- break;
- case ERR:
- /* Don't print chars marked as ERR chars. */
- break;
- case TAB:
- cursor_get (&x, &y);
- cursor_set (false, 8 * (x / 8 + 1), y);
- break;
- case NOR:
- write_replacement_char (found);
- break;
- }
- found++;
- }
- return found;
-}
-
-int
-fhandler_console::write (const void *vsrc, size_t len)
-{
- /* Run and check for ansi sequences */
- unsigned const char *src = (unsigned char *) vsrc;
- unsigned const char *end = src + len;
- /* This might look a bit far fetched, but using the TLS path buffer allows
- to allocate a big buffer without using the stack too much. Doing it here
- in write instead of in write_normal should be faster, too. */
- tmp_pathbuf tp;
- write_buf = tp.w_get ();
-
- debug_printf ("%x, %d", vsrc, len);
-
- while (src < end)
- {
- debug_printf ("at %d(%c) state is %d", *src, isprint (*src) ? *src : ' ',
- dev_state->state_);
- switch (dev_state->state_)
- {
- case normal:
- src = write_normal (src, end);
- if (!src) /* write_normal failed */
- return -1;
- break;
- case gotesc:
- if (*src == '[')
- {
- dev_state->state_ = gotsquare;
- dev_state->saw_question_mark = false;
- for (dev_state->nargs_ = 0; dev_state->nargs_ < MAXARGS; dev_state->nargs_++)
- dev_state->args_[dev_state->nargs_] = 0;
- dev_state->nargs_ = 0;
- }
- else if (*src == ']')
- {
- dev_state->rarg = 0;
- dev_state->my_title_buf[0] = '\0';
- dev_state->state_ = gotrsquare;
- }
- else if (*src == 'M') /* Reverse Index */
- {
- dev_state->fillin_info (get_output_handle ());
- scroll_screen (0, 0, -1, -1, 0, dev_state->info.winTop + 1);
- dev_state->state_ = normal;
- }
- else if (*src == 'c') /* Reset Linux terminal */
- {
- dev_state->set_default_attr ();
- clear_screen (0, 0, -1, -1);
- cursor_set (true, 0, 0);
- dev_state->state_ = normal;
- }
- else if (*src == '8') /* Restore cursor position */
- {
- cursor_set (true, dev_state->savex, dev_state->savey);
- dev_state->state_ = normal;
- }
- else if (*src == '7') /* Save cursor position */
- {
- cursor_get (&dev_state->savex, &dev_state->savey);
- dev_state->savey -= dev_state->info.winTop;
- dev_state->state_ = normal;
- }
- else if (*src == 'R')
- dev_state->state_ = normal;
- else
- {
- dev_state->state_ = normal;
- }
- src++;
- break;
- case gotarg1:
- if (isdigit (*src))
- {
- dev_state->args_[dev_state->nargs_] = dev_state->args_[dev_state->nargs_] * 10 + *src - '0';
- src++;
- }
- else if (*src == ';')
- {
- src++;
- dev_state->nargs_++;
- if (dev_state->nargs_ >= MAXARGS)
- dev_state->nargs_--;
- }
- else
- {
- dev_state->state_ = gotcommand;
- }
- break;
- case gotcommand:
- char_command (*src++);
- dev_state->state_ = normal;
- break;
- case gotrsquare:
- if (isdigit (*src))
- dev_state->rarg = dev_state->rarg * 10 + (*src - '0');
- else if (*src == ';' && (dev_state->rarg == 2 || dev_state->rarg == 0))
- dev_state->state_ = gettitle;
- else
- dev_state->state_ = eattitle;
- src++;
- break;
- case eattitle:
- case gettitle:
- {
- int n = strlen (dev_state->my_title_buf);
- if (*src < ' ')
- {
- if (*src == '\007' && dev_state->state_ == gettitle)
- {
- if (old_title)
- strcpy (old_title, dev_state->my_title_buf);
- set_console_title (dev_state->my_title_buf);
- }
- dev_state->state_ = normal;
- }
- else if (n < TITLESIZE)
- {
- dev_state->my_title_buf[n++] = *src;
- dev_state->my_title_buf[n] = '\0';
- }
- src++;
- break;
- }
- case gotsquare:
- if (*src == ';')
- {
- dev_state->state_ = gotarg1;
- dev_state->nargs_++;
- src++;
- }
- else if (isalpha (*src))
- dev_state->state_ = gotcommand;
- else if (*src != '@' && !isalpha (*src) && !isdigit (*src))
- {
- if (*src == '?')
- dev_state->saw_question_mark = true;
- /* ignore any extra chars between [ and first arg or command */
- src++;
- }
- else
- dev_state->state_ = gotarg1;
- break;
- }
- }
-
- syscall_printf ("%d = write_console (,..%d)", len, len);
-
- return len;
-}
-
-static struct {
- int vk;
- const char *val[4];
-} keytable[] NO_COPY = {
- /* NORMAL */ /* SHIFT */ /* CTRL */ /* ALT */
- {VK_LEFT, {"\033[D", "\033[D", "\033[D", "\033\033[D"}},
- {VK_RIGHT, {"\033[C", "\033[C", "\033[C", "\033\033[C"}},
- {VK_UP, {"\033[A", "\033[A", "\033[A", "\033\033[A"}},
- {VK_DOWN, {"\033[B", "\033[B", "\033[B", "\033\033[B"}},
- {VK_PRIOR, {"\033[5~", "\033[5~", "\033[5~", "\033\033[5~"}},
- {VK_NEXT, {"\033[6~", "\033[6~", "\033[6~", "\033\033[6~"}},
- {VK_HOME, {"\033[1~", "\033[1~", "\033[1~", "\033\033[1~"}},
- {VK_END, {"\033[4~", "\033[4~", "\033[4~", "\033\033[4~"}},
- {VK_INSERT, {"\033[2~", "\033[2~", "\033[2~", "\033\033[2~"}},
- {VK_DELETE, {"\033[3~", "\033[3~", "\033[3~", "\033\033[3~"}},
- {VK_F1, {"\033[[A", "\033[23~", NULL, NULL}},
- {VK_F2, {"\033[[B", "\033[24~", NULL, NULL}},
- {VK_F3, {"\033[[C", "\033[25~", NULL, NULL}},
- {VK_F4, {"\033[[D", "\033[26~", NULL, NULL}},
- {VK_F5, {"\033[[E", "\033[28~", NULL, NULL}},
- {VK_F6, {"\033[17~", "\033[29~", "\036", NULL}},
- {VK_F7, {"\033[18~", "\033[31~", NULL, NULL}},
- {VK_F8, {"\033[19~", "\033[32~", NULL, NULL}},
- {VK_F9, {"\033[20~", "\033[33~", NULL, NULL}},
- {VK_F10, {"\033[21~", "\033[34~", NULL, NULL}},
- {VK_F11, {"\033[23~", NULL, NULL, NULL}},
- {VK_F12, {"\033[24~", NULL, NULL, NULL}},
- {VK_NUMPAD5, {"\033[G", NULL, NULL, NULL}},
- {VK_CLEAR, {"\033[G", NULL, NULL, NULL}},
- {'6', {NULL, NULL, "\036", NULL}},
- {0, {"", NULL, NULL, NULL}}
-};
-
-const char *
-get_nonascii_key (INPUT_RECORD& input_rec, char *tmp)
-{
-#define NORMAL 0
-#define SHIFT 1
-#define CONTROL 2
-#define ALT 3
- int modifier_index = NORMAL;
-
- if (input_rec.Event.KeyEvent.dwControlKeyState & SHIFT_PRESSED)
- modifier_index = SHIFT;
- else if (input_rec.Event.KeyEvent.dwControlKeyState &
- (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED))
- modifier_index = CONTROL;
- else if (input_rec.Event.KeyEvent.dwControlKeyState &
- (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED))
- modifier_index = ALT;
-
- for (int i = 0; keytable[i].vk; i++)
- if (input_rec.Event.KeyEvent.wVirtualKeyCode == keytable[i].vk)
- return keytable[i].val[modifier_index];
-
- if (input_rec.Event.KeyEvent.uChar.AsciiChar)
- {
- tmp[0] = input_rec.Event.KeyEvent.uChar.AsciiChar;
- tmp[1] = '\0';
- return tmp;
- }
- return NULL;
-}
-
-void
-fhandler_console::init (HANDLE f, DWORD a, mode_t bin)
-{
- // this->fhandler_termios::init (f, mode, bin);
- /* Ensure both input and output console handles are open */
- int flags = 0;
-
- a &= GENERIC_READ | GENERIC_WRITE;
- if (a == GENERIC_READ)
- flags = O_RDONLY;
- if (a == GENERIC_WRITE)
- flags = O_WRONLY;
- if (a == (GENERIC_READ | GENERIC_WRITE))
- flags = O_RDWR;
- open (flags | O_BINARY);
- if (f != INVALID_HANDLE_VALUE)
- CloseHandle (f); /* Reopened by open */
-
- tcsetattr (0, &tc->ti);
-}
-
-int
-fhandler_console::igncr_enabled ()
-{
- return tc->ti.c_iflag & IGNCR;
-}
-
-void
-fhandler_console::set_close_on_exec (bool val)
-{
- fhandler_base::set_close_on_exec (val);
- set_no_inheritance (output_handle, val);
-}
-
-void __stdcall
-set_console_title (char *title)
-{
- char buf[257];
- strncpy (buf, title, sizeof (buf) - 1);
- buf[sizeof (buf) - 1] = '\0';
- lock_ttys here (15000);
- SetConsoleTitle (buf);
- debug_printf ("title '%s'", buf);
-}
-
-void
-fhandler_console::fixup_after_fork_exec (bool execing)
-{
- HANDLE h = get_handle ();
- HANDLE oh = get_output_handle ();
-
- if ((execing && close_on_exec ()) || open (O_NOCTTY | get_flags (), 0))
- cygheap->manage_console_count ("fhandler_console::fixup_after_fork_exec", -1);
- else
- {
- bool sawerr = false;
- if (!get_io_handle ())
- {
- system_printf ("error opening input console handle for %s after fork/exec, errno %d, %E", get_name (), get_errno ());
- sawerr = true;
- }
- if (!get_output_handle ())
- {
- system_printf ("error opening output console handle for %s after fork/exec, errno %d, %E", get_name (), get_errno ());
- sawerr = true;
- }
-
- if (!sawerr)
- system_printf ("error opening console after fork/exec, errno %d, %E", get_errno ());
- }
-
- if (!close_on_exec ())
- {
- CloseHandle (h);
- CloseHandle (oh);
- }
-}
-
-bool NO_COPY fhandler_console::invisible_console;
-
-// #define WINSTA_ACCESS (WINSTA_READATTRIBUTES | STANDARD_RIGHTS_READ | STANDARD_RIGHTS_WRITE | WINSTA_CREATEDESKTOP | WINSTA_EXITWINDOWS)
-#define WINSTA_ACCESS STANDARD_RIGHTS_READ
-
-bool
-fhandler_console::need_invisible ()
-{
- BOOL b = false;
- if (GetConsoleCP ())
- invisible_console = false;
- else
- {
- HWINSTA h, horig;
- /* The intent here is to allocate an "invisible" console if we have no
- controlling tty or to reuse the existing console if we already have
- a tty. So, first get the old windows station. If there is no controlling
- terminal, create a new windows station and then set it as the current
- windows station. The subsequent AllocConsole will then be allocated
- invisibly. But, after doing that we have to restore any existing windows
- station or, strangely, characters will not be displayed in any windows
- drawn on the current screen. We only do this if we have changed to
- a new windows station and if we had an existing windows station previously.
- We also close the previously opened workstation even though AllocConsole
- is now "using" it. This doesn't seem to cause any problems.
-
- Things to watch out for if you make changes in this code:
-
- - Flashing, black consoles showing up when you start, e.g., ssh in
- an xterm.
- - Non-displaying of characters in rxvt or xemacs if you start a
- process using setsid: bash -lc "setsid rxvt". */
-
- h = horig = GetProcessWindowStation ();
-
- USEROBJECTFLAGS oi;
- DWORD len;
- if (!horig
- || !GetUserObjectInformationW (horig, UOI_FLAGS, &oi, sizeof (oi), &len)
- || !(oi.dwFlags & WSF_VISIBLE))
- {
- b = true;
- debug_printf ("window station is not visible");
- invisible_console = true;
- }
- else
- {
- if (myself->ctty != TTY_CONSOLE)
- {
- h = CreateWindowStationW (NULL, 0, WINSTA_ACCESS, NULL);
- termios_printf ("%p = CreateWindowStation(NULL), %E", h);
- if (h)
- {
- b = SetProcessWindowStation (h);
- termios_printf ("SetProcessWindowStation %d, %E", b);
- }
- }
- b = AllocConsole (); /* will cause flashing if CreateWindowStation
- failed */
- debug_printf ("h %p, horig %p, flags %p", h, horig, oi.dwFlags);
- if (horig && h && h != horig && SetProcessWindowStation (horig))
- CloseWindowStation (h);
- termios_printf ("%d = AllocConsole (), %E", b);
- invisible_console = true;
- }
- }
-
- debug_printf ("invisible_console %d", invisible_console);
- return b;
-}
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
deleted file mode 100644
index 15ad76f..0000000
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ /dev/null
@@ -1,2139 +0,0 @@
-/* fhandler_disk_file.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include <sys/acl.h>
-#include <sys/statvfs.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "shared_info.h"
-#include "pinfo.h"
-#include "ntdll.h"
-#include "tls_pbuf.h"
-#include "nfs.h"
-#include <winioctl.h>
-
-#define _COMPILING_NEWLIB
-#include <dirent.h>
-
-class __DIR_mounts
-{
- int count;
- const char *parent_dir;
- int parent_dir_len;
- UNICODE_STRING mounts[MAX_MOUNTS];
- bool found[MAX_MOUNTS + 2];
- UNICODE_STRING cygdrive;
-
-#define __DIR_PROC (MAX_MOUNTS)
-#define __DIR_CYGDRIVE (MAX_MOUNTS+1)
-
- __ino64_t eval_ino (int idx)
- {
- __ino64_t ino = 0;
- char fname[parent_dir_len + mounts[idx].Length + 2];
- struct __stat64 st;
-
- char *c = stpcpy (fname, parent_dir);
- if (c[- 1] != '/')
- *c++ = '/';
- sys_wcstombs (c, mounts[idx].Length + 1,
- mounts[idx].Buffer, mounts[idx].Length / sizeof (WCHAR));
- path_conv pc (fname, PC_SYM_NOFOLLOW | PC_POSIX);
- if (!stat_worker (pc, &st))
- ino = st.st_ino;
- return ino;
- }
-
-public:
- __DIR_mounts (const char *posix_path)
- : parent_dir (posix_path)
- {
- parent_dir_len = strlen (parent_dir);
- count = mount_table->get_mounts_here (parent_dir, parent_dir_len, mounts,
- &cygdrive);
- rewind ();
- }
- ~__DIR_mounts ()
- {
- for (int i = 0; i < count; ++i)
- RtlFreeUnicodeString (&mounts[i]);
- RtlFreeUnicodeString (&cygdrive);
- }
- __ino64_t check_mount (PUNICODE_STRING fname, __ino64_t ino,
- bool eval = true)
- {
- if (parent_dir_len == 1) /* root dir */
- {
- UNICODE_STRING proc;
-
- RtlInitUnicodeString (&proc, L"proc");
- if (RtlEqualUnicodeString (fname, &proc, FALSE))
- {
- found[__DIR_PROC] = true;
- return 2;
- }
- if (fname->Length / sizeof (WCHAR) == mount_table->cygdrive_len - 2
- && RtlEqualUnicodeString (fname, &cygdrive, FALSE))
- {
- found[__DIR_CYGDRIVE] = true;
- return 2;
- }
- }
- for (int i = 0; i < count; ++i)
- if (RtlEqualUnicodeString (fname, &mounts[i], FALSE))
- {
- found[i] = true;
- return eval ? eval_ino (i) : 1;
- }
- return ino;
- }
- __ino64_t check_missing_mount (PUNICODE_STRING retname = NULL)
- {
- for (int i = 0; i < count; ++i)
- if (!found[i])
- {
- found[i] = true;
- if (retname)
- {
- *retname = mounts[i];
- return eval_ino (i);
- }
- return 1;
- }
- if (parent_dir_len == 1) /* root dir */
- {
- if (!found[__DIR_PROC])
- {
- found[__DIR_PROC] = true;
- if (retname)
- RtlInitUnicodeString (retname, L"proc");
- return 2;
- }
- if (!found[__DIR_CYGDRIVE])
- {
- found[__DIR_CYGDRIVE] = true;
- if (cygdrive.Length > 0)
- {
- if (retname)
- *retname = cygdrive;
- return 2;
- }
- }
- }
- return 0;
- }
- void rewind () { memset (found, 0, sizeof found); }
-};
-
-static inline bool
-is_volume_mountpoint (POBJECT_ATTRIBUTES attr)
-{
- bool ret = false;
- IO_STATUS_BLOCK io;
- HANDLE reph;
-
- if (NT_SUCCESS (NtOpenFile (&reph, READ_CONTROL, attr, &io,
- FILE_SHARE_VALID_FLAGS,
- FILE_OPEN_FOR_BACKUP_INTENT
- | FILE_OPEN_REPARSE_POINT)))
- {
- PREPARSE_DATA_BUFFER rp = (PREPARSE_DATA_BUFFER)
- alloca (MAXIMUM_REPARSE_DATA_BUFFER_SIZE);
- if (NT_SUCCESS (NtFsControlFile (reph, NULL, NULL, NULL,
- &io, FSCTL_GET_REPARSE_POINT, NULL, 0,
- (LPVOID) rp, MAXIMUM_REPARSE_DATA_BUFFER_SIZE))
- && rp->ReparseTag == IO_REPARSE_TAG_MOUNT_POINT
- && rp->SymbolicLinkReparseBuffer.PrintNameLength == 0)
- ret = true;
- NtClose (reph);
- }
- return ret;
-}
-
-static inline __ino64_t
-get_ino_by_handle (HANDLE hdl)
-{
- IO_STATUS_BLOCK io;
- FILE_INTERNAL_INFORMATION fai;
-
- if (NT_SUCCESS (NtQueryInformationFile (hdl, &io, &fai, sizeof fai,
- FileInternalInformation)))
- return fai.FileId.QuadPart;
- return 0;
-}
-
-unsigned __stdcall
-path_conv::ndisk_links (DWORD nNumberOfLinks)
-{
- if (!isdir () || isremote ())
- return nNumberOfLinks;
-
- OBJECT_ATTRIBUTES attr;
- IO_STATUS_BLOCK io;
- HANDLE fh;
-
- if (!NT_SUCCESS (NtOpenFile (&fh, SYNCHRONIZE | FILE_LIST_DIRECTORY,
- get_object_attr (attr, sec_none_nih),
- &io, FILE_SHARE_VALID_FLAGS,
- FILE_SYNCHRONOUS_IO_NONALERT
- | FILE_OPEN_FOR_BACKUP_INTENT
- | FILE_DIRECTORY_FILE)))
- return nNumberOfLinks;
-
- unsigned count = 0;
- bool first = true;
- PFILE_DIRECTORY_INFORMATION fdibuf = (PFILE_DIRECTORY_INFORMATION)
- alloca (65536);
- __DIR_mounts *dir = new __DIR_mounts (normalized_path);
- while (NT_SUCCESS (NtQueryDirectoryFile (fh, NULL, NULL, NULL, &io, fdibuf,
- 65536, FileDirectoryInformation,
- FALSE, NULL, first)))
- {
- if (first)
- {
- first = false;
- /* All directories have . and .. as their first entries.
- If . is not present as first entry, we're on a drive's
- root direcotry, which doesn't have these entries. */
- if (fdibuf->FileNameLength != 2 || fdibuf->FileName[0] != L'.')
- count = 2;
- }
- for (PFILE_DIRECTORY_INFORMATION pfdi = fdibuf;
- pfdi;
- pfdi = (PFILE_DIRECTORY_INFORMATION)
- (pfdi->NextEntryOffset ? (PBYTE) pfdi + pfdi->NextEntryOffset
- : NULL))
- {
- switch (pfdi->FileAttributes
- & (FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_REPARSE_POINT))
- {
- case FILE_ATTRIBUTE_DIRECTORY:
- /* Just a directory */
- ++count;
- break;
- case FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_REPARSE_POINT:
- /* Volume mount point or symlink to directory */
- {
- UNICODE_STRING fname;
-
- RtlInitCountedUnicodeString (&fname, pfdi->FileName,
- pfdi->FileNameLength);
- InitializeObjectAttributes (&attr, &fname,
- objcaseinsensitive (), fh, NULL);
- if (is_volume_mountpoint (&attr))
- ++count;
- }
- break;
- default:
- break;
- }
- UNICODE_STRING fname;
- RtlInitCountedUnicodeString (&fname, pfdi->FileName,
- pfdi->FileNameLength);
- dir->check_mount (&fname, 0, false);
- }
- }
- while (dir->check_missing_mount ())
- ++count;
- NtClose (fh);
- delete dir;
- return count;
-}
-
-inline bool
-path_conv::isgood_inode (__ino64_t ino) const
-{
- /* We can't trust remote inode numbers of only 32 bit. That means,
- all remote inode numbers when running under NT4, as well as remote NT4
- NTFS, as well as shares of Samba version < 3.0.
- The known exception are SFU NFS shares, which return the valid 32 bit
- inode number from the remote file system unchanged. */
- return hasgood_inode () && (ino > UINT32_MAX || !isremote () || fs_is_nfs ());
-}
-
-/* For files on NFS shares, we request an EA of type NfsV3Attributes.
- This returns the content of a struct fattr3 as defined in RFC 1813.
- The content is the NFS equivalent of struct stat. so there's not much
- to do here except for copying. */
-int __stdcall
-fhandler_base::fstat_by_nfs_ea (struct __stat64 *buf)
-{
- NTSTATUS status;
- IO_STATUS_BLOCK io;
- struct {
- FILE_FULL_EA_INFORMATION ffei;
- char buf[sizeof (NFS_V3_ATTR) + sizeof (fattr3)];
- } ffei_buf;
- struct {
- FILE_GET_EA_INFORMATION fgei;
- char buf[sizeof (NFS_V3_ATTR)];
- } fgei_buf;
-
- fgei_buf.fgei.NextEntryOffset = 0;
- fgei_buf.fgei.EaNameLength = sizeof (NFS_V3_ATTR) - 1;
- stpcpy (fgei_buf.fgei.EaName, NFS_V3_ATTR);
- status = NtQueryEaFile (get_handle (), &io,
- &ffei_buf.ffei, sizeof ffei_buf, TRUE,
- &fgei_buf.fgei, sizeof fgei_buf, NULL, TRUE);
- if (NT_SUCCESS (status))
- {
- fattr3 *nfs_attr = (fattr3 *) (ffei_buf.ffei.EaName
- + ffei_buf.ffei.EaNameLength + 1);
- buf->st_dev = nfs_attr->fsid;
- buf->st_ino = nfs_attr->fileid;
- buf->st_mode = (nfs_attr->mode & 0xfff)
- | nfs_type_mapping[nfs_attr->type & 7];
- buf->st_nlink = nfs_attr->nlink;
- /* FIXME: How to convert UNIX uid/gid to Windows SIDs? */
-#if 0
- buf->st_uid = nfs_attr->uid;
- buf->st_gid = nfs_attr->gid;
-#else
- buf->st_uid = myself->uid;
- buf->st_gid = myself->gid;
-#endif
- buf->st_rdev = makedev (nfs_attr->rdev.specdata1,
- nfs_attr->rdev.specdata2);
- buf->st_size = nfs_attr->size;
- buf->st_blksize = PREFERRED_IO_BLKSIZE;
- buf->st_blocks = nfs_attr->used / 512;
- buf->st_atim = nfs_attr->atime;
- buf->st_mtim = nfs_attr->mtime;
- buf->st_ctim = nfs_attr->ctime;
- return 0;
- }
- debug_printf ("%p = NtQueryEaFile(%S)", status, pc.get_nt_native_path ());
- return -1;
-}
-
-int __stdcall
-fhandler_base::fstat_by_handle (struct __stat64 *buf)
-{
- NTSTATUS status;
- IO_STATUS_BLOCK io;
-
- if (pc.fs_is_nfs ())
- return fstat_by_nfs_ea (buf);
-
- struct {
- FILE_ALL_INFORMATION fai;
- WCHAR buf[NAME_MAX + 1];
- } fai_buf;
-
- status = NtQueryInformationFile (get_handle (), &io, &fai_buf.fai,
- sizeof fai_buf, FileAllInformation);
- if (!NT_SUCCESS (status))
- {
- debug_printf ("%p = NtQueryInformationFile(%S)",
- status, pc.get_nt_native_path ());
- return -1;
- }
- /* If the change time is 0, it's a file system which doesn't
- support a change timestamp. In that case use the LastWriteTime
- entry, as in other calls to fstat_helper. */
- if (pc.is_rep_symlink ())
- fai_buf.fai.BasicInformation.FileAttributes &= ~FILE_ATTRIBUTE_DIRECTORY;
- pc.file_attributes (fai_buf.fai.BasicInformation.FileAttributes);
- return fstat_helper (buf,
- fai_buf.fai.BasicInformation.ChangeTime.QuadPart
- ? *(FILETIME *) (void *) &fai_buf.fai.BasicInformation.ChangeTime
- : *(FILETIME *) (void *) &fai_buf.fai.BasicInformation.LastWriteTime,
- *(FILETIME *) (void *) &fai_buf.fai.BasicInformation.LastAccessTime,
- *(FILETIME *) (void *) &fai_buf.fai.BasicInformation.LastWriteTime,
- *(FILETIME *) (void *) &fai_buf.fai.BasicInformation.CreationTime,
- get_dev (),
- fai_buf.fai.StandardInformation.EndOfFile.QuadPart,
- fai_buf.fai.StandardInformation.AllocationSize.QuadPart,
- fai_buf.fai.InternalInformation.FileId.QuadPart,
- fai_buf.fai.StandardInformation.NumberOfLinks,
- fai_buf.fai.BasicInformation.FileAttributes);
-}
-
-int __stdcall
-fhandler_base::fstat_by_name (struct __stat64 *buf)
-{
- NTSTATUS status;
- OBJECT_ATTRIBUTES attr;
- IO_STATUS_BLOCK io;
- UNICODE_STRING dirname;
- UNICODE_STRING basename;
- HANDLE dir;
- struct {
- FILE_ID_BOTH_DIR_INFORMATION fdi;
- WCHAR buf[NAME_MAX + 1];
- } fdi_buf;
- LARGE_INTEGER FileId;
-
- RtlSplitUnicodePath (pc.get_nt_native_path (), &dirname, &basename);
- InitializeObjectAttributes (&attr, &dirname, pc.objcaseinsensitive (),
- NULL, NULL);
- if (!NT_SUCCESS (status = NtOpenFile (&dir, SYNCHRONIZE | FILE_LIST_DIRECTORY,
- &attr, &io, FILE_SHARE_VALID_FLAGS,
- FILE_SYNCHRONOUS_IO_NONALERT
- | FILE_OPEN_FOR_BACKUP_INTENT
- | FILE_DIRECTORY_FILE)))
- {
- debug_printf ("%p = NtOpenFile(%S)", status, pc.get_nt_native_path ());
- goto too_bad;
- }
- if (wincap.has_fileid_dirinfo () && !pc.has_buggy_fileid_dirinfo ()
- && NT_SUCCESS (status = NtQueryDirectoryFile (dir, NULL, NULL, NULL, &io,
- &fdi_buf.fdi, sizeof fdi_buf,
- FileIdBothDirectoryInformation,
- TRUE, &basename, TRUE)))
- FileId = fdi_buf.fdi.FileId;
- else if (NT_SUCCESS (status = NtQueryDirectoryFile (dir, NULL, NULL, NULL,
- &io, &fdi_buf.fdi,
- sizeof fdi_buf,
- FileDirectoryInformation,
- TRUE, &basename, TRUE)))
- FileId.QuadPart = 0; /* get_ino is called in fstat_helper. */
- if (!NT_SUCCESS (status))
- {
- debug_printf ("%p = NtQueryDirectoryFile(%S)", status,
- pc.get_nt_native_path ());
- NtClose (dir);
- goto too_bad;
- }
- NtClose (dir);
- /* If the change time is 0, it's a file system which doesn't
- support a change timestamp. In that case use the LastWriteTime
- entry, as in other calls to fstat_helper. */
- if (pc.is_rep_symlink ())
- fdi_buf.fdi.FileAttributes &= ~FILE_ATTRIBUTE_DIRECTORY;
- pc.file_attributes (fdi_buf.fdi.FileAttributes);
- return fstat_helper (buf,
- fdi_buf.fdi.ChangeTime.QuadPart ?
- *(FILETIME *) (void *) &fdi_buf.fdi.ChangeTime :
- *(FILETIME *) (void *) &fdi_buf.fdi.LastWriteTime,
- *(FILETIME *) (void *) &fdi_buf.fdi.LastAccessTime,
- *(FILETIME *) (void *) &fdi_buf.fdi.LastWriteTime,
- *(FILETIME *) (void *) &fdi_buf.fdi.CreationTime,
- pc.fs_serial_number (),
- fdi_buf.fdi.EndOfFile.QuadPart,
- fdi_buf.fdi.AllocationSize.QuadPart,
- FileId.QuadPart,
- 1,
- fdi_buf.fdi.FileAttributes);
-
-too_bad:
- LARGE_INTEGER ft;
- /* Arbitrary value: 2006-12-01 */
- RtlSecondsSince1970ToTime (1164931200L, &ft);
- return fstat_helper (buf,
- *(FILETIME *) (void *) &ft,
- *(FILETIME *) (void *) &ft,
- *(FILETIME *) (void *) &ft,
- *(FILETIME *) (void *) &ft,
- 0,
- 0ULL,
- -1LL,
- 0ULL,
- 1,
- pc.file_attributes ());
-}
-
-int __stdcall
-fhandler_base::fstat_fs (struct __stat64 *buf)
-{
- int res = -1;
- int oret;
- int open_flags = O_RDONLY | O_BINARY;
-
- if (get_handle ())
- {
- if (!nohandle () && !is_fs_special ())
- res = fstat_by_handle (buf);
- if (res)
- res = fstat_by_name (buf);
- return res;
- }
- query_open (query_read_attributes);
- oret = open_fs (open_flags, 0);
- if (oret)
- {
- /* We now have a valid handle, regardless of the "nohandle" state.
- Since fhandler_base::open only calls CloseHandle if !nohandle,
- we have to set it to false before calling close and restore
- the state afterwards. */
- res = fstat_by_handle (buf);
- bool no_handle = nohandle ();
- nohandle (false);
- close_fs ();
- nohandle (no_handle);
- set_io_handle (NULL);
- }
- if (res)
- res = fstat_by_name (buf);
-
- return res;
-}
-
-/* The ftChangeTime is taken from the NTFS ChangeTime entry, if reading
- the file information using NtQueryInformationFile succeeded. If not,
- it's faked using the LastWriteTime entry from GetFileInformationByHandle
- or FindFirstFile. We're deliberatly not using the creation time anymore
- to simplify interaction with native Windows applications which choke on
- creation times >= access or write times.
-
- Note that the dwFileAttributes member of the file information evaluated
- in the calling function is used here, not the pc.fileattr member, since
- the latter might be old and not reflect the actual state of the file. */
-int __stdcall
-fhandler_base::fstat_helper (struct __stat64 *buf,
- FILETIME ftChangeTime,
- FILETIME ftLastAccessTime,
- FILETIME ftLastWriteTime,
- FILETIME ftCreationTime,
- DWORD dwVolumeSerialNumber,
- ULONGLONG nFileSize,
- LONGLONG nAllocSize,
- ULONGLONG nFileIndex,
- DWORD nNumberOfLinks,
- DWORD dwFileAttributes)
-{
- IO_STATUS_BLOCK st;
- FILE_COMPRESSION_INFORMATION fci;
-
- to_timestruc_t (&ftLastAccessTime, &buf->st_atim);
- to_timestruc_t (&ftLastWriteTime, &buf->st_mtim);
- to_timestruc_t (&ftChangeTime, &buf->st_ctim);
- to_timestruc_t (&ftCreationTime, &buf->st_birthtim);
- buf->st_dev = dwVolumeSerialNumber;
- buf->st_size = (_off64_t) nFileSize;
- /* The number of links to a directory includes the
- number of subdirectories in the directory, since all
- those subdirectories point to it.
- This is too slow on remote drives, so we do without it.
- Setting the count to 2 confuses `find (1)' command. So
- let's try it with `1' as link count. */
-#if 0
- buf->st_nlink = pc.ndisk_links (nNumberOfLinks);
-#else
- buf->st_nlink = nNumberOfLinks;
-#endif
-
- /* Enforce namehash as inode number on untrusted file systems. */
- if (pc.isgood_inode (nFileIndex))
- buf->st_ino = (__ino64_t) nFileIndex;
- else
- buf->st_ino = get_ino ();
-
- buf->st_blksize = PREFERRED_IO_BLKSIZE;
-
- if (nAllocSize >= 0LL)
- /* A successful NtQueryInformationFile returns the allocation size
- correctly for compressed and sparse files as well. */
- buf->st_blocks = (nAllocSize + S_BLKSIZE - 1) / S_BLKSIZE;
- else if (::has_attribute (dwFileAttributes, FILE_ATTRIBUTE_COMPRESSED
- | FILE_ATTRIBUTE_SPARSE_FILE)
- && get_handle () && !is_fs_special ()
- && !NtQueryInformationFile (get_handle (), &st, (PVOID) &fci,
- sizeof fci, FileCompressionInformation))
- /* Otherwise we request the actual amount of bytes allocated for
- compressed and sparsed files. */
- buf->st_blocks = (fci.CompressedFileSize.QuadPart + S_BLKSIZE - 1)
- / S_BLKSIZE;
- else
- /* Otherwise compute no. of blocks from file size. */
- buf->st_blocks = (buf->st_size + S_BLKSIZE - 1) / S_BLKSIZE;
-
- buf->st_mode = 0;
- /* Using a side effect: get_file_attibutes checks for
- directory. This is used, to set S_ISVTX, if needed. */
- if (pc.isdir ())
- buf->st_mode = S_IFDIR;
- else if (pc.issymlink ())
- {
- buf->st_size = pc.get_symlink_length ();
- /* symlinks are everything for everyone! */
- buf->st_mode = S_IFLNK | S_IRWXU | S_IRWXG | S_IRWXO;
- get_file_attribute (get_handle (), pc, NULL,
- &buf->st_uid, &buf->st_gid);
- goto done;
- }
- else if (pc.issocket ())
- buf->st_mode = S_IFSOCK;
-
- if (!get_file_attribute (is_fs_special () && !pc.issocket ()
- ? NULL : get_handle (), pc,
- &buf->st_mode, &buf->st_uid, &buf->st_gid))
- {
- /* If read-only attribute is set, modify ntsec return value */
- if (::has_attribute (dwFileAttributes, FILE_ATTRIBUTE_READONLY)
- && !pc.isdir () && !pc.issymlink ())
- buf->st_mode &= ~(S_IWUSR | S_IWGRP | S_IWOTH);
-
- if (buf->st_mode & S_IFMT)
- /* nothing */;
- else if (!is_fs_special ())
- buf->st_mode |= S_IFREG;
- else
- {
- buf->st_dev = dev ();
- buf->st_mode = dev ().mode;
- buf->st_size = 0;
- }
- }
- else
- {
- buf->st_mode |= STD_RBITS;
-
- if (!::has_attribute (dwFileAttributes, FILE_ATTRIBUTE_READONLY))
- buf->st_mode |= STD_WBITS;
- /* | S_IWGRP | S_IWOTH; we don't give write to group etc */
-
- if (pc.isdir ())
- buf->st_mode |= S_IFDIR | STD_WBITS | STD_XBITS;
- else if (buf->st_mode & S_IFMT)
- /* nothing */;
- else if (is_fs_special ())
- {
- buf->st_dev = dev ();
- buf->st_mode = dev ().mode;
- buf->st_size = 0;
- }
- else
- {
- buf->st_mode |= S_IFREG;
- /* Check suffix for executable file. */
- if (pc.exec_state () == dont_know_if_executable)
- {
- PUNICODE_STRING path = pc.get_nt_native_path ();
-
- if (RtlEqualUnicodePathSuffix (path, L".exe", TRUE)
- || RtlEqualUnicodePathSuffix (path, L".bat", TRUE)
- || RtlEqualUnicodePathSuffix (path, L".com", TRUE))
- pc.set_exec ();
- }
- /* No known sufix, check file header. This catches binaries and
- shebang scripts. */
- if (pc.exec_state () == dont_know_if_executable)
- {
- UNICODE_STRING same;
- OBJECT_ATTRIBUTES attr;
- HANDLE h;
- IO_STATUS_BLOCK io;
-
- RtlInitUnicodeString (&same, L"");
- InitializeObjectAttributes (&attr, &same, 0, get_handle (), NULL);
- if (NT_SUCCESS (NtOpenFile (&h, FILE_READ_DATA, &attr, &io,
- FILE_SHARE_VALID_FLAGS, 0)))
- {
- LARGE_INTEGER off = { QuadPart:0LL };
- char magic[3];
-
- if (NT_SUCCESS (NtReadFile (h, NULL, NULL, NULL, &io, magic,
- 3, &off, NULL))
- && has_exec_chars (magic, io.Information))
- {
- pc.set_exec ();
- buf->st_mode |= STD_XBITS;
- }
- NtClose (h);
- }
- }
- }
- if (pc.exec_state () == is_executable)
- buf->st_mode |= STD_XBITS;
-
- /* This fakes the permissions of all files to match the current umask. */
- buf->st_mode &= ~(cygheap->umask);
- }
-
- done:
- syscall_printf ("0 = fstat (, %p) st_atime=%x st_size=%D, st_mode=%p, st_ino=%D, sizeof=%d",
- buf, buf->st_atime, buf->st_size, buf->st_mode,
- buf->st_ino, sizeof (*buf));
- return 0;
-}
-
-int __stdcall
-fhandler_disk_file::fstat (struct __stat64 *buf)
-{
- return fstat_fs (buf);
-}
-
-int __stdcall
-fhandler_disk_file::fstatvfs (struct statvfs *sfs)
-{
- int ret = -1, opened = 0;
- NTSTATUS status;
- IO_STATUS_BLOCK io;
- FILE_FS_FULL_SIZE_INFORMATION full_fsi;
- FILE_FS_SIZE_INFORMATION fsi;
- HANDLE fh = get_handle ();
-
- if (!fh)
- {
- OBJECT_ATTRIBUTES attr;
- opened = NT_SUCCESS (NtOpenFile (&fh, READ_CONTROL,
- pc.get_object_attr (attr, sec_none_nih),
- &io, FILE_SHARE_VALID_FLAGS,
- FILE_OPEN_FOR_BACKUP_INTENT));
- if (!opened)
- {
- /* Can't open file. Try again with parent dir. */
- UNICODE_STRING dirname;
- RtlSplitUnicodePath (pc.get_nt_native_path (), &dirname, NULL);
- attr.ObjectName = &dirname;
- opened = NT_SUCCESS (NtOpenFile (&fh, READ_CONTROL, &attr, &io,
- FILE_SHARE_VALID_FLAGS,
- FILE_OPEN_FOR_BACKUP_INTENT));
- if (!opened)
- goto out;
- }
- }
-
- sfs->f_files = ULONG_MAX;
- sfs->f_ffree = ULONG_MAX;
- sfs->f_favail = ULONG_MAX;
- sfs->f_fsid = pc.fs_serial_number ();
- sfs->f_flag = pc.fs_flags ();
- sfs->f_namemax = pc.fs_name_len ();
- /* Get allocation related information. Try to get "full" information
- first, which is only available since W2K. If that fails, try to
- retrieve normal allocation information. */
- status = NtQueryVolumeInformationFile (fh, &io, &full_fsi, sizeof full_fsi,
- FileFsFullSizeInformation);
- if (NT_SUCCESS (status))
- {
- sfs->f_bsize = full_fsi.BytesPerSector * full_fsi.SectorsPerAllocationUnit;
- sfs->f_frsize = sfs->f_bsize;
- sfs->f_blocks = full_fsi.TotalAllocationUnits.LowPart;
- sfs->f_bfree = full_fsi.ActualAvailableAllocationUnits.LowPart;
- sfs->f_bavail = full_fsi.CallerAvailableAllocationUnits.LowPart;
- if (sfs->f_bfree > sfs->f_bavail)
- {
- /* Quotas active. We can't trust TotalAllocationUnits. */
- NTFS_VOLUME_DATA_BUFFER nvdb;
-
- status = NtFsControlFile (fh, NULL, NULL, NULL, &io,
- FSCTL_GET_NTFS_VOLUME_DATA,
- NULL, 0, &nvdb, sizeof nvdb);
- if (!NT_SUCCESS (status))
- debug_printf ("%p = NtFsControlFile(%S, FSCTL_GET_NTFS_VOLUME_DATA)",
- status, pc.get_nt_native_path ());
- else
- sfs->f_blocks = nvdb.TotalClusters.QuadPart;
- }
- ret = 0;
- }
- else
- {
- status = NtQueryVolumeInformationFile (fh, &io, &fsi, sizeof fsi,
- FileFsSizeInformation);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- goto out;
- }
- sfs->f_bsize = fsi.BytesPerSector * fsi.SectorsPerAllocationUnit;
- sfs->f_frsize = sfs->f_bsize;
- sfs->f_blocks = fsi.TotalAllocationUnits.LowPart;
- sfs->f_bfree = fsi.AvailableAllocationUnits.LowPart;
- sfs->f_bavail = sfs->f_bfree;
- ret = 0;
- }
-out:
- if (opened)
- NtClose (fh);
- syscall_printf ("%d = fstatvfs (%s, %p)", ret, get_name (), sfs);
- return ret;
-}
-
-int __stdcall
-fhandler_disk_file::fchmod (mode_t mode)
-{
- extern int chmod_device (path_conv& pc, mode_t mode);
- int res = -1;
- int oret = 0;
- NTSTATUS status;
- IO_STATUS_BLOCK io;
-
- if (pc.is_fs_special ())
- return chmod_device (pc, mode);
-
- if (!get_handle ())
- {
- query_open (query_write_control);
- if (!(oret = open (O_BINARY, 0)))
- {
- /* Need WRITE_DAC|WRITE_OWNER to write ACLs. */
- if (pc.has_acls ())
- return -1;
- /* Otherwise FILE_WRITE_ATTRIBUTES is sufficient. */
- query_open (query_write_attributes);
- if (!(oret = open (O_BINARY, 0)))
- return -1;
- }
- }
-
- if (pc.fs_is_nfs ())
- {
- /* chmod on NFS shares works by writing an EA of type NfsV3Attributes.
- Only type and mode have to be set. Apparently type isn't checked
- for consistency, so it's sufficent to set it to NF3REG all the time. */
- struct {
- FILE_FULL_EA_INFORMATION ffei;
- char buf[sizeof (NFS_V3_ATTR) + sizeof (fattr3)];
- } ffei_buf;
- ffei_buf.ffei.NextEntryOffset = 0;
- ffei_buf.ffei.Flags = 0;
- ffei_buf.ffei.EaNameLength = sizeof (NFS_V3_ATTR) - 1;
- ffei_buf.ffei.EaValueLength = sizeof (fattr3);
- strcpy (ffei_buf.ffei.EaName, NFS_V3_ATTR);
- fattr3 *nfs_attr = (fattr3 *) (ffei_buf.ffei.EaName
- + ffei_buf.ffei.EaNameLength + 1);
- memset (nfs_attr, 0, sizeof (fattr3));
- nfs_attr->type = NF3REG;
- nfs_attr->mode = mode;
- status = NtSetEaFile (get_handle (), &io,
- &ffei_buf.ffei, sizeof ffei_buf);
- if (!NT_SUCCESS (status))
- __seterrno_from_nt_status (status);
- else
- res = 0;
- goto out;
- }
-
- if (pc.has_acls ())
- {
- if (pc.isdir ())
- mode |= S_IFDIR;
- if (!set_file_attribute (get_handle (), pc,
- ILLEGAL_UID, ILLEGAL_GID, mode))
- res = 0;
- }
-
- /* If the mode has any write bits set, the DOS R/O flag is in the way. */
- if (mode & (S_IWUSR | S_IWGRP | S_IWOTH))
- pc &= (DWORD) ~FILE_ATTRIBUTE_READONLY;
- else if (!pc.has_acls ()) /* Never set DOS R/O if security is used. */
- pc |= (DWORD) FILE_ATTRIBUTE_READONLY;
- if (S_ISSOCK (mode))
- pc |= (DWORD) FILE_ATTRIBUTE_SYSTEM;
-
- status = NtSetAttributesFile (get_handle (), pc.file_attributes ()
- ?: FILE_ATTRIBUTE_NORMAL);
- /* Correct NTFS security attributes have higher priority */
- if (!pc.has_acls ())
- {
- if (!NT_SUCCESS (status))
- __seterrno_from_nt_status (status);
- else
- res = 0;
- }
-
-out:
- if (oret)
- close_fs ();
-
- return res;
-}
-
-int __stdcall
-fhandler_disk_file::fchown (__uid32_t uid, __gid32_t gid)
-{
- int oret = 0;
-
- if (!pc.has_acls ())
- {
- /* fake - if not supported, pretend we're like win95
- where it just works */
- /* FIXME: Could be supported on NFS when user->uid mapping is in place. */
- return 0;
- }
-
- if (!get_handle ())
- {
- query_open (query_write_control);
- if (!(oret = fhandler_disk_file::open (O_BINARY, 0)))
- return -1;
- }
-
- mode_t attrib = 0;
- if (pc.isdir ())
- attrib |= S_IFDIR;
- int res = get_file_attribute (get_handle (), pc, &attrib, NULL, NULL);
- if (!res)
- {
- /* Typical Windows default ACLs can contain permissions for one
- group, while being owned by another user/group. The permission
- bits returned above are pretty much useless then. Creating a
- new ACL with these useless permissions results in a potentially
- broken symlink. So what we do here is to set the underlying
- permissions of symlinks to a sensible value which allows the
- world to read the symlink and only the new owner to change it. */
- if (pc.issymlink ())
- attrib = S_IFLNK | STD_RBITS | STD_WBITS;
- res = set_file_attribute (get_handle (), pc, uid, gid, attrib);
- }
- if (oret)
- close_fs ();
-
- return res;
-}
-
-int _stdcall
-fhandler_disk_file::facl (int cmd, int nentries, __aclent32_t *aclbufp)
-{
- int res = -1;
- int oret = 0;
-
- if (!pc.has_acls ())
- {
-cant_access_acl:
- switch (cmd)
- {
- struct __stat64 st;
-
- case SETACL:
- /* Open for writing required to be able to set ctime
- (even though setting the ACL is just pretended). */
- if (!get_handle ())
- oret = open (O_WRONLY | O_BINARY, 0);
- res = 0;
- break;
- case GETACL:
- if (!aclbufp)
- set_errno (EFAULT);
- else if (nentries < MIN_ACL_ENTRIES)
- set_errno (ENOSPC);
- else
- {
- if (!get_handle ())
- {
- query_open (query_read_attributes);
- oret = open (O_BINARY, 0);
- }
- if ((oret && !fstat_by_handle (&st))
- || !fstat_by_name (&st))
- {
- aclbufp[0].a_type = USER_OBJ;
- aclbufp[0].a_id = st.st_uid;
- aclbufp[0].a_perm = (st.st_mode & S_IRWXU) >> 6;
- aclbufp[1].a_type = GROUP_OBJ;
- aclbufp[1].a_id = st.st_gid;
- aclbufp[1].a_perm = (st.st_mode & S_IRWXG) >> 3;
- aclbufp[2].a_type = OTHER_OBJ;
- aclbufp[2].a_id = ILLEGAL_GID;
- aclbufp[2].a_perm = st.st_mode & S_IRWXO;
- aclbufp[3].a_type = CLASS_OBJ;
- aclbufp[3].a_id = ILLEGAL_GID;
- aclbufp[3].a_perm = S_IRWXU | S_IRWXG | S_IRWXO;
- res = MIN_ACL_ENTRIES;
- }
- }
- break;
- case GETACLCNT:
- res = MIN_ACL_ENTRIES;
- break;
- default:
- set_errno (EINVAL);
- break;
- }
- }
- else
- {
- if (!get_handle ())
- {
- query_open (cmd == SETACL ? query_write_control : query_read_control);
- if (!(oret = open (O_BINARY, 0)))
- {
- if (cmd == GETACL || cmd == GETACLCNT)
- goto cant_access_acl;
- return -1;
- }
- }
- switch (cmd)
- {
- case SETACL:
- if (!aclsort32 (nentries, 0, aclbufp))
- {
- bool rw = false;
- res = setacl (get_handle (), pc, nentries, aclbufp, rw);
- if (rw)
- {
- IO_STATUS_BLOCK io;
- FILE_BASIC_INFORMATION fbi;
- fbi.CreationTime.QuadPart
- = fbi.LastAccessTime.QuadPart
- = fbi.LastWriteTime.QuadPart
- = fbi.ChangeTime.QuadPart = 0LL;
- fbi.FileAttributes = (pc.file_attributes ()
- & ~FILE_ATTRIBUTE_READONLY)
- ?: FILE_ATTRIBUTE_NORMAL;
- NtSetInformationFile (get_handle (), &io, &fbi, sizeof fbi,
- FileBasicInformation);
- }
- }
- break;
- case GETACL:
- if (!aclbufp)
- set_errno(EFAULT);
- else
- res = getacl (get_handle (), pc, nentries, aclbufp);
- break;
- case GETACLCNT:
- res = getacl (get_handle (), pc, 0, NULL);
- break;
- default:
- set_errno (EINVAL);
- break;
- }
- }
-
- if (oret)
- close_fs ();
-
- return res;
-}
-
-ssize_t
-fhandler_disk_file::fgetxattr (const char *name, void *value, size_t size)
-{
- if (pc.is_fs_special ())
- {
- set_errno (ENOTSUP);
- return -1;
- }
- return read_ea (get_handle (), pc, name, (char *) value, size);
-}
-
-int
-fhandler_disk_file::fsetxattr (const char *name, const void *value, size_t size,
- int flags)
-{
- if (pc.is_fs_special ())
- {
- set_errno (ENOTSUP);
- return -1;
- }
- return write_ea (get_handle (), pc, name, (const char *) value, size, flags);
-}
-
-int
-fhandler_disk_file::fadvise (_off64_t offset, _off64_t length, int advice)
-{
- if (advice < POSIX_FADV_NORMAL || advice > POSIX_FADV_NOREUSE)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- /* Windows only supports advice flags for the whole file. We're using
- a simplified test here so that we don't have to ask for the actual
- file size. Length == 0 means all bytes starting at offset anyway.
- So we only actually follow the advice, if it's given for offset == 0. */
- if (offset != 0)
- return 0;
-
- /* We only support normal and sequential mode for now. Everything which
- is not POSIX_FADV_SEQUENTIAL is treated like POSIX_FADV_NORMAL. */
- if (advice != POSIX_FADV_SEQUENTIAL)
- advice = POSIX_FADV_NORMAL;
-
- IO_STATUS_BLOCK io;
- FILE_MODE_INFORMATION fmi;
- NTSTATUS status = NtQueryInformationFile (get_handle (), &io,
- &fmi, sizeof fmi,
- FileModeInformation);
- if (!NT_SUCCESS (status))
- __seterrno_from_nt_status (status);
- else
- {
- fmi.Mode &= ~FILE_SEQUENTIAL_ONLY;
- if (advice == POSIX_FADV_SEQUENTIAL)
- fmi.Mode |= FILE_SEQUENTIAL_ONLY;
- status = NtSetInformationFile (get_handle (), &io, &fmi, sizeof fmi,
- FileModeInformation);
- if (NT_SUCCESS (status))
- return 0;
- __seterrno_from_nt_status (status);
- }
-
- return -1;
-}
-
-int
-fhandler_disk_file::ftruncate (_off64_t length, bool allow_truncate)
-{
- int res = -1;
-
- if (length < 0 || !get_handle ())
- set_errno (EINVAL);
- else if (pc.isdir ())
- set_errno (EISDIR);
- else if (!(get_access () & GENERIC_WRITE))
- set_errno (EBADF);
- else
- {
- NTSTATUS status;
- IO_STATUS_BLOCK io;
- FILE_STANDARD_INFORMATION fsi;
- FILE_END_OF_FILE_INFORMATION feofi;
-
- status = NtQueryInformationFile (get_handle (), &io, &fsi, sizeof fsi,
- FileStandardInformation);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- return -1;
- }
-
- /* If called through posix_fallocate, silently succeed if length
- is less than the file's actual length. */
- if (!allow_truncate && length < fsi.EndOfFile.QuadPart)
- return 0;
-
- feofi.EndOfFile.QuadPart = length;
- /* Create sparse files only when called through ftruncate, not when
- called through posix_fallocate. */
- if (allow_truncate
- && (pc.fs_flags () & FILE_SUPPORTS_SPARSE_FILES)
- && length >= fsi.EndOfFile.QuadPart + (128 * 1024))
- {
- status = NtFsControlFile (get_handle (), NULL, NULL, NULL, &io,
- FSCTL_SET_SPARSE, NULL, 0, NULL, 0);
- syscall_printf ("%p = NtFsControlFile(%S, FSCTL_SET_SPARSE)",
- status, pc.get_nt_native_path ());
- }
- status = NtSetInformationFile (get_handle (), &io,
- &feofi, sizeof feofi,
- FileEndOfFileInformation);
- if (!NT_SUCCESS (status))
- __seterrno_from_nt_status (status);
- else
- res = 0;
- }
- return res;
-}
-
-int
-fhandler_disk_file::link (const char *newpath)
-{
- path_conv newpc (newpath, PC_SYM_NOFOLLOW | PC_POSIX, stat_suffixes);
- if (newpc.error)
- {
- set_errno (newpc.error);
- return -1;
- }
-
- if (newpc.exists ())
- {
- syscall_printf ("file '%S' exists?", newpc.get_nt_native_path ());
- set_errno (EEXIST);
- return -1;
- }
-
- char new_buf[strlen (newpath) + 5];
- if (!newpc.error)
- {
- if (pc.is_lnk_special ())
- {
- /* Shortcut hack. */
- stpcpy (stpcpy (new_buf, newpath), ".lnk");
- newpath = new_buf;
- newpc.check (newpath, PC_SYM_NOFOLLOW);
- }
- else if (!pc.isdir ()
- && pc.is_binary ()
- && !RtlEqualUnicodePathSuffix (newpc.get_nt_native_path (),
- L".exe", TRUE))
- {
- /* Executable hack. */
- stpcpy (stpcpy (new_buf, newpath), ".exe");
- newpath = new_buf;
- newpc.check (newpath, PC_SYM_NOFOLLOW);
- }
- }
-
- HANDLE fh;
- NTSTATUS status;
- OBJECT_ATTRIBUTES attr;
- IO_STATUS_BLOCK io;
- status = NtOpenFile (&fh, READ_CONTROL,
- pc.get_object_attr (attr, sec_none_nih), &io,
- FILE_SHARE_VALID_FLAGS,
- FILE_OPEN_FOR_BACKUP_INTENT | FILE_OPEN_REPARSE_POINT);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- return -1;
- }
- PUNICODE_STRING tgt = newpc.get_nt_native_path ();
- ULONG size = sizeof (FILE_LINK_INFORMATION) + tgt->Length;
- PFILE_LINK_INFORMATION pfli = (PFILE_LINK_INFORMATION) alloca (size);
- pfli->ReplaceIfExists = FALSE;
- pfli->RootDirectory = NULL;
- memcpy (pfli->FileName, tgt->Buffer, pfli->FileNameLength = tgt->Length);
- status = NtSetInformationFile (fh, &io, pfli, size, FileLinkInformation);
- NtClose (fh);
- if (!NT_SUCCESS (status))
- {
- if (status == STATUS_INVALID_DEVICE_REQUEST)
- {
- /* FS doesn't support hard links. Try to copy file. */
- WCHAR pcw[(pc.get_nt_native_path ()->Length / sizeof (WCHAR)) + 1];
- WCHAR newpcw[(newpc.get_nt_native_path ()->Length / sizeof (WCHAR))
- + 1];
- if (!CopyFileW (pc.get_wide_win32_path (pcw),
- newpc.get_wide_win32_path (newpcw), TRUE))
- {
- __seterrno ();
- return -1;
- }
- SetFileAttributesW (newpcw, pc.file_attributes ());
- }
- else
- {
- __seterrno_from_nt_status (status);
- return -1;
- }
- }
- return 0;
-}
-
-int
-fhandler_disk_file::utimens (const struct timespec *tvp)
-{
- return utimens_fs (tvp);
-}
-
-int
-fhandler_base::utimens_fs (const struct timespec *tvp)
-{
- LARGE_INTEGER lastaccess, lastwrite;
- struct timespec timeofday;
- struct timespec tmp[2];
- bool closeit = false;
-
- if (!get_handle ())
- {
- query_open (query_write_attributes);
- if (!open_fs (O_BINARY, 0))
- {
- /* It's documented in MSDN that FILE_WRITE_ATTRIBUTES is sufficient
- to change the timestamps. Unfortunately it's not sufficient for a
- remote HPFS which requires GENERIC_WRITE, so we just retry to open
- for writing, though this fails for R/O files of course. */
- query_open (no_query);
- if (!open_fs (O_WRONLY | O_BINARY, 0))
- {
- syscall_printf ("Opening file failed");
- return -1;
- }
- }
- closeit = true;
- }
-
- gettimeofday (reinterpret_cast<struct timeval *> (&timeofday), 0);
- timeofday.tv_nsec *= 1000;
- if (!tvp)
- tmp[1] = tmp[0] = timeofday;
- else
- {
- if ((tvp[0].tv_nsec < UTIME_NOW || tvp[0].tv_nsec > 999999999L)
- || (tvp[1].tv_nsec < UTIME_NOW || tvp[1].tv_nsec > 999999999L))
- {
- set_errno (EINVAL);
- return -1;
- }
- tmp[0] = (tvp[0].tv_nsec == UTIME_NOW) ? timeofday : tvp[0];
- tmp[1] = (tvp[1].tv_nsec == UTIME_NOW) ? timeofday : tvp[1];
- }
- /* UTIME_OMIT is handled in timespec_to_filetime by setting FILETIME to 0. */
- timespec_to_filetime (&tmp[0], (FILETIME *) &lastaccess);
- timespec_to_filetime (&tmp[1], (FILETIME *) &lastwrite);
- debug_printf ("incoming lastaccess %08x %08x", tmp[0].tv_sec, tmp[0].tv_nsec);
-
- IO_STATUS_BLOCK io;
- FILE_BASIC_INFORMATION fbi;
- fbi.CreationTime.QuadPart = 0LL;
- fbi.LastAccessTime = lastaccess;
- fbi.LastWriteTime = lastwrite;
- fbi.ChangeTime.QuadPart = 0LL;
- fbi.FileAttributes = 0;
- NTSTATUS status = NtSetInformationFile (get_handle (), &io, &fbi, sizeof fbi,
- FileBasicInformation);
- if (closeit)
- close_fs ();
- /* Opening a directory on a 9x share from a NT machine works(!), but
- then NtSetInformationFile fails with STATUS_NOT_SUPPORTED. Oh well... */
- if (!NT_SUCCESS (status) && status != STATUS_NOT_SUPPORTED)
- {
- __seterrno_from_nt_status (status);
- return -1;
- }
- return 0;
-}
-
-fhandler_disk_file::fhandler_disk_file () :
- fhandler_base ()
-{
-}
-
-fhandler_disk_file::fhandler_disk_file (path_conv &pc) :
- fhandler_base ()
-{
- set_name (pc);
-}
-
-int
-fhandler_disk_file::open (int flags, mode_t mode)
-{
- return open_fs (flags, mode);
-}
-
-int
-fhandler_base::open_fs (int flags, mode_t mode)
-{
- /* Unfortunately NT allows to open directories for writing, but that's
- disallowed according to SUSv3. */
- if (pc.isdir () && (flags & O_ACCMODE) != O_RDONLY)
- {
- set_errno (EISDIR);
- return 0;
- }
-
- int res = fhandler_base::open (flags | O_DIROPEN, mode);
- if (!res)
- goto out;
-
- /* This is for file systems known for having a buggy CreateFile call
- which might return a valid HANDLE without having actually opened
- the file.
- The only known file system to date is the SUN NFS Solstice Client 3.1
- which returns a valid handle when trying to open a file in a nonexistent
- directory. */
- if (pc.has_buggy_open () && !pc.exists ())
- {
- debug_printf ("Buggy open detected.");
- close_fs ();
- set_errno (ENOENT);
- return 0;
- }
-
- if (pc.hasgood_inode ())
- ino = get_ino_by_handle (get_handle ());
- /* A unique ID is necessary to recognize fhandler entries which are
- duplicated by dup(2) or fork(2). */
- AllocateLocallyUniqueId ((PLUID) &unique_id);
-
-out:
- syscall_printf ("%d = fhandler_disk_file::open (%S, %p)", res,
- pc.get_nt_native_path (), flags);
- return res;
-}
-
-ssize_t __stdcall
-fhandler_disk_file::pread (void *buf, size_t count, _off64_t offset)
-{
- ssize_t res;
- _off64_t curpos = lseek (0, SEEK_CUR);
- if (curpos < 0 || lseek (offset, SEEK_SET) < 0)
- res = -1;
- else
- {
- size_t tmp_count = count;
- read (buf, tmp_count);
- if (lseek (curpos, SEEK_SET) >= 0)
- res = (ssize_t) tmp_count;
- else
- res = -1;
- }
- debug_printf ("%d = pread (%p, %d, %d)\n", res, buf, count, offset);
- return res;
-}
-
-ssize_t __stdcall
-fhandler_disk_file::pwrite (void *buf, size_t count, _off64_t offset)
-{
- int res;
- _off64_t curpos = lseek (0, SEEK_CUR);
- if (curpos < 0 || lseek (offset, SEEK_SET) < 0)
- res = curpos;
- else
- {
- res = (ssize_t) write (buf, count);
- if (lseek (curpos, SEEK_SET) < 0)
- res = -1;
- }
- debug_printf ("%d = pwrite (%p, %d, %d)\n", res, buf, count, offset);
- return res;
-}
-
-int
-fhandler_disk_file::mkdir (mode_t mode)
-{
- int res = -1;
- SECURITY_ATTRIBUTES sa = sec_none_nih;
- security_descriptor sd;
-
- /* See comments in fhander_base::open () for an explanation why we defer
- setting security attributes on remote files. */
- if (has_acls () && !pc.isremote ())
- set_security_attribute (pc, S_IFDIR | ((mode & 07777) & ~cygheap->umask),
- &sa, sd);
-
- NTSTATUS status;
- HANDLE dir;
- OBJECT_ATTRIBUTES attr;
- IO_STATUS_BLOCK io;
- PFILE_FULL_EA_INFORMATION p = NULL;
- ULONG plen = 0;
-
- if (pc.fs_is_nfs ())
- {
- /* When creating a dir on an NFS share, we have to set the
- file mode by writing a NFS fattr3 structure with the
- correct mode bits set. */
- plen = sizeof (FILE_FULL_EA_INFORMATION) + sizeof (NFS_V3_ATTR)
- + sizeof (fattr3);
- p = (PFILE_FULL_EA_INFORMATION) alloca (plen);
- p->NextEntryOffset = 0;
- p->Flags = 0;
- p->EaNameLength = sizeof (NFS_V3_ATTR) - 1;
- p->EaValueLength = sizeof (fattr3);
- strcpy (p->EaName, NFS_V3_ATTR);
- fattr3 *nfs_attr = (fattr3 *) (p->EaName + p->EaNameLength + 1);
- memset (nfs_attr, 0, sizeof (fattr3));
- nfs_attr->type = NF3DIR;
- nfs_attr->mode = (mode & 07777) & ~cygheap->umask;
- }
- status = NtCreateFile (&dir, FILE_LIST_DIRECTORY | SYNCHRONIZE,
- pc.get_object_attr (attr, sa), &io, NULL,
- FILE_ATTRIBUTE_DIRECTORY, FILE_SHARE_VALID_FLAGS,
- FILE_CREATE,
- FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT
- | FILE_OPEN_FOR_BACKUP_INTENT,
- p, plen);
- if (NT_SUCCESS (status))
- {
- if (has_acls () && pc.isremote ())
- set_file_attribute (dir, pc, ILLEGAL_UID, ILLEGAL_GID,
- S_IFDIR | ((mode & 07777) & ~cygheap->umask));
- NtClose (dir);
- res = 0;
- }
- else
- __seterrno_from_nt_status (status);
-
- return res;
-}
-
-int
-fhandler_disk_file::rmdir ()
-{
- extern NTSTATUS unlink_nt (path_conv &pc);
-
- if (!pc.isdir ())
- {
- set_errno (ENOTDIR);
- return -1;
- }
- if (!pc.exists ())
- {
- set_errno (ENOENT);
- return -1;
- }
-
- NTSTATUS status = unlink_nt (pc);
-
- /* Check for existence of remote dirs after trying to delete them.
- Two reasons:
- - Sometimes SMB indicates failure when it really succeeds.
- - Removeing a directory on a samba drive doesn't return an error if the
- directory can't be removed because it's not empty. */
- if (isremote ())
- {
- OBJECT_ATTRIBUTES attr;
- FILE_BASIC_INFORMATION fbi;
-
- if (NT_SUCCESS (NtQueryAttributesFile
- (pc.get_object_attr (attr, sec_none_nih), &fbi)))
- status = STATUS_DIRECTORY_NOT_EMPTY;
- else
- status = STATUS_SUCCESS;
- }
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- return -1;
- }
- return 0;
-}
-
-/* This is the minimal number of entries which fit into the readdir cache.
- The number of bytes allocated by the cache is determined by this number,
- To tune caching, just tweak this number. To get a feeling for the size,
- the size of the readdir cache is DIR_NUM_ENTRIES * 624 + 4 bytes. */
-
-#define DIR_NUM_ENTRIES 100 /* Cache size 62404 bytes */
-
-#define DIR_BUF_SIZE (DIR_NUM_ENTRIES \
- * (sizeof (FILE_ID_BOTH_DIR_INFORMATION) \
- + (NAME_MAX + 1) * sizeof (WCHAR)))
-
-struct __DIR_cache
-{
- char __cache[DIR_BUF_SIZE]; /* W2K needs this buffer 8 byte aligned. */
- ULONG __pos;
-};
-
-#define d_cachepos(d) (((__DIR_cache *) (d)->__d_dirname)->__pos)
-#define d_cache(d) (((__DIR_cache *) (d)->__d_dirname)->__cache)
-
-#define d_mounts(d) ((__DIR_mounts *) (d)->__d_internal)
-
-DIR *
-fhandler_disk_file::opendir (int fd)
-{
- DIR *dir;
- DIR *res = NULL;
-
- if (!pc.isdir ())
- set_errno (ENOTDIR);
- else if ((dir = (DIR *) malloc (sizeof (DIR))) == NULL)
- set_errno (ENOMEM);
- else if ((dir->__d_dirname = (char *) malloc ( sizeof (struct __DIR_cache)))
- == NULL)
- {
- set_errno (ENOMEM);
- goto free_dir;
- }
- else if ((dir->__d_dirent =
- (struct dirent *) malloc (sizeof (struct dirent))) == NULL)
- {
- set_errno (ENOMEM);
- goto free_dirname;
- }
- else
- {
- cygheap_fdnew cfd;
- if (cfd < 0 && fd < 0)
- goto free_dirent;
-
- dir->__d_dirent->__d_version = __DIRENT_VERSION;
- dir->__d_cookie = __DIRENT_COOKIE;
- dir->__handle = INVALID_HANDLE_VALUE;
- dir->__d_position = 0;
- dir->__flags = (get_name ()[0] == '/' && get_name ()[1] == '\0')
- ? dirent_isroot : 0;
- dir->__d_internal = (unsigned) new __DIR_mounts (get_name ());
- d_cachepos (dir) = 0;
-
- if (!pc.iscygdrive ())
- {
- if (fd < 0)
- {
- /* opendir() case. Initialize with given directory name and
- NULL directory handle. */
- OBJECT_ATTRIBUTES attr;
- NTSTATUS status;
- IO_STATUS_BLOCK io;
-
- status = NtOpenFile (&get_handle (),
- SYNCHRONIZE | FILE_LIST_DIRECTORY,
- pc.get_object_attr (attr, sec_none_nih),
- &io, FILE_SHARE_VALID_FLAGS,
- FILE_SYNCHRONOUS_IO_NONALERT
- | FILE_OPEN_FOR_BACKUP_INTENT
- | FILE_DIRECTORY_FILE);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- goto free_mounts;
- }
- }
-
- /* FileIdBothDirectoryInformation is apparently unsupported on
- XP when accessing directories on UDF. When trying to use it
- so, NtQueryDirectoryFile returns with STATUS_ACCESS_VIOLATION.
- It's not clear if the call isn't also unsupported on other
- OS/FS combinations (say, Win2K/CDFS or so). Instead of
- testing in readdir for yet another error code, let's use
- FileIdBothDirectoryInformation only on filesystems supporting
- persistent ACLs, FileDirectoryInformation otherwise.
-
- NFS clients hide dangling symlinks from directory queries,
- unless you use the FileNamesInformation info class.
- On newer NFS clients (>=Vista) FileIdBothDirectoryInformation
- works fine, but only if the NFS share is mounted to a drive
- letter. TODO: We don't test that here for now, but it might
- be worth to test if there's a speed gain in using
- FileIdBothDirectoryInformation, because it doesn't require to
- open the file to read the inode number. */
- if (pc.hasgood_inode ())
- {
- dir->__flags |= dirent_set_d_ino;
- if (pc.fs_is_nfs ())
- dir->__flags |= dirent_nfs_d_ino;
- else if (wincap.has_fileid_dirinfo ()
- && !pc.has_buggy_fileid_dirinfo ())
- dir->__flags |= dirent_get_d_ino;
- }
- }
- if (fd >= 0)
- dir->__d_fd = fd;
- else
- {
- /* Filling cfd with `this' (aka storing this in the file
- descriptor table should only happen after it's clear that
- opendir doesn't fail, otherwise we end up cfree'ing the
- fhandler twice, once in opendir() in dir.cc, the second
- time on exit. Nasty, nasty... */
- cfd = this;
- dir->__d_fd = cfd;
- if (pc.iscygdrive ())
- cfd->nohandle (true);
- }
- set_close_on_exec (true);
- dir->__fh = this;
- res = dir;
- }
-
- syscall_printf ("%p = opendir (%s)", res, get_name ());
- return res;
-
-free_mounts:
- delete d_mounts (dir);
-free_dirent:
- free (dir->__d_dirent);
-free_dirname:
- free (dir->__d_dirname);
-free_dir:
- free (dir);
- return res;
-}
-
-__ino64_t __stdcall
-readdir_get_ino (const char *path, bool dot_dot)
-{
- char *fname;
- struct __stat64 st;
- HANDLE hdl;
- OBJECT_ATTRIBUTES attr;
- IO_STATUS_BLOCK io;
- __ino64_t ino = 0;
-
- if (dot_dot)
- {
- fname = (char *) alloca (strlen (path) + 4);
- char *c = stpcpy (fname, path);
- if (c[-1] != '/')
- *c++ = '/';
- strcpy (c, "..");
- path = fname;
- }
- path_conv pc (path, PC_SYM_NOFOLLOW | PC_POSIX | PC_NOWARN);
- if (pc.isspecial ())
- {
- if (!stat_worker (pc, &st))
- ino = st.st_ino;
- }
- else if (!pc.hasgood_inode ())
- ino = hash_path_name (0, pc.get_nt_native_path ());
- else if (NT_SUCCESS (NtOpenFile (&hdl, READ_CONTROL,
- pc.get_object_attr (attr, sec_none_nih),
- &io, FILE_SHARE_VALID_FLAGS,
- FILE_OPEN_FOR_BACKUP_INTENT
- | (pc.is_rep_symlink ()
- ? FILE_OPEN_REPARSE_POINT : 0))))
- {
- ino = get_ino_by_handle (hdl);
- NtClose (hdl);
- }
- return ino;
-}
-
-int
-fhandler_disk_file::readdir_helper (DIR *dir, dirent *de, DWORD w32_err,
- DWORD attr, PUNICODE_STRING fname)
-{
- if (w32_err)
- {
- bool added = false;
- if ((de->d_ino = d_mounts (dir)->check_missing_mount (fname)))
- added = true;
- if (!added)
- return geterrno_from_win_error (w32_err);
-
- attr = 0;
- dir->__flags &= ~dirent_set_d_ino;
- }
-
- /* Set d_type if type can be determined from file attributes.
- FILE_ATTRIBUTE_SYSTEM ommitted to leave DT_UNKNOWN for old symlinks.
- For new symlinks, d_type will be reset to DT_UNKNOWN below. */
- if (attr &&
- !(attr & ( ~FILE_ATTRIBUTE_VALID_FLAGS
- | FILE_ATTRIBUTE_SYSTEM
- | FILE_ATTRIBUTE_REPARSE_POINT)))
- {
- if (attr & FILE_ATTRIBUTE_DIRECTORY)
- de->d_type = DT_DIR;
- else
- de->d_type = DT_REG;
- }
-
- /* Check for directory reparse point. These are potential volume mount
- points which have another inode than the underlying directory. */
- if ((attr & (FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_REPARSE_POINT))
- == (FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_REPARSE_POINT))
- {
- HANDLE reph;
- OBJECT_ATTRIBUTES attr;
- IO_STATUS_BLOCK io;
-
- InitializeObjectAttributes (&attr, fname, pc.objcaseinsensitive (),
- get_handle (), NULL);
- if (is_volume_mountpoint (&attr)
- && (NT_SUCCESS (NtOpenFile (&reph, READ_CONTROL, &attr, &io,
- FILE_SHARE_VALID_FLAGS,
- FILE_OPEN_FOR_BACKUP_INTENT))))
- {
- de->d_ino = get_ino_by_handle (reph);
- NtClose (reph);
- }
- }
-
- /* Check for Windows shortcut. If it's a Cygwin or U/WIN
- symlink, drop the .lnk suffix. */
- if ((attr & FILE_ATTRIBUTE_READONLY) && fname->Length > 4 * sizeof (WCHAR))
- {
- UNICODE_STRING uname;
- UNICODE_STRING lname;
-
- RtlInitCountedUnicodeString (&uname,
- fname->Buffer
- + fname->Length / sizeof (WCHAR) - 4,
- 4 * sizeof (WCHAR));
- RtlInitUnicodeString (&lname, (PWCHAR) L".lnk");
- if (RtlEqualUnicodeString (&uname, &lname, TRUE))
- {
- tmp_pathbuf tp;
- UNICODE_STRING fbuf;
-
- tp.u_get (&fbuf);
- RtlCopyUnicodeString (&fbuf, pc.get_nt_native_path ());
- RtlAppendUnicodeToString (&fbuf, L"\\");
- RtlAppendUnicodeStringToString (&fbuf, fname);
- fbuf.Buffer += 4; /* Skip leading \??\ */
- fbuf.Length -= 4 * sizeof (WCHAR);
- if (fbuf.Buffer[1] != L':') /* UNC path */
- {
- *(fbuf.Buffer += 2) = L'\\';
- fbuf.Length -= 2 * sizeof (WCHAR);
- }
- path_conv fpath (&fbuf, PC_SYM_NOFOLLOW);
- if (fpath.issymlink () || fpath.is_fs_special ())
- {
- fname->Length -= 4 * sizeof (WCHAR);
- de->d_type = DT_UNKNOWN;
- }
- }
- }
-
- sys_wcstombs (de->d_name, NAME_MAX + 1, fname->Buffer,
- fname->Length / sizeof (WCHAR));
-
- if (dir->__d_position == 0 && !strcmp (de->d_name, "."))
- dir->__flags |= dirent_saw_dot;
- else if (dir->__d_position == 1 && !strcmp (de->d_name, ".."))
- dir->__flags |= dirent_saw_dot_dot;
- return 0;
-}
-
-int
-fhandler_disk_file::readdir (DIR *dir, dirent *de)
-{
- int res = 0;
- NTSTATUS status = STATUS_SUCCESS;
- PFILE_ID_BOTH_DIR_INFORMATION buf = NULL;
- PWCHAR FileName;
- ULONG FileNameLength;
- ULONG FileAttributes = 0;
- IO_STATUS_BLOCK io;
- UNICODE_STRING fname;
-
- /* d_cachepos always refers to the next cache entry to use. If it's 0
- we must reload the cache. */
- if (d_cachepos (dir) == 0)
- {
- if ((dir->__flags & dirent_get_d_ino))
- {
- status = NtQueryDirectoryFile (get_handle (), NULL, NULL, NULL, &io,
- d_cache (dir), DIR_BUF_SIZE,
- FileIdBothDirectoryInformation,
- FALSE, NULL, dir->__d_position == 0);
- /* FileIdBothDirectoryInformation isn't supported for remote drives
- on NT4 and 2K systems, and it's also not supported on 2K at all,
- when accessing network drives on any remote OS. We just fall
- back to using a standard directory query in this case and note
- this case using the dirent_get_d_ino flag. */
- if (status == STATUS_INVALID_LEVEL
- || status == STATUS_INVALID_PARAMETER
- || status == STATUS_INVALID_INFO_CLASS)
- dir->__flags &= ~dirent_get_d_ino;
- /* Something weird happens on Samba up to version 3.0.21c, which is
- fixed in 3.0.22. FileIdBothDirectoryInformation seems to work
- nicely, but only up to the 128th entry in the directory. After
- reaching this entry, the next call to NtQueryDirectoryFile
- (FileIdBothDirectoryInformation) returns STATUS_INVALID_LEVEL.
- Why should we care, we can just switch to FileDirectoryInformation,
- isn't it? Nope! The next call to
- NtQueryDirectoryFile(FileDirectoryInformation)
- actually returns STATUS_NO_MORE_FILES, regardless how many files
- are left unread in the directory. This does not happen when using
- FileDirectoryInformation right from the start, but since
- we can't decide whether the server we're talking with has this
- bug or not, we end up serving Samba shares always in the slow
- mode using FileDirectoryInformation. So, what we do here is
- to implement the solution suggested by Andrew Tridgell, we just
- reread all entries up to dir->d_position using
- FileDirectoryInformation.
- However, We do *not* mark this server as broken and fall back to
- using FileDirectoryInformation further on. This would slow
- down every access to such a server, even for directories under
- 128 entries. Also, bigger dirs only suffer from one additional
- call per full directory scan, which shouldn't be too big a hit.
- This can easily be changed if necessary. */
- if (status == STATUS_INVALID_LEVEL && dir->__d_position)
- {
- d_cachepos (dir) = 0;
- for (int cnt = 0; cnt < dir->__d_position; ++cnt)
- {
- if (d_cachepos (dir) == 0)
- {
- status = NtQueryDirectoryFile (get_handle (), NULL, NULL,
- NULL, &io, d_cache (dir),
- DIR_BUF_SIZE,
- FileDirectoryInformation,
- FALSE, NULL, cnt == 0);
- if (!NT_SUCCESS (status))
- goto go_ahead;
- }
- buf = (PFILE_ID_BOTH_DIR_INFORMATION) (d_cache (dir)
- + d_cachepos (dir));
- if (buf->NextEntryOffset == 0)
- d_cachepos (dir) = 0;
- else
- d_cachepos (dir) += buf->NextEntryOffset;
- }
- goto go_ahead;
- }
- }
- if (!(dir->__flags & dirent_get_d_ino))
- status = NtQueryDirectoryFile (get_handle (), NULL, NULL, NULL, &io,
- d_cache (dir), DIR_BUF_SIZE,
- (dir->__flags & dirent_nfs_d_ino)
- ? FileNamesInformation
- : FileDirectoryInformation,
- FALSE, NULL, dir->__d_position == 0);
- }
-
-go_ahead:
-
- if (status == STATUS_NO_MORE_FILES)
- /*nothing*/;
- else if (!NT_SUCCESS (status))
- debug_printf ("NtQueryDirectoryFile failed, status %p, win32 error %lu",
- status, RtlNtStatusToDosError (status));
- else
- {
- buf = (PFILE_ID_BOTH_DIR_INFORMATION) (d_cache (dir) + d_cachepos (dir));
- if (buf->NextEntryOffset == 0)
- d_cachepos (dir) = 0;
- else
- d_cachepos (dir) += buf->NextEntryOffset;
- if ((dir->__flags & dirent_get_d_ino))
- {
- FileName = buf->FileName;
- FileNameLength = buf->FileNameLength;
- FileAttributes = buf->FileAttributes;
- if ((dir->__flags & dirent_set_d_ino))
- de->d_ino = buf->FileId.QuadPart;
- }
- else if ((dir->__flags & dirent_nfs_d_ino))
- {
- FileName = ((PFILE_NAMES_INFORMATION) buf)->FileName;
- FileNameLength = ((PFILE_NAMES_INFORMATION) buf)->FileNameLength;
- }
- else
- {
- FileName = ((PFILE_DIRECTORY_INFORMATION) buf)->FileName;
- FileNameLength = ((PFILE_DIRECTORY_INFORMATION) buf)->FileNameLength;
- FileAttributes = ((PFILE_DIRECTORY_INFORMATION) buf)->FileAttributes;
- }
- RtlInitCountedUnicodeString (&fname, FileName, FileNameLength);
- de->d_ino = d_mounts (dir)->check_mount (&fname, de->d_ino);
- if (de->d_ino == 0 && (dir->__flags & dirent_set_d_ino))
- {
- OBJECT_ATTRIBUTES attr;
-
- if (dir->__d_position == 0 && FileNameLength == 2
- && FileName[0] == '.')
- de->d_ino = get_ino_by_handle (get_handle ());
- else if (dir->__d_position == 1 && FileNameLength == 4
- && FileName[0] == L'.' && FileName[1] == L'.')
- if (!(dir->__flags & dirent_isroot))
- de->d_ino = readdir_get_ino (get_name (), true);
- else
- de->d_ino = get_ino_by_handle (get_handle ());
- else
- {
- HANDLE hdl;
-
- InitializeObjectAttributes (&attr, &fname,
- pc.objcaseinsensitive (),
- get_handle (), NULL);
- if (NT_SUCCESS (NtOpenFile (&hdl, READ_CONTROL, &attr, &io,
- FILE_SHARE_VALID_FLAGS,
- FILE_OPEN_FOR_BACKUP_INTENT)))
- {
- de->d_ino = get_ino_by_handle (hdl);
- NtClose (hdl);
- }
- }
- /* Enforce namehash as inode number on untrusted file systems. */
- if (!pc.isgood_inode (de->d_ino))
- {
- dir->__flags &= ~dirent_set_d_ino;
- de->d_ino = 0;
- }
- }
- }
-
- if (!(res = readdir_helper (dir, de, RtlNtStatusToDosError (status),
- buf ? FileAttributes : 0, &fname)))
- dir->__d_position++;
- else if (!(dir->__flags & dirent_saw_dot))
- {
- strcpy (de->d_name , ".");
- de->d_ino = get_ino_by_handle (get_handle ());
- dir->__d_position++;
- dir->__flags |= dirent_saw_dot;
- res = 0;
- }
- else if (!(dir->__flags & dirent_saw_dot_dot))
- {
- strcpy (de->d_name , "..");
- if (!(dir->__flags & dirent_isroot))
- de->d_ino = readdir_get_ino (get_name (), true);
- else
- de->d_ino = get_ino_by_handle (get_handle ());
- dir->__d_position++;
- dir->__flags |= dirent_saw_dot_dot;
- res = 0;
- }
-
- syscall_printf ("%d = readdir (%p, %p) (%s)", res, dir, &de, res ? "***" : de->d_name);
- return res;
-}
-
-_off64_t
-fhandler_disk_file::telldir (DIR *dir)
-{
- return dir->__d_position;
-}
-
-void
-fhandler_disk_file::seekdir (DIR *dir, _off64_t loc)
-{
- rewinddir (dir);
- while (loc > dir->__d_position)
- if (!::readdir (dir))
- break;
-}
-
-void
-fhandler_disk_file::rewinddir (DIR *dir)
-{
- d_cachepos (dir) = 0;
- if (wincap.has_buggy_restart_scan () && isremote ())
- {
- /* This works around a W2K bug. The RestartScan parameter in calls
- to NtQueryDirectoryFile on remote shares is ignored, thus
- resulting in not being able to rewind on remote shares. By
- reopening the directory, we get a fresh new directory pointer. */
- UNICODE_STRING fname;
- OBJECT_ATTRIBUTES attr;
- NTSTATUS status;
- IO_STATUS_BLOCK io;
- HANDLE new_dir;
-
- RtlInitUnicodeString (&fname, L"");
- InitializeObjectAttributes (&attr, &fname, pc.objcaseinsensitive (),
- get_handle (), NULL);
- status = NtOpenFile (&new_dir, SYNCHRONIZE | FILE_LIST_DIRECTORY,
- &attr, &io, FILE_SHARE_VALID_FLAGS,
- FILE_SYNCHRONOUS_IO_NONALERT
- | FILE_OPEN_FOR_BACKUP_INTENT
- | FILE_DIRECTORY_FILE);
- if (!NT_SUCCESS (stat))
- debug_printf ("Unable to reopen dir %s, NT error: %p",
- get_name (), status);
- else
- {
- NtClose (get_handle ());
- set_io_handle (new_dir);
- }
- }
- dir->__d_position = 0;
- d_mounts (dir)->rewind ();
-}
-
-int
-fhandler_disk_file::closedir (DIR *dir)
-{
- int res = 0;
- NTSTATUS status;
-
- delete d_mounts (dir);
- if (!get_handle ())
- /* ignore */;
- else if (get_handle () == INVALID_HANDLE_VALUE)
- {
- set_errno (EBADF);
- res = -1;
- }
- else if (!NT_SUCCESS (status = NtClose (get_handle ())))
- {
- __seterrno_from_nt_status (status);
- res = -1;
- }
- syscall_printf ("%d = closedir (%p, %s)", res, dir, get_name ());
- return res;
-}
-
-fhandler_cygdrive::fhandler_cygdrive () :
- fhandler_disk_file (), ndrives (0), pdrive (NULL)
-{
-}
-
-int
-fhandler_cygdrive::open (int flags, mode_t mode)
-{
- if ((flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
- {
- set_errno (EEXIST);
- return 0;
- }
- if (flags & O_WRONLY)
- {
- set_errno (EISDIR);
- return 0;
- }
- flags |= O_DIROPEN;
- set_flags (flags);
- nohandle (true);
- return 1;
-}
-
-int
-fhandler_cygdrive::close ()
-{
- return 0;
-}
-
-#define DRVSZ sizeof ("x:\\")
-void
-fhandler_cygdrive::set_drives ()
-{
- const int len = 2 + 26 * DRVSZ;
- char *p = const_cast<char *> (get_win32_name ());
- pdrive = p;
- ndrives = GetLogicalDriveStrings (len, p) / DRVSZ;
-}
-
-int
-fhandler_cygdrive::fstat (struct __stat64 *buf)
-{
- fhandler_base::fstat (buf);
- buf->st_ino = 2;
- buf->st_mode = S_IFDIR | S_IXUSR | S_IXGRP | S_IXOTH;
- if (!ndrives)
- set_drives ();
- char flptst[] = "X:";
- int n = ndrives;
- for (const char *p = pdrive; p && *p; p = strchr (p, '\0') + 1)
- if (is_floppy ((flptst[0] = *p, flptst))
- || GetFileAttributes (p) == INVALID_FILE_ATTRIBUTES)
- --n;
- buf->st_nlink = n + 2;
- return 0;
-}
-
-DIR *
-fhandler_cygdrive::opendir (int fd)
-{
- DIR *dir;
-
- dir = fhandler_disk_file::opendir (fd);
- if (dir && !ndrives)
- set_drives ();
-
- return dir;
-}
-
-int
-fhandler_cygdrive::readdir (DIR *dir, dirent *de)
-{
- char flptst[] = "X:";
-
- while (true)
- {
- if (!pdrive || !*pdrive)
- {
- if (!(dir->__flags & dirent_saw_dot))
- {
- de->d_name[0] = '.';
- de->d_name[1] = '\0';
- de->d_ino = 2;
- }
- return ENMFILE;
- }
- if (!is_floppy ((flptst[0] = *pdrive, flptst))
- && GetFileAttributes (pdrive) != INVALID_FILE_ATTRIBUTES)
- break;
- pdrive = strchr (pdrive, '\0') + 1;
- }
- *de->d_name = cyg_tolower (*pdrive);
- de->d_name[1] = '\0';
- user_shared->warned_msdos = true;
- de->d_ino = readdir_get_ino (pdrive, false);
- dir->__d_position++;
- pdrive = strchr (pdrive, '\0') + 1;
- syscall_printf ("%p = readdir (%p) (%s)", &de, dir, de->d_name);
- return 0;
-}
-
-void
-fhandler_cygdrive::rewinddir (DIR *dir)
-{
- pdrive = get_win32_name ();
- dir->__d_position = 0;
-}
-
-int
-fhandler_cygdrive::closedir (DIR *dir)
-{
- pdrive = get_win32_name ();
- return 0;
-}
diff --git a/winsup/cygwin/fhandler_dsp.cc b/winsup/cygwin/fhandler_dsp.cc
deleted file mode 100644
index 1927a9b..0000000
--- a/winsup/cygwin/fhandler_dsp.cc
+++ /dev/null
@@ -1,1374 +0,0 @@
-/* Fhandler_dev_dsp: code to emulate OSS sound model /dev/dsp
-
- Copyright 2001, 2002, 2003, 2004, 2008 Red Hat, Inc
-
- Written by Andy Younger (andy@snoogie.demon.co.uk)
- Extended by Gerd Spalink (Gerd.Spalink@t-online.de)
- to support recording from the audio input
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <sys/soundcard.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-
-/*------------------------------------------------------------------------
- Simple encapsulation of the win32 audio device.
-
- Implementation Notes
- 1. Audio structures are malloced just before the first read or
- write to /dev/dsp. The actual buffer size is determined at that time,
- such that one buffer holds about 125ms of audio data.
- At the time of this writing, 12 buffers are allocated,
- so that up to 1.5 seconds can be buffered within Win32.
- The buffer size can be queried with the ioctl SNDCTL_DSP_GETBLKSIZE,
- but for this implementation only returns meaningful results if
- sampling rate, number of channels and number of bits per sample
- are not changed afterwards.
- The audio structures are freed when the device is reset or closed,
- and they are not passed to exec'ed processes.
- The dev_ member is cleared after a fork. This forces the child
- to reopen the audio device._
-
- 2. Every open call creates a new instance of the handler. After a
- successful open, every subsequent open from the same process
- to the device fails with EBUSY.
- The structures are shared between duped handles, but not with
- children. They only inherit the settings from the parent.
- */
-
-class fhandler_dev_dsp::Audio
-{ // This class contains functionality common to Audio_in and Audio_out
- public:
- Audio ();
- ~Audio ();
-
- class queue;
-
- bool isvalid ();
- void setconvert (int format);
- void convert_none (unsigned char *buffer, int size_bytes) { }
- void convert_U8_S8 (unsigned char *buffer, int size_bytes);
- void convert_S16LE_U16LE (unsigned char *buffer, int size_bytes);
- void convert_S16LE_U16BE (unsigned char *buffer, int size_bytes);
- void convert_S16LE_S16BE (unsigned char *buffer, int size_bytes);
- void fillFormat (WAVEFORMATEX * format,
- int rate, int bits, int channels);
- unsigned blockSize (int rate, int bits, int channels);
- void (fhandler_dev_dsp::Audio::*convert_)
- (unsigned char *buffer, int size_bytes);
-
- enum { MAX_BLOCKS = 12 };
- int bufferIndex_; // offset into pHdr_->lpData
- WAVEHDR *pHdr_; // data to be filled by write
- WAVEHDR wavehdr_[MAX_BLOCKS];
- char *bigwavebuffer_; // audio samples only
- // Member variables below must be locked
- queue *Qisr2app_; // blocks passed from wave callback
-};
-
-class fhandler_dev_dsp::Audio::queue
-{ // non-blocking fixed size queues for buffer management
- public:
- queue (int depth = 4);
- ~queue ();
-
- bool send (WAVEHDR *); // queue an item, returns true if successful
- bool recv (WAVEHDR **); // retrieve an item, returns true if successful
- void reset ();
- int query (); // return number of items queued
- inline void lock () { EnterCriticalSection (&lock_); }
- inline void unlock () { LeaveCriticalSection (&lock_); }
- inline void dellock () { debug_printf ("Deleting Critical Section"); DeleteCriticalSection (&lock_); }
- bool isvalid () { return storage_; }
- private:
- CRITICAL_SECTION lock_;
- int head_;
- int tail_;
- int depth_;
- WAVEHDR **storage_;
-};
-
-static void CALLBACK waveOut_callback (HWAVEOUT hWave, UINT msg, DWORD instance,
- DWORD param1, DWORD param2);
-
-class fhandler_dev_dsp::Audio_out: public Audio
-{
- public:
- void fork_fixup (HANDLE parent);
- bool query (int rate, int bits, int channels);
- bool start ();
- void stop (bool immediately = false);
- bool write (const char *pSampleData, int nBytes);
- void buf_info (audio_buf_info *p, int rate, int bits, int channels);
- void callback_sampledone (WAVEHDR *pHdr);
- bool parsewav (const char *&pData, int &nBytes,
- int rate, int bits, int channels);
-
- private:
- void init (unsigned blockSize);
- void waitforallsent ();
- void waitforspace ();
- bool sendcurrent ();
-
- enum { MAX_BLOCKS = 12 };
- HWAVEOUT dev_; // The wave device
- /* Private copies of audiofreq_, audiobits_, audiochannels_,
- possibly set from wave file */
- int freq_;
- int bits_;
- int channels_;
-};
-
-static void CALLBACK waveIn_callback (HWAVEIN hWave, UINT msg, DWORD instance,
- DWORD param1, DWORD param2);
-
-class fhandler_dev_dsp::Audio_in: public Audio
-{
-public:
- void fork_fixup (HANDLE parent);
- bool query (int rate, int bits, int channels);
- bool start (int rate, int bits, int channels);
- void stop ();
- bool read (char *pSampleData, int &nBytes);
- void buf_info (audio_buf_info *p, int rate, int bits, int channels);
- void callback_blockfull (WAVEHDR *pHdr);
-
-private:
- bool init (unsigned blockSize);
- bool queueblock (WAVEHDR *pHdr);
- void waitfordata (); // blocks until we have a good pHdr_
-
- HWAVEIN dev_;
-};
-
-/* --------------------------------------------------------------------
- Implementation */
-
-// Simple fixed length FIFO queue implementation for audio buffer management
-fhandler_dev_dsp::Audio::queue::queue (int depth)
-{
- // allow space for one extra object in the queue
- // so we can distinguish full and empty status
- depth_ = depth;
- storage_ = new WAVEHDR *[depth_ + 1];
-}
-
-fhandler_dev_dsp::Audio::queue::~queue ()
-{
- delete[] storage_;
-}
-
-void
-fhandler_dev_dsp::Audio::queue::reset ()
- {
- /* When starting, after reset and after fork */
- head_ = tail_ = 0;
- debug_printf ("InitializeCriticalSection");
- memset (&lock_, 0, sizeof (lock_));
- InitializeCriticalSection (&lock_);
- }
-
-bool
-fhandler_dev_dsp::Audio::queue::send (WAVEHDR *x)
-{
- bool res = false;
- lock ();
- if (query () == depth_)
- system_printf ("Queue overflow");
- else
- {
- storage_[tail_] = x;
- if (++tail_ > depth_)
- tail_ = 0;
- res = true;
- }
- unlock ();
- return res;
-}
-
-bool
-fhandler_dev_dsp::Audio::queue::recv (WAVEHDR **x)
-{
- bool res = false;
- lock ();
- if (query () != 0)
- {
- *x = storage_[head_];
- if (++head_ > depth_)
- head_ = 0;
- res = true;
- }
- unlock ();
- return res;
-}
-
-int
-fhandler_dev_dsp::Audio::queue::query ()
-{
- int n = tail_ - head_;
- if (n < 0)
- n += depth_ + 1;
- return n;
-}
-
-// Audio class implements functionality need for both read and write
-fhandler_dev_dsp::Audio::Audio ()
-{
- bigwavebuffer_ = NULL;
- Qisr2app_ = new queue (MAX_BLOCKS);
- convert_ = &fhandler_dev_dsp::Audio::convert_none;
-}
-
-fhandler_dev_dsp::Audio::~Audio ()
-{
- debug_printf("");
- delete Qisr2app_;
- delete[] bigwavebuffer_;
-}
-
-inline bool
-fhandler_dev_dsp::Audio::isvalid ()
-{
- return bigwavebuffer_ && Qisr2app_ && Qisr2app_->isvalid ();
-}
-
-void
-fhandler_dev_dsp::Audio::setconvert (int format)
-{
- switch (format)
- {
- case AFMT_S8:
- convert_ = &fhandler_dev_dsp::Audio::convert_U8_S8;
- debug_printf ("U8_S8");
- break;
- case AFMT_U16_LE:
- convert_ = &fhandler_dev_dsp::Audio::convert_S16LE_U16LE;
- debug_printf ("S16LE_U16LE");
- break;
- case AFMT_U16_BE:
- convert_ = &fhandler_dev_dsp::Audio::convert_S16LE_U16BE;
- debug_printf ("S16LE_U16BE");
- break;
- case AFMT_S16_BE:
- convert_ = &fhandler_dev_dsp::Audio::convert_S16LE_S16BE;
- debug_printf ("S16LE_S16BE");
- break;
- default:
- convert_ = &fhandler_dev_dsp::Audio::convert_none;
- debug_printf ("none");
- }
-}
-
-void
-fhandler_dev_dsp::Audio::convert_U8_S8 (unsigned char *buffer,
- int size_bytes)
-{
- while (size_bytes-- > 0)
- {
- *buffer ^= (unsigned char)0x80;
- buffer++;
- }
-}
-
-void
-fhandler_dev_dsp::Audio::convert_S16LE_U16BE (unsigned char *buffer,
- int size_bytes)
-{
- int size_samples = size_bytes / 2;
- unsigned char hi, lo;
- while (size_samples-- > 0)
- {
- hi = buffer[0];
- lo = buffer[1];
- *buffer++ = lo;
- *buffer++ = hi ^ (unsigned char)0x80;
- }
-}
-
-void
-fhandler_dev_dsp::Audio::convert_S16LE_U16LE (unsigned char *buffer,
- int size_bytes)
-{
- int size_samples = size_bytes / 2;
- while (size_samples-- > 0)
- {
- buffer++;
- *buffer ^= (unsigned char)0x80;
- buffer++;
- }
-}
-
-void
-fhandler_dev_dsp::Audio::convert_S16LE_S16BE (unsigned char *buffer,
- int size_bytes)
-{
- int size_samples = size_bytes / 2;
- unsigned char hi, lo;
- while (size_samples-- > 0)
- {
- hi = buffer[0];
- lo = buffer[1];
- *buffer++ = lo;
- *buffer++ = hi;
- }
-}
-
-void
-fhandler_dev_dsp::Audio::fillFormat (WAVEFORMATEX * format,
- int rate, int bits, int channels)
-{
- memset (format, 0, sizeof (*format));
- format->wFormatTag = WAVE_FORMAT_PCM;
- format->wBitsPerSample = bits;
- format->nChannels = channels;
- format->nSamplesPerSec = rate;
- format->nAvgBytesPerSec = format->nSamplesPerSec * format->nChannels
- * (bits / 8);
- format->nBlockAlign = format->nChannels * (bits / 8);
-}
-
-// calculate a good block size
-unsigned
-fhandler_dev_dsp::Audio::blockSize (int rate, int bits, int channels)
-{
- unsigned blockSize;
- blockSize = ((bits / 8) * channels * rate) / 8; // approx 125ms per block
- // round up to multiple of 64
- blockSize += 0x3f;
- blockSize &= ~0x3f;
- return blockSize;
-}
-
-//=======================================================================
-void
-fhandler_dev_dsp::Audio_out::fork_fixup (HANDLE parent)
-{
- /* Null dev_.
- It will be necessary to reset the queue, open the device
- and create a lock when writing */
- debug_printf ("parent=0x%08x", parent);
- dev_ = NULL;
-}
-
-
-bool
-fhandler_dev_dsp::Audio_out::query (int rate, int bits, int channels)
-{
- WAVEFORMATEX format;
- MMRESULT rc;
-
- fillFormat (&format, rate, bits, channels);
- rc = waveOutOpen (NULL, WAVE_MAPPER, &format, 0L, 0L, WAVE_FORMAT_QUERY);
- debug_printf ("%d = waveOutOpen (freq=%d bits=%d channels=%d)", rc, rate, bits, channels);
- return (rc == MMSYSERR_NOERROR);
-}
-
-bool
-fhandler_dev_dsp::Audio_out::start ()
-{
- WAVEFORMATEX format;
- MMRESULT rc;
- unsigned bSize = blockSize (freq_, bits_, channels_);
-
- if (dev_)
- return true;
-
- /* In case of fork bigwavebuffer may already exist */
- if (!bigwavebuffer_)
- bigwavebuffer_ = new char[MAX_BLOCKS * bSize];
-
- if (!isvalid ())
- return false;
-
- fillFormat (&format, freq_, bits_, channels_);
- rc = waveOutOpen (&dev_, WAVE_MAPPER, &format, (DWORD) waveOut_callback,
- (DWORD) this, CALLBACK_FUNCTION);
- if (rc == MMSYSERR_NOERROR)
- init (bSize);
-
- debug_printf ("%d = waveOutOpen (freq=%d bits=%d channels=%d)", rc, freq_, bits_, channels_);
-
- return (rc == MMSYSERR_NOERROR);
-}
-
-void
-fhandler_dev_dsp::Audio_out::stop (bool immediately)
-{
- MMRESULT rc;
- WAVEHDR *pHdr;
-
- debug_printf ("dev_=%08x", (int)dev_);
- if (dev_)
- {
- if (!immediately)
- {
- sendcurrent (); // force out last block whatever size..
- waitforallsent (); // block till finished..
- }
-
- rc = waveOutReset (dev_);
- debug_printf ("%d = waveOutReset ()", rc);
- while (Qisr2app_->recv (&pHdr))
- {
- rc = waveOutUnprepareHeader (dev_, pHdr, sizeof (WAVEHDR));
- debug_printf ("%d = waveOutUnprepareHeader (0x%08x)", rc, pHdr);
- }
-
- rc = waveOutClose (dev_);
- debug_printf ("%d = waveOutClose ()", rc);
-
- Qisr2app_->dellock ();
- }
-}
-
-void
-fhandler_dev_dsp::Audio_out::init (unsigned blockSize)
-{
- int i;
-
- // internally queue all of our buffer for later use by write
- Qisr2app_->reset ();
- for (i = 0; i < MAX_BLOCKS; i++)
- {
- wavehdr_[i].lpData = &bigwavebuffer_[i * blockSize];
- wavehdr_[i].dwUser = (int) blockSize;
- wavehdr_[i].dwFlags = 0;
- if (!Qisr2app_->send (&wavehdr_[i]))
- {
- system_printf ("Internal Error i=%d", i);
- break; // should not happen
- }
- }
- pHdr_ = NULL;
-}
-
-bool
-fhandler_dev_dsp::Audio_out::write (const char *pSampleData, int nBytes)
-{
- while (nBytes != 0)
- { // Block if all blocks used until at least one is free
- waitforspace ();
-
- int sizeleft = (int)pHdr_->dwUser - bufferIndex_;
- if (nBytes < sizeleft)
- { // all data fits into the current block, with some space left
- memcpy (&pHdr_->lpData[bufferIndex_], pSampleData, nBytes);
- bufferIndex_ += nBytes;
- break;
- }
- else
- { // data will fill up the current block
- memcpy (&pHdr_->lpData[bufferIndex_], pSampleData, sizeleft);
- bufferIndex_ += sizeleft;
- sendcurrent ();
- pSampleData += sizeleft;
- nBytes -= sizeleft;
- }
- }
- return true;
-}
-
-void
-fhandler_dev_dsp::Audio_out::buf_info (audio_buf_info *p,
- int rate, int bits, int channels)
-{
- p->fragstotal = MAX_BLOCKS;
- if (this && dev_)
- {
- /* If the device is running we use the internal values,
- possibly set from the wave file. */
- p->fragsize = blockSize (freq_, bits_, channels_);
- p->fragments = Qisr2app_->query ();
- if (pHdr_ != NULL)
- p->bytes = (int)pHdr_->dwUser - bufferIndex_
- + p->fragsize * p->fragments;
- else
- p->bytes = p->fragsize * p->fragments;
- }
- else
- {
- p->fragsize = blockSize (rate, bits, channels);
- p->fragments = MAX_BLOCKS;
- p->bytes = p->fragsize * p->fragments;
- }
-}
-
-/* This is called on an interupt so use locking.. Note Qisr2app_
- is used so we should wrap all references to it in locks. */
-inline void
-fhandler_dev_dsp::Audio_out::callback_sampledone (WAVEHDR *pHdr)
-{
- Qisr2app_->send (pHdr);
-}
-
-void
-fhandler_dev_dsp::Audio_out::waitforspace ()
-{
- WAVEHDR *pHdr;
- MMRESULT rc = WAVERR_STILLPLAYING;
-
- if (pHdr_ != NULL)
- return;
- while (!Qisr2app_->recv (&pHdr))
- {
- debug_printf ("100ms");
- Sleep (100);
- }
- if (pHdr->dwFlags)
- {
- /* Errors are ignored here. They will probbaly cause a failure
- in the subsequent PrepareHeader */
- rc = waveOutUnprepareHeader (dev_, pHdr, sizeof (WAVEHDR));
- debug_printf ("%d = waveOutUnprepareHeader (0x%08x)", rc, pHdr);
- }
- pHdr_ = pHdr;
- bufferIndex_ = 0;
-}
-
-void
-fhandler_dev_dsp::Audio_out::waitforallsent ()
-{
- while (Qisr2app_->query () != MAX_BLOCKS)
- {
- debug_printf ("%d blocks in Qisr2app", Qisr2app_->query ());
- Sleep (100);
- }
-}
-
-// send the block described by pHdr_ and bufferIndex_ to wave device
-bool
-fhandler_dev_dsp::Audio_out::sendcurrent ()
-{
- WAVEHDR *pHdr = pHdr_;
- MMRESULT rc;
- debug_printf ("pHdr=0x%08x bytes=%d", pHdr, bufferIndex_);
-
- if (pHdr_ == NULL)
- return false;
- pHdr_ = NULL;
-
- // Sample buffer conversion
- (this->*convert_) ((unsigned char *)pHdr->lpData, bufferIndex_);
-
- // Send internal buffer out to the soundcard
- pHdr->dwBufferLength = bufferIndex_;
- rc = waveOutPrepareHeader (dev_, pHdr, sizeof (WAVEHDR));
- debug_printf ("%d = waveOutPrepareHeader (0x%08x)", rc, pHdr);
- if (rc == MMSYSERR_NOERROR)
- {
- rc = waveOutWrite (dev_, pHdr, sizeof (WAVEHDR));
- debug_printf ("%d = waveOutWrite (0x%08x)", rc, pHdr);
- }
- if (rc == MMSYSERR_NOERROR)
- return true;
-
- /* FIXME: Should we return an error instead ?*/
- pHdr->dwFlags = 0; /* avoid calling UnprepareHeader again */
- Qisr2app_->send (pHdr);
- return false;
-}
-
-//------------------------------------------------------------------------
-// Call back routine
-static void CALLBACK
-waveOut_callback (HWAVEOUT hWave, UINT msg, DWORD instance, DWORD param1,
- DWORD param2)
-{
- if (msg == WOM_DONE)
- {
- fhandler_dev_dsp::Audio_out *ptr =
- (fhandler_dev_dsp::Audio_out *) instance;
- ptr->callback_sampledone ((WAVEHDR *) param1);
- }
-}
-
-//------------------------------------------------------------------------
-// wav file detection..
-#pragma pack(1)
-struct wavchunk
-{
- char id[4];
- unsigned int len;
-};
-struct wavformat
-{
- unsigned short wFormatTag;
- unsigned short wChannels;
- unsigned int dwSamplesPerSec;
- unsigned int dwAvgBytesPerSec;
- unsigned short wBlockAlign;
- unsigned short wBitsPerSample;
-};
-#pragma pack()
-
-bool
-fhandler_dev_dsp::Audio_out::parsewav (const char * &pData, int &nBytes,
- int dev_freq, int dev_bits, int dev_channels)
-{
- int len;
- const char *end = pData + nBytes;
- const char *pDat;
- int skip = 0;
-
- /* Start with default values from the device handler */
- freq_ = dev_freq;
- bits_ = dev_bits;
- channels_ = dev_channels;
- setconvert (bits_ == 8 ? AFMT_U8 : AFMT_S16_LE);
-
- // Check alignment first: A lot of the code below depends on it
- if (((int)pData & 0x3) != 0)
- return false;
- if (!(pData[0] == 'R' && pData[1] == 'I'
- && pData[2] == 'F' && pData[3] == 'F'))
- return false;
- if (!(pData[8] == 'W' && pData[9] == 'A'
- && pData[10] == 'V' && pData[11] == 'E'))
- return false;
-
- len = *(int *) &pData[4];
- len -= 12;
- pDat = pData + 12;
- skip = 12;
- while ((len > 0) && (pDat + sizeof (wavchunk) < end))
- { /* We recognize two kinds of wavchunk:
- "fmt " for the PCM parameters (only PCM supported here)
- "data" for the start of PCM data */
- wavchunk * pChunk = (wavchunk *) pDat;
- int blklen = pChunk-> len;
- if (pChunk->id[0] == 'f' && pChunk->id[1] == 'm'
- && pChunk->id[2] == 't' && pChunk->id[3] == ' ')
- {
- wavformat *format = (wavformat *) (pChunk + 1);
- if ((char *) (format + 1) >= end)
- return false;
- // We have found the parameter chunk
- if (format->wFormatTag == 0x0001)
- { // Micr*s*ft PCM; check if parameters work with our device
- if (query (format->dwSamplesPerSec, format->wBitsPerSample,
- format->wChannels))
- { // return the parameters we found
- freq_ = format->dwSamplesPerSec;
- bits_ = format->wBitsPerSample;
- channels_ = format->wChannels;
- }
- }
- }
- else
- {
- if (pChunk->id[0] == 'd' && pChunk->id[1] == 'a'
- && pChunk->id[2] == 't' && pChunk->id[3] == 'a')
- { // throw away all the header & not output it to the soundcard.
- skip += sizeof (wavchunk);
- debug_printf ("Discard %d bytes wave header", skip);
- pData += skip;
- nBytes -= skip;
- setconvert (bits_ == 8 ? AFMT_U8 : AFMT_S16_LE);
- return true;
- }
- }
- pDat += blklen + sizeof (wavchunk);
- skip += blklen + sizeof (wavchunk);
- len -= blklen + sizeof (wavchunk);
- }
- return false;
-}
-
-/* ========================================================================
- Buffering concept for Audio_in:
- On the first read, we queue all blocks of our bigwavebuffer
- for reception and start the wave-in device.
- We manage queues of pointers to WAVEHDR
- When a block has been filled, the callback puts the corresponding
- WAVEHDR pointer into a queue.
- The function read() blocks (polled, sigh) until at least one good buffer
- has arrived, then the data is copied into the buffer provided to read().
- After a buffer has been fully used by read(), it is queued again
- to the wave-in device immediately.
- The function read() iterates until all data requested has been
- received, there is no way to interrupt it */
-
-void
-fhandler_dev_dsp::Audio_in::fork_fixup (HANDLE parent)
-{
- /* Null dev_.
- It will be necessary to reset the queue, open the device
- and create a lock when reading */
- debug_printf ("parent=0x%08x", parent);
- dev_ = NULL;
-}
-
-bool
-fhandler_dev_dsp::Audio_in::query (int rate, int bits, int channels)
-{
- WAVEFORMATEX format;
- MMRESULT rc;
-
- fillFormat (&format, rate, bits, channels);
- rc = waveInOpen (NULL, WAVE_MAPPER, &format, 0L, 0L, WAVE_FORMAT_QUERY);
- debug_printf ("%d = waveInOpen (freq=%d bits=%d channels=%d)", rc, rate, bits, channels);
- return (rc == MMSYSERR_NOERROR);
-}
-
-bool
-fhandler_dev_dsp::Audio_in::start (int rate, int bits, int channels)
-{
- WAVEFORMATEX format;
- MMRESULT rc;
- unsigned bSize = blockSize (rate, bits, channels);
-
- if (dev_)
- return true;
-
- /* In case of fork bigwavebuffer may already exist */
- if (!bigwavebuffer_)
- bigwavebuffer_ = new char[MAX_BLOCKS * bSize];
-
- if (!isvalid ())
- return false;
-
- fillFormat (&format, rate, bits, channels);
- rc = waveInOpen (&dev_, WAVE_MAPPER, &format, (DWORD) waveIn_callback,
- (DWORD) this, CALLBACK_FUNCTION);
- debug_printf ("%d = waveInOpen (rate=%d bits=%d channels=%d)", rc, rate, bits, channels);
-
- if (rc == MMSYSERR_NOERROR)
- {
- if (!init (bSize))
- return false;
- }
- return (rc == MMSYSERR_NOERROR);
-}
-
-void
-fhandler_dev_dsp::Audio_in::stop ()
-{
- MMRESULT rc;
- WAVEHDR *pHdr;
-
- debug_printf ("dev_=%08x", (int)dev_);
- if (dev_)
- {
- /* Note that waveInReset calls our callback for all incomplete buffers.
- Since all the win32 wave functions appear to use a common lock,
- we must not call into the wave API from the callback.
- Otherwise we end up in a deadlock. */
- rc = waveInReset (dev_);
- debug_printf ("%d = waveInReset ()", rc);
-
- while (Qisr2app_->recv (&pHdr))
- {
- rc = waveInUnprepareHeader (dev_, pHdr, sizeof (WAVEHDR));
- debug_printf ("%d = waveInUnprepareHeader (0x%08x)", rc, pHdr);
- }
-
- rc = waveInClose (dev_);
- debug_printf ("%d = waveInClose ()", rc);
-
- Qisr2app_->dellock ();
- }
-}
-
-bool
-fhandler_dev_dsp::Audio_in::queueblock (WAVEHDR *pHdr)
-{
- MMRESULT rc;
- rc = waveInPrepareHeader (dev_, pHdr, sizeof (WAVEHDR));
- debug_printf ("%d = waveInPrepareHeader (0x%08x)", rc, pHdr);
- if (rc == MMSYSERR_NOERROR)
- {
- rc = waveInAddBuffer (dev_, pHdr, sizeof (WAVEHDR));
- debug_printf ("%d = waveInAddBuffer (0x%08x)", rc, pHdr);
- }
- if (rc == MMSYSERR_NOERROR)
- return true;
-
- /* FIXME: Should the calling function return an error instead ?*/
- pHdr->dwFlags = 0; /* avoid calling UnprepareHeader again */
- pHdr->dwBytesRecorded = 0; /* no data will have been read */
- Qisr2app_->send (pHdr);
- return false;
-}
-
-bool
-fhandler_dev_dsp::Audio_in::init (unsigned blockSize)
-{
- MMRESULT rc;
- int i;
-
- // try to queue all of our buffer for reception
- Qisr2app_->reset ();
- for (i = 0; i < MAX_BLOCKS; i++)
- {
- wavehdr_[i].lpData = &bigwavebuffer_[i * blockSize];
- wavehdr_[i].dwBufferLength = blockSize;
- wavehdr_[i].dwFlags = 0;
- if (!queueblock (&wavehdr_[i]))
- break;
- }
- pHdr_ = NULL;
- rc = waveInStart (dev_);
- debug_printf ("%d = waveInStart (), queued=%d", rc, i);
- return (rc == MMSYSERR_NOERROR);
-}
-
-bool
-fhandler_dev_dsp::Audio_in::read (char *pSampleData, int &nBytes)
-{
- int bytes_to_read = nBytes;
- nBytes = 0;
- debug_printf ("pSampleData=%08x nBytes=%d", pSampleData, bytes_to_read);
- while (bytes_to_read != 0)
- { // Block till next sound has been read
- waitfordata ();
-
- // Handle gathering our blocks into smaller or larger buffer
- int sizeleft = pHdr_->dwBytesRecorded - bufferIndex_;
- if (bytes_to_read < sizeleft)
- { // The current buffer holds more data than requested
- memcpy (pSampleData, &pHdr_->lpData[bufferIndex_], bytes_to_read);
- (this->*convert_) ((unsigned char *)pSampleData, bytes_to_read);
- nBytes += bytes_to_read;
- bufferIndex_ += bytes_to_read;
- debug_printf ("got %d", bytes_to_read);
- break; // done; use remaining data in next call to read
- }
- else
- { // not enough or exact amount in the current buffer
- if (sizeleft)
- { // use up what we have
- memcpy (pSampleData, &pHdr_->lpData[bufferIndex_], sizeleft);
- (this->*convert_) ((unsigned char *)pSampleData, sizeleft);
- nBytes += sizeleft;
- bytes_to_read -= sizeleft;
- pSampleData += sizeleft;
- debug_printf ("got %d", sizeleft);
- }
- queueblock (pHdr_); // re-queue this block to ISR
- pHdr_ = NULL; // need to wait for a new block
- // if more samples are needed, we need a new block now
- }
- }
- debug_printf ("end nBytes=%d", nBytes);
- return true;
-}
-
-void
-fhandler_dev_dsp::Audio_in::waitfordata ()
-{
- WAVEHDR *pHdr;
- MMRESULT rc;
-
- if (pHdr_ != NULL)
- return;
- while (!Qisr2app_->recv (&pHdr))
- {
- debug_printf ("100ms");
- Sleep (100);
- }
- if (pHdr->dwFlags) /* Zero if queued following error in queueblock */
- {
- /* Errors are ignored here. They will probbaly cause a failure
- in the subsequent PrepareHeader */
- rc = waveInUnprepareHeader (dev_, pHdr, sizeof (WAVEHDR));
- debug_printf ("%d = waveInUnprepareHeader (0x%08x)", rc, pHdr);
- }
- pHdr_ = pHdr;
- bufferIndex_ = 0;
-}
-
-void
-fhandler_dev_dsp::Audio_in::buf_info (audio_buf_info *p,
- int rate, int bits, int channels)
-{
- p->fragstotal = MAX_BLOCKS;
- p->fragsize = blockSize (rate, bits, channels);
- if (this && dev_)
- {
- p->fragments = Qisr2app_->query ();
- if (pHdr_ != NULL)
- p->bytes = pHdr_->dwBytesRecorded - bufferIndex_
- + p->fragsize * p->fragments;
- else
- p->bytes = p->fragsize * p->fragments;
- }
- else
- {
- p->fragments = 0;
- p->bytes = 0;
- }
-}
-
-inline void
-fhandler_dev_dsp::Audio_in::callback_blockfull (WAVEHDR *pHdr)
-{
- Qisr2app_->send (pHdr);
-}
-
-static void CALLBACK
-waveIn_callback (HWAVEIN hWave, UINT msg, DWORD instance, DWORD param1,
- DWORD param2)
-{
- if (msg == WIM_DATA)
- {
- fhandler_dev_dsp::Audio_in *ptr =
- (fhandler_dev_dsp::Audio_in *) instance;
- ptr->callback_blockfull ((WAVEHDR *) param1);
- }
-}
-
-
-/* ------------------------------------------------------------------------
- /dev/dsp handler
- ------------------------------------------------------------------------ */
-fhandler_dev_dsp::fhandler_dev_dsp ():
- fhandler_base ()
-{
- debug_printf ("0x%08x", (int)this);
- audio_in_ = NULL;
- audio_out_ = NULL;
-}
-
-int
-fhandler_dev_dsp::open (int flags, mode_t mode)
-{
- if (cygheap->fdtab.find_archetype (dev ()))
- {
- set_errno (EBUSY);
- return 0;
- }
- int err = 0;
- UINT num_in = 0, num_out = 0;
- set_flags ((flags & ~O_TEXT) | O_BINARY);
- // Work out initial sample format & frequency, /dev/dsp defaults
- audioformat_ = AFMT_U8;
- audiofreq_ = 8000;
- audiobits_ = 8;
- audiochannels_ = 1;
- switch (flags & O_ACCMODE)
- {
- case O_RDWR:
- if ((num_in = waveInGetNumDevs ()) == 0)
- err = ENXIO;
- /* Fall through */
- case O_WRONLY:
- if ((num_out = waveOutGetNumDevs ()) == 0)
- err = ENXIO;
- break;
- case O_RDONLY:
- if ((num_in = waveInGetNumDevs ()) == 0)
- err = ENXIO;
- break;
- default:
- err = EINVAL;
- }
-
- if (!err)
- {
- set_open_status ();
- need_fork_fixup (true);
- nohandle (true);
-
- // FIXME: Do this better someday
- fhandler_dev_dsp *arch = (fhandler_dev_dsp *) cmalloc_abort (HEAP_ARCHETYPES, sizeof (*this));
- archetype = arch;
- *((fhandler_dev_dsp **) cygheap->fdtab.add_archetype ()) = arch;
- *arch = *this;
- archetype->usecount = 1;
- }
- else
- set_errno (err);
-
- debug_printf ("ACCMODE=0x%08x audio_in=%d audio_out=%d, err=%d",
- flags & O_ACCMODE, num_in, num_out, err);
- return !err;
-}
-
-#define IS_WRITE() ((get_flags() & O_ACCMODE) != O_RDONLY)
-#define IS_READ() ((get_flags() & O_ACCMODE) != O_WRONLY)
-
-int
-fhandler_dev_dsp::write (const void *ptr, size_t len)
-{
- debug_printf ("ptr=%08x len=%d", ptr, len);
- if ((fhandler_dev_dsp *) archetype != this)
- return ((fhandler_dev_dsp *)archetype)->write(ptr, len);
-
- int len_s = len;
- const char *ptr_s = static_cast <const char *> (ptr);
-
- if (audio_out_)
- /* nothing to do */;
- else if (IS_WRITE ())
- {
- debug_printf ("Allocating");
- if (!(audio_out_ = new Audio_out))
- return -1;
-
- /* check for wave file & get parameters & skip header if possible. */
-
- if (audio_out_->parsewav (ptr_s, len_s,
- audiofreq_, audiobits_, audiochannels_))
- debug_printf ("=> ptr_s=%08x len_s=%d", ptr_s, len_s);
- }
- else
- {
- set_errno (EBADF); // device was opened for read?
- return -1;
- }
-
- /* Open audio device properly with callbacks.
- Private parameters were set in call to parsewav.
- This is a no-op when there are successive writes in the same process */
- if (!audio_out_->start ())
- {
- set_errno (EIO);
- return -1;
- }
-
- audio_out_->write (ptr_s, len_s);
- return len;
-}
-
-void __stdcall
-fhandler_dev_dsp::read (void *ptr, size_t& len)
-{
- debug_printf ("ptr=%08x len=%d", ptr, len);
- if ((fhandler_dev_dsp *) archetype != this)
- return ((fhandler_dev_dsp *)archetype)->read(ptr, len);
-
- if (audio_in_)
- /* nothing to do */;
- else if (IS_READ ())
- {
- debug_printf ("Allocating");
- if (!(audio_in_ = new Audio_in))
- {
- len = (size_t)-1;
- return;
- }
- audio_in_->setconvert (audioformat_);
- }
- else
- {
- len = (size_t)-1;
- set_errno (EBADF); // device was opened for write?
- return;
- }
-
- /* Open audio device properly with callbacks.
- This is a noop when there are successive reads in the same process */
- if (!audio_in_->start (audiofreq_, audiobits_, audiochannels_))
- {
- len = (size_t)-1;
- set_errno (EIO);
- return;
- }
-
- audio_in_->read ((char *)ptr, (int&)len);
-}
-
-_off64_t
-fhandler_dev_dsp::lseek (_off64_t offset, int whence)
-{
- return 0;
-}
-
-void
-fhandler_dev_dsp::close_audio_in ()
-{
- if (audio_in_)
- {
- audio_in_->stop ();
- delete audio_in_;
- audio_in_ = NULL;
- }
-}
-
-void
-fhandler_dev_dsp::close_audio_out (bool immediately)
-{
- if (audio_out_)
- {
- audio_out_->stop (immediately);
- delete audio_out_;
- audio_out_ = NULL;
- }
-}
-
-int
-fhandler_dev_dsp::close ()
-{
- debug_printf ("audio_in=%08x audio_out=%08x",
- (int)audio_in_, (int)audio_out_);
- if (!hExeced)
- {
- if ((fhandler_dev_dsp *) archetype != this)
- return ((fhandler_dev_dsp *) archetype)->close ();
-
- if (--usecount == 0)
- {
- close_audio_in ();
- close_audio_out (exit_state != ES_NOT_EXITING);
- }
- }
- return 0;
-}
-
-int
-fhandler_dev_dsp::dup (fhandler_base * child)
-{
- debug_printf ("");
- child->archetype = archetype;
- child->set_flags (get_flags ());
- archetype->usecount++;
- return 0;
-}
-
-int
-fhandler_dev_dsp::ioctl (unsigned int cmd, void *ptr)
-{
- debug_printf ("audio_in=%08x audio_out=%08x",
- (int)audio_in_, (int)audio_out_);
- if ((fhandler_dev_dsp *) archetype != this)
- return ((fhandler_dev_dsp *)archetype)->ioctl(cmd, ptr);
-
- int *intptr = (int *) ptr;
- switch (cmd)
- {
-#define CASE(a) case a : debug_printf ("/dev/dsp: ioctl %s", #a);
-
- CASE (SNDCTL_DSP_RESET)
- close_audio_in ();
- close_audio_out (true);
- return 0;
- break;
-
- CASE (SNDCTL_DSP_GETBLKSIZE)
- /* This is valid even if audio_X is NULL */
- if (IS_WRITE ())
- {
- *intptr = audio_out_->blockSize (audiofreq_,
- audiobits_,
- audiochannels_);
- }
- else
- { // I am very sure that IS_READ is valid
- *intptr = audio_in_->blockSize (audiofreq_,
- audiobits_,
- audiochannels_);
- }
- return 0;
-
- CASE (SNDCTL_DSP_SETFMT)
- {
- int nBits;
- switch (*intptr)
- {
- case AFMT_QUERY:
- *intptr = audioformat_;
- return 0;
- break;
- case AFMT_U16_BE:
- case AFMT_U16_LE:
- case AFMT_S16_BE:
- case AFMT_S16_LE:
- nBits = 16;
- break;
- case AFMT_U8:
- case AFMT_S8:
- nBits = 8;
- break;
- default:
- nBits = 0;
- }
- if (nBits && IS_WRITE ())
- {
- close_audio_out ();
- if (audio_out_->query (audiofreq_, nBits, audiochannels_))
- {
- audiobits_ = nBits;
- audioformat_ = *intptr;
- }
- else
- {
- *intptr = audiobits_;
- return -1;
- }
- }
- if (nBits && IS_READ ())
- {
- close_audio_in ();
- if (audio_in_->query (audiofreq_, nBits, audiochannels_))
- {
- audiobits_ = nBits;
- audioformat_ = *intptr;
- }
- else
- {
- *intptr = audiobits_;
- return -1;
- }
- }
- return 0;
- }
-
- CASE (SNDCTL_DSP_SPEED)
- if (IS_WRITE ())
- {
- close_audio_out ();
- if (audio_out_->query (*intptr, audiobits_, audiochannels_))
- audiofreq_ = *intptr;
- else
- {
- *intptr = audiofreq_;
- return -1;
- }
- }
- if (IS_READ ())
- {
- close_audio_in ();
- if (audio_in_->query (*intptr, audiobits_, audiochannels_))
- audiofreq_ = *intptr;
- else
- {
- *intptr = audiofreq_;
- return -1;
- }
- }
- return 0;
-
- CASE (SNDCTL_DSP_STEREO)
- {
- int nChannels = *intptr + 1;
- int res = ioctl (SNDCTL_DSP_CHANNELS, &nChannels);
- *intptr = nChannels - 1;
- return res;
- }
-
- CASE (SNDCTL_DSP_CHANNELS)
- {
- int nChannels = *intptr;
-
- if (IS_WRITE ())
- {
- close_audio_out ();
- if (audio_out_->query (audiofreq_, audiobits_, nChannels))
- audiochannels_ = nChannels;
- else
- {
- *intptr = audiochannels_;
- return -1;
- }
- }
- if (IS_READ ())
- {
- close_audio_in ();
- if (audio_in_->query (audiofreq_, audiobits_, nChannels))
- audiochannels_ = nChannels;
- else
- {
- *intptr = audiochannels_;
- return -1;
- }
- }
- return 0;
- }
-
- CASE (SNDCTL_DSP_GETOSPACE)
- {
- if (!IS_WRITE ())
- {
- set_errno(EBADF);
- return -1;
- }
- audio_buf_info *p = (audio_buf_info *) ptr;
- audio_out_->buf_info (p, audiofreq_, audiobits_, audiochannels_);
- debug_printf ("ptr=%p frags=%d fragsize=%d bytes=%d",
- ptr, p->fragments, p->fragsize, p->bytes);
- return 0;
- }
-
- CASE (SNDCTL_DSP_GETISPACE)
- {
- if (!IS_READ ())
- {
- set_errno(EBADF);
- return -1;
- }
- audio_buf_info *p = (audio_buf_info *) ptr;
- audio_in_->buf_info (p, audiofreq_, audiobits_, audiochannels_);
- debug_printf ("ptr=%p frags=%d fragsize=%d bytes=%d",
- ptr, p->fragments, p->fragsize, p->bytes);
- return 0;
- }
-
- CASE (SNDCTL_DSP_SETFRAGMENT)
- // Fake!! esound & mikmod require this on non PowerPC platforms.
- //
- return 0;
-
- CASE (SNDCTL_DSP_GETFMTS)
- *intptr = AFMT_S16_LE | AFMT_U8; // only native formats returned here
- return 0;
-
- CASE (SNDCTL_DSP_GETCAPS)
- *intptr = DSP_CAP_BATCH | DSP_CAP_DUPLEX;
- return 0;
-
- CASE (SNDCTL_DSP_POST)
- CASE (SNDCTL_DSP_SYNC)
- // Stop audio out device
- close_audio_out ();
- // Stop audio in device
- close_audio_in ();
- return 0;
-
- default:
- debug_printf ("/dev/dsp: ioctl 0x%08x not handled yet! FIXME:", cmd);
- break;
-
-#undef CASE
- };
- set_errno (EINVAL);
- return -1;
-}
-
-void
-fhandler_dev_dsp::fixup_after_fork (HANDLE parent)
-{ // called from new child process
- debug_printf ("audio_in=%08x audio_out=%08x",
- (int)audio_in_, (int)audio_out_);
- if (archetype != this)
- return ((fhandler_dev_dsp *)archetype)->fixup_after_fork (parent);
-
- if (audio_in_)
- audio_in_ ->fork_fixup (parent);
- if (audio_out_)
- audio_out_->fork_fixup (parent);
-}
-
-void
-fhandler_dev_dsp::fixup_after_exec ()
-{
- debug_printf ("audio_in=%08x audio_out=%08x, close_on_exec %d",
- (int) audio_in_, (int) audio_out_, close_on_exec ());
- if (!close_on_exec ())
- {
- if (archetype != this)
- return ((fhandler_dev_dsp *) archetype)->fixup_after_exec ();
-
- audio_in_ = NULL;
- audio_out_ = NULL;
- }
-}
diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc
deleted file mode 100644
index 137e4a7..0000000
--- a/winsup/cygwin/fhandler_fifo.cc
+++ /dev/null
@@ -1,189 +0,0 @@
-/* fhandler_fifo.cc - See fhandler.h for a description of the fhandler classes.
-
- Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 Red Hat, Inc.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include "winsup.h"
-#include "miscfuncs.h"
-
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "sigproc.h"
-#include "cygtls.h"
-
-fhandler_fifo::fhandler_fifo ():
- wait_state (fifo_unknown)
-{
- get_overlapped ()->hEvent = NULL;
- need_fork_fixup (true);
-}
-
-HANDLE
-fhandler_fifo::open_nonserver (const char *npname, unsigned low_flags,
- LPSECURITY_ATTRIBUTES sa_buf)
-{
- DWORD mode = 0;
- if (low_flags == O_RDONLY)
- mode = GENERIC_READ;
- else if (low_flags == O_WRONLY)
- mode = GENERIC_WRITE;
- else
- mode = GENERIC_READ | GENERIC_WRITE;
- while (1)
- {
- HANDLE h = CreateFile (npname, mode, 0, sa_buf, OPEN_EXISTING,
- FILE_FLAG_OVERLAPPED, NULL);
- if (h != INVALID_HANDLE_VALUE || GetLastError () != ERROR_PIPE_NOT_CONNECTED)
- return h;
- if (&_my_tls != _main_tls)
- low_priority_sleep (0);
- else if (WaitForSingleObject (signal_arrived, 0) == WAIT_OBJECT_0)
- {
- set_errno (EINTR);
- return NULL;
- }
- }
-}
-
-#define FIFO_PIPE_MODE (PIPE_TYPE_BYTE | PIPE_READMODE_BYTE)
-
-int
-fhandler_fifo::open (int flags, mode_t)
-{
- int res;
- char npname[MAX_PATH];
- DWORD mode = 0;
-
- /* Generate a semi-unique name to associate with this fifo. */
- __small_sprintf (npname, "\\\\.\\pipe\\__cygfifo__%08x_%016X",
- get_dev (), get_ino ());
-
- unsigned low_flags = flags & O_ACCMODE;
- if (low_flags == O_RDONLY)
- mode = PIPE_ACCESS_INBOUND;
- else if (low_flags == O_WRONLY)
- mode = PIPE_ACCESS_OUTBOUND;
- else if (low_flags == O_RDWR)
- mode = PIPE_ACCESS_DUPLEX;
-
- if (!mode)
- {
- set_errno (EINVAL);
- res = 0;
- }
- else
- {
- char char_sa_buf[1024];
- LPSECURITY_ATTRIBUTES sa_buf =
- sec_user ((PSECURITY_ATTRIBUTES) char_sa_buf, cygheap->user.sid());
- mode |= FILE_FLAG_OVERLAPPED;
-
- HANDLE h;
- DWORD err;
- bool nonblocking_write = !!((flags & (O_WRONLY | O_NONBLOCK)) == (O_WRONLY | O_NONBLOCK));
- if (nonblocking_write)
- {
- h = INVALID_HANDLE_VALUE;
- err = ERROR_ACCESS_DENIED;
- }
- else
- {
- h = CreateNamedPipe(npname, mode, FIFO_PIPE_MODE,
- PIPE_UNLIMITED_INSTANCES, 0, 0,
- NMPWAIT_WAIT_FOREVER, sa_buf);
- err = GetLastError ();
- }
- if (h != INVALID_HANDLE_VALUE)
- wait_state = fifo_wait_for_client;
- else
- switch (err)
- {
- case ERROR_ACCESS_DENIED:
- h = open_nonserver (npname, low_flags, sa_buf);
- if (h != INVALID_HANDLE_VALUE)
- {
- wait_state = fifo_wait_for_server;
- break;
- }
- if (nonblocking_write && GetLastError () == ERROR_FILE_NOT_FOUND)
- {
- set_errno (ENXIO);
- break;
- }
- /* fall through intentionally */
- default:
- __seterrno ();
- break;
- }
- if (!h || h == INVALID_HANDLE_VALUE)
- res = 0;
- else if (!setup_overlapped ())
- {
- __seterrno ();
- res = 0;
- }
- else
- {
- set_io_handle (h);
- set_flags (flags);
- res = 1;
- }
- }
-
- debug_printf ("returning %d, errno %d", res, get_errno ());
- return res;
-}
-
-bool
-fhandler_fifo::wait (bool iswrite)
-{
- switch (wait_state)
- {
- case fifo_wait_for_client:
- {
- bool res = ConnectNamedPipe (get_handle (), get_overlapped ());
- DWORD dummy_bytes;
- if (res || GetLastError () == ERROR_PIPE_CONNECTED)
- return true;
- return wait_overlapped (res, iswrite, &dummy_bytes);
- }
- case fifo_unknown:
- case fifo_wait_for_server:
- /* CGF FIXME SOON: test if these really need to be handled. */
- default:
- break;
- }
- return true;
-}
-
-void
-fhandler_fifo::read (void *in_ptr, size_t& len)
-{
- if (!wait (false))
- len = 0;
- else
- read_overlapped (in_ptr, len);
-}
-
-int
-fhandler_fifo::write (const void *ptr, size_t len)
-{
- return wait (true) ? write_overlapped (ptr, len) : -1;
-}
-
-int __stdcall
-fhandler_fifo::fstatvfs (struct statvfs *sfs)
-{
- fhandler_disk_file fh (pc);
- fh.get_device () = FH_FS;
- return fh.fstatvfs (sfs);
-}
diff --git a/winsup/cygwin/fhandler_floppy.cc b/winsup/cygwin/fhandler_floppy.cc
deleted file mode 100644
index 4368c53..0000000
--- a/winsup/cygwin/fhandler_floppy.cc
+++ /dev/null
@@ -1,537 +0,0 @@
-/* fhandler_floppy.cc. See fhandler.h for a description of the
- fhandler classes.
-
- Copyright 1999, 2000, 2001, 2002, 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. */
-
-#include "winsup.h"
-#include <unistd.h>
-#include <winioctl.h>
-#include <cygwin/rdevio.h>
-#include <cygwin/hdreg.h>
-#include <cygwin/fs.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "ntdll.h"
-
-#define IS_EOM(err) ((err) == ERROR_INVALID_PARAMETER \
- || (err) == ERROR_SEEK \
- || (err) == ERROR_SECTOR_NOT_FOUND)
-
-/**********************************************************************/
-/* fhandler_dev_floppy */
-
-fhandler_dev_floppy::fhandler_dev_floppy ()
- : fhandler_dev_raw (), status ()
-{
-}
-
-int
-fhandler_dev_floppy::get_drive_info (struct hd_geometry *geo)
-{
- char dbuf[256];
- char pbuf[256];
-
- DISK_GEOMETRY *di = NULL;
- PARTITION_INFORMATION_EX *pix = NULL;
- PARTITION_INFORMATION *pi = NULL;
- DWORD bytes_read = 0;
-
- /* Always try using the new EX ioctls first (>= XP). If not available,
- fall back to trying the old non-EX ioctls.
- Unfortunately the EX ioctls are not implemented in the floppy driver. */
- if (wincap.has_disk_ex_ioctls () && get_major () != DEV_FLOPPY_MAJOR)
- {
- if (!DeviceIoControl (get_handle (),
- IOCTL_DISK_GET_DRIVE_GEOMETRY_EX, NULL, 0,
- dbuf, 256, &bytes_read, NULL))
- __seterrno ();
- else
- {
- di = &((DISK_GEOMETRY_EX *) dbuf)->Geometry;
- if (!DeviceIoControl (get_handle (),
- IOCTL_DISK_GET_PARTITION_INFO_EX, NULL, 0,
- pbuf, 256, &bytes_read, NULL))
- __seterrno ();
- else
- pix = (PARTITION_INFORMATION_EX *) pbuf;
- }
- }
- if (!di)
- {
- if (!DeviceIoControl (get_handle (),
- IOCTL_DISK_GET_DRIVE_GEOMETRY, NULL, 0,
- dbuf, 256, &bytes_read, NULL))
- __seterrno ();
- else
- {
- di = (DISK_GEOMETRY *) dbuf;
- if (!DeviceIoControl (get_handle (),
- IOCTL_DISK_GET_PARTITION_INFO, NULL, 0,
- pbuf, 256, &bytes_read, NULL))
- __seterrno ();
- else
- pi = (PARTITION_INFORMATION *) pbuf;
- }
- }
- if (!di)
- {
- /* Up to Win2K, even IOCTL_DISK_GET_DRIVE_GEOMETRY fails when trying
- it on CD or DVD drives. In that case fall back to requesting
- simple file system information. */
- NTSTATUS status;
- IO_STATUS_BLOCK io;
- FILE_FS_SIZE_INFORMATION ffsi;
-
- status = NtQueryVolumeInformationFile (get_handle (), &io, &ffsi,
- sizeof ffsi,
- FileFsSizeInformation);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- return -1;
- }
- debug_printf ("fsys geometry: (%D units)*(%u sec)*(%u bps)",
- ffsi.TotalAllocationUnits.QuadPart,
- ffsi.SectorsPerAllocationUnit,
- ffsi.BytesPerSector);
- bytes_per_sector = ffsi.BytesPerSector;
- drive_size = ffsi.TotalAllocationUnits.QuadPart
- * ffsi.SectorsPerAllocationUnit
- * ffsi.BytesPerSector;
- if (geo)
- {
- geo->heads = 1;
- geo->sectors = ffsi.SectorsPerAllocationUnit;
- geo->cylinders = ffsi.TotalAllocationUnits.LowPart;
- geo->start = 0;
- }
- }
- else
- {
- debug_printf ("disk geometry: (%D cyl)*(%u trk)*(%u sec)*(%u bps)",
- di->Cylinders.QuadPart,
- di->TracksPerCylinder,
- di->SectorsPerTrack,
- di->BytesPerSector);
- bytes_per_sector = di->BytesPerSector;
- if (pix)
- {
- debug_printf ("partition info: offset %D length %D",
- pix->StartingOffset.QuadPart,
- pix->PartitionLength.QuadPart);
- drive_size = pix->PartitionLength.QuadPart;
- }
- else if (pi)
- {
- debug_printf ("partition info: offset %D length %D",
- pi->StartingOffset.QuadPart,
- pi->PartitionLength.QuadPart);
- drive_size = pi->PartitionLength.QuadPart;
- }
- else
- {
- /* Getting the partition size by using the drive geometry information
- looks wrong, but this is a historical necessity. NT4 didn't
- maintain partition information for the whole drive (aka
- "partition 0"), but returned ERROR_INVALID_HANDLE instead. That
- got fixed in W2K. */
- drive_size = di->Cylinders.QuadPart * di->TracksPerCylinder
- * di->SectorsPerTrack * di->BytesPerSector;
- }
- if (geo)
- {
- geo->heads = di->TracksPerCylinder;
- geo->sectors = di->SectorsPerTrack;
- geo->cylinders = di->Cylinders.LowPart;
- if (pix)
- geo->start = pix->StartingOffset.QuadPart >> 9ULL;
- else if (pi)
- geo->start = pi->StartingOffset.QuadPart >> 9ULL;
- else
- geo->start = 0;
- }
- }
- debug_printf ("drive size: %D", drive_size);
-
- return 0;
-}
-
-/* Wrapper functions for ReadFile and WriteFile to simplify error handling. */
-BOOL
-fhandler_dev_floppy::read_file (void *buf, DWORD to_read, DWORD *read, int *err)
-{
- BOOL ret;
-
- *err = 0;
- if (!(ret = ReadFile (get_handle (), buf, to_read, read, 0)))
- *err = GetLastError ();
- syscall_printf ("%d (err %d) = ReadFile (%d, %d, to_read %d, read %d, 0)",
- ret, *err, get_handle (), buf, to_read, *read);
- return ret;
-}
-
-BOOL
-fhandler_dev_floppy::write_file (const void *buf, DWORD to_write,
- DWORD *written, int *err)
-{
- BOOL ret;
-
- *err = 0;
- if (!(ret = WriteFile (get_handle (), buf, to_write, written, 0)))
- *err = GetLastError ();
- syscall_printf ("%d (err %d) = WriteFile (%d, %d, write %d, written %d, 0)",
- ret, *err, get_handle (), buf, to_write, *written);
- return ret;
-}
-
-int
-fhandler_dev_floppy::open (int flags, mode_t)
-{
- /* The correct size of the buffer would be 512 bytes, which is the atomic
- size, supported by WinNT. Unfortunately, the performance is worse than
- access to file system on same device! Setting buffer size to a
- relatively big value increases performance by means. The new ioctl call
- with 'rdevio.h' header file supports changing this value.
-
- As default buffer size, we're using some value which is a multiple of
- the typical tar and cpio buffer sizes, Except O_DIRECT is set, in which
- case we're not buffering at all. */
- devbufsiz = (flags & O_DIRECT) ? 0L : 61440L;
- int ret = fhandler_dev_raw::open (flags);
-
- if (ret && get_drive_info (NULL))
- {
- close ();
- return 0;
- }
-
- return ret;
-}
-
-int
-fhandler_dev_floppy::dup (fhandler_base *child)
-{
- int ret = fhandler_dev_raw::dup (child);
-
- if (!ret)
- {
- fhandler_dev_floppy *fhc = (fhandler_dev_floppy *) child;
-
- fhc->drive_size = drive_size;
- fhc->bytes_per_sector = bytes_per_sector;
- fhc->eom_detected (eom_detected ());
- }
- return ret;
-}
-
-inline _off64_t
-fhandler_dev_floppy::get_current_position ()
-{
- LARGE_INTEGER off = { QuadPart: 0LL };
- off.LowPart = SetFilePointer (get_handle (), 0, &off.HighPart, FILE_CURRENT);
- return off.QuadPart;
-}
-
-void
-fhandler_dev_floppy::raw_read (void *ptr, size_t& ulen)
-{
- DWORD bytes_read = 0;
- DWORD read2;
- DWORD bytes_to_read;
- int ret;
- size_t len = ulen;
- char *tgt;
- char *p = (char *) ptr;
-
- /* Checking a previous end of media */
- if (eom_detected () && !lastblk_to_read ())
- {
- set_errno (ENOSPC);
- goto err;
- }
-
- if (devbuf)
- {
- while (len > 0)
- {
- if (devbufstart < devbufend)
- {
- bytes_to_read = min (len, devbufend - devbufstart);
- debug_printf ("read %d bytes from buffer (rest %d)",
- bytes_to_read,
- devbufend - devbufstart - bytes_to_read);
- memcpy (p, devbuf + devbufstart, bytes_to_read);
- len -= bytes_to_read;
- p += bytes_to_read;
- bytes_read += bytes_to_read;
- devbufstart += bytes_to_read;
-
- if (lastblk_to_read ())
- {
- lastblk_to_read (false);
- break;
- }
- }
- if (len > 0)
- {
- if (len >= devbufsiz)
- {
- bytes_to_read = (len / bytes_per_sector) * bytes_per_sector;
- tgt = p;
- }
- else
- {
- tgt = devbuf;
- bytes_to_read = devbufsiz;
- }
- _off64_t current_position = get_current_position ();
- if (current_position + bytes_to_read >= drive_size)
- bytes_to_read = drive_size - current_position;
- if (!bytes_to_read)
- break;
-
- debug_printf ("read %d bytes %s", bytes_to_read,
- len < devbufsiz ? "into buffer" : "directly");
- if (!read_file (tgt, bytes_to_read, &read2, &ret))
- {
- if (!IS_EOM (ret))
- {
- __seterrno ();
- goto err;
- }
-
- eom_detected (true);
-
- if (!read2)
- {
- if (!bytes_read)
- {
- debug_printf ("return -1, set errno to ENOSPC");
- set_errno (ENOSPC);
- goto err;
- }
- break;
- }
- lastblk_to_read (true);
- }
- if (!read2)
- break;
- if (tgt == devbuf)
- {
- devbufstart = 0;
- devbufend = read2;
- }
- else
- {
- len -= read2;
- p += read2;
- bytes_read += read2;
- }
- }
- }
- }
- else
- {
- _off64_t current_position = get_current_position ();
- bytes_to_read = len;
- if (current_position + bytes_to_read >= drive_size)
- bytes_to_read = drive_size - current_position;
- if (bytes_to_read && !read_file (p, bytes_to_read, &bytes_read, &ret))
- {
- if (!IS_EOM (ret))
- {
- __seterrno ();
- goto err;
- }
- if (bytes_read)
- eom_detected (true);
- else
- {
- debug_printf ("return -1, set errno to ENOSPC");
- set_errno (ENOSPC);
- goto err;
- }
- }
- }
-
- ulen = (size_t) bytes_read;
- return;
-
-err:
- ulen = (size_t) -1;
-}
-
-int
-fhandler_dev_floppy::raw_write (const void *ptr, size_t len)
-{
- DWORD bytes_written = 0;
- char *p = (char *) ptr;
- int ret;
-
- /* Checking a previous end of media on tape */
- if (eom_detected ())
- {
- set_errno (ENOSPC);
- return -1;
- }
-
- /* Invalidate buffer. */
- devbufstart = devbufend = 0;
-
- if (len > 0)
- {
- if (!write_file (p, len, &bytes_written, &ret))
- {
- if (!IS_EOM (ret))
- {
- __seterrno ();
- return -1;
- }
- eom_detected (true);
- if (!bytes_written)
- {
- set_errno (ENOSPC);
- return -1;
- }
- }
- }
- return bytes_written;
-}
-
-_off64_t
-fhandler_dev_floppy::lseek (_off64_t offset, int whence)
-{
- char buf[bytes_per_sector];
- _off64_t lloffset = offset;
- _off64_t current_pos = (_off64_t) -1;
- LARGE_INTEGER sector_aligned_offset;
- size_t bytes_left;
-
- if (whence == SEEK_END)
- {
- lloffset += drive_size;
- whence = SEEK_SET;
- }
- else if (whence == SEEK_CUR)
- {
- current_pos = get_current_position ();
- lloffset += current_pos - (devbufend - devbufstart);
- whence = SEEK_SET;
- }
-
- if (whence != SEEK_SET || lloffset < 0 || lloffset > drive_size)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- /* If new position is in buffered range, adjust buffer and return */
- if (devbufstart < devbufend)
- {
- if (current_pos == (_off64_t) -1)
- current_pos = get_current_position ();
- if (current_pos - devbufend <= lloffset && lloffset <= current_pos)
- {
- devbufstart = devbufend - (current_pos - lloffset);
- return lloffset;
- }
- }
-
- sector_aligned_offset.QuadPart = (lloffset / bytes_per_sector)
- * bytes_per_sector;
- bytes_left = lloffset - sector_aligned_offset.QuadPart;
-
- /* Invalidate buffer. */
- devbufstart = devbufend = 0;
-
- sector_aligned_offset.LowPart =
- SetFilePointer (get_handle (),
- sector_aligned_offset.LowPart,
- &sector_aligned_offset.HighPart,
- FILE_BEGIN);
- if (sector_aligned_offset.LowPart == INVALID_SET_FILE_POINTER
- && GetLastError ())
- {
- __seterrno ();
- return -1;
- }
-
- eom_detected (false);
-
- if (bytes_left)
- {
- raw_read (buf, bytes_left);
- if (bytes_left == (size_t) -1)
- return -1;
- }
-
- return sector_aligned_offset.QuadPart + bytes_left;
-}
-
-int
-fhandler_dev_floppy::ioctl (unsigned int cmd, void *buf)
-{
- DISK_GEOMETRY di;
- DWORD bytes_read;
- switch (cmd)
- {
- case HDIO_GETGEO:
- {
- debug_printf ("HDIO_GETGEO");
- return get_drive_info ((struct hd_geometry *) buf);
- }
- case BLKGETSIZE:
- case BLKGETSIZE64:
- {
- debug_printf ("BLKGETSIZE");
- if (cmd == BLKGETSIZE)
- *(long *)buf = drive_size >> 9UL;
- else
- *(_off64_t *)buf = drive_size;
- return 0;
- }
- case BLKRRPART:
- {
- debug_printf ("BLKRRPART");
- if (!DeviceIoControl (get_handle (),
- IOCTL_DISK_UPDATE_DRIVE_SIZE,
- NULL, 0,
- &di, sizeof (di),
- &bytes_read, NULL))
- {
- __seterrno ();
- return -1;
- }
- get_drive_info (NULL);
- return 0;
- }
- case BLKSSZGET:
- {
- debug_printf ("BLKSSZGET");
- *(int *)buf = bytes_per_sector;
- return 0;
- }
- case RDSETBLK:
- /* Just check the restriction that blocksize must be a multiple
- of the sector size of the underlying volume sector size,
- then fall through to fhandler_dev_raw::ioctl. */
- if (((struct rdop *) buf)->rd_parm % bytes_per_sector)
- {
- SetLastError (ERROR_INVALID_PARAMETER);
- __seterrno ();
- return -1;
- }
- /*FALLTHRU*/
- default:
- return fhandler_dev_raw::ioctl (cmd, buf);
- }
-}
-
diff --git a/winsup/cygwin/fhandler_mailslot.cc b/winsup/cygwin/fhandler_mailslot.cc
deleted file mode 100644
index edbb094..0000000
--- a/winsup/cygwin/fhandler_mailslot.cc
+++ /dev/null
@@ -1,170 +0,0 @@
-/* fhandler_mailslot.cc. See fhandler.h for a description of the fhandler classes.
-
- Copyright 2005, 2007 Red Hat, Inc.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include "winsup.h"
-
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "ntdll.h"
-
-/**********************************************************************/
-/* fhandler_mailslot */
-
-fhandler_mailslot::fhandler_mailslot ()
- : fhandler_base ()
-{
-}
-
-int __stdcall
-fhandler_mailslot::fstat (struct __stat64 *buf)
-{
- debug_printf ("here");
-
- fhandler_base::fstat (buf);
- if (is_auto_device ())
- {
- buf->st_mode = S_IFCHR | S_IRUSR | S_IWUSR;
- buf->st_uid = geteuid32 ();
- buf->st_gid = getegid32 ();
- buf->st_nlink = 1;
- buf->st_blksize = PREFERRED_IO_BLKSIZE;
- time_as_timestruc_t (&buf->st_ctim);
- buf->st_atim = buf->st_mtim = buf->st_birthtim = buf->st_ctim;
- }
- return 0;
-}
-
-int
-fhandler_mailslot::open (int flags, mode_t mode)
-{
- int res = 0;
- NTSTATUS status;
- IO_STATUS_BLOCK io;
- OBJECT_ATTRIBUTES attr;
- HANDLE x;
- LARGE_INTEGER timeout;
-
- switch (flags & O_ACCMODE)
- {
- case O_RDONLY: /* Server */
- timeout.QuadPart = (flags & O_NONBLOCK) ? 0LL : 0x8000000000000000LL;
- status = NtCreateMailslotFile (&x, GENERIC_READ | SYNCHRONIZE,
- pc.get_object_attr (attr, sec_none),
- &io, FILE_SYNCHRONOUS_IO_NONALERT,
- 0, 0, &timeout);
- if (!NT_SUCCESS (status))
- {
- /* FIXME: It's not possible to open the read side of an existing
- mailslot again. You'll get a handle, but using it in ReadFile
- returns ERROR_INVALID_PARAMETER. On the other hand,
- NtCreateMailslotFile returns with STATUS_OBJECT_NAME_EXISTS if
- the mailslot has been created already.
- So this is an exclusive open for now. *Duplicating* read side
- handles works, though, so it might be an option to duplicate
- the handle from the first process to the current process for
- opening the mailslot. */
-#if 0
- if (status != STATUS_OBJECT_NAME_COLLISION)
- {
- __seterrno_from_nt_status (status);
- break;
- }
- status = NtOpenFile (&x, GENERIC_READ | SYNCHRONIZE,
- pc.get_object_attr (attr, sec_none), &io,
- FILE_SHARE_VALID_FLAGS,
- FILE_SYNCHRONOUS_IO_NONALERT);
-#endif
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- break;
- }
- }
- set_io_handle (x);
- set_flags (flags, O_BINARY);
- res = 1;
- set_open_status ();
- break;
- case O_WRONLY: /* Client */
- /* The client is the DLL exclusively. Don't allow opening from
- application code. */
- extern fhandler_mailslot *dev_kmsg;
- if (this != dev_kmsg)
- {
- set_errno (EPERM); /* As on Linux. */
- break;
- }
- status = NtOpenFile (&x, GENERIC_WRITE | SYNCHRONIZE,
- pc.get_object_attr (attr, sec_none), &io,
- FILE_SHARE_VALID_FLAGS,
- FILE_SYNCHRONOUS_IO_NONALERT);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- break;
- }
- set_io_handle (x);
- set_flags (flags, O_BINARY);
- res = 1;
- set_open_status ();
- break;
- default:
- set_errno (EINVAL);
- break;
- }
- return res;
-}
-
-int
-fhandler_mailslot::write (const void *ptr, size_t len)
-{
- /* Check for 425/426 byte weirdness */
- if (len == 425 || len == 426)
- {
- char buf[427];
- buf[425] = buf[426] = '\0';
- memcpy (buf, ptr, len);
- return raw_write (buf, 427);
- }
- return raw_write (ptr, len);
-}
-
-int
-fhandler_mailslot::ioctl (unsigned int cmd, void *buf)
-{
- int res = -1;
- NTSTATUS status;
- IO_STATUS_BLOCK io;
-
- switch (cmd)
- {
- case FIONBIO:
- {
- FILE_MAILSLOT_SET_INFORMATION fmsi;
- fmsi.ReadTimeout.QuadPart = buf ? 0LL : 0x8000000000000000LL;
- status = NtSetInformationFile (get_handle (), &io, &fmsi, sizeof fmsi,
- FileMailslotSetInformation);
- if (!NT_SUCCESS (status))
- {
- debug_printf ("NtSetInformationFile (%X): %08x",
- fmsi.ReadTimeout.QuadPart, status);
- __seterrno_from_nt_status (status);
- break;
- }
- }
- /*FALLTHRU*/
- default:
- res = fhandler_base::ioctl (cmd, buf);
- break;
- }
- return res;
-}
diff --git a/winsup/cygwin/fhandler_mem.cc b/winsup/cygwin/fhandler_mem.cc
deleted file mode 100644
index 3d277f2..0000000
--- a/winsup/cygwin/fhandler_mem.cc
+++ /dev/null
@@ -1,282 +0,0 @@
-/* fhandler_mem.cc. See fhandler.h for a description of the fhandler classes.
-
- Copyright 2000, 2001, 2002, 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. */
-
-#include "winsup.h"
-#include <unistd.h>
-
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "ntdll.h"
-
-/**********************************************************************/
-/* fhandler_dev_mem */
-
-fhandler_dev_mem::fhandler_dev_mem ()
- : fhandler_base ()
-{
-}
-
-fhandler_dev_mem::~fhandler_dev_mem ()
-{
-}
-
-int
-fhandler_dev_mem::open (int flags, mode_t)
-{
- if (!wincap.has_physical_mem_access ())
- {
- set_errno (ENOENT);
- debug_printf ("%s is accessible under NT4/W2K/XP only", dev ().name);
- return 0;
- }
-
- if (dev () == FH_MEM) /* /dev/mem */
- {
- NTSTATUS ret;
- SYSTEM_BASIC_INFORMATION sbi;
- if ((ret = NtQuerySystemInformation (SystemBasicInformation, (PVOID) &sbi,
- sizeof sbi, NULL)) != STATUS_SUCCESS)
- {
- __seterrno_from_nt_status (ret);
- debug_printf("NtQuerySystemInformation: ret %d, Dos(ret) %E", ret);
- mem_size = 0;
- }
- else
- mem_size = sbi.PhysicalPageSize * sbi.NumberOfPhysicalPages;
- debug_printf ("MemSize: %d MB", mem_size >> 20);
- }
- else if (dev () == FH_KMEM) /* /dev/kmem - Not yet supported */
- {
- mem_size = 0;
- debug_printf ("KMemSize: %d MB", mem_size >> 20);
- }
- else if (dev () == FH_PORT) /* /dev/port == First 64K of /dev/mem */
- {
- mem_size = 65536;
- debug_printf ("PortSize: 64 KB");
- }
- else
- {
- mem_size = 0;
- debug_printf ("Illegal minor number!!!");
- }
-
- /* Check for illegal flags. */
- if (flags & (O_APPEND | O_TRUNC | O_EXCL))
- {
- set_errno (EINVAL);
- return 0;
- }
-
- UNICODE_STRING memstr;
- RtlInitUnicodeString (&memstr, L"\\device\\physicalmemory");
-
- OBJECT_ATTRIBUTES attr;
- InitializeObjectAttributes (&attr, &memstr,
- OBJ_CASE_INSENSITIVE | OBJ_INHERIT,
- NULL, NULL);
-
- ACCESS_MASK section_access;
- if ((flags & O_ACCMODE) == O_RDONLY)
- {
- set_access (GENERIC_READ);
- section_access = SECTION_MAP_READ;
- }
- else if ((flags & O_ACCMODE) == O_WRONLY)
- {
- set_access (GENERIC_WRITE);
- section_access = SECTION_MAP_READ | SECTION_MAP_WRITE;
- }
- else
- {
- set_access (GENERIC_READ | GENERIC_WRITE);
- section_access = SECTION_MAP_READ | SECTION_MAP_WRITE;
- }
-
- HANDLE mem;
- NTSTATUS ret = NtOpenSection (&mem, section_access, &attr);
- if (!NT_SUCCESS (ret))
- {
- __seterrno_from_nt_status (ret);
- set_io_handle (NULL);
- return 0;
- }
-
- set_io_handle (mem);
- set_open_status ();
- return 1;
-}
-
-int
-fhandler_dev_mem::write (const void *ptr, size_t ulen)
-{
- if (!ulen || pos >= mem_size)
- return 0;
-
- if (!(get_access () & GENERIC_WRITE))
- {
- set_errno (EINVAL);
- return -1;
- }
-
- if (pos + ulen > mem_size)
- ulen = mem_size - pos;
-
- PHYSICAL_ADDRESS phys;
- NTSTATUS ret;
- void *viewmem = NULL;
- DWORD len = ulen + getsystempagesize () - 1;
-
- phys.QuadPart = (ULONGLONG) pos;
- if ((ret = NtMapViewOfSection (get_handle (),
- INVALID_HANDLE_VALUE,
- &viewmem,
- 0L,
- len,
- &phys,
- &len,
- ViewShare,
- 0,
- PAGE_READONLY)) != STATUS_SUCCESS)
- {
- __seterrno_from_nt_status (ret);
- return -1;
- }
-
- memcpy ((char *) viewmem + (pos - phys.QuadPart), ptr, ulen);
-
- if (!NT_SUCCESS (ret = NtUnmapViewOfSection (INVALID_HANDLE_VALUE, viewmem)))
- {
- __seterrno_from_nt_status (ret);
- return -1;
- }
-
- pos += ulen;
- return ulen;
-}
-
-void __stdcall
-fhandler_dev_mem::read (void *ptr, size_t& ulen)
-{
- if (!ulen || pos >= mem_size)
- {
- ulen = 0;
- return;
- }
-
- if (!(get_access () & GENERIC_READ))
- {
- set_errno (EINVAL);
- ulen = (size_t) -1;
- return;
- }
-
- if (pos + ulen > mem_size)
- ulen = mem_size - pos;
-
- PHYSICAL_ADDRESS phys;
- NTSTATUS ret;
- void *viewmem = NULL;
- DWORD len = ulen + getsystempagesize () - 1;
-
- phys.QuadPart = (ULONGLONG) pos;
- if ((ret = NtMapViewOfSection (get_handle (),
- INVALID_HANDLE_VALUE,
- &viewmem,
- 0L,
- len,
- &phys,
- &len,
- ViewShare,
- 0,
- PAGE_READONLY)) != STATUS_SUCCESS)
- {
- __seterrno_from_nt_status (ret);
- ulen = (size_t) -1;
- return;
- }
-
- memcpy (ptr, (char *) viewmem + (pos - phys.QuadPart), ulen);
-
- if (!NT_SUCCESS (ret = NtUnmapViewOfSection (INVALID_HANDLE_VALUE, viewmem)))
- {
- __seterrno_from_nt_status (ret);
- ulen = (size_t) -1;
- return;
- }
-
- pos += ulen;
-}
-
-_off64_t
-fhandler_dev_mem::lseek (_off64_t offset, int whence)
-{
- switch (whence)
- {
- case SEEK_SET:
- pos = offset;
- break;
-
- case SEEK_CUR:
- pos += offset;
- break;
-
- case SEEK_END:
- pos = mem_size;
- pos += offset;
- break;
-
- default:
- set_errno (EINVAL);
- return ILLEGAL_SEEK;
- }
-
- if (pos > mem_size)
- {
- set_errno (EINVAL);
- return ILLEGAL_SEEK;
- }
-
- return pos;
-}
-
-int
-fhandler_dev_mem::fstat (struct __stat64 *buf)
-{
- fhandler_base::fstat (buf);
- buf->st_blksize = getsystempagesize ();
- if (is_auto_device ())
- {
- buf->st_mode = S_IFCHR;
- if (wincap.has_physical_mem_access ())
- buf->st_mode |= S_IRUSR | S_IWUSR |
- S_IRGRP | S_IWGRP |
- S_IROTH | S_IWOTH;
- }
-
- return 0;
-}
-
-int
-fhandler_dev_mem::dup (fhandler_base *child)
-{
- int ret = fhandler_base::dup (child);
-
- if (! ret)
- {
- fhandler_dev_mem *fhc = (fhandler_dev_mem *) child;
-
- fhc->mem_size = mem_size;
- fhc->pos = pos;
- }
- return ret;
-}
diff --git a/winsup/cygwin/fhandler_netdrive.cc b/winsup/cygwin/fhandler_netdrive.cc
deleted file mode 100644
index 61401ed..0000000
--- a/winsup/cygwin/fhandler_netdrive.cc
+++ /dev/null
@@ -1,332 +0,0 @@
-/* fhandler_netdrive.cc: fhandler for // and //MACHINE handling
-
- Copyright 2005, 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "cygthread.h"
-#include <winnetwk.h>
-
-#include <dirent.h>
-
-enum
- {
- GET_RESOURCE_INFO = 0,
- GET_RESOURCE_OPENENUM = 1,
- GET_RESOURCE_OPENENUMTOP = 2,
- GET_RESOURCE_ENUM = 3
- };
-
-struct netdriveinf
- {
- int what;
- int ret;
- PVOID in;
- PVOID out;
- DWORD outsize;
- HANDLE sem;
- };
-
-struct net_hdls
- {
- HANDLE net;
- HANDLE dom;
- };
-
-static DWORD WINAPI
-thread_netdrive (void *arg)
-{
- netdriveinf *ndi = (netdriveinf *) arg;
- char provider[256], *dummy = NULL;
- LPNETRESOURCE nro;
- DWORD cnt, size;
- struct net_hdls *nh;
-
- ReleaseSemaphore (ndi->sem, 1, NULL);
- switch (ndi->what)
- {
- case GET_RESOURCE_INFO:
- nro = (LPNETRESOURCE) alloca (size = 4096);
- ndi->ret = WNetGetResourceInformation ((LPNETRESOURCE) ndi->in,
- nro, &size, &dummy);
- break;
- case GET_RESOURCE_OPENENUMTOP:
- nro = (LPNETRESOURCE) alloca (size = 4096);
- nh = (struct net_hdls *) ndi->out;
- ndi->ret = WNetGetProviderName (WNNC_NET_LANMAN, provider,
- (size = 256, &size));
- if (ndi->ret != NO_ERROR)
- break;
- memset (nro, 0, sizeof *nro);
- nro->dwScope = RESOURCE_GLOBALNET;
- nro->dwType = RESOURCETYPE_ANY;
- nro->dwDisplayType = RESOURCEDISPLAYTYPE_GROUP;
- nro->dwUsage = RESOURCEUSAGE_RESERVED | RESOURCEUSAGE_CONTAINER;
- nro->lpRemoteName = provider;
- nro->lpProvider = provider;
- ndi->ret = WNetOpenEnum (RESOURCE_GLOBALNET, RESOURCETYPE_DISK,
- RESOURCEUSAGE_ALL, nro, &nh->net);
- if (ndi->ret != NO_ERROR)
- break;
- while ((ndi->ret = WNetEnumResource (nh->net, (cnt = 1, &cnt), nro,
- (size = 4096, &size))) == NO_ERROR)
- {
- ndi->ret = WNetOpenEnum (RESOURCE_GLOBALNET, RESOURCETYPE_DISK,
- RESOURCEUSAGE_ALL, nro, &nh->dom);
- if (ndi->ret == NO_ERROR)
- break;
- }
- break;
- case GET_RESOURCE_OPENENUM:
- nro = (LPNETRESOURCE) alloca (size = 4096);
- nh = (struct net_hdls *) ndi->out;
- ndi->ret = WNetGetProviderName (WNNC_NET_LANMAN, provider,
- (size = 256, &size));
- if (ndi->ret != NO_ERROR)
- break;
- ((LPNETRESOURCE) ndi->in)->lpProvider = provider;
- ndi->ret = WNetGetResourceInformation ((LPNETRESOURCE) ndi->in,
- nro, &size, &dummy);
- if (ndi->ret != NO_ERROR)
- break;
- ndi->ret = WNetOpenEnum (RESOURCE_GLOBALNET, RESOURCETYPE_DISK,
- RESOURCEUSAGE_ALL, nro, &nh->dom);
- break;
- case GET_RESOURCE_ENUM:
- nh = (struct net_hdls *) ndi->in;
- if (!nh->dom)
- {
- ndi->ret = ERROR_NO_MORE_ITEMS;
- break;
- }
- while ((ndi->ret = WNetEnumResource (nh->dom, (cnt = 1, &cnt),
- (LPNETRESOURCE) ndi->out,
- &ndi->outsize)) != NO_ERROR
- && nh->net)
- {
- WNetCloseEnum (nh->dom);
- nh->dom = NULL;
- nro = (LPNETRESOURCE) alloca (size = 4096);
- while ((ndi->ret = WNetEnumResource (nh->net, (cnt = 1, &cnt), nro,
- (size = 4096, &size))) == NO_ERROR)
- {
- ndi->ret = WNetOpenEnum (RESOURCE_GLOBALNET, RESOURCETYPE_DISK,
- RESOURCEUSAGE_ALL, nro, &nh->dom);
- if (ndi->ret == NO_ERROR)
- break;
- }
- if (ndi->ret != NO_ERROR)
- break;
- }
- break;
- }
- ReleaseSemaphore (ndi->sem, 1, NULL);
- return 0;
-}
-
-static DWORD
-create_thread_and_wait (int what, PVOID in, PVOID out, DWORD outsize,
- const char *name)
-{
- netdriveinf ndi = { what, 0, in, out, outsize,
- CreateSemaphore (&sec_none_nih, 0, 2, NULL) };
- cygthread *thr = new cygthread (thread_netdrive, 0, &ndi, name);
- if (thr->detach (ndi.sem))
- ndi.ret = ERROR_OPERATION_ABORTED;
- CloseHandle (ndi.sem);
- return ndi.ret;
-}
-
-/* Returns 0 if path doesn't exist, >0 if path is a directory,
- -1 if path is a file, -2 if it's a symlink. */
-int
-fhandler_netdrive::exists ()
-{
- char *to;
- const char *from;
- size_t len = strlen (get_name ());
- if (len == 2)
- return 1;
- char namebuf[len + 1];
- for (to = namebuf, from = get_name (); *from; to++, from++)
- *to = (*from == '/') ? '\\' : *from;
- *to = '\0';
-
- NETRESOURCE nr = {0};
- nr.dwScope = RESOURCE_GLOBALNET;
- nr.dwType = RESOURCETYPE_DISK;
- nr.lpLocalName = NULL;
- nr.lpRemoteName = namebuf;
- DWORD ret = create_thread_and_wait (GET_RESOURCE_INFO, &nr, NULL, 0,
- "WNetGetResourceInformation");
- if (ret != ERROR_MORE_DATA && ret != NO_ERROR)
- return 0;
- return 1;
-}
-
-fhandler_netdrive::fhandler_netdrive ():
- fhandler_virtual ()
-{
-}
-
-int
-fhandler_netdrive::fstat (struct __stat64 *buf)
-{
- const char *path = get_name ();
- debug_printf ("fstat (%s)", path);
-
- fhandler_base::fstat (buf);
-
- buf->st_mode = S_IFDIR | STD_RBITS | STD_XBITS;
- buf->st_ino = get_ino ();
-
- return 0;
-}
-
-int
-fhandler_netdrive::readdir (DIR *dir, dirent *de)
-{
- NETRESOURCE *nro;
- DWORD ret;
- int res;
-
- if (!dir->__d_position)
- {
- size_t len = strlen (get_name ());
- char *namebuf = NULL;
- NETRESOURCE nr = { 0 };
- struct net_hdls *nh;
-
- if (len != 2) /* // */
- {
- const char *from;
- char *to;
- namebuf = (char *) alloca (len + 1);
- for (to = namebuf, from = get_name (); *from; to++, from++)
- *to = (*from == '/') ? '\\' : *from;
- *to = '\0';
- }
-
- nr.lpRemoteName = namebuf;
- nr.dwType = RESOURCETYPE_DISK;
- nro = (NETRESOURCE *) alloca (4096);
- nh = (struct net_hdls *) ccalloc (HEAP_FHANDLER, 1, sizeof *nh);
- ret = create_thread_and_wait (len == 2 ? GET_RESOURCE_OPENENUMTOP
- : GET_RESOURCE_OPENENUM,
- &nr, nh, 0, "WNetOpenEnum");
- if (ret != NO_ERROR)
- {
- dir->__handle = INVALID_HANDLE_VALUE;
- res = geterrno_from_win_error (ret);
- goto out;
- }
- dir->__handle = (HANDLE) nh;
- }
- ret = create_thread_and_wait (GET_RESOURCE_ENUM, dir->__handle,
- nro = (LPNETRESOURCE) alloca (16384),
- 16384, "WnetEnumResource");
- if (ret != NO_ERROR)
- res = geterrno_from_win_error (ret);
- else
- {
- dir->__d_position++;
- char *bs = strrchr (nro->lpRemoteName, '\\');
- strcpy (de->d_name, bs ? bs + 1 : nro->lpRemoteName);
- if (strlen (get_name ()) == 2)
- {
- strlwr (de->d_name);
- de->d_ino = hash_path_name (get_ino (), de->d_name);
- }
- else
- {
- de->d_ino = readdir_get_ino (nro->lpRemoteName, false);
- /* We can't trust remote inode numbers of only 32 bit. That means,
- all remote inode numbers when running under NT4, as well as
- remote NT4 NTFS, as well as shares of Samba version < 3.0. */
- if (de->d_ino <= UINT_MAX)
- de->d_ino = hash_path_name (0, nro->lpRemoteName);
- }
-
- res = 0;
- }
-out:
- syscall_printf ("%d = readdir (%p, %p)", res, dir, de);
- return res;
-}
-
-void
-fhandler_netdrive::seekdir (DIR *dir, _off64_t pos)
-{
- rewinddir (dir);
- if (pos < 0)
- return;
- while (dir->__d_position < pos)
- if (!readdir (dir, dir->__d_dirent))
- break;
-}
-
-void
-fhandler_netdrive::rewinddir (DIR *dir)
-{
- if (dir->__handle != INVALID_HANDLE_VALUE)
- {
- struct net_hdls *nh = (struct net_hdls *) dir->__handle;
- if (nh->dom)
- WNetCloseEnum (nh->dom);
- if (nh->net)
- WNetCloseEnum (nh->net);
- cfree (nh);
- }
- dir->__handle = INVALID_HANDLE_VALUE;
- return fhandler_virtual::rewinddir (dir);
-}
-
-int
-fhandler_netdrive::closedir (DIR *dir)
-{
- rewinddir (dir);
- return fhandler_virtual::closedir (dir);
-}
-
-int
-fhandler_netdrive::open (int flags, mode_t mode)
-{
- int res = fhandler_virtual::open (flags, mode);
- if (!res)
- goto out;
-
- nohandle (true);
-
- if ((flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
- {
- set_errno (EEXIST);
- res = 0;
- goto out;
- }
- else if (flags & O_WRONLY)
- {
- set_errno (EISDIR);
- res = 0;
- goto out;
- }
-
- res = 1;
- set_flags ((flags & ~O_TEXT) | O_BINARY | O_DIROPEN);
- set_open_status ();
-out:
- syscall_printf ("%d = fhandler_netdrive::open (%p, %d)", res, flags, mode);
- return res;
-}
-
diff --git a/winsup/cygwin/fhandler_nodevice.cc b/winsup/cygwin/fhandler_nodevice.cc
deleted file mode 100644
index cb3b61e..0000000
--- a/winsup/cygwin/fhandler_nodevice.cc
+++ /dev/null
@@ -1,27 +0,0 @@
-/* fhandler.cc. See console.cc for fhandler_console functions.
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 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. */
-
-#include "winsup.h"
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-
-int
-fhandler_nodevice::open (int, mode_t)
-{
- if (!pc.error)
- set_errno (ENXIO);
- return 0;
-}
-
-fhandler_nodevice::fhandler_nodevice ()
-{
-}
diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc
deleted file mode 100644
index 1227720..0000000
--- a/winsup/cygwin/fhandler_proc.cc
+++ /dev/null
@@ -1,1176 +0,0 @@
-/* fhandler_proc.cc: fhandler for /proc virtual filesystem
-
- Copyright 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "miscfuncs.h"
-#include <unistd.h>
-#include <stdlib.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "pinfo.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include <sys/utsname.h>
-#include <sys/param.h>
-#include "ntdll.h"
-#include <ctype.h>
-#include <winioctl.h>
-#include <wchar.h>
-#include "cpuid.h"
-
-#define _COMPILING_NEWLIB
-#include <dirent.h>
-
-/* offsets in proc_listing */
-static const int PROC_LOADAVG = 2; // /proc/loadavg
-static const int PROC_MEMINFO = 3; // /proc/meminfo
-static const int PROC_REGISTRY = 4; // /proc/registry
-static const int PROC_STAT = 5; // /proc/stat
-static const int PROC_VERSION = 6; // /proc/version
-static const int PROC_UPTIME = 7; // /proc/uptime
-static const int PROC_CPUINFO = 8; // /proc/cpuinfo
-static const int PROC_PARTITIONS = 9; // /proc/partitions
-static const int PROC_SELF = 10; // /proc/self
-static const int PROC_REGISTRY32 = 11; // /proc/registry32
-static const int PROC_REGISTRY64 = 12; // /proc/registry64
-static const int PROC_NET = 13; // /proc/net
-
-/* names of objects in /proc */
-static const char *proc_listing[] = {
- ".",
- "..",
- "loadavg",
- "meminfo",
- "registry",
- "stat",
- "version",
- "uptime",
- "cpuinfo",
- "partitions",
- "self",
- "registry32",
- "registry64",
- "net",
- NULL
-};
-
-#define PROC_DIR_COUNT 4
-
-static const int PROC_LINK_COUNT = (sizeof (proc_listing) / sizeof (const char *)) - 1;
-
-/* FH_PROC in the table below means the file/directory is handles by
- * fhandler_proc.
- */
-static const DWORD proc_fhandlers[PROC_LINK_COUNT] = {
- FH_PROC,
- FH_PROC,
- FH_PROC,
- FH_PROC,
- FH_REGISTRY,
- FH_PROC,
- FH_PROC,
- FH_PROC,
- FH_PROC,
- FH_PROC,
- FH_PROC,
- FH_REGISTRY,
- FH_REGISTRY,
- FH_PROCNET,
-};
-
-/* name of the /proc filesystem */
-const char proc[] = "/proc";
-const int proc_len = sizeof (proc) - 1;
-
-static _off64_t format_proc_meminfo (char *destbuf, size_t maxsize);
-static _off64_t format_proc_stat (char *destbuf, size_t maxsize);
-static _off64_t format_proc_uptime (char *destbuf, size_t maxsize);
-static _off64_t format_proc_cpuinfo (char *destbuf, size_t maxsize);
-static _off64_t format_proc_partitions (char *destbuf, size_t maxsize);
-
-/* Auxillary function that returns the fhandler associated with the given path
- this is where it would be nice to have pattern matching in C - polymorphism
- just doesn't cut it. */
-DWORD
-fhandler_proc::get_proc_fhandler (const char *path)
-{
- debug_printf ("get_proc_fhandler(%s)", path);
- path += proc_len;
- /* Since this method is called from path_conv::check we can't rely on
- it being normalised and therefore the path may have runs of slashes
- in it. */
- while (isdirsep (*path))
- path++;
-
- /* Check if this is the root of the virtual filesystem (i.e. /proc). */
- if (*path == 0)
- return FH_PROC;
-
- for (int i = 0; proc_listing[i]; i++)
- {
- if (path_prefix_p (proc_listing[i], path, strlen (proc_listing[i]),
- false))
- return proc_fhandlers[i];
- }
-
- if (pinfo (atoi (path)))
- return FH_PROCESS;
-
- bool has_subdir = false;
- while (*path)
- if (isdirsep (*path++))
- {
- has_subdir = true;
- break;
- }
-
- if (has_subdir)
- /* The user is trying to access a non-existent subdirectory of /proc. */
- return FH_BAD;
- else
- /* Return FH_PROC so that we can return EROFS if the user is trying to
- create a file. */
- return FH_PROC;
-}
-
-/* Returns 0 if path doesn't exist, >0 if path is a directory,
- -1 if path is a file, -2 if it's a symlink. */
-int
-fhandler_proc::exists ()
-{
- const char *path = get_name ();
- debug_printf ("exists (%s)", path);
- path += proc_len;
- if (*path == 0)
- return 2;
- for (int i = 0; proc_listing[i]; i++)
- if (!strcmp (path + 1, proc_listing[i]))
- {
- fileid = i;
- return (proc_fhandlers[i] == FH_PROC) ? (i == PROC_SELF ? -2 : -1) : 1;
- }
- return 0;
-}
-
-fhandler_proc::fhandler_proc ():
- fhandler_virtual ()
-{
-}
-
-int
-fhandler_proc::fstat (struct __stat64 *buf)
-{
- const char *path = get_name ();
- debug_printf ("fstat (%s)", path);
-
- path += proc_len;
- fhandler_base::fstat (buf);
-
- buf->st_mode &= ~_IFMT & NO_W;
-
- if (!*path)
- {
- winpids pids ((DWORD) 0);
- buf->st_ino = 2;
- buf->st_mode |= S_IFDIR | S_IXUSR | S_IXGRP | S_IXOTH;
- buf->st_nlink = PROC_DIR_COUNT + 2 + pids.npids;
- return 0;
- }
- else
- {
- path++;
- for (int i = 0; proc_listing[i]; i++)
- if (!strcmp (path, proc_listing[i]))
- {
- if (proc_fhandlers[i] != FH_PROC)
- buf->st_mode |= S_IFDIR | S_IXUSR | S_IXGRP | S_IXOTH;
- else if (i == PROC_SELF)
- buf->st_mode = S_IFLNK | S_IRWXU | S_IRWXG | S_IRWXO;
- else
- {
- buf->st_mode &= NO_X;
- buf->st_mode |= S_IFREG;
- }
- return 0;
- }
- }
- set_errno (ENOENT);
- return -1;
-}
-
-int
-fhandler_proc::readdir (DIR *dir, dirent *de)
-{
- int res;
- if (dir->__d_position < PROC_LINK_COUNT)
- {
- strcpy (de->d_name, proc_listing[dir->__d_position++]);
- dir->__flags |= dirent_saw_dot | dirent_saw_dot_dot;
- res = 0;
- }
- else
- {
- winpids pids ((DWORD) 0);
- int found = 0;
- res = ENMFILE;
- for (unsigned i = 0; i < pids.npids; i++)
- if (found++ == dir->__d_position - PROC_LINK_COUNT)
- {
- __small_sprintf (de->d_name, "%d", pids[i]->pid);
- dir->__d_position++;
- res = 0;
- break;
- }
- }
-
- syscall_printf ("%d = readdir (%p, %p) (%s)", res, dir, de, de->d_name);
- return res;
-}
-
-int
-fhandler_proc::open (int flags, mode_t mode)
-{
- int proc_file_no = -1;
-
- int res = fhandler_virtual::open (flags, mode);
- if (!res)
- goto out;
-
- nohandle (true);
-
- const char *path;
-
- path = get_name () + proc_len;
-
- if (!*path)
- {
- if ((flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
- {
- set_errno (EEXIST);
- res = 0;
- goto out;
- }
- else if (flags & O_WRONLY)
- {
- set_errno (EISDIR);
- res = 0;
- goto out;
- }
- else
- {
- flags |= O_DIROPEN;
- goto success;
- }
- }
-
- proc_file_no = -1;
- for (int i = 0; proc_listing[i]; i++)
- if (path_prefix_p (proc_listing[i], path + 1, strlen (proc_listing[i]),
- false))
- {
- proc_file_no = i;
- if (proc_fhandlers[i] != FH_PROC)
- {
- if ((flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
- {
- set_errno (EEXIST);
- res = 0;
- goto out;
- }
- else if (flags & O_WRONLY)
- {
- set_errno (EISDIR);
- res = 0;
- goto out;
- }
- else
- {
- flags |= O_DIROPEN;
- goto success;
- }
- }
- }
-
- if (proc_file_no == -1)
- {
- if (flags & O_CREAT)
- {
- set_errno (EROFS);
- res = 0;
- goto out;
- }
- else
- {
- set_errno (ENOENT);
- res = 0;
- goto out;
- }
- }
- if (flags & O_WRONLY)
- {
- set_errno (EROFS);
- res = 0;
- goto out;
- }
-
- fileid = proc_file_no;
- if (!fill_filebuf ())
- {
- res = 0;
- goto out;
- }
-
- if (flags & O_APPEND)
- position = filesize;
- else
- position = 0;
-
-success:
- res = 1;
- set_flags ((flags & ~O_TEXT) | O_BINARY);
- set_open_status ();
-out:
- syscall_printf ("%d = fhandler_proc::open (%p, %d)", res, flags, mode);
- return res;
-}
-
-bool
-fhandler_proc::fill_filebuf ()
-{
- switch (fileid)
- {
- case PROC_VERSION:
- {
- if (!filebuf)
- {
- struct utsname uts_name;
- uname (&uts_name);
- bufalloc = strlen (uts_name.sysname) + 1
- + strlen (uts_name.release) + 1
- + strlen (uts_name.version) + 2;
- filebuf = (char *) crealloc_abort (filebuf, bufalloc);
- filesize = __small_sprintf (filebuf, "%s %s %s\n",
- uts_name.sysname, uts_name.release,
- uts_name.version);
- }
- break;
- }
- case PROC_UPTIME:
- {
- filebuf = (char *) crealloc_abort (filebuf, bufalloc = 80);
- filesize = format_proc_uptime (filebuf, bufalloc);
- break;
- }
- case PROC_STAT:
- {
- filebuf = (char *) crealloc_abort (filebuf, bufalloc = 16384);
- filesize = format_proc_stat (filebuf, bufalloc);
- break;
- }
- case PROC_LOADAVG:
- {
- /*
- * not really supported - Windows doesn't keep track of these values
- * Windows 95/98/me does have the KERNEL/CPUUsage performance counter
- * which is similar.
- */
- filebuf = (char *) crealloc_abort (filebuf, bufalloc = 16);
- filesize = __small_sprintf (filebuf, "%u.%02u %u.%02u %u.%02u\n",
- 0, 0, 0, 0, 0, 0);
- break;
- }
- case PROC_MEMINFO:
- {
- filebuf = (char *) crealloc_abort (filebuf, bufalloc = 2048);
- filesize = format_proc_meminfo (filebuf, bufalloc);
- break;
- }
- case PROC_CPUINFO:
- {
- filebuf = (char *) crealloc_abort (filebuf, bufalloc = 16384);
- filesize = format_proc_cpuinfo (filebuf, bufalloc);
- break;
- }
- case PROC_PARTITIONS:
- {
- filebuf = (char *) crealloc_abort (filebuf, bufalloc = 4096);
- filesize = format_proc_partitions (filebuf, bufalloc);
- break;
- }
- case PROC_SELF:
- {
- filebuf = (char *) crealloc_abort (filebuf, bufalloc = 32);
- filesize = __small_sprintf (filebuf, "%d", getpid ());
- }
- }
- return true;
-}
-
-static _off64_t
-format_proc_meminfo (char *destbuf, size_t maxsize)
-{
- unsigned long mem_total = 0UL, mem_free = 0UL, swap_total = 0UL,
- swap_free = 0UL;
- MEMORYSTATUS memory_status;
- GlobalMemoryStatus (&memory_status);
- mem_total = memory_status.dwTotalPhys;
- mem_free = memory_status.dwAvailPhys;
- PSYSTEM_PAGEFILE_INFORMATION spi = NULL;
- ULONG size = 512;
- NTSTATUS ret = STATUS_SUCCESS;
- spi = (PSYSTEM_PAGEFILE_INFORMATION) malloc (size);
- if (spi)
- {
- ret = NtQuerySystemInformation (SystemPagefileInformation, (PVOID) spi,
- size, &size);
- if (ret == STATUS_INFO_LENGTH_MISMATCH)
- {
- free (spi);
- spi = (PSYSTEM_PAGEFILE_INFORMATION) malloc (size);
- if (spi)
- ret = NtQuerySystemInformation (SystemPagefileInformation,
- (PVOID) spi, size, &size);
- }
- }
- if (!spi || ret || (!ret && GetLastError () == ERROR_PROC_NOT_FOUND))
- {
- swap_total = memory_status.dwTotalPageFile - mem_total;
- swap_free = memory_status.dwAvailPageFile - mem_total;
- }
- else
- {
- PSYSTEM_PAGEFILE_INFORMATION spp = spi;
- do
- {
- swap_total += spp->CurrentSize * getsystempagesize ();
- swap_free += (spp->CurrentSize - spp->TotalUsed)
- * getsystempagesize ();
- }
- while (spp->NextEntryOffset
- && (spp = (PSYSTEM_PAGEFILE_INFORMATION)
- ((char *) spp + spp->NextEntryOffset)));
- }
- if (spi)
- free (spi);
- return __small_sprintf (destbuf, " total: used: free:\n"
- "Mem: %10lu %10lu %10lu\n"
- "Swap: %10lu %10lu %10lu\n"
- "MemTotal: %10lu kB\n"
- "MemFree: %10lu kB\n"
- "MemShared: 0 kB\n"
- "HighTotal: 0 kB\n"
- "HighFree: 0 kB\n"
- "LowTotal: %10lu kB\n"
- "LowFree: %10lu kB\n"
- "SwapTotal: %10lu kB\n"
- "SwapFree: %10lu kB\n",
- mem_total, mem_total - mem_free, mem_free,
- swap_total, swap_total - swap_free, swap_free,
- mem_total >> 10, mem_free >> 10,
- mem_total >> 10, mem_free >> 10,
- swap_total >> 10, swap_free >> 10);
-}
-
-static _off64_t
-format_proc_uptime (char *destbuf, size_t maxsize)
-{
- unsigned long long uptime = 0ULL, idle_time = 0ULL;
-
- NTSTATUS ret;
- SYSTEM_BASIC_INFORMATION sbi;
- SYSTEM_TIME_OF_DAY_INFORMATION stodi;
- SYSTEM_PERFORMANCE_INFORMATION spi;
-
- ret = NtQuerySystemInformation (SystemBasicInformation, (PVOID) &sbi,
- sizeof sbi, NULL);
- if (!NT_SUCCESS (ret))
- {
- debug_printf ("NtQuerySystemInformation: ret %d", ret);
- sbi.NumberProcessors = 1;
- }
-
- ret = NtQuerySystemInformation (SystemTimeOfDayInformation, &stodi,
- sizeof stodi, NULL);
- if (NT_SUCCESS (ret))
- uptime = (stodi.CurrentTime.QuadPart - stodi.BootTime.QuadPart) / 100000ULL;
-
- ret = NtQuerySystemInformation (SystemPerformanceInformation, &spi,
- sizeof spi, NULL);
- if (NT_SUCCESS (ret))
- idle_time = (spi.IdleTime.QuadPart / sbi.NumberProcessors) / 100000ULL;
-
- return __small_sprintf (destbuf, "%U.%02u %U.%02u\n",
- uptime / 100, long (uptime % 100),
- idle_time / 100, long (idle_time % 100));
-}
-
-static _off64_t
-format_proc_stat (char *destbuf, size_t maxsize)
-{
- unsigned long pages_in = 0UL, pages_out = 0UL, interrupt_count = 0UL,
- context_switches = 0UL, swap_in = 0UL, swap_out = 0UL;
- time_t boot_time = 0;
-
- char *eobuf = destbuf;
- NTSTATUS ret;
- SYSTEM_PERFORMANCE_INFORMATION spi;
- SYSTEM_TIME_OF_DAY_INFORMATION stodi;
-
- SYSTEM_BASIC_INFORMATION sbi;
- if ((ret = NtQuerySystemInformation (SystemBasicInformation,
- (PVOID) &sbi, sizeof sbi, NULL))
- != STATUS_SUCCESS)
- {
- debug_printf ("NtQuerySystemInformation: ret %d", ret);
- sbi.NumberProcessors = 1;
- }
-
- SYSTEM_PROCESSOR_TIMES spt[sbi.NumberProcessors];
- ret = NtQuerySystemInformation (SystemProcessorTimes, (PVOID) spt,
- sizeof spt[0] * sbi.NumberProcessors, NULL);
- interrupt_count = 0;
- if (ret == STATUS_SUCCESS)
- {
- unsigned long long user_time = 0ULL, kernel_time = 0ULL, idle_time = 0ULL;
- for (int i = 0; i < sbi.NumberProcessors; i++)
- {
- kernel_time += (spt[i].KernelTime.QuadPart - spt[i].IdleTime.QuadPart)
- * HZ / 10000000ULL;
- user_time += spt[i].UserTime.QuadPart * HZ / 10000000ULL;
- idle_time += spt[i].IdleTime.QuadPart * HZ / 10000000ULL;
- }
-
- eobuf += __small_sprintf (eobuf, "cpu %U %U %U %U\n",
- user_time, 0ULL, kernel_time, idle_time);
- user_time = 0ULL, kernel_time = 0ULL, idle_time = 0ULL;
- for (int i = 0; i < sbi.NumberProcessors; i++)
- {
- interrupt_count += spt[i].InterruptCount;
- kernel_time = (spt[i].KernelTime.QuadPart - spt[i].IdleTime.QuadPart) * HZ / 10000000ULL;
- user_time = spt[i].UserTime.QuadPart * HZ / 10000000ULL;
- idle_time = spt[i].IdleTime.QuadPart * HZ / 10000000ULL;
- eobuf += __small_sprintf (eobuf, "cpu%d %U %U %U %U\n", i,
- user_time, 0ULL, kernel_time, idle_time);
- }
-
- ret = NtQuerySystemInformation (SystemPerformanceInformation,
- (PVOID) &spi, sizeof spi, NULL);
- }
- if (ret == STATUS_SUCCESS)
- ret = NtQuerySystemInformation (SystemTimeOfDayInformation,
- (PVOID) &stodi,
- sizeof stodi, NULL);
- if (ret != STATUS_SUCCESS)
- {
- debug_printf ("NtQuerySystemInformation: ret %d", ret);
- return 0;
- }
- pages_in = spi.PagesRead;
- pages_out = spi.PagefilePagesWritten + spi.MappedFilePagesWritten;
- /*
- * Note: there is no distinction made in this structure between pages
- * read from the page file and pages read from mapped files, but there
- * is such a distinction made when it comes to writing. Goodness knows
- * why. The value of swap_in, then, will obviously be wrong but its our
- * best guess.
- */
- swap_in = spi.PagesRead;
- swap_out = spi.PagefilePagesWritten;
- context_switches = spi.ContextSwitches;
- boot_time = to_time_t ((FILETIME *) &stodi.BootTime.QuadPart);
-
- eobuf += __small_sprintf (eobuf, "page %u %u\n"
- "swap %u %u\n"
- "intr %u\n"
- "ctxt %u\n"
- "btime %u\n",
- pages_in, pages_out,
- swap_in, swap_out,
- interrupt_count,
- context_switches,
- boot_time);
- return eobuf - destbuf;
-}
-
-#define read_value(x,y) \
- do {\
- dwCount = BUFSIZE; \
- if ((dwError = RegQueryValueEx (hKey, x, NULL, &dwType, (BYTE *) szBuffer, &dwCount)), \
- (dwError != ERROR_SUCCESS && dwError != ERROR_MORE_DATA)) \
- { \
- debug_printf ("RegQueryValueEx failed retcode %d", dwError); \
- return 0; \
- } \
- if (dwType != y) \
- { \
- debug_printf ("Value %s had an unexpected type (expected %d, found %d)", y, dwType); \
- return 0; \
- }\
- } while (0)
-
-#define print(x) \
- do { \
- strcpy (bufptr, x), \
- bufptr += sizeof (x) - 1; \
- } while (0)
-
-static _off64_t
-format_proc_cpuinfo (char *destbuf, size_t maxsize)
-{
- SYSTEM_INFO siSystemInfo;
- HKEY hKey;
- DWORD dwError, dwCount, dwType;
- DWORD dwOldThreadAffinityMask;
- int cpu_number;
- const int BUFSIZE = 256;
- CHAR szBuffer[BUFSIZE];
- char *bufptr = destbuf;
-
- GetSystemInfo (&siSystemInfo);
-
- for (cpu_number = 0; ; cpu_number++)
- {
- if (cpu_number)
- print ("\n");
-
- __small_sprintf (szBuffer, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\%d", cpu_number);
-
- if ((dwError = RegOpenKeyEx (HKEY_LOCAL_MACHINE, szBuffer, 0, KEY_QUERY_VALUE, &hKey)) != ERROR_SUCCESS)
- {
- if (dwError == ERROR_FILE_NOT_FOUND)
- break;
- debug_printf ("RegOpenKeyEx failed retcode %d", dwError);
- return 0;
- }
-
- dwOldThreadAffinityMask = SetThreadAffinityMask (GetCurrentThread (), 1 << cpu_number);
- if (dwOldThreadAffinityMask == 0)
- debug_printf ("SetThreadAffinityMask failed %E");
- // I'm not sure whether the thread changes processor immediately
- // and I'm not sure whether this function will cause the thread to be rescheduled
- low_priority_sleep (0);
-
- bool has_cpuid = false;
-
- if (!can_set_flag (0x00040000))
- debug_printf ("386 processor - no cpuid");
- else
- {
- debug_printf ("486 processor");
- if (can_set_flag (0x00200000))
- {
- debug_printf ("processor supports CPUID instruction");
- has_cpuid = true;
- }
- else
- debug_printf ("processor does not support CPUID instruction");
- }
-
-
- if (!has_cpuid)
- {
- bufptr += __small_sprintf (bufptr, "processor : %d\n", cpu_number);
- read_value ("VendorIdentifier", REG_SZ);
- bufptr += __small_sprintf (bufptr, "vendor_id : %s\n", szBuffer);
- read_value ("Identifier", REG_SZ);
- bufptr += __small_sprintf (bufptr, "identifier : %s\n", szBuffer);
- read_value ("~Mhz", REG_DWORD);
- bufptr += __small_sprintf (bufptr, "cpu MHz : %u\n", *(DWORD *) szBuffer);
-
- print ("flags :");
- if (IsProcessorFeaturePresent (PF_3DNOW_INSTRUCTIONS_AVAILABLE))
- print (" 3dnow");
- if (IsProcessorFeaturePresent (PF_COMPARE_EXCHANGE_DOUBLE))
- print (" cx8");
- if (!IsProcessorFeaturePresent (PF_FLOATING_POINT_EMULATED))
- print (" fpu");
- if (IsProcessorFeaturePresent (PF_MMX_INSTRUCTIONS_AVAILABLE))
- print (" mmx");
- if (IsProcessorFeaturePresent (PF_PAE_ENABLED))
- print (" pae");
- if (IsProcessorFeaturePresent (PF_RDTSC_INSTRUCTION_AVAILABLE))
- print (" tsc");
- if (IsProcessorFeaturePresent (PF_XMMI_INSTRUCTIONS_AVAILABLE))
- print (" sse");
- if (IsProcessorFeaturePresent (PF_XMMI64_INSTRUCTIONS_AVAILABLE))
- print (" sse2");
- }
- else
- {
- bufptr += __small_sprintf (bufptr, "processor\t: %d\n", cpu_number);
- unsigned maxf, vendor_id[4], unused;
- cpuid (&maxf, &vendor_id[0], &vendor_id[2], &vendor_id[1], 0);
- maxf &= 0xffff;
- vendor_id[3] = 0;
-
- // vendor identification
- bool is_amd = false, is_intel = false;
- if (!strcmp ((char*)vendor_id, "AuthenticAMD"))
- is_amd = true;
- else if (!strcmp ((char*)vendor_id, "GenuineIntel"))
- is_intel = true;
-
- bufptr += __small_sprintf (bufptr, "vendor_id\t: %s\n",
- (char *)vendor_id);
- read_value ("~Mhz", REG_DWORD);
- unsigned cpu_mhz = *(DWORD *)szBuffer;
- if (maxf >= 1)
- {
- unsigned features2, features1, extra_info, cpuid_sig;
- cpuid (&cpuid_sig, &extra_info, &features2, &features1, 1);
- /* unsigned extended_family = (cpuid_sig & 0x0ff00000) >> 20,
- extended_model = (cpuid_sig & 0x000f0000) >> 16,
- type = (cpuid_sig & 0x00003000) >> 12; */
- unsigned family = (cpuid_sig & 0x00000f00) >> 8,
- model = (cpuid_sig & 0x000000f0) >> 4,
- stepping = cpuid_sig & 0x0000000f;
- /* Not printed on Linux */
- //unsigned brand_id = extra_info & 0x0000000f;
- //unsigned cpu_count = (extra_info & 0x00ff0000) >> 16;
- unsigned apic_id = (extra_info & 0xff000000) >> 24;
- if (family == 15)
- family += (cpuid_sig >> 20) & 0xff;
- if (family >= 6)
- model += ((cpuid_sig >> 16) & 0x0f) << 4;
- unsigned maxe = 0;
- cpuid (&maxe, &unused, &unused, &unused, 0x80000000);
- if (maxe >= 0x80000004)
- {
- unsigned *model_name = (unsigned *) szBuffer;
- cpuid (&model_name[0], &model_name[1], &model_name[2],
- &model_name[3], 0x80000002);
- cpuid (&model_name[4], &model_name[5], &model_name[6],
- &model_name[7], 0x80000003);
- cpuid (&model_name[8], &model_name[9], &model_name[10],
- &model_name[11], 0x80000004);
- model_name[12] = 0;
- }
- else
- {
- // could implement a lookup table here if someone needs it
- strcpy (szBuffer, "unknown");
- }
- int cache_size = -1,
- tlb_size = -1,
- clflush = 64,
- cache_alignment = 64;
- if (features1 & (1 << 19)) // CLFSH
- clflush = ((extra_info >> 8) & 0xff) << 3;
- if (is_intel && family == 15)
- cache_alignment = clflush * 2;
- if (maxe >= 0x80000005) // L1 Cache and TLB Identifiers
- {
- unsigned data_cache, inst_cache;
- cpuid (&unused, &unused, &data_cache, &inst_cache,
- 0x80000005);
-
- cache_size = (inst_cache >> 24) + (data_cache >> 24);
- tlb_size = 0;
- }
- if (maxe >= 0x80000006) // L2 Cache and L2 TLB Identifiers
- {
- unsigned tlb, l2;
- cpuid (&unused, &tlb, &l2, &unused, 0x80000006);
-
- cache_size = l2 >> 16;
- tlb_size = ((tlb >> 16) & 0xfff) + (tlb & 0xfff);
- }
- bufptr += __small_sprintf (bufptr, "cpu family\t: %d\n"
- "model\t\t: %d\n"
- "model name\t: %s\n"
- "stepping\t: %d\n"
- "cpu MHz\t\t: %d\n",
- family,
- model,
- szBuffer + strspn (szBuffer, " "),
- stepping,
- cpu_mhz);
- if (cache_size >= 0)
- bufptr += __small_sprintf (bufptr, "cache size\t: %d KB\n",
- cache_size);
-
- // Recognize multi-core CPUs
- if (is_amd && maxe >= 0x80000008)
- {
- unsigned core_info;
- cpuid (&unused, &unused, &core_info, &unused, 0x80000008);
-
- int max_cores = 1 + (core_info & 0xff);
- if (max_cores > 1)
- {
- int shift = (core_info >> 12) & 0x0f;
- if (!shift)
- while ((1 << shift) < max_cores)
- ++shift;
- int core_id = apic_id & ((1 << shift) - 1);
- apic_id >>= shift;
-
- bufptr += __small_sprintf (bufptr, "physical id\t: %d\n"
- "core id\t\t: %d\n"
- "cpu cores\t: %d\n",
- apic_id, core_id, max_cores);
- }
- }
- // Recognize Intel Hyper-Transport CPUs
- else if (is_intel && (features1 & (1 << 28)) && maxf >= 4)
- {
- /* TODO */
- }
-
- bufptr += __small_sprintf (bufptr, "fpu\t\t: %s\n"
- "fpu_exception\t: %s\n"
- "cpuid level\t: %d\n"
- "wp\t\t: yes\n",
- (features1 & (1 << 0)) ? "yes" : "no",
- (features1 & (1 << 0)) ? "yes" : "no",
- maxf);
- print ("flags\t\t:");
- if (features1 & (1 << 0))
- print (" fpu");
- if (features1 & (1 << 1))
- print (" vme");
- if (features1 & (1 << 2))
- print (" de");
- if (features1 & (1 << 3))
- print (" pse");
- if (features1 & (1 << 4))
- print (" tsc");
- if (features1 & (1 << 5))
- print (" msr");
- if (features1 & (1 << 6))
- print (" pae");
- if (features1 & (1 << 7))
- print (" mce");
- if (features1 & (1 << 8))
- print (" cx8");
- if (features1 & (1 << 9))
- print (" apic");
- if (features1 & (1 << 11))
- print (" sep");
- if (features1 & (1 << 12))
- print (" mtrr");
- if (features1 & (1 << 13))
- print (" pge");
- if (features1 & (1 << 14))
- print (" mca");
- if (features1 & (1 << 15))
- print (" cmov");
- if (features1 & (1 << 16))
- print (" pat");
- if (features1 & (1 << 17))
- print (" pse36");
- if (features1 & (1 << 18))
- print (" pn");
- if (features1 & (1 << 19))
- print (" clflush");
- if (is_intel && features1 & (1 << 21))
- print (" dts");
- if (is_intel && features1 & (1 << 22))
- print (" acpi");
- if (features1 & (1 << 23))
- print (" mmx");
- if (features1 & (1 << 24))
- print (" fxsr");
- if (features1 & (1 << 25))
- print (" sse");
- if (features1 & (1 << 26))
- print (" sse2");
- if (is_intel && (features1 & (1 << 27)))
- print (" ss");
- if (features1 & (1 << 28))
- print (" ht");
- if (is_intel)
- {
- if (features1 & (1 << 29))
- print (" tm");
- if (features1 & (1 << 30))
- print (" ia64");
- if (features1 & (1 << 31))
- print (" pbe");
- }
-
- if (is_amd && maxe >= 0x80000001)
- {
- unsigned features;
- cpuid (&unused, &unused, &unused, &features, 0x80000001);
-
- if (features & (1 << 11))
- print (" syscall");
- if (features & (1 << 19)) // Huh? Not in AMD64 specs.
- print (" mp");
- if (features & (1 << 20))
- print (" nx");
- if (features & (1 << 22))
- print (" mmxext");
- if (features & (1 << 25))
- print (" fxsr_opt");
- if (features & (1 << 27))
- print (" rdtscp");
- if (features & (1 << 29))
- print (" lm");
- if (features & (1 << 30)) // 31th bit is on
- print (" 3dnowext");
- if (features & (1 << 31)) // 32th bit (highest) is on
- print (" 3dnow");
- }
-
- if (features2 & (1 << 0))
- print (" pni");
- if (is_intel)
- {
- if (features2 & (1 << 3))
- print (" monitor");
- if (features2 & (1 << 4))
- print (" ds_cpl");
- if (features2 & (1 << 7))
- print (" tm2");
- if (features2 & (1 << 8))
- print (" est");
- if (features2 & (1 << 10))
- print (" cid");
- }
- if (features2 & (1 << 13))
- print (" cx16");
-
- if (is_amd && maxe >= 0x80000001)
- {
- unsigned features;
- cpuid (&unused, &unused, &features, &unused, 0x80000001);
-
- if (features & (1 << 0))
- print (" lahf_lm");
- if (features & (1 << 1))
- print (" cmp_legacy");
- if (features & (1 << 2))
- print (" svm");
- if (features & (1 << 4))
- print (" cr8_legacy");
- }
-
- print ("\n");
-
- /* TODO: bogomips */
-
- if (tlb_size >= 0)
- bufptr += __small_sprintf (bufptr,
- "TLB size\t: %d 4K pages\n",
- tlb_size);
- bufptr += __small_sprintf (bufptr, "clflush size\t: %d\n"
- "cache_alignment\t: %d\n",
- clflush,
- cache_alignment);
-
- if (maxe >= 0x80000008) // Address size
- {
- unsigned addr_size, phys, virt;
- cpuid (&addr_size, &unused, &unused, &unused, 0x80000008);
-
- phys = addr_size & 0xff;
- virt = (addr_size >> 8) & 0xff;
- /* Fix an errata on Intel CPUs */
- if (is_intel && family == 15 && model == 3 && stepping == 4)
- phys = 36;
- bufptr += __small_sprintf (bufptr, "address sizes\t: "
- "%u bits physical, "
- "%u bits virtual\n",
- phys, virt);
- }
-
- if (maxe >= 0x80000007) // advanced power management
- {
- cpuid (&unused, &unused, &unused, &features2, 0x80000007);
-
- print ("power management:");
- if (features2 & (1 << 0))
- print (" ts");
- if (features2 & (1 << 1))
- print (" fid");
- if (features2 & (1 << 2))
- print (" vid");
- if (features2 & (1 << 3))
- print (" ttp");
- if (features2 & (1 << 4))
- print (" tm");
- if (features2 & (1 << 5))
- print (" stc");
- }
- }
- else
- {
- bufptr += __small_sprintf (bufptr, "cpu MHz : %d\n"
- "fpu : %s\n",
- cpu_mhz,
- IsProcessorFeaturePresent (PF_FLOATING_POINT_EMULATED) ? "no" : "yes");
- }
- }
- if (dwOldThreadAffinityMask != 0)
- SetThreadAffinityMask (GetCurrentThread (), dwOldThreadAffinityMask);
-
- RegCloseKey (hKey);
- bufptr += __small_sprintf (bufptr, "\n");
- }
-
- return bufptr - destbuf;
-}
-
-#undef read_value
-
-static _off64_t
-format_proc_partitions (char *destbuf, size_t maxsize)
-{
- char *bufptr = destbuf;
- print ("major minor #blocks name\n\n");
-
- char devname[NAME_MAX + 1];
- OBJECT_ATTRIBUTES attr;
- HANDLE dirhdl, devhdl;
- IO_STATUS_BLOCK io;
- NTSTATUS status;
-
- /* Open \Device object directory. */
- wchar_t wpath[MAX_PATH] = L"\\Device";
- UNICODE_STRING upath = {14, 16, wpath};
- InitializeObjectAttributes (&attr, &upath, OBJ_CASE_INSENSITIVE, NULL, NULL);
- status = NtOpenDirectoryObject (&dirhdl, DIRECTORY_QUERY, &attr);
- if (!NT_SUCCESS (status))
- {
- debug_printf ("NtOpenDirectoryObject %x", status);
- return bufptr - destbuf;
- }
-
- /* Traverse \Device directory ... */
- PDIRECTORY_BASIC_INFORMATION dbi = (PDIRECTORY_BASIC_INFORMATION)
- alloca (640);
- BOOLEAN restart = TRUE;
- ULONG context = 0;
- while (NT_SUCCESS (NtQueryDirectoryObject (dirhdl, dbi, 640, TRUE, restart,
- &context, NULL)))
- {
- restart = FALSE;
- sys_wcstombs (devname, NAME_MAX + 1, dbi->ObjectName.Buffer,
- dbi->ObjectName.Length / 2);
- /* ... and check for a "Harddisk[0-9]*" entry. */
- if (!strncasematch (devname, "Harddisk", 8)
- || dbi->ObjectName.Length < 18
- || !isdigit (devname[8]))
- continue;
- /* Construct path name for partition 0, which is the whole disk,
- and try to open. */
- wcscpy (wpath, dbi->ObjectName.Buffer);
- wcscpy (wpath + dbi->ObjectName.Length / 2, L"\\Partition0");
- upath.Length = 22 + dbi->ObjectName.Length;
- upath.MaximumLength = upath.Length + 2;
- InitializeObjectAttributes (&attr, &upath, OBJ_CASE_INSENSITIVE,
- dirhdl, NULL);
- status = NtOpenFile (&devhdl, READ_CONTROL | FILE_READ_DATA, &attr, &io,
- FILE_SHARE_VALID_FLAGS, 0);
- if (!NT_SUCCESS (status))
- {
- /* Retry with READ_CONTROL only for non-privileged users. This
- at least prints the Partition0 info, but it doesn't allow access
- to the drive's layout information. It beats me, though, why
- a non-privileged user shouldn't get read access to the drive
- layout information. */
- status = NtOpenFile (&devhdl, READ_CONTROL, &attr, &io,
- FILE_SHARE_VALID_FLAGS, 0);
- if (!NT_SUCCESS (status))
- {
- debug_printf ("NtOpenFile(%s) %x", devname, status);
- continue;
- }
- }
-
- /* Use a buffer since some ioctl buffers aren't fixed size. */
- char buf[256];
- PARTITION_INFORMATION *pi = NULL;
- PARTITION_INFORMATION_EX *pix = NULL;
- DISK_GEOMETRY *dg = NULL;
- DWORD bytes;
- unsigned long drive_number = strtoul (devname + 8, NULL, 10);
- unsigned long long size;
-
- if (wincap.has_disk_ex_ioctls ()
- && DeviceIoControl (devhdl, IOCTL_DISK_GET_PARTITION_INFO_EX,
- NULL, 0, buf, 256, &bytes, NULL))
- {
- pix = (PARTITION_INFORMATION_EX *) buf;
- size = pix->PartitionLength.QuadPart;
- }
- else if (DeviceIoControl (devhdl, IOCTL_DISK_GET_PARTITION_INFO,
- NULL, 0, buf, 256, &bytes, NULL))
- {
- pi = (PARTITION_INFORMATION *) buf;
- size = pi->PartitionLength.QuadPart;
- }
- else if (DeviceIoControl (devhdl, IOCTL_DISK_GET_DRIVE_GEOMETRY,
- NULL, 0, buf, 256, &bytes, NULL))
- {
- dg = (DISK_GEOMETRY *) buf;
- size = (unsigned long long) dg->Cylinders.QuadPart
- * dg->TracksPerCylinder
- * dg->SectorsPerTrack
- * dg->BytesPerSector;
- }
- else
- size = 0;
- if (!pi && !pix && !dg)
- debug_printf ("DeviceIoControl %E");
- else
- {
- device dev;
- dev.parsedisk (drive_number, 0);
- bufptr += __small_sprintf (bufptr, "%5d %5d %9U %s\n",
- dev.major, dev.minor,
- size >> 10, dev.name + 5);
- }
- size_t buf_size = 8192;
- while (true)
- {
- char buf[buf_size];
- if (DeviceIoControl (devhdl, IOCTL_DISK_GET_DRIVE_LAYOUT,
- NULL, 0, (DRIVE_LAYOUT_INFORMATION *) buf,
- buf_size, &bytes, NULL))
- /* fall through */;
- else if (GetLastError () == ERROR_INSUFFICIENT_BUFFER)
- {
- buf_size *= 2;
- continue;
- }
- else
- {
- debug_printf ("DeviceIoControl %E");
- break;
- }
- DRIVE_LAYOUT_INFORMATION *dli = (DRIVE_LAYOUT_INFORMATION *) buf;
- for (unsigned part = 0; part < dli->PartitionCount; part++)
- {
- if (!dli->PartitionEntry[part].PartitionLength.QuadPart
- || !dli->PartitionEntry[part].RecognizedPartition)
- continue;
- device dev;
- dev.parsedisk (drive_number,
- dli->PartitionEntry[part].PartitionNumber);
- size = dli->PartitionEntry[part].PartitionLength.QuadPart >> 10;
- bufptr += __small_sprintf (bufptr, "%5d %5d %9U %s\n",
- dev.major, dev.minor,
- size, dev.name + 5);
- }
- break;
- }
- NtClose (devhdl);
- }
- NtClose (dirhdl);
-
- return bufptr - destbuf;
-}
-
-#undef print
diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc
deleted file mode 100644
index 25dfbea..0000000
--- a/winsup/cygwin/fhandler_process.cc
+++ /dev/null
@@ -1,957 +0,0 @@
-/* fhandler_process.cc: fhandler for /proc/<pid> virtual filesystem
-
- Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include <sys/cygwin.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "pinfo.h"
-#include "shared_info.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "ntdll.h"
-#include "cygtls.h"
-#include "tls_pbuf.h"
-#include <sys/param.h>
-#include <ctype.h>
-#include <psapi.h>
-
-#define _COMPILING_NEWLIB
-#include <dirent.h>
-
-static const int PROCESS_PPID = 2;
-static const int PROCESS_WINPID = 3;
-static const int PROCESS_WINEXENAME = 4;
-static const int PROCESS_STATUS = 5;
-static const int PROCESS_UID = 6;
-static const int PROCESS_GID = 7;
-static const int PROCESS_PGID = 8;
-static const int PROCESS_SID = 9;
-static const int PROCESS_CTTY = 10;
-static const int PROCESS_STAT = 11;
-static const int PROCESS_STATM = 12;
-static const int PROCESS_CMDLINE = 13;
-static const int PROCESS_MAPS = 14;
-static const int PROCESS_FD = 15;
-static const int PROCESS_EXENAME = 16;
-/* Keep symlinks always the last entries. */
-static const int PROCESS_ROOT = 17;
-static const int PROCESS_EXE = 18;
-static const int PROCESS_CWD = 19;
-
-/* The position of "root" defines the beginning of symlik entries. */
-#define is_symlink(nr) ((nr) >= PROCESS_ROOT)
-
-static const char * const process_listing[] =
-{
- ".",
- "..",
- "ppid",
- "winpid",
- "winexename",
- "status",
- "uid",
- "gid",
- "pgid",
- "sid",
- "ctty",
- "stat",
- "statm",
- "cmdline",
- "maps",
- "fd",
- "exename",
- /* Keep symlinks always the last entries. */
- "root",
- "exe",
- "cwd",
- NULL
-};
-
-static const int PROCESS_LINK_COUNT =
- (sizeof (process_listing) / sizeof (const char *)) - 1;
-
-static _off64_t format_process_maps (_pinfo *p, char *&destbuf, size_t maxsize);
-static _off64_t format_process_stat (_pinfo *p, char *destbuf, size_t maxsize);
-static _off64_t format_process_status (_pinfo *p, char *destbuf, size_t maxsize);
-static _off64_t format_process_statm (_pinfo *p, char *destbuf, size_t maxsize);
-static int get_process_state (DWORD dwProcessId);
-static bool get_mem_values (DWORD dwProcessId, unsigned long *vmsize,
- unsigned long *vmrss, unsigned long *vmtext,
- unsigned long *vmdata, unsigned long *vmlib,
- unsigned long *vmshare);
-
-/* Returns 0 if path doesn't exist, >0 if path is a directory,
- * -1 if path is a file, -2 if path is a symlink, -3 if path is a pipe,
- * -4 if path is a socket.
- */
-int
-fhandler_process::exists ()
-{
- const char *path = get_name ();
- debug_printf ("exists (%s)", path);
- path += proc_len + 1;
- while (*path != 0 && !isdirsep (*path))
- path++;
- if (*path == 0)
- return 2;
-
- for (int i = 0; process_listing[i]; i++)
- if (!strcmp (path + 1, process_listing[i]))
- {
- fileid = i;
- return is_symlink (i) ? -2 : (i == PROCESS_FD) ? 1 : -1;
- }
- if (!strncmp (strchr (path, '/') + 1, "fd/", 3))
- {
- fileid = PROCESS_FD;
- if (fill_filebuf ())
- return -2;
- /* Check for nameless device entries. */
- path = strrchr (path, '/');
- if (path && *++path)
- {
- if (!strncmp (path, "pipe:[", 6))
- return -3;
- else if (!strncmp (path, "socket:[", 8))
- return -4;
- }
- }
- return 0;
-}
-
-fhandler_process::fhandler_process ():
- fhandler_proc ()
-{
-}
-
-int
-fhandler_process::fstat (struct __stat64 *buf)
-{
- const char *path = get_name ();
- int file_type = exists ();
- fhandler_base::fstat (buf);
- path += proc_len + 1;
- pid = atoi (path);
- pinfo p (pid);
- if (!p)
- {
- set_errno (ENOENT);
- return -1;
- }
-
- buf->st_mode &= ~_IFMT & NO_W;
-
- switch (file_type)
- {
- case 0:
- set_errno (ENOENT);
- return -1;
- case 1:
- case 2:
- buf->st_ctime = buf->st_mtime = buf->st_birthtime = p->start_time;
- buf->st_ctim.tv_nsec = buf->st_mtim.tv_nsec
- = buf->st_birthtim.tv_nsec = 0;
- time_as_timestruc_t (&buf->st_atim);
- buf->st_uid = p->uid;
- buf->st_gid = p->gid;
- buf->st_mode |= S_IFDIR | S_IXUSR | S_IXGRP | S_IXOTH;
- if (file_type == 1)
- buf->st_nlink = 2;
- else
- buf->st_nlink = 3;
- return 0;
- case -2:
- buf->st_uid = p->uid;
- buf->st_gid = p->gid;
- buf->st_mode = S_IFLNK | S_IRWXU | S_IRWXG | S_IRWXO;
- return 0;
- case -3:
- buf->st_uid = p->uid;
- buf->st_gid = p->gid;
- buf->st_mode = S_IFIFO | S_IRUSR | S_IWUSR;
- return 0;
- case -4:
- buf->st_uid = p->uid;
- buf->st_gid = p->gid;
- buf->st_mode = S_IFSOCK | S_IRUSR | S_IWUSR;
- return 0;
- case -1:
- default:
- buf->st_uid = p->uid;
- buf->st_gid = p->gid;
- buf->st_mode |= S_IFREG | S_IRUSR | S_IRGRP | S_IROTH;
- return 0;
- }
-}
-
-DIR *
-fhandler_process::opendir (int fd)
-{
- DIR *dir = fhandler_virtual::opendir (fd);
- if (dir && fileid == PROCESS_FD)
- fill_filebuf ();
- return dir;
-}
-
-int
-fhandler_process::readdir (DIR *dir, dirent *de)
-{
- int res = ENMFILE;
- if (fileid == PROCESS_FD)
- {
- if (dir->__d_position >= 2 + filesize / sizeof (int))
- goto out;
- }
- else if (dir->__d_position >= PROCESS_LINK_COUNT)
- goto out;
- if (fileid == PROCESS_FD && dir->__d_position > 1)
- {
- int *p = (int *) filebuf;
- __small_sprintf (de->d_name, "%d", p[dir->__d_position++ - 2]);
- }
- else
- strcpy (de->d_name, process_listing[dir->__d_position++]);
- dir->__flags |= dirent_saw_dot | dirent_saw_dot_dot;
- res = 0;
-out:
- syscall_printf ("%d = readdir (%p, %p) (%s)", res, dir, de, de->d_name);
- return res;
-}
-
-int
-fhandler_process::open (int flags, mode_t mode)
-{
- int process_file_no = -1;
-
- int res = fhandler_virtual::open (flags, mode);
- if (!res)
- goto out;
-
- nohandle (true);
-
- const char *path;
- path = get_name () + proc_len + 1;
- pid = atoi (path);
- while (*path != 0 && !isdirsep (*path))
- path++;
-
- if (*path == 0)
- {
- if ((flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
- {
- set_errno (EEXIST);
- res = 0;
- goto out;
- }
- else if (flags & O_WRONLY)
- {
- set_errno (EISDIR);
- res = 0;
- goto out;
- }
- else
- {
- flags |= O_DIROPEN;
- goto success;
- }
- }
-
- process_file_no = -1;
- for (int i = 0; process_listing[i]; i++)
- {
- if (path_prefix_p (process_listing[i], path + 1,
- strlen (process_listing[i]), false))
- process_file_no = i;
- }
- if (process_file_no == -1)
- {
- if (flags & O_CREAT)
- {
- set_errno (EROFS);
- res = 0;
- goto out;
- }
- else
- {
- set_errno (ENOENT);
- res = 0;
- goto out;
- }
- }
- if (process_file_no == PROCESS_FD)
- {
- flags |= O_DIROPEN;
- goto success;
- }
- if (flags & O_WRONLY)
- {
- set_errno (EROFS);
- res = 0;
- goto out;
- }
-
- fileid = process_file_no;
- if (!fill_filebuf ())
- {
- res = 0;
- goto out;
- }
-
- if (flags & O_APPEND)
- position = filesize;
- else
- position = 0;
-
-success:
- res = 1;
- set_flags ((flags & ~O_TEXT) | O_BINARY);
- set_open_status ();
-out:
- syscall_printf ("%d = fhandler_proc::open (%p, %d)", res, flags, mode);
- return res;
-}
-
-bool
-fhandler_process::fill_filebuf ()
-{
- const char *path;
- path = get_name () + proc_len + 1;
- if (!pid)
- pid = atoi (path);
-
- pinfo p (pid);
-
- if (!p)
- {
- set_errno (ENOENT);
- return false;
- }
-
- switch (fileid)
- {
- case PROCESS_FD:
- {
- size_t fs;
- char *fdp = strrchr (path, '/');
- if (!fdp || *++fdp == 'f') /* The "fd" directory itself. */
- {
- if (filebuf)
- cfree (filebuf);
- filebuf = p->fds (fs);
- }
- else
- {
- if (filebuf)
- cfree (filebuf);
- int fd = atoi (fdp);
- if (fd < 0 || (fd == 0 && !isdigit (*fdp)))
- {
- set_errno (ENOENT);
- return false;
- }
- filebuf = p->fd (fd, fs);
- if (!filebuf || !*filebuf)
- {
- set_errno (ENOENT);
- return false;
- }
- }
- filesize = fs;
- break;
- }
- case PROCESS_UID:
- case PROCESS_GID:
- case PROCESS_PGID:
- case PROCESS_SID:
- case PROCESS_CTTY:
- case PROCESS_PPID:
- {
- filebuf = (char *) crealloc_abort (filebuf, bufalloc = 40);
- int num;
- switch (fileid)
- {
- case PROCESS_PPID:
- num = p->ppid;
- break;
- case PROCESS_UID:
- num = p->uid;
- break;
- case PROCESS_PGID:
- num = p->pgid;
- break;
- case PROCESS_SID:
- num = p->sid;
- break;
- case PROCESS_GID:
- num = p->gid;
- break;
- case PROCESS_CTTY:
- num = p->ctty;
- break;
- default: // what's this here for?
- num = 0;
- break;
- }
- __small_sprintf (filebuf, "%d\n", num);
- filesize = strlen (filebuf);
- break;
- }
- case PROCESS_ROOT:
- case PROCESS_CWD:
- case PROCESS_CMDLINE:
- {
- if (filebuf)
- {
- cfree (filebuf);
- filebuf = NULL;
- }
- size_t fs;
- switch (fileid)
- {
- case PROCESS_ROOT:
- filebuf = p->root (fs);
- break;
- case PROCESS_CWD:
- filebuf = p->cwd (fs);
- break;
- case PROCESS_CMDLINE:
- filebuf = p->cmdline (fs);
- break;
- }
- filesize = fs;
- if (!filebuf || !*filebuf)
- {
- filebuf = cstrdup ("<defunct>");
- filesize = strlen (filebuf) + 1;
- }
- break;
- }
- case PROCESS_EXENAME:
- case PROCESS_EXE:
- {
- filebuf = (char *) crealloc_abort (filebuf, bufalloc = NT_MAX_PATH);
- if (p->process_state & PID_EXITED)
- strcpy (filebuf, "<defunct>");
- else
- {
- mount_table->conv_to_posix_path (p->progname, filebuf, 1);
- int len = strlen (filebuf);
- if (len > 4)
- {
- char *s = filebuf + len - 4;
- if (ascii_strcasematch (s, ".exe"))
- *s = 0;
- }
- }
- filesize = strlen (filebuf);
- break;
- }
- case PROCESS_WINPID:
- {
- filebuf = (char *) crealloc_abort (filebuf, bufalloc = 40);
- __small_sprintf (filebuf, "%d\n", p->dwProcessId);
- filesize = strlen (filebuf);
- break;
- }
- case PROCESS_WINEXENAME:
- {
- int len = strlen (p->progname);
- filebuf = (char *) crealloc_abort (filebuf, bufalloc = (len + 2));
- strcpy (filebuf, p->progname);
- filebuf[len] = '\n';
- filesize = len + 1;
- break;
- }
- case PROCESS_STATUS:
- {
- filebuf = (char *) crealloc_abort (filebuf, bufalloc = 2048);
- filesize = format_process_status (*p, filebuf, bufalloc);
- break;
- }
- case PROCESS_STAT:
- {
- filebuf = (char *) crealloc_abort (filebuf, bufalloc = 2048);
- filesize = format_process_stat (*p, filebuf, bufalloc);
- break;
- }
- case PROCESS_STATM:
- {
- filebuf = (char *) crealloc_abort (filebuf, bufalloc = 2048);
- filesize = format_process_statm (*p, filebuf, bufalloc);
- break;
- }
- case PROCESS_MAPS:
- {
- filebuf = (char *) crealloc_abort (filebuf, bufalloc = 2048);
- filesize = format_process_maps (*p, filebuf, bufalloc);
- break;
- }
- }
-
- return true;
-}
-
-static _off64_t
-format_process_maps (_pinfo *p, char *&destbuf, size_t maxsize)
-{
- HANDLE proc = OpenProcess (PROCESS_QUERY_INFORMATION | PROCESS_VM_READ,
- FALSE,
- p->dwProcessId);
- if (!proc)
- return 0;
-
- _off64_t len = 0;
- HMODULE *modules;
- DWORD needed, i;
- DWORD_PTR wset_size;
- DWORD_PTR *workingset = NULL;
- MODULEINFO info;
-
- tmp_pathbuf tp;
- PWCHAR modname = tp.w_get ();
- char *posix_modname = tp.c_get ();
-
- if (!EnumProcessModules (proc, NULL, 0, &needed))
- {
- __seterrno ();
- len = -1;
- goto out;
- }
- modules = (HMODULE*) alloca (needed);
- if (!EnumProcessModules (proc, modules, needed, &needed))
- {
- __seterrno ();
- len = -1;
- goto out;
- }
-
- QueryWorkingSet (proc, (void *) &wset_size, sizeof wset_size);
- if (GetLastError () == ERROR_BAD_LENGTH)
- {
- workingset = (DWORD_PTR *) alloca (sizeof (DWORD_PTR) * ++wset_size);
- if (!QueryWorkingSet (proc, (void *) workingset,
- sizeof (DWORD_PTR) * wset_size))
- workingset = NULL;
- }
- for (i = 0; i < needed / sizeof (HMODULE); i++)
- if (GetModuleInformation (proc, modules[i], &info, sizeof info)
- && GetModuleFileNameExW (proc, modules[i], modname, NT_MAX_PATH))
- {
- char access[5];
- strcpy (access, "r--p");
- struct __stat64 st;
- if (mount_table->conv_to_posix_path (modname, posix_modname, 0))
- sys_wcstombs (posix_modname, NT_MAX_PATH, modname);
- if (stat64 (posix_modname, &st))
- {
- st.st_dev = 0;
- st.st_ino = 0;
- }
- if (len + strlen (posix_modname) + 62 > maxsize - 1)
- destbuf = (char *) crealloc_abort (destbuf, maxsize += 2048);
- if (workingset)
- for (unsigned i = 1; i <= wset_size; ++i)
- {
- DWORD_PTR addr = workingset[i] & 0xfffff000UL;
- if ((char *)addr >= info.lpBaseOfDll
- && (char *)addr < (char *)info.lpBaseOfDll + info.SizeOfImage)
- {
- access[0] = (workingset[i] & 0x5) ? 'r' : '-';
- access[1] = (workingset[i] & 0x4) ? 'w' : '-';
- access[2] = (workingset[i] & 0x2) ? 'x' : '-';
- access[3] = (workingset[i] & 0x100) ? 's' : 'p';
- }
- }
- int written = __small_sprintf (destbuf + len,
- "%08lx-%08lx %s %08lx %04x:%04x %U ",
- info.lpBaseOfDll,
- (unsigned long)info.lpBaseOfDll
- + info.SizeOfImage,
- access,
- info.EntryPoint,
- st.st_dev >> 16,
- st.st_dev & 0xffff,
- st.st_ino);
- while (written < 62)
- destbuf[len + written++] = ' ';
- len += written;
- len += __small_sprintf (destbuf + len, "%s\n", posix_modname);
- }
-out:
- CloseHandle (proc);
- return len;
-}
-
-static _off64_t
-format_process_stat (_pinfo *p, char *destbuf, size_t maxsize)
-{
- char cmd[NAME_MAX + 1];
- int state = 'R';
- unsigned long fault_count = 0UL,
- utime = 0UL, stime = 0UL,
- start_time = 0UL,
- vmsize = 0UL, vmrss = 0UL, vmmaxrss = 0UL;
- int priority = 0;
- if (p->process_state & PID_EXITED)
- strcpy (cmd, "<defunct>");
- else
- {
- char *last_slash = strrchr (p->progname, '\\');
- strcpy (cmd, last_slash ? last_slash + 1 : p->progname);
- int len = strlen (cmd);
- if (len > 4)
- {
- char *s = cmd + len - 4;
- if (ascii_strcasematch (s, ".exe"))
- *s = 0;
- }
- }
- /*
- * Note: under Windows, a _process_ is always running - it's only _threads_
- * that get suspended. Therefore the default state is R (runnable).
- */
- if (p->process_state & PID_EXITED)
- state = 'Z';
- else if (p->process_state & PID_STOPPED)
- state = 'T';
- else
- state = get_process_state (p->dwProcessId);
- start_time = (GetTickCount () / 1000 - time (NULL) + p->start_time) * HZ;
-
- NTSTATUS ret;
- HANDLE hProcess;
- VM_COUNTERS vmc;
- KERNEL_USER_TIMES put;
- PROCESS_BASIC_INFORMATION pbi;
- QUOTA_LIMITS ql;
- SYSTEM_TIME_OF_DAY_INFORMATION stodi;
- SYSTEM_PROCESSOR_TIMES spt;
- hProcess = OpenProcess (PROCESS_VM_READ | PROCESS_QUERY_INFORMATION,
- FALSE, p->dwProcessId);
- if (hProcess != NULL)
- {
- ret = NtQueryInformationProcess (hProcess,
- ProcessVmCounters,
- (PVOID) &vmc,
- sizeof vmc, NULL);
- if (ret == STATUS_SUCCESS)
- ret = NtQueryInformationProcess (hProcess,
- ProcessTimes,
- (PVOID) &put,
- sizeof put, NULL);
- if (ret == STATUS_SUCCESS)
- ret = NtQueryInformationProcess (hProcess,
- ProcessBasicInformation,
- (PVOID) &pbi,
- sizeof pbi, NULL);
- if (ret == STATUS_SUCCESS)
- ret = NtQueryInformationProcess (hProcess,
- ProcessQuotaLimits,
- (PVOID) &ql,
- sizeof ql, NULL);
- CloseHandle (hProcess);
- }
- else
- {
- DWORD error = GetLastError ();
- __seterrno_from_win_error (error);
- debug_printf ("OpenProcess: ret %d", error);
- return 0;
- }
- if (ret == STATUS_SUCCESS)
- ret = NtQuerySystemInformation (SystemTimeOfDayInformation,
- (PVOID) &stodi,
- sizeof stodi, NULL);
- if (ret == STATUS_SUCCESS)
- ret = NtQuerySystemInformation (SystemProcessorTimes,
- (PVOID) &spt,
- sizeof spt, NULL);
- if (ret != STATUS_SUCCESS)
- {
- __seterrno_from_nt_status (ret);
- debug_printf ("NtQueryInformationProcess: ret %d, Dos(ret) %E", ret);
- return 0;
- }
- fault_count = vmc.PageFaultCount;
- utime = put.UserTime.QuadPart * HZ / 10000000ULL;
- stime = put.KernelTime.QuadPart * HZ / 10000000ULL;
-#if 0
- if (stodi.CurrentTime.QuadPart > put.CreateTime.QuadPart)
- start_time = (spt.KernelTime.QuadPart + spt.UserTime.QuadPart -
- stodi.CurrentTime.QuadPart + put.CreateTime.QuadPart) * HZ / 10000000ULL;
- else
- /*
- * sometimes stodi.CurrentTime is a bit behind
- * Note: some older versions of procps are broken and can't cope
- * with process start times > time(NULL).
- */
- start_time = (spt.KernelTme.QuadPart + spt.UserTime.QuadPart) * HZ / 10000000ULL;
-#endif
- priority = pbi.BasePriority;
- unsigned page_size = getsystempagesize ();
- vmsize = vmc.PagefileUsage;
- vmrss = vmc.WorkingSetSize / page_size;
- vmmaxrss = ql.MaximumWorkingSetSize / page_size;
-
- return __small_sprintf (destbuf, "%d (%s) %c "
- "%d %d %d %d %d "
- "%lu %lu %lu %lu %lu %lu %lu "
- "%ld %ld %ld %ld %ld %ld "
- "%lu %lu "
- "%ld "
- "%lu",
- p->pid, cmd,
- state,
- p->ppid, p->pgid, p->sid, makedev (FH_TTYS, p->ctty),
- -1, 0, fault_count, fault_count, 0, 0, utime, stime,
- utime, stime, priority, 0, 0, 0,
- start_time, vmsize,
- vmrss, vmmaxrss
- );
-}
-
-static _off64_t
-format_process_status (_pinfo *p, char *destbuf, size_t maxsize)
-{
- char cmd[NAME_MAX + 1];
- int state = 'R';
- const char *state_str = "unknown";
- unsigned long vmsize = 0UL, vmrss = 0UL, vmdata = 0UL, vmlib = 0UL, vmtext = 0UL,
- vmshare = 0UL;
- if (p->process_state & PID_EXITED)
- strcpy (cmd, "<defunct>");
- else
- {
- char *last_slash = strrchr (p->progname, '\\');
- strcpy (cmd, last_slash ? last_slash + 1 : p->progname);
- int len = strlen (cmd);
- if (len > 4)
- {
- char *s = cmd + len - 4;
- if (ascii_strcasematch (s, ".exe"))
- *s = 0;
- }
- }
- /*
- * Note: under Windows, a _process_ is always running - it's only _threads_
- * that get suspended. Therefore the default state is R (runnable).
- */
- if (p->process_state & PID_EXITED)
- state = 'Z';
- else if (p->process_state & PID_STOPPED)
- state = 'T';
- else
- state = get_process_state (p->dwProcessId);
- switch (state)
- {
- case 'O':
- state_str = "running";
- break;
- case 'D':
- case 'S':
- state_str = "sleeping";
- break;
- case 'R':
- state_str = "runnable";
- break;
- case 'Z':
- state_str = "zombie";
- break;
- case 'T':
- state_str = "stopped";
- break;
- }
- if (!get_mem_values (p->dwProcessId, &vmsize, &vmrss, &vmtext, &vmdata,
- &vmlib, &vmshare))
- return 0;
- unsigned page_size = getsystempagesize ();
- vmsize *= page_size; vmrss *= page_size; vmdata *= page_size;
- vmtext *= page_size; vmlib *= page_size;
- // The real uid value for *this* process is stored at cygheap->user.real_uid
- // but we can't get at the real uid value for any other process, so
- // just fake it as p->uid. Similar for p->gid.
- return __small_sprintf (destbuf, "Name:\t%s\n"
- "State:\t%c (%s)\n"
- "Tgid:\t%d\n"
- "Pid:\t%d\n"
- "PPid:\t%d\n"
- "Uid:\t%d %d %d %d\n"
- "Gid:\t%d %d %d %d\n"
- "VmSize:\t%8d kB\n"
- "VmLck:\t%8d kB\n"
- "VmRSS:\t%8d kB\n"
- "VmData:\t%8d kB\n"
- "VmStk:\t%8d kB\n"
- "VmExe:\t%8d kB\n"
- "VmLib:\t%8d kB\n"
- "SigPnd:\t%016x\n"
- "SigBlk:\t%016x\n"
- "SigIgn:\t%016x\n",
- cmd,
- state, state_str,
- p->pgid,
- p->pid,
- p->ppid,
- p->uid, p->uid, p->uid, p->uid,
- p->gid, p->gid, p->gid, p->gid,
- vmsize >> 10, 0, vmrss >> 10, vmdata >> 10, 0,
- vmtext >> 10, vmlib >> 10,
- 0, 0, _my_tls.sigmask
- );
-}
-
-static _off64_t
-format_process_statm (_pinfo *p, char *destbuf, size_t maxsize)
-{
- unsigned long vmsize = 0UL, vmrss = 0UL, vmtext = 0UL, vmdata = 0UL,
- vmlib = 0UL, vmshare = 0UL;
- if (!get_mem_values (p->dwProcessId, &vmsize, &vmrss, &vmtext, &vmdata,
- &vmlib, &vmshare))
- return 0;
- return __small_sprintf (destbuf, "%ld %ld %ld %ld %ld %ld %ld",
- vmsize, vmrss, vmshare, vmtext, vmlib, vmdata, 0);
-}
-
-static int
-get_process_state (DWORD dwProcessId)
-{
- /*
- * This isn't really heavy magic - just go through the processes'
- * threads one by one and return a value accordingly
- * Errors are silently ignored.
- */
- NTSTATUS ret;
- SYSTEM_PROCESSES *sp;
- ULONG n = 0x1000;
- PULONG p = new ULONG[n];
- int state =' ';
- while (STATUS_INFO_LENGTH_MISMATCH ==
- (ret = NtQuerySystemInformation (SystemProcessesAndThreadsInformation,
- (PVOID) p,
- n * sizeof *p, NULL)))
- delete [] p, p = new ULONG[n *= 2];
- if (ret != STATUS_SUCCESS)
- {
- debug_printf ("NtQuerySystemInformation: ret %d, Dos(ret) %d",
- ret, RtlNtStatusToDosError (ret));
- goto out;
- }
- state = 'Z';
- sp = (SYSTEM_PROCESSES *) p;
- for (;;)
- {
- if (sp->ProcessId == dwProcessId)
- {
- SYSTEM_THREADS *st;
- if (wincap.has_process_io_counters ())
- /*
- * Windows 2000 and XP have an extra member in SYSTEM_PROCESSES
- * which means the offset of the first SYSTEM_THREADS entry is
- * different on these operating systems compared to NT 4.
- */
- st = &sp->Threads[0];
- else
- /*
- * 136 is the offset of the first SYSTEM_THREADS entry on
- * Windows NT 4.
- */
- st = (SYSTEM_THREADS *) ((char *) sp + 136);
- state = 'S';
- for (unsigned i = 0; i < sp->ThreadCount; i++)
- {
- if (st->State == StateRunning ||
- st->State == StateReady)
- {
- state = 'R';
- goto out;
- }
- st++;
- }
- break;
- }
- if (!sp->NextEntryDelta)
- break;
- sp = (SYSTEM_PROCESSES *) ((char *) sp + sp->NextEntryDelta);
- }
-out:
- delete [] p;
- return state;
-}
-
-static bool
-get_mem_values (DWORD dwProcessId, unsigned long *vmsize, unsigned long *vmrss,
- unsigned long *vmtext, unsigned long *vmdata,
- unsigned long *vmlib, unsigned long *vmshare)
-{
- bool res = true;
- NTSTATUS ret;
- HANDLE hProcess;
- VM_COUNTERS vmc;
- MEMORY_WORKING_SET_LIST *mwsl;
- ULONG n = 0x1000, length;
- PULONG p = (PULONG) malloc (sizeof (ULONG) * n);
- unsigned page_size = getsystempagesize ();
- hProcess = OpenProcess (PROCESS_QUERY_INFORMATION,
- FALSE, dwProcessId);
- if (hProcess == NULL)
- {
- DWORD error = GetLastError ();
- __seterrno_from_win_error (error);
- debug_printf ("OpenProcess: ret %d", error);
- return false;
- }
- while ((ret = NtQueryVirtualMemory (hProcess, 0,
- MemoryWorkingSetList,
- (PVOID) p,
- n * sizeof *p, &length)),
- (ret == STATUS_SUCCESS || ret == STATUS_INFO_LENGTH_MISMATCH) &&
- length >= (n * sizeof (*p)))
- p = (PULONG) realloc (p, n *= (2 * sizeof (ULONG)));
-
- if (ret != STATUS_SUCCESS)
- {
- debug_printf ("NtQueryVirtualMemory: ret %d, Dos(ret) %d",
- ret, RtlNtStatusToDosError (ret));
- res = false;
- goto out;
- }
- mwsl = (MEMORY_WORKING_SET_LIST *) p;
- for (unsigned long i = 0; i < mwsl->NumberOfPages; i++)
- {
- ++*vmrss;
- unsigned flags = mwsl->WorkingSetList[i] & 0x0FFF;
- if ((flags & (WSLE_PAGE_EXECUTE | WSLE_PAGE_SHAREABLE)) == (WSLE_PAGE_EXECUTE | WSLE_PAGE_SHAREABLE))
- ++*vmlib;
- else if (flags & WSLE_PAGE_SHAREABLE)
- ++*vmshare;
- else if (flags & WSLE_PAGE_EXECUTE)
- ++*vmtext;
- else
- ++*vmdata;
- }
- ret = NtQueryInformationProcess (hProcess, ProcessVmCounters, (PVOID) &vmc,
- sizeof vmc, NULL);
- if (ret != STATUS_SUCCESS)
- {
- debug_printf ("NtQueryInformationProcess: ret %d, Dos(ret) %d",
- ret, RtlNtStatusToDosError (ret));
- res = false;
- goto out;
- }
- *vmsize = vmc.PagefileUsage / page_size;
-out:
- free (p);
- CloseHandle (hProcess);
- return res;
-}
diff --git a/winsup/cygwin/fhandler_procnet.cc b/winsup/cygwin/fhandler_procnet.cc
deleted file mode 100644
index 692a6dc..0000000
--- a/winsup/cygwin/fhandler_procnet.cc
+++ /dev/null
@@ -1,302 +0,0 @@
-/* fhandler_procnet.cc: fhandler for /proc/net virtual filesystem
-
- Copyright 2007 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 __INSIDE_CYGWIN_NET__
-
-#include "winsup.h"
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-
-#include <netdb.h>
-#define USE_SYS_TYPES_FD_SET
-#include <winsock2.h>
-#include <iphlpapi.h>
-#include <asm/byteorder.h>
-#include <cygwin/in6.h>
-
-#define _COMPILING_NEWLIB
-#include <dirent.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-extern "C" int ip_addr_prefix (PIP_ADAPTER_UNICAST_ADDRESS pua,
- PIP_ADAPTER_PREFIX pap);
-bool get_adapters_addresses (PIP_ADAPTER_ADDRESSES *pa0, ULONG family);
-
-static const int PROCNET_IFINET6 = 2;
-
-static const char * const process_listing[] =
-{
- ".",
- "..",
- "if_inet6",
- NULL
-};
-
-static const int PROCESS_LINK_COUNT =
- (sizeof (process_listing) / sizeof (const char *)) - 1;
-
-static _off64_t format_procnet_ifinet6 (char *&filebuf);
-
-/* Returns 0 if path doesn't exist, >0 if path is a directory,
- * -1 if path is a file, -2 if path is a symlink, -3 if path is a pipe,
- * -4 if path is a socket.
- */
-int
-fhandler_procnet::exists ()
-{
- const char *path = get_name ();
- debug_printf ("exists (%s)", path);
- path += proc_len + 1;
- while (*path != 0 && !isdirsep (*path))
- path++;
- if (*path == 0)
- return 1;
-
- for (int i = 0; process_listing[i]; i++)
- if (!strcmp (path + 1, process_listing[i]))
- {
- if (i == PROCNET_IFINET6)
- {
- if (!wincap.has_gaa_prefixes ()
- || !get_adapters_addresses (NULL, AF_INET6))
- return 0;
- }
- fileid = i;
- return -1;
- }
- return 0;
-}
-
-fhandler_procnet::fhandler_procnet ():
- fhandler_proc ()
-{
-}
-
-int
-fhandler_procnet::fstat (struct __stat64 *buf)
-{
- fhandler_base::fstat (buf);
- buf->st_mode &= ~_IFMT & NO_W;
- int file_type = exists ();
- switch (file_type)
- {
- case 0:
- set_errno (ENOENT);
- return -1;
- case 1:
- case 2:
- buf->st_mode |= S_IFDIR | S_IXUSR | S_IXGRP | S_IXOTH;
- buf->st_nlink = 2;
- return 0;
- case -1:
- default:
- buf->st_mode |= S_IFREG | S_IRUSR | S_IRGRP | S_IROTH;
- return 0;
- }
-}
-
-int
-fhandler_procnet::readdir (DIR *dir, dirent *de)
-{
- int res = ENMFILE;
- if (dir->__d_position >= PROCESS_LINK_COUNT)
- goto out;
- if (dir->__d_position == PROCNET_IFINET6)
- {
- if (!wincap.has_gaa_prefixes ()
- || !get_adapters_addresses (NULL, AF_INET6))
- goto out;
- }
- strcpy (de->d_name, process_listing[dir->__d_position++]);
- dir->__flags |= dirent_saw_dot | dirent_saw_dot_dot;
- res = 0;
-out:
- syscall_printf ("%d = readdir (%p, %p) (%s)", res, dir, de, de->d_name);
- return res;
-}
-
-int
-fhandler_procnet::open (int flags, mode_t mode)
-{
- int process_file_no = -1;
-
- int res = fhandler_virtual::open (flags, mode);
- if (!res)
- goto out;
-
- nohandle (true);
-
- const char *path;
- path = get_name () + proc_len + 1;
- while (*path != 0 && !isdirsep (*path))
- path++;
-
- if (*path == 0)
- {
- if ((flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
- {
- set_errno (EEXIST);
- res = 0;
- goto out;
- }
- else if (flags & O_WRONLY)
- {
- set_errno (EISDIR);
- res = 0;
- goto out;
- }
- else
- {
- flags |= O_DIROPEN;
- goto success;
- }
- }
-
- process_file_no = -1;
- for (int i = 0; process_listing[i]; i++)
- {
- if (path_prefix_p (process_listing[i], path + 1,
- strlen (process_listing[i]), false))
- process_file_no = i;
- }
- if (process_file_no == -1)
- {
- if (flags & O_CREAT)
- {
- set_errno (EROFS);
- res = 0;
- goto out;
- }
- else
- {
- set_errno (ENOENT);
- res = 0;
- goto out;
- }
- }
- if (flags & O_WRONLY)
- {
- set_errno (EROFS);
- res = 0;
- goto out;
- }
-
- fileid = process_file_no;
- if (!fill_filebuf ())
- {
- res = 0;
- goto out;
- }
-
- if (flags & O_APPEND)
- position = filesize;
- else
- position = 0;
-
-success:
- res = 1;
- set_flags ((flags & ~O_TEXT) | O_BINARY);
- set_open_status ();
-out:
- syscall_printf ("%d = fhandler_proc::open (%p, %d)", res, flags, mode);
- return res;
-}
-
-bool
-fhandler_procnet::fill_filebuf ()
-{
- switch (fileid)
- {
- case PROCNET_IFINET6:
- {
- bufalloc = filesize = format_procnet_ifinet6 (filebuf);
- break;
- }
- }
-
- return true;
-}
-
-/* Return the same scope values as Linux. */
-static unsigned int
-get_scope (struct in6_addr *addr)
-{
- if (IN6_IS_ADDR_LOOPBACK (addr))
- return 0x10;
- if (IN6_IS_ADDR_LINKLOCAL (addr))
- return 0x20;
- if (IN6_IS_ADDR_SITELOCAL (addr))
- return 0x40;
- if (IN6_IS_ADDR_V4COMPAT (addr))
- return 0x80;
- return 0x0;
-}
-
-/* Convert DAD state into Linux compatible values. */
-static unsigned int dad_to_flags[] =
-{
- 0x02, /* Invalid -> NODAD */
- 0x40, /* Tentative -> TENTATIVE */
- 0xc0, /* Duplicate -> PERMANENT | TENTATIVE */
- 0x20, /* Deprecated -> DEPRECATED */
- 0x80 /* Preferred -> PERMANENT */
-};
-
-static _off64_t
-format_procnet_ifinet6 (char *&filebuf)
-{
- PIP_ADAPTER_ADDRESSES pa0 = NULL, pap;
- PIP_ADAPTER_UNICAST_ADDRESS pua;
- ULONG alloclen;
-
- if (!wincap.has_gaa_prefixes ())
- return 0;
- _off64_t filesize = 0;
- if (!get_adapters_addresses (&pa0, AF_INET6))
- goto out;
- alloclen = 0;
- for (pap = pa0; pap; pap = pap->Next)
- for (pua = pap->FirstUnicastAddress; pua; pua = pua->Next)
- alloclen += 100;
- if (!alloclen)
- goto out;
- filebuf = (char *) crealloc (filebuf, alloclen);
- if (!filebuf)
- goto out;
- for (pap = pa0; pap; pap = pap->Next)
- for (pua = pap->FirstUnicastAddress; pua; pua = pua->Next)
- {
- struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)
- pua->Address.lpSockaddr;
- for (int i = 0; i < 8; ++i)
- /* __small_sprintf generates upper-case hex. */
- filesize += sprintf (filebuf + filesize, "%04x",
- ntohs (sin6->sin6_addr.s6_addr16[i]));
- filebuf[filesize++] = ' ';
- filesize += sprintf (filebuf + filesize,
- "%02lx %02x %02x %02x %s\n",
- pap->Ipv6IfIndex,
- ip_addr_prefix (pua, pap->FirstPrefix),
- get_scope (&((struct sockaddr_in6 *)
- pua->Address.lpSockaddr)->sin6_addr),
- dad_to_flags [pua->DadState],
- pap->AdapterName);
- }
-
-out:
- if (pa0)
- free (pa0);
- return filesize;
-}
diff --git a/winsup/cygwin/fhandler_random.cc b/winsup/cygwin/fhandler_random.cc
deleted file mode 100644
index b8784b0..0000000
--- a/winsup/cygwin/fhandler_random.cc
+++ /dev/null
@@ -1,188 +0,0 @@
-/* fhandler_random.cc: code to access /dev/random and /dev/urandom
-
- Copyright 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
-
- Written by Corinna Vinschen (vinschen@cygnus.com)
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <limits.h>
-#include <unistd.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-
-#define RANDOM 8
-#define URANDOM 9
-
-#define PSEUDO_MULTIPLIER (6364136223846793005LL)
-#define PSEUDO_SHIFTVAL (21)
-
-fhandler_dev_random::fhandler_dev_random ()
- : fhandler_base (), crypt_prov ((HCRYPTPROV) NULL)
-{
-}
-
-int
-fhandler_dev_random::open (int flags, mode_t)
-{
- set_flags ((flags & ~O_TEXT) | O_BINARY);
- nohandle (true);
- set_open_status ();
- dummy_offset = 0;
- return 1;
-}
-
-bool
-fhandler_dev_random::crypt_gen_random (void *ptr, size_t len)
-{
- if (!crypt_prov
- && !CryptAcquireContext (&crypt_prov, NULL, MS_DEF_PROV, PROV_RSA_FULL,
- CRYPT_VERIFYCONTEXT | CRYPT_MACHINE_KEYSET)
- && !CryptAcquireContext (&crypt_prov, NULL, MS_DEF_PROV, PROV_RSA_FULL,
- CRYPT_VERIFYCONTEXT | CRYPT_MACHINE_KEYSET
- | CRYPT_NEWKEYSET))
- {
- debug_printf ("%E = CryptAquireContext()");
- return false;
- }
- if (!CryptGenRandom (crypt_prov, len, (BYTE *)ptr))
- {
- debug_printf ("%E = CryptGenRandom()");
- return false;
- }
- return true;
-}
-
-int
-fhandler_dev_random::pseudo_write (const void *ptr, size_t len)
-{
- /* Use buffer to mess up the pseudo random number generator. */
- for (size_t i = 0; i < len; ++i)
- pseudo = (pseudo + ((unsigned char *)ptr)[i]) * PSEUDO_MULTIPLIER + 1;
- return len;
-}
-
-int
-fhandler_dev_random::write (const void *ptr, size_t len)
-{
- if (!len)
- return 0;
- if (!ptr)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- /* Limit len to a value <= 512 since we don't want to overact.
- Copy to local buffer because CryptGenRandom violates const. */
- unsigned char buf[512];
- size_t limited_len = len <= 512 ? len : 512;
- memcpy (buf, ptr, limited_len);
-
- /* Mess up system entropy source. Return error if device is /dev/random. */
- if (!crypt_gen_random (buf, limited_len) && dev () == FH_RANDOM)
- {
- __seterrno ();
- return -1;
- }
- /* Mess up the pseudo random number generator. */
- pseudo_write (buf, limited_len);
- return len;
-}
-
-int
-fhandler_dev_random::pseudo_read (void *ptr, size_t len)
-{
- /* Use pseudo random number generator as fallback entropy source.
- This multiplier was obtained from Knuth, D.E., "The Art of
- Computer Programming," Vol 2, Seminumerical Algorithms, Third
- Edition, Addison-Wesley, 1998, p. 106 (line 26) & p. 108 */
- for (size_t i = 0; i < len; ++i)
- {
- pseudo = pseudo * PSEUDO_MULTIPLIER + 1;
- ((unsigned char *)ptr)[i] = (pseudo >> PSEUDO_SHIFTVAL) & UCHAR_MAX;
- }
- return len;
-}
-
-void __stdcall
-fhandler_dev_random::read (void *ptr, size_t& len)
-{
- if (!len)
- return;
-
- if (!ptr)
- {
- set_errno (EINVAL);
- len = (size_t) -1;
- return;
- }
-
- if (crypt_gen_random (ptr, len))
- return;
-
- /* If device is /dev/urandom, use pseudo number generator as fallback.
- Don't do this for /dev/random since it's intended for uses that need
- very high quality randomness. */
- if (dev () == FH_URANDOM)
- {
- len = pseudo_read (ptr, len);
- return;
- }
-
- __seterrno ();
- len = (size_t) -1;
-}
-
-_off64_t
-fhandler_dev_random::lseek (_off64_t off, int whence)
-{
- /* As on Linux, fake being able to set an offset. The fact that neither
- reading nor writing changes the dummy offset is also the same as on
- Linux (tested with kernel 2.6.23). */
- _off64_t new_off;
-
- switch (whence)
- {
- case SEEK_SET:
- new_off = off;
- break;
- case SEEK_CUR:
- new_off = dummy_offset + off;
- break;
- default:
- set_errno (EINVAL);
- return (_off64_t) -1;
- }
- if (new_off < 0)
- {
- set_errno (EINVAL);
- return (_off64_t) -1;
- }
- return dummy_offset = new_off;
-}
-
-int
-fhandler_dev_random::close ()
-{
- if (!hExeced && crypt_prov)
- while (!CryptReleaseContext (crypt_prov, 0)
- && GetLastError () == ERROR_BUSY)
- Sleep (10);
- return 0;
-}
-
-int
-fhandler_dev_random::dup (fhandler_base *child)
-{
- fhandler_dev_random *fhr = (fhandler_dev_random *) child;
- fhr->crypt_prov = (HCRYPTPROV)NULL;
- return 0;
-}
diff --git a/winsup/cygwin/fhandler_raw.cc b/winsup/cygwin/fhandler_raw.cc
deleted file mode 100644
index 8c46ab6..0000000
--- a/winsup/cygwin/fhandler_raw.cc
+++ /dev/null
@@ -1,201 +0,0 @@
-/* fhandler_raw.cc. See fhandler.h for a description of the fhandler classes.
-
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007 Red Hat, Inc.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include "winsup.h"
-
-#include <cygwin/rdevio.h>
-#include <sys/mtio.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-
-/**********************************************************************/
-/* fhandler_dev_raw */
-
-fhandler_dev_raw::fhandler_dev_raw ()
- : fhandler_base (), status ()
-{
- need_fork_fixup (true);
-}
-
-fhandler_dev_raw::~fhandler_dev_raw ()
-{
- if (devbufsiz > 1L)
- delete [] devbuf;
-}
-
-int __stdcall
-fhandler_dev_raw::fstat (struct __stat64 *buf)
-{
- debug_printf ("here");
-
- fhandler_base::fstat (buf);
- if (is_auto_device ())
- {
- if (get_major () == DEV_TAPE_MAJOR)
- buf->st_mode = S_IFCHR | STD_RBITS | STD_WBITS | S_IWGRP | S_IWOTH;
- else
- buf->st_mode = S_IFBLK | STD_RBITS | STD_WBITS | S_IWGRP | S_IWOTH;
-
- buf->st_uid = geteuid32 ();
- buf->st_gid = getegid32 ();
- buf->st_nlink = 1;
- buf->st_blksize = PREFERRED_IO_BLKSIZE;
- time_as_timestruc_t (&buf->st_ctim);
- buf->st_atim = buf->st_mtim = buf->st_birthtim = buf->st_ctim;
- }
- return 0;
-}
-
-int
-fhandler_dev_raw::open (int flags, mode_t)
-{
- /* Check for illegal flags. */
- if (get_major () != DEV_TAPE_MAJOR && (flags & (O_APPEND | O_EXCL)))
- {
- set_errno (EINVAL);
- return 0;
- }
-
- /* Always open a raw device existing and binary. */
- flags &= ~(O_CREAT | O_TRUNC);
- flags |= O_BINARY;
-
- /* Write-only doesn't work well with raw devices */
- if ((flags & O_ACCMODE) == O_WRONLY)
- flags = ((flags & ~O_WRONLY) | O_RDWR);
-
- int res = fhandler_base::open (flags, 0);
- if (res && devbufsiz > 1L)
- devbuf = new char [devbufsiz];
-
- return res;
-}
-
-int
-fhandler_dev_raw::dup (fhandler_base *child)
-{
- int ret = fhandler_base::dup (child);
-
- if (!ret)
- {
- fhandler_dev_raw *fhc = (fhandler_dev_raw *) child;
-
- fhc->devbufsiz = devbufsiz;
- if (devbufsiz > 1L)
- fhc->devbuf = new char [devbufsiz];
- fhc->devbufstart = 0;
- fhc->devbufend = 0;
- fhc->lastblk_to_read (false);
- }
- return ret;
-}
-
-void
-fhandler_dev_raw::fixup_after_fork (HANDLE)
-{
- devbufstart = 0;
- devbufend = 0;
- lastblk_to_read (false);
-}
-
-void
-fhandler_dev_raw::fixup_after_exec ()
-{
- if (!close_on_exec ())
- {
- if (devbufsiz > 1L)
- devbuf = new char [devbufsiz];
- devbufstart = 0;
- devbufend = 0;
- lastblk_to_read (false);
- }
-}
-
-int
-fhandler_dev_raw::ioctl (unsigned int cmd, void *buf)
-{
- int ret = NO_ERROR;
-
- if (cmd == RDIOCDOP)
- {
- struct rdop *op = (struct rdop *) buf;
-
- if (!op)
- ret = ERROR_INVALID_PARAMETER;
- else
- switch (op->rd_op)
- {
- case RDSETBLK:
- if (get_major () == DEV_TAPE_MAJOR)
- {
- struct mtop mop;
-
- mop.mt_op = MTSETBLK;
- mop.mt_count = op->rd_parm;
- ret = ioctl (MTIOCTOP, &mop);
- }
- else if ((devbuf && ((op->rd_parm <= 1 && (devbufend - devbufstart))
- || op->rd_parm < devbufend - devbufstart))
- || (op->rd_parm > 1 && (op->rd_parm % 512))
- || (get_flags () & O_DIRECT))
- /* The conditions for a *valid* parameter are these:
- - If there's still data in the current buffer, it must
- fit in the new buffer.
- - The new size is either 0 or 1, both indicating unbufferd
- I/O, or the new buffersize must be a multiple of 512.
- - In the O_DIRECT case, the whole request is invalid. */
- ret = ERROR_INVALID_PARAMETER;
- else if (!devbuf || op->rd_parm != devbufsiz)
- {
- char *buf = NULL;
- if (op->rd_parm > 1L)
- buf = new char [op->rd_parm];
- if (buf && devbufsiz > 1L)
- {
- memcpy (buf, devbuf + devbufstart, devbufend - devbufstart);
- devbufend -= devbufstart;
- }
- else
- devbufend = 0;
-
- if (devbufsiz > 1L)
- delete [] devbuf;
-
- devbufstart = 0;
- devbuf = buf;
- devbufsiz = op->rd_parm ?: 1L;
- }
- break;
- default:
- break;
- }
- }
- else if (cmd == RDIOCGET)
- {
- struct rdget *get = (struct rdget *) buf;
-
- if (!get)
- ret = ERROR_INVALID_PARAMETER;
- else
- get->bufsiz = devbufsiz;
- }
- else
- return fhandler_base::ioctl (cmd, buf);
-
- if (ret != NO_ERROR)
- {
- SetLastError (ret);
- __seterrno ();
- return -1;
- }
- return 0;
-}
diff --git a/winsup/cygwin/fhandler_registry.cc b/winsup/cygwin/fhandler_registry.cc
deleted file mode 100644
index c3c2264..0000000
--- a/winsup/cygwin/fhandler_registry.cc
+++ /dev/null
@@ -1,960 +0,0 @@
-/* fhandler_registry.cc: fhandler for /proc/registry virtual filesystem
-
- Copyright 2002, 2003, 2003, 2004, 2005, 2006, 2007 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. */
-
-/* FIXME: Access permissions are ignored at the moment. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-
-#define _COMPILING_NEWLIB
-#include <dirent.h>
-
-/* If this bit is set in __d_position then we are enumerating values,
- * else sub-keys. keeping track of where we are is horribly messy
- * the bottom 16 bits are the absolute position and the top 15 bits
- * make up the value index if we are enuerating values.
- */
-static const _off_t REG_ENUM_VALUES_MASK = 0x8000000;
-static const _off_t REG_POSITION_MASK = 0xffff;
-
-/* List of root keys in /proc/registry.
- * Possibly we should filter out those not relevant to the flavour of Windows
- * Cygwin is running on.
- */
-static const char *registry_listing[] =
-{
- ".",
- "..",
- "HKEY_CLASSES_ROOT",
- "HKEY_CURRENT_CONFIG",
- "HKEY_CURRENT_USER",
- "HKEY_LOCAL_MACHINE",
- "HKEY_USERS",
- "HKEY_PERFORMANCE_DATA", // NT/2000/XP
- NULL
-};
-
-static const HKEY registry_keys[] =
-{
- (HKEY) INVALID_HANDLE_VALUE,
- (HKEY) INVALID_HANDLE_VALUE,
- HKEY_CLASSES_ROOT,
- HKEY_CURRENT_CONFIG,
- HKEY_CURRENT_USER,
- HKEY_LOCAL_MACHINE,
- HKEY_USERS,
- HKEY_PERFORMANCE_DATA
-};
-
-static const int ROOT_KEY_COUNT = sizeof (registry_keys) / sizeof (HKEY);
-
-/* These get added to each subdirectory in /proc/registry.
- * If we wanted to implement writing, we could maybe add a '.writable' entry or
- * suchlike.
- */
-static const char *special_dot_files[] =
-{
- ".",
- "..",
- NULL
-};
-
-static const int SPECIAL_DOT_FILE_COUNT =
- (sizeof (special_dot_files) / sizeof (const char *)) - 1;
-
-/* Value names for HKEY_PERFORMANCE_DATA.
- *
- * CAUTION: Never call RegQueryValueEx (HKEY_PERFORMANCE_DATA, "Add", ...).
- * It WRITES data and may destroy the perfc009.dat file. Same applies to
- * name prefixes "Ad" and "A".
- */
-static const char * const perf_data_files[] =
-{
- "@",
- "Costly",
- "Global"
-};
-
-static const int PERF_DATA_FILE_COUNT =
- sizeof (perf_data_files) / sizeof (perf_data_files[0]);
-
-static HKEY open_key (const char *name, REGSAM access, DWORD wow64, bool isValue);
-
-/* Return true if char must be encoded.
- */
-static inline bool
-must_encode (char c)
-{
- return (isdirsep (c) || c == ':' || c == '%');
-}
-
-/* Encode special chars in registry key or value name.
- * Returns 0: success, -1: error.
- */
-static int
-encode_regname (char * dst, const char * src, bool add_val)
-{
- int di = 0;
- if (!src[0])
- dst[di++] = '@'; // Default value.
- else
- for (int si = 0; src[si]; si++)
- {
- char c = src[si];
- if (must_encode (c) ||
- (si == 0 && ((c == '.' && (!src[1] || (src[1] == '.' && !src[2]))) ||
- (c == '@' && !src[1]))))
- {
- if (di + 3 >= NAME_MAX + 1)
- return -1;
- __small_sprintf (dst + di, "%%%02x", c);
- di += 3;
- }
- else
- dst[di++] = c;
- }
-
- if (add_val)
- {
- if (di + 4 >= NAME_MAX + 1)
- return -1;
- memcpy (dst + di, "%val", 4);
- di += 4;
- }
-
- dst[di] = 0;
- return 0;
-}
-
-/* Decode special chars in registry key or value name.
- * Returns 0: success, 1: "%val" detected, -1: error.
- */
-static int
-decode_regname (char * dst, const char * src, int len = -1)
-{
- if (len < 0)
- len = strlen (src);
-
- int res = 0;
- if (len > 4 && !memcmp (src + len - 4, "%val", 4))
- {
- len -= 4;
- res = 1;
- }
-
- int di = 0;
- if (len == 1 && src[0] == '@')
- ; // Default value.
- else
- for (int si = 0; si < len; si++)
- {
- char c = src[si];
- if (c == '%')
- {
- if (si + 2 >= len)
- return -1;
- char s[] = {src[si+1], src[si+2], '\0'};
- char *p;
- c = strtoul (s, &p, 16);
- if (!(must_encode (c) ||
- (si == 0 && ((c == '.' && (len == 3 || (src[3] == '.' && len == 4))) ||
- (c == '@' && len == 3)))))
- return -1;
- dst[di++] = c;
- si += 2;
- }
- else
- dst[di++] = c;
- }
-
- dst[di] = 0;
- return res;
-}
-
-
-/* Hash table to limit calls to key_exists ().
- */
-class __DIR_hash
-{
-public:
- __DIR_hash ()
- {
- memset (table, 0, sizeof(table));
- }
-
- void set (unsigned h)
- {
- table [(h >> 3) & (HASH_SIZE - 1)] |= (1 << (h & 0x3));
- }
-
- bool is_set (unsigned h) const
- {
- return (table [(h >> 3) & (HASH_SIZE - 1)] & (1 << (h & 0x3))) != 0;
- }
-
-private:
- enum { HASH_SIZE = 1024 };
- unsigned char table[HASH_SIZE];
-};
-
-#define d_hash(d) ((__DIR_hash *) (d)->__d_internal)
-
-
-/* Return true if subkey NAME exists in key PARENT.
- */
-static bool
-key_exists (HKEY parent, const char * name, DWORD wow64)
-{
- HKEY hKey = (HKEY) INVALID_HANDLE_VALUE;
- LONG error = RegOpenKeyEx (parent, name, 0, KEY_READ | wow64, &hKey);
- if (error == ERROR_SUCCESS)
- RegCloseKey (hKey);
-
- return (error == ERROR_SUCCESS || error == ERROR_ACCESS_DENIED);
-}
-
-/* Returns 0 if path doesn't exist, >0 if path is a directory,
- * <0 if path is a file.
- *
- * We open the last key but one and then enum it's sub-keys and values to see if the
- * final component is there. This gets round the problem of not having security access
- * to the final key in the path.
- */
-int
-fhandler_registry::exists ()
-{
- int file_type = 0, index = 0, pathlen;
- DWORD buf_size = NAME_MAX + 1;
- LONG error;
- char buf[buf_size];
- const char *file;
- HKEY hKey = (HKEY) INVALID_HANDLE_VALUE;
-
- const char *path = get_name ();
- debug_printf ("exists (%s)", path);
- path += proc_len + prefix_len + 1;
- if (*path)
- path++;
- else
- {
- file_type = 2;
- goto out;
- }
- pathlen = strlen (path);
- file = path + pathlen - 1;
- if (isdirsep (*file) && pathlen > 1)
- file--;
- while (!isdirsep (*file))
- file--;
- file++;
-
- if (file == path)
- {
- for (int i = 0; registry_listing[i]; i++)
- if (path_prefix_p (registry_listing[i], path,
- strlen (registry_listing[i]), true))
- {
- file_type = 1;
- break;
- }
- }
- else
- {
- char dec_file[NAME_MAX + 1];
-
- int val_only = decode_regname (dec_file, file);
- if (val_only < 0)
- goto out;
-
- if (!val_only)
- hKey = open_key (path, KEY_READ, wow64, false);
- if (hKey != (HKEY) INVALID_HANDLE_VALUE || get_errno () == EACCES)
- file_type = 1;
- else
- {
- hKey = open_key (path, KEY_READ, wow64, true);
- if (hKey == (HKEY) INVALID_HANDLE_VALUE)
- return 0;
-
- if (hKey == HKEY_PERFORMANCE_DATA)
- {
- /* RegEnumValue () returns garbage for this key.
- RegQueryValueEx () returns a PERF_DATA_BLOCK even
- if a value does not contain any counter objects.
- So allow access to the generic names and to
- (blank separated) lists of counter numbers.
- Never allow access to "Add", see above comment. */
- for (int i = 0; i < PERF_DATA_FILE_COUNT && file_type == 0; i++)
- {
- if (strcasematch (perf_data_files[i], file))
- file_type = -1;
- }
- if (file_type == 0 && !file[strspn (file, " 0123456789")])
- file_type = -1;
- goto out;
- }
-
- if (!val_only && dec_file[0])
- {
- while (ERROR_SUCCESS ==
- (error = RegEnumKeyEx (hKey, index++, buf, &buf_size,
- NULL, NULL, NULL, NULL))
- || (error == ERROR_MORE_DATA))
- {
- if (strcasematch (buf, dec_file))
- {
- file_type = 1;
- goto out;
- }
- buf_size = NAME_MAX + 1;
- }
- if (error != ERROR_NO_MORE_ITEMS)
- {
- seterrno_from_win_error (__FILE__, __LINE__, error);
- goto out;
- }
- index = 0;
- buf_size = NAME_MAX + 1;
- }
-
- while (ERROR_SUCCESS ==
- (error = RegEnumValue (hKey, index++, buf, &buf_size, NULL, NULL,
- NULL, NULL))
- || (error == ERROR_MORE_DATA))
- {
- if (strcasematch (buf, dec_file))
- {
- file_type = -1;
- goto out;
- }
- buf_size = NAME_MAX + 1;
- }
- if (error != ERROR_NO_MORE_ITEMS)
- {
- seterrno_from_win_error (__FILE__, __LINE__, error);
- goto out;
- }
- }
- }
-out:
- if (hKey != (HKEY) INVALID_HANDLE_VALUE)
- RegCloseKey (hKey);
- return file_type;
-}
-
-void
-fhandler_registry::set_name (path_conv &in_pc)
-{
- if (strncasematch (in_pc.normalized_path, "/proc/registry32", 16))
- {
- wow64 = KEY_WOW64_32KEY;
- prefix_len += 2;
- }
- else if (strncasematch (in_pc.normalized_path, "/proc/registry64", 16))
- {
- wow64 = KEY_WOW64_64KEY;
- prefix_len += 2;
- }
- fhandler_base::set_name (in_pc);
-}
-
-fhandler_registry::fhandler_registry ():
-fhandler_proc ()
-{
- wow64 = 0;
- prefix_len = sizeof ("registry") - 1;
-}
-
-int
-fhandler_registry::fstat (struct __stat64 *buf)
-{
- fhandler_base::fstat (buf);
- buf->st_mode &= ~_IFMT & NO_W;
- int file_type = exists ();
- switch (file_type)
- {
- case 0:
- set_errno (ENOENT);
- return -1;
- case 1:
- buf->st_mode |= S_IFDIR | S_IXUSR | S_IXGRP | S_IXOTH;
- break;
- case 2:
- buf->st_mode |= S_IFDIR | S_IXUSR | S_IXGRP | S_IXOTH;
- buf->st_nlink = ROOT_KEY_COUNT;
- break;
- default:
- case -1:
- buf->st_mode |= S_IFREG;
- buf->st_mode &= NO_X;
- break;
- }
- if (file_type != 0 && file_type != 2)
- {
- HKEY hKey;
- const char *path = get_name () + proc_len + prefix_len + 2;
- hKey =
- open_key (path, STANDARD_RIGHTS_READ | KEY_QUERY_VALUE, wow64,
- (file_type < 0) ? true : false);
-
- if (hKey == HKEY_PERFORMANCE_DATA)
- /* RegQueryInfoKey () always returns write time 0,
- RegQueryValueEx () does not return required buffer size. */
- ;
- else if (hKey != (HKEY) INVALID_HANDLE_VALUE)
- {
- FILETIME ftLastWriteTime;
- DWORD subkey_count;
- if (ERROR_SUCCESS ==
- RegQueryInfoKey (hKey, NULL, NULL, NULL, &subkey_count, NULL,
- NULL, NULL, NULL, NULL, NULL,
- &ftLastWriteTime))
- {
- to_timestruc_t (&ftLastWriteTime, &buf->st_mtim);
- buf->st_ctim = buf->st_birthtim = buf->st_mtim;
- time_as_timestruc_t (&buf->st_atim);
- if (file_type > 0)
- buf->st_nlink = subkey_count + 2;
- else
- {
- int pathlen = strlen (path);
- const char *value_name = path + pathlen - 1;
- if (isdirsep (*value_name) && pathlen > 1)
- value_name--;
- while (!isdirsep (*value_name))
- value_name--;
- value_name++;
- char dec_value_name[NAME_MAX + 1];
- DWORD dwSize;
- if (decode_regname (dec_value_name, value_name) >= 0 &&
- ERROR_SUCCESS ==
- RegQueryValueEx (hKey, dec_value_name, NULL, NULL, NULL,
- &dwSize))
- buf->st_size = dwSize;
- }
- __uid32_t uid;
- __gid32_t gid;
- if (get_reg_attribute (hKey, &buf->st_mode, &uid, &gid) == 0)
- {
- buf->st_uid = uid;
- buf->st_gid = gid;
- buf->st_mode &= ~(S_IWUSR | S_IWGRP | S_IWOTH);
- if (file_type > 0)
- buf->st_mode |= S_IFDIR;
- else
- buf->st_mode &= NO_X;
- }
- }
- RegCloseKey (hKey);
- }
- else
- {
- /* Here's the problem: If we can't open the key, we don't know
- nothing at all about the key/value. It's only clear that
- the current user has no read access. At this point it's
- rather unlikely that the user has write or execute access
- and it's also rather unlikely that the user is the owner.
- Therefore it's probably most safe to assume unknown ownership
- and no permissions for nobody. */
- buf->st_uid = UNKNOWN_UID;
- buf->st_gid = UNKNOWN_GID;
- buf->st_mode &= ~0777;
- }
- }
- return 0;
-}
-
-int
-fhandler_registry::readdir (DIR *dir, dirent *de)
-{
- DWORD buf_size = NAME_MAX + 1;
- char buf[buf_size];
- HANDLE handle;
- const char *path = dir->__d_dirname + proc_len + 1 + prefix_len;
- LONG error;
- int res = ENMFILE;
-
- dir->__flags |= dirent_saw_dot | dirent_saw_dot_dot;
- if (*path == 0)
- {
- if (dir->__d_position >= ROOT_KEY_COUNT)
- goto out;
- strcpy (de->d_name, registry_listing[dir->__d_position++]);
- res = 0;
- goto out;
- }
- if (dir->__handle == INVALID_HANDLE_VALUE)
- {
- if (dir->__d_position != 0)
- goto out;
- handle = open_key (path + 1, KEY_READ, wow64, false);
- dir->__handle = handle;
- if (dir->__handle == INVALID_HANDLE_VALUE)
- goto out;
- dir->__d_internal = (unsigned) new __DIR_hash ();
- }
- if (dir->__d_position < SPECIAL_DOT_FILE_COUNT)
- {
- strcpy (de->d_name, special_dot_files[dir->__d_position++]);
- res = 0;
- goto out;
- }
- if ((HKEY) dir->__handle == HKEY_PERFORMANCE_DATA)
- {
- /* RegEnumValue () returns garbage for this key,
- simulate only a minimal listing of the generic names. */
- if (dir->__d_position >= SPECIAL_DOT_FILE_COUNT + PERF_DATA_FILE_COUNT)
- goto out;
- strcpy (de->d_name, perf_data_files[dir->__d_position - SPECIAL_DOT_FILE_COUNT]);
- dir->__d_position++;
- res = 0;
- goto out;
- }
-
-retry:
- if (dir->__d_position & REG_ENUM_VALUES_MASK)
- /* For the moment, the type of key is ignored here. when write access is added,
- * maybe add an extension for the type of each value?
- */
- error = RegEnumValue ((HKEY) dir->__handle,
- (dir->__d_position & ~REG_ENUM_VALUES_MASK) >> 16,
- buf, &buf_size, NULL, NULL, NULL, NULL);
- else
- error =
- RegEnumKeyEx ((HKEY) dir->__handle, dir->__d_position -
- SPECIAL_DOT_FILE_COUNT, buf, &buf_size, NULL, NULL, NULL,
- NULL);
- if (error == ERROR_NO_MORE_ITEMS
- && (dir->__d_position & REG_ENUM_VALUES_MASK) == 0)
- {
- /* If we're finished with sub-keys, start on values under this key. */
- dir->__d_position |= REG_ENUM_VALUES_MASK;
- buf_size = NAME_MAX + 1;
- goto retry;
- }
- if (error != ERROR_SUCCESS && error != ERROR_MORE_DATA)
- {
- RegCloseKey ((HKEY) dir->__handle);
- dir->__handle = INVALID_HANDLE_VALUE;
- if (error != ERROR_NO_MORE_ITEMS)
- seterrno_from_win_error (__FILE__, __LINE__, error);
- goto out;
- }
-
- /* We get here if `buf' contains valid data. */
- dir->__d_position++;
- if (dir->__d_position & REG_ENUM_VALUES_MASK)
- dir->__d_position += 0x10000;
-
- {
- /* Append "%val" if value name is identical to a previous key name. */
- unsigned h = hash_path_name (1, buf);
- bool add_val = false;
- if (! (dir->__d_position & REG_ENUM_VALUES_MASK))
- d_hash (dir)->set (h);
- else if (d_hash (dir)->is_set (h)
- && key_exists ((HKEY) dir->__handle, buf, wow64))
- add_val = true;
-
- if (encode_regname (de->d_name, buf, add_val))
- {
- buf_size = NAME_MAX + 1;
- goto retry;
- }
- }
-
- if (dir->__d_position & REG_ENUM_VALUES_MASK)
- de->d_type = DT_REG;
- else
- de->d_type = DT_DIR;
-
- res = 0;
-out:
- syscall_printf ("%d = readdir (%p, %p)", res, dir, de);
- return res;
-}
-
-_off64_t
-fhandler_registry::telldir (DIR * dir)
-{
- return dir->__d_position & REG_POSITION_MASK;
-}
-
-void
-fhandler_registry::seekdir (DIR * dir, _off64_t loc)
-{
- /* Unfortunately cannot simply set __d_position due to transition from sub-keys to
- * values.
- */
- rewinddir (dir);
- while (loc > (dir->__d_position & REG_POSITION_MASK))
- if (!readdir (dir, dir->__d_dirent))
- break;
-}
-
-void
-fhandler_registry::rewinddir (DIR * dir)
-{
- if (dir->__handle != INVALID_HANDLE_VALUE)
- {
- RegCloseKey ((HKEY) dir->__handle);
- dir->__handle = INVALID_HANDLE_VALUE;
- }
- dir->__d_position = 0;
- dir->__flags = dirent_saw_dot | dirent_saw_dot_dot;
-}
-
-int
-fhandler_registry::closedir (DIR * dir)
-{
- int res = 0;
- if (dir->__handle != INVALID_HANDLE_VALUE)
- {
- delete d_hash (dir);
- if (RegCloseKey ((HKEY) dir->__handle) != ERROR_SUCCESS)
- {
- __seterrno ();
- res = -1;
- }
- }
- syscall_printf ("%d = closedir (%p)", res, dir);
- return 0;
-}
-
-int
-fhandler_registry::open (int flags, mode_t mode)
-{
- int pathlen;
- const char *file;
- HKEY handle = (HKEY) INVALID_HANDLE_VALUE;
-
- int res = fhandler_virtual::open (flags, mode);
- if (!res)
- goto out;
-
- const char *path;
- path = get_name () + proc_len + 1 + prefix_len;
- if (!*path)
- {
- if ((flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
- {
- set_errno (EEXIST);
- res = 0;
- goto out;
- }
- else if (flags & O_WRONLY)
- {
- set_errno (EISDIR);
- res = 0;
- goto out;
- }
- else
- {
- flags |= O_DIROPEN;
- goto success;
- }
- }
- path++;
- pathlen = strlen (path);
- file = path + pathlen - 1;
- if (isdirsep (*file) && pathlen > 1)
- file--;
- while (!isdirsep (*file))
- file--;
- file++;
-
- if (file == path)
- {
- for (int i = 0; registry_listing[i]; i++)
- if (path_prefix_p (registry_listing[i], path,
- strlen (registry_listing[i]), true))
- {
- if ((flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
- {
- set_errno (EEXIST);
- res = 0;
- goto out;
- }
- else if (flags & O_WRONLY)
- {
- set_errno (EISDIR);
- res = 0;
- goto out;
- }
- else
- {
- set_io_handle (registry_keys[i]);
- /* Marking as nohandle allows to call dup on pseudo registry
- handles. */
- nohandle (true);
- flags |= O_DIROPEN;
- goto success;
- }
- }
-
- if (flags & O_CREAT)
- {
- set_errno (EROFS);
- res = 0;
- }
- else
- {
- set_errno (ENOENT);
- res = 0;
- }
- goto out;
- }
-
- if (flags & O_WRONLY)
- {
- set_errno (EROFS);
- res = 0;
- }
- else
- {
- char dec_file[NAME_MAX + 1];
- int val_only = decode_regname (dec_file, file);
- if (val_only < 0)
- {
- set_errno (EINVAL);
- res = 0;
- goto out;
- }
-
- if (!val_only)
- handle = open_key (path, KEY_READ, wow64, false);
- if (handle == (HKEY) INVALID_HANDLE_VALUE)
- {
- if (get_errno () != EACCES)
- handle = open_key (path, KEY_READ, wow64, true);
- if (handle == (HKEY) INVALID_HANDLE_VALUE)
- {
- res = 0;
- goto out;
- }
- }
- else
- flags |= O_DIROPEN;
-
- set_io_handle (handle);
- value_name = cstrdup (dec_file);
-
- if (!(flags & O_DIROPEN) && !fill_filebuf ())
- {
- RegCloseKey (handle);
- res = 0;
- goto out;
- }
-
- if (flags & O_APPEND)
- position = filesize;
- else
- position = 0;
- }
-
-success:
- res = 1;
- set_flags ((flags & ~O_TEXT) | O_BINARY);
- set_open_status ();
-out:
- syscall_printf ("%d = fhandler_registry::open (%p, %d)", res, flags, mode);
- return res;
-}
-
-int
-fhandler_registry::close ()
-{
- int res = fhandler_virtual::close ();
- if (res != 0)
- return res;
- HKEY handle = (HKEY) get_handle ();
- if (handle != (HKEY) INVALID_HANDLE_VALUE && handle < HKEY_CLASSES_ROOT)
- {
- if (RegCloseKey (handle) != ERROR_SUCCESS)
- {
- __seterrno ();
- res = -1;
- }
- }
- if (!hExeced && value_name)
- {
- cfree (value_name);
- value_name = NULL;
- }
- return res;
-}
-
-bool
-fhandler_registry::fill_filebuf ()
-{
- DWORD type, size;
- LONG error;
- HKEY handle = (HKEY) get_handle ();
- if (handle != HKEY_PERFORMANCE_DATA)
- {
- error = RegQueryValueEx (handle, value_name, NULL, &type, NULL, &size);
- if (error != ERROR_SUCCESS)
- {
- if (error != ERROR_FILE_NOT_FOUND)
- {
- seterrno_from_win_error (__FILE__, __LINE__, error);
- return false;
- }
- goto value_not_found;
- }
- bufalloc = size;
- filebuf = (char *) cmalloc_abort (HEAP_BUF, bufalloc);
- error =
- RegQueryValueEx (handle, value_name, NULL, NULL, (BYTE *) filebuf,
- &size);
- if (error != ERROR_SUCCESS)
- {
- seterrno_from_win_error (__FILE__, __LINE__, error);
- return true;
- }
- filesize = size;
- }
- else
- {
- bufalloc = 0;
- do
- {
- bufalloc += 16 * 1024;
- filebuf = (char *) crealloc_abort (filebuf, bufalloc);
- size = bufalloc;
- error = RegQueryValueEx (handle, value_name, NULL, &type,
- (BYTE *) filebuf, &size);
- if (error != ERROR_SUCCESS && error != ERROR_MORE_DATA)
- {
- seterrno_from_win_error (__FILE__, __LINE__, error);
- return false;
- }
- }
- while (error == ERROR_MORE_DATA);
- filesize = size;
- /* RegQueryValueEx () opens HKEY_PERFORMANCE_DATA. */
- RegCloseKey (handle);
- }
- return true;
-value_not_found:
- DWORD buf_size = NAME_MAX + 1;
- char buf[buf_size];
- int index = 0;
- while (ERROR_SUCCESS ==
- (error = RegEnumKeyEx (handle, index++, buf, &buf_size, NULL, NULL,
- NULL, NULL)) || (error == ERROR_MORE_DATA))
- {
- if (strcasematch (buf, value_name))
- {
- set_errno (EISDIR);
- return false;
- }
- buf_size = NAME_MAX + 1;
- }
- if (error != ERROR_NO_MORE_ITEMS)
- {
- seterrno_from_win_error (__FILE__, __LINE__, error);
- return false;
- }
- set_errno (ENOENT);
- return false;
-}
-
-/* Auxillary member function to open registry keys. */
-static HKEY
-open_key (const char *name, REGSAM access, DWORD wow64, bool isValue)
-{
- HKEY hKey = (HKEY) INVALID_HANDLE_VALUE;
- HKEY hParentKey = (HKEY) INVALID_HANDLE_VALUE;
- bool parentOpened = false;
- char component[NAME_MAX + 1];
-
- while (*name)
- {
- const char *anchor = name;
- while (*name && !isdirsep (*name))
- name++;
- int val_only = decode_regname (component, anchor, name - anchor);
- if (val_only < 0)
- {
- set_errno (EINVAL);
- if (parentOpened)
- RegCloseKey (hParentKey);
- hKey = (HKEY) INVALID_HANDLE_VALUE;
- break;
- }
- if (*name)
- name++;
- if (*name == 0 && isValue == true)
- break;
-
- if (val_only || !component[0] || hKey == HKEY_PERFORMANCE_DATA)
- {
- set_errno (ENOENT);
- if (parentOpened)
- RegCloseKey (hParentKey);
- hKey = (HKEY) INVALID_HANDLE_VALUE;
- break;
- }
-
- if (hParentKey != (HKEY) INVALID_HANDLE_VALUE)
- {
- REGSAM effective_access = KEY_READ;
- if ((strchr (name, '/') == NULL && isValue == true) || *name == 0)
- effective_access = access;
- LONG error = RegOpenKeyEx (hParentKey, component, 0,
- effective_access | wow64, &hKey);
- if (error == ERROR_ACCESS_DENIED) /* Try opening with backup intent */
- error = RegCreateKeyEx (hParentKey, component, 0, NULL,
- REG_OPTION_BACKUP_RESTORE,
- effective_access | wow64, NULL,
- &hKey, NULL);
- if (parentOpened)
- RegCloseKey (hParentKey);
- if (error != ERROR_SUCCESS)
- {
- hKey = (HKEY) INVALID_HANDLE_VALUE;
- seterrno_from_win_error (__FILE__, __LINE__, error);
- return hKey;
- }
- hParentKey = hKey;
- parentOpened = true;
- }
- else
- {
- for (int i = 0; registry_listing[i]; i++)
- if (strcasematch (component, registry_listing[i]))
- hKey = registry_keys[i];
- if (hKey == (HKEY) INVALID_HANDLE_VALUE)
- return hKey;
- hParentKey = hKey;
- }
- }
- return hKey;
-}
-
-int
-fhandler_registry::dup (fhandler_base *child)
-{
- int ret = fhandler_virtual::dup (child);
- /* Pseudo registry handles can't be duplicated using DuplicateHandle.
- Therefore those fhandlers are marked with the nohandle flag. This
- allows fhandler_base::dup to succeed as usual for nohandle fhandlers.
- Here we just have to fix up by copying the pseudo handle value. */
- if ((HKEY) get_handle () >= HKEY_CLASSES_ROOT)
- child->set_io_handle (get_handle ());
- return ret;
-}
diff --git a/winsup/cygwin/fhandler_serial.cc b/winsup/cygwin/fhandler_serial.cc
deleted file mode 100644
index 36c6ee2..0000000
--- a/winsup/cygwin/fhandler_serial.cc
+++ /dev/null
@@ -1,1128 +0,0 @@
-/* fhandler_serial.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <unistd.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include <ddk/ntddser.h>
-
-/**********************************************************************/
-/* fhandler_serial */
-
-fhandler_serial::fhandler_serial ()
- : fhandler_base (), vmin_ (0), vtime_ (0), pgrp_ (myself->pgid)
-{
- need_fork_fixup (true);
-}
-
-void
-fhandler_serial::overlapped_setup ()
-{
- memset (&io_status, 0, sizeof (io_status));
- io_status.hEvent = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL);
- ProtectHandle (io_status.hEvent);
- overlapped_armed = 0;
-}
-
-void
-fhandler_serial::raw_read (void *ptr, size_t& ulen)
-{
- int tot;
- DWORD n;
- HANDLE w4[2];
- size_t minchars = vmin_ ? min (vmin_, ulen) : ulen;
-
- w4[0] = io_status.hEvent;
- w4[1] = signal_arrived;
-
- debug_printf ("ulen %d, vmin_ %d, vtime_ %d, hEvent %p", ulen, vmin_, vtime_,
- io_status.hEvent);
- if (!overlapped_armed)
- {
- SetCommMask (get_handle (), EV_RXCHAR);
- ResetEvent (io_status.hEvent);
- }
-
- for (n = 0, tot = 0; ulen; ulen -= n, ptr = (char *) ptr + n)
- {
- COMSTAT st;
- DWORD inq = vmin_ ? minchars : vtime_ ? ulen : 1;
-
- n = 0;
-
- if (vtime_) // non-interruptible -- have to use kernel timeouts
- overlapped_armed = -1;
-
- if (!ClearCommError (get_handle (), &ev, &st))
- goto err;
- else if (ev)
- termios_printf ("error detected %x", ev);
- else if (st.cbInQue && !vtime_)
- inq = st.cbInQue;
- else if (!overlapped_armed)
- {
- if ((size_t) tot >= minchars)
- break;
- else if (WaitCommEvent (get_handle (), &ev, &io_status))
- {
- debug_printf ("WaitCommEvent succeeded: ev %x", ev);
- if (!ev)
- continue;
- }
- else if (GetLastError () != ERROR_IO_PENDING)
- goto err;
- else
- {
- overlapped_armed = 1;
- switch (WaitForMultipleObjects (2, w4, FALSE, INFINITE))
- {
- case WAIT_OBJECT_0:
- if (!GetOverlappedResult (get_handle (), &io_status, &n,
- FALSE))
- goto err;
- debug_printf ("n %d, ev %x", n, ev);
- break;
- case WAIT_OBJECT_0 + 1:
- tot = -1;
- PurgeComm (get_handle (), PURGE_RXABORT);
- overlapped_armed = 0;
- set_sig_errno (EINTR);
- goto out;
- default:
- goto err;
- }
- }
- }
-
- overlapped_armed = 0;
- ResetEvent (io_status.hEvent);
- if (inq > ulen)
- inq = ulen;
- debug_printf ("inq %d", inq);
- if (ReadFile (get_handle (), ptr, inq, &n, &io_status))
- /* Got something */;
- else if (GetLastError () != ERROR_IO_PENDING)
- goto err;
- else if (!GetOverlappedResult (get_handle (), &io_status, &n, TRUE))
- goto err;
-
- tot += n;
- debug_printf ("vtime_ %d, vmin_ %d, n %d, tot %d", vtime_, vmin_, n, tot);
- if (vtime_ || !vmin_ || !n)
- break;
- continue;
-
- err:
- debug_printf ("err %E");
- if (GetLastError () != ERROR_OPERATION_ABORTED)
- {
- PurgeComm (get_handle (), PURGE_RXABORT);
- tot = -1;
- __seterrno ();
- break;
- }
-
- n = 0;
- }
-
-out:
- ulen = tot;
-}
-
-/* Cover function to WriteFile to provide Posix interface and semantics
- (as much as possible). */
-int
-fhandler_serial::raw_write (const void *ptr, size_t len)
-{
- DWORD bytes_written;
- OVERLAPPED write_status;
-
- memset (&write_status, 0, sizeof (write_status));
- write_status.hEvent = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL);
- ProtectHandle (write_status.hEvent);
-
- for (;;)
- {
- if (WriteFile (get_handle (), ptr, len, &bytes_written, &write_status))
- break;
-
- switch (GetLastError ())
- {
- case ERROR_OPERATION_ABORTED:
- DWORD ev;
- if (!ClearCommError (get_handle (), &ev, NULL))
- goto err;
- if (ev)
- termios_printf ("error detected %x", ev);
- continue;
- case ERROR_IO_PENDING:
- break;
- default:
- goto err;
- }
-
- if (!GetOverlappedResult (get_handle (), &write_status, &bytes_written, TRUE))
- goto err;
-
- break;
- }
-
- ForceCloseHandle (write_status.hEvent);
-
- return bytes_written;
-
-err:
- __seterrno ();
- ForceCloseHandle (write_status.hEvent);
- return -1;
-}
-
-void
-fhandler_serial::init (HANDLE f, DWORD flags, mode_t bin)
-{
- open (flags, bin & (O_BINARY | O_TEXT));
-}
-
-int
-fhandler_serial::open (int flags, mode_t mode)
-{
- int res;
- COMMTIMEOUTS to;
- extern BOOL reset_com;
-
- syscall_printf ("fhandler_serial::open (%s, %p, %p)",
- get_name (), flags, mode);
-
- if (!fhandler_base::open (flags, mode))
- return 0;
-
- res = 1;
-
- SetCommMask (get_handle (), EV_RXCHAR);
-
- uninterruptible_io (true); // Handled explicitly in read code
-
- overlapped_setup ();
-
- memset (&to, 0, sizeof (to));
- SetCommTimeouts (get_handle (), &to);
-
- /* Reset serial port to known state of 9600-8-1-no flow control
- on open for better behavior under Win 95.
-
- FIXME: This should only be done when explicitly opening the com
- port. It should not be reset if an fd is inherited.
- Using __progname in this way, to determine how far along in the
- initialization we are, is really a terrible kludge and should
- be fixed ASAP.
- */
- extern char *__progname;
- if (reset_com && __progname)
- {
- DCB state;
- GetCommState (get_handle (), &state);
- syscall_printf ("setting initial state on %s (reset_com %d)",
- get_name (), reset_com);
- state.BaudRate = CBR_9600;
- state.ByteSize = 8;
- state.StopBits = ONESTOPBIT;
- state.Parity = NOPARITY; /* FIXME: correct default? */
- state.fBinary = TRUE; /* binary xfer */
- state.EofChar = 0; /* no end-of-data in binary mode */
- state.fNull = FALSE; /* don't discard nulls in binary mode */
- state.fParity = FALSE; /* ignore parity errors */
- state.fErrorChar = FALSE;
- state.fTXContinueOnXoff = TRUE; /* separate TX and RX flow control */
- state.fOutX = FALSE; /* disable transmission flow control */
- state.fInX = FALSE; /* disable reception flow control */
- state.XonChar = 0x11;
- state.XoffChar = 0x13;
- state.fOutxDsrFlow = FALSE; /* disable DSR flow control */
- state.fRtsControl = RTS_CONTROL_ENABLE; /* ignore lead control except
- DTR */
- state.fOutxCtsFlow = FALSE; /* disable output flow control */
- state.fDtrControl = DTR_CONTROL_ENABLE; /* assert DTR */
- state.fDsrSensitivity = FALSE; /* don't assert DSR */
- state.fAbortOnError = TRUE;
- if (!SetCommState (get_handle (), &state))
- system_printf ("couldn't set initial state for %s, %E", get_name ());
- }
-
- SetCommMask (get_handle (), EV_RXCHAR);
- set_open_status ();
- syscall_printf ("%p = fhandler_serial::open (%s, %p, %p)",
- res, get_name (), flags, mode);
- return res;
-}
-
-int
-fhandler_serial::close ()
-{
- ForceCloseHandle (io_status.hEvent);
- return fhandler_base::close ();
-}
-
-/* tcsendbreak: POSIX 7.2.2.1 */
-/* Break for 250-500 milliseconds if duration == 0 */
-/* Otherwise, units for duration are undefined */
-int
-fhandler_serial::tcsendbreak (int duration)
-{
- unsigned int sleeptime = 300000;
-
- if (duration > 0)
- sleeptime *= duration;
-
- if (SetCommBreak (get_handle ()) == 0)
- return -1;
-
- /* FIXME: need to send zero bits during duration */
- usleep (sleeptime);
-
- if (ClearCommBreak (get_handle ()) == 0)
- return -1;
-
- syscall_printf ("0 = fhandler_serial:tcsendbreak (%d)", duration);
-
- return 0;
-}
-
-/* tcdrain: POSIX 7.2.2.1 */
-int
-fhandler_serial::tcdrain ()
-{
- if (FlushFileBuffers (get_handle ()) == 0)
- return -1;
-
- return 0;
-}
-
-/* tcflow: POSIX 7.2.2.1 */
-int
-fhandler_serial::tcflow (int action)
-{
- DWORD win32action = 0;
- DCB dcb;
- char xchar;
-
- termios_printf ("action %d", action);
-
- switch (action)
- {
- case TCOOFF:
- win32action = SETXOFF;
- break;
- case TCOON:
- win32action = SETXON;
- break;
- case TCION:
- case TCIOFF:
- if (GetCommState (get_handle (), &dcb) == 0)
- return -1;
- if (action == TCION)
- xchar = (dcb.XonChar ? dcb.XonChar : 0x11);
- else
- xchar = (dcb.XoffChar ? dcb.XoffChar : 0x13);
- if (TransmitCommChar (get_handle (), xchar) == 0)
- return -1;
- return 0;
- break;
- default:
- return -1;
- break;
- }
-
- if (EscapeCommFunction (get_handle (), win32action) == 0)
- return -1;
-
- return 0;
-}
-
-
-/* switch_modem_lines: set or clear RTS and/or DTR */
-int
-fhandler_serial::switch_modem_lines (int set, int clr)
-{
- int res = 0;
-
- if (set & TIOCM_RTS)
- {
- if (EscapeCommFunction (get_handle (), SETRTS))
- rts = TIOCM_RTS;
- else
- {
- __seterrno ();
- res = -1;
- }
- }
- else if (clr & TIOCM_RTS)
- {
- if (EscapeCommFunction (get_handle (), CLRRTS))
- rts = 0;
- else
- {
- __seterrno ();
- res = -1;
- }
- }
- if (set & TIOCM_DTR)
- {
- if (EscapeCommFunction (get_handle (), SETDTR))
- rts = TIOCM_DTR;
- else
- {
- __seterrno ();
- res = -1;
- }
- }
- else if (clr & TIOCM_DTR)
- {
- if (EscapeCommFunction (get_handle (), CLRDTR))
- rts = 0;
- else
- {
- __seterrno ();
- res = -1;
- }
- }
-
- return res;
-}
-
-/* ioctl: */
-int
-fhandler_serial::ioctl (unsigned int cmd, void *buffer)
-{
- int res = 0;
-
-# define ibuffer ((int) buffer)
-# define ipbuffer (*(int *) buffer)
-
- DWORD ev;
- COMSTAT st;
- if (!ClearCommError (get_handle (), &ev, &st))
- {
- __seterrno ();
- res = -1;
- }
- else
- switch (cmd)
- {
- case TCFLSH:
- res = tcflush (ibuffer);
- break;
- case TIOCMGET:
- DWORD modem_lines;
- if (!GetCommModemStatus (get_handle (), &modem_lines))
- {
- __seterrno ();
- res = -1;
- }
- else
- {
- ipbuffer = 0;
- if (modem_lines & MS_CTS_ON)
- ipbuffer |= TIOCM_CTS;
- if (modem_lines & MS_DSR_ON)
- ipbuffer |= TIOCM_DSR;
- if (modem_lines & MS_RING_ON)
- ipbuffer |= TIOCM_RI;
- if (modem_lines & MS_RLSD_ON)
- ipbuffer |= TIOCM_CD;
-
- DWORD cb;
- DWORD mcr;
- if (!DeviceIoControl (get_handle (), IOCTL_SERIAL_GET_DTRRTS,
- NULL, 0, &mcr, 4, &cb, 0) || cb != 4)
- ipbuffer |= rts | dtr;
- else
- {
- if (mcr & 2)
- ipbuffer |= TIOCM_RTS;
- if (mcr & 1)
- ipbuffer |= TIOCM_DTR;
- }
- }
- break;
- case TIOCMSET:
- if (switch_modem_lines (ipbuffer, ~ipbuffer))
- res = -1;
- break;
- case TIOCMBIS:
- if (switch_modem_lines (ipbuffer, 0))
- res = -1;
- break;
- case TIOCMBIC:
- if (switch_modem_lines (0, ipbuffer))
- res = -1;
- break;
- case TIOCCBRK:
- if (ClearCommBreak (get_handle ()) == 0)
- {
- __seterrno ();
- res = -1;
- }
- break;
- case TIOCSBRK:
- if (SetCommBreak (get_handle ()) == 0)
- {
- __seterrno ();
- res = -1;
- }
- break;
- case TIOCINQ:
- if (ev & CE_FRAME || ev & CE_IOE || ev & CE_OVERRUN || ev & CE_RXOVER
- || ev & CE_RXPARITY)
- {
- set_errno (EINVAL); /* FIXME: Use correct errno */
- res = -1;
- }
- else
- ipbuffer = st.cbInQue;
- break;
- case TIOCGWINSZ:
- ((struct winsize *) buffer)->ws_row = 0;
- ((struct winsize *) buffer)->ws_col = 0;
- break;
- default:
- set_errno (ENOSYS);
- res = -1;
- break;
- }
-
- termios_printf ("%d = ioctl (%p, %p)", res, cmd, buffer);
-# undef ibuffer
-# undef ipbuffer
- return res;
-}
-
-/* tcflush: POSIX 7.2.2.1 */
-int
-fhandler_serial::tcflush (int queue)
-{
- DWORD flags;
-
- switch (queue)
- {
- case TCOFLUSH:
- flags = PURGE_TXABORT | PURGE_TXCLEAR;
- break;
- case TCIFLUSH:
- flags = PURGE_RXABORT | PURGE_RXCLEAR;
- break;
- case TCIOFLUSH:
- flags = PURGE_TXABORT | PURGE_TXCLEAR | PURGE_RXABORT | PURGE_RXCLEAR;
- break;
- default:
- termios_printf ("Invalid tcflush queue %d", queue);
- set_errno (EINVAL);
- return -1;
- }
-
- if (!PurgeComm (get_handle (), flags))
- {
- __seterrno ();
- return -1;
- }
-
- return 0;
-}
-
-/* tcsetattr: POSIX 7.2.1.1 */
-int
-fhandler_serial::tcsetattr (int action, const struct termios *t)
-{
- /* Possible actions:
- TCSANOW: immediately change attributes.
- TCSADRAIN: flush output, then change attributes.
- TCSAFLUSH: flush output and discard input, then change attributes.
- */
-
- bool dropDTR = false;
- COMMTIMEOUTS to;
- DCB ostate, state;
- unsigned int ovtime = vtime_, ovmin = vmin_;
- int tmpDtr, tmpRts, res;
- res = tmpDtr = tmpRts = 0;
-
- termios_printf ("action %d", action);
- if ((action == TCSADRAIN) || (action == TCSAFLUSH))
- {
- FlushFileBuffers (get_handle ());
- termios_printf ("flushed file buffers");
- }
- if (action == TCSAFLUSH)
- PurgeComm (get_handle (), (PURGE_RXABORT | PURGE_RXCLEAR));
-
- /* get default/last comm state */
- if (!GetCommState (get_handle (), &ostate))
- return -1;
-
- state = ostate;
-
- /* -------------- Set baud rate ------------------ */
- /* FIXME: WIN32 also has 14400, 56000, 128000, and 256000.
- Unix also has 230400. */
-
- switch (t->c_ospeed)
- {
- case B0:
- /* Drop DTR - but leave DCB-resident bitrate as-is since
- 0 is an invalid bitrate in Win32 */
- dropDTR = true;
- break;
- case B110:
- state.BaudRate = CBR_110;
- break;
- case B300:
- state.BaudRate = CBR_300;
- break;
- case B600:
- state.BaudRate = CBR_600;
- break;
- case B1200:
- state.BaudRate = CBR_1200;
- break;
- case B2400:
- state.BaudRate = CBR_2400;
- break;
- case B4800:
- state.BaudRate = CBR_4800;
- break;
- case B9600:
- state.BaudRate = CBR_9600;
- break;
- case B19200:
- state.BaudRate = CBR_19200;
- break;
- case B38400:
- state.BaudRate = CBR_38400;
- break;
- case B57600:
- state.BaudRate = CBR_57600;
- break;
- case B115200:
- state.BaudRate = CBR_115200;
- break;
- case B128000:
- state.BaudRate = CBR_128000;
- break;
- case B230400:
- state.BaudRate = 230400 /* CBR_230400 - not defined */;
- break;
- case B256000:
- state.BaudRate = CBR_256000;
- break;
- case B460800:
- state.BaudRate = 460800 /* CBR_460800 - not defined */;
- break;
- case B500000:
- state.BaudRate = 500000 /* CBR_500000 - not defined */;
- break;
- case B576000:
- state.BaudRate = 576000 /* CBR_576000 - not defined */;
- break;
- case B921600:
- state.BaudRate = 921600 /* CBR_921600 - not defined */;
- break;
- case B1000000:
- state.BaudRate = 1000000 /* CBR_1000000 - not defined */;
- break;
- case B1152000:
- state.BaudRate = 1152000 /* CBR_1152000 - not defined */;
- break;
- case B1500000:
- state.BaudRate = 1500000 /* CBR_1500000 - not defined */;
- break;
- case B2000000:
- state.BaudRate = 2000000 /* CBR_2000000 - not defined */;
- break;
- case B2500000:
- state.BaudRate = 2500000 /* CBR_2500000 - not defined */;
- break;
- case B3000000:
- state.BaudRate = 3000000 /* CBR_3000000 - not defined */;
- break;
- default:
- /* Unsupported baud rate! */
- termios_printf ("Invalid t->c_ospeed %d", t->c_ospeed);
- set_errno (EINVAL);
- return -1;
- }
-
- /* -------------- Set byte size ------------------ */
-
- switch (t->c_cflag & CSIZE)
- {
- case CS5:
- state.ByteSize = 5;
- break;
- case CS6:
- state.ByteSize = 6;
- break;
- case CS7:
- state.ByteSize = 7;
- break;
- case CS8:
- state.ByteSize = 8;
- break;
- default:
- /* Unsupported byte size! */
- termios_printf ("Invalid t->c_cflag byte size %d",
- t->c_cflag & CSIZE);
- set_errno (EINVAL);
- return -1;
- }
-
- /* -------------- Set stop bits ------------------ */
-
- if (t->c_cflag & CSTOPB)
- state.StopBits = TWOSTOPBITS;
- else
- state.StopBits = ONESTOPBIT;
-
- /* -------------- Set parity ------------------ */
-
- if (t->c_cflag & PARENB)
- state.Parity = (t->c_cflag & PARODD) ? ODDPARITY : EVENPARITY;
- else
- state.Parity = NOPARITY;
-
- state.fBinary = TRUE; /* Binary transfer */
- state.EofChar = 0; /* No end-of-data in binary mode */
- state.fNull = FALSE; /* Don't discard nulls in binary mode */
-
- /* -------------- Parity errors ------------------ */
- /* fParity combines the function of INPCK and NOT IGNPAR */
-
- if ((t->c_iflag & INPCK) && !(t->c_iflag & IGNPAR))
- state.fParity = TRUE; /* detect parity errors */
- else
- state.fParity = FALSE; /* ignore parity errors */
-
- /* Only present in Win32, Unix has no equivalent */
- state.fErrorChar = FALSE;
- state.ErrorChar = 0;
-
- /* -------------- Set software flow control ------------------ */
- /* Set fTXContinueOnXoff to FALSE. This prevents the triggering of a
- premature XON when the remote device interprets a received character
- as XON (same as IXANY on the remote side). Otherwise, a TRUE
- value separates the TX and RX functions. */
-
- state.fTXContinueOnXoff = TRUE; /* separate TX and RX flow control */
-
- /* Transmission flow control */
- if (t->c_iflag & IXON)
- state.fOutX = TRUE; /* enable */
- else
- state.fOutX = FALSE; /* disable */
-
- /* Reception flow control */
- if (t->c_iflag & IXOFF)
- state.fInX = TRUE; /* enable */
- else
- state.fInX = FALSE; /* disable */
-
- /* XoffLim and XonLim are left at default values */
-
- state.XonChar = (t->c_cc[VSTART] ? t->c_cc[VSTART] : 0x11);
- state.XoffChar = (t->c_cc[VSTOP] ? t->c_cc[VSTOP] : 0x13);
-
- /* -------------- Set hardware flow control ------------------ */
-
- /* Disable DSR flow control */
- state.fOutxDsrFlow = FALSE;
-
- /* Some old flavors of Unix automatically enabled hardware flow
- control when software flow control was not enabled. Since newer
- Unices tend to require explicit setting of hardware flow-control,
- this is what we do. */
-
- /* RTS/CTS flow control */
- if (t->c_cflag & CRTSCTS)
- { /* enable */
- state.fOutxCtsFlow = TRUE;
- state.fRtsControl = RTS_CONTROL_HANDSHAKE;
- }
- else
- { /* disable */
- state.fRtsControl = RTS_CONTROL_ENABLE;
- state.fOutxCtsFlow = FALSE;
- tmpRts = TIOCM_RTS;
- }
-
- if (t->c_cflag & CRTSXOFF)
- state.fRtsControl = RTS_CONTROL_HANDSHAKE;
-
- /* -------------- DTR ------------------ */
- /* Assert DTR on device open */
-
- state.fDtrControl = DTR_CONTROL_ENABLE;
-
- /* -------------- DSR ------------------ */
- /* Assert DSR at the device? */
-
- if (t->c_cflag & CLOCAL)
- state.fDsrSensitivity = FALSE; /* no */
- else
- state.fDsrSensitivity = TRUE; /* yes */
-
- /* -------------- Error handling ------------------ */
- /* Since read/write operations terminate upon error, we
- will use ClearCommError() to resume. */
-
- state.fAbortOnError = TRUE;
-
- if ((memcmp (&ostate, &state, sizeof (state)) != 0)
- && !SetCommState (get_handle (), &state))
- {
- /* SetCommState() failed, usually due to invalid DCB param.
- Keep track of this so we can set errno to EINVAL later
- and return failure */
- termios_printf ("SetCommState() failed, %E");
- __seterrno ();
- res = -1;
- }
-
- rbinary ((t->c_iflag & IGNCR) ? false : true);
- wbinary ((t->c_oflag & ONLCR) ? false : true);
-
- if (dropDTR)
- {
- EscapeCommFunction (get_handle (), CLRDTR);
- tmpDtr = 0;
- }
- else
- {
- /* FIXME: Sometimes when CLRDTR is set, setting
- state.fDtrControl = DTR_CONTROL_ENABLE will fail. This
- is a problem since a program might want to change some
- parameters while DTR is still down. */
-
- EscapeCommFunction (get_handle (), SETDTR);
- tmpDtr = TIOCM_DTR;
- }
-
- rts = tmpRts;
- dtr = tmpDtr;
-
- /* The following documentation on was taken from "Linux Serial Programming
- HOWTO". It explains how MIN (t->c_cc[VMIN] || vmin_) and TIME
- (t->c_cc[VTIME] || vtime_) is to be used.
-
- In non-canonical input processing mode, input is not assembled into
- lines and input processing (erase, kill, delete, etc.) does not
- occur. Two parameters control the behavior of this mode: c_cc[VTIME]
- sets the character timer, and c_cc[VMIN] sets the minimum number of
- characters to receive before satisfying the read.
-
- If MIN > 0 and TIME = 0, MIN sets the number of characters to receive
- before the read is satisfied. As TIME is zero, the timer is not used.
-
- If MIN = 0 and TIME > 0, TIME serves as a timeout value. The read will
- be satisfied if a single character is read, or TIME is exceeded (t =
- TIME *0.1 s). If TIME is exceeded, no character will be returned.
-
- If MIN > 0 and TIME > 0, TIME serves as an inter-character timer. The
- read will be satisfied if MIN characters are received, or the time
- between two characters exceeds TIME. The timer is restarted every time
- a character is received and only becomes active after the first
- character has been received.
-
- If MIN = 0 and TIME = 0, read will be satisfied immediately. The
- number of characters currently available, or the number of characters
- requested will be returned. According to Antonino (see contributions),
- you could issue a fcntl(fd, F_SETFL, FNDELAY); before reading to get
- the same result.
- */
-
- if (t->c_lflag & ICANON)
- {
- vmin_ = 0;
- vtime_ = 0;
- }
- else
- {
- vtime_ = t->c_cc[VTIME] * 100;
- vmin_ = t->c_cc[VMIN];
- }
-
- debug_printf ("vtime %d, vmin %d", vtime_, vmin_);
-
- if (ovmin != vmin_ || ovtime != vtime_)
- {
- memset (&to, 0, sizeof (to));
-
- if ((vmin_ > 0) && (vtime_ == 0))
- {
- /* Returns immediately with whatever is in buffer on a ReadFile();
- or blocks if nothing found. We will keep calling ReadFile(); until
- vmin_ characters are read */
- to.ReadIntervalTimeout = to.ReadTotalTimeoutMultiplier = MAXDWORD;
- to.ReadTotalTimeoutConstant = MAXDWORD - 1;
- }
- else if ((vmin_ == 0) && (vtime_ > 0))
- {
- /* set timeoout constant appropriately and we will only try to
- read one character in ReadFile() */
- to.ReadTotalTimeoutConstant = vtime_;
- to.ReadIntervalTimeout = to.ReadTotalTimeoutMultiplier = MAXDWORD;
- }
- else if ((vmin_ > 0) && (vtime_ > 0))
- {
- /* time applies to the interval time for this case */
- to.ReadIntervalTimeout = vtime_;
- }
- else if ((vmin_ == 0) && (vtime_ == 0))
- {
- /* returns immediately with whatever is in buffer as per
- Time-Outs docs in Win32 SDK API docs */
- to.ReadIntervalTimeout = MAXDWORD;
- }
-
- debug_printf ("ReadTotalTimeoutConstant %d, ReadIntervalTimeout %d, ReadTotalTimeoutMultiplier %d",
- to.ReadTotalTimeoutConstant, to.ReadIntervalTimeout, to.ReadTotalTimeoutMultiplier);
-
- if (!SetCommTimeouts(get_handle (), &to))
- {
- /* SetCommTimeouts() failed. Keep track of this so we
- can set errno to EINVAL later and return failure */
- termios_printf ("SetCommTimeouts() failed, %E");
- __seterrno ();
- res = -1;
- }
- }
-
- return res;
-}
-
-/* tcgetattr: POSIX 7.2.1.1 */
-int
-fhandler_serial::tcgetattr (struct termios *t)
-{
- DCB state;
-
- /* Get current Win32 comm state */
- if (GetCommState (get_handle (), &state) == 0)
- return -1;
-
- /* for safety */
- memset (t, 0, sizeof (*t));
-
- t->c_cflag = 0;
- /* -------------- Baud rate ------------------ */
- switch (state.BaudRate)
- {
- case CBR_110:
- t->c_ospeed = t->c_ispeed = B110;
- break;
- case CBR_300:
- t->c_ospeed = t->c_ispeed = B300;
- break;
- case CBR_600:
- t->c_ospeed = t->c_ispeed = B600;
- break;
- case CBR_1200:
- t->c_ospeed = t->c_ispeed = B1200;
- break;
- case CBR_2400:
- t->c_ospeed = t->c_ispeed = B2400;
- break;
- case CBR_4800:
- t->c_ospeed = t->c_ispeed = B4800;
- break;
- case CBR_9600:
- t->c_ospeed = t->c_ispeed = B9600;
- break;
- case CBR_19200:
- t->c_ospeed = t->c_ispeed = B19200;
- break;
- case CBR_38400:
- t->c_ospeed = t->c_ispeed = B38400;
- break;
- case CBR_57600:
- t->c_ospeed = t->c_ispeed = B57600;
- break;
- case CBR_115200:
- t->c_ospeed = t->c_ispeed = B115200;
- break;
- case CBR_128000:
- t->c_ospeed = t->c_ispeed = B128000;
- break;
- case 230400: /* CBR_230400 - not defined */
- t->c_ospeed = t->c_ispeed = B230400;
- break;
- case CBR_256000:
- t->c_ospeed = t->c_ispeed = B256000;
- break;
- case 460800: /* CBR_460000 - not defined */
- t->c_ospeed = t->c_ispeed = B460800;
- break;
- case 500000: /* CBR_500000 - not defined */
- t->c_ospeed = t->c_ispeed = B500000;
- break;
- case 576000: /* CBR_576000 - not defined */
- t->c_ospeed = t->c_ispeed = B576000;
- break;
- case 921600: /* CBR_921600 - not defined */
- t->c_ospeed = t->c_ispeed = B921600;
- break;
- case 1000000: /* CBR_1000000 - not defined */
- t->c_ospeed = t->c_ispeed = B1000000;
- break;
- case 1152000: /* CBR_1152000 - not defined */
- t->c_ospeed = t->c_ispeed = B1152000;
- break;
- case 1500000: /* CBR_1500000 - not defined */
- t->c_ospeed = t->c_ispeed = B1500000;
- break;
- case 2000000: /* CBR_2000000 - not defined */
- t->c_ospeed = t->c_ispeed = B2000000;
- break;
- case 2500000: /* CBR_2500000 - not defined */
- t->c_ospeed = t->c_ispeed = B2500000;
- break;
- case 3000000: /* CBR_3000000 - not defined */
- t->c_ospeed = t->c_ispeed = B3000000;
- break;
- default:
- /* Unsupported baud rate! */
- termios_printf ("Invalid baud rate %d", state.BaudRate);
- set_errno (EINVAL);
- return -1;
- }
-
- /* -------------- Byte size ------------------ */
-
- switch (state.ByteSize)
- {
- case 5:
- t->c_cflag |= CS5;
- break;
- case 6:
- t->c_cflag |= CS6;
- break;
- case 7:
- t->c_cflag |= CS7;
- break;
- case 8:
- t->c_cflag |= CS8;
- break;
- default:
- /* Unsupported byte size! */
- termios_printf ("Invalid byte size %d", state.ByteSize);
- set_errno (EINVAL);
- return -1;
- }
-
- /* -------------- Stop bits ------------------ */
-
- if (state.StopBits == TWOSTOPBITS)
- t->c_cflag |= CSTOPB;
-
- /* -------------- Parity ------------------ */
-
- if (state.Parity == ODDPARITY)
- t->c_cflag |= (PARENB | PARODD);
- if (state.Parity == EVENPARITY)
- t->c_cflag |= PARENB;
-
- /* -------------- Parity errors ------------------ */
-
- /* fParity combines the function of INPCK and NOT IGNPAR */
- if (state.fParity)
- t->c_iflag |= INPCK;
- else
- t->c_iflag |= IGNPAR; /* not necessarily! */
-
- /* -------------- Software flow control ------------------ */
-
- /* transmission flow control */
- if (state.fOutX)
- t->c_iflag |= IXON;
-
- /* reception flow control */
- if (state.fInX)
- t->c_iflag |= IXOFF;
-
- t->c_cc[VSTART] = (state.XonChar ? state.XonChar : 0x11);
- t->c_cc[VSTOP] = (state.XoffChar ? state.XoffChar : 0x13);
-
- /* -------------- Hardware flow control ------------------ */
- /* Some old flavors of Unix automatically enabled hardware flow
- control when software flow control was not enabled. Since newer
- Unices tend to require explicit setting of hardware flow-control,
- this is what we do. */
-
- /* Input flow-control */
- if ((state.fRtsControl == RTS_CONTROL_HANDSHAKE) && state.fOutxCtsFlow)
- t->c_cflag |= CRTSCTS;
- if (state.fRtsControl == RTS_CONTROL_HANDSHAKE)
- t->c_cflag |= CRTSXOFF;
-
- /* -------------- CLOCAL --------------- */
- /* DSR is only lead toggled only by CLOCAL. Check it to see if
- CLOCAL was called. */
- /* FIXME: If tcsetattr() hasn't been called previously, this may
- give a false CLOCAL. */
-
- if (!state.fDsrSensitivity)
- t->c_cflag |= CLOCAL;
-
- /* FIXME: need to handle IGNCR */
-#if 0
- if (!rbinary ())
- t->c_iflag |= IGNCR;
-#endif
-
- if (!wbinary ())
- t->c_oflag |= ONLCR;
-
- t->c_cc[VTIME] = vtime_ / 100;
- t->c_cc[VMIN] = vmin_;
-
- debug_printf ("vmin_ %d, vtime_ %d", vmin_, vtime_);
-
- return 0;
-}
-
-void
-fhandler_serial::fixup_after_fork (HANDLE parent)
-{
- if (close_on_exec ())
- fhandler_base::fixup_after_fork (parent);
- overlapped_setup ();
- debug_printf ("io_status.hEvent %p", io_status.hEvent);
-}
-
-void
-fhandler_serial::fixup_after_exec ()
-{
- if (!close_on_exec ())
- overlapped_setup ();
- debug_printf ("io_status.hEvent %p, close_on_exec %d", io_status.hEvent, close_on_exec ());
-}
-
-int
-fhandler_serial::dup (fhandler_base *child)
-{
- fhandler_serial *fhc = (fhandler_serial *) child;
- fhc->overlapped_setup ();
- fhc->vmin_ = vmin_;
- fhc->vtime_ = vtime_;
- return fhandler_base::dup (child);
-}
diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc
deleted file mode 100644
index dfaa6b1..0000000
--- a/winsup/cygwin/fhandler_socket.cc
+++ /dev/null
@@ -1,1882 +0,0 @@
-/* fhandler_socket.cc. See fhandler.h for a description of the fhandler classes.
-
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 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 DEBUG_NEST_ON 1 */
-
-#define __INSIDE_CYGWIN_NET__
-
-#include "winsup.h"
-#include <sys/un.h>
-#include <asm/byteorder.h>
-
-#include <stdlib.h>
-#define USE_SYS_TYPES_FD_SET
-#include <winsock2.h>
-#include <iphlpapi.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "cygwin/version.h"
-#include "perprocess.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "shared_info.h"
-#include "sigproc.h"
-#include "wininfo.h"
-#include <unistd.h>
-#include <sys/acl.h>
-#include "cygtls.h"
-#include "cygwin/in6.h"
-#include "ntdll.h"
-
-#define ASYNC_MASK (FD_READ|FD_WRITE|FD_OOB|FD_ACCEPT|FD_CONNECT)
-#define EVENT_MASK (FD_READ|FD_WRITE|FD_OOB|FD_ACCEPT|FD_CONNECT|FD_CLOSE)
-
-extern bool fdsock (cygheap_fdmanip& fd, const device *, SOCKET soc);
-extern "C" {
-int sscanf (const char *, const char *, ...);
-} /* End of "C" section */
-
-fhandler_dev_random* entropy_source;
-
-static inline mode_t
-adjust_socket_file_mode (mode_t mode)
-{
- /* Kludge: Don't allow to remove read bit on socket files for
- user/group/other, if the accompanying write bit is set. It would
- be nice to have exact permissions on a socket file, but it's
- necessary that somebody able to access the socket can always read
- the contents of the socket file to avoid spurious "permission
- denied" messages. */
- return mode | ((mode & (S_IWUSR | S_IWGRP | S_IWOTH)) << 1);
-}
-
-/* cygwin internal: map sockaddr into internet domain address */
-static int
-get_inet_addr (const struct sockaddr *in, int inlen,
- struct sockaddr_storage *out, int *outlen,
- int *type = NULL, int *secret = NULL)
-{
- int secret_buf [4];
- int* secret_ptr = (secret ? : secret_buf);
-
- if (in->sa_family == AF_INET || in->sa_family == AF_INET6)
- {
- memcpy (out, in, inlen);
- *outlen = inlen;
- return 1;
- }
- else if (in->sa_family == AF_LOCAL)
- {
- NTSTATUS status;
- HANDLE fh;
- OBJECT_ATTRIBUTES attr;
- IO_STATUS_BLOCK io;
-
- path_conv pc (in->sa_data, PC_SYM_FOLLOW);
- if (pc.error)
- {
- set_errno (pc.error);
- return 0;
- }
- if (!pc.exists ())
- {
- set_errno (ENOENT);
- return 0;
- }
- if (!pc.issocket ())
- {
- set_errno (EBADF);
- return 0;
- }
- status = NtOpenFile (&fh, GENERIC_READ | SYNCHRONIZE,
- pc.get_object_attr (attr, sec_none_nih), &io,
- FILE_SHARE_VALID_FLAGS,
- FILE_SYNCHRONOUS_IO_NONALERT
- | FILE_OPEN_FOR_BACKUP_INTENT);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- return 0;
- }
- int ret = 0;
- char buf[128];
- memset (buf, 0, sizeof buf);
- status = NtReadFile (fh, NULL, NULL, NULL, &io, buf, 128, NULL, NULL);
- NtClose (fh);
- if (NT_SUCCESS (status))
- {
- struct sockaddr_in sin;
- char ctype;
- sin.sin_family = AF_INET;
- sscanf (buf + strlen (SOCKET_COOKIE), "%hu %c %08x-%08x-%08x-%08x",
- &sin.sin_port,
- &ctype,
- secret_ptr, secret_ptr + 1, secret_ptr + 2, secret_ptr + 3);
- sin.sin_port = htons (sin.sin_port);
- sin.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
- memcpy (out, &sin, sizeof sin);
- *outlen = sizeof sin;
- if (type)
- *type = (ctype == 's' ? SOCK_STREAM :
- ctype == 'd' ? SOCK_DGRAM
- : 0);
- ret = 1;
- }
- else
- __seterrno_from_nt_status (status);
- return ret;
- }
- else
- {
- set_errno (EAFNOSUPPORT);
- return 0;
- }
-}
-
-/**********************************************************************/
-/* fhandler_socket */
-
-fhandler_socket::fhandler_socket () :
- fhandler_base (),
- wsock_events (NULL),
- wsock_mtx (NULL),
- wsock_evt (NULL),
- sun_path (NULL),
- status ()
-{
- need_fork_fixup (true);
-}
-
-fhandler_socket::~fhandler_socket ()
-{
- if (sun_path)
- cfree (sun_path);
-}
-
-char *
-fhandler_socket::get_proc_fd_name (char *buf)
-{
- __small_sprintf (buf, "socket:[%d]", get_socket ());
- return buf;
-}
-
-int
-fhandler_socket::open (int flags, mode_t mode)
-{
- set_errno (ENXIO);
- return 0;
-}
-
-void
-fhandler_socket::af_local_set_sockpair_cred ()
-{
- sec_pid = sec_peer_pid = getpid ();
- sec_uid = sec_peer_uid = geteuid32 ();
- sec_gid = sec_peer_gid = getegid32 ();
-}
-
-void
-fhandler_socket::af_local_setblocking (bool &async, bool &nonblocking)
-{
- async = async_io ();
- nonblocking = is_nonblocking ();
- if (async)
- {
- WSAAsyncSelect (get_socket (), winmsg, 0, 0);
- WSAEventSelect (get_socket (), wsock_evt, EVENT_MASK);
- }
- set_nonblocking (false);
- async_io (false);
-}
-
-void
-fhandler_socket::af_local_unsetblocking (bool async, bool nonblocking)
-{
- if (nonblocking)
- set_nonblocking (true);
- if (async)
- {
- WSAAsyncSelect (get_socket (), winmsg, WM_ASYNCIO, ASYNC_MASK);
- async_io (true);
- }
-}
-
-bool
-fhandler_socket::af_local_recv_secret ()
-{
- int out[4] = { 0, 0, 0, 0 };
- int rest = sizeof out;
- char *ptr = (char *) out;
- while (rest > 0)
- {
- int ret = recvfrom (ptr, rest, 0, NULL, NULL);
- if (ret <= 0)
- break;
- rest -= ret;
- ptr += ret;
- }
- if (rest == 0)
- {
- debug_printf ("Received af_local secret: %08x-%08x-%08x-%08x",
- out[0], out[1], out[2], out[3]);
- if (out[0] != connect_secret[0] || out[1] != connect_secret[1]
- || out[2] != connect_secret[2] || out[3] != connect_secret[3])
- {
- debug_printf ("Receiving af_local secret mismatch");
- return false;
- }
- }
- else
- debug_printf ("Receiving af_local secret failed");
- return rest == 0;
-}
-
-bool
-fhandler_socket::af_local_send_secret ()
-{
- int rest = sizeof connect_secret;
- char *ptr = (char *) connect_secret;
- while (rest > 0)
- {
- int ret = sendto (ptr, rest, 0, NULL, 0);
- if (ret <= 0)
- break;
- rest -= ret;
- ptr += ret;
- }
- debug_printf ("Sending af_local secret %s", rest == 0 ? "succeeded"
- : "failed");
- return rest == 0;
-}
-
-bool
-fhandler_socket::af_local_recv_cred ()
-{
- struct ucred out = { (pid_t) 0, (__uid32_t) -1, (__gid32_t) -1 };
- int rest = sizeof out;
- char *ptr = (char *) &out;
- while (rest > 0)
- {
- int ret = recvfrom (ptr, rest, 0, NULL, NULL);
- if (ret <= 0)
- break;
- rest -= ret;
- ptr += ret;
- }
- if (rest == 0)
- {
- debug_printf ("Received eid credentials: pid: %d, uid: %d, gid: %d",
- out.pid, out.uid, out.gid);
- sec_peer_pid = out.pid;
- sec_peer_uid = out.uid;
- sec_peer_gid = out.gid;
- }
- else
- debug_printf ("Receiving eid credentials failed");
- return rest == 0;
-}
-
-bool
-fhandler_socket::af_local_send_cred ()
-{
- struct ucred in = { sec_pid, sec_uid, sec_gid };
- int rest = sizeof in;
- char *ptr = (char *) &in;
- while (rest > 0)
- {
- int ret = sendto (ptr, rest, 0, NULL, 0);
- if (ret <= 0)
- break;
- rest -= ret;
- ptr += ret;
- }
- if (rest == 0)
- debug_printf ("Sending eid credentials succeeded");
- else
- debug_printf ("Sending eid credentials failed");
- return rest == 0;
-}
-
-int
-fhandler_socket::af_local_connect ()
-{
- /* This keeps the test out of select. */
- if (get_addr_family () != AF_LOCAL || get_socket_type () != SOCK_STREAM)
- return 0;
-
- debug_printf ("af_local_connect called");
- bool orig_async_io, orig_is_nonblocking;
- af_local_setblocking (orig_async_io, orig_is_nonblocking);
- if (!af_local_send_secret () || !af_local_recv_secret ()
- || !af_local_send_cred () || !af_local_recv_cred ())
- {
- debug_printf ("accept from unauthorized server");
- ::shutdown (get_socket (), SD_BOTH);
- WSASetLastError (WSAECONNREFUSED);
- return -1;
- }
- af_local_unsetblocking (orig_async_io, orig_is_nonblocking);
- return 0;
-}
-
-int
-fhandler_socket::af_local_accept ()
-{
- debug_printf ("af_local_accept called");
- bool orig_async_io, orig_is_nonblocking;
- af_local_setblocking (orig_async_io, orig_is_nonblocking);
- if (!af_local_recv_secret () || !af_local_send_secret ()
- || !af_local_recv_cred () || !af_local_send_cred ())
- {
- debug_printf ("connect from unauthorized client");
- ::shutdown (get_socket (), SD_BOTH);
- ::closesocket (get_socket ());
- WSASetLastError (WSAECONNABORTED);
- return -1;
- }
- af_local_unsetblocking (orig_async_io, orig_is_nonblocking);
- return 0;
-}
-
-void
-fhandler_socket::af_local_set_cred ()
-{
- sec_pid = getpid ();
- sec_uid = geteuid32 ();
- sec_gid = getegid32 ();
- sec_peer_pid = (pid_t) 0;
- sec_peer_uid = (__uid32_t) -1;
- sec_peer_gid = (__gid32_t) -1;
-}
-
-void
-fhandler_socket::af_local_copy (fhandler_socket *sock)
-{
- sock->connect_secret[0] = connect_secret[0];
- sock->connect_secret[1] = connect_secret[1];
- sock->connect_secret[2] = connect_secret[2];
- sock->connect_secret[3] = connect_secret[3];
- sock->sec_pid = sec_pid;
- sock->sec_uid = sec_uid;
- sock->sec_gid = sec_gid;
- sock->sec_peer_pid = sec_peer_pid;
- sock->sec_peer_uid = sec_peer_uid;
- sock->sec_peer_gid = sec_peer_gid;
-}
-
-void
-fhandler_socket::af_local_set_secret (char *buf)
-{
- if (!entropy_source)
- {
- void *buf = malloc (sizeof (fhandler_dev_random));
- entropy_source = new (buf) fhandler_dev_random ();
- entropy_source->dev () = *urandom_dev;
- }
- if (entropy_source &&
- !entropy_source->open (O_RDONLY))
- {
- delete entropy_source;
- entropy_source = NULL;
- }
- if (entropy_source)
- {
- size_t len = sizeof (connect_secret);
- entropy_source->read (connect_secret, len);
- if (len != sizeof (connect_secret))
- bzero ((char*) connect_secret, sizeof (connect_secret));
- }
- __small_sprintf (buf, "%08x-%08x-%08x-%08x",
- connect_secret [0], connect_secret [1],
- connect_secret [2], connect_secret [3]);
-}
-
-/* Maximum number of concurrently opened sockets from all Cygwin processes
- per session. Note that shared sockets (through dup/fork/exec) are
- counted as one socket. */
-#define NUM_SOCKS (32768 / sizeof (wsa_event))
-
-#define LOCK_EVENTS WaitForSingleObject (wsock_mtx, INFINITE)
-#define UNLOCK_EVENTS ReleaseMutex (wsock_mtx)
-
-static wsa_event wsa_events[NUM_SOCKS] __attribute__((section (".cygwin_dll_common"), shared));
-
-static LONG socket_serial_number __attribute__((section (".cygwin_dll_common"), shared));
-
-static HANDLE wsa_slot_mtx;
-
-static PWCHAR
-sock_shared_name (PWCHAR buf, LONG num)
-{
- __small_swprintf (buf, L"socket.%d", num);
- return buf;
-}
-
-static wsa_event *
-search_wsa_event_slot (LONG new_serial_number)
-{
- WCHAR name[32], searchname[32];
- UNICODE_STRING uname;
- OBJECT_ATTRIBUTES attr;
- NTSTATUS status;
-
- if (!wsa_slot_mtx)
- {
- RtlInitUnicodeString (&uname, sock_shared_name (name, 0));
- InitializeObjectAttributes (&attr, &uname, OBJ_INHERIT | OBJ_OPENIF,
- get_session_parent_dir (),
- everyone_sd (CYG_MUTANT_ACCESS));
- status = NtCreateMutant (&wsa_slot_mtx, CYG_MUTANT_ACCESS, &attr, FALSE);
- if (!NT_SUCCESS (status))
- api_fatal ("Couldn't create/open shared socket mutex %S, %p",
- &uname, status);
- }
- switch (WaitForSingleObject (wsa_slot_mtx, INFINITE))
- {
- case WAIT_OBJECT_0:
- case WAIT_ABANDONED:
- break;
- default:
- api_fatal ("WFSO failed for shared socket mutex, %E");
- break;
- }
- unsigned int slot = new_serial_number % NUM_SOCKS;
- while (wsa_events[slot].serial_number)
- {
- HANDLE searchmtx;
- RtlInitUnicodeString (&uname, sock_shared_name (searchname,
- wsa_events[slot].serial_number));
- InitializeObjectAttributes (&attr, &uname, 0, get_session_parent_dir (),
- NULL);
- status = NtOpenMutant (&searchmtx, READ_CONTROL, &attr);
- if (!NT_SUCCESS (status))
- break;
- /* Mutex still exists, attached socket is active, try next slot. */
- NtClose (searchmtx);
- slot = (slot + 1) % NUM_SOCKS;
- if (slot == (new_serial_number % NUM_SOCKS))
- {
- /* Did the whole array once. Too bad. */
- debug_printf ("No free socket slot");
- ReleaseMutex (wsa_slot_mtx);
- return NULL;
- }
- }
- memset (&wsa_events[slot], 0, sizeof (wsa_event));
- wsa_events[slot].serial_number = new_serial_number;
- ReleaseMutex (wsa_slot_mtx);
- return wsa_events + slot;
-}
-
-bool
-fhandler_socket::init_events ()
-{
- LONG new_serial_number;
- WCHAR name[32];
- UNICODE_STRING uname;
- OBJECT_ATTRIBUTES attr;
- NTSTATUS status;
-
- do
- {
- new_serial_number =
- InterlockedIncrement (&socket_serial_number);
- if (!new_serial_number) /* 0 is reserved for global mutex */
- InterlockedIncrement (&socket_serial_number);
- RtlInitUnicodeString (&uname, sock_shared_name (name, new_serial_number));
- InitializeObjectAttributes (&attr, &uname, OBJ_INHERIT | OBJ_OPENIF,
- get_session_parent_dir (),
- everyone_sd (CYG_MUTANT_ACCESS));
- status = NtCreateMutant (&wsock_mtx, CYG_MUTANT_ACCESS, &attr, FALSE);
- if (!NT_SUCCESS (status))
- {
- debug_printf ("NtCreateMutant(%S), %p", &uname, status);
- set_errno (ENOBUFS);
- return false;
- }
- if (status == STATUS_OBJECT_NAME_EXISTS)
- NtClose (wsock_mtx);
- }
- while (status == STATUS_OBJECT_NAME_EXISTS);
- if ((wsock_evt = CreateEvent (&sec_all, TRUE, FALSE, NULL))
- == WSA_INVALID_EVENT)
- {
- debug_printf ("CreateEvent, %E");
- set_errno (ENOBUFS);
- NtClose (wsock_mtx);
- return false;
- }
- if (WSAEventSelect (get_socket (), wsock_evt, EVENT_MASK) == SOCKET_ERROR)
- {
- debug_printf ("WSAEventSelect, %E");
- set_winsock_errno ();
- NtClose (wsock_evt);
- NtClose (wsock_mtx);
- return false;
- }
- wsock_events = search_wsa_event_slot (new_serial_number);
- /* sock type not yet set here. */
- if (pc.dev == FH_UDP || pc.dev == FH_DGRAM)
- wsock_events->events = FD_WRITE;
- return true;
-}
-
-int
-fhandler_socket::evaluate_events (const long event_mask, long &events,
- bool erase)
-{
- int ret = 0;
- long events_now = 0;
-
- WSANETWORKEVENTS evts = { 0 };
- if (!(WSAEnumNetworkEvents (get_socket (), wsock_evt, &evts)))
- {
- if (evts.lNetworkEvents)
- {
- LOCK_EVENTS;
- wsock_events->events |= evts.lNetworkEvents;
- events_now = (wsock_events->events & event_mask);
- if (evts.lNetworkEvents & FD_CONNECT)
- wsock_events->connect_errorcode = evts.iErrorCode[FD_CONNECT_BIT];
- UNLOCK_EVENTS;
- if ((evts.lNetworkEvents & FD_OOB) && wsock_events->owner)
- kill (wsock_events->owner, SIGURG);
- }
- }
-
- LOCK_EVENTS;
- if ((events = events_now) != 0
- || (events = (wsock_events->events & event_mask)) != 0)
- {
- if (events & FD_CONNECT)
- {
- int wsa_err = 0;
- if ((wsa_err = wsock_events->connect_errorcode) != 0)
- {
- WSASetLastError (wsa_err);
- ret = SOCKET_ERROR;
- }
- else
- wsock_events->events |= FD_WRITE;
- wsock_events->events &= ~FD_CONNECT;
- wsock_events->connect_errorcode = 0;
- }
- if (erase)
- wsock_events->events &= ~(events & ~(FD_WRITE | FD_CLOSE));
- }
- UNLOCK_EVENTS;
-
- return ret;
-}
-
-int
-fhandler_socket::wait_for_events (const long event_mask)
-{
- if (async_io ())
- return 0;
-
- int ret;
- long events;
-
- while (!(ret = evaluate_events (event_mask, events, true)) && !events)
- {
- if (is_nonblocking ())
- {
- WSASetLastError (WSAEWOULDBLOCK);
- return SOCKET_ERROR;
- }
-
- WSAEVENT ev[2] = { wsock_evt, signal_arrived };
- switch (WSAWaitForMultipleEvents (2, ev, FALSE, 50, FALSE))
- {
- case WSA_WAIT_TIMEOUT:
- case WSA_WAIT_EVENT_0:
- break;
-
- case WSA_WAIT_EVENT_0 + 1:
- if (_my_tls.call_signal_handler ())
- {
- sig_dispatch_pending ();
- break;
- }
- WSASetLastError (WSAEINTR);
- return SOCKET_ERROR;
-
- default:
- WSASetLastError (WSAEFAULT);
- return SOCKET_ERROR;
- }
- }
-
- return ret;
-}
-
-void
-fhandler_socket::release_events ()
-{
- NtClose (wsock_evt);
- NtClose (wsock_mtx);
-}
-
-void
-fhandler_socket::fixup_after_fork (HANDLE parent)
-{
- fork_fixup (parent, wsock_mtx, "wsock_mtx");
- fork_fixup (parent, wsock_evt, "wsock_evt");
- fhandler_base::fixup_after_fork (parent);
-}
-
-int
-fhandler_socket::dup (fhandler_base *child)
-{
- debug_printf ("here");
- fhandler_socket *fhs = (fhandler_socket *) child;
-
- if (!DuplicateHandle (hMainProc, wsock_mtx, hMainProc, &fhs->wsock_mtx, 0,
- TRUE, DUPLICATE_SAME_ACCESS))
- {
- __seterrno ();
- return -1;
- }
- if (!DuplicateHandle (hMainProc, wsock_evt, hMainProc, &fhs->wsock_evt, 0,
- TRUE, DUPLICATE_SAME_ACCESS))
- {
- __seterrno ();
- NtClose (fhs->wsock_mtx);
- return -1;
- }
- fhs->wsock_events = wsock_events;
-
- fhs->addr_family = addr_family;
- fhs->set_socket_type (get_socket_type ());
- if (get_addr_family () == AF_LOCAL)
- {
- fhs->set_sun_path (get_sun_path ());
- if (get_socket_type () == SOCK_STREAM)
- {
- fhs->sec_pid = sec_pid;
- fhs->sec_uid = sec_uid;
- fhs->sec_gid = sec_gid;
- fhs->sec_peer_pid = sec_peer_pid;
- fhs->sec_peer_uid = sec_peer_uid;
- fhs->sec_peer_gid = sec_peer_gid;
- }
- }
- fhs->connect_state (connect_state ());
- int ret = fhandler_base::dup (child);
- if (ret)
- {
- NtClose (fhs->wsock_evt);
- NtClose (fhs->wsock_mtx);
- }
- return ret;
-}
-
-int __stdcall
-fhandler_socket::fstat (struct __stat64 *buf)
-{
- int res;
- if (get_device () == FH_UNIX)
- {
- res = fhandler_base::fstat_fs (buf);
- if (!res)
- {
- buf->st_mode = (buf->st_mode & ~S_IFMT) | S_IFSOCK;
- }
- }
- else
- {
- res = fhandler_base::fstat (buf);
- if (!res)
- {
- buf->st_dev = 0;
- buf->st_ino = (__ino64_t) ((DWORD) get_handle ());
- buf->st_mode = S_IFSOCK | S_IRWXU | S_IRWXG | S_IRWXO;
- }
- }
- return res;
-}
-
-int __stdcall
-fhandler_socket::fstatvfs (struct statvfs *sfs)
-{
- if (get_device () == FH_UNIX)
- {
- fhandler_disk_file fh (pc);
- fh.get_device () = FH_FS;
- return fh.fstatvfs (sfs);
- }
- set_errno (EBADF);
- return -1;
-}
-
-int
-fhandler_socket::fchmod (mode_t mode)
-{
- if (get_device () == FH_UNIX)
- {
- fhandler_disk_file fh (pc);
- fh.get_device () = FH_FS;
- int ret = fh.fchmod (S_IFSOCK | adjust_socket_file_mode (mode));
- return ret;
- }
- set_errno (EBADF);
- return -1;
-}
-
-int
-fhandler_socket::fchown (__uid32_t uid, __gid32_t gid)
-{
- if (get_device () == FH_UNIX)
- {
- fhandler_disk_file fh (pc);
- return fh.fchown (uid, gid);
- }
- set_errno (EBADF);
- return -1;
-}
-
-int
-fhandler_socket::facl (int cmd, int nentries, __aclent32_t *aclbufp)
-{
- if (get_device () == FH_UNIX)
- {
- fhandler_disk_file fh (pc);
- return fh.facl (cmd, nentries, aclbufp);
- }
- set_errno (EBADF);
- return -1;
-}
-
-int
-fhandler_socket::link (const char *newpath)
-{
- if (get_device () == FH_UNIX)
- {
- fhandler_disk_file fh (pc);
- return fh.link (newpath);
- }
- return fhandler_base::link (newpath);
-}
-
-static inline bool
-address_in_use (const struct sockaddr *addr)
-{
- switch (addr->sa_family)
- {
- case AF_INET:
- {
- PMIB_TCPTABLE tab;
- PMIB_TCPROW entry;
- DWORD size = 0, i;
- struct sockaddr_in *in = (struct sockaddr_in *) addr;
-
- if (GetTcpTable (NULL, &size, FALSE) == ERROR_INSUFFICIENT_BUFFER)
- {
- tab = (PMIB_TCPTABLE) alloca (size += 16 * sizeof (PMIB_TCPROW));
- if (!GetTcpTable (tab, &size, FALSE))
- for (i = tab->dwNumEntries, entry = tab->table; i > 0;
- --i, ++entry)
- if (entry->dwLocalAddr == in->sin_addr.s_addr
- && entry->dwLocalPort == in->sin_port
- && entry->dwState >= MIB_TCP_STATE_LISTEN
- && entry->dwState <= MIB_TCP_STATE_LAST_ACK)
- return true;
- }
- }
- break;
- case AF_INET6:
- {
- /* This test works on XP SP2 and above which should cover almost
- all IPv6 users... */
- PMIB_TCP6TABLE_OWNER_PID tab;
- PMIB_TCP6ROW_OWNER_PID entry;
- DWORD size = 0, i;
- struct sockaddr_in6 *in6 = (struct sockaddr_in6 *) addr;
-
- if (GetExtendedTcpTable (NULL, &size, FALSE, AF_INET6,
- TCP_TABLE_OWNER_PID_ALL, 0)
- == ERROR_INSUFFICIENT_BUFFER)
- {
- tab = (PMIB_TCP6TABLE_OWNER_PID)
- alloca (size += 16 * sizeof (PMIB_TCP6ROW_OWNER_PID));
- if (!GetExtendedTcpTable (tab, &size, FALSE, AF_INET6,
- TCP_TABLE_OWNER_PID_ALL, 0))
- for (i = tab->dwNumEntries, entry = tab->table; i > 0;
- --i, ++entry)
- if (IN6_ARE_ADDR_EQUAL (entry->ucLocalAddr,
- in6->sin6_addr.s6_addr)
- /* FIXME: Is testing for the scope required. too?!? */
- && entry->dwLocalPort == in6->sin6_port
- && entry->dwState >= MIB_TCP_STATE_LISTEN
- && entry->dwState <= MIB_TCP_STATE_LAST_ACK)
- return true;
- }
- }
- break;
- default:
- break;
- }
- return false;
-}
-
-int
-fhandler_socket::bind (const struct sockaddr *name, int namelen)
-{
- int res = -1;
-
- if (name->sa_family == AF_LOCAL)
- {
-#define un_addr ((struct sockaddr_un *) name)
- struct sockaddr_in sin;
- int len = sizeof sin;
-
- if (strlen (un_addr->sun_path) >= UNIX_PATH_LEN)
- {
- set_errno (ENAMETOOLONG);
- goto out;
- }
- sin.sin_family = AF_INET;
- sin.sin_port = 0;
- sin.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
- if (::bind (get_socket (), (sockaddr *) &sin, len))
- {
- syscall_printf ("AF_LOCAL: bind failed");
- set_winsock_errno ();
- goto out;
- }
- if (::getsockname (get_socket (), (sockaddr *) &sin, &len))
- {
- syscall_printf ("AF_LOCAL: getsockname failed");
- set_winsock_errno ();
- goto out;
- }
-
- sin.sin_port = ntohs (sin.sin_port);
- debug_printf ("AF_LOCAL: socket bound to port %u", sin.sin_port);
-
- path_conv pc (un_addr->sun_path, PC_SYM_FOLLOW);
- if (pc.error)
- {
- set_errno (pc.error);
- goto out;
- }
- if (pc.exists ())
- {
- set_errno (EADDRINUSE);
- goto out;
- }
- mode_t mode = adjust_socket_file_mode ((S_IRWXU | S_IRWXG | S_IRWXO)
- & ~cygheap->umask);
- DWORD fattr = FILE_ATTRIBUTE_SYSTEM;
- if (!(mode & (S_IWUSR | S_IWGRP | S_IWOTH)))
- fattr |= FILE_ATTRIBUTE_READONLY;
- SECURITY_ATTRIBUTES sa = sec_none_nih;
- security_descriptor sd;
- /* See comments in fhander_base::open () for an explanation why we defer
- setting security attributes on remote files. */
- if (pc.has_acls () && !pc.isremote ())
- set_security_attribute (pc, mode, &sa, sd);
- NTSTATUS status;
- HANDLE fh;
- OBJECT_ATTRIBUTES attr;
- IO_STATUS_BLOCK io;
- status = NtCreateFile (&fh, DELETE | FILE_GENERIC_WRITE,
- pc.get_object_attr (attr, sa), &io, NULL, fattr,
- FILE_SHARE_VALID_FLAGS, FILE_CREATE,
- FILE_NON_DIRECTORY_FILE
- | FILE_SYNCHRONOUS_IO_NONALERT
- | FILE_OPEN_FOR_BACKUP_INTENT,
- NULL, 0);
- if (!NT_SUCCESS (status))
- {
- if (io.Information == FILE_EXISTS)
- set_errno (EADDRINUSE);
- else
- __seterrno_from_nt_status (status);
- }
- else
- {
- if (pc.has_acls () && pc.isremote ())
- set_file_attribute (fh, pc, ILLEGAL_UID, ILLEGAL_GID, mode);
- char buf[sizeof (SOCKET_COOKIE) + 80];
- __small_sprintf (buf, "%s%u %c ", SOCKET_COOKIE, sin.sin_port,
- get_socket_type () == SOCK_STREAM ? 's'
- : get_socket_type () == SOCK_DGRAM ? 'd' : '-');
- af_local_set_secret (strchr (buf, '\0'));
- DWORD blen = strlen (buf) + 1;
- status = NtWriteFile (fh, NULL, NULL, NULL, &io, buf, blen, NULL, 0);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- FILE_DISPOSITION_INFORMATION fdi = { TRUE };
- status = NtSetInformationFile (fh, &io, &fdi, sizeof fdi,
- FileDispositionInformation);
- if (!NT_SUCCESS (status))
- debug_printf ("Setting delete dispostion failed, status = %p",
- status);
- }
- else
- {
- set_sun_path (un_addr->sun_path);
- res = 0;
- }
- NtClose (fh);
- }
-#undef un_addr
- }
- else
- {
- /* If the application didn't explicitely call setsockopt (SO_REUSEADDR),
- enforce exclusive local address use using the SO_EXCLUSIVEADDRUSE
- socket option, to emulate POSIX socket behaviour more closely.
-
- KB 870562: Note that this option is only available since NT4 SP4.
- Also note that a bug in Win2K SP1-3 and XP up to SP1 only enables
- this option for users in the local administrators group. */
- if (wincap.has_exclusiveaddruse ())
- {
- if (!saw_reuseaddr ())
- {
- int on = 1;
- int ret = ::setsockopt (get_socket (), SOL_SOCKET,
- ~(SO_REUSEADDR),
- (const char *) &on, sizeof on);
- debug_printf ("%d = setsockopt (SO_EXCLUSIVEADDRUSE), %E", ret);
- }
- else if (!wincap.has_enhanced_socket_security ())
- {
- debug_printf ("SO_REUSEADDR set");
- /* There's a bug in SO_REUSEADDR handling in WinSock.
- Per standards, we must not be able to reuse a complete
- duplicate of a local TCP address (same IP, same port),
- even if SO_REUSEADDR has been set. That's unfortunately
- possible in WinSock.
-
- So we're testing here if the local address is already in
- use and don't bind, if so. This only works for OSes with
- IP Helper support and is, of course, still prone to races.
-
- However, we don't have to do this on systems supporting
- "enhanced socket security" (2K3 and later). On these
- systems the default binding behaviour is exactly as you'd
- expect for SO_REUSEADDR, while setting SO_REUSEADDR re-enables
- the wrong behaviour. So all we have to do on these newer
- systems is never to set SO_REUSEADDR but only to note that
- it has been set for the above SO_EXCLUSIVEADDRUSE setting.
- See setsockopt() in net.cc. */
- if (get_socket_type () == SOCK_STREAM
- && wincap.has_ip_helper_lib ()
- && address_in_use (name))
- {
- debug_printf ("Local address in use, don't bind");
- set_errno (EADDRINUSE);
- goto out;
- }
- }
- }
- if (::bind (get_socket (), name, namelen))
- set_winsock_errno ();
- else
- res = 0;
- }
-
-out:
- return res;
-}
-
-int
-fhandler_socket::connect (const struct sockaddr *name, int namelen)
-{
- int res = -1;
- bool in_progress = false;
- struct sockaddr_storage sst;
- DWORD err;
- int type;
-
- if (!get_inet_addr (name, namelen, &sst, &namelen, &type, connect_secret))
- return -1;
-
- if (get_addr_family () == AF_LOCAL && get_socket_type () != type)
- {
- WSASetLastError (WSAEPROTOTYPE);
- set_winsock_errno ();
- return -1;
- }
-
- res = ::connect (get_socket (), (struct sockaddr *) &sst, namelen);
- if (!is_nonblocking ()
- && res == SOCKET_ERROR
- && WSAGetLastError () == WSAEWOULDBLOCK)
- res = wait_for_events (FD_CONNECT | FD_CLOSE);
-
- if (!res)
- err = 0;
- else
- {
- err = WSAGetLastError ();
- /* Special handling for connect to return the correct error code
- when called on a non-blocking socket. */
- if (is_nonblocking ())
- {
- if (err == WSAEWOULDBLOCK || err == WSAEALREADY)
- in_progress = true;
-
- if (err == WSAEWOULDBLOCK)
- WSASetLastError (err = WSAEINPROGRESS);
- }
- if (err == WSAEINVAL)
- WSASetLastError (err = WSAEISCONN);
- set_winsock_errno ();
- }
-
- if (get_addr_family () == AF_LOCAL && (!res || in_progress))
- set_sun_path (name->sa_data);
-
- if (get_addr_family () == AF_LOCAL && get_socket_type () == SOCK_STREAM)
- {
- af_local_set_cred (); /* Don't move into af_local_connect since
- af_local_connect is called from select,
- possibly running under another identity. */
- if (!res && af_local_connect ())
- {
- set_winsock_errno ();
- return -1;
- }
- }
-
- if (err == WSAEINPROGRESS || err == WSAEALREADY)
- connect_state (connect_pending);
- else if (err)
- connect_state (connect_failed);
- else
- connect_state (connected);
-
- return res;
-}
-
-int
-fhandler_socket::listen (int backlog)
-{
- int res = ::listen (get_socket (), backlog);
- if (res && WSAGetLastError () == WSAEINVAL)
- {
- /* It's perfectly valid to call listen on an unbound INET socket.
- In this case the socket is automatically bound to an unused
- port number, listening on all interfaces. On Winsock, listen
- fails with WSAEINVAL when it's called on an unbound socket.
- So we have to bind manually here to have POSIX semantics. */
- if (get_addr_family () == AF_INET)
- {
- struct sockaddr_in sin;
- sin.sin_family = AF_INET;
- sin.sin_port = 0;
- sin.sin_addr.s_addr = INADDR_ANY;
- if (!::bind (get_socket (), (struct sockaddr *) &sin, sizeof sin))
- res = ::listen (get_socket (), backlog);
- }
- else if (get_addr_family () == AF_INET6)
- {
- struct sockaddr_in6 sin6 =
- {
- sin6_family: AF_INET6,
- sin6_port: 0,
- sin6_flowinfo: 0,
- sin6_addr: {{IN6ADDR_ANY_INIT}},
- sin6_scope_id: 0
- };
- if (!::bind (get_socket (), (struct sockaddr *) &sin6, sizeof sin6))
- res = ::listen (get_socket (), backlog);
- }
- }
- if (!res)
- {
- if (get_addr_family () == AF_LOCAL && get_socket_type () == SOCK_STREAM)
- af_local_set_cred ();
- connect_state (connected);
- listener (true);
- }
- else
- set_winsock_errno ();
- return res;
-}
-
-int
-fhandler_socket::accept (struct sockaddr *peer, int *len)
-{
- /* Allows NULL peer and len parameters. */
- struct sockaddr_in peer_dummy;
- int len_dummy;
- if (!peer)
- peer = (struct sockaddr *) &peer_dummy;
- if (!len)
- {
- len_dummy = sizeof (struct sockaddr_in);
- len = &len_dummy;
- }
-
- /* accept on NT fails if len < sizeof (sockaddr_in)
- * some programs set len to
- * sizeof (name.sun_family) + strlen (name.sun_path) for UNIX domain
- */
- if (len && ((unsigned) *len < sizeof (struct sockaddr_in)))
- *len = sizeof (struct sockaddr_in);
-
-
- int res = 0;
- while (!(res = wait_for_events (FD_ACCEPT | FD_CLOSE))
- && (res = ::accept (get_socket (), peer, len)) == SOCKET_ERROR
- && WSAGetLastError () == WSAEWOULDBLOCK)
- ;
- if (res == (int) INVALID_SOCKET)
- set_winsock_errno ();
- else
- {
- cygheap_fdnew res_fd;
- if (res_fd >= 0 && fdsock (res_fd, &dev (), res))
- {
- fhandler_socket *sock = (fhandler_socket *) res_fd;
- sock->set_addr_family (get_addr_family ());
- sock->set_socket_type (get_socket_type ());
- sock->async_io (async_io ());
- sock->set_nonblocking (is_nonblocking ());
- if (get_addr_family () == AF_LOCAL)
- {
- sock->set_sun_path (get_sun_path ());
- if (get_socket_type () == SOCK_STREAM)
- {
- /* Don't forget to copy credentials from accepting
- socket to accepted socket and start transaction
- on accepted socket! */
- af_local_copy (sock);
- res = sock->af_local_accept ();
- if (res == -1)
- {
- res_fd.release ();
- set_winsock_errno ();
- goto out;
- }
- }
- }
- /* No locking necessary at this point. */
- sock->wsock_events->events = wsock_events->events | FD_WRITE;
- sock->wsock_events->owner = wsock_events->owner;
- sock->connect_state (connected);
- res = res_fd;
- }
- else
- {
- closesocket (res);
- res = -1;
- }
- }
-
-out:
- debug_printf ("res %d", res);
- return res;
-}
-
-int
-fhandler_socket::getsockname (struct sockaddr *name, int *namelen)
-{
- int res = -1;
-
- if (get_addr_family () == AF_LOCAL)
- {
- struct sockaddr_un *sun = (struct sockaddr_un *) name;
- memset (sun, 0, *namelen);
- sun->sun_family = AF_LOCAL;
-
- if (!get_sun_path ())
- sun->sun_path[0] = '\0';
- else
- /* According to SUSv2 "If the actual length of the address is
- greater than the length of the supplied sockaddr structure, the
- stored address will be truncated." We play it save here so
- that the path always has a trailing 0 even if it's truncated. */
- strncpy (sun->sun_path, get_sun_path (),
- *namelen - sizeof *sun + sizeof sun->sun_path - 1);
-
- *namelen = sizeof *sun - sizeof sun->sun_path
- + strlen (sun->sun_path) + 1;
- res = 0;
- }
- else
- {
- res = ::getsockname (get_socket (), name, namelen);
- if (res)
- {
- if (WSAGetLastError () == WSAEINVAL)
- {
- /* Winsock returns WSAEINVAL if the socket is locally
- unbound. Per SUSv3 this is not an error condition.
- We're faking a valid return value here by creating the
- same content in the sockaddr structure as on Linux. */
- switch (get_addr_family ())
- {
- case AF_INET:
- res = 0;
- *namelen = sizeof (struct sockaddr_in);
- break;
- case AF_INET6:
- res = 0;
- *namelen = sizeof (struct sockaddr_in6);
- break;
- default:
- WSASetLastError (WSAEOPNOTSUPP);
- break;
- }
- if (!res)
- {
- memset (name, 0, *namelen);
- name->sa_family = get_addr_family ();
- }
- }
- if (res)
- set_winsock_errno ();
- }
- }
-
- return res;
-}
-
-int
-fhandler_socket::getpeername (struct sockaddr *name, int *namelen)
-{
- int res = ::getpeername (get_socket (), name, namelen);
- if (res)
- set_winsock_errno ();
-
- return res;
-}
-
-int
-fhandler_socket::readv (const struct iovec *const iov, const int iovcnt,
- ssize_t tot)
-{
- struct msghdr msg =
- {
- msg_name: NULL,
- msg_namelen: 0,
- msg_iov: (struct iovec *) iov, // const_cast
- msg_iovlen: iovcnt,
- msg_control: NULL,
- msg_controllen: 0,
- msg_flags: 0
- };
-
- return recvmsg (&msg, 0);
-}
-
-inline ssize_t
-fhandler_socket::recv_internal (WSABUF *wsabuf, DWORD wsacnt, DWORD flags,
- struct sockaddr *from, int *fromlen)
-{
- ssize_t res = 0;
- DWORD ret = 0, wret;
- int evt_mask = FD_READ | ((flags & MSG_OOB) ? FD_OOB : 0);
-
- bool waitall = (flags & MSG_WAITALL);
- flags &= (MSG_OOB | MSG_PEEK | MSG_DONTROUTE);
- if (waitall)
- {
- if (get_socket_type () != SOCK_STREAM)
- {
- WSASetLastError (WSAEOPNOTSUPP);
- set_winsock_errno ();
- return SOCKET_ERROR;
- }
- if (is_nonblocking () || (flags & (MSG_OOB | MSG_PEEK)))
- waitall = false;
- }
-
- /* Note: Don't call WSARecvFrom(MSG_PEEK) without actually having data
- waiting in the buffers, otherwise the event handling gets messed up
- for some reason. */
- while (!(res = wait_for_events (evt_mask | FD_CLOSE))
- || saw_shutdown_read ())
- {
- res = WSARecvFrom (get_socket (), wsabuf, wsacnt, &wret,
- &flags, from, fromlen, NULL, NULL);
- if (!res)
- {
- ret += wret;
- if (!waitall)
- break;
- while (wret && wsacnt)
- {
- if (wsabuf->len > wret)
- {
- wsabuf->len -= wret;
- wsabuf->buf += wret;
- wret = 0;
- }
- else
- {
- wret -= wsabuf->len;
- ++wsabuf;
- --wsacnt;
- }
- }
- if (!wret)
- break;
- }
- else if (WSAGetLastError () != WSAEWOULDBLOCK)
- break;
- }
-
- if (!ret && res == SOCKET_ERROR)
- {
- /* According to SUSv3, errno isn't set in that case and no error
- condition is returned. */
- if (WSAGetLastError () == WSAEMSGSIZE)
- return ret;
-
- /* ESHUTDOWN isn't defined for recv in SUSv3. Simply EOF is returned
- in this case. */
- if (WSAGetLastError () == WSAESHUTDOWN)
- return 0;
-
- set_winsock_errno ();
- return SOCKET_ERROR;
- }
-
- return ret;
-}
-
-int
-fhandler_socket::recvfrom (void *ptr, size_t len, int flags,
- struct sockaddr *from, int *fromlen)
-{
- WSABUF wsabuf = { len, (char *) ptr };
- return recv_internal (&wsabuf, 1, flags, from, fromlen);
-}
-
-int
-fhandler_socket::recvmsg (struct msghdr *msg, int flags)
-{
- if (CYGWIN_VERSION_CHECK_FOR_USING_ANCIENT_MSGHDR)
- ((struct OLD_msghdr *) msg)->msg_accrightslen = 0;
- else
- {
- msg->msg_controllen = 0;
- msg->msg_flags = 0;
- }
- if (get_addr_family () == AF_LOCAL)
- {
- /* On AF_LOCAL sockets the (fixed-size) name of the shared memory
- area used for descriptor passing is transmitted first.
- If this string is empty, no descriptors are passed and we can
- go ahead recv'ing the normal data blocks. Otherwise start
- special handling for descriptor passing. */
- /*TODO*/
- }
-
- WSABUF wsabuf[msg->msg_iovlen];
- WSABUF *wsaptr = wsabuf + msg->msg_iovlen;
- const struct iovec *iovptr = msg->msg_iov + msg->msg_iovlen;
- while (--wsaptr >= wsabuf)
- {
- wsaptr->len = (--iovptr)->iov_len;
- wsaptr->buf = (char *) iovptr->iov_base;
- }
-
- struct sockaddr *from = (struct sockaddr *) msg->msg_name;
- int *fromlen = from ? &msg->msg_namelen : NULL;
-
- return recv_internal (wsabuf, msg->msg_iovlen, flags, from, fromlen);
-}
-
-int
-fhandler_socket::writev (const struct iovec *const iov, const int iovcnt,
- ssize_t tot)
-{
- struct msghdr msg =
- {
- msg_name: NULL,
- msg_namelen: 0,
- msg_iov: (struct iovec *) iov, // const_cast
- msg_iovlen: iovcnt,
- msg_control: NULL,
- msg_controllen: 0,
- msg_flags: 0
- };
-
- return sendmsg (&msg, 0);
-}
-
-inline ssize_t
-fhandler_socket::send_internal (struct _WSABUF *wsabuf, DWORD wsacnt, int flags,
- const struct sockaddr *to, int tolen)
-{
- int res = 0;
- DWORD ret = 0, err = 0, sum = 0, off = 0;
- WSABUF buf;
-
- for (DWORD i = 0; i < wsacnt; off >= wsabuf[i].len && (++i, off = 0))
- {
- buf.buf = wsabuf[i].buf + off;
- buf.len = wsabuf[i].len - off;
- if (buf.len > 65536) /* See KB 823764 */
- buf.len = 65536;
-
- do
- {
- if ((res = WSASendTo (get_socket (), &buf, 1, &ret,
- flags & (MSG_OOB | MSG_DONTROUTE), to, tolen,
- NULL, NULL))
- && (err = WSAGetLastError ()) == WSAEWOULDBLOCK)
- {
- LOCK_EVENTS;
- wsock_events->events &= ~FD_WRITE;
- UNLOCK_EVENTS;
- }
- }
- while (res && err == WSAEWOULDBLOCK
- && !(res = wait_for_events (FD_WRITE | FD_CLOSE)));
-
- if (!res)
- {
- off += ret;
- sum += ret;
- }
- else if (is_nonblocking () || err != WSAEWOULDBLOCK)
- break;
- }
-
- if (sum)
- res = sum;
- else if (res == SOCKET_ERROR)
- {
- set_winsock_errno ();
-
- /* Special handling for EPIPE and SIGPIPE.
-
- EPIPE is generated if the local end has been shut down on a connection
- oriented socket. In this case the process will also receive a SIGPIPE
- unless MSG_NOSIGNAL is set. */
- if (get_errno () == ESHUTDOWN && get_socket_type () == SOCK_STREAM)
- {
- set_errno (EPIPE);
- if (! (flags & MSG_NOSIGNAL))
- raise (SIGPIPE);
- }
- }
-
- return res;
-}
-
-ssize_t
-fhandler_socket::sendto (const void *ptr, size_t len, int flags,
- const struct sockaddr *to, int tolen)
-{
- struct sockaddr_storage sst;
-
- if (to && !get_inet_addr (to, tolen, &sst, &tolen))
- return SOCKET_ERROR;
-
- /* Never write more than 64K at once to workaround a problem with
- Winsock, which creates a temporary buffer with the total incoming
- buffer size and copies the whole content over, regardless of
- the size of the internal send buffer. A buffer full condition
- is only recognized in subsequent calls and, if len is big enough,
- the call even might fail with an out-of-memory condition. */
- WSABUF wsabuf = { len, (char *) ptr };
- return send_internal (&wsabuf, 1, flags,
- (to ? (const struct sockaddr *) &sst : NULL), tolen);
-}
-
-int
-fhandler_socket::sendmsg (const struct msghdr *msg, int flags)
-{
- if (get_addr_family () == AF_LOCAL)
- {
- /* For AF_LOCAL/AF_UNIX sockets, if descriptors are given, start
- the special handling for descriptor passing. Otherwise just
- transmit an empty string to tell the receiver that no
- descriptor passing is done. */
- /*TODO*/
- }
-
- WSABUF wsabuf[msg->msg_iovlen];
- WSABUF *wsaptr = wsabuf;
- const struct iovec *iovptr = msg->msg_iov;
- for (int i = 0; i < msg->msg_iovlen; ++i)
- {
- wsaptr->len = iovptr->iov_len;
- (wsaptr++)->buf = (char *) (iovptr++)->iov_base;
- }
-
- return send_internal (wsabuf, msg->msg_iovlen, flags,
- (struct sockaddr *) msg->msg_name, msg->msg_namelen);
-}
-
-int
-fhandler_socket::shutdown (int how)
-{
- int res = ::shutdown (get_socket (), how);
-
- if (res)
- set_winsock_errno ();
- else
- switch (how)
- {
- case SHUT_RD:
- saw_shutdown_read (true);
- break;
- case SHUT_WR:
- saw_shutdown_write (true);
- break;
- case SHUT_RDWR:
- saw_shutdown_read (true);
- saw_shutdown_write (true);
- break;
- }
- return res;
-}
-
-int
-fhandler_socket::close ()
-{
- int res = 0;
- /* TODO: CV - 2008-04-16. Lingering disabled. The original problem
- could be no longer reproduced on NT4, XP, 2K8. Any return of a
- spurious "Connection reset by peer" *could* be caused by disabling
- the linger code here... */
-#if 0
- /* HACK to allow a graceful shutdown even if shutdown() hasn't been
- called by the application. Note that this isn't the ultimate
- solution but it helps in many cases. */
- struct linger linger;
- linger.l_onoff = 1;
- linger.l_linger = 240; /* secs. default 2MSL value according to MSDN. */
- setsockopt (get_socket (), SOL_SOCKET, SO_LINGER,
- (const char *)&linger, sizeof linger);
-#endif
- release_events ();
- while ((res = closesocket (get_socket ())) != 0)
- {
- if (WSAGetLastError () != WSAEWOULDBLOCK)
- {
- set_winsock_errno ();
- res = -1;
- break;
- }
- if (WaitForSingleObject (signal_arrived, 10) == WAIT_OBJECT_0)
- {
- set_errno (EINTR);
- res = -1;
- break;
- }
- WSASetLastError (0);
- }
-
- debug_printf ("%d = fhandler_socket::close()", res);
- return res;
-}
-
-/* Definitions of old ifreq stuff used prior to Cygwin 1.7.0. */
-#define OLD_SIOCGIFFLAGS _IOW('s', 101, struct __old_ifreq)
-#define OLD_SIOCGIFADDR _IOW('s', 102, struct __old_ifreq)
-#define OLD_SIOCGIFBRDADDR _IOW('s', 103, struct __old_ifreq)
-#define OLD_SIOCGIFNETMASK _IOW('s', 104, struct __old_ifreq)
-#define OLD_SIOCGIFHWADDR _IOW('s', 105, struct __old_ifreq)
-#define OLD_SIOCGIFMETRIC _IOW('s', 106, struct __old_ifreq)
-#define OLD_SIOCGIFMTU _IOW('s', 107, struct __old_ifreq)
-#define OLD_SIOCGIFINDEX _IOW('s', 108, struct __old_ifreq)
-
-#define CONV_OLD_TO_NEW_SIO(old) (((old)&0xff00ffff)|(((long)sizeof(struct ifreq)&IOCPARM_MASK)<<16))
-
-struct __old_ifreq {
-#define __OLD_IFNAMSIZ 16
- union {
- char ifrn_name[__OLD_IFNAMSIZ]; /* if name, e.g. "en0" */
- } ifr_ifrn;
-
- union {
- struct sockaddr ifru_addr;
- struct sockaddr ifru_broadaddr;
- struct sockaddr ifru_netmask;
- struct sockaddr ifru_hwaddr;
- short ifru_flags;
- int ifru_metric;
- int ifru_mtu;
- int ifru_ifindex;
- } ifr_ifru;
-};
-
-int
-fhandler_socket::ioctl (unsigned int cmd, void *p)
-{
- extern int get_ifconf (struct ifconf *ifc, int what); /* net.cc */
- int res;
- struct ifconf ifc, *ifcp;
- struct ifreq *ifrp;
-
- switch (cmd)
- {
- case SIOCGIFCONF:
- ifcp = (struct ifconf *) p;
- if (!ifcp)
- {
- set_errno (EINVAL);
- return -1;
- }
- if (CYGWIN_VERSION_CHECK_FOR_OLD_IFREQ)
- {
- ifc.ifc_len = ifcp->ifc_len / sizeof (struct __old_ifreq)
- * sizeof (struct ifreq);
- ifc.ifc_buf = (caddr_t) alloca (ifc.ifc_len);
- }
- else
- {
- ifc.ifc_len = ifcp->ifc_len;
- ifc.ifc_buf = ifcp->ifc_buf;
- }
- res = get_ifconf (&ifc, cmd);
- if (res)
- debug_printf ("error in get_ifconf");
- if (CYGWIN_VERSION_CHECK_FOR_OLD_IFREQ)
- {
- struct __old_ifreq *ifr = (struct __old_ifreq *) ifcp->ifc_buf;
- for (ifrp = ifc.ifc_req;
- (caddr_t) ifrp < ifc.ifc_buf + ifc.ifc_len;
- ++ifrp, ++ifr)
- {
- memcpy (&ifr->ifr_ifrn, &ifrp->ifr_ifrn, sizeof ifr->ifr_ifrn);
- ifr->ifr_name[__OLD_IFNAMSIZ - 1] = '\0';
- memcpy (&ifr->ifr_ifru, &ifrp->ifr_ifru, sizeof ifr->ifr_ifru);
- }
- ifcp->ifc_len = ifc.ifc_len / sizeof (struct ifreq)
- * sizeof (struct __old_ifreq);
- }
- else
- ifcp->ifc_len = ifc.ifc_len;
- break;
- case OLD_SIOCGIFFLAGS:
- case OLD_SIOCGIFADDR:
- case OLD_SIOCGIFBRDADDR:
- case OLD_SIOCGIFNETMASK:
- case OLD_SIOCGIFHWADDR:
- case OLD_SIOCGIFMETRIC:
- case OLD_SIOCGIFMTU:
- case OLD_SIOCGIFINDEX:
- cmd = CONV_OLD_TO_NEW_SIO (cmd);
- /*FALLTHRU*/
- case SIOCGIFFLAGS:
- case SIOCGIFBRDADDR:
- case SIOCGIFNETMASK:
- case SIOCGIFADDR:
- case SIOCGIFHWADDR:
- case SIOCGIFMETRIC:
- case SIOCGIFMTU:
- case SIOCGIFINDEX:
- case SIOCGIFFRNDLYNAM:
- case SIOCGIFDSTADDR:
- {
- if (!p)
- {
- debug_printf ("ifr == NULL");
- set_errno (EINVAL);
- return -1;
- }
-
- if (cmd > SIOCGIFINDEX && CYGWIN_VERSION_CHECK_FOR_OLD_IFREQ)
- {
- debug_printf ("cmd not supported on this platform");
- set_errno (EINVAL);
- return -1;
- }
- ifc.ifc_len = 64 * sizeof (struct ifreq);
- ifc.ifc_buf = (caddr_t) alloca (ifc.ifc_len);
- if (cmd == SIOCGIFFRNDLYNAM)
- {
- struct ifreq_frndlyname *iff = (struct ifreq_frndlyname *)
- alloca (64 * sizeof (struct ifreq_frndlyname));
- for (int i = 0; i < 64; ++i)
- ifc.ifc_req[i].ifr_frndlyname = &iff[i];
- }
-
- res = get_ifconf (&ifc, cmd);
- if (res)
- {
- debug_printf ("error in get_ifconf");
- break;
- }
-
- if (CYGWIN_VERSION_CHECK_FOR_OLD_IFREQ)
- {
- struct __old_ifreq *ifr = (struct __old_ifreq *) p;
- debug_printf (" name: %s", ifr->ifr_name);
- for (ifrp = ifc.ifc_req;
- (caddr_t) ifrp < ifc.ifc_buf + ifc.ifc_len;
- ++ifrp)
- {
- debug_printf ("testname: %s", ifrp->ifr_name);
- if (! strcmp (ifrp->ifr_name, ifr->ifr_name))
- {
- memcpy (&ifr->ifr_ifru, &ifrp->ifr_ifru,
- sizeof ifr->ifr_ifru);
- break;
- }
- }
- }
- else
- {
- struct ifreq *ifr = (struct ifreq *) p;
- debug_printf (" name: %s", ifr->ifr_name);
- for (ifrp = ifc.ifc_req;
- (caddr_t) ifrp < ifc.ifc_buf + ifc.ifc_len;
- ++ifrp)
- {
- debug_printf ("testname: %s", ifrp->ifr_name);
- if (! strcmp (ifrp->ifr_name, ifr->ifr_name))
- {
- if (cmd == SIOCGIFFRNDLYNAM)
- /* The application has to care for the space. */
- memcpy (ifr->ifr_frndlyname, ifrp->ifr_frndlyname,
- sizeof (struct ifreq_frndlyname));
- else
- memcpy (&ifr->ifr_ifru, &ifrp->ifr_ifru,
- sizeof ifr->ifr_ifru);
- break;
- }
- }
- }
- if ((caddr_t) ifrp >= ifc.ifc_buf + ifc.ifc_len)
- {
- set_errno (EINVAL);
- return -1;
- }
- break;
- }
- case FIOASYNC:
- res = WSAAsyncSelect (get_socket (), winmsg, WM_ASYNCIO,
- *(int *) p ? ASYNC_MASK : 0);
- syscall_printf ("Async I/O on socket %s",
- *(int *) p ? "started" : "cancelled");
- async_io (*(int *) p != 0);
- /* If async_io is switched off, revert the event handling. */
- if (*(int *) p == 0)
- WSAEventSelect (get_socket (), wsock_evt, EVENT_MASK);
- break;
- case FIONREAD:
- res = ioctlsocket (get_socket (), FIONREAD, (unsigned long *) p);
- if (res == SOCKET_ERROR)
- set_winsock_errno ();
- break;
- default:
- /* Sockets are always non-blocking internally. So we just note the
- state here. */
- if (cmd == FIONBIO)
- {
- syscall_printf ("socket is now %sblocking",
- *(int *) p ? "non" : "");
- set_nonblocking (*(int *) p);
- res = 0;
- }
- else
- res = ioctlsocket (get_socket (), cmd, (unsigned long *) p);
- break;
- }
- syscall_printf ("%d = ioctl_socket (%x, %x)", res, cmd, p);
- return res;
-}
-
-int
-fhandler_socket::fcntl (int cmd, void *arg)
-{
- int res = 0;
- int request, current;
-
- switch (cmd)
- {
- case F_SETOWN:
- {
- pid_t pid = (pid_t) arg;
- LOCK_EVENTS;
- wsock_events->owner = pid;
- UNLOCK_EVENTS;
- debug_printf ("owner set to %d", pid);
- }
- break;
- case F_GETOWN:
- res = wsock_events->owner;
- break;
- case F_SETFL:
- {
- /* Carefully test for the O_NONBLOCK or deprecated OLD_O_NDELAY flag.
- Set only the flag that has been passed in. If both are set, just
- record O_NONBLOCK. */
- int new_flags = (int) arg & O_NONBLOCK_MASK;
- if ((new_flags & OLD_O_NDELAY) && (new_flags & O_NONBLOCK))
- new_flags = O_NONBLOCK;
- current = get_flags () & O_NONBLOCK_MASK;
- request = new_flags ? 1 : 0;
- if (!!current != !!new_flags && (res = ioctl (FIONBIO, &request)))
- break;
- set_flags ((get_flags () & ~O_NONBLOCK_MASK) | new_flags);
- break;
- }
- default:
- res = fhandler_base::fcntl (cmd, arg);
- break;
- }
- return res;
-}
-
-void
-fhandler_socket::set_close_on_exec (bool val)
-{
- set_no_inheritance (wsock_mtx, val);
- set_no_inheritance (wsock_evt, val);
- fhandler_base::set_close_on_exec (val);
- debug_printf ("set close_on_exec for %s to %d", get_name (), val);
-}
-
-void
-fhandler_socket::set_sun_path (const char *path)
-{
- sun_path = path ? cstrdup (path) : NULL;
-}
-
-int
-fhandler_socket::getpeereid (pid_t *pid, __uid32_t *euid, __gid32_t *egid)
-{
- if (get_addr_family () != AF_LOCAL || get_socket_type () != SOCK_STREAM)
- {
- set_errno (EINVAL);
- return -1;
- }
- if (connect_state () != connected)
- {
- set_errno (ENOTCONN);
- return -1;
- }
- if (sec_peer_pid == (pid_t) 0)
- {
- set_errno (ENOTCONN); /* Usually when calling getpeereid on
- accepting (instead of accepted) socket. */
- return -1;
- }
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (pid)
- *pid = sec_peer_pid;
- if (euid)
- *euid = sec_peer_uid;
- if (egid)
- *egid = sec_peer_gid;
- return 0;
-}
diff --git a/winsup/cygwin/fhandler_tape.cc b/winsup/cygwin/fhandler_tape.cc
deleted file mode 100644
index 57f9185..0000000
--- a/winsup/cygwin/fhandler_tape.cc
+++ /dev/null
@@ -1,1483 +0,0 @@
-/* fhandler_tape.cc. See fhandler.h for a description of the fhandler
- classes.
-
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "cygtls.h"
-#include <stdlib.h>
-#include <sys/mtio.h>
-#include <sys/param.h>
-#include <ddk/ntddstor.h>
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "shared_info.h"
-#include "sigproc.h"
-
-/* Media changes and bus resets are sometimes reported and the function
- hasn't been executed. We repeat all functions which return with one
- of these error codes. */
-#define TAPE_FUNC(func) while ((lasterr = (func)) == ERROR_MEDIA_CHANGED) \
- { \
- initialize (drive, false); \
- part (partition)->initialize (0); \
- }
-
-#define IS_BOT(err) ((err) == ERROR_BEGINNING_OF_MEDIA)
-
-#define IS_EOF(err) ((err) == ERROR_FILEMARK_DETECTED \
- || (err) == ERROR_SETMARK_DETECTED)
-
-#define IS_SM(err) ((err) == ERROR_SETMARK_DETECTED)
-
-#define IS_EOD(err) ((err) == ERROR_END_OF_MEDIA \
- || (err) == ERROR_EOM_OVERFLOW \
- || (err) == ERROR_NO_DATA_DETECTED)
-
-#define IS_EOM(err) ((err) == ERROR_END_OF_MEDIA \
- || (err) == ERROR_EOM_OVERFLOW)
-
-/**********************************************************************/
-/* mtinfo_part */
-
-void
-mtinfo_part::initialize (long nblock)
-{
- block = nblock;
- if (block == 0)
- file = fblock = 0;
- else
- file = fblock = -1;
- smark = false;
- emark = no_eof;
-}
-
-/**********************************************************************/
-/* mtinfo_drive */
-
-void
-mtinfo_drive::initialize (int num, bool first_time)
-{
- drive = num;
- partition = 0;
- block = -1;
- lock = unlocked;
- if (first_time)
- {
- buffer_writes (true);
- async_writes (false);
- two_fm (false);
- fast_eom (false);
- auto_lock (false);
- sysv (false);
- nowait (false);
- }
- for (int i = 0; i < MAX_PARTITION_NUM; ++i)
- part (i)->initialize ();
-}
-
-int
-mtinfo_drive::get_dp (HANDLE mt)
-{
- DWORD len = sizeof _dp;
- TAPE_FUNC (GetTapeParameters (mt, GET_TAPE_DRIVE_INFORMATION, &len, &_dp));
- return error ("get_dp");
-}
-
-int
-mtinfo_drive::get_mp (HANDLE mt)
-{
- DWORD len = sizeof _mp;
- TAPE_FUNC (GetTapeParameters (mt, GET_TAPE_MEDIA_INFORMATION, &len, &_mp));
- return error ("get_mp");
-}
-
-int
-mtinfo_drive::open (HANDLE mt)
-{
- get_dp (mt);
- get_mp (mt);
- get_pos (mt);
- if (partition < MAX_PARTITION_NUM && part (partition)->block != block)
- part (partition)->initialize (block);
- /* The following rewind in position 0 solves a problem which appears
- * in case of multi volume archives (at least on NT4): The last ReadFile
- * on the previous medium returns ERROR_NO_DATA_DETECTED. After media
- * change, all subsequent ReadFile calls return ERROR_NO_DATA_DETECTED,
- * too. The call to set_pos apparently reset some internal flags.
- * FIXME: Is that really true or based on a misinterpretation? */
- if (!block)
- {
- debug_printf ("rewind in position 0");
- set_pos (mt, TAPE_REWIND, 0, false);
- }
- return error ("open");
-}
-
-int
-mtinfo_drive::close (HANDLE mt, bool rewind)
-{
- lasterr = 0;
- if (GetTapeStatus (mt) == ERROR_NO_MEDIA_IN_DRIVE)
- dirty = clean;
- if (dirty >= has_written)
- {
- /* If an async write is still pending, wait for completion. */
- if (dirty == async_write_pending)
- lasterr = async_wait (mt, NULL);
- if (!lasterr)
- {
- /* if last operation was writing, write a filemark */
- debug_printf ("writing filemark");
- write_marks (mt, TAPE_FILEMARKS, two_fm () ? 2 : 1);
- if (two_fm () && !lasterr && !rewind) /* Backspace over 2nd fmark. */
- {
- set_pos (mt, TAPE_SPACE_FILEMARKS, -1, false);
- if (!lasterr)
- part (partition)->fblock = 0; /* That's obvious, isn't it? */
- }
- }
- }
- else if (dirty == has_read && !rewind)
- {
- if (sysv ())
- {
- /* Under SYSV semantics, the tape is moved past the next file mark
- after read. */
- if (part (partition)->emark == no_eof)
- set_pos (mt, TAPE_SPACE_FILEMARKS, 1, false);
- else if (part (partition)->emark == eof_hit)
- part (partition)->emark = eof;
- }
- else
- {
- /* Under BSD semantics, we must check if the filemark has been
- inadvertendly crossed. If so cross the filemark backwards
- and position the tape right before EOF. */
- if (part (partition)->emark == eof_hit)
- set_pos (mt, TAPE_SPACE_FILEMARKS, -1, false);
- }
- }
- if (rewind)
- {
- debug_printf ("rewinding");
- set_pos (mt, TAPE_REWIND, 0, false);
- }
- if (auto_lock () && lock == auto_locked)
- prepare (mt, TAPE_UNLOCK);
- dirty = clean;
- return error ("close");
-}
-
-int
-mtinfo_drive::read (HANDLE mt, HANDLE mt_evt, void *ptr, size_t &ulen)
-{
- BOOL ret;
- DWORD bytes_read = 0;
-
- if (GetTapeStatus (mt) == ERROR_NO_MEDIA_IN_DRIVE)
- return lasterr = ERROR_NO_MEDIA_IN_DRIVE;
- if (lasterr == ERROR_BUS_RESET)
- {
- ulen = 0;
- goto out;
- }
- /* If an async write is still pending, wait for completion. */
- if (dirty == async_write_pending)
- lasterr = async_wait (mt, NULL);
- dirty = clean;
- if (part (partition)->emark == eof_hit)
- {
- part (partition)->emark = eof;
- lasterr = ulen = 0;
- goto out;
- }
- else if (part (partition)->emark == eod_hit)
- {
- part (partition)->emark = eod;
- lasterr = ulen = 0;
- goto out;
- }
- else if (part (partition)->emark == eod)
- {
- lasterr = ERROR_NO_DATA_DETECTED;
- ulen = (size_t) -1;
- goto out;
- }
- else if (part (partition)->emark == eom_hit)
- {
- part (partition)->emark = eom;
- lasterr = ulen = 0;
- goto out;
- }
- else if (part (partition)->emark == eom)
- {
- lasterr = ERROR_END_OF_MEDIA;
- ulen = (size_t) -1;
- goto out;
- }
- part (partition)->smark = false;
- if (auto_lock () && lock < auto_locked)
- prepare (mt, TAPE_LOCK, true);
- ov.Offset = ov.OffsetHigh = 0;
- ov.hEvent = mt_evt;
- ret = ReadFile (mt, ptr, ulen, &bytes_read, &ov);
- lasterr = ret ? 0 : GetLastError ();
- if (lasterr == ERROR_IO_PENDING)
- lasterr = async_wait (mt, &bytes_read);
- ulen = (size_t) bytes_read;
- if (bytes_read > 0)
- {
- long blocks_read = mp ()->BlockSize == 0
- ? 1 : howmany (bytes_read, mp ()->BlockSize);
- block += blocks_read;
- part (partition)->block += blocks_read;
- if (part (partition)->fblock >= 0)
- part (partition)->fblock += blocks_read;
- }
- if (IS_EOF (lasterr))
- {
- block++;
- part (partition)->block++;
- if (part (partition)->file >= 0)
- part (partition)->file++;
- part (partition)->fblock = 0;
- part (partition)->smark = IS_SM (lasterr);
- part (partition)->emark = bytes_read > 0 ? eof_hit : eof;
- lasterr = 0;
- }
- else if (IS_EOD (lasterr))
- {
- if (part (partition)->emark == eof)
- part (partition)->emark = IS_EOM (lasterr) ? eom : eod;
- else
- {
- part (partition)->emark = IS_EOM (lasterr) ? eom_hit : eod_hit;
- lasterr = 0;
- }
- }
- else
- {
- part (partition)->emark = no_eof;
- /* This happens if the buffer is too small when in variable block
- size mode. Linux returns ENOMEM here. We're doing the same. */
- if (lasterr == ERROR_MORE_DATA)
- lasterr = ERROR_NOT_ENOUGH_MEMORY;
- }
- if (!lasterr)
- dirty = has_read;
-out:
- return error ("read");
-}
-
-int
-mtinfo_drive::async_wait (HANDLE mt, DWORD *bytes_written)
-{
- DWORD written;
-
- bool ret = GetOverlappedResult (mt, &ov, &written, TRUE);
- if (bytes_written)
- *bytes_written = written;
- return ret ? 0 : GetLastError ();
-}
-
-int
-mtinfo_drive::write (HANDLE mt, HANDLE mt_evt, const void *ptr, size_t &len)
-{
- BOOL ret;
- DWORD bytes_written = 0;
- int async_err = 0;
-
- if (GetTapeStatus (mt) == ERROR_NO_MEDIA_IN_DRIVE)
- return lasterr = ERROR_NO_MEDIA_IN_DRIVE;
- if (lasterr == ERROR_BUS_RESET)
- {
- len = 0;
- return error ("write");
- }
- if (dirty == async_write_pending)
- async_err = async_wait (mt, &bytes_written);
- dirty = clean;
- part (partition)->smark = false;
- if (auto_lock () && lock < auto_locked)
- prepare (mt, TAPE_LOCK, true);
- ov.Offset = ov.OffsetHigh = 0;
- ov.hEvent = mt_evt;
- ret = WriteFile (mt, ptr, len, &bytes_written, &ov);
- lasterr = ret ? 0: GetLastError ();
- if (lasterr == ERROR_IO_PENDING)
- {
- if (async_writes () && mp ()->BlockSize == 0)
- dirty = async_write_pending;
- else
- /* Wait for completion if a non-async write. */
- lasterr = async_wait (mt, &bytes_written);
- }
- len = (size_t) bytes_written;
- if (bytes_written > 0)
- {
- long blocks_written = mp ()->BlockSize == 0
- ? 1 : howmany (bytes_written, mp ()->BlockSize);
- block += blocks_written;
- part (partition)->block += blocks_written;
- if (part (partition)->fblock >= 0)
- part (partition)->fblock += blocks_written;
- }
- if (!lasterr && async_err)
- lasterr = async_err;
- if (lasterr == ERROR_EOM_OVERFLOW)
- part (partition)->emark = eom;
- else if (lasterr == ERROR_END_OF_MEDIA)
- ; // FIXME?: part (partition)->emark = eom_hit;
- else
- {
- part (partition)->emark = no_eof;
- if (!lasterr)
- dirty = has_written;
- else if (lasterr == ERROR_IO_PENDING)
- dirty = async_write_pending;
- }
- return error ("write");
-}
-
-int
-mtinfo_drive::get_pos (HANDLE mt, long *ppartition, long *pblock)
-{
- DWORD p, low, high;
-
- TAPE_FUNC (GetTapePosition (mt, TAPE_LOGICAL_POSITION, &p, &low, &high));
- if (lasterr == ERROR_INVALID_FUNCTION)
- TAPE_FUNC (GetTapePosition (mt, TAPE_ABSOLUTE_POSITION, &p, &low, &high));
- if (!lasterr)
- {
- if (p > 0)
- partition = (long) p - 1;
- block = (long) low;
- if (ppartition)
- *ppartition= partition;
- if (pblock)
- *pblock = block;
- }
- else
- {
- partition = 0;
- block = -1;
- }
- return error ("get_pos");
-}
-
-int
-mtinfo_drive::_set_pos (HANDLE mt, int mode, long count, int partition,
- BOOL dont_wait)
-{
- /* If an async write is still pending, wait for completion. */
- if (dirty == async_write_pending)
- lasterr = async_wait (mt, NULL);
- dirty = clean;
- TAPE_FUNC (SetTapePosition (mt, mode, partition, count, count < 0 ? -1 : 0,
- dont_wait));
- return lasterr;
-}
-
-int
-mtinfo_drive::set_pos (HANDLE mt, int mode, long count,
- bool sfm_func)
-{
- int err = 0;
- long undone = count;
- BOOL dont_wait = FALSE;
-
- switch (mode)
- {
- case TAPE_SPACE_RELATIVE_BLOCKS:
- case TAPE_SPACE_FILEMARKS:
- case TAPE_SPACE_SETMARKS:
- if (!count)
- {
- lasterr = 0;
- goto out;
- }
- break;
- case TAPE_ABSOLUTE_BLOCK:
- case TAPE_LOGICAL_BLOCK:
- case TAPE_REWIND:
- dont_wait = nowait () ? TRUE : FALSE;
- break;
- }
- if (mode == TAPE_SPACE_FILEMARKS)
- {
- while (!err && undone > 0)
- if (!(err = _set_pos (mt, mode, 1, 0, FALSE)) || IS_SM (err))
- --undone;
- while (!err && undone < 0)
- if (!(err = _set_pos (mt, mode, -1, 0, FALSE)) || IS_SM (err))
- ++undone;
- }
- else
- err = _set_pos (mt, mode, count, 0, dont_wait);
- switch (mode)
- {
- case TAPE_ABSOLUTE_BLOCK:
- case TAPE_LOGICAL_BLOCK:
- get_pos (mt);
- part (partition)->initialize (block);
- break;
- case TAPE_REWIND:
- if (!err)
- {
- block = 0;
- part (partition)->initialize (0);
- }
- else
- {
- get_pos (mt);
- part (partition)->initialize (block);
- }
- break;
- case TAPE_SPACE_END_OF_DATA:
- get_pos (mt);
- part (partition)->initialize (block);
- part (partition)->emark = IS_EOM (err) ? eom : eod;
- break;
- case TAPE_SPACE_FILEMARKS:
- if (!err || IS_SM (err))
- {
- get_pos (mt);
- part (partition)->block = block;
- if (count > 0)
- {
- if (part (partition)->file >= 0)
- part (partition)->file += count - undone;
- part (partition)->fblock = 0;
- part (partition)->smark = IS_SM (err);
- }
- else
- {
- if (part (partition)->file >= 0)
- part (partition)->file += count - undone;
- part (partition)->fblock = -1;
- part (partition)->smark = false;
- }
- if (sfm_func)
- err = set_pos (mt, mode, count > 0 ? -1 : 1, false);
- else
- part (partition)->emark = count > 0 ? eof : no_eof;
- }
- else if (IS_EOD (err))
- {
- get_pos (mt);
- part (partition)->block = block;
- if (part (partition)->file >= 0)
- part (partition)->file += count - undone;
- part (partition)->fblock = -1;
- part (partition)->smark = false;
- part (partition)->emark = IS_EOM (err) ? eom : eod;
- }
- else if (IS_BOT (err))
- {
- block = 0;
- part (partition)->initialize (0);
- }
- else
- {
- get_pos (mt);
- part (partition)->initialize (block);
- }
- break;
- case TAPE_SPACE_RELATIVE_BLOCKS:
- if (!err)
- {
- block += count;
- part (partition)->block += count;
- if (part (partition)->fblock >= 0)
- part (partition)->fblock += count;
- part (partition)->smark = false;
- part (partition)->emark = no_eof;
- }
- else if (IS_EOF (err))
- {
- get_pos (mt);
- part (partition)->block = block;
- if (part (partition)->file >= 0)
- part (partition)->file += count > 0 ? 1 : -1;
- part (partition)->fblock = count > 0 ? 0 : -1;
- part (partition)->smark = (count > 0 && IS_SM (err));
- part (partition)->emark = count > 0 ? eof : no_eof;
- }
- else if (IS_EOD (err))
- {
- get_pos (mt);
- part (partition)->fblock = block - part (partition)->block;
- part (partition)->block = block;
- part (partition)->smark = false;
- part (partition)->emark = IS_EOM (err) ? eom : eod;
- }
- else if (IS_BOT (err))
- {
- block = 0;
- part (partition)->initialize (0);
- }
- break;
- case TAPE_SPACE_SETMARKS:
- get_pos (mt);
- part (partition)->block = block;
- if (!err)
- {
- part (partition)->file = -1;
- part (partition)->fblock = -1;
- part (partition)->smark = true;
- }
- break;
- }
- lasterr = err;
-out:
- return error ("set_pos");
-}
-
-int
-mtinfo_drive::create_partitions (HANDLE mt, long count)
-{
- if (dp ()->MaximumPartitionCount <= 1)
- return ERROR_INVALID_PARAMETER;
- if (set_pos (mt, TAPE_REWIND, 0, false))
- goto out;
- partition = 0;
- part (partition)->initialize (0);
- debug_printf ("Format tape with %s partition(s)", count <= 0 ? "one" : "two");
- if (get_feature (TAPE_DRIVE_INITIATOR))
- {
- if (count <= 0)
- TAPE_FUNC (CreateTapePartition (mt, TAPE_INITIATOR_PARTITIONS,
- count <= 0 ? 0 : 2, (DWORD) count));
- }
- else if (get_feature (TAPE_DRIVE_FIXED))
- {
- /* This is supposed to work for Tandberg SLR drivers up to version
- 1.6 which missed to set the TAPE_DRIVE_INITIATOR flag. According
- to Tandberg, CreateTapePartition(TAPE_FIXED_PARTITIONS) apparently
- does not ignore the dwCount parameter. Go figure! */
- TAPE_FUNC (CreateTapePartition (mt, TAPE_FIXED_PARTITIONS,
- count <= 0 ? 0 : 2, (DWORD) count));
- }
- else
- lasterr = ERROR_INVALID_PARAMETER;
-out:
- return error ("partition");
-}
-
-int
-mtinfo_drive::set_partition (HANDLE mt, long count)
-{
- if (count < 0 || (unsigned long) count >= MAX_PARTITION_NUM)
- lasterr = ERROR_INVALID_PARAMETER;
- else if ((DWORD) count >= dp ()->MaximumPartitionCount)
- lasterr = ERROR_IO_DEVICE;
- else
- {
- int part_block = part (count)->block >= 0 ? part (count)->block : 0;
- int err = _set_pos (mt, TAPE_LOGICAL_BLOCK, part_block, count + 1, FALSE);
- if (err)
- {
- int sav_block = block;
- int sav_partition = partition;
- get_pos (mt);
- if (sav_partition != partition)
- {
- if (partition < MAX_PARTITION_NUM
- && part (partition)->block != block)
- part (partition)->initialize (block);
- }
- else if (sav_block != block && partition < MAX_PARTITION_NUM)
- part (partition)->initialize (block);
- lasterr = err;
- }
- else
- {
- partition = count;
- if (part (partition)->block == -1)
- part (partition)->initialize (0);
- }
- }
- return error ("set_partition");
-}
-
-int
-mtinfo_drive::write_marks (HANDLE mt, int marktype, DWORD count)
-{
- /* If an async write is still pending, wait for completion. */
- if (dirty == async_write_pending)
- {
- lasterr = async_wait (mt, NULL);
- dirty = has_written;
- }
- if (marktype != TAPE_SETMARKS)
- dirty = clean;
- if (marktype == TAPE_FILEMARKS
- && !get_feature (TAPE_DRIVE_WRITE_FILEMARKS))
- {
- if (get_feature (TAPE_DRIVE_WRITE_LONG_FMKS))
- marktype = TAPE_LONG_FILEMARKS;
- else
- marktype = TAPE_SHORT_FILEMARKS;
- }
- TAPE_FUNC (WriteTapemark (mt, marktype, count, FALSE));
- int err = lasterr;
- if (!err)
- {
- block += count;
- part (partition)->block += count;
- if (part (partition)->file >= 0)
- part (partition)->file += count;
- part (partition)->fblock = 0;
- part (partition)->emark = eof;
- part (partition)->smark = (marktype == TAPE_SETMARKS);
- }
- else
- {
- int sav_block = block;
- int sav_partition = partition;
- get_pos (mt);
- if (sav_partition != partition)
- {
- if (partition < MAX_PARTITION_NUM
- && part (partition)->block != block)
- part (partition)->initialize (block);
- }
- else if (sav_block != block && partition < MAX_PARTITION_NUM)
- part (partition)->initialize (block);
- lasterr = err;
- }
- return error ("write_marks");
-}
-
-int
-mtinfo_drive::erase (HANDLE mt, int mode)
-{
- switch (mode)
- {
- case TAPE_ERASE_SHORT:
- if (!get_feature (TAPE_DRIVE_ERASE_SHORT))
- mode = TAPE_ERASE_LONG;
- break;
- case TAPE_ERASE_LONG:
- if (!get_feature (TAPE_DRIVE_ERASE_LONG))
- mode = TAPE_ERASE_SHORT;
- break;
- }
- TAPE_FUNC (EraseTape (mt, mode, nowait () ? TRUE : FALSE));
- part (partition)->initialize (0);
- return error ("erase");
-}
-
-int
-mtinfo_drive::prepare (HANDLE mt, int action, bool is_auto)
-{
- BOOL dont_wait = FALSE;
-
- /* If an async write is still pending, wait for completion. */
- if (dirty == async_write_pending)
- lasterr = async_wait (mt, NULL);
- dirty = clean;
- if (action == TAPE_UNLOAD || action == TAPE_LOAD || action == TAPE_TENSION)
- dont_wait = nowait () ? TRUE : FALSE;
- TAPE_FUNC (PrepareTape (mt, action, dont_wait));
- /* Reset buffer after all successful preparations but lock and unlock. */
- switch (action)
- {
- case TAPE_FORMAT:
- case TAPE_UNLOAD:
- case TAPE_LOAD:
- initialize (drive, false);
- break;
- case TAPE_TENSION:
- part (partition)->initialize (0);
- break;
- case TAPE_LOCK:
- lock = lasterr ? lock_error : is_auto ? auto_locked : locked;
- break;
- case TAPE_UNLOCK:
- lock = lasterr ? lock_error : unlocked;
- break;
- }
- return error ("prepare");
-}
-
-int
-mtinfo_drive::set_compression (HANDLE mt, long count)
-{
- if (!get_feature (TAPE_DRIVE_SET_COMPRESSION))
- return ERROR_INVALID_PARAMETER;
- TAPE_SET_DRIVE_PARAMETERS sdp =
- {
- dp ()->ECC,
- count ? TRUE : FALSE,
- dp ()->DataPadding,
- dp ()->ReportSetmarks,
- dp ()->EOTWarningZoneSize
- };
- TAPE_FUNC (SetTapeParameters (mt, SET_TAPE_DRIVE_INFORMATION, &sdp));
- int err = lasterr;
- if (!err)
- dp ()->Compression = sdp.Compression;
- else
- get_dp (mt);
- lasterr = err;
- return error ("set_compression");
-}
-
-int
-mtinfo_drive::set_blocksize (HANDLE mt, long count)
-{
- TAPE_SET_MEDIA_PARAMETERS smp = {count};
- TAPE_FUNC (SetTapeParameters (mt, SET_TAPE_MEDIA_INFORMATION, &smp));
- return error ("set_blocksize");
-}
-
-int
-mtinfo_drive::get_status (HANDLE mt, struct mtget *get)
-{
- int notape = 0;
- DWORD tstat;
-
- if (!get)
- return ERROR_INVALID_PARAMETER;
-
- if ((tstat = GetTapeStatus (mt)) == ERROR_NO_MEDIA_IN_DRIVE)
- notape = 1;
-
- memset (get, 0, sizeof *get);
-
- get->mt_type = MT_ISUNKNOWN;
-
- if (!notape && get_feature (TAPE_DRIVE_SET_BLOCK_SIZE))
- get->mt_dsreg = (mp ()->BlockSize << MT_ST_BLKSIZE_SHIFT)
- & MT_ST_BLKSIZE_MASK;
- else
- get->mt_dsreg = (dp ()->DefaultBlockSize << MT_ST_BLKSIZE_SHIFT)
- & MT_ST_BLKSIZE_MASK;
-
- if (wincap.has_ioctl_storage_get_media_types_ex ())
- {
- DWORD size = sizeof (GET_MEDIA_TYPES) + 10 * sizeof (DEVICE_MEDIA_INFO);
- void *buf = alloca (size);
- if (DeviceIoControl (mt, IOCTL_STORAGE_GET_MEDIA_TYPES_EX,
- NULL, 0, buf, size, &size, NULL)
- || GetLastError () == ERROR_MORE_DATA)
- {
- PGET_MEDIA_TYPES gmt = (PGET_MEDIA_TYPES) buf;
- for (DWORD i = 0; i < gmt->MediaInfoCount; ++i)
- {
- PDEVICE_MEDIA_INFO dmi = &gmt->MediaInfo[i];
- get->mt_type = dmi->DeviceSpecific.TapeInfo.MediaType;
-#define TINFO DeviceSpecific.TapeInfo
- if (dmi->TINFO.MediaCharacteristics & MEDIA_CURRENTLY_MOUNTED)
- {
- get->mt_type = dmi->DeviceSpecific.TapeInfo.MediaType;
- if (dmi->TINFO.BusType == BusTypeScsi)
- get->mt_dsreg |=
- (dmi->TINFO.BusSpecificData.ScsiInformation.DensityCode
- << MT_ST_DENSITY_SHIFT)
- & MT_ST_DENSITY_MASK;
- break;
- }
-#undef TINFO
- }
- }
- }
-
- if (!notape)
- {
- get->mt_resid = partition;
- get->mt_fileno = part (partition)->file;
- get->mt_blkno = part (partition)->fblock;
-
- if (get->mt_blkno != 0)
- /* nothing to do */;
- else if (get->mt_fileno == 0)
- get->mt_gstat |= GMT_BOT (-1);
- else
- get->mt_gstat |= GMT_EOF (-1);
- if (part (partition)->emark >= eod_hit)
- get->mt_gstat |= GMT_EOD (-1);
- if (part (partition)->emark >= eom_hit)
- get->mt_gstat |= GMT_EOT (-1);
-
- if (part (partition)->smark)
- get->mt_gstat |= GMT_SM (-1);
-
- get->mt_gstat |= GMT_ONLINE (-1);
-
- if (mp ()->WriteProtected)
- get->mt_gstat |= GMT_WR_PROT (-1);
-
- get->mt_capacity = get_ll (mp ()->Capacity);
- get->mt_remaining = get_ll (mp ()->Remaining);
- }
-
- if (notape)
- get->mt_gstat |= GMT_DR_OPEN (-1);
-
- if (buffer_writes ())
- get->mt_gstat |= GMT_IM_REP_EN (-1); /* TODO: Async writes */
-
- if (tstat == ERROR_DEVICE_REQUIRES_CLEANING)
- get->mt_gstat |= GMT_CLN (-1);
-
- /* Cygwin specials: */
- if (dp ()->ReportSetmarks)
- get->mt_gstat |= GMT_REP_SM (-1);
- if (dp ()->DataPadding)
- get->mt_gstat |= GMT_PADDING (-1);
- if (dp ()->ECC)
- get->mt_gstat |= GMT_HW_ECC (-1);
- if (dp ()->Compression)
- get->mt_gstat |= GMT_HW_COMP (-1);
- if (two_fm ())
- get->mt_gstat |= GMT_TWO_FM (-1);
- if (fast_eom ())
- get->mt_gstat |= GMT_FAST_MTEOM (-1);
- if (auto_lock ())
- get->mt_gstat |= GMT_AUTO_LOCK (-1);
- if (sysv ())
- get->mt_gstat |= GMT_SYSV (-1);
- if (nowait ())
- get->mt_gstat |= GMT_NOWAIT (-1);
- if (async_writes ())
- get->mt_gstat |= GMT_ASYNC (-1);
-
- get->mt_erreg = 0; /* FIXME: No softerr counting */
-
- get->mt_minblksize = dp ()->MinimumBlockSize;
- get->mt_maxblksize = dp ()->MaximumBlockSize;
- get->mt_defblksize = dp ()->DefaultBlockSize;
- get->mt_featureslow = dp ()->FeaturesLow;
- get->mt_featureshigh = dp ()->FeaturesHigh;
- get->mt_eotwarningzonesize = dp ()->EOTWarningZoneSize;
-
- return 0;
-}
-
-int
-mtinfo_drive::set_options (HANDLE mt, long options)
-{
- long what = (options & MT_ST_OPTIONS);
- bool call_setparams = false;
- bool set;
- TAPE_SET_DRIVE_PARAMETERS sdp =
- {
- dp ()->ECC,
- dp ()->Compression,
- dp ()->DataPadding,
- dp ()->ReportSetmarks,
- dp ()->EOTWarningZoneSize
- };
-
- lasterr = 0;
- switch (what)
- {
- case 0:
- if (options == 0 || options == 1)
- {
- buffer_writes ((options == 1));
- }
- break;
- case MT_ST_BOOLEANS:
- buffer_writes (!!(options & MT_ST_BUFFER_WRITES));
- async_writes (!!(options & MT_ST_ASYNC_WRITES));
- two_fm (!!(options & MT_ST_TWO_FM));
- fast_eom (!!(options & MT_ST_FAST_MTEOM));
- auto_lock (!!(options & MT_ST_AUTO_LOCK));
- sysv (!!(options & MT_ST_SYSV));
- nowait (!!(options & MT_ST_NOWAIT));
- if (get_feature (TAPE_DRIVE_SET_ECC))
- sdp.ECC = !!(options & MT_ST_ECC);
- if (get_feature (TAPE_DRIVE_SET_PADDING))
- sdp.DataPadding = !!(options & MT_ST_PADDING);
- if (get_feature (TAPE_DRIVE_SET_REPORT_SMKS))
- sdp.ReportSetmarks = !!(options & MT_ST_REPORT_SM);
- if (sdp.ECC != dp ()->ECC || sdp.DataPadding != dp ()->DataPadding
- || sdp.ReportSetmarks != dp ()->ReportSetmarks)
- call_setparams = true;
- break;
- case MT_ST_SETBOOLEANS:
- case MT_ST_CLEARBOOLEANS:
- set = (what == MT_ST_SETBOOLEANS);
- if (options & MT_ST_BUFFER_WRITES)
- buffer_writes (set);
- if (options & MT_ST_ASYNC_WRITES)
- async_writes (set);
- if (options & MT_ST_TWO_FM)
- two_fm (set);
- if (options & MT_ST_FAST_MTEOM)
- fast_eom (set);
- if (options & MT_ST_AUTO_LOCK)
- auto_lock (set);
- if (options & MT_ST_SYSV)
- sysv (set);
- if (options & MT_ST_NOWAIT)
- nowait (set);
- if (options & MT_ST_ECC)
- sdp.ECC = set;
- if (options & MT_ST_PADDING)
- sdp.DataPadding = set;
- if (options & MT_ST_REPORT_SM)
- sdp.ReportSetmarks = set;
- if (sdp.ECC != dp ()->ECC || sdp.DataPadding != dp ()->DataPadding
- || sdp.ReportSetmarks != dp ()->ReportSetmarks)
- call_setparams = true;
- break;
- case MT_ST_EOT_WZ_SIZE:
- if (get_feature (TAPE_DRIVE_SET_EOT_WZ_SIZE))
- {
- sdp.EOTWarningZoneSize = (options & ~MT_ST_OPTIONS);
- if (sdp.EOTWarningZoneSize != dp ()->EOTWarningZoneSize)
- call_setparams = true;
- }
- break;
- }
- if (call_setparams)
- {
- TAPE_FUNC (SetTapeParameters (mt, SET_TAPE_DRIVE_INFORMATION, &sdp));
- int err = lasterr;
- if (!err)
- {
- dp ()->ECC = sdp.ECC;
- dp ()->DataPadding = sdp.DataPadding;
- dp ()->ReportSetmarks = sdp.ReportSetmarks;
- }
- else
- get_dp (mt);
- lasterr = err;
- }
- return error ("set_options");
-}
-
-int
-mtinfo_drive::ioctl (HANDLE mt, unsigned int cmd, void *buf)
-{
- myfault efault;
- if (efault.faulted ())
- return ERROR_NOACCESS;
- if (cmd == MTIOCTOP)
- {
- struct mtop *op = (struct mtop *) buf;
- if (lasterr == ERROR_BUS_RESET)
- {
- /* If a bus reset occurs, block further access to this device
- until the user rewinds, unloads or in any other way tries
- to maintain a well-known tape position. */
- if (op->mt_op != MTREW && op->mt_op != MTOFFL
- && op->mt_op != MTRETEN && op->mt_op != MTERASE
- && op->mt_op != MTSEEK && op->mt_op != MTEOM)
- return ERROR_BUS_RESET;
- /* Try to maintain last lock state after bus reset. */
- if (lock >= auto_locked && PrepareTape (mt, TAPE_LOCK, FALSE))
- {
- debug_printf ("Couldn't relock drive after bus reset.");
- lock = unlocked;
- }
- }
- switch (op->mt_op)
- {
- case MTRESET:
- break;
- case MTFSF:
- set_pos (mt, TAPE_SPACE_FILEMARKS, op->mt_count, false);
- break;
- case MTBSF:
- set_pos (mt, TAPE_SPACE_FILEMARKS, -op->mt_count, false);
- break;
- case MTFSR:
- set_pos (mt, TAPE_SPACE_RELATIVE_BLOCKS, op->mt_count, false);
- break;
- case MTBSR:
- set_pos (mt, TAPE_SPACE_RELATIVE_BLOCKS, -op->mt_count, false);
- break;
- case MTWEOF:
- write_marks (mt, TAPE_FILEMARKS, op->mt_count);
- break;
- case MTREW:
- set_pos (mt, TAPE_REWIND, 0, false);
- break;
- case MTOFFL:
- case MTUNLOAD:
- prepare (mt, TAPE_UNLOAD);
- break;
- case MTNOP:
- lasterr = 0;
- break;
- case MTRETEN:
- if (!get_feature (TAPE_DRIVE_TENSION))
- lasterr = ERROR_INVALID_PARAMETER;
- else if (!set_pos (mt, TAPE_REWIND, 0, false))
- prepare (mt, TAPE_TENSION);
- break;
- case MTBSFM:
- set_pos (mt, TAPE_SPACE_FILEMARKS, -op->mt_count, true);
- break;
- case MTFSFM:
- set_pos (mt, TAPE_SPACE_FILEMARKS, op->mt_count, true);
- break;
- case MTEOM:
- if (fast_eom () && get_feature (TAPE_DRIVE_END_OF_DATA))
- set_pos (mt, TAPE_SPACE_END_OF_DATA, 0, false);
- else
- set_pos (mt, TAPE_SPACE_FILEMARKS, 32767, false);
- break;
- case MTERASE:
- erase (mt, TAPE_ERASE_LONG);
- break;
- case MTRAS1:
- case MTRAS2:
- case MTRAS3:
- lasterr = ERROR_INVALID_PARAMETER;
- break;
- case MTSETBLK:
- if (!get_feature (TAPE_DRIVE_SET_BLOCK_SIZE))
- {
- lasterr = ERROR_INVALID_PARAMETER;
- break;
- }
- if ((DWORD) op->mt_count == mp ()->BlockSize)
- {
- /* Nothing has changed. */
- lasterr = 0;
- break;
- }
- if ((op->mt_count == 0 && !get_feature (TAPE_DRIVE_VARIABLE_BLOCK))
- || (op->mt_count > 0
- && ((DWORD) op->mt_count < dp ()->MinimumBlockSize
- || (DWORD) op->mt_count > dp ()->MaximumBlockSize)))
- {
- lasterr = ERROR_INVALID_PARAMETER;
- break;
- }
- if (set_blocksize (mt, op->mt_count)
- && lasterr == ERROR_INVALID_FUNCTION)
- lasterr = ERROR_INVALID_BLOCK_LENGTH;
- break;
- case MTSEEK:
- if (get_feature (TAPE_DRIVE_LOGICAL_BLK))
- set_pos (mt, TAPE_LOGICAL_BLOCK, op->mt_count, false);
- else if (!get_pos (mt))
- set_pos (mt, TAPE_SPACE_RELATIVE_BLOCKS,
- op->mt_count - block, false);
- break;
- case MTTELL:
- if (!get_pos (mt))
- op->mt_count = block;
- break;
- case MTFSS:
- set_pos (mt, TAPE_SPACE_SETMARKS, op->mt_count, false);
- break;
- case MTBSS:
- set_pos (mt, TAPE_SPACE_SETMARKS, -op->mt_count, false);
- break;
- case MTWSM:
- write_marks (mt, TAPE_SETMARKS, op->mt_count);
- break;
- case MTLOCK:
- prepare (mt, TAPE_LOCK);
- break;
- case MTUNLOCK:
- prepare (mt, TAPE_UNLOCK);
- break;
- case MTLOAD:
- prepare (mt, TAPE_LOAD);
- break;
- case MTCOMPRESSION:
- set_compression (mt, op->mt_count);
- break;
- case MTSETPART:
- set_partition (mt, op->mt_count);
- break;
- case MTMKPART:
- create_partitions (mt, op->mt_count);
- break;
- case MTSETDRVBUFFER:
- set_options (mt, op->mt_count);
- break;
- case MTSETDENSITY:
- default:
- lasterr = ERROR_INVALID_PARAMETER;
- break;
- }
- }
- else if (cmd == MTIOCGET)
- get_status (mt, (struct mtget *) buf);
- else if (cmd == MTIOCPOS && !get_pos (mt))
- ((struct mtpos *) buf)->mt_blkno = block;
-
- return lasterr;
-}
-
-/**********************************************************************/
-/* mtinfo */
-
-void
-mtinfo::initialize ()
-{
- for (unsigned i = 0; i < MAX_DRIVE_NUM; ++i)
- drive (i)->initialize (i, true);
-}
-
-/**********************************************************************/
-/* fhandler_dev_tape */
-
-#define mt (cygwin_shared->mt)
-
-#define lock(err_ret_val) if (!_lock ()) return err_ret_val;
-
-inline bool
-fhandler_dev_tape::_lock ()
-{
- HANDLE obj[2] = { mt_mtx, signal_arrived };
- BOOL ret = WaitForMultipleObjects (2, obj, FALSE, INFINITE) == WAIT_OBJECT_0;
- if (!ret)
- {
- debug_printf ("signal_arrived"); \
- set_errno (EINTR);
- }
- return ret;
-}
-
-inline int
-fhandler_dev_tape::unlock (int ret)
-{
- ReleaseMutex (mt_mtx);
- return ret;
-}
-
-fhandler_dev_tape::fhandler_dev_tape ()
- : fhandler_dev_raw ()
-{
- debug_printf ("unit: %d", dev ().minor);
-}
-
-int
-fhandler_dev_tape::open (int flags, mode_t)
-{
- int ret;
-
- if (driveno () >= MAX_DRIVE_NUM)
- {
- set_errno (ENOENT);
- return 0;
- }
- if (!(mt_mtx = CreateMutex (&sec_all, TRUE, NULL)))
- {
- __seterrno ();
- return 0;
- }
-
- /* The O_SYNC flag is not supported by the tape driver. Use the
- MT_ST_BUFFER_WRITES and MT_ST_ASYNC_WRITES flags in the drive
- settings instead. In turn, the MT_ST_BUFFER_WRITES is translated
- into O_SYNC, which controls the FILE_WRITE_THROUGH flag in the
- NtCreateFile call in fhandler_base::open. */
- flags &= ~O_SYNC;
- if (!mt.drive (driveno ())->buffer_writes ())
- flags |= O_SYNC;
-
- ret = fhandler_dev_raw::open (flags);
- if (ret)
- {
- mt.drive (driveno ())->open (get_handle ());
-
- /* In append mode, seek to beginning of next filemark */
- if (flags & O_APPEND)
- mt.drive (driveno ())->set_pos (get_handle (),
- TAPE_SPACE_FILEMARKS, 1, true);
-
- if (!(flags & O_DIRECT))
- {
- devbufsiz = mt.drive (driveno ())->dp ()->MaximumBlockSize;
- devbuf = new char [devbufsiz];
- }
- devbufstart = devbufend = 0;
- }
- else
- ReleaseMutex (mt_mtx);
- return ret;
-}
-
-int
-fhandler_dev_tape::close ()
-{
- int ret = 0;
- int cret = 0;
-
- if (!hExeced)
- {
- lock (-1);
- ret = mt.drive (driveno ())->close (get_handle (), is_rewind_device ());
- if (ret)
- __seterrno_from_win_error (ret);
- cret = fhandler_dev_raw::close ();
- unlock (0);
- }
- if (mt_evt)
- CloseHandle (mt_evt);
- CloseHandle (mt_mtx);
- return ret ? -1 : cret;
-}
-
-void
-fhandler_dev_tape::raw_read (void *ptr, size_t &ulen)
-{
- char *buf = (char *) ptr;
- size_t len = ulen;
- size_t block_size;
- size_t bytes_to_read;
- size_t bytes_read = 0;
- int ret = 0;
-
- if (lastblk_to_read ())
- {
- lastblk_to_read (false);
- ulen = 0;
- return;
- }
- if (!_lock ())
- {
- ulen = (size_t) -1;
- return;
- }
- block_size = mt.drive (driveno ())->mp ()->BlockSize;
- if (devbuf)
- {
- if (devbufend > devbufstart)
- {
- bytes_to_read = min (len, devbufend - devbufstart);
- debug_printf ("read %d bytes from buffer (rest %d)",
- bytes_to_read, devbufend - devbufstart - bytes_to_read);
- memcpy (buf, devbuf + devbufstart, bytes_to_read);
- len -= bytes_to_read;
- bytes_read += bytes_to_read;
- buf += bytes_to_read;
- devbufstart += bytes_to_read;
- if (devbufstart == devbufend)
- devbufstart = devbufend = 0;
- /* If a switch to variable block_size occured, just return the buffer
- remains until the buffer is empty, then proceed with usual variable
- block size handling (one block per read call). */
- if (!block_size)
- len = 0;
- }
- if (len > 0)
- {
- if (!mt_evt && !(mt_evt = CreateEvent (&sec_none, TRUE, FALSE, NULL)))
- debug_printf ("Creating event failed, %E");
- size_t block_fit = !block_size ? len : rounddown(len, block_size);
- if (block_fit)
- {
- debug_printf ("read %d bytes from tape (rest %d)",
- block_fit, len - block_fit);
- ret = mt.drive (driveno ())->read (get_handle (), mt_evt, buf,
- block_fit);
- if (ret)
- __seterrno_from_win_error (ret);
- else if (block_fit)
- {
- len -= block_fit;
- bytes_read += block_fit;
- buf += block_fit;
- /* Only one block in each read call, please. */
- if (!block_size)
- len = 0;
- }
- else {
- len = 0;
- if (bytes_read)
- lastblk_to_read (true);
- }
- }
- if (!ret && len > 0)
- {
- debug_printf ("read %d bytes from tape (one block)", block_size);
- ret = mt.drive (driveno ())->read (get_handle (), mt_evt, devbuf,
- block_size);
- if (ret)
- __seterrno_from_win_error (ret);
- else if (block_size)
- {
- devbufstart = len;
- devbufend = block_size;
- bytes_read += len;
- memcpy (buf, devbuf, len);
- }
- else if (bytes_read)
- lastblk_to_read (true);
- }
- }
- }
- else
- {
- if (!mt_evt && !(mt_evt = CreateEvent (&sec_none, TRUE, FALSE, NULL)))
- debug_printf ("Creating event failed, %E");
- bytes_read = ulen;
- ret = mt.drive (driveno ())->read (get_handle (), mt_evt, ptr,
- bytes_read);
- }
- ulen = (ret ? (size_t) -1 : bytes_read);
- unlock ();
-}
-
-int
-fhandler_dev_tape::raw_write (const void *ptr, size_t len)
-{
- lock (-1);
- if (!mt_evt && !(mt_evt = CreateEvent (&sec_none, TRUE, FALSE, NULL)))
- debug_printf ("Creating event failed, %E");
- int ret = mt.drive (driveno ())->write (get_handle (), mt_evt, ptr, len);
- if (ret)
- __seterrno_from_win_error (ret);
- return unlock (ret ? -1 : (int) len);
-}
-
-_off64_t
-fhandler_dev_tape::lseek (_off64_t offset, int whence)
-{
- struct mtop op;
- struct mtpos pos;
- DWORD block_size;
- _off64_t ret = ILLEGAL_SEEK;
-
- lock (ILLEGAL_SEEK);
-
- debug_printf ("lseek (%s, %d, %d)", get_name (), offset, whence);
-
- block_size = mt.drive (driveno ())->mp ()->BlockSize;
- if (block_size == 0)
- {
- set_errno (EIO);
- goto out;
- }
-
- if (ioctl (MTIOCPOS, &pos))
- goto out;
-
- switch (whence)
- {
- case SEEK_END:
- op.mt_op = MTFSF;
- op.mt_count = 1;
- if (ioctl (MTIOCTOP, &op))
- goto out;
- break;
- case SEEK_SET:
- if (whence == SEEK_SET && offset < 0)
- {
- set_errno (EINVAL);
- goto out;
- }
- break;
- case SEEK_CUR:
- break;
- default:
- set_errno (EINVAL);
- goto out;
- }
-
- op.mt_op = MTFSR;
- op.mt_count = offset / block_size
- - (whence == SEEK_SET ? pos.mt_blkno : 0);
-
- if (op.mt_count < 0)
- {
- op.mt_op = MTBSR;
- op.mt_count = -op.mt_count;
- }
-
- if (ioctl (MTIOCTOP, &op) || ioctl (MTIOCPOS, &pos))
- goto out;
-
- ret = pos.mt_blkno * block_size;
-
-out:
- return unlock (ret);
-}
-
-int
-fhandler_dev_tape::fstat (struct __stat64 *buf)
-{
- int ret;
-
- if (driveno () >= MAX_DRIVE_NUM)
- {
- set_errno (ENOENT);
- return -1;
- }
- if (!(ret = fhandler_base::fstat (buf)))
- buf->st_blocks = 0;
- return ret;
-}
-
-int
-fhandler_dev_tape::dup (fhandler_base *child)
-{
- lock (-1);
- fhandler_dev_tape *fh = (fhandler_dev_tape *) child;
- if (!DuplicateHandle (hMainProc, mt_mtx, hMainProc, &fh->mt_mtx, 0, TRUE,
- DUPLICATE_SAME_ACCESS))
- {
- debug_printf ("dup(%s) failed, mutex handle %x, %E",
- get_name (), mt_mtx);
- __seterrno ();
- return unlock (-1);
- }
- fh->mt_evt = NULL;
- if (mt_evt &&
- !DuplicateHandle (hMainProc, mt_evt, hMainProc, &fh->mt_evt, 0, TRUE,
- DUPLICATE_SAME_ACCESS))
- {
- debug_printf ("dup(%s) failed, event handle %x, %E",
- get_name (), mt_evt);
- __seterrno ();
- return unlock (-1);
- }
- return unlock (fhandler_dev_raw::dup (child));
-}
-
-void
-fhandler_dev_tape::fixup_after_fork (HANDLE parent)
-{
- fhandler_dev_raw::fixup_after_fork (parent);
- fork_fixup (parent, mt_mtx, "mt_mtx");
- if (mt_evt)
- fork_fixup (parent, mt_evt, "mt_evt");
-}
-
-void
-fhandler_dev_tape::set_close_on_exec (bool val)
-{
- fhandler_dev_raw::set_close_on_exec (val);
- set_no_inheritance (mt_mtx, val);
- if (mt_evt)
- set_no_inheritance (mt_evt, val);
-}
-
-int
-fhandler_dev_tape::ioctl (unsigned int cmd, void *buf)
-{
- int ret = 0;
- lock (-1);
- if (cmd == MTIOCTOP || cmd == MTIOCGET || cmd == MTIOCPOS)
- {
- ret = mt.drive (driveno ())->ioctl (get_handle (), cmd, buf);
- if (ret)
- __seterrno_from_win_error (ret);
- return unlock (ret ? -1 : 0);
- }
- return unlock (fhandler_dev_raw::ioctl (cmd, buf));
-}
diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc
deleted file mode 100644
index caa98e7..0000000
--- a/winsup/cygwin/fhandler_termios.cc
+++ /dev/null
@@ -1,361 +0,0 @@
-/* fhandler_termios.cc
-
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include <ctype.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "tty.h"
-#include "sys/cygwin.h"
-#include "cygtls.h"
-
-/* Common functions shared by tty/console */
-
-void
-fhandler_termios::tcinit (tty_min *this_tc, bool force)
-{
- /* Initial termios values */
-
- tc = this_tc;
-
- if (force || !tc->initialized ())
- {
- tc->ti.c_iflag = BRKINT | ICRNL | IXON;
- tc->ti.c_oflag = OPOST | ONLCR;
- tc->ti.c_cflag = B38400 | CS8 | CREAD;
- tc->ti.c_lflag = ISIG | ICANON | ECHO | IEXTEN;
-
- tc->ti.c_cc[VDISCARD] = CFLUSH;
- tc->ti.c_cc[VEOL] = CEOL;
- tc->ti.c_cc[VEOL2] = CEOL2;
- tc->ti.c_cc[VEOF] = CEOF;
- tc->ti.c_cc[VERASE] = CERASE;
- tc->ti.c_cc[VINTR] = CINTR;
- tc->ti.c_cc[VKILL] = CKILL;
- tc->ti.c_cc[VLNEXT] = CLNEXT;
- tc->ti.c_cc[VMIN] = 1;
- tc->ti.c_cc[VQUIT] = CQUIT;
- tc->ti.c_cc[VREPRINT] = CRPRNT;
- tc->ti.c_cc[VSTART] = CSTART;
- tc->ti.c_cc[VSTOP] = CSTOP;
- tc->ti.c_cc[VSUSP] = CSUSP;
- tc->ti.c_cc[VSWTC] = CSWTCH;
- tc->ti.c_cc[VTIME] = 0;
- tc->ti.c_cc[VWERASE] = CWERASE;
-
- tc->ti.c_ispeed = tc->ti.c_ospeed = B38400;
- tc->pgid = myself->pgid;
- tc->initialized (true);
- }
-}
-
-int
-fhandler_termios::tcsetpgrp (const pid_t pgid)
-{
- termios_printf ("tty %d pgid %d, sid %d, tsid %d", tc->ntty, pgid,
- myself->sid, tc->getsid ());
- if (myself->sid != tc->getsid ())
- {
- set_errno (EPERM);
- return -1;
- }
- int res;
- while (1)
- {
- res = bg_check (-SIGTTOU);
-
- switch (res)
- {
- case bg_ok:
- tc->setpgid (pgid);
- init_console_handler (tc->gethwnd ());
- res = 0;
- break;
- case bg_signalled:
- if (_my_tls.call_signal_handler ())
- continue;
- set_errno (EINTR);
- /* fall through intentionally */
- default:
- res = -1;
- break;
- }
- break;
- }
- return res;
-}
-
-int
-fhandler_termios::tcgetpgrp ()
-{
- return tc->pgid;
-}
-
-void
-tty_min::kill_pgrp (int sig)
-{
- int killself = 0;
- winpids pids ((DWORD) PID_MAP_RW);
- siginfo_t si = {0};
- si.si_signo = sig;
- si.si_code = SI_KERNEL;
- for (unsigned i = 0; i < pids.npids; i++)
- {
- _pinfo *p = pids[i];
- if (!p->exists () || p->ctty != ntty || p->pgid != pgid)
- continue;
- if (p == myself)
- killself++;
- else
- sig_send (p, si);
- }
- if (killself)
- sig_send (myself, si);
-}
-
-bg_check_types
-fhandler_termios::bg_check (int sig)
-{
- if (!myself->pgid || tc->getpgid () == myself->pgid ||
- myself->ctty != tc->ntty ||
- ((sig == SIGTTOU) && !(tc->ti.c_lflag & TOSTOP)))
- return bg_ok;
-
- if (sig < 0)
- sig = -sig;
-
- termios_printf ("bg I/O pgid %d, tpgid %d, %s, ntty tty%d", myself->pgid, tc->getpgid (),
- myctty (), tc->ntty);
-
- if (tc->getsid () == 0)
- {
- /* The pty has been closed by the master. Return an EOF
- indication. FIXME: There is nothing to stop somebody
- from reallocating this pty. I think this is the case
- which is handled by unlockpt on a Unix system. */
- termios_printf ("closed by master");
- return bg_eof;
- }
-
- /* If the process group is no more or if process is ignoring or blocks 'sig',
- return with error */
- int pgid_gone = !pid_exists (myself->pgid);
- int sigs_ignored =
- ((void *) global_sigs[sig].sa_handler == (void *) SIG_IGN) ||
- (_main_tls->sigmask & SIGTOMASK (sig));
-
- if (pgid_gone)
- goto setEIO;
- else if (!sigs_ignored)
- /* nothing */;
- else if (sig == SIGTTOU)
- return bg_ok; /* Just allow the output */
- else
- goto setEIO; /* This is an output error */
-
- /* Don't raise a SIGTT* signal if we have already been interrupted
- by another signal. */
- if (WaitForSingleObject (signal_arrived, 0) != WAIT_OBJECT_0)
- {
- siginfo_t si = {0};
- si.si_signo = sig;
- si.si_code = SI_KERNEL;
- kill_pgrp (myself->pgid, si);
- }
- return bg_signalled;
-
-setEIO:
- set_errno (EIO);
- return bg_error;
-}
-
-#define set_input_done(x) input_done = input_done || (x)
-
-inline void
-fhandler_termios::echo_erase (int force)
-{
- if (force || tc->ti.c_lflag & ECHO)
- doecho ("\b \b", 3);
-}
-
-line_edit_status
-fhandler_termios::line_edit (const char *rptr, int nread, termios& ti)
-{
- line_edit_status ret = line_edit_ok;
- char c;
- int input_done = 0;
- bool sawsig = false;
- int iscanon = ti.c_lflag & ICANON;
-
- while (nread-- > 0)
- {
- c = *rptr++;
-
- termios_printf ("char %c", c);
-
- /* Check for special chars */
-
- if (c == '\r')
- {
- if (ti.c_iflag & IGNCR)
- continue;
- if (ti.c_iflag & ICRNL)
- {
- c = '\n';
- set_input_done (iscanon);
- }
- }
- else if (c == '\n')
- {
- if (ti.c_iflag & INLCR)
- c = '\r';
- else
- set_input_done (iscanon);
- }
-
- if (ti.c_iflag & ISTRIP)
- c &= 0x7f;
- if (ti.c_lflag & ISIG)
- {
- int sig;
- if (CCEQ (ti.c_cc[VINTR], c))
- sig = SIGINT;
- else if (CCEQ (ti.c_cc[VQUIT], c))
- sig = SIGQUIT;
- else if (CCEQ (ti.c_cc[VSUSP], c))
- sig = SIGTSTP;
- else
- goto not_a_sig;
-
- termios_printf ("got interrupt %d, sending signal %d", c, sig);
- eat_readahead (-1);
- tc->kill_pgrp (sig);
- ti.c_lflag &= ~FLUSHO;
- sawsig = true;
- goto restart_output;
- }
- not_a_sig:
- if (ti.c_iflag & IXON)
- {
- if (CCEQ (ti.c_cc[VSTOP], c))
- {
- if (!tc->output_stopped)
- {
- tc->output_stopped = 1;
- acquire_output_mutex (INFINITE);
- }
- continue;
- }
- else if (CCEQ (ti.c_cc[VSTART], c))
- {
- restart_output:
- tc->output_stopped = 0;
- release_output_mutex ();
- continue;
- }
- else if ((ti.c_iflag & IXANY) && tc->output_stopped)
- goto restart_output;
- }
- if (iscanon && ti.c_lflag & IEXTEN && CCEQ (ti.c_cc[VDISCARD], c))
- {
- ti.c_lflag ^= FLUSHO;
- continue;
- }
- if (!iscanon)
- /* nothing */;
- else if (CCEQ (ti.c_cc[VERASE], c))
- {
- if (eat_readahead (1))
- echo_erase ();
- continue;
- }
- else if (CCEQ (ti.c_cc[VWERASE], c))
- {
- int ch;
- do
- if (!eat_readahead (1))
- break;
- else
- echo_erase ();
- while ((ch = peek_readahead (1)) >= 0 && !isspace (ch));
- continue;
- }
- else if (CCEQ (ti.c_cc[VKILL], c))
- {
- int nchars = eat_readahead (-1);
- if (ti.c_lflag & ECHO)
- while (nchars--)
- echo_erase (1);
- continue;
- }
- else if (CCEQ (ti.c_cc[VREPRINT], c))
- {
- if (ti.c_lflag & ECHO)
- {
- doecho ("\n\r", 2);
- doecho (rabuf, ralen);
- }
- continue;
- }
- else if (CCEQ (ti.c_cc[VEOF], c))
- {
- termios_printf ("EOF");
- accept_input ();
- ret = line_edit_input_done;
- continue;
- }
- else if (CCEQ (ti.c_cc[VEOL], c) ||
- CCEQ (ti.c_cc[VEOL2], c) ||
- c == '\n')
- {
- set_input_done (1);
- termios_printf ("EOL");
- }
-
- if (ti.c_iflag & IUCLC && isupper (c))
- c = cyg_tolower (c);
-
- put_readahead (c);
- if (ti.c_lflag & ECHO)
- doecho (&c, 1);
- if (!iscanon || input_done)
- {
- int status = accept_input ();
- if (status != 1)
- {
- ret = status ? line_edit_error : line_edit_pipe_full;
- eat_readahead (1);
- break;
- }
- ret = line_edit_input_done;
- input_done = 0;
- }
- }
-
- if (!iscanon && ralen > 0)
- ret = line_edit_input_done;
-
- if (sawsig)
- ret = line_edit_signalled;
-
- return ret;
-}
-
-_off64_t
-fhandler_termios::lseek (_off64_t, int)
-{
- set_errno (ESPIPE);
- return -1;
-}
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
deleted file mode 100644
index 654b927..0000000
--- a/winsup/cygwin/fhandler_tty.cc
+++ /dev/null
@@ -1,1493 +0,0 @@
-/* fhandler_tty.cc
-
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include <cygwin/kd.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "cygheap.h"
-#include "shared_info.h"
-#include "cygserver.h"
-#include "cygthread.h"
-#include "child_info.h"
-
-/* tty master stuff */
-
-fhandler_tty_master NO_COPY *tty_master;
-
-static DWORD WINAPI process_input (void *); // Input queue thread
-static DWORD WINAPI process_output (void *); // Output queue thread
-static DWORD WINAPI process_ioctl (void *); // Ioctl requests thread
-
-fhandler_tty_master::fhandler_tty_master ()
- : fhandler_pty_master (), console (NULL)
-{
-}
-
-int
-fhandler_tty_slave::get_unit ()
-{
- return dev () == FH_TTY ? myself->ctty : dev ().minor;
-}
-
-void
-fhandler_tty_master::set_winsize (bool sendSIGWINCH)
-{
- winsize w;
- console->ioctl (TIOCGWINSZ, &w);
- get_ttyp ()->winsize = w;
- if (sendSIGWINCH)
- tc->kill_pgrp (SIGWINCH);
-}
-
-int
-fhandler_tty_master::init ()
-{
- termios_printf ("Creating master for tty%d", get_unit ());
-
- if (init_console ())
- {
- termios_printf ("can't create fhandler");
- return -1;
- }
-
- termios ti;
- memset (&ti, 0, sizeof (ti));
- console->tcsetattr (0, &ti);
-
- if (!setup (false))
- return 1;
-
- set_winsize (false);
-
- set_close_on_exec (true);
-
- cygthread *h;
- h = new cygthread (process_input, 0, cygself, "ttyin");
- h->SetThreadPriority (THREAD_PRIORITY_HIGHEST);
- h->zap_h ();
-
- h = new cygthread (process_ioctl, 0, cygself, "ttyioctl");
- h->SetThreadPriority (THREAD_PRIORITY_HIGHEST);
- h->zap_h ();
-
- h = new cygthread (process_output, 0, cygself, "ttyout");
- h->SetThreadPriority (THREAD_PRIORITY_HIGHEST);
- h->zap_h ();
-
- return 0;
-}
-
-#ifdef DEBUGGING
-static class mutex_stack
-{
-public:
- const char *fn;
- int ln;
- const char *tname;
-} ostack[100];
-
-static int osi;
-#endif /*DEBUGGING*/
-
-DWORD
-fhandler_tty_common::__acquire_output_mutex (const char *fn, int ln,
- DWORD ms)
-{
- if (strace.active ())
- strace.prntf (_STRACE_TERMIOS, fn, "(%d): tty output_mutex: waiting %d ms", ln, ms);
- DWORD res = WaitForSingleObject (output_mutex, ms);
- if (res == WAIT_OBJECT_0)
- {
-#ifndef DEBUGGING
- if (strace.active ())
- strace.prntf (_STRACE_TERMIOS, fn, "(%d): tty output_mutex: acquired", ln, res);
-#else
- ostack[osi].fn = fn;
- ostack[osi].ln = ln;
- ostack[osi].tname = cygthread::name ();
- termios_printf ("acquired for %s:%d, osi %d", fn, ln, osi);
- osi++;
-#endif
- }
- return res;
-}
-
-void
-fhandler_tty_common::__release_output_mutex (const char *fn, int ln)
-{
- if (ReleaseMutex (output_mutex))
- {
-#ifndef DEBUGGING
- if (strace.active ())
- strace.prntf (_STRACE_TERMIOS, fn, "(%d): tty output_mutex released", ln);
-#else
- if (osi > 0)
- osi--;
- termios_printf ("released at %s:%d, osi %d", fn, ln, osi);
- termios_printf (" for %s:%d (%s)", ostack[osi].fn, ostack[osi].ln, ostack[osi].tname);
- ostack[osi].ln = -ln;
-#endif
- }
-#ifdef DEBUGGING
- else if (osi > 0)
- {
- system_printf ("couldn't release output mutex but we seem to own it, %E");
- try_to_debug ();
- }
-#endif
-}
-
-/* Process tty input. */
-
-void
-fhandler_pty_master::doecho (const void *str, DWORD len)
-{
- acquire_output_mutex (INFINITE);
- if (!WriteFile (to_master, str, len, &len, NULL))
- termios_printf ("Write to %p failed, %E", to_master);
-// WaitForSingleObject (output_done_event, INFINITE);
- release_output_mutex ();
-}
-
-int
-fhandler_pty_master::accept_input ()
-{
- DWORD bytes_left;
- int ret = 1;
-
- WaitForSingleObject (input_mutex, INFINITE);
-
- bytes_left = eat_readahead (-1);
-
- if (!bytes_left)
- {
- termios_printf ("sending EOF to slave");
- get_ttyp ()->read_retval = 0;
- }
- else
- {
- char *p = rabuf;
- DWORD rc;
- DWORD written = 0;
-
- termios_printf ("about to write %d chars to slave", bytes_left);
- rc = WriteFile (get_output_handle (), p, bytes_left, &written, NULL);
- if (!rc)
- {
- debug_printf ("error writing to pipe %E");
- get_ttyp ()->read_retval = -1;
- ret = -1;
- }
- else
- {
- get_ttyp ()->read_retval = 1;
- p += written;
- bytes_left -= written;
- if (bytes_left > 0)
- {
- debug_printf ("to_slave pipe is full");
- puts_readahead (p, bytes_left);
- ret = 0;
- }
- }
- }
-
- SetEvent (input_available_event);
- ReleaseMutex (input_mutex);
- return ret;
-}
-
-static DWORD WINAPI
-process_input (void *)
-{
- char rawbuf[INP_BUFFER_SIZE];
-
- while (1)
- {
- size_t nraw = INP_BUFFER_SIZE;
- tty_master->console->read ((void *) rawbuf, nraw);
- if (tty_master->line_edit (rawbuf, nraw, tty_master->get_ttyp ()->ti)
- == line_edit_signalled)
- tty_master->console->eat_readahead (-1);
- }
-}
-
-bool
-fhandler_pty_master::hit_eof ()
-{
- if (get_ttyp ()->was_opened && !get_ttyp ()->slave_alive ())
- {
- /* We have the only remaining open handle to this pty, and
- the slave pty has been opened at least once. We treat
- this as EOF. */
- termios_printf ("all other handles closed");
- return 1;
- }
- return 0;
-}
-
-/* Process tty output requests */
-
-int
-fhandler_pty_master::process_slave_output (char *buf, size_t len, int pktmode_on)
-{
- size_t rlen;
- char outbuf[OUT_BUFFER_SIZE + 1];
- DWORD n;
- int column = 0;
- int rc = 0;
-
- if (len == 0)
- goto out;
-
- if (need_nl)
- {
- /* We need to return a left over \n character, resulting from
- \r\n conversion. Note that we already checked for FLUSHO and
- output_stopped at the time that we read the character, so we
- don't check again here. */
- if (buf)
- buf[0] = '\n';
- need_nl = 0;
- rc = 1;
- goto out;
- }
-
-
- for (;;)
- {
- /* Set RLEN to the number of bytes to read from the pipe. */
- rlen = len;
- if (get_ttyp ()->ti.c_oflag & OPOST && get_ttyp ()->ti.c_oflag & ONLCR)
- {
- /* We are going to expand \n to \r\n, so don't read more than
- half of the number of bytes requested. */
- rlen /= 2;
- if (rlen == 0)
- rlen = 1;
- }
- if (rlen > sizeof outbuf)
- rlen = sizeof outbuf;
-
- HANDLE handle = get_io_handle ();
-
- n = 0; // get_readahead_into_buffer (outbuf, len);
- if (!n)
- {
- /* Doing a busy wait like this is quite inefficient, but nothing
- else seems to work completely. Windows should provide some sort
- of overlapped I/O for pipes, or something, but it doesn't. */
- while (1)
- {
- if (!PeekNamedPipe (handle, NULL, 0, NULL, &n, NULL))
- goto err;
- if (n > 0)
- break;
- if (hit_eof ())
- goto out;
- /* DISCARD (FLUSHO) and tcflush can finish here. */
- if (n == 0 && (get_ttyp ()->ti.c_lflag & FLUSHO || !buf))
- goto out;
- if (n == 0 && is_nonblocking ())
- {
- set_errno (EAGAIN);
- rc = -1;
- break;
- }
-
- Sleep (10);
- }
-
- if (ReadFile (handle, outbuf, rlen, &n, NULL) == FALSE)
- goto err;
- }
-
- termios_printf ("bytes read %u", n);
- get_ttyp ()->write_error = 0;
- if (output_done_event != NULL)
- SetEvent (output_done_event);
-
- if (get_ttyp ()->ti.c_lflag & FLUSHO || !buf)
- continue;
-
- char *optr;
- optr = buf;
- if (pktmode_on)
- *optr++ = TIOCPKT_DATA;
-
- if (!(get_ttyp ()->ti.c_oflag & OPOST)) // post-process output
- {
- memcpy (optr, outbuf, n);
- optr += n;
- }
- else // raw output mode
- {
- char *iptr = outbuf;
-
- while (n--)
- {
- switch (*iptr)
- {
- case '\r':
- if ((get_ttyp ()->ti.c_oflag & ONOCR) && column == 0)
- {
- iptr++;
- continue;
- }
- if (get_ttyp ()->ti.c_oflag & OCRNL)
- *iptr = '\n';
- else
- column = 0;
- break;
- case '\n':
- if (get_ttyp ()->ti.c_oflag & ONLCR)
- {
- *optr++ = '\r';
- column = 0;
- }
- if (get_ttyp ()->ti.c_oflag & ONLRET)
- column = 0;
- break;
- default:
- column++;
- break;
- }
-
- /* Don't store data past the end of the user's buffer. This
- can happen if the user requests a read of 1 byte when
- doing \r\n expansion. */
- if (optr - buf >= (int) len)
- {
- if (*iptr != '\n' || n != 0)
- system_printf ("internal error: %d unexpected characters", n);
- need_nl = 1;
- break;
- }
-
- *optr++ = *iptr++;
- }
- }
- rc = optr - buf;
- break;
-
- err:
- if (GetLastError () == ERROR_BROKEN_PIPE)
- rc = 0;
- else
- {
- __seterrno ();
- rc = -1;
- }
- break;
- }
-
-out:
- termios_printf ("returning %d", rc);
- return rc;
-}
-
-static DWORD WINAPI
-process_output (void *)
-{
- char buf[OUT_BUFFER_SIZE * 2];
-
- for (;;)
- {
- int n = tty_master->process_slave_output (buf, OUT_BUFFER_SIZE, 0);
- if (n <= 0)
- {
- if (n < 0)
- termios_printf ("ReadFile %E");
- ExitThread (0);
- }
- n = tty_master->console->write ((void *) buf, (size_t) n);
- tty_master->get_ttyp ()->write_error = n == -1 ? get_errno () : 0;
- }
-}
-
-
-/* Process tty ioctl requests */
-
-static DWORD WINAPI
-process_ioctl (void *)
-{
- while (1)
- {
- WaitForSingleObject (tty_master->ioctl_request_event, INFINITE);
- termios_printf ("ioctl() request");
- tty *ttyp = tty_master->get_ttyp ();
- ttyp->ioctl_retval =
- tty_master->console->ioctl (ttyp->cmd,
- (ttyp->cmd == KDSKBMETA)
- ? (void *) ttyp->arg.value
- : (void *) &ttyp->arg);
- SetEvent (tty_master->ioctl_done_event);
- }
-}
-
-/**********************************************************************/
-/* Tty slave stuff */
-
-fhandler_tty_slave::fhandler_tty_slave ()
- : fhandler_tty_common (), inuse (NULL)
-{
- uninterruptible_io (true);
-}
-
-/* FIXME: This function needs to close handles when it has
- a failing condition. */
-int
-fhandler_tty_slave::open (int flags, mode_t)
-{
- if (get_device () == FH_TTY)
- dev().tty_to_real_device ();
- fhandler_tty_slave *arch = (fhandler_tty_slave *) cygheap->fdtab.find_archetype (pc.dev);
- if (arch)
- {
- *this = *(fhandler_tty_slave *) arch;
- termios_printf ("copied fhandler_tty_slave archetype");
- set_flags ((flags & ~O_TEXT) | O_BINARY);
- cygheap->manage_console_count ("fhandler_tty_slave::open<arch>", 1);
- goto out;
- }
-
- tcinit (cygwin_shared->tty[get_unit ()]);
-
- cygwin_shared->tty.attach (get_unit ());
-
- set_flags ((flags & ~O_TEXT) | O_BINARY);
- /* Create synchronisation events */
- char buf[MAX_PATH];
-
- /* output_done_event may or may not exist. It will exist if the tty
- was opened by fhandler_tty_master::init, normally called at
- startup if use_tty is non-zero. It will not exist if this is a
- pty opened by fhandler_pty_master::open. In the former case, tty
- output is handled by a separate thread which controls output. */
- shared_name (buf, OUTPUT_DONE_EVENT, get_unit ());
- output_done_event = OpenEvent (EVENT_ALL_ACCESS, TRUE, buf);
-
- if (!(output_mutex = get_ttyp ()->open_output_mutex ()))
- {
- termios_printf ("open output mutex failed, %E");
- __seterrno ();
- return 0;
- }
- if (!(input_mutex = get_ttyp ()->open_input_mutex ()))
- {
- termios_printf ("open input mutex failed, %E");
- __seterrno ();
- return 0;
- }
- shared_name (buf, INPUT_AVAILABLE_EVENT, get_unit ());
- if (!(input_available_event = OpenEvent (EVENT_ALL_ACCESS, TRUE, buf)))
- {
- termios_printf ("open input event failed, %E");
- __seterrno ();
- return 0;
- }
-
- /* The ioctl events may or may not exist. See output_done_event,
- above. */
- shared_name (buf, IOCTL_REQUEST_EVENT, get_unit ());
- ioctl_request_event = OpenEvent (EVENT_ALL_ACCESS, TRUE, buf);
- shared_name (buf, IOCTL_DONE_EVENT, get_unit ());
- ioctl_done_event = OpenEvent (EVENT_ALL_ACCESS, TRUE, buf);
-
- /* FIXME: Needs a method to eliminate tty races */
- {
- acquire_output_mutex (500);
- inuse = get_ttyp ()->create_inuse (TTY_SLAVE_ALIVE);
- get_ttyp ()->was_opened = true;
- release_output_mutex ();
- }
-
- if (!get_ttyp ()->from_master || !get_ttyp ()->to_master)
- {
- termios_printf ("tty handles have been closed");
- set_errno (EACCES);
- return 0;
- }
-
- HANDLE from_master_local;
- HANDLE to_master_local;
- from_master_local = to_master_local = NULL;
-
-#ifdef USE_SERVER
- if (cygserver_running == CYGSERVER_UNAVAIL
- || !cygserver_attach_tty (&from_master_local, &to_master_local))
-#endif
- {
- if (get_ttyp ()->master_pid < 0)
- {
- set_errno (EAGAIN);
- termios_printf ("*** master is closed");
- return 0;
- }
- pinfo p (get_ttyp ()->master_pid);
- if (!p)
- {
- set_errno (EAGAIN);
- termios_printf ("*** couldn't find tty master");
- return 0;
- }
-#ifdef USE_SERVER
- termios_printf ("cannot dup handles via server. using old method.");
-#endif
- HANDLE tty_owner = OpenProcess (PROCESS_DUP_HANDLE, FALSE,
- p->dwProcessId);
- if (tty_owner == NULL)
- {
- termios_printf ("can't open tty (%d) handle process %d",
- get_unit (), get_ttyp ()->master_pid);
- __seterrno ();
- return 0;
- }
-
- if (!DuplicateHandle (tty_owner, get_ttyp ()->from_master,
- hMainProc, &from_master_local, 0, TRUE,
- DUPLICATE_SAME_ACCESS))
- {
- termios_printf ("can't duplicate input, %E");
- __seterrno ();
- return 0;
- }
-
- VerifyHandle (from_master_local);
- if (!DuplicateHandle (tty_owner, get_ttyp ()->to_master,
- hMainProc, &to_master_local, 0, TRUE,
- DUPLICATE_SAME_ACCESS))
- {
- termios_printf ("can't duplicate output, %E");
- __seterrno ();
- return 0;
- }
- VerifyHandle (to_master_local);
- CloseHandle (tty_owner);
- }
-
- termios_printf ("duplicated from_master %p->%p from tty_owner",
- get_ttyp ()->from_master, from_master_local);
- termios_printf ("duplicated to_master %p->%p from tty_owner",
- get_ttyp ()->to_master, to_master_local);
-
- set_io_handle (from_master_local);
- set_output_handle (to_master_local);
-
- set_open_status ();
- if (cygheap->manage_console_count ("fhandler_tty_slave::open", 1) == 1
- && !output_done_event)
- fhandler_console::need_invisible ();
-
- // FIXME: Do this better someday
- arch = (fhandler_tty_slave *) cmalloc_abort (HEAP_ARCHETYPES, sizeof (*this));
- *((fhandler_tty_slave **) cygheap->fdtab.add_archetype ()) = arch;
- archetype = arch;
- *arch = *this;
-
-out:
- usecount = 0;
- arch->usecount++;
- report_tty_counts (this, "opened", "");
- myself->set_ctty (get_ttyp (), flags, arch);
-
- return 1;
-}
-
-int
-fhandler_tty_slave::close ()
-{
- /* This used to always call fhandler_tty_common::close when hExeced but that
- caused multiple closes of the handles associated with this tty. Since
- close_all_files is not called until after the cygwin process has synced
- or before a non-cygwin process has exited, it should be safe to just
- close this normally. cgf 2006-05-20 */
- cygheap->manage_console_count ("fhandler_tty_slave::close", -1);
-
- archetype->usecount--;
- report_tty_counts (this, "closed", "");
-
- if (archetype->usecount)
- {
-#ifdef DEBUGGING
- if (archetype->usecount < 0)
- system_printf ("error: usecount %d", archetype->usecount);
-#endif
- termios_printf ("just returning because archetype usecount is != 0");
- return 0;
- }
-
- termios_printf ("closing last open %s handle", ttyname ());
- if (inuse && !CloseHandle (inuse))
- termios_printf ("CloseHandle (inuse), %E");
- return fhandler_tty_common::close ();
-}
-
-int
-fhandler_tty_slave::cygserver_attach_tty (LPHANDLE from_master_ptr,
- LPHANDLE to_master_ptr)
-{
-#ifndef USE_SERVER
- return 0;
-#else
- if (!from_master_ptr || !to_master_ptr)
- return 0;
-
- client_request_attach_tty req ((DWORD) get_ttyp ()->master_pid,
- (HANDLE) get_ttyp ()->from_master,
- (HANDLE) get_ttyp ()->to_master);
-
- if (req.make_request () == -1 || req.error_code ())
- return 0;
-
- *from_master_ptr = req.from_master ();
- *to_master_ptr = req.to_master ();
-
- return 1;
-#endif
-}
-
-void
-fhandler_tty_slave::init (HANDLE, DWORD a, mode_t)
-{
- int flags = 0;
-
- a &= GENERIC_READ | GENERIC_WRITE;
- if (a == GENERIC_READ)
- flags = O_RDONLY;
- if (a == GENERIC_WRITE)
- flags = O_WRONLY;
- if (a == (GENERIC_READ | GENERIC_WRITE))
- flags = O_RDWR;
-
- open (flags);
-}
-
-int
-fhandler_tty_slave::write (const void *ptr, size_t len)
-{
- DWORD n, towrite = len;
-
- termios_printf ("tty%d, write(%x, %d)", get_unit (), ptr, len);
-
- acquire_output_mutex (INFINITE);
-
- while (len)
- {
- n = min (OUT_BUFFER_SIZE, len);
- char *buf = (char *)ptr;
- ptr = (char *) ptr + n;
- len -= n;
-
- /* Previous write may have set write_error to != 0. Check it here.
- This is less than optimal, but the alternative slows down tty
- writes enormously. */
- if (get_ttyp ()->write_error)
- {
- set_errno (get_ttyp ()->write_error);
- towrite = (DWORD) -1;
- break;
- }
-
- if (WriteFile (get_output_handle (), buf, n, &n, NULL) == FALSE)
- {
- DWORD err = GetLastError ();
- termios_printf ("WriteFile failed, %E");
- switch (err)
- {
- case ERROR_NO_DATA:
- err = ERROR_IO_DEVICE;
- default:
- __seterrno_from_win_error (err);
- }
- raise (SIGHUP); /* FIXME: Should this be SIGTTOU? */
- towrite = (DWORD) -1;
- break;
- }
-
- if (output_done_event != NULL)
- {
- DWORD rc;
- DWORD x = n * 1000;
- rc = WaitForSingleObject (output_done_event, x);
- termios_printf ("waited %d ms for output_done_event, WFSO %d", x, rc);
- }
- }
- release_output_mutex ();
- return towrite;
-}
-
-void __stdcall
-fhandler_tty_slave::read (void *ptr, size_t& len)
-{
- int totalread = 0;
- int vmin = 0;
- int vtime = 0; /* Initialized to prevent -Wuninitialized warning */
- size_t readlen;
- DWORD bytes_in_pipe;
- char buf[INP_BUFFER_SIZE];
- char peek_buf[INP_BUFFER_SIZE];
- DWORD time_to_wait;
- DWORD rc;
- HANDLE w4[2];
-
- termios_printf ("read(%x, %d) handle %p", ptr, len, get_handle ());
-
- if (!ptr) /* Indicating tcflush(). */
- time_to_wait = 0;
- else if ((get_ttyp ()->ti.c_lflag & ICANON))
- time_to_wait = INFINITE;
- else
- {
- vmin = get_ttyp ()->ti.c_cc[VMIN];
- if (vmin > INP_BUFFER_SIZE)
- vmin = INP_BUFFER_SIZE;
- vtime = get_ttyp ()->ti.c_cc[VTIME];
- if (vmin < 0)
- vmin = 0;
- if (vtime < 0)
- vtime = 0;
- if (!vmin && !vtime)
- time_to_wait = 0;
- else
- time_to_wait = !vtime ? INFINITE : 100 * vtime;
- }
-
- w4[0] = signal_arrived;
- w4[1] = input_available_event;
-
- DWORD waiter = time_to_wait;
- while (len)
- {
- rc = WaitForMultipleObjects (2, w4, FALSE, waiter);
-
- if (rc == WAIT_TIMEOUT)
- {
- termios_printf ("wait timed out, waiter %u", waiter);
- break;
- }
-
- if (rc == WAIT_FAILED)
- {
- termios_printf ("wait for input event failed, %E");
- break;
- }
-
- if (rc == WAIT_OBJECT_0)
- {
- /* if we've received signal after successfully reading some data,
- just return all data successfully read */
- if (totalread > 0)
- break;
- set_sig_errno (EINTR);
- len = (size_t) -1;
- return;
- }
-
- rc = WaitForSingleObject (input_mutex, 1000);
- if (rc == WAIT_FAILED)
- {
- termios_printf ("wait for input mutex failed, %E");
- break;
- }
- else if (rc == WAIT_TIMEOUT)
- {
- termios_printf ("failed to acquire input mutex after input event arrived");
- break;
- }
- if (!PeekNamedPipe (get_handle (), peek_buf, sizeof (peek_buf), &bytes_in_pipe, NULL, NULL))
- {
- termios_printf ("PeekNamedPipe failed, %E");
- raise (SIGHUP);
- bytes_in_pipe = 0;
- }
-
- /* On first peek determine no. of bytes to flush. */
- if (!ptr && len == UINT_MAX)
- len = (size_t) bytes_in_pipe;
-
- if (ptr && !bytes_in_pipe && !vmin && !time_to_wait)
- {
- ReleaseMutex (input_mutex);
- len = (size_t) bytes_in_pipe;
- return;
- }
-
- readlen = min (bytes_in_pipe, min (len, sizeof (buf)));
-
- if (ptr && vmin && readlen > (unsigned) vmin)
- readlen = vmin;
-
- DWORD n = 0;
- if (readlen)
- {
- termios_printf ("reading %d bytes (vtime %d)", readlen, vtime);
- if (ReadFile (get_handle (), buf, readlen, &n, NULL) == FALSE)
- {
- termios_printf ("read failed, %E");
- raise (SIGHUP);
- }
- /* MSDN states that 5th prameter can be used to determine total
- number of bytes in pipe, but for some reason this number doesn't
- change after successful read. So we have to peek into the pipe
- again to see if input is still available */
- if (!PeekNamedPipe (get_handle (), peek_buf, 1, &bytes_in_pipe, NULL, NULL))
- {
- termios_printf ("PeekNamedPipe failed, %E");
- raise (SIGHUP);
- bytes_in_pipe = 0;
- }
- if (n)
- {
- len -= n;
- totalread += n;
- if (ptr)
- {
- memcpy (ptr, buf, n);
- ptr = (char *) ptr + n;
- }
- }
- }
-
- if (!bytes_in_pipe)
- ResetEvent (input_available_event);
-
- ReleaseMutex (input_mutex);
-
- if (!ptr)
- {
- if (!bytes_in_pipe)
- break;
- continue;
- }
-
- if (get_ttyp ()->read_retval < 0) // read error
- {
- set_errno (-get_ttyp ()->read_retval);
- totalread = -1;
- break;
- }
- if (get_ttyp ()->read_retval == 0) //EOF
- {
- termios_printf ("saw EOF");
- break;
- }
- if (get_ttyp ()->ti.c_lflag & ICANON || is_nonblocking ())
- break;
- if (vmin && totalread >= vmin)
- break;
-
- /* vmin == 0 && vtime == 0:
- * we've already read all input, if any, so return immediately
- * vmin == 0 && vtime > 0:
- * we've waited for input 10*vtime ms in WFSO(input_available_event),
- * no matter whether any input arrived, we shouldn't wait any longer,
- * so return immediately
- * vmin > 0 && vtime == 0:
- * here, totalread < vmin, so continue waiting until more data
- * arrive
- * vmin > 0 && vtime > 0:
- * similar to the previous here, totalread < vmin, and timer
- * hadn't expired -- WFSO(input_available_event) != WAIT_TIMEOUT,
- * so "restart timer" and wait until more data arrive
- */
-
- if (vmin == 0)
- break;
-
- if (n)
- waiter = time_to_wait;
- }
- termios_printf ("%d=read(%x, %d)", totalread, ptr, len);
- len = (size_t) totalread;
-}
-
-int
-fhandler_tty_slave::dup (fhandler_base *child)
-{
- fhandler_tty_slave *arch = (fhandler_tty_slave *) archetype;
- *(fhandler_tty_slave *) child = *arch;
- child->set_flags (get_flags ());
- child->usecount = 0;
- arch->usecount++;
- cygheap->manage_console_count ("fhandler_tty_slave::dup", 1);
- report_tty_counts (child, "duped", "");
- return 0;
-}
-
-int
-fhandler_pty_master::dup (fhandler_base *child)
-{
- fhandler_tty_master *arch = (fhandler_tty_master *) archetype;
- *(fhandler_tty_master *) child = *arch;
- child->set_flags (get_flags ());
- child->usecount = 0;
- arch->usecount++;
- report_tty_counts (child, "duped master", "");
- return 0;
-}
-
-int
-fhandler_tty_slave::tcgetattr (struct termios *t)
-{
- *t = get_ttyp ()->ti;
- return 0;
-}
-
-int
-fhandler_tty_slave::tcsetattr (int, const struct termios *t)
-{
- acquire_output_mutex (INFINITE);
- get_ttyp ()->ti = *t;
- release_output_mutex ();
- return 0;
-}
-
-int
-fhandler_tty_slave::tcflush (int queue)
-{
- int ret = 0;
-
- termios_printf ("tcflush(%d) handle %p", queue, get_handle ());
-
- if (queue == TCIFLUSH || queue == TCIOFLUSH)
- {
- size_t len = UINT_MAX;
- read (NULL, len);
- ret = ((int) len) >= 0 ? 0 : -1;
- }
- if (queue == TCOFLUSH || queue == TCIOFLUSH)
- {
- /* do nothing for now. */
- }
-
- termios_printf ("%d=tcflush(%d)", ret, queue);
- return ret;
-}
-
-int
-fhandler_tty_slave::ioctl (unsigned int cmd, void *arg)
-{
- termios_printf ("ioctl (%x)", cmd);
-
- if (myself->pgid && get_ttyp ()->getpgid () != myself->pgid
- && myself->ctty == get_unit () && (get_ttyp ()->ti.c_lflag & TOSTOP))
- {
- /* background process */
- termios_printf ("bg ioctl pgid %d, tpgid %d, %s", myself->pgid,
- get_ttyp ()->getpgid (), myctty ());
- raise (SIGTTOU);
- }
-
- int retval;
- switch (cmd)
- {
- case TIOCGWINSZ:
- case TIOCSWINSZ:
- case TIOCLINUX:
- case KDGKBMETA:
- case KDSKBMETA:
- break;
- case FIONBIO:
- set_nonblocking (*(int *) arg);
- retval = 0;
- goto out;
- default:
- set_errno (EINVAL);
- return -1;
- }
-
- acquire_output_mutex (INFINITE);
-
- get_ttyp ()->cmd = cmd;
- get_ttyp ()->ioctl_retval = 0;
- int val;
- switch (cmd)
- {
- case TIOCGWINSZ:
- get_ttyp ()->arg.winsize = get_ttyp ()->winsize;
- if (ioctl_request_event)
- SetEvent (ioctl_request_event);
- *(struct winsize *) arg = get_ttyp ()->arg.winsize;
- if (ioctl_done_event)
- WaitForSingleObject (ioctl_done_event, INFINITE);
- get_ttyp ()->winsize = get_ttyp ()->arg.winsize;
- break;
- case TIOCSWINSZ:
- if (get_ttyp ()->winsize.ws_row != ((struct winsize *) arg)->ws_row
- || get_ttyp ()->winsize.ws_col != ((struct winsize *) arg)->ws_col)
- {
- get_ttyp ()->arg.winsize = *(struct winsize *) arg;
- if (ioctl_request_event)
- {
- get_ttyp ()->ioctl_retval = -EINVAL;
- SetEvent (ioctl_request_event);
- }
- else
- {
- get_ttyp ()->winsize = *(struct winsize *) arg;
- killsys (-get_ttyp ()->getpgid (), SIGWINCH);
- }
- if (ioctl_done_event)
- WaitForSingleObject (ioctl_done_event, INFINITE);
- }
- break;
- case TIOCLINUX:
- val = *(unsigned char *) arg;
- if (val != 6 || !ioctl_request_event || !ioctl_done_event)
- get_ttyp ()->ioctl_retval = -EINVAL;
- else
- {
- get_ttyp ()->arg.value = val;
- SetEvent (ioctl_request_event);
- WaitForSingleObject (ioctl_done_event, INFINITE);
- *(unsigned char *) arg = get_ttyp ()->arg.value & 0xFF;
- }
- break;
- case KDGKBMETA:
- if (ioctl_request_event)
- {
- SetEvent (ioctl_request_event);
- if (ioctl_done_event)
- WaitForSingleObject (ioctl_done_event, INFINITE);
- *(int *) arg = get_ttyp ()->arg.value;
- }
- else
- get_ttyp ()->ioctl_retval = -EINVAL;
- break;
- case KDSKBMETA:
- if (ioctl_request_event)
- {
- get_ttyp ()->arg.value = (int) arg;
- SetEvent (ioctl_request_event);
- if (ioctl_done_event)
- WaitForSingleObject (ioctl_done_event, INFINITE);
- }
- else
- get_ttyp ()->ioctl_retval = -EINVAL;
- break;
- }
-
- release_output_mutex ();
- retval = get_ttyp ()->ioctl_retval;
- if (retval < 0)
- {
- set_errno (-retval);
- retval = -1;
- }
-
-out:
- termios_printf ("%d = ioctl (%x)", retval, cmd);
- return retval;
-}
-
-/*******************************************************
- fhandler_pty_master
-*/
-fhandler_pty_master::fhandler_pty_master ()
- : fhandler_tty_common (), pktmode (0), need_nl (0), dwProcessId (0)
-{
-}
-
-int
-fhandler_pty_master::open (int flags, mode_t)
-{
- int ntty;
- ntty = cygwin_shared->tty.allocate (false);
- if (ntty < 0)
- return 0;
-
- dev().devn = FHDEV (DEV_TTYM_MAJOR, ntty);
- if (!setup (true))
- {
- lock_ttys::release ();
- return 0;
- }
- lock_ttys::release ();
- set_flags ((flags & ~O_TEXT) | O_BINARY);
- set_open_status ();
- //
- // FIXME: Do this better someday
- fhandler_pty_master *arch = (fhandler_tty_master *) cmalloc_abort (HEAP_ARCHETYPES, sizeof (*this));
- *((fhandler_pty_master **) cygheap->fdtab.add_archetype ()) = arch;
- archetype = arch;
- *arch = *this;
- arch->dwProcessId = GetCurrentProcessId ();
-
- usecount = 0;
- arch->usecount++;
- char buf[sizeof ("opened pty master for ttyNNNNNNNNNNN")];
- __small_sprintf (buf, "opened pty master for tty%d", get_unit ());
- report_tty_counts (this, buf, "");
- return 1;
-}
-
-_off64_t
-fhandler_tty_common::lseek (_off64_t, int)
-{
- set_errno (ESPIPE);
- return -1;
-}
-
-int
-fhandler_tty_common::close ()
-{
- termios_printf ("tty%d <%p,%p> closing", get_unit (), get_handle (), get_output_handle ());
- if (output_done_event && !CloseHandle (output_done_event))
- termios_printf ("CloseHandle (output_done_event), %E");
- if (ioctl_done_event && !CloseHandle (ioctl_done_event))
- termios_printf ("CloseHandle (ioctl_done_event), %E");
- if (ioctl_request_event && !CloseHandle (ioctl_request_event))
- termios_printf ("CloseHandle (ioctl_request_event), %E");
- if (!ForceCloseHandle (input_mutex))
- termios_printf ("CloseHandle (input_mutex<%p>), %E", input_mutex);
- if (!ForceCloseHandle (output_mutex))
- termios_printf ("CloseHandle (output_mutex<%p>), %E", output_mutex);
- if (!ForceCloseHandle1 (get_handle (), from_pty))
- termios_printf ("CloseHandle (get_handle ()<%p>), %E", get_handle ());
- if (!ForceCloseHandle1 (get_output_handle (), to_pty))
- termios_printf ("CloseHandle (get_output_handle ()<%p>), %E", get_output_handle ());
-
- if (!ForceCloseHandle (input_available_event))
- termios_printf ("CloseHandle (input_available_event<%p>), %E", input_available_event);
-
- return 0;
-}
-
-int
-fhandler_pty_master::close ()
-{
-#if 0
- while (accept_input () > 0)
- continue;
-#endif
- archetype->usecount--;
- report_tty_counts (this, "closing master", "");
-
- if (archetype->usecount)
- {
-#ifdef DEBUGGING
- if (archetype->usecount < 0)
- system_printf ("error: usecount %d", archetype->usecount);
-#endif
- termios_printf ("just returning because archetype usecount is != 0");
- return 0;
- }
-
- fhandler_tty_master *arch = (fhandler_tty_master *) archetype;
- termios_printf ("closing from_master(%p)/to_master(%p) since we own them(%d)",
- arch->from_master, arch->to_master, arch->dwProcessId);
- if (!ForceCloseHandle (arch->from_master))
- termios_printf ("error closing from_master %p, %E", arch->from_master);
- if (!ForceCloseHandle (arch->to_master))
- termios_printf ("error closing from_master %p, %E", arch->to_master);
- fhandler_tty_common::close ();
-
- if (hExeced || get_ttyp ()->master_pid != myself->pid)
- termios_printf ("not clearing: %d, master_pid %d", hExeced, get_ttyp ()->master_pid);
- else
- get_ttyp ()->set_master_closed ();
-
- return 0;
-}
-
-int
-fhandler_pty_master::write (const void *ptr, size_t len)
-{
- int i;
- char *p = (char *) ptr;
- termios ti = tc->ti;
-
- for (i = 0; i < (int) len; i++)
- {
- line_edit_status status = line_edit (p++, 1, ti);
- if (status > line_edit_signalled)
- {
- if (status != line_edit_pipe_full)
- i = -1;
- break;
- }
- }
- return i;
-}
-
-void __stdcall
-fhandler_pty_master::read (void *ptr, size_t& len)
-{
- len = (size_t) process_slave_output ((char *) ptr, len, pktmode);
-}
-
-int
-fhandler_pty_master::tcgetattr (struct termios *t)
-{
- *t = cygwin_shared->tty[get_unit ()]->ti;
- return 0;
-}
-
-int
-fhandler_pty_master::tcsetattr (int, const struct termios *t)
-{
- cygwin_shared->tty[get_unit ()]->ti = *t;
- return 0;
-}
-
-int
-fhandler_pty_master::tcflush (int queue)
-{
- int ret = 0;
-
- termios_printf ("tcflush(%d) handle %p", queue, get_handle ());
-
- if (queue == TCIFLUSH || queue == TCIOFLUSH)
- ret = process_slave_output (NULL, OUT_BUFFER_SIZE, 0);
- else if (queue == TCIFLUSH || queue == TCIOFLUSH)
- {
- /* do nothing for now. */
- }
-
- termios_printf ("%d=tcflush(%d)", ret, queue);
- return ret;
-}
-
-int
-fhandler_pty_master::ioctl (unsigned int cmd, void *arg)
-{
- switch (cmd)
- {
- case TIOCPKT:
- pktmode = *(int *) arg;
- break;
- case TIOCGWINSZ:
- *(struct winsize *) arg = get_ttyp ()->winsize;
- break;
- case TIOCSWINSZ:
- if (get_ttyp ()->winsize.ws_row != ((struct winsize *) arg)->ws_row
- || get_ttyp ()->winsize.ws_col != ((struct winsize *) arg)->ws_col)
- {
- get_ttyp ()->winsize = *(struct winsize *) arg;
- killsys (-get_ttyp ()->getpgid (), SIGWINCH);
- }
- break;
- case FIONBIO:
- set_nonblocking (*(int *) arg);
- break;
- default:
- set_errno (EINVAL);
- return -1;
- }
- return 0;
-}
-
-char *
-fhandler_pty_master::ptsname ()
-{
- static char buf[TTY_NAME_MAX];
-
- __small_sprintf (buf, "/dev/tty%d", get_unit ());
- return buf;
-}
-
-void
-fhandler_tty_common::set_close_on_exec (bool val)
-{
- // Cygwin processes will handle this specially on exec.
- close_on_exec (val);
-}
-
-void
-fhandler_tty_slave::fixup_after_fork (HANDLE parent)
-{
- // fork_fixup (parent, inuse, "inuse");
- // fhandler_tty_common::fixup_after_fork (parent);
- report_tty_counts (this, "inherited", "");
-}
-
-void
-fhandler_tty_slave::fixup_after_exec ()
-{
- if (!close_on_exec ())
- fixup_after_fork (NULL);
-}
-
-int
-fhandler_tty_master::init_console ()
-{
- console = (fhandler_console *) build_fh_dev (*console_dev, "/dev/ttym");
- if (console == NULL)
- return -1;
-
- console->init (INVALID_HANDLE_VALUE, GENERIC_READ | GENERIC_WRITE, O_BINARY);
- cygheap->manage_console_count ("fhandler_tty_master::init_console", -1, true);
- console->uninterruptible_io (true);
- return 0;
-}
-
-#define close_maybe(h) \
- do { \
- if (h && h != INVALID_HANDLE_VALUE) \
- CloseHandle (h); \
- } while (0)
-
-bool
-fhandler_pty_master::setup (bool ispty)
-{
- int res;
- tty& t = *cygwin_shared->tty[get_unit ()];
-
- tcinit (&t, true); /* Set termios information. Force initialization. */
-
- const char *errstr = NULL;
- DWORD pipe_mode = PIPE_NOWAIT;
-
- /* Create communication pipes */
-
- char pipename[sizeof("ttyNNNN-from-master")];
- __small_sprintf (pipename, "tty%d-from-master", get_unit ());
- res = fhandler_pipe::create_selectable (&sec_none_nih, from_master,
- get_output_handle (), 128 * 1024,
- pipename);
- if (res)
- {
- errstr = "input pipe";
- goto err;
- }
- /* Only ptys should create inheritable handles by default. ttys are
- parcelled out on an as-needed basis and handle inheritance differently. */
- if (ispty && !SetHandleInformation (get_output_handle (), HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT))
- {
- errstr = "inheritable get_output_handle ()";
- goto err;
- }
-
- if (!SetNamedPipeHandleState (get_output_handle (), &pipe_mode, NULL, NULL))
- termios_printf ("can't set output_handle(%p) to non-blocking mode",
- get_output_handle ());
-
- __small_sprintf (pipename, "tty%d-to-master", get_unit ());
- res = fhandler_pipe::create_selectable (&sec_none_nih, get_io_handle (),
- to_master, 128 * 1024, pipename);
- if (res)
- {
- errstr = "output pipe";
- goto err;
- }
- /* Only ptys should create inheritable handles by default. ttys are
- parcelled out on an as-needed basis and handle inheritance differently. */
- if (ispty && !SetHandleInformation (get_io_handle (), HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT))
- {
- errstr = "inheritable get_io_handle ()";
- goto err;
- }
-
- need_nl = 0;
-
- /* We do not allow others to open us (for handle duplication)
- but rely on cygheap->inherited_ctty for descendant processes.
- In the future the cygserver may allow access by others. */
-
-#ifdef USE_SERVER
- if (cygserver_running == CYGSERVER_UNKNOWN)
- cygserver_init ();
-#endif
-
- /* Create synchronisation events */
-
- if (!ispty)
- {
- if (!(output_done_event = t.get_event (errstr = OUTPUT_DONE_EVENT)))
- goto err;
- if (!(ioctl_done_event = t.get_event (errstr = IOCTL_DONE_EVENT)))
- goto err;
- if (!(ioctl_request_event = t.get_event (errstr = IOCTL_REQUEST_EVENT)))
- goto err;
- }
-
- if (!(input_available_event = t.get_event (errstr = INPUT_AVAILABLE_EVENT, TRUE)))
- goto err;
-
- char buf[MAX_PATH];
- errstr = shared_name (buf, OUTPUT_MUTEX, t.ntty);
- if (!(output_mutex = CreateMutex (&sec_all, FALSE, buf)))
- goto err;
-
- errstr = shared_name (buf, INPUT_MUTEX, t.ntty);
- if (!(input_mutex = CreateMutex (&sec_all, FALSE, buf)))
- goto err;
-
- t.from_master = from_master;
- t.to_master = to_master;
- // /* screws up tty master */ ProtectHandle1INH (output_mutex, output_mutex);
- // /* screws up tty master */ ProtectHandle1INH (input_mutex, input_mutex);
- t.winsize.ws_col = 80;
- t.winsize.ws_row = 25;
- t.master_pid = myself->pid;
-
- termios_printf ("tty%d opened - from_slave %p, to_slave %p", t.ntty,
- get_io_handle (), get_output_handle ());
- return true;
-
-err:
- __seterrno ();
- close_maybe (get_io_handle ());
- close_maybe (get_output_handle ());
- close_maybe (output_done_event);
- close_maybe (ioctl_done_event);
- close_maybe (ioctl_request_event);
- close_maybe (input_available_event);
- close_maybe (output_mutex);
- close_maybe (input_mutex);
- close_maybe (from_master);
- close_maybe (to_master);
- termios_printf ("tty%d open failed - failed to create %s", errstr);
- return false;
-}
-
-void
-fhandler_pty_master::fixup_after_fork (HANDLE parent)
-{
- DWORD wpid = GetCurrentProcessId ();
- fhandler_tty_master *arch = (fhandler_tty_master *) archetype;
- if (arch->dwProcessId != wpid)
- {
- tty& t = *get_ttyp ();
- if (!DuplicateHandle (parent, arch->from_master, hMainProc,
- &arch->from_master, 0, false, DUPLICATE_SAME_ACCESS))
- system_printf ("couldn't duplicate from_parent(%p), %E", arch->from_master);
- if (!DuplicateHandle (parent, arch->to_master, hMainProc,
- &arch->to_master, 0, false, DUPLICATE_SAME_ACCESS))
- system_printf ("couldn't duplicate to_parent(%p), %E", arch->from_master);
- if (myself->pid == t.master_pid)
- {
- t.from_master = arch->from_master;
- t.to_master = arch->to_master;
- }
- arch->dwProcessId = wpid;
- }
- from_master = arch->from_master;
- to_master = arch->to_master;
- report_tty_counts (this, "inherited master", "");
-}
-
-void
-fhandler_pty_master::fixup_after_exec ()
-{
- if (!close_on_exec ())
- fixup_after_fork (spawn_info->parent);
- else
- from_master = to_master = NULL;
-}
diff --git a/winsup/cygwin/fhandler_virtual.cc b/winsup/cygwin/fhandler_virtual.cc
deleted file mode 100644
index ded5902..0000000
--- a/winsup/cygwin/fhandler_virtual.cc
+++ /dev/null
@@ -1,281 +0,0 @@
-/* fhandler_virtual.cc: base fhandler class for virtual filesystems
-
- Copyright 2002, 2003, 2004, 2005, 2007 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include <sys/acl.h>
-#include <sys/statvfs.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-
-#include <dirent.h>
-
-fhandler_virtual::fhandler_virtual ():
- fhandler_base (), filebuf (NULL), bufalloc ((size_t) -1),
- fileid (-1)
-{
-}
-
-fhandler_virtual::~fhandler_virtual ()
-{
- if (filebuf)
- {
- cfree (filebuf);
- filebuf = NULL;
- }
-}
-
-void
-fhandler_virtual::fixup_after_exec ()
-{
-}
-
-DIR *
-fhandler_virtual::opendir (int fd)
-{
- DIR *dir;
- DIR *res = NULL;
- size_t len;
-
- if (exists () <= 0)
- set_errno (ENOTDIR);
- else if ((len = strlen (get_name ())) > PATH_MAX - 3)
- set_errno (ENAMETOOLONG);
- else if ((dir = (DIR *) malloc (sizeof (DIR))) == NULL)
- set_errno (ENOMEM);
- else if ((dir->__d_dirname = (char *) malloc (len + 3)) == NULL)
- {
- free (dir);
- set_errno (ENOMEM);
- }
- else if ((dir->__d_dirent =
- (struct dirent *) malloc (sizeof (struct dirent))) == NULL)
- {
- free (dir);
- set_errno (ENOMEM);
- }
- else
- {
- strcpy (dir->__d_dirname, get_name ());
- dir->__d_dirent->__d_version = __DIRENT_VERSION;
- dir->__d_cookie = __DIRENT_COOKIE;
- dir->__handle = INVALID_HANDLE_VALUE;
- dir->__d_position = 0;
- dir->__flags = 0;
-
- if (fd >= 0)
- {
- dir->__d_fd = fd;
- res = dir;
- dir->__fh = this;
- res = dir;
- }
- else
- {
- cygheap_fdnew cfd;
- if (cfd >= 0)
- {
- cfd = this;
- cfd->nohandle (true);
- dir->__d_fd = cfd;
- dir->__fh = this;
- res = dir;
- }
- }
- close_on_exec (true);
- }
-
- syscall_printf ("%p = opendir (%s)", res, get_name ());
- return res;
-}
-
-_off64_t fhandler_virtual::telldir (DIR * dir)
-{
- return dir->__d_position;
-}
-
-void
-fhandler_virtual::seekdir (DIR * dir, _off64_t loc)
-{
- dir->__flags |= dirent_saw_dot | dirent_saw_dot_dot;
- dir->__d_position = loc;
-}
-
-void
-fhandler_virtual::rewinddir (DIR * dir)
-{
- dir->__d_position = 0;
- dir->__flags |= dirent_saw_dot | dirent_saw_dot_dot;
-}
-
-int
-fhandler_virtual::closedir (DIR * dir)
-{
- return 0;
-}
-
-_off64_t
-fhandler_virtual::lseek (_off64_t offset, int whence)
-{
- /*
- * On Linux, when you lseek within a /proc file,
- * the contents of the file are updated.
- */
- if (!fill_filebuf ())
- return (_off64_t) -1;
- switch (whence)
- {
- case SEEK_SET:
- position = offset;
- break;
- case SEEK_CUR:
- position += offset;
- break;
- case SEEK_END:
- position = filesize + offset;
- break;
- default:
- set_errno (EINVAL);
- return (_off64_t) -1;
- }
- return position;
-}
-
-int
-fhandler_virtual::dup (fhandler_base * child)
-{
- int ret = fhandler_base::dup (child);
-
- if (!ret)
- {
- fhandler_virtual *fhproc_child = (fhandler_virtual *) child;
- fhproc_child->filebuf = (char *) cmalloc_abort (HEAP_BUF, filesize);
- fhproc_child->bufalloc = fhproc_child->filesize = filesize;
- fhproc_child->position = position;
- memcpy (fhproc_child->filebuf, filebuf, filesize);
- fhproc_child->set_flags (get_flags ());
- }
- return ret;
-}
-
-int
-fhandler_virtual::close ()
-{
- if (!hExeced)
- {
- if (filebuf)
- {
- cfree (filebuf);
- filebuf = NULL;
- }
- bufalloc = (size_t) -1;
- }
- return 0;
-}
-
-void
-fhandler_virtual::read (void *ptr, size_t& len)
-{
- if (len == 0)
- return;
- if (openflags & O_DIROPEN)
- {
- set_errno (EISDIR);
- len = (size_t) -1;
- return;
- }
- if (!filebuf)
- {
- len = (size_t) 0;
- return;
- }
- if ((ssize_t) len > filesize - position)
- len = (size_t) (filesize - position);
- if ((ssize_t) len < 0)
- len = 0;
- else
- memcpy (ptr, filebuf + position, len);
- position += len;
-}
-
-int
-fhandler_virtual::write (const void *ptr, size_t len)
-{
- set_errno (EACCES);
- return -1;
-}
-
-/* low-level open for all proc files */
-int
-fhandler_virtual::open (int flags, mode_t mode)
-{
- rbinary (true);
- wbinary (true);
-
- set_flags ((flags & ~O_TEXT) | O_BINARY);
-
- return 1;
-}
-
-int
-fhandler_virtual::exists ()
-{
- return 0;
-}
-
-bool
-fhandler_virtual::fill_filebuf ()
-{
- return true;
-}
-
-int
-fhandler_virtual::fchmod (mode_t mode)
-{
- /* Same as on Linux. */
- set_errno (EPERM);
- return -1;
-}
-
-int
-fhandler_virtual::fchown (__uid32_t uid, __gid32_t gid)
-{
- /* Same as on Linux. */
- set_errno (EPERM);
- return -1;
-}
-
-int
-fhandler_virtual::facl (int cmd, int nentries, __aclent32_t *aclbufp)
-{
- int res = fhandler_base::facl (cmd, nentries, aclbufp);
- if (res >= 0 && cmd == GETACL)
- {
- aclbufp[0].a_perm = (S_IRUSR | (pc.isdir () ? S_IXUSR : 0)) >> 6;
- aclbufp[1].a_perm = (S_IRGRP | (pc.isdir () ? S_IXGRP : 0)) >> 3;
- aclbufp[2].a_perm = S_IROTH | (pc.isdir () ? S_IXOTH : 0);
- }
- return res;
-}
-
-int __stdcall
-fhandler_virtual::fstatvfs (struct statvfs *sfs)
-{
- /* Virtual file system. Just return an empty buffer with a few values
- set to something useful. Just as on Linux. */
- memset (sfs, 0, sizeof (*sfs));
- sfs->f_bsize = sfs->f_frsize = 4096;
- sfs->f_namemax = NAME_MAX;
- return 0;
-}
diff --git a/winsup/cygwin/fhandler_windows.cc b/winsup/cygwin/fhandler_windows.cc
deleted file mode 100644
index 8232450..0000000
--- a/winsup/cygwin/fhandler_windows.cc
+++ /dev/null
@@ -1,144 +0,0 @@
-/* fhandler_windows.cc: code to access windows message queues.
-
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Red Hat, Inc.
-
- Written by Sergey S. Okhapkin (sos@prospect.com.ru).
- Feedback and testing by Andy Piper (andyp@parallax.co.uk).
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <wingdi.h>
-#include <winuser.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-
-/*
-The following unix-style calls are supported:
-
- open ("/dev/windows", flags, mode=0)
- - create a unix fd for message queue.
- O_NONBLOCK flag controls the read() call behavior.
-
- read (fd, buf, len)
- - return next message from queue. buf must point to MSG
- structure, len must be >= sizeof (MSG). If read is set to
- non-blocking and the queue is empty, read call returns -1
- immediately with errno set to EAGAIN, otherwise it blocks
- untill the message will be received.
-
- write (fd, buf, len)
- - send a message pointed by buf. len argument ignored.
-
- ioctl (fd, command, *param)
- - control read()/write() behavior.
- ioctl (fd, WINDOWS_POST, NULL): write() will PostMessage();
- ioctl (fd, WINDOWS_SEND, NULL): write() will SendMessage();
- ioctl (fd, WINDOWS_HWND, &hWnd): read() messages for
- hWnd window.
-
- select () call marks read fd when any message posted to queue.
-*/
-
-fhandler_windows::fhandler_windows ()
- : fhandler_base (), hWnd_ (NULL), method_ (WINDOWS_POST)
-{
-}
-
-int
-fhandler_windows::open (int flags, mode_t)
-{
- set_flags ((flags & ~O_TEXT) | O_BINARY);
- close_on_exec (true);
- set_open_status ();
- return 1;
-}
-
-int
-fhandler_windows::write (const void *buf, size_t)
-{
- MSG *ptr = (MSG *) buf;
-
- if (method_ == WINDOWS_POST)
- {
- if (!PostMessage (ptr->hwnd, ptr->message, ptr->wParam, ptr->lParam))
- {
- __seterrno ();
- return -1;
- }
- else
- return sizeof (MSG);
- }
- else
- return SendMessage (ptr->hwnd, ptr->message, ptr->wParam, ptr->lParam);
-}
-
-void __stdcall
-fhandler_windows::read (void *buf, size_t& len)
-{
- MSG *ptr = (MSG *) buf;
-
- if (len < sizeof (MSG))
- {
- set_errno (EINVAL);
- len = (size_t) -1;
- return;
- }
-
- len = (size_t) GetMessage (ptr, hWnd_, 0, 0);
-
- if ((ssize_t) len == -1)
- __seterrno ();
-}
-
-int
-fhandler_windows::ioctl (unsigned int cmd, void *val)
-{
- switch (cmd)
- {
- case WINDOWS_POST:
- case WINDOWS_SEND:
- method_ = cmd;
- break;
- case WINDOWS_HWND:
- if (val == NULL)
- {
- set_errno (EINVAL);
- return -1;
- }
- hWnd_ = * ((HWND *) val);
- break;
- default:
- set_errno (EINVAL);
- return -1;
- }
- return 0;
-}
-
-void
-fhandler_windows::set_close_on_exec (bool val)
-{
- if (get_handle ())
- fhandler_base::set_close_on_exec (val);
- else
- fhandler_base::close_on_exec (val);
- void *h = hWnd_;
- if (h)
- set_no_inheritance (h, val);
-}
-
-void
-fhandler_windows::fixup_after_fork (HANDLE parent)
-{
- if (get_handle ())
- fhandler_base::fixup_after_fork (parent);
- void *h = hWnd_;
- if (h)
- fork_fixup (parent, h, "hWnd_");
-}
diff --git a/winsup/cygwin/fhandler_zero.cc b/winsup/cygwin/fhandler_zero.cc
deleted file mode 100644
index 41d1dcd..0000000
--- a/winsup/cygwin/fhandler_zero.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-/* fhandler_dev_zero.cc: code to access /dev/zero
-
- Copyright 2000, 2001, 2002, 2003, 2004, 2005 Red Hat, Inc.
-
- Written by DJ Delorie (dj@cygnus.com)
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "security.h"
-#include "cygerrno.h"
-#include "path.h"
-#include "fhandler.h"
-
-fhandler_dev_zero::fhandler_dev_zero ()
- : fhandler_base ()
-{
-}
-
-int
-fhandler_dev_zero::open (int flags, mode_t)
-{
- set_flags ((flags & ~O_TEXT) | O_BINARY);
- nohandle (true);
- set_open_status ();
- return 1;
-}
-
-int
-fhandler_dev_zero::write (const void *, size_t len)
-{
- if (get_device () == FH_FULL)
- {
- set_errno (ENOSPC);
- return -1;
- }
- return len;
-}
-
-void __stdcall
-fhandler_dev_zero::read (void *ptr, size_t& len)
-{
- memset (ptr, 0, len);
-}
-
-_off64_t
-fhandler_dev_zero::lseek (_off64_t, int)
-{
- return 0;
-}
diff --git a/winsup/cygwin/flock.cc b/winsup/cygwin/flock.cc
deleted file mode 100644
index 42941cb..0000000
--- a/winsup/cygwin/flock.cc
+++ /dev/null
@@ -1,1504 +0,0 @@
-/* flock.cc. NT specific implementation of advisory file locking.
-
- Copyright 2003, 2008 Red Hat, Inc.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-/* The basic mechanism as well as the datastructures used in the below
- implementation are taken from the FreeBSD repository on 2008-03-18.
- The essential code of the lf_XXX functions has been taken from the
- module src/sys/kern/kern_lockf.c. It has been adapted to use NT
- global namespace subdirs and event objects for synchronization
- purposes.
-
- So, the following copyright applies to most of the code in the lf_XXX
- functions.
-
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Scooter Morris at Genentech Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ufs_lockf.c 8.3 (Berkeley) 1/6/94
-*/
-
-/*
- * The flock() function is based upon source taken from the Red Hat
- * implementation used in their imap-2002d SRPM.
- *
- * $RH: flock.c,v 1.2 2000/08/23 17:07:00 nalin Exp $
- */
-
-/* The lockf function is based upon FreeBSD sources with the following
- * copyright.
- *
- * Copyright (c) 1997 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Klaus Klein.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * $NetBSD: lockf.c,v 1.1 1997/12/20 20:23:18 kleink Exp $
-*/
-
-#include "winsup.h"
-#include <assert.h>
-#include <sys/file.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "shared_info.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "pinfo.h"
-#include "sigproc.h"
-#include "cygtls.h"
-#include "tls_pbuf.h"
-#include "ntdll.h"
-#include <sys/queue.h>
-#include <wchar.h>
-
-#define F_WAIT 0x10 /* Wait until lock is granted */
-#define F_FLOCK 0x20 /* Use flock(2) semantics for lock */
-#define F_POSIX 0x40 /* Use POSIX semantics for lock */
-
-#ifndef OFF_MAX
-#define OFF_MAX LLONG_MAX
-#endif
-
-static NO_COPY muto lockf_guard;
-
-#define INODE_LIST_LOCK() (lockf_guard.init ("lockf_guard")->acquire ())
-#define INODE_LIST_UNLOCK() (lockf_guard.release ())
-
-#define LOCK_OBJ_NAME_LEN 64
-
-#define FLOCK_INODE_DIR_ACCESS (DIRECTORY_QUERY \
- | DIRECTORY_TRAVERSE \
- | DIRECTORY_CREATE_OBJECT \
- | READ_CONTROL)
-
-#define FLOCK_EVENT_ACCESS (EVENT_QUERY_STATE \
- | SYNCHRONIZE \
- | READ_CONTROL)
-
-/* This function takes the own process security descriptor DACL and adds
- SYNCHRONIZE permissions for everyone. This allows all processes
- to wait for this process to die when blocking in a F_SETLKW on a lock
- which is hold by this process. */
-static void
-allow_others_to_sync ()
-{
- static NO_COPY bool done;
-
- if (done)
- return;
-
- NTSTATUS status;
- PACL dacl;
- LPVOID ace;
- ULONG len;
-
- /* Get this process DACL. We use a temporary path buffer in TLS space
- to avoid having to alloc 64K from the stack. */
- tmp_pathbuf tp;
- PSECURITY_DESCRIPTOR sd = (PSECURITY_DESCRIPTOR) tp.w_get ();
- status = NtQuerySecurityObject (hMainProc, DACL_SECURITY_INFORMATION, sd,
- NT_MAX_PATH * sizeof (WCHAR), &len);
- if (!NT_SUCCESS (status))
- {
- debug_printf ("NtQuerySecurityObject: %p", status);
- return;
- }
- /* Create a valid dacl pointer and set it's size to be as big as
- there's room in the temporary buffer. Note that the descriptor
- is in self-relative format. */
- dacl = (PACL) ((char *) sd + (uintptr_t) sd->Dacl);
- dacl->AclSize = NT_MAX_PATH * sizeof (WCHAR) - ((char *) dacl - (char *) sd);
- /* Allow everyone to SYNCHRONIZE with this process. */
- if (!AddAccessAllowedAce (dacl, ACL_REVISION, SYNCHRONIZE,
- well_known_world_sid))
- {
- debug_printf ("AddAccessAllowedAce: %lu", GetLastError ());
- return;
- }
- /* Set the size of the DACL correctly. */
- if (!FindFirstFreeAce (dacl, &ace))
- {
- debug_printf ("FindFirstFreeAce: %lu", GetLastError ());
- return;
- }
- dacl->AclSize = (char *) ace - (char *) dacl;
- /* Write the DACL back. */
- status = NtSetSecurityObject (hMainProc, DACL_SECURITY_INFORMATION, sd);
- if (!NT_SUCCESS (status))
- {
- debug_printf ("NtSetSecurityObject: %p", status);
- return;
- }
- done = true;
-}
-
-/* Get the handle count of an object. */
-static ULONG
-get_obj_handle_count (HANDLE h)
-{
- OBJECT_BASIC_INFORMATION obi;
- NTSTATUS status;
- ULONG hdl_cnt = 0;
-
- status = NtQueryObject (h, ObjectBasicInformation, &obi, sizeof obi, NULL);
- if (!NT_SUCCESS (status))
- debug_printf ("NtQueryObject: %p\n", status);
- else
- hdl_cnt = obi.HandleCount;
- return hdl_cnt;
-}
-
-/* Per lock class. */
-class lockf_t
-{
- public:
- short lf_flags; /* Semantics: F_POSIX, F_FLOCK, F_WAIT */
- short lf_type; /* Lock type: F_RDLCK, F_WRLCK */
- _off64_t lf_start; /* Byte # of the start of the lock */
- _off64_t lf_end; /* Byte # of the end of the lock (-1=EOF) */
- long long lf_id; /* Cygwin PID for POSIX locks, a unique id per
- file table entry for BSD flock locks. */
- DWORD lf_wid; /* Win PID of the resource holding the lock */
- class lockf_t **lf_head; /* Back pointer to the head of the lockf_t list */
- class inode_t *lf_inode; /* Back pointer to the inode_t */
- class lockf_t *lf_next; /* Pointer to the next lock on this inode_t */
- HANDLE lf_obj; /* Handle to the lock event object. */
-
- lockf_t ()
- : lf_flags (0), lf_type (0), lf_start (0), lf_end (0), lf_id (0),
- lf_wid (0), lf_head (NULL), lf_inode (NULL),
- lf_next (NULL), lf_obj (NULL)
- {}
- lockf_t (class inode_t *node, class lockf_t **head, short flags, short type,
- _off64_t start, _off64_t end, long long id, DWORD wid)
- : lf_flags (flags), lf_type (type), lf_start (start), lf_end (end),
- lf_id (id), lf_wid (wid), lf_head (head), lf_inode (node),
- lf_next (NULL), lf_obj (NULL)
- {}
- ~lockf_t ();
-
- /* Used to create all locks list in a given TLS buffer. */
- void *operator new (size_t size, void *p)
- { return p; }
- /* Used to store own lock list in the cygheap. */
- void *operator new (size_t size)
- { return cmalloc (HEAP_FHANDLER, sizeof (lockf_t)); }
- /* Never call on node->i_all_lf! */
- void operator delete (void *p)
- { cfree (p); }
-
- void create_lock_obj ();
- bool open_lock_obj ();
- void del_lock_obj (HANDLE fhdl, bool signal = false);
-};
-
-/* Per inode_t class */
-class inode_t
-{
- friend class lockf_t;
-
- public:
- LIST_ENTRY (inode_t) i_next;
- lockf_t *i_lockf; /* List of locks of this process. */
- lockf_t *i_all_lf; /* Temp list of all locks for this file. */
-
- __dev32_t i_dev; /* Device ID */
- __ino64_t i_ino; /* inode number */
-
- private:
- HANDLE i_dir;
- HANDLE i_mtx;
-
- public:
- inode_t (__dev32_t dev, __ino64_t ino);
- ~inode_t ();
-
- void *operator new (size_t size)
- { return cmalloc (HEAP_FHANDLER, sizeof (inode_t)); }
- void operator delete (void *p)
- { cfree (p); }
-
- static inode_t *get (__dev32_t dev, __ino64_t ino, bool create_if_missing);
-
- void LOCK () { WaitForSingleObject (i_mtx, INFINITE); }
- void UNLOCK () { ReleaseMutex (i_mtx); }
-
- lockf_t *get_all_locks_list ();
-
- bool del_my_locks (long long id, HANDLE fhdl);
-};
-
-inode_t::~inode_t ()
-{
- lockf_t *lock, *n_lock;
- for (lock = i_lockf; lock && (n_lock = lock->lf_next, 1); lock = n_lock)
- delete lock;
- NtClose (i_mtx);
- NtClose (i_dir);
-}
-
-bool
-inode_t::del_my_locks (long long id, HANDLE fhdl)
-{
- lockf_t *lock, *n_lock;
- lockf_t **prev = &i_lockf;
- int lc = 0;
- for (lock = *prev; lock && (n_lock = lock->lf_next, 1); lock = n_lock)
- {
- if (lock->lf_flags & F_POSIX)
- {
- /* Delete all POSIX locks. */
- *prev = n_lock;
- ++lc;
- delete lock;
- }
- else if (id && lock->lf_id == id)
- {
- int cnt = 0;
- cygheap_fdenum cfd (true);
- while (cfd.next () >= 0)
- if (cfd->get_unique_id () == lock->lf_id && ++cnt > 1)
- break;
- /* Delete BSD flock lock when no other fd in this process references
- it anymore. */
- if (cnt <= 1)
- {
- *prev = n_lock;
- lock->del_lock_obj (fhdl);
- delete lock;
- }
- }
- else
- prev = &lock->lf_next;
- }
- return i_lockf == NULL;
-}
-
-/* Used to delete the locks on a file hold by this process. Called from
- close(2) and fixup_after_fork, as well as from fixup_after_exec in
- case the close_on_exec flag is set. The whole inode is deleted as
- soon as no lock exists on it anymore. */
-void
-fhandler_base::del_my_locks (bool after_fork)
-{
- INODE_LIST_LOCK ();
- inode_t *node = inode_t::get (get_dev (), get_ino (), false);
- if (node)
- {
- bool no_locks_left =
- node->del_my_locks (after_fork ? 0 : get_unique_id (), get_handle ());
- if (no_locks_left)
- {
- LIST_REMOVE (node, i_next);
- node->UNLOCK ();
- delete node;
- }
- else
- node->UNLOCK ();
- }
- INODE_LIST_UNLOCK ();
-}
-
-/* Called in an execed child. The exec'ed process must allow SYNCHRONIZE
- access to everyone if at least one inode exists.
- The lock owner's Windows PID changed and all POSIX lock event objects
- have to be relabeled so that waiting processes know which process to
- wait on. If the node has been abandoned due to close_on_exec on the
- referencing fhandlers, remove the inode entirely. */
-void
-fixup_lockf_after_exec ()
-{
- inode_t *node, *next_node;
-
- INODE_LIST_LOCK ();
- if (LIST_FIRST (&cygheap->inode_list))
- allow_others_to_sync ();
- LIST_FOREACH_SAFE (node, &cygheap->inode_list, i_next, next_node)
- {
- int cnt = 0;
- cygheap_fdenum cfd (true);
- while (cfd.next () >= 0)
- if (cfd->get_dev () == node->i_dev
- && cfd->get_ino () == node->i_ino
- && ++cnt > 1)
- break;
- if (cnt == 0)
- {
- LIST_REMOVE (node, i_next);
- delete node;
- }
- else
- {
- node->LOCK ();
- for (lockf_t *lock = node->i_lockf; lock; lock = lock->lf_next)
- if (lock->lf_flags & F_POSIX)
- {
- lock->del_lock_obj (NULL);
- lock->lf_wid = myself->dwProcessId;
- lock->create_lock_obj ();
- }
- node->UNLOCK ();
- }
- }
- INODE_LIST_UNLOCK ();
-}
-
-/* static method to return a pointer to the inode_t structure for a specific
- file. The file is specified by the device and inode_t number. If inode_t
- doesn't exist, create it. */
-inode_t *
-inode_t::get (__dev32_t dev, __ino64_t ino, bool create_if_missing)
-{
- inode_t *node;
-
- INODE_LIST_LOCK ();
- LIST_FOREACH (node, &cygheap->inode_list, i_next)
- if (node->i_dev == dev && node->i_ino == ino)
- break;
- if (!node && create_if_missing)
- {
- node = new inode_t (dev, ino);
- if (node)
- LIST_INSERT_HEAD (&cygheap->inode_list, node, i_next);
- }
- if (node)
- node->LOCK ();
- INODE_LIST_UNLOCK ();
- return node;
-}
-
-inode_t::inode_t (__dev32_t dev, __ino64_t ino)
-: i_lockf (NULL), i_all_lf (NULL), i_dev (dev), i_ino (ino)
-{
- HANDLE parent_dir;
- WCHAR name[48];
- UNICODE_STRING uname;
- OBJECT_ATTRIBUTES attr;
- NTSTATUS status;
-
- parent_dir = get_shared_parent_dir ();
- /* Create a subdir which is named after the device and inode_t numbers
- of the given file, in hex notation. */
- int len = __small_swprintf (name, L"flock-%08x-%016X", dev, ino);
- RtlInitCountedUnicodeString (&uname, name, len * sizeof (WCHAR));
- InitializeObjectAttributes (&attr, &uname, OBJ_INHERIT | OBJ_OPENIF,
- parent_dir, everyone_sd (FLOCK_INODE_DIR_ACCESS));
- status = NtCreateDirectoryObject (&i_dir, FLOCK_INODE_DIR_ACCESS, &attr);
- if (!NT_SUCCESS (status))
- api_fatal ("NtCreateDirectoryObject(inode): %p", status);
- /* Create a mutex object in the file specific dir, which is used for
- access synchronization on the dir and its objects. */
- RtlInitUnicodeString (&uname, L"mtx");
- InitializeObjectAttributes (&attr, &uname, OBJ_INHERIT | OBJ_OPENIF, i_dir,
- everyone_sd (CYG_MUTANT_ACCESS));
- status = NtCreateMutant (&i_mtx, CYG_MUTANT_ACCESS, &attr, FALSE);
- if (!NT_SUCCESS (status))
- api_fatal ("NtCreateMutant(inode): %p", status);
-}
-
-/* Enumerate all lock event objects for this file and create a lockf_t
- list in the i_all_lf member. This list is searched in lf_getblock
- for locks which potentially block our lock request. */
-
-/* Number of lockf_t structs which fit in the temporary buffer. */
-#define MAX_LOCKF_CNT ((intptr_t)((NT_MAX_PATH * sizeof (WCHAR)) \
- / sizeof (lockf_t)))
-
-lockf_t *
-inode_t::get_all_locks_list ()
-{
- struct fdbi
- {
- DIRECTORY_BASIC_INFORMATION dbi;
- WCHAR buf[2][NAME_MAX + 1];
- } f;
- ULONG context;
- NTSTATUS status;
- lockf_t *lock = i_all_lf;
-
- for (BOOLEAN restart = TRUE;
- NT_SUCCESS (status = NtQueryDirectoryObject (i_dir, &f, sizeof f, TRUE,
- restart, &context, NULL));
- restart = FALSE)
- {
- if (f.dbi.ObjectName.Length != LOCK_OBJ_NAME_LEN * sizeof (WCHAR))
- continue;
- wchar_t *wc = f.dbi.ObjectName.Buffer, *endptr;
- /* "%02x-%01x-%016X-%016X-%016X-%08x",
- lf_flags, lf_type, lf_start, lf_end, lf_id, lf_wid */
- wc[LOCK_OBJ_NAME_LEN] = L'\0';
- short flags = wcstol (wc, &endptr, 16);
- if ((flags & ~(F_FLOCK | F_POSIX)) != 0
- || ((flags & (F_FLOCK | F_POSIX)) == (F_FLOCK | F_POSIX)))
- continue;
- short type = wcstol (endptr + 1, &endptr, 16);
- if ((type != F_RDLCK && type != F_WRLCK) || !endptr || *endptr != L'-')
- continue;
- _off64_t start = (_off64_t) wcstoull (endptr + 1, &endptr, 16);
- if (start < 0 || !endptr || *endptr != L'-')
- continue;
- _off64_t end = (_off64_t) wcstoull (endptr + 1, &endptr, 16);
- if (end < -1LL || (end > 0 && end < start) || !endptr || *endptr != L'-')
- continue;
- long long id = wcstoll (endptr + 1, &endptr, 16);
- if (!endptr || *endptr != L'-'
- || ((flags & F_POSIX) && (id < 1 || id > ULONG_MAX)))
- continue;
- DWORD wid = wcstoul (endptr + 1, &endptr, 16);
- if (endptr && *endptr != L'\0')
- continue;
- if (lock - i_all_lf >= MAX_LOCKF_CNT)
- {
- system_printf ("Warning, can't handle more than %d locks per file.",
- MAX_LOCKF_CNT);
- break;
- }
- if (lock > i_all_lf)
- lock[-1].lf_next = lock;
- new (lock++) lockf_t (this, &i_all_lf, flags, type, start, end, id, wid);
- }
- /* If no lock has been found, return NULL. */
- if (lock == i_all_lf)
- return NULL;
- return i_all_lf;
-}
-
-/* Create the lock event object in the file's subdir in the NT global
- namespace. The name is constructed from the lock properties which
- identify it uniquely, all values in hex. See the __small_swprintf
- call right at the start. */
-void
-lockf_t::create_lock_obj ()
-{
- WCHAR name[LOCK_OBJ_NAME_LEN + 1];
- UNICODE_STRING uname;
- OBJECT_ATTRIBUTES attr;
- NTSTATUS status;
-
- __small_swprintf (name, L"%02x-%01x-%016X-%016X-%016X-%08x",
- lf_flags & (F_POSIX | F_FLOCK), lf_type, lf_start,
- lf_end, lf_id, lf_wid);
- RtlInitCountedUnicodeString (&uname, name,
- LOCK_OBJ_NAME_LEN * sizeof (WCHAR));
- InitializeObjectAttributes (&attr, &uname, OBJ_INHERIT, lf_inode->i_dir,
- everyone_sd (FLOCK_EVENT_ACCESS));
- status = NtCreateEvent (&lf_obj, CYG_EVENT_ACCESS, &attr,
- NotificationEvent, FALSE);
- if (!NT_SUCCESS (status))
- api_fatal ("NtCreateEvent(lock): %p", status);
-}
-
-/* Open a lock event object for SYNCHRONIZE access (to wait for it). */
-bool
-lockf_t::open_lock_obj ()
-{
- WCHAR name[LOCK_OBJ_NAME_LEN + 1];
- UNICODE_STRING uname;
- OBJECT_ATTRIBUTES attr;
- NTSTATUS status;
-
- __small_swprintf (name, L"%02x-%01x-%016X-%016X-%016X-%08x",
- lf_flags & (F_POSIX | F_FLOCK), lf_type, lf_start,
- lf_end, lf_id, lf_wid);
- RtlInitCountedUnicodeString (&uname, name,
- LOCK_OBJ_NAME_LEN * sizeof (WCHAR));
- InitializeObjectAttributes (&attr, &uname, 0, lf_inode->i_dir, NULL);
- status = NtOpenEvent (&lf_obj, FLOCK_EVENT_ACCESS, &attr);
- if (!NT_SUCCESS (status))
- {
- SetLastError (RtlNtStatusToDosError (status));
- lf_obj = NULL; /* Paranoia... */
- }
- return lf_obj != NULL;
-}
-
-/* Close a lock event handle. The important thing here is to signal it
- before closing the handle. This way all threads waiting for this
- lock can wake up. */
-void
-lockf_t::del_lock_obj (HANDLE fhdl, bool signal)
-{
- if (lf_obj)
- {
- /* Only signal the event if it's either a POSIX lock, or, in case of
- BSD flock locks, if it's an explicit unlock or if the calling fhandler
- holds the last reference to the file table entry. The file table
- entry in UNIX terms is equivalent to the FILE_OBJECT in Windows NT
- terms. It's what the handle/descriptor references when calling
- CreateFile/open. Calling DuplicateHandle/dup only creates a new
- handle/descriptor to the same FILE_OBJECT/file table entry. */
- if ((lf_flags & F_POSIX) || signal
- || (fhdl && get_obj_handle_count (fhdl) <= 1))
- SetEvent (lf_obj);
- NtClose (lf_obj);
- lf_obj = NULL;
- }
-}
-
-lockf_t::~lockf_t ()
-{
- del_lock_obj (NULL);
-}
-
-/*
- * This variable controls the maximum number of processes that will
- * be checked in doing deadlock detection.
- */
-#ifndef __CYGWIN__
-#define MAXDEPTH 50
-static int maxlockdepth = MAXDEPTH;
-#endif
-
-#define NOLOCKF (struct lockf_t *)0
-#define SELF 0x1
-#define OTHERS 0x2
-static int lf_clearlock (lockf_t *, lockf_t **, HANDLE);
-static int lf_findoverlap (lockf_t *, lockf_t *, int, lockf_t ***, lockf_t **);
-static lockf_t *lf_getblock (lockf_t *, inode_t *node);
-static int lf_getlock (lockf_t *, inode_t *, struct __flock64 *);
-static int lf_setlock (lockf_t *, inode_t *, lockf_t **, HANDLE);
-static void lf_split (lockf_t *, lockf_t *, lockf_t **);
-static void lf_wakelock (lockf_t *, HANDLE);
-
-int
-fhandler_disk_file::lock (int a_op, struct __flock64 *fl)
-{
- _off64_t start, end, oadd;
- lockf_t *n;
- int error = 0;
-
- short a_flags = fl->l_type & (F_POSIX | F_FLOCK);
- short type = fl->l_type & (F_RDLCK | F_WRLCK | F_UNLCK);
-
- if (!a_flags)
- a_flags = F_POSIX; /* default */
- if (a_op == F_SETLKW)
- {
- a_op = F_SETLK;
- a_flags |= F_WAIT;
- }
- if (a_op == F_SETLK)
- switch (type)
- {
- case F_UNLCK:
- a_op = F_UNLCK;
- break;
- case F_RDLCK:
- if (!(get_access () & GENERIC_READ))
- {
- set_errno (EBADF);
- return -1;
- }
- break;
- case F_WRLCK:
- if (!(get_access () & GENERIC_WRITE))
- {
- set_errno (EBADF);
- return -1;
- }
- break;
- default:
- set_errno (EINVAL);
- return -1;
- }
-
- /*
- * Convert the flock structure into a start and end.
- */
- switch (fl->l_whence)
- {
- case SEEK_SET:
- start = fl->l_start;
- break;
-
- case SEEK_CUR:
- if ((start = lseek (0, SEEK_CUR)) == ILLEGAL_SEEK)
- return -1;
- break;
-
- case SEEK_END:
- {
- NTSTATUS status;
- IO_STATUS_BLOCK io;
- FILE_STANDARD_INFORMATION fsi;
-
- status = NtQueryInformationFile (get_handle (), &io, &fsi, sizeof fsi,
- FileStandardInformation);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- return -1;
- }
- if (fl->l_start > 0 && fsi.EndOfFile.QuadPart > OFF_MAX - fl->l_start)
- {
- set_errno (EOVERFLOW);
- return -1;
- }
- start = fsi.EndOfFile.QuadPart + fl->l_start;
- }
- break;
-
- default:
- return (EINVAL);
- }
- if (start < 0)
- {
- set_errno (EINVAL);
- return -1;
- }
- if (fl->l_len < 0)
- {
- if (start == 0)
- {
- set_errno (EINVAL);
- return -1;
- }
- end = start - 1;
- start += fl->l_len;
- if (start < 0)
- {
- set_errno (EINVAL);
- return -1;
- }
- }
- else if (fl->l_len == 0)
- end = -1;
- else
- {
- oadd = fl->l_len - 1;
- if (oadd > OFF_MAX - start)
- {
- set_errno (EOVERFLOW);
- return -1;
- }
- end = start + oadd;
- }
-
- inode_t *node = inode_t::get (get_dev (), get_ino (), true);
- if (!node)
- {
- set_errno (ENOLCK);
- return -1;
- }
- need_fork_fixup (true);
-
- /* Unlock the fd table which has been locked in fcntl_worker/lock_worker,
- otherwise a blocking F_SETLKW never wakes up on a signal. */
- cygheap->fdtab.unlock ();
-
- lockf_t **head = &node->i_lockf;
-
- /*
- * Avoid the common case of unlocking when inode_t has no locks.
- */
- if (*head == NULL)
- {
- if (a_op != F_SETLK)
- {
- node->UNLOCK ();
- fl->l_type = F_UNLCK;
- return 0;
- }
- }
- /*
- * Allocate a spare structure in case we have to split.
- */
- lockf_t *clean = NULL;
- if (a_op == F_SETLK || a_op == F_UNLCK)
- {
- clean = new lockf_t ();
- if (!clean)
- {
- node->UNLOCK ();
- set_errno (ENOLCK);
- return -1;
- }
- }
- /*
- * Create the lockf_t structure
- */
- lockf_t *lock = new lockf_t (node, head, a_flags, type, start, end,
- (a_flags & F_FLOCK) ? get_unique_id ()
- : getpid (),
- myself->dwProcessId);
- if (!lock)
- {
- node->UNLOCK ();
- set_errno (ENOLCK);
- return -1;
- }
-
- switch (a_op)
- {
- case F_SETLK:
- error = lf_setlock (lock, node, &clean, get_handle ());
- break;
-
- case F_UNLCK:
- error = lf_clearlock (lock, &clean, get_handle ());
- lock->lf_next = clean;
- clean = lock;
- break;
-
- case F_GETLK:
- error = lf_getlock (lock, node, fl);
- lock->lf_next = clean;
- clean = lock;
- break;
-
- default:
- lock->lf_next = clean;
- clean = lock;
- error = EINVAL;
- break;
- }
- for (lock = clean; lock != NULL; )
- {
- n = lock->lf_next;
- lock->del_lock_obj (get_handle (), a_op == F_UNLCK);
- delete lock;
- lock = n;
- }
- if (node->i_lockf == NULL)
- {
- INODE_LIST_LOCK ();
- LIST_REMOVE (node, i_next);
- node->UNLOCK ();
- delete node;
- INODE_LIST_UNLOCK ();
- }
- else
- node->UNLOCK ();
- if (error)
- {
- set_errno (error);
- return -1;
- }
- return 0;
-}
-
-/*
- * Set a byte-range lock.
- */
-static int
-lf_setlock (lockf_t *lock, inode_t *node, lockf_t **clean, HANDLE fhdl)
-{
- lockf_t *block;
- lockf_t **head = lock->lf_head;
- lockf_t **prev, *overlap;
- int ovcase, priority, old_prio, needtolink;
- tmp_pathbuf tp;
-
- /*
- * Set the priority
- */
- priority = old_prio = GetThreadPriority (GetCurrentThread ());
- if (lock->lf_type == F_WRLCK && priority <= THREAD_PRIORITY_ABOVE_NORMAL)
- priority = THREAD_PRIORITY_HIGHEST;
- /*
- * Scan lock list for this file looking for locks that would block us.
- */
- /* Create temporary space for the all locks list. */
- node->i_all_lf = (lockf_t *) tp.w_get ();
- while ((block = lf_getblock(lock, node)))
- {
- DWORD ret;
- HANDLE obj = block->lf_obj;
- block->lf_obj = NULL;
-
- /*
- * Free the structure and return if nonblocking.
- */
- if ((lock->lf_flags & F_WAIT) == 0)
- {
- lock->lf_next = *clean;
- *clean = lock;
- if (obj)
- NtClose (obj);
- return EAGAIN;
- }
- /*
- * We are blocked. Since flock style locks cover
- * the whole file, there is no chance for deadlock.
- * For byte-range locks we must check for deadlock.
- *
- * Deadlock detection is done by looking through the
- * wait channels to see if there are any cycles that
- * involve us. MAXDEPTH is set just to make sure we
- * do not go off into neverland.
- */
- /* FIXME: We check the handle count of all the lock event objects
- this process holds. If it's > 1, another process is
- waiting for one of our locks. This method isn't overly
- intelligent. If it turns out to be too dumb, we might
- have to remove it or to find another method. */
- for (lockf_t *lk = node->i_lockf; lk; lk = lk->lf_next)
- if ((lk->lf_flags & F_POSIX) && get_obj_handle_count (lk->lf_obj) > 1)
- {
- if (obj)
- NtClose (obj);
- return EDEADLK;
- }
-
- /*
- * For flock type locks, we must first remove
- * any shared locks that we hold before we sleep
- * waiting for an exclusive lock.
- */
- if ((lock->lf_flags & F_FLOCK) && lock->lf_type == F_WRLCK)
- {
- lock->lf_type = F_UNLCK;
- (void) lf_clearlock (lock, clean, fhdl);
- lock->lf_type = F_WRLCK;
- }
-
- /*
- * Add our lock to the blocked list and sleep until we're free.
- * Remember who blocked us (for deadlock detection).
- */
- /* Cygwin: No locked list. See deadlock recognition above. */
-
- /* Wait for the blocking object and its holding process. */
- if (!obj)
- {
- /* We can't synchronize on the lock event object.
- Treat this as a deadlock-like situation for now. */
- system_printf ("Can't sync with lock object hold by "
- "Win32 pid %lu: %E", block->lf_wid);
- return EDEADLK;
- }
- SetThreadPriority (GetCurrentThread (), priority);
- if (lock->lf_flags & F_POSIX)
- {
- HANDLE proc = OpenProcess (SYNCHRONIZE, FALSE, block->lf_wid);
- if (!proc)
- {
- /* If we can't synchronize on the process holding the lock,
- we will never recognize when the lock has been abandoned.
- Treat this as a deadlock-like situation for now. */
- system_printf ("Can't sync with process holding a lock "
- "(Win32 pid %lu): %E", block->lf_wid);
- NtClose (obj);
- return EDEADLK;
- }
- HANDLE w4[3] = { obj, proc, signal_arrived };
- node->UNLOCK ();
- ret = WaitForMultipleObjects (3, w4, FALSE, INFINITE);
- CloseHandle (proc);
- }
- else
- {
- HANDLE w4[2] = { obj, signal_arrived };
- node->UNLOCK ();
- /* Unfortunately, since BSD flock locks are not attached to a
- specific process, we can't recognize an abandoned lock by
- sync'ing with a process. We have to find out if we're the only
- process left accessing this event object. */
- do
- {
- ret = WaitForMultipleObjects (2, w4, FALSE, 100L);
- }
- while (ret == WAIT_TIMEOUT && get_obj_handle_count (obj) > 1);
- }
- node->LOCK ();
- NtClose (obj);
- SetThreadPriority (GetCurrentThread (), old_prio);
- switch (ret)
- {
- case WAIT_OBJECT_0:
- /* The lock object has been set to signalled. */
- break;
- case WAIT_OBJECT_0 + 1:
- /* For POSIX locks, the process holding the lock has exited. */
- if (lock->lf_flags & F_POSIX)
- break;
- /*FALLTHRU*/
- case WAIT_OBJECT_0 + 2:
- /* A signal came in. */
- _my_tls.call_signal_handler ();
- return EINTR;
- default:
- return geterrno_from_win_error ();
- }
- }
- allow_others_to_sync ();
- /*
- * No blocks!! Add the lock. Note that we will
- * downgrade or upgrade any overlapping locks this
- * process already owns.
- *
- * Handle any locks that overlap.
- */
- prev = head;
- block = *head;
- needtolink = 1;
- for (;;)
- {
- ovcase = lf_findoverlap (block, lock, SELF, &prev, &overlap);
- if (ovcase)
- block = overlap->lf_next;
- /*
- * Six cases:
- * 0) no overlap
- * 1) overlap == lock
- * 2) overlap contains lock
- * 3) lock contains overlap
- * 4) overlap starts before lock
- * 5) overlap ends after lock
- */
- switch (ovcase)
- {
- case 0: /* no overlap */
- if (needtolink)
- {
- *prev = lock;
- lock->lf_next = overlap;
- lock->create_lock_obj ();
- }
- break;
-
- case 1: /* overlap == lock */
- /*
- * If downgrading lock, others may be
- * able to acquire it.
- * Cygwin: Always wake lock.
- */
- lf_wakelock (overlap, fhdl);
- overlap->lf_type = lock->lf_type;
- overlap->create_lock_obj ();
- lock->lf_next = *clean;
- *clean = lock;
- break;
-
- case 2: /* overlap contains lock */
- /*
- * Check for common starting point and different types.
- */
- if (overlap->lf_type == lock->lf_type)
- {
- lock->lf_next = *clean;
- *clean = lock;
- break;
- }
- if (overlap->lf_start == lock->lf_start)
- {
- *prev = lock;
- lock->lf_next = overlap;
- overlap->lf_start = lock->lf_end + 1;
- }
- else
- lf_split (overlap, lock, clean);
- lf_wakelock (overlap, fhdl);
- overlap->create_lock_obj ();
- lock->create_lock_obj ();
- if (lock->lf_next && !lock->lf_next->lf_obj)
- lock->lf_next->create_lock_obj ();
- break;
-
- case 3: /* lock contains overlap */
- /*
- * If downgrading lock, others may be able to
- * acquire it, otherwise take the list.
- * Cygwin: Always wake old lock and create new lock.
- */
- lf_wakelock (overlap, fhdl);
- /*
- * Add the new lock if necessary and delete the overlap.
- */
- if (needtolink)
- {
- *prev = lock;
- lock->lf_next = overlap->lf_next;
- prev = &lock->lf_next;
- lock->create_lock_obj ();
- needtolink = 0;
- }
- else
- *prev = overlap->lf_next;
- overlap->lf_next = *clean;
- *clean = overlap;
- continue;
-
- case 4: /* overlap starts before lock */
- /*
- * Add lock after overlap on the list.
- */
- lock->lf_next = overlap->lf_next;
- overlap->lf_next = lock;
- overlap->lf_end = lock->lf_start - 1;
- prev = &lock->lf_next;
- lf_wakelock (overlap, fhdl);
- overlap->create_lock_obj ();
- lock->create_lock_obj ();
- needtolink = 0;
- continue;
-
- case 5: /* overlap ends after lock */
- /*
- * Add the new lock before overlap.
- */
- if (needtolink) {
- *prev = lock;
- lock->lf_next = overlap;
- }
- overlap->lf_start = lock->lf_end + 1;
- lf_wakelock (overlap, fhdl);
- lock->create_lock_obj ();
- overlap->create_lock_obj ();
- break;
- }
- break;
- }
- return 0;
-}
-
-/*
- * Remove a byte-range lock on an inode_t.
- *
- * Generally, find the lock (or an overlap to that lock)
- * and remove it (or shrink it), then wakeup anyone we can.
- */
-static int
-lf_clearlock (lockf_t *unlock, lockf_t **clean, HANDLE fhdl)
-{
- lockf_t **head = unlock->lf_head;
- lockf_t *lf = *head;
- lockf_t *overlap, **prev;
- int ovcase;
-
- if (lf == NOLOCKF)
- return 0;
- prev = head;
- while ((ovcase = lf_findoverlap (lf, unlock, SELF, &prev, &overlap)))
- {
- /*
- * Wakeup the list of locks to be retried.
- */
- lf_wakelock (overlap, fhdl);
-
- switch (ovcase)
- {
- case 1: /* overlap == lock */
- *prev = overlap->lf_next;
- overlap->lf_next = *clean;
- *clean = overlap;
- break;
-
- case 2: /* overlap contains lock: split it */
- if (overlap->lf_start == unlock->lf_start)
- {
- overlap->lf_start = unlock->lf_end + 1;
- overlap->create_lock_obj ();
- break;
- }
- lf_split (overlap, unlock, clean);
- overlap->lf_next = unlock->lf_next;
- overlap->create_lock_obj ();
- if (overlap->lf_next && !overlap->lf_next->lf_obj)
- overlap->lf_next->create_lock_obj ();
- break;
-
- case 3: /* lock contains overlap */
- *prev = overlap->lf_next;
- lf = overlap->lf_next;
- overlap->lf_next = *clean;
- *clean = overlap;
- continue;
-
- case 4: /* overlap starts before lock */
- overlap->lf_end = unlock->lf_start - 1;
- prev = &overlap->lf_next;
- lf = overlap->lf_next;
- overlap->create_lock_obj ();
- continue;
-
- case 5: /* overlap ends after lock */
- overlap->lf_start = unlock->lf_end + 1;
- overlap->create_lock_obj ();
- break;
- }
- break;
- }
- return 0;
-}
-
-/*
- * Check whether there is a blocking lock,
- * and if so return its process identifier.
- */
-static int
-lf_getlock (lockf_t *lock, inode_t *node, struct __flock64 *fl)
-{
- lockf_t *block;
- tmp_pathbuf tp;
-
- /* Create temporary space for the all locks list. */
- node->i_all_lf = (lockf_t *) tp.w_get ();
- if ((block = lf_getblock (lock, node)))
- {
- if (block->lf_obj)
- NtClose (block->lf_obj);
- fl->l_type = block->lf_type;
- fl->l_whence = SEEK_SET;
- fl->l_start = block->lf_start;
- if (block->lf_end == -1)
- fl->l_len = 0;
- else
- fl->l_len = block->lf_end - block->lf_start + 1;
- if (block->lf_flags & F_POSIX)
- fl->l_pid = (pid_t) block->lf_id;
- else
- fl->l_pid = -1;
- }
- else
- fl->l_type = F_UNLCK;
- return 0;
-}
-
-/*
- * Walk the list of locks for an inode_t and
- * return the first blocking lock.
- */
-static lockf_t *
-lf_getblock (lockf_t *lock, inode_t *node)
-{
- lockf_t **prev, *overlap;
- lockf_t *lf = node->get_all_locks_list ();
- int ovcase;
- NTSTATUS status;
- EVENT_BASIC_INFORMATION ebi;
-
- prev = lock->lf_head;
- while ((ovcase = lf_findoverlap (lf, lock, OTHERS, &prev, &overlap)))
- {
- /*
- * We've found an overlap, see if it blocks us
- */
- if ((lock->lf_type == F_WRLCK || overlap->lf_type == F_WRLCK))
- {
- /* Open the event object for synchronization. */
- if (!overlap->open_lock_obj () || (overlap->lf_flags & F_POSIX))
- return overlap;
- /* In case of BSD flock locks, check if the event object is
- signalled. If so, the overlap doesn't actually exist anymore.
- There are just a few open handles left. */
- status = NtQueryEvent (overlap->lf_obj, EventBasicInformation,
- &ebi, sizeof ebi, NULL);
- if (!NT_SUCCESS (status) || ebi.SignalState == 0)
- return overlap;
- NtClose (overlap->lf_obj);
- overlap->lf_obj = NULL;
- }
- /*
- * Nope, point to the next one on the list and
- * see if it blocks us
- */
- lf = overlap->lf_next;
- }
- return NOLOCKF;
-}
-
-/*
- * Walk the list of locks for an inode_t to
- * find an overlapping lock (if any).
- *
- * NOTE: this returns only the FIRST overlapping lock. There
- * may be more than one.
- */
-static int
-lf_findoverlap (lockf_t *lf, lockf_t *lock, int type, lockf_t ***prev,
- lockf_t **overlap)
-{
- _off64_t start, end;
-
- *overlap = lf;
- if (lf == NOLOCKF)
- return 0;
-
- start = lock->lf_start;
- end = lock->lf_end;
- while (lf != NOLOCKF)
- {
- if (((type & OTHERS) && lf->lf_id == lock->lf_id)
- /* As on Linux: POSIX locks and BSD flock locks don't interact. */
- || (lf->lf_flags & (F_POSIX | F_FLOCK))
- != (lock->lf_flags & (F_POSIX | F_FLOCK)))
- {
- *prev = &lf->lf_next;
- *overlap = lf = lf->lf_next;
- continue;
- }
- /*
- * OK, check for overlap
- *
- * Six cases:
- * 0) no overlap
- * 1) overlap == lock
- * 2) overlap contains lock
- * 3) lock contains overlap
- * 4) overlap starts before lock
- * 5) overlap ends after lock
- */
- if ((lf->lf_end != -1 && start > lf->lf_end) ||
- (end != -1 && lf->lf_start > end))
- {
- /* Case 0 */
- if ((type & SELF) && end != -1 && lf->lf_start > end)
- return 0;
- *prev = &lf->lf_next;
- *overlap = lf = lf->lf_next;
- continue;
- }
- if ((lf->lf_start == start) && (lf->lf_end == end))
- {
- /* Case 1 */
- return 1;
- }
- if ((lf->lf_start <= start) && (end != -1) &&
- ((lf->lf_end >= end) || (lf->lf_end == -1)))
- {
- /* Case 2 */
- return 2;
- }
- if (start <= lf->lf_start && (end == -1 ||
- (lf->lf_end != -1 && end >= lf->lf_end)))
- {
- /* Case 3 */
- return 3;
- }
- if ((lf->lf_start < start) &&
- ((lf->lf_end >= start) || (lf->lf_end == -1)))
- {
- /* Case 4 */
- return 4;
- }
- if ((lf->lf_start > start) && (end != -1) &&
- ((lf->lf_end > end) || (lf->lf_end == -1)))
- {
- /* Case 5 */
- return 5;
- }
- api_fatal ("lf_findoverlap: default\n");
- }
- return 0;
-}
-
-/*
- * Split a lock and a contained region into
- * two or three locks as necessary.
- */
-static void
-lf_split (lockf_t *lock1, lockf_t *lock2, lockf_t **split)
-{
- lockf_t *splitlock;
-
- /*
- * Check to see if spliting into only two pieces.
- */
- if (lock1->lf_start == lock2->lf_start)
- {
- lock1->lf_start = lock2->lf_end + 1;
- lock2->lf_next = lock1;
- return;
- }
- if (lock1->lf_end == lock2->lf_end)
- {
- lock1->lf_end = lock2->lf_start - 1;
- lock2->lf_next = lock1->lf_next;
- lock1->lf_next = lock2;
- return;
- }
- /*
- * Make a new lock consisting of the last part of
- * the encompassing lock. We use the preallocated
- * splitlock so we don't have to block.
- */
- splitlock = *split;
- assert (splitlock != NULL);
- *split = splitlock->lf_next;
- memcpy (splitlock, lock1, sizeof *splitlock);
- /* We have to unset the obj HANDLE here which has been copied by the
- above memcpy, so that the calling function recognizes the new object.
- See post-lf_split handling in lf_setlock and lf_clearlock. */
- splitlock->lf_obj = NULL;
- splitlock->lf_start = lock2->lf_end + 1;
- lock1->lf_end = lock2->lf_start - 1;
- /*
- * OK, now link it in
- */
- splitlock->lf_next = lock1->lf_next;
- lock2->lf_next = splitlock;
- lock1->lf_next = lock2;
-}
-
-/*
- * Wakeup a blocklist
- * Cygwin: Just signal the lock which gets removed. This unblocks
- * all threads waiting for this lock.
- */
-static void
-lf_wakelock (lockf_t *listhead, HANDLE fhdl)
-{
- listhead->del_lock_obj (fhdl, true);
-}
-
-extern "C" int
-flock (int fd, int operation)
-{
- int res = -1;
- int cmd;
- struct __flock64 fl = { 0, SEEK_SET, 0, 0, 0 };
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- cygheap_fdget cfd (fd, true);
- if (cfd < 0)
- goto done;
-
- cmd = (operation & LOCK_NB) ? F_SETLK : F_SETLKW;
- switch (operation & (~LOCK_NB))
- {
- case LOCK_EX:
- fl.l_type = F_WRLCK | F_FLOCK;
- break;
- case LOCK_SH:
- fl.l_type = F_RDLCK | F_FLOCK;
- break;
- case LOCK_UN:
- fl.l_type = F_UNLCK | F_FLOCK;
- break;
- default:
- set_errno (EINVAL);
- goto done;
- }
- res = cfd->lock (cmd, &fl);
- if ((res == -1) && ((get_errno () == EAGAIN) || (get_errno () == EACCES)))
- set_errno (EWOULDBLOCK);
-done:
- syscall_printf ("%d = flock (%d, %d)", res, fd, operation);
- return res;
-}
-
-extern "C" int
-lockf (int filedes, int function, _off64_t size)
-{
- int res = -1;
- int cmd;
- struct __flock64 fl;
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- cygheap_fdget cfd (filedes, true);
- if (cfd < 0)
- goto done;
-
- fl.l_start = 0;
- fl.l_len = size;
- fl.l_whence = SEEK_CUR;
-
- switch (function)
- {
- case F_ULOCK:
- cmd = F_SETLK;
- fl.l_type = F_UNLCK;
- break;
- case F_LOCK:
- cmd = F_SETLKW;
- fl.l_type = F_WRLCK;
- break;
- case F_TLOCK:
- cmd = F_SETLK;
- fl.l_type = F_WRLCK;
- break;
- case F_TEST:
- fl.l_type = F_WRLCK;
- if (cfd->lock (F_GETLK, &fl) == -1)
- goto done;
- if (fl.l_type == F_UNLCK || fl.l_pid == getpid ())
- res = 0;
- else
- errno = EAGAIN;
- goto done;
- /* NOTREACHED */
- default:
- errno = EINVAL;
- goto done;
- /* NOTREACHED */
- }
- res = cfd->lock (cmd, &fl);
-done:
- syscall_printf ("%d = lockf (%d, %d, %D)", res, filedes, function, size);
- return res;
-}
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
deleted file mode 100644
index 742f1e7..0000000
--- a/winsup/cygwin/fork.cc
+++ /dev/null
@@ -1,777 +0,0 @@
-/* fork.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006,
- 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "cygheap.h"
-#include "child_info.h"
-#include "cygtls.h"
-#include "tls_pbuf.h"
-#include "perprocess.h"
-#include "dll_init.h"
-#include "cygmalloc.h"
-
-#define NPIDS_HELD 4
-
-/* Timeout to wait for child to start, parent to init child, etc. */
-/* FIXME: Once things stabilize, bump up to a few minutes. */
-#define FORK_WAIT_TIMEOUT (300 * 1000) /* 300 seconds */
-
-class frok
-{
- dll *first_dll;
- bool load_dlls;
- child_info_fork ch;
- const char *error;
- int child_pid;
- int this_errno;
- int __stdcall parent (volatile char * volatile here);
- int __stdcall child (volatile char * volatile here);
- friend int fork ();
-};
-
-class lock_signals
-{
- bool worked;
-public:
- lock_signals ()
- {
- worked = sig_send (NULL, __SIGHOLD) == 0;
- }
- operator int () const
- {
- return worked;
- }
- void dont_bother ()
- {
- worked = false;
- }
- ~lock_signals ()
- {
- if (worked)
- sig_send (NULL, __SIGNOHOLD);
- }
-};
-
-class lock_pthread
-{
- bool bother;
-public:
- lock_pthread (): bother (1)
- {
- pthread::atforkprepare ();
- }
- void dont_bother ()
- {
- bother = false;
- }
- ~lock_pthread ()
- {
- if (bother)
- pthread::atforkparent ();
- }
-};
-
-class hold_everything
-{
-public: /* DELETEME*/
- bool& ischild;
- /* Note the order of the locks below. It is important,
- to avoid races, that the lock order be preserved.
-
- pthread is first because it serves as a master lock
- against other forks being attempted while this one is active.
-
- signals is next to stop signal processing for the duration
- of the fork.
-
- process is last. If it is put before signals, then a deadlock
- could be introduced if the process attempts to exit due to a signal. */
- lock_pthread pthread;
- lock_signals signals;
- lock_process process;
-
-public:
- hold_everything (bool& x): ischild (x) {}
- operator int () const {return signals;}
-
- ~hold_everything()
- {
- if (ischild)
- {
- pthread.dont_bother ();
- process.dont_bother ();
- signals.dont_bother ();
- }
- }
-
-};
-
-static void
-resume_child (HANDLE forker_finished)
-{
- SetEvent (forker_finished);
- debug_printf ("signalled child");
- return;
-}
-
-/* Notify parent that it is time for the next step. */
-static void __stdcall
-sync_with_parent (const char *s, bool hang_self)
-{
- debug_printf ("signalling parent: %s", s);
- fork_info->ready (false);
- if (hang_self)
- {
- HANDLE h = fork_info->forker_finished;
- /* Wait for the parent to fill in our stack and heap.
- Don't wait forever here. If our parent dies we don't want to clog
- the system. If the wait fails, we really can't continue so exit. */
- DWORD psync_rc = WaitForSingleObject (h, FORK_WAIT_TIMEOUT);
- debug_printf ("awake");
- switch (psync_rc)
- {
- case WAIT_TIMEOUT:
- api_fatal ("WFSO timed out %s", s);
- break;
- case WAIT_FAILED:
- if (GetLastError () == ERROR_INVALID_HANDLE &&
- WaitForSingleObject (fork_info->forker_finished, 1) != WAIT_FAILED)
- break;
- api_fatal ("WFSO failed %s, fork_finished %p, %E", s,
- fork_info->forker_finished);
- break;
- default:
- debug_printf ("no problems");
- break;
- }
- }
-}
-
-int __stdcall
-frok::child (volatile char * volatile here)
-{
- HANDLE& hParent = ch.parent;
- extern void fixup_lockf_after_fork ();
- extern void fixup_hooks_after_fork ();
- extern void fixup_timers_after_fork ();
- debug_printf ("child is running. pid %d, ppid %d, stack here %p",
- myself->pid, myself->ppid, __builtin_frame_address (0));
-
- sync_with_parent ("after longjmp", true);
- sigproc_printf ("hParent %p, child 1 first_dll %p, load_dlls %d", hParent,
- first_dll, load_dlls);
-
- /* If we've played with the stack, stacksize != 0. That means that
- fork() was invoked from other than the main thread. Make sure that
- the threadinfo information is properly set up. */
- if (fork_info->stacksize)
- {
- _main_tls = &_my_tls;
- _main_tls->init_thread (NULL, NULL);
- _main_tls->local_clib = *_impure_ptr;
- _impure_ptr = &_main_tls->local_clib;
- }
-
- set_cygwin_privileges (hProcToken);
- clear_procimptoken ();
- cygheap->user.reimpersonate ();
-
-#ifdef DEBUGGING
- if (GetEnvironmentVariableA ("FORKDEBUG", NULL, 0))
- try_to_debug ();
- char buf[80];
- /* This is useful for debugging fork problems. Use gdb to attach to
- the pid reported here. */
- if (GetEnvironmentVariableA ("CYGWIN_FORK_SLEEP", buf, sizeof (buf)))
- {
- small_printf ("Sleeping %d after fork, pid %u\n", atoi (buf), GetCurrentProcessId ());
- Sleep (atoi (buf));
- }
-#endif
-
- set_file_api_mode (current_codepage);
-
- MALLOC_CHECK;
-
-#ifdef USE_SERVER
- /* Incredible but true: If we use sockets and SYSV IPC shared memory,
- there's a good chance that a duplicated socket in the child occupies
- memory which is needed to duplicate shared memory from the parent
- process, if the shared memory hasn't been duplicated already.
- The same goes very likely for "normal" mmap shared memory, too, but
- with SYSV IPC it was the first time observed. So, *never* fixup
- fdtab before fixing up shared memory. */
- if (fixup_shms_after_fork ())
- api_fatal ("recreate_shm areas after fork failed");
-#endif
-
- MALLOC_CHECK;
-
- /* If we haven't dynamically loaded any dlls, just signal
- the parent. Otherwise, load all the dlls, tell the parent
- that we're done, and wait for the parent to fill in the.
- loaded dlls' data/bss. */
- if (!load_dlls)
- {
- cygheap->fdtab.fixup_after_fork (hParent);
- sync_with_parent ("performed fork fixup", false);
- }
- else
- {
- dlls.load_after_fork (hParent, first_dll);
- cygheap->fdtab.fixup_after_fork (hParent);
- sync_with_parent ("loaded dlls", true);
- }
-
- init_console_handler (myself->ctty >= 0);
- ForceCloseHandle1 (fork_info->forker_finished, forker_finished);
-
- pthread::atforkchild ();
- fixup_timers_after_fork ();
- cygbench ("fork-child");
- ld_preload ();
- fixup_hooks_after_fork ();
- _my_tls.fixup_after_fork ();
- wait_for_sigthread (true);
- cygwin_finished_initializing = true;
- return 0;
-}
-
-#define NO_SLOW_PID_REUSE
-#ifndef NO_SLOW_PID_REUSE
-static void
-slow_pid_reuse (HANDLE h)
-{
- static NO_COPY HANDLE last_fork_procs[NPIDS_HELD];
- static NO_COPY unsigned nfork_procs;
-
- if (nfork_procs >= (sizeof (last_fork_procs) / sizeof (last_fork_procs [0])))
- nfork_procs = 0;
- /* Keep a list of handles to child processes sitting around to prevent
- Windows from reusing the same pid n times in a row. Having the same pids
- close in succesion confuses bash. Keeping a handle open will stop
- windows from reusing the same pid. */
- if (last_fork_procs[nfork_procs])
- ForceCloseHandle1 (last_fork_procs[nfork_procs], fork_stupidity);
- if (DuplicateHandle (hMainProc, h, hMainProc, &last_fork_procs[nfork_procs],
- 0, FALSE, DUPLICATE_SAME_ACCESS))
- ProtectHandle1 (last_fork_procs[nfork_procs], fork_stupidity);
- else
- {
- last_fork_procs[nfork_procs] = NULL;
- system_printf ("couldn't create last_fork_proc, %E");
- }
- nfork_procs++;
-}
-#endif
-
-int __stdcall
-frok::parent (volatile char * volatile stack_here)
-{
- HANDLE forker_finished;
- DWORD rc;
- child_pid = -1;
- error = NULL;
- this_errno = 0;
- bool fix_impersonation = false;
- pinfo child;
- static char errbuf[256];
-
- int c_flags = GetPriorityClass (hMainProc);
- debug_printf ("priority class %d", c_flags);
-
- /* If we don't have a console, then don't create a console for the
- child either. */
- HANDLE console_handle = CreateFile ("CONOUT$", GENERIC_WRITE,
- FILE_SHARE_WRITE, &sec_none_nih,
- OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,
- NULL);
-
- if (console_handle != INVALID_HANDLE_VALUE)
- CloseHandle (console_handle);
- else
- c_flags |= DETACHED_PROCESS;
-
- /* Remember the address of the first loaded dll and decide
- if we need to load dlls. We do this here so that this
- information will be available in the parent and, when
- the stack is copied, in the child. */
- first_dll = dlls.start.next;
- load_dlls = dlls.reload_on_fork && dlls.loaded_dlls;
-
- /* This will help some of the confusion. */
- fflush (stdout);
-
- forker_finished = CreateEvent (&sec_all, FALSE, FALSE, NULL);
- if (forker_finished == NULL)
- {
- this_errno = geterrno_from_win_error ();
- error = "unable to allocate forker_finished event";
- return -1;
- }
-
- ProtectHandleINH (forker_finished);
-
- ch.forker_finished = forker_finished;
-
- ch.stackbottom = _tlsbase;
- ch.stacktop = (void *) stack_here;
- ch.stacksize = (char *) ch.stackbottom - (char *) stack_here;
- debug_printf ("stack - bottom %p, top %p, size %d",
- ch.stackbottom, ch.stacktop, ch.stacksize);
-
- PROCESS_INFORMATION pi;
- STARTUPINFOW si;
-
- memset (&si, 0, sizeof (si));
- si.cb = sizeof si;
-
- si.lpReserved2 = (LPBYTE) &ch;
- si.cbReserved2 = sizeof (ch);
-
- /* FIXME: myself->progname should be converted to WCHAR. */
- tmp_pathbuf tp;
- PWCHAR progname = tp.w_get ();
- sys_mbstowcs (progname, NT_MAX_PATH, myself->progname);
-
- syscall_printf ("CreateProcess (%W, %W, 0, 0, 1, %p, 0, 0, %p, %p)",
- progname, progname, c_flags, &si, &pi);
- bool locked = __malloc_lock ();
- time_t start_time = time (NULL);
-
- /* Remove impersonation */
- cygheap->user.deimpersonate ();
- fix_impersonation = true;
-
- while (1)
- {
- rc = CreateProcessW (progname, /* image to run */
- progname, /* what we send in arg0 */
- &sec_none_nih,
- &sec_none_nih,
- TRUE, /* inherit handles from parent */
- c_flags,
- NULL, /* environment filled in later */
- 0, /* use current drive/directory */
- &si,
- &pi);
-
- if (!rc)
- {
- this_errno = geterrno_from_win_error ();
- error = "CreateProcessW failed";
- memset (&pi, 0, sizeof (pi));
- goto cleanup;
- }
-
- CloseHandle (pi.hThread);
-
- /* Protect the handle but name it similarly to the way it will
- be called in subproc handling. */
- ProtectHandle1 (pi.hProcess, childhProc);
-
- strace.write_childpid (ch, pi.dwProcessId);
-
- /* Wait for subproc to initialize itself. */
- if (!ch.sync (pi.dwProcessId, pi.hProcess, FORK_WAIT_TIMEOUT))
- {
- DWORD exit_code = ch.proc_retry (pi.hProcess);
- if (!exit_code)
- continue;
- this_errno = EAGAIN;
- /* Not thread safe, but do we care? */
- __small_sprintf (errbuf, "died waiting for longjmp before initialization, "
- "retry %d, exit code %p", ch.retry, exit_code);
- error = errbuf;
- goto cleanup;
- }
- break;
- }
-
- /* Restore impersonation */
- cygheap->user.reimpersonate ();
- fix_impersonation = false;
-
- child_pid = cygwin_pid (pi.dwProcessId);
- child.init (child_pid, 1, NULL);
-
- if (!child)
- {
- this_errno = get_errno () == ENOMEM ? ENOMEM : EAGAIN;
-#ifdef DEBUGGING
- error = "pinfo failed";
-#else
- syscall_printf ("pinfo failed");
-#endif
- goto cleanup;
- }
-
- child->start_time = start_time; /* Register child's starting time. */
- child->nice = myself->nice;
-
- /* Initialize things that are done later in dll_crt0_1 that aren't done
- for the forkee. */
- strcpy (child->progname, myself->progname);
-
- /* Fill in fields in the child's process table entry. */
- child->dwProcessId = pi.dwProcessId;
- child.hProcess = pi.hProcess;
-
- /* Hopefully, this will succeed. The alternative to doing things this
- way is to reserve space prior to calling CreateProcess and then fill
- it in afterwards. This requires more bookkeeping than I like, though,
- so we'll just do it the easy way. So, terminate any child process if
- we can't actually record the pid in the internal table. */
- if (!child.remember (false))
- {
- TerminateProcess (pi.hProcess, 1);
- this_errno = EAGAIN;
-#ifdef DEBUGGING0
- error = "child.remember failed";
-#endif
- goto cleanup;
- }
-
-#ifndef NO_SLOW_PID_REUSE
- slow_pid_reuse (pi.hProcess);
-#endif
-
- /* CHILD IS STOPPED */
- debug_printf ("child is alive (but stopped)");
-
- /* Initialize, in order: stack, dll data, dll bss.
- data, bss, heap were done earlier (in dcrt0.cc)
- Note: variables marked as NO_COPY will not be copied since they are
- placed in a protected segment. */
-
- MALLOC_CHECK;
- const void *impure_beg;
- const void *impure_end;
- const char *impure;
- if (&_my_tls == _main_tls)
- impure_beg = impure_end = impure = NULL;
- else
- {
- impure = "impure";
- impure_beg = _impure_ptr;
- impure_end = _impure_ptr + 1;
- }
- rc = child_copy (pi.hProcess, true,
- "stack", stack_here, ch.stackbottom,
- impure, impure_beg, impure_end,
- NULL);
-
- __malloc_unlock ();
- locked = false;
- MALLOC_CHECK;
- if (!rc)
- {
- this_errno = get_errno ();
- DWORD exit_code;
- if (!GetExitCodeProcess (pi.hProcess, &exit_code))
- exit_code = 0xdeadbeef;
- __small_sprintf (errbuf, "pid %u, exitval %p", pi.dwProcessId, exit_code);
- error = errbuf;
- goto cleanup;
- }
-
- /* Now fill data/bss of any DLLs that were linked into the program. */
- for (dll *d = dlls.istart (DLL_LINK); d; d = dlls.inext ())
- {
- debug_printf ("copying data/bss of a linked dll");
- if (!child_copy (pi.hProcess, true,
- "linked dll data", d->p.data_start, d->p.data_end,
- "linked dll bss", d->p.bss_start, d->p.bss_end,
- NULL))
- {
- this_errno = get_errno ();
-#ifdef DEBUGGING
- DWORD exit_code;
- if (!GetExitCodeProcess (pi.hProcess, &exit_code))
- exit_code = 0xdeadbeef;
- __small_sprintf (errbuf, "pid %u, exitval %p", pi.dwProcessId, exit_code);
- error = errbuf;
-#endif
- goto cleanup;
- }
- }
-
- /* Start thread, and then wait for it to reload dlls. */
- resume_child (forker_finished);
- if (!ch.sync (child->pid, pi.hProcess, FORK_WAIT_TIMEOUT))
- {
- this_errno = EAGAIN;
- error = "died waiting for dll loading";
- goto cleanup;
- }
-
- /* If DLLs were loaded in the parent, then the child has reloaded all
- of them and is now waiting to have all of the individual data and
- bss sections filled in. */
- if (load_dlls)
- {
- /* CHILD IS STOPPED */
- /* write memory of reloaded dlls */
- for (dll *d = dlls.istart (DLL_LOAD); d; d = dlls.inext ())
- {
- debug_printf ("copying data/bss for a loaded dll");
- if (!child_copy (pi.hProcess, true,
- "loaded dll data", d->p.data_start, d->p.data_end,
- "loaded dll bss", d->p.bss_start, d->p.bss_end,
- NULL))
- {
- this_errno = get_errno ();
-#ifdef DEBUGGING
- error = "copying data/bss for a loaded dll";
-#endif
- goto cleanup;
- }
- }
- /* Start the child up again. */
- resume_child (forker_finished);
- }
-
- ForceCloseHandle (forker_finished);
- forker_finished = NULL;
-
- return child_pid;
-
-/* Common cleanup code for failure cases */
-cleanup:
- if (fix_impersonation)
- cygheap->user.reimpersonate ();
- if (locked)
- __malloc_unlock ();
-
- /* Remember to de-allocate the fd table. */
- if (pi.hProcess && !child.hProcess)
- ForceCloseHandle1 (pi.hProcess, childhProc);
- if (forker_finished)
- ForceCloseHandle (forker_finished);
- debug_printf ("returning -1");
- return -1;
-}
-
-extern "C" int
-fork ()
-{
- frok grouped;
-
- debug_printf ("entering");
- grouped.first_dll = NULL;
- grouped.load_dlls = 0;
-
- int res;
- bool ischild = false;
-
- myself->set_has_pgid_children ();
-
- if (grouped.ch.parent == NULL)
- return -1;
- if (grouped.ch.subproc_ready == NULL)
- {
- system_printf ("unable to allocate subproc_ready event, %E");
- return -1;
- }
-
- {
- hold_everything held_everything (ischild);
-
- if (!held_everything)
- {
- if (exit_state)
- Sleep (INFINITE);
- set_errno (EAGAIN);
- return -1;
- }
-
- ischild = !!setjmp (grouped.ch.jmp);
-
- volatile char * volatile esp;
- __asm__ volatile ("movl %%esp,%0": "=r" (esp));
-
- if (!ischild)
- res = grouped.parent (esp);
- else
- {
- res = grouped.child (esp);
- ischild = true; /* might have been reset by fork mem copy */
- }
- }
-
- MALLOC_CHECK;
- if (ischild || res > 0)
- /* everything is ok */;
- else
- {
- if (!grouped.error)
- syscall_printf ("fork failed - child pid %d, errno %d", grouped.child_pid, grouped.this_errno);
- else
- {
- char buf[strlen (grouped.error) + sizeof ("child %d - , errno 4294967295 ")];
- strcpy (buf, "child %d - ");
- strcat (buf, grouped.error);
- strcat (buf, ", errno %d");
- system_printf (buf, grouped.child_pid, grouped.this_errno);
- }
-
- set_errno (grouped.this_errno);
- }
- syscall_printf ("%d = fork()", res);
- return res;
-}
-#ifdef DEBUGGING
-void
-fork_init ()
-{
-}
-#endif /*DEBUGGING*/
-
-#ifdef NEWVFORK
-/* Dummy function to force second assignment below to actually be
- carried out */
-static vfork_save *
-get_vfork_val ()
-{
- return vfork_storage.val ();
-}
-#endif
-
-extern "C" int
-vfork ()
-{
-#ifndef NEWVFORK
- debug_printf ("stub called");
- return fork ();
-#else
- vfork_save *vf = get_vfork_val ();
- char **esp, **pp;
-
- if (vf == NULL)
- vf = vfork_storage.create ();
- else if (vf->pid)
- return fork ();
-
- // FIXME the tls stuff could introduce a signal race if a child process
- // exits quickly.
- if (!setjmp (vf->j))
- {
- vf->pid = -1;
- __asm__ volatile ("movl %%esp,%0": "=r" (vf->vfork_esp):);
- __asm__ volatile ("movl %%ebp,%0": "=r" (vf->vfork_ebp):);
- for (pp = (char **) vf->frame, esp = vf->vfork_esp;
- esp <= vf->vfork_ebp + 2; pp++, esp++)
- *pp = *esp;
- vf->ctty = myself->ctty;
- vf->sid = myself->sid;
- vf->pgid = myself->pgid;
- cygheap->ctty_on_hold = cygheap->ctty;
- vf->console_count = cygheap->console_count;
- debug_printf ("cygheap->ctty_on_hold %p, cygheap->console_count %d", cygheap->ctty_on_hold, cygheap->console_count);
- int res = cygheap->fdtab.vfork_child_dup () ? 0 : -1;
- debug_printf ("%d = vfork()", res);
- _my_tls.call_signal_handler (); // FIXME: racy
- vf->tls = _my_tls;
- return res;
- }
-
- vf = get_vfork_val ();
-
- for (pp = (char **) vf->frame, esp = vf->vfork_esp;
- esp <= vf->vfork_ebp + 2; pp++, esp++)
- *esp = *pp;
-
- cygheap->fdtab.vfork_parent_restore ();
-
- myself->ctty = vf->ctty;
- myself->sid = vf->sid;
- myself->pgid = vf->pgid;
- termios_printf ("cygheap->ctty %p, cygheap->ctty_on_hold %p", cygheap->ctty, cygheap->ctty_on_hold);
- cygheap->console_count = vf->console_count;
-
- if (vf->pid < 0)
- {
- int exitval = vf->exitval;
- vf->pid = 0;
- if ((vf->pid = fork ()) == 0)
- exit (exitval);
- }
-
- int pid = vf->pid;
- vf->pid = 0;
- debug_printf ("exiting vfork, pid %d", pid);
- sig_dispatch_pending ();
-
- _my_tls.call_signal_handler (); // FIXME: racy
- _my_tls = vf->tls;
- return pid;
-#endif
-}
-
-/* Copy memory from one process to another. */
-
-bool
-child_copy (HANDLE hp, bool write, ...)
-{
- va_list args;
- va_start (args, write);
- static const char *huh[] = {"read", "write"};
-
- char *what;
- while ((what = va_arg (args, char *)))
- {
- char *low = va_arg (args, char *);
- char *high = va_arg (args, char *);
- DWORD todo = wincap.chunksize () ?: high - low;
- char *here;
-
- for (here = low; here < high; here += todo)
- {
- DWORD done = 0;
- if (here + todo > high)
- todo = high - here;
- int res;
- if (write)
- res = WriteProcessMemory (hp, here, here, todo, &done);
- else
- res = ReadProcessMemory (hp, here, here, todo, &done);
- debug_printf ("%s - hp %p low %p, high %p, res %d", what, hp, low, high, res);
- if (!res || todo != done)
- {
- if (!res)
- __seterrno ();
- /* If this happens then there is a bug in our fork
- implementation somewhere. */
- system_printf ("%s %s copy failed, %p..%p, done %d, windows pid %u, %E",
- what, huh[write], low, high, done, myself->dwProcessId);
- goto err;
- }
- }
- }
-
- debug_printf ("done");
- return true;
-
- err:
- TerminateProcess (hp, 1);
- set_errno (EAGAIN);
- return false;
-}
diff --git a/winsup/cygwin/gcrt0.c b/winsup/cygwin/gcrt0.c
deleted file mode 100644
index 19a9416..0000000
--- a/winsup/cygwin/gcrt0.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* gcrt0.c
-
- Copyright 1998, 1999, 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <sys/types.h>
-#include <stdlib.h>
-
-extern u_char etext asm ("etext");
-extern u_char eprol asm ("__eprol");
-extern void _mcleanup (void);
-extern void monstartup (u_long, u_long);
-
-void _monstartup (void) __attribute__((__constructor__));
-
-/* startup initialization for -pg support */
-
-void
-_monstartup (void)
-{
- static int called;
-
- /* Guard against multiple calls that may happen if DLLs are linked
- with profile option set as well. Addede side benefit is that it
- makes profiling backward compatible (GCC used to emit a call to
- _monstartup when compiling main with profiling enabled). */
- if (called++)
- return;
-
- monstartup ((u_long) &eprol, (u_long) &etext);
- atexit (&_mcleanup);
-}
-
-asm (".text");
-asm ("__eprol:");
-
diff --git a/winsup/cygwin/gendef b/winsup/cygwin/gendef
deleted file mode 100755
index 95ec4ff..0000000
--- a/winsup/cygwin/gendef
+++ /dev/null
@@ -1,463 +0,0 @@
-#!/usr/bin/perl
-# Copyright 2003, 2004, 2005, 2006, 2008 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.
-#
-use strict;
-sub nocr(@);
-my $in = shift;
-my $tls_offsets = shift;
-my $out = shift;
-my $sigfe = shift;
-
-$main::first = 0;
-if (!defined($in) || !defined($out) || !defined($sigfe)) {
- die "usage: $0 deffile.in cygtls.h deffile.def sigfe.s\n";
-}
-
-require $tls_offsets;
-
-open(IN, $in) or die "$0: couldn't open \"$in\" - $!\n";
-my @top = ();
-while (<IN>) {
- push(@top, nocr $_);
- last if /^\s*exports\s*$/i;
-}
-my $libline = nocr scalar(<IN>);
-my @in = nocr <IN>;
-close(IN);
-
-my %sigfe = ();
-my @data = ();
-my @nosigfuncs = ();
-my @out = ();
-for (@in) {
- /\sDATA$/o and do {
- push(@data, $_);
- next;
- };
- chomp;
- if (/=/o) {
- if (s/\s+NOSIGFE\s*$//) {
- # nothing
- } elsif (s/ SIGFE(_MAYBE)?$//) {
- my $func = (split(' '))[2];
- my $maybe = lc $1 . '_';
- $sigfe{$func} = '_sigfe' . $maybe . $func;
- }
- } else {
- my ($func, $sigfe) = m%^\s*(\S+)(?:\s+((?:NO)?SIGFE(?:_MAYBE)?))?$%o;
- if (defined($sigfe) && $sigfe =~ /^NO/o) {
- $_ = $func;
- } else {
- $sigfe ||= 'sigfe';
- $_ = '_' . lc($sigfe) . '_' . $func;
- $sigfe{$func} = $_;
- $_ = $func . ' = ' . $_;
- }
- }
- s/(\S)\s+(\S)/$1 $2/go;
- s/(\S)\s+$/$1/o;
- s/^\s+(\S)/$1/o;
- push(@out, $_ . "\n");
-}
-
-for (@out) {
- my ($alias, $func) = /^(\S+) = (\S+)\s*$/o;
- $_ = $alias . ' = ' . $sigfe{$func} . "\n"
- if defined($func) && $sigfe{$func};
-}
-open(OUT, '>', $out) or die "$0: couldn't open \"$out\" - $!\n";
-print OUT @top, @data, @out;
-close OUT;
-
-open(SIGFE, '>', $sigfe) or die "$0: couldn't open sigfe file \"$sigfe\" - $!\n";
-
-for my $k (sort keys %sigfe) {
- print SIGFE fefunc($k, $sigfe{$k});
-}
-close SIGFE;
-
-sub fefunc {
- my $func = '_' . shift;
- my $fe = '_' . shift;
- my $sigfe_func = ($fe =~ /^(.*)$func/)[0];
- my $extra;
- my $res = <<EOF;
- .extern $func
- .global $fe
-$fe:
- pushl \$$func
- jmp $sigfe_func
-
-EOF
- if (!$main::first++) {
- $res = <<EOF . longjmp () . $res;
- .text
-
- .stabs "_sigfe:F(0,1)",36,0,0,__sigfe
-__sigfe_maybe:
- pushl %ebx
- pushl %edx
- movl %fs:4,%ebx # location of bottom of stack
- addl \$$tls::initialized,%ebx # where we will be looking
- cmpl %ebx,%esp # stack loc > than tls
- jge 0f # yep. we don't have a tls.
- subl \$$tls::initialized,%ebx # where we will be looking
- movl $tls::initialized(%ebx),%eax
- cmpl \$0xc763173f,%eax # initialized?
- je 1f
-0: popl %edx
- popl %ebx
- ret
-
-__sigfe:
- pushl %ebx
- pushl %edx
- movl %fs:4,%ebx # location of bottom of stack
-1: movl \$1,%eax # potential lock value
- lock xchgl %eax,$tls::stacklock(%ebx) # see if we can grab it
- movl %eax,$tls::spinning(%ebx) # flag if we are waiting for lock
- testl %eax,%eax # it will be zero
- jz 2f # if so
- xorl %eax,%eax # nope. It was not zero
- call _low_priority_sleep # should be a short-time thing, so
- jmp 1b # sleep and loop
-2: movl \$4,%eax # have the lock, now increment the
- xadd %eax,$tls::stackptr(%ebx) # stack pointer and get pointer
- leal __sigbe,%edx # new place to return to
- xchgl %edx,12(%esp) # exchange with real return value
- movl %edx,(%eax) # store real return value on alt stack
- incl $tls::incyg(%ebx)
- decl $tls::stacklock(%ebx) # remove lock
- popl %edx # restore saved value
- popl %ebx
- ret
-
- .global __sigbe
- .stabs "_sigbe:F(0,1)",36,0,0,__sigbe
-__sigbe: # return here after cygwin syscall
- pushl %edx
- pushl %ebx
- pushl %eax # don't clobber
-1: movl %fs:4,%ebx # address of bottom of tls
- movl \$1,%eax # potential lock value
- lock xchgl %eax,$tls::stacklock(%ebx) # see if we can grab it
- movl %eax,$tls::spinning(%ebx) # flag if we are waiting for lock
- testl %eax,%eax # it will be zero
- jz 2f # if so
- xorl %eax,%eax # nope. not zero
- call _low_priority_sleep # sleep
- jmp 1b # and loop
-2: movl \$-4,%eax # now decrement aux stack
- xadd %eax,$tls::stackptr(%ebx) # and get pointer
- xorl %edx,%edx
- xchgl %edx,-4(%eax) # get return address from signal stack
- xchgl %edx,8(%esp) # restore edx/real return address
- decl $tls::incyg(%ebx)
- decl $tls::stacklock(%ebx) # release lock
- popl %eax
- popl %ebx
- ret
-
- .global _sigreturn
- .stabs "sigreturn:F(0,1)",36,0,0,_sigreturn
-_sigreturn:
- movl %fs:4,%ebx
- incl $tls::incyg(%ebx)
- addl \$12,%esp # remove arguments
- call _set_process_mask\@4
-
-1: movl \$1,%eax # potential lock value
- lock xchgl %eax,$tls::stacklock(%ebx) # see if we can grab it
- movl %eax,$tls::spinning(%ebx) # flag if we are waiting for lock
- testl %eax,%eax # it will be zero
- jz 2f # if so
- xorl %eax,%eax # nope. not zero
- call _low_priority_sleep # sleep
- jmp 1b # and loop
-2: popl %edx # saved errno
- testl %edx,%edx # Is it < 0
- jl 3f # yup. ignore it
- movl $tls::errno_addr(%ebx),%eax
- movl %edx,(%eax)
-3: movl \$-4,%eax # now decrement aux stack
- xadd %eax,$tls::stackptr(%ebx) # and get pointer
- xorl %ebp,%ebp
- xchgl %ebp,-4(%eax) # get return address from signal stack
- xchgl %ebp,28(%esp) # store real return address
- decl $tls::incyg(%ebx)
- decl $tls::stacklock(%ebx) # unlock
-
- popl %eax
- popl %ebx
- popl %ecx
- popl %edx
- popl %edi
- popl %esi
- popf
- ret
-
- .global _sigdelayed
- .stabs "sigdelayed:F(0,1)",36,0,0,_sigdelayed
-_sigdelayed:
- pushl %ebp
- movl %esp,%ebp
- pushf
- pushl %esi
- pushl %edi
- pushl %edx
- pushl %ecx
- pushl %ebx
- pushl %eax
- movl %fs:4,%ebx
- incl $tls::incyg(%ebx)
- pushl $tls::saved_errno(%ebx) # saved errno
- call _set_process_mask_delta
- pushl %eax
-
- # fill out handler arguments
- xorl %eax,%eax # ucontext_t (currently not set)
- pushl %eax
- leal $tls::infodata(%ebx),%eax
- pushl %eax # siginfo
- pushl $tls::sig(%ebx) # signal number
-
- call _reset_signal_arrived\@0
- pushl \$_sigreturn # where to return
- pushl $tls::func(%ebx) # signal func
- cmpl \$0,$tls::threadkill(%ebx)#pthread_kill signal?
- jnz 4f # yes. callee clears signal number
- movl \$0,$tls::sig(%ebx) # zero the signal number as a
- # flag to the signal handler thread
- # that it is ok to set up sigsave
-4: decl $tls::incyg(%ebx)
- ret
-
- .global __ZN7_cygtls3popEv
-__ZN7_cygtls3popEv:
-1: pushl %ebx
- pushl %edx # FIXME: needed?
- movl %eax,%ebx
- movl \$-4,%edx
- xadd %edx,$tls::pstackptr(%ebx)
- xorl %eax,%eax
- xchgl %eax,-4(%edx)
- popl %edx # FIXME: needed?
- popl %ebx
- ret
-
- .global __ZN7_cygtls4lockEv
-__ZN7_cygtls4lockEv:
- pushl %ebx
- movl %eax,%ebx
-1: movl \$1,%eax
- lock xchgl %eax,$tls::pstacklock(%ebx)
- testl %eax,%eax
- jz 2f
- xorl %eax,%eax
- call _low_priority_sleep
- jmp 1b
-2: popl %ebx
- ret
-
- .global __ZN7_cygtls6unlockEv
-__ZN7_cygtls6unlockEv:
- decl $tls::pstacklock(%eax)
- ret
-
- .global __ZN7_cygtls6lockedEv
-__ZN7_cygtls6lockedEv:
- movl $tls::pstacklock(%eax),%eax
- ret
-
- .extern __ZN7_cygtls19call_signal_handlerEv
-stabilize_sig_stack:
- movl %fs:4,%ebx
- incl $tls::incyg(%ebx)
-1: movl \$1,%eax
- lock xchgl %eax,$tls::stacklock(%ebx)
- movl %eax,$tls::spinning(%ebx) # flag if we are waiting for lock
- testl %eax,%eax
- jz 2f
- xorl %eax,%eax
- call _low_priority_sleep
- jmp 1b
-2: cmpl \$0,$tls::sig(%ebx)
- jz 3f
- decl $tls::stacklock(%ebx) # unlock
- movl \$-$tls::sizeof__cygtls,%eax # point to beginning
- addl %ebx,%eax # of tls block
- call __ZN7_cygtls19call_signal_handlerEv
- jmp 1b
-3: decl $tls::incyg(%ebx)
- ret
-EOF
- }
- return $res;
-}
-
-sub longjmp {
- return <<EOF;
-
- .globl _setjmp
-_setjmp:
- pushl %ebp
- movl %esp,%ebp
- pushl %edi
- movl 8(%ebp),%edi
- movl %eax,0(%edi)
- movl %ebx,4(%edi)
- movl %ecx,8(%edi)
- movl %edx,12(%edi)
- movl %esi,16(%edi)
- movl -4(%ebp),%eax
- movl %eax,20(%edi)
- movl 0(%ebp),%eax
- movl %eax,24(%edi)
- movl %esp,%eax
- addl \$12,%eax
- movl %eax,28(%edi)
- movl 4(%ebp),%eax
- movl %eax,32(%edi)
- movw %es,%ax
- movw %ax,36(%edi)
- movw %fs,%ax
- movw %ax,38(%edi)
- movw %gs,%ax
- movw %ax,40(%edi)
- movw %ss,%ax
- movw %ax,42(%edi)
- movl %fs:0,%eax
- movl %eax,44(%edi)
- pushl %ebx
- call stabilize_sig_stack
- movl $tls::stackptr(%ebx),%eax # save stack pointer contents
- decl $tls::stacklock(%ebx)
- popl %ebx
- movl %eax,48(%edi)
- popl %edi
- movl \$0,%eax
- leave
- ret
-
- .globl ___sjfault
-___sjfault:
- pushl %ebp
- movl %esp,%ebp
- pushl %edi
- movl 8(%ebp),%edi
- movl %eax,0(%edi)
- movl %ebx,4(%edi)
- movl %ecx,8(%edi)
- movl %edx,12(%edi)
- movl %esi,16(%edi)
- movl -4(%ebp),%eax
- movl %eax,20(%edi)
- movl 0(%ebp),%eax
- movl %eax,24(%edi)
- movl %esp,%eax
- addl \$12,%eax
- movl %eax,28(%edi)
- movl 4(%ebp),%eax
- movl %eax,32(%edi)
- movw %es,%ax
- movw %ax,36(%edi)
- movw %fs,%ax
- movw %ax,38(%edi)
- movw %gs,%ax
- movw %ax,40(%edi)
- movw %ss,%ax
- movw %ax,42(%edi)
- movl %fs:0,%eax
- movl %eax,44(%edi)
- popl %edi
- movl \$0,%eax
- leave
- ret
-
- .global ___ljfault
-___ljfault:
- pushl %ebp
- movl %esp,%ebp
- movl 8(%ebp),%edi
-
- movl 12(%ebp),%eax
- testl %eax,%eax
- jne 0f
- incl %eax
-
-0: movl %eax,0(%edi)
- movl 24(%edi),%ebp
- pushfl
- popl %ebx
- movl 44(%edi),%eax
- movl %eax,%fs:0
- movw 42(%edi),%ax
- movw %ax,%ss
- movl 28(%edi),%esp
- pushl 32(%edi)
- pushl %ebx
- movw 36(%edi),%ax
- movw %ax,%es
- movw 40(%edi),%ax
- movw %ax,%gs
- movl 0(%edi),%eax
- movl 4(%edi),%ebx
- movl 8(%edi),%ecx
- movl 16(%edi),%esi
- movl 12(%edi),%edx
- movl 20(%edi),%edi
- popfl
- ret
-
- .globl _longjmp
-_longjmp:
- pushl %ebp
- movl %esp,%ebp
- movl 8(%ebp),%edi # address of buffer
- call stabilize_sig_stack
- movl 48(%edi),%eax # get old signal stack
- movl %eax,$tls::stackptr(%ebx) # restore
- decl $tls::stacklock(%ebx) # relinquish lock
- xorl %eax,%eax
- movl %eax,$tls::incyg(%ebx) # we're definitely not in cygwin anymore
-
- movl 12(%ebp),%eax
- testl %eax,%eax
- jne 3f
- incl %eax
-
-3: movl %eax,0(%edi)
- movl 24(%edi),%ebp
- pushfl
- popl %ebx
- movl 44(%edi),%eax
- movl %eax,%fs:0
- movw 42(%edi),%ax
- movw %ax,%ss
- movl 28(%edi),%esp
- pushl 32(%edi)
- pushl %ebx
- movw 36(%edi),%ax
- movw %ax,%es
- movw 40(%edi),%ax
- movw %ax,%gs
- movl 0(%edi),%eax
- movl 4(%edi),%ebx
- movl 8(%edi),%ecx
- movl 16(%edi),%esi
- movl 12(%edi),%edx
- movl 20(%edi),%edi
- popfl
- ret
-EOF
-}
-
-sub nocr(@) {
- map {s/\r//g; $_} @_;
-}
diff --git a/winsup/cygwin/gendevices b/winsup/cygwin/gendevices
deleted file mode 100755
index df21796..0000000
--- a/winsup/cygwin/gendevices
+++ /dev/null
@@ -1,159 +0,0 @@
-#!/usr/bin/perl
-# 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.
-#
-use File::Basename;
-use Cwd;
-my $cwd = getcwd;
-
-use strict;
-use integer;
-sub devsort;
-
-my $input = shift;
-my $output = shift;
-my $base = "/tmp/" . basename($input, '.in') . '.' . $$;
-my $c = $base . '.c';
-my $shilka = $base . '.shilka';
-
-open(INPUT, $input) or die "$0: couldn't open '$input' - $!\n";
-
-my @lines = ();
-my $storage_ix = -1;
-my @storage = ();
-my %pointers = ();
-my @patterns = ();
-my $patterns_ix = -1;
-while (<INPUT>) {
- if (/%storage_here/) {
- $storage_ix = @lines;
- } elsif (/^"([^"]+)",\s*(.*)$/o) {
- push(@patterns, [$1, $2]);
- next;
- }
- if (@patterns) {
- for my $f (sort devsort @patterns) {
- my $x = $f->[0];
- my $rest = $f->[1];
- my ($dev, $devrest) = ($x =~ /([^%]+)(%.*)?$/o);
- push(@lines, generate($dev, $devrest, $rest, []));
- }
- @patterns = ();
- }
- push(@lines, $_);
-}
-
-close INPUT;
-# @storage = sort devsort @storage;
-chop $storage[$#storage];
-chop $storage[$#storage];
-$storage[$#storage] .= "\n";
-splice(@lines, $storage_ix, 1,
- "static const device dev_storage[] =\n", "{\n",
- @storage, "};\n\n",
- sort {$a cmp $b} values %pointers);
-open(SHILKA, '>', $shilka);
-print SHILKA @lines;
-close SHILKA;
-
-chdir '/tmp';
-system qw'shilka -length -strip -no-definitions', $shilka;
-if ($? == -1) {
- die "$0: shilka command missing? - $!\n";
-} else {
- exit $? if $?;
-}
-chdir $cwd;
-unlink $shilka;
-open(C, $c) or die "$0: couldn't open $c - $!\n";
-@lines = <C>;
-close C;
-unlink $c;
-splice(@lines, 0, 3);
-my $ign_until_brace = 0;
-for (my $i = 0; $i < @lines; $i++) {
- $_ = $lines[$i];
- $ign_until_brace = 1 if /(?:KR_reset|KR_output_statistics).*\)\s*$/o;
- if ($ign_until_brace || /(?:#\s*line|(?:KR_reset|KR_output_statistics).*;)/) {
- $ign_until_brace = 0 if $ign_until_brace && /}/o;
- splice(@lines, $i, 1);
- redo;
- };
-}
-open(OUTPUT, '>', $output) or do {{
- if (chmod(0664, $output)) {
- open(OUTPUT, '>', $output);
- last;
- }
- die "$0: couldn't open $output - $!\n";
-}};
-print OUTPUT @lines;
-close OUTPUT;
-
-sub generate {
- my $dev = shift;
- my $devrest = shift;
- my $rest = shift;
- my $vars = shift;
- my $res;
- my @lines = ();
- if ($devrest) {
- my ($a, $low, $high, $fmt, $b) = ($devrest =~ /%([\({])([^-]+)-([^\)}]+)[\)}](.)(.*)/o);
- my ($middle, $devrest0) = ($b =~ /^([^%]*)(%.*)?$/);
- $fmt = "%$fmt";
- my $vars_ix = @{$vars};
- for my $f ($low .. $high) {
- $vars->[$vars_ix] = $f;
- $#{$vars} = $vars_ix;
- my $dev0 = $dev . sprintf($fmt, $f) . $middle;
- push(@lines, generate($dev0, $devrest0, $rest, $vars));
- }
- } else {
- my $fh = $dev;
- $fh =~ s%/%_%og;
- my $shilka_id = $fh;
- my $storage_str = $fh . '_storage';
- $fh =~ s/^_dev_/FH_/o;
- $fh = uc $fh;
- $shilka_id =~ s/^_dev_//o;
- $storage_str =~ s/^_dev/dev/o;
- my $storage_loc = "dev_storage + " . @storage;
- @lines = ('"' . $dev . '"' . " = $shilka_id {return $storage_loc;}\n");
- $rest = "$fh, $rest" if $rest =~ /^"/o;
- $rest = fixup($rest, $vars);
- if ($rest =~ /^(.*), ([a-z_]*_dev)/) {
- $pointers{$2} ||= "const device *$2 = $storage_loc;\n";
- $rest = $1;
- }
- push(@storage, " {\"$dev\", " . $rest . "},\n");
- }
- return @lines;
-}
-
-sub fixup {
- my $rest = shift;
- my $vars = shift;
- 0 while $rest =~ s/{([^}]*)}/evalit($1, $vars)/eg;
- return $rest;
-}
-
-sub evalit {
- my $what = shift;
- my $vars = shift;
- $what =~ s/\$(\d+)/'$vars->[$1-1]'/g;
- my $res = eval $what;
- return $res;
-}
-
-sub devsort {
- my $a0 = $a->[0];
- my $b0 = $b->[0];
- $a0 =~ s/(\D)(\d+)/"$1" . sprintf "%05d", $2/e;
- $b0 =~ s/(\D)(\d+)/"$1" . sprintf "%05d", $2/e;
- return $a0 cmp $b0;
-}
diff --git a/winsup/cygwin/gentls_offsets b/winsup/cygwin/gentls_offsets
deleted file mode 100755
index 2c96487..0000000
--- a/winsup/cygwin/gentls_offsets
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/usr/bin/perl -s
-# 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.
-#
-my $tls = shift;
-my $tls_out = shift;
-open(TLS, $tls) or die "$0: couldn't open tls file \"$tls\" - $!\n";
-my $struct = '';
-my @fields = ();
-my $def = '';
-$tls = join('', <TLS>);
-$tls =~ s/\n[^\n]*gentls_offsets[^\n]*\n(.+)\Z/$1/os;
-my $pre = $`;
-substr($tls, 0, length($pre)) = '';
-$pre =~ s/\n#ifndef _[^\n]+\n/\n/os;
-$pre .= "\n//*/";
-$tls =~ s%/\*\s*gentls_offsets.*?/\*\s*gentls_offsets\s*\*/%%ogs;
-foreach ($tls =~ /^.*\n/mg) {
- /^}|\s*(?:typedef|const)/o and do {
- $def .= $_ ;
- next;
- };
- $def .= $_ if $struct;
- if (!s/;.*$//o) {
- if (!$struct && /^\s*(?:struct|class)\s*([a-z_0-9]+)/o) {
- $def .= $_;
- $struct = $1
- }
- next;
- }
- s/(?:\[[^\]]*\]|struct|class)//o;
- s/^\s+\S+\s+//o;
- s/[\*\s()]+//go;
- for my $f (split(/,/)) {
- push(@fields, $f);
- }
-}
-close TLS;
-open(TMP, '>', "/tmp/$$.cc") or die "$0: couldn't open temporary index file \"/tmp/$$.c\" - $!\n";
-print TMP <<EOF;
-#define __INSIDE_CYGWIN__
-#define __attribute__(X)
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <windows.h>
-$pre
-$def
-int
-main(int argc, char **argv)
-{
- $struct *foo;
-# define foo_beg ((char *) foo)
-# define offset(f) ((int) (((char *) &(foo->f)) - foo_beg) - CYGTLS_PADSIZE)
-# define poffset(f) (((char *) &(foo->f)) - ((char *) foo))
-EOF
- print TMP 'puts ("//;# autogenerated: Do not edit.\n");', "\n\n";
- print TMP "printf (\"//; \$tls::sizeof_$struct = %d;\\n\", sizeof($struct\));\n";
- for my $f (@fields) {
- print TMP ' printf ("//; $tls::', $f, ' = %d;\n", ', "offset($f));\n";
- print TMP ' printf ("//; $tls::p', $f, ' = %d;\n", ', "poffset($f));\n";
- }
- print TMP ' puts ("//; __DATA__\n");', "\n";
- for my $f (@fields) {
- print TMP ' printf ("#define tls_', $f, ' (%d)\n", ', "offset($f));\n";
- print TMP ' printf ("#define tls_p', $f, ' (%d)\n", ', "poffset($f));\n";
- }
-
- print TMP <<EOF;
-
- exit (0);
-}
-EOF
-close TMP;
-system @ARGV, '-o', "/tmp/$$-1.cc", '-E', "/tmp/$$.cc";
-system 'g++', '-m32', '-o', "/tmp/$$.a.out", "/tmp/$$-1.cc" and
-($? == 127 && system 'c++', '-m32', '-o', "/tmp/$$.a.out", "/tmp/$$-1.cc") and
-die "$0: couldn't generate executable for offset calculation \"/tmp/$$.a.out\" - $!\n";
-open(TLS_OUT, '>', $tls_out) or die "$0: couldn't open tls index file \"$tls_out\" - $!\n";
-open(OFFS, "/tmp/$$.a.out|") or die "$0: couldn't run \"/tmp/$$.a.out\" - $!\n";
-print TLS_OUT <OFFS>;
-close OFFS;
-close TLS_OUT;
-unlink "/tmp/$$.cc", "/tmp/$$.a.out";
-exit(0);
diff --git a/winsup/cygwin/glob.cc b/winsup/cygwin/glob.cc
deleted file mode 100644
index 6534249..0000000
--- a/winsup/cygwin/glob.cc
+++ /dev/null
@@ -1,980 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Guido van Rossum.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93";
-#endif /* LIBC_SCCS and not lint */
-#ifdef __CYGWIN
-__FBSDID("$FreeBSD: /repoman/r/ncvs/src/lib/libc/gen/glob.c,v 1.25 2006/06/05 18:22:13 delphij Exp $");
-#endif
-
-/*
- * glob(3) -- a superset of the one defined in POSIX 1003.2.
- *
- * The [!...] convention to negate a range is supported (SysV, Posix, ksh).
- *
- * Optional extra services, controlled by flags not defined by POSIX:
- *
- * GLOB_QUOTE:
- * Escaping convention: \ inhibits any special meaning the following
- * character might have (except \ at end of string is retained).
- * GLOB_MAGCHAR:
- * Set in gl_flags if pattern contained a globbing character.
- * GLOB_NOMAGIC:
- * Same as GLOB_NOCHECK, but it will only append pattern if it did
- * not contain any magic characters. [Used in csh style globbing]
- * GLOB_ALTDIRFUNC:
- * Use alternately specified directory access functions.
- * GLOB_TILDE:
- * expand ~user/foo to the /home/dir/of/user/foo
- * GLOB_BRACE:
- * expand {1,2}{a,b} to 1a 1b 2a 2b
- * gl_matchc:
- * Number of matches in the current invocation of glob.
- */
-
-/*
- * Some notes on multibyte character support:
- * 1. Patterns with illegal byte sequences match nothing - even if
- * GLOB_NOCHECK is specified.
- * 2. Illegal byte sequences in filenames are handled by treating them as
- * single-byte characters with a value of the first byte of the sequence
- * cast to wchar_t.
- * 3. State-dependent encodings are not currently supported.
- */
-
-#include "winsup.h"
-
-
-#include <ctype.h>
-#include <dirent.h>
-#include <glob.h>
-#include <pwd.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <wchar.h>
-
-//#include "collate.h"
-
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-
-#include "cygheap.h"
-#include "perprocess.h"
-#include "cygwin/version.h"
-
-#ifndef ARG_MAX
-#define ARG_MAX 32000 /* See CreateProcess */
-#endif
-
-#undef MAXPATHLEN
-#define MAXPATHLEN 16384
-
-extern BOOL ignore_case_with_glob;
-
-#define DOLLAR '$'
-#define DOT '.'
-#define EOS '\0'
-#define LBRACKET '['
-#define NOT '!'
-#define QUESTION '?'
-#define QUOTE '\\'
-#define RANGE '-'
-#define RBRACKET ']'
-#define SEP '/'
-#define STAR '*'
-#define TILDE '~'
-#define UNDERSCORE '_'
-#define LBRACE '{'
-#define RBRACE '}'
-#define SLASH '/'
-#define COMMA ','
-
-#ifndef DEBUG
-
-#define M_QUOTE 0x8000000000ULL
-#define M_PROTECT 0x4000000000ULL
-#define M_MASK 0xffffffffffULL
-#define M_CHAR 0x00ffffffffULL
-
-typedef uint_fast64_t Char;
-
-#else
-
-#define M_QUOTE 0x80
-#define M_PROTECT 0x40
-#define M_MASK 0xff
-#define M_CHAR 0x7f
-
-typedef char Char;
-
-#endif
-
-
-#define CHAR(c) ((Char)((c)&M_CHAR))
-#define META(c) ((Char)((c)|M_QUOTE))
-#define M_ALL META('*')
-#define M_END META(']')
-#define M_NOT META('!')
-#define M_ONE META('?')
-#define M_RNG META('-')
-#define M_SET META('[')
-#define ismeta(c) (((c)&M_QUOTE) != 0)
-
-
-static int compare(const void *, const void *);
-static int g_Ctoc(const Char *, char *, size_t);
-static int g_lstat(Char *, struct __stat64 *, glob_t *);
-static DIR *g_opendir(Char *, glob_t *);
-static Char *g_strchr(Char *, wchar_t);
-#ifdef notdef
-static Char *g_strcat(Char *, const Char *);
-#endif
-static int g_stat(Char *, struct __stat64 *, glob_t *);
-static int glob0(const Char *, glob_t *, size_t *);
-static int glob1(Char *, glob_t *, size_t *);
-static int glob2(Char *, Char *, Char *, Char *, glob_t *, size_t *);
-static int glob3(Char *, Char *, Char *, Char *, Char *, glob_t *, size_t *);
-static int globextend(const Char *, glob_t *, size_t *);
-static const Char *
- globtilde(const Char *, Char *, size_t, glob_t *);
-static int globexp1(const Char *, glob_t *, size_t *);
-static int globexp2(const Char *, const Char *, glob_t *, int *, size_t *);
-static int match(Char *, Char *, Char *);
-#ifdef DEBUG
-static void qprintf(const char *, Char *);
-#endif
-
-int
-glob(const char *pattern, int flags, int (*errfunc)(const char *, int), glob_t *pglob)
-{
- const char *patnext;
- size_t limit;
- Char *bufnext, *bufend, patbuf[MAXPATHLEN], prot;
- mbstate_t mbs;
- wchar_t wc;
- size_t clen;
-
- patnext = pattern;
- if (!(flags & GLOB_APPEND)) {
- pglob->gl_pathc = 0;
- pglob->gl_pathv = NULL;
- if (!(flags & GLOB_DOOFFS))
- pglob->gl_offs = 0;
- }
- if (flags & GLOB_LIMIT) {
- limit = pglob->gl_matchc;
- if (limit == 0)
- limit = ARG_MAX;
- } else
- limit = 0;
- pglob->gl_flags = flags & ~GLOB_MAGCHAR;
- pglob->gl_errfunc = errfunc;
- pglob->gl_matchc = 0;
-
- bufnext = patbuf;
- bufend = bufnext + MAXPATHLEN - 1;
- if (flags & GLOB_NOESCAPE) {
- memset(&mbs, 0, sizeof(mbs));
- while (bufend - bufnext >= MB_CUR_MAX) {
- clen = mbrtowc(&wc, patnext, MB_LEN_MAX, &mbs);
- if (clen == (size_t)-1 || clen == (size_t)-2)
- return (GLOB_NOMATCH);
- else if (clen == 0)
- break;
- *bufnext++ = wc;
- patnext += clen;
- }
- } else {
- /* Protect the quoted characters. */
- memset(&mbs, 0, sizeof(mbs));
- while (bufend - bufnext >= MB_CUR_MAX) {
- if (*patnext == QUOTE) {
- if (*++patnext == EOS) {
- *bufnext++ = QUOTE | M_PROTECT;
- continue;
- }
- prot = M_PROTECT;
- } else
- prot = 0;
- clen = mbrtowc(&wc, patnext, MB_LEN_MAX, &mbs);
- if (clen == (size_t)-1 || clen == (size_t)-2)
- return (GLOB_NOMATCH);
- else if (clen == 0)
- break;
- *bufnext++ = wc | prot;
- patnext += clen;
- }
- }
- *bufnext = EOS;
-
- if (flags & GLOB_BRACE)
- return globexp1(patbuf, pglob, &limit);
- else
- return glob0(patbuf, pglob, &limit);
-}
-
-/*
- * Expand recursively a glob {} pattern. When there is no more expansion
- * invoke the standard globbing routine to glob the rest of the magic
- * characters
- */
-static int
-globexp1(const Char *pattern, glob_t *pglob, size_t *limit)
-{
- const Char* ptr = pattern;
- int rv;
-
- /* Protect a single {}, for find(1), like csh */
- if (pattern[0] == LBRACE && pattern[1] == RBRACE && pattern[2] == EOS)
- return glob0(pattern, pglob, limit);
-
- while ((ptr = (const Char *) g_strchr((Char *) ptr, LBRACE)) != NULL)
- if (!globexp2(ptr, pattern, pglob, &rv, limit))
- return rv;
-
- return glob0(pattern, pglob, limit);
-}
-
-
-/*
- * Recursive brace globbing helper. Tries to expand a single brace.
- * If it succeeds then it invokes globexp1 with the new pattern.
- * If it fails then it tries to glob the rest of the pattern and returns.
- */
-static int
-globexp2(const Char *ptr, const Char *pattern, glob_t *pglob, int *rv, size_t *limit)
-{
- int i;
- Char *lm, *ls;
- const Char *pe, *pm, *pm1, *pl;
- Char patbuf[MAXPATHLEN];
-
- /* copy part up to the brace */
- for (lm = patbuf, pm = pattern; pm != ptr; *lm++ = *pm++)
- continue;
- *lm = EOS;
- ls = lm;
-
- /* Find the balanced brace */
- for (i = 0, pe = ++ptr; *pe; pe++)
- if (*pe == LBRACKET) {
- /* Ignore everything between [] */
- for (pm = pe++; *pe != RBRACKET && *pe != EOS; pe++)
- continue;
- if (*pe == EOS) {
- /*
- * We could not find a matching RBRACKET.
- * Ignore and just look for RBRACE
- */
- pe = pm;
- }
- }
- else if (*pe == LBRACE)
- i++;
- else if (*pe == RBRACE) {
- if (i == 0)
- break;
- i--;
- }
-
- /* Non matching braces; just glob the pattern */
- if (i != 0 || *pe == EOS) {
- *rv = glob0(patbuf, pglob, limit);
- return 0;
- }
-
- for (i = 0, pl = pm = ptr; pm <= pe; pm++)
- switch (*pm) {
- case LBRACKET:
- /* Ignore everything between [] */
- for (pm1 = pm++; *pm != RBRACKET && *pm != EOS; pm++)
- continue;
- if (*pm == EOS) {
- /*
- * We could not find a matching RBRACKET.
- * Ignore and just look for RBRACE
- */
- pm = pm1;
- }
- break;
-
- case LBRACE:
- i++;
- break;
-
- case RBRACE:
- if (i) {
- i--;
- break;
- }
- /* FALLTHROUGH */
- case COMMA:
- if (i && *pm == COMMA)
- break;
- else {
- /* Append the current string */
- for (lm = ls; (pl < pm); *lm++ = *pl++)
- continue;
- /*
- * Append the rest of the pattern after the
- * closing brace
- */
- for (pl = pe + 1; (*lm++ = *pl++) != EOS;)
- continue;
-
- /* Expand the current pattern */
-#ifdef DEBUG
- qprintf("globexp2:", patbuf);
-#endif
- *rv = globexp1(patbuf, pglob, limit);
-
- /* move after the comma, to the next string */
- pl = pm + 1;
- }
- break;
-
- default:
- break;
- }
- *rv = 0;
- return 0;
-}
-
-
-
-/*
- * expand tilde from the passwd file.
- */
-static const Char *
-globtilde(const Char *pattern, Char *patbuf, size_t patbuf_len, glob_t *pglob)
-{
- struct passwd *pwd;
- char *h;
- const Char *p;
- Char *b, *eb;
-
- if (*pattern != TILDE || !(pglob->gl_flags & GLOB_TILDE))
- return pattern;
-
- /*
- * Copy up to the end of the string or /
- */
- eb = &patbuf[patbuf_len - 1];
- for (p = pattern + 1, h = (char *) patbuf;
- h < (char *)eb && *p && *p != SLASH; *h++ = *p++)
- continue;
-
- *h = EOS;
-
- if (((char *) patbuf)[0] == EOS) {
- /*
- * handle a plain ~ or ~/ by expanding $HOME first (iff
- * we're not running setuid or setgid) and then trying
- * the password file
- */
- if (cygheap->user.issetuid() != 0 ||
- (h = getenv("HOME")) == NULL) {
- if (((h = getlogin()) != NULL &&
- (pwd = getpwnam(h)) != NULL) ||
- (pwd = getpwuid32(getuid32())) != NULL)
- h = pwd->pw_dir;
- else
- return pattern;
- }
- }
- else {
- /*
- * Expand a ~user
- */
- if ((pwd = getpwnam((char*) patbuf)) == NULL)
- return pattern;
- else
- h = pwd->pw_dir;
- }
-
- /* Copy the home directory */
- for (b = patbuf; b < eb && *h; *b++ = *h++)
- continue;
-
- /* Append the rest of the pattern */
- while (b < eb && (*b++ = *p++) != EOS)
- continue;
- *b = EOS;
-
- return patbuf;
-}
-
-
-/*
- * The main glob() routine: compiles the pattern (optionally processing
- * quotes), calls glob1() to do the real pattern matching, and finally
- * sorts the list (unless unsorted operation is requested). Returns 0
- * if things went well, nonzero if errors occurred.
- */
-static int
-glob0(const Char *pattern, glob_t *pglob, size_t *limit)
-{
- const Char *qpatnext;
- int err;
- size_t oldpathc;
- Char c, *bufnext, patbuf[MAXPATHLEN];
-
- qpatnext = globtilde(pattern, patbuf, MAXPATHLEN, pglob);
- oldpathc = pglob->gl_pathc;
- bufnext = patbuf;
-
- /* We don't need to check for buffer overflow any more. */
- while ((c = *qpatnext++) != EOS) {
- switch (c) {
- case LBRACKET:
- c = *qpatnext;
- if (c == NOT)
- ++qpatnext;
- if (*qpatnext == EOS ||
- g_strchr((Char *) qpatnext+1, RBRACKET) == NULL) {
- *bufnext++ = LBRACKET;
- if (c == NOT)
- --qpatnext;
- break;
- }
- *bufnext++ = M_SET;
- if (c == NOT)
- *bufnext++ = M_NOT;
- c = *qpatnext++;
- do {
- *bufnext++ = CHAR(c);
- if (*qpatnext == RANGE &&
- (c = qpatnext[1]) != RBRACKET) {
- *bufnext++ = M_RNG;
- *bufnext++ = CHAR(c);
- qpatnext += 2;
- }
- } while ((c = *qpatnext++) != RBRACKET);
- pglob->gl_flags |= GLOB_MAGCHAR;
- *bufnext++ = M_END;
- break;
- case QUESTION:
- pglob->gl_flags |= GLOB_MAGCHAR;
- *bufnext++ = M_ONE;
- break;
- case STAR:
- pglob->gl_flags |= GLOB_MAGCHAR;
- /* collapse adjacent stars to one,
- * to avoid exponential behavior
- */
- if (bufnext == patbuf || bufnext[-1] != M_ALL)
- *bufnext++ = M_ALL;
- break;
- default:
- *bufnext++ = CHAR(c);
- break;
- }
- }
- *bufnext = EOS;
-#ifdef DEBUG
- qprintf("glob0:", patbuf);
-#endif
-
- if ((err = glob1(patbuf, pglob, limit)) != 0)
- return(err);
-
- /*
- * If there was no match we are going to append the pattern
- * if GLOB_NOCHECK was specified or if GLOB_NOMAGIC was specified
- * and the pattern did not contain any magic characters
- * GLOB_NOMAGIC is there just for compatibility with csh.
- */
- if (pglob->gl_pathc == oldpathc) {
- if (((pglob->gl_flags & GLOB_NOCHECK) ||
- ((pglob->gl_flags & GLOB_NOMAGIC) &&
- !(pglob->gl_flags & GLOB_MAGCHAR))))
- return(globextend(pattern, pglob, limit));
- else
- return(GLOB_NOMATCH);
- }
- if (!(pglob->gl_flags & GLOB_NOSORT))
- qsort(pglob->gl_pathv + pglob->gl_offs + oldpathc,
- pglob->gl_pathc - oldpathc, sizeof(char *), compare);
- return(0);
-}
-
-static int
-compare(const void *p, const void *q)
-{
- return(strcmp(*(char **)p, *(char **)q));
-}
-
-static int
-glob1(Char *pattern, glob_t *pglob, size_t *limit)
-{
- Char pathbuf[MAXPATHLEN];
-
- /* A null pathname is invalid -- POSIX 1003.1 sect. 2.4. */
- if (*pattern == EOS)
- return(0);
- return(glob2(pathbuf, pathbuf, pathbuf + MAXPATHLEN - 1,
- pattern, pglob, limit));
-}
-
-/*
- * The functions glob2 and glob3 are mutually recursive; there is one level
- * of recursion for each segment in the pattern that contains one or more
- * meta characters.
- */
-static int
-glob2(Char *pathbuf, Char *pathend, Char *pathend_last, Char *pattern,
- glob_t *pglob, size_t *limit)
-{
- struct __stat64 sb;
- Char *p, *q;
- int anymeta;
-
- /*
- * Loop over pattern segments until end of pattern or until
- * segment with meta character found.
- */
- for (anymeta = 0;;) {
- if (*pattern == EOS) { /* End of pattern? */
- *pathend = EOS;
- if (g_lstat(pathbuf, &sb, pglob))
- return(0);
-
- if (((pglob->gl_flags & GLOB_MARK) &&
- pathend[-1] != SEP) && (S_ISDIR(sb.st_mode)
- || (S_ISLNK(sb.st_mode) &&
- (g_stat(pathbuf, &sb, pglob) == 0) &&
- S_ISDIR(sb.st_mode)))) {
- if (pathend + 1 > pathend_last)
- return (GLOB_ABORTED);
- *pathend++ = SEP;
- *pathend = EOS;
- }
- ++pglob->gl_matchc;
- return(globextend(pathbuf, pglob, limit));
- }
-
- /* Find end of next segment, copy tentatively to pathend. */
- q = pathend;
- p = pattern;
- while (*p != EOS && *p != SEP) {
- if (ismeta(*p))
- anymeta = 1;
- if (q + 1 > pathend_last)
- return (GLOB_ABORTED);
- *q++ = *p++;
- }
-
- if (!anymeta) { /* No expansion, do next segment. */
- pathend = q;
- pattern = p;
- while (*pattern == SEP) {
- if (pathend + 1 > pathend_last)
- return (GLOB_ABORTED);
- *pathend++ = *pattern++;
- }
- } else /* Need expansion, recurse. */
- return(glob3(pathbuf, pathend, pathend_last, pattern, p,
- pglob, limit));
- }
- /* NOTREACHED */
-}
-
-static int
-glob3(Char *pathbuf, Char *pathend, Char *pathend_last,
- Char *pattern, Char *restpattern,
- glob_t *pglob, size_t *limit)
-{
- struct dirent *dp;
- DIR *dirp;
- int err;
- char buf[MAXPATHLEN];
-
- /*
- * The readdirfunc declaration can't be prototyped, because it is
- * assigned, below, to two functions which are prototyped in glob.h
- * and dirent.h as taking pointers to differently typed opaque
- * structures.
- */
- struct dirent *(*readdirfunc)(void *);
-
- if (pathend > pathend_last)
- return (GLOB_ABORTED);
- *pathend = EOS;
- errno = 0;
-
- if ((dirp = g_opendir(pathbuf, pglob)) == NULL) {
- /* TODO: don't call for ENOENT or ENOTDIR? */
- if (pglob->gl_errfunc) {
- if (g_Ctoc(pathbuf, buf, sizeof(buf)))
- return (GLOB_ABORTED);
- if (pglob->gl_errfunc(buf, errno) ||
- pglob->gl_flags & GLOB_ERR)
- return (GLOB_ABORTED);
- }
- return((pglob->gl_flags & GLOB_ERR) ? GLOB_ABORTED : 0);
- }
-
- err = 0;
-
- /* Search directory for matching names. */
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- readdirfunc = pglob->gl_readdir;
- else
- readdirfunc = (dirent*(*)(void*)) readdir;
- while ((dp = (*readdirfunc)(dirp))) {
- char *sc;
- Char *dc;
- wchar_t wc;
- size_t clen;
- mbstate_t mbs;
-
- /* Initial DOT must be matched literally. */
- if (dp->d_name[0] == DOT && *pattern != DOT)
- continue;
- memset(&mbs, 0, sizeof(mbs));
- dc = pathend;
- sc = dp->d_name;
- while (dc < pathend_last) {
- clen = mbrtowc(&wc, sc, MB_LEN_MAX, &mbs);
- if (clen == (size_t)-1 || clen == (size_t)-2) {
- wc = *sc;
- clen = 1;
- memset(&mbs, 0, sizeof(mbs));
- }
- if ((*dc++ = wc) == EOS)
- break;
- sc += clen;
- }
- if (!match(pathend, pattern, restpattern)) {
- *pathend = EOS;
- continue;
- }
- err = glob2(pathbuf, --dc, pathend_last, restpattern,
- pglob, limit);
- if (err)
- break;
- }
-
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- (*pglob->gl_closedir)(dirp);
- else
- closedir(dirp);
- return(err);
-}
-
-
-/*
- * Extend the gl_pathv member of a glob_t structure to accomodate a new item,
- * add the new item, and update gl_pathc.
- *
- * This assumes the BSD realloc, which only copies the block when its size
- * crosses a power-of-two boundary; for v7 realloc, this would cause quadratic
- * behavior.
- *
- * Return 0 if new item added, error code if memory couldn't be allocated.
- *
- * Invariant of the glob_t structure:
- * Either gl_pathc is zero and gl_pathv is NULL; or gl_pathc > 0 and
- * gl_pathv points to (gl_offs + gl_pathc + 1) items.
- */
-static int
-globextend(const Char *path, glob_t *pglob, size_t *limit)
-{
- char **pathv;
- size_t i, newsize, len;
- char *copy;
- const Char *p;
-
- if (*limit && pglob->gl_pathc > *limit) {
- errno = 0;
- return (GLOB_NOSPACE);
- }
-
- newsize = sizeof(*pathv) * (2 + pglob->gl_pathc + pglob->gl_offs);
- pathv = pglob->gl_pathv ?
- (char **) realloc((char *)pglob->gl_pathv, newsize) :
- (char **) malloc(newsize);
- if (pathv == NULL) {
- if (pglob->gl_pathv) {
- free(pglob->gl_pathv);
- pglob->gl_pathv = NULL;
- }
- return(GLOB_NOSPACE);
- }
-
- if (pglob->gl_pathv == NULL && pglob->gl_offs > 0) {
- /* first time around -- clear initial gl_offs items */
- pathv += pglob->gl_offs;
- for (i = pglob->gl_offs + 1; --i > 0; )
- *--pathv = NULL;
- }
- pglob->gl_pathv = pathv;
-
- for (p = path; *p++;)
- continue;
- len = MB_CUR_MAX * (size_t)(p - path); /* XXX overallocation */
- if ((copy = (char *) malloc(len)) != NULL) {
- if (g_Ctoc(path, copy, len)) {
- free(copy);
- return (GLOB_NOSPACE);
- }
- pathv[pglob->gl_offs + pglob->gl_pathc++] = copy;
- }
- pathv[pglob->gl_offs + pglob->gl_pathc] = NULL;
- return(copy == NULL ? GLOB_NOSPACE : 0);
-}
-
-/*
- * pattern matching function for filenames. Each occurrence of the *
- * pattern causes a recursion level.
- */
-static int
-match(Char *name, Char *pat, Char *patend)
-{
- int ok, negate_range;
- Char c, k;
-
- while (pat < patend) {
- c = *pat++;
- switch (c & M_MASK) {
- case M_ALL:
- if (pat == patend)
- return(1);
- do
- if (match(name, pat, patend))
- return(1);
- while (*name++ != EOS);
- return(0);
- case M_ONE:
- if (*name++ == EOS)
- return(0);
- break;
- case M_SET:
- ok = 0;
- if ((k = *name++) == EOS)
- return(0);
- if ((negate_range = ((*pat & M_MASK) == M_NOT)) != EOS)
- ++pat;
- if (ignore_case_with_glob)
- {
- while (((c = *pat++) & M_MASK) != M_END)
- if ((*pat & M_MASK) == M_RNG) {
- if (tolower(c) <= tolower(k) && tolower(k) <= tolower(pat[1]))
- ok = 1;
- pat += 2;
- } else if (tolower(c) == tolower(k))
- ok = 1;
- }
- else
- {
- while (((c = *pat++) & M_MASK) != M_END)
- if ((*pat & M_MASK) == M_RNG) {
- if (c <= k && k <= pat[1])
- ok = 1;
- pat += 2;
- } else if (c == k)
- ok = 1;
- }
- if (ok == negate_range)
- return(0);
- break;
- default:
- if (ignore_case_with_glob)
- {
- if (tolower(*name) != tolower(c))
- return(0);
- ++name;
- }
- else
- {
- if (*name++ != c)
- return(0);
- }
- break;
- }
- }
- return(*name == EOS);
-}
-
-/* Free allocated data belonging to a glob_t structure. */
-void
-globfree(glob_t *pglob)
-{
- size_t i;
- char **pp;
-
- if (pglob->gl_pathv != NULL) {
- pp = pglob->gl_pathv + pglob->gl_offs;
- for (i = pglob->gl_pathc; i--; ++pp)
- if (*pp)
- free(*pp);
- free(pglob->gl_pathv);
- pglob->gl_pathv = NULL;
- }
-}
-
-static DIR *
-g_opendir(Char *str, glob_t *pglob)
-{
- char buf[MAXPATHLEN];
-
- if (!*str)
- strcpy(buf, ".");
- else {
- if (g_Ctoc(str, buf, sizeof(buf)))
- return (NULL);
- }
-
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- return (DIR *) ((*pglob->gl_opendir)((const char *) buf));
-
- return(opendir(buf));
-}
-
-static void
-stat32_to_stat64 (struct __stat32 *src, struct __stat64 *dst)
-{
- dst->st_dev = src->st_dev;
- dst->st_ino = src->st_ino;
- dst->st_mode = src->st_mode;
- dst->st_nlink = src->st_nlink;
- dst->st_uid = src->st_uid;
- dst->st_gid = src->st_gid;
- dst->st_rdev = src->st_rdev;
- dst->st_size = src->st_size;
- dst->st_atim = src->st_atim;
- dst->st_mtim = src->st_mtim;
- dst->st_ctim = src->st_ctim;
- dst->st_birthtim = src->st_mtim;
- dst->st_blksize = src->st_blksize;
- dst->st_blocks = src->st_blocks;
-}
-
-static int
-g_lstat(Char *fn, struct __stat64 *sb, glob_t *pglob)
-{
- char buf[MAXPATHLEN];
-
- if (g_Ctoc(fn, buf, sizeof(buf))) {
- errno = ENAMETOOLONG;
- return (-1);
- }
- if (pglob->gl_flags & GLOB_ALTDIRFUNC) {
- struct __stat32 lsb;
- int ret;
-
- if (CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES)
- ret = (*pglob->gl_lstat)(buf, sb);
- else if (!(ret = (*pglob->gl_lstat)(buf,
- (struct __stat64 *)&lsb)))
- stat32_to_stat64 (&lsb, sb);
- return ret;
- }
- return(lstat64(buf, sb));
-}
-
-static int
-g_stat(Char *fn, struct __stat64 *sb, glob_t *pglob)
-{
- char buf[MAXPATHLEN];
-
- if (g_Ctoc(fn, buf, sizeof(buf))) {
- errno = ENAMETOOLONG;
- return (-1);
- }
- if (pglob->gl_flags & GLOB_ALTDIRFUNC) {
- struct __stat32 lsb;
- int ret;
-
- if (CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES)
- ret = (*pglob->gl_stat)(buf, sb);
- else if (!(ret = (*pglob->gl_stat)(buf,
- (struct __stat64 *)&lsb)))
- stat32_to_stat64 (&lsb, sb);
- return ret;
- }
- return(stat64(buf, sb));
-}
-
-static Char *
-g_strchr(Char *str, wchar_t ch)
-{
-
- do {
- if (*str == ch)
- return (str);
- } while (*str++);
- return (NULL);
-}
-
-static int
-g_Ctoc(const Char *str, char *buf, size_t len)
-{
- mbstate_t mbs;
- size_t clen;
-
- memset(&mbs, 0, sizeof(mbs));
- while (len >= (size_t) MB_CUR_MAX) {
- clen = wcrtomb(buf, *str, &mbs);
- if (clen == (size_t)-1)
- return (1);
- if (*str == L'\0')
- return (0);
- str++;
- buf += clen;
- len -= clen;
- }
- return (1);
-}
-
-#ifdef DEBUG
-static void
-qprintf(const char *str, Char *s)
-{
- Char *p;
-
- (void)printf("%s:\n", str);
- for (p = s; *p; p++)
- (void)printf("%c", CHAR(*p));
- (void)printf("\n");
- for (p = s; *p; p++)
- (void)printf("%c", *p & M_PROTECT ? '"' : ' ');
- (void)printf("\n");
- for (p = s; *p; p++)
- (void)printf("%c", ismeta(*p) ? '_' : ' ');
- (void)printf("\n");
-}
-#endif
diff --git a/winsup/cygwin/gmon.c b/winsup/cygwin/gmon.c
deleted file mode 100644
index 048ef0d..0000000
--- a/winsup/cygwin/gmon.c
+++ /dev/null
@@ -1,285 +0,0 @@
-/*-
- * Copyright (c) 1983, 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if !defined(lint) && defined(LIBC_SCCS)
-static char rcsid[] = "$OpenBSD: gmon.c,v 1.8 1997/07/23 21:11:27 kstailey Exp $";
-#endif
-
-#include <fcntl.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/param.h>
-#include <sys/types.h>
-#include <gmon.h>
-
-#include <profil.h>
-#include <windows.h>
-
-/* XXX needed? */
-//extern char *minbrk __asm ("minbrk");
-
-struct gmonparam _gmonparam = { GMON_PROF_OFF };
-
-static int s_scale;
-/* see profil(2) where this is describe (incorrectly) */
-#define SCALE_1_TO_1 0x10000L
-
-#define ERR(s) write(2, s, sizeof(s))
-
-void moncontrol __P((int));
-
-static void *
-fake_sbrk(int size)
-{
- void *rv = malloc(size);
- if (rv)
- return rv;
- else
- return (void *) -1;
-}
-
-void
-monstartup(lowpc, highpc)
- u_long lowpc;
- u_long highpc;
-{
- register int o;
- char *cp;
- struct gmonparam *p = &_gmonparam;
-
- /*
- * round lowpc and highpc to multiples of the density we're using
- * so the rest of the scaling (here and in gprof) stays in ints.
- */
- p->lowpc = ROUNDDOWN(lowpc, HISTFRACTION * sizeof(HISTCOUNTER));
- p->highpc = ROUNDUP(highpc, HISTFRACTION * sizeof(HISTCOUNTER));
- p->textsize = p->highpc - p->lowpc;
- p->kcountsize = p->textsize / HISTFRACTION;
- p->hashfraction = HASHFRACTION;
- p->fromssize = p->textsize / p->hashfraction;
- p->tolimit = p->textsize * ARCDENSITY / 100;
- if (p->tolimit < MINARCS)
- p->tolimit = MINARCS;
- else if (p->tolimit > MAXARCS)
- p->tolimit = MAXARCS;
- p->tossize = p->tolimit * sizeof(struct tostruct);
-
- cp = fake_sbrk(p->kcountsize + p->fromssize + p->tossize);
- if (cp == (char *)-1) {
- ERR("monstartup: out of memory\n");
- return;
- }
-#ifdef notdef
- bzero(cp, p->kcountsize + p->fromssize + p->tossize);
-#endif
- p->tos = (struct tostruct *)cp;
- cp += p->tossize;
- p->kcount = (u_short *)cp;
- cp += p->kcountsize;
- p->froms = (u_short *)cp;
-
- /* XXX minbrk needed? */
- //minbrk = fake_sbrk(0);
- p->tos[0].link = 0;
-
- o = p->highpc - p->lowpc;
- if (p->kcountsize < o) {
-#ifndef notdef
- s_scale = ((float)p->kcountsize / o ) * SCALE_1_TO_1;
-#else /* avoid floating point */
- int quot = o / p->kcountsize;
-
- if (quot >= 0x10000)
- s_scale = 1;
- else if (quot >= 0x100)
- s_scale = 0x10000 / quot;
- else if (o >= 0x800000)
- s_scale = 0x1000000 / (o / (p->kcountsize >> 8));
- else
- s_scale = 0x1000000 / ((o << 8) / p->kcountsize);
-#endif
- } else
- s_scale = SCALE_1_TO_1;
-
- moncontrol(1);
-}
-
-void
-_mcleanup()
-{
- int fd;
- int hz;
- int fromindex;
- int endfrom;
- u_long frompc;
- int toindex;
- struct rawarc rawarc;
- struct gmonparam *p = &_gmonparam;
- struct gmonhdr gmonhdr, *hdr;
- char *proffile;
-#ifdef DEBUG
- int log, len;
- char dbuf[200];
-#endif
-
- if (p->state == GMON_PROF_ERROR)
- ERR("_mcleanup: tos overflow\n");
-
- hz = PROF_HZ;
- moncontrol(0);
-
-#ifdef nope
- if ((profdir = getenv("PROFDIR")) != NULL) {
- extern char *__progname;
- char *s, *t, *limit;
- pid_t pid;
- long divisor;
-
- /* If PROFDIR contains a null value, no profiling
- output is produced */
- if (*profdir == '\0') {
- return;
- }
-
- limit = buf + sizeof buf - 1 - 10 - 1 -
- strlen(__progname) - 1;
- t = buf;
- s = profdir;
- while((*t = *s) != '\0' && t < limit) {
- t++;
- s++;
- }
- *t++ = '/';
-
- /*
- * Copy and convert pid from a pid_t to a string. For
- * best performance, divisor should be initialized to
- * the largest power of 10 less than PID_MAX.
- */
- pid = getpid();
- divisor=10000;
- while (divisor > pid) divisor /= 10; /* skip leading zeros */
- do {
- *t++ = (pid/divisor) + '0';
- pid %= divisor;
- } while (divisor /= 10);
- *t++ = '.';
-
- s = __progname;
- while ((*t++ = *s++) != '\0')
- ;
-
- proffile = buf;
- } else {
- proffile = "gmon.out";
- }
-#else
- {
- char gmon_out[] = "gmon.out";
- proffile = gmon_out;
- }
-#endif
-
- fd = open(proffile , O_CREAT|O_TRUNC|O_WRONLY|O_BINARY, 0666);
- if (fd < 0) {
- perror( proffile );
- return;
- }
-#ifdef DEBUG
- log = open("gmon.log", O_CREAT|O_TRUNC|O_WRONLY, 0664);
- if (log < 0) {
- perror("mcount: gmon.log");
- return;
- }
- len = sprintf(dbuf, "[mcleanup1] kcount 0x%x ssiz %d\n",
- p->kcount, p->kcountsize);
- write(log, dbuf, len);
-#endif
- hdr = (struct gmonhdr *)&gmonhdr;
- hdr->lpc = p->lowpc;
- hdr->hpc = p->highpc;
- hdr->ncnt = p->kcountsize + sizeof(gmonhdr);
- hdr->version = GMONVERSION;
- hdr->profrate = hz;
- write(fd, (char *)hdr, sizeof *hdr);
- write(fd, p->kcount, p->kcountsize);
- endfrom = p->fromssize / sizeof(*p->froms);
- for (fromindex = 0; fromindex < endfrom; fromindex++) {
- if (p->froms[fromindex] == 0)
- continue;
-
- frompc = p->lowpc;
- frompc += fromindex * p->hashfraction * sizeof(*p->froms);
- for (toindex = p->froms[fromindex]; toindex != 0;
- toindex = p->tos[toindex].link) {
-#ifdef DEBUG
- len = sprintf(dbuf,
- "[mcleanup2] frompc 0x%x selfpc 0x%x count %d\n" ,
- frompc, p->tos[toindex].selfpc,
- p->tos[toindex].count);
- write(log, dbuf, len);
-#endif
- rawarc.raw_frompc = frompc;
- rawarc.raw_selfpc = p->tos[toindex].selfpc;
- rawarc.raw_count = p->tos[toindex].count;
- write(fd, &rawarc, sizeof rawarc);
- }
- }
- close(fd);
-}
-
-/*
- * Control profiling
- * profiling is what mcount checks to see if
- * all the data structures are ready.
- */
-void
-moncontrol(mode)
- int mode;
-{
- struct gmonparam *p = &_gmonparam;
-
- if (mode) {
- /* start */
- profil((char *)p->kcount, p->kcountsize, p->lowpc,
- s_scale);
- p->state = GMON_PROF_ON;
- } else {
- /* stop */
- profil((char *)0, 0, 0, 0);
- p->state = GMON_PROF_OFF;
- }
-}
-
-
diff --git a/winsup/cygwin/gmon.h b/winsup/cygwin/gmon.h
deleted file mode 100644
index be01679..0000000
--- a/winsup/cygwin/gmon.h
+++ /dev/null
@@ -1,166 +0,0 @@
-/* $OpenBSD: gmon.h,v 1.3 1996/04/21 22:31:46 deraadt Exp $ */
-/* $NetBSD: gmon.h,v 1.5 1996/04/09 20:55:30 cgd Exp $ */
-
-/*-
- * Copyright (c) 1982, 1986, 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)gmon.h 8.2 (Berkeley) 1/4/94
- */
-
-#ifndef _SYS_GMON_H_
-#define _SYS_GMON_H_
-
-#ifndef __P
-#define __P(x) x
-#endif
-
-#include <profile.h>
-
-/*
- * Structure prepended to gmon.out profiling data file.
- */
-struct gmonhdr {
- u_long lpc; /* base pc address of sample buffer */
- u_long hpc; /* max pc address of sampled buffer */
- int ncnt; /* size of sample buffer (plus this header) */
- int version; /* version number */
- int profrate; /* profiling clock rate */
- int spare[3]; /* reserved */
-};
-#define GMONVERSION 0x00051879
-
-/*
- * histogram counters are unsigned shorts (according to the kernel).
- */
-#define HISTCOUNTER unsigned short
-
-/*
- * fraction of text space to allocate for histogram counters here, 1/2
- */
-#define HISTFRACTION 2
-
-/*
- * Fraction of text space to allocate for from hash buckets.
- * The value of HASHFRACTION is based on the minimum number of bytes
- * of separation between two subroutine call points in the object code.
- * Given MIN_SUBR_SEPARATION bytes of separation the value of
- * HASHFRACTION is calculated as:
- *
- * HASHFRACTION = MIN_SUBR_SEPARATION / (2 * sizeof(short) - 1);
- *
- * For example, on the VAX, the shortest two call sequence is:
- *
- * calls $0,(r0)
- * calls $0,(r0)
- *
- * which is separated by only three bytes, thus HASHFRACTION is
- * calculated as:
- *
- * HASHFRACTION = 3 / (2 * 2 - 1) = 1
- *
- * Note that the division above rounds down, thus if MIN_SUBR_FRACTION
- * is less than three, this algorithm will not work!
- *
- * In practice, however, call instructions are rarely at a minimal
- * distance. Hence, we will define HASHFRACTION to be 2 across all
- * architectures. This saves a reasonable amount of space for
- * profiling data structures without (in practice) sacrificing
- * any granularity.
- */
-#define HASHFRACTION 2
-
-/*
- * percent of text space to allocate for tostructs with a minimum.
- */
-#define ARCDENSITY 2
-#define MINARCS 50
-#define MAXARCS ((1 << (8 * sizeof(HISTCOUNTER))) - 2)
-
-struct tostruct {
- u_long selfpc;
- long count;
- u_short link;
- u_short pad;
-};
-
-/*
- * a raw arc, with pointers to the calling site and
- * the called site and a count.
- */
-struct rawarc {
- u_long raw_frompc;
- u_long raw_selfpc;
- long raw_count;
-};
-
-/*
- * general rounding functions.
- */
-#define ROUNDDOWN(x,y) (((x)/(y))*(y))
-#define ROUNDUP(x,y) ((((x)+(y)-1)/(y))*(y))
-
-/*
- * The profiling data structures are housed in this structure.
- */
-struct gmonparam {
- int state;
- u_short *kcount;
- u_long kcountsize;
- u_short *froms;
- u_long fromssize;
- struct tostruct *tos;
- u_long tossize;
- long tolimit;
- u_long lowpc;
- u_long highpc;
- u_long textsize;
- u_long hashfraction;
-};
-extern struct gmonparam _gmonparam;
-
-/*
- * Possible states of profiling.
- */
-#define GMON_PROF_ON 0
-#define GMON_PROF_BUSY 1
-#define GMON_PROF_ERROR 2
-#define GMON_PROF_OFF 3
-
-/*
- * Sysctl definitions for extracting profiling information from the kernel.
- */
-#define GPROF_STATE 0 /* int: profiling enabling variable */
-#define GPROF_COUNT 1 /* struct: profile tick count buffer */
-#define GPROF_FROMS 2 /* struct: from location hash bucket */
-#define GPROF_TOS 3 /* struct: destination/count structure */
-#define GPROF_GMONPARAM 4 /* struct: profiling parameters (see above) */
-#endif /* !_SYS_GMONH_ */
diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc
deleted file mode 100644
index d9fe4f3..0000000
--- a/winsup/cygwin/grp.cc
+++ /dev/null
@@ -1,513 +0,0 @@
-/* grp.cc
-
- Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007 Red Hat, Inc.
-
- Original stubs by Jason Molenda of Cygnus Support, crash@cygnus.com
- First implementation by Gunther Ebert, gunther.ebert@ixos-leipzig.de
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include "cygerrno.h"
-#include "pinfo.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "pwdgrp.h"
-
-static __group32 *group_buf;
-static pwdgrp gr (group_buf);
-static char * NO_COPY null_ptr;
-
-bool
-pwdgrp::parse_group ()
-{
-# define grp (*group_buf)[curr_lines]
- grp.gr_name = next_str (':');
- if (!*grp.gr_name)
- return false;
-
- grp.gr_passwd = next_str (':');
-
- if (!next_num (grp.gr_gid))
- return false;
-
- int n;
- char *dp = raw_ptr ();
- for (n = 0; *next_str (','); n++)
- continue;
-
- grp.gr_mem = &null_ptr;
- if (n)
- {
- char **namearray = (char **) calloc (n + 1, sizeof (char *));
- if (namearray)
- {
- for (int i = 0; i < n; i++, dp = strchr (dp, '\0') + 1)
- namearray[i] = dp;
- grp.gr_mem = namearray;
- }
- }
-
- return true;
-# undef grp
-}
-
-/* Cygwin internal */
-/* Read in /etc/group and save contents in the group cache */
-/* This sets group_in_memory_p to 1 so functions in this file can
- tell that /etc/group has been read in */
-void
-pwdgrp::read_group ()
-{
- for (int i = 0; i < gr.curr_lines; i++)
- if ((*group_buf)[i].gr_mem != &null_ptr)
- free ((*group_buf)[i].gr_mem);
-
- load (L"\\etc\\group");
-
- /* Complete /etc/group in memory if needed */
- if (!internal_getgrgid (myself->gid))
- {
- static char linebuf [200];
- char group_name [UNLEN + 1] = "mkgroup";
- char strbuf[128] = "";
- struct __group32 *gr;
-
- cygheap->user.groups.pgsid.string (strbuf);
- if ((gr = internal_getgrsid (cygheap->user.groups.pgsid)))
- snprintf (group_name, sizeof (group_name),
- "passwd/group_GID_clash(%lu/%lu)", myself->gid, gr->gr_gid);
- if (myself->uid == UNKNOWN_UID)
- strcpy (group_name, "mkpasswd"); /* Feedback... */
- snprintf (linebuf, sizeof (linebuf), "%s:%s:%lu:%s",
- group_name, strbuf, myself->gid, cygheap->user.name ());
- debug_printf ("Completing /etc/group: %s", linebuf);
- add_line (linebuf);
- }
- static char NO_COPY pretty_ls[] = "????????::-1:";
- add_line (pretty_ls);
-}
-
-muto NO_COPY pwdgrp::pglock;
-
-pwdgrp::pwdgrp (passwd *&pbuf) :
- pwdgrp_buf_elem_size (sizeof (*pbuf)), passwd_buf (&pbuf)
-{
- read = &pwdgrp::read_passwd;
- parse = &pwdgrp::parse_passwd;
- pglock.init ("pglock");
-}
-
-pwdgrp::pwdgrp (__group32 *&gbuf) :
- pwdgrp_buf_elem_size (sizeof (*gbuf)), group_buf (&gbuf)
-{
- read = &pwdgrp::read_group;
- parse = &pwdgrp::parse_group;
- pglock.init ("pglock");
-}
-
-struct __group32 *
-internal_getgrsid (cygpsid &sid)
-{
- char sid_string[128];
-
- gr.refresh (false);
-
- if (sid.string (sid_string))
- for (int i = 0; i < gr.curr_lines; i++)
- if (!strcmp (sid_string, group_buf[i].gr_passwd))
- return group_buf + i;
- return NULL;
-}
-
-struct __group32 *
-internal_getgrgid (__gid32_t gid, bool check)
-{
- gr.refresh (check);
-
- for (int i = 0; i < gr.curr_lines; i++)
- if (group_buf[i].gr_gid == gid)
- return group_buf + i;
- return NULL;
-}
-
-struct __group32 *
-internal_getgrnam (const char *name, bool check)
-{
- gr.refresh (check);
-
- for (int i = 0; i < gr.curr_lines; i++)
- if (strcasematch (group_buf[i].gr_name, name))
- return group_buf + i;
-
- /* Didn't find requested group */
- return NULL;
-}
-
-static struct __group16 *
-grp32togrp16 (struct __group16 *gp16, struct __group32 *gp32)
-{
- if (!gp16 || !gp32)
- return NULL;
-
- /* Copying the pointers is actually unnecessary. Just having the correct
- return type is important. */
- gp16->gr_name = gp32->gr_name;
- gp16->gr_passwd = gp32->gr_passwd;
- gp16->gr_gid = (__gid16_t) gp32->gr_gid; /* Not loss-free */
- gp16->gr_mem = gp32->gr_mem;
-
- return gp16;
-}
-
-extern "C" int
-getgrgid_r (__gid32_t gid, struct __group32 *grp, char *buffer, size_t bufsize,
- struct __group32 **result)
-{
- *result = NULL;
-
- if (!grp || !buffer)
- return ERANGE;
-
- struct __group32 *tempgr = internal_getgrgid (gid, true);
- pthread_testcancel ();
- if (!tempgr)
- return 0;
-
- /* check needed buffer size. */
- int i;
- size_t needsize = strlen (tempgr->gr_name) + strlen (tempgr->gr_passwd)
- + 2 + sizeof (char *);
- for (i = 0; tempgr->gr_mem[i]; ++i)
- needsize += strlen (tempgr->gr_mem[i]) + 1 + sizeof (char *);
- if (needsize > bufsize)
- return ERANGE;
-
- /* make a copy of tempgr */
- *result = grp;
- grp->gr_gid = tempgr->gr_gid;
- grp->gr_name = buffer;
- grp->gr_passwd = grp->gr_name + strlen (tempgr->gr_name) + 1;
- grp->gr_mem = (char **) (grp->gr_passwd + strlen (tempgr->gr_passwd) + 1);
- char *mem = (char *) grp->gr_mem + (i + 1) * sizeof (char *);
- for (i = 0; tempgr->gr_mem[i]; ++i)
- {
- grp->gr_mem[i] = mem;
- mem += strlen (tempgr->gr_mem[i]) + 1;
- }
- grp->gr_mem[i] = NULL;
- strcpy (grp->gr_name, tempgr->gr_name);
- strcpy (grp->gr_passwd, tempgr->gr_passwd);
- for (i = 0; tempgr->gr_mem[i]; ++i)
- strcpy (grp->gr_mem[i], tempgr->gr_mem[i]);
- return 0;
-}
-
-extern "C" struct __group32 *
-getgrgid32 (__gid32_t gid)
-{
- return internal_getgrgid (gid, true);
-}
-
-extern "C" struct __group16 *
-getgrgid (__gid16_t gid)
-{
- static struct __group16 g16; /* FIXME: thread-safe? */
-
- return grp32togrp16 (&g16, getgrgid32 (gid16togid32 (gid)));
-}
-
-extern "C" int
-getgrnam_r (const char *nam, struct __group32 *grp, char *buffer,
- size_t bufsize, struct __group32 **result)
-{
- *result = NULL;
-
- if (!grp || !buffer)
- return ERANGE;
-
- struct __group32 *tempgr = internal_getgrnam (nam, true);
- pthread_testcancel ();
- if (!tempgr)
- return 0;
-
- /* check needed buffer size. */
- int i;
- size_t needsize = strlen (tempgr->gr_name) + strlen (tempgr->gr_passwd)
- + 2 + sizeof (char *);
- for (i = 0; tempgr->gr_mem[i]; ++i)
- needsize += strlen (tempgr->gr_mem[i]) + 1 + sizeof (char *);
- if (needsize > bufsize)
- return ERANGE;
-
- /* make a copy of tempgr */
- *result = grp;
- grp->gr_gid = tempgr->gr_gid;
- grp->gr_name = buffer;
- grp->gr_passwd = grp->gr_name + strlen (tempgr->gr_name) + 1;
- grp->gr_mem = (char **) (grp->gr_passwd + strlen (tempgr->gr_passwd) + 1);
- char *mem = (char *) grp->gr_mem + (i + 1) * sizeof (char *);
- for (i = 0; tempgr->gr_mem[i]; ++i)
- {
- grp->gr_mem[i] = mem;
- mem += strlen (tempgr->gr_mem[i]) + 1;
- }
- grp->gr_mem[i] = NULL;
- strcpy (grp->gr_name, tempgr->gr_name);
- strcpy (grp->gr_passwd, tempgr->gr_passwd);
- for (i = 0; tempgr->gr_mem[i]; ++i)
- strcpy (grp->gr_mem[i], tempgr->gr_mem[i]);
- return 0;
-}
-
-extern "C" struct __group32 *
-getgrnam32 (const char *name)
-{
- return internal_getgrnam (name, true);
-}
-
-extern "C" struct __group16 *
-getgrnam (const char *name)
-{
- static struct __group16 g16; /* FIXME: thread-safe? */
-
- return grp32togrp16 (&g16, getgrnam32 (name));
-}
-
-extern "C" void
-endgrent ()
-{
- _my_tls.locals.grp_pos = 0;
-}
-
-extern "C" struct __group32 *
-getgrent32 ()
-{
- if (_my_tls.locals.grp_pos == 0)
- gr.refresh (true);
- if (_my_tls.locals.grp_pos < gr.curr_lines)
- return group_buf + _my_tls.locals.grp_pos++;
-
- return NULL;
-}
-
-extern "C" struct __group16 *
-getgrent ()
-{
- static struct __group16 g16; /* FIXME: thread-safe? */
-
- return grp32togrp16 (&g16, getgrent32 ());
-}
-
-extern "C" void
-setgrent ()
-{
- _my_tls.locals.grp_pos = 0;
-}
-
-/* Internal function. ONLY USE THIS INTERNALLY, NEVER `getgrent'!!! */
-struct __group32 *
-internal_getgrent (int pos)
-{
- gr.refresh (false);
-
- if (pos < gr.curr_lines)
- return group_buf + pos;
- return NULL;
-}
-
-int
-internal_getgroups (int gidsetsize, __gid32_t *grouplist, cygpsid * srchsid)
-{
- HANDLE hToken = NULL;
- DWORD size;
- int cnt = 0;
- struct __group32 *gr;
-
- if (!srchsid && cygheap->user.groups.issetgroups ())
- {
- cygsid sid;
- for (int gidx = 0; (gr = internal_getgrent (gidx)); ++gidx)
- if (sid.getfromgr (gr))
- for (int pg = 0; pg < cygheap->user.groups.sgsids.count (); ++pg)
- if (sid == cygheap->user.groups.sgsids.sids[pg]
- && sid != well_known_world_sid)
- {
- if (cnt < gidsetsize)
- grouplist[cnt] = gr->gr_gid;
- ++cnt;
- if (gidsetsize && cnt > gidsetsize)
- goto error;
- break;
- }
- return cnt;
- }
-
-
- /* If impersonated, use impersonation token. */
- if (cygheap->user.issetuid ())
- hToken = cygheap->user.primary_token ();
- else
- hToken = hProcToken;
-
- if (GetTokenInformation (hToken, TokenGroups, NULL, 0, &size)
- || GetLastError () == ERROR_INSUFFICIENT_BUFFER)
- {
- PTOKEN_GROUPS groups = (PTOKEN_GROUPS) alloca (size);
-
- if (GetTokenInformation (hToken, TokenGroups, groups, size, &size))
- {
- cygsid sid;
-
- if (srchsid)
- {
- for (DWORD pg = 0; pg < groups->GroupCount; ++pg)
- if ((cnt = (*srchsid == groups->Groups[pg].Sid)))
- break;
- }
- else
- for (int gidx = 0; (gr = internal_getgrent (gidx)); ++gidx)
- if (sid.getfromgr (gr))
- for (DWORD pg = 0; pg < groups->GroupCount; ++pg)
- if (sid == groups->Groups[pg].Sid
- && (groups->Groups[pg].Attributes
- & (SE_GROUP_ENABLED | SE_GROUP_INTEGRITY_ENABLED))
- && sid != well_known_world_sid)
- {
- if (cnt < gidsetsize)
- grouplist[cnt] = gr->gr_gid;
- ++cnt;
- if (gidsetsize && cnt > gidsetsize)
- goto error;
- break;
- }
- }
- }
- else
- debug_printf ("%d = GetTokenInformation(NULL) %E", size);
- return cnt;
-
-error:
- set_errno (EINVAL);
- return -1;
-}
-
-extern "C" int
-getgroups32 (int gidsetsize, __gid32_t *grouplist)
-{
- return internal_getgroups (gidsetsize, grouplist);
-}
-
-extern "C" int
-getgroups (int gidsetsize, __gid16_t *grouplist)
-{
- __gid32_t *grouplist32 = NULL;
-
- if (gidsetsize < 0)
- {
- set_errno (EINVAL);
- return -1;
- }
- if (gidsetsize > 0 && grouplist)
- grouplist32 = (__gid32_t *) alloca (gidsetsize * sizeof (__gid32_t));
-
- int ret = internal_getgroups (gidsetsize, grouplist32);
-
- if (gidsetsize > 0 && grouplist)
- for (int i = 0; i < ret; ++ i)
- grouplist[i] = grouplist32[i];
-
- return ret;
-}
-
-extern "C" int
-initgroups32 (const char *name, __gid32_t gid)
-{
- int ret = -1;
-
- cygheap->user.deimpersonate ();
- struct passwd *pw = internal_getpwnam (name);
- struct __group32 *gr = internal_getgrgid (gid);
- cygsid usersid, grpsid;
- if (!usersid.getfrompw (pw) || !grpsid.getfromgr (gr))
- set_errno (EINVAL);
- else
- {
- cygsidlist tmp_gsids (cygsidlist_auto, 12);
- if (get_server_groups (tmp_gsids, usersid, pw))
- {
- tmp_gsids += grpsid;
- cygsidlist new_gsids (cygsidlist_alloc, tmp_gsids.count ());
- for (int i = 0; i < tmp_gsids.count (); i++)
- new_gsids.sids[i] = tmp_gsids.sids[i];
- new_gsids.count (tmp_gsids.count ());
- cygheap->user.groups.update_supp (new_gsids);
- ret = 0;
- }
- }
- cygheap->user.reimpersonate ();
- syscall_printf ( "%d = initgroups (%s, %u)", ret, name, gid);
- return ret;
-}
-
-extern "C" int
-initgroups (const char *name, __gid16_t gid)
-{
- return initgroups32 (name, gid16togid32(gid));
-}
-
-/* setgroups32: standards? */
-extern "C" int
-setgroups32 (int ngroups, const __gid32_t *grouplist)
-{
- syscall_printf ("setgroups32 (%d)", ngroups);
- if (ngroups < 0 || (ngroups > 0 && !grouplist))
- {
- set_errno (EINVAL);
- return -1;
- }
-
- cygsidlist gsids (cygsidlist_alloc, ngroups);
- struct __group32 *gr;
-
- if (ngroups && !gsids.sids)
- return -1;
-
- for (int gidx = 0; gidx < ngroups; ++gidx)
- {
- if ((gr = internal_getgrgid (grouplist[gidx]))
- && gsids.addfromgr (gr))
- continue;
- debug_printf ("No sid found for gid %d", grouplist[gidx]);
- gsids.free_sids ();
- set_errno (EINVAL);
- return -1;
- }
- cygheap->user.groups.update_supp (gsids);
- return 0;
-}
-
-extern "C" int
-setgroups (int ngroups, const __gid16_t *grouplist)
-{
- __gid32_t *grouplist32 = NULL;
-
- if (ngroups > 0 && grouplist)
- {
- grouplist32 = (__gid32_t *) alloca (ngroups * sizeof (__gid32_t));
- if (grouplist32 == NULL)
- return -1;
- for (int i = 0; i < ngroups; i++)
- grouplist32[i] = grouplist[i];
- }
- return setgroups32 (ngroups, grouplist32);
-}
diff --git a/winsup/cygwin/heap.cc b/winsup/cygwin/heap.cc
deleted file mode 100644
index adf041b..0000000
--- a/winsup/cygwin/heap.cc
+++ /dev/null
@@ -1,175 +0,0 @@
-/* heap.cc: Cygwin heap manager.
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 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. */
-
-#include "winsup.h"
-#include "cygerrno.h"
-#include "shared_info.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "child_info.h"
-
-#define assert(x)
-
-static unsigned page_const;
-
-#define MINHEAP_SIZE (4 * 1024 * 1024)
-
-/* Initialize the heap at process start up. */
-void
-heap_init ()
-{
- const DWORD alloctype = MEM_RESERVE;
- /* If we're the forkee, we must allocate the heap at exactly the same place
- as our parent. If not, we don't care where it ends up. */
-
- page_const = system_info.dwPageSize;
- if (!cygheap->user_heap.base)
- {
- cygheap->user_heap.chunk = cygwin_shared->heap_chunk_size ();
- /* For some obscure reason Vista and 2003 sometimes reserve space after
- calls to CreateProcess overlapping the spot where the heap has been
- allocated. This apparently spoils fork. The behaviour looks quite
- arbitrary. Experiments on Vista show a memory size of 0x37e000 or
- 0x1fd000 overlapping the usual heap by at most 0x1ed000. So what
- we do here is to allocate the heap with an extra slop of (by default)
- 0x200000 and set the appropriate pointers to the start of the heap
- area + slop. A forking child then creates its heap at the new start
- address and without the slop factor. Since this is not entirely
- foolproof we add a registry setting "heap_slop_in_mb" so the slop
- factor can be influenced by the user if the need arises. */
- cygheap->user_heap.slop = cygwin_shared->heap_slop_size ();
- while (cygheap->user_heap.chunk >= MINHEAP_SIZE)
- {
- /* Initialize page mask and default heap size. Preallocate a heap
- * to assure contiguous memory. */
- cygheap->user_heap.base =
- VirtualAlloc (NULL, cygheap->user_heap.chunk
- + cygheap->user_heap.slop,
- alloctype, PAGE_NOACCESS);
- if (cygheap->user_heap.base)
- break;
- cygheap->user_heap.chunk -= 1 * 1024 * 1024;
- }
- if (cygheap->user_heap.base == NULL)
- api_fatal ("unable to allocate heap, heap_chunk_size %p, slop %p, %E",
- cygheap->user_heap.chunk, cygheap->user_heap.slop);
- cygheap->user_heap.base = (void *) ((char *) cygheap->user_heap.base
- + cygheap->user_heap.slop);
- cygheap->user_heap.ptr = cygheap->user_heap.top = cygheap->user_heap.base;
- cygheap->user_heap.max = (char *) cygheap->user_heap.base
- + cygheap->user_heap.chunk;
- }
- else
- {
- DWORD chunk = cygheap->user_heap.chunk; /* allocation chunk */
- /* total size commited in parent */
- DWORD allocsize = (char *) cygheap->user_heap.top -
- (char *) cygheap->user_heap.base;
-
- /* Loop until we've managed to reserve an adequate amount of memory. */
- char *p;
- DWORD reserve_size = chunk * ((allocsize + (chunk - 1)) / chunk);
- while (1)
- {
- p = (char *) VirtualAlloc (cygheap->user_heap.base, reserve_size,
- alloctype, PAGE_READWRITE);
- if (p)
- break;
- if ((reserve_size -= page_const) < allocsize)
- break;
- }
- if (!p && in_forkee && !fork_info->handle_failure (GetLastError ()))
- api_fatal ("couldn't allocate heap, %E, base %p, top %p, "
- "reserve_size %d, allocsize %d, page_const %d",
- cygheap->user_heap.base, cygheap->user_heap.top,
- reserve_size, allocsize, page_const);
- if (p != cygheap->user_heap.base)
- api_fatal ("heap allocated at wrong address %p (mapped) != %p (expected)", p, cygheap->user_heap.base);
- if (allocsize && !VirtualAlloc (cygheap->user_heap.base, allocsize, MEM_COMMIT, PAGE_READWRITE))
- api_fatal ("MEM_COMMIT failed, %E");
- }
-
- debug_printf ("heap base %p, heap top %p", cygheap->user_heap.base,
- cygheap->user_heap.top);
- page_const--;
- // malloc_init ();
-}
-
-#define pround(n) (((size_t)(n) + page_const) & ~page_const)
-
-/* FIXME: This function no longer handles "split heaps". */
-
-extern "C" void *
-sbrk (int n)
-{
- char *newtop, *newbrk;
- unsigned commitbytes, newbrksize;
-
- if (n == 0)
- return cygheap->user_heap.ptr; /* Just wanted to find current cygheap->user_heap.ptr address */
-
- newbrk = (char *) cygheap->user_heap.ptr + n; /* Where new cygheap->user_heap.ptr will be */
- newtop = (char *) pround (newbrk); /* Actual top of allocated memory -
- on page boundary */
-
- if (newtop == cygheap->user_heap.top)
- goto good;
-
- if (n < 0)
- { /* Freeing memory */
- assert (newtop < cygheap->user_heap.top);
- n = (char *) cygheap->user_heap.top - newtop;
- if (VirtualFree (newtop, n, MEM_DECOMMIT)) /* Give it back to OS */
- goto good; /* Didn't take */
- else
- goto err;
- }
-
- assert (newtop > cygheap->user_heap.top);
-
- /* Find the number of bytes to commit, rounded up to the nearest page. */
- commitbytes = pround (newtop - (char *) cygheap->user_heap.top);
-
- /* Need to grab more pages from the OS. If this fails it may be because
- we have used up previously reserved memory. Or, we're just plumb out
- of memory. Only attempt to commit memory that we know we've previously
- reserved. */
- if (newtop <= cygheap->user_heap.max)
- {
- if (VirtualAlloc (cygheap->user_heap.top, commitbytes, MEM_COMMIT, PAGE_READWRITE) != NULL)
- goto good;
- }
-
- /* Couldn't allocate memory. Maybe we can reserve some more.
- Reserve either the maximum of the standard cygwin_shared->heap_chunk_size ()
- or the requested amount. Then attempt to actually allocate it. */
- if ((newbrksize = cygheap->user_heap.chunk) < commitbytes)
- newbrksize = commitbytes;
-
- if ((VirtualAlloc (cygheap->user_heap.top, newbrksize, MEM_RESERVE, PAGE_NOACCESS)
- || VirtualAlloc (cygheap->user_heap.top, newbrksize = commitbytes, MEM_RESERVE, PAGE_NOACCESS))
- && VirtualAlloc (cygheap->user_heap.top, commitbytes, MEM_COMMIT, PAGE_READWRITE) != NULL)
- {
- cygheap->user_heap.max = (char *) cygheap->user_heap.max + pround (newbrksize);
- goto good;
- }
-
-err:
- set_errno (ENOMEM);
- return (void *) -1;
-
-good:
- void *oldbrk = cygheap->user_heap.ptr;
- cygheap->user_heap.ptr = newbrk;
- cygheap->user_heap.top = newtop;
- return oldbrk;
-}
diff --git a/winsup/cygwin/heap.h b/winsup/cygwin/heap.h
deleted file mode 100644
index b497dd3..0000000
--- a/winsup/cygwin/heap.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* heap.h: Cygwin heap manager definitions.
-
- Copyright 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "perprocess.h"
-
-/* Heap management. */
-void heap_init ();
-void malloc_init ();
-
-#define inheap(s) \
- (cygheap->user_heap.ptr && s \
- && ((char *) (s) >= (char *) cygheap->user_heap.base) \
- && ((char *) (s) <= (char *) cygheap->user_heap.top))
diff --git a/winsup/cygwin/hires.h b/winsup/cygwin/hires.h
deleted file mode 100644
index 3c7bd27..0000000
--- a/winsup/cygwin/hires.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* hires.h: Definitions for hires clock calculations
-
- Copyright 2002, 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. */
-
-#ifndef __HIRES_H__
-#define __HIRES_H__
-
-#include <mmsystem.h>
-
-/* Largest delay in ms for sleep and alarm calls.
- Allow actual delay to exceed requested delay by 10 s.
- Express as multiple of 1000 (i.e. seconds) + max resolution
- The tv_sec argument in timeval structures cannot exceed
- HIRES_DELAY_MAX / 1000 - 1, so that adding fractional part
- and rounding won't exceed HIRES_DELAY_MAX */
-#define HIRES_DELAY_MAX ((((UINT_MAX - 10000) / 1000) * 1000) + 10)
-
-class hires_base
-{
- protected:
- int inited;
-};
-
-class hires_us : hires_base
-{
- LARGE_INTEGER primed_ft;
- LARGE_INTEGER primed_pc;
- double freq;
- void prime ();
- public:
- LONGLONG usecs (bool justdelta);
-};
-
-class hires_ms : hires_base
-{
- LONGLONG initime_us;
- void prime ();
- public:
- LONGLONG usecs ();
- LONGLONG msecs () {return usecs () / 1000LL;}
- UINT dmsecs () { return timeGetTime (); }
- UINT resolution ();
- LONGLONG uptime () {return (usecs () - initime_us) / 1000LL;}
-};
-
-extern hires_ms gtod;
-#endif /*__HIRES_H__*/
diff --git a/winsup/cygwin/hookapi.cc b/winsup/cygwin/hookapi.cc
deleted file mode 100644
index 7a13ee0..0000000
--- a/winsup/cygwin/hookapi.cc
+++ /dev/null
@@ -1,304 +0,0 @@
-/* hookapi.cc
-
- Copyright 2005, 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include "ntdll.h"
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-
-#define rva(coerce, base, addr) (coerce) ((char *) (base) + (addr))
-#define rvacyg(coerce, addr) rva (coerce, cygwin_hmodule, addr)
-
-struct function_hook
-{
- const char *name; // Function name, e.g. "DirectDrawCreateEx".
- const void *hookfn; // Address of your function.
- void *origfn; // Stored by HookAPICalls, the address of the original function.
-};
-
-/* Given an HMODULE, returns a pointer to the PE header */
-static PIMAGE_NT_HEADERS
-PEHeaderFromHModule (HMODULE hModule)
-{
- PIMAGE_NT_HEADERS pNTHeader;
-
- if (PIMAGE_DOS_HEADER(hModule) ->e_magic != IMAGE_DOS_SIGNATURE)
- pNTHeader = NULL;
- else
- {
- pNTHeader = PIMAGE_NT_HEADERS (PBYTE (hModule)
- + PIMAGE_DOS_HEADER (hModule) ->e_lfanew);
- if (pNTHeader->Signature != IMAGE_NT_SIGNATURE)
- pNTHeader = NULL;
- }
-
- return pNTHeader;
-}
-
-static long
-rvadelta (PIMAGE_NT_HEADERS pnt, DWORD import_rva)
-{
- PIMAGE_SECTION_HEADER section = (PIMAGE_SECTION_HEADER) (pnt + 1);
- for (int i = 0; i < pnt->FileHeader.NumberOfSections; i++)
- if (section[i].VirtualAddress <= import_rva
- && (section[i].VirtualAddress + section[i].Misc.VirtualSize) > import_rva)
- // if (ascii_strncasematch ((char *) section[i].Name, ".idata", IMAGE_SIZEOF_SHORT_NAME))
- return section[i].VirtualAddress - section[i].PointerToRawData;
- return -1;
-}
-
-static void *
-putmem (PIMAGE_THUNK_DATA pi, const void *hookfn)
-{
- DWORD ofl;
- if (!VirtualProtect (pi, sizeof (PVOID), PAGE_READWRITE, &ofl) )
- return NULL;
-
- void *origfn = (void *) pi->u1.Function;
- pi->u1.Function = (DWORD) hookfn;
-
- VirtualProtect (pi, sizeof (PVOID), ofl, &ofl);
- return origfn;
-}
-
-/* Builds stubs for and redirects the IAT for one DLL (pImportDesc) */
-
-static bool
-RedirectIAT (function_hook& fh, PIMAGE_IMPORT_DESCRIPTOR pImportDesc,
- HMODULE hm)
-{
- // If no import names table, we can't redirect this, so bail
- if (pImportDesc->OriginalFirstThunk == 0)
- return false;
-
- /* import address table */
- PIMAGE_THUNK_DATA pt = rva (PIMAGE_THUNK_DATA, hm, pImportDesc->FirstThunk);
- /* import names table */
- PIMAGE_THUNK_DATA pn = rva (PIMAGE_THUNK_DATA, hm, pImportDesc->OriginalFirstThunk);
-
- /* Scan through the IAT, completing the stubs and redirecting the IAT
- entries to point to the stubs. */
- for (PIMAGE_THUNK_DATA pi = pt; pn->u1.Ordinal; pi++, pn++)
- {
- if (IMAGE_SNAP_BY_ORDINAL (pn->u1.Ordinal) )
- continue;
-
- /* import by name */
- PIMAGE_IMPORT_BY_NAME pimp = rva (PIMAGE_IMPORT_BY_NAME, hm, pn->u1.AddressOfData);
-
- if (strcmp (fh.name, (char *) pimp->Name) == 0)
- {
- fh.origfn = putmem (pi, fh.hookfn);
- if (!fh.origfn)
- return false;
- hook_chain *hc;
- for (hc = &cygheap->hooks; hc->next; hc = hc->next)
- continue;
- hc->next = (hook_chain *) cmalloc_abort (HEAP_1_HOOK, sizeof (hook_chain));
- hc->next->loc = (void **) pi;
- hc->next->func = fh.hookfn;
- hc->next->next = NULL;
- break;
- }
- }
-
- return true;
-}
-
-static void
-get_export (function_hook& fh)
-{
- PIMAGE_DOS_HEADER pdh = (PIMAGE_DOS_HEADER) cygwin_hmodule;
- if (pdh->e_magic != IMAGE_DOS_SIGNATURE)
- return;
- PIMAGE_NT_HEADERS pnt = (PIMAGE_NT_HEADERS) ((char *) pdh + pdh->e_lfanew);
- if (pnt->Signature != IMAGE_NT_SIGNATURE || pnt->FileHeader.SizeOfOptionalHeader == 0)
- return;
- PIMAGE_EXPORT_DIRECTORY pexp =
- rvacyg (PIMAGE_EXPORT_DIRECTORY,
- pnt->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress);
- if (!pexp)
- return;
-
- PDWORD pfuncs = rvacyg (PDWORD, pexp->AddressOfFunctions);
- PDWORD pnames = rvacyg (PDWORD, pexp->AddressOfNames);
- for (DWORD i = 0; i < pexp->NumberOfNames; i++)
- if (strcmp (fh.name, rvacyg (char *, pnames[i])) == 0)
- {
- fh.origfn = rvacyg (void *, pfuncs[i]);
- break;
- }
-}
-
-static const char *
-makename (const char *name, char *&buf, int& i, int inc)
-{
- i += inc;
- static const char *testers[] = {"NOTUSED", "64", "32"};
- if (i < 0 || i >= (int) (sizeof (testers) / sizeof (testers[0])))
- return NULL;
- if (i)
- {
- __small_sprintf (buf, "_%s%s", name, testers[i]);
- name = buf;
- }
- return name;
-}
-
-/* Find first missing dll in a given executable.
- FIXME: This is not foolproof since it doesn't look for dlls in the
- same directory as the given executable, like Windows. Instead it
- searches for dlls in the context of the current executable. */
-const char *
-find_first_notloaded_dll (path_conv& pc)
-{
- const char *res = "?";
- HANDLE hc = NULL;
- HMODULE hm = NULL;
- OBJECT_ATTRIBUTES attr;
- IO_STATUS_BLOCK io;
- HANDLE h;
- NTSTATUS status;
-
- status = NtOpenFile (&h, SYNCHRONIZE | GENERIC_READ,
- pc.get_object_attr (attr, sec_none_nih),
- &io, FILE_SHARE_READ | FILE_SHARE_WRITE,
- FILE_SYNCHRONOUS_IO_NONALERT
- | FILE_OPEN_FOR_BACKUP_INTENT
- | FILE_NON_DIRECTORY_FILE);
- if (!NT_SUCCESS (status))
- goto out;
-
- hc = CreateFileMapping (h, &sec_none_nih, PAGE_READONLY, 0, 0, NULL);
- NtClose (h);
- if (!hc)
- goto out;
- hm = (HMODULE) MapViewOfFile(hc, FILE_MAP_READ, 0, 0, 0);
- CloseHandle (hc);
-
- PIMAGE_NT_HEADERS pExeNTHdr;
- pExeNTHdr = PEHeaderFromHModule (hm);
-
- if (pExeNTHdr)
- {
- DWORD importRVA;
- importRVA = pExeNTHdr->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress;
- if (importRVA)
- {
- long delta = rvadelta (pExeNTHdr, importRVA);
-
- // Convert imports RVA to a usable pointer
- PIMAGE_IMPORT_DESCRIPTOR pdfirst;
- pdfirst = rva (PIMAGE_IMPORT_DESCRIPTOR, hm, importRVA - delta);
-
- // Iterate through each import descriptor, and redirect if appropriate
- for (PIMAGE_IMPORT_DESCRIPTOR pd = pdfirst; pd->FirstThunk; pd++)
- {
- const char *lib = rva (PSTR, hm, pd->Name - delta);
- if (!LoadLibraryEx (lib, NULL, DONT_RESOLVE_DLL_REFERENCES
- | LOAD_LIBRARY_AS_DATAFILE))
- {
- static char buf[NT_MAX_PATH];
- res = strcpy (buf, lib);
- }
- }
- }
- }
-
-out:
- if (hm)
- UnmapViewOfFile (hm);
-
- return res;
-}
-
-// Top level routine to find the EXE's imports and redirect them
-void *
-hook_or_detect_cygwin (const char *name, const void *fn, WORD& subsys)
-{
- HMODULE hm = fn ? GetModuleHandle (NULL) : (HMODULE) name;
- PIMAGE_NT_HEADERS pExeNTHdr = PEHeaderFromHModule (hm);
-
- if (!pExeNTHdr)
- return false;
-
- subsys = pExeNTHdr->OptionalHeader.Subsystem;
-
- DWORD importRVA = pExeNTHdr->OptionalHeader.DataDirectory
- [IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress;
- if (!importRVA)
- return false;
-
- long delta = fn ? 0 : rvadelta (pExeNTHdr, importRVA);
- if (delta < 0)
- return false;
-
- // Convert imports RVA to a usable pointer
- PIMAGE_IMPORT_DESCRIPTOR pdfirst = rva (PIMAGE_IMPORT_DESCRIPTOR, hm, importRVA - delta);
-
- function_hook fh;
- fh.origfn = NULL;
- fh.hookfn = fn;
- char *buf = (char *) alloca (strlen (name) + sizeof ("_64"));
- int i;
- // Iterate through each import descriptor, and redirect if appropriate
- for (PIMAGE_IMPORT_DESCRIPTOR pd = pdfirst; pd->FirstThunk; pd++)
- {
- if (!ascii_strcasematch (rva (PSTR, hm, pd->Name - delta), "cygwin1.dll"))
- continue;
- if (!fn)
- return (void *) "found it"; // just checking if executable used cygwin1.dll
- i = -1;
- while (!fh.origfn && (fh.name = makename (name, buf, i, 1)))
- RedirectIAT (fh, pd, hm);
- if (fh.origfn)
- break;
- }
-
- while (!fh.origfn && (fh.name = makename (name, buf, i, -1)))
- get_export (fh);
-
- return fh.origfn;
-}
-
-void
-ld_preload ()
-{
- char *p = getenv ("LD_PRELOAD");
- if (!p)
- return;
- char *s = (char *) alloca (strlen (p) + 1);
- strcpy (s, p);
- char *here = NULL;
- for (p = strtok_r (s, ":\t\n", &here); p; p = strtok_r (NULL, ":\t\n", &here))
- {
- path_conv lib (p);
- WCHAR libname[lib.get_wide_win32_path_len () + 1];
- if (!LoadLibraryW (lib.get_wide_win32_path (libname)))
- {
- __seterrno ();
- api_fatal ("error while loading shared libraries: %s: "
- "cannot open shared object file: %s", p,
- strerror (get_errno ()));
- }
- }
-}
-
-void
-fixup_hooks_after_fork ()
-{
- for (hook_chain *hc = &cygheap->hooks; (hc = hc->next); )
- putmem ((PIMAGE_THUNK_DATA) hc->loc, hc->func);
-}
diff --git a/winsup/cygwin/how-autoload-works.txt b/winsup/cygwin/how-autoload-works.txt
deleted file mode 100644
index 8cff529..0000000
--- a/winsup/cygwin/how-autoload-works.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-Copyright 2002 Red Hat Inc., Egor Duda
-
-How does function autoloading work?
-
-Cygwin has the ability to handle win32 functions which are present on
-some platforms and not present on others via autoload mechanism. It's
-essentially a lazy binding of symbols. It works as following. For
-(almost) every function from OS API which cygwin uses, a stub is created
-in file autoload.cc. Each reference to the such function from win32 API
-in cygwin dll source code is actually pointing to this stub.
-
-When the function, say GetConsoleWindow(), is called for the first time,
-the control is passed to its stub. The stub tries to load the
-appropriate system dll via LoadModule() and get the actual function
-address via GetProcAddress(). If this operation succeeds, the stub is
-"patched" to pass control to actual address of GetConsoleWindow() in
-appropriate system dll, so that next time we won't have to load dll and
-perform address lookup in it again. From this point on, the call to the
-function is performed as if the dll/function were linked statically.
-
-If LoadModule() or GetProcAddress() fail, (and on nt4 the latter indeed
-fails because GetConsoleWindow() is not available in kernel32.dll), then
-the application, depending on what kind of stub is created in
-autoload.cc, will either:
-
-1) Exit with fatal error.
-
-2) Or return a predefined value indicating an error; and set the windows
-error code to 127 (ERROR_PROC_NOT_FOUND).
-
-Almost all w32api functions are linked into the cygwin dll in this
-manner, dynamically, at runtime.
-
-The costs:
-1) A tiny overhead in the initial call to a function call as each call
-is performed, indirectly, via a stub. For the first lookup of a symbol
-of an unloaded dll, there is also some overhead in loading the dll for
-the first time. The dll is only loaded by the first call to a symbol
-in the dll. After the first call to a function, subsequent calls are
-as fast as a normal, statically loaded function.
-
-The benefits:
-1) Speedup at startup time. Applications only load those dlls which are
-actually needed. For example, if application never uses socket
-functions, winsock dlls are never loaded.
-
-2) Greatly simplify wincap system -- we don't need to have a separate
-capability for every win32 function which may or may not be present on
-particular win32 platform.
-
-3) Allows a single cygwin1.dll for all win32 platforms.
-
-If you're changing in cygwin1.dll source code and if you use some
-function that was not used there before, you should add a stub so it
-will be autoloaded. To do so, add one of the LoadDllfunc* macros to
-autoload.cc. All macros eventually resolve to the following form:
-
-LoadDLLfuncEx2 (function name, parameter block length, dll name,
- non-fatality flag , value to return if function not available)
-
-Parameter block length is a sum of sizes (in bytes) of parameters which are
-being passed to the function. If non-fatality flag is set to 0, then failure
-to load dll and find a function will cause fatal error. If non fatality flag
-is set to 1, then call to the function will return default value.
-You can also use shorter versions -- LoadDLLfuncEx and LoadDLLfunc, if the
-defaults they provide suit your needs.
diff --git a/winsup/cygwin/how-cygheap-works.txt b/winsup/cygwin/how-cygheap-works.txt
deleted file mode 100644
index b60f888..0000000
--- a/winsup/cygwin/how-cygheap-works.txt
+++ /dev/null
@@ -1,120 +0,0 @@
-Copyright 2001 Red Hat Inc., Christopher Faylor
-
-Cygwin has recently adopted something called the "cygwin heap". This is
-an internal heap that is inherited by forked/execed children. It
-consists of process specific information that should be inherited. So
-things like the file descriptor table, the current working directory,
-and the chroot value live there.
-
-The cygheap is also used to pass argv information to a child process.
-There is a problem here, though. If you allocate space for argv on the
-heap and then exec a process the child process (1) will happily use the
-space in the heap. But what happens when that process execs another
-process (2)? The space used by child process (1) still is being used in
-child process (2) but it is basically just a memory leak.
-
-To rectify this problem, memory used by child process 1 is tagged in
-such a way that child process 2 will know to delete it. This is in
-cygheap_fixup_in_child.
-
-The cygheap memory allocation functions are adapted from memory
-allocators developed by DJ Delorie. They are similar to early BSD
-malloc and are intended to be relatively lightweight and relatively
-fast.
-
-How is the cygheap propagated to the child?
-
-Well, it depends if you are running on Windows 9x or Windows NT.
-
-On NT and 9x, just before CreateProcess is about to be called in
-fork or exec, a shared memory region is prepared for copying of the
-cygwin heap. This is in cygheap_setup_for_child. The handle to this
-shared memory region is passed to the new process in the 'child_info'
-structure.
-
-If there are no handles that need "fixing up" prior to starting another
-process, cygheap_setup_for_child will also copy the contents of the
-cygwin heap to the shared memory region.
-
-If there are any handles that need "fixing up" prior to invoking
-another process (i.e., sockets) then the creation of the shared
-memory region and copying of the current cygwin heap is a two
-step process.
-
-First the shared memory region is created and the process is started
-in a "CREATE_SUSPENDED" state, inheriting the handle. After the
-process is created, the fixup_before_*() functions are called. These
-set information in the heap and duplicate handles in the child, essentially
-ensuring that the child's fd table is correct.
-
-(Note that it is vital that the cygwin heap should not grow during this
-process. Currently, there is no guard against this happening so this
-operation is not thread safe.)
-
-Meanwhile, back in fork_parent, the function
-cygheap_setup_for_child_cleanup is called. In the simple "one step"
-case above, all that happens is that the shared memory is ummapped and
-the handle referring to it is closed.
-
-In the two step process, the cygheap is now copied to the shared memory
-region, complete with new fdtab info (the child process will see the
-updated information as soon as it starts). Then the memory is unmapped,
-the handle is closed, and upon return the child process is started.
-
-It is in the child process that the difference between Windows 9x and
-Windows NT becomes evident.
-
-Under Windows NT, the operation is simple. The shared memory handle is
-used to map the information that the parent has set up into the cygheap
-location in the child. This means that the child has a copy of the
-cygwin heap existing in "shared memory" but the only process with a view
-to this "shared memory" is the child.
-
-Under Windows 9x, due to address limitations, we can't just map the
-shared memory region into the cygheap position. So, instead, the memory
-is mapped whereever Windows wants to put it, a new heap region is
-allocated at the same place as in the parent, the contents of the shared
-memory is *copied* to the new heap, and the shared memory is unmapped.
-Simple, huh?
-
-Why do we go to these contortions? Previous versions (<1.3.3) of cygwin
-used to block when creating a child so that the child could copy the
-parent's cygheap. The problem with this was that when a cygwin process
-invoked a non-cygwin child, it would block forever waiting for the child
-to let it know that it was done copying the heap. That caused
-understandable complaints from people who wanted to run non-cygwin
-applications "in the background".
-
-In Cygwin 1.3.3 (and presumably beyond) the location of the cygwin heap
-has been fixed to be at the end of the cygwin1.dll address space.
-Previously, we let the "OS" choose where to allocate the cygwin heap in
-the initial cygwin process and attempted to use this same location in
-subsequent cygwin processes started from this parent.
-
-The reason for putting cygheap at a fixed, known location is that we
-need to put this information at a fixed location since it incorporates
-pointers to entities within itself. So, when a process forks or execs,
-the memory referred to by the pointers has to exist at the same place in
-both the parent or the child.
-
-(It "might be nice" to used something like Microsoft's "based pointers"
-for the cygheap. Unfortunately gcc does not support that feature, as of
-this writing.)
-
-The reason for choosing a fixed, arbitrary location is to accommodate
-Windows XP, although there were sporadic complaints of cygwin heap
-failures in other pathological situations with both NT and 9x. In
-Windows XP, Microsoft made the allocation of memory less deterministic.
-This is certainly their right. Cygwin was previously relying on
-undocumented and "iffy" behavior before. So, now we always allocate
-space immediately after the dll in the theory that there is not going
-to be anything else living there.
-
-Recent (2001-09-20) cygwin email threads have indicated that we're not
-exactly on completely firm ground now, though. We are assuming that
-there is sufficient space after the cygwin DLL for the allocation of the
-cygwin heap. Unfortunately the ld option '--enable-auto-image-base'
-has a tendency to allocate DLLs immediately after cygwin1.dll. This
-causes the dreaded "Couldn't reserve space for cygwin's heap" message.
-
-Solutions for this behavior are currently in the musing state.
diff --git a/winsup/cygwin/how-cygtls-works.txt b/winsup/cygwin/how-cygtls-works.txt
deleted file mode 100644
index 69363f1..0000000
--- a/winsup/cygwin/how-cygtls-works.txt
+++ /dev/null
@@ -1,75 +0,0 @@
-Copyright 2005 Red Hat Inc., Max Kaehn
-
-All cygwin threads have separate context in an object of class _cygtls. The
-storage for this object is kept on the stack in the bottom CYGTLS_PADSIZE
-bytes. Each thread references the storage via the Thread Environment Block
-(aka Thread Information Block), which Windows maintains for each user thread
-in the system, with the address in the FS segment register. The memory
-is laid out as in the NT_TIB structure from <w32api/winnt.h>:
-
-typedef struct _NT_TIB {
- struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList;
- PVOID StackBase;
- PVOID StackLimit;
- PVOID SubSystemTib;
- _ANONYMOUS_UNION union {
- PVOID FiberData;
- DWORD Version;
- } DUMMYUNIONNAME;
- PVOID ArbitraryUserPointer;
- struct _NT_TIB *Self;
-} NT_TIB,*PNT_TIB;
-
-Cygwin sees it like this:
-
-extern exception_list *_except_list asm ("%fs:0"); // exceptions.cc
-extern char *_tlsbase __asm__ ("%fs:4"); // cygtls.h
-extern char *_tlstop __asm__ ("%fs:8"); // cygtls.h
-
-And accesses cygtls like this:
-
-#define _my_tls (((_cygtls *) _tlsbase)[-1]) // cygtls.h
-
-
-Initialization always goes through _cygtls::init_thread(). It works
-in the following ways:
-
-* In the main thread, _dll_crt0() provides CYGTLS_PADSIZE bytes on the stack
- and passes them to initialize_main_tls(), which calls _cygtls::init_thread().
- It then calls dll_crt0_1(), which terminates with cygwin_exit() rather than
- by returning, so the storage never goes out of scope.
-
- If you load cygwin1.dll dynamically from a non-cygwin application, it is
- vital that the bottom CYGTLS_PADSIZE bytes of the stack are not in use
- before you call cygwin_dll_init(). See winsup/testsuite/cygload for
- more information.
-
-* Threads other than the main thread receive DLL_THREAD_ATTACH messages
- to dll_entry() (in init.cc).
- - dll_entry() calls munge_threadfunc(), which grabs the function pointer
- for the thread from the stack frame and substitutes threadfunc_fe(),
- - which then passes the original function pointer to _cygtls::call(),
- - which then allocates CYGTLS_PADSIZE bytes on the stack and hands them
- to call2(),
- - which allocates an exception_list object on the stack and hands it to
- init_exceptions() (in exceptions.cc), which attaches it to the end of
- the list of exception handlers, changing _except_list (aka
- tib->ExceptionList), then passes the cygtls storage to init_thread().
- call2() calls ExitThread() instead of returning, so the storage never
- goes out of scope.
-
-Note that the padding isn't necessarily going to be just where the _cygtls
-structure lives; it just makes sure there's enough room on the stack when the
-CYGTLS_PADSIZE bytes down from there are overwritten.
-
-
-Debugging
-
-You can examine the segment registers in gdb via "info w32 selector $fs"
-(which is using GetThreadSelectorEntry()) to get results like this:
-
- Selector $fs
- 0x03b: base=0x7ffdd000 limit=0x00000fff 32-bit Data (Read/Write, Exp-up)
- Priviledge level = 3. Byte granular.
-
-"x/3x 0x7ffdd000" will give you _except_list, _tlsbase, and _tlstop.
diff --git a/winsup/cygwin/how-fhandlers-work.txt b/winsup/cygwin/how-fhandlers-work.txt
deleted file mode 100644
index cef46fe..0000000
--- a/winsup/cygwin/how-fhandlers-work.txt
+++ /dev/null
@@ -1,75 +0,0 @@
-Copyright 2001 Red Hat Inc., Robert Collins
-
-fhandlers are the core mechanism by which cygwin provides a file descripter (fd)
-interface to things such as a random number generated, winsock sockets, raw disk
-devices, the clipboard, the console and so on. Under unix access to all such
-devices is via a combination of IOCTL's and open/close/read/write calls. Some
-special functions do exist - such as bind () and listen () for sockets, but
-these consistently operate on fd's. Under Win32 there are disparate interfaces
-that have little in common with each other. See for example Direct Sound and
-the Clipboard.
-
-The fhandler class provides all open,read,write,close, ioctl and fork()/exec()
-functionality for the fd interface. The base class operates on win32 backed
-files. The various derived classes utilise win32 primitives to provide their
-specific functionality.
-
-When a file is opened - not necesarily via open() a fd is assigned to it. The fd
-includes a pointer to the actual fhandler that operates this specific file. All
-file-oriented system calls then operate off this basic structure.
-
-For example, lets examine lseek ().
-
-extern "C" off_t
-_lseek (int fd, off_t pos, int dir)
-{
- off_t res;
- sigframe thisframe (mainthread);
-
- if (dir != SEEK_SET && dir != SEEK_CUR && dir != SEEK_END)
- {
- set_errno (EINVAL);
- res = -1;
- }
- else if (cygheap->fdtab.not_open (fd))
- {
- set_errno (EBADF);
- res = -1;
- }
- else
- {
- res = cygheap->fdtab[fd]->lseek (pos, dir);
- }
- syscall_printf ("%d = lseek (%d, %d, %d)", res, fd, pos, dir);
-
- return res;
-}
-
-The sigframe thisframe (mainthread); is signal related - see
-"how_signals_work.txt".
-
-The if, else if, else tests (in order)
-* the validity of the dir parameter,
-* is the fd being passed actually open? (cannot seek on a closed fd)
-* call the lseek virtual function in the associated fhandler.
-
-So as you can see, there is no code that attempts to understand the nature of
-the fhandler.
-
-fhandlers that make cross-function-call use of win32 objects that are not
-inheritable cross-process need to implement fixup-after-fork and recreate those
-objects. HANDLES can be inherited, but memory mapped regions (for example)
-cannot.
-
-For an example step-by-step to create a new fhandler, see
-../doc/fhandler-tut.txt
-
-Note: In most case, it is safe to assume that using new/delete (or
-malloc/free) in an fhandler is dangerous and to be avoided. The reason
-for this is that memory allocated to fhandlers is copied between execed
-processes in the cygwin heap. Memory allocated in new/delete is only
-copied to forked processes. So use cmalloc/cfree.
-
-Obviously it is possible to use new/delete in some situations but if you're
-seeing strange core dumps with usages like cat < /my/newfhandler then the
-above may well be the culprit.
diff --git a/winsup/cygwin/how-signals-work.txt b/winsup/cygwin/how-signals-work.txt
deleted file mode 100644
index 4d94c79..0000000
--- a/winsup/cygwin/how-signals-work.txt
+++ /dev/null
@@ -1,158 +0,0 @@
-Copyright 2001, 2002, 2003, 2004 Red Hat Inc., Christopher Faylor
-
-[note that the following discussion is still incomplete]
-
-How do signals work?
-
-On process startup, cygwin starts a secondary thread which deals with
-signals. This thread contains a loop which blocks waiting for
-information to arrive on a pipe whose handle (sendsig) is currently
-stored in _pinfo (this may change).
-
-Communication on the sendsig pipe is via the 'sigpacket' structure.
-This structure is filled out by the sig_send function with information
-about the signal being sent, such as (as of this writing) the signal
-number, the originating pid, the originating thread, and the address of
-the mask to use (this may change).
-
-Any cygwin function which calls a win32 api function is wrapped by the
-assembly functions "_sigfe" and "_sigbe". These functions maintain a
-cygwin "signal stack" which is used by the signal thread to control
-handling of signal interrupts. Cygwin functions which need to be
-wrapped by these functions (the majority) are labelled by the SIGFE
-option in the file cygwin.din.
-
-The cygwin.din function is translated into a standard cygwin.def file by
-the perl script "gendef". This function notices exported cygwin
-functions which are labelled as SIGFE and generates a front end assembly
-file "sigfe.s" which contains the wrapper glue necessary for every
-function to call sigfe prior to actually dispatching to the real cygwin
-function. This generated file contains low-level signal related
-functions: _sigfe, _sigbe, sigdelayed, sigreturn, longjmp, and setjmp.
-
-The signal stack maintained by sigfe/sigbe and friends is a secondary
-shadow stack. Addresses from this stack are swapped into the "real"
-stack as needed to control program flow. The intent is that executing
-cygwin functions will still see the same stack layout as if they had
-been called directly and will be able to retrieve arguments from the
-stack but will always return to the _sigbe routine so that any signal
-handlers will be properly called.
-
-Upon receipt of a "non-special" (see below) signal, the function
-sigpacket::process is called. This function determines what action, if
-any, to take on the signal. Possible actions are: Ignore the signal
-(e.g., SIGUSR1), terminate the program (SIGKILL, SIGTERM), stop the
-program (SIGSTOP, SIGTSTP, etc.), wake up a sigwait or sigwaitinfo in a
-targetted thread, or call a signal handler (possibly in a thread). If
-no thread information has been sent to sigpacket::process, it determines
-the correct thread to use based on various heuristics, as per UNIX. As
-per linux, the only time a handler is called in a thread is when there
-is some kind of fault like SIGSEGV, SIGILL, etc. Signals sent via the
-UNIX kill() function are normally sent to the main thread. Ditto
-signals sent as the result of pressing tty keys, like CTRL-C.
-
-Signals which stop a process are handled by a special internal handler:
-sig_handle_tty_stop. Some signals (e.g., SIGKILL, SIGSTOP) are
-uncatchable, as on UNIX.
-
-If the signal has an associated signal handler, then the setup_handler
-function is eventually called. It is passed the signal, the address of
-the handler, a standard UNIX sigaction structure, and a pointer to the
-thread's "_cygtls" information. The meat of signal processing is in
-setup_handler.
-
-setup_handler has a "simple" task. It tries to stop the appropriate
-thread and either redirect its execution to the signal handler function,
-flag that a signal has been received (sigwait) or both (sigpause).
-
-To accomplish its task, setup_handler first inspects the target thread's
-local storage (_cygtls) structure. This structure contains information
-on any not-yet-handled signals that may have been set up by a previous
-call to setup_handler but not yet dispatched in the target thread. If this
-structure seems to be "active", then setup_handler returns, notifying it's
-parent via a false value. Otherwise processing continues.
-
-(For pending signals, the theory is that the signal handler thread will
-be forced to be rerun by having some strategic cygwin function call
-sig_send with a __SIGFLUSH argument. This causes the signal handler to
-rescan the signal array looking for pending signals.)
-
-After determining that it's ok to send a signal, setup_handler will lock
-the cygtls stack to ensure that it has complete access. It will then
-inspect the thread's 'incyg' boolean. If this is true, the thread is
-currently executing a cygwin function. If it is false, the thread is
-unlocked and it is assumed that the thread is executing "user" code.
-The actions taken by setup_handler differ based on whether the program
-is executing a cygwin routine or not.
-
-If the program is executing a cygwin routine, then the
-interrupt_on_return function is called which causes the address of the
-'sigdelayed' function to be pushed onto the thread's signal stack, and
-the signal's mask and handler to be saved in the tls structure. After
-performing these operations, the 'signal_arrived' event is signalled, as
-well as any thread-specific wait event.
-
-Since the sigdelayed function was saved on the thread's signal stack,
-when the cygwin function returns, it will eventually return to the
-sigdelayed "front end". The sigdelayed function will save a lot of
-state on the stack and set the signal mask as appropriate for POSIX.
-It uses information from the _cygtls structure which has been filled in
-by interrupt_setup, as called by setup_handler. sigdelayed pushes a
-"call" to the function "sigreturn" on the thread's signal stack. This
-will be the return address eventually seen by the signal handler. After
-setting up the return value, modifying the signal mask, and saving other
-information on the stack, sigreturn clears the signal number in the
-_cygtls structure so that setup_handler can use it and jumps to the
-signal handler function. And, so a UNIX signal handler function is
-emulated.
-
-The signal handler function operates as normal for UNIX but, upon
-return, it does not go directly back to the return address of the
-original cygwin function. Instead it returns to the previously
-mentioned 'sigreturn' assembly language function.
-
-sigreturn resets the process mask to its state prior to calling the
-signal handler. It checks to see if a cygwin routine has set a special
-"restore this errno on returning from a signal" value and sets errno to
-this, if so. It pops the signal stack, places the new return address on
-the real stack, restores all of the register values that were in effect
-when sigdelayed was called, and then returns.
-
-Ok. That is more or less how cygwin interrupts a process which is
-executing a cygwin function. We are almost ready to talk about how
-cygwin interrupts user code but there is one more thing to talk about:
-SA_RESTART.
-
-UNIX allows some blocking functions to be interrupted by a signal
-handler and then return to blocking. In cygwin, so far, only
-read/readv() and the wait* functions operate in this fashion. To
-accommodate this behavior, a function notices when a signal comes in and
-then calls the _cygtls function 'call_signal_handler_now'.
-'call_signal_handler_now' emulates the behavior of both sigdelayed and
-sigreturn. It sets the appropriate masks and calls the handler,
-returning true to the caller if SA_RESTART is active. If SA_RESTART is
-active, the function will loop. Otherwise it will typically return -1
-and set the errno to EINTR.
-
-Phew. So, now we turn to the case where cygwin needs to interrupt the
-program when it is not executing a cygwin function. In this scenario,
-we rely on the win32 "SuspendThread" function. Cygwin will suspend the
-thread using this function and then inspect the location at which the
-thread is executing using the win32 "GetThreadContext" call. In theory,
-the program should not be executing in a win32 api since attempts to
-suspend a process executing a win32 call can cause disastrous results,
-especially on Win9x.
-
-If the process is executing in an unsafe location then setup_handler
-will (quickly!) return false as in the case above. Otherwise, the
-current location of the thread is pushed on the thread's signal stack
-and the thread is redirected to the sigdelayed function via the win32
-"SetThreadContext" call. Then the thread is restarted using the win32
-"ResumeThread" call and things proceed as per the sigdelayed discussion
-above.
-
-This leads us to the sig_send function. This is the "client side" part
-of the signal manipulation process. sig_send is the low-level function
-called by a high level process like kill() or pthread_kill().
-
-** More to come **
diff --git a/winsup/cygwin/how-spawn-works.txt b/winsup/cygwin/how-spawn-works.txt
deleted file mode 100644
index e4e25ea..0000000
--- a/winsup/cygwin/how-spawn-works.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-Spawn.cc in cygwin handles spawn, vfork and exec calls. It does this via
-a mode parameter that determines its behaviour with respect to the
-child.
-
-Of particular interest is the exec behaviour.
-
-In general spawn_guts (where the action happens) does the following:
-* Finds the actual program being run (which may include path searching).
-* Determines the type (.exe, shell script, perl etc) and for non binary
-programs finds the correct interpreter.
-* Creates a commandline (based on the type and the user parameters).
-* Guesses at whether the binary that will be invoked is a cygwin program
-or not (if (real_path.iscygexec ())) and uses that information to copy
-the argv table, or to translate it for win32 program usage.
-* passes a handle to the parent to the child (note: this handle should
-have it's rights restricted the daemon is merged).
-* Start the process.
-* if the mode is _P_OVERLAY (we are doing an exec)
-wait for the child to
-a) if it's a cygwin process, signal us via an event.
-b) if it's a win32 process, exit.
-c) exit.
-
-If a) occurs, we 'reparent' the child which makes it look to the current
-process's parent in the pid and process group chains.
-b) is where the cygwin process hangs around as a 'stub' presenting it's
-pid as the win32 process's pid, to allow cygwin tools to kill the win32
-process.
-once a-c has occured, execution resumes.
-* If the mode is _P_OVERLAY, this process exits, otherwise it's
-behaviour depends on the mode parameter. See the last block of
-spawn_guts.
diff --git a/winsup/cygwin/how-to-debug-cygwin.txt b/winsup/cygwin/how-to-debug-cygwin.txt
deleted file mode 100644
index fcf53a2..0000000
--- a/winsup/cygwin/how-to-debug-cygwin.txt
+++ /dev/null
@@ -1,128 +0,0 @@
-Copyright 2001, 2002, 2005 Red Hat Inc., Egor Duda
-
-So, your favorite program has crashed? And did you say something about
-'stackdump'? Or it just prints its output from left to right and
-upside-down? Well, you can file an angry bug report and wait until some
-of the core developers try to reproduce your problem, try to find what's
-the matter with your program and cygwin and fix the bug, if any. But
-you can do something better than that. You can debug the problem
-yourself, and even if you can't fix it, your analysis may be very
-helpful. Here's the (incomplete) howto on cygwin debugging.
-
-1. First things first
-
- The first thing you'll need to do is to build cygwin1.dll and your
- crashed application from sources. To debug them you'll need debug
- information, which is normally stripped from executables. You probably
- also want to build a version of the dll with more debugging capabilities
- by reconfiguring your build directory, specifying the --enable-debugging
- option to configure.
-
-2. Creating a known-working cygwin debugging environment
-
- - create a separate directory, say, c:\cygdeb, and put known-working
- cygwin1.dll and gdb.exe in it.
- - create a wrapper c:\cygdeb\debug_wrapper.cmd:
-
-========= debug_wrapper.cmd =========
-rem setting CYGWIN_TESTING environment variable makes cygwin application
-rem not to interfere with other already running cygwin applications.
-set CYGWIN_TESTING=1
-c:\cygdeb\gdb.exe -nw %1 %2
-===================================
-
-3. Using cygwin's JIT debugging facility
-
- add 'error_start=c:\cygdeb\debug_wrapper.cmd' to CYGWIN environment
- variable. When some application encounters critical error, cygwin will stop
- it and execute debug_wrapper.cmd, which will run gdb and make it to attach to
- the crashed application.
-
-4. Strace
-
- You can run your program under 'strace' utility, described if user's manual.
- If you know where the problem approximately is, you can add a bunch of
- additional debug_printf()s in the source code and see what they print in
- strace log. There's one common problem with this method, that some bugs
- may mysteriously disappear once the program is run under strace. Then the
- bug is likely a race condition. strace has two useful options to deal with
- such situation: -b enables buffering of output and reduces additional
- timeouts introduced by strace, and -m option allows you to mask certain
- classes of *_printf() functions, reducing timeouts even more.
-
- Note that strace does not use the cygwin DLL and so any process that it
- starts does not inherit a cygwin environment. It is equivalent to starting
- a program from the command prompt.
-
-5. Problems at early startup
-
- Sometimes, something crashes at the very early stages of application
- initialization, when JIT debugging facility is not yet active. Ok, there's
- another environment variable that may help. Create program_wrapper.cmd:
-
-========= program_wrapper.cmd =========
-rem setting CYGWIN_SLEEP environment variable makes cygwin application
-rem to sleep for x milliseconds at startup
-set CYGWIN_SLEEP=20000
-c:\some\path\bad_program.exe some parameters
-===================================
-
- Now, run program_wrapper.cmd. It should print running program pid.
- After starting program_wrapper.cmd you've got 20 seconds to open another
- window, cd to c:\cygdeb in it, run gdb there and in gdb prompt type
-
- (gdb) attach <pid>
-
- where <pid> is the pid that program_wrapper.cmd have printed.
- After that you can normally step through the code in cygwin1.dll and
- bad_program.exe
-
-6. More problems at early startup
-
- You can also set a CYGWIN_DEBUG variable to force the debugger to pop up
- only when a certain program is run:
-
-set CYGWIN_DEBUG=cat.exe:gdb.exe
-
- This will force gdb.exe to start when the program name contains the string
- "cat.exe". The ':gdb.exe' isn't really needed, since it is the default.
- It is just there to show how you can specify a program to run when the
- program starts. You can optionally set a breakpoint on "break_here"
- once the debugger pops up and then you can single step through the
- initialization process.
-
- Note that it bears repeating that both of the above options are *only*
- available when configuring cygwin with --enable-debugging.
-
-7. Heap corruption
-
- If your program crashes at malloc() or free() or when it references some
- malloc()'ed memory, it looks like heap corruption. You can configure and
- build special version of cygwin1.dll which includes heap sanity checking.
- To do it, just add --enable-malloc-debugging option to configure. Be warned,
- however, that this version of dll is _very_ slow (10-100 times slower than
- normal), so use it only when absolutely necessary.
-
-8. Program dies when running under strace
-
- If your program crashes when you run it using strace but runs ok (or has a
- different problem) otherwise, then there may be a problem in one of the
- strace *_printf statements. Usually this is caused by a change in arguments
- resulting in a %s being used with something other than a pointer to a
- string.
-
- To debug this scenario, do something like this:
-
- bash$ gdb -nw yourapp.exe
- (gdb) dll cygwin1
- (gdb) l dll_crt0_1
- (gdb) b <<first line in the function>>
- (gdb) run
- (gdb) set strace._active=1
- (gdb) continue
-
- The program will then run in "strace mode", calling each strace *_printf,
- just like it does when run under the strace program. Eventually, the
- program will crash, probably in small_printf. At that point, a 'bt'
- command should show you the offending call to strace_printf with the
- improper format string.
diff --git a/winsup/cygwin/how-vfork-works.txt b/winsup/cygwin/how-vfork-works.txt
deleted file mode 100644
index f249dab..0000000
--- a/winsup/cygwin/how-vfork-works.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-Copyright 2001 Red Hat Inc., Christopher Faylor
-
-How does vfork work?
-
-When a program calls vfork, cygwin attempts to short circuit its
-normal, expensive fork mechanism.
-
-Vfork is mainly smoke and mirrors. A call to vfork contines to execute
-in the current process but first it returns a pid of 0 so that process
-will execute code intended for the child in a UNIX system. Before
-returning the zero, vfork makes a copy of the current fd table so that
-closing an fd in the "child" will not affect the "parent".
-
-Some of this info is stored in a per-thread structure but vfork is not
-really thread-safe since it also stores the fd "backup" table in the
-global fd table.
-
-The process continues to execute until it hits some type of exec call.
-The exec call is essentially translated into a spawn NO_WAIT call and
-the new process is started via this mechanism. After execing, the
-"child" process no longer should exist, so the spawn code longjmps back
-to the original vfork call. The previously opened fds are closed and
-the parent's fd table is restored. vfork() then returns the pid of the
-just-spawned process.
-
-Meanwhile, the just-spawned child notices that it has been spawned as
-the result of a vfork and closes the extra file handles.
-
-This all relies on the fact that the child in a vfork call can affect
-just about everything in the parent except for the parent's fds.
-The assumption is that a vfork is always just used as a method for
-starting a program.
-
-The assumption is also that all of this is much faster than the
-slow method that cygwin uses to implement fork().
-
diff --git a/winsup/cygwin/include/a.out.h b/winsup/cygwin/include/a.out.h
deleted file mode 100644
index 500e14f..0000000
--- a/winsup/cygwin/include/a.out.h
+++ /dev/null
@@ -1,431 +0,0 @@
-/* a.out.h
-
- Copyright 1997, 1998, 1999, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _A_OUT_H_
-#define _A_OUT_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define COFF_IMAGE_WITH_PE
-#define COFF_LONG_SECTION_NAMES
-
-/*** coff information for Intel 386/486. */
-
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr {
- short f_magic; /* magic number */
- short f_nscns; /* number of sections */
- unsigned long f_timdat; /* time & date stamp */
- unsigned long f_symptr; /* file pointer to symtab */
- unsigned long f_nsyms; /* number of symtab entries */
- short f_opthdr; /* sizeof(optional hdr) */
- short f_flags; /* flags */
-};
-
-/* Bits for f_flags:
- * F_RELFLG relocation info stripped from file
- * F_EXEC file is executable (no unresolved external references)
- * F_LNNO line numbers stripped from file
- * F_LSYMS local symbols stripped from file
- * F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax)
- */
-
-#define F_RELFLG (0x0001)
-#define F_EXEC (0x0002)
-#define F_LNNO (0x0004)
-#define F_LSYMS (0x0008)
-
-
-
-#define I386MAGIC 0x14c
-#define I386PTXMAGIC 0x154
-#define I386AIXMAGIC 0x175
-
-/* This is Lynx's all-platform magic number for executables. */
-
-#define LYNXCOFFMAGIC 0415
-
-#define I386BADMAG(x) (((x).f_magic != I386MAGIC) \
- && (x).f_magic != I386AIXMAGIC \
- && (x).f_magic != I386PTXMAGIC \
- && (x).f_magic != LYNXCOFFMAGIC)
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
-/********************** AOUT "OPTIONAL HEADER"=
- **********************/
-
-
-typedef struct
-{
- unsigned short magic; /* type of file */
- unsigned short vstamp; /* version stamp */
- unsigned long tsize; /* text size in bytes, padded to FW bdry*/
- unsigned long dsize; /* initialized data " " */
- unsigned long bsize; /* uninitialized data " " */
- unsigned long entry; /* entry pt. */
- unsigned long text_start; /* base of text used for this file */
- unsigned long data_start; /* base of data used for this file=
- */
-}
-AOUTHDR;
-
-#define AOUTSZ 28
-#define AOUTHDRSZ 28
-
-#define OMAGIC 0404 /* object files, eg as output */
-#define ZMAGIC 0413 /* demand load format, eg normal ld output */
-#define STMAGIC 0401 /* target shlib */
-#define SHMAGIC 0443 /* host shlib */
-
-
-/* define some NT default values */
-/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
-#define NT_SECTION_ALIGNMENT 0x1000
-#define NT_FILE_ALIGNMENT 0x200
-#define NT_DEF_RESERVE 0x100000
-#define NT_DEF_COMMIT 0x1000
-
-/********************** SECTION HEADER **********************/
-
-
-struct external_scnhdr {
- char s_name[8]; /* section name */
- unsigned long s_paddr; /* physical address, offset
- of last addr in scn */
- unsigned long s_vaddr; /* virtual address */
- unsigned long s_size; /* section size */
- unsigned long s_scnptr; /* file ptr to raw data for section */
- unsigned long s_relptr; /* file ptr to relocation */
- unsigned long s_lnnoptr; /* file ptr to line numbers */
- unsigned short s_nreloc; /* number of relocation entries */
- unsigned short s_nlnno; /* number of line number entries*/
- unsigned long s_flags; /* flags */
-};
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ 40
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _COMMENT ".comment"
-#define _LIB ".lib"
-
-/********************** LINE NUMBERS **********************/
-
-/* 1 line number entry for every "breakpointable" source line in a section.
- * Line numbers are grouped on a per function basis; first entry in a function
- * grouping will have l_lnno = 0 and in place of physical address will be the
- * symbol table index of the function name.
- */
-struct external_lineno {
- union {
- unsigned long l_symndx; /* function name symbol index, iff l_lnno 0 */
- unsigned long l_paddr; /* (physical) address of line number */
- } l_addr;
- unsigned short l_lnno; /* line number */
-};
-
-#define LINENO struct external_lineno
-#define LINESZ 6
-
-/********************** SYMBOLS **********************/
-
-#define E_SYMNMLEN 8 /* # characters in a symbol name */
-#define E_FILNMLEN 14 /* # characters in a file name */
-#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */
-
-struct external_syment
-{
- union {
- char e_name[E_SYMNMLEN];
- struct {
- unsigned long e_zeroes;
- unsigned long e_offset;
- } e;
- } e;
- unsigned long e_value;
- unsigned short e_scnum;
- unsigned short e_type;
- char e_sclass[1];
- char e_numaux[1];
-};
-
-#define N_BTMASK (0xf)
-#define N_TMASK (0x30)
-#define N_BTSHFT (4)
-#define N_TSHIFT (2)
-
-union external_auxent {
- struct {
- unsigned long x_tagndx; /* str, un, or enum tag indx */
- union {
- struct {
- unsigned short x_lnno; /* declaration line number */
- unsigned short x_size; /* str/union/array size */
- } x_lnsz;
- unsigned long x_fsize; /* size of function */
- } x_misc;
- union {
- struct { /* if ISFCN, tag, or .bb */
- unsigned long x_lnnoptr;/* ptr to fcn line # */
- unsigned long x_endndx; /* entry ndx past block end */
- } x_fcn;
- struct { /* if ISARY, up to 4 dimen. */
- char x_dimen[E_DIMNUM][2];
- } x_ary;
- } x_fcnary;
- unsigned short x_tvndx; /* tv index */
- } x_sym;
-
- union {
- char x_fname[E_FILNMLEN];
- struct {
- unsigned long x_zeroes;
- unsigned long x_offset;
- } x_n;
- } x_file;
-
- struct {
- unsigned long x_scnlen; /* section length */
- unsigned short x_nreloc; /* # relocation entries */
- unsigned short x_nlinno; /* # line numbers */
- unsigned long x_checksum; /* section COMDAT checksum */
- unsigned short x_associated;/* COMDAT associated section index */
- char x_comdat[1]; /* COMDAT selection number */
- } x_scn;
-
- struct {
- unsigned long x_tvfill; /* tv fill value */
- unsigned short x_tvlen; /* length of .tv */
- char x_tvran[2][2]; /* tv range */
- } x_tv; /* info about .tv section (in auxent of symbol .tv)) */
-
-};
-
-#define SYMENT struct external_syment
-#define SYMESZ 18
-#define AUXENT union external_auxent
-#define AUXESZ 18
-
-#define _ETEXT "etext"
-
-/********************** RELOCATION DIRECTIVES **********************/
-
-struct external_reloc {
- char r_vaddr[4];
- char r_symndx[4];
- char r_type[2];
-};
-
-#define RELOC struct external_reloc
-#define RELSZ 10
-
-/* end of coff/i386.h */
-
-/* PE COFF header information */
-
-#ifndef _PE_H
-#define _PE_H
-
-/* NT specific file attributes */
-#define IMAGE_FILE_RELOCS_STRIPPED 0x0001
-#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002
-#define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004
-#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008
-#define IMAGE_FILE_BYTES_REVERSED_LO 0x0080
-#define IMAGE_FILE_32BIT_MACHINE 0x0100
-#define IMAGE_FILE_DEBUG_STRIPPED 0x0200
-#define IMAGE_FILE_SYSTEM 0x1000
-#define IMAGE_FILE_DLL 0x2000
-#define IMAGE_FILE_BYTES_REVERSED_HI 0x8000
-
-/* additional flags to be set for section headers to allow the NT loader to
- read and write to the section data (to replace the addresses of data in
- dlls for one thing); also to execute the section in .text's case=
- */
-#define IMAGE_SCN_MEM_DISCARDABLE 0x02000000
-#define IMAGE_SCN_MEM_EXECUTE 0x20000000
-#define IMAGE_SCN_MEM_READ 0x40000000
-#define IMAGE_SCN_MEM_WRITE 0x80000000
-
-/*
- * Section characteristics added for ppc-nt
- */
-
-#define IMAGE_SCN_TYPE_NO_PAD 0x00000008 /* Reserved. */
-
-#define IMAGE_SCN_CNT_CODE 0x00000020 /* Section contains code. */
-#define IMAGE_SCN_CNT_INITIALIZED_DATA 0x00000040 /* Section contains initialized data. */
-#define IMAGE_SCN_CNT_UNINITIALIZED_DATA 0x00000080 /* Section contains uninitialized data. */
-
-#define IMAGE_SCN_LNK_OTHER 0x00000100 /* Reserved. */
-#define IMAGE_SCN_LNK_INFO 0x00000200 /* Section contains comments or some other type of information. */
-#define IMAGE_SCN_LNK_REMOVE 0x00000800 /* Section contents will not become part of image. */
-#define IMAGE_SCN_LNK_COMDAT 0x00001000 /* Section contents comdat. */
-
-#define IMAGE_SCN_MEM_FARDATA 0x00008000
-
-#define IMAGE_SCN_MEM_PURGEABLE 0x00020000
-#define IMAGE_SCN_MEM_16BIT 0x00020000
-#define IMAGE_SCN_MEM_LOCKED 0x00040000
-#define IMAGE_SCN_MEM_PRELOAD 0x00080000
-
-#define IMAGE_SCN_ALIGN_1BYTES 0x00100000
-#define IMAGE_SCN_ALIGN_2BYTES 0x00200000
-#define IMAGE_SCN_ALIGN_4BYTES 0x00300000
-#define IMAGE_SCN_ALIGN_8BYTES 0x00400000
-#define IMAGE_SCN_ALIGN_16BYTES 0x00500000 /* Default alignment if no others are specified. */
-#define IMAGE_SCN_ALIGN_32BYTES 0x00600000
-#define IMAGE_SCN_ALIGN_64BYTES 0x00700000
-
-
-#define IMAGE_SCN_LNK_NRELOC_OVFL 0x01000000 /* Section contains extended relocations. */
-#define IMAGE_SCN_MEM_NOT_CACHED 0x04000000 /* Section is not cachable. */
-#define IMAGE_SCN_MEM_NOT_PAGED 0x08000000 /* Section is not pageable. */
-#define IMAGE_SCN_MEM_SHARED 0x10000000 /* Section is shareable. */
-
-/* COMDAT selection codes. */
-
-#define IMAGE_COMDAT_SELECT_NODUPLICATES (1) /* Warn if duplicates. */
-#define IMAGE_COMDAT_SELECT_ANY (2) /* No warning. */
-#define IMAGE_COMDAT_SELECT_SAME_SIZE (3) /* Warn if different size. */
-#define IMAGE_COMDAT_SELECT_EXACT_MATCH (4) /* Warn if different. */
-#define IMAGE_COMDAT_SELECT_ASSOCIATIVE (5) /* Base on other section. */
-
-/* Magic values that are true for all dos/nt implementations */
-#define DOSMAGIC 0x5a4d
-#define NT_SIGNATURE 0x00004550
-
-/* NT allows long filenames, we want to accommodate this. This may break
- some of the bfd functions */
-#undef FILNMLEN
-#define FILNMLEN 18 /* # characters in a file name */
-
-
-#ifdef COFF_IMAGE_WITH_PE
-/* The filehdr is only weired in images */
-
-#undef FILHDR
-struct external_PE_filehdr
-{
- /* DOS header fields */
- unsigned short e_magic; /* Magic number, 0x5a4d */
- unsigned short e_cblp; /* Bytes on last page of file, 0x90 */
- unsigned short e_cp; /* Pages in file, 0x3 */
- unsigned short e_crlc; /* Relocations, 0x0 */
- unsigned short e_cparhdr; /* Size of header in paragraphs, 0x4 */
- unsigned short e_minalloc; /* Minimum extra paragraphs needed, 0x0 */
- unsigned short e_maxalloc; /* Maximum extra paragraphs needed, 0xFFFF */
- unsigned short e_ss; /* Initial (relative) SS value, 0x0 */
- unsigned short e_sp; /* Initial SP value, 0xb8 */
- unsigned short e_csum; /* Checksum, 0x0 */
- unsigned short e_ip; /* Initial IP value, 0x0 */
- unsigned short e_cs; /* Initial (relative) CS value, 0x0 */
- unsigned short e_lfarlc; /* File address of relocation table, 0x40 */
- unsigned short e_ovno; /* Overlay number, 0x0 */
- char e_res[4][2]; /* Reserved words, all 0x0 */
- unsigned short e_oemid; /* OEM identifier (for e_oeminfo), 0x0 */
- unsigned short e_oeminfo; /* OEM information; e_oemid specific, 0x0 */
- char e_res2[10][2]; /* Reserved words, all 0x0 */
- unsigned long e_lfanew; /* File address of new exe header, 0x80 */
- char dos_message[16][4]; /* other stuff, always follow DOS header */
- unsigned int nt_signature; /* required NT signature, 0x4550 */
-
- /* From standard header */
-
- unsigned short f_magic; /* magic number */
- unsigned short f_nscns; /* number of sections */
- unsigned long f_timdat; /* time & date stamp */
- unsigned long f_symptr; /* file pointer to symtab */
- unsigned long f_nsyms; /* number of symtab entries */
- unsigned short f_opthdr; /* sizeof(optional hdr) */
- unsigned short f_flags; /* flags */
-};
-
-
-#define FILHDR struct external_PE_filehdr
-#undef FILHSZ
-#define FILHSZ 152
-
-#endif
-
-typedef struct
-{
- unsigned short magic; /* type of file */
- unsigned short vstamp; /* version stamp */
- unsigned long tsize; /* text size in bytes, padded to FW bdry*/
- unsigned long dsize; /* initialized data " " */
- unsigned long bsize; /* uninitialized data " " */
- unsigned long entry; /* entry pt. */
- unsigned long text_start; /* base of text used for this file */
- unsigned long data_start; /* base of all data used for this file */
-
- /* NT extra fields; see internal.h for descriptions */
- unsigned long ImageBase;
- unsigned long SectionAlignment;
- unsigned long FileAlignment;
- unsigned short MajorOperatingSystemVersion;
- unsigned short MinorOperatingSystemVersion;
- unsigned short MajorImageVersion;
- unsigned short MinorImageVersion;
- unsigned short MajorSubsystemVersion;
- unsigned short MinorSubsystemVersion;
- char Reserved1[4];
- unsigned long SizeOfImage;
- unsigned long SizeOfHeaders;
- unsigned long CheckSum;
- unsigned short Subsystem;
- unsigned short DllCharacteristics;
- unsigned long SizeOfStackReserve;
- unsigned long SizeOfStackCommit;
- unsigned long SizeOfHeapReserve;
- unsigned long SizeOfHeapCommit;
- unsigned long LoaderFlags;
- unsigned long NumberOfRvaAndSizes;
- /* IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; */
- char DataDirectory[16][2][4]; /* 16 entries, 2 elements/entry, 4 chars */
-
-} PEAOUTHDR;
-
-
-#undef AOUTSZ
-#define AOUTSZ (AOUTHDRSZ + 196)
-
-#undef E_FILNMLEN
-#define E_FILNMLEN 18 /* # characters in a file name */
-#endif
-
-/* end of coff/pe.h */
-
-#define DT_NON (0) /* no derived type */
-#define DT_PTR (1) /* pointer */
-#define DT_FCN (2) /* function */
-#define DT_ARY (3) /* array */
-
-#define ISPTR(x) (((x) & N_TMASK) == (DT_PTR << N_BTSHFT))
-#define ISFCN(x) (((x) & N_TMASK) == (DT_FCN << N_BTSHFT))
-#define ISARY(x) (((x) & N_TMASK) == (DT_ARY << N_BTSHFT))
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _A_OUT_H_ */
-
diff --git a/winsup/cygwin/include/arpa/ftp.h b/winsup/cygwin/include/arpa/ftp.h
deleted file mode 100644
index 7d39a3e..0000000
--- a/winsup/cygwin/include/arpa/ftp.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 1983, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ftp.h 8.1 (Berkeley) 6/2/93
- */
-
-#ifndef _ARPA_FTP_H
-#define _ARPA_FTP_H
-
-/* Definitions for FTP; see RFC-765. */
-
-/*
- * Reply codes.
- */
-#define PRELIM 1 /* positive preliminary */
-#define COMPLETE 2 /* positive completion */
-#define CONTINUE 3 /* positive intermediate */
-#define TRANSIENT 4 /* transient negative completion */
-#define ERROR 5 /* permanent negative completion */
-
-/*
- * Type codes
- */
-#define TYPE_A 1 /* ASCII */
-#define TYPE_E 2 /* EBCDIC */
-#define TYPE_I 3 /* image */
-#define TYPE_L 4 /* local byte size */
-
-#ifdef FTP_NAMES
-char *typenames[] = {"0", "ASCII", "EBCDIC", "Image", "Local" };
-#endif
-
-/*
- * Form codes
- */
-#define FORM_N 1 /* non-print */
-#define FORM_T 2 /* telnet format effectors */
-#define FORM_C 3 /* carriage control (ASA) */
-#ifdef FTP_NAMES
-char *formnames[] = {"0", "Nonprint", "Telnet", "Carriage-control" };
-#endif
-
-/*
- * Structure codes
- */
-#define STRU_F 1 /* file (no record structure) */
-#define STRU_R 2 /* record structure */
-#define STRU_P 3 /* page structure */
-#ifdef FTP_NAMES
-char *strunames[] = {"0", "File", "Record", "Page" };
-#endif
-
-/*
- * Mode types
- */
-#define MODE_S 1 /* stream */
-#define MODE_B 2 /* block */
-#define MODE_C 3 /* compressed */
-#ifdef FTP_NAMES
-char *modenames[] = {"0", "Stream", "Block", "Compressed" };
-#endif
-
-/*
- * Record Tokens
- */
-#define REC_ESC '\377' /* Record-mode Escape */
-#define REC_EOR '\001' /* Record-mode End-of-Record */
-#define REC_EOF '\002' /* Record-mode End-of-File */
-
-/*
- * Block Header
- */
-#define BLK_EOR 0x80 /* Block is End-of-Record */
-#define BLK_EOF 0x40 /* Block is End-of-File */
-#define BLK_ERRORS 0x20 /* Block is suspected of containing errors */
-#define BLK_RESTART 0x10 /* Block is Restart Marker */
-
-#define BLK_BYTECOUNT 2 /* Bytes in this block */
-
-#endif /* !_ARPA_FTP_H */
diff --git a/winsup/cygwin/include/arpa/inet.h b/winsup/cygwin/include/arpa/inet.h
deleted file mode 100644
index d6b19fc..0000000
--- a/winsup/cygwin/include/arpa/inet.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* arpa/inet.h
-
- Copyright 1997, 1998, 2001, 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. */
-
-#ifndef _ARPA_INET_H
-#define _ARPA_INET_H
-
-#include <netinet/in.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#ifndef __INSIDE_CYGWIN_NET__
-in_addr_t inet_addr (const char *);
-int inet_aton (const char *, struct in_addr *);
-in_addr_t inet_lnaof (struct in_addr);
-struct in_addr inet_makeaddr (unsigned long , unsigned long);
-in_addr_t inet_netof (struct in_addr);
-in_addr_t inet_network (const char *);
-char *inet_ntoa (struct in_addr);
-int inet_pton (int, const char *, void *);
-const char *inet_ntop (int, const void *, char *, socklen_t);
-#endif
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif /* _ARPA_INET_H */
diff --git a/winsup/cygwin/include/arpa/nameser.h b/winsup/cygwin/include/arpa/nameser.h
deleted file mode 100755
index 3980933..0000000
--- a/winsup/cygwin/include/arpa/nameser.h
+++ /dev/null
@@ -1,563 +0,0 @@
-/*
- * Copyright (c) 1983, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 1996-1999 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * $Id$
- */
-
-#ifndef _ARPA_NAMESER_H_
-#define _ARPA_NAMESER_H_
-
-#ifdef __CYGWIN__
-#define BSD 199903 /* Used inside the .h file */
-#endif
-
-#define BIND_4_COMPAT
-
-#include <sys/param.h>
-#if (!defined(BSD)) || (BSD < 199306)
-# include <sys/bitypes.h>
-#else
-# include <sys/types.h>
-#endif
-#include <sys/cdefs.h>
-
-/*
- * Revision information. This is the release date in YYYYMMDD format.
- * It can change every day so the right thing to do with it is use it
- * in preprocessor commands such as "#if (__NAMESER > 19931104)". Do not
- * compare for equality; rather, use it to determine whether your libbind.a
- * contains a new enough lib/nameser/ to support the feature you need.
- */
-
-#define __NAMESER 19991006 /* New interface version stamp. */
-
-/*
- * Define constants based on RFC 883, RFC 1034, RFC 1035
- */
-#define NS_PACKETSZ 512 /* maximum packet size */
-#define NS_MAXDNAME 1025 /* maximum domain name */
-#define NS_MAXCDNAME 255 /* maximum compressed domain name */
-#define NS_MAXLABEL 63 /* maximum length of domain label */
-#define NS_HFIXEDSZ 12 /* #/bytes of fixed data in header */
-#define NS_QFIXEDSZ 4 /* #/bytes of fixed data in query */
-#define NS_RRFIXEDSZ 10 /* #/bytes of fixed data in r record */
-#define NS_INT32SZ 4 /* #/bytes of data in a u_int32_t */
-#define NS_INT16SZ 2 /* #/bytes of data in a u_int16_t */
-#define NS_INT8SZ 1 /* #/bytes of data in a u_int8_t */
-#define NS_INADDRSZ 4 /* IPv4 T_A */
-#define NS_IN6ADDRSZ 16 /* IPv6 T_AAAA */
-#define NS_CMPRSFLGS 0xc0 /* Flag bits indicating name compression. */
-#define NS_DEFAULTPORT 53 /* For both TCP and UDP. */
-
-/*
- * These can be expanded with synonyms, just keep ns_parse.c:ns_parserecord()
- * in synch with it.
- */
-typedef enum __ns_sect {
- ns_s_qd = 0, /* Query: Question. */
- ns_s_zn = 0, /* Update: Zone. */
- ns_s_an = 1, /* Query: Answer. */
- ns_s_pr = 1, /* Update: Prerequisites. */
- ns_s_ns = 2, /* Query: Name servers. */
- ns_s_ud = 2, /* Update: Update. */
- ns_s_ar = 3, /* Query|Update: Additional records. */
- ns_s_max = 4
-} ns_sect;
-
-/*
- * This is a message handle. It is caller allocated and has no dynamic data.
- * This structure is intended to be opaque to all but ns_parse.c, thus the
- * leading _'s on the member names. Use the accessor functions, not the _'s.
- */
-typedef struct __ns_msg {
- const u_char *_msg, *_eom;
- u_int16_t _id, _flags, _counts[ns_s_max];
- const u_char *_sections[ns_s_max];
- ns_sect _sect;
- int _rrnum;
- const u_char *_msg_ptr;
-} ns_msg;
-
-/* Private data structure - do not use from outside library. */
-struct _ns_flagdata { int mask, shift; };
-extern struct _ns_flagdata _ns_flagdata[];
-
-/* Accessor macros - this is part of the public interface. */
-
-#define ns_msg_id(handle) ((handle)._id + 0)
-#define ns_msg_base(handle) ((handle)._msg + 0)
-#define ns_msg_end(handle) ((handle)._eom + 0)
-#define ns_msg_size(handle) ((handle)._eom - (handle)._msg)
-#define ns_msg_count(handle, section) ((handle)._counts[section] + 0)
-
-/*
- * This is a parsed record. It is caller allocated and has no dynamic data.
- */
-typedef struct __ns_rr {
- char name[NS_MAXDNAME];
- u_int16_t type;
- u_int16_t rr_class;
- u_int32_t ttl;
- u_int16_t rdlength;
- const u_char * rdata;
-} ns_rr;
-
-/* Accessor macros - this is part of the public interface. */
-#define ns_rr_name(rr) (((rr).name[0] != '\0') ? (rr).name : ".")
-#define ns_rr_type(rr) ((ns_type)((rr).type + 0))
-#define ns_rr_class(rr) ((ns_class)((rr).rr_class + 0))
-#define ns_rr_ttl(rr) ((rr).ttl + 0)
-#define ns_rr_rdlen(rr) ((rr).rdlength + 0)
-#define ns_rr_rdata(rr) ((rr).rdata + 0)
-
-/*
- * These don't have to be in the same order as in the packet flags word,
- * and they can even overlap in some cases, but they will need to be kept
- * in synch with ns_parse.c:ns_flagdata[].
- */
-typedef enum __ns_flag {
- ns_f_qr, /* Question/Response. */
- ns_f_opcode, /* Operation code. */
- ns_f_aa, /* Authoritative Answer. */
- ns_f_tc, /* Truncation occurred. */
- ns_f_rd, /* Recursion Desired. */
- ns_f_ra, /* Recursion Available. */
- ns_f_z, /* MBZ. */
- ns_f_ad, /* Authentic Data (DNSSEC). */
- ns_f_cd, /* Checking Disabled (DNSSEC). */
- ns_f_rcode, /* Response code. */
- ns_f_max
-} ns_flag;
-
-/*
- * Currently defined opcodes.
- */
-typedef enum __ns_opcode {
- ns_o_query = 0, /* Standard query. */
- ns_o_iquery = 1, /* Inverse query (deprecated/unsupported). */
- ns_o_status = 2, /* Name server status query (unsupported). */
- /* Opcode 3 is undefined/reserved. */
- ns_o_notify = 4, /* Zone change notification. */
- ns_o_update = 5, /* Zone update message. */
- ns_o_max = 6
-} ns_opcode;
-
-/*
- * Currently defined response codes.
- */
-typedef enum __ns_rcode {
- ns_r_noerror = 0, /* No error occurred. */
- ns_r_formerr = 1, /* Format error. */
- ns_r_servfail = 2, /* Server failure. */
- ns_r_nxdomain = 3, /* Name error. */
- ns_r_notimpl = 4, /* Unimplemented. */
- ns_r_refused = 5, /* Operation refused. */
- /* these are for BIND_UPDATE */
- ns_r_yxdomain = 6, /* Name exists */
- ns_r_yxrrset = 7, /* RRset exists */
- ns_r_nxrrset = 8, /* RRset does not exist */
- ns_r_notauth = 9, /* Not authoritative for zone */
- ns_r_notzone = 10, /* Zone of record different from zone section */
- ns_r_max = 11,
- /* The following are TSIG extended errors */
- ns_r_badsig = 16,
- ns_r_badkey = 17,
- ns_r_badtime = 18
-} ns_rcode;
-
-/* BIND_UPDATE */
-typedef enum __ns_update_operation {
- ns_uop_delete = 0,
- ns_uop_add = 1,
- ns_uop_max = 2
-} ns_update_operation;
-
-/*
- * This structure is used for TSIG authenticated messages
- */
-struct ns_tsig_key {
- char name[NS_MAXDNAME], alg[NS_MAXDNAME];
- unsigned char *data;
- int len;
-};
-typedef struct ns_tsig_key ns_tsig_key;
-
-/*
- * This structure is used for TSIG authenticated TCP messages
- */
-struct ns_tcp_tsig_state {
- int counter;
- struct dst_key *key;
- void *ctx;
- unsigned char sig[NS_PACKETSZ];
- int siglen;
-};
-typedef struct ns_tcp_tsig_state ns_tcp_tsig_state;
-
-#define NS_TSIG_FUDGE 300
-#define NS_TSIG_TCP_COUNT 100
-#define NS_TSIG_ALG_HMAC_MD5 "HMAC-MD5.SIG-ALG.REG.INT"
-
-#define NS_TSIG_ERROR_NO_TSIG -10
-#define NS_TSIG_ERROR_NO_SPACE -11
-#define NS_TSIG_ERROR_FORMERR -12
-
-/*
- * Currently defined type values for resources and queries.
- */
-typedef enum __ns_type {
- ns_t_invalid = 0, /* Cookie. */
- ns_t_a = 1, /* Host address. */
- ns_t_ns = 2, /* Authoritative server. */
- ns_t_md = 3, /* Mail destination. */
- ns_t_mf = 4, /* Mail forwarder. */
- ns_t_cname = 5, /* Canonical name. */
- ns_t_soa = 6, /* Start of authority zone. */
- ns_t_mb = 7, /* Mailbox domain name. */
- ns_t_mg = 8, /* Mail group member. */
- ns_t_mr = 9, /* Mail rename name. */
- ns_t_null = 10, /* Null resource record. */
- ns_t_wks = 11, /* Well known service. */
- ns_t_ptr = 12, /* Domain name pointer. */
- ns_t_hinfo = 13, /* Host information. */
- ns_t_minfo = 14, /* Mailbox information. */
- ns_t_mx = 15, /* Mail routing information. */
- ns_t_txt = 16, /* Text strings. */
- ns_t_rp = 17, /* Responsible person. */
- ns_t_afsdb = 18, /* AFS cell database. */
- ns_t_x25 = 19, /* X_25 calling address. */
- ns_t_isdn = 20, /* ISDN calling address. */
- ns_t_rt = 21, /* Router. */
- ns_t_nsap = 22, /* NSAP address. */
- ns_t_nsap_ptr = 23, /* Reverse NSAP lookup (deprecated). */
- ns_t_sig = 24, /* Security signature. */
- ns_t_key = 25, /* Security key. */
- ns_t_px = 26, /* X.400 mail mapping. */
- ns_t_gpos = 27, /* Geographical position (withdrawn). */
- ns_t_aaaa = 28, /* Ip6 Address. */
- ns_t_loc = 29, /* Location Information. */
- ns_t_nxt = 30, /* Next domain (security). */
- ns_t_eid = 31, /* Endpoint identifier. */
- ns_t_nimloc = 32, /* Nimrod Locator. */
- ns_t_srv = 33, /* Server Selection. */
- ns_t_atma = 34, /* ATM Address */
- ns_t_naptr = 35, /* Naming Authority PoinTeR */
- ns_t_kx = 36, /* Key Exchange */
- ns_t_cert = 37, /* Certification record */
- ns_t_a6 = 38, /* IPv6 address (deprecates AAAA) */
- ns_t_dname = 39, /* Non-terminal DNAME (for IPv6) */
- ns_t_sink = 40, /* Kitchen sink (experimentatl) */
- ns_t_opt = 41, /* EDNS0 option (meta-RR) */
- ns_t_tkey = 249, /* Transaction key */
- ns_t_tsig = 250, /* Transaction signature. */
- ns_t_ixfr = 251, /* Incremental zone transfer. */
- ns_t_axfr = 252, /* Transfer zone of authority. */
- ns_t_mailb = 253, /* Transfer mailbox records. */
- ns_t_maila = 254, /* Transfer mail agent records. */
- ns_t_any = 255, /* Wildcard match. */
- ns_t_zxfr = 256, /* BIND-specific, nonstandard. */
- ns_t_max = 65536
-} ns_type;
-
-/* Exclusively a QTYPE? (not also an RTYPE) */
-#define ns_t_qt_p(t) (ns_t_xfr_p(t) || (t) == ns_t_any || \
- (t) == ns_t_mailb || (t) == ns_t_maila)
-/* Some kind of meta-RR? (not a QTYPE, but also not an RTYPE) */
-#define ns_t_mrr_p(t) ((t) == ns_t_tsig || (t) == ns_t_opt)
-/* Exclusively an RTYPE? (not also a QTYPE or a meta-RR) */
-#define ns_t_rr_p(t) (!ns_t_qt_p(t) && !ns_t_mrr_p(t))
-#define ns_t_udp_p(t) ((t) != ns_t_axfr && (t) != ns_t_zxfr)
-#define ns_t_xfr_p(t) ((t) == ns_t_axfr || (t) == ns_t_ixfr || \
- (t) == ns_t_zxfr)
-
-/*
- * Values for class field
- */
-typedef enum __ns_class {
- ns_c_invalid = 0, /* Cookie. */
- ns_c_in = 1, /* Internet. */
- ns_c_2 = 2, /* unallocated/unsupported. */
- ns_c_chaos = 3, /* MIT Chaos-net. */
- ns_c_hs = 4, /* MIT Hesiod. */
- /* Query class values which do not appear in resource records */
- ns_c_none = 254, /* for prereq. sections in update requests */
- ns_c_any = 255, /* Wildcard match. */
- ns_c_max = 65536
-} ns_class;
-
-/* DNSSEC constants. */
-
-typedef enum __ns_key_types {
- ns_kt_rsa = 1, /* key type RSA/MD5 */
- ns_kt_dh = 2, /* Diffie Hellman */
- ns_kt_dsa = 3, /* Digital Signature Standard (MANDATORY) */
- ns_kt_private = 254 /* Private key type starts with OID */
-} ns_key_types;
-
-typedef enum __ns_cert_types {
- cert_t_pkix = 1, /* PKIX (X.509v3) */
- cert_t_spki = 2, /* SPKI */
- cert_t_pgp = 3, /* PGP */
- cert_t_url = 253, /* URL private type */
- cert_t_oid = 254 /* OID private type */
-} ns_cert_types;
-
-/* Flags field of the KEY RR rdata. */
-#define NS_KEY_TYPEMASK 0xC000 /* Mask for "type" bits */
-#define NS_KEY_TYPE_AUTH_CONF 0x0000 /* Key usable for both */
-#define NS_KEY_TYPE_CONF_ONLY 0x8000 /* Key usable for confidentiality */
-#define NS_KEY_TYPE_AUTH_ONLY 0x4000 /* Key usable for authentication */
-#define NS_KEY_TYPE_NO_KEY 0xC000 /* No key usable for either; no key */
-/* The type bits can also be interpreted independently, as single bits: */
-#define NS_KEY_NO_AUTH 0x8000 /* Key unusable for authentication */
-#define NS_KEY_NO_CONF 0x4000 /* Key unusable for confidentiality */
-#define NS_KEY_RESERVED2 0x2000 /* Security is *mandatory* if bit=0 */
-#define NS_KEY_EXTENDED_FLAGS 0x1000 /* reserved - must be zero */
-#define NS_KEY_RESERVED4 0x0800 /* reserved - must be zero */
-#define NS_KEY_RESERVED5 0x0400 /* reserved - must be zero */
-#define NS_KEY_NAME_TYPE 0x0300 /* these bits determine the type */
-#define NS_KEY_NAME_USER 0x0000 /* key is assoc. with user */
-#define NS_KEY_NAME_ENTITY 0x0200 /* key is assoc. with entity eg host */
-#define NS_KEY_NAME_ZONE 0x0100 /* key is zone key */
-#define NS_KEY_NAME_RESERVED 0x0300 /* reserved meaning */
-#define NS_KEY_RESERVED8 0x0080 /* reserved - must be zero */
-#define NS_KEY_RESERVED9 0x0040 /* reserved - must be zero */
-#define NS_KEY_RESERVED10 0x0020 /* reserved - must be zero */
-#define NS_KEY_RESERVED11 0x0010 /* reserved - must be zero */
-#define NS_KEY_SIGNATORYMASK 0x000F /* key can sign RR's of same name */
-#define NS_KEY_RESERVED_BITMASK ( NS_KEY_RESERVED2 | \
- NS_KEY_RESERVED4 | \
- NS_KEY_RESERVED5 | \
- NS_KEY_RESERVED8 | \
- NS_KEY_RESERVED9 | \
- NS_KEY_RESERVED10 | \
- NS_KEY_RESERVED11 )
-#define NS_KEY_RESERVED_BITMASK2 0xFFFF /* no bits defined here */
-
-/* The Algorithm field of the KEY and SIG RR's is an integer, {1..254} */
-#define NS_ALG_MD5RSA 1 /* MD5 with RSA */
-#define NS_ALG_DH 2 /* Diffie Hellman KEY */
-#define NS_ALG_DSA 3 /* DSA KEY */
-#define NS_ALG_DSS NS_ALG_DSA
-#define NS_ALG_EXPIRE_ONLY 253 /* No alg, no security */
-#define NS_ALG_PRIVATE_OID 254 /* Key begins with OID giving alg */
-
-/* Protocol values */
-/* value 0 is reserved */
-#define NS_KEY_PROT_TLS 1
-#define NS_KEY_PROT_EMAIL 2
-#define NS_KEY_PROT_DNSSEC 3
-#define NS_KEY_PROT_IPSEC 4
-#define NS_KEY_PROT_ANY 255
-
-/* Signatures */
-#define NS_MD5RSA_MIN_BITS 512 /* Size of a mod or exp in bits */
-#define NS_MD5RSA_MAX_BITS 2552
- /* Total of binary mod and exp */
-#define NS_MD5RSA_MAX_BYTES ((NS_MD5RSA_MAX_BITS+7/8)*2+3)
- /* Max length of text sig block */
-#define NS_MD5RSA_MAX_BASE64 (((NS_MD5RSA_MAX_BYTES+2)/3)*4)
-#define NS_MD5RSA_MIN_SIZE ((NS_MD5RSA_MIN_BITS+7)/8)
-#define NS_MD5RSA_MAX_SIZE ((NS_MD5RSA_MAX_BITS+7)/8)
-
-#define NS_DSA_SIG_SIZE 41
-#define NS_DSA_MIN_SIZE 213
-#define NS_DSA_MAX_BYTES 405
-
-/* Offsets into SIG record rdata to find various values */
-#define NS_SIG_TYPE 0 /* Type flags */
-#define NS_SIG_ALG 2 /* Algorithm */
-#define NS_SIG_LABELS 3 /* How many labels in name */
-#define NS_SIG_OTTL 4 /* Original TTL */
-#define NS_SIG_EXPIR 8 /* Expiration time */
-#define NS_SIG_SIGNED 12 /* Signature time */
-#define NS_SIG_FOOT 16 /* Key footprint */
-#define NS_SIG_SIGNER 18 /* Domain name of who signed it */
-
-/* How RR types are represented as bit-flags in NXT records */
-#define NS_NXT_BITS 8
-#define NS_NXT_BIT_SET( n,p) (p[(n)/NS_NXT_BITS] |= (0x80>>((n)%NS_NXT_BITS)))
-#define NS_NXT_BIT_CLEAR(n,p) (p[(n)/NS_NXT_BITS] &= ~(0x80>>((n)%NS_NXT_BITS)))
-#define NS_NXT_BIT_ISSET(n,p) (p[(n)/NS_NXT_BITS] & (0x80>>((n)%NS_NXT_BITS)))
-#define NS_NXT_MAX 127
-
-/*
- * Inline versions of get/put short/long. Pointer is advanced.
- */
-#define NS_GET16(s, cp) do { \
- register const u_char *t_cp = (const u_char *)(cp); \
- (s) = ((u_int16_t)t_cp[0] << 8) \
- | ((u_int16_t)t_cp[1]) \
- ; \
- (cp) += NS_INT16SZ; \
-} while (0)
-
-#define NS_GET32(l, cp) do { \
- register const u_char *t_cp = (const u_char *)(cp); \
- (l) = ((u_int32_t)t_cp[0] << 24) \
- | ((u_int32_t)t_cp[1] << 16) \
- | ((u_int32_t)t_cp[2] << 8) \
- | ((u_int32_t)t_cp[3]) \
- ; \
- (cp) += NS_INT32SZ; \
-} while (0)
-
-#define NS_PUT16(s, cp) do { \
- register u_int16_t t_s = (u_int16_t)(s); \
- register u_char *t_cp = (u_char *)(cp); \
- *t_cp++ = t_s >> 8; \
- *t_cp = t_s; \
- (cp) += NS_INT16SZ; \
-} while (0)
-
-#define NS_PUT32(l, cp) do { \
- register u_int32_t t_l = (u_int32_t)(l); \
- register u_char *t_cp = (u_char *)(cp); \
- *t_cp++ = t_l >> 24; \
- *t_cp++ = t_l >> 16; \
- *t_cp++ = t_l >> 8; \
- *t_cp = t_l; \
- (cp) += NS_INT32SZ; \
-} while (0)
-
-/*
- * ANSI C identifier hiding for bind's lib/nameser.
- */
-#define ns_msg_getflag __ns_msg_getflag
-#define ns_get16 __ns_get16
-#define ns_get32 __ns_get32
-#define ns_put16 __ns_put16
-#define ns_put32 __ns_put32
-#define ns_initparse __ns_initparse
-#define ns_skiprr __ns_skiprr
-#define ns_parserr __ns_parserr
-#define ns_sprintrr __ns_sprintrr
-#define ns_sprintrrf __ns_sprintrrf
-#define ns_format_ttl __ns_format_ttl
-#define ns_parse_ttl __ns_parse_ttl
-#define ns_datetosecs __ns_datetosecs
-#define ns_name_ntol __ns_name_ntol
-#define ns_name_ntop __ns_name_ntop
-#define ns_name_pton __ns_name_pton
-#define ns_name_unpack __ns_name_unpack
-#define ns_name_pack __ns_name_pack
-#define ns_name_compress __ns_name_compress
-#define ns_name_uncompress __ns_name_uncompress
-#define ns_name_skip __ns_name_skip
-#define ns_name_rollback __ns_name_rollback
-#define ns_sign __ns_sign
-#define ns_sign_tcp __ns_sign_tcp
-#define ns_sign_tcp_init __ns_sign_tcp_init
-#define ns_find_tsig __ns_find_tsig
-#define ns_verify __ns_verify
-#define ns_verify_tcp __ns_verify_tcp
-#define ns_verify_tcp_init __ns_verify_tcp_init
-#define ns_samedomain __ns_samedomain
-#define ns_subdomain __ns_subdomain
-#define ns_makecanon __ns_makecanon
-#define ns_samename __ns_samename
-
-__BEGIN_DECLS
-int ns_msg_getflag __P((ns_msg, int));
-u_int ns_get16 __P((const u_char *));
-u_long ns_get32 __P((const u_char *));
-void ns_put16 __P((u_int, u_char *));
-void ns_put32 __P((u_long, u_char *));
-int ns_initparse __P((const u_char *, int, ns_msg *));
-int ns_skiprr __P((const u_char *, const u_char *, ns_sect, int));
-int ns_parserr __P((ns_msg *, ns_sect, int, ns_rr *));
-int ns_sprintrr __P((const ns_msg *, const ns_rr *,
- const char *, const char *, char *, size_t));
-int ns_sprintrrf __P((const u_char *, size_t, const char *,
- ns_class, ns_type, u_long, const u_char *,
- size_t, const char *, const char *,
- char *, size_t));
-int ns_format_ttl __P((u_long, char *, size_t));
-int ns_parse_ttl __P((const char *, u_long *));
-u_int32_t ns_datetosecs __P((const char *cp, int *errp));
-int ns_name_ntol __P((const u_char *, u_char *, size_t));
-int ns_name_ntop __P((const u_char *, char *, size_t));
-int ns_name_pton __P((const char *, u_char *, size_t));
-int ns_name_unpack __P((const u_char *, const u_char *,
- const u_char *, u_char *, size_t));
-int ns_name_pack __P((const u_char *, u_char *, int,
- const u_char **, const u_char **));
-int ns_name_uncompress __P((const u_char *, const u_char *,
- const u_char *, char *, size_t));
-int ns_name_compress __P((const char *, u_char *, size_t,
- const u_char **, const u_char **));
-int ns_name_skip __P((const u_char **, const u_char *));
-void ns_name_rollback __P((const u_char *, const u_char **,
- const u_char **));
-int ns_sign __P((u_char *, int *, int, int, void *,
- const u_char *, int, u_char *, int *, time_t));
-int ns_sign_tcp __P((u_char *, int *, int, int,
- ns_tcp_tsig_state *, int));
-int ns_sign_tcp_init __P((void *, const u_char *, int,
- ns_tcp_tsig_state *));
-u_char *ns_find_tsig __P((u_char *, u_char *));
-int ns_verify __P((u_char *, int *, void *,
- const u_char *, int, u_char *, int *,
- time_t *, int));
-int ns_verify_tcp __P((u_char *, int *, ns_tcp_tsig_state *, int));
-int ns_verify_tcp_init __P((void *, const u_char *, int,
- ns_tcp_tsig_state *));
-int ns_samedomain __P((const char *, const char *));
-int ns_subdomain __P((const char *, const char *));
-int ns_makecanon __P((const char *, char *, size_t));
-int ns_samename __P((const char *, const char *));
-__END_DECLS
-
-#ifdef BIND_4_COMPAT
-#include <arpa/nameser_compat.h>
-#endif
-
-#endif /* !_ARPA_NAMESER_H_ */
diff --git a/winsup/cygwin/include/arpa/nameser_compat.h b/winsup/cygwin/include/arpa/nameser_compat.h
deleted file mode 100755
index a75f9bc..0000000
--- a/winsup/cygwin/include/arpa/nameser_compat.h
+++ /dev/null
@@ -1,231 +0,0 @@
-/* Copyright (c) 1983, 1989
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * from nameser.h 8.1 (Berkeley) 6/2/93
- * $Id$
- */
-
-#ifndef _ARPA_NAMESER_COMPAT_
-#define _ARPA_NAMESER_COMPAT_
-
-#define __BIND 19950621 /* (DEAD) interface version stamp. */
-
-#ifndef BYTE_ORDER
-#if (BSD >= 199103)
-# include <machine/endian.h>
-#else
-#ifdef linux
-# include <endian.h>
-#else
-#define LITTLE_ENDIAN 1234 /* least-significant byte first (vax, pc) */
-#define BIG_ENDIAN 4321 /* most-significant byte first (IBM, net) */
-#define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long (pdp)*/
-
-#if defined(vax) || defined(ns32000) || defined(sun386) || defined(i386) || \
- defined(MIPSEL) || defined(_MIPSEL) || defined(BIT_ZERO_ON_RIGHT) || \
- defined(__alpha__) || defined(__alpha) || \
- (defined(__Lynx__) && defined(__x86__))
-#define BYTE_ORDER LITTLE_ENDIAN
-#endif
-
-#if defined(sel) || defined(pyr) || defined(mc68000) || defined(sparc) || \
- defined(is68k) || defined(tahoe) || defined(ibm032) || defined(ibm370) || \
- defined(MIPSEB) || defined(_MIPSEB) || defined(_IBMR2) || defined(DGUX) ||\
- defined(apollo) || defined(__convex__) || defined(_CRAY) || \
- defined(__hppa) || defined(__hp9000) || \
- defined(__hp9000s300) || defined(__hp9000s700) || \
- defined(__hp3000s900) || defined(MPE) || \
- defined (BIT_ZERO_ON_LEFT) || defined(m68k) || \
- (defined(__Lynx__) && \
- (defined(__68k__) || defined(__sparc__) || defined(__powerpc__)))
-#define BYTE_ORDER BIG_ENDIAN
-#endif
-#endif /* linux */
-#endif /* BSD */
-#endif /* BYTE_ORDER */
-
-#if !defined(BYTE_ORDER) || \
- (BYTE_ORDER != BIG_ENDIAN && BYTE_ORDER != LITTLE_ENDIAN && \
- BYTE_ORDER != PDP_ENDIAN)
- /* you must determine what the correct bit order is for
- * your compiler - the next line is an intentional error
- * which will force your compiles to bomb until you fix
- * the above macros.
- */
- error "Undefined or invalid BYTE_ORDER";
-#endif
-
-/*
- * Structure for query header. The order of the fields is machine- and
- * compiler-dependent, depending on the byte/bit order and the layout
- * of bit fields. We use bit fields only in int variables, as this
- * is all ANSI requires. This requires a somewhat confusing rearrangement.
- */
-
-typedef struct {
- unsigned id :16; /* query identification number */
-#if BYTE_ORDER == BIG_ENDIAN
- /* fields in third byte */
- unsigned qr: 1; /* response flag */
- unsigned opcode: 4; /* purpose of message */
- unsigned aa: 1; /* authoritive answer */
- unsigned tc: 1; /* truncated message */
- unsigned rd: 1; /* recursion desired */
- /* fields in fourth byte */
- unsigned ra: 1; /* recursion available */
- unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */
- unsigned ad: 1; /* authentic data from named */
- unsigned cd: 1; /* checking disabled by resolver */
- unsigned rcode :4; /* response code */
-#endif
-#if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN
- /* fields in third byte */
- unsigned rd :1; /* recursion desired */
- unsigned tc :1; /* truncated message */
- unsigned aa :1; /* authoritive answer */
- unsigned opcode :4; /* purpose of message */
- unsigned qr :1; /* response flag */
- /* fields in fourth byte */
- unsigned rcode :4; /* response code */
- unsigned cd: 1; /* checking disabled by resolver */
- unsigned ad: 1; /* authentic data from named */
- unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */
- unsigned ra :1; /* recursion available */
-#endif
- /* remaining bytes */
- unsigned qdcount :16; /* number of question entries */
- unsigned ancount :16; /* number of answer entries */
- unsigned nscount :16; /* number of authority entries */
- unsigned arcount :16; /* number of resource entries */
-} HEADER;
-
-#define PACKETSZ NS_PACKETSZ
-#define MAXDNAME NS_MAXDNAME
-#define MAXCDNAME NS_MAXCDNAME
-#define MAXLABEL NS_MAXLABEL
-#define HFIXEDSZ NS_HFIXEDSZ
-#define QFIXEDSZ NS_QFIXEDSZ
-#define RRFIXEDSZ NS_RRFIXEDSZ
-#define INT32SZ NS_INT32SZ
-#define INT16SZ NS_INT16SZ
-#define INADDRSZ NS_INADDRSZ
-#define IN6ADDRSZ NS_IN6ADDRSZ
-#define INDIR_MASK NS_CMPRSFLGS
-#define NAMESERVER_PORT NS_DEFAULTPORT
-
-#define S_ZONE ns_s_zn
-#define S_PREREQ ns_s_pr
-#define S_UPDATE ns_s_ud
-#define S_ADDT ns_s_ar
-
-#define QUERY ns_o_query
-#define IQUERY ns_o_iquery
-#define STATUS ns_o_status
-#define NS_NOTIFY_OP ns_o_notify
-#define NS_UPDATE_OP ns_o_update
-
-#define NOERROR ns_r_noerror
-#define FORMERR ns_r_formerr
-#define SERVFAIL ns_r_servfail
-#define NXDOMAIN ns_r_nxdomain
-#define NOTIMP ns_r_notimpl
-#define REFUSED ns_r_refused
-#define YXDOMAIN ns_r_yxdomain
-#define YXRRSET ns_r_yxrrset
-#define NXRRSET ns_r_nxrrset
-#define NOTAUTH ns_r_notauth
-#define NOTZONE ns_r_notzone
-/*#define BADSIG ns_r_badsig*/
-/*#define BADKEY ns_r_badkey*/
-/*#define BADTIME ns_r_badtime*/
-
-
-#define DELETE ns_uop_delete
-#define ADD ns_uop_add
-
-#define T_A ns_t_a
-#define T_NS ns_t_ns
-#define T_MD ns_t_md
-#define T_MF ns_t_mf
-#define T_CNAME ns_t_cname
-#define T_SOA ns_t_soa
-#define T_MB ns_t_mb
-#define T_MG ns_t_mg
-#define T_MR ns_t_mr
-#define T_NULL ns_t_null
-#define T_WKS ns_t_wks
-#define T_PTR ns_t_ptr
-#define T_HINFO ns_t_hinfo
-#define T_MINFO ns_t_minfo
-#define T_MX ns_t_mx
-#define T_TXT ns_t_txt
-#define T_RP ns_t_rp
-#define T_AFSDB ns_t_afsdb
-#define T_X25 ns_t_x25
-#define T_ISDN ns_t_isdn
-#define T_RT ns_t_rt
-#define T_NSAP ns_t_nsap
-#define T_NSAP_PTR ns_t_nsap_ptr
-#define T_SIG ns_t_sig
-#define T_KEY ns_t_key
-#define T_PX ns_t_px
-#define T_GPOS ns_t_gpos
-#define T_AAAA ns_t_aaaa
-#define T_LOC ns_t_loc
-#define T_NXT ns_t_nxt
-#define T_EID ns_t_eid
-#define T_NIMLOC ns_t_nimloc
-#define T_SRV ns_t_srv
-#define T_ATMA ns_t_atma
-#define T_NAPTR ns_t_naptr
-#define T_A6 ns_t_a6
-#define T_TSIG ns_t_tsig
-#define T_IXFR ns_t_ixfr
-#define T_AXFR ns_t_axfr
-#define T_MAILB ns_t_mailb
-#define T_MAILA ns_t_maila
-#define T_ANY ns_t_any
-
-#define C_IN ns_c_in
-#define C_CHAOS ns_c_chaos
-#define C_HS ns_c_hs
-/* BIND_UPDATE */
-#define C_NONE ns_c_none
-#define C_ANY ns_c_any
-
-#define GETSHORT NS_GET16
-#define GETLONG NS_GET32
-#define PUTSHORT NS_PUT16
-#define PUTLONG NS_PUT32
-
-#endif /* _ARPA_NAMESER_COMPAT_ */
diff --git a/winsup/cygwin/include/arpa/telnet.h b/winsup/cygwin/include/arpa/telnet.h
deleted file mode 100644
index 5087476..0000000
--- a/winsup/cygwin/include/arpa/telnet.h
+++ /dev/null
@@ -1,322 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)telnet.h 8.2 (Berkeley) 12/15/93
- */
-
-#ifndef _ARPA_TELNET_H
-#define _ARPA_TELNET_H
-
-/*
- * Definitions for the TELNET protocol.
- */
-#define IAC 255 /* interpret as command: */
-#define DONT 254 /* you are not to use option */
-#define DO 253 /* please, you use option */
-#define WONT 252 /* I won't use option */
-#define WILL 251 /* I will use option */
-#define SB 250 /* interpret as subnegotiation */
-#define GA 249 /* you may reverse the line */
-#define EL 248 /* erase the current line */
-#define EC 247 /* erase the current character */
-#define AYT 246 /* are you there */
-#define AO 245 /* abort output--but let prog finish */
-#define IP 244 /* interrupt process--permanently */
-#define BREAK 243 /* break */
-#define DM 242 /* data mark--for connect. cleaning */
-#define NOP 241 /* nop */
-#define SE 240 /* end sub negotiation */
-#define EOR 239 /* end of record (transparent mode) */
-#define ABORT 238 /* Abort process */
-#define SUSP 237 /* Suspend process */
-#define xEOF 236 /* End of file: EOF is already used... */
-
-#define SYNCH 242 /* for telfunc calls */
-
-#ifdef TELCMDS
-char *telcmds[] = {
- "EOF", "SUSP", "ABORT", "EOR",
- "SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC",
- "EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC", 0,
-};
-#else
-extern char *telcmds[];
-#endif
-
-#define TELCMD_FIRST xEOF
-#define TELCMD_LAST IAC
-#define TELCMD_OK(x) ((unsigned int)(x) <= TELCMD_LAST && \
- (unsigned int)(x) >= TELCMD_FIRST)
-#define TELCMD(x) telcmds[(x)-TELCMD_FIRST]
-
-/* telnet options */
-#define TELOPT_BINARY 0 /* 8-bit data path */
-#define TELOPT_ECHO 1 /* echo */
-#define TELOPT_RCP 2 /* prepare to reconnect */
-#define TELOPT_SGA 3 /* suppress go ahead */
-#define TELOPT_NAMS 4 /* approximate message size */
-#define TELOPT_STATUS 5 /* give status */
-#define TELOPT_TM 6 /* timing mark */
-#define TELOPT_RCTE 7 /* remote controlled transmission and echo */
-#define TELOPT_NAOL 8 /* negotiate about output line width */
-#define TELOPT_NAOP 9 /* negotiate about output page size */
-#define TELOPT_NAOCRD 10 /* negotiate about CR disposition */
-#define TELOPT_NAOHTS 11 /* negotiate about horizontal tabstops */
-#define TELOPT_NAOHTD 12 /* negotiate about horizontal tab disposition */
-#define TELOPT_NAOFFD 13 /* negotiate about formfeed disposition */
-#define TELOPT_NAOVTS 14 /* negotiate about vertical tab stops */
-#define TELOPT_NAOVTD 15 /* negotiate about vertical tab disposition */
-#define TELOPT_NAOLFD 16 /* negotiate about output LF disposition */
-#define TELOPT_XASCII 17 /* extended ascic character set */
-#define TELOPT_LOGOUT 18 /* force logout */
-#define TELOPT_BM 19 /* byte macro */
-#define TELOPT_DET 20 /* data entry terminal */
-#define TELOPT_SUPDUP 21 /* supdup protocol */
-#define TELOPT_SUPDUPOUTPUT 22 /* supdup output */
-#define TELOPT_SNDLOC 23 /* send location */
-#define TELOPT_TTYPE 24 /* terminal type */
-#define TELOPT_EOR 25 /* end or record */
-#define TELOPT_TUID 26 /* TACACS user identification */
-#define TELOPT_OUTMRK 27 /* output marking */
-#define TELOPT_TTYLOC 28 /* terminal location number */
-#define TELOPT_3270REGIME 29 /* 3270 regime */
-#define TELOPT_X3PAD 30 /* X.3 PAD */
-#define TELOPT_NAWS 31 /* window size */
-#define TELOPT_TSPEED 32 /* terminal speed */
-#define TELOPT_LFLOW 33 /* remote flow control */
-#define TELOPT_LINEMODE 34 /* Linemode option */
-#define TELOPT_XDISPLOC 35 /* X Display Location */
-#define TELOPT_OLD_ENVIRON 36 /* Old - Environment variables */
-#define TELOPT_AUTHENTICATION 37/* Authenticate */
-#define TELOPT_ENCRYPT 38 /* Encryption option */
-#define TELOPT_NEW_ENVIRON 39 /* New - Environment variables */
-#define TELOPT_EXOPL 255 /* extended-options-list */
-#define TELOPT_ENVIRON TELOPT_OLD_ENVIRON
-
-#define NTELOPTS (1+TELOPT_NEW_ENVIRON)
-#ifdef TELOPTS
-char *telopts[NTELOPTS+1] = {
- "BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME",
- "STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP",
- "NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS",
- "NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO",
- "DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT",
- "SEND LOCATION", "TERMINAL TYPE", "END OF RECORD",
- "TACACS UID", "OUTPUT MARKING", "TTYLOC",
- "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW",
- "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION",
- "ENCRYPT", "NEW-ENVIRON",
- 0,
-};
-#define TELOPT_FIRST TELOPT_BINARY
-#define TELOPT_LAST TELOPT_NEW_ENVIRON
-#define TELOPT_OK(x) ((unsigned int)(x) <= TELOPT_LAST)
-#define TELOPT(x) telopts[(x)-TELOPT_FIRST]
-#endif
-
-/* sub-option qualifiers */
-#define TELQUAL_IS 0 /* option is... */
-#define TELQUAL_SEND 1 /* send option */
-#define TELQUAL_INFO 2 /* ENVIRON: informational version of IS */
-#define TELQUAL_REPLY 2 /* AUTHENTICATION: client version of IS */
-#define TELQUAL_NAME 3 /* AUTHENTICATION: client version of IS */
-
-#define LFLOW_OFF 0 /* Disable remote flow control */
-#define LFLOW_ON 1 /* Enable remote flow control */
-#define LFLOW_RESTART_ANY 2 /* Restart output on any char */
-#define LFLOW_RESTART_XON 3 /* Restart output only on XON */
-
-/*
- * LINEMODE suboptions
- */
-
-#define LM_MODE 1
-#define LM_FORWARDMASK 2
-#define LM_SLC 3
-
-#define MODE_EDIT 0x01
-#define MODE_TRAPSIG 0x02
-#define MODE_ACK 0x04
-#define MODE_SOFT_TAB 0x08
-#define MODE_LIT_ECHO 0x10
-
-#define MODE_MASK 0x1f
-
-/* Not part of protocol, but needed to simplify things... */
-#define MODE_FLOW 0x0100
-#define MODE_ECHO 0x0200
-#define MODE_INBIN 0x0400
-#define MODE_OUTBIN 0x0800
-#define MODE_FORCE 0x1000
-
-#define SLC_SYNCH 1
-#define SLC_BRK 2
-#define SLC_IP 3
-#define SLC_AO 4
-#define SLC_AYT 5
-#define SLC_EOR 6
-#define SLC_ABORT 7
-#define SLC_EOF 8
-#define SLC_SUSP 9
-#define SLC_EC 10
-#define SLC_EL 11
-#define SLC_EW 12
-#define SLC_RP 13
-#define SLC_LNEXT 14
-#define SLC_XON 15
-#define SLC_XOFF 16
-#define SLC_FORW1 17
-#define SLC_FORW2 18
-
-#define NSLC 18
-
-/*
- * For backwards compatability, we define SLC_NAMES to be the
- * list of names if SLC_NAMES is not defined.
- */
-#define SLC_NAMELIST "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \
- "ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \
- "LNEXT", "XON", "XOFF", "FORW1", "FORW2", 0,
-#ifdef SLC_NAMES
-char *slc_names[] = {
- SLC_NAMELIST
-};
-#else
-extern char *slc_names[];
-#define SLC_NAMES SLC_NAMELIST
-#endif
-
-#define SLC_NAME_OK(x) ((unsigned int)(x) <= NSLC)
-#define SLC_NAME(x) slc_names[x]
-
-#define SLC_NOSUPPORT 0
-#define SLC_CANTCHANGE 1
-#define SLC_VARIABLE 2
-#define SLC_DEFAULT 3
-#define SLC_LEVELBITS 0x03
-
-#define SLC_FUNC 0
-#define SLC_FLAGS 1
-#define SLC_VALUE 2
-
-#define SLC_ACK 0x80
-#define SLC_FLUSHIN 0x40
-#define SLC_FLUSHOUT 0x20
-
-#define OLD_ENV_VAR 1
-#define OLD_ENV_VALUE 0
-#define NEW_ENV_VAR 0
-#define NEW_ENV_VALUE 1
-#define ENV_ESC 2
-#define ENV_USERVAR 3
-
-#define ENV_VALUE 0
-#define ENV_VAR 1
-
-/*
- * AUTHENTICATION suboptions
- */
-
-/*
- * Who is authenticating who ...
- */
-#define AUTH_WHO_CLIENT 0 /* Client authenticating server */
-#define AUTH_WHO_SERVER 1 /* Server authenticating client */
-#define AUTH_WHO_MASK 1
-
-/*
- * amount of authentication done
- */
-#define AUTH_HOW_ONE_WAY 0
-#define AUTH_HOW_MUTUAL 2
-#define AUTH_HOW_MASK 2
-
-#define AUTHTYPE_NULL 0
-#define AUTHTYPE_KERBEROS_V4 1
-#define AUTHTYPE_KERBEROS_V5 2
-#define AUTHTYPE_SPX 3
-#define AUTHTYPE_MINK 4
-#define AUTHTYPE_CNT 5
-
-#define AUTHTYPE_TEST 99
-
-#ifdef AUTH_NAMES
-char *authtype_names[] = {
- "NULL", "KERBEROS_V4", "KERBEROS_V5", "SPX", "MINK", 0,
-};
-#else
-extern char *authtype_names[];
-#endif
-
-#define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT)
-#define AUTHTYPE_NAME(x) authtype_names[x]
-
-/*
- * ENCRYPTion suboptions
- */
-#define ENCRYPT_IS 0 /* I pick encryption type ... */
-#define ENCRYPT_SUPPORT 1 /* I support encryption types ... */
-#define ENCRYPT_REPLY 2 /* Initial setup response */
-#define ENCRYPT_START 3 /* Am starting to send encrypted */
-#define ENCRYPT_END 4 /* Am ending encrypted */
-#define ENCRYPT_REQSTART 5 /* Request you start encrypting */
-#define ENCRYPT_REQEND 6 /* Request you send encrypting */
-#define ENCRYPT_ENC_KEYID 7
-#define ENCRYPT_DEC_KEYID 8
-#define ENCRYPT_CNT 9
-
-#define ENCTYPE_ANY 0
-#define ENCTYPE_DES_CFB64 1
-#define ENCTYPE_DES_OFB64 2
-#define ENCTYPE_CNT 3
-
-#ifdef ENCRYPT_NAMES
-char *encrypt_names[] = {
- "IS", "SUPPORT", "REPLY", "START", "END",
- "REQUEST-START", "REQUEST-END", "ENC-KEYID", "DEC-KEYID",
- 0,
-};
-char *enctype_names[] = {
- "ANY", "DES_CFB64", "DES_OFB64", 0,
-};
-#else
-extern char *encrypt_names[];
-extern char *enctype_names[];
-#endif
-
-
-#define ENCRYPT_NAME_OK(x) ((unsigned int)(x) < ENCRYPT_CNT)
-#define ENCRYPT_NAME(x) encrypt_names[x]
-
-#define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT)
-#define ENCTYPE_NAME(x) enctype_names[x]
-#endif /* _ARPA_TELNET_H */
diff --git a/winsup/cygwin/include/asm/byteorder.h b/winsup/cygwin/include/asm/byteorder.h
deleted file mode 100644
index 6942a2a..0000000
--- a/winsup/cygwin/include/asm/byteorder.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/* asm/byteorder.h
-
- Copyright 1996, 1998, 2001, 2006 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _I386_BYTEORDER_H
-#define _I386_BYTEORDER_H
-
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef __LITTLE_ENDIAN
-#define __LITTLE_ENDIAN 1234
-#endif
-
-#ifndef __LITTLE_ENDIAN_BITFIELD
-#define __LITTLE_ENDIAN_BITFIELD
-#endif
-
-extern uint32_t ntohl(uint32_t);
-extern uint16_t ntohs(uint16_t);
-extern uint32_t htonl(uint32_t);
-extern uint16_t htons(uint16_t);
-
-extern __inline__ uint32_t __ntohl(uint32_t);
-extern __inline__ uint16_t __ntohs(uint16_t);
-extern __inline__ uint32_t __constant_ntohl(uint32_t);
-extern __inline__ uint16_t __constant_ntohs(uint16_t);
-
-extern __inline__ uint32_t
-__ntohl(uint32_t x)
-{
- __asm__("xchgb %b0,%h0\n\t" /* swap lower bytes */
- "rorl $16,%0\n\t" /* swap words */
- "xchgb %b0,%h0" /* swap higher bytes */
- :"=q" (x)
- : "0" (x));
- return x;
-}
-
-#define __constant_ntohl(x) \
- ((uint32_t)((((uint32_t)(x) & 0x000000ffU) << 24) | \
- (((uint32_t)(x) & 0x0000ff00U) << 8) | \
- (((uint32_t)(x) & 0x00ff0000U) >> 8) | \
- (((uint32_t)(x) & 0xff000000U) >> 24)))
-
-extern __inline__ uint16_t
-__ntohs(uint16_t x)
-{
- __asm__("xchgb %b0,%h0" /* swap bytes */
- : "=q" (x)
- : "0" (x));
- return x;
-}
-
-#define __constant_ntohs(x) \
- ((uint16_t)((((uint16_t)(x) & 0x00ff) << 8) | \
- (((uint16_t)(x) & 0xff00) >> 8))) \
-
-#define __htonl(x) __ntohl(x)
-#define __htons(x) __ntohs(x)
-#define __constant_htonl(x) __constant_ntohl(x)
-#define __constant_htons(x) __constant_ntohs(x)
-
-#if defined (__OPTIMIZE__) && !defined (__NO_INLINE__)
-# define ntohl(x) \
-(__builtin_constant_p((long)(x)) ? \
- __constant_ntohl((x)) : \
- __ntohl((x)))
-# define ntohs(x) \
-(__builtin_constant_p((short)(x)) ? \
- __constant_ntohs((x)) : \
- __ntohs((x)))
-# define htonl(x) \
-(__builtin_constant_p((long)(x)) ? \
- __constant_htonl((x)) : \
- __htonl((x)))
-# define htons(x) \
-(__builtin_constant_p((short)(x)) ? \
- __constant_htons((x)) : \
- __htons((x)))
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/winsup/cygwin/include/asm/socket.h b/winsup/cygwin/include/asm/socket.h
deleted file mode 100644
index e4cec1f..0000000
--- a/winsup/cygwin/include/asm/socket.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* asm/socket.h
-
- Copyright 1996, 1997, 1998, 2001, 2005, 2007 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 _ASM_SOCKET_H
-#define _ASM_SOCKET_H
-
-#include <cygwin/if.h>
-
-#define IOCPARM_MASK 0x7f /* parameters must be < 128 bytes */
-#define IOC_VOID 0x20000000 /* no parameters */
-#define IOC_OUT 0x40000000 /* copy out parameters */
-#define IOC_IN 0x80000000 /* copy in parameters */
-
-#define _IO(x,y) (IOC_VOID|(x<<8)|y)
-#define _IOR(x,y,t) (IOC_OUT|(((long)sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y)
-#define _IOW(x,y,t) (IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y)
-
-#define SIOCATMARK _IOR('s', 7, u_long) /* at oob mark? */
-#define FIONREAD _IOR('f', 127, u_long) /* get # bytes to read */
-#define FIONBIO 0x8004667e /* To be compatible with termiost version */
-#define REAL_FIONBIO _IOW('f', 126, u_long) /* set/clear non-blocking i/o */
-#define FIOASYNC _IOW('f', 125, u_long) /* set/clear async i/o */
-#define SIOCSHIWAT _IOW('s', 0, u_long) /* set high watermark */
-#define SIOCGHIWAT _IOR('s', 1, u_long) /* get high watermark */
-#define SIOCSLOWAT _IOW('s', 2, u_long) /* set low watermark */
-#define SIOCGLOWAT _IOR('s', 3, u_long) /* get low watermark */
-
-/* Needed for if queries */
-#define SIOCGIFCONF _IOW('s', 100, struct ifconf) /* get if list */
-#define SIOCGIFFLAGS _IOW('s', 101, struct ifreq) /* Get if flags */
-#define SIOCGIFADDR _IOW('s', 102, struct ifreq) /* Get if addr */
-#define SIOCGIFBRDADDR _IOW('s', 103, struct ifreq) /* Get if broadcastaddr */
-#define SIOCGIFNETMASK _IOW('s', 104, struct ifreq) /* Get if netmask */
-#define SIOCGIFHWADDR _IOW('s', 105, struct ifreq) /* Get hw addr */
-#define SIOCGIFMETRIC _IOW('s', 106, struct ifreq) /* get metric */
-#define SIOCGIFMTU _IOW('s', 107, struct ifreq) /* get MTU size */
-#define SIOCGIFINDEX _IOW('s', 108, struct ifreq) /* get if index */
-#define SIOGIFINDEX SIOCGIFINDEX /* backward compatibility w/ Linux typo. */
-#define SIOCGIFFRNDLYNAM _IOW('s', 109, struct ifreq) /* get friendly if name */
-#define SIOCGIFDSTADDR _IOW('s', 110, struct ifreq) /* Get if dstaddr */
-
-#define SOL_SOCKET 0xffff /* options for socket level */
-
-#define SO_DEBUG 0x0001 /* turn on debugging info recording */
-#define SO_ACCEPTCONN 0x0002 /* socket has had listen() */
-#define SO_REUSEADDR 0x0004 /* allow local address reuse */
-#define SO_KEEPALIVE 0x0008 /* keep connections alive */
-#define SO_DONTROUTE 0x0010 /* just use interface addresses */
-#define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */
-#define SO_USELOOPBACK 0x0040 /* bypass hardware when possible */
-#define SO_LINGER 0x0080 /* linger on close if data present */
-#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */
-#define SO_DONTLINGER (u_int)(~SO_LINGER)
-#define SO_PEERCRED 0x0200 /* same as getpeereid */
-
-/*
- * Additional options.
- */
-#define SO_SNDBUF 0x1001 /* send buffer size */
-#define SO_RCVBUF 0x1002 /* receive buffer size */
-#define SO_SNDLOWAT 0x1003 /* send low-water mark */
-#define SO_RCVLOWAT 0x1004 /* receive low-water mark */
-#define SO_SNDTIMEO 0x1005 /* send timeout */
-#define SO_RCVTIMEO 0x1006 /* receive timeout */
-#define SO_ERROR 0x1007 /* get error status and clear */
-#define SO_TYPE 0x1008 /* get socket type */
-
-#endif /* _ASM_SOCKET_H */
-
diff --git a/winsup/cygwin/include/asm/types.h b/winsup/cygwin/include/asm/types.h
deleted file mode 100644
index 2653fd6..0000000
--- a/winsup/cygwin/include/asm/types.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* asm/types.h
-
- Copyright 1998, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _ASM_TYPES_H
-#define _ASM_TYPES_H
-
-typedef __signed__ char __s8;
-typedef unsigned char __u8;
-
-typedef __signed__ short __s16;
-typedef unsigned short __u16;
-
-typedef __signed__ int __s32;
-typedef unsigned int __u32;
-
-#endif /* _ASM_TYPES_H */
diff --git a/winsup/cygwin/include/attr/xattr.h b/winsup/cygwin/include/attr/xattr.h
deleted file mode 100644
index 421e687..0000000
--- a/winsup/cygwin/include/attr/xattr.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* attr/xattr.h
-
- Copyright 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _ATTR_XATTR_H
-#define _ATTR_XATTR_H
-
-#include "_ansi.h"
-#if 0
-/* Per man pages you have to include <sys/types.h> explicitely before
- including <attr/xattr.h>. That's how it works on Linux, too. */
-#include <sys/types.h>
-#endif
-#include <sys/errno.h>
-
-#define XATTR_CREATE 1
-#define XATTR_REPLACE 2
-
-#ifndef ENOATTR
-#define ENOATTR ENODATA
-#endif
-
-_BEGIN_STD_C
-
-ssize_t _EXFUN(getxattr,(const char *, const char *, void *, size_t ));
-ssize_t _EXFUN(lgetxattr,(const char *, const char *, void *, size_t ));
-ssize_t _EXFUN(fgetxattr,(int , const char *, void *, size_t ));
-ssize_t _EXFUN(listxattr,(const char *, char *, size_t ));
-ssize_t _EXFUN(llistxattr,(const char *, char *, size_t ));
-ssize_t _EXFUN(flistxattr,(int , char *, size_t ));
-int _EXFUN(setxattr,(const char *, const char *, const void *, size_t , int ));
-int _EXFUN(lsetxattr,(const char *, const char *, const void *, size_t , int ));
-int _EXFUN(fsetxattr,(int , const char *, const void *, size_t , int ));
-int _EXFUN(removexattr,(const char *, const char *));
-int _EXFUN(lremovexattr,(const char *, const char *));
-int _EXFUN(fremovexattr,(int , const char *));
-
-_END_STD_C
-
-#endif /* _ATTR_XATTR_H */
diff --git a/winsup/cygwin/include/byteswap.h b/winsup/cygwin/include/byteswap.h
deleted file mode 100644
index cd5a726..0000000
--- a/winsup/cygwin/include/byteswap.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* byteswap.h
-
-Copyright 2005 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _BYTESWAP_H
-#define _BYTESWAP_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-static __inline unsigned short
-bswap_16 (unsigned short __x)
-{
- return (__x >> 8) | (__x << 8);
-}
-
-static __inline unsigned int
-bswap_32 (unsigned int __x)
-{
- return (bswap_16 (__x & 0xffff) << 16) | (bswap_16 (__x >> 16));
-}
-
-static __inline unsigned long long
-bswap_64 (unsigned long long __x)
-{
- return (((unsigned long long) bswap_32 (__x & 0xffffffffull)) << 32) | (bswap_32 (__x >> 32));
-}
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _BYTESWAP_H */
diff --git a/winsup/cygwin/include/ctype.h b/winsup/cygwin/include/ctype.h
deleted file mode 100644
index 343bafb..0000000
--- a/winsup/cygwin/include/ctype.h
+++ /dev/null
@@ -1,79 +0,0 @@
-#ifndef _CTYPE_H_
-#define _CTYPE_H_
-
-#include <_ansi.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int __cdecl isalnum(int);
-int __cdecl isalpha(int);
-int __cdecl iscntrl(int);
-int __cdecl isdigit(int);
-int __cdecl isgraph(int);
-int __cdecl islower(int);
-int __cdecl isprint(int);
-int __cdecl ispunct(int);
-int __cdecl isspace(int);
-int __cdecl isupper(int);
-int __cdecl isxdigit(int);
-int __cdecl tolower(int);
-int __cdecl toupper(int);
-
-#ifndef __STRICT_ANSI__
-int __cdecl isblank(int);
-int __cdecl isascii(int);
-int __cdecl toascii(int);
-int __cdecl _tolower(int);
-int __cdecl _toupper(int);
-#endif
-
-#define _U 01
-#define _L 02
-#define _N 04
-#define _S 010
-#define _P 020
-#define _C 040
-#define _X 0100
-#define _B 0200
-
-#if defined (__INSIDE_CYGWIN__) || defined (_COMPILING_NEWLIB)
-extern const char _ctype_[];
-#ifdef _COMPILING_NEWLIB
-extern const char *__ctype_ptr__;
-#endif
-#else
-extern const __declspec(dllimport) char _ctype_[];
-#endif
-
-#if !defined(__cplusplus) || defined(__INSIDE_CYGWIN__)
-#define isalpha(c) ((_ctype_+1)[(unsigned)(c)]&(_U|_L))
-#define isblank(c) ((c) == ' ' || (c) == '\t')
-#define isupper(c) ((_ctype_+1)[(unsigned)(c)]&_U)
-#define islower(c) ((_ctype_+1)[(unsigned)(c)]&_L)
-#define isdigit(c) ((_ctype_+1)[(unsigned)(c)]&_N)
-#define isxdigit(c) ((_ctype_+1)[(unsigned)(c)]&(_X|_N))
-#define isspace(c) ((_ctype_+1)[(unsigned)(c)]&_S)
-#define ispunct(c) ((_ctype_+1)[(unsigned)(c)]&_P)
-#define isalnum(c) ((_ctype_+1)[(unsigned)(c)]&(_U|_L|_N))
-#define isprint(c) ((_ctype_+1)[(unsigned)(c)]&(_P|_U|_L|_N|_B))
-#define isgraph(c) ((_ctype_+1)[(unsigned)(c)]&(_P|_U|_L|_N))
-#define iscntrl(c) ((_ctype_+1)[(unsigned)(c)]&_C)
-/* Non-gcc versions will get the library versions, and will be
- slightly slower */
-# define toupper(c) \
- __extension__ ({ int __x = (c); islower(__x) ? (__x - 'a' + 'A') : __x;})
-# define tolower(c) \
- __extension__ ({ int __x = (c); isupper(__x) ? (__x - 'A' + 'a') : __x;})
-#endif /* !__cplusplus */
-
-#if !defined(__STRICT_ANSI__) || defined(__INSIDE_CYGWIN__)
-#define isascii(c) ((unsigned)(c)<=0177)
-#define toascii(c) ((c)&0177)
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _CTYPE_H_ */
diff --git a/winsup/cygwin/include/cygwin/_types.h b/winsup/cygwin/include/cygwin/_types.h
deleted file mode 100644
index b962676..0000000
--- a/winsup/cygwin/include/cygwin/_types.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* cygwin/_types.h
-
- Copyright 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. */
-
-#ifndef _CYGWIN__TYPES_H
-#define _CYGWIN__TYPES_H
-
-typedef void *_flock_t;
-
-#endif /* _CYGWIN__TYPES_H */
diff --git a/winsup/cygwin/include/cygwin/acl.h b/winsup/cygwin/include/cygwin/acl.h
deleted file mode 100644
index 3ea5f91..0000000
--- a/winsup/cygwin/include/cygwin/acl.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* cygwin/acl.h header file for Cygwin.
-
- Copyright 1999, 2000, 2001, 2002 Red Hat, Inc.
- Written by C. Vinschen.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_ACL_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define _CYGWIN_ACL_H
-
-#include <_ansi.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-/* Values for `cmd' in calls to acl(2) and facl(2) */
-#define SETACL (0x0)
-#define GETACL (0x1)
-#define GETACLCNT (0x2)
-
-#define MIN_ACL_ENTRIES (4) // minimal acl entries from GETACLCNT
-#define MAX_ACL_ENTRIES (256) // max entries of each type
-
-// Return values of aclcheck(3) in case of error */
-#define GRP_ERROR (0x1)
-#define USER_ERROR (0x2)
-#define CLASS_ERROR (0x3)
-#define OTHER_ERROR (0x4)
-#define DUPLICATE_ERROR (0x5)
-#define ENTRY_ERROR (0x6)
-#define MISS_ERROR (0x7) // which = -1
-#define MEM_ERROR (0x8) // which = -1
-
-// Values for entry type of struct acl
-#define USER_OBJ (0x0001) // owner
-#define USER (0x0002) // additional user
-#define GROUP_OBJ (0x0004) // owning group
-#define GROUP (0x0008) // additional group
-#define CLASS_OBJ (0x0010) // mask entry
-#define OTHER_OBJ (0x0020) // others
-#define ACL_DEFAULT (0x1000) // default flag
-#define DEF_USER_OBJ (ACL_DEFAULT|USER_OBJ) // default owner
-#define DEF_USER (ACL_DEFAULT|USER) // default additional user
-#define DEF_GROUP_OBJ (ACL_DEFAULT|GROUP_OBJ) // default owning group
-#define DEF_GROUP (ACL_DEFAULT|GROUP) // default additional group
-#define DEF_CLASS_OBJ (ACL_DEFAULT|CLASS_OBJ) // default mask entry
-#define DEF_OTHER_OBJ (ACL_DEFAULT|OTHER_OBJ) // default others
-// Values with equivalent meanings
-#define USER_OWNER USER_OBJ
-#define GROUP_OWNER GROUP_OBJ
-#define MASK CLASS_OBJ
-#define OTHER OTHER_OBJ
-
-#ifdef __INSIDE_CYGWIN__
-typedef struct __acl16 {
- int a_type;
- __uid16_t a_id;
- mode_t a_perm;
-} __aclent16_t;
-
-typedef struct __acl32 {
- int a_type;
- __uid32_t a_id;
- mode_t a_perm;
-} __aclent32_t;
-#else
-typedef struct acl {
- int a_type; /* entry type */
- uid_t a_id; /* UID | GID */
- mode_t a_perm; /* permissions */
-} aclent_t;
-#endif
-
-#ifndef __INSIDE_CYGWIN__
-int _EXFUN(acl,(const char *path, int cmd, int nentries, aclent_t *aclbufp));
-int _EXFUN(lacl,(const char *path, int cmd, int nentries, aclent_t *aclbufp));
-int _EXFUN(facl,(int fd, int cmd, int nentries, aclent_t *aclbufp));
-int _EXFUN(aclcheck,(aclent_t *aclbufp, int nentries, int *which));
-int _EXFUN(aclsort,(int nentries, int calclass, aclent_t *aclbufp));
-int _EXFUN(acltomode,(aclent_t *aclbufp, int nentries, mode_t *modep));
-int _EXFUN(aclfrommode,(aclent_t *aclbufp, int nentries, mode_t *modep));
-int _EXFUN(acltopbits,(aclent_t *aclbufp, int nentries, mode_t *pbitsp));
-int _EXFUN(aclfrompbits,(aclent_t *aclbufp, int nentries, mode_t *pbitsp));
-char *_EXFUN(acltotext,(aclent_t *aclbufp, int aclcnt));
-aclent_t *_EXFUN(aclfromtext,(char *acltextp, int *aclcnt));
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _CYGWIN_ACL_H */
diff --git a/winsup/cygwin/include/cygwin/config.h b/winsup/cygwin/include/cygwin/config.h
deleted file mode 100644
index f887bac..0000000
--- a/winsup/cygwin/include/cygwin/config.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* cygwin/config.h header file for Cygwin.
-
- This wraps Cygwin configuration setting which were in newlib's
- sys/config.h before. This way we can manaage our configuration
- setting without bothering newlib.
-
- Copyright 2003 Red Hat, Inc.
- Written by C. Vinschen.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_CONFIG_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define _CYGWIN_CONFIG_H
-
-#define __DYNAMIC_REENT__
-
-/* The following provides an inline version of __getreent() for newlib,
- which will be used throughout the library whereever there is a _r
- version of a function that takes _REENT. This saves the overhead
- of a function call for what amounts to a simple computation.
-
- The definition below is essentially equivalent to the one in cygtls.h
- (&_my_tls.local_clib) however it uses a fixed precomputed
- offset rather than dereferencing a field of a structure.
-
- Including tlsoffets.h here in order to get this constant offset
- tls_local_clib is a bit of a hack, but the alternative would require
- dragging the entire definition of struct _cygtls (a large and complex
- Cygwin internal data structure) into newlib. The machinery to
- compute these offsets already exists for the sake of gendef so
- we might as well just use it here. */
-
-#ifdef _COMPILING_NEWLIB
-#include "../tlsoffsets.h"
-extern char *_tlsbase __asm__ ("%fs:4");
-#define __getreent() (struct _reent *)(_tlsbase + tls_local_clib)
-#endif /* _COMPILING_NEWLIB */
-
-#define __FILENAME_MAX__ 4096 /* Keep in sync with PATH_MAX in limits.h. */
-#define _READ_WRITE_RETURN_TYPE _ssize_t
-#define __LARGE64_FILES 1
-#define __CYGWIN_USE_BIG_TYPES__ 1
-#ifdef __CYGWIN_USE_BIG_TYPES__
-/* __USE_INTERNAL_STAT64 is needed when building newlib for Cygwin.
- It must be set when __CYGWIN_USE_BIG_TYPES__ is set. In this case
- newlib will call the 64 bit stat calls internally. Otherwise the
- struct stat used in newlib is not matching the struct stat used in
- Cygwin. */
-#define __USE_INTERNAL_STAT64 1
-#endif
-#if defined(__INSIDE_CYGWIN__) || defined(_COMPILING_NEWLIB)
-#define __IMPORT
-#else
-#define __IMPORT __declspec(dllimport)
-#endif
-
-#ifndef __WCHAR_MAX__
-#define __WCHAR_MAX__ 0xffffu
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _CYGWIN_CONFIG_H */
diff --git a/winsup/cygwin/include/cygwin/core_dump.h b/winsup/cygwin/include/cygwin/core_dump.h
deleted file mode 100644
index b194393..0000000
--- a/winsup/cygwin/include/cygwin/core_dump.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* core_dump.h
-
- Copyright 1999, 2000, 2001 Red Hat, Inc.
-
- Written by Egor Duda <deo@logos-m.ru>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_CORE_DUMP_H
-#define _CYGWIN_CORE_DUMP_H
-
-#include <windows.h>
-
-#define NOTE_INFO_PROCESS 1
-#define NOTE_INFO_THREAD 2
-#define NOTE_INFO_MODULE 3
-
-struct win32_core_process_info
-{
- DWORD pid;
- int signal;
- int command_line_size;
- char command_line[1];
-}
-#ifdef __GNUC__
- __attribute__ ((packed))
-#endif
-;
-
-struct win32_core_thread_info
-{
- DWORD tid;
- BOOL is_active_thread;
- CONTEXT thread_context;
-}
-#ifdef __GNUC__
- __attribute__ ((packed))
-#endif
-;
-
-struct win32_core_module_info
-{
- void* base_address;
- int module_name_size;
- char module_name[1];
-}
-#ifdef __GNUC__
- __attribute__ ((packed))
-#endif
-;
-
-struct win32_pstatus
-{
- unsigned long data_type;
- union
- {
- struct win32_core_process_info process_info;
- struct win32_core_thread_info thread_info;
- struct win32_core_module_info module_info;
- } data ;
-}
-#ifdef __GNUC__
- __attribute__ ((packed))
-#endif
-;
-
-typedef struct win32_pstatus win32_pstatus_t ;
-
-#endif /* _CYGWIN_CORE_DUMP_H */
diff --git a/winsup/cygwin/include/cygwin/cygwin_dll.h b/winsup/cygwin/include/cygwin/cygwin_dll.h
deleted file mode 100644
index 80c9d13..0000000
--- a/winsup/cygwin/include/cygwin/cygwin_dll.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* cygwin_dll.h
-
- Copyright 1998, 1999, 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef __CYGWIN_CYGWIN_DLL_H__
-#define __CYGWIN_CYGWIN_DLL_H__
-
-#include <windows.h>
-
-#ifdef __cplusplus
-#define CDECL_BEGIN extern "C" {
-#define CDECL_END }
-#else
-#define CDECL_BEGIN
-#define CDECL_END
-#endif
-
-#define DECLARE_CYGWIN_DLL(Entry) \
- \
-CDECL_BEGIN \
- int WINAPI Entry (HINSTANCE h, DWORD reason, void *ptr); \
- typedef int (*mainfunc) (int, char **, char **); \
- extern int cygwin_attach_dll (HMODULE, mainfunc); \
- extern void cygwin_detach_dll (DWORD); \
-CDECL_END \
- \
-static HINSTANCE storedHandle; \
-static DWORD storedReason; \
-static void* storedPtr; \
- \
-static int __dllMain (int a, char **b, char **c) \
-{ \
- return Entry (storedHandle, storedReason, storedPtr); \
-} \
- \
-static DWORD dll_index; \
- \
-int WINAPI _cygwin_dll_entry (HINSTANCE h, DWORD reason, void *ptr) \
-{ \
- int ret; \
- ret = 1; \
- \
- switch (reason) \
- { \
- case DLL_PROCESS_ATTACH: \
- { \
- storedHandle = h; \
- storedReason = reason; \
- storedPtr = ptr; \
- dll_index = cygwin_attach_dll (h, &__dllMain); \
- if (dll_index == (DWORD) -1) \
- ret = 0; \
- } \
- break; \
- \
- case DLL_PROCESS_DETACH: \
- { \
- ret = Entry (h, reason, ptr); \
- if (ret) \
- { \
- cygwin_detach_dll (dll_index); \
- dll_index = (DWORD) -1; \
- } \
- } \
- break; \
- \
- case DLL_THREAD_ATTACH: \
- { \
- ret = Entry (h, reason, ptr); \
- } \
- break; \
- \
- case DLL_THREAD_DETACH: \
- { \
- ret = Entry (h, reason, ptr); \
- } \
- break; \
- } \
- return ret; \
-} \
- \
-/* OBSOLETE: This is only provided for source level compatibility. */ \
-int WINAPI _cygwin_noncygwin_dll_entry (HINSTANCE h, DWORD reason, void *ptr) \
-{ \
- return _cygwin_dll_entry (h, reason, ptr); \
-} \
-
-#endif /* __CYGWIN_CYGWIN_DLL_H__ */
diff --git a/winsup/cygwin/include/cygwin/fs.h b/winsup/cygwin/include/cygwin/fs.h
deleted file mode 100644
index eb8c7e3..0000000
--- a/winsup/cygwin/include/cygwin/fs.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* cygwin/fs.h
-
- Copyright 2002, 2003 Red Hat Inc.
- Written by Chris January <chris@atomice.net>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_FS_H_
-#define _CYGWIN_FS_H_
-
-#define BLKRRPART 0x0000125f
-#define BLKGETSIZE 0x00001260
-#define BLKSSZGET 0x00001268
-#define BLKGETSIZE64 0x00041268
-
-#endif
diff --git a/winsup/cygwin/include/cygwin/grp.h b/winsup/cygwin/include/cygwin/grp.h
deleted file mode 100644
index 7dcae63..0000000
--- a/winsup/cygwin/include/cygwin/grp.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* cygwin/grp.h
-
- Copyright 2002 Red Hat Inc.
- Written by Corinna Vinschen <corinna@vinschen.de>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_GRP_H_
-#define _CYGWIN_GRP_H_
-
-#include <sys/types.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __INSIDE_CYGWIN__
-struct __group16
-{
- char *gr_name;
- char *gr_passwd;
- __gid16_t gr_gid;
- char **gr_mem;
-};
-
-struct __group32
-{
- char *gr_name;
- char *gr_passwd;
- __gid32_t gr_gid;
- char **gr_mem;
-};
-
-struct __group32 * getgrgid32 (__gid32_t gid);
-struct __group32 * getgrnam32 (const char *name);
-__gid32_t getgid32 ();
-__gid32_t getegid32 ();
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CYGWIN_GRP_H_ */
diff --git a/winsup/cygwin/include/cygwin/hdreg.h b/winsup/cygwin/include/cygwin/hdreg.h
deleted file mode 100644
index dc81578..0000000
--- a/winsup/cygwin/include/cygwin/hdreg.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* cygwin/hdreg.h
-
- Copyright 2002 Red Hat Inc.
- Written by Chris January <chris@atomice.net>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_HDREG_H_
-#define _CYGWIN_HDREG_H_
-
-struct hd_geometry {
- unsigned char heads;
- unsigned char sectors;
- unsigned short cylinders;
- unsigned long start;
-};
-
-#define HDIO_GETGEO 0x301
-
-#endif
diff --git a/winsup/cygwin/include/cygwin/icmp.h b/winsup/cygwin/include/cygwin/icmp.h
deleted file mode 100644
index 7e7aedc..0000000
--- a/winsup/cygwin/include/cygwin/icmp.h
+++ /dev/null
@@ -1 +0,0 @@
-/* icmp.h */
diff --git a/winsup/cygwin/include/cygwin/if.h b/winsup/cygwin/include/cygwin/if.h
deleted file mode 100644
index 8f76e83..0000000
--- a/winsup/cygwin/include/cygwin/if.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/* cygwin/if.h
-
- Copyright 1996, 2001, 2007 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_IF_H_
-#define _CYGWIN_IF_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-/* Standard interface flags. */
-#define IFF_UP 0x1 /* interface is up */
-#define IFF_BROADCAST 0x2 /* broadcast address valid */
-#define IFF_LOOPBACK 0x8 /* is a loopback net */
-#define IFF_POINTOPOINT 0x10 /* is a point-to-point interface */
-#define IFF_NOTRAILERS 0x20 /* avoid use of trailers */
-#define IFF_RUNNING 0x40 /* resources allocated */
-#define IFF_NOARP 0x80 /* no ARP protocol */
-#define IFF_PROMISC 0x100 /* receive all packets */
-#define IFF_MULTICAST 0x1000 /* Supports multicast */
-#define IFF_LOWER_UP 0x10000 /* driver signals L1 up */
-#define IFF_DORMANT 0x20000 /* driver signals dormant */
-
-struct if_nameindex {
- unsigned if_index;
- char *if_name;
-};
-
-/* This is the structure expected by ioctl when the application requests
- the friendly adapter name (>= XP SP1). ifru_data should point to such
- a structure when ioctl is called with SIOCGIFFRNDLYNAM. */
-#define IFRF_FRIENDLYNAMESIZ 260
-
-struct ifreq_frndlyname {
- int ifrf_len;
- char ifrf_friendlyname[IFRF_FRIENDLYNAMESIZ];
-};
-
-/*
- * Interface request structure used for socket
- * ioctl's. All interface ioctl's must have parameter
- * definitions which begin with ifr_name. The
- * remainder may be interface specific.
- */
-#define IFNAMSIZ 44
-#define IF_NAMESIZE IFNAMSIZ
-#define IFHWADDRLEN 6
-
-struct ifreq {
- union {
- char ifrn_name[IFNAMSIZ]; /* Unique Windows Adapter name (A GUID) */
- } ifr_ifrn;
-
- union {
- struct sockaddr ifru_addr;
- struct sockaddr ifru_broadaddr;
- struct sockaddr ifru_dstaddr;
- struct sockaddr ifru_netmask;
- struct sockaddr ifru_hwaddr;
- int ifru_flags;
- int ifru_metric;
- int ifru_mtu;
- int ifru_ifindex;
- /* The space must be preallocated by the application. */
- void *ifru_data;
- /* Pad to sizeof sockaddr_in6 for further extensions. */
- char __ifru_pad[28];
- } ifr_ifru;
-};
-
-#define ifr_name ifr_ifrn.ifrn_name /* interface name */
-#define ifr_addr ifr_ifru.ifru_addr /* address */
-#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
-#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* destination address */
-#define ifr_netmask ifr_ifru.ifru_netmask /* interface net mask */
-#define ifr_flags ifr_ifru.ifru_flags /* flags */
-#define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */
-#define ifr_metric ifr_ifru.ifru_metric /* metric */
-#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */
-#define ifr_ifindex ifr_ifru.ifru_ifindex /* interface index */
-#define ifr_data ifr_ifru.ifru_data /* for use by interface */
-#define ifr_frndlyname ifr_ifru.ifru_data /* Windows friendly if name */
-
-/*
- * Structure used in SIOCGIFCONF request.
- * Used to retrieve interface configuration
- * for machine (useful for programs which
- * must know all networks accessible).
- */
-
-struct ifconf
-{
- int ifc_len; /* size of buffer */
- union
- {
- caddr_t ifcu_buf;
- struct ifreq *ifcu_req;
- } ifc_ifcu;
-};
-
-#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
-#define ifc_req ifc_ifcu.ifcu_req /* array of structures */
-
-extern unsigned if_nametoindex (const char *);
-extern char *if_indextoname (unsigned, char *);
-extern struct if_nameindex *if_nameindex (void);
-extern void if_freenameindex (struct if_nameindex *);
-
-#ifdef __cplusplus
-};
-#endif /* __cplusplus */
-
-#endif /* _CYGWIN_IF_H_ */
diff --git a/winsup/cygwin/include/cygwin/in.h b/winsup/cygwin/include/cygwin/in.h
deleted file mode 100644
index 30ac623..0000000
--- a/winsup/cygwin/include/cygwin/in.h
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- * INET An implementation of the TCP/IP protocol suite for the LINUX
- * operating system. INET is implemented using the BSD Socket
- * interface as the means of communication with the user level.
- *
- * Definitions of the Internet Protocol.
- *
- * Version: @(#)in.h 1.0.1 04/21/93
- *
- * Authors: Original taken from the GNU Project <netinet/in.h> file.
- * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-#ifndef _CYGWIN_IN_H
-#define _CYGWIN_IN_H
-
-#include <cygwin/socket.h>
-
-typedef uint16_t in_port_t;
-typedef uint32_t in_addr_t;
-
-/* Standard well-defined IP protocols. If you ever add one here, don't
- forget to define it below. */
-enum
-{
- IPPROTO_IP = 0, /* Dummy protocol for TCP */
- IPPROTO_HOPOPTS = 0, /* IPv6 Hop-by-Hop options */
- IPPROTO_ICMP = 1, /* Internet Control Message Protocol */
- IPPROTO_IGMP = 2, /* Internet Gateway Management Protocol */
- IPPROTO_IPIP = 4, /* IPIP tunnels (older KA9Q tunnels use 94) */
- IPPROTO_TCP = 6, /* Transmission Control Protocol */
- IPPROTO_EGP = 8, /* Exterior Gateway Protocol */
- IPPROTO_PUP = 12, /* PUP protocol */
- IPPROTO_UDP = 17, /* User Datagram Protocol */
- IPPROTO_IDP = 22, /* XNS IDP protocol */
- IPPROTO_IPV6 = 41, /* IPv6 header */
- IPPROTO_ROUTING = 43, /* IPv6 Routing header */
- IPPROTO_FRAGMENT = 44, /* IPv6 fragmentation header */
- IPPROTO_ESP = 50, /* encapsulating security payload */
- IPPROTO_AH = 51, /* authentication header */
- IPPROTO_ICMPV6 = 58, /* ICMPv6 */
- IPPROTO_NONE = 59, /* IPv6 no next header */
- IPPROTO_DSTOPTS = 60, /* IPv6 Destination options */
- IPPROTO_RAW = 255, /* Raw IP packets */
- IPPROTO_MAX
-};
-
-/* Define IPPROTO_xxx values to accomodate SUSv3 */
-#define IPPROTO_IP IPPROTO_IP
-#define IPPROTO_HOPOPTS IPPROTO_HOPOPTS
-#define IPPROTO_ICMP IPPROTO_ICMP
-#define IPPROTO_IGMP IPPROTO_IGMP
-#define IPPROTO_IPIP IPPROTO_IPIP
-#define IPPROTO_TCP IPPROTO_TCP
-#define IPPROTO_EGP IPPROTO_EGP
-#define IPPROTO_PUP IPPROTO_PUP
-#define IPPROTO_UDP IPPROTO_UDP
-#define IPPROTO_IDP IPPROTO_IDP
-#define IPPROTO_RAW IPPROTO_RAW
-#define IPPROTO_IPV6 IPPROTO_IPV6
-#define IPPROTO_ROUTING IPPROTO_ROUTING
-#define IPPROTO_FRAGMENT IPPROTO_FRAGMENT
-#define IPPROTO_ESP IPPROTO_ESP
-#define IPPROTO_AH IPPROTO_AH
-#define IPPROTO_ICMPV6 IPPROTO_ICMPV6
-#define IPPROTO_NONE IPPROTO_NONE
-#define IPPROTO_DSTOPTS IPPROTO_DSTOPTS
-
-/* Standard well-known ports. *//* from winsup/include/netinet/in.h */
-enum
-{
- IPPORT_ECHO = 7, /* Echo service. */
- IPPORT_DISCARD = 9, /* Discard transmissions service. */
- IPPORT_SYSTAT = 11, /* System status service. */
- IPPORT_DAYTIME = 13, /* Time of day service. */
- IPPORT_NETSTAT = 15, /* Network status service. */
- IPPORT_FTP = 21, /* File Transfer Protocol. */
- IPPORT_TELNET = 23, /* Telnet protocol. */
- IPPORT_SMTP = 25, /* Simple Mail Transfer Protocol. */
- IPPORT_TIMESERVER = 37, /* Timeserver service. */
- IPPORT_NAMESERVER = 42, /* Domain Name Service. */
- IPPORT_WHOIS = 43, /* Internet Whois service. */
- IPPORT_MTP = 57,
-
- IPPORT_TFTP = 69, /* Trivial File Transfer Protocol. */
- IPPORT_RJE = 77,
- IPPORT_FINGER = 79, /* Finger service. */
- IPPORT_TTYLINK = 87,
- IPPORT_SUPDUP = 95, /* SUPDUP protocol. */
-
-
- IPPORT_EXECSERVER = 512, /* execd service. */
- IPPORT_LOGINSERVER = 513, /* rlogind service. */
- IPPORT_CMDSERVER = 514,
- IPPORT_EFSSERVER = 520,
-
- /* UDP ports. */
- IPPORT_BIFFUDP = 512,
- IPPORT_WHOSERVER = 513,
- IPPORT_ROUTESERVER = 520,
-
- /* Ports less than this value are reserved for privileged processes. */
- IPPORT_RESERVED = 1024,
-
- /* Ports greater this value are reserved for (non-privileged) servers. */
- IPPORT_USERRESERVED = 5000
-};
-
-/* Internet address. */
-struct in_addr
-{
- in_addr_t s_addr;
-};
-
-/* Request struct for IPv4 multicast socket ops */
-
-struct ip_mreq
-{
- struct in_addr imr_multiaddr; /* IP multicast address of group */
- struct in_addr imr_interface; /* local IP address of interface */
-};
-
-struct ip_mreq_source
-{
- struct in_addr imr_multiaddr;
- struct in_addr imr_sourceaddr;
- struct in_addr imr_interface;
-};
-
-struct ip_msfilter
-{
- struct in_addr imsf_multiaddr;
- struct in_addr imsf_interface;
- uint32_t imsf_fmode;
- uint32_t imsf_numsrc;
- struct in_addr imsf_slist[1];
-};
-
-#define IP_MSFILTER_SIZE(numsrc) (sizeof (struct ip_msfilter) \
- - sizeof (struct in_addr) \
- + (numsrc) * sizeof (struct in_addr))
-
-struct in_pktinfo
-{
- struct in_addr ipi_addr;
- uint32_t ipi_ifindex;
-};
-
-/* Request struct for IP agnostic multicast socket ops */
-
-struct group_req
-{
- uint32_t gr_interface;
- struct sockaddr_storage gr_group;
-};
-
-struct group_source_req
-{
- uint32_t gsr_interface;
- struct sockaddr_storage gsr_group;
- struct sockaddr_storage gsr_source;
-};
-
-struct group_filter
-{
- uint32_t gf_interface;
- struct sockaddr_storage gf_group;
- uint32_t gf_fmode;
- uint32_t gf_numsrc;
- struct sockaddr_storage gf_slist[1];
-};
-
-#define GROUP_FILTER_SIZE(numsrc) (sizeof (struct group_filter) \
- - sizeof (struct sockaddr_storage) \
- + (numsrc) * sizeof (struct sockaddr_storage))
-
-/* Structure describing an Internet (IP) socket address. */
-#define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */
-struct sockaddr_in
-{
- sa_family_t sin_family; /* Address family */
- in_port_t sin_port; /* Port number */
- struct in_addr sin_addr; /* Internet address */
-
- /* Pad to size of `struct sockaddr'. */
- unsigned char __pad[__SOCK_SIZE__ - sizeof(short int)
- - sizeof(unsigned short int) - sizeof(struct in_addr)];
-};
-#define sin_zero __pad /* for BSD UNIX comp. -FvK */
-
-/*
- * Definitions of the bits in an Internet address integer.
- * On subnets, host and network parts are found according
- * to the subnet mask, not these masks.
- */
-#define IN_CLASSA(a) ((((in_addr_t) (a)) & 0x80000000) == 0)
-#define IN_CLASSA_NET 0xff000000
-#define IN_CLASSA_NSHIFT 24
-#define IN_CLASSA_HOST (0xffffffff & ~IN_CLASSA_NET)
-#define IN_CLASSA_MAX 128
-
-#define IN_CLASSB(a) ((((in_addr_t) (a)) & 0xc0000000) == 0x80000000)
-#define IN_CLASSB_NET 0xffff0000
-#define IN_CLASSB_NSHIFT 16
-#define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET)
-#define IN_CLASSB_MAX 65536
-
-#define IN_CLASSC(a) ((((in_addr_t) (a)) & 0xe0000000) == 0xc0000000)
-#define IN_CLASSC_NET 0xffffff00
-#define IN_CLASSC_NSHIFT 8
-#define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET)
-
-#define IN_CLASSD(a) ((((in_addr_t) (a)) & 0xf0000000) == 0xe0000000)
-#define IN_MULTICAST(a) IN_CLASSD(a)
-#define IN_MULTICAST_NET 0xF0000000
-
-#define IN_EXPERIMENTAL(a) ((((in_addr_t) (a)) & 0xe0000000) == 0xe0000000)
-#define IN_BADCLASS(a) ((((in_addr_t) (a)) & 0xf0000000) == 0xf0000000)
-
-/* Address to accept any incoming messages. */
-#define INADDR_ANY ((in_addr_t) 0x00000000)
-
-/* Address to send to all hosts. */
-#define INADDR_BROADCAST ((in_addr_t) 0xffffffff)
-
-/* Address indicating an error return. */
-#define INADDR_NONE 0xffffffff
-
-/* Network number for local host loopback. */
-#define IN_LOOPBACKNET 127
-
-/* Address to loopback in software to local host. */
-#define INADDR_LOOPBACK 0x7f000001 /* 127.0.0.1 */
-#define IN_LOOPBACK(a) ((((in_addr_t) (a)) & 0xff000000) == 0x7f000000)
-
-/* Defines for Multicast INADDR */
-#define INADDR_UNSPEC_GROUP 0xe0000000 /* 224.0.0.0 */
-#define INADDR_ALLHOSTS_GROUP 0xe0000001 /* 224.0.0.1 */
-#define INADDR_ALLRTRS_GROUP 0xe0000002 /* 224.0.0.2 */
-#define INADDR_MAX_LOCAL_GROUP 0xe00000ff /* 224.0.0.255 */
-
-#define INET_ADDRSTRLEN 16
-
-/* <asm/byteorder.h> contains the htonl type stuff.. */
-
-#include <asm/byteorder.h>
-
-/* Some random defines to make it easier in the kernel.. */
-#ifdef __KERNEL__
-
-#define LOOPBACK(x) (((x) & htonl(0xff000000)) == htonl(0x7f000000))
-#define MULTICAST(x) (((x) & htonl(0xf0000000)) == htonl(0xe0000000))
-
-#endif
-
-#ifdef AF_INET6
-#include <cygwin/in6.h>
-#endif
-#endif /* _CYGWIN_IN_H */
diff --git a/winsup/cygwin/include/cygwin/in6.h b/winsup/cygwin/include/cygwin/in6.h
deleted file mode 100644
index bdb812c..0000000
--- a/winsup/cygwin/include/cygwin/in6.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/* cygwin/in6.h
-
- Copyright 2006, 2007 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* NOTE: This file is NOT for direct inclusion. Use netinet/in.h. */
-
-#ifndef _CYGWIN_IN6_H
-#define _CYGWIN_IN6_H
-
-#define INET6_ADDRSTRLEN 46
-
-#define IN6_ARE_ADDR_EQUAL(a, b) \
- (((const uint32_t *)(a))[0] == ((const uint32_t *)(b))[0] \
- && ((const uint32_t *)(a))[1] == ((const uint32_t *)(b))[1] \
- && ((const uint32_t *)(a))[2] == ((const uint32_t *)(b))[2] \
- && ((const uint32_t *)(a))[3] == ((const uint32_t *)(b))[3])
-
-#define IN6_IS_ADDR_UNSPECIFIED(addr) \
- (((const uint32_t *)(addr))[0] == 0 \
- && ((const uint32_t *)(addr))[1] == 0 \
- && ((const uint32_t *)(addr))[2] == 0 \
- && ((const uint32_t *)(addr))[3] == 0)
-
-#define IN6_IS_ADDR_LOOPBACK(addr) \
- (((const uint32_t *)(addr))[0] == 0 \
- && ((const uint32_t *)(addr))[1] == 0 \
- && ((const uint32_t *)(addr))[2] == 0 \
- && ((const uint32_t *)(addr))[3] == htonl (1))
-
-#define IN6_IS_ADDR_MULTICAST(addr) (((const uint8_t *) (addr))[0] == 0xff)
-
-#define IN6_IS_ADDR_LINKLOCAL(addr) \
- ((((const uint16_t *)(addr))[0] & htons (0xffc0)) == htons (0xfe80))
-
-#define IN6_IS_ADDR_SITELOCAL(addr) \
- ((((const uint16_t *)(addr))[0] & htons (0xffc0)) == htons (0xfec0))
-
-#define IN6_IS_ADDR_V4MAPPED(addr) \
- (((const uint32_t *)(addr))[0] == 0 \
- && ((const uint32_t *)(addr))[1] == 0 \
- && ((const uint32_t *)(addr))[2] == htonl (0xffff))
-
-#define IN6_IS_ADDR_V4COMPAT(addr) \
- (((const uint32_t *)(addr))[0] == 0 \
- && ((const uint32_t *)(addr))[1] == 0 \
- && ((const uint32_t *)(addr))[2] == 0 \
- && ntohl (((const uint32_t *)(addr))[3]) > 1)
-
-#define IN6_IS_ADDR_MC_NODELOCAL(addr) \
- (IN6_IS_ADDR_MULTICAST(addr) \
- && (((const uint8_t *)(addr))[1] & 0xf) == 0x1)
-
-#define IN6_IS_ADDR_MC_LINKLOCAL(addr) \
- (IN6_IS_ADDR_MULTICAST (addr) \
- && (((const uint8_t *)(addr))[1] & 0xf) == 0x2)
-
-#define IN6_IS_ADDR_MC_SITELOCAL(addr) \
- (IN6_IS_ADDR_MULTICAST(addr) \
- && (((const uint8_t *)(addr))[1] & 0xf) == 0x5)
-
-#define IN6_IS_ADDR_MC_ORGLOCAL(addr) \
- (IN6_IS_ADDR_MULTICAST(addr) \
- && (((const uint8_t *)(addr))[1] & 0xf) == 0x8)
-
-#define IN6_IS_ADDR_MC_GLOBAL(addr) \
- (IN6_IS_ADDR_MULTICAST(addr) \
- && (((const uint8_t *)(addr))[1] & 0xf) == 0xe)
-
-struct in6_addr
-{
- union
- {
- uint8_t __s6_addr[16];
- uint16_t __s6_addr16[8];
- uint32_t __s6_addr32[4];
- } __u6;
-#define s6_addr __u6.__s6_addr
-#define s6_addr16 __u6.__s6_addr16
-#define s6_addr32 __u6.__s6_addr32
-};
-
-struct ipv6_mreq
-{
- struct in6_addr ipv6mr_multiaddr;
- uint32_t ipv6mr_interface;
-};
-
-struct in6_pktinfo
-{
- struct in6_addr ipi6_addr;
- uint32_t ipi6_ifindex;
-};
-
-#if defined (__INSIDE_CYGWIN__) && !defined (_CYGWIN_IN_H)
-typedef uint16_t in_port_t;
-#endif
-
-struct sockaddr_in6
-{
- sa_family_t sin6_family; /* AF_INET6 */
- in_port_t sin6_port; /* Port number. */
- uint32_t sin6_flowinfo; /* Traffic class and flow inf. */
- struct in6_addr sin6_addr; /* IPv6 address. */
- uint32_t sin6_scope_id; /* Set of interfaces for a scope. */
-};
-
-#define IN6ADDR_ANY_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
-#define IN6ADDR_LOOPBACK_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }
-
-extern const struct in6_addr in6addr_any;
-extern const struct in6_addr in6addr_loopback;
-
-#endif /* _CYGWIN_IN6_H */
diff --git a/winsup/cygwin/include/cygwin/in_systm.h b/winsup/cygwin/include/cygwin/in_systm.h
deleted file mode 100644
index 1a2c1b2..0000000
--- a/winsup/cygwin/include/cygwin/in_systm.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* System specific type definitions for networking code.
- *
- * Version: @(#)in_systm.h 1.0.0 06/07/00
- *
- * Authors: Original taken from the GNU Project <netinet/in_systm.h> file.
- * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-#ifndef _CYGWIN_IN_SYSTM_H
-#define _CYGWIN_IN_SYSTM_H
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-__BEGIN_DECLS
-
-/*
- * Network order versions of various data types. Unfortunately, BSD
- * assumes specific sizes for shorts (16 bit) and longs (32 bit) which
- * don't hold in general. As a consequence, the network order versions
- * may not reflect the actual size of the native data types.
- */
-
-typedef u_int16_t n_short; /* short as received from the net */
-typedef u_int32_t n_long; /* long as received from the net */
-typedef u_int32_t n_time; /* ms since 00:00 GMT, byte rev */
-
-__END_DECLS
-
-#endif /* _CYGWIN_IN_SYSTM_H */
diff --git a/winsup/cygwin/include/cygwin/ipc.h b/winsup/cygwin/include/cygwin/ipc.h
deleted file mode 100644
index 7837788..0000000
--- a/winsup/cygwin/include/cygwin/ipc.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* sys/ipc.h
-
- Copyright 2001, 2002 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 _CYGWIN_IPC_H
-#define _CYGWIN_IPC_H
-
-#include <sys/types.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-struct ipc_perm
-{
- uid_t uid; /* Owner's user ID. */
- gid_t gid; /* Owner's group ID. */
- uid_t cuid; /* Creator's user ID. */
- gid_t cgid; /* Creator's group ID. */
- mode_t mode; /* Read/write permission. */
- key_t key;
- unsigned short seq;
-};
-
-/* Mode bits:
- */
-#define IPC_CREAT 0x0200 /* Create entry if key does not exist. */
-#define IPC_EXCL 0x0400 /* Fail if key exists. */
-#define IPC_NOWAIT 0x0800 /* Error if request must wait. */
-#ifdef _KERNEL
-#define IPC_KEY_IS_SHMID 0x1000 /* Used in shmget when called from shmat. */
-#endif
-
-/* Keys:
- */
-#define IPC_PRIVATE ((key_t) 0) /* Private key. */
-
-/* Control commands:
- */
-#define IPC_RMID 0x1000 /* Remove identifier. */
-#define IPC_SET 0x1001 /* Set options. */
-#define IPC_STAT 0x1002 /* Get options. */
-#ifdef _KERNEL
-#define IPC_INFO 0x1003 /* For ipcs(8). */
-#endif
-
-#ifdef _KERNEL
-#define IPCID_TO_IX(id) ((id) & 0xffff)
-#define IPCID_TO_SEQ(id) (((id) >> 16) & 0xffff)
-#define IXSEQ_TO_IPCID(ix,perm) (((perm.seq) << 16) | (ix & 0xffff))
-
-#define IPC_R 000400 /* read permission */
-#define IPC_W 000200 /* write/alter permission */
-#define IPC_M 010000 /* permission to change control info */
-#endif
-
-key_t ftok (const char *path, int id);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CYGWIN_IPC_H */
diff --git a/winsup/cygwin/include/cygwin/kd.h b/winsup/cygwin/include/cygwin/kd.h
deleted file mode 100644
index b4ec7c5..0000000
--- a/winsup/cygwin/include/cygwin/kd.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* cygwin/kd.h
-
- Copyright 2006 Red Hat Inc.
- Written by Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_KD_H_
-#define _CYGWIN_KD_H_
-
-#define KDGKBMETA 0x4b62
-#define KDSKBMETA 0x4b63
-#define K_METABIT 0x03
-#define K_ESCPREFIX 0x04
-
-#endif /* _CYGWIN_KD_H_ */
diff --git a/winsup/cygwin/include/cygwin/msg.h b/winsup/cygwin/include/cygwin/msg.h
deleted file mode 100644
index 8679786..0000000
--- a/winsup/cygwin/include/cygwin/msg.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* sys/msg.h
-
- Copyright 2002 Red Hat Inc.
- Written by Conrad Scott <conrad.scott@dsl.pipex.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 _CYGWIN_MSG_H
-#define _CYGWIN_MSG_H
-
-#include <cygwin/ipc.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/* Message operation flags:
- */
-#define MSG_NOERROR 0x01 /* No error if big message. */
-
-#ifdef _KERNEL
-/* Command definitions for the semctl () function:
- */
-#define MSG_STAT 0x2000 /* For ipcs(8) */
-#define MSG_INFO 0x2001 /* For ipcs(8) */
-#endif /* _KERNEL */
-
-/* Used for the number of messages in the message queue.
- */
-typedef unsigned long msgqnum_t;
-
-/* Used for the number of bytes allowed in a message queue.
- */
-typedef unsigned long msglen_t;
-
-struct msqid_ds
-{
- struct ipc_perm msg_perm; /* Operation permission structure. */
- msglen_t msg_cbytes; /* Number of bytes currently on queue. */
- msgqnum_t msg_qnum; /* Number of messages currently on queue. */
- msglen_t msg_qbytes; /* Maximum number of bytes allowed on queue. */
- pid_t msg_lspid; /* Process ID of last msgsnd (). */
- pid_t msg_lrpid; /* Process ID of last msgrcv (). */
- timestruc_t msg_stim; /* Time of last msgsnd (). */
- timestruc_t msg_rtim; /* Time of last msgrcv (). */
- timestruc_t msg_ctim; /* Time of last change. */
-#ifdef _KERNEL
- struct msg *msg_first;
- struct msg *msg_last;
-#else
- long msg_spare4[2];
-#endif /* _KERNEL */
-};
-
-#define msg_stime msg_stim.tv_sec
-#define msg_rtime msg_rtim.tv_sec
-#define msg_ctime msg_ctim.tv_sec
-
-#ifdef _KERNEL
-/* Buffer type for msgctl (IPC_INFO, ...) as used by ipcs(8).
- */
-struct msginfo
-{
- long msgmax; /* Maximum number of bytes per
- message. */
- long msgmnb; /* Maximum number of bytes on any one
- message queue. */
- long msgmni; /* Maximum number of message queues,
- system wide. */
- long msgtql; /* Maximum number of messages, system
- wide. */
- long msgssz; /* Size of a message segment, must be
- small power of 2 greater than 4. */
- long msgseg; /* Number of message segments */
- long msg_spare[2];
-};
-
-/* Buffer type for msgctl (MSG_INFO, ...) as used by ipcs(8).
- */
-struct msg_info
-{
- long msg_ids; /* Number of allocated queues. */
- long msg_num; /* Number of messages, system wide. */
- long msg_tot; /* Size in bytes of messages, system wide. */
-};
-#endif /* _KERNEL */
-
-int msgctl (int msqid, int cmd, struct msqid_ds *buf);
-int msgget (key_t key, int msgflg);
-ssize_t msgrcv (int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg);
-int msgsnd (int msqid, const void *msgp, size_t msgsz, int msgflg);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CYGWIN_MSG_H */
diff --git a/winsup/cygwin/include/cygwin/mtio.h b/winsup/cygwin/include/cygwin/mtio.h
deleted file mode 100644
index 04d5df4..0000000
--- a/winsup/cygwin/include/cygwin/mtio.h
+++ /dev/null
@@ -1,313 +0,0 @@
-/* cygwin/mtio.h
-
- Copyright 1999, 2001, 2004 Red Hat, Inc.
-
- Written by Corinna Vinschen <corinna@vinschen.de>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* cygwin/mtio.h header file for Cygwin.
-
- by C. Vinschen. */
-
-#ifndef _CYGWIN_MTIO_H
-#define _CYGWIN_MTIO_H
-
-#include <sys/ioctl.h>
-#include <asm/socket.h>
-
-#ifndef DEFTAPE
-#define DEFTAPE "/dev/tape"
-#endif
-
-/*
- * Structures and definitions for mag tape io control commands
- */
-
-/* structure for MTIOCTOP - mag tape op command */
-struct mtop {
- short mt_op; /* operations defined below */
- int mt_count; /* how many of them */
-};
-
-/* Magnetic Tape operations [Not all operations supported by all drivers]: */
-#define MTRESET 0 /* reset drive in case of problems */
-#define MTFSF 1 /* forward space over FileMark,
- * position at first record of next file
- */
-#define MTBSF 2 /* backward space FileMark (position before FM) */
-#define MTFSR 3 /* forward space record */
-#define MTBSR 4 /* backward space record */
-#define MTWEOF 5 /* write an end-of-file record (mark) */
-#define MTREW 6 /* rewind */
-#define MTOFFL 7 /* rewind and put the drive offline (eject?) */
-#define MTNOP 8 /* no op, set status only (read with MTIOCGET) */
-#define MTRETEN 9 /* retension tape */
-#define MTBSFM 10 /* +backward space FileMark, position at FM */
-#define MTFSFM 11 /* +forward space FileMark, position at FM */
-#define MTEOM 12 /* goto end of recorded media (for appending files).
- * MTEOM positions after the last FM, ready for
- * appending another file.
- */
-#define MTERASE 13 /* erase tape -- be careful! */
-
-#define MTRAS1 14 /* run self test 1 (nondestructive) */
-#define MTRAS2 15 /* run self test 2 (destructive) */
-#define MTRAS3 16 /* reserved for self test 3 */
-
-#define MTSETBLK 20 /* set block length (SCSI) */
-#define MTSETDENSITY 21 /* set tape density (SCSI) */
-#define MTSEEK 22 /* seek to block (Tandberg, etc.) */
-#define MTTELL 23 /* tell block (Tandberg, etc.) */
-#define MTSETDRVBUFFER 24 /* set the drive buffering according to SCSI-2 */
- /* ordinary buffered operation with code 1 */
-#define MTFSS 25 /* space forward over setmarks */
-#define MTBSS 26 /* space backward over setmarks */
-#define MTWSM 27 /* write setmarks */
-
-#define MTLOCK 28 /* lock the drive door */
-#define MTUNLOCK 29 /* unlock the drive door */
-#define MTLOAD 30 /* execute the SCSI load command */
-#define MTUNLOAD 31 /* execute the SCSI unload command */
-#define MTCOMPRESSION 32/* control compression with SCSI mode page 15 */
-#define MTSETPART 33 /* Change the active tape partition */
-#define MTMKPART 34 /* Format the tape with one or two partitions */
-
-/* structure for MTIOCGET - mag tape get status command */
-
-struct mtget {
- long mt_type; /* type of magtape device */
- long mt_resid; /* residual count: (not sure)
- * number of bytes ignored, or
- * number of files not skipped, or
- * number of records not skipped.
- * Cygwin: remaining KB until 1.5.7.
- * active partition since 1.5.8
- * (same as on GNU-Linux).
- */
- /* the following registers are device dependent */
- long mt_dsreg; /* status register, Contains blocksize and
- density code. See MT_ST_xxx macros below */
- long mt_gstat; /* generic (device independent) status */
- long mt_erreg; /* error register */
- /* The next two fields are not always used */
- long mt_fileno; /* number of current file on tape */
- long mt_blkno; /* current block number */
- /* The next are Windows NT specific */
- long long mt_capacity; /* Tape capacity in bytes */
- long long mt_remaining; /* Remaining bytes */
- int mt_minblksize;
- int mt_maxblksize;
- int mt_defblksize;
- unsigned long mt_featureslow;
- unsigned long mt_featureshigh;
- unsigned long mt_eotwarningzonesize;
-};
-
-/* structure for MTIOCPOS - mag tape get position command */
-
-struct mtpos {
- long mt_blkno; /* current block number */
-};
-
-
-/* mag tape io control commands */
-#define MTIOCTOP _IOW('m', 1, struct mtop) /* do a mag tape op */
-#define MTIOCGET _IOR('m', 2, struct mtget) /* get tape status */
-#define MTIOCPOS _IOR('m', 3, struct mtpos) /* get tape position */
-
-/* Generic Mag Tape (device independent) status macros for examining
- * mt_gstat -- HP-UX compatible.
- * There is room for more generic status bits here, but I don't
- * know which of them are reserved. At least three or so should
- * be added to make this really useful.
- */
-#define GMT_EOF(x) ((x) & 0x80000000)
-#define GMT_BOT(x) ((x) & 0x40000000)
-#define GMT_EOT(x) ((x) & 0x20000000)
-#define GMT_SM(x) ((x) & 0x10000000) /* DDS setmark */
-#define GMT_EOD(x) ((x) & 0x08000000) /* DDS EOD */
-#define GMT_WR_PROT(x) ((x) & 0x04000000)
-#define GMT_REP_SM(x) ((x) & 0x02000000) /* Cygwin: rep. setmarks */
-#define GMT_ONLINE(x) ((x) & 0x01000000)
-#define GMT_D_6250(x) ((x) & 0x00800000)
-#define GMT_D_1600(x) ((x) & 0x00400000)
-#define GMT_D_800(x) ((x) & 0x00200000)
-#define GMT_PADDING(x) ((x) & 0x00100000) /* Cygwin: data padding */
-#define GMT_HW_ECC(x) ((x) & 0x00080000) /* Cygwin: HW error corr. */
-#define GMT_DR_OPEN(x) ((x) & 0x00040000) /* door open (no tape) */
-#define GMT_HW_COMP(x) ((x) & 0x00020000) /* Cygwin: HW compression */
-#define GMT_IM_REP_EN(x) ((x) & 0x00010000) /* immediate report mode */
-#define GMT_CLN(x) ((x) & 0x00008000) /* cleaning requested */
-/* 15 generic status bits unused */
-/* Cygwin only: The below settings are also used by the GNU-Linux SCSI tape
- driver but they aren't usually reported here. Unfortunately, there's no
- other official method to retrieve the values of these settings and
- reporting them here apparently doesn't hurt. */
-#define GMT_TWO_FM(x) ((x) & 0x00000080) /* two fm after write */
-#define GMT_FAST_MTEOM(x) ((x) & 0x00000040) /* fast seek to eom */
-#define GMT_AUTO_LOCK(x) ((x) & 0x00000020) /* auto door lock on r/w */
-#define GMT_SYSV(x) ((x) & 0x00000010) /* SYSV read semantics */
-#define GMT_NOWAIT(x) ((x) & 0x00000008) /* don't wait for positioning commands */
-#define GMT_ASYNC(x) ((x) & 0x00000004) /* asynchronous writes */
-
-
-/* SCSI-tape specific definitions */
-/* Bitfield shifts in the status mt_dsreg */
-#define MT_ST_BLKSIZE_SHIFT 0
-#define MT_ST_BLKSIZE_MASK 0xffffff
-#define MT_ST_DENSITY_SHIFT 24
-#define MT_ST_DENSITY_MASK 0xff000000
-
-#define MT_ST_SOFTERR_SHIFT 0
-#define MT_ST_SOFTERR_MASK 0xffff
-
-/* Bitfields for the MTSETDRVBUFFER ioctl. */
-#define MT_ST_OPTIONS 0xf0000000
-#define MT_ST_BOOLEANS 0x10000000
-#define MT_ST_SETBOOLEANS 0x30000000
-#define MT_ST_CLEARBOOLEANS 0x40000000
-#define MT_ST_WRITE_THRESHOLD 0x20000000 /* Not supported */
-#define MT_ST_DEF_OPTIONS 0x60000000 /* Not supported */
-#define MT_ST_EOT_WZ_SIZE 0xf0000000 /* Cygwin only */
-
-#define MT_ST_BUFFER_WRITES 0x00000001
-#define MT_ST_ASYNC_WRITES 0x00000002
-#define MT_ST_READ_AHEAD 0x00000004 /* Not supported */
-#define MT_ST_DEBUGGING 0x00000008 /* Not supported */
-#define MT_ST_TWO_FM 0x00000010
-#define MT_ST_FAST_MTEOM 0x00000020
-#define MT_ST_AUTO_LOCK 0x00000040
-#define MT_ST_DEF_WRITES 0x00000080 /* Not supported */
-#define MT_ST_CAN_BSR 0x00000100 /* Not supported */
-#define MT_ST_NO_BLKLIMS 0x00000200 /* Not supported */
-#define MT_ST_CAN_PARTITIONS 0x00000400 /* Not supported */
-#define MT_ST_SCSI2LOGICAL 0x00000800 /* Not supported */
-#define MT_ST_SYSV 0x00001000
-#define MT_ST_NOWAIT 0x00002000
-#define MT_ST_ECC 0x00010000 /* Cygwin only */
-#define MT_ST_PADDING 0x00020000 /* Cygwin only */
-#define MT_ST_REPORT_SM 0x00040000 /* Cygwin only */
-
-/*
- * Constants for mt_type. Not all of these are supported,
- * and these are not all of the ones that are supported.
- *
- * Only used when not colliding with Windows codes (see below)
- */
-#define MT_ISUNKNOWN 0x01
-#define MT_ISQIC02 0x02 /* Generic QIC-02 tape streamer */
-#define MT_ISWT5150 0x03 /* Wangtek 5150EQ, QIC-150, QIC-02 */
-#define MT_ISARCHIVE_5945L2 0x04 /* Archive 5945L-2, QIC-24, QIC-02? */
-#define MT_ISCMSJ500 0x05 /* CMS Jumbo 500 (QIC-02?) */
-#define MT_ISTDC3610 0x06 /* Tandberg 6310, QIC-24 */
-#define MT_ISARCHIVE_VP60I 0x07 /* Archive VP60i, QIC-02 */
-#define MT_ISARCHIVE_2150L 0x08 /* Archive Viper 2150L */
-#define MT_ISARCHIVE_2060L 0x09 /* Archive Viper 2060L */
-#define MT_ISARCHIVESC499 0x0A /* Archive SC-499 QIC-36 controller */
-#define MT_ISQIC02_ALL_FEATURES 0x0F /* Generic QIC-02 with all features */
-#define MT_ISWT5099EEN24 0x11 /* Wangtek 5099-een24, 60MB, QIC-24 */
-#define MT_ISTEAC_MT2ST 0x12 /* Teac MT-2ST 155mb drive, Teac DC-1 card (Wangtek type) */
-#define MT_ISEVEREX_FT40A 0x32 /* Everex FT40A (QIC-40) */
-#define MT_ISDDS1 0x51 /* DDS device without partitions */
-#define MT_ISDDS2 0x52 /* DDS device with partitions */
-#define MT_ISSCSI1 0x71 /* Generic ANSI SCSI-1 tape unit */
-#define MT_ISSCSI2 0x72 /* Generic ANSI SCSI-2 tape unit */
-
-/* More constants for mt_type. These are the codes used by Windows >= 5.1 */
-#define MT_ISDDS_4mm 0x20
-#define MT_ISMiniQic 0x21
-#define MT_ISTravan 0x22
-#define MT_ISQIC 0x23
-#define MT_ISMP_8mm 0x24
-#define MT_ISAME_8mm 0x25
-#define MT_ISAIT1_8mm 0x26
-#define MT_ISDLT 0x27
-#define MT_ISNCTP 0x28
-#define MT_ISIBM_3480 0x29
-#define MT_ISIBM_3490E 0x2a
-#define MT_ISIBM_Magstar_3590 0x2b
-#define MT_ISIBM_Magstar_MP 0x2c
-#define MT_ISSTK_DATA_D3 0x2d
-#define MT_ISSONY_DTF 0x2e
-#define MT_ISDV_6mm 0x2f
-#define MT_ISDMI 0x30
-#define MT_ISSONY_D2 0x31
-#define MT_ISCLEANER_CARTRIDGE 0x32
-#define MT_ISAVATAR_F2 0x4f
-#define MT_ISMP2_8mm 0x50
-#define MT_ISDST_S 0x51
-#define MT_ISDST_M 0x52
-#define MT_ISDST_L 0x53
-#define MT_ISVXATape_1 0x54
-#define MT_ISVXATape_2 0x55
-#define MT_ISSTK_9840 0x56
-#define MT_ISLTO_Ultrium 0x57
-#define MT_ISLTO_Accelis 0x58
-#define MT_ISAIT_8mm 0x5a
-#define MT_ISADR_1 0x5b
-#define MT_ISADR_2 0x5c
-#define MT_ISSTK_9940 0x5d
-
-struct mt_tape_info {
- long t_type; /* device type id (mt_type) */
- char *t_name; /* descriptive name */
-};
-
-#define MT_TAPE_INFO { \
- {MT_ISUNKNOWN, "Unknown type of tape device"}, \
- {MT_ISQIC02, "Generic QIC-02 tape streamer"}, \
- {MT_ISWT5150, "Wangtek 5150, QIC-150"}, \
- {MT_ISARCHIVE_5945L2, "Archive 5945L-2"}, \
- {MT_ISCMSJ500, "CMS Jumbo 500"}, \
- {MT_ISTDC3610, "Tandberg TDC 3610, QIC-24"}, \
- {MT_ISARCHIVE_VP60I, "Archive VP60i, QIC-02"}, \
- {MT_ISARCHIVE_2150L, "Archive Viper 2150L"}, \
- {MT_ISARCHIVE_2060L, "Archive Viper 2060L"}, \
- {MT_ISARCHIVESC499, "Archive SC-499 QIC-36 controller"}, \
- {MT_ISQIC02_ALL_FEATURES, "Generic QIC-02 tape, all features"}, \
- {MT_ISWT5099EEN24, "Wangtek 5099-een24, 60MB"}, \
- {MT_ISTEAC_MT2ST, "Teac MT-2ST 155mb data cassette drive"}, \
- {MT_ISDDS_4mm, "DDS"}, \
- {MT_ISMiniQic, "MiniQic"}, \
- {MT_ISTravan, "Travan tape"}, \
- {MT_ISQIC, "QIC tape"}, \
- {MT_ISMP_8mm, "8mm Exabyte metal particle tape"}, \
- {MT_ISAME_8mm, "8mm Exabyte advanced metal evap tape"}, \
- {MT_ISAIT1_8mm, "8mm Sony AIT1 tape"}, \
- {MT_ISDLT, "DLT compact tape)"}, \
- {MT_ISNCTP, "Philips NCTP tape"}, \
- {MT_ISIBM_3480, "IBM 3480 tape"}, \
- {MT_ISIBM_3490E, "IBM 3490E tape"}, \
- {MT_ISIBM_Magstar_3590, "IBM Magstar 3590 tape"}, \
- {MT_ISIBM_Magstar_MP, "IBM Magstar MP tape"}, \
- {MT_ISSTK_DATA_D3, "STK data D3 tape"}, \
- {MT_ISSONY_DTF, "Sony DTF tape"}, \
- {MT_ISDV_6mm, "6mm digital video tape"}, \
- {MT_ISDMI, "Exabyte DMI tape"}, \
- {MT_ISSONY_D2, "Sony D2S or D2L tape"}, \
- {MT_ISCLEANER_CARTRIDGE, "Cleaner (all drive types that support cleaners)"}, \
- {MT_ISAVATAR_F2, "Avatar 2"}, \
- {MT_ISMP2_8mm, "8mm Hitachi tape"}, \
- {MT_ISDST_S, "Ampex DST small tape"}, \
- {MT_ISDST_M, "Ampex DST medium tape"}, \
- {MT_ISDST_L, "Ampex DST large tape"}, \
- {MT_ISVXATape_1, "Ecrix 8mm tape"}, \
- {MT_ISVXATape_2, "Ecrix 8mm tape"}, \
- {MT_ISSTK_9840, "STK 9840"}, \
- {MT_ISLTO_Ultrium, "LTO Ultrium (IBM, HP, Seagate)"}, \
- {MT_ISLTO_Accelis, "LTO Accelis (IBM, HP, Seagate)"}, \
- {MT_ISAIT_8mm, "AIT tape (AIT2 or higher)"}, \
- {MT_ISADR_1, "OnStream ADR1"}, \
- {MT_ISADR_2, "OnStream ADR2"}, \
- {MT_ISSTK_9940, "STK 9940"}, \
- {MT_ISSCSI1, "Generic SCSI-1 tape"}, \
- {MT_ISSCSI2, "Generic SCSI-2 tape"}, \
- {0, NULL} \
-}
-
-#endif /* _CYGWIN_MTIO_H */
diff --git a/winsup/cygwin/include/cygwin/rdevio.h b/winsup/cygwin/include/cygwin/rdevio.h
deleted file mode 100644
index 73059ac..0000000
--- a/winsup/cygwin/include/cygwin/rdevio.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* cygwin/rdevio.h
-
- Copyright 1999, 2001 Red Hat, Inc.
-
- Written by Corinna Vinschen <corinna@vinschen.de>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/*
- * cygwin/rdevio.h header file for Cygwin.
- *
- * Written by C. Vinschen.
- */
-
-#ifndef _CYGWIN_RDEVIO_H
-#define _CYGWIN_RDEVIO_H
-
-/* structure for RDIOCDOP - raw device operation */
-struct rdop {
- short rd_op;
- unsigned long rd_parm;
-};
-
-/* Raw device operations */
-#define RDSETBLK 1 /* set buffer for driver */
-
-/* structure for RDIOCGET - get raw device */
-struct rdget {
- unsigned long bufsiz;
-};
-
-/*
- * ioctl commands
-*/
-#define RDIOCDOP _IOW('r', 128, struct rdop)
-#define RDIOCGET _IOR('r', 129, struct rdget)
-
-#endif /* _CYGWIN_RDEVIO_H */
diff --git a/winsup/cygwin/include/cygwin/sem.h b/winsup/cygwin/include/cygwin/sem.h
deleted file mode 100644
index af7a42f..0000000
--- a/winsup/cygwin/include/cygwin/sem.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/* sys/sem.h
-
- Copyright 2002 Red Hat Inc.
- Written by Conrad Scott <conrad.scott@dsl.pipex.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 _CYGWIN_SEM_H
-#define _CYGWIN_SEM_H
-
-#include <cygwin/ipc.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/* Semaphore operation flags:
- */
-#define SEM_UNDO 010000 /* Set up adjust on exit entry. */
-
-/* Command definitions for the semctl () function:
- */
-#define GETNCNT 0x3000 /* Get semncnt. */
-#define GETPID 0x3001 /* Get sempid. */
-#define GETVAL 0x3002 /* Get semval. */
-#define GETALL 0x3003 /* Get all cases of semval. */
-#define GETZCNT 0x3004 /* Get semzcnt. */
-#define SETVAL 0x3005 /* Set semval. */
-#define SETALL 0x3006 /* Set all cases of semval. */
-
-#ifdef _KERNEL
-#define SEM_STAT 0x3010 /* For ipcs(8). */
-#define SEM_INFO 0x3011 /* For ipcs(8). */
-#endif /* _KERNEL */
-
-struct semid_ds
-{
- struct ipc_perm sem_perm; /* Operation permission structure. */
- unsigned short sem_nsems; /* Number of semaphores in set. */
- timestruc_t sem_otim; /* Last semop () time. */
- timestruc_t sem_ctim; /* Last time changed by semctl (). */
-#ifdef _KERNEL
- struct sem *sem_base; /* pointer to first semaphore in set */
- long sem_spare4[1];
-#else
- long sem_spare4[2];
-#endif /* _KERNEL */
-};
-
-#define sem_otime sem_otim.tv_sec
-#define sem_ctime sem_ctim.tv_sec
-
-struct sembuf
-{
- unsigned short sem_num; /* Semaphore number. */
- short sem_op; /* Semaphore operation. */
- short sem_flg; /* Operation flags. */
-};
-
-#ifdef _KERNEL
-/* Buffer type for semctl (IPC_INFO, ...) as used by ipcs(8).
- */
-struct seminfo
-{
- long semmni; /* Maximum number of unique semaphore
- sets, system wide. */
- long semmns; /* Maximum number of semaphores,
- system wide. */
- long semmsl; /* Maximum number of semaphores per
- semaphore set. */
- long semopm; /* Maximum number of operations per
- semop call. */
- long semmnu; /* Maximum number of undo structures,
- system wide. */
- long semume; /* Maximum number of undo entries per
- undo structure. */
- long semvmx; /* Maximum semaphore value. */
- long semaem; /* Maximum adjust-on-exit value. */
- long semmap; /* # of entries in semaphore map */
- long semusz; /* size in bytes of undo structure */
- long sem_spare[2];
-};
-
-/* Buffer type for semctl (SEM_INFO, ...) as used by ipcs(8).
- */
-struct sem_info
-{
- long sem_ids; /* Number of allocated semaphore sets. */
- long sem_num; /* Number of allocated semaphores. */
-};
-
-/* Permission flags */
-#define SEM_A IPC_W /* alter permission */
-#define SEM_R IPC_R /* read permission */
-
-/* Internally used mode bits. */
-#define SEM_ALLOC 01000 /* semaphore is allocated */
-
-#endif /* _KERNEL */
-
-#ifdef _KERNEL
-/* According to SUSv3, "the fourth argument [to semctl()] is optional and
- depends upon the operation requested. If required, it is of type
- union semun, which the application shall explicitly declare:" */
-union semun {
- int val; /* value for SETVAL */
- struct semid_ds *buf; /* buffer for IPC_STAT, IPC_SET */
- unsigned short *array; /* array for GETALL, SETALL */
-};
-/* Therefore this union is only declared here if building internal code.
- _KERNEL must not be defined in exernal applications! Declare union
- semun explicitely as required by SUSv3, please. */
-#endif /* _KERNEL */
-
-int semctl (int semid, int semnum, int cmd, ...);
-int semget (key_t key, int nsems, int semflg);
-int semop (int semid, struct sembuf *sops, size_t nsops);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CYGWIN_SEM_H */
diff --git a/winsup/cygwin/include/cygwin/shm.h b/winsup/cygwin/include/cygwin/shm.h
deleted file mode 100644
index 2c88201..0000000
--- a/winsup/cygwin/include/cygwin/shm.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/* sys/shm.h
-
- Copyright 2001, 2002 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 _CYGWIN_SHM_H
-#define _CYGWIN_SHM_H
-
-#include <cygwin/ipc.h>
-#include <sys/cygwin.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/* Segment low boundary address multiple.
- *
- * 64 Kb was hardcoded for x86. MS states this may change so the constant
- * expression is replaced by a function call returning the correct value. */
-#define SHMLBA (cygwin_internal (CW_GET_SHMLBA))
-
-/* Shared memory operation flags:
- */
-#define SHM_RDONLY 0x01 /* Attach read-only (else read-write). */
-#define SHM_RND 0x02 /* Round attach address to SHMLBA. */
-
-#ifdef _KERNEL
-/* Command definitions for the semctl () function:
- */
-#define SHM_STAT 0x4000 /* For ipcs(8) */
-#define SHM_INFO 0x4001 /* For ipcs(8) */
-#endif /* _KERNEL */
-
-/* Unsigned integer used for the number of current attaches.
- */
-typedef unsigned int shmatt_t;
-
-struct shmid_ds
-{
- struct ipc_perm shm_perm; /* Operation permission structure. */
- size_t shm_segsz; /* Size of segment in bytes. */
- pid_t shm_lpid; /* Process ID of last operation. */
- pid_t shm_cpid; /* Process ID of creator. */
- shmatt_t shm_nattch;/* Number of current attaches. */
- timestruc_t shm_atim; /* Time of last shmat (). */
- timestruc_t shm_dtim; /* Time of last shmdt (). */
- timestruc_t shm_ctim; /* Time of last change by shmctl (). */
-#ifdef _KERNEL
- struct shm_handle *shm_internal;
- long shm_spare4[1];
-#else
- long shm_spare4[2];
-#endif /* _KERNEL */
-};
-
-#define shm_atime shm_atim.tv_sec
-#define shm_dtime shm_dtim.tv_sec
-#define shm_ctime shm_ctim.tv_sec
-
-#ifdef _KERNEL
-/* Buffer type for shmctl (IPC_INFO, ...) as used by ipcs(8).
- */
-struct shminfo
-{
- long shmmax; /* Maximum size in bytes of a shared
- memory segment. */
- long shmmin; /* Minimum size in bytes of a shared
- memory segment. */
- long shmmni; /* Maximum number of shared memory
- segments, system wide. */
- long shmseg; /* Maximum number of shared memory
- segments attached per process. */
- long shmall; /* Maximum number of bytes of shared
- memory, system wide. */
- long shm_spare[4];
-};
-
-/* Buffer type for shmctl (SHM_INFO, ...) as used by ipcs(8).
- */
-struct shm_info
-{
-#define shm_ids used_ids
- long used_ids; /* Number of allocated segments. */
- long shm_tot; /* Size in bytes of allocated segments. */
- long shm_atts; /* Number of attached segments, system
- wide. */
-};
-#endif /* _KERNEL */
-
-void *shmat (int shmid, const void *shmaddr, int shmflg);
-int shmctl (int shmid, int cmd, struct shmid_ds *buf);
-int shmdt (const void *shmaddr);
-int shmget (key_t key, size_t size, int shmflg);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CYGWIN_SHM_H */
diff --git a/winsup/cygwin/include/cygwin/signal.h b/winsup/cygwin/include/cygwin/signal.h
deleted file mode 100644
index a3cc90b..0000000
--- a/winsup/cygwin/include/cygwin/signal.h
+++ /dev/null
@@ -1,281 +0,0 @@
-/* signal.h
-
- Copyright 2004, 2005, 2006 Red Hat, Inc.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#ifndef _CYGWIN_SIGNAL_H
-#define _CYGWIN_SIGNAL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-struct _fpstate
-{
- unsigned long cw;
- unsigned long sw;
- unsigned long tag;
- unsigned long ipoff;
- unsigned long cssel;
- unsigned long dataoff;
- unsigned long datasel;
- unsigned char _st[80];
- unsigned long nxst;
-};
-
-struct ucontext
-{
- unsigned long cr2;
- unsigned long dr0;
- unsigned long dr1;
- unsigned long dr2;
- unsigned long dr3;
- unsigned long dr6;
- unsigned long dr7;
- struct _fpstate fpstate;
- unsigned long gs;
- unsigned long fs;
- unsigned long es;
- unsigned long ds;
- unsigned long edi;
- unsigned long esi;
- unsigned long ebx;
- unsigned long edx;
- unsigned long ecx;
- unsigned long eax;
- unsigned long ebp;
- unsigned long eip;
- unsigned long cs;
- unsigned long eflags;
- unsigned long esp;
- unsigned long ss;
- unsigned char _internal;
- unsigned long oldmask;
-};
-
-#define __COPY_CONTEXT_SIZE ((unsigned) &((struct ucontext *) 0)->_internal)
-
-typedef union sigval
-{
- int sival_int; /* integer signal value */
- void *sival_ptr; /* pointer signal value */
-} sigval_t;
-
-typedef struct sigevent
-{
- sigval_t sigev_value; /* signal value */
- int sigev_signo; /* signal number */
- int sigev_notify; /* notification type */
- void (*sigev_notify_function) (sigval_t); /* notification function */
- pthread_attr_t *sigev_notify_attributes; /* notification attributes */
-} sigevent_t;
-
-#pragma pack(push,4)
-struct _sigcommune
-{
- __uint32_t _si_code;
- void *_si_read_handle;
- void *_si_write_handle;
- void *_si_process_handle;
- __extension__ union
- {
- int _si_fd;
- void *_si_pipe_fhandler;
- char *_si_str;
- };
-};
-
-typedef struct
-{
- int si_signo; /* signal number */
- int si_code; /* signal code */
- pid_t si_pid; /* sender's pid */
- uid_t si_uid; /* sender's uid */
- int si_errno; /* errno associated with signal */
-
- __extension__ union
- {
- __uint32_t __pad[32]; /* plan for future growth */
- struct _sigcommune _si_commune; /* cygwin ipc */
- __extension__ union
- {
- /* timers */
- struct
- {
- union
- {
- struct
- {
- timer_t si_tid; /* timer id */
- unsigned int si_overrun; /* overrun count */
- };
- sigval_t si_sigval; /* signal value */
- sigval_t si_value; /* signal value */
- };
- };
- };
-
- /* SIGCHLD */
- __extension__ struct
- {
- int si_status; /* exit code */
- clock_t si_utime; /* user time */
- clock_t si_stime; /* system time */
- };
-
- /* core dumping signals */
- void *si_addr; /* faulting address */
- };
-} siginfo_t;
-#pragma pack(pop)
-
-enum
-{
- SI_USER = 0, /* sent by kill, raise, pthread_kill */
- SI_ASYNCIO = 2, /* sent by AIO completion (currently
- unimplemented) */
- SI_MESGQ, /* sent by real time mesq state change
- (currently unimplemented) */
- SI_TIMER, /* sent by timer expiration */
- SI_QUEUE, /* sent by sigqueue (currently
- unimplemented) */
- SI_KERNEL, /* sent by system */
-
- ILL_ILLOPC, /* illegal opcode */
- ILL_ILLOPN, /* illegal operand */
- ILL_ILLADR, /* illegal addressing mode */
- ILL_ILLTRP, /* illegal trap*/
- ILL_PRVOPC, /* privileged opcode */
- ILL_PRVREG, /* privileged register */
- ILL_COPROC, /* coprocessor error */
- ILL_BADSTK, /* internal stack error */
-
- FPE_INTDIV, /* integer divide by zero */
- FPE_INTOVF, /* integer overflow */
- FPE_FLTDIV, /* floating point divide by zero */
- FPE_FLTOVF, /* floating point overflow */
- FPE_FLTUND, /* floating point underflow */
- FPE_FLTRES, /* floating point inexact result */
- FPE_FLTINV, /* floating point invalid operation */
- FPE_FLTSUB, /* subscript out of range */
-
- SEGV_MAPERR, /* address not mapped to object */
- SEGV_ACCERR, /* invalid permissions for mapped object */
-
- BUS_ADRALN, /* invalid address alignment. */
- BUS_ADRERR, /* non-existant physical address. */
- BUS_OBJERR, /* object specific hardware error. */
-
- CLD_EXITED, /* child has exited */
- CLD_KILLED, /* child was killed */
- CLD_DUMPED, /* child terminated abnormally */
- CLD_TRAPPED, /* traced child has trapped */
- CLD_STOPPED, /* child has stopped */
- CLD_CONTINUED /* stopped child has continued */
-};
-
-enum
-{
- SIGEV_SIGNAL = 0, /* a queued signal, with an application
- defined value, is generated when the
- event of interest occurs */
- SIGEV_NONE, /* no asynchronous notification is
- delivered when the event of interest
- occurs */
- SIGEV_THREAD /* a notification function is called to
- perform notification */
-};
-
-typedef void (*_sig_func_ptr)(int);
-
-struct sigaction
-{
- __extension__ union
- {
- _sig_func_ptr sa_handler; /* SIG_DFL, SIG_IGN, or pointer to a function */
- void (*sa_sigaction) ( int, siginfo_t *, void * );
- };
- sigset_t sa_mask;
- int sa_flags;
-};
-
-#define SA_NOCLDSTOP 1 /* Do not generate SIGCHLD when children
- stop */
-#define SA_SIGINFO 2 /* Invoke the signal catching function
- with three arguments instead of one
- */
-#define SA_RESTART 0x10000000 /* Restart syscall on signal return */
-#define SA_NODEFER 0x40000000 /* Don't automatically block the signal
- when its handler is being executed */
-#define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler */
-#define SA_ONESHOT SA_RESETHAND /* Historical linux name */
-#define SA_NOMASK SA_NODEFER /* Historical linux name */
-
-/* Used internally by cygwin. Included here to group everything in one place.
- Do not use. */
-#define _SA_INTERNAL_MASK 0xf000 /* bits in this range are internal */
-
-#define SIGHUP 1 /* hangup */
-#define SIGINT 2 /* interrupt */
-#define SIGQUIT 3 /* quit */
-#define SIGILL 4 /* illegal instruction (not reset when caught) */
-#define SIGTRAP 5 /* trace trap (not reset when caught) */
-#define SIGABRT 6 /* used by abort */
-#define SIGEMT 7 /* EMT instruction */
-#define SIGFPE 8 /* floating point exception */
-#define SIGKILL 9 /* kill (cannot be caught or ignored) */
-#define SIGBUS 10 /* bus error */
-#define SIGSEGV 11 /* segmentation violation */
-#define SIGSYS 12 /* bad argument to system call */
-#define SIGPIPE 13 /* write on a pipe with no one to read it */
-#define SIGALRM 14 /* alarm clock */
-#define SIGTERM 15 /* software termination signal from kill */
-#define SIGURG 16 /* urgent condition on IO channel */
-#define SIGSTOP 17 /* sendable stop signal not from tty */
-#define SIGTSTP 18 /* stop signal from tty */
-#define SIGCONT 19 /* continue a stopped process */
-#define SIGCHLD 20 /* to parent on child stop or exit */
-#define SIGCLD 20 /* System V name for SIGCHLD */
-#define SIGTTIN 21 /* to readers pgrp upon background tty read */
-#define SIGTTOU 22 /* like TTIN for output if (tp->t_local&LTOSTOP) */
-#define SIGIO 23 /* input/output possible signal */
-#define SIGPOLL SIGIO /* System V name for SIGIO */
-#define SIGXCPU 24 /* exceeded CPU time limit */
-#define SIGXFSZ 25 /* exceeded file size limit */
-#define SIGVTALRM 26 /* virtual time alarm */
-#define SIGPROF 27 /* profiling time alarm */
-#define SIGWINCH 28 /* window changed */
-#define SIGLOST 29 /* resource lost (eg, record-lock lost) */
-#define SIGUSR1 30 /* user defined signal 1 */
-#define SIGUSR2 31 /* user defined signal 2 */
-
-/* Real-Time signals per SUSv3. RT_SIGMAX is defined as 8 in limits.h */
-#define SIGRTMIN 32
-#define SIGRTMAX ((SIGRTMIN) + 0)
-#define NSIG 33 /* signal 0 implied */
-
-#define SIG_HOLD ((_sig_func_ptr)2) /* Signal in signal mask */
-
-int sigwait (const sigset_t *, int *);
-int sigwaitinfo (const sigset_t *, siginfo_t *);
-int sighold (int);
-int sigignore (int);
-int sigrelse (int);
-_sig_func_ptr sigset (int, _sig_func_ptr);
-
-int sigqueue(pid_t, int, const union sigval);
-int siginterrupt (int, int);
-#ifdef __INSIDE_CYGWIN__
-extern const char *sys_sigabbrev[];
-#else
-extern const char __declspec(dllimport) *sys_sigabbrev[];
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif /*_CYGWIN_SIGNAL_H*/
diff --git a/winsup/cygwin/include/cygwin/socket.h b/winsup/cygwin/include/cygwin/socket.h
deleted file mode 100644
index 3111e9d..0000000
--- a/winsup/cygwin/include/cygwin/socket.h
+++ /dev/null
@@ -1,295 +0,0 @@
-/* cygwin/socket.h
-
- Copyright 1999, 2000, 2001, 2005, 2006, 2007 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_SOCKET_H
-#define _CYGWIN_SOCKET_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include <stdint.h>
-
-/* Not unsigned for backward compatibility. Keep #define for backward
- compatibility. */
-#ifndef socklen_t
-typedef int socklen_t;
-#define socklen_t socklen_t
-#endif
-
-typedef uint16_t sa_family_t;
-
-struct sockaddr {
- sa_family_t sa_family; /* address family, AF_xxx */
- char sa_data[14]; /* 14 bytes of protocol address */
-};
-
-/* Definition of sockaddr_storage according to SUSv3. */
-#define _SS_MAXSIZE 128 /* Maximum size. */
-#define _SS_ALIGNSIZE (sizeof (int64_t))/* Desired alignment. */
-#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof (sa_family_t))
-#define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof (sa_family_t) \
- + _SS_PAD1SIZE + _SS_ALIGNSIZE))
-
-struct sockaddr_storage {
- sa_family_t ss_family;
- char _ss_pad1[_SS_PAD1SIZE];
- int64_t __ss_align;
- char _ss_pad2[_SS_PAD2SIZE];
-};
-
-#include <asm/socket.h> /* arch-dependent defines */
-#include <cygwin/sockios.h> /* the SIOCxxx I/O controls */
-#include <sys/uio.h> /* iovec support */
-#include <sys/types.h>
-
-struct ucred {
- pid_t pid;
- __uid32_t uid;
- __gid32_t gid;
-};
-
-struct linger {
- unsigned short l_onoff; /* Linger active */
- unsigned short l_linger; /* How long to linger for */
-};
-
-struct msghdr
-{
- void * msg_name; /* Socket name */
- socklen_t msg_namelen; /* Length of name */
- struct iovec * msg_iov; /* Data blocks */
- int msg_iovlen; /* Number of blocks */
- void * msg_control; /* Ancillary data */
- socklen_t msg_controllen; /* Ancillary data buffer length */
- int msg_flags; /* Received flags on recvmsg */
-};
-
-struct cmsghdr
-{
- socklen_t cmsg_len; /* Length of cmsghdr + data */
- int cmsg_level; /* Protocol */
- int cmsg_type; /* Protocol type */
-};
-
-#define CMSG_ALIGN(len) \
- (((len) + sizeof (size_t) - 1) & ~(sizeof (size_t) - 1))
-#define CMSG_LEN(len) \
- (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
-#define CMSG_SPACE(len) \
- (CMSG_ALIGN (sizeof (struct cmsghdr)) + CMSG_ALIGN(len))
-#define CMSG_FIRSTHDR(mhdr) \
- ({ \
- struct msghdr *_m = (struct msghdr *) mhdr; \
- (unsigned) (_m)->msg_controllen >= sizeof (struct cmsghdr) \
- ? (struct cmsghdr *) (_m)->msg_control \
- : (struct cmsghdr *) NULL; \
- })
-#define CMSG_NXTHDR(mhdr,cmsg) \
- ({ \
- struct msghdr *_m = (struct msghdr *) mhdr; \
- struct cmsghdr *_c = (struct cmsghdr *) cmsg; \
- ((char *) _c + CMSG_SPACE (_c->cmsg_len) \
- > (char *) _m->msg_control + _m->msg_controllen) \
- ? (struct cmsghdr *) NULL \
- : (struct cmsghdr *) ((char *) _c + CMSG_ALIGN (_c->cmsg_len)); \
- })
-#define CMSG_DATA(cmsg) \
- ((unsigned char *) ((struct cmsghdr *)(cmsg) + 1))
-
-/* "Socket"-level control message types: */
-#define SCM_RIGHTS 0x01 /* access rights (array of int) */
-
-#ifdef __INSIDE_CYGWIN__
-/* Definition of struct msghdr up to release 1.5.18 */
-struct OLD_msghdr
-{
- void * msg_name; /* Socket name */
- int msg_namelen; /* Length of name */
- struct iovec * msg_iov; /* Data blocks */
- int msg_iovlen; /* Number of blocks */
- void * msg_accrights; /* Per protocol magic */
- /* (eg BSD descriptor passing) */
- int msg_accrightslen; /* Length of rights list */
-};
-#endif
-
-/* Socket types. */
-#define SOCK_STREAM 1 /* stream (connection) socket */
-#define SOCK_DGRAM 2 /* datagram (conn.less) socket */
-#define SOCK_RAW 3 /* raw socket */
-#define SOCK_RDM 4 /* reliably-delivered message */
-#define SOCK_SEQPACKET 5 /* sequential packet socket */
-
-/* Supported address families. */
-/*
- * Address families.
- */
-#define AF_UNSPEC 0 /* unspecified */
-#define AF_UNIX 1 /* local to host (pipes, portals) */
-#define AF_LOCAL 1 /* POSIX name for AF_UNIX */
-#define AF_INET 2 /* internetwork: UDP, TCP, etc. */
-#define AF_IMPLINK 3 /* arpanet imp addresses */
-#define AF_PUP 4 /* pup protocols: e.g. BSP */
-#define AF_CHAOS 5 /* mit CHAOS protocols */
-#define AF_NS 6 /* XEROX NS protocols */
-#define AF_ISO 7 /* ISO protocols */
-#define AF_OSI AF_ISO /* OSI is ISO */
-#define AF_ECMA 8 /* european computer manufacturers */
-#define AF_DATAKIT 9 /* datakit protocols */
-#define AF_CCITT 10 /* CCITT protocols, X.25 etc */
-#define AF_SNA 11 /* IBM SNA */
-#define AF_DECnet 12 /* DECnet */
-#define AF_DLI 13 /* Direct data link interface */
-#define AF_LAT 14 /* LAT */
-#define AF_HYLINK 15 /* NSC Hyperchannel */
-#define AF_APPLETALK 16 /* AppleTalk */
-#define AF_NETBIOS 17 /* NetBios-style addresses */
-#define AF_INET6 23 /* IP version 6 */
-
-#define AF_MAX 32
-/*
- * Protocol families, same as address families for now.
- */
-#define PF_UNSPEC AF_UNSPEC
-#define PF_UNIX AF_UNIX
-#define PF_LOCAL AF_LOCAL
-#define PF_INET AF_INET
-#define PF_IMPLINK AF_IMPLINK
-#define PF_PUP AF_PUP
-#define PF_CHAOS AF_CHAOS
-#define PF_NS AF_NS
-#define PF_ISO AF_ISO
-#define PF_OSI AF_OSI
-#define PF_ECMA AF_ECMA
-#define PF_DATAKIT AF_DATAKIT
-#define PF_CCITT AF_CCITT
-#define PF_SNA AF_SNA
-#define PF_DECnet AF_DECnet
-#define PF_DLI AF_DLI
-#define PF_LAT AF_LAT
-#define PF_HYLINK AF_HYLINK
-#define PF_APPLETALK AF_APPLETALK
-#define PF_NETBIOS AF_NETBIOS
-#define PF_INET6 AF_INET6
-
-#define PF_MAX AF_MAX
-
-/* Maximum queue length specificable by listen. */
-#define SOMAXCONN 0x7fffffff
-
-/* Flags we can use with send/ and recv. */
-#define MSG_OOB 0x1 /* process out-of-band data */
-#define MSG_PEEK 0x2 /* peek at incoming message */
-#define MSG_DONTROUTE 0x4 /* send without using routing tables */
-#define MSG_WAITALL 0x8 /* wait for all requested bytes */
-#define MSG_NOSIGNAL 0x20 /* Don't raise SIGPIPE */
-#define MSG_TRUNC 0x0100 /* Normal data truncated */
-#define MSG_CTRUNC 0x0200 /* Control data truncated */
-
-/* Setsockoptions(2) level. Thanks to BSD these must match IPPROTO_xxx */
-#define SOL_IP 0
-#define SOL_IPX 256
-#define SOL_AX25 257
-#define SOL_ATALK 258
-#define SOL_NETROM 259
-#define SOL_TCP 6
-#define SOL_UDP 17
-
-/* IP options */
-#ifndef IPTOS_LOWDELAY
-#define IPTOS_LOWDELAY 0x10
-#define IPTOS_THROUGHPUT 0x08
-#define IPTOS_RELIABILITY 0x04
-#endif
-
-/* These need to appear somewhere around here */
-#define IP_DEFAULT_MULTICAST_TTL 1
-#define IP_DEFAULT_MULTICAST_LOOP 1
-#define IP_MAX_MEMBERSHIPS 20
-
-/* IP options for use with getsockopt/setsockopt */
-#define IP_OPTIONS 1
-#define IP_HDRINCL 2
-#define IP_TOS 3
-#define IP_TTL 4
-#define IP_MULTICAST_IF 9
-#define IP_MULTICAST_TTL 10
-#define IP_MULTICAST_LOOP 11
-#define IP_ADD_MEMBERSHIP 12
-#define IP_DROP_MEMBERSHIP 13
-#define IP_DONTFRAGMENT 14
-#define IP_ADD_SOURCE_MEMBERSHIP 15
-#define IP_DROP_SOURCE_MEMBERSHIP 16
-#define IP_BLOCK_SOURCE 17
-#define IP_UNBLOCK_SOURCE 18
-#define IP_PKTINFO 19
-
-/* IPv6 options for use with getsockopt/setsockopt */
-#define IPV6_HOPOPTS 1
-#define IPV6_UNICAST_HOPS 4
-#define IPV6_MULTICAST_IF 9
-#define IPV6_MULTICAST_HOPS 10
-#define IPV6_MULTICAST_LOOP 11
-#define IPV6_ADD_MEMBERSHIP 12
-#define IPV6_DROP_MEMBERSHIP 13
-#define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP
-#define IPV6_LEAVE_GROUP IPV6_DROP_MEMBERSHIP
-#define IPV6_DONTFRAG 14
-#define IPV6_PKTINFO 19
-#define IPV6_HOPLIMIT 21
-#define IPV6_CHECKSUM 26
-#define IPV6_V6ONLY 27
-#define IPV6_RTHDR 32
-#define IPV6_RECVRTHDR 38
-
-/* IP agnostic options for use with getsockopt/setsockopt */
-#define MCAST_JOIN_GROUP 41
-#define MCAST_LEAVE_GROUP 42
-#define MCAST_BLOCK_SOURCE 43
-#define MCAST_UNBLOCK_SOURCE 44
-#define MCAST_JOIN_SOURCE_GROUP 45
-#define MCAST_LEAVE_SOURCE_GROUP 46
-
-#define MCAST_EXCLUDE 0
-#define MCAST_INCLUDE 1
-
-/* Old WinSock1 values, needed internally */
-#ifdef __INSIDE_CYGWIN__
-#define _WS1_IP_OPTIONS 1
-#define _WS1_IP_MULTICAST_IF 2
-#define _WS1_IP_MULTICAST_TTL 3
-#define _WS1_IP_MULTICAST_LOOP 4
-#define _WS1_IP_ADD_MEMBERSHIP 5
-#define _WS1_IP_DROP_MEMBERSHIP 6
-#define _WS1_IP_TTL 7
-#define _WS1_IP_TOS 8
-#define _WS1_IP_DONTFRAGMENT 9
-#endif
-
-/* IPX options */
-#define IPX_TYPE 1
-
-/* TCP options - this way around because someone left a set in the c library includes */
-#ifndef TCP_NODELAY
-#define TCP_NODELAY 0x0001
-#define TCP_MAXSEG 2
-#endif
-
-/* The various priorities. */
-#define SOPRI_INTERACTIVE 0
-#define SOPRI_NORMAL 1
-#define SOPRI_BACKGROUND 2
-
-#ifdef __cplusplus
-};
-#endif /* __cplusplus */
-
-#endif /* _CYGWIN_SOCKET_H */
diff --git a/winsup/cygwin/include/cygwin/sockios.h b/winsup/cygwin/include/cygwin/sockios.h
deleted file mode 100644
index 2e75695..0000000
--- a/winsup/cygwin/include/cygwin/sockios.h
+++ /dev/null
@@ -1 +0,0 @@
-/* sockios.h */
diff --git a/winsup/cygwin/include/cygwin/stat.h b/winsup/cygwin/include/cygwin/stat.h
deleted file mode 100644
index 49b81fc..0000000
--- a/winsup/cygwin/include/cygwin/stat.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* cygwin/stat.h
-
- Copyright 2002, 2007 Red Hat Inc.
- Written by Corinna Vinschen <corinna@vinschen.de>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_STAT_H
-#define _CYGWIN_STAT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if defined (__INSIDE_CYGWIN__) || defined (_COMPILING_NEWLIB)
-struct __stat32
-{
- __dev16_t st_dev;
- __ino32_t st_ino;
- mode_t st_mode;
- nlink_t st_nlink;
- __uid16_t st_uid;
- __gid16_t st_gid;
- __dev16_t st_rdev;
- _off_t st_size;
- timestruc_t st_atim;
- timestruc_t st_mtim;
- timestruc_t st_ctim;
- blksize_t st_blksize;
- __blkcnt32_t st_blocks;
- long st_spare4[2];
-};
-
-struct __stat64
-{
- __dev32_t st_dev;
- __ino64_t st_ino;
- mode_t st_mode;
- nlink_t st_nlink;
- __uid32_t st_uid;
- __gid32_t st_gid;
- __dev32_t st_rdev;
- _off64_t st_size;
- timestruc_t st_atim;
- timestruc_t st_mtim;
- timestruc_t st_ctim;
- blksize_t st_blksize;
- __blkcnt64_t st_blocks;
- timestruc_t st_birthtim;
-};
-
-extern int fstat64 (int fd, struct __stat64 *buf);
-extern int stat64 (const char *file_name, struct __stat64 *buf);
-extern int lstat64 (const char *file_name, struct __stat64 *buf);
-
-#endif
-
-struct stat
-{
- dev_t st_dev;
- ino_t st_ino;
- mode_t st_mode;
- nlink_t st_nlink;
- uid_t st_uid;
- gid_t st_gid;
- dev_t st_rdev;
- off_t st_size;
- timestruc_t st_atim;
- timestruc_t st_mtim;
- timestruc_t st_ctim;
- blksize_t st_blksize;
- blkcnt_t st_blocks;
-#ifdef __CYGWIN_USE_BIG_TYPES__
- timestruc_t st_birthtim;
-#else
- long st_spare4[2];
-#endif
-};
-
-#define st_atime st_atim.tv_sec
-#define st_mtime st_mtim.tv_sec
-#define st_ctime st_ctim.tv_sec
-#ifdef __CYGWIN_USE_BIG_TYPES__
-#define st_birthtime st_birthtim.tv_sec
-#endif
-
-/* POSIX IPC objects are not implemented as distinct file types, so the
- below macros have to return 0. The expression is supposed to catch
- illegal usage with non-stat parameters. */
-#define S_TYPEISMQ(buf) ((void)(buf)->st_mode,0)
-#define S_TYPEISSEM(buf) ((void)(buf)->st_mode,0)
-#define S_TYPEISSHM(buf) ((void)(buf)->st_mode,0)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CYGWIN_STAT_H */
diff --git a/winsup/cygwin/include/cygwin/stdlib.h b/winsup/cygwin/include/cygwin/stdlib.h
deleted file mode 100644
index d16e4bb..0000000
--- a/winsup/cygwin/include/cygwin/stdlib.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* stdlib.h
-
- Copyright 2005, 2006, 2007 Red Hat Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_STDLIB_H
-#define _CYGWIN_STDLIB_H
-
-#include <cygwin/wait.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-const char *getprogname (void);
-void setprogname (const char *);
-
-#ifndef __STRICT_ANSI__
-char *realpath (const char *, char *);
-int unsetenv (const char *);
-char *initstate (unsigned seed, char *state, size_t size);
-long random (void);
-char *setstate (const char *state);
-void srandom (unsigned);
-char *ptsname (int);
-int grantpt (int);
-int unlockpt (int);
-#endif /*__STRICT_ANSI__*/
-
-int posix_openpt (int);
-int posix_memalign (void **, size_t, size_t);
-
-#ifdef _COMPILING_NEWLIB
-#define unsetenv UNUSED_unsetenv
-#define _unsetenv_r UNUSED__unsetenv_r
-#endif
-
-extern _PTR memalign _PARAMS ((size_t, size_t));
-extern _PTR valloc _PARAMS ((size_t));
-
-#undef _malloc_r
-#define _malloc_r(r, s) malloc (s)
-#undef _free_r
-#define _free_r(r, p) free (p)
-#undef _realloc_r
-#define _realloc_r(r, p, s) realloc (p, s)
-#undef _calloc_r
-#define _calloc_r(r, s1, s2) calloc (s1, s2);
-#undef _memalign_r
-#define _memalign_r(r, s1, s2) memalign (s1, s2);
-#undef _mallinfo_r
-#define _mallinfo_r(r) mallinfo ()
-#undef _malloc_stats_r
-#define _malloc_stats_r(r) malloc_stats ()
-#undef _mallopt_r
-#define _mallopt_r(i1, i2) mallopt (i1, i2)
-#undef _malloc_usable_size_r
-#define _malloc_usable_size_r(r, p) malloc_usable_size (p)
-#undef _valloc_r
-#define _valloc_r(r, s) valloc (s)
-#undef _pvalloc_r
-#define _pvalloc_r(r, s) pvalloc (s)
-#undef _malloc_trim_r
-#define _malloc_trim_r(r, s) malloc_trim (s)
-#undef _mstats_r
-#define _mstats_r(r, p) mstats (p)
-
-#ifdef __cplusplus
-}
-#endif
-#endif /*_CYGWIN_STDLIB_H*/
diff --git a/winsup/cygwin/include/cygwin/sys_time.h b/winsup/cygwin/include/cygwin/sys_time.h
deleted file mode 100644
index 1cbd8ae..0000000
--- a/winsup/cygwin/include/cygwin/sys_time.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* sys_time.h
-
- Copyright 2005 Red Hat Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_SYS_TIME_H
-#define _CYGWIN_SYS_TIME_H
-#include <sys/select.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-int futimes (int, const struct timeval *);
-int lutimes (const char *, const struct timeval *);
-
-
-#ifdef __cplusplus
-}
-#endif
-#endif /*_CYGWIN_SYS_TIME_H*/
diff --git a/winsup/cygwin/include/cygwin/sysproto.h b/winsup/cygwin/include/cygwin/sysproto.h
deleted file mode 100644
index cea8a02..0000000
--- a/winsup/cygwin/include/cygwin/sysproto.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* cygwin/sysproto.h
-
- Copyright 2003 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* cygwin/sysproto.h header file for Cygwin. */
-
-#ifndef _CYGWIN_SYSPROTO_H
-#define _CYGWIN_SYSPROTO_H
-#define _SYS_SYSPROTO_H_ /* Keep it, used by BSD files */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/types.h>
-
-struct msgctl_args {
- int msqid;
- int cmd;
- struct msqid_ds *buf;
-};
-
-struct msgget_args {
- key_t key;
- int msgflg;
-};
-
-struct msgrcv_args {
- int msqid;
- void *msgp;
- size_t msgsz;
- long msgtyp;
- int msgflg;
-};
-
-struct msgsnd_args {
- int msqid;
- const void *msgp;
- size_t msgsz;
- int msgflg;
-};
-
-struct semctl_args {
- int semid;
- int semnum;
- int cmd;
- union semun *arg;
-};
-
-struct semget_args {
- key_t key;
- int nsems;
- int semflg;
-};
-
-struct semop_args {
- int semid;
- struct sembuf *sops;
- size_t nsops;
-};
-
-struct shmat_args {
- int shmid;
- const void *shmaddr;
- int shmflg;
-};
-
-struct shmctl_args {
- int shmid;
- int cmd;
- struct shmid_ds *buf;
-};
-
-struct shmdt_args {
- const void *shmaddr;
-};
-
-struct shmget_args {
- key_t key;
- size_t size;
- int shmflg;
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CYGWIN_SYSPROTO_H */
diff --git a/winsup/cygwin/include/cygwin/time.h b/winsup/cygwin/include/cygwin/time.h
deleted file mode 100644
index d1b7670..0000000
--- a/winsup/cygwin/include/cygwin/time.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* time.h
-
- Copyright 2005, 2007 Red Hat Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_TIME_H
-#define _CYGWIN_TIME_H
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/* Not defined in main time.h */
-int __cdecl clock_setres (clockid_t, struct timespec *);
-
-/* GNU extensions. */
-time_t __cdecl timelocal (struct tm *);
-time_t __cdecl timegm (struct tm *);
-
-#define TIMER_RELTIME 0 /* For compatibility with HP/UX, Solaris, others? */
-
-#ifndef __STRICT_ANSI__
-
-extern int daylight __asm__ ("__daylight");
-
-#ifndef __timezonefunc__
-extern long timezone __asm__ ("__timezone");
-#endif
-
-#endif /*__STRICT_ANSI__*/
-
-#ifdef __cplusplus
-}
-#endif
-#endif /*_CYGWIN_TIME_H*/
diff --git a/winsup/cygwin/include/cygwin/types.h b/winsup/cygwin/include/cygwin/types.h
deleted file mode 100644
index f924211..0000000
--- a/winsup/cygwin/include/cygwin/types.h
+++ /dev/null
@@ -1,252 +0,0 @@
-/* types.h
-
- Copyright 2001, 2002, 2003, 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 __cplusplus
-extern "C"
-{
-#endif
-
-#ifndef _CYGWIN_TYPES_H
-#define _CYGWIN_TYPES_H
-
-#include <sys/sysmacros.h>
-#include <stdint.h>
-#include <endian.h>
-
-#ifndef __timespec_t_defined
-#define __timespec_t_defined
-typedef struct timespec timespec_t;
-#endif /*__timespec_t_defined*/
-
-#ifndef __timestruc_t_defined
-#define __timestruc_t_defined
-typedef struct timespec timestruc_t;
-#endif /*__timestruc_t_defined*/
-
-#ifndef __off_t_defined
-#define __off_t_defined
-#ifdef __CYGWIN_USE_BIG_TYPES__
-typedef _off64_t off_t;
-#else
-typedef _off_t off_t;
-#endif
-#endif /*__off_t_defined*/
-
-typedef __loff_t loff_t;
-
-#ifndef __dev_t_defined
-#define __dev_t_defined
-typedef short __dev16_t;
-typedef unsigned long __dev32_t;
-#ifdef __CYGWIN_USE_BIG_TYPES__
-typedef __dev32_t dev_t;
-#else
-typedef __dev16_t dev_t;
-#endif
-#endif /*__dev_t_defined*/
-
-#ifndef __blksize_t_defined
-#define __blksize_t_defined
-typedef long blksize_t;
-#endif /*__blksize_t_defined*/
-
-#ifndef __blkcnt_t_defined
-#define __blkcnt_t_defined
-typedef long __blkcnt32_t;
-typedef long long __blkcnt64_t;
-#ifdef __CYGWIN_USE_BIG_TYPES__
-typedef __blkcnt64_t blkcnt_t;
-#else
-typedef __blkcnt32_t blkcnt_t;
-#endif
-#endif /*__blkcnt_t_defined*/
-
-#ifndef __fsblkcnt_t_defined
-#define __fsblkcnt_t_defined
-typedef unsigned long fsblkcnt_t;
-#endif /* __fsblkcnt_t_defined */
-
-#ifndef __fsfilcnt_t_defined
-#define __fsfilcnt_t_defined
-typedef unsigned long fsfilcnt_t;
-#endif /* __fsfilcnt_t_defined */
-
-#ifndef __uid_t_defined
-#define __uid_t_defined
-typedef unsigned short __uid16_t;
-typedef unsigned long __uid32_t;
-#ifdef __CYGWIN_USE_BIG_TYPES__
-typedef __uid32_t uid_t;
-#else
-typedef __uid16_t uid_t;
-#endif
-#endif /*__uid_t_defined*/
-
-#ifndef __gid_t_defined
-#define __gid_t_defined
-typedef unsigned short __gid16_t;
-typedef unsigned long __gid32_t;
-#ifdef __CYGWIN_USE_BIG_TYPES__
-typedef __gid32_t gid_t;
-#else
-typedef __gid16_t gid_t;
-#endif
-#endif /*__gid_t_defined*/
-
-#ifndef __ino_t_defined
-#define __ino_t_defined
-typedef unsigned long __ino32_t;
-typedef unsigned long long __ino64_t;
-#ifdef __CYGWIN_USE_BIG_TYPES__
-typedef __ino64_t ino_t;
-#else
-typedef __ino32_t ino_t;
-#endif
-#endif /*__ino_t_defined*/
-
-/* Generic ID type, must match at least pid_t, uid_t and gid_t in size. */
-#ifndef __id_t_defined
-#define __id_t_defined
-typedef unsigned long id_t;
-#endif /* __id_t_defined */
-
-#if defined (__INSIDE_CYGWIN__)
-struct __flock32 {
- short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */
- short l_whence; /* flag to choose starting offset */
- _off_t l_start; /* relative offset, in bytes */
- _off_t l_len; /* length, in bytes; 0 means lock to EOF */
- short l_pid; /* returned with F_GETLK */
- short l_xxx; /* reserved for future use */
-};
-
-struct __flock64 {
- short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */
- short l_whence; /* flag to choose starting offset */
- _off64_t l_start; /* relative offset, in bytes */
- _off64_t l_len; /* length, in bytes; 0 means lock to EOF */
- pid_t l_pid; /* returned with F_GETLK */
-};
-#endif
-
-struct flock {
- short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */
- short l_whence; /* flag to choose starting offset */
- off_t l_start; /* relative offset, in bytes */
- off_t l_len; /* length, in bytes; 0 means lock to EOF */
-#ifdef __CYGWIN_USE_BIG_TYPES__
- pid_t l_pid; /* returned with F_GETLK */
-#else
- short l_pid; /* returned with F_GETLK */
- short l_xxx; /* reserved for future use */
-#endif
-};
-
-#ifndef __key_t_defined
-#define __key_t_defined
-typedef long long key_t;
-#endif /* __key_t_defined */
-
-#ifndef __BIT_TYPES_DEFINED
-#define __BIT_TYPES_DEFINED__ 1
-
-#ifndef __vm_offset_t_defined
-#define __vm_offset_t_defined
-typedef unsigned long vm_offset_t;
-#endif /*__vm_offset_t_defined*/
-
-#ifndef __vm_size_t_defined
-#define __vm_size_t_defined
-typedef unsigned long vm_size_t;
-#endif /*__vm_size_t_defined*/
-
-#ifndef __vm_object_t_defined
-#define __vm_object_t_defined
-typedef void *vm_object_t;
-#endif /* __vm_object_t_defined */
-
-#ifndef __u_int8_t_defined
-#define __u_int8_t_defined
-typedef unsigned char u_int8_t;
-#endif
-#ifndef __u_int16_t_defined
-#define __u_int16_t_defined
-typedef __uint16_t u_int16_t;
-#endif
-#ifndef __u_int32_t_defined
-#define __u_int32_t_defined
-typedef __uint32_t u_int32_t;
-#endif
-#ifndef __u_int64_t_defined
-#define __u_int64_t_defined
-typedef __uint64_t u_int64_t;
-#endif
-
-#ifndef __register_t_defined
-#define __register_t_defined
-typedef __int32_t register_t;
-#endif
-
-#ifndef __addr_t_defined
-#define __addr_t_defined
-typedef char *addr_t;
-#endif
-
-#ifndef __mode_t_defined
-#define __mode_t_defined
-typedef unsigned mode_t;
-#endif
-#endif /*__BIT_TYPES_DEFINED*/
-
-#if !defined(__INSIDE_CYGWIN__) || !defined(__cplusplus)
-
-typedef struct __pthread_t {char __dummy;} *pthread_t;
-typedef struct __pthread_mutex_t {char __dummy;} *pthread_mutex_t;
-
-typedef struct __pthread_key_t {char __dummy;} *pthread_key_t;
-typedef struct __pthread_attr_t {char __dummy;} *pthread_attr_t;
-typedef struct __pthread_mutexattr_t {char __dummy;} *pthread_mutexattr_t;
-typedef struct __pthread_condattr_t {char __dummy;} *pthread_condattr_t;
-typedef struct __pthread_cond_t {char __dummy;} *pthread_cond_t;
-
- /* These variables are not user alterable. This means you!. */
-typedef struct
-{
- pthread_mutex_t mutex;
- int state;
-}
-pthread_once_t;
-typedef struct __pthread_rwlock_t {char __dummy;} *pthread_rwlock_t;
-typedef struct __pthread_rwlockattr_t {char __dummy;} *pthread_rwlockattr_t;
-
-#else
-
-/* pthreads types */
-
-typedef class pthread *pthread_t;
-typedef class pthread_mutex *pthread_mutex_t;
-typedef class pthread_key *pthread_key_t;
-typedef class pthread_attr *pthread_attr_t;
-typedef class pthread_mutexattr *pthread_mutexattr_t;
-typedef class pthread_condattr *pthread_condattr_t;
-typedef class pthread_cond *pthread_cond_t;
-typedef class pthread_once pthread_once_t;
-typedef class pthread_rwlock *pthread_rwlock_t;
-typedef class pthread_rwlockattr *pthread_rwlockattr_t;
-
-/* semaphores types */
-typedef class semaphore *sem_t;
-#endif /* __INSIDE_CYGWIN__ */
-#endif /* _CYGWIN_TYPES_H */
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/winsup/cygwin/include/cygwin/utmp.h b/winsup/cygwin/include/cygwin/utmp.h
deleted file mode 100644
index 56a137f..0000000
--- a/winsup/cygwin/include/cygwin/utmp.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* cygwin/utmp.h
-
- Copyright 2004 Red Hat, Inc.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#ifndef CYGWIN_UTMP_H
-#define CYGWIN_UTMP_H
-
-#include <sys/types.h>
-#include <time.h>
-#include <paths.h>
-
-#define WTMP_FILE _PATH_WTMP
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define UT_LINESIZE 16
-#define UT_NAMESIZE 16
-#define UT_HOSTSIZE 256
-#define UT_IDLEN 2
-
-#define RUN_LVL 1
-#define BOOT_TIME 2
-#define NEW_TIME 3
-#define OLD_TIME 4
-
-#define INIT_PROCESS 5
-#define LOGIN_PROCESS 6
-#define USER_PROCESS 7
-#define DEAD_PROCESS 8
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* CYGWIN_UTMP_H */
diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h
deleted file mode 100644
index 7e0119c..0000000
--- a/winsup/cygwin/include/cygwin/version.h
+++ /dev/null
@@ -1,415 +0,0 @@
-/* version.h -- Cygwin version numbers and accompanying documentation.
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* Cygwin versioning is relatively complicated because of its status
- as a shared library. Let's start with how versioning used to be done.
-
- Historical versioning in Cygwin 16.0 to 19.5:
-
- In the olden days of Cygwin, we had a dll major and minor version
- and a registry version. The major number started at 16 because the
- "b15" GNU-Win32 release of the compiler tools was out when this
- scheme was started. We incremented the DLL name frequently (for
- every official release) and towards the end of this period every
- release used a different shared memory area to prevent DLLs from
- interfering with each other (embedding a build timestamp into the
- name of the shared memory area). This turned out to be a Bad Idea
- (tm) because people needed to mingle separate releases and have
- them work together more than we thought they would. This was
- especially problematic when tty info needed to be retained when an
- old Cygwin executable executed a newer one.
-
- In the old scheme, we incremented the major number whenever a
- change to the dll invalidated existing executables. This can
- happen for a number of reasons, including when functions are
- removed from the export list of the dll. The minor number was
- incremented when a change was made that we wanted to record, but
- that didn't invalidate existing executables. Both numbers were
- recorded in the executable and in the dll.
-
- In October 1998 (starting with Cygwin 19.6), we started a new method
- of Cygwin versioning: */
-
- /* The DLL major and minor numbers correspond to the "version of
- the Cygwin shared library". This version is used to track important
- changes to the DLL and is mainly informative in nature. */
-
-#define CYGWIN_VERSION_DLL_MAJOR 1007
-#define CYGWIN_VERSION_DLL_MINOR 0
-
- /* Major numbers before CYGWIN_VERSION_DLL_EPOCH are
- incompatible. */
-
-#define CYGWIN_VERSION_DLL_EPOCH 19
-
- /* CYGWIN_VERSION_DLL_COMBINED gives us a single number
- representing the combined DLL major and minor numbers. */
-
- /* WATCH OUT FOR OCTAL! Don't use, say, "00020" for 0.20 */
-
-#define CYGWIN_VERSION_DLL_MAKE_COMBINED(maj, min) (((maj) * 1000) + min)
-#define CYGWIN_VERSION_DLL_COMBINED \
- CYGWIN_VERSION_DLL_MAKE_COMBINED (CYGWIN_VERSION_DLL_MAJOR, CYGWIN_VERSION_DLL_MINOR)
-
- /* Every version of cygwin <= this uses an old, incorrect method
- to determine signal masks. */
-
-#define CYGWIN_VERSION_USER_API_VERSION_COMBINED \
- CYGWIN_VERSION_DLL_MAKE_COMBINED (user_data->api_major, user_data->api_minor)
-
- /* API versions <= this had a termios structure whose members were
- too small to accomodate modern settings. */
-#define CYGWIN_VERSION_DLL_OLD_TERMIOS 5
-#define CYGWIN_VERSION_DLL_IS_OLD_TERMIOS \
- (CYGWIN_VERSION_USER_API_VERSION_COMBINED <= CYGWIN_VERSION_DLL_OLD_TERMIOS)
-
-#define CYGWIN_VERSION_DLL_MALLOC_ENV 28
- /* Old APIs had getc/putc macros that conflict with new CR/LF
- handling in the stdio buffers */
-#define CYGWIN_VERSION_OLD_STDIO_CRLF_HANDLING \
- (CYGWIN_VERSION_USER_API_VERSION_COMBINED <= 20)
-
-#define CYGWIN_VERSION_CHECK_FOR_S_IEXEC \
- (CYGWIN_VERSION_USER_API_VERSION_COMBINED >= 36)
-
-#define CYGWIN_VERSION_CHECK_FOR_OLD_O_NONBLOCK \
- (CYGWIN_VERSION_USER_API_VERSION_COMBINED <= 28)
-
-#define CYGWIN_VERSION_CHECK_FOR_USING_BIG_TYPES \
- (CYGWIN_VERSION_USER_API_VERSION_COMBINED >= 79)
-
-#define CYGWIN_VERSION_CHECK_FOR_USING_ANCIENT_MSGHDR \
- (CYGWIN_VERSION_USER_API_VERSION_COMBINED <= 138)
-
-#define CYGWIN_VERSION_CHECK_FOR_USING_WINSOCK1_VALUES \
- (CYGWIN_VERSION_USER_API_VERSION_COMBINED <= 138)
-
-#define CYGWIN_VERSION_CHECK_FOR_OLD_IFREQ \
- (CYGWIN_VERSION_USER_API_VERSION_COMBINED <= 161)
-
- /* API_MAJOR 0.0: Initial version. API_MINOR changes:
- 1: Export cygwin32_ calls as cygwin_ as well.
- 2: Export j1, jn, y1, yn.
- 3: Export dll_noncygwin_dllcrt0.
- 4: New socket ioctls, revamped ifconf support.
- 5: Thread support/exports.
- 6: Change in termios handling.
- 7: Export scandir and alphasort.
- 8: Export _ctype_, _sys_errlist, _sys_nerr.
- 9: Mount-related changes, new cygwin_umount export.
- Raw device support (tape, floppies).
- 10: Fast math routine support added.
- 11: Export seekdir, telldir.
- 12: Export pthread_join, pthread_detach.
- 13: Export math funcs gamma and friends, also _j0, _j1, etc.
- 14: Export snprintf and vnsprintf.
- 15: Export glob
- 16: Export cygwin_stackdump
- 17: Export fast math stuff
- 18: Stop exporting _strace_wm
- 19: Export fchown, lchown, lacl
- 20: regsub, inet_network
- 21: incompatible change to stdio cr/lf and buffering
- 22: Export cygwin_logon_user, cygwin_set_impersonation_token.
- geteuid, getegid return effective uid/gid.
- getuid, getgid return real uid/gid.
- seteuid, setegid set only effective uid/gid.
- setuid, setgid set effective and real uid/gid.
- 23: Export new dll_crt0 interface and cygwin_user_data for use
- with crt0 startup code.
- 24: Export poll and _poll.
- 25: Export getmode and _getmode.
- 26: CW_GET_CYGDRIVE_PREFIXES addition to external.cc
- 27: CW_GETPINFO_FULL addition to external.cc
- 28: Accidentally bumped by cgf
- 29: Export hstrerror
- 30: CW_GET_CYGDRIVE_INFO addition to external.cc
- 31: Export inet_aton
- 32: Export getrlimit/setrlimit
- 33: Export setlogmask
- 34: Separated out mount table
- 35: Export drand48, erand48, jrand48, lcong48, lrand48,
- mrand48, nrand48, seed48, and srand48.
- 36: Added _cygwin_S_IEXEC, et al
- 37: [f]pathconv support _PC_POSIX_PERMISSIONS and _PC_POSIX_SECURITY
- 38: vscanf, vscanf_r, and random pthread functions
- 39: asctime_r, ctime_r, gmtime_r, localtime_r
- 40: fchdir
- 41: __signgam
- 42: sys_errlist, sys_nerr
- 43: sigsetjmp, siglongjmp fixed
- 44: Export dirfd
- 45: perprocess change, gamma_r, gammaf_r, lgamma_r, lgammaf_r
- 46: Remove cygwin_getshared
- 47: Report EOTWarningZoneSize in struct mtget.
- 48: Export "posix" regex functions
- 49: Export setutent, endutent, utmpname, getutent, getutid, getutline.
- 50: Export fnmatch.
- 51: Export recvmsg, sendmsg.
- 52: Export strptime
- 53: Export strlcat, strlcpy.
- 54: Export __fpclassifyd, __fpclassifyf, __signbitd, __signbitf.
- 55: Export fcloseall, fcloseall_r.
- 56: Make ntsec on by default.
- 57: Export setgroups.
- 58: Export memalign, valloc, malloc_trim, malloc_usable_size, mallopt,
- malloc_stats
- 59: getsid
- 60: MSG_NOSIGNAL
- 61: Export getc_unlocked, getchar_unlocked, putc_unlocked,
- putchar_unlocked
- 62: Erroneously bumped
- 63: Export pututline
- 64: Export fseeko, ftello
- 65: Export siginterrupt
- 66: Export nl_langinfo
- 67: Export pthread_getsequence_np
- 68: Export netdb stuff
- 69: Export strtof
- 70: Export asprintf, _asprintf_r, vasprintf, _vasprintf_r
- 71: Export strerror_r
- 72: Export nanosleep
- 73: Export setreuid32, setreuid, setregid32, setregid
- 74: Export _strtold a64l hcreate hcreate_r hdestroy hdestroy_r hsearch
- hsearch_r isblank iswalnum iswalpha iswblank iswcntrl iswctype
- iswdigit iswgraph iswlower iswprint iswpunct iswspace iswupper
- iswxdigit l64a mbrlen mbrtowc mbsinit mbsrtowcs mempcpy
- on_exit setbuffer setlinebuf strndup strnlen tdelete tdestroy
- tfind towctrans towlower towupper tsearch twalk wcrtomb wcscat
- wcschr wcscpy wcscspn wcslcat wcslcpy wcsncat wcsncmp wcsncpy
- wcspbrk wcsrchr wcsrtombs wcsspn wcsstr wctob wctob wctrans
- wctype wmemchr wmemcmp wmemcpy wmemmove wmemset
- 75: Export exp2 exp2f fdim fdimf fma fmaf fmax fmaxf fmin fminf lrint
- lrintf lround lroundf nearbyint nearbyintf remquo remquof
- round roundf scalbln scalblnf sincos sincosf tgamma tgammaf
- truncf
- 76: mallinfo
- 77: thread-safe exit/at_exit
- 78: Use stat and fstat rather than _stat, and _fstat.
- Export btowc and trunc.
- 79: Export acl32 aclcheck32 aclfrommode32 aclfrompbits32 aclfromtext32
- aclsort32 acltomode32 acltopbits32 acltotext32 facl32
- fgetpos64 fopen64 freopen64 fseeko64 fsetpos64 ftello64
- _open64 _lseek64 _fstat64 _stat64 mknod32
- 80: Export pthread_rwlock stuff
- 81: CW_CHECK_NTSEC addition to external.cc
- 82: Export wcscoll wcswidth wcwidth
- 83: Export gethostid
- 84: Pty open allocates invisible console. 64 bit interface
- 85: Export new 32/64 functions from API 0.79 only with leading
- underscore. No problems with backward compatibility since no
- official release has been made so far. This change removes
- exported symbols like fopen64, which might confuse configure.
- 86: Export ftok
- 87: Export vsyslog
- 88: Export _getreent
- 89: Export __mempcpy
- 90: Export _fopen64
- 91: Export argz_add argz_add_sep argz_append argz_count argz_create
- argz_create_sep argz_delete argz_extract argz_insert
- argz_next argz_replace argz_stringify envz_add envz_entry
- envz_get envz_merge envz_remove envz_strip
- 92: Export getusershell, setusershell, endusershell
- 93: Export daemon, forkpty, openpty, iruserok, ruserok, login_tty,
- openpty, forkpty, revoke, logwtmp, updwtmp
- 94: Export getopt, getopt_long, optarg, opterr, optind, optopt,
- optreset, __check_rhosts_file, __rcmd_errstr.
- 95: Export shmat, shmctl, shmdt, shmget.
- 96: CW_GET_ERRNO_FROM_WINERROR addition to external.cc
- 97: Export sem_open, sem_close, sem_timedwait, sem_getvalue.
- 98: Export _tmpfile64.
- 99: CW_GET_POSIX_SECURITY_ATTRIBUTE addition to external.cc.
- 100: CW_GET_SHMLBA addition to external.cc.
- 101: Export err, errx, verr, verrx, warn, warnx, vwarn, vwarnx.
- 102: CW_GET_UID_FROM_SID and CW_GET_GID_FROM_SID addition to external.cc.
- 103: Export getprogname, setprogname.
- 104: Export msgctl, msgget, msgrcv, msgsnd, semctl, semget, semop.
- 105: Export sigwait.
- 106: Export flock.
- 107: Export fcntl64.
- 108: Remove unused (hopefully) reent_data export.
- 109: Oh well. Someone uses reent_data.
- 110: Export clock_gettime, sigwaitinfo, timer_create, timer_delete,
- timer_settime
- 111: Export sigqueue, sighold.
- 112: Redefine some mtget fields.
- 113: Again redefine some mtget fields. Use mt_fileno and mt_blkno as
- on Linux.
- 114: Export rand_r, ttyname_r.
- 115: Export flockfile, ftrylockfile, funlockfile, getgrgid_r, getgrnam_r,
- getlogin_r.
- 116: Export atoll.
- 117: Export utmpx functions, Return utmp * from pututent.
- 118: Export getpriority, setpriority.
- 119: Export fdatasync.
- 120: Export basename, dirname.
- 122: Export statvfs, fstatvfs.
- 123: Export utmpxname.
- 124: Add MAP_AUTOGROW flag to mmap.
- 125: LD_PRELOAD/CW_HOOK available.
- 126: Export lsearch, lfind, timer_gettime.
- 127: Export sigrelese.
- 128: Export pselect.
- 129: Export mkdtemp.
- 130: Export strtoimax, strtoumax, llabs, imaxabs, lldiv, imaxdiv.
- 131: Export inet_ntop, inet_pton.
- 132: Add GLOB_LIMIT flag to glob.
- 133: Export __getline, __getdelim.
- 134: Export getline, getdelim.
- 135: Export pread, pwrite
- 136: Add TIOCMBIS/TIOCMBIC ioctl codes.
- 137: fts_children, fts_close, fts_get_clientptr, fts_get_stream,
- fts_open, fts_read, fts_set, fts_set_clientptr, ftw, nftw.
- 138: Export readdir_r.
- 139: Start using POSIX definition of struct msghdr and WinSock2
- IPPROTO_IP values.
- 140: Export mlock, munlock.
- 141: Export futimes, lutimes.
- 142: Export memmem
- 143: Export clock_getres, clock_setres
- 144: Export timelocal, timegm.
- 145: Add MAP_NORESERVE flag to mmap.
- 146: Change SI_USER definition. FIXME: Need to develop compatibility
- macro for this?
- 147: Eliminate problematic d_ino from dirent structure. unsetenv now
- returns int, as per linux.
- 148: Add open(2) flags O_SYNC, O_RSYNC, O_DSYNC and O_DIRECT.
- 149: Add open(2) flag O_NOFOLLOW.
- 150: Export getsubopt.
- 151: Export __opendir_with_d_ino
- 152: Revert to having d_ino in dirent unconditionally.
- 153: Export updwtmpx, Implement CW_SETUP_WINENV.
- 154: Export sigset, sigignore.
- 155: Export __isinff, __isinfd, __isnanf, __isnand.
- 156: Export __srbuf_r, __swget_r.
- 157: Export gai_strerror, getaddrinfo, getnameinfo, freeaddrinfo,
- in6addr_any, in6addr_loopback.
- 158: Export bindresvport, bindresvport_sa, iruserok_sa, rcmd_af,
- rresvport_af.
- 159: Export posix_openpt.
- 160: Export posix_fadvise, posix_fallocate.
- 161: Export resolver functions.
- 162: New struct ifreq. Export if_nametoindex, if_indextoname,
- if_nameindex, if_freenameindex.
- 163: Export posix_madvise, posix_memalign.
- 164: Export shm_open, shm_unlink.
- 165: Export mq_close, mq_getattr, mq_notify, mq_open, mq_receive,
- mq_send, mq_setattr, mq_timedreceive, mq_timedsend, mq_unlink.
- 166: Export sem_unlink.
- 167: Add st_birthtim to struct stat.
- 168: Export asnprintf, dprintf, _Exit, vasnprintf, vdprintf.
- 169: Export confstr.
- 170: Export insque, remque.
- 171: Export exp10, exp10f, pow10, pow10f, strcasestr, funopen,
- fopencookie.
- 172: Export getifaddrs, freeifaddrs.
- 173: Export __assert_func.
- 174: Export stpcpy, stpncpy.
- 175: Export fdopendir.
- 176: Export wcstol, wcstoll, wcstoul, wcstoull, wcsxfrm.
- 177: Export sys_sigabbrev
- 178: Export wcpcpy, wcpncpy.
- 179: Export _f_llrint, _f_llrintf, _f_llrintl, _f_lrint, _f_lrintf,
- _f_lrintl, _f_rint, _f_rintf, _f_rintl, llrint, llrintf, llrintl,
- rintl, lrintl, and redirect exports of lrint, lrintf, rint, rintf.
- 180: Export getxattr, lgetxattr, fgetxattr, listxattr, llistxattr,
- flistxattr, setxattr, lsetxattr, fsetxattr, removexattr,
- lremovexattr, fremovexattr.
- 181: Export cygwin_conv_path, cygwin_create_path, cygwin_conv_path_list.
- 182: Export lockf.
- FIXME: Removed 12 year old and entirely wrong wprintf function at
- this point. We need a working implementation soon.
- 183: Export open_memstream, fmemopen.
- 184: Export openat, faccessat, fchmodat, fchownat, fstatat, futimesat,
- linkat, mkdirat, mkfifoat, mknodat, readlinkat, renameat, symlinkat,
- unlinkat.
- 185: Export futimens, utimensat.
- 186: Remove ancient V8 regexp functions. Also eliminate old crt0 interface
- which provided its own user_data structure.
- 187: Export cfmakeraw.
- 188: Export CW_SET_PRIV_KEY.
- 189: Implement dirent.d_type.
- 190: Export fgetwc, fgetws, fputwc, fputws, fwide, getwc, getwchar,
- putwc, putwchar, ungetwc.
- */
-
- /* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
-
-#define CYGWIN_VERSION_API_MAJOR 0
-#define CYGWIN_VERSION_API_MINOR 190
-
- /* There is also a compatibity version number associated with the
- shared memory regions. It is incremented when incompatible
- changes are made to the shared memory region *or* to any named
- shared mutexes, semaphores, etc. The arbitrary starting
- version was 0 (cygwin release 98r2).
- Bump to 4 since this hasn't been rigorously updated in a
- while. */
-
-#define CYGWIN_VERSION_SHARED_DATA 5
-
- /* An identifier used in the names used to create shared objects.
- The full names include the CYGWIN_VERSION_SHARED_DATA version
- as well as this identifier. */
-
-#define CYGWIN_VERSION_DLL_IDENTIFIER "cygwin1"
-
- /* The Cygwin mount table interface in the Win32 registry also
- has a version number associated with it in case that is
- changed in a non-backwards compatible fashion. Increment this
- version number whenever incompatible changes in mount table
- registry usage are made.
-
- 1: Original number version.
- 2: New mount registry layout, system-wide mount accessibility.
- 3: The mount table is not in the registry anymore, but in /etc/fstab.
- */
-
-#define CYGWIN_VERSION_MOUNT_REGISTRY 3
-
- /* Identifiers used in the Win32 registry. */
-
-#define CYGWIN_INFO_CYGWIN_REGISTRY_NAME "Cygwin"
-#define CYGWIN_INFO_PROGRAM_OPTIONS_NAME "Program Options"
-
- /* The default cygdrive prefix. */
-
-#define CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX "/cygdrive"
-
- /* In addition to the above version number strings, the build
- process adds some strings that may be useful in
- debugging/identifying a particular Cygwin DLL:
-
- The mkvers.sh script at the top level produces a .cc file
- which initializes a cygwin_version structure based on the
- above version information and creates a string table for
- grepping via "fgrep '%%%' cygwinwhatever.dll" if you are
- using GNU grep. Otherwise you may want to do a
- "strings cygwinwhatever.dll | fgrep '%%%'" instead.
-
- This will produce output such as:
-
- %%% Cygwin dll_identifier: cygwin
- %%% Cygwin api_major: 0
- %%% Cygwin api_minor: 0
- %%% Cygwin dll_major: 19
- %%% Cygwin dll_minor: 6
- %%% Cygwin shared_data: 1
- %%% Cygwin registry: b15
- %%% Cygwin build date: Wed Oct 14 16:26:51 EDT 1998
- %%% Cygwin shared id: cygwinS1
-
- This information can also be obtained through a call to
- cygwin_internal (CW_GETVERSIONINFO).
- */
-
-#define CYGWIN_VERSION_MAGIC(a, b) ((unsigned) ((((unsigned short) a) << 16) | (unsigned short) b))
-#define CYGWIN_VERSION_MAGIC_VERSION(a) ((unsigned) ((unsigned)a & 0xffff))
diff --git a/winsup/cygwin/include/cygwin/wait.h b/winsup/cygwin/include/cygwin/wait.h
deleted file mode 100644
index 12a3513..0000000
--- a/winsup/cygwin/include/cygwin/wait.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* cygwin/wait.h
-
- Copyright 2006 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_WAIT_H
-#define _CYGWIN_WAIT_H
-
-#define WNOHANG 1
-#define WUNTRACED 2
-
-/* A status looks like:
- <2 bytes info> <2 bytes code>
-
- <code> == 0, child has exited, info is the exit value
- <code> == 1..7e, child has exited, info is the signal number.
- <code> == 7f, child has stopped, info was the signal number.
- <code> == 80, there was a core dump.
-*/
-
-#define WIFEXITED(w) (((w) & 0xff) == 0)
-#define WIFSIGNALED(w) (((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f))
-#define WIFSTOPPED(w) (((w) & 0xff) == 0x7f)
-#define WEXITSTATUS(w) (((w) >> 8) & 0xff)
-#define WTERMSIG(w) ((w) & 0x7f)
-#define WSTOPSIG WEXITSTATUS
-#define WCOREDUMP(w) (WIFSIGNALED(w) && (w & 0x80))
-
-#endif /* _CYGWIN_WAIT_H */
diff --git a/winsup/cygwin/include/dlfcn.h b/winsup/cygwin/include/dlfcn.h
deleted file mode 100644
index 2cf88e2..0000000
--- a/winsup/cygwin/include/dlfcn.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* dlfcn.h
-
- Copyright 1998, 1999, 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _DLFCN_H
-#define _DLFCN_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* declarations used for dynamic linking support routines */
-extern void *dlopen (const char *, int);
-extern void *dlsym (void *, const char *);
-extern int dlclose (void *);
-extern char *dlerror (void);
-
-/* specific to CYGWIN */
-#define FORK_RELOAD 1
-#define FORK_NO_RELOAD 0
-
-extern void dlfork (int);
-
-/* following doesn't exist in Win32 API .... */
-#define RTLD_DEFAULT NULL
-
-/* valid values for mode argument to dlopen */
-#define RTLD_LAZY 1 /* lazy function call binding */
-#define RTLD_NOW 2 /* immediate function call binding */
-#define RTLD_GLOBAL 4 /* symbols in this dlopen'ed obj are visible to other dlopen'ed objs */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _DLFCN_H */
diff --git a/winsup/cygwin/include/elf.h b/winsup/cygwin/include/elf.h
deleted file mode 100644
index 0981ded..0000000
--- a/winsup/cygwin/include/elf.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* elf.h
-
- Copyright 2005 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _ELF_H_
-#define _ELF_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include <sys/types.h>
-#include <sys/elf32.h>
-#include <sys/elf64.h>
-#include <sys/elf_generic.h>
-#ifdef __cplusplus
-}
-#endif
-
-#endif /*_ELF_H_*/
diff --git a/winsup/cygwin/include/endian.h b/winsup/cygwin/include/endian.h
deleted file mode 100644
index c8b89d4..0000000
--- a/winsup/cygwin/include/endian.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* endian.h
-
- Copyright 2005 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _ENDIAN_H_
-#define _ENDIAN_H_
-
-#include <sys/config.h>
-
-#ifndef __BIG_ENDIAN
-#define __BIG_ENDIAN 4321
-#endif
-#ifndef __LITTLE_ENDIAN
-#define __LITTLE_ENDIAN 1234
-#endif
-
-#ifndef __BYTE_ORDER
-# define __BYTE_ORDER __LITTLE_ENDIAN
-#endif
-
-/*#ifdef __USE_BSD*/
-# define LITTLE_ENDIAN __LITTLE_ENDIAN
-# define BIG_ENDIAN __BIG_ENDIAN
-# define PDP_ENDIAN __PDP_ENDIAN
-# define BYTE_ORDER __BYTE_ORDER
-/*#endif*/
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-# define __LONG_LONG_PAIR(HI, LO) LO, HI
-#elif __BYTE_ORDER == __BIG_ENDIAN
-# define __LONG_LONG_PAIR(HI, LO) HI, LO
-#endif
-#endif /*_ENDIAN_H_*/
-
diff --git a/winsup/cygwin/include/err.h b/winsup/cygwin/include/err.h
deleted file mode 100644
index d1002c5..0000000
--- a/winsup/cygwin/include/err.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* err.h
-
- 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 _ERR_H
-#define _ERR_H
-
-#include <sys/cdefs.h>
-#include <stdarg.h>
-
-__BEGIN_DECLS
-
-extern void warn (const char *fmt, ...);
-extern void warnx (const char *fmt, ...);
-
-extern void err (int eval, const char *fmt, ...);
-extern void errx (int eval, const char *fmt, ...);
-
-extern void vwarn (const char *fmt, va_list ap);
-extern void vwarnx (const char *fmt, va_list ap);
-
-extern void verr (int eval, const char *fmt, va_list ap);
-extern void verrx (int eval, const char *fmt, va_list ap);
-
-__END_DECLS
-
-#endif /* _ERR_H */
diff --git a/winsup/cygwin/include/exceptions.h b/winsup/cygwin/include/exceptions.h
deleted file mode 100644
index 39d3d8f..0000000
--- a/winsup/cygwin/include/exceptions.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* exceptions.h
-
- Copyright 1996, 1997, 1998, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _EXCEPTIONS_H
-#define _EXCEPTIONS_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/* Documentation on the innards of exception handling (i.e. from the
- perspective of a compiler implementor) apparently doesn't exist. Sigh.
- However, the following came from Onno Hovers <onno@stack.urc.tue.nl>
-
-The first pointer to the chain of handlers is in the thread environment block
-at FS:[0]. This chain has the following format:
-
-typedef struct __EXCEPTION_FRAME
-{
- struct __EXCEPTION_FRAME *Prev; /-* pointer to the previous frame *-/
- PEXCEPTION_HANDLER Handler; /-* handler function *-/
-}
-
-You register an exception handler in your compiler with this simple ASM
-sequence:
- PUSH _MyExceptionHandler
- PUSH FS:[0]
- MOV FS:[0],ESP
-An exception frame MUST be on the stack! The frame may have more fields and
-both Visual C++ and Borland C++ use more fields for themselves.
-
-When an exception occurs the system calls all handlers starting with the
-handler at FS:0, and then the previous etc. until one handler returns
-ExceptionContinueExecution, which is 0. If a handler does not want to handle
-the exception it should just return ExceptionContinueSearch, which is 1.
-
-The handler has the following parameters:
-ehandler (
- PEXCEPTION_RECORD erecord,
- PEXCEPTION_FRAME myframe,
- PCONTEXT context, /-* context before and after *-/
- PVOID dispatch) /-* something *-/
-
-When a handler wants to handle the exception, it has some alternatives:
-
--one is to do do something about the exception condition, like emulating
-an invalid instruction, mapping memory where there was a page fault, etc.
-If the handler wants to have the context of the thread that causes the
-exception changed, it should make that change in the context passed to the
-handler.
-
--the second alternative is to call all exception handlers again, indicating
-that you want them to clean up. This way all the __finally blocks get
-executed. After doing that you change the context passed to the handler so
-the code starts executing in the except block. For this purpose you could
-call RtlUnwind. This (undocumented) function calls all exception handlers
-up to but not including the exception frame passed to it. If NULL is passed
-as exception frame RtlUnwind calls all exception handlers and then exits the
-process. The parameters to RtlUnwind are:
-
-RtlUnwind (
- PEXCEPTION_FRAME endframe,
- PVOID unusedEip,
- PEXCEPTION_RECORD erecord,
- DWORD returnEax)
-
-You should set unusedEip to the address where RtlUnwind should return like
-this:
- PUSH 0
- PUSH OFFSET ReturnUnwind
- PUSH 0
- PUSH 0
- CALL RtlUnwind
-ReturnUnwind:
- .....
-
-If no EXCEPTION_RECORD is passed, RtlUnwind makes a default exception
-record. In any case, the ExceptionFlags part of this record has the
-EH_UNWINDING (=2), flag set. (and EH_EXIT_UNWIND (=4), when NULL is passed as the end
-frame.).
-
-The handler for a exception as well as a for unwinds may be executed in the
-thread causing the exception, but may also be executed in another (special
-exception) thread. So it is not wise to make any assumptions about that!
-
-As an alternative you may consider the SetUnhandledExceptionFilter API
-to install your own exception filter. This one is documented.
-*/
-
-/* The January 1994 MSJ has an article entitled "Clearer, More Comprehensive
- Error Processing with Win32 Structured Exception Handling". It goes into
- a teensy bit of detail of the innards of exception handling (i.e. what we
- have to do). */
-
-typedef int (exception_handler) (EXCEPTION_RECORD *, struct _exception_list *,
- CONTEXT *, void *);
-
-typedef struct _exception_list
-{
- struct _exception_list *prev;
- exception_handler *handler;
-} exception_list;
-
-#ifdef __cplusplus
-};
-#endif /* __cplusplus */
-
-#endif /* _EXCEPTIONS_H */
diff --git a/winsup/cygwin/include/fcntl.h b/winsup/cygwin/include/fcntl.h
deleted file mode 100644
index 3e88f35..0000000
--- a/winsup/cygwin/include/fcntl.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* fcntl.h
-
- Copyright 1996, 1998, 2001, 2005, 2006 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _FCNTL_H
-#define _FCNTL_H
-
-#include <sys/fcntl.h>
-#define O_NDELAY _FNDELAY
-
-/* sys/fcntl defines values up to 0x40000 (O_NOINHERIT). */
-#define _FDIRECT 0x80000
-#define _FNOFOLLOW 0x100000
-
-#define O_DIRECT _FDIRECT
-#define O_NOFOLLOW _FNOFOLLOW
-#define O_DSYNC _FSYNC
-#define O_RSYNC _FSYNC
-
-#define POSIX_FADV_NORMAL 0
-#define POSIX_FADV_SEQUENTIAL 1
-#define POSIX_FADV_RANDOM 2
-#define POSIX_FADV_WILLNEED 3
-#define POSIX_FADV_DONTNEED 4
-#define POSIX_FADV_NOREUSE 5
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern int posix_fadvise _PARAMS ((int, off_t, off_t, int));
-extern int posix_fallocate _PARAMS ((int, off_t, off_t));
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _FCNTL_H */
diff --git a/winsup/cygwin/include/features.h b/winsup/cygwin/include/features.h
deleted file mode 100644
index 4b0b5f9..0000000
--- a/winsup/cygwin/include/features.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* features.h
-
- Copyright 2001, 2002, 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. */
-
-#ifndef _FEATURES_H
-#define _FEATURES_H
-
-#include <sys/cdefs.h>
-#include <sys/features.h>
-
-/* Various options should be defined here, but the framework to do this
- is not laid down so far. Especially notable are the following defines,
- which can be used by the application to switch on or off various
- datatypes and function prototypes:
-
- _BSD_SOURCE to include pure BSD functions which are not defined
- under POSIX.
-
- _POSIX_SOURCE if the application requests a POSIX compatible system.
-
- _XOPEN_SOURCE if X/Open functions and datatypes are requested. This
- option includes _POSIX_SOURCE.
-
- _GNU_SOURCE to turn on GNU extensions which might collide with defines
- used in application or library headers. This option
- includes _BSD_SOURCE, _XOPEN_SOURCE and _POSIX_SOURCE.
-*/
-
-#endif /* _FEATURES_H */
diff --git a/winsup/cygwin/include/fnmatch.h b/winsup/cygwin/include/fnmatch.h
deleted file mode 100644
index e4500ab..0000000
--- a/winsup/cygwin/include/fnmatch.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* $OpenBSD: fnmatch.h,v 1.5 2000/03/24 17:13:23 millert Exp $ */
-/* $NetBSD: fnmatch.h,v 1.5 1994/10/26 00:55:53 cgd Exp $ */
-
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)fnmatch.h 8.1 (Berkeley) 6/2/93
- */
-
-#ifndef _FNMATCH_H_
-#define _FNMATCH_H_
-
-#define FNM_NOMATCH 1 /* Match failed. */
-#define FNM_NOSYS 2 /* Function not supported (unused). */
-
-#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */
-#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */
-#define FNM_PERIOD 0x04 /* Period must be matched by period. */
-#ifndef _POSIX_SOURCE
-#define FNM_LEADING_DIR 0x08 /* Ignore /<tail> after Imatch. */
-#define FNM_CASEFOLD 0x10 /* Case insensitive search. */
-#define FNM_IGNORECASE FNM_CASEFOLD
-#define FNM_FILE_NAME FNM_PATHNAME
-#endif
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-int fnmatch __P((const char *, const char *, int));
-__END_DECLS
-
-#endif /* !_FNMATCH_H_ */
-
-
diff --git a/winsup/cygwin/include/fts.h b/winsup/cygwin/include/fts.h
deleted file mode 100644
index ac32099..0000000
--- a/winsup/cygwin/include/fts.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)fts.h 8.3 (Berkeley) 8/14/94
- * $FreeBSD: /repoman/r/ncvs/src/include/fts.h,v 1.11 2005/01/07 00:06:20 pjd Exp $
- */
-
-#ifndef _FTS_H_
-#define _FTS_H_
-
-typedef struct {
- struct _ftsent *fts_cur; /* current node */
- struct _ftsent *fts_child; /* linked list of children */
- struct _ftsent **fts_array; /* sort array */
- __dev32_t fts_dev; /* starting device # */
- char *fts_path; /* path for this descent */
- int fts_rfd; /* fd for root */
- int fts_pathlen; /* sizeof(path) */
- int fts_nitems; /* elements in the sort array */
- int (*fts_compar) /* compare function */
- (const struct _ftsent * const *, const struct _ftsent * const *);
-
-#define FTS_COMFOLLOW 0x001 /* follow command line symlinks */
-#define FTS_LOGICAL 0x002 /* logical walk */
-#define FTS_NOCHDIR 0x004 /* don't change directories */
-#define FTS_NOSTAT 0x008 /* don't get stat info */
-#define FTS_PHYSICAL 0x010 /* physical walk */
-#define FTS_SEEDOT 0x020 /* return dot and dot-dot */
-#define FTS_XDEV 0x040 /* don't cross devices */
-#ifndef __CYGWIN__
-#define FTS_WHITEOUT 0x080 /* return whiteout information */
-#endif
-#define FTS_OPTIONMASK 0x0ff /* valid user option mask */
-
-#define FTS_NAMEONLY 0x100 /* (private) child names only */
-#define FTS_STOP 0x200 /* (private) unrecoverable error */
- int fts_options; /* fts_open options, global flags */
- void *fts_clientptr; /* thunk for sort function */
-} FTS;
-
-typedef struct _ftsent {
- struct _ftsent *fts_cycle; /* cycle node */
- struct _ftsent *fts_parent; /* parent directory */
- struct _ftsent *fts_link; /* next file in directory */
- union {
- struct {
- long __fts_number; /* local numeric value */
- void *__fts_pointer; /* local address value */
- } __struct_ftsent;
- int64_t __fts_bignum;
- } __union_ftsent;
-#define fts_number __union_ftsent.__struct_ftsent.__fts_number
-#define fts_pointer __union_ftsent.__struct_ftsent.__fts_pointer
-#define fts_bignum __union_ftsent.__fts_bignum
- char *fts_accpath; /* access path */
- char *fts_path; /* root path */
- int fts_errno; /* errno for this node */
- int fts_symfd; /* fd for symlink */
- u_short fts_pathlen; /* strlen(fts_path) */
- u_short fts_namelen; /* strlen(fts_name) */
-
- __ino64_t fts_ino; /* inode */
- __dev32_t fts_dev; /* device */
- nlink_t fts_nlink; /* link count */
-
-#define FTS_ROOTPARENTLEVEL -1
-#define FTS_ROOTLEVEL 0
- short fts_level; /* depth (-1 to N) */
-
-#define FTS_D 1 /* preorder directory */
-#define FTS_DC 2 /* directory that causes cycles */
-#define FTS_DEFAULT 3 /* none of the above */
-#define FTS_DNR 4 /* unreadable directory */
-#define FTS_DOT 5 /* dot or dot-dot */
-#define FTS_DP 6 /* postorder directory */
-#define FTS_ERR 7 /* error; errno is set */
-#define FTS_F 8 /* regular file */
-#define FTS_INIT 9 /* initialized only */
-#define FTS_NS 10 /* stat(2) failed */
-#define FTS_NSOK 11 /* no stat(2) requested */
-#define FTS_SL 12 /* symbolic link */
-#define FTS_SLNONE 13 /* symbolic link without target */
-#define FTS_W 14 /* whiteout object */
- u_short fts_info; /* user flags for FTSENT structure */
-
-#define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */
-#define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */
-#define FTS_ISW 0x04 /* this is a whiteout object */
- u_short fts_flags; /* private flags for FTSENT structure */
-
-#define FTS_AGAIN 1 /* read node again */
-#define FTS_FOLLOW 2 /* follow symbolic link */
-#define FTS_NOINSTR 3 /* no instructions */
-#define FTS_SKIP 4 /* discard node */
- u_short fts_instr; /* fts_set() instructions */
-
-#ifdef __INSIDE_CYGWIN__
- struct __stat64 *fts_statp; /* stat(2) information */
-#elif defined (__CYGWIN__) && !defined (__CYGWIN_USE_BIG_TYPES__)
- #error "fts requires __CYGWIN_USE_BIG_TYPES__"
-#else
- struct stat *fts_statp; /* stat(2) information */
-#endif
- char *fts_name; /* file name */
- FTS *fts_fts; /* back pointer to main FTS */
-} FTSENT;
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-FTSENT *fts_children(FTS *, int);
-int fts_close(FTS *);
-void *fts_get_clientptr(FTS *);
-#define fts_get_clientptr(fts) ((fts)->fts_clientptr)
-FTS *fts_get_stream(FTSENT *);
-#define fts_get_stream(ftsent) ((ftsent)->fts_fts)
-FTS *fts_open(char * const *, int,
- int (*)(const FTSENT * const *, const FTSENT * const *));
-FTSENT *fts_read(FTS *);
-int fts_set(FTS *, FTSENT *, int);
-void fts_set_clientptr(FTS *, void *);
-__END_DECLS
-
-#endif /* !_FTS_H_ */
diff --git a/winsup/cygwin/include/ftw.h b/winsup/cygwin/include/ftw.h
deleted file mode 100644
index 501081e..0000000
--- a/winsup/cygwin/include/ftw.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* $OpenBSD: ftw.h,v 1.1 2003/07/21 21:13:18 millert Exp $ */
-
-/*
- * Copyright (c) 2003 Todd C. Miller <Todd.Miller@courtesan.com>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Sponsored in part by the Defense Advanced Research Projects
- * Agency (DARPA) and Air Force Research Laboratory, Air Force
- * Materiel Command, USAF, under agreement number F39502-99-1-0512.
- *
- * $FreeBSD: /repoman/r/ncvs/src/include/ftw.h,v 1.2 2004/08/24 13:00:54 tjr Exp $
- */
-
-#ifndef _FTW_H
-#define _FTW_H
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/cdefs.h>
-
-/*
- * Valid flags for the 3rd argument to the function that is passed as the
- * second argument to ftw(3) and nftw(3). Say it three times fast!
- */
-#define FTW_F 0 /* File. */
-#define FTW_D 1 /* Directory. */
-#define FTW_DNR 2 /* Directory without read permission. */
-#define FTW_DP 3 /* Directory with subdirectories visited. */
-#define FTW_NS 4 /* Unknown type; stat() failed. */
-#define FTW_SL 5 /* Symbolic link. */
-#define FTW_SLN 6 /* Sym link that names a nonexistent file. */
-
-/*
- * Flags for use as the 4th argument to nftw(3). These may be ORed together.
- */
-#define FTW_PHYS 0x01 /* Physical walk, don't follow sym links. */
-#define FTW_MOUNT 0x02 /* The walk does not cross a mount point. */
-#define FTW_DEPTH 0x04 /* Subdirs visited before the dir itself. */
-#define FTW_CHDIR 0x08 /* Change to a directory before reading it. */
-
-struct FTW {
- int base;
- int level;
-};
-
-__BEGIN_DECLS
-#ifdef __INSIDE_CYGWIN__
-int ftw(const char *, int (*)(const char *, const struct __stat64 *, int), int);
-int nftw(const char *, int (*)(const char *, const struct __stat64 *, int,
- struct FTW *), int, int);
-#elif defined (__CYGWIN__) && !defined (__CYGWIN_USE_BIG_TYPES__)
- #error "ftw requires __CYGWIN_USE_BIG_TYPES__"
-#else
-int ftw(const char *, int (*)(const char *, const struct stat *, int), int);
-int nftw(const char *, int (*)(const char *, const struct stat *, int,
- struct FTW *), int, int);
-#endif
-__END_DECLS
-
-#endif /* !_FTW_H */
diff --git a/winsup/cygwin/include/getopt.h b/winsup/cygwin/include/getopt.h
deleted file mode 100644
index 0c1c8c9..0000000
--- a/winsup/cygwin/include/getopt.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 1987, 1993, 1994, 1996
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifdef _COMPILING_NEWLIB
-#include_next "getopt.h"
-#else
-#ifndef __GETOPT_H__
-#define __GETOPT_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef __INSIDE_CYGWIN__
-extern int __declspec(dllimport) opterr; /* if error message should be printed */
-extern int __declspec(dllimport) optind; /* index into parent argv vector */
-extern int __declspec(dllimport) optopt; /* character checked for validity */
-extern int __declspec(dllimport) optreset; /* reset getopt */
-extern char __declspec(dllimport) *optarg; /* argument associated with option */
-#endif
-
-int getopt (int, char * const *, const char *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __GETOPT_H__ */
-
-#ifndef __UNISTD_GETOPT__
-#ifndef __GETOPT_LONG_H__
-#define __GETOPT_LONG_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct option {
- const char *name;
- int has_arg;
- int *flag;
- int val;
-};
-
-int getopt_long (int, char *const *, const char *, const struct option *, int *);
-int getopt_long_only (int, char *const *, const char *, const struct option *, int *);
-
-#ifndef HAVE_DECL_GETOPT
-#define HAVE_DECL_GETOPT 1
-#endif
-
-#define no_argument 0
-#define required_argument 1
-#define optional_argument 2
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __GETOPT_LONG_H__ */
-#endif /* __UNISTD_GETOPT__ */
-#endif /*_INSIDE_NEWLIB*/
diff --git a/winsup/cygwin/include/glob.h b/winsup/cygwin/include/glob.h
deleted file mode 100644
index 1a463ca..0000000
--- a/winsup/cygwin/include/glob.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Guido van Rossum.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)glob.h 8.1 (Berkeley) 6/2/93
- * $FreeBSD: /repoman/r/ncvs/src/include/glob.h,v 1.10 2006/05/22 05:57:39 ache Exp $
- */
-
-#ifndef _GLOB_H_
-#define _GLOB_H_
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-typedef struct {
- size_t gl_pathc; /* Count of total paths so far. */
- size_t gl_matchc; /* Count of paths matching pattern. */
- size_t gl_offs; /* Reserved at beginning of gl_pathv. */
- int gl_flags; /* Copy of flags parameter to glob. */
- char **gl_pathv; /* List of paths matching pattern. */
- /* Copy of errfunc parameter to glob. */
- int (*gl_errfunc) __P((const char *, int));
-
- /*
- * Alternate filesystem access methods for glob; replacement
- * versions of closedir(3), readdir(3), opendir(3), stat(2)
- * and lstat(2).
- */
- void (*gl_closedir)(void *);
- struct dirent *(*gl_readdir)(void *);
- void *(*gl_opendir)(const char *);
-#if defined (__INSIDE_CYGWIN__)
- int (*gl_lstat) __P((const char *, struct __stat64 *));
- int (*gl_stat) __P((const char *, struct __stat64 *));
-#else
-
- int (*gl_lstat) __P((const char *, struct stat *));
- int (*gl_stat) __P((const char *, struct stat *));
-#endif
-} glob_t;
-
-/* Believed to have been introduced in 1003.2-1992 */
-#define GLOB_APPEND 0x0001 /* Append to output from previous call. */
-#define GLOB_DOOFFS 0x0002 /* Use gl_offs. */
-#define GLOB_ERR 0x0004 /* Return on error. */
-#define GLOB_MARK 0x0008 /* Append / to matching directories. */
-#define GLOB_NOCHECK 0x0010 /* Return pattern itself if nothing matches. */
-#define GLOB_NOSORT 0x0020 /* Don't sort. */
-#define GLOB_NOESCAPE 0x2000 /* Disable backslash escaping. */
-
-/* Error values returned by glob(3) */
-#define GLOB_NOSPACE (-1) /* Malloc call failed. */
-#define GLOB_ABORTED (-2) /* Unignored error. */
-#define GLOB_NOMATCH (-3) /* No match and GLOB_NOCHECK was not set. */
-#define GLOB_NOSYS (-4) /* Obsolete: source comptability only. */
-
-#ifndef _POSIX_SOURCE
-#define GLOB_ALTDIRFUNC 0x0040 /* Use alternately specified directory funcs. */
-#define GLOB_BRACE 0x0080 /* Expand braces ala csh. */
-#define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */
-#define GLOB_NOMAGIC 0x0200 /* GLOB_NOCHECK without magic chars (csh). */
-#define GLOB_QUOTE 0x0400 /* Quote special chars with \. */
-#define GLOB_TILDE 0x0800 /* Expand tilde names from the passwd file. */
-#define GLOB_LIMIT 0x1000 /* limit number of returned paths */
-
-/* source compatibility, these are the old names */
-#define GLOB_MAXPATH GLOB_LIMIT
-#define GLOB_ABEND GLOB_ABORTED
-#endif /* __BSD_VISIBLE */
-
-__BEGIN_DECLS
-
-#undef DLLEXPORT
-#ifdef __INSIDE_CYGWIN__
-# define DLLEXPORT
-#else
-# define DLLEXPORT __declspec(dllimport)
-#endif
-
-int DLLEXPORT glob(const char *, int, int (*)(const char *, int), glob_t *);
-void DLLEXPORT globfree(glob_t *);
-__END_DECLS
-
-#endif /* !_GLOB_H_ */
diff --git a/winsup/cygwin/include/icmp.h b/winsup/cygwin/include/icmp.h
deleted file mode 100644
index 7e7aedc..0000000
--- a/winsup/cygwin/include/icmp.h
+++ /dev/null
@@ -1 +0,0 @@
-/* icmp.h */
diff --git a/winsup/cygwin/include/ifaddrs.h b/winsup/cygwin/include/ifaddrs.h
deleted file mode 100644
index f6c28e7..0000000
--- a/winsup/cygwin/include/ifaddrs.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* $OpenBSD: ifaddrs.h,v 1.4 2004/01/22 21:48:02 espie Exp $ */
-
-/*
- * Copyright (c) 1995, 1999
- * Berkeley Software Design, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp
- */
-
-#ifndef _IFADDRS_H_
-#define _IFADDRS_H_
-
-struct ifaddrs {
- struct ifaddrs *ifa_next;
- char *ifa_name;
- unsigned int ifa_flags;
- struct sockaddr *ifa_addr;
- struct sockaddr *ifa_netmask;
- struct sockaddr *ifa_dstaddr;
- void *ifa_data;
-};
-
-/*
- * This may have been defined in <net/if.h>. Note that if <net/if.h> is
- * to be included it must be included before this header file.
- */
-/* CV 2007-06-20: Not a problem on Cygwin right now. */
-#ifndef ifa_broadaddr
-#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */
-#endif
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-extern int getifaddrs(struct ifaddrs **);
-extern void freeifaddrs(struct ifaddrs *);
-__END_DECLS
-
-#endif
diff --git a/winsup/cygwin/include/inttypes.h b/winsup/cygwin/include/inttypes.h
deleted file mode 100644
index beacba6..0000000
--- a/winsup/cygwin/include/inttypes.h
+++ /dev/null
@@ -1,247 +0,0 @@
-/* inttypes.h - fixed size integer types
-
- 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 _INTTYPES_H
-#define _INTTYPES_H
-
-#include <stdint.h>
-
-/* fprintf() macros for signed integers */
-
-#define PRId8 "d"
-#define PRId16 "d"
-#define PRId32 "ld"
-#define PRId64 "lld"
-
-#define PRIdLEAST8 "d"
-#define PRIdLEAST16 "d"
-#define PRIdLEAST32 "ld"
-#define PRIdLEAST64 "lld"
-
-#define PRIdFAST8 "d"
-#define PRIdFAST16 "ld"
-#define PRIdFAST32 "ld"
-#define PRIdFAST64 "lld"
-
-#define PRIdMAX "lld"
-#define PRIdPTR "ld"
-
-#define PRIi8 "i"
-#define PRIi16 "i"
-#define PRIi32 "li"
-#define PRIi64 "lli"
-
-#define PRIiLEAST8 "i"
-#define PRIiLEAST16 "i"
-#define PRIiLEAST32 "li"
-#define PRIiLEAST64 "lli"
-
-#define PRIiFAST8 "i"
-#define PRIiFAST16 "li"
-#define PRIiFAST32 "li"
-#define PRIiFAST64 "lli"
-
-#define PRIiMAX "lli"
-#define PRIiPTR "li"
-
-/* fprintf() macros for unsigned integers */
-
-#define PRIo8 "o"
-#define PRIo16 "o"
-#define PRIo32 "lo"
-#define PRIo64 "llo"
-
-#define PRIoLEAST8 "o"
-#define PRIoLEAST16 "o"
-#define PRIoLEAST32 "lo"
-#define PRIoLEAST64 "llo"
-
-#define PRIoFAST8 "o"
-#define PRIoFAST16 "lo"
-#define PRIoFAST32 "lo"
-#define PRIoFAST64 "llo"
-
-#define PRIoMAX "llo"
-#define PRIoPTR "lo"
-
-#define PRIu8 "u"
-#define PRIu16 "u"
-#define PRIu32 "lu"
-#define PRIu64 "llu"
-
-#define PRIuLEAST8 "u"
-#define PRIuLEAST16 "u"
-#define PRIuLEAST32 "lu"
-#define PRIuLEAST64 "llu"
-
-#define PRIuFAST8 "u"
-#define PRIuFAST16 "lu"
-#define PRIuFAST32 "lu"
-#define PRIuFAST64 "llu"
-
-#define PRIuMAX "llu"
-#define PRIuPTR "lu"
-
-#define PRIx8 "x"
-#define PRIx16 "x"
-#define PRIx32 "lx"
-#define PRIx64 "llx"
-
-#define PRIxLEAST8 "x"
-#define PRIxLEAST16 "x"
-#define PRIxLEAST32 "lx"
-#define PRIxLEAST64 "llx"
-
-#define PRIxFAST8 "x"
-#define PRIxFAST16 "lx"
-#define PRIxFAST32 "lx"
-#define PRIxFAST64 "llx"
-
-#define PRIxMAX "llx"
-#define PRIxPTR "lx"
-
-#define PRIX8 "X"
-#define PRIX16 "X"
-#define PRIX32 "lX"
-#define PRIX64 "llX"
-
-#define PRIXLEAST8 "X"
-#define PRIXLEAST16 "X"
-#define PRIXLEAST32 "lX"
-#define PRIXLEAST64 "llX"
-
-#define PRIXFAST8 "X"
-#define PRIXFAST16 "lX"
-#define PRIXFAST32 "lX"
-#define PRIXFAST64 "llX"
-
-#define PRIXMAX "llX"
-#define PRIXPTR "lX"
-
-/* fscanf() macros for signed integers */
-
-#define SCNd8 "hhd"
-#define SCNd16 "hd"
-#define SCNd32 "ld"
-#define SCNd64 "lld"
-
-#define SCNdLEAST8 "hhd"
-#define SCNdLEAST16 "hd"
-#define SCNdLEAST32 "ld"
-#define SCNdLEAST64 "lld"
-
-#define SCNdFAST8 "hhd"
-#define SCNdFAST16 "ld"
-#define SCNdFAST32 "ld"
-#define SCNdFAST64 "lld"
-
-#define SCNdMAX "lld"
-#define SCNdPTR "ld"
-
-#define SCNi8 "hhi"
-#define SCNi16 "hi"
-#define SCNi32 "li"
-#define SCNi64 "lli"
-
-#define SCNiLEAST8 "hhi"
-#define SCNiLEAST16 "hi"
-#define SCNiLEAST32 "li"
-#define SCNiLEAST64 "lli"
-
-#define SCNiFAST8 "hhi"
-#define SCNiFAST16 "li"
-#define SCNiFAST32 "li"
-#define SCNiFAST64 "lli"
-
-#define SCNiMAX "lli"
-#define SCNiPTR "li"
-
-/* fscanf() macros for unsigned integers */
-
-#define SCNo8 "hho"
-#define SCNo16 "ho"
-#define SCNo32 "lo"
-#define SCNo64 "llo"
-
-#define SCNoLEAST8 "hho"
-#define SCNoLEAST16 "ho"
-#define SCNoLEAST32 "lo"
-#define SCNoLEAST64 "llo"
-
-#define SCNoFAST8 "hho"
-#define SCNoFAST16 "lo"
-#define SCNoFAST32 "lo"
-#define SCNoFAST64 "llo"
-
-#define SCNoMAX "llo"
-#define SCNoPTR "lo"
-
-#define SCNu8 "hhu"
-#define SCNu16 "hu"
-#define SCNu32 "lu"
-#define SCNu64 "llu"
-
-#define SCNuLEAST8 "hhu"
-#define SCNuLEAST16 "hu"
-#define SCNuLEAST32 "lu"
-#define SCNuLEAST64 "llu"
-
-#define SCNuFAST8 "hhu"
-#define SCNuFAST16 "lu"
-#define SCNuFAST32 "lu"
-#define SCNuFAST64 "llu"
-
-#define SCNuMAX "llu"
-#define SCNuPTR "lu"
-
-#define SCNx8 "hhx"
-#define SCNx16 "hx"
-#define SCNx32 "lx"
-#define SCNx64 "llx"
-
-#define SCNxLEAST8 "hhx"
-#define SCNxLEAST16 "hx"
-#define SCNxLEAST32 "lx"
-#define SCNxLEAST64 "llx"
-
-#define SCNxFAST8 "hhx"
-#define SCNxFAST16 "lx"
-#define SCNxFAST32 "lx"
-#define SCNxFAST64 "llx"
-
-#define SCNxMAX "llx"
-#define SCNxPTR "lx"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <_ansi.h>
-
-typedef struct {
- intmax_t quot;
- intmax_t rem;
-} imaxdiv_t;
-
-intmax_t _EXFUN(imaxabs, (intmax_t));
-imaxdiv_t _EXFUN(imaxdiv, (intmax_t, intmax_t));
-intmax_t _EXFUN(strtoimax, (const char *, char **, int));
-uintmax_t _EXFUN(strtoumax, (const char *, char **, int));
-
-#if 0 /* Not yet defined */
-intmax_t _EXFUN(wcstoimax, (const wchar_t *, wchar_t **, int));
-uintmax_t _EXFUN(wcstoumax, (const wchar_t *, wchar_t **, int));
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _INTTYPES_H */
diff --git a/winsup/cygwin/include/io.h b/winsup/cygwin/include/io.h
deleted file mode 100644
index de9f39e..0000000
--- a/winsup/cygwin/include/io.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* io.h
-
- Copyright 1999, 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _IO_H_
-#define _IO_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/*
- * Function to return a Win32 HANDLE from a fd.
- */
-extern long get_osfhandle(int);
-extern int setmode (int __fd, int __mode);
-int access(const char *__path, int __amode);
-
-#ifdef __cplusplus
-};
-#endif /* __cplusplus */
-
-#endif /* _IO_H_ */
diff --git a/winsup/cygwin/include/lastlog.h b/winsup/cygwin/include/lastlog.h
deleted file mode 100644
index 9db8620..0000000
--- a/winsup/cygwin/include/lastlog.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* lastlog.h
-
- Copyright 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _LASTLOG_H
-#define _LASTLOG_H
-
-#include <utmp.h>
-
-struct lastlog {
- long ll_time;
- char ll_line[UT_LINESIZE];
- char ll_host[UT_HOSTSIZE];
-};
-
-#endif
diff --git a/winsup/cygwin/include/libgen.h b/winsup/cygwin/include/libgen.h
deleted file mode 100644
index f5c24a8..0000000
--- a/winsup/cygwin/include/libgen.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* libgen.h
-
- Copyright 2005 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _LIBGEN_H
-#define _LIBGEN_H
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-
-extern char *basename (char *path);
-extern char *dirname (char *path);
-
-__END_DECLS
-
-#endif /* _LIBGEN_H */
diff --git a/winsup/cygwin/include/limits.h b/winsup/cygwin/include/limits.h
deleted file mode 100644
index fdda012..0000000
--- a/winsup/cygwin/include/limits.h
+++ /dev/null
@@ -1,491 +0,0 @@
-/* limits.h
-
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008 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 _LIMITS_H___
-
-#include <features.h>
-
-#ifndef _MACH_MACHLIMITS_H_
-
-/* _MACH_MACHLIMITS_H_ is used on OSF/1. */
-#define _LIMITS_H___
-#define _MACH_MACHLIMITS_H_
-
-
-/* Numerical limits */
-
-/* Number of bits in a `char'. */
-#undef CHAR_BIT
-#define CHAR_BIT 8
-
-/* Maximum length of a multibyte character. */
-#ifndef MB_LEN_MAX
-/* TODO: This is newlib's max value. We should probably rather define our
- own _mbtowc_r and _wctomb_r functions which are only codepage dependent. */
-#define MB_LEN_MAX 8
-#endif
-
-/* Minimum and maximum values a `signed char' can hold. */
-#undef SCHAR_MIN
-#define SCHAR_MIN (-128)
-#undef SCHAR_MAX
-#define SCHAR_MAX 127
-
-/* Maximum value an `unsigned char' can hold. (Minimum is 0). */
-#undef UCHAR_MAX
-#define UCHAR_MAX 255
-
-/* Minimum and maximum values a `char' can hold. */
-#ifdef __CHAR_UNSIGNED__
-#undef CHAR_MIN
-#define CHAR_MIN 0
-#undef CHAR_MAX
-#define CHAR_MAX 255
-#else
-#undef CHAR_MIN
-#define CHAR_MIN (-128)
-#undef CHAR_MAX
-#define CHAR_MAX 127
-#endif
-
-/* Minimum and maximum values a `signed short int' can hold. */
-#undef SHRT_MIN
-#define SHRT_MIN (-32768)
-#undef SHRT_MAX
-#define SHRT_MAX 32767
-
-/* Maximum value an `unsigned short int' can hold. (Minimum is 0). */
-#undef USHRT_MAX
-#define USHRT_MAX 65535
-
-/* Minimum and maximum values a `signed int' can hold. */
-#ifndef __INT_MAX__
-#define __INT_MAX__ 2147483647
-#endif
-#undef INT_MIN
-#define INT_MIN (-INT_MAX-1)
-#undef INT_MAX
-#define INT_MAX __INT_MAX__
-
-/* Maximum value an `unsigned int' can hold. (Minimum is 0). */
-#undef UINT_MAX
-#define UINT_MAX (INT_MAX * 2U + 1)
-
-/* Minimum and maximum values a `signed long int' can hold.
- (Same as `int'). */
-#ifndef __LONG_MAX__
-#ifndef __alpha__
-#define __LONG_MAX__ 2147483647L
-#else
-#define __LONG_MAX__ 9223372036854775807L
-# endif /* __alpha__ */
-#endif
-#undef LONG_MIN
-#define LONG_MIN (-LONG_MAX-1)
-#undef LONG_MAX
-#define LONG_MAX __LONG_MAX__
-
-/* Maximum value an `unsigned long int' can hold. (Minimum is 0). */
-#undef ULONG_MAX
-#define ULONG_MAX (LONG_MAX * 2UL + 1)
-
-/* Minimum and maximum values a `signed long long int' can hold. */
-#ifndef __LONG_LONG_MAX__
-#define __LONG_LONG_MAX__ 9223372036854775807LL
-#endif
-
-#if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__)
-#undef LONG_LONG_MIN
-#define LONG_LONG_MIN (-LONG_LONG_MAX-1)
-#undef LONG_LONG_MAX
-#define LONG_LONG_MAX __LONG_LONG_MAX__
-
-/* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
-#undef ULONG_LONG_MAX
-#define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1)
-#endif
-
-/* Minimum and maximum values a `signed long long int' can hold. */
-#undef LLONG_MIN
-#define LLONG_MIN (-LLONG_MAX-1)
-#undef LLONG_MAX
-#define LLONG_MAX __LONG_LONG_MAX__
-
-/* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
-#undef ULLONG_MAX
-#define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
-
-/* Maximum size of ssize_t */
-#undef SSIZE_MAX
-#define SSIZE_MAX (__LONG_MAX__)
-
-
-/* Runtime Invariant Values */
-
-/* Please note that symbolic names shall be ommited, on specific
- implementations where the corresponding value is equal to or greater
- than the stated minimum, but is unspecified. This indetermination
- might depend on the amount of available memory space on a specific
- instance of a specific implementation. The actual value supported by
- a specific instance shall be provided by the sysconf() function. */
-
-/* Maximum number of I/O operations in a single list I/O call supported by
- the implementation. Not yet implemented. */
-#undef AIO_LISTIO_MAX
-/* #define AIO_LISTIO_MAX >= _POSIX_AIO_LISTIO_MAX */
-
-/* Maximum number of outstanding asynchronous I/O operations supported by
- the implementation. Not yet implemented. */
-#undef AIO_MAX
-/* #define AIO_MAX >= _POSIX_AIO_MAX */
-
-/* The maximum amount by which a process can decrease its asynchronous I/O
- priority level from its own scheduling priority. */
-#undef AIO_PRIO_DELTA_MAX
-/* #define AIO_PRIO_DELTA_MAX >= 0 */
-
-/* Maximum number of bytes in arguments and environment passed in an exec
- call. 32000 is the safe value used for Windows processes when called
- from Cygwin processes. */
-#undef ARG_MAX
-#define ARG_MAX 32000
-
-/* Maximum number of functions that may be registered with atexit(). */
-#undef ATEXIT_MAX
-#define ATEXIT_MAX 32
-
-/* Maximum number of simultaneous processes per real user ID. */
-#undef CHILD_MAX
-#define CHILD_MAX 256
-
-/* Maximum number of timer expiration overruns. Not yet implemented. */
-#undef DELAYTIMER_MAX
-/* #define DELAYTIMER_MAX >= _POSIX_DELAYTIMER_MAX */
-
-/* Maximum length of a host name. */
-#undef HOST_NAME_MAX
-#define HOST_NAME_MAX 255
-
-/* Maximum number of iovcnt in a writev (an arbitrary number) */
-#undef IOV_MAX
-#define IOV_MAX 1024
-
-/* Maximum number of characters in a login name. */
-#undef LOGIN_NAME_MAX
-#define LOGIN_NAME_MAX 256 /* equal to UNLEN defined in w32api/lmcons.h */
-
-/* The maximum number of open message queue descriptors a process may hold. */
-#undef MQ_OPEN_MAX
-#define MQ_OPEN_MAX OPEN_MAX
-
-/* The maximum number of message priorities supported by the implementation. */
-#undef MQ_PRIO_MAX
-#define MQ_PRIO_MAX INT_MAX
-
-/* # of open files per process. Actually it can be more since Cygwin
- grows the dtable as necessary. We define a reasonable limit here
- which is returned by getdtablesize(), sysconf(_SC_OPEN_MAX) and
- getrlimit(RLIMIT_NOFILE). */
-#undef OPEN_MAX
-#define OPEN_MAX 256
-
-/* Size in bytes of a page. */
-#undef PAGESIZE
-#undef PAGE_SIZE
-#define PAGESIZE 65536
-#define PAGE_SIZE PAGESIZE
-
-/* Maximum number of attempts made to destroy a thread's thread-specific
- data values on thread exit. */
-/* FIXME: I really don't understand this value. Why should multiple
- attempts be necessary to destroy thread-specific data?!? Anyway, the
- current value here is 1, taken originally from our pthread.h file,
- where it was mistakenly defined first. Unfortunately this value is
- lower than the POSIX defined minimum value, which is 4. */
-#undef PTHREAD_DESTRUCTOR_ITERATIONS
-#define PTHREAD_DESTRUCTOR_ITERATIONS 1
-
-/* Maximum number of data keys that can be created by a process. */
-/* Tls has 64 items for pre win2000 - and we don't want to use them all :] */
-#undef PTHREAD_KEYS_MAX
-#define PTHREAD_KEYS_MAX 32
-
-/* Minimum size in bytes of thread stack storage. */
-/* Actually the minimum stack size is somewhat of a split personality.
- The size parameter in a CreateThread call is the size of the initially
- commited stack size, which can be specified as low as 4K. However, the
- default *reserved* stack size is 1 Meg, unless the .def file specifies
- another STACKSIZE value. And even if you specify a stack size below 64K,
- the allocation granularity is in the way. You can never squeeze multiple
- threads in the same allocation granularity slot. Oh well. */
-#undef PTHREAD_STACK_MIN
-#define PTHREAD_STACK_MIN 65536
-
-/* Maximum number of threads that can be created per process. */
-/* Windows allows any arbitrary number of threads per process. */
-#undef PTHREAD_THREADS_MAX
-/* #define PTHREAD_THREADS_MAX unspecified */
-
-/* Maximum number of realtime signals reserved for application use. */
-/* FIXME: We only support one realtime signal but _POSIX_RTSIG_MAX is 8. */
-#undef RTSIG_MAX
-#define RTSIG_MAX 1
-
-/* Maximum number of semaphores that a process may have. */
-/* Windows allows any arbitrary number of semaphores per process. */
-#undef SEM_NSEMS_MAX
-/* #define SEM_NSEMS_MAX unspecified */
-
-/* The maximum value a semaphore may have. */
-#undef SEM_VALUE_MAX
-#define SEM_VALUE_MAX 1147483648
-
-/* Maximum number of queued signals that a process may send and have pending
- at the receiver(s) at any time. */
-#undef SIGQUEUE_MAX
-#define SIGQUEUE_MAX 32
-
-/* The maximum number of replenishment operations that may be simultaneously
- pending for a particular sporadic server scheduler. Not implemented. */
-#undef SS_REPL_MAX
-/* #define SS_REPL_MAX >= _POSIX_SS_REPL_MAX */
-
-/* Number of streams that one process can have open at one time. */
-#undef STREAM_MAX
-#define STREAM_MAX 20
-
-/* Maximum number of nested symbolic links. */
-#undef SYMLOOP_MAX
-#define SYMLOOP_MAX 10
-
-/* Maximum number of timer expiration overruns. */
-#undef TIMER_MAX
-#define TIMER_MAX 32
-
-/* Maximum length of the trace event name. Not implemented. */
-#undef TRACE_EVENT_NAME_MAX
-/* #define TRACE_EVENT_NAME_MAX >= _POSIX_TRACE_EVENT_NAME_MAX */
-
-/* Maximum length of the trace generation version string or of the trace
- stream name. Not implemented. */
-#undef TRACE_NAME_MAX
-/* #define TRACE_NAME_MAX >= _POSIX_TRACE_NAME_MAX */
-
-/* Maximum number of trace streams that may simultaneously exist in the
- system. Not implemented. */
-#undef TRACE_SYS_MAX
-/* #define TRACE_SYS_MAX >= _POSIX_TRACE_SYS_MAX */
-
-/* Maximum number of user trace event type identifiers that may simultaneously
- exist in a traced process, including the predefined user trace event
- POSIX_TRACE_UNNAMED_USER_EVENT. Not implemented. */
-#undef TRACE_USER_EVENT_MAX
-/* #define TRACE_USER_EVENT_MAX >= _POSIX_TRACE_USER_EVENT_MAX */
-
-/* Maximum number of characters in a tty name. */
-#undef TTY_NAME_MAX
-#define TTY_NAME_MAX 32
-
-/* Maximum number of bytes supported for the name of a timezone (not of the TZ variable). Not implemented. */
-#undef TZNAME_MAX
-/* #define TZNAME_MAX >= _POSIX_TZNAME_MAX */
-
-
-/* Pathname Variable Values */
-
-/* Minimum bits needed to represent the maximum size of a regular file. */
-#undef FILESIZEBITS
-#define FILESIZEBITS 64
-
-/* Maximum number of hardlinks to a file. */
-#undef LINK_MAX
-#define LINK_MAX 1024
-
-/* Maximum number of bytes in a terminal canonical input line. */
-#undef MAX_CANON
-#define MAX_CANON 255
-
-/* Minimum number of bytes available in a terminal input queue. */
-#undef MAX_INPUT
-#define MAX_INPUT 255
-
-/* Maximum length of a path component. */
-#undef NAME_MAX
-#define NAME_MAX 255
-
-/* Maximum length of a path given to API functions including trailing NUL.
- Deliberately set to the same default value as on Linux. Internal paths
- may be longer. */
-/* Keep in sync with __PATHNAME_MAX__ in cygwin/config.h */
-#undef PATH_MAX
-#define PATH_MAX 4096
-
-/* # of bytes in a pipe buf. This is the max # of bytes which can be
- written to a pipe in one atomic operation. */
-#undef PIPE_BUF
-#define PIPE_BUF 4096
-
-/* Minimum number of bytes of storage actually allocated for any portion
- of a file. Not implemented. */
-#undef POSIX_ALLOC_SIZE_MIN
-/* #define POSIX_ALLOC_SIZE_MIN unspecifed */
-
-/* Recommended increment for file transfer sizes between the
- {POSIX_REC_MIN_XFER_SIZE} and {POSIX_REC_MAX_XFER_SIZE} values.
- Not implemented. */
-#undef POSIX_REC_INCR_XFER_SIZE
-/* #define POSIX_REC_INCR_XFER_SIZE unspecifed */
-
-/* Maximum recommended file transfer size. Not implemented. */
-#undef POSIX_REC_MAX_XFER_SIZE
-/* #define POSIX_REC_MAX_XFER_SIZE unspecifed */
-
-/* Minimum recommended file transfer size. Not implemented. */
-#undef POSIX_REC_MIN_XFER_SIZE
-/* #define POSIX_REC_MIN_XFER_SIZE unspecifed */
-
-/* Recommended file transfer buffer alignment. Not implemented. */
-#undef POSIX_REC_XFER_ALIGN
-/* #define POSIX_REC_XFER_ALIGN unspecifed */
-
-/* Maximum number of bytes in a symbolic link. */
-#undef SYMLINK_MAX
-#define SYMLINK_MAX (PATH_MAX - 1)
-
-
-/* Runtime Increasable Values */
-
-/* Maximum obase values allowed by the bc utility. */
-#undef BC_BASE_MAX
-#define BC_BASE_MAX 99
-
-/* Maximum number of elements permitted in an array by the bc utility. */
-#undef BC_DIM_MAX
-#define BC_DIM_MAX 2048
-
-/* Maximum scale value allowed by the bc utility. */
-#undef BC_SCALE_MAX
-#define BC_SCALE_MAX 99
-
-/* Maximum length of a string constant accepted by the bc utility. */
-#undef BC_STRING_MAX
-#define BC_STRING_MAX 1000
-
-/* Maximum number of bytes in a character class name. Not implemented. */
-#undef CHARCLASS_NAME_MAX
-/* #define CHARCLASS_NAME_MAX >= _POSIX2_CHARCLASS_NAME_MAX */
-
-/* Maximum number of weights that can be assigned to an entry of the
- LC_COLLATE order keyword in the locale definition file. */
-/* FIXME: We don't support this at all right now, so this value is
- misleading at best. It's also lower than _POSIX2_COLL_WEIGHTS_MAX
- which is not good. So, for now we deliberately not define it even
- though it was defined in the former syslimits.h file. */
-#undef COLL_WEIGHTS_MAX
-/* #define COLL_WEIGHTS_MAX >= _POSIX2_COLL_WEIGHTS_MAX */
-
-/* Maximum number of expressions that can be nested within parentheses
- by the expr utility. */
-#undef EXPR_NEST_MAX
-#define EXPR_NEST_MAX 32
-
-/* Maximum bytes of a text utility's input line */
-#undef LINE_MAX
-#define LINE_MAX 2048
-
-/* Max num groups for a user, value taken from NT documentation */
-/* Must match <sys/param.h> NGROUPS */
-#undef NGROUPS_MAX
-#define NGROUPS_MAX 16
-
-/* Maximum number of repeated occurrences of a regular expression when
- using the interval notation \{m,n\} */
-#undef RE_DUP_MAX
-#define RE_DUP_MAX 255
-
-
-/* POSIX values */
-/* These should never vary from one system type to another */
-/* They represent the minimum values that POSIX systems must support.
- POSIX-conforming apps must not require larger values. */
-
-/* Maximum Values */
-
-#define _POSIX_CLOCKRES_MIN 20000000
-
-/* Minimum Values */
-
-#define _POSIX_AIO_LISTIO_MAX 2
-#define _POSIX_AIO_MAX 1
-#define _POSIX_ARG_MAX 4096
-#define _POSIX_CHILD_MAX 25
-#define _POSIX_DELAYTIMER_MAX 32
-#define _POSIX_HOST_NAME_MAX 255
-#define _POSIX_LINK_MAX 8
-#define _POSIX_LOGIN_NAME_MAX 9
-#define _POSIX_MAX_CANON 255
-#define _POSIX_MAX_INPUT 255
-#define _POSIX_MQ_OPEN_MAX 8
-#define _POSIX_MQ_PRIO_MAX 32
-#define _POSIX_NAME_MAX 14
-#define _POSIX_NGROUPS_MAX 8
-#define _POSIX_OPEN_MAX 20
-#define _POSIX_PATH_MAX 256
-#define _POSIX_PIPE_BUF 512
-#define _POSIX_RE_DUP_MAX 255
-#define _POSIX_RTSIG_MAX 8
-#define _POSIX_SEM_NSEMS_MAX 256
-#define _POSIX_SEM_VALUE_MAX 32767
-#define _POSIX_SIGQUEUE_MAX 32
-#define _POSIX_SSIZE_MAX 32767
-#define _POSIX_STREAM_MAX 8
-#define _POSIX_SS_REPL_MAX 4
-#define _POSIX_SYMLINK_MAX 255
-#define _POSIX_SYMLOOP_MAX 8
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-#define _POSIX_THREAD_KEYS_MAX 128
-#define _POSIX_THREAD_THREADS_MAX 64
-#define _POSIX_TIMER_MAX 32
-#define _POSIX_TRACE_EVENT_NAME_MAX 30
-#define _POSIX_TRACE_NAME_MAX 8
-#define _POSIX_TRACE_SYS_MAX 8
-#define _POSIX_TRACE_USER_EVENT_MAX 32
-#define _POSIX_TTY_NAME_MAX 9
-#define _POSIX_TZNAME_MAX 6
-
-#define _POSIX2_BC_BASE_MAX 99
-#define _POSIX2_BC_DIM_MAX 2048
-#define _POSIX2_BC_SCALE_MAX 99
-#define _POSIX2_BC_STRING_MAX 1000
-#define _POSIX2_COLL_WEIGHTS_MAX 2
-#define _POSIX2_EXPR_NEST_MAX 32
-#define _POSIX2_LINE_MAX 2048
-#define _POSIX2_RE_DUP_MAX 255
-
-#define _XOPEN_IOV_MAX 16
-#define _XOPEN_NAME_MAX 255
-#define _XOPEN_PATH_MAX 1024
-
-/* Other Invariant Values */
-
-#define NL_ARGMAX 9
-#define NL_LANGMAX 14
-#define NL_MSGMAX 32767
-#define NL_NMAX INT_MAX
-#define NL_SETMAX 255
-#define NL_TEXTMAX _POSIX2_LINE_MAX
-
-/* Default process priority. */
-#undef NZERO
-#define NZERO 20
-
-#endif /* _MACH_MACHLIMITS_H_ */
-#endif /* _LIMITS_H___ */
diff --git a/winsup/cygwin/include/machine/stdlib.h b/winsup/cygwin/include/machine/stdlib.h
deleted file mode 100644
index 2d1539e..0000000
--- a/winsup/cygwin/include/machine/stdlib.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* machine/stdlib.h
-
- Copyright 2005 Red Hat, Inc.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#ifndef _MACHSTDLIB_H_
-#define _MACHSTDLIB_H_
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-char *mkdtemp (char *);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _MACHSTDLIB_H_ */
diff --git a/winsup/cygwin/include/mapi.h b/winsup/cygwin/include/mapi.h
deleted file mode 100644
index e2d47e2..0000000
--- a/winsup/cygwin/include/mapi.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* mapi.h
-
- Copyright 1997, 1998, 1999, 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _MAPI_H
-#define _MAPI_H
-
-/* Currently this doesn't include all the definitions. It does cover
- the parts of Simple MAPI required to send mail. */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
- /* FIXME: should this be elsewhere? */
-typedef unsigned long FLAGS;
-
- /* FIXME: should this be elsewhere? */
-#define SUCCESS_SUCCESS 0
-
- /* FIXME: should this be elsewhere? */
-typedef unsigned long LHANDLE, FAR *LPLHANDLE;
-
-
-#define MAPI_E_AMBIGUOUS_RECIPIENT 0x15
-#define MAPI_E_ATTACHMENT_NOT_FOUND 0xb
-#define MAPI_E_ATTACHMENT_OPEN_FAILURE 0xc
-#define MAPI_E_BAD_RECIPTYPE 0xf
-#define MAPI_E_FAILURE 0x2
-#define MAPI_E_INSUFFICIENT_MEMORY 0x5
-#define MAPI_E_INVALID_RECIPS 0x19
-#define MAPI_E_LOGIN_FAILURE 0x3
-#define MAPI_E_TEXT_TOO_LARGE 0x12
-#define MAPI_E_TOO_MANY_FILES 0x9
-#define MAPI_E_TOO_MANY_RECIPIENTS 0xa
-#define MAPI_E_UNKNOWN_RECIPIENT 0xe
-#define MAPI_E_USER_ABORT 0x1
-#define MAPI_E_TEXT_TOO_LARGE 0x12
-#define MAPI_DIALOG 0x8
-#define MAPI_NEW_SESSION 0x2
-#define MAPI_LOGON_UI 0x1
-#define MAPI_RECEIPT_REQUESTED 0x2
-#define MAPI_SENT 0x4
-#define MAPI_UNREAD 0x1
-#define MAPI_OLE 0x1
-#define MAPI_OLE_STATIC 0x2
-
-#define MAPI_ORIG 0
-#define MAPI_TO 1
-#define MAPI_CC 2
-#define MAPI_BCC 3
-
-typedef struct
-{
- ULONG ulReserved;
- ULONG flFlags;
- ULONG nPosition;
- LPTSTR lpszPathName;
- LPTSTR lpszFileName;
- LPVOID lpFileType;
-} MapiFileDesc, FAR *lpMapiFileDesc;
-
-typedef struct
-{
- ULONG ulReserved;
- ULONG ulRecipClass;
- LPTSTR lpszName;
- LPTSTR lpszAddress;
- ULONG ulEIDSize;
- LPVOID lpEntryID;
-} MapiRecipDesc, FAR *lpMapiRecipDesc;
-
-typedef struct
-{
- ULONG ulReserved;
- LPTSTR lpszSubject;
- LPTSTR lpszNoteText;
- LPTSTR lpszMessageType;
- LPTSTR lpszDateReceived;
- LPTSTR lpszConversationID;
- FLAGS flFlags;
- lpMapiRecipDesc lpOriginator;
- ULONG nRecipCount;
- lpMapiRecipDesc lpRecips;
- ULONG nFileCount;
- lpMapiFileDesc lpFiles;
-} MapiMessage, FAR *lpMapiMessage;
-
-ULONG FAR PASCAL MAPISendMail (LHANDLE, ULONG, lpMapiMessage, FLAGS, ULONG);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _MAPI_H */
diff --git a/winsup/cygwin/include/memory.h b/winsup/cygwin/include/memory.h
deleted file mode 100644
index 2e16766..0000000
--- a/winsup/cygwin/include/memory.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* memory.h
-
- Copyright 1998, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _MEMORY_H
-#define _MEMORY_H
-
-/* This allows more things to compile. */
-#include <string.h>
-
-#endif /* _MEMORY_H */
diff --git a/winsup/cygwin/include/mntent.h b/winsup/cygwin/include/mntent.h
deleted file mode 100644
index 5fa4ff9..0000000
--- a/winsup/cygwin/include/mntent.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* mntent.h
-
- Copyright 1996, 1998, 1999, 2000, 2001, 2006 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _MNTENT_H
-#define _MNTENT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct mntent
-{
- char *mnt_fsname;
- char *mnt_dir;
- char *mnt_type;
- char *mnt_opts;
- int mnt_freq;
- int mnt_passno;
-};
-
-#ifndef _NOMNTENT_FUNCS
-#include <stdio.h>
-FILE *setmntent (const char *__filep, const char *__type);
-struct mntent *getmntent (FILE *__filep);
-int addmntent (FILE *__filep, const struct mntent *__mnt);
-int endmntent (FILE *__filep);
-char *hasmntopt (const struct mntent *__mnt, const char *__opt);
-#endif
-
-/* This next file doesn't exist, it is in the registry,
- however applications need the define to pass to
- the above calls.
-*/
-#ifndef MOUNTED
-#define MOUNTED "/etc/mtab"
-#endif
-#ifdef __cplusplus
-};
-#endif
-
-#endif /* _MNTENT_H */
diff --git a/winsup/cygwin/include/mqueue.h b/winsup/cygwin/include/mqueue.h
deleted file mode 100644
index 59c32db..0000000
--- a/winsup/cygwin/include/mqueue.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* mqueue.h: POSIX message queue interface
-
- Copyright 2007 Red Hat, Inc.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include <time.h>
-#include <sys/types.h>
-#include <sys/signal.h>
-#include <sys/cdefs.h>
-
-#ifndef _MQUEUE_H
-#define _MQUEUE_H
-
-__BEGIN_DECLS
-
-typedef intptr_t mqd_t;
-
-struct mq_attr {
- long mq_flags; /* Message queue flags */
- long mq_maxmsg; /* Max number of messages in queue */
- long mq_msgsize; /* Max message size */
- long mq_curmsgs; /* Current number of messages in queue */
-};
-
-int mq_close (mqd_t);
-int mq_getattr (mqd_t, struct mq_attr *);
-int mq_notify (mqd_t, const struct sigevent *);
-mqd_t mq_open (const char *, int, ...);
-ssize_t mq_receive (mqd_t, char *, size_t, unsigned int *);
-int mq_send (mqd_t, const char *, size_t, unsigned int);
-int mq_setattr (mqd_t, const struct mq_attr *, struct mq_attr *);
-ssize_t mq_timedreceive (mqd_t, char *, size_t, unsigned int *,
- const struct timespec *);
-int mq_timedsend (mqd_t, const char *, size_t, unsigned int,
- const struct timespec *);
-int mq_unlink (const char *name);
-
-__END_DECLS
-
-#endif /* _MQUEUE_H */
diff --git a/winsup/cygwin/include/net/if.h b/winsup/cygwin/include/net/if.h
deleted file mode 100644
index aff3b88..0000000
--- a/winsup/cygwin/include/net/if.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* net/if.h
-
- Copyright 1998, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _NET_IF_H
-#define _NET_IF_H
-
-#include <cygwin/if.h>
-
-#endif /* _NET_IF_H */
diff --git a/winsup/cygwin/include/netdb.h b/winsup/cygwin/include/netdb.h
deleted file mode 100644
index ffa2f87..0000000
--- a/winsup/cygwin/include/netdb.h
+++ /dev/null
@@ -1,233 +0,0 @@
-/* Original linux netdb.h merged with winsock.h types */
-
-/*-
- * Copyright (c) 1980, 1983, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)netdb.h 8.1 (Berkeley) 6/2/93
- * netdb.h,v 1.1.1.1 1995/02/18 05:34:07 hjl Exp
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- * -
- * --Copyright--
- */
-
-#ifndef _NETDB_H_
-#define _NETDB_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-#include <cygwin/socket.h>
-
-/*
- * Structures returned by network data base library. All addresses are
- * supplied in host order, and returned in network order (suitable for
- * use in system calls).
- */
-
- /* Different from the linux versions - note the shorts.. */
-struct hostent {
- const char *h_name; /* official name of host */
- char **h_aliases; /* alias list */
- short h_addrtype; /* host address type */
- short h_length; /* length of address */
- char **h_addr_list; /* list of addresses from name server */
-#define h_addr h_addr_list[0] /* address, for backward compatiblity */
-};
-
-/*
- * Assumption here is that a network number
- * fits in an unsigned long -- probably a poor one.
- */
-
-struct netent {
- char *n_name; /* official name of net */
- char **n_aliases; /* alias list */
- short n_addrtype; /* net address type */
- uint32_t n_net; /* network # */
-};
-
-struct servent {
- char *s_name; /* official service name */
- char **s_aliases; /* alias list */
- short s_port; /* port # */
- char *s_proto; /* protocol to use */
-};
-
-struct protoent
-{
- char *p_name; /* official protocol name */
- char **p_aliases; /* alias list */
- short p_proto; /* protocol # */
-};
-
-struct rpcent {
- char *r_name; /* name of server for this rpc program */
- char **r_aliases; /* alias list */
- int r_number; /* rpc program number */
-};
-
-struct addrinfo {
- int ai_flags; /* input flags */
- int ai_family; /* address family of socket */
- int ai_socktype; /* socket type */
- int ai_protocol; /* ai_protocol */
- socklen_t ai_addrlen; /* length of socket address */
- char *ai_canonname; /* canonical name of service location */
- struct sockaddr *ai_addr; /* socket address of socket */
- struct addrinfo *ai_next; /* pointer to next in list */
-};
-
-/*
- * Error return codes from gethostbyname() and gethostbyaddr()
- * (left in extern int h_errno).
- */
-
-#ifdef __INSIDE_CYGWIN_NET__
-extern int h_errno;
-#else
-extern __declspec(dllimport) int h_errno;
-#endif
-
-#define NETDB_INTERNAL -1 /* see errno */
-#define NETDB_SUCCESS 0 /* no problem */
-#define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */
-#define TRY_AGAIN 2 /* Non-Authoritive Host not found, or SERVERFAIL */
-#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
-#define NO_DATA 4 /* Valid name, no data record of requested type */
-#define NO_ADDRESS NO_DATA /* no address, look for MX record */
-
-#define AI_PASSIVE 1
-#define AI_CANONNAME 2
-#define AI_NUMERICHOST 4
-#define AI_NUMERICSERV 8
-#define AI_ALL 256
-#define AI_ADDRCONFIG 1024 /* Only available on Vista. Unchangable default
- on older systems. */
-#define AI_V4MAPPED 2048
-
-#define NI_NOFQDN 1
-#define NI_NUMERICHOST 2
-#define NI_NAMEREQD 4
-#define NI_NUMERICSERV 8
-#define NI_DGRAM 16
-
-#define NI_MAXHOST 1025
-#define NI_MAXSERV 32
-
-#define EAI_ADDRFAMILY 1
-#define EAI_AGAIN 2
-#define EAI_BADFLAGS 3
-#define EAI_FAIL 4
-#define EAI_FAMILY 5
-#define EAI_MEMORY 6
-#define EAI_NODATA 7
-#define EAI_NONAME 8
-#define EAI_SERVICE 9
-#define EAI_SOCKTYPE 10
-#define EAI_SYSTEM 11
-#define EAI_BADHINTS 12
-#define EAI_PROTOCOL 13
-#define EAI_OVERFLOW 14
-
-#ifndef __INSIDE_CYGWIN_NET__
-void endhostent (void);
-void endnetent (void);
-void endprotoent (void);
-void endservent (void);
-void endrpcent (void);
-struct hostent *gethostbyaddr (const char *, int, int);
-struct hostent *gethostbyname (const char *);
-struct hostent *gethostent (void);
-struct netent *getnetbyaddr (long, int); /* u_long? */
-struct netent *getnetbyname (const char *);
-struct netent *getnetent (void);
-struct protoent *getprotobyname (const char *);
-struct protoent *getprotobynumber (int);
-struct protoent *getprotoent (void);
-struct servent *getservbyname (const char *, const char *);
-struct servent *getservbyport (int, const char *);
-struct servent *getservent (void);
-struct rpcent *getrpcent (void);
-struct rpcent *getrpcbyname (const char *);
-struct rpcent *getrpcbynumber (int);
-const char *hstrerror (int);
-void herror (const char *);
-void sethostent (int);
-void setnetent (int);
-void setprotoent (int);
-void setservent (int);
-void setrpcent (int);
-void freeaddrinfo (struct addrinfo *);
-const char *gai_strerror (int);
-int getaddrinfo (const char *, const char *,
- const struct addrinfo *, struct addrinfo **);
-int getnameinfo (const struct sockaddr *, socklen_t, char *,
- socklen_t, char *, socklen_t, int);
-
-int rcmd (char **, uint16_t, const char *, const char *,
- const char *, int *);
-int rcmd_af (char **, uint16_t, const char *, const char *,
- const char *, int *, int);
-int rexec (char **, uint16_t rport, char *, char *, char *, int *);
-int rresvport (int *);
-int rresvport_af (int *, int);
-int iruserok (unsigned long, int, const char *, const char *);
-int iruserok_sa (const void *, int, int, const char *,
- const char *);
-int ruserok (const char *, int, const char *, const char *);
-#endif
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif /* !_NETDB_H_ */
-
diff --git a/winsup/cygwin/include/netinet/in.h b/winsup/cygwin/include/netinet/in.h
deleted file mode 100644
index 027ac2c..0000000
--- a/winsup/cygwin/include/netinet/in.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* netinet/in.h
-
- Copyright 1998, 2001, 2006 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _NETINET_IN_H
-#define _NETINET_IN_H
-
-#include <cygwin/in.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-extern int bindresvport (int, struct sockaddr_in *);
-extern int bindresvport_sa (int, struct sockaddr *);
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif /* _NETINET_IN_H */
diff --git a/winsup/cygwin/include/netinet/in_systm.h b/winsup/cygwin/include/netinet/in_systm.h
deleted file mode 100644
index 17b5feb..0000000
--- a/winsup/cygwin/include/netinet/in_systm.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* netinet/in_systm.h
-
- Copyright 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _NETINET_IN_SYSTM_H
-#define _NETINET_IN_SYSTM_H
-
-#include <cygwin/in_systm.h>
-
-#endif /* _NETINET_IN_SYSTM_H */
diff --git a/winsup/cygwin/include/netinet/ip.h b/winsup/cygwin/include/netinet/ip.h
deleted file mode 100644
index 653f6db..0000000
--- a/winsup/cygwin/include/netinet/ip.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip.h 8.2 (Berkeley) 6/1/94
- * $FreeBSD: src/sys/netinet/ip.h,v 1.17 1999/12/22 19:13:20 shin Exp $
- */
-
-#ifndef _NETINET_IP_H
-#define _NETINET_IP_H
-
-#include <netinet/in_systm.h>
-#include <netinet/in.h>
-
-/* Added by Wu Yongwei */
-#ifndef LITTLE_ENDIAN
-#define LITTLE_ENDIAN 1234
-#define BIG_ENDIAN 4321
-#endif
-#ifndef BYTE_ORDER
-#define BYTE_ORDER LITTLE_ENDIAN
-#endif
-
-/*
- * Definitions for internet protocol version 4.
- * Per RFC 791, September 1981.
- */
-#define IPVERSION 4
-
-/*
- * Structure of an internet header, naked of options.
- */
-struct ip {
-#ifdef _IP_VHL
- u_char ip_vhl; /* version << 4 | header length >> 2 */
-#else
-#if BYTE_ORDER == LITTLE_ENDIAN
- u_int ip_hl:4, /* header length */
- ip_v:4; /* version */
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
- u_int ip_v:4, /* version */
- ip_hl:4; /* header length */
-#endif
-#endif /* not _IP_VHL */
- u_char ip_tos; /* type of service */
- u_short ip_len; /* total length */
- u_short ip_id; /* identification */
- u_short ip_off; /* fragment offset field */
-#define IP_RF 0x8000 /* reserved fragment flag */
-#define IP_DF 0x4000 /* dont fragment flag */
-#define IP_MF 0x2000 /* more fragments flag */
-#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
- u_char ip_ttl; /* time to live */
- u_char ip_p; /* protocol */
- u_short ip_sum; /* checksum */
- struct in_addr ip_src,ip_dst; /* source and dest address */
-};
-
-#ifdef _IP_VHL
-#define IP_MAKE_VHL(v, hl) ((v) << 4 | (hl))
-#define IP_VHL_HL(vhl) ((vhl) & 0x0f)
-#define IP_VHL_V(vhl) ((vhl) >> 4)
-#define IP_VHL_BORING 0x45
-#endif
-
-#define IP_MAXPACKET 65535 /* maximum packet size */
-
-/*
- * Definitions for IP type of service (ip_tos)
- */
-#ifndef IPTOS_LOWDELAY
-#define IPTOS_LOWDELAY 0x10
-#define IPTOS_THROUGHPUT 0x08
-#define IPTOS_RELIABILITY 0x04
-#endif
-#define IPTOS_MINCOST 0x02
-/* ECN bits proposed by Sally Floyd */
-#define IPTOS_CE 0x01 /* congestion experienced */
-#define IPTOS_ECT 0x02 /* ECN-capable transport */
-
-
-/*
- * Definitions for IP precedence (also in ip_tos) (hopefully unused)
- */
-#define IPTOS_PREC_NETCONTROL 0xe0
-#define IPTOS_PREC_INTERNETCONTROL 0xc0
-#define IPTOS_PREC_CRITIC_ECP 0xa0
-#define IPTOS_PREC_FLASHOVERRIDE 0x80
-#define IPTOS_PREC_FLASH 0x60
-#define IPTOS_PREC_IMMEDIATE 0x40
-#define IPTOS_PREC_PRIORITY 0x20
-#define IPTOS_PREC_ROUTINE 0x00
-
-/*
- * Definitions for options.
- */
-#define IPOPT_COPIED(o) ((o)&0x80)
-#define IPOPT_CLASS(o) ((o)&0x60)
-#define IPOPT_NUMBER(o) ((o)&0x1f)
-
-#define IPOPT_CONTROL 0x00
-#define IPOPT_RESERVED1 0x20
-#define IPOPT_DEBMEAS 0x40
-#define IPOPT_RESERVED2 0x60
-
-#define IPOPT_EOL 0 /* end of option list */
-#define IPOPT_NOP 1 /* no operation */
-
-#define IPOPT_RR 7 /* record packet route */
-#define IPOPT_TS 68 /* timestamp */
-#define IPOPT_SECURITY 130 /* provide s,c,h,tcc */
-#define IPOPT_LSRR 131 /* loose source route */
-#define IPOPT_SATID 136 /* satnet id */
-#define IPOPT_SSRR 137 /* strict source route */
-#define IPOPT_RA 148 /* router alert */
-
-/*
- * Offsets to fields in options other than EOL and NOP.
- */
-#define IPOPT_OPTVAL 0 /* option ID */
-#define IPOPT_OLEN 1 /* option length */
-#define IPOPT_OFFSET 2 /* offset within option */
-#define IPOPT_MINOFF 4 /* min value of above */
-
-/*
- * Time stamp option structure.
- */
-struct ip_timestamp {
- u_char ipt_code; /* IPOPT_TS */
- u_char ipt_len; /* size of structure (variable) */
- u_char ipt_ptr; /* index of current entry */
-#if BYTE_ORDER == LITTLE_ENDIAN
- u_int ipt_flg:4, /* flags, see below */
- ipt_oflw:4; /* overflow counter */
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
- u_int ipt_oflw:4, /* overflow counter */
- ipt_flg:4; /* flags, see below */
-#endif
- union ipt_timestamp {
- n_long ipt_time[1];
- struct ipt_ta {
- struct in_addr ipt_addr;
- n_long ipt_time;
- } ipt_ta[1];
- } ipt_timestamp;
-};
-
-/* flag bits for ipt_flg */
-#define IPOPT_TS_TSONLY 0 /* timestamps only */
-#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */
-#define IPOPT_TS_PRESPEC 3 /* specified modules only */
-
-/* bits for security (not byte swapped) */
-#define IPOPT_SECUR_UNCLASS 0x0000
-#define IPOPT_SECUR_CONFID 0xf135
-#define IPOPT_SECUR_EFTO 0x789a
-#define IPOPT_SECUR_MMMM 0xbc4d
-#define IPOPT_SECUR_RESTR 0xaf13
-#define IPOPT_SECUR_SECRET 0xd788
-#define IPOPT_SECUR_TOPSECRET 0x6bc5
-
-/*
- * Internet implementation parameters.
- */
-#define MAXTTL 255 /* maximum time to live (seconds) */
-#define IPDEFTTL 64 /* default ttl, from RFC 1340 */
-#define IPFRAGTTL 60 /* time to live for frags, slowhz */
-#define IPTTLDEC 1 /* subtracted when forwarding */
-
-#define IP_MSS 576 /* default maximum segment size */
-
-#endif
diff --git a/winsup/cygwin/include/netinet/ip_icmp.h b/winsup/cygwin/include/netinet/ip_icmp.h
deleted file mode 100644
index 6a1be05..0000000
--- a/winsup/cygwin/include/netinet/ip_icmp.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* netinet/ip_icmp.h
-
- Copyright 1998, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _NETINET_IP_ICMP_H
-#define _NETINET_IP_ICMP_H
-
-#include <cygwin/icmp.h>
-
-#endif /* _NETINET_IP_ICMP_H */
diff --git a/winsup/cygwin/include/netinet/tcp.h b/winsup/cygwin/include/netinet/tcp.h
deleted file mode 100644
index 305527d..0000000
--- a/winsup/cygwin/include/netinet/tcp.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netinet/tcp.h,v 1.13 2000/01/09 19:17:25 shin Exp $
- */
-
-#ifndef _NETINET_TCP_H
-#define _NETINET_TCP_H
-
-/* Added by Wu Yongwei */
-#ifndef LITTLE_ENDIAN
-#define LITTLE_ENDIAN 1234
-#define BIG_ENDIAN 4321
-#endif
-#ifndef BYTE_ORDER
-#define BYTE_ORDER LITTLE_ENDIAN
-#endif
-
-typedef u_int32_t tcp_seq;
-typedef u_int32_t tcp_cc; /* connection count per rfc1644 */
-
-#define tcp6_seq tcp_seq /* for KAME src sync over BSD*'s */
-#define tcp6hdr tcphdr /* for KAME src sync over BSD*'s */
-
-/*
- * TCP header.
- * Per RFC 793, September, 1981.
- */
-struct tcphdr {
- u_short th_sport; /* source port */
- u_short th_dport; /* destination port */
- tcp_seq th_seq; /* sequence number */
- tcp_seq th_ack; /* acknowledgement number */
-#if BYTE_ORDER == LITTLE_ENDIAN
- u_int th_x2:4, /* (unused) */
- th_off:4; /* data offset */
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
- u_int th_off:4, /* data offset */
- th_x2:4; /* (unused) */
-#endif
- u_char th_flags;
-#define TH_FIN 0x01
-#define TH_SYN 0x02
-#define TH_RST 0x04
-#define TH_PUSH 0x08
-#define TH_ACK 0x10
-#define TH_URG 0x20
-#define TH_FLAGS (TH_FIN|TH_SYN|TH_RST|TH_ACK|TH_URG)
-
- u_short th_win; /* window */
- u_short th_sum; /* checksum */
- u_short th_urp; /* urgent pointer */
-};
-
-#define TCPOPT_EOL 0
-#define TCPOPT_NOP 1
-#define TCPOPT_MAXSEG 2
-#define TCPOLEN_MAXSEG 4
-#define TCPOPT_WINDOW 3
-#define TCPOLEN_WINDOW 3
-#define TCPOPT_SACK_PERMITTED 4 /* Experimental */
-#define TCPOLEN_SACK_PERMITTED 2
-#define TCPOPT_SACK 5 /* Experimental */
-#define TCPOPT_TIMESTAMP 8
-#define TCPOLEN_TIMESTAMP 10
-#define TCPOLEN_TSTAMP_APPA (TCPOLEN_TIMESTAMP+2) /* appendix A */
-#define TCPOPT_TSTAMP_HDR \
- (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP)
-
-#define TCPOPT_CC 11 /* CC options: RFC-1644 */
-#define TCPOPT_CCNEW 12
-#define TCPOPT_CCECHO 13
-#define TCPOLEN_CC 6
-#define TCPOLEN_CC_APPA (TCPOLEN_CC+2)
-#define TCPOPT_CC_HDR(ccopt) \
- (TCPOPT_NOP<<24|TCPOPT_NOP<<16|(ccopt)<<8|TCPOLEN_CC)
-
-/*
- * Default maximum segment size for TCP.
- * With an IP MSS of 576, this is 536,
- * but 512 is probably more convenient.
- * This should be defined as MIN(512, IP_MSS - sizeof (struct tcpiphdr)).
- */
-#define TCP_MSS 512
-
-/*
- * Default maximum segment size for TCP6.
- * With an IP6 MSS of 1280, this is 1220,
- * but 1024 is probably more convenient. (xxx kazu in doubt)
- * This should be defined as MIN(1024, IP6_MSS - sizeof (struct tcpip6hdr))
- */
-#define TCP6_MSS 1024
-
-#define TCP_MAXWIN 65535 /* largest value for (unscaled) window */
-#define TTCP_CLIENT_SND_WND 4096 /* dflt send window for T/TCP client */
-
-#define TCP_MAX_WINSHIFT 14 /* maximum window shift */
-
-#define TCP_MAXHLEN (0xf<<2) /* max length of header in bytes */
-#define TCP_MAXOLEN (TCP_MAXHLEN - sizeof(struct tcphdr))
- /* max space left for options */
-
-/*
- * User-settable options (used with setsockopt).
- */
-#ifndef TCP_NODELAY
-#define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */
-#define TCP_MAXSEG 0x02 /* set maximum segment size */
-#endif
-#define TCP_NOPUSH 0x04 /* don't push last block of write */
-#define TCP_NOOPT 0x08 /* don't use TCP options */
-
-#endif
diff --git a/winsup/cygwin/include/netinet/udp.h b/winsup/cygwin/include/netinet/udp.h
deleted file mode 100644
index 6193272..0000000
--- a/winsup/cygwin/include/netinet/udp.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)udp.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netinet/udp.h,v 1.7 1999/08/28 00:49:34 peter Exp $
- */
-
-#ifndef _NETINET_UDP_H
-#define _NETINET_UDP_H
-
-/*
- * Udp protocol header.
- * Per RFC 768, September, 1981.
- */
-struct udphdr {
- u_short uh_sport; /* source port */
- u_short uh_dport; /* destination port */
- u_short uh_ulen; /* udp length */
- u_short uh_sum; /* udp checksum */
-};
-
-#endif
diff --git a/winsup/cygwin/include/paths.h b/winsup/cygwin/include/paths.h
deleted file mode 100644
index 11876cb..0000000
--- a/winsup/cygwin/include/paths.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* paths.h
-
- Copyright 2001, 2002, 2003 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _PATHS_H_
-#define _PATHS_H_
-
-#define _PATH_BSHELL "/bin/sh"
-#define _PATH_CSHELL "/bin/csh"
-#define _PATH_DEFPATH "/bin"
-#define _PATH_DEV "/dev/"
-#define _PATH_DEVNULL "/dev/null"
-#define _PATH_LASTLOG "/var/log/lastlog"
-#define _PATH_MAN "/usr/share/man"
-#define _PATH_MEM "/dev/mem"
-#define _PATH_STDPATH "/bin:/usr/sbin:/sbin"
-#define _PATH_TMP "/tmp/"
-#define _PATH_TTY "/dev/tty"
-#define _PATH_UTMP "/var/run/utmp"
-#define _PATH_VARRUN "/var/run/"
-#define _PATH_VI "/bin/vi"
-#define _PATH_WTMP "/var/log/wtmp"
-
-#endif /* _PATHS_H_ */
diff --git a/winsup/cygwin/include/poll.h b/winsup/cygwin/include/poll.h
deleted file mode 100644
index a836b2a..0000000
--- a/winsup/cygwin/include/poll.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* poll.h
-
- Copyright 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <sys/poll.h>
diff --git a/winsup/cygwin/include/pthread.h b/winsup/cygwin/include/pthread.h
deleted file mode 100644
index 73759dd..0000000
--- a/winsup/cygwin/include/pthread.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/* pthread.h: POSIX pthread interface
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2006,
- 2007 Red Hat, Inc.
-
- Written by Marco Fuykschot <marco@ddi.nl>
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include <sys/types.h>
-#include <signal.h>
-#include <sched.h>
-
-#ifndef _PTHREAD_H
-#define _PTHREAD_H
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-
-/* Defines. (These are correctly defined here as per
- http://www.opengroup.org/onlinepubs/7908799/xsh/pthread.h.html */
-
-/* FIXME: this should allocate a new cond variable, and return the value that
- would normally be written to the passed parameter of pthread_cond_init(lvalue, NULL); */
-/* #define PTHREAD_COND_INITIALIZER 0 */
-
-/* the default : joinable */
-
-#define PTHREAD_CANCEL_ASYNCHRONOUS 1
-/* defaults are enable, deferred */
-#define PTHREAD_CANCEL_ENABLE 0
-#define PTHREAD_CANCEL_DEFERRED 0
-#define PTHREAD_CANCEL_DISABLE 1
-#define PTHREAD_CANCELED ((void *)-1)
-/* this should be a value that can never be a valid address */
-#define PTHREAD_COND_INITIALIZER (pthread_cond_t)21
-#define PTHREAD_CREATE_DETACHED 1
-/* the default : joinable */
-#define PTHREAD_CREATE_JOINABLE 0
-#define PTHREAD_EXPLICIT_SCHED 1
-#define PTHREAD_INHERIT_SCHED 0
-#define PTHREAD_MUTEX_RECURSIVE 0
-#define PTHREAD_MUTEX_ERRORCHECK 1
-#define PTHREAD_MUTEX_NORMAL 2
-#define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL
-/* this should be too low to ever be a valid address */
-#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP (pthread_mutex_t)18
-#define PTHREAD_NORMAL_MUTEX_INITIALIZER_NP (pthread_mutex_t)19
-#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP (pthread_mutex_t)20
-#define PTHREAD_MUTEX_INITIALIZER PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
-#define PTHREAD_ONCE_INIT { PTHREAD_MUTEX_INITIALIZER, 0 }
-#if defined(_POSIX_THREAD_PRIO_INHERIT) && _POSIX_THREAD_PRIO_INHERIT >= 0
-#define PTHREAD_PRIO_NONE 0
-#define PTHREAD_PRIO_INHERIT 1
-#define PTHREAD_PRIO_PROTECT 2
-#endif
-#define PTHREAD_PROCESS_SHARED 1
-#define PTHREAD_PROCESS_PRIVATE 0
-#define PTHREAD_RWLOCK_INITIALIZER (pthread_rwlock_t)22
-/* process is the default */
-#define PTHREAD_SCOPE_PROCESS 0
-#define PTHREAD_SCOPE_SYSTEM 1
-
-
-/* Attributes */
-int pthread_attr_destroy (pthread_attr_t *);
-int pthread_attr_getdetachstate (const pthread_attr_t *, int *);
-int pthread_attr_getinheritsched (const pthread_attr_t *, int *);
-int pthread_attr_getschedparam (const pthread_attr_t *, struct sched_param *);
-int pthread_attr_getschedpolicy (const pthread_attr_t *, int *);
-int pthread_attr_getscope (const pthread_attr_t *, int *);
-int pthread_attr_init (pthread_attr_t *);
-int pthread_attr_setdetachstate (pthread_attr_t *, int);
-int pthread_attr_setinheritsched (pthread_attr_t *, int);
-int pthread_attr_setschedparam (pthread_attr_t *, const struct sched_param *);
-int pthread_attr_setschedpolicy (pthread_attr_t *, int);
-int pthread_attr_setscope (pthread_attr_t *, int);
-
-#ifdef _POSIX_THREAD_ATTR_STACKADDR
-/* These functions may be implementable via some low level trickery. For now they are
- * Not supported or implemented. The prototypes are here so if someone greps the
- * source they will see these comments
- */
-int pthread_attr_getstackaddr (const pthread_attr_t *, void **);
-int pthread_attr_setstackaddr (pthread_attr_t *, void *);
-#endif
-
-#ifdef _POSIX_THREAD_ATTR_STACKSIZE
-int pthread_attr_getstacksize (const pthread_attr_t *, size_t *);
-int pthread_attr_setstacksize (pthread_attr_t *, size_t);
-#endif
-
-int pthread_cancel (pthread_t);
-/* Macros for cleanup_push and pop;
- * The function definitions are
-void pthread_cleanup_push (void (*routine)(void*), void *arg);
-void pthread_cleanup_pop (int execute);
-*/
-typedef void (*__cleanup_routine_type) (void *);
-typedef struct _pthread_cleanup_handler
-{
- __cleanup_routine_type function;
- void *arg;
- struct _pthread_cleanup_handler *next;
-} __pthread_cleanup_handler;
-
-void _pthread_cleanup_push (__pthread_cleanup_handler *handler);
-void _pthread_cleanup_pop (int execute);
-
-#define pthread_cleanup_push(_fn, _arg) { __pthread_cleanup_handler __cleanup_handler = \
- { _fn, _arg, NULL }; \
- _pthread_cleanup_push( &__cleanup_handler );
-#define pthread_cleanup_pop(_execute) _pthread_cleanup_pop( _execute ); }
-
-/* Condition variables */
-int pthread_cond_broadcast (pthread_cond_t *);
-int pthread_cond_destroy (pthread_cond_t *);
-int pthread_cond_init (pthread_cond_t *, const pthread_condattr_t *);
-int pthread_cond_signal (pthread_cond_t *);
-int pthread_cond_timedwait (pthread_cond_t *,
- pthread_mutex_t *, const struct timespec *);
-int pthread_cond_wait (pthread_cond_t *, pthread_mutex_t *);
-int pthread_condattr_destroy (pthread_condattr_t *);
-int pthread_condattr_getpshared (const pthread_condattr_t *, int *);
-int pthread_condattr_init (pthread_condattr_t *);
-int pthread_condattr_setpshared (pthread_condattr_t *, int);
-
-int pthread_create (pthread_t *, const pthread_attr_t *,
- void *(*)(void *), void *);
-int pthread_detach (pthread_t);
-int pthread_equal (pthread_t, pthread_t);
-void pthread_exit (void *);
-int pthread_getschedparam (pthread_t, int *, struct sched_param *);
-void *pthread_getspecific (pthread_key_t);
-int pthread_join (pthread_t, void **);
-int pthread_key_create (pthread_key_t *, void (*)(void *));
-int pthread_key_delete (pthread_key_t);
-
-/* Mutex's */
-int pthread_mutex_destroy (pthread_mutex_t *);
-int pthread_mutex_getprioceiling (const pthread_mutex_t *, int *);
-int pthread_mutex_init (pthread_mutex_t *, const pthread_mutexattr_t *);
-int pthread_mutex_lock (pthread_mutex_t *);
-int pthread_mutex_setprioceiling (pthread_mutex_t *, int, int *);
-int pthread_mutex_trylock (pthread_mutex_t *);
-int pthread_mutex_unlock (pthread_mutex_t *);
-int pthread_mutexattr_destroy (pthread_mutexattr_t *);
-int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *, int *);
-int pthread_mutexattr_getprotocol (const pthread_mutexattr_t *, int *);
-int pthread_mutexattr_getpshared (const pthread_mutexattr_t *, int *);
-int pthread_mutexattr_gettype (const pthread_mutexattr_t *, int *);
-int pthread_mutexattr_init (pthread_mutexattr_t *);
-int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *, int);
-int pthread_mutexattr_setprotocol (pthread_mutexattr_t *, int);
-int pthread_mutexattr_setpshared (pthread_mutexattr_t *, int);
-int pthread_mutexattr_settype (pthread_mutexattr_t *, int);
-
-/* RW Locks */
-int pthread_rwlock_destroy (pthread_rwlock_t *rwlock);
-int pthread_rwlock_init (pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr);
-int pthread_rwlock_rdlock (pthread_rwlock_t *rwlock);
-int pthread_rwlock_tryrdlock (pthread_rwlock_t *rwlock);
-int pthread_rwlock_wrlock (pthread_rwlock_t *rwlock);
-int pthread_rwlock_trywrlock (pthread_rwlock_t *rwlock);
-int pthread_rwlock_unlock (pthread_rwlock_t *rwlock);
-int pthread_rwlockattr_init (pthread_rwlockattr_t *rwlockattr);
-int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *attr,
- int *pshared);
-int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *attr, int pshared);
-int pthread_rwlockattr_destroy (pthread_rwlockattr_t *rwlockattr);
-
-int pthread_once (pthread_once_t *, void (*)(void));
-
-/* Concurrency levels - X/Open interface */
-int pthread_getconcurrency (void);
-int pthread_setconcurrency (int);
-
-
-pthread_t pthread_self (void);
-int pthread_setcancelstate (int, int *);
-int pthread_setcanceltype (int, int *);
-int pthread_setschedparam (pthread_t, int, const struct sched_param *);
-int pthread_setspecific (pthread_key_t, const void *);
-void pthread_testcancel (void);
-
-/* Non posix calls */
-
-int pthread_suspend (pthread_t);
-int pthread_continue (pthread_t);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _PTHREAD_H */
diff --git a/winsup/cygwin/include/pty.h b/winsup/cygwin/include/pty.h
deleted file mode 100644
index e4b4da0..0000000
--- a/winsup/cygwin/include/pty.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef __PTY_H__
-#define __PTY_H__
-
-#include <_ansi.h>
-#include <sys/termios.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int _EXFUN(openpty ,(int *, int *, char *, struct termios *, struct winsize *));
-int _EXFUN(forkpty ,(int *, char *, struct termios *, struct winsize *));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __PTY_H__ */
diff --git a/winsup/cygwin/include/resolv.h b/winsup/cygwin/include/resolv.h
deleted file mode 100755
index 49967c8..0000000
--- a/winsup/cygwin/include/resolv.h
+++ /dev/null
@@ -1,461 +0,0 @@
-/*
- * Copyright (c) 1983, 1987, 1989
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1996-1999 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * @(#)resolv.h 8.1 (Berkeley) 6/2/93
- * $Id$
- */
-
-#ifndef _RESOLV_H_
-#define _RESOLV_H_
-
-#include <sys/param.h>
-#if !defined(__CYGWIN__) && ((!defined(BSD)) || (BSD < 199306))
-# include <sys/bitypes.h>
-#else
-# include <sys/types.h>
-#endif
-#include <sys/cdefs.h>
-#include <sys/socket.h>
-#include <stdio.h>
-#include <arpa/nameser.h>
-#include <netinet/in.h>
-
-/*
- * Revision information. This is the release date in YYYYMMDD format.
- * It can change every day so the right thing to do with it is use it
- * in preprocessor commands such as "#if (__RES > 19931104)". Do not
- * compare for equality; rather, use it to determine whether your resolver
- * is new enough to contain a certain feature.
- */
-
-#define __RES 19991006
-
-/*
- * This used to be defined in res_query.c, now it's in herror.c.
- * [XXX no it's not. It's in irs/irs_data.c]
- * It was
- * never extern'd by any *.h file before it was placed here. For thread
- * aware programs, the last h_errno value set is stored in res->h_errno.
- *
- * XXX: There doesn't seem to be a good reason for exposing RES_SET_H_ERRNO
- * (and __h_errno_set) to the public via <resolv.h>.
- * XXX: __h_errno_set is really part of IRS, not part of the resolver.
- * If somebody wants to build and use a resolver that doesn't use IRS,
- * what do they do? Perhaps something like
- * #ifdef WANT_IRS
- * # define RES_SET_H_ERRNO(r,x) __h_errno_set(r,x)
- * #else
- * # define RES_SET_H_ERRNO(r,x) (h_errno = (r)->res_h_errno = (x))
- * #endif
- */
-
-#define RES_SET_H_ERRNO(r,x) __h_errno_set(r,x)
-struct __res_state; /* forward */
-__BEGIN_DECLS
-void __h_errno_set(struct __res_state *res, int err);
-__END_DECLS
-
-/*
- * Resolver configuration file.
- * Normally not present, but may contain the address of the
- * inital name server(s) to query and the domain search list.
- */
-
-#ifndef _PATH_RESCONF
-#define _PATH_RESCONF "/etc/resolv.conf"
-#endif
-
-typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error }
- res_sendhookact;
-
-typedef res_sendhookact (*res_send_qhook)__P((struct sockaddr * const *ns,
- const u_char **query,
- int *querylen,
- u_char *ans,
- int anssiz,
- int *resplen));
-
-typedef res_sendhookact (*res_send_rhook)__P((const struct sockaddr *ns,
- const u_char *query,
- int querylen,
- u_char *ans,
- int anssiz,
- int *resplen));
-
-struct res_sym {
- int number; /* Identifying number, like T_MX */
- const char * name; /* Its symbolic name, like "MX" */
- const char * humanname; /* Its fun name, like "mail exchanger" */
-};
-
-/*
- * Global defines and variables for resolver stub.
- */
-#define MAXNS 3 /* max # name servers we'll track */
-#define MAXDFLSRCH 3 /* # default domain levels to try */
-#define MAXDNSRCH 6 /* max # domains in search path */
-#define LOCALDOMAINPARTS 2 /* min levels in name that is "local" */
-
-#define RES_TIMEOUT 5 /* min. seconds between retries */
-#define MAXRESOLVSORT 10 /* number of net to sort on */
-#define RES_MAXNDOTS 15 /* should reflect bit field size */
-#define RES_MAXRETRANS 30 /* only for resolv.conf/RES_OPTIONS */
-#define RES_MAXRETRY 5 /* only for resolv.conf/RES_OPTIONS */
-#define RES_DFLRETRY 2 /* Default #/tries. */
-#define RES_MAXTIME 65535 /* Infinity, in milliseconds. */
-
-struct __res_state_ext;
-
-struct __res_state {
- int retrans; /* retransmition time interval */
- int retry; /* number of times to retransmit */
- u_long options; /* option flags - see below. */
- int nscount; /* number of name servers */
- struct sockaddr_in
- nsaddr_list[MAXNS]; /* address of name server */
-#define nsaddr nsaddr_list[0] /* for backward compatibility */
- u_short id; /* current message id */
- char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */
- char defdname[256]; /* default domain (deprecated) */
- u_long pfcode; /* RES_PRF_ flags - see below. */
- unsigned ndots:4; /* threshold for initial abs. query */
- unsigned nsort:4; /* number of elements in sort_list[] */
- char unused[3];
- struct {
- struct in_addr addr;
- u_int32_t mask;
- } sort_list[MAXRESOLVSORT];
- res_send_qhook qhook; /* query hook */
- res_send_rhook rhook; /* response hook */
- int res_h_errno; /* last one set for this context */
- int _vcsock; /* PRIVATE: for res_send VC i/o */
- u_int _flags; /* PRIVATE: see below */
- union {
- /* On an 32-bit arch this means 512b total. */
- char pad[72 - 3*sizeof (int) - 2*sizeof (void *)];
- struct {
- u_int16_t nscount;
- u_int16_t nstimes[MAXNS]; /* ms. */
- int nssocks[MAXNS];
- struct __res_state_ext *ext; /* extention for IPv6 */
- } _ext;
- } _u;
-};
-
-typedef struct __res_state *res_state;
-
-union res_sockaddr_union {
- struct sockaddr_in sin;
-#ifdef IN6ADDR_ANY_INIT
- struct sockaddr_in6 sin6;
-#endif
-#ifdef ISC_ALIGN64
- int64_t __align; /* 64bit alignment */
-#else
- int32_t __align; /* 32bit alignment */
-#endif
- char __space[128]; /* max size */
-};
-
-/*
- * Resolver flags (used to be discrete per-module statics ints).
- */
-#define RES_F_VC 0x00000001 /* socket is TCP */
-#define RES_F_CONN 0x00000002 /* socket is connected */
-#define RES_F_EDNS0ERR 0x00000004 /* EDNS0 caused errors */
-
-/* res_findzonecut() options */
-#define RES_EXHAUSTIVE 0x00000001 /* always do all queries */
-
-/*
- * Resolver options (keep these in synch with res_debug.c, please)
- */
-#define RES_INIT 0x00000001 /* address initialized */
-#define RES_DEBUG 0x00000002 /* print debug messages */
-#define RES_AAONLY 0x00000004 /* authoritative answers only (!IMPL)*/
-#define RES_USEVC 0x00000008 /* use virtual circuit */
-#define RES_PRIMARY 0x00000010 /* query primary server only (!IMPL) */
-#define RES_IGNTC 0x00000020 /* ignore trucation errors */
-#define RES_RECURSE 0x00000040 /* recursion desired */
-#define RES_DEFNAMES 0x00000080 /* use default domain name */
-#define RES_STAYOPEN 0x00000100 /* Keep TCP socket open */
-#define RES_DNSRCH 0x00000200 /* search up local domain tree */
-#define RES_INSECURE1 0x00000400 /* type 1 security disabled */
-#define RES_INSECURE2 0x00000800 /* type 2 security disabled */
-#define RES_NOALIASES 0x00001000 /* shuts off HOSTALIASES feature */
-#define RES_USE_INET6 0x00002000 /* use/map IPv6 in gethostbyname() */
-#define RES_ROTATE 0x00004000 /* rotate ns list after each query */
-#define RES_NOCHECKNAME 0x00008000 /* do not check names for sanity. */
-#define RES_KEEPTSIG 0x00010000 /* do not strip TSIG records */
-#define RES_BLAST 0x00020000 /* blast all recursive servers */
-#define RES_NO_NIBBLE 0x00040000 /* disable IPv6 nibble mode reverse */
-#define RES_NO_BITSTRING 0x00080000 /* disable IPv6 bit string mode reverse */
-/* KAME extensions: use higher bit to avoid conflict with ISC use */
-#define RES_USE_DNAME 0x10000000 /* use DNAME */
-#define RES_USE_A6 0x20000000 /* use A6 */
-#define RES_USE_EDNS0 0x40000000 /* use EDNS0 if configured */
-
-#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
-
-/*
- * Resolver "pfcode" values. Used by dig.
- */
-#define RES_PRF_STATS 0x00000001
-#define RES_PRF_UPDATE 0x00000002
-#define RES_PRF_CLASS 0x00000004
-#define RES_PRF_CMD 0x00000008
-#define RES_PRF_QUES 0x00000010
-#define RES_PRF_ANS 0x00000020
-#define RES_PRF_AUTH 0x00000040
-#define RES_PRF_ADD 0x00000080
-#define RES_PRF_HEAD1 0x00000100
-#define RES_PRF_HEAD2 0x00000200
-#define RES_PRF_TTLID 0x00000400
-#define RES_PRF_HEADX 0x00000800
-#define RES_PRF_QUERY 0x00001000
-#define RES_PRF_REPLY 0x00002000
-#define RES_PRF_INIT 0x00004000
-/* 0x00008000 */
-
-/* Things involving an internal (static) resolver context. */
-#if defined(_REENTRANT) || defined(__CYGWIN__)
-__BEGIN_DECLS
-extern struct __res_state *__res_state(void);
-__END_DECLS
-#define _res (*__res_state())
-#else
-#ifndef __BIND_NOSTATIC
-extern struct __res_state _res;
-#endif
-#endif
-
-#ifndef __BIND_NOSTATIC
-#define fp_nquery __fp_nquery
-#define fp_query __fp_query
-#define hostalias __hostalias
-#define p_query __p_query
-#define res_close __res_close
-#define res_init __res_init
-#define res_isourserver __res_isourserver
-#define res_mkquery __res_mkquery
-#define res_query __res_query
-#define res_querydomain __res_querydomain
-#define res_search __res_search
-#define res_send __res_send
-#define res_sendsigned __res_sendsigned
-
-__BEGIN_DECLS
-void fp_nquery __P((const u_char *, int, FILE *));
-void fp_query __P((const u_char *, FILE *));
-const char * hostalias __P((const char *));
-void p_query __P((const u_char *));
-void res_close __P((void));
-int res_init __P((void));
-int res_isourserver __P((const struct sockaddr_in *));
-int res_mkquery __P((int, const char *, int, int, const u_char *,
- int, const u_char *, u_char *, int));
-int res_query __P((const char *, int, int, u_char *, int));
-int res_querydomain __P((const char *, const char *, int, int,
- u_char *, int));
-int res_search __P((const char *, int, int, u_char *, int));
-int res_send __P((const u_char *, int, u_char *, int));
-int res_sendsigned __P((const u_char *, int, ns_tsig_key *,
- u_char *, int));
-__END_DECLS
-#endif
-
-#if !defined(SHARED_LIBBIND) || defined(LIB)
-/*
- * If libbind is a shared object (well, DLL anyway)
- * these externs break the linker when resolv.h is
- * included by a lib client (like named)
- * Make them go away if a client is including this
- *
- */
-extern const struct res_sym __p_key_syms[];
-extern const struct res_sym __p_cert_syms[];
-extern const struct res_sym __p_class_syms[];
-extern const struct res_sym __p_type_syms[];
-extern const struct res_sym __p_rcode_syms[];
-#endif /* SHARED_LIBBIND */
-
-#define b64_ntop __b64_ntop
-#define b64_pton __b64_pton
-#define dn_comp __dn_comp
-#define dn_count_labels __dn_count_labels
-#define dn_expand __dn_expand
-#define dn_skipname __dn_skipname
-#define fp_resstat __fp_resstat
-#define loc_aton __loc_aton
-#define loc_ntoa __loc_ntoa
-#define p_cdname __p_cdname
-#define p_cdnname __p_cdnname
-#define p_class __p_class
-#define p_fqname __p_fqname
-#define p_fqnname __p_fqnname
-#define p_option __p_option
-#define p_secstodate __p_secstodate
-#define p_section __p_section
-#define p_time __p_time
-#define p_type __p_type
-#define p_rcode __p_rcode
-#define putlong __putlong
-#define putshort __putshort
-#define res_dnok __res_dnok
-#define res_findzonecut __res_findzonecut
-#define res_hnok __res_hnok
-#define res_hostalias __res_hostalias
-#define res_mailok __res_mailok
-#define res_nameinquery __res_nameinquery
-#define res_nclose __res_nclose
-#define res_ninit __res_ninit
-#define res_nmkquery __res_nmkquery
-#define res_pquery __res_pquery
-#define res_nquery __res_nquery
-#define res_nquerydomain __res_nquerydomain
-#define res_nsearch __res_nsearch
-#define res_nsend __res_nsend
-#define res_nsendsigned __res_nsendsigned
-#define res_nisourserver __res_nisourserver
-#define res_ownok __res_ownok
-#define res_queriesmatch __res_queriesmatch
-#define res_randomid __res_randomid
-#define sym_ntop __sym_ntop
-#define sym_ntos __sym_ntos
-#define sym_ston __sym_ston
-#define res_nopt __res_nopt
-#define res_ndestroy __res_ndestroy
-#define res_nametoclass __res_nametoclass
-#define res_nametotype __res_nametotype
-#define res_setservers __res_setservers
-#define res_getservers __res_getservers
-__BEGIN_DECLS
-int res_hnok __P((const char *));
-int res_ownok __P((const char *));
-int res_mailok __P((const char *));
-int res_dnok __P((const char *));
-int sym_ston __P((const struct res_sym *, const char *, int *));
-const char * sym_ntos __P((const struct res_sym *, int, int *));
-const char * sym_ntop __P((const struct res_sym *, int, int *));
-int b64_ntop __P((u_char const *, size_t, char *, size_t));
-int b64_pton __P((char const *, u_char *, size_t));
-int loc_aton __P((const char *ascii, u_char *binary));
-const char * loc_ntoa __P((const u_char *binary, char *ascii));
-int dn_skipname __P((const u_char *, const u_char *));
-void putlong __P((u_int32_t, u_char *));
-void putshort __P((u_int16_t, u_char *));
-const char * p_class __P((int));
-const char * p_time __P((u_int32_t));
-const char * p_type __P((int));
-const char * p_rcode __P((int));
-const u_char * p_cdnname __P((const u_char *, const u_char *, int, FILE *));
-const u_char * p_cdname __P((const u_char *, const u_char *, FILE *));
-const u_char * p_fqnname __P((const u_char *cp, const u_char *msg,
- int, char *, int));
-const u_char * p_fqname __P((const u_char *, const u_char *, FILE *));
-const char * p_option __P((u_long option));
-char * p_secstodate __P((u_long));
-int dn_count_labels __P((const char *));
-int dn_comp __P((const char *, u_char *, int,
- u_char **, u_char **));
-int dn_expand __P((const u_char *, const u_char *, const u_char *,
- char *, int));
-u_int res_randomid __P((void));
-int res_nameinquery __P((const char *, int, int,
- const u_char *, const u_char *));
-int res_queriesmatch __P((const u_char *, const u_char *,
- const u_char *, const u_char *));
-const char * p_section __P((int section, int opcode));
-/* Things involving a resolver context. */
-int res_ninit __P((res_state));
-int res_nisourserver __P((const res_state,
- const struct sockaddr_in *));
-void fp_resstat __P((const res_state, FILE *));
-void res_pquery __P((const res_state, const u_char *, int, FILE *));
-const char * res_hostalias __P((const res_state, const char *,
- char *, size_t));
-int res_nquery __P((res_state,
- const char *, int, int, u_char *, int));
-int res_nsearch __P((res_state, const char *, int,
- int, u_char *, int));
-int res_nquerydomain __P((res_state,
- const char *, const char *, int, int,
- u_char *, int));
-int res_nmkquery __P((res_state,
- int, const char *, int, int, const u_char *,
- int, const u_char *, u_char *, int));
-int res_nsend __P((res_state, const u_char *, int, u_char *, int));
-int res_nsendsigned __P((res_state, const u_char *, int,
- ns_tsig_key *, u_char *, int));
-int res_findzonecut __P((res_state, const char *, ns_class, int,
- char *, size_t, struct in_addr *, int));
-void res_nclose __P((res_state));
-int res_nopt __P((res_state, int, u_char *, int, int));
-void res_send_setqhook __P((res_send_qhook hook));
-void res_send_setrhook __P((res_send_rhook hook));
-int __res_vinit __P((res_state, int));
-void res_destroyservicelist __P((void));
-const char * res_servicename __P((u_int16_t port, const char *proto));
-const char * res_protocolname __P((int num));
-void res_destroyprotolist __P((void));
-void res_buildprotolist __P((void));
-const char * res_get_nibblesuffix __P((res_state));
-const char * res_get_bitstringsuffix __P((res_state));
-void res_ndestroy __P((res_state));
-u_int16_t res_nametoclass __P((const char *buf, int *success));
-u_int16_t res_nametotype __P((const char *buf, int *success));
-void res_setservers __P((res_state,
- const union res_sockaddr_union *, int));
-int res_getservers __P((res_state,
- union res_sockaddr_union *, int));
-__END_DECLS
-
-#endif /* !_RESOLV_H_ */
diff --git a/winsup/cygwin/include/sched.h b/winsup/cygwin/include/sched.h
deleted file mode 100644
index f97b8eb..0000000
--- a/winsup/cygwin/include/sched.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* sched.h: scheduler interface for Cygwin
-
- Copyright 2001 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. */
-
-/* Written from the opengroup specifications */
-
-#ifndef _SCHED_H
-#define _SCHED_H
-#include <time.h>
-
-/* we return -1 and set errno on failure */
-#define SCHED_FIFO 1
-#define SCHED_RR 2
-#define SCHED_OTHER 3
-
-struct sched_param
-{
- int sched_priority;
-};
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* max priority for policy */
-int sched_get_priority_max (int);
-/* min priority for policy */
-int sched_get_priority_min (int);
-/* get sched params for process */
-int sched_getparam (pid_t, struct sched_param *);
-/* get the scheduler for pid */
-int sched_getscheduler (pid_t);
-/* get the time quantum for pid */
-int sched_rr_get_interval (pid_t, struct timespec *);
-/* set the scheduling parameters */
-int sched_setparam (pid_t, const struct sched_param *);
-/* set the scheduler */
-int sched_setscheduler (pid_t, int, const struct sched_param *);
-/* yield the cpu */
-int sched_yield (void);
-
-#if defined(__INSIDE_CYGWIN__)
-/* These are private helper functions used to calculate scheduler settings and
- * validate parameters */
-
-/* check parameters for validity */
-int valid_sched_parameters(const struct sched_param *);
-/* set a single thread's priority */
-int sched_set_thread_priority(HANDLE thread, int priority);
-
-#endif /* INSIDE_CYGWIN */
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _SCHED_H */
diff --git a/winsup/cygwin/include/search.h b/winsup/cygwin/include/search.h
deleted file mode 100644
index f532eae..0000000
--- a/winsup/cygwin/include/search.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*-
- * Written by J.T. Conklin <jtc@netbsd.org>
- * Public domain.
- *
- * $NetBSD: search.h,v 1.12 1999/02/22 10:34:28 christos Exp $
- * $FreeBSD: src/include/search.h,v 1.10 2002/10/16 14:29:23 robert Exp $
- */
-
-#ifndef _SEARCH_H_
-#define _SEARCH_H_
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-typedef struct entry
-{
- char *key;
- void *data;
-} ENTRY;
-
-typedef enum
-{
- FIND, ENTER
-} ACTION;
-
-typedef enum
-{
- preorder,
- postorder,
- endorder,
- leaf
-} VISIT;
-
-#ifdef _SEARCH_PRIVATE
-typedef struct node
-{
- char *key;
- struct node *llink, *rlink;
-} node_t;
-#endif
-
-struct hsearch_data
-{
- struct internal_head *htable;
- size_t htablesize;
-};
-
-struct qelem
-{
- struct qelem *q_forw;
- struct qelem *q_back;
-};
-
-__BEGIN_DECLS
-int hcreate (size_t);
-void hdestroy (void);
-ENTRY *hsearch (ENTRY, ACTION);
-int hcreate_r (size_t, struct hsearch_data *);
-void hdestroy_r (struct hsearch_data *);
-int hsearch_r (ENTRY, ACTION, ENTRY **, struct hsearch_data *);
-void *tdelete (const void * __restrict, void ** __restrict,
- int (*) (const void *, const void *));
-void tdestroy (void *, void (*)(void *));
-void *tfind (const void *, void **,
- int (*) (const void *, const void *));
-void *tsearch (const void *, void **, int (*) (const void *, const void *));
-void twalk (const void *, void (*) (const void *, VISIT, int));
-void *lfind (const void *, const void *, size_t *, size_t,
- int (*) (const void *, const void *));
-void *lsearch (const void *, void *, size_t *, size_t,
- int (*) (const void *, const void *));
-void insque (void *, void *);
-void remque (void *);
-__END_DECLS
-
-#endif /* !_SEARCH_H_ */
diff --git a/winsup/cygwin/include/semaphore.h b/winsup/cygwin/include/semaphore.h
deleted file mode 100644
index b16d137..0000000
--- a/winsup/cygwin/include/semaphore.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* semaphore.h: POSIX semaphore interface
-
- Copyright 2001, 2003, 2007 Red Hat, Inc.
-
- Written by Robert Collins <rbtcollins@hotmail.com>
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include <sys/types.h>
-
-#ifndef _SEMAPHORE_H
-#define _SEMAPHORE_H
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#ifndef __INSIDE_CYGWIN__
- typedef struct __sem_t {char __dummy;} *sem_t;
-#endif
-
-#define SEM_FAILED ((sem_t *) 0)
-
-/* Semaphores */
- int sem_init (sem_t *sem, int pshared, unsigned int value);
- int sem_destroy (sem_t *sem);
- sem_t *sem_open (const char *name, int oflag, ...);
- int sem_close (sem_t *sem);
- int sem_unlink (const char *name);
- int sem_wait (sem_t *sem);
- int sem_trywait (sem_t *sem);
- int sem_timedwait (sem_t *sem, const struct timespec *abstime);
- int sem_post (sem_t *sem);
- int sem_getvalue (sem_t *sem, int *sval);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SEMAPHORE_H */
diff --git a/winsup/cygwin/include/stdint.h b/winsup/cygwin/include/stdint.h
deleted file mode 100644
index 9d45015..0000000
--- a/winsup/cygwin/include/stdint.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/* stdint.h - integer types
-
- Copyright 2003, 2006, 2007 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _STDINT_H
-#define _STDINT_H
-
-/* Exact-width integer types */
-
-#ifndef __int8_t_defined
-#define __int8_t_defined
-typedef signed char int8_t;
-typedef short int16_t;
-typedef int int32_t;
-typedef long long int64_t;
-#endif
-
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-#ifndef __uint32_t_defined
-#define __uint32_t_defined
-typedef unsigned int uint32_t;
-#endif
-typedef unsigned long long uint64_t;
-
-/* Minimum-width integer types */
-
-typedef signed char int_least8_t;
-typedef short int_least16_t;
-typedef long int_least32_t;
-typedef long long int_least64_t;
-
-typedef unsigned char uint_least8_t;
-typedef unsigned short uint_least16_t;
-typedef unsigned long uint_least32_t;
-typedef unsigned long long uint_least64_t;
-
-/* Fastest minimum-width integer types */
-
-typedef signed char int_fast8_t;
-typedef long int_fast16_t;
-typedef long int_fast32_t;
-typedef long long int_fast64_t;
-
-typedef unsigned char uint_fast8_t;
-typedef unsigned long uint_fast16_t;
-typedef unsigned long uint_fast32_t;
-typedef unsigned long long uint_fast64_t;
-
-/* Integer types capable of holding object pointers */
-
-#ifndef __intptr_t_defined
-#define __intptr_t_defined
-typedef long intptr_t;
-#endif
-typedef unsigned long uintptr_t;
-
-/* Greatest-width integer types */
-
-typedef long long intmax_t;
-typedef unsigned long long uintmax_t;
-
-/* Limits of exact-width integer types */
-
-#define INT8_MIN (-128)
-#define INT16_MIN (-32768)
-#define INT32_MIN (-2147483647 - 1)
-#define INT64_MIN (-9223372036854775807LL - 1LL)
-
-#define INT8_MAX (127)
-#define INT16_MAX (32767)
-#define INT32_MAX (2147483647)
-#define INT64_MAX (9223372036854775807LL)
-
-#define UINT8_MAX (255)
-#define UINT16_MAX (65535)
-#define UINT32_MAX (4294967295UL)
-#define UINT64_MAX (18446744073709551615ULL)
-
-/* Limits of minimum-width integer types */
-
-#define INT_LEAST8_MIN (-128)
-#define INT_LEAST16_MIN (-32768)
-#define INT_LEAST32_MIN (-2147483647 - 1)
-#define INT_LEAST64_MIN (-9223372036854775807LL - 1LL)
-
-#define INT_LEAST8_MAX (127)
-#define INT_LEAST16_MAX (32767)
-#define INT_LEAST32_MAX (2147483647)
-#define INT_LEAST64_MAX (9223372036854775807LL)
-
-#define UINT_LEAST8_MAX (255)
-#define UINT_LEAST16_MAX (65535)
-#define UINT_LEAST32_MAX (4294967295UL)
-#define UINT_LEAST64_MAX (18446744073709551615ULL)
-
-/* Limits of fastest minimum-width integer types */
-
-#define INT_FAST8_MIN (-128)
-#define INT_FAST16_MIN (-2147483647 - 1)
-#define INT_FAST32_MIN (-2147483647 - 1)
-#define INT_FAST64_MIN (-9223372036854775807LL - 1LL)
-
-#define INT_FAST8_MAX (127)
-#define INT_FAST16_MAX (2147483647)
-#define INT_FAST32_MAX (2147483647)
-#define INT_FAST64_MAX (9223372036854775807LL)
-
-#define UINT_FAST8_MAX (255)
-#define UINT_FAST16_MAX (4294967295UL)
-#define UINT_FAST32_MAX (4294967295UL)
-#define UINT_FAST64_MAX (18446744073709551615ULL)
-
-/* Limits of integer types capable of holding object pointers */
-
-#define INTPTR_MIN (-2147483647 - 1)
-#define INTPTR_MAX (2147483647)
-#define UINTPTR_MAX (4294967295UL)
-
-/* Limits of greatest-width integer types */
-
-#define INTMAX_MIN (-9223372036854775807LL - 1LL)
-#define INTMAX_MAX (9223372036854775807LL)
-#define UINTMAX_MAX (18446744073709551615ULL)
-
-/* Limits of other integer types */
-
-#ifndef PTRDIFF_MIN
-#define PTRDIFF_MIN (-2147483647 - 1)
-#define PTRDIFF_MAX (2147483647)
-#endif
-
-#ifndef SIG_ATOMIC_MIN
-#define SIG_ATOMIC_MIN (-2147483647 - 1)
-#endif
-#ifndef SIG_ATOMIC_MAX
-#define SIG_ATOMIC_MAX (2147483647)
-#endif
-
-#ifndef SIZE_MAX
-#define SIZE_MAX (4294967295UL)
-#endif
-
-#ifndef WCHAR_MIN
-#ifdef __WCHAR_MIN__
-#define WCHAR_MIN __WCHAR_MIN__
-#define WCHAR_MAX __WCHAR_MAX__
-#else
-#define WCHAR_MIN (0)
-#define WCHAR_MAX (65535)
-#endif
-#endif
-
-#ifndef WINT_MIN
-#define WINT_MIN 0U
-#define WINT_MAX UINT_MAX
-#endif
-
-/* Macros for minimum-width integer constant expressions */
-
-#define INT8_C(x) x
-#define INT16_C(x) x
-#define INT32_C(x) x ## L
-#define INT64_C(x) x ## LL
-
-#define UINT8_C(x) x
-#define UINT16_C(x) x
-#define UINT32_C(x) x ## UL
-#define UINT64_C(x) x ## ULL
-
-/* Macros for greatest-width integer constant expressions */
-
-#define INTMAX_C(x) x ## LL
-#define UINTMAX_C(x) x ## ULL
-
-#endif /* _STDINT_H */
diff --git a/winsup/cygwin/include/strings.h b/winsup/cygwin/include/strings.h
deleted file mode 100644
index a443ee5..0000000
--- a/winsup/cygwin/include/strings.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* strings.h
-
- Copyright 2007 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 _STRINGS_H_
-#define _STRINGS_H_
-
-/* newlib's string.h already declares these functions. */
-#ifndef _STRING_H_
-
-#include "_ansi.h"
-
-#define __need_size_t
-#include <stddef.h>
-
-_BEGIN_STD_C
-
-int _EXFUN(bcmp,(const void *, const void *, size_t));
-void _EXFUN(bcopy,(const void *, void *, size_t));
-void _EXFUN(bzero,(void *, size_t));
-int _EXFUN(ffs,(int));
-char *_EXFUN(index,(const char *, int));
-char *_EXFUN(rindex,(const char *, int));
-int _EXFUN(strcasecmp,(const char *, const char *));
-int _EXFUN(strncasecmp,(const char *, const char *, size_t));
-
-_END_STD_C
-
-#endif /* _STRING_H_ */
-
-#endif /* _STRINGS_H_ */
diff --git a/winsup/cygwin/include/sys/acl.h b/winsup/cygwin/include/sys/acl.h
deleted file mode 100644
index 89c38bc..0000000
--- a/winsup/cygwin/include/sys/acl.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* sys/acl.h header file for Cygwin.
-
- Copyright 1999, 2000, 2001 Red Hat, Inc.
- Written by C. Vinschen.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_ACL_H
-#define _SYS_ACL_H
-
-#include <cygwin/acl.h>
-
-#endif /* _SYS_ACL_H */
diff --git a/winsup/cygwin/include/sys/copying.dj b/winsup/cygwin/include/sys/copying.dj
deleted file mode 100644
index a05f4bc..0000000
--- a/winsup/cygwin/include/sys/copying.dj
+++ /dev/null
@@ -1,41 +0,0 @@
-This is the file "copying.dj". It does not apply to any sources
-copyrighted by UCB Berkeley or the Free Software Foundation.
-
- Copyright Information for sources and executables that are marked
- Copyright (C) DJ Delorie
- 24 Kirsten Ave
- Rochester NH 03867-2954
-
-This document is Copyright (C) DJ Delorie and may be distributed
-verbatim, but changing it is not allowed.
-
-Source code copyright DJ Delorie is distributed under the terms of the
-GNU General Public Licence, with the following exceptions:
-
-* Any existing copyright or authorship information in any given source
-file must remain intact. If you modify a source file, a notice to that
-effect must be added to the authorship information in the source file.
-
-* binaries provided in djgpp may be distributed without sources ONLY if
-the recipient is given sufficient information to obtain a copy of djgpp
-themselves. This primarily applies to go32.exe, emu387, stub.exe, and
-the graphics drivers.
-
-* modified versions of the binaries provided in djgpp must be
-distributed under the terms of the GPL.
-
-* objects and libraries linked into an application may be distributed
-without sources.
-
------
-
-Changes to source code copyright BSD or FSF are copyright DJ Delorie, but
-fall under the terms of the original copyright.
-
-A copy of the file "COPYING" is included with this document. If you did not
-receive a copy of "COPYING", you may obtain one from whence this document
-was obtained, or by writing:
- Free Software Foundation
- 675 Mass Ave
- Cambridge, MA 02139
- USA
diff --git a/winsup/cygwin/include/sys/cygwin.h b/winsup/cygwin/include/sys/cygwin.h
deleted file mode 100644
index 8c11010..0000000
--- a/winsup/cygwin/include/sys/cygwin.h
+++ /dev/null
@@ -1,328 +0,0 @@
-/* sys/cygwin.h
-
- Copyright 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 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 _SYS_CYGWIN_H
-#define _SYS_CYGWIN_H
-
-#include <sys/types.h>
-#include <limits.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define _CYGWIN_SIGNAL_STRING "cYgSiGw00f"
-
-#if 0 /* ENTIRELY DEPRECATED INTERFACES. */
-extern pid_t cygwin32_winpid_to_pid (int);
-extern void cygwin32_win32_to_posix_path_list (const char *, char *);
-extern int cygwin32_win32_to_posix_path_list_buf_size (const char *);
-extern void cygwin32_posix_to_win32_path_list (const char *, char *);
-extern int cygwin32_posix_to_win32_path_list_buf_size (const char *);
-extern int cygwin32_conv_to_win32_path (const char *, char *);
-extern int cygwin32_conv_to_full_win32_path (const char *, char *);
-extern void cygwin32_conv_to_posix_path (const char *, char *);
-extern void cygwin32_conv_to_full_posix_path (const char *, char *);
-extern int cygwin32_posix_path_list_p (const char *);
-extern void cygwin32_split_path (const char *, char *, char *);
-extern int cygwin32_attach_handle_to_fd (char *, int, HANDLE, mode_t, DWORD);
-#endif
-
-/* DEPRECATED INTERFACES. These are restricted to MAX_PATH length.
- Don't use in modern applications. */
-extern int cygwin_win32_to_posix_path_list (const char *, char *)
- __attribute__ ((deprecated));
-extern int cygwin_win32_to_posix_path_list_buf_size (const char *)
- __attribute__ ((deprecated));
-extern int cygwin_posix_to_win32_path_list (const char *, char *)
- __attribute__ ((deprecated));
-extern int cygwin_posix_to_win32_path_list_buf_size (const char *)
- __attribute__ ((deprecated));
-extern int cygwin_conv_to_win32_path (const char *, char *)
- __attribute__ ((deprecated));
-extern int cygwin_conv_to_full_win32_path (const char *, char *)
- __attribute__ ((deprecated));
-extern int cygwin_conv_to_posix_path (const char *, char *)
- __attribute__ ((deprecated));
-extern int cygwin_conv_to_full_posix_path (const char *, char *)
- __attribute__ ((deprecated));
-
-/* Use these interfaces in favor of the above. */
-
-/* Possible 'what' values in calls to cygwin_conv_path/cygwin_create_path. */
-enum
-{
- CCP_POSIX_TO_WIN_A = 0, /* from is char*, to is char* */
- CCP_POSIX_TO_WIN_W, /* from is char*, to is wchar_t* */
- CCP_WIN_A_TO_POSIX, /* from is char*, to is char* */
- CCP_WIN_W_TO_POSIX, /* from is wchar_t*, to is char* */
-
- /* Or these values to the above as needed. */
- CCP_ABSOLUTE = 0, /* Request absolute path (default). */
- CCP_RELATIVE = 0x100 /* Request to keep path relative. */
-};
-typedef unsigned int cygwin_conv_path_t;
-
-/* If size is 0, cygwin_conv_path returns the required buffer size in bytes.
- Otherwise, it returns 0 on success, or -1 on error and errno is set to
- one of the below values:
-
- EINVAL what has an invalid value.
- EFAULT from or to point into nirvana.
- ENAMETOOLONG the resulting path is longer than 32K, or, in case
- of what == CCP_POSIX_TO_WIN_A, longer than MAX_PATH.
- ENOSPC size is less than required for the conversion.
-*/
-extern ssize_t cygwin_conv_path (cygwin_conv_path_t what, const void *from,
- void *to, size_t size);
-/* Same, but handles path lists separated by colon or semicolon. */
-extern ssize_t cygwin_conv_path_list (cygwin_conv_path_t what, const void *from,
- void *to, size_t size);
-/* Allocate a buffer for the conversion result using malloc(3), and return
- a pointer to it. Returns NULL if something goes wrong with errno set
- to one of the above values, or to ENOMEM if malloc fails. */
-extern void *cygwin_create_path (cygwin_conv_path_t what, const void *from);
-
-extern pid_t cygwin_winpid_to_pid (int);
-extern int cygwin_posix_path_list_p (const char *);
-extern void cygwin_split_path (const char *, char *, char *);
-
-struct __cygwin_perfile
-{
- const char *name;
- unsigned flags;
-};
-
-/* External interface stuff */
-
-/* Always add at the bottom. Do not add new values in the middle. */
-typedef enum
- {
- CW_LOCK_PINFO,
- CW_UNLOCK_PINFO,
- CW_GETTHREADNAME,
- CW_GETPINFO,
- CW_SETPINFO,
- CW_SETTHREADNAME,
- CW_GETVERSIONINFO,
- CW_READ_V1_MOUNT_TABLES,
- CW_USER_DATA,
- CW_PERFILE,
- CW_GET_CYGDRIVE_PREFIXES,
- CW_GETPINFO_FULL,
- CW_INIT_EXCEPTIONS,
- CW_GET_CYGDRIVE_INFO,
- CW_SET_CYGWIN_REGISTRY_NAME,
- CW_GET_CYGWIN_REGISTRY_NAME,
- CW_STRACE_TOGGLE,
- CW_STRACE_ACTIVE,
- CW_CYGWIN_PID_TO_WINPID,
- CW_EXTRACT_DOMAIN_AND_USER,
- CW_CMDLINE,
- CW_CHECK_NTSEC,
- CW_GET_ERRNO_FROM_WINERROR,
- CW_GET_POSIX_SECURITY_ATTRIBUTE,
- CW_GET_SHMLBA,
- CW_GET_UID_FROM_SID,
- CW_GET_GID_FROM_SID,
- CW_GET_BINMODE,
- CW_HOOK,
- CW_ARGV,
- CW_ENVP,
- CW_DEBUG_SELF,
- CW_SYNC_WINENV,
- CW_CYGTLS_PADSIZE,
- CW_SET_DOS_FILE_WARNING,
- CW_SET_PRIV_KEY
- } cygwin_getinfo_types;
-
-#define CW_NEXTPID 0x80000000 /* or with pid to get next one */
-unsigned long cygwin_internal (cygwin_getinfo_types, ...);
-
-/* Flags associated with process_state */
-enum
-{
- PID_IN_USE = 0x00001, /* Entry in use. */
- PID_UNUSED = 0x00002, /* Available. */
- PID_STOPPED = 0x00004, /* Waiting for SIGCONT. */
- PID_TTYIN = 0x00008, /* Waiting for terminal input. */
- PID_TTYOU = 0x00010, /* Waiting for terminal output. */
- PID_ORPHANED = 0x00020, /* Member of an orphaned process group. */
- PID_ACTIVE = 0x00040, /* Pid accepts signals. */
- PID_CYGPARENT = 0x00080, /* Set if parent was a cygwin app. */
- PID_MAP_RW = 0x00100, /* Flag to open map rw. */
- PID_MYSELF = 0x00200, /* Flag that pid is me. */
- PID_NOCLDSTOP = 0x00400, /* Set if no SIGCHLD signal on stop. */
- PID_INITIALIZING = 0x00800, /* Set until ready to receive signals. */
- PID_USETTY = 0x01000, /* Setting this enables or disables cygwin's
- tty support. This is inherited by
- all execed or forked processes. */
- PID_ALLPIDS = 0x02000, /* used by pinfo scanner */
- PID_EXECED = 0x04000, /* redirect to original pid info block */
- PID_NOREDIR = 0x08000, /* don't redirect if execed */
- PID_EXITED = 0x80000000 /* Free entry. */
-};
-
-#ifdef WINVER
-
-/* This lives in the app and is initialized before jumping into the DLL.
- It should only contain stuff which the user's process needs to see, or
- which is needed before the user pointer is initialized, or is needed to
- carry inheritance information from parent to child. Note that it cannot
- be used to carry inheritance information across exec!
-
- Remember, this structure is linked into the application's executable.
- Changes to this can invalidate existing executables, so we go to extra
- lengths to avoid having to do it.
-
- When adding/deleting members, remember to adjust {public,internal}_reserved.
- The size of the class shouldn't change [unless you really are prepared to
- invalidate all existing executables]. The program does a check (using
- SIZEOF_PER_PROCESS) to make sure you remember to make the adjustment.
-*/
-
-#ifdef __cplusplus
-class MTinterface;
-#endif
-
-struct per_process
-{
- char *initial_sp;
-
- /* The offset of these 3 values can never change. */
- /* magic_biscuit is the size of this class and should never change. */
- unsigned long magic_biscuit;
- unsigned long dll_major;
- unsigned long dll_minor;
-
- struct _reent **impure_ptr_ptr;
- char ***envptr;
-
- /* Used to point to the memory machine we should use. Usually these
- point back into the dll, but they can be overridden by the user. */
- void *(*malloc)(size_t);
- void (*free)(void *);
- void *(*realloc)(void *, size_t);
-
- int *fmode_ptr;
-
- int (*main)(int, char **, char **);
- void (**ctors)(void);
- void (**dtors)(void);
-
- /* For fork */
- void *data_start;
- void *data_end;
- void *bss_start;
- void *bss_end;
-
- void *(*calloc)(size_t, size_t);
- /* For future expansion of values set by the app. */
- void (*premain[4]) (int, char **, struct per_process *);
-
- /* The rest are *internal* to cygwin.dll.
- Those that are here because we want the child to inherit the value from
- the parent (which happens when bss is copied) are marked as such. */
-
- /* non-zero of ctors have been run. Inherited from parent. */
- int run_ctors_p;
-
- DWORD unused[7];
-
- /* Non-zero means the task was forked. The value is the pid.
- Inherited from parent. */
- int forkee;
-
- HMODULE hmodule;
-
- DWORD api_major; /* API version that this program was */
- DWORD api_minor; /* linked with */
- /* For future expansion, so apps won't have to be relinked if we
- add an item. */
- DWORD unused2[6];
-
-#if defined (__INSIDE_CYGWIN__) && defined (__cplusplus)
- MTinterface *threadinterface;
-#else
- void *threadinterface;
-#endif
- struct _reent *impure_ptr;
-};
-#define per_process_overwrite ((unsigned) &(((struct per_process *) NULL)->threadinterface))
-
-extern void cygwin_premain0 (int argc, char **argv, struct per_process *);
-extern void cygwin_premain1 (int argc, char **argv, struct per_process *);
-extern void cygwin_premain2 (int argc, char **argv, struct per_process *);
-extern void cygwin_premain3 (int argc, char **argv, struct per_process *);
-
-#ifdef _PATH_PASSWD
-extern HANDLE cygwin_logon_user (const struct passwd *, const char *);
-#endif
-extern void cygwin_set_impersonation_token (const HANDLE);
-
-/* included if <windows.h> is included */
-extern int cygwin_attach_handle_to_fd (char *, int, HANDLE, mode_t, DWORD);
-
-#ifdef __CYGWIN__
-#include <sys/resource.h>
-
-#define TTY_CONSOLE 0x40000000
-
-#define EXTERNAL_PINFO_VERSION_16_BIT 0
-#define EXTERNAL_PINFO_VERSION_32_BIT 1
-#define EXTERNAL_PINFO_VERSION_32_LP 2
-#define EXTERNAL_PINFO_VERSION EXTERNAL_PINFO_VERSION_32_LP
-
-#ifndef _SYS_TYPES_H
-typedef unsigned short __uid16_t;
-typedef unsigned short __gid16_t;
-typedef unsigned long __uid32_t;
-typedef unsigned long __gid32_t;
-#endif
-
-struct external_pinfo
- {
- pid_t pid;
- pid_t ppid;
- DWORD exitcode;
- DWORD dwProcessId, dwSpawnedProcessId;
- __uid16_t uid;
- __gid16_t gid;
- pid_t pgid;
- pid_t sid;
- int ctty;
- mode_t umask;
-
- long start_time;
- struct rusage rusage_self;
- struct rusage rusage_children;
-
- char progname[MAX_PATH];
-
- DWORD strace_mask;
- DWORD version;
-
- DWORD process_state;
-
- /* Only available if version >= EXTERNAL_PINFO_VERSION_32_BIT */
- __uid32_t uid32;
- __gid32_t gid32;
-
- /* Only available if version >= EXTERNAL_PINFO_VERSION_32_LP */
- char *progname_long;
-};
-#endif /*__CYGWIN__*/
-#endif /*WINVER*/
-
-#ifdef __cplusplus
-};
-#endif
-#endif /* _SYS_CYGWIN_H */
diff --git a/winsup/cygwin/include/sys/dirent.h b/winsup/cygwin/include/sys/dirent.h
deleted file mode 100644
index 451c802..0000000
--- a/winsup/cygwin/include/sys/dirent.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/* Posix dirent.h for WIN32.
-
- Copyright 2001, 2002, 2003, 2005, 2006, 2007 Red Hat, Inc.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-/* Including this file should not require any Windows headers. */
-
-#ifndef _SYS_DIRENT_H
-#define _SYS_DIRENT_H
-
-#include <sys/types.h>
-#include <limits.h>
-
-#define __DIRENT_VERSION 2
-
-#pragma pack(push,4)
-#if defined(__INSIDE_CYGWIN__) || defined (__CYGWIN_USE_BIG_TYPES__)
-#define _DIRENT_HAVE_D_TYPE
-struct dirent
-{
- long __d_version; /* Used internally */
- __ino64_t d_ino;
- unsigned char d_type;
- unsigned char __d_unused1[3];
- __uint32_t __d_internal1;
- char d_name[NAME_MAX + 1];
-};
-#else
-struct dirent
-{
- long d_version;
- long d_reserved[2];
- long d_fd;
- ino_t d_ino;
- char d_name[NAME_MAX + 1];
-};
-#endif
-#pragma pack(pop)
-
-#define __DIRENT_COOKIE 0xdede4242
-
-#pragma pack(push,4)
-typedef struct __DIR
-{
- /* This is first to set alignment in non _COMPILING_NEWLIB case. */
- unsigned long __d_cookie;
- struct dirent *__d_dirent;
- char *__d_dirname; /* directory name with trailing '*' */
- _off_t __d_position; /* used by telldir/seekdir */
- int __d_fd;
- unsigned __d_internal;
- void *__handle;
- void *__fh;
- unsigned __flags;
-} DIR;
-#pragma pack(pop)
-
-DIR *opendir (const char *);
-DIR *fdopendir (int);
-struct dirent *readdir (DIR *);
-int readdir_r (DIR *, struct dirent *, struct dirent **);
-void rewinddir (DIR *);
-int closedir (DIR *);
-
-int dirfd (DIR *);
-
-#ifndef _POSIX_SOURCE
-#ifndef __INSIDE_CYGWIN__
-off_t telldir (DIR *);
-void seekdir (DIR *, off_t loc);
-#endif
-
-int scandir (const char *__dir,
- struct dirent ***__namelist,
- int (*select) (const struct dirent *),
- int (*compar) (const struct dirent **, const struct dirent **));
-
-int alphasort (const struct dirent **__a, const struct dirent **__b);
-#ifdef _DIRENT_HAVE_D_TYPE
-/* File types for `d_type'. */
-enum
-{
- DT_UNKNOWN = 0,
-# define DT_UNKNOWN DT_UNKNOWN
- DT_FIFO = 1,
-# define DT_FIFO DT_FIFO
- DT_CHR = 2,
-# define DT_CHR DT_CHR
- DT_DIR = 4,
-# define DT_DIR DT_DIR
- DT_BLK = 6,
-# define DT_BLK DT_BLK
- DT_REG = 8,
-# define DT_REG DT_REG
- DT_LNK = 10,
-# define DT_LNK DT_LNK
- DT_SOCK = 12,
-# define DT_SOCK DT_SOCK
- DT_WHT = 14
-# define DT_WHT DT_WHT
-};
-
-/* Convert between stat structure types and directory types. */
-# define IFTODT(mode) (((mode) & 0170000) >> 12)
-# define DTTOIF(dirtype) ((dirtype) << 12)
-#endif /* _DIRENT_HAVE_D_TYPE */
-#endif /* _POSIX_SOURCE */
-#endif /*_SYS_DIRENT_H*/
diff --git a/winsup/cygwin/include/sys/elf32.h b/winsup/cygwin/include/sys/elf32.h
deleted file mode 100644
index 5dfe9c8..0000000
--- a/winsup/cygwin/include/sys/elf32.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/*-
- * Copyright (c) 1996-1998 John D. Polstra.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD: src/sys/sys/elf32.h,v 1.8 2002/05/30 08:32:18 dfr Exp $
- */
-
-#ifndef _SYS_ELF32_H_
-#define _SYS_ELF32_H_ 1
-
-#include <sys/elf_common.h>
-
-/*
- * ELF definitions common to all 32-bit architectures.
- */
-
-typedef u_int32_t Elf32_Addr;
-typedef u_int16_t Elf32_Half;
-typedef u_int32_t Elf32_Off;
-typedef int32_t Elf32_Sword;
-typedef u_int32_t Elf32_Word;
-typedef u_int32_t Elf32_Size;
-typedef Elf32_Off Elf32_Hashelt;
-
-/*
- * ELF header.
- */
-
-typedef struct {
- unsigned char e_ident[EI_NIDENT]; /* File identification. */
- Elf32_Half e_type; /* File type. */
- Elf32_Half e_machine; /* Machine architecture. */
- Elf32_Word e_version; /* ELF format version. */
- Elf32_Addr e_entry; /* Entry point. */
- Elf32_Off e_phoff; /* Program header file offset. */
- Elf32_Off e_shoff; /* Section header file offset. */
- Elf32_Word e_flags; /* Architecture-specific flags. */
- Elf32_Half e_ehsize; /* Size of ELF header in bytes. */
- Elf32_Half e_phentsize; /* Size of program header entry. */
- Elf32_Half e_phnum; /* Number of program header entries. */
- Elf32_Half e_shentsize; /* Size of section header entry. */
- Elf32_Half e_shnum; /* Number of section header entries. */
- Elf32_Half e_shstrndx; /* Section name strings section. */
-} Elf32_Ehdr;
-
-/*
- * Section header.
- */
-
-typedef struct {
- Elf32_Word sh_name; /* Section name (index into the
- section header string table). */
- Elf32_Word sh_type; /* Section type. */
- Elf32_Word sh_flags; /* Section flags. */
- Elf32_Addr sh_addr; /* Address in memory image. */
- Elf32_Off sh_offset; /* Offset in file. */
- Elf32_Size sh_size; /* Size in bytes. */
- Elf32_Word sh_link; /* Index of a related section. */
- Elf32_Word sh_info; /* Depends on section type. */
- Elf32_Size sh_addralign; /* Alignment in bytes. */
- Elf32_Size sh_entsize; /* Size of each entry in section. */
-} Elf32_Shdr;
-
-/*
- * Program header.
- */
-
-typedef struct {
- Elf32_Word p_type; /* Entry type. */
- Elf32_Off p_offset; /* File offset of contents. */
- Elf32_Addr p_vaddr; /* Virtual address in memory image. */
- Elf32_Addr p_paddr; /* Physical address (not used). */
- Elf32_Size p_filesz; /* Size of contents in file. */
- Elf32_Size p_memsz; /* Size of contents in memory. */
- Elf32_Word p_flags; /* Access permission flags. */
- Elf32_Size p_align; /* Alignment in memory and file. */
-} Elf32_Phdr;
-
-/*
- * Dynamic structure. The ".dynamic" section contains an array of them.
- */
-
-typedef struct {
- Elf32_Sword d_tag; /* Entry type. */
- union {
- Elf32_Size d_val; /* Integer value. */
- Elf32_Addr d_ptr; /* Address value. */
- } d_un;
-} Elf32_Dyn;
-
-/*
- * Relocation entries.
- */
-
-/* Relocations that don't need an addend field. */
-typedef struct {
- Elf32_Addr r_offset; /* Location to be relocated. */
- Elf32_Word r_info; /* Relocation type and symbol index. */
-} Elf32_Rel;
-
-/* Relocations that need an addend field. */
-typedef struct {
- Elf32_Addr r_offset; /* Location to be relocated. */
- Elf32_Word r_info; /* Relocation type and symbol index. */
- Elf32_Sword r_addend; /* Addend. */
-} Elf32_Rela;
-
-/* Macros for accessing the fields of r_info. */
-#define ELF32_R_SYM(info) ((info) >> 8)
-#define ELF32_R_TYPE(info) ((unsigned char)(info))
-
-/* Macro for constructing r_info from field values. */
-#define ELF32_R_INFO(sym, type) (((sym) << 8) + (unsigned char)(type))
-
-/*
- * Symbol table entries.
- */
-
-typedef struct {
- Elf32_Word st_name; /* String table index of name. */
- Elf32_Addr st_value; /* Symbol value. */
- Elf32_Size st_size; /* Size of associated object. */
- unsigned char st_info; /* Type and binding information. */
- unsigned char st_other; /* Reserved (not used). */
- Elf32_Half st_shndx; /* Section index of symbol. */
-} Elf32_Sym;
-
-/* Macros for accessing the fields of st_info. */
-#define ELF32_ST_BIND(info) ((info) >> 4)
-#define ELF32_ST_TYPE(info) ((info) & 0xf)
-
-/* Macro for constructing st_info from field values. */
-#define ELF32_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf))
-
-#endif /* !_SYS_ELF32_H_ */
diff --git a/winsup/cygwin/include/sys/elf64.h b/winsup/cygwin/include/sys/elf64.h
deleted file mode 100644
index 48556be..0000000
--- a/winsup/cygwin/include/sys/elf64.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/*-
- * Copyright (c) 1996-1998 John D. Polstra.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD: src/sys/sys/elf64.h,v 1.10 2002/05/30 08:32:18 dfr Exp $
- */
-
-#ifndef _SYS_ELF64_H_
-#define _SYS_ELF64_H_ 1
-
-#include <sys/elf_common.h>
-
-/*
- * ELF definitions common to all 64-bit architectures.
- */
-
-typedef uint64_t Elf64_Addr;
-typedef uint16_t Elf64_Half;
-typedef uint32_t Elf64_Word;
-typedef int32_t Elf64_Sword;
-typedef uint64_t Elf64_Xword;
-typedef int64_t Elf64_Sxword;
-typedef uint64_t Elf64_Off;
-typedef uint16_t Elf64_Section;
-typedef Elf64_Half Elf64_Versym;
-typedef uint16_t Elf64_Quarter;
-
-/*
- * Types of dynamic symbol hash table bucket and chain elements.
- *
- * This is inconsistent among 64 bit architectures, so a machine dependent
- * typedef is required.
- */
-
-#ifdef __alpha__
-typedef Elf64_Off Elf64_Hashelt;
-#else
-typedef Elf64_Half Elf64_Hashelt;
-#endif
-
-/*
- * ELF header.
- */
-
-typedef struct {
- unsigned char e_ident[EI_NIDENT]; /* File identification. */
- Elf64_Half e_type; /* File type. */
- Elf64_Half e_machine; /* Machine architecture. */
- Elf64_Word e_version; /* ELF format version. */
- Elf64_Addr e_entry; /* Entry point. */
- Elf64_Off e_phoff; /* Program header file offset. */
- Elf64_Off e_shoff; /* Section header file offset. */
- Elf64_Word e_flags; /* Architecture-specific flags. */
- Elf64_Half e_ehsize; /* Size of ELF header in bytes. */
- Elf64_Half e_phentsize; /* Size of program header entry. */
- Elf64_Half e_phnum; /* Number of program header entries. */
- Elf64_Half e_shentsize; /* Size of section header entry. */
- Elf64_Half e_shnum; /* Number of section header entries. */
- Elf64_Half e_shstrndx; /* Section name strings section. */
-} Elf64_Ehdr;
-
-/*
- * Section header.
- */
-
-typedef struct {
- Elf64_Word sh_name; /* Section name (index into the
- section header string table). */
- Elf64_Word sh_type; /* Section type. */
- Elf64_Xword sh_flags; /* Section flags. */
- Elf64_Addr sh_addr; /* Address in memory image. */
- Elf64_Off sh_offset; /* Offset in file. */
- Elf64_Xword sh_size; /* Size in bytes. */
- Elf64_Word sh_link; /* Index of a related section. */
- Elf64_Word sh_info; /* Depends on section type. */
- Elf64_Xword sh_addralign; /* Alignment in bytes. */
- Elf64_Xword sh_entsize; /* Size of each entry in section. */
-} Elf64_Shdr;
-
-/*
- * Program header.
- */
-
-typedef struct {
- Elf64_Word p_type; /* Entry type. */
- Elf64_Word p_flags; /* Access permission flags. */
- Elf64_Off p_offset; /* File offset of contents. */
- Elf64_Addr p_vaddr; /* Virtual address in memory image. */
- Elf64_Addr p_paddr; /* Physical address (not used). */
- Elf64_Xword p_filesz; /* Size of contents in file. */
- Elf64_Xword p_memsz; /* Size of contents in memory. */
- Elf64_Xword p_align; /* Alignment in memory and file. */
-} Elf64_Phdr;
-
-/*
- * Dynamic structure. The ".dynamic" section contains an array of them.
- */
-
-typedef struct {
- Elf64_Sxword d_tag; /* Entry type. */
- union {
- Elf64_Xword d_val; /* Integer value. */
- Elf64_Addr d_ptr; /* Address value. */
- } d_un;
-} Elf64_Dyn;
-
-/*
- * Relocation entries.
- */
-
-/* Relocations that don't need an addend field. */
-typedef struct {
- Elf64_Addr r_offset; /* Location to be relocated. */
- Elf64_Xword r_info; /* Relocation type and symbol index. */
-} Elf64_Rel;
-
-/* Relocations that need an addend field. */
-typedef struct {
- Elf64_Addr r_offset; /* Location to be relocated. */
- Elf64_Xword r_info; /* Relocation type and symbol index. */
- Elf64_Sxword r_addend; /* Addend. */
-} Elf64_Rela;
-
-/* Macros for accessing the fields of r_info. */
-#define ELF64_R_SYM(info) ((info) >> 32)
-#define ELF64_R_TYPE(info) ((unsigned char)(info))
-
-/* Macro for constructing r_info from field values. */
-#define ELF64_R_INFO(sym, type) (((sym) << 32) + (unsigned char)(type))
-
-/*
- * Symbol table entries.
- */
-
-typedef struct {
- Elf64_Word st_name; /* String table index of name. */
- unsigned char st_info; /* Type and binding information. */
- unsigned char st_other; /* Reserved (not used). */
- Elf64_Section st_shndx; /* Section index of symbol. */
- Elf64_Addr st_value; /* Symbol value. */
- Elf64_Xword st_size; /* Size of associated object. */
-} Elf64_Sym;
-
-/* Macros for accessing the fields of st_info. */
-#define ELF64_ST_BIND(info) ((info) >> 4)
-#define ELF64_ST_TYPE(info) ((info) & 0xf)
-
-/* Macro for constructing st_info from field values. */
-#define ELF64_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf))
-
-#endif /* !_SYS_ELF64_H_ */
diff --git a/winsup/cygwin/include/sys/elf_common.h b/winsup/cygwin/include/sys/elf_common.h
deleted file mode 100644
index b864f04..0000000
--- a/winsup/cygwin/include/sys/elf_common.h
+++ /dev/null
@@ -1,299 +0,0 @@
-/*-
- * Copyright (c) 1998 John D. Polstra.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD: src/sys/sys/elf_common.h,v 1.15 2004/05/05 02:38:54 marcel Exp $
- */
-
-#ifndef _SYS_ELF_COMMON_H_
-#define _SYS_ELF_COMMON_H_ 1
-
-/*
- * ELF definitions that are independent of architecture or word size.
- */
-
-/*
- * Note header. The ".note" section contains an array of notes. Each
- * begins with this header, aligned to a word boundary. Immediately
- * following the note header is n_namesz bytes of name, padded to the
- * next word boundary. Then comes n_descsz bytes of descriptor, again
- * padded to a word boundary. The values of n_namesz and n_descsz do
- * not include the padding.
- */
-
-typedef struct {
- u_int32_t n_namesz; /* Length of name. */
- u_int32_t n_descsz; /* Length of descriptor. */
- u_int32_t n_type; /* Type of this note. */
-} Elf_Note;
-
-/* Indexes into the e_ident array. Keep synced with
- http://www.sco.com/developer/gabi/ch4.eheader.html */
-#define EI_MAG0 0 /* Magic number, byte 0. */
-#define EI_MAG1 1 /* Magic number, byte 1. */
-#define EI_MAG2 2 /* Magic number, byte 2. */
-#define EI_MAG3 3 /* Magic number, byte 3. */
-#define EI_CLASS 4 /* Class of machine. */
-#define EI_DATA 5 /* Data format. */
-#define EI_VERSION 6 /* ELF format version. */
-#define EI_OSABI 7 /* Operating system / ABI identification */
-#define EI_ABIVERSION 8 /* ABI version */
-#define OLD_EI_BRAND 8 /* Start of architecture identification. */
-#define EI_PAD 9 /* Start of padding (per SVR4 ABI). */
-#define EI_NIDENT 16 /* Size of e_ident array. */
-
-/* Values for the magic number bytes. */
-#define ELFMAG0 0x7f
-#define ELFMAG1 'E'
-#define ELFMAG2 'L'
-#define ELFMAG3 'F'
-#define ELFMAG "\177ELF" /* magic string */
-#define SELFMAG 4 /* magic string size */
-
-/* Values for e_ident[EI_VERSION] and e_version. */
-#define EV_NONE 0
-#define EV_CURRENT 1
-
-/* Values for e_ident[EI_CLASS]. */
-#define ELFCLASSNONE 0 /* Unknown class. */
-#define ELFCLASS32 1 /* 32-bit architecture. */
-#define ELFCLASS64 2 /* 64-bit architecture. */
-
-/* Values for e_ident[EI_DATA]. */
-#define ELFDATANONE 0 /* Unknown data format. */
-#define ELFDATA2LSB 1 /* 2's complement little-endian. */
-#define ELFDATA2MSB 2 /* 2's complement big-endian. */
-
-/* Values for e_ident[EI_OSABI]. */
-#define ELFOSABI_SYSV 0 /* UNIX System V ABI */
-#define ELFOSABI_NONE ELFOSABI_SYSV /* symbol used in old spec */
-#define ELFOSABI_HPUX 1 /* HP-UX operating system */
-#define ELFOSABI_NETBSD 2 /* NetBSD */
-#define ELFOSABI_LINUX 3 /* GNU/Linux */
-#define ELFOSABI_HURD 4 /* GNU/Hurd */
-#define ELFOSABI_86OPEN 5 /* 86Open common IA32 ABI */
-#define ELFOSABI_SOLARIS 6 /* Solaris */
-#define ELFOSABI_MONTEREY 7 /* Monterey */
-#define ELFOSABI_IRIX 8 /* IRIX */
-#define ELFOSABI_FREEBSD 9 /* FreeBSD */
-#define ELFOSABI_TRU64 10 /* TRU64 UNIX */
-#define ELFOSABI_MODESTO 11 /* Novell Modesto */
-#define ELFOSABI_OPENBSD 12 /* OpenBSD */
-#define ELFOSABI_ARM 97 /* ARM */
-#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
-
-/* e_ident */
-#define IS_ELF(ehdr) ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \
- (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \
- (ehdr).e_ident[EI_MAG2] == ELFMAG2 && \
- (ehdr).e_ident[EI_MAG3] == ELFMAG3)
-
-/* Values for e_type. */
-#define ET_NONE 0 /* Unknown type. */
-#define ET_REL 1 /* Relocatable. */
-#define ET_EXEC 2 /* Executable. */
-#define ET_DYN 3 /* Shared object. */
-#define ET_CORE 4 /* Core file. */
-
-/* Values for e_machine. */
-#define EM_NONE 0 /* Unknown machine. */
-#define EM_M32 1 /* AT&T WE32100. */
-#define EM_SPARC 2 /* Sun SPARC. */
-#define EM_386 3 /* Intel i386. */
-#define EM_68K 4 /* Motorola 68000. */
-#define EM_88K 5 /* Motorola 88000. */
-#define EM_486 6 /* Intel i486. */
-#define EM_860 7 /* Intel i860. */
-#define EM_MIPS 8 /* MIPS R3000 Big-Endian only */
-
-/* Extensions. This list is not complete. */
-#define EM_S370 9 /* IBM System/370 */
-#define EM_MIPS_RS4_BE 10 /* MIPS R4000 Big-Endian */ /* Depreciated */
-#define EM_PARISC 15 /* HPPA */
-#define EM_SPARC32PLUS 18 /* SPARC v8plus */
-#define EM_PPC 20 /* PowerPC 32-bit */
-#define EM_PPC64 21 /* PowerPC 64-bit */
-#define EM_ARM 40 /* ARM */
-#define EM_SPARCV9 43 /* SPARC v9 64-bit */
-#define EM_IA_64 50 /* Intel IA-64 Processor */
-#define EM_X86_64 62 /* Advanced Micro Devices x86-64 */
-#define EM_ALPHA 0x9026 /* Alpha (written in the absence of an ABI */
-
-/* Special section indexes. */
-#define SHN_UNDEF 0 /* Undefined, missing, irrelevant. */
-#define SHN_LORESERVE 0xff00 /* First of reserved range. */
-#define SHN_LOPROC 0xff00 /* First processor-specific. */
-#define SHN_HIPROC 0xff1f /* Last processor-specific. */
-#define SHN_ABS 0xfff1 /* Absolute values. */
-#define SHN_COMMON 0xfff2 /* Common data. */
-#define SHN_HIRESERVE 0xffff /* Last of reserved range. */
-
-/* sh_type */
-#define SHT_NULL 0 /* inactive */
-#define SHT_PROGBITS 1 /* program defined information */
-#define SHT_SYMTAB 2 /* symbol table section */
-#define SHT_STRTAB 3 /* string table section */
-#define SHT_RELA 4 /* relocation section with addends */
-#define SHT_HASH 5 /* symbol hash table section */
-#define SHT_DYNAMIC 6 /* dynamic section */
-#define SHT_NOTE 7 /* note section */
-#define SHT_NOBITS 8 /* no space section */
-#define SHT_REL 9 /* relocation section - no addends */
-#define SHT_SHLIB 10 /* reserved - purpose unknown */
-#define SHT_DYNSYM 11 /* dynamic symbol table section */
-#define SHT_NUM 12 /* number of section types */
-#define SHT_LOOS 0x60000000 /* First of OS specific semantics */
-#define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */
-#define SHT_LOPROC 0x70000000 /* reserved range for processor */
-#define SHT_HIPROC 0x7fffffff /* specific section header types */
-#define SHT_LOUSER 0x80000000 /* reserved range for application */
-#define SHT_HIUSER 0xffffffff /* specific indexes */
-
-/* Flags for sh_flags. */
-#define SHF_WRITE 0x1 /* Section contains writable data. */
-#define SHF_ALLOC 0x2 /* Section occupies memory. */
-#define SHF_EXECINSTR 0x4 /* Section contains instructions. */
-#define SHF_TLS 0x400 /* Section contains TLS data. */
-#define SHF_MASKPROC 0xf0000000 /* Reserved for processor-specific. */
-
-/* Values for p_type. */
-#define PT_NULL 0 /* Unused entry. */
-#define PT_LOAD 1 /* Loadable segment. */
-#define PT_DYNAMIC 2 /* Dynamic linking information segment. */
-#define PT_INTERP 3 /* Pathname of interpreter. */
-#define PT_NOTE 4 /* Auxiliary information. */
-#define PT_SHLIB 5 /* Reserved (not used). */
-#define PT_PHDR 6 /* Location of program header itself. */
-#define PT_TLS 7 /* Thread local storage segment */
-
-#define PT_COUNT 8 /* Number of defined p_type values. */
-
-#define PT_LOOS 0x60000000 /* OS-specific */
-#define PT_HIOS 0x6fffffff /* OS-specific */
-#define PT_LOPROC 0x70000000 /* First processor-specific type. */
-#define PT_HIPROC 0x7fffffff /* Last processor-specific type. */
-
-/* Values for p_flags. */
-#define PF_X 0x1 /* Executable. */
-#define PF_W 0x2 /* Writable. */
-#define PF_R 0x4 /* Readable. */
-
-/* Values for d_tag. */
-#define DT_NULL 0 /* Terminating entry. */
-#define DT_NEEDED 1 /* String table offset of a needed shared
- library. */
-#define DT_PLTRELSZ 2 /* Total size in bytes of PLT relocations. */
-#define DT_PLTGOT 3 /* Processor-dependent address. */
-#define DT_HASH 4 /* Address of symbol hash table. */
-#define DT_STRTAB 5 /* Address of string table. */
-#define DT_SYMTAB 6 /* Address of symbol table. */
-#define DT_RELA 7 /* Address of ElfNN_Rela relocations. */
-#define DT_RELASZ 8 /* Total size of ElfNN_Rela relocations. */
-#define DT_RELAENT 9 /* Size of each ElfNN_Rela relocation entry. */
-#define DT_STRSZ 10 /* Size of string table. */
-#define DT_SYMENT 11 /* Size of each symbol table entry. */
-#define DT_INIT 12 /* Address of initialization function. */
-#define DT_FINI 13 /* Address of finalization function. */
-#define DT_SONAME 14 /* String table offset of shared object
- name. */
-#define DT_RPATH 15 /* String table offset of library path. [sup] */
-#define DT_SYMBOLIC 16 /* Indicates "symbolic" linking. [sup] */
-#define DT_REL 17 /* Address of ElfNN_Rel relocations. */
-#define DT_RELSZ 18 /* Total size of ElfNN_Rel relocations. */
-#define DT_RELENT 19 /* Size of each ElfNN_Rel relocation. */
-#define DT_PLTREL 20 /* Type of relocation used for PLT. */
-#define DT_DEBUG 21 /* Reserved (not used). */
-#define DT_TEXTREL 22 /* Indicates there may be relocations in
- non-writable segments. [sup] */
-#define DT_JMPREL 23 /* Address of PLT relocations. */
-#define DT_BIND_NOW 24 /* [sup] */
-#define DT_INIT_ARRAY 25 /* Address of the array of pointers to
- initialization functions */
-#define DT_FINI_ARRAY 26 /* Address of the array of pointers to
- termination functions */
-#define DT_INIT_ARRAYSZ 27 /* Size in bytes of the array of
- initialization functions. */
-#define DT_FINI_ARRAYSZ 28 /* Size in bytes of the array of
- terminationfunctions. */
-#define DT_RUNPATH 29 /* String table offset of a null-terminated
- library search path string. */
-#define DT_FLAGS 30 /* Object specific flag values. */
-#define DT_ENCODING 32 /* Values greater than or equal to DT_ENCODING
- and less than DT_LOOS follow the rules for
- the interpretation of the d_un union
- as follows: even == 'd_ptr', even == 'd_val'
- or none */
-#define DT_PREINIT_ARRAY 32 /* Address of the array of pointers to
- pre-initialization functions. */
-#define DT_PREINIT_ARRAYSZ 33 /* Size in bytes of the array of
- pre-initialization functions. */
-
-#define DT_COUNT 33 /* Number of defined d_tag values. */
-
-#define DT_LOOS 0x6000000d /* First OS-specific */
-#define DT_HIOS 0x6fff0000 /* Last OS-specific */
-#define DT_LOPROC 0x70000000 /* First processor-specific type. */
-#define DT_HIPROC 0x7fffffff /* Last processor-specific type. */
-
-/* Values for DT_FLAGS */
-#define DF_ORIGIN 0x0001 /* Indicates that the object being loaded may
- make reference to the $ORIGIN substitution
- string */
-#define DF_SYMBOLIC 0x0002 /* Indicates "symbolic" linking. */
-#define DF_TEXTREL 0x0004 /* Indicates there may be relocations in
- non-writable segments. */
-#define DF_BIND_NOW 0x0008 /* Indicates that the dynamic linker should
- process all relocations for the object
- containing this entry before transferring
- control to the program. */
-#define DF_STATIC_TLS 0x0010 /* Indicates that the shared object or
- executable contains code using a static
- thread-local storage scheme. */
-
-/* Values for n_type. Used in core files. */
-#define NT_PRSTATUS 1 /* Process status. */
-#define NT_FPREGSET 2 /* Floating point registers. */
-#define NT_PRPSINFO 3 /* Process state info. */
-
-/* Symbol Binding - ELFNN_ST_BIND - st_info */
-#define STB_LOCAL 0 /* Local symbol */
-#define STB_GLOBAL 1 /* Global symbol */
-#define STB_WEAK 2 /* like global - lower precedence */
-#define STB_LOPROC 13 /* reserved range for processor */
-#define STB_HIPROC 15 /* specific symbol bindings */
-
-/* Symbol type - ELFNN_ST_TYPE - st_info */
-#define STT_NOTYPE 0 /* Unspecified type. */
-#define STT_OBJECT 1 /* Data object. */
-#define STT_FUNC 2 /* Function. */
-#define STT_SECTION 3 /* Section. */
-#define STT_FILE 4 /* Source file. */
-#define STT_TLS 6 /* TLS object. */
-#define STT_LOPROC 13 /* reserved range for processor */
-#define STT_HIPROC 15 /* specific symbol types */
-
-/* Special symbol table indexes. */
-#define STN_UNDEF 0 /* Undefined symbol index. */
-
-#endif /* !_SYS_ELF_COMMON_H_ */
diff --git a/winsup/cygwin/include/sys/elf_generic.h b/winsup/cygwin/include/sys/elf_generic.h
deleted file mode 100644
index dbe9f1e..0000000
--- a/winsup/cygwin/include/sys/elf_generic.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*-
- * Copyright (c) 1998 John D. Polstra.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD: src/sys/sys/elf_generic.h,v 1.6 2002/07/20 02:56:11 peter Exp $
- */
-
-#ifndef _SYS_ELF_GENERIC_H_
-#define _SYS_ELF_GENERIC_H_ 1
-
-#include <sys/cdefs.h>
-
-/*
- * Definitions of generic ELF names which relieve applications from
- * needing to know the word size.
- */
-
-#ifndef __ELF_WORD_SIZE
-# define __ELF_WORD_SIZE 32
-#endif
-
-#if __ELF_WORD_SIZE != 32 && __ELF_WORD_SIZE != 64
-#error "__ELF_WORD_SIZE must be defined as 32 or 64"
-#endif
-
-#define ELF_CLASS __CONCAT(ELFCLASS,__ELF_WORD_SIZE)
-
-#if BYTE_ORDER == LITTLE_ENDIAN
-#define ELF_DATA ELFDATA2LSB
-#elif BYTE_ORDER == BIG_ENDIAN
-#define ELF_DATA ELFDATA2MSB
-#else
-#error "Unknown byte order"
-#endif
-
-#if __ELF_WORD_SIZE == 32
-#define __elfN(x) elf32_##x
-#define __ElfN(x) Elf32_##x
-#define __ELFN(x) ELF32_##x
-#else
-#define __elfN(x) elf364_##x
-#define __ElfN(x) Elf364_##x
-#define __ELFN(x) ELF364_##x
-#endif
-#define __ElfType(x) typedef __ElfN(x) Elf_##x
-
-#define FOO
-__ElfType(Addr);
-__ElfType(Half);
-__ElfType(Off);
-__ElfType(Sword);
-__ElfType(Word);
-__ElfType(Size);
-__ElfType(Hashelt);
-__ElfType(Ehdr);
-__ElfType(Shdr);
-__ElfType(Phdr);
-__ElfType(Dyn);
-__ElfType(Rel);
-__ElfType(Rela);
-__ElfType(Sym);
-
-#define ELF_R_SYM __ELFN(R_SYM)
-#define ELF_R_TYPE __ELFN(R_TYPE)
-#define ELF_R_INFO __ELFN(R_INFO)
-#define ELF_ST_BIND __ELFN(ST_BIND)
-#define ELF_ST_TYPE __ELFN(ST_TYPE)
-#define ELF_ST_INFO __ELFN(ST_INFO)
-
-#endif /* !_SYS_ELF_GENERIC_H_ */
diff --git a/winsup/cygwin/include/sys/file.h b/winsup/cygwin/include/sys/file.h
deleted file mode 100644
index af07df4..0000000
--- a/winsup/cygwin/include/sys/file.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* This is file FILE.H */
-/*
-** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
-**
-** This file is distributed under the terms listed in the document
-** "copying.dj", available from DJ Delorie at the address above.
-** A copy of "copying.dj" should accompany this file; if not, a copy
-** should be available from where this file was obtained. This file
-** may not be distributed without a verbatim copy of "copying.dj".
-**
-** This file is distributed WITHOUT ANY WARRANTY; without even the implied
-** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-*/
-/*
- * 2003-11-27 Nicholas Wourms <nwourms@netscape.net>:
- *
- * Include sys/cdefs.h. Add function prototype for flock().
- * Add some comments from BSD's header for further clarity.
- * (L_SET, L_CURR, L_INCR, L_XTND): Redefine as the macros
- * SEEK_SET, SEEK_CUR, SEEK_CUR, & SEEK_END respectively.
- * (LOCK_SH,LOCK_EX,LOCK_NB,LOCK_UN): New macros for flock().
-*/
-#ifndef _FILE_H_
-#define _FILE_H_
-
-#include <sys/cdefs.h>
-#include <fcntl.h>
-
-/* Whence values for lseek(); renamed by POSIX 1003.1 */
-#define L_SET SEEK_SET
-#define L_CURR SEEK_CUR
-#define L_INCR SEEK_CUR
-#define L_XTND SEEK_END
-
-/* Operations for flock() function */
-#define LOCK_SH 1 /* Shared lock. */
-#define LOCK_EX 2 /* Exclusive lock. */
-#define LOCK_NB 4 /* Don't block when locking. */
-#define LOCK_UN 8 /* Unlock. */
-
-/* Operations for access function */
-#define F_OK 0 /* does file exist */
-#define X_OK 1 /* is it executable or searchable by caller */
-#define W_OK 2 /* is it writable by caller */
-#define R_OK 4 /* is it readable by caller */
-
-/* Apply or remove an advisory lock on the file fd refers to. */
-__BEGIN_DECLS
-
-int _EXFUN(flock, (int, int));
-
-__END_DECLS
-
-#endif
diff --git a/winsup/cygwin/include/sys/ioctl.h b/winsup/cygwin/include/sys/ioctl.h
deleted file mode 100644
index 1aa5aca..0000000
--- a/winsup/cygwin/include/sys/ioctl.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* sys/ioctl.h
-
- Copyright 1998, 2001, 2002, 2003, 2004, 2005, 2006 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* sys/ioctl.h */
-
-#ifndef _SYS_IOCTL_H
-#define _SYS_IOCTL_H
-
-#include <sys/cdefs.h>
-#include <sys/termios.h>
-
-__BEGIN_DECLS
-
-/* /dev/windows ioctls */
-
-#define WINDOWS_POST 0 /* Set write() behavior to PostMessage() */
-#define WINDOWS_SEND 1 /* Set write() behavior to SendMessage() */
-#define WINDOWS_HWND 2 /* Set hWnd for read() calls */
-
-/* Some standard linux defines */
-
-#define _IOC_NRBITS 8
-#define _IOC_TYPEBITS 8
-#define _IOC_SIZEBITS 14
-#define _IOC_DIRBITS 2
-
-#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1)
-#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1)
-#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1)
-#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1)
-
-#define _IOC_NRSHIFT 0
-#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS)
-#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS)
-#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS)
-
-#define _IOC_NONE 0U
-#define _IOC_WRITE 1U
-#define _IOC_READ 2U
-
-#define _IOC(dir,type,nr,size) \
- (((dir) << _IOC_DIRSHIFT) | \
- + ((type) << _IOC_TYPESHIFT) | \
- + ((nr) << _IOC_NRSHIFT) | \
- + ((size) << _IOC_SIZESHIFT))
-
-#define _LINUX_IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0)
-#define _LINUX_IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size))
-#define _LINUX_IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size))
-#define _LINUX_IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
-
-#ifdef __USE_LINUX_IOCTL_DEFS
-# define _IO _LINUX_IO
-# define _IOR _LINUX_IOR
-# define _IOW _LINUX_IOW
-# define _IOWR _LINUX_IOWR
-#endif /*__USE_LINUX_IOCTL_DEFS */
-
-int __cdecl ioctl (int __fd, int __cmd, ...);
-
-__END_DECLS
-#endif
diff --git a/winsup/cygwin/include/sys/ipc.h b/winsup/cygwin/include/sys/ipc.h
deleted file mode 100644
index e615bd7..0000000
--- a/winsup/cygwin/include/sys/ipc.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* sys/ipc.h
-
- 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. */
-
-/* sys/ipc.h header file for Cygwin. */
-
-#ifndef _SYS_IPC_H
-#define _SYS_IPC_H
-
-#include <cygwin/ipc.h>
-
-#endif /* _SYS_IPC_H */
diff --git a/winsup/cygwin/include/sys/kd.h b/winsup/cygwin/include/sys/kd.h
deleted file mode 100644
index 5900efd..0000000
--- a/winsup/cygwin/include/sys/kd.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* sys/kd.h
-
- Copyright 2006 Red Hat, Inc.
-
- Written by Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
-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. */
-
-/* sys/kd.h header file for Cygwin. */
-
-#ifndef _SYS_KD_H
-#define _SYS_KD_H
-
-#include <cygwin/kd.h>
-
-#endif /* _SYS_KD_H */
diff --git a/winsup/cygwin/include/sys/lock.h b/winsup/cygwin/include/sys/lock.h
deleted file mode 100644
index abed827..0000000
--- a/winsup/cygwin/include/sys/lock.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* sys/lock.h
-
- Copyright 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. */
-
-#ifndef _SYS_LOCK_H_
-#define _SYS_LOCK_H_
-
-typedef void *_LOCK_T;
-#define _LOCK_RECURSIVE_T _LOCK_T
-
-/*
- * This must match cygwins PTHREAD_XXX_MUTEX_INITIALIZER_NP which are
- * defined in <pthread.h>
- */
-#define _LOCK_T_RECURSIVE_INITIALIZER ((_LOCK_T)18)
-#define _LOCK_T_INITIALIZER ((_LOCK_T)19)
-
-#define __LOCK_INIT(CLASS,NAME) \
- CLASS _LOCK_T NAME = _LOCK_T_INITIALIZER;
-#define __LOCK_INIT_RECURSIVE(CLASS,NAME) \
- CLASS _LOCK_T NAME = _LOCK_T_RECURSIVE_INITIALIZER;
-
-#define __lock_init(__lock) __cygwin_lock_init(&__lock)
-#define __lock_init_recursive(__lock) __cygwin_lock_init_recursive(&__lock)
-#define __lock_close(__lock) __cygwin_lock_fini(&__lock)
-#define __lock_close_recursive(__lock) __cygwin_lock_fini(&__lock)
-#define __lock_acquire(__lock) __cygwin_lock_lock(&__lock)
-#define __lock_acquire_recursive(__lock) __cygwin_lock_lock(&__lock)
-#define __lock_try_acquire(lock) __cygwin_lock_trylock(&__lock)
-#define __lock_try_acquire_recursive(lock) __cygwin_lock_trylock(&__lock)
-#define __lock_release(__lock) __cygwin_lock_unlock(&__lock)
-#define __lock_release_recursive(__lock) __cygwin_lock_unlock(&__lock)
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-void __cygwin_lock_init(_LOCK_T *);
-void __cygwin_lock_init_recursive(_LOCK_T *);
-void __cygwin_lock_fini(_LOCK_T *);
-void __cygwin_lock_lock(_LOCK_T *);
-int __cygwin_lock_trylock(_LOCK_T *);
-void __cygwin_lock_unlock(_LOCK_T *);
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/winsup/cygwin/include/sys/mman.h b/winsup/cygwin/include/sys/mman.h
deleted file mode 100644
index 234de80..0000000
--- a/winsup/cygwin/include/sys/mman.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* sys/mman.h
-
- Copyright 1996, 1997, 1998, 2000, 2001, 2003, 2005, 2007 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 _SYS_MMAN_H_
-#define _SYS_MMAN_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include <stddef.h>
-#include <sys/types.h>
-
-#define PROT_NONE 0
-#define PROT_READ 1
-#define PROT_WRITE 2
-#define PROT_EXEC 4
-
-#define MAP_FILE 0
-#define MAP_SHARED 1
-#define MAP_PRIVATE 2
-#define MAP_TYPE 0xF
-#define MAP_FIXED 0x10
-#define MAP_ANONYMOUS 0x20
-#define MAP_ANON MAP_ANONYMOUS
-/* Non-standard flag */
-#define MAP_NORESERVE 0x4000 /* Don't reserve swap space for this mapping.
- Page protection must be set explicitely
- to access page. Only supported for anonymous
- private mappings. */
-#define MAP_AUTOGROW 0x8000 /* Grow underlying object to mapping size.
- File must be opened for writing. */
-
-#define MAP_FAILED ((void *)-1)
-
-/*
- * Flags for msync.
- */
-#define MS_ASYNC 1
-#define MS_SYNC 2
-#define MS_INVALIDATE 4
-
-/*
- * Flags for posix_madvise.
- */
-#define POSIX_MADV_NORMAL 0
-#define POSIX_MADV_SEQUENTIAL 1
-#define POSIX_MADV_RANDOM 2
-#define POSIX_MADV_WILLNEED 3
-#define POSIX_MADV_DONTNEED 4
-
-#ifndef __INSIDE_CYGWIN__
-extern void *mmap (void *__addr, size_t __len, int __prot, int __flags, int __fd, off_t __off);
-#endif
-extern int munmap (void *__addr, size_t __len);
-extern int mprotect (void *__addr, size_t __len, int __prot);
-extern int msync (void *__addr, size_t __len, int __flags);
-extern int mlock (const void *__addr, size_t __len);
-extern int munlock (const void *__addr, size_t __len);
-
-extern int posix_madvise (void *__addr, size_t __len, int __advice);
-
-extern int shm_open (const char *__name, int __oflag, mode_t __mode);
-extern int shm_unlink (const char *__name);
-
-#ifdef __cplusplus
-};
-#endif /* __cplusplus */
-
-#endif /* _SYS_MMAN_H_ */
diff --git a/winsup/cygwin/include/sys/mount.h b/winsup/cygwin/include/sys/mount.h
deleted file mode 100644
index 45b421e..0000000
--- a/winsup/cygwin/include/sys/mount.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* sys/mount.h
-
- Copyright 1998, 1999, 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_MOUNT_H
-#define _SYS_MOUNT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-enum
-{
- MOUNT_SYMLINK = 0x0001, /* "mount point" is a symlink */
- MOUNT_BINARY = 0x0002, /* "binary" format read/writes */
- MOUNT_SYSTEM = 0x0008, /* mount point came from system table */
- MOUNT_EXEC = 0x0010, /* Any file in the mounted directory gets 'x' bit */
- MOUNT_CYGDRIVE = 0x0020, /* mount point refers to cygdrive device mount */
- MOUNT_CYGWIN_EXEC = 0x0040, /* file or directory is or contains a cygwin
- executable */
- MOUNT_MIXED = 0x0080, /* reads are text, writes are binary
- not yet implemented */
- MOUNT_NOTEXEC = 0x0100, /* don't check files for executable magic */
- MOUNT_DEVFS = 0x0200, /* /device "filesystem" */
- MOUNT_PROC = 0x0400, /* /proc "filesystem" */
- MOUNT_RO = 0x1000, /* read-only "filesystem" */
- MOUNT_NOACL = 0x2000, /* support reading/writing ACLs */
- MOUNT_NOPOSIX = 0x4000 /* Case insensitve path handling */
-};
-
-int mount (const char *, const char *, unsigned __flags);
-int umount (const char *);
-int cygwin_umount (const char *__path, unsigned __flags);
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif /* _SYS_MOUNT_H */
diff --git a/winsup/cygwin/include/sys/msg.h b/winsup/cygwin/include/sys/msg.h
deleted file mode 100644
index a554ab4..0000000
--- a/winsup/cygwin/include/sys/msg.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* sys/msg.h
-
- 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. */
-
-/* sys/msg.h header file for Cygwin. */
-
-#ifndef _SYS_MSG_H
-#define _SYS_MSG_H
-
-#include <cygwin/msg.h>
-
-#endif /* _SYS_MSG_H */
diff --git a/winsup/cygwin/include/sys/mtio.h b/winsup/cygwin/include/sys/mtio.h
deleted file mode 100644
index 84812bd..0000000
--- a/winsup/cygwin/include/sys/mtio.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* sys/mtio.h
-
- Copyright 1999, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* sys/mtio.h header file for Cygwin. */
-
-#ifndef _SYS_MTIO_H
-#define _SYS_MTIO_H
-
-#include <cygwin/mtio.h>
-
-#endif /* _SYS_MTIO_H */
diff --git a/winsup/cygwin/include/sys/param.h b/winsup/cygwin/include/sys/param.h
deleted file mode 100644
index 00a9b5e..0000000
--- a/winsup/cygwin/include/sys/param.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* sys/param.h
-
- Copyright 2001, 2003, 2007 Red Hat, Inc.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#ifndef _SYS_PARAM_H
-#define _SYS_PARAM_H
-
-#include <sys/types.h>
-/* Linux includes limits.h, but this is not universally done. */
-#include <limits.h>
-
-/* Max number of open files. The Posix version is OPEN_MAX. */
-/* Number of fds is virtually unlimited in cygwin, but we must provide
- some reasonable value for Posix conformance */
-#define NOFILE 8192
-
-/* Max number of groups; must keep in sync with NGROUPS_MAX in limits.h */
-#define NGROUPS 16
-
-/* Ticks/second for system calls such as times() */
-/* FIXME: is this the appropriate value? */
-#define HZ 1000
-
-/* Max hostname size that can be dealt with */
-/* FIXME: is this the appropriate value? */
-#define MAXHOSTNAMELEN 64
-
-/* The Posix version is PATH_MAX. MAXPATHLEN is the BSD variant. */
-#define MAXPATHLEN PATH_MAX
-
-/* This is the number of bytes per block given in the st_blocks stat member.
- It should be in sync with S_BLKSIZE in sys/stat.h. S_BLKSIZE is the
- BSD variant of this constant. */
-#define DEV_BSIZE 1024
-
-#if 0 /* defined in endian.h */
-/* Some autoconf'd packages check for endianness. When cross-building we
- can't run programs on the target. Fortunately, autoconf supports the
- definition of byte order in sys/param.h (that's us!).
- The values here are the same as used in gdb/defs.h (are the more
- appropriate values?). */
-#define BIG_ENDIAN 4321
-#define LITTLE_ENDIAN 1234
-
-/* All known win32 systems are little endian. */
-#define BYTE_ORDER LITTLE_ENDIAN
-#endif
-
-#ifndef NULL
-#define NULL 0L
-#endif
-
-#ifndef NBBY
-#define NBBY 8
-#endif
-
-/* Bit map related macros. */
-#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY))
-#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
-#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
-#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
-
-/* Macros for counting and rounding. */
-#ifndef howmany
-#define howmany(x, y) (((x)+((y)-1))/(y))
-#endif
-#define rounddown(x, y) (((x)/(y))*(y))
-#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* to any y */
-#define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */
-#define powerof2(x) ((((x)-1)&(x))==0)
-
-/* Macros for min/max. */
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#define MAX(a,b) (((a)>(b))?(a):(b))
-
-#endif
diff --git a/winsup/cygwin/include/sys/poll.h b/winsup/cygwin/include/sys/poll.h
deleted file mode 100644
index 7fd1c6e..0000000
--- a/winsup/cygwin/include/sys/poll.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* sys/poll.h
-
- Copyright 2000, 2001, 2006 Red Hat, Inc.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#ifndef _SYS_POLL_H
-#define _SYS_POLL_H
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-
-#define POLLIN 1 /* Set if data to read. */
-#define POLLPRI 2 /* Set if urgent data to read. */
-#define POLLOUT 4 /* Set if writing data wouldn't block. */
-#define POLLERR 8 /* An error occured. */
-#define POLLHUP 16 /* Shutdown or close happened. */
-#define POLLNVAL 32 /* Invalid file descriptor. */
-
-#define NPOLLFILE 64 /* Number of canonical fd's in one call to poll(). */
-
-/* The following values are defined by XPG4. */
-#define POLLRDNORM POLLIN
-#define POLLRDBAND POLLPRI
-#define POLLWRNORM POLLOUT
-#define POLLWRBAND POLLOUT
-
-struct pollfd {
- int fd;
- short events;
- short revents;
-};
-
-typedef unsigned int nfds_t;
-
-extern int poll __P ((struct pollfd *fds, nfds_t nfds, int timeout));
-
-__END_DECLS
-
-#endif /* _SYS_POLL_H */
diff --git a/winsup/cygwin/include/sys/procfs.h b/winsup/cygwin/include/sys/procfs.h
deleted file mode 100644
index 78485f6..0000000
--- a/winsup/cygwin/include/sys/procfs.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* sys/procfs.h
-
- Copyright 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* sys/procfs.h header file for Cygwin. */
-
-#ifndef _SYS_PROCFS_H
-#define _SYS_PROCFS_H
-
-#include <cygwin/core_dump.h>
-
-#endif /* _SYS_PROCFS_H */
diff --git a/winsup/cygwin/include/sys/queue.h b/winsup/cygwin/include/sys/queue.h
deleted file mode 100644
index a62d82a..0000000
--- a/winsup/cygwin/include/sys/queue.h
+++ /dev/null
@@ -1,512 +0,0 @@
-/*
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)queue.h 8.5 (Berkeley) 8/20/94
- * $FreeBSD: /repoman/r/ncvs/src/sys/sys/queue.h,v 1.56 2003/08/14 14:49:26 kan Exp $
- */
-
-#ifndef _SYS_QUEUE_H_
-#define _SYS_QUEUE_H_
-
-#include <sys/cdefs.h>
-
-/*
- * This file defines four types of data structures: singly-linked lists,
- * singly-linked tail queues, lists and tail queues.
- *
- * A singly-linked list is headed by a single forward pointer. The elements
- * are singly linked for minimum space and pointer manipulation overhead at
- * the expense of O(n) removal for arbitrary elements. New elements can be
- * added to the list after an existing element or at the head of the list.
- * Elements being removed from the head of the list should use the explicit
- * macro for this purpose for optimum efficiency. A singly-linked list may
- * only be traversed in the forward direction. Singly-linked lists are ideal
- * for applications with large datasets and few or no removals or for
- * implementing a LIFO queue.
- *
- * A singly-linked tail queue is headed by a pair of pointers, one to the
- * head of the list and the other to the tail of the list. The elements are
- * singly linked for minimum space and pointer manipulation overhead at the
- * expense of O(n) removal for arbitrary elements. New elements can be added
- * to the list after an existing element, at the head of the list, or at the
- * end of the list. Elements being removed from the head of the tail queue
- * should use the explicit macro for this purpose for optimum efficiency.
- * A singly-linked tail queue may only be traversed in the forward direction.
- * Singly-linked tail queues are ideal for applications with large datasets
- * and few or no removals or for implementing a FIFO queue.
- *
- * A list is headed by a single forward pointer (or an array of forward
- * pointers for a hash table header). The elements are doubly linked
- * so that an arbitrary element can be removed without a need to
- * traverse the list. New elements can be added to the list before
- * or after an existing element or at the head of the list. A list
- * may only be traversed in the forward direction.
- *
- * A tail queue is headed by a pair of pointers, one to the head of the
- * list and the other to the tail of the list. The elements are doubly
- * linked so that an arbitrary element can be removed without a need to
- * traverse the list. New elements can be added to the list before or
- * after an existing element, at the head of the list, or at the end of
- * the list. A tail queue may be traversed in either direction.
- *
- * For details on the use of these macros, see the queue(3) manual page.
- *
- *
- * SLIST LIST STAILQ TAILQ
- * _HEAD + + + +
- * _HEAD_INITIALIZER + + + +
- * _ENTRY + + + +
- * _INIT + + + +
- * _EMPTY + + + +
- * _FIRST + + + +
- * _NEXT + + + +
- * _PREV - - - +
- * _LAST - - + +
- * _FOREACH + + + +
- * _FOREACH_SAFE + + + +
- * _FOREACH_REVERSE - - - +
- * _FOREACH_REVERSE_SAFE - - - +
- * _INSERT_HEAD + + + +
- * _INSERT_BEFORE - + - +
- * _INSERT_AFTER + + + +
- * _INSERT_TAIL - - + +
- * _CONCAT - - + +
- * _REMOVE_HEAD + - + -
- * _REMOVE + + + +
- *
- */
-#define QUEUE_MACRO_DEBUG 0
-#if QUEUE_MACRO_DEBUG
-/* Store the last 2 places the queue element or head was altered */
-struct qm_trace {
- char * lastfile;
- int lastline;
- char * prevfile;
- int prevline;
-};
-
-#define TRACEBUF struct qm_trace trace;
-#define TRASHIT(x) do {(x) = (void *)-1;} while (0)
-
-#define QMD_TRACE_HEAD(head) do { \
- (head)->trace.prevline = (head)->trace.lastline; \
- (head)->trace.prevfile = (head)->trace.lastfile; \
- (head)->trace.lastline = __LINE__; \
- (head)->trace.lastfile = __FILE__; \
-} while (0)
-
-#define QMD_TRACE_ELEM(elem) do { \
- (elem)->trace.prevline = (elem)->trace.lastline; \
- (elem)->trace.prevfile = (elem)->trace.lastfile; \
- (elem)->trace.lastline = __LINE__; \
- (elem)->trace.lastfile = __FILE__; \
-} while (0)
-
-#else
-#define QMD_TRACE_ELEM(elem)
-#define QMD_TRACE_HEAD(head)
-#define TRACEBUF
-#define TRASHIT(x)
-#endif /* QUEUE_MACRO_DEBUG */
-
-/*
- * Singly-linked List declarations.
- */
-#define SLIST_HEAD(name, type) \
-struct name { \
- struct type *slh_first; /* first element */ \
-}
-
-#define SLIST_HEAD_INITIALIZER(head) \
- { NULL }
-
-#undef SLIST_ENTRY
-#define SLIST_ENTRY(type) \
-struct { \
- struct type *sle_next; /* next element */ \
-}
-
-/*
- * Singly-linked List functions.
- */
-#define SLIST_EMPTY(head) ((head)->slh_first == NULL)
-
-#define SLIST_FIRST(head) ((head)->slh_first)
-
-#define SLIST_FOREACH(var, head, field) \
- for ((var) = SLIST_FIRST((head)); \
- (var); \
- (var) = SLIST_NEXT((var), field))
-
-#define SLIST_FOREACH_SAFE(var, head, field, tvar) \
- for ((var) = SLIST_FIRST((head)); \
- (var) && ((tvar) = SLIST_NEXT((var), field), 1); \
- (var) = (tvar))
-
-#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \
- for ((varp) = &SLIST_FIRST((head)); \
- ((var) = *(varp)) != NULL; \
- (varp) = &SLIST_NEXT((var), field))
-
-#define SLIST_INIT(head) do { \
- SLIST_FIRST((head)) = NULL; \
-} while (0)
-
-#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \
- SLIST_NEXT((elm), field) = SLIST_NEXT((slistelm), field); \
- SLIST_NEXT((slistelm), field) = (elm); \
-} while (0)
-
-#define SLIST_INSERT_HEAD(head, elm, field) do { \
- SLIST_NEXT((elm), field) = SLIST_FIRST((head)); \
- SLIST_FIRST((head)) = (elm); \
-} while (0)
-
-#define SLIST_NEXT(elm, field) ((elm)->field.sle_next)
-
-#define SLIST_REMOVE(head, elm, type, field) do { \
- if (SLIST_FIRST((head)) == (elm)) { \
- SLIST_REMOVE_HEAD((head), field); \
- } \
- else { \
- struct type *curelm = SLIST_FIRST((head)); \
- while (SLIST_NEXT(curelm, field) != (elm)) \
- curelm = SLIST_NEXT(curelm, field); \
- SLIST_NEXT(curelm, field) = \
- SLIST_NEXT(SLIST_NEXT(curelm, field), field); \
- } \
-} while (0)
-
-#define SLIST_REMOVE_HEAD(head, field) do { \
- SLIST_FIRST((head)) = SLIST_NEXT(SLIST_FIRST((head)), field); \
-} while (0)
-
-/*
- * Singly-linked Tail queue declarations.
- */
-#define STAILQ_HEAD(name, type) \
-struct name { \
- struct type *stqh_first;/* first element */ \
- struct type **stqh_last;/* addr of last next element */ \
-}
-
-#define STAILQ_HEAD_INITIALIZER(head) \
- { NULL, &(head).stqh_first }
-
-#define STAILQ_ENTRY(type) \
-struct { \
- struct type *stqe_next; /* next element */ \
-}
-
-/*
- * Singly-linked Tail queue functions.
- */
-#define STAILQ_CONCAT(head1, head2) do { \
- if (!STAILQ_EMPTY((head2))) { \
- *(head1)->stqh_last = (head2)->stqh_first; \
- (head1)->stqh_last = (head2)->stqh_last; \
- STAILQ_INIT((head2)); \
- } \
-} while (0)
-
-#define STAILQ_EMPTY(head) ((head)->stqh_first == NULL)
-
-#define STAILQ_FIRST(head) ((head)->stqh_first)
-
-#define STAILQ_FOREACH(var, head, field) \
- for((var) = STAILQ_FIRST((head)); \
- (var); \
- (var) = STAILQ_NEXT((var), field))
-
-
-#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \
- for ((var) = STAILQ_FIRST((head)); \
- (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \
- (var) = (tvar))
-
-#define STAILQ_INIT(head) do { \
- STAILQ_FIRST((head)) = NULL; \
- (head)->stqh_last = &STAILQ_FIRST((head)); \
-} while (0)
-
-#define STAILQ_INSERT_AFTER(head, tqelm, elm, field) do { \
- if ((STAILQ_NEXT((elm), field) = STAILQ_NEXT((tqelm), field)) == NULL)\
- (head)->stqh_last = &STAILQ_NEXT((elm), field); \
- STAILQ_NEXT((tqelm), field) = (elm); \
-} while (0)
-
-#define STAILQ_INSERT_HEAD(head, elm, field) do { \
- if ((STAILQ_NEXT((elm), field) = STAILQ_FIRST((head))) == NULL) \
- (head)->stqh_last = &STAILQ_NEXT((elm), field); \
- STAILQ_FIRST((head)) = (elm); \
-} while (0)
-
-#define STAILQ_INSERT_TAIL(head, elm, field) do { \
- STAILQ_NEXT((elm), field) = NULL; \
- *(head)->stqh_last = (elm); \
- (head)->stqh_last = &STAILQ_NEXT((elm), field); \
-} while (0)
-
-#define STAILQ_LAST(head, type, field) \
- (STAILQ_EMPTY((head)) ? \
- NULL : \
- ((struct type *) \
- ((char *)((head)->stqh_last) - __offsetof(struct type, field))))
-
-#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next)
-
-#define STAILQ_REMOVE(head, elm, type, field) do { \
- if (STAILQ_FIRST((head)) == (elm)) { \
- STAILQ_REMOVE_HEAD((head), field); \
- } \
- else { \
- struct type *curelm = STAILQ_FIRST((head)); \
- while (STAILQ_NEXT(curelm, field) != (elm)) \
- curelm = STAILQ_NEXT(curelm, field); \
- if ((STAILQ_NEXT(curelm, field) = \
- STAILQ_NEXT(STAILQ_NEXT(curelm, field), field)) == NULL)\
- (head)->stqh_last = &STAILQ_NEXT((curelm), field);\
- } \
-} while (0)
-
-#define STAILQ_REMOVE_HEAD(head, field) do { \
- if ((STAILQ_FIRST((head)) = \
- STAILQ_NEXT(STAILQ_FIRST((head)), field)) == NULL) \
- (head)->stqh_last = &STAILQ_FIRST((head)); \
-} while (0)
-
-#define STAILQ_REMOVE_HEAD_UNTIL(head, elm, field) do { \
- if ((STAILQ_FIRST((head)) = STAILQ_NEXT((elm), field)) == NULL) \
- (head)->stqh_last = &STAILQ_FIRST((head)); \
-} while (0)
-
-/*
- * List declarations.
- */
-#define LIST_HEAD(name, type) \
-struct name { \
- struct type *lh_first; /* first element */ \
-}
-
-#define LIST_HEAD_INITIALIZER(head) \
- { NULL }
-
-#define LIST_ENTRY(type) \
-struct { \
- struct type *le_next; /* next element */ \
- struct type **le_prev; /* address of previous next element */ \
-}
-
-/*
- * List functions.
- */
-
-#define LIST_EMPTY(head) ((head)->lh_first == NULL)
-
-#define LIST_FIRST(head) ((head)->lh_first)
-
-#define LIST_FOREACH(var, head, field) \
- for ((var) = LIST_FIRST((head)); \
- (var); \
- (var) = LIST_NEXT((var), field))
-
-#define LIST_FOREACH_SAFE(var, head, field, tvar) \
- for ((var) = LIST_FIRST((head)); \
- (var) && ((tvar) = LIST_NEXT((var), field), 1); \
- (var) = (tvar))
-
-#define LIST_INIT(head) do { \
- LIST_FIRST((head)) = NULL; \
-} while (0)
-
-#define LIST_INSERT_AFTER(listelm, elm, field) do { \
- if ((LIST_NEXT((elm), field) = LIST_NEXT((listelm), field)) != NULL)\
- LIST_NEXT((listelm), field)->field.le_prev = \
- &LIST_NEXT((elm), field); \
- LIST_NEXT((listelm), field) = (elm); \
- (elm)->field.le_prev = &LIST_NEXT((listelm), field); \
-} while (0)
-
-#define LIST_INSERT_BEFORE(listelm, elm, field) do { \
- (elm)->field.le_prev = (listelm)->field.le_prev; \
- LIST_NEXT((elm), field) = (listelm); \
- *(listelm)->field.le_prev = (elm); \
- (listelm)->field.le_prev = &LIST_NEXT((elm), field); \
-} while (0)
-
-#define LIST_INSERT_HEAD(head, elm, field) do { \
- if ((LIST_NEXT((elm), field) = LIST_FIRST((head))) != NULL) \
- LIST_FIRST((head))->field.le_prev = &LIST_NEXT((elm), field);\
- LIST_FIRST((head)) = (elm); \
- (elm)->field.le_prev = &LIST_FIRST((head)); \
-} while (0)
-
-#define LIST_NEXT(elm, field) ((elm)->field.le_next)
-
-#define LIST_REMOVE(elm, field) do { \
- if (LIST_NEXT((elm), field) != NULL) \
- LIST_NEXT((elm), field)->field.le_prev = \
- (elm)->field.le_prev; \
- *(elm)->field.le_prev = LIST_NEXT((elm), field); \
-} while (0)
-
-/*
- * Tail queue declarations.
- */
-#define TAILQ_HEAD(name, type) \
-struct name { \
- struct type *tqh_first; /* first element */ \
- struct type **tqh_last; /* addr of last next element */ \
- TRACEBUF \
-}
-
-#define TAILQ_HEAD_INITIALIZER(head) \
- { NULL, &(head).tqh_first }
-
-#define TAILQ_ENTRY(type) \
-struct { \
- struct type *tqe_next; /* next element */ \
- struct type **tqe_prev; /* address of previous next element */ \
- TRACEBUF \
-}
-
-/*
- * Tail queue functions.
- */
-#define TAILQ_CONCAT(head1, head2, field) do { \
- if (!TAILQ_EMPTY(head2)) { \
- *(head1)->tqh_last = (head2)->tqh_first; \
- (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \
- (head1)->tqh_last = (head2)->tqh_last; \
- TAILQ_INIT((head2)); \
- QMD_TRACE_HEAD(head); \
- QMD_TRACE_HEAD(head2); \
- } \
-} while (0)
-
-#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL)
-
-#define TAILQ_FIRST(head) ((head)->tqh_first)
-
-#define TAILQ_FOREACH(var, head, field) \
- for ((var) = TAILQ_FIRST((head)); \
- (var); \
- (var) = TAILQ_NEXT((var), field))
-
-#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \
- for ((var) = TAILQ_FIRST((head)); \
- (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \
- (var) = (tvar))
-
-#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
- for ((var) = TAILQ_LAST((head), headname); \
- (var); \
- (var) = TAILQ_PREV((var), headname, field))
-
-#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \
- for ((var) = TAILQ_LAST((head), headname); \
- (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \
- (var) = (tvar))
-
-#define TAILQ_INIT(head) do { \
- TAILQ_FIRST((head)) = NULL; \
- (head)->tqh_last = &TAILQ_FIRST((head)); \
- QMD_TRACE_HEAD(head); \
-} while (0)
-
-#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
- if ((TAILQ_NEXT((elm), field) = TAILQ_NEXT((listelm), field)) != NULL)\
- TAILQ_NEXT((elm), field)->field.tqe_prev = \
- &TAILQ_NEXT((elm), field); \
- else { \
- (head)->tqh_last = &TAILQ_NEXT((elm), field); \
- QMD_TRACE_HEAD(head); \
- } \
- TAILQ_NEXT((listelm), field) = (elm); \
- (elm)->field.tqe_prev = &TAILQ_NEXT((listelm), field); \
- QMD_TRACE_ELEM(&(elm)->field); \
- QMD_TRACE_ELEM(&listelm->field); \
-} while (0)
-
-#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \
- (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
- TAILQ_NEXT((elm), field) = (listelm); \
- *(listelm)->field.tqe_prev = (elm); \
- (listelm)->field.tqe_prev = &TAILQ_NEXT((elm), field); \
- QMD_TRACE_ELEM(&(elm)->field); \
- QMD_TRACE_ELEM(&listelm->field); \
-} while (0)
-
-#define TAILQ_INSERT_HEAD(head, elm, field) do { \
- if ((TAILQ_NEXT((elm), field) = TAILQ_FIRST((head))) != NULL) \
- TAILQ_FIRST((head))->field.tqe_prev = \
- &TAILQ_NEXT((elm), field); \
- else \
- (head)->tqh_last = &TAILQ_NEXT((elm), field); \
- TAILQ_FIRST((head)) = (elm); \
- (elm)->field.tqe_prev = &TAILQ_FIRST((head)); \
- QMD_TRACE_HEAD(head); \
- QMD_TRACE_ELEM(&(elm)->field); \
-} while (0)
-
-#define TAILQ_INSERT_TAIL(head, elm, field) do { \
- TAILQ_NEXT((elm), field) = NULL; \
- (elm)->field.tqe_prev = (head)->tqh_last; \
- *(head)->tqh_last = (elm); \
- (head)->tqh_last = &TAILQ_NEXT((elm), field); \
- QMD_TRACE_HEAD(head); \
- QMD_TRACE_ELEM(&(elm)->field); \
-} while (0)
-
-#define TAILQ_LAST(head, headname) \
- (*(((struct headname *)((head)->tqh_last))->tqh_last))
-
-#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
-
-#define TAILQ_PREV(elm, headname, field) \
- (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
-
-#define TAILQ_REMOVE(head, elm, field) do { \
- if ((TAILQ_NEXT((elm), field)) != NULL) \
- TAILQ_NEXT((elm), field)->field.tqe_prev = \
- (elm)->field.tqe_prev; \
- else { \
- (head)->tqh_last = (elm)->field.tqe_prev; \
- QMD_TRACE_HEAD(head); \
- } \
- *(elm)->field.tqe_prev = TAILQ_NEXT((elm), field); \
- TRASHIT((elm)->field.tqe_next); \
- TRASHIT((elm)->field.tqe_prev); \
- QMD_TRACE_ELEM(&(elm)->field); \
-} while (0)
-
-#endif /* !_SYS_QUEUE_H_ */
diff --git a/winsup/cygwin/include/sys/resource.h b/winsup/cygwin/include/sys/resource.h
deleted file mode 100644
index d2de569..0000000
--- a/winsup/cygwin/include/sys/resource.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* sys/resource.h
-
- Copyright 1997, 1998, 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_RESOURCE_H_
-#define _SYS_RESOURCE_H_
-
-#include <sys/time.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Used for get/setpriority */
-#define PRIO_PROCESS 0
-#define PRIO_PGRP 1
-#define PRIO_USER 2
-
-#define RLIMIT_CPU 0 /* CPU time in seconds */
-#define RLIMIT_FSIZE 1 /* Maximum filesize */
-#define RLIMIT_DATA 2 /* max data size */
-#define RLIMIT_STACK 3 /* max stack size */
-#define RLIMIT_CORE 4 /* max core file size */
-#define RLIMIT_NOFILE 5 /* max number of open files */
-#define RLIMIT_OFILE RLIMIT_NOFILE /* BSD name */
-#define RLIMIT_AS 6 /* address space (virt. memory) limit */
-
-#define RLIMIT_NLIMITS 7 /* upper bound of RLIMIT_* defines */
-#define RLIM_NLIMITS RLIMIT_NLIMITS
-
-#define RLIM_INFINITY (0xffffffffUL)
-#define RLIM_SAVED_MAX RLIM_INFINITY
-#define RLIM_SAVED_CUR RLIM_INFINITY
-
-typedef unsigned long rlim_t;
-
-struct rlimit {
- rlim_t rlim_cur;
- rlim_t rlim_max;
-};
-
-#define RUSAGE_SELF 0 /* calling process */
-#define RUSAGE_CHILDREN -1 /* terminated child processes */
-
-struct rusage {
- struct timeval ru_utime; /* user time used */
- struct timeval ru_stime; /* system time used */
- long ru_maxrss;
- long ru_ixrss; /* XXX: 0 */
- long ru_idrss; /* XXX: sum of rm_asrss */
- long ru_isrss; /* XXX: 0 */
- long ru_minflt; /* any page faults not requiring I/O */
- long ru_majflt; /* any page faults requiring I/O */
- long ru_nswap; /* swaps */
- long ru_inblock; /* block input operations */
- long ru_oublock; /* block output operations */
- long ru_msgsnd; /* messages sent */
- long ru_msgrcv; /* messages received */
- long ru_nsignals; /* signals received */
- long ru_nvcsw; /* voluntary context switches */
- long ru_nivcsw; /* involuntary " */
-#define ru_last ru_nivcsw
-};
-
-int getrlimit (int __resource, struct rlimit *__rlp);
-int setrlimit (int __resource, const struct rlimit *__rlp);
-
-int getrusage (int __who, struct rusage *__rusage);
-
-int getpriority (int which, id_t who);
-int setpriority (int which, id_t who, int value);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
diff --git a/winsup/cygwin/include/sys/select.h b/winsup/cygwin/include/sys/select.h
deleted file mode 100644
index b0f3283..0000000
--- a/winsup/cygwin/include/sys/select.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* select.h
- Copyright 1998, 1999, 2000, 2001 Red Hat, Inc.
-
- Written by Geoffrey Noer <noer@cygnus.com>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_SELECT_H
-#define _SYS_SELECT_H
-
-#if !defined (_POSIX_SOURCE) && !defined (__INSIDE_CYGWIN_NET__)
-
-#include <sys/cdefs.h>
-
-/* Get fd_set, and macros like FD_SET */
-#include <sys/types.h>
-
-/* Get definition of timeval. */
-#include <sys/time.h>
-#include <time.h>
-
-/* Get definition of sigset_t. */
-#include <signal.h>
-
-__BEGIN_DECLS
-
-int select __P ((int __n, fd_set *__readfds, fd_set *__writefds,
- fd_set *__exceptfds, struct timeval *__timeout));
-int pselect __P ((int __n, fd_set *__readfds, fd_set *__writefds,
- fd_set *__exceptfds, const struct timespec *__timeout,
- const sigset_t *__set));
-
-__END_DECLS
-
-#endif /* !_POSIX_SOURCE, !__INSIDE_CYGWIN_NET__ */
-
-#endif /* sys/select.h */
diff --git a/winsup/cygwin/include/sys/sem.h b/winsup/cygwin/include/sys/sem.h
deleted file mode 100644
index f7bdb59..0000000
--- a/winsup/cygwin/include/sys/sem.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* sys/sem.h
-
- 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. */
-
-/* sys/sem.h header file for Cygwin. */
-
-#ifndef _SYS_SEM_H
-#define _SYS_SEM_H
-
-#include <cygwin/sem.h>
-
-#endif /* _SYS_SEM_H */
diff --git a/winsup/cygwin/include/sys/shm.h b/winsup/cygwin/include/sys/shm.h
deleted file mode 100644
index 2f0c380..0000000
--- a/winsup/cygwin/include/sys/shm.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* sys/shm.h
-
- 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. */
-
-/* sys/shm.h header file for Cygwin. */
-
-#ifndef _SYS_SHM_H
-#define _SYS_SHM_H
-
-#include <cygwin/shm.h>
-
-#endif /* _SYS_SHM_H */
diff --git a/winsup/cygwin/include/sys/smallprint.h b/winsup/cygwin/include/sys/smallprint.h
deleted file mode 100644
index 9593d4d..0000000
--- a/winsup/cygwin/include/sys/smallprint.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* sys/smallprint.h
-
- Copyright 1998, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_SMALLPRINT_H
-#define _SYS_SMALLPRINT_H
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int __small_sprintf (char *__dst, const char *__fmt, ...);
-int __small_vsprintf (char *__dst, const char *__fmt, va_list __ap);
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif /* _SYS_SMALLPRINT_H */
diff --git a/winsup/cygwin/include/sys/socket.h b/winsup/cygwin/include/sys/socket.h
deleted file mode 100644
index d4b1227..0000000
--- a/winsup/cygwin/include/sys/socket.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* sys/socket.h
-
- Copyright 1996-2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_SOCKET_H
-#define _SYS_SOCKET_H
-
-#include <features.h>
-#include <cygwin/socket.h>
-#include <sys/time.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/* SUS symbolic values for the second parm to shutdown(2) */
-#define SHUT_RD 0 /* == Win32 SD_RECEIVE */
-#define SHUT_WR 1 /* == Win32 SD_SEND */
-#define SHUT_RDWR 2 /* == Win32 SD_BOTH */
-
-#ifndef __INSIDE_CYGWIN_NET__
- int accept (int, struct sockaddr *__peer, socklen_t *);
- int bind (int, const struct sockaddr *__my_addr, socklen_t __addrlen);
- int connect (int, const struct sockaddr *, socklen_t);
- int getpeername (int, struct sockaddr *__peer, socklen_t *);
- int getsockname (int, struct sockaddr *__addr, socklen_t *);
- int listen (int, int __n);
- ssize_t recv (int, void *__buff, size_t __len, int __flags);
- ssize_t recvfrom (int, void *__buff, size_t __len, int __flags,
- struct sockaddr *__from, socklen_t *__fromlen);
- ssize_t recvmsg(int s, struct msghdr *msg, int flags);
- ssize_t send (int, const void *__buff, size_t __len, int __flags);
- ssize_t sendmsg(int s, const struct msghdr *msg, int flags);
- ssize_t sendto (int, const void *, size_t __len, int __flags,
- const struct sockaddr *__to, socklen_t __tolen);
- int setsockopt (int __s, int __level, int __optname, const void *optval,
- socklen_t __optlen);
- int getsockopt (int __s, int __level, int __optname, void *__optval,
- socklen_t *__optlen);
- int shutdown (int, int);
- int socket (int __family, int __type, int __protocol);
- int socketpair (int __domain, int __type, int __protocol, int *__socket_vec);
-
- struct servent *getservbyname (const char *__name, const char *__proto);
-#endif
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif /* _SYS_SOCKET_H */
diff --git a/winsup/cygwin/include/sys/soundcard.h b/winsup/cygwin/include/sys/soundcard.h
deleted file mode 100644
index 79341c5..0000000
--- a/winsup/cygwin/include/sys/soundcard.h
+++ /dev/null
@@ -1,1287 +0,0 @@
-#ifndef SOUNDCARD_H
-#define SOUNDCARD_H
-/*
- * Copyright by Hannu Savolainen 1993-1997
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer. 2.
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-
-/*
- * OSS interface version. With versions earlier than 3.6 this value is
- * an integer with value less than 361. In versions 3.6 and later
- * it's a six digit hexadecimal value. For example value
- * of 0x030600 represents OSS version 3.6.0.
- * Use ioctl(fd, OSS_GETVERSION, &int) to get the version number of
- * the currently active driver.
- */
-#define SOUND_VERSION 0x030802
-#define OPEN_SOUND_SYSTEM
-
-/* In Linux we need to be prepared for cross compiling */
-//#include <linux/ioctl.h>
-
-/*
- * Supported card ID numbers (Should be somewhere else?)
- */
-
-#define SNDCARD_ADLIB 1
-#define SNDCARD_SB 2
-#define SNDCARD_PAS 3
-#define SNDCARD_GUS 4
-#define SNDCARD_MPU401 5
-#define SNDCARD_SB16 6
-#define SNDCARD_SB16MIDI 7
-#define SNDCARD_UART6850 8
-#define SNDCARD_GUS16 9
-#define SNDCARD_MSS 10
-#define SNDCARD_PSS 11
-#define SNDCARD_SSCAPE 12
-#define SNDCARD_PSS_MPU 13
-#define SNDCARD_PSS_MSS 14
-#define SNDCARD_SSCAPE_MSS 15
-#define SNDCARD_TRXPRO 16
-#define SNDCARD_TRXPRO_SB 17
-#define SNDCARD_TRXPRO_MPU 18
-#define SNDCARD_MAD16 19
-#define SNDCARD_MAD16_MPU 20
-#define SNDCARD_CS4232 21
-#define SNDCARD_CS4232_MPU 22
-#define SNDCARD_MAUI 23
-#define SNDCARD_PSEUDO_MSS 24
-#define SNDCARD_GUSPNP 25
-#define SNDCARD_UART401 26
-/* Sound card numbers 27 to N are reserved. Don't add more numbers here. */
-
-/***********************************
- * IOCTL Commands for /dev/sequencer
- */
-
-#ifndef _SIOWR
-#if defined(_IOWR) && (defined(_AIX) || (!defined(sun) && !defined(sparc) && !defined(__sparc__) && !defined(__INCioctlh) && !defined(__Lynx__)))
-/* Use already defined ioctl defines if they exist (except with Sun or Sparc) */
-#define SIOCPARM_MASK IOCPARM_MASK
-#define SIOC_VOID IOC_VOID
-#define SIOC_OUT IOC_OUT
-#define SIOC_IN IOC_IN
-#define SIOC_INOUT IOC_INOUT
-#define _SIOC_SIZE _IOC_SIZE
-#define _SIOC_DIR _IOC_DIR
-#define _SIOC_NONE _IOC_NONE
-#define _SIOC_READ _IOC_READ
-#define _SIOC_WRITE _IOC_WRITE
-#define _SIO _IO
-#define _SIOR _IOR
-#define _SIOW _IOW
-#define _SIOWR _IOWR
-#else
-
-/* Ioctl's have the command encoded in the lower word,
- * and the size of any in or out parameters in the upper
- * word. The high 2 bits of the upper word are used
- * to encode the in/out status of the parameter; for now
- * we restrict parameters to at most 8191 bytes.
- */
-/* #define SIOCTYPE (0xff<<8) */
-#define SIOCPARM_MASK 0x1fff /* parameters must be < 8192 bytes */
-#define SIOC_VOID 0x00000000 /* no parameters */
-#define SIOC_OUT 0x20000000 /* copy out parameters */
-#define SIOC_IN 0x40000000 /* copy in parameters */
-#define SIOC_INOUT (SIOC_IN|SIOC_OUT)
-/* the 0x20000000 is so we can distinguish new ioctl's from old */
-#define _SIO(x,y) ((int)(SIOC_VOID|(x<<8)|y))
-#define _SIOR(x,y,t) ((int)(SIOC_OUT|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y))
-#define _SIOW(x,y,t) ((int)(SIOC_IN|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y))
-/* this should be _SIORW, but stdio got there first */
-#define _SIOWR(x,y,t) ((int)(SIOC_INOUT|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y))
-#define _SIOC_SIZE(x) ((x>>16)&SIOCPARM_MASK)
-#define _SIOC_DIR(x) (x & 0xf0000000)
-#define _SIOC_NONE SIOC_VOID
-#define _SIOC_READ SIOC_OUT
-#define _SIOC_WRITE SIOC_IN
-# endif /* _IOWR */
-#endif /* !_SIOWR */
-
-#define SNDCTL_SEQ_RESET _SIO ('Q', 0)
-#define SNDCTL_SEQ_SYNC _SIO ('Q', 1)
-#define SNDCTL_SYNTH_INFO _SIOWR('Q', 2, struct synth_info)
-#define SNDCTL_SEQ_CTRLRATE _SIOWR('Q', 3, int) /* Set/get timer resolution (HZ) */
-#define SNDCTL_SEQ_GETOUTCOUNT _SIOR ('Q', 4, int)
-#define SNDCTL_SEQ_GETINCOUNT _SIOR ('Q', 5, int)
-#define SNDCTL_SEQ_PERCMODE _SIOW ('Q', 6, int)
-#define SNDCTL_FM_LOAD_INSTR _SIOW ('Q', 7, struct sbi_instrument) /* Obsolete. Don't use!!!!!! */
-#define SNDCTL_SEQ_TESTMIDI _SIOW ('Q', 8, int)
-#define SNDCTL_SEQ_RESETSAMPLES _SIOW ('Q', 9, int)
-#define SNDCTL_SEQ_NRSYNTHS _SIOR ('Q',10, int)
-#define SNDCTL_SEQ_NRMIDIS _SIOR ('Q',11, int)
-#define SNDCTL_MIDI_INFO _SIOWR('Q',12, struct midi_info)
-#define SNDCTL_SEQ_THRESHOLD _SIOW ('Q',13, int)
-#define SNDCTL_SYNTH_MEMAVL _SIOWR('Q',14, int) /* in=dev#, out=memsize */
-#define SNDCTL_FM_4OP_ENABLE _SIOW ('Q',15, int) /* in=dev# */
-#define SNDCTL_SEQ_PANIC _SIO ('Q',17)
-#define SNDCTL_SEQ_OUTOFBAND _SIOW ('Q',18, struct seq_event_rec)
-#define SNDCTL_SEQ_GETTIME _SIOR ('Q',19, int)
-#define SNDCTL_SYNTH_ID _SIOWR('Q',20, struct synth_info)
-#define SNDCTL_SYNTH_CONTROL _SIOWR('Q',21, struct synth_control)
-#define SNDCTL_SYNTH_REMOVESAMPLE _SIOWR('Q',22, struct remove_sample)
-
-typedef struct synth_control
-{
- int devno; /* Synthesizer # */
- char data[4000]; /* Device spesific command/data record */
-}synth_control;
-
-typedef struct remove_sample
-{
- int devno; /* Synthesizer # */
- int bankno; /* MIDI bank # (0=General MIDI) */
- int instrno; /* MIDI instrument number */
-} remove_sample;
-
-typedef struct seq_event_rec {
- unsigned char arr[8];
-} seq_event_rec;
-
-#define SNDCTL_TMR_TIMEBASE _SIOWR('T', 1, int)
-#define SNDCTL_TMR_START _SIO ('T', 2)
-#define SNDCTL_TMR_STOP _SIO ('T', 3)
-#define SNDCTL_TMR_CONTINUE _SIO ('T', 4)
-#define SNDCTL_TMR_TEMPO _SIOWR('T', 5, int)
-#define SNDCTL_TMR_SOURCE _SIOWR('T', 6, int)
-# define TMR_INTERNAL 0x00000001
-# define TMR_EXTERNAL 0x00000002
-# define TMR_MODE_MIDI 0x00000010
-# define TMR_MODE_FSK 0x00000020
-# define TMR_MODE_CLS 0x00000040
-# define TMR_MODE_SMPTE 0x00000080
-#define SNDCTL_TMR_METRONOME _SIOW ('T', 7, int)
-#define SNDCTL_TMR_SELECT _SIOW ('T', 8, int)
-
-/*
- * Some big endian/little endian handling macros
- */
-
-#if defined(_AIX) || defined(AIX) || defined(sparc) || defined(__sparc__) || defined(HPPA) || defined(PPC)
-/* Big endian machines */
-# define _PATCHKEY(id) (0xfd00|id)
-# define AFMT_S16_NE AFMT_S16_BE
-#else
-# define _PATCHKEY(id) ((id<<8)|0xfd)
-# define AFMT_S16_NE AFMT_S16_LE
-#endif
-
-/*
- * Sample loading mechanism for internal synthesizers (/dev/sequencer)
- * The following patch_info structure has been designed to support
- * Gravis UltraSound. It tries to be universal format for uploading
- * sample based patches but is probably too limited.
- *
- * (PBD) As Hannu guessed, the GUS structure is too limited for
- * the WaveFront, but this is the right place for a constant definition.
- */
-
-struct patch_info {
- unsigned short key; /* Use WAVE_PATCH here */
-#define WAVE_PATCH _PATCHKEY(0x04)
-#define GUS_PATCH WAVE_PATCH
-#define WAVEFRONT_PATCH _PATCHKEY(0x06)
-
- short device_no; /* Synthesizer number */
- short instr_no; /* Midi pgm# */
-
- unsigned int mode;
-/*
- * The least significant byte has the same format than the GUS .PAT
- * files
- */
-#define WAVE_16_BITS 0x01 /* bit 0 = 8 or 16 bit wave data. */
-#define WAVE_UNSIGNED 0x02 /* bit 1 = Signed - Unsigned data. */
-#define WAVE_LOOPING 0x04 /* bit 2 = looping enabled-1. */
-#define WAVE_BIDIR_LOOP 0x08 /* bit 3 = Set is bidirectional looping. */
-#define WAVE_LOOP_BACK 0x10 /* bit 4 = Set is looping backward. */
-#define WAVE_SUSTAIN_ON 0x20 /* bit 5 = Turn sustaining on. (Env. pts. 3)*/
-#define WAVE_ENVELOPES 0x40 /* bit 6 = Enable envelopes - 1 */
-#define WAVE_FAST_RELEASE 0x80 /* bit 7 = Shut off immediately after note off */
- /* (use the env_rate/env_offs fields). */
-/* Linux specific bits */
-#define WAVE_VIBRATO 0x00010000 /* The vibrato info is valid */
-#define WAVE_TREMOLO 0x00020000 /* The tremolo info is valid */
-#define WAVE_SCALE 0x00040000 /* The scaling info is valid */
-#define WAVE_FRACTIONS 0x00080000 /* Fraction information is valid */
-/* Reserved bits */
-#define WAVE_ROM 0x40000000 /* For future use */
-#define WAVE_MULAW 0x20000000 /* For future use */
-/* Other bits must be zeroed */
-
- int len; /* Size of the wave data in bytes */
- int loop_start, loop_end; /* Byte offsets from the beginning */
-
-/*
- * The base_freq and base_note fields are used when computing the
- * playback speed for a note. The base_note defines the tone frequency
- * which is heard if the sample is played using the base_freq as the
- * playback speed.
- *
- * The low_note and high_note fields define the minimum and maximum note
- * frequencies for which this sample is valid. It is possible to define
- * more than one samples for an instrument number at the same time. The
- * low_note and high_note fields are used to select the most suitable one.
- *
- * The fields base_note, high_note and low_note should contain
- * the note frequency multiplied by 1000. For example value for the
- * middle A is 440*1000.
- */
-
- unsigned int base_freq;
- unsigned int base_note;
- unsigned int high_note;
- unsigned int low_note;
- int panning; /* -128=left, 127=right */
- int detuning;
-
-/* New fields introduced in version 1.99.5 */
-
- /* Envelope. Enabled by mode bit WAVE_ENVELOPES */
- unsigned char env_rate[ 6 ]; /* GUS HW ramping rate */
- unsigned char env_offset[ 6 ]; /* 255 == 100% */
-
- /*
- * The tremolo, vibrato and scale info are not supported yet.
- * Enable by setting the mode bits WAVE_TREMOLO, WAVE_VIBRATO or
- * WAVE_SCALE
- */
-
- unsigned char tremolo_sweep;
- unsigned char tremolo_rate;
- unsigned char tremolo_depth;
-
- unsigned char vibrato_sweep;
- unsigned char vibrato_rate;
- unsigned char vibrato_depth;
-
- int scale_frequency;
- unsigned int scale_factor; /* from 0 to 2048 or 0 to 2 */
-
- int volume;
- int fractions;
- int reserved1;
- int spare[2];
- char data[1]; /* The waveform data starts here */
- };
-
-struct sysex_info {
- short key; /* Use SYSEX_PATCH or MAUI_PATCH here */
-#define SYSEX_PATCH _PATCHKEY(0x05)
-#define MAUI_PATCH _PATCHKEY(0x06)
- short device_no; /* Synthesizer number */
- int len; /* Size of the sysex data in bytes */
- unsigned char data[1]; /* Sysex data starts here */
- };
-
-/*
- * /dev/sequencer input events.
- *
- * The data written to the /dev/sequencer is a stream of events. Events
- * are records of 4 or 8 bytes. The first byte defines the size.
- * Any number of events can be written with a write call. There
- * is a set of macros for sending these events. Use these macros if you
- * want to maximize portability of your program.
- *
- * Events SEQ_WAIT, SEQ_MIDIPUTC and SEQ_ECHO. Are also input events.
- * (All input events are currently 4 bytes long. Be prepared to support
- * 8 byte events also. If you receive any event having first byte >= 128,
- * it's a 8 byte event.
- *
- * The events are documented at the end of this file.
- *
- * Normal events (4 bytes)
- * There is also a 8 byte version of most of the 4 byte events. The
- * 8 byte one is recommended.
- */
-#define SEQ_NOTEOFF 0
-#define SEQ_FMNOTEOFF SEQ_NOTEOFF /* Just old name */
-#define SEQ_NOTEON 1
-#define SEQ_FMNOTEON SEQ_NOTEON
-#define SEQ_WAIT TMR_WAIT_ABS
-#define SEQ_PGMCHANGE 3
-#define SEQ_FMPGMCHANGE SEQ_PGMCHANGE
-#define SEQ_SYNCTIMER TMR_START
-#define SEQ_MIDIPUTC 5
-#define SEQ_DRUMON 6 /*** OBSOLETE ***/
-#define SEQ_DRUMOFF 7 /*** OBSOLETE ***/
-#define SEQ_ECHO TMR_ECHO /* For synching programs with output */
-#define SEQ_AFTERTOUCH 9
-#define SEQ_CONTROLLER 10
-
-/*******************************************
- * Midi controller numbers
- *******************************************
- * Controllers 0 to 31 (0x00 to 0x1f) and
- * 32 to 63 (0x20 to 0x3f) are continuous
- * controllers.
- * In the MIDI 1.0 these controllers are sent using
- * two messages. Controller numbers 0 to 31 are used
- * to send the MSB and the controller numbers 32 to 63
- * are for the LSB. Note that just 7 bits are used in MIDI bytes.
- */
-
-#define CTL_BANK_SELECT 0x00
-#define CTL_MODWHEEL 0x01
-#define CTL_BREATH 0x02
-/* undefined 0x03 */
-#define CTL_FOOT 0x04
-#define CTL_PORTAMENTO_TIME 0x05
-#define CTL_DATA_ENTRY 0x06
-#define CTL_MAIN_VOLUME 0x07
-#define CTL_BALANCE 0x08
-/* undefined 0x09 */
-#define CTL_PAN 0x0a
-#define CTL_EXPRESSION 0x0b
-/* undefined 0x0c */
-/* undefined 0x0d */
-/* undefined 0x0e */
-/* undefined 0x0f */
-#define CTL_GENERAL_PURPOSE1 0x10
-#define CTL_GENERAL_PURPOSE2 0x11
-#define CTL_GENERAL_PURPOSE3 0x12
-#define CTL_GENERAL_PURPOSE4 0x13
-/* undefined 0x14 - 0x1f */
-
-/* undefined 0x20 */
-/* The controller numbers 0x21 to 0x3f are reserved for the */
-/* least significant bytes of the controllers 0x00 to 0x1f. */
-/* These controllers are not recognised by the driver. */
-
-/* Controllers 64 to 69 (0x40 to 0x45) are on/off switches. */
-/* 0=OFF and 127=ON (intermediate values are possible) */
-#define CTL_DAMPER_PEDAL 0x40
-#define CTL_SUSTAIN 0x40 /* Alias */
-#define CTL_HOLD 0x40 /* Alias */
-#define CTL_PORTAMENTO 0x41
-#define CTL_SOSTENUTO 0x42
-#define CTL_SOFT_PEDAL 0x43
-/* undefined 0x44 */
-#define CTL_HOLD2 0x45
-/* undefined 0x46 - 0x4f */
-
-#define CTL_GENERAL_PURPOSE5 0x50
-#define CTL_GENERAL_PURPOSE6 0x51
-#define CTL_GENERAL_PURPOSE7 0x52
-#define CTL_GENERAL_PURPOSE8 0x53
-/* undefined 0x54 - 0x5a */
-#define CTL_EXT_EFF_DEPTH 0x5b
-#define CTL_TREMOLO_DEPTH 0x5c
-#define CTL_CHORUS_DEPTH 0x5d
-#define CTL_DETUNE_DEPTH 0x5e
-#define CTL_CELESTE_DEPTH 0x5e /* Alias for the above one */
-#define CTL_PHASER_DEPTH 0x5f
-#define CTL_DATA_INCREMENT 0x60
-#define CTL_DATA_DECREMENT 0x61
-#define CTL_NONREG_PARM_NUM_LSB 0x62
-#define CTL_NONREG_PARM_NUM_MSB 0x63
-#define CTL_REGIST_PARM_NUM_LSB 0x64
-#define CTL_REGIST_PARM_NUM_MSB 0x65
-/* undefined 0x66 - 0x78 */
-/* reserved 0x79 - 0x7f */
-
-/* Pseudo controllers (not midi compatible) */
-#define CTRL_PITCH_BENDER 255
-#define CTRL_PITCH_BENDER_RANGE 254
-#define CTRL_EXPRESSION 253 /* Obsolete */
-#define CTRL_MAIN_VOLUME 252 /* Obsolete */
-#define SEQ_BALANCE 11
-#define SEQ_VOLMODE 12
-
-/*
- * Volume mode decides how volumes are used
- */
-
-#define VOL_METHOD_ADAGIO 1
-#define VOL_METHOD_LINEAR 2
-
-/*
- * Note! SEQ_WAIT, SEQ_MIDIPUTC and SEQ_ECHO are used also as
- * input events.
- */
-
-/*
- * Event codes 0xf0 to 0xfc are reserved for future extensions.
- */
-
-#define SEQ_FULLSIZE 0xfd /* Long events */
-/*
- * SEQ_FULLSIZE events are used for loading patches/samples to the
- * synthesizer devices. These events are passed directly to the driver
- * of the associated synthesizer device. There is no limit to the size
- * of the extended events. These events are not queued but executed
- * immediately when the write() is called (execution can take several
- * seconds of time).
- *
- * When a SEQ_FULLSIZE message is written to the device, it must
- * be written using exactly one write() call. Other events cannot
- * be mixed to the same write.
- *
- * For FM synths (YM3812/OPL3) use struct sbi_instrument and write it to the
- * /dev/sequencer. Don't write other data together with the instrument structure
- * Set the key field of the structure to FM_PATCH. The device field is used to
- * route the patch to the corresponding device.
- *
- * For wave table use struct patch_info. Initialize the key field
- * to WAVE_PATCH.
- */
-#define SEQ_PRIVATE 0xfe /* Low level HW dependent events (8 bytes) */
-#define SEQ_EXTENDED 0xff /* Extended events (8 bytes) OBSOLETE */
-
-/*
- * Record for FM patches
- */
-
-typedef unsigned char sbi_instr_data[32];
-
-struct sbi_instrument {
- unsigned short key; /* FM_PATCH or OPL3_PATCH */
-#define FM_PATCH _PATCHKEY(0x01)
-#define OPL3_PATCH _PATCHKEY(0x03)
- short device; /* Synth# (0-4) */
- int channel; /* Program# to be initialized */
- sbi_instr_data operators; /* Register settings for operator cells (.SBI format) */
- };
-
-struct synth_info { /* Read only */
- char name[30];
- int device; /* 0-N. INITIALIZE BEFORE CALLING */
- int synth_type;
-#define SYNTH_TYPE_FM 0
-#define SYNTH_TYPE_SAMPLE 1
-#define SYNTH_TYPE_MIDI 2 /* Midi interface */
-
- int synth_subtype;
-#define FM_TYPE_ADLIB 0x00
-#define FM_TYPE_OPL3 0x01
-#define MIDI_TYPE_MPU401 0x401
-
-#define SAMPLE_TYPE_BASIC 0x10
-#define SAMPLE_TYPE_GUS SAMPLE_TYPE_BASIC
-#define SAMPLE_TYPE_WAVEFRONT 0x11
-
- int perc_mode; /* No longer supported */
- int nr_voices;
- int nr_drums; /* Obsolete field */
- int instr_bank_size;
- unsigned int capabilities;
-#define SYNTH_CAP_PERCMODE 0x00000001 /* No longer used */
-#define SYNTH_CAP_OPL3 0x00000002 /* Set if OPL3 supported */
-#define SYNTH_CAP_INPUT 0x00000004 /* Input (MIDI) device */
- int dummies[19]; /* Reserve space */
- };
-
-struct sound_timer_info {
- char name[32];
- int caps;
- };
-
-#define MIDI_CAP_MPU401 1 /* MPU-401 intelligent mode */
-
-struct midi_info {
- char name[30];
- int device; /* 0-N. INITIALIZE BEFORE CALLING */
- unsigned int capabilities; /* To be defined later */
- int dev_type;
- int dummies[18]; /* Reserve space */
- };
-
-/********************************************
- * ioctl commands for the /dev/midi##
- */
-typedef struct {
- unsigned char cmd;
- char nr_args, nr_returns;
- unsigned char data[30];
- } mpu_command_rec;
-
-#define SNDCTL_MIDI_PRETIME _SIOWR('m', 0, int)
-#define SNDCTL_MIDI_MPUMODE _SIOWR('m', 1, int)
-#define SNDCTL_MIDI_MPUCMD _SIOWR('m', 2, mpu_command_rec)
-
-/********************************************
- * IOCTL commands for /dev/dsp and /dev/audio
- */
-
-#define SNDCTL_DSP_RESET _SIO ('P', 0)
-#define SNDCTL_DSP_SYNC _SIO ('P', 1)
-#define SNDCTL_DSP_SPEED _SIOWR('P', 2, int)
-#define SNDCTL_DSP_STEREO _SIOWR('P', 3, int)
-#define SNDCTL_DSP_GETBLKSIZE _SIOWR('P', 4, int)
-#define SNDCTL_DSP_SAMPLESIZE SNDCTL_DSP_SETFMT
-#define SNDCTL_DSP_CHANNELS _SIOWR('P', 6, int)
-#define SOUND_PCM_WRITE_CHANNELS SNDCTL_DSP_CHANNELS
-#define SOUND_PCM_WRITE_FILTER _SIOWR('P', 7, int)
-#define SNDCTL_DSP_POST _SIO ('P', 8)
-#define SNDCTL_DSP_SUBDIVIDE _SIOWR('P', 9, int)
-#define SNDCTL_DSP_SETFRAGMENT _SIOWR('P',10, int)
-
-/* Audio data formats (Note! U8=8 and S16_LE=16 for compatibility) */
-#define SNDCTL_DSP_GETFMTS _SIOR ('P',11, int) /* Returns a mask */
-#define SNDCTL_DSP_SETFMT _SIOWR('P',5, int) /* Selects ONE fmt*/
-# define AFMT_QUERY 0x00000000 /* Return current fmt */
-# define AFMT_MU_LAW 0x00000001
-# define AFMT_A_LAW 0x00000002
-# define AFMT_IMA_ADPCM 0x00000004
-# define AFMT_U8 0x00000008
-# define AFMT_S16_LE 0x00000010 /* Little endian signed 16*/
-# define AFMT_S16_BE 0x00000020 /* Big endian signed 16 */
-# define AFMT_S8 0x00000040
-# define AFMT_U16_LE 0x00000080 /* Little endian U16 */
-# define AFMT_U16_BE 0x00000100 /* Big endian U16 */
-# define AFMT_MPEG 0x00000200 /* MPEG (2) audio */
-# define AFMT_AC3 0x00000400 /* Dolby Digital AC3 */
-
-/*
- * Buffer status queries.
- */
-typedef struct audio_buf_info {
- int fragments; /* # of available fragments (partially usend ones not counted) */
- int fragstotal; /* Total # of fragments allocated */
- int fragsize; /* Size of a fragment in bytes */
-
- int bytes; /* Available space in bytes (includes partially used fragments) */
- /* Note! 'bytes' could be more than fragments*fragsize */
- } audio_buf_info;
-
-#define SNDCTL_DSP_GETOSPACE _SIOR ('P',12, audio_buf_info)
-#define SNDCTL_DSP_GETISPACE _SIOR ('P',13, audio_buf_info)
-#define SNDCTL_DSP_NONBLOCK _SIO ('P',14)
-#define SNDCTL_DSP_GETCAPS _SIOR ('P',15, int)
-# define DSP_CAP_REVISION 0x000000ff /* Bits for revision level (0 to 255) */
-# define DSP_CAP_DUPLEX 0x00000100 /* Full duplex record/playback */
-# define DSP_CAP_REALTIME 0x00000200 /* Real time capability */
-# define DSP_CAP_BATCH 0x00000400 /* Device has some kind of */
- /* internal buffers which may */
- /* cause some delays and */
- /* decrease precision of timing */
-# define DSP_CAP_COPROC 0x00000800 /* Has a coprocessor */
- /* Sometimes it's a DSP */
- /* but usually not */
-# define DSP_CAP_TRIGGER 0x00001000 /* Supports SETTRIGGER */
-# define DSP_CAP_MMAP 0x00002000 /* Supports mmap() */
-# define DSP_CAP_MULTI 0x00004000 /* support multiple open */
-# define DSP_CAP_BIND 0x00008000 /* channel binding to front/rear/cneter/lfe */
-
-
-#define SNDCTL_DSP_GETTRIGGER _SIOR ('P',16, int)
-#define SNDCTL_DSP_SETTRIGGER _SIOW ('P',16, int)
-# define PCM_ENABLE_INPUT 0x00000001
-# define PCM_ENABLE_OUTPUT 0x00000002
-
-typedef struct count_info {
- int bytes; /* Total # of bytes processed */
- int blocks; /* # of fragment transitions since last time */
- int ptr; /* Current DMA pointer value */
- } count_info;
-
-#define SNDCTL_DSP_GETIPTR _SIOR ('P',17, count_info)
-#define SNDCTL_DSP_GETOPTR _SIOR ('P',18, count_info)
-
-typedef struct buffmem_desc {
- unsigned *buffer;
- int size;
- } buffmem_desc;
-#define SNDCTL_DSP_MAPINBUF _SIOR ('P', 19, buffmem_desc)
-#define SNDCTL_DSP_MAPOUTBUF _SIOR ('P', 20, buffmem_desc)
-#define SNDCTL_DSP_SETSYNCRO _SIO ('P', 21)
-#define SNDCTL_DSP_SETDUPLEX _SIO ('P', 22)
-#define SNDCTL_DSP_GETODELAY _SIOR ('P', 23, int)
-
-#define SNDCTL_DSP_GETCHANNELMASK _SIOWR('P', 64, int)
-#define SNDCTL_DSP_BIND_CHANNEL _SIOWR('P', 65, int)
-# define DSP_BIND_QUERY 0x00000000
-# define DSP_BIND_FRONT 0x00000001
-# define DSP_BIND_SURR 0x00000002
-# define DSP_BIND_CENTER_LFE 0x00000004
-# define DSP_BIND_HANDSET 0x00000008
-# define DSP_BIND_MIC 0x00000010
-# define DSP_BIND_MODEM1 0x00000020
-# define DSP_BIND_MODEM2 0x00000040
-# define DSP_BIND_I2S 0x00000080
-# define DSP_BIND_SPDIF 0x00000100
-
-/*
- * Application's profile defines the way how playback underrun situations should be handled.
- *
- * APF_NORMAL (the default) and APF_NETWORK make the driver to cleanup the
- * playback buffer whenever an underrun occurs. This consumes some time
- * prevents looping the existing buffer.
- * APF_CPUINTENS is intended to be set by CPU intensive applications which
- * are likely to run out of time occasionally. In this mode the buffer cleanup is
- * disabled which saves CPU time but also let's the previous buffer content to
- * be played during the "pause" after the underrun.
- */
-#define SNDCTL_DSP_PROFILE _SIOW ('P', 23, int)
-#define APF_NORMAL 0 /* Normal applications */
-#define APF_NETWORK 1 /* Underruns probably caused by an "external" delay */
-#define APF_CPUINTENS 2 /* Underruns probably caused by "overheating" the CPU */
-
-#define SOUND_PCM_READ_RATE _SIOR ('P', 2, int)
-#define SOUND_PCM_READ_CHANNELS _SIOR ('P', 6, int)
-#define SOUND_PCM_READ_BITS _SIOR ('P', 5, int)
-#define SOUND_PCM_READ_FILTER _SIOR ('P', 7, int)
-
-/* Some alias names */
-#define SOUND_PCM_WRITE_BITS SNDCTL_DSP_SETFMT
-#define SOUND_PCM_WRITE_RATE SNDCTL_DSP_SPEED
-#define SOUND_PCM_POST SNDCTL_DSP_POST
-#define SOUND_PCM_RESET SNDCTL_DSP_RESET
-#define SOUND_PCM_SYNC SNDCTL_DSP_SYNC
-#define SOUND_PCM_SUBDIVIDE SNDCTL_DSP_SUBDIVIDE
-#define SOUND_PCM_SETFRAGMENT SNDCTL_DSP_SETFRAGMENT
-#define SOUND_PCM_GETFMTS SNDCTL_DSP_GETFMTS
-#define SOUND_PCM_SETFMT SNDCTL_DSP_SETFMT
-#define SOUND_PCM_GETOSPACE SNDCTL_DSP_GETOSPACE
-#define SOUND_PCM_GETISPACE SNDCTL_DSP_GETISPACE
-#define SOUND_PCM_NONBLOCK SNDCTL_DSP_NONBLOCK
-#define SOUND_PCM_GETCAPS SNDCTL_DSP_GETCAPS
-#define SOUND_PCM_GETTRIGGER SNDCTL_DSP_GETTRIGGER
-#define SOUND_PCM_SETTRIGGER SNDCTL_DSP_SETTRIGGER
-#define SOUND_PCM_SETSYNCRO SNDCTL_DSP_SETSYNCRO
-#define SOUND_PCM_GETIPTR SNDCTL_DSP_GETIPTR
-#define SOUND_PCM_GETOPTR SNDCTL_DSP_GETOPTR
-#define SOUND_PCM_MAPINBUF SNDCTL_DSP_MAPINBUF
-#define SOUND_PCM_MAPOUTBUF SNDCTL_DSP_MAPOUTBUF
-
-/*
- * ioctl calls to be used in communication with coprocessors and
- * DSP chips.
- */
-
-typedef struct copr_buffer {
- int command; /* Set to 0 if not used */
- int flags;
-#define CPF_NONE 0x0000
-#define CPF_FIRST 0x0001 /* First block */
-#define CPF_LAST 0x0002 /* Last block */
- int len;
- int offs; /* If required by the device (0 if not used) */
-
- unsigned char data[4000]; /* NOTE! 4000 is not 4k */
- } copr_buffer;
-
-typedef struct copr_debug_buf {
- int command; /* Used internally. Set to 0 */
- int parm1;
- int parm2;
- int flags;
- int len; /* Length of data in bytes */
- } copr_debug_buf;
-
-typedef struct copr_msg {
- int len;
- unsigned char data[4000];
- } copr_msg;
-
-#define SNDCTL_COPR_RESET _SIO ('C', 0)
-#define SNDCTL_COPR_LOAD _SIOWR('C', 1, copr_buffer)
-#define SNDCTL_COPR_RDATA _SIOWR('C', 2, copr_debug_buf)
-#define SNDCTL_COPR_RCODE _SIOWR('C', 3, copr_debug_buf)
-#define SNDCTL_COPR_WDATA _SIOW ('C', 4, copr_debug_buf)
-#define SNDCTL_COPR_WCODE _SIOW ('C', 5, copr_debug_buf)
-#define SNDCTL_COPR_RUN _SIOWR('C', 6, copr_debug_buf)
-#define SNDCTL_COPR_HALT _SIOWR('C', 7, copr_debug_buf)
-#define SNDCTL_COPR_SENDMSG _SIOWR('C', 8, copr_msg)
-#define SNDCTL_COPR_RCVMSG _SIOR ('C', 9, copr_msg)
-
-/*********************************************
- * IOCTL commands for /dev/mixer
- */
-
-/*
- * Mixer devices
- *
- * There can be up to 20 different analog mixer channels. The
- * SOUND_MIXER_NRDEVICES gives the currently supported maximum.
- * The SOUND_MIXER_READ_DEVMASK returns a bitmask which tells
- * the devices supported by the particular mixer.
- */
-
-#define SOUND_MIXER_NRDEVICES 25
-#define SOUND_MIXER_VOLUME 0
-#define SOUND_MIXER_BASS 1
-#define SOUND_MIXER_TREBLE 2
-#define SOUND_MIXER_SYNTH 3
-#define SOUND_MIXER_PCM 4
-#define SOUND_MIXER_SPEAKER 5
-#define SOUND_MIXER_LINE 6
-#define SOUND_MIXER_MIC 7
-#define SOUND_MIXER_CD 8
-#define SOUND_MIXER_IMIX 9 /* Recording monitor */
-#define SOUND_MIXER_ALTPCM 10
-#define SOUND_MIXER_RECLEV 11 /* Recording level */
-#define SOUND_MIXER_IGAIN 12 /* Input gain */
-#define SOUND_MIXER_OGAIN 13 /* Output gain */
-/*
- * The AD1848 codec and compatibles have three line level inputs
- * (line, aux1 and aux2). Since each card manufacturer have assigned
- * different meanings to these inputs, it's inpractical to assign
- * specific meanings (line, cd, synth etc.) to them.
- */
-#define SOUND_MIXER_LINE1 14 /* Input source 1 (aux1) */
-#define SOUND_MIXER_LINE2 15 /* Input source 2 (aux2) */
-#define SOUND_MIXER_LINE3 16 /* Input source 3 (line) */
-#define SOUND_MIXER_DIGITAL1 17 /* Digital (input) 1 */
-#define SOUND_MIXER_DIGITAL2 18 /* Digital (input) 2 */
-#define SOUND_MIXER_DIGITAL3 19 /* Digital (input) 3 */
-#define SOUND_MIXER_PHONEIN 20 /* Phone input */
-#define SOUND_MIXER_PHONEOUT 21 /* Phone output */
-#define SOUND_MIXER_VIDEO 22 /* Video/TV (audio) in */
-#define SOUND_MIXER_RADIO 23 /* Radio in */
-#define SOUND_MIXER_MONITOR 24 /* Monitor (usually mic) volume */
-
-/* Some on/off settings (SOUND_SPECIAL_MIN - SOUND_SPECIAL_MAX) */
-/* Not counted to SOUND_MIXER_NRDEVICES, but use the same number space */
-#define SOUND_ONOFF_MIN 28
-#define SOUND_ONOFF_MAX 30
-
-/* Note! Number 31 cannot be used since the sign bit is reserved */
-#define SOUND_MIXER_NONE 31
-
-/*
- * The following unsupported macros are no longer functional.
- * Use SOUND_MIXER_PRIVATE# macros in future.
- */
-#define SOUND_MIXER_ENHANCE SOUND_MIXER_NONE
-#define SOUND_MIXER_MUTE SOUND_MIXER_NONE
-#define SOUND_MIXER_LOUD SOUND_MIXER_NONE
-
-
-#define SOUND_DEVICE_LABELS {"Vol ", "Bass ", "Trebl", "Synth", "Pcm ", "Spkr ", "Line ", \
- "Mic ", "CD ", "Mix ", "Pcm2 ", "Rec ", "IGain", "OGain", \
- "Line1", "Line2", "Line3", "Digital1", "Digital2", "Digital3", \
- "PhoneIn", "PhoneOut", "Video", "Radio", "Monitor"}
-
-#define SOUND_DEVICE_NAMES {"vol", "bass", "treble", "synth", "pcm", "speaker", "line", \
- "mic", "cd", "mix", "pcm2", "rec", "igain", "ogain", \
- "line1", "line2", "line3", "dig1", "dig2", "dig3", \
- "phin", "phout", "video", "radio", "monitor"}
-
-/* Device bitmask identifiers */
-
-#define SOUND_MIXER_RECSRC 0xff /* Arg contains a bit for each recording source */
-#define SOUND_MIXER_DEVMASK 0xfe /* Arg contains a bit for each supported device */
-#define SOUND_MIXER_RECMASK 0xfd /* Arg contains a bit for each supported recording source */
-#define SOUND_MIXER_CAPS 0xfc
-# define SOUND_CAP_EXCL_INPUT 0x00000001 /* Only one recording source at a time */
-#define SOUND_MIXER_STEREODEVS 0xfb /* Mixer channels supporting stereo */
-#define SOUND_MIXER_OUTSRC 0xfa /* Arg contains a bit for each input source to output */
-#define SOUND_MIXER_OUTMASK 0xf9 /* Arg contains a bit for each supported input source to output */
-
-/* Device mask bits */
-
-#define SOUND_MASK_VOLUME (1 << SOUND_MIXER_VOLUME)
-#define SOUND_MASK_BASS (1 << SOUND_MIXER_BASS)
-#define SOUND_MASK_TREBLE (1 << SOUND_MIXER_TREBLE)
-#define SOUND_MASK_SYNTH (1 << SOUND_MIXER_SYNTH)
-#define SOUND_MASK_PCM (1 << SOUND_MIXER_PCM)
-#define SOUND_MASK_SPEAKER (1 << SOUND_MIXER_SPEAKER)
-#define SOUND_MASK_LINE (1 << SOUND_MIXER_LINE)
-#define SOUND_MASK_MIC (1 << SOUND_MIXER_MIC)
-#define SOUND_MASK_CD (1 << SOUND_MIXER_CD)
-#define SOUND_MASK_IMIX (1 << SOUND_MIXER_IMIX)
-#define SOUND_MASK_ALTPCM (1 << SOUND_MIXER_ALTPCM)
-#define SOUND_MASK_RECLEV (1 << SOUND_MIXER_RECLEV)
-#define SOUND_MASK_IGAIN (1 << SOUND_MIXER_IGAIN)
-#define SOUND_MASK_OGAIN (1 << SOUND_MIXER_OGAIN)
-#define SOUND_MASK_LINE1 (1 << SOUND_MIXER_LINE1)
-#define SOUND_MASK_LINE2 (1 << SOUND_MIXER_LINE2)
-#define SOUND_MASK_LINE3 (1 << SOUND_MIXER_LINE3)
-#define SOUND_MASK_DIGITAL1 (1 << SOUND_MIXER_DIGITAL1)
-#define SOUND_MASK_DIGITAL2 (1 << SOUND_MIXER_DIGITAL2)
-#define SOUND_MASK_DIGITAL3 (1 << SOUND_MIXER_DIGITAL3)
-#define SOUND_MASK_PHONEIN (1 << SOUND_MIXER_PHONEIN)
-#define SOUND_MASK_PHONEOUT (1 << SOUND_MIXER_PHONEOUT)
-#define SOUND_MASK_RADIO (1 << SOUND_MIXER_RADIO)
-#define SOUND_MASK_VIDEO (1 << SOUND_MIXER_VIDEO)
-#define SOUND_MASK_MONITOR (1 << SOUND_MIXER_MONITOR)
-
-/* Obsolete macros */
-#define SOUND_MASK_MUTE (1 << SOUND_MIXER_MUTE)
-#define SOUND_MASK_ENHANCE (1 << SOUND_MIXER_ENHANCE)
-#define SOUND_MASK_LOUD (1 << SOUND_MIXER_LOUD)
-
-#define MIXER_READ(dev) _SIOR('M', dev, int)
-#define SOUND_MIXER_READ_VOLUME MIXER_READ(SOUND_MIXER_VOLUME)
-#define SOUND_MIXER_READ_BASS MIXER_READ(SOUND_MIXER_BASS)
-#define SOUND_MIXER_READ_TREBLE MIXER_READ(SOUND_MIXER_TREBLE)
-#define SOUND_MIXER_READ_SYNTH MIXER_READ(SOUND_MIXER_SYNTH)
-#define SOUND_MIXER_READ_PCM MIXER_READ(SOUND_MIXER_PCM)
-#define SOUND_MIXER_READ_SPEAKER MIXER_READ(SOUND_MIXER_SPEAKER)
-#define SOUND_MIXER_READ_LINE MIXER_READ(SOUND_MIXER_LINE)
-#define SOUND_MIXER_READ_MIC MIXER_READ(SOUND_MIXER_MIC)
-#define SOUND_MIXER_READ_CD MIXER_READ(SOUND_MIXER_CD)
-#define SOUND_MIXER_READ_IMIX MIXER_READ(SOUND_MIXER_IMIX)
-#define SOUND_MIXER_READ_ALTPCM MIXER_READ(SOUND_MIXER_ALTPCM)
-#define SOUND_MIXER_READ_RECLEV MIXER_READ(SOUND_MIXER_RECLEV)
-#define SOUND_MIXER_READ_IGAIN MIXER_READ(SOUND_MIXER_IGAIN)
-#define SOUND_MIXER_READ_OGAIN MIXER_READ(SOUND_MIXER_OGAIN)
-#define SOUND_MIXER_READ_LINE1 MIXER_READ(SOUND_MIXER_LINE1)
-#define SOUND_MIXER_READ_LINE2 MIXER_READ(SOUND_MIXER_LINE2)
-#define SOUND_MIXER_READ_LINE3 MIXER_READ(SOUND_MIXER_LINE3)
-
-/* Obsolete macros */
-#define SOUND_MIXER_READ_MUTE MIXER_READ(SOUND_MIXER_MUTE)
-#define SOUND_MIXER_READ_ENHANCE MIXER_READ(SOUND_MIXER_ENHANCE)
-#define SOUND_MIXER_READ_LOUD MIXER_READ(SOUND_MIXER_LOUD)
-
-#define SOUND_MIXER_READ_RECSRC MIXER_READ(SOUND_MIXER_RECSRC)
-#define SOUND_MIXER_READ_DEVMASK MIXER_READ(SOUND_MIXER_DEVMASK)
-#define SOUND_MIXER_READ_RECMASK MIXER_READ(SOUND_MIXER_RECMASK)
-#define SOUND_MIXER_READ_STEREODEVS MIXER_READ(SOUND_MIXER_STEREODEVS)
-#define SOUND_MIXER_READ_CAPS MIXER_READ(SOUND_MIXER_CAPS)
-
-#define MIXER_WRITE(dev) _SIOWR('M', dev, int)
-#define SOUND_MIXER_WRITE_VOLUME MIXER_WRITE(SOUND_MIXER_VOLUME)
-#define SOUND_MIXER_WRITE_BASS MIXER_WRITE(SOUND_MIXER_BASS)
-#define SOUND_MIXER_WRITE_TREBLE MIXER_WRITE(SOUND_MIXER_TREBLE)
-#define SOUND_MIXER_WRITE_SYNTH MIXER_WRITE(SOUND_MIXER_SYNTH)
-#define SOUND_MIXER_WRITE_PCM MIXER_WRITE(SOUND_MIXER_PCM)
-#define SOUND_MIXER_WRITE_SPEAKER MIXER_WRITE(SOUND_MIXER_SPEAKER)
-#define SOUND_MIXER_WRITE_LINE MIXER_WRITE(SOUND_MIXER_LINE)
-#define SOUND_MIXER_WRITE_MIC MIXER_WRITE(SOUND_MIXER_MIC)
-#define SOUND_MIXER_WRITE_CD MIXER_WRITE(SOUND_MIXER_CD)
-#define SOUND_MIXER_WRITE_IMIX MIXER_WRITE(SOUND_MIXER_IMIX)
-#define SOUND_MIXER_WRITE_ALTPCM MIXER_WRITE(SOUND_MIXER_ALTPCM)
-#define SOUND_MIXER_WRITE_RECLEV MIXER_WRITE(SOUND_MIXER_RECLEV)
-#define SOUND_MIXER_WRITE_IGAIN MIXER_WRITE(SOUND_MIXER_IGAIN)
-#define SOUND_MIXER_WRITE_OGAIN MIXER_WRITE(SOUND_MIXER_OGAIN)
-#define SOUND_MIXER_WRITE_LINE1 MIXER_WRITE(SOUND_MIXER_LINE1)
-#define SOUND_MIXER_WRITE_LINE2 MIXER_WRITE(SOUND_MIXER_LINE2)
-#define SOUND_MIXER_WRITE_LINE3 MIXER_WRITE(SOUND_MIXER_LINE3)
-
-/* Obsolete macros */
-#define SOUND_MIXER_WRITE_MUTE MIXER_WRITE(SOUND_MIXER_MUTE)
-#define SOUND_MIXER_WRITE_ENHANCE MIXER_WRITE(SOUND_MIXER_ENHANCE)
-#define SOUND_MIXER_WRITE_LOUD MIXER_WRITE(SOUND_MIXER_LOUD)
-
-#define SOUND_MIXER_WRITE_RECSRC MIXER_WRITE(SOUND_MIXER_RECSRC)
-
-typedef struct mixer_info
-{
- char id[16];
- char name[32];
- int modify_counter;
- int fillers[10];
-} mixer_info;
-
-typedef struct _old_mixer_info /* Obsolete */
-{
- char id[16];
- char name[32];
-} _old_mixer_info;
-
-#define SOUND_MIXER_INFO _SIOR ('M', 101, mixer_info)
-#define SOUND_OLD_MIXER_INFO _SIOR ('M', 101, _old_mixer_info)
-
-/*
- * A mechanism for accessing "proprietary" mixer features. This method
- * permits passing 128 bytes of arbitrary data between a mixer application
- * and the mixer driver. Interpretation of the record is defined by
- * the particular mixer driver.
- */
-typedef unsigned char mixer_record[128];
-
-#define SOUND_MIXER_ACCESS _SIOWR('M', 102, mixer_record)
-
-/*
- * Two ioctls for special souncard function
- */
-#define SOUND_MIXER_AGC _SIOWR('M', 103, int)
-#define SOUND_MIXER_3DSE _SIOWR('M', 104, int)
-
-/*
- * The SOUND_MIXER_PRIVATE# commands can be redefined by low level drivers.
- * These features can be used when accessing device specific features.
- */
-#define SOUND_MIXER_PRIVATE1 _SIOWR('M', 111, int)
-#define SOUND_MIXER_PRIVATE2 _SIOWR('M', 112, int)
-#define SOUND_MIXER_PRIVATE3 _SIOWR('M', 113, int)
-#define SOUND_MIXER_PRIVATE4 _SIOWR('M', 114, int)
-#define SOUND_MIXER_PRIVATE5 _SIOWR('M', 115, int)
-
-/*
- * SOUND_MIXER_GETLEVELS and SOUND_MIXER_SETLEVELS calls can be used
- * for querying current mixer settings from the driver and for loading
- * default volume settings _prior_ activating the mixer (loading
- * doesn't affect current state of the mixer hardware). These calls
- * are for internal use only.
- */
-
-typedef struct mixer_vol_table {
- int num; /* Index to volume table */
- char name[32];
- int levels[32];
-} mixer_vol_table;
-
-#define SOUND_MIXER_GETLEVELS _SIOWR('M', 116, mixer_vol_table)
-#define SOUND_MIXER_SETLEVELS _SIOWR('M', 117, mixer_vol_table)
-
-/*
- * An ioctl for identifying the driver version. It will return value
- * of the SOUND_VERSION macro used when compiling the driver.
- * This call was introduced in OSS version 3.6 and it will not work
- * with earlier versions (returns EINVAL).
- */
-#define OSS_GETVERSION _SIOR ('M', 118, int)
-
-/*
- * Level 2 event types for /dev/sequencer
- */
-
-/*
- * The 4 most significant bits of byte 0 specify the class of
- * the event:
- *
- * 0x8X = system level events,
- * 0x9X = device/port specific events, event[1] = device/port,
- * The last 4 bits give the subtype:
- * 0x02 = Channel event (event[3] = chn).
- * 0x01 = note event (event[4] = note).
- * (0x01 is not used alone but always with bit 0x02).
- * event[2] = MIDI message code (0x80=note off etc.)
- *
- */
-
-#define EV_SEQ_LOCAL 0x80
-#define EV_TIMING 0x81
-#define EV_CHN_COMMON 0x92
-#define EV_CHN_VOICE 0x93
-#define EV_SYSEX 0x94
-/*
- * Event types 200 to 220 are reserved for application use.
- * These numbers will not be used by the driver.
- */
-
-/*
- * Events for event type EV_CHN_VOICE
- */
-
-#define MIDI_NOTEOFF 0x80
-#define MIDI_NOTEON 0x90
-#define MIDI_KEY_PRESSURE 0xA0
-
-/*
- * Events for event type EV_CHN_COMMON
- */
-
-#define MIDI_CTL_CHANGE 0xB0
-#define MIDI_PGM_CHANGE 0xC0
-#define MIDI_CHN_PRESSURE 0xD0
-#define MIDI_PITCH_BEND 0xE0
-
-#define MIDI_SYSTEM_PREFIX 0xF0
-
-/*
- * Timer event types
- */
-#define TMR_WAIT_REL 1 /* Time relative to the prev time */
-#define TMR_WAIT_ABS 2 /* Absolute time since TMR_START */
-#define TMR_STOP 3
-#define TMR_START 4
-#define TMR_CONTINUE 5
-#define TMR_TEMPO 6
-#define TMR_ECHO 8
-#define TMR_CLOCK 9 /* MIDI clock */
-#define TMR_SPP 10 /* Song position pointer */
-#define TMR_TIMESIG 11 /* Time signature */
-
-/*
- * Local event types
- */
-#define LOCL_STARTAUDIO 1
-
-#if (!defined(__KERNEL__) && !defined(KERNEL) && !defined(INKERNEL) && !defined(_KERNEL)) || defined(USE_SEQ_MACROS)
-/*
- * Some convenience macros to simplify programming of the
- * /dev/sequencer interface
- *
- * These macros define the API which should be used when possible.
- */
-#define SEQ_DECLAREBUF() SEQ_USE_EXTBUF()
-
-void seqbuf_dump(void); /* This function must be provided by programs */
-
-extern int OSS_init(int seqfd, int buflen);
-extern void OSS_seqbuf_dump(int fd, unsigned char *buf, int buflen);
-extern void OSS_seq_advbuf(int len, int fd, unsigned char *buf, int buflen);
-extern void OSS_seq_needbuf(int len, int fd, unsigned char *buf, int buflen);
-extern void OSS_patch_caching(int dev, int chn, int patch,
- int fd, unsigned char *buf, int buflen);
-extern void OSS_drum_caching(int dev, int chn, int patch,
- int fd, unsigned char *buf, int buflen);
-extern void OSS_write_patch(int fd, unsigned char *buf, int len);
-extern int OSS_write_patch2(int fd, unsigned char *buf, int len);
-
-#define SEQ_PM_DEFINES int __foo_bar___
-#ifdef OSSLIB
-# define SEQ_USE_EXTBUF() \
- extern unsigned char *_seqbuf; \
- extern int _seqbuflen;extern int _seqbufptr
-# define SEQ_DEFINEBUF(len) SEQ_USE_EXTBUF();static int _requested_seqbuflen=len
-# define _SEQ_ADVBUF(len) OSS_seq_advbuf(len, seqfd, _seqbuf, _seqbuflen)
-# define _SEQ_NEEDBUF(len) OSS_seq_needbuf(len, seqfd, _seqbuf, _seqbuflen)
-# define SEQ_DUMPBUF() OSS_seqbuf_dump(seqfd, _seqbuf, _seqbuflen)
-
-# define SEQ_LOAD_GMINSTR(dev, instr) \
- OSS_patch_caching(dev, -1, instr, seqfd, _seqbuf, _seqbuflen)
-# define SEQ_LOAD_GMDRUM(dev, drum) \
- OSS_drum_caching(dev, -1, drum, seqfd, _seqbuf, _seqbuflen)
-#else /* !OSSLIB */
-
-# define SEQ_LOAD_GMINSTR(dev, instr)
-# define SEQ_LOAD_GMDRUM(dev, drum)
-
-# define SEQ_USE_EXTBUF() \
- extern unsigned char _seqbuf[]; \
- extern int _seqbuflen;extern int _seqbufptr
-
-#ifndef USE_SIMPLE_MACROS
-/* Sample seqbuf_dump() implementation:
- *
- * SEQ_DEFINEBUF (2048); -- Defines a buffer for 2048 bytes
- *
- * int seqfd; -- The file descriptor for /dev/sequencer.
- *
- * void
- * seqbuf_dump ()
- * {
- * if (_seqbufptr)
- * if (write (seqfd, _seqbuf, _seqbufptr) == -1)
- * {
- * perror ("write /dev/sequencer");
- * exit (-1);
- * }
- * _seqbufptr = 0;
- * }
- */
-
-#define SEQ_DEFINEBUF(len) unsigned char _seqbuf[len]; int _seqbuflen = len;int _seqbufptr = 0
-#define _SEQ_NEEDBUF(len) if ((_seqbufptr+(len)) > _seqbuflen) seqbuf_dump()
-#define _SEQ_ADVBUF(len) _seqbufptr += len
-#define SEQ_DUMPBUF seqbuf_dump
-#else
-/*
- * This variation of the sequencer macros is used just to format one event
- * using fixed buffer.
- *
- * The program using the macro library must define the following macros before
- * using this library.
- *
- * #define _seqbuf name of the buffer (unsigned char[])
- * #define _SEQ_ADVBUF(len) If the applic needs to know the exact
- * size of the event, this macro can be used.
- * Otherwise this must be defined as empty.
- * #define _seqbufptr Define the name of index variable or 0 if
- * not required.
- */
-#define _SEQ_NEEDBUF(len) /* empty */
-#endif
-#endif /* !OSSLIB */
-
-#define SEQ_VOLUME_MODE(dev, mode) {_SEQ_NEEDBUF(8);\
- _seqbuf[_seqbufptr] = SEQ_EXTENDED;\
- _seqbuf[_seqbufptr+1] = SEQ_VOLMODE;\
- _seqbuf[_seqbufptr+2] = (dev);\
- _seqbuf[_seqbufptr+3] = (mode);\
- _seqbuf[_seqbufptr+4] = 0;\
- _seqbuf[_seqbufptr+5] = 0;\
- _seqbuf[_seqbufptr+6] = 0;\
- _seqbuf[_seqbufptr+7] = 0;\
- _SEQ_ADVBUF(8);}
-
-/*
- * Midi voice messages
- */
-
-#define _CHN_VOICE(dev, event, chn, note, parm) \
- {_SEQ_NEEDBUF(8);\
- _seqbuf[_seqbufptr] = EV_CHN_VOICE;\
- _seqbuf[_seqbufptr+1] = (dev);\
- _seqbuf[_seqbufptr+2] = (event);\
- _seqbuf[_seqbufptr+3] = (chn);\
- _seqbuf[_seqbufptr+4] = (note);\
- _seqbuf[_seqbufptr+5] = (parm);\
- _seqbuf[_seqbufptr+6] = (0);\
- _seqbuf[_seqbufptr+7] = 0;\
- _SEQ_ADVBUF(8);}
-
-#define SEQ_START_NOTE(dev, chn, note, vol) \
- _CHN_VOICE(dev, MIDI_NOTEON, chn, note, vol)
-
-#define SEQ_STOP_NOTE(dev, chn, note, vol) \
- _CHN_VOICE(dev, MIDI_NOTEOFF, chn, note, vol)
-
-#define SEQ_KEY_PRESSURE(dev, chn, note, pressure) \
- _CHN_VOICE(dev, MIDI_KEY_PRESSURE, chn, note, pressure)
-
-/*
- * Midi channel messages
- */
-
-#define _CHN_COMMON(dev, event, chn, p1, p2, w14) \
- {_SEQ_NEEDBUF(8);\
- _seqbuf[_seqbufptr] = EV_CHN_COMMON;\
- _seqbuf[_seqbufptr+1] = (dev);\
- _seqbuf[_seqbufptr+2] = (event);\
- _seqbuf[_seqbufptr+3] = (chn);\
- _seqbuf[_seqbufptr+4] = (p1);\
- _seqbuf[_seqbufptr+5] = (p2);\
- *(short *)&_seqbuf[_seqbufptr+6] = (w14);\
- _SEQ_ADVBUF(8);}
-/*
- * SEQ_SYSEX permits sending of sysex messages. (It may look that it permits
- * sending any MIDI bytes but it's absolutely not possible. Trying to do
- * so _will_ cause problems with MPU401 intelligent mode).
- *
- * Sysex messages are sent in blocks of 1 to 6 bytes. Longer messages must be
- * sent by calling SEQ_SYSEX() several times (there must be no other events
- * between them). First sysex fragment must have 0xf0 in the first byte
- * and the last byte (buf[len-1] of the last fragment must be 0xf7. No byte
- * between these sysex start and end markers cannot be larger than 0x7f. Also
- * lengths of each fragments (except the last one) must be 6.
- *
- * Breaking the above rules may work with some MIDI ports but is likely to
- * cause fatal problems with some other devices (such as MPU401).
- */
-#define SEQ_SYSEX(dev, buf, len) \
- {int ii, ll=(len); \
- unsigned char *bufp=buf;\
- if (ll>6)ll=6;\
- _SEQ_NEEDBUF(8);\
- _seqbuf[_seqbufptr] = EV_SYSEX;\
- _seqbuf[_seqbufptr+1] = (dev);\
- for(ii=0;ii<ll;ii++)\
- _seqbuf[_seqbufptr+ii+2] = bufp[ii];\
- for(ii=ll;ii<6;ii++)\
- _seqbuf[_seqbufptr+ii+2] = 0xff;\
- _SEQ_ADVBUF(8);}
-
-#define SEQ_CHN_PRESSURE(dev, chn, pressure) \
- _CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0)
-
-#define SEQ_SET_PATCH SEQ_PGM_CHANGE
-#ifdef OSSLIB
-# define SEQ_PGM_CHANGE(dev, chn, patch) \
- {OSS_patch_caching(dev, chn, patch, seqfd, _seqbuf, _seqbuflen); \
- _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0);}
-#else
-# define SEQ_PGM_CHANGE(dev, chn, patch) \
- _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0)
-#endif
-
-#define SEQ_CONTROL(dev, chn, controller, value) \
- _CHN_COMMON(dev, MIDI_CTL_CHANGE, chn, controller, 0, value)
-
-#define SEQ_BENDER(dev, chn, value) \
- _CHN_COMMON(dev, MIDI_PITCH_BEND, chn, 0, 0, value)
-
-
-#define SEQ_V2_X_CONTROL(dev, voice, controller, value) {_SEQ_NEEDBUF(8);\
- _seqbuf[_seqbufptr] = SEQ_EXTENDED;\
- _seqbuf[_seqbufptr+1] = SEQ_CONTROLLER;\
- _seqbuf[_seqbufptr+2] = (dev);\
- _seqbuf[_seqbufptr+3] = (voice);\
- _seqbuf[_seqbufptr+4] = (controller);\
- _seqbuf[_seqbufptr+5] = ((value)&0xff);\
- _seqbuf[_seqbufptr+6] = ((value>>8)&0xff);\
- _seqbuf[_seqbufptr+7] = 0;\
- _SEQ_ADVBUF(8);}
-/*
- * The following 5 macros are incorrectly implemented and obsolete.
- * Use SEQ_BENDER and SEQ_CONTROL (with proper controller) instead.
- */
-#define SEQ_PITCHBEND(dev, voice, value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER, value)
-#define SEQ_BENDER_RANGE(dev, voice, value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER_RANGE, value)
-#define SEQ_EXPRESSION(dev, voice, value) SEQ_CONTROL(dev, voice, CTL_EXPRESSION, value*128)
-#define SEQ_MAIN_VOLUME(dev, voice, value) SEQ_CONTROL(dev, voice, CTL_MAIN_VOLUME, (value*16383)/100)
-#define SEQ_PANNING(dev, voice, pos) SEQ_CONTROL(dev, voice, CTL_PAN, (pos+128) / 2)
-
-/*
- * Timing and syncronization macros
- */
-
-#define _TIMER_EVENT(ev, parm) {_SEQ_NEEDBUF(8);\
- _seqbuf[_seqbufptr+0] = EV_TIMING; \
- _seqbuf[_seqbufptr+1] = (ev); \
- _seqbuf[_seqbufptr+2] = 0;\
- _seqbuf[_seqbufptr+3] = 0;\
- *(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); \
- _SEQ_ADVBUF(8);}
-
-#define SEQ_START_TIMER() _TIMER_EVENT(TMR_START, 0)
-#define SEQ_STOP_TIMER() _TIMER_EVENT(TMR_STOP, 0)
-#define SEQ_CONTINUE_TIMER() _TIMER_EVENT(TMR_CONTINUE, 0)
-#define SEQ_WAIT_TIME(ticks) _TIMER_EVENT(TMR_WAIT_ABS, ticks)
-#define SEQ_DELTA_TIME(ticks) _TIMER_EVENT(TMR_WAIT_REL, ticks)
-#define SEQ_ECHO_BACK(key) _TIMER_EVENT(TMR_ECHO, key)
-#define SEQ_SET_TEMPO(value) _TIMER_EVENT(TMR_TEMPO, value)
-#define SEQ_SONGPOS(pos) _TIMER_EVENT(TMR_SPP, pos)
-#define SEQ_TIME_SIGNATURE(sig) _TIMER_EVENT(TMR_TIMESIG, sig)
-
-/*
- * Local control events
- */
-
-#define _LOCAL_EVENT(ev, parm) {_SEQ_NEEDBUF(8);\
- _seqbuf[_seqbufptr+0] = EV_SEQ_LOCAL; \
- _seqbuf[_seqbufptr+1] = (ev); \
- _seqbuf[_seqbufptr+2] = 0;\
- _seqbuf[_seqbufptr+3] = 0;\
- *(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); \
- _SEQ_ADVBUF(8);}
-
-#define SEQ_PLAYAUDIO(devmask) _LOCAL_EVENT(LOCL_STARTAUDIO, devmask)
-/*
- * Events for the level 1 interface only
- */
-
-#define SEQ_MIDIOUT(device, byte) {_SEQ_NEEDBUF(4);\
- _seqbuf[_seqbufptr] = SEQ_MIDIPUTC;\
- _seqbuf[_seqbufptr+1] = (byte);\
- _seqbuf[_seqbufptr+2] = (device);\
- _seqbuf[_seqbufptr+3] = 0;\
- _SEQ_ADVBUF(4);}
-
-/*
- * Patch loading.
- */
-#ifdef OSSLIB
-# define SEQ_WRPATCH(patchx, len) \
- OSS_write_patch(seqfd, (char*)(patchx), len)
-# define SEQ_WRPATCH2(patchx, len) \
- OSS_write_patch2(seqfd, (char*)(patchx), len)
-#else
-# define SEQ_WRPATCH(patchx, len) \
- {if (_seqbufptr) SEQ_DUMPBUF();\
- if (write(seqfd, (char*)(patchx), len)==-1) \
- perror("Write patch: /dev/sequencer");}
-# define SEQ_WRPATCH2(patchx, len) \
- (SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len))
-#endif
-
-#endif
-#endif
diff --git a/winsup/cygwin/include/sys/statfs.h b/winsup/cygwin/include/sys/statfs.h
deleted file mode 100644
index 51ad3c6..0000000
--- a/winsup/cygwin/include/sys/statfs.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* sys/statfs.h
-
- Copyright 2002 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <sys/vfs.h>
diff --git a/winsup/cygwin/include/sys/statvfs.h b/winsup/cygwin/include/sys/statvfs.h
deleted file mode 100644
index aa86674..0000000
--- a/winsup/cygwin/include/sys/statvfs.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* sys/statvfs.h
-
- Copyright 2005 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_STATVFS_H_
-#define _SYS_STATVFS_H_
-
-#include <sys/types.h>
-
-#define ST_RDONLY 0x80000 /* equals FILE_READ_ONLY_VOLUME */
-#define ST_NOSUID 0 /* Looking for that bit should always fail. */
-
-struct statvfs {
- unsigned long f_bsize; /* file system block size */
- unsigned long f_frsize; /* fragment size */
- fsblkcnt_t f_blocks; /* size of fs in f_frsize units */
- fsblkcnt_t f_bfree; /* free blocks in fs */
- fsblkcnt_t f_bavail; /* free blocks avail to non-superuser */
- fsfilcnt_t f_files; /* total file nodes in file system */
- fsfilcnt_t f_ffree; /* free file nodes in fs */
- fsfilcnt_t f_favail; /* avail file nodes in fs */
- unsigned long f_fsid; /* file system id */
- unsigned long f_flag; /* mount flags */
- unsigned long f_namemax; /* maximum length of filenames */
-};
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-int statvfs (const char *__path, struct statvfs *__buf);
-int fstatvfs (int __fd, struct statvfs *__buf);
-
-#ifdef __cplusplus
-};
-#endif /* __cplusplus */
-
-#endif /*_SYS_STATVFS_H_*/
diff --git a/winsup/cygwin/include/sys/stdio.h b/winsup/cygwin/include/sys/stdio.h
deleted file mode 100644
index 7aa46a0..0000000
--- a/winsup/cygwin/include/sys/stdio.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* sys/stdio.h
-
- Copyright 2004, 2005 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_STDIO_H_
-#define _SYS_STDIO_H_
-
-#include <sys/cdefs.h>
-#include <sys/lock.h>
-
-/* These definitions should be kept in sync with those in the newlib
- header of the same name (newlib/libc/include/sys/stdio.h). */
-
-#if !defined(__SINGLE_THREAD__)
-# if !defined(_flockfile)
-# define _flockfile(fp) ({ if (!((fp)->_flags & __SSTR)) \
- __cygwin_lock_lock ((_LOCK_T *)&(fp)->_lock); })
-# endif
-# if !defined(_ftrylockfile)
-# define _ftrylockfile(fp) (((fp)->_flags & __SSTR) ? 0 : \
- __cygwin_lock_trylock ((_LOCK_T *)&(fp)->_lock))
-# endif
-# if !defined(_funlockfile)
-# define _funlockfile(fp) ({ if (!((fp)->_flags & __SSTR)) \
- __cygwin_lock_unlock ((_LOCK_T *)&(fp)->_lock); })
-# endif
-#endif
-
-__BEGIN_DECLS
-
-#ifdef _GNU_SOURCE
-ssize_t _EXFUN(getline, (char **, size_t *, FILE *));
-ssize_t _EXFUN(getdelim, (char **, size_t *, int, FILE *));
-#endif /* _GNU_SOURCE */
-
-__END_DECLS
-
-#endif
diff --git a/winsup/cygwin/include/sys/strace.h b/winsup/cygwin/include/sys/strace.h
deleted file mode 100644
index 4685e5f..0000000
--- a/winsup/cygwin/include/sys/strace.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/* sys/strace.h
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 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. */
-
-/* This file contains routines for tracing system calls and other internal
- phenomenon.
-
- When tracing system calls, try to use the same style throughout:
-
- result = syscall (arg1, arg2, arg3) [optional extra stuff]
-
- If a system call can block (eg: read, write, wait), print another message
- before hanging so the user will know why the program has stopped.
-
- Note: __seterrno will also print a trace message. Have that printed
- *first*. This will make it easy to always know what __seterrno is
- refering to. For the same reason, try not to have __seterrno messages
- printed alone.
-*/
-
-#ifndef _SYS_STRACE_H
-#define _SYS_STRACE_H
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-
-class child_info;
-class strace
-{
- int vsprntf (char *buf, const char *func, const char *infmt, va_list ap);
- void write (unsigned category, const char *buf, int count);
- unsigned char _active;
-public:
- strace ();
- int microseconds ();
- int version;
- int lmicrosec;
- bool execing;
- void hello () __attribute__ ((regparm (1)));
- void prntf (unsigned, const char *func, const char *, ...) /*__attribute__ ((regparm(3)))*/;
- void vprntf (unsigned, const char *func, const char *, va_list ap) /*__attribute__ ((regparm(3)))*/;
- void wm (int message, int word, int lon) __attribute__ ((regparm(3)));
- void write_childpid (child_info&, unsigned long) __attribute__ ((regparm (2)));
- bool attached () const {return _active == 3;}
- bool active () const {return _active & 1;}
- unsigned char& active_val () {return _active;}
-};
-
-extern strace strace;
-
-#endif /* __cplusplus */
-
-#define _STRACE_INTERFACE_ACTIVATE_ADDR -1
-#define _STRACE_INTERFACE_ACTIVATE_ADDR1 -2
-#define _STRACE_CHILD_PID -3
-
-/* Bitmasks of tracing messages to print. */
-
-#define _STRACE_ALL 0x00001 // so behaviour of strace=1 is unchanged
-#define _STRACE_FLUSH 0x00002 // flush output buffer after every message
-#define _STRACE_INHERIT 0x00004 // children inherit mask from parent
-#define _STRACE_UHOH 0x00008 // unusual or weird phenomenon
-#define _STRACE_SYSCALL 0x00010 // system calls
-#define _STRACE_STARTUP 0x00020 // argc/envp printout at startup
-#define _STRACE_DEBUG 0x00040 // info to help debugging
-#define _STRACE_PARANOID 0x00080 // paranoid info
-#define _STRACE_TERMIOS 0x00100 // info for debugging termios stuff
-#define _STRACE_SELECT 0x00200 // info on ugly select internals
-#define _STRACE_WM 0x00400 // trace windows messages (enable _strace_wm)
-#define _STRACE_SIGP 0x00800 // trace signal and process handling
-#define _STRACE_MINIMAL 0x01000 // very minimal strace output
-#define _STRACE_EXITDUMP 0x04000 // dump strace cache on exit
-#define _STRACE_SYSTEM 0x08000 // cache strace messages
-#define _STRACE_NOMUTEX 0x10000 // don't use mutex for synchronization
-#define _STRACE_MALLOC 0x20000 // trace malloc calls
-#define _STRACE_THREAD 0x40000 // thread-locking calls
-#define _STRACE_NOTALL 0x80000 // don't include if _STRACE_ALL
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void small_printf (const char *, ...);
-void strace_printf (unsigned, const char *func, const char *, ...);
-
-#ifdef __cplusplus
-}
-#endif
-
-#ifdef __cplusplus
-
-#ifdef NOSTRACE
-#define define_strace(c, f)
-#define define_strace1(c, f)
-#else
-#ifdef NEW_MACRO_VARARGS
-/* Output message to strace log */
-
-#define define_strace0(c,...) \
- do { \
- if ((c & _STRACE_SYSTEM) || strace.active ()) \
- strace.prntf (c, __PRETTY_FUNCTION__, __VA_ARGS__); \
- } \
- while (0)
-
-#define define_strace(c, ...) define_strace0 (_STRACE_ ## c, __VA_ARGS__)
-#define define_strace1(c, ...) define_strace0 ((_STRACE_ ## c | _STRACE_NOTALL), __VA_ARGS__)
-
-#define debug_printf(...) define_strace (DEBUG, __VA_ARGS__)
-#define paranoid_printf(...) define_strace1 (PARANOID, __VA_ARGS__)
-#define select_printf(...) define_strace (SELECT, __VA_ARGS__)
-#define sigproc_printf(...) define_strace (SIGP, __VA_ARGS__)
-#define syscall_printf(...) define_strace (SYSCALL, __VA_ARGS__)
-#define system_printf(...) define_strace (SYSTEM, __VA_ARGS__)
-#define termios_printf(...) define_strace (TERMIOS, __VA_ARGS__)
-#define wm_printf(...) define_strace (WM, __VA_ARGS__)
-#define minimal_printf(...) define_strace1 (MINIMAL, __VA_ARGS__)
-#define malloc_printf(...) define_strace1 (MALLOC, __VA_ARGS__)
-#define thread_printf(...) define_strace1 (THREAD, __VA_ARGS__)
-#else
-#define strace_printf_wrap(what, fmt, args...) \
- ((void) ({\
- if ((_STRACE_ ## what & _STRACE_SYSTEM) || strace.active ()) \
- strace.prntf(_STRACE_ ## what, __PRETTY_FUNCTION__, fmt, ## args); \
- 0; \
- }))
-#define strace_printf_wrap1(what, fmt, args...) \
- ((void) ({\
- if ((_STRACE_ ## what & _STRACE_SYSTEM) || strace.active ()) \
- strace.prntf((_STRACE_ ## what) | _STRACE_NOTALL, __PRETTY_FUNCTION__, fmt, ## args); \
- 0; \
- }))
-
-#define debug_printf(fmt, args...) strace_printf_wrap(DEBUG, fmt , ## args)
-#define paranoid_printf(fmt, args...) strace_printf_wrap1(PARANOID, fmt , ## args)
-#define select_printf(fmt, args...) strace_printf_wrap(SELECT, fmt , ## args)
-#define sigproc_printf(fmt, args...) strace_printf_wrap(SIGP, fmt , ## args)
-#define syscall_printf(fmt, args...) strace_printf_wrap(SYSCALL, fmt , ## args)
-#define system_printf(fmt, args...) strace_printf_wrap(SYSTEM, fmt , ## args)
-#define termios_printf(fmt, args...) strace_printf_wrap(TERMIOS, fmt , ## args)
-#define wm_printf(fmt, args...) strace_printf_wrap(WM, fmt , ## args)
-#define minimal_printf(fmt, args...) strace_printf_wrap1(MINIMAL, fmt , ## args)
-#define malloc_printf(fmt, args...) strace_printf_wrap1(MALLOC, fmt , ## args)
-#define thread_printf(fmt, args...) strace_printf_wrap1(THREAD, fmt , ## args)
-#endif /*NEW_MACRO_VARARGS*/
-#endif /*NOSTRACE*/
-#endif /* __cplusplus */
-#endif /* _SYS_STRACE_H */
diff --git a/winsup/cygwin/include/sys/syslimits.h b/winsup/cygwin/include/sys/syslimits.h
deleted file mode 100644
index b501de8..0000000
--- a/winsup/cygwin/include/sys/syslimits.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* sys/syslimits.h
-
- Copyright 2006 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_SYSLIMITS_H
-#define _SYS_SYSLIMITS_H
-
-#ifdef _COMPILING_NEWLIB
-# include <limits.h>
-#else
-# error "Do not include sys/syslimits.h from applications directly."
-#endif
-
-#endif /*_SYS_SYSLIMITS_H */
diff --git a/winsup/cygwin/include/sys/syslog.h b/winsup/cygwin/include/sys/syslog.h
deleted file mode 100644
index d7279d3..0000000
--- a/winsup/cygwin/include/sys/syslog.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* sys/syslog.h
-
- Copyright 1996, 1998, 2001, 2005 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_LOG_H
-#define _SYS_LOG_H
-
-#include <sys/cdefs.h>
-#include <stdarg.h>
-
-#define _PATH_LOG "/dev/log"
-#define _PATH_KLOG "/dev/kmsg"
-
-#define LOG_EMERG 0
-#define LOG_ALERT 1
-#define LOG_CRIT 2
-#define LOG_ERR 3
-#define LOG_WARNING 4
-#define LOG_NOTICE 5
-#define LOG_INFO 6
-#define LOG_DEBUG 7
-
-#define LOG_PRIMASK 0x07
-
-#define LOG_PRI(p) ((p) & LOG_PRIMASK)
-#define LOG_MAKEPRI(fac, pri) (((fac) << 3) | (pri))
-
-#define LOG_KERN (0<<3)
-#define LOG_USER (1<<3)
-#define LOG_MAIL (2<<3)
-#define LOG_DAEMON (3<<3)
-#define LOG_AUTH (4<<3)
-#define LOG_SYSLOG (5<<3)
-#define LOG_LPR (6<<3)
-#define LOG_NEWS (7<<3)
-#define LOG_UUCP (8<<3)
-#define LOG_CRON (9<<3)
-#define LOG_AUTHPRIV (10<<3)
-#define LOG_FTP (11<<3)
-
-/* Codes through 15 are reserved for system use */
-#define LOG_LOCAL0 (16<<3)
-#define LOG_LOCAL1 (17<<3)
-#define LOG_LOCAL2 (18<<3)
-#define LOG_LOCAL3 (19<<3)
-#define LOG_LOCAL4 (20<<3)
-#define LOG_LOCAL5 (21<<3)
-#define LOG_LOCAL6 (22<<3)
-#define LOG_LOCAL7 (23<<3)
-
-#define LOG_NFACILITIES 24
-#define LOG_FACMASK 0x03f8
-#define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3)
-
-#ifdef SYSLOG_NAMES
-
-#define INTERNAL_NOPRI 0x10 /* Maps to "none" */
-#define INTERNAL_MARK LOG_MAKEPRI(LOG_NFACILITIES, 0) /* Maps to "mark" */
-
-typedef struct _code {
- char *c_name;
- int c_val;
-} CODE;
-
-CODE prioritynames[] = {
- { "alert", LOG_ALERT },
- { "crit", LOG_CRIT },
- { "debug", LOG_DEBUG },
- { "emerg", LOG_EMERG },
- { "err", LOG_ERR },
- { "error", LOG_ERR }, /* Deprecated */
- { "info", LOG_INFO },
- { "none", INTERNAL_NOPRI },
- { "notice", LOG_NOTICE },
- { "panic", LOG_EMERG }, /* Deprecated */
- { "warn", LOG_WARNING }, /* Deprecated */
- { "warning", LOG_WARNING },
- { NULL, -1 }
-};
-
-CODE facilitynames[] = {
- { "auth", LOG_AUTH },
- { "authpriv", LOG_AUTHPRIV },
- { "cron", LOG_CRON },
- { "daemon", LOG_DAEMON },
- { "ftp", LOG_FTP },
- { "kern", LOG_KERN },
- { "lpr", LOG_LPR },
- { "mail", LOG_MAIL },
- { "mark", INTERNAL_MARK },
- { "news", LOG_NEWS },
- { "security", LOG_AUTH }, /* Deprecated */
- { "syslog", LOG_SYSLOG },
- { "user", LOG_USER },
- { "uucp", LOG_UUCP },
- { "local0", LOG_LOCAL0 },
- { "local1", LOG_LOCAL1 },
- { "local2", LOG_LOCAL2 },
- { "local3", LOG_LOCAL3 },
- { "local4", LOG_LOCAL4 },
- { "local5", LOG_LOCAL5 },
- { "local6", LOG_LOCAL6 },
- { "local7", LOG_LOCAL7 },
- { NULL, -1 }
-};
-
-#endif /* SYSLOG_NAMES */
-
-#define LOG_MASK(pri) (1 << (pri))
-#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1)
-
-/*
- * Option flags for openlog.
- *
- * LOG_ODELAY no longer does anything.
- * LOG_NDELAY is the inverse of what it used to be.
- */
-#define LOG_PID 0x01 /* log the pid with each message */
-#define LOG_CONS 0x02 /* log on the console if errors in sending */
-#define LOG_ODELAY 0x04 /* delay open until first syslog() (default) */
-#define LOG_NDELAY 0x08 /* don't delay open */
-#define LOG_NOWAIT 0x10 /* don't wait for console forks: DEPRECATED */
-#define LOG_PERROR 0x20 /* log to stderr as well */
-
-__BEGIN_DECLS
-
-
-void closelog (void);
-void openlog (const char *, int, int);
-int setlogmask (int);
-void syslog (int, const char *, ...);
-void vsyslog (int, const char *, va_list ap);
-
-__END_DECLS
-
-
-#endif /* _SYS_LOG_H */
diff --git a/winsup/cygwin/include/sys/sysmacros.h b/winsup/cygwin/include/sys/sysmacros.h
deleted file mode 100644
index 2c9c699..0000000
--- a/winsup/cygwin/include/sys/sysmacros.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* sys/sysmacros.h
-
- Copyright 1998, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_SYSMACROS_H
-#define _SYS_SYSMACROS_H
-
-#ifdef __CYGWIN_USE_BIG_TYPES__
-#define major(dev) ((int)(((dev) >> 16) & 0xffff))
-#define minor(dev) ((int)((dev) & 0xffff))
-#define makedev(major, minor) (((major) << 16) | ((minor) & 0xffff))
-#else
-#define major(dev) ((int)(((dev) >> 8) & 0xff))
-#define minor(dev) ((int)((dev) & 0xff))
-#define makedev(major, minor) (((major) << 8) | ((minor) & 0xff))
-#endif
-
-#endif /* _SYS_SYSMACROS_H */
diff --git a/winsup/cygwin/include/sys/sysproto.h b/winsup/cygwin/include/sys/sysproto.h
deleted file mode 100644
index 488782b..0000000
--- a/winsup/cygwin/include/sys/sysproto.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* sys/sysproto.h
-
- Copyright 2003 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* sys/sysproto.h header file for Cygwin. */
-
-#ifndef _SYS_SYSPROTO_H
-#define _SYS_SYSPROTO_H
-
-#include <cygwin/sysproto.h>
-
-#endif /* _SYS_SYSPROTO_H */
diff --git a/winsup/cygwin/include/sys/termio.h b/winsup/cygwin/include/sys/termio.h
deleted file mode 100644
index 87f2eb4..0000000
--- a/winsup/cygwin/include/sys/termio.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/* sys/termio.h
-
- Copyright 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <sys/termios.h>
-
diff --git a/winsup/cygwin/include/sys/termios.h b/winsup/cygwin/include/sys/termios.h
deleted file mode 100644
index 6648bc3..0000000
--- a/winsup/cygwin/include/sys/termios.h
+++ /dev/null
@@ -1,352 +0,0 @@
-/* sys/termios.h
-
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006,
- 2007 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. */
-
-/* sys/termios.h */
-
-#ifndef _SYS_TERMIOS_H
-#define _SYS_TERMIOS_H
-
-#define TIOCMGET 0x5415
-#define TIOCMBIS 0x5416
-#define TIOCMBIC 0x5417
-#define TIOCMSET 0x5418
-#define TIOCINQ 0x541B
-
-/* TIOCINQ is utilized instead of FIONREAD which has been
-accupied for other purposes under CYGWIN.
-Other UNIX ioctl requests has been omited because
-effects of their work one can achive by standard
-POSIX commands */
-
-#define TIOCSBRK 0x5427
-#define TIOCCBRK 0x5428
-
-#define TIOCM_DTR 0x002
-#define TIOCM_RTS 0x004
-#define TIOCM_CTS 0x020
-#define TIOCM_CAR 0x040
-#define TIOCM_RNG 0x080
-#define TIOCM_DSR 0x100
-#define TIOCM_CD TIOCM_CAR
-#define TIOCM_RI TIOCM_RNG
-
-#define TCOOFF 0
-#define TCOON 1
-#define TCIOFF 2
-#define TCION 3
-
-#define TCGETA 5
-#define TCSETA 6
-#define TCSETAW 7
-#define TCSETAF 8
-
-#define TCIFLUSH 0
-#define TCOFLUSH 1
-#define TCIOFLUSH 2
-#define TCFLSH 3
-
-#define TCSAFLUSH 1
-#define TCSANOW 2
-#define TCSADRAIN 3
-#define TCSADFLUSH 4
-
-#define TIOCPKT 6
-
-#define TIOCPKT_DATA 0
-#define TIOCPKT_FLUSHREAD 1
-#define TIOCPKT_FLUSHWRITE 2
-#define TIOCPKT_STOP 4
-#define TIOCPKT_START 8
-#define TIOCPKT_NOSTOP 16
-#define TIOCPKT_DOSTOP 32
-
-#define FIONBIO 0x8004667e /* To be compatible with socket version */
-
-#define CTRL(ch) ((ch)&0x1F)
-
-#define CNUL 0
-#define CDEL 0x0007f
-#define CESC '\\'
-#define CINTR CTRL('C')
-#define CQUIT 0x0001c
-#define CERASE CTRL('H')
-#define CKILL CTRL('U')
-#define CEOT CTRL('D')
-#define CEOL 0
-#define CEOL2 0
-#define CEOF CTRL('D')
-#define CSTART CTRL('Q')
-#define CSTOP CTRL('S')
-#define CSWTCH 0x0001a
-#define NSWTCH 0
-#define CSUSP CTRL('Z')
-#define CDSUSP CTRL('Y')
-#define CRPRNT CTRL('R')
-#define CFLUSH CTRL('O')
-#define CWERASE CTRL('W')
-#define CLNEXT CTRL('V')
-
-/* iflag bits */
-#define IGNBRK 0x00001
-#define BRKINT 0x00002
-#define IGNPAR 0x00004
-#define IMAXBEL 0x00008
-#define INPCK 0x00010
-#define ISTRIP 0x00020
-#define INLCR 0x00040
-#define IGNCR 0x00080
-#define ICRNL 0x00100
-#define IXON 0x00400
-#define IXOFF 0x01000
-#define IUCLC 0x04000
-#define IXANY 0x08000
-#define PARMRK 0x10000
-
-/* oflag bits */
-
-#define OPOST 0x00001
-#define OLCUC 0x00002
-#define OCRNL 0x00004
-#define ONLCR 0x00008
-#define ONOCR 0x00010
-#define ONLRET 0x00020
-#define OFILL 0x00040
-#define CRDLY 0x00180
-#define CR0 0x00000
-#define CR1 0x00080
-#define CR2 0x00100
-#define CR3 0x00180
-#define NLDLY 0x00200
-#define NL0 0x00000
-#define NL1 0x00200
-#define BSDLY 0x00400
-#define BS0 0x00000
-#define BS1 0x00400
-#define TABDLY 0x01800
-#define TAB0 0x00000
-#define TAB1 0x00800
-#define TAB2 0x01000
-#define TAB3 0x01800
-#define XTABS 0x01800
-#define VTDLY 0x02000
-#define VT0 0x00000
-#define VT1 0x02000
-#define FFDLY 0x04000
-#define FF0 0x00000
-#define FF1 0x04000
-#define OFDEL 0x08000
-
-/* cflag bits */
-
-/* Baud rate values. These must fit in speed_t, which is unsigned
- char. See also the extended baud rates below. These baud rates
- set an additional bit. */
-#define CBAUD 0x0100f
-#define B0 0x00000
-#define B50 0x00001
-#define B75 0x00002
-#define B110 0x00003
-#define B134 0x00004
-#define B150 0x00005
-#define B200 0x00006
-#define B300 0x00007
-#define B600 0x00008
-#define B1200 0x00009
-#define B1800 0x0000a
-#define B2400 0x0000b
-#define B4800 0x0000c
-#define B9600 0x0000d
-#define B19200 0x0000e
-#define B38400 0x0000f
-
-#define CSIZE 0x00030
-#define CS5 0x00000
-#define CS6 0x00010
-#define CS7 0x00020
-#define CS8 0x00030
-#define CSTOPB 0x00040
-#define CREAD 0x00080
-#define PARENB 0x00100
-#define PARODD 0x00200
-#define HUPCL 0x00400
-#define CLOCAL 0x00800
-
-/* Extended baud rates above 37K. */
-#define CBAUDEX 0x0100f
-#define B57600 0x01001
-#define B115200 0x01002
-#define B128000 0x01003
-#define B230400 0x01004
-#define B256000 0x01005
-#define B460800 0x01006
-#define B500000 0x01007
-#define B576000 0x01008
-#define B921600 0x01009
-#define B1000000 0x0100a
-#define B1152000 0x0100b
-#define B1500000 0x0100c
-#define B2000000 0x0100d
-#define B2500000 0x0100e
-#define B3000000 0x0100f
-
-#define CRTSXOFF 0x04000
-#define CRTSCTS 0x08000
-
-/* lflag bits */
-#define ISIG 0x0001
-#define ICANON 0x0002
-#define ECHO 0x0004
-#define ECHOE 0x0008
-#define ECHOK 0x0010
-#define ECHONL 0x0020
-#define NOFLSH 0x0040
-#define TOSTOP 0x0080
-#define IEXTEN 0x0100
-#define FLUSHO 0x0200
-#define ECHOKE 0x0400
-#define ECHOCTL 0x0800
-
-#define VDISCARD 1
-#define VEOL 2
-#define VEOL2 3
-#define VEOF 4
-#define VERASE 5
-#define VINTR 6
-#define VKILL 7
-#define VLNEXT 8
-#define VMIN 9
-#define VQUIT 10
-#define VREPRINT 11
-#define VSTART 12
-#define VSTOP 13
-#define VSUSP 14
-#define VSWTC 15
-#define VTIME 16
-#define VWERASE 17
-
-#define NCCS 18
-
-/* Compare a character C to a value VAL from the `c_cc' array in a
- `struct termios'. If VAL is _POSIX_VDISABLE, no character can match it. */
-#define CCEQ(val, c) ((c) == (val) && (val) != _POSIX_VDISABLE)
-
-typedef unsigned char cc_t;
-typedef unsigned int tcflag_t;
-typedef unsigned int speed_t;
-typedef unsigned short otcflag_t;
-typedef unsigned char ospeed_t;
-
-struct __oldtermios
-{
- otcflag_t c_iflag;
- otcflag_t c_oflag;
- otcflag_t c_cflag;
- otcflag_t c_lflag;
- char c_line;
- cc_t c_cc[NCCS];
- ospeed_t c_ispeed;
- ospeed_t c_ospeed;
-};
-
-struct termios
-{
- tcflag_t c_iflag;
- tcflag_t c_oflag;
- tcflag_t c_cflag;
- tcflag_t c_lflag;
- char c_line;
- cc_t c_cc[NCCS];
- speed_t c_ispeed;
- speed_t c_ospeed;
-};
-
-#ifdef CYGWIN_VERSION_DLL_IS_OLD_TERMIOS
-#ifdef __GNUC__
-# define __tonew_termios(ti) \
- ({ \
- struct termios *__newti; \
- \
- if (!CYGWIN_VERSION_DLL_IS_OLD_TERMIOS) \
- __newti = (struct termios *) ti; \
- else \
- { \
- __newti = (struct termios *) alloca(sizeof(struct termios)); \
- __newti->c_iflag = ((struct __oldtermios *)ti)->c_iflag; \
- __newti->c_oflag = ((struct __oldtermios *)ti)->c_oflag; \
- __newti->c_cflag = ((struct __oldtermios *)ti)->c_cflag; \
- __newti->c_lflag = ((struct __oldtermios *)ti)->c_lflag; \
- __newti->c_line = ((struct __oldtermios *)ti)->c_line; \
- __newti->c_ispeed = ((struct __oldtermios *)ti)->c_ispeed; \
- __newti->c_ospeed = ((struct __oldtermios *)ti)->c_ospeed; \
- memcpy (__newti->c_cc, ((struct __oldtermios *)ti)->c_cc, sizeof(__newti->c_cc)); \
- } \
- __newti; \
- })
-
-# define __makenew_termios(ti) \
- (CYGWIN_VERSION_DLL_IS_OLD_TERMIOS ? \
- (struct termios *) alloca (sizeof (struct termios)) : (ti))
-
-# define __toapp_termios(toti, fromti) \
- ({ \
- if (!CYGWIN_VERSION_DLL_IS_OLD_TERMIOS) \
- toti = fromti; \
- else \
- { \
- ((struct __oldtermios *)toti)->c_iflag = fromti->c_iflag; \
- ((struct __oldtermios *)toti)->c_oflag = fromti->c_oflag; \
- ((struct __oldtermios *)toti)->c_cflag = fromti->c_cflag; \
- ((struct __oldtermios *)toti)->c_lflag = fromti->c_lflag; \
- ((struct __oldtermios *)toti)->c_line = fromti->c_line; \
- ((struct __oldtermios *)toti)->c_ispeed = fromti->c_ispeed; \
- ((struct __oldtermios *)toti)->c_ospeed = fromti->c_ospeed; \
- memcpy (((struct __oldtermios*)toti)->c_cc, fromti->c_cc, sizeof(fromti->c_cc)); \
- } \
- toti; \
- })
-#endif /*__GNUC__*/
-#endif
-
-#define termio termios
-
-#define cfgetospeed(tp) ((tp)->c_ospeed)
-#define cfgetispeed(tp) ((tp)->c_ispeed)
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int tcgetattr (int, struct termios *);
-int tcsetattr (int, int, const struct termios *);
-int tcsendbreak (int, int);
-int tcdrain (int);
-int tcflush (int, int);
-int tcflow (int, int);
-void cfmakeraw (struct termios *);
-int cfsetispeed (struct termios *, speed_t);
-int cfsetospeed (struct termios *, speed_t);
-
-#ifdef __cplusplus
-}
-#endif
-
-/* Extra stuff to make porting stuff easier. */
-struct winsize
-{
- unsigned short ws_row, ws_col;
- unsigned short ws_xpixel, ws_ypixel;
-};
-
-#define TIOCGWINSZ (('T' << 8) | 1)
-#define TIOCSWINSZ (('T' << 8) | 2)
-#define TIOCLINUX (('T' << 8) | 3)
-
-#endif /* _SYS_TERMIOS_H */
diff --git a/winsup/cygwin/include/sys/ttychars.h b/winsup/cygwin/include/sys/ttychars.h
deleted file mode 100644
index 2d31364..0000000
--- a/winsup/cygwin/include/sys/ttychars.h
+++ /dev/null
@@ -1 +0,0 @@
-/* ttychars.h */
diff --git a/winsup/cygwin/include/sys/uio.h b/winsup/cygwin/include/sys/uio.h
deleted file mode 100644
index e28f14e..0000000
--- a/winsup/cygwin/include/sys/uio.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* sys/uio.h
-
- Copyright 1996, 2000, 2001, 2002 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _UIO_H_
-#define _UIO_H_
-
-/* For size_t */
-#include <stddef.h>
-/* For ssize_t */
-#include <sys/types.h>
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-
-/*
- * Define the uio buffers used for writev, readv.
- */
-
-struct iovec
-{
- void *iov_base;
- size_t iov_len;
-};
-
-extern ssize_t readv __P ((int filedes, const struct iovec *vector, int count));
-extern ssize_t writev __P ((int filedes, const struct iovec *vector, int count));
-
-__END_DECLS
-
-#endif /* _UIO_H_ */
diff --git a/winsup/cygwin/include/sys/un.h b/winsup/cygwin/include/sys/un.h
deleted file mode 100644
index 2bd107d..0000000
--- a/winsup/cygwin/include/sys/un.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* sys/un.h
-
- Copyright 1999, 2001, 2005 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_UN_H
-#define _SYS_UN_H
-
-#include <cygwin/socket.h>
-
-/* POSIX requires only at least 100 bytes */
-#define UNIX_PATH_LEN 108
-
-struct sockaddr_un {
- sa_family_t sun_family; /* address family AF_LOCAL/AF_UNIX */
- char sun_path[UNIX_PATH_LEN]; /* 108 bytes of socket address */
-};
-
-/* Evaluates the actual length of `sockaddr_un' structure. */
-#define SUN_LEN(p) ((size_t)(((struct sockaddr_un *) NULL)->sun_path) \
- + strlen ((p)->sun_path))
-
-#endif
diff --git a/winsup/cygwin/include/sys/utime.h b/winsup/cygwin/include/sys/utime.h
deleted file mode 100644
index 8a9ec15..0000000
--- a/winsup/cygwin/include/sys/utime.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* sys/utime.h
-
- Copyright 2001 Red Hat, Inc.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#ifndef _SYS_UTIME_H
-#define _SYS_UTIME_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include <_ansi.h>
-#include <sys/types.h>
-
-struct utimbuf
-{
- time_t actime;
- time_t modtime;
-};
-
-int _EXFUN(utime, (const char *__path, const struct utimbuf *__buf));
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif /* _SYS_UTIME_H */
diff --git a/winsup/cygwin/include/sys/utmp.h b/winsup/cygwin/include/sys/utmp.h
deleted file mode 100644
index 8a63b34..0000000
--- a/winsup/cygwin/include/sys/utmp.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* sys/utmp.h
-
- Copyright 2001, 2003, 2004, 2005, 2008 Red Hat, Inc.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#ifndef UTMP_H
-#define UTMP_H
-
-#include <cygwin/utmp.h>
-
-#define UTMP_FILE _PATH_UTMP
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef ut_name
-#define ut_name ut_user
-#endif
-
-
-struct utmp
-{
- short ut_type;
- pid_t ut_pid;
- char ut_line[UT_LINESIZE];
- char ut_id[UT_IDLEN];
- time_t ut_time;
- char ut_user[UT_NAMESIZE];
- char ut_host[UT_HOSTSIZE];
- long ut_addr;
-};
-
-extern struct utmp *getutent (void);
-extern struct utmp *getutid (const struct utmp *);
-extern struct utmp *getutline (const struct utmp *);
-extern struct utmp *pututline (const struct utmp *);
-extern void endutent (void);
-extern void setutent (void);
-extern void utmpname (const char *);
-
-void login (const struct utmp *);
-int logout (const char *);
-int login_tty (int);
-void updwtmp (const char *, const struct utmp *);
-void logwtmp (const char *, const char *, const char *);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* UTMP_H */
diff --git a/winsup/cygwin/include/sys/utsname.h b/winsup/cygwin/include/sys/utsname.h
deleted file mode 100644
index bb770c0..0000000
--- a/winsup/cygwin/include/sys/utsname.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* sys/utsname.h
-
- Copyright 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_UTSNAME_H
-#define _SYS_UTSNAME_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct utsname
-{
- char sysname[20];
- char nodename[20];
- char release[20];
- char version[20];
- char machine[20];
-};
-
-int uname (struct utsname *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/winsup/cygwin/include/sys/vfs.h b/winsup/cygwin/include/sys/vfs.h
deleted file mode 100644
index 57b6f92..0000000
--- a/winsup/cygwin/include/sys/vfs.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* sys/vfs.h
-
- Copyright 1997, 1998, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_VFS_H_
-#define _SYS_VFS_H_
-
-struct statfs {
- long f_type; /* type of filesystem */
- long f_bsize; /* optimal transfer block size */
- long f_blocks; /* total data blocks in file system */
- long f_bfree; /* free blocks in fs */
- long f_bavail; /* free blocks avail to non-superuser */
- long f_files; /* total file nodes in file system */
- long f_ffree; /* free file nodes in fs */
- long f_fsid; /* file system id */
- long f_namelen; /* maximum length of filenames */
- long f_spare[6]; /* spare for later */
-};
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-int statfs (const char *__path, struct statfs *__buf);
-int fstatfs (int __fd, struct statfs *__buf);
-
-#ifdef __cplusplus
-};
-#endif /* __cplusplus */
-
-#endif /*_SYS_VFS_H_*/
diff --git a/winsup/cygwin/include/sys/wait.h b/winsup/cygwin/include/sys/wait.h
deleted file mode 100644
index 04bbae7..0000000
--- a/winsup/cygwin/include/sys/wait.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* sys/wait.h
-
- Copyright 1997, 1998, 2001, 2002, 2003, 2004, 2006 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_WAIT_H
-#define _SYS_WAIT_H
-
-#include <sys/types.h>
-#include <sys/resource.h>
-#include <cygwin/wait.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-pid_t wait (int *);
-pid_t waitpid (pid_t, int *, int);
-pid_t wait3 (int *__status, int __options, struct rusage *__rusage);
-pid_t wait4 (pid_t __pid, int *__status, int __options, struct rusage *__rusage);
-
-union wait
- {
- int w_status;
- struct
- {
- unsigned int __w_termsig:7; /* Terminating signal. */
- unsigned int __w_coredump:1; /* Set if dumped core. */
- unsigned int __w_retcode:8; /* Return code if exited normally. */
- unsigned int:16;
- } __wait_terminated;
- struct
- {
- unsigned int __w_stopval:8; /* W_STOPPED if stopped. */
- unsigned int __w_stopsig:8; /* Stopping signal. */
- unsigned int:16;
- } __wait_stopped;
- };
-
-#define w_termsig __wait_terminated.__w_termsig
-#define w_coredump __wait_terminated.__w_coredump
-#define w_retcode __wait_terminated.__w_retcode
-#define w_stopsig __wait_stopped.__w_stopsig
-#define w_stopval __wait_stopped.__w_stopval
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif
diff --git a/winsup/cygwin/include/sysexits.h b/winsup/cygwin/include/sysexits.h
deleted file mode 100644
index eba0b92..0000000
--- a/winsup/cygwin/include/sysexits.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)sysexits.h 8.1 (Berkeley) 6/2/93
- */
-
-#ifndef _SYSEXITS_H_
-#define _SYSEXITS_H_
-
-/*
- * SYSEXITS.H -- Exit status codes for system programs.
- *
- * This include file attempts to categorize possible error
- * exit statuses for system programs, notably delivermail
- * and the Berkeley network.
- *
- * Error numbers begin at EX__BASE to reduce the possibility of
- * clashing with other exit statuses that random programs may
- * already return. The meaning of the codes is approximately
- * as follows:
- *
- * EX_USAGE -- The command was used incorrectly, e.g., with
- * the wrong number of arguments, a bad flag, a bad
- * syntax in a parameter, or whatever.
- * EX_DATAERR -- The input data was incorrect in some way.
- * This should only be used for user's data & not
- * system files.
- * EX_NOINPUT -- An input file (not a system file) did not
- * exist or was not readable. This could also include
- * errors like "No message" to a mailer (if it cared
- * to catch it).
- * EX_NOUSER -- The user specified did not exist. This might
- * be used for mail addresses or remote logins.
- * EX_NOHOST -- The host specified did not exist. This is used
- * in mail addresses or network requests.
- * EX_UNAVAILABLE -- A service is unavailable. This can occur
- * if a support program or file does not exist. This
- * can also be used as a catchall message when something
- * you wanted to do doesn't work, but you don't know
- * why.
- * EX_SOFTWARE -- An internal software error has been detected.
- * This should be limited to non-operating system related
- * errors as possible.
- * EX_OSERR -- An operating system error has been detected.
- * This is intended to be used for such things as "cannot
- * fork", "cannot create pipe", or the like. It includes
- * things like getuid returning a user that does not
- * exist in the passwd file.
- * EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp,
- * etc.) does not exist, cannot be opened, or has some
- * sort of error (e.g., syntax error).
- * EX_CANTCREAT -- A (user specified) output file cannot be
- * created.
- * EX_IOERR -- An error occurred while doing I/O on some file.
- * EX_TEMPFAIL -- temporary failure, indicating something that
- * is not really an error. In sendmail, this means
- * that a mailer (e.g.) could not create a connection,
- * and the request should be reattempted later.
- * EX_PROTOCOL -- the remote system returned something that
- * was "not possible" during a protocol exchange.
- * EX_NOPERM -- You did not have sufficient permission to
- * perform the operation. This is not intended for
- * file system problems, which should use NOINPUT or
- * CANTCREAT, but rather for higher level permissions.
- */
-
-#define EX_OK 0 /* successful termination */
-
-#define EX__BASE 64 /* base value for error messages */
-
-#define EX_USAGE 64 /* command line usage error */
-#define EX_DATAERR 65 /* data format error */
-#define EX_NOINPUT 66 /* cannot open input */
-#define EX_NOUSER 67 /* addressee unknown */
-#define EX_NOHOST 68 /* host name unknown */
-#define EX_UNAVAILABLE 69 /* service unavailable */
-#define EX_SOFTWARE 70 /* internal software error */
-#define EX_OSERR 71 /* system error (e.g., can't fork) */
-#define EX_OSFILE 72 /* critical OS file missing */
-#define EX_CANTCREAT 73 /* can't create (user) output file */
-#define EX_IOERR 74 /* input/output error */
-#define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */
-#define EX_PROTOCOL 76 /* remote error in protocol */
-#define EX_NOPERM 77 /* permission denied */
-#define EX_CONFIG 78 /* configuration error */
-
-#define EX__MAX 78 /* maximum listed value */
-
-#endif /* !_SYSEXITS_H_ */
diff --git a/winsup/cygwin/include/syslog.h b/winsup/cygwin/include/syslog.h
deleted file mode 100644
index 5721ca5..0000000
--- a/winsup/cygwin/include/syslog.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* syslog.h
-
- Copyright 1996, 1998, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYSLOG_H
-#define _SYSLOG_H
-
-#include <sys/syslog.h>
-
-#endif /* _SYSLOG_H */
diff --git a/winsup/cygwin/include/termio.h b/winsup/cygwin/include/termio.h
deleted file mode 100644
index ba7b3b1..0000000
--- a/winsup/cygwin/include/termio.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* termio.h
-
- Copyright 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _TERMIO_H
-#define _TERMIO_H
-
-#include <sys/termio.h>
-
-#endif
diff --git a/winsup/cygwin/include/tzfile.h b/winsup/cygwin/include/tzfile.h
deleted file mode 100644
index 5586380..0000000
--- a/winsup/cygwin/include/tzfile.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* tzfile.h
-
- Copyright 2001, 2002, 2003 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _TZFILE_H
-#define _TZFILE_H
-
-#define SECSPERMIN 60
-#define MINSPERHOUR 60
-#define HOURSPERDAY 24
-#define DAYSPERWEEK 7
-#define DAYSPERNYEAR 365
-#define DAYSPERLYEAR 366
-#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR)
-#define SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY)
-#define MONSPERYEAR 12
-
-#define TM_SUNDAY 0
-#define TM_MONDAY 1
-#define TM_TUESDAY 2
-#define TM_WEDNESDAY 3
-#define TM_THURSDAY 4
-#define TM_FRIDAY 5
-#define TM_SATURDAY 6
-
-#define TM_JANUARY 0
-#define TM_FEBRUARY 1
-#define TM_MARCH 2
-#define TM_APRIL 3
-#define TM_MAY 4
-#define TM_JUNE 5
-#define TM_JULY 6
-#define TM_AUGUST 7
-#define TM_SEPTEMBER 8
-#define TM_OCTOBER 9
-#define TM_NOVEMBER 10
-#define TM_DECEMBER 11
-
-#define TM_YEAR_BASE 1900
-
-#define EPOCH_YEAR 1970
-#define EPOCH_WDAY TM_THURSDAY
-
-#define isleap(y) (((y) % 4) == 0 && ((y) % 100) != 0 || ((y) % 400) == 0)
-#endif
diff --git a/winsup/cygwin/include/utmpx.h b/winsup/cygwin/include/utmpx.h
deleted file mode 100644
index 2239a63..0000000
--- a/winsup/cygwin/include/utmpx.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* utmpx.h
-
- Copyright 2004 Red Hat, Inc.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#ifndef UTMPX_H
-#define UTMPX_H
-
-#include <cygwin/utmp.h>
-#include <sys/time.h>
-
-#define UTMPX_FILE _PATH_UTMP
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Must be kept in sync with struct utmp as defined in sys/utmp.h! */
-struct utmpx
-{
- short ut_type;
- pid_t ut_pid;
- char ut_line[UT_LINESIZE];
- char ut_id[UT_IDLEN];
- time_t ut_time;
- char ut_user[UT_NAMESIZE];
- char ut_host[UT_HOSTSIZE];
- long ut_addr;
- struct timeval ut_tv;
-};
-
-#ifndef ut_name
-#define ut_name ut_user
-#endif
-
-#ifndef ut_xtime
-#define ut_xtime ut_tv.tv_sec
-#endif
-
-extern void endutxent (void);
-extern struct utmpx *getutxent (void);
-extern struct utmpx *getutxid (const struct utmpx *id);
-extern struct utmpx *getutxline (const struct utmpx *line);
-extern struct utmpx *pututxline (const struct utmpx *utmpx);
-extern void setutxent (void);
-extern void utmpxname (const char *file);
-extern void updwtmpx (const char *file, const struct utmpx *utmpx);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* UTMPX_H */
diff --git a/winsup/cygwin/include/wait.h b/winsup/cygwin/include/wait.h
deleted file mode 100644
index f0f1281..0000000
--- a/winsup/cygwin/include/wait.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* wait.h
-
- Copyright 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _WAIT_H
-#define _WAIT_H
-
-#include <sys/wait.h>
-
-#endif /* _WAIT_H */
diff --git a/winsup/cygwin/init.cc b/winsup/cygwin/init.cc
deleted file mode 100644
index 1e633f4..0000000
--- a/winsup/cygwin/init.cc
+++ /dev/null
@@ -1,161 +0,0 @@
-/* init.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "cygtls.h"
-#include "ntdll.h"
-#include "shared_info.h"
-
-static DWORD _my_oldfunc;
-
-int NO_COPY dynamically_loaded;
-static char NO_COPY *search_for = (char *) cygthread::stub;
-unsigned threadfunc_ix[8] __attribute__((section (".cygwin_dll_common"), shared));
-extern cygthread *hwait_sig;
-
-#define OLDFUNC_OFFSET -1
-
-static void WINAPI
-threadfunc_fe (VOID *arg)
-{
- (void)__builtin_return_address(1);
- asm volatile ("andl $-16,%%esp" ::: "%esp");
- _cygtls::call ((DWORD (*) (void *, void *)) TlsGetValue (_my_oldfunc), arg);
-}
-
-/* If possible, redirect the thread entry point to a cygwin routine which
- adds tls stuff to the stack. */
-static void
-munge_threadfunc ()
-{
- int i;
- char **ebp = (char **) __builtin_frame_address (0);
- if (!threadfunc_ix[0])
- {
- char **peb;
- char **top = (char **) _tlsbase;
- for (peb = ebp, i = 0; peb < top && i < 7; peb++)
- if (*peb == search_for)
- threadfunc_ix[i++] = peb - ebp;
- if (0 && !threadfunc_ix[0])
- {
- try_to_debug ();
- return;
- }
- }
-
- if (threadfunc_ix[0])
- {
- char *threadfunc = ebp[threadfunc_ix[0]];
- if (!search_for || threadfunc == search_for)
- {
- search_for = NULL;
- for (i = 0; threadfunc_ix[i]; i++)
- ebp[threadfunc_ix[i]] = (char *) threadfunc_fe;
- TlsSetValue (_my_oldfunc, threadfunc);
- }
- }
-}
-
-inline static void
-respawn_wow64_process ()
-{
- NTSTATUS ret;
- PROCESS_BASIC_INFORMATION pbi;
- HANDLE parent;
-
- ULONG wow64 = TRUE; /* Opt on the safe side. */
-
- /* Unfortunately there's no simpler way to retrieve the
- parent process in NT, as far as I know. Hints welcome. */
- ret = NtQueryInformationProcess (GetCurrentProcess (),
- ProcessBasicInformation,
- &pbi, sizeof pbi, NULL);
- if (NT_SUCCESS (ret)
- && (parent = OpenProcess (PROCESS_QUERY_INFORMATION,
- FALSE,
- pbi.InheritedFromUniqueProcessId)))
- {
- NtQueryInformationProcess (parent, ProcessWow64Information,
- &wow64, sizeof wow64, NULL);
- CloseHandle (parent);
- }
-
- /* The parent is a real 64 bit process? Respawn! */
- if (!wow64)
- {
- PROCESS_INFORMATION pi;
- STARTUPINFOW si;
- DWORD ret = 0;
-
- GetStartupInfoW (&si);
- if (!CreateProcessW (NULL, GetCommandLineW (), NULL, NULL, TRUE,
- CREATE_DEFAULT_ERROR_MODE
- | GetPriorityClass (GetCurrentProcess ()),
- NULL, NULL, &si, &pi))
- api_fatal ("Failed to create process <%s>, %E", GetCommandLineA ());
- CloseHandle (pi.hThread);
- if (WaitForSingleObject (pi.hProcess, INFINITE) == WAIT_FAILED)
- api_fatal ("Waiting for process %d failed, %E", pi.dwProcessId);
- GetExitCodeProcess (pi.hProcess, &ret);
- CloseHandle (pi.hProcess);
- ExitProcess (ret);
- }
-}
-
-extern void __stdcall dll_crt0_0 ();
-
-HMODULE NO_COPY cygwin_hmodule;
-
-extern "C" BOOL WINAPI
-dll_entry (HANDLE h, DWORD reason, void *static_load)
-{
- BOOL wow64_test_stack_marker;
-
- switch (reason)
- {
- case DLL_PROCESS_ATTACH:
- wincap.init ();
- init_console_handler (false);
-
- cygwin_hmodule = (HMODULE) h;
- dynamically_loaded = (static_load == NULL);
-
- /* Is the stack at an unusual address? This is, an address which
- is in the usual space occupied by the process image, but below
- the auto load address of DLLs?
- Check if we're running in WOW64 on a 64 bit machine *and* are
- spawned by a genuine 64 bit process. If so, respawn. */
- if (wincap.is_wow64 ()
- && &wow64_test_stack_marker >= (PBOOL) 0x400000
- && &wow64_test_stack_marker <= (PBOOL) 0x10000000)
- respawn_wow64_process ();
-
- dll_crt0_0 ();
- _my_oldfunc = TlsAlloc ();
- break;
- case DLL_PROCESS_DETACH:
- if (dynamically_loaded)
- shared_destroy ();
- break;
- case DLL_THREAD_ATTACH:
- if (hwait_sig)
- munge_threadfunc ();
- break;
- case DLL_THREAD_DETACH:
- if (hwait_sig && (void *) &_my_tls > (void *) &wow64_test_stack_marker
- && _my_tls.isinitialized ())
- _my_tls.remove (0);
- break;
- }
-
- return TRUE;
-}
diff --git a/winsup/cygwin/ioctl.cc b/winsup/cygwin/ioctl.cc
deleted file mode 100644
index 3bd019d..0000000
--- a/winsup/cygwin/ioctl.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-/* ioctl.cc: ioctl routines.
-
- Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2006 Red Hat, Inc.
-
- Written by Doug Evans of Cygnus Support
- dje@cygnus.com
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-
-extern "C" int
-ioctl (int fd, int cmd, ...)
-{
-
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- return -1;
-
- /* check for optional mode argument */
- va_list ap;
- va_start (ap, cmd);
- char *argp = va_arg (ap, char *);
- va_end (ap);
-
- debug_printf ("fd %d, cmd %x", fd, cmd);
- int res;
- /* FIXME: This stinks. There are collisions between cmd types
- depending on whether fd is associated with a pty master or not.
- Something to fix for Cygwin2. CGF 2006-06-04 */
- if (cfd->is_tty () && cfd->get_major () != DEV_TTYM_MAJOR)
- switch (cmd)
- {
- case TCGETA:
- res = tcgetattr (fd, (struct termios *) argp);
- goto out;
- case TCSETA:
- res = tcsetattr (fd, TCSANOW, (struct termios *) argp);
- goto out;
- case TCSETAW:
- res = tcsetattr (fd, TCSADRAIN, (struct termios *) argp);
- goto out;
- case TCSETAF:
- res = tcsetattr (fd, TCSAFLUSH, (struct termios *) argp);
- goto out;
- }
-
- res = cfd->ioctl (cmd, argp);
-
-out:
- debug_printf ("returning %d", res);
- return res;
-}
diff --git a/winsup/cygwin/ipc.cc b/winsup/cygwin/ipc.cc
deleted file mode 100644
index b9f09cb..0000000
--- a/winsup/cygwin/ipc.cc
+++ /dev/null
@@ -1,91 +0,0 @@
-/* ipc.cc: Single unix specification IPC interface for Cygwin
-
- Copyright 2001, 2002, 2003 Red Hat, Inc.
-
- Originally written by Robert Collins <robert.collins@hotmail.com>
- Updated to 64 bit key_t by Charles Wilson <cygwin@cwilson.fastmail.fm>
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include "winsup.h"
-#include <sys/stat.h>
-
-/* Notes: we return a valid key even if id's low order 8 bits are 0. */
-extern "C" key_t
-ftok (const char *path, int id)
-{
- struct __stat64 statbuf;
- key_t tmp;
- if (stat64 (path, &statbuf))
- {
- /* stat set the appropriate errno for us */
- return (key_t) -1;
- }
-
- /* Since __CYGWIN_USE_BIG_TYPES__,
- dev_t is 32bits for cygwin
- ino_t is 64bits for cygwin
- and we need 8 bits for the id.
- thus key_t needs 104 bits total -- but we only have 64 (long long)
- We will have to alias; leaving open the possibility that the same
- key will be returned for multiple files. This possibility exists
- also on Linux; the question is, how to minimize this possibility.
-
- How to solve? Well, based on C. Vinschen's research, the nFileIndex*
- words vary as follows, on a partition with > 110,000 files
- nFileIndexHigh: 564 values between 0x00010000 -- 0xffff0000
- nFileIndexLow : 103812 values between 0x00000000 -- 0x0003ffff
- R. Collins suggests that these may represent a tree path,
- and that it would require ~2.9M files to force the tree depth
- to increase and reveal more bit usage.
-
- Implementation details: dev_t is 32bits, but is formed by
- device(32bits) << 16 | unit(32bits)
- But device is ACTUALLY == status & FH_DEVMASK, where FH_DEVMASK
- is 0x00000fff --> 12 bits
-
- As it happens, the maximum number of devices is actually
- FH_NDEV, not FH_DEVMASK, where FH_NDEV is currently 0x0000001d.
- However, FH_NDEV grows as new device types are added. So
- currently the device number needs 5 bits, but later? Let's
- take a cue from Linux, and use the lower 8 bits (instead of the
- lower 12 or 16) for the device (major?) number.
-
- Similarly, while 'units' is an int (32bits), it is unclear
- how many of these are significant. For most devices, it seems that
- 'units' is equivalent to 'minor'. For FH_TAPE, it's obvious that
- only 8 bits are important. However, for FH_SOCKET...it might be
- as high as 16 significant bits.
-
- Let's assume that we only need 8 bits from device (major) and
- only 8 bits from unit (minor). (On linux, only 8 bits of minor
- are used, and none from major).
- ---> so, we only need 0x00ff00ff (16 bits) of dev_t
-
- ---> we MUST have all 8 bits of id.
-
- ---> So, we only have 64 - 8 - 16 = 40 bits for ino_t. But, we
- need 0xffff0000 for nFileIndexHigh and 0x0003ffff for nFileIndexLow
- minimum, or 16 + 18 = 34 bits. Lucky us - we have 6 more bits
- to distribute.
-
- For lack of a better idea, we'll allocate 2 of the extra bits to
- nFileIndexHigh and 4 to nFileIndexLow. */
-
- /* get 8 bits from dev_t (major), put into 0xff00000000000000L */
- tmp = (((key_t) statbuf.st_dev) & 0x0000000000ff0000LL) << 40;
- /* get 8 bits from dev_t (minor), put into 0x00ff000000000000L */
- tmp |= (((key_t) statbuf.st_dev) & 0x00000000000000ffLL) << 48;
- /* get upper 16+2 bits from nFileInfoHigh, put into 0x0000ffffc0000000L
- shift down first, then mask, to avoid sign extension on rightshift */
- tmp |= (((key_t) statbuf.st_ino) & 0xffffc00000000000LL) >> 16;
- /* get lower 18+4 bits from nFileInfoLow, put into 0x000000003fffff00L */
- tmp |= (((key_t) statbuf.st_ino) & 0x00000000003fffffLL) << 8;
- /* use all 8 bits of id, and put into 0x00000000000000ffL */
- tmp |= (id & 0x00ff);
- return tmp;
-}
diff --git a/winsup/cygwin/kernel32.cc b/winsup/cygwin/kernel32.cc
deleted file mode 100644
index 35b879a..0000000
--- a/winsup/cygwin/kernel32.cc
+++ /dev/null
@@ -1,439 +0,0 @@
-/* kernel32.cc: Win32 replacement functions.
-
- Copyright 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "shared_info.h"
-#include "ntdll.h"
-#include <wchar.h>
-
-/* Implement CreateEvent/OpenEvent so that named objects are always created in
- Cygwin shared object namespace. */
-
-HANDLE WINAPI
-CreateEventW (LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset,
- BOOL bInitialState, LPCWSTR lpName)
-{
- HANDLE evt;
- UNICODE_STRING uname;
- OBJECT_ATTRIBUTES attr;
- NTSTATUS status;
- ULONG flags = 0;
-
- if (lpEventAttributes && lpEventAttributes->bInheritHandle)
- flags |= OBJ_INHERIT;
- if (lpName)
- {
- RtlInitUnicodeString (&uname, lpName);
- flags |= OBJ_OPENIF | OBJ_CASE_INSENSITIVE;
- }
- InitializeObjectAttributes (&attr, lpName ? &uname : NULL, flags,
- lpName ? get_shared_parent_dir () : NULL,
- lpEventAttributes
- ? lpEventAttributes->lpSecurityDescriptor : NULL);
- status = NtCreateEvent (&evt, CYG_EVENT_ACCESS, &attr,
- bManualReset ? NotificationEvent
- : SynchronizationEvent,
- bInitialState);
- if (!NT_SUCCESS (status))
- {
- SetLastError (RtlNtStatusToDosError (status));
- return NULL;
- }
- SetLastError (status == STATUS_OBJECT_NAME_EXISTS
- ? ERROR_ALREADY_EXISTS : ERROR_SUCCESS);
- return evt;
-}
-
-HANDLE WINAPI
-CreateEventA (LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset,
- BOOL bInitialState, LPCSTR lpName)
-{
- WCHAR name[MAX_PATH];
-
- if (lpName && !sys_mbstowcs (name, MAX_PATH, lpName))
- {
- SetLastError (ERROR_FILENAME_EXCED_RANGE);
- return NULL;
- }
- return CreateEventW (lpEventAttributes, bManualReset, bInitialState,
- lpName ? name : NULL);
-}
-
-HANDLE WINAPI
-OpenEventW (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpName)
-{
- HANDLE evt;
- UNICODE_STRING uname;
- OBJECT_ATTRIBUTES attr;
- NTSTATUS status;
- ULONG flags = 0;
-
- if (bInheritHandle)
- flags |= OBJ_INHERIT;
- if (lpName)
- {
- RtlInitUnicodeString (&uname, lpName);
- flags |= OBJ_CASE_INSENSITIVE;
- }
- InitializeObjectAttributes (&attr, lpName ? &uname : NULL, flags,
- lpName ? get_shared_parent_dir () : NULL,
- NULL);
- status = NtOpenEvent (&evt, dwDesiredAccess, &attr);
- if (!NT_SUCCESS (status))
- {
- SetLastError (RtlNtStatusToDosError (status));
- return NULL;
- }
- return evt;
-}
-
-HANDLE WINAPI
-OpenEventA (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpName)
-{
- WCHAR name[MAX_PATH];
-
- if (lpName && !sys_mbstowcs (name, MAX_PATH, lpName))
- {
- SetLastError (ERROR_FILENAME_EXCED_RANGE);
- return NULL;
- }
- return OpenEventW (dwDesiredAccess, bInheritHandle, lpName ? name : NULL);
-}
-
-/* Implement CreateMutex/OpenMutex so that named objects are always created in
- Cygwin shared object namespace. */
-
-HANDLE WINAPI
-CreateMutexW (LPSECURITY_ATTRIBUTES lpMutexAttributes, BOOL bInitialOwner,
- LPCWSTR lpName)
-{
- HANDLE mtx;
- UNICODE_STRING uname;
- OBJECT_ATTRIBUTES attr;
- NTSTATUS status;
- ULONG flags = 0;
-
- if (lpMutexAttributes && lpMutexAttributes->bInheritHandle)
- flags |= OBJ_INHERIT;
- if (lpName)
- {
- RtlInitUnicodeString (&uname, lpName);
- flags |= OBJ_OPENIF | OBJ_CASE_INSENSITIVE;
- }
- InitializeObjectAttributes (&attr, lpName ? &uname : NULL, flags,
- lpName ? get_shared_parent_dir () : NULL,
- lpMutexAttributes
- ? lpMutexAttributes->lpSecurityDescriptor : NULL);
- status = NtCreateMutant (&mtx, CYG_EVENT_ACCESS, &attr, bInitialOwner);
- if (!NT_SUCCESS (status))
- {
- SetLastError (RtlNtStatusToDosError (status));
- return NULL;
- }
- SetLastError (status == STATUS_OBJECT_NAME_EXISTS
- ? ERROR_ALREADY_EXISTS : ERROR_SUCCESS);
- return mtx;
-}
-
-HANDLE WINAPI
-CreateMutexA (LPSECURITY_ATTRIBUTES lpMutexAttributes, BOOL bInitialOwner,
- LPCSTR lpName)
-{
- WCHAR name[MAX_PATH];
-
- if (lpName && !sys_mbstowcs (name, MAX_PATH, lpName))
- {
- SetLastError (ERROR_FILENAME_EXCED_RANGE);
- return NULL;
- }
- return CreateMutexW (lpMutexAttributes, bInitialOwner, lpName ? name : NULL);
-}
-
-HANDLE WINAPI
-OpenMutexW (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpName)
-{
- HANDLE mtx;
- UNICODE_STRING uname;
- OBJECT_ATTRIBUTES attr;
- NTSTATUS status;
- ULONG flags = 0;
-
- if (bInheritHandle)
- flags |= OBJ_INHERIT;
- if (lpName)
- {
- RtlInitUnicodeString (&uname, lpName);
- flags |= OBJ_CASE_INSENSITIVE;
- }
- InitializeObjectAttributes (&attr, lpName ? &uname : NULL, flags,
- lpName ? get_shared_parent_dir () : NULL,
- NULL);
- status = NtOpenMutant (&mtx, dwDesiredAccess, &attr);
- if (!NT_SUCCESS (status))
- {
- SetLastError (RtlNtStatusToDosError (status));
- return NULL;
- }
- return mtx;
-}
-
-HANDLE WINAPI
-OpenMutexA (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpName)
-{
- WCHAR name[MAX_PATH];
-
- if (lpName && !sys_mbstowcs (name, MAX_PATH, lpName))
- {
- SetLastError (ERROR_FILENAME_EXCED_RANGE);
- return NULL;
- }
- return OpenMutexW (dwDesiredAccess, bInheritHandle, lpName ? name : NULL);
-}
-
-/* Implement CreateSemaphore/OpenSemaphore so that named objects are always
- created in Cygwin shared object namespace. */
-
-HANDLE WINAPI
-CreateSemaphoreW (LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
- LONG lInitialCount, LONG lMaximumCount, LPCWSTR lpName)
-{
- HANDLE sem;
- UNICODE_STRING uname;
- OBJECT_ATTRIBUTES attr;
- NTSTATUS status;
- ULONG flags = 0;
-
- if (lpSemaphoreAttributes && lpSemaphoreAttributes->bInheritHandle)
- flags |= OBJ_INHERIT;
- if (lpName)
- {
- RtlInitUnicodeString (&uname, lpName);
- flags |= OBJ_OPENIF | OBJ_CASE_INSENSITIVE;
- }
- InitializeObjectAttributes (&attr, lpName ? &uname : NULL, flags,
- lpName ? get_shared_parent_dir () : NULL,
- lpSemaphoreAttributes
- ? lpSemaphoreAttributes->lpSecurityDescriptor
- : NULL);
- status = NtCreateSemaphore (&sem, CYG_EVENT_ACCESS, &attr,
- lInitialCount, lMaximumCount);
- if (!NT_SUCCESS (status))
- {
- SetLastError (RtlNtStatusToDosError (status));
- return NULL;
- }
- SetLastError (status == STATUS_OBJECT_NAME_EXISTS
- ? ERROR_ALREADY_EXISTS : ERROR_SUCCESS);
- return sem;
-}
-
-HANDLE WINAPI
-CreateSemaphoreA (LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,
- LONG lInitialCount, LONG lMaximumCount, LPCSTR lpName)
-{
- WCHAR name[MAX_PATH];
-
- if (lpName && !sys_mbstowcs (name, MAX_PATH, lpName))
- {
- SetLastError (ERROR_FILENAME_EXCED_RANGE);
- return NULL;
- }
- return CreateSemaphoreW (lpSemaphoreAttributes, lInitialCount, lMaximumCount,
- lpName ? name : NULL);
-}
-
-HANDLE WINAPI
-OpenSemaphoreW (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpName)
-{
- HANDLE sem;
- UNICODE_STRING uname;
- OBJECT_ATTRIBUTES attr;
- NTSTATUS status;
- ULONG flags = 0;
-
- if (bInheritHandle)
- flags |= OBJ_INHERIT;
- if (lpName)
- {
- RtlInitUnicodeString (&uname, lpName);
- flags |= OBJ_CASE_INSENSITIVE;
- }
- InitializeObjectAttributes (&attr, lpName ? &uname : NULL, flags,
- lpName ? get_shared_parent_dir () : NULL,
- NULL);
- status = NtOpenSemaphore (&sem, dwDesiredAccess, &attr);
- if (!NT_SUCCESS (status))
- {
- SetLastError (RtlNtStatusToDosError (status));
- return NULL;
- }
- return sem;
-}
-
-HANDLE WINAPI
-OpenSemaphoreA (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpName)
-{
- WCHAR name[MAX_PATH];
-
- if (lpName && !sys_mbstowcs (name, MAX_PATH, lpName))
- {
- SetLastError (ERROR_FILENAME_EXCED_RANGE);
- return NULL;
- }
- return OpenSemaphoreW (dwDesiredAccess, bInheritHandle, lpName ? name : NULL);
-}
-
-/* Implement CreateFileMapping/OpenFileMapping so that named objects are always
- created in Cygwin shared object namespace. */
-
-HANDLE WINAPI
-CreateFileMappingW (HANDLE hFile, LPSECURITY_ATTRIBUTES lpAttributes,
- DWORD flProtect, DWORD dwMaximumSizeHigh,
- DWORD dwMaximumSizeLow, LPCWSTR lpName)
-{
- HANDLE sect;
- UNICODE_STRING uname;
- OBJECT_ATTRIBUTES attr;
- NTSTATUS status;
- ULONG flags = 0;
- ACCESS_MASK access = READ_CONTROL | SECTION_QUERY | SECTION_MAP_READ;
- ULONG prot = flProtect & (PAGE_NOACCESS | PAGE_READONLY | PAGE_READWRITE
- | PAGE_WRITECOPY | PAGE_EXECUTE
- | PAGE_EXECUTE_READ | PAGE_EXECUTE_READWRITE
- | PAGE_EXECUTE_WRITECOPY);
- ULONG attribs = flProtect & (SEC_BASED | SEC_NO_CHANGE | SEC_IMAGE | SEC_VLM
- | SEC_RESERVE | SEC_COMMIT | SEC_NOCACHE);
- LARGE_INTEGER size = {{ LowPart : dwMaximumSizeLow,
- HighPart : dwMaximumSizeHigh }};
- PLARGE_INTEGER psize = size.QuadPart ? &size : NULL;
-
- if (prot & (PAGE_READWRITE | PAGE_WRITECOPY
- | PAGE_EXECUTE_READWRITE | PAGE_EXECUTE_WRITECOPY))
- access |= SECTION_MAP_WRITE;
- if (prot & (PAGE_EXECUTE | PAGE_EXECUTE_READ
- | PAGE_EXECUTE_READWRITE | PAGE_EXECUTE_WRITECOPY))
- access |= SECTION_MAP_EXECUTE;
- if (lpAttributes && lpAttributes->bInheritHandle)
- flags |= OBJ_INHERIT;
- if (lpName)
- {
- RtlInitUnicodeString (&uname, lpName);
- flags |= OBJ_OPENIF | OBJ_CASE_INSENSITIVE;
- }
- InitializeObjectAttributes (&attr, lpName ? &uname : NULL, flags,
- lpName ? get_shared_parent_dir () : NULL,
- lpAttributes
- ? lpAttributes->lpSecurityDescriptor
- : NULL);
- if (!(attribs & (SEC_RESERVE | SEC_COMMIT)))
- attribs |= SEC_COMMIT;
- if (hFile == INVALID_HANDLE_VALUE)
- hFile = NULL;
- status = NtCreateSection (&sect, access, &attr, psize, prot, attribs, hFile);
- if (!NT_SUCCESS (status))
- {
- SetLastError (RtlNtStatusToDosError (status));
- return NULL;
- }
- SetLastError (status == STATUS_OBJECT_NAME_EXISTS
- ? ERROR_ALREADY_EXISTS : ERROR_SUCCESS);
- return sect;
-}
-
-HANDLE WINAPI
-CreateFileMappingA (HANDLE hFile, LPSECURITY_ATTRIBUTES lpAttributes,
- DWORD flProtect, DWORD dwMaximumSizeHigh,
- DWORD dwMaximumSizeLow, LPCSTR lpName)
-{
- WCHAR name[MAX_PATH];
-
- if (lpName && !sys_mbstowcs (name, MAX_PATH, lpName))
- {
- SetLastError (ERROR_FILENAME_EXCED_RANGE);
- return NULL;
- }
- return CreateFileMappingW (hFile, lpAttributes, flProtect, dwMaximumSizeHigh,
- dwMaximumSizeLow, lpName ? name : NULL);
-}
-
-HANDLE WINAPI
-OpenFileMappingW (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpName)
-{
- HANDLE sect;
- UNICODE_STRING uname;
- OBJECT_ATTRIBUTES attr;
- NTSTATUS status;
- ULONG flags = 0;
-
- if (bInheritHandle)
- flags |= OBJ_INHERIT;
- if (lpName)
- {
- RtlInitUnicodeString (&uname, lpName);
- flags |= OBJ_CASE_INSENSITIVE;
- }
- InitializeObjectAttributes (&attr, lpName ? &uname : NULL, flags,
- lpName ? get_shared_parent_dir () : NULL,
- NULL);
- status = NtOpenSection (&sect, dwDesiredAccess, &attr);
- if (!NT_SUCCESS (status))
- {
- SetLastError (RtlNtStatusToDosError (status));
- return NULL;
- }
- return sect;
-}
-
-HANDLE WINAPI
-OpenFileMappingA (DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpName)
-{
- WCHAR name[MAX_PATH];
-
- if (lpName && !sys_mbstowcs (name, MAX_PATH, lpName))
- {
- SetLastError (ERROR_FILENAME_EXCED_RANGE);
- return NULL;
- }
- return OpenFileMappingW (dwDesiredAccess, bInheritHandle, lpName ? name : NULL);
-}
-
-/* When Terminal Services are installed, the GetWindowsDirectory function
- does not return the system installation dir, but a user specific directory
- instead. That's not what we have in mind when calling GetWindowsDirectory
- from within Cygwin. So we're calling GetSystemWindowsDirectory from here,
- except on NT4 where we use the method as described in KB186498. */
-
-#define SYSTEM32 (sizeof ("\\System32") - 1)
-
-UINT WINAPI
-GetWindowsDirectoryW (LPWSTR buf, UINT size)
-{
- if (wincap.has_terminal_services ())
- return GetSystemWindowsDirectoryW (buf, size);
- /* NT4 */
- WCHAR name [size + SYSTEM32];
- UINT ret = GetSystemDirectoryW (name, size + SYSTEM32);
- if (ret < size + SYSTEM32)
- {
- name[ret - SYSTEM32] = L'\0';
- wcscpy (buf, name);
- }
- return ret - SYSTEM32;
-}
-
-UINT WINAPI
-GetWindowsDirectoryA (LPSTR buf, UINT size)
-{
- WCHAR name[MAX_PATH];
- UINT ret = GetWindowsDirectoryW (name, min (size, MAX_PATH));
- if (ret < size)
- sys_wcstombs (buf, size, name);
- return ret;
-}
diff --git a/winsup/cygwin/lib/_cygwin_crt0_common.cc b/winsup/cygwin/lib/_cygwin_crt0_common.cc
deleted file mode 100644
index 935b84f..0000000
--- a/winsup/cygwin/lib/_cygwin_crt0_common.cc
+++ /dev/null
@@ -1,103 +0,0 @@
-/* common.cc: common crt0 function for cygwin crt0's.
-
- Copyright 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "perprocess.h"
-#include "cygwin/version.h"
-#include "crt0.h"
-#include <reent.h>
-#include <stdlib.h>
-
-/* Avoid an info message from linker when linking applications. */
-extern __declspec(dllimport) struct _reent *_impure_ptr;
-
-#undef environ
-
-extern "C"
-{
-char **environ;
-int cygwin_attach_dll (HMODULE, MainFunc);
-int cygwin_attach_noncygwin_dll (HMODULE, MainFunc);
-int main (int, char **, char **);
-int _fmode;
-void _pei386_runtime_relocator ();
-
-/* Set up pointers to various pieces so the dll can then use them,
- and then jump to the dll. */
-
-int __stdcall
-_cygwin_crt0_common (MainFunc f, per_process *u)
-{
- /* This is used to record what the initial sp was. The value is needed
- when copying the parent's stack to the child during a fork. */
- DWORD newu;
- int uwasnull;
-
- if (u != NULL)
- uwasnull = 0; /* Caller allocated space for per_process structure */
- else if ((newu = cygwin_internal (CW_USER_DATA)) == (DWORD) -1)
- return 0;
- else
- {
- u = (per_process *) newu; /* Using DLL built-in per_process */
- uwasnull = 1; /* Remember for later */
- }
-
- /* The version numbers are the main source of compatibility checking.
- As a backup to them, we use the size of the per_process struct. */
- u->magic_biscuit = sizeof (per_process);
-
- /* cygwin.dll version number in effect at the time the app was created. */
- u->dll_major = CYGWIN_VERSION_DLL_MAJOR;
- u->dll_minor = CYGWIN_VERSION_DLL_MINOR;
- u->api_major = CYGWIN_VERSION_API_MAJOR;
- u->api_minor = CYGWIN_VERSION_API_MINOR;
-
- u->ctors = &__CTOR_LIST__;
- u->dtors = &__DTOR_LIST__;
- u->envptr = &environ;
- if (uwasnull)
- _impure_ptr = u->impure_ptr; /* Use field initialized in newer DLLs. */
- else
- u->impure_ptr_ptr = &_impure_ptr; /* Older DLLs need this. */
-
- u->forkee = 0; /* This should only be set in dcrt0.cc
- when the process is actually forked */
- u->main = f;
-
- /* These functions are executed prior to main. They are just stubs unless the
- user overrides them. */
- u->premain[0] = cygwin_premain0;
- u->premain[1] = cygwin_premain1;
- u->premain[2] = cygwin_premain2;
- u->premain[3] = cygwin_premain3;
- u->fmode_ptr = &_fmode;
- u->initial_sp = (char *) __builtin_frame_address (1);
-
- /* Remember whatever the user linked his application with - or
- point to entries in the dll. */
- u->malloc = &malloc;
- u->free = &free;
- u->realloc = &realloc;
- u->calloc = &calloc;
-
- /* Setup the module handle so fork can get the path name. */
- u->hmodule = GetModuleHandle (0);
-
- /* variables for fork */
- u->data_start = &_data_start__;
- u->data_end = &_data_end__;
- u->bss_start = &_bss_start__;
- u->bss_end = &_bss_end__;
-
- _pei386_runtime_relocator ();
- return 1;
-}
-} /* "C" */
diff --git a/winsup/cygwin/lib/crt0.h b/winsup/cygwin/lib/crt0.h
deleted file mode 100644
index 461ea9b..0000000
--- a/winsup/cygwin/lib/crt0.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* crt0.h: header file for crt0.
-
- Copyright 2000, 2001, 2008 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 __cplusplus
-extern "C" {
-#endif
-
-#include <windows.h>
-struct per_process;
-typedef int (*MainFunc) (int argc, char *argv[], char **env);
-int __stdcall _cygwin_crt0_common (MainFunc, struct per_process *);
-int dll_dllcrt0 (HMODULE, struct per_process *);
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/winsup/cygwin/lib/cygwin_attach_dll.c b/winsup/cygwin/lib/cygwin_attach_dll.c
deleted file mode 100644
index 49bb925..0000000
--- a/winsup/cygwin/lib/cygwin_attach_dll.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* attach_dll.cc: crt0 for attaching cygwin DLL from a non-cygwin app.
-
- Copyright 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#undef __INSIDE_CYGWIN__
-#include <windows.h>
-#include <time.h> /* Needed since call to sys/time.h via sys/cygwin.h
- complains otherwise */
-#include <sys/cygwin.h>
-#include "crt0.h"
-
-/* for a loaded dll */
-int
-cygwin_attach_dll (HMODULE h, MainFunc f)
-{
- static struct per_process u;
- (void) _cygwin_crt0_common (f, &u);
-
- /* jump into the dll. */
- return dll_dllcrt0 (h, &u);
-}
diff --git a/winsup/cygwin/lib/cygwin_crt0.c b/winsup/cygwin/lib/cygwin_crt0.c
deleted file mode 100644
index fdd2d8d..0000000
--- a/winsup/cygwin/lib/cygwin_crt0.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/* cygwin_crt0.cc: crt0 for cygwin
-
- Copyright 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#undef __INSIDE_CYGWIN__
-#include <sys/cygwin.h>
-#include "crt0.h"
-
-extern void __stdcall _dll_crt0 ()
- __declspec (dllimport) __attribute ((noreturn));
-
-/* for main module */
-void
-cygwin_crt0 (MainFunc f)
-{
- _cygwin_crt0_common (f, NULL);
- _dll_crt0 (); /* Jump into the dll, never to return */
-}
diff --git a/winsup/cygwin/lib/dll_entry.c b/winsup/cygwin/lib/dll_entry.c
deleted file mode 100644
index 781f6a3..0000000
--- a/winsup/cygwin/lib/dll_entry.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* dll_entry.cc: Provide the default user DLL linker entry point.
-
- Copyright 1998, 2000, 2001 Red Hat, Inc.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* Here we simply instantiate the DECLARE_CYGWIN_DLL to define the
- linker entry point, __cygwin_dll_entry@12, which in turn calls
- _DllMain@12 to do user-specific initialization, if any. There is a
- default DllMain stub in the library if there is no user supplied
- one. */
-
-#include "cygwin/cygwin_dll.h"
-
-DECLARE_CYGWIN_DLL (DllMain);
diff --git a/winsup/cygwin/lib/dll_main.cc b/winsup/cygwin/lib/dll_main.cc
deleted file mode 100644
index a224a0a..0000000
--- a/winsup/cygwin/lib/dll_main.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-/* dll_main.cc: Provide the DllMain stub that the user can override.
-
- Copyright 1998, 2000, 2001 Red Hat, Inc.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <windows.h>
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-#include <stdio.h>
-
-extern "C"
-BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason,
- LPVOID reserved /* Not used. */);
-
-BOOL APIENTRY
-DllMain (
- HINSTANCE hInst /* Library instance handle. */ ,
- DWORD reason /* Reason this function is being called. */ ,
- LPVOID reserved /* Not used. */)
-{
- switch (reason)
- {
- case DLL_PROCESS_ATTACH:
- break;
-
- case DLL_PROCESS_DETACH:
- break;
-
- case DLL_THREAD_ATTACH:
- break;
-
- case DLL_THREAD_DETACH:
- break;
- }
- return TRUE;
-}
diff --git a/winsup/cygwin/lib/libcmain.c b/winsup/cygwin/lib/libcmain.c
deleted file mode 100644
index da2a698..0000000
--- a/winsup/cygwin/lib/libcmain.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* libcmain.c
-
- Copyright 1996, 1997, 1998, 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <windows.h>
-#include <string.h>
-
-#define SP " \t\n"
-
-/* Allow apps which don't have a main to work, as long as they define WinMain */
-int
-main ()
-{
- HMODULE x = GetModuleHandle (0);
- char *s = GetCommandLine ();
- STARTUPINFO si;
- char *nexts;
-
- s += strspn (s, SP);
-
- if (*s != '"')
- nexts = strpbrk (s, SP);
- else
- while ((nexts = strchr (s + 1, '"')) != NULL && nexts[-1] == '\\')
- s = nexts;
-
- if (!nexts)
- nexts = strchr (s, '\0');
- else
- nexts += strspn (nexts + 1, SP);
-
- GetStartupInfo (&si);
-
- return WinMain (x, 0, nexts,
- ((si.dwFlags & STARTF_USESHOWWINDOW) != 0
- ? si.wShowWindow
- : SW_SHOWNORMAL));
-}
diff --git a/winsup/cygwin/lib/premain0.c b/winsup/cygwin/lib/premain0.c
deleted file mode 100644
index b77e02e..0000000
--- a/winsup/cygwin/lib/premain0.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* premain0.c
-
- Copyright 2000 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-void
-cygwin_premain0(int argc, char **argv)
-{
-}
diff --git a/winsup/cygwin/lib/premain1.c b/winsup/cygwin/lib/premain1.c
deleted file mode 100644
index 99aeac9..0000000
--- a/winsup/cygwin/lib/premain1.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* premain1.c
-
- Copyright 2000 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-void
-cygwin_premain1(int argc, char **argv)
-{
-}
diff --git a/winsup/cygwin/lib/premain2.c b/winsup/cygwin/lib/premain2.c
deleted file mode 100644
index a89e76e..0000000
--- a/winsup/cygwin/lib/premain2.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* premain2.c
-
- Copyright 2000 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-void
-cygwin_premain2(int argc, char **argv)
-{
-}
diff --git a/winsup/cygwin/lib/premain3.c b/winsup/cygwin/lib/premain3.c
deleted file mode 100644
index c5b99b9..0000000
--- a/winsup/cygwin/lib/premain3.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* premain3.c
-
- Copyright 2000 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-void
-cygwin_premain3(int argc, char **argv)
-{
-}
diff --git a/winsup/cygwin/lib/pseudo-reloc.c b/winsup/cygwin/lib/pseudo-reloc.c
deleted file mode 100644
index 5760a69..0000000
--- a/winsup/cygwin/lib/pseudo-reloc.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* pseudo-reloc.c
-
- Written by Egor Duda <deo@logos-m.ru>
- THIS SOFTWARE IS NOT COPYRIGHTED
-
- This source code is offered for use in the public domain. You may
- use, modify or distribute it freely.
-
- This code is distributed in the hope that it will be useful but
- WITHOUT ANY WARRANTY. ALL WARRENTIES, EXPRESS OR IMPLIED ARE HEREBY
- DISCLAMED. This includes but is not limited to warrenties of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-*/
-
-#include <windows.h>
-
-extern char __RUNTIME_PSEUDO_RELOC_LIST__;
-extern char __RUNTIME_PSEUDO_RELOC_LIST_END__;
-extern char _image_base__;
-
-typedef struct
- {
- DWORD addend;
- DWORD target;
- }
-runtime_pseudo_reloc;
-
-void
-do_pseudo_reloc (void* start, void* end, void* base)
-{
- DWORD reloc_target;
- runtime_pseudo_reloc* r;
- for (r = (runtime_pseudo_reloc*) start; r < (runtime_pseudo_reloc*) end; r++)
- {
- reloc_target = (DWORD) base + r->target;
- *((DWORD*) reloc_target) += r->addend;
- }
-}
-
-void
-_pei386_runtime_relocator ()
-{
- do_pseudo_reloc (&__RUNTIME_PSEUDO_RELOC_LIST__,
- &__RUNTIME_PSEUDO_RELOC_LIST_END__,
- &_image_base__);
-}
diff --git a/winsup/cygwin/libc/bsdlib.cc b/winsup/cygwin/libc/bsdlib.cc
deleted file mode 100644
index 9d488c3..0000000
--- a/winsup/cygwin/libc/bsdlib.cc
+++ /dev/null
@@ -1,303 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * CV 2003-09-10: Cygwin specific changes applied. Code simplified just
- * for Cygwin alone.
- */
-
-#include "winsup.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <utmp.h>
-#include <unistd.h>
-#include <sys/termios.h>
-#include <sys/ioctl.h>
-#include <fcntl.h>
-#include "cygerrno.h"
-#include "thread.h"
-#include "cygtls.h"
-
-extern "C" int
-daemon (int nochdir, int noclose)
-{
- int fd;
-
- switch (fork ())
- {
- case -1:
- return -1;
- case 0:
- break;
- default:
- /* This sleep avoids a race condition which kills the
- child process if parent is started by a NT/W2K service.
- FIXME: Is that still true? */
- Sleep (1000L);
- _exit (0);
- }
- if (setsid () == -1)
- return -1;
- if (!nochdir)
- chdir ("/");
- if (!noclose && (fd = open (_PATH_DEVNULL, O_RDWR, 0)) >= 0)
- {
- dup2 (fd, STDIN_FILENO);
- dup2 (fd, STDOUT_FILENO);
- dup2 (fd, STDERR_FILENO);
- if (fd > 2)
- close (fd);
- }
- return 0;
-}
-
-extern "C" int
-login_tty (int fd)
-{
- char *fdname;
- int newfd;
-
- if (setsid () == -1)
- return -1;
- if ((fdname = ttyname (fd)))
- {
- if (fd != STDIN_FILENO)
- close (STDIN_FILENO);
- if (fd != STDOUT_FILENO)
- close (STDOUT_FILENO);
- if (fd != STDERR_FILENO)
- close (STDERR_FILENO);
- newfd = open (fdname, O_RDWR);
- close (newfd);
- }
- dup2 (fd, STDIN_FILENO);
- dup2 (fd, STDOUT_FILENO);
- dup2 (fd, STDERR_FILENO);
- if (fd > 2)
- close (fd);
- return 0;
-}
-
-extern "C" int
-openpty (int *amaster, int *aslave, char *name, struct termios *termp,
- struct winsize *winp)
-{
- int master, slave;
- char pts[TTY_NAME_MAX];
-
- if ((master = open ("/dev/ptmx", O_RDWR | O_NOCTTY)) >= 0)
- {
- grantpt (master);
- unlockpt (master);
- strcpy (pts, ptsname (master));
- revoke (pts);
- if ((slave = open (pts, O_RDWR | O_NOCTTY)) >= 0)
- {
- if (amaster)
- *amaster = master;
- if (aslave)
- *aslave = slave;
- if (name)
- strcpy (name, pts);
- if (termp)
- tcsetattr (slave, TCSAFLUSH, termp);
- if (winp)
- ioctl (slave, TIOCSWINSZ, (char *) winp);
- return 0;
- }
- close (master);
- }
- set_errno (ENOENT);
- return -1;
-}
-
-extern "C" int
-forkpty (int *amaster, char *name, struct termios *termp, struct winsize *winp)
-{
- int master, slave, pid;
-
- if (openpty (&master, &slave, name, termp, winp) == -1)
- return -1;
- switch (pid = fork ())
- {
- case -1:
- return -1;
- case 0:
- close (master);
- login_tty (slave);
- return 0;
- }
- if (amaster)
- *amaster = master;
- close (slave);
- return pid;
-}
-
-extern "C" char *__progname;
-
-static void
-_vwarnx (const char *fmt, va_list ap)
-{
- fprintf (stderr, "%s: ", __progname);
- vfprintf (stderr, fmt, ap);
-}
-
-extern "C" void
-vwarn (const char *fmt, va_list ap)
-{
- _vwarnx (fmt, ap);
- fprintf (stderr, ": %s", strerror (get_errno ()));
- fputc ('\n', stderr);
-}
-
-extern "C" void
-vwarnx (const char *fmt, va_list ap)
-{
- _vwarnx (fmt, ap);
- fputc ('\n', stderr);
-}
-
-extern "C" void
-warn (const char *fmt, ...)
-{
- va_list ap;
- va_start (ap, fmt);
- vwarn (fmt, ap);
-}
-
-extern "C" void
-warnx (const char *fmt, ...)
-{
- va_list ap;
- va_start (ap, fmt);
- vwarnx (fmt, ap);
-}
-
-extern "C" void
-verr (int eval, const char *fmt, va_list ap)
-{
- vwarn (fmt, ap);
- exit (eval);
-}
-
-extern "C" void
-verrx (int eval, const char *fmt, va_list ap)
-{
- vwarnx (fmt, ap);
- exit (eval);
-}
-
-extern "C" void
-err (int eval, const char *fmt, ...)
-{
- va_list ap;
- va_start (ap, fmt);
- vwarn (fmt, ap);
- exit (eval);
-}
-
-extern "C" void
-errx (int eval, const char *fmt, ...)
-{
- va_list ap;
- va_start (ap, fmt);
- vwarnx (fmt, ap);
- exit (eval);
-}
-
-extern "C" const char *
-getprogname (void)
-{
- return __progname;
-}
-
-extern "C" void
-setprogname (const char *newprogname)
-{
- myfault efault;
- if (!efault.faulted (EFAULT))
- {
- /* Per BSD man page, setprogname keeps a pointer to the last
- path component of the argument. It does *not* copy the
- argument before. */
- __progname = strrchr (newprogname, '/');
- if (__progname)
- ++__progname;
- else
- __progname = (char *)newprogname;
- }
-}
-
-extern "C" void
-logwtmp (const char *line, const char *user, const char *host)
-{
- struct utmp ut;
- memset (&ut, 0, sizeof ut);
- ut.ut_type = USER_PROCESS;
- ut.ut_pid = getpid ();
- if (line)
- strncpy (ut.ut_line, line, sizeof ut.ut_line);
- time (&ut.ut_time);
- if (user)
- strncpy (ut.ut_user, user, sizeof ut.ut_user);
- if (host)
- strncpy (ut.ut_host, host, sizeof ut.ut_host);
- updwtmp (_PATH_WTMP, &ut);
-}
-
-extern "C" void
-login (const struct utmp *ut)
-{
- pututline (ut);
- endutent ();
- updwtmp (_PATH_WTMP, ut);
-}
-
-extern "C" int
-logout (const char *line)
-{
- struct utmp ut_buf, *ut;
-
- memset (&ut_buf, 0, sizeof ut_buf);
- strncpy (ut_buf.ut_line, line, sizeof ut_buf.ut_line);
- setutent ();
- ut = getutline (&ut_buf);
-
- if (ut)
- {
- ut->ut_type = DEAD_PROCESS;
- memset (ut->ut_user, 0, sizeof ut->ut_user);
- memset (ut->ut_host, 0, sizeof ut->ut_host);
- time (&ut->ut_time);
- debug_printf ("set logout time for %s", line);
- pututline (ut);
- endutent ();
- return 1;
- }
- return 0;
-}
diff --git a/winsup/cygwin/libc/fnmatch.c b/winsup/cygwin/libc/fnmatch.c
deleted file mode 100644
index b48d9e0..0000000
--- a/winsup/cygwin/libc/fnmatch.c
+++ /dev/null
@@ -1,220 +0,0 @@
-/* $OpenBSD: fnmatch.c,v 1.7 2000/03/23 19:13:51 millert Exp $ */
-
-/*
- * Copyright (c) 1989, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Guido van Rossum.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)fnmatch.c 8.2 (Berkeley) 4/16/94";
-#else
-static char rcsid[] = "$OpenBSD: fnmatch.c,v 1.7 2000/03/23 19:13:51 millert Exp $";
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Function fnmatch() as specified in POSIX 1003.2-1992, section B.6.
- * Compares a filename or pathname to a pattern.
- */
-
-/* Just this single line added for Cygwin. */
-#include "winsup.h"
-
-#include <ctype.h>
-#include <stdio.h>
-#include <string.h>
-#include <fnmatch.h>
-
-#define EOS '\0'
-
-#define RANGE_MATCH 1
-#define RANGE_NOMATCH 0
-#define RANGE_ERROR (-1)
-
-static int rangematch __P((const char *, char, int, char **));
-
-int
-fnmatch(const char *pattern, const char *string, int flags)
-{
- const char *stringstart;
- char *newp;
- char c, test;
-
- for (stringstart = string;;)
- switch (c = *pattern++) {
- case EOS:
- if ((flags & FNM_LEADING_DIR) && *string == '/')
- return (0);
- return (*string == EOS ? 0 : FNM_NOMATCH);
- case '?':
- if (*string == EOS)
- return (FNM_NOMATCH);
- if (*string == '/' && (flags & FNM_PATHNAME))
- return (FNM_NOMATCH);
- if (*string == '.' && (flags & FNM_PERIOD) &&
- (string == stringstart ||
- ((flags & FNM_PATHNAME) && *(string - 1) == '/')))
- return (FNM_NOMATCH);
- ++string;
- break;
- case '*':
- c = *pattern;
- /* Collapse multiple stars. */
- while (c == '*')
- c = *++pattern;
-
- if (*string == '.' && (flags & FNM_PERIOD) &&
- (string == stringstart ||
- ((flags & FNM_PATHNAME) && *(string - 1) == '/')))
- return (FNM_NOMATCH);
-
- /* Optimize for pattern with * at end or before /. */
- if (c == EOS) {
- if (flags & FNM_PATHNAME)
- return ((flags & FNM_LEADING_DIR) ||
- strchr(string, '/') == NULL ?
- 0 : FNM_NOMATCH);
- else
- return (0);
- } else if (c == '/' && (flags & FNM_PATHNAME)) {
- if ((string = strchr(string, '/')) == NULL)
- return (FNM_NOMATCH);
- break;
- }
-
- /* General case, use recursion. */
- while ((test = *string) != EOS) {
- if (!fnmatch(pattern, string, flags & ~FNM_PERIOD))
- return (0);
- if (test == '/' && (flags & FNM_PATHNAME))
- break;
- ++string;
- }
- return (FNM_NOMATCH);
- case '[':
- if (*string == EOS)
- return (FNM_NOMATCH);
- if (*string == '/' && (flags & FNM_PATHNAME))
- return (FNM_NOMATCH);
- if (*string == '.' && (flags & FNM_PERIOD) &&
- (string == stringstart ||
- ((flags & FNM_PATHNAME) && *(string - 1) == '/')))
- return (FNM_NOMATCH);
-
- switch (rangematch(pattern, *string, flags, &newp)) {
- case RANGE_ERROR:
- /* not a good range, treat as normal text */
- goto normal;
- case RANGE_MATCH:
- pattern = newp;
- break;
- case RANGE_NOMATCH:
- return (FNM_NOMATCH);
- }
- ++string;
- break;
- case '\\':
- if (!(flags & FNM_NOESCAPE)) {
- if ((c = *pattern++) == EOS) {
- c = '\\';
- --pattern;
- }
- }
- /* FALLTHROUGH */
- default:
- normal:
- if (c != *string && !((flags & FNM_CASEFOLD) &&
- (tolower((unsigned char)c) ==
- tolower((unsigned char)*string))))
- return (FNM_NOMATCH);
- ++string;
- break;
- }
- /* NOTREACHED */
-}
-
-static int
-rangematch(const char *pattern, char test, int flags, char **newp)
-{
- int negate, ok;
- char c, c2;
-
- /*
- * A bracket expression starting with an unquoted circumflex
- * character produces unspecified results (IEEE 1003.2-1992,
- * 3.13.2). This implementation treats it like '!', for
- * consistency with the regular expression syntax.
- * J.T. Conklin (conklin@ngai.kaleida.com)
- */
- if ((negate = (*pattern == '!' || *pattern == '^')))
- ++pattern;
-
- if (flags & FNM_CASEFOLD)
- test = tolower((unsigned char)test);
-
- /*
- * A right bracket shall lose its special meaning and represent
- * itself in a bracket expression if it occurs first in the list.
- * -- POSIX.2 2.8.3.2
- */
- ok = 0;
- c = *pattern++;
- do {
- if (c == '\\' && !(flags & FNM_NOESCAPE))
- c = *pattern++;
- if (c == EOS)
- return (RANGE_ERROR);
- if (c == '/' && (flags & FNM_PATHNAME))
- return (RANGE_NOMATCH);
- if ((flags & FNM_CASEFOLD))
- c = tolower((unsigned char)c);
- if (*pattern == '-'
- && (c2 = *(pattern+1)) != EOS && c2 != ']') {
- pattern += 2;
- if (c2 == '\\' && !(flags & FNM_NOESCAPE))
- c2 = *pattern++;
- if (c2 == EOS)
- return (RANGE_ERROR);
- if (flags & FNM_CASEFOLD)
- c2 = tolower((unsigned char)c2);
- if (c <= test && test <= c2)
- ok = 1;
- } else if (c == test)
- ok = 1;
- } while ((c = *pattern++) != ']');
-
- *newp = (char *)pattern;
- return (ok == negate ? RANGE_NOMATCH : RANGE_MATCH);
-}
diff --git a/winsup/cygwin/libc/fts.c b/winsup/cygwin/libc/fts.c
deleted file mode 100644
index d0e7789..0000000
--- a/winsup/cygwin/libc/fts.c
+++ /dev/null
@@ -1,1253 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $OpenBSD: fts.c,v 1.22 1999/10/03 19:22:22 millert Exp $
- */
-
-#if 0
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
-#endif /* LIBC_SCCS and not lint */
-#endif
-#ifdef __CYGWIN__
-#include "winsup.h"
-#include <sys/statfs.h>
-#define __FBSDID(x)
-#define _open open
-#define _close close
-#define reallocf realloc
-#endif
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: /repoman/r/ncvs/src/lib/libc/gen/fts.c,v 1.27 2004/06/08 06:23:23 das Exp $");
-
-#ifndef __CYGWIN__
-#include "namespace.h"
-#endif
-#include <sys/param.h>
-#include <sys/mount.h>
-#include <sys/stat.h>
-
-#include <dirent.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <fts.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#ifndef __CYGWIN__
-#include "un-namespace.h"
-#endif
-
-static FTSENT *fts_alloc(FTS *, const char *, int);
-static FTSENT *fts_build(FTS *, int);
-static void fts_lfree(FTSENT *);
-static void fts_load(FTS *, FTSENT *);
-static size_t fts_maxarglen(char * const *);
-static void fts_padjust(FTS *, FTSENT *);
-static int fts_palloc(FTS *, size_t);
-static FTSENT *fts_sort(FTS *, FTSENT *, int);
-static u_short fts_stat(FTS *, FTSENT *, int);
-static int fts_safe_changedir(FTS *, FTSENT *, int, const char *);
-static int fts_ufslinks(FTS *, const FTSENT *);
-
-#define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2])))
-
-#define CLR(opt) (sp->fts_options &= ~(opt))
-#define ISSET(opt) (sp->fts_options & (opt))
-#define SET(opt) (sp->fts_options |= (opt))
-
-#define FCHDIR(sp, fd) (!ISSET(FTS_NOCHDIR) && fchdir(fd))
-
-/* fts_build flags */
-#define BCHILD 1 /* fts_children */
-#define BNAMES 2 /* fts_children, names only */
-#define BREAD 3 /* fts_read */
-
-/*
- * Internal representation of an FTS, including extra implementation
- * details. The FTS returned from fts_open points to this structure's
- * ftsp_fts member (and can be cast to an _fts_private as required)
- */
-struct _fts_private {
- FTS ftsp_fts;
- struct statfs ftsp_statfs;
- __dev32_t ftsp_dev;
- int ftsp_linksreliable;
-};
-
-/*
- * The "FTS_NOSTAT" option can avoid a lot of calls to stat(2) if it
- * knows that a directory could not possibly have subdirectories. This
- * is decided by looking at the link count: a subdirectory would
- * increment its parent's link count by virtue of its own ".." entry.
- * This assumption only holds for UFS-like filesystems that implement
- * links and directories this way, so we must punt for others.
- */
-
-#ifndef __CYGWIN__
-static const char *ufslike_filesystems[] = {
- "ufs",
- "nfs",
- "nfs4",
- "ext2fs",
- 0
-};
-#endif
-
-FTS *
-fts_open(argv, options, compar)
- char * const *argv;
- int options;
- int (*compar)(const FTSENT * const *, const FTSENT * const *);
-{
- struct _fts_private *priv;
- FTS *sp;
- FTSENT *p, *root;
- int nitems;
- FTSENT *parent, *tmp;
- int len;
-
- /* Options check. */
- if (options & ~FTS_OPTIONMASK) {
- errno = EINVAL;
- return (NULL);
- }
-
- /* Allocate/initialize the stream. */
- if ((priv = malloc(sizeof(*priv))) == NULL)
- return (NULL);
- memset(priv, 0, sizeof(*priv));
- sp = &priv->ftsp_fts;
- sp->fts_compar = compar;
- sp->fts_options = options;
-
- /* Shush, GCC. */
- tmp = NULL;
-
- /* Logical walks turn on NOCHDIR; symbolic links are too hard. */
- if (ISSET(FTS_LOGICAL))
- SET(FTS_NOCHDIR);
-
- /*
- * Start out with 1K of path space, and enough, in any case,
- * to hold the user's paths.
- */
- if (fts_palloc(sp, MAX(fts_maxarglen(argv), MAXPATHLEN)))
- goto mem1;
-
- /* Allocate/initialize root's parent. */
- if ((parent = fts_alloc(sp, "", 0)) == NULL)
- goto mem2;
- parent->fts_level = FTS_ROOTPARENTLEVEL;
-
- /* Allocate/initialize root(s). */
- for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) {
- /* Don't allow zero-length paths. */
- if ((len = strlen(*argv)) == 0) {
- errno = ENOENT;
- goto mem3;
- }
-
- p = fts_alloc(sp, *argv, len);
- p->fts_level = FTS_ROOTLEVEL;
- p->fts_parent = parent;
- p->fts_accpath = p->fts_name;
- p->fts_info = fts_stat(sp, p, ISSET(FTS_COMFOLLOW));
-
- /* Command-line "." and ".." are real directories. */
- if (p->fts_info == FTS_DOT)
- p->fts_info = FTS_D;
-
- /*
- * If comparison routine supplied, traverse in sorted
- * order; otherwise traverse in the order specified.
- */
- if (compar) {
- p->fts_link = root;
- root = p;
- } else {
- p->fts_link = NULL;
- if (root == NULL)
- tmp = root = p;
- else {
- tmp->fts_link = p;
- tmp = p;
- }
- }
- }
- if (compar && nitems > 1)
- root = fts_sort(sp, root, nitems);
-
- /*
- * Allocate a dummy pointer and make fts_read think that we've just
- * finished the node before the root(s); set p->fts_info to FTS_INIT
- * so that everything about the "current" node is ignored.
- */
- if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL)
- goto mem3;
- sp->fts_cur->fts_link = root;
- sp->fts_cur->fts_info = FTS_INIT;
-
- /*
- * If using chdir(2), grab a file descriptor pointing to dot to ensure
- * that we can get back here; this could be avoided for some paths,
- * but almost certainly not worth the effort. Slashes, symbolic links,
- * and ".." are all fairly nasty problems. Note, if we can't get the
- * descriptor we run anyway, just more slowly.
- */
- if (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = _open(".", O_RDONLY, 0)) < 0)
- SET(FTS_NOCHDIR);
-
- return (sp);
-
-mem3: fts_lfree(root);
- free(parent);
-mem2: free(sp->fts_path);
-mem1: free(sp);
- return (NULL);
-}
-
-static void
-fts_load(sp, p)
- FTS *sp;
- FTSENT *p;
-{
- int len;
- char *cp;
-
- /*
- * Load the stream structure for the next traversal. Since we don't
- * actually enter the directory until after the preorder visit, set
- * the fts_accpath field specially so the chdir gets done to the right
- * place and the user can access the first node. From fts_open it's
- * known that the path will fit.
- */
- len = p->fts_pathlen = p->fts_namelen;
- memmove(sp->fts_path, p->fts_name, len + 1);
- if ((cp = strrchr(p->fts_name, '/')) && (cp != p->fts_name || cp[1])) {
- len = strlen(++cp);
- memmove(p->fts_name, cp, len + 1);
- p->fts_namelen = len;
- }
- p->fts_accpath = p->fts_path = sp->fts_path;
- sp->fts_dev = p->fts_dev;
-}
-
-int
-fts_close(sp)
- FTS *sp;
-{
- FTSENT *freep, *p;
- int saved_errno;
-
- /*
- * This still works if we haven't read anything -- the dummy structure
- * points to the root list, so we step through to the end of the root
- * list which has a valid parent pointer.
- */
- if (sp->fts_cur) {
- for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
- freep = p;
- p = p->fts_link != NULL ? p->fts_link : p->fts_parent;
- free(freep);
- }
- free(p);
- }
-
- /* Free up child linked list, sort array, path buffer. */
- if (sp->fts_child)
- fts_lfree(sp->fts_child);
- if (sp->fts_array)
- free(sp->fts_array);
- free(sp->fts_path);
-
- /* Return to original directory, save errno if necessary. */
- if (!ISSET(FTS_NOCHDIR)) {
- saved_errno = fchdir(sp->fts_rfd) ? errno : 0;
- (void)_close(sp->fts_rfd);
-
- /* Set errno and return. */
- if (saved_errno != 0) {
- /* Free up the stream pointer. */
- free(sp);
- errno = saved_errno;
- return (-1);
- }
- }
-
- /* Free up the stream pointer. */
- free(sp);
- return (0);
-}
-
-/*
- * Special case of "/" at the end of the path so that slashes aren't
- * appended which would cause paths to be written as "....//foo".
- */
-#define NAPPEND(p) \
- (p->fts_path[p->fts_pathlen - 1] == '/' \
- ? p->fts_pathlen - 1 : p->fts_pathlen)
-
-FTSENT *
-fts_read(sp)
- FTS *sp;
-{
- FTSENT *p, *tmp;
- int instr;
- char *t;
- int saved_errno;
-
- /* If finished or unrecoverable error, return NULL. */
- if (sp->fts_cur == NULL || ISSET(FTS_STOP))
- return (NULL);
-
- /* Set current node pointer. */
- p = sp->fts_cur;
-
- /* Save and zero out user instructions. */
- instr = p->fts_instr;
- p->fts_instr = FTS_NOINSTR;
-
- /* Any type of file may be re-visited; re-stat and re-turn. */
- if (instr == FTS_AGAIN) {
- p->fts_info = fts_stat(sp, p, 0);
- return (p);
- }
-
- /*
- * Following a symlink -- SLNONE test allows application to see
- * SLNONE and recover. If indirecting through a symlink, have
- * keep a pointer to current location. If unable to get that
- * pointer, follow fails.
- */
- if (instr == FTS_FOLLOW &&
- (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) {
- p->fts_info = fts_stat(sp, p, 1);
- if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
- if ((p->fts_symfd = _open(".", O_RDONLY, 0)) < 0) {
- p->fts_errno = errno;
- p->fts_info = FTS_ERR;
- } else
- p->fts_flags |= FTS_SYMFOLLOW;
- }
- return (p);
- }
-
- /* Directory in pre-order. */
- if (p->fts_info == FTS_D) {
- /* If skipped or crossed mount point, do post-order visit. */
- if (instr == FTS_SKIP ||
- (ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev)) {
- if (p->fts_flags & FTS_SYMFOLLOW)
- (void)_close(p->fts_symfd);
- if (sp->fts_child) {
- fts_lfree(sp->fts_child);
- sp->fts_child = NULL;
- }
- p->fts_info = FTS_DP;
- return (p);
- }
-
- /* Rebuild if only read the names and now traversing. */
- if (sp->fts_child != NULL && ISSET(FTS_NAMEONLY)) {
- CLR(FTS_NAMEONLY);
- fts_lfree(sp->fts_child);
- sp->fts_child = NULL;
- }
-
- /*
- * Cd to the subdirectory.
- *
- * If have already read and now fail to chdir, whack the list
- * to make the names come out right, and set the parent errno
- * so the application will eventually get an error condition.
- * Set the FTS_DONTCHDIR flag so that when we logically change
- * directories back to the parent we don't do a chdir.
- *
- * If haven't read do so. If the read fails, fts_build sets
- * FTS_STOP or the fts_info field of the node.
- */
- if (sp->fts_child != NULL) {
- if (fts_safe_changedir(sp, p, -1, p->fts_accpath)) {
- p->fts_errno = errno;
- p->fts_flags |= FTS_DONTCHDIR;
- for (p = sp->fts_child; p != NULL;
- p = p->fts_link)
- p->fts_accpath =
- p->fts_parent->fts_accpath;
- }
- } else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) {
- if (ISSET(FTS_STOP))
- return (NULL);
- return (p);
- }
- p = sp->fts_child;
- sp->fts_child = NULL;
- goto name;
- }
-
- /* Move to the next node on this level. */
-next: tmp = p;
- if ((p = p->fts_link) != NULL) {
- free(tmp);
-
- /*
- * If reached the top, return to the original directory (or
- * the root of the tree), and load the paths for the next root.
- */
- if (p->fts_level == FTS_ROOTLEVEL) {
- if (FCHDIR(sp, sp->fts_rfd)) {
- SET(FTS_STOP);
- return (NULL);
- }
- fts_load(sp, p);
- return (sp->fts_cur = p);
- }
-
- /*
- * User may have called fts_set on the node. If skipped,
- * ignore. If followed, get a file descriptor so we can
- * get back if necessary.
- */
- if (p->fts_instr == FTS_SKIP)
- goto next;
- if (p->fts_instr == FTS_FOLLOW) {
- p->fts_info = fts_stat(sp, p, 1);
- if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
- if ((p->fts_symfd =
- _open(".", O_RDONLY, 0)) < 0) {
- p->fts_errno = errno;
- p->fts_info = FTS_ERR;
- } else
- p->fts_flags |= FTS_SYMFOLLOW;
- }
- p->fts_instr = FTS_NOINSTR;
- }
-
-name: t = sp->fts_path + NAPPEND(p->fts_parent);
- *t++ = '/';
- memmove(t, p->fts_name, p->fts_namelen + 1);
- return (sp->fts_cur = p);
- }
-
- /* Move up to the parent node. */
- p = tmp->fts_parent;
- free(tmp);
-
- if (p->fts_level == FTS_ROOTPARENTLEVEL) {
- /*
- * Done; free everything up and set errno to 0 so the user
- * can distinguish between error and EOF.
- */
- free(p);
- errno = 0;
- return (sp->fts_cur = NULL);
- }
-
- /* NUL terminate the pathname. */
- sp->fts_path[p->fts_pathlen] = '\0';
-
- /*
- * Return to the parent directory. If at a root node or came through
- * a symlink, go back through the file descriptor. Otherwise, cd up
- * one directory.
- */
- if (p->fts_level == FTS_ROOTLEVEL) {
- if (FCHDIR(sp, sp->fts_rfd)) {
- SET(FTS_STOP);
- return (NULL);
- }
- } else if (p->fts_flags & FTS_SYMFOLLOW) {
- if (FCHDIR(sp, p->fts_symfd)) {
- saved_errno = errno;
- (void)_close(p->fts_symfd);
- errno = saved_errno;
- SET(FTS_STOP);
- return (NULL);
- }
- (void)_close(p->fts_symfd);
- } else if (!(p->fts_flags & FTS_DONTCHDIR) &&
- fts_safe_changedir(sp, p->fts_parent, -1, "..")) {
- SET(FTS_STOP);
- return (NULL);
- }
- p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP;
- return (sp->fts_cur = p);
-}
-
-/*
- * Fts_set takes the stream as an argument although it's not used in this
- * implementation; it would be necessary if anyone wanted to add global
- * semantics to fts using fts_set. An error return is allowed for similar
- * reasons.
- */
-/* ARGSUSED */
-int
-fts_set(sp, p, instr)
- FTS *sp;
- FTSENT *p;
- int instr;
-{
- if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
- instr != FTS_NOINSTR && instr != FTS_SKIP) {
- errno = EINVAL;
- return (1);
- }
- p->fts_instr = instr;
- return (0);
-}
-
-FTSENT *
-fts_children(sp, instr)
- FTS *sp;
- int instr;
-{
- FTSENT *p;
- int fd;
-
- if (instr != 0 && instr != FTS_NAMEONLY) {
- errno = EINVAL;
- return (NULL);
- }
-
- /* Set current node pointer. */
- p = sp->fts_cur;
-
- /*
- * Errno set to 0 so user can distinguish empty directory from
- * an error.
- */
- errno = 0;
-
- /* Fatal errors stop here. */
- if (ISSET(FTS_STOP))
- return (NULL);
-
- /* Return logical hierarchy of user's arguments. */
- if (p->fts_info == FTS_INIT)
- return (p->fts_link);
-
- /*
- * If not a directory being visited in pre-order, stop here. Could
- * allow FTS_DNR, assuming the user has fixed the problem, but the
- * same effect is available with FTS_AGAIN.
- */
- if (p->fts_info != FTS_D /* && p->fts_info != FTS_DNR */)
- return (NULL);
-
- /* Free up any previous child list. */
- if (sp->fts_child != NULL)
- fts_lfree(sp->fts_child);
-
- if (instr == FTS_NAMEONLY) {
- SET(FTS_NAMEONLY);
- instr = BNAMES;
- } else
- instr = BCHILD;
-
- /*
- * If using chdir on a relative path and called BEFORE fts_read does
- * its chdir to the root of a traversal, we can lose -- we need to
- * chdir into the subdirectory, and we don't know where the current
- * directory is, so we can't get back so that the upcoming chdir by
- * fts_read will work.
- */
- if (p->fts_level != FTS_ROOTLEVEL || p->fts_accpath[0] == '/' ||
- ISSET(FTS_NOCHDIR))
- return (sp->fts_child = fts_build(sp, instr));
-
- if ((fd = _open(".", O_RDONLY, 0)) < 0)
- return (NULL);
- sp->fts_child = fts_build(sp, instr);
- if (fchdir(fd))
- return (NULL);
- (void)_close(fd);
- return (sp->fts_child);
-}
-
-#ifndef fts_get_clientptr
-#error "fts_get_clientptr not defined"
-#endif
-
-void *
-(fts_get_clientptr)(FTS *sp)
-{
-
- return (fts_get_clientptr(sp));
-}
-
-#ifndef fts_get_stream
-#error "fts_get_stream not defined"
-#endif
-
-FTS *
-(fts_get_stream)(FTSENT *p)
-{
- return (fts_get_stream(p));
-}
-
-void
-fts_set_clientptr(FTS *sp, void *clientptr)
-{
-
- sp->fts_clientptr = clientptr;
-}
-
-/*
- * This is the tricky part -- do not casually change *anything* in here. The
- * idea is to build the linked list of entries that are used by fts_children
- * and fts_read. There are lots of special cases.
- *
- * The real slowdown in walking the tree is the stat calls. If FTS_NOSTAT is
- * set and it's a physical walk (so that symbolic links can't be directories),
- * we can do things quickly. First, if it's a 4.4BSD file system, the type
- * of the file is in the directory entry. Otherwise, we assume that the number
- * of subdirectories in a node is equal to the number of links to the parent.
- * The former skips all stat calls. The latter skips stat calls in any leaf
- * directories and for any files after the subdirectories in the directory have
- * been found, cutting the stat calls by about 2/3.
- */
-static FTSENT *
-fts_build(sp, type)
- FTS *sp;
- int type;
-{
- struct dirent *dp;
- FTSENT *p, *head;
- int nitems;
- FTSENT *cur, *tail;
- DIR *dirp;
- void *oldaddr;
- size_t dnamlen;
- int cderrno, descend, len, level, maxlen, nlinks, /*oflag,*/ saved_errno,
- nostat, doadjust;
- char *cp;
-
- /* Set current node pointer. */
- cur = sp->fts_cur;
-
- /*
- * Open the directory for reading. If this fails, we're done.
- * If being called from fts_read, set the fts_info field.
- */
-#ifdef FTS_WHITEOUT
- if (ISSET(FTS_WHITEOUT))
- oflag = DTF_NODUP | DTF_REWIND;
- else
- oflag = DTF_HIDEW | DTF_NODUP | DTF_REWIND;
-#else
-#define __opendir2(path, flag) opendir(path)
-#endif
- if ((dirp = __opendir2(cur->fts_accpath, oflag)) == NULL) {
- if (type == BREAD) {
- cur->fts_info = FTS_DNR;
- cur->fts_errno = errno;
- }
- return (NULL);
- }
-
- /*
- * Nlinks is the number of possible entries of type directory in the
- * directory if we're cheating on stat calls, 0 if we're not doing
- * any stat calls at all, -1 if we're doing stats on everything.
- */
- if (type == BNAMES) {
- nlinks = 0;
- /* Be quiet about nostat, GCC. */
- nostat = 0;
- } else if (ISSET(FTS_NOSTAT) && ISSET(FTS_PHYSICAL)) {
- if (fts_ufslinks(sp, cur))
- nlinks = cur->fts_nlink - (ISSET(FTS_SEEDOT) ? 0 : 2);
- else
- nlinks = -1;
- nostat = 1;
- } else {
- nlinks = -1;
- nostat = 0;
- }
-
-#ifdef notdef
- (void)printf("nlinks == %d (cur: %d)\n", nlinks, cur->fts_nlink);
- (void)printf("NOSTAT %d PHYSICAL %d SEEDOT %d\n",
- ISSET(FTS_NOSTAT), ISSET(FTS_PHYSICAL), ISSET(FTS_SEEDOT));
-#endif
- /*
- * If we're going to need to stat anything or we want to descend
- * and stay in the directory, chdir. If this fails we keep going,
- * but set a flag so we don't chdir after the post-order visit.
- * We won't be able to stat anything, but we can still return the
- * names themselves. Note, that since fts_read won't be able to
- * chdir into the directory, it will have to return different path
- * names than before, i.e. "a/b" instead of "b". Since the node
- * has already been visited in pre-order, have to wait until the
- * post-order visit to return the error. There is a special case
- * here, if there was nothing to stat then it's not an error to
- * not be able to stat. This is all fairly nasty. If a program
- * needed sorted entries or stat information, they had better be
- * checking FTS_NS on the returned nodes.
- */
- cderrno = 0;
- if (nlinks || type == BREAD) {
- if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) {
- if (nlinks && type == BREAD)
- cur->fts_errno = errno;
- cur->fts_flags |= FTS_DONTCHDIR;
- descend = 0;
- cderrno = errno;
- } else
- descend = 1;
- } else
- descend = 0;
-
- /*
- * Figure out the max file name length that can be stored in the
- * current path -- the inner loop allocates more path as necessary.
- * We really wouldn't have to do the maxlen calculations here, we
- * could do them in fts_read before returning the path, but it's a
- * lot easier here since the length is part of the dirent structure.
- *
- * If not changing directories set a pointer so that can just append
- * each new name into the path.
- */
- len = NAPPEND(cur);
- if (ISSET(FTS_NOCHDIR)) {
- cp = sp->fts_path + len;
- *cp++ = '/';
- } else {
- /* GCC, you're too verbose. */
- cp = NULL;
- }
- len++;
- maxlen = sp->fts_pathlen - len;
-
- level = cur->fts_level + 1;
-
- /* Read the directory, attaching each entry to the `link' pointer. */
- doadjust = 0;
- for (head = tail = NULL, nitems = 0; dirp && (dp = readdir(dirp));) {
-#ifdef __CYGWIN__
- dnamlen = strlen (dp->d_name);
-#else
- dnamlen = dp->d_namlen;
-#endif
- if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
- continue;
-
- if ((p = fts_alloc(sp, dp->d_name, (int)dnamlen)) == NULL)
- goto mem1;
- if (dnamlen >= maxlen) { /* include space for NUL */
- oldaddr = sp->fts_path;
- if (fts_palloc(sp, dnamlen + len + 1)) {
- /*
- * No more memory for path or structures. Save
- * errno, free up the current structure and the
- * structures already allocated.
- */
-mem1: saved_errno = errno;
- if (p)
- free(p);
- fts_lfree(head);
- (void)closedir(dirp);
- cur->fts_info = FTS_ERR;
- SET(FTS_STOP);
- errno = saved_errno;
- return (NULL);
- }
- /* Did realloc() change the pointer? */
- if (oldaddr != sp->fts_path) {
- doadjust = 1;
- if (ISSET(FTS_NOCHDIR))
- cp = sp->fts_path + len;
- }
- maxlen = sp->fts_pathlen - len;
- }
-
- if (len + dnamlen >= USHRT_MAX) {
- /*
- * In an FTSENT, fts_pathlen is a u_short so it is
- * possible to wraparound here. If we do, free up
- * the current structure and the structures already
- * allocated, then error out with ENAMETOOLONG.
- */
- free(p);
- fts_lfree(head);
- (void)closedir(dirp);
- cur->fts_info = FTS_ERR;
- SET(FTS_STOP);
- errno = ENAMETOOLONG;
- return (NULL);
- }
- p->fts_level = level;
- p->fts_parent = sp->fts_cur;
- p->fts_pathlen = len + dnamlen;
-
-#ifdef FTS_WHITEOUT
- if (dp->d_type == DT_WHT)
- p->fts_flags |= FTS_ISW;
-#endif
-
- if (cderrno) {
- if (nlinks) {
- p->fts_info = FTS_NS;
- p->fts_errno = cderrno;
- } else
- p->fts_info = FTS_NSOK;
- p->fts_accpath = cur->fts_accpath;
- } else if (nlinks == 0
-#if defined(DT_DIR) && !defined(__CYGWIN__)
- || (nostat &&
- dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN)
-#endif
- ) {
- p->fts_accpath =
- ISSET(FTS_NOCHDIR) ? p->fts_path : p->fts_name;
- p->fts_info = FTS_NSOK;
- } else {
- /* Build a file name for fts_stat to stat. */
- if (ISSET(FTS_NOCHDIR)) {
- p->fts_accpath = p->fts_path;
- memmove(cp, p->fts_name, p->fts_namelen + 1);
- } else
- p->fts_accpath = p->fts_name;
- /* Stat it. */
- p->fts_info = fts_stat(sp, p, 0);
-
- /* Decrement link count if applicable. */
- if (nlinks > 0 && (p->fts_info == FTS_D ||
- p->fts_info == FTS_DC || p->fts_info == FTS_DOT))
- --nlinks;
- }
-
- /* We walk in directory order so "ls -f" doesn't get upset. */
- p->fts_link = NULL;
- if (head == NULL)
- head = tail = p;
- else {
- tail->fts_link = p;
- tail = p;
- }
- ++nitems;
- }
- if (dirp)
- (void)closedir(dirp);
-
- /*
- * If realloc() changed the address of the path, adjust the
- * addresses for the rest of the tree and the dir list.
- */
- if (doadjust)
- fts_padjust(sp, head);
-
- /*
- * If not changing directories, reset the path back to original
- * state.
- */
- if (ISSET(FTS_NOCHDIR)) {
- if (len == sp->fts_pathlen || nitems == 0)
- --cp;
- *cp = '\0';
- }
-
- /*
- * If descended after called from fts_children or after called from
- * fts_read and nothing found, get back. At the root level we use
- * the saved fd; if one of fts_open()'s arguments is a relative path
- * to an empty directory, we wind up here with no other way back. If
- * can't get back, we're done.
- */
- if (descend && (type == BCHILD || !nitems) &&
- (cur->fts_level == FTS_ROOTLEVEL ?
- FCHDIR(sp, sp->fts_rfd) :
- fts_safe_changedir(sp, cur->fts_parent, -1, ".."))) {
- cur->fts_info = FTS_ERR;
- SET(FTS_STOP);
- return (NULL);
- }
-
- /* If didn't find anything, return NULL. */
- if (!nitems) {
- if (type == BREAD)
- cur->fts_info = FTS_DP;
- return (NULL);
- }
-
- /* Sort the entries. */
- if (sp->fts_compar && nitems > 1)
- head = fts_sort(sp, head, nitems);
- return (head);
-}
-
-static u_short
-fts_stat(sp, p, follow)
- FTS *sp;
- FTSENT *p;
- int follow;
-{
- FTSENT *t;
- __dev32_t dev;
- __ino64_t ino;
- struct __stat64 *sbp, sb;
- int saved_errno;
-
- /* If user needs stat info, stat buffer already allocated. */
- sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp;
-
-#ifdef FTS_WHITEOUT
- /* Check for whiteout. */
- if (p->fts_flags & FTS_ISW) {
- if (sbp != &sb) {
- memset(sbp, '\0', sizeof(*sbp));
- sbp->st_mode = S_IFWHT;
- }
- return (FTS_W);
- }
-#endif
-
- /*
- * If doing a logical walk, or application requested FTS_FOLLOW, do
- * a stat(2). If that fails, check for a non-existent symlink. If
- * fail, set the errno from the stat call.
- */
- if (ISSET(FTS_LOGICAL) || follow) {
- if (stat64(p->fts_accpath, sbp)) {
- saved_errno = errno;
- if (!lstat64(p->fts_accpath, sbp)) {
- errno = 0;
- return (FTS_SLNONE);
- }
- p->fts_errno = saved_errno;
- goto err;
- }
- } else if (lstat64(p->fts_accpath, sbp)) {
- p->fts_errno = errno;
-err: memset(sbp, 0, sizeof(struct __stat64));
- return (FTS_NS);
- }
-
- if (S_ISDIR(sbp->st_mode)) {
- /*
- * Set the device/inode. Used to find cycles and check for
- * crossing mount points. Also remember the link count, used
- * in fts_build to limit the number of stat calls. It is
- * understood that these fields are only referenced if fts_info
- * is set to FTS_D.
- */
- dev = p->fts_dev = sbp->st_dev;
- ino = p->fts_ino = sbp->st_ino;
- p->fts_nlink = sbp->st_nlink;
-
- if (ISDOT(p->fts_name))
- return (FTS_DOT);
-
- /*
- * Cycle detection is done by brute force when the directory
- * is first encountered. If the tree gets deep enough or the
- * number of symbolic links to directories is high enough,
- * something faster might be worthwhile.
- */
- for (t = p->fts_parent;
- t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent)
- if (ino == t->fts_ino && dev == t->fts_dev) {
- p->fts_cycle = t;
- return (FTS_DC);
- }
- return (FTS_D);
- }
- if (S_ISLNK(sbp->st_mode))
- return (FTS_SL);
- if (S_ISREG(sbp->st_mode))
- return (FTS_F);
- return (FTS_DEFAULT);
-}
-
-/*
- * The comparison function takes pointers to pointers to FTSENT structures.
- * Qsort wants a comparison function that takes pointers to void.
- * (Both with appropriate levels of const-poisoning, of course!)
- * Use a trampoline function to deal with the difference.
- */
-static int
-fts_compar(const void *a, const void *b)
-{
- FTS *parent;
-
- parent = (*(const FTSENT * const *)a)->fts_fts;
- return (*parent->fts_compar)(a, b);
-}
-
-static FTSENT *
-fts_sort(sp, head, nitems)
- FTS *sp;
- FTSENT *head;
- int nitems;
-{
- FTSENT **ap, *p;
-
- /*
- * Construct an array of pointers to the structures and call qsort(3).
- * Reassemble the array in the order returned by qsort. If unable to
- * sort for memory reasons, return the directory entries in their
- * current order. Allocate enough space for the current needs plus
- * 40 so don't realloc one entry at a time.
- */
- if (nitems > sp->fts_nitems) {
- sp->fts_nitems = nitems + 40;
- if ((sp->fts_array = reallocf(sp->fts_array,
- sp->fts_nitems * sizeof(FTSENT *))) == NULL) {
- sp->fts_nitems = 0;
- return (head);
- }
- }
- for (ap = sp->fts_array, p = head; p; p = p->fts_link)
- *ap++ = p;
- qsort(sp->fts_array, nitems, sizeof(FTSENT *), fts_compar);
- for (head = *(ap = sp->fts_array); --nitems; ++ap)
- ap[0]->fts_link = ap[1];
- ap[0]->fts_link = NULL;
- return (head);
-}
-
-static FTSENT *
-fts_alloc(sp, name, namelen)
- FTS *sp;
- const char *name;
- int namelen;
-{
- FTSENT *p;
- size_t len;
-
- struct ftsent_withstat {
- FTSENT ent;
- struct __stat64 statbuf;
- };
-
- /*
- * The file name is a variable length array and no stat structure is
- * necessary if the user has set the nostat bit. Allocate the FTSENT
- * structure, the file name and the stat structure in one chunk, but
- * be careful that the stat structure is reasonably aligned.
- */
- if (ISSET(FTS_NOSTAT))
- len = sizeof(FTSENT) + namelen + 1;
- else
- len = sizeof(struct ftsent_withstat) + namelen + 1;
-
- if ((p = malloc(len)) == NULL)
- return (NULL);
-
- if (ISSET(FTS_NOSTAT)) {
- p->fts_name = (char *)(p + 1);
- p->fts_statp = NULL;
- } else {
- p->fts_name = (char *)((struct ftsent_withstat *)p + 1);
- p->fts_statp = &((struct ftsent_withstat *)p)->statbuf;
- }
-
- /* Copy the name and guarantee NUL termination. */
- memcpy(p->fts_name, name, namelen);
- p->fts_name[namelen] = '\0';
- p->fts_namelen = namelen;
- p->fts_path = sp->fts_path;
- p->fts_errno = 0;
- p->fts_flags = 0;
- p->fts_instr = FTS_NOINSTR;
- p->fts_number = 0;
- p->fts_pointer = NULL;
- p->fts_fts = sp;
- return (p);
-}
-
-static void
-fts_lfree(head)
- FTSENT *head;
-{
- FTSENT *p;
-
- /* Free a linked list of structures. */
- while ((p = head)) {
- head = head->fts_link;
- free(p);
- }
-}
-
-/*
- * Allow essentially unlimited paths; find, rm, ls should all work on any tree.
- * Most systems will allow creation of paths much longer than MAXPATHLEN, even
- * though the kernel won't resolve them. Add the size (not just what's needed)
- * plus 256 bytes so don't realloc the path 2 bytes at a time.
- */
-static int
-fts_palloc(sp, more)
- FTS *sp;
- size_t more;
-{
-
- sp->fts_pathlen += more + 256;
- /*
- * Check for possible wraparound. In an FTS, fts_pathlen is
- * a signed int but in an FTSENT it is an unsigned short.
- * We limit fts_pathlen to USHRT_MAX to be safe in both cases.
- */
- if (sp->fts_pathlen < 0 || sp->fts_pathlen >= USHRT_MAX) {
- if (sp->fts_path)
- free(sp->fts_path);
- sp->fts_path = NULL;
- errno = ENAMETOOLONG;
- return (1);
- }
- sp->fts_path = reallocf(sp->fts_path, sp->fts_pathlen);
- return (sp->fts_path == NULL);
-}
-
-/*
- * When the path is realloc'd, have to fix all of the pointers in structures
- * already returned.
- */
-static void
-fts_padjust(sp, head)
- FTS *sp;
- FTSENT *head;
-{
- FTSENT *p;
- char *addr = sp->fts_path;
-
-#define ADJUST(p) do { \
- if ((p)->fts_accpath != (p)->fts_name) { \
- (p)->fts_accpath = \
- (char *)addr + ((p)->fts_accpath - (p)->fts_path); \
- } \
- (p)->fts_path = addr; \
-} while (0)
- /* Adjust the current set of children. */
- for (p = sp->fts_child; p; p = p->fts_link)
- ADJUST(p);
-
- /* Adjust the rest of the tree, including the current level. */
- for (p = head; p->fts_level >= FTS_ROOTLEVEL;) {
- ADJUST(p);
- p = p->fts_link ? p->fts_link : p->fts_parent;
- }
-}
-
-static size_t
-fts_maxarglen(argv)
- char * const *argv;
-{
- size_t len, max;
-
- for (max = 0; *argv; ++argv)
- if ((len = strlen(*argv)) > max)
- max = len;
- return (max + 1);
-}
-
-/*
- * Change to dir specified by fd or p->fts_accpath without getting
- * tricked by someone changing the world out from underneath us.
- * Assumes p->fts_dev and p->fts_ino are filled in.
- */
-static int
-fts_safe_changedir(sp, p, fd, path)
- FTS *sp;
- FTSENT *p;
- int fd;
- const char *path;
-{
- int ret, oerrno, newfd;
- struct __stat64 sb;
-
- newfd = fd;
- if (ISSET(FTS_NOCHDIR))
- return (0);
- if (fd < 0 && (newfd = _open(path, O_RDONLY, 0)) < 0)
- return (-1);
- if (fstat64(newfd, &sb)) {
- ret = -1;
- goto bail;
- }
- if (p->fts_dev != sb.st_dev || p->fts_ino != sb.st_ino) {
- errno = ENOENT; /* disinformation */
- ret = -1;
- goto bail;
- }
- ret = fchdir(newfd);
-bail:
- oerrno = errno;
- if (fd < 0)
- (void)_close(newfd);
- errno = oerrno;
- return (ret);
-}
-
-/*
- * Check if the filesystem for "ent" has UFS-style links.
- */
-static int
-fts_ufslinks(FTS *sp, const FTSENT *ent)
-{
- struct _fts_private *priv;
-#ifndef __CYGWIN__
- const char **cpp;
-#endif
-
- priv = (struct _fts_private *)sp;
- /*
- * If this node's device is different from the previous, grab
- * the filesystem information, and decide on the reliability
- * of the link information from this filesystem for stat(2)
- * avoidance.
- */
- if (priv->ftsp_dev != ent->fts_dev) {
- if (statfs(ent->fts_path, &priv->ftsp_statfs) != -1) {
- priv->ftsp_dev = ent->fts_dev;
-#ifdef __CYGWIN__
- /* The link count is reliable in Cygwin's directory
- stat structures, unless the link count is 1.
- This indicates a remote filesystem on which Cygwin
- refuses to count the directory links for speed. */
- priv->ftsp_linksreliable = (ent->fts_dev == 1) ? 0 : 1;
-#else
- priv->ftsp_linksreliable = 0;
- for (cpp = ufslike_filesystems; *cpp; cpp++) {
- if (strcmp(priv->ftsp_statfs.f_fstypename,
- *cpp) == 0) {
- priv->ftsp_linksreliable = 1;
- break;
- }
- }
-#endif
- } else {
- priv->ftsp_linksreliable = 0;
- }
- }
- return (priv->ftsp_linksreliable);
-}
diff --git a/winsup/cygwin/libc/ftw.c b/winsup/cygwin/libc/ftw.c
deleted file mode 100644
index 9863e16..0000000
--- a/winsup/cygwin/libc/ftw.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/* $OpenBSD: ftw.c,v 1.4 2004/07/07 16:05:23 millert Exp $ */
-
-/*
- * Copyright (c) 2003, 2004 Todd C. Miller <Todd.Miller@courtesan.com>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Sponsored in part by the Defense Advanced Research Projects
- * Agency (DARPA) and Air Force Research Laboratory, Air Force
- * Materiel Command, USAF, under agreement number F39502-99-1-0512.
- */
-
-#if 0
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$OpenBSD: ftw.c,v 1.4 2004/07/07 16:05:23 millert Exp $";
-#endif /* LIBC_SCCS and not lint */
-#endif
-
-#ifdef __CYGWIN__
-#include "winsup.h"
-#endif
-#include <sys/cdefs.h>
-#if 0
-__FBSDID("$FreeBSD: /repoman/r/ncvs/src/lib/libc/gen/ftw.c,v 1.4 2004/08/24 13:00:55 tjr Exp $");
-#endif
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <fts.h>
-#include <ftw.h>
-#include <limits.h>
-
-int
-ftw(const char *path, int (*fn)(const char *, const struct __stat64 *, int),
- int nfds)
-{
- char * const paths[2] = { (char *)path, NULL };
- FTSENT *cur;
- FTS *ftsp;
- int error = 0, fnflag, sverrno;
-
-#if 0
- /* GLibc allows nfds < 1 and treats it as nfds == 1. Since nfds is
- not used in this OpenBSD version anyway, just ignore it for
- Linux compatibility. */
- /* XXX - nfds is currently unused */
- if (nfds < 1 || nfds > OPEN_MAX) {
- errno = EINVAL;
- return (-1);
- }
-#endif
-
- ftsp = fts_open(paths, FTS_LOGICAL | FTS_COMFOLLOW | FTS_NOCHDIR, NULL);
- if (ftsp == NULL)
- return (-1);
- while ((cur = fts_read(ftsp)) != NULL) {
- switch (cur->fts_info) {
- case FTS_D:
- fnflag = FTW_D;
- break;
- case FTS_DNR:
- fnflag = FTW_DNR;
- break;
- case FTS_DP:
- /* we only visit in preorder */
- continue;
- case FTS_F:
- case FTS_DEFAULT:
- fnflag = FTW_F;
- break;
- case FTS_NS:
- case FTS_NSOK:
- case FTS_SLNONE:
- fnflag = FTW_NS;
- break;
- case FTS_SL:
- fnflag = FTW_SL;
- break;
- case FTS_DC:
- errno = ELOOP;
- /* FALLTHROUGH */
- default:
- error = -1;
- goto done;
- }
- error = fn(cur->fts_path, cur->fts_statp, fnflag);
- if (error != 0)
- break;
- }
-done:
- sverrno = errno;
- if (fts_close(ftsp) != 0 && error == 0)
- error = -1;
- else
- errno = sverrno;
- return (error);
-}
diff --git a/winsup/cygwin/libc/getopt.c b/winsup/cygwin/libc/getopt.c
deleted file mode 100644
index 0b5a180..0000000
--- a/winsup/cygwin/libc/getopt.c
+++ /dev/null
@@ -1,522 +0,0 @@
-/* $OpenBSD: getopt_long.c,v 1.23 2007/10/31 12:34:57 chl Exp $ */
-/* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */
-
-/*
- * Copyright (c) 2002 Todd C. Miller <Todd.Miller@courtesan.com>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Sponsored in part by the Defense Advanced Research Projects
- * Agency (DARPA) and Air Force Research Laboratory, Air Force
- * Materiel Command, USAF, under agreement number F39502-99-1-0512.
- */
-/*-
- * Copyright (c) 2000 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Dieter Baron and Thomas Klausner.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <err.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#define __INSIDE_CYGWIN__
-#include <getopt.h>
-
-#define REPLACE_GETOPT /* use this getopt as the system getopt(3) */
-
-#ifdef REPLACE_GETOPT
-int opterr = 1; /* if error message should be printed */
-int optind = 1; /* index into parent argv vector */
-int optopt = '?'; /* character checked for validity */
-int optreset; /* reset getopt */
-char *optarg; /* argument associated with option */
-#endif
-
-#define PRINT_ERROR ((opterr) && (*options != ':'))
-
-#define FLAG_PERMUTE 0x01 /* permute non-options to the end of argv */
-#define FLAG_ALLARGS 0x02 /* treat non-options as args to option "-1" */
-#define FLAG_LONGONLY 0x04 /* operate as getopt_long_only */
-
-/* return values */
-#define BADCH (int)'?'
-#define BADARG ((*options == ':') ? (int)':' : (int)'?')
-#define INORDER (int)1
-
-#ifdef __CYGWIN__
-static char EMSG[] = "";
-#else
-#define EMSG ""
-#endif
-
-static int getopt_internal(int, char * const *, const char *,
- const struct option *, int *, int);
-static int parse_long_options(char * const *, const char *,
- const struct option *, int *, int);
-static int gcd(int, int);
-static void permute_args(int, int, int, char * const *);
-
-static char *place = EMSG; /* option letter processing */
-
-/* XXX: set optreset to 1 rather than these two */
-static int nonopt_start = -1; /* first non option argument (for permute) */
-static int nonopt_end = -1; /* first option after non options (for permute) */
-
-/* Error messages */
-static const char recargchar[] = "option requires an argument -- %c";
-static const char recargstring[] = "option requires an argument -- %s";
-static const char ambig[] = "ambiguous option -- %.*s";
-static const char noarg[] = "option doesn't take an argument -- %.*s";
-static const char illoptchar[] = "unknown option -- %c";
-static const char illoptstring[] = "unknown option -- %s";
-
-/*
- * Compute the greatest common divisor of a and b.
- */
-static int
-gcd(int a, int b)
-{
- int c;
-
- c = a % b;
- while (c != 0) {
- a = b;
- b = c;
- c = a % b;
- }
-
- return (b);
-}
-
-/*
- * Exchange the block from nonopt_start to nonopt_end with the block
- * from nonopt_end to opt_end (keeping the same order of arguments
- * in each block).
- */
-static void
-permute_args(int panonopt_start, int panonopt_end, int opt_end,
- char * const *nargv)
-{
- int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos;
- char *swap;
-
- /*
- * compute lengths of blocks and number and size of cycles
- */
- nnonopts = panonopt_end - panonopt_start;
- nopts = opt_end - panonopt_end;
- ncycle = gcd(nnonopts, nopts);
- cyclelen = (opt_end - panonopt_start) / ncycle;
-
- for (i = 0; i < ncycle; i++) {
- cstart = panonopt_end+i;
- pos = cstart;
- for (j = 0; j < cyclelen; j++) {
- if (pos >= panonopt_end)
- pos -= nnonopts;
- else
- pos += nopts;
- swap = nargv[pos];
- /* LINTED const cast */
- ((char **) nargv)[pos] = nargv[cstart];
- /* LINTED const cast */
- ((char **)nargv)[cstart] = swap;
- }
- }
-}
-
-/*
- * parse_long_options --
- * Parse long options in argc/argv argument vector.
- * Returns -1 if short_too is set and the option does not match long_options.
- */
-static int
-parse_long_options(char * const *nargv, const char *options,
- const struct option *long_options, int *idx, int short_too)
-{
- char *current_argv, *has_equal;
- size_t current_argv_len;
- int i, match;
-
- current_argv = place;
- match = -1;
-
- optind++;
-
- if ((has_equal = strchr(current_argv, '=')) != NULL) {
- /* argument found (--option=arg) */
- current_argv_len = has_equal - current_argv;
- has_equal++;
- } else
- current_argv_len = strlen(current_argv);
-
- for (i = 0; long_options[i].name; i++) {
- /* find matching long option */
- if (strncmp(current_argv, long_options[i].name,
- current_argv_len))
- continue;
-
- if (strlen(long_options[i].name) == current_argv_len) {
- /* exact match */
- match = i;
- break;
- }
- /*
- * If this is a known short option, don't allow
- * a partial match of a single character.
- */
- if (short_too && current_argv_len == 1)
- continue;
-
- if (match == -1) /* partial match */
- match = i;
- else {
- /* ambiguous abbreviation */
- if (PRINT_ERROR)
- warnx(ambig, (int)current_argv_len,
- current_argv);
- optopt = 0;
- return (BADCH);
- }
- }
- if (match != -1) { /* option found */
- if (long_options[match].has_arg == no_argument
- && has_equal) {
- if (PRINT_ERROR)
- warnx(noarg, (int)current_argv_len,
- current_argv);
- /*
- * XXX: GNU sets optopt to val regardless of flag
- */
- if (long_options[match].flag == NULL)
- optopt = long_options[match].val;
- else
- optopt = 0;
- return (BADARG);
- }
- if (long_options[match].has_arg == required_argument ||
- long_options[match].has_arg == optional_argument) {
- if (has_equal)
- optarg = has_equal;
- else if (long_options[match].has_arg ==
- required_argument) {
- /*
- * optional argument doesn't use next nargv
- */
- optarg = nargv[optind++];
- }
- }
- if ((long_options[match].has_arg == required_argument)
- && (optarg == NULL)) {
- /*
- * Missing argument; leading ':' indicates no error
- * should be generated.
- */
- if (PRINT_ERROR)
- warnx(recargstring,
- current_argv);
- /*
- * XXX: GNU sets optopt to val regardless of flag
- */
- if (long_options[match].flag == NULL)
- optopt = long_options[match].val;
- else
- optopt = 0;
- --optind;
- return (BADARG);
- }
- } else { /* unknown option */
- if (short_too) {
- --optind;
- return (-1);
- }
- if (PRINT_ERROR)
- warnx(illoptstring, current_argv);
- optopt = 0;
- return (BADCH);
- }
- if (idx)
- *idx = match;
- if (long_options[match].flag) {
- *long_options[match].flag = long_options[match].val;
- return (0);
- } else
- return (long_options[match].val);
-}
-
-/*
- * getopt_internal --
- * Parse argc/argv argument vector. Called by user level routines.
- */
-static int
-getopt_internal(int nargc, char * const *nargv, const char *options,
- const struct option *long_options, int *idx, int flags)
-{
- char *oli; /* option letter list index */
- int optchar, short_too;
- static int posixly_correct = -1;
-
- if (options == NULL)
- return (-1);
-
- /*
- * Disable GNU extensions if POSIXLY_CORRECT is set or options
- * string begins with a '+'.
- */
- if (posixly_correct == -1)
- posixly_correct = (getenv("POSIXLY_CORRECT") != NULL);
- if (posixly_correct || *options == '+')
- flags &= ~FLAG_PERMUTE;
- else if (*options == '-')
- flags |= FLAG_ALLARGS;
- if (*options == '+' || *options == '-')
- options++;
-
- /*
- * XXX Some GNU programs (like cvs) set optind to 0 instead of
- * XXX using optreset. Work around this braindamage.
- */
- if (optind == 0)
- optind = optreset = 1;
-
- optarg = NULL;
- if (optreset)
- nonopt_start = nonopt_end = -1;
-start:
- if (optreset || !*place) { /* update scanning pointer */
- optreset = 0;
- if (optind >= nargc) { /* end of argument vector */
- place = EMSG;
- if (nonopt_end != -1) {
- /* do permutation, if we have to */
- permute_args(nonopt_start, nonopt_end,
- optind, nargv);
- optind -= nonopt_end - nonopt_start;
- }
- else if (nonopt_start != -1) {
- /*
- * If we skipped non-options, set optind
- * to the first of them.
- */
- optind = nonopt_start;
- }
- nonopt_start = nonopt_end = -1;
- return (-1);
- }
- if (*(place = nargv[optind]) != '-' ||
- (place[1] == '\0' && strchr(options, '-') == NULL)) {
- place = EMSG; /* found non-option */
- if (flags & FLAG_ALLARGS) {
- /*
- * GNU extension:
- * return non-option as argument to option 1
- */
- optarg = nargv[optind++];
- return (INORDER);
- }
- if (!(flags & FLAG_PERMUTE)) {
- /*
- * If no permutation wanted, stop parsing
- * at first non-option.
- */
- return (-1);
- }
- /* do permutation */
- if (nonopt_start == -1)
- nonopt_start = optind;
- else if (nonopt_end != -1) {
- permute_args(nonopt_start, nonopt_end,
- optind, nargv);
- nonopt_start = optind -
- (nonopt_end - nonopt_start);
- nonopt_end = -1;
- }
- optind++;
- /* process next argument */
- goto start;
- }
- if (nonopt_start != -1 && nonopt_end == -1)
- nonopt_end = optind;
-
- /*
- * If we have "-" do nothing, if "--" we are done.
- */
- if (place[1] != '\0' && *++place == '-' && place[1] == '\0') {
- optind++;
- place = EMSG;
- /*
- * We found an option (--), so if we skipped
- * non-options, we have to permute.
- */
- if (nonopt_end != -1) {
- permute_args(nonopt_start, nonopt_end,
- optind, nargv);
- optind -= nonopt_end - nonopt_start;
- }
- nonopt_start = nonopt_end = -1;
- return (-1);
- }
- }
-
- /*
- * Check long options if:
- * 1) we were passed some
- * 2) the arg is not just "-"
- * 3) either the arg starts with -- we are getopt_long_only()
- */
- if (long_options != NULL && place != nargv[optind] &&
- (*place == '-' || (flags & FLAG_LONGONLY))) {
- short_too = 0;
- if (*place == '-')
- place++; /* --foo long option */
- else if (*place != ':' && strchr(options, *place) != NULL)
- short_too = 1; /* could be short option too */
-
- optchar = parse_long_options(nargv, options, long_options,
- idx, short_too);
- if (optchar != -1) {
- place = EMSG;
- return (optchar);
- }
- }
-
- if ((optchar = (int)*place++) == (int)':' ||
- (optchar == (int)'-' && *place != '\0') ||
- (oli = strchr(options, optchar)) == NULL) {
- /*
- * If the user specified "-" and '-' isn't listed in
- * options, return -1 (non-option) as per POSIX.
- * Otherwise, it is an unknown option character (or ':').
- */
- if (optchar == (int)'-' && *place == '\0')
- return (-1);
- if (!*place)
- ++optind;
- if (PRINT_ERROR)
- warnx(illoptchar, optchar);
- optopt = optchar;
- return (BADCH);
- }
- if (long_options != NULL && optchar == 'W' && oli[1] == ';') {
- /* -W long-option */
- if (*place) /* no space */
- /* NOTHING */;
- else if (++optind >= nargc) { /* no arg */
- place = EMSG;
- if (PRINT_ERROR)
- warnx(recargchar, optchar);
- optopt = optchar;
- return (BADARG);
- } else /* white space */
- place = nargv[optind];
- optchar = parse_long_options(nargv, options, long_options,
- idx, 0);
- place = EMSG;
- return (optchar);
- }
- if (*++oli != ':') { /* doesn't take argument */
- if (!*place)
- ++optind;
- } else { /* takes (optional) argument */
- optarg = NULL;
- if (*place) /* no white space */
- optarg = place;
- else if (oli[1] != ':') { /* arg not optional */
- if (++optind >= nargc) { /* no arg */
- place = EMSG;
- if (PRINT_ERROR)
- warnx(recargchar, optchar);
- optopt = optchar;
- return (BADARG);
- } else
- optarg = nargv[optind];
- }
- place = EMSG;
- ++optind;
- }
- /* dump back option letter */
- return (optchar);
-}
-
-#ifdef REPLACE_GETOPT
-/*
- * getopt --
- * Parse argc/argv argument vector.
- *
- * [eventually this will replace the BSD getopt]
- */
-int
-getopt(int nargc, char * const *nargv, const char *options)
-{
-
- /*
- * We don't pass FLAG_PERMUTE to getopt_internal() since
- * the BSD getopt(3) (unlike GNU) has never done this.
- *
- * Furthermore, since many privileged programs call getopt()
- * before dropping privileges it makes sense to keep things
- * as simple (and bug-free) as possible.
- */
- return (getopt_internal(nargc, nargv, options, NULL, NULL, 0));
-}
-#endif /* REPLACE_GETOPT */
-
-/*
- * getopt_long --
- * Parse argc/argv argument vector.
- */
-int
-getopt_long(int nargc, char * const *nargv, const char *options,
- const struct option *long_options, int *idx)
-{
-
- return (getopt_internal(nargc, nargv, options, long_options, idx,
- FLAG_PERMUTE));
-}
-
-/*
- * getopt_long_only --
- * Parse argc/argv argument vector.
- */
-int
-getopt_long_only(int nargc, char * const *nargv, const char *options,
- const struct option *long_options, int *idx)
-{
-
- return (getopt_internal(nargc, nargv, options, long_options, idx,
- FLAG_PERMUTE|FLAG_LONGONLY));
-}
diff --git a/winsup/cygwin/libc/inet_addr.c b/winsup/cygwin/libc/inet_addr.c
deleted file mode 100644
index 5716ee9..0000000
--- a/winsup/cygwin/libc/inet_addr.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * Copyright (c) 1983, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Portions Copyright (c) 1996-1999 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
- * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93";
-static const char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#ifndef __CYGWIN__
-__FBSDID("$FreeBSD$");
-#else
-#define __INSIDE_CYGWIN__
-#define __INSIDE_CYGWIN_NET__
-#endif
-
-#ifndef __CYGWIN__
-#include "port_before.h"
-#endif
-
-#include <sys/types.h>
-#include <sys/param.h>
-
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <ctype.h>
-
-#ifndef __CYGWIN__
-#include "port_after.h"
-#endif
-
-/*
- * Check whether "cp" is a valid ascii representation
- * of an Internet address and convert to a binary address.
- * Returns 1 if the address is valid, 0 if not.
- * This replaces inet_addr, the return value from which
- * cannot distinguish between failure and a local broadcast address.
- */
-extern int
-cygwin_inet_aton(const char *cp, struct in_addr *addr) {
- u_long val;
- int base, n;
- char c;
- u_int8_t parts[4];
- u_int8_t *pp = parts;
- int digit;
-
- c = *cp;
- for (;;) {
- /*
- * Collect number up to ``.''.
- * Values are specified as for C:
- * 0x=hex, 0=octal, isdigit=decimal.
- */
- if (!isdigit((unsigned char)c))
- return (0);
- val = 0; base = 10; digit = 0;
- if (c == '0') {
- c = *++cp;
- if (c == 'x' || c == 'X')
- base = 16, c = *++cp;
- else {
- base = 8;
- digit = 1 ;
- }
- }
- for (;;) {
- if (isascii(c) && isdigit((unsigned char)c)) {
- if (base == 8 && (c == '8' || c == '9'))
- return (0);
- val = (val * base) + (c - '0');
- c = *++cp;
- digit = 1;
- } else if (base == 16 && isascii(c) &&
- isxdigit((unsigned char)c)) {
- val = (val << 4) |
- (c + 10 - (islower((unsigned char)c) ? 'a' : 'A'));
- c = *++cp;
- digit = 1;
- } else
- break;
- }
- if (c == '.') {
- /*
- * Internet format:
- * a.b.c.d
- * a.b.c (with c treated as 16 bits)
- * a.b (with b treated as 24 bits)
- */
- if (pp >= parts + 3 || val > 0xffU)
- return (0);
- *pp++ = val;
- c = *++cp;
- } else
- break;
- }
- /*
- * Check for trailing characters.
- */
- if (c != '\0' && (!isascii(c) || !isspace((unsigned char)c)))
- return (0);
- /*
- * Did we get a valid digit?
- */
- if (!digit)
- return (0);
- /*
- * Concoct the address according to
- * the number of parts specified.
- */
- n = pp - parts + 1;
- switch (n) {
- case 1: /* a -- 32 bits */
- break;
-
- case 2: /* a.b -- 8.24 bits */
- if (val > 0xffffffU)
- return (0);
- val |= parts[0] << 24;
- break;
-
- case 3: /* a.b.c -- 8.8.16 bits */
- if (val > 0xffffU)
- return (0);
- val |= (parts[0] << 24) | (parts[1] << 16);
- break;
-
- case 4: /* a.b.c.d -- 8.8.8.8 bits */
- if (val > 0xffU)
- return (0);
- val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
- break;
- }
- if (addr != NULL)
- addr->s_addr = htonl(val);
- return (1);
-}
-
-/*
- * Ascii internet address interpretation routine.
- * The value returned is in network order.
- */
-in_addr_t /* XXX should be struct in_addr :( */
-cygwin_inet_addr(const char *cp) {
- struct in_addr val;
-
- if (cygwin_inet_aton(cp, &val))
- return (val.s_addr);
- return (INADDR_NONE);
-}
-
-#ifndef __CYGWIN__
-/*
- * Weak aliases for applications that use certain private entry points,
- * and fail to include <arpa/inet.h>.
- */
-#undef inet_addr
-__weak_reference(__inet_addr, inet_addr);
-#undef inet_aton
-__weak_reference(__inet_aton, inet_aton);
-#endif
diff --git a/winsup/cygwin/libc/inet_network.c b/winsup/cygwin/libc/inet_network.c
deleted file mode 100644
index 70625fd..0000000
--- a/winsup/cygwin/libc/inet_network.c
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char sccsid[] = "@(#)inet_network.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#ifndef __CYGWIN__
-__FBSDID("$FreeBSD$");
-#else
-#define __INSIDE_CYGWIN__
-#define __INSIDE_CYGWIN_NET__
-#endif
-
-#ifndef __CYGWIN__
-#include "port_before.h"
-#endif
-
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <ctype.h>
-
-#ifndef __CYGWIN__
-#include "port_after.h"
-#endif
-
-/*
- * Internet network address interpretation routine.
- * The library routines call this routine to interpret
- * network numbers.
- */
-in_addr_t
-cygwin_inet_network(cp)
- const char *cp;
-{
- in_addr_t val, base, n;
- char c;
- in_addr_t parts[4], *pp = parts;
- int i, digit;
-
-again:
- val = 0; base = 10; digit = 0;
- if (*cp == '0')
- digit = 1, base = 8, cp++;
- if (*cp == 'x' || *cp == 'X')
- base = 16, cp++;
- while ((c = *cp) != 0) {
- if (isdigit((unsigned char)c)) {
- if (base == 8U && (c == '8' || c == '9'))
- return (INADDR_NONE);
- val = (val * base) + (c - '0');
- cp++;
- digit = 1;
- continue;
- }
- if (base == 16U && isxdigit((unsigned char)c)) {
- val = (val << 4) +
- (c + 10 - (islower((unsigned char)c) ? 'a' : 'A'));
- cp++;
- digit = 1;
- continue;
- }
- break;
- }
- if (!digit)
- return (INADDR_NONE);
- if (*cp == '.') {
- if (pp >= parts + 4 || val > 0xffU)
- return (INADDR_NONE);
- *pp++ = val, cp++;
- goto again;
- }
- if (*cp && !isspace(*cp&0xff))
- return (INADDR_NONE);
- *pp++ = val;
- n = pp - parts;
- if (n > 4U)
- return (INADDR_NONE);
- for (val = 0, i = 0; i < n; i++) {
- val <<= 8;
- val |= parts[i] & 0xff;
- }
- return (val);
-}
-
-#ifndef __CYGWIN__
-/*
- * Weak aliases for applications that use certain private entry points,
- * and fail to include <arpa/inet.h>.
- */
-#undef inet_network
-__weak_reference(__inet_network, inet_network);
-#endif
diff --git a/winsup/cygwin/libc/minires-os-if.c b/winsup/cygwin/libc/minires-os-if.c
deleted file mode 100644
index 1908ccf..0000000
--- a/winsup/cygwin/libc/minires-os-if.c
+++ /dev/null
@@ -1,568 +0,0 @@
-/* minires-os-if.c. Stub synchronous resolver for Cygwin.
-
- Copyright 2006, 2007 Red Hat, Inc.
-
- Written by Pierre A. Humblet <Pierre.Humblet@ieee.org>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "minires.h"
-
-#ifdef __CYGWIN__
-/***********************************************************************
- *
- Windows interface code
-
-***********************************************************************/
-
-/* Conflict between Windows definitions and others */
-#undef ERROR
-#undef NOERROR
-#undef DELETE
-
-#include <windows.h>
-#include <iphlpapi.h>
-#include <windns.h>
-#include <sys/cygwin.h>
-
-/***********************************************************************
- * write_record: Translates a Windows DNS record into a compressed record
- ***********************************************************************/
-
-#define PUTDOMAIN(d,p)\
- {int res = dn_comp(d, p, EndPtr - p, dnptrs, lastdnptr); p += res < 0 ? strlen(d) : res; }
-
-static u_char * write_record(unsigned char * ptr, PDNS_RECORD rr, unsigned char * EndPtr,
- unsigned char ** dnptrs, unsigned char ** lastdnptr, int debug)
-{
- u_char * rd_length_ptr;
-
- PUTDOMAIN(rr->pName, ptr);
-
- if (ptr + 4 > EndPtr)
- ptr += 4;
- else {
- PUTSHORT(rr->wType, ptr);
- PUTSHORT(ns_c_in, ptr);
- }
- if ((rr->Flags.DW & 0x3) == DnsSectionQuestion)
- return ptr;
-
- if (ptr + 4 > EndPtr)
- ptr += 4;
- else {
- PUTLONG(rr->dwTtl, ptr);
- }
- rd_length_ptr = ptr;
- ptr += 2; /* Placeholder for RDLENGTH */
-
- /* The default case uses an undocumented feature of the Windows
- resolver for types greater than 16.
- The DNS_RECORD Data contains the record in wire format. */
-
- switch(rr->wType) {
- case DNS_TYPE_A:
- {
- u_char * aptr = (u_char *) & rr->Data.A.IpAddress;
- if (ptr + 4 <= EndPtr) {
- ptr[0] = aptr[0];
- ptr[1] = aptr[1];
- ptr[2] = aptr[2];
- ptr[3] = aptr[3];
- }
- ptr += 4;
- break;
- }
- case DNS_TYPE_NS:
- case DNS_TYPE_MD:
- case DNS_TYPE_MF:
- case DNS_TYPE_CNAME:
- case DNS_TYPE_MB:
- case DNS_TYPE_MG:
- case DNS_TYPE_MR:
- case DNS_TYPE_PTR:
- PUTDOMAIN(rr->Data.PTR.pNameHost, ptr);
- break;
- case DNS_TYPE_SOA:
- PUTDOMAIN(rr->Data.SOA.pNamePrimaryServer, ptr);
- PUTDOMAIN(rr->Data.SOA.pNameAdministrator, ptr);
- if (ptr + 20 > EndPtr)
- ptr += 20;
- else {
- PUTLONG(rr->Data.SOA.dwSerialNo, ptr);
- PUTLONG(rr->Data.SOA.dwRefresh, ptr);
- PUTLONG(rr->Data.SOA.dwRetry, ptr);
- PUTLONG(rr->Data.SOA.dwExpire, ptr);
- PUTLONG(rr->Data.SOA.dwDefaultTtl, ptr);
- }
- break;
- case DNS_TYPE_NULL:
- if (ptr + rr->Data.Null.dwByteCount <= EndPtr)
- memcpy(ptr, rr->Data.Null.Data, rr->Data.Null.dwByteCount);
- ptr += rr->Data.Null.dwByteCount;
- if (rr->Data.Null.dwByteCount == rr->wDataLength - sizeof(DNS_NULL_DATA) + 1)
- DPRINTF(debug, "Null byte count has an unexpected value\n");
- break;
- case DNS_TYPE_WKS:
- if (ptr + rr->wDataLength - sizeof(DNS_WKS_DATA) + 1 + 5 > EndPtr)
- ptr += rr->wDataLength - sizeof(DNS_WKS_DATA) + 1 + 5;
- else {
- PUTLONG(rr->Data.WKS.IpAddress, ptr);
- *ptr++ = rr->Data.WKS.chProtocol;
- memcpy(ptr, rr->Data.WKS.BitMask, rr->wDataLength - sizeof(DNS_WKS_DATA) + 1);
- ptr += rr->wDataLength - sizeof(DNS_WKS_DATA) + 1;
- }
- break;
- case DNS_TYPE_MINFO:
- case DNS_TYPE_RP:
- PUTDOMAIN(rr->Data.MINFO.pNameMailbox, ptr);
- PUTDOMAIN(rr->Data.MINFO.pNameErrorsMailbox, ptr);
- break;
- case DNS_TYPE_MX:
- case DNS_TYPE_AFSDB:
- case DNS_TYPE_RT:
- if (ptr + 2 > EndPtr)
- ptr += 2;
- else
- PUTSHORT(rr->Data.MX.wPreference, ptr);
- PUTDOMAIN(rr->Data.MX.pNameExchange, ptr);
- break;
- case DNS_TYPE_HINFO:
- case DNS_TYPE_ISDN:
- case DNS_TYPE_TEXT:
- case DNS_TYPE_X25:
- {
- unsigned int i, len;
- for (i = 0; i < rr->Data.TXT.dwStringCount; i++) {
- len = strlen(rr->Data.TXT.pStringArray[i]) & 0xFF;
- if (ptr + len + 1 > EndPtr)
- ptr += len + 1;
- else {
- *ptr++ = len;
- memcpy(ptr, rr->Data.TXT.pStringArray[i], len);
- ptr += len;
- }
- }
- break;
- }
- case DNS_TYPE_SRV:
- if (ptr + 6 > EndPtr)
- ptr += 6;
- else {
- PUTSHORT(rr->Data.SRV.wPriority, ptr);
- PUTSHORT(rr->Data.SRV.wWeight, ptr);
- PUTSHORT(rr->Data.SRV.wPort, ptr);
- }
- PUTDOMAIN(rr->Data.SRV.pNameTarget, ptr);
- break;
- default:
- {
- unsigned int len = rr->wDataLength;
- DPRINTF(debug, "No structure for wType %d\n", rr->wType);
- if (ptr + len <= EndPtr)
- memcpy(ptr, (char *) &rr->Data, len);
- ptr += len;
- break;
- }
- }
- if (rd_length_ptr + 2 <= EndPtr)
- PUTSHORT(ptr - rd_length_ptr - 2, rd_length_ptr);
- return ptr;
-}
-
-/***********************************************************************
- *
- cygwin_query: implements res_nquery by calling DnsQuery
-
- ***********************************************************************/
-static int cygwin_query(res_state statp, const char * DomName, int Class, int Type,
- unsigned char * AnsPtr, int AnsLength)
-{
- DNS_STATUS res;
- PDNS_RECORD pQueryResultsSet, rr;
- int section, len, counts[4] = {0, 0, 0, 0}, debug = statp->options & RES_DEBUG;
- unsigned char * dnptrs[256], * ptr;
-
- dnptrs[0] = AnsPtr;
- dnptrs[1] = NULL;
-
- if (Class != ns_c_in) {
- errno = ENOSYS;
- statp->res_h_errno = NETDB_INTERNAL;
- return -1;
- }
-
- res = DnsQuery_A(DomName, Type, DNS_QUERY_TREAT_AS_FQDN,
- NULL, &pQueryResultsSet, NULL);
-#if 0
-#define NETDB_INTERNAL -1 /* see errno */
-#define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */
-#define TRY_AGAIN 2 /* Non-Authoritive Host not found, or SERVERFAIL */
-#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
-#define NO_DATA 4 /* Valid name, no data record of requested type */
-#endif
-
- DPRINTF(debug, "DnsQuery: %lu (Windows)\n", res);
- if (res) {
- switch (res) {
- case ERROR_INVALID_NAME:
- errno = EINVAL;
- statp->res_h_errno = NETDB_INTERNAL;;
- break;
- case ERROR_TIMEOUT:
- statp->res_h_errno = TRY_AGAIN;
- break;
- case DNS_ERROR_RCODE_NAME_ERROR:
- statp->res_h_errno = HOST_NOT_FOUND;
- break;
- case DNS_ERROR_RCODE_SERVER_FAILURE:
- statp->res_h_errno = TRY_AGAIN;
- break;
- case DNS_ERROR_NO_DNS_SERVERS:
- case DNS_ERROR_RCODE_FORMAT_ERROR:
- case DNS_ERROR_RCODE_NOT_IMPLEMENTED:
- case DNS_ERROR_RCODE_REFUSED:
- statp->res_h_errno = NO_RECOVERY;
- break;
- case DNS_INFO_NO_RECORDS: /* May be returned even if the host doesn't exist */
- statp->res_h_errno = NO_DATA;
- break;
- default:
- DPRINTF(debug, "Unknown code %lu for %s %d\n", res, DomName, Type);
- statp->res_h_errno = NO_RECOVERY;
- break;
- }
- len = -1;
- goto done;
- }
-
- ptr = AnsPtr + HFIXEDSZ; /* Skip header */
-
- rr = pQueryResultsSet;
- section = 0;
- while (rr) {
- if (!counts[0] && (rr->Flags.DW & 0x3)) {
- /* No question. Adopt the first name as the name in the question */
- if ((len = dn_comp(rr->pName, ptr, AnsLength - 4,
- dnptrs, &dnptrs[DIM(dnptrs) - 1])) < 0) {
- ptr = NULL;
- break;
- }
- ptr += len;
- PUTSHORT(Type, ptr);
- PUTSHORT(ns_c_in, ptr);
- counts[0] = 1;
- }
-
- DPRINTF(debug, "%s Section %d Type %u Windows Record Length %u\n",
- rr->pName, rr->Flags.DW & 0x3, rr->wType, rr->wDataLength);
-
- /* Check the records are in correct section order */
- if ((rr->Flags.DW & 0x3) < section) {
- DPRINTF(debug, "Unexpected section order %s %d\n", DomName, Type);
- continue;
- }
- section = rr->Flags.DW & 0x3;
-
- ptr = write_record(ptr, rr, AnsPtr + AnsLength, dnptrs,
- &dnptrs[DIM(dnptrs) - 1], debug);
-
- counts[section]++;
- rr = rr->pNext;
- }
-
- DnsRecordListFree(pQueryResultsSet, DnsFreeRecordList);
-
- len = ptr - AnsPtr;
-done:
- ptr = AnsPtr;
- PUTSHORT(0, ptr); /* Id */
- PUTSHORT((QR << 8) + RA + RD, ptr);
- for (section = 0; section < DIM(counts); section++) {
- PUTSHORT(counts[section], ptr);
- }
- return len;
-}
-
-/***********************************************************************
- *
- get_registry_items: returns dns items from the registry
-
- kHey: Handle to registry key
- KeyValue: key value to read
- what: 0 addresses ; 1 search list
-
-***********************************************************************/
-static void get_registry_dns_items(HKEY hKey, LPCTSTR KeyValue,
- res_state statp, int what)
-{
- DWORD size = 0;
- LONG res;
- LPBYTE list;
- int debug = statp->options & RES_DEBUG;
-
- res = RegQueryValueEx( hKey, KeyValue, NULL, NULL, NULL, &size);
- DPRINTF(debug, "value %s, error %lu (Windows), size %lu\n",
- KeyValue, res, size);
- if ((res == ERROR_SUCCESS) && (size > 1)) {
- if (!(list = (LPBYTE) alloca(size))) {
- DPRINTF(debug, "alloca: %s\n", strerror(errno));
- }
- else if ((res = RegQueryValueEx( hKey, KeyValue, NULL, NULL, list,
- &size )) != ERROR_SUCCESS) {
- DPRINTF(debug, "RegQueryValueEx: error %lu (Windows)\n", res);
- }
- else if (what == 0) { /* Get the addresses */
- BYTE *ap, *srch;
- int numAddresses = 0;
- for (ap = list; ap < list + size && *ap; ap = srch) {
- /* The separation character can be 0, ' ', or ','. */
- for (srch = ap; *srch && (isdigit(*srch) || *srch == '.' ); srch++);
- *srch++ = 0;
- if (numAddresses < DIM(statp->nsaddr_list)) {
- DPRINTF(debug, "server \"%s\"\n", ap);
- statp->nsaddr_list[numAddresses].sin_addr.s_addr = cygwin_inet_addr((char *) ap);
- if ( statp->nsaddr_list[numAddresses].sin_addr.s_addr != 0 )
- numAddresses++;
- }
- else
- DPRINTF(debug, "no space for server \"%s\"\n", ap);
- }
- statp->nscount = numAddresses;
- }
- else /* Parse the search line */
- minires_get_search((char *) list, statp);
- }
- return;
-}
-
-/***********************************************************************
- *
- get_registry_dns:
-
- Read the registry to get dns server addresses in Network Byte Order,
- and set statp->nscount (for NT <= 4.0)
- Read the registry SearchList
-
-***********************************************************************/
-
-static void get_registry_dns(res_state statp)
-{
- HKEY hKey;
- DWORD res;
- const char *keyName = "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters";
-
- DPRINTF(statp->options & RES_DEBUG, "key %s\n", keyName);
- if ((res = RegOpenKeyEx( HKEY_LOCAL_MACHINE, keyName, 0,
- KEY_QUERY_VALUE | KEY_READ, &hKey)) != ERROR_SUCCESS) {
- DPRINTF(statp->options & RES_DEBUG, "RegOpenKeyEx: error %lu (Windows)\n", res);
- return;
- }
-
- if (statp->nscount == 0)
- get_registry_dns_items(hKey, "NameServer", statp, 0);
- if (statp->nscount == 0)
- get_registry_dns_items(hKey, "DhcpNameServer", statp, 0);
- if (statp->dnsrch[0] == NULL)
- get_registry_dns_items(hKey, "SearchList", statp, 1);
-
- RegCloseKey(hKey);
-
- return;
-}
-
-/***********************************************************************
- *
- get_dns_info: Get the search list or the domain name
- and the dns server addresses in Network Byte Order
- Set statp->os_query if DnsQuery is available.
-
-***********************************************************************/
-void get_dns_info(res_state statp)
-{
-#if MAX_HOSTNAME_LEN > MAXHOSTNAMELEN
-#define MAX_HOSTNAME_SIZE (MAX_HOSTNAME_LEN + 1)
-#else
-#define MAX_HOSTNAME_SIZE (MAXHOSTNAMELEN + 1)
-#endif
-#if MAX_HOSTNAME_SIZE > 256 /* sizeof(defdname) */
-#error stap->defdname too short
-#endif
-
- int res, debug = statp->options & RES_DEBUG;
-
- ULONG ulOutBufLen = 0;
- DWORD dwRetVal;
- IP_ADDR_STRING * pIPAddr;
- FIXED_INFO * pFixedInfo;
- int numAddresses = 0;
-
- if (statp->use_os
- && ((dwRetVal = DnsQuery_A(NULL, 0, 0, NULL, NULL, NULL)) != ERROR_PROC_NOT_FOUND))
- {
- DPRINTF(debug, "using dnsapi.dll %d\n", dwRetVal);
- statp->os_query = (typeof(statp->os_query)) cygwin_query;
- /* We just need the search list. Avoid loading iphlpapi. */
- statp->nscount = -1;
- }
-
- if (statp->nscount != 0)
- goto use_registry;
-
- /* First call to get the buffer length we need */
- dwRetVal = GetNetworkParams((FIXED_INFO *) 0, &ulOutBufLen);
- if (dwRetVal != ERROR_BUFFER_OVERFLOW) {
- DPRINTF(debug, "GetNetworkParams: error %lu (Windows)\n", dwRetVal);
- goto use_registry;
- }
- if ((pFixedInfo = (FIXED_INFO *) alloca(ulOutBufLen)) == 0) {
- DPRINTF(debug, "alloca: %s\n", strerror(errno));
- goto use_registry;
- }
- if ((dwRetVal = GetNetworkParams(pFixedInfo, & ulOutBufLen))) {
- DPRINTF(debug, "GetNetworkParams: error %lu (Windows)\n", dwRetVal);
- goto use_registry;
- }
-
- DPRINTF(debug, "GetNetworkParams: OK\n");
- /* Record server addresses, up to array size */
- for (pIPAddr = &(pFixedInfo->DnsServerList), numAddresses = 0;
- pIPAddr;
- pIPAddr = pIPAddr->Next) {
- if (numAddresses < DIM(statp->nsaddr_list)) {
- DPRINTF(debug, "server \"%s\"\n", pIPAddr->IpAddress.String);
- statp->nsaddr_list[numAddresses].sin_addr.s_addr = cygwin_inet_addr(pIPAddr->IpAddress.String);
- if (statp->nsaddr_list[numAddresses].sin_addr.s_addr != 0) {
- numAddresses++;
- statp->nscount++;
- }
- }
- else
- DPRINTF(debug, "no space for server \"%s\"\n", pIPAddr->IpAddress.String);
- }
-
- use_registry:
- get_registry_dns(statp);
-
- if (!statp->dnsrch[0]) {
- statp->defdname[sizeof(statp->defdname) - 1] = 0;
- if (!(res = getdomainname(statp->defdname, sizeof(statp->defdname)))) {
- if (statp->defdname[0] && !statp->defdname[sizeof(statp->defdname) - 1])
- statp->dnsrch[0] = statp->defdname;
- }
- DPRINTF(debug, "getdomainname \"%s\"\n",
- (res)? strerror(errno) : statp->defdname);
- }
-}
-
-#else
-/***********************************************************************
- *
- Default interface code
-
-***********************************************************************/
-
-void get_dns_info(res_state statp)
-{
- return;
-}
-
-#endif
-
-
-
-#if 0
-#define DNS_ERROR_RCODE_FORMAT_ERROR 9001L
-#define DNS_ERROR_RCODE_SERVER_FAILURE 9002L
-#define DNS_ERROR_RCODE_NAME_ERROR 9003L
-#define DNS_ERROR_RCODE_NOT_IMPLEMENTED 9004L
-#define DNS_ERROR_RCODE_REFUSED 9005L
-#define DNS_ERROR_RCODE_YXDOMAIN 9006L
-#define DNS_ERROR_RCODE_YXRRSET 9007L
-#define DNS_ERROR_RCODE_NXRRSET 9008L
-#define DNS_ERROR_RCODE_NOTAUTH 9009L
-#define DNS_ERROR_RCODE_NOTZONE 9010L
-#define DNS_ERROR_RCODE_BADSIG 9016L
-#define DNS_ERROR_RCODE_BADKEY 9017L
-#define DNS_ERROR_RCODE_BADTIME 9018L
-#define DNS_INFO_NO_RECORDS 9501L
-#define DNS_ERROR_BAD_PACKET 9502L
-#define DNS_ERROR_NO_PACKET 9503L
-#define DNS_ERROR_RCODE 9504L
-#define DNS_ERROR_UNSECURE_PACKET 9505L
-#define DNS_ERROR_INVALID_TYPE 9551L
-#define DNS_ERROR_INVALID_IP_ADDRESS 9552L
-#define DNS_ERROR_INVALID_PROPERTY 9553L
-#define DNS_ERROR_TRY_AGAIN_LATER 9554L
-#define DNS_ERROR_NOT_UNIQUE 9555L
-#define DNS_ERROR_NON_RFC_NAME 9556L
-#define DNS_STATUS_FQDN 9557L
-#define DNS_STATUS_DOTTED_NAME 9558L
-#define DNS_STATUS_SINGLE_PART_NAME 9559L
-#define DNS_ERROR_INVALID_NAME_CHAR 9560L
-#define DNS_ERROR_NUMERIC_NAME 9561L
-#define DNS_ERROR_NOT_LALOWED_ON_ROOT_SERVER 9562L
-#define DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION 9563L
-#define DNS_ERROR_CANNOT_FIND_ROOT_HINTS 9564L
-#define DNS_ERROR_INCONSISTENT_ROOT_HINTS 9565L
-#define DNS_ERROR_ZONE_DOES_NOT_EXIST 9601L
-#define DNS_ERROR_NO_ZONE_INFO 9602L
-#define DNS_ERROR_INVALID_ZONE_OPERATION 9603L
-#define DNS_ERROR_ZONE_CONFIGURATION_ERROR 9604L
-#define DNS_ERROR_ZONE_HAS_NO_SOA_RECORD 9605L
-#define DNS_ERROR_ZONE_HAS_NO_NS_RECORDS 9606L
-#define DNS_ERROR_ZONE_LOCKED 9607L
-#define DNS_ERROR_ZONE_CREATION_FAILED 9608L
-#define DNS_ERROR_ZONE_ALREADY_EXISTS 9609L
-#define DNS_ERROR_AUTOZONE_ALREADY_EXISTS 9610L
-#define DNS_ERROR_INVALID_ZONE_TYPE 9611L
-#define DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP 9612L
-#define DNS_ERROR_ZONE_NOT_SECONDARY 9613L
-#define DNS_ERROR_NEED_SECONDARY_ADDRESSES 9614L
-#define DNS_ERROR_WINS_INIT_FAILED 9615L
-#define DNS_ERROR_NEED_WINS_SERVERS 9616L
-#define DNS_ERROR_NBSTAT_INIT_FAILED 9617L
-#define DNS_ERROR_SOA_DELETE_INVALID 9618L
-#define DNS_ERROR_FORWARDER_ALREADY_EXISTS 9619L
-#define DNS_ERROR_ZONE_REQUIRES_MASTER_IP 9620L
-#define DNS_ERROR_ZONE_IS_SHUTDOWN 9621L
-#define DNS_ERROR_PRIMARY_REQUIRES_DATAFILE 9651L
-#define DNS_ERROR_INVALID_DATAFILE_NAME 9652L
-#define DNS_ERROR_DATAFILE_OPEN_FAILURE 9653L
-#define DNS_ERROR_FILE_WRITEBACK_FAILED 9654L
-#define DNS_ERROR_DATAFILE_PARSING 9655L
-#define DNS_ERROR_RECORD_DOES_NOT_EXIST 9701L
-#define DNS_ERROR_RECORD_FORMAT 9702L
-#define DNS_ERROR_NODE_CREATION_FAILED 9703L
-#define DNS_ERROR_UNKNOWN_RECORD_TYPE 9704L
-#define DNS_ERROR_RECORD_TIMED_OUT 9705L
-#define DNS_ERROR_NAME_NOT_IN_ZONE 9706L
-#define DNS_ERROR_CNAME_LOOP 9707L
-#define DNS_ERROR_NODE_IS_CNAME 9708L
-#define DNS_ERROR_CNAME_COLLISION 9709L
-#define DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT 9710L
-#define DNS_ERROR_RECORD_ALREADY_EXISTS 9711L
-#define DNS_ERROR_SECONDARY_DATA 9712L
-#define DNS_ERROR_NO_CREATE_CACHE_DATA 9713L
-#define DNS_ERROR_NAME_DOES_NOT_EXIST 9714L
-#define DNS_WARNING_PTR_CREATE_FAILED 9715L
-#define DNS_WARNING_DOMAIN_UNDELETED 9716L
-#define DNS_ERROR_DS_UNAVAILABLE 9717L
-#define DNS_ERROR_DS_ZONE_ALREADY_EXISTS 9718L
-#define DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE 9719L
-#define DNS_INFO_AXFR_COMPLETE 9751L
-#define DNS_ERROR_AXFR 9752L
-#define DNS_INFO_ADDED_LOCAL_WINS 9753L
-#define DNS_STATUS_CONTINUE_NEEDED 9801L
-#define DNS_ERROR_NO_TCPIP 9851L
-#define DNS_ERROR_NO_DNS_SERVERS 9852L
-#define DNS_ERROR_DP_DOES_NOT_EXIST 9901L
-#define DNS_ERROR_DP_ALREADY_EXISTS 9902L
-#define DNS_ERROR_DP_NOT_ENLISTED 9903L
-#define DNS_ERROR_DP_ALREADY_ENLISTED 9904L
-#define DNS_ERROR_DP_NOT_AVAILABLE 9905L
-#endif
diff --git a/winsup/cygwin/libc/minires.c b/winsup/cygwin/libc/minires.c
deleted file mode 100644
index 8af24ac..0000000
--- a/winsup/cygwin/libc/minires.c
+++ /dev/null
@@ -1,951 +0,0 @@
-/* minires.c. Stub synchronous resolver for Cygwin.
-
- Copyright 2006, 2008 Red Hat, Inc.
-
- Written by Pierre A. Humblet <Pierre.Humblet@ieee.org>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "minires.h"
-
-/***********************************************************************
-
-Utilities
-
-***********************************************************************/
-/***********************************************************************
-
-dprintf
-***********************************************************************/
-void minires_dprintf(const char * format, ...)
-{
- va_list args;
-
- va_start(args, format);
- fprintf(stderr, "Minires: ");
- vfprintf(stderr, format, args);
- va_end(args);
-}
-
-/***********************************************************************
-
-scanline
-Put pointers in list[] to the beginning of each space or comma delimited
-word in "in", and put the lengths in sizes[] (counting the final 0).
-Return the number of words found
-***********************************************************************/
-static int scanline(char * in, char **list, int * sizes, int maxnum)
-{
- int i;
- char * startp;
- for (i = 0; i < maxnum; i++) {
- while((*in) && (isspace(*in) || *in == ',')) in++;
- if (*in == 0)
- break;
- startp = in++;
- while((*in) && !isspace(*in) && *in != ',') in++;
- list[i] = startp;
- sizes[i] = in - startp + 1;
- if (*in)
- *in++ = 0;
- }
- return i;
-}
-
-/***********************************************************************
-
-Read the search string.
-
-***********************************************************************/
-void minires_get_search(char * string, res_state statp)
-{
- char * words[MAXDNSRCH+1], * ptr;
- int sizes[MAXDNSRCH+1];
- int i, j, debug = statp->options & RES_DEBUG;
-
- i = scanline(string, words, sizes, MAXDNSRCH+1);
- ptr = statp->defdname;
- for (j = 0; j < i; j++) {
- if (j < MAXDNSRCH
- && ptr + sizes[j] < &statp->defdname[DIM(statp->defdname)]) {
- statp->dnsrch[j] = strcpy(ptr, words[j]);
- statp->dnsrch[j+1] = NULL;
- ptr += sizes[j];
- DPRINTF(debug, "search \"%s\"\n", words[j]);
- }
- else
- DPRINTF(debug, "no space for \"%s\"\n", words[j]);
- }
-}
-
-/***********************************************************************
-
-Read options
-
-
-***********************************************************************/
-static void get_options(res_state statp, int i, char **words)
-{
- char *ptr;
- int value;
-
- while (i-- > 0) {
- if (!strcasecmp("debug", words[i])) {
- statp->options |= RES_DEBUG;
- DPRINTF(statp->options & RES_DEBUG, "%s: 1\n", words[i]);
- continue;
- }
- if (!strcasecmp("osquery", words[i])) {
- statp->use_os = 1;
- DPRINTF(statp->options & RES_DEBUG, "%s: 1\n", words[i]);
- continue;
- }
-
- if ((ptr = strchr(words[i], ':'))) {
- *ptr++ = 0;
- value = atoi(ptr);
- /* Not supported
- if (!strcasecmp("ndots", words[i])) {
- statp->ndots = value;
- continue;
- }
- */
- if (!strcasecmp("retry", words[i])) {
- if (value < 1)
- value = 1;
- statp->retry = value;
- DPRINTF(statp->options & RES_DEBUG, "%s: %d\n", words[i], value);
- continue;
- }
- if (!strcasecmp("retrans", words[i])) {
- if (value < 1)
- value = 1;
- statp->retrans = value;
- DPRINTF(statp->options & RES_DEBUG, "%s: %d\n", words[i], value);
- continue;
- }
- }
- DPRINTF(statp->options & RES_DEBUG, "unknown option: \"%s\"\n", words[i]);
- }
-}
-
-/***********************************************************************
-
-Read the resolv.conf file.
-We only look for nameserver, domain, search and options
-
-***********************************************************************/
-#if MAXNS > MAXDNSRCH + 1
-#define MAXSIZE MAXNS
-#else
-#define MAXSIZE MAXDNSRCH + 1 /* Make unused one visible */
-#endif
-static void get_resolv(res_state statp)
-{
- FILE * fd;
- char *words[MAXSIZE + 1], line[4096], *ptr;
- int sizes[DIM(words)];
- int i, j, ns = 0, have_search, have_address, debug = statp->options & RES_DEBUG;
-
- fd = fopen(_PATH_RESCONF, "r");
- DPRINTF(debug, _PATH_RESCONF ": %s\n", fd?"OK":strerror(errno));
- if (fd == NULL)
- return;
-
- statp->use_os = 0; /* Do not use os_query, except if allowed by "options" */
- have_search = (statp->dnsrch[0] != NULL);
- have_address = (statp->nscount != 0);
-
- while ( fgets(line, sizeof(line), fd) != 0) {
- DPRINTF(debug, "resolv.conf %s", line);
- if ((i = scanline(line, words, sizes, DIM(words))) > 0) {
- if (!have_address
- && !strncasecmp("nameserver", words[0], sizes[0])) {
- for ( j = 1; j < i ; j++) {
- unsigned int address;
- address = cygwin_inet_addr(words[j]);
- if (address == -1) {
- DPRINTF(debug, "invalid server \"%s\"\n", words[j]);
- }
- else if (ns >= MAXNS) {
- DPRINTF(debug, "no space for server \"%s\"\n", words[j]);
- }
- else {
- statp->nsaddr_list[ns++].sin_addr.s_addr = address;
- statp->nscount++;
- DPRINTF(debug, "server \"%s\"\n", words[j]);
- }
- }
- }
- else if (!have_search
- && (!strncasecmp("search", words[0], sizes[0])
- || !strncasecmp("domain", words[0], sizes[0]))) {
- ptr = statp->defdname;
- for (j = 0; j + 1 < i; j++) {
- if (j < MAXDNSRCH
- && ptr + sizes[j + 1] < &statp->defdname[DIM(statp->defdname)]) {
- statp->dnsrch[j] = strcpy(ptr, words[j+1]);
- statp->dnsrch[j+1] = 0;
- ptr += sizes[j+1];
- DPRINTF(debug, "domain|search \"%s\"\n", statp->dnsrch[j]);
- }
- else {
- DPRINTF(debug, "no space for \"%s\"\n", words[j+1]);
- }
- }
- }
- /* Options line */
- else if (!strncasecmp("options", words[0], sizes[0]))
- get_options(statp, i - 1, &words[1]);
- }
- }
- fclose(fd);
- return;
-}
-
-/****************************************************************************/
-/*
- open_sock()
- Create a datagram socket and call bind.
-
-****************************************************************************/
-
-static int open_sock(struct sockaddr_in *CliAddr, int debug)
-{
- int fd;
-
- DPRINTF(debug, "opening UDP socket\n");
-
- /* Create a datagram socket */
- if ((fd = cygwin_socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) {
- DPRINTF(debug, "socket(UDP): %s\n", strerror(errno));
- return -1;
- }
- /* Set non-blocking */
- if (fcntl64(fd, F_SETFL, O_NONBLOCK) < 0) {
- DPRINTF(debug, "fcntl: %s\n", strerror(errno));
- return -1;
- }
- /* Set close on exec flag */
- if (fcntl64(fd, F_SETFD, 1) == -1) {
- DPRINTF(debug, "fcntl: %s\n", strerror(errno));
- return -1;
- }
-
- CliAddr->sin_family = AF_INET;
- CliAddr->sin_addr.s_addr = htonl(INADDR_ANY);
- CliAddr->sin_port = htons(0);
- bzero(CliAddr->sin_zero, sizeof(CliAddr->sin_zero));
- /* Get a port */
- if (cygwin_bind(fd, (struct sockaddr *) CliAddr, sizeof(*CliAddr)) < 0) {
- DPRINTF(debug, "bind: %s\n", strerror(errno));
- return -1;
- }
- return fd;
-}
-
-/*****************************************************************
- *
- __res_state()
- Undocumented but public. Accessed through _res
-
- *****************************************************************/
-static struct __res_state res;
-struct __res_state *__res_state(void)
-{
- return & res;
-}
-
-/*****************************************************************
- *
- res_init()
-
- *****************************************************************/
-int res_ninit(res_state statp)
-{
- int i;
-
- statp->res_h_errno = NETDB_SUCCESS;
- statp->nscount = 0;
- statp->os_query = NULL;
- statp->retrans = RES_TIMEOUT; /* timeout in seconds */
- statp->retry = RES_MAXRETRY; /* max number of retries */
- statp->use_os = 1; /* use os_query if available and allowed by get_resolv */
- statp->mypid = -1;
- statp->sockfd = -1;
- /* Use the pid and the ppid for random seed, from the point of view of an outsider.
- Mix the upper and lower bits as they are not used equally */
- i = getpid();
- statp->id = (ushort) (getppid() ^ (i << 8) ^ (i >> 8));
- for (i = 0; i < DIM(statp->dnsrch); i++) statp->dnsrch[i] = 0;
-
- /* resolv.conf (dns servers & search list)*/
- get_resolv(statp);
- /* Get dns servers and search list from an os-specific routine, set os_query */
- get_dns_info(statp);
-
- if (statp->nscount == 0 && !statp->os_query) {
- errno = ENONET;
- statp->res_h_errno = NETDB_INTERNAL;
- DPRINTF(statp->options & RES_DEBUG, "no dns server found\n");
- return -1;
- }
- for (i = 0; i < statp->nscount; i++) {
- statp->nsaddr_list[i].sin_family = AF_INET;
- statp->nsaddr_list[i].sin_port = htons(NAMESERVER_PORT);
- bzero(statp->nsaddr_list[i].sin_zero, sizeof(statp->nsaddr_list[i].sin_zero));
- }
- /* Only debug may be set before calling init */
- statp->options &= RES_DEBUG;
- statp->options |= RES_INIT | RES_DEFAULT;
- return 0;
-}
-
-int res_init()
-{
- int r = res_ninit(& res);
- h_errno = res.res_h_errno;
- return r;
-}
-
-/*****************************************************************
- *
- res_close()
-
- *****************************************************************/
-void res_nclose(res_state statp)
-{
- int res;
- if (statp->sockfd != -1) {
- res = close(statp->sockfd);
- DPRINTF(statp->options & RES_DEBUG, "close sockfd %d: %s\n",
- statp->sockfd, (res == 0)?"OK":strerror(errno));
- statp->sockfd = -1;
- }
-}
-
-void res_close()
-{
- res_nclose(& res);
-}
-
-/*****************************************************************
- *
- get_tcp_buf()
-
- *****************************************************************/
-static int get_tcp_buf(int fd, unsigned char *buf, int size, int debug)
-{
- int res;
- while (size > 0) {
- if ((res = read(fd, buf, size)) < 0) {
- DPRINTF(debug, "read: %s\n", strerror(errno));
- return -1;
- }
- DPRINTF(debug, "read %d out of %d\n", res, size);
- size -= res;
- buf += res;
- }
- return 0;
-}
-
-/*****************************************************************
- *
- get_tcp()
-
- *****************************************************************/
-static int get_tcp(struct sockaddr_in *CliAddr,
- const unsigned char * MsgPtr, int MsgLength,
- unsigned char * AnsPtr, int AnsLength, int debug)
-{
- int fd, res = -1;
- unsigned short ans_length;
- union {short len; u_char buf[sizeof(short)];} len_buf;
-
- DPRINTF(debug, "retrying with TCP\n");
-
- /* Create a tcp socket */
- if ((fd = cygwin_socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) {
- DPRINTF(debug, "socket(TCP): %s\n", strerror(errno));
- return -1;
- }
-
- if (cygwin_connect(fd, (struct sockaddr *) CliAddr, sizeof(* CliAddr)) < 0) {
- DPRINTF(debug, "connect: %s\n", strerror(errno));
- goto done;
- }
-
- /* Send the length then the message */
- len_buf.len = htons(MsgLength);
- if (write(fd, len_buf.buf, sizeof(len_buf)) != sizeof(len_buf)
- || write(fd, MsgPtr, MsgLength) != MsgLength) {
- DPRINTF(debug, "write: %s\n", strerror(errno));
- goto done;
- }
-
- /* Read the answer length */
- if (get_tcp_buf(fd, len_buf.buf, sizeof(len_buf), debug))
- goto done;
- ans_length = ntohs(len_buf.len);
-
- /* Read the answer */
- if (get_tcp_buf(fd, AnsPtr, MIN(ans_length, AnsLength), debug))
- goto done;
- res = ans_length;
-
- done:
- close (fd);
- return res;
-}
-
-/*****************************************************************
- **
- res_send
- Assumes that the message is a query starting with a short id.
- Handles retransmissions until that id is received.
-
-*****************************************************************/
-int res_nsend( res_state statp, const unsigned char * MsgPtr,
- int MsgLength, unsigned char * AnsPtr, int AnsLength)
-{
- /* Current server, shared by all tasks */
- volatile static unsigned int SServ = 0XFFFFFFFF;
- int tcp;
- const int debug = statp->options & RES_DEBUG;
-
- fd_set fdset_read;
- int rslt, addrLen, transNum, wServ;
- struct sockaddr_in mySockAddr, dnsSockAddr;
- struct timeval timeOut;
-
- statp->res_h_errno = NETDB_SUCCESS;
- if (((statp->options & RES_INIT) == 0) && (res_ninit(statp) != 0))
- return -1;
-
- /* Close the socket if it had been opened before a fork.
- Reuse of pid's cannot hurt */
- if ((statp->sockfd != -1) && (statp->mypid != getpid())) {
- res_nclose(statp);
- }
-
- /* Open a socket for this process */
- if (statp->sockfd == -1) {
- /* Create a non-blocking, close on exec socket and bind it (to any port) */
- statp->sockfd = open_sock(& mySockAddr, debug);
- if (statp->sockfd < 0 ) {
- statp->res_h_errno = NETDB_INTERNAL;
- return -1;
- }
- statp->mypid = getpid();
- if (SServ == 0XFFFFFFFF) /* Pseudo random */
- SServ = statp->id % statp->nscount;
- }
-
- transNum = 0;
- while ( transNum++ < statp->retry) {
- if ((wServ = SServ + 1) >= statp->nscount)
- wServ = 0;
- SServ = wServ;
-
- /* There exists attacks on DNS where many wrong answers with guessed id's and
- spoofed source address and port are generated at about the time when the
- program is tricked into resolving a name.
- This routine runs through the retry loop for each incorrect answer.
- It is thus extremely likely that such attacks will cause a TRY_AGAIN return,
- probably causing the calling program to retry after a delay.
-
- Note that valid late or duplicate answers to a previous questions also cause
- a retry, although this is minimized by flushing the socket before sending the
- new question.
- */
-
- /* Flush duplicate or late answers */
- while ((rslt = cygwin_recvfrom( statp->sockfd, AnsPtr, AnsLength, 0, NULL, NULL)) >= 0) {
- DPRINTF(debug, "Flushed %d bytes\n", rslt);
- }
- DPRINTF(debug && (errno != EWOULDBLOCK),
- "Unexpected errno for flushing recvfrom: %s", strerror(errno));
-
- /* Send the message */
- rslt = cygwin_sendto(statp->sockfd, MsgPtr, MsgLength, 0,
- (struct sockaddr *) &statp->nsaddr_list[wServ],
- sizeof(struct sockaddr_in));
- DPRINTF(debug, "sendto: server %08x sockfd %d %s\n",
- statp->nsaddr_list[wServ].sin_addr.s_addr,
- statp->sockfd, (rslt == MsgLength)?"OK":strerror(errno));
- if (rslt != MsgLength) {
- statp->res_h_errno = NETDB_INTERNAL;
- return -1;
- };
- /*
- Wait for a reply with select()
- */
- FD_ZERO(&fdset_read);
- FD_SET (statp->sockfd, &fdset_read );
- timeOut.tv_sec = statp->retrans;
- timeOut.tv_usec = 0;
- rslt = cygwin_select(statp->sockfd + 1, &fdset_read, NULL, NULL, &timeOut);
- if ( rslt == 0 ) { /* Timeout */
- DPRINTF(statp->options & RES_DEBUG, "timeout for server %08x\n",
- statp->nsaddr_list[wServ].sin_addr.s_addr);
- continue;
- }
- else if ((rslt != 1) || (FD_ISSET(statp->sockfd, &fdset_read) == 0)) {
- DPRINTF(debug, "select: %s\n", strerror(errno));
- statp->res_h_errno = NETDB_INTERNAL;
- return -1;
- }
-
- addrLen = sizeof(dnsSockAddr);
- rslt = cygwin_recvfrom(statp->sockfd, AnsPtr, AnsLength, 0,
- (struct sockaddr *) & dnsSockAddr, & addrLen);
- if (rslt <= 0) {
- DPRINTF(debug, "recvfrom: %s\n", strerror(errno));
- statp->res_h_errno = NETDB_INTERNAL;
- return -1;
- }
- DPRINTF(debug, "recvfrom: %d bytes from %08x\n", rslt, dnsSockAddr.sin_addr.s_addr);
- /*
- Prepare to retry with tcp
- */
- for (tcp = 0; tcp < 2; tcp++) {
- /* Check if this is the expected message from the expected server */
- if ((memcmp(& dnsSockAddr, & statp->nsaddr_list[wServ],
- (char *) & dnsSockAddr.sin_zero[0] - (char *) & dnsSockAddr) == 0)
- && (rslt >= HFIXEDSZ)
- && (*MsgPtr == *AnsPtr) /* Ids match */
- && (*(MsgPtr + 1) == *(AnsPtr + 1))
- && ((AnsPtr[2] & QR) != 0)
- && (AnsPtr[4] == 0)
- /* We check the question if present.
- Some servers don't return it on error, in particular
- when the name in the question is not valid. */
- && (((AnsPtr[5] == 0)
- && ((AnsPtr[3] & ERR_MASK) != NOERROR))
- || ((AnsPtr[5] == 1)
- && (rslt >= MsgLength)
- && (memcmp(MsgPtr + HFIXEDSZ, AnsPtr + HFIXEDSZ, MsgLength - HFIXEDSZ) == 0)))) {
- if ((AnsPtr[3] & ERR_MASK) == NOERROR) {
- if ((AnsPtr[2] & TC) && (tcp == 0) && !(statp->options & RES_IGNTC)) {
- /* Truncated. Try TCP */
- rslt = get_tcp(&statp->nsaddr_list[wServ], MsgPtr, MsgLength,
- AnsPtr, AnsLength, statp->options & RES_DEBUG);
- continue /* Tcp loop */;
- }
- else if ((AnsPtr[6] | AnsPtr[7])!= 0)
- return rslt;
- else
- statp->res_h_errno = NO_DATA;
- }
-#if 0
- NETDB_INTERNAL -1 /* see errno */
- NETDB_SUCCESS 0 /* no problem */
- HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */
- TRY_AGAIN 2 /* Non-Authoritive Host not found, or SERVERFAIL */
- Also seen returned by some servers when the name is too long
- NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
- NO_DATA 4 /* Valid name, no data record of requested type */
-#endif
- else {
- switch (AnsPtr[3] & ERR_MASK) {
- /* return HOST_NOT_FOUND even for non-authoritative answers */
- case NXDOMAIN:
- case FORMERR:
- statp->res_h_errno = HOST_NOT_FOUND;
- break;
- case SERVFAIL:
- statp->res_h_errno = TRY_AGAIN;
- break;
- default:
- statp->res_h_errno = NO_RECOVERY;
- }
- }
- return -1;
- }
- else {
- DPRINTF(debug, "unexpected answer\n");
- break;
- }
- } /* TCP */
- }
- DPRINTF(debug, "too many retries\n");
- statp->res_h_errno = TRY_AGAIN;
- return -1;
-}
-
-int res_send( const unsigned char * MsgPtr, int MsgLength,
- unsigned char * AnsPtr, int AnsLength)
-{
- int r = res_nsend(& res, MsgPtr, MsgLength, AnsPtr, AnsLength);
- h_errno = res.res_h_errno;
- return r;
-}
-
-/*****************************************************************
- *
- res_mkquery
-
- Return: packet size
- -1 name format is incorrect
-*****************************************************************/
-int res_nmkquery (res_state statp,
- int op, const char * dnameptr, int qclass, int qtype,
- const unsigned char * dataptr, int datalen,
- const unsigned char * newrr, unsigned char * buf, int buflen)
-{
- int i, len;
- const char * ptr;
- unsigned int id4;
-
- if (op == QUERY) {
- /* Write the name and verify buffer length */
- len = dn_comp(dnameptr, buf + HFIXEDSZ, buflen - HFIXEDSZ - QFIXEDSZ, NULL, NULL);
- if (len < 0) {
- DPRINTF(statp->options & RES_DEBUG,
- "\"%s\" invalid or buffer too short\n", dnameptr);
- statp->res_h_errno = NETDB_INTERNAL;
- return -1;
- }
-
- /* Fill the header */
- PUTSHORT(statp->id, buf);
- PUTSHORT(RD, buf);
- PUTSHORT(1, buf); /* Number of questions */
- for (i = 0; i < 3; i++)
- PUTSHORT(0, buf); /* Number of answers */
-
- /* Write qtype and qclass */
- buf += len;
- PUTSHORT(qtype, buf);
- PUTSHORT(qclass, buf);
-
- /* Update id. The current query adds entropy to the next query id */
- for (id4 = qtype, i = 0, ptr = dnameptr; *ptr; ptr++, i += 3)
- id4 ^= *ptr << (i & 0xF);
- i = 1 + statp->id % 15; /* Between 1 and 16 */
- /* id dependent rotation, also brings MSW to LSW */
- id4 = (id4 << i) ^ (id4 >> (16 - i)) ^ (id4 >> (32 - i));
- if ((short) id4)
- statp->id ^= (short) id4;
- else
- statp->id++; /* Force change */
-
- return len + (HFIXEDSZ + QFIXEDSZ); /* packet size */
- }
- else { /* Not implemented */
- errno = ENOSYS;
- statp->res_h_errno = NETDB_INTERNAL;
- return -1;
- }
-}
-
-int res_mkquery (int op, const char * dnameptr, int qclass, int qtype,
- const unsigned char * dataptr, int datalen,
- const unsigned char * newrr, unsigned char * buf, int buflen)
-{
- int r = res_nmkquery (& res, op, dnameptr, qclass, qtype,
- dataptr, datalen, newrr, buf, buflen);
- h_errno = res.res_h_errno;
- return r;
-
-}
-
-/*****************************************************************
- * res_query()
- *****************************************************************/
-
-int res_nquery( res_state statp, const char * DomName, int Class, int Type,
- unsigned char * AnsPtr, int AnsLength)
-{
- u_char packet[PACKETSZ];
- int len;
-
- DPRINTF(statp->options & RES_DEBUG, "query \"%s\" type %d\n", DomName, Type);
- statp->res_h_errno = NETDB_SUCCESS;
-
- /* If a hook exists to a native implementation, use it */
- if (statp->os_query)
- return ((os_query_t *) statp->os_query)(statp, DomName, Class, Type, AnsPtr, AnsLength);
-
- if ((len = res_nmkquery (statp, QUERY, DomName, Class, Type,
- 0, 0, 0, packet, PACKETSZ)) < 0)
- return -1;
- return res_nsend( statp, packet, len, AnsPtr, AnsLength);
-}
-
-int res_query( const char * DomName, int Class, int Type, unsigned char * AnsPtr, int AnsLength)
-{
- int r = res_nquery(& res, DomName, Class, Type, AnsPtr, AnsLength);
- h_errno = res.res_h_errno;
- return r;
-}
-
-/*****************************************************************
- * res_querydomain()
- *****************************************************************/
-int res_nquerydomain( res_state statp, const char * Name, const char * DomName,
- int Class, int Type, unsigned char * AnsPtr, int AnsLength)
-{
- char fqdn[MAXDNAME], *ptr;
- int nlen;
-
- if (!DomName)
- ptr = (char *) Name;
- else if ((nlen = strlen(Name)) >= sizeof(fqdn) - 1)
- goto error;
- else {
- strcpy(fqdn, Name);
- ptr = &fqdn[nlen];
- if (nlen && *(ptr - 1) != '.')
- *(ptr++ - 1) = '.';
- fqdn[sizeof(fqdn) - 1] = 0;
- strncpy(ptr, DomName, sizeof(fqdn) - (ptr - fqdn));
- if (fqdn[sizeof(fqdn) - 1])
- goto error;
- ptr = fqdn;
- }
- return res_nquery(statp, ptr, Class, Type, AnsPtr, AnsLength);
-
- error:
- DPRINTF(statp->options & RES_DEBUG, "querydomain: name too long\n");
- errno = EINVAL;
- statp->res_h_errno = NETDB_INTERNAL;;
- return -1;
-}
-
-int res_querydomain( const char * Name, const char * DomName, int Class,
- int Type, unsigned char * AnsPtr, int AnsLength)
-{
- int r = res_nquerydomain(& res, Name, DomName, Class, Type, AnsPtr,
- AnsLength);
- h_errno = res.res_h_errno;
- return r;
-}
-
-/*****************************************************************
- *
- res_search()
-
- *****************************************************************/
-
-int res_nsearch( res_state statp, const char * DomName, int Class, int Type,
- unsigned char * AnsPtr, int AnsLength)
-{
- int len, stat, i;
- char fullDomName[MAXDNAME], *ptr, *sptr;
-
- DPRINTF(statp->options & RES_DEBUG, "search \"%s\" type %d\n", DomName, Type);
-
- if (((statp->options & RES_INIT) == 0) && (res_ninit(statp) != 0))
- return -1;
-
- stat = res_nquery( statp, DomName, Class, Type, AnsPtr, AnsLength);
-
- /* Check if will skip search */
- if (statp->res_h_errno != HOST_NOT_FOUND /* Success or hard failure */
- || ((ptr = strrchr(DomName, '.')) && (!*(ptr+1))) /* Final dot */
- || (((statp->options & RES_DNSRCH) == 0) /* Or no search */
- && ((ptr != NULL) /* And some dot */
- || ((statp->options & RES_DEFNAMES) == 0)))/* or no def domain */
- || (!(sptr = statp->dnsrch[0])))
- return stat;
-
- len = strlen(DomName);
- if (len >= MAXDNAME - 1) /* Space for next dot */
- goto error;
- strcpy(fullDomName, DomName);
- fullDomName[len++] = '.';
- fullDomName[MAXDNAME - 1] = 0; /* Overflow indicator */
- i = 0;
- do {
- strncpy(fullDomName + len, sptr, MAXDNAME - len);
- if (fullDomName[MAXDNAME - 1])
- goto error;
- stat = res_nquery(statp, fullDomName, Class, Type, AnsPtr, AnsLength);
- } while ((sptr = statp->dnsrch[++i]) != NULL
- && statp->res_h_errno == HOST_NOT_FOUND
- && (statp->options & RES_DNSRCH) != 0);
-
- /* Return last stat */
- return stat;
-
- error:
- DPRINTF(statp->options & RES_DEBUG, "name too long during search\n");
- errno = EINVAL;
- statp->res_h_errno = NETDB_INTERNAL;
- return -1;
-}
-
-int res_search( const char * DomName, int Class, int Type,
- unsigned char * AnsPtr, int AnsLength)
-{
- int r = res_nsearch(& res, DomName, Class, Type, AnsPtr, AnsLength);
- h_errno = res.res_h_errno;
- return r;
-}
-
-/*****************************************************************
- * dn_expand
- *****************************************************************/
-
-int dn_expand(const unsigned char *msg, const unsigned char *eomorig,
- const unsigned char *comp_dn, char *exp_dn, int length)
-{
- unsigned int len, complen = 0;
- const unsigned char *comp_dn_orig = comp_dn;
-/* char * exp_start = exp_dn; */
-
- errno = EINVAL;
- if (comp_dn >= eomorig)
- goto expand_fail;
- if ((len = *comp_dn++) == 0) /* Weird case */
- exp_dn++;
- else do {
- if (len <= MAXLABEL) {
- if ((length -= (len + 1)) > 0 /* Need space for final . */
- && comp_dn + len <= eomorig) {
- do { *exp_dn++ = *comp_dn++; } while (--len != 0);
- *exp_dn++ = '.';
- }
- else
- goto expand_fail;
- }
- else if (len >= (128+64)) {
- if (!complen) /* Still in the original field? */
- complen = (comp_dn - comp_dn_orig) + 1;
- comp_dn = msg + (((len & ~(128+64)) << 8) + *comp_dn);
- if (comp_dn >= eomorig)
- goto expand_fail;
- }
- else
- goto expand_fail;
- } while ((len = *comp_dn++) != 0);
- /* Replace last . with a 0 */
- *(--exp_dn) = 0;
- if (!complen)
- complen = comp_dn - comp_dn_orig;
-/* fprintf(stderr, "dn_expand %s\n", exp_start); */
- return complen;
-
-expand_fail:
-/* fprintf(stderr, "dn_expand fails\n"); */
- return -1;
-}
-
-
-/*****************************************************************
- *
- dn_comp
-
- Return -1 in case of overflow, but still fill buffer correctly.
- We do not check the alphabet of the host names
- nor the length of the compressed name and we
- preserve the letter cases.
-
- *****************************************************************/
-int dn_comp(const char * exp_dn, u_char * comp_dn, int length,
- u_char ** dnptrs, u_char ** lastdnptr)
-{
- u_char *cptr = comp_dn, *dptr, *lptr, *rptr;
- unsigned int i, len;
- u_char * const eptr = comp_dn + length - 1; /* Last valid */
-
- errno = EINVAL;
-
- if (*exp_dn == '.' && !*(exp_dn + 1))
- exp_dn++;
- while (1) {
- if (*exp_dn == '.' || cptr > eptr)
- return -1;
- if (*exp_dn == 0) {
- *cptr++ = 0;
- break;
- }
- /* Try to compress */
- if (dnptrs) {
- for (i = 1; dnptrs[i]; i++) {
- dptr = dnptrs[i];
- if (dptr >= comp_dn) /* Handle name.name */
- continue;
- rptr = (u_char *) exp_dn;
- len = *dptr++;
- while (1) {
- do {
- if (*dptr++ != *rptr++)
- goto next_dn;
- } while (--len);
- len = *dptr++;
- if (len == 0) { /* last label */
- if (!*rptr || (*rptr == '.' && !*(rptr + 1))) { /* Full match */
- len = (dnptrs[i] - dnptrs[0]) | 0xC000;
- /* Write pointer */
- *cptr++ = len >> 8;
- if (cptr > eptr)
- return -1;
- *cptr++ = len;
- goto done;
- }
- goto next_dn;
- }
- if (*rptr++ != '.')
- goto next_dn;
- if (len >= 128 + 64) {
- dptr = dnptrs[0] + ((len - 128 - 64) << 8) + *dptr;
- len = *dptr++;
- }
- }
- next_dn: ;
- }
- /* Record label if asked and if space is available and if not too far off */
- if (lastdnptr && (lastdnptr != &dnptrs[i]) && (cptr - dnptrs[0]) < 0xC000) {
- dnptrs[i] = cptr;
- dnptrs[i+1] = NULL;
- }
- }
- /* Write label */
- lptr = cptr++; /* Length byte */
- rptr = (u_char *) exp_dn;
- do {
- if (cptr <= eptr)
- *cptr++ = *rptr;
- } while ((*++rptr != '.') && (*rptr != 0));
- len = rptr - (u_char *) exp_dn;
- if (len > MAXLABEL)
- return -1;
- *lptr = len;
- exp_dn = (char *) rptr;
- if (*exp_dn != 0)
- exp_dn++; /* Skip over . */
- }
- done:
- return cptr - comp_dn;
-}
-
-/*****************************************************************
- *
- dn_skipname
-
- Measures the compressed domain name length and returns it.
- *****************************************************************/
-int dn_skipname(const unsigned char *comp_dn, const unsigned char *eom)
-{
- int len;
- const unsigned char *comp_dn_orig = comp_dn;
-
- do {
- len = *comp_dn++;
- if (len >= (128 + 64)) {
- comp_dn++;
- break;
- }
- if (len > MAXLABEL ||
- (comp_dn += len) > eom)
- return -1;
- } while (len != 0);
-
- return comp_dn - comp_dn_orig;
-}
diff --git a/winsup/cygwin/libc/minires.h b/winsup/cygwin/libc/minires.h
deleted file mode 100644
index cda0b4c..0000000
--- a/winsup/cygwin/libc/minires.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* minires.h. Stub synchronous resolver for Cygwin.
-
- Copyright 2006 Red Hat, Inc.
-
- Written by Pierre A. Humblet <Pierre.Humblet@ieee.org>
-
-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 __INSIDE_CYGWIN_NET__
-
-#include "winsup.h"
-#include <string.h>
-#include <malloc.h>
-#include <stdlib.h>
-#include <netdb.h>
-#include <ctype.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdarg.h>
-#include <sys/unistd.h>
-#include <netdb.h>
-#include <arpa/nameser.h>
-#include <resolv.h>
-
-extern in_addr_t cygwin_inet_addr (const char *);
-extern int cygwin_socket (int, int, int);
-extern int cygwin_bind (int, const struct sockaddr *, socklen_t);
-extern int cygwin_connect (int, const struct sockaddr *, socklen_t);
-extern int cygwin_select (int, fd_set *, fd_set *, fd_set *, struct timeval *);
-extern int cygwin_sendto (int, const void *, size_t, int,
- const struct sockaddr *, socklen_t);
-extern int cygwin_recvfrom (int, void *, size_t, int, struct sockaddr *,
- socklen_t *);
-
-/* Number of elements is an array */
-#define DIM(x) (sizeof(x) / sizeof(*(x)))
-
-/* Definitions to parse the messages */
-#define RD (1<<8) /* Offset in a short */
-#define RA (1<<7)
-#define QR (1<<7) /* Offsets in a char */
-#define TC (1<<1)
-#define ERR_MASK 0xF
-
-/* Type for os specific res_lookup */
-typedef int (os_query_t) (res_state, const char *, int, int, u_char *, int);
-
-/* Special use of state elements */
-#define sockfd _vcsock
-#define mypid _flags
-#define os_query qhook
-#define use_os pfcode
-
-#define DPRINTF(cond, format...) if (cond) minires_dprintf(format)
-
-/* Utility functions */
-void minires_dprintf(const char * format, ...);
-void minires_get_search(char * string, res_state statp);
-void get_dns_info(res_state statp);
diff --git a/winsup/cygwin/libc/nftw.c b/winsup/cygwin/libc/nftw.c
deleted file mode 100644
index bb1c923..0000000
--- a/winsup/cygwin/libc/nftw.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/* $OpenBSD: nftw.c,v 1.4 2004/07/07 16:05:23 millert Exp $ */
-
-/*
- * Copyright (c) 2003, 2004 Todd C. Miller <Todd.Miller@courtesan.com>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Sponsored in part by the Defense Advanced Research Projects
- * Agency (DARPA) and Air Force Research Laboratory, Air Force
- * Materiel Command, USAF, under agreement number F39502-99-1-0512.
- */
-
-#if 0
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$OpenBSD: nftw.c,v 1.4 2004/07/07 16:05:23 millert Exp $";
-#endif /* LIBC_SCCS and not lint */
-#endif
-
-#ifdef __CYGWIN__
-#include "winsup.h"
-#endif
-#include <sys/cdefs.h>
-#if 0
-__FBSDID("$FreeBSD: /repoman/r/ncvs/src/lib/libc/gen/nftw.c,v 1.1.2.1 2004/08/29 06:10:53 tjr Exp $");
-#endif
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <fts.h>
-#include <ftw.h>
-#include <limits.h>
-
-int
-nftw(const char *path, int (*fn)(const char *, const struct __stat64 *, int,
- struct FTW *), int nfds, int ftwflags)
-{
- char * const paths[2] = { (char *)path, NULL };
- struct FTW ftw;
- FTSENT *cur;
- FTS *ftsp;
- int error = 0, ftsflags, fnflag, postorder, sverrno;
-
-#if 0
- /* GLibc allows nfds < 1 and treats it as nfds == 1. Since nfds is
- not used in this OpenBSD version anyway, just ignore it for
- Linux compatibility. */
- /* XXX - nfds is currently unused */
- if (nfds < 1 || nfds > OPEN_MAX) {
- errno = EINVAL;
- return (-1);
- }
-#endif
-
- ftsflags = FTS_COMFOLLOW;
- if (!(ftwflags & FTW_CHDIR))
- ftsflags |= FTS_NOCHDIR;
- if (ftwflags & FTW_MOUNT)
- ftsflags |= FTS_XDEV;
- if (ftwflags & FTW_PHYS)
- ftsflags |= FTS_PHYSICAL;
- else
- ftsflags |= FTS_LOGICAL;
- postorder = (ftwflags & FTW_DEPTH) != 0;
- ftsp = fts_open(paths, ftsflags, NULL);
- if (ftsp == NULL)
- return (-1);
- while ((cur = fts_read(ftsp)) != NULL) {
- switch (cur->fts_info) {
- case FTS_D:
- if (postorder)
- continue;
- fnflag = FTW_D;
- break;
- case FTS_DNR:
- fnflag = FTW_DNR;
- break;
- case FTS_DP:
- if (!postorder)
- continue;
- fnflag = FTW_DP;
- break;
- case FTS_F:
- case FTS_DEFAULT:
- fnflag = FTW_F;
- break;
- case FTS_NS:
- case FTS_NSOK:
- fnflag = FTW_NS;
- break;
- case FTS_SL:
- fnflag = FTW_SL;
- break;
- case FTS_SLNONE:
- fnflag = FTW_SLN;
- break;
- case FTS_DC:
- errno = ELOOP;
- /* FALLTHROUGH */
- default:
- error = -1;
- goto done;
- }
- ftw.base = cur->fts_pathlen - cur->fts_namelen;
- ftw.level = cur->fts_level;
- error = fn(cur->fts_path, cur->fts_statp, fnflag, &ftw);
- if (error != 0)
- break;
- }
-done:
- sverrno = errno;
- if (fts_close(ftsp) != 0 && error == 0)
- error = -1;
- else
- errno = sverrno;
- return (error);
-}
diff --git a/winsup/cygwin/libc/rcmd.cc b/winsup/cygwin/libc/rcmd.cc
deleted file mode 100644
index 843a21a..0000000
--- a/winsup/cygwin/libc/rcmd.cc
+++ /dev/null
@@ -1,782 +0,0 @@
-/*
- * Copyright (c) 1983, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#ifndef __CYGWIN__
-__FBSDID("$FreeBSD$");
-#else
-#define __INSIDE_CYGWIN_NET__
-#include "winsup.h"
-#endif
-
-#ifndef __CYGWIN__
-#include "namespace.h"
-#endif
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <signal.h>
-#include <fcntl.h>
-#include <netdb.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <pwd.h>
-#include <errno.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#ifndef __CYGWIN__
-#include <rpc/rpc.h>
-#endif
-#ifdef YP
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#endif
-#ifndef __CYGWIN__
-#include <arpa/nameser.h>
-#include "un-namespace.h"
-#endif
-
-#ifndef __CYGWIN__
-extern int innetgr( const char *, const char *, const char *, const char * );
-
-#define max(a, b) ((a > b) ? a : b)
-#else
-#include "wininet.h"
-#include "cygwin/in6.h"
-
-#ifndef _PATH_HEQUIV
-# define _PATH_HEQUIV "/etc/hosts.equiv"
-#endif
-
-#define innetgr(a,b,c,d) (0)
-
-extern int rcmdsh(char **, int, const char *, const char *, const char *,
- const char *);
-
-extern "C" {
- int cygwin_accept (int, struct sockaddr *, socklen_t *);
- int cygwin_bindresvport_sa (int, struct sockaddr *);
- int cygwin_connect (int, const struct sockaddr *, socklen_t);
- void cygwin_freeaddrinfo (struct addrinfo *);
- const char * cygwin_gai_strerror (int);
- int cygwin_getaddrinfo (const char *, const char *, const struct addrinfo *,
- struct addrinfo **);
- int cygwin_getnameinfo (const struct sockaddr *, socklen_t, char *, size_t,
- char *, size_t, int);
- struct servent *cygwin_getservbyname (const char *, const char *);
- int cygwin_listen (int, int);
- int cygwin_rresvport_af(int *alport, int family);
- int cygwin_select (int, fd_set *, fd_set *, fd_set *, struct timeval *);
- int cygwin_socket (int, int, int);
- int seteuid32 (__uid32_t);
-}
-#endif
-
-#ifndef __CYGWIN__
-static int __ivaliduser(FILE *, u_int32_t, const char *, const char *);
-static int __ivaliduser_af(FILE *,const void *, const char *, const char *,
- int, int);
-#endif
-static int __ivaliduser_sa(FILE *, const struct sockaddr *, socklen_t,
- const char *, const char *);
-static int __icheckhost(const struct sockaddr *, socklen_t, const char *);
-
-char paddr[NI_MAXHOST];
-
-extern "C" int
-cygwin_rcmd_af(char **ahost, in_port_t rport, const char *locuser,
- const char *remuser, const char *cmd, int *fd2p, int af)
-{
- struct addrinfo hints, *res, *ai;
- struct sockaddr_storage from;
- fd_set reads;
- sigset_t oldmask, newmask;
- pid_t pid;
- int s, aport, lport, timo, error;
- char c;//, *p;
- int refused, nres;
- char num[8];
- static char canonnamebuf[INTERNET_MAX_HOST_NAME_LENGTH + 1]; /* is it proper here? */
-#ifndef __CYGWIN__
- /* call rcmdsh() with specified remote shell if appropriate. */
- if (!issetugid() && (p = getenv("RSH"))) {
- struct servent *sp = cygwin_getservbyname("shell", "tcp");
-
- if (sp && sp->s_port == rport)
- return (rcmdsh(ahost, rport, locuser, remuser,
- cmd, p));
- }
-
- /* use rsh(1) if non-root and remote port is shell. */
- if (geteuid()) {
- struct servent *sp = cygwin_getservbyname("shell", "tcp");
-
- if (sp && sp->s_port == rport)
- return (rcmdsh(ahost, rport, locuser, remuser,
- cmd, NULL));
- }
-#endif
- pid = getpid();
-
- memset(&hints, 0, sizeof(hints));
- hints.ai_flags = AI_CANONNAME;
- hints.ai_family = af;
- hints.ai_socktype = SOCK_STREAM;
- hints.ai_protocol = 0;
- (void)snprintf(num, sizeof(num), "%d", ntohs(rport));
- error = cygwin_getaddrinfo(*ahost, num, &hints, &res);
- if (error) {
- fprintf(stderr, "rcmd: getaddrinfo: %s\n",
- cygwin_gai_strerror(error));
- if (error == EAI_SYSTEM)
- fprintf(stderr, "rcmd: getaddrinfo: %s\n",
- strerror(errno));
- return (-1);
- }
-
- if (res->ai_canonname
- && strlen(res->ai_canonname) + 1 < sizeof(canonnamebuf)) {
- strncpy(canonnamebuf, res->ai_canonname, sizeof(canonnamebuf));
- *ahost = canonnamebuf;
- }
- nres = 0;
- for (ai = res; ai; ai = ai->ai_next)
- nres++;
- ai = res;
- refused = 0;
- sigemptyset(&newmask);
- sigaddset(&newmask, SIGURG);
- sigprocmask(SIG_BLOCK, (const sigset_t *)&newmask, &oldmask);
- for (timo = 1, lport = IPPORT_RESERVED - 1;;) {
- s = cygwin_rresvport_af(&lport, ai->ai_family);
- if (s < 0) {
- if (errno != EAGAIN && ai->ai_next) {
- ai = ai->ai_next;
- continue;
- }
- if (errno == EAGAIN)
- (void)fprintf(stderr,
- "rcmd: socket: All ports in use\n");
- else
- (void)fprintf(stderr, "rcmd: socket: %s\n",
- strerror(errno));
- cygwin_freeaddrinfo(res);
- sigprocmask(SIG_SETMASK, (const sigset_t *)&oldmask,
- NULL);
- return (-1);
- }
- fcntl64(s, F_SETOWN, pid);
- if (cygwin_connect(s, ai->ai_addr, ai->ai_addrlen) >= 0)
- break;
- (void)close(s);
- if (errno == EADDRINUSE) {
- lport--;
- continue;
- }
- if (errno == ECONNREFUSED)
- refused = 1;
- if (ai->ai_next == NULL && (!refused || timo > 16)) {
- (void)fprintf(stderr, "%s: %s\n",
- *ahost, strerror(errno));
- cygwin_freeaddrinfo(res);
- sigprocmask(SIG_SETMASK, (const sigset_t *)&oldmask,
- NULL);
- return (-1);
- }
- if (nres > 1) {
- int oerrno = errno;
-
- cygwin_getnameinfo(ai->ai_addr, ai->ai_addrlen, paddr,
- sizeof(paddr), NULL, 0, NI_NUMERICHOST);
- (void)fprintf(stderr, "connect to address %s: ",
- paddr);
- errno = oerrno;
- perror(0);
- }
- if ((ai = ai->ai_next) == NULL) {
- /* refused && timo <= 16 */
- struct timespec time_to_sleep, time_remaining;
-
- time_to_sleep.tv_sec = timo;
- time_to_sleep.tv_nsec = 0;
- (void)nanosleep(&time_to_sleep, &time_remaining);
- timo *= 2;
- ai = res;
- refused = 0;
- }
- if (nres > 1) {
- cygwin_getnameinfo(ai->ai_addr, ai->ai_addrlen, paddr,
- sizeof(paddr), NULL, 0, NI_NUMERICHOST);
- fprintf(stderr, "Trying %s...\n", paddr);
- }
- }
- lport--;
- if (fd2p == 0) {
- write(s, "", 1);
- lport = 0;
- } else {
- int s2 = cygwin_rresvport_af(&lport, ai->ai_family), s3;
- socklen_t len = ai->ai_addrlen;
- int nfds;
-
- if (s2 < 0)
- goto bad;
- cygwin_listen(s2, 1);
- (void)snprintf(num, sizeof(num), "%d", lport);
- if (write(s, num, strlen(num)+1) != (int)strlen(num)+1) {
- (void)fprintf(stderr,
- "rcmd: write (setting up stderr): %s\n",
- strerror(errno));
- (void)close(s2);
- goto bad;
- }
- nfds = max(s, s2)+1;
- if(nfds > FD_SETSIZE) {
- fprintf(stderr, "rcmd: too many files\n");
- (void)close(s2);
- goto bad;
- }
-again:
- FD_ZERO(&reads);
- FD_SET(s, &reads);
- FD_SET(s2, &reads);
- errno = 0;
- if (cygwin_select(nfds, &reads, 0, 0, 0) < 1 || !FD_ISSET(s2, &reads)){
- if (errno != 0)
- (void)fprintf(stderr,
- "rcmd: select (setting up stderr): %s\n",
- strerror(errno));
- else
- (void)fprintf(stderr,
- "select: protocol failure in circuit setup\n");
- (void)close(s2);
- goto bad;
- }
- s3 = cygwin_accept(s2, (struct sockaddr *)&from, &len);
- switch (from.ss_family) {
- case AF_INET:
- aport = ntohs(((struct sockaddr_in *)&from)->sin_port);
- break;
-#ifdef INET6
- case AF_INET6:
- aport = ntohs(((struct sockaddr_in6 *)&from)->sin6_port);
- break;
-#endif
- default:
- aport = 0; /* error */
- break;
- }
- /*
- * XXX careful for ftp bounce attacks. If discovered, shut them
- * down and check for the real auxiliary channel to connect.
- */
- if (aport == 20) {
- close(s3);
- goto again;
- }
- (void)close(s2);
- if (s3 < 0) {
- (void)fprintf(stderr,
- "rcmd: accept: %s\n", strerror(errno));
- lport = 0;
- goto bad;
- }
- *fd2p = s3;
- if (aport >= IPPORT_RESERVED || aport < IPPORT_RESERVED / 2) {
- (void)fprintf(stderr,
- "socket: protocol failure in circuit setup.\n");
- goto bad2;
- }
- }
- (void)write(s, locuser, strlen(locuser)+1);
- (void)write(s, remuser, strlen(remuser)+1);
- (void)write(s, cmd, strlen(cmd)+1);
- if (read(s, &c, 1) != 1) {
- (void)fprintf(stderr,
- "rcmd: %s: %s\n", *ahost, strerror(errno));
- goto bad2;
- }
- if (c != 0) {
- while (read(s, &c, 1) == 1) {
- (void)write(STDERR_FILENO, &c, 1);
- if (c == '\n')
- break;
- }
- goto bad2;
- }
- sigprocmask(SIG_SETMASK, (const sigset_t *)&oldmask, NULL);
- cygwin_freeaddrinfo(res);
- return (s);
-bad2:
- if (lport)
- (void)close(*fd2p);
-bad:
- (void)close(s);
- sigprocmask(SIG_SETMASK, (const sigset_t *)&oldmask, NULL);
- cygwin_freeaddrinfo(res);
- return (-1);
-}
-
-extern "C" int
-cygwin_rcmd(char **ahost, in_port_t rport, const char *locuser,
- const char *remuser, const char *cmd, int *fd2p)
-{
- return cygwin_rcmd_af(ahost, rport, locuser, remuser, cmd, fd2p,
- AF_INET);
-}
-
-extern "C" int
-cygwin_rresvport_af(int *alport, int family)
-{
- int s;
- struct sockaddr_storage ss;
- u_short *sport;
-
- memset(&ss, 0, sizeof(ss));
- ss.ss_family = family;
- switch (family) {
- case AF_INET:
- sport = &((struct sockaddr_in *)&ss)->sin_port;
- ((struct sockaddr_in *)&ss)->sin_addr.s_addr = INADDR_ANY;
- break;
-#ifdef INET6
- case AF_INET6:
- sport = &((struct sockaddr_in6 *)&ss)->sin6_port;
- ((struct sockaddr_in6 *)&ss)->sin6_addr = in6addr_any;
- break;
-#endif
- default:
- errno = EAFNOSUPPORT;
- return -1;
- }
-
- s = cygwin_socket(ss.ss_family, SOCK_STREAM, 0);
- if (s < 0)
- return (-1);
-#if 0 /* compat_exact_traditional_rresvport_semantics */
- sin.sin_port = htons((u_short)*alport);
- if (_bind(s, (struct sockaddr *)&sin, sizeof(sin)) >= 0)
- return (s);
- if (errno != EADDRINUSE) {
- (void)_close(s);
- return (-1);
- }
-#endif
- *sport = 0;
- if (cygwin_bindresvport_sa(s, (struct sockaddr *)&ss) == -1) {
- (void)close(s);
- return (-1);
- }
- *alport = (int)ntohs(*sport);
- return (s);
-}
-
-extern "C" int
-cygwin_rresvport(int *port)
-{
- return cygwin_rresvport_af(port, AF_INET);
-}
-
-int __check_rhosts_file = 1;
-char *__rcmd_errstr;
-
-/*
- * AF independent extension of iruserok.
- *
- * Returns 0 if ok, -1 if not ok.
- */
-extern "C" int
-iruserok_sa(const void *ra, int rlen, int superuser, const char *ruser,
- const char *luser)
-{
- const char *cp;
- struct __stat64 sbuf;
- struct passwd *pwd;
- FILE *hostf;
- uid_t uid;
- int first;
- char pbuf[MAXPATHLEN];
- const struct sockaddr *raddr;
- struct sockaddr_storage ss;
-
- /* avoid alignment issue */
- if (rlen > (int) sizeof(ss))
- return(-1);
- memcpy(&ss, ra, rlen);
- raddr = (struct sockaddr *)&ss;
-
- first = 1;
- hostf = superuser ? NULL : fopen(_PATH_HEQUIV, "rt");
-again:
- if (hostf) {
- if (__ivaliduser_sa(hostf, raddr, rlen, luser, ruser) == 0) {
- (void)fclose(hostf);
- return (0);
- }
- (void)fclose(hostf);
- }
- if (first == 1 && (__check_rhosts_file || superuser)) {
- first = 0;
- if ((pwd = getpwnam(luser)) == NULL)
- return (-1);
- (void)strcpy(pbuf, pwd->pw_dir);
- (void)strcat(pbuf, "/.rhosts");
-
- /*
- * Change effective uid while opening .rhosts. If root and
- * reading an NFS mounted file system, can't read files that
- * are protected read/write owner only.
- */
- uid = geteuid32();
- (void)seteuid32(pwd->pw_uid);
- hostf = fopen(pbuf, "rt");
- (void)seteuid32(uid);
-
- if (hostf == NULL)
- return (-1);
- /*
- * If not a regular file, or is owned by someone other than
- * user or root or if writeable by anyone but the owner, quit.
- */
- cp = NULL;
- if (lstat64(pbuf, &sbuf) < 0)
- cp = ".rhosts lstat failed";
- else if (!S_ISREG(sbuf.st_mode))
- cp = ".rhosts not regular file";
- else if (fstat64(fileno(hostf), &sbuf) < 0)
- cp = ".rhosts fstat failed";
- else if (sbuf.st_uid && sbuf.st_uid != pwd->pw_uid)
- cp = "bad .rhosts owner";
- else if (sbuf.st_mode & (S_IWGRP|S_IWOTH))
- cp = ".rhosts writeable by other than owner";
- /* If there were any problems, quit. */
- if (cp) {
- __rcmd_errstr = (char *) cp;
- (void)fclose(hostf);
- return (-1);
- }
- goto again;
- }
- return (-1);
-}
-
-/*
- * New .rhosts strategy: We are passed an ip address. We spin through
- * hosts.equiv and .rhosts looking for a match. When the .rhosts only
- * has ip addresses, we don't have to trust a nameserver. When it
- * contains hostnames, we spin through the list of addresses the nameserver
- * gives us and look for a match.
- *
- * Returns 0 if ok, -1 if not ok.
- */
-extern "C" int
-iruserok(unsigned long raddr, int superuser, const char *ruser,
- const char *luser)
-{
- struct sockaddr_in sin;
-
- memset(&sin, 0, sizeof(sin));
- sin.sin_family = AF_INET;
- memcpy(&sin.sin_addr, &raddr, sizeof(sin.sin_addr));
- return iruserok_sa((struct sockaddr *)&sin, sizeof(struct sockaddr_in),
- superuser, ruser, luser);
-}
-
-extern "C" int
-ruserok(const char *rhost, int superuser, const char *ruser, const char *luser)
-{
- struct addrinfo hints, *res, *r;
- int error;
-
- memset(&hints, 0, sizeof(hints));
- hints.ai_family = PF_UNSPEC;
- hints.ai_socktype = SOCK_DGRAM; /*dummy*/
- error = cygwin_getaddrinfo(rhost, "0", &hints, &res);
- if (error)
- return (-1);
-
- for (r = res; r; r = r->ai_next) {
- if (iruserok_sa(r->ai_addr, r->ai_addrlen, superuser, ruser,
- luser) == 0) {
- cygwin_freeaddrinfo(res);
- return (0);
- }
- }
- cygwin_freeaddrinfo(res);
- return (-1);
-}
-
-#ifndef __CYGWIN__
-/*
- * XXX
- * Don't make static, used by lpd(8).
- *
- * Returns 0 if ok, -1 if not ok.
- */
-static int
-__ivaliduser(FILE *hostf, u_int32_t raddr, const char *luser, const char *ruser)
-{
- struct sockaddr_in sin;
-
- memset(&sin, 0, sizeof(sin));
- sin.sin_family = AF_INET;
- memcpy(&sin.sin_addr, &raddr, sizeof(sin.sin_addr));
- return __ivaliduser_sa(hostf, (struct sockaddr *)&sin,
- sizeof(struct sockaddr_in), luser, ruser);
-}
-
-/*
- * Returns 0 if ok, -1 if not ok.
- *
- * XXX obsolete API.
- */
-static int
-__ivaliduser_af(FILE *hostf, const void *raddr, const char *luser,
- const char *ruser, int af, int len)
-{
- struct sockaddr *sa = NULL;
- struct sockaddr_in *sin = NULL;
-#ifdef INET6
- struct sockaddr_in6 *sin6 = NULL;
-#endif
- struct sockaddr_storage ss;
- int salen = 0;
-
- memset(&ss, 0, sizeof(ss));
- switch (af) {
- case AF_INET:
- if (len != sizeof(sin->sin_addr))
- return -1;
- sin = (struct sockaddr_in *)&ss;
- sin->sin_family = AF_INET;
- salen = sizeof(struct sockaddr_in);
- memcpy(&sin->sin_addr, raddr, sizeof(sin->sin_addr));
- break;
-#ifdef INET6
- case AF_INET6:
- if (len != sizeof(sin6->sin6_addr))
- return -1;
- /* you will lose scope info */
- sin6 = (struct sockaddr_in6 *)&ss;
- sin6->sin6_family = AF_INET6;
- salen = sizeof(struct sockaddr_in6);
- memcpy(&sin6->sin6_addr, raddr, sizeof(sin6->sin6_addr));
- break;
-#endif
- default:
- return -1;
- }
-
- sa = (struct sockaddr *)&ss;
- return __ivaliduser_sa(hostf, sa, salen, luser, ruser);
-}
-#endif
-
-static int
-__ivaliduser_sa(FILE *hostf, const struct sockaddr *raddr, socklen_t salen,
- const char *luser, const char *ruser)
-{
- char *user, *p;
- int ch;
- char buf[MAXHOSTNAMELEN + 128]; /* host + login */
- char hname[MAXHOSTNAMELEN];
- /* Presumed guilty until proven innocent. */
- int userok = 0, hostok = 0;
-#ifdef YP
- char *ypdomain;
-
- if (yp_get_default_domain(&ypdomain))
- ypdomain = NULL;
-#else
-#define ypdomain NULL
-#endif
- /* We need to get the damn hostname back for netgroup matching. */
- if (cygwin_getnameinfo(raddr, salen, hname, sizeof(hname), NULL, 0,
- NI_NAMEREQD) != 0)
- hname[0] = '\0';
-
- while (fgets(buf, sizeof(buf), hostf)) {
- p = buf;
- /* Skip lines that are too long. */
- if (strchr(p, '\n') == NULL) {
- while ((ch = getc(hostf)) != '\n' && ch != EOF);
- continue;
- }
- if (*p == '\n' || *p == '#') {
- /* comment... */
- continue;
- }
- while (*p != '\n' && *p != ' ' && *p != '\t' && *p != '\0') {
- *p = isupper((unsigned char)*p) ? tolower((unsigned char)*p) : *p;
- p++;
- }
- if (*p == ' ' || *p == '\t') {
- *p++ = '\0';
- while (*p == ' ' || *p == '\t')
- p++;
- user = p;
- while (*p != '\n' && *p != ' ' &&
- *p != '\t' && *p != '\0')
- p++;
- } else
- user = p;
- *p = '\0';
- /*
- * Do +/- and +@/-@ checking. This looks really nasty,
- * but it matches SunOS's behavior so far as I can tell.
- */
- switch(buf[0]) {
- case '+':
- if (!buf[1]) { /* '+' matches all hosts */
- hostok = 1;
- break;
- }
- if (buf[1] == '@') /* match a host by netgroup */
- hostok = hname[0] != '\0' &&
- innetgr(&buf[2], hname, NULL, ypdomain);
- else /* match a host by addr */
- hostok = __icheckhost(raddr, salen,
- (char *)&buf[1]);
- break;
- case '-': /* reject '-' hosts and all their users */
- if (buf[1] == '@') {
- if (hname[0] == '\0' ||
- innetgr(&buf[2], hname, NULL, ypdomain))
- return(-1);
- } else {
- if (__icheckhost(raddr, salen,
- (char *)&buf[1]))
- return(-1);
- }
- break;
- default: /* if no '+' or '-', do a simple match */
- hostok = __icheckhost(raddr, salen, buf);
- break;
- }
- switch(*user) {
- case '+':
- if (!*(user+1)) { /* '+' matches all users */
- userok = 1;
- break;
- }
- if (*(user+1) == '@') /* match a user by netgroup */
- userok = innetgr(user+2, NULL, ruser, ypdomain);
- else /* match a user by direct specification */
- userok = !(strcmp(ruser, user+1));
- break;
- case '-': /* if we matched a hostname, */
- if (hostok) { /* check for user field rejections */
- if (!*(user+1))
- return(-1);
- if (*(user+1) == '@') {
- if (innetgr(user+2, NULL,
- ruser, ypdomain))
- return(-1);
- } else {
- if (!strcmp(ruser, user+1))
- return(-1);
- }
- }
- break;
- default: /* no rejections: try to match the user */
- if (hostok)
- userok = !(strcmp(ruser,*user ? user : luser));
- break;
- }
- if (hostok && userok)
- return(0);
- }
- return (-1);
-}
-
-/*
- * Returns "true" if match, 0 if no match.
- */
-static int
-__icheckhost(const struct sockaddr *raddr, socklen_t salen, const char *lhost)
-{
- struct sockaddr_in sin;
- struct sockaddr_in6 *sin6;
- struct addrinfo hints, *res, *r;
- int error;
- char h1[NI_MAXHOST], h2[NI_MAXHOST];
-
- if (raddr->sa_family == AF_INET6) {
- sin6 = (struct sockaddr_in6 *)raddr;
- if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) {
- memset(&sin, 0, sizeof(sin));
- sin.sin_family = AF_INET;
- memcpy(&sin.sin_addr, &sin6->sin6_addr.s6_addr[12],
- sizeof(sin.sin_addr));
- raddr = (struct sockaddr *)&sin;
- salen = sizeof(struct sockaddr_in);
- }
- }
-
- h1[0] = '\0';
- if (cygwin_getnameinfo(raddr, salen, h1, sizeof(h1), NULL, 0,
- NI_NUMERICHOST) != 0)
- return (0);
-
- /* Resolve laddr into sockaddr */
- memset(&hints, 0, sizeof(hints));
- hints.ai_family = raddr->sa_family;
- hints.ai_socktype = SOCK_DGRAM; /*XXX dummy*/
- res = NULL;
- error = cygwin_getaddrinfo(lhost, "0", &hints, &res);
- if (error)
- return (0);
-
- for (r = res; r ; r = r->ai_next) {
- h2[0] = '\0';
- if (cygwin_getnameinfo(r->ai_addr, r->ai_addrlen, h2, sizeof(h2),
- NULL, 0, NI_NUMERICHOST) != 0)
- continue;
- if (strcmp(h1, h2) == 0) {
- cygwin_freeaddrinfo(res);
- return (1);
- }
- }
-
- /* No match. */
- cygwin_freeaddrinfo(res);
- return (0);
-}
diff --git a/winsup/cygwin/libc/rexec.cc b/winsup/cygwin/libc/rexec.cc
deleted file mode 100644
index ca253f8..0000000
--- a/winsup/cygwin/libc/rexec.cc
+++ /dev/null
@@ -1,416 +0,0 @@
-/*
- * Copyright (c) 1980, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-/* CV 2006-07-04: Tweaked for inclusion into Cygwin. */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rexec.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#ifdef __CYGWIN__
-#include "winsup.h"
-#include "sigproc.h"
-#include "cygtls.h"
-#include <wininet.h>
-#endif
-
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <sys/socket.h>
-#include <sys/param.h>
-#include <sys/stat.h>
-
-#include <netinet/in.h>
-
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <netdb.h>
-#include <errno.h>
-#include <ctype.h>
-#include <err.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-extern "C" {
- int cygwin_accept (int, struct sockaddr *, socklen_t *);
- int cygwin_connect (int, const struct sockaddr *, socklen_t);
- int cygwin_getsockname (int, struct sockaddr *, socklen_t *);
- void cygwin_herror (const char *);
- int cygwin_listen (int, int);
- int cygwin_socket (int, int, int);
-}
-
-/*
- * Options and other state info.
- */
-struct macel {
- char mac_name[9]; /* macro name */
- char *mac_start; /* start of macro in macbuf */
- char *mac_end; /* end of macro in macbuf */
-};
-
-int macnum; /* number of defined macros */
-struct macel macros[16];
-char macbuf[4096];
-
-static FILE *cfile;
-
-#define DEFAULT 1
-#define LOGIN 2
-#define PASSWD 3
-#define ACCOUNT 4
-#define MACDEF 5
-#define ID 10
-#define MACH 11
-
-static char tokval[100];
-
-static struct toktab {
- const char *tokstr;
- int tval;
-} toktab[]= {
- { "default", DEFAULT },
- { "login", LOGIN },
- { "password", PASSWD },
- { "passwd", PASSWD },
- { "account", ACCOUNT },
- { "machine", MACH },
- { "macdef", MACDEF },
- { NULL, 0 }
-};
-
-static int
-token()
-{
- char *cp;
- int c;
- struct toktab *t;
-
- if (feof(cfile) || ferror(cfile))
- return (0);
- while ((c = getc(cfile)) != EOF &&
- (c == '\n' || c == '\t' || c == ' ' || c == ','))
- continue;
- if (c == EOF)
- return (0);
- cp = tokval;
- if (c == '"') {
- while ((c = getc(cfile)) != EOF && c != '"') {
- if (c == '\\')
- c = getc(cfile);
- *cp++ = c;
- }
- } else {
- *cp++ = c;
- while ((c = getc(cfile)) != EOF
- && c != '\n' && c != '\t' && c != ' ' && c != ',') {
- if (c == '\\')
- c = getc(cfile);
- *cp++ = c;
- }
- }
- *cp = 0;
- if (tokval[0] == 0)
- return (0);
- for (t = toktab; t->tokstr; t++)
- if (!strcmp(t->tokstr, tokval))
- return (t->tval);
- return (ID);
-}
-
-static int
-ruserpass(const char *host, char **aname, char **apass, char **aacct)
-{
- const char *hdir;
- char buf[BUFSIZ], *tmp;
- char myname[INTERNET_MAX_HOST_NAME_LENGTH + 1];
- const char *mydomain;
- int t, i, c, usedefault = 0;
- struct stat stb;
-
- hdir = getenv("HOME");
- if (hdir == NULL)
- hdir = ".";
- if (strlen(hdir) + 8 > sizeof(buf))
- return (0);
- (void) sprintf(buf, "%s/.netrc", hdir);
- cfile = fopen(buf, "r");
- if (cfile == NULL) {
- if (errno != ENOENT)
- warn("%s", buf);
- return (0);
- }
- if (cygwin_gethostname(myname, sizeof(myname)) < 0)
- myname[0] = '\0';
- if ((mydomain = strchr(myname, '.')) == NULL)
- mydomain = "";
-next:
- while ((t = token())) switch(t) {
-
- case DEFAULT:
- usedefault = 1;
- /* FALL THROUGH */
-
- case MACH:
- if (!usedefault) {
- if (token() != ID)
- continue;
- /*
- * Allow match either for user's input host name
- * or official hostname. Also allow match of
- * incompletely-specified host in local domain.
- */
- if (strcasecmp(host, tokval) == 0)
- goto match;
- if ((tmp = strchr(host, '.')) != NULL &&
- strcasecmp(tmp, mydomain) == 0 &&
- strncasecmp(host, tokval, tmp - host) == 0 &&
- tokval[tmp - host] == '\0')
- goto match;
- continue;
- }
- match:
- while ((t = token()) && t != MACH && t != DEFAULT) switch(t) {
-
- case LOGIN:
- if (token()) {
- if (*aname == 0) {
- *aname = (char *) malloc((unsigned) strlen(tokval) + 1);
- (void) strcpy(*aname, tokval);
- } else {
- if (strcmp(*aname, tokval))
- goto next;
- }
- }
- break;
- case PASSWD:
- if ((*aname == 0 || strcmp(*aname, "anonymous")) &&
- fstat(fileno(cfile), &stb) >= 0 &&
- (stb.st_mode & 077) != 0) {
- warnx("Error: .netrc file is readable by others.");
- warnx("Remove password or make file unreadable by others.");
- goto bad;
- }
- if (token() && *apass == 0) {
- *apass = (char *) malloc((unsigned) strlen(tokval) + 1);
- (void) strcpy(*apass, tokval);
- }
- break;
- case ACCOUNT:
- if (fstat(fileno(cfile), &stb) >= 0
- && (stb.st_mode & 077) != 0) {
- warnx("Error: .netrc file is readable by others.");
- warnx("Remove account or make file unreadable by others.");
- goto bad;
- }
- if (token() && aacct && *aacct == 0) {
- *aacct = (char *) malloc((unsigned) strlen(tokval) + 1);
- (void) strcpy(*aacct, tokval);
- }
- break;
- case MACDEF:
- while ((c=getc(cfile)) != EOF &&
- (c == ' ' || c == '\t'))
- ;
- if (c == EOF || c == '\n') {
- printf("Missing macdef name argument.\n");
- goto bad;
- }
- if (macnum == 16) {
- printf("Limit of 16 macros have already been defined\n");
- goto bad;
- }
- tmp = macros[macnum].mac_name;
- *tmp++ = c;
- for (i=0; i < 8 && (c=getc(cfile)) != EOF &&
- !isspace(c); ++i) {
- *tmp++ = c;
- }
- if (c == EOF) {
- printf("Macro definition missing null line terminator.\n");
- goto bad;
- }
- *tmp = '\0';
- if (c != '\n') {
- while ((c=getc(cfile)) != EOF && c != '\n');
- }
- if (c == EOF) {
- printf("Macro definition missing null line terminator.\n");
- goto bad;
- }
- if (macnum == 0) {
- macros[macnum].mac_start = macbuf;
- }
- else {
- macros[macnum].mac_start = macros[macnum-1].mac_end + 1;
- }
- tmp = macros[macnum].mac_start;
- while (tmp != macbuf + 4096) {
- if ((c=getc(cfile)) == EOF) {
- printf("Macro definition missing null line terminator.\n");
- goto bad;
- }
- *tmp = c;
- if (*tmp == '\n') {
- if (*(tmp-1) == '\0') {
- macros[macnum++].mac_end = tmp - 1;
- break;
- }
- *tmp = '\0';
- }
- tmp++;
- }
- if (tmp == macbuf + 4096) {
- printf("4K macro buffer exceeded\n");
- goto bad;
- }
- break;
- default:
- warnx("Unknown .netrc keyword %s", tokval);
- break;
- }
- goto done;
- }
-done:
- (void) fclose(cfile);
- return (0);
-bad:
- (void) fclose(cfile);
- return (-1);
-}
-
-extern "C" int
-cygwin_rexec (char **ahost, unsigned short rport, char *name, char *pass,
- char *cmd, int *fd2p)
-{
- struct sockaddr_in sin, sin2, from;
- struct hostent *hp;
- u_short port = 0;
- int s, timo = 1, s3;
- char c;
- char ahostbuf[INTERNET_MAX_HOST_NAME_LENGTH + 1];
-
- sig_dispatch_pending ();
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- hp = cygwin_gethostbyname(*ahost);
- if (hp == 0) {
- cygwin_herror(*ahost);
- return (-1);
- }
- *ahost = strcpy (ahostbuf, hp->h_name);
- ruserpass(hp->h_name, &name, &pass, NULL);
- if (!name)
- name = getlogin ();
- if (!pass)
- pass = almost_null;
-retry:
- s = cygwin_socket(AF_INET, SOCK_STREAM, 0);
- if (s < 0) {
- perror("rexec: socket");
- return (-1);
- }
- sin.sin_family = hp->h_addrtype;
- sin.sin_port = rport;
- bcopy(hp->h_addr, (caddr_t)&sin.sin_addr, hp->h_length);
- if (cygwin_connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
- if (errno == ECONNREFUSED && timo <= 16) {
- (void) close(s);
- sleep(timo);
- timo *= 2;
- goto retry;
- }
- perror(hp->h_name);
- return (-1);
- }
- if (fd2p == 0) {
- (void) write(s, "", 1);
- } else {
- char num[8];
- int s2, sin2len;
-
- s2 = cygwin_socket(AF_INET, SOCK_STREAM, 0);
- if (s2 < 0) {
- (void) close(s);
- return (-1);
- }
- cygwin_listen(s2, 1);
- sin2len = sizeof (sin2);
- if (cygwin_getsockname(s2, (struct sockaddr *)&sin2, &sin2len) < 0 ||
- sin2len != sizeof (sin2)) {
- perror("getsockname");
- (void) close(s2);
- goto bad;
- }
- port = ntohs((u_short)sin2.sin_port);
- (void) sprintf(num, "%u", port);
- (void) write(s, num, strlen(num)+1);
- { int len = sizeof (from);
- s3 = cygwin_accept(s2, (struct sockaddr *)&from, &len);
- close(s2);
- if (s3 < 0) {
- perror("accept");
- port = 0;
- goto bad;
- }
- }
- *fd2p = s3;
- }
- (void) write(s, name, strlen(name) + 1);
- /* should public key encypt the password here */
- (void) write(s, pass, strlen(pass) + 1);
- (void) write(s, cmd, strlen(cmd) + 1);
- if (read(s, &c, 1) != 1) {
- perror(*ahost);
- goto bad;
- }
- if (c != 0) {
- while (read(s, &c, 1) == 1) {
- (void) write(2, &c, 1);
- if (c == '\n')
- break;
- }
- goto bad;
- }
- return (s);
-bad:
- if (port)
- (void) close(*fd2p);
- (void) close(s);
- return (-1);
-}
diff --git a/winsup/cygwin/libc/strptime.cc b/winsup/cygwin/libc/strptime.cc
deleted file mode 100644
index e2f710a..0000000
--- a/winsup/cygwin/libc/strptime.cc
+++ /dev/null
@@ -1,428 +0,0 @@
-/* $NetBSD: strptime.c,v 1.28 2008/04/28 20:23:01 martin Exp $ */
-
-/*-
- * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code was contributed to The NetBSD Foundation by Klaus Klein.
- * Heavily optimised by David Laight
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: strptime.c,v 1.28 2008/04/28 20:23:01 martin Exp $");
-#endif
-
-#ifdef __CYGWIN__
-#include "winsup.h"
-#else
-#include "namespace.h"
-#include <sys/localedef.h>
-#endif
-#include <ctype.h>
-#include <locale.h>
-#include <string.h>
-#include <time.h>
-#include <tzfile.h>
-
-#ifdef __weak_alias
-__weak_alias(strptime,_strptime)
-#endif
-
-#ifdef __CYGWIN__
-typedef struct {
- const char *abday[7];
- const char *day[7];
- const char *abmon[12];
- const char *mon[12];
- const char *am_pm[2];
- const char *d_t_fmt;
- const char *d_fmt;
- const char *t_fmt;
- const char *t_fmt_ampm;
-} _TimeLocale;
-
-_TimeLocale _DefaultTimeLocale =
-{
- {
- "Sun","Mon","Tue","Wed","Thu","Fri","Sat",
- },
- {
- "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
- "Friday", "Saturday"
- },
- {
- "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
- },
- {
- "January", "February", "March", "April", "May", "June", "July",
- "August", "September", "October", "November", "December"
- },
- {
- "AM", "PM"
- },
- "%a %b %e %H:%M:%S %Y",
- "%m/%d/%y",
- "%H:%M:%S",
- "%I:%M:%S %p"
-};
-
-_TimeLocale *_CurrentTimeLocale = &_DefaultTimeLocale;
-#endif
-
-#define _ctloc(x) (_CurrentTimeLocale->x)
-
-/*
- * We do not implement alternate representations. However, we always
- * check whether a given modifier is allowed for a certain conversion.
- */
-#define ALT_E 0x01
-#define ALT_O 0x02
-#define LEGAL_ALT(x) { if (alt_format & ~(x)) return NULL; }
-
-static const char gmt[4] = { "GMT" };
-
-static const u_char *conv_num(const unsigned char *, int *, uint, uint);
-static const u_char *find_string(const u_char *, int *, const char * const *,
- const char * const *, int);
-
-
-char *
-strptime(const char *buf, const char *fmt, struct tm *tm)
-{
- unsigned char c;
- const unsigned char *bp;
- int alt_format, i, split_year = 0;
- const char *new_fmt;
-
- bp = (const u_char *)buf;
-
- while (bp != NULL && (c = *fmt++) != '\0') {
- /* Clear `alternate' modifier prior to new conversion. */
- alt_format = 0;
- i = 0;
-
- /* Eat up white-space. */
- if (isspace(c)) {
- while (isspace(*bp))
- bp++;
- continue;
- }
-
- if (c != '%')
- goto literal;
-
-
-again: switch (c = *fmt++) {
- case '%': /* "%%" is converted to "%". */
-literal:
- if (c != *bp++)
- return NULL;
- LEGAL_ALT(0);
- continue;
-
- /*
- * "Alternative" modifiers. Just set the appropriate flag
- * and start over again.
- */
- case 'E': /* "%E?" alternative conversion modifier. */
- LEGAL_ALT(0);
- alt_format |= ALT_E;
- goto again;
-
- case 'O': /* "%O?" alternative conversion modifier. */
- LEGAL_ALT(0);
- alt_format |= ALT_O;
- goto again;
-
- /*
- * "Complex" conversion rules, implemented through recursion.
- */
- case 'c': /* Date and time, using the locale's format. */
- new_fmt = _ctloc(d_t_fmt);
- goto recurse;
-
- case 'D': /* The date as "%m/%d/%y". */
- new_fmt = "%m/%d/%y";
- LEGAL_ALT(0);
- goto recurse;
-
- case 'F': /* The date as "%Y-%m-%d". */
- new_fmt = "%Y-%m-%d";
- LEGAL_ALT(0);
- goto recurse;
-
- case 'R': /* The time as "%H:%M". */
- new_fmt = "%H:%M";
- LEGAL_ALT(0);
- goto recurse;
-
- case 'r': /* The time in 12-hour clock representation. */
- new_fmt =_ctloc(t_fmt_ampm);
- LEGAL_ALT(0);
- goto recurse;
-
- case 'T': /* The time as "%H:%M:%S". */
- new_fmt = "%H:%M:%S";
- LEGAL_ALT(0);
- goto recurse;
-
- case 'X': /* The time, using the locale's format. */
- new_fmt =_ctloc(t_fmt);
- goto recurse;
-
- case 'x': /* The date, using the locale's format. */
- new_fmt =_ctloc(d_fmt);
- recurse:
- bp = (const u_char *)strptime((const char *)bp,
- new_fmt, tm);
- LEGAL_ALT(ALT_E);
- continue;
-
- /*
- * "Elementary" conversion rules.
- */
- case 'A': /* The day of week, using the locale's form. */
- case 'a':
- bp = find_string(bp, &tm->tm_wday, _ctloc(day),
- _ctloc(abday), 7);
- LEGAL_ALT(0);
- continue;
-
- case 'B': /* The month, using the locale's form. */
- case 'b':
- case 'h':
- bp = find_string(bp, &tm->tm_mon, _ctloc(mon),
- _ctloc(abmon), 12);
- LEGAL_ALT(0);
- continue;
-
- case 'C': /* The century number. */
- i = 20;
- bp = conv_num(bp, &i, 0, 99);
-
- i = i * 100 - TM_YEAR_BASE;
- if (split_year)
- i += tm->tm_year % 100;
- split_year = 1;
- tm->tm_year = i;
- LEGAL_ALT(ALT_E);
- continue;
-
- case 'd': /* The day of month. */
- case 'e':
- bp = conv_num(bp, &tm->tm_mday, 1, 31);
- LEGAL_ALT(ALT_O);
- continue;
-
- case 'k': /* The hour (24-hour clock representation). */
- LEGAL_ALT(0);
- /* FALLTHROUGH */
- case 'H':
- bp = conv_num(bp, &tm->tm_hour, 0, 23);
- LEGAL_ALT(ALT_O);
- continue;
-
- case 'l': /* The hour (12-hour clock representation). */
- LEGAL_ALT(0);
- /* FALLTHROUGH */
- case 'I':
- bp = conv_num(bp, &tm->tm_hour, 1, 12);
- if (tm->tm_hour == 12)
- tm->tm_hour = 0;
- LEGAL_ALT(ALT_O);
- continue;
-
- case 'j': /* The day of year. */
- i = 1;
- bp = conv_num(bp, &i, 1, 366);
- tm->tm_yday = i - 1;
- LEGAL_ALT(0);
- continue;
-
- case 'M': /* The minute. */
- bp = conv_num(bp, &tm->tm_min, 0, 59);
- LEGAL_ALT(ALT_O);
- continue;
-
- case 'm': /* The month. */
- i = 1;
- bp = conv_num(bp, &i, 1, 12);
- tm->tm_mon = i - 1;
- LEGAL_ALT(ALT_O);
- continue;
-
- case 'p': /* The locale's equivalent of AM/PM. */
- bp = find_string(bp, &i, _ctloc(am_pm), NULL, 2);
- if (tm->tm_hour > 11)
- return NULL;
- tm->tm_hour += i * 12;
- LEGAL_ALT(0);
- continue;
-
- case 'S': /* The seconds. */
- bp = conv_num(bp, &tm->tm_sec, 0, 61);
- LEGAL_ALT(ALT_O);
- continue;
-
- case 'U': /* The week of year, beginning on sunday. */
- case 'W': /* The week of year, beginning on monday. */
- /*
- * XXX This is bogus, as we can not assume any valid
- * information present in the tm structure at this
- * point to calculate a real value, so just check the
- * range for now.
- */
- bp = conv_num(bp, &i, 0, 53);
- LEGAL_ALT(ALT_O);
- continue;
-
- case 'w': /* The day of week, beginning on sunday. */
- bp = conv_num(bp, &tm->tm_wday, 0, 6);
- LEGAL_ALT(ALT_O);
- continue;
-
- case 'Y': /* The year. */
- i = TM_YEAR_BASE; /* just for data sanity... */
- bp = conv_num(bp, &i, 0, 9999);
- tm->tm_year = i - TM_YEAR_BASE;
- LEGAL_ALT(ALT_E);
- continue;
-
- case 'y': /* The year within 100 years of the epoch. */
- /* LEGAL_ALT(ALT_E | ALT_O); */
- bp = conv_num(bp, &i, 0, 99);
-
- if (split_year)
- /* preserve century */
- i += (tm->tm_year / 100) * 100;
- else {
- split_year = 1;
- if (i <= 68)
- i = i + 2000 - TM_YEAR_BASE;
- else
- i = i + 1900 - TM_YEAR_BASE;
- }
- tm->tm_year = i;
- continue;
-
- case 'Z':
- tzset();
- if (strncmp((const char *)bp, gmt, 3) == 0) {
- tm->tm_isdst = 0;
-#ifdef TM_GMTOFF
- tm->TM_GMTOFF = 0;
-#endif
-#ifdef TM_ZONE
- tm->TM_ZONE = gmt;
-#endif
- bp += 3;
- } else {
- const unsigned char *ep;
-
- ep = find_string(bp, &i,
- (const char * const *)tzname,
- NULL, 2);
- if (ep != NULL) {
- tm->tm_isdst = i;
-#ifdef TM_GMTOFF
- tm->TM_GMTOFF = -(timezone);
-#endif
-#ifdef TM_ZONE
- tm->TM_ZONE = tzname[i];
-#endif
- }
- bp = ep;
- }
- continue;
-
- /*
- * Miscellaneous conversions.
- */
- case 'n': /* Any kind of white-space. */
- case 't':
- while (isspace(*bp))
- bp++;
- LEGAL_ALT(0);
- continue;
-
-
- default: /* Unknown/unsupported conversion. */
- return NULL;
- }
- }
-
- return (char *) bp;
-}
-
-
-static const u_char *
-conv_num(const unsigned char *buf, int *dest, uint llim, uint ulim)
-{
- uint result = 0;
- unsigned char ch;
-
- /* The limit also determines the number of valid digits. */
- uint rulim = ulim;
-
- ch = *buf;
- if (ch < '0' || ch > '9')
- return NULL;
-
- do {
- result *= 10;
- result += ch - '0';
- rulim /= 10;
- ch = *++buf;
- } while ((result * 10 <= ulim) && rulim && ch >= '0' && ch <= '9');
-
- if (result < llim || result > ulim)
- return NULL;
-
- *dest = result;
- return buf;
-}
-
-static const u_char *
-find_string(const u_char *bp, int *tgt, const char * const *n1,
- const char * const *n2, int c)
-{
- int i;
- unsigned int len;
-
- /* check full name - then abbreviated ones */
- for (; n1 != NULL; n1 = n2, n2 = NULL) {
- for (i = 0; i < c; i++, n1++) {
- len = strlen(*n1);
- if (strncasecmp(*n1, (const char *)bp, len) == 0) {
- *tgt = i;
- return bp + len;
- }
- }
- }
-
- /* Nothing matched */
- return NULL;
-}
diff --git a/winsup/cygwin/libc/xsique.cc b/winsup/cygwin/libc/xsique.cc
deleted file mode 100644
index 9e2f76e..0000000
--- a/winsup/cygwin/libc/xsique.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-/* xsique.cc. XSI insque and remque functions.
-
- Copyright 2007 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <search.h>
-
-extern "C" void
-insque (void *velement, void *vpred)
-{
- if (!velement)
- return;
-
- struct qelem *element = (struct qelem *) velement;
- struct qelem *pred = (struct qelem *) vpred;
- struct qelem *succ;
-
- if (pred)
- {
- if ((succ = element->q_forw = pred->q_forw))
- succ->q_back = element;
- pred->q_forw = element;
- }
- else
- element->q_forw = NULL;
- element->q_back = pred;
-}
-
-extern "C" void
-remque (void *velement)
-{
- if (!velement)
- return;
-
- struct qelem *pred = ((struct qelem *) velement)->q_back;
- struct qelem *succ = ((struct qelem *) velement)->q_forw;
-
- if (succ)
- succ->q_back = pred;
- if (pred)
- pred->q_forw = succ;
-}
-
diff --git a/winsup/cygwin/localtime.cc b/winsup/cygwin/localtime.cc
deleted file mode 100644
index 3d5b29c..0000000
--- a/winsup/cygwin/localtime.cc
+++ /dev/null
@@ -1,2173 +0,0 @@
-/*
-** This file is in the public domain, so clarified as of
-** 1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).
-*/
-/* Temporarily merged private.h and tzfile.h for ease of management - DJ */
-
-#include "winsup.h"
-#include "cygerrno.h"
-#include "sync.h"
-#define STD_INSPIRED
-#define lint
-
-#define USG_COMPAT
-
-#ifndef lint
-#ifndef NOID
-static char elsieid[] = "@(#)localtime.c 7.66";
-#endif /* !defined NOID */
-#endif /* !defined lint */
-
-/*
-** Leap second handling from Bradley White (bww@k.gp.cs.cmu.edu).
-** POSIX-style TZ environment variable handling from Guy Harris
-** (guy@auspex.com).
-*/
-
-/*LINTLIBRARY*/
-
-#ifndef PRIVATE_H
-
-#define PRIVATE_H
-
-/*
-** This file is in the public domain, so clarified as of
-** 1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).
-*/
-
-/*
-** This header is for use ONLY with the time conversion code.
-** There is no guarantee that it will remain unchanged,
-** or that it will remain at all.
-** Do NOT copy it to any system include directory.
-** Thank you!
-*/
-
-/*
-** ID
-*/
-
-#ifndef lint
-#ifndef NOID
-static char privatehid[] = "@(#)private.h 7.48";
-#endif /* !defined NOID */
-#endif /* !defined lint */
-
-/*
-** Defaults for preprocessor symbols.
-** You can override these in your C compiler options, e.g. `-DHAVE_ADJTIME=0'.
-*/
-
-#ifndef HAVE_ADJTIME
-#define HAVE_ADJTIME 1
-#endif /* !defined HAVE_ADJTIME */
-
-#ifndef HAVE_GETTEXT
-#define HAVE_GETTEXT 0
-#endif /* !defined HAVE_GETTEXT */
-
-#ifndef HAVE_SETTIMEOFDAY
-#define HAVE_SETTIMEOFDAY 3
-#endif /* !defined HAVE_SETTIMEOFDAY */
-
-#ifndef HAVE_STRERROR
-#define HAVE_STRERROR 0
-#endif /* !defined HAVE_STRERROR */
-
-#ifndef HAVE_SYMLINK
-#define HAVE_SYMLINK 1
-#endif /* !defined HAVE_SYMLINK */
-
-#ifndef HAVE_UNISTD_H
-#define HAVE_UNISTD_H 1
-#endif /* !defined HAVE_UNISTD_H */
-
-#ifndef HAVE_UTMPX_H
-#define HAVE_UTMPX_H 0
-#endif /* !defined HAVE_UTMPX_H */
-
-#ifndef LOCALE_HOME
-#define LOCALE_HOME "/usr/lib/locale"
-#endif /* !defined LOCALE_HOME */
-
-/*
-** Nested includes
-*/
-
-#include "stdio.h"
-#include "limits.h" /* for CHAR_BIT */
-#include "stdlib.h"
-
-#if HAVE_GETTEXT - 0
-#endif /* HAVE_GETTEXT - 0 */
-
-#if HAVE_UNISTD_H - 0
-#include "unistd.h" /* for F_OK and R_OK */
-#endif /* HAVE_UNISTD_H - 0 */
-
-#if !(HAVE_UNISTD_H - 0)
-#ifndef F_OK
-#define F_OK 0
-#endif /* !defined F_OK */
-#ifndef R_OK
-#define R_OK 4
-#endif /* !defined R_OK */
-#endif /* !(HAVE_UNISTD_H - 0) */
-
-/* Unlike <ctype.h>'s isdigit, this also works if c < 0 | c > UCHAR_MAX. */
-#define is_digit(c) ((unsigned)(c) - '0' <= 9)
-
-/*
-** Workarounds for compilers/systems.
-*/
-
-/*
-** SunOS 4.1.1 cc lacks const.
-*/
-
-#ifndef const
-#ifndef __STDC__
-#define const
-#endif /* !defined __STDC__ */
-#endif /* !defined const */
-
-/*
-** SunOS 4.1.1 cc lacks prototypes.
-*/
-
-#ifndef P
-#ifdef __STDC__
-#define P(x) x
-#endif /* defined __STDC__ */
-#ifndef __STDC__
-#define P(x) ()
-#endif /* !defined __STDC__ */
-#endif /* !defined P */
-
-/*
-** SunOS 4.1.1 headers lack EXIT_SUCCESS.
-*/
-
-#ifndef EXIT_SUCCESS
-#define EXIT_SUCCESS 0
-#endif /* !defined EXIT_SUCCESS */
-
-/*
-** SunOS 4.1.1 headers lack EXIT_FAILURE.
-*/
-
-#ifndef EXIT_FAILURE
-#define EXIT_FAILURE 1
-#endif /* !defined EXIT_FAILURE */
-
-/*
-** SunOS 4.1.1 headers lack FILENAME_MAX.
-*/
-
-#ifndef FILENAME_MAX
-
-#ifndef MAXPATHLEN
-#ifdef unix
-#endif /* defined unix */
-#endif /* !defined MAXPATHLEN */
-
-#ifdef MAXPATHLEN
-#define FILENAME_MAX MAXPATHLEN
-#endif /* defined MAXPATHLEN */
-#ifndef MAXPATHLEN
-#define FILENAME_MAX 1024 /* Pure guesswork */
-#endif /* !defined MAXPATHLEN */
-
-#endif /* !defined FILENAME_MAX */
-
-/*
-** SunOS 4.1.1 libraries lack remove.
-*/
-
-#ifndef remove
-extern int unlink P((const char * filename));
-#define remove unlink
-#endif /* !defined remove */
-
-/*
-** Finally, some convenience items.
-*/
-
-#ifndef TYPE_BIT
-#define TYPE_BIT(type) (sizeof (type) * CHAR_BIT)
-#endif /* !defined TYPE_BIT */
-
-#ifndef TYPE_SIGNED
-#define TYPE_SIGNED(type) (((type) -1) < 0)
-#endif /* !defined TYPE_SIGNED */
-
-#ifndef INT_STRLEN_MAXIMUM
-/*
-** 302 / 1000 is log10(2.0) rounded up.
-** Subtract one for the sign bit if the type is signed;
-** add one for integer division truncation;
-** add one more for a minus sign if the type is signed.
-*/
-#define INT_STRLEN_MAXIMUM(type) \
- ((TYPE_BIT(type) - TYPE_SIGNED(type)) * 302 / 1000 + 1 + TYPE_SIGNED(type))
-#endif /* !defined INT_STRLEN_MAXIMUM */
-
-/*
-** INITIALIZE(x)
-*/
-
-#ifndef GNUC_or_lint
-#ifdef lint
-#define GNUC_or_lint
-#endif /* defined lint */
-#ifndef lint
-#ifdef __GNUC__
-#define GNUC_or_lint
-#endif /* defined __GNUC__ */
-#endif /* !defined lint */
-#endif /* !defined GNUC_or_lint */
-
-#ifndef INITIALIZE
-#ifdef GNUC_or_lint
-#define INITIALIZE(x) ((x) = 0)
-#endif /* defined GNUC_or_lint */
-#ifndef GNUC_or_lint
-#define INITIALIZE(x)
-#endif /* !defined GNUC_or_lint */
-#endif /* !defined INITIALIZE */
-
-/*
-** For the benefit of GNU folk...
-** `_(MSGID)' uses the current locale's message library string for MSGID.
-** The default is to use gettext if available, and use MSGID otherwise.
-*/
-
-#ifndef _
-#if HAVE_GETTEXT - 0
-#define _(msgid) gettext(msgid)
-#else /* !(HAVE_GETTEXT - 0) */
-#define _(msgid) msgid
-#endif /* !(HAVE_GETTEXT - 0) */
-#endif /* !defined _ */
-
-#ifndef TZ_DOMAIN
-#define TZ_DOMAIN "tz"
-#endif /* !defined TZ_DOMAIN */
-
-/*
-** UNIX was a registered trademark of UNIX System Laboratories in 1993.
-*/
-
-#endif /* !defined PRIVATE_H */
-
-#ifndef TZFILE_H
-
-#define TZFILE_H
-
-/*
-** This file is in the public domain, so clarified as of
-** 1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).
-*/
-
-/*
-** This header is for use ONLY with the time conversion code.
-** There is no guarantee that it will remain unchanged,
-** or that it will remain at all.
-** Do NOT copy it to any system include directory.
-** Thank you!
-*/
-
-/*
-** ID
-*/
-
-#ifndef lint
-#ifndef NOID
-static char tzfilehid[] = "@(#)tzfile.h 7.14";
-#endif /* !defined NOID */
-#endif /* !defined lint */
-
-/*
-** Information about time zone files.
-*/
-
-#ifndef TZDIR
-#define TZDIR "/usr/share/zoneinfo" /* Time zone object file directory */
-#endif /* !defined TZDIR */
-
-#ifndef TZDEFAULT
-#define TZDEFAULT "localtime"
-#endif /* !defined TZDEFAULT */
-
-#ifndef TZDEFRULES
-#define TZDEFRULES "posixrules"
-#endif /* !defined TZDEFRULES */
-
-/*
-** Each file begins with. . .
-*/
-
-#define TZ_MAGIC "TZif"
-
-struct tzhead {
- char tzh_magic[4]; /* TZ_MAGIC */
- char tzh_reserved[16]; /* reserved for future use */
- char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */
- char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */
- char tzh_leapcnt[4]; /* coded number of leap seconds */
- char tzh_timecnt[4]; /* coded number of transition times */
- char tzh_typecnt[4]; /* coded number of local time types */
- char tzh_charcnt[4]; /* coded number of abbr. chars */
-};
-
-/*
-** . . .followed by. . .
-**
-** tzh_timecnt (char [4])s coded transition times a la time(2)
-** tzh_timecnt (unsigned char)s types of local time starting at above
-** tzh_typecnt repetitions of
-** one (char [4]) coded UTC offset in seconds
-** one (unsigned char) used to set tm_isdst
-** one (unsigned char) that's an abbreviation list index
-** tzh_charcnt (char)s '\0'-terminated zone abbreviations
-** tzh_leapcnt repetitions of
-** one (char [4]) coded leap second transition times
-** one (char [4]) total correction after above
-** tzh_ttisstdcnt (char)s indexed by type; if true, transition
-** time is standard time, if false,
-** transition time is wall clock time
-** if absent, transition times are
-** assumed to be wall clock time
-** tzh_ttisgmtcnt (char)s indexed by type; if true, transition
-** time is UTC, if false,
-** transition time is local time
-** if absent, transition times are
-** assumed to be local time
-*/
-
-/*
-** In the current implementation, "tzset()" refuses to deal with files that
-** exceed any of the limits below.
-*/
-
-#ifndef TZ_MAX_TIMES
-/*
-** The TZ_MAX_TIMES value below is enough to handle a bit more than a
-** year's worth of solar time (corrected daily to the nearest second) or
-** 138 years of Pacific Presidential Election time
-** (where there are three time zone transitions every fourth year).
-*/
-#define TZ_MAX_TIMES 370
-#endif /* !defined TZ_MAX_TIMES */
-
-#ifndef TZ_MAX_TYPES
-#ifndef NOSOLAR
-#define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */
-#endif /* !defined NOSOLAR */
-#ifdef NOSOLAR
-/*
-** Must be at least 14 for Europe/Riga as of Jan 12 1995,
-** as noted by Earl Chew <earl@hpato.aus.hp.com>.
-*/
-#define TZ_MAX_TYPES 20 /* Maximum number of local time types */
-#endif /* !defined NOSOLAR */
-#endif /* !defined TZ_MAX_TYPES */
-
-#ifndef TZ_MAX_CHARS
-#define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */
- /* (limited by what unsigned chars can hold) */
-#endif /* !defined TZ_MAX_CHARS */
-
-#ifndef TZ_MAX_LEAPS
-#define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */
-#endif /* !defined TZ_MAX_LEAPS */
-
-#define SECSPERMIN 60
-#define MINSPERHOUR 60
-#define HOURSPERDAY 24
-#define DAYSPERWEEK 7
-#define DAYSPERNYEAR 365
-#define DAYSPERLYEAR 366
-#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR)
-#define SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY)
-#define MONSPERYEAR 12
-
-#define TM_SUNDAY 0
-#define TM_MONDAY 1
-#define TM_TUESDAY 2
-#define TM_WEDNESDAY 3
-#define TM_THURSDAY 4
-#define TM_FRIDAY 5
-#define TM_SATURDAY 6
-
-#define TM_JANUARY 0
-#define TM_FEBRUARY 1
-#define TM_MARCH 2
-#define TM_APRIL 3
-#define TM_MAY 4
-#define TM_JUNE 5
-#define TM_JULY 6
-#define TM_AUGUST 7
-#define TM_SEPTEMBER 8
-#define TM_OCTOBER 9
-#define TM_NOVEMBER 10
-#define TM_DECEMBER 11
-
-#define TM_YEAR_BASE 1900
-
-#define EPOCH_YEAR 1970
-#define EPOCH_WDAY TM_THURSDAY
-
-/*
-** Accurate only for the past couple of centuries;
-** that will probably do.
-*/
-
-#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
-
-#ifndef USG
-
-/*
-** Use of the underscored variants may cause problems if you move your code to
-** certain System-V-based systems; for maximum portability, use the
-** underscore-free variants. The underscored variants are provided for
-** backward compatibility only; they may disappear from future versions of
-** this file.
-*/
-
-#define SECS_PER_MIN SECSPERMIN
-#define MINS_PER_HOUR MINSPERHOUR
-#define HOURS_PER_DAY HOURSPERDAY
-#define DAYS_PER_WEEK DAYSPERWEEK
-#define DAYS_PER_NYEAR DAYSPERNYEAR
-#define DAYS_PER_LYEAR DAYSPERLYEAR
-#define SECS_PER_HOUR SECSPERHOUR
-#define SECS_PER_DAY SECSPERDAY
-#define MONS_PER_YEAR MONSPERYEAR
-
-#endif /* !defined USG */
-
-#endif /* !defined TZFILE_H */
-
-#include "fcntl.h"
-
-/*
-** SunOS 4.1.1 headers lack O_BINARY.
-*/
-
-#ifdef O_BINARY
-#define OPEN_MODE (O_RDONLY | O_BINARY)
-#endif /* defined O_BINARY */
-#ifndef O_BINARY
-#define OPEN_MODE O_RDONLY
-#endif /* !defined O_BINARY */
-
-#ifndef WILDABBR
-/*
-** Someone might make incorrect use of a time zone abbreviation:
-** 1. They might reference tzname[0] before calling tzset (explicitly
-** or implicitly).
-** 2. They might reference tzname[1] before calling tzset (explicitly
-** or implicitly).
-** 3. They might reference tzname[1] after setting to a time zone
-** in which Daylight Saving Time is never observed.
-** 4. They might reference tzname[0] after setting to a time zone
-** in which Standard Time is never observed.
-** 5. They might reference tm.TM_ZONE after calling offtime.
-** What's best to do in the above cases is open to debate;
-** for now, we just set things up so that in any of the five cases
-** WILDABBR is used. Another possibility: initialize tzname[0] to the
-** string "tzname[0] used before set", and similarly for the other cases.
-** And another: initialize tzname[0] to "ERA", with an explanation in the
-** manual page of what this "time zone abbreviation" means (doing this so
-** that tzname[0] has the "normal" length of three characters).
-*/
-#define WILDABBR " "
-#endif /* !defined WILDABBR */
-
-static char wildabbr[] NO_COPY = WILDABBR;
-
-static char gmt[] NO_COPY = "GMT";
-
-struct ttinfo { /* time type information */
- long tt_gmtoff; /* UTC offset in seconds */
- int tt_isdst; /* used to set tm_isdst */
- int tt_abbrind; /* abbreviation list index */
- int tt_ttisstd; /* true if transition is std time */
- int tt_ttisgmt; /* true if transition is UTC */
-};
-
-struct lsinfo { /* leap second information */
- time_t ls_trans; /* transition time */
- long ls_corr; /* correction to apply */
-};
-
-#define BIGGEST(a, b) (((a) > (b)) ? (a) : (b))
-
-#ifdef TZNAME_MAX
-#define MY_TZNAME_MAX TZNAME_MAX
-#endif /* defined TZNAME_MAX */
-#ifndef TZNAME_MAX
-#define MY_TZNAME_MAX 255
-#endif /* !defined TZNAME_MAX */
-
-struct state {
- int leapcnt;
- int timecnt;
- int typecnt;
- int charcnt;
- time_t ats[TZ_MAX_TIMES];
- unsigned char types[TZ_MAX_TIMES];
- struct ttinfo ttis[TZ_MAX_TYPES];
- char chars[BIGGEST(BIGGEST(TZ_MAX_CHARS + 1, sizeof gmt),
- (2 * (MY_TZNAME_MAX + 1)))];
- struct lsinfo lsis[TZ_MAX_LEAPS];
-};
-
-struct rule {
- int r_type; /* type of rule--see below */
- int r_day; /* day number of rule */
- int r_week; /* week number of rule */
- int r_mon; /* month number of rule */
- long r_time; /* transition time of rule */
-};
-
-#define JULIAN_DAY 0 /* Jn - Julian day */
-#define DAY_OF_YEAR 1 /* n - day of year */
-#define MONTH_NTH_DAY_OF_WEEK 2 /* Mm.n.d - month, week, day of week */
-
-/*
-** Prototypes for static functions.
-*/
-
-static long detzcode P((const char * codep));
-static const char * getzname P((const char * strp));
-static const char * getnum P((const char * strp, int * nump, int min,
- int max));
-static const char * getsecs P((const char * strp, long * secsp));
-static const char * getoffset P((const char * strp, long * offsetp));
-static const char * getrule P((const char * strp, struct rule * rulep));
-static void gmtload P((struct state * sp));
-static void gmtsub P((const time_t * timep, long offset,
- struct tm * tmp));
-static void localsub P((const time_t * timep, long offset,
- struct tm * tmp));
-static int increment_overflow P((int * number, int delta));
-static int normalize_overflow P((int * tensptr, int * unitsptr,
- int base));
-static void settzname P((void));
-static time_t time1 P((struct tm * tmp,
- void(*funcp) P((const time_t *,
- long, struct tm *)),
- long offset));
-static time_t time2 P((struct tm *tmp,
- void(*funcp) P((const time_t *,
- long, struct tm*)),
- long offset, int * okayp));
-static time_t time2sub P((struct tm *tmp,
- void(*funcp) P((const time_t *,
- long, struct tm*)),
- long offset, int * okayp, int do_norm_secs));
-static void timesub P((const time_t * timep, long offset,
- const struct state * sp, struct tm * tmp));
-static int tmcomp P((const struct tm * atmp,
- const struct tm * btmp));
-static time_t transtime P((time_t janfirst, int year,
- const struct rule * rulep, long offset));
-static int tzload P((const char * name, struct state * sp));
-static int tzparse P((const char * name, struct state * sp,
- int lastditch));
-
-#ifdef ALL_STATE
-static struct state * lclptr;
-static struct state * gmtptr;
-#endif /* defined ALL_STATE */
-
-#ifndef ALL_STATE
-static struct state lclmem;
-static struct state gmtmem;
-#define lclptr (&lclmem)
-#define gmtptr (&gmtmem)
-#endif /* State Farm */
-
-#ifndef TZ_STRLEN_MAX
-#define TZ_STRLEN_MAX 255
-#endif /* !defined TZ_STRLEN_MAX */
-
-static char lcl_TZname[TZ_STRLEN_MAX + 1];
-static int lcl_is_set;
-static int gmt_is_set;
-
-#define tzname _tzname
-#undef _tzname
-
-char * tzname[2] = {
- wildabbr,
- wildabbr
-};
-
-/*
-** Section 4.12.3 of X3.159-1989 requires that
-** Except for the strftime function, these functions [asctime,
-** ctime, gmtime, localtime] return values in one of two static
-** objects: a broken-down time structure and an array of char.
-** Thanks to Paul Eggert (eggert@twinsun.com) for noting this.
-*/
-
-static struct tm tm;
-
-
-/* These variables are initialized by tzset. The macro versions are
- defined in time.h, and indirect through the __imp_ pointers. */
-
-#define timezone _timezone
-#define daylight _daylight
-#undef _timezone
-#undef _daylight
-
-#ifdef USG_COMPAT
-long timezone; /* was time_t but POSIX requires long. */
-int daylight;
-#endif /* defined USG_COMPAT */
-
-#ifdef ALTZONE
-time_t altzone;
-#endif /* defined ALTZONE */
-
-static long
-detzcode(const char *codep)
-{
- register long result;
- register int i;
-
- result = (codep[0] & 0x80) ? ~0L : 0L;
- for (i = 0; i < 4; ++i)
- result = (result << 8) | (codep[i] & 0xff);
- return result;
-}
-
-static void
-settzname P((void))
-{
- register struct state * const sp = lclptr;
- register int i;
-
- tzname[0] = wildabbr;
- tzname[1] = wildabbr;
-#ifdef USG_COMPAT
- daylight = 0;
- timezone = 0;
-#endif /* defined USG_COMPAT */
-#ifdef ALTZONE
- altzone = 0;
-#endif /* defined ALTZONE */
-#ifdef ALL_STATE
- if (sp == NULL) {
- tzname[0] = tzname[1] = gmt;
- return;
- }
-#endif /* defined ALL_STATE */
- for (i = 0; i < sp->typecnt; ++i) {
- register const struct ttinfo * const ttisp = &sp->ttis[i];
-
- tzname[ttisp->tt_isdst] =
- &sp->chars[ttisp->tt_abbrind];
-#ifdef USG_COMPAT
- if (ttisp->tt_isdst)
- daylight = 1;
- if (i == 0 || !ttisp->tt_isdst)
- timezone = -(ttisp->tt_gmtoff);
-#endif /* defined USG_COMPAT */
-#ifdef ALTZONE
- if (i == 0 || ttisp->tt_isdst)
- altzone = -(ttisp->tt_gmtoff);
-#endif /* defined ALTZONE */
- }
- /*
- ** And to get the latest zone names into tzname. . .
- */
- for (i = 0; i < sp->timecnt; ++i) {
- register const struct ttinfo * const ttisp =
- &sp->ttis[
- sp->types[i]];
-
- tzname[ttisp->tt_isdst] =
- &sp->chars[ttisp->tt_abbrind];
- }
-}
-
-#include "tz_posixrules.h"
-
-static int
-tzload(const char *name, struct state *sp)
-{
- register const char * p;
- register int i;
- register int fid;
- save_errno save;
-
- if (name == NULL && (name = TZDEFAULT) == NULL)
- return -1;
- {
- register int doaccess;
- /*
- ** Section 4.9.1 of the C standard says that
- ** "FILENAME_MAX expands to an integral constant expression
- ** that is the size needed for an array of char large enough
- ** to hold the longest file name string that the implementation
- ** guarantees can be opened."
- */
- char fullname[FILENAME_MAX + 1];
-
- if (name[0] == ':')
- ++name;
- doaccess = name[0] == '/';
- if (!doaccess) {
- if ((p = TZDIR) == NULL)
- return -1;
- if ((strlen(p) + strlen(name) + 1) >= sizeof fullname)
- return -1;
- strcpy(fullname, p);
- strcat(fullname, "/");
- strcat(fullname, name);
- /*
- ** Set doaccess if '.' (as in "../") shows up in name.
- */
- if (strchr(name, '.') != NULL)
- doaccess = true;
- name = fullname;
- }
-#if 0
- if (doaccess && access(name, R_OK) != 0)
- return -1;
-#endif
- if ((fid = open(name, OPEN_MODE)) == -1)
- {
- const char *base = strrchr(name, '/');
- if (base)
- base++;
- else
- base = name;
- if (strcmp(base, "posixrules"))
- return -1;
-
- /* We've got a built-in copy of posixrules just in case */
- fid = -2;
- }
- }
- {
- struct tzhead * tzhp;
- union {
- struct tzhead tzhead;
- char buf[sizeof *sp + sizeof *tzhp];
- } u;
- int ttisstdcnt;
- int ttisgmtcnt;
-
- if (fid == -2)
- {
- memcpy(u.buf, _posixrules_data, sizeof (_posixrules_data));
- i = sizeof (_posixrules_data);
- }
- else
- {
- i = read(fid, u.buf, sizeof u.buf);
- if (close(fid) != 0)
- return -1;
- }
- ttisstdcnt = (int) detzcode(u.tzhead.tzh_ttisgmtcnt);
- ttisgmtcnt = (int) detzcode(u.tzhead.tzh_ttisstdcnt);
- sp->leapcnt = (int) detzcode(u.tzhead.tzh_leapcnt);
- sp->timecnt = (int) detzcode(u.tzhead.tzh_timecnt);
- sp->typecnt = (int) detzcode(u.tzhead.tzh_typecnt);
- sp->charcnt = (int) detzcode(u.tzhead.tzh_charcnt);
- p = u.tzhead.tzh_charcnt + sizeof u.tzhead.tzh_charcnt;
- if (sp->leapcnt < 0 || sp->leapcnt > TZ_MAX_LEAPS ||
- sp->typecnt <= 0 || sp->typecnt > TZ_MAX_TYPES ||
- sp->timecnt < 0 || sp->timecnt > TZ_MAX_TIMES ||
- sp->charcnt < 0 || sp->charcnt > TZ_MAX_CHARS ||
- (ttisstdcnt != sp->typecnt && ttisstdcnt != 0) ||
- (ttisgmtcnt != sp->typecnt && ttisgmtcnt != 0))
- return -1;
- if (i - (p - u.buf) < sp->timecnt * 4 + /* ats */
- sp->timecnt + /* types */
- sp->typecnt * (4 + 2) + /* ttinfos */
- sp->charcnt + /* chars */
- sp->leapcnt * (4 + 4) + /* lsinfos */
- ttisstdcnt + /* ttisstds */
- ttisgmtcnt) /* ttisgmts */
- return -1;
- for (i = 0; i < sp->timecnt; ++i) {
- sp->ats[i] = detzcode(p);
- p += 4;
- }
- for (i = 0; i < sp->timecnt; ++i) {
- sp->types[i] = (unsigned char) *p++;
- if (sp->types[i] >= sp->typecnt)
- return -1;
- }
- for (i = 0; i < sp->typecnt; ++i) {
- register struct ttinfo * ttisp;
-
- ttisp = &sp->ttis[i];
- ttisp->tt_gmtoff = detzcode(p);
- p += 4;
- ttisp->tt_isdst = (unsigned char) *p++;
- if (ttisp->tt_isdst != 0 && ttisp->tt_isdst != 1)
- return -1;
- ttisp->tt_abbrind = (unsigned char) *p++;
- if (ttisp->tt_abbrind < 0 ||
- ttisp->tt_abbrind > sp->charcnt)
- return -1;
- }
- for (i = 0; i < sp->charcnt; ++i)
- sp->chars[i] = *p++;
- sp->chars[i] = '\0'; /* ensure '\0' at end */
- for (i = 0; i < sp->leapcnt; ++i) {
- register struct lsinfo * lsisp;
-
- lsisp = &sp->lsis[i];
- lsisp->ls_trans = detzcode(p);
- p += 4;
- lsisp->ls_corr = detzcode(p);
- p += 4;
- }
- for (i = 0; i < sp->typecnt; ++i) {
- register struct ttinfo * ttisp;
-
- ttisp = &sp->ttis[i];
- if (ttisstdcnt == 0)
- ttisp->tt_ttisstd = false;
- else {
- ttisp->tt_ttisstd = *p++;
- if (ttisp->tt_ttisstd != true &&
- ttisp->tt_ttisstd != false)
- return -1;
- }
- }
- for (i = 0; i < sp->typecnt; ++i) {
- register struct ttinfo * ttisp;
-
- ttisp = &sp->ttis[i];
- if (ttisgmtcnt == 0)
- ttisp->tt_ttisgmt = false;
- else {
- ttisp->tt_ttisgmt = *p++;
- if (ttisp->tt_ttisgmt != true &&
- ttisp->tt_ttisgmt != false)
- return -1;
- }
- }
- }
- return 0;
-}
-
-static const int mon_lengths[2][MONSPERYEAR] = {
- { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
- { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
-};
-
-static const int year_lengths[2] = {
- DAYSPERNYEAR, DAYSPERLYEAR
-};
-
-/*
-** Given a pointer into a time zone string, scan until a character that is not
-** a valid character in a zone name is found. Return a pointer to that
-** character.
-*/
-
-static const char *
-getzname(const char *strp)
-{
- register char c;
-
- while ((c = *strp) != '\0' && !is_digit(c) && c != ',' && c != '-' &&
- c != '+')
- ++strp;
- return strp;
-}
-
-/*
-** Given a pointer into a time zone string, extract a number from that string.
-** Check that the number is within a specified range; if it is not, return
-** NULL.
-** Otherwise, return a pointer to the first character not part of the number.
-*/
-
-static const char *
-getnum(const char *strp, int *nump, const int min, const int max)
-{
- register char c;
- register int num;
-
- if (strp == NULL || !is_digit(c = *strp))
- return NULL;
- num = 0;
- do {
- num = num * 10 + (c - '0');
- if (num > max)
- return NULL; /* illegal value */
- c = *++strp;
- } while (is_digit(c));
- if (num < min)
- return NULL; /* illegal value */
- *nump = num;
- return strp;
-}
-
-/*
-** Given a pointer into a time zone string, extract a number of seconds,
-** in hh[:mm[:ss]] form, from the string.
-** If any error occurs, return NULL.
-** Otherwise, return a pointer to the first character not part of the number
-** of seconds.
-*/
-
-static const char *
-getsecs(const char *strp, long *secsp)
-{
- int num;
-
- /*
- ** `HOURSPERDAY * DAYSPERWEEK - 1' allows quasi-Posix rules like
- ** "M10.4.6/26", which does not conform to Posix,
- ** but which specifies the equivalent of
- ** ``02:00 on the first Sunday on or after 23 Oct''.
- */
- strp = getnum(strp, &num, 0, HOURSPERDAY * DAYSPERWEEK - 1);
- if (strp == NULL)
- return NULL;
- *secsp = num * (long) SECSPERHOUR;
- if (*strp == ':') {
- ++strp;
- strp = getnum(strp, &num, 0, MINSPERHOUR - 1);
- if (strp == NULL)
- return NULL;
- *secsp += num * SECSPERMIN;
- if (*strp == ':') {
- ++strp;
- /* `SECSPERMIN' allows for leap seconds. */
- strp = getnum(strp, &num, 0, SECSPERMIN);
- if (strp == NULL)
- return NULL;
- *secsp += num;
- }
- }
- return strp;
-}
-
-/*
-** Given a pointer into a time zone string, extract an offset, in
-** [+-]hh[:mm[:ss]] form, from the string.
-** If any error occurs, return NULL.
-** Otherwise, return a pointer to the first character not part of the time.
-*/
-
-static const char *
-getoffset(const char *strp, long *offsetp)
-{
- register int neg = 0;
-
- if (*strp == '-') {
- neg = 1;
- ++strp;
- } else if (*strp == '+')
- ++strp;
- strp = getsecs(strp, offsetp);
- if (strp == NULL)
- return NULL; /* illegal time */
- if (neg)
- *offsetp = -*offsetp;
- return strp;
-}
-
-/*
-** Given a pointer into a time zone string, extract a rule in the form
-** date[/time]. See POSIX section 8 for the format of "date" and "time".
-** If a valid rule is not found, return NULL.
-** Otherwise, return a pointer to the first character not part of the rule.
-*/
-
-static const char *
-getrule(const char *strp, struct rule *rulep)
-{
- if (*strp == 'J') {
- /*
- ** Julian day.
- */
- rulep->r_type = JULIAN_DAY;
- ++strp;
- strp = getnum(strp, &rulep->r_day, 1, DAYSPERNYEAR);
- } else if (*strp == 'M') {
- /*
- ** Month, week, day.
- */
- rulep->r_type = MONTH_NTH_DAY_OF_WEEK;
- ++strp;
- strp = getnum(strp, &rulep->r_mon, 1, MONSPERYEAR);
- if (strp == NULL)
- return NULL;
- if (*strp++ != '.')
- return NULL;
- strp = getnum(strp, &rulep->r_week, 1, 5);
- if (strp == NULL)
- return NULL;
- if (*strp++ != '.')
- return NULL;
- strp = getnum(strp, &rulep->r_day, 0, DAYSPERWEEK - 1);
- } else if (is_digit(*strp)) {
- /*
- ** Day of year.
- */
- rulep->r_type = DAY_OF_YEAR;
- strp = getnum(strp, &rulep->r_day, 0, DAYSPERLYEAR - 1);
- } else return NULL; /* invalid format */
- if (strp == NULL)
- return NULL;
- if (*strp == '/') {
- /*
- ** Time specified.
- */
- ++strp;
- strp = getsecs(strp, &rulep->r_time);
- } else rulep->r_time = 2 * SECSPERHOUR; /* default = 2:00:00 */
- return strp;
-}
-
-/*
-** Given the Epoch-relative time of January 1, 00:00:00 UTC, in a year, the
-** year, a rule, and the offset from UTC at the time that rule takes effect,
-** calculate the Epoch-relative time that rule takes effect.
-*/
-
-static time_t
-transtime(const time_t janfirst, const int year, const struct rule *rulep,
- long offset)
-{
- register int leapyear;
- register time_t value;
- register int i;
- int d, m1, yy0, yy1, yy2, dow;
-
- INITIALIZE(value);
- leapyear = isleap(year);
- switch (rulep->r_type) {
-
- case JULIAN_DAY:
- /*
- ** Jn - Julian day, 1 == January 1, 60 == March 1 even in leap
- ** years.
- ** In non-leap years, or if the day number is 59 or less, just
- ** add SECSPERDAY times the day number-1 to the time of
- ** January 1, midnight, to get the day.
- */
- value = janfirst + (rulep->r_day - 1) * SECSPERDAY;
- if (leapyear && rulep->r_day >= 60)
- value += SECSPERDAY;
- break;
-
- case DAY_OF_YEAR:
- /*
- ** n - day of year.
- ** Just add SECSPERDAY times the day number to the time of
- ** January 1, midnight, to get the day.
- */
- value = janfirst + rulep->r_day * SECSPERDAY;
- break;
-
- case MONTH_NTH_DAY_OF_WEEK:
- /*
- ** Mm.n.d - nth "dth day" of month m.
- */
- value = janfirst;
- for (i = 0; i < rulep->r_mon - 1; ++i)
- value += mon_lengths[leapyear][i] * SECSPERDAY;
-
- /*
- ** Use Zeller's Congruence to get day-of-week of first day of
- ** month.
- */
- m1 = (rulep->r_mon + 9) % 12 + 1;
- yy0 = (rulep->r_mon <= 2) ? (year - 1) : year;
- yy1 = yy0 / 100;
- yy2 = yy0 % 100;
- dow = ((26 * m1 - 2) / 10 +
- 1 + yy2 + yy2 / 4 + yy1 / 4 - 2 * yy1) % 7;
- if (dow < 0)
- dow += DAYSPERWEEK;
-
- /*
- ** "dow" is the day-of-week of the first day of the month. Get
- ** the day-of-month (zero-origin) of the first "dow" day of the
- ** month.
- */
- d = rulep->r_day - dow;
- if (d < 0)
- d += DAYSPERWEEK;
- for (i = 1; i < rulep->r_week; ++i) {
- if (d + DAYSPERWEEK >=
- mon_lengths[leapyear][rulep->r_mon - 1])
- break;
- d += DAYSPERWEEK;
- }
-
- /*
- ** "d" is the day-of-month (zero-origin) of the day we want.
- */
- value += d * SECSPERDAY;
- break;
- }
-
- /*
- ** "value" is the Epoch-relative time of 00:00:00 UTC on the day in
- ** question. To get the Epoch-relative time of the specified local
- ** time on that day, add the transition time and the current offset
- ** from UTC.
- */
- return value + rulep->r_time + offset;
-}
-
-/*
-** Given a POSIX section 8-style TZ string, fill in the rule tables as
-** appropriate.
-*/
-
-static int
-tzparse(const char *name, struct state *sp, const int lastditch)
-{
- const char * stdname;
- const char * dstname;
- size_t stdlen;
- size_t dstlen;
- long stdoffset;
- long dstoffset;
- register time_t * atp;
- register unsigned char * typep;
- register char * cp;
- register int load_result;
-
- INITIALIZE(dstname);
- stdname = name;
- if (lastditch) {
- stdlen = strlen(name); /* length of standard zone name */
- name += stdlen;
- if (stdlen >= sizeof sp->chars)
- stdlen = (sizeof sp->chars) - 1;
- stdoffset = 0;
- } else {
- name = getzname(name);
- stdlen = name - stdname;
- if (stdlen < 3)
- return -1;
- if (*name == '\0')
- return -1;
- name = getoffset(name, &stdoffset);
- if (name == NULL)
- return -1;
- }
- load_result = tzload(TZDEFRULES, sp);
- if (load_result != 0)
- sp->leapcnt = 0; /* so, we're off a little */
- if (*name != '\0') {
- dstname = name;
- name = getzname(name);
- dstlen = name - dstname; /* length of DST zone name */
- if (dstlen < 3)
- return -1;
- if (*name != '\0' && *name != ',' && *name != ';') {
- name = getoffset(name, &dstoffset);
- if (name == NULL)
- return -1;
- } else dstoffset = stdoffset - SECSPERHOUR;
- if (*name == ',' || *name == ';') {
- struct rule start;
- struct rule end;
- register int year;
- register time_t janfirst;
- time_t starttime;
- time_t endtime;
-
- ++name;
- if ((name = getrule(name, &start)) == NULL)
- return -1;
- if (*name++ != ',')
- return -1;
- if ((name = getrule(name, &end)) == NULL)
- return -1;
- if (*name != '\0')
- return -1;
- sp->typecnt = 2; /* standard time and DST */
- /*
- ** Two transitions per year, from EPOCH_YEAR to 2037.
- */
- sp->timecnt = 2 * (2037 - EPOCH_YEAR + 1);
- if (sp->timecnt > TZ_MAX_TIMES)
- return -1;
- sp->ttis[0].tt_gmtoff = -dstoffset;
- sp->ttis[0].tt_isdst = 1;
- sp->ttis[0].tt_abbrind = stdlen + 1;
- sp->ttis[1].tt_gmtoff = -stdoffset;
- sp->ttis[1].tt_isdst = 0;
- sp->ttis[1].tt_abbrind = 0;
- atp = sp->ats;
- typep = sp->types;
- janfirst = 0;
- for (year = EPOCH_YEAR; year <= 2037; ++year) {
- starttime = transtime(janfirst, year, &start,
- stdoffset);
- endtime = transtime(janfirst, year, &end,
- dstoffset);
- if (starttime > endtime) {
- *atp++ = endtime;
- *typep++ = 1; /* DST ends */
- *atp++ = starttime;
- *typep++ = 0; /* DST begins */
- } else {
- *atp++ = starttime;
- *typep++ = 0; /* DST begins */
- *atp++ = endtime;
- *typep++ = 1; /* DST ends */
- }
- janfirst += year_lengths[isleap(year)] *
- SECSPERDAY;
- }
- __gettzinfo ()->__tzrule[0].offset
- = -sp->ttis[1].tt_gmtoff;
- __gettzinfo ()->__tzrule[1].offset
- = -sp->ttis[0].tt_gmtoff;
- } else {
- register long theirstdoffset;
- register long theirdstoffset;
- register long theiroffset;
- register int isdst;
- register int i;
- register int j;
-
- if (*name != '\0')
- return -1;
- if (load_result != 0)
- return -1;
- /*
- ** Initial values of theirstdoffset and theirdstoffset.
- */
- theirstdoffset = 0;
- for (i = 0; i < sp->timecnt; ++i) {
- j = sp->types[i];
- if (!sp->ttis[j].tt_isdst) {
- theirstdoffset =
- -sp->ttis[j].tt_gmtoff;
- break;
- }
- }
- theirdstoffset = 0;
- for (i = 0; i < sp->timecnt; ++i) {
- j = sp->types[i];
- if (sp->ttis[j].tt_isdst) {
- theirdstoffset =
- -sp->ttis[j].tt_gmtoff;
- break;
- }
- }
- /*
- ** Initially we're assumed to be in standard time.
- */
- isdst = false;
- theiroffset = theirstdoffset;
- /*
- ** Now juggle transition times and types
- ** tracking offsets as you do.
- */
- for (i = 0; i < sp->timecnt; ++i) {
- j = sp->types[i];
- sp->types[i] = sp->ttis[j].tt_isdst;
- if (sp->ttis[j].tt_ttisgmt) {
- /* No adjustment to transition time */
- } else {
- /*
- ** If summer time is in effect, and the
- ** transition time was not specified as
- ** standard time, add the summer time
- ** offset to the transition time;
- ** otherwise, add the standard time
- ** offset to the transition time.
- */
- /*
- ** Transitions from DST to DDST
- ** will effectively disappear since
- ** POSIX provides for only one DST
- ** offset.
- */
- if (isdst && !sp->ttis[j].tt_ttisstd) {
- sp->ats[i] += dstoffset -
- theirdstoffset;
- } else {
- sp->ats[i] += stdoffset -
- theirstdoffset;
- }
- }
- theiroffset = -sp->ttis[j].tt_gmtoff;
- if (sp->ttis[j].tt_isdst)
- theirdstoffset = theiroffset;
- else theirstdoffset = theiroffset;
- }
- /*
- ** Finally, fill in ttis.
- ** ttisstd and ttisgmt need not be handled.
- */
- sp->ttis[0].tt_gmtoff = -stdoffset;
- sp->ttis[0].tt_isdst = false;
- sp->ttis[0].tt_abbrind = 0;
- sp->ttis[1].tt_gmtoff = -dstoffset;
- sp->ttis[1].tt_isdst = true;
- sp->ttis[1].tt_abbrind = stdlen + 1;
- sp->typecnt = 2;
- __gettzinfo ()->__tzrule[0].offset
- = -sp->ttis[0].tt_gmtoff;
- __gettzinfo ()->__tzrule[1].offset
- = -sp->ttis[1].tt_gmtoff;
- }
- } else {
- dstlen = 0;
- sp->typecnt = 1; /* only standard time */
- sp->timecnt = 0;
- sp->ttis[0].tt_gmtoff = -stdoffset;
- sp->ttis[0].tt_isdst = 0;
- sp->ttis[0].tt_abbrind = 0;
- __gettzinfo ()->__tzrule[0].offset = -sp->ttis[0].tt_gmtoff;
- __gettzinfo ()->__tzrule[1].offset = -sp->ttis[0].tt_gmtoff;
- }
- sp->charcnt = stdlen + 1;
- if (dstlen != 0)
- sp->charcnt += dstlen + 1;
- if ((size_t) sp->charcnt > sizeof sp->chars)
- return -1;
- cp = sp->chars;
- strncpy(cp, stdname, stdlen);
- cp += stdlen;
- *cp++ = '\0';
- if (dstlen != 0) {
- strncpy(cp, dstname, dstlen);
- *(cp + dstlen) = '\0';
- }
- return 0;
-}
-
-static void
-gmtload(struct state *sp)
-{
- if (tzload(gmt, sp) != 0)
- tzparse(gmt, sp, true);
-}
-
-#ifndef STD_INSPIRED
-/*
-** A non-static declaration of tzsetwall in a system header file
-** may cause a warning about this upcoming static declaration...
-*/
-static
-#endif /* !defined STD_INSPIRED */
-void
-tzsetwall P((void))
-{
- if (lcl_is_set < 0)
- return;
- lcl_is_set = -1;
-
-#ifdef ALL_STATE
- if (lclptr == NULL) {
- lclptr = (struct state *) malloc(sizeof *lclptr);
- if (lclptr == NULL) {
- settzname(); /* all we can do */
- return;
- }
- }
-#endif /* defined ALL_STATE */
-#if defined (_WIN32) || defined (__CYGWIN__)
-#define is_upper(c) ((unsigned)(c) - 'A' <= 26)
- {
- TIME_ZONE_INFORMATION tz;
- char buf[BUFSIZ];
- char *cp, *dst;
- wchar_t *src;
- div_t d;
- GetTimeZoneInformation(&tz);
- dst = cp = buf;
- for (src = tz.StandardName; *src; src++)
- if (is_upper(*src)) *dst++ = *src;
- if ((dst - cp) < 3)
- {
- /* In non-english Windows, converted tz.StandardName
- may not contain a valid standard timezone name. */
- strcpy(cp, wildabbr);
- cp += strlen(wildabbr);
- }
- else
- cp = dst;
- d = div(tz.Bias+tz.StandardBias, 60);
- sprintf(cp, "%d", d.quot);
- if (d.rem)
- sprintf(cp=strchr(cp, 0), ":%d", abs(d.rem));
- if(tz.StandardDate.wMonth) {
- cp = strchr(cp, 0);
- dst = cp;
- for (src = tz.DaylightName; *src; src++)
- if (is_upper(*src)) *dst++ = *src;
- if ((dst - cp) < 3)
- {
- /* In non-english Windows, converted tz.DaylightName
- may not contain a valid daylight timezone name. */
- strcpy(cp, wildabbr);
- cp += strlen(wildabbr);
- }
- else
- cp = dst;
- d = div(tz.Bias+tz.DaylightBias, 60);
- sprintf(cp, "%d", d.quot);
- if (d.rem)
- sprintf(cp=strchr(cp, 0), ":%d", abs(d.rem));
- cp = strchr(cp, 0);
- sprintf(cp=strchr(cp, 0), ",M%d.%d.%d/%d",
- tz.DaylightDate.wMonth,
- tz.DaylightDate.wDay,
- tz.DaylightDate.wDayOfWeek,
- tz.DaylightDate.wHour);
- if (tz.DaylightDate.wMinute || tz.DaylightDate.wSecond)
- sprintf(cp=strchr(cp, 0), ":%d", tz.DaylightDate.wMinute);
- if (tz.DaylightDate.wSecond)
- sprintf(cp=strchr(cp, 0), ":%d", tz.DaylightDate.wSecond);
- cp = strchr(cp, 0);
- sprintf(cp=strchr(cp, 0), ",M%d.%d.%d/%d",
- tz.StandardDate.wMonth,
- tz.StandardDate.wDay,
- tz.StandardDate.wDayOfWeek,
- tz.StandardDate.wHour);
- if (tz.StandardDate.wMinute || tz.StandardDate.wSecond)
- sprintf(cp=strchr(cp, 0), ":%d", tz.StandardDate.wMinute);
- if (tz.StandardDate.wSecond)
- sprintf(cp=strchr(cp, 0), ":%d", tz.StandardDate.wSecond);
- }
- /* printf("TZ deduced as `%s'\n", buf); */
- if (tzparse(buf, lclptr, false) == 0) {
- settzname();
- lcl_is_set = 1;
- strlcpy(lcl_TZname, buf, sizeof (lcl_TZname));
-#if 0
- /* Huh? POSIX doesn't mention anywhere that tzset should
- set $TZ. That's not right. */
- setenv("TZ", lcl_TZname, 1);
-#endif
- return;
- }
- }
-#endif
- if (tzload((char *) NULL, lclptr) != 0)
- gmtload(lclptr);
- settzname();
-}
-
-static NO_COPY muto tzset_guard;
-
-extern "C" void
-tzset P((void))
-{
- tzset_guard.init ("tzset_guard")->acquire ();
- const char * name = getenv("TZ");
-
- if (name == NULL) {
- if (!lcl_is_set)
- tzsetwall();
- goto out;
- }
-
- if (lcl_is_set > 0 && strcmp(lcl_TZname, name) == 0)
- goto out;
- lcl_is_set = (strlen(name) < sizeof (lcl_TZname));
- if (lcl_is_set)
- strcpy(lcl_TZname, name);
-
-#ifdef ALL_STATE
- if (lclptr == NULL) {
- lclptr = (struct state *) malloc(sizeof *lclptr);
- if (lclptr == NULL) {
- settzname(); /* all we can do */
- goto out;
- }
- }
-#endif /* defined ALL_STATE */
- if (*name == '\0') {
- /*
- ** User wants it fast rather than right.
- */
- lclptr->leapcnt = 0; /* so, we're off a little */
- lclptr->timecnt = 0;
- lclptr->ttis[0].tt_gmtoff = 0;
- lclptr->ttis[0].tt_abbrind = 0;
- strcpy(lclptr->chars, gmt);
- } else if (tzload(name, lclptr) != 0) {
- if (name[0] == ':' || tzparse(name, lclptr, false) != 0)
- gmtload(lclptr);
- }
- settzname();
-out:
- tzset_guard.release ();
-}
-
-/*
-** The easy way to behave "as if no library function calls" localtime
-** is to not call it--so we drop its guts into "localsub", which can be
-** freely called. (And no, the PANS doesn't require the above behavior--
-** but it *is* desirable.)
-**
-** The unused offset argument is for the benefit of mktime variants.
-*/
-
-/*ARGSUSED*/
-static void
-localsub (const time_t * const timep,
- const long offset,
- struct tm * const tmp)
-{
- register struct state * sp;
- register const struct ttinfo * ttisp;
- register int i;
- const time_t t = *timep;
-
- sp = lclptr;
-#ifdef ALL_STATE
- if (sp == NULL) {
- gmtsub(timep, offset, tmp);
- return;
- }
-#endif /* defined ALL_STATE */
- if (sp->timecnt == 0 || t < sp->ats[0]) {
- i = 0;
- while (sp->ttis[i].tt_isdst)
- if (++i >= sp->typecnt) {
- i = 0;
- break;
- }
- } else {
- for (i = 1; i < sp->timecnt; ++i)
- if (t < sp->ats[i])
- break;
- i = sp->types[i - 1];
- }
- ttisp = &sp->ttis[i];
- /*
- ** To get (wrong) behavior that's compatible with System V Release 2.0
- ** you'd replace the statement below with
- ** t += ttisp->tt_gmtoff;
- ** timesub(&t, 0L, sp, tmp);
- */
- timesub(&t, ttisp->tt_gmtoff, sp, tmp);
- tmp->tm_isdst = ttisp->tt_isdst;
- tzname[tmp->tm_isdst] = &sp->chars[ttisp->tt_abbrind];
-#ifdef TM_ZONE
- tmp->TM_ZONE = &sp->chars[ttisp->tt_abbrind];
-#endif /* defined TM_ZONE */
-}
-
-extern "C" struct tm *
-localtime(const time_t *timep)
-{
- tzset();
- localsub(timep, 0L, &tm);
- return &tm;
-}
-
-/*
- * Re-entrant version of localtime
- */
-extern "C" struct tm *
-localtime_r(const time_t *timep, struct tm *tm)
-{
- tzset();
- localsub(timep, 0L, tm);
- return tm;
-}
-
-/*
-** gmtsub is to gmtime as localsub is to localtime.
-*/
-
-static void
-gmtsub(const time_t *timep, const long offset, struct tm *tmp)
-{
- if (!gmt_is_set) {
- gmt_is_set = true;
-#ifdef ALL_STATE
- gmtptr = (struct state *) malloc(sizeof *gmtptr);
- if (gmtptr != NULL)
-#endif /* defined ALL_STATE */
- gmtload(gmtptr);
- }
- timesub(timep, offset, gmtptr, tmp);
-#ifdef TM_ZONE
- /*
- ** Could get fancy here and deliver something such as
- ** "UTC+xxxx" or "UTC-xxxx" if offset is non-zero,
- ** but this is no time for a treasure hunt.
- */
- if (offset != 0)
- tmp->TM_ZONE = wildabbr;
- else {
-#ifdef ALL_STATE
- if (gmtptr == NULL)
- tmp->TM_ZONE = gmt;
- else tmp->TM_ZONE = gmtptr->chars;
-#endif /* defined ALL_STATE */
-#ifndef ALL_STATE
- tmp->TM_ZONE = gmtptr->chars;
-#endif /* State Farm */
- }
-#endif /* defined TM_ZONE */
-}
-
-extern "C" struct tm *
-gmtime(const time_t *timep)
-{
- gmtsub(timep, 0L, &tm);
- return &tm;
-}
-
-/*
- * Re-entrant version of gmtime
- */
-extern "C" struct tm *
-gmtime_r(const time_t *timep, struct tm *tm)
-{
- gmtsub(timep, 0L, tm);
- return tm;
-}
-
-#ifdef STD_INSPIRED
-
-extern "C" struct tm *
-offtime(const time_t *timep, const long offset)
-{
- gmtsub(timep, offset, &tm);
- return &tm;
-}
-
-#endif /* defined STD_INSPIRED */
-
-static void
-timesub(const time_t *timep, const long offset, const struct state *sp,
- struct tm *tmp)
-{
- register const struct lsinfo * lp;
- register long days;
- register long rem;
- register int y;
- register int yleap;
- register const int * ip;
- register long corr;
- register int hit;
- register int i;
-
- corr = 0;
- hit = 0;
-#ifdef ALL_STATE
- i = (sp == NULL) ? 0 : sp->leapcnt;
-#endif /* defined ALL_STATE */
-#ifndef ALL_STATE
- i = sp->leapcnt;
-#endif /* State Farm */
- while (--i >= 0) {
- lp = &sp->lsis[i];
- if (*timep >= lp->ls_trans) {
- if (*timep == lp->ls_trans) {
- hit = ((i == 0 && lp->ls_corr > 0) ||
- lp->ls_corr > sp->lsis[i - 1].ls_corr);
- if (hit)
- while (i > 0 &&
- sp->lsis[i].ls_trans ==
- sp->lsis[i - 1].ls_trans + 1 &&
- sp->lsis[i].ls_corr ==
- sp->lsis[i - 1].ls_corr + 1) {
- ++hit;
- --i;
- }
- }
- corr = lp->ls_corr;
- break;
- }
- }
- days = *timep / SECSPERDAY;
- rem = *timep % SECSPERDAY;
-#ifdef mc68k
- if (*timep == 0x80000000) {
- /*
- ** A 3B1 muffs the division on the most negative number.
- */
- days = -24855;
- rem = -11648;
- }
-#endif /* defined mc68k */
- rem += (offset - corr);
- while (rem < 0) {
- rem += SECSPERDAY;
- --days;
- }
- while (rem >= SECSPERDAY) {
- rem -= SECSPERDAY;
- ++days;
- }
- tmp->tm_hour = (int) (rem / SECSPERHOUR);
- rem = rem % SECSPERHOUR;
- tmp->tm_min = (int) (rem / SECSPERMIN);
- /*
- ** A positive leap second requires a special
- ** representation. This uses "... ??:59:60" et seq.
- */
- tmp->tm_sec = (int) (rem % SECSPERMIN) + hit;
- tmp->tm_wday = (int) ((EPOCH_WDAY + days) % DAYSPERWEEK);
- if (tmp->tm_wday < 0)
- tmp->tm_wday += DAYSPERWEEK;
- y = EPOCH_YEAR;
-#define LEAPS_THRU_END_OF(y) ((y) / 4 - (y) / 100 + (y) / 400)
- while (days < 0 || days >= (long) year_lengths[yleap = isleap(y)]) {
- register int newy;
-
- newy = y + days / DAYSPERNYEAR;
- if (days < 0)
- --newy;
- days -= (newy - y) * DAYSPERNYEAR +
- LEAPS_THRU_END_OF(newy - 1) -
- LEAPS_THRU_END_OF(y - 1);
- y = newy;
- }
- tmp->tm_year = y - TM_YEAR_BASE;
- tmp->tm_yday = (int) days;
- ip = mon_lengths[yleap];
- for (tmp->tm_mon = 0; days >= (long) ip[tmp->tm_mon]; ++(tmp->tm_mon))
- days = days - (long) ip[tmp->tm_mon];
- tmp->tm_mday = (int) (days + 1);
- tmp->tm_isdst = 0;
-#ifdef TM_GMTOFF
- tmp->TM_GMTOFF = offset;
-#endif /* defined TM_GMTOFF */
-}
-
-extern "C" char *
-ctime(const time_t *timep)
-{
-/*
-** Section 4.12.3.2 of X3.159-1989 requires that
-** The ctime function converts the calendar time pointed to by timer
-** to local time in the form of a string. It is equivalent to
-** asctime(localtime(timer))
-*/
- return asctime(localtime(timep));
-}
-
-extern "C" char *
-ctime_r(const time_t *timep, char *buf)
-{
- struct tm tm;
-
- return asctime_r(localtime_r(timep, &tm), buf);
-}
-
-/*
-** Adapted from code provided by Robert Elz, who writes:
-** The "best" way to do mktime I think is based on an idea of Bob
-** Kridle's (so its said...) from a long time ago.
-** [kridle@xinet.com as of 1996-01-16.]
-** It does a binary search of the time_t space. Since time_t's are
-** just 32 bits, its a max of 32 iterations (even at 64 bits it
-** would still be very reasonable).
-*/
-
-#ifndef WRONG
-#define WRONG (-1)
-#endif /* !defined WRONG */
-
-/*
-** Simplified normalize logic courtesy Paul Eggert (eggert@twinsun.com).
-*/
-
-/* Mark as noinline to prevent a compiler warning. */
-static int __attribute__((noinline))
-increment_overflow(int *number, int delta)
-{
- int number0;
-
- number0 = *number;
- *number += delta;
- return (*number < number0) != (delta < 0);
-}
-
-static int
-normalize_overflow(int *tensptr, int *unitsptr, const int base)
-{
- register int tensdelta;
-
- tensdelta = (*unitsptr >= 0) ?
- (*unitsptr / base) :
- (-1 - (-1 - *unitsptr) / base);
- *unitsptr -= tensdelta * base;
- return increment_overflow(tensptr, tensdelta);
-}
-
-static int
-tmcomp(register const struct tm *atmp, register const struct tm *btmp)
-{
- register int result;
-
- if ((result = (atmp->tm_year - btmp->tm_year)) == 0 &&
- (result = (atmp->tm_mon - btmp->tm_mon)) == 0 &&
- (result = (atmp->tm_mday - btmp->tm_mday)) == 0 &&
- (result = (atmp->tm_hour - btmp->tm_hour)) == 0 &&
- (result = (atmp->tm_min - btmp->tm_min)) == 0)
- result = atmp->tm_sec - btmp->tm_sec;
- return result;
-}
-
-static time_t
-time2sub(struct tm *tmp, void (*funcp) P((const time_t*, long, struct tm*)),
- const long offset, int *okayp, const int do_norm_secs)
-{
- register const struct state * sp;
- register int dir;
- register int bits;
- register int i, j ;
- register int saved_seconds;
- time_t newt;
- time_t t;
- struct tm yourtm, mytm;
-
- *okayp = false;
- yourtm = *tmp;
- if (do_norm_secs) {
- if (normalize_overflow(&yourtm.tm_min, &yourtm.tm_sec,
- SECSPERMIN))
- return WRONG;
- }
- if (normalize_overflow(&yourtm.tm_hour, &yourtm.tm_min, MINSPERHOUR))
- return WRONG;
- if (normalize_overflow(&yourtm.tm_mday, &yourtm.tm_hour, HOURSPERDAY))
- return WRONG;
- if (normalize_overflow(&yourtm.tm_year, &yourtm.tm_mon, MONSPERYEAR))
- return WRONG;
- /*
- ** Turn yourtm.tm_year into an actual year number for now.
- ** It is converted back to an offset from TM_YEAR_BASE later.
- */
- if (increment_overflow(&yourtm.tm_year, TM_YEAR_BASE))
- return WRONG;
- while (yourtm.tm_mday <= 0) {
- if (increment_overflow(&yourtm.tm_year, -1))
- return WRONG;
- i = yourtm.tm_year + (1 < yourtm.tm_mon);
- yourtm.tm_mday += year_lengths[isleap(i)];
- }
- while (yourtm.tm_mday > DAYSPERLYEAR) {
- i = yourtm.tm_year + (1 < yourtm.tm_mon);
- yourtm.tm_mday -= year_lengths[isleap(i)];
- if (increment_overflow(&yourtm.tm_year, 1))
- return WRONG;
- }
- for ( ; ; ) {
- i = mon_lengths[isleap(yourtm.tm_year)][yourtm.tm_mon];
- if (yourtm.tm_mday <= i)
- break;
- yourtm.tm_mday -= i;
- if (++yourtm.tm_mon >= MONSPERYEAR) {
- yourtm.tm_mon = 0;
- if (increment_overflow(&yourtm.tm_year, 1))
- return WRONG;
- }
- }
- if (increment_overflow(&yourtm.tm_year, -TM_YEAR_BASE))
- return WRONG;
- if (yourtm.tm_year + TM_YEAR_BASE < EPOCH_YEAR) {
- /*
- ** We can't set tm_sec to 0, because that might push the
- ** time below the minimum representable time.
- ** Set tm_sec to 59 instead.
- ** This assumes that the minimum representable time is
- ** not in the same minute that a leap second was deleted from,
- ** which is a safer assumption than using 58 would be.
- */
- if (increment_overflow(&yourtm.tm_sec, 1 - SECSPERMIN))
- return WRONG;
- saved_seconds = yourtm.tm_sec;
- yourtm.tm_sec = SECSPERMIN - 1;
- } else {
- saved_seconds = yourtm.tm_sec;
- yourtm.tm_sec = 0;
- }
- /*
- ** Divide the search space in half
- ** (this works whether time_t is signed or unsigned).
- */
- bits = TYPE_BIT(time_t) - 1;
- /*
- ** If time_t is signed, then 0 is just above the median,
- ** assuming two's complement arithmetic.
- ** If time_t is unsigned, then (1 << bits) is just above the median.
- */
- t = TYPE_SIGNED(time_t) ? 0 : (((time_t) 1) << bits);
- for ( ; ; ) {
- (*funcp)(&t, offset, &mytm);
- dir = tmcomp(&mytm, &yourtm);
- if (dir != 0) {
- if (bits-- < 0)
- return WRONG;
- if (bits < 0)
- --t; /* may be needed if new t is minimal */
- else if (dir > 0)
- t -= ((time_t) 1) << bits;
- else t += ((time_t) 1) << bits;
- continue;
- }
- if (yourtm.tm_isdst < 0 || mytm.tm_isdst == yourtm.tm_isdst)
- break;
- /*
- ** Right time, wrong type.
- ** Hunt for right time, right type.
- ** It's okay to guess wrong since the guess
- ** gets checked.
- */
- /*
- ** The (void *) casts are the benefit of SunOS 3.3 on Sun 2's.
- */
- sp = (const struct state *)
- (((void *) funcp == (void *) localsub) ?
- lclptr : gmtptr);
-#ifdef ALL_STATE
- if (sp == NULL)
- return WRONG;
-#endif /* defined ALL_STATE */
- for (i = sp->typecnt - 1; i >= 0; --i) {
- if (sp->ttis[i].tt_isdst != yourtm.tm_isdst)
- continue;
- for (j = sp->typecnt - 1; j >= 0; --j) {
- if (sp->ttis[j].tt_isdst == yourtm.tm_isdst)
- continue;
- newt = t + sp->ttis[j].tt_gmtoff -
- sp->ttis[i].tt_gmtoff;
- (*funcp)(&newt, offset, &mytm);
- if (tmcomp(&mytm, &yourtm) != 0)
- continue;
- if (mytm.tm_isdst != yourtm.tm_isdst)
- continue;
- /*
- ** We have a match.
- */
- t = newt;
- goto label;
- }
- }
- return WRONG;
- }
-label:
- newt = t + saved_seconds;
- if ((newt < t) != (saved_seconds < 0))
- return WRONG;
- t = newt;
- (*funcp)(&t, offset, tmp);
- *okayp = true;
- return t;
-}
-
-static time_t
-time2(struct tm *tmp, void (*funcp) P((const time_t*, long, struct tm*)),
- const long offset, int *okayp)
-{
- time_t t;
-
- /*
- ** First try without normalization of seconds
- ** (in case tm_sec contains a value associated with a leap second).
- ** If that fails, try with normalization of seconds.
- */
- t = time2sub(tmp, funcp, offset, okayp, false);
- return *okayp ? t : time2sub(tmp, funcp, offset, okayp, true);
-}
-
-static time_t
-time1(struct tm *tmp, void (*funcp) P((const time_t *, long, struct tm *)),
- const long offset)
-{
- register time_t t;
- register const struct state * sp;
- register int samei, otheri;
- int okay;
-
- if (tmp->tm_isdst > 1)
- tmp->tm_isdst = 1;
- t = time2(tmp, funcp, offset, &okay);
-#ifdef PCTS
- /*
- ** PCTS code courtesy Grant Sullivan (grant@osf.org).
- */
- if (okay)
- return t;
- if (tmp->tm_isdst < 0)
- tmp->tm_isdst = 0; /* reset to std and try again */
-#endif /* defined PCTS */
-#ifndef PCTS
- if (okay || tmp->tm_isdst < 0)
- return t;
-#endif /* !defined PCTS */
- /*
- ** We're supposed to assume that somebody took a time of one type
- ** and did some math on it that yielded a "struct tm" that's bad.
- ** We try to divine the type they started from and adjust to the
- ** type they need.
- */
- /*
- ** The (void *) casts are the benefit of SunOS 3.3 on Sun 2's.
- */
- sp = (const struct state *) (((void *) funcp == (void *) localsub) ?
- lclptr : gmtptr);
-#ifdef ALL_STATE
- if (sp == NULL)
- return WRONG;
-#endif /* defined ALL_STATE */
- for (samei = sp->typecnt - 1; samei >= 0; --samei) {
- if (sp->ttis[samei].tt_isdst != tmp->tm_isdst)
- continue;
- for (otheri = sp->typecnt - 1; otheri >= 0; --otheri) {
- if (sp->ttis[otheri].tt_isdst == tmp->tm_isdst)
- continue;
- tmp->tm_sec += sp->ttis[otheri].tt_gmtoff -
- sp->ttis[samei].tt_gmtoff;
- tmp->tm_isdst = !tmp->tm_isdst;
- t = time2(tmp, funcp, offset, &okay);
- if (okay)
- return t;
- tmp->tm_sec -= sp->ttis[otheri].tt_gmtoff -
- sp->ttis[samei].tt_gmtoff;
- tmp->tm_isdst = !tmp->tm_isdst;
- }
- }
- return WRONG;
-}
-
-extern "C" time_t
-mktime(struct tm *tmp)
-{
- tzset();
- return time1(tmp, localsub, 0L);
-}
-
-#ifdef STD_INSPIRED
-
-extern "C" time_t
-timelocal(struct tm *tmp)
-{
- tmp->tm_isdst = -1; /* in case it wasn't initialized */
- return mktime(tmp);
-}
-
-extern "C" time_t
-timegm(struct tm *tmp)
-{
- tmp->tm_isdst = 0;
- return time1(tmp, gmtsub, 0L);
-}
-
-extern "C" time_t
-timeoff(struct tm *tmp, const long offset)
-{
- tmp->tm_isdst = 0;
- return time1(tmp, gmtsub, offset);
-}
-
-#endif /* defined STD_INSPIRED */
-
-#ifdef CMUCS
-
-/*
-** The following is supplied for compatibility with
-** previous versions of the CMUCS runtime library.
-*/
-
-extern "C" long
-gtime(struct tm *tmp)
-{
- const time_t t = mktime(tmp);
-
- if (t == WRONG)
- return -1;
- return t;
-}
-
-#endif /* defined CMUCS */
-
-/*
-** XXX--is the below the right way to conditionalize??
-*/
-
-#ifdef STD_INSPIRED
-
-/*
-** IEEE Std 1003.1-1988 (POSIX) legislates that 536457599
-** shall correspond to "Wed Dec 31 23:59:59 UTC 1986", which
-** is not the case if we are accounting for leap seconds.
-** So, we provide the following conversion routines for use
-** when exchanging timestamps with POSIX conforming systems.
-*/
-
-static long
-leapcorr(time_t *timep)
-{
- register struct state * sp;
- register struct lsinfo * lp;
- register int i;
-
- sp = lclptr;
- i = sp->leapcnt;
- while (--i >= 0) {
- lp = &sp->lsis[i];
- if (*timep >= lp->ls_trans)
- return lp->ls_corr;
- }
- return 0;
-}
-
-extern "C" time_t
-time2posix(time_t t)
-{
- tzset();
- return t - leapcorr(&t);
-}
-
-extern "C" time_t
-posix2time(time_t t)
-{
- time_t x;
- time_t y;
-
- tzset();
- /*
- ** For a positive leap second hit, the result
- ** is not unique. For a negative leap second
- ** hit, the corresponding time doesn't exist,
- ** so we return an adjacent second.
- */
- x = t + leapcorr(&t);
- y = x - leapcorr(&x);
- if (y < t) {
- do {
- x++;
- y = x - leapcorr(&x);
- } while (y < t);
- if (t != y)
- return x - 1;
- } else if (y > t) {
- do {
- --x;
- y = x - leapcorr(&x);
- } while (y > t);
- if (t != y)
- return x + 1;
- }
- return x;
-}
-
-#endif /* defined STD_INSPIRED */
diff --git a/winsup/cygwin/lsearch.cc b/winsup/cygwin/lsearch.cc
deleted file mode 100644
index 9e2d93b..0000000
--- a/winsup/cygwin/lsearch.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Initial implementation:
- Copyright (c) 2002 Robert Drehmel
- All rights reserved.
-
- As long as the above copyright statement and this notice remain
- unchanged, you can do what ever you want with this file. */
-
-#include <stdint.h> /* for uint8_t */
-#include <string.h> /* for memcpy () prototype */
-
-static void *lwork (const void *, const void *, size_t *, size_t,
- int (*) (const void *, const void *), int);
-
-extern "C" void *
-lsearch (const void *key, void *base, size_t *nelp, size_t width,
- int (*compar) (const void *, const void *))
-{
- return lwork (key, base, nelp, width, compar, 1);
-}
-
-extern "C" void *
-lfind (const void *key, const void *base, size_t *nelp, size_t width,
- int (*compar) (const void *, const void *))
-{
- return lwork (key, base, nelp, width, compar, 0);
-}
-
-static void *
-lwork (const void *key, const void *base, size_t *nelp, size_t width,
- int (*compar) (const void *, const void *), int addelem)
-{
- uint8_t *ep, *endp;
-
- /* Cast to an integer value first to avoid the warning for removing
- 'const' via a cast. */
- ep = (uint8_t *) (uintptr_t)base;
- for (endp = (uint8_t *) (ep + width * *nelp); ep < endp; ep += width)
- if (compar (key, ep) == 0)
- return ep;
-
- /* lfind () shall return when the key was not found. */
- if (!addelem)
- return NULL;
-
- /* lsearch () adds the key to the end of the table and increments
- the number of elements. */
- memcpy (endp, key, width);
- ++*nelp;
-
- return endp;
-}
diff --git a/winsup/cygwin/malloc.cc b/winsup/cygwin/malloc.cc
deleted file mode 100644
index f9c3d55..0000000
--- a/winsup/cygwin/malloc.cc
+++ /dev/null
@@ -1,5064 +0,0 @@
-/*
- This is a version (aka dlmalloc) of malloc/free/realloc written by
- Doug Lea and released to the public domain, as explained at
- http://creativecommons.org/licenses/publicdomain. Send questions,
- comments, complaints, performance data, etc to dl@cs.oswego.edu
-
-* Version 2.8.3 Thu Sep 22 11:16:15 2005 Doug Lea (dl at gee)
-
- Note: There may be an updated version of this malloc obtainable at
- ftp://gee.cs.oswego.edu/pub/misc/malloc.c
- Check before installing!
-
-* Quickstart
-
- This library is all in one file to simplify the most common usage:
- ftp it, compile it (-O3), and link it into another program. All of
- the compile-time options default to reasonable values for use on
- most platforms. You might later want to step through various
- compile-time and dynamic tuning options.
-
- For convenience, an include file for code using this malloc is at:
- ftp://gee.cs.oswego.edu/pub/misc/malloc-2.8.3.h
- You don't really need this .h file unless you call functions not
- defined in your system include files. The .h file contains only the
- excerpts from this file needed for using this malloc on ANSI C/C++
- systems, so long as you haven't changed compile-time options about
- naming and tuning parameters. If you do, then you can create your
- own malloc.h that does include all settings by cutting at the point
- indicated below. Note that you may already by default be using a C
- library containing a malloc that is based on some version of this
- malloc (for example in linux). You might still want to use the one
- in this file to customize settings or to avoid overheads associated
- with library versions.
-
-* Vital statistics:
-
- Supported pointer/size_t representation: 4 or 8 bytes
- size_t MUST be an unsigned type of the same width as
- pointers. (If you are using an ancient system that declares
- size_t as a signed type, or need it to be a different width
- than pointers, you can use a previous release of this malloc
- (e.g. 2.7.2) supporting these.)
-
- Alignment: 8 bytes (default)
- This suffices for nearly all current machines and C compilers.
- However, you can define MALLOC_ALIGNMENT to be wider than this
- if necessary (up to 128bytes), at the expense of using more space.
-
- Minimum overhead per allocated chunk: 4 or 8 bytes (if 4byte sizes)
- 8 or 16 bytes (if 8byte sizes)
- Each malloced chunk has a hidden word of overhead holding size
- and status information, and additional cross-check word
- if FOOTERS is defined.
-
- Minimum allocated size: 4-byte ptrs: 16 bytes (including overhead)
- 8-byte ptrs: 32 bytes (including overhead)
-
- Even a request for zero bytes (i.e., malloc(0)) returns a
- pointer to something of the minimum allocatable size.
- The maximum overhead wastage (i.e., number of extra bytes
- allocated than were requested in malloc) is less than or equal
- to the minimum size, except for requests >= mmap_threshold that
- are serviced via mmap(), where the worst case wastage is about
- 32 bytes plus the remainder from a system page (the minimal
- mmap unit); typically 4096 or 8192 bytes.
-
- Security: static-safe; optionally more or less
- The "security" of malloc refers to the ability of malicious
- code to accentuate the effects of errors (for example, freeing
- space that is not currently malloc'ed or overwriting past the
- ends of chunks) in code that calls malloc. This malloc
- guarantees not to modify any memory locations below the base of
- heap, i.e., static variables, even in the presence of usage
- errors. The routines additionally detect most improper frees
- and reallocs. All this holds as long as the static bookkeeping
- for malloc itself is not corrupted by some other means. This
- is only one aspect of security -- these checks do not, and
- cannot, detect all possible programming errors.
-
- If FOOTERS is defined nonzero, then each allocated chunk
- carries an additional check word to verify that it was malloced
- from its space. These check words are the same within each
- execution of a program using malloc, but differ across
- executions, so externally crafted fake chunks cannot be
- freed. This improves security by rejecting frees/reallocs that
- could corrupt heap memory, in addition to the checks preventing
- writes to statics that are always on. This may further improve
- security at the expense of time and space overhead. (Note that
- FOOTERS may also be worth using with MSPACES.)
-
- By default detected errors cause the program to abort (calling
- "abort()"). You can override this to instead proceed past
- errors by defining PROCEED_ON_ERROR. In this case, a bad free
- has no effect, and a malloc that encounters a bad address
- caused by user overwrites will ignore the bad address by
- dropping pointers and indices to all known memory. This may
- be appropriate for programs that should continue if at all
- possible in the face of programming errors, although they may
- run out of memory because dropped memory is never reclaimed.
-
- If you don't like either of these options, you can define
- CORRUPTION_ERROR_ACTION and USAGE_ERROR_ACTION to do anything
- else. And if if you are sure that your program using malloc has
- no errors or vulnerabilities, you can define INSECURE to 1,
- which might (or might not) provide a small performance improvement.
-
- Thread-safety: NOT thread-safe unless USE_LOCKS defined
- When USE_LOCKS is defined, each public call to malloc, free,
- etc is surrounded with either a pthread mutex or a win32
- spinlock (depending on WIN32). This is not especially fast, and
- can be a major bottleneck. It is designed only to provide
- minimal protection in concurrent environments, and to provide a
- basis for extensions. If you are using malloc in a concurrent
- program, consider instead using ptmalloc, which is derived from
- a version of this malloc. (See http://www.malloc.de).
-
- System requirements: Any combination of MORECORE and/or MMAP/MUNMAP
- This malloc can use unix sbrk or any emulation (invoked using
- the CALL_MORECORE macro) and/or mmap/munmap or any emulation
- (invoked using CALL_MMAP/CALL_MUNMAP) to get and release system
- memory. On most unix systems, it tends to work best if both
- MORECORE and MMAP are enabled. On Win32, it uses emulations
- based on VirtualAlloc. It also uses common C library functions
- like memset.
-
- Compliance: I believe it is compliant with the Single Unix Specification
- (See http://www.unix.org). Also SVID/XPG, ANSI C, and probably
- others as well.
-
-* Overview of algorithms
-
- This is not the fastest, most space-conserving, most portable, or
- most tunable malloc ever written. However it is among the fastest
- while also being among the most space-conserving, portable and
- tunable. Consistent balance across these factors results in a good
- general-purpose allocator for malloc-intensive programs.
-
- In most ways, this malloc is a best-fit allocator. Generally, it
- chooses the best-fitting existing chunk for a request, with ties
- broken in approximately least-recently-used order. (This strategy
- normally maintains low fragmentation.) However, for requests less
- than 256bytes, it deviates from best-fit when there is not an
- exactly fitting available chunk by preferring to use space adjacent
- to that used for the previous small request, as well as by breaking
- ties in approximately most-recently-used order. (These enhance
- locality of series of small allocations.) And for very large requests
- (>= 256Kb by default), it relies on system memory mapping
- facilities, if supported. (This helps avoid carrying around and
- possibly fragmenting memory used only for large chunks.)
-
- All operations (except malloc_stats and mallinfo) have execution
- times that are bounded by a constant factor of the number of bits in
- a size_t, not counting any clearing in calloc or copying in realloc,
- or actions surrounding MORECORE and MMAP that have times
- proportional to the number of non-contiguous regions returned by
- system allocation routines, which is often just 1.
-
- The implementation is not very modular and seriously overuses
- macros. Perhaps someday all C compilers will do as good a job
- inlining modular code as can now be done by brute-force expansion,
- but now, enough of them seem not to.
-
- Some compilers issue a lot of warnings about code that is
- dead/unreachable only on some platforms, and also about intentional
- uses of negation on unsigned types. All known cases of each can be
- ignored.
-
- For a longer but out of date high-level description, see
- http://gee.cs.oswego.edu/dl/html/malloc.html
-
-* MSPACES
- If MSPACES is defined, then in addition to malloc, free, etc.,
- this file also defines mspace_malloc, mspace_free, etc. These
- are versions of malloc routines that take an "mspace" argument
- obtained using create_mspace, to control all internal bookkeeping.
- If ONLY_MSPACES is defined, only these versions are compiled.
- So if you would like to use this allocator for only some allocations,
- and your system malloc for others, you can compile with
- ONLY_MSPACES and then do something like...
- static mspace mymspace = create_mspace(0,0); // for example
- #define mymalloc(bytes) mspace_malloc(mymspace, bytes)
-
- (Note: If you only need one instance of an mspace, you can instead
- use "USE_DL_PREFIX" to relabel the global malloc.)
-
- You can similarly create thread-local allocators by storing
- mspaces as thread-locals. For example:
- static __thread mspace tlms = 0;
- void* tlmalloc(size_t bytes) {
- if (tlms == 0) tlms = create_mspace(0, 0);
- return mspace_malloc(tlms, bytes);
- }
- void tlfree(void* mem) { mspace_free(tlms, mem); }
-
- Unless FOOTERS is defined, each mspace is completely independent.
- You cannot allocate from one and free to another (although
- conformance is only weakly checked, so usage errors are not always
- caught). If FOOTERS is defined, then each chunk carries around a tag
- indicating its originating mspace, and frees are directed to their
- originating spaces.
-
- ------------------------- Compile-time options ---------------------------
-
-Be careful in setting #define values for numerical constants of type
-size_t. On some systems, literal values are not automatically extended
-to size_t precision unless they are explicitly casted.
-
-WIN32 default: defined if _WIN32 defined
- Defining WIN32 sets up defaults for MS environment and compilers.
- Otherwise defaults are for unix.
-
-MALLOC_ALIGNMENT default: (size_t)8
- Controls the minimum alignment for malloc'ed chunks. It must be a
- power of two and at least 8, even on machines for which smaller
- alignments would suffice. It may be defined as larger than this
- though. Note however that code and data structures are optimized for
- the case of 8-byte alignment.
-
-MSPACES default: 0 (false)
- If true, compile in support for independent allocation spaces.
- This is only supported if HAVE_MMAP is true.
-
-ONLY_MSPACES default: 0 (false)
- If true, only compile in mspace versions, not regular versions.
-
-USE_LOCKS default: 0 (false)
- Causes each call to each public routine to be surrounded with
- pthread or WIN32 mutex lock/unlock. (If set true, this can be
- overridden on a per-mspace basis for mspace versions.)
-
-FOOTERS default: 0
- If true, provide extra checking and dispatching by placing
- information in the footers of allocated chunks. This adds
- space and time overhead.
-
-INSECURE default: 0
- If true, omit checks for usage errors and heap space overwrites.
-
-USE_DL_PREFIX default: NOT defined
- Causes compiler to prefix all public routines with the string 'dl'.
- This can be useful when you only want to use this malloc in one part
- of a program, using your regular system malloc elsewhere.
-
-ABORT default: defined as abort()
- Defines how to abort on failed checks. On most systems, a failed
- check cannot die with an "assert" or even print an informative
- message, because the underlying print routines in turn call malloc,
- which will fail again. Generally, the best policy is to simply call
- abort(). It's not very useful to do more than this because many
- errors due to overwriting will show up as address faults (null, odd
- addresses etc) rather than malloc-triggered checks, so will also
- abort. Also, most compilers know that abort() does not return, so
- can better optimize code conditionally calling it.
-
-PROCEED_ON_ERROR default: defined as 0 (false)
- Controls whether detected bad addresses cause them to bypassed
- rather than aborting. If set, detected bad arguments to free and
- realloc are ignored. And all bookkeeping information is zeroed out
- upon a detected overwrite of freed heap space, thus losing the
- ability to ever return it from malloc again, but enabling the
- application to proceed. If PROCEED_ON_ERROR is defined, the
- static variable malloc_corruption_error_count is compiled in
- and can be examined to see if errors have occurred. This option
- generates slower code than the default abort policy.
-
-DEBUG default: NOT defined
- The DEBUG setting is mainly intended for people trying to modify
- this code or diagnose problems when porting to new platforms.
- However, it may also be able to better isolate user errors than just
- using runtime checks. The assertions in the check routines spell
- out in more detail the assumptions and invariants underlying the
- algorithms. The checking is fairly extensive, and will slow down
- execution noticeably. Calling malloc_stats or mallinfo with DEBUG
- set will attempt to check every non-mmapped allocated and free chunk
- in the course of computing the summaries.
-
-ABORT_ON_ASSERT_FAILURE default: defined as 1 (true)
- Debugging assertion failures can be nearly impossible if your
- version of the assert macro causes malloc to be called, which will
- lead to a cascade of further failures, blowing the runtime stack.
- ABORT_ON_ASSERT_FAILURE cause assertions failures to call abort(),
- which will usually make debugging easier.
-
-MALLOC_FAILURE_ACTION default: sets errno to ENOMEM, or no-op on win32
- The action to take before "return 0" when malloc fails to be able to
- return memory because there is none available.
-
-HAVE_MORECORE default: 1 (true) unless win32 or ONLY_MSPACES
- True if this system supports sbrk or an emulation of it.
-
-MORECORE default: sbrk
- The name of the sbrk-style system routine to call to obtain more
- memory. See below for guidance on writing custom MORECORE
- functions. The type of the argument to sbrk/MORECORE varies across
- systems. It cannot be size_t, because it supports negative
- arguments, so it is normally the signed type of the same width as
- size_t (sometimes declared as "intptr_t"). It doesn't much matter
- though. Internally, we only call it with arguments less than half
- the max value of a size_t, which should work across all reasonable
- possibilities, although sometimes generating compiler warnings. See
- near the end of this file for guidelines for creating a custom
- version of MORECORE.
-
-MORECORE_CONTIGUOUS default: 1 (true)
- If true, take advantage of fact that consecutive calls to MORECORE
- with positive arguments always return contiguous increasing
- addresses. This is true of unix sbrk. It does not hurt too much to
- set it true anyway, since malloc copes with non-contiguities.
- Setting it false when definitely non-contiguous saves time
- and possibly wasted space it would take to discover this though.
-
-MORECORE_CANNOT_TRIM default: NOT defined
- True if MORECORE cannot release space back to the system when given
- negative arguments. This is generally necessary only if you are
- using a hand-crafted MORECORE function that cannot handle negative
- arguments.
-
-HAVE_MMAP default: 1 (true)
- True if this system supports mmap or an emulation of it. If so, and
- HAVE_MORECORE is not true, MMAP is used for all system
- allocation. If set and HAVE_MORECORE is true as well, MMAP is
- primarily used to directly allocate very large blocks. It is also
- used as a backup strategy in cases where MORECORE fails to provide
- space from system. Note: A single call to MUNMAP is assumed to be
- able to unmap memory that may have be allocated using multiple calls
- to MMAP, so long as they are adjacent.
-
-HAVE_MREMAP default: 1 on linux, else 0
- If true realloc() uses mremap() to re-allocate large blocks and
- extend or shrink allocation spaces.
-
-MMAP_CLEARS default: 1 on unix
- True if mmap clears memory so calloc doesn't need to. This is true
- for standard unix mmap using /dev/zero.
-
-USE_BUILTIN_FFS default: 0 (i.e., not used)
- Causes malloc to use the builtin ffs() function to compute indices.
- Some compilers may recognize and intrinsify ffs to be faster than the
- supplied C version. Also, the case of x86 using gcc is special-cased
- to an asm instruction, so is already as fast as it can be, and so
- this setting has no effect. (On most x86s, the asm version is only
- slightly faster than the C version.)
-
-malloc_getpagesize default: derive from system includes, or 4096.
- The system page size. To the extent possible, this malloc manages
- memory from the system in page-size units. This may be (and
- usually is) a function rather than a constant. This is ignored
- if WIN32, where page size is determined using getSystemInfo during
- initialization.
-
-USE_DEV_RANDOM default: 0 (i.e., not used)
- Causes malloc to use /dev/random to initialize secure magic seed for
- stamping footers. Otherwise, the current time is used.
-
-NO_MALLINFO default: 0
- If defined, don't compile "mallinfo". This can be a simple way
- of dealing with mismatches between system declarations and
- those in this file.
-
-MALLINFO_FIELD_TYPE default: size_t
- The type of the fields in the mallinfo struct. This was originally
- defined as "int" in SVID etc, but is more usefully defined as
- size_t. The value is used only if HAVE_USR_INCLUDE_MALLOC_H is not set
-
-REALLOC_ZERO_BYTES_FREES default: not defined
- This should be set if a call to realloc with zero bytes should
- be the same as a call to free. Some people think it should. Otherwise,
- since this malloc returns a unique pointer for malloc(0), so does
- realloc(p, 0).
-
-LACKS_UNISTD_H, LACKS_FCNTL_H, LACKS_SYS_PARAM_H, LACKS_SYS_MMAN_H
-LACKS_STRINGS_H, LACKS_STRING_H, LACKS_SYS_TYPES_H, LACKS_ERRNO_H
-LACKS_STDLIB_H default: NOT defined unless on WIN32
- Define these if your system does not have these header files.
- You might need to manually insert some of the declarations they provide.
-
-DEFAULT_GRANULARITY default: page size if MORECORE_CONTIGUOUS,
- system_info.dwAllocationGranularity in WIN32,
- otherwise 64K.
- Also settable using mallopt(M_GRANULARITY, x)
- The unit for allocating and deallocating memory from the system. On
- most systems with contiguous MORECORE, there is no reason to
- make this more than a page. However, systems with MMAP tend to
- either require or encourage larger granularities. You can increase
- this value to prevent system allocation functions to be called so
- often, especially if they are slow. The value must be at least one
- page and must be a power of two. Setting to 0 causes initialization
- to either page size or win32 region size. (Note: In previous
- versions of malloc, the equivalent of this option was called
- "TOP_PAD")
-
-DEFAULT_TRIM_THRESHOLD default: 2MB
- Also settable using mallopt(M_TRIM_THRESHOLD, x)
- The maximum amount of unused top-most memory to keep before
- releasing via malloc_trim in free(). Automatic trimming is mainly
- useful in long-lived programs using contiguous MORECORE. Because
- trimming via sbrk can be slow on some systems, and can sometimes be
- wasteful (in cases where programs immediately afterward allocate
- more large chunks) the value should be high enough so that your
- overall system performance would improve by releasing this much
- memory. As a rough guide, you might set to a value close to the
- average size of a process (program) running on your system.
- Releasing this much memory would allow such a process to run in
- memory. Generally, it is worth tuning trim thresholds when a
- program undergoes phases where several large chunks are allocated
- and released in ways that can reuse each other's storage, perhaps
- mixed with phases where there are no such chunks at all. The trim
- value must be greater than page size to have any useful effect. To
- disable trimming completely, you can set to MAX_SIZE_T. Note that the trick
- some people use of mallocing a huge space and then freeing it at
- program startup, in an attempt to reserve system memory, doesn't
- have the intended effect under automatic trimming, since that memory
- will immediately be returned to the system.
-
-DEFAULT_MMAP_THRESHOLD default: 256K
- Also settable using mallopt(M_MMAP_THRESHOLD, x)
- The request size threshold for using MMAP to directly service a
- request. Requests of at least this size that cannot be allocated
- using already-existing space will be serviced via mmap. (If enough
- normal freed space already exists it is used instead.) Using mmap
- segregates relatively large chunks of memory so that they can be
- individually obtained and released from the host system. A request
- serviced through mmap is never reused by any other request (at least
- not directly; the system may just so happen to remap successive
- requests to the same locations). Segregating space in this way has
- the benefits that: Mmapped space can always be individually released
- back to the system, which helps keep the system level memory demands
- of a long-lived program low. Also, mapped memory doesn't become
- `locked' between other chunks, as can happen with normally allocated
- chunks, which means that even trimming via malloc_trim would not
- release them. However, it has the disadvantage that the space
- cannot be reclaimed, consolidated, and then used to service later
- requests, as happens with normal chunks. The advantages of mmap
- nearly always outweigh disadvantages for "large" chunks, but the
- value of "large" may vary across systems. The default is an
- empirically derived value that works well in most systems. You can
- disable mmap by setting to MAX_SIZE_T.
-
-*/
-
-#ifndef WIN32
-#ifdef _WIN32
-#define WIN32 1
-#endif /* _WIN32 */
-#endif /* WIN32 */
-#ifdef WIN32
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#define HAVE_MMAP 1
-#define HAVE_MORECORE 0
-#define LACKS_UNISTD_H
-#define LACKS_SYS_PARAM_H
-#define LACKS_SYS_MMAN_H
-#define LACKS_STRING_H
-#define LACKS_STRINGS_H
-#define LACKS_SYS_TYPES_H
-#define LACKS_ERRNO_H
-#define MALLOC_FAILURE_ACTION
-#define MMAP_CLEARS 0 /* WINCE and some others apparently don't clear */
-#endif /* WIN32 */
-
-#if defined(DARWIN) || defined(_DARWIN)
-/* Mac OSX docs advise not to use sbrk; it seems better to use mmap */
-#ifndef HAVE_MORECORE
-#define HAVE_MORECORE 0
-#define HAVE_MMAP 1
-#endif /* HAVE_MORECORE */
-#endif /* DARWIN */
-
-#ifndef LACKS_SYS_TYPES_H
-#include <sys/types.h> /* For size_t */
-#endif /* LACKS_SYS_TYPES_H */
-#ifdef __CYGWIN__
-#include "cygmalloc.h"
-#endif /* __CYGWIN__ */
-
-/* The maximum possible size_t value has all bits set */
-#define MAX_SIZE_T (~(size_t)0)
-
-#ifndef ONLY_MSPACES
-#define ONLY_MSPACES 0
-#endif /* ONLY_MSPACES */
-#ifndef MSPACES
-#if ONLY_MSPACES
-#define MSPACES 1
-#else /* ONLY_MSPACES */
-#define MSPACES 0
-#endif /* ONLY_MSPACES */
-#endif /* MSPACES */
-#ifndef MALLOC_ALIGNMENT
-#define MALLOC_ALIGNMENT ((size_t)8U)
-#endif /* MALLOC_ALIGNMENT */
-#ifndef FOOTERS
-#define FOOTERS 0
-#endif /* FOOTERS */
-#ifndef ABORT
-#define ABORT abort()
-#endif /* ABORT */
-#ifndef ABORT_ON_ASSERT_FAILURE
-#define ABORT_ON_ASSERT_FAILURE 1
-#endif /* ABORT_ON_ASSERT_FAILURE */
-#ifndef PROCEED_ON_ERROR
-#define PROCEED_ON_ERROR 0
-#endif /* PROCEED_ON_ERROR */
-#ifndef USE_LOCKS
-#define USE_LOCKS 0
-#endif /* USE_LOCKS */
-#ifndef INSECURE
-#define INSECURE 0
-#endif /* INSECURE */
-#ifndef HAVE_MMAP
-#define HAVE_MMAP 1
-#endif /* HAVE_MMAP */
-#ifndef MMAP_CLEARS
-#define MMAP_CLEARS 1
-#endif /* MMAP_CLEARS */
-#ifndef HAVE_MREMAP
-#ifdef linux
-#define HAVE_MREMAP 1
-#else /* linux */
-#define HAVE_MREMAP 0
-#endif /* linux */
-#endif /* HAVE_MREMAP */
-#ifndef MALLOC_FAILURE_ACTION
-#define MALLOC_FAILURE_ACTION errno = ENOMEM;
-#endif /* MALLOC_FAILURE_ACTION */
-#ifndef HAVE_MORECORE
-#if ONLY_MSPACES
-#define HAVE_MORECORE 0
-#else /* ONLY_MSPACES */
-#define HAVE_MORECORE 1
-#endif /* ONLY_MSPACES */
-#endif /* HAVE_MORECORE */
-#if !HAVE_MORECORE
-#define MORECORE_CONTIGUOUS 0
-#else /* !HAVE_MORECORE */
-#ifndef MORECORE
-#define MORECORE sbrk
-#endif /* MORECORE */
-#ifndef MORECORE_CONTIGUOUS
-#define MORECORE_CONTIGUOUS 1
-#endif /* MORECORE_CONTIGUOUS */
-#endif /* HAVE_MORECORE */
-#ifndef DEFAULT_GRANULARITY
-#if MORECORE_CONTIGUOUS
-#define DEFAULT_GRANULARITY (0) /* 0 means to compute in init_mparams */
-#else /* MORECORE_CONTIGUOUS */
-#define DEFAULT_GRANULARITY ((size_t)64U * (size_t)1024U)
-#endif /* MORECORE_CONTIGUOUS */
-#endif /* DEFAULT_GRANULARITY */
-#ifndef DEFAULT_TRIM_THRESHOLD
-#ifndef MORECORE_CANNOT_TRIM
-#define DEFAULT_TRIM_THRESHOLD ((size_t)2U * (size_t)1024U * (size_t)1024U)
-#else /* MORECORE_CANNOT_TRIM */
-#define DEFAULT_TRIM_THRESHOLD MAX_SIZE_T
-#endif /* MORECORE_CANNOT_TRIM */
-#endif /* DEFAULT_TRIM_THRESHOLD */
-#ifndef DEFAULT_MMAP_THRESHOLD
-#if HAVE_MMAP
-#define DEFAULT_MMAP_THRESHOLD ((size_t)256U * (size_t)1024U)
-#else /* HAVE_MMAP */
-#define DEFAULT_MMAP_THRESHOLD MAX_SIZE_T
-#endif /* HAVE_MMAP */
-#endif /* DEFAULT_MMAP_THRESHOLD */
-#ifndef USE_BUILTIN_FFS
-#define USE_BUILTIN_FFS 0
-#endif /* USE_BUILTIN_FFS */
-#ifndef USE_DEV_RANDOM
-#define USE_DEV_RANDOM 0
-#endif /* USE_DEV_RANDOM */
-#ifndef NO_MALLINFO
-#define NO_MALLINFO 0
-#endif /* NO_MALLINFO */
-#ifndef MALLINFO_FIELD_TYPE
-#define MALLINFO_FIELD_TYPE size_t
-#endif /* MALLINFO_FIELD_TYPE */
-
-/*
- mallopt tuning options. SVID/XPG defines four standard parameter
- numbers for mallopt, normally defined in malloc.h. None of these
- are used in this malloc, so setting them has no effect. But this
- malloc does support the following options.
-*/
-
-#define M_TRIM_THRESHOLD (-1)
-#define M_GRANULARITY (-2)
-#define M_MMAP_THRESHOLD (-3)
-
-/* ------------------------ Mallinfo declarations ------------------------ */
-
-#if !NO_MALLINFO
-/*
- This version of malloc supports the standard SVID/XPG mallinfo
- routine that returns a struct containing usage properties and
- statistics. It should work on any system that has a
- /usr/include/malloc.h defining struct mallinfo. The main
- declaration needed is the mallinfo struct that is returned (by-copy)
- by mallinfo(). The malloinfo struct contains a bunch of fields that
- are not even meaningful in this version of malloc. These fields are
- are instead filled by mallinfo() with other numbers that might be of
- interest.
-
- HAVE_USR_INCLUDE_MALLOC_H should be set if you have a
- /usr/include/malloc.h file that includes a declaration of struct
- mallinfo. If so, it is included; else a compliant version is
- declared below. These must be precisely the same for mallinfo() to
- work. The original SVID version of this struct, defined on most
- systems with mallinfo, declares all fields as ints. But some others
- define as unsigned long. If your system defines the fields using a
- type of different width than listed here, you MUST #include your
- system version and #define HAVE_USR_INCLUDE_MALLOC_H.
-*/
-
-/* #define HAVE_USR_INCLUDE_MALLOC_H */
-
-#ifdef HAVE_USR_INCLUDE_MALLOC_H
-#include "/usr/include/malloc.h"
-#else /* HAVE_USR_INCLUDE_MALLOC_H */
-
-struct mallinfo {
- MALLINFO_FIELD_TYPE arena; /* non-mmapped space allocated from system */
- MALLINFO_FIELD_TYPE ordblks; /* number of free chunks */
- MALLINFO_FIELD_TYPE smblks; /* always 0 */
- MALLINFO_FIELD_TYPE hblks; /* always 0 */
- MALLINFO_FIELD_TYPE hblkhd; /* space in mmapped regions */
- MALLINFO_FIELD_TYPE usmblks; /* maximum total allocated space */
- MALLINFO_FIELD_TYPE fsmblks; /* always 0 */
- MALLINFO_FIELD_TYPE uordblks; /* total allocated space */
- MALLINFO_FIELD_TYPE fordblks; /* total free space */
- MALLINFO_FIELD_TYPE keepcost; /* releasable (via malloc_trim) space */
-};
-
-#endif /* HAVE_USR_INCLUDE_MALLOC_H */
-#endif /* NO_MALLINFO */
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#if !ONLY_MSPACES
-
-/* ------------------- Declarations of public routines ------------------- */
-
-#ifndef USE_DL_PREFIX
-#define dlcalloc calloc
-#define dlfree free
-#define dlmalloc malloc
-#define dlmemalign memalign
-#define dlrealloc realloc
-#define dlvalloc valloc
-#define dlpvalloc pvalloc
-#define dlmallinfo mallinfo
-#define dlmallopt mallopt
-#define dlmalloc_trim malloc_trim
-#define dlmalloc_stats malloc_stats
-#define dlmalloc_usable_size malloc_usable_size
-#define dlmalloc_footprint malloc_footprint
-#define dlmalloc_max_footprint malloc_max_footprint
-#define dlindependent_calloc independent_calloc
-#define dlindependent_comalloc independent_comalloc
-#endif /* USE_DL_PREFIX */
-
-
-/*
- malloc(size_t n)
- Returns a pointer to a newly allocated chunk of at least n bytes, or
- null if no space is available, in which case errno is set to ENOMEM
- on ANSI C systems.
-
- If n is zero, malloc returns a minimum-sized chunk. (The minimum
- size is 16 bytes on most 32bit systems, and 32 bytes on 64bit
- systems.) Note that size_t is an unsigned type, so calls with
- arguments that would be negative if signed are interpreted as
- requests for huge amounts of space, which will often fail. The
- maximum supported value of n differs across systems, but is in all
- cases less than the maximum representable value of a size_t.
-*/
-void* dlmalloc(size_t);
-
-/*
- free(void* p)
- Releases the chunk of memory pointed to by p, that had been previously
- allocated using malloc or a related routine such as realloc.
- It has no effect if p is null. If p was not malloced or already
- freed, free(p) will by default cause the current program to abort.
-*/
-void dlfree(void*);
-
-/*
- calloc(size_t n_elements, size_t element_size);
- Returns a pointer to n_elements * element_size bytes, with all locations
- set to zero.
-*/
-void* dlcalloc(size_t, size_t);
-
-/*
- realloc(void* p, size_t n)
- Returns a pointer to a chunk of size n that contains the same data
- as does chunk p up to the minimum of (n, p's size) bytes, or null
- if no space is available.
-
- The returned pointer may or may not be the same as p. The algorithm
- prefers extending p in most cases when possible, otherwise it
- employs the equivalent of a malloc-copy-free sequence.
-
- If p is null, realloc is equivalent to malloc.
-
- If space is not available, realloc returns null, errno is set (if on
- ANSI) and p is NOT freed.
-
- if n is for fewer bytes than already held by p, the newly unused
- space is lopped off and freed if possible. realloc with a size
- argument of zero (re)allocates a minimum-sized chunk.
-
- The old unix realloc convention of allowing the last-free'd chunk
- to be used as an argument to realloc is not supported.
-*/
-
-void* dlrealloc(void*, size_t);
-
-/*
- memalign(size_t alignment, size_t n);
- Returns a pointer to a newly allocated chunk of n bytes, aligned
- in accord with the alignment argument.
-
- The alignment argument should be a power of two. If the argument is
- not a power of two, the nearest greater power is used.
- 8-byte alignment is guaranteed by normal malloc calls, so don't
- bother calling memalign with an argument of 8 or less.
-
- Overreliance on memalign is a sure way to fragment space.
-*/
-void* dlmemalign(size_t, size_t);
-
-/*
- valloc(size_t n);
- Equivalent to memalign(pagesize, n), where pagesize is the page
- size of the system. If the pagesize is unknown, 4096 is used.
-*/
-void* dlvalloc(size_t);
-
-/*
- mallopt(int parameter_number, int parameter_value)
- Sets tunable parameters The format is to provide a
- (parameter-number, parameter-value) pair. mallopt then sets the
- corresponding parameter to the argument value if it can (i.e., so
- long as the value is meaningful), and returns 1 if successful else
- 0. SVID/XPG/ANSI defines four standard param numbers for mallopt,
- normally defined in malloc.h. None of these are use in this malloc,
- so setting them has no effect. But this malloc also supports other
- options in mallopt. See below for details. Briefly, supported
- parameters are as follows (listed defaults are for "typical"
- configurations).
-
- Symbol param # default allowed param values
- M_TRIM_THRESHOLD -1 2*1024*1024 any (MAX_SIZE_T disables)
- M_GRANULARITY -2 page size any power of 2 >= page size
- M_MMAP_THRESHOLD -3 256*1024 any (or 0 if no MMAP support)
-*/
-int dlmallopt(int, int);
-
-/*
- malloc_footprint();
- Returns the number of bytes obtained from the system. The total
- number of bytes allocated by malloc, realloc etc., is less than this
- value. Unlike mallinfo, this function returns only a precomputed
- result, so can be called frequently to monitor memory consumption.
- Even if locks are otherwise defined, this function does not use them,
- so results might not be up to date.
-*/
-size_t dlmalloc_footprint(void);
-
-/*
- malloc_max_footprint();
- Returns the maximum number of bytes obtained from the system. This
- value will be greater than current footprint if deallocated space
- has been reclaimed by the system. The peak number of bytes allocated
- by malloc, realloc etc., is less than this value. Unlike mallinfo,
- this function returns only a precomputed result, so can be called
- frequently to monitor memory consumption. Even if locks are
- otherwise defined, this function does not use them, so results might
- not be up to date.
-*/
-size_t dlmalloc_max_footprint(void);
-
-#if !NO_MALLINFO
-/*
- mallinfo()
- Returns (by copy) a struct containing various summary statistics:
-
- arena: current total non-mmapped bytes allocated from system
- ordblks: the number of free chunks
- smblks: always zero.
- hblks: current number of mmapped regions
- hblkhd: total bytes held in mmapped regions
- usmblks: the maximum total allocated space. This will be greater
- than current total if trimming has occurred.
- fsmblks: always zero
- uordblks: current total allocated space (normal or mmapped)
- fordblks: total free space
- keepcost: the maximum number of bytes that could ideally be released
- back to system via malloc_trim. ("ideally" means that
- it ignores page restrictions etc.)
-
- Because these fields are ints, but internal bookkeeping may
- be kept as longs, the reported values may wrap around zero and
- thus be inaccurate.
-*/
-struct mallinfo dlmallinfo(void);
-#endif /* NO_MALLINFO */
-
-/*
- independent_calloc(size_t n_elements, size_t element_size, void* chunks[]);
-
- independent_calloc is similar to calloc, but instead of returning a
- single cleared space, it returns an array of pointers to n_elements
- independent elements that can hold contents of size elem_size, each
- of which starts out cleared, and can be independently freed,
- realloc'ed etc. The elements are guaranteed to be adjacently
- allocated (this is not guaranteed to occur with multiple callocs or
- mallocs), which may also improve cache locality in some
- applications.
-
- The "chunks" argument is optional (i.e., may be null, which is
- probably the most typical usage). If it is null, the returned array
- is itself dynamically allocated and should also be freed when it is
- no longer needed. Otherwise, the chunks array must be of at least
- n_elements in length. It is filled in with the pointers to the
- chunks.
-
- In either case, independent_calloc returns this pointer array, or
- null if the allocation failed. If n_elements is zero and "chunks"
- is null, it returns a chunk representing an array with zero elements
- (which should be freed if not wanted).
-
- Each element must be individually freed when it is no longer
- needed. If you'd like to instead be able to free all at once, you
- should instead use regular calloc and assign pointers into this
- space to represent elements. (In this case though, you cannot
- independently free elements.)
-
- independent_calloc simplifies and speeds up implementations of many
- kinds of pools. It may also be useful when constructing large data
- structures that initially have a fixed number of fixed-sized nodes,
- but the number is not known at compile time, and some of the nodes
- may later need to be freed. For example:
-
- struct Node { int item; struct Node* next; };
-
- struct Node* build_list() {
- struct Node** pool;
- int n = read_number_of_nodes_needed();
- if (n <= 0) return 0;
- pool = (struct Node**)(independent_calloc(n, sizeof(struct Node), 0);
- if (pool == 0) die();
- // organize into a linked list...
- struct Node* first = pool[0];
- for (i = 0; i < n-1; ++i)
- pool[i]->next = pool[i+1];
- free(pool); // Can now free the array (or not, if it is needed later)
- return first;
- }
-*/
-void** dlindependent_calloc(size_t, size_t, void**);
-
-/*
- independent_comalloc(size_t n_elements, size_t sizes[], void* chunks[]);
-
- independent_comalloc allocates, all at once, a set of n_elements
- chunks with sizes indicated in the "sizes" array. It returns
- an array of pointers to these elements, each of which can be
- independently freed, realloc'ed etc. The elements are guaranteed to
- be adjacently allocated (this is not guaranteed to occur with
- multiple callocs or mallocs), which may also improve cache locality
- in some applications.
-
- The "chunks" argument is optional (i.e., may be null). If it is null
- the returned array is itself dynamically allocated and should also
- be freed when it is no longer needed. Otherwise, the chunks array
- must be of at least n_elements in length. It is filled in with the
- pointers to the chunks.
-
- In either case, independent_comalloc returns this pointer array, or
- null if the allocation failed. If n_elements is zero and chunks is
- null, it returns a chunk representing an array with zero elements
- (which should be freed if not wanted).
-
- Each element must be individually freed when it is no longer
- needed. If you'd like to instead be able to free all at once, you
- should instead use a single regular malloc, and assign pointers at
- particular offsets in the aggregate space. (In this case though, you
- cannot independently free elements.)
-
- independent_comallac differs from independent_calloc in that each
- element may have a different size, and also that it does not
- automatically clear elements.
-
- independent_comalloc can be used to speed up allocation in cases
- where several structs or objects must always be allocated at the
- same time. For example:
-
- struct Head { ... }
- struct Foot { ... }
-
- void send_message(char* msg) {
- int msglen = strlen(msg);
- size_t sizes[3] = { sizeof(struct Head), msglen, sizeof(struct Foot) };
- void* chunks[3];
- if (independent_comalloc(3, sizes, chunks) == 0)
- die();
- struct Head* head = (struct Head*)(chunks[0]);
- char* body = (char*)(chunks[1]);
- struct Foot* foot = (struct Foot*)(chunks[2]);
- // ...
- }
-
- In general though, independent_comalloc is worth using only for
- larger values of n_elements. For small values, you probably won't
- detect enough difference from series of malloc calls to bother.
-
- Overuse of independent_comalloc can increase overall memory usage,
- since it cannot reuse existing noncontiguous small chunks that
- might be available for some of the elements.
-*/
-void** dlindependent_comalloc(size_t, size_t*, void**);
-
-
-/*
- pvalloc(size_t n);
- Equivalent to valloc(minimum-page-that-holds(n)), that is,
- round up n to nearest pagesize.
- */
-void* dlpvalloc(size_t);
-
-/*
- malloc_trim(size_t pad);
-
- If possible, gives memory back to the system (via negative arguments
- to sbrk) if there is unused memory at the `high' end of the malloc
- pool or in unused MMAP segments. You can call this after freeing
- large blocks of memory to potentially reduce the system-level memory
- requirements of a program. However, it cannot guarantee to reduce
- memory. Under some allocation patterns, some large free blocks of
- memory will be locked between two used chunks, so they cannot be
- given back to the system.
-
- The `pad' argument to malloc_trim represents the amount of free
- trailing space to leave untrimmed. If this argument is zero, only
- the minimum amount of memory to maintain internal data structures
- will be left. Non-zero arguments can be supplied to maintain enough
- trailing space to service future expected allocations without having
- to re-obtain memory from the system.
-
- Malloc_trim returns 1 if it actually released any memory, else 0.
-*/
-int dlmalloc_trim(size_t);
-
-/*
- malloc_usable_size(void* p);
-
- Returns the number of bytes you can actually use in
- an allocated chunk, which may be more than you requested (although
- often not) due to alignment and minimum size constraints.
- You can use this many bytes without worrying about
- overwriting other allocated objects. This is not a particularly great
- programming practice. malloc_usable_size can be more useful in
- debugging and assertions, for example:
-
- p = malloc(n);
- assert(malloc_usable_size(p) >= 256);
-*/
-size_t dlmalloc_usable_size(void*);
-
-/*
- malloc_stats();
- Prints on stderr the amount of space obtained from the system (both
- via sbrk and mmap), the maximum amount (which may be more than
- current if malloc_trim and/or munmap got called), and the current
- number of bytes allocated via malloc (or realloc, etc) but not yet
- freed. Note that this is the number of bytes allocated, not the
- number requested. It will be larger than the number requested
- because of alignment and bookkeeping overhead. Because it includes
- alignment wastage as being in use, this figure may be greater than
- zero even when no user-level chunks are allocated.
-
- The reported current and maximum system memory can be inaccurate if
- a program makes other calls to system memory allocation functions
- (normally sbrk) outside of malloc.
-
- malloc_stats prints only the most commonly interesting statistics.
- More information can be obtained by calling mallinfo.
-*/
-void dlmalloc_stats(void);
-
-#endif /* ONLY_MSPACES */
-
-#if MSPACES
-
-/*
- mspace is an opaque type representing an independent
- region of space that supports mspace_malloc, etc.
-*/
-typedef void* mspace;
-
-/*
- create_mspace creates and returns a new independent space with the
- given initial capacity, or, if 0, the default granularity size. It
- returns null if there is no system memory available to create the
- space. If argument locked is non-zero, the space uses a separate
- lock to control access. The capacity of the space will grow
- dynamically as needed to service mspace_malloc requests. You can
- control the sizes of incremental increases of this space by
- compiling with a different DEFAULT_GRANULARITY or dynamically
- setting with mallopt(M_GRANULARITY, value).
-*/
-mspace create_mspace(size_t capacity, int locked);
-
-/*
- destroy_mspace destroys the given space, and attempts to return all
- of its memory back to the system, returning the total number of
- bytes freed. After destruction, the results of access to all memory
- used by the space become undefined.
-*/
-size_t destroy_mspace(mspace msp);
-
-/*
- create_mspace_with_base uses the memory supplied as the initial base
- of a new mspace. Part (less than 128*sizeof(size_t) bytes) of this
- space is used for bookkeeping, so the capacity must be at least this
- large. (Otherwise 0 is returned.) When this initial space is
- exhausted, additional memory will be obtained from the system.
- Destroying this space will deallocate all additionally allocated
- space (if possible) but not the initial base.
-*/
-mspace create_mspace_with_base(void* base, size_t capacity, int locked);
-
-/*
- mspace_malloc behaves as malloc, but operates within
- the given space.
-*/
-void* mspace_malloc(mspace msp, size_t bytes);
-
-/*
- mspace_free behaves as free, but operates within
- the given space.
-
- If compiled with FOOTERS==1, mspace_free is not actually needed.
- free may be called instead of mspace_free because freed chunks from
- any space are handled by their originating spaces.
-*/
-void mspace_free(mspace msp, void* mem);
-
-/*
- mspace_realloc behaves as realloc, but operates within
- the given space.
-
- If compiled with FOOTERS==1, mspace_realloc is not actually
- needed. realloc may be called instead of mspace_realloc because
- realloced chunks from any space are handled by their originating
- spaces.
-*/
-void* mspace_realloc(mspace msp, void* mem, size_t newsize);
-
-/*
- mspace_calloc behaves as calloc, but operates within
- the given space.
-*/
-void* mspace_calloc(mspace msp, size_t n_elements, size_t elem_size);
-
-/*
- mspace_memalign behaves as memalign, but operates within
- the given space.
-*/
-void* mspace_memalign(mspace msp, size_t alignment, size_t bytes);
-
-/*
- mspace_independent_calloc behaves as independent_calloc, but
- operates within the given space.
-*/
-void** mspace_independent_calloc(mspace msp, size_t n_elements,
- size_t elem_size, void* chunks[]);
-
-/*
- mspace_independent_comalloc behaves as independent_comalloc, but
- operates within the given space.
-*/
-void** mspace_independent_comalloc(mspace msp, size_t n_elements,
- size_t sizes[], void* chunks[]);
-
-/*
- mspace_footprint() returns the number of bytes obtained from the
- system for this space.
-*/
-size_t mspace_footprint(mspace msp);
-
-/*
- mspace_max_footprint() returns the peak number of bytes obtained from the
- system for this space.
-*/
-size_t mspace_max_footprint(mspace msp);
-
-
-#if !NO_MALLINFO
-/*
- mspace_mallinfo behaves as mallinfo, but reports properties of
- the given space.
-*/
-struct mallinfo mspace_mallinfo(mspace msp);
-#endif /* NO_MALLINFO */
-
-/*
- mspace_malloc_stats behaves as malloc_stats, but reports
- properties of the given space.
-*/
-void mspace_malloc_stats(mspace msp);
-
-/*
- mspace_trim behaves as malloc_trim, but
- operates within the given space.
-*/
-int mspace_trim(mspace msp, size_t pad);
-
-/*
- An alias for mallopt.
-*/
-int mspace_mallopt(int, int);
-
-#endif /* MSPACES */
-
-#ifdef __cplusplus
-}; /* end of extern "C" */
-#endif /* __cplusplus */
-
-/*
- ========================================================================
- To make a fully customizable malloc.h header file, cut everything
- above this line, put into file malloc.h, edit to suit, and #include it
- on the next line, as well as in programs that use this malloc.
- ========================================================================
-*/
-
-/* #include "malloc.h" */
-
-/*------------------------------ internal #includes ---------------------- */
-
-#ifdef WIN32
-#pragma warning( disable : 4146 ) /* no "unsigned" warnings */
-#endif /* WIN32 */
-
-#include <stdio.h> /* for printing in malloc_stats */
-
-#ifndef LACKS_ERRNO_H
-#include <errno.h> /* for MALLOC_FAILURE_ACTION */
-#endif /* LACKS_ERRNO_H */
-#if FOOTERS
-#include <time.h> /* for magic initialization */
-#endif /* FOOTERS */
-#ifndef LACKS_STDLIB_H
-#include <stdlib.h> /* for abort() */
-#endif /* LACKS_STDLIB_H */
-#ifdef DEBUG
-#if ABORT_ON_ASSERT_FAILURE
-#define assert(x) if(!(x)) ABORT
-#else /* ABORT_ON_ASSERT_FAILURE */
-#include <assert.h>
-#endif /* ABORT_ON_ASSERT_FAILURE */
-#else /* DEBUG */
-#define assert(x)
-#endif /* DEBUG */
-#ifndef LACKS_STRING_H
-#include <string.h> /* for memset etc */
-#endif /* LACKS_STRING_H */
-#if USE_BUILTIN_FFS
-#ifndef LACKS_STRINGS_H
-#include <strings.h> /* for ffs */
-#endif /* LACKS_STRINGS_H */
-#endif /* USE_BUILTIN_FFS */
-#if HAVE_MMAP
-#ifndef LACKS_SYS_MMAN_H
-#include <sys/mman.h> /* for mmap */
-#endif /* LACKS_SYS_MMAN_H */
-#ifndef LACKS_FCNTL_H
-#include <fcntl.h>
-#endif /* LACKS_FCNTL_H */
-#endif /* HAVE_MMAP */
-#if HAVE_MORECORE
-#ifndef LACKS_UNISTD_H
-#include <unistd.h> /* for sbrk */
-#else /* LACKS_UNISTD_H */
-#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
-extern void* sbrk(ptrdiff_t);
-#endif /* FreeBSD etc */
-#endif /* LACKS_UNISTD_H */
-#endif /* HAVE_MMAP */
-
-#ifndef WIN32
-#ifndef malloc_getpagesize
-# ifdef _SC_PAGESIZE /* some SVR4 systems omit an underscore */
-# ifndef _SC_PAGE_SIZE
-# define _SC_PAGE_SIZE _SC_PAGESIZE
-# endif
-# endif
-# ifdef _SC_PAGE_SIZE
-# define malloc_getpagesize sysconf(_SC_PAGE_SIZE)
-# else
-# if defined(BSD) || defined(DGUX) || defined(HAVE_GETPAGESIZE)
- extern size_t getpagesize();
-# define malloc_getpagesize getpagesize()
-# else
-# ifdef WIN32 /* use supplied emulation of getpagesize */
-# define malloc_getpagesize getpagesize()
-# else
-# ifndef LACKS_SYS_PARAM_H
-# include <sys/param.h>
-# endif
-# ifdef EXEC_PAGESIZE
-# define malloc_getpagesize EXEC_PAGESIZE
-# else
-# ifdef NBPG
-# ifndef CLSIZE
-# define malloc_getpagesize NBPG
-# else
-# define malloc_getpagesize (NBPG * CLSIZE)
-# endif
-# else
-# ifdef NBPC
-# define malloc_getpagesize NBPC
-# else
-# ifdef PAGESIZE
-# define malloc_getpagesize PAGESIZE
-# else /* just guess */
-# define malloc_getpagesize ((size_t)4096U)
-# endif
-# endif
-# endif
-# endif
-# endif
-# endif
-# endif
-#endif
-#endif
-
-/* ------------------- size_t and alignment properties -------------------- */
-
-/* The byte and bit size of a size_t */
-#define SIZE_T_SIZE (sizeof(size_t))
-#define SIZE_T_BITSIZE (sizeof(size_t) << 3)
-
-/* Some constants coerced to size_t */
-/* Annoying but necessary to avoid errors on some plaftorms */
-#define SIZE_T_ZERO ((size_t)0)
-#define SIZE_T_ONE ((size_t)1)
-#define SIZE_T_TWO ((size_t)2)
-#define TWO_SIZE_T_SIZES (SIZE_T_SIZE<<1)
-#define FOUR_SIZE_T_SIZES (SIZE_T_SIZE<<2)
-#define SIX_SIZE_T_SIZES (FOUR_SIZE_T_SIZES+TWO_SIZE_T_SIZES)
-#define HALF_MAX_SIZE_T (MAX_SIZE_T / 2U)
-
-/* The bit mask value corresponding to MALLOC_ALIGNMENT */
-#define CHUNK_ALIGN_MASK (MALLOC_ALIGNMENT - SIZE_T_ONE)
-
-/* True if address a has acceptable alignment */
-#define is_aligned(A) (((size_t)((A)) & (CHUNK_ALIGN_MASK)) == 0)
-
-/* the number of bytes to offset an address to align it */
-#define align_offset(A)\
- ((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
- ((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
-
-/* -------------------------- MMAP preliminaries ------------------------- */
-
-/*
- If HAVE_MORECORE or HAVE_MMAP are false, we just define calls and
- checks to fail so compiler optimizer can delete code rather than
- using so many "#if"s.
-*/
-
-
-/* MORECORE and MMAP must return MFAIL on failure */
-#define MFAIL ((void*)(MAX_SIZE_T))
-#define CMFAIL ((char*)(MFAIL)) /* defined for convenience */
-
-#if !HAVE_MMAP
-#define IS_MMAPPED_BIT (SIZE_T_ZERO)
-#define USE_MMAP_BIT (SIZE_T_ZERO)
-#define CALL_MMAP(s) MFAIL
-#define CALL_MUNMAP(a, s) (-1)
-#define DIRECT_MMAP(s) MFAIL
-
-#else /* HAVE_MMAP */
-#define IS_MMAPPED_BIT (SIZE_T_ONE)
-#define USE_MMAP_BIT (SIZE_T_ONE)
-
-#ifndef WIN32
-#define CALL_MUNMAP(a, s) munmap((a), (s))
-#define MMAP_PROT (PROT_READ|PROT_WRITE)
-#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
-#define MAP_ANONYMOUS MAP_ANON
-#endif /* MAP_ANON */
-#ifdef MAP_ANONYMOUS
-#define MMAP_FLAGS (MAP_PRIVATE|MAP_ANONYMOUS)
-#define CALL_MMAP(s) mmap(0, (s), MMAP_PROT, MMAP_FLAGS, -1, 0)
-#else /* MAP_ANONYMOUS */
-/*
- Nearly all versions of mmap support MAP_ANONYMOUS, so the following
- is unlikely to be needed, but is supplied just in case.
-*/
-#define MMAP_FLAGS (MAP_PRIVATE)
-static int dev_zero_fd = -1; /* Cached file descriptor for /dev/zero. */
-#define CALL_MMAP(s) ((dev_zero_fd < 0) ? \
- (dev_zero_fd = open("/dev/zero", O_RDWR), \
- mmap(0, (s), MMAP_PROT, MMAP_FLAGS, dev_zero_fd, 0)) : \
- mmap(0, (s), MMAP_PROT, MMAP_FLAGS, dev_zero_fd, 0))
-#endif /* MAP_ANONYMOUS */
-
-#define DIRECT_MMAP(s) CALL_MMAP(s)
-#else /* WIN32 */
-
-/* Win32 MMAP via VirtualAlloc */
-static void* win32mmap(size_t size) {
- void* ptr = VirtualAlloc(0, size, MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE);
- return (ptr != 0)? ptr: MFAIL;
-}
-
-/* For direct MMAP, use MEM_TOP_DOWN to minimize interference */
-static void* win32direct_mmap(size_t size) {
- void* ptr = VirtualAlloc(0, size, MEM_RESERVE|MEM_COMMIT|MEM_TOP_DOWN,
- PAGE_READWRITE);
- return (ptr != 0)? ptr: MFAIL;
-}
-
-/* This function supports releasing coalesed segments */
-static int win32munmap(void* ptr, size_t size) {
- MEMORY_BASIC_INFORMATION minfo;
- char* cptr = ptr;
- while (size) {
- if (VirtualQuery(cptr, &minfo, sizeof(minfo)) == 0)
- return -1;
- if (minfo.BaseAddress != cptr || minfo.AllocationBase != cptr ||
- minfo.State != MEM_COMMIT || minfo.RegionSize > size)
- return -1;
- if (VirtualFree(cptr, 0, MEM_RELEASE) == 0)
- return -1;
- cptr += minfo.RegionSize;
- size -= minfo.RegionSize;
- }
- return 0;
-}
-
-#define CALL_MMAP(s) win32mmap(s)
-#define CALL_MUNMAP(a, s) win32munmap((a), (s))
-#define DIRECT_MMAP(s) win32direct_mmap(s)
-#endif /* WIN32 */
-#endif /* HAVE_MMAP */
-
-#if HAVE_MMAP && HAVE_MREMAP
-#define CALL_MREMAP(addr, osz, nsz, mv) mremap((addr), (osz), (nsz), (mv))
-#else /* HAVE_MMAP && HAVE_MREMAP */
-#define CALL_MREMAP(addr, osz, nsz, mv) MFAIL
-#endif /* HAVE_MMAP && HAVE_MREMAP */
-
-#if HAVE_MORECORE
-#define CALL_MORECORE(S) MORECORE(S)
-#else /* HAVE_MORECORE */
-#define CALL_MORECORE(S) MFAIL
-#endif /* HAVE_MORECORE */
-
-/* mstate bit set if continguous morecore disabled or failed */
-#define USE_NONCONTIGUOUS_BIT (4U)
-
-/* segment bit set in create_mspace_with_base */
-#define EXTERN_BIT (8U)
-
-
-/* --------------------------- Lock preliminaries ------------------------ */
-
-#if USE_LOCKS
-
-/*
- When locks are defined, there are up to two global locks:
-
- * If HAVE_MORECORE, morecore_mutex protects sequences of calls to
- MORECORE. In many cases sys_alloc requires two calls, that should
- not be interleaved with calls by other threads. This does not
- protect against direct calls to MORECORE by other threads not
- using this lock, so there is still code to cope the best we can on
- interference.
-
- * magic_init_mutex ensures that mparams.magic and other
- unique mparams values are initialized only once.
-*/
-
-#ifndef WIN32
-/* By default use posix locks */
-#include <pthread.h>
-#define MLOCK_T pthread_mutex_t
-#define INITIAL_LOCK(l) pthread_mutex_init(l, NULL)
-#define ACQUIRE_LOCK(l) pthread_mutex_lock(l)
-#define RELEASE_LOCK(l) pthread_mutex_unlock(l)
-
-#if HAVE_MORECORE
-static MLOCK_T morecore_mutex = PTHREAD_MUTEX_INITIALIZER;
-#endif /* HAVE_MORECORE */
-
-static MLOCK_T magic_init_mutex = PTHREAD_MUTEX_INITIALIZER;
-
-#else /* WIN32 */
-/*
- Because lock-protected regions have bounded times, and there
- are no recursive lock calls, we can use simple spinlocks.
-*/
-
-#define MLOCK_T long
-static int win32_acquire_lock (MLOCK_T *sl) {
- for (;;) {
-#ifdef InterlockedCompareExchangePointer
- if (!InterlockedCompareExchange(sl, 1, 0))
- return 0;
-#else /* Use older void* version */
- if (!InterlockedCompareExchange((void**)sl, (void*)1, (void*)0))
- return 0;
-#endif /* InterlockedCompareExchangePointer */
- Sleep (0);
- }
-}
-
-static void win32_release_lock (MLOCK_T *sl) {
- InterlockedExchange (sl, 0);
-}
-
-#define INITIAL_LOCK(l) *(l)=0
-#define ACQUIRE_LOCK(l) win32_acquire_lock(l)
-#define RELEASE_LOCK(l) win32_release_lock(l)
-#if HAVE_MORECORE
-static MLOCK_T morecore_mutex;
-#endif /* HAVE_MORECORE */
-static MLOCK_T magic_init_mutex;
-#endif /* WIN32 */
-
-#define USE_LOCK_BIT (2U)
-#else /* USE_LOCKS */
-#define USE_LOCK_BIT (0U)
-#define INITIAL_LOCK(l)
-#endif /* USE_LOCKS */
-
-#if USE_LOCKS && HAVE_MORECORE
-#define ACQUIRE_MORECORE_LOCK() ACQUIRE_LOCK(&morecore_mutex);
-#define RELEASE_MORECORE_LOCK() RELEASE_LOCK(&morecore_mutex);
-#else /* USE_LOCKS && HAVE_MORECORE */
-#define ACQUIRE_MORECORE_LOCK()
-#define RELEASE_MORECORE_LOCK()
-#endif /* USE_LOCKS && HAVE_MORECORE */
-
-#if USE_LOCKS
-#define ACQUIRE_MAGIC_INIT_LOCK() ACQUIRE_LOCK(&magic_init_mutex);
-#define RELEASE_MAGIC_INIT_LOCK() RELEASE_LOCK(&magic_init_mutex);
-#else /* USE_LOCKS */
-#define ACQUIRE_MAGIC_INIT_LOCK()
-#define RELEASE_MAGIC_INIT_LOCK()
-#endif /* USE_LOCKS */
-
-
-/* ----------------------- Chunk representations ------------------------ */
-
-/*
- (The following includes lightly edited explanations by Colin Plumb.)
-
- The malloc_chunk declaration below is misleading (but accurate and
- necessary). It declares a "view" into memory allowing access to
- necessary fields at known offsets from a given base.
-
- Chunks of memory are maintained using a `boundary tag' method as
- originally described by Knuth. (See the paper by Paul Wilson
- ftp://ftp.cs.utexas.edu/pub/garbage/allocsrv.ps for a survey of such
- techniques.) Sizes of free chunks are stored both in the front of
- each chunk and at the end. This makes consolidating fragmented
- chunks into bigger chunks fast. The head fields also hold bits
- representing whether chunks are free or in use.
-
- Here are some pictures to make it clearer. They are "exploded" to
- show that the state of a chunk can be thought of as extending from
- the high 31 bits of the head field of its header through the
- prev_foot and PINUSE_BIT bit of the following chunk header.
-
- A chunk that's in use looks like:
-
- chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Size of previous chunk (if P = 1) |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |P|
- | Size of this chunk 1| +-+
- mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | |
- +- -+
- | |
- +- -+
- | :
- +- size - sizeof(size_t) available payload bytes -+
- : |
- chunk-> +- -+
- | |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1|
- | Size of next chunk (may or may not be in use) | +-+
- mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
- And if it's free, it looks like this:
-
- chunk-> +- -+
- | User payload (must be in use, or we would have merged!) |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |P|
- | Size of this chunk 0| +-+
- mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Next pointer |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Prev pointer |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | :
- +- size - sizeof(struct chunk) unused bytes -+
- : |
- chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Size of this chunk |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0|
- | Size of next chunk (must be in use, or we would have merged)| +-+
- mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | :
- +- User payload -+
- : |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- |0|
- +-+
- Note that since we always merge adjacent free chunks, the chunks
- adjacent to a free chunk must be in use.
-
- Given a pointer to a chunk (which can be derived trivially from the
- payload pointer) we can, in O(1) time, find out whether the adjacent
- chunks are free, and if so, unlink them from the lists that they
- are on and merge them with the current chunk.
-
- Chunks always begin on even word boundaries, so the mem portion
- (which is returned to the user) is also on an even word boundary, and
- thus at least double-word aligned.
-
- The P (PINUSE_BIT) bit, stored in the unused low-order bit of the
- chunk size (which is always a multiple of two words), is an in-use
- bit for the *previous* chunk. If that bit is *clear*, then the
- word before the current chunk size contains the previous chunk
- size, and can be used to find the front of the previous chunk.
- The very first chunk allocated always has this bit set, preventing
- access to non-existent (or non-owned) memory. If pinuse is set for
- any given chunk, then you CANNOT determine the size of the
- previous chunk, and might even get a memory addressing fault when
- trying to do so.
-
- The C (CINUSE_BIT) bit, stored in the unused second-lowest bit of
- the chunk size redundantly records whether the current chunk is
- inuse. This redundancy enables usage checks within free and realloc,
- and reduces indirection when freeing and consolidating chunks.
-
- Each freshly allocated chunk must have both cinuse and pinuse set.
- That is, each allocated chunk borders either a previously allocated
- and still in-use chunk, or the base of its memory arena. This is
- ensured by making all allocations from the the `lowest' part of any
- found chunk. Further, no free chunk physically borders another one,
- so each free chunk is known to be preceded and followed by either
- inuse chunks or the ends of memory.
-
- Note that the `foot' of the current chunk is actually represented
- as the prev_foot of the NEXT chunk. This makes it easier to
- deal with alignments etc but can be very confusing when trying
- to extend or adapt this code.
-
- The exceptions to all this are
-
- 1. The special chunk `top' is the top-most available chunk (i.e.,
- the one bordering the end of available memory). It is treated
- specially. Top is never included in any bin, is used only if
- no other chunk is available, and is released back to the
- system if it is very large (see M_TRIM_THRESHOLD). In effect,
- the top chunk is treated as larger (and thus less well
- fitting) than any other available chunk. The top chunk
- doesn't update its trailing size field since there is no next
- contiguous chunk that would have to index off it. However,
- space is still allocated for it (TOP_FOOT_SIZE) to enable
- separation or merging when space is extended.
-
- 3. Chunks allocated via mmap, which have the lowest-order bit
- (IS_MMAPPED_BIT) set in their prev_foot fields, and do not set
- PINUSE_BIT in their head fields. Because they are allocated
- one-by-one, each must carry its own prev_foot field, which is
- also used to hold the offset this chunk has within its mmapped
- region, which is needed to preserve alignment. Each mmapped
- chunk is trailed by the first two fields of a fake next-chunk
- for sake of usage checks.
-
-*/
-
-struct malloc_chunk {
- size_t prev_foot; /* Size of previous chunk (if free). */
- size_t head; /* Size and inuse bits. */
- struct malloc_chunk* fd; /* double links -- used only if free. */
- struct malloc_chunk* bk;
-};
-
-typedef struct malloc_chunk mchunk;
-typedef struct malloc_chunk* mchunkptr;
-typedef struct malloc_chunk* sbinptr; /* The type of bins of chunks */
-typedef unsigned int bindex_t; /* Described below */
-typedef unsigned int binmap_t; /* Described below */
-typedef unsigned int flag_t; /* The type of various bit flag sets */
-
-/* ------------------- Chunks sizes and alignments ----------------------- */
-
-#define MCHUNK_SIZE (sizeof(mchunk))
-
-#if FOOTERS
-#define CHUNK_OVERHEAD (TWO_SIZE_T_SIZES)
-#else /* FOOTERS */
-#define CHUNK_OVERHEAD (SIZE_T_SIZE)
-#endif /* FOOTERS */
-
-/* MMapped chunks need a second word of overhead ... */
-#define MMAP_CHUNK_OVERHEAD (TWO_SIZE_T_SIZES)
-/* ... and additional padding for fake next-chunk at foot */
-#define MMAP_FOOT_PAD (FOUR_SIZE_T_SIZES)
-
-/* The smallest size we can malloc is an aligned minimal chunk */
-#define MIN_CHUNK_SIZE\
- ((MCHUNK_SIZE + CHUNK_ALIGN_MASK) & ~CHUNK_ALIGN_MASK)
-
-/* conversion from malloc headers to user pointers, and back */
-#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
-#define mem2chunk(mem) ((mchunkptr)((char*)(mem) - TWO_SIZE_T_SIZES))
-/* chunk associated with aligned address A */
-#define align_as_chunk(A) (mchunkptr)((A) + align_offset(chunk2mem(A)))
-
-/* Bounds on request (not chunk) sizes. */
-#define MAX_REQUEST ((-MIN_CHUNK_SIZE) << 2)
-#define MIN_REQUEST (MIN_CHUNK_SIZE - CHUNK_OVERHEAD - SIZE_T_ONE)
-
-/* pad request bytes into a usable size */
-#define pad_request(req) \
- (((req) + CHUNK_OVERHEAD + CHUNK_ALIGN_MASK) & ~CHUNK_ALIGN_MASK)
-
-/* pad request, checking for minimum (but not maximum) */
-#define request2size(req) \
- (((req) < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(req))
-
-
-/* ------------------ Operations on head and foot fields ----------------- */
-
-/*
- The head field of a chunk is or'ed with PINUSE_BIT when previous
- adjacent chunk in use, and or'ed with CINUSE_BIT if this chunk is in
- use. If the chunk was obtained with mmap, the prev_foot field has
- IS_MMAPPED_BIT set, otherwise holding the offset of the base of the
- mmapped region to the base of the chunk.
-*/
-
-#define PINUSE_BIT (SIZE_T_ONE)
-#define CINUSE_BIT (SIZE_T_TWO)
-#define INUSE_BITS (PINUSE_BIT|CINUSE_BIT)
-
-/* Head value for fenceposts */
-#define FENCEPOST_HEAD (INUSE_BITS|SIZE_T_SIZE)
-
-/* extraction of fields from head words */
-#define cinuse(p) ((p)->head & CINUSE_BIT)
-#define pinuse(p) ((p)->head & PINUSE_BIT)
-#define chunksize(p) ((p)->head & ~(INUSE_BITS))
-
-#define clear_pinuse(p) ((p)->head &= ~PINUSE_BIT)
-#define clear_cinuse(p) ((p)->head &= ~CINUSE_BIT)
-
-/* Treat space at ptr +/- offset as a chunk */
-#define chunk_plus_offset(p, s) ((mchunkptr)(((char*)(p)) + (s)))
-#define chunk_minus_offset(p, s) ((mchunkptr)(((char*)(p)) - (s)))
-
-/* Ptr to next or previous physical malloc_chunk. */
-#define next_chunk(p) ((mchunkptr)( ((char*)(p)) + ((p)->head & ~INUSE_BITS)))
-#define prev_chunk(p) ((mchunkptr)( ((char*)(p)) - ((p)->prev_foot) ))
-
-/* extract next chunk's pinuse bit */
-#define next_pinuse(p) ((next_chunk(p)->head) & PINUSE_BIT)
-
-/* Get/set size at footer */
-#define get_foot(p, s) (((mchunkptr)((char*)(p) + (s)))->prev_foot)
-#define set_foot(p, s) (((mchunkptr)((char*)(p) + (s)))->prev_foot = (s))
-
-/* Set size, pinuse bit, and foot */
-#define set_size_and_pinuse_of_free_chunk(p, s)\
- ((p)->head = (s|PINUSE_BIT), set_foot(p, s))
-
-/* Set size, pinuse bit, foot, and clear next pinuse */
-#define set_free_with_pinuse(p, s, n)\
- (clear_pinuse(n), set_size_and_pinuse_of_free_chunk(p, s))
-
-#define is_mmapped(p)\
- (!((p)->head & PINUSE_BIT) && ((p)->prev_foot & IS_MMAPPED_BIT))
-
-/* Get the internal overhead associated with chunk p */
-#define overhead_for(p)\
- (is_mmapped(p)? MMAP_CHUNK_OVERHEAD : CHUNK_OVERHEAD)
-
-/* Return true if malloced space is not necessarily cleared */
-#if MMAP_CLEARS
-#define calloc_must_clear(p) (!is_mmapped(p))
-#else /* MMAP_CLEARS */
-#define calloc_must_clear(p) (1)
-#endif /* MMAP_CLEARS */
-
-/* ---------------------- Overlaid data structures ----------------------- */
-
-/*
- When chunks are not in use, they are treated as nodes of either
- lists or trees.
-
- "Small" chunks are stored in circular doubly-linked lists, and look
- like this:
-
- chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Size of previous chunk |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- `head:' | Size of chunk, in bytes |P|
- mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Forward pointer to next chunk in list |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Back pointer to previous chunk in list |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Unused space (may be 0 bytes long) .
- . .
- . |
-nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- `foot:' | Size of chunk, in bytes |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
- Larger chunks are kept in a form of bitwise digital trees (aka
- tries) keyed on chunksizes. Because malloc_tree_chunks are only for
- free chunks greater than 256 bytes, their size doesn't impose any
- constraints on user chunk sizes. Each node looks like:
-
- chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Size of previous chunk |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- `head:' | Size of chunk, in bytes |P|
- mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Forward pointer to next chunk of same size |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Back pointer to previous chunk of same size |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Pointer to left child (child[0]) |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Pointer to right child (child[1]) |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Pointer to parent |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | bin index of this chunk |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Unused space .
- . |
-nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- `foot:' | Size of chunk, in bytes |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
- Each tree holding treenodes is a tree of unique chunk sizes. Chunks
- of the same size are arranged in a circularly-linked list, with only
- the oldest chunk (the next to be used, in our FIFO ordering)
- actually in the tree. (Tree members are distinguished by a non-null
- parent pointer.) If a chunk with the same size an an existing node
- is inserted, it is linked off the existing node using pointers that
- work in the same way as fd/bk pointers of small chunks.
-
- Each tree contains a power of 2 sized range of chunk sizes (the
- smallest is 0x100 <= x < 0x180), which is is divided in half at each
- tree level, with the chunks in the smaller half of the range (0x100
- <= x < 0x140 for the top nose) in the left subtree and the larger
- half (0x140 <= x < 0x180) in the right subtree. This is, of course,
- done by inspecting individual bits.
-
- Using these rules, each node's left subtree contains all smaller
- sizes than its right subtree. However, the node at the root of each
- subtree has no particular ordering relationship to either. (The
- dividing line between the subtree sizes is based on trie relation.)
- If we remove the last chunk of a given size from the interior of the
- tree, we need to replace it with a leaf node. The tree ordering
- rules permit a node to be replaced by any leaf below it.
-
- The smallest chunk in a tree (a common operation in a best-fit
- allocator) can be found by walking a path to the leftmost leaf in
- the tree. Unlike a usual binary tree, where we follow left child
- pointers until we reach a null, here we follow the right child
- pointer any time the left one is null, until we reach a leaf with
- both child pointers null. The smallest chunk in the tree will be
- somewhere along that path.
-
- The worst case number of steps to add, find, or remove a node is
- bounded by the number of bits differentiating chunks within
- bins. Under current bin calculations, this ranges from 6 up to 21
- (for 32 bit sizes) or up to 53 (for 64 bit sizes). The typical case
- is of course much better.
-*/
-
-struct malloc_tree_chunk {
- /* The first four fields must be compatible with malloc_chunk */
- size_t prev_foot;
- size_t head;
- struct malloc_tree_chunk* fd;
- struct malloc_tree_chunk* bk;
-
- struct malloc_tree_chunk* child[2];
- struct malloc_tree_chunk* parent;
- bindex_t index;
-};
-
-typedef struct malloc_tree_chunk tchunk;
-typedef struct malloc_tree_chunk* tchunkptr;
-typedef struct malloc_tree_chunk* tbinptr; /* The type of bins of trees */
-
-/* A little helper macro for trees */
-#define leftmost_child(t) ((t)->child[0] != 0? (t)->child[0] : (t)->child[1])
-
-/* ----------------------------- Segments -------------------------------- */
-
-/*
- Each malloc space may include non-contiguous segments, held in a
- list headed by an embedded malloc_segment record representing the
- top-most space. Segments also include flags holding properties of
- the space. Large chunks that are directly allocated by mmap are not
- included in this list. They are instead independently created and
- destroyed without otherwise keeping track of them.
-
- Segment management mainly comes into play for spaces allocated by
- MMAP. Any call to MMAP might or might not return memory that is
- adjacent to an existing segment. MORECORE normally contiguously
- extends the current space, so this space is almost always adjacent,
- which is simpler and faster to deal with. (This is why MORECORE is
- used preferentially to MMAP when both are available -- see
- sys_alloc.) When allocating using MMAP, we don't use any of the
- hinting mechanisms (inconsistently) supported in various
- implementations of unix mmap, or distinguish reserving from
- committing memory. Instead, we just ask for space, and exploit
- contiguity when we get it. It is probably possible to do
- better than this on some systems, but no general scheme seems
- to be significantly better.
-
- Management entails a simpler variant of the consolidation scheme
- used for chunks to reduce fragmentation -- new adjacent memory is
- normally prepended or appended to an existing segment. However,
- there are limitations compared to chunk consolidation that mostly
- reflect the fact that segment processing is relatively infrequent
- (occurring only when getting memory from system) and that we
- don't expect to have huge numbers of segments:
-
- * Segments are not indexed, so traversal requires linear scans. (It
- would be possible to index these, but is not worth the extra
- overhead and complexity for most programs on most platforms.)
- * New segments are only appended to old ones when holding top-most
- memory; if they cannot be prepended to others, they are held in
- different segments.
-
- Except for the top-most segment of an mstate, each segment record
- is kept at the tail of its segment. Segments are added by pushing
- segment records onto the list headed by &mstate.seg for the
- containing mstate.
-
- Segment flags control allocation/merge/deallocation policies:
- * If EXTERN_BIT set, then we did not allocate this segment,
- and so should not try to deallocate or merge with others.
- (This currently holds only for the initial segment passed
- into create_mspace_with_base.)
- * If IS_MMAPPED_BIT set, the segment may be merged with
- other surrounding mmapped segments and trimmed/de-allocated
- using munmap.
- * If neither bit is set, then the segment was obtained using
- MORECORE so can be merged with surrounding MORECORE'd segments
- and deallocated/trimmed using MORECORE with negative arguments.
-*/
-
-struct malloc_segment {
- char* base; /* base address */
- size_t size; /* allocated size */
- struct malloc_segment* next; /* ptr to next segment */
- flag_t sflags; /* mmap and extern flag */
-};
-
-#define is_mmapped_segment(S) ((S)->sflags & IS_MMAPPED_BIT)
-#define is_extern_segment(S) ((S)->sflags & EXTERN_BIT)
-
-typedef struct malloc_segment msegment;
-typedef struct malloc_segment* msegmentptr;
-
-/* ---------------------------- malloc_state ----------------------------- */
-
-/*
- A malloc_state holds all of the bookkeeping for a space.
- The main fields are:
-
- Top
- The topmost chunk of the currently active segment. Its size is
- cached in topsize. The actual size of topmost space is
- topsize+TOP_FOOT_SIZE, which includes space reserved for adding
- fenceposts and segment records if necessary when getting more
- space from the system. The size at which to autotrim top is
- cached from mparams in trim_check, except that it is disabled if
- an autotrim fails.
-
- Designated victim (dv)
- This is the preferred chunk for servicing small requests that
- don't have exact fits. It is normally the chunk split off most
- recently to service another small request. Its size is cached in
- dvsize. The link fields of this chunk are not maintained since it
- is not kept in a bin.
-
- SmallBins
- An array of bin headers for free chunks. These bins hold chunks
- with sizes less than MIN_LARGE_SIZE bytes. Each bin contains
- chunks of all the same size, spaced 8 bytes apart. To simplify
- use in double-linked lists, each bin header acts as a malloc_chunk
- pointing to the real first node, if it exists (else pointing to
- itself). This avoids special-casing for headers. But to avoid
- waste, we allocate only the fd/bk pointers of bins, and then use
- repositioning tricks to treat these as the fields of a chunk.
-
- TreeBins
- Treebins are pointers to the roots of trees holding a range of
- sizes. There are 2 equally spaced treebins for each power of two
- from TREE_SHIFT to TREE_SHIFT+16. The last bin holds anything
- larger.
-
- Bin maps
- There is one bit map for small bins ("smallmap") and one for
- treebins ("treemap). Each bin sets its bit when non-empty, and
- clears the bit when empty. Bit operations are then used to avoid
- bin-by-bin searching -- nearly all "search" is done without ever
- looking at bins that won't be selected. The bit maps
- conservatively use 32 bits per map word, even if on 64bit system.
- For a good description of some of the bit-based techniques used
- here, see Henry S. Warren Jr's book "Hacker's Delight" (and
- supplement at http://hackersdelight.org/). Many of these are
- intended to reduce the branchiness of paths through malloc etc, as
- well as to reduce the number of memory locations read or written.
-
- Segments
- A list of segments headed by an embedded malloc_segment record
- representing the initial space.
-
- Address check support
- The least_addr field is the least address ever obtained from
- MORECORE or MMAP. Attempted frees and reallocs of any address less
- than this are trapped (unless INSECURE is defined).
-
- Magic tag
- A cross-check field that should always hold same value as mparams.magic.
-
- Flags
- Bits recording whether to use MMAP, locks, or contiguous MORECORE
-
- Statistics
- Each space keeps track of current and maximum system memory
- obtained via MORECORE or MMAP.
-
- Locking
- If USE_LOCKS is defined, the "mutex" lock is acquired and released
- around every public call using this mspace.
-*/
-
-/* Bin types, widths and sizes */
-#define NSMALLBINS (32U)
-#define NTREEBINS (32U)
-#define SMALLBIN_SHIFT (3U)
-#define SMALLBIN_WIDTH (SIZE_T_ONE << SMALLBIN_SHIFT)
-#define TREEBIN_SHIFT (8U)
-#define MIN_LARGE_SIZE (SIZE_T_ONE << TREEBIN_SHIFT)
-#define MAX_SMALL_SIZE (MIN_LARGE_SIZE - SIZE_T_ONE)
-#define MAX_SMALL_REQUEST (MAX_SMALL_SIZE - CHUNK_ALIGN_MASK - CHUNK_OVERHEAD)
-
-struct malloc_state {
- binmap_t smallmap;
- binmap_t treemap;
- size_t dvsize;
- size_t topsize;
- char* least_addr;
- mchunkptr dv;
- mchunkptr top;
- size_t trim_check;
- size_t magic;
- mchunkptr smallbins[(NSMALLBINS+1)*2];
- tbinptr treebins[NTREEBINS];
- size_t footprint;
- size_t max_footprint;
- flag_t mflags;
-#if USE_LOCKS
- MLOCK_T mutex; /* locate lock among fields that rarely change */
-#endif /* USE_LOCKS */
- msegment seg;
-};
-
-typedef struct malloc_state* mstate;
-
-/* ------------- Global malloc_state and malloc_params ------------------- */
-
-/*
- malloc_params holds global properties, including those that can be
- dynamically set using mallopt. There is a single instance, mparams,
- initialized in init_mparams.
-*/
-
-struct malloc_params {
- size_t magic;
- size_t page_size;
- size_t granularity;
- size_t mmap_threshold;
- size_t trim_threshold;
- flag_t default_mflags;
-};
-
-static struct malloc_params mparams;
-
-/* The global malloc_state used for all non-"mspace" calls */
-static struct malloc_state _gm_;
-#define gm (&_gm_)
-#define is_global(M) ((M) == &_gm_)
-#define is_initialized(M) ((M)->top != 0)
-
-/* -------------------------- system alloc setup ------------------------- */
-
-/* Operations on mflags */
-
-#define use_lock(M) ((M)->mflags & USE_LOCK_BIT)
-#define enable_lock(M) ((M)->mflags |= USE_LOCK_BIT)
-#define disable_lock(M) ((M)->mflags &= ~USE_LOCK_BIT)
-
-#define use_mmap(M) ((M)->mflags & USE_MMAP_BIT)
-#define enable_mmap(M) ((M)->mflags |= USE_MMAP_BIT)
-#define disable_mmap(M) ((M)->mflags &= ~USE_MMAP_BIT)
-
-#define use_noncontiguous(M) ((M)->mflags & USE_NONCONTIGUOUS_BIT)
-#define disable_contiguous(M) ((M)->mflags |= USE_NONCONTIGUOUS_BIT)
-
-#define set_lock(M,L)\
- ((M)->mflags = (L)?\
- ((M)->mflags | USE_LOCK_BIT) :\
- ((M)->mflags & ~USE_LOCK_BIT))
-
-/* page-align a size */
-#define page_align(S)\
- (((S) + (mparams.page_size)) & ~(mparams.page_size - SIZE_T_ONE))
-
-/* granularity-align a size */
-#define granularity_align(S)\
- (((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
-
-#define is_page_aligned(S)\
- (((size_t)(S) & (mparams.page_size - SIZE_T_ONE)) == 0)
-#define is_granularity_aligned(S)\
- (((size_t)(S) & (mparams.granularity - SIZE_T_ONE)) == 0)
-
-/* True if segment S holds address A */
-#define segment_holds(S, A)\
- ((char*)(A) >= S->base && (char*)(A) < S->base + S->size)
-
-/* Return segment holding given address */
-static msegmentptr segment_holding(mstate m, char* addr) {
- msegmentptr sp = &m->seg;
- for (;;) {
- if (addr >= sp->base && addr < sp->base + sp->size)
- return sp;
- if ((sp = sp->next) == 0)
- return 0;
- }
-}
-
-/* Return true if segment contains a segment link */
-static int has_segment_link(mstate m, msegmentptr ss) {
- msegmentptr sp = &m->seg;
- for (;;) {
- if ((char*)sp >= ss->base && (char*)sp < ss->base + ss->size)
- return 1;
- if ((sp = sp->next) == 0)
- return 0;
- }
-}
-
-#ifndef MORECORE_CANNOT_TRIM
-#define should_trim(M,s) ((s) > (M)->trim_check)
-#else /* MORECORE_CANNOT_TRIM */
-#define should_trim(M,s) (0)
-#endif /* MORECORE_CANNOT_TRIM */
-
-/*
- TOP_FOOT_SIZE is padding at the end of a segment, including space
- that may be needed to place segment records and fenceposts when new
- noncontiguous segments are added.
-*/
-#define TOP_FOOT_SIZE\
- (align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
-
-
-/* ------------------------------- Hooks -------------------------------- */
-
-/*
- PREACTION should be defined to return 0 on success, and nonzero on
- failure. If you are not using locking, you can redefine these to do
- anything you like.
-*/
-
-#if USE_LOCKS
-
-/* Ensure locks are initialized */
-#define GLOBALLY_INITIALIZE() (mparams.page_size == 0 && init_mparams())
-
-#define PREACTION(M) ((GLOBALLY_INITIALIZE() || use_lock(M))? ACQUIRE_LOCK(&(M)->mutex) : 0)
-#define POSTACTION(M) { if (use_lock(M)) RELEASE_LOCK(&(M)->mutex); }
-#else /* USE_LOCKS */
-
-#ifndef PREACTION
-#define PREACTION(M) (0)
-#endif /* PREACTION */
-
-#ifndef POSTACTION
-#define POSTACTION(M)
-#endif /* POSTACTION */
-
-#endif /* USE_LOCKS */
-
-/*
- CORRUPTION_ERROR_ACTION is triggered upon detected bad addresses.
- USAGE_ERROR_ACTION is triggered on detected bad frees and
- reallocs. The argument p is an address that might have triggered the
- fault. It is ignored by the two predefined actions, but might be
- useful in custom actions that try to help diagnose errors.
-*/
-
-#if PROCEED_ON_ERROR
-
-/* A count of the number of corruption errors causing resets */
-int malloc_corruption_error_count;
-
-/* default corruption action */
-static void reset_on_error(mstate m);
-
-#define CORRUPTION_ERROR_ACTION(m) reset_on_error(m)
-#define USAGE_ERROR_ACTION(m, p)
-
-#else /* PROCEED_ON_ERROR */
-
-#ifndef CORRUPTION_ERROR_ACTION
-#define CORRUPTION_ERROR_ACTION(m) ABORT
-#endif /* CORRUPTION_ERROR_ACTION */
-
-#ifndef USAGE_ERROR_ACTION
-#define USAGE_ERROR_ACTION(m,p) ABORT
-#endif /* USAGE_ERROR_ACTION */
-
-#endif /* PROCEED_ON_ERROR */
-
-/* -------------------------- Debugging setup ---------------------------- */
-
-#if ! DEBUG
-
-#define check_free_chunk(M,P)
-#define check_inuse_chunk(M,P)
-#define check_malloced_chunk(M,P,N)
-#define check_mmapped_chunk(M,P)
-#define check_malloc_state(M)
-#define check_top_chunk(M,P)
-
-#else /* DEBUG */
-#define check_free_chunk(M,P) do_check_free_chunk(M,P)
-#define check_inuse_chunk(M,P) do_check_inuse_chunk(M,P)
-#define check_top_chunk(M,P) do_check_top_chunk(M,P)
-#define check_malloced_chunk(M,P,N) do_check_malloced_chunk(M,P,N)
-#define check_mmapped_chunk(M,P) do_check_mmapped_chunk(M,P)
-#define check_malloc_state(M) do_check_malloc_state(M)
-
-static void do_check_any_chunk(mstate m, mchunkptr p);
-static void do_check_top_chunk(mstate m, mchunkptr p);
-static void do_check_mmapped_chunk(mstate m, mchunkptr p);
-static void do_check_inuse_chunk(mstate m, mchunkptr p);
-static void do_check_free_chunk(mstate m, mchunkptr p);
-static void do_check_malloced_chunk(mstate m, void* mem, size_t s);
-static void do_check_tree(mstate m, tchunkptr t);
-static void do_check_treebin(mstate m, bindex_t i);
-static void do_check_smallbin(mstate m, bindex_t i);
-static void do_check_malloc_state(mstate m);
-static int bin_find(mstate m, mchunkptr x);
-static size_t traverse_and_check(mstate m);
-#endif /* DEBUG */
-
-/* ---------------------------- Indexing Bins ---------------------------- */
-
-#define is_small(s) (((s) >> SMALLBIN_SHIFT) < NSMALLBINS)
-#define small_index(s) ((s) >> SMALLBIN_SHIFT)
-#define small_index2size(i) ((i) << SMALLBIN_SHIFT)
-#define MIN_SMALL_INDEX (small_index(MIN_CHUNK_SIZE))
-
-/* addressing by index. See above about smallbin repositioning */
-#define smallbin_at(M, i) ((sbinptr)((char*)&((M)->smallbins[(i)<<1])))
-#define treebin_at(M,i) (&((M)->treebins[i]))
-
-/* assign tree index for size S to variable I */
-#if defined(__GNUC__) && defined(i386)
-#define compute_tree_index(S, I)\
-{\
- size_t X = S >> TREEBIN_SHIFT;\
- if (X == 0)\
- I = 0;\
- else if (X > 0xFFFF)\
- I = NTREEBINS-1;\
- else {\
- unsigned int K;\
- __asm__("bsrl %1,%0\n\t" : "=r" (K) : "rm" (X));\
- I = (bindex_t)((K << 1) + ((S >> (K + (TREEBIN_SHIFT-1)) & 1)));\
- }\
-}
-#else /* GNUC */
-#define compute_tree_index(S, I)\
-{\
- size_t X = S >> TREEBIN_SHIFT;\
- if (X == 0)\
- I = 0;\
- else if (X > 0xFFFF)\
- I = NTREEBINS-1;\
- else {\
- unsigned int Y = (unsigned int)X;\
- unsigned int N = ((Y - 0x100) >> 16) & 8;\
- unsigned int K = (((Y <<= N) - 0x1000) >> 16) & 4;\
- N += K;\
- N += K = (((Y <<= K) - 0x4000) >> 16) & 2;\
- K = 14 - N + ((Y <<= K) >> 15);\
- I = (K << 1) + ((S >> (K + (TREEBIN_SHIFT-1)) & 1));\
- }\
-}
-#endif /* GNUC */
-
-/* Bit representing maximum resolved size in a treebin at i */
-#define bit_for_tree_index(i) \
- (i == NTREEBINS-1)? (SIZE_T_BITSIZE-1) : (((i) >> 1) + TREEBIN_SHIFT - 2)
-
-/* Shift placing maximum resolved bit in a treebin at i as sign bit */
-#define leftshift_for_tree_index(i) \
- ((i == NTREEBINS-1)? 0 : \
- ((SIZE_T_BITSIZE-SIZE_T_ONE) - (((i) >> 1) + TREEBIN_SHIFT - 2)))
-
-/* The size of the smallest chunk held in bin with index i */
-#define minsize_for_tree_index(i) \
- ((SIZE_T_ONE << (((i) >> 1) + TREEBIN_SHIFT)) | \
- (((size_t)((i) & SIZE_T_ONE)) << (((i) >> 1) + TREEBIN_SHIFT - 1)))
-
-
-/* ------------------------ Operations on bin maps ----------------------- */
-
-/* bit corresponding to given index */
-#define idx2bit(i) ((binmap_t)(1) << (i))
-
-/* Mark/Clear bits with given index */
-#define mark_smallmap(M,i) ((M)->smallmap |= idx2bit(i))
-#define clear_smallmap(M,i) ((M)->smallmap &= ~idx2bit(i))
-#define smallmap_is_marked(M,i) ((M)->smallmap & idx2bit(i))
-
-#define mark_treemap(M,i) ((M)->treemap |= idx2bit(i))
-#define clear_treemap(M,i) ((M)->treemap &= ~idx2bit(i))
-#define treemap_is_marked(M,i) ((M)->treemap & idx2bit(i))
-
-/* index corresponding to given bit */
-
-#if defined(__GNUC__) && defined(i386)
-#define compute_bit2idx(X, I)\
-{\
- unsigned int J;\
- __asm__("bsfl %1,%0\n\t" : "=r" (J) : "rm" (X));\
- I = (bindex_t)J;\
-}
-
-#else /* GNUC */
-#if USE_BUILTIN_FFS
-#define compute_bit2idx(X, I) I = ffs(X)-1
-
-#else /* USE_BUILTIN_FFS */
-#define compute_bit2idx(X, I)\
-{\
- unsigned int Y = X - 1;\
- unsigned int K = Y >> (16-4) & 16;\
- unsigned int N = K; Y >>= K;\
- N += K = Y >> (8-3) & 8; Y >>= K;\
- N += K = Y >> (4-2) & 4; Y >>= K;\
- N += K = Y >> (2-1) & 2; Y >>= K;\
- N += K = Y >> (1-0) & 1; Y >>= K;\
- I = (bindex_t)(N + Y);\
-}
-#endif /* USE_BUILTIN_FFS */
-#endif /* GNUC */
-
-/* isolate the least set bit of a bitmap */
-#define least_bit(x) ((x) & -(x))
-
-/* mask with all bits to left of least bit of x on */
-#define left_bits(x) ((x<<1) | -(x<<1))
-
-/* mask with all bits to left of or equal to least bit of x on */
-#define same_or_left_bits(x) ((x) | -(x))
-
-
-/* ----------------------- Runtime Check Support ------------------------- */
-
-/*
- For security, the main invariant is that malloc/free/etc never
- writes to a static address other than malloc_state, unless static
- malloc_state itself has been corrupted, which cannot occur via
- malloc (because of these checks). In essence this means that we
- believe all pointers, sizes, maps etc held in malloc_state, but
- check all of those linked or offsetted from other embedded data
- structures. These checks are interspersed with main code in a way
- that tends to minimize their run-time cost.
-
- When FOOTERS is defined, in addition to range checking, we also
- verify footer fields of inuse chunks, which can be used guarantee
- that the mstate controlling malloc/free is intact. This is a
- streamlined version of the approach described by William Robertson
- et al in "Run-time Detection of Heap-based Overflows" LISA'03
- http://www.usenix.org/events/lisa03/tech/robertson.html The footer
- of an inuse chunk holds the xor of its mstate and a random seed,
- that is checked upon calls to free() and realloc(). This is
- (probablistically) unguessable from outside the program, but can be
- computed by any code successfully malloc'ing any chunk, so does not
- itself provide protection against code that has already broken
- security through some other means. Unlike Robertson et al, we
- always dynamically check addresses of all offset chunks (previous,
- next, etc). This turns out to be cheaper than relying on hashes.
-*/
-
-#if !INSECURE
-/* Check if address a is at least as high as any from MORECORE or MMAP */
-#define ok_address(M, a) ((char*)(a) >= (M)->least_addr)
-/* Check if address of next chunk n is higher than base chunk p */
-#define ok_next(p, n) ((char*)(p) < (char*)(n))
-/* Check if p has its cinuse bit on */
-#define ok_cinuse(p) cinuse(p)
-/* Check if p has its pinuse bit on */
-#define ok_pinuse(p) pinuse(p)
-
-#else /* !INSECURE */
-#define ok_address(M, a) (1)
-#define ok_next(b, n) (1)
-#define ok_cinuse(p) (1)
-#define ok_pinuse(p) (1)
-#endif /* !INSECURE */
-
-#if (FOOTERS && !INSECURE)
-/* Check if (alleged) mstate m has expected magic field */
-#define ok_magic(M) ((M)->magic == mparams.magic)
-#else /* (FOOTERS && !INSECURE) */
-#define ok_magic(M) (1)
-#endif /* (FOOTERS && !INSECURE) */
-
-
-/* In gcc, use __builtin_expect to minimize impact of checks */
-#if !INSECURE
-#if defined(__GNUC__) && __GNUC__ >= 3
-#define RTCHECK(e) __builtin_expect(e, 1)
-#else /* GNUC */
-#define RTCHECK(e) (e)
-#endif /* GNUC */
-#else /* !INSECURE */
-#define RTCHECK(e) (1)
-#endif /* !INSECURE */
-
-/* macros to set up inuse chunks with or without footers */
-
-#if !FOOTERS
-
-#define mark_inuse_foot(M,p,s)
-
-/* Set cinuse bit and pinuse bit of next chunk */
-#define set_inuse(M,p,s)\
- ((p)->head = (((p)->head & PINUSE_BIT)|s|CINUSE_BIT),\
- ((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT)
-
-/* Set cinuse and pinuse of this chunk and pinuse of next chunk */
-#define set_inuse_and_pinuse(M,p,s)\
- ((p)->head = (s|PINUSE_BIT|CINUSE_BIT),\
- ((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT)
-
-/* Set size, cinuse and pinuse bit of this chunk */
-#define set_size_and_pinuse_of_inuse_chunk(M, p, s)\
- ((p)->head = (s|PINUSE_BIT|CINUSE_BIT))
-
-#else /* FOOTERS */
-
-/* Set foot of inuse chunk to be xor of mstate and seed */
-#define mark_inuse_foot(M,p,s)\
- (((mchunkptr)((char*)(p) + (s)))->prev_foot = ((size_t)(M) ^ mparams.magic))
-
-#define get_mstate_for(p)\
- ((mstate)(((mchunkptr)((char*)(p) +\
- (chunksize(p))))->prev_foot ^ mparams.magic))
-
-#define set_inuse(M,p,s)\
- ((p)->head = (((p)->head & PINUSE_BIT)|s|CINUSE_BIT),\
- (((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT), \
- mark_inuse_foot(M,p,s))
-
-#define set_inuse_and_pinuse(M,p,s)\
- ((p)->head = (s|PINUSE_BIT|CINUSE_BIT),\
- (((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT),\
- mark_inuse_foot(M,p,s))
-
-#define set_size_and_pinuse_of_inuse_chunk(M, p, s)\
- ((p)->head = (s|PINUSE_BIT|CINUSE_BIT),\
- mark_inuse_foot(M, p, s))
-
-#endif /* !FOOTERS */
-
-/* ---------------------------- setting mparams -------------------------- */
-
-/* Initialize mparams */
-static int init_mparams(void) {
- if (mparams.page_size == 0) {
- size_t s;
-
- mparams.mmap_threshold = DEFAULT_MMAP_THRESHOLD;
- mparams.trim_threshold = DEFAULT_TRIM_THRESHOLD;
-#if MORECORE_CONTIGUOUS
- mparams.default_mflags = USE_LOCK_BIT|USE_MMAP_BIT;
-#else /* MORECORE_CONTIGUOUS */
- mparams.default_mflags = USE_LOCK_BIT|USE_MMAP_BIT|USE_NONCONTIGUOUS_BIT;
-#endif /* MORECORE_CONTIGUOUS */
-
-#if (FOOTERS && !INSECURE)
- {
-#if USE_DEV_RANDOM
- int fd;
- unsigned char buf[sizeof(size_t)];
- /* Try to use /dev/urandom, else fall back on using time */
- if ((fd = open("/dev/urandom", O_RDONLY)) >= 0 &&
- read(fd, buf, sizeof(buf)) == sizeof(buf)) {
- s = *((size_t *) buf);
- close(fd);
- }
- else
-#endif /* USE_DEV_RANDOM */
- s = (size_t)(time(0) ^ (size_t)0x55555555U);
-
- s |= (size_t)8U; /* ensure nonzero */
- s &= ~(size_t)7U; /* improve chances of fault for bad values */
-
- }
-#else /* (FOOTERS && !INSECURE) */
- s = (size_t)0x58585858U;
-#endif /* (FOOTERS && !INSECURE) */
- ACQUIRE_MAGIC_INIT_LOCK();
- if (mparams.magic == 0) {
- mparams.magic = s;
- /* Set up lock for main malloc area */
- INITIAL_LOCK(&gm->mutex);
- gm->mflags = mparams.default_mflags;
- }
- RELEASE_MAGIC_INIT_LOCK();
-
-#ifndef WIN32
- mparams.page_size = malloc_getpagesize;
- mparams.granularity = ((DEFAULT_GRANULARITY != 0)?
- DEFAULT_GRANULARITY : mparams.page_size);
-#else /* WIN32 */
- {
- SYSTEM_INFO system_info;
- GetSystemInfo(&system_info);
- mparams.page_size = system_info.dwPageSize;
- mparams.granularity = system_info.dwAllocationGranularity;
- }
-#endif /* WIN32 */
-
- /* Sanity-check configuration:
- size_t must be unsigned and as wide as pointer type.
- ints must be at least 4 bytes.
- alignment must be at least 8.
- Alignment, min chunk size, and page size must all be powers of 2.
- */
- if ((sizeof(size_t) != sizeof(char*)) ||
- (MAX_SIZE_T < MIN_CHUNK_SIZE) ||
- (sizeof(int) < 4) ||
- (MALLOC_ALIGNMENT < (size_t)8U) ||
- ((MALLOC_ALIGNMENT & (MALLOC_ALIGNMENT-SIZE_T_ONE)) != 0) ||
- ((MCHUNK_SIZE & (MCHUNK_SIZE-SIZE_T_ONE)) != 0) ||
- ((mparams.granularity & (mparams.granularity-SIZE_T_ONE)) != 0) ||
- ((mparams.page_size & (mparams.page_size-SIZE_T_ONE)) != 0))
- ABORT;
- }
- return 0;
-}
-
-/* support for mallopt */
-static int change_mparam(int param_number, int value) {
- size_t val = (size_t)value;
- init_mparams();
- switch(param_number) {
- case M_TRIM_THRESHOLD:
- mparams.trim_threshold = val;
- return 1;
- case M_GRANULARITY:
- if (val >= mparams.page_size && ((val & (val-1)) == 0)) {
- mparams.granularity = val;
- return 1;
- }
- else
- return 0;
- case M_MMAP_THRESHOLD:
- mparams.mmap_threshold = val;
- return 1;
- default:
- return 0;
- }
-}
-
-#if DEBUG
-/* ------------------------- Debugging Support --------------------------- */
-
-/* Check properties of any chunk, whether free, inuse, mmapped etc */
-static void do_check_any_chunk(mstate m, mchunkptr p) {
- assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD));
- assert(ok_address(m, p));
-}
-
-/* Check properties of top chunk */
-static void do_check_top_chunk(mstate m, mchunkptr p) {
- msegmentptr sp = segment_holding(m, (char*)p);
- size_t sz = chunksize(p);
- assert(sp != 0);
- assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD));
- assert(ok_address(m, p));
- assert(sz == m->topsize);
- assert(sz > 0);
- assert(sz == ((sp->base + sp->size) - (char*)p) - TOP_FOOT_SIZE);
- assert(pinuse(p));
- assert(!next_pinuse(p));
-}
-
-/* Check properties of (inuse) mmapped chunks */
-static void do_check_mmapped_chunk(mstate m, mchunkptr p) {
- size_t sz = chunksize(p);
- size_t len = (sz + (p->prev_foot & ~IS_MMAPPED_BIT) + MMAP_FOOT_PAD);
- assert(is_mmapped(p));
- assert(use_mmap(m));
- assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD));
- assert(ok_address(m, p));
- assert(!is_small(sz));
- assert((len & (mparams.page_size-SIZE_T_ONE)) == 0);
- assert(chunk_plus_offset(p, sz)->head == FENCEPOST_HEAD);
- assert(chunk_plus_offset(p, sz+SIZE_T_SIZE)->head == 0);
-}
-
-/* Check properties of inuse chunks */
-static void do_check_inuse_chunk(mstate m, mchunkptr p) {
- do_check_any_chunk(m, p);
- assert(cinuse(p));
- assert(next_pinuse(p));
- /* If not pinuse and not mmapped, previous chunk has OK offset */
- assert(is_mmapped(p) || pinuse(p) || next_chunk(prev_chunk(p)) == p);
- if (is_mmapped(p))
- do_check_mmapped_chunk(m, p);
-}
-
-/* Check properties of free chunks */
-static void do_check_free_chunk(mstate m, mchunkptr p) {
- size_t sz = p->head & ~(PINUSE_BIT|CINUSE_BIT);
- mchunkptr next = chunk_plus_offset(p, sz);
- do_check_any_chunk(m, p);
- assert(!cinuse(p));
- assert(!next_pinuse(p));
- assert (!is_mmapped(p));
- if (p != m->dv && p != m->top) {
- if (sz >= MIN_CHUNK_SIZE) {
- assert((sz & CHUNK_ALIGN_MASK) == 0);
- assert(is_aligned(chunk2mem(p)));
- assert(next->prev_foot == sz);
- assert(pinuse(p));
- assert (next == m->top || cinuse(next));
- assert(p->fd->bk == p);
- assert(p->bk->fd == p);
- }
- else /* markers are always of size SIZE_T_SIZE */
- assert(sz == SIZE_T_SIZE);
- }
-}
-
-/* Check properties of malloced chunks at the point they are malloced */
-static void do_check_malloced_chunk(mstate m, void* mem, size_t s) {
- if (mem != 0) {
- mchunkptr p = mem2chunk(mem);
- size_t sz = p->head & ~(PINUSE_BIT|CINUSE_BIT);
- do_check_inuse_chunk(m, p);
- assert((sz & CHUNK_ALIGN_MASK) == 0);
- assert(sz >= MIN_CHUNK_SIZE);
- assert(sz >= s);
- /* unless mmapped, size is less than MIN_CHUNK_SIZE more than request */
- assert(is_mmapped(p) || sz < (s + MIN_CHUNK_SIZE));
- }
-}
-
-/* Check a tree and its subtrees. */
-static void do_check_tree(mstate m, tchunkptr t) {
- tchunkptr head = 0;
- tchunkptr u = t;
- bindex_t tindex = t->index;
- size_t tsize = chunksize(t);
- bindex_t idx;
- compute_tree_index(tsize, idx);
- assert(tindex == idx);
- assert(tsize >= MIN_LARGE_SIZE);
- assert(tsize >= minsize_for_tree_index(idx));
- assert((idx == NTREEBINS-1) || (tsize < minsize_for_tree_index((idx+1))));
-
- do { /* traverse through chain of same-sized nodes */
- do_check_any_chunk(m, ((mchunkptr)u));
- assert(u->index == tindex);
- assert(chunksize(u) == tsize);
- assert(!cinuse(u));
- assert(!next_pinuse(u));
- assert(u->fd->bk == u);
- assert(u->bk->fd == u);
- if (u->parent == 0) {
- assert(u->child[0] == 0);
- assert(u->child[1] == 0);
- }
- else {
- assert(head == 0); /* only one node on chain has parent */
- head = u;
- assert(u->parent != u);
- assert (u->parent->child[0] == u ||
- u->parent->child[1] == u ||
- *((tbinptr*)(u->parent)) == u);
- if (u->child[0] != 0) {
- assert(u->child[0]->parent == u);
- assert(u->child[0] != u);
- do_check_tree(m, u->child[0]);
- }
- if (u->child[1] != 0) {
- assert(u->child[1]->parent == u);
- assert(u->child[1] != u);
- do_check_tree(m, u->child[1]);
- }
- if (u->child[0] != 0 && u->child[1] != 0) {
- assert(chunksize(u->child[0]) < chunksize(u->child[1]));
- }
- }
- u = u->fd;
- } while (u != t);
- assert(head != 0);
-}
-
-/* Check all the chunks in a treebin. */
-static void do_check_treebin(mstate m, bindex_t i) {
- tbinptr* tb = treebin_at(m, i);
- tchunkptr t = *tb;
- int empty = (m->treemap & (1U << i)) == 0;
- if (t == 0)
- assert(empty);
- if (!empty)
- do_check_tree(m, t);
-}
-
-/* Check all the chunks in a smallbin. */
-static void do_check_smallbin(mstate m, bindex_t i) {
- sbinptr b = smallbin_at(m, i);
- mchunkptr p = b->bk;
- unsigned int empty = (m->smallmap & (1U << i)) == 0;
- if (p == b)
- assert(empty);
- if (!empty) {
- for (; p != b; p = p->bk) {
- size_t size = chunksize(p);
- mchunkptr q;
- /* each chunk claims to be free */
- do_check_free_chunk(m, p);
- /* chunk belongs in bin */
- assert(small_index(size) == i);
- assert(p->bk == b || chunksize(p->bk) == chunksize(p));
- /* chunk is followed by an inuse chunk */
- q = next_chunk(p);
- if (q->head != FENCEPOST_HEAD)
- do_check_inuse_chunk(m, q);
- }
- }
-}
-
-/* Find x in a bin. Used in other check functions. */
-static int bin_find(mstate m, mchunkptr x) {
- size_t size = chunksize(x);
- if (is_small(size)) {
- bindex_t sidx = small_index(size);
- sbinptr b = smallbin_at(m, sidx);
- if (smallmap_is_marked(m, sidx)) {
- mchunkptr p = b;
- do {
- if (p == x)
- return 1;
- } while ((p = p->fd) != b);
- }
- }
- else {
- bindex_t tidx;
- compute_tree_index(size, tidx);
- if (treemap_is_marked(m, tidx)) {
- tchunkptr t = *treebin_at(m, tidx);
- size_t sizebits = size << leftshift_for_tree_index(tidx);
- while (t != 0 && chunksize(t) != size) {
- t = t->child[(sizebits >> (SIZE_T_BITSIZE-SIZE_T_ONE)) & 1];
- sizebits <<= 1;
- }
- if (t != 0) {
- tchunkptr u = t;
- do {
- if (u == (tchunkptr)x)
- return 1;
- } while ((u = u->fd) != t);
- }
- }
- }
- return 0;
-}
-
-/* Traverse each chunk and check it; return total */
-static size_t traverse_and_check(mstate m) {
- size_t sum = 0;
- if (is_initialized(m)) {
- msegmentptr s = &m->seg;
- sum += m->topsize + TOP_FOOT_SIZE;
- while (s != 0) {
- mchunkptr q = align_as_chunk(s->base);
- mchunkptr lastq = 0;
- assert(pinuse(q));
- while (segment_holds(s, q) &&
- q != m->top && q->head != FENCEPOST_HEAD) {
- sum += chunksize(q);
- if (cinuse(q)) {
- assert(!bin_find(m, q));
- do_check_inuse_chunk(m, q);
- }
- else {
- assert(q == m->dv || bin_find(m, q));
- assert(lastq == 0 || cinuse(lastq)); /* Not 2 consecutive free */
- do_check_free_chunk(m, q);
- }
- lastq = q;
- q = next_chunk(q);
- }
- s = s->next;
- }
- }
- return sum;
-}
-
-/* Check all properties of malloc_state. */
-static void do_check_malloc_state(mstate m) {
- bindex_t i;
- size_t total;
- /* check bins */
- for (i = 0; i < NSMALLBINS; ++i)
- do_check_smallbin(m, i);
- for (i = 0; i < NTREEBINS; ++i)
- do_check_treebin(m, i);
-
- if (m->dvsize != 0) { /* check dv chunk */
- do_check_any_chunk(m, m->dv);
- assert(m->dvsize == chunksize(m->dv));
- assert(m->dvsize >= MIN_CHUNK_SIZE);
- assert(bin_find(m, m->dv) == 0);
- }
-
- if (m->top != 0) { /* check top chunk */
- do_check_top_chunk(m, m->top);
- assert(m->topsize == chunksize(m->top));
- assert(m->topsize > 0);
- assert(bin_find(m, m->top) == 0);
- }
-
- total = traverse_and_check(m);
- assert(total <= m->footprint);
- assert(m->footprint <= m->max_footprint);
-}
-#endif /* DEBUG */
-
-/* ----------------------------- statistics ------------------------------ */
-
-#if !NO_MALLINFO
-static struct mallinfo internal_mallinfo(mstate m) {
- struct mallinfo nm = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
- if (!PREACTION(m)) {
- check_malloc_state(m);
- if (is_initialized(m)) {
- size_t nfree = SIZE_T_ONE; /* top always free */
- size_t mfree = m->topsize + TOP_FOOT_SIZE;
- size_t sum = mfree;
- msegmentptr s = &m->seg;
- while (s != 0) {
- mchunkptr q = align_as_chunk(s->base);
- while (segment_holds(s, q) &&
- q != m->top && q->head != FENCEPOST_HEAD) {
- size_t sz = chunksize(q);
- sum += sz;
- if (!cinuse(q)) {
- mfree += sz;
- ++nfree;
- }
- q = next_chunk(q);
- }
- s = s->next;
- }
-
- nm.arena = sum;
- nm.ordblks = nfree;
- nm.hblkhd = m->footprint - sum;
- nm.usmblks = m->max_footprint;
- nm.uordblks = m->footprint - mfree;
- nm.fordblks = mfree;
- nm.keepcost = m->topsize;
- }
-
- POSTACTION(m);
- }
- return nm;
-}
-#endif /* !NO_MALLINFO */
-
-static void internal_malloc_stats(mstate m) {
- if (!PREACTION(m)) {
- size_t maxfp = 0;
- size_t fp = 0;
- size_t used = 0;
- check_malloc_state(m);
- if (is_initialized(m)) {
- msegmentptr s = &m->seg;
- maxfp = m->max_footprint;
- fp = m->footprint;
- used = fp - (m->topsize + TOP_FOOT_SIZE);
-
- while (s != 0) {
- mchunkptr q = align_as_chunk(s->base);
- while (segment_holds(s, q) &&
- q != m->top && q->head != FENCEPOST_HEAD) {
- if (!cinuse(q))
- used -= chunksize(q);
- q = next_chunk(q);
- }
- s = s->next;
- }
- }
-
- fprintf(stderr, "max system bytes = %10lu\n", (unsigned long)(maxfp));
- fprintf(stderr, "system bytes = %10lu\n", (unsigned long)(fp));
- fprintf(stderr, "in use bytes = %10lu\n", (unsigned long)(used));
-
- POSTACTION(m);
- }
-}
-
-/* ----------------------- Operations on smallbins ----------------------- */
-
-/*
- Various forms of linking and unlinking are defined as macros. Even
- the ones for trees, which are very long but have very short typical
- paths. This is ugly but reduces reliance on inlining support of
- compilers.
-*/
-
-/* Link a free chunk into a smallbin */
-#define insert_small_chunk(M, P, S) {\
- bindex_t I = small_index(S);\
- mchunkptr B = smallbin_at(M, I);\
- mchunkptr F = B;\
- assert(S >= MIN_CHUNK_SIZE);\
- if (!smallmap_is_marked(M, I))\
- mark_smallmap(M, I);\
- else if (RTCHECK(ok_address(M, B->fd)))\
- F = B->fd;\
- else {\
- CORRUPTION_ERROR_ACTION(M);\
- }\
- B->fd = P;\
- F->bk = P;\
- P->fd = F;\
- P->bk = B;\
-}
-
-/* Unlink a chunk from a smallbin */
-#define unlink_small_chunk(M, P, S) {\
- mchunkptr F = P->fd;\
- mchunkptr B = P->bk;\
- bindex_t I = small_index(S);\
- assert(P != B);\
- assert(P != F);\
- assert(chunksize(P) == small_index2size(I));\
- if (F == B)\
- clear_smallmap(M, I);\
- else if (RTCHECK((F == smallbin_at(M,I) || ok_address(M, F)) &&\
- (B == smallbin_at(M,I) || ok_address(M, B)))) {\
- F->bk = B;\
- B->fd = F;\
- }\
- else {\
- CORRUPTION_ERROR_ACTION(M);\
- }\
-}
-
-/* Unlink the first chunk from a smallbin */
-#define unlink_first_small_chunk(M, B, P, I) {\
- mchunkptr F = P->fd;\
- assert(P != B);\
- assert(P != F);\
- assert(chunksize(P) == small_index2size(I));\
- if (B == F)\
- clear_smallmap(M, I);\
- else if (RTCHECK(ok_address(M, F))) {\
- B->fd = F;\
- F->bk = B;\
- }\
- else {\
- CORRUPTION_ERROR_ACTION(M);\
- }\
-}
-
-/* Replace dv node, binning the old one */
-/* Used only when dvsize known to be small */
-#define replace_dv(M, P, S) {\
- size_t DVS = M->dvsize;\
- if (DVS != 0) {\
- mchunkptr DV = M->dv;\
- assert(is_small(DVS));\
- insert_small_chunk(M, DV, DVS);\
- }\
- M->dvsize = S;\
- M->dv = P;\
-}
-
-/* ------------------------- Operations on trees ------------------------- */
-
-/* Insert chunk into tree */
-#define insert_large_chunk(M, X, S) {\
- tbinptr* H;\
- bindex_t I;\
- compute_tree_index(S, I);\
- H = treebin_at(M, I);\
- X->index = I;\
- X->child[0] = X->child[1] = 0;\
- if (!treemap_is_marked(M, I)) {\
- mark_treemap(M, I);\
- *H = X;\
- X->parent = (tchunkptr)H;\
- X->fd = X->bk = X;\
- }\
- else {\
- tchunkptr T = *H;\
- size_t K = S << leftshift_for_tree_index(I);\
- for (;;) {\
- if (chunksize(T) != S) {\
- tchunkptr* C = &(T->child[(K >> (SIZE_T_BITSIZE-SIZE_T_ONE)) & 1]);\
- K <<= 1;\
- if (*C != 0)\
- T = *C;\
- else if (RTCHECK(ok_address(M, C))) {\
- *C = X;\
- X->parent = T;\
- X->fd = X->bk = X;\
- break;\
- }\
- else {\
- CORRUPTION_ERROR_ACTION(M);\
- break;\
- }\
- }\
- else {\
- tchunkptr F = T->fd;\
- if (RTCHECK(ok_address(M, T) && ok_address(M, F))) {\
- T->fd = F->bk = X;\
- X->fd = F;\
- X->bk = T;\
- X->parent = 0;\
- break;\
- }\
- else {\
- CORRUPTION_ERROR_ACTION(M);\
- break;\
- }\
- }\
- }\
- }\
-}
-
-/*
- Unlink steps:
-
- 1. If x is a chained node, unlink it from its same-sized fd/bk links
- and choose its bk node as its replacement.
- 2. If x was the last node of its size, but not a leaf node, it must
- be replaced with a leaf node (not merely one with an open left or
- right), to make sure that lefts and rights of descendents
- correspond properly to bit masks. We use the rightmost descendent
- of x. We could use any other leaf, but this is easy to locate and
- tends to counteract removal of leftmosts elsewhere, and so keeps
- paths shorter than minimally guaranteed. This doesn't loop much
- because on average a node in a tree is near the bottom.
- 3. If x is the base of a chain (i.e., has parent links) relink
- x's parent and children to x's replacement (or null if none).
-*/
-
-#define unlink_large_chunk(M, X) {\
- tchunkptr XP = X->parent;\
- tchunkptr R;\
- if (X->bk != X) {\
- tchunkptr F = X->fd;\
- R = X->bk;\
- if (RTCHECK(ok_address(M, F))) {\
- F->bk = R;\
- R->fd = F;\
- }\
- else {\
- CORRUPTION_ERROR_ACTION(M);\
- }\
- }\
- else {\
- tchunkptr* RP;\
- if (((R = *(RP = &(X->child[1]))) != 0) ||\
- ((R = *(RP = &(X->child[0]))) != 0)) {\
- tchunkptr* CP;\
- while ((*(CP = &(R->child[1])) != 0) ||\
- (*(CP = &(R->child[0])) != 0)) {\
- R = *(RP = CP);\
- }\
- if (RTCHECK(ok_address(M, RP)))\
- *RP = 0;\
- else {\
- CORRUPTION_ERROR_ACTION(M);\
- }\
- }\
- }\
- if (XP != 0) {\
- tbinptr* H = treebin_at(M, X->index);\
- if (X == *H) {\
- if ((*H = R) == 0) \
- clear_treemap(M, X->index);\
- }\
- else if (RTCHECK(ok_address(M, XP))) {\
- if (XP->child[0] == X) \
- XP->child[0] = R;\
- else \
- XP->child[1] = R;\
- }\
- else\
- CORRUPTION_ERROR_ACTION(M);\
- if (R != 0) {\
- if (RTCHECK(ok_address(M, R))) {\
- tchunkptr C0, C1;\
- R->parent = XP;\
- if ((C0 = X->child[0]) != 0) {\
- if (RTCHECK(ok_address(M, C0))) {\
- R->child[0] = C0;\
- C0->parent = R;\
- }\
- else\
- CORRUPTION_ERROR_ACTION(M);\
- }\
- if ((C1 = X->child[1]) != 0) {\
- if (RTCHECK(ok_address(M, C1))) {\
- R->child[1] = C1;\
- C1->parent = R;\
- }\
- else\
- CORRUPTION_ERROR_ACTION(M);\
- }\
- }\
- else\
- CORRUPTION_ERROR_ACTION(M);\
- }\
- }\
-}
-
-/* Relays to large vs small bin operations */
-
-#define insert_chunk(M, P, S)\
- if (is_small(S)) insert_small_chunk(M, P, S)\
- else { tchunkptr TP = (tchunkptr)(P); insert_large_chunk(M, TP, S); }
-
-#define unlink_chunk(M, P, S)\
- if (is_small(S)) unlink_small_chunk(M, P, S)\
- else { tchunkptr TP = (tchunkptr)(P); unlink_large_chunk(M, TP); }
-
-
-/* Relays to internal calls to malloc/free from realloc, memalign etc */
-
-#if ONLY_MSPACES
-#define internal_malloc(m, b) mspace_malloc(m, b)
-#define internal_free(m, mem) mspace_free(m,mem);
-#else /* ONLY_MSPACES */
-#if MSPACES
-#define internal_malloc(m, b)\
- (m == gm)? dlmalloc(b) : mspace_malloc(m, b)
-#define internal_free(m, mem)\
- if (m == gm) dlfree(mem); else mspace_free(m,mem);
-#else /* MSPACES */
-#define internal_malloc(m, b) dlmalloc(b)
-#define internal_free(m, mem) dlfree(mem)
-#endif /* MSPACES */
-#endif /* ONLY_MSPACES */
-
-/* ----------------------- Direct-mmapping chunks ----------------------- */
-
-/*
- Directly mmapped chunks are set up with an offset to the start of
- the mmapped region stored in the prev_foot field of the chunk. This
- allows reconstruction of the required argument to MUNMAP when freed,
- and also allows adjustment of the returned chunk to meet alignment
- requirements (especially in memalign). There is also enough space
- allocated to hold a fake next chunk of size SIZE_T_SIZE to maintain
- the PINUSE bit so frees can be checked.
-*/
-
-/* Malloc using mmap */
-static void* mmap_alloc(mstate m, size_t nb) {
- size_t mmsize = granularity_align(nb + SIX_SIZE_T_SIZES + CHUNK_ALIGN_MASK);
- if (mmsize > nb) { /* Check for wrap around 0 */
- char* mm = (char*)(DIRECT_MMAP(mmsize));
- if (mm != CMFAIL) {
- size_t offset = align_offset(chunk2mem(mm));
- size_t psize = mmsize - offset - MMAP_FOOT_PAD;
- mchunkptr p = (mchunkptr)(mm + offset);
- p->prev_foot = offset | IS_MMAPPED_BIT;
- (p)->head = (psize|CINUSE_BIT);
- mark_inuse_foot(m, p, psize);
- chunk_plus_offset(p, psize)->head = FENCEPOST_HEAD;
- chunk_plus_offset(p, psize+SIZE_T_SIZE)->head = 0;
-
- if (mm < m->least_addr)
- m->least_addr = mm;
- if ((m->footprint += mmsize) > m->max_footprint)
- m->max_footprint = m->footprint;
- assert(is_aligned(chunk2mem(p)));
- check_mmapped_chunk(m, p);
- return chunk2mem(p);
- }
- }
- return 0;
-}
-
-/* Realloc using mmap */
-static mchunkptr mmap_resize(mstate m, mchunkptr oldp, size_t nb) {
- size_t oldsize = chunksize(oldp);
- if (is_small(nb)) /* Can't shrink mmap regions below small size */
- return 0;
- /* Keep old chunk if big enough but not too big */
- if (oldsize >= nb + SIZE_T_SIZE &&
- (oldsize - nb) <= (mparams.granularity << 1))
- return oldp;
- else {
- size_t offset = oldp->prev_foot & ~IS_MMAPPED_BIT;
- size_t oldmmsize = oldsize + offset + MMAP_FOOT_PAD;
- size_t newmmsize = granularity_align(nb + SIX_SIZE_T_SIZES +
- CHUNK_ALIGN_MASK);
- char* cp = (char*)CALL_MREMAP((char*)oldp - offset,
- oldmmsize, newmmsize, 1);
- if (cp != CMFAIL) {
- mchunkptr newp = (mchunkptr)(cp + offset);
- size_t psize = newmmsize - offset - MMAP_FOOT_PAD;
- newp->head = (psize|CINUSE_BIT);
- mark_inuse_foot(m, newp, psize);
- chunk_plus_offset(newp, psize)->head = FENCEPOST_HEAD;
- chunk_plus_offset(newp, psize+SIZE_T_SIZE)->head = 0;
-
- if (cp < m->least_addr)
- m->least_addr = cp;
- if ((m->footprint += newmmsize - oldmmsize) > m->max_footprint)
- m->max_footprint = m->footprint;
- check_mmapped_chunk(m, newp);
- return newp;
- }
- }
- return 0;
-}
-
-/* -------------------------- mspace management -------------------------- */
-
-/* Initialize top chunk and its size */
-static void init_top(mstate m, mchunkptr p, size_t psize) {
- /* Ensure alignment */
- size_t offset = align_offset(chunk2mem(p));
- p = (mchunkptr)((char*)p + offset);
- psize -= offset;
-
- m->top = p;
- m->topsize = psize;
- p->head = psize | PINUSE_BIT;
- /* set size of fake trailing chunk holding overhead space only once */
- chunk_plus_offset(p, psize)->head = TOP_FOOT_SIZE;
- m->trim_check = mparams.trim_threshold; /* reset on each update */
-}
-
-/* Initialize bins for a new mstate that is otherwise zeroed out */
-static void init_bins(mstate m) {
- /* Establish circular links for smallbins */
- bindex_t i;
- for (i = 0; i < NSMALLBINS; ++i) {
- sbinptr bin = smallbin_at(m,i);
- bin->fd = bin->bk = bin;
- }
-}
-
-#if PROCEED_ON_ERROR
-
-/* default corruption action */
-static void reset_on_error(mstate m) {
- int i;
- ++malloc_corruption_error_count;
- /* Reinitialize fields to forget about all memory */
- m->smallbins = m->treebins = 0;
- m->dvsize = m->topsize = 0;
- m->seg.base = 0;
- m->seg.size = 0;
- m->seg.next = 0;
- m->top = m->dv = 0;
- for (i = 0; i < NTREEBINS; ++i)
- *treebin_at(m, i) = 0;
- init_bins(m);
-}
-#endif /* PROCEED_ON_ERROR */
-
-/* Allocate chunk and prepend remainder with chunk in successor base. */
-static void* prepend_alloc(mstate m, char* newbase, char* oldbase,
- size_t nb) {
- mchunkptr p = align_as_chunk(newbase);
- mchunkptr oldfirst = align_as_chunk(oldbase);
- size_t psize = (char*)oldfirst - (char*)p;
- mchunkptr q = chunk_plus_offset(p, nb);
- size_t qsize = psize - nb;
- set_size_and_pinuse_of_inuse_chunk(m, p, nb);
-
- assert((char*)oldfirst > (char*)q);
- assert(pinuse(oldfirst));
- assert(qsize >= MIN_CHUNK_SIZE);
-
- /* consolidate remainder with first chunk of old base */
- if (oldfirst == m->top) {
- size_t tsize = m->topsize += qsize;
- m->top = q;
- q->head = tsize | PINUSE_BIT;
- check_top_chunk(m, q);
- }
- else if (oldfirst == m->dv) {
- size_t dsize = m->dvsize += qsize;
- m->dv = q;
- set_size_and_pinuse_of_free_chunk(q, dsize);
- }
- else {
- if (!cinuse(oldfirst)) {
- size_t nsize = chunksize(oldfirst);
- unlink_chunk(m, oldfirst, nsize);
- oldfirst = chunk_plus_offset(oldfirst, nsize);
- qsize += nsize;
- }
- set_free_with_pinuse(q, qsize, oldfirst);
- insert_chunk(m, q, qsize);
- check_free_chunk(m, q);
- }
-
- check_malloced_chunk(m, chunk2mem(p), nb);
- return chunk2mem(p);
-}
-
-
-/* Add a segment to hold a new noncontiguous region */
-static void add_segment(mstate m, char* tbase, size_t tsize, flag_t mmapped) {
- /* Determine locations and sizes of segment, fenceposts, old top */
- char* old_top = (char*)m->top;
- msegmentptr oldsp = segment_holding(m, old_top);
- char* old_end = oldsp->base + oldsp->size;
- size_t ssize = pad_request(sizeof(struct malloc_segment));
- char* rawsp = old_end - (ssize + FOUR_SIZE_T_SIZES + CHUNK_ALIGN_MASK);
- size_t offset = align_offset(chunk2mem(rawsp));
- char* asp = rawsp + offset;
- char* csp = (asp < (old_top + MIN_CHUNK_SIZE))? old_top : asp;
- mchunkptr sp = (mchunkptr)csp;
- msegmentptr ss = (msegmentptr)(chunk2mem(sp));
- mchunkptr tnext = chunk_plus_offset(sp, ssize);
- mchunkptr p = tnext;
- int nfences = 0;
-
- /* reset top to new space */
- init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);
-
- /* Set up segment record */
- assert(is_aligned(ss));
- set_size_and_pinuse_of_inuse_chunk(m, sp, ssize);
- *ss = m->seg; /* Push current record */
- m->seg.base = tbase;
- m->seg.size = tsize;
- m->seg.sflags = mmapped;
- m->seg.next = ss;
-
- /* Insert trailing fenceposts */
- for (;;) {
- mchunkptr nextp = chunk_plus_offset(p, SIZE_T_SIZE);
- p->head = FENCEPOST_HEAD;
- ++nfences;
- if ((char*)(&(nextp->head)) < old_end)
- p = nextp;
- else
- break;
- }
- assert(nfences >= 2);
-
- /* Insert the rest of old top into a bin as an ordinary free chunk */
- if (csp != old_top) {
- mchunkptr q = (mchunkptr)old_top;
- size_t psize = csp - old_top;
- mchunkptr tn = chunk_plus_offset(q, psize);
- set_free_with_pinuse(q, psize, tn);
- insert_chunk(m, q, psize);
- }
-
- check_top_chunk(m, m->top);
-}
-
-/* -------------------------- System allocation -------------------------- */
-
-/* Get memory from system using MORECORE or MMAP */
-static void* sys_alloc(mstate m, size_t nb) {
- char* tbase = CMFAIL;
- size_t tsize = 0;
- flag_t mmap_flag = 0;
-
- init_mparams();
-
- /* Directly map large chunks */
- if (use_mmap(m) && nb >= mparams.mmap_threshold) {
- void* mem = mmap_alloc(m, nb);
- if (mem != 0)
- return mem;
- }
-
- /*
- Try getting memory in any of three ways (in most-preferred to
- least-preferred order):
- 1. A call to MORECORE that can normally contiguously extend memory.
- (disabled if not MORECORE_CONTIGUOUS or not HAVE_MORECORE or
- or main space is mmapped or a previous contiguous call failed)
- 2. A call to MMAP new space (disabled if not HAVE_MMAP).
- Note that under the default settings, if MORECORE is unable to
- fulfill a request, and HAVE_MMAP is true, then mmap is
- used as a noncontiguous system allocator. This is a useful backup
- strategy for systems with holes in address spaces -- in this case
- sbrk cannot contiguously expand the heap, but mmap may be able to
- find space.
- 3. A call to MORECORE that cannot usually contiguously extend memory.
- (disabled if not HAVE_MORECORE)
- */
-
- if (MORECORE_CONTIGUOUS && !use_noncontiguous(m)) {
- char* br = CMFAIL;
- msegmentptr ss = (m->top == 0)? 0 : segment_holding(m, (char*)m->top);
- size_t asize = 0;
- ACQUIRE_MORECORE_LOCK();
-
- if (ss == 0) { /* First time through or recovery */
- char* base = (char*)CALL_MORECORE(0);
- if (base != CMFAIL) {
- asize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE);
- /* Adjust to end on a page boundary */
- if (!is_page_aligned(base))
- asize += (page_align((size_t)base) - (size_t)base);
- /* Can't call MORECORE if size is negative when treated as signed */
- if (asize < HALF_MAX_SIZE_T &&
- (br = (char*)(CALL_MORECORE(asize))) == base) {
- tbase = base;
- tsize = asize;
- }
- }
- }
- else {
- /* Subtract out existing available top space from MORECORE request. */
- asize = granularity_align(nb - m->topsize + TOP_FOOT_SIZE + SIZE_T_ONE);
- /* Use mem here only if it did continuously extend old space */
- if (asize < HALF_MAX_SIZE_T &&
- (br = (char*)(CALL_MORECORE(asize))) == ss->base+ss->size) {
- tbase = br;
- tsize = asize;
- }
- }
-
- if (tbase == CMFAIL) { /* Cope with partial failure */
- if (br != CMFAIL) { /* Try to use/extend the space we did get */
- if (asize < HALF_MAX_SIZE_T &&
- asize < nb + TOP_FOOT_SIZE + SIZE_T_ONE) {
- size_t esize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE - asize);
- if (esize < HALF_MAX_SIZE_T) {
- char* end = (char*)CALL_MORECORE(esize);
- if (end != CMFAIL)
- asize += esize;
- else { /* Can't use; try to release */
- CALL_MORECORE(-asize);
- br = CMFAIL;
- }
- }
- }
- }
- if (br != CMFAIL) { /* Use the space we did get */
- tbase = br;
- tsize = asize;
- }
- else
- disable_contiguous(m); /* Don't try contiguous path in the future */
- }
-
- RELEASE_MORECORE_LOCK();
- }
-
- if (HAVE_MMAP && tbase == CMFAIL) { /* Try MMAP */
- size_t req = nb + TOP_FOOT_SIZE + SIZE_T_ONE;
- size_t rsize = granularity_align(req);
- if (rsize > nb) { /* Fail if wraps around zero */
- char* mp = (char*)(CALL_MMAP(rsize));
- if (mp != CMFAIL) {
- tbase = mp;
- tsize = rsize;
- mmap_flag = IS_MMAPPED_BIT;
- }
- }
- }
-
- if (HAVE_MORECORE && tbase == CMFAIL) { /* Try noncontiguous MORECORE */
- size_t asize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE);
- if (asize < HALF_MAX_SIZE_T) {
- char* br = CMFAIL;
- char* end = CMFAIL;
- ACQUIRE_MORECORE_LOCK();
- br = (char*)(CALL_MORECORE(asize));
- end = (char*)(CALL_MORECORE(0));
- RELEASE_MORECORE_LOCK();
- if (br != CMFAIL && end != CMFAIL && br < end) {
- size_t ssize = end - br;
- if (ssize > nb + TOP_FOOT_SIZE) {
- tbase = br;
- tsize = ssize;
- }
- }
- }
- }
-
- if (tbase != CMFAIL) {
-
- if ((m->footprint += tsize) > m->max_footprint)
- m->max_footprint = m->footprint;
-
- if (!is_initialized(m)) { /* first-time initialization */
- m->seg.base = m->least_addr = tbase;
- m->seg.size = tsize;
- m->seg.sflags = mmap_flag;
- m->magic = mparams.magic;
- init_bins(m);
- if (is_global(m))
- init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);
- else {
- /* Offset top by embedded malloc_state */
- mchunkptr mn = next_chunk(mem2chunk(m));
- init_top(m, mn, (size_t)((tbase + tsize) - (char*)mn) -TOP_FOOT_SIZE);
- }
- }
-
- else {
- /* Try to merge with an existing segment */
- msegmentptr sp = &m->seg;
- while (sp != 0 && tbase != sp->base + sp->size)
- sp = sp->next;
- if (sp != 0 &&
- !is_extern_segment(sp) &&
- (sp->sflags & IS_MMAPPED_BIT) == mmap_flag &&
- segment_holds(sp, m->top)) { /* append */
- sp->size += tsize;
- init_top(m, m->top, m->topsize + tsize);
- }
- else {
- if (tbase < m->least_addr)
- m->least_addr = tbase;
- sp = &m->seg;
- while (sp != 0 && sp->base != tbase + tsize)
- sp = sp->next;
- if (sp != 0 &&
- !is_extern_segment(sp) &&
- (sp->sflags & IS_MMAPPED_BIT) == mmap_flag) {
- char* oldbase = sp->base;
- sp->base = tbase;
- sp->size += tsize;
- return prepend_alloc(m, tbase, oldbase, nb);
- }
- else
- add_segment(m, tbase, tsize, mmap_flag);
- }
- }
-
- if (nb < m->topsize) { /* Allocate from new or extended top space */
- size_t rsize = m->topsize -= nb;
- mchunkptr p = m->top;
- mchunkptr r = m->top = chunk_plus_offset(p, nb);
- r->head = rsize | PINUSE_BIT;
- set_size_and_pinuse_of_inuse_chunk(m, p, nb);
- check_top_chunk(m, m->top);
- check_malloced_chunk(m, chunk2mem(p), nb);
- return chunk2mem(p);
- }
- }
-
- MALLOC_FAILURE_ACTION;
- return 0;
-}
-
-/* ----------------------- system deallocation -------------------------- */
-
-/* Unmap and unlink any mmapped segments that don't contain used chunks */
-static size_t release_unused_segments(mstate m) {
- size_t released = 0;
- msegmentptr pred = &m->seg;
- msegmentptr sp = pred->next;
- while (sp != 0) {
- char* base = sp->base;
- size_t size = sp->size;
- msegmentptr next = sp->next;
- if (is_mmapped_segment(sp) && !is_extern_segment(sp)) {
- mchunkptr p = align_as_chunk(base);
- size_t psize = chunksize(p);
- /* Can unmap if first chunk holds entire segment and not pinned */
- if (!cinuse(p) && (char*)p + psize >= base + size - TOP_FOOT_SIZE) {
- tchunkptr tp = (tchunkptr)p;
- assert(segment_holds(sp, (char*)sp));
- if (p == m->dv) {
- m->dv = 0;
- m->dvsize = 0;
- }
- else {
- unlink_large_chunk(m, tp);
- }
- if (CALL_MUNMAP(base, size) == 0) {
- released += size;
- m->footprint -= size;
- /* unlink obsoleted record */
- sp = pred;
- sp->next = next;
- }
- else { /* back out if cannot unmap */
- insert_large_chunk(m, tp, psize);
- }
- }
- }
- pred = sp;
- sp = next;
- }
- return released;
-}
-
-static int sys_trim(mstate m, size_t pad) {
- size_t released = 0;
- if (pad < MAX_REQUEST && is_initialized(m)) {
- pad += TOP_FOOT_SIZE; /* ensure enough room for segment overhead */
-
- if (m->topsize > pad) {
- /* Shrink top space in granularity-size units, keeping at least one */
- size_t unit = mparams.granularity;
- size_t extra = ((m->topsize - pad + (unit - SIZE_T_ONE)) / unit -
- SIZE_T_ONE) * unit;
- msegmentptr sp = segment_holding(m, (char*)m->top);
-
- if (!is_extern_segment(sp)) {
- if (is_mmapped_segment(sp)) {
- if (HAVE_MMAP &&
- sp->size >= extra &&
- !has_segment_link(m, sp)) { /* can't shrink if pinned */
- size_t newsize = sp->size - extra;
- /* Prefer mremap, fall back to munmap */
- if ((CALL_MREMAP(sp->base, sp->size, newsize, 0) != MFAIL) ||
- (CALL_MUNMAP(sp->base + newsize, extra) == 0)) {
- released = extra;
- }
- }
- }
- else if (HAVE_MORECORE) {
- if (extra >= HALF_MAX_SIZE_T) /* Avoid wrapping negative */
- extra = (HALF_MAX_SIZE_T) + SIZE_T_ONE - unit;
- ACQUIRE_MORECORE_LOCK();
- {
- /* Make sure end of memory is where we last set it. */
- char* old_br = (char*)(CALL_MORECORE(0));
- if (old_br == sp->base + sp->size) {
- char* rel_br = (char*)(CALL_MORECORE(-extra));
- char* new_br = (char*)(CALL_MORECORE(0));
- if (rel_br != CMFAIL && new_br < old_br)
- released = old_br - new_br;
- }
- }
- RELEASE_MORECORE_LOCK();
- }
- }
-
- if (released != 0) {
- sp->size -= released;
- m->footprint -= released;
- init_top(m, m->top, m->topsize - released);
- check_top_chunk(m, m->top);
- }
- }
-
- /* Unmap any unused mmapped segments */
- if (HAVE_MMAP)
- released += release_unused_segments(m);
-
- /* On failure, disable autotrim to avoid repeated failed future calls */
- if (released == 0)
- m->trim_check = MAX_SIZE_T;
- }
-
- return (released != 0)? 1 : 0;
-}
-
-/* ---------------------------- malloc support --------------------------- */
-
-/* allocate a large request from the best fitting chunk in a treebin */
-static void* tmalloc_large(mstate m, size_t nb) {
- tchunkptr v = 0;
- size_t rsize = -nb; /* Unsigned negation */
- tchunkptr t;
- bindex_t idx;
- compute_tree_index(nb, idx);
-
- if ((t = *treebin_at(m, idx)) != 0) {
- /* Traverse tree for this bin looking for node with size == nb */
- size_t sizebits = nb << leftshift_for_tree_index(idx);
- tchunkptr rst = 0; /* The deepest untaken right subtree */
- for (;;) {
- tchunkptr rt;
- size_t trem = chunksize(t) - nb;
- if (trem < rsize) {
- v = t;
- if ((rsize = trem) == 0)
- break;
- }
- rt = t->child[1];
- t = t->child[(sizebits >> (SIZE_T_BITSIZE-SIZE_T_ONE)) & 1];
- if (rt != 0 && rt != t)
- rst = rt;
- if (t == 0) {
- t = rst; /* set t to least subtree holding sizes > nb */
- break;
- }
- sizebits <<= 1;
- }
- }
-
- if (t == 0 && v == 0) { /* set t to root of next non-empty treebin */
- binmap_t leftbits = left_bits(idx2bit(idx)) & m->treemap;
- if (leftbits != 0) {
- bindex_t i;
- binmap_t leastbit = least_bit(leftbits);
- compute_bit2idx(leastbit, i);
- t = *treebin_at(m, i);
- }
- }
-
- while (t != 0) { /* find smallest of tree or subtree */
- size_t trem = chunksize(t) - nb;
- if (trem < rsize) {
- rsize = trem;
- v = t;
- }
- t = leftmost_child(t);
- }
-
- /* If dv is a better fit, return 0 so malloc will use it */
- if (v != 0 && rsize < (size_t)(m->dvsize - nb)) {
- if (RTCHECK(ok_address(m, v))) { /* split */
- mchunkptr r = chunk_plus_offset(v, nb);
- assert(chunksize(v) == rsize + nb);
- if (RTCHECK(ok_next(v, r))) {
- unlink_large_chunk(m, v);
- if (rsize < MIN_CHUNK_SIZE)
- set_inuse_and_pinuse(m, v, (rsize + nb));
- else {
- set_size_and_pinuse_of_inuse_chunk(m, v, nb);
- set_size_and_pinuse_of_free_chunk(r, rsize);
- insert_chunk(m, r, rsize);
- }
- return chunk2mem(v);
- }
- }
- CORRUPTION_ERROR_ACTION(m);
- }
- return 0;
-}
-
-/* allocate a small request from the best fitting chunk in a treebin */
-static void* tmalloc_small(mstate m, size_t nb) {
- tchunkptr t, v;
- size_t rsize;
- bindex_t i;
- binmap_t leastbit = least_bit(m->treemap);
- compute_bit2idx(leastbit, i);
-
- v = t = *treebin_at(m, i);
- rsize = chunksize(t) - nb;
-
- while ((t = leftmost_child(t)) != 0) {
- size_t trem = chunksize(t) - nb;
- if (trem < rsize) {
- rsize = trem;
- v = t;
- }
- }
-
- if (RTCHECK(ok_address(m, v))) {
- mchunkptr r = chunk_plus_offset(v, nb);
- assert(chunksize(v) == rsize + nb);
- if (RTCHECK(ok_next(v, r))) {
- unlink_large_chunk(m, v);
- if (rsize < MIN_CHUNK_SIZE)
- set_inuse_and_pinuse(m, v, (rsize + nb));
- else {
- set_size_and_pinuse_of_inuse_chunk(m, v, nb);
- set_size_and_pinuse_of_free_chunk(r, rsize);
- replace_dv(m, r, rsize);
- }
- return chunk2mem(v);
- }
- }
-
- CORRUPTION_ERROR_ACTION(m);
- return 0;
-}
-
-/* --------------------------- realloc support --------------------------- */
-
-static void* internal_realloc(mstate m, void* oldmem, size_t bytes) {
- if (bytes >= MAX_REQUEST) {
- MALLOC_FAILURE_ACTION;
- return 0;
- }
- if (!PREACTION(m)) {
- mchunkptr oldp = mem2chunk(oldmem);
- size_t oldsize = chunksize(oldp);
- mchunkptr next = chunk_plus_offset(oldp, oldsize);
- mchunkptr newp = 0;
- void* extra = 0;
-
- /* Try to either shrink or extend into top. Else malloc-copy-free */
-
- if (RTCHECK(ok_address(m, oldp) && ok_cinuse(oldp) &&
- ok_next(oldp, next) && ok_pinuse(next))) {
- size_t nb = request2size(bytes);
- if (is_mmapped(oldp))
- newp = mmap_resize(m, oldp, nb);
- else if (oldsize >= nb) { /* already big enough */
- size_t rsize = oldsize - nb;
- newp = oldp;
- if (rsize >= MIN_CHUNK_SIZE) {
- mchunkptr remainder = chunk_plus_offset(newp, nb);
- set_inuse(m, newp, nb);
- set_inuse(m, remainder, rsize);
- extra = chunk2mem(remainder);
- }
- }
- else if (next == m->top && oldsize + m->topsize > nb) {
- /* Expand into top */
- size_t newsize = oldsize + m->topsize;
- size_t newtopsize = newsize - nb;
- mchunkptr newtop = chunk_plus_offset(oldp, nb);
- set_inuse(m, oldp, nb);
- newtop->head = newtopsize |PINUSE_BIT;
- m->top = newtop;
- m->topsize = newtopsize;
- newp = oldp;
- }
- }
- else {
- USAGE_ERROR_ACTION(m, oldmem);
- POSTACTION(m);
- return 0;
- }
-
- POSTACTION(m);
-
- if (newp != 0) {
- if (extra != 0) {
- internal_free(m, extra);
- }
- check_inuse_chunk(m, newp);
- return chunk2mem(newp);
- }
- else {
- void* newmem = internal_malloc(m, bytes);
- if (newmem != 0) {
- size_t oc = oldsize - overhead_for(oldp);
- memcpy(newmem, oldmem, (oc < bytes)? oc : bytes);
- internal_free(m, oldmem);
- }
- return newmem;
- }
- }
- return 0;
-}
-
-/* --------------------------- memalign support -------------------------- */
-
-static void* internal_memalign(mstate m, size_t alignment, size_t bytes) {
- if (alignment <= MALLOC_ALIGNMENT) /* Can just use malloc */
- return internal_malloc(m, bytes);
- if (alignment < MIN_CHUNK_SIZE) /* must be at least a minimum chunk size */
- alignment = MIN_CHUNK_SIZE;
- if ((alignment & (alignment-SIZE_T_ONE)) != 0) {/* Ensure a power of 2 */
- size_t a = MALLOC_ALIGNMENT << 1;
- while (a < alignment) a <<= 1;
- alignment = a;
- }
-
- if (bytes >= MAX_REQUEST - alignment) {
- if (m != 0) { /* Test isn't needed but avoids compiler warning */
- MALLOC_FAILURE_ACTION;
- }
- }
- else {
- size_t nb = request2size(bytes);
- size_t req = nb + alignment + MIN_CHUNK_SIZE - CHUNK_OVERHEAD;
- char* mem = (char*)internal_malloc(m, req);
- if (mem != 0) {
- void* leader = 0;
- void* trailer = 0;
- mchunkptr p = mem2chunk(mem);
-
- if (PREACTION(m)) return 0;
- if ((((size_t)(mem)) % alignment) != 0) { /* misaligned */
- /*
- Find an aligned spot inside chunk. Since we need to give
- back leading space in a chunk of at least MIN_CHUNK_SIZE, if
- the first calculation places us at a spot with less than
- MIN_CHUNK_SIZE leader, we can move to the next aligned spot.
- We've allocated enough total room so that this is always
- possible.
- */
- char* br = (char*)mem2chunk((size_t)(((size_t)(mem +
- alignment -
- SIZE_T_ONE)) &
- -alignment));
- char* pos = ((size_t)(br - (char*)(p)) >= MIN_CHUNK_SIZE)?
- br : br+alignment;
- mchunkptr newp = (mchunkptr)pos;
- size_t leadsize = pos - (char*)(p);
- size_t newsize = chunksize(p) - leadsize;
-
- if (is_mmapped(p)) { /* For mmapped chunks, just adjust offset */
- newp->prev_foot = p->prev_foot + leadsize;
- newp->head = (newsize|CINUSE_BIT);
- }
- else { /* Otherwise, give back leader, use the rest */
- set_inuse(m, newp, newsize);
- set_inuse(m, p, leadsize);
- leader = chunk2mem(p);
- }
- p = newp;
- }
-
- /* Give back spare room at the end */
- if (!is_mmapped(p)) {
- size_t size = chunksize(p);
- if (size > nb + MIN_CHUNK_SIZE) {
- size_t remainder_size = size - nb;
- mchunkptr remainder = chunk_plus_offset(p, nb);
- set_inuse(m, p, nb);
- set_inuse(m, remainder, remainder_size);
- trailer = chunk2mem(remainder);
- }
- }
-
- assert (chunksize(p) >= nb);
- assert((((size_t)(chunk2mem(p))) % alignment) == 0);
- check_inuse_chunk(m, p);
- POSTACTION(m);
- if (leader != 0) {
- internal_free(m, leader);
- }
- if (trailer != 0) {
- internal_free(m, trailer);
- }
- return chunk2mem(p);
- }
- }
- return 0;
-}
-
-/* ------------------------ comalloc/coalloc support --------------------- */
-
-static void** ialloc(mstate m,
- size_t n_elements,
- size_t* sizes,
- int opts,
- void* chunks[]) {
- /*
- This provides common support for independent_X routines, handling
- all of the combinations that can result.
-
- The opts arg has:
- bit 0 set if all elements are same size (using sizes[0])
- bit 1 set if elements should be zeroed
- */
-
- size_t element_size; /* chunksize of each element, if all same */
- size_t contents_size; /* total size of elements */
- size_t array_size; /* request size of pointer array */
- void* mem; /* malloced aggregate space */
- mchunkptr p; /* corresponding chunk */
- size_t remainder_size; /* remaining bytes while splitting */
- void** marray; /* either "chunks" or malloced ptr array */
- mchunkptr array_chunk; /* chunk for malloced ptr array */
- flag_t was_enabled; /* to disable mmap */
- size_t size;
- size_t i;
-
- /* compute array length, if needed */
- if (chunks != 0) {
- if (n_elements == 0)
- return chunks; /* nothing to do */
- marray = chunks;
- array_size = 0;
- }
- else {
- /* if empty req, must still return chunk representing empty array */
- if (n_elements == 0)
- return (void**)internal_malloc(m, 0);
- marray = 0;
- array_size = request2size(n_elements * (sizeof(void*)));
- }
-
- /* compute total element size */
- if (opts & 0x1) { /* all-same-size */
- element_size = request2size(*sizes);
- contents_size = n_elements * element_size;
- }
- else { /* add up all the sizes */
- element_size = 0;
- contents_size = 0;
- for (i = 0; i != n_elements; ++i)
- contents_size += request2size(sizes[i]);
- }
-
- size = contents_size + array_size;
-
- /*
- Allocate the aggregate chunk. First disable direct-mmapping so
- malloc won't use it, since we would not be able to later
- free/realloc space internal to a segregated mmap region.
- */
- was_enabled = use_mmap(m);
- disable_mmap(m);
- mem = internal_malloc(m, size - CHUNK_OVERHEAD);
- if (was_enabled)
- enable_mmap(m);
- if (mem == 0)
- return 0;
-
- if (PREACTION(m)) return 0;
- p = mem2chunk(mem);
- remainder_size = chunksize(p);
-
- assert(!is_mmapped(p));
-
- if (opts & 0x2) { /* optionally clear the elements */
- memset((size_t*)mem, 0, remainder_size - SIZE_T_SIZE - array_size);
- }
-
- /* If not provided, allocate the pointer array as final part of chunk */
- if (marray == 0) {
- size_t array_chunk_size;
- array_chunk = chunk_plus_offset(p, contents_size);
- array_chunk_size = remainder_size - contents_size;
- marray = (void**) (chunk2mem(array_chunk));
- set_size_and_pinuse_of_inuse_chunk(m, array_chunk, array_chunk_size);
- remainder_size = contents_size;
- }
-
- /* split out elements */
- for (i = 0; ; ++i) {
- marray[i] = chunk2mem(p);
- if (i != n_elements-1) {
- if (element_size != 0)
- size = element_size;
- else
- size = request2size(sizes[i]);
- remainder_size -= size;
- set_size_and_pinuse_of_inuse_chunk(m, p, size);
- p = chunk_plus_offset(p, size);
- }
- else { /* the final element absorbs any overallocation slop */
- set_size_and_pinuse_of_inuse_chunk(m, p, remainder_size);
- break;
- }
- }
-
-#if DEBUG
- if (marray != chunks) {
- /* final element must have exactly exhausted chunk */
- if (element_size != 0) {
- assert(remainder_size == element_size);
- }
- else {
- assert(remainder_size == request2size(sizes[i]));
- }
- check_inuse_chunk(m, mem2chunk(marray));
- }
- for (i = 0; i != n_elements; ++i)
- check_inuse_chunk(m, mem2chunk(marray[i]));
-
-#endif /* DEBUG */
-
- POSTACTION(m);
- return marray;
-}
-
-
-/* -------------------------- public routines ---------------------------- */
-
-#if !ONLY_MSPACES
-
-void* dlmalloc(size_t bytes) {
- /*
- Basic algorithm:
- If a small request (< 256 bytes minus per-chunk overhead):
- 1. If one exists, use a remainderless chunk in associated smallbin.
- (Remainderless means that there are too few excess bytes to
- represent as a chunk.)
- 2. If it is big enough, use the dv chunk, which is normally the
- chunk adjacent to the one used for the most recent small request.
- 3. If one exists, split the smallest available chunk in a bin,
- saving remainder in dv.
- 4. If it is big enough, use the top chunk.
- 5. If available, get memory from system and use it
- Otherwise, for a large request:
- 1. Find the smallest available binned chunk that fits, and use it
- if it is better fitting than dv chunk, splitting if necessary.
- 2. If better fitting than any binned chunk, use the dv chunk.
- 3. If it is big enough, use the top chunk.
- 4. If request size >= mmap threshold, try to directly mmap this chunk.
- 5. If available, get memory from system and use it
-
- The ugly goto's here ensure that postaction occurs along all paths.
- */
-
- if (!PREACTION(gm)) {
- void* mem;
- size_t nb;
- if (bytes <= MAX_SMALL_REQUEST) {
- bindex_t idx;
- binmap_t smallbits;
- nb = (bytes < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(bytes);
- idx = small_index(nb);
- smallbits = gm->smallmap >> idx;
-
- if ((smallbits & 0x3U) != 0) { /* Remainderless fit to a smallbin. */
- mchunkptr b, p;
- idx += ~smallbits & 1; /* Uses next bin if idx empty */
- b = smallbin_at(gm, idx);
- p = b->fd;
- assert(chunksize(p) == small_index2size(idx));
- unlink_first_small_chunk(gm, b, p, idx);
- set_inuse_and_pinuse(gm, p, small_index2size(idx));
- mem = chunk2mem(p);
- check_malloced_chunk(gm, mem, nb);
- goto postaction;
- }
-
- else if (nb > gm->dvsize) {
- if (smallbits != 0) { /* Use chunk in next nonempty smallbin */
- mchunkptr b, p, r;
- size_t rsize;
- bindex_t i;
- binmap_t leftbits = (smallbits << idx) & left_bits(idx2bit(idx));
- binmap_t leastbit = least_bit(leftbits);
- compute_bit2idx(leastbit, i);
- b = smallbin_at(gm, i);
- p = b->fd;
- assert(chunksize(p) == small_index2size(i));
- unlink_first_small_chunk(gm, b, p, i);
- rsize = small_index2size(i) - nb;
- /* Fit here cannot be remainderless if 4byte sizes */
- if (SIZE_T_SIZE != 4 && rsize < MIN_CHUNK_SIZE)
- set_inuse_and_pinuse(gm, p, small_index2size(i));
- else {
- set_size_and_pinuse_of_inuse_chunk(gm, p, nb);
- r = chunk_plus_offset(p, nb);
- set_size_and_pinuse_of_free_chunk(r, rsize);
- replace_dv(gm, r, rsize);
- }
- mem = chunk2mem(p);
- check_malloced_chunk(gm, mem, nb);
- goto postaction;
- }
-
- else if (gm->treemap != 0 && (mem = tmalloc_small(gm, nb)) != 0) {
- check_malloced_chunk(gm, mem, nb);
- goto postaction;
- }
- }
- }
- else if (bytes >= MAX_REQUEST)
- nb = MAX_SIZE_T; /* Too big to allocate. Force failure (in sys alloc) */
- else {
- nb = pad_request(bytes);
- if (gm->treemap != 0 && (mem = tmalloc_large(gm, nb)) != 0) {
- check_malloced_chunk(gm, mem, nb);
- goto postaction;
- }
- }
-
- if (nb <= gm->dvsize) {
- size_t rsize = gm->dvsize - nb;
- mchunkptr p = gm->dv;
- if (rsize >= MIN_CHUNK_SIZE) { /* split dv */
- mchunkptr r = gm->dv = chunk_plus_offset(p, nb);
- gm->dvsize = rsize;
- set_size_and_pinuse_of_free_chunk(r, rsize);
- set_size_and_pinuse_of_inuse_chunk(gm, p, nb);
- }
- else { /* exhaust dv */
- size_t dvs = gm->dvsize;
- gm->dvsize = 0;
- gm->dv = 0;
- set_inuse_and_pinuse(gm, p, dvs);
- }
- mem = chunk2mem(p);
- check_malloced_chunk(gm, mem, nb);
- goto postaction;
- }
-
- else if (nb < gm->topsize) { /* Split top */
- size_t rsize = gm->topsize -= nb;
- mchunkptr p = gm->top;
- mchunkptr r = gm->top = chunk_plus_offset(p, nb);
- r->head = rsize | PINUSE_BIT;
- set_size_and_pinuse_of_inuse_chunk(gm, p, nb);
- mem = chunk2mem(p);
- check_top_chunk(gm, gm->top);
- check_malloced_chunk(gm, mem, nb);
- goto postaction;
- }
-
- mem = sys_alloc(gm, nb);
-
- postaction:
- POSTACTION(gm);
- return mem;
- }
-
- return 0;
-}
-
-void dlfree(void* mem) {
- /*
- Consolidate freed chunks with preceeding or succeeding bordering
- free chunks, if they exist, and then place in a bin. Intermixed
- with special cases for top, dv, mmapped chunks, and usage errors.
- */
-
- if (mem != 0) {
- mchunkptr p = mem2chunk(mem);
-#if FOOTERS
- mstate fm = get_mstate_for(p);
- if (!ok_magic(fm)) {
- USAGE_ERROR_ACTION(fm, p);
- return;
- }
-#else /* FOOTERS */
-#define fm gm
-#endif /* FOOTERS */
- if (!PREACTION(fm)) {
- check_inuse_chunk(fm, p);
- if (RTCHECK(ok_address(fm, p) && ok_cinuse(p))) {
- size_t psize = chunksize(p);
- mchunkptr next = chunk_plus_offset(p, psize);
- if (!pinuse(p)) {
- size_t prevsize = p->prev_foot;
- if ((prevsize & IS_MMAPPED_BIT) != 0) {
- prevsize &= ~IS_MMAPPED_BIT;
- psize += prevsize + MMAP_FOOT_PAD;
- if (CALL_MUNMAP((char*)p - prevsize, psize) == 0)
- fm->footprint -= psize;
- goto postaction;
- }
- else {
- mchunkptr prev = chunk_minus_offset(p, prevsize);
- psize += prevsize;
- p = prev;
- if (RTCHECK(ok_address(fm, prev))) { /* consolidate backward */
- if (p != fm->dv) {
- unlink_chunk(fm, p, prevsize);
- }
- else if ((next->head & INUSE_BITS) == INUSE_BITS) {
- fm->dvsize = psize;
- set_free_with_pinuse(p, psize, next);
- goto postaction;
- }
- }
- else
- goto erroraction;
- }
- }
-
- if (RTCHECK(ok_next(p, next) && ok_pinuse(next))) {
- if (!cinuse(next)) { /* consolidate forward */
- if (next == fm->top) {
- size_t tsize = fm->topsize += psize;
- fm->top = p;
- p->head = tsize | PINUSE_BIT;
- if (p == fm->dv) {
- fm->dv = 0;
- fm->dvsize = 0;
- }
- if (should_trim(fm, tsize))
- sys_trim(fm, 0);
- goto postaction;
- }
- else if (next == fm->dv) {
- size_t dsize = fm->dvsize += psize;
- fm->dv = p;
- set_size_and_pinuse_of_free_chunk(p, dsize);
- goto postaction;
- }
- else {
- size_t nsize = chunksize(next);
- psize += nsize;
- unlink_chunk(fm, next, nsize);
- set_size_and_pinuse_of_free_chunk(p, psize);
- if (p == fm->dv) {
- fm->dvsize = psize;
- goto postaction;
- }
- }
- }
- else
- set_free_with_pinuse(p, psize, next);
- insert_chunk(fm, p, psize);
- check_free_chunk(fm, p);
- goto postaction;
- }
- }
- erroraction:
- USAGE_ERROR_ACTION(fm, p);
- postaction:
- POSTACTION(fm);
- }
- }
-#if !FOOTERS
-#undef fm
-#endif /* FOOTERS */
-}
-
-void* dlcalloc(size_t n_elements, size_t elem_size) {
- void* mem;
- size_t req = 0;
- if (n_elements != 0) {
- req = n_elements * elem_size;
- if (((n_elements | elem_size) & ~(size_t)0xffff) &&
- (req / n_elements != elem_size))
- req = MAX_SIZE_T; /* force downstream failure on overflow */
- }
- mem = dlmalloc(req);
- if (mem != 0 && calloc_must_clear(mem2chunk(mem)))
- memset(mem, 0, req);
- return mem;
-}
-
-void* dlrealloc(void* oldmem, size_t bytes) {
- if (oldmem == 0)
- return dlmalloc(bytes);
-#ifdef REALLOC_ZERO_BYTES_FREES
- if (bytes == 0) {
- dlfree(oldmem);
- return 0;
- }
-#endif /* REALLOC_ZERO_BYTES_FREES */
- else {
-#if ! FOOTERS
- mstate m = gm;
-#else /* FOOTERS */
- mstate m = get_mstate_for(mem2chunk(oldmem));
- if (!ok_magic(m)) {
- USAGE_ERROR_ACTION(m, oldmem);
- return 0;
- }
-#endif /* FOOTERS */
- return internal_realloc(m, oldmem, bytes);
- }
-}
-
-void* dlmemalign(size_t alignment, size_t bytes) {
- return internal_memalign(gm, alignment, bytes);
-}
-
-void** dlindependent_calloc(size_t n_elements, size_t elem_size,
- void* chunks[]) {
- size_t sz = elem_size; /* serves as 1-element array */
- return ialloc(gm, n_elements, &sz, 3, chunks);
-}
-
-void** dlindependent_comalloc(size_t n_elements, size_t sizes[],
- void* chunks[]) {
- return ialloc(gm, n_elements, sizes, 0, chunks);
-}
-
-void* dlvalloc(size_t bytes) {
- size_t pagesz;
- init_mparams();
- pagesz = mparams.page_size;
- return dlmemalign(pagesz, bytes);
-}
-
-void* dlpvalloc(size_t bytes) {
- size_t pagesz;
- init_mparams();
- pagesz = mparams.page_size;
- return dlmemalign(pagesz, (bytes + pagesz - SIZE_T_ONE) & ~(pagesz - SIZE_T_ONE));
-}
-
-int dlmalloc_trim(size_t pad) {
- int result = 0;
- if (!PREACTION(gm)) {
- result = sys_trim(gm, pad);
- POSTACTION(gm);
- }
- return result;
-}
-
-size_t dlmalloc_footprint(void) {
- return gm->footprint;
-}
-
-size_t dlmalloc_max_footprint(void) {
- return gm->max_footprint;
-}
-
-#if !NO_MALLINFO
-struct mallinfo dlmallinfo(void) {
- return internal_mallinfo(gm);
-}
-#endif /* NO_MALLINFO */
-
-void dlmalloc_stats() {
- internal_malloc_stats(gm);
-}
-
-size_t dlmalloc_usable_size(void* mem) {
- if (mem != 0) {
- mchunkptr p = mem2chunk(mem);
- if (cinuse(p))
- return chunksize(p) - overhead_for(p);
- }
- return 0;
-}
-
-int dlmallopt(int param_number, int value) {
- return change_mparam(param_number, value);
-}
-
-#endif /* !ONLY_MSPACES */
-
-/* ----------------------------- user mspaces ---------------------------- */
-
-#if MSPACES
-
-static mstate init_user_mstate(char* tbase, size_t tsize) {
- size_t msize = pad_request(sizeof(struct malloc_state));
- mchunkptr mn;
- mchunkptr msp = align_as_chunk(tbase);
- mstate m = (mstate)(chunk2mem(msp));
- memset(m, 0, msize);
- INITIAL_LOCK(&m->mutex);
- msp->head = (msize|PINUSE_BIT|CINUSE_BIT);
- m->seg.base = m->least_addr = tbase;
- m->seg.size = m->footprint = m->max_footprint = tsize;
- m->magic = mparams.magic;
- m->mflags = mparams.default_mflags;
- disable_contiguous(m);
- init_bins(m);
- mn = next_chunk(mem2chunk(m));
- init_top(m, mn, (size_t)((tbase + tsize) - (char*)mn) - TOP_FOOT_SIZE);
- check_top_chunk(m, m->top);
- return m;
-}
-
-mspace create_mspace(size_t capacity, int locked) {
- mstate m = 0;
- size_t msize = pad_request(sizeof(struct malloc_state));
- init_mparams(); /* Ensure pagesize etc initialized */
-
- if (capacity < (size_t) -(msize + TOP_FOOT_SIZE + mparams.page_size)) {
- size_t rs = ((capacity == 0)? mparams.granularity :
- (capacity + TOP_FOOT_SIZE + msize));
- size_t tsize = granularity_align(rs);
- char* tbase = (char*)(CALL_MMAP(tsize));
- if (tbase != CMFAIL) {
- m = init_user_mstate(tbase, tsize);
- m->seg.sflags = IS_MMAPPED_BIT;
- set_lock(m, locked);
- }
- }
- return (mspace)m;
-}
-
-mspace create_mspace_with_base(void* base, size_t capacity, int locked) {
- mstate m = 0;
- size_t msize = pad_request(sizeof(struct malloc_state));
- init_mparams(); /* Ensure pagesize etc initialized */
-
- if (capacity > msize + TOP_FOOT_SIZE &&
- capacity < (size_t) -(msize + TOP_FOOT_SIZE + mparams.page_size)) {
- m = init_user_mstate((char*)base, capacity);
- m->seg.sflags = EXTERN_BIT;
- set_lock(m, locked);
- }
- return (mspace)m;
-}
-
-size_t destroy_mspace(mspace msp) {
- size_t freed = 0;
- mstate ms = (mstate)msp;
- if (ok_magic(ms)) {
- msegmentptr sp = &ms->seg;
- while (sp != 0) {
- char* base = sp->base;
- size_t size = sp->size;
- flag_t flag = sp->sflags;
- sp = sp->next;
- if ((flag & IS_MMAPPED_BIT) && !(flag & EXTERN_BIT) &&
- CALL_MUNMAP(base, size) == 0)
- freed += size;
- }
- }
- else {
- USAGE_ERROR_ACTION(ms,ms);
- }
- return freed;
-}
-
-/*
- mspace versions of routines are near-clones of the global
- versions. This is not so nice but better than the alternatives.
-*/
-
-
-void* mspace_malloc(mspace msp, size_t bytes) {
- mstate ms = (mstate)msp;
- if (!ok_magic(ms)) {
- USAGE_ERROR_ACTION(ms,ms);
- return 0;
- }
- if (!PREACTION(ms)) {
- void* mem;
- size_t nb;
- if (bytes <= MAX_SMALL_REQUEST) {
- bindex_t idx;
- binmap_t smallbits;
- nb = (bytes < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(bytes);
- idx = small_index(nb);
- smallbits = ms->smallmap >> idx;
-
- if ((smallbits & 0x3U) != 0) { /* Remainderless fit to a smallbin. */
- mchunkptr b, p;
- idx += ~smallbits & 1; /* Uses next bin if idx empty */
- b = smallbin_at(ms, idx);
- p = b->fd;
- assert(chunksize(p) == small_index2size(idx));
- unlink_first_small_chunk(ms, b, p, idx);
- set_inuse_and_pinuse(ms, p, small_index2size(idx));
- mem = chunk2mem(p);
- check_malloced_chunk(ms, mem, nb);
- goto postaction;
- }
-
- else if (nb > ms->dvsize) {
- if (smallbits != 0) { /* Use chunk in next nonempty smallbin */
- mchunkptr b, p, r;
- size_t rsize;
- bindex_t i;
- binmap_t leftbits = (smallbits << idx) & left_bits(idx2bit(idx));
- binmap_t leastbit = least_bit(leftbits);
- compute_bit2idx(leastbit, i);
- b = smallbin_at(ms, i);
- p = b->fd;
- assert(chunksize(p) == small_index2size(i));
- unlink_first_small_chunk(ms, b, p, i);
- rsize = small_index2size(i) - nb;
- /* Fit here cannot be remainderless if 4byte sizes */
- if (SIZE_T_SIZE != 4 && rsize < MIN_CHUNK_SIZE)
- set_inuse_and_pinuse(ms, p, small_index2size(i));
- else {
- set_size_and_pinuse_of_inuse_chunk(ms, p, nb);
- r = chunk_plus_offset(p, nb);
- set_size_and_pinuse_of_free_chunk(r, rsize);
- replace_dv(ms, r, rsize);
- }
- mem = chunk2mem(p);
- check_malloced_chunk(ms, mem, nb);
- goto postaction;
- }
-
- else if (ms->treemap != 0 && (mem = tmalloc_small(ms, nb)) != 0) {
- check_malloced_chunk(ms, mem, nb);
- goto postaction;
- }
- }
- }
- else if (bytes >= MAX_REQUEST)
- nb = MAX_SIZE_T; /* Too big to allocate. Force failure (in sys alloc) */
- else {
- nb = pad_request(bytes);
- if (ms->treemap != 0 && (mem = tmalloc_large(ms, nb)) != 0) {
- check_malloced_chunk(ms, mem, nb);
- goto postaction;
- }
- }
-
- if (nb <= ms->dvsize) {
- size_t rsize = ms->dvsize - nb;
- mchunkptr p = ms->dv;
- if (rsize >= MIN_CHUNK_SIZE) { /* split dv */
- mchunkptr r = ms->dv = chunk_plus_offset(p, nb);
- ms->dvsize = rsize;
- set_size_and_pinuse_of_free_chunk(r, rsize);
- set_size_and_pinuse_of_inuse_chunk(ms, p, nb);
- }
- else { /* exhaust dv */
- size_t dvs = ms->dvsize;
- ms->dvsize = 0;
- ms->dv = 0;
- set_inuse_and_pinuse(ms, p, dvs);
- }
- mem = chunk2mem(p);
- check_malloced_chunk(ms, mem, nb);
- goto postaction;
- }
-
- else if (nb < ms->topsize) { /* Split top */
- size_t rsize = ms->topsize -= nb;
- mchunkptr p = ms->top;
- mchunkptr r = ms->top = chunk_plus_offset(p, nb);
- r->head = rsize | PINUSE_BIT;
- set_size_and_pinuse_of_inuse_chunk(ms, p, nb);
- mem = chunk2mem(p);
- check_top_chunk(ms, ms->top);
- check_malloced_chunk(ms, mem, nb);
- goto postaction;
- }
-
- mem = sys_alloc(ms, nb);
-
- postaction:
- POSTACTION(ms);
- return mem;
- }
-
- return 0;
-}
-
-void mspace_free(mspace msp, void* mem) {
- if (mem != 0) {
- mchunkptr p = mem2chunk(mem);
-#if FOOTERS
- mstate fm = get_mstate_for(p);
-#else /* FOOTERS */
- mstate fm = (mstate)msp;
-#endif /* FOOTERS */
- if (!ok_magic(fm)) {
- USAGE_ERROR_ACTION(fm, p);
- return;
- }
- if (!PREACTION(fm)) {
- check_inuse_chunk(fm, p);
- if (RTCHECK(ok_address(fm, p) && ok_cinuse(p))) {
- size_t psize = chunksize(p);
- mchunkptr next = chunk_plus_offset(p, psize);
- if (!pinuse(p)) {
- size_t prevsize = p->prev_foot;
- if ((prevsize & IS_MMAPPED_BIT) != 0) {
- prevsize &= ~IS_MMAPPED_BIT;
- psize += prevsize + MMAP_FOOT_PAD;
- if (CALL_MUNMAP((char*)p - prevsize, psize) == 0)
- fm->footprint -= psize;
- goto postaction;
- }
- else {
- mchunkptr prev = chunk_minus_offset(p, prevsize);
- psize += prevsize;
- p = prev;
- if (RTCHECK(ok_address(fm, prev))) { /* consolidate backward */
- if (p != fm->dv) {
- unlink_chunk(fm, p, prevsize);
- }
- else if ((next->head & INUSE_BITS) == INUSE_BITS) {
- fm->dvsize = psize;
- set_free_with_pinuse(p, psize, next);
- goto postaction;
- }
- }
- else
- goto erroraction;
- }
- }
-
- if (RTCHECK(ok_next(p, next) && ok_pinuse(next))) {
- if (!cinuse(next)) { /* consolidate forward */
- if (next == fm->top) {
- size_t tsize = fm->topsize += psize;
- fm->top = p;
- p->head = tsize | PINUSE_BIT;
- if (p == fm->dv) {
- fm->dv = 0;
- fm->dvsize = 0;
- }
- if (should_trim(fm, tsize))
- sys_trim(fm, 0);
- goto postaction;
- }
- else if (next == fm->dv) {
- size_t dsize = fm->dvsize += psize;
- fm->dv = p;
- set_size_and_pinuse_of_free_chunk(p, dsize);
- goto postaction;
- }
- else {
- size_t nsize = chunksize(next);
- psize += nsize;
- unlink_chunk(fm, next, nsize);
- set_size_and_pinuse_of_free_chunk(p, psize);
- if (p == fm->dv) {
- fm->dvsize = psize;
- goto postaction;
- }
- }
- }
- else
- set_free_with_pinuse(p, psize, next);
- insert_chunk(fm, p, psize);
- check_free_chunk(fm, p);
- goto postaction;
- }
- }
- erroraction:
- USAGE_ERROR_ACTION(fm, p);
- postaction:
- POSTACTION(fm);
- }
- }
-}
-
-void* mspace_calloc(mspace msp, size_t n_elements, size_t elem_size) {
- void* mem;
- size_t req = 0;
- mstate ms = (mstate)msp;
- if (!ok_magic(ms)) {
- USAGE_ERROR_ACTION(ms,ms);
- return 0;
- }
- if (n_elements != 0) {
- req = n_elements * elem_size;
- if (((n_elements | elem_size) & ~(size_t)0xffff) &&
- (req / n_elements != elem_size))
- req = MAX_SIZE_T; /* force downstream failure on overflow */
- }
- mem = internal_malloc(ms, req);
- if (mem != 0 && calloc_must_clear(mem2chunk(mem)))
- memset(mem, 0, req);
- return mem;
-}
-
-void* mspace_realloc(mspace msp, void* oldmem, size_t bytes) {
- if (oldmem == 0)
- return mspace_malloc(msp, bytes);
-#ifdef REALLOC_ZERO_BYTES_FREES
- if (bytes == 0) {
- mspace_free(msp, oldmem);
- return 0;
- }
-#endif /* REALLOC_ZERO_BYTES_FREES */
- else {
-#if FOOTERS
- mchunkptr p = mem2chunk(oldmem);
- mstate ms = get_mstate_for(p);
-#else /* FOOTERS */
- mstate ms = (mstate)msp;
-#endif /* FOOTERS */
- if (!ok_magic(ms)) {
- USAGE_ERROR_ACTION(ms,ms);
- return 0;
- }
- return internal_realloc(ms, oldmem, bytes);
- }
-}
-
-void* mspace_memalign(mspace msp, size_t alignment, size_t bytes) {
- mstate ms = (mstate)msp;
- if (!ok_magic(ms)) {
- USAGE_ERROR_ACTION(ms,ms);
- return 0;
- }
- return internal_memalign(ms, alignment, bytes);
-}
-
-void** mspace_independent_calloc(mspace msp, size_t n_elements,
- size_t elem_size, void* chunks[]) {
- size_t sz = elem_size; /* serves as 1-element array */
- mstate ms = (mstate)msp;
- if (!ok_magic(ms)) {
- USAGE_ERROR_ACTION(ms,ms);
- return 0;
- }
- return ialloc(ms, n_elements, &sz, 3, chunks);
-}
-
-void** mspace_independent_comalloc(mspace msp, size_t n_elements,
- size_t sizes[], void* chunks[]) {
- mstate ms = (mstate)msp;
- if (!ok_magic(ms)) {
- USAGE_ERROR_ACTION(ms,ms);
- return 0;
- }
- return ialloc(ms, n_elements, sizes, 0, chunks);
-}
-
-int mspace_trim(mspace msp, size_t pad) {
- int result = 0;
- mstate ms = (mstate)msp;
- if (ok_magic(ms)) {
- if (!PREACTION(ms)) {
- result = sys_trim(ms, pad);
- POSTACTION(ms);
- }
- }
- else {
- USAGE_ERROR_ACTION(ms,ms);
- }
- return result;
-}
-
-void mspace_malloc_stats(mspace msp) {
- mstate ms = (mstate)msp;
- if (ok_magic(ms)) {
- internal_malloc_stats(ms);
- }
- else {
- USAGE_ERROR_ACTION(ms,ms);
- }
-}
-
-size_t mspace_footprint(mspace msp) {
- size_t result;
- mstate ms = (mstate)msp;
- if (ok_magic(ms)) {
- result = ms->footprint;
- }
- USAGE_ERROR_ACTION(ms,ms);
- return result;
-}
-
-
-size_t mspace_max_footprint(mspace msp) {
- size_t result;
- mstate ms = (mstate)msp;
- if (ok_magic(ms)) {
- result = ms->max_footprint;
- }
- USAGE_ERROR_ACTION(ms,ms);
- return result;
-}
-
-
-#if !NO_MALLINFO
-struct mallinfo mspace_mallinfo(mspace msp) {
- mstate ms = (mstate)msp;
- if (!ok_magic(ms)) {
- USAGE_ERROR_ACTION(ms,ms);
- }
- return internal_mallinfo(ms);
-}
-#endif /* NO_MALLINFO */
-
-int mspace_mallopt(int param_number, int value) {
- return change_mparam(param_number, value);
-}
-
-#endif /* MSPACES */
-
-/* -------------------- Alternative MORECORE functions ------------------- */
-
-/*
- Guidelines for creating a custom version of MORECORE:
-
- * For best performance, MORECORE should allocate in multiples of pagesize.
- * MORECORE may allocate more memory than requested. (Or even less,
- but this will usually result in a malloc failure.)
- * MORECORE must not allocate memory when given argument zero, but
- instead return one past the end address of memory from previous
- nonzero call.
- * For best performance, consecutive calls to MORECORE with positive
- arguments should return increasing addresses, indicating that
- space has been contiguously extended.
- * Even though consecutive calls to MORECORE need not return contiguous
- addresses, it must be OK for malloc'ed chunks to span multiple
- regions in those cases where they do happen to be contiguous.
- * MORECORE need not handle negative arguments -- it may instead
- just return MFAIL when given negative arguments.
- Negative arguments are always multiples of pagesize. MORECORE
- must not misinterpret negative args as large positive unsigned
- args. You can suppress all such calls from even occurring by defining
- MORECORE_CANNOT_TRIM,
-
- As an example alternative MORECORE, here is a custom allocator
- kindly contributed for pre-OSX macOS. It uses virtually but not
- necessarily physically contiguous non-paged memory (locked in,
- present and won't get swapped out). You can use it by uncommenting
- this section, adding some #includes, and setting up the appropriate
- defines above:
-
- #define MORECORE osMoreCore
-
- There is also a shutdown routine that should somehow be called for
- cleanup upon program exit.
-
- #define MAX_POOL_ENTRIES 100
- #define MINIMUM_MORECORE_SIZE (64 * 1024U)
- static int next_os_pool;
- void *our_os_pools[MAX_POOL_ENTRIES];
-
- void *osMoreCore(int size)
- {
- void *ptr = 0;
- static void *sbrk_top = 0;
-
- if (size > 0)
- {
- if (size < MINIMUM_MORECORE_SIZE)
- size = MINIMUM_MORECORE_SIZE;
- if (CurrentExecutionLevel() == kTaskLevel)
- ptr = PoolAllocateResident(size + RM_PAGE_SIZE, 0);
- if (ptr == 0)
- {
- return (void *) MFAIL;
- }
- // save ptrs so they can be freed during cleanup
- our_os_pools[next_os_pool] = ptr;
- next_os_pool++;
- ptr = (void *) ((((size_t) ptr) + RM_PAGE_MASK) & ~RM_PAGE_MASK);
- sbrk_top = (char *) ptr + size;
- return ptr;
- }
- else if (size < 0)
- {
- // we don't currently support shrink behavior
- return (void *) MFAIL;
- }
- else
- {
- return sbrk_top;
- }
- }
-
- // cleanup any allocated memory pools
- // called as last thing before shutting down driver
-
- void osCleanupMem(void)
- {
- void **ptr;
-
- for (ptr = our_os_pools; ptr < &our_os_pools[MAX_POOL_ENTRIES]; ptr++)
- if (*ptr)
- {
- PoolDeallocate(*ptr);
- *ptr = 0;
- }
- }
-
-*/
-
-
-/* -----------------------------------------------------------------------
-History:
- V2.8.3 Thu Sep 22 11:16:32 2005 Doug Lea (dl at gee)
- * Add max_footprint functions
- * Ensure all appropriate literals are size_t
- * Fix conditional compilation problem for some #define settings
- * Avoid concatenating segments with the one provided
- in create_mspace_with_base
- * Rename some variables to avoid compiler shadowing warnings
- * Use explicit lock initialization.
- * Better handling of sbrk interference.
- * Simplify and fix segment insertion, trimming and mspace_destroy
- * Reinstate REALLOC_ZERO_BYTES_FREES option from 2.7.x
- * Thanks especially to Dennis Flanagan for help on these.
-
- V2.8.2 Sun Jun 12 16:01:10 2005 Doug Lea (dl at gee)
- * Fix memalign brace error.
-
- V2.8.1 Wed Jun 8 16:11:46 2005 Doug Lea (dl at gee)
- * Fix improper #endif nesting in C++
- * Add explicit casts needed for C++
-
- V2.8.0 Mon May 30 14:09:02 2005 Doug Lea (dl at gee)
- * Use trees for large bins
- * Support mspaces
- * Use segments to unify sbrk-based and mmap-based system allocation,
- removing need for emulation on most platforms without sbrk.
- * Default safety checks
- * Optional footer checks. Thanks to William Robertson for the idea.
- * Internal code refactoring
- * Incorporate suggestions and platform-specific changes.
- Thanks to Dennis Flanagan, Colin Plumb, Niall Douglas,
- Aaron Bachmann, Emery Berger, and others.
- * Speed up non-fastbin processing enough to remove fastbins.
- * Remove useless cfree() to avoid conflicts with other apps.
- * Remove internal memcpy, memset. Compilers handle builtins better.
- * Remove some options that no one ever used and rename others.
-
- V2.7.2 Sat Aug 17 09:07:30 2002 Doug Lea (dl at gee)
- * Fix malloc_state bitmap array misdeclaration
-
- V2.7.1 Thu Jul 25 10:58:03 2002 Doug Lea (dl at gee)
- * Allow tuning of FIRST_SORTED_BIN_SIZE
- * Use PTR_UINT as type for all ptr->int casts. Thanks to John Belmonte.
- * Better detection and support for non-contiguousness of MORECORE.
- Thanks to Andreas Mueller, Conal Walsh, and Wolfram Gloger
- * Bypass most of malloc if no frees. Thanks To Emery Berger.
- * Fix freeing of old top non-contiguous chunk im sysmalloc.
- * Raised default trim and map thresholds to 256K.
- * Fix mmap-related #defines. Thanks to Lubos Lunak.
- * Fix copy macros; added LACKS_FCNTL_H. Thanks to Neal Walfield.
- * Branch-free bin calculation
- * Default trim and mmap thresholds now 256K.
-
- V2.7.0 Sun Mar 11 14:14:06 2001 Doug Lea (dl at gee)
- * Introduce independent_comalloc and independent_calloc.
- Thanks to Michael Pachos for motivation and help.
- * Make optional .h file available
- * Allow > 2GB requests on 32bit systems.
- * new WIN32 sbrk, mmap, munmap, lock code from <Walter@GeNeSys-e.de>.
- Thanks also to Andreas Mueller <a.mueller at paradatec.de>,
- and Anonymous.
- * Allow override of MALLOC_ALIGNMENT (Thanks to Ruud Waij for
- helping test this.)
- * memalign: check alignment arg
- * realloc: don't try to shift chunks backwards, since this
- leads to more fragmentation in some programs and doesn't
- seem to help in any others.
- * Collect all cases in malloc requiring system memory into sysmalloc
- * Use mmap as backup to sbrk
- * Place all internal state in malloc_state
- * Introduce fastbins (although similar to 2.5.1)
- * Many minor tunings and cosmetic improvements
- * Introduce USE_PUBLIC_MALLOC_WRAPPERS, USE_MALLOC_LOCK
- * Introduce MALLOC_FAILURE_ACTION, MORECORE_CONTIGUOUS
- Thanks to Tony E. Bennett <tbennett@nvidia.com> and others.
- * Include errno.h to support default failure action.
-
- V2.6.6 Sun Dec 5 07:42:19 1999 Doug Lea (dl at gee)
- * return null for negative arguments
- * Added Several WIN32 cleanups from Martin C. Fong <mcfong at yahoo.com>
- * Add 'LACKS_SYS_PARAM_H' for those systems without 'sys/param.h'
- (e.g. WIN32 platforms)
- * Cleanup header file inclusion for WIN32 platforms
- * Cleanup code to avoid Microsoft Visual C++ compiler complaints
- * Add 'USE_DL_PREFIX' to quickly allow co-existence with existing
- memory allocation routines
- * Set 'malloc_getpagesize' for WIN32 platforms (needs more work)
- * Use 'assert' rather than 'ASSERT' in WIN32 code to conform to
- usage of 'assert' in non-WIN32 code
- * Improve WIN32 'sbrk()' emulation's 'findRegion()' routine to
- avoid infinite loop
- * Always call 'fREe()' rather than 'free()'
-
- V2.6.5 Wed Jun 17 15:57:31 1998 Doug Lea (dl at gee)
- * Fixed ordering problem with boundary-stamping
-
- V2.6.3 Sun May 19 08:17:58 1996 Doug Lea (dl at gee)
- * Added pvalloc, as recommended by H.J. Liu
- * Added 64bit pointer support mainly from Wolfram Gloger
- * Added anonymously donated WIN32 sbrk emulation
- * Malloc, calloc, getpagesize: add optimizations from Raymond Nijssen
- * malloc_extend_top: fix mask error that caused wastage after
- foreign sbrks
- * Add linux mremap support code from HJ Liu
-
- V2.6.2 Tue Dec 5 06:52:55 1995 Doug Lea (dl at gee)
- * Integrated most documentation with the code.
- * Add support for mmap, with help from
- Wolfram Gloger (Gloger@lrz.uni-muenchen.de).
- * Use last_remainder in more cases.
- * Pack bins using idea from colin@nyx10.cs.du.edu
- * Use ordered bins instead of best-fit threshhold
- * Eliminate block-local decls to simplify tracing and debugging.
- * Support another case of realloc via move into top
- * Fix error occuring when initial sbrk_base not word-aligned.
- * Rely on page size for units instead of SBRK_UNIT to
- avoid surprises about sbrk alignment conventions.
- * Add mallinfo, mallopt. Thanks to Raymond Nijssen
- (raymond@es.ele.tue.nl) for the suggestion.
- * Add `pad' argument to malloc_trim and top_pad mallopt parameter.
- * More precautions for cases where other routines call sbrk,
- courtesy of Wolfram Gloger (Gloger@lrz.uni-muenchen.de).
- * Added macros etc., allowing use in linux libc from
- H.J. Lu (hjl@gnu.ai.mit.edu)
- * Inverted this history list
-
- V2.6.1 Sat Dec 2 14:10:57 1995 Doug Lea (dl at gee)
- * Re-tuned and fixed to behave more nicely with V2.6.0 changes.
- * Removed all preallocation code since under current scheme
- the work required to undo bad preallocations exceeds
- the work saved in good cases for most test programs.
- * No longer use return list or unconsolidated bins since
- no scheme using them consistently outperforms those that don't
- given above changes.
- * Use best fit for very large chunks to prevent some worst-cases.
- * Added some support for debugging
-
- V2.6.0 Sat Nov 4 07:05:23 1995 Doug Lea (dl at gee)
- * Removed footers when chunks are in use. Thanks to
- Paul Wilson (wilson@cs.texas.edu) for the suggestion.
-
- V2.5.4 Wed Nov 1 07:54:51 1995 Doug Lea (dl at gee)
- * Added malloc_trim, with help from Wolfram Gloger
- (wmglo@Dent.MED.Uni-Muenchen.DE).
-
- V2.5.3 Tue Apr 26 10:16:01 1994 Doug Lea (dl at g)
-
- V2.5.2 Tue Apr 5 16:20:40 1994 Doug Lea (dl at g)
- * realloc: try to expand in both directions
- * malloc: swap order of clean-bin strategy;
- * realloc: only conditionally expand backwards
- * Try not to scavenge used bins
- * Use bin counts as a guide to preallocation
- * Occasionally bin return list chunks in first scan
- * Add a few optimizations from colin@nyx10.cs.du.edu
-
- V2.5.1 Sat Aug 14 15:40:43 1993 Doug Lea (dl at g)
- * faster bin computation & slightly different binning
- * merged all consolidations to one part of malloc proper
- (eliminating old malloc_find_space & malloc_clean_bin)
- * Scan 2 returns chunks (not just 1)
- * Propagate failure in realloc if malloc returns 0
- * Add stuff to allow compilation on non-ANSI compilers
- from kpv@research.att.com
-
- V2.5 Sat Aug 7 07:41:59 1993 Doug Lea (dl at g.oswego.edu)
- * removed potential for odd address access in prev_chunk
- * removed dependency on getpagesize.h
- * misc cosmetics and a bit more internal documentation
- * anticosmetics: mangled names in macros to evade debugger strangeness
- * tested on sparc, hp-700, dec-mips, rs6000
- with gcc & native cc (hp, dec only) allowing
- Detlefs & Zorn comparison study (in SIGPLAN Notices.)
-
- Trial version Fri Aug 28 13:14:29 1992 Doug Lea (dl at g.oswego.edu)
- * Based loosely on libg++-1.2X malloc. (It retains some of the overall
- structure of old version, but most details differ.)
-
-*/
diff --git a/winsup/cygwin/malloc_wrapper.cc b/winsup/cygwin/malloc_wrapper.cc
deleted file mode 100644
index 48a82be..0000000
--- a/winsup/cygwin/malloc_wrapper.cc
+++ /dev/null
@@ -1,294 +0,0 @@
-/* malloc_wrapper.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007 Red Hat, Inc.
-
- Originally written by Steve Chamberlain of Cygnus Support
- sac@cygnus.com
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "perprocess.h"
-#include "cygmalloc.h"
-#ifndef MALLOC_DEBUG
-#include <malloc.h>
-#endif
-extern "C" struct mallinfo dlmallinfo ();
-
-/* we provide these stubs to call into a user's
- provided malloc if there is one - otherwise
- functions we provide - like strdup will cause
- problems if malloced on our heap and free'd on theirs.
-*/
-
-static int export_malloc_called;
-static int use_internal_malloc = 1;
-
-/* These routines are used by the application if it
- doesn't provide its own malloc. */
-
-extern "C" void
-free (void *p)
-{
- malloc_printf ("(%p), called by %p", p, __builtin_return_address (0));
- if (!use_internal_malloc)
- user_data->free (p);
- else
- {
- __malloc_lock ();
- dlfree (p);
- __malloc_unlock ();
- }
-}
-
-extern "C" void *
-malloc (size_t size)
-{
- void *res;
- export_malloc_called = 1;
- if (!use_internal_malloc)
- res = user_data->malloc (size);
- else
- {
- __malloc_lock ();
- res = dlmalloc (size);
- __malloc_unlock ();
- }
- malloc_printf ("(%d) = %x, called by %p", size, res, __builtin_return_address (0));
- return res;
-}
-
-extern "C" void *
-realloc (void *p, size_t size)
-{
- void *res;
- if (!use_internal_malloc)
- res = user_data->realloc (p, size);
- else
- {
- __malloc_lock ();
- res = dlrealloc (p, size);
- __malloc_unlock ();
- }
- malloc_printf ("(%x, %d) = %x, called by %x", p, size, res, __builtin_return_address (0));
- return res;
-}
-
-extern "C" void *
-calloc (size_t nmemb, size_t size)
-{
- void *res;
- if (!use_internal_malloc)
- res = user_data->calloc (nmemb, size);
- else
- {
- __malloc_lock ();
- res = dlcalloc (nmemb, size);
- __malloc_unlock ();
- }
- malloc_printf ("(%d, %d) = %x, called by %x", nmemb, size, res, __builtin_return_address (0));
- return res;
-}
-
-extern "C" int
-posix_memalign (void **memptr, size_t alignment, size_t bytes)
-{
- save_errno save;
-
- void *res;
- if (!use_internal_malloc)
- return ENOSYS;
- if ((alignment & (alignment - 1)) != 0)
- return EINVAL;
- __malloc_lock ();
- res = dlmemalign (alignment, bytes);
- __malloc_unlock ();
- if (!res)
- return ENOMEM;
- if (memptr)
- *memptr = res;
- return 0;
-}
-
-extern "C" void *
-memalign (size_t alignment, size_t bytes)
-{
- void *res;
- if (!use_internal_malloc)
- {
- set_errno (ENOSYS);
- res = NULL;
- }
- else
- {
- __malloc_lock ();
- res = dlmemalign (alignment, bytes);
- __malloc_unlock ();
- }
-
- return res;
-}
-
-extern "C" void *
-valloc (size_t bytes)
-{
- void *res;
- if (!use_internal_malloc)
- {
- set_errno (ENOSYS);
- res = NULL;
- }
- else
- {
- __malloc_lock ();
- res = dlvalloc (bytes);
- __malloc_unlock ();
- }
-
- return res;
-}
-
-extern "C" size_t
-malloc_usable_size (void *p)
-{
- size_t res;
- if (!use_internal_malloc)
- {
- set_errno (ENOSYS);
- res = 0;
- }
- else
- {
- __malloc_lock ();
- res = dlmalloc_usable_size (p);
- __malloc_unlock ();
- }
-
- return res;
-}
-
-extern "C" int
-malloc_trim (size_t pad)
-{
- size_t res;
- if (!use_internal_malloc)
- {
- set_errno (ENOSYS);
- res = 0;
- }
- else
- {
- __malloc_lock ();
- res = dlmalloc_trim (pad);
- __malloc_unlock ();
- }
-
- return res;
-}
-
-extern "C" int
-mallopt (int p, int v)
-{
- int res;
- if (!use_internal_malloc)
- {
- set_errno (ENOSYS);
- res = 0;
- }
- else
- {
- __malloc_lock ();
- res = dlmallopt (p, v);
- __malloc_unlock ();
- }
-
- return res;
-}
-
-extern "C" void
-malloc_stats ()
-{
- if (!use_internal_malloc)
- set_errno (ENOSYS);
- else
- {
- __malloc_lock ();
- dlmalloc_stats ();
- __malloc_unlock ();
- }
-}
-
-extern "C" struct mallinfo
-mallinfo ()
-{
- struct mallinfo m;
- if (!use_internal_malloc)
- set_errno (ENOSYS);
- else
- {
- __malloc_lock ();
- m = dlmallinfo ();
- __malloc_unlock ();
- }
-
- return m;
-}
-
-extern "C" char *
-strdup (const char *s)
-{
- char *p;
- size_t len = strlen (s) + 1;
- if ((p = (char *) malloc (len)) != NULL)
- memcpy (p, s, len);
- return p;
-}
-
-/* We use a critical section to lock access to the malloc data
- structures. This permits malloc to be called from different
- threads. Note that it does not make malloc reentrant, and it does
- not permit a signal handler to call malloc. The malloc code in
- newlib will call __malloc_lock and __malloc_unlock at appropriate
- times. */
-
-muto NO_COPY mallock;
-
-void
-malloc_init ()
-{
- mallock.init ("mallock");
-
-#ifndef MALLOC_DEBUG
- /* Check if malloc is provided by application. If so, redirect all
- calls to malloc/free/realloc to application provided. This may
- happen if some other dll calls cygwin's malloc, but main code provides
- its own malloc */
- if (!in_forkee)
- {
- user_data->free (user_data->malloc (16));
- if (export_malloc_called)
- malloc_printf ("using internal malloc");
- else
- {
- use_internal_malloc = 0;
- malloc_printf ("using external malloc");
- }
- }
-#endif
-}
-
-extern "C" void
-__set_ENOMEM ()
-{
- set_errno (ENOMEM);
-}
diff --git a/winsup/cygwin/mcount.c b/winsup/cygwin/mcount.c
deleted file mode 100644
index dcdbc2b..0000000
--- a/winsup/cygwin/mcount.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/*-
- * Copyright (c) 1983, 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if !defined(lint) && !defined(_KERNEL) && defined(LIBC_SCCS)
-static char rcsid[] = "$OpenBSD: mcount.c,v 1.6 1997/07/23 21:11:27 kstailey Exp $";
-#endif
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <gmon.h>
-
-/*
- * mcount is called on entry to each function compiled with the profiling
- * switch set. _mcount(), which is declared in a machine-dependent way
- * with _MCOUNT_DECL, does the actual work and is either inlined into a
- * C routine or called by an assembly stub. In any case, this magic is
- * taken care of by the MCOUNT definition in <machine/profile.h>.
- *
- * _mcount updates data structures that represent traversals of the
- * program's call graph edges. frompc and selfpc are the return
- * address and function address that represents the given call graph edge.
- *
- * Note: the original BSD code used the same variable (frompcindex) for
- * both frompcindex and frompc. Any reasonable, modern compiler will
- * perform this optimization.
- */
-//_MCOUNT_DECL __P((u_long frompc, u_long selfpc));
-_MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
- register u_long frompc, selfpc;
-{
- register u_short *frompcindex;
- register struct tostruct *top, *prevtop;
- register struct gmonparam *p;
- register long toindex;
-
- p = &_gmonparam;
- /*
- * check that we are profiling
- * and that we aren't recursively invoked.
- */
- if (p->state != GMON_PROF_ON)
- return;
- p->state = GMON_PROF_BUSY;
- /*
- * check that frompcindex is a reasonable pc value.
- * for example: signal catchers get called from the stack,
- * not from text space. too bad.
- */
- frompc -= p->lowpc;
- if (frompc > p->textsize)
- goto done;
-
-#if (HASHFRACTION & (HASHFRACTION - 1)) == 0
- if (p->hashfraction == HASHFRACTION)
- frompcindex =
- &p->froms[frompc / (HASHFRACTION * sizeof(*p->froms))];
- else
-#endif
- frompcindex =
- &p->froms[frompc / (p->hashfraction * sizeof(*p->froms))];
- toindex = *frompcindex;
- if (toindex == 0) {
- /*
- * first time traversing this arc
- */
- toindex = ++p->tos[0].link;
- if (toindex >= p->tolimit)
- /* halt further profiling */
- goto overflow;
-
- *frompcindex = toindex;
- top = &p->tos[toindex];
- top->selfpc = selfpc;
- top->count = 1;
- top->link = 0;
- goto done;
- }
- top = &p->tos[toindex];
- if (top->selfpc == selfpc) {
- /*
- * arc at front of chain; usual case.
- */
- top->count++;
- goto done;
- }
- /*
- * have to go looking down chain for it.
- * top points to what we are looking at,
- * prevtop points to previous top.
- * we know it is not at the head of the chain.
- */
- for (; /* goto done */; ) {
- if (top->link == 0) {
- /*
- * top is end of the chain and none of the chain
- * had top->selfpc == selfpc.
- * so we allocate a new tostruct
- * and link it to the head of the chain.
- */
- toindex = ++p->tos[0].link;
- if (toindex >= p->tolimit)
- goto overflow;
-
- top = &p->tos[toindex];
- top->selfpc = selfpc;
- top->count = 1;
- top->link = *frompcindex;
- *frompcindex = toindex;
- goto done;
- }
- /*
- * otherwise, check the next arc on the chain.
- */
- prevtop = top;
- top = &p->tos[top->link];
- if (top->selfpc == selfpc) {
- /*
- * there it is.
- * increment its count
- * move it to the head of the chain.
- */
- top->count++;
- toindex = prevtop->link;
- prevtop->link = top->link;
- top->link = *frompcindex;
- *frompcindex = toindex;
- goto done;
- }
- }
-done:
- p->state = GMON_PROF_ON;
- return;
-overflow:
- p->state = GMON_PROF_ERROR;
- return;
-}
-
-/*
- * Actual definition of mcount function. Defined in <machine/profile.h>,
- * which is included by <sys/gmon.h>
- */
-MCOUNT
-
diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc
deleted file mode 100644
index 845575e..0000000
--- a/winsup/cygwin/miscfuncs.cc
+++ /dev/null
@@ -1,546 +0,0 @@
-/* miscfuncs.cc: misc funcs that don't belong anywhere else
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "miscfuncs.h"
-#include <sys/uio.h>
-#include <assert.h>
-#include <alloca.h>
-#include <limits.h>
-#include <wchar.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <winnls.h>
-#include "cygtls.h"
-#include "ntdll.h"
-
-long tls_ix = -1;
-
-const char case_folded_lower[] NO_COPY = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, '!', '"', '#', '$', '%', '&', 39, '(', ')', '*', '+', ',', '-', '.', '/',
- '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?',
- '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
- 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '[', 92, ']', '^', '_',
- '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
- 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', 127,
- 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
- 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
- 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
- 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
- 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
- 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
- 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
- 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255
-};
-
-const char case_folded_upper[] NO_COPY = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, '!', '"', '#', '$', '%', '&', 39, '(', ')', '*', '+', ',', '-', '.', '/',
- '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?',
- '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', 92, ']', '^', '_',
- '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '{', '|', '}', '~', 127,
- 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
- 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
- 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
- 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
- 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
- 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
- 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
- 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255
-};
-
-const char isalpha_array[] NO_COPY = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, 0, 0, 0, 0, 0,
- 0,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-extern "C" int __stdcall
-cygwin_wcscasecmp (const wchar_t *ws, const wchar_t *wt)
-{
- UNICODE_STRING us, ut;
-
- RtlInitUnicodeString (&us, ws);
- RtlInitUnicodeString (&ut, wt);
- return RtlCompareUnicodeString (&us, &ut, TRUE);
-}
-
-extern "C" int __stdcall
-cygwin_wcsncasecmp (const wchar_t *ws, const wchar_t *wt, size_t n)
-{
- UNICODE_STRING us, ut;
- size_t ls = 0, lt = 0;
-
- while (ws[ls] && ls < n)
- ++ls;
- RtlInitCountedUnicodeString (&us, ws, ls * sizeof (WCHAR));
- while (wt[lt] && lt < n)
- ++lt;
- RtlInitCountedUnicodeString (&ut, wt, lt * sizeof (WCHAR));
- return RtlCompareUnicodeString (&us, &ut, TRUE);
-}
-
-extern "C" int __stdcall
-cygwin_strcasecmp (const char *cs, const char *ct)
-{
- UNICODE_STRING us, ut;
- ULONG len;
-
- len = (strlen (cs) + 1) * sizeof (WCHAR);
- RtlInitEmptyUnicodeString (&us, (PWCHAR) alloca (len), len);
- us.Length = sys_mbstowcs (us.Buffer, us.MaximumLength, cs) * sizeof (WCHAR);
- len = (strlen (ct) + 1) * sizeof (WCHAR);
- RtlInitEmptyUnicodeString (&ut, (PWCHAR) alloca (len), len);
- ut.Length = sys_mbstowcs (ut.Buffer, ut.MaximumLength, ct) * sizeof (WCHAR);
- return RtlCompareUnicodeString (&us, &ut, TRUE);
-}
-
-extern "C" int __stdcall
-cygwin_strncasecmp (const char *cs, const char *ct, size_t n)
-{
- UNICODE_STRING us, ut;
- ULONG len;
- size_t ls = 0, lt = 0;
-
- while (cs[ls] && ls < n)
- ++ls;
- len = (ls + 1) * sizeof (WCHAR);
- RtlInitEmptyUnicodeString (&us, (PWCHAR) alloca (len), len);
- us.Length = sys_mbstowcs (us.Buffer, ls + 1, cs, ls) * sizeof (WCHAR);
- while (ct[lt] && lt < n)
- ++lt;
- len = (lt + 1) * sizeof (WCHAR);
- RtlInitEmptyUnicodeString (&ut, (PWCHAR) alloca (len), len);
- ut.Length = sys_mbstowcs (ut.Buffer, lt + 1, ct, lt) * sizeof (WCHAR);
- return RtlCompareUnicodeString (&us, &ut, TRUE);
-}
-
-extern "C" wchar_t * __stdcall
-cygwin_wcslwr (wchar_t *string)
-{
- UNICODE_STRING us;
-
- RtlInitUnicodeString (&us, string);
- RtlDowncaseUnicodeString (&us, &us, FALSE);
- return string;
-}
-
-extern "C" wchar_t * __stdcall
-cygwin_wcsupr (wchar_t *string)
-{
- UNICODE_STRING us;
-
- RtlInitUnicodeString (&us, string);
- RtlUpcaseUnicodeString (&us, &us, FALSE);
- return string;
-}
-
-extern "C" char * __stdcall
-cygwin_strlwr (char *string)
-{
- UNICODE_STRING us;
- size_t len = (strlen (string) + 1) * sizeof (WCHAR);
-
- us.MaximumLength = len; us.Buffer = (PWCHAR) alloca (len);
- us.Length = sys_mbstowcs (us.Buffer, len, string) * sizeof (WCHAR)
- - sizeof (WCHAR);
- RtlDowncaseUnicodeString (&us, &us, FALSE);
- sys_wcstombs (string, len / sizeof (WCHAR), us.Buffer);
- return string;
-}
-
-extern "C" char * __stdcall
-cygwin_strupr (char *string)
-{
- UNICODE_STRING us;
- size_t len = (strlen (string) + 1) * sizeof (WCHAR);
-
- us.MaximumLength = len; us.Buffer = (PWCHAR) alloca (len);
- us.Length = sys_mbstowcs (us.Buffer, len, string) * sizeof (WCHAR)
- - sizeof (WCHAR);
- RtlUpcaseUnicodeString (&us, &us, FALSE);
- sys_wcstombs (string, len / sizeof (WCHAR), us.Buffer);
- return string;
-}
-
-/* FIXME? We only support standard ANSI/OEM codepages according to
- http://www.microsoft.com/globaldev/reference/cphome.mspx as well
- as UTF-8 and codepage 1361, which is also mentioned as valid
- doublebyte codepage in MSDN man pages (e.g. IsDBCSLeadByteEx).
- Everything else will be hosed. */
-
-bool
-is_cp_multibyte (UINT cp)
-{
- switch (cp)
- {
- case 932:
- case 936:
- case 949:
- case 950:
- case 1361:
- case 65001:
- return true;
- }
- return false;
-}
-
-/* OMYGOD! CharNextExA is not UTF-8 aware! It only works fine with
- double byte charsets. So we have to do it ourselves for UTF-8.
-
- While being at it, we do more. If a double-byte or multibyte
- sequence is truncated due to an early end, we need a way to recognize
- it. The reason is that multiple buffered write statements might
- accidentally stop and start in the middle of a single character byte
- sequence. If we have to interpret the byte sequences (as in
- fhandler_console), we would print wrong output in these cases.
-
- So we have four possible return values here:
-
- ret = end if str >= end
- ret = NULL if we encounter an invalid byte sequence
- ret = str if we encounter the start byte of a truncated byte sequence
- ret = str + n if we encounter a vaild byte sequence
-*/
-
-const unsigned char *
-next_char (UINT cp, const unsigned char *str, const unsigned char *end)
-{
- const unsigned char *ret = NULL;
-
- if (str >= end)
- return end;
-
- switch (cp)
- {
- case 932:
- case 936:
- case 949:
- case 950:
- case 1361:
- if (*str <= 0x7f)
- ret = str + 1;
- else if (str == end - 1 && IsDBCSLeadByteEx (cp, *str))
- ret = str;
- else
- ret = (const unsigned char *) CharNextExA (cp, (const CHAR *) str, 0);
- break;
- case CP_UTF8:
- switch (str[0] >> 4)
- {
- case 0x0 ... 0x7: /* One byte character. */
- ret = str + 1;
- break;
- case 0x8 ... 0xb: /* Followup byte. Invalid as first byte. */
- ret = NULL;
- break;
- case 0xc ... 0xd: /* Two byte character. */
- /* Check followup bytes for validity. */
- if (str >= end - 1)
- ret = str;
- else if (str[1] <= 0xbf)
- ret = str + 2;
- else
- ret = NULL;
- break;
- case 0xe: /* Three byte character. */
- if (str >= end - 2)
- ret = str;
- else if ((str[1] & 0xc0) == 0x80 && (str[2] & 0xc0) == 0x80
- && (str[0] != 0xe0 || str[1] >= 0xa0)
- && (str[0] != 0xed || str[1] <= 0x9f))
- ret = str + 3;
- else
- ret = NULL;
- break;
- case 0xf: /* Four byte character. */
- if (str[0] >= 0xf8)
- ret = NULL;
- else if (str >= end - 3)
- ret = str;
- else if ((str[1] & 0xc0) == 0x80 && (str[2] & 0xc0) == 0x80
- && (str[3] & 0xc0) == 0x80
- && (str[0] == 0xf0 || str[1] >= 0x90)
- && (str[0] == 0xf4 || str[1] <= 0x8f))
- ret = str + 4;
- else
- ret = NULL;
- break;
- }
- break;
- default:
- ret = str + 1;
- break;
- }
- return ret;
-}
-
-int __stdcall
-check_invalid_virtual_addr (const void *s, unsigned sz)
-{
- MEMORY_BASIC_INFORMATION mbuf;
- const void *end;
-
- for (end = (char *) s + sz; s < end;
- s = (char *) mbuf.BaseAddress + mbuf.RegionSize)
- if (!VirtualQuery (s, &mbuf, sizeof mbuf))
- return EINVAL;
- return 0;
-}
-
-static char __attribute__ ((noinline))
-dummytest (volatile char *p)
-{
- return *p;
-}
-
-ssize_t
-check_iovec (const struct iovec *iov, int iovcnt, bool forwrite)
-{
- if (iovcnt <= 0 || iovcnt > IOV_MAX)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- size_t tot = 0;
-
- while (iovcnt != 0)
- {
- if (iov->iov_len > SSIZE_MAX || (tot += iov->iov_len) > SSIZE_MAX)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- volatile char *p = ((char *) iov->iov_base) + iov->iov_len - 1;
- if (!iov->iov_len)
- /* nothing to do */;
- else if (!forwrite)
- *p = dummytest (p);
- else
- dummytest (p);
-
- iov++;
- iovcnt--;
- }
-
- assert (tot <= SSIZE_MAX);
-
- return (ssize_t) tot;
-}
-
-extern "C" int
-low_priority_sleep (DWORD secs)
-{
- HANDLE thisthread = GetCurrentThread ();
- int curr_prio = GetThreadPriority (thisthread);
- bool staylow;
- if (secs != INFINITE)
- staylow = false;
- else
- {
- secs = 0;
- staylow = true;
- }
-
- if (!secs)
- {
- for (int i = 0; i < 3; i++)
- SwitchToThread ();
- }
- else
- {
- int new_prio;
- if (GetCurrentThreadId () == cygthread::main_thread_id)
- new_prio = THREAD_PRIORITY_LOWEST;
- else
- new_prio = GetThreadPriority (hMainThread);
-
- if (curr_prio != new_prio)
- /* Force any threads in normal priority to be scheduled */
- SetThreadPriority (thisthread, new_prio);
- Sleep (secs);
-
- if (!staylow && curr_prio != new_prio)
- SetThreadPriority (thisthread, curr_prio);
- }
-
- return curr_prio;
-}
-
-/* Get a default value for the nice factor. When changing these values,
- have a look into the below function nice_to_winprio. The values must
- match the layout of the static "priority" array. */
-int
-winprio_to_nice (DWORD prio)
-{
- switch (prio)
- {
- case REALTIME_PRIORITY_CLASS:
- return -20;
- case HIGH_PRIORITY_CLASS:
- return -16;
- case ABOVE_NORMAL_PRIORITY_CLASS:
- return -8;
- case NORMAL_PRIORITY_CLASS:
- return 0;
- case BELOW_NORMAL_PRIORITY_CLASS:
- return 8;
- case IDLE_PRIORITY_CLASS:
- return 16;
- }
- return 0;
-}
-
-/* Get a Win32 priority matching the incoming nice factor. The incoming
- nice is limited to the interval [-NZERO,NZERO-1]. */
-DWORD
-nice_to_winprio (int &nice)
-{
- static const DWORD priority[] NO_COPY =
- {
- REALTIME_PRIORITY_CLASS, /* 0 */
- HIGH_PRIORITY_CLASS, /* 1 */
- HIGH_PRIORITY_CLASS,
- HIGH_PRIORITY_CLASS,
- HIGH_PRIORITY_CLASS,
- HIGH_PRIORITY_CLASS,
- HIGH_PRIORITY_CLASS,
- HIGH_PRIORITY_CLASS, /* 7 */
- ABOVE_NORMAL_PRIORITY_CLASS, /* 8 */
- ABOVE_NORMAL_PRIORITY_CLASS,
- ABOVE_NORMAL_PRIORITY_CLASS,
- ABOVE_NORMAL_PRIORITY_CLASS,
- ABOVE_NORMAL_PRIORITY_CLASS,
- ABOVE_NORMAL_PRIORITY_CLASS,
- ABOVE_NORMAL_PRIORITY_CLASS,
- ABOVE_NORMAL_PRIORITY_CLASS, /* 15 */
- NORMAL_PRIORITY_CLASS, /* 16 */
- NORMAL_PRIORITY_CLASS,
- NORMAL_PRIORITY_CLASS,
- NORMAL_PRIORITY_CLASS,
- NORMAL_PRIORITY_CLASS,
- NORMAL_PRIORITY_CLASS,
- NORMAL_PRIORITY_CLASS,
- NORMAL_PRIORITY_CLASS, /* 23 */
- BELOW_NORMAL_PRIORITY_CLASS, /* 24 */
- BELOW_NORMAL_PRIORITY_CLASS,
- BELOW_NORMAL_PRIORITY_CLASS,
- BELOW_NORMAL_PRIORITY_CLASS,
- BELOW_NORMAL_PRIORITY_CLASS,
- BELOW_NORMAL_PRIORITY_CLASS,
- BELOW_NORMAL_PRIORITY_CLASS,
- BELOW_NORMAL_PRIORITY_CLASS, /* 31 */
- IDLE_PRIORITY_CLASS, /* 32 */
- IDLE_PRIORITY_CLASS,
- IDLE_PRIORITY_CLASS,
- IDLE_PRIORITY_CLASS,
- IDLE_PRIORITY_CLASS,
- IDLE_PRIORITY_CLASS,
- IDLE_PRIORITY_CLASS,
- IDLE_PRIORITY_CLASS /* 39 */
- };
- if (nice < -NZERO)
- nice = -NZERO;
- else if (nice > NZERO - 1)
- nice = NZERO - 1;
- DWORD prio = priority[nice + NZERO];
- if (!wincap.has_extended_priority_class ()
- && (prio == BELOW_NORMAL_PRIORITY_CLASS
- || prio == ABOVE_NORMAL_PRIORITY_CLASS))
- prio = NORMAL_PRIORITY_CLASS;
- return prio;
-}
-
-#undef CreatePipe
-bool
-create_pipe (PHANDLE hr,PHANDLE hw, LPSECURITY_ATTRIBUTES sa, DWORD n)
-{
- for (int i = 0; i < 10; i++)
- if (CreatePipe (hr, hw, sa, n))
- return true;
- else if (GetLastError () == ERROR_PIPE_BUSY && i < 9)
- Sleep (10);
- else
- break;
- return false;
-}
-
-/* backslashify: Convert all forward slashes in src path to back slashes
- in dst path. Add a trailing slash to dst when trailing_slash_p arg
- is set to 1. */
-
-void
-backslashify (const char *src, char *dst, bool trailing_slash_p)
-{
- const char *start = src;
-
- while (*src)
- {
- if (*src == '/')
- *dst++ = '\\';
- else
- *dst++ = *src;
- ++src;
- }
- if (trailing_slash_p
- && src > start
- && !isdirsep (src[-1]))
- *dst++ = '\\';
- *dst++ = 0;
-}
-
-/* slashify: Convert all back slashes in src path to forward slashes
- in dst path. Add a trailing slash to dst when trailing_slash_p arg
- is set to 1. */
-
-void
-slashify (const char *src, char *dst, bool trailing_slash_p)
-{
- const char *start = src;
-
- while (*src)
- {
- if (*src == '\\')
- *dst++ = '/';
- else
- *dst++ = *src;
- ++src;
- }
- if (trailing_slash_p
- && src > start
- && !isdirsep (src[-1]))
- *dst++ = '/';
- *dst++ = 0;
-}
diff --git a/winsup/cygwin/miscfuncs.h b/winsup/cygwin/miscfuncs.h
deleted file mode 100644
index d75c9af..0000000
--- a/winsup/cygwin/miscfuncs.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* miscfuncs.h: main Cygwin header file.
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008 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 _MISCFUNCS_H
-#define _MISCFUNCS_H
-int winprio_to_nice (DWORD) __attribute__ ((regparm (1)));
-DWORD nice_to_winprio (int &) __attribute__ ((regparm (1)));
-
-bool __stdcall create_pipe (PHANDLE, PHANDLE, LPSECURITY_ATTRIBUTES, DWORD)
- __attribute__ ((regparm (3)));
-#define CreatePipe create_pipe
-
-extern "C" int low_priority_sleep (DWORD) __attribute__ ((regparm (1)));
-#define SLEEP_0_STAY_LOW INFINITE
-
-void backslashify (const char *, char *, bool);
-void slashify (const char *, char *, bool);
-#define isslash(c) ((c) == '/')
-
-/* multibyte stuff */
-bool is_cp_multibyte (UINT cp);
-const unsigned char *next_char (UINT cp, const unsigned char *str,
- const unsigned char *end);
-
-/* Memory checking */
-int __stdcall check_invalid_virtual_addr (const void *s, unsigned sz) __attribute__ ((regparm(2)));
-
-ssize_t check_iovec (const struct iovec *, int, bool) __attribute__ ((regparm(3)));
-#define check_iovec_for_read(a, b) check_iovec ((a), (b), false)
-#define check_iovec_for_write(a, b) check_iovec ((a), (b), true)
-#endif /*_MISCFUNCS_H*/
diff --git a/winsup/cygwin/mktemp.cc b/winsup/cygwin/mktemp.cc
deleted file mode 100644
index 4b73753..0000000
--- a/winsup/cygwin/mktemp.cc
+++ /dev/null
@@ -1,180 +0,0 @@
-/* mktemp.cc: mktemp functions
-
-This file is adapted for Cygwin from FreeBSD.
-
-See the copyright at the bottom of this file. */
-
-#include "winsup.h"
-#include "cygerrno.h"
-#include <fcntl.h>
-#include <unistd.h>
-
-#define link_warning(symbol, msg) \
- asm (".stabs \"" msg "\",30,0,0,0\n\t" \
- ".stabs \"_" #symbol "\",1,0,0,0\n");
-
-
-static int _gettemp(char *, int *, int);
-static uint32_t arc4random ();
-
-static const char padchar[] =
-"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
-
-extern "C" int
-mkstemp(char *path)
-{
- int fd;
- return _gettemp(path, &fd, 0) ? fd : -1;
-}
-
-extern "C" char *
-mkdtemp(char *path)
-{
- return _gettemp(path, NULL, 1) ? path : NULL;
-}
-
-link_warning (mktemp, "the use of `mktemp' is dangerous, better use `mkstemp'")
-link_warning (_imp__mktemp, "the use of `mktemp' is dangerous, better use `mkstemp'")
-
-extern "C" char *
-mktemp(char *path)
-{
- return _gettemp(path, NULL, 0) ? path : (char *) NULL;
-}
-
-static int
-_gettemp(char *path, int *doopen, int domkdir)
-{
- char *start, *trv, *suffp;
- char *pad;
-
- if (doopen && domkdir)
- {
- set_errno (EINVAL);
- return 0;
- }
-
- suffp = trv = strchr (path, '\0');
- if (--trv < path)
- {
- set_errno (EINVAL);
- return 0;
- }
-
- /* Fill space with random characters */
- while (trv >= path && *trv == 'X')
- {
- uint32_t rand = arc4random () % (sizeof (padchar) - 1);
- *trv-- = padchar[rand];
- }
- start = trv + 1;
-
- /*
- * check the target directory.
- */
- struct __stat64 sbuf;
- if (doopen != NULL || domkdir)
- {
- for (; trv > path; trv--)
- {
- if (*trv == '/')
- {
- *trv = '\0';
- int rval = stat64 (path, &sbuf);
- *trv = '/';
- if (rval != 0)
- return 0;
- if (!S_ISDIR (sbuf.st_mode))
- {
- set_errno (ENOTDIR);
- return 0;
- }
- break;
- }
- }
- }
-
- for (;;)
- {
- if (doopen)
- {
- if ((*doopen = open (path, O_CREAT | O_EXCL | O_RDWR | O_BINARY,
- S_IRUSR | S_IWUSR)) >= 0)
- return 1;
- if (errno != EEXIST)
- return 0;
- }
- else if (domkdir)
- {
- if (mkdir (path, 0700) == 0)
- return 1;
- if (errno != EEXIST)
- return 0;
- }
- else if (lstat64 (path, &sbuf))
- return errno == ENOENT;
-
- /* If we have a collision, cycle through the space of filenames */
- for (trv = start;;)
- {
- if (*trv == '\0' || trv == suffp)
- return 0;
- pad = strchr (padchar, *trv);
- if (pad == NULL || *++pad == '\0')
- *trv++ = padchar[0];
- else
- {
- *trv++ = *pad;
- break;
- }
- }
- }
- /*NOTREACHED*/
-}
-
-static uint32_t
-arc4random ()
-{
- union
- {
- uint32_t rand;
- char buf[sizeof (int) / 8];
- } r;
- int fd = open ("/dev/urandom", O_RDONLY);
- read (fd, r.buf, 4);
- close (fd);
- return r.rand;
-}
-
-/*
-* Copyright (c) 1987, 1993
-* The Regents of the University of California. All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions
-* are met:
-* 1. Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* 2. Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* 3. All advertising materials mentioning features or use of this software
-* must display the following acknowledgement:
-* This product includes software developed by the University of
-* California, Berkeley and its contributors.
-* 4. Neither the name of the University nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-* SUCH DAMAGE.
-*/
diff --git a/winsup/cygwin/mkvers.sh b/winsup/cygwin/mkvers.sh
deleted file mode 100755
index 665f358..0000000
--- a/winsup/cygwin/mkvers.sh
+++ /dev/null
@@ -1,177 +0,0 @@
-#!/bin/sh
-# mkvers.sh - Make version information for cygwin DLL
-#
-# Copyright 1998, 1999, 2000, 2001, 2002, 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.
-
-exec 9> version.cc
-
-#
-# Arg 1 is the name of the version include file
-#
-incfile="$1"
-rcfile="$2"
-windres="$3"
-
-[ -r $incfile ] || {
- echo "**** Couldn't open file '$incfile'. Aborting."
-}
-
-#
-# Load the current date so we can work on individual fields
-#
-build_date=`date`
-set -$- $build_date
-#
-# Translate the month into a number
-#
-case "$2" in
- Jan) m=01 ;;
- Feb) m=02 ;;
- Mar) m=03 ;;
- Apr) m=04 ;;
- May) m=05 ;;
- Jun) m=06 ;;
- Jul) m=07 ;;
- Aug) m=08 ;;
- Sep) m=09 ;;
- Oct) m=10 ;;
- Nov) m=11 ;;
- Dec) m=12 ;;
-esac
-
-if [ "$3" -lt 10 ]; then
- d=0$3
-else
- d=$3
-fi
-hhmm="`echo $4 | sed 's/:..$//'`"
-#
-# Set date into YYYY-MM-DD HH:MM:SS format
-#
-builddate="${6-$5}-$m-$d $hhmm"
-
-set -$- ''
-
-#
-# Output the initial part of version.cc
-#
-cat <<EOF 1>&9
-#include "config.h"
-#include "cygwin_version.h"
-
-#define strval(x) #x
-#define str(x) strval(x)
-#define shared_data_version str(CYGWIN_VERSION_SHARED_DATA)
-
-const char *cygwin_version_strings =
- "BEGIN_CYGWIN_VERSION_INFO\n"
-EOF
-
-#
-# Split version file into dir and filename components
-#
-dir=`dirname $incfile`
-fn=`basename $incfile`
-
-#
-# Look in the include file CVS directory for a CVS Tag file. This file,
-# if it exists, will contain the name of the sticky tag associated with
-# the current build. Save that for output later.
-#
-cvs_tag="`sed -e '/dontuse/d' -e 's%^.\(.*\)%\1%' $dir/CVS/Tag 2>/dev/null`"
-
-wv_cvs_tag="$cvs_tag"
-[ -n "$cvs_tag" ] && cvs_tag=" CVS tag"'
-'"$cvs_tag"
-
-#
-# Look in the source directory containing the include/cygwin/version.h
-# and set dir accordingly.
-dir=`echo $dir | sed -e 's%/include/cygwin.*$%%' -e 's%include/cygwin.*$%.%'`
-
-# Look in $dir for a a ".snapshot-date" file. If one is found then this
-# information will be saved for output to the DLL.
-#
-if [ -r "$dir/.snapshot-date" ]; then
- read snapshotdate < "$dir/.snapshot-date"
- snapshot="snapshot date
-$snapshotdate"
-fi
-
-#
-# Scan the version.h file for strings that begin with CYGWIN_INFO or
-# CYGWIN_VERSION. Perform crude parsing on the lines to get the values
-# associated with these values and then pipe it into a while loop which
-# outputs these values in C palatable format for inclusion in the DLL
-# with a '%% ' identifier that will introduce "interesting" strings.
-# These strings are strictly for use by a user to scan the DLL for
-# interesting information.
-#
-(sed -n -e 's%#define CYGWIN_INFO_\([A-Z_]*\)[ ][ ]*\([a-zA-Z0-9"][^/]*\).*%_\1\
-\2%p' -e 's%#define CYGWIN_VERSION_\([A-Z_]*\)[ ][ ]*\([a-zA-Z0-9"][^/]*\).*%_\1\
-\2%p' $incfile | sed -e 's/["\\]//g' -e '/^_/y/ABCDEFGHIJKLMNOPQRSTUVWXYZ_/abcdefghijklmnopqrstuvwxyz /';
-echo ' build date'; echo $build_date; [ -n "$cvs_tag" ] && echo "$cvs_tag";\
-[ -n "$snapshot" ] && echo "$snapshot"
-) | while read var; do
- read val
-cat <<EOF
- "%%% Cygwin $var: $val\n"
-EOF
-done | tee /tmp/mkvers.$$ 1>&9
-
-trap "rm -f /tmp/mkvers.$$" 0 1 2 15
-
-if [ -n "$snapshotdate" ]; then
- usedate="`echo $snapshotdate | sed 's/-\\(..:..[^-]*\\).*$/ \1SNP/'`"
-else
- usedate="$builddate"
-fi
-
-#
-# Finally, output the shared ID and set up the cygwin_version structure
-# for use by Cygwin itself.
-#
-cat <<EOF 1>&9
-#ifdef DEBUGGING
- "%%% Cygwin shared id: " CYGWIN_VERSION_DLL_IDENTIFIER "S" shared_data_version "-$builddate\n"
-#else
- "%%% Cygwin shared id: " CYGWIN_VERSION_DLL_IDENTIFIER "S" shared_data_version "\n"
-#endif
- "END_CYGWIN_VERSION_INFO\n\0";
-cygwin_version_info cygwin_version =
-{
- CYGWIN_VERSION_API_MAJOR, CYGWIN_VERSION_API_MINOR,
- CYGWIN_VERSION_DLL_MAJOR, CYGWIN_VERSION_DLL_MINOR,
- CYGWIN_VERSION_SHARED_DATA,
- CYGWIN_VERSION_MOUNT_REGISTRY,
- "$usedate",
-#ifdef DEBUGGING
- CYGWIN_VERSION_DLL_IDENTIFIER "S" shared_data_version "-$builddate"
-#else
- CYGWIN_VERSION_DLL_IDENTIFIER "S" shared_data_version
-#endif
-};
-EOF
-
-#
-# Generate winver.o using cygwin/version.h information.
-# Turn the cygwin major number from some large number to something like 1.1.0.
-#
-eval `sed -n 's/^.*dll \(m[ai][jn]or\): \([0-9]*\)[^0-9]*$/\1=\2/p' /tmp/mkvers.$$`
-cygverhigh=`expr $major / 1000`
-cygverlow=`expr $major % 1000`
-cygwin_ver="$cygverhigh.$cygverlow.$minor"
-if [ -n "$cvs_tag" ]; then
- cvs_tag="`echo $wv_cvs_tag | sed -e 's/-branch.*//'`"
- cygwin_ver="$cygwin_ver-$cvs_tag"
-fi
-
-echo "Version $cygwin_ver"
-set -$- $builddate
-$windres --include-dir $dir/../w32api/include --include-dir $dir/include --define CYGWIN_BUILD_DATE="$1" --define CYGWIN_BUILD_TIME="$2" --define CYGWIN_VERSION='"'"$cygwin_ver"'"' $rcfile winver.o
diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc
deleted file mode 100644
index 53e5523..0000000
--- a/winsup/cygwin/mmap.cc
+++ /dev/null
@@ -1,1833 +0,0 @@
-/* mmap.cc
-
- Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "miscfuncs.h"
-#include <unistd.h>
-#include <stdlib.h>
-#include <sys/mman.h>
-#include <sys/param.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "ntdll.h"
-#include <sys/queue.h>
-
-/* __PROT_ATTACH indicates an anonymous mapping which is supposed to be
- attached to a file mapping for pages beyond the file's EOF. The idea
- is to support mappings longer than the file, without the file growing
- to mapping length (POSIX semantics). */
-#define __PROT_ATTACH 0x8000000
-/* Filler pages are the pages from the last file backed page to the next
- 64K boundary. These pages are created as anonymous pages, but with
- the same page protection as the file's pages, since POSIX applications
- expect to be able to access this part the same way as the file pages. */
-#define __PROT_FILLER 0x4000000
-
-/* Stick with 4K pages for bookkeeping, otherwise we just get confused
- when trying to do file mappings with trailing filler pages correctly. */
-#define PAGE_CNT(bytes) howmany((bytes),getsystempagesize())
-
-#define PGBITS (sizeof (DWORD)*8)
-#define MAPSIZE(pages) howmany ((pages), PGBITS)
-
-#define MAP_SET(n) (page_map[(n)/PGBITS] |= (1L << ((n) % PGBITS)))
-#define MAP_CLR(n) (page_map[(n)/PGBITS] &= ~(1L << ((n) % PGBITS)))
-#define MAP_ISSET(n) (page_map[(n)/PGBITS] & (1L << ((n) % PGBITS)))
-
-/* Used for anonymous mappings. */
-static fhandler_dev_zero fh_anonymous;
-
-/* Used for thread synchronization while accessing mmap bookkeeping lists. */
-static NO_COPY muto mmap_guard;
-#define LIST_LOCK() (mmap_guard.init ("mmap_guard")->acquire ())
-#define LIST_UNLOCK() (mmap_guard.release ())
-
-/* Small helpers to avoid having lots of flag bit tests in the code. */
-static inline bool
-priv (int flags)
-{
- return (flags & MAP_PRIVATE) == MAP_PRIVATE;
-}
-
-static inline bool
-fixed (int flags)
-{
- return (flags & MAP_FIXED) == MAP_FIXED;
-}
-
-static inline bool
-anonymous (int flags)
-{
- return (flags & MAP_ANONYMOUS) == MAP_ANONYMOUS;
-}
-
-static inline bool
-noreserve (int flags)
-{
- return (flags & MAP_NORESERVE) == MAP_NORESERVE;
-}
-
-static inline bool
-autogrow (int flags)
-{
- return (flags & MAP_AUTOGROW) == MAP_AUTOGROW;
-}
-
-static inline bool
-attached (int prot)
-{
- return (prot & __PROT_ATTACH) == __PROT_ATTACH;
-}
-
-static inline bool
-filler (int prot)
-{
- return (prot & __PROT_FILLER) == __PROT_FILLER;
-}
-
-static inline DWORD
-gen_create_protect (DWORD openflags, int flags)
-{
- DWORD ret = PAGE_READONLY;
-
- if (priv (flags))
- ret = PAGE_WRITECOPY;
- else if (openflags & GENERIC_WRITE)
- ret = PAGE_READWRITE;
-
- if (openflags & GENERIC_EXECUTE)
- ret <<= 4;
-
- return ret;
-}
-
-/* Generate Windows protection flags from mmap prot and flag values. */
-static inline DWORD
-gen_protect (int prot, int flags)
-{
- DWORD ret = PAGE_NOACCESS;
-
- /* Attached pages are only reserved, but the protection must be a
- valid value, so we just return PAGE_READWRITE. */
- if (attached (prot))
- return PAGE_EXECUTE_READWRITE;
-
- if (prot & PROT_WRITE)
- ret = (priv (flags) && (!anonymous (flags) || filler (prot)))
- ? PAGE_WRITECOPY : PAGE_READWRITE;
- else if (prot & PROT_READ)
- ret = PAGE_READONLY;
-
- if (prot & PROT_EXEC)
- ret <<= 4;
-
- return ret;
-}
-
-static HANDLE
-CreateMapping (HANDLE fhdl, size_t len, _off64_t off, DWORD openflags,
- int prot, int flags)
-{
- HANDLE h;
- NTSTATUS ret;
-
- LARGE_INTEGER sectionsize = { QuadPart: len };
- ULONG protect = gen_create_protect (openflags, flags);
- ULONG attributes = attached (prot) ? SEC_RESERVE : SEC_COMMIT;
-
- OBJECT_ATTRIBUTES oa;
- InitializeObjectAttributes (&oa, NULL, OBJ_INHERIT, NULL,
- sec_none.lpSecurityDescriptor);
-
- if (fhdl == INVALID_HANDLE_VALUE)
- {
- /* Standard anonymous mapping needs non-zero len. */
- ret = NtCreateSection (&h, SECTION_ALL_ACCESS, &oa,
- &sectionsize, protect, attributes, NULL);
- }
- else if (autogrow (flags))
- {
- /* Auto-grow only works if the protection is PAGE_READWRITE. So,
- first we call NtCreateSection with PAGE_READWRITE, then, if the
- requested protection is different, we close the mapping and
- reopen it again with the correct protection, if auto-grow worked. */
- sectionsize.QuadPart += off;
- ret = NtCreateSection (&h, SECTION_ALL_ACCESS, &oa,
- &sectionsize, PAGE_READWRITE, attributes, fhdl);
- if (NT_SUCCESS (ret) && protect != PAGE_READWRITE)
- {
- NtClose (h);
- ret = NtCreateSection (&h, SECTION_ALL_ACCESS, &oa,
- &sectionsize, protect, attributes, fhdl);
- }
- }
- else
- {
- /* Zero len creates mapping for whole file and allows
- AT_EXTENDABLE_FILE mapping, if we ever use it... */
- sectionsize.QuadPart = 0;
- ret = NtCreateSection (&h, SECTION_ALL_ACCESS, &oa,
- &sectionsize, protect, attributes, fhdl);
- }
- if (!NT_SUCCESS (ret))
- {
- h = NULL;
- SetLastError (RtlNtStatusToDosError (ret));
- }
- return h;
-}
-
-static void *
-MapView (HANDLE h, void *addr, size_t len, DWORD openflags,
- int prot, int flags, _off64_t off)
-{
- NTSTATUS ret;
- LARGE_INTEGER offset = { QuadPart:off };
- DWORD protect = gen_create_protect (openflags, flags);
- void *base = addr;
- ULONG commitsize = attached (prot) ? 0 : len;
- ULONG viewsize = len;
- ULONG alloc_type = (base && !wincap.is_wow64 () ? AT_ROUND_TO_PAGE : 0)
- | MEM_TOP_DOWN;
-
- /* Try mapping using the given address first, even if it's NULL.
- If it failed, and addr was not NULL and flags is not MAP_FIXED,
- try again with NULL address.
-
- Note: Retrying the mapping might be unnecessary, now that mmap64 checks
- for a valid memory area first. */
- ret = NtMapViewOfSection (h, GetCurrentProcess (), &base, 0, commitsize,
- &offset, &viewsize, ViewShare, alloc_type, protect);
- if (!NT_SUCCESS (ret) && addr && !fixed (flags))
- {
- base = NULL;
- ret = NtMapViewOfSection (h, GetCurrentProcess (), &base, 0, commitsize,
- &offset, &viewsize, ViewShare, 0, protect);
- }
- if (!NT_SUCCESS (ret))
- {
- base = NULL;
- SetLastError (RtlNtStatusToDosError (ret));
- }
- debug_printf ("%p (status %p) = NtMapViewOfSection (h:%x, addr:%x, len:%u,"
- " off:%X, protect:%x, type:%x)",
- base, ret, h, addr, len, off, protect, 0);
- return base;
-}
-
-/* Class structure used to keep a record of all current mmap areas
- in a process. Needed for bookkeeping all mmaps in a process and
- for duplicating all mmaps after fork() since mmaps are not propagated
- to child processes by Windows. All information must be duplicated
- by hand, see fixup_mmaps_after_fork().
-
- The class structure:
-
- One member of class map per process, global variable mmapped_areas.
- Contains a singly-linked list of type class mmap_list. Each mmap_list
- entry represents all mapping to a file, keyed by file descriptor and
- file name hash.
- Each list entry contains a singly-linked list of type class mmap_record.
- Each mmap_record represents exactly one mapping. For each mapping, there's
- an additional so called `page_map'. It's an array of bits, one bit
- per mapped memory page. The bit is set if the page is accessible,
- unset otherwise. */
-
-class mmap_record
-{
- public:
- LIST_ENTRY (mmap_record) mr_next;
-
- private:
- int fd;
- HANDLE mapping_hdl;
- DWORD openflags;
- int prot;
- int flags;
- _off64_t offset;
- DWORD len;
- caddr_t base_address;
- DWORD *page_map;
- device dev;
-
- public:
- mmap_record (int nfd, HANDLE h, DWORD of, int p, int f, _off64_t o, DWORD l,
- caddr_t b) :
- fd (nfd),
- mapping_hdl (h),
- openflags (of),
- prot (p),
- flags (f),
- offset (o),
- len (l),
- base_address (b),
- page_map (NULL)
- {
- dev.devn = 0;
- if (fd >= 0 && !cygheap->fdtab.not_open (fd))
- dev = cygheap->fdtab[fd]->dev ();
- else if (fd == -1)
- dev.parse (FH_ZERO);
- }
-
- int get_fd () const { return fd; }
- HANDLE get_handle () const { return mapping_hdl; }
- device& get_device () { return dev; }
- int get_prot () const { return prot; }
- int get_openflags () const { return openflags; }
- int get_flags () const { return flags; }
- bool priv () const { return ::priv (flags); }
- bool fixed () const { return ::fixed (flags); }
- bool anonymous () const { return ::anonymous (flags); }
- bool noreserve () const { return ::noreserve (flags); }
- bool autogrow () const { return ::autogrow (flags); }
- bool attached () const { return ::attached (prot); }
- bool filler () const { return ::filler (prot); }
- _off64_t get_offset () const { return offset; }
- DWORD get_len () const { return len; }
- caddr_t get_address () const { return base_address; }
-
- bool alloc_page_map ();
- void free_page_map () { if (page_map) cfree (page_map); }
-
- DWORD find_unused_pages (DWORD pages) const;
- bool match (caddr_t addr, DWORD len, caddr_t &m_addr, DWORD &m_len);
- _off64_t map_pages (_off64_t off, DWORD len);
- bool map_pages (caddr_t addr, DWORD len);
- bool unmap_pages (caddr_t addr, DWORD len);
- int access (caddr_t address);
-
- fhandler_base *alloc_fh ();
- void free_fh (fhandler_base *fh);
-
- DWORD gen_create_protect () const
- { return ::gen_create_protect (get_openflags (), get_flags ()); }
- DWORD gen_protect () const
- { return ::gen_protect (get_prot (), get_flags ()); }
- bool compatible_flags (int fl) const;
-};
-
-class mmap_list
-{
- public:
- LIST_ENTRY (mmap_list) ml_next;
- LIST_HEAD (, mmap_record) recs;
-
- private:
- int fd;
- __ino64_t hash;
-
- public:
- int get_fd () const { return fd; }
- __ino64_t get_hash () const { return hash; }
-
- bool anonymous () const { return fd == -1; }
- void set (int nfd, struct __stat64 *st);
- mmap_record *add_record (mmap_record r);
- bool del_record (mmap_record *rec);
- caddr_t try_map (void *addr, size_t len, int flags, _off64_t off);
-};
-
-class mmap_areas
-{
- public:
- LIST_HEAD (, mmap_list) lists;
-
- mmap_list *get_list_by_fd (int fd, struct __stat64 *st);
- mmap_list *add_list (int fd, struct __stat64 *st);
- void del_list (mmap_list *ml);
-};
-
-/* This is the global map structure pointer. */
-static mmap_areas mmapped_areas;
-
-bool
-mmap_record::compatible_flags (int fl) const
-{
-#define MAP_COMPATMASK (MAP_TYPE | MAP_NORESERVE)
- return (get_flags () & MAP_COMPATMASK) == (fl & MAP_COMPATMASK);
-}
-
-DWORD
-mmap_record::find_unused_pages (DWORD pages) const
-{
- DWORD mapped_pages = PAGE_CNT (get_len ());
- DWORD start;
-
- if (pages > mapped_pages)
- return (DWORD)-1;
- for (start = 0; start <= mapped_pages - pages; ++start)
- if (!MAP_ISSET (start))
- {
- DWORD cnt;
- for (cnt = 0; cnt < pages; ++cnt)
- if (MAP_ISSET (start + cnt))
- break;
- if (cnt >= pages)
- return start;
- }
- return (DWORD)-1;
-}
-
-bool
-mmap_record::match (caddr_t addr, DWORD len, caddr_t &m_addr, DWORD &m_len)
-{
- caddr_t low = (addr >= get_address ()) ? addr : get_address ();
- caddr_t high = get_address ();
- if (filler ())
- high += get_len ();
- else
- high += (PAGE_CNT (get_len ()) * getsystempagesize ());
- high = (addr + len < high) ? addr + len : high;
- if (low < high)
- {
- m_addr = low;
- m_len = high - low;
- return true;
- }
- return false;
-}
-
-bool
-mmap_record::alloc_page_map ()
-{
- /* Allocate one bit per page */
- if (!(page_map = (DWORD *) ccalloc (HEAP_MMAP,
- MAPSIZE (PAGE_CNT (get_len ())),
- sizeof (DWORD))))
- return false;
-
- DWORD start_protect = gen_create_protect ();
- DWORD real_protect = gen_protect ();
- if (real_protect != start_protect && !noreserve ()
- && !VirtualProtect (get_address (), get_len (),
- real_protect, &start_protect))
- system_printf ("Warning: VirtualProtect (addr: %p, len: 0x%x, "
- "new_prot: 0x%x, old_prot: 0x%x), %E",
- get_address (), get_len (),
- real_protect, start_protect);
- DWORD len = PAGE_CNT (get_len ());
- while (len-- > 0)
- MAP_SET (len);
- return true;
-}
-
-_off64_t
-mmap_record::map_pages (_off64_t off, DWORD len)
-{
- /* Used ONLY if this mapping matches into the chunk of another already
- performed mapping in a special case of MAP_ANON|MAP_PRIVATE.
-
- Otherwise it's job is now done by alloc_page_map(). */
- DWORD old_prot;
- debug_printf ("map_pages (fd=%d, off=%D, len=%u)", get_fd (), off, len);
- len = PAGE_CNT (len);
-
- if ((off = find_unused_pages (len)) == (DWORD)-1)
- return 0L;
- if (!noreserve ()
- && !VirtualProtect (get_address () + off * getsystempagesize (),
- len * getsystempagesize (), gen_protect (),
- &old_prot))
- {
- __seterrno ();
- return (_off64_t)-1;
- }
-
- while (len-- > 0)
- MAP_SET (off + len);
- return off * getsystempagesize ();
-}
-
-bool
-mmap_record::map_pages (caddr_t addr, DWORD len)
-{
- debug_printf ("map_pages (addr=%x, len=%u)", addr, len);
- DWORD old_prot;
- DWORD off = addr - get_address ();
- off /= getsystempagesize ();
- len = PAGE_CNT (len);
- /* First check if the area is unused right now. */
- for (DWORD l = 0; l < len; ++l)
- if (MAP_ISSET (off + l))
- {
- set_errno (EINVAL);
- return false;
- }
- if (!noreserve ()
- && !VirtualProtect (get_address () + off * getsystempagesize (),
- len * getsystempagesize (), gen_protect (),
- &old_prot))
- {
- __seterrno ();
- return false;
- }
- for (; len-- > 0; ++off)
- MAP_SET (off);
- return true;
-}
-
-bool
-mmap_record::unmap_pages (caddr_t addr, DWORD len)
-{
- DWORD old_prot;
- DWORD off = addr - get_address ();
- if (noreserve ()
- && !VirtualFree (get_address () + off, len, MEM_DECOMMIT))
- debug_printf ("VirtualFree in unmap_pages () failed, %E");
- else if (!VirtualProtect (get_address () + off, len, PAGE_NOACCESS,
- &old_prot))
- debug_printf ("VirtualProtect in unmap_pages () failed, %E");
-
- off /= getsystempagesize ();
- len = PAGE_CNT (len);
- for (; len-- > 0; ++off)
- MAP_CLR (off);
- /* Return TRUE if all pages are free'd which may result in unmapping
- the whole chunk. */
- for (len = MAPSIZE (PAGE_CNT (get_len ())); len > 0; )
- if (page_map[--len])
- return false;
- return true;
-}
-
-int
-mmap_record::access (caddr_t address)
-{
- if (address < get_address () || address >= get_address () + get_len ())
- return 0;
- DWORD off = (address - get_address ()) / getsystempagesize ();
- return MAP_ISSET (off);
-}
-
-fhandler_base *
-mmap_record::alloc_fh ()
-{
- if (anonymous ())
- {
- fh_anonymous.set_io_handle (INVALID_HANDLE_VALUE);
- fh_anonymous.set_access (GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE);
- return &fh_anonymous;
- }
-
- /* The file descriptor could have been closed or, even
- worse, could have been reused for another file before
- the call to fork(). This requires creating a fhandler
- of the correct type to be sure to call the method of the
- correct class. */
- fhandler_base *fh = build_fh_dev (get_device ());
- fh->set_access (get_openflags ());
- return fh;
-}
-
-void
-mmap_record::free_fh (fhandler_base *fh)
-{
- if (!anonymous ())
- cfree (fh);
-}
-
-mmap_record *
-mmap_list::add_record (mmap_record r)
-{
- mmap_record *rec = (mmap_record *) cmalloc (HEAP_MMAP, sizeof (mmap_record));
- if (!rec)
- return NULL;
- *rec = r;
- if (!rec->alloc_page_map ())
- {
- cfree (rec);
- return NULL;
- }
- LIST_INSERT_HEAD (&recs, rec, mr_next);
- return rec;
-}
-
-void
-mmap_list::set (int nfd, struct __stat64 *st)
-{
- fd = nfd;
- if (!anonymous ())
- {
- /* The fd isn't sufficient since it could already be the fd of another
- file. So we use the inode number as evaluated by fstat to identify
- the file. */
- hash = st ? st->st_ino : (__ino64_t) 0;
- }
- LIST_INIT (&recs);
-}
-
-bool
-mmap_list::del_record (mmap_record *rec)
-{
- rec->free_page_map ();
- LIST_REMOVE (rec, mr_next);
- cfree (rec);
- /* Return true if the list is empty which allows the caller to remove
- this list from the list of lists. */
- return !LIST_FIRST(&recs);
-}
-
-caddr_t
-mmap_list::try_map (void *addr, size_t len, int flags, _off64_t off)
-{
- mmap_record *rec;
-
- if (off == 0 && !fixed (flags))
- {
- /* If MAP_FIXED isn't given, check if this mapping matches into the
- chunk of another already performed mapping. */
- DWORD plen = PAGE_CNT (len);
- LIST_FOREACH (rec, &recs, mr_next)
- if (rec->find_unused_pages (plen) != (DWORD) -1)
- break;
- if (rec && rec->compatible_flags (flags))
- {
- if ((off = rec->map_pages (off, len)) == (_off64_t) -1)
- return (caddr_t) MAP_FAILED;
- return (caddr_t) rec->get_address () + off;
- }
- }
- else if (fixed (flags))
- {
- /* If MAP_FIXED is given, test if the requested area is in an
- unmapped part of an still active mapping. This can happen
- if a memory region is unmapped and remapped with MAP_FIXED. */
- caddr_t u_addr;
- DWORD u_len;
-
- LIST_FOREACH (rec, &recs, mr_next)
- if (rec->match ((caddr_t) addr, len, u_addr, u_len))
- break;
- if (rec)
- {
- if (u_addr > (caddr_t) addr || u_addr + len < (caddr_t) addr + len
- || !rec->compatible_flags (flags))
- {
- /* Partial match only, or access mode doesn't match. */
- /* FIXME: Handle partial mappings gracefully if adjacent
- memory is available. */
- set_errno (EINVAL);
- return (caddr_t) MAP_FAILED;
- }
- if (!rec->map_pages ((caddr_t) addr, len))
- return (caddr_t) MAP_FAILED;
- return (caddr_t) addr;
- }
- }
- return NULL;
-}
-
-mmap_list *
-mmap_areas::get_list_by_fd (int fd, struct __stat64 *st)
-{
- mmap_list *ml;
- LIST_FOREACH (ml, &lists, ml_next)
- {
- if (fd == -1 && ml->anonymous ())
- return ml;
- /* The fd isn't sufficient since it could already be the fd of another
- file. So we use the inode number as evaluated by fstat to identify
- the file. */
- if (fd != -1 && st && ml->get_hash () == st->st_ino)
- return ml;
- }
- return 0;
-}
-
-mmap_list *
-mmap_areas::add_list (int fd, struct __stat64 *st)
-{
- mmap_list *ml = (mmap_list *) cmalloc (HEAP_MMAP, sizeof (mmap_list));
- if (!ml)
- return NULL;
- ml->set (fd, st);
- LIST_INSERT_HEAD (&lists, ml, ml_next);
- return ml;
-}
-
-void
-mmap_areas::del_list (mmap_list *ml)
-{
- LIST_REMOVE (ml, ml_next);
- cfree (ml);
-}
-
-/* This function is called from exception_handler when a segmentation
- violation has occurred. It should also be called from all Cygwin
- functions that want to support passing noreserve mmap page addresses
- to Windows system calls. In that case, it should be called only after
- a system call indicates that the application buffer passed had an
- invalid virtual address to avoid any performance impact in non-noreserve
- cases.
-
- Check if the address range is all within noreserve mmap regions. If so,
- call VirtualAlloc to commit the pages and return MMAP_NORESERVE_COMMITED
- on success. If the page has __PROT_ATTACH (SUSv3 memory protection
- extension), or if VirutalAlloc fails, return MMAP_RAISE_SIGBUS.
- Otherwise, return MMAP_NONE if the address range is not covered by an
- attached or noreserve map.
-
- On MAP_NORESERVE_COMMITED, the exeception handler should return 0 to
- allow the application to retry the memory access, or the calling Cygwin
- function should retry the Windows system call. */
-mmap_region_status
-mmap_is_attached_or_noreserve (void *addr, size_t len)
-{
- mmap_region_status ret = MMAP_NONE;
-
- LIST_LOCK ();
- mmap_list *map_list = mmapped_areas.get_list_by_fd (-1, NULL);
-
- size_t pagesize = getpagesize ();
- caddr_t start_addr = (caddr_t) rounddown ((uintptr_t) addr, pagesize);
- len += ((caddr_t) addr - start_addr);
- len = roundup2 (len, pagesize);
-
- if (map_list == NULL)
- goto out;
-
- mmap_record *rec;
- caddr_t u_addr;
- DWORD u_len;
-
- LIST_FOREACH (rec, &map_list->recs, mr_next)
- {
- if (!rec->match (start_addr, len, u_addr, u_len))
- continue;
- if (rec->attached ())
- {
- ret = MMAP_RAISE_SIGBUS;
- break;
- }
- if (!rec->noreserve ())
- break;
-
- size_t commit_len = u_len - (start_addr - u_addr);
- if (commit_len > len)
- commit_len = len;
-
- if (!VirtualAlloc (start_addr, commit_len, MEM_COMMIT,
- rec->gen_protect ()))
- {
- ret = MMAP_RAISE_SIGBUS;
- break;
- }
-
- start_addr += commit_len;
- len -= commit_len;
- if (!len)
- {
- ret = MMAP_NORESERVE_COMMITED;
- break;
- }
- }
-out:
- LIST_UNLOCK ();
- return ret;
-}
-
-static caddr_t
-mmap_worker (mmap_list *map_list, fhandler_base *fh, caddr_t base, size_t len,
- int prot, int flags, int fd, _off64_t off, struct __stat64 *st)
-{
- HANDLE h = fh->mmap (&base, len, prot, flags, off);
- if (h == INVALID_HANDLE_VALUE)
- return NULL;
- if (!map_list
- && !(map_list = mmapped_areas.get_list_by_fd (fd, st))
- && !(map_list = mmapped_areas.add_list (fd, st)))
- {
- fh->munmap (h, base, len);
- return NULL;
- }
- mmap_record mmap_rec (fd, h, fh->get_access (), prot, flags, off, len, base);
- mmap_record *rec = map_list->add_record (mmap_rec);
- if (!rec)
- {
- fh->munmap (h, base, len);
- return NULL;
- }
- return base;
-}
-
-extern "C" void *
-mmap64 (void *addr, size_t len, int prot, int flags, int fd, _off64_t off)
-{
- syscall_printf ("addr %x, len %u, prot %x, flags %x, fd %d, off %D",
- addr, len, prot, flags, fd, off);
-
- caddr_t ret = (caddr_t) MAP_FAILED;
- fhandler_base *fh = NULL;
- fhandler_disk_file *fh_disk_file = NULL; /* Used for reopening a disk file
- when necessary. */
- mmap_list *map_list = NULL;
- size_t orig_len = 0;
- caddr_t base = NULL;
- struct __stat64 st;
-
- DWORD pagesize = getpagesize ();
-
- fh_anonymous.set_io_handle (INVALID_HANDLE_VALUE);
- fh_anonymous.set_access (GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE);
-
- /* EINVAL error conditions. */
- if (off % pagesize
- || ((prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC)))
- || ((flags & MAP_TYPE) != MAP_SHARED
- && (flags & MAP_TYPE) != MAP_PRIVATE)
- || (fixed (flags) && ((uintptr_t) addr % pagesize))
- || !len)
- {
- set_errno (EINVAL);
- goto out;
- }
-
- if (!anonymous (flags) && fd != -1)
- {
- /* Ensure that fd is open */
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- goto out;
-
- fh = cfd;
-
- /* mmap /dev/zero is like MAP_ANONYMOUS. */
- if (fh->get_device () == FH_ZERO)
- flags |= MAP_ANONYMOUS;
- }
-
- if (anonymous (flags) || fd == -1)
- {
- fh = &fh_anonymous;
- fd = -1;
- flags |= MAP_ANONYMOUS;
- /* Anonymous mappings are always forced to pagesize length with
- no offset. */
- len = roundup2 (len, pagesize);
- off = 0;
- }
- else if (fh->get_device () == FH_FS)
- {
- /* EACCES error conditions according to SUSv3. File must be opened
- for reading, regardless of the requested protection, and file must
- be opened for writing when PROT_WRITE together with MAP_SHARED
- is requested. */
- if (!(fh->get_access () & GENERIC_READ)
- || (!(fh->get_access () & GENERIC_WRITE)
- && (prot & PROT_WRITE) && !priv (flags)))
- {
- set_errno (EACCES);
- goto out;
- }
-
- /* You can't create mappings with PAGE_EXECUTE protection if
- the file isn't explicitely opened with EXECUTE access. */
- UNICODE_STRING fname;
- OBJECT_ATTRIBUTES attr;
- NTSTATUS status;
- HANDLE h;
- IO_STATUS_BLOCK io;
-
- RtlInitUnicodeString (&fname, L"");
- InitializeObjectAttributes (&attr, &fname, fh->pc.objcaseinsensitive (),
- fh->get_handle (), NULL);
- status = NtOpenFile (&h,
- fh->get_access () | GENERIC_EXECUTE | SYNCHRONIZE,
- &attr, &io, FILE_SHARE_VALID_FLAGS,
- FILE_SYNCHRONOUS_IO_NONALERT
- | FILE_OPEN_FOR_BACKUP_INTENT);
- if (NT_SUCCESS (status))
- {
- fh_disk_file = new (alloca (sizeof *fh_disk_file)) fhandler_disk_file;
- fh_disk_file->set_name (fh->pc);
- fh_disk_file->set_io_handle (h);
- fh_disk_file->set_access (fh->get_access () | GENERIC_EXECUTE);
- fh = fh_disk_file;
- }
- else if (prot & PROT_EXEC)
- {
- /* TODO: To be or not to be... I'm opting for refusing this
- mmap request rather than faking it, but that might break
- some non-portable code. */
- set_errno (EACCES);
- goto out;
- }
-
- if (fh->fstat_by_handle (&st))
- {
- __seterrno ();
- goto out;
- }
- _off64_t fsiz = st.st_size;
-
- /* Don't allow file mappings beginning beyond EOF since Windows can't
- handle that POSIX like, unless MAP_AUTOGROW flag is set, which
- mimics Windows behaviour. */
- if (off >= fsiz && !autogrow (flags))
- {
- /* Instead, it seems suitable to return an anonymous mapping of
- the given size instead. Mapped addresses beyond EOF aren't
- written back to the file anyway, so the handling is identical
- to other pages beyond EOF. */
- fh = &fh_anonymous;
- len = roundup2 (len, pagesize);
- prot = PROT_READ | PROT_WRITE | __PROT_ATTACH;
- flags &= MAP_FIXED;
- flags |= MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE;
- fd = -1;
- off = 0;
- goto go_ahead;
- }
- fsiz -= off;
- /* We're creating the pages beyond EOF as reserved, anonymous pages.
- Note that this isn't done in WOW64 environments since apparently
- WOW64 does not support the AT_ROUND_TO_PAGE flag which is required
- to get this right. Too bad. */
- if (!wincap.is_wow64 ()
- && ((len > fsiz && !autogrow (flags)) || len < pagesize))
- orig_len = len;
- if (len > fsiz)
- {
- if (autogrow (flags))
- {
- /* Allow mapping beyond EOF if MAP_AUTOGROW flag is set.
- Check if file has been opened for writing, otherwise
- MAP_AUTOGROW is invalid. */
- if (!(fh->get_access () & GENERIC_WRITE))
- {
- set_errno (EINVAL);
- goto out;
- }
- }
- else
- /* Otherwise, don't map beyond EOF, since Windows would change
- the file to the new length, in contrast to POSIX. */
- len = fsiz;
- }
-
- /* If the requested offset + len is <= file size, drop MAP_AUTOGROW.
- This simplifes fhandler::mmap's job. */
- if (autogrow (flags) && (off + len) <= fsiz)
- flags &= ~MAP_AUTOGROW;
- }
-
-go_ahead:
-
- /* MAP_NORESERVE is only supported on private anonymous mappings.
- Remove that bit from flags so that later code doesn't have to
- test all bits. */
- if (noreserve (flags) && (!anonymous (flags) || !priv (flags)))
- flags &= ~MAP_NORESERVE;
-
- LIST_LOCK ();
- map_list = mmapped_areas.get_list_by_fd (fd, &st);
-
- /* Test if an existing anonymous mapping can be recycled. */
- if (map_list && anonymous (flags))
- {
- caddr_t tried = map_list->try_map (addr, len, flags, off);
- /* try_map returns NULL if no map matched, otherwise it returns
- a valid address, or MAP_FAILED in case of a fatal error. */
- if (tried)
- {
- ret = tried;
- goto out_with_unlock;
- }
- }
-
- if (orig_len)
- {
- /* If the requested length is bigger than the file size, we try to
- allocate an area of the full size first. This area is immediately
- deallocated and the address we got is used as base address for the
- subsequent real mappings. This ensures that we have enough space
- for the whole thing. */
- orig_len = roundup2 (orig_len, pagesize);
- PVOID newaddr = VirtualAlloc (addr, orig_len, MEM_TOP_DOWN | MEM_RESERVE,
- PAGE_READWRITE);
- if (!newaddr)
- {
- /* If addr is not NULL, but MAP_FIXED isn't given, allow the OS
- to choose. */
- if (addr && !fixed (flags))
- newaddr = VirtualAlloc (NULL, orig_len, MEM_TOP_DOWN | MEM_RESERVE,
- PAGE_READWRITE);
- if (!newaddr)
- {
- __seterrno ();
- goto out_with_unlock;
- }
- }
- if (!VirtualFree (newaddr, 0, MEM_RELEASE))
- {
- __seterrno ();
- goto out_with_unlock;
- }
- addr = newaddr;
- }
-
- base = mmap_worker (map_list, fh, (caddr_t) addr, len, prot, flags, fd, off,
- &st);
- if (!base)
- goto out_with_unlock;
-
- if (orig_len)
- {
- /* If the requested length is bigger than the file size, the
- remainder is created as anonymous mapping. Actually two
- mappings are created, first the remainder from the file end to
- the next 64K boundary as accessible pages with the same
- protection as the file's pages, then as much pages as necessary
- to accomodate the requested length, but as reserved pages which
- raise a SIGBUS when trying to access them. AT_ROUND_TO_PAGE
- and page protection on shared pages is only supported by 32 bit NT,
- so don't even try on WOW64. This is accomplished by not setting
- orig_len on WOW64 above. */
-#if 0
- orig_len = roundup2 (orig_len, pagesize);
-#endif
- len = roundup2 (len, getsystempagesize ());
- if (orig_len - len)
- {
- orig_len -= len;
- size_t valid_page_len = orig_len % pagesize;
- size_t sigbus_page_len = orig_len - valid_page_len;
-
- caddr_t at_base = base + len;
- if (valid_page_len)
- {
- prot |= __PROT_FILLER;
- flags &= MAP_SHARED | MAP_PRIVATE;
- flags |= MAP_ANONYMOUS | MAP_FIXED;
- at_base = mmap_worker (NULL, &fh_anonymous, at_base,
- valid_page_len, prot, flags, -1, 0, NULL);
- if (!at_base)
- {
- fh->munmap (fh->get_handle (), base, len);
- set_errno (ENOMEM);
- goto out_with_unlock;
- }
- at_base += valid_page_len;
- }
- if (sigbus_page_len)
- {
- prot = PROT_READ | PROT_WRITE | __PROT_ATTACH;
- flags = MAP_ANONYMOUS | MAP_NORESERVE | MAP_FIXED;
- at_base = mmap_worker (NULL, &fh_anonymous, at_base,
- sigbus_page_len, prot, flags, -1, 0, NULL);
- if (!at_base)
- debug_printf ("Warning: Mapping beyond EOF failed, %E");
- }
- }
- }
-
- ret = base;
-
-out_with_unlock:
- LIST_UNLOCK ();
-
-out:
-
- if (fh_disk_file)
- NtClose (fh_disk_file->get_handle ());
-
- syscall_printf ("%p = mmap() ", ret);
- return ret;
-}
-
-extern "C" void *
-mmap (void *addr, size_t len, int prot, int flags, int fd, _off_t off)
-{
- return mmap64 (addr, len, prot, flags, fd, (_off64_t)off);
-}
-
-/* munmap () removes all mmapped pages between addr and addr+len. */
-
-extern "C" int
-munmap (void *addr, size_t len)
-{
- syscall_printf ("munmap (addr %x, len %u)", addr, len);
-
- /* Error conditions according to SUSv3 */
- if (!addr || !len || check_invalid_virtual_addr (addr, len))
- {
- set_errno (EINVAL);
- return -1;
- }
- size_t pagesize = getpagesize ();
- if (((uintptr_t) addr % pagesize) || !len)
- {
- set_errno (EINVAL);
- return -1;
- }
- len = roundup2 (len, pagesize);
-
- LIST_LOCK ();
-
- /* Iterate through the map, unmap pages between addr and addr+len
- in all maps. */
- mmap_list *map_list, *next_map_list;
- LIST_FOREACH_SAFE (map_list, &mmapped_areas.lists, ml_next, next_map_list)
- {
- mmap_record *rec, *next_rec;
- caddr_t u_addr;
- DWORD u_len;
-
- LIST_FOREACH_SAFE (rec, &map_list->recs, mr_next, next_rec)
- {
- if (!rec->match ((caddr_t) addr, len, u_addr, u_len))
- continue;
- if (rec->unmap_pages (u_addr, u_len))
- {
- /* The whole record has been unmapped, so we now actually
- unmap it from the system in full length... */
- fhandler_base *fh = rec->alloc_fh ();
- fh->munmap (rec->get_handle (),
- rec->get_address (),
- rec->get_len ());
- rec->free_fh (fh);
-
- /* ...and delete the record. */
- if (map_list->del_record (rec))
- {
- /* Yay, the last record has been removed from the list,
- we can remove the list now, too. */
- mmapped_areas.del_list (map_list);
- break;
- }
- }
- }
- }
-
- LIST_UNLOCK ();
- syscall_printf ("0 = munmap(): %x", addr);
- return 0;
-}
-
-/* Sync file with memory. Ignore flags for now. */
-
-extern "C" int
-msync (void *addr, size_t len, int flags)
-{
- int ret = -1;
- mmap_list *map_list;
-
- syscall_printf ("msync (addr: %p, len %u, flags %x)", addr, len, flags);
-
- LIST_LOCK ();
-
- if (((uintptr_t) addr % getpagesize ())
- || (flags & ~(MS_ASYNC | MS_SYNC | MS_INVALIDATE))
- || ((flags & (MS_ASYNC | MS_SYNC)) == (MS_ASYNC | MS_SYNC)))
- {
- set_errno (EINVAL);
- goto out;
- }
-#if 0 /* If I only knew why I did that... */
- len = roundup2 (len, getpagesize ());
-#endif
-
- /* Iterate through the map, looking for the mmapped area.
- Error if not found. */
- LIST_FOREACH (map_list, &mmapped_areas.lists, ml_next)
- {
- mmap_record *rec;
- LIST_FOREACH (rec, &map_list->recs, mr_next)
- {
- if (rec->access ((caddr_t) addr))
- {
- /* Check whole area given by len. */
- for (DWORD i = getpagesize (); i < len; i += getpagesize ())
- if (!rec->access ((caddr_t) addr + i))
- {
- set_errno (ENOMEM);
- goto out;
- }
- fhandler_base *fh = rec->alloc_fh ();
- ret = fh->msync (rec->get_handle (), (caddr_t) addr, len, flags);
- rec->free_fh (fh);
- goto out;
- }
- }
- }
-
- /* No matching mapping exists. */
- set_errno (ENOMEM);
-
-out:
- LIST_UNLOCK ();
- syscall_printf ("%d = msync()", ret);
- return ret;
-}
-
-/* Set memory protection */
-
-extern "C" int
-mprotect (void *addr, size_t len, int prot)
-{
- bool in_mapped = false;
- bool ret = false;
- DWORD old_prot;
- DWORD new_prot = 0;
-
- syscall_printf ("mprotect (addr: %p, len %u, prot %x)", addr, len, prot);
-
- /* See comment in mmap64 for a description. */
- size_t pagesize = getpagesize ();
- if ((uintptr_t) addr % pagesize)
- {
- set_errno (EINVAL);
- goto out;
- }
- len = roundup2 (len, pagesize);
-
- LIST_LOCK ();
-
- /* Iterate through the map, protect pages between addr and addr+len
- in all maps. */
- mmap_list *map_list;
- LIST_FOREACH (map_list, &mmapped_areas.lists, ml_next)
- {
- mmap_record *rec;
- caddr_t u_addr;
- DWORD u_len;
-
- LIST_FOREACH (rec, &map_list->recs, mr_next)
- {
- if (!rec->match ((caddr_t) addr, len, u_addr, u_len))
- continue;
- in_mapped = true;
- if (rec->attached ())
- continue;
- new_prot = gen_protect (prot, rec->get_flags ());
- if (rec->noreserve ())
- {
- if (new_prot == PAGE_NOACCESS)
- ret = VirtualFree (u_addr, u_len, MEM_DECOMMIT);
- else
- ret = !!VirtualAlloc (u_addr, u_len, MEM_COMMIT, new_prot);
- }
- else
- ret = VirtualProtect (u_addr, u_len, new_prot, &old_prot);
- if (!ret)
- {
- __seterrno ();
- break;
- }
- }
- }
-
- LIST_UNLOCK ();
-
- if (!in_mapped)
- {
- int flags = 0;
- MEMORY_BASIC_INFORMATION mbi;
-
- ret = VirtualQuery (addr, &mbi, sizeof mbi);
- if (ret)
- {
- /* If write protection is requested, check if the page was
- originally protected writecopy. In this case call VirtualProtect
- requesting PAGE_WRITECOPY, otherwise the VirtualProtect will fail
- on NT version >= 5.0 */
- if (prot & PROT_WRITE)
- {
- if (mbi.AllocationProtect == PAGE_WRITECOPY
- || mbi.AllocationProtect == PAGE_EXECUTE_WRITECOPY)
- flags = MAP_PRIVATE;
- }
- new_prot = gen_protect (prot, flags);
- if (new_prot != PAGE_NOACCESS && mbi.State == MEM_RESERVE)
- ret = VirtualAlloc (addr, len, MEM_COMMIT, new_prot);
- else
- ret = VirtualProtect (addr, len, new_prot, &old_prot);
- }
- if (!ret)
- __seterrno ();
- }
-
-out:
-
- syscall_printf ("%d = mprotect ()", ret ? 0 : -1);
- return ret ? 0 : -1;
-}
-
-extern "C" int
-mlock (const void *addr, size_t len)
-{
- int ret = -1;
-
- /* Instead of using VirtualLock, which does not guarantee that the pages
- aren't swapped out when the process is inactive, we're using
- ZwLockVirtualMemory with the LOCK_VM_IN_RAM flag to do what mlock on
- POSIX systems does. On NT, this requires SeLockMemoryPrivilege,
- which is given only to SYSTEM by default. */
-
- push_thread_privilege (SE_LOCK_MEMORY_PRIVILEGE, true);
-
- /* Align address and length values to page size. */
- size_t pagesize = getpagesize ();
- PVOID base = (PVOID) rounddown((uintptr_t) addr, pagesize);
- ULONG size = roundup2 (((uintptr_t) addr - (uintptr_t) base) + len, pagesize);
- NTSTATUS status = 0;
- do
- {
- status = NtLockVirtualMemory (hMainProc, &base, &size, LOCK_VM_IN_RAM);
- if (status == STATUS_WORKING_SET_QUOTA)
- {
- /* The working set is too small, try to increase it so that the
- requested locking region fits in. Unfortunately I don't know
- any function which would return the currently locked pages of
- a process (no go with NtQueryVirtualMemory).
-
- So, except for the border cases, what we do here is something
- really embarrassing. We raise the working set by 64K at a time
- and retry, until either we fail to raise the working set size
- further, or until NtLockVirtualMemory returns successfully (or
- with another error). */
- ULONG min, max;
- if (!GetProcessWorkingSetSize (hMainProc, &min, &max))
- {
- set_errno (ENOMEM);
- break;
- }
- if (min < size)
- min = size + pagesize;
- else if (size < pagesize)
- min += size;
- else
- min += pagesize;
- if (max < min)
- max = min;
- if (!SetProcessWorkingSetSize (hMainProc, min, max))
- {
- set_errno (ENOMEM);
- break;
- }
- }
- else if (!NT_SUCCESS (status))
- __seterrno_from_nt_status (status);
- else
- ret = 0;
- }
- while (status == STATUS_WORKING_SET_QUOTA);
-
- pop_thread_privilege ();
-
- return ret;
-}
-
-extern "C" int
-munlock (const void *addr, size_t len)
-{
- int ret = -1;
-
- push_thread_privilege (SE_LOCK_MEMORY_PRIVILEGE, true);
-
- /* Align address and length values to page size. */
- size_t pagesize = getpagesize ();
- PVOID base = (PVOID) rounddown((uintptr_t) addr, pagesize);
- ULONG size = roundup2 (((uintptr_t) addr - (uintptr_t) base) + len, pagesize);
- NTSTATUS status = NtUnlockVirtualMemory (hMainProc, &base, &size,
- LOCK_VM_IN_RAM);
- if (!NT_SUCCESS (status))
- __seterrno_from_nt_status (status);
- else
- ret = 0;
-
- pop_thread_privilege ();
-
- return ret;
-}
-
-extern "C" int
-posix_madvise (void *addr, size_t len, int advice)
-{
- /* Check parameters. */
- if (advice < POSIX_MADV_NORMAL || advice > POSIX_MADV_DONTNEED
- || !len)
- return EINVAL;
-
- /* Check requested memory area. */
- MEMORY_BASIC_INFORMATION m;
- char *p = (char *) addr;
- char *endp = p + len;
- while (p < endp)
- {
- if (!VirtualQuery (p, &m, sizeof m) || m.State == MEM_FREE)
- return ENOMEM;
- p = (char *) m.BaseAddress + m.RegionSize;
- }
-
- /* Eventually do nothing. */
- return 0;
-}
-
-/*
- * Base implementation:
- *
- * `mmap' returns ENODEV as documented in SUSv2.
- * In contrast to the global function implementation, the member function
- * `mmap' has to return the mapped base address in `addr' and the handle to
- * the mapping object as return value. In case of failure, the fhandler
- * mmap has to close that handle by itself and return INVALID_HANDLE_VALUE.
- *
- * `munmap' and `msync' get the handle to the mapping object as first parameter
- * additionally.
-*/
-HANDLE
-fhandler_base::mmap (caddr_t *addr, size_t len, int prot,
- int flags, _off64_t off)
-{
- set_errno (ENODEV);
- return INVALID_HANDLE_VALUE;
-}
-
-int
-fhandler_base::munmap (HANDLE h, caddr_t addr, size_t len)
-{
- set_errno (ENODEV);
- return -1;
-}
-
-int
-fhandler_base::msync (HANDLE h, caddr_t addr, size_t len, int flags)
-{
- set_errno (ENODEV);
- return -1;
-}
-
-bool
-fhandler_base::fixup_mmap_after_fork (HANDLE h, int prot, int flags,
- _off64_t offset, DWORD size,
- void *address)
-{
- set_errno (ENODEV);
- return -1;
-}
-
-/* Implementation for anonymous maps. Using fhandler_dev_zero looks
- quite the natural way. */
-HANDLE
-fhandler_dev_zero::mmap (caddr_t *addr, size_t len, int prot,
- int flags, _off64_t off)
-{
- HANDLE h;
- void *base;
-
- if (priv (flags) && !filler (prot))
- {
- /* Private anonymous maps are now implemented using VirtualAlloc.
- This has two advantages:
-
- - VirtualAlloc has a smaller footprint than a copy-on-write
- anonymous map.
-
- - It supports decommitting using VirtualFree, in contrast to
- section maps. This allows minimum footprint private maps,
- when using the (non-POSIX, yay-Linux) MAP_NORESERVE flag.
- */
- DWORD protect = gen_protect (prot, flags);
- DWORD alloc_type = MEM_TOP_DOWN | MEM_RESERVE
- | (noreserve (flags) ? 0 : MEM_COMMIT);
- base = VirtualAlloc (*addr, len, alloc_type, protect);
- if (!base && addr && !fixed (flags))
- base = VirtualAlloc (NULL, len, alloc_type, protect);
- if (!base || (fixed (flags) && base != *addr))
- {
- if (!base)
- __seterrno ();
- else
- {
- VirtualFree (base, 0, MEM_RELEASE);
- set_errno (EINVAL);
- debug_printf ("VirtualAlloc: address shift with MAP_FIXED given");
- }
- return INVALID_HANDLE_VALUE;
- }
- h = (HANDLE) 1; /* Fake handle to indicate success. */
- }
- else
- {
- h = CreateMapping (get_handle (), len, off, get_access (), prot, flags);
- if (!h)
- {
- __seterrno ();
- debug_printf ("CreateMapping failed with %E");
- return INVALID_HANDLE_VALUE;
- }
-
- base = MapView (h, *addr, len, get_access(), prot, flags, off);
- if (!base || (fixed (flags) && base != *addr))
- {
- if (!base)
- __seterrno ();
- else
- {
- UnmapViewOfFile (base);
- set_errno (EINVAL);
- debug_printf ("MapView: address shift with MAP_FIXED given");
- }
- NtClose (h);
- return INVALID_HANDLE_VALUE;
- }
- }
- *addr = (caddr_t) base;
- return h;
-}
-
-int
-fhandler_dev_zero::munmap (HANDLE h, caddr_t addr, size_t len)
-{
- if (h == (HANDLE) 1) /* See fhandler_dev_zero::mmap. */
- VirtualFree (addr, 0, MEM_RELEASE);
- else
- {
- UnmapViewOfFile (addr);
- NtClose (h);
- }
- return 0;
-}
-
-int
-fhandler_dev_zero::msync (HANDLE h, caddr_t addr, size_t len, int flags)
-{
- return 0;
-}
-
-bool
-fhandler_dev_zero::fixup_mmap_after_fork (HANDLE h, int prot, int flags,
- _off64_t offset, DWORD size,
- void *address)
-{
- /* Re-create the map */
- void *base;
- if (priv (flags) && !filler (prot))
- {
- DWORD alloc_type = MEM_RESERVE | (noreserve (flags) ? 0 : MEM_COMMIT);
- /* Always allocate R/W so that ReadProcessMemory doesn't fail
- due to a non-writable target address. The protection is
- set to the correct one anyway in the fixup loop. */
- base = VirtualAlloc (address, size, alloc_type, PAGE_READWRITE);
- }
- else
- base = MapView (h, address, size, get_access (), prot, flags, offset);
- if (base != address)
- {
- MEMORY_BASIC_INFORMATION m;
- VirtualQuery (address, &m, sizeof (m));
- system_printf ("requested %p != %p mem alloc base %p, state %p, "
- "size %d, %E", address, base, m.AllocationBase, m.State,
- m.RegionSize);
- }
- return base == address;
-}
-
-/* Implementation for disk files and anonymous mappings. */
-HANDLE
-fhandler_disk_file::mmap (caddr_t *addr, size_t len, int prot,
- int flags, _off64_t off)
-{
- HANDLE h = CreateMapping (get_handle (), len, off, get_access (),
- prot, flags);
- if (!h)
- {
- __seterrno ();
- debug_printf ("CreateMapping failed with %E");
- return INVALID_HANDLE_VALUE;
- }
-
- void *base = MapView (h, *addr, len, get_access (), prot, flags, off);
- if (!base || (fixed (flags) && base != *addr))
- {
- if (!base)
- __seterrno ();
- else
- {
- UnmapViewOfFile (base);
- set_errno (EINVAL);
- debug_printf ("MapView: address shift with MAP_FIXED given");
- }
- NtClose (h);
- return INVALID_HANDLE_VALUE;
- }
-
- *addr = (caddr_t) base;
- return h;
-}
-
-int
-fhandler_disk_file::munmap (HANDLE h, caddr_t addr, size_t len)
-{
- UnmapViewOfFile (addr);
- NtClose (h);
- return 0;
-}
-
-int
-fhandler_disk_file::msync (HANDLE h, caddr_t addr, size_t len, int flags)
-{
- if (FlushViewOfFile (addr, len) == 0)
- {
- __seterrno ();
- return -1;
- }
- return 0;
-}
-
-bool
-fhandler_disk_file::fixup_mmap_after_fork (HANDLE h, int prot, int flags,
- _off64_t offset, DWORD size,
- void *address)
-{
- /* Re-create the map */
- void *base = MapView (h, address, size, get_access (), prot, flags, offset);
- if (base != address)
- {
- MEMORY_BASIC_INFORMATION m;
- VirtualQuery (address, &m, sizeof (m));
- system_printf ("requested %p != %p mem alloc base %p, state %p, "
- "size %d, %E", address, base, m.AllocationBase, m.State,
- m.RegionSize);
- }
- return base == address;
-}
-
-HANDLE
-fhandler_dev_mem::mmap (caddr_t *addr, size_t len, int prot,
- int flags, _off64_t off)
-{
- if (off >= mem_size
- || (DWORD) len >= mem_size
- || off + len >= mem_size)
- {
- set_errno (EINVAL);
- debug_printf ("-1 = mmap(): illegal parameter, set EINVAL");
- return INVALID_HANDLE_VALUE;
- }
-
- UNICODE_STRING memstr;
- RtlInitUnicodeString (&memstr, L"\\device\\physicalmemory");
-
- OBJECT_ATTRIBUTES attr;
- InitializeObjectAttributes (&attr, &memstr,
- OBJ_CASE_INSENSITIVE | OBJ_INHERIT,
- NULL, NULL);
-
- /* Section access is bit-wise ored, while on the Win32 level access
- is only one of the values. It's not quite clear if the section
- access has to be defined this way, or if SECTION_ALL_ACCESS would
- be sufficient but this worked fine so far, so why change? */
- ACCESS_MASK section_access;
- if (prot & PROT_WRITE)
- section_access = SECTION_MAP_READ | SECTION_MAP_WRITE;
- else
- section_access = SECTION_MAP_READ;
-
- HANDLE h;
- NTSTATUS ret = NtOpenSection (&h, section_access, &attr);
- if (!NT_SUCCESS (ret))
- {
- __seterrno_from_nt_status (ret);
- debug_printf ("-1 = mmap(): NtOpenSection failed with %E");
- return INVALID_HANDLE_VALUE;
- }
-
- void *base = MapView (h, *addr, len, get_access (), prot,
- flags | MAP_ANONYMOUS, off);
- if (!base || (fixed (flags) && base != *addr))
- {
- if (!base)
- __seterrno ();
- else
- {
- NtUnmapViewOfSection (GetCurrentProcess (), base);
- set_errno (EINVAL);
- debug_printf ("MapView: address shift with MAP_FIXED given");
- }
- NtClose (h);
- return INVALID_HANDLE_VALUE;
- }
-
- *addr = (caddr_t) base;
- return h;
-}
-
-int
-fhandler_dev_mem::munmap (HANDLE h, caddr_t addr, size_t len)
-{
- NTSTATUS ret;
- if (!NT_SUCCESS (ret = NtUnmapViewOfSection (INVALID_HANDLE_VALUE, addr)))
- {
- __seterrno_from_nt_status (ret);
- return -1;
- }
- NtClose (h);
- return 0;
-}
-
-int
-fhandler_dev_mem::msync (HANDLE h, caddr_t addr, size_t len, int flags)
-{
- return 0;
-}
-
-bool
-fhandler_dev_mem::fixup_mmap_after_fork (HANDLE h, int prot, int flags,
- _off64_t offset, DWORD size,
- void *address)
-{
- void *base = MapView (h, address, size, get_access (), prot,
- flags | MAP_ANONYMOUS, offset);
- if (base != address)
- {
- MEMORY_BASIC_INFORMATION m;
- VirtualQuery (address, &m, sizeof (m));
- system_printf ("requested %p != %p mem alloc base %p, state %p, "
- "size %d, %E", address, base, m.AllocationBase, m.State,
- m.RegionSize);
- }
- return base == address;
-}
-
-/* Call to re-create all the file mappings in a forked child. Called from
- the child in initialization. At this point we are passed a valid
- mmapped_areas map, and all the HANDLE's are valid for the child, but
- none of the mapped areas are in our address space. We need to iterate
- through the map, doing the MapViewOfFile calls. */
-
-int __stdcall
-fixup_mmaps_after_fork (HANDLE parent)
-{
- /* Iterate through the map */
- mmap_list *map_list;
- LIST_FOREACH (map_list, &mmapped_areas.lists, ml_next)
- {
- mmap_record *rec;
- LIST_FOREACH (rec, &map_list->recs, mr_next)
- {
- debug_printf ("fd %d, h 0x%x, address %p, len 0x%x, prot: 0x%x, "
- "flags: 0x%x, offset %X",
- rec->get_fd (), rec->get_handle (), rec->get_address (),
- rec->get_len (), rec->get_prot (), rec->get_flags (),
- rec->get_offset ());
-
- fhandler_base *fh = rec->alloc_fh ();
- bool ret = fh->fixup_mmap_after_fork (rec->get_handle (),
- rec->get_prot (),
- rec->get_flags () | MAP_FIXED,
- rec->get_offset (),
- rec->get_len (),
- rec->get_address ());
- rec->free_fh (fh);
-
- if (!ret)
- {
- if (rec->attached ())
- {
- system_printf ("Warning: Fixup mapping beyond EOF failed");
- continue;
- }
- return -1;
- }
-
- MEMORY_BASIC_INFORMATION mbi;
- DWORD old_prot;
-
- for (char *address = rec->get_address ();
- address < rec->get_address () + rec->get_len ();
- address += mbi.RegionSize)
- {
- if (!VirtualQueryEx (parent, address, &mbi, sizeof mbi))
- {
- system_printf ("VirtualQueryEx failed for MAP_PRIVATE "
- "address %p, %E", address);
- return -1;
- }
- /* Just skip reserved pages. */
- if (mbi.State == MEM_RESERVE)
- continue;
- /* Copy-on-write pages must be copied to the child to circumvent
- a strange notion how copy-on-write is supposed to work. */
- if (rec->priv ())
- {
- if (rec->noreserve ()
- && !VirtualAlloc (address, mbi.RegionSize,
- MEM_COMMIT, PAGE_READWRITE))
- {
- system_printf ("VirtualAlloc failed for MAP_PRIVATE "
- "address %p, %E", address);
- return -1;
- }
- if (mbi.Protect == PAGE_NOACCESS
- && !VirtualProtectEx (parent, address, mbi.RegionSize,
- PAGE_READONLY, &old_prot))
- {
- system_printf ("VirtualProtectEx failed for MAP_PRIVATE "
- "address %p, %E", address);
- return -1;
- }
- else if ((mbi.AllocationProtect == PAGE_WRITECOPY
- || mbi.AllocationProtect == PAGE_EXECUTE_WRITECOPY)
- && (mbi.Protect == PAGE_READWRITE
- || mbi.Protect == PAGE_EXECUTE_READWRITE))
- /* A WRITECOPY page which has been written to is set to
- READWRITE, but that's an incompatible protection to
- set the page to. Convert the protection to WRITECOPY
- so that the below VirtualProtect doesn't fail. */
- mbi.Protect <<= 1;
-
- if (!ReadProcessMemory (parent, address, address,
- mbi.RegionSize, NULL))
- {
- system_printf ("ReadProcessMemory failed for MAP_PRIVATE "
- "address %p, %E", address);
- return -1;
- }
- if (mbi.Protect == PAGE_NOACCESS
- && !VirtualProtectEx (parent, address, mbi.RegionSize,
- PAGE_NOACCESS, &old_prot))
- {
- system_printf ("WARNING: VirtualProtectEx to return to "
- "PAGE_NOACCESS state in parent failed for "
- "MAP_PRIVATE address %p, %E", address);
- return -1;
- }
- }
- /* Set child page protection to parent protection */
- if (!VirtualProtect (address, mbi.RegionSize,
- mbi.Protect, &old_prot))
- {
- MEMORY_BASIC_INFORMATION m;
- VirtualQuery (address, &m, sizeof m);
- system_printf ("VirtualProtect failed for "
- "address %p, "
- "parentstate: 0x%x, "
- "state: 0x%x, "
- "parentprot: 0x%x, "
- "prot: 0x%x, %E",
- address, mbi.State, m.State,
- mbi.Protect, m.Protect);
- return -1;
- }
- }
- }
- }
-
- debug_printf ("succeeded");
- return 0;
-}
diff --git a/winsup/cygwin/mmap_helper.h b/winsup/cygwin/mmap_helper.h
deleted file mode 100644
index 23a03ff..0000000
--- a/winsup/cygwin/mmap_helper.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* mmap_helper.h
-
- Copyright 2006 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _MMAP_HELPER_H
-#define _MMAP_HELPER_H
-#define _MMIOWRAP(__ptr, __len, __func) \
-({ \
- BOOL __res; \
- for (int __i = 0; __i < 2; __i++) \
- { \
- __res = __func; \
- if (__res || __i > 0) \
- break; \
- DWORD __errcode = GetLastError (); \
- if (__errcode != ERROR_NOACCESS) \
- break; \
- switch (mmap_is_attached_or_noreserve (__ptr, __len)) \
- { \
- case MMAP_NORESERVE_COMMITED: \
- continue; \
- case MMAP_RAISE_SIGBUS: \
- raise(SIGBUS); \
- default: \
- break; \
- } \
- break; \
- } \
- __res; \
-})
-
-#define _MMSOCKWRAP(__ptr, __count, __func) \
-({ \
- int __res; \
- for (int __i = 0; __i < 2; __i++) \
- { \
- __res = __func; \
- if (!__res || __i > 0) \
- break; \
- DWORD __errcode = WSAGetLastError (); \
- if (__errcode != WSAEFAULT) \
- break; \
- for (unsigned __j = 0; __j < __count; __j++) \
- switch (mmap_is_attached_or_noreserve (__ptr[__j].buf, __ptr[__j].len)) \
- { \
- case MMAP_NORESERVE_COMMITED: \
- goto keeptrying; \
- case MMAP_RAISE_SIGBUS: \
- raise(SIGBUS); \
- default: \
- break; \
- } \
- break; \
- keeptrying: \
- continue; \
- } \
- __res; \
-})
-
-extern inline BOOL
-mmReadFile (HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
- LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped)
-{
- return _MMIOWRAP (lpBuffer, nNumberOfBytesToRead,
- (ReadFile (hFile, lpBuffer, nNumberOfBytesToRead,
- lpNumberOfBytesRead, lpOverlapped)));
-}
-
-#ifdef _WINSOCK_H
-extern inline int
-mmWSARecvFrom (SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
- LPDWORD lpNumberOfBytesRecvd, LPDWORD lpFlags,
- struct sockaddr* lpFrom,
- LPINT lpFromlen, LPWSAOVERLAPPED lpOverlapped,
- LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
-{
- return _MMSOCKWRAP (lpBuffers, dwBufferCount,
- (mmWSARecvFrom(s, lpBuffers, dwBufferCount,
- lpNumberOfBytesRecvd, lpFlags, lpFrom,
- lpFromlen, lpOverlapped,
- lpCompletionRoutine)));
-}
-#endif /*_WINSOCK_H*/
-
-#endif /*_MMAP_HELPER_H*/
diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc
deleted file mode 100644
index 2768ce5..0000000
--- a/winsup/cygwin/mount.cc
+++ /dev/null
@@ -1,1359 +0,0 @@
-/* path.cc: path support.
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "miscfuncs.h"
-#include <mntent.h>
-#include <ctype.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <winnetwk.h>
-#include <shlobj.h>
-#include <cygwin/version.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "shared_info.h"
-#include "cygtls.h"
-#include "tls_pbuf.h"
-#include <ntdll.h>
-#include <wchar.h>
-
-/* Determine if path prefix matches current cygdrive */
-#define iscygdrive(path) \
- (path_prefix_p (mount_table->cygdrive, (path), mount_table->cygdrive_len, false))
-
-#define iscygdrive_device(path) \
- (isalpha (path[mount_table->cygdrive_len]) && \
- (path[mount_table->cygdrive_len + 1] == '/' || \
- !path[mount_table->cygdrive_len + 1]))
-
-#define isproc(path) \
- (path_prefix_p (proc, (path), proc_len, false))
-
-/* is_unc_share: Return non-zero if PATH begins with //server/share
- or with one of the native prefixes //./ or //?/
- This function is only used to test for valid input strings.
- The later normalization drops the native prefixes. */
-
-static inline bool __stdcall
-is_native_path (const char *path)
-{
- return isdirsep (path[0])
- && (isdirsep (path[1]) || path[1] == '?')
- && (path[2] == '?' || path[2] == '.')
- && isdirsep (path[3])
- && isalpha (path[4]);
-}
-
-static inline bool __stdcall
-is_unc_share (const char *path)
-{
- const char *p;
- return (isdirsep (path[0])
- && isdirsep (path[1])
- && isalnum (path[2])
- && ((p = strpbrk (path + 3, "\\/")) != NULL)
- && isalnum (p[1]));
-}
-
-/* Return true if src_path is a valid, internally supported device name.
- In that case, win32_path gets the corresponding NT device name and
- dev is appropriately filled with device information. */
-
-static bool
-win32_device_name (const char *src_path, char *win32_path, device& dev)
-{
- dev.parse (src_path);
- if (dev == FH_FS || dev == FH_DEV)
- return false;
- strcpy (win32_path, dev.native);
- return true;
-}
-
-inline void
-mount_info::create_root_entry (const PWCHAR root)
-{
- /* Create a default root dir from the path the Cygwin DLL is in. */
- char native_root[PATH_MAX];
- sys_wcstombs (native_root, PATH_MAX, root);
- mount_table->add_item (native_root, "/", MOUNT_SYSTEM | MOUNT_BINARY);
- /* Create a default cygdrive entry. Note that this is a user entry.
- This allows to override it with mount, unless the sysadmin created
- a cygdrive entry in /etc/fstab. */
- cygdrive_flags = MOUNT_BINARY | MOUNT_NOPOSIX | MOUNT_CYGDRIVE;
- strcpy (cygdrive, CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX "/");
- cygdrive_len = strlen (cygdrive);
-}
-
-/* init: Initialize the mount table. */
-
-void
-mount_info::init ()
-{
- nmounts = 0;
- PWCHAR pathend;
- WCHAR path[PATH_MAX];
-
- pathend = wcpcpy (path, cygwin_shared->installation_root);
- create_root_entry (path);
- pathend = wcpcpy (pathend, L"\\etc\\fstab");
- if (from_fstab (false, path, pathend) /* The single | is correct! */
- | from_fstab (true, path, pathend))
- return;
-
- /* FIXME: Remove warning message before releasing 1.7.0. */
- small_printf ("Huh? No /etc/fstab file in %W? Using default root and cygdrive prefix...\n", path);
-}
-
-static void
-set_flags (unsigned *flags, unsigned val)
-{
- *flags = val;
- if (!(*flags & PATH_BINARY))
- {
- *flags |= PATH_TEXT;
- debug_printf ("flags: text (%p)", *flags & (PATH_TEXT | PATH_BINARY));
- }
- else
- {
- *flags |= PATH_BINARY;
- debug_printf ("flags: binary (%p)", *flags & (PATH_TEXT | PATH_BINARY));
- }
-}
-
-int
-mount_item::build_win32 (char *dst, const char *src, unsigned *outflags, unsigned chroot_pathlen)
-{
- int n, err = 0;
- const char *real_native_path;
- int real_posix_pathlen;
- set_flags (outflags, (unsigned) flags);
- if (!cygheap->root.exists () || posix_pathlen != 1 || posix_path[0] != '/')
- {
- n = native_pathlen;
- real_native_path = native_path;
- real_posix_pathlen = chroot_pathlen ?: posix_pathlen;
- }
- else
- {
- n = cygheap->root.native_length ();
- real_native_path = cygheap->root.native_path ();
- real_posix_pathlen = posix_pathlen;
- }
- memcpy (dst, real_native_path, n + 1);
- const char *p = src + real_posix_pathlen;
- if (*p == '/')
- /* nothing */;
- else if ((isdrive (dst) && !dst[2]) || *p)
- dst[n++] = '\\';
- if ((n + strlen (p)) >= NT_MAX_PATH)
- err = ENAMETOOLONG;
- else
- backslashify (p, dst + n, 0);
- return err;
-}
-
-/* conv_to_win32_path: Ensure src_path is a pure Win32 path and store
- the result in win32_path.
-
- If win32_path != NULL, the relative path, if possible to keep, is
- stored in win32_path. If the relative path isn't possible to keep,
- the full path is stored.
-
- If full_win32_path != NULL, the full path is stored there.
-
- The result is zero for success, or an errno value.
-
- {,full_}win32_path must have sufficient space (i.e. NT_MAX_PATH bytes). */
-
-int
-mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev,
- unsigned *flags)
-{
- bool chroot_ok = !cygheap->root.exists ();
- while (sys_mount_table_counter < cygwin_shared->sys_mount_table_counter)
- {
- int current = cygwin_shared->sys_mount_table_counter;
- init ();
- sys_mount_table_counter = current;
- }
- MALLOC_CHECK;
-
- dev.devn = FH_FS;
-
- *flags = 0;
- debug_printf ("conv_to_win32_path (%s)", src_path);
-
- int i, rc;
- mount_item *mi = NULL; /* initialized to avoid compiler warning */
-
- /* The path is already normalized, without ../../ stuff, we need to have this
- so that we can move from one mounted directory to another with relative
- stuff.
-
- eg mounting c:/foo /foo
- d:/bar /bar
-
- cd /bar
- ls ../foo
-
- should look in c:/foo, not d:/foo.
-
- converting normalizex UNIX path to a DOS-style path, looking up the
- appropriate drive in the mount table. */
-
- /* See if this is a cygwin "device" */
- if (win32_device_name (src_path, dst, dev))
- {
- *flags = MOUNT_BINARY; /* FIXME: Is this a sensible default for devices? */
- rc = 0;
- goto out_no_chroot_check;
- }
-
- MALLOC_CHECK;
- /* If the path is on a network drive or a //./ resp.//?/ path prefix,
- bypass the mount table. If it's // or //MACHINE, use the netdrive
- device. */
- if (src_path[1] == '/')
- {
- if (!strchr (src_path + 2, '/'))
- {
- dev = *netdrive_dev;
- set_flags (flags, PATH_BINARY);
- }
- backslashify (src_path, dst, 0);
- /* Go through chroot check */
- goto out;
- }
- if (isproc (src_path))
- {
- dev = *proc_dev;
- dev.devn = fhandler_proc::get_proc_fhandler (src_path);
- if (dev.devn == FH_BAD)
- return ENOENT;
- set_flags (flags, PATH_BINARY);
- strcpy (dst, src_path);
- goto out;
- }
- /* Check if the cygdrive prefix was specified. If so, just strip
- off the prefix and transform it into an MS-DOS path. */
- else if (iscygdrive (src_path))
- {
- int n = mount_table->cygdrive_len - 1;
- int unit;
-
- if (!src_path[n])
- {
- unit = 0;
- dst[0] = '\0';
- if (mount_table->cygdrive_len > 1)
- dev = *cygdrive_dev;
- }
- else if (cygdrive_win32_path (src_path, dst, unit))
- {
- set_flags (flags, (unsigned) cygdrive_flags);
- goto out;
- }
- else if (mount_table->cygdrive_len > 1)
- return ENOENT;
- }
-
- int chroot_pathlen;
- chroot_pathlen = 0;
- /* Check the mount table for prefix matches. */
- for (i = 0; i < nmounts; i++)
- {
- const char *path;
- int len;
-
- mi = mount + posix_sorted[i];
- if (!cygheap->root.exists ()
- || (mi->posix_pathlen == 1 && mi->posix_path[0] == '/'))
- {
- path = mi->posix_path;
- len = mi->posix_pathlen;
- }
- else if (cygheap->root.posix_ok (mi->posix_path))
- {
- path = cygheap->root.unchroot (mi->posix_path);
- chroot_pathlen = len = strlen (path);
- }
- else
- {
- chroot_pathlen = 0;
- continue;
- }
-
- if (path_prefix_p (path, src_path, len, mi->flags & MOUNT_NOPOSIX))
- break;
- }
-
- if (i < nmounts)
- {
- int err = mi->build_win32 (dst, src_path, flags, chroot_pathlen);
- if (err)
- return err;
- chroot_ok = true;
- }
- else
- {
- int offset = 0;
- if (src_path[1] != '/' && src_path[1] != ':')
- offset = cygheap->cwd.get_drive (dst);
- backslashify (src_path, dst + offset, 0);
- }
- out:
- MALLOC_CHECK;
- if (chroot_ok || cygheap->root.ischroot_native (dst))
- rc = 0;
- else
- {
- debug_printf ("attempt to access outside of chroot '%s - %s'",
- cygheap->root.posix_path (), cygheap->root.native_path ());
- rc = ENOENT;
- }
-
- out_no_chroot_check:
- debug_printf ("src_path %s, dst %s, flags %p, rc %d", src_path, dst, *flags, rc);
- return rc;
-}
-
-int
-mount_info::get_mounts_here (const char *parent_dir, int parent_dir_len,
- PUNICODE_STRING mount_points,
- PUNICODE_STRING cygd)
-{
- int n_mounts = 0;
-
- for (int i = 0; i < nmounts; i++)
- {
- mount_item *mi = mount + posix_sorted[i];
- char *last_slash = strrchr (mi->posix_path, '/');
- if (!last_slash)
- continue;
- if (last_slash == mi->posix_path)
- {
- if (parent_dir_len == 1 && mi->posix_pathlen > 1)
- RtlCreateUnicodeStringFromAsciiz (&mount_points[n_mounts++],
- last_slash + 1);
- }
- else if (parent_dir_len == last_slash - mi->posix_path
- && strncasematch (parent_dir, mi->posix_path, parent_dir_len))
- RtlCreateUnicodeStringFromAsciiz (&mount_points[n_mounts++],
- last_slash + 1);
- }
- RtlCreateUnicodeStringFromAsciiz (cygd, cygdrive + 1);
- if (cygd->Length)
- cygd->Length -= 2; // Strip trailing slash
- return n_mounts;
-}
-
-/* cygdrive_posix_path: Build POSIX path used as the
- mount point for cygdrives created when there is no other way to
- obtain a POSIX path from a Win32 one. */
-
-void
-mount_info::cygdrive_posix_path (const char *src, char *dst, int trailing_slash_p)
-{
- int len = cygdrive_len;
-
- memcpy (dst, cygdrive, len + 1);
-
- /* Now finish the path off with the drive letter to be used.
- The cygdrive prefix always ends with a trailing slash so
- the drive letter is added after the path. */
- dst[len++] = cyg_tolower (src[0]);
- if (!src[2] || (isdirsep (src[2]) && !src[3]))
- dst[len++] = '\000';
- else
- {
- int n;
- dst[len++] = '/';
- if (isdirsep (src[2]))
- n = 3;
- else
- n = 2;
- strcpy (dst + len, src + n);
- }
- slashify (dst, dst, trailing_slash_p);
-}
-
-int
-mount_info::cygdrive_win32_path (const char *src, char *dst, int& unit)
-{
- int res;
- const char *p = src + cygdrive_len;
- if (!isalpha (*p) || (!isdirsep (p[1]) && p[1]))
- {
- unit = -1; /* FIXME: should be zero, maybe? */
- dst[0] = '\0';
- res = 0;
- }
- else
- {
- /* drive letter must always be uppercase for casesensitive native NT. */
- dst[0] = cyg_toupper (*p);
- dst[1] = ':';
- strcpy (dst + 2, p + 1);
- backslashify (dst, dst, !dst[2]);
- unit = dst[0];
- res = 1;
- }
- debug_printf ("src '%s', dst '%s'", src, dst);
- return res;
-}
-
-/* conv_to_posix_path: Ensure src_path is a POSIX path.
-
- The result is zero for success, or an errno value.
- posix_path must have sufficient space (i.e. NT_MAX_PATH bytes).
- If keep_rel_p is non-zero, relative paths stay that way. */
-
-/* TODO: Change conv_to_posix_path to work with native paths. */
-
-/* src_path is a wide Win32 path. */
-int
-mount_info::conv_to_posix_path (PWCHAR src_path, char *posix_path,
- int keep_rel_p)
-{
- bool changed = false;
- if (!wcsncmp (src_path, L"\\\\?\\", 4))
- {
- src_path += 4;
- if (src_path[1] != L':') /* native UNC path */
- {
- *(src_path += 2) = L'\\';
- changed = true;
- }
- }
- tmp_pathbuf tp;
- char *buf = tp.c_get ();
- sys_wcstombs (buf, NT_MAX_PATH, src_path);
- int ret = conv_to_posix_path (buf, posix_path, keep_rel_p);
- if (changed)
- src_path[0] = L'C';
- return ret;
-}
-
-int
-mount_info::conv_to_posix_path (const char *src_path, char *posix_path,
- int keep_rel_p)
-{
- int src_path_len = strlen (src_path);
- int relative_path_p = !isabspath (src_path);
- int trailing_slash_p;
-
- if (src_path_len <= 1)
- trailing_slash_p = 0;
- else
- {
- const char *lastchar = src_path + src_path_len - 1;
- trailing_slash_p = isdirsep (*lastchar) && lastchar[-1] != ':';
- }
-
- debug_printf ("conv_to_posix_path (%s, %s, %s)", src_path,
- keep_rel_p ? "keep-rel" : "no-keep-rel",
- trailing_slash_p ? "add-slash" : "no-add-slash");
- MALLOC_CHECK;
-
- if (src_path_len >= NT_MAX_PATH)
- {
- debug_printf ("ENAMETOOLONG");
- return ENAMETOOLONG;
- }
-
- /* FIXME: For now, if the path is relative and it's supposed to stay
- that way, skip mount table processing. */
-
- if (keep_rel_p && relative_path_p)
- {
- slashify (src_path, posix_path, 0);
- debug_printf ("%s = conv_to_posix_path (%s)", posix_path, src_path);
- return 0;
- }
-
- tmp_pathbuf tp;
- char *pathbuf = tp.c_get ();
- char *tail;
- int rc = normalize_win32_path (src_path, pathbuf, tail);
- if (rc != 0)
- {
- debug_printf ("%d = conv_to_posix_path (%s)", rc, src_path);
- return rc;
- }
-
- int pathbuflen = tail - pathbuf;
- for (int i = 0; i < nmounts; ++i)
- {
- mount_item &mi = mount[native_sorted[i]];
- if (!path_prefix_p (mi.native_path, pathbuf, mi.native_pathlen,
- mi.flags & MOUNT_NOPOSIX))
- continue;
-
- if (cygheap->root.exists () && !cygheap->root.posix_ok (mi.posix_path))
- continue;
-
- /* SRC_PATH is in the mount table. */
- int nextchar;
- const char *p = pathbuf + mi.native_pathlen;
-
- if (!*p || !p[1])
- nextchar = 0;
- else if (isdirsep (*p))
- nextchar = -1;
- else
- nextchar = 1;
-
- int addslash = nextchar > 0 ? 1 : 0;
- if ((mi.posix_pathlen + (pathbuflen - mi.native_pathlen) + addslash) >= NT_MAX_PATH)
- return ENAMETOOLONG;
- strcpy (posix_path, mi.posix_path);
- if (addslash)
- strcat (posix_path, "/");
- if (nextchar)
- slashify (p,
- posix_path + addslash + (mi.posix_pathlen == 1 ? 0 : mi.posix_pathlen),
- trailing_slash_p);
-
- if (cygheap->root.exists ())
- {
- const char *p = cygheap->root.unchroot (posix_path);
- memmove (posix_path, p, strlen (p) + 1);
- }
- goto out;
- }
-
- if (!cygheap->root.exists ())
- /* nothing */;
- else if (!cygheap->root.ischroot_native (pathbuf))
- return ENOENT;
- else
- {
- const char *p = pathbuf + cygheap->root.native_length ();
- if (*p)
- slashify (p, posix_path, trailing_slash_p);
- else
- {
- posix_path[0] = '/';
- posix_path[1] = '\0';
- }
- goto out;
- }
-
- /* Not in the database. This should [theoretically] only happen if either
- the path begins with //, or / isn't mounted, or the path has a drive
- letter not covered by the mount table. If it's a relative path then the
- caller must want an absolute path (otherwise we would have returned
- above). So we always return an absolute path at this point. */
- if (isdrive (pathbuf))
- cygdrive_posix_path (pathbuf, posix_path, trailing_slash_p);
- else
- {
- /* The use of src_path and not pathbuf here is intentional.
- We couldn't translate the path, so just ensure no \'s are present. */
- slashify (src_path, posix_path, trailing_slash_p);
- }
-
-out:
- debug_printf ("%s = conv_to_posix_path (%s)", posix_path, src_path);
- MALLOC_CHECK;
- return 0;
-}
-
-/* Return flags associated with a mount point given the win32 path. */
-
-unsigned
-mount_info::set_flags_from_win32_path (const char *p)
-{
- for (int i = 0; i < nmounts; i++)
- {
- mount_item &mi = mount[native_sorted[i]];
- if (path_prefix_p (mi.native_path, p, mi.native_pathlen,
- mi.flags & MOUNT_NOPOSIX))
- return mi.flags;
- }
- return PATH_BINARY;
-}
-
-inline char *
-skip_ws (char *in)
-{
- while (*in == ' ' || *in == '\t')
- ++in;
- return in;
-}
-
-inline char *
-find_ws (char *in)
-{
- while (*in && *in != ' ' && *in != '\t')
- ++in;
- return in;
-}
-
-inline char *
-conv_fstab_spaces (char *field)
-{
- register char *sp = field;
- while ((sp = strstr (sp, "\\040")) != NULL)
- {
- *sp++ = ' ';
- memmove (sp, sp + 3, strlen (sp + 3) + 1);
- }
- return field;
-}
-
-struct opt
-{
- const char *name;
- unsigned val;
- bool clear;
-} oopts[] =
-{
- {"user", MOUNT_SYSTEM, 1},
- {"nouser", MOUNT_SYSTEM, 0},
- {"binary", MOUNT_BINARY, 0},
- {"text", MOUNT_BINARY, 1},
- {"exec", MOUNT_EXEC, 0},
- {"notexec", MOUNT_NOTEXEC, 0},
- {"cygexec", MOUNT_CYGWIN_EXEC, 0},
- {"nosuid", 0, 0},
- {"acl", MOUNT_NOACL, 1},
- {"noacl", MOUNT_NOACL, 0},
- {"posix=1", MOUNT_NOPOSIX, 1},
- {"posix=0", MOUNT_NOPOSIX, 0}
-};
-
-static bool
-read_flags (char *options, unsigned &flags)
-{
- while (*options)
- {
- char *p = strchr (options, ',');
- if (p)
- *p++ = '\0';
- else
- p = strchr (options, '\0');
-
- for (opt *o = oopts;
- o < (oopts + (sizeof (oopts) / sizeof (oopts[0])));
- o++)
- if (strcmp (options, o->name) == 0)
- {
- if (o->clear)
- flags &= ~o->val;
- else
- flags |= o->val;
- goto gotit;
- }
- system_printf ("invalid fstab option - '%s'", options);
- return false;
-
- gotit:
- options = p;
- }
- return true;
-}
-
-bool
-mount_info::from_fstab_line (char *line, bool user)
-{
- char *native_path, *posix_path, *fs_type;
-
- /* First field: Native path. */
- char *c = skip_ws (line);
- if (!*c || *c == '#')
- return true;
- char *cend = find_ws (c);
- *cend = '\0';
- native_path = conv_fstab_spaces (c);
- /* Second field: POSIX path. */
- c = skip_ws (cend + 1);
- if (!*c)
- return true;
- cend = find_ws (c);
- *cend = '\0';
- posix_path = conv_fstab_spaces (c);
- /* Third field: FS type. */
- c = skip_ws (cend + 1);
- if (!*c)
- return true;
- cend = find_ws (c);
- *cend = '\0';
- fs_type = c;
- /* Forth field: Flags. */
- c = skip_ws (cend + 1);
- if (!*c)
- return true;
- cend = find_ws (c);
- *cend = '\0';
- unsigned mount_flags = MOUNT_SYSTEM | MOUNT_BINARY;
- if (!read_flags (c, mount_flags))
- return true;
- if (user)
- mount_flags &= ~MOUNT_SYSTEM;
- if (!strcmp (fs_type, "cygdrive"))
- {
- cygdrive_flags = mount_flags | MOUNT_CYGDRIVE;
- slashify (posix_path, cygdrive, 1);
- cygdrive_len = strlen (cygdrive);
- }
- else
- {
- int res = mount_table->add_item (native_path, posix_path, mount_flags);
- if (res && get_errno () == EMFILE)
- return false;
- }
- return true;
-}
-
-bool
-mount_info::from_fstab (bool user, WCHAR fstab[], PWCHAR fstab_end)
-{
- UNICODE_STRING upath;
- OBJECT_ATTRIBUTES attr;
- IO_STATUS_BLOCK io;
- NTSTATUS status;
- HANDLE fh;
-
- if (user)
- {
- extern void transform_chars (PWCHAR, PWCHAR);
- PWCHAR username;
- sys_mbstowcs (username = wcpcpy (fstab_end, L".d\\"),
- NT_MAX_PATH - (fstab_end - fstab),
- cygheap->user.name ());
- /* Make sure special chars in the username are converted according to
- the rules. */
- transform_chars (username, username + wcslen (username) - 1);
- }
- RtlInitUnicodeString (&upath, fstab);
- InitializeObjectAttributes (&attr, &upath, OBJ_CASE_INSENSITIVE, NULL, NULL);
- debug_printf ("Try to read mounts from %W", fstab);
- status = NtOpenFile (&fh, SYNCHRONIZE | FILE_READ_DATA, &attr, &io,
- FILE_SHARE_VALID_FLAGS, FILE_SYNCHRONOUS_IO_NONALERT);
- if (!NT_SUCCESS (status))
- {
- debug_printf ("NtOpenFile(%S) failed, %p", &upath, status);
- return false;
- }
-
- char buf[NT_MAX_PATH];
- char *got = buf;
- DWORD len = 0;
- unsigned line = 1;
- /* Using buffer size - 2 leaves space to append two \0. */
- while (NT_SUCCESS (NtReadFile (fh, NULL, NULL, NULL, &io, got,
- (sizeof (buf) - 2) - (got - buf), NULL, NULL)))
- {
- char *end;
-
- len = io.Information;
- /* Set end marker. */
- got[len] = got[len + 1] = '\0';
- /* Set len to the absolute len of bytes in buf. */
- len += got - buf;
- /* Reset got to start reading at the start of the buffer again. */
- got = buf;
-retry:
- bool got_nl = false;
- while (got < buf + len && (end = strchr (got, '\n')))
- {
- got_nl = true;
- end[end[-1] == '\r' ? -1 : 0] = '\0';
- if (!from_fstab_line (got, user))
- goto done;
- got = end + 1;
- ++line;
- }
- if (len < (sizeof (buf) - 2))
- break;
- /* Check if the buffer contained at least one \n. If not, the
- line length is > 32K. We don't take such long lines. Print
- a debug message and skip this line entirely. */
- if (!got_nl)
- {
- system_printf ("%W: Line %d too long, skipping...", fstab, line);
- while (NT_SUCCESS (NtReadFile (fh, NULL, NULL, NULL, &io, buf,
- (sizeof (buf) - 2), NULL, NULL)))
- {
- len = io.Information;
- buf[len] = buf[len + 1] = '\0';
- got = strchr (buf, '\n');
- if (got)
- {
- ++got;
- ++line;
- goto retry;
- }
- }
- got = buf;
- break;
- }
- /* We have to read once more. Move remaining bytes to the start of
- the buffer and reposition got so that it points to the end of
- the remaining bytes. */
- len = buf + len - got;
- memmove (buf, got, len);
- got = buf + len;
- buf[len] = buf[len + 1] = '\0';
- }
- /* Catch a last line without trailing \n. */
- if (got > buf)
- from_fstab_line (got, user);
-done:
- NtClose (fh);
- return true;
-}
-
-/* write_cygdrive_info: Store default prefix and flags
- to use when creating cygdrives to the special user shared mem
- location used to store cygdrive information. */
-
-int
-mount_info::write_cygdrive_info (const char *cygdrive_prefix, unsigned flags)
-{
- /* Verify cygdrive prefix starts with a forward slash and if there's
- another character, it's not a slash. */
- if ((cygdrive_prefix == NULL) || (*cygdrive_prefix == 0) ||
- (!isslash (cygdrive_prefix[0])) ||
- ((cygdrive_prefix[1] != '\0') && (isslash (cygdrive_prefix[1]))))
- {
- set_errno (EINVAL);
- return -1;
- }
- /* Don't allow to override a system cygdrive prefix. */
- if (cygdrive_flags & MOUNT_SYSTEM)
- {
- set_errno (EPERM);
- return -1;
- }
-
- slashify (cygdrive_prefix, cygdrive, 1);
- cygdrive_flags = flags & ~MOUNT_SYSTEM;
- cygdrive_len = strlen (cygdrive);
-
- return 0;
-}
-
-int
-mount_info::get_cygdrive_info (char *user, char *system, char *user_flags,
- char *system_flags)
-{
- if (user)
- *user = '\0';
- if (system)
- *system = '\0';
- if (user_flags)
- *user_flags = '\0';
- if (system_flags)
- *system_flags = '\0';
-
- char *path = (cygdrive_flags & MOUNT_SYSTEM) ? system : user;
- char *flags = (cygdrive_flags & MOUNT_SYSTEM) ? system_flags : user_flags;
-
- if (path)
- {
- strcpy (path, cygdrive);
- /* Strip trailing slash for backward compatibility. */
- if (cygdrive_len > 2)
- path[cygdrive_len - 1] = '\0';
- }
- if (flags)
- strcpy (flags, (cygdrive_flags & MOUNT_BINARY) ? "binmode" : "textmode");
- return 0;
-}
-
-static mount_item *mounts_for_sort;
-
-/* sort_by_posix_name: qsort callback to sort the mount entries. Sort
- user mounts ahead of system mounts to the same POSIX path. */
-/* FIXME: should the user should be able to choose whether to
- prefer user or system mounts??? */
-static int
-sort_by_posix_name (const void *a, const void *b)
-{
- mount_item *ap = mounts_for_sort + (*((int*) a));
- mount_item *bp = mounts_for_sort + (*((int*) b));
-
- /* Base weighting on longest posix path first so that the most
- obvious path will be chosen. */
- size_t alen = strlen (ap->posix_path);
- size_t blen = strlen (bp->posix_path);
-
- int res = blen - alen;
-
- if (res)
- return res; /* Path lengths differed */
-
- /* The two paths were the same length, so just determine normal
- lexical sorted order. */
- res = strcmp (ap->posix_path, bp->posix_path);
-
- if (res == 0)
- {
- /* need to select between user and system mount to same POSIX path */
- if (!(bp->flags & MOUNT_SYSTEM)) /* user mount */
- return 1;
- else
- return -1;
- }
-
- return res;
-}
-
-/* sort_by_native_name: qsort callback to sort the mount entries. Sort
- user mounts ahead of system mounts to the same POSIX path. */
-/* FIXME: should the user should be able to choose whether to
- prefer user or system mounts??? */
-static int
-sort_by_native_name (const void *a, const void *b)
-{
- mount_item *ap = mounts_for_sort + (*((int*) a));
- mount_item *bp = mounts_for_sort + (*((int*) b));
-
- /* Base weighting on longest win32 path first so that the most
- obvious path will be chosen. */
- size_t alen = strlen (ap->native_path);
- size_t blen = strlen (bp->native_path);
-
- int res = blen - alen;
-
- if (res)
- return res; /* Path lengths differed */
-
- /* The two paths were the same length, so just determine normal
- lexical sorted order. */
- res = strcmp (ap->native_path, bp->native_path);
-
- if (res == 0)
- {
- /* need to select between user and system mount to same POSIX path */
- if (!(bp->flags & MOUNT_SYSTEM)) /* user mount */
- return 1;
- else
- return -1;
- }
-
- return res;
-}
-
-void
-mount_info::sort ()
-{
- for (int i = 0; i < nmounts; i++)
- native_sorted[i] = posix_sorted[i] = i;
- /* Sort them into reverse length order, otherwise we won't
- be able to look for /foo in /. */
- mounts_for_sort = mount; /* ouch. */
- qsort (posix_sorted, nmounts, sizeof (posix_sorted[0]), sort_by_posix_name);
- qsort (native_sorted, nmounts, sizeof (native_sorted[0]), sort_by_native_name);
-}
-
-/* Add an entry to the mount table.
- Returns 0 on success, -1 on failure and errno is set.
-
- This is where all argument validation is done. It may not make sense to
- do this when called internally, but it's cleaner to keep it all here. */
-
-int
-mount_info::add_item (const char *native, const char *posix,
- unsigned mountflags)
-{
- tmp_pathbuf tp;
- char *nativetmp = tp.c_get ();
- /* FIXME: The POSIX path is stored as value name right now, which is
- restricted to 256 bytes. */
- char posixtmp[CYG_MAX_PATH];
- char *nativetail, *posixtail, error[] = "error";
- int nativeerr, posixerr;
-
- /* Something's wrong if either path is NULL or empty, or if it's
- not a UNC or absolute path. */
-
- if (native == NULL || !isabspath (native) ||
- !(is_native_path (native) || is_unc_share (native) || isdrive (native)))
- nativeerr = EINVAL;
- else
- nativeerr = normalize_win32_path (native, nativetmp, nativetail);
-
- if (posix == NULL || !isabspath (posix) ||
- is_unc_share (posix) || isdrive (posix))
- posixerr = EINVAL;
- else
- posixerr = normalize_posix_path (posix, posixtmp, posixtail);
-
- debug_printf ("%s[%s], %s[%s], %p",
- native, nativeerr ? error : nativetmp,
- posix, posixerr ? error : posixtmp, mountflags);
-
- if (nativeerr || posixerr)
- {
- set_errno (nativeerr?:posixerr);
- return -1;
- }
-
- /* Make sure both paths do not end in /. */
- if (nativetail > nativetmp + 1 && nativetail[-1] == '\\')
- nativetail[-1] = '\0';
- if (posixtail > posixtmp + 1 && posixtail[-1] == '/')
- posixtail[-1] = '\0';
-
- /* Write over an existing mount item with the same POSIX path if
- it exists and is from the same registry area. */
- int i;
- for (i = 0; i < nmounts; i++)
- {
- if (!strcmp (mount[i].posix_path, posixtmp))
- {
- /* Don't allow to override a system mount with a user mount. */
- if ((mount[i].flags & MOUNT_SYSTEM) && !(mountflags & MOUNT_SYSTEM))
- {
- set_errno (EPERM);
- return -1;
- }
- if ((mount[i].flags & MOUNT_SYSTEM) == (mountflags & MOUNT_SYSTEM))
- break;
- }
- }
-
- if (i == nmounts && nmounts == MAX_MOUNTS)
- {
- set_errno (EMFILE);
- return -1;
- }
-
- if (i == nmounts)
- nmounts++;
- mount[i].init (nativetmp, posixtmp, mountflags);
- sort ();
-
- return 0;
-}
-
-/* Delete a mount table entry where path is either a Win32 or POSIX
- path. Since the mount table is really just a table of aliases,
- deleting / is ok (although running without a slash mount is
- strongly discouraged because some programs may run erratically
- without one). If MOUNT_SYSTEM is set in flags, remove from system
- registry, otherwise remove the user registry mount.
-*/
-
-int
-mount_info::del_item (const char *path, unsigned flags)
-{
- tmp_pathbuf tp;
- char *pathtmp = tp.c_get ();
- int posix_path_p = false;
-
- /* Something's wrong if path is NULL or empty. */
- if (path == NULL || *path == 0 || !isabspath (path))
- {
- set_errno (EINVAL);
- return -1;
- }
-
- if (is_unc_share (path) || strpbrk (path, ":\\"))
- backslashify (path, pathtmp, 0);
- else
- {
- slashify (path, pathtmp, 0);
- posix_path_p = true;
- }
- nofinalslash (pathtmp, pathtmp);
-
- for (int i = 0; i < nmounts; i++)
- {
- int ent = native_sorted[i]; /* in the same order as getmntent() */
- if (((posix_path_p)
- ? !strcmp (mount[ent].posix_path, pathtmp)
- : strcasematch (mount[ent].native_path, pathtmp)))
- {
- /* Don't allow to remove a system mount. */
- if ((mount[ent].flags & MOUNT_SYSTEM))
- {
- set_errno (EPERM);
- return -1;
- }
- nmounts--; /* One less mount table entry */
- /* Fill in the hole if not at the end of the table */
- if (ent < nmounts)
- memmove (mount + ent, mount + ent + 1,
- sizeof (mount[ent]) * (nmounts - ent));
- sort (); /* Resort the table */
- return 0;
- }
- }
- set_errno (EINVAL);
- return -1;
-}
-
-/************************* mount_item class ****************************/
-
-static mntent *
-fillout_mntent (const char *native_path, const char *posix_path, unsigned flags)
-{
- struct mntent& ret=_my_tls.locals.mntbuf;
- bool append_bs = false;
-
- /* Remove drivenum from list if we see a x: style path */
- if (strlen (native_path) == 2 && native_path[1] == ':')
- {
- int drivenum = cyg_tolower (native_path[0]) - 'a';
- if (drivenum >= 0 && drivenum <= 31)
- _my_tls.locals.available_drives &= ~(1 << drivenum);
- append_bs = true;
- }
-
- /* Pass back pointers to mount_table strings reserved for use by
- getmntent rather than pointers to strings in the internal mount
- table because the mount table might change, causing weird effects
- from the getmntent user's point of view. */
-
- slashify (native_path, _my_tls.locals.mnt_fsname, false);
- ret.mnt_fsname = _my_tls.locals.mnt_fsname;
- strcpy (_my_tls.locals.mnt_dir, posix_path);
- ret.mnt_dir = _my_tls.locals.mnt_dir;
-
- /* Try to give a filesystem type that matches what a Linux application might
- expect. Naturally, this is a moving target, but we can make some
- reasonable guesses for popular types. */
-
- fs_info mntinfo;
- tmp_pathbuf tp;
- UNICODE_STRING unat;
- tp.u_get (&unat);
- get_nt_native_path (_my_tls.locals.mnt_fsname, unat);
- if (append_bs)
- RtlAppendUnicodeToString (&unat, L"\\");
- mntinfo.update (&unat, NULL);
-
- if (mntinfo.is_samba())
- strcpy (_my_tls.locals.mnt_type, (char *) "smbfs");
- else if (mntinfo.is_nfs ())
- strcpy (_my_tls.locals.mnt_type, (char *) "nfs");
- else if (mntinfo.is_fat ())
- strcpy (_my_tls.locals.mnt_type, (char *) "vfat");
- else if (mntinfo.is_ntfs ())
- strcpy (_my_tls.locals.mnt_type, (char *) "ntfs");
- else if (mntinfo.is_netapp ())
- strcpy (_my_tls.locals.mnt_type, (char *) "netapp");
- else if (mntinfo.is_cdrom ())
- strcpy (_my_tls.locals.mnt_type, (char *) "iso9660");
- else
- strcpy (_my_tls.locals.mnt_type, (char *) "unknown");
-
- ret.mnt_type = _my_tls.locals.mnt_type;
-
- /* mnt_opts is a string that details mount params such as
- binary or textmode, or exec. We don't print
- `silent' here; it's a magic internal thing. */
-
- if (!(flags & MOUNT_BINARY))
- strcpy (_my_tls.locals.mnt_opts, (char *) "text");
- else
- strcpy (_my_tls.locals.mnt_opts, (char *) "binary");
-
- if (flags & MOUNT_CYGWIN_EXEC)
- strcat (_my_tls.locals.mnt_opts, (char *) ",cygexec");
- else if (flags & MOUNT_EXEC)
- strcat (_my_tls.locals.mnt_opts, (char *) ",exec");
- else if (flags & MOUNT_NOTEXEC)
- strcat (_my_tls.locals.mnt_opts, (char *) ",noexec");
-
- if (flags & MOUNT_NOACL)
- strcat (_my_tls.locals.mnt_opts, (char *) ",noacl");
-
- if (flags & MOUNT_NOPOSIX)
- strcat (_my_tls.locals.mnt_opts, (char *) ",posix=0");
-
- if (!(flags & MOUNT_SYSTEM)) /* user mount */
- strcat (_my_tls.locals.mnt_opts, (char *) ",user");
-
- if ((flags & MOUNT_CYGDRIVE)) /* cygdrive */
- strcat (_my_tls.locals.mnt_opts, (char *) ",noumount");
-
- ret.mnt_opts = _my_tls.locals.mnt_opts;
-
- ret.mnt_freq = 1;
- ret.mnt_passno = 1;
- return &ret;
-}
-
-struct mntent *
-mount_item::getmntent ()
-{
- return fillout_mntent (native_path, posix_path, flags);
-}
-
-static struct mntent *
-cygdrive_getmntent ()
-{
- char native_path[4];
- char posix_path[CYG_MAX_PATH];
- DWORD mask = 1, drive = 'a';
- struct mntent *ret = NULL;
-
- while (_my_tls.locals.available_drives)
- {
- for (/* nothing */; drive <= 'z'; mask <<= 1, drive++)
- if (_my_tls.locals.available_drives & mask)
- break;
-
- __small_sprintf (native_path, "%c:\\", cyg_toupper (drive));
- if (GetFileAttributes (native_path) == INVALID_FILE_ATTRIBUTES)
- {
- _my_tls.locals.available_drives &= ~mask;
- continue;
- }
- native_path[2] = '\0';
- __small_sprintf (posix_path, "%s%c", mount_table->cygdrive, drive);
- ret = fillout_mntent (native_path, posix_path, mount_table->cygdrive_flags);
- break;
- }
-
- return ret;
-}
-
-struct mntent *
-mount_info::getmntent (int x)
-{
- if (x < 0 || x >= nmounts)
- return cygdrive_getmntent ();
-
- return mount[native_sorted[x]].getmntent ();
-}
-
-/* Fill in the fields of a mount table entry. */
-
-void
-mount_item::init (const char *native, const char *posix, unsigned mountflags)
-{
- strcpy ((char *) native_path, native);
- strcpy ((char *) posix_path, posix);
-
- native_pathlen = strlen (native_path);
- posix_pathlen = strlen (posix_path);
-
- flags = mountflags;
-}
-
-/********************** Mount System Calls **************************/
-
-/* Mount table system calls.
- Note that these are exported to the application. */
-
-/* mount: Add a mount to the mount table in memory and to the registry
- that will cause paths under win32_path to be translated to paths
- under posix_path. */
-
-extern "C" int
-mount (const char *win32_path, const char *posix_path, unsigned flags)
-{
- int res = -1;
- flags &= ~MOUNT_SYSTEM;
-
- myfault efault;
- if (efault.faulted (EFAULT))
- /* errno set */;
- else if (!*posix_path)
- set_errno (EINVAL);
- else if (strpbrk (posix_path, "\\:"))
- set_errno (EINVAL);
- else if (flags & MOUNT_CYGDRIVE) /* normal mount */
- {
- /* When flags include MOUNT_CYGDRIVE, take this to mean that
- we actually want to change the cygdrive prefix and flags
- without actually mounting anything. */
- res = mount_table->write_cygdrive_info (posix_path, flags);
- win32_path = NULL;
- }
- else if (!*win32_path)
- set_errno (EINVAL);
- else
- res = mount_table->add_item (win32_path, posix_path, flags);
-
- syscall_printf ("%d = mount (%s, %s, %p)", res, win32_path, posix_path, flags);
- return res;
-}
-
-/* umount: The standard umount call only has a path parameter. Since
- it is not possible for this call to specify whether to remove the
- mount from the user or global mount registry table, assume the user
- table. */
-
-extern "C" int
-umount (const char *path)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (!*path)
- {
- set_errno (EINVAL);
- return -1;
- }
- return cygwin_umount (path, 0);
-}
-
-/* cygwin_umount: This is like umount but takes an additional flags
- parameter that specifies whether to umount from the user or system-wide
- registry area. */
-
-extern "C" int
-cygwin_umount (const char *path, unsigned flags)
-{
- int res = -1;
-
- if (!(flags & MOUNT_CYGDRIVE))
- res = mount_table->del_item (path, flags & ~MOUNT_SYSTEM);
-
- syscall_printf ("%d = cygwin_umount (%s, %d)", res, path, flags);
- return res;
-}
-
-bool
-is_floppy (const char *dos)
-{
- char dev[256];
- if (!QueryDosDevice (dos, dev, 256))
- return false;
- return ascii_strncasematch (dev, "\\Device\\Floppy", 14);
-}
-
-extern "C" FILE *
-setmntent (const char *filep, const char *)
-{
- _my_tls.locals.iteration = 0;
- _my_tls.locals.available_drives = GetLogicalDrives ();
- /* Filter floppy drives on A: and B: */
- if ((_my_tls.locals.available_drives & 1) && is_floppy ("A:"))
- _my_tls.locals.available_drives &= ~1;
- if ((_my_tls.locals.available_drives & 2) && is_floppy ("B:"))
- _my_tls.locals.available_drives &= ~2;
- return (FILE *) filep;
-}
-
-extern "C" struct mntent *
-getmntent (FILE *)
-{
- return mount_table->getmntent (_my_tls.locals.iteration++);
-}
-
-extern "C" int
-endmntent (FILE *)
-{
- return 1;
-}
diff --git a/winsup/cygwin/msg.cc b/winsup/cygwin/msg.cc
deleted file mode 100644
index bda7b13..0000000
--- a/winsup/cygwin/msg.cc
+++ /dev/null
@@ -1,209 +0,0 @@
-/* msg.cc: XSI IPC interface for Cygwin.
-
- 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. */
-
-#include "winsup.h"
-#ifdef USE_SERVER
-#include <unistd.h>
-
-#include "sigproc.h"
-#include "cygtls.h"
-
-#include "cygserver_msg.h"
-
-/*
- * client_request_msg Constructors
- */
-
-client_request_msg::client_request_msg (int msqid,
- int cmd,
- struct msqid_ds *buf)
- : client_request (CYGSERVER_REQUEST_MSG, &_parameters, sizeof (_parameters))
-{
- _parameters.in.msgop = MSGOP_msgctl;
- ipc_set_proc_info (_parameters.in.ipcblk);
-
- _parameters.in.ctlargs.msqid = msqid;
- _parameters.in.ctlargs.cmd = cmd;
- _parameters.in.ctlargs.buf = buf;
-
- msglen (sizeof (_parameters.in));
-}
-
-client_request_msg::client_request_msg (key_t key,
- int msgflg)
- : client_request (CYGSERVER_REQUEST_MSG, &_parameters, sizeof (_parameters))
-{
- _parameters.in.msgop = MSGOP_msgget;
- ipc_set_proc_info (_parameters.in.ipcblk);
-
- _parameters.in.getargs.key = key;
- _parameters.in.getargs.msgflg = msgflg;
-
- msglen (sizeof (_parameters.in));
-}
-
-client_request_msg::client_request_msg (int msqid,
- void *msgp,
- size_t msgsz,
- long msgtyp,
- int msgflg)
- : client_request (CYGSERVER_REQUEST_MSG, &_parameters, sizeof (_parameters))
-{
- _parameters.in.msgop = MSGOP_msgrcv;
- ipc_set_proc_info (_parameters.in.ipcblk);
-
- _parameters.in.rcvargs.msqid = msqid;
- _parameters.in.rcvargs.msgp = msgp;
- _parameters.in.rcvargs.msgsz = msgsz;
- _parameters.in.rcvargs.msgtyp = msgtyp;
- _parameters.in.rcvargs.msgflg = msgflg;
-
- msglen (sizeof (_parameters.in));
-}
-
-client_request_msg::client_request_msg (int msqid,
- const void *msgp,
- size_t msgsz,
- int msgflg)
- : client_request (CYGSERVER_REQUEST_MSG, &_parameters, sizeof (_parameters))
-{
- _parameters.in.msgop = MSGOP_msgsnd;
- ipc_set_proc_info (_parameters.in.ipcblk);
-
- _parameters.in.sndargs.msqid = msqid;
- _parameters.in.sndargs.msgp = msgp;
- _parameters.in.sndargs.msgsz = msgsz;
- _parameters.in.sndargs.msgflg = msgflg;
-
- msglen (sizeof (_parameters.in));
-}
-#endif /* USE_SERVER */
-
-/*
- * XSI message queue API. These are exported by the DLL.
- */
-
-extern "C" int
-msgctl (int msqid, int cmd, struct msqid_ds *buf)
-{
-#ifdef USE_SERVER
- syscall_printf ("msgctl (msqid = %d, cmd = 0x%x, buf = %p)",
- msqid, cmd, buf);
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- switch (cmd)
- {
- case IPC_STAT:
- break;
- case IPC_SET:
- break;
- case IPC_RMID:
- break;
- case IPC_INFO:
- break;
- case MSG_INFO:
- break;
- default:
- syscall_printf ("-1 [%d] = msgctl ()", EINVAL);
- set_errno (EINVAL);
- return -1;
- }
- client_request_msg request (msqid, cmd, buf);
- if (request.make_request () == -1 || request.retval () == -1)
- {
- syscall_printf ("-1 [%d] = msgctl ()", request.error_code ());
- set_errno (request.error_code ());
- if (request.error_code () == ENOSYS)
- raise (SIGSYS);
- return -1;
- }
- return request.retval ();
-#else
- set_errno (ENOSYS);
- raise (SIGSYS);
- return -1;
-#endif
-}
-
-extern "C" int
-msgget (key_t key, int msgflg)
-{
-#ifdef USE_SERVER
- syscall_printf ("msgget (key = %U, msgflg = 0x%x)", key, msgflg);
- client_request_msg request (key, msgflg);
- if (request.make_request () == -1 || request.retval () == -1)
- {
- syscall_printf ("-1 [%d] = msgget ()", request.error_code ());
- set_errno (request.error_code ());
- if (request.error_code () == ENOSYS)
- raise (SIGSYS);
- return -1;
- }
- return request.retval ();
-#else
- set_errno (ENOSYS);
- raise (SIGSYS);
- return -1;
-#endif
-}
-
-extern "C" ssize_t
-msgrcv (int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg)
-{
-#ifdef USE_SERVER
- syscall_printf ("msgrcv (msqid = %d, msgp = %p, msgsz = %d, "
- "msgtyp = %d, msgflg = 0x%x)",
- msqid, msgp, msgsz, msgtyp, msgflg);
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- client_request_msg request (msqid, msgp, msgsz, msgtyp, msgflg);
- if (request.make_request () == -1 || request.rcvval () == -1)
- {
- syscall_printf ("-1 [%d] = msgrcv ()", request.error_code ());
- set_errno (request.error_code ());
- if (request.error_code () == ENOSYS)
- raise (SIGSYS);
- return -1;
- }
- return request.rcvval ();
-#else
- set_errno (ENOSYS);
- raise (SIGSYS);
- return -1;
-#endif
-}
-
-extern "C" int
-msgsnd (int msqid, const void *msgp, size_t msgsz, int msgflg)
-{
-#ifdef USE_SERVER
- syscall_printf ("msgsnd (msqid = %d, msgp = %p, msgsz = %d, msgflg = 0x%x)",
- msqid, msgp, msgsz, msgflg);
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- client_request_msg request (msqid, msgp, msgsz, msgflg);
- if (request.make_request () == -1 || request.retval () == -1)
- {
- syscall_printf ("-1 [%d] = msgsnd ()", request.error_code ());
- set_errno (request.error_code ());
- if (request.error_code () == ENOSYS)
- raise (SIGSYS);
- return -1;
- }
- return request.retval ();
-#else
- set_errno (ENOSYS);
- raise (SIGSYS);
- return -1;
-#endif
-}
diff --git a/winsup/cygwin/mtinfo.h b/winsup/cygwin/mtinfo.h
deleted file mode 100644
index cccaed8..0000000
--- a/winsup/cygwin/mtinfo.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/* mtinfo.h: Defininitions for the Cygwin tape driver class.
-
- Copyright 2004, 2005, 2006, 2008 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. */
-
-/* Maximum number of supported partitions per drive. */
-#define MAX_PARTITION_NUM 64
-/* Maximum number of supported drives. */
-#define MAX_DRIVE_NUM 8
-
-/* Values for bookkeeping of the tape position relative to filemarks
- and eod/eom. */
-enum eom_val
-{
- no_eof,
- eof_hit,
- eof,
- eod_hit,
- eod,
- eom_hit,
- eom
-};
-
-enum dirty_state
-{
- clean,
- has_read,
- has_written,
- async_write_pending
-};
-
-enum lock_state
-{
- unlocked,
- lock_error,
- auto_locked,
- locked
-};
-
-/* Partition specific information */
-class mtinfo_part
-{
-public:
- long block; /* logical block no */
- long file; /* current file no */
- long fblock; /* relative block no */
- bool smark; /* At setmark? */
- eom_val emark; /* "end-of"-mark */
-
- void initialize (long nblock = -1);
-};
-
-class mtinfo_drive
-{
- int drive;
- int lasterr;
- long partition;
- long block;
- dirty_state dirty;
- lock_state lock;
- TAPE_GET_DRIVE_PARAMETERS _dp;
- TAPE_GET_MEDIA_PARAMETERS _mp;
- OVERLAPPED ov;
- struct status_flags
- {
- unsigned buffer_writes : 1;
- unsigned async_writes : 1;
- unsigned two_fm : 1;
- unsigned fast_eom : 1;
- unsigned auto_lock : 1;
- unsigned sysv : 1;
- unsigned nowait : 1;
- } status;
- mtinfo_part _part[MAX_PARTITION_NUM];
-
- inline int error (const char *str)
- {
- if (lasterr)
- debug_printf ("%s: Win32 error %d", str, lasterr);
- return lasterr;
- }
- inline bool get_feature (DWORD parm)
- {
- return ((parm & TAPE_DRIVE_HIGH_FEATURES)
- ? ((_dp.FeaturesHigh & parm) != 0)
- : ((_dp.FeaturesLow & parm) != 0));
- }
- int get_pos (HANDLE mt, long *ppartition = NULL, long *pblock = NULL);
- int _set_pos (HANDLE mt, int mode, long count, int partition, BOOL dont_wait);
- int create_partitions (HANDLE mt, long count);
- int set_partition (HANDLE mt, long count);
- int write_marks (HANDLE mt, int marktype, DWORD count);
- int erase (HANDLE mt, int mode);
- int prepare (HANDLE mt, int action, bool is_auto = false);
- int set_compression (HANDLE mt, long count);
- int set_blocksize (HANDLE mt, long count);
- int get_status (HANDLE mt, struct mtget *get);
- int set_options (HANDLE mt, long options);
- int async_wait (HANDLE mt, DWORD *bytes_written);
-
-public:
- void initialize (int num, bool first_time);
- int get_dp (HANDLE mt);
- int get_mp (HANDLE mt);
- int open (HANDLE mt);
- int close (HANDLE mt, bool rewind);
- int read (HANDLE mt, HANDLE mt_evt, void *ptr, size_t &ulen);
- int write (HANDLE mt, HANDLE mt_evt, const void *ptr, size_t &len);
- int ioctl (HANDLE mt, unsigned int cmd, void *buf);
- int set_pos (HANDLE mt, int mode, long count, bool sfm_func);
-
- IMPLEMENT_STATUS_FLAG (bool, buffer_writes)
- IMPLEMENT_STATUS_FLAG (bool, async_writes)
- IMPLEMENT_STATUS_FLAG (bool, two_fm)
- IMPLEMENT_STATUS_FLAG (bool, fast_eom)
- IMPLEMENT_STATUS_FLAG (bool, auto_lock)
- IMPLEMENT_STATUS_FLAG (bool, sysv)
- IMPLEMENT_STATUS_FLAG (bool, nowait)
-
- PTAPE_GET_DRIVE_PARAMETERS dp () { return &_dp; }
- PTAPE_GET_MEDIA_PARAMETERS mp () { return &_mp; }
- mtinfo_part *part (int num) { return &_part[num]; }
-};
-
-class mtinfo
-{
- mtinfo_drive _drive[MAX_DRIVE_NUM];
-
-public:
- void initialize ();
- mtinfo_drive *drive (int num) { return &_drive[num]; }
-};
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
deleted file mode 100644
index 39f025a..0000000
--- a/winsup/cygwin/net.cc
+++ /dev/null
@@ -1,4105 +0,0 @@
-/* net.cc: network-related routines.
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007 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 DEBUG_NEST_ON 1 */
-
-#define __INSIDE_CYGWIN_NET__
-
-#include "winsup.h"
-#include "miscfuncs.h"
-#include <ctype.h>
-#include <wchar.h>
-
-#include <stdlib.h>
-#define gethostname cygwin_gethostname
-#include <unistd.h>
-#undef gethostname
-#include <netdb.h>
-#define USE_SYS_TYPES_FD_SET
-#include <winsock2.h>
-#include <iphlpapi.h>
-#include <assert.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "cygwin/version.h"
-#include "shared_info.h"
-#include "perprocess.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "sigproc.h"
-#include "registry.h"
-#include "cygtls.h"
-#include "cygwin/in6.h"
-#include "ifaddrs.h"
-#include "tls_pbuf.h"
-
-extern "C"
-{
- int h_errno;
-
- int __stdcall rcmd (char **ahost, unsigned short inport, char *locuser,
- char *remuser, char *cmd, SOCKET * fd2p);
- int sscanf (const char *, const char *, ...);
- int cygwin_inet_aton(const char *, struct in_addr *);
- const char *cygwin_inet_ntop (int, const void *, char *, socklen_t);
-} /* End of "C" section */
-
-const struct in6_addr in6addr_any = {{IN6ADDR_ANY_INIT}};
-const struct in6_addr in6addr_loopback = {{IN6ADDR_LOOPBACK_INIT}};
-
-static fhandler_socket *
-get (const int fd)
-{
- cygheap_fdget cfd (fd);
-
- if (cfd < 0)
- return 0;
-
- fhandler_socket *const fh = cfd->is_socket ();
-
- if (!fh)
- set_errno (ENOTSOCK);
-
- return fh;
-}
-
-/* htonl: standards? */
-extern "C" unsigned long int
-htonl (unsigned long int x)
-{
- return ((((x & 0x000000ffU) << 24) |
- ((x & 0x0000ff00U) << 8) |
- ((x & 0x00ff0000U) >> 8) |
- ((x & 0xff000000U) >> 24)));
-}
-
-/* ntohl: standards? */
-extern "C" unsigned long int
-ntohl (unsigned long int x)
-{
- return htonl (x);
-}
-
-/* htons: standards? */
-extern "C" unsigned short
-htons (unsigned short x)
-{
- return ((((x & 0x000000ffU) << 8) |
- ((x & 0x0000ff00U) >> 8)));
-}
-
-/* ntohs: standards? */
-extern "C" unsigned short
-ntohs (unsigned short x)
-{
- return htons (x);
-}
-
-/* exported as inet_ntoa: BSD 4.3 */
-extern "C" char *
-cygwin_inet_ntoa (struct in_addr in)
-{
- char buf[20];
- const char *res = cygwin_inet_ntop (AF_INET, &in, buf, sizeof buf);
-
- if (_my_tls.locals.ntoa_buf)
- {
- free (_my_tls.locals.ntoa_buf);
- _my_tls.locals.ntoa_buf = NULL;
- }
- if (res)
- _my_tls.locals.ntoa_buf = strdup (res);
- return _my_tls.locals.ntoa_buf;
-}
-
-/* inet_netof is in the standard BSD sockets library. It is useless
- for modern networks, since it assumes network values which are no
- longer meaningful, but some existing code calls it. */
-
-extern "C" unsigned long
-inet_netof (struct in_addr in)
-{
- unsigned long i, res;
-
- i = ntohl (in.s_addr);
- if (IN_CLASSA (i))
- res = (i & IN_CLASSA_NET) >> IN_CLASSA_NSHIFT;
- else if (IN_CLASSB (i))
- res = (i & IN_CLASSB_NET) >> IN_CLASSB_NSHIFT;
- else
- res = (i & IN_CLASSC_NET) >> IN_CLASSC_NSHIFT;
-
-
- return res;
-}
-
-/* inet_makeaddr is in the standard BSD sockets library. It is
- useless for modern networks, since it assumes network values which
- are no longer meaningful, but some existing code calls it. */
-
-extern "C" struct in_addr
-inet_makeaddr (int net, int lna)
-{
- unsigned long i;
- struct in_addr in;
-
- if (net < IN_CLASSA_MAX)
- i = (net << IN_CLASSA_NSHIFT) | (lna & IN_CLASSA_HOST);
- else if (net < IN_CLASSB_MAX)
- i = (net << IN_CLASSB_NSHIFT) | (lna & IN_CLASSB_HOST);
- else if (net < 0x1000000)
- i = (net << IN_CLASSC_NSHIFT) | (lna & IN_CLASSC_HOST);
- else
- i = net | lna;
-
- in.s_addr = htonl (i);
-
-
- return in;
-}
-
-struct tl
-{
- int w;
- const char *s;
- int e;
-};
-
-static NO_COPY struct tl errmap[] = {
- {WSAEINTR, "WSAEINTR", EINTR},
- {WSAEWOULDBLOCK, "WSAEWOULDBLOCK", EWOULDBLOCK},
- {WSAEINPROGRESS, "WSAEINPROGRESS", EINPROGRESS},
- {WSAEALREADY, "WSAEALREADY", EALREADY},
- {WSAENOTSOCK, "WSAENOTSOCK", ENOTSOCK},
- {WSAEDESTADDRREQ, "WSAEDESTADDRREQ", EDESTADDRREQ},
- {WSAEMSGSIZE, "WSAEMSGSIZE", EMSGSIZE},
- {WSAEPROTOTYPE, "WSAEPROTOTYPE", EPROTOTYPE},
- {WSAENOPROTOOPT, "WSAENOPROTOOPT", ENOPROTOOPT},
- {WSAEPROTONOSUPPORT, "WSAEPROTONOSUPPORT", EPROTONOSUPPORT},
- {WSAESOCKTNOSUPPORT, "WSAESOCKTNOSUPPORT", ESOCKTNOSUPPORT},
- {WSAEOPNOTSUPP, "WSAEOPNOTSUPP", EOPNOTSUPP},
- {WSAEPFNOSUPPORT, "WSAEPFNOSUPPORT", EPFNOSUPPORT},
- {WSAEAFNOSUPPORT, "WSAEAFNOSUPPORT", EAFNOSUPPORT},
- {WSAEADDRINUSE, "WSAEADDRINUSE", EADDRINUSE},
- {WSAEADDRNOTAVAIL, "WSAEADDRNOTAVAIL", EADDRNOTAVAIL},
- {WSAENETDOWN, "WSAENETDOWN", ENETDOWN},
- {WSAENETUNREACH, "WSAENETUNREACH", ENETUNREACH},
- {WSAENETRESET, "WSAENETRESET", ENETRESET},
- {WSAECONNABORTED, "WSAECONNABORTED", ECONNABORTED},
- {WSAECONNRESET, "WSAECONNRESET", ECONNRESET},
- {WSAENOBUFS, "WSAENOBUFS", ENOBUFS},
- {WSAEISCONN, "WSAEISCONN", EISCONN},
- {WSAENOTCONN, "WSAENOTCONN", ENOTCONN},
- {WSAESHUTDOWN, "WSAESHUTDOWN", ESHUTDOWN},
- {WSAETOOMANYREFS, "WSAETOOMANYREFS", ETOOMANYREFS},
- {WSAETIMEDOUT, "WSAETIMEDOUT", ETIMEDOUT},
- {WSAECONNREFUSED, "WSAECONNREFUSED", ECONNREFUSED},
- {WSAELOOP, "WSAELOOP", ELOOP},
- {WSAENAMETOOLONG, "WSAENAMETOOLONG", ENAMETOOLONG},
- {WSAEHOSTDOWN, "WSAEHOSTDOWN", EHOSTDOWN},
- {WSAEHOSTUNREACH, "WSAEHOSTUNREACH", EHOSTUNREACH},
- {WSAENOTEMPTY, "WSAENOTEMPTY", ENOTEMPTY},
- {WSAEPROCLIM, "WSAEPROCLIM", EPROCLIM},
- {WSAEUSERS, "WSAEUSERS", EUSERS},
- {WSAEDQUOT, "WSAEDQUOT", EDQUOT},
- {WSAESTALE, "WSAESTALE", ESTALE},
- {WSAEREMOTE, "WSAEREMOTE", EREMOTE},
- {WSAEINVAL, "WSAEINVAL", EINVAL},
- {WSAEFAULT, "WSAEFAULT", EFAULT},
- {0, "NOERROR", 0},
- {0, NULL, 0}
-};
-
-static int
-find_winsock_errno (int why)
-{
- for (int i = 0; errmap[i].s != NULL; ++i)
- if (why == errmap[i].w)
- return errmap[i].e;
-
- return EPERM;
-}
-
-void
-__set_winsock_errno (const char *fn, int ln)
-{
- DWORD werr = WSAGetLastError ();
- int err = find_winsock_errno (werr);
-
- set_errno (err);
- syscall_printf ("%s:%d - winsock error %d -> errno %d", fn, ln, werr, err);
-}
-
-/*
- * Since the member `s' isn't used for debug output we can use it
- * for the error text returned by herror and hstrerror.
- */
-static NO_COPY struct tl host_errmap[] = {
- {WSAHOST_NOT_FOUND, "Unknown host", HOST_NOT_FOUND},
- {WSATRY_AGAIN, "Host name lookup failure", TRY_AGAIN},
- {WSANO_RECOVERY, "Unknown server error", NO_RECOVERY},
- {WSANO_DATA, "No address associated with name", NO_DATA},
- {0, NULL, 0}
-};
-
-static void
-set_host_errno ()
-{
- int i;
-
- int why = WSAGetLastError ();
-
- for (i = 0; host_errmap[i].w != 0; ++i)
- if (why == host_errmap[i].w)
- break;
-
- if (host_errmap[i].w != 0)
- h_errno = host_errmap[i].e;
- else
- h_errno = NETDB_INTERNAL;
-}
-
-inline int
-DWORD_round (int n)
-{
- return sizeof (DWORD) * (((n + sizeof (DWORD) - 1)) / sizeof (DWORD));
-}
-
-inline int
-strlen_round (const char *s)
-{
- if (!s)
- return 0;
- return DWORD_round (strlen (s) + 1);
-}
-
-#pragma pack(push,2)
-struct pservent
-{
- char *s_name;
- char **s_aliases;
- short s_port;
- char *s_proto;
-};
-#pragma pack(pop)
-
-static const char *entnames[] = {"host", "proto", "serv"};
-
-/* Generic "dup a {host,proto,serv}ent structure" function.
- This is complicated because we need to be able to free the
- structure at any point and we can't rely on the pointer contents
- being untouched by callers. So, we allocate a chunk of memory
- large enough to hold the structure and all of the stuff it points
- to then we copy the source into this new block of memory.
- The 'unionent' struct is a union of all of the currently used
- *ent structure. */
-
-#ifdef DEBUGGING
-static void *
-#else
-static inline void *
-#endif
-dup_ent (unionent *&dst, unionent *src, unionent::struct_type type)
-{
- if (dst)
- debug_printf ("old %sent structure \"%s\" %p\n", entnames[type],
- dst->name, dst);
-
- if (!src)
- {
- set_winsock_errno ();
- return NULL;
- }
-
- debug_printf ("duping %sent \"%s\", %p", entnames[type], src->name, src);
-
- /* Find the size of the raw structure minus any character strings, etc. */
- int sz, struct_sz;
- switch (type)
- {
- case unionent::t_protoent:
- struct_sz = sizeof (protoent);
- break;
- case unionent::t_servent:
- struct_sz = sizeof (servent);
- break;
- case unionent::t_hostent:
- struct_sz = sizeof (hostent);
- break;
- default:
- api_fatal ("called with invalid value %d", type);
- break;
- }
-
- /* Every *ent begins with a name. Calculate it's length. */
- int namelen = strlen_round (src->name);
- sz = struct_sz + namelen;
-
- char **av;
- /* The next field in every *ent is an argv list of "something".
- Calculate the number of components and how much space the
- character strings will take. */
- int list_len = 0;
- for (av = src->list; av && *av; av++)
- {
- list_len++;
- sz += sizeof (char **) + strlen_round (*av);
- }
-
- /* NULL terminate if there actually was a list */
- if (av)
- {
- sz += sizeof (char **);
- list_len++;
- }
-
- /* Do servent/hostent specific processing */
- int protolen = 0;
- int addr_list_len = 0;
- if (type == unionent::t_servent)
- {
- if (src->s_proto)
- sz += (protolen = strlen_round (src->s_proto));
- }
- else if (type == unionent::t_hostent)
- {
- /* Calculate the length and storage used for h_addr_list */
- for (av = src->h_addr_list; av && *av; av++)
- {
- addr_list_len++;
- sz += sizeof (char **) + DWORD_round (src->h_len);
- }
- if (av)
- {
- sz += sizeof (char **);
- addr_list_len++;
- }
- }
-
- /* Allocate the storage needed. Allocate a rounded size to attempt to force
- reuse of this buffer so that a poorly-written caller will not be using
- a freed buffer. */
- unsigned rsz = 256 * ((sz + 255) / 256);
- dst = (unionent *) realloc (dst, rsz);
-
- if (dst)
- {
- memset (dst, 0, sz);
- /* This field is common to all *ent structures but named differently
- in each, of course. */
- dst->port_proto_addrtype = src->port_proto_addrtype;
-
- char *dp = ((char *) dst) + struct_sz;
- if (namelen)
- {
- /* Copy the name field to dst, using space just beyond the end of
- the dst structure. */
- strcpy (dst->name = dp, src->name);
- dp += namelen;
- }
-
- /* Copy the 'list' type to dst, using space beyond end of structure
- + storage for name. */
- if (src->list)
- {
- char **dav = dst->list = (char **) dp;
- dp += sizeof (char **) * list_len;
- for (av = src->list; av && *av; av++)
- {
- int len = strlen (*av) + 1;
- memcpy (*dav++ = dp, *av, len);
- dp += DWORD_round (len);
- }
- }
-
- /* Do servent/protoent/hostent specific processing. */
- if (type == unionent::t_protoent)
- debug_printf ("protoent %s %x %x", dst->name, dst->list, dst->port_proto_addrtype);
- else if (type == unionent::t_servent)
- {
- if (src->s_proto)
- {
- strcpy (dst->s_proto = dp, src->s_proto);
- dp += protolen;
- }
- }
- else if (type == unionent::t_hostent)
- {
- /* Transfer h_len and duplicate contents of h_addr_list, using
- memory after 'list' allocation. */
- dst->h_len = src->h_len;
- char **dav = dst->h_addr_list = (char **) dp;
- dp += sizeof (char **) * addr_list_len;
- for (av = src->h_addr_list; av && *av; av++)
- {
- memcpy (*dav++ = dp, *av, src->h_len);
- dp += DWORD_round (src->h_len);
- }
- }
- /* Sanity check that we did our bookkeeping correctly. */
- assert ((dp - (char *) dst) == sz);
- }
- debug_printf ("duped %sent \"%s\", %p", entnames[type], dst ? dst->name : "<null!>", dst);
- return dst;
-}
-
-static inline hostent *
-dup_ent (hostent *src)
-{
- return (hostent *) dup_ent (_my_tls.locals.hostent_buf, (unionent *) src, unionent::t_hostent);
-}
-
-static inline protoent *
-dup_ent (protoent *src)
-{
- return (protoent *) dup_ent (_my_tls.locals.protoent_buf, (unionent *) src, unionent::t_protoent);
-}
-
-static inline servent *
-dup_ent (servent *src)
-{
- return (servent *) dup_ent (_my_tls.locals.servent_buf, (unionent *) src, unionent::t_servent);
-}
-
-/* exported as getprotobyname: standards? */
-extern "C" struct protoent *
-cygwin_getprotobyname (const char *p)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
- return dup_ent (getprotobyname (p));
-}
-
-/* exported as getprotobynumber: standards? */
-extern "C" struct protoent *
-cygwin_getprotobynumber (int number)
-{
- return dup_ent (getprotobynumber (number));
-}
-
-bool
-fdsock (cygheap_fdmanip& fd, const device *dev, SOCKET soc)
-{
- fd = build_fh_dev (*dev);
- if (!fd.isopen ())
- return false;
- fd->set_io_handle ((HANDLE) soc);
- if (!((fhandler_socket *) fd)->init_events ())
- return false;
- fd->set_flags (O_RDWR | O_BINARY);
- fd->uninterruptible_io (true);
- debug_printf ("fd %d, name '%s', soc %p", (int) fd, dev->name, soc);
-#if 0
- /* Same default buffer sizes as on Linux (instead of WinSock default 8K).
-
- NOT. If the SO_RCVBUF size exceeds 65535(*), and if the socket is
- connected to a remote machine, then duplicating the socket on
- fork/exec fails with WinSock error 10022, WSAEINVAL. Given that,
- there's not any good reason to set the buffer sizes at all. So we
- stick with the defaults. However, an explanation for this weird
- behaviour would be nice. I keep this stuff in the code for later
- generations. Archeological programmers might find it useful.
-
- (*) Maximum normal TCP window size. Coincidence? */
-
- int rmem = dev == tcp_dev ? 87380 : 120832;
- int wmem = dev == tcp_dev ? 16384 : 120832;
- if (::setsockopt (soc, SOL_SOCKET, SO_RCVBUF, (char *) &rmem, sizeof (int)))
- debug_printf ("setsockopt(SO_RCVBUF) failed, %lu", WSAGetLastError ());
- if (::setsockopt (soc, SOL_SOCKET, SO_SNDBUF, (char *) &wmem, sizeof (int)))
- debug_printf ("setsockopt(SO_SNDBUF) failed, %lu", WSAGetLastError ());
-#endif
- return true;
-}
-
-/* exported as socket: standards? */
-extern "C" int
-cygwin_socket (int af, int type, int protocol)
-{
- int res = -1;
- SOCKET soc = 0;
-
- debug_printf ("socket (%d, %d, %d)", af, type, protocol);
-
- soc = socket (af == AF_LOCAL ? AF_INET : af, type,
- af == AF_LOCAL ? 0 : protocol);
-
- if (soc == INVALID_SOCKET)
- {
- set_winsock_errno ();
- goto done;
- }
-
- const device *dev;
-
- if (af == AF_LOCAL)
- dev = type == SOCK_STREAM ? stream_dev : dgram_dev;
- else
- dev = type == SOCK_STREAM ? tcp_dev : udp_dev;
-
- {
- cygheap_fdnew fd;
- if (fd < 0 || !fdsock (fd, dev, soc))
- closesocket (soc);
- else
- {
- ((fhandler_socket *) fd)->set_addr_family (af);
- ((fhandler_socket *) fd)->set_socket_type (type);
- res = fd;
- }
- }
-
-done:
- syscall_printf ("%d = socket (%d, %d, %d)", res, af, type, protocol);
- return res;
-}
-
-/* exported as sendto: standards? */
-extern "C" int
-cygwin_sendto (int fd, const void *buf, size_t len, int flags,
- const struct sockaddr *to, socklen_t tolen)
-{
- int res;
- sig_dispatch_pending ();
-
- fhandler_socket *fh = get (fd);
-
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else
- res = fh->sendto (buf, len, flags, to, tolen);
-
- syscall_printf ("%d = sendto (%d, %p, %d, %x, %p, %d)",
- res, fd, buf, len, flags, to, tolen);
-
- return res;
-}
-
-/* exported as recvfrom: standards? */
-extern "C" int
-cygwin_recvfrom (int fd, void *buf, size_t len, int flags,
- struct sockaddr *from, socklen_t *fromlen)
-{
- int res;
- sig_dispatch_pending ();
-
- fhandler_socket *fh = get (fd);
-
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else if ((res = len) != 0)
- res = fh->recvfrom (buf, len, flags, from, fromlen);
-
- syscall_printf ("%d = recvfrom (%d, %p, %d, %x, %p, %p)",
- res, fd, buf, len, flags, from, fromlen);
-
- return res;
-}
-
-static int
-convert_ws1_ip_optname (int optname)
-{
- static int ws2_optname[] =
- {
- 0,
- IP_OPTIONS,
- IP_MULTICAST_IF,
- IP_MULTICAST_TTL,
- IP_MULTICAST_LOOP,
- IP_ADD_MEMBERSHIP,
- IP_DROP_MEMBERSHIP,
- IP_TTL,
- IP_TOS,
- IP_DONTFRAGMENT
- };
- return (optname < 1 || optname > _WS1_IP_DONTFRAGMENT)
- ? optname
- : ws2_optname[optname];
-}
-
-/* exported as setsockopt: standards? */
-extern "C" int
-cygwin_setsockopt (int fd, int level, int optname, const void *optval,
- socklen_t optlen)
-{
- int res;
- fhandler_socket *fh = get (fd);
-
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else
- {
- /* Old applications still use the old Winsock1 IPPROTO_IP values. */
- if (level == IPPROTO_IP && CYGWIN_VERSION_CHECK_FOR_USING_WINSOCK1_VALUES)
- optname = convert_ws1_ip_optname (optname);
-
- /* On systems supporting "enhanced socket security (2K3 and later),
- the default behaviour of socket binding is equivalent to the POSIX
- behaviour with SO_REUSEADDR. Setting SO_REUSEADDR would only result
- in wrong behaviour. See also fhandler_socket::bind(). */
- if (level == SOL_SOCKET && optname == SO_REUSEADDR
- && wincap.has_enhanced_socket_security ())
- res = 0;
- else
- res = setsockopt (fh->get_socket (), level, optname,
- (const char *) optval, optlen);
-
- if (optlen == 4)
- syscall_printf ("setsockopt optval=%x", *(long *) optval);
-
- if (res)
- {
- /* KB 248611:
-
- Windows 2000 and above don't support setting the IP_TOS field
- with setsockopt. Additionally, TOS was always (also under 9x
- and NT) only implemented for UDP and ICMP, never for TCP.
-
- The difference is that beginning with Windows 2000 the
- setsockopt call returns WinSock error 10022, WSAEINVAL when
- trying to set the IP_TOS field, instead of just ignoring the
- call. This is *not* explained in KB 248611, but only in KB
- 258978.
-
- Either case, the official workaround is to add a new registry
- DWORD value HKLM/System/CurrentControlSet/Services/Tcpip/...
- ... Parameters/DisableUserTOSSetting, set to 0, and reboot.
-
- Sidenote: The reasoning for dropping ToS in Win2K is that ToS
- per RFC 1349 is incompatible with DiffServ per RFC 2474/2475.
-
- We just ignore the return value of setting IP_TOS under Windows
- 2000 and above entirely. */
- if (level == IPPROTO_IP && optname == IP_TOS
- && WSAGetLastError () == WSAEINVAL
- && wincap.has_disabled_user_tos_setting ())
- {
- debug_printf ("Faked IP_TOS success");
- res = 0;
- }
- else
- set_winsock_errno ();
- }
- else if (level == SOL_SOCKET && optname == SO_REUSEADDR)
- fh->saw_reuseaddr (*(int *) optval);
- }
-
- syscall_printf ("%d = setsockopt (%d, %d, %x, %p, %d)",
- res, fd, level, optname, optval, optlen);
- return res;
-}
-
-/* exported as getsockopt: standards? */
-extern "C" int
-cygwin_getsockopt (int fd, int level, int optname, void *optval,
- socklen_t *optlen)
-{
- int res;
- fhandler_socket *fh = get (fd);
-
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else if (optname == SO_PEERCRED)
- {
- struct ucred *cred = (struct ucred *) optval;
- res = fh->getpeereid (&cred->pid, &cred->uid, &cred->gid);
- }
- else
- {
- /* Old applications still use the old Winsock1 IPPROTO_IP values. */
- if (level == IPPROTO_IP && CYGWIN_VERSION_CHECK_FOR_USING_WINSOCK1_VALUES)
- optname = convert_ws1_ip_optname (optname);
- res = getsockopt (fh->get_socket (), level, optname, (char *) optval,
- (int *) optlen);
-
- if (optname == SO_ERROR)
- {
- int *e = (int *) optval;
-
- debug_printf ("WinSock SO_ERROR = %d", *e);
- *e = find_winsock_errno (*e);
- }
-
- if (res)
- set_winsock_errno ();
- }
-
- syscall_printf ("%d = getsockopt (%d, %d, 0x%x, %p, %p)",
- res, fd, level, optname, optval, optlen);
- return res;
-}
-
-extern "C" int
-getpeereid (int fd, __uid32_t *euid, __gid32_t *egid)
-{
- sig_dispatch_pending ();
- fhandler_socket *fh = get (fd);
- if (fh)
- return fh->getpeereid (NULL, euid, egid);
- return -1;
-}
-
-/* exported as connect: standards? */
-extern "C" int
-cygwin_connect (int fd, const struct sockaddr *name, socklen_t namelen)
-{
- int res;
- sig_dispatch_pending ();
-
- fhandler_socket *fh = get (fd);
-
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else
- res = fh->connect (name, namelen);
-
- syscall_printf ("%d = connect (%d, %p, %d)", res, fd, name, namelen);
-
- return res;
-}
-
-/* exported as getservbyname: standards? */
-extern "C" struct servent *
-cygwin_getservbyname (const char *name, const char *proto)
-{
- sig_dispatch_pending ();
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
-
- servent *res = dup_ent (getservbyname (name, proto));
- syscall_printf ("%p = getservbyname (%s, %s)", res, name, proto);
- return res;
-}
-
-/* exported as getservbyport: standards? */
-extern "C" struct servent *
-cygwin_getservbyport (int port, const char *proto)
-{
- sig_dispatch_pending ();
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
-
- servent *res = dup_ent (getservbyport (port, proto));
- syscall_printf ("%p = getservbyport (%d, %s)", res, port, proto);
- return res;
-}
-
-extern "C" int
-cygwin_gethostname (char *name, size_t len)
-{
- sig_dispatch_pending ();
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- if (gethostname (name, len))
- {
- DWORD local_len = len;
-
- if (!GetComputerNameA (name, &local_len))
- {
- set_winsock_errno ();
- return -1;
- }
- }
- debug_printf ("name %s", name);
- return 0;
-}
-
-/* exported as gethostbyname: standards? */
-extern "C" struct hostent *
-cygwin_gethostbyname (const char *name)
-{
- sig_dispatch_pending ();
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
-
- unsigned char tmp_addr[4];
- struct hostent tmp, *h;
- char *tmp_aliases[1] = {0};
- char *tmp_addr_list[2] = {0,0};
- unsigned int a, b, c, d;
- char dummy;
-
- if (sscanf (name, "%u.%u.%u.%u%c", &a, &b, &c, &d, &dummy) != 4
- || a >= 256 || b >= 256 || c >= 256 || d >= 256)
- h = gethostbyname (name);
- else
- {
- /* In case you don't have DNS, at least x.x.x.x still works */
- memset (&tmp, 0, sizeof (tmp));
- tmp_addr[0] = a;
- tmp_addr[1] = b;
- tmp_addr[2] = c;
- tmp_addr[3] = d;
- tmp_addr_list[0] = (char *) tmp_addr;
- tmp.h_name = name;
- tmp.h_aliases = tmp_aliases;
- tmp.h_addrtype = 2;
- tmp.h_length = 4;
- tmp.h_addr_list = tmp_addr_list;
- h = &tmp;
- }
-
- hostent *res = dup_ent (h);
- if (res)
- debug_printf ("h_name %s", res->h_name);
- else
- {
- debug_printf ("dup_ent returned NULL for name %s, h %p", name, h);
- set_host_errno ();
- }
- return res;
-}
-
-/* exported as gethostbyaddr: standards? */
-extern "C" struct hostent *
-cygwin_gethostbyaddr (const char *addr, int len, int type)
-{
- sig_dispatch_pending ();
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
-
- hostent *res = dup_ent (gethostbyaddr (addr, len, type));
- if (res)
- debug_printf ("h_name %s", res->h_name);
- else
- set_host_errno ();
- return res;
-}
-
-/* exported as accept: standards? */
-extern "C" int
-cygwin_accept (int fd, struct sockaddr *peer, socklen_t *len)
-{
- int res;
- sig_dispatch_pending ();
-
- fhandler_socket *fh = get (fd);
-
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else
- res = fh->accept (peer, len);
-
- syscall_printf ("%d = accept (%d, %p, %p)", res, fd, peer, len);
- return res;
-}
-
-/* exported as bind: standards? */
-extern "C" int
-cygwin_bind (int fd, const struct sockaddr *my_addr, socklen_t addrlen)
-{
- int res;
- sig_dispatch_pending ();
- fhandler_socket *fh = get (fd);
-
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else
- res = fh->bind (my_addr, addrlen);
-
- syscall_printf ("%d = bind (%d, %p, %d)", res, fd, my_addr, addrlen);
- return res;
-}
-
-/* exported as getsockname: standards? */
-extern "C" int
-cygwin_getsockname (int fd, struct sockaddr *addr, socklen_t *namelen)
-{
- int res;
- sig_dispatch_pending ();
-
- fhandler_socket *fh = get (fd);
-
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else
- res = fh->getsockname (addr, namelen);
-
- syscall_printf ("%d = getsockname (%d, %p, %p)", res, fd, addr, namelen);
- return res;
-}
-
-/* exported as listen: standards? */
-extern "C" int
-cygwin_listen (int fd, int backlog)
-{
- int res;
- sig_dispatch_pending ();
- fhandler_socket *fh = get (fd);
-
- if (!fh)
- res = -1;
- else
- res = fh->listen (backlog);
-
- syscall_printf ("%d = listen (%d, %d)", res, fd, backlog);
- return res;
-}
-
-/* exported as shutdown: standards? */
-extern "C" int
-cygwin_shutdown (int fd, int how)
-{
- int res;
- sig_dispatch_pending ();
-
- fhandler_socket *fh = get (fd);
-
- if (!fh)
- res = -1;
- else
- res = fh->shutdown (how);
-
- syscall_printf ("%d = shutdown (%d, %d)", res, fd, how);
- return res;
-}
-
-/* exported as hstrerror: BSD 4.3 */
-extern "C" const char *
-cygwin_hstrerror (int err)
-{
- int i;
-
- for (i = 0; host_errmap[i].e != 0; ++i)
- if (err == host_errmap[i].e)
- break;
-
- return host_errmap[i].s;
-}
-
-/* exported as herror: BSD 4.3 */
-extern "C" void
-cygwin_herror (const char *s)
-{
- myfault efault;
- if (efault.faulted ())
- return;
- if (cygheap->fdtab.not_open (2))
- return;
-
- if (s)
- {
- write (2, s, strlen (s));
- write (2, ": ", 2);
- }
-
- const char *h_errstr = cygwin_hstrerror (h_errno);
-
- if (!h_errstr)
- switch (h_errno)
- {
- case NETDB_INTERNAL:
- h_errstr = "Resolver internal error";
- break;
- case NETDB_SUCCESS:
- h_errstr = "Resolver error 0 (no error)";
- break;
- default:
- h_errstr = "Unknown resolver error";
- break;
- }
- write (2, h_errstr, strlen (h_errstr));
- write (2, "\n", 1);
-}
-
-/* exported as getpeername: standards? */
-extern "C" int
-cygwin_getpeername (int fd, struct sockaddr *name, socklen_t *len)
-{
- int res;
- sig_dispatch_pending ();
-
- fhandler_socket *fh = get (fd);
-
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else
- res = fh->getpeername (name, len);
-
- syscall_printf ("%d = getpeername (%d) %d", res, fd, (fh ? fh->get_socket () : -1));
- return res;
-}
-
-/* exported as recv: standards? */
-extern "C" int
-cygwin_recv (int fd, void *buf, size_t len, int flags)
-{
- return cygwin_recvfrom (fd, buf, len, flags, NULL, NULL);
-}
-
-/* exported as send: standards? */
-extern "C" int
-cygwin_send (int fd, const void *buf, size_t len, int flags)
-{
- return cygwin_sendto (fd, buf, len, flags, NULL, 0);
-}
-
-/* getdomainname: standards? */
-extern "C" int
-getdomainname (char *domain, size_t len)
-{
- sig_dispatch_pending ();
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- PFIXED_INFO info = NULL;
- ULONG size = 0;
-
- if (GetNetworkParams(info, &size) == ERROR_BUFFER_OVERFLOW
- && (info = (PFIXED_INFO) alloca(size))
- && GetNetworkParams(info, &size) == ERROR_SUCCESS)
- {
- strncpy(domain, info->DomainName, len);
- return 0;
- }
-
- /* This is only used by NT4.
- The registry names are language independent. */
- reg_key r (HKEY_LOCAL_MACHINE, KEY_READ,
- "SYSTEM", "CurrentControlSet", "Services",
- "Tcpip", "Parameters", NULL);
-
- if (!r.error ())
- {
- int res1, res2 = 0; /* Suppress compiler warning */
- res1 = r.get_string ("Domain", domain, len, "");
- if (res1 != ERROR_SUCCESS || !domain[0])
- res2 = r.get_string ("DhcpDomain", domain, len, "");
- if (res1 == ERROR_SUCCESS || res2 == ERROR_SUCCESS)
- return 0;
- }
- __seterrno ();
- return -1;
-}
-
-/* Fill out an ifconf struct. */
-
-/* Vista/Longhorn: unicast address has additional OnLinkPrefixLength member. */
-typedef struct _IP_ADAPTER_UNICAST_ADDRESS_LH {
- _ANONYMOUS_UNION union {
- ULONGLONG Alignment;
- _ANONYMOUS_UNION struct {
- ULONG Length;
- DWORD Flags;
- } DUMMYSTRUCTNAME;
- } DUMMYUNIONNAME;
- struct _IP_ADAPTER_UNICAST_ADDRESS_VISTA *Next;
- SOCKET_ADDRESS Address;
- IP_PREFIX_ORIGIN PrefixOrigin;
- IP_SUFFIX_ORIGIN SuffixOrigin;
- IP_DAD_STATE DadState;
- ULONG ValidLifetime;
- ULONG PreferredLifetime;
- ULONG LeaseLifetime;
- unsigned char OnLinkPrefixLength;
-} IP_ADAPTER_UNICAST_ADDRESS_LH, *PIP_ADAPTER_UNICAST_ADDRESS_LH;
-
-/* Vista/Longhorn: IP_ADAPTER_ADDRESSES has a lot more info. We pick only
- what we need for now. */
-typedef struct _IP_ADAPTER_ADDRESSES_LH {
- _ANONYMOUS_UNION union {
- ULONGLONG Alignment;
- _ANONYMOUS_STRUCT struct {
- ULONG Length;
- DWORD IfIndex;
- } DUMMYSTRUCTNAME;
- } DUMMYUNIONNAME;
- struct _IP_ADAPTER_ADDRESSES* Next;
- PCHAR AdapterName;
- PIP_ADAPTER_UNICAST_ADDRESS FirstUnicastAddress;
- PIP_ADAPTER_ANYCAST_ADDRESS FirstAnycastAddress;
- PIP_ADAPTER_MULTICAST_ADDRESS FirstMulticastAddress;
- PIP_ADAPTER_DNS_SERVER_ADDRESS FirstDnsServerAddress;
- PWCHAR DnsSuffix;
- PWCHAR Description;
- PWCHAR FriendlyName;
- BYTE PhysicalAddress[MAX_ADAPTER_ADDRESS_LENGTH];
- DWORD PhysicalAddressLength;
- DWORD Flags;
- DWORD Mtu;
- DWORD IfType;
- IF_OPER_STATUS OperStatus;
- DWORD Ipv6IfIndex;
- DWORD ZoneIndices[16];
- PIP_ADAPTER_PREFIX FirstPrefix;
-
- ULONG64 TransmitLinkSpeed;
- ULONG64 ReceiveLinkSpeed;
- PVOID FirstWinsServerAddress;
- PVOID FirstGatewayAddress;
- ULONG Ipv4Metric;
- ULONG Ipv6Metric;
-} IP_ADAPTER_ADDRESSES_LH,*PIP_ADAPTER_ADDRESSES_LH;
-
-/* We can't include ws2tcpip.h. */
-
-#define SIO_GET_INTERFACE_LIST _IOR('t', 127, u_long)
-
-struct sockaddr_in6_old {
- short sin6_family;
- u_short sin6_port;
- u_long sin6_flowinfo;
- struct in6_addr sin6_addr;
-};
-
-typedef union sockaddr_gen{
- struct sockaddr Address;
- struct sockaddr_in AddressIn;
- struct sockaddr_in6_old AddressIn6;
-} sockaddr_gen;
-
-typedef struct _INTERFACE_INFO {
- u_long iiFlags;
- sockaddr_gen iiAddress;
- sockaddr_gen iiBroadcastAddress;
- sockaddr_gen iiNetmask;
-} INTERFACE_INFO, *LPINTERFACE_INFO;
-
-#ifndef IN_LOOPBACK
-#define IN_LOOPBACK(a) ((((long int) (a)) & 0xff000000) == 0x7f000000)
-#endif
-
-static int in6_are_prefix_equal (struct in6_addr *, struct in6_addr *, int);
-
-static int in_are_prefix_equal (struct in_addr *p1, struct in_addr *p2, int len)
-{
- if (0 > len || len > 32)
- return 0;
- uint32_t pfxmask = 0xffffffff << (32 - len);
- return (ntohl (p1->s_addr) & pfxmask) == (ntohl (p2->s_addr) & pfxmask);
-}
-
-extern "C" int
-ip_addr_prefix (PIP_ADAPTER_UNICAST_ADDRESS pua, PIP_ADAPTER_PREFIX pap)
-{
- if (wincap.has_gaa_on_link_prefix ())
- return (int) ((PIP_ADAPTER_UNICAST_ADDRESS_LH) pua)->OnLinkPrefixLength;
- switch (pua->Address.lpSockaddr->sa_family)
- {
- case AF_INET:
- /* Prior to Vista, the loopback prefix is not available. */
- if (IN_LOOPBACK (ntohl (((struct sockaddr_in *)
- pua->Address.lpSockaddr)->sin_addr.s_addr)))
- return 8;
- for ( ; pap; pap = pap->Next)
- if (in_are_prefix_equal (
- &((struct sockaddr_in *) pua->Address.lpSockaddr)->sin_addr,
- &((struct sockaddr_in *) pap->Address.lpSockaddr)->sin_addr,
- pap->PrefixLength))
- return pap->PrefixLength;
- break;
- case AF_INET6:
- /* Prior to Vista, the loopback prefix is not available. */
- if (IN6_IS_ADDR_LOOPBACK (&((struct sockaddr_in6 *)
- pua->Address.lpSockaddr)->sin6_addr))
- return 128;
- for ( ; pap; pap = pap->Next)
- if (in6_are_prefix_equal (
- &((struct sockaddr_in6 *) pua->Address.lpSockaddr)->sin6_addr,
- &((struct sockaddr_in6 *) pap->Address.lpSockaddr)->sin6_addr,
- pap->PrefixLength))
- return pap->PrefixLength;
- break;
- default:
- break;
- }
- return 0;
-}
-
-#ifndef GAA_FLAG_INCLUDE_ALL_INTERFACES
-#define GAA_FLAG_INCLUDE_ALL_INTERFACES 0x0100
-#endif
-
-bool
-get_adapters_addresses (PIP_ADAPTER_ADDRESSES *pa_ret, ULONG family)
-{
- DWORD ret, size = 0;
- PIP_ADAPTER_ADDRESSES pa0 = NULL;
-
- if (!pa_ret)
- return ERROR_BUFFER_OVERFLOW
- == GetAdaptersAddresses (family, GAA_FLAG_INCLUDE_PREFIX
- | GAA_FLAG_INCLUDE_ALL_INTERFACES,
- NULL, NULL, &size);
- do
- {
- ret = GetAdaptersAddresses (family, GAA_FLAG_INCLUDE_PREFIX
- | GAA_FLAG_INCLUDE_ALL_INTERFACES,
- NULL, pa0, &size);
- if (ret == ERROR_BUFFER_OVERFLOW
- && !(pa0 = (PIP_ADAPTER_ADDRESSES) realloc (pa0, size)))
- break;
- }
- while (ret == ERROR_BUFFER_OVERFLOW);
- if (ret != ERROR_SUCCESS)
- {
- if (pa0)
- free (pa0);
- *pa_ret = NULL;
- return false;
- }
- *pa_ret = pa0;
- return true;
-}
-
-#define WS_IFF_UP 1
-#define WS_IFF_BROADCAST 2
-#define WS_IFF_LOOPBACK 4
-#define WS_IFF_POINTTOPOINT 8
-#define WS_IFF_MULTICAST 16
-
-static inline short
-convert_ifr_flags (u_long ws_flags)
-{
- return (ws_flags & (WS_IFF_UP | WS_IFF_BROADCAST))
- | ((ws_flags & (WS_IFF_LOOPBACK | WS_IFF_POINTTOPOINT)) << 1)
- | ((ws_flags & WS_IFF_MULTICAST) << 8);
-}
-
-static u_long
-get_routedst (DWORD if_index)
-{
- PMIB_IPFORWARDTABLE pift;
- ULONG size = 0;
- if (GetIpForwardTable (NULL, &size, FALSE) == ERROR_INSUFFICIENT_BUFFER
- && (pift = (PMIB_IPFORWARDTABLE) alloca (size))
- && GetIpForwardTable (pift, &size, FALSE) == NO_ERROR)
- for (DWORD i = 0; i < pift->dwNumEntries; ++i)
- {
- if (pift->table[i].dwForwardIfIndex == if_index
- && pift->table[i].dwForwardMask == INADDR_BROADCAST)
- return pift->table[i].dwForwardDest;
- }
- return INADDR_ANY;
-}
-
-struct ifall {
- struct ifaddrs ifa_ifa;
- char ifa_name[IFNAMSIZ];
- struct sockaddr_storage ifa_addr;
- struct sockaddr_storage ifa_brddstaddr;
- struct sockaddr_storage ifa_netmask;
- struct sockaddr ifa_hwaddr;
- int ifa_metric;
- int ifa_mtu;
- int ifa_ifindex;
- struct ifreq_frndlyname ifa_frndlyname;
-};
-
-/*
- * Get network interfaces XP SP1 and above.
- * Use IP Helper function GetAdaptersAddresses.
- */
-static struct ifall *
-get_xp_ifs (ULONG family)
-{
- PIP_ADAPTER_ADDRESSES pa0 = NULL, pap;
- PIP_ADAPTER_UNICAST_ADDRESS pua;
- int cnt = 0;
- struct ifall *ifret = NULL, *ifp;
- struct sockaddr_in *if_sin;
- struct sockaddr_in6 *if_sin6;
-
- if (!get_adapters_addresses (&pa0, family))
- goto done;
-
- for (pap = pa0; pap; pap = pap->Next)
- for (pua = pap->FirstUnicastAddress; pua; pua = pua->Next)
- ++cnt;
-
- if (!(ifret = (struct ifall *) calloc (cnt, sizeof (struct ifall))))
- goto done;
- ifp = ifret;
-
- for (pap = pa0; pap; pap = pap->Next)
- {
- int idx = 0;
- for (pua = pap->FirstUnicastAddress; pua; pua = pua->Next)
- {
- struct sockaddr *sa = (struct sockaddr *) pua->Address.lpSockaddr;
-# define sin ((struct sockaddr_in *) sa)
-# define sin6 ((struct sockaddr_in6 *) sa)
- size_t sa_size = (sa->sa_family == AF_INET6
- ? sizeof *sin6 : sizeof *sin);
- /* Next in chain */
- ifp->ifa_ifa.ifa_next = (struct ifaddrs *) &ifp[1].ifa_ifa;
- /* Interface name */
- if (!idx)
- strcpy (ifp->ifa_name, pap->AdapterName);
- else
- __small_sprintf (ifp->ifa_name, "%s:%u", pap->AdapterName, idx);
- ifp->ifa_ifa.ifa_name = ifp->ifa_name;
- ++idx;
- /* Flags */
- ifp->ifa_ifa.ifa_flags = IFF_UP;
- if (pap->IfType == IF_TYPE_SOFTWARE_LOOPBACK)
- ifp->ifa_ifa.ifa_flags |= IFF_LOOPBACK;
- else if (pap->IfType == IF_TYPE_PPP)
- ifp->ifa_ifa.ifa_flags |= IFF_POINTOPOINT;
- else if (sa->sa_family == AF_INET)
- ifp->ifa_ifa.ifa_flags |= IFF_BROADCAST;
- if (!(pap->Flags & IP_ADAPTER_NO_MULTICAST))
- ifp->ifa_ifa.ifa_flags |= IFF_MULTICAST;
- if (pap->OperStatus == IfOperStatusUp
- || pap->OperStatus == IfOperStatusUnknown)
- ifp->ifa_ifa.ifa_flags |= IFF_RUNNING;
- if (pap->OperStatus != IfOperStatusLowerLayerDown)
- ifp->ifa_ifa.ifa_flags |= IFF_LOWER_UP;
- if (pap->OperStatus == IfOperStatusDormant)
- ifp->ifa_ifa.ifa_flags |= IFF_DORMANT;
- if (sa->sa_family == AF_INET)
- {
- ULONG hwaddr[2], hwlen = 6;
- if (SendARP (sin->sin_addr.s_addr, 0, hwaddr, &hwlen))
- ifp->ifa_ifa.ifa_flags |= IFF_NOARP;
- }
- /* Address */
- memcpy (&ifp->ifa_addr, sa, sa_size);
- ifp->ifa_ifa.ifa_addr = (struct sockaddr *) &ifp->ifa_addr;
- /* Netmask */
- int prefix = ip_addr_prefix (pua, pap->FirstPrefix);
- switch (sa->sa_family)
- {
- case AF_INET:
- if_sin = (struct sockaddr_in *) &ifp->ifa_netmask;
- if_sin->sin_addr.s_addr = htonl (UINT32_MAX << (32 - prefix));
- if_sin->sin_family = AF_INET;
- break;
- case AF_INET6:
- if_sin6 = (struct sockaddr_in6 *) &ifp->ifa_netmask;
- for (cnt = 0; cnt < 4 && prefix; ++cnt, prefix -= 32)
- if_sin6->sin6_addr.s6_addr32[cnt] = UINT32_MAX;
- if (prefix < 32)
- if_sin6->sin6_addr.s6_addr32[cnt] <<= 32 - prefix;
- break;
- }
- ifp->ifa_ifa.ifa_netmask = (struct sockaddr *) &ifp->ifa_netmask;
- if (pap->IfType == IF_TYPE_PPP)
- {
- /* Destination address */
- if (sa->sa_family == AF_INET)
- {
- if_sin = (struct sockaddr_in *) &ifp->ifa_brddstaddr;
- if_sin->sin_addr.s_addr = get_routedst (pap->IfIndex);
- if_sin->sin_family = AF_INET;
- }
- else
- /* FIXME: No official way to get the dstaddr for ipv6? */
- memcpy (&ifp->ifa_addr, sa, sa_size);
- ifp->ifa_ifa.ifa_dstaddr = (struct sockaddr *)
- &ifp->ifa_brddstaddr;
- }
- else
- {
- /* Broadcast address */
- if (sa->sa_family == AF_INET)
- {
- if_sin = (struct sockaddr_in *) &ifp->ifa_brddstaddr;
- uint32_t mask =
- ((struct sockaddr_in *) &ifp->ifa_netmask)->sin_addr.s_addr;
- if_sin->sin_addr.s_addr = (sin->sin_addr.s_addr & mask) | ~mask;
- if_sin->sin_family = AF_INET;
- ifp->ifa_ifa.ifa_broadaddr = (struct sockaddr *)
- &ifp->ifa_brddstaddr;
- }
- else /* No IPv6 broadcast */
- ifp->ifa_ifa.ifa_broadaddr = NULL;
- }
- /* Hardware address */
- for (UINT i = 0; i < IFHWADDRLEN; ++i)
- if (i >= pap->PhysicalAddressLength)
- ifp->ifa_hwaddr.sa_data[i] = '\0';
- else
- ifp->ifa_hwaddr.sa_data[i] = pap->PhysicalAddress[i];
- /* Metric */
- if (wincap.has_gaa_on_link_prefix ())
- ifp->ifa_metric = (sa->sa_family == AF_INET
- ? ((PIP_ADAPTER_ADDRESSES_LH) pap)->Ipv4Metric
- : ((PIP_ADAPTER_ADDRESSES_LH) pap)->Ipv6Metric);
- else
- ifp->ifa_metric = 1;
- /* MTU */
- ifp->ifa_mtu = pap->Mtu;
- /* Interface index */
- ifp->ifa_ifindex = pap->IfIndex;
- /* Friendly name */
- struct ifreq_frndlyname *iff = (struct ifreq_frndlyname *)
- &ifp->ifa_frndlyname;
- iff->ifrf_len = sys_wcstombs (iff->ifrf_friendlyname,
- IFRF_FRIENDLYNAMESIZ,
- pap->FriendlyName);
- ++ifp;
-# undef sin
-# undef sin6
- }
- }
- /* Since every entry is set to the next entry, the last entry points to an
- invalid next entry now. Fix it retroactively. */
- if (ifp > ifret)
- ifp[-1].ifa_ifa.ifa_next = NULL;
-
-done:
- if (pa0)
- free (pa0);
- return ifret;
-}
-
-/*
- * Get network interfaces NTSP4, W2K, XP w/o service packs.
- * Use IP Helper Library
- */
-static struct ifall *
-get_2k_ifs ()
-{
- int ethId = 0, pppId = 0, slpId = 0, tokId = 0;
-
- DWORD ip_cnt;
- DWORD siz_ip_table = 0;
- PMIB_IPADDRTABLE ipt;
- PMIB_IFROW ifrow;
- struct ifall *ifret = NULL, *ifp = NULL;
- struct sockaddr_in *if_sin;
-
- struct ifcount_t
- {
- DWORD ifIndex;
- size_t count;
- unsigned int enumerated; // for eth0:1
- unsigned int classId; // for eth0, tok0 ...
-
- };
- ifcount_t *iflist, *ifEntry;
-
- if (GetIpAddrTable (NULL, &siz_ip_table, TRUE) == ERROR_INSUFFICIENT_BUFFER
- && (ifrow = (PMIB_IFROW) alloca (sizeof (MIB_IFROW)))
- && (ipt = (PMIB_IPADDRTABLE) alloca (siz_ip_table))
- && !GetIpAddrTable (ipt, &siz_ip_table, TRUE))
- {
- if (!(ifret = (struct ifall *) calloc (ipt->dwNumEntries, sizeof (struct ifall))))
- goto done;
- ifp = ifret;
-
- iflist =
- (ifcount_t *) alloca (sizeof (ifcount_t) * (ipt->dwNumEntries + 1));
- memset (iflist, 0, sizeof (ifcount_t) * (ipt->dwNumEntries + 1));
- for (ip_cnt = 0; ip_cnt < ipt->dwNumEntries; ++ip_cnt)
- {
- ifEntry = iflist;
- /* search for matching entry (and stop at first free entry) */
- while (ifEntry->count != 0)
- {
- if (ifEntry->ifIndex == ipt->table[ip_cnt].dwIndex)
- break;
- ifEntry++;
- }
- if (ifEntry->count == 0)
- {
- ifEntry->count = 1;
- ifEntry->ifIndex = ipt->table[ip_cnt].dwIndex;
- }
- else
- {
- ifEntry->count++;
- }
- }
- /* reset the last element. This is just the stopper for the loop. */
- iflist[ipt->dwNumEntries].count = 0;
-
- /* Iterate over all configured IP-addresses */
- for (ip_cnt = 0; ip_cnt < ipt->dwNumEntries; ++ip_cnt)
- {
- memset (ifrow, 0, sizeof (MIB_IFROW));
- ifrow->dwIndex = ipt->table[ip_cnt].dwIndex;
- if (GetIfEntry (ifrow) != NO_ERROR)
- continue;
-
- ifcount_t *ifEntry = iflist;
-
- /* search for matching entry (and stop at first free entry) */
- while (ifEntry->count != 0)
- {
- if (ifEntry->ifIndex == ipt->table[ip_cnt].dwIndex)
- break;
- ifEntry++;
- }
-
- /* Next in chain */
- ifp->ifa_ifa.ifa_next = (struct ifaddrs *) &ifp[1].ifa_ifa;
- /* Interface name */
- if (ifrow->dwType == IF_TYPE_SOFTWARE_LOOPBACK)
- strcpy (ifp->ifa_name, "lo");
- else
- {
- const char *name = "";
- switch (ifrow->dwType)
- {
- case IF_TYPE_ISO88025_TOKENRING:
- name = "tok";
- if (ifEntry->enumerated == 0)
- ifEntry->classId = tokId++;
- break;
- case IF_TYPE_ETHERNET_CSMACD:
- name = "eth";
- if (ifEntry->enumerated == 0)
- ifEntry->classId = ethId++;
- break;
- case IF_TYPE_PPP:
- name = "ppp";
- if (ifEntry->enumerated == 0)
- ifEntry->classId = pppId++;
- break;
- case IF_TYPE_SLIP:
- name = "slp";
- if (ifEntry->enumerated == 0)
- ifEntry->classId = slpId++;
- break;
- default:
- continue;
- }
- __small_sprintf (ifp->ifa_name,
- ifEntry->enumerated ? "%s%u:%u" : "%s%u",
- name, ifEntry->classId, ifEntry->enumerated);
- ifEntry->enumerated++;
- }
- ifp->ifa_ifa.ifa_name = ifp->ifa_name;
- /* Flags */
- if (ifrow->dwType == IF_TYPE_SOFTWARE_LOOPBACK)
- ifp->ifa_ifa.ifa_flags |= IFF_LOOPBACK;
- else if (ifrow->dwType == IF_TYPE_PPP
- || ifrow->dwType == IF_TYPE_SLIP)
- ifp->ifa_ifa.ifa_flags |= IFF_POINTOPOINT | IFF_NOARP;
- else
- ifp->ifa_ifa.ifa_flags |= IFF_BROADCAST;
- if (ifrow->dwAdminStatus == IF_ADMIN_STATUS_UP)
- {
- ifp->ifa_ifa.ifa_flags |= IFF_UP | IFF_LOWER_UP;
- /* Bug in NT4's IP Helper lib. The dwOperStatus has just
- two values, 0 or 1, non operational, operational. */
- if (ifrow->dwOperStatus >= (wincap.has_broken_if_oper_status ()
- ? 1 : IF_OPER_STATUS_CONNECTED))
- ifp->ifa_ifa.ifa_flags |= IFF_RUNNING;
- }
- /* Address */
- if_sin = (struct sockaddr_in *) &ifp->ifa_addr;
- if_sin->sin_addr.s_addr = ipt->table[ip_cnt].dwAddr;
- if_sin->sin_family = AF_INET;
- ifp->ifa_ifa.ifa_addr = (struct sockaddr *) &ifp->ifa_addr;
- /* Netmask */
- if_sin = (struct sockaddr_in *) &ifp->ifa_netmask;
- if_sin->sin_addr.s_addr = ipt->table[ip_cnt].dwMask;
- if_sin->sin_family = AF_INET;
- ifp->ifa_ifa.ifa_netmask = (struct sockaddr *) &ifp->ifa_netmask;
- if_sin = (struct sockaddr_in *) &ifp->ifa_brddstaddr;
- if (ifrow->dwType == IF_TYPE_PPP
- || ifrow->dwType == IF_TYPE_SLIP)
- {
- /* Destination address */
- if_sin->sin_addr.s_addr =
- get_routedst (ipt->table[ip_cnt].dwIndex);
- ifp->ifa_ifa.ifa_dstaddr = (struct sockaddr *)
- &ifp->ifa_brddstaddr;
- }
- else
- {
- /* Broadcast address */
-#if 0
- /* Unfortunately, the field returns only crap. */
- if_sin->sin_addr.s_addr = ipt->table[ip_cnt].dwBCastAddr;
-#else
- uint32_t mask = ipt->table[ip_cnt].dwMask;
- if_sin->sin_addr.s_addr = (ipt->table[ip_cnt].dwAddr & mask) | ~mask;
-#endif
- ifp->ifa_ifa.ifa_broadaddr = (struct sockaddr *)
- &ifp->ifa_brddstaddr;
- }
- if_sin->sin_family = AF_INET;
- /* Hardware address */
- for (UINT i = 0; i < IFHWADDRLEN; ++i)
- if (i >= ifrow->dwPhysAddrLen)
- ifp->ifa_hwaddr.sa_data[i] = '\0';
- else
- ifp->ifa_hwaddr.sa_data[i] = ifrow->bPhysAddr[i];
- /* Metric */
- ifp->ifa_metric = 1;
- /* MTU */
- ifp->ifa_mtu = ifrow->dwMtu;
- /* Interface index */
- ifp->ifa_ifindex = ifrow->dwIndex;
- /* Friendly name */
- struct ifreq_frndlyname *iff = (struct ifreq_frndlyname *)
- &ifp->ifa_frndlyname;
- iff->ifrf_len = sys_wcstombs (iff->ifrf_friendlyname,
- IFRF_FRIENDLYNAMESIZ,
- ifrow->wszName);
- ++ifp;
- }
- }
- /* Since every entry is set to the next entry, the last entry points to an
- invalid next entry now. Fix it retroactively. */
- if (ifp > ifret)
- ifp[-1].ifa_ifa.ifa_next = NULL;
-
-done:
- return ifret;
-}
-
-/*
- * Get network interfaces Windows NT < SP4:
- * Look at the Bind value in
- * HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Linkage\
- * This is a REG_MULTI_SZ with strings of the form:
- * \Device\<Netcard>, where netcard is the name of the net device.
- * Then look under:
- * HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<NetCard>\
- * Parameters\Tcpip
- * at the IPAddress, Subnetmask and DefaultGateway values for the
- * required values.
- * Also fake "lo" since there's no representation in the registry.
- */
-static struct ifall *
-get_nt_ifs ()
-{
- HKEY key;
- LONG ret;
- struct ifall *ifret = NULL, *ifp;
- unsigned long lip, lnp;
- struct sockaddr_in *sin = NULL;
- DWORD size;
- int cnt = 0, idx;
- char *binding = NULL;
-
- if ((ret = RegOpenKeyEx (HKEY_LOCAL_MACHINE,
- "SYSTEM\\"
- "CurrentControlSet\\"
- "Services\\"
- "Tcpip\\" "Linkage",
- 0, KEY_READ, &key)) == ERROR_SUCCESS)
- {
- if ((ret = RegQueryValueEx (key, "Bind", NULL, NULL,
- NULL, &size)) == ERROR_SUCCESS)
- {
- binding = (char *) alloca (size);
- if ((ret = RegQueryValueEx (key, "Bind", NULL, NULL,
- (unsigned char *) binding,
- &size)) != ERROR_SUCCESS)
- binding = NULL;
- }
- RegCloseKey (key);
- }
-
- if (!binding)
- {
- __seterrno_from_win_error (ret);
- return NULL;
- }
-
- char *bp, eth[2] = "/";
- char cardkey[256], ipaddress[256], netmask[256];
-
- for (bp = binding; *bp; bp += strlen (bp) + 1)
- {
- bp += strlen ("\\Device\\");
- strcpy (cardkey, "SYSTEM\\CurrentControlSet\\Services\\");
- strcat (cardkey, bp);
- strcat (cardkey, "\\Parameters\\Tcpip");
-
- if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, cardkey,
- 0, KEY_READ, &key) != ERROR_SUCCESS)
- continue;
-
- if (RegQueryValueEx (key, "IPAddress",
- NULL, NULL,
- (unsigned char *) ipaddress,
- (size = 256, &size)) == ERROR_SUCCESS
- && RegQueryValueEx (key, "SubnetMask",
- NULL, NULL,
- (unsigned char *) netmask,
- (size = 256, &size)) == ERROR_SUCCESS)
- ++cnt;
- RegCloseKey (key);
- }
- ++cnt; /* loopback */
- if (!(ifret = (struct ifall *) malloc (cnt * sizeof (struct ifall))))
- return NULL;
- /* Set up lo interface first */
- idx = 0;
- ifp = ifret + idx;
- memset (ifp, 0, sizeof *ifp);
- /* Next in chain */
- ifp->ifa_ifa.ifa_next = (struct ifaddrs *) &ifp[1].ifa_ifa;
- /* Interface name */
- strcpy (ifp->ifa_name, "lo");
- ifp->ifa_ifa.ifa_name = ifp->ifa_name;
- /* Flags */
- ifp->ifa_ifa.ifa_flags = IFF_UP | IFF_LOWER_UP | IFF_RUNNING | IFF_LOOPBACK;
- /* Address */
- sin = (struct sockaddr_in *) &ifp->ifa_addr;
- sin->sin_addr.s_addr = htonl (INADDR_LOOPBACK);
- sin->sin_family = AF_INET;
- ifp->ifa_ifa.ifa_addr = (struct sockaddr *) &ifp->ifa_addr;
- /* Netmask */
- sin = (struct sockaddr_in *) &ifp->ifa_netmask;
- sin->sin_addr.s_addr = htonl (IN_CLASSA_NET);
- sin->sin_family = AF_INET;
- ifp->ifa_ifa.ifa_netmask = (struct sockaddr *) &ifp->ifa_netmask;
- /* Broadcast address */
- sin = (struct sockaddr_in *) &ifp->ifa_brddstaddr;
- sin->sin_addr.s_addr = htonl (INADDR_LOOPBACK | IN_CLASSA_HOST);
- sin->sin_family = AF_INET;
- ifp->ifa_ifa.ifa_broadaddr = (struct sockaddr *) &ifp->ifa_brddstaddr;
- /* Hardware address */
- ; // Nothing to do... */
- /* Metric */
- ifp->ifa_metric = 1;
- /* MTU */
- ifp->ifa_mtu = 1520; /* Default value for MS TCP Loopback interface. */
- /* Interface index */
- ifp->ifa_ifindex = -1;
- /* Friendly name */
- struct ifreq_frndlyname *iff = (struct ifreq_frndlyname *)
- &ifp->ifa_frndlyname;
- strcpy (iff->ifrf_friendlyname, "Default loopback");
- iff->ifrf_len = 16;
-
- for (bp = binding; *bp; bp += strlen (bp) + 1)
- {
- bp += strlen ("\\Device\\");
- strcpy (cardkey, "SYSTEM\\CurrentControlSet\\Services\\");
- strcat (cardkey, bp);
- strcat (cardkey, "\\Parameters\\Tcpip");
-
- if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, cardkey,
- 0, KEY_READ, &key) != ERROR_SUCCESS)
- continue;
-
- if (RegQueryValueEx (key, "IPAddress",
- NULL, NULL,
- (unsigned char *) ipaddress,
- (size = 256, &size)) == ERROR_SUCCESS
- && RegQueryValueEx (key, "SubnetMask",
- NULL, NULL,
- (unsigned char *) netmask,
- (size = 256, &size)) == ERROR_SUCCESS)
- {
- char *ip, *np;
- char dhcpaddress[256], dhcpnetmask[256];
- bool ppp = false;
-
- for (ip = ipaddress, np = netmask;
- *ip && *np;
- ip += strlen (ip) + 1, np += strlen (np) + 1)
- {
- bool dhcp = false;
- if (cygwin_inet_addr (ip) == 0L
- && RegQueryValueEx (key, "DhcpIPAddress",
- NULL, NULL,
- (unsigned char *) dhcpaddress,
- (size = 256, &size))
- == ERROR_SUCCESS
- && RegQueryValueEx (key, "DhcpSubnetMask",
- NULL, NULL,
- (unsigned char *) dhcpnetmask,
- (size = 256, &size))
- == ERROR_SUCCESS)
- dhcp = true;
- if (++idx == cnt
- && !(ifp = (struct ifall *)
- realloc (ifret, ++cnt * sizeof (struct ifall))))
- {
- free (ifret);
- return NULL;
- }
- ifp = ifret + idx;
- memset (ifp, 0, sizeof *ifp);
- /* Next in chain */
- ifp->ifa_ifa.ifa_next = (struct ifaddrs *) &ifp[1].ifa_ifa;
- /* Interface name */
- if (!strncmp (bp, "NdisWan", 7))
- {
- strcpy (ifp->ifa_name, "ppp");
- strcat (ifp->ifa_name, bp + 7);
- ppp = true;
- }
- else
- {
- ++*eth;
- strcpy (ifp->ifa_name, "eth");
- strcat (ifp->ifa_name, eth);
- }
- ifp->ifa_ifa.ifa_name = ifp->ifa_name;
- /* Flags */
- ifp->ifa_ifa.ifa_flags = IFF_UP | IFF_LOWER_UP | IFF_RUNNING;
- if (ppp)
- ifp->ifa_ifa.ifa_flags |= IFF_POINTOPOINT | IFF_NOARP;
- else
- ifp->ifa_ifa.ifa_flags |= IFF_BROADCAST;
- /* Address */
- sin = (struct sockaddr_in *) &ifp->ifa_addr;
- sin->sin_addr.s_addr = cygwin_inet_addr (dhcp ? dhcpaddress : ip);
- sin->sin_family = AF_INET;
- ifp->ifa_ifa.ifa_addr = (struct sockaddr *) &ifp->ifa_addr;
- /* Netmask */
- sin = (struct sockaddr_in *) &ifp->ifa_netmask;
- sin->sin_addr.s_addr = cygwin_inet_addr (dhcp ? dhcpnetmask : np);
- sin->sin_family = AF_INET;
- ifp->ifa_ifa.ifa_netmask = (struct sockaddr *) &ifp->ifa_netmask;
- if (ppp)
- {
- /* Destination address */
- sin = (struct sockaddr_in *) &ifp->ifa_brddstaddr;
- sin->sin_addr.s_addr =
- cygwin_inet_addr (dhcp ? dhcpaddress : ip);
- sin->sin_family = AF_INET;
- ifp->ifa_ifa.ifa_dstaddr = (struct sockaddr *)
- &ifp->ifa_brddstaddr;
- }
- else
- {
- /* Broadcast address */
- lip = cygwin_inet_addr (dhcp ? dhcpaddress : ip);
- lnp = cygwin_inet_addr (dhcp ? dhcpnetmask : np);
- sin = (struct sockaddr_in *) &ifp->ifa_brddstaddr;
- sin->sin_addr.s_addr = (lip & lnp) | ~lnp;
- sin->sin_family = AF_INET;
- ifp->ifa_ifa.ifa_broadaddr = (struct sockaddr *)
- &ifp->ifa_brddstaddr;
- }
- /* Hardware address */
- ; // Nothing to do... */
- /* Metric */
- ifp->ifa_metric = 1;
- /* MTU */
- ifp->ifa_mtu = 1500;
- /* Interface index */
- ifp->ifa_ifindex = -1;
- /* Friendly name */
- struct ifreq_frndlyname *iff = (struct ifreq_frndlyname *)
- &ifp->ifa_frndlyname;
- strcpy (iff->ifrf_friendlyname, bp);
- iff->ifrf_len = strlen (iff->ifrf_friendlyname);
- }
- }
- RegCloseKey (key);
- }
- /* Since every entry is set to the next entry, the last entry points to an
- invalid next entry now. Fix it retroactively. */
- if (ifp > ifret)
- ifp->ifa_ifa.ifa_next = NULL;
- return ifret;
-}
-
-extern "C" int
-getifaddrs (struct ifaddrs **ifap)
-{
- if (!ifap)
- {
- set_errno (EINVAL);
- return -1;
- }
- struct ifall *ifp;
- if (wincap.has_gaa_prefixes () && !CYGWIN_VERSION_CHECK_FOR_OLD_IFREQ)
- ifp = get_xp_ifs (AF_UNSPEC);
- else if (wincap.has_ip_helper_lib ())
- ifp = get_2k_ifs ();
- else
- ifp = get_nt_ifs ();
- *ifap = &ifp->ifa_ifa;
- return ifp ? 0 : -1;
-}
-
-extern "C" void
-freeifaddrs (struct ifaddrs *ifp)
-{
- if (ifp)
- free (ifp);
-}
-
-int
-get_ifconf (struct ifconf *ifc, int what)
-{
- sig_dispatch_pending ();
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- /* Ensure we have space for at least one struct ifreqs, fail if not. */
- if (ifc->ifc_len < (int) sizeof (struct ifreq))
- {
- set_errno (EINVAL);
- return -1;
- }
-
- struct ifall *ifret, *ifp;
- if (wincap.has_gaa_prefixes () && !CYGWIN_VERSION_CHECK_FOR_OLD_IFREQ)
- ifret = get_xp_ifs (AF_INET);
- else if (wincap.has_ip_helper_lib ())
- ifret = get_2k_ifs ();
- else
- ifret = get_nt_ifs ();
- if (!ifret)
- return -1;
-
- struct sockaddr_in *sin;
- struct ifreq *ifr = ifc->ifc_req;
- int cnt = 0;
- for (ifp = ifret; ifp; ifp = (struct ifall *) ifp->ifa_ifa.ifa_next)
- {
- ++cnt;
- strcpy (ifr->ifr_name, ifp->ifa_name);
- switch (what)
- {
- case SIOCGIFFLAGS:
- ifr->ifr_flags = ifp->ifa_ifa.ifa_flags;
- break;
- case SIOCGIFCONF:
- case SIOCGIFADDR:
- sin = (struct sockaddr_in *) &ifr->ifr_addr;
- memcpy (sin, &ifp->ifa_addr, sizeof *sin);
- break;
- case SIOCGIFNETMASK:
- sin = (struct sockaddr_in *) &ifr->ifr_netmask;
- memcpy (sin, &ifp->ifa_netmask, sizeof *sin);
- break;
- case SIOCGIFDSTADDR:
- sin = (struct sockaddr_in *) &ifr->ifr_dstaddr;
- if (ifp->ifa_ifa.ifa_flags & IFF_POINTOPOINT)
- memcpy (sin, &ifp->ifa_brddstaddr, sizeof *sin);
- else /* Return addr as on Linux. */
- memcpy (sin, &ifp->ifa_addr, sizeof *sin);
- break;
- case SIOCGIFBRDADDR:
- sin = (struct sockaddr_in *) &ifr->ifr_broadaddr;
- if (!(ifp->ifa_ifa.ifa_flags & IFF_POINTOPOINT))
- memcpy (sin, &ifp->ifa_brddstaddr, sizeof *sin);
- else
- {
- sin->sin_addr.s_addr = INADDR_ANY;
- sin->sin_family = AF_INET;
- sin->sin_port = 0;
- }
- break;
- case SIOCGIFHWADDR:
- memcpy (&ifr->ifr_hwaddr, &ifp->ifa_hwaddr, sizeof ifr->ifr_hwaddr);
- break;
- case SIOCGIFMETRIC:
- ifr->ifr_metric = ifp->ifa_metric;
- break;
- case SIOCGIFMTU:
- ifr->ifr_mtu = ifp->ifa_mtu;
- break;
- case SIOCGIFINDEX:
- ifr->ifr_ifindex = ifp->ifa_ifindex;
- break;
- case SIOCGIFFRNDLYNAM:
- memcpy (ifr->ifr_frndlyname, &ifp->ifa_frndlyname,
- sizeof (struct ifreq_frndlyname));
- }
- if ((caddr_t) ++ifr >
- ifc->ifc_buf + ifc->ifc_len - sizeof (struct ifreq))
- break;
- }
- /* Set the correct length */
- ifc->ifc_len = cnt * sizeof (struct ifreq);
- free (ifret);
- return 0;
-}
-
-extern "C" unsigned
-if_nametoindex (const char *name)
-{
- PIP_ADAPTER_ADDRESSES pa0 = NULL, pap;
- unsigned index = 0;
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return 0;
-
- if (wincap.has_gaa_prefixes ()
- && get_adapters_addresses (&pa0, AF_UNSPEC))
- {
- char lname[IF_NAMESIZE], *c;
-
- lname[0] = '\0';
- strncat (lname, name, IF_NAMESIZE - 1);
- if (lname[0] == '{' && (c = strchr (lname, ':')))
- *c = '\0';
- for (pap = pa0; pap; pap = pap->Next)
- if (strcasematch (lname, pap->AdapterName))
- {
- index = pap->Ipv6IfIndex ?: pap->IfIndex;
- break;
- }
- free (pa0);
- }
- return index;
-}
-
-extern "C" char *
-if_indextoname (unsigned ifindex, char *ifname)
-{
- PIP_ADAPTER_ADDRESSES pa0 = NULL, pap;
- char *name = NULL;
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
-
- if (wincap.has_gaa_prefixes ()
- && get_adapters_addresses (&pa0, AF_UNSPEC))
- {
- for (pap = pa0; pap; pap = pap->Next)
- if (ifindex == (pap->Ipv6IfIndex ?: pap->IfIndex))
- {
- /* Unfortunately the pre-Vista IPv6 stack has a distinct loopback
- device with the same Ipv6IfIndex as the IfIndex of the IPv4
- loopback device, but with a different adapter name.
- For consistency with /proc/net/if_inet6, try to find the
- IPv6 loopback device and use that adapter name instead.
- We identify the loopback device by its IfIndex of 1. */
- if (pap->IfIndex == 1 && pap->Ipv6IfIndex == 0)
- for (PIP_ADAPTER_ADDRESSES pap2 = pa0; pap2; pap2 = pap2->Next)
- if (pap2->Ipv6IfIndex == 1)
- {
- pap = pap2;
- break;
- }
- name = strcpy (ifname, pap->AdapterName);
- break;
- }
- free (pa0);
- }
- else
- set_errno (ENXIO);
- return name;
-}
-
-extern "C" struct if_nameindex *
-if_nameindex (void)
-{
- PIP_ADAPTER_ADDRESSES pa0 = NULL, pap;
- struct if_nameindex *iflist = NULL;
- char (*ifnamelist)[IF_NAMESIZE];
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
-
- if (wincap.has_gaa_prefixes ()
- && get_adapters_addresses (&pa0, AF_UNSPEC))
- {
- int cnt = 0;
- for (pap = pa0; pap; pap = pap->Next)
- ++cnt;
- iflist = (struct if_nameindex *)
- malloc ((cnt + 1) * sizeof (struct if_nameindex)
- + cnt * IF_NAMESIZE);
- if (!iflist)
- set_errno (ENOBUFS);
- else
- {
- ifnamelist = (char (*)[IF_NAMESIZE]) (iflist + cnt + 1);
- for (pap = pa0, cnt = 0; pap; pap = pap->Next)
- {
- for (int i = 0; i < cnt; ++i)
- if (iflist[i].if_index == (pap->Ipv6IfIndex ?: pap->IfIndex))
- goto outer_loop;
- iflist[cnt].if_index = pap->Ipv6IfIndex ?: pap->IfIndex;
- strcpy (iflist[cnt].if_name = ifnamelist[cnt], pap->AdapterName);
- /* See comment in if_indextoname. */
- if (pap->IfIndex == 1 && pap->Ipv6IfIndex == 0)
- for (PIP_ADAPTER_ADDRESSES pap2 = pa0; pap2; pap2 = pap2->Next)
- if (pap2->Ipv6IfIndex == 1)
- {
- strcpy (ifnamelist[cnt], pap2->AdapterName);
- break;
- }
- ++cnt;
- outer_loop:
- ;
- }
- iflist[cnt].if_index = 0;
- iflist[cnt].if_name = NULL;
- }
- free (pa0);
- }
- else
- set_errno (ENXIO);
- return iflist;
-}
-
-extern "C" void
-if_freenameindex (struct if_nameindex *ptr)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return;
- free (ptr);
-}
-
-#define PORT_LOW (IPPORT_EFSSERVER + 1)
-#define PORT_HIGH (IPPORT_RESERVED - 1)
-#define NUM_PORTS (PORT_HIGH - PORT_LOW + 1)
-
-extern "C" int
-cygwin_bindresvport_sa (int fd, struct sockaddr *sa)
-{
- struct sockaddr_storage sst;
- struct sockaddr_in *sin = NULL;
- struct sockaddr_in6 *sin6 = NULL;
- in_port_t port;
- socklen_t salen;
- int ret;
-
- sig_dispatch_pending ();
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- fhandler_socket *fh = get (fd);
- if (!fh)
- return -1;
-
- if (!sa)
- {
- sa = (struct sockaddr *) &sst;
- memset (&sst, 0, sizeof sst);
- sa->sa_family = fh->get_addr_family ();
- }
-
- switch (sa->sa_family)
- {
- case AF_INET:
- salen = sizeof (struct sockaddr_in);
- sin = (struct sockaddr_in *) sa;
- port = sin->sin_port;
- break;
- case AF_INET6:
- salen = sizeof (struct sockaddr_in6);
- sin6 = (struct sockaddr_in6 *) sa;
- port = sin6->sin6_port;
- break;
- default:
- set_errno (EPFNOSUPPORT);
- return -1;
- }
-
- /* If a non-zero port number is given, try this first. If that succeeds,
- or if the error message is serious, return. */
- if (port)
- {
- ret = fh->bind (sa, salen);
- if (!ret || (get_errno () != EADDRINUSE && get_errno () != EINVAL))
- return ret;
- }
-
- LONG myport;
-
- for (int i = 0; i < NUM_PORTS; i++)
- {
- while ((myport = InterlockedExchange (&cygwin_shared->last_used_bindresvport, -1)) == -1)
- low_priority_sleep (0);
- if (myport == 0 || --myport < PORT_LOW)
- myport = PORT_HIGH;
- InterlockedExchange (&cygwin_shared->last_used_bindresvport, myport);
-
- if (sa->sa_family == AF_INET6)
- sin6->sin6_port = htons (myport);
- else
- sin->sin_port = htons (myport);
- if (!(ret = fh->bind (sa, salen)))
- break;
- if (get_errno () != EADDRINUSE && get_errno () != EINVAL)
- break;
- }
-
- return ret;
-}
-
-extern "C" int
-cygwin_bindresvport (int fd, struct sockaddr_in *sin)
-{
- return cygwin_bindresvport_sa (fd, (struct sockaddr *) sin);
-}
-
-/* socketpair: standards? */
-/* Win32 supports AF_INET only, so ignore domain and protocol arguments */
-extern "C" int
-socketpair (int family, int type, int protocol, int *sb)
-{
- int res = -1;
- SOCKET insock, outsock, newsock;
- struct sockaddr_in sock_in, sock_out;
- int len;
-
- sig_dispatch_pending ();
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- if (family != AF_LOCAL && family != AF_INET)
- {
- set_errno (EAFNOSUPPORT);
- goto done;
- }
- if (type != SOCK_STREAM && type != SOCK_DGRAM)
- {
- set_errno (EPROTOTYPE);
- goto done;
- }
- if ((family == AF_LOCAL && protocol != PF_UNSPEC && protocol != PF_LOCAL)
- || (family == AF_INET && protocol != PF_UNSPEC && protocol != PF_INET))
- {
- set_errno (EPROTONOSUPPORT);
- goto done;
- }
-
- /* create the first socket */
- newsock = socket (AF_INET, type, 0);
- if (newsock == INVALID_SOCKET)
- {
- debug_printf ("first socket call failed");
- set_winsock_errno ();
- goto done;
- }
-
- /* bind the socket to any unused port */
- sock_in.sin_family = AF_INET;
- sock_in.sin_port = 0;
- sock_in.sin_addr.s_addr = INADDR_ANY;
- if (bind (newsock, (struct sockaddr *) &sock_in, sizeof (sock_in)) < 0)
- {
- debug_printf ("bind failed");
- set_winsock_errno ();
- closesocket (newsock);
- goto done;
- }
- len = sizeof (sock_in);
- if (getsockname (newsock, (struct sockaddr *) &sock_in, &len) < 0)
- {
- debug_printf ("getsockname error");
- set_winsock_errno ();
- closesocket (newsock);
- goto done;
- }
-
- /* For stream sockets, create a listener */
- if (type == SOCK_STREAM)
- listen (newsock, 2);
-
- /* create a connecting socket */
- outsock = socket (AF_INET, type, 0);
- if (outsock == INVALID_SOCKET)
- {
- debug_printf ("second socket call failed");
- set_winsock_errno ();
- closesocket (newsock);
- goto done;
- }
-
- /* For datagram sockets, bind the 2nd socket to an unused address, too */
- if (type == SOCK_DGRAM)
- {
- sock_out.sin_family = AF_INET;
- sock_out.sin_port = 0;
- sock_out.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
- if (bind (outsock, (struct sockaddr *) &sock_out, sizeof (sock_out)) < 0)
- {
- debug_printf ("bind failed");
- set_winsock_errno ();
- closesocket (newsock);
- closesocket (outsock);
- goto done;
- }
- len = sizeof (sock_out);
- if (getsockname (outsock, (struct sockaddr *) &sock_out, &len) < 0)
- {
- debug_printf ("getsockname error");
- set_winsock_errno ();
- closesocket (newsock);
- closesocket (outsock);
- goto done;
- }
- }
-
- /* Force IP address to loopback */
- sock_in.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
- if (type == SOCK_DGRAM)
- sock_out.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
-
- /* Do a connect */
- if (connect (outsock, (struct sockaddr *) &sock_in, sizeof (sock_in)) < 0)
- {
- debug_printf ("connect error");
- set_winsock_errno ();
- closesocket (newsock);
- closesocket (outsock);
- goto done;
- }
-
- if (type == SOCK_STREAM)
- {
- /* For stream sockets, accept the connection and close the listener */
- len = sizeof (sock_in);
- insock = accept (newsock, (struct sockaddr *) &sock_in, &len);
- if (insock == INVALID_SOCKET)
- {
- debug_printf ("accept error");
- set_winsock_errno ();
- closesocket (newsock);
- closesocket (outsock);
- goto done;
- }
- closesocket (newsock);
- }
- else
- {
- /* For datagram sockets, connect the 2nd socket */
- if (connect (newsock, (struct sockaddr *) &sock_out,
- sizeof (sock_out)) < 0)
- {
- debug_printf ("connect error");
- set_winsock_errno ();
- closesocket (newsock);
- closesocket (outsock);
- goto done;
- }
- insock = newsock;
- }
-
- {
- cygheap_fdnew sb0;
- const device *dev;
-
- if (family == AF_INET)
- dev = (type == SOCK_STREAM ? tcp_dev : udp_dev);
- else
- dev = (type == SOCK_STREAM ? stream_dev : dgram_dev);
-
- if (sb0 >= 0 && fdsock (sb0, dev, insock))
- {
- ((fhandler_socket *) sb0)->set_sun_path ("");
- ((fhandler_socket *) sb0)->set_addr_family (family);
- ((fhandler_socket *) sb0)->set_socket_type (type);
- ((fhandler_socket *) sb0)->connect_state (connected);
- if (family == AF_LOCAL && type == SOCK_STREAM)
- ((fhandler_socket *) sb0)->af_local_set_sockpair_cred ();
-
- cygheap_fdnew sb1 (sb0, false);
-
- if (sb1 >= 0 && fdsock (sb1, dev, outsock))
- {
- ((fhandler_socket *) sb1)->set_sun_path ("");
- ((fhandler_socket *) sb1)->set_addr_family (family);
- ((fhandler_socket *) sb1)->set_socket_type (type);
- ((fhandler_socket *) sb1)->connect_state (connected);
- if (family == AF_LOCAL && type == SOCK_STREAM)
- ((fhandler_socket *) sb1)->af_local_set_sockpair_cred ();
-
- sb[0] = sb0;
- sb[1] = sb1;
- res = 0;
- }
- }
-
- if (res == -1)
- {
- closesocket (insock);
- closesocket (outsock);
- }
- }
-
-done:
- syscall_printf ("%d = socketpair (...)", res);
- return res;
-}
-
-/* sethostent: standards? */
-extern "C" void
-sethostent (int)
-{
-}
-
-/* endhostent: standards? */
-extern "C" void
-endhostent (void)
-{
-}
-
-/* exported as recvmsg: standards? */
-extern "C" int
-cygwin_recvmsg (int fd, struct msghdr *msg, int flags)
-{
- int res;
- sig_dispatch_pending ();
-
- fhandler_socket *fh = get (fd);
-
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else
- {
- res = check_iovec_for_read (msg->msg_iov, msg->msg_iovlen);
- if (res > 0)
- res = fh->recvmsg (msg, flags);
- }
-
- syscall_printf ("%d = recvmsg (%d, %p, %x)", res, fd, msg, flags);
- return res;
-}
-
-/* exported as sendmsg: standards? */
-extern "C" int
-cygwin_sendmsg (int fd, const struct msghdr *msg, int flags)
-{
- int res;
- sig_dispatch_pending ();
-
- fhandler_socket *fh = get (fd);
-
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else
- {
- res = check_iovec_for_write (msg->msg_iov, msg->msg_iovlen);
- if (res >= 0)
- res = fh->sendmsg (msg, flags);
- }
-
- syscall_printf ("%d = sendmsg (%d, %p, %x)", res, fd, msg, flags);
- return res;
-}
-
-/* This is from the BIND 4.9.4 release, modified to compile by itself */
-
-/* Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#define IN6ADDRSZ 16
-#define INADDRSZ 4
-#define INT16SZ 2
-
-/* int
- * inet_pton4(src, dst)
- * like inet_aton() but without all the hexadecimal and shorthand.
- * return:
- * 1 if `src' is a valid dotted quad, else 0.
- * notice:
- * does not touch `dst' unless it's returning 1.
- * author:
- * Paul Vixie, 1996.
- */
-static int
-inet_pton4 (const char *src, u_char *dst)
-{
- static const char digits[] = "0123456789";
- int saw_digit, octets, ch;
- u_char tmp[INADDRSZ], *tp;
-
- saw_digit = 0;
- octets = 0;
- *(tp = tmp) = 0;
- while ((ch = *src++) != '\0')
- {
- const char *pch;
-
- if ((pch = strchr(digits, ch)) != NULL)
- {
- u_int ret = *tp * 10 + (pch - digits);
-
- if (ret > 255)
- return (0);
- *tp = ret;
- if (! saw_digit)
- {
- if (++octets > 4)
- return (0);
- saw_digit = 1;
- }
- }
- else if (ch == '.' && saw_digit)
- {
- if (octets == 4)
- return (0);
- *++tp = 0;
- saw_digit = 0;
- }
- else
- return (0);
- }
- if (octets < 4)
- return (0);
-
- memcpy(dst, tmp, INADDRSZ);
- return (1);
-}
-
-/* int
- * inet_pton6(src, dst)
- * convert presentation level address to network order binary form.
- * return:
- * 1 if `src' is a valid [RFC1884 2.2] address, else 0.
- * notice:
- * (1) does not touch `dst' unless it's returning 1.
- * (2) :: in a full address is silently ignored.
- * credit:
- * inspired by Mark Andrews.
- * author:
- * Paul Vixie, 1996.
- */
-static int
-inet_pton6 (const char *src, u_char *dst)
-{
- static const char xdigits_l[] = "0123456789abcdef",
- xdigits_u[] = "0123456789ABCDEF";
- u_char tmp[IN6ADDRSZ], *tp, *endp, *colonp;
- const char *xdigits, *curtok;
- int ch, saw_xdigit;
- u_int val;
-
- memset((tp = tmp), 0, IN6ADDRSZ);
- endp = tp + IN6ADDRSZ;
- colonp = NULL;
- /* Leading :: requires some special handling. */
- if (*src == ':')
- if (*++src != ':')
- return (0);
- curtok = src;
- saw_xdigit = 0;
- val = 0;
- while ((ch = *src++) != '\0')
- {
- const char *pch;
-
- if ((pch = strchr((xdigits = xdigits_l), ch)) == NULL)
- pch = strchr((xdigits = xdigits_u), ch);
- if (pch != NULL)
- {
- val <<= 4;
- val |= (pch - xdigits);
- if (val > 0xffff)
- return (0);
- saw_xdigit = 1;
- continue;
- }
- if (ch == ':')
- {
- curtok = src;
- if (!saw_xdigit)
- {
- if (colonp)
- return (0);
- colonp = tp;
- continue;
- }
- if (tp + INT16SZ > endp)
- return (0);
- *tp++ = (u_char) (val >> 8) & 0xff;
- *tp++ = (u_char) val & 0xff;
- saw_xdigit = 0;
- val = 0;
- continue;
- }
- if (ch == '.' && ((tp + INADDRSZ) <= endp) && inet_pton4(curtok, tp) > 0)
- {
- tp += INADDRSZ;
- saw_xdigit = 0;
- break; /* '\0' was seen by inet_pton4(). */
- }
- return (0);
- }
- if (saw_xdigit)
- {
- if (tp + INT16SZ > endp)
- return (0);
- *tp++ = (u_char) (val >> 8) & 0xff;
- *tp++ = (u_char) val & 0xff;
- }
- if (colonp != NULL)
- {
- /*
- * Since some memmove()'s erroneously fail to handle
- * overlapping regions, we'll do the shift by hand.
- */
- const int n = tp - colonp;
- int i;
-
- for (i = 1; i <= n; i++)
- {
- endp[- i] = colonp[n - i];
- colonp[n - i] = 0;
- }
- tp = endp;
- }
- if (tp != endp)
- return (0);
-
- memcpy(dst, tmp, IN6ADDRSZ);
- return (1);
-}
-
-/* int
- * inet_pton(af, src, dst)
- * convert from presentation format (which usually means ASCII printable)
- * to network format (which is usually some kind of binary format).
- * return:
- * 1 if the address was valid for the specified address family
- * 0 if the address wasn't valid (`dst' is untouched in this case)
- * -1 if some other error occurred (`dst' is untouched in this case, too)
- * author:
- * Paul Vixie, 1996.
- */
-extern "C" int
-cygwin_inet_pton (int af, const char *src, void *dst)
-{
- switch (af)
- {
- case AF_INET:
- return (inet_pton4(src, (u_char *) dst));
- case AF_INET6:
- return (inet_pton6(src, (u_char *) dst));
- default:
- errno = EAFNOSUPPORT;
- return (-1);
- }
- /* NOTREACHED */
-}
-
-/* const char *
- * inet_ntop4(src, dst, size)
- * format an IPv4 address, more or less like inet_ntoa()
- * return:
- * `dst' (as a const)
- * notes:
- * (1) uses no statics
- * (2) takes a u_char* not an in_addr as input
- * author:
- * Paul Vixie, 1996.
- */
-static const char *
-inet_ntop4 (const u_char *src, char *dst, size_t size)
-{
- static const char fmt[] = "%u.%u.%u.%u";
- char tmp[sizeof "255.255.255.255"];
-
- __small_sprintf(tmp, fmt, src[0], src[1], src[2], src[3]);
- if (strlen(tmp) > size)
- {
- errno = ENOSPC;
- return (NULL);
- }
- strcpy(dst, tmp);
- return (dst);
-}
-
-/* const char *
- * inet_ntop6(src, dst, size)
- * convert IPv6 binary address into presentation (printable) format
- * author:
- * Paul Vixie, 1996.
- */
-static const char *
-inet_ntop6 (const u_char *src, char *dst, size_t size)
-{
- /*
- * Note that int32_t and int16_t need only be "at least" large enough
- * to contain a value of the specified size. On some systems, like
- * Crays, there is no such thing as an integer variable with 16 bits.
- * Keep this in mind if you think this function should have been coded
- * to use pointer overlays. All the world's not a VAX.
- */
- char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp;
- struct { int base, len; } best, cur;
- u_int words[IN6ADDRSZ / INT16SZ];
- int i;
-
- /*
- * Preprocess:
- * Copy the input (bytewise) array into a wordwise array.
- * Find the longest run of 0x00's in src[] for :: shorthanding.
- */
- memset(words, 0, sizeof words);
- for (i = 0; i < IN6ADDRSZ; i++)
- words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
- best.base = -1;
- cur.base = -1;
- for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++)
- {
- if (words[i] == 0)
- {
- if (cur.base == -1)
- cur.base = i, cur.len = 1;
- else
- cur.len++;
- }
- else
- {
- if (cur.base != -1)
- {
- if (best.base == -1 || cur.len > best.len)
- best = cur;
- cur.base = -1;
- }
- }
- }
- if (cur.base != -1)
- {
- if (best.base == -1 || cur.len > best.len)
- best = cur;
- }
- if (best.base != -1 && best.len < 2)
- best.base = -1;
-
- /*
- * Format the result.
- */
- tp = tmp;
- for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++)
- {
- /* Are we inside the best run of 0x00's? */
- if (best.base != -1 && i >= best.base && i < (best.base + best.len))
- {
- if (i == best.base)
- *tp++ = ':';
- continue;
- }
- /* Are we following an initial run of 0x00s or any real hex? */
- if (i != 0)
- *tp++ = ':';
- /* Is this address an encapsulated IPv4? */
- if (i == 6 && best.base == 0 &&
- (best.len == 6 || (best.len == 5 && words[5] == 0xffff)))
- {
- if (!inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp)))
- return (NULL);
- tp += strlen(tp);
- break;
- }
- __small_sprintf(tp, "%x", words[i]);
- tp += strlen(tp);
- }
- /* Was it a trailing run of 0x00's? */
- if (best.base != -1 && (best.base + best.len) == (IN6ADDRSZ / INT16SZ))
- *tp++ = ':';
- *tp++ = '\0';
-
- /*
- * Check for overflow, copy, and we're done.
- */
- if ((size_t) (tp - tmp) > size)
- {
- errno = ENOSPC;
- return (NULL);
- }
- strcpy(dst, tmp);
- return (dst);
-}
-
-/* char *
- * inet_ntop(af, src, dst, size)
- * convert a network format address to presentation format.
- * return:
- * pointer to presentation format address (`dst'), or NULL (see errno).
- * author:
- * Paul Vixie, 1996.
- */
-extern "C" const char *
-cygwin_inet_ntop (int af, const void *src, char *dst, socklen_t size)
-{
- switch (af)
- {
- case AF_INET:
- return (inet_ntop4((const u_char *) src, dst, size));
- case AF_INET6:
- return (inet_ntop6((const u_char *) src, dst, size));
- default:
- errno = EAFNOSUPPORT;
- return (NULL);
- }
- /* NOTREACHED */
-}
-
-/* W. Richard STEVENS libgai implementation, slightly tweaked for inclusion
- into Cygwin as pure IPv4 replacement. Please note that the code is
- kept intact as much as possible. Especially the IPv6 and AF_UNIX code
- is kept in, even though we can support neither of them. Please don't
- activate them, they won't work correctly. */
-
-#define IPv4
-#undef IPv6
-#undef UNIXdomain
-
-#undef HAVE_SOCKADDR_SA_LEN
-#define gethostbyname2(host,family) cygwin_gethostbyname((host))
-
-#define AI_CLONE 0x8000 /* Avoid collision with AI_ values in netdb.h */
-
-/*
- * Create and fill in an addrinfo{}.
- */
-
-/* include ga_aistruct1 */
-static int
-ga_aistruct (struct addrinfo ***paipnext, const struct addrinfo *hintsp,
- const void *addr, int family)
-{
- struct addrinfo *ai;
-
- if ((ai = (struct addrinfo *) calloc (1, sizeof (struct addrinfo))) == NULL)
- return (EAI_MEMORY);
- ai->ai_next = NULL;
- ai->ai_canonname = NULL;
- **paipnext = ai;
- *paipnext = &ai->ai_next;
-
- if ((ai->ai_socktype = hintsp->ai_socktype) == 0)
- ai->ai_flags |= AI_CLONE;
-
- ai->ai_protocol = hintsp->ai_protocol;
-/* end ga_aistruct1 */
-
-/* include ga_aistruct2 */
- switch ((ai->ai_family = family))
- {
-#ifdef IPv4
- case AF_INET:
- {
- struct sockaddr_in *sinptr;
-
- /* 4allocate sockaddr_in{} and fill in all but port */
- if ((sinptr = (struct sockaddr_in *)
- calloc (1, sizeof (struct sockaddr_in))) == NULL)
- return (EAI_MEMORY);
-#ifdef HAVE_SOCKADDR_SA_LEN
- sinptr->sin_len = sizeof (struct sockaddr_in);
-#endif
- sinptr->sin_family = AF_INET;
- memcpy (&sinptr->sin_addr, addr, sizeof (struct in_addr));
- ai->ai_addr = (struct sockaddr *) sinptr;
- ai->ai_addrlen = sizeof (struct sockaddr_in);
- break;
- }
-#endif /* IPV4 */
-#ifdef IPv6
- case AF_INET6:
- {
- struct sockaddr_in6 *sin6ptr;
-
- /* 4allocate sockaddr_in6{} and fill in all but port */
- if ((sin6ptr = calloc (1, sizeof (struct sockaddr_in6))) == NULL)
- return (EAI_MEMORY);
-#ifdef HAVE_SOCKADDR_SA_LEN
- sin6ptr->sin6_len = sizeof (struct sockaddr_in6);
-#endif
- sin6ptr->sin6_family = AF_INET6;
- memcpy (&sin6ptr->sin6_addr, addr, sizeof (struct in6_addr));
- ai->ai_addr = (struct sockaddr *) sin6ptr;
- ai->ai_addrlen = sizeof (struct sockaddr_in6);
- break;
- }
-#endif /* IPV6 */
-#ifdef UNIXdomain
- case AF_LOCAL:
- {
- struct sockaddr_un *unp;
-
- /* 4allocate sockaddr_un{} and fill in */
-/* *INDENT-OFF* */
- if (strlen(addr) >= sizeof(unp->sun_path))
- return(EAI_SERVICE);
- if ( (unp = calloc(1, sizeof(struct sockaddr_un))) == NULL)
- return(EAI_MEMORY);
-/* *INDENT-ON* */
- unp->sun_family = AF_LOCAL;
- strcpy (unp->sun_path, addr);
-#ifdef HAVE_SOCKADDR_SA_LEN
- unp->sun_len = SUN_LEN (unp);
-#endif
- ai->ai_addr = (struct sockaddr *) unp;
- ai->ai_addrlen = sizeof (struct sockaddr_un);
- if (hintsp->ai_flags & AI_PASSIVE)
- unlink (unp->sun_path); /* OK if this fails */
- break;
- }
-#endif /* UNIXDOMAIN */
- }
- return (0);
-}
-
-/* end ga_aistruct2 */
-
-/*
- * Clone a new addrinfo structure from an existing one.
- */
-
-/* include ga_clone */
-
-/* Cygwin specific: The ga_clone function is split up to allow an easy
- duplication of addrinfo structs. This is used to duplicate the
- structures from Winsock, so that we have the allocation of the structs
- returned to the application under control. This is especially helpful
- for the AI_V4MAPPED case prior to Vista. */
-static struct addrinfo *
-ga_dup (struct addrinfo *ai, bool v4mapped)
-{
- struct addrinfo *nai;
-
- if ((nai = (struct addrinfo *) calloc (1, sizeof (struct addrinfo))) == NULL)
- return (NULL);
-
- nai->ai_flags = 0; /* make sure AI_CLONE is off */
- nai->ai_family = v4mapped ? AF_INET6 : ai->ai_family;
- nai->ai_socktype = ai->ai_socktype;
- nai->ai_protocol = ai->ai_protocol;
- nai->ai_canonname = NULL;
- if (!(ai->ai_flags & AI_CLONE) && ai->ai_canonname
- && !(nai->ai_canonname = strdup (ai->ai_canonname)))
- {
- free (nai);
- return NULL;
- }
- nai->ai_addrlen = v4mapped ? sizeof (struct sockaddr_in6) : ai->ai_addrlen;
- if ((nai->ai_addr = (struct sockaddr *) malloc (v4mapped
- ? sizeof (struct sockaddr_in6)
- : ai->ai_addrlen)) == NULL)
- {
- if (nai->ai_canonname)
- free (nai->ai_canonname);
- free (nai);
- return NULL;
- }
- if (v4mapped)
- {
- struct sockaddr_in6 *in = (struct sockaddr_in6 *) nai->ai_addr;
- in->sin6_family = AF_INET6;
- in->sin6_port = ((struct sockaddr_in *) ai->ai_addr)->sin_port;
- in->sin6_flowinfo = 0;
- in->sin6_addr.s6_addr32[0] = 0;
- in->sin6_addr.s6_addr32[1] = 0;
- in->sin6_addr.s6_addr32[2] = htonl (0xffff);
- in->sin6_addr.s6_addr32[3] = ((struct sockaddr_in *) ai->ai_addr)->sin_addr.s_addr;
- in->sin6_scope_id = 0;
- }
- else
- memcpy (nai->ai_addr, ai->ai_addr, ai->ai_addrlen);
-
- return nai;
-}
-
-static struct addrinfo *
-ga_clone (struct addrinfo *ai)
-{
- struct addrinfo *nai;
-
- if ((nai = ga_dup (ai, false)))
- {
- nai->ai_next = ai->ai_next;
- ai->ai_next = nai;
- }
- return nai;
-}
-
-static struct addrinfo *
-ga_duplist (struct addrinfo *ai, bool v4mapped)
-{
- void ipv4_freeaddrinfo (struct addrinfo *aihead);
- struct addrinfo *tmp, *nai = NULL, *nai0 = NULL;
-
- for (; ai; ai = ai->ai_next, nai = tmp)
- {
- if (!(tmp = ga_dup (ai, v4mapped)))
- goto bad;
- if (!nai0)
- nai0 = tmp;
- if (nai)
- nai->ai_next = tmp;
- }
- return nai0;
-
-bad:
- ipv4_freeaddrinfo (nai0);
- return NULL;
-}
-
-/* end ga_clone */
-
-/*
- * Basic error checking of flags, family, socket type, and protocol.
- */
-
-/* include ga_echeck */
-static int
-ga_echeck (const char *hostname, const char *servname,
- int flags, int family, int socktype, int protocol)
-{
-#if 0
- if (flags & ~(AI_PASSIVE | AI_CANONNAME))
- return (EAI_BADFLAGS); /* unknown flag bits */
-#endif
- if (hostname == NULL || hostname[0] == '\0')
- {
- if (servname == NULL || servname[0] == '\0')
- return (EAI_NONAME); /* host or service must be specified */
- }
-
- switch (family)
- {
- case AF_UNSPEC:
- break;
-#ifdef IPv4
- case AF_INET:
- if (socktype != 0 &&
- (socktype != SOCK_STREAM &&
- socktype != SOCK_DGRAM && socktype != SOCK_RAW))
- return (EAI_SOCKTYPE); /* invalid socket type */
- break;
-#endif
-#ifdef IPv6
- case AF_INET6:
- if (socktype != 0 &&
- (socktype != SOCK_STREAM &&
- socktype != SOCK_DGRAM && socktype != SOCK_RAW))
- return (EAI_SOCKTYPE); /* invalid socket type */
- break;
-#endif
-#ifdef UNIXdomain
- case AF_LOCAL:
- if (socktype != 0 &&
- (socktype != SOCK_STREAM && socktype != SOCK_DGRAM))
- return (EAI_SOCKTYPE); /* invalid socket type */
- break;
-#endif
- default:
- return (EAI_FAMILY); /* unknown protocol family */
- }
- return (0);
-}
-
-/* end ga_echeck */
-
-struct search {
- const char *host; /* hostname or address string */
- int family; /* AF_xxx */
-};
-
-/*
- * Set up the search[] array with the hostnames and address families
- * that we are to look up.
- */
-
-/* include ga_nsearch1 */
-static int
-ga_nsearch (const char *hostname, const struct addrinfo *hintsp,
- struct search *search)
-{
- int nsearch = 0;
-
- if (hostname == NULL || hostname[0] == '\0')
- {
- if (hintsp->ai_flags & AI_PASSIVE)
- {
- /* 4no hostname and AI_PASSIVE: implies wildcard bind */
- switch (hintsp->ai_family)
- {
-#ifdef IPv4
- case AF_INET:
- search[nsearch].host = "0.0.0.0";
- search[nsearch].family = AF_INET;
- nsearch++;
- break;
-#endif
-#ifdef IPv6
- case AF_INET6:
- search[nsearch].host = "0::0";
- search[nsearch].family = AF_INET6;
- nsearch++;
- break;
-#endif
- case AF_UNSPEC:
-#ifdef IPv6
- search[nsearch].host = "0::0"; /* IPv6 first, then IPv4 */
- search[nsearch].family = AF_INET6;
- nsearch++;
-#endif
-#ifdef IPv4
- search[nsearch].host = "0.0.0.0";
- search[nsearch].family = AF_INET;
- nsearch++;
-#endif
- break;
- }
-/* end ga_nsearch1 */
-/* include ga_nsearch2 */
- }
- else
- {
- /* 4no host and not AI_PASSIVE: connect to local host */
- switch (hintsp->ai_family)
- {
-#ifdef IPv4
- case AF_INET:
- search[nsearch].host = "localhost"; /* 127.0.0.1 */
- search[nsearch].family = AF_INET;
- nsearch++;
- break;
-#endif
-#ifdef IPv6
- case AF_INET6:
- search[nsearch].host = "0::1";
- search[nsearch].family = AF_INET6;
- nsearch++;
- break;
-#endif
- case AF_UNSPEC:
-#ifdef IPv6
- search[nsearch].host = "0::1"; /* IPv6 first, then IPv4 */
- search[nsearch].family = AF_INET6;
- nsearch++;
-#endif
-#ifdef IPv4
- search[nsearch].host = "localhost";
- search[nsearch].family = AF_INET;
- nsearch++;
-#endif
- break;
- }
- }
-/* end ga_nsearch2 */
-/* include ga_nsearch3 */
- }
- else
- { /* host is specified */
- switch (hintsp->ai_family)
- {
-#ifdef IPv4
- case AF_INET:
- search[nsearch].host = hostname;
- search[nsearch].family = AF_INET;
- nsearch++;
- break;
-#endif
-#ifdef IPv6
- case AF_INET6:
- search[nsearch].host = hostname;
- search[nsearch].family = AF_INET6;
- nsearch++;
- break;
-#endif
- case AF_UNSPEC:
-#ifdef IPv6
- search[nsearch].host = hostname;
- search[nsearch].family = AF_INET6; /* IPv6 first */
- nsearch++;
-#endif
-#ifdef IPv4
- search[nsearch].host = hostname;
- search[nsearch].family = AF_INET; /* then IPv4 */
- nsearch++;
-#endif
- break;
- }
- }
- if (nsearch < 1 || nsearch > 2)
- return -1;
- return (nsearch);
-}
-
-/* end ga_nsearch3 */
-
-/*
- * Go through all the addrinfo structures, checking for a match of the
- * socket type and filling in the socket type, and then the port number
- * in the corresponding socket address structures.
- *
- * The AI_CLONE flag works as follows. Consider a multihomed host with
- * two IP addresses and no socket type specified by the caller. After
- * the "host" search there are two addrinfo structures, one per IP address.
- * Assuming a service supported by both TCP and UDP (say the daytime
- * service) we need to return *four* addrinfo structures:
- * IP#1, SOCK_STREAM, TCP port,
- * IP#1, SOCK_DGRAM, UDP port,
- * IP#2, SOCK_STREAM, TCP port,
- * IP#2, SOCK_DGRAM, UDP port.
- * To do this, when the "host" loop creates an addrinfo structure, if the
- * caller has not specified a socket type (hintsp->ai_socktype == 0), the
- * AI_CLONE flag is set. When the following function finds an entry like
- * this it is handled as follows: If the entry's ai_socktype is still 0,
- * this is the first use of the structure, and the ai_socktype field is set.
- * But, if the entry's ai_socktype is nonzero, then we clone a new addrinfo
- * structure and set it's ai_socktype to the new value. Although we only
- * need two socket types today (SOCK_STREAM and SOCK_DGRAM) this algorithm
- * will handle any number. Also notice that Posix.1g requires all socket
- * types to be nonzero.
- */
-
-/* include ga_port */
-static int
-ga_port (struct addrinfo *aihead, int port, int socktype)
- /* port must be in network byte order */
-{
- int nfound = 0;
- struct addrinfo *ai;
-
- for (ai = aihead; ai != NULL; ai = ai->ai_next)
- {
- if (ai->ai_flags & AI_CLONE)
- {
- if (ai->ai_socktype != 0)
- {
- if ((ai = ga_clone (ai)) == NULL)
- return (-1); /* memory allocation error */
- /* ai points to newly cloned entry, which is what we want */
- }
- }
- else if (ai->ai_socktype != socktype)
- continue; /* ignore if mismatch on socket type */
-
- ai->ai_socktype = socktype;
-
- switch (ai->ai_family)
- {
-#ifdef IPv4
- case AF_INET:
- ((struct sockaddr_in *) ai->ai_addr)->sin_port = port;
- nfound++;
- break;
-#endif
-#ifdef IPv6
- case AF_INET6:
- ((struct sockaddr_in6 *) ai->ai_addr)->sin6_port = port;
- nfound++;
- break;
-#endif
- }
- }
- return (nfound);
-}
-
-/* end ga_port */
-
-/*
- * This function handles the service string.
- */
-
-/* include ga_serv */
-static int
-ga_serv (struct addrinfo *aihead, const struct addrinfo *hintsp,
- const char *serv)
-{
- int port, rc, nfound;
- struct servent *sptr;
-
- nfound = 0;
- if (isdigit (serv[0]))
- { /* check for port number string first */
- port = htons (atoi (serv));
- if (hintsp->ai_socktype)
- {
- /* 4caller specifies socket type */
- if ((rc = ga_port (aihead, port, hintsp->ai_socktype)) < 0)
- return (EAI_MEMORY);
- nfound += rc;
- }
- else
- {
- /* 4caller does not specify socket type */
- if ((rc = ga_port (aihead, port, SOCK_STREAM)) < 0)
- return (EAI_MEMORY);
- nfound += rc;
- if ((rc = ga_port (aihead, port, SOCK_DGRAM)) < 0)
- return (EAI_MEMORY);
- nfound += rc;
- }
- }
- else
- {
- /* 4try service name, TCP then UDP */
- if (hintsp->ai_socktype == 0 || hintsp->ai_socktype == SOCK_STREAM)
- {
- if ((sptr = cygwin_getservbyname (serv, "tcp")) != NULL)
- {
- if ((rc = ga_port (aihead, sptr->s_port, SOCK_STREAM)) < 0)
- return (EAI_MEMORY);
- nfound += rc;
- }
- }
- if (hintsp->ai_socktype == 0 || hintsp->ai_socktype == SOCK_DGRAM)
- {
- if ((sptr = cygwin_getservbyname (serv, "udp")) != NULL)
- {
- if ((rc = ga_port (aihead, sptr->s_port, SOCK_DGRAM)) < 0)
- return (EAI_MEMORY);
- nfound += rc;
- }
- }
- }
-
- if (nfound == 0)
- {
- if (hintsp->ai_socktype == 0)
- return (EAI_NONAME); /* all calls to getservbyname() failed */
- else
- return (EAI_SERVICE); /* service not supported for socket type */
- }
- return (0);
-}
-
-/* end ga_serv */
-
-#ifdef UNIXdomain
-/* include ga_unix */
-static int
-ga_unix (const char *path, struct addrinfo *hintsp, struct addrinfo **result)
-{
- int rc;
- struct addrinfo *aihead, **aipnext;
-
- aihead = NULL;
- aipnext = &aihead;
-
- if (hintsp->ai_family != AF_UNSPEC && hintsp->ai_family != AF_LOCAL)
- return (EAI_ADDRFAMILY);
-
- if (hintsp->ai_socktype == 0)
- {
- /* 4no socket type specified: return stream then dgram */
- hintsp->ai_socktype = SOCK_STREAM;
- if ((rc = ga_aistruct (&aipnext, hintsp, path, AF_LOCAL)) != 0)
- return (rc);
- hintsp->ai_socktype = SOCK_DGRAM;
- }
-
- if ((rc = ga_aistruct (&aipnext, hintsp, path, AF_LOCAL)) != 0)
- return (rc);
-
- if (hintsp->ai_flags & AI_CANONNAME)
- {
- struct utsname myname;
-
- if (uname (&myname) < 0)
- return (EAI_SYSTEM);
- if ((aihead->ai_canonname = strdup (myname.nodename)) == NULL)
- return (EAI_MEMORY);
- }
-
- *result = aihead; /* pointer to first structure in linked list */
- return (0);
-}
-
-/* end ga_unix */
-#endif /* UNIXdomain */
-
-/* include gn_ipv46 */
-static int
-gn_ipv46 (char *host, size_t hostlen, char *serv, size_t servlen,
- void *aptr, size_t alen, int family, int port, int flags)
-{
- char *ptr;
- struct hostent *hptr;
- struct servent *sptr;
-
- if (host && hostlen > 0)
- {
- if (flags & NI_NUMERICHOST)
- {
- if (cygwin_inet_ntop (family, aptr, host, hostlen) == NULL)
- return (1);
- }
- else
- {
- hptr = cygwin_gethostbyaddr ((const char *) aptr, alen, family);
- if (hptr != NULL && hptr->h_name != NULL)
- {
- if (flags & NI_NOFQDN)
- {
- if ((ptr = strchr (hptr->h_name, '.')) != NULL)
- *ptr = 0; /* overwrite first dot */
- }
- //snprintf (host, hostlen, "%s", hptr->h_name);
- *host = '\0';
- strncat (host, hptr->h_name, hostlen - 1);
- }
- else
- {
- if (flags & NI_NAMEREQD)
- return (1);
- if (cygwin_inet_ntop (family, aptr, host, hostlen) == NULL)
- return (1);
- }
- }
- }
-
- if (serv && servlen > 0)
- {
- if (flags & NI_NUMERICSERV)
- {
- //snprintf (serv, servlen, "%d", ntohs (port));
- char buf[32];
- __small_sprintf (buf, "%d", ntohs (port));
- *serv = '\0';
- strncat (serv, buf, servlen - 1);
- }
- else
- {
- sptr = cygwin_getservbyport (port, (flags & NI_DGRAM) ? "udp" : NULL);
- if (sptr != NULL && sptr->s_name != NULL)
- {
- //snprintf (serv, servlen, "%s", sptr->s_name);
- *serv = '\0';
- strncat (serv, sptr->s_name, servlen - 1);
- }
- else
- {
- //snprintf (serv, servlen, "%d", ntohs (port));
- char buf[32];
- __small_sprintf (buf, "%d", ntohs (port));
- *serv = '\0';
- strncat (serv, buf, servlen - 1);
- }
- }
- }
- return (0);
-}
-
-/* end gn_ipv46 */
-
-/* include freeaddrinfo */
-void
-ipv4_freeaddrinfo (struct addrinfo *aihead)
-{
- struct addrinfo *ai, *ainext;
-
- for (ai = aihead; ai != NULL; ai = ainext)
- {
- if (ai->ai_addr != NULL)
- free (ai->ai_addr); /* socket address structure */
-
- if (ai->ai_canonname != NULL)
- free (ai->ai_canonname);
-
- ainext = ai->ai_next; /* can't fetch ai_next after free() */
- free (ai); /* the addrinfo{} itself */
- }
-}
-
-/* end freeaddrinfo */
-
-/* include ga1 */
-
-int
-ipv4_getaddrinfo (const char *hostname, const char *servname,
- const struct addrinfo *hintsp, struct addrinfo **result)
-{
- int rc, error, nsearch;
- char **ap, *canon;
- struct hostent *hptr;
- struct search search[3], *sptr;
- struct addrinfo hints, *aihead, **aipnext;
-
- /*
- * If we encounter an error we want to free() any dynamic memory
- * that we've allocated. This is our hack to simplify the code.
- */
-#define error(e) { error = (e); goto bad; }
-
- aihead = NULL; /* initialize automatic variables */
- aipnext = &aihead;
- canon = NULL;
-
- if (hintsp == NULL)
- {
- bzero (&hints, sizeof (hints));
- hints.ai_family = AF_UNSPEC;
- }
- else
- hints = *hintsp; /* struct copy */
-
- /* 4first some basic error checking */
- if ((rc = ga_echeck (hostname, servname, hints.ai_flags, hints.ai_family,
- hints.ai_socktype, hints.ai_protocol)) != 0)
- error (rc);
-
-#ifdef UNIXdomain
- /* 4special case Unix domain first */
- if (hostname != NULL &&
- (strcmp (hostname, "/local") == 0 || strcmp (hostname, "/unix") == 0) &&
- (servname != NULL && servname[0] == '/'))
- return (ga_unix (servname, &hints, result));
-#endif
-/* end ga1 */
-
-/* include ga3 */
- /* 4remainder of function for IPv4/IPv6 */
- nsearch = ga_nsearch (hostname, &hints, &search[0]);
- if (nsearch == -1)
- error (EAI_FAMILY);
- for (sptr = &search[0]; sptr < &search[nsearch]; sptr++)
- {
-#ifdef IPv4
- /* 4check for an IPv4 dotted-decimal string */
- if (isdigit (sptr->host[0]))
- {
- struct in_addr inaddr;
-
- if (inet_pton4 (sptr->host, (u_char *) &inaddr) == 1)
- {
- if (hints.ai_family != AF_UNSPEC && hints.ai_family != AF_INET)
- error (EAI_ADDRFAMILY);
- if (sptr->family != AF_INET)
- continue; /* ignore */
- rc = ga_aistruct (&aipnext, &hints, &inaddr, AF_INET);
- if (rc != 0)
- error (rc);
- continue;
- }
- }
-#endif
-
-#ifdef IPv6
- /* 4check for an IPv6 hex string */
- if ((isxdigit (sptr->host[0]) || sptr->host[0] == ':') &&
- (strchr (sptr->host, ':') != NULL))
- {
- struct in6_addr in6addr;
-
- if (inet_pton6 (sptr->host, &in6addr) == 1)
- {
- if (hints.ai_family != AF_UNSPEC && hints.ai_family != AF_INET6)
- error (EAI_ADDRFAMILY);
- if (sptr->family != AF_INET6)
- continue; /* ignore */
- rc = ga_aistruct (&aipnext, &hints, &in6addr, AF_INET6);
- if (rc != 0)
- error (rc);
- continue;
- }
- }
-#endif
-/* end ga3 */
-/* include ga4 */
-#ifdef IPv6
- /* 4remainder of for() to look up hostname */
- if ((_res.options & RES_INIT) == 0)
- res_init (); /* need this to set _res.options */
-#endif
-
- if (nsearch == 2)
- {
-#ifdef IPv6
- _res.options &= ~RES_USE_INET6;
-#endif
- hptr = gethostbyname2 (sptr->host, sptr->family);
- }
- else
- {
-#ifdef IPv6
- if (sptr->family == AF_INET6)
- _res.options |= RES_USE_INET6;
- else
- _res.options &= ~RES_USE_INET6;
-#endif
- hptr = gethostbyname (sptr->host);
- }
- if (hptr == NULL)
- {
- if (nsearch == 2)
- continue; /* failure OK if multiple searches */
-
- switch (h_errno)
- {
- case HOST_NOT_FOUND:
- error (EAI_NONAME);
- case TRY_AGAIN:
- error (EAI_AGAIN);
- case NO_RECOVERY:
- error (EAI_FAIL);
- case NO_DATA:
- error (EAI_NODATA);
- default:
- error (EAI_NONAME);
- }
- }
-
- /* 4check for address family mismatch if one specified */
- if (hints.ai_family != AF_UNSPEC && hints.ai_family != hptr->h_addrtype)
- error (EAI_ADDRFAMILY);
-
- /* 4save canonical name first time */
- if (hostname != NULL && hostname[0] != '\0' &&
- (hints.ai_flags & AI_CANONNAME) && canon == NULL)
- {
- if ((canon = strdup (hptr->h_name)) == NULL)
- error (EAI_MEMORY);
- }
-
- /* 4create one addrinfo{} for each returned address */
- for (ap = hptr->h_addr_list; *ap != NULL; ap++)
- {
- rc = ga_aistruct (&aipnext, &hints, *ap, hptr->h_addrtype);
- if (rc != 0)
- error (rc);
- }
- }
- if (aihead == NULL)
- error (EAI_NONAME); /* nothing found */
-/* end ga4 */
-
-/* include ga5 */
- /* 4return canonical name */
- if (hostname != NULL && hostname[0] != '\0' &&
- hints.ai_flags & AI_CANONNAME)
- {
- if (canon != NULL)
- aihead->ai_canonname = canon; /* strdup'ed earlier */
- else
- {
- if ((aihead->ai_canonname = strdup (search[0].host)) == NULL)
- error (EAI_MEMORY);
- }
- }
-
- /* 4now process the service name */
- if (servname != NULL && servname[0] != '\0')
- {
- if ((rc = ga_serv (aihead, &hints, servname)) != 0)
- error (rc);
- }
-
- *result = aihead; /* pointer to first structure in linked list */
- return (0);
-
-bad:
- ipv4_freeaddrinfo (aihead); /* free any alloc'ed memory */
- return (error);
-}
-
-/* end ga5 */
-
-/* include getnameinfo */
-int
-ipv4_getnameinfo (const struct sockaddr *sa, socklen_t salen,
- char *host, size_t hostlen,
- char *serv, size_t servlen, int flags)
-{
-
- switch (sa->sa_family)
- {
-#ifdef IPv4
- case AF_INET:
- {
- struct sockaddr_in *sain = (struct sockaddr_in *) sa;
-
- return (gn_ipv46 (host, hostlen, serv, servlen,
- &sain->sin_addr, sizeof (struct in_addr),
- AF_INET, sain->sin_port, flags));
- }
-#endif
-
-#ifdef IPv6
- case AF_INET6:
- {
- struct sockaddr_in6 *sain = (struct sockaddr_in6 *) sa;
-
- return (gn_ipv46 (host, hostlen, serv, servlen,
- &sain->sin6_addr, sizeof (struct in6_addr),
- AF_INET6, sain->sin6_port, flags));
- }
-#endif
-
-#ifdef UNIXdomain
- case AF_LOCAL:
- {
- struct sockaddr_un *un = (struct sockaddr_un *) sa;
-
- if (hostlen > 0)
- snprintf (host, hostlen, "%s", "/local");
- if (servlen > 0)
- snprintf (serv, servlen, "%s", un->sun_path);
- return (0);
- }
-#endif
-
- default:
- return (EAI_FAMILY);
- }
-}
-
-/* end getnameinfo */
-
-/* Start of cygwin specific wrappers around the gai functions. */
-
-struct gai_errmap_t
-{
- int w32_errval;
- const char *errtxt;
-};
-
-static gai_errmap_t gai_errmap[] =
-{
- {0, "Success"},
- {0, "Address family for hostname not supported"},
- {WSATRY_AGAIN, "Temporary failure in name resolution"},
- {WSAEINVAL, "Invalid value for ai_flags"},
- {WSANO_RECOVERY, "Non-recoverable failure in name resolution"},
- {WSAEAFNOSUPPORT, "ai_family not supported"},
- {WSA_NOT_ENOUGH_MEMORY, "Memory allocation failure"},
- {WSANO_DATA, "No address associated with hostname"},
- {WSAHOST_NOT_FOUND, "hostname nor servname provided, or not known"},
- {WSATYPE_NOT_FOUND, "servname not supported for ai_socktype"},
- {WSAESOCKTNOSUPPORT, "ai_socktype not supported"},
- {0, "System error returned in errno"},
- {0, "Invalid value for hints"},
- {0, "Resolved protocol is unknown"},
- {WSAEFAULT, "An argument buffer overflowed"}
-};
-
-extern "C" const char *
-cygwin_gai_strerror (int err)
-{
- if (err >= 0 && err < (int) (sizeof gai_errmap / sizeof *gai_errmap))
- return gai_errmap[err].errtxt;
- return "Unknown error";
-}
-
-static int
-w32_to_gai_err (int w32_err)
-{
- if (w32_err >= WSABASEERR)
- for (unsigned i = 0; i < sizeof gai_errmap / sizeof *gai_errmap; ++i)
- if (gai_errmap[i].w32_errval == w32_err)
- return i;
- return w32_err;
-}
-
-/* We can't use autoload here because we don't know where the functions
- are loaded from. On Win2K, the functions are available in the
- ipv6 technology preview lib called wship6.dll, in XP and above they
- are implemented in ws2_32.dll. For older systems we use the ipv4-only
- version above. */
-
-static void (WINAPI *freeaddrinfo)(const struct addrinfo *);
-static int (WINAPI *getaddrinfo)(const char *, const char *,
- const struct addrinfo *,
- struct addrinfo **);
-static int (WINAPI *getnameinfo)(const struct sockaddr *, socklen_t,
- char *, size_t, char *, size_t, int);
-static bool
-get_ipv6_funcs (HMODULE lib)
-{
- return ((freeaddrinfo = (void (WINAPI *)(const struct addrinfo *))
- GetProcAddress (lib, "freeaddrinfo"))
- && (getaddrinfo = (int (WINAPI *)(const char *, const char *,
- const struct addrinfo *,
- struct addrinfo **))
- GetProcAddress (lib, "getaddrinfo"))
- && (getnameinfo = (int (WINAPI *)(const struct sockaddr *,
- socklen_t, char *, size_t,
- char *, size_t, int))
- GetProcAddress (lib, "getnameinfo")));
-}
-
-static NO_COPY muto load_ipv6_guard;
-static NO_COPY bool ipv6_inited = false;
-#define load_ipv6() if (!ipv6_inited) load_ipv6_funcs ();
-
-static void
-load_ipv6_funcs ()
-{
- tmp_pathbuf tp;
- PWCHAR lib_name = tp.w_get ();
- size_t len;
- HMODULE lib;
-
- load_ipv6_guard.init ("klog_guard")->acquire ();
- if (ipv6_inited)
- goto out;
- WSAGetLastError (); /* Kludge. Enforce WSAStartup call. */
- if (GetSystemDirectoryW (lib_name, NT_MAX_PATH))
- {
- len = wcslen (lib_name);
- wcpcpy (lib_name + len, L"\\ws2_32.dll");
- if ((lib = LoadLibraryW (lib_name)))
- {
- if (get_ipv6_funcs (lib))
- goto out;
- FreeLibrary (lib);
- }
- wcpcpy (lib_name + len, L"\\wship6.dll");
- if ((lib = LoadLibraryW (lib_name)))
- {
- if (get_ipv6_funcs (lib))
- goto out;
- FreeLibrary (lib);
- }
- freeaddrinfo = NULL;
- getaddrinfo = NULL;
- getnameinfo = NULL;
- }
-out:
- ipv6_inited = true;
- load_ipv6_guard.release ();
-}
-
-extern "C" void
-cygwin_freeaddrinfo (struct addrinfo *addr)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return;
- ipv4_freeaddrinfo (addr);
-}
-
-extern "C" int
-cygwin_getaddrinfo (const char *hostname, const char *servname,
- const struct addrinfo *hints, struct addrinfo **res)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return EAI_SYSTEM;
- /* Both subsequent getaddrinfo implementations let all possible values
- in ai_flags slip through and just ignore unknowen values. So we have
- to check manually here. */
- if (hints && (hints->ai_flags
- & ~(AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_ALL
- | AI_NUMERICSERV | AI_ADDRCONFIG | AI_V4MAPPED)))
- return EAI_BADFLAGS;
- /* AI_NUMERICSERV is not supported in our replacement getaddrinfo, nor
- is it supported by Winsock prior to Vista. We just check the servname
- parameter by ourselves here. */
- if (hints && (hints->ai_flags & AI_NUMERICSERV))
- {
- char *p;
- if (servname && *servname && (strtoul (servname, &p, 10), *p))
- return EAI_NONAME;
- }
- load_ipv6 ();
- if (!getaddrinfo)
- return ipv4_getaddrinfo (hostname, servname, hints, res);
-
- struct addrinfo nhints, *dupres;
-
- /* AI_ADDRCONFIG is not supported prior to Vista. Rather it's
- the default and only possible setting.
- On Vista, the default behaviour is as if AI_ADDRCONFIG is set,
- apparently for performance reasons. To get the POSIX default
- behaviour, the AI_ALL flag has to be set. */
- if (wincap.supports_all_posix_ai_flags ()
- && hints && hints->ai_family == PF_UNSPEC)
- {
- nhints = *hints;
- hints = &nhints;
- nhints.ai_flags |= AI_ALL;
- }
- int ret = w32_to_gai_err (getaddrinfo (hostname, servname, hints, res));
- /* Always copy over to self-allocated memory. */
- if (!ret)
- {
- dupres = ga_duplist (*res, false);
- freeaddrinfo (*res);
- *res = dupres;
- if (!dupres)
- return EAI_MEMORY;
- }
- /* AI_V4MAPPED and AI_ALL are not supported prior to Vista. So, what
- we do here is to emulate AI_V4MAPPED. If no IPv6 addresses are
- returned, or the AI_ALL flag is set, we try with AF_INET again, and
- convert the returned IPv4 addresses into v4-in-v6 entries. This
- is done in ga_dup if the v4mapped flag is set. */
- if (!wincap.supports_all_posix_ai_flags ()
- && hints->ai_family == AF_INET6
- && (hints->ai_flags & AI_V4MAPPED)
- && (ret == EAI_NODATA || ret == EAI_NONAME
- || (hints->ai_flags & AI_ALL)))
- {
- struct addrinfo *v4res;
- nhints = *hints;
- nhints.ai_family = AF_INET;
- int ret2 = w32_to_gai_err (getaddrinfo (hostname, servname,
- &nhints, &v4res));
- if (!ret2)
- {
- dupres = ga_duplist (v4res, true);
- freeaddrinfo (v4res);
- if (!dupres)
- {
- if (!ret)
- ipv4_freeaddrinfo (*res);
- return EAI_MEMORY;
- }
- /* If a list of v6 addresses exists, append the v4-in-v6 address
- list. Otherwise just return the v4-in-v6 address list. */
- if (!ret)
- {
- struct addrinfo *ptr;
- for (ptr = *res; ptr->ai_next; ptr = ptr->ai_next)
- ;
- ptr->ai_next = dupres;
- }
- else
- *res = dupres;
- ret = 0;
- }
- }
- return ret;
-}
-
-extern "C" int
-cygwin_getnameinfo (const struct sockaddr *sa, socklen_t salen,
- char *host, size_t hostlen, char *serv,
- size_t servlen, int flags)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return EAI_SYSTEM;
- load_ipv6 ();
- if (!getnameinfo)
- return ipv4_getnameinfo (sa, salen, host, hostlen, serv, servlen, flags);
-
- /* When the incoming port number is set to 0, Winsock's getnameinfo
- returns with error WSANO_DATA instead of simply ignoring the port.
- To avoid this strange behaviour, we check manually, if the port number
- is 0. If so, set the NI_NUMERICSERV flag to avoid this problem. */
- switch (sa->sa_family)
- {
- case AF_INET:
- if (((struct sockaddr_in *) sa)->sin_port == 0)
- flags |= NI_NUMERICSERV;
- break;
- case AF_INET6:
- if (((struct sockaddr_in6 *) sa)->sin6_port == 0)
- flags |= NI_NUMERICSERV;
- break;
- }
- int ret = w32_to_gai_err (getnameinfo (sa, salen, host, hostlen, serv,
- servlen, flags));
- if (ret)
- set_winsock_errno ();
- return ret;
-}
-
-/* The below function has been taken from OpenBSD's src/sys/netinet6/in6.c. */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 1982, 1986, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in.c 8.2 (Berkeley) 11/15/93
- */
-
-static int
-in6_are_prefix_equal (struct in6_addr *p1, struct in6_addr *p2, int len)
-{
- int bytelen, bitlen;
-
- /* sanity check */
- if (0 > len || len > 128)
- return 0;
-
- bytelen = len / 8;
- bitlen = len % 8;
-
- if (memcmp (&p1->s6_addr, &p2->s6_addr, bytelen))
- return 0;
- /* len == 128 is ok because bitlen == 0 then */
- if (bitlen != 0 &&
- p1->s6_addr[bytelen] >> (8 - bitlen) !=
- p2->s6_addr[bytelen] >> (8 - bitlen))
- return 0;
-
- return 1;
-}
diff --git a/winsup/cygwin/netdb.cc b/winsup/cygwin/netdb.cc
deleted file mode 100644
index bf03d1f..0000000
--- a/winsup/cygwin/netdb.cc
+++ /dev/null
@@ -1,408 +0,0 @@
-/* netdb.cc: network database related routines.
-
- Copyright 2002, 2003, 2007 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <netdb.h>
-
-/* Locate and open a system network database file. relative_path
- should be one of the following values:
- "protocol"
- "services"
- "networks"
- "hosts"
-
- It is the callers responsibility to close the file. */
-static FILE *
-open_system_file (const char *relative_path)
-{
- /* system dir path is never longer. */
- char win32_name[MAX_PATH];
-
- if (!GetSystemDirectory (win32_name, MAX_PATH))
- return NULL;
- strcat (win32_name, "\\drivers\\etc\\");
- strcat (win32_name, relative_path);
- debug_printf ("netdb file to open %s", win32_name);
- FILE *result = fopen (win32_name, "rt");
- debug_printf ("handle to netdb file %p", result);
- return result;
-}
-
-inline static FILE *
-open_protocol_file ()
-{
- return open_system_file ("protocol");
-}
-
-/* Wrapper for open_system_file(), fixing the constant name
-"services". Returns the open file. */
-inline static FILE *
-open_services_file ()
-{
- return open_system_file ("services");
-}
-
-/* Read an entire line up till the next \n character. Memory for the
-line is dynamically allocated, and the caller must call free() to
-deallocate it. When the end of file is reached, NULL is returned. */
-static char *
-get_entire_line (FILE *fd)
-{
- static const int BUFF_SIZE = 1024;
- struct line_fragment
- {
- char buffer[BUFF_SIZE];
- line_fragment *next;
- };
-
- line_fragment *fragment_list_head = NULL;
- line_fragment *fragment = NULL;
- int fragment_count = 0;
- char *result;
-
- do
- {
- line_fragment *new_fragment = (line_fragment *) malloc (sizeof (line_fragment));
- paranoid_printf ("line fragment allocated %p", new_fragment);
- if (!fragment_list_head)
- fragment_list_head = new_fragment;
- if (fragment)
- fragment->next = new_fragment;
- fragment = new_fragment;
- fragment->next = NULL;
- *fragment->buffer = '\0';
- result = fgets (fragment->buffer, BUFF_SIZE, fd);
- ++fragment_count;
- }
- while (result && !strchr (fragment->buffer, '\n'));
-
- if (*fragment_list_head->buffer != '\0')
- {
- char *concatenated_line = (char *) calloc (fragment_count * BUFF_SIZE , sizeof (char));
- paranoid_printf ("concatenated line allocated %p", concatenated_line);
- *concatenated_line = '\0';
- fragment = fragment_list_head;
- while (fragment != NULL)
- {
- line_fragment *previous = fragment;
- strcat (concatenated_line, fragment->buffer);
- fragment = fragment->next;
- free (previous);
- }
- return concatenated_line;
- }
- else
- {
- fragment = fragment_list_head;
- while (fragment != NULL)
- {
- line_fragment *previous = fragment;
- fragment = fragment->next;
- free (previous);
- }
- return NULL;
- }
-}
-
-/* Characters representing whitespace. Used by parse_* routines to
-delimit tokens. */
-static const NO_COPY char *SPACE = " \t\n\r\f";
-
-/* Parse a list aliases from a network database file. Returns a
-char** structure terminated by a NULL. */
-static void
-parse_alias_list (char ***aliases, char **lasts)
-{
- struct alias_t
- {
- char *alias_name;
- alias_t *next;
- };
- alias_t *alias_list_head = NULL, *alias_list_tail = NULL;
- char *alias;
- int alias_count = 0;
- alias = strtok_r (NULL, SPACE, lasts);
-
- while (alias)
- {
- ++alias_count;
- alias_t *new_alias = (alias_t *) malloc (sizeof (alias_t));
- paranoid_printf ("new alias alloc %p", new_alias);
- if (!alias_list_head)
- alias_list_head = new_alias;
- if (alias_list_tail)
- alias_list_tail->next = new_alias;
- new_alias->next = NULL;
- new_alias->alias_name = alias;
- alias_list_tail = new_alias;
- alias = strtok_r (NULL, SPACE, lasts);
- }
-
- *aliases = (char**) calloc (alias_count + 1, sizeof (char *));
- paranoid_printf ("aliases alloc %p", *aliases);
-
- char **current_entry = *aliases;
- while (alias_list_head)
- {
- alias_t *previous = alias_list_head;
- *current_entry = strdup (alias_list_head->alias_name);
- paranoid_printf ("*current entry strdup %p", *current_entry);
- alias_list_head = alias_list_head->next;
- free (previous);
- ++current_entry;
- }
-
- *current_entry = NULL;
-}
-
-/* Read the next line from svc_file, and parse it into the structure
-pointed to by sep. sep can point to stack or static data, but it's
-members will be overwritten with pointers to dynamically allocated
-heap data accommodating parsed data. It is the responsibility of the
-caller to free up the allocated structures. The function returns true
-to indicate that a line was successfully read and parsed. False is
-used to indicate that no more lines can be read and parsed. This
-should also interpreted as end of file. */
-static bool
-parse_services_line (FILE *svc_file, struct servent *sep)
-{
- char *line;
- while ((line = get_entire_line (svc_file)))
- {
- char *name, *port, *protocol, *lasts;
-
- line[strcspn (line, "#")] = '\0'; // truncate at comment marker.
- name = strtok_r (line, SPACE, &lasts);
- if (!name)
- {
- free (line);
- continue;
- }
- port = strtok_r (NULL, SPACE, &lasts);
- protocol = strchr (port, '/');
- *protocol++ = '\0';
- sep->s_name = strdup (name);
- paranoid_printf ("sep->s_name strdup %p", sep->s_name);
- sep->s_port = atoi (port);
- sep->s_proto = strdup (protocol);
- paranoid_printf ("sep->s_proto strdup %p", sep->s_proto);
- /* parse_alias_list relies on side effects. Read the comments
- for that function.*/
- parse_alias_list (& sep->s_aliases, &lasts);
- free (line);
- return true;
- }
- return false;
-}
-
-static FILE *svc_file = NULL;
-static long int svc_read_pos = 0;
-static struct servent current_servent;
-
-/* Steps through a struct servent, and frees all of the internal
-structures.*/
-static void
-free_servent (struct servent *sep)
-{
- free (sep->s_name);
- free (sep->s_proto);
- char ** current = sep->s_aliases;
- while (current && *current)
- {
- free (*current);
- ++current;
- }
- free (sep->s_aliases);
- sep->s_name = NULL;
- sep->s_port = 0;
- sep->s_proto = NULL;
- sep->s_aliases = NULL;
-}
-
-extern "C" void
-cygwin_setservent (int stay_open)
-{
- if (svc_file)
- fclose (svc_file);
- if (stay_open)
- svc_file = open_services_file ();
- free_servent (&current_servent);
- svc_read_pos = 0;
- syscall_printf ("setservent (%d)", stay_open);
-}
-
-extern "C" struct servent *
-cygwin_getservent (void)
-{
- FILE *fd;
- if (svc_file)
- fd = svc_file;
- else
- {
- fd = open_services_file ();
- if (!fd)
- {
- syscall_printf ("%p = getservent()", NULL);
- return NULL;
- }
- fseek (fd, svc_read_pos, SEEK_SET);
- }
- free_servent (&current_servent);
- bool found = parse_services_line (fd, &current_servent);
- if (!svc_file)
- {
- svc_read_pos = ftell (fd);
- fclose (fd);
- }
- struct servent *result;
- if (found)
- result = &current_servent;
- else
- result = NULL;
- syscall_printf ("%p = getservent()", result);
- return result;
-}
-
-extern "C" void
-cygwin_endservent (void)
-{
- if (svc_file)
- {
- fclose (svc_file);
- svc_file = NULL;
- }
- free_servent (&current_servent);
- svc_read_pos = 0;
- syscall_printf ("endservent ()");
-}
-
-/* Read the next line from proto_file, and parse it into the structure
-pointed to by pep. pep can point to stack or static data, but it's
-members will be overwritten with pointers to dynamically allocated
-heap data accommodating parsed data. It is the responsibility of the
-caller to free up the allocated structures. The function returns true
-to indicate that a line was successfully read and parsed. False is
-used to indicate that no more lines can be read and parsed. This
-should also interpreted as end of file. */
-static bool
-parse_protocol_line (FILE *proto_file, struct protoent *pep)
-{
- char *line;
- while ((line = get_entire_line (proto_file)))
- {
- char *name, *protocol, *lasts;
-
- line[strcspn (line, "#")] = '\0'; // truncate at comment marker.
- name = strtok_r (line, SPACE, &lasts);
- if (!name)
- {
- free (line);
- continue;
- }
- protocol = strtok_r (NULL, SPACE, &lasts);
- pep->p_name = strdup (name);
- paranoid_printf ("pep->p_name strdup %p", pep->p_name);
- pep->p_proto = atoi (protocol);
- /* parse_alias_list relies on side effects. Read the comments
- for that function.*/
- parse_alias_list (& pep->p_aliases, &lasts);
- free (line);
- return true;
- }
- return false;
-}
-
-static FILE *proto_file = NULL;
-static long int proto_read_pos = 0;
-static struct protoent current_protoent;
-
-/* Steps through a struct protoent, and frees all the internal
-structures. */
-static void
-free_protoent (struct protoent *pep)
-{
- free (pep->p_name);
- char ** current = pep->p_aliases;
- while (current && *current)
- {
- free (*current);
- ++current;
- }
- free (pep->p_aliases);
- pep->p_name = NULL;
- pep->p_proto = 0;
- pep->p_aliases = NULL;
-}
-
-extern "C" void
-cygwin_setprotoent (int stay_open)
-{
- if (proto_file)
- fclose (proto_file);
-
- if (stay_open)
- proto_file = open_protocol_file ();
-
- free_protoent (&current_protoent);
- proto_read_pos = 0;
- syscall_printf ("setprotoent (%d)", stay_open);
-}
-
-extern "C" struct protoent *
-cygwin_getprotoent (void)
-{
- FILE *fd;
-
- if (proto_file)
- fd = proto_file;
- else
- {
- fd = open_protocol_file ();
- if (!fd)
- {
- syscall_printf ("%p = getprotoent()", NULL);
- return NULL;
- }
- fseek (fd, proto_read_pos, SEEK_SET);
- }
- free_protoent (&current_protoent);
-
- bool found = parse_protocol_line (fd, &current_protoent);
- if (!proto_file)
- {
- proto_read_pos = ftell (fd);
- fclose (fd);
- }
-
- struct protoent *result;
- if (found)
- result = &current_protoent;
- else
- result = NULL;
-
- syscall_printf ("%p = getprotoent()", result);
- return result;
-}
-
-extern "C" void
-cygwin_endprotoent (void)
-{
- if (proto_file)
- {
- fclose (proto_file);
- proto_file = NULL;
- }
-
- free_protoent (&current_protoent);
- proto_read_pos = 0;
- syscall_printf ("endprotoent ()");
-}
diff --git a/winsup/cygwin/newsym b/winsup/cygwin/newsym
deleted file mode 100755
index c9a249a..0000000
--- a/winsup/cygwin/newsym
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-lib=$1; shift
-as=$1; shift
-ar=$1; shift
-rm -rf newsym.dir
-trap "rm -rf newsym.dir" 0 1 2 15
-mkdir newsym.dir
-while [ -n "$1" ]; do
- newsym=$1; shift
- oldsym=$1; shift
- if [[ "$newsym" = *:d ]]; then
- newsym=${newsym%:d}
- else
- cat <<EOF
- .text
- .global _$newsym
-_$newsym:
- jmp *__imp__$oldsym
-EOF
- fi > newsym.dir/$newsym.s
-
- cat <<EOF >> newsym.dir/$newsym.s
- .section .idata\$7
- .long __head_cygwin1_dll
-
- .section .idata\$5
- .global __imp__$newsym
-__imp__$newsym: .rva 1f
-
- .section .idata\$4
- .rva 1f
-
- .section .idata\$6
-1: .short 2
- .asciz "$oldsym"
-EOF
- $as -o newsym.dir/$newsym.o newsym.dir/$newsym.s
-done
-$ar crus $lib newsym.dir/*.o
diff --git a/winsup/cygwin/nfs.cc b/winsup/cygwin/nfs.cc
deleted file mode 100644
index 46face1..0000000
--- a/winsup/cygwin/nfs.cc
+++ /dev/null
@@ -1,18 +0,0 @@
-/* nfs.cc
-
- Copyright 2008 Red Hat, Inc.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "sys/fcntl.h"
-#include "nfs.h"
-
-struct nfs_aol_ffei_t nfs_aol_ffei = { 0, 0, sizeof (NFS_ACT_ON_LINK) - 1, 0,
- NFS_ACT_ON_LINK };
-
-uint32_t nfs_type_mapping[] = { 0, S_IFREG, S_IFDIR, S_IFBLK,
- S_IFCHR, S_IFLNK, S_IFSOCK, S_IFIFO };
-
diff --git a/winsup/cygwin/nfs.h b/winsup/cygwin/nfs.h
deleted file mode 100644
index 657126f..0000000
--- a/winsup/cygwin/nfs.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* nfs.h
-
- Copyright 2008 Red Hat, Inc.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#define NFS_ACT_ON_LINK "NfsActOnLink"
-#define NFS_SYML_TARGET "NfsSymlinkTargetName"
-#define NFS_V3_ATTR "NfsV3Attributes"
-
-/* NFS datastructures per RFC 1813, as returned by SFU NFS. */
-
-enum ftype3 {
- NF3REG = 1,
- NF3DIR = 2,
- NF3BLK = 3,
- NF3CHR = 4,
- NF3LNK = 5,
- NF3SOCK = 6,
- NF3FIFO = 7
-};
-
-struct fattr3 {
- uint32_t type;
- uint32_t mode;
- uint32_t nlink;
- uint32_t uid;
- uint32_t gid;
- uint32_t filler1;
- uint64_t size;
- uint64_t used;
- struct
- {
- uint32_t specdata1;
- uint32_t specdata2;
- } rdev;
- uint64_t fsid;
- uint64_t fileid;
- timestruc_t atime;
- timestruc_t mtime;
- timestruc_t ctime;
-};
-
-struct nfs_aol_ffei_t {
- ULONG NextEntryOffset;
- UCHAR Flags;
- UCHAR EaNameLength;
- USHORT EaValueLength;
- CHAR EaName[sizeof (NFS_ACT_ON_LINK)];
-};
-extern struct nfs_aol_ffei_t nfs_aol_ffei;
-
-extern uint32_t nfs_type_mapping[];
diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h
deleted file mode 100644
index d38bdaf..0000000
--- a/winsup/cygwin/ntdll.h
+++ /dev/null
@@ -1,1086 +0,0 @@
-/* ntdll.h. Contains ntdll specific stuff not defined elsewhere.
-
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 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 STATUS_OBJECT_NAME_EXISTS ((NTSTATUS) 0x40000000)
-#define STATUS_BUFFER_OVERFLOW ((NTSTATUS) 0x80000005)
-#define STATUS_NO_MORE_FILES ((NTSTATUS) 0x80000006)
-#ifndef STATUS_INVALID_INFO_CLASS
-/* Some w32api header file defines this so we need to conditionalize this
- define to avoid warnings. */
-#define STATUS_INVALID_INFO_CLASS ((NTSTATUS) 0xc0000003)
-#endif
-#define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS) 0xc0000004)
-#define STATUS_INVALID_PARAMETER ((NTSTATUS) 0xc000000d)
-#define STATUS_NO_SUCH_FILE ((NTSTATUS) 0xc000000f)
-#define STATUS_INVALID_DEVICE_REQUEST ((NTSTATUS) 0xc0000010)
-#define STATUS_END_OF_FILE ((NTSTATUS) 0xc0000011)
-#define STATUS_NO_MEDIA_IN_DEVICE ((NTSTATUS) 0xc0000013)
-#define STATUS_ACCESS_DENIED ((NTSTATUS) 0xc0000022)
-#define STATUS_BUFFER_TOO_SMALL ((NTSTATUS) 0xc0000023)
-#define STATUS_OBJECT_NAME_INVALID ((NTSTATUS) 0xc0000033)
-#define STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS) 0xc0000034)
-#define STATUS_OBJECT_PATH_NOT_FOUND ((NTSTATUS) 0xc000003A)
-#define STATUS_SHARING_VIOLATION ((NTSTATUS) 0xc0000043)
-#define STATUS_EAS_NOT_SUPPORTED ((NTSTATUS) 0xC000004f)
-#define STATUS_EA_TOO_LARGE ((NTSTATUS) 0xc0000050)
-#define STATUS_NONEXISTENT_EA_ENTRY ((NTSTATUS) 0xc0000051)
-#define STATUS_NO_EAS_ON_FILE ((NTSTATUS) 0xc0000052)
-#define STATUS_DELETE_PENDING ((NTSTATUS) 0xc0000056)
-#define STATUS_DISK_FULL ((NTSTATUS) 0xc000007f)
-#define STATUS_WORKING_SET_QUOTA ((NTSTATUS) 0xc00000a1)
-#define STATUS_NOT_SUPPORTED ((NTSTATUS) 0xc00000bb)
-#define STATUS_DIRECTORY_NOT_EMPTY ((NTSTATUS) 0xc0000101)
-#define STATUS_NOT_ALL_ASSIGNED ((NTSTATUS) 0x00000106)
-#define STATUS_INVALID_LEVEL ((NTSTATUS) 0xc0000148)
-#define STATUS_DLL_NOT_FOUND ((NTSTATUS) 0xc0000135)
-#define STATUS_ENTRYPOINT_NOT_FOUND ((NTSTATUS) 0xc0000139)
-#define STATUS_BAD_DLL_ENTRYPOINT ((NTSTATUS) 0xc0000251)
-#define STATUS_ILLEGAL_DLL_RELOCATION ((NTSTATUS) 0xc0000269)
-
-#define PDI_MODULES 0x01
-#define PDI_HEAPS 0x04
-#define LDRP_IMAGE_DLL 0x00000004
-#define WSLE_PAGE_READONLY 0x001
-#define WSLE_PAGE_EXECUTE 0x002
-#define WSLE_PAGE_EXECUTE_READ 0x003
-#define WSLE_PAGE_READWRITE 0x004
-#define WSLE_PAGE_WRITECOPY 0x005
-#define WSLE_PAGE_EXECUTE_READWRITE 0x006
-#define WSLE_PAGE_EXECUTE_WRITECOPY 0x007
-#define WSLE_PAGE_SHARE_COUNT_MASK 0x0E0
-#define WSLE_PAGE_SHAREABLE 0x100
-
-#define FILE_SUPERSEDED 0
-#define FILE_OPENED 1
-#define FILE_CREATED 2
-#define FILE_OVERWRITTEN 3
-#define FILE_EXISTS 4
-#define FILE_DOES_NOT_EXIST 5
-
-#define FILE_WRITE_TO_END_OF_FILE (-1LL)
-#define FILE_USE_FILE_POINTER_POSITION (-2LL)
-
-/* Device Characteristics. */
-#define FILE_REMOVABLE_MEDIA 0x00000001
-#define FILE_READ_ONLY_DEVICE 0x00000002
-#define FILE_FLOPPY_DISKETTE 0x00000004
-#define FILE_WRITE_ONCE_MEDIA 0x00000008
-#define FILE_REMOTE_DEVICE 0x00000010
-#define FILE_DEVICE_IS_MOUNTED 0x00000020
-#define FILE_VIRTUAL_VOLUME 0x00000040
-#define FILE_AUTOGENERATED_DEVICE_NAME 0x00000080
-#define FILE_DEVICE_SECURE_OPEN 0x00000100
-
-/* Transaction access rights. */
-#define TRANSACTION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x3F)
-
-typedef enum _FILE_INFORMATION_CLASS
-{
- FileDirectoryInformation = 1,
- FileFullDirectoryInformation, // 2
- FileBothDirectoryInformation, // 3
- FileBasicInformation, // 4 wdm
- FileStandardInformation, // 5 wdm
- FileInternalInformation, // 6
- FileEaInformation, // 7
- FileAccessInformation, // 8
- FileNameInformation, // 9
- FileRenameInformation, // 10
- FileLinkInformation, // 11
- FileNamesInformation, // 12
- FileDispositionInformation, // 13
- FilePositionInformation, // 14 wdm
- FileFullEaInformation, // 15
- FileModeInformation, // 16
- FileAlignmentInformation, // 17
- FileAllInformation, // 18
- FileAllocationInformation, // 19
- FileEndOfFileInformation, // 20 wdm
- FileAlternateNameInformation, // 21
- FileStreamInformation, // 22
- FilePipeInformation, // 23
- FilePipeLocalInformation, // 24
- FilePipeRemoteInformation, // 25
- FileMailslotQueryInformation, // 26
- FileMailslotSetInformation, // 27
- FileCompressionInformation, // 28
- FileObjectIdInformation, // 29
- FileCompletionInformation, // 30
- FileMoveClusterInformation, // 31
- FileQuotaInformation, // 32
- FileReparsePointInformation, // 33
- FileNetworkOpenInformation, // 34
- FileAttributeTagInformation, // 35
- FileTrackingInformation, // 36
- FileIdBothDirectoryInformation, // 37
- FileIdFullDirectoryInformation, // 38
- FileValidDataLengthInformation, // 39
- FileShortNameInformation, // 40
- FileMaximumInformation
-} FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;
-
-typedef struct _FILE_NAMES_INFORMATION
-{
- ULONG NextEntryOffset;
- ULONG FileIndex;
- ULONG FileNameLength;
- WCHAR FileName[1];
-} FILE_NAMES_INFORMATION, *PFILE_NAMES_INFORMATION;
-
-typedef struct _FILE_DIRECTORY_INFORMATION {
- ULONG NextEntryOffset;
- ULONG FileIndex;
- LARGE_INTEGER CreationTime;
- LARGE_INTEGER LastAccessTime;
- LARGE_INTEGER LastWriteTime;
- LARGE_INTEGER ChangeTime;
- LARGE_INTEGER EndOfFile;
- LARGE_INTEGER AllocationSize;
- ULONG FileAttributes;
- ULONG FileNameLength;
- WCHAR FileName[1];
-} FILE_DIRECTORY_INFORMATION, *PFILE_DIRECTORY_INFORMATION;
-
-typedef struct _FILE_BOTH_DIR_INFORMATION
-{
- ULONG NextEntryOffset;
- ULONG FileIndex;
- LARGE_INTEGER CreationTime;
- LARGE_INTEGER LastAccessTime;
- LARGE_INTEGER LastWriteTime;
- LARGE_INTEGER ChangeTime;
- LARGE_INTEGER EndOfFile;
- LARGE_INTEGER AllocationSize;
- ULONG FileAttributes;
- ULONG FileNameLength;
- ULONG EaSize;
- CCHAR ShortNameLength;
- WCHAR ShortName[12];
- WCHAR FileName[1];
-} FILE_BOTH_DIR_INFORMATION, *PFILE_BOTH_DIR_INFORMATION;
-
-typedef struct _FILE_ID_BOTH_DIR_INFORMATION
-{
- ULONG NextEntryOffset;
- ULONG FileIndex;
- LARGE_INTEGER CreationTime;
- LARGE_INTEGER LastAccessTime;
- LARGE_INTEGER LastWriteTime;
- LARGE_INTEGER ChangeTime;
- LARGE_INTEGER EndOfFile;
- LARGE_INTEGER AllocationSize;
- ULONG FileAttributes;
- ULONG FileNameLength;
- ULONG EaSize;
- CCHAR ShortNameLength;
- WCHAR ShortName[12];
- LARGE_INTEGER FileId;
- WCHAR FileName[1];
-} FILE_ID_BOTH_DIR_INFORMATION, *PFILE_ID_BOTH_DIR_INFORMATION;
-
-
-#define AT_EXTENDABLE_FILE 0x00002000
-#define AT_ROUND_TO_PAGE 0x40000000
-
-#define LOCK_VM_IN_WSL 1
-#define LOCK_VM_IN_RAM 2
-
-#define DIRECTORY_QUERY 1
-#define DIRECTORY_TRAVERSE 2
-#define DIRECTORY_CREATE_OBJECT 4
-#define DIRECTORY_CREATE_SUBDIRECTORY 8
-#define DIRECTORY_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|0x0f)
-
-#define EVENT_QUERY_STATE 1
-#define SEMAPHORE_QUERY_STATE 1
-
-/* Specific ACCESS_MASKSs for objects created in Cygwin. */
-#define CYG_SHARED_DIR_ACCESS (DIRECTORY_QUERY \
- | DIRECTORY_TRAVERSE \
- | DIRECTORY_CREATE_SUBDIRECTORY \
- | DIRECTORY_CREATE_OBJECT \
- | READ_CONTROL)
-
-#define CYG_MUTANT_ACCESS (MUTANT_QUERY_STATE \
- | SYNCHRONIZE \
- | READ_CONTROL)
-
-#define CYG_EVENT_ACCESS (EVENT_QUERY_STATE \
- | EVENT_MODIFY_STATE \
- | SYNCHRONIZE \
- | READ_CONTROL)
-
-#define CYG_SEMAPHORE_ACCESS (SEMAPHORE_QUERY_STATE \
- | SEMAPHORE_MODIFY_STATE \
- | SYNCHRONIZE \
- | READ_CONTROL)
-
-typedef ULONG KAFFINITY;
-
-typedef enum _SYSTEM_INFORMATION_CLASS
-{
- SystemBasicInformation = 0,
- SystemPerformanceInformation = 2,
- SystemTimeOfDayInformation = 3,
- SystemProcessesAndThreadsInformation = 5,
- SystemProcessorTimes = 8,
- SystemPagefileInformation = 18,
- /* There are a lot more of these... */
-} SYSTEM_INFORMATION_CLASS;
-
-typedef struct _SYSTEM_BASIC_INFORMATION
-{
- ULONG Unknown;
- ULONG MaximumIncrement;
- ULONG PhysicalPageSize;
- ULONG NumberOfPhysicalPages;
- ULONG LowestPhysicalPage;
- ULONG HighestPhysicalPage;
- ULONG AllocationGranularity;
- ULONG LowestUserAddress;
- ULONG HighestUserAddress;
- ULONG ActiveProcessors;
- UCHAR NumberProcessors;
-} SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
-
-typedef struct _SYSTEM_PAGEFILE_INFORMATION
-{
- ULONG NextEntryOffset;
- ULONG CurrentSize;
- ULONG TotalUsed;
- ULONG PeakUsed;
- UNICODE_STRING FileName;
-} SYSTEM_PAGEFILE_INFORMATION, *PSYSTEM_PAGEFILE_INFORMATION;
-
-typedef struct __attribute__ ((aligned (8))) _SYSTEM_PROCESSOR_TIMES
-{
- LARGE_INTEGER IdleTime;
- LARGE_INTEGER KernelTime;
- LARGE_INTEGER UserTime;
- LARGE_INTEGER DpcTime;
- LARGE_INTEGER InterruptTime;
- ULONG InterruptCount;
-} SYSTEM_PROCESSOR_TIMES, *PSYSTEM_PROCESSOR_TIMES;
-
-typedef LONG KPRIORITY;
-typedef struct _VM_COUNTERS
-{
- ULONG PeakVirtualSize;
- ULONG VirtualSize;
- ULONG PageFaultCount;
- ULONG PeakWorkingSetSize;
- ULONG WorkingSetSize;
- ULONG QuotaPeakPagedPoolUsage;
- ULONG QuotaPagedPoolUsage;
- ULONG QuotaPeakNonPagedPoolUsage;
- ULONG QuotaNonPagedPoolUsage;
- ULONG PagefileUsage;
- ULONG PeakPagefileUsage;
-} VM_COUNTERS, *PVM_COUNTERS;
-
-typedef struct _CLIENT_ID
-{
- HANDLE UniqueProcess;
- HANDLE UniqueThread;
-} CLIENT_ID, *PCLIENT_ID;
-
-typedef enum
-{
- StateInitialized,
- StateReady,
- StateRunning,
- StateStandby,
- StateTerminated,
- StateWait,
- StateTransition,
- StateUnknown,
-} THREAD_STATE;
-
-typedef enum
-{
- Executive,
- FreePage,
- PageIn,
- PoolAllocation,
- DelayExecution,
- Suspended,
- UserRequest,
- WrExecutive,
- WrFreePage,
- WrPageIn,
- WrPoolAllocation,
- WrDelayExecution,
- WrSuspended,
- WrUserRequest,
- WrEventPair,
- WrQueue,
- WrLpcReceive,
- WrLpcReply,
- WrVirtualMemory,
- WrPageOut,
- WrRendezvous,
- Spare2,
- Spare3,
- Spare4,
- Spare5,
- Spare6,
- WrKernel,
- MaximumWaitReason
-} KWAIT_REASON;
-
-typedef struct _SYSTEM_THREADS
-{
- LARGE_INTEGER KernelTime;
- LARGE_INTEGER UserTime;
- LARGE_INTEGER CreateTime;
- ULONG WaitTime;
- PVOID StartAddress;
- CLIENT_ID ClientId;
- KPRIORITY Priority;
- KPRIORITY BasePriority;
- ULONG ContextSwitchCount;
- THREAD_STATE State;
- KWAIT_REASON WaitReason;
- DWORD Reserved;
-} SYSTEM_THREADS, *PSYSTEM_THREADS;
-
-typedef struct _SYSTEM_PROCESSES
-{
- ULONG NextEntryDelta;
- ULONG ThreadCount;
- ULONG Reserved1[6];
- LARGE_INTEGER CreateTime;
- LARGE_INTEGER UserTime;
- LARGE_INTEGER KernelTime;
- UNICODE_STRING ProcessName;
- KPRIORITY BasePriority;
- ULONG ProcessId;
- ULONG InheritedFromProcessId;
- ULONG HandleCount;
- ULONG Reserved2[2];
- VM_COUNTERS VmCounters;
- IO_COUNTERS IoCounters;
- SYSTEM_THREADS Threads[1];
-} SYSTEM_PROCESSES, *PSYSTEM_PROCESSES;
-
-typedef struct _IO_STATUS_BLOCK
-{
- NTSTATUS Status;
- ULONG Information;
-} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
-
-typedef struct _SYSTEM_PERFORMANCE_INFORMATION
-{
- LARGE_INTEGER IdleTime;
- LARGE_INTEGER ReadTransferCount;
- LARGE_INTEGER WriteTransferCount;
- LARGE_INTEGER OtherTransferCount;
- ULONG ReadOperationCount;
- ULONG WriteOperationCount;
- ULONG OtherOperationCount;
- ULONG AvailablePages;
- ULONG TotalCommittedPages;
- ULONG TotalCommitLimit;
- ULONG PeakCommitment;
- ULONG PageFaults;
- ULONG WriteCopyFaults;
- ULONG TransitionFaults;
- ULONG Reserved1;
- ULONG DemandZeroFaults;
- ULONG PagesRead;
- ULONG PageReadIos;
- ULONG Reserved2[2];
- ULONG PagefilePagesWritten;
- ULONG PagefilePageWriteIos;
- ULONG MappedFilePagesWritten;
- ULONG MappedFilePageWriteIos;
- ULONG PagedPoolUsage;
- ULONG NonPagedPoolUsage;
- ULONG PagedPoolAllocs;
- ULONG PagedPoolFrees;
- ULONG NonPagedPoolAllocs;
- ULONG NonPagedPoolFrees;
- ULONG TotalFreeSystemPtes;
- ULONG SystemCodePage;
- ULONG TotalSystemDriverPages;
- ULONG TotalSystemCodePages;
- ULONG SmallNonPagedLookasideListAllocateHits;
- ULONG SmallPagedLookasideListAllocateHits;
- ULONG Reserved3;
- ULONG MmSystemCachePage;
- ULONG PagedPoolPage;
- ULONG SystemDriverPage;
- ULONG FastReadNoWait;
- ULONG FastReadWait;
- ULONG FastReadResourceMiss;
- ULONG FastReadNotPossible;
- ULONG FastMdlReadNoWait;
- ULONG FastMdlReadWait;
- ULONG FastMdlReadResourceMiss;
- ULONG FastMdlReadNotPossible;
- ULONG MapDataNoWait;
- ULONG MapDataWait;
- ULONG MapDataNoWaitMiss;
- ULONG MapDataWaitMiss;
- ULONG PinMappedDataCount;
- ULONG PinReadNoWait;
- ULONG PinReadWait;
- ULONG PinReadNoWaitMiss;
- ULONG PinReadWaitMiss;
- ULONG CopyReadNoWait;
- ULONG CopyReadWait;
- ULONG CopyReadNoWaitMiss;
- ULONG CopyReadWaitMiss;
- ULONG MdlReadNoWait;
- ULONG MdlReadWait;
- ULONG MdlReadNoWaitMiss;
- ULONG MdlReadWaitMiss;
- ULONG ReadAheadIos;
- ULONG LazyWriteIos;
- ULONG LazyWritePages;
- ULONG DataFlushes;
- ULONG DataPages;
- ULONG ContextSwitches;
- ULONG FirstLevelTbFills;
- ULONG SecondLevelTbFills;
- ULONG SystemCalls;
-} SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION;
-
-typedef struct __attribute__ ((aligned(8))) _SYSTEM_TIME_OF_DAY_INFORMATION
-{
- LARGE_INTEGER BootTime;
- LARGE_INTEGER CurrentTime;
- LARGE_INTEGER TimeZoneBias;
- ULONG CurrentTimeZoneId;
-} SYSTEM_TIME_OF_DAY_INFORMATION, *PSYSTEM_TIME_OF_DAY_INFORMATION;
-
-typedef enum _PROCESSINFOCLASS
-{
- ProcessBasicInformation = 0,
- ProcessQuotaLimits = 1,
- ProcessVmCounters = 3,
- ProcessTimes = 4,
- ProcessSessionInformation = 24,
- ProcessWow64Information = 26,
-} PROCESSINFOCLASS;
-
-typedef struct _DEBUG_BUFFER
-{
- HANDLE SectionHandle;
- PVOID SectionBase;
- PVOID RemoteSectionBase;
- ULONG SectionBaseDelta;
- HANDLE EventPairHandle;
- ULONG Unknown[2];
- HANDLE RemoteThreadHandle;
- ULONG InfoClassMask;
- ULONG SizeOfInfo;
- ULONG AllocatedSize;
- ULONG SectionSize;
- PVOID ModuleInformation;
- PVOID BackTraceInformation;
- PVOID HeapInformation;
- PVOID LockInformation;
- PVOID Reserved[9];
-} DEBUG_BUFFER, *PDEBUG_BUFFER;
-
-typedef struct _DEBUG_HEAP_INFORMATION
-{
- ULONG Base;
- ULONG Flags;
- USHORT Granularity;
- USHORT Unknown;
- ULONG Allocated;
- ULONG Committed;
- ULONG TagCount;
- ULONG BlockCount;
- ULONG Reserved[7];
- PVOID Tags;
- PVOID Blocks;
-} DEBUG_HEAP_INFORMATION, *PDEBUG_HEAP_INFORMATION;
-
-typedef struct _DEBUG_MODULE_INFORMATION
-{
- ULONG Reserved[2];
- ULONG Base;
- ULONG Size;
- ULONG Flags;
- USHORT Index;
- USHORT Unknown;
- USHORT LoadCount;
- USHORT ModuleNameOffset;
- CHAR ImageName[256];
-} DEBUG_MODULE_INFORMATION, *PDEBUG_MODULE_INFORMATION;
-
-typedef struct _KERNEL_USER_TIMES
-{
- LARGE_INTEGER CreateTime;
- LARGE_INTEGER ExitTime;
- LARGE_INTEGER KernelTime;
- LARGE_INTEGER UserTime;
-} KERNEL_USER_TIMES, *PKERNEL_USER_TIMES;
-
-typedef struct _RTL_USER_PROCESS_PARAMETERS
-{
- ULONG AllocationSize;
- ULONG Size;
- ULONG Flags;
- ULONG DebugFlags;
- HANDLE hConsole;
- ULONG ProcessGroup;
- HANDLE hStdInput;
- HANDLE hStdOutput;
- HANDLE hStdError;
- UNICODE_STRING CurrentDirectoryName;
- HANDLE CurrentDirectoryHandle;
- UNICODE_STRING DllPath;
- UNICODE_STRING ImagePathName;
- UNICODE_STRING CommandLine;
- PWSTR Environment;
- ULONG dwX;
- ULONG dwY;
- ULONG dwXSize;
- ULONG dwYSize;
- ULONG dwXCountChars;
- ULONG dwYCountChars;
- ULONG dwFillAttribute;
- ULONG dwFlags;
- ULONG wShowWindow;
- UNICODE_STRING WindowTitle;
- UNICODE_STRING DesktopInfo;
- UNICODE_STRING ShellInfo;
- UNICODE_STRING RuntimeInfo;
-} RTL_USER_PROCESS_PARAMETERS, *PRTL_USER_PROCESS_PARAMETERS;
-
-typedef struct _PEB
-{
- BYTE Reserved1[2];
- BYTE BeingDebugged;
- BYTE Reserved2[9];
- PVOID LoaderData;
- PRTL_USER_PROCESS_PARAMETERS ProcessParameters;
- BYTE Reserved3[448];
- ULONG SessionId;
-} PEB, *PPEB;
-
-/* Simplifed definition, just to get the PEB pointer. */
-typedef struct _TEB
-{
- PVOID dummy[12];
- PPEB Peb;
- /* A lot more follows... */
-} TEB, *PTEB;
-
-typedef struct _PROCESS_BASIC_INFORMATION
-{
- NTSTATUS ExitStatus;
- PPEB PebBaseAddress;
- KAFFINITY AffinityMask;
- KPRIORITY BasePriority;
- ULONG UniqueProcessId;
- ULONG InheritedFromUniqueProcessId;
-} PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION;
-
-typedef struct _PROCESS_SESSION_INFORMATION
-{
- ULONG SessionId;
-} PROCESS_SESSION_INFORMATION, *PPROCESS_SESSION_INFORMATION;
-
-typedef enum _MEMORY_INFORMATION_CLASS
-{
- MemoryBasicInformation,
- MemoryWorkingSetList,
- MemorySectionName,
- MemoryBasicVlmInformation
-} MEMORY_INFORMATION_CLASS;
-
-typedef struct _MEMORY_WORKING_SET_LIST
-{
- ULONG NumberOfPages;
- ULONG WorkingSetList[1];
-} MEMORY_WORKING_SET_LIST, *PMEMORY_WORKING_SET_LIST;
-
-typedef struct _FILE_BASIC_INFORMATION {
- LARGE_INTEGER CreationTime;
- LARGE_INTEGER LastAccessTime;
- LARGE_INTEGER LastWriteTime;
- LARGE_INTEGER ChangeTime;
- ULONG FileAttributes;
-} FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION;
-
-typedef struct _FILE_STANDARD_INFORMATION {
- LARGE_INTEGER AllocationSize;
- LARGE_INTEGER EndOfFile;
- ULONG NumberOfLinks;
- BOOLEAN DeletePending;
- BOOLEAN Directory;
-} FILE_STANDARD_INFORMATION, *PFILE_STANDARD_INFORMATION;
-
-typedef struct _FILE_NETWORK_OPEN_INFORMATION {
- LARGE_INTEGER CreationTime;
- LARGE_INTEGER LastAccessTime;
- LARGE_INTEGER LastWriteTime;
- LARGE_INTEGER ChangeTime;
- LARGE_INTEGER AllocationSize;
- LARGE_INTEGER EndOfFile;
- ULONG FileAttributes;
-} FILE_NETWORK_OPEN_INFORMATION, *PFILE_NETWORK_OPEN_INFORMATION;
-
-typedef struct _FILE_INTERNAL_INFORMATION {
- LARGE_INTEGER FileId;
-} FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION;
-
-typedef struct _FILE_EA_INFORMATION {
- ULONG EaSize;
-} FILE_EA_INFORMATION, *PFILE_EA_INFORMATION;
-
-typedef struct _FILE_ACCESS_INFORMATION {
- ACCESS_MASK AccessFlags;
-} FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION;
-
-typedef struct _FILE_DISPOSITION_INFORMATION {
- BOOLEAN DeleteFile;
-} FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION;
-
-typedef struct _FILE_POSITION_INFORMATION {
- LARGE_INTEGER CurrentByteOffset;
-} FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION;
-
-typedef struct _FILE_END_OF_FILE_INFORMATION {
- LARGE_INTEGER EndOfFile;
-} FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION;
-
-typedef struct _FILE_MODE_INFORMATION {
- ULONG Mode;
-} FILE_MODE_INFORMATION, *PFILE_MODE_INFORMATION;
-
-typedef struct _FILE_ALIGNMENT_INFORMATION {
- ULONG AlignmentRequirement;
-} FILE_ALIGNMENT_INFORMATION;
-
-typedef struct _FILE_NAME_INFORMATION {
- ULONG FileNameLength;
- WCHAR FileName[1];
-} FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;
-
-typedef struct _FILE_LINK_INFORMATION {
- BOOLEAN ReplaceIfExists;
- HANDLE RootDirectory;
- ULONG FileNameLength;
- WCHAR FileName[1];
-} FILE_LINK_INFORMATION, *PFILE_LINK_INFORMATION;
-
-typedef struct _FILE_RENAME_INFORMATION {
- BOOLEAN ReplaceIfExists;
- HANDLE RootDirectory;
- ULONG FileNameLength;
- WCHAR FileName[1];
-} FILE_RENAME_INFORMATION, *PFILE_RENAME_INFORMATION;
-
-typedef struct _FILE_ALL_INFORMATION {
- FILE_BASIC_INFORMATION BasicInformation;
- FILE_STANDARD_INFORMATION StandardInformation;
- FILE_INTERNAL_INFORMATION InternalInformation;
- FILE_EA_INFORMATION EaInformation;
- FILE_ACCESS_INFORMATION AccessInformation;
- FILE_POSITION_INFORMATION PositionInformation;
- FILE_MODE_INFORMATION ModeInformation;
- FILE_ALIGNMENT_INFORMATION AlignmentInformation;
- FILE_NAME_INFORMATION NameInformation;
-} FILE_ALL_INFORMATION, *PFILE_ALL_INFORMATION;
-
-typedef struct _FILE_PIPE_LOCAL_INFORMATION
-{
- ULONG NamedPipeType;
- ULONG NamedPipeConfiguration;
- ULONG MaximumInstances;
- ULONG CurrentInstances;
- ULONG InboundQuota;
- ULONG ReadDataAvailable;
- ULONG OutboundQuota;
- ULONG WriteQuotaAvailable;
- ULONG NamedPipeState;
- ULONG NamedPipeEnd;
-} FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION;
-
-typedef struct _FILE_COMPRESSION_INFORMATION
-{
- LARGE_INTEGER CompressedFileSize;
- USHORT CompressionFormat;
- UCHAR CompressionUnitShift;
- UCHAR ChunkShift;
- UCHAR ClusterShift;
- UCHAR Reserved[3];
-} FILE_COMPRESSION_INFORMATION, *PFILE_COMPRESSION_INFORMATION;
-
-typedef struct _FILE_FS_DEVICE_INFORMATION
-{
- ULONG DeviceType;
- ULONG Characteristics;
-} FILE_FS_DEVICE_INFORMATION, *PFILE_FS_DEVICE_INFORMATION;
-
-typedef struct _FILE_FS_ATTRIBUTE_INFORMATION
-{
- ULONG FileSystemAttributes;
- ULONG MaximumComponentNameLength;
- ULONG FileSystemNameLength;
- WCHAR FileSystemName[1];
-} FILE_FS_ATTRIBUTE_INFORMATION, *PFILE_FS_ATTRIBUTE_INFORMATION;
-
-typedef struct _FILE_FS_VOLUME_INFORMATION
-{
- LARGE_INTEGER VolumeCreationTime;
- ULONG VolumeSerialNumber;
- ULONG VolumeLabelLength;
- BOOLEAN SupportsObjects;
- WCHAR VolumeLabel[1];
-} FILE_FS_VOLUME_INFORMATION, *PFILE_FS_VOLUME_INFORMATION;
-
-typedef struct _FILE_FS_SIZE_INFORMATION
-{
- LARGE_INTEGER TotalAllocationUnits;
- LARGE_INTEGER AvailableAllocationUnits;
- ULONG SectorsPerAllocationUnit;
- ULONG BytesPerSector;
-} FILE_FS_SIZE_INFORMATION, *PFILE_FS_SIZE_INFORMATION;
-
-typedef struct _FILE_FS_FULL_SIZE_INFORMATION
-{
- LARGE_INTEGER TotalAllocationUnits;
- LARGE_INTEGER CallerAvailableAllocationUnits;
- LARGE_INTEGER ActualAvailableAllocationUnits;
- ULONG SectorsPerAllocationUnit;
- ULONG BytesPerSector;
-} FILE_FS_FULL_SIZE_INFORMATION, *PFILE_FS_FULL_SIZE_INFORMATION;
-
-typedef struct _FILE_FS_OBJECTID_INFORMATION {
- UCHAR ObjectId[16];
- UCHAR ExtendedInfo[48];
-} FILE_FS_OBJECTID_INFORMATION, *PFILE_FS_OBJECTID_INFORMATION;
-
-typedef enum _FSINFOCLASS {
- FileFsVolumeInformation = 1,
- FileFsLabelInformation,
- FileFsSizeInformation,
- FileFsDeviceInformation,
- FileFsAttributeInformation,
- FileFsControlInformation,
- FileFsFullSizeInformation,
- FileFsObjectIdInformation,
- FileFsDriverPathInformation,
- FileFsMaximumInformation
-} FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS;
-
-typedef enum _OBJECT_INFORMATION_CLASS
-{
- ObjectBasicInformation = 0,
- ObjectNameInformation = 1,
- ObjectHandleInformation = 4
- // and many more
-} OBJECT_INFORMATION_CLASS;
-
-typedef struct _OBJECT_BASIC_INFORMATION
-{
- ULONG Attributes;
- ACCESS_MASK GrantedAccess;
- ULONG HandleCount;
- ULONG PointerCount;
- ULONG PagedPoolUsage;
- ULONG NonPagedPoolUsage;
- ULONG Reserved[3];
- ULONG NameInformationLength;
- ULONG TypeInformationLength;
- ULONG SecurityDescriptorLength;
- LARGE_INTEGER CreateTime;
-} OBJECT_BASIC_INFORMATION, *POBJECT_BASIC_INFORMATION;
-
-typedef struct _OBJECT_NAME_INFORMATION
-{
- UNICODE_STRING Name;
-} OBJECT_NAME_INFORMATION;
-
-typedef struct _DIRECTORY_BASIC_INFORMATION
-{
- UNICODE_STRING ObjectName;
- UNICODE_STRING ObjectTypeName;
-} DIRECTORY_BASIC_INFORMATION, *PDIRECTORY_BASIC_INFORMATION;
-
-typedef struct _FILE_GET_EA_INFORMATION
-{
- ULONG NextEntryOffset;
- UCHAR EaNameLength;
- CHAR EaName[1];
-} FILE_GET_EA_INFORMATION, *PFILE_GET_EA_INFORMATION;
-
-typedef struct _FILE_FULL_EA_INFORMATION
-{
- ULONG NextEntryOffset;
- UCHAR Flags;
- UCHAR EaNameLength;
- USHORT EaValueLength;
- CHAR EaName[1];
-} FILE_FULL_EA_INFORMATION, *PFILE_FULL_EA_INFORMATION;
-
-typedef struct _FILE_MAILSLOT_SET_INFORMATION
-{
- LARGE_INTEGER ReadTimeout;
-} FILE_MAILSLOT_SET_INFORMATION, *PFILE_MAILSLOT_SET_INFORMATION;
-
-typedef VOID NTAPI (*PIO_APC_ROUTINE)(PVOID, PIO_STATUS_BLOCK, ULONG);
-
-typedef enum _EVENT_TYPE
-{
- NotificationEvent = 0,
- SynchronizationEvent
-} EVENT_TYPE, *PEVENT_TYPE;
-
-typedef struct _EVENT_BASIC_INFORMATION
-{
- EVENT_TYPE EventType;
- LONG SignalState;
-} EVENT_BASIC_INFORMATION, *PEVENT_BASIC_INFORMATION;
-
-typedef enum _EVENT_INFORMATION_CLASS
-{
- EventBasicInformation = 0
-} EVENT_INFORMATION_CLASS, *PEVENT_INFORMATION_CLASS;
-
-/* Function declarations for ntdll.dll. These don't appear in any
- standard Win32 header. */
-extern "C"
-{
- NTSTATUS NTAPI NtAdjustPrivilegesToken (HANDLE, BOOLEAN, PTOKEN_PRIVILEGES,
- ULONG, PTOKEN_PRIVILEGES, PULONG);
- NTSTATUS NTAPI NtClose (HANDLE);
- NTSTATUS NTAPI NtCommitTransaction (HANDLE, BOOLEAN);
- NTSTATUS NTAPI NtCreateDirectoryObject (PHANDLE, ACCESS_MASK,
- POBJECT_ATTRIBUTES);
- NTSTATUS NTAPI NtCreateEvent (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES,
- EVENT_TYPE, BOOLEAN);
- NTSTATUS NTAPI NtCreateFile (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES,
- PIO_STATUS_BLOCK, PLARGE_INTEGER, ULONG, ULONG,
- ULONG, ULONG, PVOID, ULONG);
- NTSTATUS NTAPI NtCreateMailslotFile(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES,
- PIO_STATUS_BLOCK, ULONG, ULONG, ULONG,
- PLARGE_INTEGER);
- NTSTATUS NTAPI NtCreateMutant (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES,
- BOOLEAN);
- NTSTATUS NTAPI NtCreateSection (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES,
- PLARGE_INTEGER, ULONG, ULONG, HANDLE);
- NTSTATUS NTAPI NtCreateSemaphore (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES,
- LONG, LONG);
- NTSTATUS NTAPI NtCreateToken (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES,
- TOKEN_TYPE, PLUID, PLARGE_INTEGER, PTOKEN_USER,
- PTOKEN_GROUPS, PTOKEN_PRIVILEGES, PTOKEN_OWNER,
- PTOKEN_PRIMARY_GROUP, PTOKEN_DEFAULT_DACL,
- PTOKEN_SOURCE);
- NTSTATUS NTAPI NtCreateTransaction (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES,
- LPGUID, HANDLE, ULONG, ULONG, ULONG,
- PLARGE_INTEGER, PUNICODE_STRING);
- NTSTATUS NTAPI NtFsControlFile (HANDLE, HANDLE, PIO_APC_ROUTINE, PVOID,
- PIO_STATUS_BLOCK, ULONG, PVOID, ULONG,
- PVOID, ULONG);
- NTSTATUS NTAPI NtLockVirtualMemory (HANDLE, PVOID *, ULONG *, ULONG);
- NTSTATUS NTAPI NtMapViewOfSection (HANDLE, HANDLE, PVOID *, ULONG, ULONG,
- PLARGE_INTEGER, PULONG, SECTION_INHERIT,
- ULONG, ULONG);
- NTSTATUS NTAPI NtNotifyChangeDirectoryFile (HANDLE, HANDLE, PIO_APC_ROUTINE,
- PVOID, PIO_STATUS_BLOCK,
- PFILE_NOTIFY_INFORMATION, ULONG,
- ULONG, BOOLEAN);
- NTSTATUS NTAPI NtOpenDirectoryObject (PHANDLE, ACCESS_MASK,
- POBJECT_ATTRIBUTES);
- NTSTATUS NTAPI NtOpenEvent (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES);
- NTSTATUS NTAPI NtOpenFile (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES,
- PIO_STATUS_BLOCK, ULONG, ULONG);
- NTSTATUS NTAPI NtOpenMutant (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES);
- NTSTATUS NTAPI NtOpenSection (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES);
- NTSTATUS NTAPI NtOpenSemaphore (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES);
- /* WARNING! Don't rely on the timestamp information returned by
- NtQueryAttributesFile. Only the DOS file attribute info is reliable. */
- NTSTATUS NTAPI NtQueryAttributesFile (POBJECT_ATTRIBUTES,
- PFILE_BASIC_INFORMATION);
- NTSTATUS NTAPI NtQueryDirectoryFile(HANDLE, HANDLE, PVOID, PVOID,
- PIO_STATUS_BLOCK, PVOID, ULONG,
- FILE_INFORMATION_CLASS, BOOLEAN,
- PUNICODE_STRING, BOOLEAN);
- NTSTATUS NTAPI NtQueryDirectoryObject (HANDLE, PVOID, ULONG, BOOLEAN,
- BOOLEAN, PULONG, PULONG);
- NTSTATUS NTAPI NtQueryEaFile (HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG,
- BOOLEAN, PVOID, ULONG, PULONG, BOOLEAN);
- NTSTATUS NTAPI NtQueryEvent (HANDLE, EVENT_INFORMATION_CLASS, PVOID, ULONG,
- PULONG);
- NTSTATUS NTAPI NtQueryFullAttributesFile (POBJECT_ATTRIBUTES,
- PFILE_NETWORK_OPEN_INFORMATION);
- NTSTATUS NTAPI NtQueryInformationFile (HANDLE, PIO_STATUS_BLOCK, PVOID,
- ULONG, FILE_INFORMATION_CLASS);
- NTSTATUS NTAPI NtQueryInformationProcess (HANDLE, PROCESSINFOCLASS,
- PVOID, ULONG, PULONG);
- NTSTATUS NTAPI NtQueryObject (HANDLE, OBJECT_INFORMATION_CLASS, VOID *,
- ULONG, ULONG *);
- NTSTATUS NTAPI NtQuerySystemInformation (SYSTEM_INFORMATION_CLASS,
- PVOID, ULONG, PULONG);
- NTSTATUS NTAPI NtQuerySecurityObject (HANDLE, SECURITY_INFORMATION,
- PSECURITY_DESCRIPTOR, ULONG, PULONG);
- NTSTATUS NTAPI NtQueryVirtualMemory (HANDLE, PVOID, MEMORY_INFORMATION_CLASS,
- PVOID, ULONG, PULONG);
- NTSTATUS NTAPI NtQueryVolumeInformationFile (HANDLE, IO_STATUS_BLOCK *,
- VOID *, ULONG,
- FS_INFORMATION_CLASS);
- NTSTATUS NTAPI NtReadFile (HANDLE, HANDLE, PIO_APC_ROUTINE, PVOID,
- PIO_STATUS_BLOCK, PVOID, ULONG, PLARGE_INTEGER,
- PULONG);
- NTSTATUS NTAPI NtRollbackTransaction (HANDLE, BOOLEAN);
- NTSTATUS NTAPI NtSetEaFile (HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG);
- NTSTATUS NTAPI NtSetInformationFile (HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG,
- FILE_INFORMATION_CLASS);
- NTSTATUS NTAPI NtSetSecurityObject (HANDLE, SECURITY_INFORMATION,
- PSECURITY_DESCRIPTOR);
- NTSTATUS NTAPI NtUnlockVirtualMemory (HANDLE, PVOID *, ULONG *, ULONG);
- NTSTATUS NTAPI NtUnmapViewOfSection (HANDLE, PVOID);
- NTSTATUS NTAPI NtWriteFile (HANDLE, HANDLE, PIO_APC_ROUTINE, PVOID,
- PIO_STATUS_BLOCK, PVOID, ULONG, PLARGE_INTEGER,
- PULONG);
- NTSTATUS NTAPI RtlAppendUnicodeToString (PUNICODE_STRING, PCWSTR);
- NTSTATUS NTAPI RtlAppendUnicodeStringToString (PUNICODE_STRING,
- PUNICODE_STRING);
- VOID NTAPI RtlAcquirePebLock ();
- NTSTATUS NTAPI RtlAnsiStringToUnicodeString (PUNICODE_STRING, PANSI_STRING,
- BOOLEAN);
- LONG NTAPI RtlCompareUnicodeString (PUNICODE_STRING, PUNICODE_STRING,
- BOOLEAN);
- NTSTATUS NTAPI RtlConvertSidToUnicodeString (PUNICODE_STRING, PSID, BOOLEAN);
- VOID NTAPI RtlCopyUnicodeString (PUNICODE_STRING, PUNICODE_STRING);
- BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz (PUNICODE_STRING, PCSTR);
- NTSTATUS NTAPI RtlDowncaseUnicodeString (PUNICODE_STRING, PUNICODE_STRING,
- BOOLEAN);
- BOOLEAN NTAPI RtlEqualUnicodeString (PUNICODE_STRING, PUNICODE_STRING,
- BOOLEAN);
- VOID NTAPI RtlFreeAnsiString (PANSI_STRING);
- VOID NTAPI RtlFreeOemString (POEM_STRING);
- VOID NTAPI RtlFreeUnicodeString (PUNICODE_STRING);
- HANDLE NTAPI RtlGetCurrentTransaction ();
- VOID NTAPI RtlInitEmptyUnicodeString (PUNICODE_STRING, PCWSTR, USHORT);
- VOID NTAPI RtlInitUnicodeString (PUNICODE_STRING, PCWSTR);
- NTSTATUS NTAPI RtlIntegerToUnicodeString (ULONG, ULONG, PUNICODE_STRING);
- ULONG NTAPI RtlIsDosDeviceName_U (PCWSTR);
- ULONG NTAPI RtlNtStatusToDosError (NTSTATUS);
- NTSTATUS NTAPI RtlOemStringToUnicodeString (PUNICODE_STRING, POEM_STRING,
- BOOLEAN);
- BOOLEAN NTAPI RtlPrefixUnicodeString (PUNICODE_STRING, PUNICODE_STRING,
- BOOLEAN);
- VOID NTAPI RtlReleasePebLock ();
- VOID NTAPI RtlSecondsSince1970ToTime (ULONG, PLARGE_INTEGER);
- BOOLEAN NTAPI RtlSetCurrentTransaction (HANDLE);
- NTSTATUS NTAPI RtlUnicodeStringToAnsiString (PANSI_STRING, PUNICODE_STRING,
- BOOLEAN);
- NTSTATUS NTAPI RtlUnicodeStringToOemString (PANSI_STRING, PUNICODE_STRING,
- BOOLEAN);
- WCHAR NTAPI RtlUpcaseUnicodeChar (WCHAR);
- NTSTATUS NTAPI RtlUpcaseUnicodeString (PUNICODE_STRING, PUNICODE_STRING,
- BOOLEAN);
-
- /* A few Rtl functions are either actually macros, or they just don't
- exist even though they would be a big help. We implement them here,
- partly as inline functions. */
-
- /* RtlInitEmptyUnicodeString is defined as a macro in wdm.h, but that file
- is missing entirely in w32api. */
- inline
- VOID NTAPI RtlInitEmptyUnicodeString(PUNICODE_STRING dest, PCWSTR buf,
- USHORT len)
- {
- dest->Length = 0;
- dest->MaximumLength = len;
- dest->Buffer = (PWSTR) buf;
- }
- /* Like RtlInitEmptyUnicodeString, but initialize Length to len, too.
- This is for instance useful when creating a UNICODE_STRING from an
- NtQueryInformationFile info buffer, where the length of the filename
- is known, but you can't rely on the string being 0-terminated.
- If you know it's 0-terminated, just use RtlInitUnicodeString(). */
- inline
- VOID NTAPI RtlInitCountedUnicodeString (PUNICODE_STRING dest, PCWSTR buf,
- USHORT len)
- {
- dest->Length = dest->MaximumLength = len;
- dest->Buffer = (PWSTR) buf;
- }
- /* Split path into dirname and basename part. This function does not
- copy anything! It just initializes the dirname and basename
- UNICODE_STRINGs so that their Buffer members point to the right spot
- into path's Buffer, and the Length (and MaximumLength) members are set
- to match the dirname part and the basename part.
- Note that dirname's Length is set so that it also includes the trailing
- backslash. If you don't need it, just subtract sizeof(WCHAR) from
- dirname.Length. */
- inline
- VOID NTAPI RtlSplitUnicodePath (PUNICODE_STRING path, PUNICODE_STRING dirname,
- PUNICODE_STRING basename)
- {
- USHORT len = path->Length / sizeof (WCHAR);
- while (len > 0 && path->Buffer[--len] != L'\\')
- ;
- ++len;
- if (dirname)
- RtlInitCountedUnicodeString (dirname, path->Buffer, len * sizeof (WCHAR));
- if (basename)
- RtlInitCountedUnicodeString (basename, &path->Buffer[len],
- path->Length - len * sizeof (WCHAR));
- }
- /* Check if prefix is a prefix of path. */
- inline
- BOOLEAN NTAPI RtlEqualUnicodePathPrefix (PUNICODE_STRING path, PCWSTR prefix,
- BOOLEAN caseinsensitive)
- {
- UNICODE_STRING p, pref;
-
- RtlInitUnicodeString (&pref, prefix);
- RtlInitCountedUnicodeString (&p, path->Buffer,
- pref.Length < path->Length
- ? pref.Length : path->Length);
- return RtlEqualUnicodeString (&p, &pref, caseinsensitive);
- }
- /* Check if sufffix is a sufffix of path. */
- inline
- BOOL NTAPI RtlEqualUnicodePathSuffix (PUNICODE_STRING path, PCWSTR suffix,
- BOOLEAN caseinsensitive)
- {
- UNICODE_STRING p, suf;
-
- RtlInitUnicodeString (&suf, suffix);
- if (suf.Length < path->Length)
- RtlInitCountedUnicodeString (&p, (PWCHAR) ((PBYTE) path->Buffer
- + path->Length - suf.Length),
- suf.Length);
- else
- RtlInitCountedUnicodeString (&p, path->Buffer, path->Length);
- return RtlEqualUnicodeString (&p, &suf, caseinsensitive);
- }
- /* Implemented in strfuncs.cc. Create a Hex UNICODE_STRING from a given
- 64 bit integer value. If append is TRUE, append the hex string,
- otherwise overwrite dest. Returns either STATUS_SUCCESS, or
- STATUS_BUFFER_OVERFLOW, if the unicode buffer is too small (hasn't
- room for 16 WCHARs). */
- NTSTATUS NTAPI RtlInt64ToHexUnicodeString (ULONGLONG value,
- PUNICODE_STRING dest,
- BOOLEAN append);
- /* Set file attributes. Don't change file times. */
- inline
- NTSTATUS NTAPI NtSetAttributesFile (HANDLE h, ULONG attr)
- {
- IO_STATUS_BLOCK io;
- FILE_BASIC_INFORMATION fbi;
- fbi.CreationTime.QuadPart = fbi.LastAccessTime.QuadPart =
- fbi.LastWriteTime.QuadPart = fbi.ChangeTime.QuadPart = 0LL;
- fbi.FileAttributes = attr ?: FILE_ATTRIBUTE_NORMAL;
- return NtSetInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation);
- }
-}
diff --git a/winsup/cygwin/ntea.cc b/winsup/cygwin/ntea.cc
deleted file mode 100644
index 5b4ec3b..0000000
--- a/winsup/cygwin/ntea.cc
+++ /dev/null
@@ -1,491 +0,0 @@
-/* ntea.cc: code for manipulating Extended Attributes
-
- Copyright 1997, 1998, 2000, 2001, 2006, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "cygtls.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "ntdll.h"
-#include <stdlib.h>
-#include <attr/xattr.h>
-
-#define MAX_EA_NAME_LEN 256
-#define MAX_EA_VALUE_LEN 65536
-
-/* At least one maximum sized entry fits. */
-#define EA_BUFSIZ (sizeof (FILE_FULL_EA_INFORMATION) + MAX_EA_NAME_LEN \
- + MAX_EA_VALUE_LEN)
-
-#define NEXT_FEA(p) ((PFILE_FULL_EA_INFORMATION) (p->NextEntryOffset \
- ? (char *) p + p->NextEntryOffset : NULL))
-
-ssize_t __stdcall
-read_ea (HANDLE hdl, path_conv &pc, const char *name, char *value, size_t size)
-{
- OBJECT_ATTRIBUTES attr;
- NTSTATUS status;
- IO_STATUS_BLOCK io;
- ssize_t ret = -1;
- HANDLE h = hdl;
- ULONG glen = 0;
- PFILE_GET_EA_INFORMATION gea = NULL;
- PFILE_FULL_EA_INFORMATION fea;
- /* We have to store the latest EaName to compare with the next one, since
- ZwQueryEaFile has a bug when accessing files on a remote share. It
- returns the last EA entry of the file infinitely. Even utilizing the
- optional EaIndex only helps marginally. If you use that, the last
- EA in the file is returned twice. */
- char lastname[MAX_EA_NAME_LEN];
-
- myfault efault;
- if (efault.faulted (EFAULT))
- goto out;
-
- pc.get_object_attr (attr, sec_none_nih);
-
- debug_printf ("read_ea (%S, %s, %p, %lu)",
- attr.ObjectName, name, value, size);
-
- fea = (PFILE_FULL_EA_INFORMATION) alloca (EA_BUFSIZ);
-
- if (name)
- {
- size_t nlen;
-
- /* Samba hides the user namespace from Windows clients. If we try to
- retrieve a user namespace item, we remove the leading namespace from
- the name, otherwise the search fails. */
- if (!pc.fs_is_samba ())
- /* nothing to do */;
- else if (ascii_strncasematch (name, "user.", 5))
- name += 5;
- else
- {
- set_errno (ENOATTR);
- goto out;
- }
-
- if ((nlen = strlen (name)) >= MAX_EA_NAME_LEN)
- {
- set_errno (EINVAL);
- return -1;
- }
- glen = sizeof (FILE_GET_EA_INFORMATION) + nlen;
- gea = (PFILE_GET_EA_INFORMATION) alloca (glen);
-
- gea->NextEntryOffset = 0;
- gea->EaNameLength = nlen;
- strcpy (gea->EaName, name);
- }
-
- while (true)
- {
- if (h)
- {
- status = NtQueryEaFile (h, &io, fea, EA_BUFSIZ, TRUE, gea, glen,
- NULL, TRUE);
- if (status != STATUS_ACCESS_DENIED || !hdl)
- break;
- }
- status = NtOpenFile (&h, READ_CONTROL | FILE_READ_EA, &attr, &io,
- FILE_SHARE_VALID_FLAGS, FILE_OPEN_FOR_BACKUP_INTENT);
- if (!NT_SUCCESS (status))
- break;
- hdl = NULL;
- }
- if (!NT_SUCCESS (status))
- {
- if (status == STATUS_NO_EAS_ON_FILE)
- ret = 0;
- else if (status == STATUS_NONEXISTENT_EA_ENTRY)
- /* Actually this error code is either never generated, or it was only
- generated in some old and long forgotton NT version. See below. */
- set_errno (ENOATTR);
- else
- __seterrno_from_nt_status (status);
- goto out;
- }
- if (name)
- {
- if (size > 0)
- {
- if (size < fea->EaValueLength)
- {
- set_errno (ERANGE);
- goto out;
- }
- /* Another weird behaviour of ZwQueryEaFile. If you ask for a
- specific EA which is not present in the file's EA list, you don't
- get a useful error code like STATUS_NONEXISTENT_EA_ENTRY. Rather
- ZwQueryEaFile returns success with the entry's EaValueLength
- set to 0. */
- if (!fea->EaValueLength)
- {
- set_errno (ENOATTR);
- goto out;
- }
- else
- memcpy (value, fea->EaName + fea->EaNameLength + 1,
- fea->EaValueLength);
- }
- ret = fea->EaValueLength;
- }
- else
- {
- ret = 0;
- do
- {
- if (pc.fs_is_samba ()) /* See below. */
- fea->EaNameLength += 5;
- if (size > 0)
- {
- if ((size_t) ret + fea->EaNameLength + 1 > size)
- {
- set_errno (ERANGE);
- goto out;
- }
- /* Samba hides the user namespace from Windows clients. We add
- it in EA listings to keep tools like attr/getfattr/setfattr
- happy. */
- char tmpbuf[MAX_EA_NAME_LEN * 2], *tp = tmpbuf;
- if (pc.fs_is_samba ())
- tp = stpcpy (tmpbuf, "user.");
- stpcpy (tp, fea->EaName);
- /* NTFS stores all EA names in uppercase unfortunately. To keep
- compatibility with ext/xfs EA namespaces and accompanying
- tools, which expect the namespaces to be lower case, we return
- EA names in lowercase if the file is on a native NTFS. */
- if (pc.fs_is_ntfs ())
- strlwr (tp);
- tp = stpcpy (value, tmpbuf) + 1;
- ret += tp - value;
- value = tp;
- }
- else
- ret += fea->EaNameLength + 1;
- strcpy (lastname, fea->EaName);
- status = NtQueryEaFile (h, &io, fea, EA_BUFSIZ, TRUE, NULL, 0,
- NULL, FALSE);
- }
- while (NT_SUCCESS (status) && strcmp (lastname, fea->EaName) != 0);
- }
-
-out:
- if (!hdl)
- CloseHandle (h);
- debug_printf ("%d = read_ea (%S, %s, %p, %lu)",
- ret, attr.ObjectName, name, value, size);
- return ret;
-}
-
-int __stdcall
-write_ea (HANDLE hdl, path_conv &pc, const char *name, const char *value,
- size_t size, int flags)
-{
- OBJECT_ATTRIBUTES attr;
- NTSTATUS status;
- IO_STATUS_BLOCK io;
- int ret = -1;
- HANDLE h = hdl;
- PFILE_FULL_EA_INFORMATION fea;
- ULONG flen;
- size_t nlen;
-
- myfault efault;
- if (efault.faulted (EFAULT))
- goto out;
-
- pc.get_object_attr (attr, sec_none_nih);
-
- debug_printf ("write_ea (%S, %s, %p, %lu, %d)",
- attr.ObjectName, name, value, size, flags);
-
- /* Samba hides the user namespace from Windows clients. If we get a
- user namespace item, we remove the leading namespace from the name.
- This keeps tools like attr/getfattr/setfattr happy. Otherwise
- setting the EA fails as if we don't have the permissions. */
- if (pc.fs_is_samba () && ascii_strncasematch (name, "user.", 5))
- name += 5;
- else
- {
- set_errno (EOPNOTSUPP);
- goto out;
- }
-
- /* removexattr is supposed to fail with ENOATTR if the requested EA is not
- available. This is equivalent to the XATTR_REPLACE flag for setxattr. */
- if (!value)
- flags = XATTR_REPLACE;
-
- if (flags)
- {
- if (flags != XATTR_CREATE && flags != XATTR_REPLACE)
- {
- set_errno (EINVAL);
- goto out;
- }
- ssize_t rret = read_ea (hdl, pc, name, NULL, 0);
- if (flags == XATTR_CREATE && rret > 0)
- {
- set_errno (EEXIST);
- goto out;
- }
- if (flags == XATTR_REPLACE && rret < 0)
- goto out;
- }
-
- if ((nlen = strlen (name)) >= MAX_EA_NAME_LEN)
- {
- set_errno (EINVAL);
- goto out;
- }
- flen = sizeof (FILE_FULL_EA_INFORMATION) + nlen + 1 + size;
- fea = (PFILE_FULL_EA_INFORMATION) alloca (flen);
- fea->NextEntryOffset = 0;
- fea->Flags = 0;
- fea->EaNameLength = nlen;
- fea->EaValueLength = size;
- strcpy (fea->EaName, name);
- if (value)
- memcpy (fea->EaName + fea->EaNameLength + 1, value, size);
-
- while (true)
- {
- if (h)
- {
- status = NtSetEaFile (h, &io, fea, flen);
- if (status != STATUS_ACCESS_DENIED || !hdl)
- break;
- }
- status = NtOpenFile (&h, READ_CONTROL | FILE_WRITE_EA, &attr, &io,
- FILE_SHARE_VALID_FLAGS, FILE_OPEN_FOR_BACKUP_INTENT);
- if (!NT_SUCCESS (status))
- break;
- hdl = NULL;
- }
- if (!NT_SUCCESS (status))
- {
- /* STATUS_EA_TOO_LARGE has a matching Win32 error ERROR_EA_TABLE_FULL.
- Too bad RtlNtStatusToDosError does not translate STATUS_EA_TOO_LARGE
- to ERROR_EA_TABLE_FULL, but to ERROR_EA_LIST_INCONSISTENT. This
- error code is also returned for STATUS_EA_LIST_INCONSISTENT, which
- means the incoming EA list is... inconsistent. For obvious reasons
- we translate ERROR_EA_LIST_INCONSISTENT to EINVAL, so we have to
- handle STATUS_EA_TOO_LARGE explicitely here, to get the correct
- mapping to ENOSPC. */
- if (status == STATUS_EA_TOO_LARGE)
- set_errno (ENOSPC);
- else
- __seterrno_from_nt_status (status);
- }
- else
- ret = 0;
-
-out:
- if (!hdl)
- CloseHandle (h);
- debug_printf ("%d = write_ea (%S, %s, %p, %lu, %d)",
- ret, attr.ObjectName, name, value, size, flags);
- return ret;
-}
-
-static ssize_t __stdcall
-getxattr_worker (path_conv &pc, const char *name, void *value, size_t size)
-{
- int res = -1;
-
- if (pc.error)
- {
- debug_printf ("got %d error from build_fh_name", pc.error);
- set_errno (pc.error);
- }
- else if (pc.exists ())
- {
- fhandler_base *fh;
-
- if (!(fh = build_fh_pc (pc)))
- return -1;
-
- res = fh->fgetxattr (name, value, size);
- delete fh;
- }
- else
- set_errno (ENOENT);
- return res;
-}
-
-extern "C" ssize_t
-getxattr (const char *path, const char *name, void *value, size_t size)
-{
- if (!name)
- {
- set_errno (EINVAL);
- return -1;
- }
- path_conv pc (path, PC_SYM_FOLLOW | PC_POSIX, stat_suffixes);
- return getxattr_worker (pc, name, value, size);
-}
-
-extern "C" ssize_t
-lgetxattr (const char *path, const char *name, void *value, size_t size)
-{
- if (!name)
- {
- set_errno (EINVAL);
- return -1;
- }
- path_conv pc (path, PC_SYM_NOFOLLOW | PC_POSIX, stat_suffixes);
- return getxattr_worker (pc, name, value, size);
-}
-
-extern "C" ssize_t
-fgetxattr (int fd, const char *name, void *value, size_t size)
-{
- int res;
-
- if (!name)
- {
- set_errno (EINVAL);
- return -1;
- }
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- res = -1;
- else
- res = cfd->fgetxattr (name, value, size);
- return res;
-}
-
-extern "C" ssize_t
-listxattr (const char *path, char *list, size_t size)
-{
- path_conv pc (path, PC_SYM_FOLLOW | PC_POSIX, stat_suffixes);
- return getxattr_worker (pc, NULL, list, size);
-}
-
-extern "C" ssize_t
-llistxattr (const char *path, char *list, size_t size)
-{
- path_conv pc (path, PC_SYM_NOFOLLOW | PC_POSIX, stat_suffixes);
- return getxattr_worker (pc, NULL, list, size);
-}
-
-extern "C" ssize_t
-flistxattr (int fd, char *list, size_t size)
-{
- int res;
-
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- res = -1;
- else
- res = cfd->fgetxattr (NULL, list, size);
- return res;
-}
-
-static int __stdcall
-setxattr_worker (path_conv &pc, const char *name, const void *value,
- size_t size, int flags)
-{
- int res = -1;
-
- if (pc.error)
- {
- debug_printf ("got %d error from build_fh_name", pc.error);
- set_errno (pc.error);
- }
- else if (pc.exists ())
- {
- fhandler_base *fh;
-
- if (!(fh = build_fh_pc (pc)))
- return -1;
-
- res = fh->fsetxattr (name, value, size, flags);
- delete fh;
- }
- else
- set_errno (ENOENT);
- return res;
-}
-
-extern "C" int
-setxattr (const char *path, const char *name, const void *value, size_t size,
- int flags)
-{
- if (!size)
- {
- set_errno (EINVAL);
- return -1;
- }
- path_conv pc (path, PC_SYM_NOFOLLOW | PC_POSIX, stat_suffixes);
- return setxattr_worker (pc, name, value, size, flags);
-}
-
-extern "C" int
-lsetxattr (const char *path, const char *name, const void *value, size_t size,
- int flags)
-{
- if (!size)
- {
- set_errno (EINVAL);
- return -1;
- }
- path_conv pc (path, PC_SYM_NOFOLLOW | PC_POSIX, stat_suffixes);
- return setxattr_worker (pc, name, value, size, flags);
-}
-
-extern "C" int
-fsetxattr (int fd, const char *name, const void *value, size_t size, int flags)
-{
- int res;
-
- if (!size)
- {
- set_errno (EINVAL);
- return -1;
- }
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- res = -1;
- else
- res = cfd->fsetxattr (name, value, size, flags);
- return res;
-}
-
-extern "C" int
-removexattr (const char *path, const char *name)
-{
- path_conv pc (path, PC_SYM_FOLLOW | PC_POSIX, stat_suffixes);
- return setxattr_worker (pc, name, NULL, 0, 0);
-}
-
-extern "C" int
-lremovexattr (const char *path, const char *name)
-{
- path_conv pc (path, PC_SYM_NOFOLLOW | PC_POSIX, stat_suffixes);
- return setxattr_worker (pc, name, NULL, 0, 0);
-}
-
-extern "C" int
-fremovexattr (int fd, const char *name)
-{
- int res;
-
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- res = -1;
- else
- res = cfd->fsetxattr (name, NULL, 0, 0);
- return res;
-}
diff --git a/winsup/cygwin/passwd.cc b/winsup/cygwin/passwd.cc
deleted file mode 100644
index b034cf4..0000000
--- a/winsup/cygwin/passwd.cc
+++ /dev/null
@@ -1,304 +0,0 @@
-/* passwd.cc: getpwnam () and friends
-
- Copyright 1996, 1997, 1998, 2001, 2002, 2003, 2007 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include <stdio.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "pinfo.h"
-#include "cygheap.h"
-#include "pwdgrp.h"
-#include "shared_info.h"
-
-/* Read /etc/passwd only once for better performance. This is done
- on the first call that needs information from it. */
-
-passwd *passwd_buf;
-static pwdgrp pr (passwd_buf);
-
-/* Parse /etc/passwd line into passwd structure. */
-bool
-pwdgrp::parse_passwd ()
-{
-# define res (*passwd_buf)[curr_lines]
- res.pw_name = next_str (':');
- res.pw_passwd = next_str (':');
- if (!next_num (res.pw_uid))
- return false;
- if (!next_num (res.pw_gid))
- return false;
- res.pw_comment = NULL;
- res.pw_gecos = next_str (':');
- res.pw_dir = next_str (':');
- res.pw_shell = next_str (':');
- return true;
-# undef res
-}
-
-/* Read in /etc/passwd and save contents in the password cache.
- This sets pr to loaded or emulated so functions in this file can
- tell that /etc/passwd has been read in or will be emulated. */
-void
-pwdgrp::read_passwd ()
-{
- load (L"\\etc\\passwd");
-
- char strbuf[128] = "";
- bool searchentry = true;
- struct passwd *pw;
- /* must be static */
- static char NO_COPY pretty_ls[] = "????????:*:-1:-1:";
-
- add_line (pretty_ls);
- cygsid tu = cygheap->user.sid ();
- tu.string (strbuf);
- if (!user_shared->cb || myself->uid == ILLEGAL_UID)
- searchentry = !internal_getpwsid (tu);
- if (searchentry
- && (!(pw = internal_getpwnam (cygheap->user.name ()))
- || !user_shared->cb
- || (myself->uid != ILLEGAL_UID
- && myself->uid != (__uid32_t) pw->pw_uid
- && !internal_getpwuid (myself->uid))))
- {
- static char linebuf[1024]; // must be static and
- // should not be NO_COPY
- snprintf (linebuf, sizeof (linebuf), "%s:*:%lu:%lu:,%s:%s:/bin/sh",
- cygheap->user.name (),
- (!user_shared->cb || myself->uid == ILLEGAL_UID)
- ? UNKNOWN_UID : myself->uid,
- !user_shared->cb ? UNKNOWN_GID : myself->gid,
- strbuf, getenv ("HOME") ?: "");
- debug_printf ("Completing /etc/passwd: %s", linebuf);
- add_line (linebuf);
- }
-}
-
-struct passwd *
-internal_getpwsid (cygpsid &sid)
-{
- struct passwd *pw;
- char *ptr1, *ptr2, *endptr;
- char sid_string[128] = {0,','};
-
- pr.refresh (false);
-
- if (sid.string (sid_string + 2))
- {
- endptr = strchr (sid_string + 2, 0) - 1;
- for (int i = 0; i < pr.curr_lines; i++)
- if ((pw = passwd_buf + i)->pw_dir > pw->pw_gecos + 8)
- for (ptr1 = endptr, ptr2 = pw->pw_dir - 2;
- *ptr1 == *ptr2; ptr2--)
- if (!*--ptr1)
- return pw;
- }
- return NULL;
-}
-
-struct passwd *
-internal_getpwuid (__uid32_t uid, bool check)
-{
- pr.refresh (check);
-
- for (int i = 0; i < pr.curr_lines; i++)
- if (uid == (__uid32_t) passwd_buf[i].pw_uid)
- return passwd_buf + i;
- return NULL;
-}
-
-struct passwd *
-internal_getpwnam (const char *name, bool check)
-{
- pr.refresh (check);
-
- for (int i = 0; i < pr.curr_lines; i++)
- /* on Windows NT user names are case-insensitive */
- if (strcasematch (name, passwd_buf[i].pw_name))
- return passwd_buf + i;
- return NULL;
-}
-
-
-extern "C" struct passwd *
-getpwuid32 (__uid32_t uid)
-{
- struct passwd *temppw = internal_getpwuid (uid, true);
- pthread_testcancel ();
- return temppw;
-}
-
-extern "C" struct passwd *
-getpwuid (__uid16_t uid)
-{
- return getpwuid32 (uid16touid32 (uid));
-}
-
-extern "C" int
-getpwuid_r32 (__uid32_t uid, struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result)
-{
- *result = NULL;
-
- if (!pwd || !buffer)
- return ERANGE;
-
- struct passwd *temppw = internal_getpwuid (uid, true);
- pthread_testcancel ();
- if (!temppw)
- return 0;
-
- /* check needed buffer size. */
- size_t needsize = strlen (temppw->pw_name) + strlen (temppw->pw_dir) +
- strlen (temppw->pw_shell) + strlen (temppw->pw_gecos) +
- strlen (temppw->pw_passwd) + 5;
- if (needsize > bufsize)
- return ERANGE;
-
- /* make a copy of temppw */
- *result = pwd;
- pwd->pw_uid = temppw->pw_uid;
- pwd->pw_gid = temppw->pw_gid;
- pwd->pw_name = buffer;
- pwd->pw_dir = pwd->pw_name + strlen (temppw->pw_name) + 1;
- pwd->pw_shell = pwd->pw_dir + strlen (temppw->pw_dir) + 1;
- pwd->pw_gecos = pwd->pw_shell + strlen (temppw->pw_shell) + 1;
- pwd->pw_comment = NULL;
- pwd->pw_passwd = pwd->pw_gecos + strlen (temppw->pw_gecos) + 1;
- strcpy (pwd->pw_name, temppw->pw_name);
- strcpy (pwd->pw_dir, temppw->pw_dir);
- strcpy (pwd->pw_shell, temppw->pw_shell);
- strcpy (pwd->pw_gecos, temppw->pw_gecos);
- strcpy (pwd->pw_passwd, temppw->pw_passwd);
- return 0;
-}
-
-extern "C" int
-getpwuid_r (__uid16_t uid, struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result)
-{
- return getpwuid_r32 (uid16touid32 (uid), pwd, buffer, bufsize, result);
-}
-
-extern "C" struct passwd *
-getpwnam (const char *name)
-{
- struct passwd *temppw = internal_getpwnam (name, true);
- pthread_testcancel ();
- return temppw;
-}
-
-
-/* the max size buffer we can expect to
- * use is returned via sysconf with _SC_GETPW_R_SIZE_MAX.
- * This may need updating! - Rob Collins April 2001.
- */
-extern "C" int
-getpwnam_r (const char *nam, struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result)
-{
- *result = NULL;
-
- if (!pwd || !buffer || !nam)
- return ERANGE;
-
- struct passwd *temppw = internal_getpwnam (nam, true);
- pthread_testcancel ();
-
- if (!temppw)
- return 0;
-
- /* check needed buffer size. */
- size_t needsize = strlen (temppw->pw_name) + strlen (temppw->pw_dir) +
- strlen (temppw->pw_shell) + strlen (temppw->pw_gecos) +
- strlen (temppw->pw_passwd) + 5;
- if (needsize > bufsize)
- return ERANGE;
-
- /* make a copy of temppw */
- *result = pwd;
- pwd->pw_uid = temppw->pw_uid;
- pwd->pw_gid = temppw->pw_gid;
- pwd->pw_name = buffer;
- pwd->pw_dir = pwd->pw_name + strlen (temppw->pw_name) + 1;
- pwd->pw_shell = pwd->pw_dir + strlen (temppw->pw_dir) + 1;
- pwd->pw_gecos = pwd->pw_shell + strlen (temppw->pw_shell) + 1;
- pwd->pw_comment = NULL;
- pwd->pw_passwd = pwd->pw_gecos + strlen (temppw->pw_gecos) + 1;
- strcpy (pwd->pw_name, temppw->pw_name);
- strcpy (pwd->pw_dir, temppw->pw_dir);
- strcpy (pwd->pw_shell, temppw->pw_shell);
- strcpy (pwd->pw_gecos, temppw->pw_gecos);
- strcpy (pwd->pw_passwd, temppw->pw_passwd);
- return 0;
-}
-
-extern "C" struct passwd *
-getpwent (void)
-{
- if (_my_tls.locals.pw_pos == 0)
- pr.refresh (true);
- if (_my_tls.locals.pw_pos < pr.curr_lines)
- return passwd_buf + _my_tls.locals.pw_pos++;
-
- return NULL;
-}
-
-extern "C" struct passwd *
-getpwduid (__uid16_t)
-{
- return NULL;
-}
-
-extern "C" void
-setpwent (void)
-{
- _my_tls.locals.pw_pos = 0;
-}
-
-extern "C" void
-endpwent (void)
-{
- _my_tls.locals.pw_pos = 0;
-}
-
-extern "C" int
-setpassent ()
-{
- return 0;
-}
-
-extern "C" char *
-getpass (const char * prompt)
-{
- char *pass = _my_tls.locals.pass;
- struct termios ti, newti;
-
- cygheap_fdget fhstdin (0);
-
- if (fhstdin < 0)
- pass[0] = '\0';
- else
- {
- fhstdin->tcgetattr (&ti);
- newti = ti;
- newti.c_lflag &= ~ECHO;
- fhstdin->tcsetattr (TCSANOW, &newti);
- fputs (prompt, stderr);
- fgets (pass, _PASSWORD_LEN, stdin);
- fprintf (stderr, "\n");
- for (int i=0; pass[i]; i++)
- if (pass[i] == '\r' || pass[i] == '\n')
- pass[i] = '\0';
- fhstdin->tcsetattr (TCSANOW, &ti);
- }
- return pass;
-}
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
deleted file mode 100644
index 3b726c0..0000000
--- a/winsup/cygwin/path.cc
+++ /dev/null
@@ -1,3616 +0,0 @@
-/* path.cc: path support.
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008 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. */
-
- /* This module's job is to
- - convert between POSIX and Win32 style filenames,
- - support the `mount' functionality,
- - support symlinks for files and directories
-
- Pathnames are handled as follows:
-
- - A \ or : in a path denotes a pure windows spec.
- - Paths beginning with // (or \\) are not translated (i.e. looked
- up in the mount table) and are assumed to be UNC path names.
-
- The goal in the above set of rules is to allow both POSIX and Win32
- flavors of pathnames without either interfering. The rules are
- intended to be as close to a superset of both as possible.
-
- Note that you can have more than one path to a file. The mount
- table is always prefered when translating Win32 paths to POSIX
- paths. Win32 paths in mount table entries may be UNC paths or
- standard Win32 paths starting with <drive-letter>:
-
- Text vs Binary issues are not considered here in path style
- decisions, although the appropriate flags are retrieved and
- stored in various structures.
-
- Removing mounted filesystem support would simplify things greatly,
- but having it gives us a mechanism of treating disk that lives on a
- UNIX machine as having UNIX semantics [it allows one to edit a text
- file on that disk and not have cr's magically appear and perhaps
- break apps running on UNIX boxes]. It also useful to be able to
- layout a hierarchy without changing the underlying directories.
-
- The semantics of mounting file systems is not intended to precisely
- follow normal UNIX systems.
-
- Each DOS drive is defined to have a current directory. Supporting
- this would complicate things so for now things are defined so that
- c: means c:\.
- */
-
-#include "winsup.h"
-#include "miscfuncs.h"
-#include <ctype.h>
-#include <winioctl.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <winnetwk.h>
-#include <shlobj.h>
-#include <sys/cygwin.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "shared_info.h"
-#include "cygtls.h"
-#include "tls_pbuf.h"
-#include "environ.h"
-#include "nfs.h"
-#include <assert.h>
-#include <ntdll.h>
-#include <wchar.h>
-#include <wctype.h>
-
-bool dos_file_warning = true;
-
-struct symlink_info
-{
- char contents[SYMLINK_MAX + 1];
- char *ext_here;
- int extn;
- unsigned pflags;
- DWORD fileattr;
- int issymlink;
- bool ext_tacked_on;
- int error;
- bool isdevice;
- _major_t major;
- _minor_t minor;
- _mode_t mode;
- int check (char *path, const suffix_info *suffixes, unsigned opt,
- fs_info &fs);
- int set (char *path);
- bool parse_device (const char *);
- int check_sysfile (HANDLE h);
- int check_shortcut (HANDLE h);
- int check_reparse_point (HANDLE h);
- int check_nfs_symlink (HANDLE h);
- int posixify (char *srcbuf);
- bool set_error (int);
-};
-
-muto NO_COPY cwdstuff::cwd_lock;
-
-static const GUID GUID_shortcut
- = { 0x00021401L, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, 0x46}};
-
-enum {
- WSH_FLAG_IDLIST = 0x01, /* Contains an ITEMIDLIST. */
- WSH_FLAG_FILE = 0x02, /* Contains a file locator element. */
- WSH_FLAG_DESC = 0x04, /* Contains a description. */
- WSH_FLAG_RELPATH = 0x08, /* Contains a relative path. */
- WSH_FLAG_WD = 0x10, /* Contains a working dir. */
- WSH_FLAG_CMDLINE = 0x20, /* Contains command line args. */
- WSH_FLAG_ICON = 0x40 /* Contains a custom icon. */
-};
-
-struct win_shortcut_hdr
- {
- DWORD size; /* Header size in bytes. Must contain 0x4c. */
- GUID magic; /* GUID of shortcut files. */
- DWORD flags; /* Content flags. See above. */
-
- /* The next fields from attr to icon_no are always set to 0 in Cygwin
- and U/Win shortcuts. */
- DWORD attr; /* Target file attributes. */
- FILETIME ctime; /* These filetime items are never touched by the */
- FILETIME mtime; /* system, apparently. Values don't matter. */
- FILETIME atime;
- DWORD filesize; /* Target filesize. */
- DWORD icon_no; /* Icon number. */
-
- DWORD run; /* Values defined in winuser.h. Use SW_NORMAL. */
- DWORD hotkey; /* Hotkey value. Set to 0. */
- DWORD dummy[2]; /* Future extension probably. Always 0. */
- };
-
-/* Return non-zero if PATH1 is a prefix of PATH2.
- Both are assumed to be of the same path style and / vs \ usage.
- Neither may be "".
- LEN1 = strlen (PATH1). It's passed because often it's already known.
-
- Examples:
- /foo/ is a prefix of /foo <-- may seem odd, but desired
- /foo is a prefix of /foo/
- / is a prefix of /foo/bar
- / is not a prefix of foo/bar
- foo/ is a prefix foo/bar
- /foo is not a prefix of /foobar
-*/
-
-int
-path_prefix_p (const char *path1, const char *path2, int len1,
- bool caseinsensitive)
-{
- /* Handle case where PATH1 has trailing '/' and when it doesn't. */
- if (len1 > 0 && isdirsep (path1[len1 - 1]))
- len1--;
-
- if (len1 == 0)
- return isdirsep (path2[0]) && !isdirsep (path2[1]);
-
- if (isdirsep (path2[len1]) || path2[len1] == 0 || path1[len1 - 1] == ':')
- return caseinsensitive ? strncasematch (path1, path2, len1)
- : !strncmp (path1, path2, len1);
-
- return 0;
-}
-
-/* Return non-zero if paths match in first len chars.
- Check is dependent of the case sensitivity setting. */
-int
-pathnmatch (const char *path1, const char *path2, int len, bool caseinsensitive)
-{
- return caseinsensitive
- ? strncasematch (path1, path2, len) : !strncmp (path1, path2, len);
-}
-
-/* Return non-zero if paths match. Check is dependent of the case
- sensitivity setting. */
-int
-pathmatch (const char *path1, const char *path2, bool caseinsensitive)
-{
- return caseinsensitive
- ? strcasematch (path1, path2) : !strcmp (path1, path2);
-}
-
-/* TODO: This function is used in mkdir and rmdir to generate correct
- error messages in case of paths ending in /. or /.. components.
- Right now, normalize_posix_path will just normalize
- those components away, which changes the semantics. */
-bool
-has_dot_last_component (const char *dir, bool test_dot_dot)
-{
- /* SUSv3: . and .. are not allowed as last components in various system
- calls. Don't test for backslash path separator since that's a Win32
- path following Win32 rules. */
- const char *last_comp = strrchr (dir, '/');
- if (!last_comp)
- last_comp = dir;
- else {
- /* Check for trailing slash. If so, hop back to the previous slash. */
- if (!last_comp[1])
- while (last_comp > dir)
- if (*--last_comp == '/')
- break;
- if (*last_comp == '/')
- ++last_comp;
- }
- return last_comp[0] == '.'
- && ((last_comp[1] == '\0' || last_comp[1] == '/')
- || (test_dot_dot
- && last_comp[1] == '.'
- && (last_comp[2] == '\0' || last_comp[2] == '/')));
-}
-
-/* Normalize a POSIX path.
- All duplicate /'s, except for 2 leading /'s, are deleted.
- The result is 0 for success, or an errno error value. */
-
-int
-normalize_posix_path (const char *src, char *dst, char *&tail)
-{
- const char *in_src = src;
- char *dst_start = dst;
- syscall_printf ("src %s", src);
-
- if ((isdrive (src) && isdirsep (src[2])) || *src == '\\')
- goto win32_path;
-
- tail = dst;
- if (!isslash (src[0]))
- {
- if (!cygheap->cwd.get (dst))
- return get_errno ();
- tail = strchr (tail, '\0');
- if (isslash (dst[0]) && isslash (dst[1]))
- ++dst_start;
- if (*src == '.')
- {
- if (tail == dst_start + 1 && *dst_start == '/')
- tail--;
- goto sawdot;
- }
- if (tail > dst && !isslash (tail[-1]))
- *tail++ = '/';
- }
- /* Two leading /'s? If so, preserve them. */
- else if (isslash (src[1]) && !isslash (src[2]))
- {
- *tail++ = *src++;
- ++dst_start;
- }
-
- while (*src)
- {
- if (*src == '\\')
- goto win32_path;
- /* Strip runs of /'s. */
- if (!isslash (*src))
- *tail++ = *src++;
- else
- {
- while (*++src)
- {
- if (isslash (*src))
- continue;
-
- if (*src != '.')
- break;
-
- sawdot:
- if (src[1] != '.')
- {
- if (!src[1])
- {
- *tail++ = '/';
- goto done;
- }
- if (!isslash (src[1]))
- break;
- }
- else if (src[2] && !isslash (src[2]))
- break;
- else
- {
- while (tail > dst_start && !isslash (*--tail))
- continue;
- src++;
- }
- }
-
- *tail++ = '/';
- }
- if ((tail - dst) >= NT_MAX_PATH)
- {
- debug_printf ("ENAMETOOLONG = normalize_posix_path (%s)", src);
- return ENAMETOOLONG;
- }
- }
-
-done:
- *tail = '\0';
-
- debug_printf ("%s = normalize_posix_path (%s)", dst, in_src);
- return 0;
-
-win32_path:
- int err = normalize_win32_path (in_src, dst, tail);
- if (!err)
- for (char *p = dst; (p = strchr (p, '\\')); p++)
- *p = '/';
- return err ?: -1;
-}
-
-inline void
-path_conv::add_ext_from_sym (symlink_info &sym)
-{
- if (sym.ext_here && *sym.ext_here)
- {
- known_suffix = path + sym.extn;
- if (sym.ext_tacked_on)
- strcpy (known_suffix, sym.ext_here);
- }
-}
-
-static void __stdcall mkrelpath (char *dst, bool caseinsensitive) __attribute__ ((regparm (2)));
-static void __stdcall
-mkrelpath (char *path, bool caseinsensitive)
-{
- tmp_pathbuf tp;
- char *cwd_win32 = tp.c_get ();
- if (!cygheap->cwd.get (cwd_win32, 0))
- return;
-
- unsigned cwdlen = strlen (cwd_win32);
- if (!path_prefix_p (cwd_win32, path, cwdlen, caseinsensitive))
- return;
-
- size_t n = strlen (path);
- if (n < cwdlen)
- return;
-
- char *tail = path;
- if (n == cwdlen)
- tail += cwdlen;
- else
- tail += isdirsep (cwd_win32[cwdlen - 1]) ? cwdlen : cwdlen + 1;
-
- memmove (path, tail, strlen (tail) + 1);
- if (!*path)
- strcpy (path, ".");
-}
-
-/* Beginning with Samba 3.0.28a, Samba allows to get version information using
- the ExtendedInfo member returned by a FileFsObjectIdInformation request.
- We just store the samba_version information for now. Older versions than
- 3.2 are still guessed at by testing the file system flags. */
-#define SAMBA_EXTENDED_INFO_MAGIC 0x536d4261 /* "SmBa" */
-#define SAMBA_EXTENDED_INFO_VERSION_STRING_LENGTH 28
-#pragma pack(push,4)
-struct smb_extended_info {
- DWORD samba_magic; /* Always SAMBA_EXTENDED_INFO_MAGIC */
- DWORD samba_version; /* Major/Minor/Release/Revision */
- DWORD samba_subversion; /* Prerelease/RC/Vendor patch */
- LARGE_INTEGER samba_gitcommitdate;
- char samba_version_string[SAMBA_EXTENDED_INFO_VERSION_STRING_LENGTH];
-};
-#pragma pack(pop)
-
-bool
-fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
-{
- NTSTATUS status = STATUS_OBJECT_NAME_NOT_FOUND;
- HANDLE vol;
- OBJECT_ATTRIBUTES attr;
- IO_STATUS_BLOCK io;
- bool no_media = false;
- FILE_FS_DEVICE_INFORMATION ffdi;
- FILE_FS_OBJECTID_INFORMATION ffoi;
- struct {
- FILE_FS_ATTRIBUTE_INFORMATION ffai;
- WCHAR buf[NAME_MAX + 1];
- } ffai_buf;
- struct {
- FILE_FS_VOLUME_INFORMATION ffvi;
- WCHAR buf[NAME_MAX + 1];
- } ffvi_buf;
- UNICODE_STRING fsname, testname;
-
- clear ();
- if (in_vol)
- vol = in_vol;
- else
- {
- /* Always caseinsensitive. We really just need access to the drive. */
- InitializeObjectAttributes (&attr, upath, OBJ_CASE_INSENSITIVE, NULL,
- NULL);
- status = NtOpenFile (&vol, READ_CONTROL, &attr, &io,
- FILE_SHARE_VALID_FLAGS, FILE_OPEN_FOR_BACKUP_INTENT);
- while (!NT_SUCCESS (status)
- && (attr.ObjectName->Length > 7 * sizeof (WCHAR)
- || status == STATUS_NO_MEDIA_IN_DEVICE))
- {
- UNICODE_STRING dir;
- RtlSplitUnicodePath (attr.ObjectName, &dir, NULL);
- attr.ObjectName = &dir;
- if (status == STATUS_NO_MEDIA_IN_DEVICE)
- {
- no_media = true;
- dir.Length = 6 * sizeof (WCHAR);
- }
- else if (dir.Length > 7 * sizeof (WCHAR))
- dir.Length -= sizeof (WCHAR);
- status = NtOpenFile (&vol, READ_CONTROL, &attr, &io,
- FILE_SHARE_VALID_FLAGS,
- FILE_OPEN_FOR_BACKUP_INTENT);
- }
- if (!NT_SUCCESS (status))
- {
- debug_printf ("Cannot access path %S, status %08lx",
- attr.ObjectName, status);
- NtClose (vol);
- return false;
- }
- }
-
- status = NtQueryVolumeInformationFile (vol, &io, &ffvi_buf.ffvi,
- sizeof ffvi_buf,
- FileFsVolumeInformation);
- sernum = NT_SUCCESS (status) ? ffvi_buf.ffvi.VolumeSerialNumber : 0;
- status = NtQueryVolumeInformationFile (vol, &io, &ffdi, sizeof ffdi,
- FileFsDeviceInformation);
- if (!NT_SUCCESS (status))
- ffdi.DeviceType = ffdi.Characteristics = 0;
-
- if (ffdi.Characteristics & FILE_REMOTE_DEVICE
- || (!ffdi.DeviceType
- && RtlEqualUnicodePathPrefix (attr.ObjectName, L"\\??\\UNC\\", TRUE)))
- is_remote_drive (true);
- else
- is_remote_drive (false);
-
- if (!no_media)
- status = NtQueryVolumeInformationFile (vol, &io, &ffai_buf.ffai,
- sizeof ffai_buf,
- FileFsAttributeInformation);
- if (no_media || !NT_SUCCESS (status))
- {
- debug_printf ("Cannot get volume attributes (%S), %08lx",
- attr.ObjectName, status);
- if (!in_vol)
- NtClose (vol);
- return false;
- }
- flags (ffai_buf.ffai.FileSystemAttributes);
- name_len (ffai_buf.ffai.MaximumComponentNameLength);
-/* Should be reevaluated for each new OS. Right now this mask is valid up
- to Vista. The important point here is to test only flags indicating
- capabilities and to ignore flags indicating a specific state of this
- volume. At present these flags to ignore are FILE_VOLUME_IS_COMPRESSED
- and FILE_READ_ONLY_VOLUME. */
-#define GETVOLINFO_VALID_MASK (0x003701ffUL)
-#define TEST_GVI(f,m) (((f) & GETVOLINFO_VALID_MASK) == (m))
-
-/* Volume quotas are potentially supported since Samba 3.0, object ids and
- the unicode on disk flag since Samba 3.2. */
-#define SAMBA_IGNORE (FILE_VOLUME_QUOTAS \
- | FILE_SUPPORTS_OBJECT_IDS \
- | FILE_UNICODE_ON_DISK)
-#define FS_IS_SAMBA TEST_GVI(flags () & ~SAMBA_IGNORE, \
- FILE_CASE_SENSITIVE_SEARCH \
- | FILE_CASE_PRESERVED_NAMES \
- | FILE_PERSISTENT_ACLS)
-#define FS_IS_NETAPP_DATAONTAP TEST_GVI(flags (), \
- FILE_CASE_SENSITIVE_SEARCH \
- | FILE_CASE_PRESERVED_NAMES \
- | FILE_UNICODE_ON_DISK \
- | FILE_PERSISTENT_ACLS \
- | FILE_NAMED_STREAMS)
- RtlInitCountedUnicodeString (&fsname, ffai_buf.ffai.FileSystemName,
- ffai_buf.ffai.FileSystemNameLength);
- is_fat (RtlEqualUnicodePathPrefix (&fsname, L"FAT", TRUE));
- RtlInitUnicodeString (&testname, L"NTFS");
- if (is_remote_drive ())
- {
- /* This always fails on NT4. */
- status = NtQueryVolumeInformationFile (vol, &io, &ffoi, sizeof ffoi,
- FileFsObjectIdInformation);
- if (NT_SUCCESS (status))
- {
- smb_extended_info *extended_info = (smb_extended_info *)
- &ffoi.ExtendedInfo;
- if (extended_info->samba_magic == SAMBA_EXTENDED_INFO_MAGIC)
- {
- is_samba (true);
- samba_version (extended_info->samba_version);
- }
- }
- /* Test for Samba on NT4 or for older Samba releases not supporting
- extended info. */
- if (!is_samba ())
- is_samba (RtlEqualUnicodeString (&fsname, &testname, FALSE)
- && FS_IS_SAMBA);
-
- if (!is_samba ())
- {
- is_netapp (RtlEqualUnicodeString (&fsname, &testname, FALSE)
- && FS_IS_NETAPP_DATAONTAP);
-
- RtlInitUnicodeString (&testname, L"NFS");
- is_nfs (RtlEqualUnicodeString (&fsname, &testname, FALSE));
-
- if (!is_nfs ())
- {
- /* Known remote file systems which can't handle calls to
- NtQueryDirectoryFile(FileIdBothDirectoryInformation) */
- RtlInitUnicodeString (&testname, L"UNIXFS");
- has_buggy_fileid_dirinfo (RtlEqualUnicodeString (&fsname,
- &testname,
- FALSE));
-
- /* Known remote file systems with buggy open calls. Further
- explanation in fhandler.cc (fhandler_disk_file::open). */
- RtlInitUnicodeString (&testname, L"SUNWNFS");
- has_buggy_open (RtlEqualUnicodeString (&fsname, &testname,
- FALSE));
- }
- }
- }
- is_ntfs (RtlEqualUnicodeString (&fsname, &testname, FALSE)
- && !is_samba () && !is_netapp ());
- is_cdrom (ffdi.DeviceType == FILE_DEVICE_CD_ROM);
-
- has_acls (flags () & FS_PERSISTENT_ACLS);
- hasgood_inode (((flags () & FILE_PERSISTENT_ACLS) && !is_netapp ())
- || is_nfs ());
- /* Case sensitivity is supported if FILE_CASE_SENSITIVE_SEARCH is set,
- except on Samba which handles Windows clients case insensitive.
- NFS doesn't set the FILE_CASE_SENSITIVE_SEARCH flag but is case
- sensitive. */
- caseinsensitive ((!(flags () & FILE_CASE_SENSITIVE_SEARCH) || is_samba ())
- && !is_nfs ());
-
- if (!in_vol)
- NtClose (vol);
- return true;
-}
-
-void
-path_conv::fillin (HANDLE h)
-{
- IO_STATUS_BLOCK io;
- FILE_BASIC_INFORMATION fbi;
-
- if (NT_SUCCESS (NtQueryInformationFile (h, &io, &fbi, sizeof fbi,
- FileBasicInformation)))
- fileattr = fbi.FileAttributes;
- else
- fileattr = INVALID_FILE_ATTRIBUTES;
-}
-
-void
-path_conv::set_normalized_path (const char *path_copy)
-{
- char *p = strchr (path_copy, '\0');
- size_t n = 1 + p - path_copy;
-
- normalized_path = path + sizeof (path) - n;
-
- char *eopath = strchr (path, '\0');
- if (normalized_path > eopath)
- normalized_path_size = n;
- else
- {
- normalized_path = (char *) cmalloc_abort (HEAP_STR, n);
- normalized_path_size = 0;
- }
-
- memcpy (normalized_path, path_copy, n);
-}
-
-WCHAR tfx_chars[] NO_COPY = {
- 0, 1, 2, 3, 4, 5, 6, 7,
- 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23,
- 24, 25, 26, 27, 28, 29, 30, 31,
- 32, '!', 0xf000 | '"', '#', '$', '%', '&', 39,
- '(', ')', 0xf000 | '*', '+', ',', '-', '.', '\\',
- '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', 0xf000 | ':', ';', 0xf000 | '<', '=', 0xf000 | '>', 0xf000 | '?',
- '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '[', '\\', ']', '^', '_',
- '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
- 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
- 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
- 'x', 'y', 'z', '{', 0xf000 | '|', '}', '~', 127
-};
-
-void
-transform_chars (PWCHAR path, PWCHAR path_end)
-{
- for (; path <= path_end; ++path)
- if (*path < 128)
- *path = tfx_chars[*path];
-}
-
-static inline
-void
-transform_chars (PUNICODE_STRING upath, USHORT start_idx)
-{
- transform_chars (upath->Buffer + start_idx,
- upath->Buffer + upath->Length / sizeof (WCHAR) - 1);
-}
-
-PUNICODE_STRING
-get_nt_native_path (const char *path, UNICODE_STRING& upath)
-{
- upath.Length = 0;
- if (path[0] == '/') /* special path w/o NT path representation. */
- str2uni_cat (upath, path);
- else if (path[0] != '\\') /* X:\... or relative path. */
- {
- if (path[1] == ':') /* X:\... */
- {
- str2uni_cat (upath, "\\??\\");
- str2uni_cat (upath, path);
- /* The drive letter must be upper case. */
- upath.Buffer[4] = towupper (upath.Buffer[4]);
- }
- else
- str2uni_cat (upath, path);
- transform_chars (&upath, 7);
- }
- else if (path[1] != '\\') /* \Device\... */
- str2uni_cat (upath, path);
- else if ((path[2] != '.' && path[2] != '?')
- || path[3] != '\\') /* \\server\share\... */
- {
- str2uni_cat (upath, "\\??\\UNC\\");
- str2uni_cat (upath, path + 2);
- transform_chars (&upath, 8);
- }
- else /* \\.\device or \\?\foo */
- {
- str2uni_cat (upath, "\\??\\");
- str2uni_cat (upath, path + 4);
- }
- return &upath;
-}
-
-PUNICODE_STRING
-path_conv::get_nt_native_path ()
-{
- if (!wide_path)
- {
- uni_path.Length = 0;
- uni_path.MaximumLength = (strlen (path) + 10) * sizeof (WCHAR);
- wide_path = (PWCHAR) cmalloc_abort (HEAP_STR, uni_path.MaximumLength);
- uni_path.Buffer = wide_path;
- ::get_nt_native_path (path, uni_path);
- }
- return &uni_path;
-}
-
-POBJECT_ATTRIBUTES
-path_conv::get_object_attr (OBJECT_ATTRIBUTES &attr, SECURITY_ATTRIBUTES &sa)
-{
- if (!get_nt_native_path ())
- return NULL;
- InitializeObjectAttributes (&attr, &uni_path,
- objcaseinsensitive ()
- | (sa.bInheritHandle ? OBJ_INHERIT : 0),
- NULL, sa.lpSecurityDescriptor);
- return &attr;
-}
-
-PWCHAR
-path_conv::get_wide_win32_path (PWCHAR wc)
-{
- get_nt_native_path ();
- if (!wide_path || wide_path[1] != L'?') /* Native NT device path */
- return NULL;
- wcscpy (wc, wide_path);
- wc[1] = L'\\';
- return wc;
-}
-
-void
-warn_msdos (const char *src)
-{
- if (user_shared->warned_msdos || !dos_file_warning)
- return;
- tmp_pathbuf tp;
- char *posix_path = tp.c_get ();
- small_printf ("cygwin warning:\n");
- if (cygwin_conv_path (CCP_WIN_A_TO_POSIX | CCP_RELATIVE, src,
- posix_path, NT_MAX_PATH))
- small_printf (" MS-DOS style path detected: %s\n POSIX equivalent preferred.\n",
- src);
- else
- small_printf (" MS-DOS style path detected: %s\n Preferred POSIX equivalent is: %s\n",
- src, posix_path);
- small_printf (" CYGWIN environment variable option \"nodosfilewarning\" turns off this warning.\n"
- " Consult the user's guide for more details about POSIX paths:\n"
- " http://cygwin.com/cygwin-ug-net/using.html#using-pathnames\n");
- user_shared->warned_msdos = true;
-}
-
-static DWORD
-getfileattr (const char *path, bool caseinsensitive) /* path has to be always absolute. */
-{
- tmp_pathbuf tp;
- UNICODE_STRING upath;
- OBJECT_ATTRIBUTES attr;
- FILE_BASIC_INFORMATION fbi;
- NTSTATUS status;
- IO_STATUS_BLOCK io;
-
- tp.u_get (&upath);
- InitializeObjectAttributes (&attr, &upath,
- caseinsensitive ? OBJ_CASE_INSENSITIVE : 0,
- NULL, NULL);
- get_nt_native_path (path, upath);
-
- status = NtQueryAttributesFile (&attr, &fbi);
- if (NT_SUCCESS (status))
- return fbi.FileAttributes;
-
- if (status != STATUS_OBJECT_NAME_NOT_FOUND
- && status != STATUS_NO_SUCH_FILE) /* File not found on 9x share */
- {
- /* File exists but access denied. Try to get attribute through
- directory query. */
- UNICODE_STRING dirname, basename;
- HANDLE dir;
- FILE_DIRECTORY_INFORMATION fdi;
-
- RtlSplitUnicodePath (&upath, &dirname, &basename);
- InitializeObjectAttributes (&attr, &dirname,
- caseinsensitive ? OBJ_CASE_INSENSITIVE : 0,
- NULL, NULL);
- status = NtOpenFile (&dir, SYNCHRONIZE | FILE_LIST_DIRECTORY,
- &attr, &io, FILE_SHARE_VALID_FLAGS,
- FILE_SYNCHRONOUS_IO_NONALERT
- | FILE_OPEN_FOR_BACKUP_INTENT
- | FILE_DIRECTORY_FILE);
- if (NT_SUCCESS (status))
- {
- status = NtQueryDirectoryFile (dir, NULL, NULL, 0, &io,
- &fdi, sizeof fdi,
- FileDirectoryInformation,
- TRUE, &basename, TRUE);
- NtClose (dir);
- if (NT_SUCCESS (status) || status == STATUS_BUFFER_OVERFLOW)
- return fdi.FileAttributes;
- }
- }
- SetLastError (RtlNtStatusToDosError (status));
- return INVALID_FILE_ATTRIBUTES;
-}
-
-/* Convert an arbitrary path SRC to a pure Win32 path, suitable for
- passing to Win32 API routines.
-
- If an error occurs, `error' is set to the errno value.
- Otherwise it is set to 0.
-
- follow_mode values:
- SYMLINK_FOLLOW - convert to PATH symlink points to
- SYMLINK_NOFOLLOW - convert to PATH of symlink itself
- SYMLINK_IGNORE - do not check PATH for symlinks
- SYMLINK_CONTENTS - just return symlink contents
-*/
-
-/* TODO: This implementation is only preliminary. For internal
- purposes it's necessary to have a path_conv::check function which
- takes a UNICODE_STRING src path, otherwise we waste a lot of time
- for converting back and forth. The below implementation does
- realy nothing but converting to char *, until path_conv handles
- wide-char paths directly. */
-void
-path_conv::check (const UNICODE_STRING *src, unsigned opt,
- const suffix_info *suffixes)
-{
- tmp_pathbuf tp;
- char *path = tp.c_get ();
-
- user_shared->warned_msdos = true;
- sys_wcstombs (path, NT_MAX_PATH, src->Buffer, src->Length / sizeof (WCHAR));
- path_conv::check (path, opt, suffixes);
-}
-
-void
-path_conv::check (const char *src, unsigned opt,
- const suffix_info *suffixes)
-{
- /* The tmp_buf array is used when expanding symlinks. It is NT_MAX_PATH * 2
- in length so that we can hold the expanded symlink plus a trailer. */
- tmp_pathbuf tp;
- char *path_copy = tp.c_get ();
- char *pathbuf = tp.c_get ();
- char *tmp_buf = tp.t_get ();
- symlink_info sym;
- bool need_directory = 0;
- bool saw_symlinks = 0;
- bool is_relpath;
- char *tail, *path_end;
-
-#if 0
- static path_conv last_path_conv;
- static char last_src[CYG_MAX_PATH];
-
- if (*last_src && strcmp (last_src, src) == 0)
- {
- *this = last_path_conv;
- return;
- }
-#endif
-
- myfault efault;
- if (efault.faulted ())
- {
- error = EFAULT;
- return;
- }
- int loop = 0;
- path_flags = 0;
- known_suffix = NULL;
- fileattr = INVALID_FILE_ATTRIBUTES;
- caseinsensitive = OBJ_CASE_INSENSITIVE;
- if (wide_path)
- cfree (wide_path);
- wide_path = NULL;
- memset (&dev, 0, sizeof (dev));
- fs.clear ();
- if (!normalized_path_size && normalized_path)
- cfree (normalized_path);
- normalized_path = NULL;
- int component = 0; // Number of translated components
-
- if (!(opt & PC_NULLEMPTY))
- error = 0;
- else if (!*src)
- {
- error = ENOENT;
- return;
- }
-
- bool is_msdos = false;
- /* This loop handles symlink expansion. */
- for (;;)
- {
- MALLOC_CHECK;
- assert (src);
-
- is_relpath = !isabspath (src);
- error = normalize_posix_path (src, path_copy, tail);
- if (error > 0)
- return;
- if (error < 0)
- {
- if (component == 0)
- is_msdos = true;
- error = 0;
- }
-
- /* Detect if the user was looking for a directory. We have to strip the
- trailing slash initially while trying to add extensions but take it
- into account during processing */
- if (tail > path_copy + 2 && isslash (tail[-1]))
- {
- need_directory = 1;
- *--tail = '\0';
- }
- path_end = tail;
-
- /* Scan path_copy from right to left looking either for a symlink
- or an actual existing file. If an existing file is found, just
- return. If a symlink is found, exit the for loop.
- Also: be careful to preserve the errno returned from
- symlink.check as the caller may need it. */
- /* FIXME: Do we have to worry about multiple \'s here? */
- component = 0; // Number of translated components
- sym.contents[0] = '\0';
-
- int symlen = 0;
-
- for (unsigned pflags_or = opt & PC_NO_ACCESS_CHECK; ; pflags_or = 0)
- {
- const suffix_info *suff;
- char *full_path;
-
- /* Don't allow symlink.check to set anything in the path_conv
- class if we're working on an inner component of the path */
- if (component)
- {
- suff = NULL;
- sym.pflags = 0;
- full_path = pathbuf;
- }
- else
- {
- suff = suffixes;
- sym.pflags = path_flags;
- full_path = this->path;
- }
-
- /* Convert to native path spec sans symbolic link info. */
- error = mount_table->conv_to_win32_path (path_copy, full_path, dev,
- &sym.pflags);
-
- if (error)
- return;
-
- sym.pflags |= pflags_or;
-
- if (dev.major == DEV_CYGDRIVE_MAJOR)
- {
- if (!component)
- fileattr = FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_READONLY;
- else
- {
- fileattr = getfileattr (this->path,
- sym.pflags & MOUNT_NOPOSIX);
- dev.devn = FH_FS;
- }
- goto out;
- }
- else if (dev == FH_DEV)
- {
- dev.devn = FH_FS;
-#if 0
- fileattr = getfileattr (this->path, sym.pflags & MOUNT_NOPOSIX);
- if (!component && fileattr == INVALID_FILE_ATTRIBUTES)
- {
- fileattr = FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_READONLY;
- goto out;
- }
-#endif
- }
- else if (isvirtual_dev (dev.devn))
- {
- /* FIXME: Calling build_fhandler here is not the right way to handle this. */
- fhandler_virtual *fh = (fhandler_virtual *) build_fh_dev (dev, path_copy);
- int file_type = fh->exists ();
- if (file_type == -2)
- {
- fh->fill_filebuf ();
- symlen = sym.set (fh->get_filebuf ());
- }
- delete fh;
- switch (file_type)
- {
- case 1:
- case 2:
- if (component == 0)
- fileattr = FILE_ATTRIBUTE_DIRECTORY;
- break;
- case -1:
- if (component == 0)
- fileattr = 0;
- break;
- case -2: /* /proc/self or /proc/<pid>/symlinks */
- goto is_virtual_symlink;
- case -3: /* /proc/<pid>/fd/pipe:[] */
- if (component == 0)
- {
- fileattr = 0;
- dev.parse (FH_PIPE);
- }
- break;
- case -4: /* /proc/<pid>/fd/socket:[] */
- if (component == 0)
- {
- fileattr = 0;
- dev.parse (FH_TCP);
- }
- break;
- default:
- if (component == 0)
- fileattr = INVALID_FILE_ATTRIBUTES;
- goto virtual_component_retry;
- }
- if (component == 0 || dev.devn != FH_NETDRIVE)
- path_flags |= PATH_RO;
- goto out;
- }
- /* devn should not be a device. If it is, then stop parsing now. */
- else if (dev.devn != FH_FS)
- {
- fileattr = 0;
- path_flags = sym.pflags;
- if (component)
- {
- error = ENOTDIR;
- return;
- }
- goto out; /* Found a device. Stop parsing. */
- }
-
- /* If path is only a drivename, Windows interprets it as the
- current working directory on this drive instead of the root
- dir which is what we want. So we need the trailing backslash
- in this case. */
- if (full_path[0] && full_path[1] == ':' && full_path[2] == '\0')
- {
- full_path[2] = '\\';
- full_path[3] = '\0';
- }
-
- symlen = sym.check (full_path, suff, opt, fs);
-
-is_virtual_symlink:
-
- if (sym.isdevice)
- {
- dev.parse (sym.major, sym.minor);
- dev.setfs (1);
- dev.mode = sym.mode;
- fileattr = sym.fileattr;
- goto out;
- }
-
- if (sym.pflags & PATH_SOCKET)
- {
- if (component)
- {
- error = ENOTDIR;
- return;
- }
- fileattr = sym.fileattr;
- dev.parse (FH_UNIX);
- dev.setfs (1);
- goto out;
- }
-
- if (!component)
- {
- fileattr = sym.fileattr;
- path_flags = sym.pflags;
- /* If the OS is caseinsensitive or the FS is caseinsensitive or
- the incoming path was given in DOS notation, don't handle
- path casesensitive. */
- if (cygwin_shared->obcaseinsensitive || fs.caseinsensitive ()
- || is_msdos)
- path_flags |= PATH_NOPOSIX;
- caseinsensitive = (path_flags & PATH_NOPOSIX)
- ? OBJ_CASE_INSENSITIVE : 0;
- }
-
- /* If symlink.check found an existing non-symlink file, then
- it sets the appropriate flag. It also sets any suffix found
- into `ext_here'. */
- if (!sym.issymlink && sym.fileattr != INVALID_FILE_ATTRIBUTES)
- {
- error = sym.error;
- if (component == 0)
- add_ext_from_sym (sym);
- else if (!(sym.fileattr & FILE_ATTRIBUTE_DIRECTORY))
- {
- error = ENOTDIR;
- goto out;
- }
- goto out; // file found
- }
- /* Found a symlink if symlen > 0. If component == 0, then the
- src path itself was a symlink. If !follow_mode then
- we're done. Otherwise we have to insert the path found
- into the full path that we are building and perform all of
- these operations again on the newly derived path. */
- else if (symlen > 0)
- {
- saw_symlinks = 1;
- if (component == 0 && !need_directory && !(opt & PC_SYM_FOLLOW))
- {
- set_symlink (symlen); // last component of path is a symlink.
- if (opt & PC_SYM_CONTENTS)
- {
- strcpy (path, sym.contents);
- goto out;
- }
- add_ext_from_sym (sym);
- goto out;
- }
- else
- break;
- }
- else if (sym.error && sym.error != ENOENT && sym.error != ENOSHARE)
- {
- error = sym.error;
- goto out;
- }
- /* No existing file found. */
-
-virtual_component_retry:
- /* Find the new "tail" of the path, e.g. in '/for/bar/baz',
- /baz is the tail. */
- if (tail != path_end)
- *tail = '/';
- while (--tail > path_copy + 1 && *tail != '/') {}
- /* Exit loop if there is no tail or we are at the
- beginning of a UNC path */
- if (tail <= path_copy + 1)
- goto out; // all done
-
- /* Haven't found an existing pathname component yet.
- Pinch off the tail and try again. */
- *tail = '\0';
- component++;
- }
-
- /* Arrive here if above loop detected a symlink. */
- if (++loop > SYMLOOP_MAX)
- {
- error = ELOOP; // Eep.
- return;
- }
-
- MALLOC_CHECK;
-
-
- /* Place the link content, possibly with head and/or tail, in tmp_buf */
-
- char *headptr;
- if (isabspath (sym.contents))
- headptr = tmp_buf; /* absolute path */
- else
- {
- /* Copy the first part of the path (with ending /) and point to the end. */
- char *prevtail = tail;
- while (--prevtail > path_copy && *prevtail != '/') {}
- int headlen = prevtail - path_copy + 1;;
- memcpy (tmp_buf, path_copy, headlen);
- headptr = &tmp_buf[headlen];
- }
-
- /* Make sure there is enough space */
- if (headptr + symlen >= tmp_buf + (2 * NT_MAX_PATH))
- {
- too_long:
- error = ENAMETOOLONG;
- strcpy (path, "::ENAMETOOLONG::");
- return;
- }
-
- /* Copy the symlink contents to the end of tmp_buf.
- Convert slashes. */
- for (char *p = sym.contents; *p; p++)
- *headptr++ = *p == '\\' ? '/' : *p;
- *headptr = '\0';
-
- /* Copy any tail component (with the 0) */
- if (tail++ < path_end)
- {
- /* Add a slash if needed. There is space. */
- if (*(headptr - 1) != '/')
- *headptr++ = '/';
- int taillen = path_end - tail + 1;
- if (headptr + taillen > tmp_buf + (2 * NT_MAX_PATH))
- goto too_long;
- memcpy (headptr, tail, taillen);
- }
-
- /* Evaluate everything all over again. */
- src = tmp_buf;
- }
-
- if (!(opt & PC_SYM_CONTENTS))
- add_ext_from_sym (sym);
-
-out:
- if (dev.devn == FH_NETDRIVE && component)
- {
- /* This case indicates a non-existant resp. a non-retrievable
- share. This happens for instance if the share is a printer.
- In this case the path must not be treated like a FH_NETDRIVE,
- but like a FH_FS instead, so the usual open call for files
- is used on it. */
- dev.parse (FH_FS);
- }
- else if (isvirtual_dev (dev.devn) && fileattr == INVALID_FILE_ATTRIBUTES)
- {
- error = dev.devn == FH_NETDRIVE ? ENOSHARE : ENOENT;
- return;
- }
- else if (!need_directory || error)
- /* nothing to do */;
- else if (fileattr == INVALID_FILE_ATTRIBUTES)
- strcat (path, "\\"); /* Reattach trailing dirsep in native path. */
- else if (fileattr & FILE_ATTRIBUTE_DIRECTORY)
- path_flags &= ~PATH_SYMLINK;
- else
- {
- debug_printf ("%s is a non-directory", path);
- error = ENOTDIR;
- return;
- }
-
- if (dev.isfs ())
- {
- if (strncmp (path, "\\\\.\\", 4))
- {
- if (!tail || tail == path)
- /* nothing */;
- else if (tail[-1] != '\\')
- *tail = '\0';
- else
- {
- error = ENOENT;
- return;
- }
- }
-
- /* FS has been checked already for existing files. */
- if (exists () || fs.update (get_nt_native_path (), NULL))
- {
- /* Incoming DOS paths are treated like DOS paths in native
- Windows applications. No ACLs, just default settings. */
- if (is_msdos)
- fs.has_acls (false);
- debug_printf ("this->path(%s), has_acls(%d)", path, fs.has_acls ());
- if (fs.has_acls ())
- set_exec (0); /* We really don't know if this is executable or not here
- but set it to not executable since it will be figured out
- later by anything which cares about this. */
- }
- if (exec_state () != dont_know_if_executable)
- /* ok */;
- else if (isdir ())
- set_exec (1);
- else if (issymlink () || issocket ())
- set_exec (0);
- }
-
- if (opt & PC_NOFULL)
- {
- if (is_relpath)
- {
- mkrelpath (this->path, !!caseinsensitive);
- /* Invalidate wide_path so that wide relpath can be created
- in later calls to get_nt_native_path or get_wide_win32_path. */
- if (wide_path)
- cfree (wide_path);
- wide_path = NULL;
- }
- if (need_directory)
- {
- size_t n = strlen (this->path);
- /* Do not add trailing \ to UNC device names like \\.\a: */
- if (this->path[n - 1] != '\\' &&
- (strncmp (this->path, "\\\\.\\", 4) != 0))
- {
- this->path[n] = '\\';
- this->path[n + 1] = '\0';
- }
- }
- }
-
- if (saw_symlinks)
- set_has_symlinks ();
-
- if (!(opt & PC_POSIX))
- normalized_path_size = 0;
- else
- {
- if (tail < path_end && tail > path_copy + 1)
- *tail = '/';
- set_normalized_path (path_copy);
- if (is_msdos && !(opt & PC_NOWARN))
- warn_msdos (src);
- }
-
-#if 0
- if (!error)
- {
- last_path_conv = *this;
- strcpy (last_src, src);
- }
-#endif
-}
-
-path_conv::~path_conv ()
-{
- if (!normalized_path_size && normalized_path)
- {
- cfree (normalized_path);
- normalized_path = NULL;
- }
- if (wide_path)
- {
- cfree (wide_path);
- wide_path = NULL;
- }
-}
-
-bool
-path_conv::is_binary ()
-{
- tmp_pathbuf tp;
- PWCHAR bintest = tp.w_get ();
- DWORD bin;
-
- return GetBinaryTypeW (get_wide_win32_path (bintest), &bin);
-}
-
-/* Normalize a Win32 path.
- /'s are converted to \'s in the process.
- All duplicate \'s, except for 2 leading \'s, are deleted.
-
- The result is 0 for success, or an errno error value.
- FIXME: A lot of this should be mergeable with the POSIX critter. */
-int
-normalize_win32_path (const char *src, char *dst, char *&tail)
-{
- const char *src_start = src;
- bool beg_src_slash = isdirsep (src[0]);
-
- tail = dst;
- /* Skip long path name prefixes in Win32 or NT syntax. */
- if (beg_src_slash && (src[1] == '?' || isdirsep (src[1]))
- && src[2] == '?' && isdirsep (src[3]))
- {
- src += 4;
- if (src[1] != ':') /* native UNC path */
- src += 2; /* Fortunately the first char is not copied... */
- else
- beg_src_slash = false;
- }
- if (beg_src_slash && isdirsep (src[1]))
- {
- if (isdirsep (src[2]))
- {
- /* More than two slashes are just folded into one. */
- src += 2;
- while (isdirsep (src[1]))
- ++src;
- }
- else
- {
- /* Two slashes start a network or device path. */
- *tail++ = '\\';
- src++;
- if (src[1] == '.' && isdirsep (src[2]))
- {
- *tail++ = '\\';
- *tail++ = '.';
- src += 2;
- }
- }
- }
- if (tail == dst && !isdrive (src) && *src != '/')
- {
- if (beg_src_slash)
- tail += cygheap->cwd.get_drive (dst);
- else if (!cygheap->cwd.get (dst, 0))
- return get_errno ();
- else
- {
- tail = strchr (tail, '\0');
- if (tail[-1] != '\\')
- *tail++ = '\\';
- }
- }
-
- while (*src)
- {
- /* Strip duplicate /'s. */
- if (isdirsep (src[0]) && isdirsep (src[1]))
- src++;
- /* Ignore "./". */
- else if (src[0] == '.' && isdirsep (src[1])
- && (src == src_start || isdirsep (src[-1])))
- src += 2;
-
- /* Backup if "..". */
- else if (src[0] == '.' && src[1] == '.'
- /* dst must be greater than dst_start */
- && tail[-1] == '\\')
- {
- if (!isdirsep (src[2]) && src[2] != '\0')
- *tail++ = *src++;
- else
- {
- /* Back up over /, but not if it's the first one. */
- if (tail > dst + 1)
- tail--;
- /* Now back up to the next /. */
- while (tail > dst + 1 && tail[-1] != '\\' && tail[-2] != ':')
- tail--;
- src += 2;
- if (isdirsep (*src))
- src++;
- }
- }
- /* Otherwise, add char to result. */
- else
- {
- if (*src == '/')
- *tail++ = '\\';
- else
- *tail++ = *src;
- src++;
- }
- if ((tail - dst) >= NT_MAX_PATH)
- return ENAMETOOLONG;
- }
- if (tail > dst + 1 && tail[-1] == '.' && tail[-2] == '\\')
- tail--;
- *tail = '\0';
- debug_printf ("%s = normalize_win32_path (%s)", dst, src_start);
- return 0;
-}
-
-/* Various utilities. */
-
-/* nofinalslash: Remove trailing / and \ from SRC (except for the
- first one). It is ok for src == dst. */
-
-void __stdcall
-nofinalslash (const char *src, char *dst)
-{
- int len = strlen (src);
- if (src != dst)
- memcpy (dst, src, len + 1);
- while (len > 1 && isdirsep (dst[--len]))
- dst[len] = '\0';
-}
-
-/* conv_path_list: Convert a list of path names to/from Win32/POSIX. */
-
-static int
-conv_path_list (const char *src, char *dst, size_t size, int to_posix)
-{
- tmp_pathbuf tp;
- char src_delim, dst_delim;
- cygwin_conv_path_t conv_fn;
- size_t len;
-
- if (to_posix)
- {
- src_delim = ';';
- dst_delim = ':';
- conv_fn = CCP_WIN_A_TO_POSIX | CCP_RELATIVE;
- }
- else
- {
- src_delim = ':';
- dst_delim = ';';
- conv_fn = CCP_POSIX_TO_WIN_A | CCP_RELATIVE;
- }
-
- char *srcbuf;
- len = strlen (src) + 1;
- if (len <= NT_MAX_PATH * sizeof (WCHAR))
- srcbuf = (char *) tp.w_get ();
- else
- srcbuf = (char *) alloca (len);
-
- int err = 0;
- char *d = dst - 1;
- bool saw_empty = false;
- do
- {
- char *s = strccpy (srcbuf, &src, src_delim);
- size_t len = s - srcbuf;
- if (len >= NT_MAX_PATH)
- {
- err = ENAMETOOLONG;
- break;
- }
- if (len)
- {
- ++d;
- err = cygwin_conv_path (conv_fn, srcbuf, d, size - (d - dst));
- }
- else if (!to_posix)
- {
- ++d;
- err = cygwin_conv_path (conv_fn, ".", d, size - (d - dst));
- }
- else
- {
- if (to_posix == ENV_CVT)
- saw_empty = true;
- continue;
- }
- if (err)
- break;
- d = strchr (d, '\0');
- *d = dst_delim;
- }
- while (*src++);
-
- if (saw_empty)
- err = EIDRM;
-
- if (d < dst)
- d++;
- *d = '\0';
- return err;
-}
-
-/********************** Symbolic Link Support **************************/
-
-/* Create a symlink from FROMPATH to TOPATH. */
-
-/* If TRUE create symlinks as Windows shortcuts, if false create symlinks
- as normal files with magic number and system bit set. */
-bool allow_winsymlinks = false;
-
-extern "C" int
-symlink (const char *oldpath, const char *newpath)
-{
- return symlink_worker (oldpath, newpath, allow_winsymlinks, false);
-}
-
-int
-symlink_worker (const char *oldpath, const char *newpath, bool use_winsym,
- bool isdevice)
-{
- int res = -1;
- size_t len;
- path_conv win32_newpath, win32_oldpath;
- char *buf, *cp;
- SECURITY_ATTRIBUTES sa = sec_none_nih;
- security_descriptor sd;
- OBJECT_ATTRIBUTES attr;
- IO_STATUS_BLOCK io;
- NTSTATUS status;
- HANDLE fh;
- tmp_pathbuf tp;
- unsigned check_opt;
-
- /* POSIX says that empty 'newpath' is invalid input while empty
- 'oldpath' is valid -- it's symlink resolver job to verify if
- symlink contents point to existing filesystem object */
- myfault efault;
- if (efault.faulted (EFAULT))
- goto done;
- if (!*oldpath || !*newpath)
- {
- set_errno (ENOENT);
- goto done;
- }
-
- if (strlen (oldpath) > SYMLINK_MAX)
- {
- set_errno (ENAMETOOLONG);
- goto done;
- }
-
- len = strlen (newpath);
- /* Trailing dirsep is a no-no. */
- if (isdirsep (newpath[len - 1]))
- {
- set_errno (ENOENT);
- goto done;
- }
-
- check_opt = PC_SYM_NOFOLLOW | PC_POSIX | (isdevice ? PC_NOWARN : 0);
- /* We need the normalized full path below. */
- win32_newpath.check (newpath, check_opt, stat_suffixes);
- if (use_winsym && !win32_newpath.exists ()
- && (isdevice || !win32_newpath.fs_is_nfs ()))
- {
- char *newplnk = tp.c_get ();
- stpcpy (stpcpy (newplnk, newpath), ".lnk");
- win32_newpath.check (newplnk, check_opt);
- }
-
- if (win32_newpath.error)
- {
- set_errno (win32_newpath.error);
- goto done;
- }
-
- syscall_printf ("symlink (%s, %S)", oldpath,
- win32_newpath.get_nt_native_path ());
-
- if ((!isdevice && win32_newpath.exists ())
- || win32_newpath.is_auto_device ())
- {
- set_errno (EEXIST);
- goto done;
- }
-
- if (!isdevice && win32_newpath.fs_is_nfs ())
- {
- /* On NFS, create symlinks by calling NtCreateFile with an EA of type
- NfsSymlinkTargetName containing ... the symlink target name. */
- PFILE_FULL_EA_INFORMATION pffei = (PFILE_FULL_EA_INFORMATION) tp.w_get ();
- pffei->NextEntryOffset = 0;
- pffei->Flags = 0;
- pffei->EaNameLength = sizeof (NFS_SYML_TARGET) - 1;
- char *EaValue = stpcpy (pffei->EaName, NFS_SYML_TARGET) + 1;
- pffei->EaValueLength = sizeof (WCHAR) *
- (sys_mbstowcs ((PWCHAR) EaValue, NT_MAX_PATH, oldpath) - 1);
- status = NtCreateFile (&fh, FILE_WRITE_DATA | FILE_WRITE_EA | SYNCHRONIZE,
- win32_newpath.get_object_attr (attr, sa),
- &io, NULL, FILE_ATTRIBUTE_SYSTEM,
- FILE_SHARE_VALID_FLAGS, FILE_CREATE,
- FILE_SYNCHRONOUS_IO_NONALERT
- | FILE_OPEN_FOR_BACKUP_INTENT,
- pffei, NT_MAX_PATH * sizeof (WCHAR));
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- goto done;
- }
- NtClose (fh);
- res = 0;
- goto done;
- }
-
- if (use_winsym)
- {
- ITEMIDLIST *pidl = NULL;
- size_t full_len = 0;
- unsigned short oldpath_len, desc_len, relpath_len, pidl_len = 0;
- char desc[MAX_PATH + 1], *relpath;
-
- if (!isdevice)
- {
- /* First create an IDLIST to learn how big our shortcut is
- going to be. */
- IShellFolder *psl;
-
- /* The symlink target is relative to the directory in which
- the symlink gets created, not relative to the cwd. Therefore
- we have to mangle the path quite a bit before calling path_conv. */
- if (isabspath (oldpath))
- win32_oldpath.check (oldpath,
- PC_SYM_NOFOLLOW,
- stat_suffixes);
- else
- {
- len = strrchr (win32_newpath.normalized_path, '/')
- - win32_newpath.normalized_path + 1;
- char *absoldpath = tp.t_get ();
- stpcpy (stpncpy (absoldpath, win32_newpath.normalized_path, len),
- oldpath);
- win32_oldpath.check (absoldpath, PC_SYM_NOFOLLOW, stat_suffixes);
- }
- if (SUCCEEDED (SHGetDesktopFolder (&psl)))
- {
- WCHAR wc_path[win32_oldpath.get_wide_win32_path_len () + 1];
- win32_oldpath.get_wide_win32_path (wc_path);
- /* Amazing but true: Even though the ParseDisplayName method
- takes a wide char path name, it does not understand the
- Win32 prefix for long pathnames! So we have to tack off
- the prefix and convert the path to the "normal" syntax
- for ParseDisplayName. */
- WCHAR *wc = wc_path + 4;
- if (wc[1] != L':') /* native UNC path */
- *(wc += 2) = L'\\';
- HRESULT res;
- if (SUCCEEDED (res = psl->ParseDisplayName (NULL, NULL, wc, NULL,
- &pidl, NULL)))
- {
- ITEMIDLIST *p;
-
- for (p = pidl; p->mkid.cb > 0;
- p = (ITEMIDLIST *)((char *) p + p->mkid.cb))
- ;
- pidl_len = (char *) p - (char *) pidl + 2;
- }
- psl->Release ();
- }
- }
- /* Compute size of shortcut file. */
- full_len = sizeof (win_shortcut_hdr);
- if (pidl_len)
- full_len += sizeof (unsigned short) + pidl_len;
- oldpath_len = strlen (oldpath);
- /* Unfortunately the length of the description is restricted to a
- length of MAX_PATH up to NT4, and to a length of 2000 bytes
- since W2K. We don't want to add considerations for the different
- lengths and even 2000 bytes is not enough for long path names.
- So what we do here is to set the description to the POSIX path
- only if the path is not longer than MAX_PATH characters. We
- append the full path name after the regular shortcut data
- (see below), which works fine with Windows Explorer as well
- as older Cygwin versions (as long as the whole file isn't bigger
- than 8K). The description field is only used for backward
- compatibility to older Cygwin versions and those versions are
- not capable of handling long path names anyway. */
- desc_len = stpcpy (desc, oldpath_len > MAX_PATH
- ? "[path too long]" : oldpath) - desc;
- full_len += sizeof (unsigned short) + desc_len;
- /* Devices get the oldpath string unchanged as relative path. */
- if (isdevice)
- {
- relpath_len = oldpath_len;
- stpcpy (relpath = tp.c_get (), oldpath);
- }
- else
- {
- relpath_len = strlen (win32_oldpath.get_win32 ());
- stpcpy (relpath = tp.c_get (), win32_oldpath.get_win32 ());
- }
- full_len += sizeof (unsigned short) + relpath_len;
- full_len += sizeof (unsigned short) + oldpath_len;
- /* 1 byte more for trailing 0 written by stpcpy. */
- if (full_len < NT_MAX_PATH * sizeof (WCHAR))
- buf = (char *) tp.w_get ();
- else
- buf = (char *) alloca (full_len + 1);
-
- /* Create shortcut header */
- win_shortcut_hdr *shortcut_header = (win_shortcut_hdr *) buf;
- memset (shortcut_header, 0, sizeof *shortcut_header);
- shortcut_header->size = sizeof *shortcut_header;
- shortcut_header->magic = GUID_shortcut;
- shortcut_header->flags = (WSH_FLAG_DESC | WSH_FLAG_RELPATH);
- if (pidl)
- shortcut_header->flags |= WSH_FLAG_IDLIST;
- shortcut_header->run = SW_NORMAL;
- cp = buf + sizeof (win_shortcut_hdr);
-
- /* Create IDLIST */
- if (pidl)
- {
- *(unsigned short *)cp = pidl_len;
- memcpy (cp += 2, pidl, pidl_len);
- cp += pidl_len;
- CoTaskMemFree (pidl);
- }
-
- /* Create description */
- *(unsigned short *)cp = desc_len;
- cp = stpcpy (cp += 2, desc);
-
- /* Create relpath */
- *(unsigned short *)cp = relpath_len;
- cp = stpcpy (cp += 2, relpath);
-
- /* Append the POSIX path after the regular shortcut data for
- the long path support. */
- *(unsigned short *)cp = oldpath_len;
- cp = stpcpy (cp += 2, oldpath);
- }
- else
- {
- /* This is the old technique creating a symlink. */
- buf = tp.c_get ();
- /* Note that the terminating nul is written. */
- cp = stpcpy (stpcpy (buf, SYMLINK_COOKIE), oldpath) + 1;
- }
-
- if (isdevice && win32_newpath.exists ())
- {
- status = NtOpenFile (&fh, FILE_WRITE_ATTRIBUTES,
- win32_newpath.get_object_attr (attr, sa),
- &io, 0, FILE_OPEN_FOR_BACKUP_INTENT);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- goto done;
- }
- status = NtSetAttributesFile (fh, FILE_ATTRIBUTE_NORMAL);
- NtClose (fh);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- goto done;
- }
- }
- /* See comments in fhander_base::open () for an explanation why we defer
- setting security attributes on remote files. */
- if (win32_newpath.has_acls () && !win32_newpath.isremote ())
- set_security_attribute (win32_newpath, S_IFLNK | STD_RBITS | STD_WBITS,
- &sa, sd);
- status = NtCreateFile (&fh, DELETE | FILE_GENERIC_WRITE,
- win32_newpath.get_object_attr (attr, sa),
- &io, NULL, FILE_ATTRIBUTE_NORMAL,
- FILE_SHARE_VALID_FLAGS,
- isdevice ? FILE_OVERWRITE_IF : FILE_CREATE,
- FILE_SYNCHRONOUS_IO_NONALERT
- | FILE_NON_DIRECTORY_FILE
- | FILE_OPEN_FOR_BACKUP_INTENT,
- NULL, 0);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- goto done;
- }
- if (win32_newpath.has_acls () && win32_newpath.isremote ())
- set_file_attribute (fh, win32_newpath, ILLEGAL_UID, ILLEGAL_GID,
- S_IFLNK | STD_RBITS | STD_WBITS);
- status = NtWriteFile (fh, NULL, NULL, NULL, &io, buf, cp - buf, NULL, NULL);
- if (NT_SUCCESS (status) && io.Information == (ULONG) (cp - buf))
- {
- status = NtSetAttributesFile (fh, use_winsym ? FILE_ATTRIBUTE_READONLY
- : FILE_ATTRIBUTE_SYSTEM);
- if (!NT_SUCCESS (status))
- debug_printf ("Setting attributes failed, status = %p", status);
- res = 0;
- }
- else
- {
- __seterrno_from_nt_status (status);
- FILE_DISPOSITION_INFORMATION fdi = { TRUE };
- status = NtSetInformationFile (fh, &io, &fdi, sizeof fdi,
- FileDispositionInformation);
- if (!NT_SUCCESS (status))
- debug_printf ("Setting delete dispostion failed, status = %p", status);
- }
- NtClose (fh);
-
-done:
- syscall_printf ("%d = symlink_worker (%s, %s, %d, %d)", res, oldpath,
- newpath, use_winsym, isdevice);
- return res;
-}
-
-static bool
-cmp_shortcut_header (win_shortcut_hdr *file_header)
-{
- /* A Cygwin or U/Win shortcut only contains a description and a relpath.
- Cygwin shortcuts also might contain an ITEMIDLIST. The run type is
- always set to SW_NORMAL. */
- return file_header->size == sizeof (win_shortcut_hdr)
- && !memcmp (&file_header->magic, &GUID_shortcut, sizeof GUID_shortcut)
- && (file_header->flags & ~WSH_FLAG_IDLIST)
- == (WSH_FLAG_DESC | WSH_FLAG_RELPATH)
- && file_header->run == SW_NORMAL;
-}
-
-int
-symlink_info::check_shortcut (HANDLE in_h)
-{
- tmp_pathbuf tp;
- win_shortcut_hdr *file_header;
- char *buf, *cp;
- unsigned short len;
- int res = 0;
- UNICODE_STRING same = { 0, 0, (PWCHAR) L"" };
- OBJECT_ATTRIBUTES attr;
- NTSTATUS status;
- HANDLE h;
- IO_STATUS_BLOCK io;
- FILE_STANDARD_INFORMATION fsi;
-
- InitializeObjectAttributes (&attr, &same, 0, in_h, NULL);
- status = NtOpenFile (&h, FILE_READ_DATA | SYNCHRONIZE,
- &attr, &io, FILE_SHARE_VALID_FLAGS,
- FILE_OPEN_FOR_BACKUP_INTENT
- | FILE_SYNCHRONOUS_IO_NONALERT);
- if (!NT_SUCCESS (status))
- return 0;
- status = NtQueryInformationFile (h, &io, &fsi, sizeof fsi,
- FileStandardInformation);
- if (!NT_SUCCESS (status))
- {
- set_error (EIO);
- goto out;
- }
- if (fsi.EndOfFile.QuadPart <= sizeof (win_shortcut_hdr)
- || fsi.EndOfFile.QuadPart > 4 * 65536)
- goto out;
- if (fsi.EndOfFile.LowPart < NT_MAX_PATH * sizeof (WCHAR))
- buf = (char *) tp.w_get ();
- else
- buf = (char *) alloca (fsi.EndOfFile.LowPart + 1);
- if (!NT_SUCCESS (NtReadFile (h, NULL, NULL, NULL,
- &io, buf, fsi.EndOfFile.LowPart, NULL, NULL)))
- {
- set_error (EIO);
- goto out;
- }
- file_header = (win_shortcut_hdr *) buf;
- if (io.Information != fsi.EndOfFile.LowPart
- || !cmp_shortcut_header (file_header))
- goto out;
- cp = buf + sizeof (win_shortcut_hdr);
- if (file_header->flags & WSH_FLAG_IDLIST) /* Skip ITEMIDLIST */
- cp += *(unsigned short *) cp + 2;
- if (!(len = *(unsigned short *) cp))
- goto out;
- cp += 2;
- /* Check if this is a device file - these start with the sequence :\\ */
- if (strncmp (cp, ":\\", 2) == 0)
- res = strlen (strcpy (contents, cp)); /* Don't mess with device files */
- else
- {
- /* Has appended full path? If so, use it instead of description. */
- unsigned short relpath_len = *(unsigned short *) (cp + len);
- if (cp + len + 2 + relpath_len < buf + fsi.EndOfFile.LowPart)
- {
- cp += len + 2 + relpath_len;
- len = *(unsigned short *) cp;
- cp += 2;
- }
- if (len > SYMLINK_MAX)
- goto out;
- cp[len] = '\0';
- res = posixify (cp);
- }
- if (res) /* It's a symlink. */
- pflags = PATH_SYMLINK | PATH_LNK;
- return res;
-
-out:
- NtClose (h);
- return 0;
-}
-
-int
-symlink_info::check_sysfile (HANDLE in_h)
-{
- char cookie_buf[sizeof (SYMLINK_COOKIE) - 1];
- char srcbuf[SYMLINK_MAX + 2];
- int res = 0;
- UNICODE_STRING same = { 0, 0, (PWCHAR) L"" };
- OBJECT_ATTRIBUTES attr;
- NTSTATUS status;
- HANDLE h;
- IO_STATUS_BLOCK io;
-
- InitializeObjectAttributes (&attr, &same, 0, in_h, NULL);
- status = NtOpenFile (&h, FILE_READ_DATA | SYNCHRONIZE,
- &attr, &io, FILE_SHARE_VALID_FLAGS,
- FILE_OPEN_FOR_BACKUP_INTENT
- | FILE_SYNCHRONOUS_IO_NONALERT);
- if (!NT_SUCCESS (status))
- ;
- else if (!NT_SUCCESS (status = NtReadFile (h, NULL, NULL, NULL, &io,
- cookie_buf, sizeof (cookie_buf),
- NULL, NULL)))
- {
- debug_printf ("ReadFile1 failed");
- if (status != STATUS_END_OF_FILE)
- set_error (EIO);
- }
- else if (io.Information == sizeof (cookie_buf)
- && memcmp (cookie_buf, SYMLINK_COOKIE, sizeof (cookie_buf)) == 0)
- {
- /* It's a symlink. */
- pflags = PATH_SYMLINK;
-
- status = NtReadFile (h, NULL, NULL, NULL, &io, srcbuf,
- SYMLINK_MAX + 2, NULL, NULL);
- if (!NT_SUCCESS (status))
- {
- debug_printf ("ReadFile2 failed");
- if (status != STATUS_END_OF_FILE)
- set_error (EIO);
- }
- else if (io.Information > SYMLINK_MAX + 1)
- debug_printf ("symlink string too long");
- else
- res = posixify (srcbuf);
- }
- else if (io.Information == sizeof (cookie_buf)
- && memcmp (cookie_buf, SOCKET_COOKIE, sizeof (cookie_buf)) == 0)
- pflags |= PATH_SOCKET;
- NtClose (h);
- return res;
-}
-
-int
-symlink_info::check_reparse_point (HANDLE h)
-{
- tmp_pathbuf tp;
- NTSTATUS status;
- IO_STATUS_BLOCK io;
- PREPARSE_DATA_BUFFER rp = (PREPARSE_DATA_BUFFER) tp.c_get ();
- char srcbuf[SYMLINK_MAX + 7];
-
- status = NtFsControlFile (h, NULL, NULL, NULL, &io, FSCTL_GET_REPARSE_POINT,
- NULL, 0, (LPVOID) rp,
- MAXIMUM_REPARSE_DATA_BUFFER_SIZE);
- if (!NT_SUCCESS (status))
- {
- debug_printf ("NtFsControlFile(FSCTL_GET_REPARSE_POINT) failed, %p",
- status);
- set_error (EIO);
- return 0;
- }
- if (rp->ReparseTag == IO_REPARSE_TAG_SYMLINK)
- {
- sys_wcstombs (srcbuf, SYMLINK_MAX + 1,
- (WCHAR *)((char *)rp->SymbolicLinkReparseBuffer.PathBuffer
- + rp->SymbolicLinkReparseBuffer.SubstituteNameOffset),
- rp->SymbolicLinkReparseBuffer.SubstituteNameLength / sizeof (WCHAR));
- pflags = PATH_SYMLINK | PATH_REP;
- fileattr &= ~FILE_ATTRIBUTE_DIRECTORY;
- }
- else if (rp->ReparseTag == IO_REPARSE_TAG_MOUNT_POINT)
- {
- if (rp->SymbolicLinkReparseBuffer.PrintNameLength == 0)
- {
- /* Likely a volume mount point. Not treated as symlink. */
- return 0;
- }
- sys_wcstombs (srcbuf, SYMLINK_MAX + 1,
- (WCHAR *)((char *)rp->MountPointReparseBuffer.PathBuffer
- + rp->MountPointReparseBuffer.SubstituteNameOffset),
- rp->MountPointReparseBuffer.SubstituteNameLength / sizeof (WCHAR));
- pflags = PATH_SYMLINK | PATH_REP;
- fileattr &= ~FILE_ATTRIBUTE_DIRECTORY;
- }
- return posixify (srcbuf);
-}
-
-int
-symlink_info::check_nfs_symlink (HANDLE h)
-{
- tmp_pathbuf tp;
- NTSTATUS status;
- IO_STATUS_BLOCK io;
- struct {
- FILE_GET_EA_INFORMATION fgei;
- char buf[sizeof (NFS_SYML_TARGET)];
- } fgei_buf;
- PFILE_FULL_EA_INFORMATION pffei;
- int res = 0;
-
- /* To find out if the file is a symlink and to get the symlink target,
- try to fetch the NfsSymlinkTargetName EA. */
- fgei_buf.fgei.NextEntryOffset = 0;
- fgei_buf.fgei.EaNameLength = sizeof (NFS_SYML_TARGET) - 1;
- stpcpy (fgei_buf.fgei.EaName, NFS_SYML_TARGET);
- pffei = (PFILE_FULL_EA_INFORMATION) tp.w_get ();
- status = NtQueryEaFile (h, &io, pffei, NT_MAX_PATH * sizeof (WCHAR), TRUE,
- &fgei_buf.fgei, sizeof fgei_buf, NULL, TRUE);
- if (NT_SUCCESS (status) && pffei->EaValueLength > 0)
- {
- PWCHAR spath = (PWCHAR)
- (pffei->EaName + pffei->EaNameLength + 1);
- res = sys_wcstombs (contents, SYMLINK_MAX + 1,
- spath, pffei->EaValueLength);
- pflags = PATH_SYMLINK;
- }
- return res;
-}
-
-int
-symlink_info::posixify (char *srcbuf)
-{
- /* The definition for a path in a native symlink is a bit weird. The Flags
- value seem to contain 0 for absolute paths (stored as NT native path)
- and 1 for relative paths. Relative paths are paths not starting with a
- drive letter. These are not converted to NT native, but stored as
- given. A path starting with a single backslash is relative to the
- current drive thus a "relative" value (Flags == 1).
- Funny enough it's possible to store paths with slashes instead of
- backslashes, but they are evaluated incorrectly by subsequent Windows
- calls like CreateFile (ERROR_INVALID_NAME). So, what we do here is to
- take paths starting with slashes at face value, evaluating them as
- Cygwin specific POSIX paths.
- A path starting with two slashes(!) or backslashes is converted into an
- NT UNC path. Unfortunately, in contrast to POSIX rules, paths starting
- with three or more (back)slashes are also converted into UNC paths,
- just incorrectly sticking to one redundant leading backslashe. We go
- along with this behaviour to avoid scenarios in which native tools access
- other files than Cygwin.
- The above rules are used exactly the same way on Cygwin specific symlinks
- (sysfiles and shortcuts) to eliminate non-POSIX paths in the output. */
-
- /* Eliminate native NT prefixes. */
- if (srcbuf[0] == '\\' && !strncmp (srcbuf + 1, "??\\", 3))
- {
- srcbuf += 4;
- if (srcbuf[1] != ':') /* native UNC path */
- *(srcbuf += 2) = '\\';
- }
- if (isdrive (srcbuf))
- mount_table->conv_to_posix_path (srcbuf, contents, 0);
- else if (srcbuf[0] == '\\')
- {
- if (srcbuf[1] == '\\') /* UNC path */
- slashify (srcbuf, contents, 0);
- else /* Paths starting with \ are current drive relative. */
- {
- char cvtbuf[SYMLINK_MAX + 1];
-
- stpcpy (cvtbuf + cygheap->cwd.get_drive (cvtbuf), srcbuf);
- mount_table->conv_to_posix_path (cvtbuf, contents, 0);
- }
- }
- else /* Everything else is taken as is. */
- slashify (srcbuf, contents, 0);
- return strlen (contents);
-}
-
-enum
-{
- SCAN_BEG,
- SCAN_LNK,
- SCAN_HASLNK,
- SCAN_JUSTCHECK,
- SCAN_JUSTCHECKTHIS, /* Never try to append a suffix. */
- SCAN_APPENDLNK,
- SCAN_EXTRALNK,
- SCAN_DONE,
-};
-
-class suffix_scan
-{
- const suffix_info *suffixes, *suffixes_start;
- int nextstate;
- char *eopath;
-public:
- const char *path;
- char *has (const char *, const suffix_info *);
- int next ();
- int lnk_match () {return nextstate >= SCAN_APPENDLNK;}
-};
-
-char *
-suffix_scan::has (const char *in_path, const suffix_info *in_suffixes)
-{
- nextstate = SCAN_BEG;
- suffixes = suffixes_start = in_suffixes;
-
- const char *fname = strrchr (in_path, '\\');
- fname = fname ? fname + 1 : in_path;
- char *ext_here = strrchr (fname, '.');
- path = in_path;
- eopath = strchr (path, '\0');
-
- if (!ext_here)
- goto noext;
-
- if (suffixes)
- {
- /* Check if the extension matches a known extension */
- for (const suffix_info *ex = in_suffixes; ex->name != NULL; ex++)
- if (ascii_strcasematch (ext_here, ex->name))
- {
- nextstate = SCAN_JUSTCHECK;
- suffixes = NULL; /* Has an extension so don't scan for one. */
- goto done;
- }
- }
-
- /* Didn't match. Use last resort -- .lnk. */
- if (ascii_strcasematch (ext_here, ".lnk"))
- {
- nextstate = SCAN_HASLNK;
- suffixes = NULL;
- }
-
- noext:
- ext_here = eopath;
-
- done:
- /* Avoid attaching suffixes if the resulting filename would be invalid. */
- if (eopath - fname > NAME_MAX - 4)
- {
- nextstate = SCAN_JUSTCHECKTHIS;
- suffixes = NULL;
- }
- return ext_here;
-}
-
-int
-suffix_scan::next ()
-{
- for (;;)
- {
- if (!suffixes)
- switch (nextstate)
- {
- case SCAN_BEG:
- suffixes = suffixes_start;
- if (!suffixes)
- {
- nextstate = SCAN_LNK;
- return 1;
- }
- nextstate = SCAN_EXTRALNK;
- /* fall through to suffix checking below */
- break;
- case SCAN_HASLNK:
- nextstate = SCAN_APPENDLNK; /* Skip SCAN_BEG */
- return 1;
- case SCAN_EXTRALNK:
- nextstate = SCAN_DONE;
- *eopath = '\0';
- return 0;
- case SCAN_JUSTCHECK:
- nextstate = SCAN_LNK;
- return 1;
- case SCAN_JUSTCHECKTHIS:
- nextstate = SCAN_DONE;
- return 1;
- case SCAN_LNK:
- case SCAN_APPENDLNK:
- strcat (eopath, ".lnk");
- nextstate = SCAN_DONE;
- return 1;
- default:
- *eopath = '\0';
- return 0;
- }
-
- while (suffixes && suffixes->name)
- if (nextstate == SCAN_EXTRALNK && !suffixes->addon)
- suffixes++;
- else
- {
- strcpy (eopath, suffixes->name);
- if (nextstate == SCAN_EXTRALNK)
- strcat (eopath, ".lnk");
- suffixes++;
- return 1;
- }
- suffixes = NULL;
- }
-}
-
-bool
-symlink_info::set_error (int in_errno)
-{
- bool res;
- if (!(pflags & PATH_NO_ACCESS_CHECK) || in_errno == ENAMETOOLONG || in_errno == EIO)
- {
- error = in_errno;
- res = true;
- }
- else if (in_errno == ENOENT)
- res = true;
- else
- {
- fileattr = FILE_ATTRIBUTE_NORMAL;
- res = false;
- }
- return res;
-}
-
-bool
-symlink_info::parse_device (const char *contents)
-{
- char *endptr;
- _major_t mymajor;
- _major_t myminor;
- _mode_t mymode;
-
- mymajor = strtol (contents += 2, &endptr, 16);
- if (endptr == contents)
- return isdevice = false;
-
- contents = endptr;
- myminor = strtol (++contents, &endptr, 16);
- if (endptr == contents)
- return isdevice = false;
-
- contents = endptr;
- mymode = strtol (++contents, &endptr, 16);
- if (endptr == contents)
- return isdevice = false;
-
- if ((mymode & S_IFMT) == S_IFIFO)
- {
- mymajor = _major (FH_FIFO);
- myminor = _minor (FH_FIFO);
- }
-
- major = mymajor;
- minor = myminor;
- mode = mymode;
- return isdevice = true;
-}
-
-/* Check if PATH is a symlink. PATH must be a valid Win32 path name.
-
- If PATH is a symlink, put the value of the symlink--the file to
- which it points--into BUF. The value stored in BUF is not
- necessarily null terminated. BUFLEN is the length of BUF; only up
- to BUFLEN characters will be stored in BUF. BUF may be NULL, in
- which case nothing will be stored.
-
- Set *SYML if PATH is a symlink.
-
- Set *EXEC if PATH appears to be executable. This is an efficiency
- hack because we sometimes have to open the file anyhow. *EXEC will
- not be set for every executable file.
-
- Return -1 on error, 0 if PATH is not a symlink, or the length
- stored into BUF if PATH is a symlink. */
-
-int
-symlink_info::check (char *path, const suffix_info *suffixes, unsigned opt,
- fs_info &fs)
-{
- HANDLE h = NULL;
- int res = 0;
- suffix_scan suffix;
- contents[0] = '\0';
-
- issymlink = true;
- isdevice = false;
- ext_here = suffix.has (path, suffixes);
- extn = ext_here - path;
- major = 0;
- minor = 0;
- mode = 0;
- pflags &= ~(PATH_SYMLINK | PATH_LNK | PATH_REP);
- ULONG ci_flag = cygwin_shared->obcaseinsensitive || (pflags & PATH_NOPOSIX)
- ? OBJ_CASE_INSENSITIVE : 0;
-
- /* TODO: Temporarily do all char->UNICODE conversion here. This should
- already be slightly faster than using Ascii functions. */
- tmp_pathbuf tp;
- UNICODE_STRING upath;
- OBJECT_ATTRIBUTES attr;
- tp.u_get (&upath);
- InitializeObjectAttributes (&attr, &upath, ci_flag, NULL, NULL);
-
- PVOID eabuf = &nfs_aol_ffei;
- ULONG easize = sizeof nfs_aol_ffei;
-
- while (suffix.next ())
- {
- FILE_BASIC_INFORMATION fbi;
- NTSTATUS status;
- IO_STATUS_BLOCK io;
- bool no_ea = false;
-
- error = 0;
- get_nt_native_path (suffix.path, upath);
- if (h)
- {
- NtClose (h);
- h = NULL;
- }
- /* The EA given to NtCreateFile allows to get a handle to a symlink on
- an NFS share, rather than getting a handle to the target of the
- symlink (which would spoil the task of this method quite a bit).
- Fortunately it's ignored on most other file systems so we don't have
- to special case NFS too much. */
- status = NtCreateFile (&h,
- READ_CONTROL | FILE_READ_ATTRIBUTES | FILE_READ_EA,
- &attr, &io, NULL, 0, FILE_SHARE_VALID_FLAGS,
- FILE_OPEN,
- FILE_OPEN_REPARSE_POINT
- | FILE_OPEN_FOR_BACKUP_INTENT,
- eabuf, easize);
- /* No right to access EAs or EAs not supported? */
- if (status == STATUS_ACCESS_DENIED || status == STATUS_EAS_NOT_SUPPORTED)
- {
- no_ea = true;
- /* If EAs are not supported, there's no sense to check them again
- whith suffixes attached. So we set eabuf/easize to 0 here once. */
- if (status == STATUS_EAS_NOT_SUPPORTED)
- {
- eabuf = NULL;
- easize = 0;
- }
- status = NtOpenFile (&h, READ_CONTROL | FILE_READ_ATTRIBUTES,
- &attr, &io, FILE_SHARE_VALID_FLAGS,
- FILE_OPEN_REPARSE_POINT
- | FILE_OPEN_FOR_BACKUP_INTENT);
- }
- if (NT_SUCCESS (status)
- && NT_SUCCESS (status
- = NtQueryInformationFile (h, &io, &fbi, sizeof fbi,
- FileBasicInformation)))
- fileattr = fbi.FileAttributes;
- else
- {
- debug_printf ("%p = NtQueryInformationFile (%S)", status, &upath);
- h = NULL;
- fileattr = INVALID_FILE_ATTRIBUTES;
-
- /* One of the inner path components is invalid, or the path contains
- invalid characters. Bail out with ENOENT.
-
- Note that additional STATUS_OBJECT_PATH_INVALID and
- STATUS_OBJECT_PATH_SYNTAX_BAD status codes exist. The first one
- is seemingly not generated by NtQueryAttributesFile, the latter
- is only generated if the path is no absolute path within the
- NT name space, which should not happen and would point to an
- error in get_nt_native_path. Both status codes are deliberately
- not tested here unless proved necessary. */
- if (status == STATUS_OBJECT_PATH_NOT_FOUND
- || status == STATUS_OBJECT_NAME_INVALID)
- {
- set_error (ENOENT);
- goto file_not_symlink;
- }
- if (status != STATUS_OBJECT_NAME_NOT_FOUND
- && status != STATUS_NO_SUCH_FILE) /* ENOENT on NFS or 9x share */
- {
- /* The file exists, but the user can't access it for one reason
- or the other. To get the file attributes we try to access the
- information by opening the parent directory and getting the
- file attributes using a matching NtQueryDirectoryFile call. */
- UNICODE_STRING dirname, basename;
- OBJECT_ATTRIBUTES dattr;
- HANDLE dir;
- struct {
- FILE_DIRECTORY_INFORMATION fdi;
- WCHAR dummy_buf[NAME_MAX + 1];
- } fdi_buf;
-
- RtlSplitUnicodePath (&upath, &dirname, &basename);
- InitializeObjectAttributes (&dattr, &dirname, ci_flag,
- NULL, NULL);
- status = NtOpenFile (&dir, SYNCHRONIZE | FILE_LIST_DIRECTORY,
- &dattr, &io, FILE_SHARE_VALID_FLAGS,
- FILE_SYNCHRONOUS_IO_NONALERT
- | FILE_OPEN_FOR_BACKUP_INTENT
- | FILE_DIRECTORY_FILE);
- if (!NT_SUCCESS (status))
- {
- debug_printf ("%p = NtOpenFile(%S)", status, &dirname);
- fileattr = 0;
- }
- else
- {
- status = NtQueryDirectoryFile (dir, NULL, NULL, NULL, &io,
- &fdi_buf, sizeof fdi_buf,
- FileDirectoryInformation,
- TRUE, &basename, TRUE);
- NtClose (dir);
- if (!NT_SUCCESS (status))
- {
- debug_printf ("%p = NtQueryDirectoryFile(%S)",
- status, &dirname);
- if (status == STATUS_NO_SUCH_FILE)
- {
- /* This can happen when trying to access files
- which match DOS device names on SMB shares.
- NtOpenFile failed with STATUS_ACCESS_DENIED,
- but the NtQueryDirectoryFile tells us the
- file doesn't exist. We're suspicious in this
- case and retry with the next suffix instead of
- just giving up. */
- set_error (ENOENT);
- continue;
- }
- fileattr = 0;
- }
- else
- fileattr = fdi_buf.fdi.FileAttributes;
- }
- ext_tacked_on = !!*ext_here;
- goto file_not_symlink;
- }
- set_error (ENOENT);
- continue;
- }
-
- /* Check file system while we're having the file open anyway.
- This speeds up path_conv noticably (~10%). */
- fs.update (&upath, h);
-
- ext_tacked_on = !!*ext_here;
-
- res = -1;
-
- /* Windows shortcuts are potentially treated as symlinks. Valid Cygwin
- & U/WIN shortcuts are R/O, but definitely not directories. */
- if ((fileattr & (FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_DIRECTORY))
- == FILE_ATTRIBUTE_READONLY && suffix.lnk_match ())
- {
- res = check_shortcut (h);
- if (!res)
- {
- /* If searching for `foo' and then finding a `foo.lnk' which is
- no shortcut, return the same as if file not found. */
- if (ext_tacked_on)
- {
- fileattr = INVALID_FILE_ATTRIBUTES;
- set_error (ENOENT);
- continue;
- }
- }
- else if (contents[0] != ':' || contents[1] != '\\'
- || !parse_device (contents))
- break;
- }
-
- /* If searching for `foo' and then finding a `foo.lnk' which is
- no shortcut, return the same as if file not found. */
- else if (suffix.lnk_match () && ext_tacked_on)
- {
- fileattr = INVALID_FILE_ATTRIBUTES;
- set_error (ENOENT);
- continue;
- }
-
- /* Reparse points are potentially symlinks. This check must be
- performed before checking the SYSTEM attribute for sysfile
- symlinks, since reparse points can have this flag set, too.
- For instance, Vista starts to create a couple of reparse points
- with SYSTEM and HIDDEN flags set. */
- else if (fileattr & FILE_ATTRIBUTE_REPARSE_POINT)
- {
- res = check_reparse_point (h);
- if (res)
- break;
- }
-
- /* This is the old Cygwin method creating symlinks. A symlink will
- have the `system' file attribute. Only files can be symlinks
- (which can be symlinks to directories). */
- else if ((fileattr & (FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_DIRECTORY))
- == FILE_ATTRIBUTE_SYSTEM)
- {
- res = check_sysfile (h);
- if (res)
- break;
- }
-
- /* If the file could be opened with FILE_READ_EA, and if it's on a
- NFS share, check if it's a symlink. Only files can be symlinks
- (which can be symlinks to directories). */
- else if (fs.is_nfs () && !no_ea && !(fileattr & FILE_ATTRIBUTE_DIRECTORY))
- {
- res = check_nfs_symlink (h);
- if (res)
- break;
- }
-
- /* Normal file. */
- file_not_symlink:
- issymlink = false;
- syscall_printf ("%s", isdevice ? "is a device" : "not a symlink");
- res = 0;
- break;
- }
-
- if (h)
- NtClose (h);
-
- syscall_printf ("%d = symlink.check (%s, %p) (%p)",
- res, suffix.path, contents, pflags);
- return res;
-}
-
-/* "path" is the path in a virtual symlink. Set a symlink_info struct from
- that and proceed with further path checking afterwards. */
-int
-symlink_info::set (char *path)
-{
- strcpy (contents, path);
- pflags = PATH_SYMLINK;
- fileattr = FILE_ATTRIBUTE_NORMAL;
- error = 0;
- issymlink = true;
- isdevice = false;
- ext_tacked_on = false;
- ext_here = NULL;
- extn = major = minor = mode = 0;
- return strlen (path);
-}
-
-/* readlink system call */
-
-extern "C" ssize_t
-readlink (const char *path, char *buf, size_t buflen)
-{
- if (buflen < 0)
- {
- set_errno (ENAMETOOLONG);
- return -1;
- }
-
- path_conv pathbuf (path, PC_SYM_CONTENTS, stat_suffixes);
-
- if (pathbuf.error)
- {
- set_errno (pathbuf.error);
- syscall_printf ("-1 = readlink (%s, %p, %d)", path, buf, buflen);
- return -1;
- }
-
- if (!pathbuf.exists ())
- {
- set_errno (ENOENT);
- return -1;
- }
-
- if (!pathbuf.issymlink ())
- {
- if (pathbuf.exists ())
- set_errno (EINVAL);
- return -1;
- }
-
- ssize_t len = min (buflen, strlen (pathbuf.get_win32 ()));
- memcpy (buf, pathbuf.get_win32 (), len);
-
- /* errno set by symlink.check if error */
- return len;
-}
-
-/* Some programs rely on st_dev/st_ino being unique for each file.
- Hash the path name and hope for the best. The hash arg is not
- always initialized to zero since readdir needs to compute the
- dirent ino_t based on a combination of the hash of the directory
- done during the opendir call and the hash or the filename within
- the directory. FIXME: Not bullet-proof. */
-/* Cygwin internal */
-__ino64_t __stdcall
-hash_path_name (__ino64_t hash, PUNICODE_STRING name)
-{
- if (name->Length == 0)
- return hash;
-
- /* Build up hash. Name is already normalized */
- USHORT len = name->Length / sizeof (WCHAR);
- for (USHORT idx = 0; idx < len; ++idx)
- hash = RtlUpcaseUnicodeChar (name->Buffer[idx])
- + (hash << 6) + (hash << 16) - hash;
- return hash;
-}
-
-__ino64_t __stdcall
-hash_path_name (__ino64_t hash, PCWSTR name)
-{
- UNICODE_STRING uname;
- RtlInitUnicodeString (&uname, name);
- return hash_path_name (hash, &uname);
-}
-
-__ino64_t __stdcall
-hash_path_name (__ino64_t hash, const char *name)
-{
- UNICODE_STRING uname;
- RtlCreateUnicodeStringFromAsciiz (&uname, name);
- __ino64_t ret = hash_path_name (hash, &uname);
- RtlFreeUnicodeString (&uname);
- return ret;
-}
-
-extern "C" char *
-getcwd (char *buf, size_t ulen)
-{
- char* res = NULL;
- myfault efault;
- if (efault.faulted (EFAULT))
- /* errno set */;
- else if (ulen == 0 && buf)
- set_errno (EINVAL);
- else
- res = cygheap->cwd.get (buf, 1, 1, ulen);
- return res;
-}
-
-/* getwd: Legacy. */
-extern "C" char *
-getwd (char *buf)
-{
- return getcwd (buf, PATH_MAX + 1); /*Per SuSv3!*/
-}
-
-/* chdir: POSIX 5.2.1.1 */
-extern "C" int
-chdir (const char *in_dir)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (!*in_dir)
- {
- set_errno (ENOENT);
- return -1;
- }
-
- syscall_printf ("dir '%s'", in_dir);
-
- /* Convert path. First argument ensures that we don't check for NULL/empty/invalid
- again. */
- path_conv path (PC_NONULLEMPTY, in_dir, PC_SYM_FOLLOW | PC_POSIX);
- if (path.error)
- {
- set_errno (path.error);
- syscall_printf ("-1 = chdir (%s)", in_dir);
- return -1;
- }
-
- int res = -1;
- bool doit = false;
- const char *posix_cwd = NULL;
- int devn = path.get_devn ();
- if (!isvirtual_dev (devn))
- {
- /* The sequence chdir("xx"); chdir(".."); must be a noop if xx
- is not a symlink. This is exploited by find.exe.
- The posix_cwd is just path.normalized_path.
- In other cases we let cwd.set obtain the Posix path through
- the mount table. */
- if (!isdrive(path.normalized_path))
- posix_cwd = path.normalized_path;
- res = 0;
- doit = true;
- }
- else if (!path.exists ())
- set_errno (ENOENT);
- else if (!path.isdir ())
- set_errno (ENOTDIR);
- else
- {
- posix_cwd = path.normalized_path;
- res = 0;
- }
-
- if (!res)
- res = cygheap->cwd.set (path.get_nt_native_path (), posix_cwd, doit);
-
- /* Note that we're accessing cwd.posix without a lock here. I didn't think
- it was worth locking just for strace. */
- syscall_printf ("%d = chdir() cygheap->cwd.posix '%s' native '%S'", res,
- cygheap->cwd.posix, path.get_nt_native_path ());
- MALLOC_CHECK;
- return res;
-}
-
-extern "C" int
-fchdir (int fd)
-{
- int res;
- cygheap_fdget cfd (fd);
- if (cfd >= 0)
- res = chdir (cfd->get_name ());
- else
- res = -1;
-
- syscall_printf ("%d = fchdir (%d)", res, fd);
- return res;
-}
-
-/******************** Exported Path Routines *********************/
-
-/* Cover functions to the path conversion routines.
- These are exported to the world as cygwin_foo by cygwin.din. */
-
-#define return_with_errno(x) \
- do {\
- int err = (x);\
- if (!err)\
- return 0;\
- set_errno (err);\
- return -1;\
- } while (0)
-
-extern "C" ssize_t
-cygwin_conv_path (cygwin_conv_path_t what, const void *from, void *to,
- size_t size)
-{
- tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- path_conv p;
- size_t lsiz = 0;
- char *buf = NULL;
- int error = 0;
- bool relative = !!(what & CCP_RELATIVE);
- what &= ~CCP_RELATIVE;
-
- switch (what)
- {
- case CCP_POSIX_TO_WIN_A:
- {
- p.check ((const char *) from,
- PC_POSIX | PC_SYM_FOLLOW | PC_NO_ACCESS_CHECK | PC_NOWARN
- | (relative ? PC_NOFULL : 0));
- if (p.error)
- return_with_errno (p.error);
- PUNICODE_STRING up = p.get_nt_native_path ();
- buf = tp.c_get ();
- sys_wcstombs (buf, NT_MAX_PATH, up->Buffer, up->Length / sizeof (WCHAR));
- /* Convert native path to standard DOS path. */
- if (!strncmp (buf, "\\??\\", 4))
- {
- buf += 4;
- if (buf[1] != ':') /* native UNC path */
- *(buf += 2) = '\\';
- }
- lsiz = strlen (buf) + 1;
- }
- break;
- case CCP_POSIX_TO_WIN_W:
- p.check ((const char *) from,
- PC_POSIX | PC_SYM_FOLLOW | PC_NO_ACCESS_CHECK | PC_NOWARN
- | (relative ? PC_NOFULL : 0));
- if (p.error)
- return_with_errno (p.error);
- lsiz = (p.get_wide_win32_path_len () + 1) * sizeof (WCHAR);
- break;
- case CCP_WIN_A_TO_POSIX:
- buf = tp.c_get ();
- error = mount_table->conv_to_posix_path ((const char *) from, buf,
- relative);
- if (error)
- return_with_errno (error);
- lsiz = strlen (buf) + 1;
- break;
- case CCP_WIN_W_TO_POSIX:
- buf = tp.c_get ();
- error = mount_table->conv_to_posix_path ((const PWCHAR) from, buf,
- relative);
- if (error)
- return_with_errno (error);
- lsiz = strlen (buf) + 1;
- break;
- default:
- set_errno (EINVAL);
- return -1;
- }
- if (!size)
- return lsiz;
- if (size < lsiz)
- {
- set_errno (ENOSPC);
- return -1;
- }
- switch (what)
- {
- case CCP_POSIX_TO_WIN_A:
- case CCP_WIN_A_TO_POSIX:
- case CCP_WIN_W_TO_POSIX:
- strcpy ((char *) to, buf);
- break;
- case CCP_POSIX_TO_WIN_W:
- p.get_wide_win32_path ((PWCHAR) to);
- break;
- }
- return 0;
-}
-
-extern "C" void *
-cygwin_create_path (cygwin_conv_path_t what, const void *from)
-{
- void *to;
- ssize_t size = cygwin_conv_path (what, from, NULL, 0);
- if (size <= 0)
- return NULL;
- if (!(to = malloc (size)))
- return NULL;
- if (cygwin_conv_path (what, from, to, size) == -1)
- return NULL;
- return to;
-}
-
-
-extern "C" int
-cygwin_conv_to_win32_path (const char *path, char *win32_path)
-{
- return cygwin_conv_path (CCP_POSIX_TO_WIN_A | CCP_RELATIVE, path, win32_path,
- MAX_PATH);
-}
-
-extern "C" int
-cygwin_conv_to_full_win32_path (const char *path, char *win32_path)
-{
- return cygwin_conv_path (CCP_POSIX_TO_WIN_A | CCP_ABSOLUTE, path, win32_path,
- MAX_PATH);
-}
-
-/* This is exported to the world as cygwin_foo by cygwin.din. */
-
-extern "C" int
-cygwin_conv_to_posix_path (const char *path, char *posix_path)
-{
- return cygwin_conv_path (CCP_WIN_A_TO_POSIX | CCP_RELATIVE, path, posix_path,
- MAX_PATH);
-}
-
-extern "C" int
-cygwin_conv_to_full_posix_path (const char *path, char *posix_path)
-{
- return cygwin_conv_path (CCP_WIN_A_TO_POSIX | CCP_ABSOLUTE, path, posix_path,
- MAX_PATH);
-}
-
-/* The realpath function is supported on some UNIX systems. */
-
-extern "C" char *
-realpath (const char *path, char *resolved)
-{
- /* Make sure the right errno is returned if path is NULL. */
- if (!path)
- {
- set_errno (EINVAL);
- return NULL;
- }
-
- /* Guard reading from a potentially invalid path and writing to a
- potentially invalid resolved. */
- tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
-
- char *tpath;
- if (isdrive (path))
- {
- tpath = tp.c_get ();
- mount_table->cygdrive_posix_path (path, tpath, 0);
- }
- else
- tpath = (char *) path;
-
- path_conv real_path (tpath, PC_SYM_FOLLOW | PC_POSIX, stat_suffixes);
-
-
- /* Linux has this funny non-standard extension. If "resolved" is NULL,
- realpath mallocs the space by itself and returns it to the application.
- The application is responsible for calling free() then. This extension
- is backed by POSIX, which allows implementation-defined behaviour if
- "resolved" is NULL. That's good enough for us to do the same here. */
-
- if (!real_path.error && real_path.exists ())
- {
- if (!resolved)
- {
- resolved = (char *) malloc (strlen (real_path.normalized_path) + 1);
- if (!resolved)
- return NULL;
- }
- strcpy (resolved, real_path.normalized_path);
- return resolved;
- }
-
- /* FIXME: on error, we are supposed to put the name of the path
- component which could not be resolved into RESOLVED. */
- if (resolved)
- resolved[0] = '\0';
- set_errno (real_path.error ?: ENOENT);
- return NULL;
-}
-
-/* Return non-zero if path is a POSIX path list.
- This is exported to the world as cygwin_foo by cygwin.din.
-
-DOCTOOL-START
-<sect1 id="add-func-cygwin-posix-path-list-p">
- <para>Rather than use a mode to say what the "proper" path list
- format is, we allow any, and give apps the tools they need to
- convert between the two. If a ';' is present in the path list it's
- a Win32 path list. Otherwise, if the first path begins with
- [letter]: (in which case it can be the only element since if it
- wasn't a ';' would be present) it's a Win32 path list. Otherwise,
- it's a POSIX path list.</para>
-</sect1>
-DOCTOOL-END
- */
-
-extern "C" int
-cygwin_posix_path_list_p (const char *path)
-{
- int posix_p = !(strchr (path, ';') || isdrive (path));
- return posix_p;
-}
-
-/* These are used for apps that need to convert env vars like PATH back and
- forth. The conversion is a two step process. First, an upper bound on the
- size of the buffer needed is computed. Then the conversion is done. This
- allows the caller to use alloca if it wants. */
-
-static int
-conv_path_list_buf_size (const char *path_list, bool to_posix)
-{
- int i, num_elms, max_mount_path_len, size;
- const char *p;
-
- path_conv pc(".", PC_POSIX);
- /* The theory is that an upper bound is
- current_size + (num_elms * max_mount_path_len) */
- /* FIXME: This method is questionable in the long run. */
-
- unsigned nrel;
- char delim = to_posix ? ';' : ':';
- for (p = path_list, num_elms = nrel = 0; p; num_elms++)
- {
- if (!isabspath (p))
- nrel++;
- p = strchr (++p, delim);
- }
-
- /* 7: strlen ("//c") + slop, a conservative initial value */
- for (max_mount_path_len = sizeof ("/cygdrive/X"), i = 0;
- i < mount_table->nmounts; i++)
- {
- int mount_len = (to_posix
- ? mount_table->mount[i].posix_pathlen
- : mount_table->mount[i].native_pathlen);
- if (max_mount_path_len < mount_len)
- max_mount_path_len = mount_len;
- }
-
- /* 100: slop */
- size = strlen (path_list)
- + (num_elms * max_mount_path_len)
- + (nrel * strlen (to_posix ? pc.normalized_path : pc.get_win32 ()))
- + 100;
-
- return size;
-}
-
-
-extern "C" int
-cygwin_win32_to_posix_path_list_buf_size (const char *path_list)
-{
- return conv_path_list_buf_size (path_list, true);
-}
-
-extern "C" int
-cygwin_posix_to_win32_path_list_buf_size (const char *path_list)
-{
- return conv_path_list_buf_size (path_list, false);
-}
-
-extern "C" ssize_t
-env_PATH_to_posix (const void *win32, void *posix, size_t size)
-{
- return_with_errno (conv_path_list ((const char *) win32, (char *) posix,
- size, ENV_CVT));
-}
-
-extern "C" int
-cygwin_win32_to_posix_path_list (const char *win32, char *posix)
-{
- return_with_errno (conv_path_list (win32, posix, MAX_PATH, 1));
-}
-
-extern "C" int
-cygwin_posix_to_win32_path_list (const char *posix, char *win32)
-{
- return_with_errno (conv_path_list (posix, win32, MAX_PATH, 0));
-}
-
-extern "C" ssize_t
-cygwin_conv_path_list (cygwin_conv_path_t what, const void *from, void *to,
- size_t size)
-{
- /* FIXME: Path lists are (so far) always retaining relative paths. */
- what &= ~CCP_RELATIVE;
- switch (what)
- {
- case CCP_WIN_W_TO_POSIX:
- case CCP_POSIX_TO_WIN_W:
- /*FIXME*/
- api_fatal ("wide char path lists not yet supported");
- break;
- case CCP_WIN_A_TO_POSIX:
- case CCP_POSIX_TO_WIN_A:
- if (size == 0)
- return conv_path_list_buf_size ((const char *) from,
- what == CCP_WIN_A_TO_POSIX);
- return_with_errno (conv_path_list ((const char *) from, (char *) to,
- size, what == CCP_WIN_A_TO_POSIX));
- break;
- default:
- break;
- }
- set_errno (EINVAL);
- return -1;
-}
-
-/* cygwin_split_path: Split a path into directory and file name parts.
- Buffers DIR and FILE are assumed to be big enough.
-
- Examples (path -> `dir' / `file'):
- / -> `/' / `'
- "" -> `.' / `'
- . -> `.' / `.' (FIXME: should this be `.' / `'?)
- .. -> `.' / `..' (FIXME: should this be `..' / `'?)
- foo -> `.' / `foo'
- foo/bar -> `foo' / `bar'
- foo/bar/ -> `foo' / `bar'
- /foo -> `/' / `foo'
- /foo/bar -> `/foo' / `bar'
- c: -> `c:/' / `'
- c:/ -> `c:/' / `'
- c:foo -> `c:/' / `foo'
- c:/foo -> `c:/' / `foo'
- */
-
-extern "C" void
-cygwin_split_path (const char *path, char *dir, char *file)
-{
- int dir_started_p = 0;
-
- /* Deal with drives.
- Remember that c:foo <==> c:/foo. */
- if (isdrive (path))
- {
- *dir++ = *path++;
- *dir++ = *path++;
- *dir++ = '/';
- if (!*path)
- {
- *dir = 0;
- *file = 0;
- return;
- }
- if (isdirsep (*path))
- ++path;
- dir_started_p = 1;
- }
-
- /* Determine if there are trailing slashes and "delete" them if present.
- We pretend as if they don't exist. */
- const char *end = path + strlen (path);
- /* path + 1: keep leading slash. */
- while (end > path + 1 && isdirsep (end[-1]))
- --end;
-
- /* At this point, END points to one beyond the last character
- (with trailing slashes "deleted"). */
-
- /* Point LAST_SLASH at the last slash (duh...). */
- const char *last_slash;
- for (last_slash = end - 1; last_slash >= path; --last_slash)
- if (isdirsep (*last_slash))
- break;
-
- if (last_slash == path)
- {
- *dir++ = '/';
- *dir = 0;
- }
- else if (last_slash > path)
- {
- memcpy (dir, path, last_slash - path);
- dir[last_slash - path] = 0;
- }
- else
- {
- if (dir_started_p)
- ; /* nothing to do */
- else
- *dir++ = '.';
- *dir = 0;
- }
-
- memcpy (file, last_slash + 1, end - last_slash - 1);
- file[end - last_slash - 1] = 0;
-}
-
-/*****************************************************************************/
-
-static inline PRTL_USER_PROCESS_PARAMETERS
-get_user_proc_parms ()
-{
- return NtCurrentTeb ()->Peb->ProcessParameters;
-}
-
-/* Initialize cygcwd 'muto' for serializing access to cwd info. */
-void
-cwdstuff::init ()
-{
- cwd_lock.init ("cwd_lock");
- /* Initially re-open the cwd to allow POSIX semantics. */
- set (NULL, NULL, true);
-}
-
-/* Chdir and fill out the elements of a cwdstuff struct. */
-int
-cwdstuff::set (PUNICODE_STRING nat_cwd, const char *posix_cwd, bool doit)
-{
- int res = 0;
- UNICODE_STRING upath;
- size_t len = 0;
-
- cwd_lock.acquire ();
-
- if (nat_cwd)
- {
- upath = *nat_cwd;
- if (upath.Buffer[0] == L'/') /* Virtual path. Never use in PEB. */
- doit = false;
- else
- {
- len = upath.Length / sizeof (WCHAR) - 4;
- if (RtlEqualUnicodePathPrefix (&upath, L"\\??\\UNC\\", TRUE))
- len -= 2;
- }
- }
-
- if (doit)
- {
- /* We utilize the user parameter block. The directory is
- stored manually there. Why the hassle?
-
- - SetCurrentDirectory fails for directories with strict
- permissions even for processes with the SE_BACKUP_NAME
- privilege enabled. The reason is apparently that
- SetCurrentDirectory calls NtOpenFile without the
- FILE_OPEN_FOR_BACKUP_INTENT flag set.
-
- - Unlinking a cwd fails because SetCurrentDirectory seems to
- open directories so that deleting the directory is disallowed.
- The below code opens with *all* sharing flags set. */
- HANDLE h;
- NTSTATUS status;
- IO_STATUS_BLOCK io;
- OBJECT_ATTRIBUTES attr;
- PHANDLE phdl;
-
- RtlAcquirePebLock ();
- phdl = &get_user_proc_parms ()->CurrentDirectoryHandle;
- if (!nat_cwd) /* On init, just reopen CWD with desired access flags. */
- RtlInitUnicodeString (&upath, L"");
- /* This is for Win32 apps only. No case sensitivity here... */
- InitializeObjectAttributes (&attr, &upath,
- OBJ_CASE_INSENSITIVE | OBJ_INHERIT,
- nat_cwd ? NULL : *phdl, NULL);
- status = NtOpenFile (&h, SYNCHRONIZE | FILE_TRAVERSE, &attr, &io,
- FILE_SHARE_VALID_FLAGS,
- FILE_DIRECTORY_FILE
- | FILE_SYNCHRONOUS_IO_NONALERT
- | FILE_OPEN_FOR_BACKUP_INTENT);
- if (!NT_SUCCESS (status))
- {
- RtlReleasePebLock ();
- __seterrno_from_nt_status (status);
- res = -1;
- goto out;
- }
- /* Workaround a problem in Vista/Longhorn which fails in subsequent
- calls to CreateFile with ERROR_INVALID_HANDLE if the handle in
- CurrentDirectoryHandle changes without calling SetCurrentDirectory,
- and the filename given to CreateFile is a relative path. It looks
- like Vista stores a copy of the CWD handle in some other undocumented
- place. The NtClose/DuplicateHandle reuses the original handle for
- the copy of the new handle and the next CreateFile works.
- Note that this is not thread-safe (yet?) */
- NtClose (*phdl);
- if (DuplicateHandle (GetCurrentProcess (), h, GetCurrentProcess (), phdl,
- 0, TRUE, DUPLICATE_SAME_ACCESS))
- NtClose (h);
- else
- *phdl = h;
- dir = *phdl;
-
- /* No need to set path on init. */
- if (nat_cwd
- /* TODO:
- Check the length of the new CWD. Windows can only handle
- CWDs of up to MAX_PATH length, including a trailing backslash.
- If the path is longer, it's not an error condition for Cygwin,
- so we don't fail. Windows on the other hand has a problem now.
- For now, we just don't store the path in the PEB and proceed as
- usual. */
- && len <= MAX_PATH - (nat_cwd->Buffer[len - 1] == L'\\' ? 1 : 2))
- {
- /* Convert to a Win32 path. */
- upath.Buffer += upath.Length / sizeof (WCHAR) - len;
- if (upath.Buffer[1] == L'\\') /* UNC path */
- upath.Buffer[0] = L'\\';
- upath.Length = len * sizeof (WCHAR);
- /* Append backslash if necessary. */
- if (upath.Buffer[len - 1] != L'\\')
- {
- upath.Buffer[len] = L'\\';
- upath.Length += sizeof (WCHAR);
- }
- RtlCopyUnicodeString (&get_user_proc_parms ()->CurrentDirectoryName,
- &upath);
- }
-
- RtlReleasePebLock ();
- }
-
- if (nat_cwd || !win32.Buffer)
- {
- /* If there is no win32 path */
- if (!nat_cwd)
- {
- PUNICODE_STRING pdir;
-
- RtlAcquirePebLock ();
- pdir = &get_user_proc_parms ()->CurrentDirectoryName;
- RtlInitEmptyUnicodeString (&win32,
- (PWCHAR) crealloc_abort (win32.Buffer,
- pdir->Length + 2),
- pdir->Length + 2);
- RtlCopyUnicodeString (&win32, pdir);
- RtlReleasePebLock ();
- /* Remove trailing slash. */
- if (win32.Length > 3 * sizeof (WCHAR))
- win32.Length -= sizeof (WCHAR);
- posix_cwd = NULL;
- }
- else
- {
- if (upath.Buffer[0] == L'/') /* Virtual path, don't mangle. */
- ;
- else if (!doit)
- {
- /* Convert to a Win32 path. */
- upath.Buffer += upath.Length / sizeof (WCHAR) - len;
- if (upath.Buffer[1] == L'\\') /* UNC path */
- upath.Buffer[0] = L'\\';
- upath.Length = len * sizeof (WCHAR);
- }
- else if (upath.Length > 3 * sizeof (WCHAR))
- upath.Length -= sizeof (WCHAR); /* Strip trailing backslash */
- RtlInitEmptyUnicodeString (&win32,
- (PWCHAR) crealloc_abort (win32.Buffer,
- upath.Length + 2),
- upath.Length + 2);
- RtlCopyUnicodeString (&win32, &upath);
- }
- /* Make sure it's NUL-termniated. */
- win32.Buffer[win32.Length / sizeof (WCHAR)] = L'\0';
- if (!doit) /* Virtual path */
- drive_length = 0;
- else if (win32.Buffer[1] == L':') /* X: */
- drive_length = 2;
- else if (win32.Buffer[1] == L'\\') /* UNC path */
- {
- PWCHAR ptr = wcschr (win32.Buffer + 2, L'\\');
- if (ptr)
- ptr = wcschr (ptr + 1, L'\\');
- if (ptr)
- drive_length = ptr - win32.Buffer;
- else
- drive_length = win32.Length / sizeof (WCHAR);
- }
- else /* Shouldn't happen */
- drive_length = 0;
-
- tmp_pathbuf tp;
- if (!posix_cwd)
- {
- posix_cwd = (const char *) tp.c_get ();
- mount_table->conv_to_posix_path (win32.Buffer, (char *) posix_cwd, 0);
- }
- posix = (char *) crealloc_abort (posix, strlen (posix_cwd) + 1);
- stpcpy (posix, posix_cwd);
- }
-
-out:
- cwd_lock.release ();
- return res;
-}
-
-/* Copy the value for either the posix or the win32 cwd into a buffer. */
-char *
-cwdstuff::get (char *buf, int need_posix, int with_chroot, unsigned ulen)
-{
- MALLOC_CHECK;
-
- tmp_pathbuf tp;
- if (ulen)
- /* nothing */;
- else if (buf == NULL)
- ulen = (unsigned) -1;
- else
- {
- set_errno (EINVAL);
- goto out;
- }
-
- cwd_lock.acquire ();
-
- char *tocopy;
- if (!need_posix)
- {
- tocopy = tp.c_get ();
- sys_wcstombs (tocopy, NT_MAX_PATH, win32.Buffer,
- win32.Length / sizeof (WCHAR));
- }
- else
- tocopy = posix;
-
- debug_printf ("posix %s", posix);
- if (strlen (tocopy) >= ulen)
- {
- set_errno (ERANGE);
- buf = NULL;
- }
- else
- {
- if (!buf)
- buf = (char *) malloc (strlen (tocopy) + 1);
- strcpy (buf, tocopy);
- if (!buf[0]) /* Should only happen when chroot */
- strcpy (buf, "/");
- }
-
- cwd_lock.release ();
-
-out:
- syscall_printf ("(%s) = cwdstuff::get (%p, %d, %d, %d), errno %d",
- buf, buf, ulen, need_posix, with_chroot, errno);
- MALLOC_CHECK;
- return buf;
-}
-
-int etc::curr_ix = 0;
-/* Note that the first elements of the below arrays are unused */
-bool etc::change_possible[MAX_ETC_FILES + 1];
-OBJECT_ATTRIBUTES etc::fn[MAX_ETC_FILES + 1];
-LARGE_INTEGER etc::last_modified[MAX_ETC_FILES + 1];
-
-int
-etc::init (int n, POBJECT_ATTRIBUTES attr)
-{
- if (n > 0)
- /* ok */;
- else if (++curr_ix <= MAX_ETC_FILES)
- n = curr_ix;
- else
- api_fatal ("internal error");
-
- fn[n] = *attr;
- change_possible[n] = false;
- test_file_change (n);
- paranoid_printf ("fn[%d] %S, curr_ix %d", n, fn[n].ObjectName, curr_ix);
- return n;
-}
-
-bool
-etc::test_file_change (int n)
-{
- NTSTATUS status;
- FILE_NETWORK_OPEN_INFORMATION fnoi;
- bool res;
-
- status = NtQueryFullAttributesFile (&fn[n], &fnoi);
- if (!NT_SUCCESS (status))
- {
- res = true;
- memset (last_modified + n, 0, sizeof (last_modified[n]));
- debug_printf ("NtQueryFullAttributesFile (%S) failed, %p",
- fn[n].ObjectName, status);
- }
- else
- {
- res = CompareFileTime ((FILETIME *) &fnoi.LastWriteTime,
- (FILETIME *) last_modified + n) > 0;
- last_modified[n].QuadPart = fnoi.LastWriteTime.QuadPart;
- }
-
- paranoid_printf ("fn[%d] %S res %d", n, fn[n].ObjectName, res);
- return res;
-}
-
-bool
-etc::dir_changed (int n)
-{
- if (!change_possible[n])
- {
- static HANDLE changed_h NO_COPY;
- NTSTATUS status;
- IO_STATUS_BLOCK io;
-
- if (!changed_h)
- {
- OBJECT_ATTRIBUTES attr;
-
- path_conv dir ("/etc");
- status = NtOpenFile (&changed_h, SYNCHRONIZE | FILE_LIST_DIRECTORY,
- dir.get_object_attr (attr, sec_none_nih), &io,
- FILE_SHARE_VALID_FLAGS, FILE_DIRECTORY_FILE);
- if (!NT_SUCCESS (status))
- {
-#ifdef DEBUGGING
- system_printf ("NtOpenFile (%S) failed, %p",
- dir.get_nt_native_path (), status);
-#endif
- changed_h = INVALID_HANDLE_VALUE;
- }
- else
- {
- status = NtNotifyChangeDirectoryFile (changed_h, NULL, NULL,
- NULL, &io, NULL, 0,
- FILE_NOTIFY_CHANGE_LAST_WRITE
- | FILE_NOTIFY_CHANGE_FILE_NAME,
- FALSE);
- if (!NT_SUCCESS (status))
- {
-#ifdef DEBUGGING
- system_printf ("NtNotifyChangeDirectoryFile (1) failed, %p",
- status);
-#endif
- NtClose (changed_h);
- changed_h = INVALID_HANDLE_VALUE;
- }
- }
- memset (change_possible, true, sizeof (change_possible));
- }
-
- if (changed_h == INVALID_HANDLE_VALUE)
- change_possible[n] = true;
- else if (WaitForSingleObject (changed_h, 0) == WAIT_OBJECT_0)
- {
- status = NtNotifyChangeDirectoryFile (changed_h, NULL, NULL,
- NULL, &io, NULL, 0,
- FILE_NOTIFY_CHANGE_LAST_WRITE
- | FILE_NOTIFY_CHANGE_FILE_NAME,
- FALSE);
- if (!NT_SUCCESS (status))
- {
-#ifdef DEBUGGING
- system_printf ("NtNotifyChangeDirectoryFile (2) failed, %p",
- status);
-#endif
- NtClose (changed_h);
- changed_h = INVALID_HANDLE_VALUE;
- }
- memset (change_possible, true, sizeof change_possible);
- }
- }
-
- paranoid_printf ("fn[%d] %S change_possible %d",
- n, fn[n].ObjectName, change_possible[n]);
- return change_possible[n];
-}
-
-bool
-etc::file_changed (int n)
-{
- bool res = false;
- if (dir_changed (n) && test_file_change (n))
- res = true;
- change_possible[n] = false; /* Change is no longer possible */
- paranoid_printf ("fn[%d] %S res %d", n, fn[n].ObjectName, res);
- return res;
-}
-
-/* No need to be reentrant or thread-safe according to SUSv3.
- / and \\ are treated equally. Leading drive specifiers are
- kept intact as far as it makes sense. Everything else is
- POSIX compatible. */
-extern "C" char *
-basename (char *path)
-{
- static char buf[4];
- char *c, *d, *bs = path;
-
- if (!path || !*path)
- return strcpy (buf, ".");
- if (isalpha (path[0]) && path[1] == ':')
- bs += 2;
- else if (strspn (path, "/\\") > 1)
- ++bs;
- c = strrchr (bs, '/');
- if ((d = strrchr (c ?: bs, '\\')) > c)
- c = d;
- if (c)
- {
- /* Trailing (back)slashes are eliminated. */
- while (c && c > bs && c[1] == '\0')
- {
- *c = '\0';
- c = strrchr (bs, '/');
- if ((d = strrchr (c ?: bs, '\\')) > c)
- c = d;
- }
- if (c && (c > bs || c[1]))
- return c + 1;
- }
- else if (!bs[0])
- {
- stpncpy (buf, path, bs - path);
- stpcpy (buf + (bs - path), ".");
- return buf;
- }
- return path;
-}
-
-/* No need to be reentrant or thread-safe according to SUSv3.
- / and \\ are treated equally. Leading drive specifiers and
- leading double (back)slashes are kept intact as far as it
- makes sense. Everything else is POSIX compatible. */
-extern "C" char *
-dirname (char *path)
-{
- static char buf[4];
- char *c, *d, *bs = path;
-
- if (!path || !*path)
- return strcpy (buf, ".");
- if (isalpha (path[0]) && path[1] == ':')
- bs += 2;
- else if (strspn (path, "/\\") > 1)
- ++bs;
- c = strrchr (bs, '/');
- if ((d = strrchr (c ?: bs, '\\')) > c)
- c = d;
- if (c)
- {
- /* Trailing (back)slashes are eliminated. */
- while (c && c > bs && c[1] == '\0')
- {
- *c = '\0';
- c = strrchr (bs, '/');
- if ((d = strrchr (c ?: bs, '\\')) > c)
- c = d;
- }
- if (!c)
- strcpy (bs, ".");
- else if (c > bs)
- {
- /* More trailing (back)slashes are eliminated. */
- while (c > bs && (*c == '/' || *c == '\\'))
- *c-- = '\0';
- }
- else
- c[1] = '\0';
- }
- else
- {
- stpncpy (buf, path, bs - path);
- stpcpy (buf + (bs - path), ".");
- return buf;
- }
- return path;
-}
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h
deleted file mode 100644
index 4c6f5cb..0000000
--- a/winsup/cygwin/path.h
+++ /dev/null
@@ -1,360 +0,0 @@
-/* path.h: path data structures
-
- Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "devices.h"
-
-#include <sys/ioctl.h>
-#include <fcntl.h>
-
-#define isproc_dev(devn) \
- (devn == FH_PROC || devn == FH_REGISTRY || devn == FH_PROCESS || \
- devn == FH_PROCNET)
-
-#define isvirtual_dev(devn) \
- (isproc_dev (devn) || devn == FH_CYGDRIVE || devn == FH_NETDRIVE)
-
-inline bool
-has_attribute (DWORD attributes, DWORD attribs_to_test)
-{
- return attributes != INVALID_FILE_ATTRIBUTES
- && (attributes & attribs_to_test);
-}
-
-enum executable_states
-{
- is_executable,
- dont_care_if_executable,
- not_executable = dont_care_if_executable,
- dont_know_if_executable
-};
-
-struct suffix_info
-{
- const char *name;
- int addon;
- suffix_info (const char *s, int addit = 0): name (s), addon (addit) {}
-};
-
-extern suffix_info stat_suffixes[];
-
-enum pathconv_arg
-{
- PC_SYM_FOLLOW = 0x0001,
- PC_SYM_NOFOLLOW = 0x0002,
- PC_SYM_CONTENTS = 0x0008,
- PC_NOFULL = 0x0010,
- PC_NULLEMPTY = 0x0020,
- PC_CHECK_EA = 0x0040,
- PC_POSIX = 0x0080,
- PC_NOWARN = 0x0100,
- PC_NO_ACCESS_CHECK = 0x00800000
-};
-
-#define PC_NONULLEMPTY -1
-
-#include "sys/mount.h"
-
-enum path_types
-{
- PATH_NOTHING = 0,
- PATH_SYMLINK = MOUNT_SYMLINK,
- PATH_BINARY = MOUNT_BINARY,
- PATH_EXEC = MOUNT_EXEC,
- PATH_NOTEXEC = MOUNT_NOTEXEC,
- PATH_CYGWIN_EXEC = MOUNT_CYGWIN_EXEC,
- PATH_RO = MOUNT_RO,
- PATH_NOACL = MOUNT_NOACL,
- PATH_NOPOSIX = MOUNT_NOPOSIX,
- PATH_ALL_EXEC = (PATH_CYGWIN_EXEC | PATH_EXEC),
- PATH_NO_ACCESS_CHECK = PC_NO_ACCESS_CHECK,
- PATH_LNK = 0x01000000,
- PATH_TEXT = 0x02000000,
- PATH_REP = 0x04000000,
- PATH_HAS_SYMLINKS = 0x10000000,
- PATH_SOCKET = 0x40000000
-};
-
-class symlink_info;
-struct fs_info
-{
- private:
- struct status_flags
- {
- ULONG flags; /* Volume flags */
- ULONG samba_version; /* Samba version if available */
- ULONG name_len; /* MaximumComponentNameLength */
- unsigned is_remote_drive : 1;
- unsigned has_buggy_open : 1;
- unsigned has_buggy_fileid_dirinfo : 1;
- unsigned has_acls : 1;
- unsigned hasgood_inode : 1;
- unsigned caseinsensitive : 1;
- unsigned is_fat : 1;
- unsigned is_ntfs : 1;
- unsigned is_samba : 1;
- unsigned is_nfs : 1;
- unsigned is_netapp : 1;
- unsigned is_cdrom : 1;
- } status;
- ULONG sernum;
- public:
- void clear () { memset (&status, 0 , sizeof status); sernum = 0UL; }
- fs_info () { clear (); }
-
- IMPLEMENT_STATUS_FLAG (ULONG, flags)
- IMPLEMENT_STATUS_FLAG (ULONG, samba_version)
- IMPLEMENT_STATUS_FLAG (ULONG, name_len)
- IMPLEMENT_STATUS_FLAG (bool, is_remote_drive)
- IMPLEMENT_STATUS_FLAG (bool, has_buggy_open)
- IMPLEMENT_STATUS_FLAG (bool, has_buggy_fileid_dirinfo)
- IMPLEMENT_STATUS_FLAG (bool, has_acls)
- IMPLEMENT_STATUS_FLAG (bool, hasgood_inode)
- IMPLEMENT_STATUS_FLAG (bool, caseinsensitive)
- IMPLEMENT_STATUS_FLAG (bool, is_fat)
- IMPLEMENT_STATUS_FLAG (bool, is_ntfs)
- IMPLEMENT_STATUS_FLAG (bool, is_samba)
- IMPLEMENT_STATUS_FLAG (bool, is_nfs)
- IMPLEMENT_STATUS_FLAG (bool, is_netapp)
- IMPLEMENT_STATUS_FLAG (bool, is_cdrom)
- ULONG serial_number () const { return sernum; }
-
- bool update (PUNICODE_STRING, HANDLE) __attribute__ ((regparm (3)));
-};
-
-class path_conv
-{
- DWORD fileattr;
- ULONG caseinsensitive;
- fs_info fs;
- PWCHAR wide_path;
- UNICODE_STRING uni_path;
- void add_ext_from_sym (symlink_info&);
- public:
-
- unsigned path_flags;
- char *known_suffix;
- int error;
- device dev;
-
- bool isremote () const {return fs.is_remote_drive ();}
- ULONG objcaseinsensitive () const {return caseinsensitive;}
- bool has_acls () const {return !(path_flags & PATH_NOACL) && fs.has_acls (); }
- bool hasgood_inode () const {return fs.hasgood_inode (); }
- bool isgood_inode (__ino64_t ino) const;
- int has_symlinks () const {return path_flags & PATH_HAS_SYMLINKS;}
- int has_buggy_open () const {return fs.has_buggy_open ();}
- int has_buggy_fileid_dirinfo () const {return fs.has_buggy_fileid_dirinfo ();}
- int binmode () const
- {
- if (path_flags & PATH_BINARY)
- return O_BINARY;
- if (path_flags & PATH_TEXT)
- return O_TEXT;
- return 0;
- }
- int issymlink () const {return path_flags & PATH_SYMLINK;}
- int is_lnk_symlink () const {return path_flags & PATH_LNK;}
- int is_rep_symlink () const {return path_flags & PATH_REP;}
- int isdevice () const {return dev.devn && dev.devn != FH_FS && dev.devn != FH_FIFO;}
- int isfifo () const {return dev == FH_FIFO;}
- int isspecial () const {return dev.devn && dev.devn != FH_FS;}
- int iscygdrive () const {return dev.devn == FH_CYGDRIVE;}
- int is_auto_device () const {return isdevice () && !is_fs_special ();}
- int is_fs_device () const {return isdevice () && is_fs_special ();}
- int is_fs_special () const {return dev.is_fs_special ();}
- int is_lnk_special () const {return is_fs_device () || isfifo () || is_lnk_symlink ();}
- int issocket () const {return dev.devn == FH_UNIX;}
- int iscygexec () const {return path_flags & PATH_CYGWIN_EXEC;}
- void set_cygexec (bool isset)
- {
- if (isset)
- path_flags |= PATH_CYGWIN_EXEC;
- else
- path_flags &= ~PATH_CYGWIN_EXEC;
- }
- bool isro () const {return !!(path_flags & PATH_RO);}
- bool exists () const {return fileattr != INVALID_FILE_ATTRIBUTES;}
- bool has_attribute (DWORD x) const {return exists () && (fileattr & x);}
- int isdir () const {return has_attribute (FILE_ATTRIBUTE_DIRECTORY);}
- executable_states exec_state ()
- {
- extern int _check_for_executable;
- if (path_flags & PATH_ALL_EXEC)
- return is_executable;
- if (path_flags & PATH_NOTEXEC)
- return not_executable;
- if (!_check_for_executable)
- return dont_care_if_executable;
- return dont_know_if_executable;
- }
-
- void set_symlink (DWORD n) {path_flags |= PATH_SYMLINK; symlink_length = n;}
- void set_has_symlinks () {path_flags |= PATH_HAS_SYMLINKS;}
- void set_exec (int x = 1) {path_flags |= x ? PATH_EXEC : PATH_NOTEXEC;}
-
- void check (const UNICODE_STRING *upath, unsigned opt = PC_SYM_FOLLOW,
- const suffix_info *suffixes = NULL) __attribute__ ((regparm(3)));
- void check (const char *src, unsigned opt = PC_SYM_FOLLOW,
- const suffix_info *suffixes = NULL) __attribute__ ((regparm(3)));
-
- path_conv (const device& in_dev)
- : fileattr (INVALID_FILE_ATTRIBUTES), wide_path (NULL), path_flags (0),
- known_suffix (NULL), error (0), dev (in_dev), normalized_path (NULL),
- normalized_path_size (0)
- {
- strcpy (path, in_dev.native);
- }
-
- path_conv (int, const char *src, unsigned opt = PC_SYM_FOLLOW,
- const suffix_info *suffixes = NULL)
- : wide_path (NULL), normalized_path (NULL), normalized_path_size (0)
- {
- check (src, opt, suffixes);
- }
-
- path_conv (const UNICODE_STRING *src, unsigned opt = PC_SYM_FOLLOW,
- const suffix_info *suffixes = NULL)
- : wide_path (NULL), normalized_path (NULL), normalized_path_size (0)
- {
- check (src, opt | PC_NULLEMPTY, suffixes);
- }
-
- path_conv (const char *src, unsigned opt = PC_SYM_FOLLOW,
- const suffix_info *suffixes = NULL)
- : wide_path (NULL), normalized_path (NULL), normalized_path_size (0)
- {
- check (src, opt | PC_NULLEMPTY, suffixes);
- }
-
- path_conv ()
- : fileattr (INVALID_FILE_ATTRIBUTES), wide_path (NULL), path_flags (0),
- known_suffix (NULL), error (0), normalized_path (NULL),
- normalized_path_size (0)
- {
- path[0] = '\0';
- }
-
- ~path_conv ();
- inline char *get_win32 () { return path; }
- PUNICODE_STRING get_nt_native_path ();
- POBJECT_ATTRIBUTES get_object_attr (OBJECT_ATTRIBUTES &attr,
- SECURITY_ATTRIBUTES &sa);
- inline size_t get_wide_win32_path_len ()
- {
- get_nt_native_path ();
- return uni_path.Length / sizeof (WCHAR);
- }
-
- PWCHAR get_wide_win32_path (PWCHAR wc);
- operator DWORD &() {return fileattr;}
- operator int () {return fileattr; }
- path_conv &operator =(path_conv &pc)
- {
- memcpy (this, &pc, pc.size ());
- set_normalized_path (pc.normalized_path);
- wide_path = NULL;
- return *this;
- }
- DWORD get_devn () const {return dev.devn;}
- short get_unitn () const {return dev.minor;}
- DWORD file_attributes () const {return fileattr;}
- void file_attributes (DWORD new_attr) {fileattr = new_attr;}
- DWORD fs_flags () {return fs.flags ();}
- DWORD fs_name_len () {return fs.name_len ();}
- bool fs_is_fat () const {return fs.is_fat ();}
- bool fs_is_ntfs () const {return fs.is_ntfs ();}
- bool fs_is_samba () const {return fs.is_samba ();}
- bool fs_is_nfs () const {return fs.is_nfs ();}
- bool fs_is_netapp () const {return fs.is_netapp ();}
- bool fs_is_cdrom () const {return fs.is_cdrom ();}
- ULONG fs_serial_number () const {return fs.serial_number ();}
- void set_path (const char *p) {strcpy (path, p);}
- void fillin (HANDLE h);
- inline size_t size ()
- {
- return (sizeof (*this) - sizeof (path)) + strlen (path) + 1 + normalized_path_size;
- }
- bool is_binary ();
-
- unsigned __stdcall ndisk_links (DWORD);
- char *normalized_path;
- size_t normalized_path_size;
- void set_normalized_path (const char *) __attribute__ ((regparm (2)));
- DWORD get_symlink_length () { return symlink_length; };
- private:
- DWORD symlink_length;
- char path[NT_MAX_PATH];
-};
-
-/* Symlink marker */
-#define SYMLINK_COOKIE "!<symlink>"
-
-/* Socket marker */
-#define SOCKET_COOKIE "!<socket >"
-
-int __stdcall slash_unc_prefix_p (const char *path) __attribute__ ((regparm(1)));
-
-enum fe_types
-{
- FE_NADA = 0, /* Nothing special */
- FE_NNF = 1, /* Return NULL if not found */
- FE_NATIVE = 2, /* Return native path in path_conv struct */
- FE_CWD = 4, /* Search CWD for program */
- FE_DLL = 8 /* Search for DLLs, not executables. */
-};
-const char *__stdcall find_exec (const char *name, path_conv& buf,
- const char *winenv = "PATH=",
- unsigned opt = FE_NADA,
- const char **known_suffix = NULL)
- __attribute__ ((regparm(3)));
-
-/* Common macros for checking for invalid path names */
-#define isdrive(s) (isalpha (*(s)) && (s)[1] == ':')
-#define iswdrive(s) (iswalpha (*(s)) && (s)[1] == L':')
-
-static inline bool
-has_exec_chars (const char *buf, int len)
-{
- return len >= 2 &&
- ((buf[0] == '#' && buf[1] == '!') ||
- (buf[0] == ':' && buf[1] == '\n') ||
- (buf[0] == 'M' && buf[1] == 'Z'));
-}
-
-int pathmatch (const char *path1, const char *path2, bool caseinsensitive) __attribute__ ((regparm (3)));
-int pathnmatch (const char *path1, const char *path2, int len, bool caseinsensitive) __attribute__ ((regparm (3)));
-bool has_dot_last_component (const char *dir, bool test_dot_dot) __attribute__ ((regparm (2)));
-
-int path_prefix_p (const char *path1, const char *path2, int len1,
- bool caseinsensitive) __attribute__ ((regparm (3)));
-
-bool is_floppy (const char *);
-int normalize_win32_path (const char *, char *, char *&);
-int normalize_posix_path (const char *, char *, char *&);
-PUNICODE_STRING get_nt_native_path (const char *, UNICODE_STRING&);
-
-/* FIXME: Move to own include file eventually */
-
-#define MAX_ETC_FILES 2
-class etc
-{
- friend class dtable;
- static int curr_ix;
- static HANDLE changed_h;
- static bool change_possible[MAX_ETC_FILES + 1];
- static OBJECT_ATTRIBUTES fn[MAX_ETC_FILES + 1];
- static LARGE_INTEGER last_modified[MAX_ETC_FILES + 1];
- static bool dir_changed (int);
- static int init (int, POBJECT_ATTRIBUTES);
- static bool file_changed (int);
- static bool test_file_change (int);
- friend class pwdgrp;
-};
diff --git a/winsup/cygwin/path.sgml b/winsup/cygwin/path.sgml
deleted file mode 100644
index 249f48d..0000000
--- a/winsup/cygwin/path.sgml
+++ /dev/null
@@ -1,175 +0,0 @@
-<sect1 id="func-cygwin-conv-path">
-<title>cygwin_conv_path</title>
-
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" ssize_t
-<function>cygwin_conv_path</function></funcdef>
-<paramdef>cygwin_conv_path_t <parameter>what</parameter></paramdef>
-<paramdef>const void * <parameter>from</parameter></paramdef>
-<paramdef>void * <parameter>to</parameter></paramdef>
-<paramdef>size_t <parameter>size</parameter></paramdef>
-</funcprototype></funcsynopsis>
-
-<para>Use this function to convert POSIX paths in
-<parameter>from</parameter> to Win32 paths in <parameter>to</parameter>
-or, vice versa, Win32 paths in <parameter>from</parameter> to POSIX paths
-in <parameter>to</parameter>. <parameter>what</parameter>
-defines the direction of this conversion and can be any of the below
-values.</para>
-
-<programlisting>
- CCP_POSIX_TO_WIN_A /* from is char *posix, to is char *win32 */
- CCP_POSIX_TO_WIN_W, /* from is char *posix, to is wchar_t *win32 */
- CCP_WIN_A_TO_POSIX, /* from is char *win32, to is char *posix */
- CCP_WIN_W_TO_POSIX, /* from is wchar_t *win32, to is char *posix */
-</programlisting>
-
-<para>You can additionally or the following values to
-<parameter>what</parameter>, to define whether you want the resulting
-path in <parameter>to</parameter> to be absolute or if you want to keep
-relative paths in relative notation. Creating absolute paths is the
-default.</para>
-
-<programlisting>
- CCP_ABSOLUTE = 0, /* Request absolute path (default). */
- CCP_RELATIVE = 0x100 /* Request to keep path relative. */
-</programlisting>
-
-<para>If <parameter>size</parameter> is 0,
-<function>cygwin_conv_path</function> just returns the required buffer
-size in bytes. Otherwise, it returns 0 on success, or -1 on error and
-errno is set to one of the below values.</para>
-
-<programlisting>
- EINVAL what has an invalid value.
- EFAULT from or to point into nirvana.
- ENAMETOOLONG the resulting path is longer than 32K, or, in case
- of what == CCP_POSIX_TO_WIN_A, longer than MAX_PATH.
- ENOSPC size is less than required for the conversion.
-</programlisting>
-
-<example>
-<title>Example use of cygwin_conv_path</title>
-<programlisting>
-<![CDATA[
-#include <sys/cygwin.h>
-
-/* Conversion from incoming Win32 path given as wchar_t *win32 to POSIX path.
- If incoming path is a relative path, stick to it. First ask how big
- the output buffer has to be and allocate space dynamically. */
-ssize_t size;
-char *posix;
-size = cygwin_conv_path (CCP_WIN_W_TO_POSIX | CCP_RELATIVE, win32, NULL, 0);
-if (size < 0)
- perror ("cygwin_conv_path");
-else
- {
- posix = (char *) malloc (size);
- if (cygwin_conv_path (CCP_WIN_W_TO_POSIX | CCP_RELATIVE, win32,
- posix, size))
- perror ("cygwin_conv_path");
- }
-]]>
-</programlisting>
-</example>
-
-</sect1>
-
-<sect1 id="func-cygwin-conv-path-list">
-<title>cygwin_conv_path_list</title>
-
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" ssize_t
-<function>cygwin_conv_path</function></funcdef>
-<paramdef>cygwin_conv_path_t <parameter>what</parameter></paramdef>
-<paramdef>const void * <parameter>from</parameter></paramdef>
-<paramdef>void * <parameter>to</parameter></paramdef>
-<paramdef>size_t <parameter>size</parameter></paramdef>
-</funcprototype></funcsynopsis>
-
-<para>This is the same as <function>cygwin_conv_path</function>, but the
-input is treated as a path list in $PATH or %PATH% notation.</para>
-<para>If <parameter>what</parameter> is CCP_POSIX_TO_WIN_A or
-CCP_POSIX_TO_WIN_W, given a POSIX $PATH-style string (i.e. /foo:/bar)
-convert it to the equivalent Win32 %PATH%-style string (i.e. d:\;e:\bar).</para>
-<para>If <parameter>what</parameter> is CCP_WIN_A_TO_POSIX or
-CCP_WIN_W_TO_POSIX, given a Win32 %PATH%-style string (i.e. d:\;e:\bar)
-convert it to the equivalent POSIX $PATH-style string (i.e. /foo:/bar).</para>
-
-<para>See also <link linkend="func-cygwin-conv-path">cygwin_conv_path</link></para>
-
-</sect1>
-
-<sect1 id="func-cygwin-create-path">
-<title>cygwin_create_path</title>
-
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" void *
-<function>cygwin_create_path</function></funcdef>
-<paramdef>cygwin_conv_path_t <parameter>what</parameter></paramdef>
-<paramdef>const void * <parameter>from</parameter></paramdef>
-</funcprototype></funcsynopsis>
-
-<para>This is equivalent to the <function>cygwin_conv_path</function>, except
-that <function>cygwin_create_path</function> does not take a buffer pointer
-for the result of the conversion as input. Rather it allocates the buffer
-itself using <function>malloc</function>(3) and returns a pointer to this
-buffer. In case of error it returns NULL and sets errno to one of the
-values defined for <function>cygwin_conv_path</function>. Additionally
-errno can be set to the below value.</para>
-
-<programlisting>
- ENOMEM Insufficient memory was available.
-</programlisting>
-
-<para>When you don't need the returned buffer anymore, use
-<function>free</function>(3) to deallocate it.</para>
-
-<para>See also <link linkend="func-cygwin-conv-path">cygwin_conv_path</link></para>
-
-</sect1>
-
-<sect1 id="func-cygwin-posix-path-list-p">
-<title>cygwin_posix_path_list_p</title>
-
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" int
-<function>posix_path_list_p</function></funcdef>
-<paramdef>const char *<parameter>path</parameter></paramdef>
-</funcprototype></funcsynopsis>
-
-<para>This function tells you if the supplied
-<parameter>path</parameter> is a POSIX-style path (i.e. posix names,
-forward slashes, colon delimiters) or a Win32-style path (drive
-letters, reverse slashes, semicolon delimiters. The return value is
-true if the path is a POSIX path. Note that "_p" means "predicate", a
-lisp term meaning that the function tells you something about the
-parameter.</para>
-
-</sect1>
-
-<sect1 id="func-cygwin-split-path">
-<title>cygwin_split_path</title>
-
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" void
-<function>cygwin_split_path</function>
-</funcdef>
-<paramdef>const char * <parameter>path</parameter></paramdef>
-<paramdef>char * <parameter>dir</parameter></paramdef>
-<paramdef>char * <parameter>file</parameter></paramdef>
-</funcprototype></funcsynopsis>
-
-<para>Split a path into the directory and the file portions. Both
-<parameter>dir</parameter> and <parameter>file</parameter> are
-expected to point to buffers of sufficient size. </para>
-
-<example>
-<title>Example use of cygwin_split_path</title>
-<programlisting>
-char dir[200], file[100];
-cygwin_split_path("c:/foo/bar.c", dir, file);
-printf("dir=%s, file=%s\n", dir, file);
-</programlisting>
-</example>
-</sect1>
diff --git a/winsup/cygwin/perprocess.h b/winsup/cygwin/perprocess.h
deleted file mode 100644
index c0a5559..0000000
--- a/winsup/cygwin/perprocess.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* per_process.h: main Cygwin header file.
-
- Copyright 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <sys/cygwin.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Pointer into application's static data */
-extern struct per_process __cygwin_user_data;
-#define user_data (&__cygwin_user_data)
-
-/* We use the following to test that sizeof hasn't changed. When adding
- or deleting members, insert fillers or use the reserved entries.
- Do not change this value. */
-#define SIZEOF_PER_PROCESS (42 * 4)
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
deleted file mode 100644
index fd555c9..0000000
--- a/winsup/cygwin/pinfo.cc
+++ /dev/null
@@ -1,1276 +0,0 @@
-/* pinfo.cc: process table support
-
- Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "miscfuncs.h"
-#include <stdlib.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "perprocess.h"
-#include "environ.h"
-#include <assert.h>
-#include "ntdll.h"
-#include "shared_info.h"
-#include "cygheap.h"
-#include "cygmalloc.h"
-#include "cygtls.h"
-#include "tls_pbuf.h"
-#include "child_info.h"
-
-class pinfo_basic: public _pinfo
-{
-public:
- pinfo_basic();
-};
-
-pinfo_basic::pinfo_basic()
-{
- pid = dwProcessId = GetCurrentProcessId ();
- GetModuleFileName (NULL, progname, sizeof (progname));
-}
-
-pinfo_basic myself_initial NO_COPY;
-
-pinfo NO_COPY myself (static_cast<_pinfo *> (&myself_initial)); // Avoid myself != NULL checks
-
-bool is_toplevel_proc;
-
-/* Setup the pinfo structure for this process. There may already be a
- _pinfo for this "pid" if h != NULL. */
-
-void __stdcall
-pinfo::thisproc (HANDLE h)
-{
- procinfo = NULL;
-
- if (!h)
- cygheap->pid = cygwin_pid (myself_initial.pid);
-
- init (cygheap->pid, PID_IN_USE, h ?: INVALID_HANDLE_VALUE);
- procinfo->process_state |= PID_IN_USE;
- procinfo->dwProcessId = myself_initial.pid;
- strcpy (procinfo->progname, myself_initial.progname);
- strace.hello ();
- debug_printf ("myself->dwProcessId %u", procinfo->dwProcessId);
- if (h)
- {
- /* here if execed */
- static pinfo NO_COPY myself_identity;
- myself_identity.init (cygwin_pid (procinfo->dwProcessId), PID_EXECED, NULL);
- procinfo->exec_sendsig = NULL;
- procinfo->exec_dwProcessId = 0;
- }
- else if (!child_proc_info) /* child_proc_info is only set when this process
- was started by another cygwin process */
- procinfo->start_time = time (NULL); /* Register our starting time. */
- else if (cygheap->pid_handle)
- {
- ForceCloseHandle (cygheap->pid_handle);
- cygheap->pid_handle = NULL;
- }
-}
-
-/* Initialize the process table entry for the current task.
- This is not called for forked tasks, only execed ones. */
-void __stdcall
-pinfo_init (char **envp, int envc)
-{
- if (envp)
- {
- environ_init (envp, envc);
- /* spawn has already set up a pid structure for us so we'll use that */
- myself->process_state |= PID_CYGPARENT;
- }
- else
- {
- /* Invent our own pid. */
-
- myself.thisproc (NULL);
- myself->ppid = 1;
- myself->pgid = myself->sid = myself->pid;
- myself->ctty = -1;
- myself->uid = ILLEGAL_UID;
- myself->gid = UNKNOWN_GID;
- environ_init (NULL, 0); /* call after myself has been set up */
- myself->nice = winprio_to_nice (GetPriorityClass (hMainProc));
- debug_printf ("Set nice to %d", myself->nice);
- }
-
- debug_printf ("pid %d, pgid %d", myself->pid, myself->pgid);
-}
-
-static DWORD
-status_exit (DWORD x)
-{
- const char *find_first_notloaded_dll (path_conv &);
- switch (x)
- {
- case STATUS_DLL_NOT_FOUND:
- {
- char posix_prog[NT_MAX_PATH];
- path_conv pc (myself->progname, PC_NOWARN);
- mount_table->conv_to_posix_path (pc.get_win32 (), posix_prog, 1);
- small_printf ("%s: error while loading shared libraries: %s: cannot open shared object file: No such file or directory\n",
- posix_prog, find_first_notloaded_dll (pc));
- x = 127;
- }
- break;
- default:
- x = 127;
- }
- return x;
-}
-
-# define self (*this)
-void
-pinfo::maybe_set_exit_code_from_windows ()
-{
- DWORD x = 0xdeadbeef;
- DWORD oexitcode = self->exitcode;
- extern int sigExeced;
-
- if (hProcess && !(self->exitcode & EXITCODE_SET))
- {
- WaitForSingleObject (hProcess, INFINITE); /* just to be safe, in case
- process hasn't quite exited
- after closing pipe */
- GetExitCodeProcess (hProcess, &x);
- if (x >= 0xc0000000UL)
- x = status_exit (x);
- self->exitcode = EXITCODE_SET | (sigExeced ?: (x & 0xff) << 8);
- }
- sigproc_printf ("pid %d, exit value - old %p, windows %p, cygwin %p",
- self->pid, oexitcode, x, self->exitcode);
-}
-
-void
-pinfo::exit (DWORD n)
-{
- minimal_printf ("winpid %d, exit %d", GetCurrentProcessId (), n);
- lock_process until_exit ();
- cygthread::terminate ();
-
- if (n != EXITCODE_NOSET)
- self->exitcode = EXITCODE_SET | n;/* We're really exiting. Record the UNIX exit code. */
- else
- {
- exit_state = ES_EXEC_EXIT;
- maybe_set_exit_code_from_windows ();
- }
-
- sigproc_terminate (ES_FINAL);
-
- /* FIXME: There is a potential race between an execed process and its
- parent here. I hated to add a mutex just for that, though. */
- struct rusage r;
- fill_rusage (&r, hMainProc);
- add_rusage (&self->rusage_self, &r);
- int exitcode = self->exitcode & 0xffff;
- if (!self->cygstarted)
- exitcode = ((exitcode & 0xff) << 8) | ((exitcode >> 8) & 0xff);
- sigproc_printf ("Calling ExitProcess n %p, exitcode %p", n, exitcode);
- ExitProcess (exitcode);
-}
-# undef self
-
-void
-pinfo::init (pid_t n, DWORD flag, HANDLE h0)
-{
- shared_locations shloc;
- h = NULL;
- if (myself && !(flag & PID_EXECED)
- && (n == myself->pid || (DWORD) n == myself->dwProcessId))
- {
- procinfo = myself;
- destroy = 0;
- return;
- }
-
- void *mapaddr;
- int createit = flag & (PID_IN_USE | PID_EXECED);
- DWORD access = FILE_MAP_READ
- | (flag & (PID_IN_USE | PID_EXECED | PID_MAP_RW)
- ? FILE_MAP_WRITE : 0);
- if (!h0)
- shloc = (flag & (PID_IN_USE | PID_EXECED)) ? SH_JUSTCREATE : SH_JUSTOPEN;
- else
- {
- shloc = SH_MYSELF;
- if (h0 == INVALID_HANDLE_VALUE)
- h0 = NULL;
- }
-
- procinfo = NULL;
- PSECURITY_ATTRIBUTES sa_buf = (PSECURITY_ATTRIBUTES) alloca (1024);
- PSECURITY_ATTRIBUTES sec_attribs = sec_user_nih (sa_buf, cygheap->user.sid(),
- well_known_world_sid,
- FILE_MAP_READ);
-
- for (int i = 0; i < 20; i++)
- {
- DWORD mapsize;
- if (flag & PID_EXECED)
- mapsize = PINFO_REDIR_SIZE;
- else
- mapsize = sizeof (_pinfo);
-
- procinfo = (_pinfo *) open_shared ("cygpid", n, h0, mapsize, shloc,
- sec_attribs, access);
- if (!h0)
- {
- if (createit)
- __seterrno ();
- return;
- }
-
- if (!procinfo)
- {
- if (exit_state)
- return;
-
- switch (GetLastError ())
- {
- case ERROR_INVALID_HANDLE:
- api_fatal ("MapViewOfFileEx h0 %p, i %d failed, %E", h0, i);
- case ERROR_INVALID_ADDRESS:
- mapaddr = NULL;
- }
- debug_printf ("MapViewOfFileEx h0 %p, i %d failed, %E", h0, i);
- low_priority_sleep (0);
- continue;
- }
-
- bool created = shloc != SH_JUSTOPEN;
-
- if ((procinfo->process_state & PID_INITIALIZING) && (flag & PID_NOREDIR)
- && cygwin_pid (procinfo->dwProcessId) != procinfo->pid)
- {
- set_errno (ESRCH);
- break;
- }
-
- if (procinfo->process_state & PID_EXECED)
- {
- assert (i == 0);
- pid_t realpid = procinfo->pid;
- debug_printf ("execed process windows pid %d, cygwin pid %d", n, realpid);
- if (realpid == n)
- api_fatal ("retrieval of execed process info for pid %d failed due to recursion.", n);
-
- n = realpid;
- CloseHandle (h0);
- h0 = NULL;
- goto loop;
- }
-
- /* In certain pathological cases, it is possible for the shared memory
- region to exist for a while after a process has exited. This should
- only be a brief occurrence, so rather than introduce some kind of
- locking mechanism, just loop. */
- if (!created && createit && (procinfo->process_state & PID_EXITED))
- {
- debug_printf ("looping because pid %d, procinfo->pid %d, "
- "procinfo->dwProcessid %u has PID_EXITED set",
- n, procinfo->pid, procinfo->dwProcessId);
- goto loop;
- }
-
- if (!created)
- /* nothing */;
- else if (!(flag & PID_EXECED))
- procinfo->pid = n;
- else
- {
- procinfo->process_state |= PID_IN_USE | PID_EXECED;
- procinfo->pid = myself->pid;
- }
-
- h = h0; /* Success! */
- break;
-
- loop:
- release ();
- if (h0)
- low_priority_sleep (0);
- }
-
- if (h)
- {
- destroy = 1;
- ProtectHandle1 (h, pinfo_shared_handle);
- }
- else
- {
- h = h0;
- release ();
- }
-}
-
-void
-pinfo::set_acl()
-{
- PACL acl_buf = (PACL) alloca (1024);
- SECURITY_DESCRIPTOR sd;
- NTSTATUS status;
-
- sec_acl (acl_buf, true, true, cygheap->user.sid (),
- well_known_world_sid, FILE_MAP_READ);
- if (!InitializeSecurityDescriptor (&sd, SECURITY_DESCRIPTOR_REVISION))
- debug_printf ("InitializeSecurityDescriptor %E");
- else if (!SetSecurityDescriptorDacl (&sd, TRUE, acl_buf, FALSE))
- debug_printf ("SetSecurityDescriptorDacl %E");
- else if ((status = NtSetSecurityObject (h, DACL_SECURITY_INFORMATION, &sd)))
- debug_printf ("NtSetSecurityObject %lx", status);
-}
-
-const char *
-_pinfo::_ctty (char *buf)
-{
- if (ctty == TTY_CONSOLE)
- strcpy (buf, "ctty /dev/console");
- else if (ctty < 0)
- strcpy (buf, "no ctty");
- else
- __small_sprintf (buf, "ctty /dev/tty%d", ctty);
- return buf;
-}
-
-void
-_pinfo::set_ctty (tty_min *tc, int flags, fhandler_tty_slave *arch)
-{
- debug_printf ("old %s", __ctty ());
- if ((ctty < 0 || ctty == tc->ntty) && !(flags & O_NOCTTY))
- {
- ctty = tc->ntty;
- lock_ttys here;
- syscall_printf ("attaching %s sid %d, pid %d, pgid %d, tty->pgid %d, tty->sid %d",
- __ctty (), sid, pid, pgid, tc->getpgid (), tc->getsid ());
-
- pinfo p (tc->getsid ());
- if (sid == pid && (!p || p->pid == pid || !p->exists ()))
- {
-#ifdef DEBUGGING
- debug_printf ("resetting %s sid. Was %d, now %d. pgid was %d, now %d.",
- __ctty (), tc->getsid (), sid, tc->getpgid (), pgid);
-#else
- paranoid_printf ("resetting %s sid. Was %d, now %d. pgid was %d, now %d.",
- __ctty (), tc->getsid (), sid, tc->getpgid (), pgid);
-#endif
- /* We are the session leader */
- tc->setsid (sid);
- tc->setpgid (pgid);
- }
- else
- sid = tc->getsid ();
- if (tc->getpgid () == 0)
-{debug_printf ("setting pgid to %d", pgid);
- tc->setpgid (pgid);
-}
- if (cygheap->ctty != arch)
- {
- debug_printf ("cygheap->ctty %p, arch %p", cygheap->ctty, arch);
- if (!cygheap->ctty)
- syscall_printf ("ctty NULL");
- else
- {
- syscall_printf ("ctty %p, usecount %d", cygheap->ctty,
- cygheap->ctty->usecount);
- cygheap->ctty->close ();
- }
- cygheap->ctty = arch;
- if (arch)
- {
- arch->usecount++;
- /* guard ctty arch */
- cygheap->manage_console_count ("_pinfo::set_ctty", 1);
- report_tty_counts (cygheap->ctty, "ctty", "");
- }
- }
- }
-}
-
-/* Test to determine if a process really exists and is processing signals.
- */
-bool __stdcall
-_pinfo::exists ()
-{
- return this && !(process_state & PID_EXITED);
-}
-
-bool
-_pinfo::alive ()
-{
- HANDLE h = OpenProcess (PROCESS_QUERY_INFORMATION, false, dwProcessId);
- if (h)
- CloseHandle (h);
- return !!h;
-}
-
-extern char **__argv;
-
-DWORD WINAPI
-commune_process (void *arg)
-{
- siginfo_t& si = *((siginfo_t *) arg);
- tmp_pathbuf tp;
- char *path = tp.c_get ();
- DWORD nr;
- HANDLE& tothem = si._si_commune._si_write_handle;
- HANDLE process_sync =
- OpenSemaphore (SYNCHRONIZE, false, shared_name (path, "commune", si.si_pid));
- if (process_sync) // FIXME: this test shouldn't be necessary
- ProtectHandle (process_sync);
-
- lock_process now ();
- if (si._si_commune._si_code & PICOM_EXTRASTR)
- si._si_commune._si_str = (char *) (&si + 1);
-
- switch (si._si_commune._si_code)
- {
- case PICOM_CMDLINE:
- {
- sigproc_printf ("processing PICOM_CMDLINE");
- unsigned n = 0;
- extern int __argc_safe;
- const char *argv[__argc_safe + 1];
-
- for (int i = 0; i < __argc_safe; i++)
- {
- if (IsBadStringPtr (__argv[i], INT32_MAX))
- argv[i] = "";
- else
- argv[i] = __argv[i];
- n += strlen (argv[i]) + 1;
- }
- argv[__argc_safe] = NULL;
- if (!WriteFile (tothem, &n, sizeof n, &nr, NULL))
- {
- /*__seterrno ();*/ // this is run from the signal thread, so don't set errno
- sigproc_printf ("WriteFile sizeof argv failed, %E");
- }
- else
- for (const char **a = argv; *a; a++)
- if (!WriteFile (tothem, *a, strlen (*a) + 1, &nr, NULL))
- {
- sigproc_printf ("WriteFile arg %d failed, %E", a - argv);
- break;
- }
- break;
- }
- case PICOM_CWD:
- {
- sigproc_printf ("processing PICOM_CWD");
- unsigned int n = strlen (cygheap->cwd.get (path, 1, 1, NT_MAX_PATH)) + 1;
- if (!WriteFile (tothem, &n, sizeof n, &nr, NULL))
- sigproc_printf ("WriteFile sizeof cwd failed, %E");
- else if (!WriteFile (tothem, path, n, &nr, NULL))
- sigproc_printf ("WriteFile cwd failed, %E");
- break;
- }
- case PICOM_ROOT:
- {
- sigproc_printf ("processing PICOM_ROOT");
- unsigned n;
- if (cygheap->root.exists ())
- n = strlen (strcpy (path, cygheap->root.posix_path ())) + 1;
- else
- n = strlen (strcpy (path, "/")) + 1;
- if (!WriteFile (tothem, &n, sizeof n, &nr, NULL))
- sigproc_printf ("WriteFile sizeof root failed, %E");
- else if (!WriteFile (tothem, path, n, &nr, NULL))
- sigproc_printf ("WriteFile root failed, %E");
- break;
- }
- case PICOM_FDS:
- {
- sigproc_printf ("processing PICOM_FDS");
- unsigned int n = 0;
- int fd;
- cygheap_fdenum cfd;
- while ((fd = cfd.next ()) >= 0)
- n += sizeof (int);
- cfd.rewind ();
- if (!WriteFile (tothem, &n, sizeof n, &nr, NULL))
- sigproc_printf ("WriteFile sizeof fds failed, %E");
- else
- while ((fd = cfd.next ()) >= 0)
- if (!WriteFile (tothem, &fd, sizeof fd, &nr, NULL))
- {
- sigproc_printf ("WriteFile fd %d failed, %E", fd);
- break;
- }
- break;
- }
- case PICOM_PIPE_FHANDLER:
- {
- sigproc_printf ("processing PICOM_FDS");
- HANDLE hdl = si._si_commune._si_pipe_fhandler;
- unsigned int n = 0;
- cygheap_fdenum cfd;
- while (cfd.next () >= 0)
- if (cfd->get_handle () == hdl)
- {
- fhandler_pipe *fh = cfd;
- n = sizeof *fh;
- if (!WriteFile (tothem, &n, sizeof n, &nr, NULL))
- sigproc_printf ("WriteFile sizeof hdl failed, %E");
- else if (!WriteFile (tothem, fh, n, &nr, NULL))
- sigproc_printf ("WriteFile hdl failed, %E");
- break;
- }
- if (!n && !WriteFile (tothem, &n, sizeof n, &nr, NULL))
- sigproc_printf ("WriteFile sizeof hdl failed, %E");
- break;
- }
- case PICOM_FD:
- {
- sigproc_printf ("processing PICOM_FD");
- int fd = si._si_commune._si_fd;
- unsigned int n = 0;
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- n = strlen (strcpy (path, "")) + 1;
- else
- n = strlen (cfd->get_proc_fd_name (path)) + 1;
- if (!WriteFile (tothem, &n, sizeof n, &nr, NULL))
- sigproc_printf ("WriteFile sizeof fd failed, %E");
- else if (!WriteFile (tothem, path, n, &nr, NULL))
- sigproc_printf ("WriteFile fd failed, %E");
- break;
- }
- }
- if (process_sync)
- {
- DWORD res = WaitForSingleObject (process_sync, 5000);
- if (res != WAIT_OBJECT_0)
- sigproc_printf ("WFSO failed - %d, %E", res);
- else
- sigproc_printf ("synchronized with pid %d", si.si_pid);
- ForceCloseHandle (process_sync);
- }
- CloseHandle (tothem);
- _my_tls._ctinfo->auto_release ();
- return 0;
-}
-
-commune_result
-_pinfo::commune_request (__uint32_t code, ...)
-{
- DWORD nr;
- commune_result res;
- va_list args;
- siginfo_t si = {0};
- HANDLE& hp = si._si_commune._si_process_handle;
- HANDLE& fromthem = si._si_commune._si_read_handle;
- HANDLE request_sync = NULL;
- bool locked = false;
-
- va_start (args, code);
-
- res.s = NULL;
- res.n = 0;
-
- if (!this || !pid)
- {
- set_errno (ESRCH);
- goto err;
- }
-
- si._si_commune._si_code = code;
- switch (code)
- {
- case PICOM_PIPE_FHANDLER:
- si._si_commune._si_pipe_fhandler = va_arg (args, HANDLE);
- break;
-
- case PICOM_FD:
- si._si_commune._si_fd = va_arg (args, int);
- break;
-
- break;
- }
-
- locked = true;
- char name_buf[MAX_PATH];
- request_sync = CreateSemaphore (&sec_none_nih, 0, LONG_MAX,
- shared_name (name_buf, "commune", myself->pid));
- if (!request_sync)
- goto err;
- ProtectHandle (request_sync);
-
- si.si_signo = __SIGCOMMUNE;
- if (sig_send (this, si))
- {
- ForceCloseHandle (request_sync); /* don't signal semaphore since there was apparently no receiving process */
- request_sync = NULL;
- goto err;
- }
-
- size_t n;
- switch (code)
- {
- case PICOM_CMDLINE:
- case PICOM_CWD:
- case PICOM_ROOT:
- case PICOM_FDS:
- case PICOM_FD:
- case PICOM_PIPE_FHANDLER:
- if (!ReadFile (fromthem, &n, sizeof n, &nr, NULL) || nr != sizeof n)
- {
- __seterrno ();
- goto err;
- }
- if (!n)
- res.s = NULL;
- else
- {
- res.s = (char *) cmalloc_abort (HEAP_COMMUNE, n);
- char *p;
- for (p = res.s; n && ReadFile (fromthem, p, n, &nr, NULL); p += nr, n -= nr)
- continue;
- if (n)
- {
- __seterrno ();
- goto err;
- }
- res.n = p - res.s;
- }
- break;
- }
- goto out;
-
-err:
- memset (&res, 0, sizeof (res));
-
-out:
- if (request_sync)
- {
- LONG res;
- ReleaseSemaphore (request_sync, 1, &res);
- ForceCloseHandle (request_sync);
- }
- if (hp)
- CloseHandle (hp);
- if (fromthem)
- CloseHandle (fromthem);
- return res;
-}
-
-fhandler_pipe *
-_pinfo::pipe_fhandler (HANDLE hdl, size_t &n)
-{
- if (!this || !pid)
- return NULL;
- if (pid == myself->pid)
- return NULL;
- commune_result cr = commune_request (PICOM_PIPE_FHANDLER, hdl);
- n = cr.n;
- return (fhandler_pipe *) cr.s;
-}
-
-char *
-_pinfo::fd (int fd, size_t &n)
-{
- char *s;
- if (!this || !pid)
- return NULL;
- if (pid != myself->pid)
- {
- commune_result cr = commune_request (PICOM_FD, fd);
- s = cr.s;
- n = cr.n;
- }
- else
- {
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- s = cstrdup ("");
- else
- s = cfd->get_proc_fd_name ((char *) cmalloc_abort (HEAP_COMMUNE, NT_MAX_PATH));
- n = strlen (s) + 1;
- }
- return s;
-}
-
-char *
-_pinfo::fds (size_t &n)
-{
- char *s;
- if (!this || !pid)
- return NULL;
- if (pid != myself->pid)
- {
- commune_result cr = commune_request (PICOM_FDS);
- s = cr.s;
- n = cr.n;
- }
- else
- {
- n = 0;
- int fd;
- cygheap_fdenum cfd (true);
- while ((fd = cfd.next ()) >= 0)
- n += sizeof (int);
- cfd.rewind ();
- s = (char *) cmalloc_abort (HEAP_COMMUNE, n);
- int *p = (int *) s;
- while ((fd = cfd.next ()) >= 0 && (char *) p - s < (int) n)
- *p++ = fd;
- }
- return s;
-}
-
-char *
-_pinfo::root (size_t& n)
-{
- char *s;
- if (!this || !pid)
- return NULL;
- if (pid != myself->pid)
- {
- commune_result cr = commune_request (PICOM_ROOT);
- s = cr.s;
- n = cr.n;
- }
- else
- {
- if (cygheap->root.exists ())
- s = cstrdup (cygheap->root.posix_path ());
- else
- s = cstrdup ("/");
- n = strlen (s) + 1;
- }
- return s;
-}
-
-char *
-_pinfo::cwd (size_t& n)
-{
- char *s;
- if (!this || !pid)
- return NULL;
- if (pid != myself->pid)
- {
- commune_result cr = commune_request (PICOM_CWD);
- s = cr.s;
- n = cr.n;
- }
- else
- {
- s = (char *) cmalloc_abort (HEAP_COMMUNE, NT_MAX_PATH);
- cygheap->cwd.get (s, 1, 1, NT_MAX_PATH);
- n = strlen (s) + 1;
- }
- return s;
-}
-
-char *
-_pinfo::cmdline (size_t& n)
-{
- char *s;
- if (!this || !pid)
- return NULL;
- if (pid != myself->pid)
- {
- commune_result cr = commune_request (PICOM_CMDLINE);
- s = cr.s;
- n = cr.n;
- }
- else
- {
- n = 0;
- for (char **a = __argv; *a; a++)
- n += strlen (*a) + 1;
- char *p;
- p = s = (char *) cmalloc_abort (HEAP_COMMUNE, n);
- for (char **a = __argv; *a; a++)
- {
- strcpy (p, *a);
- p = strchr (p, '\0') + 1;
- }
- }
- return s;
-}
-
-/* This is the workhorse which waits for the write end of the pipe
- created during new process creation. If the pipe is closed or a zero
- is received on the pipe, it is assumed that the cygwin pid has exited.
- Otherwise, various "signals" can be sent to the parent to inform the
- parent to perform a certain action. */
-static DWORD WINAPI
-proc_waiter (void *arg)
-{
- pinfo vchild = *(pinfo *) arg;
- ((pinfo *) arg)->waiter_ready = true;
-
- siginfo_t si = {0};
- si.si_signo = SIGCHLD;
- si.si_code = CLD_EXITED;
- si.si_pid = vchild->pid;
-#if 0 // FIXME: This is tricky to get right
- si.si_utime = pchildren[rc]->rusage_self.ru_utime;
- si.si_stime = pchildren[rc].rusage_self.ru_stime;
-#endif
- pid_t pid = vchild->pid;
-
- for (;;)
- {
- DWORD nb;
- char buf = '\0';
-
- if (!ReadFile (vchild.rd_proc_pipe, &buf, 1, &nb, NULL)
- && GetLastError () != ERROR_BROKEN_PIPE)
- {
- system_printf ("error on read of child wait pipe %p, %E", vchild.rd_proc_pipe);
- break;
- }
-
- si.si_uid = vchild->uid;
-
- switch (buf)
- {
- case __ALERT_ALIVE:
- continue;
- case 0:
- /* Child exited. Do some cleanup and signal myself. */
- CloseHandle (vchild.rd_proc_pipe);
- vchild.rd_proc_pipe = NULL;
- vchild.maybe_set_exit_code_from_windows ();
- if (WIFEXITED (vchild->exitcode))
- si.si_code = CLD_EXITED;
- else if (WCOREDUMP (vchild->exitcode))
- si.si_code = CLD_DUMPED;
- else
- si.si_code = CLD_KILLED;
- si.si_status = vchild->exitcode;
- vchild->process_state = PID_EXITED;
- /* This should always be last. Do not use vchild-> beyond this point */
- break;
- case SIGTTIN:
- case SIGTTOU:
- case SIGTSTP:
- case SIGSTOP:
- if (ISSTATE (myself, PID_NOCLDSTOP)) // FIXME: No need for this flag to be in _pinfo any longer
- continue;
- /* Child stopped. Signal myself. */
- si.si_code = CLD_STOPPED;
- break;
- case SIGCONT:
- continue;
- default:
- system_printf ("unknown value %d on proc pipe", buf);
- continue;
- }
-
- /* Special case: If the "child process" that died is us, then we're
- execing. Just call proc_subproc directly and then exit this loop.
- We're done here. */
- if (hExeced)
- {
- /* execing. no signals available now. */
- proc_subproc (PROC_CLEARWAIT, 0);
- break;
- }
-
- /* Send a SIGCHLD to myself. We do this here, rather than in proc_subproc
- to avoid the proc_subproc lock since the signal thread will eventually
- be calling proc_subproc and could unnecessarily block. */
- sig_send (myself_nowait, si);
-
- /* If we're just stopped or got a continue signal, keep looping.
- Otherwise, return this thread to the pool. */
- if (buf != '\0')
- sigproc_printf ("looping");
- else
- break;
- }
-
- sigproc_printf ("exiting wait thread for pid %d", pid);
- vchild.wait_thread = NULL;
- _my_tls._ctinfo->auto_release (); /* automatically return the cygthread to the cygthread pool */
- return 0;
-}
-
-HANDLE
-_pinfo::dup_proc_pipe (HANDLE hProcess)
-{
- DWORD flags = DUPLICATE_SAME_ACCESS;
- HANDLE orig_wr_proc_pipe = wr_proc_pipe;
- /* Can't set DUPLICATE_CLOSE_SOURCE for exec case because we could be
- execing a non-cygwin process and we need to set the exit value before the
- parent sees it. */
- if (this != myself || is_toplevel_proc)
- flags |= DUPLICATE_CLOSE_SOURCE;
- bool res = DuplicateHandle (hMainProc, wr_proc_pipe, hProcess, &wr_proc_pipe,
- 0, FALSE, flags);
- if (!res && WaitForSingleObject (hProcess, 0) != WAIT_OBJECT_0)
- {
- wr_proc_pipe = orig_wr_proc_pipe;
- system_printf ("DuplicateHandle failed, pid %d, hProcess %p, wr_proc_pipe %p, %E",
- pid, hProcess, wr_proc_pipe);
- }
- else
- {
- wr_proc_pipe_owner = dwProcessId;
- sigproc_printf ("duped wr_proc_pipe %p for pid %d(%u)", wr_proc_pipe,
- pid, dwProcessId);
- res = true;
- }
- return orig_wr_proc_pipe;
-}
-
-/* function to set up the process pipe and kick off proc_waiter */
-int
-pinfo::wait ()
-{
- /* FIXME: execed processes should be able to wait for pids that were started
- by the process which execed them. */
- if (!CreatePipe (&rd_proc_pipe, &((*this)->wr_proc_pipe), &sec_none_nih, 16))
- {
- system_printf ("Couldn't create pipe tracker for pid %d, %E",
- (*this)->pid);
- return 0;
- }
-
- if (!(*this)->dup_proc_pipe (hProcess))
- {
- system_printf ("Couldn't duplicate pipe topid %d(%p), %E", (*this)->pid, hProcess);
- return 0;
- }
-
- preserve (); /* Preserve the shared memory associated with the pinfo */
-
- waiter_ready = false;
- /* Fire up a new thread to track the subprocess */
- cygthread *h = new cygthread (proc_waiter, 0, this, "proc_waiter");
- if (!h)
- sigproc_printf ("tracking thread creation failed for pid %d", (*this)->pid);
- else
- {
- wait_thread = h;
- sigproc_printf ("created tracking thread for pid %d, winpid %p, rd_pipe %p",
- (*this)->pid, (*this)->dwProcessId, rd_proc_pipe);
- }
-
- return 1;
-}
-
-void
-_pinfo::sync_proc_pipe ()
-{
- if (wr_proc_pipe && wr_proc_pipe != INVALID_HANDLE_VALUE)
- while (wr_proc_pipe_owner != GetCurrentProcessId ())
- low_priority_sleep (0);
-}
-
-/* function to send a "signal" to the parent when something interesting happens
- in the child. */
-bool
-_pinfo::alert_parent (char sig)
-{
- DWORD nb = 0;
-
- /* Send something to our parent. If the parent has gone away, close the pipe.
- Don't send if this is an exec stub.
-
- FIXME: Is there a race here if we run this while another thread is attempting
- to exec()? */
- if (wr_proc_pipe == INVALID_HANDLE_VALUE || !myself->wr_proc_pipe || hExeced)
- /* no parent */;
- else
- {
- sync_proc_pipe ();
- if (WriteFile (wr_proc_pipe, &sig, 1, &nb, NULL))
- /* all is well */;
- else if (GetLastError () != ERROR_BROKEN_PIPE)
- debug_printf ("sending %d notification to parent failed, %E", sig);
- else
- {
- ppid = 1;
- HANDLE closeit = wr_proc_pipe;
- wr_proc_pipe = INVALID_HANDLE_VALUE;
- CloseHandle (closeit);
- }
- }
- return (bool) nb;
-}
-
-void
-pinfo::release ()
-{
- if (procinfo)
- {
- void *unmap_procinfo = procinfo;
- procinfo = NULL;
- UnmapViewOfFile (unmap_procinfo);
- }
- if (h)
- {
- HANDLE close_h = h;
- h = NULL;
- ForceCloseHandle1 (close_h, pinfo_shared_handle);
- }
-}
-
-/* DOCTOOL-START
-
-<sect1 id="func-cygwin-winpid-to-pid">
- <title>cygwin_winpid_to_pid</title>
-
- <funcsynopsis><funcprototype>
- <funcdef>extern "C" pid_t
- <function>cygwin_winpid_to_pid</function>
- </funcdef>
- <paramdef>int <parameter>winpid</parameter></paramdef>
- </funcprototype></funcsynopsis>
-
- <para>Given a windows pid, converts to the corresponding Cygwin
-pid, if any. Returns -1 if windows pid does not correspond to
-a cygwin pid.</para>
- <example>
- <title>Example use of cygwin_winpid_to_pid</title>
- <programlisting>
- extern "C" cygwin_winpid_to_pid (int winpid);
- pid_t mypid;
- mypid = cygwin_winpid_to_pid (windows_pid);
- </programlisting>
- </example>
-</sect1>
-
- DOCTOOL-END */
-
-extern "C" pid_t
-cygwin_winpid_to_pid (int winpid)
-{
- pinfo p (cygwin_pid (winpid));
- if (p)
- return p->pid;
-
- set_errno (ESRCH);
- return (pid_t) -1;
-}
-
-
-#define slop_pidlist 200
-#define size_pidlist(i) (sizeof (pidlist[0]) * ((i) + 1))
-#define size_pinfolist(i) (sizeof (pinfolist[0]) * ((i) + 1))
-class _onreturn
-{
- HANDLE *h;
-public:
- ~_onreturn ()
- {
- if (h && *h)
- {
- CloseHandle (*h);
- *h = NULL;
- h = NULL;
- }
- }
- void no_close_p_handle () {h = NULL;}
- _onreturn (HANDLE& _h): h (&_h) {}
-};
-
-inline void
-winpids::add (DWORD& nelem, bool winpid, DWORD pid)
-{
- pid_t cygpid = cygwin_pid (pid);
-
- if (nelem >= npidlist)
- {
- npidlist += slop_pidlist;
- pidlist = (DWORD *) realloc (pidlist, size_pidlist (npidlist + 1));
- pinfolist = (pinfo *) realloc (pinfolist, size_pinfolist (npidlist + 1));
- }
-
- pinfo& p = pinfolist[nelem];
-
- /* Open a the process to prevent a subsequent exit from invalidating the
- shared memory region. */
- p.hProcess = OpenProcess (PROCESS_QUERY_INFORMATION, false, pid);
- _onreturn onreturn (p.hProcess);
-
- /* If we couldn't open the process then we don't have rights to it and should
- make a copy of the shared memory area if it exists (it may not).
- */
- bool perform_copy;
- if (!p.hProcess)
- perform_copy = true;
- else
- perform_copy = make_copy;
-
- p.init (cygpid, PID_NOREDIR | pinfo_access, NULL);
-
- /* If we're just looking for winpids then don't do any special cygwin "stuff* */
- if (winpid)
- goto out;
-
- /* !p means that we couldn't find shared memory for this pid. Probably means
- that it isn't a cygwin process. */
- if (!p)
- {
- if (!pinfo_access)
- return;
- p.init (cygpid, PID_NOREDIR, NULL);
- if (!p)
- return;
- }
-
- /* Scan list of previously recorded pids to make sure that this pid hasn't
- shown up before. This can happen when a process execs. */
- for (unsigned i = 0; i < nelem; i++)
- if (pinfolist[i]->pid == p->pid)
- {
- if ((_pinfo *) p != (_pinfo *) myself)
- p.release ();
- return;
- }
-
-out:
- /* Exit here.
-
- If p is "false" then, eventually any opened process handle will be closed and
- the function will exit without adding anything to the pid list.
-
- If p is "true" then we've discovered a cygwin process.
-
- Handle "myself" differently. Don't copy it and close/zero the handle we
- just opened to it.
- If not performing a copy, then keep the process handle open for the duration
- of the life of the procinfo region to potential races when a new process uses
- this pid.
- Otherwise, malloc some memory for a copy of the shared memory.
-
- If the malloc failed, then "oh well". Just keep the shared memory around
- and eventually close the handle when the winpids goes out of scope.
-
- If malloc succeeds, copy the procinfo we just grabbed into the new region,
- release the shared memory and allow the handle to be closed when this
- function returns.
-
- Oh, and add the pid to the list and bump the number of elements. */
-
- if (p)
- {
- if (p == (_pinfo *) myself)
- /* handle specially. Close the handle but (eventually) don't
- deallocate procinfo in release call */;
- else if (!perform_copy)
- onreturn.no_close_p_handle (); /* Don't close the handle until release */
- else
- {
- _pinfo *pnew = (_pinfo *) malloc (sizeof (*p.procinfo));
- if (!pnew)
- onreturn.no_close_p_handle ();
- else
- {
- *pnew = *p.procinfo;
- if ((_pinfo *) p != (_pinfo *) myself)
- p.release ();
- p.procinfo = pnew;
- p.destroy = false;
- }
- }
- }
- if (p || winpid)
- pidlist[nelem++] = pid;
-}
-
-DWORD
-winpids::enum_processes (bool winpid)
-{
- static DWORD szprocs;
- static SYSTEM_PROCESSES *procs;
-
- DWORD nelem = 0;
- if (!szprocs)
- procs = (SYSTEM_PROCESSES *) malloc (sizeof (*procs) + (szprocs = 200 * sizeof (*procs)));
-
- NTSTATUS res;
- for (;;)
- {
- res = NtQuerySystemInformation (SystemProcessesAndThreadsInformation,
- procs, szprocs, NULL);
- if (res == 0)
- break;
-
- if (res == STATUS_INFO_LENGTH_MISMATCH)
- procs = (SYSTEM_PROCESSES *) realloc (procs, szprocs += 200 * sizeof (*procs));
- else
- {
- system_printf ("error %p reading system process information", res);
- return 0;
- }
- }
-
- SYSTEM_PROCESSES *px = procs;
- for (;;)
- {
- if (px->ProcessId)
- add (nelem, winpid, px->ProcessId);
- if (!px->NextEntryDelta)
- break;
- px = (SYSTEM_PROCESSES *) ((char *) px + px->NextEntryDelta);
- }
-
- return nelem;
-}
-
-void
-winpids::set (bool winpid)
-{
- __malloc_lock ();
- npids = enum_processes (winpid);
- if (pidlist)
- pidlist[npids] = 0;
- __malloc_unlock ();
-}
-
-DWORD
-winpids::enum_init (bool winpid)
-{
- return enum_processes (winpid);
-}
-
-void
-winpids::release ()
-{
- _pinfo *p;
- for (unsigned i = 0; i < npids; i++)
- if (pinfolist[i] == (_pinfo *) myself)
- continue;
- else if (pinfolist[i].hProcess)
- {
- if (pinfolist[i])
- pinfolist[i].release ();
- CloseHandle (pinfolist[i].hProcess);
- }
- else if ((p = pinfolist[i]))
- {
- pinfolist[i].procinfo = NULL;
- free (p);
- }
-}
-
-winpids::~winpids ()
-{
- if (npidlist)
- {
- release ();
- free (pidlist);
- free (pinfolist);
- }
-}
diff --git a/winsup/cygwin/pinfo.h b/winsup/cygwin/pinfo.h
deleted file mode 100644
index 5351595..0000000
--- a/winsup/cygwin/pinfo.h
+++ /dev/null
@@ -1,239 +0,0 @@
-/* pinfo.h: process table info
-
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 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 _PINFO_H
-#define _PINFO_H
-#include <sys/resource.h>
-#include "thread.h"
-
-struct commune_result
-{
- char *s;
- int n;
- HANDLE handles[2];
-};
-
-enum picom
-{
- PICOM_EXTRASTR = 0x80000000,
- PICOM_CMDLINE = 1,
- PICOM_CWD = 2,
- PICOM_ROOT = 3,
- PICOM_FDS = 4,
- PICOM_FD = 5,
- PICOM_PIPE_FHANDLER = 6
-};
-
-#define EXITCODE_SET 0x8000000
-#define EXITCODE_NOSET 0x4000000
-#define EXITCODE_RETRY 0x2000000
-#define EXITCODE_OK 0x1000000
-
-class fhandler_pipe;
-
-class _pinfo
-{
-public:
- /* Cygwin pid */
- pid_t pid;
-
- /* Various flags indicating the state of the process. See PID_
- constants in <sys/cygwin.h>. */
- DWORD process_state;
-
- DWORD exitcode; /* set when process exits */
-
-#define PINFO_REDIR_SIZE ((char *) &myself.procinfo->exitcode - (char *) myself.procinfo)
-
- /* > 0 if started by a cygwin process */
- DWORD cygstarted;
-
- /* Parent process id. */
- pid_t ppid;
-
- /* dwProcessId contains the processid used for sending signals. It
- will be reset in a child process when it is capable of receiving
- signals. */
- DWORD dwProcessId;
-
- /* Used to spawn a child for fork(), among other things. */
- char progname[NT_MAX_PATH];
-
- /* User information.
- The information is derived from the GetUserName system call,
- with the name looked up in /etc/passwd and assigned a default value
- if not found. This data resides in the shared data area (allowing
- tasks to store whatever they want here) so it's for informational
- purposes only. */
- __uid32_t uid; /* User ID */
- __gid32_t gid; /* Group ID */
- pid_t pgid; /* Process group ID */
- pid_t sid; /* Session ID */
- int ctty; /* Control tty */
- bool has_pgid_children;/* True if we've forked or spawned children with our GID. */
-
- /* Resources used by process. */
- long start_time;
- struct rusage rusage_self;
- struct rusage rusage_children;
- int nice;
-
- /* Non-zero if process was stopped by a signal. */
- char stopsig;
-
- inline void set_has_pgid_children ()
- {
- if (pgid == pid)
- has_pgid_children = 1;
- }
-
- inline void set_has_pgid_children (bool val) {has_pgid_children = val;}
-
- commune_result commune_request (__uint32_t, ...);
- bool alive ();
- fhandler_pipe *pipe_fhandler (HANDLE, size_t &);
- char *fd (int fd, size_t &);
- char *fds (size_t &);
- char *root (size_t &);
- char *cwd (size_t &);
- char *cmdline (size_t &);
- void set_ctty (class tty_min *, int, class fhandler_tty_slave *);
- HANDLE dup_proc_pipe (HANDLE) __attribute__ ((regparm(2)));
- void sync_proc_pipe ();
- bool alert_parent (char);
- int __stdcall kill (siginfo_t&) __attribute__ ((regparm (2)));
- bool __stdcall exists () __attribute__ ((regparm (1)));
- const char *_ctty (char *);
-
- /* signals */
- HANDLE sendsig;
- HANDLE exec_sendsig;
- DWORD exec_dwProcessId;
-public:
- HANDLE wr_proc_pipe;
- DWORD wr_proc_pipe_owner;
- friend class pinfo;
-};
-
-DWORD WINAPI commune_process (void *);
-
-enum parent_alerter
-{
- __ALERT_REPARENT = 111, // arbitrary non-signal value
- __ALERT_ALIVE = 112
-};
-
-class pinfo
-{
- HANDLE h;
- _pinfo *procinfo;
- bool destroy;
-public:
- HANDLE rd_proc_pipe;
- HANDLE hProcess;
- bool waiter_ready;
- class cygthread *wait_thread;
- void init (pid_t, DWORD, HANDLE) __attribute__ ((regparm(3)));
- pinfo () {}
- pinfo (_pinfo *x): procinfo (x), hProcess (NULL) {}
- pinfo (pid_t n) : rd_proc_pipe (NULL), hProcess (NULL) {init (n, 0, NULL);}
- pinfo (pid_t n, DWORD flag) : rd_proc_pipe (NULL), hProcess (NULL), waiter_ready (0), wait_thread (NULL) {init (n, flag, NULL);}
- void thisproc (HANDLE) __attribute__ ((regparm (2)));
- void release ();
- int wait () __attribute__ ((regparm (1)));
- ~pinfo ()
- {
- if (destroy && procinfo)
- release ();
- }
- void exit (DWORD n) __attribute__ ((noreturn, regparm(2)));
- void maybe_set_exit_code_from_windows () __attribute__ ((regparm(1)));
- _pinfo *operator -> () const {return procinfo;}
- int operator == (pinfo *x) const {return x->procinfo == procinfo;}
- int operator == (pinfo &x) const {return x.procinfo == procinfo;}
- int operator == (_pinfo *x) const {return x == procinfo;}
- int operator == (void *x) const {return procinfo == x;}
- int operator == (int x) const {return (int) procinfo == (int) x;}
- int operator == (char *x) const {return (char *) procinfo == x;}
- _pinfo *operator * () const {return procinfo;}
- operator _pinfo * () const {return procinfo;}
- // operator bool () const {return (int) h;}
- void preserve () { destroy = false; }
-#ifndef _SIGPROC_H
- int remember () {system_printf ("remember is not here"); return 0;}
-#else
- int remember (bool detach)
- {
- int res = proc_subproc (detach ? PROC_DETACHED_CHILD : PROC_ADDCHILD,
- (DWORD) this);
- destroy = res ? false : true;
- return res;
- }
-#endif
- HANDLE shared_handle () {return h;}
- void set_acl ();
- friend class _pinfo;
- friend class winpids;
-};
-
-#define ISSTATE(p, f) (!!((p)->process_state & f))
-#define NOTSTATE(p, f) (!((p)->process_state & f))
-
-class winpids
-{
- bool make_copy;
- DWORD npidlist;
- DWORD *pidlist;
- pinfo *pinfolist;
- DWORD pinfo_access; // access type for pinfo open
- DWORD enum_processes (bool winpid);
- DWORD enum_init (bool winpid);
- void add (DWORD& nelem, bool, DWORD pid);
-public:
- DWORD npids;
- inline void reset () { release (); npids = 0;}
- void set (bool winpid);
- winpids (): make_copy (true) {}
- winpids (int): make_copy (false), npidlist (0), pidlist (NULL),
- pinfolist (NULL), pinfo_access (0), npids (0) {}
- winpids (DWORD acc): make_copy (false), npidlist (0), pidlist (NULL),
- pinfolist (NULL), pinfo_access (acc), npids (0)
- {
- set (0);
- }
- inline DWORD& winpid (int i) const {return pidlist[i];}
- inline _pinfo *operator [] (int i) const {return (_pinfo *) pinfolist[i];}
- ~winpids ();
- void release ();
-};
-
-extern __inline pid_t
-cygwin_pid (pid_t pid)
-{
- return pid;
-}
-
-void __stdcall pinfo_init (char **, int);
-extern pinfo myself;
-
-#define _P_VFORK 0
-#define _P_SYSTEM 512
-
-#define __ctty() _ctty ((char *) alloca (sizeof ("ctty /dev/tty") + 20))
-#define myctty() myself->__ctty ()
-
-/* For mmaps across fork(). */
-int __stdcall fixup_mmaps_after_fork (HANDLE parent);
-/* for shm areas across fork (). */
-int __stdcall fixup_shms_after_fork ();
-
-void __stdcall fill_rusage (struct rusage *, HANDLE);
-void __stdcall add_rusage (struct rusage *, struct rusage *);
-#endif /*_PINFO_H*/
diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc
deleted file mode 100644
index cfc3f04..0000000
--- a/winsup/cygwin/pipe.cc
+++ /dev/null
@@ -1,534 +0,0 @@
-/* pipe.cc: pipe for Cygwin.
-
- Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008 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. */
-
-/* FIXME: Should this really be fhandler_pipe.cc? */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include <sys/socket.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "pinfo.h"
-
-fhandler_pipe::fhandler_pipe ()
- : fhandler_base (), popen_pid (0)
-{
- get_overlapped ()->hEvent = NULL;
- need_fork_fixup (true);
-}
-
-struct pipesync
-{
- bool reader;
- HANDLE ev, non_cygwin_h, ret_handle;
- pipesync(HANDLE, DWORD);
- int operator == (int x) const {return !!ev;}
- static DWORD WINAPI handler (LPVOID *);
-};
-
-inline bool
-getov_result (BOOL res, bool reading, HANDLE h, DWORD& nbytes, LPOVERLAPPED ov)
-{
- DWORD err = GetLastError ();
- if (res || (reading && ov && err == ERROR_HANDLE_EOF))
- /* not an error */;
- else if (!ov || (err != ERROR_IO_PENDING)
- || (!GetOverlappedResult (h, ov, &nbytes, true)
- && (!reading || (GetLastError () != ERROR_HANDLE_EOF))))
- {
- __seterrno ();
- return false;
- }
- return true;
-}
-
-static DWORD WINAPI
-pipe_handler (LPVOID in_ps)
-{
- pipesync ps = *(pipesync *) in_ps;
- HANDLE h, in, out;
- DWORD err = fhandler_pipe::create_selectable (&sec_none_nih, in, out, 0);
- if (err)
- {
- SetLastError (err);
- system_printf ("couldn't create a shadow pipe for non-cygwin pipe I/O, %E");
- return 0;
- }
- h = ((pipesync *) in_ps)->ret_handle = ps.reader ? in : out;
- SetHandleInformation (h, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT);
- SetEvent (ps.ev);
-
- DWORD read_bytes, write_bytes;
- HANDLE hread, hwrite, hclose;
- OVERLAPPED ov, *rov, *wov;
- memset (&ov, 0, sizeof (ov));
- ov.hEvent = CreateEvent (&sec_none_nih, true, false, NULL);
- if (ps.reader)
- {
- hread = ps.non_cygwin_h;
- hclose = hwrite = out;
- wov = &ov;
- rov = NULL;
- }
- else
- {
- hclose = hread = in;
- hwrite = ps.non_cygwin_h;
- rov = &ov;
- wov = NULL;
- }
-
- char buf[4096];
- while (1)
- {
- ResetEvent (ov.hEvent);
- BOOL res = ReadFile (hread, buf, 4096, &read_bytes, rov);
- if (!getov_result (res, true, hread, read_bytes, rov))
- break;
- if (!read_bytes)
- break;
-
- res = WriteFile (hwrite, buf, read_bytes, &write_bytes, wov);
- if (!getov_result (res, false, hwrite, write_bytes, wov))
- break;
- if (write_bytes != read_bytes)
- break;
- }
-
- err = GetLastError ();
- CloseHandle (ov.hEvent);
- CloseHandle (hclose);
- CloseHandle (ps.non_cygwin_h);
- SetLastError (err);
- return 0;
-}
-
-pipesync::pipesync (HANDLE f, DWORD is_reader):
- reader (false), ret_handle (NULL)
-{
- ev = CreateEvent (&sec_none_nih, true, false, NULL);
- if (!ev)
- system_printf ("couldn't create synchronization event for non-cygwin pipe, %E");
- else
- {
- debug_printf ("created thread synchronization event %p", ev);
- non_cygwin_h = f;
- reader = !!is_reader;
- ret_handle = NULL;
-
- DWORD tid;
- HANDLE ht = CreateThread (&sec_none_nih, 0, pipe_handler, this, 0, &tid);
-
- if (!ht)
- goto out;
- CloseHandle (ht);
-
- switch (WaitForSingleObject (ev, INFINITE))
- {
- case WAIT_OBJECT_0:
- break;
- default:
- system_printf ("WFSO failed waiting for synchronization event for non-cygwin pipe, %E");
- break;
- }
- }
-
-out:
- if (ev)
- {
- CloseHandle (ev);
- ev = NULL;
- }
-}
-
-void
-fhandler_pipe::init (HANDLE f, DWORD a, mode_t mode)
-{
- // FIXME: Have to clean this up someday
- if (!*get_win32_name () && get_name ())
- {
- char *hold_normalized_name = (char *) alloca (strlen (get_name ()) + 1);
- strcpy (hold_normalized_name, get_name ());
- char *s, *d;
- for (s = hold_normalized_name, d = (char *) get_win32_name (); *s; s++, d++)
- if (*s == '/')
- *d = '\\';
- else
- *d = *s;
- *d = '\0';
- set_name (hold_normalized_name);
- }
-
- bool opened_properly = a & FILE_CREATE_PIPE_INSTANCE;
- a &= ~FILE_CREATE_PIPE_INSTANCE;
- if (!opened_properly)
- {
- pipesync ps (f, a & GENERIC_READ);
- f = ps.ret_handle;
- }
-
- fhandler_base::init (f, a, mode);
- if (mode & O_NOINHERIT)
- close_on_exec (true);
- setup_overlapped ();
-}
-
-extern "C" int sscanf (const char *, const char *, ...);
-
-int
-fhandler_pipe::open (int flags, mode_t mode)
-{
- HANDLE proc, pipe_hdl, nio_hdl = NULL;
- fhandler_pipe *fh = NULL;
- size_t size;
- int pid, rwflags = (flags & O_ACCMODE);
- bool inh;
-
- sscanf (get_name (), "/proc/%d/fd/pipe:[%d]", &pid, (int *) &pipe_hdl);
- if (pid == myself->pid)
- {
- cygheap_fdenum cfd (true);
- while (cfd.next () >= 0)
- {
- if (cfd->get_handle () != pipe_hdl)
- continue;
- if ((rwflags == O_RDONLY && !(cfd->get_access () & GENERIC_READ))
- || (rwflags == O_WRONLY && !(cfd->get_access () & GENERIC_WRITE)))
- {
- set_errno (EACCES);
- return 0;
- }
- if (!cfd->dup (this))
- return 1;
- return 0;
- }
- set_errno (ENOENT);
- return 0;
- }
-
- pinfo p (pid);
- if (!p)
- {
- set_errno (ESRCH);
- return 0;
- }
- if (!(proc = OpenProcess (PROCESS_DUP_HANDLE, false, p->dwProcessId)))
- {
- __seterrno ();
- return 0;
- }
- if (!(fh = p->pipe_fhandler (pipe_hdl, size)) || !size)
- {
- set_errno (ENOENT);
- goto out;
- }
- /* Too bad, but Windows only allows the same access mode when dup'ing
- the pipe. */
- if ((rwflags == O_RDONLY && !(fh->get_access () & GENERIC_READ))
- || (rwflags == O_WRONLY && !(fh->get_access () & GENERIC_WRITE)))
- {
- set_errno (EACCES);
- goto out;
- }
- inh = !(flags & O_NOINHERIT);
- if (!DuplicateHandle (proc, pipe_hdl, hMainProc, &nio_hdl,
- 0, inh, DUPLICATE_SAME_ACCESS))
- {
- __seterrno ();
- goto out;
- }
- init (nio_hdl, fh->get_access (), mode & O_TEXT ?: O_BINARY);
- if (flags & O_NOINHERIT)
- close_on_exec (true);
- uninterruptible_io (fh->uninterruptible_io ());
- cfree (fh);
- CloseHandle (proc);
- return 1;
-out:
- if (nio_hdl)
- CloseHandle (nio_hdl);
- if (fh)
- free (fh);
- if (proc)
- CloseHandle (proc);
- return 0;
-}
-
-_off64_t
-fhandler_pipe::lseek (_off64_t offset, int whence)
-{
- debug_printf ("(%d, %d)", offset, whence);
- set_errno (ESPIPE);
- return -1;
-}
-
-int
-fhandler_pipe::fadvise (_off64_t offset, _off64_t length, int advice)
-{
- set_errno (ESPIPE);
- return -1;
-}
-
-int
-fhandler_pipe::ftruncate (_off64_t length, bool allow_truncate)
-{
- set_errno (allow_truncate ? EINVAL : ESPIPE);
- return -1;
-}
-
-char *
-fhandler_pipe::get_proc_fd_name (char *buf)
-{
- __small_sprintf (buf, "pipe:[%d]", get_handle ());
- return buf;
-}
-
-void
-fhandler_pipe::raw_read (void *in_ptr, size_t& in_len)
-{
- return read_overlapped (in_ptr, in_len);
-}
-
-int
-fhandler_pipe::raw_write (const void *ptr, size_t len)
-{
- return write_overlapped (ptr, len);
-}
-
-int
-fhandler_pipe::dup (fhandler_base *child)
-{
- fhandler_pipe *ftp = (fhandler_pipe *) child;
- ftp->set_popen_pid (0);
-
- int res;
- if (get_handle () && fhandler_base::dup (child))
- res = -1;
- else
- res = 0;
-
- debug_printf ("res %d", res);
- return res;
-}
-
-#define PIPE_INTRO "\\\\.\\pipe\\cygwin-"
-
-/* Create a pipe, and return handles to the read and write ends,
- just like CreatePipe, but ensure that the write end permits
- FILE_READ_ATTRIBUTES access, on later versions of win32 where
- this is supported. This access is needed by NtQueryInformationFile,
- which is used to implement select and nonblocking writes.
- Note that the return value is either 0 or GetLastError,
- unlike CreatePipe, which returns a bool for success or failure. */
-int
-fhandler_pipe::create_selectable (LPSECURITY_ATTRIBUTES sa_ptr, HANDLE& r,
- HANDLE& w, DWORD psize, const char *name)
-{
- /* Default to error. */
- r = w = INVALID_HANDLE_VALUE;
-
- /* Ensure that there is enough pipe buffer space for atomic writes. */
- if (psize < PIPE_BUF)
- psize = PIPE_BUF;
-
- char pipename[MAX_PATH] = PIPE_INTRO;
- /* FIXME: Eventually make ttys work with overlapped I/O. */
- DWORD overlapped = name ? 0 : FILE_FLAG_OVERLAPPED;
-
- /* Retry CreateNamedPipe as long as the pipe name is in use.
- Retrying will probably never be necessary, but we want
- to be as robust as possible. */
- DWORD err;
- do
- {
- static volatile ULONG pipe_unique_id;
- if (!name)
- __small_sprintf (pipename + strlen(PIPE_INTRO), "%p-%p", myself->pid,
- InterlockedIncrement ((LONG *) &pipe_unique_id));
- else
- strcpy (pipename + strlen(PIPE_INTRO), name);
-
- debug_printf ("CreateNamedPipe: name %s, size %lu", pipename, psize);
-
- err = 0;
- /* Use CreateNamedPipe instead of CreatePipe, because the latter
- returns a write handle that does not permit FILE_READ_ATTRIBUTES
- access, on versions of win32 earlier than WinXP SP2.
- CreatePipe also stupidly creates a full duplex pipe, which is
- a waste, since only a single direction is actually used.
- It's important to only allow a single instance, to ensure that
- the pipe was not created earlier by some other process, even if
- the pid has been reused. We avoid FILE_FLAG_FIRST_PIPE_INSTANCE
- because that is only available for Win2k SP2 and WinXP. */
- r = CreateNamedPipe (pipename, PIPE_ACCESS_INBOUND | overlapped,
- PIPE_TYPE_BYTE | PIPE_READMODE_BYTE, 1, psize,
- psize, NMPWAIT_USE_DEFAULT_WAIT, sa_ptr);
-
- /* Win 95 seems to return NULL instead of INVALID_HANDLE_VALUE */
- if (r && r != INVALID_HANDLE_VALUE)
- {
- debug_printf ("pipe read handle %p", r);
- break;
- }
-
- err = GetLastError ();
- switch (err)
- {
- case ERROR_PIPE_BUSY:
- /* The pipe is already open with compatible parameters.
- Pick a new name and retry. */
- debug_printf ("pipe busy, retrying");
- break;
- case ERROR_ACCESS_DENIED:
- /* The pipe is already open with incompatible parameters.
- Pick a new name and retry. */
- debug_printf ("pipe access denied, retrying");
- break;
- default:
- {
- err = GetLastError ();
- debug_printf ("CreatePipe failed, %E");
- return err;
- }
- }
- }
- while (!name);
-
- if (err)
- return err;
-
- debug_printf ("CreateFile: name %s", pipename);
-
- /* Open the named pipe for writing.
- Be sure to permit FILE_READ_ATTRIBUTES access. */
- w = CreateFile (pipename, GENERIC_WRITE | FILE_READ_ATTRIBUTES, 0, sa_ptr,
- OPEN_EXISTING, overlapped, 0);
-
- if (!w || w == INVALID_HANDLE_VALUE)
- {
- /* Failure. */
- DWORD err = GetLastError ();
- debug_printf ("CreateFile failed, %E");
- CloseHandle (r);
- return err;
- }
-
- debug_printf ("pipe write handle %p", w);
-
- /* Success. */
- return 0;
-}
-
-int
-fhandler_pipe::create (fhandler_pipe *fhs[2], unsigned psize, int mode)
-{
- HANDLE r, w;
- SECURITY_ATTRIBUTES *sa = (mode & O_NOINHERIT) ? &sec_none_nih : &sec_none;
- int res;
-
- int ret = create_selectable (sa, r, w, psize);
- if (ret)
- {
- __seterrno_from_win_error (ret);
- res = -1;
- }
- else
- {
- fhs[0] = (fhandler_pipe *) build_fh_dev (*piper_dev);
- fhs[1] = (fhandler_pipe *) build_fh_dev (*pipew_dev);
-
- mode |= mode & O_TEXT ?: O_BINARY;
- fhs[0]->init (r, FILE_CREATE_PIPE_INSTANCE | GENERIC_READ, mode);
- fhs[1]->init (w, FILE_CREATE_PIPE_INSTANCE | GENERIC_WRITE, mode);
- res = 0;
- }
-
- syscall_printf ("%d = pipe ([%p, %p], %d, %p)", res, fhs[0], fhs[1], psize, mode);
- return res;
-}
-
-int
-fhandler_pipe::ioctl (unsigned int cmd, void *p)
-{
- int n;
-
- switch (cmd)
- {
- case FIONREAD:
- if (get_device () == FH_PIPEW)
- {
- set_errno (EINVAL);
- return -1;
- }
- if (!PeekNamedPipe (get_handle (), NULL, 0, NULL, (DWORD *) &n, NULL))
- {
- __seterrno ();
- return -1;
- }
- break;
- default:
- return fhandler_base::ioctl (cmd, p);
- break;
- }
- *(int *) p = n;
- return 0;
-}
-
-int __stdcall
-fhandler_pipe::fstatvfs (struct statvfs *sfs)
-{
- set_errno (EBADF);
- return -1;
-}
-
-#define DEFAULT_PIPEBUFSIZE 65536
-
-extern "C" int
-pipe (int filedes[2])
-{
- fhandler_pipe *fhs[2];
- int res = fhandler_pipe::create (fhs, DEFAULT_PIPEBUFSIZE, O_BINARY);
- if (res == 0)
- {
- cygheap_fdnew fdin;
- cygheap_fdnew fdout (fdin, false);
- fdin = fhs[0];
- fdout = fhs[1];
- filedes[0] = fdin;
- filedes[1] = fdout;
- }
-
- return res;
-}
-
-extern "C" int
-_pipe (int filedes[2], unsigned int psize, int mode)
-{
- fhandler_pipe *fhs[2];
- int res = fhandler_pipe::create (fhs, psize, mode);
- /* This type of pipe is not interruptible so set the appropriate flag. */
- if (!res)
- {
- cygheap_fdnew fdin;
- cygheap_fdnew fdout (fdin, false);
- fhs[0]->uninterruptible_io (true);
- fdin = fhs[0];
- fdout = fhs[1];
- filedes[0] = fdin;
- filedes[1] = fdout;
- }
-
- return res;
-}
diff --git a/winsup/cygwin/poll.cc b/winsup/cygwin/poll.cc
deleted file mode 100644
index e7f8da5..0000000
--- a/winsup/cygwin/poll.cc
+++ /dev/null
@@ -1,123 +0,0 @@
-/* poll.cc. Implements poll(2) via usage of select(2) call.
-
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 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 __INSIDE_CYGWIN_NET__
-
-#define FD_SETSIZE 16384 // lots of fds
-#include "winsup.h"
-#include <sys/poll.h>
-#include <sys/socket.h>
-#include <stdlib.h>
-#define USE_SYS_TYPES_FD_SET
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-
-extern "C" int
-poll (struct pollfd *fds, nfds_t nfds, int timeout)
-{
- int max_fd = 0;
- fd_set *read_fds, *write_fds, *except_fds;
- struct timeval tv = { timeout / 1000, (timeout % 1000) * 1000 };
-
- for (unsigned int i = 0; i < nfds; ++i)
- if (fds[i].fd > max_fd)
- max_fd = fds[i].fd;
-
- size_t fds_size = howmany (max_fd + 1, NFDBITS) * sizeof (fd_mask);
-
- read_fds = (fd_set *) alloca (fds_size);
- write_fds = (fd_set *) alloca (fds_size);
- except_fds = (fd_set *) alloca (fds_size);
-
- if (!read_fds || !write_fds || !except_fds)
- {
- set_errno (EINVAL); /* According to SUSv3. */
- return -1;
- }
-
- memset (read_fds, 0, fds_size);
- memset (write_fds, 0, fds_size);
- memset (except_fds, 0, fds_size);
-
- int invalid_fds = 0;
- for (unsigned int i = 0; i < nfds; ++i)
- {
- fds[i].revents = 0;
- if (!cygheap->fdtab.not_open (fds[i].fd))
- {
- if (fds[i].events & POLLIN)
- FD_SET(fds[i].fd, read_fds);
- if (fds[i].events & POLLOUT)
- FD_SET(fds[i].fd, write_fds);
- if (fds[i].events & POLLPRI)
- FD_SET(fds[i].fd, except_fds);
- }
- else if (fds[i].fd >= 0)
- {
- ++invalid_fds;
- fds[i].revents = POLLNVAL;
- }
- }
-
- if (invalid_fds)
- return invalid_fds;
-
- int ret = cygwin_select (max_fd + 1, read_fds, write_fds, except_fds,
- timeout < 0 ? NULL : &tv);
- if (ret <= 0)
- return ret;
-
- /* Set revents fields and count fds with non-zero revents fields for
- return value. */
- ret = 0;
- for (unsigned int i = 0; i < nfds; ++i)
- {
- if (fds[i].fd >= 0)
- {
- if (cygheap->fdtab.not_open (fds[i].fd))
- fds[i].revents = POLLHUP;
- else
- {
- fhandler_socket *sock;
-
- if (FD_ISSET(fds[i].fd, read_fds))
- /* This should be sufficient for sockets, too. Using
- MSG_PEEK, as before, can be considered dangerous at
- best. Quote from W. Richard Stevens: "The presence
- of an error can be considered either normal data or
- an error (POLLERR). In either case, a subsequent read
- will return -1 with errno set to the appropriate value."
- So it looks like there's actually no good reason to
- return POLLERR. */
- fds[i].revents |= POLLIN;
- /* Handle failed connect. */
- if (FD_ISSET(fds[i].fd, write_fds)
- && (sock = cygheap->fdtab[fds[i].fd]->is_socket ())
- && sock->connect_state () == connect_failed)
- fds[i].revents |= (POLLIN | POLLERR);
- else
- {
- if (FD_ISSET(fds[i].fd, write_fds))
- fds[i].revents |= POLLOUT;
- if (FD_ISSET(fds[i].fd, except_fds))
- fds[i].revents |= POLLPRI;
- }
- }
- if (fds[i].revents)
- ++ret;
- }
- }
-
- return ret;
-}
diff --git a/winsup/cygwin/posix.sgml b/winsup/cygwin/posix.sgml
deleted file mode 100644
index 5a089ab..0000000
--- a/winsup/cygwin/posix.sgml
+++ /dev/null
@@ -1,1359 +0,0 @@
-<sect1 id="std-susv3"><title>System interfaces compatible with the Single Unix Specification, Version 3:</title>
-
-<para>Note that the core of the Single Unix Specification, Version 3 is
-also ISO/IEC 9945:2003 and IEEE Std 1003.1-2001 (POSIX.1-2001).</para>
-
-<screen>
- FD_CLR
- FD_ISSET
- FD_SET
- FD_ZERO
- _Exit
- _exit
- _longjmp
- _setjmp
- _tolower
- _toupper
- a64l
- abort
- abs
- accept
- access
- acos
- acosf
- acosh
- acoshf
- alarm
- asctime
- asctime_r
- asin
- asinf
- asinh
- asinhf
- atan
- atan2
- atan2f
- atanf
- atanh
- atanhf
- atexit
- atof
- atoff
- atoi
- atol
- atoll
- basename
- bcmp
- bcopy
- bind
- bsearch
- btowc
- bzero
- cabs
- cabsf
- calloc
- catclose (available in external "catgets" library)
- catgets (available in external "catgets" library)
- catopen (available in external "catgets" library)
- cbrt
- cbrtf
- ceil
- ceilf
- cfgetispeed
- cfgetospeed
- cfsetispeed
- cfsetospeed
- chdir
- chmod
- chown
- chroot (see chapter "Implementation Notes")
- clearerr
- clock
- clock_getres (see chapter "Implementation Notes")
- clock_gettime (see chapter "Implementation Notes")
- clock_setres (see chapter "Implementation Notes")
- close
- closedir
- closelog
- confstr
- connect
- copysign
- copysignf
- cos
- cosf
- cosh
- coshf
- creat
- crypt (available in external "crypt" library)
- ctermid
- ctime
- ctime_r
- daylight
- dbm_clearerr (available in external "libgdbm" library)
- dbm_close (available in external "libgdbm" library)
- dbm_delete (available in external "libgdbm" library)
- dbm_error (available in external "libgdbm" library)
- dbm_fetch (available in external "libgdbm" library)
- dbm_firstkey (available in external "libgdbm" library)
- dbm_nextkey (available in external "libgdbm" library)
- dbm_open (available in external "libgdbm" library)
- dbm_store (available in external "libgdbm" library)
- difftime
- dirname
- div
- dlclose
- dlerror
- dlopen
- dlsym
- drand48
- dup
- dup2
- ecvt
- encrypt (available in external "crypt" library)
- endgrent
- endhostent
- endprotoent
- endpwent
- endservent
- endutxent
- environ
- erand48
- erf
- erfc
- erfcf
- erff
- errno
- execl
- execle
- execlp
- execv
- execve
- execvp
- exit
- exp
- exp2
- exp2f
- expf
- expm1
- expm1f
- fabs
- fabsf
- fchdir
- fchmod
- fchown
- fclose
- fcntl
- fcvt
- fdatasync
- fdim
- fdimf
- fdopen
- feof
- ferror
- fflush
- ffs
- fgetc
- fgetpos
- fgets
- fgetwc
- fgetws
- fileno
- flockfile
- floor
- floorf
- fma
- fmaf
- fmax
- fmaxf
- fmin
- fminf
- fmod
- fmodf
- fnmatch
- fopen
- fork
- fpathconf
- fpclassify (see chapter "Implementation Notes")
- fprintf
- fputc
- fputs
- fputwc
- fputws
- fread
- free
- freeaddrinfo
- freopen
- frexp
- frexpf
- fscanf
- fseek
- fseeko
- fsetpos
- fstat
- fstatvfs
- fsync
- ftell
- ftello
- ftime
- ftok
- ftruncate
- ftrylockfile
- ftw
- funlockfile
- futimes
- fwide
- fwrite
- gai_strerror
- gcvt
- getaddrinfo
- getc
- getc_unlocked
- getchar
- getchar_unlocked
- getcwd
- getdelim
- getdomainname
- getegid
- getenv
- geteuid
- getgid
- getgrent
- getgrgid
- getgrgid_r
- getgrnam
- getgrnam_r
- getgroups
- gethostbyaddr
- gethostbyname
- gethostid
- gethostname
- getitimer (see chapter "Implementation Notes")
- getlogin
- getlogin_r
- getnameinfo
- getopt
- getpeername
- getpgid
- getpgrp
- getpid
- getppid
- getpriority
- getprotobyname
- getprotobynumber
- getprotoent
- getpwent
- getpwnam
- getpwnam_r
- getpwuid
- getpwuid_r
- getrlimit
- getrusage
- gets
- getservbyname
- getservbyport
- getservent
- getsid
- getsockname
- getsockopt
- getsubopt
- gettimeofday
- getuid
- getutxent
- getutxid
- getutxline
- getwc
- getwchar
- getwd
- glob
- globfree
- gmtime
- gmtime_r
- grantpt
- h_errno
- hcreate
- hdestroy
- hsearch
- hstrerror
- htonl
- htons
- hypot
- hypotf
- iconv (available in external "libiconv" library)
- iconv_close (available in external "libiconv" library)
- iconv_open (available in external "libiconv" library)
- if_freenameindex
- if_indextoname
- if_nameindex
- if_nametoindex
- ilogb
- ilogbf
- imaxabs
- imaxdiv
- index
- inet_addr
- inet_ntoa
- inet_ntop
- inet_pton
- initstate
- insque
- ioctl
- isalnum
- isalpha
- isascii
- isatty
- isblank
- iscntrl
- isdigit
- isfinite (see chapter "Implementation Notes")
- isgraph
- isgreater (see chapter "Implementation Notes")
- isgreaterequal (see chapter "Implementation Notes")
- isinf (see chapter "Implementation Notes")
- isless
- islessequal (see chapter "Implementation Notes")
- islessgreater (see chapter "Implementation Notes")
- islower
- isnan (see chapter "Implementation Notes")
- isnormal (see chapter "Implementation Notes")
- isprint
- ispunct
- isspace
- isunordered (see chapter "Implementation Notes")
- isupper
- iswalnum
- iswalpha
- iswblank
- iswcntrl
- iswctype
- iswdigit
- iswgraph
- iswlower
- iswprint
- iswpunct
- iswspace
- iswupper
- iswxdigit
- isxdigit
- j0
- j1
- jn
- jrand48
- kill
- killpg
- l64a
- labs
- lchown
- lcong48
- ldexp
- ldexpf
- ldiv
- lfind
- lgamma
- lgammaf
- link
- listen
- llabs
- lldiv
- llrint
- llrintf
- llrintl
- localeconv
- localtime
- localtime_r
- lockf
- log
- log10
- log10f
- log1p
- log1pf
- logb
- logbf
- logf
- longjmp
- lrand48
- lrint
- lrintf
- lrintl
- lround
- lroundf
- lsearch
- lseek
- lstat
- malloc
- mblen
- mbrlen
- mbrtowc
- mbsinit
- mbsrtowcs
- mbstowcs
- mbtowc
- memccpy
- memchr
- memcmp
- memcpy
- memmove
- memset
- mkdir
- mkfifo
- mknod
- mkstemp
- mktemp
- mktime
- mlock
- mmap
- modf
- modff
- mprotect
- mq_close
- mq_getattr
- mq_notify
- mq_open
- mq_receive
- mq_send
- mq_setattr
- mq_timedreceive
- mq_timedsend
- mq_unlink
- mrand48
- msgctl (see chapter "Implementation Notes")
- msgget (see chapter "Implementation Notes")
- msgrcv (see chapter "Implementation Notes")
- msgsnd (see chapter "Implementation Notes")
- msync
- munlock
- munmap
- nan
- nanf
- nanosleep
- nearbyint
- nearbyintf
- nextafter
- nextafterf
- nftw
- nice
- nl_langinfo
- nrand48
- ntohl
- ntohs
- open
- opendir
- openlog
- optarg
- opterr
- optind
- optopt
- pathconf
- pause
- pclose
- perror
- pipe
- poll
- popen
- posix_fadvise
- posix_fallocate
- posix_madvise
- posix_memalign
- posix_openpt
- pow
- powf
- pread
- printf
- pselect
- pthread_atfork
- pthread_attr_destroy
- pthread_attr_getdetachstate
- pthread_attr_getinheritsched
- pthread_attr_getschedparam
- pthread_attr_getschedpolicy
- pthread_attr_getscope
- pthread_attr_getstacksize
- pthread_attr_init
- pthread_attr_setdetachstate
- pthread_attr_setinheritsched
- pthread_attr_setschedparam
- pthread_attr_setschedpolicy
- pthread_attr_setscope
- pthread_attr_setstacksize
- pthread_cancel
- pthread_cond_broadcast
- pthread_cond_destroy
- pthread_cond_init
- pthread_cond_signal
- pthread_cond_timedwait
- pthread_cond_wait
- pthread_condattr_destroy
- pthread_condattr_getpshared
- pthread_condattr_init
- pthread_condattr_setpshared
- pthread_create
- pthread_detach
- pthread_equal
- pthread_exit
- pthread_getconcurrency
- pthread_getschedparam
- pthread_getspecific
- pthread_join
- pthread_key_create
- pthread_key_delete
- pthread_kill
- pthread_mutex_destroy
- pthread_mutex_getprioceiling
- pthread_mutex_init
- pthread_mutex_lock
- pthread_mutex_setprioceiling
- pthread_mutex_trylock
- pthread_mutex_unlock
- pthread_mutexattr_destroy
- pthread_mutexattr_getprioceiling
- pthread_mutexattr_getprotocol
- pthread_mutexattr_getpshared
- pthread_mutexattr_gettype
- pthread_mutexattr_init
- pthread_mutexattr_setprioceiling
- pthread_mutexattr_setprotocol
- pthread_mutexattr_setpshared
- pthread_mutexattr_settype
- pthread_once
- pthread_rwlock_destroy
- pthread_rwlock_init
- pthread_rwlock_rdlock
- pthread_rwlock_tryrdlock
- pthread_rwlock_trywrlock
- pthread_rwlock_unlock
- pthread_rwlock_wrlock
- pthread_rwlockattr_destroy
- pthread_rwlockattr_getpshared
- pthread_rwlockattr_init
- pthread_rwlockattr_setpshared
- pthread_self
- pthread_setcancelstate
- pthread_setcanceltype
- pthread_setconcurrency
- pthread_setschedparam
- pthread_setspecific
- pthread_sigmask
- pthread_testcancel
- ptsname
- putc
- putc_unlocked
- putchar
- putchar_unlocked
- putenv
- puts
- pututxline
- putwc
- putwchar
- pwrite
- qsort
- raise
- rand
- rand_r
- random
- read
- readdir
- readdir_r
- readlink
- readv
- realloc
- realpath
- recv
- recvfrom
- recvmsg
- regcomp
- regerror
- regexec
- regfree
- remainder
- remainderf
- remove
- remque
- remquo
- remquof
- rename
- rewind
- rewinddir
- rindex
- rint
- rintf
- rintl
- rmdir
- round
- roundf
- scalb
- scalbln
- scalblnf
- scalbn
- scalbnf
- scandir
- scanf
- sched_get_priority_max
- sched_get_priority_min
- sched_getparam
- sched_getscheduler
- sched_rr_get_interval
- sched_setparam
- sched_setscheduler
- sched_yield
- seed48
- seekdir
- select
- sem_close
- sem_destroy
- sem_getvalue
- sem_init
- sem_open
- sem_post
- sem_timedwait
- sem_trywait
- sem_unlink
- sem_wait
- semctl (see chapter "Implementation Notes")
- semget (see chapter "Implementation Notes")
- semop (see chapter "Implementation Notes")
- send
- sendmsg
- sendto
- setbuf
- setegid
- setenv
- seteuid
- setgid
- setgrent
- sethostent
- setitimer (see chapter "Implementation Notes")
- setjmp
- setkey (available in external "crypt" library)
- setlocale
- setlogmask
- setpgid
- setpgrp
- setpriority
- setprotoent
- setpwent
- setregid
- setreuid
- setrlimit
- setservent
- setsid
- setsockopt
- setstate
- setuid
- setutxent
- setvbuf
- shm_open
- shm_unlink
- shmat (see chapter "Implementation Notes")
- shmctl (see chapter "Implementation Notes")
- shmdt (see chapter "Implementation Notes")
- shmget (see chapter "Implementation Notes")
- shutdown
- sigaction
- sigaddset
- sigdelset
- sigemptyset
- sigfillset
- sighold
- sigignore
- siginterrupt
- sigismember
- siglongjmp
- signal
- signbit (see chapter "Implementation Notes")
- signgam
- sigpause
- sigpending
- sigprocmask
- sigqueue
- sigrelse
- sigset
- sigsetjmp
- sigsuspend
- sigwait
- sigwaitinfo
- sin
- sinf
- sinh
- sinhf
- sleep
- snprintf
- socket
- socketpair
- sprintf
- sqrt
- sqrtf
- srand
- srand48
- srandom
- sscanf
- stat
- statvfs
- stderr
- stdin
- stdout
- strcasecmp
- strcat
- strchr
- strcmp
- strcoll
- strcpy
- strcspn
- strdup
- strerror
- strerror_r
- strftime
- strlen
- strncasecmp
- strncat
- strncmp
- strncpy
- strpbrk
- strptime
- strrchr
- strspn
- strstr
- strtod
- strtof
- strtoimax
- strtok
- strtok_r
- strtol
- strtoll
- strtoul
- strtoull
- strtoumax
- strxfrm
- swab
- symlink
- sync
- sysconf
- syslog
- system
- tan
- tanf
- tanh
- tanhf
- tcdrain
- tcflow
- tcflush
- tcgetattr
- tcgetpgrp
- tcsendbreak
- tcsetattr
- tcsetpgrp
- tdelete
- telldir
- tempnam
- tfind
- tgamma
- tgammaf
- time
- timer_create
- timer_delete
- timer_gettime
- timer_settime
- times
- timezone
- tmpfile
- tmpnam
- toascii
- tolower
- toupper
- towctrans
- towlower
- towupper
- trunc
- truncate
- truncf
- tsearch
- ttyname
- ttyname_r
- twalk
- tzname
- tzset
- ualarm
- umask
- uname
- ungetc
- ungetwc
- unlink
- unlockpt
- unsetenv
- usleep
- utime
- utimes
- va_arg
- va_copy
- va_end
- va_start
- vfork (see chapter "Implementation Notes")
- vfprintf
- vfscanf
- vprintf
- vscanf
- vsnprintf
- vsprintf
- vsscanf
- wait
- waitpid
- wcrtomb
- wcscat
- wcschr
- wcscmp
- wcscoll
- wcscpy
- wcscspn
- wcslen
- wcsncat
- wcsncmp
- wcsncpy
- wcspbrk
- wcsrchr
- wcsrtombs
- wcsspn
- wcsstr
- wcstol
- wcstoll
- wcstombs
- wcstoul
- wcstoull
- wcswidth
- wcsxfrm
- wctob
- wctomb
- wctrans
- wctype
- wcwidth
- wmemchr
- wmemcmp
- wmemcpy
- wmemmove
- wmemset
- wprintf
- write
- writev
- y0
- y1
- yn
-</screen>
-
-</sect1>
-
-<sect1 id="std-bsd"><title>System interfaces compatible with BSD functions:</title>
-
-<screen>
- alphasort
- bindresvport
- bindresvport_sa
- cfmakeraw
- daemon
- dn_comp
- dn_expand
- dn_skipname
- drem
- endusershell
- err
- errx
- finite
- finitef
- fiprintf
- flock
- forkpty
- freeifaddrs
- fstatfs
- fts_children
- fts_close
- fts_get_clientptr
- fts_get_stream
- fts_open
- fts_read
- fts_set
- fts_set_clientptr
- funopen
- gamma
- gamma_r
- gammaf
- gammaf_r
- getdtablesize
- getifaddrs
- getpagesize
- getpeereid
- getprogname
- getusershell
- herror
- inet_aton
- inet_makeaddr
- inet_netof
- inet_network
- initgroups
- iruserok
- iruserok_sa
- login
- login_tty
- logout
- logwtmp
- mkdtemp
- openpty
- rcmd
- rcmd_af
- res_close
- res_init
- res_mkquery
- res_nclose
- res_ninit
- res_nmkquery
- res_nquery
- res_nquerydomain
- res_nsearch
- res_nsend
- res_query
- res_querydomain
- res_search
- res_send
- revoke
- rexec
- rresvport
- rresvport_af
- ruserok
- sbrk
- setbuffer
- setgroups
- setlinebuf
- setpassent
- setprogname
- settimeofday
- setusershell
- statfs
- strcasestr
- strlcat
- strlcpy
- strsep
- strsignal
- updwtmp
- valloc
- verr
- verrx
- vhangup (see chapter "Implementation Notes")
- vsyslog
- vwarn
- vwarnx
- wait3
- wait4
- warn
- warnx
- wcslcat
- wcslcpy
-</screen>
-
-</sect1>
-
-<sect1 id="std-gnu"><title>System interfaces compatible with GNU or Linux extensions:</title>
-
-<screen>
- argz_add
- argz_add_sep
- argz_append
- argz_count
- argz_create
- argz_create_sep
- argz_delete
- argz_extract
- argz_insert
- argz_next
- argz_replace
- argz_stringify
- asnprintf
- asprintf
- asprintf_r
- dprintf
- dremf
- envz_add
- envz_entry
- envz_get
- envz_merge
- envz_remove
- envz_strip
- exp10
- exp10f
- fcloseall
- fcloseall_r
- fgetxattr
- flistxattr
- fmemopen
- fopencookie
- fremovexattr
- fsetxattr
- getline
- getopt_long
- getopt_long_only
- getxattr
- lgetxattr
- listxattr
- llistxattr
- lremovexattr
- lsetxattr
- memmem
- mempcpy
- open_memstream
- pow10
- pow10f
- removexattr
- setxattr
- stpcpy
- stpncpy
- strndup
- strnlen
- tdestroy
- timegm
- timelocal
- updwtmpx
- utmpxname
- vasnprintf
- vasprintf
- vasprintf_r
- vdprintf
- wcpcpy
- wcpncpy
-</screen>
-
-</sect1>
-
-<sect1 id="std-solaris"><title>System interfaces compatible with Solaris or SunOS functions:</title>
-
-<screen>
- acl
- aclcheck
- aclfrommode
- aclfrompbits
- aclfromtext
- aclsort
- acltomode
- acltopbits
- acltotext
- endmntent
- faccessat
- facl
- fchmodat
- fchownat
- fdopendir
- fstatat
- futimesat
- getmntent
- linkat
- memalign
- mkdirat
- mkfifoat
- mknodat
- openat
- readlinkat
- renameat
- setmntent
- symlinkat
- unlinkat
-</screen>
-
-</sect1>
-
-<sect1 id="std-susv4"><title>System interfaces compatible with the Draft Single Unix Specification, Version 4:</title>
-
-<screen>
- futimens
- utimensat
-</screen>
-
-</sect1>
-
-<sect1 id="std-deprec"><title>Other UNIX system interfaces, deprecated or not in POSIX.1-2001:</title>
-
-<screen>
- cuserid (POSIX.1-1988, SUSv2)
- endutent (XPG2)
- getpass (SUSv2)
- getutent (XPG2)
- getutid (XPG2)
- getutline (XPG2)
- getw (SVID)
- mallinfo (SVID)
- mallopt (SVID)
- on_exit (SunOS)
- pthread_continue (XPG2)
- pthread_getsequence_np (Tru64)
- pthread_suspend (XPG2)
- pututline (XPG2)
- putw (SVID)
- setutent (XPG2)
- sys_errlist (BSD)
- sys_nerr (BSD)
- ttyslot (SUSv2)
- utmpname (XPG2)
-</screen>
-
-</sect1>
-
-<sect1 id="std-notimpl"><title>NOT implemented system interfaces from the Single Unix Specification, Volume 3:</title>
-
-<screen>
- acoshl
- acosl
- aio_cancel
- aio_error
- aio_fsync
- aio_read
- aio_return
- aio_suspend
- aio_write
- asinhl
- asinl
- atan2l
- atanhl
- atanl
- bsd_signal
- cabsl
- cacos
- cacosf
- cacosh
- cacoshf
- cacoshl
- cacosl
- carg
- cargf
- cargl
- casin
- casinf
- casinh
- casinhf
- casinhl
- casinl
- catan
- catanf
- catanh
- catanhf
- catanhl
- catanl
- cbrtl
- ccos
- ccosf
- ccosh
- ccoshf
- ccoshl
- ccosl
- ceill
- cexp
- cexpf
- cexpl
- cimag
- cimagf
- cimagl
- clock_getcpuclockid
- clog
- clogf
- clogl
- conj
- conjf
- conjl
- copysignl
- coshl
- cosl
- cpow
- cpowf
- cpowl
- cproj
- cprojf
- cprojl
- creal
- crealf
- creall
- csin
- csinf
- csinh
- csinhf
- csinhl
- csinl
- csqrt
- csqrtf
- csqrtl
- ctan
- ctanf
- ctanh
- ctanhf
- ctanhl
- ctanl
- endnetent
- erfcl
- erfl
- exp2l
- expl
- expm1l
- fabsl
- fattach
- fdiml
- feclearexcept
- fegetenv
- fegetexceptflag
- fegetround
- feholdexcept
- feraiseexcept
- fesetenv
- fesetexceptflag
- fesetround
- fetestexcept
- feupdateenv
- floorl
- fmal
- fmaxl
- fminl
- fmodl
- fmtmsg
- frexpl
- fwprintf
- fwscanf
- getcontext
- getdate
- getdate_err
- gethostent
- getmsg
- getnetbyaddr
- getnetbyname
- getnetent
- getpmsg
- hypotl
- ilogbl
- initstate
- isastream
- ldexpl
- lgammal
- lio_listio
- llround
- llroundf
- llroundl
- log10l
- log1pl
- log2l
- logbl
- logl
- lroundl
- makecontext
- mlockall
- modfl
- munlockall
- nanl
- nearbyintl
- nextafterl
- nexttowardl
- posix_mem_offset
- posix_spawn[...]
- posix_trace[...]
- posix_typed_[...]
- powl
- pthread_attr_getguardsize
- pthread_attr_getstack
- pthread_attr_getstackaddr
- pthread_attr_setguardsize
- pthread_attr_setstack
- pthread_attr_setstackaddr
- pthread_barrier[...]
- pthread_condattr_getclock
- pthread_condattr_setclock
- pthread_getcpuclockid
- pthread_mutex_timedlock
- pthread_rwlock_timedrdlock
- pthread_rwlock_timedwrlock
- pthread_setschedprio
- pthread_spin_[...]
- putmsg
- reminderl
- remquol
- roundl
- scalblnl
- scalbnl
- setcontext
- setnetent
- sigaltstack
- sigtimedwait
- sinhl
- sinl
- sockatmark
- sqrtl
- strfmon
- strtold
- swabcontext
- swprintf
- swscanf
- tanhl
- tanl
- tcgetsid
- tgammal
- timer_getoverrun
- truncl
- ulimit
- vfwprintf
- vfwscanf
- vswprintf
- vswscanf
- vwprintf
- vwscanf
- waitid
- wcsftime
- wcstod
- wcstof
- wcstoimax
- wcstok
- wcstold
- wcstoumax
- wcswcs
- wordexp
- wordfree
- wscanf
-</screen>
-
-</sect1>
-
-<sect1 id="std-notes"><title>Implementation Notes</title>
-
-<para><function>chroot</function> only emulates a chroot function call
-by keeping track of the current root and accomodating this in the file
-related function calls. A real chroot functionality is not supported by
-Windows however.</para>
-
-<para><function>clock_getres</function>, <function>clock_gettime</function>
-and <function>clock_setres</function> only support CLOCK_REALTIME for
-now.</para>
-
-<para><function>fpclassify</function>, <function>isfinite</function>,
-<function>isgreater</function>, <function>isgreaterequal</function>,
-<function>isinf</function>, <function>isless</function>,
-<function>islessequal</function>, <function>islessgreater</function>,
-<function>isnan</function>, <function>isnormal</function>,
-<function>isunordered</function>, and <function>signbit</function>
-only support float and double arguments, not long double arguments.</para>
-
-<para><function>getitimer</function> and <function>setitimer</function>
-only support ITIMER_REAL for now.</para>
-
-<para><function>link</function> will copy the file if it can't implement
-a true hardlink. This is true at least for FAT and FAT32 filesystems.
-NTFS supports hardlinks. </para>
-
-<para><function>lseek</function> only works properly on binary
-files.</para>
-
-<para><function>setuid</function> is only safe against reverting the user
-switch after a call to one of the exec(2) functions took place. Windows
-doesn't support a non-revertable user switch within the context of Win32
-processes.</para>
-
-<para><function>vfork</function> just calls <function>fork</function>.</para>
-
-<para><function>vhangup</function> always returns -1 and sets errno to
-ENOSYS.</para>
-
-<para>The XSI IPC functions <function>semctl</function>,
-<function>semget</function>, <function>semop</function>,
-<function>shmat</function>, <function>shmctl</function>,
-<function>shmdt</function>, <function>shmget</function>,
-<function>msgctl</function>, <function>msgget</function>,
-<function>msgrcv</function> and <function>msgsnd</function> are only
-available when cygserver is running and the <envar>CYGWIN</envar>
-environment variable is set so that it contains the string
-<envar>server</envar>.</para>
-
-</sect1>
diff --git a/winsup/cygwin/posix_ipc.cc b/winsup/cygwin/posix_ipc.cc
deleted file mode 100644
index 693b654..0000000
--- a/winsup/cygwin/posix_ipc.cc
+++ /dev/null
@@ -1,1061 +0,0 @@
-/* posix_ipc.cc: POSIX IPC API for Cygwin.
-
- Copyright 2007 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "thread.h"
-#include "path.h"
-#include "cygtls.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "sigproc.h"
-#include "ntdll.h"
-#include <sys/mman.h>
-#include <sys/param.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <mqueue.h>
-#include <semaphore.h>
-
-/* The prefix_len is the length of the path prefix ncluding trailing "/"
- (or "/sem." for semaphores) as well as the trailing NUL. */
-static struct
-{
- const char *prefix;
- const size_t prefix_len;
- const char *description;
-} ipc_names[] = {
- { "/dev/shm", 10, "POSIX shared memory object" },
- { "/dev/mqueue", 13, "POSIX message queue" },
- { "/dev/shm", 14, "POSIX semaphore" }
-};
-
-enum ipc_type_t
-{
- shmem,
- mqueue,
- semaphore
-};
-
-static bool
-check_path (char *res_name, ipc_type_t type, const char *name, size_t len)
-{
- /* Note that we require the existance of the apprpriate /dev subdirectories
- for POSIX IPC object support, similar to Linux (which supports the
- directories, but doesn't require to mount them). We don't create
- these directory here, that's the task of the installer. But we check
- for existance and give ample warning. */
- path_conv path (ipc_names[type].prefix, PC_SYM_NOFOLLOW);
- if (path.error || !path.exists () || !path.isdir ())
- {
- small_printf (
- "Warning: '%s' does not exists or is not a directory.\n\n"
- "%ss require the existance of this directory.\n"
- "Create the directory '%s' and set the permissions to 01777.\n"
- "For instance on the command line: mkdir -m 01777 %s\n",
- ipc_names[type].prefix, ipc_names[type].description,
- ipc_names[type].prefix, ipc_names[type].prefix);
- set_errno (EINVAL);
- return false;
- }
- /* Name must start with a single slash. */
- if (!name || name[0] != '/' || name[1] == '/' || !name[1])
- {
- debug_printf ("Invalid %s name '%s'", ipc_names[type].description, name);
- set_errno (EINVAL);
- return false;
- }
- if (len > PATH_MAX - ipc_names[type].prefix_len)
- {
- debug_printf ("%s name '%s' too long", ipc_names[type].description, name);
- set_errno (ENAMETOOLONG);
- return false;
- }
- __small_sprintf (res_name, "%s/%s%s", ipc_names[type].prefix,
- type == semaphore ? "sem." : "",
- name + 1);
- return true;
-}
-
-static int
-ipc_mutex_init (HANDLE *pmtx, const char *name)
-{
- char buf[MAX_PATH];
- SECURITY_ATTRIBUTES sa = sec_none;
-
- __small_sprintf (buf, "mqueue/mtx_%s", name);
- sa.lpSecurityDescriptor = everyone_sd (CYG_MUTANT_ACCESS);
- *pmtx = CreateMutex (&sa, FALSE, buf);
- if (!*pmtx)
- debug_printf ("CreateMutex: %E");
- return *pmtx ? 0 : geterrno_from_win_error ();
-}
-
-static int
-ipc_mutex_lock (HANDLE mtx)
-{
- HANDLE h[2] = { mtx, signal_arrived };
-
- switch (WaitForMultipleObjects (2, h, FALSE, INFINITE))
- {
- case WAIT_OBJECT_0:
- case WAIT_ABANDONED_0:
- return 0;
- case WAIT_OBJECT_0 + 1:
- set_errno (EINTR);
- return 1;
- default:
- break;
- }
- return geterrno_from_win_error ();
-}
-
-static inline int
-ipc_mutex_unlock (HANDLE mtx)
-{
- return ReleaseMutex (mtx) ? 0 : geterrno_from_win_error ();
-}
-
-static inline int
-ipc_mutex_close (HANDLE mtx)
-{
- return CloseHandle (mtx) ? 0 : geterrno_from_win_error ();
-}
-
-static int
-ipc_cond_init (HANDLE *pevt, const char *name)
-{
- char buf[MAX_PATH];
- SECURITY_ATTRIBUTES sa = sec_none;
-
- __small_sprintf (buf, "mqueue/evt_%s", name);
- sa.lpSecurityDescriptor = everyone_sd (CYG_EVENT_ACCESS);
- *pevt = CreateEvent (&sa, TRUE, FALSE, buf);
- if (!*pevt)
- debug_printf ("CreateEvent: %E");
- return *pevt ? 0 : geterrno_from_win_error ();
-}
-
-static int
-ipc_cond_timedwait (HANDLE evt, HANDLE mtx, const struct timespec *abstime)
-{
- struct timeval tv;
- DWORD timeout;
- HANDLE h[2] = { mtx, evt };
-
- if (!abstime)
- timeout = INFINITE;
- else if (abstime->tv_sec < 0
- || abstime->tv_nsec < 0
- || abstime->tv_nsec > 999999999)
- return EINVAL;
- else
- {
- gettimeofday (&tv, NULL);
- /* Check for immediate timeout. */
- if (tv.tv_sec > abstime->tv_sec
- || (tv.tv_sec == abstime->tv_sec
- && tv.tv_usec > abstime->tv_nsec / 1000))
- return ETIMEDOUT;
- timeout = (abstime->tv_sec - tv.tv_sec) * 1000;
- timeout += (abstime->tv_nsec / 1000 - tv.tv_usec) / 1000;
- }
- if (ipc_mutex_unlock (mtx))
- return -1;
- switch (WaitForMultipleObjects (2, h, TRUE, timeout))
- {
- case WAIT_OBJECT_0:
- case WAIT_ABANDONED_0:
- ResetEvent (evt);
- return 0;
- case WAIT_TIMEOUT:
- ipc_mutex_lock (mtx);
- return ETIMEDOUT;
- default:
- break;
- }
- return geterrno_from_win_error ();
-}
-
-static inline int
-ipc_cond_signal (HANDLE evt)
-{
- return SetEvent (evt) ? 0 : geterrno_from_win_error ();
-}
-
-static inline int
-ipc_cond_close (HANDLE evt)
-{
- return CloseHandle (evt) ? 0 : geterrno_from_win_error ();
-}
-
-class ipc_flock
-{
- struct __flock64 fl;
-
-public:
- ipc_flock () { memset (&fl, 0, sizeof fl); }
-
- int lock (int fd, size_t size)
- {
- fl.l_type = F_WRLCK;
- fl.l_whence = SEEK_SET;
- fl.l_start = 0;
- fl.l_len = size;
- return fcntl64 (fd, F_SETLKW, &fl);
- }
- int unlock (int fd)
- {
- if (!fl.l_len)
- return 0;
- fl.l_type = F_UNLCK;
- return fcntl64 (fd, F_SETLKW, &fl);
- }
-};
-
-/* POSIX shared memory object implementation. */
-
-extern "C" int
-shm_open (const char *name, int oflag, mode_t mode)
-{
- size_t len = strlen (name);
- char shmname[ipc_names[shmem].prefix_len + len];
-
- if (!check_path (shmname, shmem, name, len))
- return -1;
-
- /* Check for valid flags. */
- if (((oflag & O_ACCMODE) != O_RDONLY && (oflag & O_ACCMODE) != O_RDWR)
- || (oflag & ~(O_ACCMODE | O_CREAT | O_EXCL | O_TRUNC)))
- {
- debug_printf ("Invalid oflag 0%o", oflag);
- set_errno (EINVAL);
- return -1;
- }
-
- return open (shmname, oflag, mode & 0777);
-}
-
-extern "C" int
-shm_unlink (const char *name)
-{
- size_t len = strlen (name);
- char shmname[ipc_names[shmem].prefix_len + len];
-
- if (!check_path (shmname, shmem, name, len))
- return -1;
-
- return unlink (shmname);
-}
-
-/* The POSIX message queue implementation is based on W. Richard STEVENS
- implementation, just tweaked for Cygwin. The main change is
- the usage of Windows mutexes and events instead of using the pthread
- synchronization objects. The pathname is massaged so that the
- files are created under /dev/mqueue. mq_timedsend and mq_timedreceive
- are implemented additionally. */
-
-struct mq_hdr
-{
- struct mq_attr mqh_attr; /* the queue's attributes */
- long mqh_head; /* index of first message */
- long mqh_free; /* index of first free message */
- long mqh_nwait; /* #threads blocked in mq_receive() */
- pid_t mqh_pid; /* nonzero PID if mqh_event set */
- char mqh_uname[36]; /* unique name used to identify synchronization
- objects connected to this queue */
- struct sigevent mqh_event; /* for mq_notify() */
-};
-
-struct msg_hdr
-{
- long msg_next; /* index of next on linked list */
- ssize_t msg_len; /* actual length */
- unsigned int msg_prio; /* priority */
-};
-
-struct mq_info
-{
- struct mq_hdr *mqi_hdr; /* start of mmap'ed region */
- unsigned long mqi_magic; /* magic number if open */
- int mqi_flags; /* flags for this process */
- HANDLE mqi_lock; /* mutex lock */
- HANDLE mqi_wait; /* and condition variable */
-};
-
-#define MQI_MAGIC 0x98765432UL
-
-#define MSGSIZE(i) roundup((i), sizeof(long))
-
-#define MAX_TRIES 10 /* for waiting for initialization */
-
-struct mq_attr defattr = { 0, 10, 8192, 0 }; /* Linux defaults. */
-
-extern "C" _off64_t lseek64 (int, _off64_t, int);
-extern "C" void *mmap64 (void *, size_t, int, int, int, _off64_t);
-
-extern "C" mqd_t
-mq_open (const char *name, int oflag, ...)
-{
- int i, fd, nonblock, created;
- long msgsize, index;
- _off64_t filesize = 0;
- va_list ap;
- mode_t mode;
- int8_t *mptr;
- struct __stat64 statbuff;
- struct mq_hdr *mqhdr;
- struct msg_hdr *msghdr;
- struct mq_attr *attr;
- struct mq_info *mqinfo;
- LUID luid;
-
- size_t len = strlen (name);
- char mqname[ipc_names[mqueue].prefix_len + len];
-
- if (!check_path (mqname, mqueue, name, len))
- return (mqd_t) -1;
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return (mqd_t) -1;
-
- oflag &= (O_CREAT | O_EXCL | O_NONBLOCK);
- created = 0;
- nonblock = oflag & O_NONBLOCK;
- oflag &= ~O_NONBLOCK;
- mptr = (int8_t *) MAP_FAILED;
- mqinfo = NULL;
-
-again:
- if (oflag & O_CREAT)
- {
- va_start (ap, oflag); /* init ap to final named argument */
- mode = va_arg (ap, mode_t) & ~S_IXUSR;
- attr = va_arg (ap, struct mq_attr *);
- va_end (ap);
-
- /* Open and specify O_EXCL and user-execute */
- fd = open (mqname, oflag | O_EXCL | O_RDWR, mode | S_IXUSR);
- if (fd < 0)
- {
- if (errno == EEXIST && (oflag & O_EXCL) == 0)
- goto exists; /* already exists, OK */
- return (mqd_t) -1;
- }
- created = 1;
- /* First one to create the file initializes it */
- if (attr == NULL)
- attr = &defattr;
- else if (attr->mq_maxmsg <= 0 || attr->mq_msgsize <= 0)
- {
- set_errno (EINVAL);
- goto err;
- }
- /* Calculate and set the file size */
- msgsize = MSGSIZE (attr->mq_msgsize);
- filesize = sizeof (struct mq_hdr)
- + (attr->mq_maxmsg * (sizeof (struct msg_hdr) + msgsize));
- if (lseek64 (fd, filesize - 1, SEEK_SET) == -1)
- goto err;
- if (write (fd, "", 1) == -1)
- goto err;
-
- /* Memory map the file */
- mptr = (int8_t *) mmap64 (NULL, (size_t) filesize, PROT_READ | PROT_WRITE,
- MAP_SHARED, fd, 0);
- if (mptr == (int8_t *) MAP_FAILED)
- goto err;
-
- /* Allocate one mq_info{} for the queue */
- if (!(mqinfo = (struct mq_info *) malloc (sizeof (struct mq_info))))
- goto err;
- mqinfo->mqi_hdr = mqhdr = (struct mq_hdr *) mptr;
- mqinfo->mqi_magic = MQI_MAGIC;
- mqinfo->mqi_flags = nonblock;
-
- /* Initialize header at beginning of file */
- /* Create free list with all messages on it */
- mqhdr->mqh_attr.mq_flags = 0;
- mqhdr->mqh_attr.mq_maxmsg = attr->mq_maxmsg;
- mqhdr->mqh_attr.mq_msgsize = attr->mq_msgsize;
- mqhdr->mqh_attr.mq_curmsgs = 0;
- mqhdr->mqh_nwait = 0;
- mqhdr->mqh_pid = 0;
- if (!AllocateLocallyUniqueId (&luid))
- {
- __seterrno ();
- goto err;
- }
- __small_sprintf (mqhdr->mqh_uname, "%016X%08x%08x",
- hash_path_name (0,mqname),
- luid.HighPart, luid.LowPart);
- mqhdr->mqh_head = 0;
- index = sizeof (struct mq_hdr);
- mqhdr->mqh_free = index;
- for (i = 0; i < attr->mq_maxmsg - 1; i++)
- {
- msghdr = (struct msg_hdr *) &mptr[index];
- index += sizeof (struct msg_hdr) + msgsize;
- msghdr->msg_next = index;
- }
- msghdr = (struct msg_hdr *) &mptr[index];
- msghdr->msg_next = 0; /* end of free list */
-
- /* Initialize mutex & condition variable */
- i = ipc_mutex_init (&mqinfo->mqi_lock, mqhdr->mqh_uname);
- if (i != 0)
- goto pthreaderr;
-
- i = ipc_cond_init (&mqinfo->mqi_wait, mqhdr->mqh_uname);
- if (i != 0)
- goto pthreaderr;
-
- /* Initialization complete, turn off user-execute bit */
- if (fchmod (fd, mode) == -1)
- goto err;
- close (fd);
- return ((mqd_t) mqinfo);
- }
-
-exists:
- /* Open the file then memory map */
- if ((fd = open (mqname, O_RDWR)) < 0)
- {
- if (errno == ENOENT && (oflag & O_CREAT))
- goto again;
- goto err;
- }
- /* Make certain initialization is complete */
- for (i = 0; i < MAX_TRIES; i++)
- {
- if (stat64 (mqname, &statbuff) == -1)
- {
- if (errno == ENOENT && (oflag & O_CREAT))
- {
- close (fd);
- goto again;
- }
- goto err;
- }
- if ((statbuff.st_mode & S_IXUSR) == 0)
- break;
- sleep (1);
- }
- if (i == MAX_TRIES)
- {
- set_errno (ETIMEDOUT);
- goto err;
- }
-
- filesize = statbuff.st_size;
- mptr = (int8_t *) mmap64 (NULL, (size_t) filesize, PROT_READ | PROT_WRITE,
- MAP_SHARED, fd, 0);
- if (mptr == (int8_t *) MAP_FAILED)
- goto err;
- close (fd);
-
- /* Allocate one mq_info{} for each open */
- if (!(mqinfo = (struct mq_info *) malloc (sizeof (struct mq_info))))
- goto err;
- mqinfo->mqi_hdr = mqhdr = (struct mq_hdr *) mptr;
- mqinfo->mqi_magic = MQI_MAGIC;
- mqinfo->mqi_flags = nonblock;
-
- /* Initialize mutex & condition variable */
- i = ipc_mutex_init (&mqinfo->mqi_lock, mqhdr->mqh_uname);
- if (i != 0)
- goto pthreaderr;
-
- i = ipc_cond_init (&mqinfo->mqi_wait, mqhdr->mqh_uname);
- if (i != 0)
- goto pthreaderr;
-
- return (mqd_t) mqinfo;
-
-pthreaderr:
- errno = i;
-err:
- /* Don't let following function calls change errno */
- save_errno save;
-
- if (created)
- unlink (mqname);
- if (mptr != (int8_t *) MAP_FAILED)
- munmap((void *) mptr, (size_t) filesize);
- if (mqinfo)
- free (mqinfo);
- close (fd);
- return (mqd_t) -1;
-}
-
-extern "C" int
-mq_getattr (mqd_t mqd, struct mq_attr *mqstat)
-{
- int n;
- struct mq_hdr *mqhdr;
- struct mq_attr *attr;
- struct mq_info *mqinfo;
-
- myfault efault;
- if (efault.faulted (EBADF))
- return -1;
-
- mqinfo = (struct mq_info *) mqd;
- if (mqinfo->mqi_magic != MQI_MAGIC)
- {
- set_errno (EBADF);
- return -1;
- }
- mqhdr = mqinfo->mqi_hdr;
- attr = &mqhdr->mqh_attr;
- if ((n = ipc_mutex_lock (mqinfo->mqi_lock)) != 0)
- {
- errno = n;
- return -1;
- }
- mqstat->mq_flags = mqinfo->mqi_flags; /* per-open */
- mqstat->mq_maxmsg = attr->mq_maxmsg; /* remaining three per-queue */
- mqstat->mq_msgsize = attr->mq_msgsize;
- mqstat->mq_curmsgs = attr->mq_curmsgs;
-
- ipc_mutex_unlock (mqinfo->mqi_lock);
- return 0;
-}
-
-extern "C" int
-mq_setattr (mqd_t mqd, const struct mq_attr *mqstat, struct mq_attr *omqstat)
-{
- int n;
- struct mq_hdr *mqhdr;
- struct mq_attr *attr;
- struct mq_info *mqinfo;
-
- myfault efault;
- if (efault.faulted (EBADF))
- return -1;
-
- mqinfo = (struct mq_info *) mqd;
- if (mqinfo->mqi_magic != MQI_MAGIC)
- {
- set_errno (EBADF);
- return -1;
- }
- mqhdr = mqinfo->mqi_hdr;
- attr = &mqhdr->mqh_attr;
- if ((n = ipc_mutex_lock (mqinfo->mqi_lock)) != 0)
- {
- errno = n;
- return -1;
- }
-
- if (omqstat != NULL)
- {
- omqstat->mq_flags = mqinfo->mqi_flags; /* previous attributes */
- omqstat->mq_maxmsg = attr->mq_maxmsg;
- omqstat->mq_msgsize = attr->mq_msgsize;
- omqstat->mq_curmsgs = attr->mq_curmsgs; /* and current status */
- }
-
- if (mqstat->mq_flags & O_NONBLOCK)
- mqinfo->mqi_flags |= O_NONBLOCK;
- else
- mqinfo->mqi_flags &= ~O_NONBLOCK;
-
- ipc_mutex_unlock (mqinfo->mqi_lock);
- return 0;
-}
-
-extern "C" int
-mq_notify (mqd_t mqd, const struct sigevent *notification)
-{
- int n;
- pid_t pid;
- struct mq_hdr *mqhdr;
- struct mq_info *mqinfo;
-
- myfault efault;
- if (efault.faulted (EBADF))
- return -1;
-
- mqinfo = (struct mq_info *) mqd;
- if (mqinfo->mqi_magic != MQI_MAGIC)
- {
- set_errno (EBADF);
- return -1;
- }
- mqhdr = mqinfo->mqi_hdr;
- if ((n = ipc_mutex_lock (mqinfo->mqi_lock)) != 0)
- {
- errno = n;
- return -1;
- }
-
- pid = getpid ();
- if (!notification)
- {
- if (mqhdr->mqh_pid == pid)
- mqhdr->mqh_pid = 0; /* unregister calling process */
- }
- else
- {
- if (mqhdr->mqh_pid != 0)
- {
- if (kill (mqhdr->mqh_pid, 0) != -1 || errno != ESRCH)
- {
- set_errno (EBUSY);
- ipc_mutex_unlock (mqinfo->mqi_lock);
- return -1;
- }
- }
- mqhdr->mqh_pid = pid;
- mqhdr->mqh_event = *notification;
- }
- ipc_mutex_unlock (mqinfo->mqi_lock);
- return 0;
-}
-
-static int
-_mq_send (mqd_t mqd, const char *ptr, size_t len, unsigned int prio,
- const struct timespec *abstime)
-{
- int n;
- long index, freeindex;
- int8_t *mptr;
- struct sigevent *sigev;
- struct mq_hdr *mqhdr;
- struct mq_attr *attr;
- struct msg_hdr *msghdr, *nmsghdr, *pmsghdr;
- struct mq_info *mqinfo;
-
- myfault efault;
- if (efault.faulted (EBADF))
- return -1;
-
- mqinfo = (struct mq_info *) mqd;
- if (mqinfo->mqi_magic != MQI_MAGIC)
- {
- set_errno (EBADF);
- return -1;
- }
- if (prio > MQ_PRIO_MAX)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- mqhdr = mqinfo->mqi_hdr; /* struct pointer */
- mptr = (int8_t *) mqhdr; /* byte pointer */
- attr = &mqhdr->mqh_attr;
- if ((n = ipc_mutex_lock (mqinfo->mqi_lock)) != 0)
- {
- errno = n;
- return -1;
- }
-
- if (len > (size_t) attr->mq_msgsize)
- {
- set_errno (EMSGSIZE);
- goto err;
- }
- if (attr->mq_curmsgs == 0)
- {
- if (mqhdr->mqh_pid != 0 && mqhdr->mqh_nwait == 0)
- {
- sigev = &mqhdr->mqh_event;
- if (sigev->sigev_notify == SIGEV_SIGNAL)
- sigqueue (mqhdr->mqh_pid, sigev->sigev_signo, sigev->sigev_value);
- mqhdr->mqh_pid = 0; /* unregister */
- }
- }
- else if (attr->mq_curmsgs >= attr->mq_maxmsg)
- {
- /* Queue is full */
- if (mqinfo->mqi_flags & O_NONBLOCK)
- {
- set_errno (EAGAIN);
- goto err;
- }
- /* Wait for room for one message on the queue */
- while (attr->mq_curmsgs >= attr->mq_maxmsg)
- ipc_cond_timedwait (mqinfo->mqi_wait, mqinfo->mqi_lock, abstime);
- }
-
- /* nmsghdr will point to new message */
- if ((freeindex = mqhdr->mqh_free) == 0)
- api_fatal ("mq_send: curmsgs = %ld; free = 0", attr->mq_curmsgs);
-
- nmsghdr = (struct msg_hdr *) &mptr[freeindex];
- nmsghdr->msg_prio = prio;
- nmsghdr->msg_len = len;
- memcpy (nmsghdr + 1, ptr, len); /* copy message from caller */
- mqhdr->mqh_free = nmsghdr->msg_next; /* new freelist head */
-
- /* Find right place for message in linked list */
- index = mqhdr->mqh_head;
- pmsghdr = (struct msg_hdr *) &(mqhdr->mqh_head);
- while (index)
- {
- msghdr = (struct msg_hdr *) &mptr[index];
- if (prio > msghdr->msg_prio)
- {
- nmsghdr->msg_next = index;
- pmsghdr->msg_next = freeindex;
- break;
- }
- index = msghdr->msg_next;
- pmsghdr = msghdr;
- }
- if (index == 0)
- {
- /* Queue was empty or new goes at end of list */
- pmsghdr->msg_next = freeindex;
- nmsghdr->msg_next = 0;
- }
- /* Wake up anyone blocked in mq_receive waiting for a message */
- if (attr->mq_curmsgs == 0)
- ipc_cond_signal (mqinfo->mqi_wait);
- attr->mq_curmsgs++;
-
- ipc_mutex_unlock (mqinfo->mqi_lock);
- return 0;
-
-err:
- ipc_mutex_unlock (mqinfo->mqi_lock);
- return -1;
-}
-
-extern "C" int
-mq_send (mqd_t mqd, const char *ptr, size_t len, unsigned int prio)
-{
- return _mq_send (mqd, ptr, len, prio, NULL);
-}
-
-extern "C" int
-mq_timedsend (mqd_t mqd, const char *ptr, size_t len, unsigned int prio,
- const struct timespec *abstime)
-{
- return _mq_send (mqd, ptr, len, prio, abstime);
-}
-
-static ssize_t
-_mq_receive (mqd_t mqd, char *ptr, size_t maxlen, unsigned int *priop,
- const struct timespec *abstime)
-{
- int n;
- long index;
- int8_t *mptr;
- ssize_t len;
- struct mq_hdr *mqhdr;
- struct mq_attr *attr;
- struct msg_hdr *msghdr;
- struct mq_info *mqinfo;
-
- myfault efault;
- if (efault.faulted (EBADF))
- return -1;
-
- mqinfo = (struct mq_info *) mqd;
- if (mqinfo->mqi_magic != MQI_MAGIC)
- {
- set_errno (EBADF);
- return -1;
- }
- mqhdr = mqinfo->mqi_hdr; /* struct pointer */
- mptr = (int8_t *) mqhdr; /* byte pointer */
- attr = &mqhdr->mqh_attr;
- if ((n = ipc_mutex_lock (mqinfo->mqi_lock)) != 0)
- {
- errno = n;
- return -1;
- }
-
- if (maxlen < (size_t) attr->mq_msgsize)
- {
- set_errno (EMSGSIZE);
- goto err;
- }
- if (attr->mq_curmsgs == 0) /* queue is empty */
- {
- if (mqinfo->mqi_flags & O_NONBLOCK)
- {
- set_errno (EAGAIN);
- goto err;
- }
- /* Wait for a message to be placed onto queue */
- mqhdr->mqh_nwait++;
- while (attr->mq_curmsgs == 0)
- ipc_cond_timedwait (mqinfo->mqi_wait, mqinfo->mqi_lock, abstime);
- mqhdr->mqh_nwait--;
- }
-
- if ((index = mqhdr->mqh_head) == 0)
- api_fatal ("mq_receive: curmsgs = %ld; head = 0", attr->mq_curmsgs);
-
- msghdr = (struct msg_hdr *) &mptr[index];
- mqhdr->mqh_head = msghdr->msg_next; /* new head of list */
- len = msghdr->msg_len;
- memcpy(ptr, msghdr + 1, len); /* copy the message itself */
- if (priop != NULL)
- *priop = msghdr->msg_prio;
-
- /* Just-read message goes to front of free list */
- msghdr->msg_next = mqhdr->mqh_free;
- mqhdr->mqh_free = index;
-
- /* Wake up anyone blocked in mq_send waiting for room */
- if (attr->mq_curmsgs == attr->mq_maxmsg)
- ipc_cond_signal (mqinfo->mqi_wait);
- attr->mq_curmsgs--;
-
- ipc_mutex_unlock (mqinfo->mqi_lock);
- return len;
-
-err:
- ipc_mutex_unlock (mqinfo->mqi_lock);
- return -1;
-}
-
-extern "C" ssize_t
-mq_receive (mqd_t mqd, char *ptr, size_t maxlen, unsigned int *priop)
-{
- return _mq_receive (mqd, ptr, maxlen, priop, NULL);
-}
-
-extern "C" ssize_t
-mq_timedreceive (mqd_t mqd, char *ptr, size_t maxlen, unsigned int *priop,
- const struct timespec *abstime)
-{
- return _mq_receive (mqd, ptr, maxlen, priop, abstime);
-}
-
-extern "C" int
-mq_close (mqd_t mqd)
-{
- long msgsize, filesize;
- struct mq_hdr *mqhdr;
- struct mq_attr *attr;
- struct mq_info *mqinfo;
-
- myfault efault;
- if (efault.faulted (EBADF))
- return -1;
-
- mqinfo = (struct mq_info *) mqd;
- if (mqinfo->mqi_magic != MQI_MAGIC)
- {
- set_errno (EBADF);
- return -1;
- }
- mqhdr = mqinfo->mqi_hdr;
- attr = &mqhdr->mqh_attr;
-
- if (mq_notify (mqd, NULL)) /* unregister calling process */
- return -1;
-
- msgsize = MSGSIZE (attr->mq_msgsize);
- filesize = sizeof (struct mq_hdr)
- + (attr->mq_maxmsg * (sizeof (struct msg_hdr) + msgsize));
- if (munmap (mqinfo->mqi_hdr, filesize) == -1)
- return -1;
-
- mqinfo->mqi_magic = 0; /* just in case */
- ipc_cond_close (mqinfo->mqi_wait);
- ipc_mutex_close (mqinfo->mqi_lock);
- free (mqinfo);
- return 0;
-}
-
-extern "C" int
-mq_unlink (const char *name)
-{
- size_t len = strlen (name);
- char mqname[ipc_names[mqueue].prefix_len + len];
-
- if (!check_path (mqname, mqueue, name, len))
- return -1;
- if (unlink (mqname) == -1)
- return -1;
- return 0;
-}
-
-/* POSIX named semaphore implementation. Loosely based on Richard W. STEPHENS
- implementation as far as sem_open is concerned, but under the hood using
- the already existing semaphore class in thread.cc. Using a file backed
- solution allows to implement kernel persistent named semaphores. */
-
-struct sem_finfo
-{
- unsigned int value;
- unsigned long long hash;
- LUID luid;
-};
-
-extern "C" sem_t *
-sem_open (const char *name, int oflag, ...)
-{
- int i, fd, created;
- va_list ap;
- mode_t mode = 0;
- unsigned int value = 0;
- struct __stat64 statbuff;
- sem_t *sem = SEM_FAILED;
- sem_finfo sf;
- bool wasopen = false;
- ipc_flock file;
-
- size_t len = strlen (name);
- char semname[ipc_names[semaphore].prefix_len + len];
-
- if (!check_path (semname, semaphore, name, len))
- return SEM_FAILED;
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return SEM_FAILED;
-
- created = 0;
- oflag &= (O_CREAT | O_EXCL);
-
-again:
- if (oflag & O_CREAT)
- {
- va_start (ap, oflag); /* init ap to final named argument */
- mode = va_arg (ap, mode_t) & ~S_IXUSR;
- value = va_arg (ap, unsigned int);
- va_end (ap);
-
- /* Open and specify O_EXCL and user-execute */
- fd = open (semname, oflag | O_EXCL | O_RDWR, mode | S_IXUSR);
- if (fd < 0)
- {
- if (errno == EEXIST && (oflag & O_EXCL) == 0)
- goto exists; /* already exists, OK */
- return SEM_FAILED;
- }
- created = 1;
- /* First one to create the file initializes it. */
- if (!AllocateLocallyUniqueId (&sf.luid))
- {
- __seterrno ();
- goto err;
- }
- sf.value = value;
- sf.hash = hash_path_name (0, semname);
- if (write (fd, &sf, sizeof sf) != sizeof sf)
- goto err;
- sem = semaphore::open (sf.hash, sf.luid, fd, oflag, mode, value, wasopen);
- if (sem == SEM_FAILED)
- goto err;
- /* Initialization complete, turn off user-execute bit */
- if (fchmod (fd, mode) == -1)
- goto err;
- /* Don't close (fd); */
- return sem;
- }
-
-exists:
- /* Open the file and fetch the semaphore name. */
- if ((fd = open (semname, O_RDWR)) < 0)
- {
- if (errno == ENOENT && (oflag & O_CREAT))
- goto again;
- goto err;
- }
- /* Make certain initialization is complete */
- for (i = 0; i < MAX_TRIES; i++)
- {
- if (stat64 (semname, &statbuff) == -1)
- {
- if (errno == ENOENT && (oflag & O_CREAT))
- {
- close (fd);
- goto again;
- }
- goto err;
- }
- if ((statbuff.st_mode & S_IXUSR) == 0)
- break;
- sleep (1);
- }
- if (i == MAX_TRIES)
- {
- set_errno (ETIMEDOUT);
- goto err;
- }
- if (file.lock (fd, sizeof sf))
- goto err;
- if (read (fd, &sf, sizeof sf) != sizeof sf)
- goto err;
- sem = semaphore::open (sf.hash, sf.luid, fd, oflag, mode, sf.value, wasopen);
- file.unlock (fd);
- if (sem == SEM_FAILED)
- goto err;
- /* If wasopen is set, the semaphore was already opened and we already have
- an open file descriptor pointing to the file. This means, we have to
- close the file descriptor created in this call. It won't be stored
- anywhere anyway. */
- if (wasopen)
- close (fd);
- return sem;
-
-err:
- /* Don't let following function calls change errno */
- save_errno save;
-
- file.unlock (fd);
- if (created)
- unlink (semname);
- if (sem != SEM_FAILED)
- semaphore::close (sem);
- close (fd);
- return SEM_FAILED;
-}
-
-int
-_sem_close (sem_t *sem, bool do_close)
-{
- sem_finfo sf;
- int fd, ret = -1;
- ipc_flock file;
-
- if (semaphore::getinternal (sem, &fd, &sf.hash, &sf.luid, &sf.value) == -1)
- return -1;
- if (!file.lock (fd, sizeof sf)
- && lseek64 (fd, 0LL, SEEK_SET) != (_off64_t) -1
- && write (fd, &sf, sizeof sf) == sizeof sf)
- ret = do_close ? semaphore::close (sem) : 0;
-
- /* Don't let following function calls change errno */
- save_errno save;
- file.unlock (fd);
- close (fd);
-
- return ret;
-}
-
-extern "C" int
-sem_close (sem_t *sem)
-{
- return _sem_close (sem, true);
-}
-
-extern "C" int
-sem_unlink (const char *name)
-{
- size_t len = strlen (name);
- char semname[ipc_names[semaphore].prefix_len + len];
-
- if (!check_path (semname, semaphore, name, len))
- return -1;
- if (unlink (semname) == -1)
- return -1;
- return 0;
-}
diff --git a/winsup/cygwin/profil.c b/winsup/cygwin/profil.c
deleted file mode 100644
index cbfffc1..0000000
--- a/winsup/cygwin/profil.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/* profil.c -- win32 profil.c equivalent
-
- Copyright 1998, 1999, 2000, 2001 Red Hat, Inc.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include <windows.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <errno.h>
-#include <math.h>
-
-#include <profil.h>
-
-#define SLEEPTIME (1000 / PROF_HZ)
-
-/* global profinfo for profil() call */
-static struct profinfo prof;
-
-/* Get the pc for thread THR */
-
-static u_long
-get_thrpc (HANDLE thr)
-{
- CONTEXT ctx;
- u_long pc;
- int res;
-
- res = SuspendThread (thr);
- if (res == -1)
- return (u_long) - 1;
- ctx.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER;
- pc = (u_long) - 1;
- if (GetThreadContext (thr, &ctx))
- pc = ctx.Eip;
- ResumeThread (thr);
- return pc;
-}
-
-/* Display cell of profile buffer */
-#if 0
-static void
-print_prof (struct profinfo *p)
-{
- printf ("profthr %x\ttarget thr %x\n", p->profthr, p->targthr);
- printf ("pc: %x - %x\n", p->lowpc, p->highpc);
- printf ("scale: %x\n", p->scale);
- return;
-}
-#endif
-
-/* Everytime we wake up use the main thread pc to hash into the cell in the
- profile buffer ARG. */
-
-static DWORD CALLBACK
-profthr_func (LPVOID arg)
-{
- struct profinfo *p = (struct profinfo *) arg;
- u_long pc, idx;
-
- SetThreadPriority(p->profthr, THREAD_PRIORITY_TIME_CRITICAL);
-
- for (;;)
- {
- pc = (u_long) get_thrpc (p->targthr);
- if (pc >= p->lowpc && pc < p->highpc)
- {
- idx = PROFIDX (pc, p->lowpc, p->scale);
- p->counter[idx]++;
- }
-#if 0
- print_prof (p);
-#endif
- Sleep (SLEEPTIME);
- }
- return 0;
-}
-
-/* Stop profiling to the profiling buffer pointed to by P. */
-
-static int
-profile_off (struct profinfo *p)
-{
- if (p->profthr)
- {
- TerminateThread (p->profthr, 0);
- CloseHandle (p->profthr);
- }
- if (p->targthr)
- CloseHandle (p->targthr);
- return 0;
-}
-
-/* Create a timer thread and pass it a pointer P to the profiling buffer. */
-
-static int
-profile_on (struct profinfo *p)
-{
- DWORD thrid;
-
- /* get handle for this thread */
- if (!DuplicateHandle (GetCurrentProcess (), GetCurrentThread (),
- GetCurrentProcess (), &p->targthr, 0, FALSE,
- DUPLICATE_SAME_ACCESS))
- {
- errno = ESRCH;
- return -1;
- }
-
- p->profthr = CreateThread (0, 0, profthr_func, (void *) p, 0, &thrid);
- if (!p->profthr)
- {
- CloseHandle (p->targthr);
- p->targthr = 0;
- errno = EAGAIN;
- return -1;
- }
- return 0;
-}
-
-/*
- * start or stop profiling
- *
- * profiling goes into the SAMPLES buffer of size SIZE (which is treated
- * as an array of u_shorts of size size/2)
- *
- * each bin represents a range of pc addresses from OFFSET. The number
- * of pc addresses in a bin depends on SCALE. (A scale of 65536 maps
- * each bin to two addresses, A scale of 32768 maps each bin to 4 addresses,
- * a scale of 1 maps each bin to 128k addreses). Scale may be 1 - 65536,
- * or zero to turn off profiling
- */
-int
-profile_ctl (struct profinfo * p, char *samples, size_t size,
- u_long offset, u_int scale)
-{
- u_long maxbin;
-
- if (scale > 65536)
- {
- errno = EINVAL;
- return -1;
- }
-
- profile_off (p);
- if (scale)
- {
- memset (samples, 0, size);
- memset (p, 0, sizeof *p);
- maxbin = size >> 1;
- prof.counter = (u_short *) samples;
- prof.lowpc = offset;
- prof.highpc = PROFADDR (maxbin, offset, scale);
- prof.scale = scale;
-
- return profile_on (p);
- }
- return 0;
-}
-
-/* Equivalent to unix profil()
- Every SLEEPTIME interval, the user's program counter (PC) is examined:
- offset is subtracted and the result is multiplied by scale.
- The word pointed to by this address is incremented. Buf is unused. */
-
-int
-profil (char *samples, size_t size, u_long offset, u_int scale)
-{
- return profile_ctl (&prof, samples, size, offset, scale);
-}
-
diff --git a/winsup/cygwin/profil.h b/winsup/cygwin/profil.h
deleted file mode 100644
index 7ec4dfa..0000000
--- a/winsup/cygwin/profil.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* profil.h: gprof profiling header file
-
- Copyright 1998, 1999, 2000, 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* profiling frequency. (No larger than 1000) */
-#define PROF_HZ 100
-
-/* convert an addr to an index */
-#define PROFIDX(pc, base, scale) \
- ({ \
- size_t i = (pc - base) / 2; \
- if (sizeof (unsigned long long int) > sizeof (size_t)) \
- i = (unsigned long long int) i * scale / 65536; \
- else \
- i = i / 65536 * scale + i % 65536 * scale / 65536; \
- i; \
- })
-
-/* convert an index into an address */
-#define PROFADDR(idx, base, scale) \
- ((base) + ((((unsigned long long)(idx) << 16) / (scale)) << 1))
-
-/* convert a bin size into a scale */
-#define PROFSCALE(range, bins) (((bins) << 16) / ((range) >> 1))
-
-typedef void *_WINHANDLE;
-
-struct profinfo {
- _WINHANDLE targthr; /* thread to profile */
- _WINHANDLE profthr; /* profiling thread */
- u_short *counter; /* profiling counters */
- u_long lowpc, highpc; /* range to be profiled */
- u_int scale; /* scale value of bins */
-};
-
-int profile_ctl(struct profinfo *, char *, size_t, u_long, u_int);
-int profil(char *, size_t, u_long, u_int);
-
diff --git a/winsup/cygwin/pseudo-reloc.cc b/winsup/cygwin/pseudo-reloc.cc
deleted file mode 100644
index 5760a69..0000000
--- a/winsup/cygwin/pseudo-reloc.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-/* pseudo-reloc.c
-
- Written by Egor Duda <deo@logos-m.ru>
- THIS SOFTWARE IS NOT COPYRIGHTED
-
- This source code is offered for use in the public domain. You may
- use, modify or distribute it freely.
-
- This code is distributed in the hope that it will be useful but
- WITHOUT ANY WARRANTY. ALL WARRENTIES, EXPRESS OR IMPLIED ARE HEREBY
- DISCLAMED. This includes but is not limited to warrenties of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-*/
-
-#include <windows.h>
-
-extern char __RUNTIME_PSEUDO_RELOC_LIST__;
-extern char __RUNTIME_PSEUDO_RELOC_LIST_END__;
-extern char _image_base__;
-
-typedef struct
- {
- DWORD addend;
- DWORD target;
- }
-runtime_pseudo_reloc;
-
-void
-do_pseudo_reloc (void* start, void* end, void* base)
-{
- DWORD reloc_target;
- runtime_pseudo_reloc* r;
- for (r = (runtime_pseudo_reloc*) start; r < (runtime_pseudo_reloc*) end; r++)
- {
- reloc_target = (DWORD) base + r->target;
- *((DWORD*) reloc_target) += r->addend;
- }
-}
-
-void
-_pei386_runtime_relocator ()
-{
- do_pseudo_reloc (&__RUNTIME_PSEUDO_RELOC_LIST__,
- &__RUNTIME_PSEUDO_RELOC_LIST_END__,
- &_image_base__);
-}
diff --git a/winsup/cygwin/pthread.cc b/winsup/cygwin/pthread.cc
deleted file mode 100644
index b110b83..0000000
--- a/winsup/cygwin/pthread.cc
+++ /dev/null
@@ -1,189 +0,0 @@
-/* pthread.cc: posix pthread interface for Cygwin
-
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007 Red Hat, Inc.
-
- Originally written by Marco Fuykschot <marco@ddi.nl>
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include "winsup.h"
-#include "thread.h"
-
-extern "C"
-{
-/* ThreadCreation */
-int
-pthread_create (pthread_t *thread, const pthread_attr_t *attr,
- void *(*start_routine) (void *), void *arg)
-{
- return pthread::create (thread, attr, start_routine, arg);
-}
-
-int
-pthread_once (pthread_once_t * once_control, void (*init_routine) (void))
-{
- return pthread::once (once_control, init_routine);
-}
-
-int
-pthread_atfork (void (*prepare)(void), void (*parent)(void), void (*child)(void))
-{
- return pthread::atfork (prepare, parent, child);
-}
-
-/* Thread Exit */
-void
-pthread_exit (void *value_ptr)
-{
- return pthread::self ()->exit (value_ptr);
-}
-
-int
-pthread_join (pthread_t thread, void **return_val)
-{
- return pthread::join (&thread, (void **) return_val);
-}
-
-int
-pthread_detach (pthread_t thread)
-{
- return pthread::detach (&thread);
-}
-
-
-/* This isn't a posix call... should we keep it? */
-int
-pthread_suspend (pthread_t thread)
-{
- return pthread::suspend (&thread);
-}
-
-/* same */
-int
-pthread_continue (pthread_t thread)
-{
- return pthread::resume (&thread);
-}
-
-unsigned long
-pthread_getsequence_np (pthread_t * thread)
-{
- if (!pthread::is_good_object (thread))
- return EINVAL;
- return (*thread)->getsequence_np ();
-}
-
-/* ID */
-
-pthread_t pthread_self ()
-{
- return pthread::self ();
-}
-
-/* Mutexes */
-int
-pthread_mutex_init (pthread_mutex_t * mutex, const pthread_mutexattr_t * attr)
-{
- return pthread_mutex::init (mutex, attr);
-}
-
-/* Synchronisation */
-int
-pthread_cond_init (pthread_cond_t * cond, const pthread_condattr_t * attr)
-{
- return pthread_cond::init (cond, attr);
-}
-
-/* RW Locks */
-int
-pthread_rwlock_init (pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr)
-{
- return pthread_rwlock::init (rwlock, attr);
-}
-
-/* Cancelability */
-
-int
-pthread_cancel (pthread_t thread)
-{
- return pthread::cancel (thread);
-}
-
-int
-pthread_setcancelstate (int state, int *oldstate)
-{
- return pthread::self ()->setcancelstate (state, oldstate);
-}
-
-int
-pthread_setcanceltype (int type, int *oldtype)
-{
- return pthread::self ()->setcanceltype (type, oldtype);
-}
-
-void
-pthread_testcancel ()
-{
- pthread::self ()->testcancel ();
-}
-
-void
-_pthread_cleanup_push (__pthread_cleanup_handler *handler)
-{
- pthread::self ()->push_cleanup_handler (handler);
-}
-
-void
-_pthread_cleanup_pop (int execute)
-{
- pthread::self ()->pop_cleanup_handler (execute);
-}
-
-/* Semaphores */
-int
-sem_init (sem_t * sem, int pshared, unsigned int value)
-{
- return semaphore::init (sem, pshared, value);
-}
-
-int
-sem_destroy (sem_t * sem)
-{
- return semaphore::destroy (sem);
-}
-
-int
-sem_wait (sem_t * sem)
-{
- return semaphore::wait (sem);
-}
-
-int
-sem_trywait (sem_t * sem)
-{
- return semaphore::trywait (sem);
-}
-
-int
-sem_timedwait (sem_t * sem, const struct timespec *abstime)
-{
- return semaphore::timedwait (sem, abstime);
-}
-
-int
-sem_post (sem_t * sem)
-{
- return semaphore::post (sem);
-}
-
-int
-sem_getvalue (sem_t * sem, int *sval)
-{
- return semaphore::getvalue (sem, sval);
-}
-
-}
diff --git a/winsup/cygwin/pwdgrp.h b/winsup/cygwin/pwdgrp.h
deleted file mode 100644
index 00ef2e8..0000000
--- a/winsup/cygwin/pwdgrp.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* pwdgrp.h
-
- Copyright 2001, 2002, 2003 Red Hat inc.
-
- Stuff common to pwd and grp handling.
-
-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. */
-
-/* These functions are needed to allow searching and walking through
- the passwd and group lists */
-extern struct passwd *internal_getpwsid (cygpsid &);
-extern struct passwd *internal_getpwnam (const char *, bool = FALSE);
-extern struct passwd *internal_getpwuid (__uid32_t, bool = FALSE);
-extern struct __group32 *internal_getgrsid (cygpsid &);
-extern struct __group32 *internal_getgrgid (__gid32_t gid, bool = FALSE);
-extern struct __group32 *internal_getgrnam (const char *, bool = FALSE);
-extern struct __group32 *internal_getgrent (int);
-int internal_getgroups (int, __gid32_t *, cygpsid * = NULL);
-
-#include "sync.h"
-#include "cygtls.h"
-class pwdgrp
-{
- unsigned pwdgrp_buf_elem_size;
- union
- {
- passwd **passwd_buf;
- __group32 **group_buf;
- void **pwdgrp_buf;
- };
- void (pwdgrp::*read) ();
- bool (pwdgrp::*parse) ();
- int etc_ix;
- UNICODE_STRING upath;
- PWCHAR path;
- char *buf, *lptr;
- int max_lines;
- bool initialized;
- static muto pglock;
-
- bool parse_passwd ();
- bool parse_group ();
- void read_passwd ();
- void read_group ();
- char *add_line (char *);
- char *raw_ptr () const {return lptr;}
- char *next_str (char);
- bool next_num (unsigned long&);
- bool next_num (unsigned int& i)
- {
- unsigned long x;
- bool res = next_num (x);
- i = (unsigned int) x;
- return res;
- }
- inline bool next_num (int& i)
- {
- unsigned long x;
- bool res = next_num (x);
- i = (int) x;
- return res;
- }
-
-public:
- int curr_lines;
-
- void load (const wchar_t *);
- inline void refresh (bool check)
- {
- if (!check && initialized)
- return;
- if (pglock.acquire () == 1 &&
- (!initialized || (check && etc::file_changed (etc_ix))))
- (this->*read) ();
- pglock.release ();
- }
-
- pwdgrp (passwd *&pbuf);
- pwdgrp (__group32 *&gbuf);
-};
diff --git a/winsup/cygwin/random.cc b/winsup/cygwin/random.cc
deleted file mode 100644
index fe1ac08..0000000
--- a/winsup/cygwin/random.cc
+++ /dev/null
@@ -1,504 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-extern "C" {
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)random.c 8.2 (Berkeley) 5/19/95";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdlib/random.c,v 1.25 2007/01/09 00:28:10 imp Exp $");
-
-#include <sys/time.h> /* for srandomdev() */
-#include <fcntl.h> /* for srandomdev() */
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h> /* for srandomdev() */
-
-/*
- * random.c:
- *
- * An improved random number generation package. In addition to the standard
- * rand()/srand() like interface, this package also has a special state info
- * interface. The initstate() routine is called with a seed, an array of
- * bytes, and a count of how many bytes are being passed in; this array is
- * then initialized to contain information for random number generation with
- * that much state information. Good sizes for the amount of state
- * information are 32, 64, 128, and 256 bytes. The state can be switched by
- * calling the setstate() routine with the same array as was initiallized
- * with initstate(). By default, the package runs with 128 bytes of state
- * information and generates far better random numbers than a linear
- * congruential generator. If the amount of state information is less than
- * 32 bytes, a simple linear congruential R.N.G. is used.
- *
- * Internally, the state information is treated as an array of uint32_t's; the
- * zeroeth element of the array is the type of R.N.G. being used (small
- * integer); the remainder of the array is the state information for the
- * R.N.G. Thus, 32 bytes of state information will give 7 ints worth of
- * state information, which will allow a degree seven polynomial. (Note:
- * the zeroeth word of state information also has some other information
- * stored in it -- see setstate() for details).
- *
- * The random number generation technique is a linear feedback shift register
- * approach, employing trinomials (since there are fewer terms to sum up that
- * way). In this approach, the least significant bit of all the numbers in
- * the state table will act as a linear feedback shift register, and will
- * have period 2^deg - 1 (where deg is the degree of the polynomial being
- * used, assuming that the polynomial is irreducible and primitive). The
- * higher order bits will have longer periods, since their values are also
- * influenced by pseudo-random carries out of the lower bits. The total
- * period of the generator is approximately deg*(2**deg - 1); thus doubling
- * the amount of state information has a vast influence on the period of the
- * generator. Note: the deg*(2**deg - 1) is an approximation only good for
- * large deg, when the period of the shift is the dominant factor.
- * With deg equal to seven, the period is actually much longer than the
- * 7*(2**7 - 1) predicted by this formula.
- *
- * Modified 28 December 1994 by Jacob S. Rosenberg.
- * The following changes have been made:
- * All references to the type u_int have been changed to unsigned long.
- * All references to type int have been changed to type long. Other
- * cleanups have been made as well. A warning for both initstate and
- * setstate has been inserted to the effect that on Sparc platforms
- * the 'arg_state' variable must be forced to begin on word boundaries.
- * This can be easily done by casting a long integer array to char *.
- * The overall logic has been left STRICTLY alone. This software was
- * tested on both a VAX and Sun SpacsStation with exactly the same
- * results. The new version and the original give IDENTICAL results.
- * The new version is somewhat faster than the original. As the
- * documentation says: "By default, the package runs with 128 bytes of
- * state information and generates far better random numbers than a linear
- * congruential generator. If the amount of state information is less than
- * 32 bytes, a simple linear congruential R.N.G. is used." For a buffer of
- * 128 bytes, this new version runs about 19 percent faster and for a 16
- * byte buffer it is about 5 percent faster.
- */
-
-/*
- * For each of the currently supported random number generators, we have a
- * break value on the amount of state information (you need at least this
- * many bytes of state info to support this random number generator), a degree
- * for the polynomial (actually a trinomial) that the R.N.G. is based on, and
- * the separation between the two lower order coefficients of the trinomial.
- */
-#define TYPE_0 0 /* linear congruential */
-#define BREAK_0 8
-#define DEG_0 0
-#define SEP_0 0
-
-#define TYPE_1 1 /* x**7 + x**3 + 1 */
-#define BREAK_1 32
-#define DEG_1 7
-#define SEP_1 3
-
-#define TYPE_2 2 /* x**15 + x + 1 */
-#define BREAK_2 64
-#define DEG_2 15
-#define SEP_2 1
-
-#define TYPE_3 3 /* x**31 + x**3 + 1 */
-#define BREAK_3 128
-#define DEG_3 31
-#define SEP_3 3
-
-#define TYPE_4 4 /* x**63 + x + 1 */
-#define BREAK_4 256
-#define DEG_4 63
-#define SEP_4 1
-
-/*
- * Array versions of the above information to make code run faster --
- * relies on fact that TYPE_i == i.
- */
-#define MAX_TYPES 5 /* max number of types above */
-
-#ifdef USE_WEAK_SEEDING
-#define NSHUFF 0
-#else /* !USE_WEAK_SEEDING */
-#define NSHUFF 50 /* to drop some "seed -> 1st value" linearity */
-#endif /* !USE_WEAK_SEEDING */
-
-static const int degrees[MAX_TYPES] = { DEG_0, DEG_1, DEG_2, DEG_3, DEG_4 };
-static const int seps [MAX_TYPES] = { SEP_0, SEP_1, SEP_2, SEP_3, SEP_4 };
-
-/*
- * Initially, everything is set up as if from:
- *
- * initstate(1, randtbl, 128);
- *
- * Note that this initialization takes advantage of the fact that srandom()
- * advances the front and rear pointers 10*rand_deg times, and hence the
- * rear pointer which starts at 0 will also end up at zero; thus the zeroeth
- * element of the state information, which contains info about the current
- * position of the rear pointer is just
- *
- * MAX_TYPES * (rptr - state) + TYPE_3 == TYPE_3.
- */
-
-static uint32_t randtbl[DEG_3 + 1] = {
- TYPE_3,
-#ifdef USE_WEAK_SEEDING
-/* Historic implementation compatibility */
-/* The random sequences do not vary much with the seed */
- 0x9a319039, 0x32d9c024, 0x9b663182, 0x5da1f342, 0xde3b81e0, 0xdf0a6fb5,
- 0xf103bc02, 0x48f340fb, 0x7449e56b, 0xbeb1dbb0, 0xab5c5918, 0x946554fd,
- 0x8c2e680f, 0xeb3d799f, 0xb11ee0b7, 0x2d436b86, 0xda672e2a, 0x1588ca88,
- 0xe369735d, 0x904f35f7, 0xd7158fd6, 0x6fa6f051, 0x616e6b96, 0xac94efdc,
- 0x36413f93, 0xc622c298, 0xf5a42ab8, 0x8a88d77b, 0xf5ad9d0e, 0x8999220b,
- 0x27fb47b9,
-#else /* !USE_WEAK_SEEDING */
- 0x991539b1, 0x16a5bce3, 0x6774a4cd, 0x3e01511e, 0x4e508aaa, 0x61048c05,
- 0xf5500617, 0x846b7115, 0x6a19892c, 0x896a97af, 0xdb48f936, 0x14898454,
- 0x37ffd106, 0xb58bff9c, 0x59e17104, 0xcf918a49, 0x09378c83, 0x52c7a471,
- 0x8d293ea9, 0x1f4fc301, 0xc3db71be, 0x39b44e1c, 0xf8a44ef9, 0x4c8b80b1,
- 0x19edc328, 0x87bf4bdd, 0xc9b240e5, 0xe9ee4b1b, 0x4382aee7, 0x535b6b41,
- 0xf3bec5da
-#endif /* !USE_WEAK_SEEDING */
-};
-
-/*
- * fptr and rptr are two pointers into the state info, a front and a rear
- * pointer. These two pointers are always rand_sep places aparts, as they
- * cycle cyclically through the state information. (Yes, this does mean we
- * could get away with just one pointer, but the code for random() is more
- * efficient this way). The pointers are left positioned as they would be
- * from the call
- *
- * initstate(1, randtbl, 128);
- *
- * (The position of the rear pointer, rptr, is really 0 (as explained above
- * in the initialization of randtbl) because the state table pointer is set
- * to point to randtbl[1] (as explained below).
- */
-static uint32_t *fptr = &randtbl[SEP_3 + 1];
-static uint32_t *rptr = &randtbl[1];
-
-/*
- * The following things are the pointer to the state information table, the
- * type of the current generator, the degree of the current polynomial being
- * used, and the separation between the two pointers. Note that for efficiency
- * of random(), we remember the first location of the state information, not
- * the zeroeth. Hence it is valid to access state[-1], which is used to
- * store the type of the R.N.G. Also, we remember the last location, since
- * this is more efficient than indexing every time to find the address of
- * the last element to see if the front and rear pointers have wrapped.
- */
-static uint32_t *state = &randtbl[1];
-static int rand_type = TYPE_3;
-static int rand_deg = DEG_3;
-static int rand_sep = SEP_3;
-static uint32_t *end_ptr = &randtbl[DEG_3 + 1];
-
-static inline uint32_t good_rand (int32_t x)
-{
-#ifdef USE_WEAK_SEEDING
-/*
- * Historic implementation compatibility.
- * The random sequences do not vary much with the seed,
- * even with overflowing.
- */
- return (1103515245 * x + 12345);
-#else /* !USE_WEAK_SEEDING */
-/*
- * Compute x = (7^5 * x) mod (2^31 - 1)
- * wihout overflowing 31 bits:
- * (2^31 - 1) = 127773 * (7^5) + 2836
- * From "Random number generators: good ones are hard to find",
- * Park and Miller, Communications of the ACM, vol. 31, no. 10,
- * October 1988, p. 1195.
- */
- int32_t hi, lo;
-
- /* Can't be initialized with 0, so use another value. */
- if (x == 0)
- x = 123459876;
- hi = x / 127773;
- lo = x % 127773;
- x = 16807 * lo - 2836 * hi;
- if (x < 0)
- x += 0x7fffffff;
- return (x);
-#endif /* !USE_WEAK_SEEDING */
-}
-
-/*
- * srandom:
- *
- * Initialize the random number generator based on the given seed. If the
- * type is the trivial no-state-information type, just remember the seed.
- * Otherwise, initializes state[] based on the given "seed" via a linear
- * congruential generator. Then, the pointers are set to known locations
- * that are exactly rand_sep places apart. Lastly, it cycles the state
- * information a given number of times to get rid of any initial dependencies
- * introduced by the L.C.R.N.G. Note that the initialization of randtbl[]
- * for default usage relies on values produced by this routine.
- */
-void
-srandom(unsigned x)
-{
- int i, lim;
-
- state[0] = (uint32_t)x;
- if (rand_type == TYPE_0)
- lim = NSHUFF;
- else {
- for (i = 1; i < rand_deg; i++)
- state[i] = good_rand(state[i - 1]);
- fptr = &state[rand_sep];
- rptr = &state[0];
- lim = 10 * rand_deg;
- }
- for (i = 0; i < lim; i++)
- (void)random();
-}
-
-/* Avoid a compiler warning when we really want to get at the junk in
- an uninitialized variable. */
-static unsigned long
-dummy (unsigned volatile long *x)
-{
- return *x;
-}
-
-/*
- * srandomdev:
- *
- * Many programs choose the seed value in a totally predictable manner.
- * This often causes problems. We seed the generator using the much more
- * secure random(4) interface. Note that this particular seeding
- * procedure can generate states which are impossible to reproduce by
- * calling srandom() with any value, since the succeeding terms in the
- * state buffer are no longer derived from the LC algorithm applied to
- * a fixed seed.
- */
-void
-srandomdev()
-{
- int fd, done;
- size_t len;
-
- if (rand_type == TYPE_0)
- len = sizeof state[0];
- else
- len = rand_deg * sizeof state[0];
-
- done = 0;
- fd = open("/dev/random", O_RDONLY, 0);
- if (fd >= 0) {
- if (read(fd, (void *) state, len) == (ssize_t) len)
- done = 1;
- close(fd);
- }
-
- if (!done) {
- struct timeval tv;
- unsigned long junk;
-
- gettimeofday(&tv, NULL);
- srandom((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec ^ dummy(&junk));
- return;
- }
-
- if (rand_type != TYPE_0) {
- fptr = &state[rand_sep];
- rptr = &state[0];
- }
-}
-
-/*
- * initstate:
- *
- * Initialize the state information in the given array of n bytes for future
- * random number generation. Based on the number of bytes we are given, and
- * the break values for the different R.N.G.'s, we choose the best (largest)
- * one we can and set things up for it. srandom() is then called to
- * initialize the state information.
- *
- * Note that on return from srandom(), we set state[-1] to be the type
- * multiplexed with the current value of the rear pointer; this is so
- * successive calls to initstate() won't lose this information and will be
- * able to restart with setstate().
- *
- * Note: the first thing we do is save the current state, if any, just like
- * setstate() so that it doesn't matter when initstate is called.
- *
- * Returns a pointer to the old state.
- *
- * Note: The Sparc platform requires that arg_state begin on an int
- * word boundary; otherwise a bus error will occur. Even so, lint will
- * complain about mis-alignment, but you should disregard these messages.
- */
-char *
-initstate(unsigned seed, /* seed for R.N.G. */
- char *arg_state, /* pointer to state array */
- size_t n) /* # bytes of state info */
-{
- char *ostate = (char *)(&state[-1]);
- uint32_t *int_arg_state = (uint32_t *)arg_state;
-
- if (rand_type == TYPE_0)
- state[-1] = rand_type;
- else
- state[-1] = MAX_TYPES * (rptr - state) + rand_type;
- if (n < BREAK_0) {
- (void)fprintf(stderr,
- "random: not enough state (%lu bytes); ignored.\n",
- (unsigned long) n);
- return(0);
- }
- if (n < BREAK_1) {
- rand_type = TYPE_0;
- rand_deg = DEG_0;
- rand_sep = SEP_0;
- } else if (n < BREAK_2) {
- rand_type = TYPE_1;
- rand_deg = DEG_1;
- rand_sep = SEP_1;
- } else if (n < BREAK_3) {
- rand_type = TYPE_2;
- rand_deg = DEG_2;
- rand_sep = SEP_2;
- } else if (n < BREAK_4) {
- rand_type = TYPE_3;
- rand_deg = DEG_3;
- rand_sep = SEP_3;
- } else {
- rand_type = TYPE_4;
- rand_deg = DEG_4;
- rand_sep = SEP_4;
- }
- state = int_arg_state + 1; /* first location */
- end_ptr = &state[rand_deg]; /* must set end_ptr before srandom */
- srandom(seed);
- if (rand_type == TYPE_0)
- int_arg_state[0] = rand_type;
- else
- int_arg_state[0] = MAX_TYPES * (rptr - state) + rand_type;
- return(ostate);
-}
-
-/*
- * setstate:
- *
- * Restore the state from the given state array.
- *
- * Note: it is important that we also remember the locations of the pointers
- * in the current state information, and restore the locations of the pointers
- * from the old state information. This is done by multiplexing the pointer
- * location into the zeroeth word of the state information.
- *
- * Note that due to the order in which things are done, it is OK to call
- * setstate() with the same state as the current state.
- *
- * Returns a pointer to the old state information.
- *
- * Note: The Sparc platform requires that arg_state begin on an int
- * word boundary; otherwise a bus error will occur. Even so, lint will
- * complain about mis-alignment, but you should disregard these messages.
- */
-char *
-setstate(const char *arg_state /* pointer to state array */)
-{
- uint32_t *new_state = (uint32_t *)arg_state;
- uint32_t type = new_state[0] % MAX_TYPES;
- uint32_t rear = new_state[0] / MAX_TYPES;
- char *ostate = (char *)(&state[-1]);
-
- if (rand_type == TYPE_0)
- state[-1] = rand_type;
- else
- state[-1] = MAX_TYPES * (rptr - state) + rand_type;
- switch(type) {
- case TYPE_0:
- case TYPE_1:
- case TYPE_2:
- case TYPE_3:
- case TYPE_4:
- rand_type = type;
- rand_deg = degrees[type];
- rand_sep = seps[type];
- break;
- default:
- (void)fprintf(stderr,
- "random: state info corrupted; not changed.\n");
- }
- state = new_state + 1;
- if (rand_type != TYPE_0) {
- rptr = &state[rear];
- fptr = &state[(rear + rand_sep) % rand_deg];
- }
- end_ptr = &state[rand_deg]; /* set end_ptr too */
- return(ostate);
-}
-
-/*
- * random:
- *
- * If we are using the trivial TYPE_0 R.N.G., just do the old linear
- * congruential bit. Otherwise, we do our fancy trinomial stuff, which is
- * the same in all the other cases due to all the global variables that have
- * been set up. The basic operation is to add the number at the rear pointer
- * into the one at the front pointer. Then both pointers are advanced to
- * the next location cyclically in the table. The value returned is the sum
- * generated, reduced to 31 bits by throwing away the "least random" low bit.
- *
- * Note: the code takes advantage of the fact that both the front and
- * rear pointers can't wrap on the same call by not testing the rear
- * pointer if the front one has wrapped.
- *
- * Returns a 31-bit random number.
- */
-long
-random()
-{
- uint32_t i;
- uint32_t *f, *r;
-
- if (rand_type == TYPE_0) {
- i = state[0];
- state[0] = i = (good_rand(i)) & 0x7fffffff;
- } else {
- /*
- * Use local variables rather than static variables for speed.
- */
- f = fptr; r = rptr;
- *f += *r;
- i = (*f >> 1) & 0x7fffffff; /* chucking least random bit */
- if (++f >= end_ptr) {
- f = state;
- ++r;
- }
- else if (++r >= end_ptr) {
- r = state;
- }
-
- fptr = f; rptr = r;
- }
- return((long)i);
-}
-}
diff --git a/winsup/cygwin/regex/COPYRIGHT b/winsup/cygwin/regex/COPYRIGHT
deleted file mode 100644
index 30c1f7a..0000000
--- a/winsup/cygwin/regex/COPYRIGHT
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright 1992, 1993, 1994, 1997 Henry Spencer. All rights reserved.
-This software is not subject to any license of the American Telephone
-and Telegraph Company or of the Regents of the University of California.
-
-Permission is granted to anyone to use this software for any purpose on
-any computer system, and to alter it and redistribute it, subject
-to the following restrictions:
-
-1. The author is not responsible for the consequences of use of this
- software, no matter how awful, even if they arise from flaws in it.
-
-2. The origin of this software must not be misrepresented, either by
- explicit claim or by omission. Since few users ever read sources,
- credits must appear in the documentation.
-
-3. Altered versions must be plainly marked as such, and must not be
- misrepresented as being the original software. Since few users
- ever read sources, credits must appear in the documentation.
-
-4. This notice may not be removed or altered.
diff --git a/winsup/cygwin/regex/cclass.h b/winsup/cygwin/regex/cclass.h
deleted file mode 100644
index 7ddb44a..0000000
--- a/winsup/cygwin/regex/cclass.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* character-class table */
-static struct cclass {
- const char *name;
- const char *chars;
- const char *multis;
-} cclasses[] = {
- {"alnum", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
-0123456789", ""},
- {"alpha", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
- ""},
- {"blank", " \t", ""},
- {"cntrl", "\007\b\t\n\v\f\r\1\2\3\4\5\6\16\17\20\21\22\23\24\
- \25\26\27\30\31\32\33\34\35\36\37\177", ""},
- {"digit", "0123456789", ""},
- {"graph", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
- 0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
- ""},
- {"lower", "abcdefghijklmnopqrstuvwxyz",
- ""},
- {"print", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\
- 0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ ",
- ""},
- {"punct", "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
- ""},
- {"space", "\t\n\v\f\r ", ""},
- {"upper", "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
- ""},
- {"xdigit", "0123456789ABCDEFabcdef",
- ""},
- {NULL, 0, ""}
-};
diff --git a/winsup/cygwin/regex/cname.h b/winsup/cygwin/regex/cname.h
deleted file mode 100644
index 1000f60..0000000
--- a/winsup/cygwin/regex/cname.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* character-name table */
-static struct cname {
- const char *name;
- char code;
-} cnames[] = {
- {"NUL", '\0'},
- {"SOH", '\001'},
- {"STX", '\002'},
- {"ETX", '\003'},
- {"EOT", '\004'},
- {"ENQ", '\005'},
- {"ACK", '\006'},
- {"BEL", '\007'},
- {"alert", '\007'},
- {"BS", '\010'},
- {"backspace", '\b'},
- {"HT", '\011'},
- {"tab", '\t'},
- {"LF", '\012'},
- {"newline", '\n'},
- {"VT", '\013'},
- {"vertical-tab", '\v'},
- {"FF", '\014'},
- {"form-feed", '\f'},
- {"CR", '\015'},
- {"carriage-return", '\r'},
- {"SO", '\016'},
- {"SI", '\017'},
- {"DLE", '\020'},
- {"DC1", '\021'},
- {"DC2", '\022'},
- {"DC3", '\023'},
- {"DC4", '\024'},
- {"NAK", '\025'},
- {"SYN", '\026'},
- {"ETB", '\027'},
- {"CAN", '\030'},
- {"EM", '\031'},
- {"SUB", '\032'},
- {"ESC", '\033'},
- {"IS4", '\034'},
- {"FS", '\034'},
- {"IS3", '\035'},
- {"GS", '\035'},
- {"IS2", '\036'},
- {"RS", '\036'},
- {"IS1", '\037'},
- {"US", '\037'},
- {"space", ' '},
- {"exclamation-mark", '!'},
- {"quotation-mark", '"'},
- {"number-sign", '#'},
- {"dollar-sign", '$'},
- {"percent-sign", '%'},
- {"ampersand", '&'},
- {"apostrophe", '\''},
- {"left-parenthesis", '('},
- {"right-parenthesis", ')'},
- {"asterisk", '*'},
- {"plus-sign", '+'},
- {"comma", ','},
- {"hyphen", '-'},
- {"hyphen-minus", '-'},
- {"period", '.'},
- {"full-stop", '.'},
- {"slash", '/'},
- {"solidus", '/'},
- {"zero", '0'},
- {"one", '1'},
- {"two", '2'},
- {"three", '3'},
- {"four", '4'},
- {"five", '5'},
- {"six", '6'},
- {"seven", '7'},
- {"eight", '8'},
- {"nine", '9'},
- {"colon", ':'},
- {"semicolon", ';'},
- {"less-than-sign", '<'},
- {"equals-sign", '='},
- {"greater-than-sign", '>'},
- {"question-mark", '?'},
- {"commercial-at", '@'},
- {"left-square-bracket", '['},
- {"backslash", '\\'},
- {"reverse-solidus", '\\'},
- {"right-square-bracket", ']'},
- {"circumflex", '^'},
- {"circumflex-accent", '^'},
- {"underscore", '_'},
- {"low-line", '_'},
- {"grave-accent", '`'},
- {"left-brace", '{'},
- {"left-curly-bracket", '{'},
- {"vertical-line", '|'},
- {"right-brace", '}'},
- {"right-curly-bracket", '}'},
- {"tilde", '~'},
- {"DEL", '\177'},
- {NULL, 0}
-};
diff --git a/winsup/cygwin/regex/engine.c b/winsup/cygwin/regex/engine.c
deleted file mode 100644
index 42c91dc..0000000
--- a/winsup/cygwin/regex/engine.c
+++ /dev/null
@@ -1,1019 +0,0 @@
-/*
- * The matching engine and friends. This file is #included by regexec.c
- * after suitable #defines of a variety of macros used herein, so that
- * different state representations can be used without duplicating masses
- * of code.
- */
-
-#ifdef SNAMES
-#define matcher smatcher
-#define fast sfast
-#define slow sslow
-#define dissect sdissect
-#define backref sbackref
-#define step sstep
-#define print sprint
-#define at sat
-#define match smat
-#endif
-#ifdef LNAMES
-#define matcher lmatcher
-#define fast lfast
-#define slow lslow
-#define dissect ldissect
-#define backref lbackref
-#define step lstep
-#define print lprint
-#define at lat
-#define match lmat
-#endif
-
-/* another structure passed up and down to avoid zillions of parameters */
-struct match {
- struct re_guts *g;
- int eflags;
- regmatch_t *pmatch; /* [nsub+1] (0 element unused) */
- char *offp; /* offsets work from here */
- char *beginp; /* start of string -- virtual NUL precedes */
- char *endp; /* end of string -- virtual NUL here */
- char *coldp; /* can be no match starting before here */
- char **lastpos; /* [nplus+1] */
- STATEVARS;
- states st; /* current states */
- states fresh; /* states for a fresh start */
- states tmp; /* temporary */
- states empty; /* empty set of states */
-};
-
-#include "engine.ih"
-
-#ifdef REDEBUG
-#define SP(t, s, c) print(m, t, s, c, stdout)
-#define AT(t, p1, p2, s1, s2) at(m, t, p1, p2, s1, s2)
-#define NOTE(str) { if (m->eflags&REG_TRACE) printf("=%s\n", (str)); }
-#else
-#define SP(t, s, c) /* nothing */
-#define AT(t, p1, p2, s1, s2) /* nothing */
-#define NOTE(s) /* nothing */
-#endif
-
-/*
- - matcher - the actual matching engine
- == static int matcher(register struct re_guts *g, char *string, \
- == size_t nmatch, regmatch_t pmatch[], int eflags);
- */
-static int /* 0 success, REG_NOMATCH failure */
-matcher(g, string, nmatch, pmatch, eflags)
-register struct re_guts *g;
-char *string;
-size_t nmatch;
-regmatch_t pmatch[];
-int eflags;
-{
- register char *endp;
- register size_t i;
- struct match mv;
- register struct match *m = &mv;
- register char *dp;
- const register sopno gf = g->firststate+1; /* +1 for OEND */
- const register sopno gl = g->laststate;
- char *start;
- char *stop;
-
- /* simplify the situation where possible */
- if (g->cflags&REG_NOSUB)
- nmatch = 0;
- if (eflags&REG_STARTEND) {
- start = string + pmatch[0].rm_so;
- stop = string + pmatch[0].rm_eo;
- } else {
- start = string;
- stop = start + strlen(start);
- }
- if (stop < start)
- return(REG_INVARG);
-
- /* prescreening; this does wonders for this rather slow code */
- if (g->must != NULL) {
- for (dp = start; dp < stop; dp++)
- if (*dp == g->must[0] && stop - dp >= g->mlen &&
- memcmp(dp, g->must, (size_t)g->mlen) == 0)
- break;
- if (dp == stop) /* we didn't find g->must */
- return(REG_NOMATCH);
- }
-
- /* match struct setup */
- m->g = g;
- m->eflags = eflags;
- m->pmatch = NULL;
- m->lastpos = NULL;
- m->offp = string;
- m->beginp = start;
- m->endp = stop;
- STATESETUP(m, 4);
- SETUP(m->st);
- SETUP(m->fresh);
- SETUP(m->tmp);
- SETUP(m->empty);
- CLEAR(m->empty);
-
- /* this loop does only one repetition except for backrefs */
- for (;;) {
- endp = fast(m, start, stop, gf, gl);
- if (endp == NULL) { /* a miss */
- STATETEARDOWN(m);
- return(REG_NOMATCH);
- }
- if (nmatch == 0 && !g->backrefs)
- break; /* no further info needed */
-
- /* where? */
- assert(m->coldp != NULL);
- for (;;) {
- NOTE("finding start");
- endp = slow(m, m->coldp, stop, gf, gl);
- if (endp != NULL)
- break;
- assert(m->coldp < m->endp);
- m->coldp++;
- }
- if (nmatch == 1 && !g->backrefs)
- break; /* no further info needed */
-
- /* oh my, he wants the subexpressions... */
- if (m->pmatch == NULL)
- m->pmatch = (regmatch_t *)malloc((m->g->nsub + 1) *
- sizeof(regmatch_t));
- if (m->pmatch == NULL) {
- STATETEARDOWN(m);
- return(REG_ESPACE);
- }
- for (i = 1; i <= m->g->nsub; i++)
- m->pmatch[i].rm_so = m->pmatch[i].rm_eo = -1;
- if (!g->backrefs && !(m->eflags&REG_BACKR)) {
- NOTE("dissecting");
- dp = dissect(m, m->coldp, endp, gf, gl);
- } else {
- if (g->nplus > 0 && m->lastpos == NULL)
- m->lastpos = (char **)malloc((g->nplus+1) *
- sizeof(char *));
- if (g->nplus > 0 && m->lastpos == NULL) {
- free(m->pmatch);
- STATETEARDOWN(m);
- return(REG_ESPACE);
- }
- NOTE("backref dissect");
- dp = backref(m, m->coldp, endp, gf, gl, (sopno)0);
- }
- if (dp != NULL)
- break;
-
- /* uh-oh... we couldn't find a subexpression-level match */
- assert(g->backrefs); /* must be back references doing it */
- assert(g->nplus == 0 || m->lastpos != NULL);
- for (;;) {
- if (dp != NULL || endp <= m->coldp)
- break; /* defeat */
- NOTE("backoff");
- endp = slow(m, m->coldp, endp-1, gf, gl);
- if (endp == NULL)
- break; /* defeat */
- /* try it on a shorter possibility */
-#ifndef NDEBUG
- for (i = 1; i <= m->g->nsub; i++) {
- assert(m->pmatch[i].rm_so == -1);
- assert(m->pmatch[i].rm_eo == -1);
- }
-#endif
- NOTE("backoff dissect");
- dp = backref(m, m->coldp, endp, gf, gl, (sopno)0);
- }
- assert(dp == NULL || dp == endp);
- if (dp != NULL) /* found a shorter one */
- break;
-
- /* despite initial appearances, there is no match here */
- NOTE("false alarm");
- start = m->coldp + 1; /* recycle starting later */
- assert(start <= stop);
- }
-
- /* fill in the details if requested */
- if (nmatch > 0) {
- pmatch[0].rm_so = m->coldp - m->offp;
- pmatch[0].rm_eo = endp - m->offp;
- }
- if (nmatch > 1) {
- assert(m->pmatch != NULL);
- for (i = 1; i < nmatch; i++)
- if (i <= m->g->nsub)
- pmatch[i] = m->pmatch[i];
- else {
- pmatch[i].rm_so = -1;
- pmatch[i].rm_eo = -1;
- }
- }
-
- if (m->pmatch != NULL)
- free((char *)m->pmatch);
- if (m->lastpos != NULL)
- free((char *)m->lastpos);
- STATETEARDOWN(m);
- return(0);
-}
-
-/*
- - dissect - figure out what matched what, no back references
- == static char *dissect(register struct match *m, char *start, \
- == char *stop, sopno startst, sopno stopst);
- */
-static char * /* == stop (success) always */
-dissect(m, start, stop, startst, stopst)
-register struct match *m;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-{
- register int i;
- register sopno ss; /* start sop of current subRE */
- register sopno es; /* end sop of current subRE */
- register char *sp; /* start of string matched by it */
- register char *stp; /* string matched by it cannot pass here */
- register char *rest; /* start of rest of string */
- register char *tail; /* string unmatched by rest of RE */
- register sopno ssub; /* start sop of subsubRE */
- register sopno esub; /* end sop of subsubRE */
- register char *ssp; /* start of string matched by subsubRE */
- register char *sep; /* end of string matched by subsubRE */
- register char *oldssp; /* previous ssp */
- register char *dp;
-
- AT("diss", start, stop, startst, stopst);
- sp = start;
- for (ss = startst; ss < stopst; ss = es) {
- /* identify end of subRE */
- es = ss;
- switch (OP(m->g->strip[es])) {
- case OPLUS_:
- case OQUEST_:
- es += OPND(m->g->strip[es]);
- break;
- case OCH_:
- while (OP(m->g->strip[es]) != O_CH)
- es += OPND(m->g->strip[es]);
- break;
- }
- es++;
-
- /* figure out what it matched */
- switch (OP(m->g->strip[ss])) {
- case OEND:
- assert(nope);
- break;
- case OCHAR:
- sp++;
- break;
- case OBOL:
- case OEOL:
- case OBOW:
- case OEOW:
- break;
- case OANY:
- case OANYOF:
- sp++;
- break;
- case OBACK_:
- case O_BACK:
- assert(nope);
- break;
- /* cases where length of match is hard to find */
- case OQUEST_:
- stp = stop;
- for (;;) {
- /* how long could this one be? */
- rest = slow(m, sp, stp, ss, es);
- assert(rest != NULL); /* it did match */
- /* could the rest match the rest? */
- tail = slow(m, rest, stop, es, stopst);
- if (tail == stop)
- break; /* yes! */
- /* no -- try a shorter match for this one */
- stp = rest - 1;
- assert(stp >= sp); /* it did work */
- }
- ssub = ss + 1;
- esub = es - 1;
- /* did innards match? */
- if (slow(m, sp, rest, ssub, esub) != NULL) {
- dp = dissect(m, sp, rest, ssub, esub);
- assert(dp == rest);
- } else /* no */
- assert(sp == rest);
- sp = rest;
- break;
- case OPLUS_:
- stp = stop;
- for (;;) {
- /* how long could this one be? */
- rest = slow(m, sp, stp, ss, es);
- assert(rest != NULL); /* it did match */
- /* could the rest match the rest? */
- tail = slow(m, rest, stop, es, stopst);
- if (tail == stop)
- break; /* yes! */
- /* no -- try a shorter match for this one */
- stp = rest - 1;
- assert(stp >= sp); /* it did work */
- }
- ssub = ss + 1;
- esub = es - 1;
- ssp = sp;
- oldssp = ssp;
- for (;;) { /* find last match of innards */
- sep = slow(m, ssp, rest, ssub, esub);
- if (sep == NULL || sep == ssp)
- break; /* failed or matched null */
- oldssp = ssp; /* on to next try */
- ssp = sep;
- }
- if (sep == NULL) {
- /* last successful match */
- sep = ssp;
- ssp = oldssp;
- }
- assert(sep == rest); /* must exhaust substring */
- assert(slow(m, ssp, sep, ssub, esub) == rest);
- dp = dissect(m, ssp, sep, ssub, esub);
- assert(dp == sep);
- sp = rest;
- break;
- case OCH_:
- stp = stop;
- for (;;) {
- /* how long could this one be? */
- rest = slow(m, sp, stp, ss, es);
- assert(rest != NULL); /* it did match */
- /* could the rest match the rest? */
- tail = slow(m, rest, stop, es, stopst);
- if (tail == stop)
- break; /* yes! */
- /* no -- try a shorter match for this one */
- stp = rest - 1;
- assert(stp >= sp); /* it did work */
- }
- ssub = ss + 1;
- esub = ss + OPND(m->g->strip[ss]) - 1;
- assert(OP(m->g->strip[esub]) == OOR1);
- for (;;) { /* find first matching branch */
- if (slow(m, sp, rest, ssub, esub) == rest)
- break; /* it matched all of it */
- /* that one missed, try next one */
- assert(OP(m->g->strip[esub]) == OOR1);
- esub++;
- assert(OP(m->g->strip[esub]) == OOR2);
- ssub = esub + 1;
- esub += OPND(m->g->strip[esub]);
- if (OP(m->g->strip[esub]) == OOR2)
- esub--;
- else
- assert(OP(m->g->strip[esub]) == O_CH);
- }
- dp = dissect(m, sp, rest, ssub, esub);
- assert(dp == rest);
- sp = rest;
- break;
- case O_PLUS:
- case O_QUEST:
- case OOR1:
- case OOR2:
- case O_CH:
- assert(nope);
- break;
- case OLPAREN:
- i = OPND(m->g->strip[ss]);
- assert(0 < i && i <= m->g->nsub);
- m->pmatch[i].rm_so = sp - m->offp;
- break;
- case ORPAREN:
- i = OPND(m->g->strip[ss]);
- assert(0 < i && i <= m->g->nsub);
- m->pmatch[i].rm_eo = sp - m->offp;
- break;
- default: /* uh oh */
- assert(nope);
- break;
- }
- }
-
- assert(sp == stop);
- return(sp);
-}
-
-/*
- - backref - figure out what matched what, figuring in back references
- == static char *backref(register struct match *m, char *start, \
- == char *stop, sopno startst, sopno stopst, sopno lev);
- */
-static char * /* == stop (success) or NULL (failure) */
-backref(m, start, stop, startst, stopst, lev)
-register struct match *m;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-sopno lev; /* PLUS nesting level */
-{
- register int i;
- register sopno ss; /* start sop of current subRE */
- register char *sp; /* start of string matched by it */
- register sopno ssub; /* start sop of subsubRE */
- register sopno esub; /* end sop of subsubRE */
- register char *ssp; /* start of string matched by subsubRE */
- register char *dp;
- register size_t len;
- register int hard;
- register sop s;
- register regoff_t offsave;
- register cset *cs;
-
- AT("back", start, stop, startst, stopst);
- sp = start;
-
- /* get as far as we can with easy stuff */
- hard = 0;
- for (ss = startst; !hard && ss < stopst; ss++)
- switch (OP(s = m->g->strip[ss])) {
- case OCHAR:
- if (sp == stop || *sp++ != (char)OPND(s))
- return(NULL);
- break;
- case OANY:
- if (sp == stop)
- return(NULL);
- sp++;
- break;
- case OANYOF:
- cs = &m->g->sets[OPND(s)];
- if (sp == stop || !CHIN(cs, *sp++))
- return(NULL);
- break;
- case OBOL:
- if ( (sp == m->beginp && !(m->eflags&REG_NOTBOL)) ||
- (sp < m->endp && *(sp-1) == '\n' &&
- (m->g->cflags&REG_NEWLINE)) )
- { /* yes */ }
- else
- return(NULL);
- break;
- case OEOL:
- if ( (sp == m->endp && !(m->eflags&REG_NOTEOL)) ||
- (sp < m->endp && *sp == '\n' &&
- (m->g->cflags&REG_NEWLINE)) )
- { /* yes */ }
- else
- return(NULL);
- break;
- case OBOW:
- if (( (sp == m->beginp && !(m->eflags&REG_NOTBOL)) ||
- (sp < m->endp && *(sp-1) == '\n' &&
- (m->g->cflags&REG_NEWLINE)) ||
- (sp > m->beginp &&
- !ISWORD(*(sp-1))) ) &&
- (sp < m->endp && ISWORD(*sp)) )
- { /* yes */ }
- else
- return(NULL);
- break;
- case OEOW:
- if (( (sp == m->endp && !(m->eflags&REG_NOTEOL)) ||
- (sp < m->endp && *sp == '\n' &&
- (m->g->cflags&REG_NEWLINE)) ||
- (sp < m->endp && !ISWORD(*sp)) ) &&
- (sp > m->beginp && ISWORD(*(sp-1))) )
- { /* yes */ }
- else
- return(NULL);
- break;
- case O_QUEST:
- break;
- case OOR1: /* matches null but needs to skip */
- ss++;
- s = m->g->strip[ss];
- do {
- assert(OP(s) == OOR2);
- ss += OPND(s);
- } while (OP(s = m->g->strip[ss]) != O_CH);
- /* note that the ss++ gets us past the O_CH */
- break;
- default: /* have to make a choice */
- hard = 1;
- break;
- }
- if (!hard) { /* that was it! */
- if (sp != stop)
- return(NULL);
- return(sp);
- }
- ss--; /* adjust for the for's final increment */
-
- /* the hard stuff */
- AT("hard", sp, stop, ss, stopst);
- s = m->g->strip[ss];
- switch (OP(s)) {
- case OBACK_: /* the vilest depths */
- i = OPND(s);
- assert(0 < i && i <= m->g->nsub);
- if (m->pmatch[i].rm_eo == -1)
- return(NULL);
- assert(m->pmatch[i].rm_so != -1);
- len = m->pmatch[i].rm_eo - m->pmatch[i].rm_so;
- assert(stop - m->beginp >= len);
- if (sp > stop - len)
- return(NULL); /* not enough left to match */
- ssp = m->offp + m->pmatch[i].rm_so;
- if (memcmp(sp, ssp, len) != 0)
- return(NULL);
- while (m->g->strip[ss] != SOP(O_BACK, i))
- ss++;
- return(backref(m, sp+len, stop, ss+1, stopst, lev));
- break;
- case OQUEST_: /* to null or not */
- dp = backref(m, sp, stop, ss+1, stopst, lev);
- if (dp != NULL)
- return(dp); /* not */
- return(backref(m, sp, stop, ss+OPND(s)+1, stopst, lev));
- break;
- case OPLUS_:
- assert(m->lastpos != NULL);
- assert(lev+1 <= m->g->nplus);
- m->lastpos[lev+1] = sp;
- return(backref(m, sp, stop, ss+1, stopst, lev+1));
- break;
- case O_PLUS:
- if (sp == m->lastpos[lev]) /* last pass matched null */
- return(backref(m, sp, stop, ss+1, stopst, lev-1));
- /* try another pass */
- m->lastpos[lev] = sp;
- dp = backref(m, sp, stop, ss-OPND(s)+1, stopst, lev);
- if (dp == NULL)
- return(backref(m, sp, stop, ss+1, stopst, lev-1));
- else
- return(dp);
- break;
- case OCH_: /* find the right one, if any */
- ssub = ss + 1;
- esub = ss + OPND(s) - 1;
- assert(OP(m->g->strip[esub]) == OOR1);
- for (;;) { /* find first matching branch */
- dp = backref(m, sp, stop, ssub, esub, lev);
- if (dp != NULL)
- return(dp);
- /* that one missed, try next one */
- if (OP(m->g->strip[esub]) == O_CH)
- return(NULL); /* there is none */
- esub++;
- assert(OP(m->g->strip[esub]) == OOR2);
- ssub = esub + 1;
- esub += OPND(m->g->strip[esub]);
- if (OP(m->g->strip[esub]) == OOR2)
- esub--;
- else
- assert(OP(m->g->strip[esub]) == O_CH);
- }
- break;
- case OLPAREN: /* must undo assignment if rest fails */
- i = OPND(s);
- assert(0 < i && i <= m->g->nsub);
- offsave = m->pmatch[i].rm_so;
- m->pmatch[i].rm_so = sp - m->offp;
- dp = backref(m, sp, stop, ss+1, stopst, lev);
- if (dp != NULL)
- return(dp);
- m->pmatch[i].rm_so = offsave;
- return(NULL);
- break;
- case ORPAREN: /* must undo assignment if rest fails */
- i = OPND(s);
- assert(0 < i && i <= m->g->nsub);
- offsave = m->pmatch[i].rm_eo;
- m->pmatch[i].rm_eo = sp - m->offp;
- dp = backref(m, sp, stop, ss+1, stopst, lev);
- if (dp != NULL)
- return(dp);
- m->pmatch[i].rm_eo = offsave;
- return(NULL);
- break;
- default: /* uh oh */
- assert(nope);
- break;
- }
-
- /* "can't happen" */
- assert(nope);
- /* NOTREACHED */
- return((char *)NULL); /* dummy */
-}
-
-/*
- - fast - step through the string at top speed
- == static char *fast(register struct match *m, char *start, \
- == char *stop, sopno startst, sopno stopst);
- */
-static char * /* where tentative match ended, or NULL */
-fast(m, start, stop, startst, stopst)
-register struct match *m;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-{
- register states st = m->st;
- register states fresh = m->fresh;
- register states tmp = m->tmp;
- register char *p = start;
- register int c = (start == m->beginp) ? OUT : *(start-1);
- register int lastc; /* previous c */
- register int flagch;
- register int i;
- register char *coldp; /* last p after which no match was underway */
-
- CLEAR(st);
- SET1(st, startst);
- st = step(m->g, startst, stopst, st, NOTHING, st);
- ASSIGN(fresh, st);
- SP("start", st, *p);
- coldp = NULL;
- for (;;) {
- /* next character */
- lastc = c;
- c = (p == m->endp) ? OUT : *p;
- if (EQ(st, fresh))
- coldp = p;
-
- /* is there an EOL and/or BOL between lastc and c? */
- flagch = '\0';
- i = 0;
- if ( (lastc == '\n' && m->g->cflags&REG_NEWLINE) ||
- (lastc == OUT && !(m->eflags&REG_NOTBOL)) ) {
- flagch = BOL;
- i = m->g->nbol;
- }
- if ( (c == '\n' && m->g->cflags&REG_NEWLINE) ||
- (c == OUT && !(m->eflags&REG_NOTEOL)) ) {
- flagch = (flagch == BOL) ? BOLEOL : EOL;
- i += m->g->neol;
- }
- if (i != 0) {
- for (; i > 0; i--)
- st = step(m->g, startst, stopst, st, flagch, st);
- SP("boleol", st, c);
- }
-
- /* how about a word boundary? */
- if ( (flagch == BOL || (lastc != OUT && !ISWORD(lastc))) &&
- (c != OUT && ISWORD(c)) ) {
- flagch = BOW;
- }
- if ( (lastc != OUT && ISWORD(lastc)) &&
- (flagch == EOL || (c != OUT && !ISWORD(c))) ) {
- flagch = EOW;
- }
- if (flagch == BOW || flagch == EOW) {
- st = step(m->g, startst, stopst, st, flagch, st);
- SP("boweow", st, c);
- }
-
- /* are we done? */
- if (ISSET(st, stopst) || p == stop)
- break; /* NOTE BREAK OUT */
-
- /* no, we must deal with this character */
- ASSIGN(tmp, st);
- ASSIGN(st, fresh);
- assert(c != OUT);
- st = step(m->g, startst, stopst, tmp, c, st);
- SP("aft", st, c);
- assert(EQ(step(m->g, startst, stopst, st, NOTHING, st), st));
- p++;
- }
-
- assert(coldp != NULL);
- m->coldp = coldp;
- if (ISSET(st, stopst))
- return(p+1);
- else
- return(NULL);
-}
-
-/*
- - slow - step through the string more deliberately
- == static char *slow(register struct match *m, char *start, \
- == char *stop, sopno startst, sopno stopst);
- */
-static char * /* where it ended */
-slow(m, start, stop, startst, stopst)
-register struct match *m;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-{
- register states st = m->st;
- register states empty = m->empty;
- register states tmp = m->tmp;
- register char *p = start;
- register int c = (start == m->beginp) ? OUT : *(start-1);
- register int lastc; /* previous c */
- register int flagch;
- register int i;
- register char *matchp; /* last p at which a match ended */
-
- AT("slow", start, stop, startst, stopst);
- CLEAR(st);
- SET1(st, startst);
- SP("sstart", st, *p);
- st = step(m->g, startst, stopst, st, NOTHING, st);
- matchp = NULL;
- for (;;) {
- /* next character */
- lastc = c;
- c = (p == m->endp) ? OUT : *p;
-
- /* is there an EOL and/or BOL between lastc and c? */
- flagch = '\0';
- i = 0;
- if ( (lastc == '\n' && m->g->cflags&REG_NEWLINE) ||
- (lastc == OUT && !(m->eflags&REG_NOTBOL)) ) {
- flagch = BOL;
- i = m->g->nbol;
- }
- if ( (c == '\n' && m->g->cflags&REG_NEWLINE) ||
- (c == OUT && !(m->eflags&REG_NOTEOL)) ) {
- flagch = (flagch == BOL) ? BOLEOL : EOL;
- i += m->g->neol;
- }
- if (i != 0) {
- for (; i > 0; i--)
- st = step(m->g, startst, stopst, st, flagch, st);
- SP("sboleol", st, c);
- }
-
- /* how about a word boundary? */
- if ( (flagch == BOL || (lastc != OUT && !ISWORD(lastc))) &&
- (c != OUT && ISWORD(c)) ) {
- flagch = BOW;
- }
- if ( (lastc != OUT && ISWORD(lastc)) &&
- (flagch == EOL || (c != OUT && !ISWORD(c))) ) {
- flagch = EOW;
- }
- if (flagch == BOW || flagch == EOW) {
- st = step(m->g, startst, stopst, st, flagch, st);
- SP("sboweow", st, c);
- }
-
- /* are we done? */
- if (ISSET(st, stopst))
- matchp = p;
- if (EQ(st, empty) || p == stop)
- break; /* NOTE BREAK OUT */
-
- /* no, we must deal with this character */
- ASSIGN(tmp, st);
- ASSIGN(st, empty);
- assert(c != OUT);
- st = step(m->g, startst, stopst, tmp, c, st);
- SP("saft", st, c);
- assert(EQ(step(m->g, startst, stopst, st, NOTHING, st), st));
- p++;
- }
-
- return(matchp);
-}
-
-
-/*
- - step - map set of states reachable before char to set reachable after
- == static states step(register struct re_guts *g, sopno start, sopno stop, \
- == register states bef, int ch, register states aft);
- == #define BOL (OUT+1)
- == #define EOL (BOL+1)
- == #define BOLEOL (BOL+2)
- == #define NOTHING (BOL+3)
- == #define BOW (BOL+4)
- == #define EOW (BOL+5)
- == #define CODEMAX (BOL+5) // highest code used
- == #define NONCHAR(c) ((c) > CHAR_MAX)
- == #define NNONCHAR (CODEMAX-CHAR_MAX)
- */
-static states
-step(g, start, stop, bef, ch, aft)
-register struct re_guts *g;
-sopno start; /* start state within strip */
-sopno stop; /* state after stop state within strip */
-register states bef; /* states reachable before */
-int ch; /* character or NONCHAR code */
-register states aft; /* states already known reachable after */
-{
- register cset *cs;
- register sop s;
- register sopno pc;
- register onestate here; /* note, macros know this name */
- register sopno look;
- register long i;
-
- for (pc = start, INIT(here, pc); pc != stop; pc++, INC(here)) {
- s = g->strip[pc];
- switch (OP(s)) {
- case OEND:
- assert(pc == stop-1);
- break;
- case OCHAR:
- /* only characters can match */
- assert(!NONCHAR(ch) || ch != (char)OPND(s));
- if (ch == (char)OPND(s))
- FWD(aft, bef, 1);
- break;
- case OBOL:
- if (ch == BOL || ch == BOLEOL)
- FWD(aft, bef, 1);
- break;
- case OEOL:
- if (ch == EOL || ch == BOLEOL)
- FWD(aft, bef, 1);
- break;
- case OBOW:
- if (ch == BOW)
- FWD(aft, bef, 1);
- break;
- case OEOW:
- if (ch == EOW)
- FWD(aft, bef, 1);
- break;
- case OANY:
- if (!NONCHAR(ch))
- FWD(aft, bef, 1);
- break;
- case OANYOF:
- cs = &g->sets[OPND(s)];
- if (!NONCHAR(ch) && CHIN(cs, ch))
- FWD(aft, bef, 1);
- break;
- case OBACK_: /* ignored here */
- case O_BACK:
- FWD(aft, aft, 1);
- break;
- case OPLUS_: /* forward, this is just an empty */
- FWD(aft, aft, 1);
- break;
- case O_PLUS: /* both forward and back */
- FWD(aft, aft, 1);
- i = ISSETBACK(aft, OPND(s));
- BACK(aft, aft, OPND(s));
- if (!i && ISSETBACK(aft, OPND(s))) {
- /* oho, must reconsider loop body */
- pc -= OPND(s) + 1;
- INIT(here, pc);
- }
- break;
- case OQUEST_: /* two branches, both forward */
- FWD(aft, aft, 1);
- FWD(aft, aft, OPND(s));
- break;
- case O_QUEST: /* just an empty */
- FWD(aft, aft, 1);
- break;
- case OLPAREN: /* not significant here */
- case ORPAREN:
- FWD(aft, aft, 1);
- break;
- case OCH_: /* mark the first two branches */
- FWD(aft, aft, 1);
- assert(OP(g->strip[pc+OPND(s)]) == OOR2);
- FWD(aft, aft, OPND(s));
- break;
- case OOR1: /* done a branch, find the O_CH */
- if (ISSTATEIN(aft, here)) {
- for (look = 1;
- OP(s = g->strip[pc+look]) != O_CH;
- look += OPND(s))
- assert(OP(s) == OOR2);
- FWD(aft, aft, look);
- }
- break;
- case OOR2: /* propagate OCH_'s marking */
- FWD(aft, aft, 1);
- if (OP(g->strip[pc+OPND(s)]) != O_CH) {
- assert(OP(g->strip[pc+OPND(s)]) == OOR2);
- FWD(aft, aft, OPND(s));
- }
- break;
- case O_CH: /* just empty */
- FWD(aft, aft, 1);
- break;
- default: /* ooooops... */
- assert(nope);
- break;
- }
- }
-
- return(aft);
-}
-
-#ifdef REDEBUG
-/*
- - print - print a set of states
- == #ifdef REDEBUG
- == static void print(struct match *m, char *caption, states st, \
- == int ch, FILE *d);
- == #endif
- */
-static void
-print(m, caption, st, ch, d)
-struct match *m;
-char *caption;
-states st;
-int ch;
-FILE *d;
-{
- register struct re_guts *g = m->g;
- register int i;
- register int first = 1;
-
- if (!(m->eflags&REG_TRACE))
- return;
-
- fprintf(d, "%s", caption);
- if (ch != '\0')
- fprintf(d, " %s", pchar(ch));
- for (i = 0; i < g->nstates; i++)
- if (ISSET(st, i)) {
- fprintf(d, "%s%d", (first) ? "\t" : ", ", i);
- first = 0;
- }
- fprintf(d, "\n");
-}
-
-/*
- - at - print current situation
- == #ifdef REDEBUG
- == static void at(struct match *m, char *title, char *start, char *stop, \
- == sopno startst, sopno stopst);
- == #endif
- */
-static void
-at(m, title, start, stop, startst, stopst)
-struct match *m;
-char *title;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-{
- if (!(m->eflags&REG_TRACE))
- return;
-
- printf("%s %s-", title, pchar(*start));
- printf("%s ", pchar(*stop));
- printf("%ld-%ld\n", (long)startst, (long)stopst);
-}
-
-#ifndef PCHARDONE
-#define PCHARDONE /* never again */
-/*
- - pchar - make a character printable
- == #ifdef REDEBUG
- == static char *pchar(int ch);
- == #endif
- *
- * Is this identical to regchar() over in debug.c? Well, yes. But a
- * duplicate here avoids having a debugging-capable regexec.o tied to
- * a matching debug.o, and this is convenient. It all disappears in
- * the non-debug compilation anyway, so it doesn't matter much.
- */
-static char * /* -> representation */
-pchar(ch)
-int ch;
-{
- static char pbuf[10];
-
- if (isprint(ch) || ch == ' ')
- sprintf(pbuf, "%c", ch);
- else
- sprintf(pbuf, "\\%o", ch);
- return(pbuf);
-}
-#endif
-#endif
-
-#undef matcher
-#undef fast
-#undef slow
-#undef dissect
-#undef backref
-#undef step
-#undef print
-#undef at
-#undef match
diff --git a/winsup/cygwin/regex/engine.ih b/winsup/cygwin/regex/engine.ih
deleted file mode 100644
index cc98334..0000000
--- a/winsup/cygwin/regex/engine.ih
+++ /dev/null
@@ -1,35 +0,0 @@
-/* ========= begin header generated by ./mkh ========= */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* === engine.c === */
-static int matcher(register struct re_guts *g, char *string, size_t nmatch, regmatch_t pmatch[], int eflags);
-static char *dissect(register struct match *m, char *start, char *stop, sopno startst, sopno stopst);
-static char *backref(register struct match *m, char *start, char *stop, sopno startst, sopno stopst, sopno lev);
-static char *fast(register struct match *m, char *start, char *stop, sopno startst, sopno stopst);
-static char *slow(register struct match *m, char *start, char *stop, sopno startst, sopno stopst);
-static states step(register struct re_guts *g, sopno start, sopno stop, register states bef, int ch, register states aft);
-#define BOL (OUT+1)
-#define EOL (BOL+1)
-#define BOLEOL (BOL+2)
-#define NOTHING (BOL+3)
-#define BOW (BOL+4)
-#define EOW (BOL+5)
-#define CODEMAX (BOL+5) /* highest code used */
-#define NONCHAR(c) ((c) > CHAR_MAX)
-#define NNONCHAR (CODEMAX-CHAR_MAX)
-#ifdef REDEBUG
-static void print(struct match *m, char *caption, states st, int ch, FILE *d);
-#endif
-#ifdef REDEBUG
-static void at(struct match *m, char *title, char *start, char *stop, sopno startst, sopno stopst);
-#endif
-#ifdef REDEBUG
-static char *pchar(int ch);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-/* ========= end header generated by ./mkh ========= */
diff --git a/winsup/cygwin/regex/mkh b/winsup/cygwin/regex/mkh
deleted file mode 100755
index 252b246..0000000
--- a/winsup/cygwin/regex/mkh
+++ /dev/null
@@ -1,76 +0,0 @@
-#! /bin/sh
-# mkh - pull headers out of C source
-PATH=/bin:/usr/bin ; export PATH
-
-# egrep pattern to pick out marked lines
-egrep='^ =([ ]|$)'
-
-# Sed program to process marked lines into lines for the header file.
-# The markers have already been removed. Two things are done here: removal
-# of backslashed newlines, and some fudging of comments. The first is done
-# because -o needs to have prototypes on one line to strip them down.
-# Getting comments into the output is tricky; we turn C++-style // comments
-# into /* */ comments, after altering any existing */'s to avoid trouble.
-peel=' /\\$/N
- /\\\n[ ]*/s///g
- /\/\//s;\*/;* /;g
- /\/\//s;//\(.*\);/*\1 */;'
-
-for a
-do
- case "$a" in
- -o) # old (pre-function-prototype) compiler
- # add code to comment out argument lists
- peel="$peel
- "'/^\([^#\/][^\/]*[a-zA-Z0-9_)]\)(\(.*\))/s;;\1(/*\2*/);'
- shift
- ;;
- -b) # funny Berkeley __P macro
- peel="$peel
- "'/^\([^#\/][^\/]*[a-zA-Z0-9_)]\)(\(.*\))/s;;\1 __P((\2));'
- shift
- ;;
- -s) # compiler doesn't like `static foo();'
- # add code to get rid of the `static'
- peel="$peel
- "'/^static[ ][^\/]*[a-zA-Z0-9_)](.*)/s;static.;;'
- shift
- ;;
- -p) # private declarations
- egrep='^ ==([ ]|$)'
- shift
- ;;
- -i) # wrap in #ifndef, argument is name
- ifndef="$2"
- shift ; shift
- ;;
- *) break
- ;;
- esac
-done
-
-if test " $ifndef" != " "
-then
- echo "#ifndef $ifndef"
- echo "#define $ifndef /* never again */"
-fi
-echo "/* ========= begin header generated by $0 ========= */"
-echo '#ifdef __cplusplus'
-echo 'extern "C" {'
-echo '#endif'
-for f
-do
- echo
- echo "/* === $f === */"
- egrep "$egrep" $f | sed 's/^ ==*[ ]//;s/^ ==*$//' | sed "$peel"
- echo
-done
-echo '#ifdef __cplusplus'
-echo '}'
-echo '#endif'
-echo "/* ========= end header generated by $0 ========= */"
-if test " $ifndef" != " "
-then
- echo "#endif"
-fi
-exit 0
diff --git a/winsup/cygwin/regex/regcomp.c b/winsup/cygwin/regex/regcomp.c
deleted file mode 100644
index 580c703..0000000
--- a/winsup/cygwin/regex/regcomp.c
+++ /dev/null
@@ -1,1546 +0,0 @@
-#include "winsup.h"
-#include <sys/types.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <limits.h>
-#include <stdlib.h>
-#include "regex.h"
-
-#include "utils.h"
-#include "regex2.h"
-
-#include "cclass.h"
-#include "cname.h"
-
-/*
- * parse structure, passed up and down to avoid global variables and
- * other clumsinesses
- */
-struct parse {
- char *next; /* next character in RE */
- char *end; /* end of string (-> NUL normally) */
- int error; /* has an error been seen? */
- sop *strip; /* malloced strip */
- sopno ssize; /* malloced strip size (allocated) */
- sopno slen; /* malloced strip length (used) */
- int ncsalloc; /* number of csets allocated */
- struct re_guts *g;
-# define NPAREN 10 /* we need to remember () 1-9 for back refs */
- sopno pbegin[NPAREN]; /* -> ( ([0] unused) */
- sopno pend[NPAREN]; /* -> ) ([0] unused) */
-};
-
-#include "regcomp.ih"
-
-static char nuls[10]; /* place to point scanner in event of error */
-
-/*
- * macros for use with parse structure
- * BEWARE: these know that the parse structure is named `p' !!!
- */
-#define PEEK() (*p->next)
-#define PEEK2() (*(p->next+1))
-#define MORE() (p->next < p->end)
-#define MORE2() (p->next+1 < p->end)
-#define SEE(c) (MORE() && PEEK() == (c))
-#define SEETWO(a, b) (MORE() && MORE2() && PEEK() == (a) && PEEK2() == (b))
-#define EAT(c) ((SEE(c)) ? (NEXT(), 1) : 0)
-#define EATTWO(a, b) ((SEETWO(a, b)) ? (NEXT2(), 1) : 0)
-#define NEXT() (p->next++)
-#define NEXT2() (p->next += 2)
-#define NEXTn(n) (p->next += (n))
-#define GETNEXT() (*p->next++)
-#define SETERROR(e) seterr(p, (e))
-#define REQUIRE(co, e) (void) ((co) || SETERROR(e))
-#define MUSTSEE(c, e) (REQUIRE(MORE() && PEEK() == (c), e))
-#define MUSTEAT(c, e) (REQUIRE(MORE() && GETNEXT() == (c), e))
-#define MUSTNOTSEE(c, e) (REQUIRE(!MORE() || PEEK() != (c), e))
-#define EMIT(op, sopnd) doemit(p, (sop)(op), (size_t)(sopnd))
-#define INSERT(op, pos) doinsert(p, (sop)(op), HERE()-(pos)+1, pos)
-#define AHEAD(pos) dofwd(p, pos, HERE()-(pos))
-#define ASTERN(sop, pos) EMIT(sop, HERE()-pos)
-#define HERE() (p->slen)
-#define THERE() (p->slen - 1)
-#define THERETHERE() (p->slen - 2)
-#define DROP(n) (p->slen -= (n))
-
-#ifndef NDEBUG
-static int never = 0; /* for use in asserts; shuts lint up */
-#else
-#define never 0 /* some <assert.h>s have bugs too */
-#endif
-
-/*
- - regcomp - interface for parser and compilation
- = extern int regcomp(regex_t *, const char *, int);
- = #define REG_BASIC 0000
- = #define REG_EXTENDED 0001
- = #define REG_ICASE 0002
- = #define REG_NOSUB 0004
- = #define REG_NEWLINE 0010
- = #define REG_NOSPEC 0020
- = #define REG_PEND 0040
- = #define REG_DUMP 0200
- */
-int /* 0 success, otherwise REG_something */
-regcomp(preg, pattern, cflags)
-regex_t *preg;
-const char *pattern;
-int cflags;
-{
- struct parse pa;
- register struct re_guts *g;
- register struct parse *p = &pa;
- register int i;
- register size_t len;
-#ifdef REDEBUG
-# define GOODFLAGS(f) (f)
-#else
-# define GOODFLAGS(f) ((f)&~REG_DUMP)
-#endif
-
- cflags = GOODFLAGS(cflags);
- if ((cflags&REG_EXTENDED) && (cflags&REG_NOSPEC))
- return(REG_INVARG);
-
- if (cflags&REG_PEND) {
- if (preg->re_endp < pattern)
- return(REG_INVARG);
- len = preg->re_endp - pattern;
- } else
- len = strlen((char *)pattern);
-
- /* do the mallocs early so failure handling is easy */
- g = (struct re_guts *)malloc(sizeof(struct re_guts) +
- (NC-1)*sizeof(cat_t));
- if (g == NULL)
- return(REG_ESPACE);
- p->ssize = len/(size_t)2*(size_t)3 + (size_t)1; /* ugh */
- p->strip = (sop *)malloc(p->ssize * sizeof(sop));
- p->slen = 0;
- if (p->strip == NULL) {
- free((char *)g);
- return(REG_ESPACE);
- }
-
- /* set things up */
- p->g = g;
- p->next = (char *)pattern; /* convenience; we do not modify it */
- p->end = p->next + len;
- p->error = 0;
- p->ncsalloc = 0;
- for (i = 0; i < NPAREN; i++) {
- p->pbegin[i] = 0;
- p->pend[i] = 0;
- }
- g->csetsize = NC;
- g->sets = NULL;
- g->setbits = NULL;
- g->ncsets = 0;
- g->cflags = cflags;
- g->iflags = 0;
- g->nbol = 0;
- g->neol = 0;
- g->must = NULL;
- g->mlen = 0;
- g->nsub = 0;
- g->ncategories = 1; /* category 0 is "everything else" */
- g->categories = &g->catspace[-(CHAR_MIN)];
- (void) memset((char *)g->catspace, 0, NC*sizeof(cat_t));
- g->backrefs = 0;
-
- /* do it */
- EMIT(OEND, 0);
- g->firststate = THERE();
- if (cflags&REG_EXTENDED)
- p_ere(p, OUT);
- else if (cflags&REG_NOSPEC)
- p_str(p);
- else
- p_bre(p, OUT, OUT);
- EMIT(OEND, 0);
- g->laststate = THERE();
-
- /* tidy up loose ends and fill things in */
- categorize(p, g);
- stripsnug(p, g);
- findmust(p, g);
- g->nplus = pluscount(p, g);
- g->magic = MAGIC2;
- preg->re_nsub = g->nsub;
- preg->re_g = g;
- preg->re_magic = MAGIC1;
-#ifndef REDEBUG
- /* not debugging, so can't rely on the assert() in regexec() */
- if (g->iflags&BAD)
- SETERROR(REG_ASSERT);
-#endif
-
- /* win or lose, we're done */
- if (p->error != 0) /* lose */
- regfree(preg);
- return(p->error);
-}
-
-/*
- - p_ere - ERE parser top level, concatenation and alternation
- == static void p_ere(register struct parse *p, int stop);
- */
-static void
-p_ere(p, stop)
-register struct parse *p;
-int stop; /* character this ERE should end at */
-{
- register char c;
- register sopno prevback = 0;
- register sopno prevfwd = 0;
- register sopno conc = 0;
- register int first = 1; /* is this the first alternative? */
-
- for (;;) {
- /* do a bunch of concatenated expressions */
- conc = HERE();
- while (MORE() && (c = PEEK()) != '|' && c != stop)
- p_ere_exp(p);
- REQUIRE(HERE() != conc, REG_EMPTY); /* require nonempty */
-
- if (!EAT('|'))
- break; /* NOTE BREAK OUT */
-
- if (first) {
- INSERT(OCH_, conc); /* offset is wrong */
- prevfwd = conc;
- prevback = conc;
- first = 0;
- }
- ASTERN(OOR1, prevback);
- prevback = THERE();
- AHEAD(prevfwd); /* fix previous offset */
- prevfwd = HERE();
- EMIT(OOR2, 0); /* offset is very wrong */
- }
-
- if (!first) { /* tail-end fixups */
- AHEAD(prevfwd);
- ASTERN(O_CH, prevback);
- }
-
- assert(!MORE() || SEE(stop));
-}
-
-/*
- - p_ere_exp - parse one subERE, an atom possibly followed by a repetition op
- == static void p_ere_exp(register struct parse *p);
- */
-static void
-p_ere_exp(p)
-register struct parse *p;
-{
- register char c;
- register sopno pos;
- register int count;
- register int count2;
- register sopno subno;
- int wascaret = 0;
-
- assert(MORE()); /* caller should have ensured this */
- c = GETNEXT();
-
- pos = HERE();
- switch (c) {
- case '(':
- REQUIRE(MORE(), REG_EPAREN);
- p->g->nsub++;
- subno = p->g->nsub;
- if (subno < NPAREN)
- p->pbegin[subno] = HERE();
- EMIT(OLPAREN, subno);
- if (!SEE(')'))
- p_ere(p, ')');
- if (subno < NPAREN) {
- p->pend[subno] = HERE();
- assert(p->pend[subno] != 0);
- }
- EMIT(ORPAREN, subno);
- MUSTEAT(')', REG_EPAREN);
- break;
-#ifndef POSIX_MISTAKE
- case ')': /* happens only if no current unmatched ( */
- /*
- * You may ask, why the ifndef? Because I didn't notice
- * this until slightly too late for 1003.2, and none of the
- * other 1003.2 regular-expression reviewers noticed it at
- * all. So an unmatched ) is legal POSIX, at least until
- * we can get it fixed.
- */
- SETERROR(REG_EPAREN);
- break;
-#endif
- case '^':
- EMIT(OBOL, 0);
- p->g->iflags |= USEBOL;
- p->g->nbol++;
- wascaret = 1;
- break;
- case '$':
- EMIT(OEOL, 0);
- p->g->iflags |= USEEOL;
- p->g->neol++;
- break;
- case '|':
- SETERROR(REG_EMPTY);
- break;
- case '*':
- case '+':
- case '?':
- SETERROR(REG_BADRPT);
- break;
- case '.':
- if (p->g->cflags&REG_NEWLINE)
- nonnewline(p);
- else
- EMIT(OANY, 0);
- break;
- case '[':
- p_bracket(p);
- break;
- case '\\':
- REQUIRE(MORE(), REG_EESCAPE);
- c = GETNEXT();
- ordinary(p, c);
- break;
- case '{': /* okay as ordinary except if digit follows */
- REQUIRE(!MORE() || !isdigit(PEEK()), REG_BADRPT);
- /* FALLTHROUGH */
- default:
- ordinary(p, c);
- break;
- }
-
- if (!MORE())
- return;
- c = PEEK();
- /* we call { a repetition if followed by a digit */
- if (!( c == '*' || c == '+' || c == '?' ||
- (c == '{' && MORE2() && isdigit(PEEK2())) ))
- return; /* no repetition, we're done */
- NEXT();
-
- REQUIRE(!wascaret, REG_BADRPT);
- switch (c) {
- case '*': /* implemented as +? */
- /* this case does not require the (y|) trick, noKLUDGE */
- INSERT(OPLUS_, pos);
- ASTERN(O_PLUS, pos);
- INSERT(OQUEST_, pos);
- ASTERN(O_QUEST, pos);
- break;
- case '+':
- INSERT(OPLUS_, pos);
- ASTERN(O_PLUS, pos);
- break;
- case '?':
- /* KLUDGE: emit y? as (y|) until subtle bug gets fixed */
- INSERT(OCH_, pos); /* offset slightly wrong */
- ASTERN(OOR1, pos); /* this one's right */
- AHEAD(pos); /* fix the OCH_ */
- EMIT(OOR2, 0); /* offset very wrong... */
- AHEAD(THERE()); /* ...so fix it */
- ASTERN(O_CH, THERETHERE());
- break;
- case '{':
- count = p_count(p);
- if (EAT(',')) {
- if (isdigit(PEEK())) {
- count2 = p_count(p);
- REQUIRE(count <= count2, REG_BADBR);
- } else /* single number with comma */
- count2 = INFINITY;
- } else /* just a single number */
- count2 = count;
- repeat(p, pos, count, count2);
- if (!EAT('}')) { /* error heuristics */
- while (MORE() && PEEK() != '}')
- NEXT();
- REQUIRE(MORE(), REG_EBRACE);
- SETERROR(REG_BADBR);
- }
- break;
- }
-
- if (!MORE())
- return;
- c = PEEK();
- if (!( c == '*' || c == '+' || c == '?' ||
- (c == '{' && MORE2() && isdigit(PEEK2())) ) )
- return;
- SETERROR(REG_BADRPT);
-}
-
-/*
- - p_str - string (no metacharacters) "parser"
- == static void p_str(register struct parse *p);
- */
-static void
-p_str(p)
-register struct parse *p;
-{
- REQUIRE(MORE(), REG_EMPTY);
- while (MORE())
- ordinary(p, GETNEXT());
-}
-
-/*
- - p_bre - BRE parser top level, anchoring and concatenation
- == static void p_bre(register struct parse *p, register int end1, \
- == register int end2);
- * Giving end1 as OUT essentially eliminates the end1/end2 check.
- *
- * This implementation is a bit of a kludge, in that a trailing $ is first
- * taken as an ordinary character and then revised to be an anchor. The
- * only undesirable side effect is that '$' gets included as a character
- * category in such cases. This is fairly harmless; not worth fixing.
- * The amount of lookahead needed to avoid this kludge is excessive.
- */
-static void
-p_bre(p, end1, end2)
-register struct parse *p;
-register int end1; /* first terminating character */
-register int end2; /* second terminating character */
-{
- register sopno start = HERE();
- register int first = 1; /* first subexpression? */
- register int wasdollar = 0;
-
- if (EAT('^')) {
- EMIT(OBOL, 0);
- p->g->iflags |= USEBOL;
- p->g->nbol++;
- }
- while (MORE() && !SEETWO(end1, end2)) {
- wasdollar = p_simp_re(p, first);
- first = 0;
- }
- if (wasdollar) { /* oops, that was a trailing anchor */
- DROP(1);
- EMIT(OEOL, 0);
- p->g->iflags |= USEEOL;
- p->g->neol++;
- }
-
- REQUIRE(HERE() != start, REG_EMPTY); /* require nonempty */
-}
-
-/*
- - p_simp_re - parse a simple RE, an atom possibly followed by a repetition
- == static int p_simp_re(register struct parse *p, int starordinary);
- */
-static int /* was the simple RE an unbackslashed $? */
-p_simp_re(p, starordinary)
-register struct parse *p;
-int starordinary; /* is a leading * an ordinary character? */
-{
- register int c;
- register int count;
- register int count2;
- register sopno pos;
- register int i;
- register sopno subno;
-# define BACKSL (1<<CHAR_BIT)
-
- pos = HERE(); /* repetion op, if any, covers from here */
-
- assert(MORE()); /* caller should have ensured this */
- c = GETNEXT();
- if (c == '\\') {
- REQUIRE(MORE(), REG_EESCAPE);
- c = BACKSL | (unsigned char)GETNEXT();
- }
- switch (c) {
- case '.':
- if (p->g->cflags&REG_NEWLINE)
- nonnewline(p);
- else
- EMIT(OANY, 0);
- break;
- case '[':
- p_bracket(p);
- break;
- case BACKSL|'{':
- SETERROR(REG_BADRPT);
- break;
- case BACKSL|'(':
- p->g->nsub++;
- subno = p->g->nsub;
- if (subno < NPAREN)
- p->pbegin[subno] = HERE();
- EMIT(OLPAREN, subno);
- /* the MORE here is an error heuristic */
- if (MORE() && !SEETWO('\\', ')'))
- p_bre(p, '\\', ')');
- if (subno < NPAREN) {
- p->pend[subno] = HERE();
- assert(p->pend[subno] != 0);
- }
- EMIT(ORPAREN, subno);
- REQUIRE(EATTWO('\\', ')'), REG_EPAREN);
- break;
- case BACKSL|')': /* should not get here -- must be user */
- case BACKSL|'}':
- SETERROR(REG_EPAREN);
- break;
- case BACKSL|'1':
- case BACKSL|'2':
- case BACKSL|'3':
- case BACKSL|'4':
- case BACKSL|'5':
- case BACKSL|'6':
- case BACKSL|'7':
- case BACKSL|'8':
- case BACKSL|'9':
- i = (c&~BACKSL) - '0';
- assert(i < NPAREN);
- if (p->pend[i] != 0) {
- assert(i <= p->g->nsub);
- EMIT(OBACK_, i);
- assert(p->pbegin[i] != 0);
- assert(OP(p->strip[p->pbegin[i]]) == OLPAREN);
- assert(OP(p->strip[p->pend[i]]) == ORPAREN);
- (void) dupl(p, p->pbegin[i]+1, p->pend[i]);
- EMIT(O_BACK, i);
- } else
- SETERROR(REG_ESUBREG);
- p->g->backrefs = 1;
- break;
- case '*':
- REQUIRE(starordinary, REG_BADRPT);
- /* FALLTHROUGH */
- default:
- ordinary(p, (char)c); /* takes off BACKSL, if any */
- break;
- }
-
- if (EAT('*')) { /* implemented as +? */
- /* this case does not require the (y|) trick, noKLUDGE */
- INSERT(OPLUS_, pos);
- ASTERN(O_PLUS, pos);
- INSERT(OQUEST_, pos);
- ASTERN(O_QUEST, pos);
- } else if (EATTWO('\\', '{')) {
- count = p_count(p);
- if (EAT(',')) {
- if (MORE() && isdigit(PEEK())) {
- count2 = p_count(p);
- REQUIRE(count <= count2, REG_BADBR);
- } else /* single number with comma */
- count2 = INFINITY;
- } else /* just a single number */
- count2 = count;
- repeat(p, pos, count, count2);
- if (!EATTWO('\\', '}')) { /* error heuristics */
- while (MORE() && !SEETWO('\\', '}'))
- NEXT();
- REQUIRE(MORE(), REG_EBRACE);
- SETERROR(REG_BADBR);
- }
- } else if (c == (unsigned char)'$') /* $ (but not \$) ends it */
- return(1);
-
- return(0);
-}
-
-/*
- - p_count - parse a repetition count
- == static int p_count(register struct parse *p);
- */
-static int /* the value */
-p_count(p)
-register struct parse *p;
-{
- register int count = 0;
- register int ndigits = 0;
-
- while (MORE() && isdigit(PEEK()) && count <= DUPMAX) {
- count = count*10 + (GETNEXT() - '0');
- ndigits++;
- }
-
- REQUIRE(ndigits > 0 && count <= DUPMAX, REG_BADBR);
- return(count);
-}
-
-/*
- - p_bracket - parse a bracketed character list
- == static void p_bracket(register struct parse *p);
- *
- * Note a significant property of this code: if the allocset() did SETERROR,
- * no set operations are done.
- */
-static void
-p_bracket(p)
-register struct parse *p;
-{
- register cset *cs = allocset(p);
- register int invert = 0;
-
- /* Dept of Truly Sickening Special-Case Kludges */
- if (p->next + 5 < p->end && strncmp(p->next, "[:<:]]", 6) == 0) {
- EMIT(OBOW, 0);
- NEXTn(6);
- return;
- }
- if (p->next + 5 < p->end && strncmp(p->next, "[:>:]]", 6) == 0) {
- EMIT(OEOW, 0);
- NEXTn(6);
- return;
- }
-
- if (EAT('^'))
- invert++; /* make note to invert set at end */
- if (EAT(']'))
- CHadd(cs, ']');
- else if (EAT('-'))
- CHadd(cs, '-');
- while (MORE() && PEEK() != ']' && !SEETWO('-', ']'))
- p_b_term(p, cs);
- if (EAT('-'))
- CHadd(cs, '-');
- MUSTEAT(']', REG_EBRACK);
-
- if (p->error != 0) /* don't mess things up further */
- return;
-
- if (p->g->cflags&REG_ICASE) {
- register int i;
- register int ci;
-
- for (i = p->g->csetsize - 1; i >= 0; i--)
- if (CHIN(cs, i) && isalpha(i)) {
- ci = othercase(i);
- if (ci != i)
- CHadd(cs, ci);
- }
- if (cs->multis != NULL)
- mccase(p, cs);
- }
- if (invert) {
- register int i;
-
- for (i = p->g->csetsize - 1; i >= 0; i--)
- if (CHIN(cs, i))
- CHsub(cs, i);
- else
- CHadd(cs, i);
- if (p->g->cflags&REG_NEWLINE)
- CHsub(cs, '\n');
- if (cs->multis != NULL)
- mcinvert(p, cs);
- }
-
- assert(cs->multis == NULL); /* xxx */
-
- if (nch(p, cs) == 1) { /* optimize singleton sets */
- ordinary(p, firstch(p, cs));
- freeset(p, cs);
- } else
- EMIT(OANYOF, freezeset(p, cs));
-}
-
-/*
- - p_b_term - parse one term of a bracketed character list
- == static void p_b_term(register struct parse *p, register cset *cs);
- */
-static void
-p_b_term(p, cs)
-register struct parse *p;
-register cset *cs;
-{
- register char c;
- register char start, finish;
- register int i;
-
- /* classify what we've got */
- switch ((MORE()) ? PEEK() : '\0') {
- case '[':
- c = (MORE2()) ? PEEK2() : '\0';
- break;
- case '-':
- SETERROR(REG_ERANGE);
- return; /* NOTE RETURN */
- break;
- default:
- c = '\0';
- break;
- }
-
- switch (c) {
- case ':': /* character class */
- NEXT2();
- REQUIRE(MORE(), REG_EBRACK);
- c = PEEK();
- REQUIRE(c != '-' && c != ']', REG_ECTYPE);
- p_b_cclass(p, cs);
- REQUIRE(MORE(), REG_EBRACK);
- REQUIRE(EATTWO(':', ']'), REG_ECTYPE);
- break;
- case '=': /* equivalence class */
- NEXT2();
- REQUIRE(MORE(), REG_EBRACK);
- c = PEEK();
- REQUIRE(c != '-' && c != ']', REG_ECOLLATE);
- p_b_eclass(p, cs);
- REQUIRE(MORE(), REG_EBRACK);
- REQUIRE(EATTWO('=', ']'), REG_ECOLLATE);
- break;
- default: /* symbol, ordinary character, or range */
-/* xxx revision needed for multichar stuff */
- start = p_b_symbol(p);
- if (SEE('-') && MORE2() && PEEK2() != ']') {
- /* range */
- NEXT();
- if (EAT('-'))
- finish = '-';
- else
- finish = p_b_symbol(p);
- } else
- finish = start;
-/* xxx what about signed chars here... */
- REQUIRE(start <= finish, REG_ERANGE);
- for (i = start; i <= finish; i++)
- CHadd(cs, i);
- break;
- }
-}
-
-/*
- - p_b_cclass - parse a character-class name and deal with it
- == static void p_b_cclass(register struct parse *p, register cset *cs);
- */
-static void
-p_b_cclass(p, cs)
-register struct parse *p;
-register cset *cs;
-{
- register char *sp = p->next;
- register struct cclass *cp;
- register size_t len;
- register const char *u;
- register char c;
-
- while (MORE() && isalpha(PEEK()))
- NEXT();
- len = p->next - sp;
- for (cp = cclasses; cp->name != NULL; cp++)
- if (strncmp(cp->name, sp, len) == 0 && cp->name[len] == '\0')
- break;
- if (cp->name == NULL) {
- /* oops, didn't find it */
- SETERROR(REG_ECTYPE);
- return;
- }
-
- u = cp->chars;
- while ((c = *u++) != '\0')
- CHadd(cs, c);
- for (u = cp->multis; *u != '\0'; u += strlen(u) + 1)
- MCadd(p, cs, u);
-}
-
-/*
- - p_b_eclass - parse an equivalence-class name and deal with it
- == static void p_b_eclass(register struct parse *p, register cset *cs);
- *
- * This implementation is incomplete. xxx
- */
-static void
-p_b_eclass(p, cs)
-register struct parse *p;
-register cset *cs;
-{
- register char c;
-
- c = p_b_coll_elem(p, '=');
- CHadd(cs, c);
-}
-
-/*
- - p_b_symbol - parse a character or [..]ed multicharacter collating symbol
- == static char p_b_symbol(register struct parse *p);
- */
-static char /* value of symbol */
-p_b_symbol(p)
-register struct parse *p;
-{
- register char value;
-
- REQUIRE(MORE(), REG_EBRACK);
- if (!EATTWO('[', '.'))
- return(GETNEXT());
-
- /* collating symbol */
- value = p_b_coll_elem(p, '.');
- REQUIRE(EATTWO('.', ']'), REG_ECOLLATE);
- return(value);
-}
-
-/*
- - p_b_coll_elem - parse a collating-element name and look it up
- == static char p_b_coll_elem(register struct parse *p, int endc);
- */
-static char /* value of collating element */
-p_b_coll_elem(p, endc)
-register struct parse *p;
-int endc; /* name ended by endc,']' */
-{
- register char *sp = p->next;
- register struct cname *cp;
- register int len;
-
- while (MORE() && !SEETWO(endc, ']'))
- NEXT();
- if (!MORE()) {
- SETERROR(REG_EBRACK);
- return(0);
- }
- len = p->next - sp;
- for (cp = cnames; cp->name != NULL; cp++)
- if (strncmp(cp->name, sp, len) == 0 && cp->name[len] == '\0')
- return(cp->code); /* known name */
- if (len == 1)
- return(*sp); /* single character */
- SETERROR(REG_ECOLLATE); /* neither */
- return(0);
-}
-
-/*
- - othercase - return the case counterpart of an alphabetic
- == static char othercase(int ch);
- */
-static char /* if no counterpart, return ch */
-othercase(ch)
-int ch;
-{
- assert(isalpha(ch));
- if (isupper(ch))
- return(tolower(ch));
- else if (islower(ch))
- return(toupper(ch));
- else /* peculiar, but could happen */
- return(ch);
-}
-
-/*
- - bothcases - emit a dualcase version of a two-case character
- == static void bothcases(register struct parse *p, int ch);
- *
- * Boy, is this implementation ever a kludge...
- */
-static void
-bothcases(p, ch)
-register struct parse *p;
-int ch;
-{
- register char *oldnext = p->next;
- register char *oldend = p->end;
- char bracket[3];
-
- assert(othercase(ch) != ch); /* p_bracket() would recurse */
- p->next = bracket;
- p->end = bracket+2;
- bracket[0] = ch;
- bracket[1] = ']';
- bracket[2] = '\0';
- p_bracket(p);
- assert(p->next == bracket+2);
- p->next = oldnext;
- p->end = oldend;
-}
-
-/*
- - ordinary - emit an ordinary character
- == static void ordinary(register struct parse *p, register int ch);
- */
-static void
-ordinary(p, ch)
-register struct parse *p;
-register int ch;
-{
- register cat_t *cap = p->g->categories;
-
- if ((p->g->cflags&REG_ICASE) && isalpha(ch) && othercase(ch) != ch)
- bothcases(p, ch);
- else {
- EMIT(OCHAR, (unsigned char)ch);
- if (cap[ch] == 0)
- cap[ch] = p->g->ncategories++;
- }
-}
-
-/*
- - nonnewline - emit REG_NEWLINE version of OANY
- == static void nonnewline(register struct parse *p);
- *
- * Boy, is this implementation ever a kludge...
- */
-static void
-nonnewline(p)
-register struct parse *p;
-{
- register char *oldnext = p->next;
- register char *oldend = p->end;
- char bracket[4];
-
- p->next = bracket;
- p->end = bracket+3;
- bracket[0] = '^';
- bracket[1] = '\n';
- bracket[2] = ']';
- bracket[3] = '\0';
- p_bracket(p);
- assert(p->next == bracket+3);
- p->next = oldnext;
- p->end = oldend;
-}
-
-/*
- - repeat - generate code for a bounded repetition, recursively if needed
- == static void repeat(register struct parse *p, sopno start, int from, int to);
- */
-static void
-repeat(p, start, from, to)
-register struct parse *p;
-sopno start; /* operand from here to end of strip */
-int from; /* repeated from this number */
-int to; /* to this number of times (maybe INFINITY) */
-{
- register sopno finish = HERE();
-# define N 2
-# define INF 3
-# define REP(f, t) ((f)*8 + (t))
-# define MAP(n) (((n) <= 1) ? (n) : ((n) == INFINITY) ? INF : N)
- register sopno copy;
-
- if (p->error != 0) /* head off possible runaway recursion */
- return;
-
- assert(from <= to);
-
- switch (REP(MAP(from), MAP(to))) {
- case REP(0, 0): /* must be user doing this */
- DROP(finish-start); /* drop the operand */
- break;
- case REP(0, 1): /* as x{1,1}? */
- case REP(0, N): /* as x{1,n}? */
- case REP(0, INF): /* as x{1,}? */
- /* KLUDGE: emit y? as (y|) until subtle bug gets fixed */
- INSERT(OCH_, start); /* offset is wrong... */
- repeat(p, start+1, 1, to);
- ASTERN(OOR1, start);
- AHEAD(start); /* ... fix it */
- EMIT(OOR2, 0);
- AHEAD(THERE());
- ASTERN(O_CH, THERETHERE());
- break;
- case REP(1, 1): /* trivial case */
- /* done */
- break;
- case REP(1, N): /* as x?x{1,n-1} */
- /* KLUDGE: emit y? as (y|) until subtle bug gets fixed */
- INSERT(OCH_, start);
- ASTERN(OOR1, start);
- AHEAD(start);
- EMIT(OOR2, 0); /* offset very wrong... */
- AHEAD(THERE()); /* ...so fix it */
- ASTERN(O_CH, THERETHERE());
- copy = dupl(p, start+1, finish+1);
- assert(copy == finish+4);
- repeat(p, copy, 1, to-1);
- break;
- case REP(1, INF): /* as x+ */
- INSERT(OPLUS_, start);
- ASTERN(O_PLUS, start);
- break;
- case REP(N, N): /* as xx{m-1,n-1} */
- copy = dupl(p, start, finish);
- repeat(p, copy, from-1, to-1);
- break;
- case REP(N, INF): /* as xx{n-1,INF} */
- copy = dupl(p, start, finish);
- repeat(p, copy, from-1, to);
- break;
- default: /* "can't happen" */
- SETERROR(REG_ASSERT); /* just in case */
- break;
- }
-}
-
-/*
- - seterr - set an error condition
- == static int seterr(register struct parse *p, int e);
- */
-static int /* useless but makes type checking happy */
-seterr(p, e)
-register struct parse *p;
-int e;
-{
- if (p->error == 0) /* keep earliest error condition */
- p->error = e;
- p->next = nuls; /* try to bring things to a halt */
- p->end = nuls;
- return(0); /* make the return value well-defined */
-}
-
-/*
- - allocset - allocate a set of characters for []
- == static cset *allocset(register struct parse *p);
- */
-static cset *
-allocset(p)
-register struct parse *p;
-{
- register int no = p->g->ncsets++;
- register size_t nc;
- register size_t nbytes;
- register cset *cs;
- register size_t css = (size_t)p->g->csetsize;
- register int i;
-
- if (no >= p->ncsalloc) { /* need another column of space */
- p->ncsalloc += CHAR_BIT;
- nc = p->ncsalloc;
- assert(nc % CHAR_BIT == 0);
- nbytes = nc / CHAR_BIT * css;
- if (p->g->sets == NULL)
- p->g->sets = (cset *)malloc(nc * sizeof(cset));
- else
- p->g->sets = (cset *)realloc((char *)p->g->sets,
- nc * sizeof(cset));
- if (p->g->setbits == NULL)
- p->g->setbits = (uch *)malloc(nbytes);
- else {
- p->g->setbits = (uch *)realloc((char *)p->g->setbits,
- nbytes);
- /* xxx this isn't right if setbits is now NULL */
- for (i = 0; i < no; i++)
- p->g->sets[i].ptr = p->g->setbits + css*(i/CHAR_BIT);
- }
- if (p->g->sets != NULL && p->g->setbits != NULL)
- (void) memset((char *)p->g->setbits + (nbytes - css),
- 0, css);
- else {
- no = 0;
- SETERROR(REG_ESPACE);
- /* caller's responsibility not to do set ops */
- }
- }
-
- assert(p->g->sets != NULL); /* xxx */
- cs = &p->g->sets[no];
- cs->ptr = p->g->setbits + css*((no)/CHAR_BIT);
- cs->mask = 1 << ((no) % CHAR_BIT);
- cs->hash = 0;
- cs->smultis = 0;
- cs->multis = NULL;
-
- return(cs);
-}
-
-/*
- - freeset - free a now-unused set
- == static void freeset(register struct parse *p, register cset *cs);
- */
-static void
-freeset(p, cs)
-register struct parse *p;
-register cset *cs;
-{
- register size_t i;
- register cset *top = &p->g->sets[p->g->ncsets];
- register size_t css = (size_t)p->g->csetsize;
-
- for (i = 0; i < css; i++)
- CHsub(cs, i);
- if (cs == top-1) /* recover only the easy case */
- p->g->ncsets--;
-}
-
-/*
- - freezeset - final processing on a set of characters
- == static int freezeset(register struct parse *p, register cset *cs);
- *
- * The main task here is merging identical sets. This is usually a waste
- * of time (although the hash code minimizes the overhead), but can win
- * big if REG_ICASE is being used. REG_ICASE, by the way, is why the hash
- * is done using addition rather than xor -- all ASCII [aA] sets xor to
- * the same value!
- */
-static int /* set number */
-freezeset(p, cs)
-register struct parse *p;
-register cset *cs;
-{
- register uch h = cs->hash;
- register size_t i;
- register cset *top = &p->g->sets[p->g->ncsets];
- register cset *cs2;
- register size_t css = (size_t)p->g->csetsize;
-
- /* look for an earlier one which is the same */
- for (cs2 = &p->g->sets[0]; cs2 < top; cs2++)
- if (cs2->hash == h && cs2 != cs) {
- /* maybe */
- for (i = 0; i < css; i++)
- if (!!CHIN(cs2, i) != !!CHIN(cs, i))
- break; /* no */
- if (i == css)
- break; /* yes */
- }
-
- if (cs2 < top) { /* found one */
- freeset(p, cs);
- cs = cs2;
- }
-
- return((int)(cs - p->g->sets));
-}
-
-/*
- - firstch - return first character in a set (which must have at least one)
- == static int firstch(register struct parse *p, register cset *cs);
- */
-static int /* character; there is no "none" value */
-firstch(p, cs)
-register struct parse *p;
-register cset *cs;
-{
- register size_t i;
- register size_t css = (size_t)p->g->csetsize;
-
- for (i = 0; i < css; i++)
- if (CHIN(cs, i))
- return((char)i);
- assert(never);
- return(0); /* arbitrary */
-}
-
-/*
- - nch - number of characters in a set
- == static int nch(register struct parse *p, register cset *cs);
- */
-static int
-nch(p, cs)
-register struct parse *p;
-register cset *cs;
-{
- register size_t i;
- register size_t css = (size_t)p->g->csetsize;
- register int n = 0;
-
- for (i = 0; i < css; i++)
- if (CHIN(cs, i))
- n++;
- return(n);
-}
-
-/*
- - mcadd - add a collating element to a cset
- == static void mcadd(register struct parse *p, register cset *cs, \
- == register char *cp);
- */
-static void
-mcadd(p, cs, cp)
-register struct parse *p;
-register cset *cs;
-register const char *cp;
-{
- register size_t oldend = cs->smultis;
-
- cs->smultis += strlen(cp) + 1;
- if (cs->multis == NULL)
- cs->multis = malloc(cs->smultis);
- else
- cs->multis = realloc(cs->multis, cs->smultis);
- if (cs->multis == NULL) {
- SETERROR(REG_ESPACE);
- return;
- }
-
- (void) strcpy(cs->multis + oldend - 1, cp);
- cs->multis[cs->smultis - 1] = '\0';
-}
-
-/*
- - mcinvert - invert the list of collating elements in a cset
- == static void mcinvert(register struct parse *p, register cset *cs);
- *
- * This would have to know the set of possibilities. Implementation
- * is deferred.
- */
-static void
-mcinvert(p, cs)
-register struct parse *p;
-register cset *cs;
-{
- assert(cs->multis == NULL); /* xxx */
-}
-
-/*
- - mccase - add case counterparts of the list of collating elements in a cset
- == static void mccase(register struct parse *p, register cset *cs);
- *
- * This would have to know the set of possibilities. Implementation
- * is deferred.
- */
-static void
-mccase(p, cs)
-register struct parse *p;
-register cset *cs;
-{
- assert(cs->multis == NULL); /* xxx */
-}
-
-/*
- - isinsets - is this character in any sets?
- == static int isinsets(register struct re_guts *g, int c);
- */
-static int /* predicate */
-isinsets(g, c)
-register struct re_guts *g;
-int c;
-{
- register uch *col;
- register int i;
- register int ncols = (g->ncsets+(CHAR_BIT-1)) / CHAR_BIT;
- register unsigned uc = (unsigned char)c;
-
- for (i = 0, col = g->setbits; i < ncols; i++, col += g->csetsize)
- if (col[uc] != 0)
- return(1);
- return(0);
-}
-
-/*
- - samesets - are these two characters in exactly the same sets?
- == static int samesets(register struct re_guts *g, int c1, int c2);
- */
-static int /* predicate */
-samesets(g, c1, c2)
-register struct re_guts *g;
-int c1;
-int c2;
-{
- register uch *col;
- register int i;
- register int ncols = (g->ncsets+(CHAR_BIT-1)) / CHAR_BIT;
- register unsigned uc1 = (unsigned char)c1;
- register unsigned uc2 = (unsigned char)c2;
-
- for (i = 0, col = g->setbits; i < ncols; i++, col += g->csetsize)
- if (col[uc1] != col[uc2])
- return(0);
- return(1);
-}
-
-/*
- - categorize - sort out character categories
- == static void categorize(struct parse *p, register struct re_guts *g);
- */
-static void
-categorize(p, g)
-struct parse *p;
-register struct re_guts *g;
-{
- register cat_t *cats = g->categories;
- register int c;
- register int c2;
- register cat_t cat;
-
- /* avoid making error situations worse */
- if (p->error != 0)
- return;
-
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (cats[c] == 0 && isinsets(g, c)) {
- cat = g->ncategories++;
- cats[c] = cat;
- for (c2 = c+1; c2 <= CHAR_MAX; c2++)
- if (cats[c2] == 0 && samesets(g, c, c2))
- cats[c2] = cat;
- }
-}
-
-/*
- - dupl - emit a duplicate of a bunch of sops
- == static sopno dupl(register struct parse *p, sopno start, sopno finish);
- */
-static sopno /* start of duplicate */
-dupl(p, start, finish)
-register struct parse *p;
-sopno start; /* from here */
-sopno finish; /* to this less one */
-{
- register sopno ret = HERE();
- register sopno len = finish - start;
-
- assert(finish >= start);
- if (len == 0)
- return(ret);
- enlarge(p, p->ssize + len); /* this many unexpected additions */
- assert(p->ssize >= p->slen + len);
- (void) memcpy((char *)(p->strip + p->slen),
- (char *)(p->strip + start), (size_t)len*sizeof(sop));
- p->slen += len;
- return(ret);
-}
-
-/*
- - doemit - emit a strip operator
- == static void doemit(register struct parse *p, sop op, size_t opnd);
- *
- * It might seem better to implement this as a macro with a function as
- * hard-case backup, but it's just too big and messy unless there are
- * some changes to the data structures. Maybe later.
- */
-static void
-doemit(p, op, opnd)
-register struct parse *p;
-sop op;
-size_t opnd;
-{
- /* avoid making error situations worse */
- if (p->error != 0)
- return;
-
- /* deal with oversize operands ("can't happen", more or less) */
- assert(opnd < 1<<OPSHIFT);
-
- /* deal with undersized strip */
- if (p->slen >= p->ssize)
- enlarge(p, (p->ssize+1) / 2 * 3); /* +50% */
- assert(p->slen < p->ssize);
-
- /* finally, it's all reduced to the easy case */
- p->strip[p->slen++] = SOP(op, opnd);
-}
-
-/*
- - doinsert - insert a sop into the strip
- == static void doinsert(register struct parse *p, sop op, size_t opnd, sopno pos);
- */
-static void
-doinsert(p, op, opnd, pos)
-register struct parse *p;
-sop op;
-size_t opnd;
-sopno pos;
-{
- register sopno sn;
- register sop s;
- register int i;
-
- /* avoid making error situations worse */
- if (p->error != 0)
- return;
-
- sn = HERE();
- EMIT(op, opnd); /* do checks, ensure space */
- assert(HERE() == sn+1);
- s = p->strip[sn];
-
- /* adjust paren pointers */
- assert(pos > 0);
- for (i = 1; i < NPAREN; i++) {
- if (p->pbegin[i] >= pos) {
- p->pbegin[i]++;
- }
- if (p->pend[i] >= pos) {
- p->pend[i]++;
- }
- }
-
- memmove((char *)&p->strip[pos+1], (char *)&p->strip[pos],
- (HERE()-pos-1)*sizeof(sop));
- p->strip[pos] = s;
-}
-
-/*
- - dofwd - complete a forward reference
- == static void dofwd(register struct parse *p, sopno pos, sop value);
- */
-static void
-dofwd(p, pos, value)
-register struct parse *p;
-register sopno pos;
-sop value;
-{
- /* avoid making error situations worse */
- if (p->error != 0)
- return;
-
- assert(value < 1<<OPSHIFT);
- p->strip[pos] = OP(p->strip[pos]) | value;
-}
-
-/*
- - enlarge - enlarge the strip
- == static void enlarge(register struct parse *p, sopno size);
- */
-static void
-enlarge(p, size)
-register struct parse *p;
-register sopno size;
-{
- register sop *sp;
-
- if (p->ssize >= size)
- return;
-
- sp = (sop *)realloc(p->strip, size*sizeof(sop));
- if (sp == NULL) {
- SETERROR(REG_ESPACE);
- return;
- }
- p->strip = sp;
- p->ssize = size;
-}
-
-/*
- - stripsnug - compact the strip
- == static void stripsnug(register struct parse *p, register struct re_guts *g);
- */
-static void
-stripsnug(p, g)
-register struct parse *p;
-register struct re_guts *g;
-{
- g->nstates = p->slen;
- g->strip = (sop *)realloc((char *)p->strip, p->slen * sizeof(sop));
- if (g->strip == NULL) {
- SETERROR(REG_ESPACE);
- g->strip = p->strip;
- }
-}
-
-/*
- - findmust - fill in must and mlen with longest mandatory literal string
- == static void findmust(register struct parse *p, register struct re_guts *g);
- *
- * This algorithm could do fancy things like analyzing the operands of |
- * for common subsequences. Someday. This code is simple and finds most
- * of the interesting cases.
- *
- * Note that must and mlen got initialized during setup.
- */
-static void
-findmust(p, g)
-struct parse *p;
-register struct re_guts *g;
-{
- register sop *scan;
- sop *start = NULL;
- register sop *newstart = NULL;
- register sopno newlen;
- register sop s;
- register char *cp;
- register sopno i;
-
- /* avoid making error situations worse */
- if (p->error != 0)
- return;
-
- /* find the longest OCHAR sequence in strip */
- newlen = 0;
- scan = g->strip + 1;
- do {
- s = *scan++;
- switch (OP(s)) {
- case OCHAR: /* sequence member */
- if (newlen == 0) /* new sequence */
- newstart = scan - 1;
- newlen++;
- break;
- case OPLUS_: /* things that don't break one */
- case OLPAREN:
- case ORPAREN:
- break;
- case OQUEST_: /* things that must be skipped */
- case OCH_:
- scan--;
- do {
- scan += OPND(s);
- s = *scan;
- /* assert() interferes w debug printouts */
- if (OP(s) != O_QUEST && OP(s) != O_CH &&
- OP(s) != OOR2) {
- g->iflags |= BAD;
- return;
- }
- } while (OP(s) != O_QUEST && OP(s) != O_CH);
- /* fallthrough */
- default: /* things that break a sequence */
- if (newlen > g->mlen) { /* ends one */
- start = newstart;
- g->mlen = newlen;
- }
- newlen = 0;
- break;
- }
- } while (OP(s) != OEND);
-
- if (g->mlen == 0) /* there isn't one */
- return;
-
- /* turn it into a character string */
- g->must = malloc((size_t)g->mlen + 1);
- if (g->must == NULL) { /* argh; just forget it */
- g->mlen = 0;
- return;
- }
- cp = g->must;
- scan = start;
- for (i = g->mlen; i > 0; i--) {
- while (OP(s = *scan++) != OCHAR)
- continue;
- assert(cp < g->must + g->mlen);
- *cp++ = (char)OPND(s);
- }
- assert(cp == g->must + g->mlen);
- *cp++ = '\0'; /* just on general principles */
-}
-
-/*
- - pluscount - count + nesting
- == static sopno pluscount(register struct parse *p, register struct re_guts *g);
- */
-static sopno /* nesting depth */
-pluscount(p, g)
-struct parse *p;
-register struct re_guts *g;
-{
- register sop *scan;
- register sop s;
- register sopno plusnest = 0;
- register sopno maxnest = 0;
-
- if (p->error != 0)
- return(0); /* there may not be an OEND */
-
- scan = g->strip + 1;
- do {
- s = *scan++;
- switch (OP(s)) {
- case OPLUS_:
- plusnest++;
- break;
- case O_PLUS:
- if (plusnest > maxnest)
- maxnest = plusnest;
- plusnest--;
- break;
- }
- } while (OP(s) != OEND);
- if (plusnest != 0)
- g->iflags |= BAD;
- return(maxnest);
-}
diff --git a/winsup/cygwin/regex/regcomp.ih b/winsup/cygwin/regex/regcomp.ih
deleted file mode 100644
index e16d5ab..0000000
--- a/winsup/cygwin/regex/regcomp.ih
+++ /dev/null
@@ -1,48 +0,0 @@
-/* ========= begin header generated by ./mkh ========= */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* === regcomp.c === */
-static void p_ere(register struct parse *p, int stop);
-static void p_ere_exp(register struct parse *p);
-static void p_str(register struct parse *p);
-static void p_bre(register struct parse *p, register int end1, register int end2);
-static int p_simp_re(register struct parse *p, int starordinary);
-static int p_count(register struct parse *p);
-static void p_bracket(register struct parse *p);
-static void p_b_term(register struct parse *p, register cset *cs);
-static void p_b_cclass(register struct parse *p, register cset *cs);
-static void p_b_eclass(register struct parse *p, register cset *cs);
-static char p_b_symbol(register struct parse *p);
-static char p_b_coll_elem(register struct parse *p, int endc);
-static char othercase(int ch);
-static void bothcases(register struct parse *p, int ch);
-static void ordinary(register struct parse *p, register int ch);
-static void nonnewline(register struct parse *p);
-static void repeat(register struct parse *p, sopno start, int from, int to);
-static int seterr(register struct parse *p, int e);
-static cset *allocset(register struct parse *p);
-static void freeset(register struct parse *p, register cset *cs);
-static int freezeset(register struct parse *p, register cset *cs);
-static int firstch(register struct parse *p, register cset *cs);
-static int nch(register struct parse *p, register cset *cs);
-static void mcadd(register struct parse *p, register cset *cs, register const char *cp);
-static void mcinvert(register struct parse *p, register cset *cs);
-static void mccase(register struct parse *p, register cset *cs);
-static int isinsets(register struct re_guts *g, int c);
-static int samesets(register struct re_guts *g, int c1, int c2);
-static void categorize(struct parse *p, register struct re_guts *g);
-static sopno dupl(register struct parse *p, sopno start, sopno finish);
-static void doemit(register struct parse *p, sop op, size_t opnd);
-static void doinsert(register struct parse *p, sop op, size_t opnd, sopno pos);
-static void dofwd(register struct parse *p, sopno pos, sop value);
-static void enlarge(register struct parse *p, sopno size);
-static void stripsnug(register struct parse *p, register struct re_guts *g);
-static void findmust(register struct parse *p, register struct re_guts *g);
-static sopno pluscount(register struct parse *p, register struct re_guts *g);
-
-#ifdef __cplusplus
-}
-#endif
-/* ========= end header generated by ./mkh ========= */
diff --git a/winsup/cygwin/regex/regerror.c b/winsup/cygwin/regex/regerror.c
deleted file mode 100644
index 42b045b..0000000
--- a/winsup/cygwin/regex/regerror.c
+++ /dev/null
@@ -1,127 +0,0 @@
-#include "winsup.h"
-#include <sys/types.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <limits.h>
-#include <stdlib.h>
-#include "regex.h"
-
-#include "utils.h"
-#include "regerror.ih"
-
-/*
- = #define REG_OKAY 0
- = #define REG_NOMATCH 1
- = #define REG_BADPAT 2
- = #define REG_ECOLLATE 3
- = #define REG_ECTYPE 4
- = #define REG_EESCAPE 5
- = #define REG_ESUBREG 6
- = #define REG_EBRACK 7
- = #define REG_EPAREN 8
- = #define REG_EBRACE 9
- = #define REG_BADBR 10
- = #define REG_ERANGE 11
- = #define REG_ESPACE 12
- = #define REG_BADRPT 13
- = #define REG_EMPTY 14
- = #define REG_ASSERT 15
- = #define REG_INVARG 16
- = #define REG_ATOI 255 // convert name to number (!)
- = #define REG_ITOA 0400 // convert number to name (!)
- */
-static struct rerr {
- int code;
- const char *name;
- const char *explain;
-} rerrs[] = {
- {REG_OKAY, "REG_OKAY", "no errors detected"},
- {REG_NOMATCH, "REG_NOMATCH", "regexec() failed to match"},
- {REG_BADPAT, "REG_BADPAT", "invalid regular expression"},
- {REG_ECOLLATE, "REG_ECOLLATE", "invalid collating element"},
- {REG_ECTYPE, "REG_ECTYPE", "invalid character class"},
- {REG_EESCAPE, "REG_EESCAPE", "trailing backslash (\\)"},
- {REG_ESUBREG, "REG_ESUBREG", "invalid backreference number"},
- {REG_EBRACK, "REG_EBRACK", "brackets ([ ]) not balanced"},
- {REG_EPAREN, "REG_EPAREN", "parentheses not balanced"},
- {REG_EBRACE, "REG_EBRACE", "braces not balanced"},
- {REG_BADBR, "REG_BADBR", "invalid repetition count(s)"},
- {REG_ERANGE, "REG_ERANGE", "invalid character range"},
- {REG_ESPACE, "REG_ESPACE", "out of memory"},
- {REG_BADRPT, "REG_BADRPT", "repetition-operator operand invalid"},
- {REG_EMPTY, "REG_EMPTY", "empty (sub)expression"},
- {REG_ASSERT, "REG_ASSERT", "\"can't happen\" -- you found a bug"},
- {REG_INVARG, "REG_INVARG", "invalid argument to regex routine"},
- {-1, "", "*** unknown regexp error code ***"},
-};
-
-/*
- - regerror - the interface to error numbers
- = extern size_t regerror(int, const regex_t *, char *, size_t);
- */
-/* ARGSUSED */
-size_t
-regerror(errcode, preg, errbuf, errbuf_size)
-int errcode;
-const regex_t *preg;
-char *errbuf;
-size_t errbuf_size;
-{
- register struct rerr *r;
- register size_t len;
- register int target = errcode &~ REG_ITOA;
- register const char *s;
- char convbuf[50];
-
- if (errcode == REG_ATOI)
- s = regatoi(preg, convbuf);
- else {
- for (r = rerrs; r->code >= 0; r++)
- if (r->code == target)
- break;
-
- if (errcode&REG_ITOA) {
- if (r->code >= 0)
- (void) strcpy(convbuf, r->name);
- else
- sprintf(convbuf, "REG_0x%x", target);
- assert(strlen(convbuf) < sizeof(convbuf));
- s = convbuf;
- } else
- s = r->explain;
- }
-
- len = strlen(s) + 1;
- if (errbuf_size > 0) {
- if (errbuf_size > len)
- (void) strcpy(errbuf, s);
- else {
- (void) strncpy(errbuf, s, errbuf_size-1);
- errbuf[errbuf_size-1] = '\0';
- }
- }
-
- return(len);
-}
-
-/*
- - regatoi - internal routine to implement REG_ATOI
- == static char *regatoi(const regex_t *preg, char *localbuf);
- */
-static const char *
-regatoi(preg, localbuf)
-const regex_t *preg;
-char *localbuf;
-{
- register struct rerr *r;
-
- for (r = rerrs; r->code >= 0; r++)
- if (strcmp(r->name, preg->re_endp) == 0)
- break;
- if (r->code < 0)
- return("0");
-
- sprintf(localbuf, "%d", r->code);
- return(localbuf);
-}
diff --git a/winsup/cygwin/regex/regerror.ih b/winsup/cygwin/regex/regerror.ih
deleted file mode 100644
index d428544..0000000
--- a/winsup/cygwin/regex/regerror.ih
+++ /dev/null
@@ -1,12 +0,0 @@
-/* ========= begin header generated by ./mkh ========= */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* === regerror.c === */
-static const char *regatoi(const regex_t *preg, char *localbuf);
-
-#ifdef __cplusplus
-}
-#endif
-/* ========= end header generated by ./mkh ========= */
diff --git a/winsup/cygwin/regex/regex.3 b/winsup/cygwin/regex/regex.3
deleted file mode 100644
index bc74709..0000000
--- a/winsup/cygwin/regex/regex.3
+++ /dev/null
@@ -1,509 +0,0 @@
-.TH REGEX 3 "25 Sept 1997"
-.BY "Henry Spencer"
-.de ZR
-.\" one other place knows this name: the SEE ALSO section
-.IR regex (7) \\$1
-..
-.SH NAME
-regcomp, regexec, regerror, regfree \- regular-expression library
-.SH SYNOPSIS
-.ft B
-.\".na
-#include <sys/types.h>
-.br
-#include <regex.h>
-.HP 10
-int regcomp(regex_t\ *preg, const\ char\ *pattern, int\ cflags);
-.HP
-int\ regexec(const\ regex_t\ *preg, const\ char\ *string,
-size_t\ nmatch, regmatch_t\ pmatch[], int\ eflags);
-.HP
-size_t\ regerror(int\ errcode, const\ regex_t\ *preg,
-char\ *errbuf, size_t\ errbuf_size);
-.HP
-void\ regfree(regex_t\ *preg);
-.\".ad
-.ft
-.SH DESCRIPTION
-These routines implement POSIX 1003.2 regular expressions (``RE''s);
-see
-.ZR .
-.I Regcomp
-compiles an RE written as a string into an internal form,
-.I regexec
-matches that internal form against a string and reports results,
-.I regerror
-transforms error codes from either into human-readable messages,
-and
-.I regfree
-frees any dynamically-allocated storage used by the internal form
-of an RE.
-.PP
-The header
-.I <regex.h>
-declares two structure types,
-.I regex_t
-and
-.IR regmatch_t ,
-the former for compiled internal forms and the latter for match reporting.
-It also declares the four functions,
-a type
-.IR regoff_t ,
-and a number of constants with names starting with ``REG_''.
-.PP
-.I Regcomp
-compiles the regular expression contained in the
-.I pattern
-string,
-subject to the flags in
-.IR cflags ,
-and places the results in the
-.I regex_t
-structure pointed to by
-.IR preg .
-.I Cflags
-is the bitwise OR of zero or more of the following flags:
-.IP REG_EXTENDED \w'REG_EXTENDED'u+2n
-Compile modern (``extended'') REs,
-rather than the obsolete (``basic'') REs that
-are the default.
-.IP REG_BASIC
-This is a synonym for 0,
-provided as a counterpart to REG_EXTENDED to improve readability.
-This is an extension,
-compatible with but not specified by POSIX 1003.2,
-and should be used with
-caution in software intended to be portable to other systems.
-.IP REG_NOSPEC
-Compile with recognition of all special characters turned off.
-All characters are thus considered ordinary,
-so the ``RE'' is a literal string.
-This is an extension,
-compatible with but not specified by POSIX 1003.2,
-and should be used with
-caution in software intended to be portable to other systems.
-REG_EXTENDED and REG_NOSPEC may not be used
-in the same call to
-.IR regcomp .
-.IP REG_ICASE
-Compile for matching that ignores upper/lower case distinctions.
-See
-.ZR .
-.IP REG_NOSUB
-Compile for matching that need only report success or failure,
-not what was matched.
-.IP REG_NEWLINE
-Compile for newline-sensitive matching.
-By default, newline is a completely ordinary character with no special
-meaning in either REs or strings.
-With this flag,
-`[^' bracket expressions and `.' never match newline,
-a `^' anchor matches the null string after any newline in the string
-in addition to its normal function,
-and the `$' anchor matches the null string before any newline in the
-string in addition to its normal function.
-.IP REG_PEND
-The regular expression ends,
-not at the first NUL,
-but just before the character pointed to by the
-.I re_endp
-member of the structure pointed to by
-.IR preg .
-The
-.I re_endp
-member is of type
-.IR const\ char\ * .
-This flag permits inclusion of NULs in the RE;
-they are considered ordinary characters.
-This is an extension,
-compatible with but not specified by POSIX 1003.2,
-and should be used with
-caution in software intended to be portable to other systems.
-.PP
-When successful,
-.I regcomp
-returns 0 and fills in the structure pointed to by
-.IR preg .
-One member of that structure
-(other than
-.IR re_endp )
-is publicized:
-.IR re_nsub ,
-of type
-.IR size_t ,
-contains the number of parenthesized subexpressions within the RE
-(except that the value of this member is undefined if the
-REG_NOSUB flag was used).
-If
-.I regcomp
-fails, it returns a non-zero error code;
-see DIAGNOSTICS.
-.PP
-.I Regexec
-matches the compiled RE pointed to by
-.I preg
-against the
-.IR string ,
-subject to the flags in
-.IR eflags ,
-and reports results using
-.IR nmatch ,
-.IR pmatch ,
-and the returned value.
-The RE must have been compiled by a previous invocation of
-.IR regcomp .
-The compiled form is not altered during execution of
-.IR regexec ,
-so a single compiled RE can be used simultaneously by multiple threads.
-.PP
-By default,
-the NUL-terminated string pointed to by
-.I string
-is considered to be the text of an entire line,
-with the NUL indicating the end of the line.
-(That is,
-any other end-of-line marker is considered to have been removed
-and replaced by the NUL.)
-The
-.I eflags
-argument is the bitwise OR of zero or more of the following flags:
-.IP REG_NOTBOL \w'REG_STARTEND'u+2n
-The first character of
-the string
-is not the beginning of a line, so the `^' anchor should not match before it.
-This does not affect the behavior of newlines under REG_NEWLINE.
-.IP REG_NOTEOL
-The NUL terminating
-the string
-does not end a line, so the `$' anchor should not match before it.
-This does not affect the behavior of newlines under REG_NEWLINE.
-.IP REG_STARTEND
-The string is considered to start at
-\fIstring\fR\ + \fIpmatch\fR[0].\fIrm_so\fR
-and to have a terminating NUL located at
-\fIstring\fR\ + \fIpmatch\fR[0].\fIrm_eo\fR
-(there need not actually be a NUL at that location),
-regardless of the value of
-.IR nmatch .
-See below for the definition of
-.IR pmatch
-and
-.IR nmatch .
-This is an extension,
-compatible with but not specified by POSIX 1003.2,
-and should be used with
-caution in software intended to be portable to other systems.
-Note that a non-zero \fIrm_so\fR does not imply REG_NOTBOL;
-REG_STARTEND affects only the location of the string,
-not how it is matched.
-.PP
-See
-.ZR
-for a discussion of what is matched in situations where an RE or a
-portion thereof could match any of several substrings of
-.IR string .
-.PP
-Normally,
-.I regexec
-returns 0 for success and the non-zero code REG_NOMATCH for failure.
-Other non-zero error codes may be returned in exceptional situations;
-see DIAGNOSTICS.
-.PP
-If REG_NOSUB was specified in the compilation of the RE,
-or if
-.I nmatch
-is 0,
-.I regexec
-ignores the
-.I pmatch
-argument (but see below for the case where REG_STARTEND is specified).
-Otherwise,
-.I pmatch
-points to an array of
-.I nmatch
-structures of type
-.IR regmatch_t .
-Such a structure has at least the members
-.I rm_so
-and
-.IR rm_eo ,
-both of type
-.I regoff_t
-(a signed arithmetic type at least as large as an
-.I off_t
-and a
-.IR ssize_t ),
-containing respectively the offset of the first character of a substring
-and the offset of the first character after the end of the substring.
-Offsets are measured from the beginning of the
-.I string
-argument given to
-.IR regexec .
-An empty substring is denoted by equal offsets,
-both indicating the character following the empty substring.
-.PP
-The 0th member of the
-.I pmatch
-array is filled in to indicate what substring of
-.I string
-was matched by the entire RE.
-Remaining members report what substring was matched by parenthesized
-subexpressions within the RE;
-member
-.I i
-reports subexpression
-.IR i ,
-with subexpressions counted (starting at 1) by the order of their opening
-parentheses in the RE, left to right.
-Unused entries in the array\(emcorresponding either to subexpressions that
-did not participate in the match at all, or to subexpressions that do not
-exist in the RE (that is, \fIi\fR\ > \fIpreg\fR\->\fIre_nsub\fR)\(emhave both
-.I rm_so
-and
-.I rm_eo
-set to \-1.
-If a subexpression participated in the match several times,
-the reported substring is the last one it matched.
-(Note, as an example in particular, that when the RE `(b*)+' matches `bbb',
-the parenthesized subexpression matches the three `b's and then
-an infinite number of empty strings following the last `b',
-so the reported substring is one of the empties.)
-.PP
-If REG_STARTEND is specified,
-.I pmatch
-must point to at least one
-.I regmatch_t
-(even if
-.I nmatch
-is 0 or REG_NOSUB was specified),
-to hold the input offsets for REG_STARTEND.
-Use for output is still entirely controlled by
-.IR nmatch ;
-if
-.I nmatch
-is 0 or REG_NOSUB was specified,
-the value of
-.IR pmatch [0]
-will not be changed by a successful
-.IR regexec .
-.PP
-.I Regerror
-maps a non-zero
-.I errcode
-from either
-.I regcomp
-or
-.I regexec
-to a human-readable, printable message.
-If
-.I preg
-is non-NULL,
-the error code should have arisen from use of
-the
-.I regex_t
-pointed to by
-.IR preg ,
-and if the error code came from
-.IR regcomp ,
-it should have been the result from the most recent
-.I regcomp
-using that
-.IR regex_t .
-.RI ( Regerror
-may be able to supply a more detailed message using information
-from the
-.IR regex_t .)
-.I Regerror
-places the NUL-terminated message into the buffer pointed to by
-.IR errbuf ,
-limiting the length (including the NUL) to at most
-.I errbuf_size
-bytes.
-If the whole message won't fit,
-as much of it as will fit before the terminating NUL is supplied.
-In any case,
-the returned value is the size of buffer needed to hold the whole
-message (including terminating NUL).
-If
-.I errbuf_size
-is 0,
-.I errbuf
-is ignored but the return value is still correct.
-.PP
-If the
-.I errcode
-given to
-.I regerror
-is first ORed with REG_ITOA,
-the ``message'' that results is the printable name of the error code,
-e.g. ``REG_NOMATCH'',
-rather than an explanation thereof.
-If
-.I errcode
-is REG_ATOI,
-then
-.I preg
-shall be non-NULL and the
-.I re_endp
-member of the structure it points to
-must point to the printable name of an error code;
-in this case, the result in
-.I errbuf
-is the decimal digits of
-the numeric value of the error code
-(0 if the name is not recognized).
-REG_ITOA and REG_ATOI are intended primarily as debugging facilities;
-they are extensions,
-compatible with but not specified by POSIX 1003.2,
-and should be used with
-caution in software intended to be portable to other systems.
-Be warned also that they are considered experimental and changes are possible.
-.PP
-.I Regfree
-frees any dynamically-allocated storage associated with the compiled RE
-pointed to by
-.IR preg .
-The remaining
-.I regex_t
-is no longer a valid compiled RE
-and the effect of supplying it to
-.I regexec
-or
-.I regerror
-is undefined.
-.PP
-None of these functions references global variables except for tables
-of constants;
-all are safe for use from multiple threads if the arguments are safe.
-.SH IMPLEMENTATION CHOICES
-There are a number of decisions that 1003.2 leaves up to the implementor,
-either by explicitly saying ``undefined'' or by virtue of them being
-forbidden by the RE grammar.
-This implementation treats them as follows.
-.PP
-See
-.ZR
-for a discussion of the definition of case-independent matching.
-.PP
-There is no particular limit on the length of REs,
-except insofar as memory is limited.
-Memory usage is approximately linear in RE size, and largely insensitive
-to RE complexity, except for bounded repetitions.
-See BUGS for one short RE using them
-that will run almost any system out of memory.
-.PP
-A backslashed character other than one specifically given a magic meaning
-by 1003.2 (such magic meanings occur only in obsolete [``basic''] REs)
-is taken as an ordinary character.
-.PP
-Any unmatched [ is a REG_EBRACK error.
-.PP
-Equivalence classes cannot begin or end bracket-expression ranges.
-The endpoint of one range cannot begin another.
-.PP
-RE_DUP_MAX, the limit on repetition counts in bounded repetitions, is 255.
-.PP
-A repetition operator (?, *, +, or bounds) cannot follow another
-repetition operator.
-A repetition operator cannot begin an expression or subexpression
-or follow `^' or `|'.
-.PP
-`|' cannot appear first or last in a (sub)expression or after another `|',
-i.e. an operand of `|' cannot be an empty subexpression.
-An empty parenthesized subexpression, `()', is legal and matches an
-empty (sub)string.
-An empty string is not a legal RE.
-.PP
-A `{' followed by a digit is considered the beginning of bounds for a
-bounded repetition, which must then follow the syntax for bounds.
-A `{' \fInot\fR followed by a digit is considered an ordinary character.
-.PP
-`^' and `$' beginning and ending subexpressions in obsolete (``basic'')
-REs are anchors, not ordinary characters.
-.SH SEE ALSO
-grep(1), regex(7)
-.PP
-POSIX 1003.2, sections 2.8 (Regular Expression Notation)
-and
-B.5 (C Binding for Regular Expression Matching).
-.SH DIAGNOSTICS
-Non-zero error codes from
-.I regcomp
-and
-.I regexec
-include the following:
-.PP
-.nf
-.ta \w'REG_ECOLLATE'u+3n
-REG_NOMATCH regexec() failed to match
-REG_BADPAT invalid regular expression
-REG_ECOLLATE invalid collating element
-REG_ECTYPE invalid character class
-REG_EESCAPE \e applied to unescapable character
-REG_ESUBREG invalid backreference number
-REG_EBRACK brackets [ ] not balanced
-REG_EPAREN parentheses ( ) not balanced
-REG_EBRACE braces { } not balanced
-REG_BADBR invalid repetition count(s) in { }
-REG_ERANGE invalid character range in [ ]
-REG_ESPACE ran out of memory
-REG_BADRPT ?, *, or + operand invalid
-REG_EMPTY empty (sub)expression
-REG_ASSERT ``can't happen''\(emyou found a bug
-REG_INVARG invalid argument, e.g. negative-length string
-.fi
-.SH HISTORY
-Written by Henry Spencer,
-henry@zoo.toronto.edu.
-.SH BUGS
-This is an alpha release with known defects.
-Please report problems.
-.PP
-There is one known functionality bug.
-The implementation of internationalization is incomplete:
-the locale is always assumed to be the default one of 1003.2,
-and only the collating elements etc. of that locale are available.
-.PP
-The back-reference code is subtle and doubts linger about its correctness
-in complex cases.
-.PP
-.I Regexec
-performance is poor.
-This will improve with later releases.
-.I Nmatch
-exceeding 0 is expensive;
-.I nmatch
-exceeding 1 is worse.
-.I Regexec
-is largely insensitive to RE complexity \fIexcept\fR that back
-references are massively expensive.
-RE length does matter; in particular, there is a strong speed bonus
-for keeping RE length under about 30 characters,
-with most special characters counting roughly double.
-.PP
-.I Regcomp
-implements bounded repetitions by macro expansion,
-which is costly in time and space if counts are large
-or bounded repetitions are nested.
-An RE like, say,
-`((((a{1,100}){1,100}){1,100}){1,100}){1,100}'
-will (eventually) run almost any existing machine out of swap space.
-.PP
-There are suspected problems with response to obscure error conditions.
-Notably,
-certain kinds of internal overflow,
-produced only by truly enormous REs or by multiply nested bounded repetitions,
-are probably not handled well.
-.PP
-Due to a mistake in 1003.2, things like `a)b' are legal REs because `)' is
-a special character only in the presence of a previous unmatched `('.
-This can't be fixed until the spec is fixed.
-.PP
-The standard's definition of back references is vague.
-For example, does
-`a\e(\e(b\e)*\e2\e)*d' match `abbbd'?
-Until the standard is clarified,
-behavior in such cases should not be relied on.
-.PP
-The implementation of word-boundary matching is a bit of a kludge,
-and bugs may lurk in combinations of word-boundary matching and anchoring.
diff --git a/winsup/cygwin/regex/regex.7 b/winsup/cygwin/regex/regex.7
deleted file mode 100644
index dc53e8c..0000000
--- a/winsup/cygwin/regex/regex.7
+++ /dev/null
@@ -1,235 +0,0 @@
-.TH REGEX 7 "25 Oct 1995"
-.BY "Henry Spencer"
-.SH NAME
-regex \- POSIX 1003.2 regular expressions
-.SH DESCRIPTION
-Regular expressions (``RE''s),
-as defined in POSIX 1003.2, come in two forms:
-modern REs (roughly those of
-.IR egrep ;
-1003.2 calls these ``extended'' REs)
-and obsolete REs (roughly those of
-.IR ed ;
-1003.2 ``basic'' REs).
-Obsolete REs mostly exist for backward compatibility in some old programs;
-they will be discussed at the end.
-1003.2 leaves some aspects of RE syntax and semantics open;
-`\(dg' marks decisions on these aspects that
-may not be fully portable to other 1003.2 implementations.
-.PP
-A (modern) RE is one\(dg or more non-empty\(dg \fIbranches\fR,
-separated by `|'.
-It matches anything that matches one of the branches.
-.PP
-A branch is one\(dg or more \fIpieces\fR, concatenated.
-It matches a match for the first, followed by a match for the second, etc.
-.PP
-A piece is an \fIatom\fR possibly followed
-by a single\(dg `*', `+', `?', or \fIbound\fR.
-An atom followed by `*' matches a sequence of 0 or more matches of the atom.
-An atom followed by `+' matches a sequence of 1 or more matches of the atom.
-An atom followed by `?' matches a sequence of 0 or 1 matches of the atom.
-.PP
-A \fIbound\fR is `{' followed by an unsigned decimal integer,
-possibly followed by `,'
-possibly followed by another unsigned decimal integer,
-always followed by `}'.
-The integers must lie between 0 and RE_DUP_MAX (255\(dg) inclusive,
-and if there are two of them, the first may not exceed the second.
-An atom followed by a bound containing one integer \fIi\fR
-and no comma matches
-a sequence of exactly \fIi\fR matches of the atom.
-An atom followed by a bound
-containing one integer \fIi\fR and a comma matches
-a sequence of \fIi\fR or more matches of the atom.
-An atom followed by a bound
-containing two integers \fIi\fR and \fIj\fR matches
-a sequence of \fIi\fR through \fIj\fR (inclusive) matches of the atom.
-.PP
-An atom is a regular expression enclosed in `()' (matching a match for the
-regular expression),
-an empty set of `()' (matching the null string)\(dg,
-a \fIbracket expression\fR (see below), `.'
-(matching any single character), `^' (matching the null string at the
-beginning of a line), `$' (matching the null string at the
-end of a line), a `\e' followed by one of the characters
-`^.[$()|*+?{\e'
-(matching that character taken as an ordinary character),
-a `\e' followed by any other character\(dg
-(matching that character taken as an ordinary character,
-as if the `\e' had not been present\(dg),
-or a single character with no other significance (matching that character).
-A `{' followed by a character other than a digit is an ordinary
-character, not the beginning of a bound\(dg.
-It is illegal to end an RE with `\e'.
-.PP
-A \fIbracket expression\fR is a list of characters enclosed in `[]'.
-It normally matches any single character from the list (but see below).
-If the list begins with `^',
-it matches any single character
-(but see below) \fInot\fR from the rest of the list.
-If two characters in the list are separated by `\-', this is shorthand
-for the full \fIrange\fR of characters between those two (inclusive) in the
-collating sequence,
-e.g. `[0\-9]' in ASCII matches any decimal digit.
-It is illegal\(dg for two ranges to share an
-endpoint, e.g. `a\-c\-e'.
-Ranges are very collating-sequence-dependent,
-and portable programs should avoid relying on them.
-.PP
-To include a literal `]' in the list, make it the first character
-(following a possible `^').
-To include a literal `\-', make it the first or last character,
-or the second endpoint of a range.
-To use a literal `\-' as the first endpoint of a range,
-enclose it in `[.' and `.]' to make it a collating element (see below).
-With the exception of these and some combinations using `[' (see next
-paragraphs), all other special characters, including `\e', lose their
-special significance within a bracket expression.
-.PP
-Within a bracket expression, a collating element (a character,
-a multi-character sequence that collates as if it were a single character,
-or a collating-sequence name for either)
-enclosed in `[.' and `.]' stands for the
-sequence of characters of that collating element.
-The sequence is a single element of the bracket expression's list.
-A bracket expression containing a multi-character collating element
-can thus match more than one character,
-e.g. if the collating sequence includes a `ch' collating element,
-then the RE `[[.ch.]]*c' matches the first five characters
-of `chchcc'.
-.PP
-Within a bracket expression, a collating element enclosed in `[=' and
-`=]' is an equivalence class, standing for the sequences of characters
-of all collating elements equivalent to that one, including itself.
-(If there are no other equivalent collating elements,
-the treatment is as if the enclosing delimiters were `[.' and `.]'.)
-For example, if o and \o'o^' are the members of an equivalence class,
-then `[[=o=]]', `[[=\o'o^'=]]', and `[o\o'o^']' are all synonymous.
-An equivalence class may not\(dg be an endpoint
-of a range.
-.PP
-Within a bracket expression, the name of a \fIcharacter class\fR enclosed
-in `[:' and `:]' stands for the list of all characters belonging to that
-class.
-Standard character class names are:
-.PP
-.RS
-.nf
-.ta 3c 6c 9c
-alnum digit punct
-alpha graph space
-blank lower upper
-cntrl print xdigit
-.fi
-.RE
-.PP
-These stand for the character classes defined in
-.IR ctype (3).
-A locale may provide others.
-A character class may not be used as an endpoint of a range.
-.PP
-There are two special cases\(dg of bracket expressions:
-the bracket expressions `[[:<:]]' and `[[:>:]]' match the null string at
-the beginning and end of a word respectively.
-A word is defined as a sequence of
-word characters
-which is neither preceded nor followed by
-word characters.
-A word character is an
-.I alnum
-character (as defined by
-.IR ctype (3))
-or an underscore.
-This is an extension,
-compatible with but not specified by POSIX 1003.2,
-and should be used with
-caution in software intended to be portable to other systems.
-.PP
-In the event that an RE could match more than one substring of a given
-string,
-the RE matches the one starting earliest in the string.
-If the RE could match more than one substring starting at that point,
-it matches the longest.
-Subexpressions also match the longest possible substrings, subject to
-the constraint that the whole match be as long as possible,
-with subexpressions starting earlier in the RE taking priority over
-ones starting later.
-Note that higher-level subexpressions thus take priority over
-their lower-level component subexpressions.
-.PP
-Match lengths are measured in characters, not collating elements.
-A null string is considered longer than no match at all.
-For example,
-`bb*' matches the three middle characters of `abbbc',
-`(wee|week)(knights|nights)' matches all ten characters of `weeknights',
-when `(.*).*' is matched against `abc' the parenthesized subexpression
-matches all three characters, and
-when `(a*)*' is matched against `bc' both the whole RE and the parenthesized
-subexpression match the null string.
-.PP
-If case-independent matching is specified,
-the effect is much as if all case distinctions had vanished from the
-alphabet.
-When an alphabetic that exists in multiple cases appears as an
-ordinary character outside a bracket expression, it is effectively
-transformed into a bracket expression containing both cases,
-e.g. `x' becomes `[xX]'.
-When it appears inside a bracket expression, all case counterparts
-of it are added to the bracket expression, so that (e.g.) `[x]'
-becomes `[xX]' and `[^x]' becomes `[^xX]'.
-.PP
-No particular limit is imposed on the length of REs\(dg.
-Programs intended to be portable should not employ REs longer
-than 256 bytes,
-as an implementation can refuse to accept such REs and remain
-POSIX-compliant.
-.PP
-Obsolete (``basic'') regular expressions differ in several respects.
-`|', `+', and `?' are ordinary characters and there is no equivalent
-for their functionality.
-The delimiters for bounds are `\e{' and `\e}',
-with `{' and `}' by themselves ordinary characters.
-The parentheses for nested subexpressions are `\e(' and `\e)',
-with `(' and `)' by themselves ordinary characters.
-`^' is an ordinary character except at the beginning of the
-RE or\(dg the beginning of a parenthesized subexpression,
-`$' is an ordinary character except at the end of the
-RE or\(dg the end of a parenthesized subexpression,
-and `*' is an ordinary character if it appears at the beginning of the
-RE or the beginning of a parenthesized subexpression
-(after a possible leading `^').
-Finally, there is one new type of atom, a \fIback reference\fR:
-`\e' followed by a non-zero decimal digit \fId\fR
-matches the same sequence of characters
-matched by the \fId\fRth parenthesized subexpression
-(numbering subexpressions by the positions of their opening parentheses,
-left to right),
-so that (e.g.) `\e([bc]\e)\e1' matches `bb' or `cc' but not `bc'.
-.SH SEE ALSO
-regex(3)
-.PP
-POSIX 1003.2, section 2.8 (Regular Expression Notation).
-.SH HISTORY
-Written by Henry Spencer, based on the 1003.2 spec.
-.SH BUGS
-Having two kinds of REs is a botch.
-.PP
-The current 1003.2 spec says that `)' is an ordinary character in
-the absence of an unmatched `(';
-this was an unintentional result of a wording error,
-and change is likely.
-Avoid relying on it.
-.PP
-Back references are a dreadful botch,
-posing major problems for efficient implementations.
-They are also somewhat vaguely defined
-(does
-`a\e(\e(b\e)*\e2\e)*d' match `abbbd'?).
-Avoid using them.
-.PP
-1003.2's specification of case-independent matching is vague.
-The ``one case implies all cases'' definition given above
-is current consensus among implementors as to the right interpretation.
-.PP
-The syntax for word boundaries is incredibly ugly.
diff --git a/winsup/cygwin/regex/regex.h b/winsup/cygwin/regex/regex.h
deleted file mode 100644
index 03a1825..0000000
--- a/winsup/cygwin/regex/regex.h
+++ /dev/null
@@ -1,76 +0,0 @@
-#ifndef _REGEX_H_
-#define _REGEX_H_ /* never again */
-#include <sys/types.h>
-/* ========= begin header generated by ./mkh ========= */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* === regex2.h === */
-typedef _off_t regoff_t;
-typedef struct {
- int re_magic;
- size_t re_nsub; /* number of parenthesized subexpressions */
- const char *re_endp; /* end pointer for REG_PEND */
- struct re_guts *re_g; /* none of your business :-) */
-} regex_t;
-typedef struct {
- regoff_t rm_so; /* start of match */
- regoff_t rm_eo; /* end of match */
-} regmatch_t;
-
-
-/* === regcomp.c === */
-extern int regcomp(regex_t *, const char *, int);
-#define REG_BASIC 0000
-#define REG_EXTENDED 0001
-#define REG_ICASE 0002
-#define REG_NOSUB 0004
-#define REG_NEWLINE 0010
-#define REG_NOSPEC 0020
-#define REG_PEND 0040
-#define REG_DUMP 0200
-
-
-/* === regerror.c === */
-#define REG_OKAY 0
-#define REG_NOMATCH 1
-#define REG_BADPAT 2
-#define REG_ECOLLATE 3
-#define REG_ECTYPE 4
-#define REG_EESCAPE 5
-#define REG_ESUBREG 6
-#define REG_EBRACK 7
-#define REG_EPAREN 8
-#define REG_EBRACE 9
-#define REG_BADBR 10
-#define REG_ERANGE 11
-#define REG_ESPACE 12
-#define REG_BADRPT 13
-#define REG_EMPTY 14
-#define REG_ASSERT 15
-#define REG_INVARG 16
-#define REG_ATOI 255 /* convert name to number (!) */
-#define REG_ITOA 0400 /* convert number to name (!) */
-extern size_t regerror(int, const regex_t *, char *, size_t);
-
-
-/* === regexec.c === */
-extern int regexec(const regex_t *, const char *, size_t, regmatch_t [], int);
-#define REG_NOTBOL 00001
-#define REG_NOTEOL 00002
-#define REG_STARTEND 00004
-#define REG_TRACE 00400 /* tracing of execution */
-#define REG_LARGE 01000 /* force large representation */
-#define REG_BACKR 02000 /* force use of backref code */
-
-
-/* === regfree.c === */
-extern void regfree(regex_t *);
-
-
-#ifdef __cplusplus
-}
-#endif
-/* ========= end header generated by ./mkh ========= */
-#endif
diff --git a/winsup/cygwin/regex/regex2.h b/winsup/cygwin/regex/regex2.h
deleted file mode 100644
index 8c103fa..0000000
--- a/winsup/cygwin/regex/regex2.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * First, the stuff that ends up in the outside-world include file
- = typedef _off_t regoff_t;
- = typedef struct {
- = int re_magic;
- = size_t re_nsub; // number of parenthesized subexpressions
- = const char *re_endp; // end pointer for REG_PEND
- = struct re_guts *re_g; // none of your business :-)
- = } regex_t;
- = typedef struct {
- = regoff_t rm_so; // start of match
- = regoff_t rm_eo; // end of match
- = } regmatch_t;
- */
-/*
- * internals of regex_t
- */
-#define MAGIC1 ((('r'^0200)<<8) | 'e')
-
-/*
- * The internal representation is a *strip*, a sequence of
- * operators ending with an endmarker. (Some terminology etc. is a
- * historical relic of earlier versions which used multiple strips.)
- * Certain oddities in the representation are there to permit running
- * the machinery backwards; in particular, any deviation from sequential
- * flow must be marked at both its source and its destination. Some
- * fine points:
- *
- * - OPLUS_ and O_PLUS are *inside* the loop they create.
- * - OQUEST_ and O_QUEST are *outside* the bypass they create.
- * - OCH_ and O_CH are *outside* the multi-way branch they create, while
- * OOR1 and OOR2 are respectively the end and the beginning of one of
- * the branches. Note that there is an implicit OOR2 following OCH_
- * and an implicit OOR1 preceding O_CH.
- *
- * In state representations, an operator's bit is on to signify a state
- * immediately *preceding* "execution" of that operator.
- */
-typedef long sop; /* strip operator */
-typedef long sopno;
-#define OPRMASK 0x7c000000
-#define OPDMASK 0x03ffffff
-#define OPSHIFT (26)
-#define OP(n) ((n)&OPRMASK)
-#define OPND(n) ((n)&OPDMASK)
-#define SOP(op, opnd) ((op)|(opnd))
-/* operators meaning operand */
-/* (back, fwd are offsets) */
-#define OEND (1<<OPSHIFT) /* endmarker - */
-#define OCHAR (2<<OPSHIFT) /* character unsigned char */
-#define OBOL (3<<OPSHIFT) /* left anchor - */
-#define OEOL (4<<OPSHIFT) /* right anchor - */
-#define OANY (5<<OPSHIFT) /* . - */
-#define OANYOF (6<<OPSHIFT) /* [...] set number */
-#define OBACK_ (7<<OPSHIFT) /* begin \d paren number */
-#define O_BACK (8<<OPSHIFT) /* end \d paren number */
-#define OPLUS_ (9<<OPSHIFT) /* + prefix fwd to suffix */
-#define O_PLUS (10<<OPSHIFT) /* + suffix back to prefix */
-#define OQUEST_ (11<<OPSHIFT) /* ? prefix fwd to suffix */
-#define O_QUEST (12<<OPSHIFT) /* ? suffix back to prefix */
-#define OLPAREN (13<<OPSHIFT) /* ( fwd to ) */
-#define ORPAREN (14<<OPSHIFT) /* ) back to ( */
-#define OCH_ (15<<OPSHIFT) /* begin choice fwd to OOR2 */
-#define OOR1 (16<<OPSHIFT) /* | pt. 1 back to OOR1 or OCH_ */
-#define OOR2 (17<<OPSHIFT) /* | pt. 2 fwd to OOR2 or O_CH */
-#define O_CH (18<<OPSHIFT) /* end choice back to OOR1 */
-#define OBOW (19<<OPSHIFT) /* begin word - */
-#define OEOW (20<<OPSHIFT) /* end word - */
-
-/*
- * Structure for [] character-set representation. Character sets are
- * done as bit vectors, grouped 8 to a byte vector for compactness.
- * The individual set therefore has both a pointer to the byte vector
- * and a mask to pick out the relevant bit of each byte. A hash code
- * simplifies testing whether two sets could be identical.
- *
- * This will get trickier for multicharacter collating elements. As
- * preliminary hooks for dealing with such things, we also carry along
- * a string of multi-character elements, and decide the size of the
- * vectors at run time.
- */
-typedef struct {
- uch *ptr; /* -> uch [csetsize] */
- uch mask; /* bit within array */
- uch hash; /* hash code */
- size_t smultis;
- char *multis; /* -> char[smulti] ab\0cd\0ef\0\0 */
-} cset;
-/* note that CHadd and CHsub are unsafe, and CHIN doesn't yield 0/1 */
-#define CHadd(cs, c) ((cs)->ptr[(uch)(c)] |= (cs)->mask, (cs)->hash += (c))
-#define CHsub(cs, c) ((cs)->ptr[(uch)(c)] &= ~(cs)->mask, (cs)->hash -= (c))
-#define CHIN(cs, c) ((cs)->ptr[(uch)(c)] & (cs)->mask)
-#define MCadd(p, cs, cp) mcadd(p, cs, cp) /* regcomp() internal fns */
-#define MCsub(p, cs, cp) mcsub(p, cs, cp)
-#define MCin(p, cs, cp) mcin(p, cs, cp)
-
-/* stuff for character categories */
-typedef unsigned char cat_t;
-
-/*
- * main compiled-expression structure
- */
-struct re_guts {
- int magic;
-# define MAGIC2 ((('R'^0200)<<8)|'E')
- sop *strip; /* malloced area for strip */
- int csetsize; /* number of bits in a cset vector */
- int ncsets; /* number of csets in use */
- cset *sets; /* -> cset [ncsets] */
- uch *setbits; /* -> uch[csetsize][ncsets/CHAR_BIT] */
- int cflags; /* copy of regcomp() cflags argument */
- sopno nstates; /* = number of sops */
- sopno firststate; /* the initial OEND (normally 0) */
- sopno laststate; /* the final OEND */
- int iflags; /* internal flags */
-# define USEBOL 01 /* used ^ */
-# define USEEOL 02 /* used $ */
-# define BAD 04 /* something wrong */
- int nbol; /* number of ^ used */
- int neol; /* number of $ used */
- int ncategories; /* how many character categories */
- cat_t *categories; /* ->catspace[-CHAR_MIN] */
- char *must; /* match must contain this string */
- int mlen; /* length of must */
- size_t nsub; /* copy of re_nsub */
- int backrefs; /* does it use back references? */
- sopno nplus; /* how deep does it nest +s? */
- /* catspace must be last */
- cat_t catspace[1]; /* actually [NC] */
-};
-
-/* misc utilities */
-#define OUT (CHAR_MAX+1) /* a non-character value */
-#define ISWORD(c) (isalnum(c) || (c) == '_')
diff --git a/winsup/cygwin/regex/regexec.c b/winsup/cygwin/regex/regexec.c
deleted file mode 100644
index 35b99c2..0000000
--- a/winsup/cygwin/regex/regexec.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * the outer shell of regexec()
- *
- * This file includes engine.c *twice*, after muchos fiddling with the
- * macros that code uses. This lets the same code operate on two different
- * representations for state sets.
- */
-#include "winsup.h"
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-#include <ctype.h>
-#include "regex.h"
-
-#include "utils.h"
-#include "regex2.h"
-
-#ifdef lint
-static int nope = 0; /* for use in asserts; shuts lint up */
-#endif
-
-/* macros for manipulating states, small version */
-#define states unsigned
-#define states1 unsigned /* for later use in regexec() decision */
-#define CLEAR(v) ((v) = 0)
-#define SET0(v, n) ((v) &= ~((unsigned)1 << (n)))
-#define SET1(v, n) ((v) |= (unsigned)1 << (n))
-#define ISSET(v, n) ((v) & ((unsigned)1 << (n)))
-#define ASSIGN(d, s) ((d) = (s))
-#define EQ(a, b) ((a) == (b))
-#define STATEVARS int dummy /* dummy version */
-#define STATESETUP(m, n) /* nothing */
-#define STATETEARDOWN(m) /* nothing */
-#define SETUP(v) ((v) = 0)
-#define onestate unsigned
-#define INIT(o, n) ((o) = (unsigned)1 << (n))
-#define INC(o) ((o) <<= 1)
-#define ISSTATEIN(v, o) ((v) & (o))
-/* some abbreviations; note that some of these know variable names! */
-/* do "if I'm here, I can also be there" etc without branches */
-#define FWD(dst, src, n) ((dst) |= ((unsigned)(src)&(here)) << (n))
-#define BACK(dst, src, n) ((dst) |= ((unsigned)(src)&(here)) >> (n))
-#define ISSETBACK(v, n) ((v) & ((unsigned)here >> (n)))
-/* function names */
-#define SNAMES /* engine.c looks after details */
-
-#include "engine.c"
-
-/* now undo things */
-#undef states
-#undef CLEAR
-#undef SET0
-#undef SET1
-#undef ISSET
-#undef ASSIGN
-#undef EQ
-#undef STATEVARS
-#undef STATESETUP
-#undef STATETEARDOWN
-#undef SETUP
-#undef onestate
-#undef INIT
-#undef INC
-#undef ISSTATEIN
-#undef FWD
-#undef BACK
-#undef ISSETBACK
-#undef SNAMES
-
-/* macros for manipulating states, large version */
-#define states char *
-#define CLEAR(v) memset(v, 0, m->g->nstates)
-#define SET0(v, n) ((v)[n] = 0)
-#define SET1(v, n) ((v)[n] = 1)
-#define ISSET(v, n) ((v)[n])
-#define ASSIGN(d, s) memcpy(d, s, m->g->nstates)
-#define EQ(a, b) (memcmp(a, b, m->g->nstates) == 0)
-#define STATEVARS int vn; char *space
-#define STATESETUP(m, nv) { (m)->space = malloc((nv)*(m)->g->nstates); \
- if ((m)->space == NULL) return(REG_ESPACE); \
- (m)->vn = 0; }
-#define STATETEARDOWN(m) { free((m)->space); }
-#define SETUP(v) ((v) = &m->space[m->vn++ * m->g->nstates])
-#define onestate int
-#define INIT(o, n) ((o) = (n))
-#define INC(o) ((o)++)
-#define ISSTATEIN(v, o) ((v)[o])
-/* some abbreviations; note that some of these know variable names! */
-/* do "if I'm here, I can also be there" etc without branches */
-#define FWD(dst, src, n) ((dst)[here+(n)] |= (src)[here])
-#define BACK(dst, src, n) ((dst)[here-(n)] |= (src)[here])
-#define ISSETBACK(v, n) ((v)[here - (n)])
-/* function names */
-#define LNAMES /* flag */
-
-#include "engine.c"
-
-/*
- - regexec - interface for matching
- = extern int regexec(const regex_t *, const char *, size_t, \
- = regmatch_t [], int);
- = #define REG_NOTBOL 00001
- = #define REG_NOTEOL 00002
- = #define REG_STARTEND 00004
- = #define REG_TRACE 00400 // tracing of execution
- = #define REG_LARGE 01000 // force large representation
- = #define REG_BACKR 02000 // force use of backref code
- *
- * We put this here so we can exploit knowledge of the state representation
- * when choosing which matcher to call. Also, by this point the matchers
- * have been prototyped.
- */
-int /* 0 success, REG_NOMATCH failure */
-regexec(preg, string, nmatch, pmatch, eflags)
-const regex_t *preg;
-const char *string;
-size_t nmatch;
-regmatch_t pmatch[];
-int eflags;
-{
- register struct re_guts *g = preg->re_g;
-#ifdef REDEBUG
-# define GOODFLAGS(f) (f)
-#else
-# define GOODFLAGS(f) ((f)&(REG_NOTBOL|REG_NOTEOL|REG_STARTEND))
-#endif
-
- if (preg->re_magic != MAGIC1 || g->magic != MAGIC2)
- return(REG_BADPAT);
- assert(!(g->iflags&BAD));
- if (g->iflags&BAD) /* backstop for no-debug case */
- return(REG_BADPAT);
- eflags = GOODFLAGS(eflags);
-
- if ((unsigned) g->nstates <= CHAR_BIT*sizeof(states1) && !(eflags&REG_LARGE))
- return(smatcher(g, (char *)string, nmatch, pmatch, eflags));
- else
- return(lmatcher(g, (char *)string, nmatch, pmatch, eflags));
-}
diff --git a/winsup/cygwin/regex/regfree.c b/winsup/cygwin/regex/regfree.c
deleted file mode 100644
index b8be143..0000000
--- a/winsup/cygwin/regex/regfree.c
+++ /dev/null
@@ -1,38 +0,0 @@
-#include "winsup.h"
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "regex.h"
-
-#include "utils.h"
-#include "regex2.h"
-
-/*
- - regfree - free everything
- = extern void regfree(regex_t *);
- */
-void
-regfree(preg)
-regex_t *preg;
-{
- register struct re_guts *g;
-
- if (preg->re_magic != MAGIC1) /* oops */
- return; /* nice to complain, but hard */
-
- g = preg->re_g;
- if (g == NULL || g->magic != MAGIC2) /* oops again */
- return;
- preg->re_magic = 0; /* mark it invalid */
- g->magic = 0; /* mark it invalid */
-
- if (g->strip != NULL)
- free((char *)g->strip);
- if (g->sets != NULL)
- free((char *)g->sets);
- if (g->setbits != NULL)
- free((char *)g->setbits);
- if (g->must != NULL)
- free(g->must);
- free((char *)g);
-}
diff --git a/winsup/cygwin/regex/tests b/winsup/cygwin/regex/tests
deleted file mode 100644
index e4d928d..0000000
--- a/winsup/cygwin/regex/tests
+++ /dev/null
@@ -1,477 +0,0 @@
-# regular expression test set
-# Lines are at least three fields, separated by one or more tabs. "" stands
-# for an empty field. First field is an RE. Second field is flags. If
-# C flag given, regcomp() is expected to fail, and the third field is the
-# error name (minus the leading REG_).
-#
-# Otherwise it is expected to succeed, and the third field is the string to
-# try matching it against. If there is no fourth field, the match is
-# expected to fail. If there is a fourth field, it is the substring that
-# the RE is expected to match. If there is a fifth field, it is a comma-
-# separated list of what the subexpressions should match, with - indicating
-# no match for that one. In both the fourth and fifth fields, a (sub)field
-# starting with @ indicates that the (sub)expression is expected to match
-# a null string followed by the stuff after the @; this provides a way to
-# test where null strings match. The character `N' in REs and strings
-# is newline, `S' is space, `T' is tab, `Z' is NUL.
-#
-# The full list of flags:
-# - placeholder, does nothing
-# b RE is a BRE, not an ERE
-# & try it as both an ERE and a BRE
-# C regcomp() error expected, third field is error name
-# i REG_ICASE
-# m ("mundane") REG_NOSPEC
-# s REG_NOSUB (not really testable)
-# n REG_NEWLINE
-# ^ REG_NOTBOL
-# $ REG_NOTEOL
-# # REG_STARTEND (see below)
-# p REG_PEND
-#
-# For REG_STARTEND, the start/end offsets are those of the substring
-# enclosed in ().
-
-# basics
-a & a a
-abc & abc abc
-abc|de - abc abc
-a|b|c - abc a
-
-# parentheses and perversions thereof
-a(b)c - abc abc
-a\(b\)c b abc abc
-a( C EPAREN
-a( b a( a(
-a\( - a( a(
-a\( bC EPAREN
-a\(b bC EPAREN
-a(b C EPAREN
-a(b b a(b a(b
-# gag me with a right parenthesis -- 1003.2 goofed here (my fault, partly)
-a) - a) a)
-) - ) )
-# end gagging (in a just world, those *should* give EPAREN)
-a) b a) a)
-a\) bC EPAREN
-\) bC EPAREN
-a()b - ab ab
-a\(\)b b ab ab
-
-# anchoring and REG_NEWLINE
-^abc$ & abc abc
-a^b - a^b
-a^b b a^b a^b
-a$b - a$b
-a$b b a$b a$b
-^ & abc @abc
-$ & abc @
-^$ & "" @
-$^ - "" @
-\($\)\(^\) b "" @
-# stop retching, those are legitimate (although disgusting)
-^^ - "" @
-$$ - "" @
-b$ & abNc
-b$ &n abNc b
-^b$ & aNbNc
-^b$ &n aNbNc b
-^$ &n aNNb @Nb
-^$ n abc
-^$ n abcN @
-$^ n aNNb @Nb
-\($\)\(^\) bn aNNb @Nb
-^^ n^ aNNb @Nb
-$$ n aNNb @NN
-^a ^ a
-a$ $ a
-^a ^n aNb
-^b ^n aNb b
-a$ $n bNa
-b$ $n bNa b
-a*(^b$)c* - b b
-a*\(^b$\)c* b b b
-
-# certain syntax errors and non-errors
-| C EMPTY
-| b | |
-* C BADRPT
-* b * *
-+ C BADRPT
-? C BADRPT
-"" &C EMPTY
-() - abc @abc
-\(\) b abc @abc
-a||b C EMPTY
-|ab C EMPTY
-ab| C EMPTY
-(|a)b C EMPTY
-(a|)b C EMPTY
-(*a) C BADRPT
-(+a) C BADRPT
-(?a) C BADRPT
-({1}a) C BADRPT
-\(\{1\}a\) bC BADRPT
-(a|*b) C BADRPT
-(a|+b) C BADRPT
-(a|?b) C BADRPT
-(a|{1}b) C BADRPT
-^* C BADRPT
-^* b * *
-^+ C BADRPT
-^? C BADRPT
-^{1} C BADRPT
-^\{1\} bC BADRPT
-
-# metacharacters, backslashes
-a.c & abc abc
-a[bc]d & abd abd
-a\*c & a*c a*c
-a\\b & a\b a\b
-a\\\*b & a\*b a\*b
-a\bc & abc abc
-a\ &C EESCAPE
-a\\bc & a\bc a\bc
-\{ bC BADRPT
-a\[b & a[b a[b
-a[b &C EBRACK
-# trailing $ is a peculiar special case for the BRE code
-a$ & a a
-a$ & a$
-a\$ & a
-a\$ & a$ a$
-a\\$ & a
-a\\$ & a$
-a\\$ & a\$
-a\\$ & a\ a\
-
-# back references, ugh
-a\(b\)\2c bC ESUBREG
-a\(b\1\)c bC ESUBREG
-a\(b*\)c\1d b abbcbbd abbcbbd bb
-a\(b*\)c\1d b abbcbd
-a\(b*\)c\1d b abbcbbbd
-^\(.\)\1 b abc
-a\([bc]\)\1d b abcdabbd abbd b
-a\(\([bc]\)\2\)*d b abbccd abbccd
-a\(\([bc]\)\2\)*d b abbcbd
-# actually, this next one probably ought to fail, but the spec is unclear
-a\(\(b\)*\2\)*d b abbbd abbbd
-# here is a case that no NFA implementation does right
-\(ab*\)[ab]*\1 b ababaaa ababaaa a
-# check out normal matching in the presence of back refs
-\(a\)\1bcd b aabcd aabcd
-\(a\)\1bc*d b aabcd aabcd
-\(a\)\1bc*d b aabd aabd
-\(a\)\1bc*d b aabcccd aabcccd
-\(a\)\1bc*[ce]d b aabcccd aabcccd
-^\(a\)\1b\(c\)*cd$ b aabcccd aabcccd
-
-# ordinary repetitions
-ab*c & abc abc
-ab+c - abc abc
-ab?c - abc abc
-a\(*\)b b a*b a*b
-a\(**\)b b ab ab
-a\(***\)b bC BADRPT
-*a b *a *a
-**a b a a
-***a bC BADRPT
-
-# the dreaded bounded repetitions
-{ & { {
-{abc & {abc {abc
-{1 C BADRPT
-{1} C BADRPT
-a{b & a{b a{b
-a{1}b - ab ab
-a\{1\}b b ab ab
-a{1,}b - ab ab
-a\{1,\}b b ab ab
-a{1,2}b - aab aab
-a\{1,2\}b b aab aab
-a{1 C EBRACE
-a\{1 bC EBRACE
-a{1a C EBRACE
-a\{1a bC EBRACE
-a{1a} C BADBR
-a\{1a\} bC BADBR
-a{,2} - a{,2} a{,2}
-a\{,2\} bC BADBR
-a{,} - a{,} a{,}
-a\{,\} bC BADBR
-a{1,x} C BADBR
-a\{1,x\} bC BADBR
-a{1,x C EBRACE
-a\{1,x bC EBRACE
-a{300} C BADBR
-a\{300\} bC BADBR
-a{1,0} C BADBR
-a\{1,0\} bC BADBR
-ab{0,0}c - abcac ac
-ab\{0,0\}c b abcac ac
-ab{0,1}c - abcac abc
-ab\{0,1\}c b abcac abc
-ab{0,3}c - abbcac abbc
-ab\{0,3\}c b abbcac abbc
-ab{1,1}c - acabc abc
-ab\{1,1\}c b acabc abc
-ab{1,3}c - acabc abc
-ab\{1,3\}c b acabc abc
-ab{2,2}c - abcabbc abbc
-ab\{2,2\}c b abcabbc abbc
-ab{2,4}c - abcabbc abbc
-ab\{2,4\}c b abcabbc abbc
-((a{1,10}){1,10}){1,10} - a a a,a
-
-# multiple repetitions
-a** &C BADRPT
-a++ C BADRPT
-a?? C BADRPT
-a*+ C BADRPT
-a*? C BADRPT
-a+* C BADRPT
-a+? C BADRPT
-a?* C BADRPT
-a?+ C BADRPT
-a{1}{1} C BADRPT
-a*{1} C BADRPT
-a+{1} C BADRPT
-a?{1} C BADRPT
-a{1}* C BADRPT
-a{1}+ C BADRPT
-a{1}? C BADRPT
-a*{b} - a{b} a{b}
-a\{1\}\{1\} bC BADRPT
-a*\{1\} bC BADRPT
-a\{1\}* bC BADRPT
-
-# brackets, and numerous perversions thereof
-a[b]c & abc abc
-a[ab]c & abc abc
-a[^ab]c & adc adc
-a[]b]c & a]c a]c
-a[[b]c & a[c a[c
-a[-b]c & a-c a-c
-a[^]b]c & adc adc
-a[^-b]c & adc adc
-a[b-]c & a-c a-c
-a[b &C EBRACK
-a[] &C EBRACK
-a[1-3]c & a2c a2c
-a[3-1]c &C ERANGE
-a[1-3-5]c &C ERANGE
-a[[.-.]--]c & a-c a-c
-a[1- &C ERANGE
-a[[. &C EBRACK
-a[[.x &C EBRACK
-a[[.x. &C EBRACK
-a[[.x.] &C EBRACK
-a[[.x.]] & ax ax
-a[[.x,.]] &C ECOLLATE
-a[[.one.]]b & a1b a1b
-a[[.notdef.]]b &C ECOLLATE
-a[[.].]]b & a]b a]b
-a[[:alpha:]]c & abc abc
-a[[:notdef:]]c &C ECTYPE
-a[[: &C EBRACK
-a[[:alpha &C EBRACK
-a[[:alpha:] &C EBRACK
-a[[:alpha,:] &C ECTYPE
-a[[:]:]]b &C ECTYPE
-a[[:-:]]b &C ECTYPE
-a[[:alph:]] &C ECTYPE
-a[[:alphabet:]] &C ECTYPE
-[[:alnum:]]+ - -%@a0X- a0X
-[[:alpha:]]+ - -%@aX0- aX
-[[:blank:]]+ - aSSTb SST
-[[:cntrl:]]+ - aNTb NT
-[[:digit:]]+ - a019b 019
-[[:graph:]]+ - Sa%bS a%b
-[[:lower:]]+ - AabC ab
-[[:print:]]+ - NaSbN aSb
-[[:punct:]]+ - S%-&T %-&
-[[:space:]]+ - aSNTb SNT
-[[:upper:]]+ - aBCd BC
-[[:xdigit:]]+ - p0f3Cq 0f3C
-a[[=b=]]c & abc abc
-a[[= &C EBRACK
-a[[=b &C EBRACK
-a[[=b= &C EBRACK
-a[[=b=] &C EBRACK
-a[[=b,=]] &C ECOLLATE
-a[[=one=]]b & a1b a1b
-
-# complexities
-a(((b)))c - abc abc
-a(b|(c))d - abd abd
-a(b*|c)d - abbd abbd
-# just gotta have one DFA-buster, of course
-a[ab]{20} - aaaaabaaaabaaaabaaaab aaaaabaaaabaaaabaaaab
-# and an inline expansion in case somebody gets tricky
-a[ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab] - aaaaabaaaabaaaabaaaab aaaaabaaaabaaaabaaaab
-# and in case somebody just slips in an NFA...
-a[ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab](wee|week)(knights|night) - aaaaabaaaabaaaabaaaabweeknights aaaaabaaaabaaaabaaaabweeknights
-# fish for anomalies as the number of states passes 32
-12345678901234567890123456789 - a12345678901234567890123456789b 12345678901234567890123456789
-123456789012345678901234567890 - a123456789012345678901234567890b 123456789012345678901234567890
-1234567890123456789012345678901 - a1234567890123456789012345678901b 1234567890123456789012345678901
-12345678901234567890123456789012 - a12345678901234567890123456789012b 12345678901234567890123456789012
-123456789012345678901234567890123 - a123456789012345678901234567890123b 123456789012345678901234567890123
-# and one really big one, beyond any plausible word width
-1234567890123456789012345678901234567890123456789012345678901234567890 - a1234567890123456789012345678901234567890123456789012345678901234567890b 1234567890123456789012345678901234567890123456789012345678901234567890
-# fish for problems as brackets go past 8
-[ab][cd][ef][gh][ij][kl][mn] - xacegikmoq acegikm
-[ab][cd][ef][gh][ij][kl][mn][op] - xacegikmoq acegikmo
-[ab][cd][ef][gh][ij][kl][mn][op][qr] - xacegikmoqy acegikmoq
-[ab][cd][ef][gh][ij][kl][mn][op][q] - xacegikmoqy acegikmoq
-
-# subtleties of matching
-abc & xabcy abc
-a\(b\)?c\1d b acd
-aBc i Abc Abc
-a[Bc]*d i abBCcd abBCcd
-0[[:upper:]]1 &i 0a1 0a1
-0[[:lower:]]1 &i 0A1 0A1
-a[^b]c &i abc
-a[^b]c &i aBc
-a[^b]c &i adc adc
-[a]b[c] - abc abc
-[a]b[a] - aba aba
-[abc]b[abc] - abc abc
-[abc]b[abd] - abd abd
-a(b?c)+d - accd accd
-(wee|week)(knights|night) - weeknights weeknights
-(we|wee|week|frob)(knights|night|day) - weeknights weeknights
-a[bc]d - xyzaaabcaababdacd abd
-a[ab]c - aaabc abc
-abc s abc abc
-a* & b @b
-
-# Let's have some fun -- try to match a C comment.
-# first the obvious, which looks okay at first glance...
-/\*.*\*/ - /*x*/ /*x*/
-# but...
-/\*.*\*/ - /*x*/y/*z*/ /*x*/y/*z*/
-# okay, we must not match */ inside; try to do that...
-/\*([^*]|\*[^/])*\*/ - /*x*/ /*x*/
-/\*([^*]|\*[^/])*\*/ - /*x*/y/*z*/ /*x*/
-# but...
-/\*([^*]|\*[^/])*\*/ - /*x**/y/*z*/ /*x**/y/*z*/
-# and a still fancier version, which does it right (I think)...
-/\*([^*]|\*+[^*/])*\*+/ - /*x*/ /*x*/
-/\*([^*]|\*+[^*/])*\*+/ - /*x*/y/*z*/ /*x*/
-/\*([^*]|\*+[^*/])*\*+/ - /*x**/y/*z*/ /*x**/
-/\*([^*]|\*+[^*/])*\*+/ - /*x****/y/*z*/ /*x****/
-/\*([^*]|\*+[^*/])*\*+/ - /*x**x*/y/*z*/ /*x**x*/
-/\*([^*]|\*+[^*/])*\*+/ - /*x***x/y/*z*/ /*x***x/y/*z*/
-
-# subexpressions
-.* - abc abc -
-a(b)(c)d - abcd abcd b,c
-a(((b)))c - abc abc b,b,b
-a(b|(c))d - abd abd b,-
-a(b*|c|e)d - abbd abbd bb
-a(b*|c|e)d - acd acd c
-a(b*|c|e)d - ad ad @d
-a(b?)c - abc abc b
-a(b?)c - ac ac @c
-a(b+)c - abc abc b
-a(b+)c - abbbc abbbc bbb
-a(b*)c - ac ac @c
-(a|ab)(bc([de]+)f|cde) - abcdef abcdef a,bcdef,de
-# the regression tester only asks for 9 subexpressions
-a(b)(c)(d)(e)(f)(g)(h)(i)(j)k - abcdefghijk abcdefghijk b,c,d,e,f,g,h,i,j
-a(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)l - abcdefghijkl abcdefghijkl b,c,d,e,f,g,h,i,j,k
-a([bc]?)c - abc abc b
-a([bc]?)c - ac ac @c
-a([bc]+)c - abc abc b
-a([bc]+)c - abcc abcc bc
-a([bc]+)bc - abcbc abcbc bc
-a(bb+|b)b - abb abb b
-a(bbb+|bb+|b)b - abb abb b
-a(bbb+|bb+|b)b - abbb abbb bb
-a(bbb+|bb+|b)bb - abbb abbb b
-(.*).* - abcdef abcdef abcdef
-(a*)* - bc @b @b
-
-# do we get the right subexpression when it is used more than once?
-a(b|c)*d - ad ad -
-a(b|c)*d - abcd abcd c
-a(b|c)+d - abd abd b
-a(b|c)+d - abcd abcd c
-a(b|c?)+d - ad ad @d
-a(b|c?)+d - abcd abcd @d
-a(b|c){0,0}d - ad ad -
-a(b|c){0,1}d - ad ad -
-a(b|c){0,1}d - abd abd b
-a(b|c){0,2}d - ad ad -
-a(b|c){0,2}d - abcd abcd c
-a(b|c){0,}d - ad ad -
-a(b|c){0,}d - abcd abcd c
-a(b|c){1,1}d - abd abd b
-a(b|c){1,1}d - acd acd c
-a(b|c){1,2}d - abd abd b
-a(b|c){1,2}d - abcd abcd c
-a(b|c){1,}d - abd abd b
-a(b|c){1,}d - abcd abcd c
-a(b|c){2,2}d - acbd acbd b
-a(b|c){2,2}d - abcd abcd c
-a(b|c){2,4}d - abcd abcd c
-a(b|c){2,4}d - abcbd abcbd b
-a(b|c){2,4}d - abcbcd abcbcd c
-a(b|c){2,}d - abcd abcd c
-a(b|c){2,}d - abcbd abcbd b
-a(b+|((c)*))+d - abd abd @d,@d,-
-a(b+|((c)*))+d - abcd abcd @d,@d,-
-
-# check out the STARTEND option
-[abc] &# a(b)c b
-[abc] &# a(d)c
-[abc] &# a(bc)d b
-[abc] &# a(dc)d c
-. &# a()c
-b.*c &# b(bc)c bc
-b.* &# b(bc)c bc
-.*c &# b(bc)c bc
-
-# plain strings, with the NOSPEC flag
-abc m abc abc
-abc m xabcy abc
-abc m xyz
-a*b m aba*b a*b
-a*b m ab
-"" mC EMPTY
-
-# cases involving NULs
-aZb & a a
-aZb &p a
-aZb &p# (aZb) aZb
-aZ*b &p# (ab) ab
-a.b &# (aZb) aZb
-a.* &# (aZb)c aZb
-
-# word boundaries (ick)
-[[:<:]]a & a a
-[[:<:]]a & ba
-[[:<:]]a & -a a
-a[[:>:]] & a a
-a[[:>:]] & ab
-a[[:>:]] & a- a
-[[:<:]]a.c[[:>:]] & axcd-dayc-dazce-abc abc
-[[:<:]]a.c[[:>:]] & axcd-dayc-dazce-abc-q abc
-[[:<:]]a.c[[:>:]] & axc-dayc-dazce-abc axc
-[[:<:]]b.c[[:>:]] & a_bxc-byc_d-bzc-q bzc
-[[:<:]].x..[[:>:]] & y_xa_-_xb_y-_xc_-axdc _xc_
-[[:<:]]a_b[[:>:]] & x_a_b
-
-# past problems, and suspected problems
-(A[1])|(A[2])|(A[3])|(A[4])|(A[5])|(A[6])|(A[7])|(A[8])|(A[9])|(A[A]) - A1 A1
-abcdefghijklmnop i abcdefghijklmnop abcdefghijklmnop
-abcdefghijklmnopqrstuv i abcdefghijklmnopqrstuv abcdefghijklmnopqrstuv
-(ALAK)|(ALT[AB])|(CC[123]1)|(CM[123]1)|(GAMC)|(LC[23][EO ])|(SEM[1234])|(SL[ES][12])|(SLWW)|(SLF )|(SLDT)|(VWH[12])|(WH[34][EW])|(WP1[ESN]) - CC11 CC11
-CC[13]1|a{21}[23][EO][123][Es][12]a{15}aa[34][EW]aaaaaaa[X]a - CC11 CC11
-Char \([a-z0-9_]*\)\[.* b Char xyz[k Char xyz[k xyz
-a?b - ab ab
--\{0,1\}[0-9]*$ b -5 -5
-a*a*a*a*a*a*a* & aaaaaa aaaaaa
diff --git a/winsup/cygwin/regex/utils.h b/winsup/cygwin/regex/utils.h
deleted file mode 100644
index 1a997ac..0000000
--- a/winsup/cygwin/regex/utils.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* utility definitions */
-#ifdef _POSIX2_RE_DUP_MAX
-#define DUPMAX _POSIX2_RE_DUP_MAX
-#else
-#define DUPMAX 255
-#endif
-#define INFINITY (DUPMAX + 1)
-#define NC (CHAR_MAX - CHAR_MIN + 1)
-typedef unsigned char uch;
-
-/* switch off assertions (if not already off) if no REDEBUG */
-#ifndef REDEBUG
-#ifndef NDEBUG
-#define NDEBUG /* no assertions please */
-#endif
-#endif
-#include <assert.h>
-
-/* for old systems with bcopy() but no memmove() */
-#ifdef USEBCOPY
-#define memmove(d, s, c) bcopy(s, d, c)
-#endif
diff --git a/winsup/cygwin/registry.cc b/winsup/cygwin/registry.cc
deleted file mode 100644
index 2858bc4..0000000
--- a/winsup/cygwin/registry.cc
+++ /dev/null
@@ -1,262 +0,0 @@
-/* registry.cc: registry interface
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "registry.h"
-#include "security.h"
-#include <cygwin/version.h>
-#include "cygerrno.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "tls_pbuf.h"
-#include <wchar.h>
-static const char cygnus_class[] = "cygnus";
-
-reg_key::reg_key (HKEY top, REGSAM access, ...): _disposition (0)
-{
- va_list av;
- va_start (av, access);
- build_reg (top, access, av);
- va_end (av);
-}
-
-/* Opens a key under the appropriate Cygwin key.
- Do not use HKCU per MS KB 199190 */
-
-reg_key::reg_key (bool isHKLM, REGSAM access, ...): _disposition (0)
-{
- va_list av;
- HKEY top;
-
- if (isHKLM)
- top = HKEY_LOCAL_MACHINE;
- else
- {
- char name[128];
- const char *names[2] = {cygheap->user.get_windows_id (name), ".DEFAULT"};
- for (int i = 0; i < 2; i++)
- {
- key_is_invalid = RegOpenKeyEx (HKEY_USERS, names[i], 0, access, &top);
- if (key_is_invalid == ERROR_SUCCESS)
- goto OK;
- debug_printf ("HKU\\%s failed, Win32 error %ld", names[i], key_is_invalid);
- }
- return;
- }
-OK:
- new (this) reg_key (top, access, "SOFTWARE",
- CYGWIN_INFO_CYGWIN_REGISTRY_NAME, NULL);
- if (top != HKEY_LOCAL_MACHINE)
- RegCloseKey (top);
- if (key_is_invalid)
- return;
-
- top = key;
- va_start (av, access);
- build_reg (top, access, av);
- va_end (av);
- if (top != key)
- RegCloseKey (top);
-}
-
-void
-reg_key::build_reg (HKEY top, REGSAM access, va_list av)
-{
- char *name;
- HKEY r = top;
- key_is_invalid = 0;
-
- /* FIXME: Most of the time a valid mount area should exist. Perhaps
- we should just try an open of the correct key first and only resort
- to this method in the unlikely situation that it's the first time
- the current mount areas are being used. */
-
- while ((name = va_arg (av, char *)) != NULL)
- {
- int res = RegCreateKeyExA (r,
- name,
- 0,
- (char *) cygnus_class,
- REG_OPTION_NON_VOLATILE,
- access,
- &sec_none_nih,
- &key,
- &_disposition);
- if (r != top)
- RegCloseKey (r);
- r = key;
- if (res != ERROR_SUCCESS)
- {
- key_is_invalid = res;
- debug_printf ("failed to create key %s in the registry", name);
- break;
- }
- }
-}
-
-/* Given the current registry key, return the specific int value
- requested. Return def on failure. */
-
-int
-reg_key::get_int (const char *name, int def)
-{
- DWORD type;
- DWORD dst;
- DWORD size = sizeof (dst);
-
- if (key_is_invalid)
- return def;
-
- LONG res = RegQueryValueExA (key, name, 0, &type, (unsigned char *) &dst,
- &size);
-
- if (type != REG_DWORD || res != ERROR_SUCCESS)
- return def;
-
- return dst;
-}
-
-/* Given the current registry key, set a specific int value. */
-
-int
-reg_key::set_int (const char *name, int val)
-{
- DWORD value = val;
- if (key_is_invalid)
- return key_is_invalid;
-
- return (int) RegSetValueExA (key, name, 0, REG_DWORD,
- (unsigned char *) &value, sizeof (value));
-}
-
-/* Given the current registry key, return the specific string value
- requested. Return zero on success, non-zero on failure. */
-
-int
-reg_key::get_string (const char *name, char *dst, size_t max, const char * def)
-{
- DWORD size = max;
- DWORD type;
- LONG res;
-
- if (key_is_invalid)
- res = key_is_invalid;
- else
- res = RegQueryValueExA (key, name, 0, &type, (unsigned char *) dst, &size);
-
- if ((def != 0) && ((type != REG_SZ) || (res != ERROR_SUCCESS)))
- strcpy (dst, def);
- return (int) res;
-}
-
-/* Given the current registry key, set a specific string value. */
-
-int
-reg_key::set_string (const char *name, const char *src)
-{
- if (key_is_invalid)
- return key_is_invalid;
- return (int) RegSetValueExA (key, name, 0, REG_SZ, (unsigned char*) src,
- strlen (src) + 1);
-}
-
-/* Return the handle to key. */
-
-HKEY
-reg_key::get_key ()
-{
- return key;
-}
-
-/* Delete subkey of current key. Returns the error code from the
- RegDeleteKeyA invocation. */
-
-int
-reg_key::kill (const char *name)
-{
- if (key_is_invalid)
- return key_is_invalid;
- return RegDeleteKeyA (key, name);
-}
-
-/* Delete the value specified by name of current key. Returns the error code
- from the RegDeleteValueA invocation. */
-
-int
-reg_key::killvalue (const char *name)
-{
- if (key_is_invalid)
- return key_is_invalid;
- return RegDeleteValueA (key, name);
-}
-
-reg_key::~reg_key ()
-{
- if (!key_is_invalid)
- RegCloseKey (key);
- key_is_invalid = 1;
-}
-
-PWCHAR
-get_registry_hive_path (const PWCHAR name, PWCHAR path)
-{
- WCHAR key[256], *kend;
- HKEY hkey;
-
- if (!name || !path)
- return NULL;
- kend = wcpcpy (key, L"SOFTWARE\\Microsoft\\WindowsNT\\CurrentVersion\\ProfileList\\");
- wcpcpy (kend, name);
- if (!RegOpenKeyExW (HKEY_LOCAL_MACHINE, key, 0, KEY_READ, &hkey))
- {
- tmp_pathbuf tp;
- PWCHAR buf = tp.w_get ();
- DWORD type, siz;
-
- path[0] = L'\0';
- if (!RegQueryValueExW (hkey, L"ProfileImagePath", 0, &type,
- (BYTE *)buf, (siz = NT_MAX_PATH, &siz)))
- ExpandEnvironmentStringsW (buf, path, NT_MAX_PATH);
- RegCloseKey (hkey);
- if (path[0])
- return path;
- }
- debug_printf ("HKLM\\%W not found", key);
- return NULL;
-}
-
-void
-load_registry_hive (const PWCHAR name)
-{
- tmp_pathbuf tp;
- PWCHAR path = tp.w_get ();
- HKEY hkey;
- LONG ret;
-
- if (!name)
- return;
- /* Check if user hive is already loaded. */
- if (!RegOpenKeyExW (HKEY_USERS, name, 0, KEY_READ, &hkey))
- {
- debug_printf ("User registry hive for %W already exists", name);
- RegCloseKey (hkey);
- return;
- }
- if (get_registry_hive_path (name, path))
- {
- wcscat (path, L"\\NTUSER.DAT");
- if ((ret = RegLoadKeyW (HKEY_USERS, name, path)) != ERROR_SUCCESS)
- debug_printf ("Loading user registry hive for %W failed: %d", name, ret);
- }
-}
-
diff --git a/winsup/cygwin/registry.h b/winsup/cygwin/registry.h
deleted file mode 100644
index bd2f388..0000000
--- a/winsup/cygwin/registry.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* registry.h: shared info for cygwin
-
- Copyright 2000, 2001, 2004, 2006, 2008 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. */
-
-class reg_key
-{
-private:
-
- HKEY key;
- LONG key_is_invalid;
- DWORD _disposition;
-
-public:
-
- reg_key (HKEY toplev, REGSAM access, ...);
- reg_key (bool isHKLM, REGSAM access, ...);
-
- void *operator new (size_t, void *p) {return p;}
- void build_reg (HKEY key, REGSAM access, va_list av);
-
- int error () {return key == (HKEY) INVALID_HANDLE_VALUE;}
-
- int kill (const char *child);
- int killvalue (const char *name);
-
- HKEY get_key ();
- int get_int (const char *,int def);
- int get_string (const char *, char *buf, size_t len, const char *def);
- int set_string (const char *,const char *);
- int set_int (const char *, int val);
- bool created () const {return _disposition & REG_CREATED_NEW_KEY;}
-
- ~reg_key ();
-};
-
-/* Evaluates path to the directory of the local user registry hive */
-PWCHAR __stdcall get_registry_hive_path (const PWCHAR name, PWCHAR path);
-void __stdcall load_registry_hive (const PWCHAR name);
diff --git a/winsup/cygwin/resource.cc b/winsup/cygwin/resource.cc
deleted file mode 100644
index 6258750..0000000
--- a/winsup/cygwin/resource.cc
+++ /dev/null
@@ -1,191 +0,0 @@
-/* resource.cc: getrusage () and friends.
-
- Copyright 1996, 1997, 1998, 2000, 2001, 2002 Red Hat, Inc.
-
- Written by Steve Chamberlain (sac@cygnus.com), Doug Evans (dje@cygnus.com),
- Geoffrey Noer (noer@cygnus.com) of Cygnus Support.
- Rewritten by Sergey S. Okhapkin (sos@prospect.com.ru)
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <unistd.h>
-#include "pinfo.h"
-#include "psapi.h"
-#include "cygtls.h"
-
-/* add timeval values */
-static void
-add_timeval (struct timeval *tv1, struct timeval *tv2)
-{
- tv1->tv_sec += tv2->tv_sec;
- tv1->tv_usec += tv2->tv_usec;
- if (tv1->tv_usec >= 1000000)
- {
- tv1->tv_usec -= 1000000;
- tv1->tv_sec++;
- }
-}
-
-/* add rusage values of r2 to r1 */
-void __stdcall
-add_rusage (struct rusage *r1, struct rusage *r2)
-{
- add_timeval (&r1->ru_utime, &r2->ru_utime);
- add_timeval (&r1->ru_stime, &r2->ru_stime);
- r1->ru_maxrss += r2->ru_maxrss;
- r1->ru_ixrss += r2->ru_ixrss;
- r1->ru_idrss += r2->ru_idrss;
- r1->ru_isrss += r2->ru_isrss;
- r1->ru_minflt += r2->ru_minflt;
- r1->ru_majflt += r2->ru_majflt;
- r1->ru_nswap += r2->ru_nswap;
- r1->ru_inblock += r2->ru_inblock;
- r1->ru_oublock += r2->ru_oublock;
- r1->ru_msgsnd += r2->ru_msgsnd;
- r1->ru_msgrcv += r2->ru_msgrcv;
- r1->ru_nsignals += r2->ru_nsignals;
- r1->ru_nvcsw += r2->ru_nvcsw;
- r1->ru_nivcsw += r2->ru_nivcsw;
-}
-
-/* FIXME: what about other fields? */
-void __stdcall
-fill_rusage (struct rusage *r, HANDLE h)
-{
- FILETIME creation_time = {0,0};
- FILETIME exit_time = {0,0};
- FILETIME kernel_time = {0,0};
- FILETIME user_time = {0,0};
-
- struct timeval tv;
-
- memset (r, 0, sizeof (*r));
- GetProcessTimes (h, &creation_time, &exit_time, &kernel_time, &user_time);
- totimeval (&tv, &kernel_time, 0, 0);
- add_timeval (&r->ru_stime, &tv);
- totimeval (&tv, &user_time, 0, 0);
- add_timeval (&r->ru_utime, &tv);
-
- PROCESS_MEMORY_COUNTERS pmc;
-
- memset (&pmc, 0, sizeof (pmc));
- if (GetProcessMemoryInfo (h, &pmc, sizeof (pmc)))
- {
- r->ru_maxrss += (long) (pmc.WorkingSetSize /1024);
- r->ru_majflt += pmc.PageFaultCount;
- }
-}
-
-extern "C" int
-getrusage (int intwho, struct rusage *rusage_in)
-{
- int res = 0;
- struct rusage r;
-
- if (intwho == RUSAGE_SELF)
- {
- memset (&r, 0, sizeof (r));
- fill_rusage (&r, hMainProc);
- *rusage_in = r;
- }
- else if (intwho == RUSAGE_CHILDREN)
- *rusage_in = myself->rusage_children;
- else
- {
- set_errno (EINVAL);
- res = -1;
- }
-
- syscall_printf ("%d = getrusage (%d, %p)", res, intwho, rusage_in);
- return res;
-}
-
-unsigned long rlim_core = RLIM_INFINITY;
-
-extern "C" int
-getrlimit (int resource, struct rlimit *rlp)
-{
- MEMORY_BASIC_INFORMATION m;
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- rlp->rlim_cur = RLIM_INFINITY;
- rlp->rlim_max = RLIM_INFINITY;
-
- switch (resource)
- {
- case RLIMIT_CPU:
- case RLIMIT_FSIZE:
- case RLIMIT_DATA:
- break;
- case RLIMIT_STACK:
- if (!VirtualQuery ((LPCVOID) &m, &m, sizeof m))
- debug_printf ("couldn't get stack info, returning def.values. %E");
- else
- {
- rlp->rlim_cur = (DWORD) &m - (DWORD) m.AllocationBase;
- rlp->rlim_max = (DWORD) m.BaseAddress + m.RegionSize
- - (DWORD) m.AllocationBase;
- }
- break;
- case RLIMIT_NOFILE:
- rlp->rlim_cur = getdtablesize ();
- if (rlp->rlim_cur < OPEN_MAX)
- rlp->rlim_cur = OPEN_MAX;
- break;
- case RLIMIT_CORE:
- rlp->rlim_cur = rlim_core;
- break;
- case RLIMIT_AS:
- rlp->rlim_cur = 0x80000000UL;
- rlp->rlim_max = 0x80000000UL;
- break;
- default:
- set_errno (EINVAL);
- return -1;
- }
- return 0;
-}
-
-extern "C" int
-setrlimit (int resource, const struct rlimit *rlp)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- struct rlimit oldlimits;
-
- // Check if the request is to actually change the resource settings.
- // If it does not result in a change, take no action and do not
- // fail.
- if (getrlimit (resource, &oldlimits) < 0)
- return -1;
-
- if (oldlimits.rlim_cur == rlp->rlim_cur &&
- oldlimits.rlim_max == rlp->rlim_max)
- // No change in resource requirements, succeed immediately
- return 0;
-
- switch (resource)
- {
- case RLIMIT_CORE:
- rlim_core = rlp->rlim_cur;
- break;
- case RLIMIT_NOFILE:
- if (rlp->rlim_cur != RLIM_INFINITY)
- return setdtablesize (rlp->rlim_cur);
- break;
- default:
- set_errno (EINVAL);
- return -1;
- }
- return 0;
-}
diff --git a/winsup/cygwin/rmsym b/winsup/cygwin/rmsym
deleted file mode 100755
index 1549eed..0000000
--- a/winsup/cygwin/rmsym
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-lib=$1; shift
-nm=$1; shift
-ar=$1; shift
-grepit=`echo $* | sed 's/ /\$|__imp__/g'`
-[ -n "$grepit" ] && grepit="__imp__$grepit\$"
-objs=`$nm $lib | awk -F: '/^d*[0-9][0-9]*.o:/ {obj=$1} '"/$grepit/"'{print obj}'`
-[ -n "$objs" ] || exit 1
-$ar ds $lib $objs
diff --git a/winsup/cygwin/scandir.cc b/winsup/cygwin/scandir.cc
deleted file mode 100644
index 84b6538..0000000
--- a/winsup/cygwin/scandir.cc
+++ /dev/null
@@ -1,93 +0,0 @@
-/* scandir.cc
-
- Copyright 1998, 1999, 2000, 2001 Red Hat, Inc.
-
- Written by Corinna Vinschen <corinna.vinschen@cityweb.de>
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#include "winsup.h"
-#include <dirent.h>
-#include <stdlib.h>
-#include "cygerrno.h"
-
-extern "C" int
-alphasort (const struct dirent **a, const struct dirent **b)
-{
- return strcoll ((*a)->d_name, (*b)->d_name);
-}
-
-extern "C" int
-scandir (const char *dir,
- struct dirent ***namelist,
- int (*select) (const struct dirent *),
- int (*compar) (const struct dirent **, const struct dirent **))
-{
- DIR *dirp;
- struct dirent *ent, *etmp, **nl = NULL, **ntmp;
- int count = 0;
- int allocated = 0;
- int err = 0;
-
- if (!(dirp = opendir (dir)))
- return -1;
-
- if (!compar)
- compar = alphasort;
-
- while ((ent = readdir (dirp)))
- {
- if (!select || select (ent))
- {
- if (count == allocated)
- {
-
- if (allocated == 0)
- allocated = 10;
- else
- allocated *= 2;
-
- ntmp = (struct dirent **) realloc (nl, allocated * sizeof *nl);
- if (!ntmp)
- {
- err = ENOMEM;
- break;
- }
- nl = ntmp;
- }
-
- if (!(etmp = (struct dirent *) malloc (sizeof *ent)))
- {
- err = ENOMEM;
- break;
- }
- *etmp = *ent;
- nl[count++] = etmp;
- }
- }
-
- if (err != 0)
- {
- closedir (dirp);
- if (nl)
- {
- while (count > 0)
- free (nl[--count]);
- free (nl);
- }
- /* Ignore errors from closedir() and what not else. */
- set_errno (err);
- return -1;
- }
-
- closedir (dirp);
-
- qsort (nl, count, sizeof *nl, (int (*)(const void *, const void *)) compar);
- if (namelist)
- *namelist = nl;
- return count;
-}
diff --git a/winsup/cygwin/sched.cc b/winsup/cygwin/sched.cc
deleted file mode 100644
index 08f9683..0000000
--- a/winsup/cygwin/sched.cc
+++ /dev/null
@@ -1,489 +0,0 @@
-/* sched.cc: scheduler interface for Cygwin
-
- Copyright 2001, 2002, 2006, 2007 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 HAVE_CONFIG_H
-#endif
-
-#include "winsup.h"
-#include "miscfuncs.h"
-#include "cygerrno.h"
-#include "pinfo.h"
-/* for getpid */
-#include <unistd.h>
-#include "registry.h"
-
-extern "C" HWND WINAPI GetForegroundWindow();
-
-/* Win32 priority to UNIX priority Mapping.
- For now, I'm just following the spec: any range of priorities is ok.
- There are probably many many issues with this...
-
- We don't want process's going realtime. Well, they probably could, but the issues
- with avoiding the priority values 17-22 and 27-30 (not supported before win2k)
- make that inefficient.
- However to complicate things most unixes use lower is better priorities.
-
- So we map -14 to 15, and 15 to 1 via (16- ((n+16) >> 1))
- we then map 1 to 15 to various process class and thread priority combinations
-
- Then we need to look at the threads vi process priority. As win95 98 and NT 4
- Don't support opening threads cross-process (unless a thread HANDLE is passed around)
- for now, we'll just use the priority class.
-
- The code and logic are present to calculate the priority for thread
- , if a thread handle can be obtained. Alternatively, if the symbols wouldn't be
- resolved until they are used
- we could support this on windows 2000 and ME now, and just fall back to the
- class only on pre win2000 machines.
-
- Lastly, because we can't assume that the pid we're given are Windows pids, we can't
- alter non-cygwin started programs.
-*/
-
-extern "C"
-{
-
-/* max priority for policy */
-int
-sched_get_priority_max (int policy)
-{
- if (policy < 1 || policy > 3)
- {
- set_errno (EINVAL);
- return -1;
- }
- return -14;
-}
-
-/* min priority for policy */
-int
-sched_get_priority_min (int policy)
-{
- if (policy < 1 || policy > 3)
- {
- set_errno (EINVAL);
- return -1;
- }
- return 15;
-}
-
-/* Check a scheduler parameter struct for valid settings */
-int
-valid_sched_parameters (const struct sched_param *param)
-{
- if (param->sched_priority < -14 || param->sched_priority > 15)
- {
- return 0;
- }
- return -1;
-
-}
-
-/* get sched params for process
-
- Note, I'm never returning EPERM,
- Always ESRCH. This is by design (If cygwin ever looks at paranoid security
- Walking the pid values is a known hole in some os's)
-*/
-int
-sched_getparam (pid_t pid, struct sched_param *param)
-{
- pid_t localpid;
- int winpri;
- if (!param || pid < 0)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- localpid = pid ? pid : getpid ();
-
- DWORD Class;
- int ThreadPriority;
- HANDLE process;
- pinfo p (localpid);
-
- /* get the class */
-
- if (!p)
- {
- set_errno (ESRCH);
- return -1;
- }
- process = OpenProcess (PROCESS_QUERY_INFORMATION, FALSE, p->dwProcessId);
- if (!process)
- {
- set_errno (ESRCH);
- return -1;
- }
- Class = GetPriorityClass (process);
- CloseHandle (process);
- if (!Class)
- {
- set_errno (ESRCH);
- return -1;
- }
- ThreadPriority = THREAD_PRIORITY_NORMAL;
-
- /* calculate the unix priority.
-
- FIXME: windows 2000 supports ABOVE_NORMAL and BELOW_NORMAL class's
- So this logic just defaults those class factors to NORMAL in the calculations */
-
- switch (Class)
- {
- case IDLE_PRIORITY_CLASS:
- switch (ThreadPriority)
- {
- case THREAD_PRIORITY_IDLE:
- winpri = 1;
- break;
- case THREAD_PRIORITY_LOWEST:
- winpri = 2;
- break;
- case THREAD_PRIORITY_BELOW_NORMAL:
- winpri = 3;
- break;
- case THREAD_PRIORITY_NORMAL:
- winpri = 4;
- break;
- case THREAD_PRIORITY_ABOVE_NORMAL:
- winpri = 5;
- break;
- case THREAD_PRIORITY_HIGHEST:
- default:
- winpri = 6;
- break;
- }
- break;
- case HIGH_PRIORITY_CLASS:
- switch (ThreadPriority)
- {
- case THREAD_PRIORITY_IDLE:
- winpri = 1;
- break;
- case THREAD_PRIORITY_LOWEST:
- winpri = 11;
- break;
- case THREAD_PRIORITY_BELOW_NORMAL:
- winpri = 12;
- break;
- case THREAD_PRIORITY_NORMAL:
- winpri = 13;
- break;
- case THREAD_PRIORITY_ABOVE_NORMAL:
- winpri = 14;
- break;
- case THREAD_PRIORITY_HIGHEST:
- default:
- winpri = 15;
- break;
- }
- break;
- case NORMAL_PRIORITY_CLASS:
- default:
- switch (ThreadPriority)
- {
- case THREAD_PRIORITY_IDLE:
- winpri = 1;
- break;
- case THREAD_PRIORITY_LOWEST:
- winpri = 7;
- break;
- case THREAD_PRIORITY_BELOW_NORMAL:
- winpri = 8;
- break;
- case THREAD_PRIORITY_NORMAL:
- winpri = 9;
- break;
- case THREAD_PRIORITY_ABOVE_NORMAL:
- winpri = 10;
- break;
- case THREAD_PRIORITY_HIGHEST:
- default:
- winpri = 11;
- break;
- }
- break;
- }
-
- /* reverse out winpri = (16- ((unixpri+16) >> 1)) */
- /*
- winpri-16 = - (unixpri +16 ) >> 1
-
- -(winpri-16) = unixpri +16 >> 1
- (-(winpri-16)) << 1 = unixpri+16
- ((-(winpri - 16)) << 1) - 16 = unixpri
- */
-
- param->sched_priority = ((-(winpri - 16)) << 1) - 16;
-
- return 0;
-}
-
-/* get the scheduler for pid
-
- All process's on WIN32 run with SCHED_FIFO.
- So we just give an answer.
- (WIN32 uses a multi queue FIFO).
-*/
-int
-sched_getscheduler (pid_t pid)
-{
- if (pid < 0)
- return ESRCH;
- else
- return SCHED_FIFO;
-}
-
-/* get the time quantum for pid
-
- Implemented only for NT systems, it fails and sets errno to ESRCH
- for non-NT systems.
-*/
-int
-sched_rr_get_interval (pid_t pid, struct timespec *interval)
-{
- static const char quantable[2][2][3] =
- {{{12, 24, 36}, { 6, 12, 18}},
- {{36, 36, 36}, {18, 18, 18}}};
- /* FIXME: Clocktickinterval can be 15 ms for multi-processor system. */
- static const int clocktickinterval = 10;
- static const int quantapertick = 3;
-
- HWND forwin;
- DWORD forprocid;
- int vfindex, slindex, qindex, prisep;
- long nsec;
-
- forwin = GetForegroundWindow ();
- if (!forwin)
- GetWindowThreadProcessId (forwin, &forprocid);
- else
- forprocid = 0;
-
- reg_key reg (HKEY_LOCAL_MACHINE, KEY_READ, "SYSTEM", "CurrentControlSet",
- "Control", "PriorityControl", NULL);
- if (reg.error ())
- {
- set_errno (ESRCH);
- return -1;
- }
- prisep = reg.get_int ("Win32PrioritySeparation", 2);
- pinfo pi (pid ? pid : myself->pid);
- if (!pi)
- {
- set_errno (ESRCH);
- return -1;
- }
-
- if (pi->dwProcessId == forprocid)
- {
- qindex = prisep & 3;
- qindex = qindex == 3 ? 2 : qindex;
- }
- else
- qindex = 0;
- vfindex = ((prisep >> 2) & 3) % 3;
- if (vfindex == 0)
- vfindex = wincap.is_server () || (prisep & 3) == 0 ? 1 : 0;
- else
- vfindex -= 1;
- slindex = ((prisep >> 4) & 3) % 3;
- if (slindex == 0)
- slindex = wincap.is_server () ? 1 : 0;
- else
- slindex -= 1;
-
- nsec = quantable[vfindex][slindex][qindex] / quantapertick
- * clocktickinterval * 1000000;
- interval->tv_sec = nsec / 1000000000;
- interval->tv_nsec = nsec % 1000000000;
-
- return 0;
-}
-
-/* set the scheduling parameters */
-int
-sched_setparam (pid_t pid, const struct sched_param *param)
-{
- pid_t localpid;
- int winpri;
- DWORD Class;
- int ThreadPriority;
- HANDLE process;
-
- if (!param || pid < 0)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- if (!valid_sched_parameters (param))
- {
- set_errno (EINVAL);
- return -1;
- }
-
- /* winpri = (16- ((unixpri+16) >> 1)) */
- winpri = 16 - ((param->sched_priority + 16) >> 1);
-
- /* calculate our desired priority class and thread priority */
-
- if (winpri < 7)
- Class = IDLE_PRIORITY_CLASS;
- else if (winpri > 10)
- Class = HIGH_PRIORITY_CLASS;
- else
- Class = NORMAL_PRIORITY_CLASS;
-
- switch (Class)
- {
- case IDLE_PRIORITY_CLASS:
- switch (winpri)
- {
- case 1:
- ThreadPriority = THREAD_PRIORITY_IDLE;
- break;
- case 2:
- ThreadPriority = THREAD_PRIORITY_LOWEST;
- break;
- case 3:
- ThreadPriority = THREAD_PRIORITY_BELOW_NORMAL;
- break;
- case 4:
- ThreadPriority = THREAD_PRIORITY_NORMAL;
- break;
- case 5:
- ThreadPriority = THREAD_PRIORITY_ABOVE_NORMAL;
- break;
- case 6:
- ThreadPriority = THREAD_PRIORITY_HIGHEST;
- break;
- }
- break;
- case NORMAL_PRIORITY_CLASS:
- switch (winpri)
- {
- case 7:
- ThreadPriority = THREAD_PRIORITY_LOWEST;
- break;
- case 8:
- ThreadPriority = THREAD_PRIORITY_BELOW_NORMAL;
- break;
- case 9:
- ThreadPriority = THREAD_PRIORITY_NORMAL;
- break;
- case 10:
- ThreadPriority = THREAD_PRIORITY_ABOVE_NORMAL;
- break;
- case 11:
- ThreadPriority = THREAD_PRIORITY_HIGHEST;
- break;
- }
- break;
- case HIGH_PRIORITY_CLASS:
- switch (winpri)
- {
- case 12:
- ThreadPriority = THREAD_PRIORITY_BELOW_NORMAL;
- break;
- case 13:
- ThreadPriority = THREAD_PRIORITY_NORMAL;
- break;
- case 14:
- ThreadPriority = THREAD_PRIORITY_ABOVE_NORMAL;
- break;
- case 15:
- ThreadPriority = THREAD_PRIORITY_HIGHEST;
- break;
- }
- break;
- }
-
- localpid = pid ? pid : getpid ();
-
- pinfo p (localpid);
-
- /* set the class */
-
- if (!p)
- {
- set_errno (1); //ESRCH);
- return -1;
- }
- process =
- OpenProcess (PROCESS_SET_INFORMATION, FALSE, (DWORD) p->dwProcessId);
- if (!process)
- {
- set_errno (2); //ESRCH);
- return -1;
- }
- if (!SetPriorityClass (process, Class))
- {
- CloseHandle (process);
- set_errno (EPERM);
- return -1;
- }
- CloseHandle (process);
-
- return 0;
-}
-
-/* we map -14 to 15, and 15 to 1 via (16- ((n+16) >> 1)). This lines up with the allowed
- * valueswe return elsewhere in the sched* functions. We then map in groups of three to
- * allowed thread priority's. The reason for dropping accuracy while still returning
- * a wide range of values is to allow more flexible code in the future.
- */
-int
-sched_set_thread_priority (HANDLE thread, int priority)
-{
- int real_pri;
- real_pri = 16 - ((priority + 16) >> 1);
- if (real_pri <1 || real_pri > 15)
- return EINVAL;
-
- if (real_pri < 4)
- real_pri = THREAD_PRIORITY_LOWEST;
- else if (real_pri < 7)
- real_pri = THREAD_PRIORITY_BELOW_NORMAL;
- else if (real_pri < 10)
- real_pri = THREAD_PRIORITY_NORMAL;
- else if (real_pri < 13)
- real_pri = THREAD_PRIORITY_ABOVE_NORMAL;
- else
- real_pri = THREAD_PRIORITY_HIGHEST;
-
- if (!SetThreadPriority (thread, real_pri))
- /* invalid handle, no access are the only expected errors. */
- return EPERM;
- return 0;
-}
-
-/* set the scheduler */
-int
-sched_setscheduler (pid_t pid, int policy,
- const struct sched_param *param)
-{
- /* on win32, you can't change the scheduler. Doh! */
- set_errno (ENOSYS);
- return -1;
-}
-
-/* yield the cpu */
-int
-sched_yield ()
-{
- low_priority_sleep (0);
- return 0;
-}
-}
diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc
deleted file mode 100644
index 2496ce0..0000000
--- a/winsup/cygwin/sec_acl.cc
+++ /dev/null
@@ -1,982 +0,0 @@
-/* sec_acl.cc: Sun compatible ACL functions.
-
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc.
-
- Written by Corinna Vinschen <corinna@vinschen.de>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include <sys/acl.h>
-#include <ctype.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "pwdgrp.h"
-
-static int
-searchace (__aclent32_t *aclp, int nentries, int type, __uid32_t id = ILLEGAL_UID)
-{
- int i;
-
- for (i = 0; i < nentries; ++i)
- if ((aclp[i].a_type == type && (id == ILLEGAL_UID || aclp[i].a_id == id))
- || !aclp[i].a_type)
- return i;
- return -1;
-}
-
-int
-setacl (HANDLE handle, path_conv &pc, int nentries, __aclent32_t *aclbufp,
- bool &writable)
-{
- security_descriptor sd_ret;
-
- if (get_file_sd (handle, pc, sd_ret))
- return -1;
-
- BOOL dummy;
-
- /* Get owner SID. */
- PSID owner_sid;
- if (!GetSecurityDescriptorOwner (sd_ret, &owner_sid, &dummy))
- {
- __seterrno ();
- return -1;
- }
- cygsid owner (owner_sid);
-
- /* Get group SID. */
- PSID group_sid;
- if (!GetSecurityDescriptorGroup (sd_ret, &group_sid, &dummy))
- {
- __seterrno ();
- return -1;
- }
- cygsid group (group_sid);
-
- /* Initialize local security descriptor. */
- SECURITY_DESCRIPTOR sd;
- if (!InitializeSecurityDescriptor (&sd, SECURITY_DESCRIPTOR_REVISION))
- {
- __seterrno ();
- return -1;
- }
- if (!SetSecurityDescriptorOwner (&sd, owner, FALSE))
- {
- __seterrno ();
- return -1;
- }
- if (!SetSecurityDescriptorGroup (&sd, group, FALSE))
- {
- __seterrno ();
- return -1;
- }
-
- /* Fill access control list. */
- PACL acl = (PACL) alloca (3072);
- size_t acl_len = sizeof (ACL);
- int ace_off = 0;
-
- cygsid sid;
- struct passwd *pw;
- struct __group32 *gr;
- int pos;
-
- if (!InitializeAcl (acl, 3072, ACL_REVISION))
- {
- __seterrno ();
- return -1;
- }
-
- writable = false;
-
- for (int i = 0; i < nentries; ++i)
- {
- DWORD allow;
- /* Owner has more standard rights set. */
- if ((aclbufp[i].a_type & ~ACL_DEFAULT) == USER_OBJ)
- allow = STANDARD_RIGHTS_ALL
- | (pc.fs_is_samba ()
- ? 0 : (FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES));
- else
- allow = STANDARD_RIGHTS_READ
- | (pc.fs_is_samba () ? 0 : FILE_READ_ATTRIBUTES);
- if (aclbufp[i].a_perm & S_IROTH)
- allow |= FILE_GENERIC_READ;
- if (aclbufp[i].a_perm & S_IWOTH)
- {
- allow |= FILE_GENERIC_WRITE;
- writable = true;
- }
- if (aclbufp[i].a_perm & S_IXOTH)
- allow |= FILE_GENERIC_EXECUTE & ~FILE_READ_ATTRIBUTES;
- if ((aclbufp[i].a_perm & (S_IWOTH | S_IXOTH)) == (S_IWOTH | S_IXOTH))
- allow |= FILE_DELETE_CHILD;
- /* Set inherit property. */
- DWORD inheritance = (aclbufp[i].a_type & ACL_DEFAULT)
- ? (SUB_CONTAINERS_AND_OBJECTS_INHERIT | INHERIT_ONLY)
- : NO_INHERITANCE;
- /*
- * If a specific acl contains a corresponding default entry with
- * identical permissions, only one Windows ACE with proper
- * inheritance bits is created.
- */
- if (!(aclbufp[i].a_type & ACL_DEFAULT)
- && aclbufp[i].a_type & (USER|GROUP|OTHER_OBJ)
- && (pos = searchace (aclbufp + i + 1, nentries - i - 1,
- aclbufp[i].a_type | ACL_DEFAULT,
- (aclbufp[i].a_type & (USER|GROUP))
- ? aclbufp[i].a_id : ILLEGAL_UID)) >= 0
- && aclbufp[i].a_perm == aclbufp[i + 1 + pos].a_perm)
- {
- inheritance = SUB_CONTAINERS_AND_OBJECTS_INHERIT;
- /* This invalidates the corresponding default entry. */
- aclbufp[i + 1 + pos].a_type = USER|GROUP|ACL_DEFAULT;
- }
- switch (aclbufp[i].a_type)
- {
- case USER_OBJ:
- if (!add_access_allowed_ace (acl, ace_off++, allow,
- owner, acl_len, inheritance))
- return -1;
- break;
- case DEF_USER_OBJ:
- if (!add_access_allowed_ace (acl, ace_off++, allow,
- well_known_creator_owner_sid, acl_len, inheritance))
- return -1;
- break;
- case USER:
- case DEF_USER:
- if (!(pw = internal_getpwuid (aclbufp[i].a_id))
- || !sid.getfrompw (pw))
- {
- set_errno (EINVAL);
- return -1;
- }
- if (!add_access_allowed_ace (acl, ace_off++, allow,
- sid, acl_len, inheritance))
- return -1;
- break;
- case GROUP_OBJ:
- if (!add_access_allowed_ace (acl, ace_off++, allow,
- group, acl_len, inheritance))
- return -1;
- break;
- case DEF_GROUP_OBJ:
- if (!add_access_allowed_ace (acl, ace_off++, allow,
- well_known_creator_group_sid, acl_len, inheritance))
- return -1;
- break;
- case GROUP:
- case DEF_GROUP:
- if (!(gr = internal_getgrgid (aclbufp[i].a_id))
- || !sid.getfromgr (gr))
- {
- set_errno (EINVAL);
- return -1;
- }
- if (!add_access_allowed_ace (acl, ace_off++, allow,
- sid, acl_len, inheritance))
- return -1;
- break;
- case OTHER_OBJ:
- case DEF_OTHER_OBJ:
- if (!add_access_allowed_ace (acl, ace_off++, allow,
- well_known_world_sid,
- acl_len, inheritance))
- return -1;
- break;
- }
- }
- /* Set AclSize to computed value. */
- acl->AclSize = acl_len;
- debug_printf ("ACL-Size: %d", acl_len);
- /* Create DACL for local security descriptor. */
- if (!SetSecurityDescriptorDacl (&sd, TRUE, acl, FALSE))
- {
- __seterrno ();
- return -1;
- }
- /* Make self relative security descriptor in sd_ret. */
- DWORD sd_size = 0;
- MakeSelfRelativeSD (&sd, sd_ret, &sd_size);
- if (sd_size <= 0)
- {
- __seterrno ();
- return -1;
- }
- if (!sd_ret.realloc (sd_size))
- {
- set_errno (ENOMEM);
- return -1;
- }
- if (!MakeSelfRelativeSD (&sd, sd_ret, &sd_size))
- {
- __seterrno ();
- return -1;
- }
- debug_printf ("Created SD-Size: %d", sd_ret.size ());
- return set_file_sd (handle, pc, sd_ret);
-}
-
-/* Temporary access denied bits */
-#define DENY_R 040000
-#define DENY_W 020000
-#define DENY_X 010000
-
-static void
-getace (__aclent32_t &acl, int type, int id, DWORD win_ace_mask,
- DWORD win_ace_type)
-{
- acl.a_type = type;
- acl.a_id = id;
-
- if ((win_ace_mask & FILE_READ_BITS) && !(acl.a_perm & (S_IROTH | DENY_R)))
- {
- if (win_ace_type == ACCESS_ALLOWED_ACE_TYPE)
- acl.a_perm |= S_IROTH;
- else if (win_ace_type == ACCESS_DENIED_ACE_TYPE)
- acl.a_perm |= DENY_R;
- }
-
- if ((win_ace_mask & FILE_WRITE_BITS) && !(acl.a_perm & (S_IWOTH | DENY_W)))
- {
- if (win_ace_type == ACCESS_ALLOWED_ACE_TYPE)
- acl.a_perm |= S_IWOTH;
- else if (win_ace_type == ACCESS_DENIED_ACE_TYPE)
- acl.a_perm |= DENY_W;
- }
-
- if ((win_ace_mask & FILE_EXEC_BITS) && !(acl.a_perm & (S_IXOTH | DENY_X)))
- {
- if (win_ace_type == ACCESS_ALLOWED_ACE_TYPE)
- acl.a_perm |= S_IXOTH;
- else if (win_ace_type == ACCESS_DENIED_ACE_TYPE)
- acl.a_perm |= DENY_X;
- }
-}
-
-int
-getacl (HANDLE handle, path_conv &pc, int nentries, __aclent32_t *aclbufp)
-{
- security_descriptor sd;
-
- if (get_file_sd (handle, pc, sd))
- return -1;
-
- cygpsid owner_sid;
- cygpsid group_sid;
- BOOL dummy;
- __uid32_t uid;
- __gid32_t gid;
-
- if (!GetSecurityDescriptorOwner (sd, (PSID *) &owner_sid, &dummy))
- {
- debug_printf ("GetSecurityDescriptorOwner %E");
- __seterrno ();
- return -1;
- }
- uid = owner_sid.get_uid ();
-
- if (!GetSecurityDescriptorGroup (sd, (PSID *) &group_sid, &dummy))
- {
- debug_printf ("GetSecurityDescriptorGroup %E");
- __seterrno ();
- return -1;
- }
- gid = group_sid.get_gid ();
-
- __aclent32_t lacl[MAX_ACL_ENTRIES];
- memset (&lacl, 0, MAX_ACL_ENTRIES * sizeof (__aclent32_t));
- lacl[0].a_type = USER_OBJ;
- lacl[0].a_id = uid;
- lacl[1].a_type = GROUP_OBJ;
- lacl[1].a_id = gid;
- lacl[2].a_type = OTHER_OBJ;
- lacl[2].a_id = ILLEGAL_GID;
- lacl[3].a_type = CLASS_OBJ;
- lacl[3].a_id = ILLEGAL_GID;
- lacl[3].a_perm = S_IROTH | S_IWOTH | S_IXOTH;
-
- PACL acl;
- BOOL acl_exists;
-
- if (!GetSecurityDescriptorDacl (sd, &acl_exists, &acl, &dummy))
- {
- __seterrno ();
- debug_printf ("GetSecurityDescriptorDacl %E");
- return -1;
- }
-
- int pos, i, types_def = 0;
-
- if (!acl_exists || !acl)
- for (pos = 0; pos < 3; ++pos) /* Don't change CLASS_OBJ entry */
- lacl[pos].a_perm = S_IROTH | S_IWOTH | S_IXOTH;
- else
- {
- for (i = 0; i < acl->AceCount; ++i)
- {
- ACCESS_ALLOWED_ACE *ace;
-
- if (!GetAce (acl, i, (PVOID *) &ace))
- continue;
-
- cygpsid ace_sid ((PSID) &ace->SidStart);
- int id;
- int type = 0;
-
- if (ace_sid == well_known_world_sid)
- {
- type = OTHER_OBJ;
- id = ILLEGAL_GID;
- }
- else if (ace_sid == group_sid)
- {
- type = GROUP_OBJ;
- id = gid;
- }
- else if (ace_sid == owner_sid)
- {
- type = USER_OBJ;
- id = uid;
- }
- else if (ace_sid == well_known_creator_group_sid)
- {
- type = GROUP_OBJ | ACL_DEFAULT;
- id = ILLEGAL_GID;
- }
- else if (ace_sid == well_known_creator_owner_sid)
- {
- type = USER_OBJ | ACL_DEFAULT;
- id = ILLEGAL_GID;
- }
- else
- id = ace_sid.get_id (true, &type);
-
- if (!type)
- continue;
- if (!(ace->Header.AceFlags & INHERIT_ONLY || type & ACL_DEFAULT))
- {
- if ((pos = searchace (lacl, MAX_ACL_ENTRIES, type, id)) >= 0)
- getace (lacl[pos], type, id, ace->Mask, ace->Header.AceType);
- }
- if ((ace->Header.AceFlags & SUB_CONTAINERS_AND_OBJECTS_INHERIT)
- && pc.isdir ())
- {
- if (type == USER_OBJ)
- type = USER;
- else if (type == GROUP_OBJ)
- type = GROUP;
- type |= ACL_DEFAULT;
- types_def |= type;
- if ((pos = searchace (lacl, MAX_ACL_ENTRIES, type, id)) >= 0)
- getace (lacl[pos], type, id, ace->Mask, ace->Header.AceType);
- }
- }
- /* Include DEF_CLASS_OBJ if any default ace exists */
- if ((types_def & (USER|GROUP))
- && ((pos = searchace (lacl, MAX_ACL_ENTRIES, DEF_CLASS_OBJ)) >= 0))
- {
- lacl[pos].a_type = DEF_CLASS_OBJ;
- lacl[pos].a_id = ILLEGAL_GID;
- lacl[pos].a_perm = S_IRWXU | S_IRWXG | S_IRWXO;
- }
- }
- if ((pos = searchace (lacl, MAX_ACL_ENTRIES, 0)) < 0)
- pos = MAX_ACL_ENTRIES;
- if (aclbufp) {
- if (owner_sid == group_sid)
- lacl[0].a_perm = lacl[1].a_perm;
- if (pos > nentries)
- {
- set_errno (ENOSPC);
- return -1;
- }
- memcpy (aclbufp, lacl, pos * sizeof (__aclent32_t));
- for (i = 0; i < pos; ++i)
- aclbufp[i].a_perm &= ~(DENY_R | DENY_W | DENY_X);
- aclsort32 (pos, 0, aclbufp);
- }
- syscall_printf ("%d = getacl (%S)", pos, pc.get_nt_native_path ());
- return pos;
-}
-
-static int
-acl_worker (const char *path, int cmd, int nentries, __aclent32_t *aclbufp,
- unsigned fmode)
-{
- int res = -1;
- fhandler_base *fh = build_fh_name (path, NULL, fmode, stat_suffixes);
- if (fh->error ())
- {
- debug_printf ("got %d error from build_fh_name", fh->error ());
- set_errno (fh->error ());
- }
- else if (!fh->exists ())
- set_errno (ENOENT);
- else
- res = fh->facl (cmd, nentries, aclbufp);
-
- delete fh;
- syscall_printf ("%d = acl (%s)", res, path);
- return res;
-}
-
-extern "C" int
-acl32 (const char *path, int cmd, int nentries, __aclent32_t *aclbufp)
-{
- return acl_worker (path, cmd, nentries, aclbufp, PC_SYM_FOLLOW);
-}
-
-extern "C" int
-lacl32 (const char *path, int cmd, int nentries, __aclent32_t *aclbufp)
-{
- return acl_worker (path, cmd, nentries, aclbufp, PC_SYM_NOFOLLOW);
-}
-
-extern "C" int
-facl32 (int fd, int cmd, int nentries, __aclent32_t *aclbufp)
-{
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- {
- syscall_printf ("-1 = facl (%d)", fd);
- return -1;
- }
- int res = cfd->facl (cmd, nentries, aclbufp);
- syscall_printf ("%d = facl (%s) )", res, cfd->get_name ());
- return res;
-}
-
-extern "C" int
-aclcheck32 (__aclent32_t *aclbufp, int nentries, int *which)
-{
- bool has_user_obj = false;
- bool has_group_obj = false;
- bool has_other_obj = false;
- bool has_class_obj = false;
- bool has_ug_objs = false;
- bool has_def_user_obj = false;
- bool has_def_group_obj = false;
- bool has_def_other_obj = false;
- bool has_def_class_obj = false;
- bool has_def_ug_objs = false;
- int pos2;
-
- for (int pos = 0; pos < nentries; ++pos)
- switch (aclbufp[pos].a_type)
- {
- case USER_OBJ:
- if (has_user_obj)
- {
- if (which)
- *which = pos;
- return USER_ERROR;
- }
- has_user_obj = true;
- break;
- case GROUP_OBJ:
- if (has_group_obj)
- {
- if (which)
- *which = pos;
- return GRP_ERROR;
- }
- has_group_obj = true;
- break;
- case OTHER_OBJ:
- if (has_other_obj)
- {
- if (which)
- *which = pos;
- return OTHER_ERROR;
- }
- has_other_obj = true;
- break;
- case CLASS_OBJ:
- if (has_class_obj)
- {
- if (which)
- *which = pos;
- return CLASS_ERROR;
- }
- has_class_obj = true;
- break;
- case USER:
- case GROUP:
- if ((pos2 = searchace (aclbufp + pos + 1, nentries - pos - 1,
- aclbufp[pos].a_type, aclbufp[pos].a_id)) >= 0)
- {
- if (which)
- *which = pos2;
- return DUPLICATE_ERROR;
- }
- has_ug_objs = true;
- break;
- case DEF_USER_OBJ:
- if (has_def_user_obj)
- {
- if (which)
- *which = pos;
- return USER_ERROR;
- }
- has_def_user_obj = true;
- break;
- case DEF_GROUP_OBJ:
- if (has_def_group_obj)
- {
- if (which)
- *which = pos;
- return GRP_ERROR;
- }
- has_def_group_obj = true;
- break;
- case DEF_OTHER_OBJ:
- if (has_def_other_obj)
- {
- if (which)
- *which = pos;
- return OTHER_ERROR;
- }
- has_def_other_obj = true;
- break;
- case DEF_CLASS_OBJ:
- if (has_def_class_obj)
- {
- if (which)
- *which = pos;
- return CLASS_ERROR;
- }
- has_def_class_obj = true;
- break;
- case DEF_USER:
- case DEF_GROUP:
- if ((pos2 = searchace (aclbufp + pos + 1, nentries - pos - 1,
- aclbufp[pos].a_type, aclbufp[pos].a_id)) >= 0)
- {
- if (which)
- *which = pos2;
- return DUPLICATE_ERROR;
- }
- has_def_ug_objs = true;
- break;
- default:
- return ENTRY_ERROR;
- }
- if (!has_user_obj
- || !has_group_obj
- || !has_other_obj
-#if 0
- /* These checks are not ok yet since CLASS_OBJ isn't fully implemented. */
- || (has_ug_objs && !has_class_obj)
- || (has_def_ug_objs && !has_def_class_obj)
-#endif
- )
- {
- if (which)
- *which = -1;
- return MISS_ERROR;
- }
- return 0;
-}
-
-static int
-acecmp (const void *a1, const void *a2)
-{
-#define ace(i) ((const __aclent32_t *) a##i)
- int ret = ace (1)->a_type - ace (2)->a_type;
- if (!ret)
- ret = ace (1)->a_id - ace (2)->a_id;
- return ret;
-#undef ace
-}
-
-extern "C" int
-aclsort32 (int nentries, int, __aclent32_t *aclbufp)
-{
- if (aclcheck32 (aclbufp, nentries, NULL))
- return -1;
- if (!aclbufp || nentries < 1)
- {
- set_errno (EINVAL);
- return -1;
- }
- qsort ((void *) aclbufp, nentries, sizeof (__aclent32_t), acecmp);
- return 0;
-}
-
-extern "C" int
-acltomode32 (__aclent32_t *aclbufp, int nentries, mode_t *modep)
-{
- int pos;
-
- if (!aclbufp || nentries < 1 || !modep)
- {
- set_errno (EINVAL);
- return -1;
- }
- *modep = 0;
- if ((pos = searchace (aclbufp, nentries, USER_OBJ)) < 0
- || !aclbufp[pos].a_type)
- {
- set_errno (EINVAL);
- return -1;
- }
- *modep |= (aclbufp[pos].a_perm & S_IRWXO) << 6;
- if ((pos = searchace (aclbufp, nentries, GROUP_OBJ)) < 0
- || !aclbufp[pos].a_type)
- {
- set_errno (EINVAL);
- return -1;
- }
- *modep |= (aclbufp[pos].a_perm & S_IRWXO) << 3;
- int cpos;
- if ((cpos = searchace (aclbufp, nentries, CLASS_OBJ)) >= 0
- && aclbufp[cpos].a_type == CLASS_OBJ)
- *modep |= ((aclbufp[pos].a_perm & S_IRWXO) & aclbufp[cpos].a_perm) << 3;
- if ((pos = searchace (aclbufp, nentries, OTHER_OBJ)) < 0
- || !aclbufp[pos].a_type)
- {
- set_errno (EINVAL);
- return -1;
- }
- *modep |= aclbufp[pos].a_perm & S_IRWXO;
- return 0;
-}
-
-extern "C" int
-aclfrommode32 (__aclent32_t *aclbufp, int nentries, mode_t *modep)
-{
- int pos;
-
- if (!aclbufp || nentries < 1 || !modep)
- {
- set_errno (EINVAL);
- return -1;
- }
- if ((pos = searchace (aclbufp, nentries, USER_OBJ)) < 0
- || !aclbufp[pos].a_type)
- {
- set_errno (EINVAL);
- return -1;
- }
- aclbufp[pos].a_perm = (*modep & S_IRWXU) >> 6;
- if ((pos = searchace (aclbufp, nentries, GROUP_OBJ)) < 0
- || !aclbufp[pos].a_type)
- {
- set_errno (EINVAL);
- return -1;
- }
- aclbufp[pos].a_perm = (*modep & S_IRWXG) >> 3;
- if ((pos = searchace (aclbufp, nentries, CLASS_OBJ)) >= 0
- && aclbufp[pos].a_type == CLASS_OBJ)
- aclbufp[pos].a_perm = (*modep & S_IRWXG) >> 3;
- if ((pos = searchace (aclbufp, nentries, OTHER_OBJ)) < 0
- || !aclbufp[pos].a_type)
- {
- set_errno (EINVAL);
- return -1;
- }
- aclbufp[pos].a_perm = (*modep & S_IRWXO);
- return 0;
-}
-
-extern "C" int
-acltopbits32 (__aclent32_t *aclbufp, int nentries, mode_t *pbitsp)
-{
- return acltomode32 (aclbufp, nentries, pbitsp);
-}
-
-extern "C" int
-aclfrompbits32 (__aclent32_t *aclbufp, int nentries, mode_t *pbitsp)
-{
- return aclfrommode32 (aclbufp, nentries, pbitsp);
-}
-
-static char *
-permtostr (mode_t perm)
-{
- static char pbuf[4];
-
- pbuf[0] = (perm & S_IROTH) ? 'r' : '-';
- pbuf[1] = (perm & S_IWOTH) ? 'w' : '-';
- pbuf[2] = (perm & S_IXOTH) ? 'x' : '-';
- pbuf[3] = '\0';
- return pbuf;
-}
-
-extern "C" char *
-acltotext32 (__aclent32_t *aclbufp, int aclcnt)
-{
- if (!aclbufp || aclcnt < 1 || aclcnt > MAX_ACL_ENTRIES
- || aclcheck32 (aclbufp, aclcnt, NULL))
- {
- set_errno (EINVAL);
- return NULL;
- }
- char buf[32000];
- buf[0] = '\0';
- bool first = true;
-
- for (int pos = 0; pos < aclcnt; ++pos)
- {
- if (!first)
- strcat (buf, ",");
- first = false;
- if (aclbufp[pos].a_type & ACL_DEFAULT)
- strcat (buf, "default");
- switch (aclbufp[pos].a_type & ~ACL_DEFAULT)
- {
- case USER_OBJ:
- __small_sprintf (buf + strlen (buf), "user::%s",
- permtostr (aclbufp[pos].a_perm));
- break;
- case USER:
- __small_sprintf (buf + strlen (buf), "user:%d:%s",
- aclbufp[pos].a_id, permtostr (aclbufp[pos].a_perm));
- break;
- case GROUP_OBJ:
- __small_sprintf (buf + strlen (buf), "group::%s",
- permtostr (aclbufp[pos].a_perm));
- break;
- case GROUP:
- __small_sprintf (buf + strlen (buf), "group:%d:%s",
- aclbufp[pos].a_id, permtostr (aclbufp[pos].a_perm));
- break;
- case CLASS_OBJ:
- __small_sprintf (buf + strlen (buf), "mask::%s",
- permtostr (aclbufp[pos].a_perm));
- break;
- case OTHER_OBJ:
- __small_sprintf (buf + strlen (buf), "other::%s",
- permtostr (aclbufp[pos].a_perm));
- break;
- default:
- set_errno (EINVAL);
- return NULL;
- }
- }
- return strdup (buf);
-}
-
-static mode_t
-permfromstr (char *perm)
-{
- mode_t mode = 0;
-
- if (strlen (perm) != 3)
- return 01000;
- if (perm[0] == 'r')
- mode |= S_IROTH;
- else if (perm[0] != '-')
- return 01000;
- if (perm[1] == 'w')
- mode |= S_IWOTH;
- else if (perm[1] != '-')
- return 01000;
- if (perm[2] == 'x')
- mode |= S_IXOTH;
- else if (perm[2] != '-')
- return 01000;
- return mode;
-}
-
-extern "C" __aclent32_t *
-aclfromtext32 (char *acltextp, int *)
-{
- if (!acltextp)
- {
- set_errno (EINVAL);
- return NULL;
- }
- char buf[strlen (acltextp) + 1];
- __aclent32_t lacl[MAX_ACL_ENTRIES];
- memset (lacl, 0, sizeof lacl);
- int pos = 0;
- strcpy (buf, acltextp);
- char *lasts;
- for (char *c = strtok_r (buf, ",", &lasts);
- c;
- c = strtok_r (NULL, ",", &lasts))
- {
- if (!strncmp (c, "default", 7))
- {
- lacl[pos].a_type |= ACL_DEFAULT;
- c += 7;
- }
- if (!strncmp (c, "user:", 5))
- {
- if (c[5] == ':')
- lacl[pos].a_type |= USER_OBJ;
- else
- {
- lacl[pos].a_type |= USER;
- c += 5;
- if (isalpha (*c))
- {
- struct passwd *pw = internal_getpwnam (c);
- if (!pw)
- {
- set_errno (EINVAL);
- return NULL;
- }
- lacl[pos].a_id = pw->pw_uid;
- c = strechr (c, ':');
- }
- else if (isdigit (*c))
- lacl[pos].a_id = strtol (c, &c, 10);
- if (*c != ':')
- {
- set_errno (EINVAL);
- return NULL;
- }
- }
- }
- else if (!strncmp (c, "group:", 6))
- {
- if (c[5] == ':')
- lacl[pos].a_type |= GROUP_OBJ;
- else
- {
- lacl[pos].a_type |= GROUP;
- c += 5;
- if (isalpha (*c))
- {
- struct __group32 *gr = internal_getgrnam (c);
- if (!gr)
- {
- set_errno (EINVAL);
- return NULL;
- }
- lacl[pos].a_id = gr->gr_gid;
- c = strechr (c, ':');
- }
- else if (isdigit (*c))
- lacl[pos].a_id = strtol (c, &c, 10);
- if (*c != ':')
- {
- set_errno (EINVAL);
- return NULL;
- }
- }
- }
- else if (!strncmp (c, "mask:", 5))
- {
- if (c[5] == ':')
- lacl[pos].a_type |= CLASS_OBJ;
- else
- {
- set_errno (EINVAL);
- return NULL;
- }
- }
- else if (!strncmp (c, "other:", 6))
- {
- if (c[5] == ':')
- lacl[pos].a_type |= OTHER_OBJ;
- else
- {
- set_errno (EINVAL);
- return NULL;
- }
- }
- if ((lacl[pos].a_perm = permfromstr (c)) == 01000)
- {
- set_errno (EINVAL);
- return NULL;
- }
- ++pos;
- }
- __aclent32_t *aclp = (__aclent32_t *) malloc (pos * sizeof (__aclent32_t));
- if (aclp)
- memcpy (aclp, lacl, pos * sizeof (__aclent32_t));
- return aclp;
-}
-
-/* __aclent16_t and __aclent32_t have same size and same member offsets */
-static __aclent32_t *
-acl16to32 (__aclent16_t *aclbufp, int nentries)
-{
- __aclent32_t *aclbufp32 = (__aclent32_t *) aclbufp;
- if (aclbufp32)
- for (int i = 0; i < nentries; i++)
- aclbufp32[i].a_id &= USHRT_MAX;
- return aclbufp32;
-}
-
-extern "C" int
-acl (const char *path, int cmd, int nentries, __aclent16_t *aclbufp)
-{
- return acl32 (path, cmd, nentries, acl16to32 (aclbufp, nentries));
-}
-
-extern "C" int
-facl (int fd, int cmd, int nentries, __aclent16_t *aclbufp)
-{
- return facl32 (fd, cmd, nentries, acl16to32 (aclbufp, nentries));
-}
-
-extern "C" int
-lacl (const char *path, int cmd, int nentries, __aclent16_t *aclbufp)
-{
- return lacl32 (path, cmd, nentries, acl16to32 (aclbufp, nentries));
-}
-
-extern "C" int
-aclcheck (__aclent16_t *aclbufp, int nentries, int *which)
-{
- return aclcheck32 (acl16to32 (aclbufp, nentries), nentries, which);
-}
-
-extern "C" int
-aclsort (int nentries, int i, __aclent16_t *aclbufp)
-{
- return aclsort32 (nentries, i, acl16to32 (aclbufp, nentries));
-}
-
-
-extern "C" int
-acltomode (__aclent16_t *aclbufp, int nentries, mode_t *modep)
-{
- return acltomode32 (acl16to32 (aclbufp, nentries), nentries, modep);
-}
-
-extern "C" int
-aclfrommode (__aclent16_t *aclbufp, int nentries, mode_t *modep)
-{
- return aclfrommode32 ((__aclent32_t *)aclbufp, nentries, modep);
-}
-
-extern "C" int
-acltopbits (__aclent16_t *aclbufp, int nentries, mode_t *pbitsp)
-{
- return acltopbits32 (acl16to32 (aclbufp, nentries), nentries, pbitsp);
-}
-
-extern "C" int
-aclfrompbits (__aclent16_t *aclbufp, int nentries, mode_t *pbitsp)
-{
- return aclfrompbits32 ((__aclent32_t *)aclbufp, nentries, pbitsp);
-}
-
-extern "C" char *
-acltotext (__aclent16_t *aclbufp, int aclcnt)
-{
- return acltotext32 (acl16to32 (aclbufp, aclcnt), aclcnt);
-}
-
-extern "C" __aclent16_t *
-aclfromtext (char *acltextp, int * aclcnt)
-{
- return (__aclent16_t *) aclfromtext32 (acltextp, aclcnt);
-}
diff --git a/winsup/cygwin/sec_auth.cc b/winsup/cygwin/sec_auth.cc
deleted file mode 100644
index 0e2dde6..0000000
--- a/winsup/cygwin/sec_auth.cc
+++ /dev/null
@@ -1,1253 +0,0 @@
-/* sec_auth.cc: NT authentication functions
-
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include <wchar.h>
-#include <wininet.h>
-#include <ntsecapi.h>
-#include <dsgetdc.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "ntdll.h"
-#include "tls_pbuf.h"
-#include <lm.h>
-#include <iptypes.h>
-#include "pwdgrp.h"
-#include "cyglsa.h"
-#include "cygserver_setpwd.h"
-#include <cygwin/version.h>
-
-extern "C" void
-cygwin_set_impersonation_token (const HANDLE hToken)
-{
- debug_printf ("set_impersonation_token (%d)", hToken);
- cygheap->user.external_token = hToken == INVALID_HANDLE_VALUE ? NO_IMPERSONATION : hToken;
-}
-
-void
-extract_nt_dom_user (const struct passwd *pw, PWCHAR domain, PWCHAR user)
-{
-
- cygsid psid;
- DWORD ulen = UNLEN + 1;
- DWORD dlen = MAX_DOMAIN_NAME_LEN + 1;
- SID_NAME_USE use;
-
- debug_printf ("pw_gecos %x (%s)", pw->pw_gecos, pw->pw_gecos);
-
- if (psid.getfrompw (pw)
- && LookupAccountSidW (NULL, psid, user, &ulen, domain, &dlen, &use))
- return;
-
- char *d, *u, *c;
- domain[0] = L'\0';
- sys_mbstowcs (user, UNLEN + 1, pw->pw_name);
- if ((d = strstr (pw->pw_gecos, "U-")) != NULL &&
- (d == pw->pw_gecos || d[-1] == ','))
- {
- c = strechr (d + 2, ',');
- if ((u = strechr (d + 2, '\\')) >= c)
- u = d + 1;
- else if (u - d <= MAX_DOMAIN_NAME_LEN + 2)
- sys_mbstowcs (domain, MAX_DOMAIN_NAME_LEN + 1, d + 2, u - d - 1);
- if (c - u <= UNLEN + 1)
- sys_mbstowcs (user, UNLEN + 1, u + 1, c - u);
- }
-}
-
-extern "C" HANDLE
-cygwin_logon_user (const struct passwd *pw, const char *password)
-{
- if (!pw || !password)
- {
- set_errno (EINVAL);
- return INVALID_HANDLE_VALUE;
- }
-
- WCHAR nt_domain[MAX_DOMAIN_NAME_LEN + 1];
- WCHAR nt_user[UNLEN + 1];
- PWCHAR passwd;
- HANDLE hToken;
- tmp_pathbuf tp;
-
- extract_nt_dom_user (pw, nt_domain, nt_user);
- debug_printf ("LogonUserW (%W, %W, ...)", nt_user, nt_domain);
- sys_mbstowcs (passwd = tp.w_get (), NT_MAX_PATH, password);
- /* CV 2005-06-08: LogonUser should run under the primary process token,
- otherwise it returns with ERROR_ACCESS_DENIED. */
- cygheap->user.deimpersonate ();
- if (!LogonUserW (nt_user, *nt_domain ? nt_domain : NULL, passwd,
- LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT,
- &hToken))
- {
- __seterrno ();
- hToken = INVALID_HANDLE_VALUE;
- }
- else if (!SetHandleInformation (hToken,
- HANDLE_FLAG_INHERIT,
- HANDLE_FLAG_INHERIT))
- {
- __seterrno ();
- CloseHandle (hToken);
- hToken = INVALID_HANDLE_VALUE;
- }
- cygheap->user.reimpersonate ();
- debug_printf ("%d = logon_user(%s,...)", hToken, pw->pw_name);
- return hToken;
-}
-
-static void
-str2lsa (LSA_STRING &tgt, const char *srcstr)
-{
- tgt.Length = strlen (srcstr);
- tgt.MaximumLength = tgt.Length + 1;
- tgt.Buffer = (PCHAR) srcstr;
-}
-
-static void
-str2buf2lsa (LSA_STRING &tgt, char *buf, const char *srcstr)
-{
- tgt.Length = strlen (srcstr);
- tgt.MaximumLength = tgt.Length + 1;
- tgt.Buffer = (PCHAR) buf;
- memcpy (buf, srcstr, tgt.MaximumLength);
-}
-
-/* The dimension of buf is assumed to be at least strlen(srcstr) + 1,
- The result will be shorter if the input has multibyte chars */
-void
-str2buf2uni (UNICODE_STRING &tgt, WCHAR *buf, const char *srcstr)
-{
- tgt.Buffer = (PWCHAR) buf;
- tgt.MaximumLength = (strlen (srcstr) + 1) * sizeof (WCHAR);
- tgt.Length = sys_mbstowcs (buf, tgt.MaximumLength / sizeof (WCHAR), srcstr)
- * sizeof (WCHAR);
- if (tgt.Length)
- tgt.Length -= sizeof (WCHAR);
-}
-
-void
-str2uni_cat (UNICODE_STRING &tgt, const char *srcstr)
-{
- int len = sys_mbstowcs (tgt.Buffer + tgt.Length / sizeof (WCHAR),
- (tgt.MaximumLength - tgt.Length) / sizeof (WCHAR),
- srcstr);
- if (len)
- tgt.Length += (len - 1) * sizeof (WCHAR);
- else
- tgt.Length = tgt.MaximumLength = 0;
-}
-
-HANDLE
-open_local_policy (ACCESS_MASK access)
-{
- LSA_OBJECT_ATTRIBUTES oa = { 0, 0, 0, 0, 0, 0 };
- HANDLE lsa = INVALID_HANDLE_VALUE;
-
- NTSTATUS ret = LsaOpenPolicy (NULL, &oa, access, &lsa);
- if (ret != STATUS_SUCCESS)
- {
- __seterrno_from_win_error (LsaNtStatusToWinError (ret));
- /* Some versions of Windows set the lsa handle to NULL when
- LsaOpenPolicy fails. */
- lsa = INVALID_HANDLE_VALUE;
- }
- return lsa;
-}
-
-static void
-close_local_policy (LSA_HANDLE &lsa)
-{
- if (lsa != INVALID_HANDLE_VALUE)
- LsaClose (lsa);
- lsa = INVALID_HANDLE_VALUE;
-}
-
-bool
-get_logon_server (PWCHAR domain, WCHAR *server, bool rediscovery)
-{
- DWORD dret;
- PDOMAIN_CONTROLLER_INFOW pci;
- WCHAR *buf;
- DWORD size = MAX_COMPUTERNAME_LENGTH + 1;
-
- /* Empty domain is interpreted as local system */
- if ((GetComputerNameW (server + 2, &size)) &&
- (!wcscasecmp (domain, server + 2) || !domain[0]))
- {
- server[0] = server[1] = L'\\';
- return true;
- }
-
- /* Try to get any available domain controller for this domain */
- dret = DsGetDcNameW (NULL, domain, NULL, NULL,
- rediscovery ? DS_FORCE_REDISCOVERY : 0, &pci);
- if (dret == ERROR_SUCCESS)
- {
- wcscpy (server, pci->DomainControllerName);
- NetApiBufferFree (pci);
- debug_printf ("DC: rediscovery: %d, server: %W", rediscovery, server);
- return true;
- }
- else if (dret == ERROR_PROC_NOT_FOUND)
- {
- /* NT4 w/o DSClient */
- if (rediscovery)
- dret = NetGetAnyDCName (NULL, domain, (LPBYTE *) &buf);
- else
- dret = NetGetDCName (NULL, domain, (LPBYTE *) &buf);
- if (dret == NERR_Success)
- {
- wcscpy (server, buf);
- NetApiBufferFree (buf);
- debug_printf ("NT: rediscovery: %d, server: %W", rediscovery, server);
- return true;
- }
- }
- __seterrno_from_win_error (dret);
- return false;
-}
-
-static bool
-get_user_groups (WCHAR *logonserver, cygsidlist &grp_list,
- PWCHAR user, PWCHAR domain)
-{
- WCHAR dgroup[MAX_DOMAIN_NAME_LEN + GNLEN + 2];
- LPGROUP_USERS_INFO_0 buf;
- DWORD cnt, tot, len;
- NET_API_STATUS ret;
-
- /* Look only on logonserver */
- ret = NetUserGetGroups (logonserver, user, 0, (LPBYTE *) &buf,
- MAX_PREFERRED_LENGTH, &cnt, &tot);
- if (ret)
- {
- __seterrno_from_win_error (ret);
- /* It's no error when the user name can't be found. */
- return ret == NERR_UserNotFound;
- }
-
- len = wcslen (domain);
- wcscpy (dgroup, domain);
- dgroup[len++] = L'\\';
-
- for (DWORD i = 0; i < cnt; ++i)
- {
- cygsid gsid;
- DWORD glen = MAX_SID_LEN;
- WCHAR dom[MAX_DOMAIN_NAME_LEN + 1];
- DWORD dlen = sizeof (dom);
- SID_NAME_USE use = SidTypeInvalid;
-
- wcscpy (dgroup + len, buf[i].grui0_name);
- if (!LookupAccountNameW (NULL, dgroup, gsid, &glen, dom, &dlen, &use))
- debug_printf ("LookupAccountName(%W), %E", dgroup);
- else if (legal_sid_type (use))
- grp_list += gsid;
- else
- debug_printf ("Global group %W invalid. Use: %d", dgroup, use);
- }
-
- NetApiBufferFree (buf);
- return true;
-}
-
-static bool
-is_group_member (PWCHAR logonserver, PWCHAR group, PSID pusersid,
- cygsidlist &grp_list)
-{
- LPLOCALGROUP_MEMBERS_INFO_1 buf;
- DWORD cnt, tot;
- NET_API_STATUS ret;
-
- /* Members can be users or global groups */
- ret = NetLocalGroupGetMembers (logonserver, group, 1, (LPBYTE *) &buf,
- MAX_PREFERRED_LENGTH, &cnt, &tot, NULL);
- if (ret)
- return false;
-
- bool retval = true;
- for (DWORD bidx = 0; bidx < cnt; ++bidx)
- if (EqualSid (pusersid, buf[bidx].lgrmi1_sid))
- goto done;
- else
- {
- /* The extra test for the group being a global group or a well-known
- group is necessary, since apparently also aliases (for instance
- Administrators or Users) can be members of local groups, even
- though MSDN states otherwise. The GUI refuses to put aliases into
- local groups, but the CLI interface allows it. However, a normal
- logon token does not contain groups, in which the user is only
- indirectly a member by being a member of an alias in this group.
- So we also should not put them into the token group list.
- Note: Allowing those groups in our group list renders external
- tokens invalid, so that it becomes impossible to logon with
- password and valid logon token. */
- for (int glidx = 0; glidx < grp_list.count (); ++glidx)
- if ((buf[bidx].lgrmi1_sidusage == SidTypeGroup
- || buf[bidx].lgrmi1_sidusage == SidTypeWellKnownGroup)
- && EqualSid (grp_list.sids[glidx], buf[bidx].lgrmi1_sid))
- goto done;
- }
-
- retval = false;
- done:
- NetApiBufferFree (buf);
- return retval;
-}
-
-static bool
-get_user_local_groups (PWCHAR logonserver, PWCHAR domain,
- cygsidlist &grp_list, PSID pusersid)
-{
- LPLOCALGROUP_INFO_0 buf;
- DWORD cnt, tot;
- NET_API_STATUS ret;
-
- ret = NetLocalGroupEnum (logonserver, 0, (LPBYTE *) &buf,
- MAX_PREFERRED_LENGTH, &cnt, &tot, NULL);
- if (ret)
- {
- __seterrno_from_win_error (ret);
- return false;
- }
-
- WCHAR domlocal_grp[MAX_DOMAIN_NAME_LEN + GNLEN + 2];
- WCHAR builtin_grp[sizeof ("BUILTIN\\") + GNLEN + 2];
- PWCHAR dg_ptr, bg_ptr;
- SID_NAME_USE use;
-
- dg_ptr = wcpcpy (domlocal_grp, domain);
- *dg_ptr++ = L'\\';
- bg_ptr = wcpcpy (builtin_grp, L"BUILTIN\\");
-
- for (DWORD i = 0; i < cnt; ++i)
- if (is_group_member (logonserver, buf[i].lgrpi0_name, pusersid, grp_list))
- {
- cygsid gsid;
- DWORD glen = MAX_SID_LEN;
- WCHAR dom[MAX_DOMAIN_NAME_LEN + 1];
- DWORD domlen = sizeof (dom);
- bool builtin = false;
-
- use = SidTypeInvalid;
- wcscpy (dg_ptr, buf[i].lgrpi0_name);
- if (!LookupAccountNameW (NULL, domlocal_grp, gsid, &glen,
- dom, &domlen, &use))
- {
- if (GetLastError () != ERROR_NONE_MAPPED)
- debug_printf ("LookupAccountName(%W), %E", domlocal_grp);
- wcscpy (bg_ptr, dg_ptr);
- if (!LookupAccountNameW (NULL, builtin_grp, gsid, &glen,
- dom, &domlen, &use))
- debug_printf ("LookupAccountName(%W), %E", builtin_grp);
- builtin = true;
- }
- if (!legal_sid_type (use))
- debug_printf ("Rejecting local %W. use: %d", dg_ptr, use);
- else if (builtin)
- grp_list *= gsid;
- else
- grp_list += gsid;
- }
- NetApiBufferFree (buf);
- return true;
-}
-
-static bool
-sid_in_token_groups (PTOKEN_GROUPS grps, cygpsid sid)
-{
- if (!grps)
- return false;
- for (DWORD i = 0; i < grps->GroupCount; ++i)
- if (sid == grps->Groups[i].Sid)
- return true;
- return false;
-}
-
-static void
-get_unix_group_sidlist (struct passwd *pw, cygsidlist &grp_list)
-{
- struct __group32 *gr;
- cygsid gsid;
-
- for (int gidx = 0; (gr = internal_getgrent (gidx)); ++gidx)
- {
- if (gr->gr_gid == (__gid32_t) pw->pw_gid)
- goto found;
- else if (gr->gr_mem)
- for (int gi = 0; gr->gr_mem[gi]; ++gi)
- if (strcasematch (pw->pw_name, gr->gr_mem[gi]))
- goto found;
- continue;
- found:
- if (gsid.getfromgr (gr))
- grp_list += gsid;
-
- }
-}
-
-static void
-get_token_group_sidlist (cygsidlist &grp_list, PTOKEN_GROUPS my_grps,
- LUID auth_luid, int &auth_pos)
-{
- auth_pos = -1;
- if (my_grps)
- {
- grp_list += well_known_local_sid;
- if (sid_in_token_groups (my_grps, well_known_dialup_sid))
- grp_list *= well_known_dialup_sid;
- if (sid_in_token_groups (my_grps, well_known_network_sid))
- grp_list *= well_known_network_sid;
- if (sid_in_token_groups (my_grps, well_known_batch_sid))
- grp_list *= well_known_batch_sid;
- grp_list *= well_known_interactive_sid;
- if (sid_in_token_groups (my_grps, well_known_service_sid))
- grp_list *= well_known_service_sid;
- if (sid_in_token_groups (my_grps, well_known_this_org_sid))
- grp_list *= well_known_this_org_sid;
- }
- else
- {
- grp_list += well_known_local_sid;
- grp_list *= well_known_interactive_sid;
- }
- if (get_ll (auth_luid) != 999LL) /* != SYSTEM_LUID */
- {
- for (DWORD i = 0; i < my_grps->GroupCount; ++i)
- if (my_grps->Groups[i].Attributes & SE_GROUP_LOGON_ID)
- {
- grp_list += my_grps->Groups[i].Sid;
- auth_pos = grp_list.count () - 1;
- break;
- }
- }
-}
-
-bool
-get_server_groups (cygsidlist &grp_list, PSID usersid, struct passwd *pw)
-{
- WCHAR user[UNLEN + 1];
- WCHAR domain[MAX_DOMAIN_NAME_LEN + 1];
- WCHAR server[INTERNET_MAX_HOST_NAME_LENGTH + 3];
- DWORD ulen = UNLEN + 1;
- DWORD dlen = MAX_DOMAIN_NAME_LEN + 1;
- SID_NAME_USE use;
-
- if (well_known_system_sid == usersid)
- {
- grp_list *= well_known_admins_sid;
- get_unix_group_sidlist (pw, grp_list);
- return true;
- }
-
- grp_list *= well_known_world_sid;
- grp_list *= well_known_authenticated_users_sid;
-
- if (!LookupAccountSidW (NULL, usersid, user, &ulen, domain, &dlen, &use))
- {
- __seterrno ();
- return false;
- }
- if (get_logon_server (domain, server, false)
- && !get_user_groups (server, grp_list, user, domain)
- && get_logon_server (domain, server, true))
- get_user_groups (server, grp_list, user, domain);
- if (get_user_local_groups (server, domain, grp_list, usersid))
- {
- get_unix_group_sidlist (pw, grp_list);
- return true;
- }
- return false;
-}
-
-static bool
-get_initgroups_sidlist (cygsidlist &grp_list,
- PSID usersid, PSID pgrpsid, struct passwd *pw,
- PTOKEN_GROUPS my_grps, LUID auth_luid, int &auth_pos)
-{
- grp_list *= well_known_world_sid;
- grp_list *= well_known_authenticated_users_sid;
- if (well_known_system_sid == usersid)
- auth_pos = -1;
- else
- get_token_group_sidlist (grp_list, my_grps, auth_luid, auth_pos);
- if (!get_server_groups (grp_list, usersid, pw))
- return false;
-
- /* special_pgrp true if pgrpsid is not in normal groups */
- grp_list += pgrpsid;
- return true;
-}
-
-static void
-get_setgroups_sidlist (cygsidlist &tmp_list, PSID usersid, struct passwd *pw,
- PTOKEN_GROUPS my_grps, user_groups &groups,
- LUID auth_luid, int &auth_pos)
-{
- tmp_list *= well_known_world_sid;
- tmp_list *= well_known_authenticated_users_sid;
- get_token_group_sidlist (tmp_list, my_grps, auth_luid, auth_pos);
- get_server_groups (tmp_list, usersid, pw);
- for (int gidx = 0; gidx < groups.sgsids.count (); gidx++)
- tmp_list += groups.sgsids.sids[gidx];
- tmp_list += groups.pgsid;
-}
-
-static ULONG sys_privs[] = {
- SE_CREATE_TOKEN_PRIVILEGE,
- SE_ASSIGNPRIMARYTOKEN_PRIVILEGE,
- SE_LOCK_MEMORY_PRIVILEGE,
- SE_INCREASE_QUOTA_PRIVILEGE,
- SE_TCB_PRIVILEGE,
- SE_SECURITY_PRIVILEGE,
- SE_TAKE_OWNERSHIP_PRIVILEGE,
- SE_LOAD_DRIVER_PRIVILEGE,
- SE_SYSTEM_PROFILE_PRIVILEGE, /* Vista ONLY */
- SE_SYSTEMTIME_PRIVILEGE,
- SE_PROF_SINGLE_PROCESS_PRIVILEGE,
- SE_INC_BASE_PRIORITY_PRIVILEGE,
- SE_CREATE_PAGEFILE_PRIVILEGE,
- SE_CREATE_PERMANENT_PRIVILEGE,
- SE_BACKUP_PRIVILEGE,
- SE_RESTORE_PRIVILEGE,
- SE_SHUTDOWN_PRIVILEGE,
- SE_DEBUG_PRIVILEGE,
- SE_AUDIT_PRIVILEGE,
- SE_SYSTEM_ENVIRONMENT_PRIVILEGE,
- SE_CHANGE_NOTIFY_PRIVILEGE,
- SE_UNDOCK_PRIVILEGE,
- SE_MANAGE_VOLUME_PRIVILEGE,
- SE_IMPERSONATE_PRIVILEGE,
- SE_CREATE_GLOBAL_PRIVILEGE,
- SE_INCREASE_WORKING_SET_PRIVILEGE,
- SE_TIME_ZONE_PRIVILEGE,
- SE_CREATE_SYMBOLIC_LINK_PRIVILEGE
-};
-
-#define SYSTEM_PRIVILEGES_COUNT (sizeof sys_privs / sizeof *sys_privs)
-
-static PTOKEN_PRIVILEGES
-get_system_priv_list (size_t &size)
-{
- ULONG max_idx = 0;
- while (max_idx < SYSTEM_PRIVILEGES_COUNT
- && sys_privs[max_idx] != wincap.max_sys_priv ())
- ++max_idx;
- if (max_idx >= SYSTEM_PRIVILEGES_COUNT)
- api_fatal ("Coding error: wincap privilege %u doesn't exist in sys_privs",
- wincap.max_sys_priv ());
- size = sizeof (ULONG) + (max_idx + 1) * sizeof (LUID_AND_ATTRIBUTES);
- PTOKEN_PRIVILEGES privs = (PTOKEN_PRIVILEGES) malloc (size);
- if (!privs)
- {
- debug_printf ("malloc (system_privs) failed.");
- return NULL;
- }
- privs->PrivilegeCount = 0;
- for (ULONG i = 0; i <= max_idx; ++i)
- {
- privs->Privileges[privs->PrivilegeCount].Luid.HighPart = 0L;
- privs->Privileges[privs->PrivilegeCount].Luid.LowPart = sys_privs[i];
- privs->Privileges[privs->PrivilegeCount].Attributes =
- SE_PRIVILEGE_ENABLED | SE_PRIVILEGE_ENABLED_BY_DEFAULT;
- ++privs->PrivilegeCount;
- }
- return privs;
-}
-
-static PTOKEN_PRIVILEGES
-get_priv_list (LSA_HANDLE lsa, cygsid &usersid, cygsidlist &grp_list,
- size_t &size)
-{
- PLSA_UNICODE_STRING privstrs;
- ULONG cnt;
- PTOKEN_PRIVILEGES privs = NULL;
- NTSTATUS ret;
-
- if (usersid == well_known_system_sid)
- return get_system_priv_list (size);
-
- for (int grp = -1; grp < grp_list.count (); ++grp)
- {
- if (grp == -1)
- {
- if ((ret = LsaEnumerateAccountRights (lsa, usersid, &privstrs,
- &cnt)) != STATUS_SUCCESS)
- continue;
- }
- else if ((ret = LsaEnumerateAccountRights (lsa, grp_list.sids[grp],
- &privstrs, &cnt))
- != STATUS_SUCCESS)
- continue;
- for (ULONG i = 0; i < cnt; ++i)
- {
- LUID priv;
- PTOKEN_PRIVILEGES tmp;
- DWORD tmp_count;
-
- if (!privilege_luid (privstrs[i].Buffer, &priv))
- continue;
-
- if (privs)
- {
- DWORD pcnt = privs->PrivilegeCount;
- LUID_AND_ATTRIBUTES *p = privs->Privileges;
- for (; pcnt > 0; --pcnt, ++p)
- if (priv.HighPart == p->Luid.HighPart
- && priv.LowPart == p->Luid.LowPart)
- goto next_account_right;
- }
-
- tmp_count = privs ? privs->PrivilegeCount : 0;
- size = sizeof (DWORD)
- + (tmp_count + 1) * sizeof (LUID_AND_ATTRIBUTES);
- tmp = (PTOKEN_PRIVILEGES) realloc (privs, size);
- if (!tmp)
- {
- if (privs)
- free (privs);
- LsaFreeMemory (privstrs);
- debug_printf ("realloc (privs) failed.");
- return NULL;
- }
- tmp->PrivilegeCount = tmp_count;
- privs = tmp;
- privs->Privileges[privs->PrivilegeCount].Luid = priv;
- privs->Privileges[privs->PrivilegeCount].Attributes =
- SE_PRIVILEGE_ENABLED | SE_PRIVILEGE_ENABLED_BY_DEFAULT;
- ++privs->PrivilegeCount;
-
- next_account_right:
- ;
- }
- LsaFreeMemory (privstrs);
- }
- return privs;
-}
-
-/* Accept a token if
- - the requested usersid matches the TokenUser and
- - if setgroups has been called:
- the token groups that are listed in /etc/group match the union of
- the requested primary and supplementary groups in gsids.
- - else the (unknown) implicitly requested supplementary groups and those
- in the token are the groups associated with the usersid. We assume
- they match and verify only the primary groups.
- The requested primary group must appear in the token.
- The primary group in the token is a group associated with the usersid,
- except if the token is internal and the group is in the token SD
- (see create_token). In that latter case that group must match the
- requested primary group. */
-bool
-verify_token (HANDLE token, cygsid &usersid, user_groups &groups, bool *pintern)
-{
- DWORD size;
- bool intern = false;
-
- if (pintern)
- {
- TOKEN_SOURCE ts;
- if (!GetTokenInformation (token, TokenSource,
- &ts, sizeof ts, &size))
- debug_printf ("GetTokenInformation(), %E");
- else
- *pintern = intern = !memcmp (ts.SourceName, "Cygwin.1", 8);
- }
- /* Verify usersid */
- cygsid tok_usersid = NO_SID;
- if (!GetTokenInformation (token, TokenUser,
- &tok_usersid, sizeof tok_usersid, &size))
- debug_printf ("GetTokenInformation(), %E");
- if (usersid != tok_usersid)
- return false;
-
- /* For an internal token, if setgroups was not called and if the sd group
- is not well_known_null_sid, it must match pgrpsid */
- if (intern && !groups.issetgroups ())
- {
- const DWORD sd_buf_siz = MAX_SID_LEN + sizeof (SECURITY_DESCRIPTOR);
- PSECURITY_DESCRIPTOR sd_buf = (PSECURITY_DESCRIPTOR) alloca (sd_buf_siz);
- cygpsid gsid (NO_SID);
- if (!GetKernelObjectSecurity (token, GROUP_SECURITY_INFORMATION,
- sd_buf, sd_buf_siz, &size))
- debug_printf ("GetKernelObjectSecurity(), %E");
- else if (!GetSecurityDescriptorGroup (sd_buf, (PSID *) &gsid,
- (BOOL *) &size))
- debug_printf ("GetSecurityDescriptorGroup(), %E");
- if (well_known_null_sid != gsid)
- return gsid == groups.pgsid;
- }
-
- PTOKEN_GROUPS my_grps;
- bool sawpg = false, ret = false;
-
- if (!GetTokenInformation (token, TokenGroups, NULL, 0, &size) &&
- GetLastError () != ERROR_INSUFFICIENT_BUFFER)
- debug_printf ("GetTokenInformation(token, TokenGroups), %E");
- else if (!(my_grps = (PTOKEN_GROUPS) alloca (size)))
- debug_printf ("alloca (my_grps) failed.");
- else if (!GetTokenInformation (token, TokenGroups, my_grps, size, &size))
- debug_printf ("GetTokenInformation(my_token, TokenGroups), %E");
- else
- {
- if (groups.issetgroups ()) /* setgroups was called */
- {
- cygsid gsid;
- struct __group32 *gr;
- bool saw[groups.sgsids.count ()];
- memset (saw, 0, sizeof(saw));
-
- /* token groups found in /etc/group match the user.gsids ? */
- for (int gidx = 0; (gr = internal_getgrent (gidx)); ++gidx)
- if (gsid.getfromgr (gr) && sid_in_token_groups (my_grps, gsid))
- {
- int pos = groups.sgsids.position (gsid);
- if (pos >= 0)
- saw[pos] = true;
- else if (groups.pgsid == gsid)
- sawpg = true;
-#if 0
- /* With this `else', verify_token returns false if we find
- groups in the token, which are not in the group list set
- with setgroups(). That's rather dangerous. What we're
- really interested in is that all groups in the setgroups()
- list are in the token. A token created through ADVAPI
- should be allowed to contain more groups than requested
- through setgroups(), esecially since Vista and the
- addition of integrity groups. So we disable this statement
- for now. */
- else if (gsid != well_known_world_sid
- && gsid != usersid)
- goto done;
-#endif
- }
- /* user.sgsids groups must be in the token, except for builtin groups.
- These can be different on domain member machines compared to
- domain controllers, so these builtin groups may be validly missing
- from a token created through password or lsaauth logon. */
- for (int gidx = 0; gidx < groups.sgsids.count (); gidx++)
- if (!saw[gidx]
- && !groups.sgsids.sids[gidx].is_well_known_sid ()
- && !sid_in_token_groups (my_grps, groups.sgsids.sids[gidx]))
- goto done;
- }
- /* The primary group must be in the token */
- ret = sawpg
- || sid_in_token_groups (my_grps, groups.pgsid)
- || groups.pgsid == usersid;
- }
-done:
- return ret;
-}
-
-HANDLE
-create_token (cygsid &usersid, user_groups &new_groups, struct passwd *pw)
-{
- NTSTATUS ret;
- LSA_HANDLE lsa = INVALID_HANDLE_VALUE;
-
- cygsidlist tmp_gsids (cygsidlist_auto, 12);
-
- SECURITY_QUALITY_OF_SERVICE sqos =
- { sizeof sqos, SecurityImpersonation, SECURITY_STATIC_TRACKING, FALSE };
- OBJECT_ATTRIBUTES oa = { sizeof oa, 0, 0, 0, 0, &sqos };
- LUID auth_luid = SYSTEM_LUID;
- LARGE_INTEGER exp = { QuadPart:INT64_MAX };
-
- TOKEN_USER user;
- PTOKEN_GROUPS new_tok_gsids = NULL;
- PTOKEN_PRIVILEGES privs = NULL;
- TOKEN_OWNER owner;
- TOKEN_PRIMARY_GROUP pgrp;
- TOKEN_DEFAULT_DACL dacl = {};
- TOKEN_SOURCE source;
- TOKEN_STATISTICS stats;
- memcpy (source.SourceName, "Cygwin.1", 8);
- source.SourceIdentifier.HighPart = 0;
- source.SourceIdentifier.LowPart = 0x0101;
-
- HANDLE token = INVALID_HANDLE_VALUE;
- HANDLE primary_token = INVALID_HANDLE_VALUE;
-
- PTOKEN_GROUPS my_tok_gsids = NULL;
- DWORD size;
- size_t psize = 0;
-
- /* SE_CREATE_TOKEN_NAME privilege needed to call NtCreateToken. */
- push_self_privilege (SE_CREATE_TOKEN_PRIVILEGE, true);
-
- /* Open policy object. */
- if ((lsa = open_local_policy (POLICY_EXECUTE)) == INVALID_HANDLE_VALUE)
- goto out;
-
- /* User, owner, primary group. */
- user.User.Sid = usersid;
- user.User.Attributes = 0;
- owner.Owner = usersid;
-
- /* Retrieve authentication id and group list from own process. */
- if (hProcToken)
- {
- /* Switching user context to SYSTEM doesn't inherit the authentication
- id of the user account running current process. */
- if (usersid == well_known_system_sid)
- /* nothing to do */;
- else if (!GetTokenInformation (hProcToken, TokenStatistics,
- &stats, sizeof stats, &size))
- debug_printf
- ("GetTokenInformation(hProcToken, TokenStatistics), %E");
- else
- auth_luid = stats.AuthenticationId;
-
- /* Retrieving current processes group list to be able to inherit
- some important well known group sids. */
- if (!GetTokenInformation (hProcToken, TokenGroups, NULL, 0, &size)
- && GetLastError () != ERROR_INSUFFICIENT_BUFFER)
- debug_printf ("GetTokenInformation(hProcToken, TokenGroups), %E");
- else if (!(my_tok_gsids = (PTOKEN_GROUPS) malloc (size)))
- debug_printf ("malloc (my_tok_gsids) failed.");
- else if (!GetTokenInformation (hProcToken, TokenGroups, my_tok_gsids,
- size, &size))
- {
- debug_printf ("GetTokenInformation(hProcToken, TokenGroups), %E");
- free (my_tok_gsids);
- my_tok_gsids = NULL;
- }
- }
-
- /* Create list of groups, the user is member in. */
- int auth_pos;
- if (new_groups.issetgroups ())
- get_setgroups_sidlist (tmp_gsids, usersid, pw, my_tok_gsids, new_groups,
- auth_luid, auth_pos);
- else if (!get_initgroups_sidlist (tmp_gsids, usersid, new_groups.pgsid, pw,
- my_tok_gsids, auth_luid, auth_pos))
- goto out;
-
- /* Primary group. */
- pgrp.PrimaryGroup = new_groups.pgsid;
-
- /* Create a TOKEN_GROUPS list from the above retrieved list of sids. */
- new_tok_gsids = (PTOKEN_GROUPS)
- alloca (sizeof (DWORD) + (tmp_gsids.count () + 1)
- * sizeof (SID_AND_ATTRIBUTES));
- new_tok_gsids->GroupCount = tmp_gsids.count ();
- for (DWORD i = 0; i < new_tok_gsids->GroupCount; ++i)
- {
- new_tok_gsids->Groups[i].Sid = tmp_gsids.sids[i];
- new_tok_gsids->Groups[i].Attributes = SE_GROUP_MANDATORY
- | SE_GROUP_ENABLED_BY_DEFAULT
- | SE_GROUP_ENABLED;
- }
- if (auth_pos >= 0)
- new_tok_gsids->Groups[auth_pos].Attributes |= SE_GROUP_LOGON_ID;
-
- /* On systems supporting Mandatory Integrity Control, add a MIC SID. */
- if (wincap.has_mandatory_integrity_control ())
- {
- new_tok_gsids->Groups[new_tok_gsids->GroupCount].Attributes =
- SE_GROUP_INTEGRITY | SE_GROUP_INTEGRITY_ENABLED;
- if (usersid == well_known_system_sid)
- new_tok_gsids->Groups[new_tok_gsids->GroupCount++].Sid
- = mandatory_system_integrity_sid;
- else if (tmp_gsids.contains (well_known_admins_sid))
- new_tok_gsids->Groups[new_tok_gsids->GroupCount++].Sid
- = mandatory_high_integrity_sid;
- else
- new_tok_gsids->Groups[new_tok_gsids->GroupCount++].Sid
- = mandatory_medium_integrity_sid;
- }
-
- /* Retrieve list of privileges of that user. */
- if (!(privs = get_priv_list (lsa, usersid, tmp_gsids, psize)))
- goto out;
-
- /* Let's be heroic... */
- ret = NtCreateToken (&token, TOKEN_ALL_ACCESS, &oa, TokenImpersonation,
- &auth_luid, &exp, &user, new_tok_gsids, privs, &owner,
- &pgrp, &dacl, &source);
- if (ret)
- __seterrno_from_nt_status (ret);
- else
- {
- /* Convert to primary token. */
- if (!DuplicateTokenEx (token, MAXIMUM_ALLOWED, &sec_none,
- SecurityImpersonation, TokenPrimary,
- &primary_token))
- {
- __seterrno ();
- debug_printf ("DuplicateTokenEx %E");
- }
- }
-
-out:
- pop_self_privilege ();
- if (token != INVALID_HANDLE_VALUE)
- CloseHandle (token);
- if (privs)
- free (privs);
- if (my_tok_gsids)
- free (my_tok_gsids);
- close_local_policy (lsa);
-
- debug_printf ("%p = create_token ()", primary_token);
- return primary_token;
-}
-
-HANDLE
-lsaauth (cygsid &usersid, user_groups &new_groups, struct passwd *pw)
-{
- cygsidlist tmp_gsids (cygsidlist_auto, 12);
- cygpsid pgrpsid;
- LSA_STRING name;
- HANDLE lsa_hdl = NULL, lsa = INVALID_HANDLE_VALUE;
- LSA_OPERATIONAL_MODE sec_mode;
- NTSTATUS ret, ret2;
- ULONG package_id, size;
- LUID auth_luid = SYSTEM_LUID;
- struct {
- LSA_STRING str;
- CHAR buf[16];
- } origin;
- DWORD ulen = UNLEN + 1;
- DWORD dlen = MAX_DOMAIN_NAME_LEN + 1;
- SID_NAME_USE use;
- cyglsa_t *authinf = NULL;
- ULONG authinf_size;
- TOKEN_SOURCE ts;
- PCYG_TOKEN_GROUPS gsids = NULL;
- PTOKEN_PRIVILEGES privs = NULL;
- PACL dacl = NULL;
- PVOID profile = NULL;
- LUID luid;
- QUOTA_LIMITS quota;
- size_t psize = 0, gsize = 0, dsize = 0;
- OFFSET offset, sids_offset;
- int tmpidx, non_well_known_cnt;
-
- HANDLE user_token = NULL;
-
- push_self_privilege (SE_TCB_PRIVILEGE, true);
-
- /* Register as logon process. */
- str2lsa (name, "Cygwin");
- SetLastError (0);
- ret = LsaRegisterLogonProcess (&name, &lsa_hdl, &sec_mode);
- if (ret != STATUS_SUCCESS)
- {
- debug_printf ("LsaRegisterLogonProcess: %p", ret);
- __seterrno_from_win_error (LsaNtStatusToWinError (ret));
- goto out;
- }
- else if (GetLastError () == ERROR_PROC_NOT_FOUND)
- {
- debug_printf ("Couldn't load Secur32.dll");
- goto out;
- }
- /* Get handle to our own LSA package. */
- str2lsa (name, CYG_LSA_PKGNAME);
- ret = LsaLookupAuthenticationPackage (lsa_hdl, &name, &package_id);
- if (ret != STATUS_SUCCESS)
- {
- debug_printf ("LsaLookupAuthenticationPackage: %p", ret);
- __seterrno_from_win_error (LsaNtStatusToWinError (ret));
- goto out;
- }
-
- /* Open policy object. */
- if ((lsa = open_local_policy (POLICY_EXECUTE)) == INVALID_HANDLE_VALUE)
- goto out;
-
- /* Create origin. */
- str2buf2lsa (origin.str, origin.buf, "Cygwin");
- /* Create token source. */
- memcpy (ts.SourceName, "Cygwin.1", 8);
- ts.SourceIdentifier.HighPart = 0;
- ts.SourceIdentifier.LowPart = 0x0103;
-
- /* Create list of groups, the user is member in. */
- int auth_pos;
- if (new_groups.issetgroups ())
- get_setgroups_sidlist (tmp_gsids, usersid, pw, NULL, new_groups, auth_luid,
- auth_pos);
- else if (!get_initgroups_sidlist (tmp_gsids, usersid, new_groups.pgsid, pw,
- NULL, auth_luid, auth_pos))
- goto out;
- /* The logon SID entry is not generated automatically on Windows 2000
- and earlier for some reason. So add fake logon sid here, which is
- filled with logon id values in the authentication package. */
- if (wincap.needs_logon_sid_in_sid_list ())
- tmp_gsids += fake_logon_sid;
-
- tmp_gsids.debug_print ("tmp_gsids");
-
- /* Evaluate size of TOKEN_GROUPS list */
- non_well_known_cnt = tmp_gsids.non_well_known_count ();
- gsize = sizeof (DWORD) + non_well_known_cnt * sizeof (SID_AND_ATTRIBUTES);
- tmpidx = -1;
- for (int i = 0; i < non_well_known_cnt; ++i)
- if ((tmpidx = tmp_gsids.next_non_well_known_sid (tmpidx)) >= 0)
- gsize += GetLengthSid (tmp_gsids.sids[tmpidx]);
-
- /* Retrieve list of privileges of that user. */
- if (!(privs = get_priv_list (lsa, usersid, tmp_gsids, psize)))
- goto out;
-
- /* Create DefaultDacl. */
- dsize = sizeof (ACL) + 3 * sizeof (ACCESS_ALLOWED_ACE)
- + GetLengthSid (usersid)
- + GetLengthSid (well_known_admins_sid)
- + GetLengthSid (well_known_system_sid);
- dacl = (PACL) alloca (dsize);
- if (!InitializeAcl (dacl, dsize, ACL_REVISION))
- goto out;
- if (!AddAccessAllowedAce (dacl, ACL_REVISION, GENERIC_ALL, usersid))
- goto out;
- if (!AddAccessAllowedAce (dacl, ACL_REVISION, GENERIC_ALL,
- well_known_admins_sid))
- goto out;
- if (!AddAccessAllowedAce (dacl, ACL_REVISION, GENERIC_ALL,
- well_known_system_sid))
- goto out;
-
- /* Evaluate authinf size and allocate authinf. */
- authinf_size = (authinf->data - (PBYTE) authinf);
- authinf_size += GetLengthSid (usersid); /* User SID */
- authinf_size += gsize; /* Groups + Group SIDs */
- /* When trying to define the admins group as primary group on Vista,
- LsaLogonUser fails with error STATUS_INVALID_OWNER. As workaround
- we define "Local" as primary group here. Seteuid32 sets the primary
- group to the group set in /etc/passwd anyway. */
- if (new_groups.pgsid == well_known_admins_sid)
- pgrpsid = well_known_local_sid;
- else
- pgrpsid = new_groups.pgsid;
-
- authinf_size += GetLengthSid (pgrpsid); /* Primary Group SID */
-
- authinf_size += psize; /* Privileges */
- authinf_size += 0; /* Owner SID */
- authinf_size += dsize; /* Default DACL */
-
- authinf = (cyglsa_t *) alloca (authinf_size);
- authinf->inf_size = authinf_size - ((PBYTE) &authinf->inf - (PBYTE) authinf);
-
- authinf->magic = CYG_LSA_MAGIC;
-
- if (!LookupAccountSidW (NULL, usersid, authinf->username, &ulen,
- authinf->domain, &dlen, &use))
- {
- __seterrno ();
- goto out;
- }
-
- /* Store stuff in authinf with offset relative to start of "inf" member,
- instead of using pointers. */
- offset = authinf->data - (PBYTE) &authinf->inf;
-
- authinf->inf.ExpirationTime.LowPart = 0xffffffffL;
- authinf->inf.ExpirationTime.HighPart = 0x7fffffffL;
- /* User SID */
- authinf->inf.User.User.Sid = offset;
- authinf->inf.User.User.Attributes = 0;
- CopySid (GetLengthSid (usersid), (PSID) ((PBYTE) &authinf->inf + offset),
- usersid);
- offset += GetLengthSid (usersid);
- /* Groups */
- authinf->inf.Groups = offset;
- gsids = (PCYG_TOKEN_GROUPS) ((PBYTE) &authinf->inf + offset);
- sids_offset = offset + sizeof (ULONG) + non_well_known_cnt
- * sizeof (SID_AND_ATTRIBUTES);
- gsids->GroupCount = non_well_known_cnt;
- /* Group SIDs */
- tmpidx = -1;
- for (int i = 0; i < non_well_known_cnt; ++i)
- {
- if ((tmpidx = tmp_gsids.next_non_well_known_sid (tmpidx)) < 0)
- break;
- gsids->Groups[i].Sid = sids_offset;
- gsids->Groups[i].Attributes = SE_GROUP_MANDATORY
- | SE_GROUP_ENABLED_BY_DEFAULT
- | SE_GROUP_ENABLED;
- /* Mark logon SID as logon SID :) */
- if (wincap.needs_logon_sid_in_sid_list ()
- && tmp_gsids.sids[tmpidx] == fake_logon_sid)
- gsids->Groups[i].Attributes += SE_GROUP_LOGON_ID;
- CopySid (GetLengthSid (tmp_gsids.sids[tmpidx]),
- (PSID) ((PBYTE) &authinf->inf + sids_offset),
- tmp_gsids.sids[tmpidx]);
- sids_offset += GetLengthSid (tmp_gsids.sids[tmpidx]);
- }
- offset += gsize;
- /* Primary Group SID */
- authinf->inf.PrimaryGroup.PrimaryGroup = offset;
- CopySid (GetLengthSid (pgrpsid), (PSID) ((PBYTE) &authinf->inf + offset),
- pgrpsid);
- offset += GetLengthSid (pgrpsid);
- /* Privileges */
- authinf->inf.Privileges = offset;
- memcpy ((PBYTE) &authinf->inf + offset, privs, psize);
- offset += psize;
- /* Owner */
- authinf->inf.Owner.Owner = 0;
- /* Default DACL */
- authinf->inf.DefaultDacl.DefaultDacl = offset;
- memcpy ((PBYTE) &authinf->inf + offset, dacl, dsize);
-
- authinf->checksum = CYGWIN_VERSION_MAGIC (CYGWIN_VERSION_DLL_MAJOR,
- CYGWIN_VERSION_DLL_MINOR);
- PDWORD csp;
- PDWORD csp_end;
- csp = (PDWORD) &authinf->username;
- csp_end = (PDWORD) ((PBYTE) authinf + authinf_size);
- while (csp < csp_end)
- authinf->checksum += *csp++;
-
- /* Try to logon... */
- ret = LsaLogonUser (lsa_hdl, (PLSA_STRING) &origin, Interactive, package_id,
- authinf, authinf_size, NULL, &ts, &profile, &size, &luid,
- &user_token, &quota, &ret2);
- if (ret != STATUS_SUCCESS)
- {
- debug_printf ("LsaLogonUser: %p", ret);
- __seterrno_from_win_error (LsaNtStatusToWinError (ret));
- goto out;
- }
- if (profile)
- {
-#ifdef JUST_ANOTHER_NONWORKING_SOLUTION
- /* See ../lsaauth/cyglsa.c. */
- cygprf_t *prf = (cygprf_t *) profile;
- if (prf->magic_pre == MAGIC_PRE && prf->magic_post == MAGIC_POST
- && prf->token)
- {
- CloseHandle (user_token);
- user_token = prf->token;
- system_printf ("Got token through profile: %p", user_token);
- }
-#endif /* JUST_ANOTHER_NONWORKING_SOLUTION */
- LsaFreeReturnBuffer (profile);
- }
-
- if (wincap.has_mandatory_integrity_control ())
- {
- typedef struct _TOKEN_LINKED_TOKEN
- {
- HANDLE LinkedToken;
- } TOKEN_LINKED_TOKEN, *PTOKEN_LINKED_TOKEN;
-# define TokenLinkedToken ((TOKEN_INFORMATION_CLASS) 19)
-
- TOKEN_LINKED_TOKEN linked;
-
- if (GetTokenInformation (user_token, TokenLinkedToken,
- (PVOID) &linked, sizeof linked, &size))
- {
- debug_printf ("Linked Token: %p", linked.LinkedToken);
- if (linked.LinkedToken)
- user_token = linked.LinkedToken;
- }
- }
-
- /* The token returned by LsaLogonUser is not inheritable. Make it so. */
- if (!SetHandleInformation (user_token, HANDLE_FLAG_INHERIT,
- HANDLE_FLAG_INHERIT))
- system_printf ("SetHandleInformation %E");
-
-out:
- if (privs)
- free (privs);
- close_local_policy (lsa);
- if (lsa_hdl)
- LsaDeregisterLogonProcess (lsa_hdl);
- pop_self_privilege ();
-
- debug_printf ("%p = lsaauth ()", user_token);
- return user_token;
-}
-
-#define SFU_LSA_KEY_SUFFIX L"_microsoft_sfu_utility"
-
-HANDLE
-lsaprivkeyauth (struct passwd *pw)
-{
- NTSTATUS status;
- HANDLE lsa = INVALID_HANDLE_VALUE;
- HANDLE token = NULL;
- WCHAR sid[256];
- WCHAR domain[MAX_DOMAIN_NAME_LEN + 1];
- WCHAR user[UNLEN + 1];
- WCHAR key_name[MAX_DOMAIN_NAME_LEN + UNLEN + wcslen (SFU_LSA_KEY_SUFFIX) + 2];
- UNICODE_STRING key;
- PUNICODE_STRING data;
- cygsid psid;
-
- push_self_privilege (SE_TCB_PRIVILEGE, true);
-
- /* Open policy object. */
- if ((lsa = open_local_policy (POLICY_GET_PRIVATE_INFORMATION))
- == INVALID_HANDLE_VALUE)
- goto out;
-
- /* Needed for Interix key and LogonUser. */
- extract_nt_dom_user (pw, domain, user);
-
- /* First test for a Cygwin entry. */
- if (psid.getfrompw (pw) && psid.string (sid))
- {
- wcpcpy (wcpcpy (key_name, CYGWIN_LSA_KEY_PREFIX), sid);
- RtlInitUnicodeString (&key, key_name);
- status = LsaRetrievePrivateData (lsa, &key, &data);
- if (!NT_SUCCESS (status))
- {
- /* No Cygwin key, try Interix key. */
- if (!*domain)
- goto out;
- __small_swprintf (key_name, L"%W_%W%W",
- domain, user, SFU_LSA_KEY_SUFFIX);
- RtlInitUnicodeString (&key, key_name);
- status = LsaRetrievePrivateData (lsa, &key, &data);
- if (!NT_SUCCESS (status))
- goto out;
- }
- }
-
- /* The key is not 0-terminated. */
- PWCHAR passwd;
- passwd = (PWCHAR) alloca (data->Length + sizeof (WCHAR));
- *wcpncpy (passwd, data->Buffer, data->Length / sizeof (WCHAR)) = L'\0';
- LsaFreeMemory (data);
- debug_printf ("Try logon for %W\\%W", domain, user);
- if (!LogonUserW (user, domain, passwd, LOGON32_LOGON_INTERACTIVE,
- LOGON32_PROVIDER_DEFAULT, &token))
- {
- __seterrno ();
- token = NULL;
- }
- else if (!SetHandleInformation (token,
- HANDLE_FLAG_INHERIT,
- HANDLE_FLAG_INHERIT))
- {
- __seterrno ();
- CloseHandle (token);
- token = NULL;
- }
-
-out:
- close_local_policy (lsa);
- pop_self_privilege ();
- return token;
-}
diff --git a/winsup/cygwin/sec_helper.cc b/winsup/cygwin/sec_helper.cc
deleted file mode 100644
index 1e1657e..0000000
--- a/winsup/cygwin/sec_helper.cc
+++ /dev/null
@@ -1,563 +0,0 @@
-/* sec_helper.cc: NT security helper functions
-
- Copyright 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008 Red Hat, Inc.
-
- Written by Corinna Vinschen <corinna@vinschen.de>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include <sys/acl.h>
-#include <wchar.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "pinfo.h"
-#include "cygheap.h"
-#include "pwdgrp.h"
-#include "ntdll.h"
-
-/* General purpose security attribute objects for global use. */
-SECURITY_ATTRIBUTES NO_COPY sec_none;
-SECURITY_ATTRIBUTES NO_COPY sec_none_nih;
-SECURITY_ATTRIBUTES NO_COPY sec_all;
-SECURITY_ATTRIBUTES NO_COPY sec_all_nih;
-
-MKSID (well_known_null_sid, "S-1-0-0",
- SECURITY_NULL_SID_AUTHORITY, 1, SECURITY_NULL_RID);
-MKSID (well_known_world_sid, "S-1-1-0",
- SECURITY_WORLD_SID_AUTHORITY, 1, SECURITY_WORLD_RID);
-MKSID (well_known_local_sid, "S-1-2-0",
- SECURITY_LOCAL_SID_AUTHORITY, 1, SECURITY_LOCAL_RID);
-MKSID (well_known_creator_owner_sid, "S-1-3-0",
- SECURITY_CREATOR_SID_AUTHORITY, 1, SECURITY_CREATOR_OWNER_RID);
-MKSID (well_known_creator_group_sid, "S-1-3-1",
- SECURITY_CREATOR_SID_AUTHORITY, 1, SECURITY_CREATOR_GROUP_RID);
-MKSID (well_known_dialup_sid, "S-1-5-1",
- SECURITY_NT_AUTHORITY, 1, SECURITY_DIALUP_RID);
-MKSID (well_known_network_sid, "S-1-5-2",
- SECURITY_NT_AUTHORITY, 1, SECURITY_NETWORK_RID);
-MKSID (well_known_batch_sid, "S-1-5-3",
- SECURITY_NT_AUTHORITY, 1, SECURITY_BATCH_RID);
-MKSID (well_known_interactive_sid, "S-1-5-4",
- SECURITY_NT_AUTHORITY, 1, SECURITY_INTERACTIVE_RID);
-MKSID (well_known_service_sid, "S-1-5-6",
- SECURITY_NT_AUTHORITY, 1, SECURITY_SERVICE_RID);
-MKSID (well_known_authenticated_users_sid, "S-1-5-11",
- SECURITY_NT_AUTHORITY, 1, SECURITY_AUTHENTICATED_USER_RID);
-MKSID (well_known_this_org_sid, "S-1-5-15",
- SECURITY_NT_AUTHORITY, 1, 15);
-MKSID (well_known_system_sid, "S-1-5-18",
- SECURITY_NT_AUTHORITY, 1, SECURITY_LOCAL_SYSTEM_RID);
-MKSID (well_known_admins_sid, "S-1-5-32-544",
- SECURITY_NT_AUTHORITY, 2, SECURITY_BUILTIN_DOMAIN_RID,
- DOMAIN_ALIAS_RID_ADMINS);
-MKSID (fake_logon_sid, "S-1-5-5-0-0",
- SECURITY_NT_AUTHORITY, 3, SECURITY_LOGON_IDS_RID, 0, 0);
-MKSID (mandatory_medium_integrity_sid, "S-1-16-8192",
- SECURITY_MANDATORY_LABEL_AUTHORITY, 1, SECURITY_MANDATORY_MEDIUM_RID);
-MKSID (mandatory_high_integrity_sid, "S-1-16-12288",
- SECURITY_MANDATORY_LABEL_AUTHORITY, 1, SECURITY_MANDATORY_HIGH_RID);
-MKSID (mandatory_system_integrity_sid, "S-1-16-16384",
- SECURITY_MANDATORY_LABEL_AUTHORITY, 1, SECURITY_MANDATORY_SYSTEM_RID);
-
-bool
-cygpsid::operator== (const char *nsidstr) const
-{
- cygsid nsid (nsidstr);
- return psid == nsid;
-}
-
-__uid32_t
-cygpsid::get_id (BOOL search_grp, int *type)
-{
- /* First try to get SID from group, then passwd */
- __uid32_t id = ILLEGAL_UID;
-
- if (search_grp)
- {
- struct __group32 *gr;
- if (cygheap->user.groups.pgsid == psid)
- id = myself->gid;
- else if ((gr = internal_getgrsid (*this)))
- id = gr->gr_gid;
- if (id != ILLEGAL_UID)
- {
- if (type)
- *type = GROUP;
- return id;
- }
- }
- if (!search_grp || type)
- {
- struct passwd *pw;
- if (*this == cygheap->user.sid ())
- id = myself->uid;
- else if ((pw = internal_getpwsid (*this)))
- id = pw->pw_uid;
- if (id != ILLEGAL_UID && type)
- *type = USER;
- }
- return id;
-}
-
-PWCHAR
-cygpsid::string (PWCHAR nsidstr) const
-{
- UNICODE_STRING sid;
-
- if (!psid || !nsidstr)
- return NULL;
- RtlInitEmptyUnicodeString (&sid, nsidstr, 256);
- RtlConvertSidToUnicodeString (&sid, psid, FALSE);
- return nsidstr;
-}
-
-char *
-cygpsid::string (char *nsidstr) const
-{
- char *t;
- DWORD i;
-
- if (!psid || !nsidstr)
- return NULL;
- strcpy (nsidstr, "S-1-");
- t = nsidstr + sizeof ("S-1-") - 1;
- t += __small_sprintf (t, "%u", GetSidIdentifierAuthority (psid)->Value[5]);
- for (i = 0; i < *GetSidSubAuthorityCount (psid); ++i)
- t += __small_sprintf (t, "-%lu", *GetSidSubAuthority (psid, i));
- return nsidstr;
-}
-
-PSID
-cygsid::get_sid (DWORD s, DWORD cnt, DWORD *r, bool well_known)
-{
- DWORD i;
- SID_IDENTIFIER_AUTHORITY sid_auth = {{0,0,0,0,0,0}};
-
- if (s > 255 || cnt < 1 || cnt > 8)
- {
- psid = NO_SID;
- return NULL;
- }
- sid_auth.Value[5] = s;
- set ();
- InitializeSid (psid, &sid_auth, cnt);
- for (i = 0; i < cnt; ++i)
- memcpy ((char *) psid + 8 + sizeof (DWORD) * i, &r[i], sizeof (DWORD));
- well_known_sid = well_known;
- return psid;
-}
-
-const PSID
-cygsid::getfromstr (const char *nsidstr, bool well_known)
-{
- char *lasts;
- DWORD s, cnt = 0;
- DWORD r[8];
-
- if (nsidstr && !strncmp (nsidstr, "S-1-", 4))
- {
- s = strtoul (nsidstr + 4, &lasts, 10);
- while (cnt < 8 && *lasts == '-')
- r[cnt++] = strtoul (lasts + 1, &lasts, 10);
- if (!*lasts)
- return get_sid (s, cnt, r, well_known);
- }
- return psid = NO_SID;
-}
-
-BOOL
-cygsid::getfrompw (const struct passwd *pw)
-{
- char *sp = (pw && pw->pw_gecos) ? strrchr (pw->pw_gecos, ',') : NULL;
- return (*this = sp ? sp + 1 : sp) != NULL;
-}
-
-BOOL
-cygsid::getfromgr (const struct __group32 *gr)
-{
- char *sp = (gr && gr->gr_passwd) ? gr->gr_passwd : NULL;
- return (*this = sp) != NULL;
-}
-
-cygsid *
-cygsidlist::alloc_sids (int n)
-{
- if (n > 0)
- return (cygsid *) cmalloc (HEAP_STR, n * sizeof (cygsid));
- else
- return NULL;
-}
-
-void
-cygsidlist::free_sids ()
-{
- if (sids)
- cfree (sids);
- sids = NULL;
- cnt = maxcnt = 0;
- type = cygsidlist_empty;
-}
-
-BOOL
-cygsidlist::add (const PSID nsi, bool well_known)
-{
- if (contains (nsi))
- return TRUE;
- if (cnt >= maxcnt)
- {
- cygsid *tmp = new cygsid [2 * maxcnt];
- if (!tmp)
- return FALSE;
- maxcnt *= 2;
- for (int i = 0; i < cnt; ++i)
- tmp[i] = sids[i];
- delete [] sids;
- sids = tmp;
- }
- if (well_known)
- sids[cnt++] *= nsi;
- else
- sids[cnt++] = nsi;
- return TRUE;
-}
-
-bool
-get_sids_info (cygpsid owner_sid, cygpsid group_sid, __uid32_t * uidret, __gid32_t * gidret)
-{
- struct passwd *pw;
- struct __group32 *gr = NULL;
- bool ret = false;
-
- owner_sid.debug_print ("get_sids_info: owner SID =");
- group_sid.debug_print ("get_sids_info: group SID =");
-
- if (group_sid == cygheap->user.groups.pgsid)
- *gidret = myself->gid;
- else if ((gr = internal_getgrsid (group_sid)))
- *gidret = gr->gr_gid;
- else
- *gidret = ILLEGAL_GID;
-
- if (owner_sid == cygheap->user.sid ())
- {
- *uidret = myself->uid;
- if (*gidret == myself->gid)
- ret = true;
- else
- ret = (internal_getgroups (0, NULL, &group_sid) > 0);
- }
- else if ((pw = internal_getpwsid (owner_sid)))
- {
- *uidret = pw->pw_uid;
- if (gr || (*gidret != ILLEGAL_GID
- && (gr = internal_getgrgid (*gidret))))
- for (int idx = 0; gr->gr_mem[idx]; ++idx)
- if ((ret = strcasematch (pw->pw_name, gr->gr_mem[idx])))
- break;
- }
- else
- *uidret = ILLEGAL_UID;
-
- return ret;
-}
-
-PSECURITY_DESCRIPTOR
-security_descriptor::malloc (size_t nsize)
-{
- free ();
- if ((psd = (PSECURITY_DESCRIPTOR) ::malloc (nsize)))
- sd_size = nsize;
- return psd;
-}
-
-PSECURITY_DESCRIPTOR
-security_descriptor::realloc (size_t nsize)
-{
- PSECURITY_DESCRIPTOR tmp;
-
- if (!(tmp = (PSECURITY_DESCRIPTOR) ::realloc (psd, nsize)))
- return NULL;
- sd_size = nsize;
- return psd = tmp;
-}
-
-void
-security_descriptor::free ()
-{
- if (psd)
- ::free (psd);
- psd = NULL;
- sd_size = 0;
-}
-
-#undef TEXT
-#define TEXT(q) L##q
-
-/* Index must match the correspoding foo_PRIVILEGE value, see security.h. */
-static const wchar_t *cygpriv[] =
-{
- L"",
- L"",
- SE_CREATE_TOKEN_NAME,
- SE_ASSIGNPRIMARYTOKEN_NAME,
- SE_LOCK_MEMORY_NAME,
- SE_INCREASE_QUOTA_NAME,
- SE_MACHINE_ACCOUNT_NAME,
- SE_TCB_NAME,
- SE_SECURITY_NAME,
- SE_TAKE_OWNERSHIP_NAME,
- SE_LOAD_DRIVER_NAME,
- SE_SYSTEM_PROFILE_NAME,
- SE_SYSTEMTIME_NAME,
- SE_PROF_SINGLE_PROCESS_NAME,
- SE_INC_BASE_PRIORITY_NAME,
- SE_CREATE_PAGEFILE_NAME,
- SE_CREATE_PERMANENT_NAME,
- SE_BACKUP_NAME,
- SE_RESTORE_NAME,
- SE_SHUTDOWN_NAME,
- SE_DEBUG_NAME,
- SE_AUDIT_NAME,
- SE_SYSTEM_ENVIRONMENT_NAME,
- SE_CHANGE_NOTIFY_NAME,
- SE_REMOTE_SHUTDOWN_NAME,
- SE_UNDOCK_NAME,
- SE_SYNC_AGENT_NAME,
- SE_ENABLE_DELEGATION_NAME,
- SE_MANAGE_VOLUME_NAME,
- SE_IMPERSONATE_NAME,
- SE_CREATE_GLOBAL_NAME,
- SE_TRUSTED_CREDMAN_ACCESS_NAME,
- SE_RELABEL_NAME,
- SE_INCREASE_WORKING_SET_NAME,
- SE_TIME_ZONE_NAME,
- SE_CREATE_SYMBOLIC_LINK_NAME
-};
-
-bool
-privilege_luid (const PWCHAR pname, LUID *luid)
-{
- ULONG idx;
- for (idx = SE_CREATE_TOKEN_PRIVILEGE;
- idx <= SE_MAX_WELL_KNOWN_PRIVILEGE;
- ++idx)
- if (!wcscmp (cygpriv[idx], pname))
- {
- luid->HighPart = 0;
- luid->LowPart = idx;
- return true;
- }
- return false;
-}
-
-static const wchar_t *
-privilege_name (const LUID &priv_luid)
-{
- if (priv_luid.HighPart || priv_luid.LowPart < SE_CREATE_TOKEN_PRIVILEGE
- || priv_luid.LowPart > SE_MAX_WELL_KNOWN_PRIVILEGE)
- return L"<unknown privilege>";
- return cygpriv[priv_luid.LowPart];
-}
-
-int
-set_privilege (HANDLE token, DWORD privilege, bool enable)
-{
- int ret = -1;
- TOKEN_PRIVILEGES new_priv, orig_priv;
- ULONG size;
- NTSTATUS status;
-
- new_priv.PrivilegeCount = 1;
- new_priv.Privileges[0].Luid.HighPart = 0L;
- new_priv.Privileges[0].Luid.LowPart = privilege;
- new_priv.Privileges[0].Attributes = enable ? SE_PRIVILEGE_ENABLED : 0;
-
- status = NtAdjustPrivilegesToken (token, FALSE, &new_priv, sizeof orig_priv,
- &orig_priv, &size);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- goto out;
- }
-
- /* If orig_priv.PrivilegeCount is 0, the privilege hasn't been changed. */
- if (!orig_priv.PrivilegeCount)
- ret = enable ? 1 : 0;
- else
- ret = (orig_priv.Privileges[0].Attributes & SE_PRIVILEGE_ENABLED) ? 1 : 0;
-
-out:
- if (ret < 0)
- debug_printf ("%d = set_privilege ((token %x) %W, %d)\n", ret, token,
- privilege_name (new_priv.Privileges[0].Luid), enable);
- return ret;
-}
-
-/* This is called very early in process initialization. The code must
- not depend on anything. */
-void
-set_cygwin_privileges (HANDLE token)
-{
- set_privilege (token, SE_RESTORE_PRIVILEGE, true);
- set_privilege (token, SE_BACKUP_PRIVILEGE, true);
- if (wincap.has_create_global_privilege ())
- set_privilege (token, SE_CREATE_GLOBAL_PRIVILEGE, true);
-}
-
-/* Function to return a common SECURITY_DESCRIPTOR that
- allows all access. */
-
-
-SECURITY_DESCRIPTOR *__stdcall
-get_null_sd ()
-{
- static NO_COPY SECURITY_DESCRIPTOR sd;
- static NO_COPY SECURITY_DESCRIPTOR *null_sdp;
-
- if (!null_sdp)
- {
- InitializeSecurityDescriptor (&sd, SECURITY_DESCRIPTOR_REVISION);
- SetSecurityDescriptorDacl (&sd, TRUE, 0, FALSE);
- null_sdp = &sd;
- }
- return null_sdp;
-}
-
-/* Initialize global security attributes.
- Called from dcrt0.cc (_dll_crt0). */
-
-void
-init_global_security ()
-{
- sec_none.nLength = sec_none_nih.nLength =
- sec_all.nLength = sec_all_nih.nLength = sizeof (SECURITY_ATTRIBUTES);
- sec_none.bInheritHandle = sec_all.bInheritHandle = TRUE;
- sec_none_nih.bInheritHandle = sec_all_nih.bInheritHandle = FALSE;
- sec_none.lpSecurityDescriptor = sec_none_nih.lpSecurityDescriptor = NULL;
- sec_all.lpSecurityDescriptor = sec_all_nih.lpSecurityDescriptor =
- get_null_sd ();
-}
-
-bool
-sec_acl (PACL acl, bool original, bool admins, PSID sid1, PSID sid2, DWORD access2)
-{
- size_t acl_len = MAX_DACL_LEN(5);
- LPVOID pAce;
- cygpsid psid;
-
-#ifdef DEBUGGING
- if ((unsigned long) acl % 4)
- api_fatal ("Incorrectly aligned incoming ACL buffer!");
-#endif
- if (!InitializeAcl (acl, acl_len, ACL_REVISION))
- {
- debug_printf ("InitializeAcl %E");
- return false;
- }
- if (sid1)
- if (!AddAccessAllowedAce (acl, ACL_REVISION,
- GENERIC_ALL, sid1))
- debug_printf ("AddAccessAllowedAce(sid1) %E");
- if (original && (psid = cygheap->user.saved_sid ())
- && psid != sid1 && psid != well_known_system_sid)
- if (!AddAccessAllowedAce (acl, ACL_REVISION,
- GENERIC_ALL, psid))
- debug_printf ("AddAccessAllowedAce(original) %E");
- if (sid2)
- if (!AddAccessAllowedAce (acl, ACL_REVISION,
- access2, sid2))
- debug_printf ("AddAccessAllowedAce(sid2) %E");
- if (admins)
- if (!AddAccessAllowedAce (acl, ACL_REVISION,
- GENERIC_ALL, well_known_admins_sid))
- debug_printf ("AddAccessAllowedAce(admin) %E");
- if (!AddAccessAllowedAce (acl, ACL_REVISION,
- GENERIC_ALL, well_known_system_sid))
- debug_printf ("AddAccessAllowedAce(system) %E");
- FindFirstFreeAce (acl, &pAce);
- if (pAce)
- acl->AclSize = (char *) pAce - (char *) acl;
- else
- debug_printf ("FindFirstFreeAce %E");
-
- return true;
-}
-
-PSECURITY_ATTRIBUTES __stdcall
-__sec_user (PVOID sa_buf, PSID sid1, PSID sid2, DWORD access2, BOOL inherit)
-{
- PSECURITY_ATTRIBUTES psa = (PSECURITY_ATTRIBUTES) sa_buf;
- PSECURITY_DESCRIPTOR psd = (PSECURITY_DESCRIPTOR)
- ((char *) sa_buf + sizeof (*psa));
- PACL acl = (PACL) ((char *) sa_buf + sizeof (*psa) + sizeof (*psd));
-
-#ifdef DEBUGGING
- if ((unsigned long) sa_buf % 4)
- api_fatal ("Incorrectly aligned incoming SA buffer!");
-#endif
- if (!sec_acl (acl, true, true, sid1, sid2, access2))
- return inherit ? &sec_none : &sec_none_nih;
-
- if (!InitializeSecurityDescriptor (psd, SECURITY_DESCRIPTOR_REVISION))
- debug_printf ("InitializeSecurityDescriptor %E");
-
-/*
- * Setting the owner lets the created security attribute not work
- * on NT4 SP3 Server. Don't know why, but the function still does
- * what it should do also if the owner isn't set.
-*/
-#if 0
- if (!SetSecurityDescriptorOwner (psd, sid, FALSE))
- debug_printf ("SetSecurityDescriptorOwner %E");
-#endif
-
- if (!SetSecurityDescriptorDacl (psd, TRUE, acl, FALSE))
- debug_printf ("SetSecurityDescriptorDacl %E");
-
- psa->nLength = sizeof (SECURITY_ATTRIBUTES);
- psa->lpSecurityDescriptor = psd;
- psa->bInheritHandle = inherit;
- return psa;
-}
-
-/* Helper function to create an event security descriptor which only allows
- specific access to everyone. Only the creating process has all access
- rights. */
-
-PSECURITY_DESCRIPTOR
-_everyone_sd (void *buf, ACCESS_MASK access)
-{
- PSECURITY_DESCRIPTOR psd = (PSECURITY_DESCRIPTOR) buf;
-
- if (psd)
- {
- InitializeSecurityDescriptor (psd, SECURITY_DESCRIPTOR_REVISION);
- PACL dacl = (PACL) (psd + 1);
- InitializeAcl (dacl, MAX_DACL_LEN (1), ACL_REVISION);
- if (!AddAccessAllowedAce (dacl, ACL_REVISION, access,
- well_known_world_sid))
- {
- debug_printf ("AddAccessAllowedAce: %lu", GetLastError ());
- return NULL;
- }
- LPVOID ace;
- if (!FindFirstFreeAce (dacl, &ace))
- {
- debug_printf ("FindFirstFreeAce: %lu", GetLastError ());
- return NULL;
- }
- dacl->AclSize = (char *) ace - (char *) dacl;
- SetSecurityDescriptorDacl (psd, TRUE, dacl, FALSE);
- }
- return psd;
-}
-
diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc
deleted file mode 100644
index 66dc93c..0000000
--- a/winsup/cygwin/security.cc
+++ /dev/null
@@ -1,835 +0,0 @@
-/* security.cc: NT file access control functions
-
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007 Red Hat, Inc.
-
- Originaly written by Gunther Ebert, gunther.ebert@ixos-leipzig.de
- Completely rewritten by Corinna Vinschen <corinna@vinschen.de>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <unistd.h>
-#include <stdlib.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "pinfo.h"
-#include "cygheap.h"
-#include "ntdll.h"
-#include "pwdgrp.h"
-
-#define ALL_SECURITY_INFORMATION (DACL_SECURITY_INFORMATION \
- | GROUP_SECURITY_INFORMATION \
- | OWNER_SECURITY_INFORMATION)
-
-LONG
-get_file_sd (HANDLE fh, path_conv &pc, security_descriptor &sd)
-{
- NTSTATUS status = STATUS_SUCCESS;
- ULONG len = 0;
- int retry = 0;
- int res = -1;
-
- for (; retry < 2; ++retry)
- {
- if (fh)
- {
- status = NtQuerySecurityObject (fh, ALL_SECURITY_INFORMATION,
- sd, len, &len);
- if (status == STATUS_BUFFER_TOO_SMALL)
- {
- if (!sd.malloc (len))
- {
- set_errno (ENOMEM);
- break;
- }
- status = NtQuerySecurityObject (fh, ALL_SECURITY_INFORMATION,
- sd, len, &len);
- }
- if (NT_SUCCESS (status))
- {
- res = 0;
- break;
- }
- }
- if (!retry)
- {
- OBJECT_ATTRIBUTES attr;
- IO_STATUS_BLOCK io;
-
- status = NtOpenFile (&fh, READ_CONTROL,
- pc.get_object_attr (attr, sec_none_nih),
- &io, FILE_SHARE_VALID_FLAGS,
- FILE_OPEN_FOR_BACKUP_INTENT);
- if (!NT_SUCCESS (status))
- {
- fh = NULL;
- break;
- }
- }
- }
- if (retry && fh)
- NtClose (fh);
- if (!NT_SUCCESS (status))
- __seterrno_from_nt_status (status);
- return res;
-}
-
-LONG
-set_file_sd (HANDLE fh, path_conv &pc, security_descriptor &sd)
-{
- NTSTATUS status = STATUS_SUCCESS;
- int retry = 0;
- int res = -1;
-
- for (; retry < 2; ++retry)
- {
- if (fh)
- {
- status = NtSetSecurityObject (fh, ALL_SECURITY_INFORMATION, sd);
- if (NT_SUCCESS (status))
- {
- res = 0;
- break;
- }
- }
- if (!retry)
- {
- OBJECT_ATTRIBUTES attr;
- IO_STATUS_BLOCK io;
-
- status = NtOpenFile (&fh, WRITE_OWNER | WRITE_DAC,
- pc.get_object_attr (attr, sec_none_nih),
- &io, FILE_SHARE_VALID_FLAGS,
- FILE_OPEN_FOR_BACKUP_INTENT
- | FILE_OPEN_FOR_RECOVERY);
- if (!NT_SUCCESS (status))
- {
- fh = NULL;
- break;
- }
- }
- }
- if (retry && fh)
- NtClose (fh);
- if (!NT_SUCCESS (status))
- __seterrno_from_nt_status (status);
- return res;
-}
-
-static void
-get_attribute_from_acl (mode_t *attribute, PACL acl, PSID owner_sid,
- PSID group_sid, bool grp_member)
-{
- ACCESS_ALLOWED_ACE *ace;
- int allow = 0;
- int deny = 0;
- int *flags, *anti;
-
- for (DWORD i = 0; i < acl->AceCount; ++i)
- {
- if (!GetAce (acl, i, (PVOID *) &ace))
- continue;
- if (ace->Header.AceFlags & INHERIT_ONLY)
- continue;
- switch (ace->Header.AceType)
- {
- case ACCESS_ALLOWED_ACE_TYPE:
- flags = &allow;
- anti = &deny;
- break;
- case ACCESS_DENIED_ACE_TYPE:
- flags = &deny;
- anti = &allow;
- break;
- default:
- continue;
- }
-
- cygpsid ace_sid ((PSID) &ace->SidStart);
- if (ace_sid == well_known_world_sid)
- {
- if (ace->Mask & FILE_READ_BITS)
- *flags |= ((!(*anti & S_IROTH)) ? S_IROTH : 0)
- | ((!(*anti & S_IRGRP)) ? S_IRGRP : 0)
- | ((!(*anti & S_IRUSR)) ? S_IRUSR : 0);
- if (ace->Mask & FILE_WRITE_BITS)
- *flags |= ((!(*anti & S_IWOTH)) ? S_IWOTH : 0)
- | ((!(*anti & S_IWGRP)) ? S_IWGRP : 0)
- | ((!(*anti & S_IWUSR)) ? S_IWUSR : 0);
- if (ace->Mask & FILE_EXEC_BITS)
- *flags |= ((!(*anti & S_IXOTH)) ? S_IXOTH : 0)
- | ((!(*anti & S_IXGRP)) ? S_IXGRP : 0)
- | ((!(*anti & S_IXUSR)) ? S_IXUSR : 0);
- if ((S_ISDIR (*attribute)) &&
- (ace->Mask & (FILE_WRITE_DATA | FILE_EXECUTE | FILE_DELETE_CHILD))
- == (FILE_WRITE_DATA | FILE_EXECUTE))
- *flags |= S_ISVTX;
- }
- else if (ace_sid == well_known_null_sid)
- {
- /* Read SUID, SGID and VTX bits from NULL ACE. */
- if (ace->Mask & FILE_READ_DATA)
- *flags |= S_ISVTX;
- if (ace->Mask & FILE_WRITE_DATA)
- *flags |= S_ISGID;
- if (ace->Mask & FILE_APPEND_DATA)
- *flags |= S_ISUID;
- }
- else if (ace_sid == owner_sid)
- {
- if (ace->Mask & FILE_READ_BITS)
- *flags |= ((!(*anti & S_IRUSR)) ? S_IRUSR : 0);
- if (ace->Mask & FILE_WRITE_BITS)
- *flags |= ((!(*anti & S_IWUSR)) ? S_IWUSR : 0);
- if (ace->Mask & FILE_EXEC_BITS)
- *flags |= ((!(*anti & S_IXUSR)) ? S_IXUSR : 0);
- }
- else if (ace_sid == group_sid)
- {
- if (ace->Mask & FILE_READ_BITS)
- *flags |= ((!(*anti & S_IRGRP)) ? S_IRGRP : 0)
- | ((grp_member && !(*anti & S_IRUSR)) ? S_IRUSR : 0);
- if (ace->Mask & FILE_WRITE_BITS)
- *flags |= ((!(*anti & S_IWGRP)) ? S_IWGRP : 0)
- | ((grp_member && !(*anti & S_IWUSR)) ? S_IWUSR : 0);
- if (ace->Mask & FILE_EXEC_BITS)
- *flags |= ((!(*anti & S_IXGRP)) ? S_IXGRP : 0)
- | ((grp_member && !(*anti & S_IXUSR)) ? S_IXUSR : 0);
- }
- }
- *attribute &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISVTX | S_ISGID | S_ISUID);
- if (owner_sid && group_sid && EqualSid (owner_sid, group_sid)
- /* FIXME: temporary exception for /var/empty */
- && well_known_system_sid != group_sid)
- {
- allow &= ~(S_IRGRP | S_IWGRP | S_IXGRP);
- allow |= (((allow & S_IRUSR) ? S_IRGRP : 0)
- | ((allow & S_IWUSR) ? S_IWGRP : 0)
- | ((allow & S_IXUSR) ? S_IXGRP : 0));
- }
- *attribute |= allow;
-}
-
-static void
-get_info_from_sd (PSECURITY_DESCRIPTOR psd, mode_t *attribute,
- __uid32_t *uidret, __gid32_t *gidret)
-{
- if (!psd)
- {
- /* If reading the security descriptor failed, treat the object
- as unreadable. */
- if (attribute)
- *attribute &= ~(S_IRWXU | S_IRWXG | S_IRWXO);
- if (uidret)
- *uidret = ILLEGAL_UID;
- if (gidret)
- *gidret = ILLEGAL_GID;
- return;
- }
-
- cygpsid owner_sid;
- cygpsid group_sid;
- BOOL dummy;
-
- if (!GetSecurityDescriptorOwner (psd, (PSID *) &owner_sid, &dummy))
- debug_printf ("GetSecurityDescriptorOwner %E");
- if (!GetSecurityDescriptorGroup (psd, (PSID *) &group_sid, &dummy))
- debug_printf ("GetSecurityDescriptorGroup %E");
-
- __uid32_t uid;
- __gid32_t gid;
- bool grp_member = get_sids_info (owner_sid, group_sid, &uid, &gid);
- if (uidret)
- *uidret = uid;
- if (gidret)
- *gidret = gid;
-
- if (!attribute)
- {
- syscall_printf ("uid %d, gid %d", uid, gid);
- return;
- }
-
- PACL acl;
- BOOL acl_exists;
-
- if (!GetSecurityDescriptorDacl (psd, &acl_exists, &acl, &dummy))
- {
- __seterrno ();
- debug_printf ("GetSecurityDescriptorDacl %E");
- *attribute &= ~(S_IRWXU | S_IRWXG | S_IRWXO);
- }
- else if (!acl_exists || !acl)
- *attribute |= S_IRWXU | S_IRWXG | S_IRWXO;
- else
- get_attribute_from_acl (attribute, acl, owner_sid, group_sid, grp_member);
-
- syscall_printf ("%sACL %x, uid %d, gid %d",
- (!acl_exists || !acl)?"NO ":"", *attribute, uid, gid);
-}
-
-static int
-get_reg_sd (HANDLE handle, security_descriptor &sd_ret)
-{
- LONG ret;
- DWORD len = 0;
-
- ret = RegGetKeySecurity ((HKEY) handle, ALL_SECURITY_INFORMATION,
- sd_ret, &len);
- if (ret == ERROR_INSUFFICIENT_BUFFER)
- {
- if (!sd_ret.malloc (len))
- set_errno (ENOMEM);
- else
- ret = RegGetKeySecurity ((HKEY) handle, ALL_SECURITY_INFORMATION,
- sd_ret, &len);
- }
- if (ret != ERROR_SUCCESS)
- {
- __seterrno ();
- return -1;
- }
- return 0;
-}
-
-int
-get_reg_attribute (HKEY hkey, mode_t *attribute, __uid32_t *uidret,
- __gid32_t *gidret)
-{
- security_descriptor sd;
-
- if (!get_reg_sd (hkey, sd))
- {
- get_info_from_sd (sd, attribute, uidret, gidret);
- return 0;
- }
- /* The entries are already set to default values */
- return -1;
-}
-
-int
-get_file_attribute (HANDLE handle, path_conv &pc,
- mode_t *attribute, __uid32_t *uidret, __gid32_t *gidret)
-{
- if (pc.has_acls ())
- {
- security_descriptor sd;
-
- if (!get_file_sd (handle, pc, sd))
- {
- get_info_from_sd (sd, attribute, uidret, gidret);
- return 0;
- }
- else
- {
- if (uidret)
- *uidret = ILLEGAL_UID;
- if (gidret)
- *gidret = ILLEGAL_GID;
-
- return -1;
- }
- }
-
- if (uidret)
- *uidret = myself->uid;
- if (gidret)
- *gidret = myself->gid;
-
- return -1;
-}
-
-bool
-add_access_allowed_ace (PACL acl, int offset, DWORD attributes,
- PSID sid, size_t &len_add, DWORD inherit)
-{
- if (!AddAccessAllowedAce (acl, ACL_REVISION, attributes, sid))
- {
- __seterrno ();
- return false;
- }
- ACCESS_ALLOWED_ACE *ace;
- if (inherit && GetAce (acl, offset, (PVOID *) &ace))
- ace->Header.AceFlags |= inherit;
- len_add += sizeof (ACCESS_ALLOWED_ACE) - sizeof (DWORD) + GetLengthSid (sid);
- return true;
-}
-
-bool
-add_access_denied_ace (PACL acl, int offset, DWORD attributes,
- PSID sid, size_t &len_add, DWORD inherit)
-{
- if (!AddAccessDeniedAce (acl, ACL_REVISION, attributes, sid))
- {
- __seterrno ();
- return false;
- }
- ACCESS_DENIED_ACE *ace;
- if (inherit && GetAce (acl, offset, (PVOID *) &ace))
- ace->Header.AceFlags |= inherit;
- len_add += sizeof (ACCESS_DENIED_ACE) - sizeof (DWORD) + GetLengthSid (sid);
- return true;
-}
-
-static PSECURITY_DESCRIPTOR
-alloc_sd (path_conv &pc, __uid32_t uid, __gid32_t gid, int attribute,
- security_descriptor &sd_ret)
-{
- BOOL dummy;
-
- debug_printf("uid %d, gid %d, attribute %x", uid, gid, attribute);
-
- /* Get owner and group from current security descriptor. */
- PSID cur_owner_sid = NULL;
- PSID cur_group_sid = NULL;
- if (!GetSecurityDescriptorOwner (sd_ret, &cur_owner_sid, &dummy))
- debug_printf ("GetSecurityDescriptorOwner %E");
- if (!GetSecurityDescriptorGroup (sd_ret, &cur_group_sid, &dummy))
- debug_printf ("GetSecurityDescriptorGroup %E");
-
- /* Get SID of owner. */
- cygsid owner_sid;
- /* Check for current user first */
- if (uid == myself->uid)
- owner_sid = cygheap->user.sid ();
- else if (uid == ILLEGAL_UID)
- owner_sid = cur_owner_sid;
- else if (!owner_sid.getfrompw (internal_getpwuid (uid)))
- {
- set_errno (EINVAL);
- return NULL;
- }
- owner_sid.debug_print ("alloc_sd: owner SID =");
-
- /* Get SID of new group. */
- cygsid group_sid;
- /* Check for current user first */
- if (gid == myself->gid)
- group_sid = cygheap->user.groups.pgsid;
- else if (gid == ILLEGAL_GID)
- group_sid = cur_group_sid;
- else if (!group_sid.getfromgr (internal_getgrgid (gid)))
- {
- set_errno (EINVAL);
- return NULL;
- }
- group_sid.debug_print ("alloc_sd: group SID =");
-
- /* Initialize local security descriptor. */
- SECURITY_DESCRIPTOR sd;
- if (!InitializeSecurityDescriptor (&sd, SECURITY_DESCRIPTOR_REVISION))
- {
- __seterrno ();
- return NULL;
- }
-
- /* We set the SE_DACL_PROTECTED flag here to prevent the DACL from being
- * modified by inheritable ACEs. This flag is available since Win2K. */
- if (wincap.has_dacl_protect ())
- sd.Control |= SE_DACL_PROTECTED;
-
- /* Create owner for local security descriptor. */
- if (!SetSecurityDescriptorOwner (&sd, owner_sid, FALSE))
- {
- __seterrno ();
- return NULL;
- }
-
- /* Create group for local security descriptor. */
- if (!SetSecurityDescriptorGroup (&sd, group_sid, FALSE))
- {
- __seterrno ();
- return NULL;
- }
-
- /* Initialize local access control list. */
- PACL acl = (PACL) alloca (3072);
- if (!InitializeAcl (acl, 3072, ACL_REVISION))
- {
- __seterrno ();
- return NULL;
- }
-
- /* From here fill ACL. */
- size_t acl_len = sizeof (ACL);
- int ace_off = 0;
-
- /* Construct allow attribute for owner.
- Don't set FILE_READ/WRITE_ATTRIBUTES unconditionally on Samba, otherwise
- it enforces read permissions. Same for other's below. */
- DWORD owner_allow = STANDARD_RIGHTS_ALL
- | (pc.fs_is_samba ()
- ? 0 : (FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES));
- if (attribute & S_IRUSR)
- owner_allow |= FILE_GENERIC_READ;
- if (attribute & S_IWUSR)
- owner_allow |= FILE_GENERIC_WRITE;
- if (attribute & S_IXUSR)
- owner_allow |= FILE_GENERIC_EXECUTE & ~FILE_READ_ATTRIBUTES;
- if (S_ISDIR (attribute)
- && (attribute & (S_IWUSR | S_IXUSR)) == (S_IWUSR | S_IXUSR))
- owner_allow |= FILE_DELETE_CHILD;
-
- /* Construct allow attribute for group. */
- DWORD group_allow = STANDARD_RIGHTS_READ
- | (pc.fs_is_samba () ? 0 : FILE_READ_ATTRIBUTES);
- if (attribute & S_IRGRP)
- group_allow |= FILE_GENERIC_READ;
- if (attribute & S_IWGRP)
- group_allow |= FILE_GENERIC_WRITE;
- if (attribute & S_IXGRP)
- group_allow |= FILE_GENERIC_EXECUTE & ~FILE_READ_ATTRIBUTES;
- if (S_ISDIR (attribute)
- && (attribute & (S_IWGRP | S_IXGRP)) == (S_IWGRP | S_IXGRP)
- && !(attribute & S_ISVTX))
- group_allow |= FILE_DELETE_CHILD;
-
- /* Construct allow attribute for everyone. */
- DWORD other_allow = STANDARD_RIGHTS_READ
- | (pc.fs_is_samba () ? 0 : FILE_READ_ATTRIBUTES);
- if (attribute & S_IROTH)
- other_allow |= FILE_GENERIC_READ;
- if (attribute & S_IWOTH)
- other_allow |= FILE_GENERIC_WRITE;
- if (attribute & S_IXOTH)
- other_allow |= FILE_GENERIC_EXECUTE & ~FILE_READ_ATTRIBUTES;
- if (S_ISDIR (attribute)
- && (attribute & (S_IWOTH | S_IXOTH)) == (S_IWOTH | S_IXOTH)
- && !(attribute & S_ISVTX))
- other_allow |= FILE_DELETE_CHILD;
-
- /* Construct SUID, SGID and VTX bits in NULL ACE. */
- DWORD null_allow = 0L;
- if (attribute & (S_ISUID | S_ISGID | S_ISVTX))
- {
- if (attribute & S_ISUID)
- null_allow |= FILE_APPEND_DATA;
- if (attribute & S_ISGID)
- null_allow |= FILE_WRITE_DATA;
- if (attribute & S_ISVTX)
- null_allow |= FILE_READ_DATA;
- }
-
- /* Add owner and group permissions if SIDs are equal
- and construct deny attributes for group and owner. */
- bool isownergroup;
- if ((isownergroup = (owner_sid == group_sid)))
- owner_allow |= group_allow;
-
- DWORD owner_deny = ~owner_allow & (group_allow | other_allow);
- owner_deny &= ~(STANDARD_RIGHTS_READ
- | FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES);
-
- DWORD group_deny = ~group_allow & other_allow;
- group_deny &= ~(STANDARD_RIGHTS_READ | FILE_READ_ATTRIBUTES);
-
- /* Set deny ACE for owner. */
- if (owner_deny
- && !add_access_denied_ace (acl, ace_off++, owner_deny,
- owner_sid, acl_len, NO_INHERITANCE))
- return NULL;
- /* Set deny ACE for group here to respect the canonical order,
- if this does not impact owner */
- if (group_deny && !(group_deny & owner_allow) && !isownergroup
- && !add_access_denied_ace (acl, ace_off++, group_deny,
- group_sid, acl_len, NO_INHERITANCE))
- return NULL;
- /* Set allow ACE for owner. */
- if (!add_access_allowed_ace (acl, ace_off++, owner_allow,
- owner_sid, acl_len, NO_INHERITANCE))
- return NULL;
- /* Set deny ACE for group, if still needed. */
- if (group_deny & owner_allow && !isownergroup
- && !add_access_denied_ace (acl, ace_off++, group_deny,
- group_sid, acl_len, NO_INHERITANCE))
- return NULL;
- /* Set allow ACE for group. */
- if (!isownergroup
- && !add_access_allowed_ace (acl, ace_off++, group_allow,
- group_sid, acl_len, NO_INHERITANCE))
- return NULL;
-
- /* Set allow ACE for everyone. */
- if (!add_access_allowed_ace (acl, ace_off++, other_allow,
- well_known_world_sid, acl_len, NO_INHERITANCE))
- return NULL;
- /* Set null ACE for special bits. */
- if (null_allow
- && !add_access_allowed_ace (acl, ace_off++, null_allow,
- well_known_null_sid, acl_len, NO_INHERITANCE))
- return NULL;
-
- /* Fill ACL with unrelated ACEs from current security descriptor. */
- PACL oacl;
- BOOL acl_exists = FALSE;
- ACCESS_ALLOWED_ACE *ace;
- if (GetSecurityDescriptorDacl (sd_ret, &acl_exists, &oacl, &dummy)
- && acl_exists && oacl)
- for (DWORD i = 0; i < oacl->AceCount; ++i)
- if (GetAce (oacl, i, (PVOID *) &ace))
- {
- cygpsid ace_sid ((PSID) &ace->SidStart);
-
- /* Check for related ACEs. */
- if (ace_sid == well_known_null_sid)
- continue;
- if ((ace_sid == cur_owner_sid)
- || (ace_sid == owner_sid)
- || (ace_sid == cur_group_sid)
- || (ace_sid == group_sid)
- || (ace_sid == well_known_world_sid))
- {
- if (ace->Header.AceFlags & SUB_CONTAINERS_AND_OBJECTS_INHERIT)
- ace->Header.AceFlags |= INHERIT_ONLY;
- else
- continue;
- }
- /*
- * Add unrelated ACCESS_DENIED_ACE to the beginning but
- * behind the owner_deny, ACCESS_ALLOWED_ACE to the end.
- * FIXME: this would break the order of the inherit_only ACEs
- */
- if (!AddAce (acl, ACL_REVISION,
- ace->Header.AceType == ACCESS_DENIED_ACE_TYPE?
- (owner_deny ? 1 : 0) : MAXDWORD,
- (LPVOID) ace, ace->Header.AceSize))
- {
- __seterrno ();
- return NULL;
- }
- acl_len += ace->Header.AceSize;
- }
-
- /* Construct appropriate inherit attribute for new directories */
- if (S_ISDIR (attribute) && !acl_exists)
- {
- const DWORD inherit = SUB_CONTAINERS_AND_OBJECTS_INHERIT | INHERIT_ONLY;
-
-#if 0 /* FIXME: Not done currently as this breaks the canonical order */
- /* Set deny ACE for owner. */
- if (owner_deny
- && !add_access_denied_ace (acl, ace_off++, owner_deny,
- well_known_creator_owner_sid, acl_len, inherit))
- return NULL;
- /* Set deny ACE for group here to respect the canonical order,
- if this does not impact owner */
- if (group_deny && !(group_deny & owner_allow)
- && !add_access_denied_ace (acl, ace_off++, group_deny,
- well_known_creator_group_sid, acl_len, inherit))
- return NULL;
-#endif
- /* Set allow ACE for owner. */
- if (!add_access_allowed_ace (acl, ace_off++, owner_allow,
- well_known_creator_owner_sid, acl_len, inherit))
- return NULL;
-#if 0 /* FIXME: Not done currently as this breaks the canonical order and
- won't be preserved on chown and chmod */
- /* Set deny ACE for group, conflicting with owner_allow. */
- if (group_deny & owner_allow
- && !add_access_denied_ace (acl, ace_off++, group_deny,
- well_known_creator_group_sid, acl_len, inherit))
- return NULL;
-#endif
- /* Set allow ACE for group. */
- if (!add_access_allowed_ace (acl, ace_off++, group_allow,
- well_known_creator_group_sid, acl_len, inherit))
- return NULL;
- /* Set allow ACE for everyone. */
- if (!add_access_allowed_ace (acl, ace_off++, other_allow,
- well_known_world_sid, acl_len, inherit))
- return NULL;
- }
-
- /* Set AclSize to computed value. */
- acl->AclSize = acl_len;
- debug_printf ("ACL-Size: %d", acl_len);
-
- /* Create DACL for local security descriptor. */
- if (!SetSecurityDescriptorDacl (&sd, TRUE, acl, FALSE))
- {
- __seterrno ();
- return NULL;
- }
-
- /* Make self relative security descriptor. */
- DWORD sd_size = 0;
- MakeSelfRelativeSD (&sd, sd_ret, &sd_size);
- if (sd_size <= 0)
- {
- __seterrno ();
- return NULL;
- }
- if (!sd_ret.malloc (sd_size))
- {
- set_errno (ENOMEM);
- return NULL;
- }
- if (!MakeSelfRelativeSD (&sd, sd_ret, &sd_size))
- {
- __seterrno ();
- return NULL;
- }
- debug_printf ("Created SD-Size: %u", sd_ret.size ());
-
- return sd_ret;
-}
-
-void
-set_security_attribute (path_conv &pc, int attribute, PSECURITY_ATTRIBUTES psa,
- security_descriptor &sd)
-{
- psa->lpSecurityDescriptor = sd.malloc (SECURITY_DESCRIPTOR_MIN_LENGTH);
- InitializeSecurityDescriptor ((PSECURITY_DESCRIPTOR)psa->lpSecurityDescriptor,
- SECURITY_DESCRIPTOR_REVISION);
- psa->lpSecurityDescriptor = alloc_sd (pc, geteuid32 (), getegid32 (),
- attribute, sd);
-}
-
-int
-set_file_attribute (HANDLE handle, path_conv &pc,
- __uid32_t uid, __gid32_t gid, int attribute)
-{
- int ret = -1;
-
- if (pc.has_acls ())
- {
- security_descriptor sd;
-
- if (!get_file_sd (handle, pc, sd)
- && alloc_sd (pc, uid, gid, attribute, sd))
- ret = set_file_sd (handle, pc, sd);
- }
- else
- ret = 0;
- syscall_printf ("%d = set_file_attribute (%S, %d, %d, %p)",
- ret, pc.get_nt_native_path (), uid, gid, attribute);
- return ret;
-}
-
-static int
-check_access (security_descriptor &sd, GENERIC_MAPPING &mapping,
- DWORD desired, int flags)
-{
- int ret = -1;
- BOOL status;
- DWORD granted;
- DWORD plen = sizeof (PRIVILEGE_SET) + 3 * sizeof (LUID_AND_ATTRIBUTES);
- PPRIVILEGE_SET pset = (PPRIVILEGE_SET) alloca (plen);
- HANDLE tok = cygheap->user.issetuid () ? cygheap->user.imp_token ()
- : hProcImpToken;
-
- if (!tok && !DuplicateTokenEx (hProcToken, MAXIMUM_ALLOWED, NULL,
- SecurityImpersonation, TokenImpersonation,
- &hProcImpToken))
-#ifdef DEBUGGING
- system_printf ("DuplicateTokenEx failed, %E");
-#else
- syscall_printf ("DuplicateTokenEx failed, %E");
-#endif
- else
- tok = hProcImpToken;
-
- if (!AccessCheck (sd, tok, desired, &mapping, pset, &plen, &granted, &status))
- __seterrno ();
- else if (!status)
- {
- /* CV, 2006-10-16: Now, that's really weird. Imagine a user who has no
- standard access to a file, but who has backup and restore privileges
- and these privileges are enabled in the access token. One would
- expect that the AccessCheck function takes this into consideration
- when returning the access status. Otherwise, why bother with the
- pset parameter, right?
- But not so. AccessCheck actually returns a status of "false" here,
- even though opening a file with backup resp. restore intent
- naturally succeeds for this user. This definitely spoils the results
- of access(2) for administrative users or the SYSTEM account. So, in
- case the access check fails, another check against the user's
- backup/restore privileges has to be made. Sigh. */
- int granted_flags = 0;
- if (flags & R_OK)
- {
- pset->PrivilegeCount = 1;
- pset->Control = 0;
- pset->Privilege[0].Luid.HighPart = 0L;
- pset->Privilege[0].Luid.LowPart = SE_BACKUP_PRIVILEGE;
- pset->Privilege[0].Attributes = 0;
- if (PrivilegeCheck (tok, pset, &status) && status)
- granted_flags |= R_OK;
- }
- if (flags & W_OK)
- {
- pset->PrivilegeCount = 1;
- pset->Control = 0;
- pset->Privilege[0].Luid.HighPart = 0L;
- pset->Privilege[0].Luid.LowPart = SE_RESTORE_PRIVILEGE;
- pset->Privilege[0].Attributes = 0;
- if (PrivilegeCheck (tok, pset, &status) && status)
- granted_flags |= W_OK;
- }
- if (granted_flags == flags)
- ret = 0;
- else
- set_errno (EACCES);
- }
- else
- ret = 0;
- return ret;
-}
-
-int
-check_file_access (path_conv &pc, int flags)
-{
- security_descriptor sd;
- int ret = -1;
- static GENERIC_MAPPING NO_COPY mapping = { FILE_GENERIC_READ,
- FILE_GENERIC_WRITE,
- FILE_GENERIC_EXECUTE,
- FILE_ALL_ACCESS };
- DWORD desired = 0;
- if (flags & R_OK)
- desired |= FILE_READ_DATA;
- if (flags & W_OK)
- desired |= FILE_WRITE_DATA;
- if (flags & X_OK)
- desired |= FILE_EXECUTE;
- if (!get_file_sd (NULL, pc, sd))
- ret = check_access (sd, mapping, desired, flags);
- debug_printf ("flags %x, ret %d", flags, ret);
- return ret;
-}
-
-int
-check_registry_access (HANDLE hdl, int flags)
-{
- security_descriptor sd;
- int ret = -1;
- static GENERIC_MAPPING NO_COPY mapping = { KEY_READ,
- KEY_WRITE,
- KEY_EXECUTE,
- KEY_ALL_ACCESS };
- DWORD desired = 0;
- if (flags & R_OK)
- desired |= KEY_ENUMERATE_SUB_KEYS;
- if (flags & W_OK)
- desired |= KEY_SET_VALUE;
- if (flags & X_OK)
- desired |= KEY_QUERY_VALUE;
- if (!get_reg_sd (hdl, sd))
- ret = check_access (sd, mapping, desired, flags);
- /* As long as we can't write the registry... */
- if (flags & W_OK)
- {
- set_errno (EROFS);
- ret = -1;
- }
- debug_printf ("flags %x, ret %d", flags, ret);
- return ret;
-}
diff --git a/winsup/cygwin/security.h b/winsup/cygwin/security.h
deleted file mode 100644
index 0f194ba..0000000
--- a/winsup/cygwin/security.h
+++ /dev/null
@@ -1,455 +0,0 @@
-/* security.h: security declarations
-
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 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 _SECURITY_H
-#define _SECURITY_H
-
-#include <accctrl.h>
-
-#define DEFAULT_UID DOMAIN_USER_RID_ADMIN
-#define UNKNOWN_UID 400 /* Non conflicting number */
-#define UNKNOWN_GID 401
-
-#define MAX_SID_LEN 40
-#define MAX_DACL_LEN(n) (sizeof (ACL) \
- + (n) * (sizeof (ACCESS_ALLOWED_ACE) - sizeof (DWORD) + MAX_SID_LEN))
-#define SD_MIN_SIZE (sizeof (SECURITY_DESCRIPTOR) + MAX_DACL_LEN (1))
-#define ACL_DEFAULT_SIZE 3072
-#define NO_SID ((PSID)NULL)
-
-#ifndef SE_CREATE_TOKEN_PRIVILEGE
-#define SE_CREATE_TOKEN_PRIVILEGE 2UL
-#define SE_ASSIGNPRIMARYTOKEN_PRIVILEGE 3UL
-#define SE_LOCK_MEMORY_PRIVILEGE 4UL
-#define SE_INCREASE_QUOTA_PRIVILEGE 5UL
-#define SE_MACHINE_ACCOUNT_PRIVILEGE 6UL
-#define SE_TCB_PRIVILEGE 7UL
-#define SE_SECURITY_PRIVILEGE 8UL
-#define SE_TAKE_OWNERSHIP_PRIVILEGE 9UL
-#define SE_LOAD_DRIVER_PRIVILEGE 10UL
-#define SE_SYSTEM_PROFILE_PRIVILEGE 11UL
-#define SE_SYSTEMTIME_PRIVILEGE 12UL
-#define SE_PROF_SINGLE_PROCESS_PRIVILEGE 13UL
-#define SE_INC_BASE_PRIORITY_PRIVILEGE 14UL
-#define SE_CREATE_PAGEFILE_PRIVILEGE 15UL
-#define SE_CREATE_PERMANENT_PRIVILEGE 16UL
-#define SE_BACKUP_PRIVILEGE 17UL
-#define SE_RESTORE_PRIVILEGE 18UL
-#define SE_SHUTDOWN_PRIVILEGE 19UL
-#define SE_DEBUG_PRIVILEGE 20UL
-#define SE_AUDIT_PRIVILEGE 21UL
-#define SE_SYSTEM_ENVIRONMENT_PRIVILEGE 22UL
-#define SE_CHANGE_NOTIFY_PRIVILEGE 23UL
-#define SE_REMOTE_SHUTDOWN_PRIVILEGE 24UL
-/* Starting with Windows 2000 */
-#define SE_UNDOCK_PRIVILEGE 25UL
-#define SE_SYNC_AGENT_PRIVILEGE 26UL
-#define SE_ENABLE_DELEGATION_PRIVILEGE 27UL
-#define SE_MANAGE_VOLUME_PRIVILEGE 28UL
-/* Starting with Windows 2000 SP4, XP SP2, 2003 Server */
-#define SE_IMPERSONATE_PRIVILEGE 29UL
-#define SE_CREATE_GLOBAL_PRIVILEGE 30UL
-/* Starting with Vista */
-#define SE_TRUSTED_CREDMAN_ACCESS_PRIVILEGE 31UL
-#define SE_RELABEL_PRIVILEGE 32UL
-#define SE_INCREASE_WORKING_SET_PRIVILEGE 33UL
-#define SE_TIME_ZONE_PRIVILEGE 34UL
-#define SE_CREATE_SYMBOLIC_LINK_PRIVILEGE 35UL
-
-#define SE_MAX_WELL_KNOWN_PRIVILEGE SE_CREATE_SYMBOLIC_LINK_PRIVILEGE
-
-#endif /* ! SE_CREATE_TOKEN_PRIVILEGE */
-
-/* Added for debugging purposes. */
-typedef struct {
- BYTE Revision;
- BYTE SubAuthorityCount;
- SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
- DWORD SubAuthority[8];
-} DBGSID, *PDBGSID;
-
-/* Macro to define variable length SID structures */
-#define MKSID(name, comment, authority, count, rid...) \
-static NO_COPY struct { \
- BYTE Revision; \
- BYTE SubAuthorityCount; \
- SID_IDENTIFIER_AUTHORITY IdentifierAuthority; \
- DWORD SubAuthority[count]; \
-} name##_struct = { SID_REVISION, count, {authority}, {rid}}; \
-cygpsid NO_COPY name = (PSID) &name##_struct;
-
-#define FILE_READ_BITS (FILE_READ_DATA | GENERIC_READ | GENERIC_ALL)
-#define FILE_WRITE_BITS (FILE_WRITE_DATA | GENERIC_WRITE | GENERIC_ALL)
-#define FILE_EXEC_BITS (FILE_EXECUTE | GENERIC_EXECUTE | GENERIC_ALL)
-
-class cygpsid {
-protected:
- PSID psid;
-public:
- cygpsid () {}
- cygpsid (PSID nsid) { psid = nsid; }
- operator PSID () const { return psid; }
- const PSID operator= (PSID nsid) { return psid = nsid;}
- __uid32_t get_id (BOOL search_grp, int *type = NULL);
- int get_uid () { return get_id (FALSE); }
- int get_gid () { return get_id (TRUE); }
-
- PWCHAR string (PWCHAR nsidstr) const;
- char *string (char *nsidstr) const;
-
- bool operator== (const PSID nsid) const
- {
- if (!psid || !nsid)
- return nsid == psid;
- return EqualSid (psid, nsid);
- }
- bool operator!= (const PSID nsid) const
- { return !(*this == nsid); }
- bool operator== (const char *nsidstr) const;
- bool operator!= (const char *nsidstr) const
- { return !(*this == nsidstr); }
-
- void debug_print (const char *prefix = NULL) const
- {
- char buf[256] __attribute__ ((unused));
- debug_printf ("%s %s", prefix ?: "", string (buf) ?: "NULL");
- }
-};
-
-class cygsid : public cygpsid {
- char sbuf[MAX_SID_LEN];
- bool well_known_sid;
-
- const PSID getfromstr (const char *nsidstr, bool well_known);
- PSID get_sid (DWORD s, DWORD cnt, DWORD *r, bool well_known);
-
- inline const PSID assign (const PSID nsid, bool well_known)
- {
- if (!nsid)
- psid = NO_SID;
- else
- {
- psid = (PSID) sbuf;
- CopySid (MAX_SID_LEN, psid, nsid);
- well_known_sid = well_known;
- }
- return psid;
- }
-
-public:
- inline operator const PSID () { return psid; }
- inline bool is_well_known_sid () { return well_known_sid; }
-
- /* Both, = and *= are assignment operators. = creates a "normal" SID,
- *= marks the SID as being a well-known SID. This difference is
- important when creating a SID list for LSA authentication. */
- inline const PSID operator= (cygsid &nsid)
- { return assign (nsid, nsid.well_known_sid); }
- inline const PSID operator= (const PSID nsid)
- { return assign (nsid, false); }
- inline const PSID operator= (const char *nsidstr)
- { return getfromstr (nsidstr, false); }
- inline const PSID operator*= (cygsid &nsid)
- { return assign (nsid, true); }
- inline const PSID operator*= (const PSID nsid)
- { return assign (nsid, true); }
- inline const PSID operator*= (const char *nsidstr)
- { return getfromstr (nsidstr, true); }
-
- inline cygsid () : cygpsid ((PSID) sbuf), well_known_sid (false) {}
- inline cygsid (const PSID nsid) { *this = nsid; }
- inline cygsid (const char *nstrsid) { *this = nstrsid; }
-
- inline PSID set () { return psid = (PSID) sbuf; }
-
- BOOL getfrompw (const struct passwd *pw);
- BOOL getfromgr (const struct __group32 *gr);
-
- void debug_print (const char *prefix = NULL) const
- {
- char buf[256] __attribute__ ((unused));
- debug_printf ("%s %s%s", prefix ?: "", string (buf) ?: "NULL", well_known_sid ? " (*)" : " (+)");
- }
-};
-
-typedef enum { cygsidlist_empty, cygsidlist_alloc, cygsidlist_auto } cygsidlist_type;
-class cygsidlist {
- int maxcnt;
- int cnt;
-
- BOOL add (const PSID nsi, bool well_known); /* Only with auto for now */
-
-public:
- cygsid *sids;
- cygsidlist_type type;
-
- cygsidlist (cygsidlist_type t, int m)
- : maxcnt (m), cnt (0), type (t)
- {
- if (t == cygsidlist_alloc)
- sids = alloc_sids (m);
- else
- sids = new cygsid [m];
- }
- ~cygsidlist () { if (type == cygsidlist_auto) delete [] sids; }
-
- BOOL addfromgr (struct __group32 *gr) /* Only with alloc */
- { return sids[cnt].getfromgr (gr) && ++cnt; }
-
- /* += adds a "normal" SID, *= adds a well-known SID. See comment in class
- cygsid above. */
- BOOL operator+= (cygsid &si) { return add ((PSID) si, false); }
- BOOL operator+= (const char *sidstr) { cygsid nsi (sidstr);
- return add ((PSID) nsi, false); }
- BOOL operator+= (const PSID psid) { return add (psid, false); }
- BOOL operator*= (cygsid &si) { return add ((PSID) si, true); }
- BOOL operator*= (const char *sidstr) { cygsid nsi (sidstr);
- return add ((PSID) nsi, true); }
- BOOL operator*= (const PSID psid) { return add (psid, true); }
-
- void count (int ncnt)
- { cnt = ncnt; }
- int count () const { return cnt; }
- int non_well_known_count () const
- {
- int wcnt = 0;
- for (int i = 0; i < cnt; ++i)
- if (!sids[i].is_well_known_sid ())
- ++wcnt;
- return wcnt;
- }
-
- int position (const PSID sid) const
- {
- for (int i = 0; i < cnt; ++i)
- if (sids[i] == sid)
- return i;
- return -1;
- }
-
- int next_non_well_known_sid (int idx)
- {
- while (++idx < cnt)
- if (!sids[idx].is_well_known_sid ())
- return idx;
- return -1;
- }
- BOOL contains (const PSID sid) const { return position (sid) >= 0; }
- cygsid *alloc_sids (int n);
- void free_sids ();
- void debug_print (const char *prefix = NULL) const
- {
- debug_printf ("-- begin sidlist ---");
- if (!cnt)
- debug_printf ("No elements");
- for (int i = 0; i < cnt; ++i)
- sids[i].debug_print (prefix);
- debug_printf ("-- ende sidlist ---");
- }
-};
-
-/* Wrapper class to allow simple deleting of buffer space allocated
- by read_sd() */
-class security_descriptor {
-protected:
- PSECURITY_DESCRIPTOR psd;
- DWORD sd_size;
-public:
- security_descriptor () : psd (NULL), sd_size (0) {}
- ~security_descriptor () { free (); }
-
- PSECURITY_DESCRIPTOR malloc (size_t nsize);
- PSECURITY_DESCRIPTOR realloc (size_t nsize);
- void free ();
-
- inline DWORD size () const { return sd_size; }
- inline DWORD copy (void *buf, DWORD buf_size) const {
- if (buf_size < size ())
- return sd_size;
- memcpy (buf, psd, sd_size);
- return 0;
- }
- inline operator const PSECURITY_DESCRIPTOR () { return psd; }
- inline operator PSECURITY_DESCRIPTOR *() { return &psd; }
-};
-
-class user_groups {
-public:
- cygsid pgsid;
- cygsidlist sgsids;
- BOOL ischanged;
-
- BOOL issetgroups () const { return (sgsids.type == cygsidlist_alloc); }
- void update_supp (const cygsidlist &newsids)
- {
- sgsids.free_sids ();
- sgsids = newsids;
- ischanged = TRUE;
- }
- void clear_supp ()
- {
- if (issetgroups ())
- {
- sgsids.free_sids ();
- ischanged = TRUE;
- }
- }
- void update_pgrp (const PSID sid)
- {
- pgsid = sid;
- ischanged = TRUE;
- }
-};
-
-extern cygpsid well_known_null_sid;
-extern cygpsid well_known_world_sid;
-extern cygpsid well_known_local_sid;
-extern cygpsid well_known_creator_owner_sid;
-extern cygpsid well_known_creator_group_sid;
-extern cygpsid well_known_dialup_sid;
-extern cygpsid well_known_network_sid;
-extern cygpsid well_known_batch_sid;
-extern cygpsid well_known_interactive_sid;
-extern cygpsid well_known_service_sid;
-extern cygpsid well_known_authenticated_users_sid;
-extern cygpsid well_known_this_org_sid;
-extern cygpsid well_known_system_sid;
-extern cygpsid well_known_admins_sid;
-extern cygpsid fake_logon_sid;
-extern cygpsid mandatory_medium_integrity_sid;
-extern cygpsid mandatory_high_integrity_sid;
-extern cygpsid mandatory_system_integrity_sid;
-
-bool privilege_luid (const PWCHAR pname, LUID *luid);
-
-inline BOOL
-legal_sid_type (SID_NAME_USE type)
-{
- return type == SidTypeUser || type == SidTypeGroup
- || type == SidTypeAlias || type == SidTypeWellKnownGroup;
-}
-
-/* File manipulation */
-int __stdcall get_file_attribute (HANDLE, path_conv &, mode_t *,
- __uid32_t *, __gid32_t *);
-int __stdcall set_file_attribute (HANDLE, path_conv &,
- __uid32_t, __gid32_t, int);
-int __stdcall get_reg_attribute (HKEY hkey, mode_t *, __uid32_t *, __gid32_t *);
-LONG __stdcall get_file_sd (HANDLE fh, path_conv &, security_descriptor &sd);
-LONG __stdcall set_file_sd (HANDLE fh, path_conv &, security_descriptor &sd);
-bool __stdcall add_access_allowed_ace (PACL acl, int offset, DWORD attributes, PSID sid, size_t &len_add, DWORD inherit);
-bool __stdcall add_access_denied_ace (PACL acl, int offset, DWORD attributes, PSID sid, size_t &len_add, DWORD inherit);
-int __stdcall check_file_access (path_conv &, int);
-int __stdcall check_registry_access (HANDLE, int);
-
-void set_security_attribute (path_conv &pc, int attribute,
- PSECURITY_ATTRIBUTES psa,
- security_descriptor &sd_buf);
-
-bool get_sids_info (cygpsid, cygpsid, __uid32_t * , __gid32_t *);
-
-/* sec_acl.cc */
-struct __acl32;
-extern "C" int aclsort32 (int, int, __acl32 *);
-extern "C" int acl32 (const char *, int, int, __acl32 *);
-int getacl (HANDLE, path_conv &, int, __acl32 *);
-int setacl (HANDLE, path_conv &, int, __acl32 *, bool &);
-
-struct _UNICODE_STRING;
-void __stdcall str2buf2uni (_UNICODE_STRING &, WCHAR *, const char *) __attribute__ ((regparm (3)));
-void __stdcall str2uni_cat (_UNICODE_STRING &, const char *) __attribute__ ((regparm (2)));
-
-/* Function creating a token by calling NtCreateToken. */
-HANDLE create_token (cygsid &usersid, user_groups &groups, struct passwd * pw);
-/* LSA authentication function. */
-HANDLE lsaauth (cygsid &, user_groups &, struct passwd *);
-/* LSA private key storage authentication, same as when using service logons. */
-HANDLE lsaprivkeyauth (struct passwd *pw);
-/* Verify an existing token */
-bool verify_token (HANDLE token, cygsid &usersid, user_groups &groups, bool *pintern = NULL);
-/* Get groups of a user */
-bool get_server_groups (cygsidlist &grp_list, PSID usersid, struct passwd *pw);
-
-/* Extract U-domain\user field from passwd entry. */
-void extract_nt_dom_user (const struct passwd *pw, PWCHAR domain, PWCHAR user);
-/* Get default logonserver for a domain. */
-bool get_logon_server (PWCHAR domain, PWCHAR wserver, bool rediscovery);
-
-HANDLE open_local_policy (ACCESS_MASK access);
-
-/* sec_helper.cc: Security helper functions. */
-int set_privilege (HANDLE token, DWORD privilege, bool enable);
-void set_cygwin_privileges (HANDLE token);
-
-#define _push_thread_privilege(_priv, _val, _check) { \
- HANDLE _dup_token = NULL; \
- HANDLE _token = (cygheap->user.issetuid () && (_check)) \
- ? cygheap->user.primary_token () : hProcToken; \
- if (!DuplicateTokenEx (_token, MAXIMUM_ALLOWED, NULL, \
- SecurityImpersonation, TokenImpersonation, \
- &_dup_token)) \
- debug_printf ("DuplicateTokenEx: %E"); \
- else if (!ImpersonateLoggedOnUser (_dup_token)) \
- debug_printf ("ImpersonateLoggedOnUser: %E"); \
- else \
- set_privilege (_dup_token, (_priv), (_val));
-
-#define push_thread_privilege(_priv, _val) _push_thread_privilege(_priv,_val,1)
-#define push_self_privilege(_priv, _val) _push_thread_privilege(_priv,_val,0)
-
-#define pop_thread_privilege() \
- if (_dup_token) \
- { \
- if (!cygheap->user.issetuid ()) \
- RevertToSelf (); \
- else \
- cygheap->user.reimpersonate (); \
- CloseHandle (_dup_token); \
- } \
- }
-
-#define pop_self_privilege() pop_thread_privilege()
-
-/* shared.cc: */
-/* Retrieve a security descriptor that allows all access */
-SECURITY_DESCRIPTOR *__stdcall get_null_sd ();
-
-/* Various types of security attributes for use in Create* functions. */
-extern SECURITY_ATTRIBUTES sec_none, sec_none_nih, sec_all, sec_all_nih;
-extern SECURITY_ATTRIBUTES *__stdcall __sec_user (PVOID sa_buf, PSID sid1, PSID sid2,
- DWORD access2, BOOL inherit)
- __attribute__ ((regparm (3)));
-extern PSECURITY_DESCRIPTOR _everyone_sd (void *buf, ACCESS_MASK access);
-#define everyone_sd(access) (_everyone_sd (alloca (SD_MIN_SIZE), (access)))
-
-extern bool sec_acl (PACL acl, bool original, bool admins, PSID sid1 = NO_SID,
- PSID sid2 = NO_SID, DWORD access2 = 0);
-
-ssize_t __stdcall read_ea (HANDLE hdl, path_conv &pc, const char *name,
- char *value, size_t size);
-int __stdcall write_ea (HANDLE hdl, path_conv &pc, const char *name,
- const char *value, size_t size, int flags);
-
-/* Note: sid1 is usually (read: currently always) the current user's
- effective sid (cygheap->user.sid ()). */
-extern inline SECURITY_ATTRIBUTES *
-sec_user_nih (SECURITY_ATTRIBUTES *sa_buf, PSID sid1, PSID sid2 = NULL,
- DWORD access2 = 0)
-{
- return __sec_user (sa_buf, sid1, sid2, access2, FALSE);
-}
-
-extern inline SECURITY_ATTRIBUTES *
-sec_user (SECURITY_ATTRIBUTES *sa_buf, PSID sid1, PSID sid2 = NULL,
- DWORD access2 = 0)
-{
- return __sec_user (sa_buf, sid1, sid2, access2, TRUE);
-}
-#endif /*_SECURITY_H*/
diff --git a/winsup/cygwin/security.sgml b/winsup/cygwin/security.sgml
deleted file mode 100644
index b286ef5..0000000
--- a/winsup/cygwin/security.sgml
+++ /dev/null
@@ -1,45 +0,0 @@
-<sect1 id="func-cygwin-logon_user">
-<title>cygwin_logon_user</title>
-
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" HANDLE
-<function>cygwin_logon_user</function></funcdef>
-<paramdef>const struct passwd *<parameter>passwd_entry</parameter></paramdef>
-<paramdef>const char *<parameter>password</parameter></paramdef>
-</funcprototype></funcsynopsis>
-
-<para>Given a pointer ot a passwd entry of a user and a cleartext password,
-returns a HANDLE to an impersonation token for this user which can be used
-in a subsequent call to <function>cygwin_set_impersonation_token</function>
-to impersonate that user. This function can only be called from a process
-which has the required NT user rights to perform a logon.</para>
-
-<para>See also the chapter "New setuid concept" in the Cygwin user's guide.
-</para>
-
-<para>See also <link linkend="func-cygwin-set-impersonation-token">cygwin_set_impersonation_token</link></para>
-
-</sect1>
-
-<sect1 id="func-cygwin-set-impersonation-token">
-<title>cygwin_set_impersonation_token</title>
-
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" void
-<function>cygwin_set_impersonation_token</function></funcdef>
-<paramdef>const HANDLE <parameter>token</parameter></paramdef>
-</funcprototype></funcsynopsis>
-
-<para>Use this function to enable the token given as parameter as
-impersonation token for the next call to <function>setuid</function> or
-<function>seteuid</function>. Use
-<function>cygwin_set_impersonation_token</function> together with
-<function>cygwin_logon_user</function> to impersonate users using
-password authentication.</para>
-
-<para>See also the chapter "New setuid concept" in the Cygwin user's guide.
-</para>
-
-<para>See also <link linkend="func-cygwin-logon_user">cygwin_logon_user</link></para>
-
-</sect1>
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
deleted file mode 100644
index eceeeaf..0000000
--- a/winsup/cygwin/select.cc
+++ /dev/null
@@ -1,1606 +0,0 @@
-/* select.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* The following line means that the BSD socket definitions for
- fd_set, FD_ISSET etc. are used in this file. */
-
-#define __INSIDE_CYGWIN_NET__
-
-#include "winsup.h"
-#include <stdlib.h>
-#include "ntdll.h"
-
-#include <wingdi.h>
-#include <winuser.h>
-#include <netdb.h>
-#define USE_SYS_TYPES_FD_SET
-#include <winsock.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "pinfo.h"
-#include "sigproc.h"
-#include "cygtls.h"
-
-/*
- * All these defines below should be in sys/types.h
- * but because of the includes above, they may not have
- * been included. We create special UNIX_xxxx versions here.
- */
-
-#ifndef NBBY
-#define NBBY 8 /* number of bits in a byte */
-#endif /* NBBY */
-
-/*
- * Select uses bit masks of file descriptors in longs.
- * These macros manipulate such bit fields (the filesystem macros use chars).
- * FD_SETSIZE may be defined by the user, but the default here
- * should be >= NOFILE (param.h).
- */
-
-typedef long fd_mask;
-#define UNIX_NFDBITS (sizeof (fd_mask) * NBBY) /* bits per mask */
-#ifndef unix_howmany
-#define unix_howmany(x,y) (((x)+((y)-1))/(y))
-#endif
-
-#define unix_fd_set fd_set
-
-#define NULL_fd_set ((fd_set *) NULL)
-#define sizeof_fd_set(n) \
- ((unsigned) (NULL_fd_set->fds_bits + unix_howmany ((n), UNIX_NFDBITS)))
-#define UNIX_FD_SET(n, p) \
- ((p)->fds_bits[(n)/UNIX_NFDBITS] |= (1L << ((n) % UNIX_NFDBITS)))
-#define UNIX_FD_CLR(n, p) \
- ((p)->fds_bits[(n)/UNIX_NFDBITS] &= ~(1L << ((n) % UNIX_NFDBITS)))
-#define UNIX_FD_ISSET(n, p) \
- ((p)->fds_bits[(n)/UNIX_NFDBITS] & (1L << ((n) % UNIX_NFDBITS)))
-#define UNIX_FD_ZERO(p, n) \
- bzero ((caddr_t)(p), sizeof_fd_set ((n)))
-
-#define allocfd_set(n) ((fd_set *) memset (alloca (sizeof_fd_set (n)), 0, sizeof_fd_set (n)))
-#define copyfd_set(to, from, n) memcpy (to, from, sizeof_fd_set (n));
-
-#define set_handle_or_return_if_not_open(h, s) \
- h = (s)->fh->get_handle (); \
- if (cygheap->fdtab.not_open ((s)->fd)) \
- { \
- (s)->thread_errno = EBADF; \
- return -1; \
- } \
-
-/* The main select code.
- */
-extern "C" int
-cygwin_select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
- struct timeval *to)
-{
- select_stuff sel;
- fd_set *dummy_readfds = allocfd_set (maxfds);
- fd_set *dummy_writefds = allocfd_set (maxfds);
- fd_set *dummy_exceptfds = allocfd_set (maxfds);
-
- select_printf ("%d, %p, %p, %p, %p", maxfds, readfds, writefds, exceptfds, to);
-
- if (!readfds)
- readfds = dummy_readfds;
- if (!writefds)
- writefds = dummy_writefds;
- if (!exceptfds)
- exceptfds = dummy_exceptfds;
-
- for (int i = 0; i < maxfds; i++)
- if (!sel.test_and_set (i, readfds, writefds, exceptfds))
- {
- select_printf ("aborting due to test_and_set error");
- return -1; /* Invalid fd, maybe? */
- }
-
- /* Convert to milliseconds or INFINITE if to == NULL */
- DWORD ms = to ? (to->tv_sec * 1000) + (to->tv_usec / 1000) : INFINITE;
- if (ms == 0 && to->tv_usec)
- ms = 1; /* At least 1 ms granularity */
-
- if (to)
- select_printf ("to->tv_sec %d, to->tv_usec %d, ms %d", to->tv_sec, to->tv_usec, ms);
- else
- select_printf ("to NULL, ms %x", ms);
-
- select_printf ("sel.always_ready %d", sel.always_ready);
-
- int timeout = 0;
- /* Allocate some fd_set structures using the number of fds as a guide. */
- fd_set *r = allocfd_set (maxfds);
- fd_set *w = allocfd_set (maxfds);
- fd_set *e = allocfd_set (maxfds);
-
- /* Degenerate case. No fds to wait for. Just wait. */
- if (sel.start.next == NULL)
- {
- if (WaitForSingleObject (signal_arrived, ms) == WAIT_OBJECT_0)
- {
- select_printf ("signal received");
- set_sig_errno (EINTR);
- return -1;
- }
- timeout = 1;
- }
- else if (sel.always_ready || ms == 0)
- /* Don't bother waiting. */;
- else if ((timeout = sel.wait (r, w, e, ms) < 0))
- return -1; /* some kind of error */
-
- sel.cleanup ();
- copyfd_set (readfds, r, maxfds);
- copyfd_set (writefds, w, maxfds);
- copyfd_set (exceptfds, e, maxfds);
- return timeout ? 0 : sel.poll (readfds, writefds, exceptfds);
-}
-
-extern "C" int
-pselect(int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
- const struct timespec *ts, const sigset_t *set)
-{
- struct timeval tv;
- sigset_t oldset = _my_tls.sigmask;
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (ts)
- {
- tv.tv_sec = ts->tv_sec;
- tv.tv_usec = ts->tv_nsec / 1000;
- }
- if (set)
- set_signal_mask (*set, _my_tls.sigmask);
- int ret = cygwin_select (maxfds, readfds, writefds, exceptfds,
- ts ? &tv : NULL);
- if (set)
- set_signal_mask (oldset, _my_tls.sigmask);
- return ret;
-}
-
-/* Call cleanup functions for all inspected fds. Gets rid of any
- executing threads. */
-void
-select_stuff::cleanup ()
-{
- select_record *s = &start;
-
- select_printf ("calling cleanup routines");
- while ((s = s->next))
- if (s->cleanup)
- {
- s->cleanup (s, this);
- s->cleanup = NULL;
- }
-}
-
-/* Destroy all storage associated with select stuff. */
-select_stuff::~select_stuff ()
-{
- cleanup ();
- select_record *s = &start;
- select_record *snext = start.next;
-
- select_printf ("deleting select records");
- while ((s = snext))
- {
- snext = s->next;
- delete s;
- }
-}
-
-/* Add a record to the select chain */
-int
-select_stuff::test_and_set (int i, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds)
-{
- select_record *s = NULL;
- if (UNIX_FD_ISSET (i, readfds) && (s = cygheap->fdtab.select_read (i, s)) == NULL)
- return 0; /* error */
- if (UNIX_FD_ISSET (i, writefds) && (s = cygheap->fdtab.select_write (i, s)) == NULL)
- return 0; /* error */
- if (UNIX_FD_ISSET (i, exceptfds) && (s = cygheap->fdtab.select_except (i, s)) == NULL)
- return 0; /* error */
- if (s == NULL)
- return 1; /* nothing to do */
-
- if (s->read_ready || s->write_ready || s->except_ready)
- always_ready = true;
-
- if (s->windows_handle)
- windows_used = true;
-
- s->next = start.next;
- start.next = s;
- return 1;
-}
-
-/* The heart of select. Waits for an fd to do something interesting. */
-int
-select_stuff::wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
- DWORD ms)
-{
- int wait_ret;
- HANDLE w4[MAXIMUM_WAIT_OBJECTS];
- select_record *s = &start;
- int m = 0;
- int res = 0;
-
- w4[m++] = signal_arrived; /* Always wait for the arrival of a signal. */
- /* Loop through the select chain, starting up anything appropriate and
- counting the number of active fds. */
- while ((s = s->next))
- {
- if (m >= MAXIMUM_WAIT_OBJECTS)
- {
- set_sig_errno (EINVAL);
- return -1;
- }
- if (!s->startup (s, this))
- {
- s->set_select_errno ();
- return -1;
- }
- if (s->h == NULL)
- continue;
- for (int i = 1; i < m; i++)
- if (w4[i] == s->h)
- goto next_while;
- w4[m++] = s->h;
- next_while:
- continue;
- }
-
- LONGLONG start_time = gtod.msecs (); /* Record the current time for later use. */
-
- debug_printf ("m %d, ms %u", m, ms);
- for (;;)
- {
- if (!windows_used)
- wait_ret = WaitForMultipleObjects (m, w4, FALSE, ms);
- else
- wait_ret = MsgWaitForMultipleObjects (m, w4, FALSE, ms, QS_ALLINPUT);
-
- switch (wait_ret)
- {
- case WAIT_OBJECT_0:
- select_printf ("signal received");
- set_sig_errno (EINTR);
- return -1;
- case WAIT_FAILED:
- select_printf ("WaitForMultipleObjects failed");
- s->set_select_errno ();
- return -1;
- case WAIT_TIMEOUT:
- select_printf ("timed out");
- res = 1;
- goto out;
- }
-
- select_printf ("woke up. wait_ret %d. verifying", wait_ret);
- s = &start;
- bool gotone = false;
- /* Some types of objects (e.g., consoles) wake up on "inappropriate" events
- like mouse movements. The verify function will detect these situations.
- If it returns false, then this wakeup was a false alarm and we should go
- back to waiting. */
- while ((s = s->next))
- if (s->saw_error ())
- {
- set_errno (s->saw_error ());
- return -1; /* Somebody detected an error */
- }
- else if ((((wait_ret >= m && s->windows_handle) || s->h == w4[wait_ret])) &&
- s->verify (s, readfds, writefds, exceptfds))
- gotone = true;
-
- select_printf ("gotone %d", gotone);
- if (gotone)
- goto out;
-
- if (ms == INFINITE)
- {
- select_printf ("looping");
- continue;
- }
- select_printf ("recalculating ms");
-
- LONGLONG now = gtod.msecs ();
- if (now > (start_time + ms))
- {
- select_printf ("timed out after verification");
- goto out;
- }
- ms -= (now - start_time);
- start_time = now;
- select_printf ("ms now %u", ms);
- }
-
-out:
- select_printf ("returning %d", res);
- return res;
-}
-
-static int
-set_bits (select_record *me, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds)
-{
- int ready = 0;
- fhandler_socket *sock;
- select_printf ("me %p, testing fd %d (%s)", me, me->fd, me->fh->get_name ());
- if (me->read_selected && me->read_ready)
- {
- UNIX_FD_SET (me->fd, readfds);
- ready++;
- }
- if (me->write_selected && me->write_ready)
- {
- UNIX_FD_SET (me->fd, writefds);
- if (me->except_on_write && (sock = me->fh->is_socket ()))
- {
- /* Special AF_LOCAL handling. */
- if (!me->read_ready && sock->connect_state () == connect_pending
- && sock->af_local_connect ())
- {
- if (me->read_selected)
- UNIX_FD_SET (me->fd, readfds);
- sock->connect_state (connect_failed);
- }
- else
- sock->connect_state (connected);
- }
- ready++;
- }
- if (me->except_selected && me->except_ready)
- {
- UNIX_FD_SET (me->fd, exceptfds);
- ready++;
- }
- select_printf ("ready %d", ready);
- return ready;
-}
-
-/* Poll every fd in the select chain. Set appropriate fd in mask. */
-int
-select_stuff::poll (fd_set *readfds, fd_set *writefds, fd_set *exceptfds)
-{
- int n = 0;
- select_record *s = &start;
- while ((s = s->next))
- n += (!s->peek || s->peek (s, true)) ?
- set_bits (s, readfds, writefds, exceptfds) : 0;
- select_printf ("returning %d", n);
- return n;
-}
-
-static int
-verify_true (select_record *, fd_set *, fd_set *, fd_set *)
-{
- return 1;
-}
-
-static int
-verify_ok (select_record *me, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds)
-{
- return set_bits (me, readfds, writefds, exceptfds);
-}
-
-static int
-no_startup (select_record *, select_stuff *)
-{
- return 1;
-}
-
-static int
-no_verify (select_record *, fd_set *, fd_set *, fd_set *)
-{
- return 0;
-}
-
-static int
-peek_pipe (select_record *s, bool from_select)
-{
- int n = 0;
- int gotone = 0;
- fhandler_base *fh = s->fh;
-
- HANDLE h;
- set_handle_or_return_if_not_open (h, s);
-
- /* Don't perform complicated tests if we don't need to. */
- if (!s->read_selected && !s->except_selected)
- goto out;
-
- if (s->read_selected)
- {
- if (s->read_ready)
- {
- select_printf ("%s, already ready for read", fh->get_name ());
- gotone = 1;
- goto out;
- }
-
- switch (fh->get_major ())
- {
- case DEV_TTYM_MAJOR:
- if (((fhandler_pty_master *) fh)->need_nl)
- {
- gotone = s->read_ready = true;
- goto out;
- }
- break;
- default:
- if (fh->get_readahead_valid ())
- {
- select_printf ("readahead");
- gotone = s->read_ready = true;
- goto out;
- }
- }
-
- if (fh->bg_check (SIGTTIN) <= bg_eof)
- {
- gotone = s->read_ready = true;
- goto out;
- }
- }
-
- if (fh->get_device () == FH_PIPEW)
- select_printf ("%s, select for read/except on write end of pipe",
- fh->get_name ());
- else if (!PeekNamedPipe (h, NULL, 0, NULL, (DWORD *) &n, NULL))
- {
- select_printf ("%s, PeekNamedPipe failed, %E", fh->get_name ());
- n = -1;
- }
-
- if (n < 0)
- {
- select_printf ("%s, n %d", fh->get_name (), n);
- if (s->except_selected)
- gotone += s->except_ready = true;
- if (s->read_selected)
- gotone += s->read_ready = true;
- }
- if (n > 0 && s->read_selected)
- {
- select_printf ("%s, ready for read: avail %d", fh->get_name (), n);
- gotone += s->read_ready = true;
- }
- if (!gotone && s->fh->hit_eof ())
- {
- select_printf ("%s, saw EOF", fh->get_name ());
- if (s->except_selected)
- gotone += s->except_ready = true;
- if (s->read_selected)
- gotone += s->read_ready = true;
- }
-
-out:
- if (s->write_selected)
- {
- if (s->write_ready)
- {
- select_printf ("%s, already ready for write", fh->get_name ());
- gotone++;
- }
- /* Do we need to do anything about SIGTTOU here? */
- else if (fh->get_device () == FH_PIPER)
- select_printf ("%s, select for write on read end of pipe",
- fh->get_name ());
- else
- {
-#if 0
-/* FIXME: This code is not quite correct. There's no better solution
- so far but to make simple assumptions based on WriteQuotaAvailable. */
-
- IO_STATUS_BLOCK iosb = {0};
- FILE_PIPE_LOCAL_INFORMATION fpli = {0};
-
- if (NtQueryInformationFile (h,
- &iosb,
- &fpli,
- sizeof (fpli),
- FilePipeLocalInformation))
- {
- /* If NtQueryInformationFile fails, optimistically assume the
- pipe is writable. This could happen if we somehow
- inherit a pipe that doesn't permit FILE_READ_ATTRIBUTES
- access on the write end. */
- select_printf ("%s, NtQueryInformationFile failed",
- fh->get_name ());
- gotone += s->write_ready = true;
- }
- /* If there is anything available in the pipe buffer then signal
- that. This means that a pipe could still block since you could
- be trying to write more to the pipe than is available in the
- buffer but that is the hazard of select(). */
- else if ((fpli.WriteQuotaAvailable = (fpli.OutboundQuota - fpli.ReadDataAvailable)))
- {
- select_printf ("%s, ready for write: size %lu, avail %lu",
- fh->get_name (),
- fpli.OutboundQuota,
- fpli.WriteQuotaAvailable);
- gotone += s->write_ready = true;
- }
- /* If we somehow inherit a tiny pipe (size < PIPE_BUF), then consider
- the pipe writable only if it is completely empty, to minimize the
- probability that a subsequent write will block. */
- else if (fpli.OutboundQuota < PIPE_BUF &&
- fpli.WriteQuotaAvailable == fpli.OutboundQuota)
- {
- select_printf ("%s, tiny pipe: size %lu, avail %lu",
- fh->get_name (),
- fpli.OutboundQuota,
- fpli.WriteQuotaAvailable);
- gotone += s->write_ready = true;
- }
-#else
- gotone += s->write_ready = true;
-#endif
- }
- }
-
- return gotone;
-}
-
-static int start_thread_pipe (select_record *me, select_stuff *stuff);
-
-struct pipeinf
- {
- cygthread *thread;
- bool stop_thread_pipe;
- select_record *start;
- };
-
-static DWORD WINAPI
-thread_pipe (void *arg)
-{
- pipeinf *pi = (pipeinf *) arg;
- bool gotone = false;
- DWORD sleep_time = 0;
-
- for (;;)
- {
- select_record *s = pi->start;
- while ((s = s->next))
- if (s->startup == start_thread_pipe)
- {
- if (peek_pipe (s, true))
- gotone = true;
- if (pi->stop_thread_pipe)
- {
- select_printf ("stopping");
- goto out;
- }
- }
- /* Paranoid check */
- if (pi->stop_thread_pipe)
- {
- select_printf ("stopping from outer loop");
- break;
- }
- if (gotone)
- break;
- Sleep (sleep_time >> 3);
- if (sleep_time < 80)
- ++sleep_time;
- }
-out:
- return 0;
-}
-
-static int
-start_thread_pipe (select_record *me, select_stuff *stuff)
-{
- if (stuff->device_specific_pipe)
- {
- me->h = *((pipeinf *) stuff->device_specific_pipe)->thread;
- return 1;
- }
- pipeinf *pi = new pipeinf;
- pi->start = &stuff->start;
- pi->stop_thread_pipe = false;
- pi->thread = new cygthread (thread_pipe, 0, pi, "select_pipe");
- me->h = *pi->thread;
- if (!me->h)
- return 0;
- stuff->device_specific_pipe = (void *) pi;
- return 1;
-}
-
-static void
-pipe_cleanup (select_record *, select_stuff *stuff)
-{
- pipeinf *pi = (pipeinf *) stuff->device_specific_pipe;
- if (pi && pi->thread)
- {
- pi->stop_thread_pipe = true;
- pi->thread->detach ();
- delete pi;
- stuff->device_specific_pipe = NULL;
- }
-}
-
-int
-fhandler_pipe::ready_for_read (int fd, DWORD howlong)
-{
- int res;
- if (!howlong)
- res = fhandler_base::ready_for_read (fd, howlong);
- else
- res = 1;
- return res;
-}
-
-select_record *
-fhandler_pipe::select_read (select_record *s)
-{
- if (!s)
- s = new select_record;
- s->startup = start_thread_pipe;
- s->peek = peek_pipe;
- s->verify = verify_ok;
- s->cleanup = pipe_cleanup;
- s->read_selected = true;
- s->read_ready = false;
- return s;
-}
-
-select_record *
-fhandler_pipe::select_write (select_record *s)
-{
- if (!s)
- s = new select_record;
- s->startup = start_thread_pipe;
- s->peek = peek_pipe;
- s->verify = verify_ok;
- s->cleanup = pipe_cleanup;
- s->write_selected = true;
- s->write_ready = false;
- return s;
-}
-
-select_record *
-fhandler_pipe::select_except (select_record *s)
-{
- if (!s)
- s = new select_record;
- s->startup = start_thread_pipe;
- s->peek = peek_pipe;
- s->verify = verify_ok;
- s->cleanup = pipe_cleanup;
- s->except_selected = true;
- s->except_ready = false;
- return s;
-}
-
-static int
-peek_console (select_record *me, bool)
-{
- extern const char * get_nonascii_key (INPUT_RECORD& input_rec, char *);
- fhandler_console *fh = (fhandler_console *) me->fh;
-
- if (!me->read_selected)
- return me->write_ready;
-
- if (fh->get_readahead_valid ())
- {
- select_printf ("readahead");
- return me->read_ready = true;
- }
-
- if (me->read_ready)
- {
- select_printf ("already ready");
- return 1;
- }
-
- INPUT_RECORD irec;
- DWORD events_read;
- HANDLE h;
- char tmpbuf[17];
- set_handle_or_return_if_not_open (h, me);
-
- for (;;)
- if (fh->bg_check (SIGTTIN) <= bg_eof)
- return me->read_ready = true;
- else if (!PeekConsoleInput (h, &irec, 1, &events_read) || !events_read)
- break;
- else
- {
- if (irec.EventType == KEY_EVENT)
- {
- if (irec.Event.KeyEvent.bKeyDown
- && (irec.Event.KeyEvent.uChar.AsciiChar
- || get_nonascii_key (irec, tmpbuf)))
- return me->read_ready = true;
- }
- else
- {
- fh->send_winch_maybe ();
- if (irec.EventType == MOUSE_EVENT
- && fh->mouse_aware ()
- && (irec.Event.MouseEvent.dwEventFlags == 0
- || irec.Event.MouseEvent.dwEventFlags == DOUBLE_CLICK))
- return me->read_ready = true;
- }
-
- /* Read and discard the event */
- ReadConsoleInput (h, &irec, 1, &events_read);
- }
-
- return me->write_ready;
-}
-
-static int
-verify_console (select_record *me, fd_set *rfds, fd_set *wfds,
- fd_set *efds)
-{
- return peek_console (me, true);
-}
-
-
-select_record *
-fhandler_console::select_read (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = no_startup;
- s->verify = verify_console;
- set_cursor_maybe ();
- }
-
- s->peek = peek_console;
- s->h = get_handle ();
- s->read_selected = true;
- s->read_ready = false;
- return s;
-}
-
-select_record *
-fhandler_console::select_write (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = no_startup;
- s->verify = no_verify;
- set_cursor_maybe ();
- }
-
- s->peek = peek_console;
- s->write_selected = true;
- s->write_ready = true;
- return s;
-}
-
-select_record *
-fhandler_console::select_except (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = no_startup;
- s->verify = no_verify;
- set_cursor_maybe ();
- }
-
- s->peek = peek_console;
- s->except_selected = true;
- s->except_ready = false;
- return s;
-}
-
-select_record *
-fhandler_tty_common::select_read (select_record *s)
-{
- return ((fhandler_pipe *) this)->fhandler_pipe::select_read (s);
-}
-
-select_record *
-fhandler_tty_common::select_write (select_record *s)
-{
- return ((fhandler_pipe *) this)->fhandler_pipe::select_write (s);
-}
-
-select_record *
-fhandler_tty_common::select_except (select_record *s)
-{
- return ((fhandler_pipe *) this)->fhandler_pipe::select_except (s);
-}
-
-static int
-verify_tty_slave (select_record *me, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds)
-{
- if (WaitForSingleObject (me->h, 0) == WAIT_OBJECT_0)
- me->read_ready = true;
- return set_bits (me, readfds, writefds, exceptfds);
-}
-
-select_record *
-fhandler_tty_slave::select_read (select_record *s)
-{
- if (!s)
- s = new select_record;
- s->h = input_available_event;
- s->startup = no_startup;
- s->peek = peek_pipe;
- s->verify = verify_tty_slave;
- s->read_selected = true;
- s->read_ready = false;
- s->cleanup = NULL;
- return s;
-}
-
-select_record *
-fhandler_dev_null::select_read (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = no_startup;
- s->verify = no_verify;
- }
- s->h = get_handle ();
- s->read_selected = true;
- s->read_ready = true;
- return s;
-}
-
-select_record *
-fhandler_dev_null::select_write (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = no_startup;
- s->verify = no_verify;
- }
- s->h = get_handle ();
- s->write_selected = true;
- s->write_ready = true;
- return s;
-}
-
-select_record *
-fhandler_dev_null::select_except (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = no_startup;
- s->verify = no_verify;
- }
- s->h = get_handle ();
- s->except_selected = true;
- s->except_ready = false;
- return s;
-}
-
-static int start_thread_serial (select_record *me, select_stuff *stuff);
-
-struct serialinf
- {
- cygthread *thread;
- bool stop_thread_serial;
- select_record *start;
- };
-
-static int
-peek_serial (select_record *s, bool)
-{
- COMSTAT st;
-
- fhandler_serial *fh = (fhandler_serial *) s->fh;
-
- if (fh->get_readahead_valid () || fh->overlapped_armed < 0)
- return s->read_ready = true;
-
- select_printf ("fh->overlapped_armed %d", fh->overlapped_armed);
-
- HANDLE h;
- set_handle_or_return_if_not_open (h, s);
- int ready = 0;
-
- if ((s->read_selected && s->read_ready) || (s->write_selected && s->write_ready))
- {
- select_printf ("already ready");
- ready = 1;
- goto out;
- }
-
- SetCommMask (h, EV_RXCHAR);
-
- if (!fh->overlapped_armed)
- {
- COMSTAT st;
-
- ResetEvent (fh->io_status.hEvent);
-
- if (!ClearCommError (h, &fh->ev, &st))
- {
- debug_printf ("ClearCommError");
- goto err;
- }
- else if (st.cbInQue)
- return s->read_ready = true;
- else if (WaitCommEvent (h, &fh->ev, &fh->io_status))
- return s->read_ready = true;
- else if (GetLastError () == ERROR_IO_PENDING)
- fh->overlapped_armed = 1;
- else
- {
- debug_printf ("WaitCommEvent");
- goto err;
- }
- }
-
- HANDLE w4[2];
- DWORD to;
-
- w4[0] = fh->io_status.hEvent;
- w4[1] = signal_arrived;
- to = 10;
-
- switch (WaitForMultipleObjects (2, w4, FALSE, to))
- {
- case WAIT_OBJECT_0:
- if (!ClearCommError (h, &fh->ev, &st))
- {
- debug_printf ("ClearCommError");
- goto err;
- }
- else if (!st.cbInQue)
- Sleep (to);
- else
- {
- return s->read_ready = true;
- select_printf ("got something");
- }
- break;
- case WAIT_OBJECT_0 + 1:
- select_printf ("interrupt");
- set_sig_errno (EINTR);
- ready = -1;
- break;
- case WAIT_TIMEOUT:
- break;
- default:
- debug_printf ("WaitForMultipleObjects");
- goto err;
- }
-
-out:
- return ready;
-
-err:
- if (GetLastError () == ERROR_OPERATION_ABORTED)
- {
- select_printf ("operation aborted");
- return ready;
- }
-
- s->set_select_errno ();
- select_printf ("error %E");
- return -1;
-}
-
-static DWORD WINAPI
-thread_serial (void *arg)
-{
- serialinf *si = (serialinf *) arg;
- bool gotone = false;
-
- for (;;)
- {
- select_record *s = si->start;
- while ((s = s->next))
- if (s->startup == start_thread_serial)
- {
- if (peek_serial (s, true))
- gotone = true;
- }
- if (si->stop_thread_serial)
- {
- select_printf ("stopping");
- break;
- }
- if (gotone)
- break;
- }
-
- select_printf ("exiting");
- return 0;
-}
-
-static int
-start_thread_serial (select_record *me, select_stuff *stuff)
-{
- if (stuff->device_specific_serial)
- {
- me->h = *((serialinf *) stuff->device_specific_serial)->thread;
- return 1;
- }
- serialinf *si = new serialinf;
- si->start = &stuff->start;
- si->stop_thread_serial = false;
- si->thread = new cygthread (thread_serial, 0, si, "select_serial");
- me->h = *si->thread;
- stuff->device_specific_serial = (void *) si;
- return 1;
-}
-
-static void
-serial_cleanup (select_record *, select_stuff *stuff)
-{
- serialinf *si = (serialinf *) stuff->device_specific_serial;
- if (si && si->thread)
- {
- si->stop_thread_serial = true;
- si->thread->detach ();
- delete si;
- stuff->device_specific_serial = NULL;
- }
-}
-
-select_record *
-fhandler_serial::select_read (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = start_thread_serial;
- s->verify = verify_ok;
- s->cleanup = serial_cleanup;
- }
- s->peek = peek_serial;
- s->read_selected = true;
- s->read_ready = false;
- return s;
-}
-
-select_record *
-fhandler_serial::select_write (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = no_startup;
- s->verify = verify_ok;
- }
- s->peek = peek_serial;
- s->h = get_handle ();
- s->write_selected = true;
- s->write_ready = true;
- return s;
-}
-
-select_record *
-fhandler_serial::select_except (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = no_startup;
- s->verify = verify_ok;
- }
- s->h = NULL;
- s->peek = peek_serial;
- s->except_selected = false; // Can't do this
- s->except_ready = false;
- return s;
-}
-
-int
-fhandler_base::ready_for_read (int fd, DWORD howlong)
-{
- bool avail = false;
- select_record me (this);
- me.fd = fd;
- while (!avail)
- {
- select_read (&me);
- avail = me.read_ready ?: me.peek (&me, false);
-
- if (fd >= 0 && cygheap->fdtab.not_open (fd))
- {
- set_sig_errno (EBADF);
- avail = false;
- break;
- }
-
- if (howlong != INFINITE)
- {
- if (!avail)
- set_sig_errno (EAGAIN);
- break;
- }
-
- if (WaitForSingleObject (signal_arrived, avail ? 0 : 10) == WAIT_OBJECT_0)
- {
- debug_printf ("interrupted");
- set_sig_errno (EINTR);
- avail = false;
- break;
- }
- }
-
- select_printf ("read_ready %d, avail %d", me.read_ready, avail);
- return avail;
-}
-
-select_record *
-fhandler_base::select_read (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = no_startup;
- s->verify = verify_ok;
- }
- s->h = get_handle ();
- s->read_selected = true;
- s->read_ready = true;
- return s;
-}
-
-select_record *
-fhandler_base::select_write (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = no_startup;
- s->verify = verify_ok;
- }
- s->h = get_handle ();
- s->write_selected = true;
- s->write_ready = true;
- return s;
-}
-
-select_record *
-fhandler_base::select_except (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = no_startup;
- s->verify = verify_ok;
- }
- s->h = NULL;
- s->except_selected = true;
- s->except_ready = false;
- return s;
-}
-
-static int
-peek_socket (select_record *me, bool)
-{
- fhandler_socket *fh = (fhandler_socket *) me->fh;
- long events;
- /* Don't play with the settings again, unless having taken a deep look into
- Richard W. Stevens Network Programming book. Thank you. */
- long evt_mask = (me->read_selected ? (FD_READ | FD_ACCEPT | FD_CLOSE) : 0)
- | (me->write_selected ? (FD_WRITE | FD_CONNECT | FD_CLOSE) : 0)
- | (me->except_selected ? FD_OOB : 0);
- int ret = fh->evaluate_events (evt_mask, events, false);
- if (me->read_selected)
- me->read_ready |= ret || !!(events & (FD_READ | FD_ACCEPT | FD_CLOSE));
- if (me->write_selected)
- me->write_ready |= ret || !!(events & (FD_WRITE | FD_CONNECT | FD_CLOSE));
- if (me->except_selected)
- me->except_ready |= !!(events & FD_OOB);
-
- select_printf ("read_ready: %d, write_ready: %d, except_ready: %d",
- me->read_ready, me->write_ready, me->except_ready);
- return me->read_ready || me->write_ready || me->except_ready;
-}
-
-static int start_thread_socket (select_record *, select_stuff *);
-
-struct socketinf
- {
- cygthread *thread;
- int max_w4;
- int num_w4;
- LONG *ser_num;
- HANDLE *w4;
- select_record *start;
- };
-
-static DWORD WINAPI
-thread_socket (void *arg)
-{
- socketinf *si = (socketinf *) arg;
- DWORD timeout = 64 / (si->max_w4 / MAXIMUM_WAIT_OBJECTS);
- bool event = false;
-
- select_printf ("stuff_start %p", si->start);
- while (!event)
- {
- for (select_record *s = si->start; (s = s->next); )
- if (s->startup == start_thread_socket)
- if (peek_socket (s, false))
- event = true;
- if (!event)
- for (int i = 0; i < si->max_w4; i += MAXIMUM_WAIT_OBJECTS)
- switch (WaitForMultipleObjects (min (si->num_w4 - i,
- MAXIMUM_WAIT_OBJECTS),
- si->w4 + i, FALSE, timeout))
- {
- case WAIT_FAILED:
- goto out;
- case WAIT_OBJECT_0:
- if (!i) /* Socket event set. */
- goto out;
- break;
- case WAIT_TIMEOUT:
- default:
- break;
- }
- }
-out:
- select_printf ("leaving thread_socket");
- return 0;
-}
-
-static int
-start_thread_socket (select_record *me, select_stuff *stuff)
-{
- socketinf *si;
-
- if ((si = (socketinf *) stuff->device_specific_socket))
- {
- me->h = *si->thread;
- return 1;
- }
-
- si = new socketinf;
- si->ser_num = (LONG *) malloc (MAXIMUM_WAIT_OBJECTS * sizeof (LONG));
- si->w4 = (HANDLE *) malloc (MAXIMUM_WAIT_OBJECTS * sizeof (HANDLE));
- if (!si->ser_num || !si->w4)
- return 0;
- si->max_w4 = MAXIMUM_WAIT_OBJECTS;
- select_record *s = &stuff->start;
- if (_my_tls.locals.select_sockevt != INVALID_HANDLE_VALUE)
- si->w4[0] = _my_tls.locals.select_sockevt;
- else if (!(si->w4[0] = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL)))
- return 1;
- else
- _my_tls.locals.select_sockevt = si->w4[0];
- si->num_w4 = 1;
- while ((s = s->next))
- if (s->startup == start_thread_socket)
- {
- /* No event/socket should show up multiple times. Every socket
- is uniquely identified by its serial number in the global
- wsock_events record. */
- const LONG ser_num = ((fhandler_socket *) s->fh)->serial_number ();
- for (int i = 1; i < si->num_w4; ++i)
- if (si->ser_num[i] == ser_num)
- goto continue_outer_loop;
- if (si->num_w4 >= si->max_w4)
- {
- LONG *nser = (LONG *) realloc (si->ser_num,
- (si->max_w4 + MAXIMUM_WAIT_OBJECTS)
- * sizeof (LONG));
- if (!nser)
- return 0;
- si->ser_num = nser;
- HANDLE *nw4 = (HANDLE *) realloc (si->w4,
- (si->max_w4 + MAXIMUM_WAIT_OBJECTS)
- * sizeof (HANDLE));
- if (!nw4)
- return 0;
- si->w4 = nw4;
- si->max_w4 += MAXIMUM_WAIT_OBJECTS;
- }
- si->ser_num[si->num_w4] = ser_num;
- si->w4[si->num_w4++] = ((fhandler_socket *) s->fh)->wsock_event ();
- continue_outer_loop:
- ;
- }
- stuff->device_specific_socket = (void *) si;
- si->start = &stuff->start;
- select_printf ("stuff_start %p", &stuff->start);
- si->thread = new cygthread (thread_socket, 0, si, "select_socket");
- me->h = *si->thread;
- return 1;
-}
-
-void
-socket_cleanup (select_record *, select_stuff *stuff)
-{
- socketinf *si = (socketinf *) stuff->device_specific_socket;
- select_printf ("si %p si->thread %p", si, si ? si->thread : NULL);
- if (si && si->thread)
- {
- SetEvent (si->w4[0]);
- /* Wait for thread to go away */
- si->thread->detach ();
- ResetEvent (si->w4[0]);
- stuff->device_specific_socket = NULL;
- if (si->ser_num)
- free (si->ser_num);
- if (si->w4)
- free (si->w4);
- delete si;
- }
- select_printf ("returning");
-}
-
-select_record *
-fhandler_socket::select_read (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = start_thread_socket;
- s->verify = verify_true;
- s->cleanup = socket_cleanup;
- }
- s->peek = peek_socket;
- s->read_ready = saw_shutdown_read ();
- s->read_selected = true;
- return s;
-}
-
-select_record *
-fhandler_socket::select_write (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = start_thread_socket;
- s->verify = verify_true;
- s->cleanup = socket_cleanup;
- }
- s->peek = peek_socket;
- s->write_ready = saw_shutdown_write () || connect_state () == unconnected;
- s->write_selected = true;
- if (connect_state () != unconnected)
- {
- s->except_ready = saw_shutdown_write () || saw_shutdown_read ();
- s->except_on_write = true;
- }
- return s;
-}
-
-select_record *
-fhandler_socket::select_except (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = start_thread_socket;
- s->verify = verify_true;
- s->cleanup = socket_cleanup;
- }
- s->peek = peek_socket;
- /* FIXME: Is this right? Should these be used as criteria for except? */
- s->except_ready = saw_shutdown_write () || saw_shutdown_read ();
- s->except_selected = true;
- return s;
-}
-
-static int
-peek_windows (select_record *me, bool)
-{
- MSG m;
- HANDLE h;
- set_handle_or_return_if_not_open (h, me);
-
- if (me->read_selected && me->read_ready)
- return 1;
-
- if (PeekMessage (&m, (HWND) h, 0, 0, PM_NOREMOVE))
- {
- me->read_ready = true;
- select_printf ("window %d(%p) ready", me->fd, me->fh->get_handle ());
- return 1;
- }
-
- select_printf ("window %d(%p) not ready", me->fd, me->fh->get_handle ());
- return me->write_ready;
-}
-
-static int
-verify_windows (select_record *me, fd_set *rfds, fd_set *wfds,
- fd_set *efds)
-{
- return peek_windows (me, true);
-}
-
-select_record *
-fhandler_windows::select_read (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = no_startup;
- }
- s->verify = verify_windows;
- s->peek = peek_windows;
- s->read_selected = true;
- s->read_ready = false;
- s->h = get_handle ();
- s->windows_handle = true;
- return s;
-}
-
-select_record *
-fhandler_windows::select_write (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = no_startup;
- s->verify = verify_ok;
- }
- s->peek = peek_windows;
- s->h = get_handle ();
- s->write_selected = true;
- s->write_ready = true;
- s->windows_handle = true;
- return s;
-}
-
-select_record *
-fhandler_windows::select_except (select_record *s)
-{
- if (!s)
- {
- s = new select_record;
- s->startup = no_startup;
- s->verify = verify_ok;
- }
- s->peek = peek_windows;
- s->h = get_handle ();
- s->except_selected = true;
- s->except_ready = false;
- s->windows_handle = true;
- return s;
-}
-
-static int
-peek_mailslot (select_record *me, bool)
-{
- HANDLE h;
- set_handle_or_return_if_not_open (h, me);
-
- if (me->read_selected && me->read_ready)
- return 1;
- DWORD msgcnt = 0;
- if (!GetMailslotInfo (h, NULL, NULL, &msgcnt, NULL))
- {
- select_printf ("mailslot %d(%p) error %E", me->fd, h);
- return 1;
- }
- if (msgcnt > 0)
- {
- me->read_ready = true;
- select_printf ("mailslot %d(%p) ready", me->fd, h);
- return 1;
- }
- select_printf ("mailslot %d(%p) not ready", me->fd, h);
- return 0;
-}
-
-static int
-verify_mailslot (select_record *me, fd_set *rfds, fd_set *wfds,
- fd_set *efds)
-{
- return peek_mailslot (me, true);
-}
-
-static int start_thread_mailslot (select_record *me, select_stuff *stuff);
-
-struct mailslotinf
- {
- cygthread *thread;
- bool stop_thread_mailslot;
- select_record *start;
- };
-
-static DWORD WINAPI
-thread_mailslot (void *arg)
-{
- mailslotinf *mi = (mailslotinf *) arg;
- bool gotone = false;
- DWORD sleep_time = 0;
-
- for (;;)
- {
- select_record *s = mi->start;
- while ((s = s->next))
- if (s->startup == start_thread_mailslot)
- {
- if (peek_mailslot (s, true))
- gotone = true;
- if (mi->stop_thread_mailslot)
- {
- select_printf ("stopping");
- goto out;
- }
- }
- /* Paranoid check */
- if (mi->stop_thread_mailslot)
- {
- select_printf ("stopping from outer loop");
- break;
- }
- if (gotone)
- break;
- Sleep (sleep_time >> 3);
- if (sleep_time < 80)
- ++sleep_time;
- }
-out:
- return 0;
-}
-
-static int
-start_thread_mailslot (select_record *me, select_stuff *stuff)
-{
- if (stuff->device_specific_mailslot)
- {
- me->h = *((mailslotinf *) stuff->device_specific_mailslot)->thread;
- return 1;
- }
- mailslotinf *mi = new mailslotinf;
- mi->start = &stuff->start;
- mi->stop_thread_mailslot = false;
- mi->thread = new cygthread (thread_mailslot, 0, mi, "select_mailslot");
- me->h = *mi->thread;
- if (!me->h)
- return 0;
- stuff->device_specific_mailslot = (void *) mi;
- return 1;
-}
-
-static void
-mailslot_cleanup (select_record *, select_stuff *stuff)
-{
- mailslotinf *mi = (mailslotinf *) stuff->device_specific_mailslot;
- if (mi && mi->thread)
- {
- mi->stop_thread_mailslot = true;
- mi->thread->detach ();
- delete mi;
- stuff->device_specific_mailslot = NULL;
- }
-}
-
-select_record *
-fhandler_mailslot::select_read (select_record *s)
-{
- if (!s)
- s = new select_record;
- s->startup = start_thread_mailslot;
- s->peek = peek_mailslot;
- s->verify = verify_mailslot;
- s->cleanup = mailslot_cleanup;
- s->read_selected = true;
- s->read_ready = false;
- return s;
-}
diff --git a/winsup/cygwin/sem.cc b/winsup/cygwin/sem.cc
deleted file mode 100644
index c00190c..0000000
--- a/winsup/cygwin/sem.cc
+++ /dev/null
@@ -1,158 +0,0 @@
-/* sem.cc: XSI IPC interface for Cygwin.
-
- 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. */
-
-#include "winsup.h"
-#ifdef USE_SERVER
-#include <unistd.h>
-
-#include "sigproc.h"
-
-#include "cygserver_sem.h"
-#include "cygtls.h"
-
-/*
- * client_request_sem Constructors
- */
-
-client_request_sem::client_request_sem (int semid,
- int semnum,
- int cmd,
- union semun *arg)
- : client_request (CYGSERVER_REQUEST_SEM, &_parameters, sizeof (_parameters))
-{
- _parameters.in.semop = SEMOP_semctl;
- ipc_set_proc_info (_parameters.in.ipcblk);
-
- _parameters.in.ctlargs.semid = semid;
- _parameters.in.ctlargs.semnum = semnum;
- _parameters.in.ctlargs.cmd = cmd;
- _parameters.in.ctlargs.arg = arg;
-
- msglen (sizeof (_parameters.in));
-}
-
-client_request_sem::client_request_sem (key_t key,
- int nsems,
- int semflg)
- : client_request (CYGSERVER_REQUEST_SEM, &_parameters, sizeof (_parameters))
-{
- _parameters.in.semop = SEMOP_semget;
- ipc_set_proc_info (_parameters.in.ipcblk);
-
- _parameters.in.getargs.key = key;
- _parameters.in.getargs.nsems = nsems;
- _parameters.in.getargs.semflg = semflg;
-
- msglen (sizeof (_parameters.in));
-}
-
-client_request_sem::client_request_sem (int semid,
- struct sembuf *sops,
- size_t nsops)
- : client_request (CYGSERVER_REQUEST_SEM, &_parameters, sizeof (_parameters))
-{
- _parameters.in.semop = SEMOP_semop;
- ipc_set_proc_info (_parameters.in.ipcblk);
-
- _parameters.in.opargs.semid = semid;
- _parameters.in.opargs.sops = sops;
- _parameters.in.opargs.nsops = nsops;
-
- msglen (sizeof (_parameters.in));
-}
-#endif /* USE_SERVER */
-
-/*
- * XSI semaphore API. These are exported by the DLL.
- */
-
-extern "C" int
-semctl (int semid, int semnum, int cmd, ...)
-{
-#ifdef USE_SERVER
- union semun arg = {0};
- if (cmd == IPC_STAT || cmd == IPC_SET || cmd == IPC_INFO || cmd == SEM_INFO
- || cmd == GETALL || cmd == SETALL || cmd == SETVAL)
- {
- va_list ap;
- va_start (ap, cmd);
- arg = va_arg (ap, union semun);
- va_end (ap);
- }
- syscall_printf ("semctl (semid = %d, semnum = %d, cmd = %d, arg.val = 0x%x)",
- semid, semnum, cmd, arg.val);
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- client_request_sem request (semid, semnum, cmd, &arg);
- if (request.make_request () == -1 || request.retval () == -1)
- {
- syscall_printf ("-1 [%d] = semctl ()", request.error_code ());
- set_errno (request.error_code ());
- if (request.error_code () == ENOSYS)
- raise (SIGSYS);
- return -1;
- }
- return request.retval ();
-#else
- set_errno (ENOSYS);
- raise (SIGSYS);
- return -1;
-#endif
-}
-
-extern "C" int
-semget (key_t key, int nsems, int semflg)
-{
-#ifdef USE_SERVER
- syscall_printf ("semget (key = %U, nsems = %d, semflg = 0x%x)",
- key, nsems, semflg);
- client_request_sem request (key, nsems, semflg);
- if (request.make_request () == -1 || request.retval () == -1)
- {
- syscall_printf ("-1 [%d] = semget ()", request.error_code ());
- set_errno (request.error_code ());
- if (request.error_code () == ENOSYS)
- raise (SIGSYS);
- return -1;
- }
- return request.retval ();
-#else
- set_errno (ENOSYS);
- raise (SIGSYS);
- return -1;
-#endif
-}
-
-extern "C" int
-semop (int semid, struct sembuf *sops, size_t nsops)
-{
-#ifdef USE_SERVER
- syscall_printf ("semop (semid = %d, sops = %p, nsops = %d)",
- semid, sops, nsops);
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- client_request_sem request (semid, sops, nsops);
- if (request.make_request () == -1 || request.retval () == -1)
- {
- syscall_printf ("-1 [%d] = semop ()", request.error_code ());
- set_errno (request.error_code ());
- if (request.error_code () == ENOSYS)
- raise (SIGSYS);
- return -1;
- }
- return request.retval ();
-#else
- set_errno (ENOSYS);
- raise (SIGSYS);
- return -1;
-#endif
-}
diff --git a/winsup/cygwin/setlsapwd.cc b/winsup/cygwin/setlsapwd.cc
deleted file mode 100644
index 1efee1d..0000000
--- a/winsup/cygwin/setlsapwd.cc
+++ /dev/null
@@ -1,95 +0,0 @@
-/* setlsapwd.cc: Set LSA private data password for current user.
-
- Copyright 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "shared_info.h"
-#include "cygerrno.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "security.h"
-#include "cygserver_setpwd.h"
-#include "ntdll.h"
-#include <ntsecapi.h>
-#include <stdlib.h>
-#include <wchar.h>
-
-#ifdef USE_SERVER
-/*
- * client_request_setpwd Constructor
- */
-
-client_request_setpwd::client_request_setpwd (PUNICODE_STRING passwd)
- : client_request (CYGSERVER_REQUEST_SETPWD, &_parameters, sizeof (_parameters))
-{
- memset (_parameters.in.passwd, 0, sizeof _parameters.in.passwd);
- if (passwd->Length > 0 && passwd->Length < 256 * sizeof (WCHAR))
- wcpncpy (_parameters.in.passwd, passwd->Buffer, 255);
-
- msglen (sizeof (_parameters.in));
-}
-
-#endif /* USE_SERVER */
-
-unsigned long
-setlsapwd (const char *passwd)
-{
- unsigned long ret = (unsigned long) -1;
- HANDLE lsa = INVALID_HANDLE_VALUE;
- WCHAR sid[128];
- WCHAR key_name[128 + wcslen (CYGWIN_LSA_KEY_PREFIX)];
- PWCHAR data_buf = NULL;
- UNICODE_STRING key;
- UNICODE_STRING data;
-
- wcpcpy (wcpcpy (key_name, CYGWIN_LSA_KEY_PREFIX),
- cygheap->user.get_windows_id (sid));
- RtlInitUnicodeString (&key, key_name);
- if (!passwd || ! *passwd
- || sys_mbstowcs_alloc (&data_buf, HEAP_NOTHEAP, passwd))
- {
- memset (&data, 0, sizeof data);
- if (data_buf)
- RtlInitUnicodeString (&data, data_buf);
- /* First try it locally. Works for admin accounts. */
- if ((lsa = open_local_policy (POLICY_CREATE_SECRET))
- != INVALID_HANDLE_VALUE)
- {
- NTSTATUS status = LsaStorePrivateData (lsa, &key,
- data.Length ? &data : NULL);
- /* Success or we're trying to remove a password entry which doesn't
- exist. */
- if (NT_SUCCESS (status)
- || (data.Length == 0 && status == STATUS_OBJECT_NAME_NOT_FOUND))
- ret = 0;
- else
- __seterrno_from_nt_status (status);
- LsaClose (lsa);
- }
-#ifdef USE_SERVER
- else if (ret)
- {
- /* If that fails, ask cygserver. */
- client_request_setpwd request (&data);
- if (request.make_request () == -1 || request.error_code ())
- set_errno (request.error_code ());
- else
- ret = 0;
- }
-#endif
- if (data_buf)
- {
- memset (data.Buffer, 0, data.Length);
- free (data_buf);
- }
- }
- return ret;
-}
diff --git a/winsup/cygwin/shared.cc b/winsup/cygwin/shared.cc
deleted file mode 100644
index 505c4e3..0000000
--- a/winsup/cygwin/shared.cc
+++ /dev/null
@@ -1,431 +0,0 @@
-/* shared.cc: shared data area support.
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "miscfuncs.h"
-#include <unistd.h>
-#include "cygerrno.h"
-#include "pinfo.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "heap.h"
-#include "shared_info_magic.h"
-#include "registry.h"
-#include "cygwin_version.h"
-#include "pwdgrp.h"
-#include "ntdll.h"
-#include <alloca.h>
-#include <wchar.h>
-
-shared_info NO_COPY *cygwin_shared;
-user_info NO_COPY *user_shared;
-HANDLE NO_COPY cygwin_shared_h;
-HANDLE NO_COPY cygwin_user_h;
-
-/* This function returns a handle to the top-level directory in the global
- NT namespace used to implement global objects including shared memory. */
-extern bool _cygwin_testing;
-
-HANDLE
-get_shared_parent_dir ()
-{
- static HANDLE dir;
- UNICODE_STRING uname;
- OBJECT_ATTRIBUTES attr;
- NTSTATUS status;
-
- if (!dir)
- {
- WCHAR bnoname[MAX_PATH];
- __small_swprintf (bnoname, L"\\BaseNamedObjects\\%s%s",
- cygwin_version.shared_id,
- _cygwin_testing ? cygwin_version.dll_build_date : "");
- RtlInitUnicodeString (&uname, bnoname);
- InitializeObjectAttributes (&attr, &uname, OBJ_INHERIT | OBJ_OPENIF,
- NULL, everyone_sd (CYG_SHARED_DIR_ACCESS));
- status = NtCreateDirectoryObject (&dir, CYG_SHARED_DIR_ACCESS, &attr);
- if (!NT_SUCCESS (status))
- api_fatal ("NtCreateDirectoryObject(%S): %p", &uname, status);
- }
- return dir;
-}
-
-HANDLE
-get_session_parent_dir ()
-{
- static HANDLE dir;
- UNICODE_STRING uname;
- OBJECT_ATTRIBUTES attr;
- NTSTATUS status;
-
- if (!dir)
- {
- PROCESS_SESSION_INFORMATION psi;
- status = NtQueryInformationProcess (GetCurrentProcess (),
- ProcessSessionInformation,
- &psi, sizeof psi, NULL);
- if (!NT_SUCCESS (status) || psi.SessionId == 0)
- dir = get_shared_parent_dir ();
- else
- {
- WCHAR bnoname[MAX_PATH];
- __small_swprintf (bnoname,
- L"\\Sessions\\BNOLINKS\\%d\\%s%s",
- psi.SessionId, cygwin_version.shared_id,
- _cygwin_testing ? cygwin_version.dll_build_date : "");
- RtlInitUnicodeString (&uname, bnoname);
- InitializeObjectAttributes (&attr, &uname, OBJ_INHERIT | OBJ_OPENIF,
- NULL, everyone_sd(CYG_SHARED_DIR_ACCESS));
- status = NtCreateDirectoryObject (&dir, CYG_SHARED_DIR_ACCESS, &attr);
- if (!NT_SUCCESS (status))
- api_fatal ("NtCreateDirectoryObject(%S): %p", &uname, status);
- }
- }
- return dir;
-}
-
-char * __stdcall
-shared_name (char *ret_buf, const char *str, int num)
-{
- __small_sprintf (ret_buf, "%s.%d", str, num);
- return ret_buf;
-}
-
-#define page_const (65535)
-#define pround(n) (((size_t) (n) + page_const) & ~page_const)
-
-static ptrdiff_t offsets[] =
-{
- - pround (sizeof (shared_info))
- - pround (sizeof (user_info))
- - pround (sizeof (console_state))
- - pround (sizeof (_pinfo)),
- - pround (sizeof (user_info))
- - pround (sizeof (console_state))
- - pround (sizeof (_pinfo)),
- - pround (sizeof (console_state))
- - pround (sizeof (_pinfo)),
- - pround (sizeof (_pinfo)),
- 0
-};
-
-#define off_addr(x) ((void *)((caddr_t) cygwin_hmodule + offsets[x]))
-
-void * __stdcall
-open_shared (const char *name, int n, HANDLE& shared_h, DWORD size,
- shared_locations& m, PSECURITY_ATTRIBUTES psa, DWORD access)
-{
- void *shared;
-
- void *addr;
- if (m == SH_JUSTCREATE || m == SH_JUSTOPEN)
- addr = NULL;
- else
- {
- addr = off_addr (m);
- VirtualFree (addr, 0, MEM_RELEASE);
- }
-
- char map_buf[MAX_PATH];
- char *mapname = NULL;
-
- if (shared_h)
- m = SH_JUSTOPEN;
- else
- {
- if (name)
- mapname = shared_name (map_buf, name, n);
- if (m == SH_JUSTOPEN)
- shared_h = OpenFileMapping (access, FALSE, mapname);
- else
- {
- shared_h = CreateFileMapping (INVALID_HANDLE_VALUE, psa,
- PAGE_READWRITE, 0, size, mapname);
- if (GetLastError () == ERROR_ALREADY_EXISTS)
- m = SH_JUSTOPEN;
- }
- if (shared_h)
- /* ok! */;
- else if (m != SH_JUSTOPEN)
- api_fatal ("CreateFileMapping %s, %E. Terminating.", mapname);
- else
- return NULL;
- }
-
- shared = (shared_info *)
- MapViewOfFileEx (shared_h, access, 0, 0, 0, addr);
-
- if (!shared && addr)
- {
- shared = (shared_info *) MapViewOfFileEx (shared_h,
- FILE_MAP_READ|FILE_MAP_WRITE,
- 0, 0, 0, NULL);
-#ifdef DEBUGGING
- system_printf ("relocating shared object %s(%d) from %p to %p", name, n, addr, shared);
-#endif
- offsets[0] = 0;
- }
-
- if (!shared)
- api_fatal ("MapViewOfFileEx '%s'(%p), %E. Terminating.", mapname, shared_h);
-
- if (m == SH_CYGWIN_SHARED && offsets[0])
- {
- ptrdiff_t delta = (caddr_t) shared - (caddr_t) off_addr (0);
- offsets[0] = (caddr_t) shared - (caddr_t) cygwin_hmodule;
- for (int i = SH_USER_SHARED + 1; i < SH_TOTAL_SIZE; i++)
- {
- unsigned size = offsets[i + 1] - offsets[i];
- offsets[i] += delta;
- if (!VirtualAlloc (off_addr (i), size, MEM_RESERVE, PAGE_NOACCESS))
- continue; /* oh well */
- }
- offsets[SH_TOTAL_SIZE] += delta;
- }
-
- debug_printf ("name %s, n %d, shared %p (wanted %p), h %p", mapname, n, shared, addr, shared_h);
-
- return shared;
-}
-
-/* Second half of user shared initialization: Initialize content. */
-void
-user_shared_initialize ()
-{
- DWORD sversion = (DWORD) InterlockedExchange ((LONG *) &user_shared->version, USER_VERSION_MAGIC);
- /* Wait for initialization of the Cygwin per-user shared, if necessary */
- if (!sversion)
- {
- cygpsid sid (cygheap->user.sid ());
- struct passwd *pw = internal_getpwsid (sid);
- /* Correct the user name with what's defined in /etc/passwd before
- loading the user fstab file. */
- if (pw)
- cygheap->user.set_name (pw->pw_name);
- user_shared->mountinfo.init (); /* Initialize the mount table. */
- user_shared->cb = sizeof (*user_shared);
- }
- else
- {
- while (!user_shared->cb)
- low_priority_sleep (0); // Should be hit only very very rarely
- if (user_shared->version != sversion)
- multiple_cygwin_problem ("user shared memory version", user_shared->version, sversion);
- else if (user_shared->cb != sizeof (*user_shared))
- multiple_cygwin_problem ("user shared memory size", user_shared->cb, sizeof (*user_shared));
- }
-}
-
-/* First half of user shared initialization: Create shared mem region. */
-void
-user_shared_create (bool reinit)
-{
- char name[UNLEN + 1] = ""; /* Large enough for SID */
-
- if (reinit)
- {
- if (!UnmapViewOfFile (user_shared))
- debug_printf("UnmapViewOfFile %E");
- if (!ForceCloseHandle (cygwin_user_h))
- debug_printf("CloseHandle %E");
- cygwin_user_h = NULL;
- }
-
- if (!cygwin_user_h)
- cygheap->user.get_windows_id (name);
-
- shared_locations sh_user_shared = SH_USER_SHARED;
- user_shared = (user_info *) open_shared (name, USER_VERSION,
- cygwin_user_h, sizeof (user_info),
- sh_user_shared, &sec_none);
- debug_printf ("opening user shared for '%s' at %p", name, user_shared);
- ProtectHandleINH (cygwin_user_h);
- debug_printf ("user shared version %x", user_shared->version);
- if (reinit)
- user_shared_initialize ();
-}
-
-void __stdcall
-shared_destroy ()
-{
- ForceCloseHandle (cygwin_shared_h);
- UnmapViewOfFile (cygwin_shared);
- ForceCloseHandle (cygwin_user_h);
- UnmapViewOfFile (user_shared);
-}
-
-/* Use absolute path of cygwin1.dll to derive the Win32 dir which
- is our installation root. Note that we can't handle Cygwin installation
- root dirs of more than 4K path length. I assume that's ok... */
-void
-shared_info::init_installation_root ()
-{
- if (!GetModuleFileNameW (cygwin_hmodule, installation_root, PATH_MAX))
- api_fatal ("Can't initialize Cygwin installation root dir.\n"
- "GetModuleFileNameW(%p, %p, %u), %E",
- cygwin_hmodule, installation_root, PATH_MAX);
- PWCHAR p = installation_root;
- if (wcsncmp (p, L"\\\\?\\", 4)) /* No long path prefix. */
- {
- if (!wcsncasecmp (p, L"\\\\", 2)) /* UNC */
- {
- p = wcpcpy (p, L"\\??\\UN");
- GetModuleFileNameW (cygwin_hmodule, p, PATH_MAX - 6);
- *p = L'C';
- }
- else
- {
- p = wcpcpy (p, L"\\??\\");
- GetModuleFileNameW (cygwin_hmodule, p, PATH_MAX - 4);
- }
- }
- installation_root[1] = L'?';
-
- PWCHAR w = wcsrchr (installation_root, L'\\');
- if (w)
- {
- *w = L'\0';
- w = wcsrchr (installation_root, L'\\');
- }
- if (!w)
- api_fatal ("Can't initialize Cygwin installation root dir.\n"
- "Invalid DLL path");
-
- *w = L'\0';
-}
-
-/* Initialize obcaseinsensitive. Default to case insensitive on pre-XP. */
-void
-shared_info::init_obcaseinsensitive ()
-{
- HKEY key;
- DWORD size = sizeof (DWORD);
-
- obcaseinsensitive = 1;
- if (RegOpenKeyEx (HKEY_LOCAL_MACHINE,
- "SYSTEM\\CurrentControlSet\\Control\\Session Manager\\kernel",
- 0, KEY_READ, &key) == ERROR_SUCCESS)
- {
- RegQueryValueEx (key, "obcaseinsensitive", NULL, NULL,
- (LPBYTE) &obcaseinsensitive, &size);
- RegCloseKey (key);
- }
- debug_printf ("obcaseinsensitive set to %d", obcaseinsensitive);
-}
-
-void
-shared_info::initialize ()
-{
- DWORD sversion = (DWORD) InterlockedExchange ((LONG *) &version, SHARED_VERSION_MAGIC);
- if (sversion)
- {
- if (sversion != SHARED_VERSION_MAGIC)
- {
- InterlockedExchange ((LONG *) &version, sversion);
- multiple_cygwin_problem ("system shared memory version", sversion, SHARED_VERSION_MAGIC);
- }
- while (!cb)
- low_priority_sleep (0); // Should be hit only very very rarely
- }
-
- heap_init ();
- get_session_parent_dir (); /* Create session dir if first process. */
-
- if (!sversion)
- {
- init_installation_root ();/* Initialize installation root dir. */
- init_obcaseinsensitive ();/* Initialize obcaseinsensitive. */
- tty.init (); /* Initialize tty table. */
- mt.initialize (); /* Initialize shared tape information. */
- cb = sizeof (*this); /* Do last, after all shared memory initialization */
- }
-
- if (cb != SHARED_INFO_CB)
- system_printf ("size of shared memory region changed from %u to %u",
- SHARED_INFO_CB, cb);
-}
-
-void __stdcall
-memory_init ()
-{
- getpagesize ();
-
- /* Initialize the Cygwin heap, if necessary */
- if (!cygheap)
- {
- cygheap_init ();
- cygheap->user.init ();
- }
-
- /* Initialize general shared memory */
- shared_locations sh_cygwin_shared;
- cygwin_shared = (shared_info *) open_shared ("shared",
- CYGWIN_VERSION_SHARED_DATA,
- cygwin_shared_h,
- sizeof (*cygwin_shared),
- sh_cygwin_shared = SH_CYGWIN_SHARED);
- cygwin_shared->initialize ();
- user_shared_create (false);
-}
-
-unsigned
-shared_info::heap_slop_size ()
-{
- if (!heap_slop_inited)
- {
- /* Fetch from registry, first user then local machine. */
- for (int i = 0; i < 2; i++)
- {
- reg_key reg (i, KEY_READ, NULL);
-
- if ((heap_slop = reg.get_int ("heap_slop_in_mb", 0)))
- break;
- heap_slop = wincap.heapslop ();
- }
- heap_slop <<= 20;
- heap_slop_inited = true;
- }
-
- return heap_slop;
-}
-
-unsigned
-shared_info::heap_chunk_size ()
-{
- if (!heap_chunk)
- {
- /* Fetch from registry, first user then local machine. */
- for (int i = 0; i < 2; i++)
- {
- reg_key reg (i, KEY_READ, NULL);
-
- /* Note that reserving a huge amount of heap space does not result in
- the use of swap since we are not committing it. */
- /* FIXME: We should not be restricted to a fixed size heap no matter
- what the fixed size is. */
-
- if ((heap_chunk = reg.get_int ("heap_chunk_in_mb", 0)))
- break;
- heap_chunk = 384; /* Default */
- }
-
- if (heap_chunk < 4)
- heap_chunk = 4 * 1024 * 1024;
- else
- heap_chunk <<= 20;
- if (!heap_chunk)
- heap_chunk = 384 * 1024 * 1024;
- }
-
- return heap_chunk;
-}
diff --git a/winsup/cygwin/shared_info.h b/winsup/cygwin/shared_info.h
deleted file mode 100644
index efd79c6..0000000
--- a/winsup/cygwin/shared_info.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/* shared_info.h: shared info for cygwin
-
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "tty.h"
-#include "security.h"
-#include "mtinfo.h"
-#include "limits.h"
-
-/* Mount table entry */
-
-class mount_item
-{
- public:
- /* FIXME: Nasty static allocation. Need to have a heap in the shared
- area [with the user being able to configure at runtime the max size]. */
- /* Win32-style mounted partition source ("C:\foo\bar").
- native_path[0] == 0 for unused entries. */
- char native_path[CYG_MAX_PATH];
- int native_pathlen;
-
- /* POSIX-style mount point ("/foo/bar") */
- char posix_path[CYG_MAX_PATH];
- int posix_pathlen;
-
- unsigned flags;
-
- void init (const char *dev, const char *path, unsigned flags);
-
- struct mntent *getmntent ();
- int build_win32 (char *, const char *, unsigned *, unsigned);
-};
-
-/* Warning: Decreasing this value will cause cygwin.dll to ignore existing
- higher numbered registry entries. Don't change this number willy-nilly.
- What we need is to have a more dynamic allocation scheme, but the current
- scheme should be satisfactory for a long while yet. */
-#define MAX_MOUNTS 30
-
-#define USER_VERSION 1 // increment when mount table changes and
-#define USER_VERSION_MAGIC CYGWIN_VERSION_MAGIC (USER_MAGIC, USER_VERSION)
-#define CURR_USER_MAGIC 0xb2232e71U
-
-class reg_key;
-struct device;
-
-/* NOTE: Do not make gratuitous changes to the names or organization of the
- below class. The layout is checksummed to determine compatibility between
- different cygwin versions. */
-class mount_info
-{
- public:
- DWORD sys_mount_table_counter;
- int nmounts;
- mount_item mount[MAX_MOUNTS];
-
- /* cygdrive_prefix is used as the root of the path automatically
- prepended to a path when the path has no associated mount.
- cygdrive_flags are the default flags for the cygdrives. */
- char cygdrive[CYG_MAX_PATH];
- size_t cygdrive_len;
- unsigned cygdrive_flags;
- private:
- int posix_sorted[MAX_MOUNTS];
- int native_sorted[MAX_MOUNTS];
-
- public:
- void init ();
- int add_item (const char *dev, const char *path, unsigned flags);
- int del_item (const char *path, unsigned flags);
-
- unsigned set_flags_from_win32_path (const char *path);
- int conv_to_win32_path (const char *src_path, char *dst, device&,
- unsigned *flags = NULL);
- int conv_to_posix_path (PWCHAR src_path, char *posix_path,
- int keep_rel_p);
- int conv_to_posix_path (const char *src_path, char *posix_path,
- int keep_rel_p);
- struct mntent *getmntent (int x);
-
- int write_cygdrive_info (const char *cygdrive_prefix, unsigned flags);
- int get_cygdrive_info (char *user, char *system, char* user_flags,
- char* system_flags);
- void cygdrive_posix_path (const char *src, char *dst, int trailing_slash_p);
- int get_mounts_here (const char *parent_dir, int,
- PUNICODE_STRING mount_points,
- PUNICODE_STRING cygd);
-
- private:
- void sort ();
- void mount_slash ();
- void create_root_entry (const PWCHAR root);
-
- bool from_fstab_line (char *line, bool user);
- bool from_fstab (bool user, WCHAR [], PWCHAR);
-
- int cygdrive_win32_path (const char *src, char *dst, int& unit);
-};
-
-class user_info
-{
-public:
- DWORD version;
- DWORD cb;
- bool warned_msdos;
- mount_info mountinfo;
-};
-/******** Shared Info ********/
-/* Data accessible to all tasks */
-
-#define SHARED_VERSION (unsigned)(cygwin_version.api_major << 8 | \
- cygwin_version.api_minor)
-#define SHARED_VERSION_MAGIC CYGWIN_VERSION_MAGIC (SHARED_MAGIC, SHARED_VERSION)
-
-#define SHARED_INFO_CB 39328
-
-#define CURR_SHARED_MAGIC 0x398d8baU
-
-/* NOTE: Do not make gratuitous changes to the names or organization of the
- below class. The layout is checksummed to determine compatibility between
- different cygwin versions. */
-class shared_info
-{
- DWORD version;
- DWORD cb;
- public:
- unsigned heap_chunk;
- bool heap_slop_inited;
- unsigned heap_slop;
- DWORD sys_mount_table_counter;
- tty_list tty;
- LONG last_used_bindresvport;
- WCHAR installation_root[PATH_MAX];
- DWORD obcaseinsensitive;
- mtinfo mt;
-
- void initialize ();
- void init_installation_root ();
- void init_obcaseinsensitive ();
- unsigned heap_chunk_size ();
- unsigned heap_slop_size ();
-};
-
-extern shared_info *cygwin_shared;
-extern user_info *user_shared;
-#define mount_table (&(user_shared->mountinfo))
-extern HANDLE cygwin_user_h;
-
-enum shared_locations
-{
- SH_CYGWIN_SHARED,
- SH_USER_SHARED,
- SH_SHARED_CONSOLE,
- SH_MYSELF,
- SH_TOTAL_SIZE,
- SH_JUSTCREATE,
- SH_JUSTOPEN
-
-};
-
-void __stdcall memory_init ();
-void __stdcall shared_destroy ();
-
-#define shared_align_past(p) \
- ((char *) (system_info.dwAllocationGranularity * \
- (((DWORD) ((p) + 1) + system_info.dwAllocationGranularity - 1) / \
- system_info.dwAllocationGranularity)))
-
-#ifdef _FHANDLER_H_
-struct console_state
-{
- tty_min tty_min_state;
- dev_console dev_state;
-};
-#endif
-
-HANDLE get_shared_parent_dir ();
-HANDLE get_session_parent_dir ();
-char *__stdcall shared_name (char *, const char *, int);
-void *__stdcall open_shared (const char *name, int n, HANDLE &shared_h, DWORD size,
- shared_locations&, PSECURITY_ATTRIBUTES psa = &sec_all,
- DWORD access = FILE_MAP_READ | FILE_MAP_WRITE);
-extern void user_shared_create (bool reinit);
-extern void user_shared_initialize ();
-
diff --git a/winsup/cygwin/shm.cc b/winsup/cygwin/shm.cc
deleted file mode 100644
index 809bd33..0000000
--- a/winsup/cygwin/shm.cc
+++ /dev/null
@@ -1,406 +0,0 @@
-/* shm.cc: XSI IPC interface for Cygwin.
-
- 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. */
-
-#include "winsup.h"
-#ifdef USE_SERVER
-#include <sys/queue.h>
-#include <unistd.h>
-
-#include "pinfo.h"
-#include "sigproc.h"
-
-#include "cygserver_shm.h"
-#include "cygtls.h"
-#include "sync.h"
-
-/*
- * client_request_shm Constructors
- */
-
-client_request_shm::client_request_shm (int shmid,
- const void *shmaddr,
- int shmflg)
- : client_request (CYGSERVER_REQUEST_SHM, &_parameters, sizeof (_parameters))
-{
- _parameters.in.shmop = SHMOP_shmat;
- ipc_set_proc_info (_parameters.in.ipcblk);
-
- _parameters.in.atargs.shmid = shmid;
- _parameters.in.atargs.shmaddr = shmaddr;
- _parameters.in.atargs.shmflg = shmflg;
-
- msglen (sizeof (_parameters.in));
-}
-
-client_request_shm::client_request_shm (int shmid,
- int cmd,
- struct shmid_ds *buf)
- : client_request (CYGSERVER_REQUEST_SHM, &_parameters, sizeof (_parameters))
-{
- _parameters.in.shmop = SHMOP_shmctl;
- ipc_set_proc_info (_parameters.in.ipcblk);
-
- _parameters.in.ctlargs.shmid = shmid;
- _parameters.in.ctlargs.cmd = cmd;
- _parameters.in.ctlargs.buf = buf;
-
- msglen (sizeof (_parameters.in));
-}
-
-client_request_shm::client_request_shm (const void *shmaddr)
- : client_request (CYGSERVER_REQUEST_SHM, &_parameters, sizeof (_parameters))
-{
- _parameters.in.shmop = SHMOP_shmdt;
- ipc_set_proc_info (_parameters.in.ipcblk);
-
- _parameters.in.dtargs.shmaddr = shmaddr;
-
- msglen (sizeof (_parameters.in));
-}
-
-client_request_shm::client_request_shm (key_t key,
- size_t size,
- int shmflg)
- : client_request (CYGSERVER_REQUEST_SHM, &_parameters, sizeof (_parameters))
-{
- _parameters.in.shmop = SHMOP_shmget;
- ipc_set_proc_info (_parameters.in.ipcblk);
-
- _parameters.in.getargs.key = key;
- _parameters.in.getargs.size = size;
- _parameters.in.getargs.shmflg = shmflg;
-
- msglen (sizeof (_parameters.in));
-}
-
-client_request_shm::client_request_shm (proc *p1)
- : client_request (CYGSERVER_REQUEST_SHM, &_parameters, sizeof (_parameters))
-{
- _parameters.in.shmop = SHMOP_shmfork;
- ipc_set_proc_info (_parameters.in.ipcblk);
-
- _parameters.in.forkargs = *p1;
-}
-
-/* List of shmid's with file mapping HANDLE and size, returned by shmget. */
-struct shm_shmid_list {
- SLIST_ENTRY (shm_shmid_list) ssh_next;
- int shmid;
- vm_object_t hdl;
- size_t size;
- int ref_count;
-};
-
-static SLIST_HEAD (, shm_shmid_list) ssh_list;
-
-/* List of attached mappings, as returned by shmat. */
-struct shm_attached_list {
- SLIST_ENTRY (shm_attached_list) sph_next;
- vm_object_t ptr;
- shm_shmid_list *parent;
- int access;
-};
-
-static SLIST_HEAD (, shm_attached_list) sph_list;
-
-static NO_COPY muto shm_guard;
-#define SLIST_LOCK() (shm_guard.init ("shm_guard")->acquire ())
-#define SLIST_UNLOCK() (shm_guard.release ())
-
-int __stdcall
-fixup_shms_after_fork ()
-{
- if (!SLIST_FIRST (&sph_list))
- return 0;
- pinfo p (myself->ppid);
- proc parent = { myself->ppid, p->dwProcessId, p->uid, p->gid };
-
- client_request_shm request (&parent);
- if (request.make_request () == -1 || request.retval () == -1)
- {
- syscall_printf ("-1 [%d] = fixup_shms_after_fork ()", request.error_code ());
- set_errno (request.error_code ());
- return 0;
- }
- shm_attached_list *sph_entry;
- /* Remove map from list... */
- SLIST_FOREACH (sph_entry, &sph_list, sph_next)
- {
- vm_object_t ptr = MapViewOfFileEx (sph_entry->parent->hdl,
- sph_entry->access, 0, 0,
- sph_entry->parent->size,
- sph_entry->ptr);
- if (ptr != sph_entry->ptr)
- api_fatal ("MapViewOfFileEx (%p), %E. Terminating.", sph_entry->ptr);
- }
- return 0;
-}
-#endif /* USE_SERVER */
-
-/*
- * XSI shmaphore API. These are exported by the DLL.
- */
-
-extern "C" void *
-shmat (int shmid, const void *shmaddr, int shmflg)
-{
-#ifdef USE_SERVER
- syscall_printf ("shmat (shmid = %d, shmaddr = %p, shmflg = 0x%x)",
- shmid, shmaddr, shmflg);
-
- SLIST_LOCK ();
- shm_shmid_list *ssh_entry;
- SLIST_FOREACH (ssh_entry, &ssh_list, ssh_next)
- {
- if (ssh_entry->shmid == shmid)
- break;
- }
- if (!ssh_entry)
- {
- /* The shmid is unknown to this process so far. Try to get it from
- the server if it exists. Use special internal call to shmget,
- which interprets the key as a shmid and only returns a valid
- shmid if one exists. Since shmctl inserts a new entry for this
- shmid into ssh_list automatically, we just have to go through
- that list again. If that still fails, well, bad luck. */
- if (shmid && shmget ((key_t) shmid, 0, IPC_KEY_IS_SHMID) != -1)
- {
- SLIST_FOREACH (ssh_entry, &ssh_list, ssh_next)
- {
- if (ssh_entry->shmid == shmid)
- break;
- }
- }
- if (!ssh_entry)
- {
- /* Invalid shmid */
- set_errno (EINVAL);
- SLIST_UNLOCK ();
- return (void *) -1;
- }
- }
- /* Early increment ref counter. This allows further actions to run with
- unlocked lists, because shmdt or shmctl(IPC_RMID) won't delete this
- ssh_entry. */
- ++ssh_entry->ref_count;
- SLIST_UNLOCK ();
-
- vm_object_t attach_va = NULL;
- if (shmaddr)
- {
- if (shmflg & SHM_RND)
- attach_va = (vm_object_t)((vm_offset_t)shmaddr & ~(SHMLBA-1));
- else
- attach_va = (vm_object_t)shmaddr;
- /* Don't even bother to call anything if shmaddr is NULL or
- not aligned. */
- if (!attach_va || (vm_offset_t)attach_va % SHMLBA)
- {
- set_errno (EINVAL);
- --ssh_entry->ref_count;
- return (void *) -1;
- }
- }
- /* Try allocating memory before calling cygserver. */
- shm_attached_list *sph_entry = new (shm_attached_list);
- if (!sph_entry)
- {
- set_errno (ENOMEM);
- --ssh_entry->ref_count;
- return (void *) -1;
- }
- DWORD access = (shmflg & SHM_RDONLY) ? FILE_MAP_READ : FILE_MAP_WRITE;
- vm_object_t ptr = MapViewOfFileEx (ssh_entry->hdl, access, 0, 0,
- ssh_entry->size, attach_va);
- if (!ptr)
- {
- __seterrno ();
- delete sph_entry;
- --ssh_entry->ref_count;
- return (void *) -1;
- }
- /* Use returned ptr address as is, so it's stored using the exact value
- in cygserver. */
- client_request_shm request (shmid, ptr, shmflg & ~SHM_RND);
- if (request.make_request () == -1 || request.ptrval () == NULL)
- {
- syscall_printf ("-1 [%d] = shmat ()", request.error_code ());
- UnmapViewOfFile (ptr);
- delete sph_entry;
- set_errno (request.error_code ());
- --ssh_entry->ref_count;
- if (request.error_code () == ENOSYS)
- raise (SIGSYS);
- return (void *) -1;
- }
- sph_entry->ptr = ptr;
- sph_entry->parent = ssh_entry;
- sph_entry->access = access;
- SLIST_LOCK ();
- SLIST_INSERT_HEAD (&sph_list, sph_entry, sph_next);
- SLIST_UNLOCK ();
- return ptr;
-#else
- set_errno (ENOSYS);
- raise (SIGSYS);
- return (void *) -1;
-#endif
-}
-
-extern "C" int
-shmctl (int shmid, int cmd, struct shmid_ds *buf)
-{
-#ifdef USE_SERVER
- syscall_printf ("shmctl (shmid = %d, cmd = %d, buf = 0x%x)",
- shmid, cmd, buf);
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- client_request_shm request (shmid, cmd, buf);
- if (request.make_request () == -1 || request.retval () == -1)
- {
- syscall_printf ("-1 [%d] = shmctl ()", request.error_code ());
- set_errno (request.error_code ());
- if (request.error_code () == ENOSYS)
- raise (SIGSYS);
- return -1;
- }
- if (cmd == IPC_RMID)
- {
- /* Cleanup */
- shm_shmid_list *ssh_entry, *ssh_next_entry;
- SLIST_LOCK ();
- SLIST_FOREACH_SAFE (ssh_entry, &ssh_list, ssh_next, ssh_next_entry)
- {
- if (ssh_entry->shmid == shmid)
- {
- /* Remove this entry from the list and close the handle
- only if it's not in use anymore. */
- if (ssh_entry->ref_count <= 0)
- {
- SLIST_REMOVE (&ssh_list, ssh_entry, shm_shmid_list, ssh_next);
- CloseHandle (ssh_entry->hdl);
- delete ssh_entry;
- }
- break;
- }
- }
- SLIST_UNLOCK ();
- }
- return request.retval ();
-#else
- set_errno (ENOSYS);
- raise (SIGSYS);
- return -1;
-#endif
-}
-
-extern "C" int
-shmdt (const void *shmaddr)
-{
-#ifdef USE_SERVER
- syscall_printf ("shmdt (shmaddr = %p)", shmaddr);
- client_request_shm request (shmaddr);
- if (request.make_request () == -1 || request.retval () == -1)
- {
- syscall_printf ("-1 [%d] = shmdt ()", request.error_code ());
- set_errno (request.error_code ());
- if (request.error_code () == ENOSYS)
- raise (SIGSYS);
- return -1;
- }
- shm_attached_list *sph_entry, *sph_next_entry;
- /* Remove map from list... */
- SLIST_LOCK ();
- SLIST_FOREACH_SAFE (sph_entry, &sph_list, sph_next, sph_next_entry)
- {
- if (sph_entry->ptr == shmaddr)
- {
- SLIST_REMOVE (&sph_list, sph_entry, shm_attached_list, sph_next);
- /* ...unmap view... */
- UnmapViewOfFile (sph_entry->ptr);
- /* ...and, if this was the last reference to this shared section... */
- shm_shmid_list *ssh_entry = sph_entry->parent;
- if (--ssh_entry->ref_count <= 0)
- {
- /* ...delete parent entry and close handle. */
- SLIST_REMOVE (&ssh_list, ssh_entry, shm_shmid_list, ssh_next);
- CloseHandle (ssh_entry->hdl);
- delete ssh_entry;
- }
- delete sph_entry;
- break;
- }
- }
- SLIST_UNLOCK ();
- return request.retval ();
-#else
- set_errno (ENOSYS);
- raise (SIGSYS);
- return -1;
-#endif
-}
-
-extern "C" int
-shmget (key_t key, size_t size, int shmflg)
-{
-#ifdef USE_SERVER
- syscall_printf ("shmget (key = %U, size = %d, shmflg = 0x%x)",
- key, size, shmflg);
- /* Try allocating memory before calling cygserver. */
- shm_shmid_list *ssh_new_entry = new (shm_shmid_list);
- if (!ssh_new_entry)
- {
- set_errno (ENOMEM);
- return -1;
- }
- client_request_shm request (key, size, shmflg);
- if (request.make_request () == -1 || request.retval () == -1)
- {
- syscall_printf ("-1 [%d] = shmget ()", request.error_code ());
- delete ssh_new_entry;
- set_errno (request.error_code ());
- if (request.error_code () == ENOSYS)
- raise (SIGSYS);
- return -1;
- }
- int shmid = request.retval (); /* Shared mem ID */
- vm_object_t hdl = request.objval (); /* HANDLE associated with it. */
- shm_shmid_list *ssh_entry;
- SLIST_LOCK ();
- SLIST_FOREACH (ssh_entry, &ssh_list, ssh_next)
- {
- if (ssh_entry->shmid == shmid)
- {
- /* We already maintain an entry for this shmid. That means,
- the hdl returned by cygserver is a superfluous duplicate
- of the original hdl maintained by cygserver. We can safely
- delete it. */
- CloseHandle (hdl);
- delete ssh_new_entry;
- SLIST_UNLOCK ();
- return shmid;
- }
- }
- /* We arrive here only if shmid is a new one for this process. Add the
- shmid and hdl value to the list. */
- ssh_new_entry->shmid = shmid;
- ssh_new_entry->hdl = hdl;
- ssh_new_entry->size = size;
- ssh_new_entry->ref_count = 0;
- SLIST_INSERT_HEAD (&ssh_list, ssh_new_entry, ssh_next);
- SLIST_UNLOCK ();
- return shmid;
-#else
- set_errno (ENOSYS);
- raise (SIGSYS);
- return -1;
-#endif
-}
diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc
deleted file mode 100644
index b3654de..0000000
--- a/winsup/cygwin/signal.cc
+++ /dev/null
@@ -1,567 +0,0 @@
-/* signal.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008 Red Hat, Inc.
-
- Written by Steve Chamberlain of Cygnus Support, sac@cygnus.com
- Significant changes by Sergey Okhapkin <sos@prospect.com.ru>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include <sys/cygwin.h>
-#include "pinfo.h"
-#include "sigproc.h"
-#include "cygtls.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-
-int sigcatchers; /* FIXME: Not thread safe. */
-
-#define _SA_NORESTART 0x8000
-
-static int sigaction_worker (int, const struct sigaction *, struct sigaction *, bool)
- __attribute__ ((regparm (3)));
-
-#define sigtrapped(func) ((func) != SIG_IGN && (func) != SIG_DFL)
-
-static inline void
-set_sigcatchers (void (*oldsig) (int), void (*cursig) (int))
-{
-#ifdef DEBUGGING
- int last_sigcatchers = sigcatchers;
-#endif
- if (!sigtrapped (oldsig) && sigtrapped (cursig))
- sigcatchers++;
- else if (sigtrapped (oldsig) && !sigtrapped (cursig))
- sigcatchers--;
-#ifdef DEBUGGING
- if (last_sigcatchers != sigcatchers)
- sigproc_printf ("last %d, old %d, cur %p, cur %p", last_sigcatchers,
- sigcatchers, oldsig, cursig);
-#endif
-}
-
-extern "C" _sig_func_ptr
-signal (int sig, _sig_func_ptr func)
-{
- sig_dispatch_pending ();
- _sig_func_ptr prev;
-
- /* check that sig is in right range */
- if (sig < 0 || sig >= NSIG || sig == SIGKILL || sig == SIGSTOP)
- {
- set_errno (EINVAL);
- syscall_printf ("SIG_ERR = signal (%d, %p)", sig, func);
- return (_sig_func_ptr) SIG_ERR;
- }
-
- prev = global_sigs[sig].sa_handler;
- struct sigaction& gs = global_sigs[sig];
- if (gs.sa_flags & _SA_NORESTART)
- gs.sa_flags &= ~SA_RESTART;
- else
- gs.sa_flags |= SA_RESTART;
-
- gs.sa_mask = SIGTOMASK (sig);
- gs.sa_handler = func;
- gs.sa_flags &= ~SA_SIGINFO;
-
- set_sigcatchers (prev, func);
-
- syscall_printf ("%p = signal (%d, %p)", prev, sig, func);
- return prev;
-}
-
-extern "C" int
-nanosleep (const struct timespec *rqtp, struct timespec *rmtp)
-{
- int res = 0;
- sig_dispatch_pending ();
- pthread_testcancel ();
-
- if ((unsigned int) rqtp->tv_sec > (HIRES_DELAY_MAX / 1000 - 1)
- || (unsigned int) rqtp->tv_nsec > 999999999)
- {
- set_errno (EINVAL);
- return -1;
- }
- DWORD resolution = gtod.resolution ();
- DWORD req = ((rqtp->tv_sec * 1000 + (rqtp->tv_nsec + 999999) / 1000000
- + resolution - 1) / resolution) * resolution;
- DWORD end_time = gtod.dmsecs () + req;
- syscall_printf ("nanosleep (%ld)", req);
-
- int rc = cancelable_wait (signal_arrived, req);
- DWORD rem;
- if ((rem = end_time - gtod.dmsecs ()) > HIRES_DELAY_MAX)
- rem = 0;
- if (rc == WAIT_OBJECT_0)
- {
- _my_tls.call_signal_handler ();
- set_errno (EINTR);
- res = -1;
- }
-
- if (rmtp)
- {
- rmtp->tv_sec = rem / 1000;
- rmtp->tv_nsec = (rem % 1000) * 1000000;
- }
-
- syscall_printf ("%d = nanosleep (%ld, %ld)", res, req, rem);
- return res;
-}
-
-extern "C" unsigned int
-sleep (unsigned int seconds)
-{
- struct timespec req, rem;
- req.tv_sec = seconds;
- req.tv_nsec = 0;
- nanosleep (&req, &rem);
- return rem.tv_sec + (rem.tv_nsec > 0);
-}
-
-extern "C" unsigned int
-usleep (useconds_t useconds)
-{
- struct timespec req;
- req.tv_sec = useconds / 1000000;
- req.tv_nsec = (useconds % 1000000) * 1000;
- int res = nanosleep (&req, 0);
- return res;
-}
-
-extern "C" int
-sigprocmask (int how, const sigset_t *set, sigset_t *oldset)
-{
- return handle_sigprocmask (how, set, oldset, _my_tls.sigmask);
-}
-
-int __stdcall
-handle_sigprocmask (int how, const sigset_t *set, sigset_t *oldset, sigset_t& opmask)
-{
- /* check that how is in right range */
- if (how != SIG_BLOCK && how != SIG_UNBLOCK && how != SIG_SETMASK)
- {
- syscall_printf ("Invalid how value %d", how);
- set_errno (EINVAL);
- return -1;
- }
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- if (oldset)
- *oldset = opmask;
-
- if (set)
- {
- sigset_t newmask = opmask;
- switch (how)
- {
- case SIG_BLOCK:
- /* add set to current mask */
- newmask |= *set;
- break;
- case SIG_UNBLOCK:
- /* remove set from current mask */
- newmask &= ~*set;
- break;
- case SIG_SETMASK:
- /* just set it */
- newmask = *set;
- break;
- }
- set_signal_mask (newmask, opmask);
- }
- return 0;
-}
-
-int __stdcall
-_pinfo::kill (siginfo_t& si)
-{
- sig_dispatch_pending ();
-
- int res = 0;
- bool sendSIGCONT;
-
- if (!exists ())
- {
- set_errno (ESRCH);
- return -1;
- }
-
- if ((sendSIGCONT = (si.si_signo < 0)))
- si.si_signo = -si.si_signo;
-
- DWORD this_process_state = process_state;
- if (si.si_signo == 0)
- /* ok */;
- else if ((res = sig_send (this, si)))
- {
- sigproc_printf ("%d = sig_send, %E ", res);
- res = -1;
- }
- else if (sendSIGCONT)
- {
- siginfo_t si2 = {0};
- si2.si_signo = SIGCONT;
- si2.si_code = SI_KERNEL;
- sig_send (this, si2);
- }
-
- syscall_printf ("%d = _pinfo::kill (%d, %d), process_state %p", res, pid,
- si.si_signo, this_process_state);
- return res;
-}
-
-int
-raise (int sig)
-{
- return kill (myself->pid, sig);
-}
-
-static int
-kill0 (pid_t pid, siginfo_t& si)
-{
- syscall_printf ("kill (%d, %d)", pid, si.si_signo);
- /* check that sig is in right range */
- if (si.si_signo < 0 || si.si_signo >= NSIG)
- {
- set_errno (EINVAL);
- syscall_printf ("signal %d out of range", si.si_signo);
- return -1;
- }
-
- /* Silently ignore stop signals from a member of orphaned process group.
- FIXME: Why??? */
- if (ISSTATE (myself, PID_ORPHANED) &&
- (si.si_signo == SIGTSTP || si.si_signo == SIGTTIN || si.si_signo == SIGTTOU))
- si.si_signo = 0;
-
- return (pid > 0) ? pinfo (pid)->kill (si) : kill_pgrp (-pid, si);
-}
-
-int
-killsys (pid_t pid, int sig)
-{
- siginfo_t si = {0};
- si.si_signo = sig;
- si.si_code = SI_KERNEL;
- return kill0 (pid, si);
-}
-
-int
-kill (pid_t pid, int sig)
-{
- siginfo_t si = {0};
- si.si_signo = sig;
- si.si_code = SI_USER;
- return kill0 (pid, si);
-}
-
-int
-kill_pgrp (pid_t pid, siginfo_t& si)
-{
- int res = 0;
- int found = 0;
- int killself = 0;
-
- sigproc_printf ("pid %d, signal %d", pid, si.si_signo);
-
- winpids pids ((DWORD) PID_MAP_RW);
- for (unsigned i = 0; i < pids.npids; i++)
- {
- _pinfo *p = pids[i];
-
- if (!p->exists ())
- continue;
-
- /* Is it a process we want to kill? */
- if ((pid == 0 && (p->pgid != myself->pgid || p->ctty != myself->ctty)) ||
- (pid > 1 && p->pgid != pid) ||
- (si.si_signo < 0 && NOTSTATE (p, PID_STOPPED)))
- continue;
- sigproc_printf ("killing pid %d, pgrp %d, p->%s, %s", p->pid, p->pgid,
- p->__ctty (), myctty ());
- if (p == myself)
- killself++;
- else if (p->kill (si))
- res = -1;
- found++;
- }
-
- if (killself && !exit_state && myself->kill (si))
- res = -1;
-
- if (!found)
- {
- set_errno (ESRCH);
- res = -1;
- }
- syscall_printf ("%d = kill (%d, %d)", res, pid, si.si_signo);
- return res;
-}
-
-extern "C" int
-killpg (pid_t pgrp, int sig)
-{
- return kill (-pgrp, sig);
-}
-
-extern "C" void
-abort (void)
-{
- _my_tls.incyg++;
- sig_dispatch_pending ();
- /* Ensure that SIGABRT can be caught regardless of blockage. */
- sigset_t sig_mask;
- sigfillset (&sig_mask);
- sigdelset (&sig_mask, SIGABRT);
- set_signal_mask (sig_mask, _my_tls.sigmask);
-
- raise (SIGABRT);
- _my_tls.call_signal_handler (); /* Call any signal handler */
-
- /* Flush all streams as per SUSv2. */
- if (_GLOBAL_REENT->__cleanup)
- _GLOBAL_REENT->__cleanup (_GLOBAL_REENT);
- do_exit (SIGABRT); /* signal handler didn't exit. Goodbye. */
-}
-
-static int
-sigaction_worker (int sig, const struct sigaction *newact, struct sigaction *oldact, bool isinternal)
-{
- sig_dispatch_pending ();
- /* check that sig is in right range */
- if (sig < 0 || sig >= NSIG)
- {
- set_errno (EINVAL);
- sigproc_printf ("signal %d, newact %p, oldact %p", sig, newact, oldact);
- syscall_printf ("SIG_ERR = sigaction signal %d out of range", sig);
- return -1;
- }
-
- struct sigaction oa = global_sigs[sig];
-
- if (!newact)
- sigproc_printf ("signal %d, newact %p, oa %p", sig, newact, oa, oa.sa_handler);
- else
- {
- sigproc_printf ("signal %d, newact %p (handler %p), oa %p", sig, newact, newact->sa_handler, oa, oa.sa_handler);
- if (sig == SIGKILL || sig == SIGSTOP)
- {
- set_errno (EINVAL);
- return -1;
- }
- struct sigaction na = *newact;
- struct sigaction& gs = global_sigs[sig];
- if (!isinternal)
- na.sa_flags &= ~_SA_INTERNAL_MASK;
- gs = na;
- if (!(gs.sa_flags & SA_NODEFER))
- gs.sa_mask |= SIGTOMASK(sig);
- if (gs.sa_handler == SIG_IGN)
- sig_clear (sig);
- if (gs.sa_handler == SIG_DFL && sig == SIGCHLD)
- sig_clear (sig);
- set_sigcatchers (oa.sa_handler, gs.sa_handler);
- if (sig == SIGCHLD)
- {
- myself->process_state &= ~PID_NOCLDSTOP;
- if (gs.sa_flags & SA_NOCLDSTOP)
- myself->process_state |= PID_NOCLDSTOP;
- }
- }
-
- if (oldact)
- {
- *oldact = oa;
- oa.sa_flags &= ~_SA_INTERNAL_MASK;
- }
-
- return 0;
-}
-
-extern "C" int
-sigaction (int sig, const struct sigaction *newact, struct sigaction *oldact)
-{
- return sigaction_worker (sig, newact, oldact, false);
-}
-
-extern "C" int
-sigaddset (sigset_t *set, const int sig)
-{
- /* check that sig is in right range */
- if (sig <= 0 || sig >= NSIG)
- {
- set_errno (EINVAL);
- syscall_printf ("SIG_ERR = sigaddset signal %d out of range", sig);
- return -1;
- }
-
- *set |= SIGTOMASK (sig);
- return 0;
-}
-
-extern "C" int
-sigdelset (sigset_t *set, const int sig)
-{
- /* check that sig is in right range */
- if (sig <= 0 || sig >= NSIG)
- {
- set_errno (EINVAL);
- syscall_printf ("SIG_ERR = sigdelset signal %d out of range", sig);
- return -1;
- }
-
- *set &= ~SIGTOMASK (sig);
- return 0;
-}
-
-extern "C" int
-sigismember (const sigset_t *set, int sig)
-{
- /* check that sig is in right range */
- if (sig <= 0 || sig >= NSIG)
- {
- set_errno (EINVAL);
- syscall_printf ("SIG_ERR = sigdelset signal %d out of range", sig);
- return -1;
- }
-
- if (*set & SIGTOMASK (sig))
- return 1;
- else
- return 0;
-}
-
-extern "C" int
-sigemptyset (sigset_t *set)
-{
- *set = (sigset_t) 0;
- return 0;
-}
-
-extern "C" int
-sigfillset (sigset_t *set)
-{
- *set = ~((sigset_t) 0);
- return 0;
-}
-
-extern "C" int
-sigsuspend (const sigset_t *set)
-{
- return handle_sigsuspend (*set);
-}
-
-extern "C" int
-sigpause (int signal_mask)
-{
- return handle_sigsuspend ((sigset_t) signal_mask);
-}
-
-extern "C" int
-pause (void)
-{
- return handle_sigsuspend (_my_tls.sigmask);
-}
-
-extern "C" int
-siginterrupt (int sig, int flag)
-{
- struct sigaction act;
- sigaction (sig, NULL, &act);
- if (flag)
- {
- act.sa_flags &= ~SA_RESTART;
- act.sa_flags |= _SA_NORESTART;
- }
- else
- {
- act.sa_flags &= ~_SA_NORESTART;
- act.sa_flags |= SA_RESTART;
- }
- return sigaction_worker (sig, &act, NULL, true);
-}
-
-extern "C" int
-sigwait (const sigset_t *set, int *sig_ptr)
-{
- int sig = sigwaitinfo (set, NULL);
- if (sig > 0)
- *sig_ptr = sig;
- return sig > 0 ? 0 : -1;
-}
-
-extern "C" int
-sigwaitinfo (const sigset_t *set, siginfo_t *info)
-{
- pthread_testcancel ();
- HANDLE h;
- h = _my_tls.event = CreateEvent (&sec_none_nih, FALSE, FALSE, NULL);
- if (!h)
- {
- __seterrno ();
- return -1;
- }
-
- _my_tls.sigwait_mask = *set;
- sig_dispatch_pending (true);
-
- int res;
- switch (WaitForSingleObject (h, INFINITE))
- {
- case WAIT_OBJECT_0:
- if (!sigismember (set, _my_tls.infodata.si_signo))
- {
- set_errno (EINTR);
- res = -1;
- }
- else
- {
- if (info)
- *info = _my_tls.infodata;
- res = _my_tls.infodata.si_signo;
- InterlockedExchange ((LONG *) &_my_tls.sig, (LONG) 0);
- }
- break;
- default:
- __seterrno ();
- res = -1;
- }
- CloseHandle (h);
- sigproc_printf ("returning sig %d", res);
- return res;
-}
-
-/* FIXME: SUSv3 says that this function should block until the signal has
- actually been delivered. Currently, this will only happen when sending
- signals to the current process. It will not happen when sending signals
- to other processes. */
-extern "C" int
-sigqueue (pid_t pid, int sig, const union sigval value)
-{
- siginfo_t si = {0};
- pinfo dest (pid);
- if (!dest)
- {
- set_errno (ESRCH);
- return -1;
- }
- si.si_signo = sig;
- si.si_code = SI_QUEUE;
- si.si_value = value;
- return sig_send (dest, si);
-}
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
deleted file mode 100644
index 34e4c53..0000000
--- a/winsup/cygwin/sigproc.cc
+++ /dev/null
@@ -1,1282 +0,0 @@
-/* sigproc.cc: inter/intra signal and sub process handler
-
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008 Red Hat, Inc.
-
- Written by Christopher Faylor
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "miscfuncs.h"
-#include <stdlib.h>
-#include <sys/cygwin.h>
-#include "cygerrno.h"
-#include "pinfo.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "child_info_magic.h"
-#include "shared_info.h"
-#include "cygtls.h"
-#include "sigproc.h"
-#include "ntdll.h"
-
-/*
- * Convenience defines
- */
-#define WSSC 60000 // Wait for signal completion
-#define WPSP 40000 // Wait for proc_subproc mutex
-
-#define no_signals_available(x) (!hwait_sig || hwait_sig == INVALID_HANDLE_VALUE || ((x) && myself->exitcode & EXITCODE_SET) || &_my_tls == _sig_tls)
-
-#define NPROCS 256
-
-/*
- * Global variables
- */
-struct sigaction *global_sigs;
-
-const char *__sp_fn ;
-int __sp_ln;
-
-char NO_COPY myself_nowait_dummy[1] = {'0'};// Flag to sig_send that signal goes to
- // current process but no wait is required
-HANDLE NO_COPY signal_arrived; // Event signaled when a signal has
- // resulted in a user-specified
- // function call
-
-#define Static static NO_COPY
-
-HANDLE NO_COPY sigCONT; // Used to "STOP" a process
-
-cygthread NO_COPY *hwait_sig;
-Static HANDLE wait_sig_inited; // Control synchronization of
- // message queue startup
-Static bool sigheld; // True if holding signals
-
-Static int nprocs; // Number of deceased children
-Static char cprocs[(NPROCS + 1) * sizeof (pinfo)];// All my children info
-#define procs ((pinfo *) cprocs) // All this just to avoid expensive
- // constructor operation at DLL startup
-Static waitq waitq_head; // Start of queue for wait'ing threads
-
-Static muto sync_proc_subproc; // Control access to subproc stuff
-
-_cygtls NO_COPY *_sig_tls;
-
-Static HANDLE my_sendsig;
-Static HANDLE my_readsig;
-
-/* Function declarations */
-static int __stdcall checkstate (waitq *) __attribute__ ((regparm (1)));
-static __inline__ bool get_proc_lock (DWORD, DWORD);
-static bool __stdcall remove_proc (int);
-static bool __stdcall stopped_or_terminated (waitq *, _pinfo *);
-static DWORD WINAPI wait_sig (VOID *arg);
-
-/* wait_sig bookkeeping */
-
-class pending_signals
-{
- sigpacket sigs[NSIG + 1];
- sigpacket start;
- sigpacket *end;
- sigpacket *prev;
- sigpacket *curr;
-public:
- void reset () {curr = &start; prev = &start;}
- void add (sigpacket&);
- void del ();
- sigpacket *next ();
- sigpacket *save () const {return curr;}
- void restore (sigpacket *saved) {curr = saved;}
- friend void __stdcall sig_dispatch_pending (bool);
- friend DWORD WINAPI wait_sig (VOID *arg);
-};
-
-Static pending_signals sigq;
-
-/* Functions */
-void __stdcall
-sigalloc ()
-{
- cygheap->sigs = global_sigs =
- (struct sigaction *) ccalloc_abort (HEAP_SIGS, NSIG, sizeof (struct sigaction));
- global_sigs[SIGSTOP].sa_flags = SA_RESTART | SA_NODEFER;
-}
-
-void __stdcall
-signal_fixup_after_exec ()
-{
- global_sigs = cygheap->sigs;
- /* Set up child's signal handlers */
- for (int i = 0; i < NSIG; i++)
- {
- global_sigs[i].sa_mask = 0;
- if (global_sigs[i].sa_handler != SIG_IGN)
- {
- global_sigs[i].sa_handler = SIG_DFL;
- global_sigs[i].sa_flags &= ~ SA_SIGINFO;
- }
- }
-}
-
-void __stdcall
-wait_for_sigthread (bool forked)
-{
- char char_sa_buf[1024];
- PSECURITY_ATTRIBUTES sa_buf = sec_user_nih ((PSECURITY_ATTRIBUTES) char_sa_buf, cygheap->user.sid());
- if (!CreatePipe (&my_readsig, &my_sendsig, sa_buf, 0))
- api_fatal ("couldn't create signal pipe%s, %E", forked ? " for forked process" : "");
- ProtectHandle (my_readsig);
- myself->sendsig = my_sendsig;
-
- myself->process_state |= PID_ACTIVE;
- myself->process_state &= ~PID_INITIALIZING;
-
- sigproc_printf ("wait_sig_inited %p", wait_sig_inited);
- HANDLE hsig_inited = wait_sig_inited;
- WaitForSingleObject (hsig_inited, INFINITE);
- wait_sig_inited = NULL;
- ForceCloseHandle1 (hsig_inited, wait_sig_inited);
- SetEvent (sigCONT);
- sigproc_printf ("process/signal handling enabled, state %p", myself->process_state);
-}
-
-/* Get the sync_proc_subproc muto to control access to
- * children, proc arrays.
- * Attempt to handle case where process is exiting as we try to grab
- * the mutex.
- */
-static bool
-get_proc_lock (DWORD what, DWORD val)
-{
- Static int lastwhat = -1;
- if (!sync_proc_subproc)
- {
- sigproc_printf ("sync_proc_subproc is NULL (1)");
- return false;
- }
- if (sync_proc_subproc.acquire (WPSP))
- {
- lastwhat = what;
- return true;
- }
- if (!sync_proc_subproc)
- {
- sigproc_printf ("sync_proc_subproc is NULL (2)");
- return false;
- }
- system_printf ("Couldn't aquire sync_proc_subproc for(%d,%d), last %d, %E",
- what, val, lastwhat);
- return true;
-}
-
-static bool __stdcall
-proc_can_be_signalled (_pinfo *p)
-{
- if (!(p->exitcode & EXITCODE_SET))
- {
- if (ISSTATE (p, PID_INITIALIZING) ||
- (((p)->process_state & (PID_ACTIVE | PID_IN_USE)) ==
- (PID_ACTIVE | PID_IN_USE)))
- return true;
- }
-
- set_errno (ESRCH);
- return false;
-}
-
-bool __stdcall
-pid_exists (pid_t pid)
-{
- return pinfo (pid)->exists ();
-}
-
-/* Return true if this is one of our children, false otherwise. */
-static inline bool __stdcall
-mychild (int pid)
-{
- for (int i = 0; i < nprocs; i++)
- if (procs[i]->pid == pid)
- return true;
- return false;
-}
-
-/* Handle all subprocess requests
- */
-int __stdcall
-proc_subproc (DWORD what, DWORD val)
-{
- int rc = 1;
- int potential_match;
- _pinfo *child;
- int clearing;
- waitq *w;
-
-#define wval ((waitq *) val)
-#define vchild (*((pinfo *) val))
-
- sigproc_printf ("args: %x, %d", what, val);
-
- if (!get_proc_lock (what, val)) // Serialize access to this function
- {
- system_printf ("couldn't get proc lock. what %d, val %d", what, val);
- goto out1;
- }
-
- switch (what)
- {
- /* Add a new subprocess to the children arrays.
- * (usually called from the main thread)
- */
- case PROC_ADDCHILD:
- /* Filled up process table? */
- if (nprocs >= NPROCS)
- {
- sigproc_printf ("proc table overflow: hit %d processes, pid %d\n",
- nprocs, vchild->pid);
- rc = 0;
- set_errno (EAGAIN);
- break;
- }
- /* fall through intentionally */
-
- case PROC_DETACHED_CHILD:
- if (vchild != myself)
- {
- vchild->ppid = what == PROC_DETACHED_CHILD ? 1 : myself->pid;
- vchild->uid = myself->uid;
- vchild->gid = myself->gid;
- vchild->pgid = myself->pgid;
- vchild->sid = myself->sid;
- vchild->ctty = myself->ctty;
- vchild->cygstarted = true;
- vchild->process_state |= PID_INITIALIZING | (myself->process_state & PID_USETTY);
- }
- if (what == PROC_DETACHED_CHILD)
- break;
- procs[nprocs] = vchild;
- rc = procs[nprocs].wait ();
- if (rc)
- {
- sigproc_printf ("added pid %d to proc table, slot %d", vchild->pid,
- nprocs);
- nprocs++;
- }
- break;
-
- /* Handle a wait4() operation. Allocates an event for the calling
- * thread which is signaled when the appropriate pid exits or stops.
- * (usually called from the main thread)
- */
- case PROC_WAIT:
- wval->ev = NULL; // Don't know event flag yet
-
- if (wval->pid == -1 || !wval->pid)
- child = NULL; // Not looking for a specific pid
- else if (!mychild (wval->pid))
- goto out; // invalid pid. flag no such child
-
- wval->status = 0; // Don't know status yet
- sigproc_printf ("wval->pid %d, wval->options %d", wval->pid, wval->options);
-
- /* If the first time for this thread, create a new event, otherwise
- * reset the event.
- */
- if ((wval->ev = wval->thread_ev) == NULL)
- {
- wval->ev = wval->thread_ev = CreateEvent (&sec_none_nih, TRUE, FALSE,
- NULL);
- ProtectHandle1 (wval->ev, wq_ev);
- }
-
- ResetEvent (wval->ev);
- w = waitq_head.next;
- waitq_head.next = wval; /* Add at the beginning. */
- wval->next = w; /* Link in rest of the list. */
- clearing = 0;
- goto scan_wait;
-
- /* Clear all waiting threads. Called from exceptions.cc prior to
- the main thread's dispatch to a signal handler function.
- (called from wait_sig thread) */
- case PROC_CLEARWAIT:
- /* Clear all "wait"ing threads. */
- if (val)
- sigproc_printf ("clear waiting threads");
- else
- sigproc_printf ("looking for processes to reap, nprocs %d", nprocs);
- clearing = val;
-
- scan_wait:
- /* Scan the linked list of wait()ing threads. If a wait's parameters
- match this pid, then activate it. */
- for (w = &waitq_head; w->next != NULL; w = w->next)
- {
- if ((potential_match = checkstate (w)) > 0)
- sigproc_printf ("released waiting thread");
- else if (!clearing && !(w->next->options & WNOHANG) && potential_match < 0)
- sigproc_printf ("only found non-terminated children");
- else if (potential_match <= 0) // nothing matched
- {
- sigproc_printf ("waiting thread found no children");
- HANDLE oldw = w->next->ev;
- w->next->pid = 0;
- if (clearing)
- w->next->status = -1; /* flag that a signal was received */
- else if (!potential_match || !(w->next->options & WNOHANG))
- w->next->ev = NULL;
- if (!SetEvent (oldw))
- system_printf ("couldn't wake up wait event %p, %E", oldw);
- w->next = w->next->next;
- }
- if (w->next == NULL)
- break;
- }
-
- if (!clearing)
- sigproc_printf ("finished processing terminated/stopped child");
- else
- {
- waitq_head.next = NULL;
- sigproc_printf ("finished clearing");
- }
-
- if (global_sigs[SIGCHLD].sa_handler == (void *) SIG_IGN)
- for (int i = 0; i < nprocs; i += remove_proc (i))
- continue;
- }
-
-out:
- sync_proc_subproc.release (); // Release the lock
-out1:
- sigproc_printf ("returning %d", rc);
- return rc;
-#undef wval
-#undef vchild
-}
-
-// FIXME: This is inelegant
-void
-_cygtls::remove_wq (DWORD wait)
-{
- if (exit_state < ES_FINAL && sync_proc_subproc
- && sync_proc_subproc.acquire (wait))
- {
- for (waitq *w = &waitq_head; w->next != NULL; w = w->next)
- if (w->next == &wq)
- {
- ForceCloseHandle1 (wq.thread_ev, wq_ev);
- w->next = wq.next;
- break;
- }
- sync_proc_subproc.release ();
- }
-}
-
-/* Terminate the wait_subproc thread.
- Called on process exit.
- Also called by spawn_guts to disassociate any subprocesses from this
- process. Subprocesses will then know to clean up after themselves and
- will not become procs. */
-void __stdcall
-proc_terminate ()
-{
- sigproc_printf ("nprocs %d", nprocs);
- if (nprocs)
- {
- sync_proc_subproc.acquire (WPSP);
-
- proc_subproc (PROC_CLEARWAIT, 1);
-
- /* Clean out proc processes from the pid list. */
- int i;
- for (i = 0; i < nprocs; i++)
- {
- procs[i]->ppid = 1;
- if (procs[i].wait_thread)
- {
- // CloseHandle (procs[i].rd_proc_pipe);
- procs[i].wait_thread->terminate_thread ();
- }
- procs[i].release ();
- }
- nprocs = 0;
- sync_proc_subproc.release ();
- }
- sigproc_printf ("leaving");
-}
-
-/* Clear pending signal */
-void __stdcall
-sig_clear (int target_sig)
-{
- if (&_my_tls != _sig_tls)
- sig_send (myself, -target_sig);
- else
- {
- sigpacket *q;
- sigpacket *save = sigq.save ();
- sigq.reset ();
- while ((q = sigq.next ()))
- if (q->si.si_signo == target_sig)
- {
- q->si.si_signo = __SIGDELETE;
- break;
- }
- sigq.restore (save);
- }
-}
-
-extern "C" int
-sigpending (sigset_t *mask)
-{
- sigset_t outset = (sigset_t) sig_send (myself, __SIGPENDING);
- if (outset == SIG_BAD_MASK)
- return -1;
- *mask = outset;
- return 0;
-}
-
-/* Force the wait_sig thread to wake up and scan for pending signals */
-void __stdcall
-sig_dispatch_pending (bool fast)
-{
- if (exit_state || &_my_tls == _sig_tls)
- {
-#ifdef DEBUGGING
- sigproc_printf ("exit_state %d, cur thread id %p, _sig_tls %p, sigq.start.next %p",
- exit_state, GetCurrentThreadId (), _sig_tls, sigq.start.next);
-#endif
- return;
- }
-
-#ifdef DEBUGGING
- sigproc_printf ("flushing");
-#endif
- sig_send (myself, fast ? __SIGFLUSHFAST : __SIGFLUSH);
-}
-
-void __stdcall
-create_signal_arrived ()
-{
- if (signal_arrived)
- return;
- /* local event signaled when main thread has been dispatched
- to a signal handler function. */
- signal_arrived = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL);
- ProtectHandle (signal_arrived);
-}
-
-/* Signal thread initialization. Called from dll_crt0_1.
-
- This routine starts the signal handling thread. The wait_sig_inited
- event is used to signal that the thread is ready to handle signals.
- We don't wait for this during initialization but instead detect it
- in sig_send to gain a little concurrency. */
-void __stdcall
-sigproc_init ()
-{
- wait_sig_inited = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL);
- ProtectHandle (wait_sig_inited);
-
- /* sync_proc_subproc is used by proc_subproc. It serialises
- access to the children and proc arrays. */
- sync_proc_subproc.init ("sync_proc_subproc");
-
- hwait_sig = new cygthread (wait_sig, 0, cygself, "sig");
- hwait_sig->zap_h ();
-}
-
-/* Called on process termination to terminate signal and process threads.
- */
-void __stdcall
-sigproc_terminate (exit_states es)
-{
- exit_states prior_exit_state = exit_state;
- exit_state = es;
- if (prior_exit_state >= ES_FINAL)
- sigproc_printf ("already performed");
- else
- {
- sigproc_printf ("entering");
- sig_send (myself_nowait, __SIGEXIT);
- proc_terminate (); // clean up process stuff
- }
-}
-
-int __stdcall
-sig_send (_pinfo *p, int sig)
-{
- if (sig == __SIGHOLD)
- sigheld = true;
- else if (!sigheld)
- /* nothing */;
- else if (sig == __SIGFLUSH || sig == __SIGFLUSHFAST)
- return 0;
- else if (sig == __SIGNOHOLD || sig == __SIGEXIT)
- {
- SetEvent (sigCONT);
- sigheld = false;
- }
- else if (&_my_tls == _main_tls)
- {
-#ifdef DEBUGGING
- system_printf ("signal %d sent to %p while signals are on hold", sig, p);
-#endif
- return -1;
- }
- siginfo_t si = {0};
- si.si_signo = sig;
- si.si_code = SI_KERNEL;
- si.si_pid = si.si_uid = si.si_errno = 0;
- return sig_send (p, si);
-}
-
-/* Send a signal to another process by raising its signal semaphore.
- If pinfo *p == NULL, send to the current process.
- If sending to this process, wait for notification that a signal has
- completed before returning. */
-int __stdcall
-sig_send (_pinfo *p, siginfo_t& si, _cygtls *tls)
-{
- int rc = 1;
- bool its_me;
- HANDLE sendsig;
- sigpacket pack;
- bool communing = si.si_signo == __SIGCOMMUNE;
-
- pack.wakeup = NULL;
- bool wait_for_completion;
- if (!(its_me = (p == NULL || p == myself || p == myself_nowait)))
- {
- /* It is possible that the process is not yet ready to receive messages
- * or that it has exited. Detect this.
- */
- if (!proc_can_be_signalled (p)) /* Is the process accepting messages? */
- {
- sigproc_printf ("invalid pid %d(%x), signal %d",
- p->pid, p->process_state, si.si_signo);
- goto out;
- }
- wait_for_completion = false;
- }
- else
- {
- if (no_signals_available (si.si_signo != __SIGEXIT))
- {
- sigproc_printf ("my_sendsig %p, myself->sendsig %p, exit_state %d",
- my_sendsig, myself->sendsig, exit_state);
- set_errno (EAGAIN);
- goto out; // Either exiting or not yet initializing
- }
- if (wait_sig_inited)
- wait_for_sigthread ();
- wait_for_completion = p != myself_nowait && _my_tls.isinitialized () && !exit_state;
- p = myself;
- }
-
-
- if (its_me)
- sendsig = my_sendsig;
- else
- {
- HANDLE dupsig;
- DWORD dwProcessId;
- for (int i = 0; !p->sendsig && i < 10000; i++)
- low_priority_sleep (0);
- if (p->sendsig)
- {
- dupsig = p->sendsig;
- dwProcessId = p->dwProcessId;
- }
- else
- {
- dupsig = p->exec_sendsig;
- dwProcessId = p->exec_dwProcessId;
- }
- if (!dupsig)
- {
- set_errno (EAGAIN);
- sigproc_printf ("sendsig handle never materialized");
- goto out;
- }
- HANDLE hp = OpenProcess (PROCESS_DUP_HANDLE, false, dwProcessId);
- if (!hp)
- {
- __seterrno ();
- sigproc_printf ("OpenProcess failed, %E");
- goto out;
- }
- VerifyHandle (hp);
- if (!DuplicateHandle (hp, dupsig, hMainProc, &sendsig, false, 0,
- DUPLICATE_SAME_ACCESS) || !sendsig)
- {
- __seterrno ();
- sigproc_printf ("DuplicateHandle failed, %E");
- CloseHandle (hp);
- goto out;
- }
- VerifyHandle (sendsig);
- if (!communing)
- CloseHandle (hp);
- else
- {
- si._si_commune._si_process_handle = hp;
-
- HANDLE& tome = si._si_commune._si_write_handle;
- HANDLE& fromthem = si._si_commune._si_read_handle;
- if (!CreatePipe (&fromthem, &tome, &sec_all_nih, 0))
- {
- sigproc_printf ("CreatePipe for __SIGCOMMUNE failed, %E");
- __seterrno ();
- goto out;
- }
- if (!DuplicateHandle (hMainProc, tome, hp, &tome, false, 0,
- DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE))
- {
- sigproc_printf ("DuplicateHandle for __SIGCOMMUNE failed, %E");
- __seterrno ();
- goto out;
- }
- }
- }
-
- sigproc_printf ("sendsig %p, pid %d, signal %d, its_me %d", sendsig, p->pid, si.si_signo, its_me);
-
- sigset_t pending;
- if (!its_me)
- pack.mask = NULL;
- else if (si.si_signo == __SIGPENDING)
- pack.mask = &pending;
- else if (si.si_signo == __SIGFLUSH || si.si_signo > 0)
- pack.mask = tls ? &tls->sigmask : &_main_tls->sigmask;
- else
- pack.mask = NULL;
-
- pack.si = si;
- if (!pack.si.si_pid)
- pack.si.si_pid = myself->pid;
- if (!pack.si.si_uid)
- pack.si.si_uid = myself->uid;
- pack.pid = myself->pid;
- pack.tls = tls;
- if (wait_for_completion)
- {
- pack.wakeup = CreateEvent (&sec_none_nih, FALSE, FALSE, NULL);
- sigproc_printf ("wakeup %p", pack.wakeup);
- ProtectHandle (pack.wakeup);
- }
-
- char *leader;
- size_t packsize;
- if (!communing || !(si._si_commune._si_code & PICOM_EXTRASTR))
- {
- leader = (char *) &pack;
- packsize = sizeof (pack);
- }
- else
- {
- size_t n = strlen (si._si_commune._si_str);
- char *p = leader = (char *) alloca (sizeof (pack) + sizeof (n) + n);
- memcpy (p, &pack, sizeof (pack)); p += sizeof (pack);
- memcpy (p, &n, sizeof (n)); p += sizeof (n);
- memcpy (p, si._si_commune._si_str, n); p += n;
- packsize = p - leader;
- }
-
- DWORD nb;
- if (!WriteFile (sendsig, leader, packsize, &nb, NULL) || nb != packsize)
- {
- /* Couldn't send to the pipe. This probably means that the
- process is exiting. */
- if (!its_me)
- {
- __seterrno ();
- sigproc_printf ("WriteFile for pipe %p failed, %E", sendsig);
- ForceCloseHandle (sendsig);
- }
- else
- {
- if (no_signals_available (true))
- sigproc_printf ("I'm going away now");
- else if (!p->exec_sendsig)
- system_printf ("error sending signal %d to pid %d, pipe handle %p, %E",
- si.si_signo, p->pid, sendsig);
- set_errno (EACCES);
- }
- goto out;
- }
-
-
- /* No need to wait for signal completion unless this was a signal to
- this process.
-
- If it was a signal to this process, wait for a dispatched signal.
- Otherwise just wait for the wait_sig to signal that it has finished
- processing the signal. */
- if (wait_for_completion)
- {
- sigproc_printf ("Waiting for pack.wakeup %p", pack.wakeup);
- rc = WaitForSingleObject (pack.wakeup, WSSC);
- ForceCloseHandle (pack.wakeup);
- }
- else
- {
- rc = WAIT_OBJECT_0;
- sigproc_printf ("Not waiting for sigcomplete. its_me %d signal %d",
- its_me, si.si_signo);
- if (!its_me)
- ForceCloseHandle (sendsig);
- }
-
- pack.wakeup = NULL;
- if (rc == WAIT_OBJECT_0)
- rc = 0; // Successful exit
- else
- {
- if (!no_signals_available (true))
- system_printf ("wait for sig_complete event failed, signal %d, rc %d, %E",
- si.si_signo, rc);
- set_errno (ENOSYS);
- rc = -1;
- }
-
- if (wait_for_completion && si.si_signo != __SIGFLUSHFAST)
- _my_tls.call_signal_handler ();
- goto out;
-
-out:
- if (communing && rc)
- {
- if (si._si_commune._si_process_handle)
- CloseHandle (si._si_commune._si_process_handle);
- if (si._si_commune._si_read_handle)
- CloseHandle (si._si_commune._si_read_handle);
- }
- if (pack.wakeup)
- ForceCloseHandle (pack.wakeup);
- if (si.si_signo != __SIGPENDING)
- /* nothing */;
- else if (!rc)
- rc = (int) pending;
- else
- rc = SIG_BAD_MASK;
- sigproc_printf ("returning %p from sending signal %d", rc, si.si_signo);
- return rc;
-}
-
-int child_info::retry_count = 10;
-/* Initialize some of the memory block passed to child processes
- by fork/spawn/exec. */
-
-child_info::child_info (unsigned in_cb, child_info_types chtype, bool need_subproc_ready)
-{
- memset (this, 0, in_cb);
- cb = in_cb;
-
- /* It appears that when running under WOW64 on Vista 64, the first DWORD
- value in the datastructure lpReserved2 is pointing to (msv_count in
- Cygwin), has to reflect the size of that datastructure as used in the
- Microsoft C runtime (a count value, counting the number of elements in
- two subsequent arrays, BYTE[count and HANDLE[count]), even though the C
- runtime isn't used. Otherwise, if msv_count is 0 or too small, the
- datastructure gets overwritten.
-
- This seems to be a bug in Vista's WOW64, which apparently copies the
- lpReserved2 datastructure not using the cbReserved2 size information,
- but using the information given in the first DWORD within lpReserved2
- instead. 32 bit Windows and former WOW64 don't care if msv_count is 0
- or a sensible non-0 count value. However, it's not clear if a non-0
- count doesn't result in trying to evaluate the content, so we do this
- really only for Vista 64 for now.
-
- Note: It turns out that a non-zero value *does* harm operation on
- XP 64 and 2K3 64 (Crash in CreateProcess call).
-
- The value is sizeof (child_info_*) / 5 which results in a count which
- covers the full datastructure, plus not more than 4 extra bytes. This
- is ok as long as the child_info structure is cosily stored within a bigger
- datastructure. */
- msv_count = wincap.needs_count_in_si_lpres2 () ? in_cb / 5 : 0;
-
- intro = PROC_MAGIC_GENERIC;
- magic = CHILD_INFO_MAGIC;
- type = chtype;
- fhandler_union_cb = sizeof (fhandler_union);
- user_h = cygwin_user_h;
- if (strace.attached ())
- flag |= _CI_STRACED;
- if (need_subproc_ready)
- {
- subproc_ready = CreateEvent (&sec_all, FALSE, FALSE, NULL);
- flag |= _CI_ISCYGWIN;
- }
- sigproc_printf ("subproc_ready %p", subproc_ready);
- cygheap = ::cygheap;
- cygheap_max = ::cygheap_max;
- retry = child_info::retry_count;
- /* Create an inheritable handle to pass to the child process. This will
- allow the child to duplicate handles from the parent to itself. */
- parent = NULL;
- if (!DuplicateHandle (hMainProc, hMainProc, hMainProc, &parent, 0, TRUE,
- DUPLICATE_SAME_ACCESS))
- system_printf ("couldn't create handle to myself for child, %E");
-}
-
-child_info::~child_info ()
-{
- if (subproc_ready)
- CloseHandle (subproc_ready);
- if (parent)
- CloseHandle (parent);
-}
-
-child_info_fork::child_info_fork () :
- child_info (sizeof *this, _PROC_FORK, true)
-{
-}
-
-child_info_spawn::child_info_spawn (child_info_types chtype, bool need_subproc_ready) :
- child_info (sizeof *this, chtype, need_subproc_ready)
-{
-}
-
-void
-child_info::ready (bool execed)
-{
- if (!subproc_ready)
- {
- sigproc_printf ("subproc_ready not set");
- return;
- }
-
- if (dynamically_loaded)
- sigproc_printf ("not really ready");
- else if (!SetEvent (subproc_ready))
- api_fatal ("SetEvent failed");
- else
- sigproc_printf ("signalled %p that I was ready", subproc_ready);
-
- if (execed)
- {
- CloseHandle (subproc_ready);
- subproc_ready = NULL;
- }
-}
-
-bool
-child_info::sync (pid_t pid, HANDLE& hProcess, DWORD howlong)
-{
- bool res;
- HANDLE w4[2];
- unsigned n = 0;
- unsigned nsubproc_ready;
-
- if (!subproc_ready)
- nsubproc_ready = WAIT_OBJECT_0 + 3;
- else
- {
- w4[n++] = subproc_ready;
- nsubproc_ready = 0;
- }
- w4[n++] = hProcess;
-
- sigproc_printf ("n %d, waiting for subproc_ready(%p) and child process(%p)", n, w4[0], w4[1]);
- DWORD x = WaitForMultipleObjects (n, w4, FALSE, howlong);
- x -= WAIT_OBJECT_0;
- if (x >= n)
- {
- system_printf ("wait failed, pid %u, %E", pid);
- res = false;
- }
- else
- {
- if (x != nsubproc_ready)
- {
- res = false;
- GetExitCodeProcess (hProcess, &exit_code);
- }
- else
- {
- res = true;
- exit_code = STILL_ACTIVE;
- if (type == _PROC_EXEC && myself->wr_proc_pipe)
- {
- ForceCloseHandle1 (hProcess, childhProc);
- hProcess = NULL;
- }
- }
- sigproc_printf ("pid %u, WFMO returned %d, res %d", pid, x, res);
- }
- return res;
-}
-
-DWORD
-child_info::proc_retry (HANDLE h)
-{
- if (!exit_code)
- return EXITCODE_OK;
- switch (exit_code)
- {
- case STILL_ACTIVE: /* shouldn't happen */
- sigproc_printf ("STILL_ACTIVE? How'd we get here?");
- break;
- case STATUS_DLL_NOT_FOUND:
- return exit_code;
- case STATUS_CONTROL_C_EXIT:
- if (saw_ctrl_c ())
- return EXITCODE_OK;
- /* fall through intentionally */
- case STATUS_DLL_INIT_FAILED:
- case STATUS_DLL_INIT_FAILED_LOGOFF:
- case EXITCODE_RETRY:
- if (retry-- > 0)
- exit_code = 0;
- break;
- /* Count down non-recognized exit codes more quickly since they aren't
- due to known conditions. */
- default:
- if (!iscygwin () && (exit_code & 0xffff0000) != 0xc0000000)
- break;
- if ((retry -= 2) < 0)
- retry = 0;
- else
- exit_code = 0;
- }
- if (!exit_code)
- ForceCloseHandle1 (h, childhProc);
- return exit_code;
-}
-
-bool
-child_info_fork::handle_failure (DWORD err)
-{
- if (retry > 0)
- ExitProcess (EXITCODE_RETRY);
- return 0;
-}
-
-/* Check the state of all of our children to see if any are stopped or
- * terminated.
- */
-static int __stdcall
-checkstate (waitq *parent_w)
-{
- int potential_match = 0;
-
- sigproc_printf ("nprocs %d", nprocs);
-
- /* Check already dead processes first to see if they match the criteria
- * given in w->next. */
- int res;
- for (int i = 0; i < nprocs; i++)
- if ((res = stopped_or_terminated (parent_w, procs[i])))
- {
- remove_proc (i);
- potential_match = 1;
- goto out;
- }
-
- sigproc_printf ("no matching terminated children found");
- potential_match = -!!nprocs;
-
-out:
- sigproc_printf ("returning %d", potential_match);
- return potential_match;
-}
-
-/* Remove a proc from procs by swapping it with the last child in the list.
- Also releases shared memory of exited processes. */
-static bool __stdcall
-remove_proc (int ci)
-{
- if (procs[ci]->exists ())
- return true;
-
- sigproc_printf ("removing procs[%d], pid %d, nprocs %d", ci, procs[ci]->pid,
- nprocs);
- if (procs[ci] != myself)
- {
- procs[ci].release ();
- if (procs[ci].hProcess)
- ForceCloseHandle1 (procs[ci].hProcess, childhProc);
- }
- if (ci < --nprocs)
- {
- /* Wait for proc_waiter thread to make a copy of this element before
- moving it or it may become confused. The chances are very high that
- the proc_waiter thread has already done this by the time we
- get here. */
- while (!procs[nprocs].waiter_ready)
- low_priority_sleep (0);
- procs[ci] = procs[nprocs];
- }
- return 0;
-}
-
-/* Check status of child process vs. waitq member.
-
- parent_w is the pointer to the parent of the waitq member in question.
- child is the subprocess being considered.
-
- Returns non-zero if waiting thread released. */
-static bool __stdcall
-stopped_or_terminated (waitq *parent_w, _pinfo *child)
-{
- int might_match;
- waitq *w = parent_w->next;
-
- sigproc_printf ("considering pid %d", child->pid);
- if (w->pid == -1)
- might_match = 1;
- else if (w->pid == 0)
- might_match = child->pgid == myself->pgid;
- else if (w->pid < 0)
- might_match = child->pgid == -w->pid;
- else
- might_match = (w->pid == child->pid);
-
- if (!might_match)
- return 0;
-
- int terminated;
-
- if (!((terminated = (child->process_state == PID_EXITED)) ||
- ((w->options & WUNTRACED) && child->stopsig)))
- return 0;
-
- parent_w->next = w->next; /* successful wait. remove from wait queue */
- w->pid = child->pid;
-
- if (!terminated)
- {
- sigproc_printf ("stopped child");
- w->status = (child->stopsig << 8) | 0x7f;
- child->stopsig = 0;
- }
- else
- {
- w->status = (__uint16_t) child->exitcode;
-
- add_rusage (&myself->rusage_children, &child->rusage_children);
- add_rusage (&myself->rusage_children, &child->rusage_self);
-
- if (w->rusage)
- {
- add_rusage ((struct rusage *) w->rusage, &child->rusage_children);
- add_rusage ((struct rusage *) w->rusage, &child->rusage_self);
- }
- }
-
- if (!SetEvent (w->ev)) /* wake up wait4 () immediately */
- system_printf ("couldn't wake up wait event %p, %E", w->ev);
- return true;
-}
-
-static void
-talktome (siginfo_t *si)
-{
- unsigned size = sizeof (*si);
- sigproc_printf ("pid %d wants some information", si->si_pid);
- if (si->_si_commune._si_code & PICOM_EXTRASTR)
- {
- size_t n;
- DWORD nb;
- if (!ReadFile (my_readsig, &n, sizeof (n), &nb, NULL) || nb != sizeof (n))
- return;
- siginfo_t *newsi = (siginfo_t *) alloca (size += n + 1);
- *newsi = *si;
- newsi->_si_commune._si_str = (char *) (newsi + 1);
- if (!ReadFile (my_readsig, newsi->_si_commune._si_str, n, &nb, NULL) || nb != n)
- return;
- newsi->_si_commune._si_str[n] = '\0';
- si = newsi;
- }
-
- pinfo pi (si->si_pid);
- if (pi)
- new cygthread (commune_process, size, si, "commune_process");
-}
-
-void
-pending_signals::add (sigpacket& pack)
-{
- sigpacket *se;
- if (sigs[pack.si.si_signo].si.si_signo)
- return;
- se = sigs + pack.si.si_signo;
- *se = pack;
- se->mask = &pack.tls->sigmask;
- se->next = NULL;
- if (end)
- end->next = se;
- end = se;
- if (!start.next)
- start.next = se;
-}
-
-void
-pending_signals::del ()
-{
- sigpacket *next = curr->next;
- prev->next = next;
- curr->si.si_signo = 0;
-#ifdef DEBUGGING
- curr->next = NULL;
-#endif
- if (end == curr)
- end = prev;
- curr = next;
-}
-
-sigpacket *
-pending_signals::next ()
-{
- sigpacket *res;
- prev = curr;
- if (!curr || !(curr = curr->next))
- res = NULL;
- else
- res = curr;
- return res;
-}
-
-/* Process signals by waiting for signal data to arrive in a pipe.
- Set a completion event if one was specified. */
-static DWORD WINAPI
-wait_sig (VOID *)
-{
- /* Initialization */
- SetThreadPriority (GetCurrentThread (), WAIT_SIG_PRIORITY);
-
- sigCONT = CreateEvent (&sec_none_nih, FALSE, FALSE, NULL);
-
- SetEvent (wait_sig_inited);
-
- _sig_tls = &_my_tls;
- sigproc_printf ("entering ReadFile loop, my_readsig %p, my_sendsig %p",
- my_readsig, my_sendsig);
-
- sigpacket pack;
- pack.si.si_signo = __SIGHOLD;
- for (;;)
- {
- if (pack.si.si_signo == __SIGHOLD)
- WaitForSingleObject (sigCONT, INFINITE);
- DWORD nb;
- pack.tls = NULL;
- if (!ReadFile (my_readsig, &pack, sizeof (pack), &nb, NULL))
- break;
-
- if (nb != sizeof (pack))
- {
- system_printf ("short read from signal pipe: %d != %d", nb,
- sizeof (pack));
- continue;
- }
-
- if (!pack.si.si_signo)
- {
-#ifdef DEBUGGING
- system_printf ("zero signal?");
-#endif
- continue;
- }
-
- sigset_t dummy_mask;
- if (!pack.mask)
- {
- dummy_mask = _main_tls->sigmask;
- pack.mask = &dummy_mask;
- }
-
- sigpacket *q;
- bool clearwait = false;
- switch (pack.si.si_signo)
- {
- case __SIGCOMMUNE:
- talktome (&pack.si);
- break;
- case __SIGSTRACE:
- strace.hello ();
- break;
- case __SIGPENDING:
- *pack.mask = 0;
- unsigned bit;
- sigq.reset ();
- while ((q = sigq.next ()))
- if (pack.tls->sigmask & (bit = SIGTOMASK (q->si.si_signo)))
- *pack.mask |= bit;
- break;
- case __SIGHOLD:
- goto loop;
- break;
- case __SIGNOHOLD:
- case __SIGFLUSH:
- case __SIGFLUSHFAST:
- sigq.reset ();
- while ((q = sigq.next ()))
- {
- int sig = q->si.si_signo;
- if (sig == __SIGDELETE || q->process () > 0)
- sigq.del ();
- if (sig == __SIGNOHOLD && q->si.si_signo == SIGCHLD)
- clearwait = true;
- }
- break;
- case __SIGEXIT:
- hwait_sig = (cygthread *) INVALID_HANDLE_VALUE;
- sigproc_printf ("saw __SIGEXIT");
- break; /* handle below */
- default:
- if (pack.si.si_signo < 0)
- sig_clear (-pack.si.si_signo);
- else
- {
- int sig = pack.si.si_signo;
- // FIXME: REALLY not right when taking threads into consideration.
- // We need a per-thread queue since each thread can have its own
- // list of blocked signals. CGF 2005-08-24
- if (sigq.sigs[sig].si.si_signo && sigq.sigs[sig].tls == pack.tls)
- sigproc_printf ("sig %d already queued", pack.si.si_signo);
- else
- {
- int sigres = pack.process ();
- if (sigres <= 0)
- {
-#ifdef DEBUGGING2
- if (!sigres)
- system_printf ("Failed to arm signal %d from pid %d", pack.sig, pack.pid);
-#endif
- sigq.add (pack); // FIXME: Shouldn't add this in !sh condition
- }
- }
- if (sig == SIGCHLD)
- clearwait = true;
- }
- break;
- }
- if (clearwait)
- proc_subproc (PROC_CLEARWAIT, 0);
- loop:
- if (pack.wakeup)
- {
- sigproc_printf ("signalling pack.wakeup %p", pack.wakeup);
- SetEvent (pack.wakeup);
- }
- if (pack.si.si_signo == __SIGEXIT)
- break;
- }
-
- ForceCloseHandle (my_readsig);
- sigproc_printf ("signal thread exiting");
- ExitThread (0);
-}
diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/sigproc.h
deleted file mode 100644
index 5fef01d..0000000
--- a/winsup/cygwin/sigproc.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* sigproc.h
-
- Copyright 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SIGPROC_H
-#define _SIGPROC_H
-#include <signal.h>
-
-#ifdef NSIG
-enum
-{
- __SIGFLUSH = -(NSIG + 1),
- __SIGSTRACE = -(NSIG + 2),
- __SIGCOMMUNE = -(NSIG + 3),
- __SIGPENDING = -(NSIG + 4),
- __SIGDELETE = -(NSIG + 5),
- __SIGFLUSHFAST = -(NSIG + 6),
- __SIGHOLD = -(NSIG + 7),
- __SIGNOHOLD = -(NSIG + 8),
- __SIGEXIT = -(NSIG + 9)
-};
-#endif
-
-#define SIG_BAD_MASK (1 << (SIGKILL - 1))
-
-enum procstuff
-{
- PROC_ADDCHILD = 1, // add a new subprocess to list
- PROC_DETACHED_CHILD = 2, // set up a detached child
- PROC_CLEARWAIT = 3, // clear all waits - signal arrived
- PROC_WAIT = 4, // setup for wait() for subproc
- PROC_NOTHING = 5 // nothing, really
-};
-
-struct sigpacket
-{
- siginfo_t si;
- pid_t pid;
- class _cygtls *tls;
- sigset_t *mask;
- union
- {
- HANDLE wakeup;
- HANDLE thread_handle;
- struct sigpacket *next;
- };
- int __stdcall process () __attribute__ ((regparm (1)));
-};
-
-extern HANDLE signal_arrived;
-extern HANDLE sigCONT;
-
-void __stdcall sig_dispatch_pending (bool fast = false);
-#ifdef _PINFO_H
-extern "C" void __stdcall set_signal_mask (sigset_t newmask, sigset_t&);
-#endif
-int __stdcall handle_sigprocmask (int sig, const sigset_t *set,
- sigset_t *oldset, sigset_t& opmask)
- __attribute__ ((regparm (3)));
-
-extern "C" void __stdcall reset_signal_arrived ();
-void __stdcall sig_clear (int) __attribute__ ((regparm (1)));
-void __stdcall sig_set_pending (int) __attribute__ ((regparm (1)));
-int __stdcall handle_sigsuspend (sigset_t);
-
-int __stdcall proc_subproc (DWORD, DWORD) __attribute__ ((regparm (2)));
-
-class _pinfo;
-void __stdcall proc_terminate ();
-void __stdcall sigproc_init ();
-#ifdef __INSIDE_CYGWIN__
-void __stdcall sigproc_terminate (enum exit_states);
-#endif
-bool __stdcall pid_exists (pid_t) __attribute__ ((regparm(1)));
-int __stdcall sig_send (_pinfo *, siginfo_t&, class _cygtls *tls = NULL) __attribute__ ((regparm (3)));
-int __stdcall sig_send (_pinfo *, int) __attribute__ ((regparm (2)));
-void __stdcall signal_fixup_after_exec ();
-void __stdcall wait_for_sigthread (bool = false);
-void __stdcall sigalloc ();
-void __stdcall create_signal_arrived ();
-
-int kill_pgrp (pid_t, siginfo_t&);
-int killsys (pid_t, int);
-
-extern char myself_nowait_dummy[];
-
-extern struct sigaction *global_sigs;
-
-#define WAIT_SIG_PRIORITY THREAD_PRIORITY_NORMAL
-
-#define myself_nowait ((_pinfo *) myself_nowait_dummy)
-#endif /*_SIGPROC_H*/
diff --git a/winsup/cygwin/smallprint.cc b/winsup/cygwin/smallprint.cc
deleted file mode 100644
index 44fc051..0000000
--- a/winsup/cygwin/smallprint.cc
+++ /dev/null
@@ -1,478 +0,0 @@
-/* smallprint.cc: small print routines for WIN32
-
- Copyright 1996, 1998, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2008
- Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "ntdll.h"
-#include <stdlib.h>
-#include <ctype.h>
-#include <wchar.h>
-
-#define LLMASK (0xffffffffffffffffULL)
-#define LMASK (0xffffffff)
-
-#define rnarg(dst, base, dosign, len, pad) __rn ((dst), (base), (dosign), va_arg (ap, long), len, pad, LMASK)
-#define rnargLL(dst, base, dosign, len, pad) __rn ((dst), (base), (dosign), va_arg (ap, unsigned long long), len, pad, LLMASK)
-
-static char __fastcall *
-__rn (char *dst, int base, int dosign, long long val, int len, int pad, unsigned long long mask)
-{
- /* longest number is ULLONG_MAX, 18446744073709551615, 20 digits */
- unsigned long long uval = 0;
- char res[20];
- static const char str[] = "0123456789ABCDEF";
- int l = 0;
-
- if (dosign && val < 0)
- {
- *dst++ = '-';
- uval = -val;
- }
- else if (dosign > 0 && val > 0)
- {
- *dst++ = '+';
- uval = val;
- }
- else
- uval = val;
-
- uval &= mask;
-
- do
- {
- res[l++] = str[uval % base];
- uval /= base;
- }
- while (uval);
-
- while (len-- > l)
- *dst++ = pad;
-
- while (l > 0)
- *dst++ = res[--l];
-
- return dst;
-}
-
-extern "C" int
-__small_vsprintf (char *dst, const char *fmt, va_list ap)
-{
- char tmp[NT_MAX_PATH];
- char *orig = dst;
- const char *s;
- PWCHAR w;
- UNICODE_STRING uw, *us;
-
- DWORD err = GetLastError ();
-
- while (*fmt)
- {
- int i, n = 0x7fff;
- if (*fmt != '%')
- *dst++ = *fmt++;
- else
- {
- int len = 0;
- char pad = ' ';
- int addsign = -1;
-
- switch (*++fmt)
- {
- case '+':
- addsign = 1;
- fmt++;
- break;
- case '%':
- *dst++ = *fmt++;
- continue;
- }
-
- for (;;)
- {
- char c = *fmt++;
- switch (c)
- {
- case '0':
- if (len == 0)
- {
- pad = '0';
- continue;
- }
- case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- len = len * 10 + (c - '0');
- continue;
- case 'l':
- continue;
- case 'c':
- {
- int c = va_arg (ap, int);
- if (c > ' ' && c <= 127)
- *dst++ = c;
- else
- {
- *dst++ = '0';
- *dst++ = 'x';
- dst = __rn (dst, 16, 0, c, len, pad, LMASK);
- }
- }
- break;
- case 'C':
- {
- WCHAR wc = (WCHAR) va_arg (ap, int);
- char buf[4], *c;
- sys_wcstombs (buf, 4, &wc, 1);
- for (c = buf; *c; ++c)
- if (isprint (*c))
- *dst++ = *c;
- else
- {
- *dst++ = '0';
- *dst++ = 'x';
- dst = __rn (dst, 16, 0, *c, len, pad, LMASK);
- }
- }
- case 'E':
- strcpy (dst, "Win32 error ");
- dst = __rn (dst + sizeof ("Win32 error"), 10, 0, err, len, pad, LMASK);
- break;
- case 'd':
- dst = rnarg (dst, 10, addsign, len, pad);
- break;
- case 'D':
- dst = rnargLL (dst, 10, addsign, len, pad);
- break;
- case 'u':
- dst = rnarg (dst, 10, 0, len, pad);
- break;
- case 'U':
- dst = rnargLL (dst, 10, 0, len, pad);
- break;
- case 'o':
- dst = rnarg (dst, 8, 0, len, pad);
- break;
- case 'p':
- *dst++ = '0';
- *dst++ = 'x';
- /* fall through */
- case 'x':
- dst = rnarg (dst, 16, 0, len, pad);
- break;
- case 'X':
- dst = rnargLL (dst, 16, 0, len, pad);
- break;
- case 'P':
- if (!GetModuleFileName (NULL, tmp, NT_MAX_PATH))
- s = "cygwin program";
- else
- s = tmp;
- goto fillin;
- case '.':
- n = strtol (fmt, (char **) &fmt, 10);
- if (*fmt++ != 's')
- goto endfor;
- case 's':
- s = va_arg (ap, char *);
- if (s == NULL)
- s = "(null)";
- fillin:
- for (i = 0; *s && i < n; i++)
- *dst++ = *s++;
- break;
- case 'W':
- w = va_arg (ap, PWCHAR);
- RtlInitUnicodeString (&uw, w);
- us = &uw;
- goto wfillin;
- case 'S':
- us = va_arg (ap, PUNICODE_STRING);
- wfillin:
- {
- char *tmpbuf;
-
- if (!sys_wcstombs_alloc (&tmpbuf, HEAP_NOTHEAP, us->Buffer,
- us->Length / sizeof (WCHAR)))
- {
- s = "invalid UNICODE_STRING";
- goto fillin;
- }
- char *tmp = tmpbuf;
- for (i = 0; *tmp && i < n; i++)
- *dst++ = *tmp++;
- free (tmpbuf);
- }
- break;
- default:
- *dst++ = '?';
- *dst++ = fmt[-1];
- }
- endfor:
- break;
- }
- }
- }
- *dst = 0;
- SetLastError (err);
- return dst - orig;
-}
-
-extern "C" int
-__small_sprintf (char *dst, const char *fmt, ...)
-{
- int r;
- va_list ap;
- va_start (ap, fmt);
- r = __small_vsprintf (dst, fmt, ap);
- va_end (ap);
- return r;
-}
-
-extern "C" void
-small_printf (const char *fmt, ...)
-{
- char buf[16384];
- va_list ap;
- DWORD done;
- int count;
-
-#if 0 /* Turn on to force console errors */
- extern SECURITY_ATTRIBUTES sec_none;
- HANDLE h = CreateFileA ("CONOUT$", GENERIC_READ|GENERIC_WRITE,
- FILE_SHARE_WRITE | FILE_SHARE_WRITE, &sec_none,
- OPEN_EXISTING, 0, 0);
- if (h)
- SetStdHandle (STD_ERROR_HANDLE, h);
-#endif
-
- va_start (ap, fmt);
- count = __small_vsprintf (buf, fmt, ap);
- va_end (ap);
-
- WriteFile (GetStdHandle (STD_ERROR_HANDLE), buf, count, &done, NULL);
- FlushFileBuffers (GetStdHandle (STD_ERROR_HANDLE));
-}
-
-#ifdef DEBUGGING
-static HANDLE NO_COPY console_handle = NULL;
-extern "C" void
-console_printf (const char *fmt, ...)
-{
- char buf[16384];
- va_list ap;
- DWORD done;
- int count;
-
- if (!console_handle)
- console_handle = CreateFileA ("CON", GENERIC_WRITE,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- NULL, OPEN_EXISTING, 0, 0);
-
- if (console_handle == INVALID_HANDLE_VALUE)
- console_handle = GetStdHandle (STD_ERROR_HANDLE);
-
- va_start (ap, fmt);
- count = __small_vsprintf (buf, fmt, ap);
- va_end (ap);
-
- WriteFile (console_handle, buf, count, &done, NULL);
- FlushFileBuffers (console_handle);
-}
-#endif
-
-#define wrnarg(dst, base, dosign, len, pad) __wrn ((dst), (base), (dosign), va_arg (ap, long), len, pad, LMASK)
-#define wrnargLL(dst, base, dosign, len, pad) __wrn ((dst), (base), (dosign), va_arg (ap, unsigned long long), len, pad, LLMASK)
-
-static PWCHAR __fastcall
-__wrn (PWCHAR dst, int base, int dosign, long long val, int len, int pad, unsigned long long mask)
-{
- /* longest number is ULLONG_MAX, 18446744073709551615, 20 digits */
- unsigned long long uval = 0;
- WCHAR res[20];
- static const WCHAR str[] = L"0123456789ABCDEF";
- int l = 0;
-
- if (dosign && val < 0)
- {
- *dst++ = L'-';
- uval = -val;
- }
- else if (dosign > 0 && val > 0)
- {
- *dst++ = L'+';
- uval = val;
- }
- else
- uval = val;
-
- uval &= mask;
-
- do
- {
- res[l++] = str[uval % base];
- uval /= base;
- }
- while (uval);
-
- while (len-- > l)
- *dst++ = pad;
-
- while (l > 0)
- *dst++ = res[--l];
-
- return dst;
-}
-
-extern "C" int
-__small_vswprintf (PWCHAR dst, const WCHAR *fmt, va_list ap)
-{
- WCHAR tmp[NT_MAX_PATH];
- PWCHAR orig = dst;
- const char *s;
- PWCHAR w;
- UNICODE_STRING uw, *us;
-
- DWORD err = GetLastError ();
-
- while (*fmt)
- {
- unsigned int n = 0x7fff;
- if (*fmt != L'%')
- *dst++ = *fmt++;
- else
- {
- int len = 0;
- WCHAR pad = L' ';
- int addsign = -1;
-
- switch (*++fmt)
- {
- case L'+':
- addsign = 1;
- fmt++;
- break;
- case L'%':
- *dst++ = *fmt++;
- continue;
- }
-
- for (;;)
- {
- char c = *fmt++;
- switch (c)
- {
- case L'0':
- if (len == 0)
- {
- pad = L'0';
- continue;
- }
- case L'1' ... L'9':
- len = len * 10 + (c - L'0');
- continue;
- case L'l':
- continue;
- case L'c':
- case L'C':
- {
- unsigned int c = va_arg (ap, unsigned int);
- if (c > L' ' && c <= 127)
- *dst++ = c;
- else
- {
- *dst++ = L'0';
- *dst++ = L'x';
- dst = __wrn (dst, 16, 0, c, len, pad, LMASK);
- }
- }
- break;
- case L'E':
- wcscpy (dst, L"Win32 error ");
- dst = __wrn (dst + sizeof ("Win32 error"), 10, 0, err, len, pad, LMASK);
- break;
- case L'd':
- dst = wrnarg (dst, 10, addsign, len, pad);
- break;
- case L'D':
- dst = wrnargLL (dst, 10, addsign, len, pad);
- break;
- case L'u':
- dst = wrnarg (dst, 10, 0, len, pad);
- break;
- case L'U':
- dst = wrnargLL (dst, 10, 0, len, pad);
- break;
- case L'o':
- dst = wrnarg (dst, 8, 0, len, pad);
- break;
- case L'p':
- *dst++ = L'0';
- *dst++ = L'x';
- /* fall through */
- case L'x':
- dst = wrnarg (dst, 16, 0, len, pad);
- break;
- case L'X':
- dst = wrnargLL (dst, 16, 0, len, pad);
- break;
- case L'P':
- if (!GetModuleFileNameW (NULL, tmp, NT_MAX_PATH))
- RtlInitUnicodeString (us = &uw, L"cygwin program");
- else
- RtlInitUnicodeString (us = &uw, tmp);
- goto fillin;
- case L'.':
- n = wcstoul (fmt, (wchar_t **) &fmt, 10);
- if (*fmt++ != L's')
- goto endfor;
- case L's':
- s = va_arg (ap, char *);
- if (s == NULL)
- s = "(null)";
- sys_mbstowcs (tmp, NT_MAX_PATH, s, n < 0x7fff ? (int) n : -1);
- RtlInitUnicodeString (us = &uw, tmp);
- goto fillin;
- break;
- case L'W':
- w = va_arg (ap, PWCHAR);
- RtlInitUnicodeString (us = &uw, w);
- goto fillin;
- case L'S':
- us = va_arg (ap, PUNICODE_STRING);
- fillin:
- if (us->Length / sizeof (WCHAR) < n)
- n = us->Length / sizeof (WCHAR);
- w = us->Buffer;
- for (unsigned int i = 0; i < n; i++)
- *dst++ = *w++;
- break;
- default:
- *dst++ = L'?';
- *dst++ = fmt[-1];
- }
- endfor:
- break;
- }
- }
- }
- *dst = L'\0';
- SetLastError (err);
- return dst - orig;
-}
-
-extern "C" int
-__small_swprintf (PWCHAR dst, const WCHAR *fmt, ...)
-{
- int r;
- va_list ap;
- va_start (ap, fmt);
- r = __small_vswprintf (dst, fmt, ap);
- va_end (ap);
- return r;
-}
diff --git a/winsup/cygwin/sortdin b/winsup/cygwin/sortdin
deleted file mode 100755
index dafb329..0000000
--- a/winsup/cygwin/sortdin
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/perl
-
-my %data = ();
-my %code = ();
-
-my @out = ();
-
-my $fn = $ARGV[0];
-
-while (<>) {
- push(@out, $_);
- /^\s*exports/i and last;
-}
-
-while (<>) {
- my $key;
- $arr = /\sDATA\s*$/o ? \%data : \%code;
- $_ =~ s/^\s+//;
- my $key = (split(' ', $_))[0];
- substr($key, 0, 1) = '' while $key =~ /^_/o;
- chomp $key;
- $arr->{$key}->{$_} = 1;
-}
-
-for my $k (sort keys %data) {
- push(@out, sort {$b cmp $a} keys %{$data{$k}});
-}
-
-for my $k (sort keys %code) {
- push(@out, sort {$b cmp $a} keys %{$code{$k}});
-}
-
-open(R, '>', $fn);
-print R @out;
-close R;
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
deleted file mode 100644
index b84a142..0000000
--- a/winsup/cygwin/spawn.cc
+++ /dev/null
@@ -1,1101 +0,0 @@
-/* spawn.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include <unistd.h>
-#include <process.h>
-#include <sys/wait.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <wchar.h>
-#include <ctype.h>
-#include "cygerrno.h"
-#include <sys/cygwin.h>
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "sigproc.h"
-#include "cygheap.h"
-#include "child_info.h"
-#include "pinfo.h"
-#include "environ.h"
-#include "cygtls.h"
-#include "tls_pbuf.h"
-#include "winf.h"
-#include "ntdll.h"
-
-static suffix_info exe_suffixes[] =
-{
- suffix_info ("", 1),
- suffix_info (".exe", 1),
- suffix_info (".com"),
- suffix_info (NULL)
-};
-
-static suffix_info dll_suffixes[] =
-{
- suffix_info (".dll"),
- suffix_info ("", 1),
- suffix_info (".exe", 1),
- suffix_info (NULL)
-};
-
-HANDLE hExeced;
-child_info_spawn *chExeced;
-
-/* Add .exe to PROG if not already present and see if that exists.
- If not, return PROG (converted from posix to win32 rules if necessary).
- The result is always BUF.
-
- Returns (possibly NULL) suffix */
-
-static const char *
-perhaps_suffix (const char *prog, path_conv& buf, int& err, unsigned opt)
-{
- char *ext;
-
- err = 0;
- debug_printf ("prog '%s'", prog);
- buf.check (prog, PC_SYM_FOLLOW | PC_NULLEMPTY,
- (opt & FE_DLL) ? dll_suffixes : exe_suffixes);
-
- if (buf.isdir ())
- {
- err = EACCES;
- ext = NULL;
- }
- else if (!buf.exists ())
- {
- err = ENOENT;
- ext = NULL;
- }
- else if (buf.known_suffix)
- ext = buf.get_win32 () + (buf.known_suffix - buf.get_win32 ());
- else
- ext = strchr (buf.get_win32 (), '\0');
-
- debug_printf ("buf %s, suffix found '%s'", (char *) buf.get_win32 (), ext);
- return ext;
-}
-
-/* Find an executable name, possibly by appending known executable
- suffixes to it. The win32-translated name is placed in 'buf'.
- Any found suffix is returned in known_suffix.
-
- If the file is not found and !null_if_not_found then the win32 version
- of name is placed in buf and returned. Otherwise the contents of buf
- is undefined and NULL is returned. */
-
-const char * __stdcall
-find_exec (const char *name, path_conv& buf, const char *mywinenv,
- unsigned opt, const char **known_suffix)
-{
- const char *suffix = "";
- debug_printf ("find_exec (%s)", name);
- const char *retval = buf.get_win32 ();
- tmp_pathbuf tp;
- char *tmp = tp.c_get ();
- const char *posix = (opt & FE_NATIVE) ? NULL : name;
- bool has_slash = strchr (name, '/');
- int err;
-
- /* Check to see if file can be opened as is first.
- Win32 systems always check . first, but PATH may not be set up to
- do this. */
- if ((has_slash || opt & FE_CWD)
- && (suffix = perhaps_suffix (name, buf, err, opt)) != NULL)
- {
- if (posix && !has_slash)
- {
- tmp[0] = '.';
- tmp[1] = '/';
- strcpy (tmp + 2, name);
- posix = tmp;
- }
- goto out;
- }
-
- win_env *winpath;
- const char *path;
- const char *posix_path;
-
- posix = (opt & FE_NATIVE) ? NULL : tmp;
-
- if (strchr (mywinenv, '/'))
- {
- /* it's not really an environment variable at all */
- int n = cygwin_conv_path_list (CCP_POSIX_TO_WIN_A, mywinenv, NULL, 0);
- char *s = (char *) alloca (n);
- if (cygwin_conv_path_list (CCP_POSIX_TO_WIN_A, mywinenv, s, n))
- goto errout;
- path = s;
- posix_path = mywinenv - 1;
- }
- else if (has_slash || strchr (name, '\\') || isdrive (name)
- || !(winpath = getwinenv (mywinenv))
- || !(path = winpath->get_native ()) || *path == '\0')
- /* Return the error condition if this is an absolute path or if there
- is no PATH to search. */
- goto errout;
- else
- posix_path = winpath->get_posix () - 1;
-
- debug_printf ("%s%s", mywinenv, path);
- /* Iterate over the specified path, looking for the file with and without
- executable extensions. */
- do
- {
- posix_path++;
- char *eotmp = strccpy (tmp, &path, ';');
- /* An empty path or '.' means the current directory, but we've
- already tried that. */
- if (opt & FE_CWD && (tmp[0] == '\0' || (tmp[0] == '.' && tmp[1] == '\0')))
- continue;
-
- *eotmp++ = '\\';
- strcpy (eotmp, name);
-
- debug_printf ("trying %s", tmp);
-
- if ((suffix = perhaps_suffix (tmp, buf, err, opt)) != NULL)
- {
- if (buf.has_acls () && check_file_access (buf, X_OK))
- continue;
-
- if (posix == tmp)
- {
- eotmp = strccpy (tmp, &posix_path, ':');
- if (eotmp == tmp)
- *eotmp++ = '.';
- *eotmp++ = '/';
- strcpy (eotmp, name);
- }
- goto out;
- }
- }
- while (*path && *++path && (posix_path = strchr (posix_path, ':')));
-
- errout:
- posix = NULL;
- /* Couldn't find anything in the given path.
- Take the appropriate action based on null_if_not_found. */
- if (opt & FE_NNF)
- retval = NULL;
- else if (opt & FE_NATIVE)
- buf.check (name);
- else
- retval = name;
-
- out:
- if (posix)
- buf.set_path (posix);
- debug_printf ("%s = find_exec (%s)", (char *) buf.get_win32 (), name);
- if (known_suffix)
- *known_suffix = suffix ?: strchr (buf.get_win32 (), '\0');
- if (!retval && err)
- set_errno (err);
- return retval;
-}
-
-/* Utility for spawn_guts. */
-
-static HANDLE
-handle (int fd, bool writing)
-{
- HANDLE h;
- cygheap_fdget cfd (fd);
-
- if (cfd < 0)
- h = INVALID_HANDLE_VALUE;
- else if (cfd->close_on_exec ())
- h = INVALID_HANDLE_VALUE;
- else if (!writing)
- h = cfd->get_handle ();
- else
- h = cfd->get_output_handle ();
-
- return h;
-}
-
-int
-iscmd (const char *argv0, const char *what)
-{
- int n;
- n = strlen (argv0) - strlen (what);
- if (n >= 2 && argv0[1] != ':')
- return 0;
- return n >= 0 && strcasematch (argv0 + n, what) &&
- (n == 0 || isdirsep (argv0[n - 1]));
-}
-
-struct pthread_cleanup
-{
- _sig_func_ptr oldint;
- _sig_func_ptr oldquit;
- sigset_t oldmask;
- pthread_cleanup (): oldint (NULL), oldquit (NULL), oldmask ((sigset_t) -1) {}
-};
-
-static void
-do_cleanup (void *args)
-{
-# define cleanup ((pthread_cleanup *) args)
- if (cleanup->oldmask != (sigset_t) -1)
- {
- signal (SIGINT, cleanup->oldint);
- signal (SIGQUIT, cleanup->oldquit);
- sigprocmask (SIG_SETMASK, &(cleanup->oldmask), NULL);
- }
-# undef cleanup
-}
-
-
-int __stdcall
-spawn_guts (const char *prog_arg, const char *const *argv,
- const char *const envp[], int mode, int __stdin, int __stdout)
-{
- bool rc;
- pid_t cygpid;
- int res = -1;
-
- if (prog_arg == NULL)
- {
- syscall_printf ("prog_arg is NULL");
- set_errno (EINVAL);
- return -1;
- }
-
- syscall_printf ("spawn_guts (%d, %.9500s)", mode, prog_arg);
-
- if (argv == NULL)
- {
- syscall_printf ("argv is NULL");
- set_errno (EINVAL);
- return -1;
- }
-
- /* FIXME: There is a small race here and FIXME: not thread safe! */
-
- pthread_cleanup cleanup;
- if (mode == _P_SYSTEM)
- {
- sigset_t child_block;
- cleanup.oldint = signal (SIGINT, SIG_IGN);
- cleanup.oldquit = signal (SIGQUIT, SIG_IGN);
- sigemptyset (&child_block);
- sigaddset (&child_block, SIGCHLD);
- sigprocmask (SIG_BLOCK, &child_block, &cleanup.oldmask);
- }
- pthread_cleanup_push (do_cleanup, (void *) &cleanup);
- av newargv;
- linebuf one_line;
- child_info_spawn ch;
- PWCHAR envblock = NULL;
- path_conv real_path;
- bool reset_sendsig = false;
-
- tmp_pathbuf tp;
- PWCHAR runpath = tp.w_get ();
- int c_flags;
- bool wascygexec;
- cygheap_exec_info *moreinfo;
-
- bool null_app_name = false;
- STARTUPINFOW si = {0, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL,
- NULL, NULL, NULL};
- int looped = 0;
- HANDLE orig_wr_proc_pipe = NULL;
-
- myfault efault;
- if (efault.faulted ())
- {
- if (get_errno () == ENOMEM)
- set_errno (E2BIG);
- else
- set_errno (EFAULT);
- res = -1;
- goto out;
- }
-
- child_info_types chtype;
- if (mode != _P_OVERLAY)
- chtype = PROC_SPAWN;
- else
- chtype = PROC_EXEC;
-
- moreinfo = (cygheap_exec_info *) ccalloc_abort (HEAP_1_EXEC, 1,
- sizeof (cygheap_exec_info));
- moreinfo->old_title = NULL;
-
- /* CreateProcess takes one long string that is the command line (sigh).
- We need to quote any argument that has whitespace or embedded "'s. */
-
- int ac;
- for (ac = 0; argv[ac]; ac++)
- /* nothing */;
-
- newargv.set (ac, argv);
-
- int err;
- const char *ext;
- if ((ext = perhaps_suffix (prog_arg, real_path, err, FE_NADA)) == NULL)
- {
- set_errno (err);
- res = -1;
- goto out;
- }
-
-
- wascygexec = real_path.iscygexec ();
- res = newargv.fixup (prog_arg, real_path, ext);
-
- if (!real_path.iscygexec ()
- && (cygheap->cwd.drive_length == 0
- || cygheap->cwd.win32.Length >= MAX_PATH * sizeof (WCHAR)))
- {
- small_printf ("Error: Current working directory is a %s.\n"
- "Can't start native Windows application from here.\n\n",
- cygheap->cwd.drive_length == 0
- ? "virtual Cygwin directory"
- : "path longer than allowed for a\n"
- "Win32 working directory");
- set_errno (ENAMETOOLONG);
- res = -1;
- goto out;
- }
-
- if (res)
- goto out;
-
- if (ac == 3 && argv[1][0] == '/' && argv[1][1] == 'c' &&
- (iscmd (argv[0], "command.com") || iscmd (argv[0], "cmd.exe")))
- {
- real_path.check (prog_arg);
- one_line.add ("\"");
- if (!real_path.error)
- one_line.add (real_path.get_win32 ());
- else
- one_line.add (argv[0]);
- one_line.add ("\"");
- one_line.add (" ");
- one_line.add (argv[1]);
- one_line.add (" ");
- one_line.add (argv[2]);
- strcpy (real_path.get_win32 (), argv[0]);
- null_app_name = true;
- }
- else
- {
- if (wascygexec)
- newargv.dup_all ();
- else if (!one_line.fromargv (newargv, real_path.get_win32 (),
- real_path.iscygexec ()))
- {
- res = -1;
- goto out;
- }
-
-
- newargv.all_calloced ();
- moreinfo->argc = newargv.argc;
- moreinfo->argv = newargv;
-
- if (mode != _P_OVERLAY ||
- !DuplicateHandle (hMainProc, myself.shared_handle (), hMainProc,
- &moreinfo->myself_pinfo, 0, TRUE,
- DUPLICATE_SAME_ACCESS))
- moreinfo->myself_pinfo = NULL;
- else
- VerifyHandle (moreinfo->myself_pinfo);
- }
- WCHAR wone_line[one_line.ix + 1];
- sys_mbstowcs (wone_line, one_line.ix + 1, one_line.buf);
-
- PROCESS_INFORMATION pi;
- pi.hProcess = pi.hThread = NULL;
- pi.dwProcessId = pi.dwThreadId = 0;
- si.lpReserved = NULL;
- si.lpDesktop = NULL;
-
- /* Set up needed handles for stdio */
- si.dwFlags = STARTF_USESTDHANDLES;
- si.hStdInput = handle ((__stdin < 0 ? 0 : __stdin), false);
- si.hStdOutput = handle ((__stdout < 0 ? 1 : __stdout), true);
- si.hStdError = handle (2, true);
-
- si.cb = sizeof (si);
-
- c_flags = GetPriorityClass (hMainProc);
- sigproc_printf ("priority class %d", c_flags);
- c_flags |= CREATE_SEPARATE_WOW_VDM | CREATE_UNICODE_ENVIRONMENT;
-
- if (mode == _P_DETACH)
- c_flags |= DETACHED_PROCESS;
- else
- fhandler_console::need_invisible ();
-
- if (mode != _P_OVERLAY)
- myself->exec_sendsig = NULL;
- else
- {
- /* Reset sendsig so that any process which wants to send a signal
- to this pid will wait for the new process to become active.
- Save the old value in case the exec fails. */
- if (!myself->exec_sendsig)
- {
- myself->exec_sendsig = myself->sendsig;
- myself->exec_dwProcessId = myself->dwProcessId;
- myself->sendsig = NULL;
- reset_sendsig = true;
- }
- /* Save a copy of a handle to the current process around the first time we
- exec so that the pid will not be reused. Why did I stop cygwin from
- generating its own pids again? */
- if (cygheap->pid_handle)
- /* already done previously */;
- else if (DuplicateHandle (hMainProc, hMainProc, hMainProc,
- &cygheap->pid_handle, PROCESS_QUERY_INFORMATION,
- TRUE, 0))
- ProtectHandleINH (cygheap->pid_handle);
- else
- system_printf ("duplicate to pid_handle failed, %E");
- }
-
- runpath = null_app_name ? NULL : real_path.get_wide_win32_path (runpath);
- { /* If the executable path length is < MAX_PATH, make sure the long path
- win32 prefix is removed from the path to make subsequent native Win32
- child processes happy which are not long path aware. */
- USHORT len = real_path.get_nt_native_path ()->Length;
- if (len < (MAX_PATH + 4) * sizeof (WCHAR)
- || (runpath[5] != L':' /* UNC path */
- && len < (MAX_PATH + 6) * sizeof (WCHAR)))
- {
- PWCHAR r = runpath + 4;
- if (r[1] != L':') /* UNC path */
- *(r += 2) = L'\\';
- if (!RtlIsDosDeviceName_U (r))
- runpath = r;
- else if (*r == L'\\')
- *r = L'C';
- }
- }
-
- syscall_printf ("null_app_name %d (%W, %.9500W)", null_app_name,
- runpath, wone_line);
-
- cygbench ("spawn-guts");
-
- if (!real_path.iscygexec())
- cygheap->fdtab.set_file_pointers_for_exec ();
-
- moreinfo->envp = build_env (envp, envblock, moreinfo->envc,
- real_path.iscygexec ());
- if (!moreinfo->envp || !envblock)
- {
- set_errno (E2BIG);
- res = -1;
- goto out;
- }
- ch.set (chtype, real_path.iscygexec ());
- ch.moreinfo = moreinfo;
- ch.__stdin = __stdin;
- ch.__stdout = __stdout;
-
- si.lpReserved2 = (LPBYTE) &ch;
- si.cbReserved2 = sizeof (ch);
-
- /* Depends on ch.set call above!
- Some file types might need extra effort in the parent after CreateProcess
- and before copying the datastructures to the child. So we have to start
- the child in suspend state, unfortunately, to avoid a race condition. */
- if (!newargv.win16_exe
- && (!ch.iscygwin () || mode != _P_OVERLAY))
- c_flags |= CREATE_SUSPENDED;
-
- /* When ruid != euid we create the new process under the current original
- account and impersonate in child, this way maintaining the different
- effective vs. real ids.
- FIXME: If ruid != euid and ruid != saved_uid we currently give
- up on ruid. The new process will have ruid == euid. */
-loop:
- cygheap->user.deimpersonate ();
-
- if (!cygheap->user.issetuid ()
- || (cygheap->user.saved_uid == cygheap->user.real_uid
- && cygheap->user.saved_gid == cygheap->user.real_gid
- && !cygheap->user.groups.issetgroups ()))
- {
- rc = CreateProcessW (runpath, /* image name - with full path */
- wone_line, /* what was passed to exec */
- &sec_none_nih, /* process security attrs */
- &sec_none_nih, /* thread security attrs */
- TRUE, /* inherit handles from parent */
- c_flags,
- envblock, /* environment */
- NULL,
- &si,
- &pi);
- }
- else
- {
- /* Give access to myself */
- if (mode == _P_OVERLAY)
- myself.set_acl();
-
- WCHAR wstname[1024] = { L'\0' };
- HWINSTA hwst_orig = NULL, hwst = NULL;
- HDESK hdsk_orig = NULL, hdsk = NULL;
- PSECURITY_ATTRIBUTES sa;
- DWORD n;
-
- hwst_orig = GetProcessWindowStation ();
- hdsk_orig = GetThreadDesktop (GetCurrentThreadId ());
- GetUserObjectInformationW (hwst_orig, UOI_NAME, wstname, 1024, &n);
- /* Prior to Vista it was possible to start a service with the
- "Interact with desktop" flag. This started the service in the
- interactive window station of the console. A big security
- risk, but we don't want to disable this behaviour for older
- OSes because it's still heavily used by some users. They have
- been warned. */
- if (wcscasecmp (wstname, L"WinSta0") != 0)
- {
- WCHAR sid[128];
-
- sa = sec_user ((PSECURITY_ATTRIBUTES) alloca (1024),
- cygheap->user.sid ());
- /* We're creating a window station per user, not per logon session.
- First of all we might not have a valid logon session for
- the user (logon by create_token), and second, it doesn't
- make sense in terms of security to create a new window
- station for every logon of the same user. It just fills up
- the system with window stations for no good reason. */
- hwst = CreateWindowStationW (cygheap->user.get_windows_id (sid), 0,
- GENERIC_READ | GENERIC_WRITE, sa);
- if (!hwst)
- system_printf ("CreateWindowStation failed, %E");
- else if (!SetProcessWindowStation (hwst))
- system_printf ("SetProcessWindowStation failed, %E");
- else if (!(hdsk = CreateDesktopW (L"Default", NULL, NULL, 0,
- GENERIC_ALL, sa)))
- system_printf ("CreateDesktop failed, %E");
- else
- {
- wcpcpy (wcpcpy (wstname, sid), L"\\Default");
- si.lpDesktop = wstname;
- debug_printf ("Desktop: %W", si.lpDesktop);
- }
- }
-
- rc = CreateProcessAsUserW (cygheap->user.primary_token (),
- runpath, /* image name - with full path */
- wone_line, /* what was passed to exec */
- &sec_none_nih, /* process security attrs */
- &sec_none_nih, /* thread security attrs */
- TRUE, /* inherit handles from parent */
- c_flags,
- envblock, /* environment */
- NULL,
- &si,
- &pi);
- if (hwst)
- {
- SetProcessWindowStation (hwst_orig);
- CloseWindowStation (hwst);
- }
- if (hdsk)
- {
- SetThreadDesktop (hdsk_orig);
- CloseDesktop (hdsk);
- }
- }
-
- /* Restore impersonation. In case of _P_OVERLAY this isn't
- allowed since it would overwrite child data. */
- if (mode != _P_OVERLAY || !rc)
- cygheap->user.reimpersonate ();
-
- /* Set errno now so that debugging messages from it appear before our
- final debugging message [this is a general rule for debugging
- messages]. */
- if (!rc)
- {
- __seterrno ();
- syscall_printf ("CreateProcess failed, %E");
- /* If this was a failed exec, restore the saved sendsig. */
- if (reset_sendsig)
- {
- myself->sendsig = myself->exec_sendsig;
- myself->exec_sendsig = NULL;
- }
- res = -1;
- goto out;
- }
-
- if (!(c_flags & CREATE_SUSPENDED))
- strace.write_childpid (ch, pi.dwProcessId);
-
- if (mode != _P_OVERLAY)
- cygpid = cygwin_pid (pi.dwProcessId);
- else
- cygpid = myself->pid;
-
- /* We print the original program name here so the user can see that too. */
- syscall_printf ("%d = spawn_guts (%s, %.9500s)",
- rc ? cygpid : (unsigned int) -1, prog_arg, one_line.buf);
-
- /* Name the handle similarly to proc_subproc. */
- ProtectHandle1 (pi.hProcess, childhProc);
-
- bool synced;
- pid_t pid;
- if (mode == _P_OVERLAY)
- {
- chExeced = &ch; /* FIXME: there's a race here if a user sneaks in CTRL-C */
- myself->dwProcessId = pi.dwProcessId;
- strace.execing = 1;
- myself.hProcess = hExeced = pi.hProcess;
- strcpy (myself->progname, real_path.get_win32 ()); // FIXME: race?
- sigproc_printf ("new process name %s", myself->progname);
- /* If wr_proc_pipe doesn't exist then this process was not started by a cygwin
- process. So, we need to wait around until the process we've just "execed"
- dies. Use our own wait facility to wait for our own pid to exit (there
- is some minor special case code in proc_waiter and friends to accommodate
- this).
-
- If wr_proc_pipe exists, then it should be duplicated to the child.
- If the child has exited already, that's ok. The parent will pick up
- on this fact when we exit. dup_proc_pipe will close our end of the pipe.
- Note that wr_proc_pipe may also be == INVALID_HANDLE_VALUE. That will make
- dup_proc_pipe essentially a no-op. */
- if (!newargv.win16_exe && myself->wr_proc_pipe)
- {
- if (!looped)
- myself->sync_proc_pipe (); /* Make sure that we own wr_proc_pipe
- just in case we've been previously
- execed. */
- orig_wr_proc_pipe = myself->dup_proc_pipe (pi.hProcess);
- }
- pid = myself->pid;
- if (!ch.iscygwin ())
- close_all_files ();
- }
- else
- {
- myself->set_has_pgid_children ();
- ProtectHandle (pi.hThread);
- pinfo child (cygpid, PID_IN_USE);
- if (!child)
- {
- syscall_printf ("pinfo failed");
- if (get_errno () != ENOMEM)
- set_errno (EAGAIN);
- res = -1;
- goto out;
- }
- child->dwProcessId = pi.dwProcessId;
- child.hProcess = pi.hProcess;
-
- strcpy (child->progname, real_path.get_win32 ());
- /* FIXME: This introduces an unreferenced, open handle into the child.
- The purpose is to keep the pid shared memory open so that all of
- the fields filled out by child.remember do not disappear and so there
- is not a brief period during which the pid is not available.
- However, we should try to find another way to do this eventually. */
- DuplicateHandle (hMainProc, child.shared_handle (), pi.hProcess,
- NULL, 0, 0, DUPLICATE_SAME_ACCESS);
- child->start_time = time (NULL); /* Register child's starting time. */
- child->nice = myself->nice;
- if (!child.remember (mode == _P_DETACH))
- {
- /* FIXME: Child in strange state now */
- CloseHandle (pi.hProcess);
- ForceCloseHandle (pi.hThread);
- res = -1;
- goto out;
- }
- pid = child->pid;
- }
-
- /* Start the child running */
- if (c_flags & CREATE_SUSPENDED)
- {
- ResumeThread (pi.hThread);
- strace.write_childpid (ch, pi.dwProcessId);
- }
- ForceCloseHandle (pi.hThread);
-
- sigproc_printf ("spawned windows pid %d", pi.dwProcessId);
-
- if ((mode == _P_DETACH || mode == _P_NOWAIT) && !ch.iscygwin ())
- synced = false;
- else
- synced = ch.sync (pi.dwProcessId, pi.hProcess, INFINITE);
-
- switch (mode)
- {
- case _P_OVERLAY:
- myself.hProcess = pi.hProcess;
- if (!synced)
- {
- if (orig_wr_proc_pipe)
- {
- myself->wr_proc_pipe_owner = GetCurrentProcessId ();
- myself->wr_proc_pipe = orig_wr_proc_pipe;
- }
- if (!ch.proc_retry (pi.hProcess))
- {
- looped++;
- goto loop;
- }
- close_all_files (true);
- }
- else
- {
- close_all_files (true);
- if (!myself->wr_proc_pipe
- && WaitForSingleObject (pi.hProcess, 0) == WAIT_TIMEOUT)
- {
- extern bool is_toplevel_proc;
- is_toplevel_proc = true;
- myself.remember (false);
- waitpid (myself->pid, &res, 0);
- }
- }
- myself.exit (EXITCODE_NOSET);
- break;
- case _P_WAIT:
- case _P_SYSTEM:
- if (waitpid (cygpid, &res, 0) != cygpid)
- res = -1;
- break;
- case _P_DETACH:
- res = 0; /* Lost all memory of this child. */
- break;
- case _P_NOWAIT:
- case _P_NOWAITO:
- case _P_VFORK:
- res = cygpid;
- break;
- default:
- break;
- }
-
-out:
- if (envblock)
- free (envblock);
- pthread_cleanup_pop (1);
- return (int) res;
-#undef ch
-}
-
-extern "C" int
-cwait (int *result, int pid, int)
-{
- return waitpid (pid, result, 0);
-}
-
-/*
-* Helper function for spawn runtime calls.
-* Doesn't search the path.
-*/
-
-extern "C" int
-spawnve (int mode, const char *path, const char *const *argv,
- const char *const *envp)
-{
- int ret;
-#ifdef NEWVFORK
- vfork_save *vf = vfork_storage.val ();
-
- if (vf != NULL && (vf->pid < 0) && mode == _P_OVERLAY)
- mode = _P_NOWAIT;
- else
- vf = NULL;
-#endif
-
- syscall_printf ("spawnve (%s, %s, %x)", path, argv[0], envp);
-
- switch (mode)
- {
- case _P_OVERLAY:
- /* We do not pass _P_SEARCH_PATH here. execve doesn't search PATH.*/
- /* Just act as an exec if _P_OVERLAY set. */
- spawn_guts (path, argv, envp, mode);
- /* Errno should be set by spawn_guts. */
- ret = -1;
- break;
- case _P_VFORK:
- case _P_NOWAIT:
- case _P_NOWAITO:
- case _P_WAIT:
- case _P_DETACH:
- case _P_SYSTEM:
- ret = spawn_guts (path, argv, envp, mode);
-#ifdef NEWVFORK
- if (vf)
- {
- if (ret > 0)
- {
- debug_printf ("longjmping due to vfork");
- vf->restore_pid (ret);
- }
- }
-#endif
- break;
- default:
- set_errno (EINVAL);
- ret = -1;
- break;
- }
- return ret;
-}
-
-/*
-* spawn functions as implemented in the MS runtime library.
-* Most of these based on (and copied from) newlib/libc/posix/execXX.c
-*/
-
-extern "C" int
-spawnl (int mode, const char *path, const char *arg0, ...)
-{
- int i;
- va_list args;
- const char *argv[256];
-
- va_start (args, arg0);
- argv[0] = arg0;
- i = 1;
-
- do
- argv[i] = va_arg (args, const char *);
- while (argv[i++] != NULL);
-
- va_end (args);
-
- return spawnve (mode, path, (char * const *) argv, cur_environ ());
-}
-
-extern "C" int
-spawnle (int mode, const char *path, const char *arg0, ...)
-{
- int i;
- va_list args;
- const char * const *envp;
- const char *argv[256];
-
- va_start (args, arg0);
- argv[0] = arg0;
- i = 1;
-
- do
- argv[i] = va_arg (args, const char *);
- while (argv[i++] != NULL);
-
- envp = va_arg (args, const char * const *);
- va_end (args);
-
- return spawnve (mode, path, (char * const *) argv, (char * const *) envp);
-}
-
-extern "C" int
-spawnlp (int mode, const char *path, const char *arg0, ...)
-{
- int i;
- va_list args;
- const char *argv[256];
-
- va_start (args, arg0);
- argv[0] = arg0;
- i = 1;
-
- do
- argv[i] = va_arg (args, const char *);
- while (argv[i++] != NULL);
-
- va_end (args);
-
- return spawnvpe (mode, path, (char * const *) argv, cur_environ ());
-}
-
-extern "C" int
-spawnlpe (int mode, const char *path, const char *arg0, ...)
-{
- int i;
- va_list args;
- const char * const *envp;
- const char *argv[256];
-
- va_start (args, arg0);
- argv[0] = arg0;
- i = 1;
-
- do
- argv[i] = va_arg (args, const char *);
- while (argv[i++] != NULL);
-
- envp = va_arg (args, const char * const *);
- va_end (args);
-
- return spawnvpe (mode, path, (char * const *) argv, envp);
-}
-
-extern "C" int
-spawnv (int mode, const char *path, const char * const *argv)
-{
- return spawnve (mode, path, argv, cur_environ ());
-}
-
-extern "C" int
-spawnvp (int mode, const char *path, const char * const *argv)
-{
- return spawnvpe (mode, path, argv, cur_environ ());
-}
-
-extern "C" int
-spawnvpe (int mode, const char *file, const char * const *argv,
- const char * const *envp)
-{
- path_conv buf;
- return spawnve (mode, find_exec (file, buf), argv, envp);
-}
-
-int
-av::fixup (const char *prog_arg, path_conv& real_path, const char *ext)
-{
- const char *p;
- bool exeext = ascii_strcasematch (ext, ".exe");
- if ((exeext && real_path.iscygexec ()) || ascii_strcasematch (ext, ".bat"))
- return 0;
- if (!*ext && ((p = ext - 4) > real_path.get_win32 ())
- && (ascii_strcasematch (p, ".bat") || ascii_strcasematch (p, ".cmd")
- || ascii_strcasematch (p, ".btm")))
- return 0;
- while (1)
- {
- char *pgm = NULL;
- char *arg1 = NULL;
- char *ptr, *buf;
- OBJECT_ATTRIBUTES attr;
- IO_STATUS_BLOCK io;
- HANDLE h;
- NTSTATUS status;
-
- status = NtOpenFile (&h, SYNCHRONIZE | GENERIC_READ,
- real_path.get_object_attr (attr, sec_none_nih),
- &io, FILE_SHARE_READ | FILE_SHARE_WRITE,
- FILE_SYNCHRONOUS_IO_NONALERT
- | FILE_OPEN_FOR_BACKUP_INTENT
- | FILE_NON_DIRECTORY_FILE);
- if (!NT_SUCCESS (status))
- goto err;
-
- HANDLE hm = CreateFileMapping (h, &sec_none_nih, PAGE_READONLY, 0, 0, NULL);
- NtClose (h);
- if (!hm)
- {
- /* ERROR_FILE_INVALID indicates very likely an empty file. */
- if (GetLastError () == ERROR_FILE_INVALID)
- {
- debug_printf ("zero length file, treat as script.");
- goto just_shell;
- }
- goto err;
- }
- buf = (char *) MapViewOfFile(hm, FILE_MAP_READ, 0, 0, 0);
- CloseHandle (hm);
- if (!buf)
- goto err;
-
- {
- myfault efault;
- if (efault.faulted ())
- {
- UnmapViewOfFile (buf);
- real_path.set_cygexec (false);
- break;
- }
- if (buf[0] == 'M' && buf[1] == 'Z')
- {
- WORD subsys;
- unsigned off = (unsigned char) buf[0x18] | (((unsigned char) buf[0x19]) << 8);
- win16_exe = off < sizeof (IMAGE_DOS_HEADER);
- if (!win16_exe)
- real_path.set_cygexec (!!hook_or_detect_cygwin (buf, NULL, subsys));
- else
- real_path.set_cygexec (false);
- UnmapViewOfFile (buf);
- break;
- }
- }
-
- debug_printf ("%s is possibly a script", real_path.get_win32 ());
-
- ptr = buf;
- if (*ptr++ == '#' && *ptr++ == '!')
- {
- ptr += strspn (ptr, " \t");
- size_t len = strcspn (ptr, "\r\n");
- if (len)
- {
- char *namebuf = (char *) alloca (len + 1);
- memcpy (namebuf, ptr, len);
- namebuf[len] = '\0';
- for (ptr = pgm = namebuf; *ptr; ptr++)
- if (!arg1 && (*ptr == ' ' || *ptr == '\t'))
- {
- /* Null terminate the initial command and step over any additional white
- space. If we've hit the end of the line, exit the loop. Otherwise,
- we've found the first argument. Position the current pointer on the
- last known white space. */
- *ptr = '\0';
- char *newptr = ptr + 1;
- newptr += strspn (newptr, " \t");
- if (!*newptr)
- break;
- arg1 = newptr;
- ptr = newptr - 1;
- }
- }
- }
- UnmapViewOfFile (buf);
-just_shell:
- if (!pgm)
- {
- if (ascii_strcasematch (ext, ".com"))
- break;
- pgm = (char *) "/bin/sh";
- arg1 = NULL;
- }
-
- /* Replace argv[0] with the full path to the script if this is the
- first time through the loop. */
- replace0_maybe (prog_arg);
-
- /* pointers:
- * pgm interpreter name
- * arg1 optional string
- */
- if (arg1)
- unshift (arg1);
-
- /* FIXME: This should not be using FE_NATIVE. It should be putting
- the posix path on the argv list. */
- find_exec (pgm, real_path, "PATH=", FE_NATIVE, &ext);
- unshift (real_path.get_win32 (), 1);
- }
- return 0;
-
-err:
- __seterrno ();
- return -1;
-}
diff --git a/winsup/cygwin/speclib b/winsup/cygwin/speclib
deleted file mode 100755
index 6642414..0000000
--- a/winsup/cygwin/speclib
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/bin/sh -x
-# speclib - Make a special version of the cygwin import library.
-#
-# Copyright 2001, 2002 Red Hat, Inc.
-#
-# This file is part of Cygwin.
-#
-# This software is a copyrighted work licensed under the terms of the
-# Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-# details.
-
-case "$1" in
- -v) shift; v() { :; } ;;
- *) v() { /bin/false; } ;;
-esac
-lib=$1; shift
-nm=$1; shift
-ar=$1; shift
-libdll=$1; shift
-cp /dev/null /tmp/$$.objs
-trap "cd /tmp; /bin/rm -rf $lib.bak /tmp/$$.dir /tmp/$$.syms /tmp/$$.objs /tmp/$$.raw" 0 1 2 15
-$nm --extern-only --defined-only $* | sed -n -e 's%^.* [TD] \(.*\)$%/ \1\$/p%p' > /tmp/$$.syms
-v || $nm -Ap --extern-only --defined-only $libdll | egrep ' I __head| I _.*_iname' | awk -F: '{print $2}' > /tmp/$$.objs
-$nm -Ap --extern-only --defined-only $libdll | sed -n -f /tmp/$$.syms | awk -F: '{print $2}' >> /tmp/$$.objs
-sort -o /tmp/$$.objs -u /tmp/$$.objs
-
-[ -s /tmp/$$.objs ] || { echo "speclib: couldn't find symbols for $lib" 1>&2; exit 1; }
-
-/bin/rm -rf /tmp/$$.dir
-mkdir /tmp/$$.dir
-cd /tmp/$$.dir
-if v; then
- $ar x $libdll
- /bin/rm -f `cat /tmp/$$.objs`
-else
- $ar x $libdll `cat /tmp/$$.objs`
-fi
-/bin/rm -f $lib
-$ar crus $lib *.o
-export lib;
-perl -pi.bak -- - $lib << 'EOF'
-BEGIN {
- binmode STDIN;
- binmode STDOUT;
- $lib = ($ENV{lib} =~ m!/([^/]+)$!o)[0] || $ENV{lib};
- $lib =~ s/\.a//o;
- my $pad = length('cygwin1_dll') - length($lib);
- die "speclib: library name too long (" . length($lib) . ")\n" if $pad < 0;
- $lib = "__head_$lib" . "\0" x $pad;
-}
- s/__head_cygwin1_dll/$lib/g;
-EOF
diff --git a/winsup/cygwin/stackdump.sgml b/winsup/cygwin/stackdump.sgml
deleted file mode 100644
index 1969e2e..0000000
--- a/winsup/cygwin/stackdump.sgml
+++ /dev/null
@@ -1,13 +0,0 @@
-<sect1 id="func-cygwin-stackdump">
-<title>cygwin_stackdump</title>
-
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" void
-<function>cygwin_stackdump</function></funcdef>
-<void />
-</funcprototype></funcsynopsis>
-
-<para> Outputs a stackdump to stderr from the called location.
-</para>
-
-</sect1>
diff --git a/winsup/cygwin/strace.cc b/winsup/cygwin/strace.cc
deleted file mode 100644
index b9af9df..0000000
--- a/winsup/cygwin/strace.cc
+++ /dev/null
@@ -1,469 +0,0 @@
-/* strace.cc: system/windows tracing
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <wingdi.h>
-#include <winuser.h>
-#include <ctype.h>
-#include "cygerrno.h"
-#include "pinfo.h"
-#include "perprocess.h"
-#include "cygwin_version.h"
-#include "cygthread.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "child_info.h"
-
-#define PROTECT(x) x[sizeof (x)-1] = 0
-#define CHECK(x) if (x[sizeof (x)-1] != 0) { small_printf ("array bound exceeded %d\n", __LINE__); ExitProcess (1); }
-
-class strace NO_COPY strace;
-
-#ifndef NOSTRACE
-
-strace::strace ()
-{
- if (!dynamically_loaded && !_active && being_debugged ())
- {
- char buf[30];
- __small_sprintf (buf, "cYg%8x %x", _STRACE_INTERFACE_ACTIVATE_ADDR, &_active);
- OutputDebugString (buf);
- }
-}
-
-void
-strace::hello ()
-{
- if (active ())
- {
- char pidbuf[40];
- if (myself->progname[0])
- __small_sprintf (pidbuf, "(pid %d, ppid %d)", myself->pid, myself->ppid ?: 1);
- else
- {
- GetModuleFileName (NULL, myself->progname, sizeof (myself->progname));
- __small_sprintf (pidbuf, "(windows pid %d)", GetCurrentProcessId ());
- }
- prntf (1, NULL, "**********************************************");
- prntf (1, NULL, "Program name: %s %s", myself->progname, pidbuf);
- prntf (1, NULL, "App version: %d.%d, api: %d.%d",
- user_data->dll_major, user_data->dll_minor,
- user_data->api_major, user_data->api_minor);
- prntf (1, NULL, "DLL version: %d.%d, api: %d.%d",
- cygwin_version.dll_major, cygwin_version.dll_minor,
- cygwin_version.api_major, cygwin_version.api_minor);
- prntf (1, NULL, "DLL build: %s", cygwin_version.dll_build_date);
- prntf (1, NULL, "OS version: Windows %s", wincap.osname ());
- if (cygheap)
- prntf (1, NULL, "Heap size: %u", cygheap->user_heap.chunk);
- prntf (1, NULL, "**********************************************");
- }
-}
-
-int
-strace::microseconds ()
-{
- static hires_us now;
- return (int) now.usecs (true);
-}
-
-static int __stdcall
-getfunc (char *in_dst, const char *func)
-{
- const char *p;
- const char *pe;
- char *dst = in_dst;
- for (p = func; (pe = strchr (p, '(')); p = pe + 1)
- if (isalnum ((int)pe[-1]) || pe[-1] == '_')
- break;
- else if (isspace ((int)pe[-1]))
- {
- pe--;
- break;
- }
- if (!pe)
- pe = strchr (func, '\0');
- for (p = pe; p > func; p--)
- if (p != pe && *p == ' ')
- {
- p++;
- break;
- }
- if (*p == '*')
- p++;
- while (p < pe)
- *dst++ = *p++;
-
- *dst++ = ':';
- *dst++ = ' ';
- *dst = '\0';
-
- return dst - in_dst;
-}
-
-static char *
-mypid (char *buf)
-{
- if (myself && myself->pid)
- __small_sprintf (buf, "%d", myself->pid);
- else
- __small_sprintf (buf, "(%d)", cygwin_pid (GetCurrentProcessId ()));
- return buf;
-}
-
-extern "C" char *__progname;
-
-/* sprintf analog for use by output routines. */
-int
-strace::vsprntf (char *buf, const char *func, const char *infmt, va_list ap)
-{
- int count;
- char fmt[80];
- static NO_COPY bool nonewline = false;
- DWORD err = GetLastError ();
- const char *tn = cygthread::name ();
-
- int microsec = microseconds ();
- lmicrosec = microsec;
-
- __small_sprintf (fmt, "%7d [%s] %s ", microsec, tn, "%s %s%s");
-
- SetLastError (err);
-
- if (nonewline)
- count = 0;
- else
- {
- char *pn;
- if (!cygwin_finished_initializing)
- pn = myself ? myself->progname : NULL;
- else if (__progname)
- pn = __progname;
- else
- pn = NULL;
-
- char *p;
- char progname[NT_MAX_PATH];
- if (!pn)
- GetModuleFileName (NULL, pn = progname, sizeof (progname));
- if (!pn)
- /* hmm */;
- else if ((p = strrchr (pn, '\\')) != NULL)
- p++;
- else if ((p = strrchr (pn, '/')) != NULL)
- p++;
- else
- p = pn;
- if (p != progname)
- strcpy (progname, p);
- if ((p = strrchr (progname, '.')) != NULL
- && ascii_strcasematch (p, ".exe"))
- *p = '\000';
- p = progname;
- char tmpbuf[20];
- count = __small_sprintf (buf, fmt, p && *p ? p : "?", mypid (tmpbuf),
- execing ? "!" : "");
- if (func)
- count += getfunc (buf + count, func);
- }
-
- count += __small_vsprintf (buf + count, infmt, ap);
- char *p;
- for (p = buf + count; p > buf; p--)
- switch (p[-1])
- {
- case '\n':
- p[-1] = '\0';
- break;
- case '\b':
- *--p = '\0';
- nonewline = true;
- goto done;
- default:
- goto addnl;
- }
-
-addnl:
- *p++ = '\n';
- *p = '\0';
- nonewline = false;
-
-done:
- return p - buf;
-}
-
-/* Write to strace file or strace queue. */
-void
-strace::write (unsigned category, const char *buf, int count)
-{
-# define PREFIX (3 + 8 + 1 + 8 + 1)
- char outbuf[PREFIX + 1 + count + 1];
-# define outstuff (outbuf + 12)
- __small_sprintf (outstuff, "%x %s", category, buf);
- __small_sprintf (outbuf, "cYg%08x", strlen (outstuff) + 1);
- outstuff[-1] = ' ';
- OutputDebugString (outbuf);
-#undef outstuff
-#undef PREFIX
-}
-
-void
-strace::write_childpid (child_info& ch, DWORD pid)
-{
- char buf[30];
-
- if (!attached () || !being_debugged ())
- return;
- WaitForSingleObject (ch.subproc_ready, 30000);
- __small_sprintf (buf, "cYg%8x %x", _STRACE_CHILD_PID, pid);
- OutputDebugString (buf);
-}
-
-/* Printf function used when tracing system calls.
- Warning: DO NOT SET ERRNO HERE! */
-
-void
-strace::vprntf (unsigned category, const char *func, const char *fmt, va_list ap)
-{
- DWORD err = GetLastError ();
- int len;
- char buf[NT_MAX_PATH];
-
- PROTECT (buf);
- SetLastError (err);
-
- len = vsprntf (buf, func, fmt, ap);
- CHECK (buf);
- if (category & _STRACE_SYSTEM)
- {
- DWORD done;
- WriteFile (GetStdHandle (STD_ERROR_HANDLE), buf, len, &done, 0);
- FlushFileBuffers (GetStdHandle (STD_ERROR_HANDLE));
- /* Make sure that the message shows up on the screen, too, since this is
- a serious error. */
- if (GetFileType (GetStdHandle (STD_ERROR_HANDLE)) != FILE_TYPE_CHAR)
- {
- HANDLE h = CreateFile ("CONOUT$", GENERIC_READ | GENERIC_WRITE,
- FILE_SHARE_WRITE | FILE_SHARE_WRITE,
- &sec_none, OPEN_EXISTING, 0, 0);
- if (h != INVALID_HANDLE_VALUE)
- WriteFile (h, buf, len, &done, 0);
- CloseHandle (h);
- }
- }
-
-#ifndef NOSTRACE
- if (active ())
- write (category, buf, len);
-#endif
- SetLastError (err);
-}
-
-void
-strace::prntf (unsigned category, const char *func, const char *fmt, ...)
-{
- va_list ap;
-
- va_start (ap, fmt);
- vprntf (category, func, fmt, ap);
-}
-
-extern "C" void
-strace_printf (unsigned category, const char *func, const char *fmt, ...)
-{
- va_list ap;
-
- if ((category & _STRACE_SYSTEM) || strace.active ())
- {
- va_start (ap, fmt);
- strace.vprntf (category, func, fmt, ap);
- }
-}
-
-static NO_COPY struct tab
-{
- int v;
- const char *n;
-}
-ta[] =
-{
- { WM_NULL, "WM_NULL" },
- { WM_CREATE, "WM_CREATE" },
- { WM_DESTROY, "WM_DESTROY" },
- { WM_MOVE, "WM_MOVE" },
- { WM_SIZE, "WM_SIZE" },
- { WM_ACTIVATE, "WM_ACTIVATE" },
- { WM_SETFOCUS, "WM_SETFOCUS" },
- { WM_KILLFOCUS, "WM_KILLFOCUS" },
- { WM_ENABLE, "WM_ENABLE" },
- { WM_SETREDRAW, "WM_SETREDRAW" },
- { WM_SETTEXT, "WM_SETTEXT" },
- { WM_GETTEXT, "WM_GETTEXT" },
- { WM_GETTEXTLENGTH, "WM_GETTEXTLENGTH" },
- { WM_PAINT, "WM_PAINT" },
- { WM_CLOSE, "WM_CLOSE" },
- { WM_QUERYENDSESSION, "WM_QUERYENDSESSION" },
- { WM_QUIT, "WM_QUIT" },
- { WM_QUERYOPEN, "WM_QUERYOPEN" },
- { WM_ERASEBKGND, "WM_ERASEBKGND" },
- { WM_SYSCOLORCHANGE, "WM_SYSCOLORCHANGE" },
- { WM_ENDSESSION, "WM_ENDSESSION" },
- { WM_SHOWWINDOW, "WM_SHOWWINDOW" },
- { WM_WININICHANGE, "WM_WININICHANGE" },
- { WM_DEVMODECHANGE, "WM_DEVMODECHANGE" },
- { WM_ACTIVATEAPP, "WM_ACTIVATEAPP" },
- { WM_FONTCHANGE, "WM_FONTCHANGE" },
- { WM_TIMECHANGE, "WM_TIMECHANGE" },
- { WM_CANCELMODE, "WM_CANCELMODE" },
- { WM_SETCURSOR, "WM_SETCURSOR" },
- { WM_MOUSEACTIVATE, "WM_MOUSEACTIVATE" },
- { WM_CHILDACTIVATE, "WM_CHILDACTIVATE" },
- { WM_QUEUESYNC, "WM_QUEUESYNC" },
- { WM_GETMINMAXINFO, "WM_GETMINMAXINFO" },
- { WM_PAINTICON, "WM_PAINTICON" },
- { WM_ICONERASEBKGND, "WM_ICONERASEBKGND" },
- { WM_NEXTDLGCTL, "WM_NEXTDLGCTL" },
- { WM_SPOOLERSTATUS, "WM_SPOOLERSTATUS" },
- { WM_DRAWITEM, "WM_DRAWITEM" },
- { WM_MEASUREITEM, "WM_MEASUREITEM" },
- { WM_DELETEITEM, "WM_DELETEITEM" },
- { WM_VKEYTOITEM, "WM_VKEYTOITEM" },
- { WM_CHARTOITEM, "WM_CHARTOITEM" },
- { WM_SETFONT, "WM_SETFONT" },
- { WM_GETFONT, "WM_GETFONT" },
- { WM_SETHOTKEY, "WM_SETHOTKEY" },
- { WM_GETHOTKEY, "WM_GETHOTKEY" },
- { WM_QUERYDRAGICON, "WM_QUERYDRAGICON" },
- { WM_COMPAREITEM, "WM_COMPAREITEM" },
- { WM_COMPACTING, "WM_COMPACTING" },
- { WM_WINDOWPOSCHANGING, "WM_WINDOWPOSCHANGING" },
- { WM_WINDOWPOSCHANGED, "WM_WINDOWPOSCHANGED" },
- { WM_POWER, "WM_POWER" },
- { WM_COPYDATA, "WM_COPYDATA" },
- { WM_CANCELJOURNAL, "WM_CANCELJOURNAL" },
- { WM_NCCREATE, "WM_NCCREATE" },
- { WM_NCDESTROY, "WM_NCDESTROY" },
- { WM_NCCALCSIZE, "WM_NCCALCSIZE" },
- { WM_NCHITTEST, "WM_NCHITTEST" },
- { WM_NCPAINT, "WM_NCPAINT" },
- { WM_NCACTIVATE, "WM_NCACTIVATE" },
- { WM_GETDLGCODE, "WM_GETDLGCODE" },
- { WM_NCMOUSEMOVE, "WM_NCMOUSEMOVE" },
- { WM_NCLBUTTONDOWN, "WM_NCLBUTTONDOWN" },
- { WM_NCLBUTTONUP, "WM_NCLBUTTONUP" },
- { WM_NCLBUTTONDBLCLK, "WM_NCLBUTTONDBLCLK" },
- { WM_NCRBUTTONDOWN, "WM_NCRBUTTONDOWN" },
- { WM_NCRBUTTONUP, "WM_NCRBUTTONUP" },
- { WM_NCRBUTTONDBLCLK, "WM_NCRBUTTONDBLCLK" },
- { WM_NCMBUTTONDOWN, "WM_NCMBUTTONDOWN" },
- { WM_NCMBUTTONUP, "WM_NCMBUTTONUP" },
- { WM_NCMBUTTONDBLCLK, "WM_NCMBUTTONDBLCLK" },
- { WM_KEYFIRST, "WM_KEYFIRST" },
- { WM_KEYDOWN, "WM_KEYDOWN" },
- { WM_KEYUP, "WM_KEYUP" },
- { WM_CHAR, "WM_CHAR" },
- { WM_DEADCHAR, "WM_DEADCHAR" },
- { WM_SYSKEYDOWN, "WM_SYSKEYDOWN" },
- { WM_SYSKEYUP, "WM_SYSKEYUP" },
- { WM_SYSCHAR, "WM_SYSCHAR" },
- { WM_SYSDEADCHAR, "WM_SYSDEADCHAR" },
- { WM_KEYLAST, "WM_KEYLAST" },
- { WM_INITDIALOG, "WM_INITDIALOG" },
- { WM_COMMAND, "WM_COMMAND" },
- { WM_SYSCOMMAND, "WM_SYSCOMMAND" },
- { WM_TIMER, "WM_TIMER" },
- { WM_HSCROLL, "WM_HSCROLL" },
- { WM_VSCROLL, "WM_VSCROLL" },
- { WM_INITMENU, "WM_INITMENU" },
- { WM_INITMENUPOPUP, "WM_INITMENUPOPUP" },
- { WM_MENUSELECT, "WM_MENUSELECT" },
- { WM_MENUCHAR, "WM_MENUCHAR" },
- { WM_ENTERIDLE, "WM_ENTERIDLE" },
- { WM_CTLCOLORMSGBOX, "WM_CTLCOLORMSGBOX" },
- { WM_CTLCOLOREDIT, "WM_CTLCOLOREDIT" },
- { WM_CTLCOLORLISTBOX, "WM_CTLCOLORLISTBOX" },
- { WM_CTLCOLORBTN, "WM_CTLCOLORBTN" },
- { WM_CTLCOLORDLG, "WM_CTLCOLORDLG" },
- { WM_CTLCOLORSCROLLBAR, "WM_CTLCOLORSCROLLBAR" },
- { WM_CTLCOLORSTATIC, "WM_CTLCOLORSTATIC" },
- { WM_MOUSEFIRST, "WM_MOUSEFIRST" },
- { WM_MOUSEMOVE, "WM_MOUSEMOVE" },
- { WM_LBUTTONDOWN, "WM_LBUTTONDOWN" },
- { WM_LBUTTONUP, "WM_LBUTTONUP" },
- { WM_LBUTTONDBLCLK, "WM_LBUTTONDBLCLK" },
- { WM_RBUTTONDOWN, "WM_RBUTTONDOWN" },
- { WM_RBUTTONUP, "WM_RBUTTONUP" },
- { WM_RBUTTONDBLCLK, "WM_RBUTTONDBLCLK" },
- { WM_MBUTTONDOWN, "WM_MBUTTONDOWN" },
- { WM_MBUTTONUP, "WM_MBUTTONUP" },
- { WM_MBUTTONDBLCLK, "WM_MBUTTONDBLCLK" },
- { WM_MOUSELAST, "WM_MOUSELAST" },
- { WM_PARENTNOTIFY, "WM_PARENTNOTIFY" },
- { WM_ENTERMENULOOP, "WM_ENTERMENULOOP" },
- { WM_EXITMENULOOP, "WM_EXITMENULOOP" },
- { WM_MDICREATE, "WM_MDICREATE" },
- { WM_MDIDESTROY, "WM_MDIDESTROY" },
- { WM_MDIACTIVATE, "WM_MDIACTIVATE" },
- { WM_MDIRESTORE, "WM_MDIRESTORE" },
- { WM_MDINEXT, "WM_MDINEXT" },
- { WM_MDIMAXIMIZE, "WM_MDIMAXIMIZE" },
- { WM_MDITILE, "WM_MDITILE" },
- { WM_MDICASCADE, "WM_MDICASCADE" },
- { WM_MDIICONARRANGE, "WM_MDIICONARRANGE" },
- { WM_MDIGETACTIVE, "WM_MDIGETACTIVE" },
- { WM_MDISETMENU, "WM_MDISETMENU" },
- { WM_DROPFILES, "WM_DROPFILES" },
- { WM_MDIREFRESHMENU, "WM_MDIREFRESHMENU" },
- { WM_CUT, "WM_CUT" },
- { WM_COPY, "WM_COPY" },
- { WM_PASTE, "WM_PASTE" },
- { WM_CLEAR, "WM_CLEAR" },
- { WM_UNDO, "WM_UNDO" },
- { WM_RENDERFORMAT, "WM_RENDERFORMAT" },
- { WM_RENDERALLFORMATS, "WM_RENDERALLFORMATS" },
- { WM_DESTROYCLIPBOARD, "WM_DESTROYCLIPBOARD" },
- { WM_DRAWCLIPBOARD, "WM_DRAWCLIPBOARD" },
- { WM_PAINTCLIPBOARD, "WM_PAINTCLIPBOARD" },
- { WM_VSCROLLCLIPBOARD, "WM_VSCROLLCLIPBOARD" },
- { WM_SIZECLIPBOARD, "WM_SIZECLIPBOARD" },
- { WM_ASKCBFORMATNAME, "WM_ASKCBFORMATNAME" },
- { WM_CHANGECBCHAIN, "WM_CHANGECBCHAIN" },
- { WM_HSCROLLCLIPBOARD, "WM_HSCROLLCLIPBOARD" },
- { WM_QUERYNEWPALETTE, "WM_QUERYNEWPALETTE" },
- { WM_PALETTEISCHANGING, "WM_PALETTEISCHANGING" },
- { WM_PALETTECHANGED, "WM_PALETTECHANGED" },
- { WM_HOTKEY, "WM_HOTKEY" },
- { WM_PENWINFIRST, "WM_PENWINFIRST" },
- { WM_PENWINLAST, "WM_PENWINLAST" },
- { WM_ASYNCIO, "ASYNCIO" },
- { 0, 0 }};
-
-void
-strace::wm (int message, int word, int lon)
-{
- if (active ())
- {
- int i;
-
- for (i = 0; ta[i].n; i++)
- {
- if (ta[i].v == message)
- {
- prntf (_STRACE_WM, NULL, "wndproc %d %s %d %d", message, ta[i].n, word, lon);
- return;
- }
- }
- prntf (_STRACE_WM, NULL, "wndproc %d unknown %d %d", message, word, lon);
- }
-}
-#endif /*NOSTRACE*/
diff --git a/winsup/cygwin/strfuncs.cc b/winsup/cygwin/strfuncs.cc
deleted file mode 100644
index 8c0bbb2..0000000
--- a/winsup/cygwin/strfuncs.cc
+++ /dev/null
@@ -1,146 +0,0 @@
-/* strfuncs.cc: misc funcs that don't belong anywhere else
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include <wchar.h>
-#include <winnls.h>
-#include <ntdll.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-
-codepage_type current_codepage = ansi_cp;
-UINT active_codepage = 0;
-
-UINT
-get_cp ()
-{
- if (!active_codepage)
- codepage_init ("ansi");
- return active_codepage;
-}
-
-/* tlen is always treated as the maximum buffer size, including the '\0'
- character. sys_wcstombs will always return a 0-terminated result, no
- matter what. */
-int __stdcall
-sys_wcstombs (char *tgt, int tlen, const PWCHAR src, int slen)
-{
- int ret;
-
- /* Convert UNICODE private use area. Reverse functionality (only for
- path names) is transform_chars in path.cc. */
- if (slen < 0)
- slen = wcslen (src) + 1;
- WCHAR sbuf[slen];
- memcpy (sbuf, src, slen * sizeof (WCHAR));
- const unsigned char *end = (unsigned char *) (sbuf + slen);
- for (unsigned char *s = ((unsigned char *) sbuf) + 1; s < end;
- s += sizeof (WCHAR))
- if (*s == 0xf0)
- *s = 0;
- ret = WideCharToMultiByte (get_cp (), 0, sbuf, slen, tgt, tlen, NULL, NULL);
- if (ret && tgt)
- {
- ret = (ret < tlen) ? ret : tlen - 1;
- tgt[ret] = '\0';
- }
- return ret;
-}
-
-/* Allocate a buffer big enough for the string, always including the
- terminating '\0'. The buffer pointer is returned in *tgt_p, the return
- value is the number of bytes written to the buffer, as usual.
- The "type" argument determines where the resulting buffer is stored.
- It's either one of the cygheap_types values, or it's "HEAP_NOTHEAP".
- In the latter case the allocation uses simple calloc.
-
- Note that this code is shared by cygserver (which requires it via
- __small_vsprintf) and so when built there plain calloc is the
- only choice. */
-int __stdcall
-sys_wcstombs_alloc (char **tgt_p, int type, const PWCHAR src, int slen)
-{
- int ret;
-
- ret = WideCharToMultiByte (get_cp (), 0, src, slen, NULL, 0 ,NULL, NULL);
- if (ret)
- {
- size_t tlen = (slen == -1) ? ret : ret + 1;
-
- if (type == HEAP_NOTHEAP)
- *tgt_p = (char *) calloc (tlen, sizeof (char));
- else
- *tgt_p = (char *) ccalloc ((cygheap_types) type, tlen, sizeof (char));
- if (!*tgt_p)
- return 0;
- ret = sys_wcstombs (*tgt_p, tlen, src, slen);
- }
- return ret;
-}
-
-int __stdcall
-sys_mbstowcs (PWCHAR tgt, int tlen, const char *src, int slen)
-{
- int ret = MultiByteToWideChar (get_cp (), 0, src, slen, tgt, tlen);
- if (ret && tgt)
- {
- ret = (ret < tlen) ? ret : tlen - 1;
- tgt[ret] = L'\0';
- }
- return ret;
-}
-
-/* Same as sys_wcstombs_alloc, just backwards. */
-int __stdcall
-sys_mbstowcs_alloc (PWCHAR *tgt_p, int type, const char *src, int slen)
-{
- int ret;
-
- ret = MultiByteToWideChar (get_cp (), 0, src, slen, NULL, 0);
- if (ret)
- {
- size_t tlen = (slen == -1 ? ret : ret + 1);
-
- if (type == HEAP_NOTHEAP)
- *tgt_p = (PWCHAR) calloc (tlen, sizeof (WCHAR));
- else
- *tgt_p = (PWCHAR) ccalloc ((cygheap_types) type, tlen, sizeof (WCHAR));
- if (!*tgt_p)
- return 0;
- ret = sys_mbstowcs (*tgt_p, tlen, src, slen);
- }
- return ret;
-}
-
-static WCHAR hex_wchars[] = L"0123456789abcdef";
-
-NTSTATUS NTAPI
-RtlInt64ToHexUnicodeString (ULONGLONG value, PUNICODE_STRING dest,
- BOOLEAN append)
-{
- USHORT len = append ? dest->Length : 0;
- if (dest->MaximumLength - len < 16 * (int) sizeof (WCHAR))
- return STATUS_BUFFER_OVERFLOW;
- PWCHAR end = (PWCHAR) ((PBYTE) dest->Buffer + len);
- register PWCHAR p = end + 16;
- while (p-- > end)
- {
- *p = hex_wchars[value & 0xf];
- value >>= 4;
- }
- dest->Length += 16 * sizeof (WCHAR);
- return STATUS_SUCCESS;
-}
diff --git a/winsup/cygwin/string.h b/winsup/cygwin/string.h
deleted file mode 100644
index b02fadb..0000000
--- a/winsup/cygwin/string.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/* string.h: Extra string defs
-
- Copyright 2001, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_STRING_H
-#define _CYGWIN_STRING_H
-
-#include_next <string.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#undef strechr
-#define strechr cygwin_strechr
-static inline __stdcall char *
-strechr (const char *s, int c)
-{
- register char * res;
- __asm__ __volatile__ ("\
- movb %%al,%%ah\n\
-1: movb (%1),%%al\n\
- cmpb %%ah,%%al\n\
- je 2f\n\
- incl %1\n\
- testb %%al,%%al\n\
- jne 1b\n\
- decl %1\n\
-2: movl %1,%0\n\
- ":"=a" (res), "=r" (s)
- :"0" (c), "1" (s));
- return res;
-}
-
-#ifdef __INSIDE_CYGWIN__
-
-extern const char isalpha_array[];
-
-static inline int
-ascii_strcasematch (const char *cs, const char *ct)
-{
- register int __res;
- int d0, d1;
- __asm__ ("\
- .global _isalpha_array \n\
- cld \n\
- andl $0xff,%%eax \n\
-1: lodsb \n\
- scasb \n\
- je 2f \n\
- xorb _isalpha_array(%%eax),%%al \n\
- cmpb -1(%%edi),%%al \n\
- jne 3f \n\
-2: testb %%al,%%al \n\
- jnz 1b \n\
- movl $1,%%eax \n\
- jmp 4f \n\
-3: xor %0,%0 \n\
-4:"
- :"=a" (__res), "=&S" (d0), "=&D" (d1)
- : "1" (cs), "2" (ct));
-
- return __res;
-}
-
-static inline int
-ascii_strncasematch (const char *cs, const char *ct, size_t n)
-{
- register int __res;
- int d0, d1, d2;
- __asm__ ("\
- .global _isalpha_array; \n\
- cld \n\
- andl $0xff,%%eax \n\
-1: decl %3 \n\
- js 3f \n\
- lodsb \n\
- scasb \n\
- je 2f \n\
- xorb _isalpha_array(%%eax),%%al \n\
- cmpb -1(%%edi),%%al \n\
- jne 4f \n\
-2: testb %%al,%%al \n\
- jnz 1b \n\
-3: movl $1,%%eax \n\
- jmp 5f \n\
-4: xor %0,%0 \n\
-5:"
- :"=a" (__res), "=&S" (d0), "=&D" (d1), "=&c" (d2)
- :"1" (cs), "2" (ct), "3" (n));
-
- return __res;
-}
-
-#undef strcasecmp
-#define strcasecmp cygwin_strcasecmp
-int __stdcall cygwin_strcasecmp (const char *, const char *);
-
-#undef strncasecmp
-#define strncasecmp cygwin_strncasecmp
-int __stdcall cygwin_strncasecmp (const char *, const char *, size_t);
-
-#define strcasematch(s1,s2) (!cygwin_strcasecmp ((s1),(s2)))
-#define strncasematch(s1,s2,n) (!cygwin_strncasecmp ((s1),(s2),(n)))
-
-#undef strlwr
-#define strlwr cygwin_strlwr
-char * __stdcall cygwin_strlwr (char *);
-
-#undef strupr
-#define strupr cygwin_strupr
-char * __stdcall cygwin_strupr (char *);
-
-#endif /* __INSIDE_CYGWIN__ */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CYGWIN_STRING_H */
diff --git a/winsup/cygwin/strsep.cc b/winsup/cygwin/strsep.cc
deleted file mode 100644
index f03df3d..0000000
--- a/winsup/cygwin/strsep.cc
+++ /dev/null
@@ -1,64 +0,0 @@
-/* strsep.cc: strsep call */
-
-#include <stdio.h>
-
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-extern "C" char *
-strsep (char **stringp,
- const char *delim)
-{
- register char *s;
- register const char *spanp;
- register int c, sc;
- char *tok;
-
- if ((s = *stringp) == NULL)
- return (NULL);
- for (tok = s;;) {
- c = *s++;
- spanp = delim;
- do {
- if ((sc = *spanp++) == c) {
- if (c == 0)
- s = NULL;
- else
- s[-1] = 0;
- *stringp = s;
- return (tok);
- }
- } while (sc != 0);
- }
- /* NOTREACHED */
-}
diff --git a/winsup/cygwin/strsig.cc b/winsup/cygwin/strsig.cc
deleted file mode 100644
index 8bc8c1c..0000000
--- a/winsup/cygwin/strsig.cc
+++ /dev/null
@@ -1,97 +0,0 @@
-/* strsig.cc
-
- Copyright 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. */
-
-#include "winsup.h"
-#include <cygtls.h>
-
-struct sigdesc
-{
- int n;
- const char *name;
- const char *str;
-};
-
-#define __signals \
- _s(SIGHUP, "Hangup"), /* 1 */ \
- _s(SIGINT, "Interrupt"), /* 2 */ \
- _s(SIGQUIT, "Quit"), /* 3 */ \
- _s(SIGILL, "Illegal instruction"), /* 4 */ \
- _s(SIGTRAP, "Trace/breakpoint trap"), /* 5 */ \
- _s(SIGABRT, "Aborted"), /* 6 */ \
- _s(SIGEMT, "EMT instruction"), /* 7 */ \
- _s(SIGFPE, "Floating point exception"), /* 8 */ \
- _s(SIGKILL, "Killed"), /* 9 */ \
- _s(SIGBUS, "Bus error"), /* 10 */ \
- _s(SIGSEGV, "Segmentation fault"), /* 11 */ \
- _s(SIGSYS, "Bad system call"), /* 12 */ \
- _s(SIGPIPE, "Broken pipe"), /* 13 */ \
- _s(SIGALRM, "Alarm clock"), /* 14 */ \
- _s(SIGTERM, "Terminated"), /* 15 */ \
- _s(SIGURG, "Urgent I/O condition"), /* 16 */ \
- _s(SIGSTOP, "Stopped (signal)"), /* 17 */ \
- _s(SIGTSTP, "Stopped"), /* 18 */ \
- _s(SIGCONT, "Continued"), /* 19 */ \
- _s2(SIGCHLD, "Child exited", /* 20 */ \
- SIGCLD, "Child exited"), \
- _s(SIGTTIN, "Stopped (tty input)"), /* 21 */ \
- _s(SIGTTOU, "Stopped (tty output)"), /* 22 */ \
- _s2(SIGIO, "I/O possible", /* 23 */ \
- SIGPOLL, "I/O possible"), \
- _s(SIGXCPU, "CPU time limit exceeded"), /* 24 */ \
- _s(SIGXFSZ, "File size limit exceeded"), /* 25 */ \
- _s(SIGVTALRM, "Virtual timer expired"), /* 26 */ \
- _s(SIGPROF, "Profiling timer expired"), /* 27 */ \
- _s(SIGWINCH, "Window changed"), /* 28 */ \
- _s(SIGLOST, "Resource lost"), /* 29 */ \
- _s(SIGUSR1, "User defined signal 1"), /* 30 */ \
- _s(SIGUSR2, "User defined signal 2"), /* 31 */ \
- _s2(SIGRTMIN, "Real-time signal 0", /* 32 */ \
- SIGRTMAX, "Real-time signal 0")
-
-#define _s(n, s) #n
-#define _s2(n, s, n1, s1) #n
-const char *sys_sigabbrev[] NO_COPY_INIT =
-{
- NULL,
- __signals
-};
-
-#undef _s
-#undef _s2
-#define _s(n, s) {n, #n, s}
-#define _s2(n, s, n1, s1) {n, #n, s}, {n, #n1, #s1}
-static const sigdesc siglist[] =
-{
- __signals,
- {0, NULL, NULL}
-};
-
-extern "C" char *
-strsignal (int signo)
-{
- const char *sigstring = "Unknown signal %d";
- for (int i = 0; siglist[i].n; i++)
- if (siglist[i].n == signo)
- {
- sigstring = siglist[i].str;
- break;
- }
- __small_sprintf (_my_tls.locals.signamebuf, sigstring, signo);
- return _my_tls.locals.signamebuf;
-}
-
-extern "C" int
-strtosigno (const char *name)
-{
- for (int i = 0; siglist[i].n; i++)
- if (strcmp (siglist[i].name, name) == 0)
- return siglist[i].n;
- return 0;
-}
diff --git a/winsup/cygwin/sync.cc b/winsup/cygwin/sync.cc
deleted file mode 100644
index 6bd0ecf..0000000
--- a/winsup/cygwin/sync.cc
+++ /dev/null
@@ -1,152 +0,0 @@
-/* sync.cc: Synchronization functions for cygwin.
-
- This file implements the methods for controlling the "muto" class
- which is intended to operate similarly to a mutex but attempts to
- avoid making expensive calls to the kernel.
-
- Copyright 2000, 2001, 2002, 2003, 2004, 2005 Red Hat, Inc.
-
- Written by Christopher Faylor <cgf@cygnus.com>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "miscfuncs.h"
-#include "sync.h"
-#include "thread.h"
-#include "cygtls.h"
-
-#undef WaitForSingleObject
-
-DWORD NO_COPY muto::exiting_thread;
-
-void
-muto::grab ()
-{
- tls = &_my_tls;
-}
-
-/* Constructor */
-muto *
-muto::init (const char *s)
-{
- char *already_exists = (char *) InterlockedExchangePointer (&name, s);
- if (already_exists)
- while (!bruteforce)
- low_priority_sleep (0);
- else
- {
- waiters = -1;
- /* Create event which is used in the fallback case when blocking is necessary */
- bruteforce = CreateEvent (&sec_none_nih, FALSE, FALSE, NULL);
- if (!bruteforce)
- api_fatal ("couldn't allocate muto '%s', %E", s);
- }
-
- return this;
-}
-
-#if 0 /* FIXME: Do we need this? mutos aren't destroyed until process exit */
-/* Destructor (racy?) */
-muto::~muto ()
-{
- while (visits)
- release ();
-
- HANDLE h = bruteforce;
- bruteforce = NULL;
- /* Just need to close the event handle */
- if (h)
- CloseHandle (h);
-}
-#endif
-
-/* Acquire the lock. Argument is the number of milliseconds to wait for
- the lock. Multiple visits from the same thread are allowed and should
- be handled correctly.
-
- Note: The goal here is to minimize, as much as possible, calls to the
- OS. Hence the use of InterlockedIncrement, etc., rather than (much) more
- expensive OS mutexes. Also note that the only two valid "ms" times are
- 0 and INFINITE. */
-int
-muto::acquire (DWORD ms)
-{
- void *this_tls = &_my_tls;
-#if 0
- if (exiting_thread)
- return this_tid == exiting_thread;
-#endif
-
- if (tls != this_tls)
- {
- /* Increment the waiters part of the class. Need to do this first to
- avoid potential races. */
- LONG was_waiting = ms ? InterlockedIncrement (&waiters) : 0;
-
- while (was_waiting || InterlockedExchange (&sync, 1) != 0)
- switch (WaitForSingleObject (bruteforce, ms))
- {
- case WAIT_OBJECT_0:
- was_waiting = 0;
- break;
- default:
- return 0; /* failed. */
- }
-
- /* Have to do it this way to avoid a race */
- if (!ms)
- InterlockedIncrement (&waiters);
-
- tls = this_tls; /* register this thread. */
- }
-
- return ++visits; /* Increment visit count. */
-}
-
-bool
-muto::acquired ()
-{
- return tls == &_my_tls;
-}
-
-/* Return the muto lock. Needs to be called once per every acquire. */
-int
-muto::release ()
-{
- void *this_tls = &_my_tls;
-
- if (tls != this_tls || !visits)
- {
- SetLastError (ERROR_NOT_OWNER); /* Didn't have the lock. */
- return 0; /* failed. */
- }
-
- /* FIXME: Need to check that other thread has not exited, too. */
- if (!--visits)
- {
- tls = 0; /* We were the last unlocker. */
- InterlockedExchange (&sync, 0); /* Reset trigger. */
- /* This thread had incremented waiters but had never decremented it.
- Decrement it now. If it is >= 0 then there are possibly other
- threads waiting for the lock, so trigger bruteforce. */
- if (InterlockedDecrement (&waiters) >= 0)
- SetEvent (bruteforce); /* Wake up one of the waiting threads */
- else if (*name == '!')
- {
- CloseHandle (bruteforce); /* If *name == '!' and there are no
- other waiters, then this is the
- last time this muto will ever be
- used, so close the handle. */
-#ifdef DEBUGGING
- bruteforce = NULL;
-#endif
- }
- }
-
- return 1; /* success. */
-}
diff --git a/winsup/cygwin/sync.h b/winsup/cygwin/sync.h
deleted file mode 100644
index dfe2c39..0000000
--- a/winsup/cygwin/sync.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* sync.h: Header file for cygwin synchronization primitives.
-
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Red Hat, Inc.
-
- Written by Christopher Faylor <cgf@cygnus.com>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYNC_H
-#define _SYNC_H
-/* FIXME: Note that currently this class cannot be allocated via `new' since
- there are issues with malloc and fork. */
-class muto
-{
-public:
- const char *name;
-private:
- static DWORD exiting_thread;
- LONG sync; /* Used to serialize access to this class. */
- LONG waiters; /* Number of threads waiting for lock. */
- HANDLE bruteforce; /* event handle used to control waiting for lock. */
-public:
- LONG visits; /* Count of number of times a thread has called acquire. */
- void *tls; /* Tls of lock owner. */
- // class muto *next;
-
- /* The real constructor. */
- muto *init (const char *) __attribute__ ((regparm (2)));
-
-#if 0 /* FIXME: See comment in sync.cc */
- ~muto ()
-#endif
- int acquire (DWORD ms = INFINITE) __attribute__ ((regparm (2))); /* Acquire the lock. */
- int release () __attribute__ ((regparm (1))); /* Release the lock. */
-
- bool acquired () __attribute__ ((regparm (1)));
- void upforgrabs () {tls = this;} // just set to an invalid address
- void grab () __attribute__ ((regparm (1)));
- operator int () const {return !!name;}
- static void set_exiting_thread () {exiting_thread = GetCurrentThreadId ();}
-};
-
-class lock_process
-{
- bool skip_unlock;
- static muto locker;
-public:
- static void init () {locker.init ("lock_process");}
- void dont_bother () {skip_unlock = true;}
- lock_process (bool exiting = false)
- {
- locker.acquire ();
- skip_unlock = exiting;
- if (exiting && exit_state < ES_PROCESS_LOCKED)
- {
- exit_state = ES_PROCESS_LOCKED;
- muto::set_exiting_thread ();
- }
- }
- ~lock_process ()
- {
- if (!skip_unlock)
- locker.release ();
- }
- friend class dtable;
- friend class fhandler_fifo;
-};
-
-#endif /*_SYNC_H*/
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
deleted file mode 100644
index 7100ce3..0000000
--- a/winsup/cygwin/syscalls.cc
+++ /dev/null
@@ -1,3893 +0,0 @@
-/* syscalls.cc: syscalls
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008 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 fstat __FOOfstat__
-#define lstat __FOOlstat__
-#define stat __FOOstat__
-#define _close __FOO_close__
-#define _lseek __FOO_lseek__
-#define _open __FOO_open__
-#define _read __FOO_read__
-#define _write __FOO_write__
-#define _open64 __FOO_open64__
-#define _lseek64 __FOO_lseek64__
-#define _fstat64 __FOO_fstat64__
-#define pread __FOO_pread
-#define pwrite __FOO_pwrite
-
-#include "winsup.h"
-#include "miscfuncs.h"
-#include <sys/stat.h>
-#include <sys/vfs.h> /* needed for statfs */
-#include <sys/statvfs.h> /* needed for statvfs */
-#include <stdlib.h>
-#include <stdio.h>
-#include <process.h>
-#include <utmp.h>
-#include <utmpx.h>
-#include <sys/uio.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <sys/wait.h>
-#include <rpc.h>
-#include "ntdll.h"
-
-#undef fstat
-#undef lstat
-#undef stat
-#undef pread
-#undef pwrite
-
-#include <cygwin/version.h>
-#include "cygerrno.h"
-#include "perprocess.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "sigproc.h"
-#include "pinfo.h"
-#include "shared_info.h"
-#include "cygheap.h"
-#include "pwdgrp.h"
-#include "cpuid.h"
-#include "registry.h"
-#include "environ.h"
-#include "tls_pbuf.h"
-
-#undef _close
-#undef _lseek
-#undef _open
-#undef _read
-#undef _write
-#undef _open64
-#undef _lseek64
-#undef _fstat64
-
-suffix_info stat_suffixes[] =
-{
- suffix_info ("", 1),
- suffix_info (".exe", 1),
- suffix_info (NULL)
-};
-
-SYSTEM_INFO system_info;
-
-static int __stdcall mknod_worker (const char *, mode_t, mode_t, _major_t,
- _minor_t);
-
-/* Close all files and process any queued deletions.
- Lots of unix style applications will open a tmp file, unlink it,
- but never call close. This function is called by _exit to
- ensure we don't leave any such files lying around. */
-
-void __stdcall
-close_all_files (bool norelease)
-{
- cygheap->fdtab.lock ();
-
- semaphore::terminate ();
-
- fhandler_base *fh;
- HANDLE h = NULL;
-
- for (int i = 0; i < (int) cygheap->fdtab.size; i++)
- if ((fh = cygheap->fdtab[i]) != NULL)
- {
-#ifdef DEBUGGING
- debug_printf ("closing fd %d", i);
-#endif
- if (i == 2)
- DuplicateHandle (GetCurrentProcess (), fh->get_output_handle (), GetCurrentProcess (), &h, 0, false,
- DUPLICATE_SAME_ACCESS);
- fh->close ();
- if (!norelease)
- cygheap->fdtab.release (i);
- }
-
- if (!hExeced && cygheap->ctty)
- cygheap->close_ctty ();
-
- if (h)
- SetStdHandle (STD_ERROR_HANDLE, h);
- cygheap->fdtab.unlock ();
-}
-
-int
-dup (int fd)
-{
- return cygheap->fdtab.dup2 (fd, cygheap_fdnew ());
-}
-
-int
-dup2 (int oldfd, int newfd)
-{
- return cygheap->fdtab.dup2 (oldfd, newfd);
-}
-
-static char desktop_ini[] =
- "[.ShellClassInfo]\r\nCLSID={645FF040-5081-101B-9F08-00AA002F954E}\r\n";
-static BYTE info2[] =
-{
- 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x20, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-static void
-try_to_bin (path_conv &win32_path, HANDLE h)
-{
- NTSTATUS status;
- OBJECT_ATTRIBUTES attr;
- IO_STATUS_BLOCK io;
- HANDLE rootdir = NULL, recyclerdir = NULL;
- USHORT recycler_base_len = 0, recycler_user_len = 0;
- UNICODE_STRING root, recycler, fname;
- WCHAR recyclerbuf[NAME_MAX + 1]; /* Enough for recycler + SID + filename */
- PFILE_NAME_INFORMATION pfni;
- PFILE_INTERNAL_INFORMATION pfii;
- PFILE_RENAME_INFORMATION pfri;
- BYTE infobuf[sizeof (FILE_NAME_INFORMATION ) + 32767 * sizeof (WCHAR)];
-
- pfni = (PFILE_NAME_INFORMATION) infobuf;
- status = NtQueryInformationFile (h, &io, pfni, sizeof infobuf,
- FileNameInformation);
- if (!NT_SUCCESS (status))
- {
- debug_printf ("NtQueryInformationFile (FileNameInformation) failed, %08x",
- status);
- goto out;
- }
- /* The filename could change, the parent dir not. So we split both paths
- and take the prefix. However, there are two special cases:
- - The handle refers to the root dir of the volume.
- - The handle refers to the recycler or a subdir.
- Both cases are handled by just returning and not even trying to move
- them into the recycler. */
- if (pfni->FileNameLength == 2) /* root dir. */
- goto out;
- /* Initialize recycler path. */
- RtlInitEmptyUnicodeString (&recycler, recyclerbuf, sizeof recyclerbuf);
- if (wincap.has_recycle_dot_bin ()) /* NTFS and FAT since Vista */
- RtlAppendUnicodeToString (&recycler, L"\\$Recycle.Bin\\");
- else if (win32_path.fs_is_ntfs ()) /* NTFS up to 2K3 */
- RtlAppendUnicodeToString (&recycler, L"\\RECYCLER\\");
- else if (win32_path.fs_is_fat ()) /* FAT up to 2K3 */
- RtlAppendUnicodeToString (&recycler, L"\\Recycled\\");
- else
- goto out;
- /* Is the file a subdir of the recycler? */
- RtlInitCountedUnicodeString(&fname, pfni->FileName, pfni->FileNameLength);
- if (RtlEqualUnicodePathPrefix (&fname, recycler.Buffer, TRUE))
- goto out;
- /* Is fname the recycler? Temporarily hide trailing backslash. */
- recycler.Length -= sizeof (WCHAR);
- if (RtlEqualUnicodeString (&fname, &recycler, TRUE))
- goto out;
-
- /* Create root dir path from file name information. */
- RtlSplitUnicodePath (&fname, &fname, NULL);
- RtlSplitUnicodePath (win32_path.get_nt_native_path (), &root, NULL);
- root.Length -= fname.Length - sizeof (WCHAR);
-
- /* Open root directory. All recycler bin ops are caseinsensitive. */
- InitializeObjectAttributes (&attr, &root, OBJ_CASE_INSENSITIVE, NULL, NULL);
- status = NtOpenFile (&rootdir, FILE_TRAVERSE, &attr, &io,
- FILE_SHARE_VALID_FLAGS, FILE_OPEN_FOR_BACKUP_INTENT);
- if (!NT_SUCCESS (status))
- {
- debug_printf ("NtOpenFile (%S) failed, %08x", &root, status);
- goto out;
- }
-
- /* Strip leading backslash */
- ++recycler.Buffer;
- recycler.Length -= sizeof (WCHAR);
- /* Store length of recycler base dir, should it be necessary to create it. */
- recycler_base_len = recycler.Length;
- /* On NTFS the recycler dir contains user specific subdirs, which are the
- actual recycle bins per user. The name if this dir is the string
- representation of the user SID. */
- if (win32_path.fs_is_ntfs ())
- {
- UNICODE_STRING sid;
- WCHAR sidbuf[128];
- /* Unhide trailing backslash. */
- recycler.Length += sizeof (WCHAR);
- RtlInitEmptyUnicodeString (&sid, sidbuf, sizeof sidbuf);
- /* In contrast to what MSDN claims, this function is already available
- since NT4. */
- RtlConvertSidToUnicodeString (&sid, cygheap->user.sid (), FALSE);
- RtlAppendUnicodeStringToString (&recycler, &sid);
- recycler_user_len = recycler.Length;
- }
- /* Create hopefully unique filename. */
- RtlAppendUnicodeToString (&recycler, L"\\cyg");
- pfii = (PFILE_INTERNAL_INFORMATION) infobuf;
- status = NtQueryInformationFile (h, &io, pfii, sizeof infobuf,
- FileInternalInformation);
- if (!NT_SUCCESS (status))
- {
- debug_printf ("NtQueryInformationFile (FileInternalInformation) failed, "
- "%08x", status);
- goto out;
- }
- RtlInt64ToHexUnicodeString (pfii->FileId.QuadPart, &recycler, TRUE);
- /* Shoot. */
- pfri = (PFILE_RENAME_INFORMATION) infobuf;
- pfri->ReplaceIfExists = TRUE;
- pfri->RootDirectory = rootdir;
- pfri->FileNameLength = recycler.Length;
- memcpy (pfri->FileName, recycler.Buffer, recycler.Length);
- status = NtSetInformationFile (h, &io, pfri, sizeof infobuf,
- FileRenameInformation);
- if (status == STATUS_OBJECT_PATH_NOT_FOUND)
- {
- /* Ok, so the recycler and/or the recycler/SID directory don't exist.
- First reopen root dir with permission to create subdirs. */
- NtClose (rootdir);
- status = NtOpenFile (&rootdir, FILE_ADD_SUBDIRECTORY, &attr, &io,
- FILE_SHARE_VALID_FLAGS, FILE_OPEN_FOR_BACKUP_INTENT);
- if (!NT_SUCCESS (status))
- {
- debug_printf ("NtOpenFile (%S) failed, %08x", &recycler, status);
- goto out;
- }
- /* Then check if recycler exists by opening and potentially creating it.
- Yes, we can really do that. Typically the recycle bin is created
- by the first user actually using the bin. The permissions are the
- default permissions propagated from the root directory. */
- InitializeObjectAttributes (&attr, &recycler, OBJ_CASE_INSENSITIVE,
- rootdir, NULL);
- recycler.Length = recycler_base_len;
- status = NtCreateFile (&recyclerdir,
- READ_CONTROL
- | (win32_path.fs_is_ntfs () ? 0 : FILE_ADD_FILE),
- &attr, &io, NULL,
- FILE_ATTRIBUTE_DIRECTORY
- | FILE_ATTRIBUTE_SYSTEM
- | FILE_ATTRIBUTE_HIDDEN,
- FILE_SHARE_VALID_FLAGS, FILE_OPEN_IF,
- FILE_DIRECTORY_FILE, NULL, 0);
- if (!NT_SUCCESS (status))
- {
- debug_printf ("NtCreateFile (%S) failed, %08x", &recycler, status);
- goto out;
- }
- /* Next, if necessary, check if the recycler/SID dir exists and
- create it if not. */
- if (win32_path.fs_is_ntfs ())
- {
- NtClose (recyclerdir);
- recycler.Length = recycler_user_len;
- status = NtCreateFile (&recyclerdir, READ_CONTROL | FILE_ADD_FILE,
- &attr, &io, NULL, FILE_ATTRIBUTE_DIRECTORY
- | FILE_ATTRIBUTE_SYSTEM
- | FILE_ATTRIBUTE_HIDDEN,
- FILE_SHARE_VALID_FLAGS, FILE_OPEN_IF,
- FILE_DIRECTORY_FILE, NULL, 0);
- if (!NT_SUCCESS (status))
- {
- debug_printf ("NtCreateFile (%S) failed, %08x",
- &recycler, status);
- goto out;
- }
- }
- /* The desktop.ini and INFO2 (pre-Vista) files are expected by
- Windows Explorer. Otherwise, the created bin is treated as
- corrupted */
- if (io.Information == FILE_CREATED)
- {
- HANDLE fh;
- RtlInitUnicodeString (&fname, L"desktop.ini");
- InitializeObjectAttributes (&attr, &fname, OBJ_CASE_INSENSITIVE,
- recyclerdir, NULL);
- status = NtCreateFile (&fh, FILE_GENERIC_WRITE, &attr, &io, NULL,
- FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN,
- FILE_SHARE_VALID_FLAGS, FILE_CREATE,
- FILE_SYNCHRONOUS_IO_NONALERT
- | FILE_NON_DIRECTORY_FILE, NULL, 0);
- if (!NT_SUCCESS (status))
- debug_printf ("NtCreateFile (%S) failed, %08x", &recycler, status);
- else
- {
- status = NtWriteFile (fh, NULL, NULL, NULL, &io, desktop_ini,
- sizeof desktop_ini - 1, NULL, NULL);
- if (!NT_SUCCESS (status))
- debug_printf ("NtWriteFile (%S) failed, %08x", &fname, status);
- NtClose (fh);
- }
- if (!wincap.has_recycle_dot_bin ()) /* No INFO2 file since Vista */
- {
- RtlInitUnicodeString (&fname, L"INFO2");
- status = NtCreateFile (&fh, FILE_GENERIC_WRITE, &attr, &io, NULL,
- FILE_ATTRIBUTE_ARCHIVE
- | FILE_ATTRIBUTE_HIDDEN,
- FILE_SHARE_VALID_FLAGS, FILE_CREATE,
- FILE_SYNCHRONOUS_IO_NONALERT
- | FILE_NON_DIRECTORY_FILE, NULL, 0);
- if (!NT_SUCCESS (status))
- debug_printf ("NtCreateFile (%S) failed, %08x",
- &recycler, status);
- else
- {
- status = NtWriteFile (fh, NULL, NULL, NULL, &io, info2,
- sizeof info2, NULL, NULL);
- if (!NT_SUCCESS (status))
- debug_printf ("NtWriteFile (%S) failed, %08x",
- &fname, status);
- NtClose (fh);
- }
- }
- }
- NtClose (recyclerdir);
- /* Shoot again. */
- status = NtSetInformationFile (h, &io, pfri, sizeof infobuf,
- FileRenameInformation);
- }
- if (!NT_SUCCESS (status))
- debug_printf ("Move %S to %S failed, status = %p",
- win32_path.get_nt_native_path (), &recycler, status);
-out:
- if (rootdir)
- NtClose (rootdir);
-}
-
-static NTSTATUS
-check_dir_not_empty (HANDLE dir)
-{
- IO_STATUS_BLOCK io;
- const ULONG bufsiz = 3 * sizeof (FILE_NAMES_INFORMATION)
- + 3 * NAME_MAX * sizeof (WCHAR);
- PFILE_NAMES_INFORMATION pfni = (PFILE_NAMES_INFORMATION)
- alloca (bufsiz);
- NTSTATUS status = NtQueryDirectoryFile (dir, NULL, NULL, 0, &io, pfni,
- bufsiz, FileNamesInformation,
- FALSE, NULL, TRUE);
- if (!NT_SUCCESS (status))
- {
- syscall_printf ("Checking if directory is empty failed, "
- "status = %p", status);
- return status;
- }
- int cnt = 1;
- while (pfni->NextEntryOffset)
- {
- pfni = (PFILE_NAMES_INFORMATION)
- ((caddr_t) pfni + pfni->NextEntryOffset);
- ++cnt;
- }
- if (cnt > 2)
- {
- syscall_printf ("Directory not empty");
- return STATUS_DIRECTORY_NOT_EMPTY;
- }
- return STATUS_SUCCESS;
-}
-
-NTSTATUS
-unlink_nt (path_conv &pc)
-{
- NTSTATUS status;
- HANDLE fh;
- OBJECT_ATTRIBUTES attr;
- IO_STATUS_BLOCK io;
-
- ACCESS_MASK access = DELETE;
- /* If the R/O attribute is set, we have to open the file with
- FILE_WRITE_ATTRIBUTES to be able to remove this flags before trying
- to delete it. */
- if (pc.file_attributes () & FILE_ATTRIBUTE_READONLY)
- access |= FILE_WRITE_ATTRIBUTES;
-
- ULONG flags = FILE_OPEN_FOR_BACKUP_INTENT;
- /* Add the reparse point flag to native symlinks, otherwise we remove the
- target, not the symlink. */
- if (pc.is_rep_symlink ())
- flags |= FILE_OPEN_REPARSE_POINT;
-
- pc.get_object_attr (attr, sec_none_nih);
- /* First try to open the file with sharing not allowed. If the file
- has an open handle on it, this will fail. That indicates that the
- file has to be moved to the recycle bin so that it actually disappears
- from its directory even though its in use. Otherwise, if opening
- doesn't fail, the file is not in use and by simply closing the handle
- the file will disappear. */
- bool move_to_bin = false;
- status = NtOpenFile (&fh, access, &attr, &io, 0, flags);
- if (status == STATUS_SHARING_VIOLATION)
- {
- move_to_bin = true;
- if (!pc.isdir () || pc.isremote ())
- status = NtOpenFile (&fh, access, &attr, &io,
- FILE_SHARE_VALID_FLAGS, flags);
- else
- {
- /* It's getting tricky. The directory is opened in some process,
- so we're supposed to move it to the recycler and mark it for
- deletion. But what if the directory is not empty? The move
- will work, but the subsequent delete will fail. So we would
- have to move it back. That's bad, because the directory would
- be moved around which results in a temporary inconsistent state.
- So, what we do here is to test if the directory is empty. If
- not, we bail out with ERROR_DIR_NOT_EMTPY. The below code
- tests for at least three entries in the directory, ".", "..",
- and another one. Three entries means, not empty. This doesn't
- work for the root directory of a drive, but the root dir can
- neither be deleted, nor moved anyway. */
- status = NtOpenFile (&fh, access | FILE_LIST_DIRECTORY | SYNCHRONIZE,
- &attr, &io, FILE_SHARE_VALID_FLAGS,
- flags | FILE_SYNCHRONOUS_IO_NONALERT);
- if (NT_SUCCESS (status))
- {
- status = check_dir_not_empty (fh);
- if (!NT_SUCCESS (status))
- {
- NtClose (fh);
- return status;
- }
- }
- }
- }
- if (!NT_SUCCESS (status))
- {
- if (status == STATUS_DELETE_PENDING)
- {
- syscall_printf ("Delete already pending");
- return 0;
- }
- syscall_printf ("Opening file for delete failed, status = %p", status);
- return status;
- }
-
- if (move_to_bin && !pc.isremote ())
- try_to_bin (pc, fh);
-
- /* Get rid of read-only attribute. */
- if (access & FILE_WRITE_ATTRIBUTES)
- NtSetAttributesFile (fh, pc.file_attributes () & ~FILE_ATTRIBUTE_READONLY);
-
- FILE_DISPOSITION_INFORMATION disp = { TRUE };
- status = NtSetInformationFile (fh, &io, &disp, sizeof disp,
- FileDispositionInformation);
- if (!NT_SUCCESS (status))
- {
- syscall_printf ("Setting delete disposition failed, status = %p", status);
- /* Restore R/O attributes. */
- if (access & FILE_WRITE_ATTRIBUTES)
- NtSetAttributesFile (fh, pc.file_attributes ());
- }
- else if ((access & FILE_WRITE_ATTRIBUTES) && !pc.isdir ())
- {
- /* Restore R/O attribute to accommodate hardlinks. Don't try this
- with directories! For some reason the below NtSetInformationFile
- changes the disposition for delete back to FALSE, at least on XP. */
- NtSetAttributesFile (fh, pc.file_attributes ());
- }
-
- NtClose (fh);
- return status;
-}
-
-extern "C" int
-unlink (const char *ourname)
-{
- int res = -1;
- DWORD devn;
- NTSTATUS status;
-
- path_conv win32_name (ourname, PC_SYM_NOFOLLOW, stat_suffixes);
-
- if (win32_name.error)
- {
- set_errno (win32_name.error);
- goto done;
- }
-
- devn = win32_name.get_devn ();
- if (isproc_dev (devn))
- {
- set_errno (EROFS);
- goto done;
- }
-
- if (!win32_name.exists ())
- {
- syscall_printf ("unlinking a nonexistent file");
- set_errno (ENOENT);
- goto done;
- }
- else if (win32_name.isdir ())
- {
- syscall_printf ("unlinking a directory");
- set_errno (EPERM);
- goto done;
- }
-
- status = unlink_nt (win32_name);
- if (NT_SUCCESS (status))
- res = 0;
- else
- __seterrno_from_nt_status (status);
-
- done:
- syscall_printf ("%d = unlink (%s)", res, ourname);
- return res;
-}
-
-extern "C" int
-_remove_r (struct _reent *, const char *ourname)
-{
- path_conv win32_name (ourname, PC_SYM_NOFOLLOW);
-
- if (win32_name.error)
- {
- set_errno (win32_name.error);
- syscall_printf ("-1 = remove (%s)", ourname);
- return -1;
- }
-
- return win32_name.isdir () ? rmdir (ourname) : unlink (ourname);
-}
-
-extern "C" int
-remove (const char *ourname)
-{
- path_conv win32_name (ourname, PC_SYM_NOFOLLOW);
-
- if (win32_name.error)
- {
- set_errno (win32_name.error);
- syscall_printf ("-1 = remove (%s)", ourname);
- return -1;
- }
-
- return win32_name.isdir () ? rmdir (ourname) : unlink (ourname);
-}
-
-extern "C" pid_t
-getpid ()
-{
- return myself->pid;
-}
-
-extern "C" pid_t
-_getpid_r (struct _reent *)
-{
- return getpid ();
-}
-
-/* getppid: POSIX 4.1.1.1 */
-extern "C" pid_t
-getppid ()
-{
- return myself->ppid;
-}
-
-/* setsid: POSIX 4.3.2.1 */
-extern "C" pid_t
-setsid (void)
-{
-#ifdef NEWVFORK
- vfork_save *vf = vfork_storage.val ();
- /* This is a horrible, horrible kludge */
- if (vf && vf->pid < 0)
- {
- pid_t pid = fork ();
- if (pid > 0)
- {
- syscall_printf ("longjmping due to vfork");
- vf->restore_pid (pid);
- }
- /* assuming that fork was successful */
- }
-#endif
-
- if (myself->pgid == myself->pid)
- syscall_printf ("hmm. pgid %d pid %d", myself->pgid, myself->pid);
- else
- {
- myself->ctty = -1;
- cygheap->manage_console_count ("setsid", 0);
- myself->sid = getpid ();
- myself->pgid = getpid ();
- if (cygheap->ctty)
- cygheap->close_ctty ();
- syscall_printf ("sid %d, pgid %d, %s", myself->sid, myself->pgid, myctty ());
- return myself->sid;
- }
-
- set_errno (EPERM);
- return -1;
-}
-
-extern "C" pid_t
-getsid (pid_t pid)
-{
- pid_t res;
- if (!pid)
- res = myself->sid;
- else
- {
- pinfo p (pid);
- if (p)
- res = p->sid;
- else
- {
- set_errno (ESRCH);
- res = -1;
- }
- }
- return res;
-}
-
-extern "C" ssize_t
-read (int fd, void *ptr, size_t len)
-{
- const iovec iov =
- {
- iov_base: ptr,
- iov_len: len
- };
-
- return readv (fd, &iov, 1);
-}
-
-extern "C" ssize_t
-pread (int fd, void *ptr, size_t len, _off64_t off)
-{
- ssize_t res;
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- res = -1;
- else
- res = cfd->pread (ptr, len, off);
-
- syscall_printf ("%d = pread (%d, %p, %d, %d), errno %d",
- res, fd, ptr, len, off, get_errno ());
- return res;
-}
-
-extern "C" ssize_t
-pwrite (int fd, void *ptr, size_t len, _off64_t off)
-{
- ssize_t res;
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- res = -1;
- else
- res = cfd->pwrite (ptr, len, off);
-
- syscall_printf ("%d = pwrite (%d, %p, %d, %d), errno %d",
- res, fd, ptr, len, off, get_errno ());
- return res;
-}
-
-EXPORT_ALIAS (read, _read)
-
-extern "C" ssize_t
-write (int fd, const void *ptr, size_t len)
-{
- const struct iovec iov =
- {
- iov_base: (void *) ptr, // const_cast
- iov_len: len
- };
-
- return writev (fd, &iov, 1);
-}
-
-EXPORT_ALIAS (write, _write)
-
-extern "C" ssize_t
-readv (int fd, const struct iovec *const iov, const int iovcnt)
-{
- extern int sigcatchers;
- const int e = get_errno ();
-
- int res = -1;
-
- const ssize_t tot = check_iovec_for_read (iov, iovcnt);
-
- if (tot <= 0)
- {
- res = tot;
- goto done;
- }
-
- while (1)
- {
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- break;
-
- if ((cfd->get_flags () & O_ACCMODE) == O_WRONLY)
- {
- set_errno (EBADF);
- break;
- }
-
- DWORD wait = cfd->is_nonblocking () ? 0 : INFINITE;
-
- /* Could block, so let user know we at least got here. */
- syscall_printf ("readv (%d, %p, %d) %sblocking, sigcatchers %d",
- fd, iov, iovcnt, wait ? "" : "non", sigcatchers);
-
- if (wait && (!cfd->is_slow () || cfd->uninterruptible_io ()))
- debug_printf ("no need to call ready_for_read");
- else if (!cfd->ready_for_read (fd, wait))
- {
- res = -1;
- goto out;
- }
-
- /* FIXME: This is not thread safe. We need some method to
- ensure that an fd, closed in another thread, aborts I/O
- operations. */
- if (!cfd.isopen ())
- break;
-
- /* Check to see if this is a background read from a "tty",
- sending a SIGTTIN, if appropriate */
- res = cfd->bg_check (SIGTTIN);
-
- if (!cfd.isopen ())
- {
- res = -1;
- break;
- }
-
- if (res > bg_eof)
- {
- myself->process_state |= PID_TTYIN;
- if (!cfd.isopen ())
- {
- res = -1;
- break;
- }
- res = cfd->readv (iov, iovcnt, tot);
- myself->process_state &= ~PID_TTYIN;
- }
-
- out:
- if (res >= 0 || get_errno () != EINTR || !_my_tls.call_signal_handler ())
- break;
- set_errno (e);
- }
-
-done:
- syscall_printf ("%d = readv (%d, %p, %d), errno %d", res, fd, iov, iovcnt,
- get_errno ());
- MALLOC_CHECK;
- return res;
-}
-
-extern "C" ssize_t
-writev (const int fd, const struct iovec *const iov, const int iovcnt)
-{
- int res = -1;
- const ssize_t tot = check_iovec_for_write (iov, iovcnt);
-
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- goto done;
-
- if (tot <= 0)
- {
- res = tot;
- goto done;
- }
-
- if ((cfd->get_flags () & O_ACCMODE) == O_RDONLY)
- {
- set_errno (EBADF);
- goto done;
- }
-
- /* Could block, so let user know we at least got here. */
- if (fd == 1 || fd == 2)
- paranoid_printf ("writev (%d, %p, %d)", fd, iov, iovcnt);
- else
- syscall_printf ("writev (%d, %p, %d)", fd, iov, iovcnt);
-
- res = cfd->bg_check (SIGTTOU);
-
- if (res > (int) bg_eof)
- {
- myself->process_state |= PID_TTYOU;
- res = cfd->writev (iov, iovcnt, tot);
- myself->process_state &= ~PID_TTYOU;
- }
-
-done:
- if (fd == 1 || fd == 2)
- paranoid_printf ("%d = write (%d, %p, %d), errno %d",
- res, fd, iov, iovcnt, get_errno ());
- else
- syscall_printf ("%d = write (%d, %p, %d), errno %d",
- res, fd, iov, iovcnt, get_errno ());
-
- MALLOC_CHECK;
- return res;
-}
-
-/* _open */
-/* newlib's fcntl.h defines _open as taking variable args so we must
- correspond. The third arg if it exists is: mode_t mode. */
-extern "C" int
-open (const char *unix_path, int flags, ...)
-{
- int res = -1;
- va_list ap;
- mode_t mode = 0;
- sig_dispatch_pending ();
-
- syscall_printf ("open (%s, %p)", unix_path, flags);
- myfault efault;
- if (efault.faulted (EFAULT))
- /* errno already set */;
- else if (!*unix_path)
- set_errno (ENOENT);
- else
- {
- /* check for optional mode argument */
- va_start (ap, flags);
- mode = va_arg (ap, mode_t);
- va_end (ap);
-
- fhandler_base *fh;
- cygheap_fdnew fd;
-
- if (fd >= 0)
- {
- if (!(fh = build_fh_name (unix_path, NULL,
- (flags & (O_NOFOLLOW | O_EXCL))
- ? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW,
- stat_suffixes)))
- res = -1; // errno already set
- else if ((flags & O_NOFOLLOW) && fh->issymlink ())
- {
- delete fh;
- res = -1;
- set_errno (ELOOP);
- }
- else if (((flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL)) && fh->exists ())
- {
- delete fh;
- res = -1;
- set_errno (EEXIST);
- }
- else if (fh->is_fs_special () && fh->device_access_denied (flags))
- {
- delete fh;
- res = -1;
- }
- else if (!fh->open (flags, (mode & 07777) & ~cygheap->umask))
- {
- delete fh;
- res = -1;
- }
- else
- {
- cygheap->fdtab[fd] = fh;
- if ((res = fd) <= 2)
- set_std_handle (res);
- }
- }
- }
-
- syscall_printf ("%d = open (%s, %p)", res, unix_path, flags);
- return res;
-}
-
-EXPORT_ALIAS (open, _open )
-EXPORT_ALIAS (open, _open64 )
-
-extern "C" _off64_t
-lseek64 (int fd, _off64_t pos, int dir)
-{
- _off64_t res;
-
- if (dir != SEEK_SET && dir != SEEK_CUR && dir != SEEK_END)
- {
- set_errno (EINVAL);
- res = -1;
- }
- else
- {
- cygheap_fdget cfd (fd);
- if (cfd >= 0)
- res = cfd->lseek (pos, dir);
- else
- res = -1;
- }
- syscall_printf ("%D = lseek (%d, %D, %d)", res, fd, pos, dir);
-
- return res;
-}
-
-EXPORT_ALIAS (lseek64, _lseek64)
-
-extern "C" _off_t
-lseek (int fd, _off_t pos, int dir)
-{
- return lseek64 (fd, (_off64_t) pos, dir);
-}
-
-EXPORT_ALIAS (lseek, _lseek)
-
-extern "C" int
-close (int fd)
-{
- int res;
-
- syscall_printf ("close (%d)", fd);
-
- MALLOC_CHECK;
- cygheap_fdget cfd (fd, true);
- if (cfd < 0)
- res = -1;
- else
- {
- res = cfd->close ();
- cfd.release ();
- }
-
- syscall_printf ("%d = close (%d)", res, fd);
- MALLOC_CHECK;
- return res;
-}
-
-EXPORT_ALIAS (close, _close)
-
-extern "C" int
-isatty (int fd)
-{
- int res;
-
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- res = 0;
- else
- res = cfd->is_tty ();
- syscall_printf ("%d = isatty (%d)", res, fd);
- return res;
-}
-EXPORT_ALIAS (isatty, _isatty)
-
-/* Under NT, try to make a hard link using backup API. If that
- fails or we are Win 95, just copy the file.
- FIXME: We should actually be checking partition type, not OS.
- Under NTFS, we should support hard links. On FAT partitions,
- we should just copy the file.
-*/
-
-extern "C" int
-link (const char *oldpath, const char *newpath)
-{
- int res = -1;
- fhandler_base *fh;
-
- if (!(fh = build_fh_name (oldpath, NULL, PC_SYM_NOFOLLOW, stat_suffixes)))
- goto error;
-
- if (fh->error ())
- {
- debug_printf ("got %d error from build_fh_name", fh->error ());
- set_errno (fh->error ());
- }
- else
- res = fh->link (newpath);
-
- delete fh;
- error:
- syscall_printf ("%d = link (%s, %s)", res, oldpath, newpath);
- return res;
-}
-
-/* chown: POSIX 5.6.5.1 */
-/*
- * chown () is only implemented for Windows NT. Under other operating
- * systems, it is only a stub that always returns zero.
- */
-static int
-chown_worker (const char *name, unsigned fmode, __uid32_t uid, __gid32_t gid)
-{
- int res = -1;
- fhandler_base *fh;
-
- if (!(fh = build_fh_name (name, NULL, fmode, stat_suffixes)))
- goto error;
-
- if (fh->error ())
- {
- debug_printf ("got %d error from build_fh_name", fh->error ());
- set_errno (fh->error ());
- }
- else
- res = fh->fchown (uid, gid);
-
- delete fh;
- error:
- syscall_printf ("%d = %schown (%s,...)",
- res, (fmode & PC_SYM_NOFOLLOW) ? "l" : "", name);
- return res;
-}
-
-extern "C" int
-chown32 (const char * name, __uid32_t uid, __gid32_t gid)
-{
- return chown_worker (name, PC_SYM_FOLLOW, uid, gid);
-}
-
-extern "C" int
-chown (const char * name, __uid16_t uid, __gid16_t gid)
-{
- return chown_worker (name, PC_SYM_FOLLOW,
- uid16touid32 (uid), gid16togid32 (gid));
-}
-
-extern "C" int
-lchown32 (const char * name, __uid32_t uid, __gid32_t gid)
-{
- return chown_worker (name, PC_SYM_NOFOLLOW, uid, gid);
-}
-
-extern "C" int
-lchown (const char * name, __uid16_t uid, __gid16_t gid)
-{
- return chown_worker (name, PC_SYM_NOFOLLOW,
- uid16touid32 (uid), gid16togid32 (gid));
-}
-
-extern "C" int
-fchown32 (int fd, __uid32_t uid, __gid32_t gid)
-{
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- {
- syscall_printf ("-1 = fchown (%d,...)", fd);
- return -1;
- }
-
- int res = cfd->fchown (uid, gid);
-
- syscall_printf ("%d = fchown (%s,...)", res, cfd->get_name ());
- return res;
-}
-
-extern "C" int
-fchown (int fd, __uid16_t uid, __gid16_t gid)
-{
- return fchown32 (fd, uid16touid32 (uid), gid16togid32 (gid));
-}
-
-/* umask: POSIX 5.3.3.1 */
-extern "C" mode_t
-umask (mode_t mask)
-{
- mode_t oldmask;
-
- oldmask = cygheap->umask;
- cygheap->umask = mask & 0777;
- return oldmask;
-}
-
-int
-chmod_device (path_conv& pc, mode_t mode)
-{
- return mknod_worker (pc.get_win32 (), pc.dev.mode & S_IFMT, mode, pc.dev.major, pc.dev.minor);
-}
-
-#define FILTERED_MODE(m) ((m) & (S_ISUID | S_ISGID | S_ISVTX \
- | S_IRWXU | S_IRWXG | S_IRWXO))
-
-/* chmod: POSIX 5.6.4.1 */
-extern "C" int
-chmod (const char *path, mode_t mode)
-{
- int res = -1;
- fhandler_base *fh;
- if (!(fh = build_fh_name (path, NULL, PC_SYM_FOLLOW, stat_suffixes)))
- goto error;
-
- if (fh->error ())
- {
- debug_printf ("got %d error from build_fh_name", fh->error ());
- set_errno (fh->error ());
- }
- else
- res = fh->fchmod (FILTERED_MODE (mode));
-
- delete fh;
- error:
- syscall_printf ("%d = chmod (%s, %p)", res, path, mode);
- return res;
-}
-
-/* fchmod: P96 5.6.4.1 */
-
-extern "C" int
-fchmod (int fd, mode_t mode)
-{
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- {
- syscall_printf ("-1 = fchmod (%d, 0%o)", fd, mode);
- return -1;
- }
-
- return cfd->fchmod (FILTERED_MODE (mode));
-}
-
-static void
-stat64_to_stat32 (struct __stat64 *src, struct __stat32 *dst)
-{
- dst->st_dev = ((src->st_dev >> 8) & 0xff00) | (src->st_dev & 0xff);
- dst->st_ino = ((unsigned) (src->st_ino >> 32)) | (unsigned) src->st_ino;
- dst->st_mode = src->st_mode;
- dst->st_nlink = src->st_nlink;
- dst->st_uid = src->st_uid;
- dst->st_gid = src->st_gid;
- dst->st_rdev = ((src->st_rdev >> 8) & 0xff00) | (src->st_rdev & 0xff);
- dst->st_size = src->st_size;
- dst->st_atim = src->st_atim;
- dst->st_mtim = src->st_mtim;
- dst->st_ctim = src->st_ctim;
- dst->st_blksize = src->st_blksize;
- dst->st_blocks = src->st_blocks;
-}
-
-extern "C" int
-fstat64 (int fd, struct __stat64 *buf)
-{
- int res;
-
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- res = -1;
- else
- {
- memset (buf, 0, sizeof (struct __stat64));
- res = cfd->fstat (buf);
- if (!res)
- {
- if (!buf->st_ino)
- buf->st_ino = cfd->get_ino ();
- if (!buf->st_dev)
- buf->st_dev = cfd->get_device ();
- if (!buf->st_rdev)
- buf->st_rdev = buf->st_dev;
- }
- }
-
- syscall_printf ("%d = fstat (%d, %p)", res, fd, buf);
- return res;
-}
-
-extern "C" int
-_fstat64_r (struct _reent *ptr, int fd, struct __stat64 *buf)
-{
- int ret;
-
- if ((ret = fstat64 (fd, buf)) == -1)
- ptr->_errno = get_errno ();
- return ret;
-}
-
-extern "C" int
-fstat (int fd, struct __stat32 *buf)
-{
- struct __stat64 buf64;
- int ret = fstat64 (fd, &buf64);
- if (!ret)
- stat64_to_stat32 (&buf64, buf);
- return ret;
-}
-
-extern "C" int
-_fstat_r (struct _reent *ptr, int fd, struct __stat32 *buf)
-{
- int ret;
-
- if ((ret = fstat (fd, buf)) == -1)
- ptr->_errno = get_errno ();
- return ret;
-}
-
-/* fsync: P96 6.6.1.1 */
-extern "C" int
-fsync (int fd)
-{
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- {
- syscall_printf ("-1 = fsync (%d)", fd);
- return -1;
- }
- return cfd->fsync ();
-}
-
-EXPORT_ALIAS (fsync, fdatasync)
-
-static void
-sync_worker (const char *vol)
-{
- HANDLE fh = CreateFileA (vol, GENERIC_WRITE, FILE_SHARE_VALID_FLAGS,
- &sec_none_nih, OPEN_EXISTING, 0, NULL);
- if (fh != INVALID_HANDLE_VALUE)
- {
- FlushFileBuffers (fh);
- CloseHandle (fh);
- }
- else
- debug_printf ("Open failed with %E");
-}
-
-/* sync: SUSv3 */
-extern "C" void
-sync ()
-{
- /* Per MSDN, 50 bytes should be enough here. */
- char vol[MAX_PATH];
-
- if (wincap.has_guid_volumes ()) /* Win2k and newer */
- {
- char a_drive[MAX_PATH] = {0};
- char b_drive[MAX_PATH] = {0};
-
- if (is_floppy ("A:"))
- GetVolumeNameForVolumeMountPointA ("A:\\", a_drive, MAX_PATH);
- if (is_floppy ("B:"))
- GetVolumeNameForVolumeMountPointA ("B:\\", b_drive, MAX_PATH);
-
- HANDLE sh = FindFirstVolumeA (vol, MAX_PATH);
- if (sh != INVALID_HANDLE_VALUE)
- {
- do
- {
- debug_printf ("Try volume %s", vol);
-
- /* Check vol for being a floppy on A: or B:. Skip them. */
- if (strcasematch (vol, a_drive) || strcasematch (vol, b_drive))
- {
- debug_printf ("Is floppy, don't sync");
- continue;
- }
-
- /* Eliminate trailing backslash. */
- vol[strlen (vol) - 1] = '\0';
- sync_worker (vol);
- }
- while (FindNextVolumeA (sh, vol, MAX_PATH));
- FindVolumeClose (sh);
- }
- }
- else
- {
- DWORD drives = GetLogicalDrives ();
- DWORD mask = 1;
- /* Skip floppies on A: and B: as in setmntent. */
- if ((drives & 1) && is_floppy ("A:"))
- drives &= ~1;
- if ((drives & 2) && is_floppy ("B:"))
- drives &= ~2;
- strcpy (vol, "\\\\.\\A:");
- do
- {
- /* Geeh. Try to sync only non-floppy drives. */
- if (drives & mask)
- {
- debug_printf ("Try volume %s", vol);
- sync_worker (vol);
- }
- vol[4]++;
- }
- while ((mask <<= 1) <= 1 << 25);
- }
-}
-
-/* Cygwin internal */
-int __stdcall
-stat_worker (path_conv &pc, struct __stat64 *buf)
-{
- int res = -1;
-
- myfault efault;
- if (efault.faulted (EFAULT))
- goto error;
-
- if (pc.error)
- {
- debug_printf ("got %d error from build_fh_name", pc.error);
- set_errno (pc.error);
- }
- else if (pc.exists ())
- {
- fhandler_base *fh;
-
- if (!(fh = build_fh_pc (pc)))
- goto error;
-
- debug_printf ("(%S, %p, %p), file_attributes %d",
- pc.get_nt_native_path (), buf, fh, (DWORD) *fh);
- memset (buf, 0, sizeof (*buf));
- res = fh->fstat (buf);
- if (!res)
- {
- if (!buf->st_ino)
- buf->st_ino = fh->get_ino ();
- if (!buf->st_dev)
- buf->st_dev = fh->get_device ();
- if (!buf->st_rdev)
- buf->st_rdev = buf->st_dev;
- }
- delete fh;
- }
- else
- set_errno (ENOENT);
-
- error:
- MALLOC_CHECK;
- syscall_printf ("%d = (%S, %p)", res, pc.get_nt_native_path (), buf);
- return res;
-}
-
-extern "C" int
-stat64 (const char *name, struct __stat64 *buf)
-{
- syscall_printf ("entering");
- path_conv pc (name, PC_SYM_FOLLOW | PC_POSIX, stat_suffixes);
- return stat_worker (pc, buf);
-}
-
-extern "C" int
-_stat64_r (struct _reent *ptr, const char *name, struct __stat64 *buf)
-{
- int ret;
-
- if ((ret = stat64 (name, buf)) == -1)
- ptr->_errno = get_errno ();
- return ret;
-}
-
-extern "C" int
-stat (const char *name, struct __stat32 *buf)
-{
- struct __stat64 buf64;
- int ret = stat64 (name, &buf64);
- if (!ret)
- stat64_to_stat32 (&buf64, buf);
- return ret;
-}
-
-extern "C" int
-_stat_r (struct _reent *ptr, const char *name, struct __stat32 *buf)
-{
- int ret;
-
- if ((ret = stat (name, buf)) == -1)
- ptr->_errno = get_errno ();
- return ret;
-}
-
-/* lstat: Provided by SVR4 and 4.3+BSD, POSIX? */
-extern "C" int
-lstat64 (const char *name, struct __stat64 *buf)
-{
- syscall_printf ("entering");
- path_conv pc (name, PC_SYM_NOFOLLOW | PC_POSIX, stat_suffixes);
- return stat_worker (pc, buf);
-}
-
-/* lstat: Provided by SVR4 and 4.3+BSD, POSIX? */
-extern "C" int
-lstat (const char *name, struct __stat32 *buf)
-{
- struct __stat64 buf64;
- int ret = lstat64 (name, &buf64);
- if (!ret)
- stat64_to_stat32 (&buf64, buf);
- return ret;
-}
-
-extern "C" int
-access (const char *fn, int flags)
-{
- // flags were incorrectly specified
- int res = -1;
- if (flags & ~(F_OK|R_OK|W_OK|X_OK))
- set_errno (EINVAL);
- else
- {
- fhandler_base *fh = build_fh_name (fn, NULL, PC_SYM_FOLLOW, stat_suffixes);
- if (fh)
- {
- res = fh->fhaccess (flags);
- delete fh;
- }
- }
- debug_printf ("returning %d", res);
- return res;
-}
-
-static void
-rename_append_suffix (path_conv &pc, const char *path, size_t len,
- const char *suffix)
-{
- char buf[len + 5];
-
- if (ascii_strcasematch (path + len - 4, ".lnk")
- || ascii_strcasematch (path + len - 4, ".exe"))
- len -= 4;
- stpcpy (stpncpy (buf, path, len), suffix);
- pc.check (buf, PC_SYM_NOFOLLOW);
-}
-
-static void
-start_transaction (HANDLE &old_trans, HANDLE &trans)
-{
- NTSTATUS status = NtCreateTransaction (&trans,
- SYNCHRONIZE | TRANSACTION_ALL_ACCESS,
- NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
- if (NT_SUCCESS (status))
- {
- old_trans = RtlGetCurrentTransaction ();
- RtlSetCurrentTransaction (trans);
- }
- else
- {
- debug_printf ("NtCreateTransaction failed, %p", status);
- old_trans = trans = NULL;
- }
-}
-
-static NTSTATUS
-stop_transaction (NTSTATUS status, HANDLE old_trans, HANDLE trans)
-{
- RtlSetCurrentTransaction (old_trans);
- if (NT_SUCCESS (status))
- status = NtCommitTransaction (trans, TRUE);
- else
- status = NtRollbackTransaction (trans, TRUE);
- NtClose (trans);
- return status;
-}
-
-extern "C" int
-rename (const char *oldpath, const char *newpath)
-{
- tmp_pathbuf tp;
- int res = -1;
- char *oldbuf, *newbuf;
- path_conv oldpc, newpc, new2pc, *dstpc, *removepc = NULL;
- bool old_dir_requested = false, new_dir_requested = false;
- bool old_explicit_suffix = false, new_explicit_suffix = false;
- size_t olen, nlen;
- bool equal_path;
- NTSTATUS status = 0;
- HANDLE fh = NULL, nfh;
- HANDLE old_trans = NULL, trans = NULL;
- OBJECT_ATTRIBUTES attr;
- IO_STATUS_BLOCK io;
- ULONG size;
- FILE_STANDARD_INFORMATION ofsi;
- PFILE_RENAME_INFORMATION pfri;
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- if (has_dot_last_component (oldpath, true))
- {
- oldpc.check (oldpath, PC_SYM_NOFOLLOW, stat_suffixes);
- set_errno (oldpc.isdir () ? EBUSY : ENOTDIR);
- goto out;
- }
- if (has_dot_last_component (newpath, true))
- {
- newpc.check (newpath, PC_SYM_NOFOLLOW, stat_suffixes);
- set_errno (!newpc.exists () ? ENOENT : newpc.isdir () ? EBUSY : ENOTDIR);
- goto out;
- }
-
- /* A trailing slash requires that the pathname points to an existing
- directory. If it's not, it's a ENOTDIR condition. The same goes
- for newpath a bit further down this function. */
- olen = strlen (oldpath);
- if (isdirsep (oldpath[olen - 1]))
- {
- stpcpy (oldbuf = tp.c_get (), oldpath);
- while (olen > 0 && isdirsep (oldbuf[olen - 1]))
- oldbuf[--olen] = '\0';
- oldpath = oldbuf;
- old_dir_requested = true;
- }
- oldpc.check (oldpath, PC_SYM_NOFOLLOW, stat_suffixes);
- if (oldpc.error)
- {
- set_errno (oldpc.error);
- goto out;
- }
- if (!oldpc.exists ())
- {
- set_errno (ENOENT);
- goto out;
- }
- if (oldpc.isspecial ()) /* No renames from virtual FS */
- {
- set_errno (EROFS);
- goto out;
- }
- if (old_dir_requested && !oldpc.isdir ())
- {
- set_errno (ENOTDIR);
- goto out;
- }
- if (oldpc.known_suffix
- && (ascii_strcasematch (oldpath + olen - 4, ".lnk")
- || ascii_strcasematch (oldpath + olen - 4, ".exe")))
- old_explicit_suffix = true;
-
- nlen = strlen (newpath);
- if (isdirsep (newpath[nlen - 1]))
- {
- stpcpy (newbuf = tp.c_get (), newpath);
- while (nlen > 0 && isdirsep (newbuf[nlen - 1]))
- newbuf[--nlen] = '\0';
- newpath = newbuf;
- new_dir_requested = true;
- }
- newpc.check (newpath, PC_SYM_NOFOLLOW, stat_suffixes);
- if (newpc.error)
- {
- set_errno (newpc.error);
- goto out;
- }
- if (newpc.isspecial ()) /* No renames to virtual FSes */
- {
- set_errno (EROFS);
- goto out;
- }
- if (new_dir_requested && !newpc.isdir ())
- {
- set_errno (ENOTDIR);
- goto out;
- }
- if (newpc.known_suffix
- && (ascii_strcasematch (newpath + nlen - 4, ".lnk")
- || ascii_strcasematch (newpath + nlen - 4, ".exe")))
- new_explicit_suffix = true;
-
- /* This test is necessary in almost every case, so just do it once here. */
- equal_path = RtlEqualUnicodeString (oldpc.get_nt_native_path (),
- newpc.get_nt_native_path (),
- oldpc.objcaseinsensitive ());
-
- /* First check if oldpath and newpath only differ by case. If so, it's
- just a request to change the case of the filename. By simply setting
- the file attributes to INVALID_FILE_ATTRIBUTES (which translates to
- "file doesn't exist"), all later tests are skipped. */
- if (oldpc.objcaseinsensitive () && newpc.exists () && equal_path
- && old_explicit_suffix == new_explicit_suffix)
- {
- if (RtlEqualUnicodeString (oldpc.get_nt_native_path (),
- newpc.get_nt_native_path (),
- FALSE))
- {
- res = 0;
- goto out;
- }
- newpc.file_attributes (INVALID_FILE_ATTRIBUTES);
- }
- else if (oldpc.isdir ())
- {
- if (newpc.exists () && !newpc.isdir ())
- {
- set_errno (ENOTDIR);
- goto out;
- }
- /* Check for newpath being a subdir of oldpath. */
- if (RtlPrefixUnicodeString (oldpc.get_nt_native_path (),
- newpc.get_nt_native_path (),
- TRUE)
- && newpc.get_nt_native_path ()->Length >
- oldpc.get_nt_native_path ()->Length
- && *(PWCHAR) ((PBYTE) newpc.get_nt_native_path ()->Buffer
- + oldpc.get_nt_native_path ()->Length) == L'\\')
- {
- set_errno (EINVAL);
- goto out;
- }
- }
- else if (!newpc.exists ())
- {
- if (equal_path && old_explicit_suffix != new_explicit_suffix)
- {
- newpc.check (newpath, PC_SYM_NOFOLLOW);
- if (RtlEqualUnicodeString (oldpc.get_nt_native_path (),
- newpc.get_nt_native_path (),
- oldpc.objcaseinsensitive ()))
- {
- res = 0;
- goto out;
- }
- }
- else if (oldpc.is_lnk_symlink ()
- && !RtlEqualUnicodePathSuffix (newpc.get_nt_native_path (),
- L".lnk", TRUE))
- rename_append_suffix (newpc, newpath, nlen, ".lnk");
- else if (oldpc.is_binary () && !old_explicit_suffix
- && !RtlEqualUnicodePathSuffix (newpc.get_nt_native_path (),
- L".exe", TRUE))
- /* To rename an executable foo.exe to bar-without-exe-suffix, the
- .exe suffix must be given explicitly in oldpath. */
- rename_append_suffix (newpc, newpath, nlen, ".exe");
- }
- else if (newpc.isdir ())
- {
- set_errno (EISDIR);
- goto out;
- }
- else
- {
- if (equal_path && old_explicit_suffix != new_explicit_suffix)
- {
- newpc.check (newpath, PC_SYM_NOFOLLOW);
- if (RtlEqualUnicodeString (oldpc.get_nt_native_path (),
- newpc.get_nt_native_path (),
- oldpc.objcaseinsensitive ()))
- {
- res = 0;
- goto out;
- }
- }
- else if (oldpc.is_lnk_symlink ())
- {
- if (!newpc.is_lnk_symlink ()
- && !RtlEqualUnicodePathSuffix (newpc.get_nt_native_path (),
- L".lnk", TRUE))
- {
- rename_append_suffix (new2pc, newpath, nlen, ".lnk");
- removepc = &newpc;
- }
- }
- else if (oldpc.is_binary ())
- {
- if (!RtlEqualUnicodePathSuffix (newpc.get_nt_native_path (),
- L".exe", TRUE))
- {
- rename_append_suffix (new2pc, newpath, nlen, ".exe");
- removepc = &newpc;
- }
- }
- else
- {
- if ((RtlEqualUnicodePathSuffix (newpc.get_nt_native_path (),
- L".lnk", TRUE)
- || RtlEqualUnicodePathSuffix (newpc.get_nt_native_path (),
- L".exe", TRUE))
- && !new_explicit_suffix)
- {
- new2pc.check (newpath, PC_SYM_NOFOLLOW, stat_suffixes);
- newpc.get_nt_native_path ()->Length -= 4 * sizeof (WCHAR);
- if (new2pc.is_binary () || new2pc.is_lnk_symlink ())
- removepc = &new2pc;
- }
- }
- }
- dstpc = (removepc == &newpc) ? &new2pc : &newpc;
-
- /* Opening the file must be part of the transaction. It's not sufficient
- to call only NtSetInformationFile under the transaction. Therefore we
- have to start the transaction here, if necessary. */
- if (wincap.has_transactions ()
- && (dstpc->fs_flags () & FILE_SUPPORTS_TRANSACTIONS)
- && (dstpc->isdir ()
- || (!removepc && dstpc->has_attribute (FILE_ATTRIBUTE_READONLY))))
- start_transaction (old_trans, trans);
-
- /* DELETE is required to rename a file. Samba (only some versions?) doesn't
- like the FILE_SHARE_DELETE mode if the file has the R/O attribute set
- and returns STATUS_ACCESS_DENIED in that case. */
- status = NtOpenFile (&fh, DELETE, oldpc.get_object_attr (attr, sec_none_nih),
- &io,
- oldpc.fs_is_samba () ? FILE_SHARE_READ | FILE_SHARE_WRITE
- : FILE_SHARE_VALID_FLAGS,
- FILE_OPEN_FOR_BACKUP_INTENT
- | (oldpc.is_rep_symlink () ? FILE_OPEN_REPARSE_POINT : 0));
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- goto out;
- }
-
- /* Renaming a dir to another, existing dir fails always, even if
- ReplaceIfExists is set to TRUE and the existing dir is empty. So
- we have to remove the destination dir first. This also covers the
- case that the destination directory is not empty. In that case,
- unlink_nt returns with STATUS_DIRECTORY_NOT_EMPTY. */
- if (dstpc->isdir ())
- {
- status = unlink_nt (*dstpc);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- goto out;
- }
- }
- /* You can't copy a file if the destination exists and has the R/O
- attribute set. Remove the R/O attribute first. But first check
- if a removepc exists. If so, dstpc points to a non-existing file
- due to a mangled suffix. */
- else if (!removepc && dstpc->has_attribute (FILE_ATTRIBUTE_READONLY))
- {
- status = NtOpenFile (&nfh, FILE_WRITE_ATTRIBUTES,
- dstpc->get_object_attr (attr, sec_none_nih),
- &io, FILE_SHARE_VALID_FLAGS,
- FILE_OPEN_FOR_BACKUP_INTENT
- | (dstpc->is_rep_symlink ()
- ? FILE_OPEN_REPARSE_POINT : 0));
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- goto out;
- }
- status = NtSetAttributesFile (nfh, dstpc->file_attributes ()
- & ~FILE_ATTRIBUTE_READONLY);
- NtClose (nfh);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- goto out;
- }
- }
-
- /* SUSv3: If the old argument and the new argument resolve to the same
- existing file, rename() shall return successfully and perform no
- other action.
- The test tries to be as quick as possible. First it tests for identical
- volume serial numbers because that information is available anyway.
- Then it tests if oldpath has more than 1 hardlink, then it opens newpath
- and tests for identical file ids. If so, oldpath and newpath refer to
- the same file. */
- if ((removepc || dstpc->exists ())
- && !oldpc.isdir ()
- && dstpc->fs_serial_number () == oldpc.fs_serial_number ()
- && NT_SUCCESS (NtQueryInformationFile (fh, &io, &ofsi, sizeof ofsi,
- FileStandardInformation))
- && ofsi.NumberOfLinks > 1
- && NT_SUCCESS (NtOpenFile (&nfh, READ_CONTROL,
- (removepc ?: dstpc)->get_object_attr (attr, sec_none_nih),
- &io, FILE_SHARE_VALID_FLAGS,
- FILE_OPEN_FOR_BACKUP_INTENT
- | ((removepc ?: dstpc)->is_rep_symlink ()
- ? FILE_OPEN_REPARSE_POINT : 0))))
- {
- FILE_INTERNAL_INFORMATION ofii, nfii;
-
- if (NT_SUCCESS (NtQueryInformationFile (fh, &io, &ofii, sizeof ofii,
- FileInternalInformation))
- && NT_SUCCESS (NtQueryInformationFile (nfh, &io, &nfii, sizeof nfii,
- FileInternalInformation))
- && ofii.FileId.QuadPart == nfii.FileId.QuadPart)
- {
- debug_printf ("%s and %s are the same file", oldpath, newpath);
- NtClose (nfh);
- res = 0;
- goto out;
- }
- NtClose (nfh);
- }
- size = sizeof (FILE_RENAME_INFORMATION)
- + dstpc->get_nt_native_path ()->Length;
- if (size > NT_MAX_PATH * sizeof (WCHAR)) /* Hopefully very seldom. */
- pfri = (PFILE_RENAME_INFORMATION) alloca (size);
- else
- pfri = (PFILE_RENAME_INFORMATION) tp.w_get ();
- pfri->ReplaceIfExists = TRUE;
- pfri->RootDirectory = NULL;
- pfri->FileNameLength = dstpc->get_nt_native_path ()->Length;
- memcpy (&pfri->FileName, dstpc->get_nt_native_path ()->Buffer,
- pfri->FileNameLength);
- status = NtSetInformationFile (fh, &io, pfri, size, FileRenameInformation);
- /* This happens if the access rights don't allow deleting the destination.
- Even if the handle to the original file is opened with BACKUP
- and/or RECOVERY, these flags don't apply to the destination of the
- rename operation. So, a privileged user can't rename a file to an
- existing file, if the permissions of the existing file aren't right.
- Like directories, we have to handle this separately by removing the
- destination before renaming. */
- if (status == STATUS_ACCESS_DENIED && dstpc->exists () && !dstpc->isdir ())
- {
- if (wincap.has_transactions ()
- && (dstpc->fs_flags () & FILE_SUPPORTS_TRANSACTIONS)
- && !trans)
- {
- start_transaction (old_trans, trans);
- /* As mentioned earlier, opening the file must be part of the
- transaction. Therefore we have to reopen the file here if the
- transaction hasn't been started already. Unfortunately we can't
- use the NT "reopen file from existing handle" feature. In that
- case NtOpenFile returns STATUS_TRANSACTIONAL_CONFLICT. We *have*
- to close the handle to the file first, *then* we can re-open it.
- Fortunately nothing has happened yet, so the atomicity of the
- rename functionality is not spoiled. */
- NtClose (fh);
- status = NtOpenFile (&fh, DELETE,
- oldpc.get_object_attr (attr, sec_none_nih),
- &io, FILE_SHARE_VALID_FLAGS,
- FILE_OPEN_FOR_BACKUP_INTENT
- | (oldpc.is_rep_symlink ()
- ? FILE_OPEN_REPARSE_POINT : 0));
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- goto out;
- }
- }
- if (NT_SUCCESS (status = unlink_nt (*dstpc)))
- status = NtSetInformationFile (fh, &io, pfri, size,
- FileRenameInformation);
- }
- if (NT_SUCCESS (status))
- {
- if (removepc)
- unlink_nt (*removepc);
- res = 0;
- }
- else
- __seterrno_from_nt_status (status);
-
-out:
- if (fh)
- NtClose (fh);
- if (wincap.has_transactions () && trans)
- stop_transaction (status, old_trans, trans);
- syscall_printf ("%d = rename (%s, %s)", res, oldpath, newpath);
- return res;
-}
-
-extern "C" int
-system (const char *cmdstring)
-{
- pthread_testcancel ();
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- int res;
- const char* command[4];
-
- if (cmdstring == NULL)
- return 1;
-
- command[0] = "sh";
- command[1] = "-c";
- command[2] = cmdstring;
- command[3] = (const char *) NULL;
-
- if ((res = spawnvp (_P_SYSTEM, "/bin/sh", command)) == -1)
- {
- // when exec fails, return value should be as if shell
- // executed exit (127)
- res = 127;
- }
-
- return res;
-}
-
-extern "C" int
-setdtablesize (int size)
-{
- if (size <= (int)cygheap->fdtab.size || cygheap->fdtab.extend (size - cygheap->fdtab.size))
- return 0;
-
- return -1;
-}
-
-extern "C" int
-getdtablesize ()
-{
- return cygheap->fdtab.size > OPEN_MAX ? cygheap->fdtab.size : OPEN_MAX;
-}
-
-extern "C" size_t
-getpagesize ()
-{
- if (!system_info.dwAllocationGranularity)
- GetSystemInfo (&system_info);
- return (size_t) system_info.dwAllocationGranularity;
-}
-
-size_t
-getsystempagesize ()
-{
- if (!system_info.dwPageSize)
- GetSystemInfo (&system_info);
- return (size_t) system_info.dwPageSize;
-}
-
-/* FIXME: not all values are correct... */
-extern "C" long int
-fpathconf (int fd, int v)
-{
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- return -1;
- return cfd->fpathconf (v);
-}
-
-extern "C" long int
-pathconf (const char *file, int v)
-{
- fhandler_base *fh;
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (!*file)
- {
- set_errno (ENOENT);
- return -1;
- }
- if (!(fh = build_fh_name (file, NULL, PC_SYM_FOLLOW, stat_suffixes)))
- return -1;
- if (!fh->exists ())
- {
- set_errno (ENOENT);
- return -1;
- }
- return fh->fpathconf (v);
-}
-
-extern "C" int
-ttyname_r (int fd, char *buf, size_t buflen)
-{
- int ret = 0;
- myfault efault;
- if (efault.faulted ())
- ret = EFAULT;
- else
- {
- cygheap_fdget cfd (fd, true);
- if (cfd < 0)
- ret = EBADF;
- else if (!cfd->is_tty ())
- ret = ENOTTY;
- else if (buflen < strlen (cfd->ttyname ()) + 1)
- ret = ERANGE;
- else
- strcpy (buf, cfd->ttyname ());
- }
- debug_printf ("returning %d tty: %s", ret, ret ? "NULL" : buf);
- return ret;
-}
-
-extern "C" char *
-ttyname (int fd)
-{
- static char name[TTY_NAME_MAX];
- int ret = ttyname_r (fd, name, TTY_NAME_MAX);
- if (ret)
- {
- set_errno (ret);
- return NULL;
- }
- return name;
-}
-
-extern "C" char *
-ctermid (char *str)
-{
- static NO_COPY char buf[16];
- if (str == NULL)
- str = buf;
- if (!real_tty_attached (myself))
- strcpy (str, "/dev/conin");
- else
- __small_sprintf (str, "/dev/tty%d", myself->ctty);
- return str;
-}
-
-/* Tells stdio if it should do the cr/lf conversion for this file */
-extern "C" int
-_cygwin_istext_for_stdio (int fd)
-{
- if (CYGWIN_VERSION_OLD_STDIO_CRLF_HANDLING)
- {
- syscall_printf ("fd %d: old API", fd);
- return 0; /* we do it for old apps, due to getc/putc macros */
- }
-
- cygheap_fdget cfd (fd, false, false);
- if (cfd < 0)
- {
- syscall_printf ("fd %d: not open", fd);
- return 0;
- }
-
-#if 0
- if (cfd->get_device () != FH_FS)
- {
- syscall_printf ("fd not disk file. Defaulting to binary.");
- return 0;
- }
-#endif
-
- if (cfd->wbinary () || cfd->rbinary ())
- {
- syscall_printf ("fd %d: opened as binary", fd);
- return 0;
- }
-
- syscall_printf ("fd %d: defaulting to text", fd);
- return 1;
-}
-
-/* internal newlib function */
-extern "C" int _fwalk (struct _reent *ptr, int (*function) (FILE *));
-
-static int
-setmode_helper (FILE *f)
-{
- if (fileno (f) != _my_tls.locals.setmode_file)
- {
- syscall_printf ("improbable, but %d != %d", fileno (f), _my_tls.locals.setmode_file);
- return 0;
- }
- syscall_printf ("file was %s now %s", f->_flags & __SCLE ? "text" : "binary",
- _my_tls.locals.setmode_mode & O_TEXT ? "text" : "binary");
- if (_my_tls.locals.setmode_mode & O_TEXT)
- f->_flags |= __SCLE;
- else
- f->_flags &= ~__SCLE;
- return 0;
-}
-
-extern "C" int
-getmode (int fd)
-{
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- return -1;
-
- return cfd->get_flags () & (O_BINARY | O_TEXT);
-}
-
-/* Set a file descriptor into text or binary mode, returning the
- previous mode. */
-
-extern "C" int
-setmode (int fd, int mode)
-{
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- return -1;
- if (mode != O_BINARY && mode != O_TEXT && mode != 0)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- /* Note that we have no way to indicate the case that writes are
- binary but not reads, or vice-versa. These cases can arise when
- using the tty or console interface. People using those
- interfaces should not use setmode. */
-
- int res;
- if (cfd->wbinary () && cfd->rbinary ())
- res = O_BINARY;
- else if (cfd->wbinset () && cfd->rbinset ())
- res = O_TEXT; /* Specifically set O_TEXT */
- else
- res = 0;
-
- if (!mode)
- cfd->reset_to_open_binmode ();
- else
- cfd->set_flags ((cfd->get_flags () & ~(O_TEXT | O_BINARY)) | mode);
-
- syscall_printf ("(%d<%S>, %p) returning %s", fd,
- cfd->pc.get_nt_native_path (), mode,
- res & O_TEXT ? "text" : "binary");
- return res;
-}
-
-extern "C" int
-cygwin_setmode (int fd, int mode)
-{
- int res = setmode (fd, mode);
- if (res != -1)
- {
- _my_tls.locals.setmode_file = fd;
- if (_cygwin_istext_for_stdio (fd))
- _my_tls.locals.setmode_mode = O_TEXT;
- else
- _my_tls.locals.setmode_mode = O_BINARY;
- _fwalk (_GLOBAL_REENT, setmode_helper);
- }
- return res;
-}
-
-extern "C" int
-posix_fadvise (int fd, _off64_t offset, _off64_t len, int advice)
-{
- int res = -1;
- cygheap_fdget cfd (fd);
- if (cfd >= 0)
- res = cfd->fadvise (offset, len, advice);
- else
- set_errno (EBADF);
- syscall_printf ("%d = posix_fadvice (%d, %D, %D, %d)",
- res, fd, offset, len, advice);
- return res;
-}
-
-extern "C" int
-posix_fallocate (int fd, _off64_t offset, _off64_t len)
-{
- int res = -1;
- if (offset < 0 || len == 0)
- set_errno (EINVAL);
- else
- {
- cygheap_fdget cfd (fd);
- if (cfd >= 0)
- res = cfd->ftruncate (offset + len, false);
- else
- set_errno (EBADF);
- }
- syscall_printf ("%d = posix_fallocate (%d, %D, %D)", res, fd, offset, len);
- return res;
-}
-
-extern "C" int
-ftruncate64 (int fd, _off64_t length)
-{
- int res = -1;
- cygheap_fdget cfd (fd);
- if (cfd >= 0)
- res = cfd->ftruncate (length, true);
- else
- set_errno (EBADF);
- syscall_printf ("%d = ftruncate (%d, %D)", res, fd, length);
- return res;
-}
-
-/* ftruncate: P96 5.6.7.1 */
-extern "C" int
-ftruncate (int fd, _off_t length)
-{
- return ftruncate64 (fd, (_off64_t)length);
-}
-
-/* truncate: Provided by SVR4 and 4.3+BSD. Not part of POSIX.1 or XPG3 */
-extern "C" int
-truncate64 (const char *pathname, _off64_t length)
-{
- int fd;
- int res = -1;
-
- fd = open (pathname, O_RDWR);
-
- if (fd != -1)
- {
- res = ftruncate64 (fd, length);
- close (fd);
- }
- syscall_printf ("%d = truncate (%s, %D)", res, pathname, length);
-
- return res;
-}
-
-/* truncate: Provided by SVR4 and 4.3+BSD. Not part of POSIX.1 or XPG3 */
-extern "C" int
-truncate (const char *pathname, _off_t length)
-{
- return truncate64 (pathname, (_off64_t)length);
-}
-
-extern "C" long
-get_osfhandle (int fd)
-{
- long res;
-
- cygheap_fdget cfd (fd);
- if (cfd >= 0)
- res = (long) cfd->get_handle ();
- else
- res = -1;
-
- syscall_printf ("%d = get_osfhandle (%d)", res, fd);
- return res;
-}
-
-extern "C" int
-fstatvfs (int fd, struct statvfs *sfs)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- return -1;
- return cfd->fstatvfs (sfs);
-}
-
-extern "C" int
-statvfs (const char *name, struct statvfs *sfs)
-{
- int res = -1;
- fhandler_base *fh = NULL;
-
- myfault efault;
- if (efault.faulted (EFAULT))
- goto error;
-
- if (!(fh = build_fh_name (name, NULL, PC_SYM_FOLLOW, stat_suffixes)))
- goto error;
-
- if (fh->error ())
- {
- debug_printf ("got %d error from build_fh_name", fh->error ());
- set_errno (fh->error ());
- }
- else if (fh->exists ())
- {
- debug_printf ("(%s, %p), file_attributes %d", name, sfs, (DWORD) *fh);
- res = fh->fstatvfs (sfs);
- }
- else
- set_errno (ENOENT);
-
- delete fh;
- error:
- MALLOC_CHECK;
- syscall_printf ("%d = (%s, %p)", res, name, sfs);
- return res;
-}
-
-extern "C" int
-fstatfs (int fd, struct statfs *sfs)
-{
- struct statvfs vfs;
- int ret = fstatvfs (fd, &vfs);
- if (!ret)
- {
- sfs->f_type = vfs.f_flag;
- sfs->f_bsize = vfs.f_bsize;
- sfs->f_blocks = vfs.f_blocks;
- sfs->f_bavail = vfs.f_bavail;
- sfs->f_bfree = vfs.f_bfree;
- sfs->f_files = -1;
- sfs->f_ffree = -1;
- sfs->f_fsid = vfs.f_fsid;
- sfs->f_namelen = vfs.f_namemax;
- }
- return ret;
-}
-
-extern "C" int
-statfs (const char *fname, struct statfs *sfs)
-{
- struct statvfs vfs;
- int ret = statvfs (fname, &vfs);
- if (!ret)
- {
- sfs->f_type = vfs.f_flag;
- sfs->f_bsize = vfs.f_bsize;
- sfs->f_blocks = vfs.f_blocks;
- sfs->f_bavail = vfs.f_bavail;
- sfs->f_bfree = vfs.f_bfree;
- sfs->f_files = -1;
- sfs->f_ffree = -1;
- sfs->f_fsid = vfs.f_fsid;
- sfs->f_namelen = vfs.f_namemax;
- }
- return ret;
-}
-
-/* setpgid: POSIX 4.3.3.1 */
-extern "C" int
-setpgid (pid_t pid, pid_t pgid)
-{
- int res = -1;
- if (pid == 0)
- pid = getpid ();
- if (pgid == 0)
- pgid = pid;
-
- if (pgid < 0)
- set_errno (EINVAL);
- else
- {
- pinfo p (pid, PID_MAP_RW);
- if (!p)
- set_errno (ESRCH);
- else if (p->pgid == pgid)
- res = 0;
- /* A process may only change the process group of itself and its children */
- else if (p != myself && p->ppid != myself->pid)
- set_errno (EPERM);
- else
- {
- p->pgid = pgid;
- if (p->pid != p->pgid)
- p->set_has_pgid_children (0);
- res = 0;
- }
- }
-
- syscall_printf ("pid %d, pgid %d, res %d", pid, pgid, res);
- return res;
-}
-
-extern "C" pid_t
-getpgid (pid_t pid)
-{
- if (pid == 0)
- pid = getpid ();
-
- pinfo p (pid);
- if (p == 0)
- {
- set_errno (ESRCH);
- return -1;
- }
- return p->pgid;
-}
-
-extern "C" int
-setpgrp (void)
-{
- return setpgid (0, 0);
-}
-
-extern "C" pid_t
-getpgrp (void)
-{
- return getpgid (0);
-}
-
-extern "C" char *
-ptsname (int fd)
-{
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- return 0;
- return (char *) (cfd->ptsname ());
-}
-
-static int __stdcall
-mknod_worker (const char *path, mode_t type, mode_t mode, _major_t major,
- _minor_t minor)
-{
- char buf[sizeof (":\\00000000:00000000:00000000") + PATH_MAX];
- sprintf (buf, ":\\%x:%x:%x", major, minor,
- type | (mode & (S_IRWXU | S_IRWXG | S_IRWXO)));
- return symlink_worker (buf, path, true, true);
-}
-
-extern "C" int
-mknod32 (const char *path, mode_t mode, __dev32_t dev)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (!*path)
- {
- set_errno (ENOENT);
- return -1;
- }
-
- if (strlen (path) >= PATH_MAX)
- return -1;
-
- path_conv w32path (path, PC_SYM_NOFOLLOW);
- if (w32path.exists ())
- {
- set_errno (EEXIST);
- return -1;
- }
-
- mode_t type = mode & S_IFMT;
- _major_t major = _major (dev);
- _minor_t minor = _minor (dev);
- switch (type)
- {
- case S_IFCHR:
- case S_IFBLK:
- break;
-
- case S_IFIFO:
- major = _major (FH_FIFO);
- minor = _minor (FH_FIFO);
- break;
-
- case 0:
- case S_IFREG:
- {
- int fd = open (path, O_CREAT, mode);
- if (fd < 0)
- return -1;
- close (fd);
- return 0;
- }
-
- default:
- set_errno (EINVAL);
- return -1;
- }
-
- return mknod_worker (w32path.get_win32 (), type, mode, major, minor);
-}
-
-extern "C" int
-mknod (const char *_path, mode_t mode, __dev16_t dev)
-{
- return mknod32 (_path, mode, (__dev32_t) dev);
-}
-
-extern "C" int
-mkfifo (const char *path, mode_t mode)
-{
- return mknod32 (path, (mode & ~S_IFMT) | S_IFIFO, 0);
-}
-
-/* seteuid: standards? */
-extern "C" int
-seteuid32 (__uid32_t uid)
-{
- debug_printf ("uid: %u myself->uid: %u myself->gid: %u",
- uid, myself->uid, myself->gid);
-
- if (uid == myself->uid && !cygheap->user.groups.ischanged)
- {
- debug_printf ("Nothing happens");
- return 0;
- }
-
- cygsid usersid;
- user_groups &groups = cygheap->user.groups;
- HANDLE new_token = INVALID_HANDLE_VALUE;
- struct passwd * pw_new;
- bool token_is_internal, issamesid = false;
-
- pw_new = internal_getpwuid (uid);
- if (!usersid.getfrompw (pw_new))
- {
- set_errno (EINVAL);
- return -1;
- }
-
- cygheap->user.deimpersonate ();
-
- /* Verify if the process token is suitable. */
- /* TODO, CV 2008-11-25: The check against saved_sid is a kludge and a
- shortcut. We must check if it's really feasible in the long run.
- The reason to add this shortcut is this: sshd switches back to the
- privileged user running sshd at least twice in the process of
- authentication. It calls seteuid first, then setegid. Due to this
- order, the setgroups group list is still active when calling seteuid
- and verify_token treats the original token of the privileged user as
- insufficient. This in turn results in creating a new user token for
- the privileged user instead of using the orignal token. This can have
- unfortunate side effects. The created token has different group
- memberships, different user rights, and misses possible network
- credentials.
- Therefore we try this shortcut now. When switching back to the
- privileged user, we probably always want a correct (aka original)
- user token for this privileged user, not only in sshd. */
- if ((uid == cygheap->user.saved_uid && usersid == cygheap->user.saved_sid ())
- || verify_token (hProcToken, usersid, groups))
- new_token = hProcToken;
- /* Verify if the external token is suitable */
- else if (cygheap->user.external_token != NO_IMPERSONATION
- && verify_token (cygheap->user.external_token, usersid, groups))
- new_token = cygheap->user.external_token;
- /* Verify if the current token (internal or former external) is suitable */
- else if (cygheap->user.curr_primary_token != NO_IMPERSONATION
- && cygheap->user.curr_primary_token != cygheap->user.external_token
- && verify_token (cygheap->user.curr_primary_token, usersid, groups,
- &token_is_internal))
- new_token = cygheap->user.curr_primary_token;
- /* Verify if the internal token is suitable */
- else if (cygheap->user.internal_token != NO_IMPERSONATION
- && cygheap->user.internal_token != cygheap->user.curr_primary_token
- && verify_token (cygheap->user.internal_token, usersid, groups,
- &token_is_internal))
- new_token = cygheap->user.internal_token;
-
- debug_printf ("Found token %d", new_token);
-
- /* If no impersonation token is available, try to authenticate using
- LSA private data stored password, LSA authentication using our own
- LSA module, or, as last chance, NtCreateToken. */
- if (new_token == INVALID_HANDLE_VALUE)
- {
- new_token = lsaprivkeyauth (pw_new);
- if (new_token)
- {
- /* We have to verify this token since settings in /etc/group
- might render it unusable im terms of group membership. */
- if (!verify_token (new_token, usersid, groups))
- {
- CloseHandle (new_token);
- new_token = NULL;
- }
- }
- if (!new_token)
- {
- debug_printf ("lsaprivkeyauth failed, try lsaauth.");
- if (!(new_token = lsaauth (usersid, groups, pw_new)))
- {
- debug_printf ("lsaauth failed, try create_token.");
- new_token = create_token (usersid, groups, pw_new);
- if (new_token == INVALID_HANDLE_VALUE)
- {
- debug_printf ("create_token failed, bail out of here");
- cygheap->user.reimpersonate ();
- return -1;
- }
- }
- }
-
- /* Keep at most one internal token */
- if (cygheap->user.internal_token != NO_IMPERSONATION)
- CloseHandle (cygheap->user.internal_token);
- cygheap->user.internal_token = new_token;
- }
-
- if (new_token != hProcToken)
- {
- /* Avoid having HKCU use default user */
- WCHAR name[128];
- load_registry_hive (usersid.string (name));
-
- /* Try setting owner to same value as user. */
- if (!SetTokenInformation (new_token, TokenOwner,
- &usersid, sizeof usersid))
- debug_printf ("SetTokenInformation(user.token, TokenOwner), %E");
- /* Try setting primary group in token to current group */
- if (!SetTokenInformation (new_token, TokenPrimaryGroup,
- &groups.pgsid, sizeof (cygsid)))
- debug_printf ("SetTokenInformation(user.token, TokenPrimaryGroup), %E");
- /* Try setting default DACL */
- PACL dacl_buf = (PACL) alloca (MAX_DACL_LEN (5));
- if (sec_acl (dacl_buf, true, true, usersid))
- {
- TOKEN_DEFAULT_DACL tdacl = { dacl_buf };
- if (!SetTokenInformation (new_token, TokenDefaultDacl,
- &tdacl, sizeof (tdacl)))
- debug_printf ("SetTokenInformation (TokenDefaultDacl), %E");
- }
- }
-
- issamesid = (usersid == cygheap->user.sid ());
- cygheap->user.set_sid (usersid);
- cygheap->user.curr_primary_token = new_token == hProcToken ? NO_IMPERSONATION
- : new_token;
- if (cygheap->user.curr_imp_token != NO_IMPERSONATION)
- {
- CloseHandle (cygheap->user.curr_imp_token);
- cygheap->user.curr_imp_token = NO_IMPERSONATION;
- }
- if (cygheap->user.curr_primary_token != NO_IMPERSONATION)
- {
- if (!DuplicateTokenEx (cygheap->user.curr_primary_token, MAXIMUM_ALLOWED,
- &sec_none, SecurityImpersonation,
- TokenImpersonation, &cygheap->user.curr_imp_token))
- {
- __seterrno ();
- cygheap->user.curr_primary_token = NO_IMPERSONATION;
- return -1;
- }
- set_cygwin_privileges (cygheap->user.curr_imp_token);
- }
- if (!cygheap->user.reimpersonate ())
- {
- __seterrno ();
- return -1;
- }
-
- cygheap->user.set_name (pw_new->pw_name);
- myself->uid = uid;
- groups.ischanged = FALSE;
- if (!issamesid)
- /* Recreate and fill out the user shared region for a new user. */
- user_shared_create (true);
- return 0;
-}
-
-extern "C" int
-seteuid (__uid16_t uid)
-{
- return seteuid32 (uid16touid32 (uid));
-}
-
-/* setuid: POSIX 4.2.2.1 */
-extern "C" int
-setuid32 (__uid32_t uid)
-{
- int ret = seteuid32 (uid);
- if (!ret)
- cygheap->user.real_uid = myself->uid;
- debug_printf ("real: %d, effective: %d", cygheap->user.real_uid, myself->uid);
- return ret;
-}
-
-extern "C" int
-setuid (__uid16_t uid)
-{
- return setuid32 (uid16touid32 (uid));
-}
-
-extern "C" int
-setreuid32 (__uid32_t ruid, __uid32_t euid)
-{
- int ret = 0;
- bool tried = false;
- __uid32_t old_euid = myself->uid;
-
- if (ruid != ILLEGAL_UID && cygheap->user.real_uid != ruid && euid != ruid)
- tried = !(ret = seteuid32 (ruid));
- if (!ret && euid != ILLEGAL_UID)
- ret = seteuid32 (euid);
- if (tried && (ret || euid == ILLEGAL_UID) && seteuid32 (old_euid))
- system_printf ("Cannot restore original euid %u", old_euid);
- if (!ret && ruid != ILLEGAL_UID)
- cygheap->user.real_uid = ruid;
- debug_printf ("real: %u, effective: %u", cygheap->user.real_uid, myself->uid);
- return ret;
-}
-
-extern "C" int
-setreuid (__uid16_t ruid, __uid16_t euid)
-{
- return setreuid32 (uid16touid32 (ruid), uid16touid32 (euid));
-}
-
-/* setegid: from System V. */
-extern "C" int
-setegid32 (__gid32_t gid)
-{
- debug_printf ("new egid: %u current: %u", gid, myself->gid);
-
- if (gid == myself->gid)
- {
- myself->gid = gid;
- return 0;
- }
-
- user_groups * groups = &cygheap->user.groups;
- cygsid gsid;
- struct __group32 * gr = internal_getgrgid (gid);
-
- if (!gsid.getfromgr (gr))
- {
- set_errno (EINVAL);
- return -1;
- }
- myself->gid = gid;
-
- groups->update_pgrp (gsid);
- if (cygheap->user.issetuid ())
- {
- /* If impersonated, update impersonation token... */
- if (!SetTokenInformation (cygheap->user.primary_token (),
- TokenPrimaryGroup, &gsid, sizeof gsid))
- debug_printf ("SetTokenInformation(primary_token, "
- "TokenPrimaryGroup), %E");
- if (!SetTokenInformation (cygheap->user.imp_token (), TokenPrimaryGroup,
- &gsid, sizeof gsid))
- debug_printf ("SetTokenInformation(token, TokenPrimaryGroup), %E");
- }
- cygheap->user.deimpersonate ();
- if (!SetTokenInformation (hProcToken, TokenPrimaryGroup, &gsid, sizeof gsid))
- debug_printf ("SetTokenInformation(hProcToken, TokenPrimaryGroup), %E");
- clear_procimptoken ();
- cygheap->user.reimpersonate ();
- return 0;
-}
-
-extern "C" int
-setegid (__gid16_t gid)
-{
- return setegid32 (gid16togid32 (gid));
-}
-
-/* setgid: POSIX 4.2.2.1 */
-extern "C" int
-setgid32 (__gid32_t gid)
-{
- int ret = setegid32 (gid);
- if (!ret)
- cygheap->user.real_gid = myself->gid;
- return ret;
-}
-
-extern "C" int
-setgid (__gid16_t gid)
-{
- int ret = setegid32 (gid16togid32 (gid));
- if (!ret)
- cygheap->user.real_gid = myself->gid;
- return ret;
-}
-
-extern "C" int
-setregid32 (__gid32_t rgid, __gid32_t egid)
-{
- int ret = 0;
- bool tried = false;
- __gid32_t old_egid = myself->gid;
-
- if (rgid != ILLEGAL_GID && cygheap->user.real_gid != rgid && egid != rgid)
- tried = !(ret = setegid32 (rgid));
- if (!ret && egid != ILLEGAL_GID)
- ret = setegid32 (egid);
- if (tried && (ret || egid == ILLEGAL_GID) && setegid32 (old_egid))
- system_printf ("Cannot restore original egid %u", old_egid);
- if (!ret && rgid != ILLEGAL_GID)
- cygheap->user.real_gid = rgid;
- debug_printf ("real: %u, effective: %u", cygheap->user.real_gid, myself->gid);
- return ret;
-}
-
-extern "C" int
-setregid (__gid16_t rgid, __gid16_t egid)
-{
- return setregid32 (gid16togid32 (rgid), gid16togid32 (egid));
-}
-
-/* chroot: privileged Unix system call. */
-/* FIXME: Not privileged here. How should this be done? */
-extern "C" int
-chroot (const char *newroot)
-{
- path_conv path (newroot, PC_SYM_FOLLOW | PC_POSIX);
-
- int ret = -1;
- if (path.error)
- set_errno (path.error);
- else if (!path.exists ())
- set_errno (ENOENT);
- else if (!path.isdir ())
- set_errno (ENOTDIR);
- else if (path.isspecial ())
- set_errno (EPERM);
- else
- {
- getwinenv("PATH="); /* Save the native PATH */
- cygheap->root.set (path.normalized_path, path.get_win32 (),
- !!path.objcaseinsensitive ());
- ret = 0;
- }
-
- syscall_printf ("%d = chroot (%s)", ret ? get_errno () : 0,
- newroot ? newroot : "NULL");
- return ret;
-}
-
-extern "C" int
-creat (const char *path, mode_t mode)
-{
- return open (path, O_WRONLY | O_CREAT | O_TRUNC, mode);
-}
-
-extern "C" void
-__assertfail ()
-{
- exit (99);
-}
-
-extern "C" int
-vhangup ()
-{
- set_errno (ENOSYS);
- return -1;
-}
-
-extern "C" int
-setpriority (int which, id_t who, int value)
-{
- DWORD prio = nice_to_winprio (value);
- int error = 0;
-
- switch (which)
- {
- case PRIO_PROCESS:
- if (!who)
- who = myself->pid;
- if ((pid_t) who == myself->pid)
- {
- if (!SetPriorityClass (hMainProc, prio))
- {
- set_errno (EACCES);
- return -1;
- }
- myself->nice = value;
- debug_printf ("Set nice to %d", myself->nice);
- return 0;
- }
- break;
- case PRIO_PGRP:
- if (!who)
- who = myself->pgid;
- break;
- case PRIO_USER:
- if (!who)
- who = myself->uid;
- break;
- default:
- set_errno (EINVAL);
- return -1;
- }
- winpids pids ((DWORD) PID_MAP_RW);
- for (DWORD i = 0; i < pids.npids; ++i)
- {
- _pinfo *p = pids[i];
- if (p)
- {
- switch (which)
- {
- case PRIO_PROCESS:
- if ((pid_t) who != p->pid)
- continue;
- break;
- case PRIO_PGRP:
- if ((pid_t) who != p->pgid)
- continue;
- break;
- case PRIO_USER:
- if ((__uid32_t) who != p->uid)
- continue;
- break;
- }
- HANDLE proc_h = OpenProcess (PROCESS_SET_INFORMATION, FALSE,
- p->dwProcessId);
- if (!proc_h)
- error = EPERM;
- else
- {
- if (!SetPriorityClass (proc_h, prio))
- error = EACCES;
- else
- p->nice = value;
- CloseHandle (proc_h);
- }
- }
- }
- pids.reset ();
- if (error)
- {
- set_errno (error);
- return -1;
- }
- return 0;
-}
-
-extern "C" int
-getpriority (int which, id_t who)
-{
- int nice = NZERO * 2; /* Illegal value */
-
- switch (which)
- {
- case PRIO_PROCESS:
- if (!who)
- who = myself->pid;
- if ((pid_t) who == myself->pid)
- return myself->nice;
- break;
- case PRIO_PGRP:
- if (!who)
- who = myself->pgid;
- break;
- case PRIO_USER:
- if (!who)
- who = myself->uid;
- break;
- default:
- set_errno (EINVAL);
- return -1;
- }
- winpids pids ((DWORD) 0);
- for (DWORD i = 0; i < pids.npids; ++i)
- {
- _pinfo *p = pids[i];
- if (p)
- switch (which)
- {
- case PRIO_PROCESS:
- if ((pid_t) who == p->pid)
- {
- nice = p->nice;
- goto out;
- }
- break;
- case PRIO_PGRP:
- if ((pid_t) who == p->pgid && p->nice < nice)
- nice = p->nice;
- break;
- case PRIO_USER:
- if ((__uid32_t) who == p->uid && p->nice < nice)
- nice = p->nice;
- break;
- }
- }
-out:
- pids.reset ();
- if (nice == NZERO * 2)
- {
- set_errno (ESRCH);
- return -1;
- }
- return nice;
-}
-
-extern "C" int
-nice (int incr)
-{
- return setpriority (PRIO_PROCESS, myself->pid, myself->nice + incr);
-}
-
-/*
- * Find the first bit set in I.
- */
-
-extern "C" int
-ffs (int i)
-{
- static const unsigned char table[] =
- {
- 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
- 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
- 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
- 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
- 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
- 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
- 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
- 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8
- };
- unsigned long int a;
- unsigned long int x = i & -i;
-
- a = x <= 0xffff ? (x <= 0xff ? 0 : 8) : (x <= 0xffffff ? 16 : 24);
-
- return table[x >> a] + a;
-}
-
-static void
-locked_append (int fd, const void * buf, size_t size)
-{
- struct __flock64 lock_buffer = {F_WRLCK, SEEK_SET, 0, 0, 0};
- int count = 0;
-
- do
- if ((lock_buffer.l_start = lseek64 (fd, 0, SEEK_END)) != (_off64_t) -1
- && fcntl64 (fd, F_SETLKW, &lock_buffer) != -1)
- {
- if (lseek64 (fd, 0, SEEK_END) != (_off64_t) -1)
- write (fd, buf, size);
- lock_buffer.l_type = F_UNLCK;
- fcntl64 (fd, F_SETLK, &lock_buffer);
- break;
- }
- while (count++ < 1000
- && (errno == EACCES || errno == EAGAIN)
- && !usleep (1000));
-}
-
-extern "C" void
-updwtmp (const char *wtmp_file, const struct utmp *ut)
-{
- int fd;
-
- if ((fd = open (wtmp_file, O_WRONLY | O_BINARY, 0)) >= 0)
- {
- locked_append (fd, ut, sizeof *ut);
- close (fd);
- }
-}
-
-static int utmp_fd = -1;
-static bool utmp_readonly = false;
-static char *utmp_file = (char *) _PATH_UTMP;
-
-static void
-internal_setutent (bool force_readwrite)
-{
- if (force_readwrite && utmp_readonly)
- endutent ();
- if (utmp_fd < 0)
- {
- utmp_fd = open (utmp_file, O_RDWR | O_BINARY);
- /* If open fails, we assume an unprivileged process (who?). In this
- case we try again for reading only unless the process calls
- pututline() (==force_readwrite) in which case opening just fails. */
- if (utmp_fd < 0 && !force_readwrite)
- {
- utmp_fd = open (utmp_file, O_RDONLY | O_BINARY);
- if (utmp_fd >= 0)
- utmp_readonly = true;
- }
- }
- else
- lseek (utmp_fd, 0, SEEK_SET);
-}
-
-extern "C" void
-setutent ()
-{
- internal_setutent (false);
-}
-
-extern "C" void
-endutent ()
-{
- if (utmp_fd >= 0)
- {
- close (utmp_fd);
- utmp_fd = -1;
- utmp_readonly = false;
- }
-}
-
-extern "C" void
-utmpname (const char *file)
-{
- myfault efault;
- if (efault.faulted () || !*file)
- {
- debug_printf ("Invalid file");
- return;
- }
- endutent ();
- utmp_file = strdup (file);
- debug_printf ("New UTMP file: %s", utmp_file);
-}
-EXPORT_ALIAS (utmpname, utmpxname)
-
-/* Note: do not make NO_COPY */
-static struct utmp utmp_data_buf[16];
-static unsigned utix = 0;
-#define nutdbuf (sizeof (utmp_data_buf) / sizeof (utmp_data_buf[0]))
-#define utmp_data ({ \
- if (utix > nutdbuf) \
- utix = 0; \
- utmp_data_buf + utix++; \
-})
-
-static struct utmpx *
-copy_ut_to_utx (struct utmp *ut, struct utmpx *utx)
-{
- if (!ut)
- return NULL;
- memcpy (utx, ut, sizeof *ut);
- utx->ut_tv.tv_sec = ut->ut_time;
- utx->ut_tv.tv_usec = 0;
- return utx;
-}
-
-extern "C" struct utmp *
-getutent ()
-{
- if (utmp_fd < 0)
- {
- internal_setutent (false);
- if (utmp_fd < 0)
- return NULL;
- }
-
- utmp *ut = utmp_data;
- if (read (utmp_fd, ut, sizeof *ut) != sizeof *ut)
- return NULL;
- return ut;
-}
-
-extern "C" struct utmp *
-getutid (const struct utmp *id)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
- if (utmp_fd < 0)
- {
- internal_setutent (false);
- if (utmp_fd < 0)
- return NULL;
- }
-
- utmp *ut = utmp_data;
- while (read (utmp_fd, ut, sizeof *ut) == sizeof *ut)
- {
- switch (id->ut_type)
- {
- case RUN_LVL:
- case BOOT_TIME:
- case OLD_TIME:
- case NEW_TIME:
- if (id->ut_type == ut->ut_type)
- return ut;
- break;
- case INIT_PROCESS:
- case LOGIN_PROCESS:
- case USER_PROCESS:
- case DEAD_PROCESS:
- if (strncmp (id->ut_id, ut->ut_id, UT_IDLEN) == 0)
- return ut;
- break;
- default:
- return NULL;
- }
- }
- return NULL;
-}
-
-extern "C" struct utmp *
-getutline (const struct utmp *line)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
- if (utmp_fd < 0)
- {
- internal_setutent (false);
- if (utmp_fd < 0)
- return NULL;
- }
-
- utmp *ut = utmp_data;
- while (read (utmp_fd, ut, sizeof *ut) == sizeof *ut)
- if ((ut->ut_type == LOGIN_PROCESS ||
- ut->ut_type == USER_PROCESS) &&
- !strncmp (ut->ut_line, line->ut_line, sizeof (ut->ut_line)))
- return ut;
-
- return NULL;
-}
-
-extern "C" struct utmp *
-pututline (const struct utmp *ut)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
- internal_setutent (true);
- if (utmp_fd < 0)
- {
- debug_printf ("error: utmp_fd %d", utmp_fd);
- return NULL;
- }
- debug_printf ("ut->ut_type %d, ut->ut_pid %d, ut->ut_line '%s', ut->ut_id '%s'\n",
- ut->ut_type, ut->ut_pid, ut->ut_line, ut->ut_id);
- debug_printf ("ut->ut_user '%s', ut->ut_host '%s'\n",
- ut->ut_user, ut->ut_host);
-
- struct utmp *u;
- if ((u = getutid (ut)))
- {
- lseek (utmp_fd, -sizeof *ut, SEEK_CUR);
- write (utmp_fd, ut, sizeof *ut);
- }
- else
- locked_append (utmp_fd, ut, sizeof *ut);
- /* The documentation says to return a pointer to this which implies that
- this has to be cast from a const. That doesn't seem right but the
- documentation seems pretty clear on this. */
- return (struct utmp *) ut;
-}
-
-extern "C" void
-setutxent ()
-{
- internal_setutent (false);
-}
-
-extern "C" void
-endutxent ()
-{
- endutent ();
-}
-
-extern "C" struct utmpx *
-getutxent ()
-{
- /* UGH. Not thread safe. */
- static struct utmpx utx;
- return copy_ut_to_utx (getutent (), &utx);
-}
-
-extern "C" struct utmpx *
-getutxid (const struct utmpx *id)
-{
- /* UGH. Not thread safe. */
- static struct utmpx utx;
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
- ((struct utmpx *)id)->ut_time = id->ut_tv.tv_sec;
- return copy_ut_to_utx (getutid ((struct utmp *) id), &utx);
-}
-
-extern "C" struct utmpx *
-getutxline (const struct utmpx *line)
-{
- /* UGH. Not thread safe. */
- static struct utmpx utx;
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
- ((struct utmpx *)line)->ut_time = line->ut_tv.tv_sec;
- return copy_ut_to_utx (getutline ((struct utmp *) line), &utx);
-}
-
-extern "C" struct utmpx *
-pututxline (const struct utmpx *utmpx)
-{
- /* UGH. Not thread safe. */
- static struct utmpx utx;
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
- ((struct utmpx *)utmpx)->ut_time = utmpx->ut_tv.tv_sec;
- return copy_ut_to_utx (pututline ((struct utmp *) utmpx), &utx);
-}
-
-extern "C" void
-updwtmpx (const char *wtmpx_file, const struct utmpx *utmpx)
-{
- ((struct utmpx *)utmpx)->ut_time = utmpx->ut_tv.tv_sec;
- updwtmp (wtmpx_file, (const struct utmp *) utmpx);
-}
-
-extern "C"
-long gethostid (void)
-{
- unsigned data[13] = {0x92895012,
- 0x10293412,
- 0x29602018,
- 0x81928167,
- 0x34601329,
- 0x75630198,
- 0x89860395,
- 0x62897564,
- 0x00194362,
- 0x20548593,
- 0x96839102,
- 0x12219854,
- 0x00290012};
-
- bool has_cpuid = false;
-
- DWORD opmask = SetThreadAffinityMask (GetCurrentThread (), 1);
- if (!opmask)
- debug_printf ("SetThreadAffinityMask to 1 failed, %E");
-
- if (!can_set_flag (0x00040000))
- debug_printf ("386 processor - no cpuid");
- else
- {
- debug_printf ("486 processor");
- if (can_set_flag (0x00200000))
- {
- debug_printf ("processor supports CPUID instruction");
- has_cpuid = true;
- }
- else
- debug_printf ("processor does not support CPUID instruction");
- }
- if (has_cpuid)
- {
- unsigned maxf, unused[3];
- cpuid (&maxf, &unused[0], &unused[1], &unused[2], 0);
- maxf &= 0xffff;
- if (maxf >= 1)
- {
- unsigned features;
- cpuid (&data[0], &unused[0], &unused[1], &features, 1);
- if (features & (1 << 18))
- {
- debug_printf ("processor has psn");
- if (maxf >= 3)
- {
- cpuid (&unused[0], &unused[1], &data[1], &data[2], 3);
- debug_printf ("Processor PSN: %04x-%04x-%04x-%04x-%04x-%04x",
- data[0] >> 16, data[0] & 0xffff, data[2] >> 16, data[2] & 0xffff, data[1] >> 16, data[1] & 0xffff);
- }
- }
- else
- debug_printf ("processor does not have psn");
- }
- }
-
- UUID Uuid;
- RPC_STATUS status = UuidCreateSequential (&Uuid);
- if (GetLastError () == ERROR_PROC_NOT_FOUND)
- status = UuidCreate (&Uuid);
- if (status == RPC_S_OK)
- {
- data[4] = *(unsigned *)&Uuid.Data4[2];
- data[5] = *(unsigned short *)&Uuid.Data4[6];
- // Unfortunately Windows will sometimes pick a virtual Ethernet card
- // e.g. VMWare Virtual Ethernet Adaptor
- debug_printf ("MAC address of first Ethernet card: %02x:%02x:%02x:%02x:%02x:%02x",
- Uuid.Data4[2], Uuid.Data4[3], Uuid.Data4[4],
- Uuid.Data4[5], Uuid.Data4[6], Uuid.Data4[7]);
- }
- else
- {
- debug_printf ("no Ethernet card installed");
- }
-
- reg_key key (HKEY_LOCAL_MACHINE, KEY_READ, "SOFTWARE", "Microsoft", "Windows", "CurrentVersion", NULL);
- key.get_string ("ProductId", (char *)&data[6], 24, "00000-000-0000000-00000");
- debug_printf ("Windows Product ID: %s", (char *)&data[6]);
-
- /* Contrary to MSDN, NT4 requires the second argument
- or a STATUS_ACCESS_VIOLATION is generated */
- ULARGE_INTEGER availb;
- GetDiskFreeSpaceEx ("C:\\", &availb, (PULARGE_INTEGER) &data[11], NULL);
-
- debug_printf ("hostid entropy: %08x %08x %08x %08x "
- "%08x %08x %08x %08x "
- "%08x %08x %08x %08x "
- "%08x",
- data[0], data[1],
- data[2], data[3],
- data[4], data[5],
- data[6], data[7],
- data[8], data[9],
- data[10], data[11],
- data[12]);
-
- long hostid = 0x40291372;
- // a random hashing algorithm
- // dependancy on md5 is probably too costly
- for (int i=0;i<13;i++)
- hostid ^= ((data[i] << (i << 2)) | (data[i] >> (32 - (i << 2))));
-
- if (opmask && !SetThreadAffinityMask (GetCurrentThread (), opmask))
- debug_printf ("SetThreadAffinityMask to %p failed, %E", opmask);
-
- debug_printf ("hostid: %08x", hostid);
-
- return hostid;
-}
-
-#define ETC_SHELLS "/etc/shells"
-static int shell_index;
-static struct __sFILE64 *shell_fp;
-
-extern "C" char *
-getusershell ()
-{
- /* List of default shells if no /etc/shells exists, defined as on Linux.
- FIXME: SunOS has a far longer list, containing all shells which
- might be shipped with the OS. Should we do the same for the Cygwin
- distro, adding bash, tcsh, ksh, pdksh and zsh? */
- static NO_COPY const char *def_shells[] = {
- "/bin/sh",
- "/bin/csh",
- "/usr/bin/sh",
- "/usr/bin/csh",
- NULL
- };
- static char buf[PATH_MAX];
- int ch, buf_idx;
-
- if (!shell_fp && !(shell_fp = fopen64 (ETC_SHELLS, "rt")))
- {
- if (def_shells[shell_index])
- return strcpy (buf, def_shells[shell_index++]);
- return NULL;
- }
- /* Skip white space characters. */
- while ((ch = getc (shell_fp)) != EOF && isspace (ch))
- ;
- /* Get each non-whitespace character as part of the shell path as long as
- it fits in buf. */
- for (buf_idx = 0;
- ch != EOF && !isspace (ch) && buf_idx < PATH_MAX;
- buf_idx++, ch = getc (shell_fp))
- buf[buf_idx] = ch;
- /* Skip any trailing non-whitespace character not fitting in buf. If the
- path is longer than PATH_MAX, it's invalid anyway. */
- while (ch != EOF && !isspace (ch))
- ch = getc (shell_fp);
- if (buf_idx)
- {
- buf[buf_idx] = '\0';
- return buf;
- }
- return NULL;
-}
-
-extern "C" void
-setusershell ()
-{
- if (shell_fp)
- fseek (shell_fp, 0L, SEEK_SET);
- shell_index = 0;
-}
-
-extern "C" void
-endusershell ()
-{
- if (shell_fp)
- {
- fclose (shell_fp);
- shell_fp = NULL;
- }
- shell_index = 0;
-}
-
-extern "C" void
-flockfile (FILE *file)
-{
- _flockfile (file);
-}
-
-extern "C" int
-ftrylockfile (FILE *file)
-{
- return _ftrylockfile (file);
-}
-
-extern "C" void
-funlockfile (FILE *file)
-{
- _funlockfile (file);
-}
-
-extern "C" FILE *
-popen (const char *command, const char *in_type)
-{
- const char *type = in_type;
- char rw = *type++;
-
- if (*type == 'b' || *type == 't')
- type++;
- if ((rw != 'r' && rw != 'w') || (*type != '\0'))
- {
- set_errno (EINVAL);
- return NULL;
- }
-
- int fd, other_fd, __stdin, __stdout, stdwhat;
-
- int fds[2];
- if (pipe (fds) < 0)
- return NULL;
-
- switch (rw)
- {
- case 'r':
- __stdin = -1;
- stdwhat = 1;
- other_fd = __stdout = fds[1];
- fd = fds[0];
- break;
- case 'w':
- __stdout = -1;
- stdwhat = 0;
- other_fd = __stdin = fds[0];
- fd = fds[1];
- break;
- default:
- return NULL; /* avoid a compiler warning */
- }
-
- FILE *fp = fdopen (fd, in_type);
- fcntl64 (fd, F_SETFD, fcntl64 (fd, F_GETFD, 0) | FD_CLOEXEC);
-
- if (!fp)
- goto err;
-
- pid_t pid;
- const char *argv[4];
-
- argv[0] = "/bin/sh";
- argv[1] = "-c";
- argv[2] = command;
- argv[3] = NULL;
-
- {
- lock_process now;
- int state = fcntl64 (stdwhat, F_GETFD, 0);
- fcntl64 (stdwhat, F_SETFD, state | FD_CLOEXEC);
- pid = spawn_guts ("/bin/sh", argv, cur_environ (), _P_NOWAIT,
- __stdin, __stdout);
- fcntl64 (stdwhat, F_SETFD, state);
- }
-
- if (pid >= 0)
- {
- close (other_fd);
- fhandler_pipe *fh = (fhandler_pipe *) cygheap->fdtab[fd];
- fh->set_popen_pid (pid);
- return fp;
- }
-
-err:
- int save_errno = get_errno ();
- close (fds[0]);
- close (fds[1]);
- set_errno (save_errno);
- return NULL;
-}
-
-int
-pclose (FILE *fp)
-{
- fhandler_pipe *fh = (fhandler_pipe *) cygheap->fdtab[fileno(fp)];
-
- if (fh->get_device () != FH_PIPEW && fh->get_device () != FH_PIPER)
- {
- set_errno (EBADF);
- return -1;
- }
-
- int pid = fh->get_popen_pid ();
- if (!pid)
- {
- set_errno (ECHILD);
- return -1;
- }
-
- if (fclose (fp))
- return -1;
-
- int status;
- while (1)
- if (waitpid (pid, &status, 0) == pid)
- break;
- else if (get_errno () == EINTR)
- continue;
- else
- return -1;
-
- return status;
-}
-
-/* Preliminary(?) implementation of the openat family of functions. */
-
-static int
-gen_full_path_at (char *path_ret, int dirfd, const char *pathname,
- bool null_pathname_allowed = false)
-{
- /* Set null_pathname_allowed to true to allow GLIBC compatible behaviour
- for NULL pathname. Only used by futimesat. */
- if (!pathname && !null_pathname_allowed)
- {
- set_errno (EFAULT);
- return -1;
- }
- if (pathname)
- {
- if (!*pathname)
- {
- set_errno (ENOENT);
- return -1;
- }
- if (strlen (pathname) >= PATH_MAX)
- {
- set_errno (ENAMETOOLONG);
- return -1;
- }
- }
- if (pathname && isabspath (pathname))
- stpcpy (path_ret, pathname);
- else
- {
- char *p;
-
- if (dirfd == AT_FDCWD)
- p = stpcpy (path_ret, cygheap->cwd.posix);
- else
- {
- cygheap_fdget cfd (dirfd);
- if (cfd < 0)
- return -1;
- if (!cfd->pc.isdir ())
- {
- set_errno (ENOTDIR);
- return -1;
- }
- p = stpcpy (path_ret, cfd->get_name ());
- }
- if (!p)
- {
- set_errno (ENOTDIR);
- return -1;
- }
- if (pathname)
- {
- if (p[-1] != '/')
- *p++ = '/';
- stpcpy (p, pathname);
- }
- }
- return 0;
-}
-
-extern "C" int
-openat (int dirfd, const char *pathname, int flags, ...)
-{
- tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- char *path = tp.c_get ();
- if (gen_full_path_at (path, dirfd, pathname))
- return -1;
-
- va_list ap;
- mode_t mode;
-
- va_start (ap, flags);
- mode = va_arg (ap, mode_t);
- va_end (ap);
- return open (path, flags, mode);
-}
-
-extern "C" int
-faccessat (int dirfd, const char *pathname, int mode, int flags)
-{
- tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- int res = -1;
- char *path = tp.c_get ();
- if (!gen_full_path_at (path, dirfd, pathname))
- {
- if (flags & ~(F_OK|R_OK|W_OK|X_OK))
- set_errno (EINVAL);
- else
- {
- fhandler_base *fh = build_fh_name (path, NULL,
- (flags & AT_SYMLINK_NOFOLLOW)
- ? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW,
- stat_suffixes);
- if (fh)
- {
- res = fh->fhaccess (mode);
- delete fh;
- }
- }
- }
- debug_printf ("returning %d", res);
- return res;
-}
-
-extern "C" int
-fchmodat (int dirfd, const char *pathname, mode_t mode, int flags)
-{
- tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- char *path = tp.c_get ();
- if (gen_full_path_at (path, dirfd, pathname))
- return -1;
- return chmod (path, mode);
-}
-
-extern "C" int
-fchownat (int dirfd, const char *pathname, __uid32_t uid, __gid32_t gid,
- int flags)
-{
- tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- char *path = tp.c_get ();
- if (gen_full_path_at (path, dirfd, pathname))
- return -1;
- return chown_worker (path, (flags & AT_SYMLINK_NOFOLLOW)
- ? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW, uid, gid);
-}
-
-extern "C" int
-fstatat (int dirfd, const char *pathname, struct __stat64 *st, int flags)
-{
- tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- char *path = tp.c_get ();
- if (gen_full_path_at (path, dirfd, pathname))
- return -1;
- return (flags & AT_SYMLINK_NOFOLLOW) ? lstat64 (path, st) : stat64 (path, st);
-}
-
-extern int utimens_worker (path_conv &, const struct timespec *);
-
-extern "C" int
-utimensat (int dirfd, const char *pathname, const struct timespec *times,
- int flags)
-{
- tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- char *path = tp.c_get ();
- if (gen_full_path_at (path, dirfd, pathname))
- return -1;
- path_conv win32 (path, PC_POSIX | ((flags & AT_SYMLINK_NOFOLLOW)
- ? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW),
- stat_suffixes);
- return utimens_worker (win32, times);
-}
-
-extern "C" int
-futimesat (int dirfd, const char *pathname, const struct timeval *times)
-{
- tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- char *path = tp.c_get ();
- if (gen_full_path_at (path, dirfd, pathname, true))
- return -1;
- return utimes (path, times);
-}
-
-extern "C" int
-linkat (int olddirfd, const char *oldpathname,
- int newdirfd, const char *newpathname,
- int flags)
-{
- tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- char *oldpath = tp.c_get ();
- if (gen_full_path_at (oldpath, olddirfd, oldpathname))
- return -1;
- char *newpath = tp.c_get ();
- if (gen_full_path_at (newpath, newdirfd, newpathname))
- return -1;
- if (flags & AT_SYMLINK_FOLLOW)
- {
- path_conv old_name (oldpath, PC_SYM_FOLLOW | PC_POSIX, stat_suffixes);
- if (old_name.error)
- {
- set_errno (old_name.error);
- return -1;
- }
- strcpy (oldpath, old_name.normalized_path);
- }
- return link (oldpath, newpath);
-}
-
-extern "C" int
-mkdirat (int dirfd, const char *pathname, mode_t mode)
-{
- tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- char *path = tp.c_get ();
- if (gen_full_path_at (path, dirfd, pathname))
- return -1;
- return mkdir (path, mode);
-}
-
-extern "C" int
-mkfifoat (int dirfd, const char *pathname, mode_t mode)
-{
- tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- char *path = tp.c_get ();
- if (gen_full_path_at (path, dirfd, pathname))
- return -1;
- return mkfifo (path, mode);
-}
-
-extern "C" int
-mknodat (int dirfd, const char *pathname, mode_t mode, __dev32_t dev)
-{
- tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- char *path = tp.c_get ();
- if (gen_full_path_at (path, dirfd, pathname))
- return -1;
- return mknod32 (path, mode, dev);
-}
-
-extern "C" ssize_t
-readlinkat (int dirfd, const char *pathname, char *buf, size_t bufsize)
-{
- tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- char *path = tp.c_get ();
- if (gen_full_path_at (path, dirfd, pathname))
- return -1;
- return readlink (path, buf, bufsize);
-}
-
-extern "C" int
-renameat (int olddirfd, const char *oldpathname,
- int newdirfd, const char *newpathname)
-{
- tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- char *oldpath = tp.c_get ();
- if (gen_full_path_at (oldpath, olddirfd, oldpathname))
- return -1;
- char *newpath = tp.c_get ();
- if (gen_full_path_at (newpath, newdirfd, newpathname))
- return -1;
- return rename (oldpath, newpath);
-}
-
-extern "C" int
-symlinkat (const char *oldpath, int newdirfd, const char *newpathname)
-{
- tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- char *newpath = tp.c_get ();
- if (gen_full_path_at (newpath, newdirfd, newpathname))
- return -1;
- return symlink (oldpath, newpath);
-}
-
-extern "C" int
-unlinkat (int dirfd, const char *pathname, int flags)
-{
- tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- char *path = tp.c_get ();
- if (gen_full_path_at (path, dirfd, pathname))
- return -1;
- return (flags & AT_REMOVEDIR) ? rmdir (path) : unlink (path);
-}
diff --git a/winsup/cygwin/sysconf.cc b/winsup/cygwin/sysconf.cc
deleted file mode 100644
index cf403fb..0000000
--- a/winsup/cygwin/sysconf.cc
+++ /dev/null
@@ -1,294 +0,0 @@
-/* sysconf.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <unistd.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "ntdll.h"
-
-static long
-get_open_max (int in)
-{
- long max = getdtablesize ();
- if (max < OPEN_MAX)
- max = OPEN_MAX;
- return max;
-}
-
-static long
-get_page_size (int in)
-{
- return getpagesize ();
-}
-
-static long
-get_nproc_values (int in)
-{
- NTSTATUS ret;
- SYSTEM_BASIC_INFORMATION sbi;
- if ((ret = NtQuerySystemInformation (SystemBasicInformation, (PVOID) &sbi,
- sizeof sbi, NULL)) != STATUS_SUCCESS)
- {
- __seterrno_from_nt_status (ret);
- debug_printf ("NtQuerySystemInformation: ret %d, Dos(ret) %E",
- ret);
- return -1;
- }
- switch (in)
- {
- case _SC_NPROCESSORS_CONF:
- return sbi.NumberProcessors;
- case _SC_NPROCESSORS_ONLN:
- {
- int i = 0;
- do
- if (sbi.ActiveProcessors & 1)
- i++;
- while (sbi.ActiveProcessors >>= 1);
- return i;
- }
- case _SC_PHYS_PAGES:
- return sbi.NumberOfPhysicalPages
- / (getpagesize () / getsystempagesize ());
- }
- return -1;
-}
-
-static long
-get_avphys (int in)
-{
- NTSTATUS ret;
- SYSTEM_PERFORMANCE_INFORMATION spi;
- if ((ret = NtQuerySystemInformation (SystemPerformanceInformation,
- (PVOID) &spi, sizeof spi, NULL))
- != STATUS_SUCCESS)
- {
- __seterrno_from_nt_status (ret);
- debug_printf ("NtQuerySystemInformation: ret %d, Dos(ret) %E",
- ret);
- return -1;
- }
- return spi.AvailablePages / (getpagesize () / getsystempagesize ());
-}
-
-enum sc_type { nsup, cons, func };
-
-static struct
-{
- sc_type type;
- union
- {
- long c;
- long (*f)(int);
- };
-} sca[] =
-{
- {cons, {c:ARG_MAX}}, /* 0, _SC_ARG_MAX */
- {cons, {c:CHILD_MAX}}, /* 1, _SC_CHILD_MAX */
- {cons, {c:CLOCKS_PER_SEC}}, /* 2, _SC_CLK_TCK */
- {cons, {c:NGROUPS_MAX}}, /* 3, _SC_NGROUPS_MAX */
- {func, {f:get_open_max}}, /* 4, _SC_OPEN_MAX */
- {cons, {c:_POSIX_JOB_CONTROL}}, /* 5, _SC_JOB_CONTROL */
- {cons, {c:_POSIX_SAVED_IDS}}, /* 6, _SC_SAVED_IDS */
- {cons, {c:_POSIX_VERSION}}, /* 7, _SC_VERSION */
- {func, {f:get_page_size}}, /* 8, _SC_PAGESIZE */
- {func, {f:get_nproc_values}}, /* 9, _SC_NPROCESSORS_CONF */
- {func, {f:get_nproc_values}}, /* 10, _SC_NPROCESSORS_ONLN */
- {func, {f:get_nproc_values}}, /* 11, _SC_PHYS_PAGES */
- {func, {f:get_avphys}}, /* 12, _SC_AVPHYS_PAGES */
- {cons, {c:MQ_OPEN_MAX}}, /* 13, _SC_MQ_OPEN_MAX */
- {cons, {c:MQ_PRIO_MAX}}, /* 14, _SC_MQ_PRIO_MAX */
- {cons, {c:RTSIG_MAX}}, /* 15, _SC_RTSIG_MAX */
- {cons, {c:-1L}}, /* 16, _SC_SEM_NSEMS_MAX */
- {cons, {c:SEM_VALUE_MAX}}, /* 17, _SC_SEM_VALUE_MAX */
- {cons, {c:SIGQUEUE_MAX}}, /* 18, _SC_SIGQUEUE_MAX */
- {cons, {c:TIMER_MAX}}, /* 19, _SC_TIMER_MAX */
- {nsup, {c:0}}, /* 20, _SC_TZNAME_MAX */
- {cons, {c:-1L}}, /* 21, _SC_ASYNCHRONOUS_IO */
- {cons, {c:_POSIX_FSYNC}}, /* 22, _SC_FSYNC */
- {cons, {c:_POSIX_MAPPED_FILES}}, /* 23, _SC_MAPPED_FILES */
- {cons, {c:-1L}}, /* 24, _SC_MEMLOCK */
- {cons, {c:_POSIX_MEMLOCK_RANGE}}, /* 25, _SC_MEMLOCK_RANGE */
- {cons, {c:_POSIX_MEMORY_PROTECTION}}, /* 26, _SC_MEMORY_PROTECTION */
- {cons, {c:_POSIX_MESSAGE_PASSING}}, /* 27, _SC_MESSAGE_PASSING */
- {cons, {c:-1L}}, /* 28, _SC_PRIORITIZED_IO */
- {cons, {c:_POSIX_REALTIME_SIGNALS}}, /* 29, _SC_REALTIME_SIGNALS */
- {cons, {c:_POSIX_SEMAPHORES}}, /* 30, _SC_SEMAPHORES */
- {cons, {c:_POSIX_SHARED_MEMORY_OBJECTS}}, /* 31, _SC_SHARED_MEMORY_OBJECTS */
- {cons, {c:_POSIX_SYNCHRONIZED_IO}}, /* 32, _SC_SYNCHRONIZED_IO */
- {cons, {c:_POSIX_TIMERS}}, /* 33, _SC_TIMERS */
- {nsup, {c:0}}, /* 34, _SC_AIO_LISTIO_MAX */
- {nsup, {c:0}}, /* 35, _SC_AIO_MAX */
- {nsup, {c:0}}, /* 36, _SC_AIO_PRIO_DELTA_MAX */
- {nsup, {c:0}}, /* 37, _SC_DELAYTIMER_MAX */
- {cons, {c:PTHREAD_KEYS_MAX}}, /* 38, _SC_THREAD_KEYS_MAX */
- {cons, {c:PTHREAD_STACK_MIN}}, /* 39, _SC_THREAD_STACK_MIN */
- {cons, {c:-1L}}, /* 40, _SC_THREAD_THREADS_MAX */
- {cons, {c:TTY_NAME_MAX}}, /* 41, _SC_TTY_NAME_MAX */
- {cons, {c:_POSIX_THREADS}}, /* 42, _SC_THREADS */
- {cons, {c:-1L}}, /* 43, _SC_THREAD_ATTR_STACKADDR */
- {cons, {c:_POSIX_THREAD_ATTR_STACKSIZE}}, /* 44, _SC_THREAD_ATTR_STACKSIZE */
- {cons, {c:_POSIX_THREAD_PRIORITY_SCHEDULING}}, /* 45, _SC_THREAD_PRIORITY_SCHEDULING */
- {cons, {c:-1L}}, /* 46, _SC_THREAD_PRIO_INHERIT */
- {cons, {c:-1L}}, /* 47, _SC_THREAD_PRIO_PROTECT */
- {cons, {c:_POSIX_THREAD_PROCESS_SHARED}}, /* 48, _SC_THREAD_PROCESS_SHARED */
- {cons, {c:_POSIX_THREAD_SAFE_FUNCTIONS}}, /* 49, _SC_THREAD_SAFE_FUNCTIONS */
- {cons, {c:16384L}}, /* 50, _SC_GETGR_R_SIZE_MAX */
- {cons, {c:16384L}}, /* 51, _SC_GETPW_R_SIZE_MAX */
- {cons, {c:LOGIN_NAME_MAX}}, /* 52, _SC_LOGIN_NAME_MAX */
- {cons, {c:PTHREAD_DESTRUCTOR_ITERATIONS}}, /* 53, _SC_THREAD_DESTRUCTOR_ITERATIONS */
- {cons, {c:_POSIX_ADVISORY_INFO}}, /* 54, _SC_ADVISORY_INFO */
- {cons, {c:ATEXIT_MAX}}, /* 55, _SC_ATEXIT_MAX */
- {cons, {c:-1L}}, /* 56, _SC_BARRIERS */
- {cons, {c:BC_BASE_MAX}}, /* 57, _SC_BC_BASE_MAX */
- {cons, {c:BC_DIM_MAX}}, /* 58, _SC_BC_DIM_MAX */
- {cons, {c:BC_SCALE_MAX}}, /* 59, _SC_BC_SCALE_MAX */
- {cons, {c:BC_STRING_MAX}}, /* 60, _SC_BC_STRING_MAX */
- {cons, {c:-1L}}, /* 61, _SC_CLOCK_SELECTION */
- {nsup, {c:0}}, /* 62, _SC_COLL_WEIGHTS_MAX */
- {cons, {c:-1L}}, /* 63, _SC_CPUTIME */
- {cons, {c:EXPR_NEST_MAX}}, /* 64, _SC_EXPR_NEST_MAX */
- {cons, {c:HOST_NAME_MAX}}, /* 65, _SC_HOST_NAME_MAX */
- {cons, {c:IOV_MAX}}, /* 66, _SC_IOV_MAX */
- {cons, {c:_POSIX_IPV6}}, /* 67, _SC_IPV6 */
- {cons, {c:LINE_MAX}}, /* 68, _SC_LINE_MAX */
- {cons, {c:-1L}}, /* 69, _SC_MONOTONIC_CLOCK */
- {cons, {c:_POSIX_RAW_SOCKETS}}, /* 70, _SC_RAW_SOCKETS */
- {cons, {c:_POSIX_READER_WRITER_LOCKS}}, /* 71, _SC_READER_WRITER_LOCKS */
- {cons, {c:_POSIX_REGEXP}}, /* 72, _SC_REGEXP */
- {cons, {c:RE_DUP_MAX}}, /* 73, _SC_RE_DUP_MAX */
- {cons, {c:_POSIX_SHELL}}, /* 74, _SC_SHELL */
- {cons, {c:-1L}}, /* 75, _SC_SPAWN */
- {cons, {c:-1L}}, /* 76, _SC_SPIN_LOCKS */
- {cons, {c:-1L}}, /* 77, _SC_SPORADIC_SERVER */
- {nsup, {c:0}}, /* 78, _SC_SS_REPL_MAX */
- {cons, {c:SYMLOOP_MAX}}, /* 79, _SC_SYMLOOP_MAX */
- {cons, {c:-1L}}, /* 80, _SC_THREAD_CPUTIME */
- {cons, {c:-1L}}, /* 81, _SC_THREAD_SPORADIC_SERVER */
- {cons, {c:-1L}}, /* 82, _SC_TIMEOUTS */
- {cons, {c:-1L}}, /* 83, _SC_TRACE */
- {cons, {c:-1L}}, /* 84, _SC_TRACE_EVENT_FILTER */
- {nsup, {c:0}}, /* 85, _SC_TRACE_EVENT_NAME_MAX */
- {cons, {c:-1L}}, /* 86, _SC_TRACE_INHERIT */
- {cons, {c:-1L}}, /* 87, _SC_TRACE_LOG */
- {nsup, {c:0}}, /* 88, _SC_TRACE_NAME_MAX */
- {nsup, {c:0}}, /* 89, _SC_TRACE_SYS_MAX */
- {nsup, {c:0}}, /* 90, _SC_TRACE_USER_EVENT_MAX */
- {cons, {c:-1L}}, /* 91, _SC_TYPED_MEMORY_OBJECTS */
- {cons, {c:-1L}}, /* 92, _SC_V6_ILP32_OFF32 */
- {cons, {c:_POSIX_V6_ILP32_OFFBIG}}, /* 93, _SC_V6_ILP32_OFFBIG */
- {cons, {c:-1L}}, /* 94, _SC_V6_LP64_OFF64 */
- {cons, {c:-1L}}, /* 95, _SC_V6_LPBIG_OFFBIG */
- {cons, {c:_XOPEN_CRYPT}}, /* 96, _SC_XOPEN_CRYPT */
- {cons, {c:_XOPEN_ENH_I18N}}, /* 97, _SC_XOPEN_ENH_I18N */
- {cons, {c:-1L}}, /* 98, _SC_XOPEN_LEGACY */
- {cons, {c:-1L}}, /* 99, _SC_XOPEN_REALTIME */
- {cons, {c:STREAM_MAX}}, /* 100, _SC_STREAM_MAX */
- {cons, {c:_POSIX_PRIORITY_SCHEDULING}}, /* 101, _SC_PRIORITY_SCHEDULING */
- {cons, {c:-1L}}, /* 102, _SC_XOPEN_REALTIME_THREADS */
- {cons, {c:_XOPEN_SHM}}, /* 103, _SC_XOPEN_SHM */
- {cons, {c:-1L}}, /* 104, _SC_XOPEN_STREAMS */
- {cons, {c:-1L}}, /* 105, _SC_XOPEN_UNIX */
- {cons, {c:_XOPEN_VERSION}}, /* 106, _SC_XOPEN_VERSION */
- {cons, {c:_POSIX2_CHAR_TERM}}, /* 107, _SC_2_CHAR_TERM */
- {cons, {c:_POSIX2_C_BIND}}, /* 108, _SC_2_C_BIND */
- {cons, {c:_POSIX2_C_BIND}}, /* 109, _SC_2_C_DEV */
- {cons, {c:-1L}}, /* 110, _SC_2_FORT_DEV */
- {cons, {c:-1L}}, /* 111, _SC_2_FORT_RUN */
- {cons, {c:-1L}}, /* 112, _SC_2_LOCALEDEF */
- {cons, {c:-1L}}, /* 113, _SC_2_PBS */
- {cons, {c:-1L}}, /* 114, _SC_2_PBS_ACCOUNTING */
- {cons, {c:-1L}}, /* 115, _SC_2_PBS_CHECKPOINT */
- {cons, {c:-1L}}, /* 116, _SC_2_PBS_LOCATE */
- {cons, {c:-1L}}, /* 117, _SC_2_PBS_MESSAGE */
- {cons, {c:-1L}}, /* 118, _SC_2_PBS_TRACK */
- {cons, {c:_POSIX2_SW_DEV}}, /* 119, _SC_2_SW_DEV */
- {cons, {c:_POSIX2_UPE}}, /* 120, _SC_2_UPE */
- {cons, {c:_POSIX2_VERSION}}, /* 121, _SC_2_VERSION */
-};
-
-#define SC_MIN _SC_ARG_MAX
-#define SC_MAX _SC_2_VERSION
-
-/* sysconf: POSIX 4.8.1.1 */
-/* Allows a portable app to determine quantities of resources or
- presence of an option at execution time. */
-long int
-sysconf (int in)
-{
- if (in >= SC_MIN && in <= SC_MAX)
- {
- switch (sca[in].type)
- {
- case nsup:
- break;
- case cons:
- return sca[in].c;
- case func:
- return sca[in].f (in);
- }
- }
- /* Unimplemented sysconf name or invalid option value. */
- set_errno (EINVAL);
- return -1L;
-}
-
-#define ls(s) sizeof(s),s
-
-static struct
-{
- size_t l;
- const char *s;
-} csa[] =
-{
- {ls ("/bin:/usr/bin")}, /* _CS_PATH */
- {0, NULL}, /* _CS_POSIX_V6_ILP32_OFF32_CFLAGS */
- {0, NULL}, /* _CS_POSIX_V6_ILP32_OFF32_LDFLAGS */
- {0, NULL}, /* _CS_POSIX_V6_ILP32_OFF32_LIBS */
- {0, NULL}, /* _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS */
- {ls ("")}, /* _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS */
- {ls ("")}, /* _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS */
- {ls ("")}, /* _CS_POSIX_V6_ILP32_OFFBIG_LIBS */
- {ls ("")}, /* _CS_XBS5_ILP32_OFFBIG_LINTFLAGS */
- {0, NULL}, /* _CS_POSIX_V6_LP64_OFF64_CFLAGS */
- {0, NULL}, /* _CS_POSIX_V6_LP64_OFF64_LDFLAGS */
- {0, NULL}, /* _CS_POSIX_V6_LP64_OFF64_LIBS */
- {0, NULL}, /* _CS_XBS5_LP64_OFF64_LINTFLAGS */
- {0, NULL}, /* _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS */
- {0, NULL}, /* _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS */
- {0, NULL}, /* _CS_POSIX_V6_LPBIG_OFFBIG_LIBS */
- {0, NULL}, /* _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS */
- {ls ("POSIX_V6_ILP32_OFFBIG")}, /* _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS */
-};
-
-#define CS_MIN _CS_PATH
-#define CS_MAX _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS
-
-extern "C" size_t
-confstr (int in, char *buf, size_t len)
-{
- if (in >= CS_MIN && in <= CS_MAX)
- {
- if (csa[in].l && len)
- {
- buf[0] = 0;
- strncat (buf, csa[in].s, min (len, csa[in].l) - 1);
- }
- return csa[in].l;
- }
- /* Invalid option value. */
- set_errno (EINVAL);
- return 0;
-}
diff --git a/winsup/cygwin/syslog.cc b/winsup/cygwin/syslog.cc
deleted file mode 100644
index fe76b50..0000000
--- a/winsup/cygwin/syslog.cc
+++ /dev/null
@@ -1,454 +0,0 @@
-/* syslog.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007 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 __INSIDE_CYGWIN_NET__
-
-#include "winsup.h"
-#include <stdlib.h>
-#include <stdio.h>
-#include <syslog.h>
-#include <unistd.h>
-#include <sys/un.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "cygtls.h"
-
-#define CYGWIN_LOG_NAME "Cygwin"
-
-/* openlog: save the passed args. Don't open the system log or /dev/log yet. */
-extern "C" void
-openlog (const char *ident, int logopt, int facility)
-{
- debug_printf ("openlog called with (%s, %d, %d)",
- ident ? ident : "<NULL>", logopt, facility);
-
- if (_my_tls.locals.process_ident != NULL)
- {
- free (_my_tls.locals.process_ident);
- _my_tls.locals.process_ident = NULL;
- }
- if (ident)
- {
- _my_tls.locals.process_ident = (char *) malloc (strlen (ident) + 1);
- if (!_my_tls.locals.process_ident)
- {
- debug_printf ("failed to allocate memory for _my_tls.locals.process_ident");
- return;
- }
- strcpy (_my_tls.locals.process_ident, ident);
- }
- _my_tls.locals.process_logopt = logopt;
- _my_tls.locals.process_facility = facility;
-}
-
-/* setlogmask: set the log priority mask and return previous mask.
- If maskpri is zero, just return previous. */
-int
-setlogmask (int maskpri)
-{
- if (maskpri == 0)
- return _my_tls.locals.process_logmask;
-
- int old_mask = _my_tls.locals.process_logmask;
- _my_tls.locals.process_logmask = maskpri;
-
- return old_mask;
-}
-
-/* Private class used to handle formatting of syslog message
- It is named pass_handler because it does a two-pass handling of log
- strings. The first pass counts the length of the string, and the second
- one builds the string. */
-
-class pass_handler
-{
- private:
- FILE *fp_;
- char *message_;
- int total_len_;
-
- void shutdown ();
-
- /* Explicitly disallow copies */
- pass_handler (const pass_handler &);
- pass_handler & operator = (const pass_handler &);
-
- public:
- pass_handler ();
- ~pass_handler ();
-
- int initialize (int);
-
- int print (const char *,...);
- int print_va (const char *, va_list);
- char *get_message () const { return message_; }
- void set_message (char *s) { message_ = s; *message_ = '\0'; }
-};
-
-pass_handler::pass_handler () : fp_ (0), message_ (0), total_len_ (0)
-{
- ;
-}
-
-pass_handler::~pass_handler ()
-{
- shutdown ();
-}
-
-void
-pass_handler::shutdown ()
-{
- if (fp_ != NULL)
- {
- fclose (fp_);
- fp_ = 0;
- }
-}
-
-int
-pass_handler::initialize (int pass_number)
-{
- shutdown ();
- if (pass_number)
- return total_len_ + 1;
-
- fp_ = fopen ("/dev/null", "wb");
- setbuf (fp_, NULL);
- if (fp_ == NULL)
- {
- debug_printf ("failed to open /dev/null");
- return -1;
- }
- total_len_ = 0;
- return 0;
-}
-
-int
-pass_handler::print (const char *fmt, ...)
-{
- va_list ap;
- va_start (ap, fmt);
- int ret = print_va (fmt, ap);
- va_end (ap);
- return ret;
-}
-
-int
-pass_handler::print_va (const char *fmt, va_list list)
-{
- if (fp_ != NULL)
- {
- int len = vfprintf (fp_, fmt, list);
- if (len < 0)
- return -1;
- total_len_ += len;
- return 0;
- }
- else if (message_ != NULL)
- {
- char *printpos = &message_[strlen (message_)];
- vsprintf (printpos, fmt, list);
- return 0;
- }
- debug_printf ("FAILURE ! fp_ and message_ both 0!! ");
- return -1;
-}
-
-static NO_COPY muto try_connect_guard;
-static enum {
- not_inited,
- inited_failed,
- inited_dgram,
- inited_stream
-} syslogd_inited;
-static int syslogd_sock = -1;
-extern "C" int cygwin_socket (int, int, int);
-extern "C" int cygwin_connect (int, const struct sockaddr *, int);
-
-static void
-connect_syslogd ()
-{
- struct __stat64 st;
- int fd;
- struct sockaddr_un sun;
-
- if (syslogd_inited != not_inited && syslogd_sock >= 0)
- close (syslogd_sock);
- syslogd_inited = inited_failed;
- syslogd_sock = -1;
- if (stat64 (_PATH_LOG, &st) || !S_ISSOCK (st.st_mode))
- return;
- if ((fd = cygwin_socket (AF_LOCAL, SOCK_DGRAM, 0)) < 0)
- return;
- sun.sun_family = AF_LOCAL;
- strncpy (sun.sun_path, _PATH_LOG, sizeof sun.sun_path);
- if (cygwin_connect (fd, (struct sockaddr *) &sun, sizeof sun))
- {
- if (get_errno () != EPROTOTYPE)
- {
- close (fd);
- return;
- }
- /* Retry with SOCK_STREAM. */
- if ((fd = cygwin_socket (AF_LOCAL, SOCK_STREAM, 0)) < 0)
- return;
- if (cygwin_connect (fd, (struct sockaddr *) &sun, sizeof sun))
- {
- close (fd);
- return;
- }
- syslogd_inited = inited_stream;
- }
- else
- syslogd_inited = inited_dgram;
- syslogd_sock = fd;
- fcntl64 (syslogd_sock, F_SETFD, FD_CLOEXEC);
- return;
-}
-
-static int
-try_connect_syslogd (int priority, const char *msg, int len)
-{
- ssize_t ret = -1;
-
- try_connect_guard.init ("try_connect_guard")->acquire ();
- if (syslogd_inited == not_inited)
- connect_syslogd ();
- if (syslogd_sock >= 0)
- {
- char pribuf[16];
- sprintf (pribuf, "<%d>", priority);
- struct iovec iv[2] =
- {
- { pribuf, strlen (pribuf) },
- { (char *) msg, len }
- };
-
- ret = writev (syslogd_sock, iv, 2);
- /* If the syslog daemon has been restarted and /dev/log was
- a stream socket, the connection is broken. In this case,
- try to reopen the socket and try again. */
- if (ret < 0 && syslogd_inited == inited_stream)
- {
- connect_syslogd ();
- if (syslogd_sock >= 0)
- ret = writev (syslogd_sock, iv, 2);
- }
- /* If write fails and LOG_CONS is set, return failure to vsyslog so
- it falls back to the usual logging method for this OS. */
- if (ret >= 0 || !(_my_tls.locals.process_logopt & LOG_CONS))
- ret = syslogd_sock;
- }
- try_connect_guard.release ();
- return ret;
-}
-
-/* syslog: creates the log message and writes to /dev/log, or to the
- NT system log if /dev/log isn't available.
-
- FIXME. WinNT system log messages don't look pretty, but in order to
- fix this we have to embed resources in the code and tell the NT
- registry where we are, blech (what happens if we move ?). We could,
- however, add the resources in Cygwin and always point to that. */
-
-extern "C" void
-vsyslog (int priority, const char *message, va_list ap)
-{
- debug_printf ("%x %s", priority, message);
- /* If the priority fails the current mask, reject */
- if ((LOG_MASK (LOG_PRI (priority)) & _my_tls.locals.process_logmask) == 0)
- {
- debug_printf ("failing message %x due to priority mask %x",
- priority, _my_tls.locals.process_logmask);
- return;
- }
-
- /* Add default facility if not in the given priority. */
- if (!(priority & LOG_FACMASK))
- priority |= _my_tls.locals.process_facility;
-
- /* Translate %m in the message to error text */
- char *errtext = strerror (get_errno ());
- int errlen = strlen (errtext);
- int numfound = 0;
-
- for (const char *cp = message; *cp; cp++)
- if (*cp == '%' && cp[1] == 'm')
- numfound++;
-
- char *newmessage = (char *) alloca (strlen (message) +
- (errlen * numfound) + 1);
-
- if (newmessage == NULL)
- {
- debug_printf ("failed to allocate newmessage");
- return;
- }
-
- char *dst = newmessage;
- for (const char *cp2 = message; *cp2; cp2++)
- if (*cp2 == '%' && cp2[1] == 'm')
- {
- cp2++;
- strcpy (dst, errtext);
- while (*dst)
- dst++;
- }
- else
- *dst++ = *cp2;
-
- *dst = '\0';
- message = newmessage;
-
- /* Work out the priority type - we ignore the facility for now.. */
- WORD eventType;
- switch (LOG_PRI (priority))
- {
- case LOG_EMERG:
- case LOG_ALERT:
- case LOG_CRIT:
- case LOG_ERR:
- eventType = EVENTLOG_ERROR_TYPE;
- break;
- case LOG_WARNING:
- eventType = EVENTLOG_WARNING_TYPE;
- break;
- case LOG_NOTICE:
- case LOG_INFO:
- case LOG_DEBUG:
- eventType = EVENTLOG_INFORMATION_TYPE;
- break;
- default:
- eventType = EVENTLOG_ERROR_TYPE;
- break;
- }
-
- /* We need to know how long the buffer needs to be.
- The only legal way I can see of doing this is to
- do a vfprintf to /dev/null, and count the bytes
- output, then do it again to a malloc'ed string. This
- is ugly, slow, but prevents core dumps :-).
- */
- pass_handler pass;
- for (int pass_number = 0; pass_number < 2; ++pass_number)
- {
- int n = pass.initialize (pass_number);
- if (n == -1)
- return;
- else if (n > 0)
- pass.set_message ((char *) alloca (n));
-
- /* Deal with ident_string */
- if (_my_tls.locals.process_ident != NULL)
- {
- if (pass.print ("%s: ", _my_tls.locals.process_ident) == -1)
- return;
- }
- if (_my_tls.locals.process_logopt & LOG_PID)
- {
- if (pass.print ("PID %u: ", getpid ()) == -1)
- return;
- }
-
- /* Print out the variable part */
- if (pass.print_va (message, ap) == -1)
- return;
-
- }
- const char *msg_strings[1];
- char *total_msg = pass.get_message ();
- int len = strlen (total_msg);
- if (len != 0 && (total_msg[len - 1] == '\n'))
- total_msg[--len] = '\0';
-
- msg_strings[0] = total_msg;
-
- if (_my_tls.locals.process_logopt & LOG_PERROR)
- {
- write (STDERR_FILENO, total_msg, len);
- write (STDERR_FILENO, "\n", 1);
- }
-
- int fd;
- if ((fd = try_connect_syslogd (priority, total_msg, len + 1)) < 0)
- {
- /* If syslogd isn't present, open the event log and send the message */
- HANDLE hEventSrc = RegisterEventSourceA (NULL, (_my_tls.locals.process_ident != NULL) ?
- _my_tls.locals.process_ident : CYGWIN_LOG_NAME);
- if (hEventSrc == NULL)
- {
- debug_printf ("RegisterEventSourceA failed with %E");
- return;
- }
- if (!ReportEventA (hEventSrc, eventType, 0, 0,
- cygheap->user.sid (), 1, 0, msg_strings, NULL))
- debug_printf ("ReportEventA failed with %E");
- DeregisterEventSource (hEventSrc);
- }
-}
-
-extern "C" void
-syslog (int priority, const char *message, ...)
-{
- va_list ap;
- va_start (ap, message);
- vsyslog (priority, message, ap);
- va_end (ap);
-}
-
-static NO_COPY muto klog_guard;
-fhandler_mailslot *dev_kmsg;
-
-extern "C" void
-vklog (int priority, const char *message, va_list ap)
-{
- /* TODO: kernel messages are under our control entirely and they should
- be quick. No playing with /dev/null, but a fixed upper size for now. */
- char buf[2060]; /* 2048 + a prority */
- if (!(priority & ~LOG_PRIMASK))
- priority = LOG_KERN | LOG_PRI (priority);
- __small_sprintf (buf, "<%d>", priority);
- __small_vsprintf (buf + strlen (buf), message, ap);
- klog_guard.init ("klog_guard")->acquire ();
- if (!dev_kmsg)
- dev_kmsg = (fhandler_mailslot *) build_fh_name ("/dev/kmsg");
- if (dev_kmsg && !dev_kmsg->get_handle ())
- dev_kmsg->open (O_WRONLY, 0);
- if (dev_kmsg && dev_kmsg->get_handle ())
- dev_kmsg->write (buf, strlen (buf) + 1);
- klog_guard.release ();
-}
-
-extern "C" void
-klog (int priority, const char *message, ...)
-{
- va_list ap;
- va_start (ap, message);
- vklog (priority, message, ap);
- va_end (ap);
-}
-
-extern "C" void
-closelog (void)
-{
- try_connect_guard.init ("try_connect_guard")->acquire ();
- if (syslogd_inited != not_inited && syslogd_sock >= 0)
- {
- close (syslogd_sock);
- syslogd_sock = -1;
- syslogd_inited = not_inited;
- }
- try_connect_guard.release ();
-}
diff --git a/winsup/cygwin/termios.cc b/winsup/cygwin/termios.cc
deleted file mode 100644
index 4476be1..0000000
--- a/winsup/cygwin/termios.cc
+++ /dev/null
@@ -1,324 +0,0 @@
-/* termios.cc: termios for WIN32.
-
- Copyright 1996, 1997, 1998, 2000, 2001, 2002 Red Hat, Inc.
-
- Written by Doug Evans and Steve Chamberlain of Cygnus Support
- dje@cygnus.com, sac@cygnus.com
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "cygwin/version.h"
-#include <stdlib.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "perprocess.h"
-#include "cygtls.h"
-
-/* tcsendbreak: POSIX 7.2.2.1 */
-extern "C" int
-tcsendbreak (int fd, int duration)
-{
- int res = -1;
-
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- goto out;
-
- if (!cfd->is_tty ())
- set_errno (ENOTTY);
- else if ((res = cfd->bg_check (-SIGTTOU)) > bg_eof)
- res = cfd->tcsendbreak (duration);
-
-out:
- syscall_printf ("%d = tcsendbreak (%d, %d)", res, fd, duration);
- return res;
-}
-
-/* tcdrain: POSIX 7.2.2.1 */
-extern "C" int
-tcdrain (int fd)
-{
- int res = -1;
-
- termios_printf ("tcdrain");
-
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- goto out;
-
- if (!cfd->is_tty ())
- set_errno (ENOTTY);
- else if ((res = cfd->bg_check (-SIGTTOU)) > bg_eof)
- res = cfd->tcdrain ();
-
-out:
- syscall_printf ("%d = tcdrain (%d)", res, fd);
- return res;
-}
-
-/* tcflush: POSIX 7.2.2.1 */
-extern "C" int
-tcflush (int fd, int queue)
-{
- int res = -1;
-
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- goto out;
-
- if (!cfd->is_tty ())
- set_errno (ENOTTY);
- else if (queue != TCIFLUSH && queue != TCOFLUSH && queue != TCIOFLUSH)
- set_errno (EINVAL);
- else if ((res = cfd->bg_check (-SIGTTOU)) > bg_eof)
- res = cfd->tcflush (queue);
-
-out:
- termios_printf ("%d = tcflush (%d, %d)", res, fd, queue);
- return res;
-}
-
-/* tcflow: POSIX 7.2.2.1 */
-extern "C" int
-tcflow (int fd, int action)
-{
- int res = -1;
-
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- goto out;
-
- if (!cfd->is_tty ())
- set_errno (ENOTTY);
- else if ((res = cfd->bg_check (-SIGTTOU)) > bg_eof)
- res = cfd->tcflow (action);
-
-out:
- syscall_printf ("%d = tcflow (%d, %d)", res, fd, action);
- return res;
-}
-
-/* tcsetattr: POSIX96 7.2.1.1 */
-extern "C" int
-tcsetattr (int fd, int a, const struct termios *t)
-{
- int res;
- t = __tonew_termios (t);
- int e = get_errno ();
-
- while (1)
- {
- res = -1;
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- {
- e = get_errno ();
- break;
- }
-
- if (!cfd->is_tty ())
- {
- e = ENOTTY;
- break;
- }
-
- res = cfd->bg_check (-SIGTTOU);
-
- switch (res)
- {
- case bg_eof:
- e = get_errno ();
- break;
- case bg_ok:
- if (cfd.isopen ())
- res = cfd->tcsetattr (a, t);
- e = get_errno ();
- break;
- case bg_signalled:
- if (_my_tls.call_signal_handler ())
- continue;
- res = -1;
- /* fall through intentionally */
- default:
- e = get_errno ();
- break;
- }
- break;
- }
-
- set_errno (e);
- termios_printf ("iflag %p, oflag %p, cflag %p, lflag %p, VMIN %d, VTIME %d",
- t->c_iflag, t->c_oflag, t->c_cflag, t->c_lflag, t->c_cc[VMIN],
- t->c_cc[VTIME]);
- termios_printf ("%d = tcsetattr (%d, %d, %x)", res, fd, a, t);
- return res;
-}
-
-/* tcgetattr: POSIX 7.2.1.1 */
-extern "C" int
-tcgetattr (int fd, struct termios *in_t)
-{
- int res = -1;
- struct termios *t = __makenew_termios (in_t);
-
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- /* saw an error */;
- else if (!cfd->is_tty ())
- set_errno (ENOTTY);
- else if ((res = cfd->tcgetattr (t)) == 0)
- __toapp_termios (in_t, t);
-
- if (res)
- termios_printf ("%d = tcgetattr (%d, %p)", res, fd, in_t);
- else
- termios_printf ("iflag %x, oflag %x, cflag %x, lflag %x, VMIN %d, VTIME %d",
- t->c_iflag, t->c_oflag, t->c_cflag, t->c_lflag, t->c_cc[VMIN],
- t->c_cc[VTIME]);
-
- return res;
-}
-
-/* tcgetpgrp: POSIX 7.2.3.1 */
-extern "C" int
-tcgetpgrp (int fd)
-{
- int res = -1;
-
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- /* saw an error */;
- else if (!cfd->is_tty ())
- set_errno (ENOTTY);
- else
- res = cfd->tcgetpgrp ();
-
- termios_printf ("%d = tcgetpgrp (%d)", res, fd);
- return res;
-}
-
-/* tcsetpgrp: POSIX 7.2.4.1 */
-extern "C" int
-tcsetpgrp (int fd, pid_t pgid)
-{
- int res = -1;
-
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- /* saw an error */;
- else if (!cfd->is_tty ())
- set_errno (ENOTTY);
- else
- res = cfd->tcsetpgrp (pgid);
-
- termios_printf ("%d = tcsetpgrp (%d, %x)", res, fd, pgid);
- return res;
-}
-
-/* NIST PCTS requires not macro-only implementation */
-#undef cfgetospeed
-#undef cfgetispeed
-#undef cfsetospeed
-#undef cfsetispeed
-
-/* cfgetospeed: POSIX96 7.1.3.1 */
-extern "C" speed_t
-cfgetospeed (struct termios *tp)
-{
- return __tonew_termios (tp)->c_ospeed;
-}
-
-/* cfgetispeed: POSIX96 7.1.3.1 */
-extern "C" speed_t
-cfgetispeed (struct termios *tp)
-{
- return __tonew_termios (tp)->c_ispeed;
-}
-
-static inline int
-setspeed (speed_t &set_speed, speed_t from_speed)
-{
- int res;
- switch (from_speed)
- {
- case B0:
- case B50:
- case B75:
- case B110:
- case B134:
- case B150:
- case B200:
- case B300:
- case B600:
- case B1200:
- case B1800:
- case B2400:
- case B4800:
- case B9600:
- case B19200:
- case B38400:
- case B57600:
- case B115200:
- case B128000:
- case B230400:
- case B256000:
- case B460800:
- case B500000:
- case B576000:
- case B921600:
- case B1000000:
- case B1152000:
- case B1500000:
- case B2000000:
- case B2500000:
- case B3000000:
- set_speed = from_speed;
- res = 0;
- break;
- default:
- set_errno (EINVAL);
- res = -1;
- break;
- }
- return res;
-}
-
-/* cfsetospeed: POSIX96 7.1.3.1 */
-extern "C" int
-cfsetospeed (struct termios *in_tp, speed_t speed)
-{
- struct termios *tp = __tonew_termios (in_tp);
- int res = setspeed (tp->c_ospeed, speed);
- __toapp_termios (in_tp, tp);
- return res;
-}
-
-/* cfsetispeed: POSIX96 7.1.3.1 */
-extern "C" int
-cfsetispeed (struct termios *in_tp, speed_t speed)
-{
- struct termios *tp = __tonew_termios (in_tp);
- int res = setspeed (tp->c_ispeed, speed);
- __toapp_termios (in_tp, tp);
- return res;
-}
-
-extern "C" void
-cfmakeraw(struct termios *tp)
-{
- tp->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
- | INLCR | IGNCR | ICRNL | IXON);
- tp->c_oflag &= ~OPOST;
- tp->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
- tp->c_cflag &= ~(CSIZE | PARENB);
- tp->c_cflag |= CS8;
-}
diff --git a/winsup/cygwin/textmode.c b/winsup/cygwin/textmode.c
deleted file mode 100644
index 6d52d50..0000000
--- a/winsup/cygwin/textmode.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* binmode.c
-
- Copyright 2000 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <windows.h>
-#include <sys/fcntl.h>
-#include <sys/cygwin.h>
-
-extern int _fmode;
-void
-cygwin_premain0 (int argc, char **argv, struct per_process *myself)
-{
- _fmode &= ~_O_BINARY;
- _fmode |= _O_TEXT;
-}
diff --git a/winsup/cygwin/textreadmode.c b/winsup/cygwin/textreadmode.c
deleted file mode 100644
index a94106d..0000000
--- a/winsup/cygwin/textreadmode.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* textreadmode.c
-
- Copyright 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. */
-
-#include <windows.h>
-#include <sys/fcntl.h>
-#include <sys/cygwin.h>
-
-extern int _fmode;
-void
-cygwin_premain0 (int argc, char **argv, struct per_process *myself)
-{
- static struct __cygwin_perfile pf[] =
- {
- {"", O_RDONLY | O_TEXT},
- {NULL, 0}
- };
- cygwin_internal (CW_PERFILE, pf);
-}
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc
deleted file mode 100644
index ecf9287..0000000
--- a/winsup/cygwin/thread.cc
+++ /dev/null
@@ -1,3335 +0,0 @@
-/* thread.cc: Locking and threading module functions
-
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008 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. */
-
-/* Implementation overview and caveats:
-
- Win32 puts some contraints on what can and cannot be implemented. Where
- possible we work around those contrainsts. Where we cannot work around
- the constraints we either pretend to be conformant, or return an error
- code.
-
- Some caveats: PROCESS_SHARED objects while they pretend to be process
- shared, may not actually work. Some test cases are needed to determine
- win32's behaviour. My suspicion is that the win32 handle needs to be
- opened with different flags for proper operation.
-
- R.Collins, April 2001. */
-
-#ifdef HAVE_CONFIG_H
-#endif
-
-#include "winsup.h"
-#include "miscfuncs.h"
-#include "path.h"
-#include <stdlib.h>
-#include "pinfo.h"
-#include "sigproc.h"
-#include "perprocess.h"
-#include "cygtls.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-
-extern "C" void __fp_lock_all ();
-extern "C" void __fp_unlock_all ();
-static inline verifyable_object_state
- verifyable_object_isvalid (void const * objectptr, long magic,
- void *static_ptr1 = NULL,
- void *static_ptr2 = NULL,
- void *static_ptr3 = NULL);
-
-extern int threadsafe;
-
-#undef __getreent
-extern "C" struct _reent *
-__getreent ()
-{
- return &_my_tls.local_clib;
-}
-
-extern "C" void
-__cygwin_lock_init (_LOCK_T *lock)
-{
- *lock = _LOCK_T_INITIALIZER;
-}
-
-extern "C" void
-__cygwin_lock_init_recursive (_LOCK_T *lock)
-{
- *lock = _LOCK_T_RECURSIVE_INITIALIZER;
-}
-
-extern "C" void
-__cygwin_lock_fini (_LOCK_T *lock)
-{
- pthread_mutex_destroy ((pthread_mutex_t*) lock);
-}
-
-extern "C" void
-__cygwin_lock_lock (_LOCK_T *lock)
-{
- if (MT_INTERFACE->threadcount <= 1)
- paranoid_printf ("threadcount %d. not locking", MT_INTERFACE->threadcount);
- else
- {
- paranoid_printf ("threadcount %d. locking", MT_INTERFACE->threadcount);
- pthread_mutex_lock ((pthread_mutex_t*) lock);
- }
-}
-
-extern "C" int
-__cygwin_lock_trylock (_LOCK_T *lock)
-{
- return pthread_mutex_trylock ((pthread_mutex_t*) lock);
-}
-
-
-extern "C" void
-__cygwin_lock_unlock (_LOCK_T *lock)
-{
- if (MT_INTERFACE->threadcount <= 1)
- paranoid_printf ("threadcount %d. not unlocking", MT_INTERFACE->threadcount);
- else
- {
- pthread_mutex_unlock ((pthread_mutex_t*) lock);
- paranoid_printf ("threadcount %d. unlocked", MT_INTERFACE->threadcount);
- }
-}
-
-static inline verifyable_object_state
-verifyable_object_isvalid (void const *objectptr, long magic, void *static_ptr1,
- void *static_ptr2, void *static_ptr3)
-{
- myfault efault;
- /* Check for NULL pointer specifically since it is a cheap test and avoids the
- overhead of setting up the fault handler. */
- if (!objectptr || efault.faulted ())
- return INVALID_OBJECT;
-
- verifyable_object **object = (verifyable_object **) objectptr;
-
- if ((static_ptr1 && *object == static_ptr1) ||
- (static_ptr2 && *object == static_ptr2) ||
- (static_ptr3 && *object == static_ptr3))
- return VALID_STATIC_OBJECT;
- if ((*object)->magic != magic)
- return INVALID_OBJECT;
- return VALID_OBJECT;
-}
-
-/* static members */
-inline bool
-pthread_attr::is_good_object (pthread_attr_t const *attr)
-{
- if (verifyable_object_isvalid (attr, PTHREAD_ATTR_MAGIC) != VALID_OBJECT)
- return false;
- return true;
-}
-
-inline bool
-pthread_condattr::is_good_object (pthread_condattr_t const *attr)
-{
- if (verifyable_object_isvalid (attr, PTHREAD_CONDATTR_MAGIC) != VALID_OBJECT)
- return false;
- return true;
-}
-
-inline bool
-pthread_rwlockattr::is_good_object (pthread_rwlockattr_t const *attr)
-{
- if (verifyable_object_isvalid (attr, PTHREAD_RWLOCKATTR_MAGIC) != VALID_OBJECT)
- return false;
- return true;
-}
-
-inline bool
-pthread_key::is_good_object (pthread_key_t const *key)
-{
- if (verifyable_object_isvalid (key, PTHREAD_KEY_MAGIC) != VALID_OBJECT)
- return false;
- return true;
-}
-
-inline bool
-pthread_mutex::is_good_object (pthread_mutex_t const *mutex)
-{
- if (verifyable_object_isvalid (mutex, PTHREAD_MUTEX_MAGIC) != VALID_OBJECT)
- return false;
- return true;
-}
-
-inline bool
-pthread_mutex::is_good_initializer (pthread_mutex_t const *mutex)
-{
- if (verifyable_object_isvalid (mutex, PTHREAD_MUTEX_MAGIC,
- PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
- PTHREAD_NORMAL_MUTEX_INITIALIZER_NP,
- PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP) != VALID_STATIC_OBJECT)
- return false;
- return true;
-}
-
-inline bool
-pthread_mutex::is_good_initializer_or_object (pthread_mutex_t const *mutex)
-{
- if (verifyable_object_isvalid (mutex, PTHREAD_MUTEX_MAGIC,
- PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
- PTHREAD_NORMAL_MUTEX_INITIALIZER_NP,
- PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP) == INVALID_OBJECT)
- return false;
- return true;
-}
-
-inline bool
-pthread_mutex::can_be_unlocked (pthread_mutex_t const *mutex)
-{
- pthread_t self = pthread::self ();
-
- if (!is_good_object (mutex))
- return false;
- /* Check if the mutex is owned by the current thread and can be unlocked.
- * Also check for the ANONYMOUS owner to cover NORMAL mutexes as well. */
- return ((*mutex)->recursion_counter == 1
- && ((*mutex)->owner == MUTEX_OWNER_ANONYMOUS
- || pthread::equal ((*mutex)->owner, self)));
-}
-
-inline bool
-pthread_mutexattr::is_good_object (pthread_mutexattr_t const * attr)
-{
- if (verifyable_object_isvalid (attr, PTHREAD_MUTEXATTR_MAGIC) != VALID_OBJECT)
- return false;
- return true;
-}
-
-inline bool __attribute__ ((used))
-pthread::is_good_object (pthread_t const *thread)
-{
- if (verifyable_object_isvalid (thread, PTHREAD_MAGIC) != VALID_OBJECT)
- return false;
- return true;
-}
-
-/* Thread synchronisation */
-inline bool
-pthread_cond::is_good_object (pthread_cond_t const *cond)
-{
- if (verifyable_object_isvalid (cond, PTHREAD_COND_MAGIC) != VALID_OBJECT)
- return false;
- return true;
-}
-
-inline bool
-pthread_cond::is_good_initializer (pthread_cond_t const *cond)
-{
- if (verifyable_object_isvalid (cond, PTHREAD_COND_MAGIC, PTHREAD_COND_INITIALIZER) != VALID_STATIC_OBJECT)
- return false;
- return true;
-}
-
-inline bool
-pthread_cond::is_good_initializer_or_object (pthread_cond_t const *cond)
-{
- if (verifyable_object_isvalid (cond, PTHREAD_COND_MAGIC, PTHREAD_COND_INITIALIZER) == INVALID_OBJECT)
- return false;
- return true;
-}
-
-/* RW locks */
-inline bool
-pthread_rwlock::is_good_object (pthread_rwlock_t const *rwlock)
-{
- if (verifyable_object_isvalid (rwlock, PTHREAD_RWLOCK_MAGIC) != VALID_OBJECT)
- return false;
- return true;
-}
-
-inline bool
-pthread_rwlock::is_good_initializer (pthread_rwlock_t const *rwlock)
-{
- if (verifyable_object_isvalid (rwlock, PTHREAD_RWLOCK_MAGIC, PTHREAD_RWLOCK_INITIALIZER) != VALID_STATIC_OBJECT)
- return false;
- return true;
-}
-
-inline bool
-pthread_rwlock::is_good_initializer_or_object (pthread_rwlock_t const *rwlock)
-{
- if (verifyable_object_isvalid (rwlock, PTHREAD_RWLOCK_MAGIC, PTHREAD_RWLOCK_INITIALIZER) == INVALID_OBJECT)
- return false;
- return true;
-}
-
-inline bool
-semaphore::is_good_object (sem_t const * sem)
-{
- if (verifyable_object_isvalid (sem, SEM_MAGIC) != VALID_OBJECT)
- return false;
- return true;
-}
-
-void
-MTinterface::Init ()
-{
- pthread_mutex::init_mutex ();
- pthread_cond::init_mutex ();
- pthread_rwlock::init_mutex ();
-}
-
-void
-MTinterface::fixup_before_fork ()
-{
- pthread_key::fixup_before_fork ();
-}
-
-/* This function is called from a single threaded process */
-void
-MTinterface::fixup_after_fork ()
-{
- pthread_key::fixup_after_fork ();
-
- threadcount = 0;
- pthread::init_mainthread ();
-
- pthread::fixup_after_fork ();
- pthread_mutex::fixup_after_fork ();
- pthread_cond::fixup_after_fork ();
- pthread_rwlock::fixup_after_fork ();
- semaphore::fixup_after_fork ();
-}
-
-/* pthread calls */
-
-/* static methods */
-void
-pthread::init_mainthread ()
-{
- pthread *thread = get_tls_self_pointer ();
- if (!thread)
- {
- thread = new pthread ();
- if (!thread)
- api_fatal ("failed to create mainthread object");
- }
-
- set_tls_self_pointer (thread);
- thread->thread_id = GetCurrentThreadId ();
- if (!DuplicateHandle (hMainProc, GetCurrentThread (), hMainProc,
- &thread->win32_obj_id, 0, FALSE, DUPLICATE_SAME_ACCESS))
- api_fatal ("failed to create mainthread handle");
- if (!thread->create_cancel_event ())
- api_fatal ("couldn't create cancel event for main thread");
- VerifyHandle (thread->win32_obj_id);
- thread->postcreate ();
-}
-
-pthread *
-pthread::self ()
-{
- pthread *thread = get_tls_self_pointer ();
- if (!thread)
- {
- thread = pthread_null::get_null_pthread ();
- set_tls_self_pointer (thread);
- }
- return thread;
-}
-
-pthread *
-pthread::get_tls_self_pointer ()
-{
- return _my_tls.tid;
-}
-
-void
-pthread::set_tls_self_pointer (pthread *thread)
-{
- thread->cygtls = &_my_tls;
- _my_tls.tid = thread;
-}
-
-List<pthread> pthread::threads;
-
-/* member methods */
-pthread::pthread ():verifyable_object (PTHREAD_MAGIC), win32_obj_id (0),
- valid (false), suspended (false),
- cancelstate (0), canceltype (0), cancel_event (0),
- joiner (NULL), next (NULL), cleanup_stack (NULL)
-{
- if (this != pthread_null::get_null_pthread ())
- threads.insert (this);
- parent_tls = &_my_tls;
-}
-
-pthread::~pthread ()
-{
- if (win32_obj_id)
- CloseHandle (win32_obj_id);
- if (cancel_event)
- CloseHandle (cancel_event);
-
- if (this != pthread_null::get_null_pthread ())
- threads.remove (this);
-}
-
-bool
-pthread::create_cancel_event ()
-{
- cancel_event = ::CreateEvent (&sec_none_nih, TRUE, FALSE, NULL);
- if (!cancel_event)
- {
- system_printf ("couldn't create cancel event, %E");
- /* we need the event for correct behaviour */
- return false;
- }
- return true;
-}
-
-void
-pthread::precreate (pthread_attr *newattr)
-{
- pthread_mutex *verifyable_mutex_obj = &mutex;
-
- /* already running ? */
- if (win32_obj_id)
- return;
-
- if (newattr)
- {
- attr.joinable = newattr->joinable;
- attr.contentionscope = newattr->contentionscope;
- attr.inheritsched = newattr->inheritsched;
- attr.stacksize = newattr->stacksize;
- }
-
- if (!pthread_mutex::is_good_object (&verifyable_mutex_obj))
- {
- thread_printf ("New thread object access mutex is not valid. this %p",
- this);
- magic = 0;
- return;
- }
- /* Change the mutex type to NORMAL to speed up mutex operations */
- mutex.type = PTHREAD_MUTEX_NORMAL;
- if (!create_cancel_event ())
- magic = 0;
-}
-
-bool
-pthread::create (void *(*func) (void *), pthread_attr *newattr,
- void *threadarg)
-{
- bool retval;
-
- precreate (newattr);
- if (!magic)
- return false;
-
- function = func;
- arg = threadarg;
-
- mutex.lock ();
- win32_obj_id = ::CreateThread (&sec_none_nih, attr.stacksize,
- thread_init_wrapper, this, 0, &thread_id);
-
- if (!win32_obj_id)
- {
- thread_printf ("CreateThread failed: this %p, %E", this);
- magic = 0;
- }
- else
- {
- postcreate ();
- while (!cygtls)
- low_priority_sleep (0);
- }
- retval = magic;
- mutex.unlock ();
- return retval;
-}
-
-void
-pthread::postcreate ()
-{
- valid = true;
-
- InterlockedIncrement (&MT_INTERFACE->threadcount);
- /* FIXME: set the priority appropriately for system contention scope */
- if (attr.inheritsched == PTHREAD_EXPLICIT_SCHED)
- {
- /* FIXME: set the scheduling settings for the new thread */
- /* sched_thread_setparam (win32_obj_id, attr.schedparam); */
- }
-}
-
-void
-pthread::exit (void *value_ptr)
-{
- class pthread *thread = this;
-
- // run cleanup handlers
- pop_all_cleanup_handlers ();
-
- pthread_key::run_all_destructors ();
-
- mutex.lock ();
- // cleanup if thread is in detached state and not joined
- if (equal (joiner, thread))
- delete this;
- else
- {
- valid = false;
- return_ptr = value_ptr;
- mutex.unlock ();
- }
-
- if (_my_tls.local_clib.__sdidinit < 0)
- _my_tls.local_clib.__sdidinit = 0;
- (_reclaim_reent) (_REENT);
-
-
- if (InterlockedDecrement (&MT_INTERFACE->threadcount) == 0)
- ::exit (0);
- else
- {
- _my_tls.remove (INFINITE);
- ExitThread (0);
- }
-}
-
-int
-pthread::cancel ()
-{
- class pthread *thread = this;
- class pthread *self = pthread::self ();
-
- mutex.lock ();
-
- if (!valid)
- {
- mutex.unlock ();
- return 0;
- }
-
- if (canceltype == PTHREAD_CANCEL_DEFERRED ||
- cancelstate == PTHREAD_CANCEL_DISABLE)
- {
- // cancel deferred
- mutex.unlock ();
- SetEvent (cancel_event);
- return 0;
- }
- else if (equal (thread, self))
- {
- mutex.unlock ();
- cancel_self ();
- return 0; // Never reached
- }
-
- // cancel asynchronous
- SuspendThread (win32_obj_id);
- if (WaitForSingleObject (win32_obj_id, 0) == WAIT_TIMEOUT)
- {
- CONTEXT context;
- context.ContextFlags = CONTEXT_CONTROL;
- GetThreadContext (win32_obj_id, &context);
- context.Eip = (DWORD) pthread::static_cancel_self;
- SetThreadContext (win32_obj_id, &context);
- }
- mutex.unlock ();
- ResumeThread (win32_obj_id);
-
- return 0;
-/*
- TODO: insert pthread_testcancel into the required functions
- the required function list is: *indicates done, X indicates not present in cygwin.
-aio_suspend ()
-*close ()
-*creat ()
-fcntl ()
-fsync ()
-getmsg ()
-getpmsg ()
-lockf ()
-mq_receive ()
-mq_send ()
-msgrcv ()
-msgsnd ()
-msync ()
-nanosleep ()
-open ()
-*pause ()
-poll ()
-pread ()
-*pthread_cond_timedwait ()
-*pthread_cond_wait ()
-*pthread_join ()
-*pthread_testcancel ()
-putmsg ()
-putpmsg ()
-pwrite ()
-read ()
-readv ()
-select ()
-*sem_wait ()
-*sigpause ()
-*sigsuspend ()
-sigtimedwait ()
-sigwait ()
-sigwaitinfo ()
-*sleep ()
-*system ()
-tcdrain ()
-*usleep ()
-*wait ()
-*wait3()
-waitid ()
-*waitpid ()
-write ()
-writev ()
-
-the optional list is:
-catclose ()
-catgets ()
-catopen ()
-closedir ()
-closelog ()
-ctermid ()
-dbm_close ()
-dbm_delete ()
-dbm_fetch ()
-dbm_nextkey ()
-dbm_open ()
-dbm_store ()
-dlclose ()
-dlopen ()
-endgrent ()
-endpwent ()
-endutxent ()
-fclose ()
-fcntl ()
-fflush ()
-fgetc ()
-fgetpos ()
-fgets ()
-fgetwc ()
-fgetws ()
-fopen ()
-fprintf ()
-fputc ()
-fputs ()
-fputwc ()
-fputws ()
-fread ()
-freopen ()
-fscanf ()
-fseek ()
-fseeko ()
-fsetpos ()
-ftell ()
-ftello ()
-ftw ()
-fwprintf ()
-fwrite ()
-fwscanf ()
-getc ()
-getc_unlocked ()
-getchar ()
-getchar_unlocked ()
-getcwd ()
-getdate ()
-getgrent ()
-getgrgid ()
-getgrgid_r ()
-getgrnam ()
-getgrnam_r ()
-getlogin ()
-getlogin_r ()
-getpwent ()
-*getpwnam ()
-*getpwnam_r ()
-*getpwuid ()
-*getpwuid_r ()
-gets ()
-getutxent ()
-getutxid ()
-getutxline ()
-getw ()
-getwc ()
-getwchar ()
-getwd ()
-glob ()
-iconv_close ()
-iconv_open ()
-ioctl ()
-lseek ()
-mkstemp ()
-nftw ()
-opendir ()
-openlog ()
-pclose ()
-perror ()
-popen ()
-printf ()
-putc ()
-putc_unlocked ()
-putchar ()
-putchar_unlocked ()
-puts ()
-pututxline ()
-putw ()
-putwc ()
-putwchar ()
-readdir ()
-readdir_r ()
-remove ()
-rename ()
-rewind ()
-rewinddir ()
-scanf ()
-seekdir ()
-semop ()
-setgrent ()
-setpwent ()
-setutxent ()
-strerror ()
-syslog ()
-tmpfile ()
-tmpnam ()
-ttyname ()
-ttyname_r ()
-ungetc ()
-ungetwc ()
-unlink ()
-vfprintf ()
-vfwprintf ()
-vprintf ()
-vwprintf ()
-wprintf ()
-wscanf ()
-
-Note, that for fcntl (), for any value of the cmd argument.
-
-And we must not introduce cancellation points anywhere else that's part of the posix or
-opengroup specs.
- */
-}
-
-void
-pthread::testcancel ()
-{
- if (cancelstate == PTHREAD_CANCEL_DISABLE)
- return;
-
- if (WaitForSingleObject (cancel_event, 0) == WAIT_OBJECT_0)
- cancel_self ();
-}
-
-void
-pthread::static_cancel_self ()
-{
- pthread::self ()->cancel_self ();
-}
-
-DWORD
-cancelable_wait (HANDLE object, DWORD timeout,
- const cw_cancel_action cancel_action,
- const enum cw_sig_wait sig_wait)
-{
- DWORD res;
- DWORD num = 0;
- HANDLE wait_objects[3];
- pthread_t thread = pthread::self ();
-
- /* Do not change the wait order.
- The object must have higher priority than the cancel event,
- because WaitForMultipleObjects will return the smallest index
- if both objects are signaled. */
- wait_objects[num++] = object;
- DWORD cancel_n;
- if (cancel_action == cw_no_cancel || !pthread::is_good_object (&thread) ||
- thread->cancelstate == PTHREAD_CANCEL_DISABLE)
- cancel_n = (DWORD) -1;
- else
- {
- cancel_n = WAIT_OBJECT_0 + num++;
- wait_objects[cancel_n] = thread->cancel_event;
- }
-
- DWORD sig_n;
- if (sig_wait == cw_sig_nosig || &_my_tls != _main_tls)
- sig_n = (DWORD) -1;
- else
- {
- sig_n = WAIT_OBJECT_0 + num++;
- wait_objects[sig_n] = signal_arrived;
- }
-
- while (1)
- {
- res = WaitForMultipleObjects (num, wait_objects, FALSE, timeout);
- if (res == cancel_n)
- {
- if (cancel_action == cw_cancel_self)
- pthread::static_cancel_self ();
- res = WAIT_CANCELED;
- }
- else if (res != sig_n)
- /* all set */;
- else if (sig_wait == cw_sig_eintr)
- res = WAIT_SIGNALED;
- else
- {
- _my_tls.call_signal_handler ();
- continue;
- }
- break;
- }
- return res;
-}
-
-int
-pthread::setcancelstate (int state, int *oldstate)
-{
- int result = 0;
-
- mutex.lock ();
-
- if (state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE)
- result = EINVAL;
- else
- {
- if (oldstate)
- *oldstate = cancelstate;
- cancelstate = state;
- }
-
- mutex.unlock ();
-
- return result;
-}
-
-int
-pthread::setcanceltype (int type, int *oldtype)
-{
- int result = 0;
-
- mutex.lock ();
-
- if (type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS)
- result = EINVAL;
- else
- {
- if (oldtype)
- *oldtype = canceltype;
- canceltype = type;
- }
-
- mutex.unlock ();
-
- return result;
-}
-
-void
-pthread::push_cleanup_handler (__pthread_cleanup_handler *handler)
-{
- if (this != self ())
- // TODO: do it?
- api_fatal ("Attempt to push a cleanup handler across threads");
- handler->next = cleanup_stack;
- cleanup_stack = handler;
-}
-
-void
-pthread::pop_cleanup_handler (int const execute)
-{
- if (this != self ())
- // TODO: send a signal or something to the thread ?
- api_fatal ("Attempt to execute a cleanup handler across threads");
-
- mutex.lock ();
-
- if (cleanup_stack != NULL)
- {
- __pthread_cleanup_handler *handler = cleanup_stack;
-
- if (execute)
- (*handler->function) (handler->arg);
- cleanup_stack = handler->next;
- }
-
- mutex.unlock ();
-}
-
-void
-pthread::pop_all_cleanup_handlers ()
-{
- while (cleanup_stack != NULL)
- pop_cleanup_handler (1);
-}
-
-void
-pthread::cancel_self ()
-{
- exit (PTHREAD_CANCELED);
-}
-
-DWORD
-pthread::get_thread_id ()
-{
- return thread_id;
-}
-
-void
-pthread::_fixup_after_fork ()
-{
- /* set thread to not running if it is not the forking thread */
- if (this != pthread::self ())
- {
- magic = 0;
- valid = false;
- win32_obj_id = NULL;
- cancel_event = NULL;
- }
-}
-
-void
-pthread::suspend_except_self ()
-{
- if (valid && this != pthread::self ())
- SuspendThread (win32_obj_id);
-}
-
-void
-pthread::resume ()
-{
- if (valid)
- ResumeThread (win32_obj_id);
-}
-
-/* instance members */
-
-pthread_attr::pthread_attr ():verifyable_object (PTHREAD_ATTR_MAGIC),
-joinable (PTHREAD_CREATE_JOINABLE), contentionscope (PTHREAD_SCOPE_PROCESS),
-inheritsched (PTHREAD_INHERIT_SCHED), stacksize (0)
-{
- schedparam.sched_priority = 0;
-}
-
-pthread_attr::~pthread_attr ()
-{
-}
-
-pthread_condattr::pthread_condattr ():verifyable_object
- (PTHREAD_CONDATTR_MAGIC), shared (PTHREAD_PROCESS_PRIVATE)
-{
-}
-
-pthread_condattr::~pthread_condattr ()
-{
-}
-
-List<pthread_cond> pthread_cond::conds;
-
-/* This is used for cond creation protection within a single process only */
-fast_mutex NO_COPY pthread_cond::cond_initialization_lock;
-
-/* We can only be called once.
- TODO: (no rush) use a non copied memory section to
- hold an initialization flag. */
-void
-pthread_cond::init_mutex ()
-{
- if (!cond_initialization_lock.init ())
- api_fatal ("Could not create win32 Mutex for pthread cond static initializer support.");
-}
-
-pthread_cond::pthread_cond (pthread_condattr *attr) :
- verifyable_object (PTHREAD_COND_MAGIC),
- shared (0), waiting (0), pending (0), sem_wait (NULL),
- mtx_cond(NULL), next (NULL)
-{
- pthread_mutex *verifyable_mutex_obj;
-
- if (attr)
- if (attr->shared != PTHREAD_PROCESS_PRIVATE)
- {
- magic = 0;
- return;
- }
-
- verifyable_mutex_obj = &mtx_in;
- if (!pthread_mutex::is_good_object (&verifyable_mutex_obj))
- {
- thread_printf ("Internal cond mutex is not valid. this %p", this);
- magic = 0;
- return;
- }
- /*
- * Change the mutex type to NORMAL.
- * This mutex MUST be of type normal
- */
- mtx_in.type = PTHREAD_MUTEX_NORMAL;
-
- verifyable_mutex_obj = &mtx_out;
- if (!pthread_mutex::is_good_object (&verifyable_mutex_obj))
- {
- thread_printf ("Internal cond mutex is not valid. this %p", this);
- magic = 0;
- return;
- }
- /* Change the mutex type to NORMAL to speed up mutex operations */
- mtx_out.type = PTHREAD_MUTEX_NORMAL;
-
- sem_wait = ::CreateSemaphore (&sec_none_nih, 0, LONG_MAX, NULL);
- if (!sem_wait)
- {
- debug_printf ("CreateSemaphore failed. %E");
- magic = 0;
- return;
- }
-
- conds.insert (this);
-}
-
-pthread_cond::~pthread_cond ()
-{
- if (sem_wait)
- CloseHandle (sem_wait);
-
- conds.remove (this);
-}
-
-void
-pthread_cond::unblock (const bool all)
-{
- unsigned long releaseable;
-
- /*
- * Block outgoing threads (and avoid simultanous unblocks)
- */
- mtx_out.lock ();
-
- releaseable = waiting - pending;
- if (releaseable)
- {
- unsigned long released;
-
- if (!pending)
- {
- /*
- * Block incoming threads until all waiting threads are released.
- */
- mtx_in.lock ();
-
- /*
- * Calculate releaseable again because threads can enter until
- * the semaphore has been taken, but they can not leave, therefore pending
- * is unchanged and releaseable can only get higher
- */
- releaseable = waiting - pending;
- }
-
- released = all ? releaseable : 1;
- pending += released;
- /*
- * Signal threads
- */
- ::ReleaseSemaphore (sem_wait, released, NULL);
- }
-
- /*
- * And let the threads release.
- */
- mtx_out.unlock ();
-}
-
-int
-pthread_cond::wait (pthread_mutex_t mutex, DWORD dwMilliseconds)
-{
- DWORD rv;
-
- mtx_in.lock ();
- if (InterlockedIncrement ((long *)&waiting) == 1)
- mtx_cond = mutex;
- else if (mtx_cond != mutex)
- {
- InterlockedDecrement ((long *)&waiting);
- mtx_in.unlock ();
- return EINVAL;
- }
- mtx_in.unlock ();
-
- /*
- * Release the mutex and wait on semaphore
- */
- ++mutex->condwaits;
- mutex->unlock ();
-
- rv = cancelable_wait (sem_wait, dwMilliseconds, cw_no_cancel_self, cw_sig_eintr);
-
- mtx_out.lock ();
-
- if (rv != WAIT_OBJECT_0)
- {
- /*
- * It might happen that a signal is sent while the thread got canceled
- * or timed out. Try to take one.
- * If the thread gets one than a signal|broadcast is in progress.
- */
- if (WaitForSingleObject (sem_wait, 0) == WAIT_OBJECT_0)
- /*
- * thread got cancelled ot timed out while a signalling is in progress.
- * Set wait result back to signaled
- */
- rv = WAIT_OBJECT_0;
- }
-
- InterlockedDecrement ((long *)&waiting);
-
- if (rv == WAIT_OBJECT_0 && --pending == 0)
- /*
- * All signaled threads are released,
- * new threads can enter Wait
- */
- mtx_in.unlock ();
-
- mtx_out.unlock ();
-
- mutex->lock ();
- --mutex->condwaits;
-
- if (rv == WAIT_CANCELED)
- pthread::static_cancel_self ();
- else if (rv == WAIT_SIGNALED)
- /* SUSv3 states: If a signal is delivered to a thread waiting for a
- condition variable, upon return from the signal handler the thread
- resumes waiting for the condition variable as if it was not
- interrupted, or it shall return zero due to spurious wakeup.
- We opt for the latter choice here. */
- return 0;
- else if (rv == WAIT_TIMEOUT)
- return ETIMEDOUT;
-
- return 0;
-}
-
-void
-pthread_cond::_fixup_after_fork ()
-{
- waiting = pending = 0;
- mtx_cond = NULL;
-
- /* Unlock eventually locked mutexes */
- mtx_in.unlock ();
- mtx_out.unlock ();
-
- sem_wait = ::CreateSemaphore (&sec_none_nih, 0, LONG_MAX, NULL);
- if (!sem_wait)
- api_fatal ("pthread_cond::_fixup_after_fork () failed to recreate win32 semaphore");
-}
-
-pthread_rwlockattr::pthread_rwlockattr ():verifyable_object
- (PTHREAD_RWLOCKATTR_MAGIC), shared (PTHREAD_PROCESS_PRIVATE)
-{
-}
-
-pthread_rwlockattr::~pthread_rwlockattr ()
-{
-}
-
-List<pthread_rwlock> pthread_rwlock::rwlocks;
-
-/* This is used for rwlock creation protection within a single process only */
-fast_mutex NO_COPY pthread_rwlock::rwlock_initialization_lock;
-
-/* We can only be called once.
- TODO: (no rush) use a non copied memory section to
- hold an initialization flag. */
-void
-pthread_rwlock::init_mutex ()
-{
- if (!rwlock_initialization_lock.init ())
- api_fatal ("Could not create win32 Mutex for pthread rwlock static initializer support.");
-}
-
-pthread_rwlock::pthread_rwlock (pthread_rwlockattr *attr) :
- verifyable_object (PTHREAD_RWLOCK_MAGIC),
- shared (0), waiting_readers (0), waiting_writers (0), writer (NULL),
- readers (NULL), readers_mx (), mtx (NULL), cond_readers (NULL), cond_writers (NULL),
- next (NULL)
-{
- pthread_mutex *verifyable_mutex_obj = &mtx;
- pthread_cond *verifyable_cond_obj;
-
- if (!readers_mx.init ())
- {
- thread_printf ("Internal rwlock synchronisation mutex is not valid. this %p", this);
- magic = 0;
- return;
- }
-
- if (attr)
- if (attr->shared != PTHREAD_PROCESS_PRIVATE)
- {
- magic = 0;
- return;
- }
-
- if (!pthread_mutex::is_good_object (&verifyable_mutex_obj))
- {
- thread_printf ("Internal rwlock mutex is not valid. this %p", this);
- magic = 0;
- return;
- }
- /* Change the mutex type to NORMAL to speed up mutex operations */
- mtx.type = PTHREAD_MUTEX_NORMAL;
-
- verifyable_cond_obj = &cond_readers;
- if (!pthread_cond::is_good_object (&verifyable_cond_obj))
- {
- thread_printf ("Internal rwlock readers cond is not valid. this %p", this);
- magic = 0;
- return;
- }
-
- verifyable_cond_obj = &cond_writers;
- if (!pthread_cond::is_good_object (&verifyable_cond_obj))
- {
- thread_printf ("Internal rwlock writers cond is not valid. this %p", this);
- magic = 0;
- return;
- }
-
-
- rwlocks.insert (this);
-}
-
-pthread_rwlock::~pthread_rwlock ()
-{
- rwlocks.remove (this);
-}
-
-int
-pthread_rwlock::rdlock ()
-{
- int result = 0;
- struct RWLOCK_READER *reader;
- pthread_t self = pthread::self ();
-
- mtx.lock ();
-
- if (lookup_reader (self))
- {
- result = EDEADLK;
- goto DONE;
- }
-
- reader = new struct RWLOCK_READER;
- if (!reader)
- {
- result = EAGAIN;
- goto DONE;
- }
-
- while (writer || waiting_writers)
- {
- pthread_cleanup_push (pthread_rwlock::rdlock_cleanup, this);
-
- ++waiting_readers;
- cond_readers.wait (&mtx);
- --waiting_readers;
-
- pthread_cleanup_pop (0);
- }
-
- reader->thread = self;
- add_reader (reader);
-
- DONE:
- mtx.unlock ();
-
- return result;
-}
-
-int
-pthread_rwlock::tryrdlock ()
-{
- int result = 0;
- pthread_t self = pthread::self ();
-
- mtx.lock ();
-
- if (writer || waiting_writers || lookup_reader (self))
- result = EBUSY;
- else
- {
- struct RWLOCK_READER *reader = new struct RWLOCK_READER;
- if (reader)
- {
- reader->thread = self;
- add_reader (reader);
- }
- else
- result = EAGAIN;
- }
-
- mtx.unlock ();
-
- return result;
-}
-
-int
-pthread_rwlock::wrlock ()
-{
- int result = 0;
- pthread_t self = pthread::self ();
-
- mtx.lock ();
-
- if (writer == self || lookup_reader (self))
- {
- result = EDEADLK;
- goto DONE;
- }
-
- while (writer || readers)
- {
- pthread_cleanup_push (pthread_rwlock::wrlock_cleanup, this);
-
- ++waiting_writers;
- cond_writers.wait (&mtx);
- --waiting_writers;
-
- pthread_cleanup_pop (0);
- }
-
- writer = self;
-
- DONE:
- mtx.unlock ();
-
- return result;
-}
-
-int
-pthread_rwlock::trywrlock ()
-{
- int result = 0;
- pthread_t self = pthread::self ();
-
- mtx.lock ();
-
- if (writer || readers)
- result = EBUSY;
- else
- writer = self;
-
- mtx.unlock ();
-
- return result;
-}
-
-int
-pthread_rwlock::unlock ()
-{
- int result = 0;
- pthread_t self = pthread::self ();
-
- mtx.lock ();
-
- if (writer)
- {
- if (writer != self)
- {
- result = EPERM;
- goto DONE;
- }
-
- writer = NULL;
- }
- else
- {
- struct RWLOCK_READER *reader = lookup_reader (self);
-
- if (!reader)
- {
- result = EPERM;
- goto DONE;
- }
-
- remove_reader (reader);
- delete reader;
- }
-
- release ();
-
- DONE:
- mtx.unlock ();
-
- return result;
-}
-
-void
-pthread_rwlock::add_reader (struct RWLOCK_READER *rd)
-{
- List_insert (readers, rd);
-}
-
-void
-pthread_rwlock::remove_reader (struct RWLOCK_READER *rd)
-{
- List_remove (readers_mx, readers, rd);
-}
-
-struct pthread_rwlock::RWLOCK_READER *
-pthread_rwlock::lookup_reader (pthread_t thread)
-{
- readers_mx.lock ();
-
- struct RWLOCK_READER *cur = readers;
-
- while (cur && cur->thread != thread)
- cur = cur->next;
-
- readers_mx.unlock ();
-
- return cur;
-}
-
-void
-pthread_rwlock::rdlock_cleanup (void *arg)
-{
- pthread_rwlock *rwlock = (pthread_rwlock *) arg;
-
- --(rwlock->waiting_readers);
- rwlock->release ();
- rwlock->mtx.unlock ();
-}
-
-void
-pthread_rwlock::wrlock_cleanup (void *arg)
-{
- pthread_rwlock *rwlock = (pthread_rwlock *) arg;
-
- --(rwlock->waiting_writers);
- rwlock->release ();
- rwlock->mtx.unlock ();
-}
-
-void
-pthread_rwlock::_fixup_after_fork ()
-{
- pthread_t self = pthread::self ();
- struct RWLOCK_READER **temp = &readers;
-
- waiting_readers = 0;
- waiting_writers = 0;
-
- if (!readers_mx.init ())
- api_fatal ("pthread_rwlock::_fixup_after_fork () failed to recreate mutex");
-
- /* Unlock eventually locked mutex */
- mtx.unlock ();
- /*
- * Remove all readers except self
- */
- while (*temp)
- {
- if ((*temp)->thread == self)
- temp = &((*temp)->next);
- else
- {
- struct RWLOCK_READER *cur = *temp;
- *temp = (*temp)->next;
- delete cur;
- }
- }
-}
-
-/* pthread_key */
-/* static members */
-/* This stores pthread_key information across fork() boundaries */
-List<pthread_key> pthread_key::keys;
-
-/* non-static members */
-
-pthread_key::pthread_key (void (*aDestructor) (void *)):verifyable_object (PTHREAD_KEY_MAGIC), destructor (aDestructor)
-{
- tls_index = TlsAlloc ();
- if (tls_index == TLS_OUT_OF_INDEXES)
- magic = 0;
- else
- keys.insert (this);
-}
-
-pthread_key::~pthread_key ()
-{
- /* We may need to make the list code lock the list during operations
- */
- if (magic != 0)
- {
- keys.remove (this);
- TlsFree (tls_index);
- }
-}
-
-void
-pthread_key::_fixup_before_fork ()
-{
- fork_buf = get ();
-}
-
-void
-pthread_key::_fixup_after_fork ()
-{
- tls_index = TlsAlloc ();
- if (tls_index == TLS_OUT_OF_INDEXES)
- api_fatal ("pthread_key::recreate_key_from_buffer () failed to reallocate Tls storage");
- set (fork_buf);
-}
-
-void
-pthread_key::run_destructor ()
-{
- if (destructor)
- {
- void *oldValue = get ();
- if (oldValue)
- {
- set (NULL);
- destructor (oldValue);
- }
- }
-}
-
-/* pshared mutexs:
-
- REMOVED FROM CURRENT. These can be reinstated with the daemon, when all the
- gymnastics can be a lot easier.
-
- the mutex_t (size 4) is not used as a verifyable object because we cannot
- guarantee the same address space for all processes.
- we use the following:
- high bit set (never a valid address).
- second byte is reserved for the priority.
- third byte is reserved
- fourth byte is the mutex id. (max 255 cygwin mutexs system wide).
- creating mutex's does get slower and slower, but as creation is a one time
- job, it should never become an issue
-
- And if you're looking at this and thinking, why not an array in cygwin for all mutexs,
- - you incur a penalty on _every_ mutex call and you have toserialise them all.
- ... Bad karma.
-
- option 2? put everything in userspace and update the ABI?
- - bad karma as well - the HANDLE, while identical across process's,
- Isn't duplicated, it's reopened. */
-
-/* static members */
-
-List<pthread_mutex> pthread_mutex::mutexes;
-
-/* This is used for mutex creation protection within a single process only */
-fast_mutex NO_COPY pthread_mutex::mutex_initialization_lock;
-
-/* We can only be called once.
- TODO: (no rush) use a non copied memory section to
- hold an initialization flag. */
-void
-pthread_mutex::init_mutex ()
-{
- if (!mutex_initialization_lock.init ())
- api_fatal ("Could not create win32 Mutex for pthread mutex static initializer support.");
-}
-
-pthread_mutex::pthread_mutex (pthread_mutexattr *attr) :
- verifyable_object (PTHREAD_MUTEX_MAGIC),
- lock_counter (0),
- win32_obj_id (NULL), recursion_counter (0),
- condwaits (0), owner (NULL),
-#ifdef DEBUGGING
- tid (0),
-#endif
- type (PTHREAD_MUTEX_ERRORCHECK),
- pshared (PTHREAD_PROCESS_PRIVATE)
-{
- win32_obj_id = ::CreateSemaphore (&sec_none_nih, 0, LONG_MAX, NULL);
- if (!win32_obj_id)
- {
- magic = 0;
- return;
- }
- /*attr checked in the C call */
- if (attr)
- {
- if (attr->pshared == PTHREAD_PROCESS_SHARED)
- {
- // fail
- magic = 0;
- return;
- }
-
- type = attr->mutextype;
- }
-
- mutexes.insert (this);
-}
-
-pthread_mutex::~pthread_mutex ()
-{
- if (win32_obj_id)
- CloseHandle (win32_obj_id);
-
- mutexes.remove (this);
-}
-
-int
-pthread_mutex::_lock (pthread_t self)
-{
- int result = 0;
-
- if (InterlockedIncrement ((long *)&lock_counter) == 1)
- set_owner (self);
- else if (type == PTHREAD_MUTEX_NORMAL || !pthread::equal (owner, self))
- {
- cancelable_wait (win32_obj_id, INFINITE, cw_no_cancel, cw_sig_resume);
- set_owner (self);
- }
- else
- {
- InterlockedDecrement ((long *) &lock_counter);
- if (type == PTHREAD_MUTEX_RECURSIVE)
- result = lock_recursive ();
- else
- result = EDEADLK;
- }
-
- return result;
-}
-
-int
-pthread_mutex::_trylock (pthread_t self)
-{
- int result = 0;
-
- if (InterlockedCompareExchange ((long *) &lock_counter, 1, 0) == 0)
- set_owner (self);
- else if (type == PTHREAD_MUTEX_RECURSIVE && pthread::equal (owner, self))
- result = lock_recursive ();
- else
- result = EBUSY;
-
- return result;
-}
-
-int
-pthread_mutex::_unlock (pthread_t self)
-{
- if (!pthread::equal (owner, self))
- return EPERM;
-
- /* Don't try to unlock anything if recursion_counter == 0 initially.
- That means that we've forked. */
- if (recursion_counter > 0 && --recursion_counter == 0)
- {
- owner = NULL;
-#ifdef DEBUGGING
- tid = 0;
-#endif
- if (InterlockedDecrement ((long *) &lock_counter))
- // Another thread is waiting
- ::ReleaseSemaphore (win32_obj_id, 1, NULL);
- }
-
- return 0;
-}
-
-int
-pthread_mutex::_destroy (pthread_t self)
-{
- if (condwaits || _trylock (self))
- // Do not destroy a condwaited or locked mutex
- return EBUSY;
- else if (recursion_counter > 1)
- {
- // Do not destroy a recursive locked mutex
- recursion_counter--;
- return EBUSY;
- }
-
- delete this;
- return 0;
-}
-
-void
-pthread_mutex::_fixup_after_fork ()
-{
- debug_printf ("mutex %p in _fixup_after_fork", this);
- if (pshared != PTHREAD_PROCESS_PRIVATE)
- api_fatal ("pthread_mutex::_fixup_after_fork () doesn't understand PROCESS_SHARED mutex's");
-
- /* All waiting threads are gone after a fork */
- recursion_counter = 0;
- lock_counter = 0;
- condwaits = 0;
-#ifdef DEBUGGING
- tid = 0xffffffff; /* Don't know the tid after a fork */
-#endif
- win32_obj_id = ::CreateSemaphore (&sec_none_nih, 0, LONG_MAX, NULL);
- if (!win32_obj_id)
- api_fatal ("pthread_mutex::_fixup_after_fork () failed to recreate win32 semaphore for mutex");
-}
-
-pthread_mutexattr::pthread_mutexattr ():verifyable_object (PTHREAD_MUTEXATTR_MAGIC),
-pshared (PTHREAD_PROCESS_PRIVATE), mutextype (PTHREAD_MUTEX_ERRORCHECK)
-{
-}
-
-pthread_mutexattr::~pthread_mutexattr ()
-{
-}
-
-verifyable_object::verifyable_object (long verifyer):
-magic (verifyer)
-{
-}
-
-verifyable_object::~verifyable_object ()
-{
- magic = 0;
-}
-
-DWORD WINAPI
-pthread::thread_init_wrapper (void *arg)
-{
- pthread *thread = (pthread *) arg;
- set_tls_self_pointer (thread);
-
- thread->mutex.lock ();
-
- // if thread is detached force cleanup on exit
- if (thread->attr.joinable == PTHREAD_CREATE_DETACHED && thread->joiner == NULL)
- thread->joiner = thread;
- _my_tls.sigmask = thread->parent_tls->sigmask;
- thread->mutex.unlock ();
-
- thread_printf ("started thread %p %p %p %p %p %p", arg, &_my_tls.local_clib,
- _impure_ptr, thread, thread->function, thread->arg);
-
- // call the user's thread
- void *ret = thread->function (thread->arg);
-
- thread->exit (ret);
-
- return 0; // just for show. Never returns.
-}
-
-unsigned long
-pthread::getsequence_np ()
-{
- return get_thread_id ();
-}
-
-int
-pthread::create (pthread_t *thread, const pthread_attr_t *attr,
- void *(*start_routine) (void *), void *arg)
-{
- if (attr && !pthread_attr::is_good_object (attr))
- return EINVAL;
-
- *thread = new pthread ();
- if (!(*thread)->create (start_routine, attr ? *attr : NULL, arg))
- {
- delete (*thread);
- *thread = NULL;
- return EAGAIN;
- }
-
- return 0;
-}
-
-int
-pthread::once (pthread_once_t *once_control, void (*init_routine) (void))
-{
- // already done ?
- if (once_control->state)
- return 0;
-
- pthread_mutex_lock (&once_control->mutex);
- /* Here we must set a cancellation handler to unlock the mutex if needed */
- /* but a cancellation handler is not the right thing. We need this in the thread
- *cleanup routine. Assumption: a thread can only be in one pthread_once routine
- *at a time. Stote a mutex_t *in the pthread_structure. if that's non null unlock
- *on pthread_exit ();
- */
- if (!once_control->state)
- {
- init_routine ();
- once_control->state = 1;
- }
- /* Here we must remove our cancellation handler */
- pthread_mutex_unlock (&once_control->mutex);
- return 0;
-}
-
-int
-pthread::cancel (pthread_t thread)
-{
- if (!is_good_object (&thread))
- return ESRCH;
-
- return thread->cancel ();
-}
-
-void
-pthread::atforkprepare ()
-{
- callback *cb = MT_INTERFACE->pthread_prepare;
- while (cb)
- {
- cb->cb ();
- cb = cb->next;
- }
-
- __fp_lock_all ();
-
- MT_INTERFACE->fixup_before_fork ();
-}
-
-void
-pthread::atforkparent ()
-{
- __fp_unlock_all ();
-
- callback *cb = MT_INTERFACE->pthread_parent;
- while (cb)
- {
- cb->cb ();
- cb = cb->next;
- }
-}
-
-void
-pthread::atforkchild ()
-{
- MT_INTERFACE->fixup_after_fork ();
-
- __fp_unlock_all ();
-
- callback *cb = MT_INTERFACE->pthread_child;
- while (cb)
- {
- cb->cb ();
- cb = cb->next;
- }
-}
-
-/* Register a set of functions to run before and after fork.
- prepare calls are called in LI-FC order.
- parent and child calls are called in FI-FC order. */
-int
-pthread::atfork (void (*prepare)(void), void (*parent)(void), void (*child)(void))
-{
- callback *prepcb = NULL, *parentcb = NULL, *childcb = NULL;
- if (prepare)
- {
- prepcb = new callback;
- if (!prepcb)
- return ENOMEM;
- }
- if (parent)
- {
- parentcb = new callback;
- if (!parentcb)
- {
- if (prepcb)
- delete prepcb;
- return ENOMEM;
- }
- }
- if (child)
- {
- childcb = new callback;
- if (!childcb)
- {
- if (prepcb)
- delete prepcb;
- if (parentcb)
- delete parentcb;
- return ENOMEM;
- }
- }
-
- if (prepcb)
- {
- prepcb->cb = prepare;
- List_insert (MT_INTERFACE->pthread_prepare, prepcb);
- }
- if (parentcb)
- {
- parentcb->cb = parent;
- callback **t = &MT_INTERFACE->pthread_parent;
- while (*t)
- t = &(*t)->next;
- /* t = pointer to last next in the list */
- List_insert (*t, parentcb);
- }
- if (childcb)
- {
- childcb->cb = child;
- callback **t = &MT_INTERFACE->pthread_child;
- while (*t)
- t = &(*t)->next;
- /* t = pointer to last next in the list */
- List_insert (*t, childcb);
- }
- return 0;
-}
-
-extern "C" int
-pthread_attr_init (pthread_attr_t *attr)
-{
- if (pthread_attr::is_good_object (attr))
- return EBUSY;
-
- *attr = new pthread_attr;
- if (!pthread_attr::is_good_object (attr))
- {
- delete (*attr);
- *attr = NULL;
- return ENOMEM;
- }
- return 0;
-}
-
-extern "C" int
-pthread_attr_getinheritsched (const pthread_attr_t *attr,
- int *inheritsched)
-{
- if (!pthread_attr::is_good_object (attr))
- return EINVAL;
- *inheritsched = (*attr)->inheritsched;
- return 0;
-}
-
-extern "C" int
-pthread_attr_getschedparam (const pthread_attr_t *attr,
- struct sched_param *param)
-{
- if (!pthread_attr::is_good_object (attr))
- return EINVAL;
- *param = (*attr)->schedparam;
- return 0;
-}
-
-/* From a pure code point of view, this should call a helper in sched.cc,
- to allow for someone adding scheduler policy changes to win32 in the future.
- However that's extremely unlikely, so short and sweet will do us */
-extern "C" int
-pthread_attr_getschedpolicy (const pthread_attr_t *attr, int *policy)
-{
- if (!pthread_attr::is_good_object (attr))
- return EINVAL;
- *policy = SCHED_FIFO;
- return 0;
-}
-
-
-extern "C" int
-pthread_attr_getscope (const pthread_attr_t *attr, int *contentionscope)
-{
- if (!pthread_attr::is_good_object (attr))
- return EINVAL;
- *contentionscope = (*attr)->contentionscope;
- return 0;
-}
-
-extern "C" int
-pthread_attr_setdetachstate (pthread_attr_t *attr, int detachstate)
-{
- if (!pthread_attr::is_good_object (attr))
- return EINVAL;
- if (detachstate < 0 || detachstate > 1)
- return EINVAL;
- (*attr)->joinable = detachstate;
- return 0;
-}
-
-extern "C" int
-pthread_attr_getdetachstate (const pthread_attr_t *attr, int *detachstate)
-{
- if (!pthread_attr::is_good_object (attr))
- return EINVAL;
- *detachstate = (*attr)->joinable;
- return 0;
-}
-
-extern "C" int
-pthread_attr_setinheritsched (pthread_attr_t *attr, int inheritsched)
-{
- if (!pthread_attr::is_good_object (attr))
- return EINVAL;
- if (inheritsched != PTHREAD_INHERIT_SCHED
- && inheritsched != PTHREAD_EXPLICIT_SCHED)
- return ENOTSUP;
- (*attr)->inheritsched = inheritsched;
- return 0;
-}
-
-extern "C" int
-pthread_attr_setschedparam (pthread_attr_t *attr,
- const struct sched_param *param)
-{
- if (!pthread_attr::is_good_object (attr))
- return EINVAL;
- if (!valid_sched_parameters (param))
- return ENOTSUP;
- (*attr)->schedparam = *param;
- return 0;
-}
-
-/* See __pthread_attr_getschedpolicy for some notes */
-extern "C" int
-pthread_attr_setschedpolicy (pthread_attr_t *attr, int policy)
-{
- if (!pthread_attr::is_good_object (attr))
- return EINVAL;
- if (policy != SCHED_FIFO)
- return ENOTSUP;
- return 0;
-}
-
-extern "C" int
-pthread_attr_setscope (pthread_attr_t *attr, int contentionscope)
-{
- if (!pthread_attr::is_good_object (attr))
- return EINVAL;
- if (contentionscope != PTHREAD_SCOPE_SYSTEM
- && contentionscope != PTHREAD_SCOPE_PROCESS)
- return EINVAL;
- /* In future, we may be able to support system scope by escalating the thread
- priority to exceed the priority class. For now we only support PROCESS scope. */
- if (contentionscope != PTHREAD_SCOPE_PROCESS)
- return ENOTSUP;
- (*attr)->contentionscope = contentionscope;
- return 0;
-}
-
-extern "C" int
-pthread_attr_setstacksize (pthread_attr_t *attr, size_t size)
-{
- if (!pthread_attr::is_good_object (attr))
- return EINVAL;
- (*attr)->stacksize = size;
- return 0;
-}
-
-extern "C" int
-pthread_attr_getstacksize (const pthread_attr_t *attr, size_t *size)
-{
- if (!pthread_attr::is_good_object (attr))
- return EINVAL;
- *size = (*attr)->stacksize;
- return 0;
-}
-
-extern "C" int
-pthread_attr_destroy (pthread_attr_t *attr)
-{
- if (!pthread_attr::is_good_object (attr))
- return EINVAL;
- delete (*attr);
- *attr = NULL;
- return 0;
-}
-
-int
-pthread::join (pthread_t *thread, void **return_val)
-{
- pthread_t joiner = self ();
-
- joiner->testcancel ();
-
- // Initialize return val with NULL
- if (return_val)
- *return_val = NULL;
-
- if (!is_good_object (&joiner))
- return EINVAL;
-
- if (!is_good_object (thread))
- return ESRCH;
-
- if (equal (*thread,joiner))
- return EDEADLK;
-
- (*thread)->mutex.lock ();
-
- if ((*thread)->attr.joinable == PTHREAD_CREATE_DETACHED)
- {
- (*thread)->mutex.unlock ();
- return EINVAL;
- }
- else
- {
- (*thread)->joiner = joiner;
- (*thread)->attr.joinable = PTHREAD_CREATE_DETACHED;
- (*thread)->mutex.unlock ();
-
- switch (cancelable_wait ((*thread)->win32_obj_id, INFINITE, cw_no_cancel_self, cw_sig_resume))
- {
- case WAIT_OBJECT_0:
- if (return_val)
- *return_val = (*thread)->return_ptr;
- delete (*thread);
- break;
- case WAIT_CANCELED:
- // set joined thread back to joinable since we got canceled
- (*thread)->joiner = NULL;
- (*thread)->attr.joinable = PTHREAD_CREATE_JOINABLE;
- joiner->cancel_self ();
- // never reached
- break;
- default:
- // should never happen
- return EINVAL;
- }
- }
-
- return 0;
-}
-
-int
-pthread::detach (pthread_t *thread)
-{
- if (!is_good_object (thread))
- return ESRCH;
-
- (*thread)->mutex.lock ();
- if ((*thread)->attr.joinable == PTHREAD_CREATE_DETACHED)
- {
- (*thread)->mutex.unlock ();
- return EINVAL;
- }
-
- // check if thread is still alive
- if ((*thread)->valid && WaitForSingleObject ((*thread)->win32_obj_id, 0) == WAIT_TIMEOUT)
- {
- // force cleanup on exit
- (*thread)->joiner = *thread;
- (*thread)->attr.joinable = PTHREAD_CREATE_DETACHED;
- (*thread)->mutex.unlock ();
- }
- else
- {
- // thread has already terminated.
- (*thread)->mutex.unlock ();
- delete (*thread);
- }
-
- return 0;
-}
-
-int
-pthread::suspend (pthread_t *thread)
-{
- if (!is_good_object (thread))
- return ESRCH;
-
- if ((*thread)->suspended == false)
- {
- (*thread)->suspended = true;
- SuspendThread ((*thread)->win32_obj_id);
- }
-
- return 0;
-}
-
-
-int
-pthread::resume (pthread_t *thread)
-{
- if (!is_good_object (thread))
- return ESRCH;
-
- if ((*thread)->suspended == true)
- ResumeThread ((*thread)->win32_obj_id);
- (*thread)->suspended = false;
-
- return 0;
-}
-
-/* provided for source level compatability.
- See http://www.opengroup.org/onlinepubs/007908799/xsh/pthread_getconcurrency.html
-*/
-extern "C" int
-pthread_getconcurrency ()
-{
- return MT_INTERFACE->concurrency;
-}
-
-/* keep this in sync with sched.cc */
-extern "C" int
-pthread_getschedparam (pthread_t thread, int *policy,
- struct sched_param *param)
-{
- if (!pthread::is_good_object (&thread))
- return ESRCH;
- *policy = SCHED_FIFO;
- /* we don't return the current effective priority, we return the current
- requested priority */
- *param = thread->attr.schedparam;
- return 0;
-}
-
-/* Thread Specific Data */
-extern "C" int
-pthread_key_create (pthread_key_t *key, void (*destructor) (void *))
-{
- *key = new pthread_key (destructor);
-
- if (!pthread_key::is_good_object (key))
- {
- delete (*key);
- *key = NULL;
- return EAGAIN;
- }
- return 0;
-}
-
-extern "C" int
-pthread_key_delete (pthread_key_t key)
-{
- if (!pthread_key::is_good_object (&key))
- return EINVAL;
-
- delete (key);
- return 0;
-}
-
-/* provided for source level compatability. See
-http://www.opengroup.org/onlinepubs/007908799/xsh/pthread_getconcurrency.html
-*/
-extern "C" int
-pthread_setconcurrency (int new_level)
-{
- if (new_level < 0)
- return EINVAL;
- MT_INTERFACE->concurrency = new_level;
- return 0;
-}
-
-/* keep syncronised with sched.cc */
-extern "C" int
-pthread_setschedparam (pthread_t thread, int policy,
- const struct sched_param *param)
-{
- if (!pthread::is_good_object (&thread))
- return ESRCH;
- if (policy != SCHED_FIFO)
- return ENOTSUP;
- if (!param)
- return EINVAL;
- int rv =
- sched_set_thread_priority (thread->win32_obj_id, param->sched_priority);
- if (!rv)
- thread->attr.schedparam.sched_priority = param->sched_priority;
- return rv;
-}
-
-
-extern "C" int
-pthread_setspecific (pthread_key_t key, const void *value)
-{
- if (!pthread_key::is_good_object (&key))
- return EINVAL;
- (key)->set (value);
- return 0;
-}
-
-extern "C" void *
-pthread_getspecific (pthread_key_t key)
-{
- if (!pthread_key::is_good_object (&key))
- return NULL;
-
- return (key)->get ();
-
-}
-
-extern "C" int
-pthread_cond_destroy (pthread_cond_t *cond)
-{
- if (pthread_cond::is_good_initializer (cond))
- return 0;
- if (!pthread_cond::is_good_object (cond))
- return EINVAL;
-
- /* reads are atomic */
- if ((*cond)->waiting)
- return EBUSY;
-
- delete (*cond);
- *cond = NULL;
-
- return 0;
-}
-
-int
-pthread_cond::init (pthread_cond_t *cond, const pthread_condattr_t *attr)
-{
- pthread_cond_t new_cond;
-
- if (attr && !pthread_condattr::is_good_object (attr))
- return EINVAL;
-
- cond_initialization_lock.lock ();
-
- new_cond = new pthread_cond (attr ? (*attr) : NULL);
- if (!is_good_object (&new_cond))
- {
- delete new_cond;
- cond_initialization_lock.unlock ();
- return EAGAIN;
- }
-
- myfault efault;
- if (efault.faulted ())
- {
- delete new_cond;
- cond_initialization_lock.unlock ();
- return EINVAL;
- }
-
- *cond = new_cond;
- cond_initialization_lock.unlock ();
-
- return 0;
-}
-
-extern "C" int
-pthread_cond_broadcast (pthread_cond_t *cond)
-{
- if (pthread_cond::is_good_initializer (cond))
- return 0;
- if (!pthread_cond::is_good_object (cond))
- return EINVAL;
-
- (*cond)->unblock (true);
-
- return 0;
-}
-
-extern "C" int
-pthread_cond_signal (pthread_cond_t *cond)
-{
- if (pthread_cond::is_good_initializer (cond))
- return 0;
- if (!pthread_cond::is_good_object (cond))
- return EINVAL;
-
- (*cond)->unblock (false);
-
- return 0;
-}
-
-static int
-__pthread_cond_dowait (pthread_cond_t *cond, pthread_mutex_t *mutex,
- DWORD waitlength)
-{
- if (!pthread_mutex::is_good_object (mutex))
- return EINVAL;
- if (!pthread_mutex::can_be_unlocked (mutex))
- return EPERM;
-
- if (pthread_cond::is_good_initializer (cond))
- pthread_cond::init (cond, NULL);
- if (!pthread_cond::is_good_object (cond))
- return EINVAL;
-
- return (*cond)->wait (*mutex, waitlength);
-}
-
-extern "C" int
-pthread_cond_timedwait (pthread_cond_t *cond, pthread_mutex_t *mutex,
- const struct timespec *abstime)
-{
- struct timeval tv;
- DWORD waitlength;
-
- myfault efault;
- if (efault.faulted ())
- return EINVAL;
-
- pthread_testcancel ();
-
- /* According to SUSv3, the abstime value must be checked for validity. */
- if (abstime->tv_sec < 0
- || abstime->tv_nsec < 0
- || abstime->tv_nsec > 999999999)
- return EINVAL;
-
- gettimeofday (&tv, NULL);
- /* Check for immediate timeout before converting to microseconds, since
- the resulting value can easily overflow long. This also allows to
- evaluate microseconds directly in DWORD. */
- if (tv.tv_sec > abstime->tv_sec
- || (tv.tv_sec == abstime->tv_sec
- && tv.tv_usec > abstime->tv_nsec / 1000))
- return ETIMEDOUT;
-
- waitlength = (abstime->tv_sec - tv.tv_sec) * 1000;
- waitlength += (abstime->tv_nsec / 1000 - tv.tv_usec) / 1000;
- return __pthread_cond_dowait (cond, mutex, waitlength);
-}
-
-extern "C" int
-pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex)
-{
- pthread_testcancel ();
-
- return __pthread_cond_dowait (cond, mutex, INFINITE);
-}
-
-extern "C" int
-pthread_condattr_init (pthread_condattr_t *condattr)
-{
- if (pthread_condattr::is_good_object (condattr))
- return EBUSY;
-
- *condattr = new pthread_condattr;
- if (!pthread_condattr::is_good_object (condattr))
- {
- delete (*condattr);
- *condattr = NULL;
- return ENOMEM;
- }
- return 0;
-}
-
-extern "C" int
-pthread_condattr_getpshared (const pthread_condattr_t *attr, int *pshared)
-{
- if (!pthread_condattr::is_good_object (attr))
- return EINVAL;
- *pshared = (*attr)->shared;
- return 0;
-}
-
-extern "C" int
-pthread_condattr_setpshared (pthread_condattr_t *attr, int pshared)
-{
- if (!pthread_condattr::is_good_object (attr))
- return EINVAL;
- if ((pshared < 0) || (pshared > 1))
- return EINVAL;
- /* shared cond vars not currently supported */
- if (pshared != PTHREAD_PROCESS_PRIVATE)
- return EINVAL;
- (*attr)->shared = pshared;
- return 0;
-}
-
-extern "C" int
-pthread_condattr_destroy (pthread_condattr_t *condattr)
-{
- if (!pthread_condattr::is_good_object (condattr))
- return EINVAL;
- delete (*condattr);
- *condattr = NULL;
- return 0;
-}
-
-extern "C" int
-pthread_rwlock_destroy (pthread_rwlock_t *rwlock)
-{
- if (pthread_rwlock::is_good_initializer (rwlock))
- return 0;
- if (!pthread_rwlock::is_good_object (rwlock))
- return EINVAL;
-
- if ((*rwlock)->writer || (*rwlock)->readers ||
- (*rwlock)->waiting_readers || (*rwlock)->waiting_writers)
- return EBUSY;
-
- delete (*rwlock);
- *rwlock = NULL;
-
- return 0;
-}
-
-int
-pthread_rwlock::init (pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr)
-{
- pthread_rwlock_t new_rwlock;
-
- if (attr && !pthread_rwlockattr::is_good_object (attr))
- return EINVAL;
-
- rwlock_initialization_lock.lock ();
-
- new_rwlock = new pthread_rwlock (attr ? (*attr) : NULL);
- if (!is_good_object (&new_rwlock))
- {
- delete new_rwlock;
- rwlock_initialization_lock.unlock ();
- return EAGAIN;
- }
-
- myfault efault;
- if (efault.faulted ())
- {
- delete new_rwlock;
- rwlock_initialization_lock.unlock ();
- return EINVAL;
- }
-
- *rwlock = new_rwlock;
- rwlock_initialization_lock.unlock ();
-
- return 0;
-}
-
-extern "C" int
-pthread_rwlock_rdlock (pthread_rwlock_t *rwlock)
-{
- pthread_testcancel ();
-
- if (pthread_rwlock::is_good_initializer (rwlock))
- pthread_rwlock::init (rwlock, NULL);
- if (!pthread_rwlock::is_good_object (rwlock))
- return EINVAL;
-
- return (*rwlock)->rdlock ();
-}
-
-extern "C" int
-pthread_rwlock_tryrdlock (pthread_rwlock_t *rwlock)
-{
- if (pthread_rwlock::is_good_initializer (rwlock))
- pthread_rwlock::init (rwlock, NULL);
- if (!pthread_rwlock::is_good_object (rwlock))
- return EINVAL;
-
- return (*rwlock)->tryrdlock ();
-}
-
-extern "C" int
-pthread_rwlock_wrlock (pthread_rwlock_t *rwlock)
-{
- pthread_testcancel ();
-
- if (pthread_rwlock::is_good_initializer (rwlock))
- pthread_rwlock::init (rwlock, NULL);
- if (!pthread_rwlock::is_good_object (rwlock))
- return EINVAL;
-
- return (*rwlock)->wrlock ();
-}
-
-extern "C" int
-pthread_rwlock_trywrlock (pthread_rwlock_t *rwlock)
-{
- if (pthread_rwlock::is_good_initializer (rwlock))
- pthread_rwlock::init (rwlock, NULL);
- if (!pthread_rwlock::is_good_object (rwlock))
- return EINVAL;
-
- return (*rwlock)->trywrlock ();
-}
-
-extern "C" int
-pthread_rwlock_unlock (pthread_rwlock_t *rwlock)
-{
- if (pthread_rwlock::is_good_initializer (rwlock))
- return 0;
- if (!pthread_rwlock::is_good_object (rwlock))
- return EINVAL;
-
- return (*rwlock)->unlock ();
-}
-
-extern "C" int
-pthread_rwlockattr_init (pthread_rwlockattr_t *rwlockattr)
-{
- if (pthread_rwlockattr::is_good_object (rwlockattr))
- return EBUSY;
-
- *rwlockattr = new pthread_rwlockattr;
- if (!pthread_rwlockattr::is_good_object (rwlockattr))
- {
- delete (*rwlockattr);
- *rwlockattr = NULL;
- return ENOMEM;
- }
- return 0;
-}
-
-extern "C" int
-pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *attr, int *pshared)
-{
- if (!pthread_rwlockattr::is_good_object (attr))
- return EINVAL;
- *pshared = (*attr)->shared;
- return 0;
-}
-
-extern "C" int
-pthread_rwlockattr_setpshared (pthread_rwlockattr_t *attr, int pshared)
-{
- if (!pthread_rwlockattr::is_good_object (attr))
- return EINVAL;
- if ((pshared < 0) || (pshared > 1))
- return EINVAL;
- /* shared rwlock vars not currently supported */
- if (pshared != PTHREAD_PROCESS_PRIVATE)
- return EINVAL;
- (*attr)->shared = pshared;
- return 0;
-}
-
-extern "C" int
-pthread_rwlockattr_destroy (pthread_rwlockattr_t *rwlockattr)
-{
- if (!pthread_rwlockattr::is_good_object (rwlockattr))
- return EINVAL;
- delete (*rwlockattr);
- *rwlockattr = NULL;
- return 0;
-}
-
-/* Thread signal */
-extern "C" int
-pthread_kill (pthread_t thread, int sig)
-{
- // lock myself, for the use of thread2signal
- // two different kills might clash: FIXME
-
- if (!pthread::is_good_object (&thread))
- return EINVAL;
-
- siginfo_t si = {0};
- si.si_signo = sig;
- si.si_code = SI_USER;
- si.si_pid = myself->pid;
- si.si_uid = myself->uid;
- int rval;
- if (!thread->valid)
- rval = ESRCH;
- else if (sig)
- {
- thread->cygtls->set_threadkill ();
- rval = sig_send (NULL, si, thread->cygtls);
- }
- else
- switch (WaitForSingleObject (thread->win32_obj_id, 0))
- {
- case WAIT_TIMEOUT:
- rval = 0;
- break;
- default:
- rval = ESRCH;
- break;
- }
-
- // unlock myself
- return rval;
-}
-
-extern "C" int
-pthread_sigmask (int operation, const sigset_t *set, sigset_t *old_set)
-{
- return handle_sigprocmask (operation, set, old_set, _my_tls.sigmask);
-}
-
-/* ID */
-
-extern "C" int
-pthread_equal (pthread_t t1, pthread_t t2)
-{
- return pthread::equal (t1, t2);
-}
-
-/* Mutexes */
-
-int
-pthread_mutex::init (pthread_mutex_t *mutex,
- const pthread_mutexattr_t *attr,
- const pthread_mutex_t initializer)
-{
- pthread_mutex_t new_mutex;
-
- if (attr && !pthread_mutexattr::is_good_object (attr))
- return EINVAL;
-
- mutex_initialization_lock.lock ();
-
- new_mutex = new pthread_mutex (attr ? (*attr) : NULL);
- if (!is_good_object (&new_mutex))
- {
- delete new_mutex;
- mutex_initialization_lock.unlock ();
- return EAGAIN;
- }
-
- if (!attr && initializer)
- {
- if (initializer == PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
- new_mutex->type = PTHREAD_MUTEX_RECURSIVE;
- else if (initializer == PTHREAD_NORMAL_MUTEX_INITIALIZER_NP)
- new_mutex->type = PTHREAD_MUTEX_NORMAL;
- else if (initializer == PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP)
- new_mutex->type = PTHREAD_MUTEX_ERRORCHECK;
- }
-
- myfault efault;
- if (efault.faulted ())
- {
- delete new_mutex;
- mutex_initialization_lock.unlock ();
- return EINVAL;
- }
-
- *mutex = new_mutex;
- mutex_initialization_lock.unlock ();
-
- return 0;
-}
-
-extern "C" int
-pthread_mutex_getprioceiling (const pthread_mutex_t *mutex,
- int *prioceiling)
-{
- /* We don't define _POSIX_THREAD_PRIO_PROTECT because we do't currently support
- mutex priorities.
-
- We can support mutex priorities in the future though:
- Store a priority with each mutex.
- When the mutex is optained, set the thread priority as appropriate
- When the mutex is released, reset the thread priority. */
- return ENOSYS;
-}
-
-extern "C" int
-pthread_mutex_lock (pthread_mutex_t *mutex)
-{
- if (pthread_mutex::is_good_initializer (mutex))
- pthread_mutex::init (mutex, NULL, *mutex);
- if (!pthread_mutex::is_good_object (mutex))
- return EINVAL;
- return (*mutex)->lock ();
-}
-
-extern "C" int
-pthread_mutex_trylock (pthread_mutex_t *mutex)
-{
- if (pthread_mutex::is_good_initializer (mutex))
- pthread_mutex::init (mutex, NULL, *mutex);
- if (!pthread_mutex::is_good_object (mutex))
- return EINVAL;
- return (*mutex)->trylock ();
-}
-
-extern "C" int
-pthread_mutex_unlock (pthread_mutex_t *mutex)
-{
- if (pthread_mutex::is_good_initializer (mutex))
- return EPERM;
- if (!pthread_mutex::is_good_object (mutex))
- return EINVAL;
- return (*mutex)->unlock ();
-}
-
-extern "C" int
-pthread_mutex_destroy (pthread_mutex_t *mutex)
-{
- int rv;
-
- if (pthread_mutex::is_good_initializer (mutex))
- return 0;
- if (!pthread_mutex::is_good_object (mutex))
- return EINVAL;
-
- rv = (*mutex)->destroy ();
- if (rv)
- return rv;
-
- *mutex = NULL;
- return 0;
-}
-
-extern "C" int
-pthread_mutex_setprioceiling (pthread_mutex_t *mutex, int prioceiling,
- int *old_ceiling)
-{
- return ENOSYS;
-}
-
-/* Win32 doesn't support mutex priorities - see __pthread_mutex_getprioceiling
- for more detail */
-extern "C" int
-pthread_mutexattr_getprotocol (const pthread_mutexattr_t *attr,
- int *protocol)
-{
- if (!pthread_mutexattr::is_good_object (attr))
- return EINVAL;
- return ENOSYS;
-}
-
-extern "C" int
-pthread_mutexattr_getpshared (const pthread_mutexattr_t *attr,
- int *pshared)
-{
- if (!pthread_mutexattr::is_good_object (attr))
- return EINVAL;
- *pshared = (*attr)->pshared;
- return 0;
-}
-
-extern "C" int
-pthread_mutexattr_gettype (const pthread_mutexattr_t *attr, int *type)
-{
- if (!pthread_mutexattr::is_good_object (attr))
- return EINVAL;
- *type = (*attr)->mutextype;
- return 0;
-}
-
-/* FIXME: write and test process shared mutex's. */
-extern "C" int
-pthread_mutexattr_init (pthread_mutexattr_t *attr)
-{
- if (pthread_mutexattr::is_good_object (attr))
- return EBUSY;
-
- *attr = new pthread_mutexattr ();
- if (!pthread_mutexattr::is_good_object (attr))
- {
- delete (*attr);
- *attr = NULL;
- return ENOMEM;
- }
- return 0;
-}
-
-extern "C" int
-pthread_mutexattr_destroy (pthread_mutexattr_t *attr)
-{
- if (!pthread_mutexattr::is_good_object (attr))
- return EINVAL;
- delete (*attr);
- *attr = NULL;
- return 0;
-}
-
-
-/* Win32 doesn't support mutex priorities */
-extern "C" int
-pthread_mutexattr_setprotocol (pthread_mutexattr_t *attr, int protocol)
-{
- if (!pthread_mutexattr::is_good_object (attr))
- return EINVAL;
- return ENOSYS;
-}
-
-/* Win32 doesn't support mutex priorities */
-extern "C" int
-pthread_mutexattr_setprioceiling (pthread_mutexattr_t *attr,
- int prioceiling)
-{
- if (!pthread_mutexattr::is_good_object (attr))
- return EINVAL;
- return ENOSYS;
-}
-
-extern "C" int
-pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *attr,
- int *prioceiling)
-{
- if (!pthread_mutexattr::is_good_object (attr))
- return EINVAL;
- return ENOSYS;
-}
-
-extern "C" int
-pthread_mutexattr_setpshared (pthread_mutexattr_t *attr, int pshared)
-{
- if (!pthread_mutexattr::is_good_object (attr))
- return EINVAL;
- /* we don't use pshared for anything as yet. We need to test PROCESS_SHARED
- *functionality
- */
- if (pshared != PTHREAD_PROCESS_PRIVATE)
- return EINVAL;
- (*attr)->pshared = pshared;
- return 0;
-}
-
-/* see pthread_mutex_gettype */
-extern "C" int
-pthread_mutexattr_settype (pthread_mutexattr_t *attr, int type)
-{
- if (!pthread_mutexattr::is_good_object (attr))
- return EINVAL;
-
- switch (type)
- {
- case PTHREAD_MUTEX_ERRORCHECK:
- case PTHREAD_MUTEX_RECURSIVE:
- case PTHREAD_MUTEX_NORMAL:
- (*attr)->mutextype = type;
- break;
- default:
- return EINVAL;
- }
-
- return 0;
-}
-
-/* Semaphores */
-
-List<semaphore> semaphore::semaphores;
-
-semaphore::semaphore (int pshared, unsigned int value)
-: verifyable_object (SEM_MAGIC),
- shared (pshared),
- currentvalue (value),
- fd (-1),
- hash (0ULL),
- sem (NULL)
-{
- SECURITY_ATTRIBUTES sa = (pshared != PTHREAD_PROCESS_PRIVATE)
- ? sec_all : sec_none_nih;
- this->win32_obj_id = ::CreateSemaphore (&sa, value, LONG_MAX, NULL);
- if (!this->win32_obj_id)
- magic = 0;
-
- semaphores.insert (this);
-}
-
-semaphore::semaphore (unsigned long long shash, LUID sluid, int sfd,
- sem_t *ssem, int oflag, mode_t mode, unsigned int value)
-: verifyable_object (SEM_MAGIC),
- shared (PTHREAD_PROCESS_SHARED),
- currentvalue (value), /* Unused for named semaphores. */
- fd (sfd),
- hash (shash),
- luid (sluid),
- sem (ssem)
-{
- char name[MAX_PATH];
-
- __small_sprintf (name, "semaphore/%016X%08x%08x",
- hash, luid.HighPart, luid.LowPart);
- this->win32_obj_id = ::CreateSemaphore (&sec_all, value, LONG_MAX, name);
- if (!this->win32_obj_id)
- magic = 0;
- if (GetLastError () == ERROR_ALREADY_EXISTS && (oflag & O_EXCL))
- {
- __seterrno ();
- CloseHandle (this->win32_obj_id);
- magic = 0;
- }
-
- semaphores.insert (this);
-}
-
-semaphore::~semaphore ()
-{
- if (win32_obj_id)
- CloseHandle (win32_obj_id);
-
- semaphores.remove (this);
-}
-
-void
-semaphore::_post ()
-{
- if (ReleaseSemaphore (win32_obj_id, 1, &currentvalue))
- currentvalue++;
-}
-
-int
-semaphore::_getvalue (int *sval)
-{
- long val;
-
- switch (WaitForSingleObject (win32_obj_id, 0))
- {
- case WAIT_OBJECT_0:
- ReleaseSemaphore (win32_obj_id, 1, &val);
- *sval = val + 1;
- break;
- case WAIT_TIMEOUT:
- *sval = 0;
- break;
- default:
- set_errno (EAGAIN);
- return -1;
- }
- return 0;
-}
-
-int
-semaphore::_trywait ()
-{
- /* FIXME: signals should be able to interrupt semaphores...
- We probably need WaitForMultipleObjects here. */
- if (WaitForSingleObject (win32_obj_id, 0) == WAIT_TIMEOUT)
- {
- set_errno (EAGAIN);
- return -1;
- }
- currentvalue--;
- return 0;
-}
-
-int
-semaphore::_timedwait (const struct timespec *abstime)
-{
- struct timeval tv;
- long waitlength;
-
- myfault efault;
- if (efault.faulted ())
- {
- /* According to SUSv3, abstime need not be checked for validity,
- if the semaphore can be locked immediately. */
- if (!_trywait ())
- return 0;
- set_errno (EINVAL);
- return -1;
- }
-
- gettimeofday (&tv, NULL);
- waitlength = abstime->tv_sec * 1000 + abstime->tv_nsec / (1000 * 1000);
- waitlength -= tv.tv_sec * 1000 + tv.tv_usec / 1000;
- if (waitlength < 0)
- waitlength = 0;
- switch (cancelable_wait (win32_obj_id, waitlength, cw_cancel_self, cw_sig_eintr))
- {
- case WAIT_OBJECT_0:
- currentvalue--;
- break;
- case WAIT_SIGNALED:
- set_errno (EINTR);
- return -1;
- case WAIT_TIMEOUT:
- set_errno (ETIMEDOUT);
- return -1;
- default:
- debug_printf ("cancelable_wait failed. %E");
- __seterrno ();
- return -1;
- }
- return 0;
-}
-
-int
-semaphore::_wait ()
-{
- switch (cancelable_wait (win32_obj_id, INFINITE, cw_cancel_self, cw_sig_eintr))
- {
- case WAIT_OBJECT_0:
- currentvalue--;
- break;
- case WAIT_SIGNALED:
- set_errno (EINTR);
- return -1;
- default:
- debug_printf ("cancelable_wait failed. %E");
- break;
- }
- return 0;
-}
-
-void
-semaphore::_fixup_after_fork ()
-{
- if (shared == PTHREAD_PROCESS_PRIVATE)
- {
- debug_printf ("sem %x in _fixup_after_fork", this);
- /* FIXME: duplicate code here and in the constructor. */
- this->win32_obj_id = ::CreateSemaphore (&sec_none_nih, currentvalue,
- LONG_MAX, NULL);
- if (!win32_obj_id)
- api_fatal ("failed to create new win32 semaphore, error %d");
- }
-}
-
-void
-semaphore::_terminate ()
-{
- int _sem_close (sem_t *, bool);
-
- if (sem)
- _sem_close (sem, false);
-}
-
-/* static members */
-
-int
-semaphore::init (sem_t *sem, int pshared, unsigned int value)
-{
- /* opengroup calls this undefined */
- if (is_good_object (sem))
- return EBUSY;
-
- if (value > SEM_VALUE_MAX)
- return EINVAL;
-
- *sem = new semaphore (pshared, value);
-
- if (!is_good_object (sem))
- {
- delete (*sem);
- *sem = NULL;
- return EAGAIN;
- }
- return 0;
-}
-
-int
-semaphore::destroy (sem_t *sem)
-{
- if (!is_good_object (sem))
- return EINVAL;
-
- /* It's invalid to destroy a semaphore not opened with sem_init. */
- if ((*sem)->fd != -1)
- return EINVAL;
-
- /* FIXME - new feature - test for busy against threads... */
-
- delete (*sem);
- *sem = NULL;
- return 0;
-}
-
-int
-semaphore::close (sem_t *sem)
-{
- if (!is_good_object (sem))
- return EINVAL;
-
- /* It's invalid to close a semaphore not opened with sem_open. */
- if ((*sem)->fd == -1)
- return EINVAL;
-
- delete (*sem);
- delete sem;
- return 0;
-}
-
-sem_t *
-semaphore::open (unsigned long long hash, LUID luid, int fd, int oflag,
- mode_t mode, unsigned int value, bool &wasopen)
-{
- if (value > SEM_VALUE_MAX)
- {
- set_errno (EINVAL);
- return NULL;
- }
-
- /* sem_open is supposed to return the same pointer, if the same named
- semaphore is opened multiple times in the same process, as long as
- the semaphore hasn't been closed or unlinked in the meantime. */
- semaphores.mx.lock ();
- for (semaphore *sema = semaphores.head; sema; sema = sema->next)
- if (sema->fd >= 0 && sema->hash == hash
- && sema->luid.HighPart == luid.HighPart
- && sema->luid.LowPart == sema->luid.LowPart)
- {
- wasopen = true;
- semaphores.mx.unlock ();
- return sema->sem;
- }
- semaphores.mx.unlock ();
-
- wasopen = false;
- sem_t *sem = new sem_t;
- if (!sem)
- {
- set_errno (ENOMEM);
- return NULL;
- }
-
- *sem = new semaphore (hash, luid, fd, sem, oflag, mode, value);
-
- if (!is_good_object (sem))
- {
- delete *sem;
- delete sem;
- return NULL;
- }
- return sem;
-}
-
-int
-semaphore::wait (sem_t *sem)
-{
- pthread_testcancel ();
-
- if (!is_good_object (sem))
- {
- set_errno (EINVAL);
- return -1;
- }
-
- return (*sem)->_wait ();
-}
-
-int
-semaphore::trywait (sem_t *sem)
-{
- if (!is_good_object (sem))
- {
- set_errno (EINVAL);
- return -1;
- }
-
- return (*sem)->_trywait ();
-}
-
-int
-semaphore::timedwait (sem_t *sem, const struct timespec *abstime)
-{
- if (!is_good_object (sem))
- {
- set_errno (EINVAL);
- return -1;
- }
-
- return (*sem)->_timedwait (abstime);
-}
-
-int
-semaphore::post (sem_t *sem)
-{
- if (!is_good_object (sem))
- {
- set_errno (EINVAL);
- return -1;
- }
-
- (*sem)->_post ();
- return 0;
-}
-
-int
-semaphore::getvalue (sem_t *sem, int *sval)
-{
- myfault efault;
- if (efault.faulted () || !is_good_object (sem))
- {
- set_errno (EINVAL);
- return -1;
- }
-
- return (*sem)->_getvalue (sval);
-}
-
-int
-semaphore::getinternal (sem_t *sem, int *sfd, unsigned long long *shash,
- LUID *sluid, unsigned int *sval)
-{
- myfault efault;
- if (efault.faulted () || !is_good_object (sem))
- {
- set_errno (EINVAL);
- return -1;
- }
- if ((*sfd = (*sem)->fd) < 0)
- {
- set_errno (EINVAL);
- return -1;
- }
- *shash = (*sem)->hash;
- *sluid = (*sem)->luid;
- /* POSIX defines the value in calls to sem_init/sem_open as unsigned, but
- the sem_getvalue gets a pointer to int to return the value. Go figure! */
- return (*sem)->_getvalue ((int *)sval);
-}
-
-/* pthread_null */
-pthread *
-pthread_null::get_null_pthread ()
-{
- /* because of weird entry points */
- _instance.magic = 0;
- return &_instance;
-}
-
-pthread_null::pthread_null ()
-{
- attr.joinable = PTHREAD_CREATE_DETACHED;
- /* Mark ourselves as invalid */
- magic = 0;
-}
-
-pthread_null::~pthread_null ()
-{
-}
-
-bool
-pthread_null::create (void *(*)(void *), pthread_attr *, void *)
-{
- return true;
-}
-
-void
-pthread_null::exit (void *value_ptr)
-{
- _my_tls.remove (INFINITE);
- ExitThread (0);
-}
-
-int
-pthread_null::cancel ()
-{
- return 0;
-}
-
-void
-pthread_null::testcancel ()
-{
-}
-
-int
-pthread_null::setcancelstate (int state, int *oldstate)
-{
- return EINVAL;
-}
-
-int
-pthread_null::setcanceltype (int type, int *oldtype)
-{
- return EINVAL;
-}
-
-void
-pthread_null::push_cleanup_handler (__pthread_cleanup_handler *handler)
-{
-}
-
-void
-pthread_null::pop_cleanup_handler (int const execute)
-{
-}
-
-unsigned long
-pthread_null::getsequence_np ()
-{
- return 0;
-}
-
-pthread_null pthread_null::_instance;
diff --git a/winsup/cygwin/thread.h b/winsup/cygwin/thread.h
deleted file mode 100644
index 3f6de8f..0000000
--- a/winsup/cygwin/thread.h
+++ /dev/null
@@ -1,705 +0,0 @@
-/* thread.h: Locking and threading module definitions
-
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007,
- 2008 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 _THREAD_H
-#define _THREAD_H
-
-#define LOCK_MMAP_LIST 1
-
-#define WRITE_LOCK 1
-#define READ_LOCK 2
-
-#include <pthread.h>
-#include <limits.h>
-#include <security.h>
-#include <errno.h>
-
-enum cw_sig_wait
-{
- cw_sig_nosig,
- cw_sig_eintr,
- cw_sig_resume
-};
-
-enum cw_cancel_action
-{
- cw_cancel_self,
- cw_no_cancel_self,
- cw_no_cancel
-};
-
-DWORD cancelable_wait (HANDLE, DWORD, const cw_cancel_action = cw_cancel_self,
- const enum cw_sig_wait = cw_sig_nosig)
- __attribute__ ((regparm (3)));
-
-class fast_mutex
-{
-public:
- fast_mutex () :
- lock_counter (0), win32_obj_id (0)
- {
- }
-
- ~fast_mutex ()
- {
- if(win32_obj_id)
- CloseHandle (win32_obj_id);
- }
-
- bool init ()
- {
- lock_counter = 0;
- win32_obj_id = ::CreateSemaphore (&sec_none_nih, 0, LONG_MAX, NULL);
- if (!win32_obj_id)
- {
- debug_printf ("CreateSemaphore failed. %E");
- return false;
- }
- return true;
- }
-
- void lock ()
- {
- if (InterlockedIncrement ((long *) &lock_counter) != 1)
- cancelable_wait (win32_obj_id, INFINITE, cw_no_cancel, cw_sig_resume);
- }
-
- void unlock ()
- {
- if (InterlockedDecrement ((long *) &lock_counter))
- ::ReleaseSemaphore (win32_obj_id, 1, NULL);
- }
-
-private:
- unsigned long lock_counter;
- HANDLE win32_obj_id;
-};
-
-class per_process;
-class pinfo;
-
-#define PTHREAD_MAGIC 0xdf0df045
-#define PTHREAD_MUTEX_MAGIC PTHREAD_MAGIC+1
-#define PTHREAD_KEY_MAGIC PTHREAD_MAGIC+2
-#define PTHREAD_ATTR_MAGIC PTHREAD_MAGIC+3
-#define PTHREAD_MUTEXATTR_MAGIC PTHREAD_MAGIC+4
-#define PTHREAD_COND_MAGIC PTHREAD_MAGIC+5
-#define PTHREAD_CONDATTR_MAGIC PTHREAD_MAGIC+6
-#define SEM_MAGIC PTHREAD_MAGIC+7
-#define PTHREAD_ONCE_MAGIC PTHREAD_MAGIC+8
-#define PTHREAD_RWLOCK_MAGIC PTHREAD_MAGIC+9
-#define PTHREAD_RWLOCKATTR_MAGIC PTHREAD_MAGIC+10
-
-#define MUTEX_OWNER_ANONYMOUS ((pthread_t) -1)
-
-/* verifyable_object should not be defined here - it's a general purpose class */
-
-class verifyable_object
-{
-public:
- long magic;
-
- verifyable_object (long);
- virtual ~verifyable_object ();
-};
-
-typedef enum
-{
- VALID_OBJECT,
- INVALID_OBJECT,
- VALID_STATIC_OBJECT
-} verifyable_object_state;
-
-template <class list_node> inline void
-List_insert (list_node *&head, list_node *node)
-{
- if (!node)
- return;
- do
- node->next = head;
- while (InterlockedCompareExchangePointer (&head, node, node->next) != node->next);
-}
-
-template <class list_node> inline void
-List_remove (fast_mutex &mx, list_node *&head, list_node const *node)
-{
- if (!node)
- return;
- mx.lock ();
- if (head)
- {
- if (InterlockedCompareExchangePointer (&head, node->next, node) != node)
- {
- list_node *cur = head;
-
- while (cur->next && node != cur->next)
- cur = cur->next;
- if (node == cur->next)
- cur->next = cur->next->next;
- }
- }
- mx.unlock ();
-}
-
-
-template <class list_node> class List
-{
- public:
- List() : head(NULL)
- {
- mx_init ();
- }
-
- ~List()
- {
- }
-
- void fixup_after_fork ()
- {
- mx_init ();
- }
-
- void insert (list_node *node)
- {
- List_insert (head, node);
- }
-
- void remove (list_node *node)
- {
- List_remove (mx, head, node);
- }
-
- void for_each (void (list_node::*callback) ())
- {
- mx.lock ();
- list_node *cur = head;
- while (cur)
- {
- (cur->*callback) ();
- cur = cur->next;
- }
- mx.unlock ();
- }
-
- fast_mutex mx;
- list_node *head;
-
-protected:
- void mx_init ()
- {
- if (!mx.init ())
- api_fatal ("Could not create mutex for list synchronisation.");
- }
-};
-
-class pthread_key: public verifyable_object
-{
- DWORD tls_index;
-public:
- static bool is_good_object (pthread_key_t const *);
-
- int set (const void *value) {TlsSetValue (tls_index, (void *) value); return 0;}
- void *get () const {return TlsGetValue (tls_index);}
-
- pthread_key (void (*)(void *));
- ~pthread_key ();
- static void fixup_before_fork ()
- {
- keys.for_each (&pthread_key::_fixup_before_fork);
- }
-
- static void fixup_after_fork ()
- {
- keys.fixup_after_fork ();
- keys.for_each (&pthread_key::_fixup_after_fork);
- }
-
- static void run_all_destructors ()
- {
- keys.for_each (&pthread_key::run_destructor);
- }
-
- /* List support calls */
- class pthread_key *next;
-private:
- static List<pthread_key> keys;
- void _fixup_before_fork ();
- void _fixup_after_fork ();
- void (*destructor) (void *);
- void run_destructor ();
- void *fork_buf;
-};
-
-class pthread_attr: public verifyable_object
-{
-public:
- static bool is_good_object(pthread_attr_t const *);
- int joinable;
- int contentionscope;
- int inheritsched;
- struct sched_param schedparam;
- size_t stacksize;
-
- pthread_attr ();
- ~pthread_attr ();
-};
-
-class pthread_mutexattr: public verifyable_object
-{
-public:
- static bool is_good_object(pthread_mutexattr_t const *);
- int pshared;
- int mutextype;
- pthread_mutexattr ();
- ~pthread_mutexattr ();
-};
-
-class pthread_mutex: public verifyable_object
-{
-public:
- static bool is_good_object (pthread_mutex_t const *);
- static bool is_good_initializer (pthread_mutex_t const *);
- static bool is_good_initializer_or_object (pthread_mutex_t const *);
- static bool is_good_initializer_or_bad_object (pthread_mutex_t const *mutex);
- static bool can_be_unlocked (pthread_mutex_t const *mutex);
- static void init_mutex ();
- static int init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr,
- const pthread_mutex_t initializer = NULL);
-
- unsigned long lock_counter;
- HANDLE win32_obj_id;
- unsigned int recursion_counter;
- LONG condwaits;
- pthread_t owner;
-#ifdef DEBUGGING
- DWORD tid; /* the thread id of the owner */
-#endif
- int type;
- int pshared;
-
- pthread_t get_pthread_self () const
- {
- return PTHREAD_MUTEX_NORMAL == type ? MUTEX_OWNER_ANONYMOUS :
- ::pthread_self ();
- }
-
- int lock ()
- {
- return _lock (get_pthread_self ());
- }
- int trylock ()
- {
- return _trylock (get_pthread_self ());
- }
- int unlock ()
- {
- return _unlock (get_pthread_self ());
- }
- int destroy ()
- {
- return _destroy (get_pthread_self ());
- }
-
- void set_owner (pthread_t self)
- {
- recursion_counter = 1;
- owner = self;
-#ifdef DEBUGGING
- tid = GetCurrentThreadId ();
-#endif
- }
-
- int lock_recursive ()
- {
- if (UINT_MAX == recursion_counter)
- return EAGAIN;
- ++recursion_counter;
- return 0;
- }
-
- pthread_mutex (pthread_mutexattr * = NULL);
- pthread_mutex (pthread_mutex_t *, pthread_mutexattr *);
- ~pthread_mutex ();
-
- class pthread_mutex * next;
- static void fixup_after_fork ()
- {
- mutexes.fixup_after_fork ();
- mutexes.for_each (&pthread_mutex::_fixup_after_fork);
- }
-
-private:
- int _lock (pthread_t self);
- int _trylock (pthread_t self);
- int _unlock (pthread_t self);
- int _destroy (pthread_t self);
-
- void _fixup_after_fork ();
-
- static List<pthread_mutex> mutexes;
- static fast_mutex mutex_initialization_lock;
-};
-
-#define WAIT_CANCELED (WAIT_OBJECT_0 + 1)
-#define WAIT_SIGNALED (WAIT_OBJECT_0 + 2)
-
-class _cygtls;
-class pthread: public verifyable_object
-{
-public:
- HANDLE win32_obj_id;
- class pthread_attr attr;
- void *(*function) (void *);
- void *arg;
- void *return_ptr;
- bool valid;
- bool suspended;
- int cancelstate, canceltype;
- _cygtls *cygtls;
- HANDLE cancel_event;
- pthread_t joiner;
-
- virtual bool create (void *(*)(void *), pthread_attr *, void *);
-
- pthread ();
- virtual ~pthread ();
-
- static void init_mainthread ();
- static bool is_good_object(pthread_t const *);
- static void atforkprepare();
- static void atforkparent();
- static void atforkchild();
-
- /* API calls */
- static int cancel (pthread_t);
- static int join (pthread_t * thread, void **return_val);
- static int detach (pthread_t * thread);
- static int create (pthread_t * thread, const pthread_attr_t * attr,
- void *(*start_routine) (void *), void *arg);
- static int once (pthread_once_t *, void (*)(void));
- static int atfork(void (*)(void), void (*)(void), void (*)(void));
- static int suspend (pthread_t * thread);
- static int resume (pthread_t * thread);
-
- virtual void exit (void *value_ptr) __attribute__ ((noreturn));
-
- virtual int cancel ();
-
- virtual void testcancel ();
- static void static_cancel_self ();
-
- virtual int setcancelstate (int state, int *oldstate);
- virtual int setcanceltype (int type, int *oldtype);
-
- virtual void push_cleanup_handler (__pthread_cleanup_handler *handler);
- virtual void pop_cleanup_handler (int const execute);
-
- static pthread* self ();
- static DWORD WINAPI thread_init_wrapper (void *);
-
- virtual unsigned long getsequence_np();
-
- static int equal (pthread_t t1, pthread_t t2)
- {
- return t1 == t2;
- }
-
- /* List support calls */
- class pthread *next;
- static void fixup_after_fork ()
- {
- threads.fixup_after_fork ();
- threads.for_each (&pthread::_fixup_after_fork);
- }
-
- static void suspend_all_except_self ()
- {
- threads.for_each (&pthread::suspend_except_self);
- }
-
- static void resume_all ()
- {
- threads.for_each (&pthread::resume);
- }
-
-private:
- static List<pthread> threads;
- DWORD thread_id;
- __pthread_cleanup_handler *cleanup_stack;
- pthread_mutex mutex;
- _cygtls *parent_tls;
-
- void suspend_except_self ();
- void resume ();
-
- void _fixup_after_fork ();
-
- void pop_all_cleanup_handlers ();
- void precreate (pthread_attr *);
- void postcreate ();
- bool create_cancel_event ();
- static pthread *get_tls_self_pointer ();
- static void set_tls_self_pointer (pthread *);
- void cancel_self ();
- DWORD get_thread_id ();
-};
-
-class pthread_null : public pthread
-{
- public:
- static pthread *get_null_pthread();
- ~pthread_null();
-
- /* From pthread These should never get called
- * as the ojbect is not verifyable
- */
- bool create (void *(*)(void *), pthread_attr *, void *);
- void exit (void *value_ptr) __attribute__ ((noreturn));
- int cancel ();
- void testcancel ();
- int setcancelstate (int state, int *oldstate);
- int setcanceltype (int type, int *oldtype);
- void push_cleanup_handler (__pthread_cleanup_handler *handler);
- void pop_cleanup_handler (int const execute);
- unsigned long getsequence_np();
-
- private:
- pthread_null ();
- static pthread_null _instance;
-};
-
-class pthread_condattr: public verifyable_object
-{
-public:
- static bool is_good_object(pthread_condattr_t const *);
- int shared;
-
- pthread_condattr ();
- ~pthread_condattr ();
-};
-
-class pthread_cond: public verifyable_object
-{
-public:
- static bool is_good_object (pthread_cond_t const *);
- static bool is_good_initializer (pthread_cond_t const *);
- static bool is_good_initializer_or_object (pthread_cond_t const *);
- static bool is_good_initializer_or_bad_object (pthread_cond_t const *);
- static void init_mutex ();
- static int init (pthread_cond_t *, const pthread_condattr_t *);
-
- int shared;
-
- unsigned long waiting;
- unsigned long pending;
- HANDLE sem_wait;
-
- pthread_mutex mtx_in;
- pthread_mutex mtx_out;
-
- pthread_mutex_t mtx_cond;
-
- void unblock (const bool all);
- int wait (pthread_mutex_t mutex, DWORD dwMilliseconds = INFINITE);
-
- pthread_cond (pthread_condattr *);
- ~pthread_cond ();
-
- class pthread_cond * next;
- static void fixup_after_fork ()
- {
- conds.fixup_after_fork ();
- conds.for_each (&pthread_cond::_fixup_after_fork);
- }
-
-private:
- void _fixup_after_fork ();
-
- static List<pthread_cond> conds;
- static fast_mutex cond_initialization_lock;
-};
-
-class pthread_rwlockattr: public verifyable_object
-{
-public:
- static bool is_good_object(pthread_rwlockattr_t const *);
- int shared;
-
- pthread_rwlockattr ();
- ~pthread_rwlockattr ();
-};
-
-class pthread_rwlock: public verifyable_object
-{
-public:
- static bool is_good_object (pthread_rwlock_t const *);
- static bool is_good_initializer (pthread_rwlock_t const *);
- static bool is_good_initializer_or_object (pthread_rwlock_t const *);
- static bool is_good_initializer_or_bad_object (pthread_rwlock_t const *);
- static void init_mutex ();
- static int init (pthread_rwlock_t *, const pthread_rwlockattr_t *);
-
- int shared;
-
- unsigned long waiting_readers;
- unsigned long waiting_writers;
- pthread_t writer;
- struct RWLOCK_READER
- {
- struct RWLOCK_READER *next;
- pthread_t thread;
- } *readers;
- fast_mutex readers_mx;
-
- int rdlock ();
- int tryrdlock ();
-
- int wrlock ();
- int trywrlock ();
-
- int unlock ();
-
- pthread_mutex mtx;
- pthread_cond cond_readers;
- pthread_cond cond_writers;
-
- pthread_rwlock (pthread_rwlockattr *);
- ~pthread_rwlock ();
-
- class pthread_rwlock * next;
- static void fixup_after_fork ()
- {
- rwlocks.fixup_after_fork ();
- rwlocks.for_each (&pthread_rwlock::_fixup_after_fork);
- }
-
-private:
- static List<pthread_rwlock> rwlocks;
-
- void add_reader (struct RWLOCK_READER *rd);
- void remove_reader (struct RWLOCK_READER *rd);
- struct RWLOCK_READER *lookup_reader (pthread_t thread);
-
- void release ()
- {
- if (waiting_writers)
- {
- if (!readers)
- cond_writers.unblock (false);
- }
- else if (waiting_readers)
- cond_readers.unblock (true);
- }
-
-
- static void rdlock_cleanup (void *arg);
- static void wrlock_cleanup (void *arg);
-
- void _fixup_after_fork ();
-
- static fast_mutex rwlock_initialization_lock;
-};
-
-class pthread_once
-{
-public:
- pthread_mutex_t mutex;
- int state;
-};
-
-/* shouldn't be here */
-class semaphore: public verifyable_object
-{
-public:
- static bool is_good_object(sem_t const *);
- /* API calls */
- static int init (sem_t *sem, int pshared, unsigned int value);
- static int destroy (sem_t *sem);
- static sem_t *open (unsigned long long hash, LUID luid, int fd, int oflag,
- mode_t mode, unsigned int value, bool &wasopen);
- static int close (sem_t *sem);
- static int wait (sem_t *sem);
- static int post (sem_t *sem);
- static int getvalue (sem_t *sem, int *sval);
- static int trywait (sem_t *sem);
- static int timedwait (sem_t *sem, const struct timespec *abstime);
-
- static int getinternal (sem_t *sem, int *sfd, unsigned long long *shash,
- LUID *sluid, unsigned int *sval);
-
- HANDLE win32_obj_id;
- int shared;
- long currentvalue;
- int fd;
- unsigned long long hash;
- LUID luid;
- sem_t *sem;
-
- semaphore (int, unsigned int);
- semaphore (unsigned long long, LUID, int, sem_t *, int, mode_t, unsigned int);
- ~semaphore ();
-
- class semaphore * next;
- static void fixup_after_fork ()
- {
- semaphores.fixup_after_fork ();
- semaphores.for_each (&semaphore::_fixup_after_fork);
- }
- static void terminate ()
- {
- semaphores.for_each (&semaphore::_terminate);
- }
-
-private:
- int _wait ();
- void _post ();
- int _getvalue (int *sval);
- int _trywait ();
- int _timedwait (const struct timespec *abstime);
-
- void _fixup_after_fork ();
- void _terminate ();
-
- static List<semaphore> semaphores;
-};
-
-class callback
-{
-public:
- void (*cb)(void);
- class callback * next;
-};
-
-struct MTinterface
-{
- // General
- int concurrency;
- long int threadcount;
-
- callback *pthread_prepare;
- callback *pthread_child;
- callback *pthread_parent;
-
- void Init ();
- void fixup_before_fork ();
- void fixup_after_fork ();
-
-#if 0 // avoid initialization since zero is implied and
- MTinterface () :
- concurrency (0), threadcount (0),
- pthread_prepare (NULL), pthread_child (NULL), pthread_parent (NULL)
- {
- }
-#endif
-};
-
-#define MT_INTERFACE user_data->threadinterface
-#endif // _THREAD_H
diff --git a/winsup/cygwin/timer.cc b/winsup/cygwin/timer.cc
deleted file mode 100644
index 9cf9584..0000000
--- a/winsup/cygwin/timer.cc
+++ /dev/null
@@ -1,456 +0,0 @@
-/* timer.cc
-
- Copyright 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. */
-
-#include "winsup.h"
-#include "thread.h"
-#include "cygtls.h"
-#include "sigproc.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-
-#define TT_MAGIC 0x513e4a1c
-struct timer_tracker
-{
- unsigned magic;
- clockid_t clock_id;
- sigevent evp;
- timespec it_interval;
- HANDLE hcancel;
- HANDLE syncthread;
- long long interval_us;
- long long sleepto_us;
- bool cancel ();
- struct timer_tracker *next;
- int settime (int, const itimerspec *, itimerspec *);
- void gettime (itimerspec *);
- timer_tracker (clockid_t, const sigevent *);
- ~timer_tracker ();
- friend void fixup_timers_after_fork ();
-};
-
-timer_tracker NO_COPY ttstart (CLOCK_REALTIME, NULL);
-
-class lock_timer_tracker
-{
- static muto protect;
-public:
- lock_timer_tracker ();
- ~lock_timer_tracker ();
-};
-
-muto NO_COPY lock_timer_tracker::protect;
-
-lock_timer_tracker::lock_timer_tracker ()
-{
- protect.init ("timer_protect")->acquire ();
-}
-
-lock_timer_tracker::~lock_timer_tracker ()
-{
- protect.release ();
-}
-
-bool
-timer_tracker::cancel ()
-{
- if (!hcancel)
- return false;
-
- SetEvent (hcancel);
- if (WaitForSingleObject (syncthread, INFINITE) != WAIT_OBJECT_0)
- api_fatal ("WFSO failed waiting for timer thread, %E");
- return true;
-}
-
-timer_tracker::~timer_tracker ()
-{
- if (cancel ())
- {
- CloseHandle (hcancel);
-#ifdef DEBUGGING
- hcancel = NULL;
-#endif
- }
- if (syncthread)
- CloseHandle (syncthread);
- magic = 0;
-}
-
-timer_tracker::timer_tracker (clockid_t c, const sigevent *e)
-{
- if (e != NULL)
- evp = *e;
- else
- {
- evp.sigev_notify = SIGEV_SIGNAL;
- evp.sigev_signo = SIGALRM;
- evp.sigev_value.sival_ptr = this;
- }
- clock_id = c;
- magic = TT_MAGIC;
- hcancel = NULL;
- if (this != &ttstart)
- {
- lock_timer_tracker here;
- next = ttstart.next;
- ttstart.next = this;
- }
-}
-
-static long long
-to_us (const timespec& ts)
-{
- long long res = ts.tv_sec;
- res *= 1000000;
- res += ts.tv_nsec / 1000 + ((ts.tv_nsec % 1000) ? 1 : 0);
- return res;
-}
-
-static DWORD WINAPI
-timer_thread (VOID *x)
-{
- timer_tracker *tt = ((timer_tracker *) x);
- long long now;
- long long sleepto_us = tt->sleepto_us;
- while (1)
- {
- long long sleep_us;
- long sleep_ms;
- /* Account for delays in starting thread
- and sending the signal */
- now = gtod.usecs ();
- sleep_us = sleepto_us - now;
- if (sleep_us > 0)
- {
- tt->sleepto_us = sleepto_us;
- sleep_ms = (sleep_us + 999) / 1000;
- }
- else
- {
- tt->sleepto_us = now;
- sleep_ms = 0;
- }
-
- debug_printf ("%p waiting for %u ms", x, sleep_ms);
- switch (WaitForSingleObject (tt->hcancel, sleep_ms))
- {
- case WAIT_TIMEOUT:
- debug_printf ("timed out");
- break;
- case WAIT_OBJECT_0:
- debug_printf ("%p cancelled", x);
- goto out;
- default:
- debug_printf ("%p wait failed, %E", x);
- goto out;
- }
-
- switch (tt->evp.sigev_notify)
- {
- case SIGEV_SIGNAL:
- {
- siginfo_t si = {0};
- si.si_signo = tt->evp.sigev_signo;
- si.si_sigval.sival_ptr = tt->evp.sigev_value.sival_ptr;
- si.si_code = SI_TIMER;
- debug_printf ("%p sending sig %d", x, tt->evp.sigev_signo);
- sig_send (myself_nowait, si);
- break;
- }
- case SIGEV_THREAD:
- {
- pthread_t notify_thread;
- debug_printf ("%p starting thread", x);
- pthread_attr_t *attr;
- pthread_attr_t default_attr;
- if (tt->evp.sigev_notify_attributes)
- attr = tt->evp.sigev_notify_attributes;
- else
- {
- pthread_attr_init(attr = &default_attr);
- pthread_attr_setdetachstate (attr, PTHREAD_CREATE_DETACHED);
- }
-
- int rc = pthread_create (&notify_thread, attr,
- (void * (*) (void *)) tt->evp.sigev_notify_function,
- tt->evp.sigev_value.sival_ptr);
- if (rc)
- {
- debug_printf ("thread creation failed, %E");
- return 0;
- }
- // FIXME: pthread_join?
- break;
- }
- }
- if (!tt->interval_us)
- break;
-
- sleepto_us = tt->sleepto_us + tt->interval_us;
- debug_printf ("looping");
- }
-
-out:
- _my_tls._ctinfo->auto_release (); /* automatically return the cygthread to the cygthread pool */
- return 0;
-}
-
-static bool
-it_bad (const timespec& t)
-{
- if (t.tv_nsec < 0 || t.tv_nsec >= 1000000000 || t.tv_sec < 0)
- {
- set_errno (EINVAL);
- return true;
- }
- return false;
-}
-
-int
-timer_tracker::settime (int in_flags, const itimerspec *value, itimerspec *ovalue)
-{
- if (!value)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- myfault efault;
- if (efault.faulted (EFAULT)
- || it_bad (value->it_value)
- || it_bad (value->it_interval))
- return -1;
-
- long long now = in_flags & TIMER_ABSTIME ? 0 : gtod.usecs ();
-
- lock_timer_tracker here;
- cancel ();
-
- if (ovalue)
- gettime (ovalue);
-
- if (!value->it_value.tv_sec && !value->it_value.tv_nsec)
- interval_us = sleepto_us = 0;
- else
- {
- sleepto_us = now + to_us (value->it_value);
- interval_us = to_us (value->it_interval);
- it_interval = value->it_interval;
- if (!hcancel)
- hcancel = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL);
- else
- ResetEvent (hcancel);
- if (!syncthread)
- syncthread = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL);
- else
- ResetEvent (syncthread);
- new cygthread (timer_thread, 0, this, "itimer", syncthread);
- }
-
- return 0;
-}
-
-void
-timer_tracker::gettime (itimerspec *ovalue)
-{
- if (!hcancel)
- memset (ovalue, 0, sizeof (*ovalue));
- else
- {
- ovalue->it_interval = it_interval;
- long long now = gtod.usecs ();
- long long left_us = sleepto_us - now;
- if (left_us < 0)
- left_us = 0;
- ovalue->it_value.tv_sec = left_us / 1000000;
- ovalue->it_value.tv_nsec = (left_us % 1000000) * 1000;
- }
-}
-
-extern "C" int
-timer_gettime (timer_t timerid, struct itimerspec *ovalue)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- timer_tracker *tt = (timer_tracker *) timerid;
- if (tt->magic != TT_MAGIC)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- tt->gettime (ovalue);
- return 0;
-}
-
-extern "C" int
-timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (clock_id != CLOCK_REALTIME)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- *timerid = (timer_t) new timer_tracker (clock_id, evp);
- return 0;
-}
-
-extern "C" int
-timer_settime (timer_t timerid, int flags, const struct itimerspec *value,
- struct itimerspec *ovalue)
-{
- timer_tracker *tt = (timer_tracker *) timerid;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (tt->magic != TT_MAGIC)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- return tt->settime (flags, value, ovalue);
-}
-
-extern "C" int
-timer_delete (timer_t timerid)
-{
- timer_tracker *in_tt = (timer_tracker *) timerid;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (in_tt->magic != TT_MAGIC)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- lock_timer_tracker here;
- for (timer_tracker *tt = &ttstart; tt->next != NULL; tt = tt->next)
- if (tt->next == in_tt)
- {
- tt->next = in_tt->next;
- delete in_tt;
- return 0;
- }
- set_errno (EINVAL);
- return 0;
-}
-
-void
-fixup_timers_after_fork ()
-{
- ttstart.hcancel = ttstart.syncthread = NULL;
- for (timer_tracker *tt = &ttstart; tt->next != NULL; /* nothing */)
- {
- timer_tracker *deleteme = tt->next;
- tt->next = deleteme->next;
- deleteme->hcancel = deleteme->syncthread = NULL;
- delete deleteme;
- }
-}
-
-
-extern "C" int
-setitimer (int which, const struct itimerval *value, struct itimerval *ovalue)
-{
- if (which != ITIMER_REAL)
- {
- set_errno (EINVAL);
- return -1;
- }
- struct itimerspec spec_value, spec_ovalue;
- int ret;
- spec_value.it_interval.tv_sec = value->it_interval.tv_sec;
- spec_value.it_interval.tv_nsec = value->it_interval.tv_usec * 1000;
- spec_value.it_value.tv_sec = value->it_value.tv_sec;
- spec_value.it_value.tv_nsec = value->it_value.tv_usec * 1000;
- ret = timer_settime ((timer_t) &ttstart, 0, &spec_value, &spec_ovalue);
- if (!ret && ovalue)
- {
- ovalue->it_interval.tv_sec = spec_ovalue.it_interval.tv_sec;
- ovalue->it_interval.tv_usec = spec_ovalue.it_interval.tv_nsec / 1000;
- ovalue->it_value.tv_sec = spec_ovalue.it_value.tv_sec;
- ovalue->it_value.tv_usec = spec_ovalue.it_value.tv_nsec / 1000;
- }
- syscall_printf ("%d = setitimer ()", ret);
- return ret;
-}
-
-
-extern "C" int
-getitimer (int which, struct itimerval *ovalue)
-{
- if (which != ITIMER_REAL)
- {
- set_errno (EINVAL);
- return -1;
- }
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- struct itimerspec spec_ovalue;
- int ret = timer_gettime ((timer_t) &ttstart, &spec_ovalue);
- if (!ret)
- {
- ovalue->it_interval.tv_sec = spec_ovalue.it_interval.tv_sec;
- ovalue->it_interval.tv_usec = spec_ovalue.it_interval.tv_nsec / 1000;
- ovalue->it_value.tv_sec = spec_ovalue.it_value.tv_sec;
- ovalue->it_value.tv_usec = spec_ovalue.it_value.tv_nsec / 1000;
- }
- syscall_printf ("%d = getitimer ()", ret);
- return ret;
-}
-
-/* FIXME: POSIX - alarm survives exec */
-extern "C" unsigned int
-alarm (unsigned int seconds)
-{
- struct itimerspec newt = {}, oldt;
- /* alarm cannot fail, but only needs not be
- correct for arguments < 64k. Truncate */
- if (seconds > (HIRES_DELAY_MAX / 1000 - 1))
- seconds = (HIRES_DELAY_MAX / 1000 - 1);
- newt.it_value.tv_sec = seconds;
- timer_settime ((timer_t) &ttstart, 0, &newt, &oldt);
- int ret = oldt.it_value.tv_sec + (oldt.it_value.tv_nsec > 0);
- syscall_printf ("%d = alarm (%d)", ret, seconds);
- return ret;
-}
-
-extern "C" useconds_t
-ualarm (useconds_t value, useconds_t interval)
-{
- struct itimerspec timer = {}, otimer;
- /* ualarm cannot fail.
- Interpret negative arguments as zero */
- if (value > 0)
- {
- timer.it_value.tv_sec = (unsigned int) value / 1000000;
- timer.it_value.tv_nsec = ((unsigned int) value % 1000000) * 1000;
- }
- if (interval > 0)
- {
- timer.it_interval.tv_sec = (unsigned int) interval / 1000000;
- timer.it_interval.tv_nsec = ((unsigned int) interval % 1000000) * 1000;
- }
- timer_settime ((timer_t) &ttstart, 0, &timer, &otimer);
- useconds_t ret = otimer.it_value.tv_sec * 1000000 + (otimer.it_value.tv_nsec + 999) / 1000;
- syscall_printf ("%d = ualarm (%d , %d)", ret, value, interval);
- return ret;
-}
diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc
deleted file mode 100644
index 4b78cab..0000000
--- a/winsup/cygwin/times.cc
+++ /dev/null
@@ -1,786 +0,0 @@
-/* times.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#define __timezonefunc__
-#include <sys/times.h>
-#include <sys/timeb.h>
-#include <utime.h>
-#include <stdlib.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "pinfo.h"
-#include "cygtls.h"
-#include "ntdll.h"
-
-#define FACTOR (0x19db1ded53e8000LL)
-#define NSPERSEC 10000000LL
-
-static inline LONGLONG
-systime ()
-{
- LARGE_INTEGER x;
- FILETIME ft;
- GetSystemTimeAsFileTime (&ft);
- x.HighPart = ft.dwHighDateTime;
- x.LowPart = ft.dwLowDateTime;
- x.QuadPart -= FACTOR; /* Add conversion factor for UNIX vs. Windows base time */
- x.QuadPart /= 10; /* Convert to microseconds */
- return x.QuadPart;
-}
-
-/* Cygwin internal */
-static unsigned long long __stdcall
-__to_clock_t (FILETIME *src, int flag)
-{
- unsigned long long total = ((unsigned long long) src->dwHighDateTime << 32) + ((unsigned)src->dwLowDateTime);
- syscall_printf ("dwHighDateTime %u, dwLowDateTime %u", src->dwHighDateTime, src->dwLowDateTime);
-
- /* Convert into clock ticks - the total is in 10ths of a usec. */
- if (flag)
- total -= FACTOR;
-
- total /= (unsigned long long) (NSPERSEC / CLOCKS_PER_SEC);
- syscall_printf ("total %08x %08x", (unsigned) (total>>32), (unsigned) (total));
- return total;
-}
-
-/* times: POSIX 4.5.2.1 */
-extern "C" clock_t
-times (struct tms *buf)
-{
- FILETIME creation_time, exit_time, kernel_time, user_time;
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return ((clock_t) -1);
-
- LONGLONG ticks = gtod.uptime ();
- /* Ticks is in milliseconds, convert to our ticks. Use long long to prevent
- overflow. */
- clock_t tc = (clock_t) (ticks * CLOCKS_PER_SEC / 1000);
-
- GetProcessTimes (hMainProc, &creation_time, &exit_time,
- &kernel_time, &user_time);
-
- syscall_printf ("ticks %d, CLOCKS_PER_SEC %d", ticks, CLOCKS_PER_SEC);
- syscall_printf ("user_time %d, kernel_time %d, creation_time %d, exit_time %d",
- user_time, kernel_time, creation_time, exit_time);
- buf->tms_stime = __to_clock_t (&kernel_time, 0);
- buf->tms_utime = __to_clock_t (&user_time, 0);
- timeval_to_filetime (&myself->rusage_children.ru_stime, &kernel_time);
- buf->tms_cstime = __to_clock_t (&kernel_time, 1);
- timeval_to_filetime (&myself->rusage_children.ru_utime, &user_time);
- buf->tms_cutime = __to_clock_t (&user_time, 1);
-
- return tc;
-}
-
-EXPORT_ALIAS (times, _times)
-
-/* settimeofday: BSD */
-extern "C" int
-settimeofday (const struct timeval *tv, const struct timezone *tz)
-{
- SYSTEMTIME st;
- struct tm *ptm;
- int res;
-
- tz = tz; /* silence warning about unused variable */
-
- ptm = gmtime (&tv->tv_sec);
- st.wYear = ptm->tm_year + 1900;
- st.wMonth = ptm->tm_mon + 1;
- st.wDayOfWeek = ptm->tm_wday;
- st.wDay = ptm->tm_mday;
- st.wHour = ptm->tm_hour;
- st.wMinute = ptm->tm_min;
- st.wSecond = ptm->tm_sec;
- st.wMilliseconds = tv->tv_usec / 1000;
-
- res = !SetSystemTime (&st);
-
- syscall_printf ("%d = settimeofday (%x, %x)", res, tv, tz);
-
- return res;
-}
-
-/* timezone: standards? */
-extern "C" char *
-timezone (void)
-{
- char *b = _my_tls.locals.timezone_buf;
-
- tzset ();
- __small_sprintf (b,"GMT%+d:%02d", (int) (-_timezone / 3600), (int) (abs (_timezone / 60) % 60));
- return b;
-}
-
-/* Cygwin internal */
-void __stdcall
-totimeval (struct timeval *dst, FILETIME *src, int sub, int flag)
-{
- long long x = __to_clock_t (src, flag);
-
- x *= (int) (1e6) / CLOCKS_PER_SEC; /* Turn x into usecs */
- x -= (long long) sub * (int) (1e6);
-
- dst->tv_usec = x % (long long) (1e6); /* And split */
- dst->tv_sec = x / (long long) (1e6);
-}
-
-hires_ms NO_COPY gtod;
-
-/* FIXME: Make thread safe */
-extern "C" int
-gettimeofday (struct timeval *tv, void *tzvp)
-{
- struct timezone *tz = (struct timezone *) tzvp;
- static bool tzflag;
- LONGLONG now = gtod.usecs ();
-
- if (now == (LONGLONG) -1)
- return -1;
-
- tv->tv_sec = now / 1000000;
- tv->tv_usec = now % 1000000;
-
- if (tz != NULL)
- {
- if (!tzflag)
- {
- tzset ();
- tzflag = true;
- }
- tz->tz_minuteswest = _timezone / 60;
- tz->tz_dsttime = _daylight;
- }
-
- return 0;
-}
-
-EXPORT_ALIAS (gettimeofday, _gettimeofday)
-
-/* Cygwin internal */
-void
-time_t_to_filetime (time_t time_in, FILETIME *out)
-{
- long long x = time_in * NSPERSEC + FACTOR;
- out->dwHighDateTime = x >> 32;
- out->dwLowDateTime = x;
-}
-
-/* Cygwin internal */
-void __stdcall
-timespec_to_filetime (const struct timespec *time_in, FILETIME *out)
-{
- if (time_in->tv_nsec == UTIME_OMIT)
- out->dwHighDateTime = out->dwLowDateTime = 0;
- else
- {
- long long x = time_in->tv_sec * NSPERSEC +
- time_in->tv_nsec / (NSPERSEC/100000) + FACTOR;
- out->dwHighDateTime = x >> 32;
- out->dwLowDateTime = x;
- }
-}
-
-/* Cygwin internal */
-void __stdcall
-timeval_to_filetime (const struct timeval *time_in, FILETIME *out)
-{
- long long x = time_in->tv_sec * NSPERSEC +
- time_in->tv_usec * (NSPERSEC/1000000) + FACTOR;
- out->dwHighDateTime = x >> 32;
- out->dwLowDateTime = x;
-}
-
-/* Cygwin internal */
-static timeval __stdcall
-time_t_to_timeval (time_t in)
-{
- timeval res;
- res.tv_sec = in;
- res.tv_usec = 0;
- return res;
-}
-
-/* Cygwin internal */
-static const struct timespec *
-timeval_to_timespec (const struct timeval *tvp, struct timespec *tmp)
-{
- if (!tvp)
- return NULL;
-
- tmp[0].tv_sec = tvp[0].tv_sec;
- tmp[0].tv_nsec = tvp[0].tv_usec * 1000;
- if (tmp[0].tv_nsec < 0)
- tmp[0].tv_nsec = 0;
- else if (tmp[0].tv_nsec > 999999999)
- tmp[0].tv_nsec = 999999999;
-
- tmp[1].tv_sec = tvp[1].tv_sec;
- tmp[1].tv_nsec = tvp[1].tv_usec * 1000;
- if (tmp[1].tv_nsec < 0)
- tmp[1].tv_nsec = 0;
- else if (tmp[1].tv_nsec > 999999999)
- tmp[1].tv_nsec = 999999999;
-
- return tmp;
-}
-
-/* Cygwin internal */
-/* Convert a Win32 time to "UNIX" format. */
-long __stdcall
-to_time_t (FILETIME *ptr)
-{
- /* A file time is the number of 100ns since jan 1 1601
- stuffed into two long words.
- A time_t is the number of seconds since jan 1 1970. */
-
- long long x = ((long long) ptr->dwHighDateTime << 32) + ((unsigned)ptr->dwLowDateTime);
-
- /* pass "no time" as epoch */
- if (x == 0)
- return 0;
-
- x -= FACTOR; /* number of 100ns between 1601 and 1970 */
- x /= (long long) NSPERSEC; /* number of 100ns in a second */
- return x;
-}
-
-/* Cygwin internal */
-/* Convert a Win32 time to "UNIX" timestruc_t format. */
-void __stdcall
-to_timestruc_t (FILETIME *ptr, timestruc_t *out)
-{
- /* A file time is the number of 100ns since jan 1 1601
- stuffed into two long words.
- A timestruc_t is the number of seconds and microseconds since jan 1 1970
- stuffed into a time_t and a long. */
-
- long rem;
- long long x = ((long long) ptr->dwHighDateTime << 32) + ((unsigned)ptr->dwLowDateTime);
-
- /* pass "no time" as epoch */
- if (x == 0)
- {
- out->tv_sec = 0;
- out->tv_nsec = 0;
- return;
- }
-
- x -= FACTOR; /* number of 100ns between 1601 and 1970 */
- rem = x % ((long long)NSPERSEC);
- x /= (long long) NSPERSEC; /* number of 100ns in a second */
- out->tv_nsec = rem * 100; /* as tv_nsec is in nanoseconds */
- out->tv_sec = x;
-}
-
-/* Cygwin internal */
-/* Get the current time as a "UNIX" timestruc_t format. */
-void __stdcall
-time_as_timestruc_t (timestruc_t * out)
-{
- FILETIME filetime;
-
- GetSystemTimeAsFileTime (&filetime);
- to_timestruc_t (&filetime, out);
-}
-
-/* time: POSIX 4.5.1.1, C 4.12.2.4 */
-/* Return number of seconds since 00:00 UTC on jan 1, 1970 */
-extern "C" time_t
-time (time_t * ptr)
-{
- time_t res;
- FILETIME filetime;
-
- GetSystemTimeAsFileTime (&filetime);
- res = to_time_t (&filetime);
- if (ptr)
- *ptr = res;
-
- syscall_printf ("%d = time (%x)", res, ptr);
-
- return res;
-}
-
-/*
- * localtime_r.c
- * Original Author: Adapted from tzcode maintained by Arthur David Olson.
- *
- * Converts the calendar time pointed to by tim_p into a broken-down time
- * expressed as local time. Returns a pointer to a structure containing the
- * broken-down time.
- */
-
-#define SECSPERMIN 60
-#define MINSPERHOUR 60
-#define HOURSPERDAY 24
-#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR)
-#define SECSPERDAY (SECSPERHOUR * HOURSPERDAY)
-#define DAYSPERWEEK 7
-#define MONSPERYEAR 12
-
-#define YEAR_BASE 1900
-#define EPOCH_YEAR 1970
-#define EPOCH_WDAY 4
-
-#define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0)
-
-#if 0 /* POSIX_LOCALTIME */
-
-static _CONST int mon_lengths[2][MONSPERYEAR] = {
- {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
- {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
-};
-
-static _CONST int year_lengths[2] = {
- 365,
- 366
-};
-
-/*
- * Convert a time_t into a struct tm *.
- * Does NO timezone conversion.
- */
-
-/* Cygwin internal */
-static struct tm * __stdcall
-corelocaltime (const time_t * tim_p)
-{
- long days, rem;
- int y;
- int yleap;
- _CONST int *ip;
- struct tm &localtime_buf=_my_tls.locals.localtime_buf;
-
- time_t tim = *tim_p;
- struct tm *res = &localtime_buf;
-
- days = ((long) tim) / SECSPERDAY;
- rem = ((long) tim) % SECSPERDAY;
-
- while (rem < 0)
- {
- rem += SECSPERDAY;
- --days;
- }
- while (rem >= SECSPERDAY)
- {
- rem -= SECSPERDAY;
- ++days;
- }
-
- /* compute hour, min, and sec */
- res->tm_hour = (int) (rem / SECSPERHOUR);
- rem %= SECSPERHOUR;
- res->tm_min = (int) (rem / SECSPERMIN);
- res->tm_sec = (int) (rem % SECSPERMIN);
-
- /* compute day of week */
- if ((res->tm_wday = ((EPOCH_WDAY + days) % DAYSPERWEEK)) < 0)
- res->tm_wday += DAYSPERWEEK;
-
- /* compute year & day of year */
- y = EPOCH_YEAR;
- if (days >= 0)
- {
- for (;;)
- {
- yleap = isleap (y);
- if (days < year_lengths[yleap])
- break;
- y++;
- days -= year_lengths[yleap];
- }
- }
- else
- {
- do
- {
- --y;
- yleap = isleap (y);
- days += year_lengths[yleap];
- } while (days < 0);
- }
-
- res->tm_year = y - YEAR_BASE;
- res->tm_yday = days;
- ip = mon_lengths[yleap];
- for (res->tm_mon = 0; days >= ip[res->tm_mon]; ++res->tm_mon)
- days -= ip[res->tm_mon];
- res->tm_mday = days + 1;
-
- /* set daylight saving time flag */
- res->tm_isdst = -1;
-
- syscall_printf ("%d = corelocaltime (%x)", res, tim_p);
-
- return (res);
-}
-
-/* localtime: POSIX 8.1.1, C 4.12.3.4 */
-/*
- * localtime takes a time_t (which is in UTC)
- * and formats it into a struct tm as a local time.
- */
-extern "C" struct tm *
-localtime (const time_t *tim_p)
-{
- time_t tim = *tim_p;
- struct tm *rtm;
-
- tzset ();
-
- tim -= _timezone;
-
- rtm = corelocaltime (&tim);
-
- rtm->tm_isdst = _daylight;
-
- syscall_printf ("%x = localtime (%x)", rtm, tim_p);
-
- return rtm;
-}
-
-/* gmtime: C 4.12.3.3 */
-/*
- * gmtime takes a time_t (which is already in UTC)
- * and just puts it into a struct tm.
- */
-extern "C" struct tm *
-gmtime (const time_t *tim_p)
-{
- time_t tim = *tim_p;
-
- struct tm *rtm = corelocaltime (&tim);
- /* UTC has no daylight savings time */
- rtm->tm_isdst = 0;
-
- syscall_printf ("%x = gmtime (%x)", rtm, tim_p);
-
- return rtm;
-}
-
-#endif /* POSIX_LOCALTIME */
-
-int
-utimens_worker (path_conv &win32, const struct timespec *tvp)
-{
- int res = -1;
-
- if (win32.error)
- set_errno (win32.error);
- else
- {
- fhandler_base *fh = NULL;
- bool fromfd = false;
-
- cygheap_fdenum cfd (true);
- while (cfd.next () >= 0)
- if (cfd->get_access () & (FILE_WRITE_ATTRIBUTES | GENERIC_WRITE)
- && RtlEqualUnicodeString (cfd->pc.get_nt_native_path (),
- win32.get_nt_native_path (),
- cfd->pc.objcaseinsensitive ()))
- {
- fh = cfd;
- fromfd = true;
- break;
- }
-
- if (!fh)
- {
- if (!(fh = build_fh_pc (win32)))
- goto error;
-
- if (fh->error ())
- {
- debug_printf ("got %d error from build_fh_name", fh->error ());
- set_errno (fh->error ());
- }
- }
-
- res = fh->utimens (tvp);
-
- if (!fromfd)
- delete fh;
- }
-
-error:
- syscall_printf ("%d = utimes (%S, %p)",
- res, win32.get_nt_native_path (), tvp);
- return res;
-}
-
-/* utimes: POSIX/SUSv3 */
-extern "C" int
-utimes (const char *path, const struct timeval *tvp)
-{
- path_conv win32 (path, PC_POSIX | PC_SYM_FOLLOW, stat_suffixes);
- struct timespec tmp[2];
- return utimens_worker (win32, timeval_to_timespec (tvp, tmp));
-}
-
-/* BSD */
-extern "C" int
-lutimes (const char *path, const struct timeval *tvp)
-{
- path_conv win32 (path, PC_POSIX | PC_SYM_NOFOLLOW, stat_suffixes);
- struct timespec tmp[2];
- return utimens_worker (win32, timeval_to_timespec (tvp, tmp));
-}
-
-/* futimens: POSIX/SUSv4 */
-extern "C" int
-futimens (int fd, const struct timespec *tvp)
-{
- int res;
-
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- res = -1;
- else if (cfd->get_access () & (FILE_WRITE_ATTRIBUTES | GENERIC_WRITE))
- res = cfd->utimens (tvp);
- else
- res = utimens_worker (cfd->pc, tvp);
- syscall_printf ("%d = futimens (%d, %p)", res, fd, tvp);
- return res;
-}
-
-/* BSD */
-extern "C" int
-futimes (int fd, const struct timeval *tvp)
-{
- struct timespec tmp[2];
- return futimens (fd, timeval_to_timespec (tvp, tmp));
-}
-
-/* utime: POSIX 5.6.6.1 */
-extern "C" int
-utime (const char *path, const struct utimbuf *buf)
-{
- struct timeval tmp[2];
-
- if (buf == 0)
- return utimes (path, 0);
-
- debug_printf ("incoming utime act %x", buf->actime);
- tmp[0] = time_t_to_timeval (buf->actime);
- tmp[1] = time_t_to_timeval (buf->modtime);
-
- return utimes (path, tmp);
-}
-
-/* ftime: standards? */
-extern "C" int
-ftime (struct timeb *tp)
-{
- struct timeval tv;
- struct timezone tz;
-
- if (gettimeofday (&tv, &tz) < 0)
- return -1;
-
- tp->time = tv.tv_sec;
- tp->millitm = tv.tv_usec / 1000;
- tp->timezone = tz.tz_minuteswest;
- tp->dstflag = tz.tz_dsttime;
-
- return 0;
-}
-
-/* obsolete, changed to cygwin_tzset when localtime.c was added - dj */
-extern "C" void
-cygwin_tzset ()
-{
-}
-
-#define stupid_printf if (cygwin_finished_initializing) debug_printf
-void
-hires_us::prime ()
-{
- LARGE_INTEGER ifreq;
- if (!QueryPerformanceFrequency (&ifreq))
- {
- inited = -1;
- return;
- }
-
- int priority = GetThreadPriority (GetCurrentThread ());
-
- SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_TIME_CRITICAL);
- if (!QueryPerformanceCounter (&primed_pc))
- {
- SetThreadPriority (GetCurrentThread (), priority);
- inited = -1;
- return;
- }
-
- primed_ft.QuadPart = systime ();
- freq = (double) ((double) 1000000. / (double) ifreq.QuadPart);
- inited = true;
- SetThreadPriority (GetCurrentThread (), priority);
-}
-
-LONGLONG
-hires_us::usecs (bool justdelta)
-{
- if (!inited)
- prime ();
- if (inited < 0)
- {
- set_errno (ENOSYS);
- return (long long) -1;
- }
-
- LARGE_INTEGER now;
- if (!QueryPerformanceCounter (&now))
- {
- set_errno (ENOSYS);
- return -1;
- }
-
- // FIXME: Use round() here?
- now.QuadPart = (LONGLONG) (freq * (double) (now.QuadPart - primed_pc.QuadPart));
- LONGLONG res = justdelta ? now.QuadPart : primed_ft.QuadPart + now.QuadPart;
- return res;
-}
-
-void
-hires_ms::prime ()
-{
- if (!inited)
- {
- int priority = GetThreadPriority (GetCurrentThread ());
- SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_TIME_CRITICAL);
- initime_us = systime () - (((LONGLONG) timeGetTime ()) * 1000LL);
- inited = true;
- SetThreadPriority (GetCurrentThread (), priority);
- }
- return;
-}
-
-LONGLONG
-hires_ms::usecs ()
-{
- if (!inited)
- prime ();
-
- LONGLONG t = systime ();
- LONGLONG res = initime_us + (((LONGLONG) timeGetTime ()) * 1000LL);
- if (res < (t - 40000LL))
- {
- inited = false;
- prime ();
- res = initime_us + (((LONGLONG) timeGetTime ()) * 1000LL);
- }
- return res;
-}
-
-extern "C" int
-clock_gettime (clockid_t clk_id, struct timespec *tp)
-{
- if (clk_id != CLOCK_REALTIME)
- {
- set_errno (ENOSYS);
- return -1;
- }
-
- LONGLONG now = gtod.usecs ();
- if (now == (LONGLONG) -1)
- return -1;
-
- tp->tv_sec = now / 1000000;
- tp->tv_nsec = (now % 1000000) * 1000;
- return 0;
-}
-
-static DWORD minperiod; // FIXME: Maintain period after a fork.
-
-UINT
-hires_ms::resolution ()
-{
- if (!minperiod)
- {
- /* Try to empirically determine current timer resolution */
- int priority = GetThreadPriority (GetCurrentThread ());
- SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_TIME_CRITICAL);
- DWORD period = 0;
- for (int i = 0; i < 4; i++)
- {
- DWORD now;
- DWORD then = timeGetTime ();
- while ((now = timeGetTime ()) == then)
- continue;
- then = now;
- while ((now = timeGetTime ()) == then)
- continue;
- period += now - then;
- }
- SetThreadPriority (GetCurrentThread (), priority);
- period /= 4;
- minperiod = period;
- }
- return minperiod;
-}
-
-extern "C" int
-clock_getres (clockid_t clk_id, struct timespec *tp)
-{
- if (clk_id != CLOCK_REALTIME)
- {
- set_errno (ENOSYS);
- return -1;
- }
-
- DWORD period = gtod.resolution ();
-
- tp->tv_sec = period / 1000;
- tp->tv_nsec = (period % 1000) * 1000000;
-
- return 0;
-}
-
-extern "C" int
-clock_setres (clockid_t clk_id, struct timespec *tp)
-{
- static NO_COPY bool period_set;
- if (clk_id != CLOCK_REALTIME)
- {
- set_errno (ENOSYS);
- return -1;
- }
-
- if (period_set)
- timeEndPeriod (minperiod);
-
- DWORD period = (tp->tv_sec * 1000) + ((tp->tv_nsec) / 1000000);
-
- if (timeBeginPeriod (period))
- {
- minperiod = period;
- period_set = true;
- }
- else
- {
- __seterrno ();
- timeBeginPeriod (minperiod);
- return -1;
- }
-
- return 0;
-}
diff --git a/winsup/cygwin/tls_pbuf.cc b/winsup/cygwin/tls_pbuf.cc
deleted file mode 100644
index 1f4b748..0000000
--- a/winsup/cygwin/tls_pbuf.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-/* tls_pbuf.cc
-
- Copyright 2008 Red Hat, Inc.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <winsup.h>
-#include <malloc.h>
-#include "cygtls.h"
-#include "tls_pbuf.h"
-
-#define tls_pbuf _my_tls.locals.pathbufs
-
-void
-tls_pathbuf::destroy ()
-{
- for (int i = 0; i < TP_NUM_C_BUFS; ++i)
- if (c_buf[i])
- free (c_buf[i]);
- for (int i = 0; i < TP_NUM_W_BUFS; ++i)
- if (w_buf[i])
- free (w_buf[i]);
-}
-
-tmp_pathbuf::tmp_pathbuf ()
-: c_buf_old (tls_pbuf.c_cnt),
- w_buf_old (tls_pbuf.w_cnt)
-{}
-
-tmp_pathbuf::~tmp_pathbuf ()
-{
- tls_pbuf.c_cnt = c_buf_old;
- tls_pbuf.w_cnt = w_buf_old;
-}
-
-char *
-tmp_pathbuf::c_get ()
-{
- if (tls_pbuf.c_cnt >= TP_NUM_C_BUFS)
- api_fatal ("Internal error: TP_NUM_C_BUFS too small.");
- if (!tls_pbuf.c_buf[tls_pbuf.c_cnt]
- && !(tls_pbuf.c_buf[tls_pbuf.c_cnt] = (char *) malloc (NT_MAX_PATH)))
- api_fatal ("Internal error: Out of memory for new path buf.");
- return tls_pbuf.c_buf[tls_pbuf.c_cnt++];
-}
-
-PWCHAR
-tmp_pathbuf::w_get ()
-{
- if (tls_pbuf.w_cnt >= TP_NUM_W_BUFS)
- api_fatal ("Internal error: TP_NUM_W_BUFS too small.");
- if (!tls_pbuf.w_buf[tls_pbuf.w_cnt]
- && !(tls_pbuf.w_buf[tls_pbuf.w_cnt]
- = (PWCHAR) malloc (NT_MAX_PATH * sizeof (WCHAR))))
- api_fatal ("Internal error: Out of memory for new wide path buf.");
- return tls_pbuf.w_buf[tls_pbuf.w_cnt++];
-}
diff --git a/winsup/cygwin/tls_pbuf.h b/winsup/cygwin/tls_pbuf.h
deleted file mode 100644
index d4143aa..0000000
--- a/winsup/cygwin/tls_pbuf.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* tls_pbuf.h
-
- Copyright 2008 Red Hat, Inc.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-class tmp_pathbuf
-{
- int c_buf_old;
- int w_buf_old;
-public:
- tmp_pathbuf ();
- ~tmp_pathbuf ();
-
- char *c_get (); /* Create temporary TLS path buf of size NT_MAX_PATH. */
- PWCHAR w_get (); /* Create temporary TLS path buf of size 2 * NT_MAX_PATH. */
- inline char *t_get () { return (char *) w_get (); }
- inline PUNICODE_STRING u_get (PUNICODE_STRING up)
- {
- up->Length = 0;
- up->MaximumLength = (NT_MAX_PATH - 1) * sizeof (WCHAR);
- up->Buffer = w_get ();
- return up;
- }
-};
diff --git a/winsup/cygwin/tlsoffsets.h b/winsup/cygwin/tlsoffsets.h
deleted file mode 100644
index d147c82..0000000
--- a/winsup/cygwin/tlsoffsets.h
+++ /dev/null
@@ -1,129 +0,0 @@
-//;# autogenerated: Do not edit.
-
-//; $tls::sizeof__cygtls = 4320;
-//; $tls::func = -12700;
-//; $tls::pfunc = 0;
-//; $tls::el = -12696;
-//; $tls::pel = 4;
-//; $tls::saved_errno = -12688;
-//; $tls::psaved_errno = 12;
-//; $tls::sa_flags = -12684;
-//; $tls::psa_flags = 16;
-//; $tls::oldmask = -12680;
-//; $tls::poldmask = 20;
-//; $tls::deltamask = -12676;
-//; $tls::pdeltamask = 24;
-//; $tls::event = -12672;
-//; $tls::pevent = 28;
-//; $tls::errno_addr = -12668;
-//; $tls::perrno_addr = 32;
-//; $tls::sigmask = -12664;
-//; $tls::psigmask = 36;
-//; $tls::sigwait_mask = -12660;
-//; $tls::psigwait_mask = 40;
-//; $tls::sigwait_info = -12656;
-//; $tls::psigwait_info = 44;
-//; $tls::thread_context = -12652;
-//; $tls::pthread_context = 48;
-//; $tls::thread_id = -12440;
-//; $tls::pthread_id = 260;
-//; $tls::threadkill = -12436;
-//; $tls::pthreadkill = 264;
-//; $tls::infodata = -12432;
-//; $tls::pinfodata = 268;
-//; $tls::tid = -12284;
-//; $tls::ptid = 416;
-//; $tls::local_clib = -12280;
-//; $tls::plocal_clib = 420;
-//; $tls::__dontuse = -12280;
-//; $tls::p__dontuse = 420;
-//; $tls::locals = -11192;
-//; $tls::plocals = 1508;
-//; $tls::_ctinfo = -9484;
-//; $tls::p_ctinfo = 3216;
-//; $tls::andreas = -9480;
-//; $tls::pandreas = 3220;
-//; $tls::wq = -9464;
-//; $tls::pwq = 3236;
-//; $tls::prev = -9436;
-//; $tls::pprev = 3264;
-//; $tls::next = -9432;
-//; $tls::pnext = 3268;
-//; $tls::sig = -9428;
-//; $tls::psig = 3272;
-//; $tls::incyg = -9424;
-//; $tls::pincyg = 3276;
-//; $tls::spinning = -9420;
-//; $tls::pspinning = 3280;
-//; $tls::stacklock = -9416;
-//; $tls::pstacklock = 3284;
-//; $tls::stackptr = -9412;
-//; $tls::pstackptr = 3288;
-//; $tls::stack = -9408;
-//; $tls::pstack = 3292;
-//; $tls::initialized = -8384;
-//; $tls::pinitialized = 4316;
-//; __DATA__
-
-#define tls_func (-12700)
-#define tls_pfunc (0)
-#define tls_el (-12696)
-#define tls_pel (4)
-#define tls_saved_errno (-12688)
-#define tls_psaved_errno (12)
-#define tls_sa_flags (-12684)
-#define tls_psa_flags (16)
-#define tls_oldmask (-12680)
-#define tls_poldmask (20)
-#define tls_deltamask (-12676)
-#define tls_pdeltamask (24)
-#define tls_event (-12672)
-#define tls_pevent (28)
-#define tls_errno_addr (-12668)
-#define tls_perrno_addr (32)
-#define tls_sigmask (-12664)
-#define tls_psigmask (36)
-#define tls_sigwait_mask (-12660)
-#define tls_psigwait_mask (40)
-#define tls_sigwait_info (-12656)
-#define tls_psigwait_info (44)
-#define tls_thread_context (-12652)
-#define tls_pthread_context (48)
-#define tls_thread_id (-12440)
-#define tls_pthread_id (260)
-#define tls_threadkill (-12436)
-#define tls_pthreadkill (264)
-#define tls_infodata (-12432)
-#define tls_pinfodata (268)
-#define tls_tid (-12284)
-#define tls_ptid (416)
-#define tls_local_clib (-12280)
-#define tls_plocal_clib (420)
-#define tls___dontuse (-12280)
-#define tls_p__dontuse (420)
-#define tls_locals (-11192)
-#define tls_plocals (1508)
-#define tls__ctinfo (-9484)
-#define tls_p_ctinfo (3216)
-#define tls_andreas (-9480)
-#define tls_pandreas (3220)
-#define tls_wq (-9464)
-#define tls_pwq (3236)
-#define tls_prev (-9436)
-#define tls_pprev (3264)
-#define tls_next (-9432)
-#define tls_pnext (3268)
-#define tls_sig (-9428)
-#define tls_psig (3272)
-#define tls_incyg (-9424)
-#define tls_pincyg (3276)
-#define tls_spinning (-9420)
-#define tls_pspinning (3280)
-#define tls_stacklock (-9416)
-#define tls_pstacklock (3284)
-#define tls_stackptr (-9412)
-#define tls_pstackptr (3288)
-#define tls_stack (-9408)
-#define tls_pstack (3292)
-#define tls_initialized (-8384)
-#define tls_pinitialized (4316)
diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc
deleted file mode 100644
index 6341eb1..0000000
--- a/winsup/cygwin/tty.cc
+++ /dev/null
@@ -1,385 +0,0 @@
-/* tty.cc
-
- Copyright 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008
- Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "miscfuncs.h"
-#include <unistd.h>
-#include <utmp.h>
-#include <sys/cygwin.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "pinfo.h"
-#include "shared_info.h"
-
-extern fhandler_tty_master *tty_master;
-
-extern "C" int
-posix_openpt (int oflags)
-{
- return open ("/dev/ptmx", oflags);
-}
-
-extern "C" int
-grantpt (int fd)
-{
- return 0;
-}
-
-extern "C" int
-unlockpt (int fd)
-{
- return 0;
-}
-
-extern "C" int
-revoke (char *ttyname)
-{
- set_errno (ENOSYS);
- return -1;
-}
-
-extern "C" int
-ttyslot (void)
-{
- if (NOTSTATE (myself, PID_USETTY))
- return -1;
- return myself->ctty;
-}
-
-HANDLE NO_COPY tty_list::mutex = NULL;
-
-void __stdcall
-tty_list::init_session ()
-{
- char mutex_name[MAX_PATH];
- /* tty_list::mutex is used while searching for a tty slot. It's necessary
- while finding console window handle */
-
- char *name = shared_name (mutex_name, "tty_list::mutex", 0);
- if (!(mutex = CreateMutex (&sec_all_nih, FALSE, name)))
- api_fatal ("can't create tty_list::mutex '%s', %E", name);
- ProtectHandle (mutex);
-}
-
-void __stdcall
-tty::init_session ()
-{
- if (!myself->cygstarted && NOTSTATE (myself, PID_CYGPARENT))
- cygheap->fdtab.get_debugger_info ();
-
- if (NOTSTATE (myself, PID_USETTY))
- return;
- if (myself->ctty != -1)
- /* nothing to do */;
- else if (NOTSTATE (myself, PID_CYGPARENT))
- myself->ctty = cygwin_shared->tty.attach (myself->ctty);
- else
- return;
- if (myself->ctty == -1)
- termios_printf ("Can't attach to tty");
-}
-
-/* Create session's master tty */
-
-void __stdcall
-tty::create_master (int ttynum)
-{
- device ttym = *ttym_dev;
- ttym.setunit (ttynum); /* CGF FIXME device */
- tty_master = (fhandler_tty_master *) build_fh_dev (ttym);
- if (tty_master->init ())
- api_fatal ("Can't create master tty");
- else
- {
- /* Log utmp entry */
- struct utmp our_utmp;
- DWORD len = sizeof our_utmp.ut_host;
-
- bzero ((char *) &our_utmp, sizeof (utmp));
- time (&our_utmp.ut_time);
- strncpy (our_utmp.ut_name, getlogin (), sizeof (our_utmp.ut_name));
- GetComputerName (our_utmp.ut_host, &len);
- __small_sprintf (our_utmp.ut_line, "tty%d", ttynum);
- if ((len = strlen (our_utmp.ut_line)) >= UT_IDLEN)
- len -= UT_IDLEN;
- else
- len = 0;
- strncpy (our_utmp.ut_id, our_utmp.ut_line + len, UT_IDLEN);
- our_utmp.ut_type = USER_PROCESS;
- our_utmp.ut_pid = myself->pid;
- myself->ctty = ttynum;
- login (&our_utmp);
- }
-}
-
-int __stdcall
-tty_list::attach (int num)
-{
- if (num != -1)
- {
- return connect (num);
- }
- if (NOTSTATE (myself, PID_USETTY))
- return -1;
- return allocate (true);
-}
-
-void
-tty_list::terminate ()
-{
- if (NOTSTATE (myself, PID_USETTY))
- return;
- int ttynum = myself->ctty;
-
- /* Keep master running till there are connected clients */
- if (ttynum != -1 && tty_master && ttys[ttynum].master_pid == myself->pid)
- {
- tty *t = ttys + ttynum;
- CloseHandle (tty_master->from_master);
- CloseHandle (tty_master->to_master);
- /* Wait for children which rely on tty handling in this process to
- go away */
- for (int i = 0; ; i++)
- {
- if (!t->slave_alive ())
- break;
- if (i >= 100)
- {
- small_printf ("waiting for children using tty%d to terminate\n",
- ttynum);
- i = 0;
- }
-
- low_priority_sleep (200);
- }
-
- lock_ttys here ();
-
- termios_printf ("tty %d master about to finish", ttynum);
- CloseHandle (tty_master->get_io_handle ());
- CloseHandle (tty_master->get_output_handle ());
-
- t->init ();
-
- char buf[20];
- __small_sprintf (buf, "tty%d", ttynum);
- logout (buf);
- }
-}
-
-int
-tty_list::connect (int ttynum)
-{
- if (ttynum < 0 || ttynum >= NTTYS)
- {
- termios_printf ("ttynum (%d) out of range", ttynum);
- return -1;
- }
- if (!ttys[ttynum].exists ())
- {
- termios_printf ("tty %d was not allocated", ttynum);
- return -1;
- }
-
- return ttynum;
-}
-
-void
-tty_list::init ()
-{
- for (int i = 0; i < NTTYS; i++)
- {
- ttys[i].init ();
- ttys[i].setntty (i);
- }
-}
-
-/* Search for tty class for our console. Allocate new tty if our process is
- the only cygwin process in the current console.
- Return tty number or -1 if error.
- If flag == 0, just find a free tty.
- */
-int
-tty_list::allocate (bool with_console)
-{
- HWND console;
- int freetty = -1;
- HANDLE hmaster = NULL;
-
- /* FIXME: This whole function needs a protective mutex. */
-
- lock_ttys here;
-
- if (!with_console)
- console = NULL;
- else if (!(console = GetConsoleWindow ()))
- {
- termios_printf ("Can't find console window");
- goto out;
- }
-
- /* Is a tty allocated for console? */
- for (int i = 0; i < NTTYS; i++)
- {
- if (!ttys[i].exists ())
- {
- if (freetty < 0) /* Scanning? */
- freetty = i; /* Yes. */
- if (!with_console) /* Do we want to attach this to a console? */
- break; /* No. We've got one. */
- }
-
- /* FIXME: Is this right? We can potentially query a "nonexistent"
- tty slot after falling through from the above? */
- if (with_console && ttys[i].gethwnd () == console)
- {
- termios_printf ("console %x already associated with tty%d",
- console, i);
- /* Is the master alive? */
- hmaster = OpenProcess (PROCESS_DUP_HANDLE, FALSE, ttys[i].master_pid);
- if (hmaster)
- {
- CloseHandle (hmaster);
- freetty = i;
- goto out;
- }
- /* Master is dead */
- freetty = i;
- break;
- }
- }
-
- /* There is no tty allocated to console, allocate the first free found */
- if (freetty == -1)
- goto out;
-
- tty *t;
- t = ttys + freetty;
- t->init ();
- t->setsid (-1);
- t->sethwnd (console);
-
-out:
- if (freetty < 0)
- system_printf ("No tty allocated");
- else if (!with_console)
- {
- termios_printf ("tty%d allocated", freetty);
- here.dont_release (); /* exit with mutex still held -- caller has more work to do */
- }
- else
- {
- termios_printf ("console %p associated with tty%d", console, freetty);
- if (!hmaster)
- tty::create_master (freetty);
- }
- return freetty;
-}
-
-bool
-tty::slave_alive ()
-{
- return alive (TTY_SLAVE_ALIVE);
-}
-
-bool
-tty::alive (const char *fmt)
-{
- HANDLE ev;
- char buf[MAX_PATH];
-
- shared_name (buf, fmt, ntty);
- if ((ev = OpenEvent (EVENT_ALL_ACCESS, FALSE, buf)))
- CloseHandle (ev);
- return ev != NULL;
-}
-
-HANDLE
-tty::open_output_mutex ()
-{
- return open_mutex (OUTPUT_MUTEX);
-}
-
-HANDLE
-tty::open_input_mutex ()
-{
- return open_mutex (INPUT_MUTEX);
-}
-
-HANDLE
-tty::open_mutex (const char *mutex)
-{
- char buf[MAX_PATH];
- shared_name (buf, mutex, ntty);
- return OpenMutex (MUTEX_ALL_ACCESS, TRUE, buf);
-}
-
-HANDLE
-tty::create_inuse (const char *fmt)
-{
- HANDLE h;
- char buf[MAX_PATH];
-
- shared_name (buf, fmt, ntty);
- h = CreateEvent (&sec_all, TRUE, FALSE, buf);
- termios_printf ("%s %p", buf, h);
- if (!h)
- termios_printf ("couldn't open inuse event, %E", buf);
- return h;
-}
-
-void
-tty::init ()
-{
- output_stopped = 0;
- setsid (0);
- pgid = 0;
- hwnd = NULL;
- was_opened = 0;
- master_pid = 0;
-}
-
-HANDLE
-tty::get_event (const char *fmt, BOOL manual_reset)
-{
- HANDLE hev;
- char buf[MAX_PATH];
-
- shared_name (buf, fmt, ntty);
- if (!(hev = CreateEvent (&sec_all, manual_reset, FALSE, buf)))
- {
- termios_printf ("couldn't create %s", buf);
- set_errno (ENOENT); /* FIXME this can't be the right errno */
- return NULL;
- }
-
- termios_printf ("created event %s", buf);
- return hev;
-}
-
-lock_ttys::lock_ttys (DWORD howlong): release_me (true)
-{
- if (WaitForSingleObject (tty_list::mutex, howlong) == WAIT_FAILED)
- {
- termios_printf ("WFSO for mutex %p failed, %E", tty_list::mutex);
- release_me = false;
- }
-}
-
-void
-lock_ttys::release ()
-{
- ReleaseMutex (tty_list::mutex);
-}
diff --git a/winsup/cygwin/tty.h b/winsup/cygwin/tty.h
deleted file mode 100644
index 612ed30..0000000
--- a/winsup/cygwin/tty.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/* tty.h: shared tty info for cygwin
-
- Copyright 2000, 2001, 2002, 2003, 2004, 2006 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* tty tables */
-
-#define INP_BUFFER_SIZE 256
-#define OUT_BUFFER_SIZE 256
-#define NTTYS 128
-#define real_tty_attached(p) ((p)->ctty >= 0 && (p)->ctty != TTY_CONSOLE)
-
-/* Input/Output/ioctl events */
-
-#define OUTPUT_DONE_EVENT "cygtty.output.done"
-#define IOCTL_REQUEST_EVENT "cygtty.ioctl.request"
-#define IOCTL_DONE_EVENT "cygtty.ioctl.done"
-#define RESTART_OUTPUT_EVENT "cygtty.output.restart"
-#define INPUT_AVAILABLE_EVENT "cygtty.input.avail"
-#define OUTPUT_MUTEX "cygtty.output.mutex"
-#define INPUT_MUTEX "cygtty.input.mutex"
-#define TTY_SLAVE_ALIVE "cygtty.slave_alive"
-#define TTY_MASTER_ALIVE "cygtty.master_alive"
-
-#include <sys/termios.h>
-
-#ifndef MIN_CTRL_C_SLOP
-#define MIN_CTRL_C_SLOP 50
-#endif
-
-class tty_min
-{
- pid_t sid; /* Session ID of tty */
- struct status_flags
- {
- unsigned initialized : 1; /* Set if tty is initialized */
- unsigned rstcons : 1; /* Set if console needs to be set to "non-cooked" */
- } status;
-
-public:
- pid_t pgid;
- int output_stopped;
- int ntty;
- DWORD last_ctrl_c; /* tick count of last ctrl-c */
- HWND hwnd; /* Console window handle tty belongs to */
-
- IMPLEMENT_STATUS_FLAG (bool, initialized)
- IMPLEMENT_STATUS_FLAG (bool, rstcons)
-
- struct termios ti;
- struct winsize winsize;
-
- /* ioctl requests buffer */
- int cmd;
- union
- {
- struct termios termios;
- struct winsize winsize;
- int value;
- pid_t pid;
- } arg;
- /* XXX_retval variables holds master's completion codes. Error are stored as
- * -ERRNO
- */
- int ioctl_retval;
- int write_error;
-
- void setntty (int n) {ntty = n;}
- pid_t getpgid () {return pgid;}
- void setpgid (int pid) {pgid = pid;}
- int getsid () {return sid;}
- void setsid (pid_t tsid) {sid = tsid;}
- void kill_pgrp (int sig);
- HWND gethwnd () {return hwnd;}
- void sethwnd (HWND wnd) {hwnd = wnd;}
-};
-
-class fhandler_pty_master;
-
-class tty: public tty_min
-{
- HANDLE get_event (const char *fmt, BOOL manual_reset = FALSE)
- __attribute__ ((regparm (3)));
-public:
- pid_t master_pid; /* PID of tty master process */
-
- HANDLE from_master, to_master;
-
- int read_retval;
- bool was_opened; /* True if opened at least once. */
-
- void init ();
- HANDLE create_inuse (const char *);
- bool alive (const char *fmt);
- bool slave_alive ();
- bool master_alive ();
- HANDLE open_mutex (const char *mutex);
- HANDLE open_output_mutex ();
- HANDLE open_input_mutex ();
- bool exists ()
- {
- if (!master_pid)
- return false;
- HANDLE h = open_output_mutex ();
- if (h)
- {
- CloseHandle (h);
- return 1;
- }
- return slave_alive ();
- }
- void set_master_closed () {master_pid = -1;}
- static void __stdcall create_master (int);
- static void __stdcall init_session ();
- friend class fhandler_pty_master;
-};
-
-class tty_list
-{
- tty ttys[NTTYS];
- static HANDLE mutex;
-
-public:
- tty * operator [](int n) {return ttys + n;}
- int allocate (bool); /* true if allocate a tty, pty otherwise */
- int connect (int);
- void terminate ();
- void init ();
- tty_min *get_tty (int n);
- int __stdcall attach (int);
- static void __stdcall init_session ();
- friend class lock_ttys;
-};
-
-class lock_ttys
-{
- bool release_me;
-public:
- lock_ttys (DWORD = INFINITE);
- static void release ();
- void dont_release () {release_me = false;}
- ~lock_ttys ()
- {
- if (release_me)
- release ();
- }
-};
-
-extern "C" int ttyslot (void);
diff --git a/winsup/cygwin/tz_posixrules.h b/winsup/cygwin/tz_posixrules.h
deleted file mode 100644
index dea668e..0000000
--- a/winsup/cygwin/tz_posixrules.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* generated with bin2h from zoneinfo/posixrules */
-
-static NO_COPY unsigned char _posixrules_data[] = {
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,
-0,1,16,0,0,0,2,0,0,0,8,0,151,254,240,1,135,225,224,2,119,224,240,3,112,254,96,4,96,253,112,5,80,
-224,96,6,64,223,112,7,48,194,96,7,141,25,112,9,16,164,96,9,173,148,240,10,240,134,96,11,224,133,112,12,217,162,
-224,13,192,103,112,14,185,132,224,15,169,131,240,16,153,102,224,17,137,101,240,18,121,72,224,19,105,71,240,20,89,42,224,
-21,73,41,240,22,57,12,224,23,41,11,240,24,34,41,96,25,8,237,240,26,2,11,96,26,242,10,112,27,225,237,96,28,
-209,236,112,29,193,207,96,30,177,206,112,31,161,177,96,32,118,0,240,33,129,147,96,34,85,226,240,35,106,175,224,36,53,
-196,240,37,74,145,224,38,21,166,240,39,42,115,224,39,254,195,112,41,10,85,224,41,222,165,112,42,234,55,224,43,190,135,
-112,44,211,84,96,45,158,105,112,46,179,54,96,47,126,75,112,48,147,24,96,49,103,103,240,50,114,250,96,51,71,73,240,
-52,82,220,96,53,39,43,240,54,50,190,96,55,7,13,240,56,27,218,224,56,230,239,240,57,251,188,224,58,198,209,240,59,
-219,158,224,60,175,238,112,61,187,128,224,62,143,208,112,63,155,98,224,64,111,178,112,65,132,127,96,66,79,148,112,67,100,
-97,96,68,47,118,112,69,68,67,96,70,15,88,112,71,36,37,96,71,248,116,240,73,4,7,96,73,216,86,240,74,227,233,
-96,75,184,56,240,76,205,5,224,77,152,26,240,78,172,231,224,79,119,252,240,80,140,201,224,81,97,25,112,82,108,171,224,
-83,64,251,112,84,76,141,224,85,32,221,112,86,44,111,224,87,0,191,112,88,21,140,96,88,224,161,112,89,245,110,96,90,
-192,131,112,91,213,80,96,92,169,159,240,93,181,50,96,94,137,129,240,95,149,20,96,96,105,99,240,97,126,48,224,98,73,
-69,240,99,94,18,224,100,41,39,240,101,61,244,224,102,18,68,112,103,29,214,224,103,242,38,112,104,253,184,224,105,210,8,
-112,106,221,154,224,107,177,234,112,108,198,183,96,109,145,204,112,110,166,153,96,111,113,174,112,112,134,123,96,113,90,202,240,
-114,102,93,96,115,58,172,240,116,70,63,96,117,26,142,240,118,47,91,224,118,250,112,240,120,15,61,224,120,218,82,240,121,
-239,31,224,122,186,52,240,123,207,1,224,124,163,81,112,125,174,227,224,126,131,51,112,127,142,197,224,128,99,21,112,129,119,
-226,96,130,66,247,112,131,87,196,96,132,34,217,112,133,55,166,96,134,11,245,240,135,23,136,96,135,235,215,240,136,247,106,
-96,137,203,185,240,138,215,76,96,139,171,155,240,140,192,104,224,141,139,125,240,142,160,74,224,143,107,95,240,144,128,44,224,
-145,84,124,112,146,96,14,224,147,52,94,112,148,63,240,224,149,20,64,112,150,41,13,96,150,244,34,112,152,8,239,96,152,
-212,4,112,153,232,209,96,154,189,32,240,155,200,179,96,156,157,2,240,157,168,149,96,158,124,228,240,159,136,119,96,160,92,
-198,240,161,113,147,224,162,60,168,240,163,81,117,224,164,28,138,240,165,49,87,224,166,5,167,112,167,17,57,224,167,229,137,
-112,168,241,27,224,169,197,107,112,170,218,56,96,171,165,77,112,172,186,26,96,173,133,47,112,174,153,252,96,175,101,17,112,
-176,121,222,96,177,78,45,240,178,89,192,96,179,46,15,240,180,57,162,96,181,13,241,240,182,34,190,224,182,237,211,240,184,
-2,160,224,184,205,181,240,185,226,130,224,186,182,210,112,187,194,100,224,188,150,180,112,189,162,70,224,190,118,150,112,191,130,
-40,224,192,86,120,112,193,107,69,96,194,54,90,112,195,75,39,96,196,22,60,112,197,43,9,96,197,255,88,240,199,10,235,
-96,199,223,58,240,200,234,205,96,201,191,28,240,202,211,233,224,203,158,254,240,204,179,203,224,205,126,224,240,206,147,173,224,
-207,103,253,112,208,115,143,224,209,71,223,112,210,83,113,224,211,39,193,112,212,51,83,224,213,7,163,112,214,28,112,96,214,
-231,133,112,215,252,82,96,216,199,103,112,217,220,52,96,218,176,131,240,219,188,22,96,220,144,101,240,221,155,248,96,222,112,
-71,240,223,133,20,224,224,80,41,240,225,100,246,224,226,48,11,240,227,68,216,224,228,15,237,240,229,36,186,224,229,249,10,
-112,231,4,156,224,231,216,236,112,232,228,126,224,233,184,206,112,234,205,155,96,235,152,176,112,236,173,125,96,237,120,146,112,
-238,141,95,96,239,97,174,240,240,109,65,96,241,65,144,240,242,77,35,96,243,33,114,240,244,45,5,96,245,1,84,240,246,
-22,33,224,246,225,54,240,247,246,3,224,248,193,24,240,249,213,229,224,250,160,250,240,251,181,199,224,252,138,23,112,253,149,
-169,224,254,105,249,112,255,117,139,224,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
-1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
-0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
-1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
-0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
-1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
-0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
-1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
-0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,255,255,199,192,1,0,255,255,185,176,0,4,69,68,84,
-0,69,83,84,0,0,0
-};
diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
deleted file mode 100644
index 9b6733f..0000000
--- a/winsup/cygwin/uinfo.cc
+++ /dev/null
@@ -1,589 +0,0 @@
-/* uinfo.cc: user info (uid, gid, etc...)
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <unistd.h>
-#include <wininet.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <lm.h>
-#include <iptypes.h>
-#include <sys/cygwin.h>
-#include "cygerrno.h"
-#include "pinfo.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "shared_info.h"
-#include "registry.h"
-#include "child_info.h"
-#include "environ.h"
-#include "pwdgrp.h"
-#include "tls_pbuf.h"
-#include "ntdll.h"
-
-/* Initialize the part of cygheap_user that does not depend on files.
- The information is used in shared.cc for the user shared.
- Final initialization occurs in uinfo_init */
-void
-cygheap_user::init ()
-{
- char user_name[UNLEN + 1];
- DWORD user_name_len = UNLEN + 1;
-
- set_name (GetUserName (user_name, &user_name_len) ? user_name : "unknown");
-
- DWORD siz;
- PSECURITY_DESCRIPTOR psd;
-
- if (!GetTokenInformation (hProcToken, TokenPrimaryGroup,
- &groups.pgsid, sizeof (cygsid), &siz))
- system_printf ("GetTokenInformation (TokenPrimaryGroup), %E");
-
- /* Get the SID from current process and store it in effec_cygsid */
- if (!GetTokenInformation (hProcToken, TokenUser, &effec_cygsid,
- sizeof (cygsid), &siz))
- {
- system_printf ("GetTokenInformation (TokenUser), %E");
- return;
- }
-
- /* Set token owner to the same value as token user */
- if (!SetTokenInformation (hProcToken, TokenOwner, &effec_cygsid,
- sizeof (cygsid)))
- debug_printf ("SetTokenInformation(TokenOwner), %E");
-
- /* Standard way to build a security descriptor with the usual DACL */
- PSECURITY_ATTRIBUTES sa_buf = (PSECURITY_ATTRIBUTES) alloca (1024);
- psd = (PSECURITY_DESCRIPTOR)
- (sec_user_nih (sa_buf, sid()))->lpSecurityDescriptor;
-
- BOOL acl_exists, dummy;
- TOKEN_DEFAULT_DACL dacl;
- if (GetSecurityDescriptorDacl (psd, &acl_exists, &dacl.DefaultDacl, &dummy)
- && acl_exists && dacl.DefaultDacl)
- {
- NTSTATUS status;
-
- /* Set the default DACL and the process DACL */
- if (!SetTokenInformation (hProcToken, TokenDefaultDacl, &dacl,
- sizeof (dacl)))
- system_printf ("SetTokenInformation (TokenDefaultDacl), %E");
- if ((status = NtSetSecurityObject (hMainProc, DACL_SECURITY_INFORMATION,
- psd)))
- system_printf ("NtSetSecurityObject, %lx", status);
- }
- else
- system_printf("Cannot get dacl, %E");
-}
-
-void
-internal_getlogin (cygheap_user &user)
-{
- struct passwd *pw = NULL;
-
- cygpsid psid = user.sid ();
- pw = internal_getpwsid (psid);
-
- if (!pw && !(pw = internal_getpwnam (user.name ()))
- && !(pw = internal_getpwuid (DEFAULT_UID)))
- debug_printf ("user not found in augmented /etc/passwd");
- else
- {
- cygsid gsid;
-
- myself->uid = pw->pw_uid;
- myself->gid = pw->pw_gid;
- user.set_name (pw->pw_name);
- if (gsid.getfromgr (internal_getgrgid (pw->pw_gid)))
- {
- if (gsid != user.groups.pgsid)
- {
- /* Set primary group to the group in /etc/passwd. */
- if (!SetTokenInformation (hProcToken, TokenPrimaryGroup,
- &gsid, sizeof gsid))
- debug_printf ("SetTokenInformation(TokenPrimaryGroup), %E");
- else
- user.groups.pgsid = gsid;
- clear_procimptoken ();
- }
- }
- else
- debug_printf ("gsid not found in augmented /etc/group");
- }
- cygheap->user.ontherange (CH_HOME, pw);
-}
-
-void
-uinfo_init ()
-{
- if (child_proc_info && !cygheap->user.has_impersonation_tokens ())
- return;
-
- if (!child_proc_info)
- internal_getlogin (cygheap->user); /* Set the cygheap->user. */
- /* Conditions must match those in spawn to allow starting child
- processes with ruid != euid and rgid != egid. */
- else if (cygheap->user.issetuid ()
- && cygheap->user.saved_uid == cygheap->user.real_uid
- && cygheap->user.saved_gid == cygheap->user.real_gid
- && !cygheap->user.groups.issetgroups ())
- {
- cygheap->user.reimpersonate ();
- return;
- }
- else
- cygheap->user.close_impersonation_tokens ();
-
- cygheap->user.saved_uid = cygheap->user.real_uid = myself->uid;
- cygheap->user.saved_gid = cygheap->user.real_gid = myself->gid;
- cygheap->user.external_token = NO_IMPERSONATION;
- cygheap->user.internal_token = NO_IMPERSONATION;
- cygheap->user.curr_primary_token = NO_IMPERSONATION;
- cygheap->user.curr_imp_token = NO_IMPERSONATION;
- cygheap->user.set_saved_sid (); /* Update the original sid */
- cygheap->user.reimpersonate ();
-}
-
-extern "C" int
-getlogin_r (char *name, size_t namesize)
-{
- char *login = getlogin ();
- size_t len = strlen (login) + 1;
- if (len > namesize)
- return ERANGE;
- myfault efault;
- if (efault.faulted ())
- return EFAULT;
- strncpy (name, login, len);
- return 0;
-}
-
-extern "C" char *
-getlogin (void)
-{
- return strcpy (_my_tls.locals.username, cygheap->user.name ());
-}
-
-extern "C" __uid32_t
-getuid32 (void)
-{
- return cygheap->user.real_uid;
-}
-
-extern "C" __uid16_t
-getuid (void)
-{
- return cygheap->user.real_uid;
-}
-
-extern "C" __gid32_t
-getgid32 (void)
-{
- return cygheap->user.real_gid;
-}
-
-extern "C" __gid16_t
-getgid (void)
-{
- return cygheap->user.real_gid;
-}
-
-extern "C" __uid32_t
-geteuid32 (void)
-{
- return myself->uid;
-}
-
-extern "C" __uid16_t
-geteuid (void)
-{
- return myself->uid;
-}
-
-extern "C" __gid32_t
-getegid32 (void)
-{
- return myself->gid;
-}
-
-extern "C" __gid16_t
-getegid (void)
-{
- return myself->gid;
-}
-
-/* Not quite right - cuserid can change, getlogin can't */
-extern "C" char *
-cuserid (char *src)
-{
- if (!src)
- return getlogin ();
-
- strcpy (src, getlogin ());
- return src;
-}
-
-const char *
-cygheap_user::ontherange (homebodies what, struct passwd *pw)
-{
- LPUSER_INFO_3 ui = NULL;
- WCHAR wuser[UNLEN + 1];
- NET_API_STATUS ret;
- char homedrive_env_buf[3];
- char *newhomedrive = NULL;
- char *newhomepath = NULL;
- tmp_pathbuf tp;
-
- debug_printf ("what %d, pw %p", what, pw);
- if (what == CH_HOME)
- {
- char *p;
- if (homedrive)
- newhomedrive = homedrive;
- else if ((p = getenv ("HOMEDRIVE")))
- newhomedrive = p;
-
- if (homepath)
- newhomepath = homepath;
- else if ((p = getenv ("HOMEPATH")))
- newhomepath = p;
-
- if ((p = getenv ("HOME")))
- debug_printf ("HOME is already in the environment %s", p);
- else
- {
- if (pw && pw->pw_dir && *pw->pw_dir)
- {
- debug_printf ("Set HOME (from /etc/passwd) to %s", pw->pw_dir);
- setenv ("HOME", pw->pw_dir, 1);
- }
- else if (!newhomedrive || !newhomepath)
- setenv ("HOME", "/", 1);
- else
- {
- char *home = tp.c_get ();
- char *buf = tp.c_get ();
- strcpy (buf, newhomedrive);
- strcat (buf, newhomepath);
- cygwin_conv_path (CCP_WIN_A_TO_POSIX | CCP_ABSOLUTE, buf, home,
- NT_MAX_PATH);
- debug_printf ("Set HOME (from HOMEDRIVE/HOMEPATH) to %s", home);
- setenv ("HOME", home, 1);
- }
- }
- }
-
- if (what != CH_HOME && homepath == NULL && newhomepath == NULL)
- {
- char *homepath_env_buf = tp.c_get ();
- if (!pw)
- pw = internal_getpwnam (name ());
- if (pw && pw->pw_dir && *pw->pw_dir)
- cygwin_conv_path (CCP_POSIX_TO_WIN_A, pw->pw_dir, homepath_env_buf,
- NT_MAX_PATH);
- else
- {
- homepath_env_buf[0] = homepath_env_buf[1] = '\0';
- if (logsrv ())
- {
- WCHAR wlogsrv[INTERNET_MAX_HOST_NAME_LENGTH + 3];
- sys_mbstowcs (wlogsrv, sizeof (wlogsrv) / sizeof (*wlogsrv),
- logsrv ());
- sys_mbstowcs (wuser, sizeof (wuser) / sizeof (*wuser), winname ());
- if (!(ret = NetUserGetInfo (wlogsrv, wuser, 3, (LPBYTE *) &ui)))
- {
- sys_wcstombs (homepath_env_buf, NT_MAX_PATH,
- ui->usri3_home_dir);
- if (!homepath_env_buf[0])
- {
- sys_wcstombs (homepath_env_buf, NT_MAX_PATH,
- ui->usri3_home_dir_drive);
- if (homepath_env_buf[0])
- strcat (homepath_env_buf, "\\");
- else
- cygwin_conv_path (CCP_POSIX_TO_WIN_A | CCP_ABSOLUTE,
- "/", homepath_env_buf, NT_MAX_PATH);
- }
- }
- }
- if (ui)
- NetApiBufferFree (ui);
- }
-
- if (homepath_env_buf[1] != ':')
- {
- newhomedrive = almost_null;
- newhomepath = homepath_env_buf;
- }
- else
- {
- homedrive_env_buf[0] = homepath_env_buf[0];
- homedrive_env_buf[1] = homepath_env_buf[1];
- homedrive_env_buf[2] = '\0';
- newhomedrive = homedrive_env_buf;
- newhomepath = homepath_env_buf + 2;
- }
- }
-
- if (newhomedrive && newhomedrive != homedrive)
- cfree_and_set (homedrive, (newhomedrive == almost_null)
- ? almost_null : cstrdup (newhomedrive));
-
- if (newhomepath && newhomepath != homepath)
- cfree_and_set (homepath, cstrdup (newhomepath));
-
- switch (what)
- {
- case CH_HOMEDRIVE:
- return homedrive;
- case CH_HOMEPATH:
- return homepath;
- default:
- return homepath;
- }
-}
-
-const char *
-cygheap_user::test_uid (char *&what, const char *name, size_t namelen)
-{
- if (!what && !issetuid ())
- what = getwinenveq (name, namelen, HEAP_STR);
- return what;
-}
-
-const char *
-cygheap_user::env_logsrv (const char *name, size_t namelen)
-{
- if (test_uid (plogsrv, name, namelen))
- return plogsrv;
-
- const char *mydomain = domain ();
- const char *myname = winname ();
- if (!mydomain || ascii_strcasematch (myname, "SYSTEM"))
- return almost_null;
-
- WCHAR wdomain[MAX_DOMAIN_NAME_LEN + 1];
- WCHAR wlogsrv[INTERNET_MAX_HOST_NAME_LENGTH + 3];
- sys_mbstowcs (wdomain, MAX_DOMAIN_NAME_LEN + 1, mydomain);
- cfree_and_set (plogsrv, almost_null);
- if (get_logon_server (wdomain, wlogsrv, false))
- sys_wcstombs_alloc (&plogsrv, HEAP_STR, wlogsrv);
- return plogsrv;
-}
-
-const char *
-cygheap_user::env_domain (const char *name, size_t namelen)
-{
- if (pwinname && test_uid (pdomain, name, namelen))
- return pdomain;
-
- char username[UNLEN + 1];
- DWORD ulen = sizeof (username);
- char userdomain[DNLEN + 1];
- DWORD dlen = sizeof (userdomain);
- SID_NAME_USE use;
-
- cfree_and_set (pwinname, almost_null);
- cfree_and_set (pdomain, almost_null);
- if (!LookupAccountSid (NULL, sid (), username, &ulen,
- userdomain, &dlen, &use))
- __seterrno ();
- else
- {
- pwinname = cstrdup (username);
- pdomain = cstrdup (userdomain);
- }
- return pdomain;
-}
-
-const char *
-cygheap_user::env_userprofile (const char *name, size_t namelen)
-{
- if (test_uid (puserprof, name, namelen))
- return puserprof;
-
- WCHAR userprofile_env_buf[NT_MAX_PATH];
- WCHAR win_id[UNLEN + 1]; /* Large enough for SID */
-
- cfree_and_set (puserprof, almost_null);
- if (get_registry_hive_path (get_windows_id (win_id), userprofile_env_buf))
- sys_wcstombs_alloc (&puserprof, HEAP_STR, userprofile_env_buf);
-
- return puserprof;
-}
-
-const char *
-cygheap_user::env_homepath (const char *name, size_t namelen)
-{
- return ontherange (CH_HOMEPATH);
-}
-
-const char *
-cygheap_user::env_homedrive (const char *name, size_t namelen)
-{
- return ontherange (CH_HOMEDRIVE);
-}
-
-const char *
-cygheap_user::env_name (const char *name, size_t namelen)
-{
- if (!test_uid (pwinname, name, namelen))
- domain ();
- return pwinname;
-}
-
-const char *
-cygheap_user::env_systemroot (const char *name, size_t namelen)
-{
- if (!psystemroot)
- {
- int size = GetWindowsDirectory (NULL, 0);
- if (size > 0)
- {
- psystemroot = (char *) cmalloc_abort (HEAP_STR, ++size);
- size = GetWindowsDirectory (psystemroot, size);
- if (size <= 0)
- {
- cfree (psystemroot);
- psystemroot = NULL;
- }
- }
- if (size <= 0)
- debug_printf ("GetWindowsDirectory(), %E");
- }
- return psystemroot;
-}
-
-char *
-pwdgrp::next_str (char c)
-{
- char *res = lptr;
- lptr = strechr (lptr, c);
- if (*lptr)
- *lptr++ = '\0';
- return res;
-}
-
-bool
-pwdgrp::next_num (unsigned long& n)
-{
- char *p = next_str (':');
- char *cp;
- n = strtoul (p, &cp, 10);
- return p != cp && !*cp;
-}
-
-char *
-pwdgrp::add_line (char *eptr)
-{
- if (eptr)
- {
- lptr = eptr;
- eptr = strchr (lptr, '\n');
- if (eptr)
- {
- if (eptr > lptr && eptr[-1] == '\r')
- eptr[-1] = '\0';
- else
- *eptr = '\0';
- eptr++;
- }
- if (curr_lines >= max_lines)
- {
- max_lines += 10;
- *pwdgrp_buf = realloc (*pwdgrp_buf, max_lines * pwdgrp_buf_elem_size);
- }
- if ((this->*parse) ())
- curr_lines++;
- }
- return eptr;
-}
-
-void
-pwdgrp::load (const wchar_t *rel_path)
-{
- static const char failed[] = "failed";
- static const char succeeded[] = "succeeded";
- const char *res = failed;
- HANDLE fh = NULL;
-
- NTSTATUS status;
- OBJECT_ATTRIBUTES attr;
- IO_STATUS_BLOCK io;
- FILE_STANDARD_INFORMATION fsi;
-
- if (buf)
- free (buf);
- buf = NULL;
- curr_lines = 0;
-
- if (!path &&
- !(path = (PWCHAR) malloc ((wcslen (cygwin_shared->installation_root)
- + wcslen (rel_path) + 1) * sizeof (WCHAR))))
- {
- paranoid_printf ("malloc (%W) failed", rel_path);
- goto out;
- }
- wcpcpy (wcpcpy (path, cygwin_shared->installation_root), rel_path);
- RtlInitUnicodeString (&upath, path);
-
- InitializeObjectAttributes (&attr, &upath, OBJ_CASE_INSENSITIVE, NULL, NULL);
- etc_ix = etc::init (etc_ix, &attr);
-
- paranoid_printf ("%S", &upath);
-
- status = NtOpenFile (&fh, SYNCHRONIZE | FILE_READ_DATA, &attr, &io,
- FILE_SHARE_VALID_FLAGS, FILE_SYNCHRONOUS_IO_NONALERT);
- if (!NT_SUCCESS (status))
- {
- paranoid_printf ("NtOpenFile(%S) failed, status %p", &upath, status);
- goto out;
- }
- status = NtQueryInformationFile (fh, &io, &fsi, sizeof fsi,
- FileStandardInformation);
- if (!NT_SUCCESS (status))
- {
- paranoid_printf ("NtQueryInformationFile(%S) failed, status %p",
- &upath, status);
- goto out;
- }
- /* FIXME: Should we test for HighPart set? If so, the
- passwd or group file is way beyond what we can handle. */
- /* FIXME 2: It's still ugly that we keep the file in memory.
- Big organizations have naturally large passwd files. */
- buf = (char *) malloc (fsi.EndOfFile.LowPart + 1);
- if (!buf)
- {
- paranoid_printf ("malloc (%d) failed", fsi.EndOfFile.LowPart);
- goto out;
- }
- status = NtReadFile (fh, NULL, NULL, NULL, &io, buf, fsi.EndOfFile.LowPart,
- NULL, NULL);
- if (!NT_SUCCESS (status))
- {
- paranoid_printf ("NtReadFile(%S) failed, status %p", &upath, status);
- free (buf);
- goto out;
- }
- buf[fsi.EndOfFile.LowPart] = '\0';
- for (char *eptr = buf; (eptr = add_line (eptr)); )
- continue;
- debug_printf ("%W curr_lines %d", rel_path, curr_lines);
- res = succeeded;
-
-out:
- if (fh)
- NtClose (fh);
- debug_printf ("%W load %s", rel_path, res);
- initialized = true;
-}
diff --git a/winsup/cygwin/uname.cc b/winsup/cygwin/uname.cc
deleted file mode 100644
index 639c941..0000000
--- a/winsup/cygwin/uname.cc
+++ /dev/null
@@ -1,104 +0,0 @@
-/* uname.cc
-
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007 Red Hat, Inc.
- Written by Steve Chamberlain of Cygnus Support, sac@cygnus.com
- Rewritten by Geoffrey Noer of Cygnus Solutions, noer@cygnus.com
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <sys/utsname.h>
-#include "cygwin_version.h"
-#include "cygtls.h"
-
-/* uname: POSIX 4.4.1.1 */
-extern "C" int
-uname (struct utsname *name)
-{
- SYSTEM_INFO sysinfo;
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- char *snp = strstr (cygwin_version.dll_build_date, "SNP");
-
- memset (name, 0, sizeof (*name));
- __small_sprintf (name->sysname, "CYGWIN_%s", wincap.osname ());
-
-#if 0
- /* Recognition of the real 64 bit CPU inside of a WOW64 system, irritates
- build systems which think the native system is a 64 bit system. Since
- we're actually running in a 32 bit environment, it looks more correct
- just to use the CPU info given by WOW64. */
- if (wincap.is_wow64 ())
- GetNativeSystemInfo (&sysinfo);
- else
-#else
- /* But it seems ok to add a hint to the sysname, that we're running under
- WOW64. This might give an early clue if somebody encounters problems. */
- if (wincap.is_wow64 ())
- strncat (name->sysname, "-WOW64",
- sizeof name->sysname - strlen (name->sysname) - 1);
-#endif
- GetSystemInfo (&sysinfo);
-
- /* Computer name */
- cygwin_gethostname (name->nodename, sizeof (name->nodename) - 1);
-
- /* Cygwin dll release */
- __small_sprintf (name->release, "%d.%d.%d%s(%d.%d/%d/%d)",
- cygwin_version.dll_major / 1000,
- cygwin_version.dll_major % 1000,
- cygwin_version.dll_minor,
- snp ? "s" : "",
- cygwin_version.api_major,
- cygwin_version.api_minor,
- cygwin_version.shared_data,
- cygwin_version.mount_registry);
-
- /* Cygwin "version" aka build date */
- strcpy (name->version, cygwin_version.dll_build_date);
- if (snp)
- name->version[snp - cygwin_version.dll_build_date] = '\0';
-
- /* CPU type */
- switch (sysinfo.wProcessorArchitecture)
- {
- case PROCESSOR_ARCHITECTURE_INTEL:
- unsigned int ptype;
- if (sysinfo.wProcessorLevel < 3) /* Shouldn't happen. */
- ptype = 3;
- else if (sysinfo.wProcessorLevel > 9) /* P4 */
- ptype = 6;
- else
- ptype = sysinfo.wProcessorLevel;
- __small_sprintf (name->machine, "i%d86", ptype);
- break;
- case PROCESSOR_ARCHITECTURE_IA64:
- strcpy (name->machine, "ia64");
- break;
- case PROCESSOR_ARCHITECTURE_AMD64:
- strcpy (name->machine, "x86_64");
- break;
- case PROCESSOR_ARCHITECTURE_IA32_ON_WIN64:
- strcpy (name->machine, "ia32-win64");
- break;
- case PROCESSOR_ARCHITECTURE_ALPHA:
- strcpy (name->machine, "alpha");
- break;
- case PROCESSOR_ARCHITECTURE_MIPS:
- strcpy (name->machine, "mips");
- break;
- default:
- strcpy (name->machine, "unknown");
- break;
- }
-
- return 0;
-}
diff --git a/winsup/cygwin/wait.cc b/winsup/cygwin/wait.cc
deleted file mode 100644
index 8fc7f98..0000000
--- a/winsup/cygwin/wait.cc
+++ /dev/null
@@ -1,119 +0,0 @@
-/* wait.cc: Posix wait routines.
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 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. */
-
-#include "winsup.h"
-#include <sys/wait.h>
-#include "sigproc.h"
-#include "thread.h"
-#include "cygtls.h"
-
-/* This is called _wait and not wait because the real wait is defined
- in libc/syscalls/syswait.c. It calls us. */
-
-extern "C" pid_t
-wait (int *status)
-{
- return wait4 (-1, status, 0, NULL);
-}
-
-extern "C" pid_t
-waitpid (pid_t intpid, int *status, int options)
-{
- return wait4 (intpid, status, options, NULL);
-}
-
-extern "C" pid_t
-wait3 (int *status, int options, struct rusage *r)
-{
- return wait4 (-1, status, options, r);
-}
-
-/* Wait for any child to complete.
- * Note: this is not thread safe. Use of wait in multiple threads will
- * not work correctly.
- */
-
-extern "C" pid_t
-wait4 (int intpid, int *status, int options, struct rusage *r)
-{
- int res;
- HANDLE waitfor;
- waitq *w = &_my_tls.wq;
-
- pthread_testcancel ();
-
- while (1)
- {
- sig_dispatch_pending ();
- if (options & ~(WNOHANG | WUNTRACED))
- {
- set_errno (EINVAL);
- res = -1;
- break;
- }
-
- if (r)
- memset (r, 0, sizeof (*r));
-
- w->pid = intpid;
- w->options = options;
- w->rusage = r;
- sigproc_printf ("calling proc_subproc, pid %d, options %d",
- w->pid, w->options);
- if (!proc_subproc (PROC_WAIT, (DWORD) w))
- {
- set_errno (ENOSYS);
- paranoid_printf ("proc_subproc returned 0");
- res = -1;
- break;
- }
-
- if ((waitfor = w->ev) == NULL)
- goto nochildren;
-
- res = cancelable_wait (waitfor, INFINITE);
-
- sigproc_printf ("%d = WaitForSingleObject (...)", res);
-
- if (w->ev == NULL)
- {
- nochildren:
- /* found no children */
- set_errno (ECHILD);
- res = -1;
- break;
- }
-
- if (w->status == -1)
- {
- if (_my_tls.call_signal_handler ())
- continue;
- set_sig_errno (EINTR);
- res = -1;
- }
- else if (res != WAIT_OBJECT_0)
- {
- /* We shouldn't set errno to any random value if we can help it.
- See the Posix manual for a list of valid values for `errno'. */
- set_errno (EINVAL);
- res = -1;
- }
- else if ((res = w->pid) != 0 && status)
- *status = w->status;
- break;
- }
-
- sigproc_printf ("intpid %d, status %p, w->status %d, options %d, res %d",
- intpid, status, w->status, options, res);
- w->status = -1;
- if (res < 0)
- sigproc_printf ("*** errno %d", get_errno ());
- return res;
-}
diff --git a/winsup/cygwin/wchar.h b/winsup/cygwin/wchar.h
deleted file mode 100644
index b03d511..0000000
--- a/winsup/cygwin/wchar.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* wchar.h: Extra wchar defs
-
- Copyright 2007 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_WCHAR_H
-#define _CYGWIN_WCHAR_H
-
-#include_next <wchar.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#undef wcscasecmp
-#define wcscasecmp cygwin_wcscasecmp
-int __stdcall cygwin_wcscasecmp (const wchar_t *, const wchar_t *);
-
-#undef wcsncasecmp
-#define wcsncasecmp cygwin_wcsncasecmp
-int __stdcall cygwin_wcsncasecmp (const wchar_t *, const wchar_t *, size_t);
-
-#undef wcslwr
-#define wcslwr cygwin_wcslwr
-wchar_t * __stdcall cygwin_wcslwr (wchar_t *);
-
-#undef wcsupr
-#define wcsupr cygwin_wcsupr
-wchar_t * __stdcall cygwin_wcsupr (wchar_t *);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _CYGWIN_WCHAR_H */
diff --git a/winsup/cygwin/winbase.h b/winsup/cygwin/winbase.h
deleted file mode 100644
index 18f0be3..0000000
--- a/winsup/cygwin/winbase.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* winbase.h
-
- Copyright 2002, 2003, 2004, 2008 Red Hat, Inc.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include_next "winbase.h"
-
-#ifndef _WINBASE2_H
-#define _WINBASE2_H
-
-extern __inline__ long
-ilockincr (volatile long *m)
-{
- register int __res;
- __asm__ __volatile__ ("\n\
- movl $1,%0\n\
- lock xadd %0,%1\n\
- inc %0\n\
- ": "=&r" (__res), "=m" (*m): "m" (*m): "cc");
- return __res;
-}
-
-extern __inline__ long
-ilockdecr (volatile long *m)
-{
- register int __res;
- __asm__ __volatile__ ("\n\
- movl $0xffffffff,%0\n\
- lock xadd %0,%1\n\
- dec %0\n\
- ": "=&r" (__res), "=m" (*m): "m" (*m): "cc");
- return __res;
-}
-
-extern __inline__ long
-ilockexch (volatile long *t, long v)
-{
- register int __res;
- __asm__ __volatile__ ("\n\
-1: lock cmpxchgl %3,(%1)\n\
- jne 1b\n\
- ": "=a" (__res), "=q" (t): "1" (t), "q" (v), "0" (*t): "cc");
- return __res;
-}
-
-extern __inline__ long
-ilockcmpexch (volatile long *t, long v, long c)
-{
- register int __res;
- __asm__ __volatile__ ("\n\
- lock cmpxchgl %3,(%1)\n\
- ": "=a" (__res), "=q" (t) : "1" (t), "q" (v), "0" (c): "cc");
- return __res;
-}
-
-#undef InterlockedIncrement
-#define InterlockedIncrement ilockincr
-#undef InterlockedDecrement
-#define InterlockedDecrement ilockdecr
-#undef InterlockedExchange
-#define InterlockedExchange ilockexch
-#undef InterlockedCompareExchange
-#define InterlockedCompareExchange ilockcmpexch
-#endif /*_WINBASE2_H*/
diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc
deleted file mode 100644
index 646e3dc..0000000
--- a/winsup/cygwin/wincap.cc
+++ /dev/null
@@ -1,457 +0,0 @@
-/* wincap.cc -- figure out on which OS we're running. Set the
- capability class to the appropriate values.
-
- Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include "security.h"
-#include "ntdll.h"
-
-/* CV, 2008-10-23: All wincapc's have to be in the .cygwin_dll_common section,
- same as wincap itself. Otherwise the capability changes made in
- wincapc::init() are not propagated to any subsequently started process
- in the same session. I'm only writing this longish comment because I'm
- puzzled that this has never been noticed before... */
-
-/* Minimal set of capabilities which is equivalent to NT4. */
-wincaps wincap_unknown __attribute__((section (".cygwin_dll_common"), shared)) = {
- chunksize:0,
- heapslop:0x0,
- max_sys_priv:SE_CHANGE_NOTIFY_PRIVILEGE,
- is_server:false,
- has_dacl_protect:false,
- has_ip_helper_lib:false,
- has_broken_if_oper_status:false,
- has_physical_mem_access:true,
- has_process_io_counters:false,
- has_terminal_services:false,
- has_create_global_privilege:false,
- has_ioctl_storage_get_media_types_ex:false,
- has_extended_priority_class:false,
- has_guid_volumes:false,
- has_disk_ex_ioctls:false,
- has_disabled_user_tos_setting:false,
- has_fileid_dirinfo:false,
- has_exclusiveaddruse:false,
- has_enhanced_socket_security:false,
- has_buggy_restart_scan:false,
- has_mandatory_integrity_control:false,
- needs_logon_sid_in_sid_list:true,
- needs_count_in_si_lpres2:false,
- has_recycle_dot_bin:false,
- has_gaa_prefixes:false,
- has_gaa_on_link_prefix:false,
- supports_all_posix_ai_flags:false,
- has_restricted_stack_args:false,
- has_transactions:false,
- ts_has_dep_problem:false,
-};
-
-wincaps wincap_nt4 __attribute__((section (".cygwin_dll_common"), shared)) = {
- chunksize:0,
- heapslop:0x0,
- max_sys_priv:SE_CHANGE_NOTIFY_PRIVILEGE,
- is_server:false,
- has_dacl_protect:false,
- has_ip_helper_lib:false,
- has_broken_if_oper_status:false,
- has_physical_mem_access:true,
- has_process_io_counters:false,
- has_terminal_services:false,
- has_create_global_privilege:false,
- has_ioctl_storage_get_media_types_ex:false,
- has_extended_priority_class:false,
- has_guid_volumes:false,
- has_disk_ex_ioctls:false,
- has_disabled_user_tos_setting:false,
- has_fileid_dirinfo:false,
- has_exclusiveaddruse:false,
- has_enhanced_socket_security:false,
- has_buggy_restart_scan:false,
- has_mandatory_integrity_control:false,
- needs_logon_sid_in_sid_list:true,
- needs_count_in_si_lpres2:false,
- has_recycle_dot_bin:false,
- has_gaa_prefixes:false,
- has_gaa_on_link_prefix:false,
- supports_all_posix_ai_flags:false,
- has_restricted_stack_args:false,
- has_transactions:false,
- ts_has_dep_problem:false,
-};
-
-wincaps wincap_nt4sp4 __attribute__((section (".cygwin_dll_common"), shared)) = {
- chunksize:0,
- heapslop:0x0,
- max_sys_priv:SE_CHANGE_NOTIFY_PRIVILEGE,
- is_server:false,
- has_dacl_protect:false,
- has_ip_helper_lib:true,
- has_broken_if_oper_status:true,
- has_physical_mem_access:true,
- has_process_io_counters:false,
- has_terminal_services:false,
- has_create_global_privilege:false,
- has_ioctl_storage_get_media_types_ex:false,
- has_extended_priority_class:false,
- has_guid_volumes:false,
- has_disk_ex_ioctls:false,
- has_disabled_user_tos_setting:false,
- has_fileid_dirinfo:false,
- has_exclusiveaddruse:true,
- has_enhanced_socket_security:false,
- has_buggy_restart_scan:false,
- has_mandatory_integrity_control:false,
- needs_logon_sid_in_sid_list:true,
- needs_count_in_si_lpres2:false,
- has_recycle_dot_bin:false,
- has_gaa_prefixes:false,
- has_gaa_on_link_prefix:false,
- supports_all_posix_ai_flags:false,
- has_restricted_stack_args:false,
- has_transactions:false,
- ts_has_dep_problem:false,
-};
-
-wincaps wincap_2000 __attribute__((section (".cygwin_dll_common"), shared)) = {
- chunksize:0,
- heapslop:0x0,
- max_sys_priv:SE_MANAGE_VOLUME_PRIVILEGE,
- is_server:false,
- has_dacl_protect:true,
- has_ip_helper_lib:true,
- has_broken_if_oper_status:false,
- has_physical_mem_access:true,
- has_process_io_counters:true,
- has_terminal_services:true,
- has_create_global_privilege:false,
- has_ioctl_storage_get_media_types_ex:false,
- has_extended_priority_class:true,
- has_guid_volumes:true,
- has_disk_ex_ioctls:false,
- has_disabled_user_tos_setting:true,
- has_fileid_dirinfo:true,
- has_exclusiveaddruse:true,
- has_enhanced_socket_security:false,
- has_buggy_restart_scan:true,
- has_mandatory_integrity_control:false,
- needs_logon_sid_in_sid_list:true,
- needs_count_in_si_lpres2:false,
- has_recycle_dot_bin:false,
- has_gaa_prefixes:false,
- has_gaa_on_link_prefix:false,
- supports_all_posix_ai_flags:false,
- has_restricted_stack_args:false,
- has_transactions:false,
- ts_has_dep_problem:false,
-};
-
-wincaps wincap_2000sp4 __attribute__((section (".cygwin_dll_common"), shared)) = {
- chunksize:0,
- heapslop:0x0,
- max_sys_priv:SE_CREATE_GLOBAL_PRIVILEGE,
- is_server:false,
- has_dacl_protect:true,
- has_ip_helper_lib:true,
- has_broken_if_oper_status:false,
- has_physical_mem_access:true,
- has_process_io_counters:true,
- has_terminal_services:true,
- has_create_global_privilege:true,
- has_ioctl_storage_get_media_types_ex:false,
- has_extended_priority_class:true,
- has_guid_volumes:true,
- has_disk_ex_ioctls:false,
- has_disabled_user_tos_setting:true,
- has_fileid_dirinfo:true,
- has_exclusiveaddruse:true,
- has_enhanced_socket_security:false,
- has_buggy_restart_scan:true,
- has_mandatory_integrity_control:false,
- needs_logon_sid_in_sid_list:true,
- needs_count_in_si_lpres2:false,
- has_recycle_dot_bin:false,
- has_gaa_prefixes:false,
- has_gaa_on_link_prefix:false,
- supports_all_posix_ai_flags:false,
- has_restricted_stack_args:false,
- has_transactions:false,
- ts_has_dep_problem:false,
-};
-
-wincaps wincap_xp __attribute__((section (".cygwin_dll_common"), shared)) = {
- chunksize:0,
- heapslop:0x0,
- max_sys_priv:SE_MANAGE_VOLUME_PRIVILEGE,
- is_server:false,
- has_dacl_protect:true,
- has_ip_helper_lib:true,
- has_broken_if_oper_status:false,
- has_physical_mem_access:true,
- has_process_io_counters:true,
- has_terminal_services:true,
- has_create_global_privilege:false,
- has_ioctl_storage_get_media_types_ex:true,
- has_extended_priority_class:true,
- has_guid_volumes:true,
- has_disk_ex_ioctls:true,
- has_disabled_user_tos_setting:true,
- has_fileid_dirinfo:true,
- has_exclusiveaddruse:true,
- has_enhanced_socket_security:false,
- has_buggy_restart_scan:false,
- has_mandatory_integrity_control:false,
- needs_logon_sid_in_sid_list:false,
- needs_count_in_si_lpres2:false,
- has_recycle_dot_bin:false,
- has_gaa_prefixes:false,
- has_gaa_on_link_prefix:false,
- supports_all_posix_ai_flags:false,
- has_restricted_stack_args:false,
- has_transactions:false,
- ts_has_dep_problem:false,
-};
-
-wincaps wincap_xpsp1 __attribute__((section (".cygwin_dll_common"), shared)) = {
- chunksize:0,
- heapslop:0x0,
- max_sys_priv:SE_MANAGE_VOLUME_PRIVILEGE,
- is_server:false,
- has_dacl_protect:true,
- has_ip_helper_lib:true,
- has_broken_if_oper_status:false,
- has_physical_mem_access:true,
- has_process_io_counters:true,
- has_terminal_services:true,
- has_create_global_privilege:false,
- has_ioctl_storage_get_media_types_ex:true,
- has_extended_priority_class:true,
- has_guid_volumes:true,
- has_disk_ex_ioctls:true,
- has_disabled_user_tos_setting:true,
- has_fileid_dirinfo:true,
- has_exclusiveaddruse:true,
- has_enhanced_socket_security:false,
- has_buggy_restart_scan:false,
- has_mandatory_integrity_control:false,
- needs_logon_sid_in_sid_list:false,
- needs_count_in_si_lpres2:false,
- has_recycle_dot_bin:false,
- has_gaa_prefixes:true,
- has_gaa_on_link_prefix:false,
- supports_all_posix_ai_flags:false,
- has_restricted_stack_args:false,
- has_transactions:false,
- ts_has_dep_problem:false,
-};
-
-wincaps wincap_xpsp2 __attribute__((section (".cygwin_dll_common"), shared)) = {
- chunksize:0,
- heapslop:0x0,
- max_sys_priv:SE_CREATE_GLOBAL_PRIVILEGE,
- is_server:false,
- has_dacl_protect:true,
- has_ip_helper_lib:true,
- has_broken_if_oper_status:false,
- has_physical_mem_access:true,
- has_process_io_counters:true,
- has_terminal_services:true,
- has_create_global_privilege:true,
- has_ioctl_storage_get_media_types_ex:true,
- has_extended_priority_class:true,
- has_guid_volumes:true,
- has_disk_ex_ioctls:true,
- has_disabled_user_tos_setting:true,
- has_fileid_dirinfo:true,
- has_exclusiveaddruse:true,
- has_enhanced_socket_security:false,
- has_buggy_restart_scan:false,
- has_mandatory_integrity_control:false,
- needs_logon_sid_in_sid_list:false,
- needs_count_in_si_lpres2:false,
- has_recycle_dot_bin:false,
- has_gaa_prefixes:true,
- has_gaa_on_link_prefix:false,
- supports_all_posix_ai_flags:false,
- has_restricted_stack_args:false,
- has_transactions:false,
- ts_has_dep_problem:false,
-};
-
-wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = {
- chunksize:0,
- heapslop:0x4,
- max_sys_priv:SE_CREATE_GLOBAL_PRIVILEGE,
- is_server:true,
- has_dacl_protect:true,
- has_ip_helper_lib:true,
- has_broken_if_oper_status:false,
- has_physical_mem_access:false,
- has_process_io_counters:true,
- has_terminal_services:true,
- has_create_global_privilege:true,
- has_ioctl_storage_get_media_types_ex:true,
- has_extended_priority_class:true,
- has_guid_volumes:true,
- has_disk_ex_ioctls:true,
- has_disabled_user_tos_setting:true,
- has_fileid_dirinfo:true,
- has_exclusiveaddruse:true,
- has_enhanced_socket_security:true,
- has_buggy_restart_scan:false,
- has_mandatory_integrity_control:false,
- needs_logon_sid_in_sid_list:false,
- needs_count_in_si_lpres2:false,
- has_recycle_dot_bin:false,
- has_gaa_prefixes:true,
- has_gaa_on_link_prefix:false,
- supports_all_posix_ai_flags:false,
- has_restricted_stack_args:true,
- has_transactions:false,
- ts_has_dep_problem:false,
-};
-
-wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = {
- chunksize:0,
- heapslop:0x4,
- max_sys_priv:SE_CREATE_SYMBOLIC_LINK_PRIVILEGE,
- is_server:false,
- has_dacl_protect:true,
- has_ip_helper_lib:true,
- has_broken_if_oper_status:false,
- has_physical_mem_access:false,
- has_process_io_counters:true,
- has_terminal_services:true,
- has_create_global_privilege:true,
- has_ioctl_storage_get_media_types_ex:true,
- has_extended_priority_class:true,
- has_guid_volumes:true,
- has_disk_ex_ioctls:true,
- has_disabled_user_tos_setting:true,
- has_fileid_dirinfo:true,
- has_exclusiveaddruse:true,
- has_enhanced_socket_security:true,
- has_buggy_restart_scan:false,
- has_mandatory_integrity_control:true,
- needs_logon_sid_in_sid_list:false,
- needs_count_in_si_lpres2:true,
- has_recycle_dot_bin:true,
- has_gaa_prefixes:true,
- has_gaa_on_link_prefix:true,
- supports_all_posix_ai_flags:true,
- has_restricted_stack_args:false,
- has_transactions:true,
- ts_has_dep_problem:false,
-};
-
-wincapc wincap __attribute__((section (".cygwin_dll_common"), shared));
-
-void
-wincapc::init ()
-{
- bool has_osversioninfoex = true;
-
- if (caps)
- return; // already initialized
-
- memset (&version, 0, sizeof version);
- /* Request versionex info first, which is available on all systems since
- NT4 SP6 anyway. If that fails, call the simple version. */
- version.dwOSVersionInfoSize = sizeof (OSVERSIONINFOEX);
- if (!GetVersionEx (reinterpret_cast<LPOSVERSIONINFO>(&version)))
- {
- has_osversioninfoex = false;
- version.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
- GetVersionEx (reinterpret_cast<LPOSVERSIONINFO>(&version));
- }
-
- switch (version.dwPlatformId)
- {
- case VER_PLATFORM_WIN32_NT:
- switch (version.dwMajorVersion)
- {
- case 4:
- if (!has_osversioninfoex
- && strcmp (version.szCSDVersion, "Service Pack 4") < 0)
- caps = &wincap_nt4;
- else
- caps = &wincap_nt4sp4;
- break;
- case 5:
- switch (version.dwMinorVersion)
- {
- case 0:
- if (version.wServicePackMajor < 4)
- caps = &wincap_2000;
- else
- caps = &wincap_2000sp4;
- break;
-
- case 1:
- caps = &wincap_xp;
- switch (version.wServicePackMajor)
- {
- case 0:
- caps = &wincap_xp;
- case 1:
- caps = &wincap_xpsp1;
- default:
- caps = &wincap_xpsp2;
- }
- break;
-
- default:
- caps = &wincap_2003;
- }
- break;
- case 6:
- caps = &wincap_vista;
- break;
- default:
- caps = &wincap_unknown;
- break;
- }
- break;
- case VER_PLATFORM_WIN32_WINDOWS:
- /* I'd be very surprised if this code is ever hit, but it doesn't
- hurt to keep it. */
- api_fatal ("Windows 95/98/Me are not supported.");
- break;
- default:
- caps = &wincap_unknown;
- break;
- }
-
- if (has_osversioninfoex && version.wProductType != VER_NT_WORKSTATION)
- {
- ((wincaps *)caps)->is_server = true;
- if (version.dwMajorVersion >= 6
- && (version.wSuiteMask
- & (VER_SUITE_TERMINAL | VER_SUITE_SINGLEUSERTS))
- == VER_SUITE_TERMINAL)
- ((wincaps *)caps)->ts_has_dep_problem = true;
- }
- if (NT_SUCCESS (NtQueryInformationProcess (GetCurrentProcess (),
- ProcessWow64Information,
- &wow64, sizeof wow64, NULL))
- && !wow64)
- {
- ((wincaps *)caps)->needs_count_in_si_lpres2 = false;
- ((wincaps *)caps)->has_restricted_stack_args = false;
- }
-
- __small_sprintf (osnam, "NT-%d.%d", version.dwMajorVersion,
- version.dwMinorVersion);
-}
-
-void
-wincapc::set_chunksize (DWORD nchunksize)
-{
- ((wincaps *)caps)->chunksize = nchunksize;
-}
diff --git a/winsup/cygwin/wincap.h b/winsup/cygwin/wincap.h
deleted file mode 100644
index 038bf0b..0000000
--- a/winsup/cygwin/wincap.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/* wincap.h: Header for OS capability class.
-
- Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 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 _WINCAP_H
-#define _WINCAP_H
-
-struct wincaps
-{
- DWORD chunksize;
- DWORD heapslop;
- DWORD max_sys_priv;
- unsigned is_server : 1;
- unsigned has_dacl_protect : 1;
- unsigned has_ip_helper_lib : 1;
- unsigned has_broken_if_oper_status : 1;
- unsigned has_physical_mem_access : 1;
- unsigned has_process_io_counters : 1;
- unsigned has_terminal_services : 1;
- unsigned has_create_global_privilege : 1;
- unsigned has_ioctl_storage_get_media_types_ex : 1;
- unsigned has_extended_priority_class : 1;
- unsigned has_guid_volumes : 1;
- unsigned has_disk_ex_ioctls : 1;
- unsigned has_disabled_user_tos_setting : 1;
- unsigned has_fileid_dirinfo : 1;
- unsigned has_exclusiveaddruse : 1;
- unsigned has_enhanced_socket_security : 1;
- unsigned has_buggy_restart_scan : 1;
- unsigned has_mandatory_integrity_control : 1;
- unsigned needs_logon_sid_in_sid_list : 1;
- unsigned needs_count_in_si_lpres2 : 1;
- unsigned has_recycle_dot_bin : 1;
- unsigned has_gaa_prefixes : 1;
- unsigned has_gaa_on_link_prefix : 1;
- unsigned supports_all_posix_ai_flags : 1;
- unsigned has_restricted_stack_args : 1;
- unsigned has_transactions : 1;
- unsigned ts_has_dep_problem : 1;
-};
-
-class wincapc
-{
- OSVERSIONINFOEX version;
- char osnam[40];
- ULONG wow64;
- void *caps;
-
-public:
- void init ();
-
- void set_chunksize (DWORD nchunksize);
-
- const char *osname () const { return osnam; }
- const bool is_wow64 () const { return wow64; }
-
-#define IMPLEMENT(cap) cap() const { return ((wincaps *) this->caps)->cap; }
-
- DWORD IMPLEMENT (chunksize)
- DWORD IMPLEMENT (heapslop)
- DWORD IMPLEMENT (max_sys_priv)
- bool IMPLEMENT (is_server)
- bool IMPLEMENT (has_dacl_protect)
- bool IMPLEMENT (has_ip_helper_lib)
- bool IMPLEMENT (has_broken_if_oper_status)
- bool IMPLEMENT (has_physical_mem_access)
- bool IMPLEMENT (has_process_io_counters)
- bool IMPLEMENT (has_terminal_services)
- bool IMPLEMENT (has_create_global_privilege)
- bool IMPLEMENT (has_ioctl_storage_get_media_types_ex)
- bool IMPLEMENT (has_extended_priority_class)
- bool IMPLEMENT (has_guid_volumes)
- bool IMPLEMENT (has_disk_ex_ioctls)
- bool IMPLEMENT (has_disabled_user_tos_setting)
- bool IMPLEMENT (has_fileid_dirinfo)
- bool IMPLEMENT (has_exclusiveaddruse)
- bool IMPLEMENT (has_enhanced_socket_security)
- bool IMPLEMENT (has_buggy_restart_scan)
- bool IMPLEMENT (has_mandatory_integrity_control)
- bool IMPLEMENT (needs_logon_sid_in_sid_list)
- bool IMPLEMENT (needs_count_in_si_lpres2)
- bool IMPLEMENT (has_recycle_dot_bin)
- bool IMPLEMENT (has_gaa_prefixes)
- bool IMPLEMENT (has_gaa_on_link_prefix)
- bool IMPLEMENT (supports_all_posix_ai_flags)
- bool IMPLEMENT (has_restricted_stack_args)
- bool IMPLEMENT (has_transactions)
- bool IMPLEMENT (ts_has_dep_problem)
-
-#undef IMPLEMENT
-};
-
-extern wincapc wincap;
-
-#endif /* _WINCAP_H */
diff --git a/winsup/cygwin/window.cc b/winsup/cygwin/window.cc
deleted file mode 100644
index ac00a0c..0000000
--- a/winsup/cygwin/window.cc
+++ /dev/null
@@ -1,133 +0,0 @@
-/* window.cc: hidden windows for signals/itimer support
-
- Copyright 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005 Red Hat, Inc.
-
- Written by Sergey Okhapkin <sos@prospect.com.ru>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <sys/time.h>
-#include <wingdi.h>
-#include <winuser.h>
-#define USE_SYS_TYPES_FD_SET
-#include <winsock2.h>
-#include "perprocess.h"
-#include "cygtls.h"
-#include "sync.h"
-#include "wininfo.h"
-
-wininfo NO_COPY winmsg;
-
-muto NO_COPY wininfo::_lock;
-
-int __stdcall
-wininfo::process (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
-#ifndef NOSTRACE
- strace.wm (uMsg, wParam, lParam);
-#endif
- switch (uMsg)
- {
- case WM_PAINT:
- return 0;
- case WM_DESTROY:
- PostQuitMessage (0);
- return 0;
- case WM_ASYNCIO:
- if (WSAGETSELECTEVENT (lParam) == FD_OOB)
- raise (SIGURG);
- else
- raise (SIGIO);
- return 0;
- default:
- return DefWindowProc (hwnd, uMsg, wParam, lParam);
- }
-}
-
-static LRESULT CALLBACK
-process_window_events (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- return winmsg.process (hwnd, uMsg, wParam, lParam);
-}
-
-/* Handle windows events. Inherits ownership of the wininfo lock */
-DWORD WINAPI
-wininfo::winthread ()
-{
- MSG msg;
- WNDCLASS wc;
- static NO_COPY char classname[] = "CygwinWndClass";
-
- _lock.grab ();
- /* Register the window class for the main window. */
-
- wc.style = 0;
- wc.lpfnWndProc = (WNDPROC) process_window_events;
- wc.cbClsExtra = 0;
- wc.cbWndExtra = 0;
- wc.hInstance = user_data->hmodule;
- wc.hIcon = NULL;
- wc.hCursor = NULL;
- wc.hbrBackground = NULL;
- wc.lpszMenuName = NULL;
- wc.lpszClassName = classname;
-
- if (!RegisterClass (&wc))
- api_fatal ("cannot register window class, %E");
-
- /* Create hidden window. */
- hwnd = CreateWindow (classname, classname, WS_POPUP, CW_USEDEFAULT,
- CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
- (HWND) NULL, (HMENU) NULL, user_data->hmodule,
- (LPVOID) NULL);
- if (!hwnd)
- api_fatal ("couldn't create window, %E");
- release ();
-
- while (GetMessage (&msg, hwnd, 0, 0) == TRUE)
- DispatchMessage (&msg);
-
- return 0;
-}
-
-static DWORD WINAPI
-winthread (VOID *arg)
-{
- return ((wininfo *) arg)->winthread ();
-}
-
-wininfo::operator
-HWND ()
-{
- if (hwnd)
- return hwnd;
-
- lock ();
- if (!hwnd)
- {
- _lock.upforgrabs ();
- cygthread *h = new cygthread (::winthread, 0, this, "win");
- h->SetThreadPriority (THREAD_PRIORITY_HIGHEST);
- h->zap_h ();
- lock ();
- }
- release ();
- return hwnd;
-}
-
-void
-wininfo::lock ()
-{
- _lock.init ("wininfo_lock")->acquire ();
-}
-
-void
-wininfo::release ()
-{
- _lock.release ();
-}
diff --git a/winsup/cygwin/winf.cc b/winsup/cygwin/winf.cc
deleted file mode 100644
index f4e094b..0000000
--- a/winsup/cygwin/winf.cc
+++ /dev/null
@@ -1,154 +0,0 @@
-/* winf.cc
-
- Copyright 2003, 2004, 2005, 2006, 2008 Red Hat, Inc.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include "winsup.h"
-#include <stdlib.h>
-#include "cygerrno.h"
-#include "security.h"
-#include "path.h"
-#include "fhandler.h"
-#include "dtable.h"
-#include "cygheap.h"
-#include "tls_pbuf.h"
-#include "winf.h"
-#include "sys/cygwin.h"
-
-void
-linebuf::finish (bool cmdlenoverflow_ok)
-{
- if (!ix)
- add ("", 1);
- else
- {
- if (ix-- > MAXCYGWINCMDLEN && cmdlenoverflow_ok)
- ix = MAXCYGWINCMDLEN - 1;
- buf[ix] = '\0';
- }
-}
-
-void
-linebuf::add (const char *what, int len)
-{
- size_t newix = ix + len;
- if (newix >= alloced || !buf)
- {
- alloced += LINE_BUF_CHUNK + newix;
- buf = (char *) realloc (buf, alloced + 1);
- }
- memcpy (buf + ix, what, len);
- ix = newix;
- buf[ix] = '\0';
-}
-
-void
-linebuf::prepend (const char *what, int len)
-{
- int buflen;
- size_t newix;
- if ((newix = ix + len) >= alloced)
- {
- alloced += LINE_BUF_CHUNK + newix;
- buf = (char *) realloc (buf, alloced + 1);
- buf[ix] = '\0';
- }
- if ((buflen = strlen (buf)))
- memmove (buf + len, buf, buflen + 1);
- else
- buf[newix] = '\0';
- memcpy (buf, what, len);
- ix = newix;
-}
-
-bool
-linebuf::fromargv (av& newargv, char *real_path, bool cmdlenoverflow_ok)
-{
- bool success = true;
- for (int i = 0; i < newargv.argc; i++)
- {
- char *p = NULL;
- const char *a;
-
- newargv.dup_maybe (i);
- a = i ? newargv[i] : (char *) real_path;
- int len = strlen (a);
- if (len != 0 && !strpbrk (a, " \t\n\r\""))
- add (a, len);
- else
- {
- add ("\"", 1);
- /* Handle embedded special characters " and \.
- A " is always preceded by a \.
- A \ is not special unless it precedes a ". If it does,
- then all preceding \'s must be doubled to avoid having
- the Windows command line parser interpret the \ as quoting
- the ". This rule applies to a string of \'s before the end
- of the string, since cygwin/windows uses a " to delimit the
- argument. */
- for (; (p = strpbrk (a, "\"\\")); a = ++p)
- {
- add (a, p - a);
- /* Find length of string of backslashes */
- int n = strspn (p, "\\");
- if (!n)
- add ("\\\"", 2); /* No backslashes, so it must be a ".
- The " has to be protected with a backslash. */
- else
- {
- add (p, n); /* Add the run of backslashes */
- /* Need to double up all of the preceding
- backslashes if they precede a quote or EOS. */
- if (!p[n] || p[n] == '"')
- add (p, n);
- p += n - 1; /* Point to last backslash */
- }
- }
- if (*a)
- add (a);
- add ("\"", 1);
- }
- add (" ", 1);
- }
-
- finish (cmdlenoverflow_ok);
-
- if (ix >= MAXWINCMDLEN)
- {
- debug_printf ("command line too long (>32K), return E2BIG");
- set_errno (E2BIG);
- success = false;
- }
-
- return success;
-}
-
-int
-av::unshift (const char *what, int conv)
-{
- char **av;
- av = (char **) crealloc (argv, (argc + 2) * sizeof (char *));
- if (!av)
- return 0;
-
- argv = av;
- memmove (argv + 1, argv, (argc + 1) * sizeof (char *));
- tmp_pathbuf tp;
- char *buf = tp.c_get ();
- if (conv)
- {
- cygwin_conv_path (CCP_WIN_A_TO_POSIX | CCP_RELATIVE, what, buf,
- NT_MAX_PATH);
- char *p = strchr (buf, '\0') - 4;
- if (p > buf && ascii_strcasematch (p, ".exe"))
- *p = '\0';
- what = buf;
- }
- *argv = cstrdup1 (what);
- calloced++;
- argc++;
- return 1;
-}
diff --git a/winsup/cygwin/winf.h b/winsup/cygwin/winf.h
deleted file mode 100644
index 8fb6470..0000000
--- a/winsup/cygwin/winf.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* winf.h
-
- Copyright 2006, 2007 Red Hat, Inc.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _WINF_H
-#define _WINF_H
-
-/* Hack for Cygwin processes. If the Windows command line length gets slightly
- bigger than this value, the stack position is suddenly moved up by 64K for
- no apparent reason, which results in subsequent forks failing. Since Cygwin
- processes get the full command line as argv array anyway, this only affects
- the maximum command line length of Cygwin applications which nonsensically
- have a WinMain instead of a main entry point or which use GetCommandLine. */
-#define MAXCYGWINCMDLEN 30000
-
-#define MAXWINCMDLEN 32767
-#define LINE_BUF_CHUNK (MAX_PATH * 2)
-
-class av
-{
- char **argv;
- int calloced;
- public:
- int argc;
- bool win16_exe;
- av (): argv (NULL) {}
- av (int ac_in, const char * const *av_in) : calloced (0), argc (ac_in), win16_exe (false)
- {
- argv = (char **) cmalloc_abort (HEAP_1_ARGV, (argc + 5) * sizeof (char *));
- memcpy (argv, av_in, (argc + 1) * sizeof (char *));
- }
- void *operator new (size_t, void *p) __attribute__ ((nothrow)) {return p;}
- void set (int ac_in, const char * const *av_in) {new (this) av (ac_in, av_in);}
- ~av ()
- {
- if (argv)
- {
- for (int i = 0; i < calloced; i++)
- if (argv[i])
- cfree (argv[i]);
- cfree (argv);
- }
- }
- int unshift (const char *what, int conv = 0);
- operator char **() {return argv;}
- void all_calloced () {calloced = argc;}
- void replace0_maybe (const char *arg0)
- {
- /* Note: Assumes that argv array has not yet been "unshifted" */
- if (!calloced)
- {
- argv[0] = cstrdup1 (arg0);
- calloced = true;
- }
- }
- void dup_maybe (int i)
- {
- if (i >= calloced)
- argv[i] = cstrdup1 (argv[i]);
- }
- void dup_all ()
- {
- for (int i = calloced; i < argc; i++)
- argv[i] = cstrdup1 (argv[i]);
- }
- int fixup (const char *, path_conv&, const char *);
-};
-
-class linebuf
-{
- public:
- size_t ix;
- char *buf;
- size_t alloced;
- linebuf () : ix (0), buf (NULL), alloced (0) {}
- ~linebuf () {if (buf) free (buf);}
- void add (const char *what, int len) __attribute__ ((regparm (3)));
- void add (const char *what) {add (what, strlen (what));}
- void prepend (const char *what, int len);
- void finish (bool) __attribute__ ((regparm (2)));
- bool fromargv(av&, char *, bool) __attribute__ ((regparm (3)));;
- operator char *() {return buf;}
-};
-
-#endif /*_WINF_H*/
diff --git a/winsup/cygwin/wininfo.h b/winsup/cygwin/wininfo.h
deleted file mode 100644
index f67cf9a..0000000
--- a/winsup/cygwin/wininfo.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* wininfo.h: main Cygwin header file.
-
- Copyright 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. */
-
-class muto;
-class wininfo
-{
- HWND hwnd;
- static muto _lock;
-public:
- operator HWND ();
- int __stdcall process (HWND, UINT, WPARAM, LPARAM)
- __attribute__ ((regparm (3)));
- void lock ();
- void release ();
- DWORD WINAPI winthread () __attribute__ ((regparm (1)));
-};
-
-extern wininfo winmsg;
diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h
deleted file mode 100644
index f4e4179..0000000
--- a/winsup/cygwin/winsup.h
+++ /dev/null
@@ -1,387 +0,0 @@
-/* winsup.h: main Cygwin header file.
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008 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 DEBUGIT
-#define spf(a, b, c) small_printf (a, b, c)
-#else
-#define spf(a, b, c) do {} while (0)
-#endif
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#define __INSIDE_CYGWIN__
-
-#define NO_COPY __attribute__((nocommon)) __attribute__((section(".data_cygwin_nocopy")))
-#define NO_COPY_INIT __attribute__((section(".data_cygwin_nocopy")))
-
-#define EXPORT_ALIAS(sym,symalias) extern "C" __typeof (sym) symalias __attribute__ ((alias(#sym)));
-
-#define WINVER 0x0601
-#define _NO_W32_PSEUDO_MODIFIERS
-
-#include <sys/types.h>
-#include <sys/strace.h>
-
-/* Declarations for functions used in C and C++ code. */
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern __uid32_t getuid32 ();
-extern __uid32_t geteuid32 ();
-extern int seteuid32 (__uid32_t);
-extern __gid32_t getegid32 (void);
-extern struct passwd *getpwuid32 (__uid32_t);
-extern struct passwd *getpwnam (const char *);
-extern struct __sFILE64 *fopen64 (const char *, const char *);
-extern struct hostent *cygwin_gethostbyname (const char *name);
-/* Don't enforce definition of in_addr_t. */
-extern uint32_t cygwin_inet_addr (const char *cp);
-extern int fcntl64 (int fd, int cmd, ...);
-#ifdef __cplusplus
-}
-#endif
-
-/* Note that MAX_PATH is defined in the windows headers */
-/* There is also PATH_MAX and MAXPATHLEN.
- PATH_MAX is from Posix and does include the trailing NUL.
- MAXPATHLEN is from Unix.
-
- Thou shalt *not* use CYG_MAX_PATH anymore. Use NT_MAX_PATH or
- dynamic allocation instead when accessing real files. Use
- MAX_PATH in case you need a convenient small buffer when creating
- names for synchronization objects or named pipes. */
-#define CYG_MAX_PATH (MAX_PATH)
-
-/* There's no define for the maximum path length the NT kernel can handle.
- That's why we define our own to use in path length test and for path
- buffer sizes. As MAX_PATH and PATH_MAX, this is defined including the
- trailing 0. Internal buffers and internal path routines should use
- NT_MAX_PATH. PATH_MAX as defined in limits.h is the maximum length of
- application provided path strings we handle. */
-#define NT_MAX_PATH 32768
-
-#ifdef __cplusplus
-
-extern const char case_folded_lower[];
-#define cyg_tolower(c) (case_folded_lower[(unsigned char)(c)])
-extern const char case_folded_upper[];
-#define cyg_toupper(c) (case_folded_upper[(unsigned char)(c)])
-
-#ifndef MALLOC_DEBUG
-#define cfree newlib_cfree_dont_use
-#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>
-#include <ntdef.h>
-#undef _WINGDI_H
-#undef _WINUSER_H
-#undef _WINNLS_H
-#undef _WINVER_H
-#undef _WINNETWK_H
-#undef _WINSVC_H
-
-#include "wincap.h"
-
-/* The one function we use from winuser.h most of the time */
-extern "C" DWORD WINAPI GetLastError (void);
-
-/* Codepage and multibyte string specific stuff. */
-enum codepage_type {ansi_cp, oem_cp, utf8_cp};
-extern codepage_type current_codepage;
-extern UINT active_codepage;
-
-void codepage_init (const char *buf);
-UINT get_cp ();
-
-/* Used as type by sys_wcstombs_alloc and sys_mbstowcs_alloc. For a
- description see there. */
-#define HEAP_NOTHEAP -1
-
-int __stdcall sys_wcstombs (char *, int, const PWCHAR, int = -1)
- __attribute__ ((regparm(3)));
-int __stdcall sys_wcstombs_alloc (char **, int, const PWCHAR, int = -1)
- __attribute__ ((regparm(3)));
-
-int __stdcall sys_mbstowcs (PWCHAR, int, const char *, int = -1)
- __attribute__ ((regparm(3)));
-int __stdcall sys_mbstowcs_alloc (PWCHAR *, int, const char *, int = -1)
- __attribute__ ((regparm(3)));
-
-/* Used to check if Cygwin DLL is dynamically loaded. */
-extern int dynamically_loaded;
-
-extern int cygserver_running;
-
-#define _MT_SAFE // DELETEME someday
-
-#define TITLESIZE 1024
-
-#include "debug.h"
-
-/* Events/mutexes */
-extern HANDLE tty_mutex;
-
-/**************************** Convenience ******************************/
-
-/* Used to define status flag accessor methods */
-#define IMPLEMENT_STATUS_FLAG(type,flag) \
- void flag (type val) { status.flag = (val); } \
- type flag () const { return (type) status.flag; }
-
-/* Used when treating / and \ as equivalent. */
-#define iswdirsep(ch) \
- ({ \
- WCHAR __c = (ch); \
- ((__c) == L'/' || (__c) == L'\\'); \
- })
-
-#define isdirsep(ch) \
- ({ \
- char __c = (ch); \
- ((__c) == '/' || (__c) == '\\'); \
- })
-
-/* Convert a signal to a signal mask */
-#define SIGTOMASK(sig) (1 << ((sig) - 1))
-
-extern int __api_fatal_exit_val;
-#define set_api_fatal_return(n) do {extern int __api_fatal_exit_val; __api_fatal_exit_val = (n);} while (0)
-#define api_fatal(fmt, args...) __api_fatal (fmt,## args)
-
-#undef issep
-#define issep(ch) (strchr (" \t\n\r", (ch)) != NULL)
-
-/* Every path beginning with / or \, as well as every path being X:
- or starting with X:/ or X:\ */
-#define isabspath_u(p) \
- ((p)->Length && \
- (iswdirsep ((p)->Buffer[0]) || \
- ((p)->Length > sizeof (WCHAR) && iswalpha ((p)->Buffer[0]) \
- && (p)->Buffer[1] == L':' && \
- ((p)->Length == 2 * sizeof (WCHAR) || iswdirsep ((p)->Buffer[2])))))
-
-#define iswabspath(p) \
- (iswdirsep (*(p)) || (iswalpha (*(p)) && (p)[1] == L':' && (!(p)[2] || iswdirsep ((p)[2]))))
-
-#define isabspath(p) \
- (isdirsep (*(p)) || (isalpha (*(p)) && (p)[1] == ':' && (!(p)[2] || isdirsep ((p)[2]))))
-
-/******************** Initialization/Termination **********************/
-
-class per_process;
-/* cygwin .dll initialization */
-void dll_crt0 (per_process *) __asm__ ("_dll_crt0__FP11per_process");
-extern "C" void __stdcall _dll_crt0 ();
-extern void dll_crt0_1 (void *);
-extern void dll_dllcrt0_1 (void *);
-extern int __stdcall spawn_guts (const char * prog_arg, const char *const *argv,
- const char *const envp[], int mode,
- int __stdin = -1, int __stdout = -1);
-
-/* dynamically loaded dll initialization */
-extern "C" int dll_dllcrt0 (HMODULE, per_process *);
-
-/* dynamically loaded dll initialization for non-cygwin apps */
-extern "C" int dll_noncygwin_dllcrt0 (HMODULE, per_process *);
-
-/* exit the program */
-
-enum exit_states
- {
- ES_NOT_EXITING = 0,
- ES_PROCESS_LOCKED,
- ES_GLOBAL_DTORS,
- ES_EVENTS_TERMINATE,
- ES_THREADTERM,
- ES_SIGNAL,
- ES_CLOSEALL,
- ES_HUP_PGRP,
- ES_HUP_SID,
- ES_EXEC_EXIT,
- ES_TITLE,
- ES_TTY_TERMINATE,
- ES_FINAL
- };
-
-extern exit_states exit_state;
-void __stdcall do_exit (int) __attribute__ ((regparm (1), noreturn));
-
-/* UID/GID */
-void uinfo_init ();
-
-#define ILLEGAL_UID16 ((__uid16_t)-1)
-#define ILLEGAL_UID ((__uid32_t)-1)
-#define ILLEGAL_GID16 ((__gid16_t)-1)
-#define ILLEGAL_GID ((__gid32_t)-1)
-#define ILLEGAL_SEEK ((_off64_t)-1)
-
-#define uid16touid32(u16) ((u16)==ILLEGAL_UID16?ILLEGAL_UID:(__uid32_t)(u16))
-#define gid16togid32(g16) ((g16)==ILLEGAL_GID16?ILLEGAL_GID:(__gid32_t)(g16))
-
-/* Convert LARGE_INTEGER into long long */
-#define get_ll(pl) (((long long) (pl).HighPart << 32) | (pl).LowPart)
-
-/* various events */
-void events_init ();
-void events_terminate ();
-
-void __stdcall close_all_files (bool = false);
-
-/* debug_on_trap support. see exceptions.cc:try_to_debug() */
-extern "C" void error_start_init (const char*);
-extern "C" int try_to_debug (bool waitloop = 1);
-
-void ld_preload ();
-const char *find_first_notloaded_dll (class path_conv &);
-
-void set_file_api_mode (codepage_type);
-
-extern bool cygwin_finished_initializing;
-
-/**************************** Miscellaneous ******************************/
-
-void __stdcall set_std_handle (int);
-int __stdcall stat_dev (DWORD, int, unsigned long, struct __stat64 *);
-
-__ino64_t __stdcall hash_path_name (__ino64_t hash, PUNICODE_STRING name) __attribute__ ((regparm(2)));
-__ino64_t __stdcall hash_path_name (__ino64_t hash, PCWSTR name) __attribute__ ((regparm(2)));
-__ino64_t __stdcall hash_path_name (__ino64_t hash, const char *name) __attribute__ ((regparm(2)));
-void __stdcall nofinalslash (const char *src, char *dst) __attribute__ ((regparm(2)));
-
-/* String manipulation */
-extern "C" char *__stdcall strccpy (char *s1, const char **s2, char c);
-
-void *hook_or_detect_cygwin (const char *, const void *, WORD&) __attribute__ ((regparm (3)));
-
-/* Time related */
-void __stdcall totimeval (struct timeval *, FILETIME *, int, int);
-long __stdcall to_time_t (FILETIME *);
-void __stdcall to_timestruc_t (FILETIME *, timestruc_t *);
-void __stdcall time_as_timestruc_t (timestruc_t *);
-void __stdcall timespec_to_filetime (const struct timespec *, FILETIME *);
-void __stdcall timeval_to_filetime (const struct timeval *, FILETIME *);
-
-/* Console related */
-void __stdcall set_console_title (char *);
-void init_console_handler (bool);
-
-void init_global_security ();
-
-void __set_winsock_errno (const char *fn, int ln) __attribute__ ((regparm(2)));
-#define set_winsock_errno() __set_winsock_errno (__FUNCTION__, __LINE__)
-
-extern bool wsock_started;
-
-/* Printf type functions */
-extern "C" void __api_fatal (const char *, ...) __attribute__ ((noreturn));
-extern "C" int __small_sprintf (char *dst, const char *fmt, ...) /*__attribute__ ((regparm (2)))*/;
-extern "C" int __small_vsprintf (char *dst, const char *fmt, va_list ap) /*__attribute__ ((regparm (3)))*/;
-extern "C" int __small_swprintf (PWCHAR dst, const WCHAR *fmt, ...) /*__attribute__ ((regparm (2)))*/;
-extern "C" int __small_vswprintf (PWCHAR dst, const WCHAR *fmt, va_list ap) /*__attribute__ ((regparm (3)))*/;
-extern void multiple_cygwin_problem (const char *, unsigned, unsigned);
-
-extern "C" void vklog (int priority, const char *message, va_list ap);
-extern "C" void klog (int priority, const char *message, ...);
-bool child_copy (HANDLE, bool, ...);
-
-int symlink_worker (const char *, const char *, bool, bool)
- __attribute__ ((regparm (3)));
-
-class path_conv;
-
-int __stdcall stat_worker (path_conv &pc, struct __stat64 *buf) __attribute__ ((regparm (2)));
-
-__ino64_t __stdcall readdir_get_ino (const char *path, bool dot_dot) __attribute__ ((regparm (2)));
-
-/* Returns the real page size, not the allocation size. */
-size_t getsystempagesize ();
-
-/* mmap functions. */
-enum mmap_region_status
- {
- MMAP_NONE,
- MMAP_RAISE_SIGBUS,
- MMAP_NORESERVE_COMMITED
- };
-mmap_region_status mmap_is_attached_or_noreserve (void *addr, size_t len);
-
-inline bool flush_file_buffers (HANDLE h)
-{
- return (GetFileType (h) != FILE_TYPE_PIPE) ? FlushFileBuffers (h) : true;
-}
-#define FlushFileBuffers flush_file_buffers
-
-/**************************** Exports ******************************/
-
-extern "C" {
-int cygwin_select (int , fd_set *, fd_set *, fd_set *,
- struct timeval *to);
-int cygwin_gethostname (char *__name, size_t __len);
-
-extern char _data_start__, _data_end__, _bss_start__, _bss_end__;
-extern void (*__CTOR_LIST__) (void);
-extern void (*__DTOR_LIST__) (void);
-extern SYSTEM_INFO system_info;
-};
-
-/*************************** Unsorted ******************************/
-
-#define WM_ASYNCIO 0x8000 // WM_APP
-
-
-#define STD_RBITS (S_IRUSR | S_IRGRP | S_IROTH)
-#define STD_WBITS (S_IWUSR)
-#define STD_XBITS (S_IXUSR | S_IXGRP | S_IXOTH)
-#define NO_W ~(S_IWUSR | S_IWGRP | S_IWOTH)
-#define NO_R ~(S_IRUSR | S_IRGRP | S_IROTH)
-#define NO_X ~(S_IXUSR | S_IXGRP | S_IXOTH)
-
-/* The title on program start. */
-extern char *old_title;
-extern bool display_title;
-extern bool transparent_exe;
-
-extern bool in_forkee;
-
-extern HANDLE hMainThread;
-extern HANDLE hMainProc;
-extern HANDLE hProcToken;
-extern HANDLE hProcImpToken;
-
-inline void clear_procimptoken ()
-{
- if (hProcImpToken)
- {
- HANDLE old_procimp = hProcImpToken;
- hProcImpToken = NULL;
- CloseHandle (old_procimp);
- }
-}
-
-extern HANDLE hExeced;
-extern HMODULE cygwin_hmodule;
-
-extern bool cygwin_testing;
-
-extern char almost_null[];
-
-#endif /* defined __cplusplus */
diff --git a/winsup/cygwin/winver.rc b/winsup/cygwin/winver.rc
deleted file mode 100644
index bb81349..0000000
--- a/winsup/cygwin/winver.rc
+++ /dev/null
@@ -1,50 +0,0 @@
-#include <winver.h>
-#include <cygwin/version.h>
-
-#define STRINGIFY1(x) #x
-#define STRINGIFY(x) STRINGIFY1(x)
-
-#define CYGWIN_DLL_NAME CYGWIN_VERSION_DLL_IDENTIFIER STRINGIFY(.dll)
-
-#define CYGWIN_API_VERSION STRINGIFY(CYGWIN_VERSION_API_MAJOR) "." \
- STRINGIFY(CYGWIN_VERSION_API_MINOR)
-
-#define CYGWIN_BUILD_DATE_TIME STRINGIFY(CYGWIN_BUILD_DATE) " " \
- STRINGIFY(CYGWIN_BUILD_TIME)
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION CYGWIN_VERSION_DLL_MAJOR,CYGWIN_VERSION_DLL_MINOR,0,0
- PRODUCTVERSION CYGWIN_VERSION_DLL_MAJOR,CYGWIN_VERSION_DLL_MINOR,0,0
- FILEFLAGSMASK 0x3fL
-#ifdef DEBUGGING
- FILEFLAGS VS_FF_DEBUG
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS VOS__WINDOWS32
- FILETYPE VFT_DLL
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904B0"
- BEGIN
- VALUE "CompanyName", "Red Hat"
- VALUE "FileDescription", "Cygwin\256 POSIX Emulation DLL"
- VALUE "FileVersion", STRINGIFY(CYGWIN_VERSION)
- VALUE "InternalName", CYGWIN_DLL_NAME
- VALUE "LegalCopyright", "Copyright \251 Red Hat, Inc. 1996-2008"
- VALUE "OriginalFilename", CYGWIN_DLL_NAME
- VALUE "ProductName", "Cygwin"
- VALUE "ProductVersion", STRINGIFY(CYGWIN_VERSION)
- VALUE "APIVersion", CYGWIN_API_VERSION
- VALUE "SharedMemoryVersion", STRINGIFY(CYGWIN_VERSION_SHARED_DATA)
- VALUE "RegistryKey", CYGWIN_INFO_CYGWIN_REGISTRY_NAME
- VALUE "BuildDate", CYGWIN_BUILD_DATE_TIME
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1200
- END
-END
diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog
deleted file mode 100644
index a9f936d..0000000
--- a/winsup/doc/ChangeLog
+++ /dev/null
@@ -1,853 +0,0 @@
-2008-12-15 Corinna Vinschen <corinna@vinschen.de>
-
- * gcc.sgml: Use 'bash$' as Cygwin prompt throughout.
- * gdb.sgml: Ditto.
- * pathnames.sgml: Ditto. Fix the @ expansion example.
-
-2008-12-13 Christopher Faylor <me+cygwin@cgf.cx>
-
- * pathnames.sgml: Convert some backslashes to slashes.
-
-2008-12-11 Christian Franke <franke@computer.org>
-
- * pathnames.sgml: New section for /proc/registry. Document registry
- name encoding.
-
-2008-12-04 Corinna Vinschen <corinna@vinschen.de>
-
- * ntsec.sgml: Fix typo.
-
-2008-12-03 Corinna Vinschen <corinna@vinschen.de>
-
- * ntsec.sgml: Revamp parts of the doc for clearness.
-
-2008-12-02 Corinna Vinschen <corinna@vinschen.de>
-
- * ntsec.sgml: Fix a few typos.
-
-2008-12-02 Corinna Vinschen <corinna@vinschen.de>
-
- * cygserver.sgml: Fix cross reference to the ntsec documentation.
-
-2008-12-02 Corinna Vinschen <corinna@vinschen.de>
-
- * cygserver.sgml: Document new feature to store hidden passwords
- for seteuid.
-
-2008-12-02 Corinna Vinschen <corinna@vinschen.de>
-
- * ntsec.sgml: Finishing up changes for 1.7.
-
-2008-12-01 Corinna Vinschen <corinna@vinschen.de>
-
- * ntsec.sgml: Further changes for 1.7. Switch from "NT" to "Windows".
- Add preliminary text. Try to be more clear in description. Remove
- useless chapters. Finish the permission related chapters.
-
-2008-11-30 Christopher Faylor <me+cygwin@cgf.cx>
-
- * faq-using.xml: Remove assertion that lpr doesn't exist.
- * faq-what.xml: Remove ancient who's who data.
-
-2008-11-25 Christopher Faylor <me+cygwin@cgf.cx>
-
- * overview2.sgml: Reorganize and make minor wording changes.
-
-2008-11-25 Christopher Faylor <me+cygwin@cgf.cx>
-
- * overview2.sgml: Clarify unix-specific automatic updates section.
-
-2008-11-25 Corinna Vinschen <corinna@vinschen.de>
-
- Suggested by Valerio Bigiani <vbigiani@yahoo.it>:
- * overview2.sgml: Add text that no automatic updates are provided.
-
-2008-11-11 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwinenv.sgml: Add description for upcaseenv option.
-
-2008-09-22 Christopher Faylor <me+cygwin@cgf.cx>
-
- * setup2.sgml: Clarify heap allocation.
-
-2008-08-13 Corinna Vinschen <corinna@vinschen.de>
-
- * pathnames.sgml: Move description for (cyg,not)exec mount options
- from utils.sgml here. Clarify nouser mount points.
-
-2008-07-18 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwinenv.sgml: Move binmode option to list of removed options.
-
-2008-07-17 Corinna Vinschen <corinna@vinschen.de>
-
- * Revamp documentation for Cygwin 1.7, part 1.
-
-2008-07-01 Christopher Faylor <me+cygwin@cgf.cx>
-
- * Makefile.in: Temporarily add ability to generate pdfs.
-
-2008-06-26 Fred Korz <korz_fred@emc.com>
-
- * effectively.sgml: Correct subject-verb agreement, missing verb
- (typo), preposition and (definite vs indefinite) article use.
-
-2008-06-19 Christopher Faylor <me+cygwin@cgf.cx>
-
- * faq-using.xml: Add more words about multiple cygwins.
-
-2008-04-24 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin-api.in.sgml: Add std-susv4 section to Compatibility chapter.
-
-2008-04-13 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwinenv.sgml: Drop description of "transparent_exe" option.
-
-2007-29-12 Dave Korn <dave.korn@artimi.com>
-
- * faq-using.xml (faq.using.bloda): New entry.
- (faq.using.firewall, faq.using.anti-virus): Link to faq.using.bloda.
- * faq-setup.xml (faq.setup.hang): Likewise link to faq.using.bloda.
-
-2007-12-16 Christopher Faylor <me+cygwin@cgf.cx>
-
- * pathnames.xml: Fix a typo.
-
-2007-09-25 Corinna Vinschen <corinna@vinschen.de>
-
- * faq-what.xml: Remove paragraph about and link to stoneage old
- history.html file.
-
-2007-08-24 Christopher Faylor <me+cygwin@cgf.cx>
-
- * dll.sgml: myprog.ca -> myprog.c
-
-2007-08-12 Christopher Faylor <me+cygwin@cgf.cx>
-
- * faq-programming.xml: Clarify where to run "make check".
-
-2007-07-18 Brian Dessent <brian@dessent.net>
-
- * faq-using.xml (faq.using.console-window): Mention FHS location of
- docs and remove outdated reference to ash.
-
-2007-06-29 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin-api.in.sgml: Remove authorgroup and revhistory.
- * cygwin-ug.in.sgml: Add Joshua Daniel Franklin to authorgroup.
- Remove revhistory.
- * legal.sgml: Update dates.
-
-2007-06-05 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwin-api.in.sgml: Accommodate new "Compatibility" section layout.
-
-2006-12-12 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwinenv.sgml: Drop description of "traverse" option.
-
-2006-08-25 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * faq-setup.xml (faq.setup.uninstall): Mention Safe Mode
- requirement for accessing the Security tab in XP Home.
- * faq-using.xml (faq.using.chmod): Mention FAT32.
-
-2006-08-09 Christopher Faylor <cgf@timesys.com>
-
- * overview2.sgml: Remove inaccurate "full support for windows
- pathnames" clause.
-
-2006-08-01 Christopher Faylor <cgf@timesys.com>
-
- * cygwinenv.sgml: Document [no]dosfilewarning option.
-
-2006-07-18 Corinna Vinschen <corinna@vinschen.de>
-
- * pathnames.sgml: Change text for the order in which executables
- are evaluated.
-
-2006-06-01 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * faq-setup.xml (faq.setup.automated): New FAQ.
-
-2006-05-30 Dave Korn <dave.korn@artimi.com>
-
- * faq-api.xml (faq.api.winsock): Replace references to depracated
- Win32_Winsock macro with __USE_W32_WINSOCK, and enlarge on details.
-
-2006-05-24 Christopher Faylor <cgf@timesys.com>
-
- * configure.in: Update to newer autoconf.
- (thanks to Steve Ellcey)
- * configure: Regenerate.
- * aclocal.m4: New file.
-
-2006-04-04 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * faq-programming.xml (faq.programming.adjusting-heap):
- Clarify argument parameter sizes.
- * faq-using.xml (faq.using.chmod):
- Improve chmod FAQ.
-
-2006-03-18 Christopher Faylor <cgf@timesys.com>
-
- * cygwinenv.sgml: Rename fork_retry to proc_retry since it has turned
- out to be more general than just fork.
-
-2006-03-13 Christopher Faylor <cgf@timesys.com>
-
- * cygwinenv.sgml: Explain about new fork_retry CYGWIN environment
- variable setting.
-
-2006-03-07 Bas van Gompel <cygwin-patch.buzz<at>bavag.tmfweb.nl>
-
- * cygwinenv.sgml: Add missing </para> at transparent_exe.
-
-2006-02-05 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwinenv.sgml: Explain transparent_exe option.
-
-2006-02-01 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * faq-setup.xml (faq.setup.what-packages):
- Mention new cygcheck -p option.
-
-2006-01-27 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * faq-programming.xml (faq.programming.building-cygwin):
- Move cocom to the build requirements.
-
-2006-01-26 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * faq-programming.xml (faq.programming.building-cygwin):
- Simplify instructions, and remove tar usage basics.
-
-2006-01-26 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * faq-programming.xml (faq.programming.ipc): Add new FAQ about
- cygserver and its relation to the "Bad system call" error.
- * faq-setup.xml (faq.setup.uninstall-all): Mention postgresql.
- * overview2.sgml: Update security info on shared memory.
-
-2006-01-25 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * faq-programming.xml (faq.programming.building-cygwin): Add
- list of packages required for building and exact check instructions.
- * faq-setup.xml (faq.setup.uninstall-service): New instructions
- on uninstalling a cygwin service.
- (faq.setup.uninstall-all): Reference new service uninstall FAQ.
-
-2006-01-25 Igor Peshansky <pechtcha@cs.nyu.edu>
-
- * faq-setup.xml (faq.setup.snapshots): Rename DLL using Windows tools.
-
-2006-01-18 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * Makefile.in : Remove references to old texinfo FAQ.
- * calls.texinfo : Remove.
- * changes.texinfo : Remove.
- * copy.texinfo : Remove.
- * faq.texinfo : Remove.
- * history.texinfo : Remove.
- * how-api.texinfo : Remove.
- * how-programming.texinfo : Remove.
- * how-resources.texinfo : Remove.
- * how-using.texinfo : Remove.
- * how.texinfo : Remove.
- * install.texinfo : Remove.
- * readme.texinfo : Remove.
- * relnotes.texinfo : Remove.
- * what.texinfo : Remove.
- * who.texinfo : Remove.
-
-2006-01-12 Igor Peshansky <pechtcha@cs.nyu.edu>
-
- * doctool.c (scan_directory): Ignore "CVS" directories.
- * faq-setup.xml (faq.setup.setup): Correct URL typo.
- (faq.setup.snapshots): Clarify.
-
-2005-12-30 Christopher Faylor <cgf@timesys.com>
-
- * relnotes.texinfo: Remove entry about hyperthreaded processor.
-
-2005-12-30 Christopher Faylor <cgf@timesys.com>
-
- * faq-problems.html: Remove entry about hyperthreaded processor.
-
-2005-12-12 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * faq-programming.xml: Add note about struct stat64.
-
-2005-12-03 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * faq-setup.xml: Add note about clean_setup.pl.
- * faq-using.xml: Remove unnecessary line of elisp.
-
-2005-10-02 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * faq-what.xml: Add 2003 and WOW64 to "supported" FAQ.
- * faq-programming.xml: Fix cygexec FAQ, building link.
-
-2005-09-25 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * faq.xml: Remove copyright section, link to license.html
- * faq-sections.xml: Remove copyright section, link to license.html
- * faq-programming.xml: Remove confusing reference to Red Hat.
- * faq-what.xml: Reword "supported" FAQ.
-
-2005-09-15 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwinenv.sgml (ntea): Add some wording to scare people away
- from using this option.
-
-2005-08-26 Brian Dessent <brian@dessent.net>
-
- * faq-using.xml: Add 'net use' hint to network shares FAQ.
-
-2005-08-26 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * Makefile.in: Remove extra anchor to make NN4 happy.
- * faq.xml: Link to cygwin.com/license.html
- * faq-resources.xml: Link instead of duplicating info.
- * faq-using.xml: Split out services and network shares FAQ.
- * faq-what.xml: Link to cygwin.com/license.html
-
-2005-08-17 Christopher Faylor <cgf@timesys.com>
-
- * textbinary.sgml: Correct incorrect information about ability to
- specify text mode in fopen().
-
-2005-08-05 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * cygwin.dsl: Add default DOCTYPE and output filename.
- * Makefile: Update to switch FAQ from texinfo to DocBook.
- * faq.xml: New file.
- * faq-api.xml: New file.
- * faq-problems.xml: New file.
- * faq-programming.xml: New file.
- * faq-resources.xml: New file.
- * faq-sections.xml: New file.
- * faq-setup.xml: New file.
- * faq-using.xml: New file.
- * faq-what.xml: New file.
-
-2005-07-10 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * cygwinenv.sgml: Update tty section to mention rxvt and xterm.
- * how-programming.texinfo: Update GPL section of CVS FAQ.
- * how-using.texinfo: Expand FAQ about out of date packages.
- * setup-net.sgml: Add troubleshooting setup.exe section.
-
-2005-07-08 Corinna Vinschen <corinna@vinschen.de>
-
- * how-using.texinfo: Fix typos.
-
-2005-06-20 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * how-resources.texinfo: Update section on cygwin-developers.
- * how-using.texinfo: Add FAQ about firewall software. Update
- section on mounting and specifically note using managed mounts.
-
-2005-06-03 Max Kaehn <slothman@electric-cloud.com>
-
- * how-programming.texinfo: Add "How do I load cygwin1.dll dynamically
- from a Visual Studio or MinGW application?"
-
-2005-05-28 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * how-using.texinfo : Update the mkdir -p section to reflect
- changes in handling network drives.
-
-2005-05-18 Brian Dessent <brian@dessent.net>
-
- * install.texinfo ("How do I uninstall..."): Rewrite to cover
- removing services, dealing with permissions, and other common
- tasks for removing Cygwin completely.
-
-2005-05-08 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * how-programming.texinfo: Replace MAKE_MODE entry with FAQ about
- execvp errors and cygexec.
-
-2005-04-20 Brian Dessent <brian@dessent.net>
-
- * pathnames.sgml (mount-table): Indicate that user-specific
- mounts override system-wide.
-
-2005-04-20 Gerd Spalink <Gerd.Spalink@t-online.de>
-
- * fhandler-tut.txt: Update description to cygwin 1.5.13
-
-2005-04-19 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwinenv.sgml: Mention that check_case is deprecated.
-
-2005-04-16 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwinenv.sgml: Add new words for (no)traverse option.
-
-2005-03-30 Christopher Faylor <cgf@timesys.com>
-
- * how-using.texinfo: Add more words to the "multiple DLL" section.
-
-2005-03-25 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * how-programming.texinfo: Mention generic-build-script in
- packaging FAQ.
-
-2005-03-19 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * how-programming.texinfo: Remove incorrect libm.a note.
-
-2005-03-05 Christopher Faylor <cgf@timesys.com>
-
- * pathnames.sgml: Clarify binmode/textmode behavior slightly.
- * textbinary.sgml: Ditto.
-
-2005-03-03 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * how-api.texinfo: Add Pierre's security text.
-
-2005-02-23 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * README: New file.
-
-2005-01-31 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwinenv.sgml: Add words for (no)traverse option.
-
-2005-01-29 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * install.texinfo: Update setup.exe snapshot URL.
- * ntsec.sgml: Add Pierre's Windows 2003 text.
-
-2005-01-28 Corinna Vinschen <corinna@vinschen.de>
-
- * how-using.texinfo: Change text about using shortcuts.
-
-2005-01-22 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * how-api.texinfo: Make snapshot URL an HTML link.
- * how-programming.texinfo: Add details about building a
- debugging version of the DLL.
- * how-using.texinfo: Correct rxvt README location.
- * install.texinfo: Add mount -m note to uninstall instructions.
-
-2005-01-21 Christopher Faylor <cgf@timesys.com>
-
- * how-programming.texinfo: Remove obsolete w32api instructions and add
- some words about unpacking net release .tar.bz2.
-
-2004-12-30 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * path.sgml: Encode programming example with CDATA.
- * overview.sgml: Add notes about SUS, newlib, and ash.
- * overview2.sgml: Add notes about /usr/share/doc/Cygwin.
-
-2004-12-27 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * Makefile.in: Update to use xmlto.
- * cygwin.dsl: Change into DocBook XSL stylesheet for xmlto.
- * pathnames.sgml: Correct documentation of mount behavior.
-
-2004-12-24 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * cygserver.sgml: Cleanup markup for XML validity.
- * cygwin-api.in.sgml: Cleanup markup for XML validity.
- * cygwin-ug-net.in.sgml: Cleanup markup for XML validity.
- * cygwin-ug.in.sgml: Cleanup markup for XML validity.
- * cygwinenv.sgml: Cleanup markup for XML validity.
- * dll.sgml: Cleanup markup for XML validity.
- * effectively.sgml: Cleanup markup for XML validity.
- * filemodes.sgml: Cleanup markup for XML validity.
- * legal.sgml: Cleanup markup for XML validity.
- * ntsec.sgml: Cleanup markup for XML validity.
- * overview.sgml: Cleanup markup for XML validity.
- * overview2.sgml: Cleanup markup for XML validity.
- * pathnames.sgml: Cleanup markup for XML validity.
- * setup-net.sgml: Cleanup markup for XML validity.
- * setup2.sgml: Cleanup markup for XML validity.
- * textbinary.sgml: Cleanup markup for XML validity.
- * utils.sgml: Cleanup markup for XML validity.
-
-2004-12-02 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * cygserver.sgml: Cleanup minor markup problem.
- * how-resources.texinfo: Add man and info to documentation FAQ.
- * how-using.texinfo: Add more detail to Unicode FAQ.
- * install.texinfo: Finally apply Pierre's patch from 2003-03-03.
- * relnotes.texinfo: Add note about hyperthreading reports.
-
-2004-09-30 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * how-using.texinfo: Fix typo. Add note about "Install For All Users"
-
-2004-09-30 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * how-programming.texinfo: Add gcj note to WinMain@16 FAQ.
- * how-using.texinfo: Add FAQ about network shares and authentication.
- * install.texinfo: Add "Where is make" to FAQ subtitle.
-
-2004-09-24 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwinenv.sgml: smbntsec is not on by default.
-
-2004-09-14 Christopher Faylor <cgf@timesys.com>
-
- * what.texinfo: Fix two typos reported on cygwin list.
-
-2004-09-02 Corinna Vinschen <corinna@vinschen.de>
-
- * textbinary.sgml: Change default mode for non-mounted paths to binary.
-
-2004-07-16 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * how-resources.texinfo: Update documentation to /usr/share/doc.
- * how-using.texinfo: Add paragraph about find -noleaf.
-
-2004-06-14 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * how-programming.texinfo: Add section about Visual Studio linking.
-
-2004-06-13 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * faq.texinfo: Move outdated calls.texinfo to readme.texinfo.
- * how-api.texinfo: Fix typos.
- * how-programming.texinfo: Fix typos.
- * how-resources.texinfo: Fix typos.
- * how-using.texinfo: Fix typos.
- * install.texinfo: Fix typos.
- * readme.texinfo: Move outdated calls.texinfo to readme.texinfo.
-
-2004-05-21 Brian Ford <ford@vss.fsi.com>
-
- * pathnames.sgml: Remove /dev/kmem from the supported POSIX
- device list.
-
- * cygwinenv.sgml: Fix typo in check_case description.
-
-2004-03-30 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * ntsec.sgml: Replace chapter numbers with <link>s,
- replace release-numbers in <title>s with descriptions.
-
-2004-03-30 Ronald Landheer-Cieslak <ronald@landheer.com>
-
- * ntsec.sgml: Fix typos, correct chapter numbers.
-
-2004-03-29 Corinna Vinschen <corinna@vinschen.de>
-
- * pathnames.sgml: Fix /dev/srX description.
-
-2004-03-28 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * how-programming.texinfo: Make list in .lib FAQ enumerative.
-
-2004-03-28 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * how-programming.texinfo: Add note about gcc .lib linking.
- * pathnames.sgml: Mention create_devices.sh for /dev/ creation.
-
-2004-03-27 Corinna Vinschen <corinna@vinschen.de>
-
- * cygserver.sgml: New file.
- * using.sgml: Include Cygserver docs.
-
-2004-03-26 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * cygwinenv.sgml: Add example for CYGWIN=error_start.
- * pathnames.sgml: Update list of /dev/ devices.
-
-2004-02-22 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * Makefile.in: Fix problem links in faq0.html file.
- * what.texinfo: Remove outdated 'recent' history.
-
-2004-02-19 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * cygwinenv.sgml: Remove incorrect ^Z information. Add
- some tags to server option description.
- * textbinary.sgml: Remove incorrect ^Z information.
-
-2004-02-16 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwinenv.sgml: Add server option description.
-
-2004-02-04 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * Makefile.in: Generate monolithic faq0.html file.
-
-2004-01-24 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * cygwinenv.sgml: Cleanup minor markup problems.
- * dll.sgml: Cleanup minor markup problems.
- * effectively.sgml: Cleanup minor markup problems.
- * gcc.sgml: Cleanup minor markup problems.
- * ntsec.sgml: Cleanup minor markup problems.
- * pathnames.sgml: Cleanup minor markup problems.
- * setup-net.sgml: Cleanup minor markup problems.
- * textbinary.sgml: Cleanup minor markup problems.
- * windres.sgml: Cleanup minor markup problems.
-
-2004-01-20 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * Makefile.in: Remove unused cygwin-ug and cygwin-api-int
- targets from default build.
- * how-using.texinfo: Add information about 8-bit character
- display to FAQ.
- * setup2.sgml: Add information about 8-bit character display
- to "Setting up Cygwin".
-
-2004-01-15 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * setup-net.sgml: Add "internet-setup" id anchor.
- * overview.sgml: Update "What is it?" section. Add links to
- "Is it free software?" section. Update "Brief History" section.
- * overview2.sgml: Rewrite "Expectations for {Windows,Unix}"
- as "Quick Start for those more experienced with {Windows,Unix}".
-
-2004-01-11 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * Makefile.in: Add new target for single-file User's Guide, use new
- cygwin.dsl for output.
- * cygwin.dsl: New file, DSSSL stylesheet for custom Cygwin output.
- * cygwin-api.in.sgml: Update to DocBook SGML 4.2 DTD.
- * cygwin-ug-net.in.sgml: Update to DocBook SGML 4.2 DTD.
- * cygwin-ug.in.sgml: Update to DocBook SGML 4.2 DTD.
- * cygwinenv.sgml: Correct some tags. Add description of default values
- to ntsec, export, and error_start items.
- * dll.sgml: Add explanation of cyg prefix for DLLs.
- * effectively.sgml: Use systemitem tag for names of Cygwin packages.
- * how-programming.texinfo: Add example to FAQ entry.
- * pathnames.sgml: Add discussion of /proc filesystem.
- * setup-net.sgml: Correct some typos and grammar.
-
-2003-09-01 Corinna Vinschen <corinna@vinschen.de>
-
- * pathnames.sgml: Remove description how to mount raw devices and
- dicourage it. Desparately try to make usage of raw devices a bit
- clearer.
-
-2003-07-31 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * effectively.sgml: New file, "Using Cygwin Effectively with Windows".
- * legal.sgml: Update year in copyright notice.
- * using.sgml: Include "Using Cygwin Effectively with Windows" section.
-
-2003-07-15 Christopher Faylor <cgf@redhat.com>
-
- * pathnames.sgml: Use correct registry key. Clarify '@' operation.
-
-2003-07-03 Christopher Faylor <cgf@redhat.com>
-
- * ntsec.sgml: Reword references to "ntsec patch".
-
-2003-05-08 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * cygwin-ug-net.in.sgml: Remove outdated revision information and
- author's names.
-
-2003-04-26 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * gcc.sgml: Remove outdated "WinMainCRTStartup" references. Add a
- hellogui.c example.
-
-2003-03-26 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * setup-net.sgml: Make suggested additions to setup.exe documentation
-
-2003-03-23 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * setup-net.sgml: Improve setup.exe documentation
-
-2003-03-22 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * setup-net.sgml: Document setup.exe
-
-2003-02-07 Christopher Faylor <cgf@redhat.com>
-
- * how.texinfo: Add more w32api words.
-
-2003-02-07 Igor Pechtchanski <pechtcha@cs.nyu.edu>
-
- * ntsec.sgml: Add note on special names for missing user/group.
-
-2002-12-18 Christopher Faylor <cgf@redhat.com>
-
- * overview2.sgml: Remove CTRL-Z discussion.
- * cygwinenv.sgml: Expand on CYGWIN=binmode.
-
-2002-11-10 Christopher Faylor <cgf@redhat.com>
-
- * how-programming.texinfo: Document _WIN32 more fully.
-
-2002-10-22 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * ntsec.sgml: Correct some minor grammatical errors.
-
-2002-10-22 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * dll.sgml: Simplify dll build instructions.
-
-2002-09-11 Corinna Vinschen <corinna@vinschen.de>
-
- * ntsec.html: Add chapter for switching user context w/o password.
-
-2002-08-29 Christopher Faylor <cgf@redhat.com>
-
- * how-api.texinfo: Remove a line from the CRLF discussion about lseek
- not working. Answer thread safe question more simply.
-
-2002-08-27 Nicholas Wourms <nwourms@netscape.net>
-
- * calls.texinfo: Add getc_unlocked, getchar_unlocked, putc_unlocked
- and putchar_unlocked.
-
-2002-08-21 Christopher Faylor <cgf@redhat.com>
-
- * dll.sgml: Remove indirect reference to older gccs.
-
-2002-06-22 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * dll.sgml: Refine dll build instructions.
-
-2002-08-21 Christopher Faylor <cgf@redhat.com>
-
- * ntsec.html: Correct some typos.
-
-2002-07-23 Nicholas Wourms <nwourms@netscape.net>
-
- * calls.texinfo: Add fcloseall and fcloseall_r.
-
-2002-06-24 Corinna Vinschen <corinna@vinschen.de>
-
- * ntsec.sgml: Clean up text for examples of /etc/passwd and /etc/group.
- Add examples with SIDs. Warn about changing them crudely.
-
-2002-06-21 Christopher Faylor <cgf@redhat.com>
-
- * what.texinfo: Fix typo.
-
-2002-06-02 Christopher Faylor <cgf@redhat.com>
-
- * how-programming.texinfo: Add more words to the "how to build".
-
-2002-03-01 Christopher Faylor <cgf@redhat.com>
-
- * overview.sgml: Fix 'more more' typo.
-
-2002-01-12 Christopher Faylor <cgf@redhat.com>
-
- * overview.sgml: Fix Red Hat cygwin contract link.
- * what.texinfo: Ditto.
-
-2002-01-01 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Duh. Actually use bzip2 to create the tarball. Don't
- just change the name.
-
-2002-01-01 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Make .bz2 tarball.
-
-2001-12-11 Christopher Faylor <cgf@redhat.com>
-
- * what.texinfo: Clarify XP.
-
-2001-12-03 Christopher Faylor <cgf@redhat.com>
-
- Cleanup copyrights and Cygnus'isms throughout.
- * setup.sgml: Nuke ancient instructions.
-
-Tue Oct 16 18:02:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * pathnames.sgml: Cleanup raw device text to be more coherent.
-
-Tue Oct 16 17:14:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * pathnames.sgml: Add description for new fixed device paths.
-
-Fri Sep 7 12:47:47 2001 Michael Schaap <cygwin@mscha.com>
-
- * how-resources.texinfo: Add some additional words about where to find
- documentation.
-
-Wed Jun 13 13:54:35 2001 Christopher Faylor <cgf@cygnus.com>
-
- * who.texinfo: Oops. Add a couple of important folk.
-
-Wed Jun 13 13:45:44 2001 Christopher Faylor <cgf@cygnus.com>
-
- * who.texinfo: Remove email addresses. Modernize.
-
-Tue May 29 21:30:07 2001 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Tweak to attempt to accomodate older texi2html.
-
-Tue May 29 16:24:46 2001 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Accomodate newer versions of docbook and openjade.
-
-Thu Apr 12 23:52:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwinenv.sgml: Add text for `check_case' option.
-
-Fri Mar 2 12:42:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwinenv.sgml: Add text for `winsymlinks' option.
- * how-api.texinfo: Add text to explain new symlinks==shortcuts
- and the CYGWIN setting `(no)winsymlinks'.
- * how-using.texinfo: Add text that Cygwin now treats shortcuts
- as symlinks.
-
-2001-02-07 Eric M. Monsler <emonsler@beamreachnetworks.com>
-
- * setup2.sgml: Add docs about domain accounts.
-
-Thu Dec 21 15:03:29 2000 Edward M. Lee <tailbert@yahoo.com>
-
- * cygwinenv.sgml: Fix typo in <filename>. Add missing </para>.
-
-Tue Dec 19 21:06:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * cygwinenv.sgml: Add text for `smbntsec' option.
-
-Sat Nov 18 23:50:12 2000 Christopher Faylor <cgf@cygnus.com>
-
- * cygwinenv.sgml: Remove CYGWIN=strace option. Update CYGWIN options.
- * setup2.sgml: Remove CYGWIN=strace example.
- * how-programming.texinfo: Remove stuff about CYGWIN=strace.
-
-Thu Oct 26 10:00:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * ntsec.sgml: Slight changes. Fix some errors.
-
-Thu Oct 26 9:35:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * ntsec.sgml: Changed the (now incorrect) hint that ntsec only
- uses access allowed ACEs.
-
-Fri Sep 29 23:52:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * pathnames.sgml: Add documentation about raw block special
- devices and tape devices to the "POSIX devices" chapter.
-
-Fri Aug 18 15:51:06 2000 Christopher Faylor <cgf@cygnus.com>
-
- * fhandler-tut.txt: hinfo -> dtable.
-
-Thu Jul 20 13:01:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * ntsec.sgml: Add description for the new setuid ability
- of Cygwin since release 1.1.3.
- * overview2.sgml: Add description for new chroot functionality.
- * calls.texinfo: Add missing calls. Change comments for
- setuid, setgid, seteuid, setegid, chroot.
-
-Tue May 3 0:25:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * ntsec.sgml: Revisited description of `ntsec' according to
- the changes in release 1.1.
- * setup.sgml: Include ntsec.
- * setup-net.sgml: Ditto.
diff --git a/winsup/doc/Makefile.in b/winsup/doc/Makefile.in
deleted file mode 100644
index 765ce3b..0000000
--- a/winsup/doc/Makefile.in
+++ /dev/null
@@ -1,87 +0,0 @@
-# -*- Makefile -*- for winsup/doc
-# Copyright (c) 1998-2000,2001 Red Hat, Inc.
-#
-# This file is part of Cygwin.
-#
-# This software is a copyrighted work licensed under the terms of the
-# Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-# details.
-
-SHELL = @SHELL@
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-SGMLDIRS = -d $(srcdir) -d $(utils_source) -d $(cygwin_source)
-
-CC:=@CC@
-CC_FOR_TARGET:=@CC@
-exeext:=@build_exeext@
-
-include $(srcdir)/../Makefile.common
-
-TOCLEAN:=faq.txt ./*.html readme.txt doctool.o doctool.exe *.junk \
- cygwin-ug.sgml cygwin-ug cygwin-ug-net.html.gz \
- cygwin-ug-net.sgml cygwin-ug-net cygwin-ug-net.html \
- cygwin-api.sgml cygwin-api cygwin-api-int.sgml cygwin-api-int \
- faq
-
-.SUFFIXES:
-
-all : \
- cygwin-ug-net/cygwin-ug-net.html \
- cygwin-ug-net/cygwin-ug-net.html.gz \
- cygwin-api/cygwin-api.html \
- faq/faq.html faq/faq-nochunks.html \
- cygwin-ug-net/cygwin-ug-net.pdf \
- cygwin-api/cygwin-api.html
-
-clean:
- rm -Rf $(TOCLEAN)
-
-install: all
-
-cygwin-ug-net/cygwin-ug-net.html.gz : cygwin-ug-net.sgml doctool
- -xmlto html-nochunks -m $(srcdir)/cygwin.dsl $<
- -cp cygwin-ug-net.html cygwin-ug-net/cygwin-ug-net-nochunks.html
- -rm -f cygwin-ug-net/cygwin-ug-net-nochunks.html.gz
- -gzip cygwin-ug-net/cygwin-ug-net-nochunks.html
-
-cygwin-ug-net/cygwin-ug-net.html : cygwin-ug-net.sgml doctool
- -xmlto html -o cygwin-ug-net/ -m $(srcdir)/cygwin.dsl $<
-
-cygwin-ug-net/cygwin-ug-net.pdf : cygwin-ug-net.sgml doctool
- -xmlto --extension -v pdf -o cygwin-ug-net/ -m $(srcdir)/cygwin.dsl $<
-
-cygwin-ug-net.sgml : cygwin-ug-net.in.sgml ./doctool Makefile
- -./doctool -m $(SGMLDIRS) -s $(srcdir) -o $@ $<
-
-cygwin-api/cygwin-api.html : cygwin-api.sgml
- -xmlto html -o cygwin-api/ -m $(srcdir)/cygwin.dsl $<
-
-cygwin-api/cygwin-api.pdf : cygwin-api.sgml
- -xmlto --extension -v pdf -o cygwin-api/ -m $(srcdir)/cygwin.dsl $<
-
-cygwin-api.sgml : cygwin-api.in.sgml ./doctool Makefile
- -./doctool -m $(SGMLDIRS) -s $(srcdir) -o $@ $<
-
-faq/faq.html :
- -xmlto html -o faq -m $(srcdir)/cygwin.dsl $(srcdir)/faq-sections.xml
- -sed -i 's;</a><a name="id[0-9]*"></a>;</a>;g' faq/faq.*.html
-
-faq/faq-nochunks.html :
- -xmlto html -o faq -m $(srcdir)/cygwin.dsl $(srcdir)/faq.xml
- -sed -i 's;</a><a name="id[0-9]*"></a>;</a>;g' faq/faq-nochunks.html
-
-./doctool : doctool.c
- gcc -g $< -o $@
-
-TBFILES = cygwin-ug-net.dvi cygwin-ug-net.rtf cygwin-ug-net.ps \
- cygwin-ug-net.pdf cygwin-ug-net.sgml \
- cygwin-api.dvi cygwin-api.rtf cygwin-api.ps \
- cygwin-api.pdf cygwin-api.sgml
-TBDIRS = cygwin-ug-net cygwin-api
-TBDEPS = cygwin-ug-net/cygwin-ug-net.html cygwin-api/cygwin-api.html
-
-tarball : cygwin-docs.tar.bz2
-cygwin-docs.tar.bz2 : $(TBFILES) $(TBDEPS)
- find $(TBFILES) $(TBDIRS) \! -type d | sort | tar -T - -cf - | bzip2 > cygwin-docs.tar.bz2
diff --git a/winsup/doc/README b/winsup/doc/README
deleted file mode 100644
index 1f1e154..0000000
--- a/winsup/doc/README
+++ /dev/null
@@ -1,30 +0,0 @@
-The cygwin-doc source files are kept in CVS. Please see
-http://cygwin.com/cvs.html for more information.
-
-BUILD REQUIREMENTS:
-
-ash
-bzip2
-coreutils
-cygwin
-docbook-xml42
-docbook-xsl
-gzip
-make
-texinfo
-perl
-xmlto
-
-
-OTHER NOTES:
-
-You may use docbook2X to convert the DocBook files into info pages.
-I have not been able to get a working docbook2X installation on Cygwin,
-so currently I convert the files on a machine running GNU/Linux. PDF
-generation is also problematic; I use 'jw -b pdf' right now but have
-also used 'xmlto pdf' and jade.
-
-A few handmade files (cygwin.texi, intro.3, etc.) are found in the
-cygwin-doc-x.y-z-src.tar.bz2 package. It also contains the utilities for
-building the cygwin-doc-x.y-z "binary" package--simply run each step in
-the cygwin-doc-x.y-z.sh script.
diff --git a/winsup/doc/aclocal.m4 b/winsup/doc/aclocal.m4
deleted file mode 100644
index ecef424..0000000
--- a/winsup/doc/aclocal.m4
+++ /dev/null
@@ -1,875 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-# lib-prefix.m4 serial 4 (gettext-0.14.2)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
-dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
-dnl require excessive bracketing.
-ifdef([AC_HELP_STRING],
-[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
-[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
-
-dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
-dnl to access previously installed libraries. The basic assumption is that
-dnl a user will want packages to use other packages he previously installed
-dnl with the same --prefix option.
-dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
-dnl libraries, but is otherwise very convenient.
-AC_DEFUN([AC_LIB_PREFIX],
-[
- AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib-prefix],
-[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
- --without-lib-prefix don't search for libraries in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
- fi
- fi
-])
- if test $use_additional = yes; then
- dnl Potentially add $additional_includedir to $CPPFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's already present in $CPPFLAGS,
- dnl 3. if it's /usr/local/include and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- for x in $CPPFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $CPPFLAGS.
- CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- dnl Potentially add $additional_libdir to $LDFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's already present in $LDFLAGS,
- dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
- haveit=
- for x in $LDFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_libdir" = "X/usr/local/lib"; then
- if test -n "$GCC"; then
- case $host_os in
- linux*) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LDFLAGS.
- LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- fi
-])
-
-dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
-dnl acl_final_exec_prefix, containing the values to which $prefix and
-dnl $exec_prefix will expand at the end of the configure script.
-AC_DEFUN([AC_LIB_PREPARE_PREFIX],
-[
- dnl Unfortunately, prefix and exec_prefix get only finally determined
- dnl at the end of configure.
- if test "X$prefix" = "XNONE"; then
- acl_final_prefix="$ac_default_prefix"
- else
- acl_final_prefix="$prefix"
- fi
- if test "X$exec_prefix" = "XNONE"; then
- acl_final_exec_prefix='${prefix}'
- else
- acl_final_exec_prefix="$exec_prefix"
- fi
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
- prefix="$acl_save_prefix"
-])
-
-dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
-dnl variables prefix and exec_prefix bound to the values they will have
-dnl at the end of the configure script.
-AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
-[
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- acl_save_exec_prefix="$exec_prefix"
- exec_prefix="$acl_final_exec_prefix"
- $1
- exec_prefix="$acl_save_exec_prefix"
- prefix="$acl_save_prefix"
-])
-
-# lib-link.m4 serial 6 (gettext-0.14.3)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_PREREQ(2.50)
-
-dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
-dnl augments the CPPFLAGS variable.
-AC_DEFUN([AC_LIB_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
- ac_cv_lib[]Name[]_libs="$LIB[]NAME"
- ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
- ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
- ])
- LIB[]NAME="$ac_cv_lib[]Name[]_libs"
- LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
- INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
- dnl results of this search when this library appears as a dependency.
- HAVE_LIB[]NAME=yes
- undefine([Name])
- undefine([NAME])
-])
-
-dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
-dnl searches for libname and the libraries corresponding to explicit and
-dnl implicit dependencies, together with the specified include files and
-dnl the ability to compile and link the specified testcode. If found, it
-dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
-dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
-dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
-dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
-AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-
- dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
- dnl accordingly.
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
-
- dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
- dnl because if the user has installed lib[]Name and not disabled its use
- dnl via --without-lib[]Name-prefix, he wants to use it.
- ac_save_CPPFLAGS="$CPPFLAGS"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-
- AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS $LIB[]NAME"
- AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
- LIBS="$ac_save_LIBS"
- ])
- if test "$ac_cv_lib[]Name" = yes; then
- HAVE_LIB[]NAME=yes
- AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
- AC_MSG_CHECKING([how to link with lib[]$1])
- AC_MSG_RESULT([$LIB[]NAME])
- else
- HAVE_LIB[]NAME=no
- dnl If $LIB[]NAME didn't lead to a usable library, we don't need
- dnl $INC[]NAME either.
- CPPFLAGS="$ac_save_CPPFLAGS"
- LIB[]NAME=
- LTLIB[]NAME=
- fi
- AC_SUBST([HAVE_LIB]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- undefine([Name])
- undefine([NAME])
-])
-
-dnl Determine the platform dependent parameters needed to use rpath:
-dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
-dnl hardcode_direct, hardcode_minus_L.
-AC_DEFUN([AC_LIB_RPATH],
-[
- dnl Tell automake >= 1.10 to complain if config.rpath is missing.
- m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
- AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
- AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
- AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
- AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
- CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
- ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
- . ./conftest.sh
- rm -f ./conftest.sh
- acl_cv_rpath=done
- ])
- wl="$acl_cv_wl"
- libext="$acl_cv_libext"
- shlibext="$acl_cv_shlibext"
- hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
- hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
- hardcode_direct="$acl_cv_hardcode_direct"
- hardcode_minus_L="$acl_cv_hardcode_minus_L"
- dnl Determine whether the user wants rpath handling at all.
- AC_ARG_ENABLE(rpath,
- [ --disable-rpath do not hardcode runtime library paths],
- :, enable_rpath=yes)
-])
-
-dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
-AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
-[
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib$1-prefix],
-[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
- --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
- fi
- fi
-])
- dnl Search the library and its dependencies in $additional_libdir and
- dnl $LDFLAGS. Using breadth-first-seach.
- LIB[]NAME=
- LTLIB[]NAME=
- INC[]NAME=
- rpathdirs=
- ltrpathdirs=
- names_already_handled=
- names_next_round='$1 $2'
- while test -n "$names_next_round"; do
- names_this_round="$names_next_round"
- names_next_round=
- for name in $names_this_round; do
- already_handled=
- for n in $names_already_handled; do
- if test "$n" = "$name"; then
- already_handled=yes
- break
- fi
- done
- if test -z "$already_handled"; then
- names_already_handled="$names_already_handled $name"
- dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
- dnl or AC_LIB_HAVE_LINKFLAGS call.
- uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
- eval value=\"\$HAVE_LIB$uppername\"
- if test -n "$value"; then
- if test "$value" = yes; then
- eval value=\"\$LIB$uppername\"
- test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
- eval value=\"\$LTLIB$uppername\"
- test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
- else
- dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
- dnl that this library doesn't exist. So just drop it.
- :
- fi
- else
- dnl Search the library lib$name in $additional_libdir and $LDFLAGS
- dnl and the already constructed $LIBNAME/$LTLIBNAME.
- found_dir=
- found_la=
- found_so=
- found_a=
- if test $use_additional = yes; then
- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
- found_dir="$additional_libdir"
- found_so="$additional_libdir/lib$name.$shlibext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- else
- if test -f "$additional_libdir/lib$name.$libext"; then
- found_dir="$additional_libdir"
- found_a="$additional_libdir/lib$name.$libext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- fi
- fi
- fi
- if test "X$found_dir" = "X"; then
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- case "$x" in
- -L*)
- dir=`echo "X$x" | sed -e 's/^X-L//'`
- if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
- found_dir="$dir"
- found_so="$dir/lib$name.$shlibext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- else
- if test -f "$dir/lib$name.$libext"; then
- found_dir="$dir"
- found_a="$dir/lib$name.$libext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- fi
- fi
- ;;
- esac
- if test "X$found_dir" != "X"; then
- break
- fi
- done
- fi
- if test "X$found_dir" != "X"; then
- dnl Found the library.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
- if test "X$found_so" != "X"; then
- dnl Linking with a shared library. We attempt to hardcode its
- dnl directory into the executable's runpath, unless it's the
- dnl standard /usr/lib.
- if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
- dnl No hardcoding is needed.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $found_dir"
- fi
- dnl The hardcoding into $LIBNAME is system dependent.
- if test "$hardcode_direct" = yes; then
- dnl Using DIR/libNAME.so during linking hardcodes DIR into the
- dnl resulting binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $found_dir"
- fi
- else
- dnl Rely on "-L$found_dir".
- dnl But don't add it if it's already contained in the LDFLAGS
- dnl or the already constructed $LIBNAME
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
- fi
- if test "$hardcode_minus_L" != no; then
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
- dnl here, because this doesn't fit in flags passed to the
- dnl compiler. So give up. No hardcoding. This affects only
- dnl very old systems.
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- fi
- else
- if test "X$found_a" != "X"; then
- dnl Linking with a static library.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
- else
- dnl We shouldn't come here, but anyway it's good to have a
- dnl fallback.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
- fi
- fi
- dnl Assume the include files are nearby.
- additional_includedir=
- case "$found_dir" in
- */lib | */lib/)
- basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
- additional_includedir="$basedir/include"
- ;;
- esac
- if test "X$additional_includedir" != "X"; then
- dnl Potentially add $additional_includedir to $INCNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's /usr/local/include and we are using GCC on Linux,
- dnl 3. if it's already present in $CPPFLAGS or the already
- dnl constructed $INCNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- for x in $CPPFLAGS $INC[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $INCNAME.
- INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- fi
- dnl Look for dependencies.
- if test -n "$found_la"; then
- dnl Read the .la file. It defines the variables
- dnl dlname, library_names, old_library, dependency_libs, current,
- dnl age, revision, installed, dlopen, dlpreopen, libdir.
- save_libdir="$libdir"
- case "$found_la" in
- */* | *\\*) . "$found_la" ;;
- *) . "./$found_la" ;;
- esac
- libdir="$save_libdir"
- dnl We use only dependency_libs.
- for dep in $dependency_libs; do
- case "$dep" in
- -L*)
- additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
- dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 3. if it's already present in $LDFLAGS or the already
- dnl constructed $LIBNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
- haveit=
- if test "X$additional_libdir" = "X/usr/local/lib"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LIBNAME.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- haveit=
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LTLIBNAME.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- ;;
- -R*)
- dir=`echo "X$dep" | sed -e 's/^X-R//'`
- if test "$enable_rpath" != no; then
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $dir"
- fi
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $dir"
- fi
- fi
- ;;
- -l*)
- dnl Handle this in the next round.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
- ;;
- *.la)
- dnl Handle this in the next round. Throw away the .la's
- dnl directory; it is already contained in a preceding -L
- dnl option.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
- ;;
- *)
- dnl Most likely an immediate library name.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
- ;;
- esac
- done
- fi
- else
- dnl Didn't find the library; assume it is in the system directories
- dnl known to the linker and runtime loader. (All the system
- dnl directories known to the linker should also be known to the
- dnl runtime loader, otherwise the system is severely misconfigured.)
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- done
- done
- if test "X$rpathdirs" != "X"; then
- if test -n "$hardcode_libdir_separator"; then
- dnl Weird platform: only the last -rpath option counts, the user must
- dnl pass all path elements in one option. We can arrange that for a
- dnl single library, but not when more than one $LIBNAMEs are used.
- alldirs=
- for found_dir in $rpathdirs; do
- alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
- done
- dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
- acl_save_libdir="$libdir"
- libdir="$alldirs"
- eval flag=\"$hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- else
- dnl The -rpath options are cumulative.
- for found_dir in $rpathdirs; do
- acl_save_libdir="$libdir"
- libdir="$found_dir"
- eval flag=\"$hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- done
- fi
- fi
- if test "X$ltrpathdirs" != "X"; then
- dnl When using libtool, the option that works for both libraries and
- dnl executables is -R. The -R options are cumulative.
- for found_dir in $ltrpathdirs; do
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
- done
- fi
-])
-
-dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
-dnl unless already present in VAR.
-dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
-dnl contains two or three consecutive elements that belong together.
-AC_DEFUN([AC_LIB_APPENDTOVAR],
-[
- for element in [$2]; do
- haveit=
- for x in $[$1]; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X$element"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- [$1]="${[$1]}${[$1]:+ }$element"
- fi
- done
-])
-
-# lib-ld.m4 serial 3 (gettext-0.13)
-dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
-
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
-AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- acl_cv_prog_gnu_ld=yes ;;
-*)
- acl_cv_prog_gnu_ld=no ;;
-esac])
-with_gnu_ld=$acl_cv_prog_gnu_ld
-])
-
-dnl From libtool-1.4. Sets the variable LD.
-AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- [re_direlt='/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(acl_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- acl_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break ;;
- *)
- test "$with_gnu_ld" != yes && break ;;
- esac
- fi
- done
- IFS="$ac_save_ifs"
-else
- acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$acl_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_LIB_PROG_LD_GNU
-])
-
-dnl This provides configure definitions used by all the winsup
-dnl configure.in files.
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN([LIB_AC_PROG_CC_GNU],
-[AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc,
-[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
-cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi])])
-
-AC_DEFUN([LIB_AC_PROG_CC],
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_TOOL(CC, gcc, gcc)
-: ${CC:=gcc}
-AC_PROG_CC
-test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-])
-
-AC_DEFUN([LIB_AC_PROG_CXX],
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_TOOL(CXX, g++, g++)
-if test -z "$CXX"; then
- AC_CHECK_TOOL(CXX, g++, c++, , , )
- : ${CXX:=g++}
- AC_PROG_CXX
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-CXXFLAGS='$(CFLAGS)'
-])
-
diff --git a/winsup/doc/configure b/winsup/doc/configure
deleted file mode 100755
index 769de69..0000000
--- a/winsup/doc/configure
+++ /dev/null
@@ -1,3291 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59.
-#
-# Copyright (C) 2003 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-exec 6>&1
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_config_libobj_dir=.
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete. It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
-# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-
-ac_unique_file="cygwin-api.in.sgml"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC ac_ct_CC CFLAGS LDFLAGS CPPFLAGS EXEEXT OBJEXT build_exeext LIBOBJS LTLIBOBJS'
-ac_subst_files=''
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-ac_prev=
-for ac_option
-do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_option in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- eval "enable_$ac_feature=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_$ac_feature='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "with_$ac_package='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
- eval "with_$ac_package=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries=$ac_optarg ;;
-
- -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$ac_envvar='$ac_optarg'"
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$0" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
- fi
-fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
- { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-_ACEOF
-
- cat <<_ACEOF
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
-_ACEOF
-
- cat <<\_ACEOF
-
-System types:
- --build=BUILD configure for building on BUILD [guessed]
- --host=HOST cross-compile to build programs to run on HOST [BUILD]
- --target=TARGET configure for building compilers for TARGET [HOST]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-
- cat <<\_ACEOF
-
-Some influential environment variables:
- CC C compiler command
- CFLAGS C compiler flags
- LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
- nonstandard directory <lib dir>
- CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
- headers in a nonstandard directory <include dir>
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-_ACEOF
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- ac_popdir=`pwd`
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_srcdir/configure.gnu; then
- echo
- $SHELL $ac_srcdir/configure.gnu --help=recursive
- elif test -f $ac_srcdir/configure; then
- echo
- $SHELL $ac_srcdir/configure --help=recursive
- elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
- else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
- cd "$ac_popdir"
- done
-fi
-
-test -n "$ac_init_help" && exit 0
-if $ac_init_version; then
- cat <<\_ACEOF
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit 0
-fi
-exec 5>config.log
-cat >&5 <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- echo "PATH: $as_dir"
-done
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_sep=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-{
- (set) 2>&1 |
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- ;;
- *)
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-}
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- sed "/^$/d" confdefs.h | sort
- echo
- fi
- test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
- ' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
- esac
- fi
-else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val="\$ac_cv_env_${ac_var}_value"
- eval ac_new_val="\$ac_env_${ac_var}_value"
- case $ac_old_set,$ac_new_set in
- set,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ac_aux_dir=
-for ac_dir in ../.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f $ac_dir/shtool; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ../.. $srcdir/../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in ../.. $srcdir/../.." >&2;}
- { (exit 1); exit 1; }; }
-fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-
-
-# Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
- { (exit 1); exit 1; }; }
-
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
-if test "${ac_cv_build+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
- ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
-build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
-if test "${ac_cv_host+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
- ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
-host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking target system type" >&5
-echo $ECHO_N "checking target system type... $ECHO_C" >&6
-if test "${ac_cv_target+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_target_alias=$target_alias
-test "x$ac_cv_target_alias" = "x" &&
- ac_cv_target_alias=$ac_cv_host_alias
-ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-echo "${ECHO_T}$ac_cv_target" >&6
-target=$ac_cv_target
-target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_CC" && ac_cv_prog_ac_ct_CC="gcc"
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
-
-: ${CC:=gcc}
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-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 "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
- fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$ac_ct_CC" && break
-done
-
- CC=$ac_ct_CC
-fi
-
-fi
-
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
- (eval $ac_link_default) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Find the output, starting from the most likely. This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
- conftest.$ac_ext )
- # This is the source file.
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool,
- # but it would be cool to find out if it's true. Does anybody
- # maintain Libtool? --akim.
- export ac_cv_exeext
- break;;
- * )
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
-
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
-fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
- break;;
- * ) break;;
- esac
-done
-else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
-if test "${ac_cv_objext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_prog_cc_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std1 is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std1. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-
-fi
-
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
- *)
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
-
-# Some people use a C++ compiler to compile C. Since we use `exit',
-# in C++ we need to declare it. In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
- choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5
-echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
- { (exit 1); exit 1; }; }
-
-
-
-
- ac_config_files="$ac_config_files Makefile"
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-{
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-} |
- sed '
- t clear
- : clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
- cat confcache >$cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[ ]*$//;
-}'
-fi
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then we branch to the quote section. Otherwise,
-# look for a macro that doesn't take arguments.
-cat >confdef2opt.sed <<\_ACEOF
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
-t quote
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
-t quote
-d
-: quote
-s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
-s,\[,\\&,g
-s,\],\\&,g
-s,\$,$$,g
-p
-_ACEOF
-# We use echo to avoid assuming a particular line-breaking character.
-# The extra dot is to prevent the shell from consuming trailing
-# line-breaks from the sub-command output. A line-break within
-# single-quotes doesn't work because, if this script is created in a
-# platform that uses two characters for line-breaks (e.g., DOS), tr
-# would break.
-ac_LF_and_DOT=`echo; echo .`
-DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f confdef2opt.sed
-
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling. Logging --version etc. is OK.
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
-_ACEOF
-
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_headers"; then
- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_links"; then
- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
-
-Configuration files:
-$config_files
-
-Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.59,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=*)
- ac_option=`expr "x$1" : 'x\([^=]*\)='`
- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- -*)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- *) # This is not an option, so the user has probably given explicit
- # arguments.
- ac_option=$1
- ac_need_defaults=false;;
- esac
-
- case $ac_option in
- # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --vers* | -V )
- echo "$ac_cs_version"; exit 0 ;;
- --he | --h)
- # Conflict between --help and --header
- { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
- ac_need_defaults=false;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1" ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-if \$ac_cs_recheck; then
- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-
-
-
-
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_config_target in $ac_config_targets
-do
- case "$ac_config_target" in
- # Handling of arguments.
- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./confstat$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
-{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-
-#
-# CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@build@,$build,;t t
-s,@build_cpu@,$build_cpu,;t t
-s,@build_vendor@,$build_vendor,;t t
-s,@build_os@,$build_os,;t t
-s,@host@,$host,;t t
-s,@host_cpu@,$host_cpu,;t t
-s,@host_vendor@,$host_vendor,;t t
-s,@host_os@,$host_os,;t t
-s,@target@,$target,;t t
-s,@target_cpu@,$target_cpu,;t t
-s,@target_vendor@,$target_vendor,;t t
-s,@target_os@,$target_os,;t t
-s,@CC@,$CC,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@build_exeext@,$build_exeext,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
-
-_ACEOF
-
- cat >>$CONFIG_STATUS <<\_ACEOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_lines=48
- ac_sed_frag=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_lines # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- else
- # The purpose of the label and of the branching condition is to
- # speed up the sed processing (if there are no `@' at all, there
- # is no need to browse any of the substitutions).
- # These are the two extra sed commands mentioned above.
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_lines`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
-fi # test -n "$CONFIG_FILES"
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
-
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- if test x"$ac_file" = x-; then
- configure_input=
- else
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
-
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;t t
-s,@srcdir@,$ac_srcdir,;t t
-s,@abs_srcdir@,$ac_abs_srcdir,;t t
-s,@top_srcdir@,$ac_top_srcdir,;t t
-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s,@builddir@,$ac_builddir,;t t
-s,@abs_builddir@,$ac_abs_builddir,;t t
-s,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- rm -f $tmp/stdin
- if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
- else
- cat $tmp/out
- rm -f $tmp/out
- fi
-
-done
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || { (exit 1); exit 1; }
-fi
-
diff --git a/winsup/doc/configure.in b/winsup/doc/configure.in
deleted file mode 100644
index 7079d96..0000000
--- a/winsup/doc/configure.in
+++ /dev/null
@@ -1,22 +0,0 @@
-dnl Autoconf configure script for winsup/regexp
-dnl Copyright 1997,1998,1999,2000,2001 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 Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.59)
-AC_INIT(cygwin-api.in.sgml)
-AC_CONFIG_AUX_DIR(../..)
-
-AC_CANONICAL_SYSTEM
-
-LIB_AC_PROG_CC
-
-AC_SUBST(build_exeext)
-
-AC_OUTPUT(Makefile)
diff --git a/winsup/doc/cygserver.sgml b/winsup/doc/cygserver.sgml
deleted file mode 100644
index 6249bdf..0000000
--- a/winsup/doc/cygserver.sgml
+++ /dev/null
@@ -1,277 +0,0 @@
-<sect1 id="using-cygserver"><title>Cygserver</title>
-
-<sect2 id="what-is-cygserver"><title>What is Cygserver?</title>
-
-<para>
- 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.
-</para>
-<para>
- The implemented services so far are:
-</para>
-<itemizedlist mark="bullet">
- <listitem><para>Control slave tty/pty handle dispersal from tty owner to other
- processes without compromising the owner processes' security.</para></listitem>
- <listitem><para>XSI IPC Message Queues.</para></listitem>
- <listitem><para>XSI IPC Semaphores.</para></listitem>
- <listitem><para>XSI IPC Shared Memory.</para></listitem>
- <listitem><para>Allows non-privileged users to store obfuscated
- passwords in the registry to be used by <command>setuid</command> and
- <command>seteuid</command> calls to create user tokens with network
- credentials. This service is used by <command><link
- linkend="passwd">passwd</link> -R</command>. Using the stored
- passwords in <command>set(e)uid</command> does not require running
- Cygserver. For details, see <xref linkend="ntsec-setuid-overview"></xref>.
- </para></listitem>
-</itemizedlist>
-
-</sect2>
-
-<sect2 id="cygserver-command-line"><title>Cygserver command line options</title>
-
-<para>
- 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.
-</para>
-<para>
- 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.
-</para>
-<para>
- The recognized options are:
-</para>
-
-<itemizedlist spacing="compact">
-<listitem>
- <screen>-f, --config-file &lt;file&gt;</screen>
- <para>
- Use &lt;file&gt; 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.
- </para>
- <para>
- This option has no counterpart in the configuration file, for obvious
- reasons.
- </para>
-</listitem>
-<listitem>
- <screen>-c, --cleanup-threads &lt;num&gt;</screen>
- <para>
- Number of threads started to perform cleanup tasks. Default is 2.
- Configuration file option: kern.srv.cleanup_threads
- </para>
-</listitem>
-<listitem>
- <screen>-r, --request-threads &lt;num&gt;</screen>
- <para>
- 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
- </para>
-</listitem>
-<listitem>
- <screen>-d, --debug</screen>
- <para>
- Log debug messages to stderr. These will clutter your stderr output with
- a lot of information, typically only useful to developers.
- </para>
-</listitem>
-<listitem>
- <screen>-e, --stderr</screen>
- <para>
- 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
- </para>
-</listitem>
-<listitem>
- <screen>-E, --no-stderr</screen>
- <para>
- Don't log to stderr. Configuration file option: kern.log.stderr
- </para>
-</listitem>
-<listitem>
- <screen>-y, --syslog</screen>
- <para>
- Force logging to the system log. This is the default, if stderr is not
- connected to a tty, e. g. redirected to a file.
- Configuration file option: kern.log.syslog
- </para>
-</listitem>
-<listitem>
- <screen>-Y, --no-syslog</screen>
- <para>
- Don't log to syslog. Configuration file option: kern.log.syslog
- </para>
-</listitem>
-<listitem>
- <screen>-l, --log-level &lt;level&gt;</screen>
- <para>
- 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
- </para>
-</listitem>
-<listitem>
- <screen>-m, --no-sharedmem</screen>
- <para>
- 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
- </para>
-</listitem>
-<listitem>
- <screen>-q, --no-msgqueues</screen>
- <para>
- Don't start XSI IPC Message Queues.
- Configuration file option: kern.srv.msgqueues
- </para>
-</listitem>
-<listitem>
- <screen>-s, --no-semaphores</screen>
- <para>
- Don't start XSI IPC Semaphores.
- Configuration file option: kern.srv.semaphores
- </para>
-</listitem>
-<listitem>
- <screen>-S, --shutdown</screen>
- <para>
- Shutdown a running daemon and exit. Other methods are sending a SIGHUP
- to the Cygserver PID or, if running as service, calling `net stop
- cygserver' or `cygrunsrv -E cygserver'.
- </para>
-</listitem>
-<listitem>
- <screen>-h, --help</screen>
- <para>
- Output usage information and exit.
- </para>
-</listitem>
-<listitem>
- <screen>-v, --version</screen>
- <para>
- Output version information and exit.
- </para>
-</listitem>
-</itemizedlist>
-
-</sect2>
-
-<sect2 id="start-cygserver"><title>How to start Cygserver</title>
-
-<para>
- 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.
- 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.
-</para>
-<para>
- 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.
-</para>
-
-</sect2>
-
-<sect2 id="use-cygserver"><title>How to use the Cygserver services</title>
-
-<para>
- 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.
-</para>
-<para>
- 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.
-</para>
-<para>
- 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.
-</para>
-<para>
- 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.:
-</para>
-<para>
- <screen>
- set CYGWIN=server
- </screen>
-</para>
-<para>
- 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':
-</para>
-<para>
- <screen>
- cygrunsrv -I foo -p /usr/sbin/foo -e "CYGWIN=server"
- </screen>
-</para>
-
-</sect2>
-
-<sect2 id="cygserver-config"><title>The Cygserver configuration file</title>
-
-<para>
- 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.
-</para>
-<para>
- 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.
-</para>
-<para>
- 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.
-</para>
-<para>
- 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.
-</para>
-<para>
- 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.
-</para>
-
-</sect2>
-
-</sect1>
diff --git a/winsup/doc/cygwin-api.in.sgml b/winsup/doc/cygwin-api.in.sgml
deleted file mode 100644
index 9b4996d..0000000
--- a/winsup/doc/cygwin-api.in.sgml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"[]>
-
-<book id="cygwin-api">
-
- <bookinfo>
- <date>1998-08-31</date>
- <title>Cygwin API Reference</title>
-
- DOCTOOL-INSERT-legal
-
- </bookinfo>
-
- <toc></toc>
-
-<chapter id="compatibility"><title>Compatibility</title>
-DOCTOOL-INSERT-std-susv3
-DOCTOOL-INSERT-std-bsd
-DOCTOOL-INSERT-std-gnu
-DOCTOOL-INSERT-std-solaris
-DOCTOOL-INSERT-std-susv4
-DOCTOOL-INSERT-std-deprec
-DOCTOOL-INSERT-std-notimpl
-DOCTOOL-INSERT-std-notes
-</chapter>
-
-<chapter id="cygwin-functions"><title>Cygwin Functions</title>
-
-<para>These functions are specific to Cygwin itself, and probably
-won't be found anywhere else. </para>
-
-DOCTOOL-INSERT-func-
-
-</chapter>
-
-</book>
diff --git a/winsup/doc/cygwin-ug-net.in.sgml b/winsup/doc/cygwin-ug-net.in.sgml
deleted file mode 100644
index c56ad8e..0000000
--- a/winsup/doc/cygwin-ug-net.in.sgml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"[]>
-
-<book id="cygwin-ug-net">
-
- <bookinfo>
- <date>2003-04-08</date>
- <title>Cygwin User's Guide</title>
-
-DOCTOOL-INSERT-legal
-
- </bookinfo>
-
- <toc></toc>
-
-DOCTOOL-INSERT-overview
-
-DOCTOOL-INSERT-setup-net
-
-DOCTOOL-INSERT-using
-
-DOCTOOL-INSERT-programming
-
-</book>
diff --git a/winsup/doc/cygwin-ug.in.sgml b/winsup/doc/cygwin-ug.in.sgml
deleted file mode 100644
index 65902e9..0000000
--- a/winsup/doc/cygwin-ug.in.sgml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"[
- <!ENTITY cygnus-copyright "<year>1999,2000,2001,2002,2003,2004,2005,2006,2007,2008</year>
- <holder>Red Hat, Inc.</holder>">
- <!ENTITY cygnus-code-copyright "
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-Copyright (C) 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006, 2007,
- 2008 Red Hat, Inc.
-
-This is copyrighted software that may only
-be reproduced, modified, or distributed
-under license from Red Hat, Inc.
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-">
- ]>
-
-<book id="cygwin-ug">
-
- <bookinfo>
- <date>2001-22-03</date>
- <title>Cygwin User's Guide</title>
- <authorgroup>
- <author>
- <firstname>Joshua Daniel</firstname>
- <surname>Franklin</surname>
- </author>
- <author>
- <firstname>Corinna</firstname>
- <surname>Vinschen</surname>
- </author>
- <author>
- <firstname>Christopher</firstname>
- <surname>Faylor</surname>
- </author>
- <author>
- <firstname>DJ</firstname>
- <surname>Delorie</surname>
- </author>
- <author>
- <firstname>Pierre</firstname>
- <surname>Humblet</surname>
- </author>
- <author>
- <firstname>Geoffrey</firstname>
- <surname>Noer</surname>
- </author>
- </authorgroup>
-
-DOCTOOL-INSERT-legal
-
- </bookinfo>
-
- <toc></toc>
-
-DOCTOOL-INSERT-overview
-
-DOCTOOL-INSERT-setup
-
-DOCTOOL-INSERT-using
-
-DOCTOOL-INSERT-programming
-
-</book>
diff --git a/winsup/doc/cygwin.dsl b/winsup/doc/cygwin.dsl
deleted file mode 100644
index 35156d7..0000000
--- a/winsup/doc/cygwin.dsl
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fo="http://www.w3.org/1999/XSL/Format"
- version='1.0'>
-
-<!-- See /usr/share/docbook-xsl/params/ -->
-<xsl:param name="chunker.output.doctype-public"
- select="'-//W3C//DTD HTML 4.01 Transitional//EN'" />
-<xsl:param name="html.stylesheet" select="'docbook.css'"/>
-<xsl:param name="use.id.as.filename" select="1" />
-<xsl:param name="root.filename" select="@id" />
-
-<!-- TODO: make URLs and paths wrap with PDF output -->
-
-</xsl:stylesheet>
-
diff --git a/winsup/doc/cygwinenv.sgml b/winsup/doc/cygwinenv.sgml
deleted file mode 100644
index fbca2b2..0000000
--- a/winsup/doc/cygwinenv.sgml
+++ /dev/null
@@ -1,243 +0,0 @@
-<sect1 id="using-cygwinenv"><title>The <envar>CYGWIN</envar> environment
-variable</title>
-
-<sect2 id="cygwinenv-implemented-options">
-<title>Implemented options</title>
-
-<para>The <envar>CYGWIN</envar> environment variable is used to configure
-many global settings for the Cygwin runtime system. It contains the options
-listed below, separated by blank characters. Many options can be turned off
-by prefixing with <literal>no</literal>.</para>
-
-<itemizedlist mark="bullet">
-
-<listitem>
-<para><envar>codepage:[ansi|oem|utf8]</envar> - This option controls
-which single- or multibyte character set is used for file and console
-operations. Windows is using UTF-16 characters internally and this
-option specifies how 8-byte character sets are converted to UTF-16 and
-vice versa. The default setting is <envar>ansi</envar> which means,
-conversion is based on the current ANSI codepage, typically 1252 in
-many Western language versions of Windows. The name originates from the
-ANSI Latin1 (ISO 8859-1) standard, used in Windows 1.0, though the
-character sets have since diverged from any standard. The second
-setting selects an older, DOS-based character set, containing various
-line drawing and special characters. It is called <envar>oem</envar>
-since it was originally encoded in the firmware of IBM PCs by original
-equipment manufacturers (OEMs).</para>
-<para>If you find that some characters (especially non-US or 'graphical' ones)
-do not display correctly in Cygwin, you can use this option to select an
-appropriate codepage. Finally, <envar>utf8</envar> treats all file names
-and console characters as UTF-8 chars. Please note that, for correct
-operation, you have to set the environment variable LC_CTYPE to "C-UTF-8"
-for the time being. The reason is that newlib's multibyte conversion
-functions require this setting.</para>
-</listitem>
-
-<listitem>
-<para><envar>(no)dosfilewarning</envar> - If set, Cygwin will warn the
-first time a user uses an "MS-DOS" style path name rather than a POSIX-style
-path name. Defaults to set.</para>
-</listitem>
-
-<listitem>
-<para><envar>(no)envcache</envar> - If set, environment variable
-conversions (between Win32 and POSIX) are cached. Note that this may
-cause problems if the mount table changes, as the cache is not invalidated
-and may contain values that depend on the previous mount table
-contents. Defaults to set.</para>
-</listitem>
-
-<listitem>
-<para><envar>(no)export</envar> - If set, the final values of these
-settings are re-exported to the environment as <envar>CYGWIN</envar> again.
-Defaults to off.</para>
-</listitem>
-
-<listitem>
-<para>
-<envar>error_start:Win32filepath</envar> - if set, runs
-<filename>Win32filepath</filename> when cygwin encounters a fatal error,
-which is useful for debugging. <filename>Win32filepath</filename> is
-usually set to the path to <command>gdb</command> or
-<command>dumper</command>, for example
-<filename>C:\cygwin\bin\gdb.exe</filename>.
-There is no default set.
-</para>
-</listitem>
-
-<listitem>
-<para><envar>forkchunk:32768</envar> - causes the <function>fork()</function>
-to copy memory some number of bytes at a time, in the above example
-32768 bytes (32Kb) at a time. The default is to copy as many bytes as
-possible, which is preferable in most cases but may slow some older systems
-down.
-</para>
-</listitem>
-
-<listitem>
-<para><envar>proc_retry:n</envar> - causes the <function>fork()</function> and <function>exec*()</function>
-to retry n times when a child process fails due to certain windows-specific errors. These errors usually
-occur when processes are being started while a user is logging off.
-</para>
-</listitem>
-
-<listitem>
-<para><envar>(no)glob[:ignorecase]</envar> - if set, command line arguments
-containing UNIX-style file wildcard characters (brackets, question mark,
-asterisk, escaped with \) are expanded into lists of files that match
-those wildcards.
-This is applicable only to programs running from a DOS command line prompt.
-Default is set.</para>
-<para>This option also accepts an optional <literal>[no]ignorecase</literal> modifer.
-If supplied, wildcard matching is case insensitive. The default is <literal>noignorecase</literal></para>
-</listitem>
-
-<listitem>
-<para><envar>(no)reset_com</envar> - if set, serial ports are reset
-to 9600-8-N-1 with no flow control when used. This is done at open
-time and when handles are inherited. Defaults to set.</para>
-</listitem>
-
-<listitem>
-<para><envar>(no)server</envar> - if set, allows client applications
-to use the Cygserver facilities. This option must be enabled explicitely
-on the client side, otherwise your applications won't be able to use the
-XSI IPC function calls (<function>msgget</function>,
-<function>semget</function>, <function>shmget</function>, and friends)
-successfully. These function calls will return with
-<literal>ENOSYS</literal>, "Bad system call".
-</para>
-</listitem>
-
-<listitem>
-<para><envar>(no)strip_title</envar> - if set, strips the directory
-part off the window title, if any. Default is not set.</para>
-</listitem>
-
-<listitem>
-<para><envar>(no)title</envar> - if set, the title bar
-reflects the name of the program currently running. Default is not
-set.</para>
-</listitem>
-
-<listitem>
-<para><envar>(no)tty</envar> - if set, Cygwin enables extra support
-(i.e., termios) for UNIX-like ttys in the Windows console.
-It is not compatible with some Windows programs.
-Defaults to not set, in which case the tty is opened in text mode.
-Note that this has been changed such that ^D works as
-expected instead of ^Z, and is settable via <command>stty</command>.
-This option must be specified before starting a Cygwin shell
-and it cannot be changed in the shell. It should not be set when using
-other terminals (i.e., rxvt or xterm).
-</para>
-</listitem>
-
-<listitem>
-<para><envar>(no)upcaseenv</envar> - if set, Cygwin converts all
-environment variables to all-uppercase, when a Cygwin process is started
-from a non-Cygwin native Windows process. This is how it has been done
-until Cygwin 1.5. If not set, Cygwin does not change the case of environment
-variables, except for a restricted set to maintain minimal backward
-compatibility and for correct handling of certain essential variables.
-The current list of always uppercased variables is:</para>
-<screen>
- ALLUSERSPROFILE
- COMMONPROGRAMFILES
- COMPUTERNAME
- COMSPEC
- HOME
- HOMEDRIVE
- HOMEPATH
- NUMBER_OF_PROCESSORS
- OS
- PATH
- PATHEXT
- PROCESSOR_ARCHITECTURE
- PROCESSOR_IDENTIFIER
- PROCESSOR_LEVEL
- PROCESSOR_REVISION
- PROGRAMFILES
- SYSTEMDRIVE
- SYSTEMROOT
- TEMP
- TERM
- TMP
- TMPDIR
- WINDIR
-</screen>
-<para>Defaults to not set.</para>
-</listitem>
-
-<listitem>
-<para><envar>(no)winsymlinks</envar> - if set, Cygwin creates
-symlinks as Windows shortcuts with a special header and the R/O attribute
-set. If not set, Cygwin creates symlinks as plain files with a magic number,
-a path and the system attribute set. Defaults to not set since plain
-file symlinks are faster to write and faster to read.</para>
-</listitem>
-
-</itemizedlist>
-
-</sect2>
-
-<sect2 id="cygwinenv-removed-options">
-<title>Removed options</title>
-
-<para>
-Some CYGWIN options have been removed in Cygwin 1.7 for one reason or another.
-These removed options are listed below.</para>
-
-<itemizedlist mark="bullet">
-
-<listitem>
-<para><envar>(no)binmode</envar> - This option has been removed because
-all file opens default to binary mode, unless the open mode has been specified
-explicitely in the open(2) call.
-</para>
-</listitem>
-
-<listitem>
-<para><envar>check_case</envar> - This option has been removed in favor of
-real case sensitivity and the per-mount option "posix=[0|1]". For more
-information, read the documentation in <xref linkend="mount-table"></xref> and
-<xref linkend="pathnames-casesensitive"></xref>.</para>
-</listitem>
-
-<listitem>
-<para><envar>(no)ntea</envar> - This option has been removed since it
-only fakes security which is considered dangerous and useless. It also
-created an uncontrollably large file on FAT and was entirely useless
-on FAT32.</para>
-</listitem>
-
-<listitem>
-<para><envar>(no)ntsec</envar> - This option has been removed in favor of
-the per-mount option "acl"/"noacl". For more information, read the
-documentation in <xref linkend="mount-table"></xref>.</para>
-</listitem>
-
-<listitem>
-<para><envar>(no)smbntsec</envar> - This option has been removed in favor of
-the per-mount option "acl"/"noacl". For more information, read the
-documentation in <xref linkend="mount-table"></xref>.</para>
-</listitem>
-
-<listitem>
-<para><envar>(no)transparent_exe</envar> - This option has been removed
-because the behaviour it switched on is now the standard behaviour in
-Cygwin.</para>
-</listitem>
-
-<listitem>
-<para><envar>(no)traverse</envar> - This option has been removed because
-traverse checking is not quite correctly implemented by Microsoft and
-it's behaviour is getting worse with each new OS version.</para>
-</listitem>
-
-</itemizedlist>
-
-</sect2>
-
-</sect1>
diff --git a/winsup/doc/dll.sgml b/winsup/doc/dll.sgml
deleted file mode 100644
index 2575c68..0000000
--- a/winsup/doc/dll.sgml
+++ /dev/null
@@ -1,141 +0,0 @@
-<sect1 id="dll"><title>Building and Using DLLs</title>
-
-<para>DLLs are Dynamic Link Libraries, which means that they're linked
-into your program at run time instead of build time. There are three
-parts to a DLL:</para>
-
-<itemizedlist spacing="compact">
-<listitem><para> the exports </para></listitem>
-<listitem><para> the code and data </para></listitem>
-<listitem><para> the import library </para></listitem>
-</itemizedlist>
-
-<para>The code and data are the parts you write - functions,
-variables, etc. All these are merged together, like if you were
-building one big object files, and put into the dll. They are not
-put into your .exe at all.</para>
-
-<para>The exports contains a list of functions and variables that the
-dll makes available to other programs. Think of this as the list of
-"global" symbols, the rest being hidden. Normally, you'd create this
-list by hand with a text editor, but it's possible to do it
-automatically from the list of functions in your code. The
-<filename>dlltool</filename> program creates the exports section of
-the dll from your text file of exported symbols.</para>
-
-<para>The import library is a regular UNIX-like
-<filename>.a</filename> library, but it only contains the tiny bit of
-information needed to tell the OS how your program interacts with
-("imports") the dll. This information is linked into your
-<filename>.exe</filename>. This is also generated by
-<filename>dlltool</filename>.</para>
-
-<sect2 id="dll-build"><title>Building DLLs</title>
-
-<para>This page gives only a few simple examples of gcc's DLL-building
-capabilities. To begin an exploration of the many additional options,
-see the gcc documentation and website, currently at
-<ulink url="http://gcc.gnu.org/">http://gcc.gnu.org/</ulink>
-</para>
-
-<para>Let's go through a simple example of how to build a dll.
-For this example, we'll use a single file
-<filename>myprog.c</filename> for the program
-(<filename>myprog.exe</filename>) and a single file
-<filename>mydll.c</filename> for the contents of the dll
-(<filename>mydll.dll</filename>).</para>
-
-<para>Fortunately, with the latest gcc and binutils the process for building a dll
-is now pretty simple. Say you want to build this minimal function in mydll.c:</para>
-
-<screen>
-#include &lt;stdio.h&gt;
-
-int
-hello()
-{
- printf ("Hello World!\n");
-}
-</screen>
-
-<para>First compile mydll.c to object code:</para>
-
-<screen>gcc -c mydll.c</screen>
-
-<para>Then, tell gcc that it is building a shared library:</para>
-
-<screen>gcc -shared -o mydll.dll mydll.o</screen>
-
-<para>
-That's it! To finish up the example, you can now link to the
-dll with a simple program:
-</para>
-
-<screen>
-int
-main ()
-{
- hello ();
-}
-</screen>
-
-<para>
-Then link to your dll with a command like:
-</para>
-
-<screen>gcc -o myprog myprog.c -L./ -lmydll</screen>
-
-<para>However, if you are building a dll as an export library,
-you will probably want to use the complete syntax:</para>
-
-<screen>gcc -shared -o cyg${module}.dll \
- -Wl,--out-implib=lib${module}.dll.a \
- -Wl,--export-all-symbols \
- -Wl,--enable-auto-import \
- -Wl,--whole-archive ${old_libs} \
- -Wl,--no-whole-archive ${dependency_libs}</screen>
-
-<para>
-The name of your library is <literal>${module}</literal>, prefixed with
-<literal>cyg</literal> for the DLL and <literal>lib</literal> for the
-import library. Cygwin DLLs use the <literal>cyg</literal> prefix to
-differentiate them from native-Windows MinGW DLLs, see
-<ulink url="http://mingw.org">the MinGW website</ulink> for more details.
-<literal>${old_libs}</literal> are all
-your object files, bundled together in static libs or single object
-files and the <literal>${dependency_libs}</literal> are import libs you
-need to link against, e.g
-<userinput>'-lpng -lz -L/usr/local/special -lmyspeciallib'</userinput>.
-</para>
-</sect2>
-
-<sect2 id="dll-link"><title>Linking Against DLLs</title>
-
-<para>If you have an existing DLL already, you need to build a
-Cygwin-compatible import library. If you have the source to compile
-the DLL, see <xref linkend="dll-build"></xref> for details on having
-<filename>gcc</filename> build one for you. If you do not have the
-source or a supplied working import library, you can get most of
-the way by creating a .def file with these commands (you might need to
-do this in <filename>bash</filename> for the quoting to work
-correctly):</para>
-
-<screen>
-echo EXPORTS > foo.def
-nm foo.dll | grep ' T _' | sed 's/.* T _//' >> foo.def
-</screen>
-
-<para>Note that this will only work if the DLL is not stripped.
-Otherwise you will get an error message: "No symbols in
-foo.dll".</para>
-
-<para>Once you have the <filename>.def</filename> file, you can create
-an import library from it like this:</para>
-
-<screen>
-dlltool --def foo.def --dllname foo.dll --output-lib foo.a
-</screen>
-
-</sect2>
-
-</sect1>
diff --git a/winsup/doc/doctool.c b/winsup/doc/doctool.c
deleted file mode 100644
index 0a5060c..0000000
--- a/winsup/doc/doctool.c
+++ /dev/null
@@ -1,622 +0,0 @@
-/* doctool.c
-
- Copyright 1998,1999,2000,2001,2006 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <dirent.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <utime.h>
-
-/* Building native in a cross-built directory is tricky. Be careful,
-and beware that you don't have the full portability stuff available to
-you (like libiberty) */
-
-/*****************************************************************************/
-
-/* The list of extensions that may contain SGML snippets. We check
- both cases in case the file system isn't case sensitive enough. */
-
-struct {
- char *upper;
- char *lower;
- int is_sgml;
-} extensions[] = {
- { ".C", ".c", 0 },
- { ".CC", ".cc", 0 },
- { ".H", ".h", 0 },
- { ".SGML", ".sgml", 1 },
- { 0, 0, 0 }
-};
-
-/*****************************************************************************/
-
-void
-show_help()
-{
- printf("Usage: doctool [-m] [-i] [-d dir] [-o outfile] [-s prefix] \\\n");
- printf(" [-b book_id] infile\n");
- printf(" -m means to adjust Makefile to include new dependencies\n");
- printf(" -i means to include internal snippets\n");
- printf(" -d means to recursively scan directory for snippets\n");
- printf(" -o means to output to file (else stdout)\n");
- printf(" -s means to suppress source dir prefix\n");
- printf(" -b means to change the <book id=\"book_id\">\n");
- printf("\n");
- printf("doctool looks for DOCTOOL-START and DOCTOOL-END lines in source,\n");
- printf("saves <foo id=\"bar\"> blocks, and looks for DOCTOOL-INSERT-bar\n");
- printf("commands to insert selected sections. IDs starting with int-\n");
- printf("are internal only, add- are added at the end of relevant sections\n");
- printf("or add-int- for both. Inserted sections are chosen by prefix,\n");
- printf("and sorted when inserted.\n");
- exit(1);
-}
-
-/*****************************************************************************/
-
-typedef struct Section {
- struct Section *next;
- struct OneFile *file;
- char *name;
- char internal;
- char addend;
- char used;
- char **lines;
- int num_lines;
- int max_lines;
-} Section;
-
-typedef struct OneFile {
- struct OneFile *next;
- char *filename;
- int enable_scan;
- int used;
- Section *sections;
-} OneFile;
-
-OneFile *file_list = 0;
-
-char *output_name = 0;
-FILE *output_file = 0;
-
-char *source_dir_prefix = "";
-char *book_id = 0;
-
-int internal_flag = 0;
-
-/*****************************************************************************/
-
-char *
-has_string(char *line, char *string)
-{
- int i;
- while (*line)
- {
- for (i=0; line[i]; i++)
- {
- if (!string[i])
- return line;
- if (line[i] != string[i])
- break;
- }
- line++;
- }
- return 0;
-}
-
-int
-starts_with(char *line, char *string)
-{
- int i=0;
- while (1)
- {
- if (!string[i])
- return 1;
- if (!line[i] || line[i] != string[i])
- return 0;
- i++;
- }
-}
-
-/*****************************************************************************/
-
-#ifdef S_ISLNK
-#define STAT lstat
-#else
-#define STAT stat
-#endif
-
-void
-scan_directory(dirname)
- char *dirname;
-{
- struct stat st;
- char *name;
- struct dirent *de;
- DIR *dir = opendir(dirname);
- if (!dir)
- return;
- while (de = readdir(dir))
- {
- if (strcmp(de->d_name, ".") == 0
- || strcmp(de->d_name, "..") == 0)
- continue;
-
- name = (char *)malloc(strlen(dirname)+strlen(de->d_name)+3);
- strcpy(name, dirname);
- strcat(name, "/");
- strcat(name, de->d_name);
-
- STAT(name, &st);
-
- if (S_ISDIR(st.st_mode) && strcmp(de->d_name, "CVS") != 0)
- {
- scan_directory(name);
- }
-
- else if (S_ISREG(st.st_mode))
- {
- char *dot = strrchr(de->d_name, '.');
- int i;
-
- if (dot)
- {
- for (i=0; extensions[i].upper; i++)
- if (strcmp(dot, extensions[i].upper) == 0
- || strcmp(dot, extensions[i].lower) == 0)
- {
- OneFile *one = (OneFile *)malloc(sizeof(OneFile));
- one->next = file_list;
- file_list = one;
- one->filename = name;
- one->enable_scan = ! extensions[i].is_sgml;
- one->used = 0;
- one->sections = 0;
- }
- }
- }
- }
- closedir (dir);
-}
-
-/*****************************************************************************/
-
-void
-scan_file(OneFile *one)
-{
- FILE *f = fopen(one->filename, "r");
- int enabled = ! one->enable_scan;
- char line[1000], *tag=0, *id=0, *tmp;
- int taglen = 0;
- Section *section = 0;
- Section **prev_section_ptr = &(one->sections);
-
- if (!f)
- {
- perror(one->filename);
- return;
- }
-
- while (fgets(line, 1000, f))
- {
- if (one->enable_scan)
- {
- /* source files have comment-embedded docs, check for them */
- if (has_string(line, "DOCTOOL-START"))
- enabled = 1;
- if (has_string(line, "DOCTOOL-END"))
- enabled = 0;
- }
- if (!enabled)
- continue;
-
- /* DOCTOOL-START
-
-<sect1 id="dt-tags">
-this is the doctool tags section.
-</sect1>
-
- DOCTOOL-END */
-
- if (!tag && line[0] == '<')
- {
- tag = (char *)malloc(strlen(line)+1);
- id = (char *)malloc(strlen(line)+1);
- if (sscanf(line, "<%s id=\"%[^\"]\">", tag, id) == 2)
- {
- if (strcmp(tag, "book") == 0 || strcmp(tag, "BOOK") == 0)
- {
- /* Don't want to "scan" these */
- return;
- }
- taglen = strlen(tag);
- section = (Section *)malloc(sizeof(Section));
- /* We want chunks within single files to appear in that order */
- section->next = 0;
- section->file = one;
- *prev_section_ptr = section;
- prev_section_ptr = &(section->next);
- section->internal = 0;
- section->addend = 0;
- section->used = 0;
- section->name = id;
- if (starts_with(section->name, "add-"))
- {
- section->addend = 1;
- section->name += 4;
- }
- if (starts_with(section->name, "int-"))
- {
- section->internal = 1;
- section->name += 4;
- }
- section->lines = (char **)malloc(10*sizeof(char *));
- section->num_lines = 0;
- section->max_lines = 10;
- }
- else
- {
- free(tag);
- free(id);
- tag = id = 0;
- }
- }
-
- if (tag && section)
- {
- if (section->num_lines >= section->max_lines)
- {
- section->max_lines += 10;
- section->lines = (char **)realloc(section->lines,
- section->max_lines * sizeof (char *));
- }
- section->lines[section->num_lines] = (char *)malloc(strlen(line)+1);
- strcpy(section->lines[section->num_lines], line);
- section->num_lines++;
-
- if (line[0] == '<' && line[1] == '/'
- && memcmp(line+2, tag, taglen) == 0
- && (isspace(line[2+taglen]) || line[2+taglen] == '>'))
- {
- /* last line! */
- tag = 0;
- }
- }
- }
- fclose(f);
-}
-
-/*****************************************************************************/
-
-Section **
-enumerate_matching_sections(char *name_prefix, int internal, int addend, int *count_ret)
-{
- Section **rv = (Section **)malloc(12*sizeof(Section *));
- int count = 0, max=10, prefix_len = strlen(name_prefix);
- OneFile *one;
- int wildcard = 0;
-
- if (name_prefix[strlen(name_prefix)-1] == '-')
- wildcard = 1;
-
- for (one=file_list; one; one=one->next)
- {
- Section *s;
- for (s=one->sections; s; s=s->next)
- {
- int matches = 0;
- if (wildcard)
- {
- if (starts_with(s->name, name_prefix))
- matches = 1;
- }
- else
- {
- if (strcmp(s->name, name_prefix) == 0)
- matches = 1;
- }
- if (s->internal <= internal
- && s->addend == addend
- && matches
- && ! s->used)
- {
- s->used = 1;
- if (count >= max)
- {
- max += 10;
- rv = (Section **)realloc(rv, max*sizeof(Section *));
- }
- rv[count++] = s;
- rv[count] = 0;
- }
- }
- }
- if (count_ret)
- *count_ret = count;
- return rv;
-}
-
-/*****************************************************************************/
-
-#define ID_CHARS "~@$%&()_-+[]{}:."
-
-void include_section(char *name, int addend);
-
-char *
-unprefix(char *fn)
-{
- int l = strlen(source_dir_prefix);
- if (memcmp(fn, source_dir_prefix, l) == 0)
- {
- fn += l;
- while (*fn == '/' || *fn == '\\')
- fn++;
- return fn;
- }
- return fn;
-}
-
-void
-parse_line(char *line, char *filename)
-{
- char *cmd = has_string(line, "DOCTOOL-INSERT-");
- char *sname, *send, *id, *save;
- if (!cmd)
- {
- if (book_id
- && (starts_with(line, "<book") || starts_with(line, "<BOOK")))
- {
- cmd = strchr(line, '>');
- if (cmd)
- {
- cmd++;
- fprintf(output_file, "<book id=\"%s\">", book_id);
- fputs(cmd, output_file);
- return;
- }
- }
- fputs(line, output_file);
- return;
- }
- if (cmd != line)
- fwrite(line, cmd-line, 1, output_file);
- save = (char *)malloc(strlen(line)+1);
- strcpy(save, line);
- line = save;
-
- sname = cmd + 15; /* strlen("DOCTOOL-INSERT-") */
- for (send = sname;
- *send && isalnum(*send) || strchr(ID_CHARS, *send);
- send++);
- id = (char *)malloc(send-sname+2);
- memcpy(id, sname, send-sname);
- id[send-sname] = 0;
- include_section(id, 0);
-
- fprintf(output_file, "<!-- %s -->\n", unprefix(filename));
-
- fputs(send, output_file);
- free(save);
-}
-
-int
-section_sort(const void *va, const void *vb)
-{
- Section *a = *(Section **)va;
- Section *b = *(Section **)vb;
- int rv = strcmp(a->name, b->name);
- if (rv)
- return rv;
- return a->internal - b->internal;
-}
-
-void
-include_section(char *name, int addend)
-{
- Section **sections, *s;
- int count, i, l;
-
- sections = enumerate_matching_sections(name, internal_flag, addend, &count);
-
- qsort(sections, count, sizeof(sections[0]), section_sort);
- for (i=0; i<count; i++)
- {
- s = sections[i];
- s->file->used = 1;
- fprintf(output_file, "<!-- %s -->\n", unprefix(s->file->filename));
- for (l=addend; l<s->num_lines-1; l++)
- parse_line(s->lines[l], s->file->filename);
- if (!addend)
- {
- include_section(s->name, 1);
- parse_line(s->lines[l], s->file->filename);
- }
- }
-
- free(sections);
-}
-
-void
-parse_sgml(FILE *in, char *input_name)
-{
- static char line[1000];
- while (fgets(line, 1000, in))
- {
- parse_line(line, input_name);
- }
-}
-
-/*****************************************************************************/
-
-void
-fix_makefile(char *output_name)
-{
- FILE *in, *out;
- char line[1000];
- int oname_len = strlen(output_name);
- OneFile *one;
- int used_something = 0;
- struct stat st;
- struct utimbuf times;
-
- stat("Makefile", &st);
-
- in = fopen("Makefile", "r");
- if (!in)
- {
- perror("Makefile");
- return;
- }
-
- out = fopen("Makefile.new", "w");
- if (!out)
- {
- perror("Makefile.new");
- return;
- }
-
- while (fgets(line, 1000, in))
- {
- if (starts_with(line, output_name)
- && strcmp(line+oname_len, ": \\\n") == 0)
- {
- /* this is the old dependency */
- while (fgets(line, 1000, in))
- {
- if (strcmp(line+strlen(line)-2, "\\\n"))
- break;
- }
- }
- else
- fputs(line, out);
- }
- fclose(in);
-
- for (one=file_list; one; one=one->next)
- if (one->used)
- {
- used_something = 1;
- break;
- }
-
- if (used_something)
- {
- fprintf(out, "%s:", output_name);
- for (one=file_list; one; one=one->next)
- if (one->used)
- fprintf(out, " \\\n\t%s", one->filename);
- fprintf(out, "\n");
- }
-
- fclose(out);
-
- times.actime = st.st_atime;
- times.modtime = st.st_mtime;
- utime("Makefile.new", &times);
-
- if (rename("Makefile", "Makefile.old"))
- return;
- if (rename("Makefile.new", "Makefile"))
- rename("Makefile.old", "Makefile");
-}
-
-/*****************************************************************************/
-
-int
-main(argc, argv)
- int argc;
- char **argv;
-{
- int i;
- OneFile *one;
- FILE *input_file;
- int fix_makefile_flag = 0;
-
- while (argc > 1 && argv[1][0] == '-')
- {
- if (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0)
- {
- show_help();
- }
- else if (strcmp(argv[1], "-i") == 0)
- {
- internal_flag = 1;
- }
- else if (strcmp(argv[1], "-m") == 0)
- {
- fix_makefile_flag = 1;
- }
- else if (strcmp(argv[1], "-d") == 0 && argc > 2)
- {
- scan_directory(argv[2]);
- argc--;
- argv++;
- }
- else if (strcmp(argv[1], "-o") == 0 && argc > 2)
- {
- output_name = argv[2];
- argc--;
- argv++;
- }
- else if (strcmp(argv[1], "-s") == 0 && argc > 2)
- {
- source_dir_prefix = argv[2];
- argc--;
- argv++;
- }
- else if (strcmp(argv[1], "-b") == 0 && argc > 2)
- {
- book_id = argv[2];
- argc--;
- argv++;
- }
-
- argc--;
- argv++;
- }
-
- for (one=file_list; one; one=one->next)
- {
- scan_file(one);
- }
-
- input_file = fopen(argv[1], "r");
- if (!input_file)
- {
- perror(argv[1]);
- return 1;
- }
-
- if (output_name)
- {
- output_file = fopen(output_name, "w");
- if (!output_file)
- {
- perror(output_name);
- return 1;
- }
- }
- else
- {
- output_file = stdout;
- output_name = "<stdout>";
- }
-
- parse_sgml(input_file, argv[1]);
-
- if (output_file != stdout)
- fclose(output_file);
-
- if (fix_makefile_flag)
- fix_makefile(output_name);
-
- return 0;
-}
diff --git a/winsup/doc/doctool.txt b/winsup/doc/doctool.txt
deleted file mode 100644
index c89e392..0000000
--- a/winsup/doc/doctool.txt
+++ /dev/null
@@ -1,146 +0,0 @@
-Doctool
-
-DJ Delorie <dj@cygnus.com>
-
-These are the instructions for using doctool. Yes, I should have
-written them *in* DocBook, but hey, I was in a hurry.
-
-OK, doctool is a program that gathers snippets of a docbook document and
-puts them all together in the right order. There are three
-places that it gets snippets from:
-
-1. The document that you tell it you want "finished"
-
-2. blocks of SGML in *.sgml files
-
-3. comments in source code
-
-The first of these is the template file, which is to say, it's a
-normal SGML file (sort of). This file is the first one read, and
-includes such things as your <book> tags etc. It contains commands to
-doctool to tell it where to put the other parts.
-
-The second, the *.sgml files, contain one or more blocks of SGML.
-To work with doctool, each of these snippets must begin and end
-with matching tags, must have an id="" attribute, and the start/end
-tags must begin at the beginning of the line. For example:
-
-<foo id="frob-45">
- stuff goes here
-</foo>
-<bar id="frob-48">
- stuff goes here
-</bar>
-
-In this example, the file contains two snippets, one marked by "foo"
-and one barked by "bar", with id's "from-45" and "from-48". Note that
-I made up the foo and bar tags. You'd usually use a <sect1> tag or
-something useful like that. Stuff outside the blocks is ignored.
-
-The third is simply an encapsulation of the second in comments, like this:
-
-/* DOCTOOL-START
-<foo id="frob-45">
- stuff goes here
-</foo>
-DOCTOOL-END */
-
-The DOCTOOL-START and DOCTOOL-END things are special. Doctool uses
-those to know which parts of which comments are useful, and which
-parts are the useless source code stuff ;-)
-
-
-OK, so now we've got all these snippets of SGML floating around. What
-do we do with them? Well, inside the template document (#1 in our
-list up there) you'd put text snippets that said "ok, put them
-here". Each text snippet looks like this:
-
-DOCTOOL-INSERT-frob-
-
-Note that the "frob-" part tells doctool to pull in all the snippets
-with IDs that start with "frob-", in alphabetical (well, asciibetical
-at the moment) order. So, by saying "DOCTOOL-INSERT-frob-" you'd get
-all the "frob-*" snippets, like "frob-45" and "frob-48".
-
-If you just said DOCTOOL-INSERT-frob, it inserts the snippet named
-"frob" and no others.
-
-Note that no snippet will ever be inserted more than once, no matter
-how many DOCTOOL-INSERTs you have.
-
-There's two other tricks doctool has. If it finds a snippet with an ID
-like "int-*" (i.e. int-frob-45) that means that snippet of documentation
-is for the "internal" version only. The "int-" is discarded, and if
-the -i option is given to doctool, this snippet is treated as if the
-int- wasn't there. Without the -i, the int-* snippets are ignored
-completely.
-
-If a snippet has "add-" on it, like "add-frob-45", that's an addendum.
-Each time a snippet named without the add- is found, doctool looks for
-an addendum with exactly that same name (i.e. frob-45 looks for
-add-frob-45). If it finds any, it puts them just before the last line
-of the non-add snippet (so that it's *inside* the main snippet's
-block, not after it). Example:
-
-<sect1 id="frob-45">
- some text
-</sect1>
-<sect1 id="add-frob-45">
- more text
-</sect1>
-
-This would yield:
-
-<sect1 id="frob-45">
- some text
- more text
-</sect1>
-
-You should use the same outermost tags as the main snippet, but only
-because it sets the proper nesting rules for what's enclosed.
-
-You can use add- and int- at the same time, but always do add-int- and
-not int-add- (i.e. "add-int-frob-45").
-
-
-OK, now for doctool command line options.
-
--m tells doctool to "fix" the Makefile (not makefile) to include the
-extra dependencies needed by the file you're generating. You need to
-manually include dependencies on the Makefile itself and the template
-file; doctool only includes the snippet files (sources etc) that it
-actually pulled content from. Note: this isn't perfect! Someone can
-come along and add a new snippet to a source file, and doctool would
-never know. Sometimes, it's best to just rebuild the docs all the
-time.
-
--i means to include snippets with the "int-" prefix on their IDs. Use
-with -b to make internal and public versions from the same sources.
-
-"-d dir" tells doctool to scan all the files in that directory (and
-subdirectories, recursively) for files that might contain snippets of
-SGML. These include *.c, *.cc, *.h, and *.sgml. The idea is that
-most of the documentation would be in a *.sgml file named after the
-source (i.e. foo.c -> foo.sgml) but some commentary within the source
-might be useful in the docs as well. SGML files (*.sgml) do not need
-the DOCTOOL-START/END tags but the others do.
-
--o sets the output file. Without -o, the file goes to stdout (ick).
-
--s tells doctool to supress a "source directory prefix". What this
-means is that, in the generated output doctool puts comments that say
-where each snippet comes from (for debugging), which includes the full
-path sometimes, but if you use -s, you can tell doctool to cut off
-that prefix. For example,
-/usr/people/dj/src/cygnus/latest/devo/winsup/foo.c might get shortened
-to winsup/foo.c if you gave "-s
-/usr/people/dj/src/cygnus/latest/devo/". Cygnus makefiles could
-just use -s $(srcdir) most of the time.
-
--b changes the ID for the <book> tag. db2html uses the <book> tag's
-ID as the default subdirectory name and/or html file name to create
-the book with. You'd need this to generate two books (internal vs
-public) from the same source.
-
-The only other thing you'd add to the command line is the ONE template
-file you want to pull in.
diff --git a/winsup/doc/effectively.sgml b/winsup/doc/effectively.sgml
deleted file mode 100644
index b1e38c3..0000000
--- a/winsup/doc/effectively.sgml
+++ /dev/null
@@ -1,215 +0,0 @@
-<sect1 id="using-effectively">
-<title>Using Cygwin effectively with Windows</title>
-
-<para>
-Cygwin is not a full operating system, and so must rely on Windows for
-accomplishing some tasks. For example, Cygwin provides a POSIX view
-of the Windows filesystem, but does not provide filesystem drivers of
-its own. Therefore part of using Cygwin effectively is learning to use
-Windows effectively.
-Many Windows utilities provide a good way to interact with Cygwin's
-predominately command-line environment. For example,
-<command>ipconfig.exe</command> provides information about network
-configuration, and <command>net.exe</command> views and configures
-network file and printer resources. Most of these tools
-support the <literal>/?</literal> switch to display usage information.
-</para>
-
-<para>
-Unfortunately, no standard set of tools included with all versions of
-Windows exists. If you are unfamiliar with the tools available
-on your system, here is a general guide. Windows NT 4.0 has only a basic
-set of tools, which later versions of Windows expanded.
-Microsoft also provides free downloads for Windows NT 4.0 (the Resource Kit
-Support Tools), Windows 2000 (the Resource Kit Tools), and XP (the
-Windows Support Tools). Generally, the younger the Windows version, the
-more complete are the on-board tools. Additionally, many independent sites
-such as
-<ulink url="http://download.com">download.com</ulink>,
-<ulink url="http://simtel.net">simtel.net</ulink>,
-and Microsoft's own
-<ulink url="http://technet.microsoft.com/en-us/sysinternals/default.aspx">Sysinternals</ulink>
-provide quite useful command-line utilities, as far as they are not
-already provided by Cygwin. A few Windows tools, such as
-<command>find.exe</command>, <command>link.exe</command> and
-<command>sort.exe</command>, may conflict with the Cygwin versions
-make sure that you use the full path (<command>/usr/bin/find</command>)
-or that your Cygwin <literal>bin</literal> directory comes first in your
-<envar>PATH</envar>.
-</para>
-
-<sect2 id="using-pathnames-effectively"> <title>Pathnames</title>
-
-<para>
-Windows programs do not understand POSIX pathnames, so any arguments
-that reference the filesystem must be in Windows (or DOS) format or
-translated. Cygwin provides the <command>cygpath</command> utility for
-converting between Windows and POSIX paths. A complete description of its
-options and examples of its usage are in <xref linkend="cygpath"></xref>,
-including a shell script for starting Windows Explorer in any directory.
-The same format works for most Windows programs, for example
-<screen>
-<literal>notepad.exe "$(cygpath -aw "Desktop/Phone Numbers.txt")"</literal>
-</screen>
-A few programs require a Windows-style, semicolon-delimited path list,
-which <command>cygpath</command> can translate from a POSIX path with the
-<literal>-p</literal> option. For example, a Java compilation from
-<command>bash</command> might look like this:
-<screen>
-<literal>javac -cp "$(cygpath -pw "$CLASSPATH")" hello.java</literal>
-</screen>
-Since using quoting and subshells is somewhat awkward, it is often
-preferable to use <command>cygpath</command> in shell scripts.
-</para>
-
-</sect2>
-
-<sect2 id="using-console"> <title>Console Programs</title>
-<para>
-Another issue is receiving output from or giving input to console-based
-Windows programs. Unfortunately, interacting with Windows console
-applications is not a simple matter of using a translation utility. Windows
-console applications are designed to run under
-<command>cmd.exe</command>, and some do not deal gracefully with other
-situations. Cygwin can receive console input only if it
-is also running in a console window since Windows does not provide
-any way to attach to the backend of the console device. Another
-traditional Unix input/output method, ptys (pseudo-terminals), is
-supported by Cygwin but not entirely by Windows. The basic problem is
-that a Cygwin pty is a pipe and some Windows applications do not like
-having their input or output redirected to pipes.
-</para>
-
-<para>
-To help deal with these issues, Cygwin supports customizable levels of
-Windows versus Unix compatibility behavior. To be most compatible with
-Windows programs, use a DOS prompt, running only the occasional Cygwin
-command or script. Next would be to run <command>bash</command> within
-a default DOS box. To make Cygwin more Unix compatible in this case,
-set <envar>CYGWIN=tty</envar> (see <xref linkend="using-cygwinenv"></xref>).
-Alternatively, the optional <systemitem>rxvt</systemitem> package provides
-a native-Windows version of the popular X11 terminal emulator (it is not
-necessary to set <envar>CYGWIN=tty</envar> with <command>rxvt</command>).
-Using <command>rxvt.exe</command> provides the most Unix-like environment,
-but expect some compatibility problems with Windows programs.
-</para>
-
-</sect2>
-
-<sect2 id="using-net"> <title>Cygwin and Windows Networking</title>
-<para>
-Many popular Cygwin packages, such as <systemitem>ncftp</systemitem>,
-<systemitem>lynx</systemitem>, and <systemitem>wget</systemitem>, require a
-network connection. Since Cygwin relies on Windows for connectivity,
-if one of these tools is not working as expected you may need to
-troubleshoot using Windows tools. The first test is to see if you
-can reach the URL's host with <command>ping.exe</command>, one of the
-few utilities included with every Windows version since Windows 95.
-If you chose to install the <systemitem>inetutils</systemitem> package,
-you may have both
-Windows and Cygwin versions of utilities such as <command>ftp</command>
-and <command>telnet</command>. If you are having problems using one
-of these programs, see if the alternate one works as expected.
-</para>
-
-<para>
-There are a variety of other programs available for specific situations.
-If your system does not have an always-on network connection, you
-may be interested in <command>rasdial.exe</command> for automating dialup
-connections.
-Users who frequently change their network
-configuration can script these changes with <command>netsh.exe</command>
-(Windows 2000 and later). For proxy users, the open source
-<ulink url="http://apserver.sourceforge.net">
-NTLM Authorization Proxy Server</ulink> or the no-charge
-<ulink url="http://www.hummingbird.com/products/nc/socks/index.html">
-Hummingbird SOCKS Proxy</ulink> may allow you to use Cygwin network
-programs in your environment.
-</para>
-
-</sect2>
-
-<sect2 id="using-cygutils"><title>The cygutils package</title>
-
-<para>
-The optional <systemitem>cygutils</systemitem> package contains
-miscellaneous tools that are small enough to not require their own package.
-It is not included in a default Cygwin install; select it from the Utils
-category in <command>setup.exe</command>. Several of the
-<systemitem>cygutils</systemitem> tools are useful for interacting with
-Windows.</para>
-
-<para>
-One of the hassles of Unix-Windows interoperability is the different line
-endings on text files. As mentioned in <xref linkend="using-textbinary"></xref>,
-Unix tools such as <command>tr</command> can convert between CRLF and LF
-endings, but <systemitem>cygutils</systemitem> provides several dedicated programs:
-<command>conv</command>, <command>d2u</command>, <command>dos2unix</command>,
-<command>u2d</command>, and <command>unix2dos</command>. Use the
-<literal>--help</literal> switch for usage information.
-</para>
-</sect2>
-
-<sect2 id="using-shortcuts"><title>Creating shortcuts with cygutils</title>
-<para>
-Another problem area is between Unix-style links, which link one file
-to another, and Microsoft .lnk files, which provide a shortcut to a
-file. They seem similar at first glance but, in reality, are fairly
-different. By default, Cygwin uses a mechanism that creates symbolic
-links that are compatible with standard Microsoft .lnk files. However,
-they do not include much of the information that is available in a
-standard Microsoft shortcut, such as the working directory, an icon,
-etc. The <systemitem>cygutils</systemitem> package includes a
-<command>mkshortcut</command>
-utility for creating standard Microsoft .lnk files.
-</para>
-
-<para>
-If Cygwin handled these native shortcuts like any other symlink,
-you could not archive Microsoft .lnk files into <command>tar</command>
-archives and keep all the information in them. After unpacking,
-these shortcuts would have lost all the extra information and would
-be no different than standard Cygwin symlinks. Therefore these two types
-of links are treated differently. Unfortunately, this means that the
-usual Unix way of creating and using symlinks does not work with
-Windows shortcuts.
-</para>
-</sect2>
-
-<sect2 id="using-printing"><title>Printing with cygutils</title>
-<para>
-There are several options for printing from Cygwin, including the
-<command>lpr</command> found in <systemitem>cygutils</systemitem> (not to be confused with the
-native Windows <command>lpr.exe</command>). The easiest way to use <systemitem>cygutils</systemitem>'
-<command>lpr</command> is to specify a default device name in the
-<envar>PRINTER</envar> environment variable. You may also specify a device
-on the command line with the <literal>-d</literal> or <literal>-P</literal>
-options, which will override the environment variable setting.
-</para>
-
-<para>
-A device name
-may be a UNC path (<literal>\\server_name\printer_name</literal>), a reserved
-DOS device name (<literal>prn</literal>, <literal>lpt1</literal>), or a
-local port name that is mapped to a printer share. Note that forward slashes
-may be used in a UNC path (<literal>//server_name/printer_name</literal>),
-which is helpful when using <command>lpr</command> from a shell that uses
-the backslash as an escape character.
-</para>
-
-<para>
-<command>lpr</command> sends raw data to the printer; no formatting is done.
-Many, but not all, printers accept plain text as input. If your printer
-supports PostScript, packages such as
-<systemitem>a2ps</systemitem> and <systemitem>enscript</systemitem> can prepare
-text files for printing. The <systemitem>ghostscript</systemitem> package also
-provides some translation
-from PostScript to various native printer languages. Additionally, a native
-Windows application for printing PostScript, <command>gsprint</command>, is
-available from the <ulink url="http://www.cs.wisc.edu/~ghost/">Ghostscript
-website</ulink>.
-</para>
-
-</sect2>
-
-</sect1>
diff --git a/winsup/doc/faq-api.xml b/winsup/doc/faq-api.xml
deleted file mode 100644
index ad9ea72..0000000
--- a/winsup/doc/faq-api.xml
+++ /dev/null
@@ -1,353 +0,0 @@
-<!-- faq-api.xml -->
-<qandaentry id="faq.api.everything">
-<question><para>How does everything work?</para></question>
-<answer>
-
-<para>There's a C library which provides a Unix-style API. The
-applications are linked with it and voila - they run on Windows.
-</para>
-<para>The aim is to add all the goop necessary to make your apps run on
-Windows into the C library. Then your apps should run on Unix and
-Windows with no changes at the source level.
-</para>
-<para>The C library is in a DLL, which makes basic applications quite small.
-And it allows relatively easy upgrades to the Win32/Unix translation
-layer, providing that DLL changes stay backward-compatible.
-</para>
-<para>For a good overview of Cygwin, you may want to read the paper on Cygwin
-published by the Usenix Association in conjunction with the 2d Usenix NT
-Symposium in August 1998. It is available in HTML format on the project
-WWW site.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.api.snapshots">
-<question><para>Are development snapshots for the Cygwin library available?</para></question>
-<answer>
-
-<para>Yes. They're made whenever anything interesting happens inside the
-Cygwin library (usually roughly on a nightly basis, depending on how much
-is going on). They are only intended for those people who wish to
-contribute code to the project. If you aren't going to be happy
-debugging problems in a buggy snapshot, avoid these and wait for a real
-release. The snapshots are available from
-<ulink url="http://cygwin.com/snapshots/">http://cygwin.com/snapshots/</ulink>.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.api.cr-lf">
-<question><para>How is the DOS/Unix CR/LF thing handled?</para></question>
-<answer>
-
-<para>Let's start with some background.
-</para>
-<para>In UNIX, a file is a file and what the file contains is whatever the
-program/programmer/user told it to put into it. In Windows, a file is
-also a file and what the file contains depends not only on the
-program/programmer/user but also the file processing mode.
-</para>
-<para>When processing in text mode, certain values of data are treated
-specially. A \n (new line) written to the file will prepend a \r
-(carriage return) so that if you `printf("Hello\n") you in fact get
-"Hello\r\n". Upon reading this combination, the \r is removed and the
-number of bytes returned by the read is 1 less than was actually read.
-This tends to confuse programs dependent on ftell() and fseek(). A
-Ctrl-Z encountered while reading a file sets the End Of File flags even
-though it truly isn't the end of file.
-</para>
-<para>One of Cygwin's goals is to make it possible to easily mix Cygwin-ported
-Unix programs with generic Windows programs. As a result, Cygwin opens
-files in text mode as is normal under Windows. In the accompanying
-tools, tools that deal with binaries (e.g. objdump) operate in Unix
-binary mode and tools that deal with text files (e.g. bash) operate in
-text mode.
-</para>
-<para>Some people push the notion of globally setting the default processing
-mode to binary via mount point options or by setting the CYGWIN
-environment variable. But that creates a different problem. In
-binary mode, the program receives all of the data in the file, including
-a \r. Since the programs will no longer deal with these properly for
-you, you would have to remove the \r from the relevant text files,
-especially scripts and startup resource files. This is a porter "cop
-out", forcing the user to deal with the \r for the porter.
-</para>
-<para>It is rather easy for the porter to fix the source code by supplying the
-appropriate file processing mode switches to the open/fopen functions.
-Treat all text files as text and treat all binary files as binary. To be
-specific, you can select binary mode by adding <literal>O_BINARY</literal> to
-the second argument of an <literal>open</literal> call, or
-<literal>"b"</literal> to second argument of an <literal>fopen</literal> call.
-You can also call <literal>setmode (fd, O_BINARY)</literal>.
-</para>
-<para>Note that because the open/fopen switches are defined by ANSI, they
-exist under most flavors of Unix; open/fopen will just ignore the switch
-since they have no meaning to UNIX.
-</para>
-<para>Explanation adapted from mailing list email by Earnie Boyd
-&lt;earnie_boyd (at) yahoo.com&gt;.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.api.threads">
-<question><para>Is the Cygwin library multi-thread-safe?</para></question>
-<answer>
-
-<para>Yes.
-</para>
-<para>There is also extensive support for 'POSIX threads', see the file
-<literal>cygwin.din</literal> for the list of POSIX thread functions provided.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.api.winnt">
-<question><para>Why is some functionality only supported in Windows NT?</para></question>
-<answer>
-
-<para>Windows 9x: n.
-32 bit extensions and a graphical shell for a 16 bit patch to an
-8 bit operating system originally coded for a 4 bit microprocessor,
-written by a 2 bit company that can't stand 1 bit of competition.
-</para>
-<para>But seriously, Windows 9x lacks most of the security-related calls and
-has several other deficiencies with respect to its version of the Win32
-API. See the calls.texinfo document for more information as to what
-is not supported in Win 9x.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.api.fork">
-<question><para>How is fork() implemented?</para></question>
-<answer>
-
-<para>Cygwin fork() essentially works like a non-copy on write version
-of fork() (like old Unix versions used to do). Because of this it
-can be a little slow. In most cases, you are better off using the
-spawn family of calls if possible.
-</para>
-<para>Here's how it works:
-</para>
-<para>Parent initializes a space in the Cygwin process table for child.
-Parent creates child suspended using Win32 CreateProcess call, giving
-the same path it was invoked with itself. Parent calls setjmp to save
-its own context and then sets a pointer to this in the Cygwin shared
-memory area (shared among all Cygwin tasks). Parent fills in the child's
-.data and .bss subsections by copying from its own address space into
-the suspended child's address space. Parent then starts the child.
-Parent waits on mutex for child to get to safe point. Child starts and
-discovers if has been forked and then longjumps using the saved jump
-buffer. Child sets mutex parent is waiting on and then blocks on
-another mutex waiting for parent to fill in its stack and heap. Parent
-notices child is in safe area, copies stack and heap from itself into
-child, releases the mutex the child is waiting on and returns from the
-fork call. Child wakes from blocking on mutex, recreates any mmapped
-areas passed to it via shared area and then returns from fork itself.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.api.globbing">
-<question><para>How does wildcarding (globbing) work?</para></question>
-<answer>
-
-<para>If the DLL thinks it was invoked from a DOS style prompt, it runs a
-`globber' over the arguments provided on the command line. This means
-that if you type <literal>LS *.EXE</literal> from DOS, it will do what you might
-expect.
-</para>
-<para>Beware: globbing uses <literal>malloc</literal>. If your application defines
-<literal>malloc</literal>, that will get used. This may do horrible things to you.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.api.symlinks">
-<question><para>How do symbolic links work?</para></question>
-<answer>
-
-<para>Cygwin knows of two ways to create symlinks.
-</para>
-<para>The old method is the only valid one up to but not including version 1.3.0.
-If it's enabled (from 1.3.0 on by setting `nowinsymlinks' in the environment
-variable CYGWIN) Cygwin generates link files with a magic header. When you
-open a file or directory that is a link to somewhere else, it opens the file
-or directory listed in the magic header. Because we don't want to have to
-open every referenced file to check symlink status, Cygwin marks symlinks
-with the system attribute. Files without the system attribute are not
-checked. Because remote samba filesystems do not enable the system
-attribute by default, symlinks do not work on network drives unless you
-explicitly enable this attribute.
-</para>
-<para>The new method which is introduced with Cygwin version 1.3.0 is enabled
-by default or if `winsymlinks' is set in the environment variable CYGWIN.
-Using this method, Cygwin generates symlinks by creating Windows shortcuts.
-Cygwin created shortcuts have a special header (which is in that way never
-created by Explorer) and the R/O attribute set. A DOS path is stored in
-the shortcut as usual and the description entry is used to store the POSIX
-path. While the POSIX path is stored as is, the DOS path has perhaps to be
-rearranged to result in a valid path. This may result in a divergence
-between the DOS and the POSIX path when symlinks are moved crossing mount
-points. When a user changes the shortcut, this will be detected by Cygwin
-and it will only use the DOS path then. While Cygwin shortcuts are shown
-without the ".lnk" suffix in `ls' output, non-Cygwin shortcuts are shown
-with the suffix. However, both are treated as symlinks.
-</para>
-<para>Both, the old and the new symlinks can live peacefully together since Cygwin
-treats both as symlinks regardless of the setting of `(no)winsymlinks' in
-the environment variable CYGWIN.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.api.executables">
-<question><para>Why do some files, which are not executables have the 'x' type.</para></question>
-<answer>
-
-<para>When working out the Unix-style attribute bits on a file, the library
-has to fill out some information not provided by the WIN32 API.
-</para>
-<para>It guesses that files ending in .exe and .bat are executable, as are
-ones which have a "#!" as their first characters.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.api.secure">
-<question><para>How secure is Cygwin in a multi-user environment?</para></question>
-<answer>
-
-<para>As of version 1.5.13, the Cygwin developers are not aware of any feature
-in the cygwin dll that would allow users to gain privileges or to access
-objects to which they have no rights under Windows. However there is no
-guarantee that Cygwin is as secure as the Windows it runs on. Cygwin
-processes share some variables and are thus easier targets of denial of
-service type of attacks.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.api.net-functions">
-<question><para>How do the net-related functions work?</para></question>
-<answer>
-
-<para><emphasis role='bold'>(Please note: This section has not yet been updated for the latest net release.)</emphasis>
-</para>
-<para>The network support in Cygwin is supposed to provide the Unix API, not
-the Winsock API.
-</para>
-<para>There are differences between the semantics of functions with the same
-name under the API.
-</para>
-<para>E.g., the select system call on Unix can wait on a standard file handles
-and handles to sockets. The select call in Winsock can only wait on
-sockets. Because of this, cygwin.dll does a lot of nasty stuff behind
-the scenes, trying to persuade various Winsock/win32 functions to do what
-a Unix select would do.
-</para>
-<para>If you are porting an application which already uses Winsock, then
-using the net support in Cygwin is wrong.
-</para>
-<para>But you can still use native Winsock, and use Cygwin. The functions
-which cygwin.dll exports are called 'cygwin_&lt;name&gt;'. There
-are a load of defines which map the standard Unix names to the names
-exported by the DLL-- check out include/netdb.h:
-</para>
-<screen>
-..etc..
-void cygwin_setprotoent (int);
-void cygwin_setservent (int);
-void cygwin_setrpcent (int);
-..etc..
-#ifndef __INSIDE_CYGWIN_NET__
-#define endprotoent cygwin_endprotoent
-#define endservent cygwin_endservent
-#define endrpcent cygwin_endrpcent
-..etc..
-</screen>
-
-<para>The idea is that you'll get the Unix-&gt;Cygwin mapping if you include
-the standard Unix header files. If you use this, you won't need to
-link with libwinsock.a - all the net stuff is inside the DLL.
-</para>
-<para>The mywinsock.h file is a standard winsock.h which has been hacked to
-remove the bits which conflict with the standard Unix API, or are
-defined in other headers. E.g., in mywinsock.h, the definition of
-struct hostent is removed. This is because on a Unix box, it lives in
-netdb. It isn't a good idea to use it in your applications.
-</para>
-<para>As of the b19 release, this information may be slightly out of date.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.api.winsock">
-<question><para>I don't want Unix sockets, how do I use normal Win32 winsock?</para></question>
-<answer>
-
-<para>To use the vanilla Win32 winsock, you just need to #define __USE_W32_WINSOCK
-and #include "windows.h" (or "winsock2.h" at the top of your source file(s). You may
-find it easier to add "-D__USE_W32_WINSOCK" to the CFLAGS settings in your makefile,
-if you are using one, as this will then apply to all your source files. It is also
-worth using "#define WIN32_LEAN_AND_MEAN" before you include the windows header file,
-as this will prevent it from pulling in lots of header files for all sorts of unrelated
-windows APIs when all you want is the Winsock definitions; again, this could be set
-for the entire project in your CFLAGS.
-</para><para>
-You'll also need to add -lwsock32 to the compiler's command line (or the makefile's
-list of link libs) so that you link against libwsock32.a.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.api.versions">
-<question><para>What version numbers are associated with Cygwin?</para></question>
-<answer>
-
-<para>Cygwin versioning is relatively complicated because of its status as a
-shared library. First of all, since October 1998 every Cygwin DLL has
-been named <literal>cygwin1.dll</literal> and has a 1 in the release name.
-Additionally, there are DLL major and minor numbers that correspond to
-the name of the release, and a release number. In other words,
-cygwin-1.5.10-2 is <literal>cygwin1.dll</literal>, major version 5, minor version
-10, release 2.
-</para>
-<para>The <literal>cygwin1.dll</literal> major version number gets incremented only when a
-change is made that makes existing software incompatible. For example,
-the first major version 5 release, cygwin-1.5.0-1, added 64-bit file I/O
-operations, which required many libraries to be recompiled and relinked.
-The minor version changes every time we make a new backward compatible
-Cygwin release available. There is also a <literal>cygwin1.dll</literal> release
-version number. The release number is only incremented if we update an
-existing release in a way that does not effect the DLL (like a missing
-header file).
-</para>
-<para>There are also Cygwin API major and minor numbers. The major number
-tracks important non-backward-compatible interface changes to the API.
-An executable linked with an earlier major number will not be compatible
-with the latest DLL. The minor number tracks significant API additions
-or changes that will not break older executables but may be required by
-newly compiled ones.
-</para>
-<para>Then there is a shared memory region compatibility version number. It is
-incremented when incompatible changes are made to the shared memory
-region or to any named shared mutexes, semaphores, etc. Finally there
-is a mount point registry version number which keeps track
-of non-backwards-compatible changes to the registry mount table layout.
-This has been <literal>mounts v2</literal> for a long time. For more exciting Cygwin
-version number details, check out the <literal>/usr/include/cygwin/version.h</literal>
-file.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.api.timezone">
-<question><para>Why isn't _timezone set correctly?</para></question>
-<answer>
-
-<para><emphasis role='bold'>(Please note: This section has not yet been updated for the latest net release.)</emphasis>
-</para>
-<para>Did you explicitly call tzset() before checking the value of _timezone?
-If not, you must do so.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.api.mouse">
-<question><para>Is there a mouse interface?</para></question>
-<answer>
-
-<para>There is no way to capture mouse events from Cygwin. There are
-currently no plans to add support for this.
-</para>
-</answer></qandaentry>
-
diff --git a/winsup/doc/faq-problems.xml b/winsup/doc/faq-problems.xml
deleted file mode 100644
index 453bae9..0000000
--- a/winsup/doc/faq-problems.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<!-- faq-problems.xml -->
-<para>Aware of the problem, no solution known.</para>
-
-<qandaentry id="faq.known-problems.pipe-key">
-<question><para>Pipe key (<literal>|</literal>) doesn't work on non-US keyboards in Win9x/ME</para></question>
-<answer>
-
-<para>This might get fixed someday, but meanwhile, just use rxvt, which does
-not have this problem. This is no real loss, because rxvt has many
-other advantages. (Do not attempt to use the "broken" pipe key
-(<literal>&brokenpipe;</literal>) as a substitute, it is a different character.)
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.known-problems.win9x-tape">
-<question><para>Cannot access tape devices with mt on Win9x</para></question>
-<answer>
-
-<para>Win9x does not support the API used by the Cygwin fhandler_dev_tape
-class. Details at
-<ulink url="http://sources.redhat.com/ml/cygwin/2000-12/msg00331.html">http://sources.redhat.com/ml/cygwin/2000-12/msg00331.html</ulink>.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.known-problems.win9x-scp">
-<question><para>On Win9x, scp leaves ssh processes running.</para></question>
-<answer>
-<para>
-You can stop them by hand with the Task Manager.
-</para>
-</answer></qandaentry>
-
diff --git a/winsup/doc/faq-programming.xml b/winsup/doc/faq-programming.xml
deleted file mode 100644
index 5cd7e3b..0000000
--- a/winsup/doc/faq-programming.xml
+++ /dev/null
@@ -1,895 +0,0 @@
-<!-- faq-programming.xml -->
-
-<qandaentry id="faq.programming.packages">
-<question><para>How do I contribute a package?</para></question>
-<answer>
-
-<para>If you are willing to be a package maintainer, great! We urgently need
-volunteers to prepare and maintain packages, because the priority of the
-Cygwin Team is Cygwin itself.
-</para>
-<para>The Cygwin Package Contributor's Guide at
-<ulink url="http://cygwin.com/setup.html">http://cygwin.com/setup.html</ulink> details everything you need to know
-about being a package maintainer. The quickest way to get started is to
-read the <emphasis>Initial packaging procedure, script-based</emphasis> section on
-that page. The <literal>generic-build-script</literal> found there works well for
-most packages.
-</para>
-<para>For questions about package maintenance, use the cygwin-apps mailing
-list (start at <ulink url="http://cygwin.com/lists.html">http://cygwin.com/lists.html</ulink>) <emphasis>after</emphasis>
-searching and browsing the cygwin-apps list archives, of course. Be
-sure to look at the <emphasis>Submitting a package</emphasis> checklist at
-<ulink url="http://cygwin.com/setup.html">http://cygwin.com/setup.html</ulink> before sending an ITP (Intent To
-Package) email to cygwin-apps.
-</para>
-<para>You should also announce your intentions to the general cygwin list, in
-case others were thinking the same thing.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.contribute">
-<question><para>How do I contribute to Cygwin?</para></question>
-<answer>
-
-<para>If you want to contribute to Cygwin itself, see
-<ulink url="http://cygwin.com/contrib.html">http://cygwin.com/contrib.html</ulink>.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.huge-executables">
-<question><para>Why are compiled executables so huge?!?</para></question>
-<answer>
-
-<para>By default, gcc compiles in all symbols. You'll also find that gcc
-creates large executables on UNIX.
-</para>
-<para>If that bothers you, just use the 'strip' program, part of the binutils
-package. Or compile with the <literal>-s</literal> option to gcc.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.glibc">
-<question><para>Where is glibc?</para></question>
-<answer>
-
-<para>Cygwin does not provide glibc. It uses newlib instead, which provides
-much (but not all) of the same functionality. Porting glibc to Cygwin
-would be difficult.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.objective-c">
-<question><para>Where is Objective C?</para></question>
-<answer>
-
-<para>Objective C is not distributed with the Cygwin version of gcc, and there
-are no plans to do so. The gcc package maintainer had difficulty
-building it, and once built there were problems using it. It appears
-that there is only minimal support for the Objective C front-end in the
-main GCC distribution, anyway.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.make-execvp">
-<question><para>Why does my make fail on Cygwin with an execvp error? </para></question>
-<answer>
-
-<para>First of all, if you are using <literal>make -j[N]</literal>, then stop. It doesn't
-work well. Also beware of using non-portable shell features in your
-Makefiles (see tips at <ulink
-url="http://cygwin.com/faq/faq.using.html#faq.using.shell-scripts" />).
-</para>
-<para>Errors of <literal>make: execvp: /bin/sh: Illegal Argument</literal> or
-<literal>make: execvp: /bin/sh: Argument list too long</literal> are often
-caused by the command-line being to long for the Windows execution model.
-To circumvent this, mount the path of the executable using the -X switch
-to enable cygexec for all executables in that folder; you will also need
-to exclude non-cygwin executables with the -x switch. Enabling cygexec
-causes cygwin executables to talk directly to one another, which increases
-the command-line limit. To enable cygexec for <literal>/bin</literal> and
-<literal>/usr/bin</literal>, you can use these commands in a batch file:
-</para>
-<screen>
-mount -X -b -f c:\cygwin\bin /bin
-mount -X -b -f c:\cygwin\bin /usr/bin
-mount -x -b -f c:\cygwin\bin\tclsh84.exe /usr/bin/tclsh84.exe
-mount -x -b -f c:\cygwin\bin\tclsh84.exe /bin/tclsh84.exe
-mount -x -b -f c:\cygwin\bin\wish84.exe /usr/bin/wish84.exe
-mount -x -b -f c:\cygwin\bin\wish84.exe /bin/wish84.exe
-</screen>
-
-<para>Note that if you have Tcl/Tk installed, you must specifically exclude
-<literal>tclsh84</literal> and <literal>wish84</literal>, which are linked
-to the Cygwin DLL but are not actually Cygwin programs. If you have added
-other non-Cygwin programs to a path you want to mount cygexec, you can find
-them with a script like this:
-</para>
-<screen>
-#!/bin/sh
-cd /bin; for f in `find . -type f -name '*.exe'`; do
- cygcheck $f | (fgrep -qi cygwin1.dll || echo $f)
-done
-</screen>
-
-<para>
-See <ulink url="http://www.cygwin.com/cygwin-ug-net/using-utils.html#mount" />
-for more information on using mount.
-</para>
-
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.ipc">
-<question><para>How can I use IPC, or why do I get a <literal>Bad system call</literal>
-error?</para></question>
-<answer>
-
-<para>
-Try running cygserver. Read
-<ulink url="http://www.cygwin.com/cygwin-ug-net/using-cygserver.html" />. If you're
-trying to use PostgreSQL, also read
-<literal>/usr/share/doc/Cygwin/postgresql-*.README</literal>.
-</para>
-
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.winmain">
-<question><para>Why the undefined reference to <literal>WinMain@16</literal>?</para></question>
-<answer>
-
-<para>If you're using <literal>gcc</literal>, try adding an empty main() function to one
-of your sources. Or, perhaps you have <literal>-lm</literal> too early in the
-link command line. It should be at the end:
-</para>
-<screen>
- bash$ gcc hello.c -lm
- bash$ ./a.exe
- Hello World!
-</screen>
-
-<para>works, but
-</para>
-<screen>
- bash$ gcc -lm hello.c
- /c/TEMP/ccjLEGlU.o(.text+0x10):hello.c: multiple definition of `main'
- /usr/lib/libm.a(libcmain.o)(.text+0x0):libcmain.c: first defined here
- /usr/lib/libm.a(libcmain.o)(.text+0x6a):libcmain.c: undefined reference to `WinMain@16'
- collect2: ld returned 1 exit status
-</screen>
-
-<para>If you're using GCJ, you need to pass a "--main" flag:
-</para>
-<screen>
-gcj --main=Hello Hello.java
-</screen>
-
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.win32-api">
-<question><para>How do I use Win32 API calls?</para></question>
-<answer>
-
-<para><emphasis role='bold'>(Please note: This section has not yet been updated for the latest net release.)</emphasis>
-</para>
-<para>It's pretty simple actually. Cygwin tools require that you explicitly
-link the import libraries for whatever Win32 API functions that you
-are going to use, with the exception of kernel32, which is linked
-automatically (because the startup and/or built-in code uses it).
-</para>
-<para>For example, to use graphics functions (GDI) you must link
-with gdi32 like this:
-</para>
-<para>gcc -o foo.exe foo.o bar.o -lgdi32
-</para>
-<para>or (compiling and linking in one step):
-</para>
-<para>gcc -o foo.exe foo.c bar.c -lgdi32
-</para>
-<para>The following libraries are available for use in this way:
-</para>
-<para>advapi32 largeint ole32 scrnsave vfw32
-cap lz32 oleaut32 shell32 win32spl
-comctl32 mapi32 oledlg snmp winmm
-comdlg32 mfcuia32 olepro32 svrapi winserve
-ctl3d32 mgmtapi opengl32 tapi32 winspool
-dlcapi mpr penwin32 th32 winstrm
-gdi32 msacm32 pkpd32 thunk32 wow32
-glaux nddeapi rasapi32 url wsock32
-glu32 netapi32 rpcdce4 user32 wst
-icmp odbc32 rpcndr uuid
-imm32 odbccp32 rpcns4 vdmdbg
-kernel32 oldnames rpcrt4 version
-</para>
-<para>The regular setup allows you to use the option -mwindows on the
-command line to include a set of the basic libraries (and also
-make your program a GUI program instead of a console program),
-including user32, gdi32 and, IIRC, comdlg32.
-</para>
-<para>Note that you should never include -lkernel32 on your link line
-unless you are invoking ld directly. Do not include the same import
-library twice on your link line. Finally, it is a good idea to
-put import libraries last on your link line, or at least after
-all the object files and static libraries that reference them.
-</para>
-<para>The first two are related to problems the linker has (as of b18 at least)
-when import libraries are referenced twice. Tables get messed up and
-programs crash randomly. The last point has to do with the fact that
-gcc processes the files listed on the command line in sequence and
-will only resolve references to libraries if they are given after
-the file that makes the reference.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.win32-no-cygwin">
-<question><para>How do I compile a Win32 executable that doesn't use Cygwin?</para></question>
-<answer>
-
-<para>The -mno-cygwin flag to gcc makes gcc link against standard Microsoft
-DLLs instead of Cygwin. This is desirable for native Windows programs
-that don't need a UNIX emulation layer.
-</para>
-<para>This is not to be confused with 'MinGW' (Minimalist GNU for Windows),
-which is a completely separate effort. That project's home page is
-<ulink url="http://www.mingw.org/index.shtml">http://www.mingw.org/index.shtml</ulink>.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.static-linking">
-<question><para>Can I build a Cygwin program that does not require cygwin1.dll at runtime?</para></question>
-<answer>
-
-<para>No. If your program uses the Cygwin API, then your executable cannot
-run without cygwin1.dll. In particular, it is not possible to
-statically link with a Cygwin library to obtain an independent,
-self-contained executable.
-</para>
-<para>If this is an issue because you intend to distribute your Cygwin
-application, then you had better read and understand
-<ulink url="http://cygwin.com/licensing.html">http://cygwin.com/licensing.html</ulink>, which explains the licensing
-options. Unless you purchase a special commercial license from Red
-Hat, then your Cygwin application must be Open Source.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.msvcrt-and-cygwin">
-<question><para>Can I link with both MSVCRT*.DLL and cygwin1.dll?</para></question>
-<answer>
-
-<para>No, you must use one or the other, they are mutually exclusive.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.no-console-window">
-<question><para>How do I make the console window go away?</para></question>
-<answer>
-
-<para>The default during compilation is to produce a console application.
-It you are writing a GUI program, you should either compile with
--mwindows as explained above, or add the string
-"-Wl,--subsystem,windows" to the GCC command line.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.make-spaces">
-<question><para>Why does make complain about a "missing separator"?</para></question>
-<answer>
-
-<para>This problem usually occurs as a result of someone editing a Makefile
-with a text editor that replaces tab characters with spaces. Command
-lines must start with tabs. This is not specific to Cygwin.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.win32-headers">
-<question><para>Why can't we redistribute Microsoft's Win32 headers?</para></question>
-<answer>
-
-<para>Subsection 2.d.f of the `Microsoft Open Tools License agreement' looks
-like it says that one may not "permit further redistribution of the
-Redistributables to their end users". We take this to mean that we can
-give them to you, but you can't give them to anyone else, which is
-something that we can't agree to. Fortunately, we
-have our own Win32 headers which are pretty complete.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.msvs-mingw">
-<question><para>How do I use <literal>cygwin1.dll</literal> with Visual Studio or MinGW?</para></question>
-<answer>
-
-<para>Before you begin, note that Cygwin is licensed under the GNU GPL (as
-indeed are all other Cygwin-based libraries). That means that if your
-code links against the cygwin dll (and if your program is calling
-functions from Cygwin, it must, as a matter of fact, be linked against
-it), you must apply the GPL to your source as well. Of course, this
-only matters if you plan to distribute your program in binary form. For
-more information, see <ulink url="http://gnu.org/licenses/gpl-faq.html">http://gnu.org/licenses/gpl-faq.html</ulink>. If
-that is not a problem, read on.
-</para>
-<para>If you want to load the DLL dynamically, read
-<literal>winsup/cygwin/how-cygtls-works.txt</literal> and the sample code in
-<literal>winsup/testsuite/cygload</literal> to understand how this works.
-The short version is:
-</para>
-<orderedlist><listitem><para>Make sure you have 4K of scratch space at the bottom of your stack.
-</para></listitem>
-<listitem><para>Invoke <literal>cygwin_dll_init()</literal>:
-<screen>
-HMODULE h = LoadLibrary("cygwin1.dll");
-void (*init)() = GetProcAddress(h, "cygwin_dll_init");
-init();
-</screen>
-</para></listitem>
-</orderedlist>
-
-<para>If you want to link statically from Visual Studio, to my knowledge
-none of the Cygwin developers have done this, but we have this report
-from the mailing list that it can be done this way:
-</para>
-<orderedlist><listitem><para>Use the impdef program to generate a .def file for the cygwin1.dll
-(if you build the cygwin dll from source, you will already have a def
-file)
-</para>
-<screen>
-impdef cygwin1.dll &gt; cygwin1.def
-</screen>
-
-</listitem>
-<listitem><para>Use the MS VS linker (lib) to generate an import library
-</para>
-<screen>
-lib /def=cygwin1.def /out=cygwin1.lib
-</screen>
-
-</listitem>
-<listitem><para>Create a file "my_crt0.c" with the following contents
-</para>
-<screen>
-#include &lt;sys/cygwin.h&gt;
-#include &lt;stdlib.h&gt;
-
-typedef int (*MainFunc) (int argc, char *argv[], char **env);
-
-void
- my_crt0 (MainFunc f)
- {
- cygwin_crt0(f);
- }
-</screen>
-
-</listitem>
-<listitem><para>Use gcc in a Cygwin prompt to build my_crt0.c into a DLL
- (e.g. my_crt0.dll). Follow steps 1 and 2 to generate .def and
- .lib files for the DLL.
-</para>
-</listitem>
-<listitem><para>Download crt0.c from the cygwin website and include it in
- your sources. Modify it to call my_crt0() instead of
- cygwin_crt0().
-</para>
-</listitem>
-<listitem><para>Build your object files using the MS VC compiler cl.
-</para>
-</listitem>
-<listitem><para>Link your object files, cygwin1.lib, and my_crt0.lib (or
- whatever you called it) into the executable.
-</para></listitem>
-</orderedlist>
-
-<para>Note that if you are using any other Cygwin based libraries
-that you will probably need to build them as DLLs using gcc and
-then generate import libraries for the MS VC linker.
-</para>
-<para>Thanks to Alastair Growcott (alastair dot growcott at bakbone dot co
-dot uk) for this tip.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.linking-lib">
-<question><para>How do I link against a <literal>.lib</literal> file?</para></question>
-<answer>
-
-<para>If your <literal>.lib</literal> file is a normal static or import library with
-C-callable entry points, you can list <literal>foo.lib</literal> as an object file for
-gcc/g++, just like any <literal>*.o</literal> file. Otherwise, here are some steps:
-</para>
-<orderedlist><listitem><para>Build a C file with a function table. Put all functions you intend
-to use in that table. This forces the linker to include all the object
-files from the .lib. Maybe there is an option to force LINK.EXE to
-include an object file.
-</para></listitem>
-<listitem><para>Build a dummy 'LibMain'.
-</para></listitem>
-<listitem><para>Build a .def with all the exports you need.
-</para></listitem>
-<listitem><para>Link with your .lib using link.exe.
-</para></listitem>
-</orderedlist>
-
-<para>or
-</para>
-<orderedlist><listitem><para>Extract all the object files from the .lib using LIB.EXE.
-</para></listitem>
-<listitem><para>Build a dummy C file referencing all the functions you need, either
- with a direct call or through an initialized function pointer.
-</para></listitem>
-<listitem><para>Build a dummy LibMain.
-</para></listitem>
-<listitem><para>Link all the objects with this file+LibMain.
-</para></listitem>
-<listitem><para>Write a .def.
-</para></listitem>
-<listitem><para>Link.
-</para></listitem>
-</orderedlist>
-
-<para>You can use these methods to use MSVC (and many other runtime libs)
-with Cygwin development tools.
-</para>
-<para>Note that this is a lot of work (half a day or so), but much less than
-rewriting the runtime library in question from specs...
-</para>
-<para>Thanks to Jacob Navia (root at jacob dot remcomp dot fr) for this explanation.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.building-cygwin">
-<question><para>How do I build Cygwin on my own?</para></question>
-<answer>
-
-<para>First, you need to make sure you have the necessary build tools
-installed; you at least need <literal>gcc</literal>, <literal>make</literal>,
-<literal>perl</literal>, and <literal>cocom</literal>. If you want to run
-the tests, <literal>dejagnu</literal> is also required,
-and you need to have <literal>CYGWIN=server</literal> set as described at
-<ulink url="http://www.cygwin.com/cygwin-ug-net/using-cygserver.html" />.
-Normally, building ignores any errors in building the documentation,
-which requires the <literal>docbook-xml42</literal>, <literal>docbook-xsl</literal>, and
-<literal>xmlto</literal> packages. For more information on building the
-documentation, see the README included in the <literal>cygwin-doc</literal> package.
-</para>
-
-<para>Next, get the Cygwin source. Ideally, you should check out
-what you need from CVS (<ulink url="http://cygwin.com/cvs.html" />). This is the
-<emphasis>preferred method</emphasis> for acquiring the sources. Otherwise, if
-you are trying to duplicate a cygwin release then you should
-download the corresponding source package
-(<literal>cygwin-x.y.z-n-src.tar.bz2</literal>). </para>
-
-<para>You <emphasis>must</emphasis> build cygwin in a separate directory from
-the source, so create something like a <literal>build/</literal> directory.
-Assuming you checked out the source in <literal>/oss/src/</literal>, and you
-also want to install to the temporary location <literal>install</literal>:
-</para>
-<screen>
-mkdir /oss/build
-mkdir /oss/install
-cd build
-(/oss/src/configure --prefix=/oss/install -v; make) &gt;&amp; make.out
-make install &gt; install.log 2&gt;&amp;1
-</screen>
-
-<para>To check a cygwin1.dll, run "make check" in the build/i?86*cygwin/winsup
-directory created after running make above.
-If that works, install everything <emphasis>except</emphasis> the dll (if
-you can). Then, close down all cygwin programs (including bash windows,
-inetd, etc.), save your old dll, and copy the new dll to the correct
-place. Then start up a bash window, or run a cygwin program from the
-Windows command prompt, and see what happens.
-</para>
-<para>If you get the error "shared region is corrupted" it means that two
-different versions of cygwin1.dll are running on your machine at the
-same time. Remove all but one.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.debugging-cygwin">
-<question><para>I may have found a bug in Cygwin, how can I debug it (the symbols in gdb look funny)?</para></question>
-<answer>
-
-<para>Debugging symbols are stripped from distibuted Cygwin binaries, so any
-symbols that you see in gdb are basically meaningless. It is also a good
-idea to use the latest code in case the bug has been fixed, so we
-recommend trying the latest snapshot from
-<ulink url="http://cygwin.com/snapshots/" /> or building the DLL from CVS.
-</para>
-<para>To build a debugging version of the Cygwin DLL, you will need to follow
-the instructions at <ulink url="http://cygwin.com/faq/faq-nochunks.html#faq.programming.building-cygwin" />.
-You can also contact the mailing list for pointers (a simple test case that
-demonstrates the bug is always welcome).
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.compiling-unsupported">
-<question><para>How can I compile Cygwin for an unsupported platform (PowerPC, Alpha, ARM, Itanium)?</para></question>
-<answer>
-
-<para>Unfortunately, this will be difficult. Exception handling and signals
-support semantics and args have been designed for x86 so you would need
-to write specific support for your platform. We don't know of any other
-incompatibilities. Please send us patches if you do this work!
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.adjusting-heap">
-<question><para>How can I adjust the heap/stack size of an application?</para></question>
-<answer>
-
-<para>If you need to change the maximum amount of memory available to Cygwin, see
-<ulink url="http://cygwin.com/cygwin-ug-net/setup-maxmem.html">http://cygwin.com/cygwin-ug-net/setup-maxmem.html</ulink>. Otherwise,
-just pass heap/stack linker arguments to gcc. To create foo.exe with
-a heap size of 200MB and a stack size of 8MB, you would invoke
-gcc as:
-</para>
-<para><literal>gcc -Wl,--heap,200000000,--stack,8000000 -o foo foo.c</literal>
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.dll-cygcheck">
-<question><para>How can I find out which DLLs are needed by an executable?</para></question>
-<answer>
-
-<para><literal>objdump -p</literal> provides this information, but is rather verbose.
-</para>
-<para><literal>cygcheck</literal> will do this much more concisely, and operates
-recursively, provided the command is in your path.
-</para>
-<para>Note there is currently a bug in cygcheck in that it will not report
-on a program in a Windows system dir (e.g., C:\Windows or C:\WINNT) even
-if it's in your path. To work around this, supply the full Win32 path
-to the executable, including the .exe extension:
-</para>
-<screen>
-cygcheck c:\\winnt\\system32\\cmd.exe
-</screen>
-
-<para>(Note the windows path separator must be escaped if this is typed in
-bash.)
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.dll-building">
-<question><para>How do I build a DLL?</para></question>
-<answer>
-
-<para>There's documentation that explains the process in the Cygwin User's
-Guide here: <ulink url="http://cygwin.com/cygwin-ug-net/dll.html">http://cygwin.com/cygwin-ug-net/dll.html</ulink>
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.breakpoint">
-<question><para>How can I set a breakpoint at MainCRTStartup?</para></question>
-<answer>
-
-<para><emphasis role='bold'>(Please note: This section has not yet been updated for the latest net release.)</emphasis>
-</para>
-<para>Set a breakpoint at *0x401000 in gdb and then run the program in
-question.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.dll-relocatable">
-<question><para>How can I build a relocatable dll?</para></question>
-<answer>
-
-<para><emphasis role='bold'>(Please note: This section has not yet been updated for the latest net release. However, there was a discussion on the cygwin mailing list recently that addresses this issue. Read <ulink url="http://cygwin.com/ml/cygwin/2000-06/msg00688.html">http://cygwin.com/ml/cygwin/2000-06/msg00688.html</ulink> and related messages.)</emphasis>
-</para>
-<para>You must execute the following sequence of five commands, in this
-order:
-</para>
-<screen>
-$(LD) -s --base-file BASEFILE --dll -o DLLNAME OBJS LIBS -e ENTRY
-
-$(DLLTOOL) --as=$(AS) --dllname DLLNAME --def DEFFILE \
- --base-file BASEFILE --output-exp EXPFILE
-
-$(LD) -s --base-file BASEFILE EXPFILE -dll -o DLLNAME OBJS LIBS -e ENTRY
-
-$(DLLTOOL) --as=$(AS) --dllname DLLNAME --def DEFFILE \
- --base-file BASEFILE --output-exp EXPFILE
-
-$(LD) EXPFILE --dll -o DLLNAME OBJS LIBS -e ENTRY
-</screen>
-
-<para>In this example, $(LD) is the linker, ld.
-</para>
-<para>$(DLLTOOL) is dlltool.
-</para>
-<para>$(AS) is the assembler, as.
-</para>
-<para>DLLNAME is the name of the DLL you want to create, e.g., tcl80.dll.
-</para>
-<para>OBJS is the list of object files you want to put into the DLL.
-</para>
-<para>LIBS is the list of libraries you want to link the DLL against. For
-example, you may or may not want -lcygwin. You may want -lkernel32.
-Tcl links against -lcygwin -ladvapi32 -luser32 -lgdi32 -lcomdlg32
--lkernel32.
-</para>
-<para>DEFFILE is the name of your definitions file. A simple DEFFILE would
-consist of ``EXPORTS'' followed by a list of all symbols which should
-be exported from the DLL. Each symbol should be on a line by itself.
-Other programs will only be able to access the listed symbols.
-</para>
-<para>BASEFILE is a temporary file that is used during this five stage
-process, e.g., tcl.base.
-</para>
-<para>EXPFILE is another temporary file, e.g., tcl.exp.
-</para>
-<para>ENTRY is the name of the function which you want to use as the entry
-point. This function should be defined using the WINAPI attribute,
-and should take three arguments:
- int WINAPI startup (HINSTANCE, DWORD, LPVOID)
-</para>
-<para>This means that the actual symbol name will have an appended @12, so if
-your entry point really is named <literal>startup</literal>, the string you should
-use for ENTRY in the above examples would be <literal>startup@12</literal>.
-</para>
-<para>If your DLL calls any Cygwin API functions, the entry function will need
-to initialize the Cygwin impure pointer. You can do that by declaring
-a global variable <literal>_impure_ptr</literal>, and then initializing it in the
-entry function. Be careful not to export the global variable
-<literal>_impure_ptr</literal> from your DLL; that is, do not put it in DEFFILE.
-</para>
-<screen>
-/* This is a global variable. */
-struct _reent *_impure_ptr;
-extern struct _reent *__imp_reent_data;
-
-int entry (HINSTANT hinst, DWORD reason, LPVOID reserved)
-{
- _impure_ptr = __imp_reent_data;
- /* Whatever else you want to do. */
-}
-</screen>
-
-<para>You may put an optional `--subsystem windows' on the $(LD) lines. The
-Tcl build does this, but I admit that I no longer remember whether
-this is important. Note that if you specify a --subsytem &lt;x&gt; flag to ld,
-the -e entry must come after the subsystem flag, since the subsystem flag
-sets a different default entry point.
-</para>
-<para>You may put an optional `--image-base BASEADDR' on the $(LD) lines.
-This will set the default image base. Programs using this DLL will
-start up a bit faster if each DLL occupies a different portion of the
-address space. Each DLL starts at the image base, and continues for
-whatever size it occupies.
-</para>
-<para>Now that you've built your DLL, you may want to build a library so
-that other programs can link against it. This is not required: you
-could always use the DLL via LoadLibrary. However, if you want to be
-able to link directly against the DLL, you need to create a library.
-Do that like this:
-</para>
-<para>$(DLLTOOL) --as=$(AS) --dllname DLLNAME --def DEFFILE --output-lib LIBFILE
-</para>
-<para>$(DLLTOOL), $(AS), DLLNAME, and DEFFILE are the same as above. Make
-sure you use the same DLLNAME and DEFFILE, or things won't work right.
-</para>
-<para>LIBFILE is the name of the library you want to create, e.g.,
-libtcl80.a. You can then link against that library using something
-like -ltcl80 in your linker command.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.debug">
-<question><para>How can I debug what's going on?</para></question>
-<answer>
-
-<para>You can debug your application using <literal>gdb</literal>. Make sure you
-compile it with the -g flag! If your application calls functions in
-MS DLLs, gdb will complain about not being able to load debug information
-for them when you run your program. This is normal since these DLLs
-don't contain debugging information (and even if they did, that debug
-info would not be compatible with gdb).
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.system-trace">
-<question><para>Can I use a system trace mechanism instead?</para></question>
-<answer>
-
-<para>Yes. You can use the <literal>strace.exe</literal> utility to run other cygwin
-programs with various debug and trace messages enabled. For information
-on using <literal>strace</literal>, see the Cygwin User's Guide or the file
-<literal>winsup/utils/utils.sgml</literal>.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.gdb-signals">
-<question><para>Why doesn't gdb handle signals?</para></question>
-<answer>
-
-<para>Unfortunately, there is only minimal signal handling support in gdb
-currently. Signal handling only works with Windows-type signals.
-SIGINT may work, SIGFPE may work, SIGSEGV definitely does. You cannot
-'stop', 'print' or 'nopass' signals like SIGUSR1 or SIGHUP to the
-process being debugged.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.linker">
-<question><para>The linker complains that it can't find something.</para></question>
-<answer>
-
-<para>A common error is to put the library on the command line before
-the thing that needs things from it.
-</para>
-<para>This is wrong <literal>gcc -lstdc++ hello.cc</literal>.
-This is right <literal>gcc hello.cc -lstdc++</literal>.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.stat64">
-<question><para>Why do I get an error using <literal>struct stat64</literal>?</para></question>
-<answer>
-
-<para><literal>struct stat64</literal> is not used in Cygwin, just
-use <literal>struct stat</literal>.</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.undeclared-functions">
-<question><para>I use a function I know is in the API, but I still get a link error.</para></question>
-<answer>
-
-<para>The function probably isn't declared in the header files, or
-the UNICODE stuff for it isn't filled in.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.libc">
-<question><para>Can you make DLLs that are linked against libc ?</para></question>
-<answer>
-
-<para>Yes.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.malloc-h">
-<question><para>Where is malloc.h?</para></question>
-<answer>
-
-<para><emphasis role='bold'>(Please note: This section has not yet been updated for the latest net release.)</emphasis>
-</para>
-<para>Include stdlib.h instead of malloc.h.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.own-malloc">
-<question><para>Can I use my own malloc?</para></question>
-<answer>
-
-<para>If you define a function called <literal>malloc</literal> in your own code, and link
-with the DLL, the DLL <emphasis>will</emphasis> call your <literal>malloc</literal>. Needless to
-say, you will run into serious problems if your malloc is buggy.
-</para>
-<para>If you run any programs from the DOS command prompt, rather than from in
-bash, the DLL will try and expand the wildcards on the command line.
-This process uses <literal>malloc</literal> <emphasis>before</emphasis> your main line is started.
-If you have written your own <literal>malloc</literal> to need some initialization
-to occur after <literal>main</literal> is called, then this will surely break.
-</para>
-<para>Moreover, there is an outstanding issue with <literal>_malloc_r</literal> in
-<literal>newlib</literal>. This re-entrant version of <literal>malloc</literal> will be called
-directly from within <literal>newlib</literal>, by-passing your custom version, and
-is probably incompatible with it. But it may not be possible to replace
-<literal>_malloc_r</literal> too, because <literal>cygwin1.dll</literal> does not export it and
-Cygwin does not expect your program to replace it. This is really a
-newlib issue, but we are open to suggestions on how to deal with it.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.msvc-gcc-objects">
-<question><para>Can I mix objects compiled with msvc++ and gcc?</para></question>
-<answer>
-
-<para>Yes, but only if you are combining C object files. MSVC C++ uses a
-different mangling scheme than GNU C++, so you will have difficulties
-combining C++ objects.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.gdb-msvc">
-<question><para>Can I use the gdb debugger to debug programs built by VC++?</para></question>
-<answer>
-
-<para>No, not for full (high level source language) debugging.
-The Microsoft compilers generate a different type of debugging
-symbol information, which gdb does not understand.
-</para>
-<para>However, the low-level (assembly-type) symbols generated by
-Microsoft compilers are coff, which gdb DOES understand.
-Therefore you should at least be able to see all of your
-global symbols; you just won't have any information about
-data types, line numbers, local variables etc.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.x86-assembly">
-<question><para>Where can I find info on x86 assembly?</para></question>
-<answer>
-
-<para>CPU reference manuals for Intel's current chips are available in
-downloadable PDF form on Intel's web site:
-</para>
-<para><ulink url="http://developer.intel.com/design/pro/manuals/">http://developer.intel.com/design/pro/manuals/</ulink>
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.make-scripts">
-<question><para>Shell scripts aren't running properly from my makefiles?</para></question>
-<answer>
-
-<para>If your scripts are in the current directory, you must have <literal>.</literal>
-(dot) in your $PATH. (It is not normally there by default.) Otherwise,
-you would need to add /bin/sh in front of each and every shell script
-invoked in your Makefiles.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.preprocessor">
-<question><para>What preprocessor do I need to know about?</para></question>
-<answer>
-
-<para>We use _WIN32 to signify access to the Win32 API and __CYGWIN__ for
-access to the Cygwin environment provided by the dll.
-</para>
-<para>We chose _WIN32 because this is what Microsoft defines in VC++ and
-we thought it would be a good idea for compatibility with VC++ code
-to follow their example. We use _MFC_VER to indicate code that should
-be compiled with VC++.
-</para>
-<para>_WIN32 is only defined when you use either the -mno-cygwin or -mwin32
-gcc command line options. This is because Cygwin is supposed to be a
-Unix emulation environment and defining _WIN32 confuses some programs
-which think that they have to make special concessions for a Windows
-environment which Cygwin handles automatically.
-</para>
-<para>Note that using -mno-cygwin replaces __CYGWIN__ with __MINGW32__ as to
-tell which compiler (or settings) you're running.
-Check this out in detail by running, for example
-</para>
-<screen>
- $ gcc -dM -E -xc /dev/null &gt;gcc.txt
- $ gcc -mno-cygwin -dM -E -xc /dev/null &gt;gcc-mno-cygwin.txt
- $ gcc -mwin32 -dM -E -xc /dev/null &gt;gcc-mwin32.txt
-</screen>
-<para>Then use the diff and grep utilities to check
-what the difference is.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.unix-gui">
-<question><para>How should I port my Unix GUI to Windows?</para></question>
-<answer>
-
-<para>There are two basic strategies for porting Unix GUIs to Windows.
-</para>
-<para>The first is to use a portable graphics library such as tcl/tk, X11, or
-V (and others?). Typically, you will end up with a GUI on Windows that
-requires some runtime support. With tcl/tk, you'll want to include the
-necessary library files and the tcl/tk DLLs. In the case of X11, you'll
-need everyone using your program to have an X11 server installed.
-</para>
-<para>The second method is to rewrite your GUI using Win32 API calls (or MFC
-with VC++). If your program is written in a fairly modular fashion, you
-may still want to use Cygwin if your program contains a lot of shared
-(non-GUI-related) code. That way you still gain some of the portability
-advantages inherent in using Cygwin.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.programming.djgpp">
-<question><para>Why not use DJGPP ?</para></question>
-<answer>
-
-<para>DJGPP is a similar idea, but for DOS instead of Win32. DJGPP uses a
-"DOS extender" to provide a more reasonable operating interface for its
-applications. The Cygwin toolset doesn't have to do this since all of
-the applications are native WIN32. Applications compiled with the
-Cygwin tools can access the Win32 API functions, so you can write
-programs which use the Windows GUI.
-</para>
-<para>You can get more info on DJGPP by following
-<ulink url="http://www.delorie.com/">http://www.delorie.com/</ulink>.
-</para></answer></qandaentry>
-
diff --git a/winsup/doc/faq-resources.xml b/winsup/doc/faq-resources.xml
deleted file mode 100644
index 9bf42f7..0000000
--- a/winsup/doc/faq-resources.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<!-- faq-resources.xml -->
-<qandaentry id="faq.resources.documentation">
-<question><para>Where's the documentation?</para></question>
-<answer>
-
-<para>If you have installed Cygwin, you can find lots of documentation in
-<literal>/usr/share/doc/</literal>. Some packages have Cygwin specific
-instructions in a file
-<literal>/usr/share/doc/Cygwin/<replaceable>package_name</replaceable>.README</literal>.
-In addition, many packages ship with standard documentation, which you can
-find in
-<literal>/usr/share/doc/<replaceable>package_name</replaceable></literal> or
-by using the <literal>man</literal> or <literal>info</literal> tools. (Hint:
-use <literal>cygcheck -l <replaceable>package_name</replaceable></literal> to
-list what man pages the package includes.) Some older packages still keep
-their documentation in <literal>/usr/doc/</literal>
-instead of <literal>/usr/share/doc/</literal>.
-</para>
-<para>There are links to quite a lot of documentation on the main Cygwin
-project web page, <ulink url="http://cygwin.com/">http://cygwin.com/</ulink>,
-including this FAQ. Be sure to at least read any 'Release Notes' or 'Readme'
-or 'read this' links on the main web page, if there are any.
-</para>
-<para>There is a comprehensive Cygwin User's Guide at <ulink
-url="http://cygwin.com/cygwin-ug-net/cygwin-ug-net.html">http://cygwin.com/cygwin-ug-net/cygwin-ug-net.html</ulink>
-and an API Reference at <ulink
-url="http://cygwin.com/cygwin-api/cygwin-api.html">http://cygwin.com/cygwin-api/cygwin-api.html</ulink>.
-</para>
-<para>You can find documentation for the individual GNU tools at <ulink
-url="http://www.fsf.org/manual/">http://www.fsf.org/manual/</ulink>. (You
-should read GNU manuals from a local mirror, check <ulink
-url="http://www.fsf.org/server/list-mirrors.html">http://www.fsf.org/server/list-mirrors.html</ulink>
-for a list of them.)
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.resources.mailing-lists">
-<question><para>What Cygwin mailing lists can I join?</para></question>
-<answer>
-<para>Comprehensive information about the Cygwin mailing lists can be found at
-<ulink url="http://cygwin.com/lists.html" />.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.resources.problems">
-<question><para>What if I have a problem? (Or: Why won't you/the mailing list answer my questions?)</para></question>
-<answer>
-<para>Comprehensive information about reporting problems with Cygwin can be found at <ulink url="http://cygwin.com/problems.html" />.
-</para>
-</answer></qandaentry>
-
diff --git a/winsup/doc/faq-sections.xml b/winsup/doc/faq-sections.xml
deleted file mode 100644
index 4c88d68..0000000
--- a/winsup/doc/faq-sections.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE article PUBLIC '-//OASIS//DTD DocBook XML V4.2//EN'
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
- <!-- see http://www.unicode.org/charts/PDF/U0080.pdf -->
- <!ENTITY pound "&#x00A3;">
- <!ENTITY brokenpipe "&#x00A6;">
-
- <!-- all the files -->
- <!ENTITY FAQ-WHAT SYSTEM "faq-what.xml">
- <!ENTITY FAQ-SETUP SYSTEM "faq-setup.xml">
- <!ENTITY FAQ-RESOURCES SYSTEM "faq-resources.xml">
- <!ENTITY FAQ-USING SYSTEM "faq-using.xml">
- <!ENTITY FAQ-API SYSTEM "faq-api.xml">
- <!ENTITY FAQ-PROGRAMMING SYSTEM "faq-programming.xml">
- <!ENTITY FAQ-PROBLEMS SYSTEM "faq-problems.xml">
-]>
-
-<article id="faq" lang="en">
- <articleinfo>
- <title>Cygwin FAQ</title>
- </articleinfo>
-
-<sect1 id="faq.about">
-<title>About Cygwin</title>
-<qandaset><?dbhtml toc="1"?>
-&FAQ-WHAT;
-</qandaset></sect1>
-
-<sect1 id="faq.setup">
-<title>Setting up Cygwin</title>
-<qandaset><?dbhtml toc="1"?>
-&FAQ-SETUP;
-</qandaset></sect1>
-
-<sect1 id="faq.resources">
-<title>Further Resources</title>
-<qandaset><?dbhtml toc="1"?>
-&FAQ-RESOURCES;
-</qandaset></sect1>
-
-<sect1 id="faq.using">
-<title>Using Cygwin</title>
-<qandaset><?dbhtml toc="1"?>
-&FAQ-USING;
-</qandaset></sect1>
-
-<sect1 id="faq.api">
-<title>Cygwin API Questions</title>
-<qandaset><?dbhtml toc="1"?>
-&FAQ-API;
-</qandaset></sect1>
-
-<sect1 id="faq.programming">
-<title>Programming Questions</title>
-<qandaset><?dbhtml toc="1"?>
-&FAQ-PROGRAMMING;
-</qandaset></sect1>
-
-<sect1 id="faq.known-problems">
-<title>Known Problems in the Latest Net Release</title>
-<qandaset><?dbhtml toc="1"?>
-&FAQ-PROBLEMS;
-</qandaset></sect1>
-
-<sect1 id="faq.copyright">
-<title>Copyright</title>
-<qandaset><?dbhtml toc="1"?>
-
-
-<qandaentry id="faq.what.copyright">
-<question><para>What are the copyrights?</para></question>
-<answer>
-
-<para>Please see
-<ulink url="http://cygwin.com/license.html" /> for more information
-about Cygwin copyright and licensing.
-</para>
-
-</answer></qandaentry>
-</qandaset></sect1>
-
-</article>
diff --git a/winsup/doc/faq-setup.xml b/winsup/doc/faq-setup.xml
deleted file mode 100644
index 55c2916..0000000
--- a/winsup/doc/faq-setup.xml
+++ /dev/null
@@ -1,565 +0,0 @@
-<!-- faq-setup.xml -->
-<qandaentry id="faq.setup.setup">
-<question><para>What is the recommended installation procedure?</para></question>
-<answer>
-
-<para>There is only one recommended way to install Cygwin, which is to use the GUI
-installer ``Cygwin Setup''. It is flexible and easy to use.
-You can pick and choose the packages you wish to install, and update
-them individually. Full source code is available for all packages and
-tools. More information on using Cygwin Setup may be found at
-<ulink url="http://cygwin.com/cygwin-ug-net/setup-net.html" />.
-</para>
-<para>If you do it any other way, you're on your own! That said, keep in mind
-that the GUI installer is a "work in progress", so there might be a few
-difficulties, especially if you are behind a firewall or have other
-specific requirements. If something doesn't work right for you, and
-it's not covered here or in the latest development snapshot at
-<ulink url="http://cygwin.com/snapshots/">http://cygwin.com/snapshots/</ulink>, then by all means report it to the
-mailing list.
-</para>
-<para>For a searchable list of packages that can be installed with Cygwin,
-see <ulink url="http://cygwin.com/packages/">http://cygwin.com/packages/</ulink>.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.setup.automated">
-<question><para>What about an automated Cygwin installation?</para></question>
-<answer>
-
-<para>The Cygwin Setup program is designed to be interactive, but there are
-a few different ways to automate it. If you are deploying to multiple systems,
-the best way is to run through a full installation once, saving the entire
-downloaded package tree. Then, on target systems, run setup.exe as a "Local
-Install" pointed at your downloaded package tree. You could do this
-non-interactively with the command line options
-<literal>setup.exe -q -L -l x:\cygwin-local\</literal>, where your downloaded
-package tree is in <literal>x:\cygwin-local\</literal> (see the next FAQ for
-an explanation of those options.)
-</para>
-<para>
-For other options, search the mailing lists with terms such as
-<ulink url="http://www.google.com/search?q=cygwin+automated+setup">cygwin automated setup</ulink> or
-<ulink url="http://www.google.com/search?q=automated+cygwin+install">automated cygwin install</ulink>.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.setup.cli">
-<question><para>Does setup.exe accept command-line arguments?</para></question>
-<answer>
-
-<para>Yes, the full listing is written to the <literal>setup.log</literal> file
-when you run <literal>setup.exe --help</literal>. The current options are:
-<screen>
-Command Line Options:
- -D --download Download from internet
- -L --local-install Install from local directory
- -s --site Download site
- -R --root Root installation directory
- -q --quiet-mode Unattended setup mode
- -h --help print help
- -l --local-package-dir Local package directory
- -r --no-replaceonreboot Disable replacing in-use files on next
- reboot.
- -n --no-shortcuts Disable creation of desktop and start
- menu shortcuts
- -N --no-startmenu Disable creation of start menu shortcut
- -d --no-desktop Disable creation of desktop shortcut
- -A --disable-buggy-antivirus Disable known or suspected buggy anti
- virus software packages during
- execution.
-</screen>
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.setup.c">
-<question><para>Why not install in C:\?</para></question>
-<answer>
-
-<para>The Cygwin Setup program will prompt you for a "root" directory.
-The default is <literal>C:\cygwin</literal>, but you can change it. You are urged not to
-choose something like <literal>C:\</literal> (the root directory on the system drive) for
-your Cygwin root. If you do, then critical Cygwin system directories
-like <literal>etc</literal>, <literal>lib</literal> and <literal>bin</literal> could easily be corrupted by
-other (non-Cygwin) applications or packages that use <literal>\etc</literal>,
-<literal>\lib</literal> or <literal>\bin</literal>. Perhaps there is no conflict now, but who
-knows what you might install in the future? It's also just good common
-sense to segregate your Cygwin "filesystems" from the rest of your
-Windows system disk.
-</para>
-<para>(In the past, there had been genuine bugs that would cause problems
-for people who installed in <literal>C:\</literal>, but we believe those are gone
-now.)
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.setup.old-versions">
-<question><para>Can I use Cygwin Setup to get old versions of packages (like gcc-2.95)?</para></question>
-<answer>
-
-<para>Cygwin Setup can be used to install any packages that are on a
-Cygwin mirror, which usually includes one version previous to the
-current one. The complete list may be searched at
-<ulink url="http://cygwin.com/packages/">http://cygwin.com/packages/</ulink>. There is no complete archive of
-older packages. If you have a problem with the current version of
-a Cygwin package, please report it to the mailing list using the
-guidelines at <ulink url="http://cygwin.com/problems.html">http://cygwin.com/problems.html</ulink>.
-</para>
-<para>That said, if you really need an older package, you may be able to find
-an outdated or archival mirror by searching the web for an old package
-version (for example, <literal>gcc2-2.95.3-10-src.tar.bz2</literal>), but keep in
-mind that this older version will not be supported by the mailing list
-and that installing the older version will not help improve Cygwin.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.setup.virus">
-<question><para>Is Cygwin Setup, or one of the packages, infected with a virus?</para></question>
-<answer>
-
-<para>Unlikely. Unless you can confirm it, please don't report it to the
-mailing list. Anti-virus products have been known to detect false
-positives when extracting compressed tar archives. If this causes
-problems for you, consider disabling your anti-virus software when
-running <literal>setup</literal>. Read the next entry for a fairly safe way to do
-this.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.setup.hang">
-<question><para>My computer hangs when I run Cygwin Setup!</para></question>
-<answer>
-
-<para>Both Network Associates (formerly McAfee) and Norton anti-virus
-products have been reported to "hang" when extracting Cygwin tar
-archives. If this happens to you, consider disabling your anti-virus
-software when running Cygwin Setup. The following procedure should be
-a fairly safe way to do that:
-</para>
-<orderedlist><listitem><para>Download <literal>setup.exe</literal> and scan it explicitly.
-</para>
-</listitem>
-<listitem><para>Turn off the anti-virus software.
-</para>
-</listitem>
-<listitem><para>Run setup to download and extract all the tar files.
-</para>
-</listitem>
-<listitem><para>Re-activate your anti-virus software and scan everything
-in C:\cygwin (or wherever you chose to install), or your entire hard
-disk if you are paranoid.
-</para>
-</listitem>
-</orderedlist>
-
-<para>This should be safe, but only if Cygwin Setup is not substituted by
-something malicious, and no mirror has been compromised.
-</para>
-<para>See also <ulink url="http://cygwin.com/faq/faq.using.html#faq.using.bloda" />
-for a list of applications that have been known, at one time or another, to
-interfere with the normal functioning of Cygwin.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.setup.what-packages">
-<question><para>What packages should I download? Where are 'make', 'gcc', 'vi', etc? </para></question>
-<answer>
-<para>When using Cygwin Setup for the first time, the default is to install
-a minimal subset of all available packages. If you want anything beyond that,
-you will have to select it explicitly. See
-<ulink url="http://cygwin.com/packages/" /> for a searchable list of available
-packages, or use <literal>cygcheck -p </literal> as described in the Cygwin
-User's Guide at
-<ulink url="http://cygwin.com/cygwin-ug-net/using-utils.html#cygcheck" />.
-</para>
-<para>If you want to build programs, of course you'll need <literal>gcc</literal>,
-<literal>binutils</literal>, <literal>make</literal> and probably other packages from the
-``Devel'' category. Text editors can be found under ``Editors''.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.setup.everything">
-<question><para>How do I just get everything?</para></question>
-<answer>
-
-<para>Long ago, the default was to install everything, much to the
-irritation of most users. Now the default is to install only a basic
-core of packages. Cygwin Setup is designed to make it easy to browse
-categories and select what you want to install or omit from those
-categories. It's also easy to install everything:
-</para>
-<orderedlist>
-<listitem><para>At the ``Select Packages'' screen, in ``Categories'' view, at the line
-marked ``All'', click on the word ``default'' so that it changes to
-``install''. (Be patient, there is some computing to do at this step.
-It may take a second or two to register the change.) This tells Setup
-to install <emphasis>everything</emphasis>, not just what it thinks you should have
-by default.
-</para>
-</listitem>
-<listitem><para>Now click on the ``View'' button (twice) until you get the
-``Partial'' view. This shows exactly which packages are about to be
-downloaded and installed.
-</para>
-</listitem>
-</orderedlist>
-
-<para>This procedure only works for packages that are currently available.
-There is no way to tell Cygwin Setup to install all packages by
-default from now on. As new packages become available that would not
-be installed by default, you have to repeat the above procedure to get
-them.
-</para>
-<para>In general, a better method (in my opinion), is to:
-</para>
-<orderedlist>
-<listitem><para>First download &amp; install all packages that would normally be
-installed by default. This includes fundamental packages and any
-updates to what you have already installed. Then...
-</para>
-</listitem>
-<listitem><para>Run Cygwin Setup again, and apply the above technique to get all
-new packages that would not be installed by default. You can check
-the list in the Partial View before proceeding, in case there's
-something you really <emphasis>don't</emphasis> want.
-</para>
-</listitem>
-<listitem><para>In the latest version of Cygwin Setup, if you click the ``View''
-button (twice) more, it shows packages not currently installed. You
-ought to check whether you <emphasis>really</emphasis> want to install everything!
-</para>
-</listitem>
-</orderedlist>
-
-</answer></qandaentry>
-
-<qandaentry id="faq.setup.disk-space">
-<question><para>How much disk space does Cygwin require?</para></question>
-<answer>
-
-<para>That depends, obviously, on what you've chosen to download and
-install. A full installation today is probably larger than 800MB
-installed, not including the package archives themselves nor the source
-code.
-</para>
-<para>After installation, the package archives remain in your ``Local
-Package Directory'', by default the location of <literal>setup.exe</literal>. You
-may conserve disk space by deleting the subdirectories there. These
-directories will have very weird looking names, being encoded with
-their URLs (named <literal>ftp%3a%2f...</literal>).
-</para>
-<para>Of course, you can keep them around in case you want to reinstall a
-package. If you want to clean out only the outdated packages, Michael Chase
-has written a script called <literal>clean_setup.pl</literal>, available
-at <ulink url="http://home.ix.netcom.com/~mchase/zip/" />.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.setup.what-upgraded">
-<question><para>How do I know which version I upgraded from?</para></question>
-<answer>
-
-<para>Detailed logs of the most recent Cygwin Setup session can be found in
-<literal>/var/log/setup.log.full</literal> and less verbose information about
-prior actions is in <literal>/var/log/setup.log</literal>.
-</para>
-
-</answer></qandaentry>
-
-<qandaentry id="faq.setup.setup-fails">
-<question><para>What if setup fails?</para></question>
-<answer>
-
-<para>First, make sure that you are using the latest version of Cygwin Setup.
-The latest version is always available from the 'Install Cygwin now' link on
-the Cygwin Home Page at <ulink
-url="http://cygwin.com/">http://cygwin.com/</ulink>. </para>
-<para>If you are downloading from the Internet, setup will fail if it cannot
-download the list of mirrors at <ulink
-url="http://cygwin.com/mirrors.html">http://cygwin.com/mirrors.html</ulink>.
-It could be that the network is too busy. Something similar could be the
-cause of a download site not working. Try another mirror, or try again
-later.
-</para>
-<para>If setup refuses to download a package that you know needs to be
-upgraded, try deleting that package's entry from /etc/setup. If you are
-reacting quickly to an announcement on the mailing list, it could be
-that the mirror you are using doesn't have the latest copy yet. Try
-another mirror, or try again tomorrow.
-</para>
-<para>If setup has otherwise behaved strangely, check the files
-<literal>setup.log</literal> and <literal>setup.log.full</literal> in
-<literal>/var/log</literal> (<literal>C:\cygwin\var\log</literal> by
-default). It may provide some clues as to what went wrong and why.
-</para>
-<para>If you're still baffled, search the Cygwin mailing list for clues.
-Others may have the same problem, and a solution may be posted there.
-If that search proves fruitless, send a query to the Cygwin mailing
-list. You must provide complete details in your query: version of
-setup, options you selected, contents of setup.log and setup.log.full,
-what happened that wasn't supposed to happen, etc.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.setup.name-with-space">
-<question><para>My Windows logon name has a space in it, will this cause problems?</para></question>
-<answer>
-
-<para>Most definitely yes! UNIX shells (and thus Cygwin) use the space
-character as a word delimiter. Under certain circumstances, it is
-possible to get around this with various shell quoting mechanisms, but
-you are much better off if you can avoid the problem entirely.
-</para>
-<para>On Windows NT/2000/XP you have two choices:
-</para><orderedlist>
-<listitem><para>You can rename the user in the Windows User Manager GUI and then
-run mkpasswd.
-</para>
-</listitem>
-<listitem><para>You can simply edit the /etc/passwd file and change the Cygwin user name
-(first field). It's also a good idea to avoid spaces in the home directory.
-</para>
-</listitem>
-</orderedlist>
-
-<para>On Windows 95/98/ME you can create a new user and run mkpasswd,
-or you can delete the offending entry from /etc/passwd.
-Cygwin will then use the name in the default entry with uid 500.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.setup.home">
-<question><para>My <literal>HOME</literal> environment variable is not what I want.</para></question>
-<answer>
-
-<para>When starting Cygwin from Windows, <literal>HOME</literal> is determined as follows
-in order of decreasing priority:
-</para>
-<orderedlist>
-<listitem><para><literal>HOME</literal> from the Windows environment, translated to POSIX form.
-</para>
-</listitem>
-<listitem><para>The entry in /etc/passwd
-</para>
-</listitem>
-<listitem><para><literal>HOMEDRIVE</literal> and <literal>HOMEPATH</literal> from the Windows environment
-</para>
-</listitem>
-<listitem><para>/
-</para>
-</listitem>
-</orderedlist>
-
-<para>When using Cygwin from the network (telnet, ssh,...), <literal>HOME</literal> is set
-from /etc/passwd.
-</para>
-<para>If your <literal>HOME</literal> is set to a value such as /cygdrive/c, it is likely
-that it was set in Windows. Start a DOS Command Window and type
-"set HOME" to verify if this is the case.
-</para>
-<para>Access to shared drives is often restricted when starting from the network,
-thus Domain users may wish to have a different <literal>HOME</literal> in the
-Windows environment (on shared drive) than in /etc/passwd (on local drive).
-Note that ssh only considers /etc/passwd, disregarding <literal>HOME</literal>.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.setup.uninstall-packages">
-<question><para>How do I uninstall individual packages?</para></question>
-<answer>
-
-<para>Run Cygwin Setup as you would to install packages. In the list of
-packages to install, browse the relevant category or click on the
-``View'' button to get a full listing. Click on the cycle glyph until
-the action reads ``Uninstall''. Proceed by clicking ``Next''.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.setup.uninstall-service">
-<question><para>How do I uninstall a Cygwin service?</para></question>
-<answer>
-<orderedlist>
-<listitem><para>List all services you have installed with
-<literal>cygrunsrv -L</literal>. If you do not have
-<literal>cygrunsrv</literal> installed, skip this FAQ.
-</para></listitem>
-<listitem><para>Before removing the service, you should stop it with
-<literal>cygrunsrv --stop <replaceable>service_name</replaceable></literal>.
-If you have <literal>inetd</literal> configured to run as a standalone
-service, it will not show up in the list, but
-<literal>cygrunsrv --stop inetd</literal> will work to stop it as
-well.
-</para></listitem>
-<listitem><para>Lastly, remove the service with
-<literal>cygrunsrv --remove <replaceable>service_name</replaceable></literal>.
-</para></listitem>
-</orderedlist>
-</answer></qandaentry>
-
-<qandaentry id="faq.setup.uninstall-all">
-<question><para>How do I uninstall <emphasis role='bold'>all</emphasis> of Cygwin?</para></question>
-<answer>
-<para>Setup has no automatic uninstall facility. The recommended method to remove all
-of Cygwin is as follows:
-</para>
-<orderedlist>
-<listitem><para>If you have any Cygwin services running, remove by repeating
-the instructions in <ulink
-url="http://cygwin.com/faq/faq.setup.html#faq.setup.uninstall-service" /> for
-all services that you installed. Common services that might have been
-installed are <literal>sshd</literal>, <literal>cron</literal>,
-<literal>cygserver</literal>, <literal>inetd</literal>, <literal>apache</literal>,
-<literal>postgresql</literal>, and so on.
-</para>
-</listitem>
-<listitem><para>Stop the X11 server if it is running, and terminate any Cygwin programs
-that might be running in the background. Remove all mount information by typing
-<literal>umount -A</literal> and then exit the command prompt and ensure that no Cygwin
-processes remain. Note: If you want to save your mount points for a later
-reinstall, first save the output of <literal>mount -m</literal> as described at
-<ulink url="http://cygwin.com/cygwin-ug-net/using-utils.html#mount" />.
-</para>
-</listitem>
-<listitem><para>Delete the Cygwin root folder and all subfolders. If you get an error
-that an object is in use, then ensure that you've stopped all services and
-closed all Cygwin programs. If you get a 'Permission Denied' error then you
-will need to modify the permissions and/or ownership of the files or folders
-that are causing the error. For example, sometimes files used by system
-services end up owned by the SYSTEM account and not writable by regular users.
-</para>
-<para>The quickest way to delete the entire tree if you run into this problem is to
-change the ownership of all files and folders to your account. To do this in
-Windows Explorer, right click on the root Cygwin folder, choose Properties, then
-the Security tab. If you are using Windows XP Home or Simple File Sharing,
-you will need to boot into Safe Mode to access the Security tab. Select
-Advanced, then go to the Owner tab and make sure your account is listed as
-the owner. Select the 'Replace owner on subcontainers and objects' checkbox
-and press Ok. After Explorer applies the changes you should be able to
-delete the entire tree in one operation. Note that you can also achieve
-this in Cygwin by typing <literal>chown -R user /</literal> or by using other
-tools such as <literal>CACLS.EXE</literal>.
-</para>
-</listitem>
-<listitem><para>Delete the Cygwin shortcuts on the Desktop and Start Menu, and anything
-left by setup.exe in the download directory. However, if you plan to reinstall
-Cygwin it's a good idea to keep your setup.exe download directory since you can
-reinstall the packages left in its cache without redownloading them.
-</para>
-</listitem>
-<listitem><para>If you added Cygwin to your system path, you should remove it unless you
-plan to reinstall Cygwin to the same location. Similarly, if you set your
-CYGWIN environment variable system-wide and don't plan to reinstall, you should
-remove it.
-</para>
-</listitem>
-<listitem><para>Finally, if you want to be thorough you can delete the registry tree
-<literal>Software\Cygnus Solutions</literal> under <literal>HKEY_LOCAL_MACHINE</literal> and/or
-<literal>HKEY_CURRENT_USER</literal>. However, if you followed the directions above you
-will have already removed all the mount information which is typically the only
-thing stored in the registry.
-</para>
-</listitem>
-</orderedlist>
-
-</answer></qandaentry>
-
-<qandaentry id="faq.setup.snapshots">
-<question><para>How do I install snapshots?</para></question>
-<answer>
-
-<para>First, are you sure you want to do this? Snapshots are risky. They
-have not been tested. Use them <emphasis role='bold'>only</emphasis> if there is a feature or
-bugfix that you need to try, and you are willing to deal with any
-problems, or at the request of a Cygwin developer.
-</para>
-<para>You should generally install the full
-<literal>cygwin-inst-YYYYMMDD.tar.bz2</literal> update, rather than just the DLL,
-otherwise some components may be out of sync.
-</para>
-<para>You cannot use Cygwin Setup to install a snapshot.
-</para>
-<para>First, you will need to download the snapshot from the snapshots
-page at <ulink url="http://cygwin.com/snapshots/">http://cygwin.com/snapshots/</ulink>. Note the directory where
-you saved the snapshot tarball.
-</para>
-<para>Before installing a snapshot, you must first Close <emphasis role='bold'>all</emphasis> Cygwin
-applications, including shells and services (e.g., <literal>inetd</literal>, <literal>sshd</literal>).
-You will not be able to replace <literal>cygwin1.dll</literal> if any Cygwin process is
-running. You may have to restart Windows to clear the DLL from memory
-(beware of automatic service startup).
-</para>
-<para>Most of the downloaded snapshot can be installed using <literal>tar</literal>. Cygwin
-<literal>tar</literal> won't be able to update <literal>/usr/bin/cygwin1.dll</literal> (because it's
-used by <literal>tar</literal> itself), but it should succeed with everything else. If
-you are only installing the DLL snapshot, skip the first tar command. Open
-a <literal>bash</literal> shell (it should be the only running Cygwin process) and issue
-the following commands:
-<screen>
- /bin/tar -C/ -jxvf /posix/path/to/cygwin-inst-YYYYMMDD.tar.bz2 --exclude=usr/bin/cygwin1.dll
- /bin/tar -C/tmp -jxvf /posix/path/to/cygwin-inst-YYYYMMDD.tar.bz2 usr/bin/cygwin1.dll
-</screen>
-</para>
-<para>Exit the bash shell, and use Explorer or the Windows command shell to
-first rename <literal>C:\cygwin\bin\cygwin1.dll</literal> to
-<literal>C:\cygwin\bin\cygwin1-prev.dll</literal> and then move
-<literal>C:\cygwin\tmp\usr\bin\cygwin1.dll</literal>
-to <literal>C:\cygwin\bin\cygwin1.dll</literal> (assuming you installed Cygwin in
-<literal>C:\cygwin</literal>).
-</para>
-<para>The operative word in trying the snapshots is "<emphasis>trying</emphasis>". If you
-notice a problem with the snapshot that was not present in the release
-DLL (what we call a "regression"), please report it to the Cygwin
-mailing list (see <ulink url="http://cygwin.com/problems.html">http://cygwin.com/problems.html</ulink> for problem
-reporting guidelines). If you wish to go back to the older version of the
-DLL, again, close all Cygwin processes, delete
-<literal>C:\cygwin\bin\cygwin1.dll</literal>, and
-rename <literal>C:\cygwin\bin\cygwin1-prev.dll</literal> back to
-<literal>C:\cygwin\bin\cygwin1.dll</literal> (again assuming that your "<literal>/</literal>" is
-<literal>C:\cygwin</literal>). To restore the rest of the snapshot
-files, reinstall the "<literal>cygwin</literal>" package using Setup.
-</para>
-
-</answer></qandaentry>
-
-<qandaentry id="faq.setup.mirror">
-<question><para>Can Cygwin Setup maintain a ``mirror''?</para></question>
-<answer>
-
-<para>NO. Cygwin Setup cannot do this for you. Use a tool designed for
-this purpose. See <ulink url="http://rsync.samba.org/">http://rsync.samba.org/</ulink>,
-<ulink url="http://wget.sunsite.dk/">http://wget.sunsite.dk/</ulink> for utilities that can do this for you.
-For more information on setting up a custom Cygwin package server, see
-the Cygwin Setup homepage at
-<ulink url="http://sources.redhat.com/cygwin-apps/setup.html">http://sources.redhat.com/cygwin-apps/setup.html</ulink>.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.setup.cd">
-<question><para>How can I make my own portable Cygwin on CD?</para></question>
-<answer>
-
-<para>While some users have successfully done this, for example Indiana
-University's XLiveCD <ulink url="http://xlivecd.indiana.edu/">http://xlivecd.indiana.edu/</ulink>, there is no
-easy way to do it. Full instructions for constructing a porttable Cygwin
-on CD by hand can be found on the mailing list at
-<ulink url="http://www.cygwin.com/ml/cygwin/2003-07/msg01117.html">http://www.cygwin.com/ml/cygwin/2003-07/msg01117.html</ulink>. (Thanks
-to fergus at bonhard dot uklinux dot net for these instructions.)
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.setup.registry">
-<question><para>How do I save, restore, delete, or modify the Cygwin information stored in the registry?</para></question>
-<answer>
-
-<para>Currently Cygwin stores its mount table information in the registry. It
-is recommended that you use the <literal>mount</literal> and <literal>umount</literal> commands
-to manipulate the mount information instead of directly modifying the
-registry.
-</para>
-<para>To save the mount information to a file for later restoration, use
-<literal>mount -m &gt; mounts.bat</literal> To remove all mount information use
-<literal>umount -A</literal>. To reincorporate saved mount information just run the
-batch file. For more information on using <literal>mount</literal>, see
-<ulink url="http://cygwin.com/cygwin-ug-net/using-utils.html#mount">http://cygwin.com/cygwin-ug-net/using-utils.html#mount</ulink>.
-</para></answer></qandaentry>
-
diff --git a/winsup/doc/faq-using.xml b/winsup/doc/faq-using.xml
deleted file mode 100644
index 1e5516c..0000000
--- a/winsup/doc/faq-using.xml
+++ /dev/null
@@ -1,1108 +0,0 @@
-<!-- faq-problems.xml -->
-<qandaentry id="faq.using.missing-dlls">
-<question><para>Why can't my application locate cygncurses5.dll? or cygintl.dll? or cygreadline5.dll? or ...?</para></question>
-<answer>
-
-<para>If you upgraded recently, and suddenly vim (or some other Cygwin
-application) cannot find <literal>cygncurses5.dll</literal>, it probably means that you did
-not follow these instructions properly:
-<ulink url="http://cygwin.com/ml/cygwin-announce/2001/msg00124.html">http://cygwin.com/ml/cygwin-announce/2001/msg00124.html</ulink>. To
-repair the damage, you must run Cygwin Setup again, and re-install the
-<literal>libncurses5</literal> package.
-</para>
-<para>Note that Cygwin Setup won't show this option by default. In the
-``Select packages to install'' dialog, click on the <literal>Full/Part</literal>
-button. This lists all packages, even those that are already
-installed. Scroll down to locate the <literal>libncurses5</literal> package.
-Click on the ``cycle'' glyph until it says ``Reinstall''. Continue
-with the installation.
-</para>
-<para>Similarly, if something cannot find <literal>cygintl.dll</literal>, then run
-Cygwin Setup and re-install the <literal>libintl</literal> and <literal>libintl1</literal>
-packages.
-</para>
-<para>For a detailed explanation of the general problem, and how to extend
-it to other missing DLLs (like cygreadline5.dll) and identify their
-containing packages, see
-<ulink url="http://cygwin.com/ml/cygwin/2002-01/msg01619.html">http://cygwin.com/ml/cygwin/2002-01/msg01619.html</ulink>.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.slow">
-<question><para>Why is Cygwin suddenly <emphasis>so</emphasis> slow?</para></question>
-<answer>
-
-<para>If you recently upgraded and suddenly <emphasis>every</emphasis> command takes a
-<emphasis>very</emphasis> long time, then something is probably attempting to
-access a network share. You may have the obsolete <literal>//c</literal>
-notation in your PATH or startup files. This now means the
-<emphasis>network share</emphasis> <literal>c</literal>, which will slow things down
-tremendously if it does not exist.
-</para>
-<para>Using //c (for C:) doesn't work anymore. (Similarly for any drive
-letter, e.g. <literal>//z</literal> for <literal>Z:</literal>) This ``feature'' has long been
-deprecated, and no longer works at all in the latest release. As of
-release 1.3.3, <literal>//c</literal> now means the <emphasis>network share</emphasis> <literal>c</literal>.
-For a detailed discussion of why this change was made, and how deal
-with it now, refer to
-<ulink url="http://sources.redhat.com/ml/cygwin/2001-09/msg00014.html">http://sources.redhat.com/ml/cygwin/2001-09/msg00014.html</ulink>.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.services">
-<question><para>Why don't my services work?</para></question>
-<answer>
-
-<para>Most Windows services run as a special user called <literal>SYSTEM</literal>. If you
-installed Cygwin for "Just Me", the <literal>SYSTEM</literal> user won't see your
-Cygwin mount table. You need to re-mount all of your mounts as
-"system" for services to work. You can re-run <literal>setup.exe</literal> and
-select "Install for All Users", or this script will do the trick:
-</para>
-<screen>
-eval "`mount -m | sed -e 's/ -u / -s /g' -e 's/$/;/'`"
-</screen>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.shares">
-<question><para>Why can't my services access network shares?</para></question>
-<answer>
-
-<para>When a service switches to a certain user, it is running as
-<literal>SYSTEM</literal> impersonating the user account. During
-impersonation, the user's password is not available and so non-public
-network shares are not available. For more information, see
-<ulink url="http://cygwin.com/cygwin-ug-net/ntsec.html" />.
-</para>
-<para>Workarounds include using public network share that does not require
-authentication (for non-critical files), providing your password to a
-<command>net use</command> command, or running the service as your own
-user with <literal>cygrunsrv -u</literal> (see
-<literal>/usr/share/doc/Cygwin/cygrunsrv.README</literal> for more
-information).
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.path">
-<question><para>How should I set my PATH?</para></question>
-<answer>
-
-<para>This is done for you in the file /etc/profile, which is sourced by bash
-when you start it from the Desktop or Start Menu shortcut, created by
-<literal>setup.exe</literal>. The line is
-</para>
-<screen>
- PATH="/usr/local/bin:/usr/bin:/bin:$PATH"
-</screen>
-
-<para>Effectively, this <emphasis role='bold'>prepends</emphasis> /usr/local/bin and /usr/bin to your
-Windows system path. If you choose to reset your PATH, say in
-$HOME/.bashrc, or by editing etc/profile directly, then you should
-follow this rule. You <emphasis role='bold'>must</emphasis> have <literal>/usr/bin</literal> in your PATH
-<emphasis role='bold'>before</emphasis> any Windows system directories. (And you must not omit
-the Windows system directories!) Otherwise you will likely encounter
-all sorts of problems running Cygwin applications.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.not-found">
-<question><para>Bash says "command not found", but it's right there!</para></question>
-<answer>
-
-<para>If you compile a program, you might find that you can't run it:
-</para>
-<screen>
- bash$ gcc -o hello hello.c
- bash$ hello
- bash: hello: command not found
-</screen>
-
-<para>Unlike Windows, bash does not look for programs in <literal>.</literal> (the current
-directory) by default. You can add <literal>.</literal> to your PATH (see above),
-but this is not recommended (at least on UNIX) for security reasons.
-Just tell bash where to find it, when you type it on the command line:
-</para>
-<screen>
- bash$ gcc -o hello hello.c
- bash$ ./hello
- Hello World!
-</screen>
-
-</answer></qandaentry>
-
-<qandaentry id="faq.using.converting-paths">
-<question><para>How do I convert between Windows and UNIX paths?</para></question>
-<answer>
-
-<para>Use the 'cygpath' utility. Type '<literal>cygpath --help</literal>' for
-information. For example (on my installation):
-<screen>
- bash$ cygpath --windows ~/.bashrc
- D:\starksb\.bashrc
- bash$ cygpath --unix C:/cygwin/bin/cygwin.bat
- /usr/bin/cygwin.bat
- bash$ cygpath --unix C:\\cygwin\\bin\\cygwin.bat
- /usr/bin/cygwin.bat
-</screen>
-Note that bash interprets the backslash '\' as an escape character, so
-you must type it twice in the bash shell if you want it to be recognized
-as such.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.bashrc">
-<question><para>Why doesn't bash read my .bashrc file on startup?</para></question>
-<answer>
-
-<para>Your .bashrc is read from your home directory specified by the HOME
-environment variable. It uses /.bashrc if HOME is not set. So you need
-to set HOME correctly, or move your .bashrc to the top of the drive
-mounted as / in Cygwin.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.bash-insensitive">
-<question><para>How can I get bash filename completion to be case insensitive?</para></question>
-<answer>
-
-<para>Add the following to your <literal>~/.bashrc</literal> file:
-</para>
-<screen>
- shopt -s nocaseglob
-</screen>
-
-<para>and add the following to your <literal>~/.inputrc</literal> file:
-</para>
-<screen>
- set completion-ignore-case on
-</screen>
-
-</answer></qandaentry>
-
-<qandaentry id="faq.using.filename-spaces">
-<question><para>Can I use paths/filenames containing spaces in them?</para></question>
-<answer>
-
-<para>Cygwin does support spaces in filenames and paths. That said, some
-utilities that use the library may not, since files don't typically
-contain spaces in Unix. If you stumble into problems with this, you
-will need to either fix the utilities or stop using spaces in filenames
-used by Cygwin tools.
-</para>
-<para>In particular, bash interprets space as a word separator. You would have
-to quote a filename containing spaces, or escape the space character.
-For example:
-<screen>
- bash-2.03$ cd '/cygdrive/c/Program Files'
-</screen>
-or
-<screen>
- bash-2.03$ cd /cygdrive/c/Program\ Files
-</screen>
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.shortcuts">
-<question><para>Why can't I cd into a shortcut to a directory?</para></question>
-<answer>
-
-<para>Cygwin versions &lt; 1.3.0 do not follow MS Windows Explorer Shortcuts
-(*.lnk files). It sees a shortcut as a regular file and this you
-cannot "cd" into it.
-</para>
-<para>Since version 1.3.0, Cygwin uses shortcuts as symlinks by default.
-</para>
-<para>Cygwin shortcuts are different from shortcuts created by native Windows
-applications. Windows applications can usually make use of Cygwin
-shortcuts but not vice versa. This is by choice. The reason is that
-Windows shortcuts may contain a bunch of extra information which would
-get lost, if, for example, Cygwin tar archives and extracts them as
-symlinks.
-</para>
-<para>Changing a Cygwin shortcut in Windows Explorer usually changes a Cygwin
-shortcut into a Windows native shortcut. Afterwards, Cygwin will not
-recognize it as symlink anymore.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.find">
-<question><para>I'm having basic problems with find. Why?</para></question>
-<answer>
-
-<para>Make sure you are using the find that came with Cygwin and that you
-aren't picking up the Win32 find command instead. You can verify that
-you are getting the right one by doing a "type find" in bash.
-</para>
-<para>If the path argument to find, including current directory (default), is
-itself a symbolic link, then find will not traverse it unless you
-specify the <literal>-follow</literal> option. This behavior is different than most
-other UNIX implementations, but is not likely to change.
-</para>
-<para>If find does not seem to be producing enough results, or seems to be
-missing out some directories, you may be experiencing a problem with one
-of find's optimisations. The absence of <literal>.</literal> and <literal>..</literal>
-directories on some filesystems, such as DVD-R UDF, can confuse find.
-See the documentation for the option <literal>-noleaf</literal> in the man page.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.su">
-<question><para>Why doesn't <literal>su</literal> work?</para></question>
-<answer>
-
-<para>The <literal>su</literal> command has been in and out of Cygwin distributions, but
-it has not been ported to Cygwin and has never worked. It is
-currently installed as part of the sh-utils, but again, it does not work.
-</para>
-<para>You may be able to use <literal>login</literal> instead, but you should read
-<ulink url="http://www.cygwin.com/ml/cygwin/2001-03/msg00337.html">http://www.cygwin.com/ml/cygwin/2001-03/msg00337.html</ulink> first.
-</para>
-<para>For some technical background into why <literal>su</literal> doesn't work, read
-<ulink url="http://www.cygwin.com/ml/cygwin/2003-06/msg00897.html">http://www.cygwin.com/ml/cygwin/2003-06/msg00897.html</ulink> and
-related messages.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.man">
-<question><para>Why doesn't man (or apropos) work?</para></question>
-<answer>
-
-<para>Before you can use <literal>man -k</literal> or <literal>apropos</literal>, you
-must create the whatis database. Just run the command
-</para>
-<screen>
- /usr/sbin/makewhatis
-</screen>
-
-<para>(it may take a minute to complete).
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.chmod">
-<question><para>Why doesn't <literal>chmod</literal> work?</para></question>
-<answer>
-
-<para>The most common case is that your <literal>/etc/passwd</literal>
-or <literal>/etc/group</literal> files are not properly set up. If
-<literal>ls -l</literal> shows a group of <literal>mkpasswd</literal>
-or <literal>mkgroup</literal>, you need to run one or both of those
-commands.
-</para>
-<para>If you're using FAT32 instead of NTFS, <literal>chmod</literal>
-will fail since FAT32 does not provide any security. You might consider
-converting the drive to NTFS with <literal>CONVERT.EXE</literal>.
-</para>
-<para>For other cases, understand that Cygwin attempts to show UNIX
-permissions based on the security features of Windows, so the Windows
-ACLs are likely the source of your problem. See the Cygwin User's
-Guide at <ulink url="http://cygwin.com/cygwin-ug-net/ntsec.html" />
-for more information on how Cygwin maps Windows permissions.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.mkdir-network">
-<question><para>Why doesn't <literal>mkdir -p</literal> work on a network share?</para></question>
-<answer>
-
-<para>Starting with <literal>coreutils-5.3.0-6</literal> and <literal>cygwin-1.5.17</literal>, you can
-do something like this:
-</para>
-<screen>
-bash$ mkdir -p //MACHINE/Share/path/to/new/dir
-</screen>
-
-<para>However, coreutils expects Unix path names, so something like
-<literal>mkdir -p \\\\machine\\share\\path</literal> will fail.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.shell-scripts">
-<question><para>Why doesn't my shell script work?</para></question>
-<answer>
-
-<para>There are two basic problems you might run into. One is the fact that
-<command>/bin/sh</command> is really <command>bash</command> (prior to
-<command>bash-3.0-6</command>, <command>/bin/sh</command> was ash). and is
-missing some features you might expect in <command>/bin/sh</command>,
-particularly if you are used to <command>/bin/sh</command> actually being
-<command>zsh</command> (MacOS X "Panther") or <command>ksh</command> (Tru64).
-</para>
-
-<para>Or, it could be a permission problem, and Cygwin doesn't understand that your script is executable. Because <literal>chmod</literal> may not work (see FAQ entry above), Cygwin must read the contents of files to determine if
-they are executable. If your script does not start with
-</para>
-<screen>
- #! /bin/sh
-</screen>
-
-<para>(or any path to a script interpreter, it does not have to be /bin/sh)
-then Cygwin will not know it is an executable script. The Bourne shell
-idiom
-</para>
-<screen>
- :
- # This is the 2nd line, assume processing by /bin/sh
-</screen>
-
-<para>also works.
-</para>
-<para>Note that you can use <literal>mount -x</literal> to force Cygwin to treat all files
-under the mount point as executable. This can be used for individual
-files as well as directories. Then Cygwin will not bother to read files
-to determine whether they are executable.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.printing">
-<question><para>How do I print under Cygwin?</para></question>
-<answer>
-
-<para>lpr is available in the <ulink url="http://cygwin.com/setup.exe">setup.exe</ulink> cygutils package. Some <ulink url="http://cygwin.com/ml/cygwin/2008-05/msg00123.html">usage hints</ulink> are available courtesy of Rodrigo Medina.
-</para>
-<para>Jason Tishler has written a couple of messages that explain how to use
-a2ps (for nicely formatted text in PostScript) and ghostscript (to print
-PostScript files on non-PostScript Windows printers). Start at
-<ulink url="http://cygwin.com/ml/cygwin/2001-04/msg00657.html">http://cygwin.com/ml/cygwin/2001-04/msg00657.html</ulink>. Note that the
-<literal>file</literal> command is now available as part of Cygwin setup.
-</para>
-<para>Alternatively, on NT, you can use the Windows <literal>print</literal> command. (It
-does not seem to be available on Win9x.) Type
-</para>
-<screen>
- bash$ print /\?
-</screen>
-
-<para>for usage instructions (note the <literal>?</literal> must be escaped from the
-shell).
-</para>
-<para>Finally, you can simply <literal>cat</literal> the file to the printer's share name:
-</para>
-<screen>
- bash$ cat myfile &gt; //host/printer
-</screen>
-
-<para>You may need to press the formfeed button on your printer or append the
-formfeed character to your file.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.unicode">
-<question><para>Why don't international (Unicode) characters work?</para></question>
-<answer>
-
-<para>Internationalization is a complex issue. The short answer is that
-Cygwin is not Unicode-aware, so things that might work in Linux will
-not necessarily work on Cygwin. However, some things do work. To type
-international characters (&pound;&auml;&ouml;) in <literal>bash</literal>, add the following
-lines to your <literal>~/.inputrc</literal> file and restart <literal>bash</literal>:
-</para>
-<screen>
- set meta-flag on
- set convert-meta off
- set output-meta on
- set input-meta on
- set kanji-code sjis
-</screen>
-
-<para>These are options to the <literal>readline</literal> library, which you can read
-about in the <literal>bash(1)</literal> and <literal>readline(3)</literal> man pages. Other
-tools that do not use <literal>readline</literal> for display, such as <literal>less</literal>
-and <literal>ls</literal>, require additional settings, which could be put in your
-<literal>~/.bashrc</literal>:
-<screen>
-alias less='/bin/less -r'
-alias ls='/bin/ls -F --color=tty --show-control-chars'
-export LANG="ja_JP.SJIS"
-export OUTPUT_CHARSET="sjis"
-</screen>
-These examples use the Japanese Shift-JIS character set, obviously
-you will want to change them for your own locale.
-</para>
-
-</answer></qandaentry>
-
-<qandaentry id="faq.using.cursor">
-<question><para>Why don't cursor keys work under Win95/Win98?</para></question>
-<answer>
-
-<para><emphasis role='bold'>(Please note: This section has not yet been updated for the latest net release.)</emphasis>
-</para>
-<para>Careful examination shows that they not just non-functional, but
-rather behave strangely, for example, with NumLock off, keys on numeric
-keyboard work, until you press usual cursor keys, when even numeric
-stop working, but they start working again after hitting alphanumeric
-key, etc. This reported to happen on localized versions of Win98 and
-Win95, and not specific to Cygwin; there are known cases of Alt+Enter
-(fullscreen/windowed toggle) not working and shifts sticking with
-other programs. The cause of this problem is Microsoft keyboard
-localizer which by default installed in 'autoexec.bat'. Corresponding
-line looks like:
-</para>
-<screen>
-keyb ru,,C:\WINDOWS\COMMAND\keybrd3.sys
-</screen>
-
-<para>(That's for russian locale.) You should comment that line if you want
-your keys working properly. Of course, this will deprive you of your
-local alphabet keyboard support, so you should think about
-another localizer. ex-USSR users are of course knowledgeable of Keyrus
-localizer, and it might work for other locales too, since it has keyboard
-layout editor. But it has russian messages and documentation ;-(
-Reference URL is http://www.hnet.ru/software/contrib/Utils/KeyRus/
-(note the you may need to turn off Windows logo for Keyrus to operate
-properly).
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.multiple-copies">
-<question><para>Is it OK to have multiple copies of the DLL?</para></question>
-<answer>
-
-<para>You should only have one copy of the Cygwin DLL on your system. If you
-have multiple versions, they will conflict and cause problems.
-</para>
-<para>If you get the error "shared region is corrupted" or "shared region
-version mismatch" it means you have multiple versions of cygwin1.dll
-running at the same time. This could happen, for example, if you update
-cygwin1.dll without exiting <emphasis>all</emphasis> Cygwin apps (including inetd)
-beforehand.
-</para>
-<para>The only DLL that is sanctioned by the Cygwin project is the one that
-you get by running <ulink url="http://cygwin.com/setup.exe">setup.exe</ulink>, installed in the
-directory controlled by this program. If you have other versions on
-your system and desire help from the cygwin project, you should delete
-or rename all DLLs that are not installed by <filename>setup.exe</filename>.
-</para>
-<para>If you're trying to find multiple versions of the DLL that are causing
-this problem, reboot first, in case DLLs still loaded in memory are the
-cause. Then use the Windows System find utility to search your whole
-machine, not just components in your PATH (as 'type' would do) or
-cygwin-mounted filesystems (as Cygwin 'find' would do).
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.third-party.multiple-copies">
-<question><para>
-I read the above but I want to bundle Cygwin with a product, and ship it
-to customer sites. How can I do this without conflicting with any
-Cygwin installed by the user?
-</para></question>
-<answer><para>
-Third party developers who wish to use Cygwin should check if
-there is a version of cygwin installed and use the installed
-version if it is newer, or conditionally upgrade if it is not.
-(If you write a tool to make this easy, consider contributing
-it for others to use)
-</para></answer></qandaentry>
-
-<qandaentry id="faq.using.bundling-cygwin">
-<question><para>
-Can I bundle Cygwin with my product for free?
-</para></question>
-<answer><para>
-Only if you comply with Cygwin's <ulink
-url="http://cygwin.com/license.html">license</ulink> very carefully. If you
-choose to distribute cygwin1.dll, you must be willing to distribute the
-exact source code used to build that copy of cygwin1.dll as per the
-terms of the GPL. If you ship applications that link with cygwin1.dll,
-you must either provide those applications' source code under a
-GPL-compatible license, *or* purchase a cygwin license from Red Hat.
-</para></answer></qandaentry>
-
-<qandaentry id="faq.using.private-cygwin">
-<question><para>
-So I can't install a private version of the Cygwin DLL without
-conflictng with the system cygwin?
-</para></question>
-<answer><para>
-Actually, if you are very careful, you can have two different versions
-of the Cygwin DLL installed on your system at the same time but they
-must be run serially. This means that you can't be running programs
-using both versions of Cygwin at the same time. Please be aware that
-currently both versions will use the same mount table entries although
-this wil change in Cygwin version 1.7.x.
-</para><para>
-This usage is not recommeded for novices. Only limited support will be
-provided in the <ulink url="http://cygwin.com/lists.html">mailing lists</ulink>
-if you run into problems.
-</para></answer></qandaentry>
-
-<qandaentry id="faq.using.older-cygwin-conflict">
-<question><para>
-But doesn't that mean that if some application installs an older Cygwin
-DLL on top of a newer DLL, my application will break?
-</para></question>
-<answer><para>
-It depends on what you mean by "break". If the application installs a
-version of the Cygwin DLL in another location than Cygwin's /bin
-directory then the rules in 9.3 apply. If the application installs an
-older version of the DLL in /bin then you should complain loudly to the
-application provider.
-</para><para>
-Remember that the Cygwin DLL strives to be backwards compatible so a
-newer version of the DLL should always work with older executables. So,
-in general, it is always best to keep one version of the DLL on your
-system and it should always be the latest version which matches your
-installed distribution.
-</para></answer></qandaentry>
-
-<qandaentry id="faq.using.missing-packages">
-<question><para>Why isn't package XYZ available in Cygwin?</para></question>
-<answer>
-
-<para>Probably because there is nobody willing or able to maintain it. It
-takes time, and the priority for the Cygwin Team is the Cygwin package.
-The rest is a volunteer effort. Want to contribute? See
-<ulink url="http://cygwin.com/setup.html">http://cygwin.com/setup.html</ulink>.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.old-packages">
-<question><para>Why is the Cygwin package of XYZ so out of date?</para></question>
-<answer>
-
-<para>(Also: Why is the version of package XYZ older than the version that I
-can download from the XYZ web site? Why is the version of package XYZ
-older than the version that I installed on my linux system? Is there
-something special about Cygwin which requires that only an older version
-of package XYZ will work on it?)
-</para>
-<para>Every package in the Cygwin distribution has a maintainer who is
-responsible for sending out updates of the package. This person is a
-volunteer who is rarely the same person as the official developer of the
-package. If you notice that a version of a package seems to be out of
-date, the reason is usually pretty simple -- the person who is
-maintaining the package hasn't gotten around to updating it yet. Rarely,
-the newer package actually requires complex changes that the maintainer
-is working out.
-</para>
-<para>If you urgently need an update, sending a polite message to the cygwin
-mailing list pinging the maintainer is perfectly acceptable. There are
-no guarantees that the maintainer will have time to update the package
-or that you'll receive a response to your request, however.
-</para>
-<para>Remeber that the operative term here is "volunteer".
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.accessing-drives">
-<question><para>How can I access other drives?</para></question>
-<answer>
-
-<para>You have some flexibility here.
-</para>
-<para>Cygwin has a builtin "cygdrive prefix" for drives that are not mounted.
-You can access any drive, say Z:, as '/cygdrive/z/'.
-</para>
-<para>In some applications (notably bash), you can use the familiar windows
-&lt;drive&gt;:/path/, using posix forward-slashes ('/') instead of Windows
-backward-slashes ('\'). (But see the warning below!) This maps in the
-obvious way to the Windows path, but will be converted internally to use
-the Cygwin path, following mounts (default or explicit). For example:
-<screen>
- bash$ cd C:/Windows
- bash$ pwd
- /cygdrive/c/Windows
-</screen>
-and
-<screen>
- bash$ cd C:/cygwin
- bash$ pwd
- /
-</screen>
-for a default setup. You could also use backward-slashes in the
-Windows path, but these would have to be escaped from the shell.
-</para>
-<para><emphasis role='bold'>Warning:</emphasis> There is some ambiguity in going from a Windows path
-to the posix path, because different posix paths, through different
-mount points, could map to the same Windows directory. This matters
-because different mount points may be binmode or textmode, so the
-behavior of Cygwin apps will vary depending on the posix path used to
-get there.
-</para>
-<para>You can avoid the ambiguity of Windows paths, and avoid typing
-"/cygdrive", by explicitly mounting drives to posix paths. For example:
-<screen>
- bash$ mkdir /c
- bash$ mount c:/ /c
- bash$ ls /c
-</screen>
-Then <literal>/cygdrive/c/Windows</literal> becomes <literal>/c/Windows</literal> which is a
-little less typing.
-</para>
-<para>Note that you only need to mount drives once. The mapping is kept
-in the registry so mounts stay valid pretty much indefinitely.
-You can only get rid of them with umount, or the registry editor.
-</para>
-<para>The '-b' option to mount mounts the mountpoint in binary mode
-("binmode") where text and binary files are treated equivalently. This
-should only be necessary for badly ported Unix programs where binary
-flags are missing from open calls. It is also the setting for /,
-/usr/bin and /usr/lib in a default Cygwin installation. The default for
-new mounts is text mode ("textmode"), which is also the mode for all
-"cygdrive" mounts.
-</para>
-<para>You can change the default <literal>cygdrive</literal> prefix and whether it is
-binmode or textmode using the <literal>mount</literal> command. For example,
-<screen>
- bash$ mount -b --change-cygdrive-prefix cygdrive
-</screen>
-will change all <literal>/cygdrive/...</literal> mounts to binmode.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.copy-and-paste">
-<question><para>How can I copy and paste into Cygwin console windows?</para></question>
-<answer>
-
-<para>First, consider using rxvt instead of the standard console window. In
-rxvt, selecting with the left-mouse also copies, and middle-mouse
-pastes. It couldn't be easier!
-</para>
-<para>Under Windows NT, open the properties dialog of the console window.
-The options contain a toggle button, named "Quick edit mode". It must
-be ON. Save the properties.
-</para>
-<para>Under Windows 9x, open the properties dialog of the console window.
-Select the Misc tab. Uncheck Fast Pasting. Check QuickEdit.
-</para>
-<para>You can also bind the insert key to paste from the clipboard by adding
-the following line to your .inputrc file:
-<screen>
- "\e[2~": paste-from-clipboard
-</screen>
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.firewall">
-<question><para>What firewall should I use with Cygwin? </para></question>
-<answer>
-
-<para>We have had good reports about Kerio Personal Firewall, ZoneLabs
-Integrity Desktop, and the built-in firewall in Windows XP. Other
-well-known products including ZoneAlarm and Norton Internet Security have
-caused problems for some users but work fine for others. At last report,
-Agnitum Outpost did not work with Cygwin. If you are having strange
-connection-related problems, disabling the firewall is a good
-troubleshooting step (as is closing or disabling all other running
-applications, especially resource-intensive processes such as indexed
-search).
-</para>
-<para>On the whole, Cygwin doesn't care which firewall is used. The few rare
-exceptions have to do with socket code.
-Cygwin uses sockets to implement many of its functions, such as IPC.
-Some overzealous firewalls install themselves deeply into the winsock
-stack (with the 'layered service provider' API) and install hooks
-throughout. Sadly the mailing list archives are littered with examples
-of poorly written firewall-type software that causes things to break.
-Note that with many of these products, simply disabling the firewall
-does not remove these changes; it must be completely uninstalled.
-</para>
-<para>See also <ulink url="http://cygwin.com/faq/faq.using.html#faq.using.bloda" />
-for a list of applications that have been known, at one time or another, to
-interfere with the normal functioning of Cygwin.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.sharing-files">
-<question><para>How can I share files between Unix and Windows?</para></question>
-<answer>
-
-<para>During development, we have both Linux boxes running Samba and Windows
-machines. We often build with cross-compilers under Linux and copy
-binaries and source to the Windows system or just toy with them
-directly off the Samba-mounted partition. On dual-boot NT/Windows 9x
-machines, we usually use the FAT filesystem so we can also access the
-files under Windows 9x.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.case-sensitive">
-<question><para>Is Cygwin case-sensitive? What are managed mounts?</para></question>
-<answer>
-
-<para>Several Unix programs expect to be able to use to filenames
-spelled the same way, but with different case. A prime example
-of this is perl's configuration script, which wants <literal>Makefile</literal> and
-<literal>makefile</literal>. WIN32 can't tell the difference between files with
-just different case, so the configuration fails.
-</para>
-<para>To help with this problem, starting in <literal>cygwin-1.5.0</literal> it is
-possible to have a case sensitive Cygwin managed mount. This is an
-experimental feature and should be used with caution. You should only
-use it for directories that are initially unpopulated and are due to
-be completely managed by cygwin (hence the name). So, the best use
-would be to create an empty directory, mount it, and then add files to
-it:
-</para>
-<screen>
-mkdir /managed-dir
-mount -o managed c:/cygwin/managed-dir /managed-dir
-cd /managed-dir/
-touch makefile
-touch Makefile
-</screen>
-
-</answer></qandaentry>
-
-<qandaentry id="faq.using.dos-filenames">
-<question><para>What about DOS special filenames?</para></question>
-<answer>
-
-<para>Files cannot be named com1, lpt1, or aux (to name a few); either as
-the root filename or as the extension part. If you do, you'll have
-trouble. Unix programs don't avoid these names which can make things
-interesting. E.g., the perl distribution has a file called
-<literal>aux.sh</literal>. The perl configuration tries to make sure that
-<literal>aux.sh</literal> is there, but an operation on a file with the magic
-letters 'aux' in it will hang.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.hangs">
-<question><para>When it hangs, how do I get it back?</para></question>
-<answer>
-
-<para>If something goes wrong and the tools hang on you for some reason (easy
-to do if you try and read a file called aux.sh), first try hitting ^C to
-return to bash or the cmd prompt.
-</para>
-<para>If you start up another shell, and applications don't run, it's a good
-bet that the hung process is still running somewhere. Use the Task
-Manager, pview, or a similar utility to kill the process.
-</para>
-<para>And, if all else fails, there's always the reset button/power switch.
-This should never be necessary under Windows NT.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.directory-structure">
-<question><para>Why the weird directory structure?</para></question>
-<answer>
-
-<para>Why do /lib and /usr/lib (and /bin, /usr/bin) point to the same thing?
-</para>
-<para>Why use mounts instead of symbolic links?
-</para>
-<para>Can I use a disk root (e.g., C:\) as Cygwin root? Why is this discouraged?
-</para>
-<para>After a new installation in the default location, your mount points will
-look something like this:
-</para>
-<screen>
- bash$ mount
- C:\cygwin\bin on /usr/bin type system (binmode)
- C:\cygwin\lib on /usr/lib type system (binmode)
- C:\cygwin on / type system (binmode)
-</screen>
-
-<para>(Exactly what you see depends on what options you gave to <literal>setup.exe</literal>.)
-</para>
-<para>Note that /bin and /usr/bin point to the same location, as do /lib and
-/usr/lib. This is intentional, and you should not undo these mounts
-unless you <emphasis>really</emphasis> know what you are doing.
-</para>
-<para>Various applications and packages may expect to be installed in /lib or
-/usr/lib (similarly /bin or /usr/bin). Rather than distinguish between
-them and try to keep track of them (possibly requiring the occasional
-duplication or symbolic link), it was decided to maintain only one
-actual directory, with equivalent ways to access it.
-</para>
-<para>Symbolic links had been considered for this purpose, but were dismissed
-because they do not always work on Samba drives. Also, mounts are
-faster to process because no disk access is required to resolve them.
-</para>
-<para>Note that non-cygwin applications will not observe Cygwin mounts (or
-symlinks for that matter). For example, if you use WinZip to unpack the
-tar distribution of a Cygwin package, it may not get installed to the
-correct Cygwin path. <emphasis>So don't do this!</emphasis>
-</para>
-<para>It is strongly recommended not to make the Cygwin root directory the
-same as your drive's root directory, unless you know what you are doing
-and are prepared to deal with the consequences. It is generally easier
-to maintain the Cygwin hierarchy if it is isolated from, say, C:\. For
-one thing, you avoid possible collisions with other (non-cygwin)
-applications that may create (for example) \bin and \lib directories.
-(Maybe you have nothing like that installed now, but who knows about
-things you might add in the future?)
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.anti-virus">
-<question><para>How do anti-virus programs like Cygwin?</para></question>
-<answer>
-
-<para>Users have reported that NAI (formerly McAfee) VirusScan for NT (and
-others?) is incompatible with Cygwin. This is because it tries to scan
-the newly loaded shared memory in cygwin1.dll, which can cause fork() to
-fail, wreaking havoc on many of the tools. (It is not confirmed that
-this is still a problem, however.)
-</para>
-<para>There have been several reports of NAI VirusScan causing the system to
-hang when unpacking tar.gz archives. This is surely a bug in VirusScan,
-and should be reported to NAI. The only workaround is to disable
-VirusScan when accessing these files. This can be an issue during
-setup, and is discussed in that FAQ entry.
-</para>
-<para>Some users report a significant performance hit using Cygwin when their
-anti-virus software is enabled. Rather than disable the anti-virus
-software completely, it may be possible to specify directories whose
-contents are exempt from scanning. In a default installation, this
-would be <literal>C:\cygwin\bin</literal>. Obviously, this could be
-exploited by a hostile non-Cygwin program, so do this at your own risk.
-</para>
-<para>See also <ulink url="http://cygwin.com/faq/faq.using.html#faq.using.bloda" />
-for a list of applications that have been known, at one time or another, to
-interfere with the normal functioning of Cygwin.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.emacs">
-<question><para>Is there a Cygwin port of GNU Emacs?</para></question>
-<answer>
-
-<para>Yes! It uses the X11 (<ulink url="http://cygwin.com/xfree/">http://cygwin.com/xfree/</ulink>) Windows
-interface. From a remote login shell, this ``emacs -nw'' works fine.
-There is also a non-X11 version which just provides the text-only
-terminal interface. Use Cygwin Setup to install either one (or both).
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.ntemacs">
-<question><para>What about NT Emacs?</para></question>
-<answer>
-
-<para>If you want GNU Emacs with a native Microsoft Windows interface, but
-without X, then you must use the native Windows port, commonly known
-as ``NT Emacs''. You get NT Emacs from any GNU mirror. It is not
-available from Cygwin Setup.
-</para>
-<para>NT Emacs uses the Windows command shell by default. Since it is not a
-Cygwin application, it has no knowledge of Cygwin mounts. With those
-points in mind, you need to add the following code to your ~/.emacs
-(or ~/_emacs) file in order to use Cygwin bash. This is particularly useful
-for the JDEE package (<ulink url="http://jdee.sunsite.dk/">http://jdee.sunsite.dk/</ulink>). The following
-settings are for Emacs 21.1:
-</para>
-<screen>
- ;; This assumes that Cygwin is installed in C:\cygwin (the
- ;; default) and that C:\cygwin\bin is not already in your
- ;; Windows Path (it generally should not be).
- ;;
- (setq exec-path (cons "C:/cygwin/bin" exec-path))
- (setenv "PATH" (concat "C:\\cygwin\\bin;" (getenv "PATH")))
- ;;
- ;; NT-emacs assumes a Windows command shell, which you change
- ;; here.
- ;;
- (setq shell-file-name "bash")
- (setenv "SHELL" shell-file-name)
- (setq explicit-shell-file-name shell-file-name)
- ;;
- ;; This removes unsightly ^M characters that would otherwise
- ;; appear in the output of java applications.
- ;;
- (add-hook 'comint-output-filter-functions
- 'comint-strip-ctrl-m)
-</screen>
-
-<para>If you want NT Emacs to understand Cygwin paths, get
-cygwin-mount.el from <ulink url="http://www.emacswiki.org/elisp/index.html">http://www.emacswiki.org/elisp/index.html</ulink>.
-</para>
-<para>Note that all of this ``just works'' if you use the Cygwin port of
-Emacs from Cygwin Setup.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.xemacs">
-<question><para>What about XEmacs?</para></question>
-<answer>
-
-<para>For a concise description of the current situation with XEmacs, see
-this message from the Cygwin mailing list:
-<ulink url="http://cygwin.com/ml/cygwin/2002-11/msg00609.html">http://cygwin.com/ml/cygwin/2002-11/msg00609.html</ulink>.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.console-window">
-<question><para>Is there a better alternative to the standard console window?</para></question>
-<answer>
-
-<para>Yes! Use rxvt instead. It's an optional package in Cygwin Setup.
-You can use it with or without X11. You can resize it easily by
-dragging an edge or corner. Copy and paste is easy with the left and
-middle mouse buttons, respectively. It will honor settings in your
-~/.Xdefaults file, even without X. For details see
-<literal>/usr/share/doc/Cygwin/rxvt-&lt;ver&gt;.README</literal>.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.info-error">
-<question><para>info error "dir: No such file or directory"</para></question>
-<answer>
-
-<para>Cygwin packages install their info documentation in the
-<literal>/usr/share/info</literal> directory. But you need to create a <literal>dir</literal>
-file there before the standalone info program (probably
-<literal>/usr/bin/info</literal>) can be used to read those info files. This is how
-you do it:
-<screen>
- bash$ cd /usr/share/info
- bash$ for f in *.info ; do install-info $f dir ; done
-</screen>
-This may generate warnings:
-<screen>
- install-info: warning: no info dir entry in `gzip.info'
- install-info: warning: no info dir entry in `time.info'
-</screen>
-The <literal>install-info</literal> command cannot parse these files, so you will
-have to add their entries to <literal>/usr/share/info/dir</literal> by hand.
-</para>
-<para>Even if the dir file already exists, you may have to update it when
-you install new Cygwin packages. Some packages update the dir file
-for you, but many don't.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.out-of-queue">
-<question><para>Why do I get a message saying Out of Queue slots?</para></question>
-<answer>
-
-<para>"Out of queue slots!" generally occurs when you're trying to remove
-many files that you do not have permission to remove (either because
-you don't have permission, they are opened exclusively, etc). What
-happens is Cygwin queues up these files with the supposition that it
-will be possible to delete these files in the future. Assuming that
-the permission of an affected file does change later on, the file will
-be deleted as requested. However, if too many requests come in to
-delete inaccessible files, the queue overflows and you get the message
-you're asking about. Usually you can remedy this with a quick chmod,
-close of a file, or other such thing. (Thanks to Larry Hall for
-this explanation).
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.symlinks-samba">
-<question><para>Why don't symlinks work on samba-mounted filesystems?</para></question>
-<answer>
-
-<para>Symlinks are marked with "system" file attribute. Samba does not
-enable this attribute by default. To enable it, consult your Samba
-documentation and then add these lines to your samba configuration
-file:
-</para>
-<screen>
- map system = yes
- create mask = 0775
-</screen>
-
-<para>Note that the 0775 can be anything as long as the 0010 bit is set.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.df-incorrect">
-<question><para>Why does df report sizes incorrectly.</para></question>
-<answer>
-
-<para>There is a bug in the Win32 API function GetFreeDiskSpace that
-makes it return incorrect values for disks larger than 2 GB in size.
-Perhaps that may be your problem?
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.tcl-tk">
-<question><para>Why doesn't Cygwin tcl/tk understand Cygwin paths?</para></question>
-<answer>
-
-<para>The versions of Tcl/Tk distributed with Cygwin (e.g. cygtclsh80.exe,
-cygwish80.exe) are not actually "Cygwin versions" of those tools.
-They are built with the <literal>-mno-cygwin</literal> option to <literal>gcc</literal>, which
-means they do not understand Cygwin mounts or symbolic links.
-</para>
-<para>See the entry "How do I convert between Windows and UNIX paths?"
-elsewhere in this FAQ.
-</para></answer></qandaentry>
-
-<qandaentry id="faq.using.bloda">
-<question><para>What applications have been found to interfere with Cygwin?</para></question>
-<answer>
-
-<para>From time to time, people have reported strange failures and problems in
-Cygwin and Cygwin packages that seem to have no rational explanation. Among
-the most common symptoms they report are fork failures, memory leaks, and file
-access denied problems. These problems, when they have been traced, often appear
-to be caused by interference from other software installed on the same PC. Security
-software, in particular, such as anti-virus, anti-spyware, and firewall applications,
-often implements its functions by installing hooks into various parts of the system,
-including both the Explorer shell and the underlying kernel. Sometimes these hooks
-are not implemented in an entirely transparent fashion, and cause changes in the
-behaviour which affect the operation of other programs, such as Cygwin.
-</para>
-<para>Among the software that has been found to cause difficulties are:</para>
-<para><itemizedlist>
-<listitem><para>Sonic Solutions burning software containing DLA component</para></listitem>
-<listitem><para>Norton/MacAffee/Symantec antivirus or antispyware</para></listitem>
-<listitem><para>Logitech webcam software with "Logitech process monitor" service</para></listitem>
-<listitem><para>Kerio, Agnitum or ZoneAlarm Personal Firewall</para></listitem>
-<listitem><para>Iolo System Mechanic/AntiVirus/Firewall</para></listitem>
-<listitem><para>LanDesk</para></listitem>
-<listitem><para>Windows Defender </para></listitem>
-<listitem><para>Embassy Trust Suite fingerprint reader software wxvault.dll</para></listitem>
-<listitem><para>NOD32 Antivirus</para></listitem>
-<listitem><para>ByteMobile laptop optimization client</para></listitem>
-</itemizedlist></para>
-<para>Sometimes these problems can be worked around, by temporarily or partially
-disabling the offending software. For instance, it may be possible to disable
-on-access scanning in your antivirus, or configure it to ignore files under the
-Cygwin installation root. Often, unfortunately, this is not possible; even disabling
-the software may not work, since many applications that hook the operating system
-leave their hooks installed when disabled, and simply set them into what is intended
-to be a completely transparent pass-through mode. Sometimes this pass-through is not
-as transparent as all that, and the hooks still interfere with Cygwin; in these cases,
-it may be necessary to uninstall the software altogether to restore normal operation.
-</para>
-<para>Some of the symptoms you may experience are:</para>
-<para><itemizedlist>
-<listitem>
-<para>Random fork() failures.</para>
-<para>Caused by hook DLLs that load themselves into every process in the
-system. POSIX fork() semantics require that the memory map of the child process
-must be an exact duplicate of the parent process' layout. If one of these DLLs
-loads itself at a different base address in the child's memory space as compared
-to the address it was loaded at in the parent, it can end up taking the space that
-belonged to a different DLL in the parent. When Cygwin can't load the original
-DLL at that same address in the child, the fork() call has to fail.
-</para>
-</listitem>
-<listitem>
-<para>File access problems.</para>
-<para>Some programs (e.g., virus scanners with on-access scanning) scan or
-otherwise operate on every file accessed by all the other software running on
-your computer. In some cases they may retain an open handle on the file even
-after the software that is really using the file has closed it. This has been
-known to cause operations such as deletes, renames and moves to fail with
-access denied errors. In extreme cases it has been known for scanners to leak
-file handles, leading to kernel memory starvation.
-</para>
-</listitem>
-<listitem>
-<para>Networking issues</para>
-<para>Firewall software sometimes gets a bit funny about Cygwin. It's not
-currently understood why; Cygwin only uses the standard Winsock2 API, but
-perhaps in some less-commonly used fashion that doesn't get as well tested
-by the publishers of firewalls. Symptoms include mysterious failures to
-connect, or corruption of network data being sent or received.</para>
-</listitem>
-<listitem>
-<para>Memory and/or handle leaks</para>
-<para>Some applications that hook into the Windows operating system exhibit
-bugs when interacting with Cygwin that cause them to leak allocated memory
-or other system resources. Symptoms include complaints about out-of-memory
-errors and even virtual memory exhaustion dialog boxes from the O/S; it is
-often possible to see the excess memory allocation using a tool such as
-Task Manager or Sysinternals' Process Explorer, although interpreting the
-statistics they present is not always straightforward owing to complications
-such as virtual memory paging and file caching.</para>
-</listitem>
-</itemizedlist></para>
-</answer></qandaentry>
diff --git a/winsup/doc/faq-what.xml b/winsup/doc/faq-what.xml
deleted file mode 100644
index 64fbad0..0000000
--- a/winsup/doc/faq-what.xml
+++ /dev/null
@@ -1,158 +0,0 @@
-<!-- faq-what.xml -->
-<qandaentry id="faq.what">
-<question><para>What is it?</para></question>
-<answer>
-
-<para>The Cygwin tools are ports of the popular GNU development tools for
-Microsoft Windows. They run thanks to the Cygwin library which
-provides the UNIX system calls and environment these programs expect.
-</para>
-<para>With these tools installed, it is possible to write Win32 console or
-GUI applications that make use of the standard Microsoft Win32 API
-and/or the Cygwin API. As a result, it is possible to easily
-port many significant Unix programs without the need
-for extensive changes to the source code. This includes configuring
-and building most of the available GNU software (including the packages
-included with the Cygwin development tools themselves). Even if
-the development tools are of little to no use to you, you may have
-interest in the many standard Unix utilities provided with the package.
-They can be used both from the bash shell (provided) or from the
-standard Windows command shell.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.what.supported">
-<question><para>What versions of Windows are supported?</para></question>
-<answer>
-
-<para>Cygwin can be expected to run on all modern 32 bit versions of
-Windows, except Windows CE. This includes Windows 95/98/ME/NT/2000/XP/2003
-and the WOW64 32 bit environment on released 64 bit versions of Windows.
-As far as we know no one is working on a native 64 bit version of Cygwin.
-Since Cygwin is a community-supported free software project, patches to
-provide support for other versions would be thoughtfully considered.
-Paid support contracts or enhancements are available through Red Hat. For
-information about getting a Red Hat support contract, see
-<ulink url="http://cygwin.com/license.html" />.
-</para>
-<para>Keep in mind that Cygwin can only do as much as the underlying OS
-supports. Because of this, Cygwin will behave differently, and
-exhibit different limitations, on the various versions of Windows.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.what.where">
-<question><para>Where can I get it?</para></question>
-<answer>
-
-<para>The home page for the Cygwin project is <ulink url="http://cygwin.com/">http://cygwin.com/</ulink>.
-There you should find everything you need for Cygwin, including links
-for download and setup, a current list of mirror sites, a User's
-Guide, an API Reference, mailing lists and archives, and additional
-ported software.
-</para>
-<para>You can find documentation for the individual GNU tools at
-<ulink url="http://www.gnu.org/manual/" />. (You should read GNU manuals from a
-local mirror. Check <ulink url="http://www.gnu.org/server/list-mirrors.html" />
-for a list of them.)
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.what.free">
-<question><para>Is it free software?</para></question>
-<answer>
-
-<para>Yes. Parts are GNU software (gcc, gas, ld, etc...), parts are covered
-by the standard X11 license, some of it is public domain, some of
-it was written by Cygnus and placed under the GPL. None of it is
-shareware. You don't have to pay anyone to use it but you should be
-sure to read the copyright section of the FAQ for more information on
-how the GNU General Public License may affect your use of these tools.
-</para>
-<para>In particular, if you intend to port a proprietary (non-GPL'd)
-application using Cygwin, you will need the proprietary-use license
-for the Cygwin library. This is available for purchase; please visit
-<ulink url="http://cygwin.com/license.html" /> for more information.
-All other questions should be sent to the project
-mailing list cygwin@cygwin.com.
-</para>
-<para>Note that when we say "free" we mean freedom, not price. The goal of
-such freedom is that the people who use a given piece of software
-should be able to change it to fit their needs, learn from it, share
-it with their friends, etc. The Cygwin license allows you those
-freedoms, so it is free software.
-</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.what.version">
-<question><para>What version of Cygwin <emphasis>is</emphasis> this, anyway?</para></question>
-<answer>
-
-<para>To find the version of the Cygwin DLL installed, you can use
-<filename>uname</filename> as on Linux or <filename>cygcheck</filename>. Refer to each command's
-<literal>--help</literal> output and the <ulink url='http://cygwin.com/cygwin-ug-net/'>Cygwin User's Guide</ulink> for more information.
-</para>
-<para>If you are looking for the version number for the whole Cygwin
-release, there is none. Each package in the Cygwin release has its own
-version. The packages in Cygwin are continually improving, thanks to
-the efforts of net volunteers who maintain the Cygwin binary ports.
-Each package has its own version numbers and its own release process.
-</para>
-<para>So, how do you get the most up-to-date version of Cygwin? Easy. Just
-download the Cygwin Setup program from
-<ulink url='http://cygwin.com/setup.exe'>http://cygwin.com/setup.exe</ulink>. This program will handle the task
-of updating the packages on your system to the latest version. For
-more information about using Cygwin's <filename>setup.exe</filename>, see
-<ulink url='http://cygwin.com/cygwin-ug-net/setup-net.html'>Setting Up Cygwin</ulink>
-in the Cygwin User's Guide.
-</para></answer></qandaentry>
-
-<qandaentry id="faq.what.who">
-<question><para>Who's behind the project?</para></question>
-<answer>
-
-<para><emphasis role='bold'>(Please note that if you have cygwin-specific questions, all of these people will appreciate it if you use the cygwin mailing lists rather than sending personal email.)</emphasis>
-</para>
-<para>Chris Faylor provided the Cygwin signal handler code. He also maintains
-the <ulink url='http://sourceware.org'>sourceware site</ulink> where the
-cygwin project lives.</para>
-<para>Corinna Vinschen has contributed several useful fixes to the path
-handling code, console support, improved security handling, and raw
-device support. Corinna is currently employed by Red Hat as a
-GDB/Cygwin engineer.
-</para>
-<para>Steve Chamberlain designed and implemented
-Cygwin in 1995-1996 while working for Cygnus. He worked with the Net
-to improve the technology, ported/integrated many of the user tools
-for the first time to Cygwin, and produced all of the releases up to
-beta 14. Steve is not currently employed by Red Hat.
-</para>
-<para>Sergey Okhapkin has been an invaluable Net contributor. He implemented
-the tty/pty support, has played a significant role in revamping signal
-and exception handling, and has made countless contributions throughout
-the library. He also provided binaries of the development snapshots to
-the Net after the beta 19 release.
-</para>
-<para>Philippe Giacinti contributed the implementation of dlopen, dlclose,
-dlsym, dlfork, and dlerror in Cygwin.
-</para>
-<para>Ian Lance Taylor did a much-needed rework of the path handling code for
-beta 18, and has made many assorted fixes throughout the code. Jeremy
-Allison made significant contributions in the area of file handling and
-process control, and rewrote select from scratch. Doug Evans rewrote
-the path-handling code in beta 16, among other things. Kim Knuttila and
-Michael Meissner put in many long hours working on the now-defunct
-PowerPC port. Jason Molenda and Mark Eichin have also made important
-contributions.
-</para>
-<para>Please note that all of us working on Cygwin try to
-be as responsive as possible and deal with patches and questions as we
-get them, but realistically we don't have time to answer all of the
-email that is sent to the main mailing list. Making Net releases of the
-Win32 tools and helping people on the Net out is not our primary job
-function, so some email will have to go unanswered.
-</para>
-<para>Many thanks to everyone using the tools for their many contributions in
-the form of advice, bug reports, and code fixes. Keep them coming!
-</para></answer></qandaentry>
-
diff --git a/winsup/doc/faq.xml b/winsup/doc/faq.xml
deleted file mode 100644
index 6449121..0000000
--- a/winsup/doc/faq.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE article PUBLIC '-//OASIS//DTD DocBook XML V4.2//EN'
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
- <!-- see http://www.unicode.org/charts/PDF/U0080.pdf -->
- <!ENTITY pound "&#x00A3;">
- <!ENTITY brokenpipe "&#x00A6;">
-
- <!-- all the files -->
- <!ENTITY FAQ-WHAT SYSTEM "faq-what.xml">
- <!ENTITY FAQ-SETUP SYSTEM "faq-setup.xml">
- <!ENTITY FAQ-RESOURCES SYSTEM "faq-resources.xml">
- <!ENTITY FAQ-USING SYSTEM "faq-using.xml">
- <!ENTITY FAQ-API SYSTEM "faq-api.xml">
- <!ENTITY FAQ-PROGRAMMING SYSTEM "faq-programming.xml">
- <!ENTITY FAQ-PROBLEMS SYSTEM "faq-problems.xml">
-]>
-
-<article id="faq-nochunks" lang="en">
- <articleinfo>
- <title>Cygwin FAQ</title>
- </articleinfo>
-
-<qandaset>
-<?dbhtml toc="1"?>
-
-<qandadiv id="faq.about">
-<title>About Cygwin</title>
-&FAQ-WHAT;
-</qandadiv>
-
-<qandadiv id="faq.setup">
-<title>Setting up Cygwin</title>
-&FAQ-SETUP;
-</qandadiv>
-
-<qandadiv id="faq.resources">
-<title>Further Resources</title>
-&FAQ-RESOURCES;
-</qandadiv>
-
-<qandadiv id="faq.using">
-<title>Using Cygwin</title>
-&FAQ-USING;
-</qandadiv>
-
-<qandadiv id="faq.api">
-<title>Cygwin API Questions</title>
-&FAQ-API;
-</qandadiv>
-
-<qandadiv id="faq.programming">
-<title>Programming Questions</title>
-&FAQ-PROGRAMMING;
-</qandadiv>
-
-<qandadiv id="faq.known-problems">
-<title>Known Problems in the Latest Net Release</title>
-&FAQ-PROBLEMS;
-</qandadiv>
-
-<qandadiv id="faq.copyright">
-<title>Copyright</title>
-
-
-<qandaentry id="faq.what.copyright">
-<question><para>What are the copyrights?</para></question>
-<answer>
-
-<para>Please see
-<ulink url="http://cygwin.com/license.html" /> for more information
-about Cygwin copyright and licensing.
-</para>
-
-</answer></qandaentry>
-</qandadiv>
-</qandaset>
-
-</article>
diff --git a/winsup/doc/fhandler-tut.txt b/winsup/doc/fhandler-tut.txt
deleted file mode 100644
index 00a3b4b..0000000
--- a/winsup/doc/fhandler-tut.txt
+++ /dev/null
@@ -1,94 +0,0 @@
-fhandler tutorial
-
-This document will show how to add a new "fhandler" to cygwin, by
-showing an example of /dev/zero.
-
-Files to note:
-
-fhandler.h - must define a new derived class here and FH_*
-devices.in - to notice "/dev/zero" and mark it
-fhandler_zero.cc - new
-dtable.cc - to create the fhandler instance
-
-OK, first we have to define what this new fhandler will do. In our
-example case, we're going to implement the unix "/dev/zero" device,
-which has the following characteristics:
-
-* writes to /dev/zero are silently discarded
-* reads from /dev/zero return all zero bytes
-* mmap()ing /dev/zero maps a chunk of zero'd out memory.
-
-Since windows doesn't have a device that acts like this, we'll be
-simulating everything. Thus:
-
-* writes simply return a success status
-* reads memset() the buffer and return success
-* we take advantage of the fact that CreateFileMapping can take a
- handle of -1, which (1) maps swap memory, and (2) zeros it out for
- us (at least, on NT).
-
-OK, let's start with devices.h.
-
-We have to create a new entry in the enum fh_devices. The new
-devices must get a major and a minor ID. As a rule of thumb, just
-copy the ones that are used on a linux system.
-
-Now, let's continue with fhandler.h.
-
-First, update the fhandler_union near the end of the file with a
-line for the new device. Use existing members, in this case __dev_null
-as a template. This union is sorted alphabetically.
-
-Earlier in that file, we'll copy fhandler_dev_null and edit it to be
-fhandler_dev_zero. I chose that one because it's small, but we'll add
-more members as we go (since we're simulating the whole thing). In
-fact, let's copy the I/O methods from fhandler_windows since we'll
-need all those anyway, even though we'll go through the full list
-later.
-
-OK, next we need to edit devices.in. There is a section where each device
-is listed with its cygwin path, its structure and its windows path.
-"/dev/zero", FH_ZERO, "\\dev\\zero"
-This is needed to recognize when the user is trying to open "/dev/zero".
-You have to build devices.cc from devices.in now.
-There is a script 'gendevices' in the winsup/cygwin directory which may
-be called at some time in the future if you use 'make' to build the DLL.
-This should rebuild the devices.cc file. You have to have shilka
-available to do that; this is part of the cygwin cocom package.
-
-To go along with that change, we'll need to change dtable.cc. Look for
-FH_NULL and add a case for FH_ZERO as well.
-
-Now we get to fhandler_zero.cc itself. Create the empty file and copy
-the "usual" header/copyright/includes from some other fhandler_*.cc
-source file. Also, edit Makefile.in to build this new file. Add one
-new entry to DLL_OFILES, and a new line for the winsup.h dependencies.
-
-Since we changed fhandler.h, when you type "make" it will rebuild
-everything. Go ahead and do that when you get a chance to let it run,
-since we're not changing the headers any more. Note that you won't be
-able to link the new dll, as we haven't added all the methods for the
-new fhandler class yet, but at least you'll get a lot of compilation
-out of the way.
-
-Next we start adding in the fhandler methods themselves.
-
-Constructor: This takes a name, and all we do is pass that name back
-to the base class, along with the FH_ZERO value. We call set_cb
-because all fhandlers call this (it's for exec to copy the fd).
-
-open: we override the one that takes a name because there are no real
-windows devices like /dev/zero, but we ignore the name. We call
-set_flags to save the flags.
-
-write: writes are discarded; we return success.
-
-read: reads read NUL bytes, so fill the buffer with NULs and return
-success.
-
-lseek/close: just return success.
-
-dump: this is just for debugging, so we just print something.
-
-select_*: we don't support this yet, see the myriad examples in
-select.cc for examples. The base fhandler's methods will do for now.
diff --git a/winsup/doc/filemodes.sgml b/winsup/doc/filemodes.sgml
deleted file mode 100644
index 2a644db..0000000
--- a/winsup/doc/filemodes.sgml
+++ /dev/null
@@ -1,33 +0,0 @@
-<sect1 id="using-filemodes"><title>File permissions</title>
-
-<para>On FAT or FAT32 filesystems, files are always readable, and Cygwin
-uses the DOS read-only attribute to determine if they are writable. Files are
-considered to be executable if the filename ends with .bat, .com or .exe, or
-if its content starts with #!. Consequently <command>chmod</command> can
-only affect the "w" mode, it silently ignores actions involving the other
-modes. This means that <command>ls -l</command>
-needs to open and read files. It can thus be relatively slow.</para>
-
-<para>On NTFS, file permissions are evaluated using the Access Control
-Lists (ACLs) attached to a file. This can be switched off by using the
-"noacl" option to the respective mount point in the
-<filename>/etc/fstab</filename> or <filename>/etc/fstab.d/$USER</filename>
-file. For more information on file permissions, see
-
-<!-- TODO: Put the file permission stuff from ntsec here??? -->
-
-<xref linkend="ntsec"></xref>.
-</para>
-
-<!-- TODO -->
-
-<para>On NFS shares, file permissions are exactly the POSIX permissions
-transmitted from the server using the NFSv3 protocol, if the NFS client
-is the one from Microsoft's "Services For Unix", or the one built into
-Windows Vista or later.
-</para>
-
-<para>Only the user and group ownership is not necessarily correct.</para>
-
-</sect1>
-
diff --git a/winsup/doc/gcc.sgml b/winsup/doc/gcc.sgml
deleted file mode 100644
index 6a9d105..0000000
--- a/winsup/doc/gcc.sgml
+++ /dev/null
@@ -1,156 +0,0 @@
-<sect1 id="gcc"><title>Using GCC with Cygwin</title>
-
-<sect2 id="gcc-cons"><title>Console Mode Applications</title>
-
-<para>Use gcc to compile, just like under UNIX.
-Refer to the GCC User's Guide for information on standard usage and
-options. Here's a simple example:</para>
-
-<example id="gcc-hello-world">
-<title>Building Hello World with GCC</title>
-<screen>
-<prompt>bash$</prompt> <userinput>gcc hello.c -o hello.exe</userinput>
-<prompt>bash$</prompt> <userinput>hello.exe</userinput>
-Hello, World
-
-<prompt>bash$</prompt>
-</screen>
-</example>
-
-</sect2>
-
-<sect2 id="gcc-gui"><title>GUI Mode Applications</title>
-
-<para>Cygwin allows you to build programs with full access to the
-standard Windows 32-bit API, including the GUI functions as defined in
-any Microsoft or off-the-shelf publication. However, the process of
-building those applications is slightly different, as you'll be using
-the GNU tools instead of the Microsoft tools.</para>
-
-<para>For the most part, your sources won't need to change at all.
-However, you should remove all __export attributes from functions
-and replace them like this:</para>
-
-<screen>
-int foo (int) __attribute__ ((__dllexport__));
-
-int
-foo (int i)
-</screen>
-
-<para>The Makefile is similar to any other UNIX-like Makefile,
-and like any other Cygwin makefile. The only difference is that you use
-<command>gcc -mwindows</command> to link your program into a GUI
-application instead of a command-line application. Here's an example:</para>
-
-<screen>
-<![CDATA[
-myapp.exe : myapp.o myapp.res
- gcc -mwindows myapp.o myapp.res -o $@
-
-myapp.res : myapp.rc resource.h
- windres $< -O coff -o $@
-]]>
-</screen>
-
-<para>Note the use of <filename>windres</filename> to compile the
-Windows resources into a COFF-format <filename>.res</filename> file.
-That will include all the bitmaps, icons, and other resources you
-need, into one handy object file. Normally, if you omitted the "-O
-coff" it would create a Windows <filename>.res</filename> format file,
-but we can only link COFF objects. So, we tell
-<filename>windres</filename> to produce a COFF object, but for
-compatibility with the many examples that assume your linker can
-handle Windows resource files directly, we maintain the
-<filename>.res</filename> naming convention. For more information on
-<filename>windres</filename>, consult the Binutils manual. </para>
-
-<para>
-The following is a simple GUI-mode "Hello, World!" program to help
-get you started:
-<screen>
-/*-------------------------------------------------*/
-/* hellogui.c - gui hello world */
-/* build: gcc -mwindows hellogui.c -o hellogui.exe */
-/*-------------------------------------------------*/
-#include &lt;windows.h&gt;
-
-char glpszText[1024];
-
-LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
-
-int APIENTRY WinMain(HINSTANCE hInstance,
- HINSTANCE hPrevInstance,
- LPSTR lpCmdLine,
- int nCmdShow)
-{
- sprintf(glpszText,
- "Hello World\nGetCommandLine(): [%s]\n"
- "WinMain lpCmdLine: [%s]\n",
- lpCmdLine, GetCommandLine() );
-
- WNDCLASSEX wcex;
-
- wcex.cbSize = sizeof(wcex);
- wcex.style = CS_HREDRAW | CS_VREDRAW;
- wcex.lpfnWndProc = WndProc;
- wcex.cbClsExtra = 0;
- wcex.cbWndExtra = 0;
- wcex.hInstance = hInstance;
- wcex.hIcon = LoadIcon(NULL, IDI_APPLICATION);
- wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
- wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
- wcex.lpszMenuName = NULL;
- wcex.lpszClassName = "HELLO";
- wcex.hIconSm = NULL;
-
- if (!RegisterClassEx(&amp;wcex))
- return FALSE;
-
- HWND hWnd;
- hWnd = CreateWindow("HELLO", "Hello", WS_OVERLAPPEDWINDOW,
- CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL);
-
- if (!hWnd)
- return FALSE;
-
- ShowWindow(hWnd, nCmdShow);
- UpdateWindow(hWnd);
-
- MSG msg;
- while (GetMessage(&amp;msg, NULL, 0, 0))
- {
- TranslateMessage(&amp;msg);
- DispatchMessage(&amp;msg);
- }
-
- return msg.wParam;
-}
-
-LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
- PAINTSTRUCT ps;
- HDC hdc;
-
- switch (message)
- {
- case WM_PAINT:
- hdc = BeginPaint(hWnd, &amp;ps);
- RECT rt;
- GetClientRect(hWnd, &amp;rt);
- DrawText(hdc, glpszText, strlen(glpszText), &amp;rt, DT_TOP | DT_LEFT);
- EndPaint(hWnd, &amp;ps);
- break;
- case WM_DESTROY:
- PostQuitMessage(0);
- break;
- default:
- return DefWindowProc(hWnd, message, wParam, lParam);
- }
- return 0;
-}
-</screen>
-</para>
-
-</sect2>
-</sect1>
diff --git a/winsup/doc/gdb.sgml b/winsup/doc/gdb.sgml
deleted file mode 100644
index 2a13e2b..0000000
--- a/winsup/doc/gdb.sgml
+++ /dev/null
@@ -1,88 +0,0 @@
-
-<sect1 id="gdb"><title>Debugging Cygwin Programs</title>
-
-<para>When your program doesn't work right, it usually has a "bug" in
-it, meaning there's something wrong with the program itself that is
-causing unexpected results or crashes. Diagnosing these bugs and
-fixing them is made easy by special tools called
-<emphasis>debuggers</emphasis>. In the case of Cygwin, the debugger
-is GDB, which stands for "GNU DeBugger". This tool lets you run your
-program in a controlled environment where you can investigate the
-state of your program while it is running or after it crashes.
-Crashing programs sometimes create "core" files. In Cygwin these are
-regular text files that cannot be used directly by GDB.
-</para>
-
-<para>Before you can debug your program, you need to prepare your
-program for debugging. What you need to do is add
-<literal>-g</literal> to all the other flags you use when compiling
-your sources to objects.</para>
-
-<example id="gdb-g"><title>Compiling with -g</title>
-<screen>
-<prompt>bash$</prompt> gcc -g -O2 -c myapp.c
-<prompt>bash$</prompt> gcc -g myapp.c -o myapp
-</screen>
-</example>
-
-<para>What this does is add extra information to the objects (they get
-much bigger too) that tell the debugger about line numbers, variable
-names, and other useful things. These extra symbols and debugging
-information give your program enough information about the original
-sources so that the debugger can make debugging much easier for
-you.</para>
-
-<para>In Windows versions of GNUPro, GDB comes with a full-featured
-graphical interface. In Cygwin Net distributions, GDB is only
-available as a command-line tool. To invoke GDB, simply type
-<command>gdb myapp.exe</command> at the command prompt. It will
-display some text telling you about itself, then
-<literal>(gdb)</literal> will appear to prompt you to enter commands.
-Whenever you see this prompt, it means that gdb is waiting for you to
-type in a command, like <command>run</command> or
-<command>help</command>. Oh <literal>:-)</literal> type
-<command>help</command> to get help on the commands you can type in,
-or read the <citation>GDB User's Manual</citation> for a complete
-description of GDB and how to use it.</para>
-
-<para>If your program crashes and you're trying to figure out why it
-crashed, the best thing to do is type <command>run</command> and let
-your program run. After it crashes, you can type
-<command>where</command> to find out where it crashed, or
-<command>info locals</command> to see the values of all the local
-variables. There's also a <command>print</command> that lets you look
-at individual variables or what pointers point to.</para>
-
-<para>If your program is doing something unexpected, you can use the
-<command>break</command> command to tell gdb to stop your program when it
-gets to a specific function or line number:</para>
-
-<example id="gdb-break"><title>"break" in gdb</title>
-<screen>
-<prompt>(gdb)</prompt> break my_function
-<prompt>(gdb)</prompt> break 47
-</screen>
-</example>
-
-<para>Now, when you type <command>run</command> your program will stop
-at that "breakpoint" and you can use the other gdb commands to look at
-the state of your program at that point, modify variables, and
-<command>step</command> through your program's statements one at a
-time.</para>
-
-<para>Note that you may specify additional arguments to the
-<command>run</command> command to provide command-line arguments to
-your program. These two cases are the same as far as your program is
-concerned:</para>
-
-<example id="gdb-cliargs"><title>Debugging with command line arguments</title>
-<screen>
-<prompt>bash$</prompt> myprog -t foo --queue 47
-
-<prompt>bash$</prompt> gdb myprog
-<prompt>(gdb)</prompt> run -t foo --queue 47
-</screen>
-</example>
-
-
-</sect1>
diff --git a/winsup/doc/legal.sgml b/winsup/doc/legal.sgml
deleted file mode 100644
index 80f4046..0000000
--- a/winsup/doc/legal.sgml
+++ /dev/null
@@ -1,30 +0,0 @@
-<legalnotice id="legal">
-
-<para>Copyright &copy; 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Red Hat, Inc.</para>
-
-<!--
-
-<para>GNUPro&trade;, the GNUPro&trade; logo, and the Red Hat
-logo are trademarks of Red Hat, Inc. All other brand and product
-names are trademarks of their respective owners.</para>
-
-<para>Permission is granted to make and distribute verbatim copies of
-this documentation provided the copyright notice and this permission
-notice are preserved on all copies.</para>
-
-<para>Permission is granted to copy and distribute modified versions
-of this documentation under the conditions for verbatim copying,
-provided that the entire resulting derived work is distributed under
-the terms of a permission notice identical to this one.</para>
-
-<para>Permission is granted to copy and distribute translations of
-this documentation into another language, under the above conditions
-for modified versions, except that this permission notice may be
-stated in a translation approved by the Free Software
-Foundation.</para>
-
-<para>This documentation has been prepared by Red Hat, Inc.
-Technical Publications.</para>
--->
-
-</legalnotice>
diff --git a/winsup/doc/ntsec.sgml b/winsup/doc/ntsec.sgml
deleted file mode 100644
index 61059a9..0000000
--- a/winsup/doc/ntsec.sgml
+++ /dev/null
@@ -1,899 +0,0 @@
-<sect1 id="ntsec"><title>Using Windows security in Cygwin</title>
-
-<para>This section discusses how the Windows security model is
-utilized in Cygwin to implement POSIX-like permissions, as well as how
-the Windows authentication model is used to allow cygwin applications
-to switch users in a POSIX-like fashion.</para>
-
-<para>The setting of POSIX-like file and directory permissions is
-controlled by the <link linkend="mount-table">mount</link> option
-<literal>(no)acl</literal> which is set to <literal>acl</literal> by
-default.</para>
-
-<para>We start with a short overview. Note that this overview must
-be necessarily short. If you want to learn more about the Windows security
-model, see the <ulink url="http://msdn.microsoft.com/en-us/library/aa374860(VS.85).aspx">Access Control</ulink> article in MSDN documentation.</para>
-
-<para>POSIX concepts and specificially the POSIX security model are not
-discussed here, but assumed to be understood by the reader. If you
-don't know the POSIX security model, search the web for beginner
-documentation.</para>
-
-<sect2 id="ntsec-common"><title>Overview</title>
-
-<para>In the Windows security model, almost any "object" is securable.
-"Objects" are files, processes, threads, semaphores, etc.</para>
-
-<para>Every object has a data structure attached, called a "security
-descriptor" (SD). The SD contains all information necessary to control
-who can access an object, and to determine what they are allowed to do
-to or with it. The SD of an object consists of five parts:</para>
-
-<itemizedlist spacing="compact">
-<listitem><para>Flags which control several aspects of this SD. This is
-not discussed here.</para></listitem>
-<listitem><para>The SID of the object owner.</para></listitem>
-<listitem><para>The SID of the object owner group.</para></listitem>
-<listitem><para>A list of "Access Control Entries" (ACE), called the
-"Discretionary Access Control List" (DACL).</para></listitem>
-<listitem><para>Another list of ACEs, called the "Security Access Control List"
-(SACL), which doesn't matter for our purpose. We ignore it here.</para></listitem>
-</itemizedlist>
-
-<para>Every ACE contains a so-called "Security IDentifier" (SID) and
-other stuff which is explained a bit later. Let's talk about the SID first.
-</para>
-
-<para>A SID is a unique identifier for users, groups, computers and
-Active Directory (AD) domains. SIDs are basically comparable to POSIX
-user ids (UIDs) and group ids (GIDs), but are more complicated because
-they are unique across multiple machines or domains. A SID is a
-structure of multiple numerical values. There's a convenient convention
-to type SIDs, as a string of numerical fields separated by hyphen
-characters. Here's an example:</para>
-
-<para>SID of a machine "foo":</para>
-
-<screen>
- S-1-5-21-165875785-1005667432-441284377
-</screen>
-
-<para>SID of a user "johndoe" of the system "foo":</para>
-
-<screen>
- S-1-5-21-165875785-1005667432-441284377-1023
-</screen>
-
-<para>The first field is always "S", which is just a notational convention
-to show that this is a SID. The second field is the version number of
-the SID structure, So far there exists only one version of SIDs, so this
-field is always 1. The third and fourth fields represent the "authority"
-which can be thought of as a type or category of SIDs. There are a
-couple of builtin accounts and accounts with very special meaning which
-have certain well known values in these third and fourth fields.
-However, computer and domain SIDs always start with "S-1-5-21". The
-next three fields, all 32 bit values, represent the unique 96 bit
-identifier of the computer system. This is a hopefully unique value all
-over the world, but in practice it's sufficient if the computer SIDs are
-unique within a single Windows network.</para>
-
-<para>As you can see in the above example, SIDs of users (and groups)
-are identical to the computer SID, except for an additional part, the
-so-called "relative identifier" (RID). So the SID of a user is always
-uniquely attached to the system on which the account has been generated.</para>
-
-<para>It's a bit different in domains. The domain has its own SID, and
-that SID is identical to the SID of the first domain controller, on
-which the domain is created. Domain user SIDs look exactly like the
-computer user SIDs, the leading part is just the domain SID and the RID
-is created when the user is created.</para>
-
-<para>Ok, consider you created a new domain "bar" on some new domain
-controller and you would like to create a domain account "johndoe":</para>
-
-<para>SID of a domain "bar.local":</para>
-
-<screen>
- S-1-5-21-186985262-1144665072-740312968
-</screen>
-
-<para>SID of a user "johndoe" in the domain "bar.local":</para>
-
-<screen>
- S-1-5-21-186985262-1144665072-740312968-1207
-</screen>
-
-<para>So you now have two accounts called johndoe, one account
-created on the machine "foo", one created in the domain "bar.local".
-Both have different SIDs and not even the RID is the same. How do
-the systems know it's the same account? After all, the name is
-the same, right? The answer is, these accounts are <emphasis
-role='bold'>not</emphasis> identical. All machines on the network will
-treat these SIDs as identifying two separate accounts. One is
-"FOO\johndoe", the other one is "BAR\johndoe" or "johndoe@bar.local".
-Different SID, different account. Full stop. </para>
-
-<para>The last part of the SID, the so called "Relative IDentifier" (RID),
-is by default used as UID and/or GID under Cygwin when you create the
-<filename>/etc/passwd</filename> and <filename>/etc/group</filename>
-files using the <command><link linkend="mkpasswd">mkpasswd</link></command> and <command><link linkend="mkgroup">mkgroup</link></command>
-tools. Domain account UIDs and GIDs are offset by 10000 by default
-which might be a bit low for very big organizations. Fortunately there's
-an option in both tools to change the offset...</para>
-
-<para>Do you still remember the SIDs with special meaning? In offical
-notation they are called "well-known SIDs". For example, POSIX has no GID
-for the group of "all users" or "world" or "others". The last three rwx
-bits in a unix-style permission value just represent the permissions for
-"everyone who is not the owner or is member of the owning group".
-Windows has a SID for these poor souls, the "Everyone" SID. Other
-well-known SIDs represent circumstances under which a process is
-running, rather than actual users or groups. Here are a few examples
-for well-known SIDs:</para>
-
-<screen>
-Everyone S-1-1-0 Simply everyone...
-Batch S-1-5-3 Processes started via the task
- scheduler are member of this group.
-Interactive S-1-5-4 Only processes of users which are
- logged in via an interactive
- session are members here.
-Authenticated Users S-1-5-11 Users which have gone through
- the authentication process and
- survived. Anonymously accessing
- users are not incuded here.
-SYSTEM S-1-5-18 A special account which has all
- kinds of dangerous rights, sort of
- an uber-root account.
-</screen>
-
-<para>For a full list please refer to the MSDN document <ulink
-url="http://msdn.microsoft.com/en-us/library/aa379649.aspx">Well-known
-SIDs</ulink>. The Cygwin package called "csih" provides a tool,
-/usr/lib/csih/getAccountName.exe, which can be used to print the
-(possibly localized) name for the various well-known SIDS.</para>
-
-<para>Naturally well-known SIDs are the same on each machine, so they are
-not unique to a machine or domain. They have the same meaning across
-the Windows network.</para>
-
-<para>Additionally there are a couple of well-known builtin groups,
-which have the same SID on every machine and which have certain user
-rights by default:</para>
-
-<screen>
-administrators S-1-5-32-544
-users S-1-5-32-545
-guests S-1-5-32-546
-...
-</screen>
-
-<para>For instance, every account is usually member in the "Users"
-group. All administrator accounts are member of the "Administrators"
-group. That's all about it as far as single machines are involved. In
-a domain environment it's a bit more tricky. Since these SIDs are not
-unique to a machine, every domain user and every domain group can be a
-member of these well known groups. Consider the domain group "Domain
-Admins". This group is by default in the "Administrators" group. Let's
-assume the above computer called "foo" is a member machine of the domain
-"bar.local". If you stick the user "BAR\johndoe" into the group "Domain
-Admins", this guy will automatically be a member of the administrators
-group on "foo" when logging on to "foo". Neat, isn't it?</para>
-
-<para>Back to ACE and ACL. POSIX is able to create three different
-permissions, the permissions for the owner, for the group and for the
-world. In contrast the Windows ACL has a potentially infinite number of
-members... as long as they fit into 64K. Every member is an ACE.
-ACE consist of three parts:</para>
-
-<itemizedlist spacing="compact">
-<listitem><para>The type of the ACE (allow ACE or deny ACE).</para></listitem>
-<listitem><para>Permission bits, 32 of them.</para></listitem>
-<listitem><para>The SID for which the permissions are allowed or denied.</para></listitem>
-</itemizedlist>
-
-<para>The two (for us) important types of ACEs are the "access allowed
-ACE" and the "access denied ACE". As the names imply, the allow ACE
-tells the system to allow the given permissions to the SID, the deny ACE
-results in denying the specific permission bits.</para>
-
-<para>The possible permissions on objects are more detailed than in
-POSIX. For example, the permission to delete an object is different
-from the permission to change object data, and even changing object data
-can be separated into different permission bits for different kind of
-data. But there's a problem with the definition of a "correct" ACL
-which disallows to map certain POSIX permissions cleanly. See
-<xref linkend="ntsec-mapping"></xref>.</para>
-
-<para>POSIX is able to create only three different permissions? Not quite.
-Newer operating systems and file systems on POSIX systems also provide
-access control lists. Two different APIs exist for accessing these
-ACLs, the Solaris API and the POSIX API. Cygwin implements the Solaris
-API to access Windows ACLs in a Unixy way. At the time of writing this
-document, the Cygwin implementation of the Solaris API isn't quite up
-to speed. For instance, it doesn't handle access denied ACEs gracefully.
-So, use with care. Online man pages for the Solaris ACL API can be
-found on <ulink url="http://docs.sun.com">http://docs.sun.com</ulink>.</para>
-
-</sect2>
-
-<sect2 id="ntsec-files"><title id="ntsec-files.title">File permissions</title>
-
-<para>On NTFS and if the <literal>noacl</literal> mount option is not
-specified for a mount point, Cygwin sets file permissions as in POSIX.
-Basically this is done by defining a SD with the matching owner and group
-SIDs, and a DACL which contains ACEs for the owner, the group and for
-"Everyone", which represents what POSIX calls "others".</para>
-
-<para>To use Windows security correctly, Cygwin depends on the files
-<filename>/etc/passwd</filename> and <filename>/etc/group</filename>.
-These files define the translation between the Cygwin uid/gid and the
-Windows SID. The SID is stored in the pw_gecos field in
-<filename>/etc/passwd</filename>, and in the gr_passwd field in
-<filename>/etc/group</filename>. Since the pw_gecos field can contain
-more information than just a SID, there are some rules for the layout.
-It's required that the SID is the last entry of the pw_gecos field,
-assuming that the entries in pw_gecos are comma-separated. The
-commands <command>mkpasswd</command> and <command>mkgroup</command>
-usually do this for you.</para>
-
-<para>Another interesting entry in the pw_gecos field (which is also
-usually created by running <command>mkpasswd</command>) is the Windows user
-name entry. It takes the form "U-domain\username" and is sometimes used
-by services to authenticate a user. Logging in through
-<command>telnet</command> is a common scenario.</para>
-
-<para>A typical snippet from <filename>/etc/passwd</filename>:</para>
-
-<example id="ntsec-passwd">
-<title>/etc/passwd:</title>
-<screen>
-SYSTEM:*:18:544:,S-1-5-18::
-Administrators:*:544:544:,S-1-5-32-544::
-Administrator:unused:500:513:U-FOO\Administrator,S-1-5-21-790525478-115176313-839522115-500:/home/Administrator:/bin/bash
-corinna:unused:11001:11125:U-BAR\corinna,S-1-5-21-2913048732-1697188782-3448811101-1001:/home/corinna:/bin/tcsh
-</screen>
-</example>
-
-<para>The SYSTEM entry is usually needed by services. The Administrators
-entry (Huh? A group in /etc/passwd?) is only here to allow
-<command>ls</command> and similar commands to print some file ownerships
-correctly. Windows doesn't care if the owner of a file is a user or a
-group. In older versions of Windows NT the default ownership for files
-created by an administrator account was set to the group Administrators
-instead of to the creating user account. This has changed, but you can
-still switch to this setting on newer systems. So it's convenient to
-have the Administrators group in
-<filename>/etc/passwd</filename>.</para>
-
-<para>The really interesting entries are the next two. The Administrator
-entry is for the local administrator, the corinna entry matches the corinna
-account in the domain BAR. The information given in the pw_gecos field
-are all we need to exactly identify an account, and to have a two way
-translation, from Windows account name/SID to Cygwin account name uid and
-vice versa. Having this complete information allows us to choose a Cygwin
-user name and uid which doesn't have to match the Windows account at all. As
-long as the pw_gecos information is available, we're on the safe side:</para>
-
-<example id="ntsec-passwd-tweaked">
-<title>/etc/passwd, tweaked:</title>
-<screen>
-root:unused:0:513:U-FOO\Administrator,S-1-5-21-790525478-115176313-839522115-500:/home/Administrator:/bin/bash
-thursday_next:unused:11001:11125:U-BAR\corinna,S-1-5-21-2913048732-1697188782-3448811101-1001:/home/corinna:/bin/tcsh
-</screen>
-</example>
-
-<para> The above <filename>/etc/passwd</filename> will still work fine.
-You can now login via <command>ssh</command> as the user "root", and
-Cygwin dutifully translates "root" into the Windows user
-"FOO\Administrator" and files owned by FOO\Administrator are shown to
-have the uid 0 when calling <command>ls -ln</command>. All you do you're
-actually doing as Administrator. Files created as root will be owned by
-FOO\Administrator. And the domain user BAR\corinna can now happily
-pretend to be Thursday Next, but will wake up sooner or later finding
-out she's still actually the domain user BAR\corinna...</para>
-
-<para>Do I have to mention that you can also rename groups in
-<filename>/etc/group</filename>? As long as the SID is present and correct,
-all is well. This allows for instance to rename the "Administrators" group
-to "root" as well:</para>
-
-<example id="ntsec-group-tweaked">
-<title>/etc/group, tweaked:</title>
-<screen>
-root:S-1-5-32-544:544:
-</screen>
-</example>
-
-<para>Last but not least you can also change the primary group of a user
-in <filename>/etc/passwd</filename>. The only requirement is that the user
-is actually a member of the new primary group in Windows. For instance,
-normal users in a domain environment are members in the group "Domain Users",
-which in turn is member of the well-known group "Users". So, if it's
-more feasible in your environment that the user's primary group is
-"Users", just set the user's primary group in <filename>/etc/passwd</filename>
-to the Cygwin uid of "Users" (see in <filename>/etc/group</filename>,
-default 545) and let the user create files with a default group ownership
-of "Users".</para>
-
-<para>However, here's a WARNING: If you want to do similar changes to
-your files, please do that only if you're feeling comfortable with the
-concepts. Otherwise don't be surprised if some stuff doesn't work
-anymore. If you screwed up things, revert to <filename>/etc/passwd</filename>
-and <filename>/etc/group</filename> files created by mkpasswd
-and mkgroup. Especially don't change the UID or the name of user
-SYSTEM. Even if that works mostly, some Cygwin applications running as
-local service under that account could suddenly start behaving
-strangely.</para>
-
-</sect2>
-
-<sect2 id="ntsec-ids"><title id="ntsec-ids.title">Special values of user and group ids</title>
-
-<para>If the current user is not present in
-<filename>/etc/passwd</filename>, that user's uid is set to a
-special value of 400. The user name for the current user will always be
-shown correctly. If another user (or a Windows group, treated as a
-user) is not present in <filename>/etc/passwd</filename>, the uid of
-that user will have a special value of -1 (which would be shown by
-<command>ls</command> as 65535). The user name shown in this case will
-be '????????'.</para>
-
-<para>If the current user is not present in
-<filename>/etc/passwd</filename>, that user's login gid is set to a
-special value of 401. The gid 401 is shown as 'mkpasswd',
-indicating the command that should be run to alleviate the
-situation.</para>
-
-<para>If another user is not present in
-<filename>/etc/passwd</filename>, that user's login gid is set to a
-special value of -1. If the user is present in
-<filename>/etc/passwd</filename>, but that user's group is not in
-<filename>/etc/group</filename> and is not the login group of that user,
-the gid is set to a special value of -1. The name of this group
-(id -1) will be shown as '????????'.</para>
-
-<para>If the current user is present in
-<filename>/etc/passwd</filename>, but that user's login group is not
-present in <filename>/etc/group</filename>, the group name will be shown
-as 'mkgroup', again indicating the appropriate command.</para>
-
-<para>A special case is if the current user's primary group SID is noted
-in the user's <filename>/etc/passwd</filename> entry using another group
-id than the group entry of the same group SID in
-<filename>/etc/group</filename>. This should be noted and corrected.
-The group name printed in this case is
-'passwd/group_GID_clash(PPP/GGG)', with PPP being the gid as noted
-in <filename>/etc/passwd</filename> and GGG the gid as noted in
-<filename>/etc/group</filename>.</para>
-
-<para>To summarize:</para>
-<itemizedlist spacing="compact">
-
-<listitem><para>If the current user doesn't show up in
-<filename>/etc/passwd</filename>, it's <emphasis>group</emphasis> will
-be named 'mkpasswd'.</para></listitem>
-
-<listitem><para>Otherwise, if the login group of the current user isn't
-in <filename>/etc/group</filename>, it will be named 'mkgroup'.</para>
-</listitem>
-
-<listitem><para>Otherwise a group not in <filename>/etc/group</filename>
-will be shown as '????????' and a user not in
-<filename>/etc/passwd</filename> will be shown as "????????".</para>
-</listitem>
-
-<listitem><para>If different group ids are used for a group with the same
-SID, the group name is shown as 'passwd/group_GID_clash(PPP/GGG)' with
-PPP and GGG being the different group ids.</para></listitem>
-
-</itemizedlist>
-
-<para>
-Note that, since the special user and group names are just indicators,
-nothing prevents you from actually having a user named `mkpasswd' in
-<filename>/etc/passwd</filename> (or a group named `mkgroup' in
-<filename>/etc/group</filename>). If you do that, however, be aware of
-the possible confusion.
-</para>
-
-</sect2>
-
-
-<sect2 id="ntsec-mapping"><title id="ntsec-mapping.title">The POSIX permission mapping leak</title>
-
-<para>As promised earlier, here's the problem when trying to map the
-POSIX permission model on the Windows permission model.</para>
-
-<para>There's a leak in the definition of a "correct" ACL which
-disallows a certain POSIX permission setting. The official
-documentation explains in short the following:</para>
-
-<itemizedlist spacing="compact">
-<listitem><para>The requested permissions are checked against all
-ACEs of the user as well as all groups the user is member of. The
-permissions given in these user and groups access allowed ACEs are
-accumulated and the resulting set is the set of permissions of that
-user given for that object.</para></listitem>
-
-<listitem><para>The order of ACEs is important. The system reads them in
-sequence until either any single requested permission is denied or all
-requested permissions are granted. Reading stops when this condition is
-met. Later ACEs are not taken into account.</para></listitem>
-
-<listitem><para>All access denied ACEs <emphasis
-role='bold'>should</emphasis> precede any access allowed ACE. ACLs
-following this rule are called "canonical"</para></listitem>
-</itemizedlist>
-
-<para>Note that the last rule is a preference or a definition of
-correctness. It's not an absolute requirement. All Windows kernels
-will correctly deal with the ACL regardless of the order of allow and
-deny ACEs. The second rule is not modified to get the ACEs in the
-preferred order.</para>
-
-<para>Unfortunately the security tab in the file properties dialog of
-the Windows NT4 explorer is completely unable to deal with access denied ACEs
-while the Windows 2000 and later properties dialog rearranges the order of the
-ACEs to canonical order before you can read them. Thank God, the sort
-order remains unchanged if one presses the Cancel button. But don't
-even <emphasis role='bold'>think</emphasis> of pressing OK...</para>
-
-<para>Canonical ACLs are unable to reflect each possible combination
-of POSIX permissions. Example:</para>
-
-<screen>
-rw-r-xrw-
-</screen>
-
-<para>Ok, so here's the first try to create a matching ACL, assuming
-the Windows permissions only have three bits, as their POSIX pendants:</para>
-
-<screen>
-UserAllow: 110
-GroupAllow: 101
-OthersAllow: 110
-</screen>
-
-<para>Hmm, because of the accumulation of allow rights the user may
-execute because the group may execute.</para>
-
-<para>Second try:</para>
-
-<screen>
-UserDeny: 001
-GroupAllow: 101
-OthersAllow: 110
-</screen>
-
-<para>Now the user may read and write but not execute. Better? No!
-Unfortunately the group may write now because others may write.</para>
-
-<para>Third try:</para>
-
-<screen>
-UserDeny: 001
-GroupDeny: 010
-GroupAllow: 001
-OthersAllow: 110
-</screen>
-
-<para>Now the group may not write as intended but unfortunately the user may
-not write anymore, either. How should this problem be solved? According to
-the canonical order a UserAllow has to follow the GroupDeny but it's
-easy to see that this can never be solved that way.</para>
-
-<para>The only chance:</para>
-
-<screen>
-UserDeny: 001
-UserAllow: 010
-GroupDeny: 010
-GroupAllow: 001
-OthersAllow: 110
-</screen>
-
-<para>Again: This works on all existing versions of Windows NT, at the
-time of writing from at least NT4 up to Server 2008. Only the GUIs
-aren't able (or willing) to deal with that order.</para>
-
-</sect2>
-
-<sect2 id="ntsec-setuid-overview"><title id="ntsec-setuid-overview.title">Switching the user context</title>
-
-<para>Since Windows XP, Windows users have been accustomed to the
-"Switch User" feature, which switches the entire desktop to another user
-while leaving the original user's desktop "suspended". Another Windows
-feature (since Windows 2000) is the "Run as..." context menu entry,
-which allows to start an application using another user account when
-right-clicking on applications and shortcuts.</para>
-
-<para>On POSIX systems, this operation can be performed by processes
-running under the privileged user accounts (usually the "root" user
-account) on a per-process basis. This is called "switching the user
-context" for that process, and is performed using the POSIX
-<command>setuid</command> and <command>seteuid</command> system
-calls.</para>
-
-<para>While this sort of feature is available on Windows as well,
-Windows does not support the concept of these calls in a simple fashion.
-Switching the user context in Windows is generally a tricky process with
-lots of "behind the scenes" magic involved.</para>
-
-<para>Windows uses so-called `access tokens' to identify a user and its
-permissions. Usually the access token is created at logon time and then
-it's attached to the starting process. Every new process within a session
-inherits the access token from its parent process. Every thread can
-get its own access token, which allows, for instance, to define threads
-with restricted permissions.</para>
-
-</sect2>
-
-<sect2 id="ntsec-logonuser"><title id="ntsec-logonuser.title">Switching the user context with password authentication</title>
-
-<para>To switch the user context the process has to request such an access
-token for the new user. This is typically done by calling the Win32 API
-function <command>LogonUser</command> with the user name and the user's
-cleartext password as arguments. If the user exists and the password was
-specified correctly, the access token is returned and either used in
-<command>ImpersonateLoggedOnUser</command> to change the user context of
-the current thread, or in <command>CreateProcessAsUser</command> to
-change the user context of a spawned child process.</para>
-
-<para>Later versions of Windows define new functions in this context and
-there are also functions to manipulate existing access tokens (usually
-only to restrict them). Windows Vista also adds subtokens which are
-attached to other access tokens which plays an important role in the UAC
-(User Access Control) facility of Vista and later. However, none of
-these extensions to the original concept are important for this
-documentation.</para>
-
-<para>Back to this logon with password, how can this be used to
-implement <command>set(e)uid</command>? Well, it requires to patch the
-calling application. Two Cygwin functions have been introduced to support
-porting <command>setuid</command> applications which only require login
-with passwords. You only give Cygwin the right access token and then
-you can call <command>seteuid</command> or <command>setuid</command> as
-usual in POSIX applications. Porting such a <command>setuid</command>
-application is illustrated by a short example:</para>
-
-<screen>
-<![CDATA[
-/* First include all needed cygwin stuff. */
-#ifdef __CYGWIN__
-#include <windows.h>
-#include <sys/cygwin.h>
-#endif
-
-[...]
-
- struct passwd *user_pwd_entry = getpwnam (username);
- char *cleartext_password = getpass ("Password:");
-
-[...]
-
-#ifdef __CYGWIN__
- /* Patch the typical password test. */
- {
- HANDLE token;
-
- /* Try to get the access token from Windows. */
- token = cygwin_logon_user (user_pwd_entry, cleartext_password);
- if (token == INVALID_HANDLE_VALUE)
- error_exit;
- /* Inform Cygwin about the new impersonation token. */
- cygwin_set_impersonation_token (token);
- /* Cygwin is now able, to switch to that user context by setuid or seteuid calls. */
- }
-#else
- /* Use standard method on non-Cygwin systems. */
- hashed_password = crypt (cleartext_password, salt);
- if (!user_pwd_entry ||
- strcmp (hashed_password, user_pwd_entry->pw_password))
- error_exit;
-#endif /* CYGWIN */
-
-[...]
-
- /* Everything else remains the same! */
-
- setegid (user_pwd_entry->pw_gid);
- seteuid (user_pwd_entry->pw_uid);
- execl ("/bin/sh", ...);
-]]>
-
-</screen>
-
-</sect2>
-
-<sect2 id="ntsec-nopasswd1"><title id="ntsec-nopasswd1.title">Switching the user context without password, Method 1: Create a token from scratch</title>
-
-<para>So far unfortunate for the implementation of a
-<command>set(e)uid</command> call is the fact that the calling process
-needs the password of the user it wants to switch to. Applications like
-<command>sshd</command> wishing to switch the user context after a
-successful public key authentication, or <command>cron</command> which
-has to switch the user without any authentication are stuck here. But
-there are other ways to get new user tokens.</para>
-
-<para>One way is just to create a user token from scratch. This is
-accomplished by using an (officially undocumented) function on the NT
-function level. The NT function level is closer to the actual kernel
-than the Win32 level. Actually the Win32 functions are implemented
-using the NT functions. The function we're interested in is
-<command>NtCreateToken</command>. This function allows to specify
-user, groups, permissions and almost everything you need to create
-a user token, without the need to specify the user password. The
-only restriction for using this function is that the calling process
-needs the "Create a token object" user right, which only the
-SYSTEM user account has by default, and which is considered the most
-dangerous right a user can have on Windows systems.</para>
-
-<para>That sounds good. We just start the servers which have to switch
-the user context (<command>sshd</command>, <command>inetd</command>,
-<command>cron</command>, ...) as Windows services under the SYSTEM
-(or LocalSystem in the GUI) account and everything just works.
-Unfortunately that's too simple. Using <command>NtCreateToken</command>
-has a few drawbacks.</para>
-
-<para>First of all, beginning with Windows Server 2003,
-the permission "Create a token object" gets explicitely removed from
-the SYSTEM user's access token, when starting services under that
-account. That requires to create a new account with this specific
-permission just to run this kind of services. But that's a minor
-problem.</para>
-
-<para>A more important problem is that using <command>NtCreateToken</command>
-is not sufficient to create a new logon session for the new user. What
-does that mean? Every logon usually creates also a new logon session.
-A logon session has a couple of attributes which are unique to the
-session. One of these attributes is the fact, that Windows functions
-identify the user domain and user name not by the SID of the access
-token owner, but only by the logon session the process is running under.</para>
-
-<para>What that means is this. Consider a service started under the
-SYSTEM account (up to Windows XP) switches the user context to
-DOMAIN\my_user using a token created directly by calling the
-<command>NtCreateToken</command> function. A process running under this
-new access token might want to know under which user account it's
-running. The corresponding SID is returned correctly, for instance
-S-1-5-21-1234-5678-9012-77777. However, if the same process asks the OS
-for the user name of this SID something wierd happens. For instance,
-the <command>LookupAccountSid</command> function will not return
-"DOMAIN\my_user", but "NT AUTHORITY\SYSTEM" as the user name.</para>
-
-<para>You might ask "So what?" After all, this only <emphasis
-role='bold'>looks</emphasis> bad, but functionality and permission-wise
-everything should be ok. And Cygwin knows about this shortcoming so it
-will return the correct Cygwin username when asked. Unfortunately this
-is more complicated. Some native, non-Cygwin Windows applications will
-misbehave badly in this situation. A well-known example are certain versions
-of Visual-C++.</para>
-
-<para>Last but not least, you don't have the usual comfortable access
-to network shares. The reason is that the token has been created
-without knowing the password. The password are your credentials
-necessary for network access. Thus, if you logon with a password, the
-password is stored hidden as "token credentials" within the access token
-and used as default logon to access network resources. Since these
-credentials are missing from the token created with
-<command>NtCreateToken</command>, you only can access network shares
-from the new user's process tree by using explicit authentication, on
-the command line for instance:</para>
-
-<screen>
-bash$ net use '\\server\share' /user:DOMAIN\my_user my_users_password
-</screen>
-
-<para>Note that, on some systems, you can't even define a drive letter
-to access the share, and under some circumstances the drive letter you
-choose collides with a drive letter already used in another session.
-Therefore it's better to get used to accessing these shares using the UNC
-path as in</para>
-
-<screen>
-bash$ grep foo //server/share/foofile
-</screen>
-
-</sect2>
-
-<sect2 id="ntsec-nopasswd2"><title id="ntsec-nopasswd2.title">Switching the user context without password, Method 2: LSA authentication package</title>
-
-<para>Caveat: The method described in this chapter only works starting
-with Windows 2000. Windows NT4 users have to use one of the other
-methods described in this document.</para>
-
-<para>So we're looking for another way to switch the user context without
-having to provide the password. Another technique is to create an
-LSA authentication package. LSA is an acronym for "Local Security Authority"
-which is a protected part of the operating system which only allows changes
-to become active when rebooting the system after the change. Also, as soon as
-the LSA encounters serious problems (for instance, one of the protected
-LSA processes died), it triggers a system reboot. LSA is the part of
-the OS which cares for the user logons and which also creates logon
-sessions.</para>
-
-<para>An LSA authentication package is a DLL which has to be installed
-as part of the LSA. This is done by tweaking a special registry key.
-Cygwin provides such an authentication package. It has to be installed
-and the machine has to be rebooted to activate it. This is the job of the
-shell script <filename>/usr/bin/cyglsa-config</filename> which is part of
-the Cygwin package.</para>
-
-<para>After running <filename>/usr/bin/cyglsa-config</filename> and
-rebooting the system, the LSA authentication package is used by Cygwin
-when <command>set(e)uid</command> is called by an application. The
-created access token using this method has its own logon session.</para>
-
-<para>This method has two advantages over the <command>NtCreateToken</command>
-method.</para>
-
-<para>The very special and very dangerous "Create a token object" user
-right is not required by a user using this method. Other privileged
-user rights are still necessary, especially the "Act as part of the
-operating system" right, but that's just business as usual.</para>
-
-<para>The user is correctly identified, even by delicate native applications
-which choke on that using the <command>NtCreateToken</command> method.</para>
-
-<para>Disadvantages? Yes, sure, this is Windows. The access token
-created using LSA authentication still lacks the credentials for network
-access. After all, there still hasn't been any password authentication
-involved. The requirement to reboot after every installation or
-deinstallation of the cygwin LSA authentication DLL is just a minor
-inconvenience compared to that...</para>
-
-<para>Nevertheless, this is already a lot better than what we get by
-using <command>NtCreateToken</command>, isn't it?</para>
-
-</sect2>
-
-<!-- TODO: The rest of the file... -->
-
-<sect2 id="ntsec-nopasswd3"><title id="ntsec-nopasswd3.title">Switching the user context without password, Method 3: With password</title>
-
-<para>Ok, so we have solved almost any problem, except for the network
-access problem. Not being able to access network shares without
-having to specify a cleartext password on the command line or in a
-script is a harsh problem for automated logons for testing purposes
-and similar stuff.</para>
-
-<para>Fortunately there is a solution, but it has its own drawbacks.
-But first thing first, how does it work? The title of this section
-says it all. Instead of trying to logon without password, we just logon
-with password. The password gets stored two-way encrypted in a hidden,
-obfuscated area of the registry, the LSA private registry area. This
-part of the registry contains for instance the passwords of the Windows
-services which run under some non-default user account.</para>
-
-<para>So what we do is to utilize this registry area for the purpose of
-<command>set(e)uid</command>. The Cygwin command <command><link
-linkend="passwd">passwd</link> -R</command> allows a user to specify
-his/her password for storage in this registry area. When this user
-tries to login using ssh with public key authentication, Cygwin's
-<command>set(e)uid</command> examines the LSA private registry area and
-searches for a Cygwin specific key which contains the password. If it
-finds it, it calls <command>LogonUser</command> under the hood, using
-this password. If that works, <command>LogonUser</command> returns an
-access token with all credentials necessary for network access.</para>
-
-<para>For good measure, and since this way to implement
-<command>set(e)uid</command> is not only used by Cygwin but also by
-Microsoft's SFU (Services for Unix), we also look for a key stored by
-SFU (using the SFU command <command>regpwd</command>) and use that if it's
-available.</para>
-
-<para>We got it. A full access token with its own logon session, with
-all network credentials. Hmm, that's heaven...</para>
-
-<para>Back on earth, what about the drawbacks?</para>
-
-<para>First, adding a password to the LSA private registry area
-requires administrative access. So calling <command>passwd -R</command>
-as a normal user will fail. Cygwin provides a workaround for
-this. If <command>cygserver</command> is started as a service running
-under the SYSTEM account (which is the default way to run
-<command>cygserver</command>) you can use <command>passwd -R</command>
-as normal, non-privileged user as well. Just keep in mind that this
-requires to set the environment variable CYGWIN to contain the word
-"server" before running <command>passwd -R</command>, if it's not
-already set anyway. See <xref linkend="using-cygwinenv"></xref>.
-Example:</para>
-
-<screen>
-bash$ echo $CYGWIN
-tty
-bash$ export CYGWIN="tty server"
-bash$ passwd -R
-</screen>
-
-<para>Second, as aforementioned, the password is two-way encrypted in a
-hidden, obfuscated registry area. Only SYSTEM has access to this area
-for listing purposes, so, even as an administrator, you can't examine
-this area with regedit. Right? No. Every administrator can start
-regedit as SYSTEM user:</para>
-
-<screen>
-bash$ date
-Tue Dec 2 16:28:03 CET 2008
-bash$ at 16:29 /interactive regedit.exe
-</screen>
-
-<para>Additionally, if an administrator knows under which name
-the private key is stored (which is well-known since the algorithms
-used to create the Cygwin and SFU keys are no secret), every administrator
-can access the password of all keys stored this way in the registry.</para>
-
-<para>Conclusion: If your system is used exclusively by you, and if
-you're also the only administrator of your system, and if your system is
-adequately locked down to prevent malicious access, you can safely use
-this method. If your machine is part of a network which has
-dedicated administrators, and you're not one of these administrators,
-but you (think you) can trust your administrators, you can probably
-safely use this method.</para>
-
-<para>In all other cases, don't use this method. You have been warned.</para>
-
-</sect2>
-
-<sect2 id="ntsec-setuid-impl"><title id="ntsec-setuid-impl.title">Switching the user context, how does that all fit together?</title>
-
-<para>Now we learned about four different ways to switch the user
-context using the <command>set(e)uid</command> system call, but
-how does <command>set(e)uid</command> really work? Which method does it
-use now?</para>
-
-<para>The answer is, all four of them. So here's a brief overview
-what <command>set(e)uid</command> does under the hood:</para>
-
-<itemizedlist>
-<listitem>
-<para>When <command>set(e)uid</command> is called, it tests if the
-user context had been switched by an earlier call already, and if the
-new user account is the privileged user account under which the process
-had been started originally. If so, it just switches to the original
-access token of the process it had been started with.</para>
-</listitem>
-
-<listitem>
-<para>
-Next, it tests if an access token has been stored by an earlier call
-to <command>cygwin_set_impersonation_token</command>. If so, it tests
-if that token matches the requested user account. If so, the stored
-token is used for the user context switch.</para>
-
-<para>
-If not, there's no predefined token which can just be used for
-the user context switch, so we have to create a new token. The order
-is as follows.</para>
-</listitem>
-
-<listitem>
-<para>Check if the user has stored the logon password in the LSA
-private registry area, either under a Cygwin key, or under a SFU key.
-If so, use this to call <command>LogonUser</command>. If this
-succeeds, we use the resulting token for the user context switch.</para>
-</listitem>
-
-<listitem>
-<para>Otherwise, check if the Cygwin-specifc LSA authentication package
-has been installed and is functional. If so, use the appropriate LSA
-calls to communicate with the Cygwin LSA authentication package and
-use the returned token.</para>
-</listitem>
-
-<listitem>
-<para>Last chance, try to use the <command>NtCreateToken</command> call
-to create a token. If that works, use this token.</para>
-</listitem>
-
-<listitem>
-<para>If all of the above fails, our process has insufficient privileges
-to switch the user context at all, so <command>set(e)uid</command>
-fails and returns -1, setting errno to EPERM.</para>
-</listitem>
-</itemizedlist>
-
-</sect2>
-
-</sect1>
diff --git a/winsup/doc/overview.sgml b/winsup/doc/overview.sgml
deleted file mode 100644
index b0b80b5..0000000
--- a/winsup/doc/overview.sgml
+++ /dev/null
@@ -1,121 +0,0 @@
-<chapter id="overview"><title>Cygwin Overview</title>
-
-<sect1 id="what-is-it"><title>What is it?</title>
-
-<para>
-Cygwin is a Linux-like environment for Windows. It consists of a DLL
-(<filename>cygwin1.dll</filename>), which acts as an emulation layer
-providing substantial <ulink url="http://www.pasc.org/#POSIX">POSIX</ulink>
-(Portable Operating System Interface) system call functionality, and a
-collection of tools, which provide a Linux look and feel. The Cygwin DLL
-works with all x86 and AMD64 versions of Windows NT since Windows NT 4.
-The API follows the
-<ulink url="http://www.opengroup.org/onlinepubs/009695399/nfindex.html">Single
-Unix Specification</ulink> as much as possible, and then Linux practice.
-The major differences between Cygwin and Linux is the C library
-(<literal>newlib</literal> instead of <literal>glibc</literal>).
-</para>
-<para>
-With Cygwin installed, users have access to many standard UNIX
-utilities. They can be used from one of the provided shells such
-as <command>bash</command> or from the Windows Command Prompt.
-Additionally, programmers may write Win32 console or GUI applications
-that make use of the standard Microsoft Win32 API and/or the Cygwin API.
-As a result, it is possible to easily port many significant UNIX
-programs without the need for extensive changes to the source code.
-This includes configuring and building most of the available GNU
-software (including the development tools included with the Cygwin
-distribution).
-</para>
-</sect1>
-
-DOCTOOL-INSERT-ov-ex-win
-DOCTOOL-INSERT-ov-ex-unix
-
-<sect1 id="are-free"><title>Are the Cygwin tools free software?</title>
-
-<para>Yes. Parts are <ulink url="http://www.gnu.org/">GNU</ulink> software
-(<command>gcc</command>, <command>gas</command>, <command>ld</command>, etc.),
-parts are covered by the standard
-<ulink url="http://www.x.org/Downloads_terms.html">X11 license</ulink>,
-some of it is public domain, some of it was written by Red Hat and placed under
-the <ulink url="http://www.gnu.org/licenses/gpl.html">GNU General Public
-License</ulink> (GPL). None of it is shareware. You don't have to pay anyone to
-use it but you should be sure to read the copyright section of the FAQ for more
-information on how the GNU GPL may affect your use of these
-tools. If you intend to port a proprietary application using the Cygwin
-library, you may want the Cygwin proprietary-use license.
-For more information about the proprietary-use license, please go to
-<ulink url="http://www.redhat.com/software/tools/cygwin/">http://www.redhat.com/software/tools/cygwin/</ulink>.
-Customers of the native Win32 GNUPro should feel free to submit bug
-reports and ask questions through the normal channels. All other
-questions should be sent to the project mailing list
-<email>cygwin@cygwin.com</email>.</para>
-
-</sect1>
-
-<sect1 id="brief-history"><title>A brief history of the Cygwin project</title>
-
-<note>
-<para>
-A historical look into the first years of Cygwin development is
-Geoffrey J. Noer's 1998 paper, "Cygwin32: A Free Win32 Porting Layer for
-UNIX&reg; Applications" which can be found at the <ulink
-url="http://www.usenix.org/publications/library/proceedings/usenix-nt98/technical.html">
-2nd USENIX Windows NT Symposium Online Proceedings</ulink>.
-</para>
-</note>
-<para>
-Cygwin began development in 1995 at Cygnus Solutions (now part of Red Hat
-Software). The first thing done was to enhance the development tools
-(<command>gcc</command>, <command>gdb</command>, <command>gas</command>,
-etc.) so that they could generate and interpret Win32 native
-object files.
-The next task was to port the tools to Win NT/9x. We could have
-done this by rewriting large portions of the source to work within the
-context of the Win32 API. But this would have meant spending a huge
-amount of time on each and every tool. Instead, we took a
-substantially different approach by writing a shared library
-(the Cygwin DLL) that adds the necessary UNIX-like functionality
-missing from the Win32 API (<function>fork</function>,
-<function>spawn</function>, <function>signals</function>,
-<function>select</function>, <function>sockets</function>, etc.). We call this
-new interface the Cygwin API. Once written, it was possible to build working
-Win32 tools using UNIX-hosted cross-compilers, linking against this
-library.</para>
-
-<para>From this point, we pursued the goal of producing native tools
-capable of rebuilding themselves under Windows 9x and NT (this is
-often called self-hosting). Since neither OS ships with standard UNIX
-user tools (fileutils, textutils, bash, etc...), we had to get the GNU
-equivalents working with the Cygwin API. Most of these tools were
-previously only built natively so we had to modify their configure
-scripts to be compatible with cross-compilation. Other than the
-configuration changes, very few source-level changes had to be
-made. Running bash with the development tools and user tools in place,
-Windows 9x and NT look like a flavor of UNIX from the perspective of
-the GNU configure mechanism. Self hosting was achieved as of the beta
-17.1 release in October 1996.</para>
-
-<para>
-The entire Cygwin toolset was available as a monolithic install. In
-April 2000, the project announced a
-<ulink url="http://www.cygwin.com/ml/cygwin/2000-04/msg00269.html">
-New Cygwin Net Release</ulink> which provided the native Win32 program
-<command>setup.exe</command> to install and upgrade each package
-separately. Since then, the Cygwin DLL and <command>setup.exe</command>
-have seen continuous development.
-</para>
-
-<para>
-The latest major improvement in this development is the 1.7 release in
-2008, which dropped Windows 95/98/Me support in favor of using Windows
-NT features more extensively. It adds a lot of new features like
-case-sensitive filenames, NFS interoperability, IPv6 support and much
-more.</para>
-
-</sect1>
-
-DOCTOOL-INSERT-highlights
-
-</chapter>
diff --git a/winsup/doc/overview2.sgml b/winsup/doc/overview2.sgml
deleted file mode 100644
index 203e325..0000000
--- a/winsup/doc/overview2.sgml
+++ /dev/null
@@ -1,422 +0,0 @@
-<sect1 id="ov-ex-win">
-<title>Quick Start Guide for those more experienced with Windows</title>
-<para>
-If you are new to the world of UNIX, you may find it difficult to
-understand at first. This guide is not meant to be comprehensive,
-so we recommend that you use the many available Internet resources
-to become acquainted with UNIX basics (search for "UNIX basics" or
-"UNIX tutorial").
-</para>
-<para>
-To install a basic Cygwin environment, run the
-<command>setup.exe</command> program and click <literal>Next</literal>
-at each page. The default settings are correct for most users. If you
-want to know more about what each option means, see
-<xref linkend="internet-setup"></xref>. Use <command>setup.exe</command>
-any time you want to update or install a Cygwin package. If you are
-installing Cygwin for a specific purpose, use it to install the tools
-that you need. For example, if you want to compile C++ programs, you
-need the <systemitem>gcc-g++</systemitem> package and probably a text
-editor like <systemitem>nano</systemitem>. When running
-<command>setup.exe</command>, clicking on categories and packages in the
-package installation screen will provide you with the ability to control
-what is installed or updated.
-</para>
-<para>
-Another option is to install everything by clicking on the
-<literal>Default</literal> field next to the <literal>All</literal>
-category. However, be advised that this will download and install
-several hundreds of megabytes of software to your computer. The best
-plan is probably to click on individual categories and install either
-entire categories or packages from the categories themselves.
-After installation, you can find Cygwin-specific documentation in
-the <literal>/usr/share/doc/Cygwin/</literal> directory.
-</para>
-<para>
-Developers coming from a Windows background will be able to write
-console or GUI executables that rely on the Microsoft Win32 API instead
-of Cygwin using the -mno-cygwin option to GCC. The <command>-shared</command>
-option allows to write Windows Dynamically Linked Libraries (DLLs). The
-resource compiler <command>windres</command> is also provided.
-</para>
-</sect1>
-
-<sect1 id="ov-ex-unix">
-<title>Quick Start Guide for those more experienced with UNIX</title>
-<para>
-If you are an experienced UNIX user who misses a powerful command-line
-environment, you will enjoy Cygwin.
-Developers coming from a UNIX background will find a set of utilities
-they are already comfortable using, including a working UNIX shell. The
-compiler tools are the standard GNU compilers most people will have previously
-used under UNIX, only ported to the Windows host. Programmers wishing to port
-UNIX software to Windows NT will find that the Cygwin library provides
-an easy way to port many UNIX packages, with only minimal source code
-changes.
-</para>
-<para>
-Note that there are some workarounds
-that cause Cygwin to behave differently than most UNIX-like operating
-systems; these are described in more detail in
-<xref linkend="using-effectively"></xref>.
-</para>
-<para>
-Use the graphical command <command>setup.exe</command> any time you want
-to update or install a Cygwin package. This program must be run
-manually every time you want to check for updated packages since Cygwin
-does not currently include a mechanism for automatically detecting
-package updates.
-</para>
-<para>
-By default, <command>setup.exe</command> only installs a minimal subset of
-packages. Add any other packages by clicking on the <literal>+</literal>
-next to the Category name and selecting the package from the displayed
-list. You may search for specfic tools by using the
-<ulink url="http://cygwin.com/packages/">Setup Package Search</ulink>
-at the Cygwin web site.
-</para>
-<para>
-Another option is to install everything by clicking on the
-<literal>Default</literal> field next to the <literal>All</literal>
-category. However, be advised that this will download and install
-several hundreds of megabytes of software to your computer. The best
-plan is probably to click on individual categories and install either
-entire categories or packages from the categories themselves.
-After installation, you can find Cygwin-specific documentation in
-the <literal>/usr/share/doc/Cygwin/</literal> directory.
-</para>
-<para>
-For more information about what each option in
-<command>setup.exe</command> means, see <xref
-linkend="internet-setup"></xref>.
-</para>
-
-</sect1>
-
-<sect1 id="highlights"><title>Highlights of Cygwin Functionality</title>
-
-<sect2 id="ov-hi-intro"><title>Introduction</title> <para>When a binary linked
-against the library is executed, the Cygwin DLL is loaded into the
-application's text segment. Because we are trying to emulate a UNIX kernel
-which needs access to all processes running under it, the first Cygwin DLL to
-run creates shared memory areas and global synchronization objects that other
-processes using separate instances of the DLL can access. This is used to keep track of open file descriptors and to assist fork and exec, among other
-purposes. Every process also has a per_process structure that contains
-information such as process id, user id, signal masks, and other similar
-process-specific information.</para>
-
-<para>The DLL is implemented as a standard DLL in the Win32 subsystem. Under
-the hood it's using the Win32 API, as well as the native NT API, where
-appropriate.</para>
-
-<para>Because processes run under the standard Win32 subsystem, they
-can access both the UNIX compatibility calls provided by Cygwin as well as
-any of the Win32 API calls. This gives the programmer complete flexibility in
-designing the structure of their program in terms of the APIs used. For
-example, they could write a Win32-specific GUI using Win32 API calls on top of
-a UNIX back-end that uses Cygwin.</para>
-
-<para>The native NT API is used mainly for speed, as well as to access
-NT capabilities which are useful to implement certain POSIX features, but
-are hidden to the Win32 API.
-</para>
-
-<para>Due to some restrictions in Windows, it's not always possible
-to strictly adhere to existing UNIX standards like POSIX.1. Fortunately
-these are mostely border cases.</para>
-</sect2>
-
-<sect2 id="ov-hi-perm"><title>Permissions and Security</title>
-<para>Windows NT includes a sophisticated security model based on Access
-Control Lists (ACLs). Cygwin maps Win32 file ownership and permissions to
-ACLs by default, on file systems supporting them (usually NTFS). Solaris
-style ACLs and accompanying function calls are also supported.
-The chmod call maps UNIX-style permissions back to the Win32 equivalents.
-Because many programs expect to be able to find the
-<filename>/etc/passwd</filename> and
-<filename>/etc/group</filename> files, we provide <ulink
-url="http://cygwin.com/cygwin-ug-net/using-utils.html">utilities</ulink>
-that can be used to construct them from the user and group information
-provided by the operating system.</para>
-
-<para>Users with Administrator rights are permitted to chown files.
-With version 1.1.3 Cygwin introduced a mechanism for setting real and
-effective UIDs. This is described in <xref linkend="ntsec"></xref>. As
-of version 1.5.13, the Cygwin developers are not aware of any feature in
-the Cygwin DLL that would allow users to gain privileges or to access
-objects to which they have no rights under Windows. However there is no
-guarantee that Cygwin is as secure as the Windows it runs on. Cygwin
-processes share some variables and are thus easier targets of denial of
-service type of attacks.
-</para>
-
-</sect2>
-
-<sect2 id="ov-hi-files"><title>File Access</title> <para>Cygwin supports
-both POSIX- and Win32-style paths, using either forward or back slashes as the
-directory delimiter. Paths coming into the DLL are translated from POSIX to
-native NT as needed. From the application perspective, the file system is
-a POSIX-compliant one. The implementation details are safely hidden in the
-Cygwin DLL. UNC pathnames (starting with two slashes) are supported for
-network paths.</para>
-
-<para>Since version 1.7.0, the layout of this POSIX view of the Windows file
-system space is stored in the <filename>/etc/fstab</filename> file. Actually,
-there is a system-wide <filename>/etc/fstab</filename> file as well as a
-user-specific fstab file <filename>/etc/fstab.d/${USER}</filename>.</para>
-
-<para>At startup the DLL has to find out where it can find the
-<filename>/etc/fstab</filename> file. The mechanism used for this is simple.
-First it retrieves it's own path, for instance
-<filename>C:\Cygwin\bin\cygwin1.dll</filename>. From there it deduces
-that the root path is <filename>C:\Cygwin</filename>. So it looks for the
-<filename>fstab</filename> file in <filename>C:\Cygwin\etc\fstab</filename>.
-The layout of this file is very similar to the layout of the
-<filename>fstab</filename> file on Linux. Just instead of block devices,
-the mount points point to Win32 paths. An installation with
-<command>setup.exe</command> installs a <filename>fstab</filename> file by
-default, which can easily be changed using the editor of your choice.</para>
-
-<para>In addition to selecting the root partition, the
-<filename>fstab</filename> file allows mounting arbitrary Win32 paths into
-the POSIX file system space. A special case is the so-called cygdrive prefix.
-It's the path under which every available drive in the system is mounted
-under its drive letter. The default value is <filename>/cygdrive</filename>,
-so you can access the drives as <filename>/cygdrive/c</filename>,
-<filename>/cygdrive/d</filename>, etc... The cygdrive prefix can be set to
-some other value (<filename>/mnt</filename> for instance) in the
-<filename>fstab</filename> file(s).</para>
-
-<para>The library exports several Cygwin-specific functions that can be used
-by external programs to convert a path or path list from Win32 to POSIX or vice
-versa. Shell scripts and Makefiles cannot call these functions directly.
-Instead, they can do the same path translations by executing the
-<command>cygpath</command> utility program that we provide with Cygwin.</para>
-
-<para>Win32 applications handle filenames case preserving but case
-insensitive. Cygwin supports case sensitivity on file systems supporting
-that. Since Windows XP, the OS only supports case sensitivity when a
-specific registry value is changed. Therefore case sensitivity is not
-the default usually.</para>
-
-<para>Symbolic links are not present and supported on Windows up to and
-including Windows Server 2003 R2. Only starting with Windows Vista,
-native symlinks are available. Unfortunately they are strangly implemented
-and so not very useful for a POSIX emulation layer. Consequentially
-Cygwin recognizes them as symlinks but does not create them.</para>
-
-<para>Symbolic links are potentially created in two different ways.
-The file style symlinks are files containing a magic cookie followed by
-the path to which the link points. They are marked with the System DOS
-attribute so that only files with that attribute have to be read to
-determine whether or not the file is a symbolic link. The shortcut style
-symlinks are Windows shortcut files with a special header and the
-Readonly DOS attribute set. The advantage of file symlinks is speed,
-the advantage of shortcut symlinks is the fact that they can be utilized
-by non-Cygwin Win32 tools as well.</para>
-
-<para>Hard links are fully supported on NTFS and NFS file systems. On FAT
-and some other file systems, the call falls back to simply copying the file,
-a strategy that works in many cases.</para>
-
-<para>On file systems which don't support unique persistent file IDs (FAT,
-older Samba shares) the inode number for a file is calculated by hashing its
-full Win32 path. The inode number generated by the stat call always matches
-the one returned in <literal>d_ino</literal> of the <literal>dirent</literal>
-structure. It is worth noting that the number produced by this method is not
-guaranteed to be unique. However, we have not found this to be a significant
-problem because of the low probability of generating a duplicate inode number.
-</para>
-
-<para><function>chroot(2)</function> is supported since Cygwin 1.1.3.
-However, chroot is not a concept known by Windows. This implies some
-restrictions. First of all, the <function>chroot</function> call isn't a
-privileged call. Each user may call it. Second, the chroot environment
-isn't safe against native windows processes. If you want to support a
-chroot environment as, for example, by allowing an anonymous ftp with
-restricted access, you'll have to care that only native Cygwin applications
-are accessible inside of the chroot environment. Since those applications
-are only using the Cygwin POSIX API to access the file system their access
-can be restricted as it is intended. This includes not only POSIX paths but
-Win32 paths containing drive letter and/or backslashes as well as UNC paths
-(<filename>//server/share</filename> or <filename>\\server\share</filename>).
-</para>
-</sect2>
-
-<sect2 id="ov-hi-textvsbinary"><title>Text Mode vs. Binary Mode</title>
-<para>Interoperability with other Win32 programs such as text editors was
-critical to the success of the port of the development tools. Most Red Hat
-customers upgrading from the older DOS-hosted toolchains expected the new
-Win32-hosted ones to continue to work with their old development
-sources.</para>
-
-<para>Unfortunately, UNIX and Win32 use different end-of-line terminators in
-text files. Consequently, carriage-return newlines have to be translated on
-the fly by Cygwin into a single newline when reading in text mode.</para>
-
-<para>This solution addresses the compatibility requirement at the expense of
-violating the POSIX standard that states that text and binary mode will be
-identical. Consequently, processes that attempt to lseek through text files can
-no longer rely on the number of bytes read as an accurate indicator of position
-in the file. For this reason, the CYGWIN environment variable can be
-set to override this behavior.</para>
-</sect2>
-
-<sect2 id="ov-hi-ansiclib"><title>ANSI C Library</title>
-<para>We chose to include Red Hat's own existing ANSI C library
-"newlib" as part of the library, rather than write all of the lib C
-and math calls from scratch. Newlib is a BSD-derived ANSI C library,
-previously only used by cross-compilers for embedded systems
-development. Other functions, which are not supported by newlib have
-been added to the Cygwin sources using BSD implementations as much as
-possible.</para>
-
-<para>The reuse of existing free implementations of such things
-as the glob, regexp, and getopt libraries saved us considerable
-effort. In addition, Cygwin uses Doug Lea's free malloc
-implementation that successfully balances speed and compactness. The
-library accesses the malloc calls via an exported function pointer.
-This makes it possible for a Cygwin process to provide its own
-malloc if it so desires.</para>
-</sect2>
-
-<sect2 id="ov-hi-process"><title>Process Creation</title>
-<para>The <function>fork</function> call in Cygwin is particularly interesting
-because it does not map well on top of the Win32 API. This makes it very
-difficult to implement correctly. Currently, the Cygwin fork is a
-non-copy-on-write implementation similar to what was present in early
-flavors of UNIX.</para>
-
-<para>The first thing that happens when a parent process
-forks a child process is that the parent initializes a space in the
-Cygwin process table for the child. It then creates a suspended
-child process using the Win32 CreateProcess call. Next, the parent
-process calls setjmp to save its own context and sets a pointer to
-this in a Cygwin shared memory area (shared among all Cygwin
-tasks). It then fills in the child's .data and .bss sections by
-copying from its own address space into the suspended child's address
-space. After the child's address space is initialized, the child is
-run while the parent waits on a mutex. The child discovers it has
-been forked and longjumps using the saved jump buffer. The child then
-sets the mutex the parent is waiting on and blocks on another mutex.
-This is the signal for the parent to copy its stack and heap into the
-child, after which it releases the mutex the child is waiting on and
-returns from the fork call. Finally, the child wakes from blocking on
-the last mutex, recreates any memory-mapped areas passed to it via the
-shared area, and returns from fork itself.</para>
-
-<para>While we have some
-ideas as to how to speed up our fork implementation by reducing the
-number of context switches between the parent and child process, fork
-will almost certainly always be inefficient under Win32. Fortunately,
-in most circumstances the spawn family of calls provided by Cygwin
-can be substituted for a fork/exec pair with only a little effort.
-These calls map cleanly on top of the Win32 API. As a result, they
-are much more efficient. Changing the compiler's driver program to
-call spawn instead of fork was a trivial change and increased
-compilation speeds by twenty to thirty percent in our
-tests.</para>
-
-<para>However, spawn and exec present their own set of
-difficulties. Because there is no way to do an actual exec under
-Win32, Cygwin has to invent its own Process IDs (PIDs). As a
-result, when a process performs multiple exec calls, there will be
-multiple Windows PIDs associated with a single Cygwin PID. In some
-cases, stubs of each of these Win32 processes may linger, waiting for
-their exec'd Cygwin process to exit.</para>
-</sect2>
-
-<sect2 id="ov-hi-signals"><title>Signals</title>
-<para>When
-a Cygwin process starts, the library starts a secondary thread for
-use in signal handling. This thread waits for Windows events used to
-pass signals to the process. When a process notices it has a signal,
-it scans its signal bitmask and handles the signal in the appropriate
-fashion.</para>
-
-<para>Several complications in the implementation arise from the
-fact that the signal handler operates in the same address space as the
-executing program. The immediate consequence is that Cygwin system
-functions are interruptible unless special care is taken to avoid
-this. We go to some lengths to prevent the sig_send function that
-sends signals from being interrupted. In the case of a process
-sending a signal to another process, we place a mutex around sig_send
-such that sig_send will not be interrupted until it has completely
-finished sending the signal.</para>
-
-<para>In the case of a process sending
-itself a signal, we use a separate semaphore/event pair instead of the
-mutex. sig_send starts by resetting the event and incrementing the
-semaphore that flags the signal handler to process the signal. After
-the signal is processed, the signal handler signals the event that it
-is done. This process keeps intraprocess signals synchronous, as
-required by POSIX.</para>
-
-<para>Most standard UNIX signals are provided. Job
-control works as expected in shells that support
-it.</para>
-</sect2>
-
-<sect2 id="ov-hi-sockets"><title>Sockets</title>
-<para>Socket-related calls in Cygwin basically call the functions by the
-same name in Winsock, Microsoft's implementation of Berkeley sockets, but
-with lots of tweaks. All sockets are non-blocking under the hood to allow
-to interrupt blocking calls by POSIX signals. Additional bookkeeping is
-necessary to implement correct socket sharing POSIX semantics and especially
-for the select call. Some socket-related functions are not implemented at
-all in Winsock, as, for example, socketpair. Starting with Windows Vista,
-Microsoft removed the legacy calls <function>rcmd(3)</function>,
-<function>rexec(3)</function> and <function>rresvport(3)</function>.
-Recent versions of Cygwin now implement all these calls internally.</para>
-
-<para>An especially troublesome feature of Winsock is that it must be
-initialized before the first socket function is called. As a result, Cygwin
-has to perform this initialization on the fly, as soon as the first
-socket-related function is called by the application. In order to support
-sockets across fork calls, child processes initialize Winsock if any
-inherited file descriptor is a socket.</para>
-
-<para>AF_UNIX (AF_LOCAL) sockets are not available in Winsock. They are
-implemented in Cygwin by using local AF_INET sockets instead. This is
-completely transparent to the application. Cygwin's implementation also
-supports the getpeereid BSD extension. A yet missing feature is
-descriptor passing, though.</para>
-
-<para>Starting with release 1.7.0, Cygwin gets IPv6 support. However, this
-depends on the availability of the Windows IPv6 stack. Up to Windows 2003,
-the IPv6 stack is treated as "experimental" and it's not feature complete.
-Full support is only available starting with Windows Vista and Windows Server
-2008. The newly implemented <function>getaddrinfo</function> and
-<function>getnameinfo</function> functions are not dependent on the OS,
-though. Cygwin 1.7.0 adds replacement functions which implement the full
-functionality for IPv4.</para>
-
-</sect2>
-
-<sect2 id="ov-hi-select"><title>Select</title>
-<para>The UNIX <function>select</function> function is another
-call that does not map cleanly on top of the Win32 API. Much to our
-dismay, we discovered that the Win32 select in Winsock only worked on
-socket handles. Our implementation allows select to function normally
-when given different types of file descriptors (sockets, pipes,
-handles, and a custom /dev/windows Windows messages
-pseudo-device).</para>
-
-<para>Upon entry into the select function, the first
-operation is to sort the file descriptors into the different types.
-There are then two cases to consider. The simple case is when at
-least one file descriptor is a type that is always known to be ready
-(such as a disk file). In that case, select returns immediately as
-soon as it has polled each of the other types to see if they are
-ready. The more complex case involves waiting for socket or pipe file
-descriptors to be ready. This is accomplished by the main thread
-suspending itself, after starting one thread for each type of file
-descriptor present. Each thread polls the file descriptors of its
-respective type with the appropriate Win32 API call. As soon as a
-thread identifies a ready descriptor, that thread signals the main
-thread to wake up. This case is now the same as the first one since
-we know at least one descriptor is ready. So select returns, after
-polling all of the file descriptors one last time.</para>
-</sect2>
-</sect1>
-
diff --git a/winsup/doc/pathnames.sgml b/winsup/doc/pathnames.sgml
deleted file mode 100644
index e299154..0000000
--- a/winsup/doc/pathnames.sgml
+++ /dev/null
@@ -1,586 +0,0 @@
-<sect1 id="using-pathnames"><title>Mapping path names</title>
-
-<sect2 id="pathnames-intro"><title>Introduction</title>
-
-<para>Cygwin supports both Win32- and POSIX-style paths, where
-directory delimiters may be either forward or back slashes. UNC
-pathnames (starting with two slashes and a network name) are also
-supported.</para>
-
-<para>POSIX operating systems (such as Linux) do not have the concept
-of drive letters. Instead, all absolute paths begin with a
-slash (instead of a drive letter such as "c:") and all file systems
-appear as subdirectories (for example, you might buy a new disk and
-make it be the <filename>/disk2</filename> directory).</para>
-
-<para>Because many programs written to run on UNIX systems assume
-the existance of a single unified POSIX file system structure, Cygwin
-maintains a special internal POSIX view of the Win32 file system
-that allows these programs to successfully run under Windows. Cygwin
-uses this mapping to translate from POSIX to Win32 paths as
-necessary.</para>
-
-</sect2>
-
-<sect2 id="mount-table"><title>The Cygwin Mount Table</title>
-
-<para>The <filename>/etc/fstab</filename> file is used to map Win32
-drives and network shares into Cygwin's internal POSIX directory tree.
-This is a similar concept to the typical UNIX fstab file. The mount
-points stored in <filename>/etc/fstab</filename> are globally set for
-all users. Sometimes there's a requirement to have user specific
-mount points. The Cygwin DLL supports user specific fstab files.
-These are stored in the directory <filename>/etc/fstab.d</filename>
-and the name of the file is the Cygwin username of the user, as it's
-stored in the <filename>/etc/passwd</filename> file. The content of the
-user specifc file is identical to the system-wide
-<filename>fstab</filename> file.</para>
-
-<para>The file fstab contains descriptive information about the various file
-systems. fstab is only read by programs, and not written; it is the
-duty of the system administrator to properly create and maintain this
-file. Each filesystem is described on a separate line; fields on each
-line are separated by tabs or spaces. Lines starting with '#' are
-comments.</para>
-
-<para>The first field describes the block special device or
-remote filesystem to be mounted. On Cygwin, this is the native Windows
-path which the mount point links in. As path separator you MUST use a
-slash. Usage of a backslash might lead to unexpected results. UNC
-paths (using slashes, not backslashes) are allowed. If the path
-contains spaces these can be escaped as <literal>'\040'</literal>.</para>
-
-<para>The second field describes the mount point for the filesystem.
-If the name of the mount point contains spaces these can be
-escaped as '\040'.</para>
-
-<para>The third field describes the type of the filesystem.
-Cygwin supports any string here, since the file system type is usually
-not evaluated. The noticable exception is the file system type
-cygdrive. This type is used to set the cygdrive prefix.</para>
-
-<para>The fourth field describes the mount options associated
-with the filesystem. It is formatted as a comma separated list of
-options. It contains at least the type of mount (binary or text) plus
-any additional options appropriate to the filesystem type. Recognized
-options are binary, text, nouser, user, exec, notexec, cygexec, nosuid,
-posix=[0|1]. The meaning of the options is as follows.</para>
-
-<screen>
- acl - Cygwin uses the filesystem's access control lists (ACLs) to
- implement real POSIX permissions (default). This flag only
- affects filesystems supporting ACLs (NTFS) and is ignored
- otherwise.
- noacl - Cygwin ignores filesystem ACLs and only fakes a subset of
- permission bits based on the DOS readonly attribute. This
- behaviour is the default on FAT and FAT32. The flag is
- ignored on NFS filesystems.
- binary - Files default to binary mode (default).
- text - Files default to CRLF text mode line endings.
- nouser - Mount is a system-wide mount.
- user - Mount is a user mount.
- exec - Treat all files below mount point as executable.
- notexec - Treat all files below mount point as not executable.
- cygexec - Treat all files below mount point as cygwin executables.
- nosuid - No suid files are allowed (currently unimplemented).
- posix=0 - Switch off case sensitivity for paths under this mount point.
- posix=1 - Switch on case sensitivity for paths under this mount point
- (default).
-</screen>
-
-<para>Normally, files ending in certain extensions (.exe, .com, .bat, .btm,
-.cmd) are assumed to be executable. Files whose first two characters begin
-with '#!' are also considered to be executable.
-The <literal>exec</literal> option is used to instruct Cygwin that the
-mounted file is "executable". If the <literal>exec</literal> option is used
-with a directory then all files in the directory are executable.
-This option allows other files to be marked as executable and avoids the
-overhead of opening each file to check for a '#!'. The
-<literal>cygexec</literal> option is very similar to <literal>exec</literal>,
-but also prevents Cygwin from setting up commands and environment variables
-for a normal Windows program, adding another small performance gain. The
-opposite of these options is the <literal>notexec</literal> option, which
-means that no files should be marked as executable under that mount point.
-</para>
-
-<para>Note that nouser mount points are not overridable by a later call
-to <command>mount</command>. This is only possible for user mount points.
-Mount points given in <filename>/etc/fstab</filename> are by default nouser
-mount points, unless you specify the option user. In contrast, all mount
-points in the user specific fstab file are user mount points.</para>
-
-<para>The fifth and sixth field are ignored. They are
-so far only specified to keep a Linux-like fstab file layout.</para>
-
-<para>Note that you don't have to specify an fstab entry for the root dir,
-unless you want to have the root dir pointing to somewhere entirely
-different (hopefully you know what you're doing), or if you want to
-mount the root dir with special options (for instance, as text mount).</para>
-
-<para>Example entries:</para>
-
-<itemizedlist spacing="compact">
-<listitem>
- <para>Just a normal mount point:</para>
- <screen>c:/foo /bar fat32 binary 0 0</screen>
-</listitem>
-<listitem>
- <para>A mount point for a managed, textmode mount:</para>
- <screen>C:/foo /bar/baz ntfs text,managed 0 0</screen>
-</listitem>
-<listitem>
- <para>A mount point for a Windows directory with spaces in it:</para>
- <screen>C:/Documents\040and\040Settings /docs ext3 binary 0 0</screen>
-</listitem>
-<listitem>
- <para>A mount point for a remote directory:</para>
- <screen>//server/share/subdir /srv/subdir smbfs binary 0 0</screen>
-</listitem>
-<listitem>
- <para>This is just a comment:</para>
- <screen># This is just a comment</screen>
-</listitem>
-<listitem>
- <para>Set the cygdrive prefix to /mnt:</para>
- <screen>none /mnt cygdrive binary 0 0</screen>
-</listitem>
-</itemizedlist>
-
-<para>Whenever Cygwin generates a Win32 path from a POSIX one, it uses
-the longest matching prefix in the mount table. Thus, if
-<filename>C:</filename> is mounted as <filename>/c</filename> and also
-as <filename>/</filename>, then Cygwin would translate
-<filename>C:/foo/bar</filename> to <filename>/c/foo/bar</filename>.
-This translation is normally only used when trying to derive the
-POSIX equivalent current directory. Otherwise, the handling of MS-DOS
-filenames bypasses the mount table.
-</para>
-
-<para>If you want to see the current set of mount points valid in your
-session, you can invoking the Cygwin tool <command>mount</command> without
-arguments:</para>
-
-<example id="pathnames-mount-ex">
-<title>Displaying the current set of mount points</title>
-<screen>
-<prompt>bash$</prompt> <userinput>mount</userinput>
-f:/cygwin/bin on /usr/bin type system (binmode)
-f:/cygwin/lib on /usr/lib type system (binmode)
-f:/cygwin on / type system (binmode)
-e:/src on /usr/src type system (binmode)
-c: on /cygdrive/c type user (binmode,noumount)
-e: on /cygdrive/e type user (binmode,noumount)
-</screen>
-</example>
-
-<para>You can also use the <command>mount</command> command to add
-new mount points, and the <command>umount</command> to delete
-them. However, since they are only noted in memory, these mount
-points will disappear as soon as your last Cygwin process ends.
-See <xref linkend="mount"></xref> and <xref linkend="umount"></xref> for more
-information.</para>
-
-<para>Whenever Cygwin cannot use any of the existing mounts to convert
-from a particular Win32 path to a POSIX one, Cygwin will
-automatically default to an imaginary mount point under the default POSIX
-path <filename>/cygdrive</filename>. For example, if Cygwin accesses
-<filename>Z:/foo</filename> and the Z drive is not currently in the
-mount table, then <filename>Z:/</filename> would be automatically
-converted to <filename>/cygdrive/Z</filename>. The default
-prefix of <filename>/cygdrive</filename> may be changed in the fstab file
-as outlined above.</para>
-
-</sect2>
-
-<sect2 id="pathnames-additional"><title>Additional Path-related Information</title>
-
-<para>The <command>cygpath</command> program provides the ability to
-translate between Win32 and POSIX pathnames in shell scripts. See
-<xref linkend="cygpath"></xref> for the details.</para>
-
-<para>The <envar>HOME</envar>, <envar>PATH</envar>, and
-<envar>LD_LIBRARY_PATH</envar> environment variables are automatically
-converted from Win32 format to POSIX format (e.g. from
-<filename>c:/cygwin\bin</filename> to <filename>/bin</filename>, if
-there was a mount from that Win32 path to that POSIX path) when a Cygwin
-process first starts.</para>
-
-<para>Symbolic links can also be used to map Win32 pathnames to POSIX.
-For example, the command
-<command>ln -s //pollux/home/joe/data /data</command> would have about
-the same effect as creating a mount point from
-<filename>//pollux/home/joe/data</filename> to <filename>/data</filename>
-using <command>mount</command>, except that symbolic links cannot set
-the default file access mode. Other differences are that the mapping is
-distributed throughout the file system and proceeds by iteratively
-walking the directory tree instead of matching the longest prefix in a
-kernel table. Note that symbolic links will only work on network
-drives that are properly configured to support the "system" file
-attribute. Many do not do so by default (the Unix Samba server does
-not by default, for example).</para>
-
-</sect2>
-
-</sect1>
-
-<sect1 id="using-specialnames"><title>Special filenames</title>
-
-<sect2 id="pathnames-dosdevices">
-<title>DOS devices</title>
-
-<para>Filenames invalid under Win32 are not necessarily invalid
-under Cygwin since release 1.7.0. There are a couple of rules which
-apply to Windows filenames. First of all, DOS device names like
-<filename>AUX</filename>, <filename>COM1</filename>,
-<filename>LPT1</filename> or <filename>PRN</filename> (to name a few)
-cannot be used in a native Win32 application, even with an
-extension (<filename>prn.txt</filename>). Cygwin can handle files with
-these names just fine.</para>
-
-</sect2>
-
-<sect2 id="pathnames-specialchars">
-<title>Special characters in filenames</title>
-
-<para>Win32 filenames can't contain trailing dots and spaces for backward
-compatibility. When trying to create files with trailing dots or spaces,
-all of them are removed before the file is created. This restriction does
-only affect native Win32 applications. Cygwin applications can create and
-access files with trailing dots and spaces without problems.</para>
-
-<para>Some characters are disallowed in filenames on Windows filesystems:</para>
-
-<screen>
- " * : &lt; &gt; ? | \
-</screen>
-
-<para>Cygwin can't fix this, but it has a method to workaround this
-restriction. All of the above characters, except for the backslash,
-are converted to special UNICODE characters in the range 0xf000 to 0xf0ff
-(the "Private use area") when creating or accessing files.</para>
-
-</sect2>
-
-<sect2 id="pathnames-casesensitive">
-<title>Case sensitive filenames</title>
-
-<para>In the Win32 subsystem filenames are only case-preserved, but not
-case-sensitive. You can't access two files in the same directory which
-only differ by case, like <filename>Abc</filename> and
-<filename>aBc</filename>. While NTFS (and some remote filesystems)
-support case-sensitivity, the NT kernel starting with Windows XP does
-not support it by default. Rather, you have to tweak a registry setting
-and reboot. For that reason, case-sensitivity is not supported by Cygwin,
-unless you change that registry value.</para>
-
-<para>If you really want case-sensitivity in Cygwin, you can switch it
-on by setting the registry value</para>
-
-<screen>
-HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\obcaseinsensitive
-</screen>
-
-<para>to 0 and reboot the machine. For least surprise, Cygwin expects
-this registry value also on Windows NT4 and Windows 2000, which usually
-both don't know this registry key. If you want case-sensitivity on these
-systems, create that registry value and set it to 0. On these systems
-(and *only* on these systems) you don't have to reboot to bring it
-into effect.</para>
-
-<note>
-<para>
-Note that when installing Microsoft's Services For Unix (SFU), you're asked if
-you want to use case-sensitive filenames. If you answer "yes" at this point,
-the installer will change the aforementioned registry value to 0, too. So, if
-you have SFU installed, there's some chance that the registry value is already
-set to case sensitivity.
-</para>
-</note>
-
-<para>After you set this registry value to 0, Cygwin will be case-sensitive
-by default on NTFS and NFS filesystems. Be aware that using two filenames
-which only differ by case might result in some weird interoperability
-issues with native Win32 applications. You're using case-sensitivity
-at your own risk. You have been warned!</para>
-
-<para>Even if you use case-sensitivity, it might be feasible to switch to
-case-insensitivity for certain paths for better interoperability with
-native Win32 applications (even if it's just Windows Explorer). You can do
-this on a per-mount point base, by using the "posix=0" mount option in
-/etc/fstab, or your /etc/fstab.d/$USER file.</para>
-
-<para>For a start, it might be best to switch the cygdrive path to
-case-insensitivity, because the default Windows $PATH variable is not
-always using the correct case by default. As a result, your shell will
-claim that it can't find Windows commands like <command>attrib</command>
-or <command>net</command>. Here's an example how you can switch the
-cygdrive prefix to case-insensitivity:</para>
-
-<example id="mount-caseinsensitive">
-<title>Example mount point to enforce case-insensitivity on cygdrive paths</title>
-<screen>
-none /cygdrive cygdrive binary,posix=0 0 0
-</screen>
-</example>
-
-<para>Note that mount points as well as device names and virtual
-paths like /proc are always case-sensitive! The only exception are
-the subdirs and filenames under /proc/registry, /proc/registry32
-and /proc/registry64. Registry access is always case-insensitive.
-Read on for more information.</para>
-
-</sect2>
-
-<sect2 id="pathnames-posixdevices"> <title>POSIX devices</title>
-<para>There is no need to create a POSIX <filename>/dev</filename>
-directory as Cygwin automatically simulates it internally.
-These devices cannot be seen with the command <command>ls /dev/</command>
-although commands such as <command>ls /dev/tty</command> work fine.
-If you want to be able to see all devices in
-<filename>/dev/</filename>, you can use Igor Pechtchanski's
-<ulink
-url="http://cygwin.com/ml/cygwin/2004-03/txt00028.txt">create_devices.sh</ulink>
-script.
-</para>
-
-<para>
-Cygwin supports the following character devices commonly found on POSIX systems:
-</para>
-
-<screen>
-/dev/null
-/dev/zero
-/dev/full
-
-/dev/console Pseudo device name for the standard console window created
- by Windows. Same as the one used for cmd.exe. Every one
- of them has this name. It's not quite comparable with the
- console device on UNIX machines.
-
-/dev/tty The current tty of a session running in a pseudo tty.
-/dev/ptmx Pseudo tty master device.
-/dev/ttym
-
-/dev/tty0 Pseudo ttys are numbered from /dev/tty0 upwards as they are
-/dev/tty1 requested.
-...
-
-/dev/ttyS0 Serial communication devices. ttyS0 == Win32 COM1,
-/dev/ttyS1 ttyS1 == COM2, etc.
-...
-
-/dev/pipe
-/dev/fifo
-
-/dev/mem The physical memory of the machine. Note that access to the
-/dev/port physical memory has been restricted with Windows Server 2003.
-/dev/kmem Since this OS, you can't access physical memory from user space.
-
-/dev/kmsg Kernel message pipe, for usage with sys logger services.
-
-/dev/random Random number generator.
-/dev/urandom
-
-/dev/dsp Default sound device of the system.
-</screen>
-
-<para>
-Cygwin also has several Windows-specific devices:
-</para>
-
-<screen>
-/dev/com1 The serial ports, starting with COM1 which is the same as ttyS0.
-/dev/com2 Please use /dev/ttySx instead.
-...
-
-/dev/conin Same as Windows CONIN$.
-/dev/conout Same as Windows CONOUT$.
-/dev/clipboard The Windows clipboard, text only
-/dev/windows The Windows message queue.
-</screen>
-
-<para>
-Block devices are accessible by Cygwin processes using fixed POSIX device
-names. These POSIX device names are generated using a direct conversion
-from the POSIX namespace to the internal NT namespace.
-E.g. the first harddisk is the NT internal device \device\harddisk0\partition0
-or the first partition on the third harddisk is \device\harddisk2\partition1.
-The first floppy in the system is \device\floppy0, the first CD-ROM is
-\device\cdrom0 and the first tape drive is \device\tape0. The mapping
-to the POSIX /dev namespace is as follows:
-</para>
-
-<screen>
-/dev/st0 \device\tape0, rewind
-/dev/nst0 \device\tape0, no-rewind
-/dev/st1 \device\tape1
-/dev/nst1 \device\tape1
-...
-/dev/st15
-/dev/nst15
-
-/dev/fd0 \device\floppy0
-/dev/fd1 \device\floppy1
-...
-/dev/fd15
-
-/dev/sr0 \device\cdrom0
-/dev/sr1 \device\cdrom1
-...
-/dev/sr15
-
-/dev/scd0 \device\cdrom0
-/dev/scd1 \device\cdrom1
-...
-/dev/scd15
-
-/dev/sda \device\harddisk0\partition0 (whole disk)
-/dev/sda1 \device\harddisk0\partition1 (first partition)
-...
-/dev/sda15 \device\harddisk0\partition15 (fifteenth partition)
-
-/dev/sdb \device\harddisk1\partition0
-/dev/sdb1 \device\harddisk1\partition1
-
-[up to]
-
-/dev/sddx \device\harddisk127\partition0
-/dev/sddx1 \device\harddisk127\partition1
-...
-/dev/sddx15 \device\harddisk127\partition15
-</screen>
-
-<para>
-if you don't like these device names, feel free to create symbolic
-links as they are created on Linux systems for convenience:
-</para>
-
-<screen>
-ln -s /dev/sr0 /dev/cdrom
-ln -s /dev/nst0 /dev/tape
-...
-</screen>
-
-</sect2>
-
-<sect2 id="pathnames-exe"><title>The .exe extension</title>
-
-<para>Win32 executable filenames end with <filename>.exe</filename>
-but the <filename>.exe</filename> need not be included in the command,
-so that traditional UNIX names can be used. However, for programs that
-end in <filename>.bat</filename> and <filename>.com</filename>, you
-cannot omit the extension. </para>
-
-<para>As a side effect, the <command> ls filename</command> gives
-information about <filename>filename.exe</filename> if
-<filename>filename.exe</filename> exists and <filename>filename</filename>
-does not. In the same situation the function call
-<function>stat("filename",..)</function> gives information about
-<filename>filename.exe</filename>. The two files can be distinguished
-by examining their inodes, as demonstrated below.
-<screen>
-<prompt>bash$</prompt> <userinput>ls * </userinput>
-a a.exe b.exe
-<prompt>bash$</prompt> <userinput>ls -i a a.exe</userinput>
-445885548 a 435996602 a.exe
-<prompt>bash$</prompt> <userinput>ls -i b b.exe</userinput>
-432961010 b 432961010 b.exe
-</screen>
-If a shell script <filename>myprog</filename> and a program
-<filename>myprog.exe</filename> coexist in a directory, the shell
-script has precedence and is selected for execution of
-<command>myprog</command>. Note that this was quite the reverse up to
-Cygwin 1.5.19. It has been changed for consistency with the rest of Cygwin.
-</para>
-
-<para>The <command>gcc</command> compiler produces an executable named
-<filename>filename.exe</filename> when asked to produce
-<filename>filename</filename>. This allows many makefiles written
-for UNIX systems to work well under Cygwin.</para>
-
-</sect2>
-
-<sect2 id="pathnames-proc"><title>The /proc filesystem</title>
-<para>
-Cygwin, like Linux and other similar operating systems, supports the
-<filename>/proc</filename> virtual filesystem. The files in this
-directory are representations of various aspects of your system,
-for example the command <userinput>cat /proc/cpuinfo</userinput>
-displays information such as what model and speed processor you have.
-</para>
-<para>
-One unique aspect of the Cygwin <filename>/proc</filename> filesystem
-is <filename>/proc/registry</filename>, see next section.
-</para>
-<para>
-The Cygwin <filename>/proc</filename> is not as complete as the
-one in Linux, but it provides significant capabilities. The
-<systemitem>procps</systemitem> package contains several utilities
-that use it.
-</para>
-</sect2>
-
-<sect2 id="pathnames-proc-registry"><title>The /proc/registry filesystem</title>
-<para>
-The <filename>/proc/registry</filename> filesystem provides read-only
-access to the Windows registry. It displays each <literal>KEY</literal>
-as a directory and each <literal>VALUE</literal> as a file. As anytime
-you deal with the Windows registry, use caution since changes may result
-in an unstable or broken system. There are additionally subdirectories called
-<filename>/proc/registry32</filename> and <filename>/proc/registry64</filename>.
-They are identical to <filename>/proc/registry</filename> on 32 bit
-host OSes. On 64 bit host OSes, <filename>/proc/registry32</filename>
-opens the 32 bit processes view on the registry, while
-<filename>/proc/registry64</filename> opens the 64 bit processes view.
-</para>
-<para>
-Reserved characters ('/', '\', ':', and '%') or reserved names
-(<filename>.</filename> and <filename>..</filename>) are converted by
-percent-encoding:
-<screen>
-<prompt>bash$</prompt> <userinput>regtool list -v '\HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices'</userinput>
-...
-\DosDevices\C: (REG_BINARY) = cf a8 97 e8 00 08 fe f7
-...
-<prompt>bash$</prompt> <userinput>cd /proc/registry/HKEY_LOCAL_MACHINE/SYSTEM</userinput>
-<prompt>bash$</prompt> <userinput>ls -l MountedDevices</userinput>
-...
--r--r----- 1 Admin SYSTEM 12 Dec 10 11:20 %5CDosDevices%5CC%3A
-...
-<prompt>bash$</prompt> <userinput>od -t x1 MountedDevices/%5CDosDevices%5CC%3A</userinput>
-0000000 cf a8 97 e8 00 08 fe f7 01 00 00 00
-</screen>
-The unnamed (default) value of a key can be accessed using the filename
-<filename>@</filename>.
-</para>
-<para>
-If a registry key contains a subkey and a value with the same name
-<filename>foo</filename>, Cygwin displays the subkey as
-<filename>foo</filename> and the value as <filename>foo%val</filename>.
-</para>
-</sect2>
-
-<sect2 id="pathnames-at"><title>The @pathnames</title>
-<para>To circumvent the limitations on shell line length in the native
-Windows command shells, Cygwin programs expand their arguments
-starting with "@" in a special way. If a file
-<filename>pathname</filename> exists, the argument
-<filename>@pathname</filename> expands recursively to the content of
-<filename>pathname</filename>. Double quotes can be used inside the
-file to delimit strings containing blank space.
-Embedded double quotes must be repeated.
-In the following example compare the behaviors of the bash built-in
-<command>echo</command> and of the program <command>/bin/echo</command>.</para>
-
-<example id="pathnames-at-ex"><title> Using @pathname</title>
-<screen>
-<prompt>bash$</prompt> <userinput>echo 'This is "a long" line' > mylist</userinput>
-<prompt>bash$</prompt> <userinput>echo @mylist</userinput>
-@mylist
-<prompt>bash$</prompt> <userinput>cmd</userinput>
-<prompt>c:\&gt;</prompt> <userinput>c:\cygwin\bin\echo @mylist</userinput>
-This is a long line
-</screen>
-</example>
-</sect2>
-</sect1>
diff --git a/winsup/doc/programming.sgml b/winsup/doc/programming.sgml
deleted file mode 100644
index 45f26f4..0000000
--- a/winsup/doc/programming.sgml
+++ /dev/null
@@ -1,11 +0,0 @@
-<chapter id="programming"><title>Programming with Cygwin</title>
-
-DOCTOOL-INSERT-gcc
-
-DOCTOOL-INSERT-gdb
-
-DOCTOOL-INSERT-dll
-
-DOCTOOL-INSERT-windres
-
-</chapter>
diff --git a/winsup/doc/setup-net.sgml b/winsup/doc/setup-net.sgml
deleted file mode 100644
index 165924d..0000000
--- a/winsup/doc/setup-net.sgml
+++ /dev/null
@@ -1,259 +0,0 @@
-<chapter id="setup-net"><title>Setting Up Cygwin</title>
-
-<sect1 id="internet-setup">
-<title>Internet Setup</title>
-<para>To install the Cygwin net release, go to <ulink
-url="http://cygwin.com/">http://cygwin.com/</ulink> and click on <ulink
-url="http://cygwin.com/setup.exe">"Install Cygwin Now!"</ulink>. This will
-download a GUI installer called <command>setup.exe</command> which can
-be run to download a complete cygwin installation via the internet.
-Follow the instructions on each screen to install Cygwin.
-</para>
-
-<para>
-The <command>setup.exe</command> installer is designed to be easy
-for new users to understand while remaining flexible for the
-experienced. The volunteer development team is constantly working
-on <command>setup.exe</command>; before requesting a new feature,
-check the wishlist in the <ulink url="http://sources.redhat.com/cgi-bin/cvsweb.cgi/setup/README?cvsroot=cygwin-apps&amp;rev=2">CVS <literal>README</literal>
-</ulink>. It may already be present in the CVS version!
-</para>
-
-<para>
-Since the default value for each option is the logical choice for
-most installations, you can get a working minimal Cygwin environment
-installed by simply clicking the <literal>Next</literal> button
-at each page. The only exception to this is choosing a Cygwin mirror,
-which you can choose by experimenting with those listed at
-<ulink url="http://cygwin.com/mirrors.html">
-http://cygwin.com/mirrors.html
-</ulink>. For more details about each of page of the
-<command>setup.exe</command> installation, read on below.
-Please note that this guide assumes that you have a basic understanding
-of Unix (or a Unix-like OS). If you are new to Unix, you will also want
-to make use of <ulink url="http://www.google.com/search?q=new+to+unix">
-other resources</ulink>.
-</para>
-
-<sect2 id="setup-download"><title>Download Source</title>
-<para>
-Cygwin uses packages to manage installing various software. When
-the default <literal>Install from Internet</literal> option is chosen,
-<command>setup.exe</command> creates a local directory to store
-the packages before actually installing the contents.
-<literal>Download from Internet</literal> performs only the first
-part (storing the packages locally), while
-<literal>Install from Local Directory</literal> performs only the
-second (installing the contents of the packages).
-</para>
-<para>
-The <literal>Download from Internet</literal> option is mainly
-for creating a base Cygwin package tree on one computer for
-installation on several machines with
-<literal>Install from Local Directory</literal>; copy the
-entire local package tree to another machine with the directory
-tree intact. For example, you might create a <literal>C:\cache\</literal>
-directory and place <command>setup.exe</command> in it. Run
-<command>setup.exe</command> to <literal>Install from Internet</literal>
-or <literal>Download from Internet</literal>, then copy the whole
-<literal>C:\cache\</literal> to each machine and instead choose
-<literal>Install from Local Directory</literal>. Unfortunately
-<command>setup.exe</command> does not yet support unattended installs.
-</para>
-<para>
-Though this provides some basic mirroring functionality, if you
-are managing a wide Cygwin installation, to keep up to date we recommend
-using a mirroring tool such as <command>wget</command>. A helpful user on
-the Cygwin mailing list created a simple demonstration script to accomplish
-this; search the list for <command>mkcygwget</command> for ideas.
-</para>
-</sect2>
-
-<sect2 id="setup-dir"><title>Selecting an Install Directory</title>
-<para>
-The <literal>Root Directory</literal> for Cygwin (default
-<literal>C:\cygwin</literal>) will become <literal>/</literal>
-within your Cygwin installation. You must have write access to
-the parent directory, and any ACLs on the parent directory will
-determine access to installed files.
-</para>
-<para>
-The <literal>Install For</literal> options of <literal>All Users</literal>
-or <literal>Just Me</literal> should always be left on the default
-<literal>All Users</literal>, unless you do not have write access to
-<literal>HKEY_LOCAL_MACHINE</literal> in the registry or the All Users
-Start Menu. This is true even if you are the only user planning to use Cygwin
-on the machine. Selecting <literal>Just Me</literal> will cause problems
-for programs such as <command>crond</command> and <command>sshd</command>.
-If you do not have the necessary permissions, but still want to use these
-programs, consult the Cygwin mailing list archives about others' experiences.
-
-</para>
-<para>
-The <literal>Default Text File Type</literal> should be left on
-<literal>Unix</literal> (that is, <literal>\n</literal>) unless you
-have a very good reason to switch it to
-<literal>DOS</literal> (that is, <literal>\r\n</literal>).
-</para>
-</sect2>
-
-<sect2 id="setup-localdir"><title>Local Package Directory</title>
-<para>
-The <literal>Local Package Directory</literal> is the cache where
-<command>setup.exe</command> stores the packages before they are
-installed. The cache must not be the same folder as the Cygwin
-root. Within the cache, a separate directory is created for each
-Cygwin mirror, which allows <command>setup.exe</command> to use
-multiple mirrors and custom packages. After installing Cygwin,
-the cache is no longer necessary, but you may want to retain the
-packages as backups, for installing Cygwin to another system,
-or in case you need to reinstall a package.
-</para>
-</sect2>
-
-<sect2 id="setup-connection"><title>Connection Method</title>
-<para>
-The <literal>Direct Connection</literal> method of downloading will
-directly download the packages, while the IE5 method will leverage your
-IE5 cache for performance. If your organisation uses a proxy server or
-auto-configuration scripts, the IE5 method also uses these settings.
-If you have a proxy server, you can manually type it into
-the <literal>Use Proxy</literal> section. Unfortunately,
-<command>setup.exe</command> does not currently support password
-authorization for proxy servers.
-</para>
-</sect2>
-
-<sect2 id="setup-mirror"><title>Choosing Mirrors</title>
-<para>
-Since there is no way of knowing from where you will be downloading
-Cygwin, you need to choose at least one mirror site. Cygwin mirrors
-are geographically distributed around the world; check the list at <ulink
-url="http://cygwin.com/mirrors.html">http://cygwin.com/mirrors.html</ulink>
-to find one near you. You can select multiple mirrors by holding down
-<literal>CTRL</literal> and clicking on each one. If you have the URL of
-an unlisted mirror (for example, if your organization has an internal Cygwin
-mirror) you can add it.
-</para>
-</sect2>
-
-<sect2 id="setup-packages"><title>Choosing Packages</title>
-<para>
-For each selected mirror site, <command>setup.exe</command> downloads a
-small text file called <literal>setup.bz2</literal> that contains a list
-of packages available from that site along with some basic information about
-each package which <command>setup.exe</command> parses and uses to create the
-chooser window. For details about the format of this file, see
-the <ulink url="http://sources.redhat.com/cygwin-apps/setup.html">
-setup.exe homepage</ulink>.
-</para>
-<para>
-The chooser is the most complex part of <command>setup.exe</command>.
-Packages are grouped into categories, and one package may belong to multiple
-categories (assigned by the volunteer package maintainer). Each package
-can be found under any of those categories in the heirarchial chooser view.
-By default <command>setup.exe</command>
-will install only the packages in the <literal>Base</literal> category
-and their dependencies, resulting in a minimal Cygwin installation.
-However, this will not include many commonly used tools such as
-<command>gcc</command> (which you will find in the <literal>Devel</literal>
-category). Since <command>setup.exe</command> automatically selects
-dependencies, be careful not to unselect any required packages. In
-particular, everything in the <literal>Base</literal> category is
-required.
-</para>
-<para>
-You can change <command>setup.exe</command>'s view style, which is helpful
-if you know the name of a package you want to install but not which
-category it is in.
-Click on the <literal>View</literal> button and it will rotate between
-<literal>Category</literal> (the default), <literal>Full</literal> (all
-packages), and <literal>Partial</literal> (only packages to be upgraded).
-If you are familiar with Unix, you will probably want to at least glance
-through the <literal>Full</literal> listing for your favorite tools.
-</para>
-<para>
-Once you have an existing Cygwin installation, the <command>setup.exe</command>
-chooser is also used to manage your Cygwin installation.
-Information on installed packages is kept in the
-<literal>/etc/setup/</literal> directory of your Cygwin installation; if
-<command>setup.exe</command> cannot find this directory it will act just like
-you had no Cygwin installation. If <command>setup.exe</command>
-finds a newer version of an installed package available, it will automatically
-mark it to be upgraded.
-To <literal>Uninstall</literal>, <literal>Reinstall</literal>, or get the
-<literal>Source</literal> for an existing package, click on
-<literal>Keep</literal> to toggle it.
-Also, to avoid the need to reboot after upgrading, make sure
-to close all Cygwin windows and stop all Cygwin processes before
-<command>setup.exe</command> begins to install the upgraded package.
-</para>
-<para>
-The final feature of the <command>setup.exe</command> chooser is for
-<literal>Previous</literal> and <literal>Experimental</literal> packages.
-By default the chooser shows only the current version of each package,
-though mirrors have at least one previous version and occasionally there
-is a testing or beta version of a package available. To see these package,
-click on the <literal>Prev</literal> or <literal>Exp</literal> radio button.
-Be warned, however, that the next time you run <command>setup.exe</command>
-it will try to replace old or experimental versions with the current
-stable version.
-</para>
-</sect2>
-
-<sect2 id="setup-progress"><title>Download and Installation Progress</title>
-<para>
-First, <command>setup.exe</command> will download all selected packages
-to the local directory chosen earlier. Before installing,
-<command>setup.exe</command> performs a checksum on each package. If the
-local directory is a slow medium (such as a network drive) this can take
-a long time. During the download and installation, <command>setup.exe</command>
-show progress bars for the current task and total remaining disk space.
-</para>
-</sect2>
-
-<sect2 id="setup-icons"><title>Icons</title>
-<para>
-You may choose to install shortcuts on the Desktop and/or Start Menu
-to start a <literal>bash</literal> shell. If you prefer to use a different
-shell or the native Windows version of <literal>rxvt</literal>, you can
-use these shortcuts as a guide to creating your own.
-</para>
-</sect2>
-
-<sect2 id="setup-postinstall"><title>Post-Install Scripts</title>
-<para>
-Last of all, <command>setup.exe</command> will run any post-install
-scripts to finish correctly setting up installed packages. Since each
-script is run separately, several windows may pop up. If you are
-interested in what is being done, see the Cygwin Package Contributor's
-Guide at <ulink
-url="http://cygwin.com/setup.html">http://cygwin.com/setup.html</ulink>
-When the last post-install script is completed, <command>setup.exe</command>
-will display a box announcing the completion. A few packages, such as
-the OpenSSH server, require some manual site-specific configuration.
-Relevant documentation can be found in the <literal>/usr/doc/Cygwin/</literal>
-or <literal>/usr/share/doc/Cygwin/</literal> directory.
-</para>
-</sect2>
-<sect2 id="setup-troubleshooting"><title>Troubleshooting</title>
-<para>
-Unfortunately, the complex setup process means that odd problems can
-occur. If you're having trouble downloading packages, it may be network
-congestion, so try a different mirror and/or a different protocol (i.e.,
-HTTP instead of FTP). If you notice something is not working after
-running setup, you can check the <command>setup.exe</command> log file
-at <literal>/var/log/setup.log.full</literal>. Make a backup of this
-file before running <command>setup.exe</command> again, and follow the
-steps for <ulink url="http://cygwin.com/problems.html">Reporting
-Problems with Cygwin</ulink>.
-</para>
-</sect2>
-
-</sect1>
-
-DOCTOOL-INSERT-setup-env
-DOCTOOL-INSERT-setup-maxmem
-DOCTOOL-INSERT-ntsec
-DOCTOOL-INSERT-setup-files
-</chapter>
diff --git a/winsup/doc/setup.sgml b/winsup/doc/setup.sgml
deleted file mode 100644
index 1ba28ab..0000000
--- a/winsup/doc/setup.sgml
+++ /dev/null
@@ -1,47 +0,0 @@
-<chapter id="setup"><title>Setting Up Cygwin</title>
-
-<sect1><title>Cygwin Contents</title>
-
-<para>The following packages are included in the native Win32
-release of GNUPro:</para>
-
-<para>GNUPro development tools: binutils, bison, byacc, dejagnu,
-diff, expect, flex, gas, gcc, gdb, itcl, ld, libstdc++, make, patch,
-tcl, tix, tk</para>
-
-<para>GNUPro unsupported tools: ash, bash, bzip2, diff, fileutils,
-findutils, gawk, grep, gzip, m4, sed, shellutils, tar, textutils,
-time</para>
-
-</sect1>
-
-<sect1 id="installing-binaries"><title>Installing the binary release</title>
-
-<para>Load the GNUPro CD-ROM and run the installer. It will
-take you through the installation process, starting with asking for
-your install location. Once the installation is complete, there will
-be a new Program Files folder that you can use to obtain a shell
-from which you can run the tools.</para>
-
-<para>There are two remaining thing you should do from this
-prompt. First, you need to type <command>mkdir -p /tmp</command> to
-ensure that a temp directory exists for programs that expect to find
-one there.</para>
-
-<para>Second, depending on how you intend to use the tools, various
-programs may need to be able to find `/bin/sh'. You should `mkdir -p
-/bin' and put a copy of `sh.exe' there, removing the older version, if
-present. Note that you can use the `mount' utility to select which
-drive letter is mounted as `/'.</para>
-
-<para>If you should ever want to uninstall the tools, you may do so
-via the "Add/Remove Programs" control panel.</para>
-
-</sect1>
-
-DOCTOOL-INSERT-setup-dir
-DOCTOOL-INSERT-setup-env
-DOCTOOL-INSERT-ntsec
-DOCTOOL-INSERT-setup-reg
-DOCTOOL-INSERT-setup-mount
-</chapter>
diff --git a/winsup/doc/setup2.sgml b/winsup/doc/setup2.sgml
deleted file mode 100644
index 4ae4d4f..0000000
--- a/winsup/doc/setup2.sgml
+++ /dev/null
@@ -1,207 +0,0 @@
-<sect1 id="setup-env"><title>Environment Variables</title>
-
-<para>
-Before starting bash, you may set some environment variables. A .bat
-file is provided where the most important ones are set before bash in
-launched. This is the safest way to launch bash initially. The .bat
-file is installed in the root directory that you specified during setup
-and pointed to in the Start Menu under the "Cygwin" option. You can
-edit it this file your liking.</para>
-
-<para>
-The <envar>CYGWIN</envar> variable is used to configure many global
-settings for the Cygwin runtime system. Initially you can leave
-<envar>CYGWIN</envar> unset or set it to <literal>tty</literal> (e.g.
-to support job control with ^Z etc...) using a syntax like this in the
-DOS shell, before launching bash. </para>
-
-<screen>
-<prompt>C:\&gt;</prompt> <userinput>set CYGWIN=tty notitle glob</userinput>
-</screen>
-
-<para>
-The <envar>PATH</envar> environment variable is used by Cygwin
-applications as a list of directories to search for executable files
-to run. This environment variable is converted from Windows format
-(e.g. <filename>C:\Windows\system32;C:\Windows</filename>) to UNIX format
-(e.g., <filename>/cygdrive/c/Windows/system32:/cygdrive/c/Windows</filename>)
-when a Cygwin process first starts.
-Set it so that it contains at least the <filename>x:\cygwin\bin</filename>
-directory where "<filename>x:\cygwin</filename> is the "root" of your
-cygwin installation if you wish to use cygwin tools outside of bash.
-This is usually done by the batch file you're starting your shell with.
-</para>
-
-<para>
-The <envar>HOME</envar> environment variable is used by many programs to
-determine the location of your home directory and we recommend that it be
-defined. This environment variable is also converted from Windows format
-when a Cygwin process first starts. It's usually set in the shell
-profile scripts in the /etc directory.
-</para>
-
-<para>
-The <envar>TERM</envar> environment variable specifies your terminal
-type. It is automatically set to <literal>cygwin</literal> if you have
-not set it to something else.
-</para>
-
-<para>The <envar>LD_LIBRARY_PATH</envar> environment variable is used by
-the Cygwin function <function>dlopen ()</function> as a list of
-directories to search for .dll files to load. This environment variable
-is converted from Windows format to UNIX format when a Cygwin process
-first starts. Most Cygwin applications do not make use of the
-<function>dlopen ()</function> call and do not need this variable.
-</para>
-
-</sect1>
-
-<sect1 id="setup-maxmem"><title>Changing Cygwin's Maximum Memory</title>
-
-<para>
-Cygwin's heap is extensible. However, it does start out at a fixed size
-and attempts to extend it may run into memory which has been previously
-allocated by Windows. In some cases, this problem can be solved by
-adding an entry in the either the <literal>HKEY_LOCAL_MACHINE</literal>
-(to change the limit for all users) or
-<literal>HKEY_CURRENT_USER</literal> (for just the current user) section
-of the registry. </para>
-
-<para>
-Add the <literal>DWORD</literal> value <literal>heap_chunk_in_mb</literal>
-and set it to the desired memory limit in decimal MB. It is preferred to do
-this in Cygwin using the <command>regtool</command> program included in the
-Cygwin package.
-(For more information about <command>regtool</command> or the other Cygwin
-utilities, see <xref linkend="using-utils"></xref> or use each the
-<literal>--help</literal> option of each util.) You should always be careful
-when using <command>regtool</command> since damaging your system registry can
-result in an unusable system. This example sets memory limit to 1024 MB:
-
-<screen>
-regtool -i set /HKLM/Software/Cygwin/heap_chunk_in_mb 1024
-regtool -v list /HKLM/Software/Cygwin
-</screen>
-</para>
-
-<para>
-Exit all running Cygwin processes and restart them. Memory can be allocated up
-to the size of the system swap space minus any the size of any running
-processes. The system swap should be at least as large as the physically
-installed RAM and can be modified under the System category of the
-Control Panel.
-</para>
-
-<para>
-Here is a small program written by DJ Delorie that tests the
-memory allocation limit on your system:
-
-<screen>
-main()
-{
- unsigned int bit=0x40000000, sum=0;
- char *x;
-
- while (bit > 4096)
- {
- x = malloc(bit);
- if (x)
- sum += bit;
- bit >>= 1;
- }
- printf("%08x bytes (%.1fMb)\n", sum, sum/1024.0/1024.0);
- return 0;
-}
-</screen>
-
-You can compile this program using:
-<screen>
-gcc max_memory.c -o max_memory.exe
-</screen>
-
-Run the program and it will output the maximum amount of allocatable memory.
-</para>
-
-</sect1>
-
-<sect1 id="setup-files"><title>Customizing bash</title>
-
-<para>
-To set bash up so that cut and paste work properly, click on the
-"Properties" button of the window, then on the "Misc" tab. Make sure
-that "QuickEdit mode" and "Insert mode" are checked. These settings
-will be remembered next time you run bash from that shortcut. Similarly
-you can set the working directory inside the "Program" tab. The entry
-"%HOME%" is valid, but requires that you set <envar>HOME</envar> in
-the Windows environment.
-</para>
-
-<para>
-Your home directory should contain three initialization files
-that control the behavior of bash. They are
-<filename>.profile</filename>, <filename>.bashrc</filename> and
-<filename>.inputrc</filename>. The Cygwin base installation creates
-stub files when you start bash for the first time.</para>
-
-<para>
-<filename>.profile</filename> (other names are also valid, see the bash man
-page) contains bash commands. It is executed when bash is started as login
-shell, e.g. from the command <command>bash --login</command>.
-This is a useful place to define and
-export environment variables and bash functions that will be used by bash
-and the programs invoked by bash. It is a good place to redefine
-<envar>PATH</envar> if needed. We recommend adding a ":." to the end of
-<envar>PATH</envar> to also search the current working directory (contrary
-to DOS, the local directory is not searched by default). Also to avoid
-delays you should either <command>unset</command> <envar>MAILCHECK</envar>
-or define <envar>MAILPATH</envar> to point to your existing mail inbox.
-</para>
-
-<para>
-<filename>.bashrc</filename> is similar to
-<filename>.profile</filename> but is executed each time an interactive
-bash shell is launched. It serves to define elements that are not
-inherited through the environment, such as aliases. If you do not use
-login shells, you may want to put the contents of
-<filename>.profile</filename> as discussed above in this file
-instead.
-</para>
-
-<para>
-<screen>
-shopt -s nocaseglob
-</screen>
-will allow bash to glob filenames in a case-insensitive manner.
-Note that <filename>.bashrc</filename> is not called automatically for login
-shells. You can source it from <filename>.profile</filename>.
-</para>
-
-<para>
-<filename>.inputrc</filename> controls how programs using the readline
-library (including <command>bash</command>) behave. It is loaded
-automatically. For full details see the <literal>Function and Variable
-Index</literal> section of the GNU <systemitem>readline</systemitem> manual.
-Consider the following settings:
-<screen>
-# Ignore case while completing
-set completion-ignore-case on
-# Make Bash 8bit clean
-set meta-flag on
-set convert-meta off
-set output-meta on
-</screen>
-The first command makes filename completion case insensitive, which can
-be convenient in a Windows environment. The next three commands allow
-<command>bash</command> to display 8-bit characters, useful for
-languages with accented characters. Note that tools that do not use
-<systemitem>readline</systemitem> for display, such as
-<command>less</command> and <command>ls</command>, require additional
-settings, which could be put in your <filename>.bashrc</filename>:
-<screen>
-alias less='/bin/less -r'
-alias ls='/bin/ls -F --color=tty --show-control-chars'
-</screen>
-</para>
-
-</sect1>
-
diff --git a/winsup/doc/textbinary.sgml b/winsup/doc/textbinary.sgml
deleted file mode 100644
index 674c39e..0000000
--- a/winsup/doc/textbinary.sgml
+++ /dev/null
@@ -1,159 +0,0 @@
-<sect1 id="using-textbinary"><title>Text and Binary modes</title>
-
-<sect2 id="textbin-issue"> <title>The Issue</title>
-
-<para>On a UNIX system, when an application reads from a file it gets
-exactly what's in the file on disk and the converse is true for writing.
-The situation is different in the DOS/Windows world where a file can
-be opened in one of two modes, binary or text. In the binary mode the
-system behaves exactly as in UNIX. However on writing in text mode, a
-NL (\n, ^J) is transformed into the sequence CR (\r, ^M) NL.
-</para>
-
-<para>This can wreak havoc with the seek/fseek calls since the number
-of bytes actually in the file may differ from that seen by the
-application.</para>
-
-<para>The mode can be specified explicitly as explained in the Programming
-section below. In an ideal DOS/Windows world, all programs using lines as
-records (such as <command>bash</command>, <command>make</command>,
-<command>sed</command> ...) would open files (and change the mode of their
-standard input and output) as text. All other programs (such as
-<command>cat</command>, <command>cmp</command>, <command>tr</command> ...)
-would use binary mode. In practice with Cygwin, programs that deal
-explicitly with object files specify binary mode (this is the case of
-<command>od</command>, which is helpful to diagnose CR problems). Most
-other programs (such as <command>cat</command>, <command>cmp</command>,
-<command>tr</command>) use the default mode.</para>
-
-</sect2>
-
-<sect2 id="textbin-default"><title>The default Cygwin behavior</title>
-
-<para>The Cygwin system gives us some flexibility in deciding how files
-are to be opened when the mode is not specified explicitly.
-The rules are evolving, this section gives the design goals.</para>
-<orderedlist numeration="loweralpha">
-<listitem>
-<para>If the filename is specified as a POSIX path and it appears to
-reside on a file system that is mounted (i.e. if its pathname starts
-with a directory displayed by <command>mount</command>), then the
-default is specified by the mount flag. If the file is a symbolic link,
-the mode of the target file system applies.</para>
-</listitem>
-<listitem>
-<para>If the file is specified via a MS-DOS pathname (i.e., it contains a
-backslash or a colon), the default is binary.
-</para>
-</listitem>
-<listitem>
-<para>Pipes and non-file devices are opened in binary mode,
-except if the <envar>CYGWIN</envar> environment variable contains
-<literal>nobinmode</literal>. Sockets are always opened in binary
-mode.</para>
-</listitem>
-
-<listitem>
-<para> When redirecting, the Cygwin shells uses rules (a-e). For
-these shells the relevant value of <envar>CYGWIN</envar> is that at the time
-the shell was launched and not that at the time the program is executed.
-Non-Cygwin shells always pipe and redirect with binary mode. With
-non-Cygwin shells the commands <command> cat filename | program </command>
-and <command> program &lt; filename </command> are not equivalent when
-<filename>filename</filename> is on a text-mounted partition. </para>
-</listitem>
-</orderedlist>
-</sect2>
-
-<sect2 id="textbin-example"><title>Example</title>
-<para>To illustrate the various rules, we provide scripts to delete CRs
-from files by using the <command>tr</command> program, which can only write
-to standard output.
-The script</para>
-<screen>
-<![CDATA[
-#!/bin/sh
-# Remove \r from the file given as argument
-tr -d '\r' < "$1" > "$1".nocr
-]]>
-</screen>
-<para> will not work on a text mounted systems because the \r will be
-reintroduced on writing. However scripts such as </para>
-<screen>
-<![CDATA[
-#!/bin/sh
-# Remove \r from the file given as argument
-tr -d '\r' | gzip | gunzip > "$1".nocr
-]]>
-</screen>
-<para>and the .bat file</para>
-<screen>
-<![CDATA[
-REM Remove \r from the file given as argument
-@echo off
-tr -d \r < %1 > %1.nocr
-]]>
-</screen>
-<para> work fine. In the first case (assuming the pipes are binary)
-we rely on <command>gunzip</command> to set its output to binary mode,
-possibly overriding the mode used by the shell.
-In the second case we rely on the DOS shell to redirect in binary mode.
-</para>
-</sect2>
-
-<sect2 id="textbin-question"><title>Binary or text?</title>
-
-<para>UNIX programs that have been written for maximum portability
-will know the difference between text and binary files and act
-appropriately under Cygwin. For those programs, the text mode default
-is a good choice. Programs included in official Cygwin distributions
-should work well in the default mode. </para>
-
-<para>Text mode makes it much easier to mix files between Cygwin and
-Windows programs, since Windows programs will usually use the CRLF
-format. Unfortunately you may still have some problems with text
-mode. First, some of the utilities included with Cygwin do not yet
-specify binary mode when they should.
-Second, you will introduce CRs in text
-files you write, which can cause problems when moving them back to a
-UNIX system. </para>
-
-<para>If you are mounting a remote file system from a UNIX machine,
-or moving files back and forth to a UNIX machine, you may want to
-access the files in binary mode. The text files found there will normally
-be in UNIX NL format, and you would want any files put there by Cygwin
-programs to be stored in a format understood by UNIX.
-Be sure to remove CRs from all Makefiles and
-shell scripts and make sure that you only edit the files with
-DOS/Windows editors that can cope with and preserve NL terminated lines.
-</para>
-
-<para>Note that you can decide this on a disk by disk basis (for
-example, mounting local disks in text mode and network disks in binary
-mode). You can also partition a disk, for example by mounting
-<filename>c:</filename> in text mode, and <filename>c:\home</filename>
-in binary mode.</para>
-
-</sect2>
-
-<sect2 id="textbin-devel"><title>Programming</title>
-
-<para>In the <function>open()</function> function call, binary mode can be
-specified with the flag <literal>O_BINARY</literal> and text mode with
-<literal>O_TEXT</literal>. These symbols are defined in
-<filename>fcntl.h</filename>.</para>
-
-<para>In the <function>fopen()</function> function call, binary mode can be
-specified by adding a <literal>b</literal> to the mode string. Text mode is specified
-by adding a <literal>t</literal> to the mode string.</para>
-
-<para>The mode of a file can be changed by the call
-<function>setmode(fd,mode)</function> where <literal>fd</literal> is a file
-descriptor (an integer) and <literal>mode</literal> is
-<literal>O_BINARY</literal> or <literal>O_TEXT</literal>. The function
-returns <literal>O_BINARY</literal> or <literal>O_TEXT</literal> depending
-on the mode before the call, and <literal>EOF</literal> on error.</para>
-
-</sect2>
-
-</sect1>
diff --git a/winsup/doc/using.sgml b/winsup/doc/using.sgml
deleted file mode 100644
index 4678cff..0000000
--- a/winsup/doc/using.sgml
+++ /dev/null
@@ -1,23 +0,0 @@
-<chapter id="using"><title>Using Cygwin</title>
-
-<para>This chapter explains some key differences between the Cygwin
-environment and traditional UNIX systems. It assumes a working
-knowledge of standard UNIX commands.</para>
-
-DOCTOOL-INSERT-using-pathnames
-
-DOCTOOL-INSERT-using-textbinary
-
-DOCTOOL-INSERT-using-filemodes
-
-DOCTOOL-INSERT-using-specialnames
-
-DOCTOOL-INSERT-using-cygwinenv
-
-DOCTOOL-INSERT-using-cygserver
-
-DOCTOOL-INSERT-using-utils
-
-DOCTOOL-INSERT-using-effectively
-
-</chapter>
diff --git a/winsup/doc/windres.sgml b/winsup/doc/windres.sgml
deleted file mode 100644
index 82c537d..0000000
--- a/winsup/doc/windres.sgml
+++ /dev/null
@@ -1,169 +0,0 @@
-
-<sect1 id="windres"><title>Defining Windows Resources</title>
-
-<para><filename>windres</filename> reads a Windows resource file
-(<filename>*.rc</filename>) and converts it to a res or coff file.
-The syntax and semantics of the input file are the same as for any
-other resource compiler, so please refer to any publication describing
-the Windows resource format for details. Also, the
-<filename>windres</filename> program itself is fully documented in the
-Binutils manual. Here's an example of using it in a project:</para>
-
-<screen>
-<![CDATA[
-myapp.exe : myapp.o myapp.res
- gcc -mwindows myapp.o myapp.res -o $@
-
-myapp.res : myapp.rc resource.h
- windres $< -O coff -o $@
-]]>
-</screen>
-
-
-<para>What follows is a quick-reference to the syntax
-<filename>windres</filename> supports.</para>
-
-<screen>
-
-id ACCELERATORS suboptions
-BEG
-"^C" 12
-"Q" 12
-65 12
-65 12 , VIRTKEY ASCII NOINVERT SHIFT CONTROL ALT
-65 12 , VIRTKEY, ASCII, NOINVERT, SHIFT, CONTROL, ALT
-(12 is an acc_id)
-END
-
-SHIFT, CONTROL, ALT require VIRTKEY
-
-
-id BITMAP memflags "filename"
-memflags defaults to MOVEABLE
-
-
-id CURSOR memflags "filename"
-memflags defaults to MOVEABLE,DISCARDABLE
-
-
-id DIALOG memflags exstyle x,y,width,height styles BEG controls END
-id DIALOGEX memflags exstyle x,y,width,height styles BEG controls END
-id DIALOGEX memflags exstyle x,y,width,height,helpid styles BEG controls END
-
-memflags defaults to MOVEABLE
-exstyle may be EXSTYLE=number
-styles: CAPTION "string"
- CLASS id
- STYLE FOO | NOT FOO | (12)
- EXSTYLE number
- FONT number, "name"
- FONT number, "name",weight,italic
- MENU id
- CHARACTERISTICS number
- LANGUAGE number,number
- VERSIONK number
-controls:
- AUTO3STATE params
- AUTOCHECKBOX params
- AUTORADIOBUTTON params
- BEDIT params
- CHECKBOX params
- COMBOBOX params
- CONTROL ["name",] id, class, style, x,y,w,h [,exstyle] [data]
- CONTROL ["name",] id, class, style, x,y,w,h, exstyle, helpid [data]
- CTEXT params
- DEFPUSHBUTTON params
- EDITTEXT params
- GROUPBOX params
- HEDIT params
- ICON ["name",] id, x,y [data]
- ICON ["name",] id, x,y,w,h, style, exstyle [data]
- ICON ["name",] id, x,y,w,h, style, exstyle, helpid [data]
- IEDIT params
- LISTBOX params
- LTEXT params
- PUSHBOX params
- PUSHBUTTON params
- RADIOBUTTON params
- RTEXT params
- SCROLLBAR params
- STATE3 params
- USERBUTTON "string", id, x,y,w,h, style, exstyle
-params:
- ["name",] id, x, y, w, h, [data]
- ["name",] id, x, y, w, h, style [,exstyle] [data]
- ["name",] id, x, y, w, h, style, exstyle, helpid [data]
-
-[data] is optional BEG (string|number) [,(string|number)] (etc) END
-
-
-id FONT memflags "filename"
-memflags defaults to MOVEABLE|DISCARDABLE
-
-id ICON memflags "filename"
-memflags defaults to MOVEABLE|DISCARDABLE
-
-LANGUAGE num,num
-
-id MENU options BEG items END
-items:
- "string", id, flags
- SEPARATOR
- POPUP "string" flags BEG menuitems END
-flags:
- CHECKED
- GRAYED
- HELP
- INACTIVE
- MENUBARBREAK
- MENUBREAK
-
-id MENUEX suboptions BEG items END
-items:
- MENUITEM "string"
- MENUITEM "string", id
- MENUITEM "string", id, type [,state]
- POPUP "string" BEG items END
- POPUP "string", id BEG items END
- POPUP "string", id, type BEG items END
- POPUP "string", id, type, state [,helpid] BEG items END
-
-id MESSAGETABLE memflags "filename"
-memflags defaults to MOVEABLE
-
-id RCDATA suboptions BEG (string|number) [,(string|number)] (etc) END
-
-STRINGTABLE suboptions BEG strings END
-strings:
- id "string"
- id, "string"
-
-(User data)
-id id suboptions BEG (string|number) [,(string|number)] (etc) END
-
-id VERSIONINFO stuffs BEG verblocks END
-stuffs: FILEVERSION num,num,num,num
- PRODUCTVERSION num,num,num,num
- FILEFLAGSMASK num
- FILEOS num
- FILETYPE num
- FILESUBTYPE num
-verblocks:
- BLOCK "StringFileInfo" BEG BLOCK BEG vervals END END
- BLOCK "VarFileInfo" BEG BLOCK BEG vertrans END END
-vervals: VALUE "foo","bar"
-vertrans: VALUE num,num
-
-
-
-suboptions:
- memflags
- CHARACTERISTICS num
- LANGUAGE num,num
- VERSIONK num
-
-memflags are MOVEABLE/FIXED PURE/IMPURE PRELOAD/LOADONCALL DISCARDABLE
-
-</screen>
-
-</sect1>
diff --git a/winsup/lsaauth/ChangeLog b/winsup/lsaauth/ChangeLog
deleted file mode 100644
index 437fcbc..0000000
--- a/winsup/lsaauth/ChangeLog
+++ /dev/null
@@ -1,70 +0,0 @@
-2008-10-12 Christopher Faylor <me+cygwin@cgf.cx>
-
- * Makefile.in: Rearrange to avoid -mno-cygwin.
- * configure.in: Use mingw front-end from utils directory as compiler
- front-end.
- * configure: Regenerate.
- * cyglsa.c (cyglsa_printf): Rename from 'printf' to avoid a compiler
- error.
- (print_sid, print_groups, print_privs, print_dacl, print_tokinf,
- LsaApLogonUserEx): Ditto.
-
-2008-08-13 Corinna Vinschen <corinna@vinschen.de>
-
- * cyglsa-config: Copy the DLL instead of moving.
-
-2008-07-16 Corinna Vinschen <corinna@vinschen.de>
-
- * cyglsa-config: Always create a /bin/cyglsa directory and copy the
- LSA DLL there. Register this copy in the registry.
-
-2008-07-15 Corinna Vinschen <corinna@vinschen.de>
-
- * cyglsa.c: Include ntddk.h again, but only if __MINGW32__ is defined.
- * cyglsa64.dll: Regenerate.
- * make-64bit-version-with-visual-c.bat: Fix comment.
-
-2008-07-13 Corinna Vinschen <corinna@vinschen.de>
-
- * cyglsa.c: Don't include ntddk.h.
- (RtlInitEmptyUnicodeString): Use Visual-C compatible "__inline" instead
- of "inline".
- (uni_alloc): Change second argument to USHORT.
- (printf): Move definition of ap to make Visual-C++ happy.
- (LsaApLogonUserEx): Compute size of datastructure returned to
- LSA on 64 bit systems correctly to avoid heap corruption.
- * cyglsa64.dll: Regenerate.
- * make-64bit-version-with-visual-c.bat: Accommodate newer Microsoft
- toolchains. Add more comment.
- * mslsa.def: Export LsaApLogonUserEx instead of LsaApLogonUser.
-
-2008-07-11 Corinna Vinschen <corinna@vinschen.de>
-
- * cyglsa.c (LsaApLogonUserEx): Accommodate the fact that authinf->domain
- and authinf->username are now of type WCHAR. Change sam_username and
- sam_u size to be deifned in terms of MAX_DOMAIN_NAME_LEN instead of
- INTERNET_MAX_HOST_NAME_LENGTH.
-
-2008-07-10 Corinna Vinschen <corinna@vinschen.de>
-
- * cyglsa.c: Revamp debugging output.
- (LsaApInitializePackage): Open debugging output file here.
- (LsaApLogonUserEx): Replace LsaApLogonUser. Add debugging output.
- Create machine name for accounting. Add (disabled) code to fetch
- a token from GetAuthDataForUser/ConvertAuthDataToToken.
- * cyglsa.din: Relace LsaApLogonUser with LsaApLogonUserEx.
-
-2006-11-27 Corinna Vinschen <corinna@vinschen.de>
-
- Initial release of the Cygwin LSA authentication package.
- * ChangeLog: New file.
- * Makefile.in: Ditto.
- * aclocal.m4: Ditto.
- * configure.in: Ditto.
- * configure: Ditto. Generated from configure.in.
- * cyglsa-config: Ditto.
- * cyglsa.c: Ditto.
- * cyglsa.din: Ditto.
- * cyglsa64.dll: Ditto.
- * make-64bit-version-with-visual-c.bat: Ditto.
- * mslsa.def: Ditto.
diff --git a/winsup/lsaauth/Makefile.in b/winsup/lsaauth/Makefile.in
deleted file mode 100644
index c4cdcce..0000000
--- a/winsup/lsaauth/Makefile.in
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright (c) 2006, Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# A copy of the GNU General Public License can be found at
-# http://www.gnu.org/
-#
-# Written by Corinna Vinschen <vinschen@redhat.de>
-#
-# Makefile for Cygwin subauthentication DLL.
-
-SHELL := @SHELL@
-
-srcdir := @srcdir@
-VPATH := @srcdir@
-prefix := @prefix@
-exec_prefix := @exec_prefix@
-
-bindir := @bindir@
-etcdir := $(exec_prefix)/etc
-
-INSTALL := @INSTALL@
-INSTALL_PROGRAM := @INSTALL_PROGRAM@
-INSTALL_DATA := @INSTALL_DATA@
-
-CC := @CC@
-CC_FOR_TARGET := $(CC)
-
-override CC := @NO_CYGWIN@ $(firstword ${CC})
-
-CFLAGS := @CFLAGS@
-
-include $(srcdir)/../Makefile.common
-
-WIN32_INCLUDES := -I. -I$(srcdir) $(w32api_include) $(w32api_include)/ddk
-WIN32_CFLAGS := $(CFLAGS) $(WIN32_COMMON) $(WIN32_INCLUDES)
-WIN32_LDFLAGS := $(CFLAGS) $(WIN32_COMMON) -nostdlib -Wl,-shared
-
-ifdef MINGW_CC
-override CC:=${MINGW_CC}
-endif
-
-LIBS := -ladvapi32 -lkernel32 -lntdll
-
-DLL := cyglsa.dll
-DEF_FILE:= cyglsa.def
-
-OBJ = cyglsa.o
-
-.SUFFIXES:
-.NOEXPORT:
-
-all: Makefile $(DLL)
-
-$(DEF_FILE): cyglsa.din config.status
- $(SHELL) config.status
-
-$(DLL): $(OBJ) $(DEF_FILE)
- $(CC) -s $(WIN32_LDFLAGS) -o $@ $^ $(LIBS)
-
-.PHONY: all install clean realclean
-
-realclean: clean
- rm -f Makefile config.cache
-
-clean:
- rm -f *.o *.dll
-
-install: all
- $(SHELL) $(updir1)/mkinstalldirs $(bindir)
- $(INSTALL_PROGRAM) $(DLL) $(bindir)/$(DLL)
- $(INSTALL_PROGRAM) $(srcdir)/cyglsa64.dll $(bindir)/cyglsa64.dll
- $(INSTALL_PROGRAM) $(srcdir)/cyglsa-config $(bindir)/cyglsa-config
-
-%.o: %.c
- $(CC) $(WIN32_CFLAGS) -c -o $@ $<
diff --git a/winsup/lsaauth/aclocal.m4 b/winsup/lsaauth/aclocal.m4
deleted file mode 100644
index ecef424..0000000
--- a/winsup/lsaauth/aclocal.m4
+++ /dev/null
@@ -1,875 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-# lib-prefix.m4 serial 4 (gettext-0.14.2)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
-dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
-dnl require excessive bracketing.
-ifdef([AC_HELP_STRING],
-[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
-[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
-
-dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
-dnl to access previously installed libraries. The basic assumption is that
-dnl a user will want packages to use other packages he previously installed
-dnl with the same --prefix option.
-dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
-dnl libraries, but is otherwise very convenient.
-AC_DEFUN([AC_LIB_PREFIX],
-[
- AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib-prefix],
-[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
- --without-lib-prefix don't search for libraries in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
- fi
- fi
-])
- if test $use_additional = yes; then
- dnl Potentially add $additional_includedir to $CPPFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's already present in $CPPFLAGS,
- dnl 3. if it's /usr/local/include and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- for x in $CPPFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $CPPFLAGS.
- CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- dnl Potentially add $additional_libdir to $LDFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's already present in $LDFLAGS,
- dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
- haveit=
- for x in $LDFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_libdir" = "X/usr/local/lib"; then
- if test -n "$GCC"; then
- case $host_os in
- linux*) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LDFLAGS.
- LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- fi
-])
-
-dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
-dnl acl_final_exec_prefix, containing the values to which $prefix and
-dnl $exec_prefix will expand at the end of the configure script.
-AC_DEFUN([AC_LIB_PREPARE_PREFIX],
-[
- dnl Unfortunately, prefix and exec_prefix get only finally determined
- dnl at the end of configure.
- if test "X$prefix" = "XNONE"; then
- acl_final_prefix="$ac_default_prefix"
- else
- acl_final_prefix="$prefix"
- fi
- if test "X$exec_prefix" = "XNONE"; then
- acl_final_exec_prefix='${prefix}'
- else
- acl_final_exec_prefix="$exec_prefix"
- fi
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
- prefix="$acl_save_prefix"
-])
-
-dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
-dnl variables prefix and exec_prefix bound to the values they will have
-dnl at the end of the configure script.
-AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
-[
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- acl_save_exec_prefix="$exec_prefix"
- exec_prefix="$acl_final_exec_prefix"
- $1
- exec_prefix="$acl_save_exec_prefix"
- prefix="$acl_save_prefix"
-])
-
-# lib-link.m4 serial 6 (gettext-0.14.3)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_PREREQ(2.50)
-
-dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
-dnl augments the CPPFLAGS variable.
-AC_DEFUN([AC_LIB_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
- ac_cv_lib[]Name[]_libs="$LIB[]NAME"
- ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
- ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
- ])
- LIB[]NAME="$ac_cv_lib[]Name[]_libs"
- LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
- INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
- dnl results of this search when this library appears as a dependency.
- HAVE_LIB[]NAME=yes
- undefine([Name])
- undefine([NAME])
-])
-
-dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
-dnl searches for libname and the libraries corresponding to explicit and
-dnl implicit dependencies, together with the specified include files and
-dnl the ability to compile and link the specified testcode. If found, it
-dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
-dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
-dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
-dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
-AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-
- dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
- dnl accordingly.
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
-
- dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
- dnl because if the user has installed lib[]Name and not disabled its use
- dnl via --without-lib[]Name-prefix, he wants to use it.
- ac_save_CPPFLAGS="$CPPFLAGS"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-
- AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS $LIB[]NAME"
- AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
- LIBS="$ac_save_LIBS"
- ])
- if test "$ac_cv_lib[]Name" = yes; then
- HAVE_LIB[]NAME=yes
- AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
- AC_MSG_CHECKING([how to link with lib[]$1])
- AC_MSG_RESULT([$LIB[]NAME])
- else
- HAVE_LIB[]NAME=no
- dnl If $LIB[]NAME didn't lead to a usable library, we don't need
- dnl $INC[]NAME either.
- CPPFLAGS="$ac_save_CPPFLAGS"
- LIB[]NAME=
- LTLIB[]NAME=
- fi
- AC_SUBST([HAVE_LIB]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- undefine([Name])
- undefine([NAME])
-])
-
-dnl Determine the platform dependent parameters needed to use rpath:
-dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
-dnl hardcode_direct, hardcode_minus_L.
-AC_DEFUN([AC_LIB_RPATH],
-[
- dnl Tell automake >= 1.10 to complain if config.rpath is missing.
- m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
- AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
- AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
- AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
- AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
- CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
- ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
- . ./conftest.sh
- rm -f ./conftest.sh
- acl_cv_rpath=done
- ])
- wl="$acl_cv_wl"
- libext="$acl_cv_libext"
- shlibext="$acl_cv_shlibext"
- hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
- hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
- hardcode_direct="$acl_cv_hardcode_direct"
- hardcode_minus_L="$acl_cv_hardcode_minus_L"
- dnl Determine whether the user wants rpath handling at all.
- AC_ARG_ENABLE(rpath,
- [ --disable-rpath do not hardcode runtime library paths],
- :, enable_rpath=yes)
-])
-
-dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
-AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
-[
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib$1-prefix],
-[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
- --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
- fi
- fi
-])
- dnl Search the library and its dependencies in $additional_libdir and
- dnl $LDFLAGS. Using breadth-first-seach.
- LIB[]NAME=
- LTLIB[]NAME=
- INC[]NAME=
- rpathdirs=
- ltrpathdirs=
- names_already_handled=
- names_next_round='$1 $2'
- while test -n "$names_next_round"; do
- names_this_round="$names_next_round"
- names_next_round=
- for name in $names_this_round; do
- already_handled=
- for n in $names_already_handled; do
- if test "$n" = "$name"; then
- already_handled=yes
- break
- fi
- done
- if test -z "$already_handled"; then
- names_already_handled="$names_already_handled $name"
- dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
- dnl or AC_LIB_HAVE_LINKFLAGS call.
- uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
- eval value=\"\$HAVE_LIB$uppername\"
- if test -n "$value"; then
- if test "$value" = yes; then
- eval value=\"\$LIB$uppername\"
- test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
- eval value=\"\$LTLIB$uppername\"
- test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
- else
- dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
- dnl that this library doesn't exist. So just drop it.
- :
- fi
- else
- dnl Search the library lib$name in $additional_libdir and $LDFLAGS
- dnl and the already constructed $LIBNAME/$LTLIBNAME.
- found_dir=
- found_la=
- found_so=
- found_a=
- if test $use_additional = yes; then
- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
- found_dir="$additional_libdir"
- found_so="$additional_libdir/lib$name.$shlibext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- else
- if test -f "$additional_libdir/lib$name.$libext"; then
- found_dir="$additional_libdir"
- found_a="$additional_libdir/lib$name.$libext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- fi
- fi
- fi
- if test "X$found_dir" = "X"; then
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- case "$x" in
- -L*)
- dir=`echo "X$x" | sed -e 's/^X-L//'`
- if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
- found_dir="$dir"
- found_so="$dir/lib$name.$shlibext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- else
- if test -f "$dir/lib$name.$libext"; then
- found_dir="$dir"
- found_a="$dir/lib$name.$libext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- fi
- fi
- ;;
- esac
- if test "X$found_dir" != "X"; then
- break
- fi
- done
- fi
- if test "X$found_dir" != "X"; then
- dnl Found the library.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
- if test "X$found_so" != "X"; then
- dnl Linking with a shared library. We attempt to hardcode its
- dnl directory into the executable's runpath, unless it's the
- dnl standard /usr/lib.
- if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
- dnl No hardcoding is needed.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $found_dir"
- fi
- dnl The hardcoding into $LIBNAME is system dependent.
- if test "$hardcode_direct" = yes; then
- dnl Using DIR/libNAME.so during linking hardcodes DIR into the
- dnl resulting binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $found_dir"
- fi
- else
- dnl Rely on "-L$found_dir".
- dnl But don't add it if it's already contained in the LDFLAGS
- dnl or the already constructed $LIBNAME
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
- fi
- if test "$hardcode_minus_L" != no; then
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
- dnl here, because this doesn't fit in flags passed to the
- dnl compiler. So give up. No hardcoding. This affects only
- dnl very old systems.
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- fi
- else
- if test "X$found_a" != "X"; then
- dnl Linking with a static library.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
- else
- dnl We shouldn't come here, but anyway it's good to have a
- dnl fallback.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
- fi
- fi
- dnl Assume the include files are nearby.
- additional_includedir=
- case "$found_dir" in
- */lib | */lib/)
- basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
- additional_includedir="$basedir/include"
- ;;
- esac
- if test "X$additional_includedir" != "X"; then
- dnl Potentially add $additional_includedir to $INCNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's /usr/local/include and we are using GCC on Linux,
- dnl 3. if it's already present in $CPPFLAGS or the already
- dnl constructed $INCNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- for x in $CPPFLAGS $INC[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $INCNAME.
- INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- fi
- dnl Look for dependencies.
- if test -n "$found_la"; then
- dnl Read the .la file. It defines the variables
- dnl dlname, library_names, old_library, dependency_libs, current,
- dnl age, revision, installed, dlopen, dlpreopen, libdir.
- save_libdir="$libdir"
- case "$found_la" in
- */* | *\\*) . "$found_la" ;;
- *) . "./$found_la" ;;
- esac
- libdir="$save_libdir"
- dnl We use only dependency_libs.
- for dep in $dependency_libs; do
- case "$dep" in
- -L*)
- additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
- dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 3. if it's already present in $LDFLAGS or the already
- dnl constructed $LIBNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
- haveit=
- if test "X$additional_libdir" = "X/usr/local/lib"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LIBNAME.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- haveit=
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LTLIBNAME.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- ;;
- -R*)
- dir=`echo "X$dep" | sed -e 's/^X-R//'`
- if test "$enable_rpath" != no; then
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $dir"
- fi
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $dir"
- fi
- fi
- ;;
- -l*)
- dnl Handle this in the next round.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
- ;;
- *.la)
- dnl Handle this in the next round. Throw away the .la's
- dnl directory; it is already contained in a preceding -L
- dnl option.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
- ;;
- *)
- dnl Most likely an immediate library name.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
- ;;
- esac
- done
- fi
- else
- dnl Didn't find the library; assume it is in the system directories
- dnl known to the linker and runtime loader. (All the system
- dnl directories known to the linker should also be known to the
- dnl runtime loader, otherwise the system is severely misconfigured.)
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- done
- done
- if test "X$rpathdirs" != "X"; then
- if test -n "$hardcode_libdir_separator"; then
- dnl Weird platform: only the last -rpath option counts, the user must
- dnl pass all path elements in one option. We can arrange that for a
- dnl single library, but not when more than one $LIBNAMEs are used.
- alldirs=
- for found_dir in $rpathdirs; do
- alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
- done
- dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
- acl_save_libdir="$libdir"
- libdir="$alldirs"
- eval flag=\"$hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- else
- dnl The -rpath options are cumulative.
- for found_dir in $rpathdirs; do
- acl_save_libdir="$libdir"
- libdir="$found_dir"
- eval flag=\"$hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- done
- fi
- fi
- if test "X$ltrpathdirs" != "X"; then
- dnl When using libtool, the option that works for both libraries and
- dnl executables is -R. The -R options are cumulative.
- for found_dir in $ltrpathdirs; do
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
- done
- fi
-])
-
-dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
-dnl unless already present in VAR.
-dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
-dnl contains two or three consecutive elements that belong together.
-AC_DEFUN([AC_LIB_APPENDTOVAR],
-[
- for element in [$2]; do
- haveit=
- for x in $[$1]; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X$element"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- [$1]="${[$1]}${[$1]:+ }$element"
- fi
- done
-])
-
-# lib-ld.m4 serial 3 (gettext-0.13)
-dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
-
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
-AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- acl_cv_prog_gnu_ld=yes ;;
-*)
- acl_cv_prog_gnu_ld=no ;;
-esac])
-with_gnu_ld=$acl_cv_prog_gnu_ld
-])
-
-dnl From libtool-1.4. Sets the variable LD.
-AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- [re_direlt='/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(acl_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- acl_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break ;;
- *)
- test "$with_gnu_ld" != yes && break ;;
- esac
- fi
- done
- IFS="$ac_save_ifs"
-else
- acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$acl_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_LIB_PROG_LD_GNU
-])
-
-dnl This provides configure definitions used by all the winsup
-dnl configure.in files.
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN([LIB_AC_PROG_CC_GNU],
-[AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc,
-[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
-cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi])])
-
-AC_DEFUN([LIB_AC_PROG_CC],
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_TOOL(CC, gcc, gcc)
-: ${CC:=gcc}
-AC_PROG_CC
-test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-])
-
-AC_DEFUN([LIB_AC_PROG_CXX],
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_TOOL(CXX, g++, g++)
-if test -z "$CXX"; then
- AC_CHECK_TOOL(CXX, g++, c++, , , )
- : ${CXX:=g++}
- AC_PROG_CXX
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-CXXFLAGS='$(CFLAGS)'
-])
-
diff --git a/winsup/lsaauth/configure b/winsup/lsaauth/configure
deleted file mode 100755
index d5417ea..0000000
--- a/winsup/lsaauth/configure
+++ /dev/null
@@ -1,4177 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63.
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-if test "x$CONFIG_SHELL" = x; then
- if (eval ":") 2>/dev/null; then
- as_have_required=yes
-else
- as_have_required=no
-fi
-
- if test $as_have_required = yes && (eval ":
-(as_func_return () {
- (exit \$1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
- :
-else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0) || { (exit 1); exit 1; }
-
-(
- as_lineno_1=\$LINENO
- as_lineno_2=\$LINENO
- test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
- test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
-") 2> /dev/null; then
- :
-else
- as_candidate_shells=
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- case $as_dir in
- /*)
- for as_base in sh bash ksh sh5; do
- as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
- done;;
- esac
-done
-IFS=$as_save_IFS
-
-
- for as_shell in $as_candidate_shells $SHELL; do
- # Try only shells that exist, to save several forks.
- if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { ("$as_shell") 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-_ASEOF
-}; then
- CONFIG_SHELL=$as_shell
- as_have_required=yes
- if { "$as_shell" 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-(as_func_return () {
- (exit $1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = "$1" ); then
- :
-else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test $exitcode = 0) || { (exit 1); exit 1; }
-
-(
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
-
-_ASEOF
-}; then
- break
-fi
-
-fi
-
- done
-
- if test "x$CONFIG_SHELL" != x; then
- for as_var in BASH_ENV ENV
- do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- done
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
-
- if test $as_have_required = no; then
- echo This script requires a shell more modern than all the
- echo shells that I found on your system. Please install a
- echo modern shell, or manually run the script under such a
- echo shell if you do have one.
- { (exit 1); exit 1; }
-fi
-
-
-fi
-
-fi
-
-
-
-(eval "as_func_return () {
- (exit \$1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
- :
-else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0") || {
- echo No shell found that supports shell functions.
- echo Please tell bug-autoconf@gnu.org about your system,
- echo including any error possibly output before this message.
- echo This can help us improve future autoconf versions.
- echo Configuration will now proceed without shell functions.
-}
-
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line after each line using $LINENO; the second 'sed'
- # does the real work. The second script uses 'N' to pair each
- # line-number line with the line containing $LINENO, and appends
- # trailing '-' during substitution so that $LINENO is not a special
- # case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # scripts with optimization help from Paolo Bonzini. Blame Lee
- # E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
- case `echo 'x\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- *) ECHO_C='\c';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
- as_ln_s='cp -p'
- fi
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-exec 7<&0 </dev/null 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-
-ac_unique_file="Makefile.in"
-ac_subst_vars='LTLIBOBJS
-LIBOBJS
-INSTALL_DATA
-INSTALL_SCRIPT
-INSTALL_PROGRAM
-NO_CYGWIN
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
-target_os
-target_vendor
-target_cpu
-target
-host_os
-host_vendor
-host_cpu
-host
-build_os
-build_vendor
-build_cpu
-build
-target_alias
-host_alias
-build_alias
-LIBS
-ECHO_T
-ECHO_N
-ECHO_C
-DEFS
-mandir
-localedir
-libdir
-psdir
-pdfdir
-dvidir
-htmldir
-infodir
-docdir
-oldincludedir
-includedir
-localstatedir
-sharedstatedir
-sysconfdir
-datadir
-datarootdir
-libexecdir
-sbindir
-bindir
-program_transform_name
-prefix
-exec_prefix
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-PATH_SEPARATOR
-SHELL'
-ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-'
- ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS'
-
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-ac_unrecognized_opts=
-ac_unrecognized_sep=
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval $ac_prev=\$ac_option
- ac_prev=
- continue
- fi
-
- case $ac_option in
- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *) ac_optarg=yes ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_dashdash$ac_option in
- --)
- ac_dashdash=yes ;;
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=*)
- datadir=$ac_optarg ;;
-
- -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
- | --dataroo | --dataro | --datar)
- ac_prev=datarootdir ;;
- -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
- | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
- datarootdir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
- { (exit 1); exit 1; }; }
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval enable_$ac_useropt=no ;;
-
- -docdir | --docdir | --docdi | --doc | --do)
- ac_prev=docdir ;;
- -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
- docdir=$ac_optarg ;;
-
- -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
- ac_prev=dvidir ;;
- -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
- dvidir=$ac_optarg ;;
-
- -enable-* | --enable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
- { (exit 1); exit 1; }; }
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval enable_$ac_useropt=\$ac_optarg ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
- ac_prev=htmldir ;;
- -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
- | --ht=*)
- htmldir=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir=$ac_optarg ;;
-
- -localedir | --localedir | --localedi | --localed | --locale)
- ac_prev=localedir ;;
- -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
- localedir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst | --locals)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
- localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name=$ac_optarg ;;
-
- -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
- ac_prev=pdfdir ;;
- -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
- pdfdir=$ac_optarg ;;
-
- -psdir | --psdir | --psdi | --psd | --ps)
- ac_prev=psdir ;;
- -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
- psdir=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
- { (exit 1); exit 1; }; }
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval with_$ac_useropt=\$ac_optarg ;;
-
- -without-* | --without-*)
- ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
- { (exit 1); exit 1; }; }
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval with_$ac_useropt=no ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries=$ac_optarg ;;
-
- -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- eval $ac_envvar=\$ac_optarg
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { $as_echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-if test -n "$ac_unrecognized_opts"; then
- case $enable_option_checking in
- no) ;;
- fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
- { (exit 1); exit 1; }; } ;;
- *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
- esac
-fi
-
-# Check all directory arguments for consistency.
-for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
- datadir sysconfdir sharedstatedir localstatedir includedir \
- oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
-do
- eval ac_val=\$$ac_var
- # Remove trailing slashes.
- case $ac_val in
- */ )
- ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
- eval $ac_var=\$ac_val;;
- esac
- # Be sure to have absolute directory names.
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) continue;;
- NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
- esac
- { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; }
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- { $as_echo "$as_me: error: working directory cannot be determined" >&2
- { (exit 1); exit 1; }; }
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
- { (exit 1); exit 1; }; }
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then the parent directory.
- ac_confdir=`$as_dirname -- "$as_myself" ||
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_myself" : 'X\(//\)[^/]' \| \
- X"$as_myself" : 'X\(//\)$' \| \
- X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r "$srcdir/$ac_unique_file"; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
- test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
- { (exit 1); exit 1; }; }
- pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
- srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
- eval ac_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_env_${ac_var}_value=\$${ac_var}
- eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
- --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- --infodir=DIR info documentation [DATAROOTDIR/info]
- --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
- --mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
- --htmldir=DIR html documentation [DOCDIR]
- --dvidir=DIR dvi documentation [DOCDIR]
- --pdfdir=DIR pdf documentation [DOCDIR]
- --psdir=DIR ps documentation [DOCDIR]
-_ACEOF
-
- cat <<\_ACEOF
-
-Program names:
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM run sed PROGRAM on installed program names
-
-System types:
- --build=BUILD configure for building on BUILD [guessed]
- --host=HOST cross-compile to build programs to run on HOST [BUILD]
- --target=TARGET configure for building compilers for TARGET [HOST]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-
- cat <<\_ACEOF
-
-Some influential environment variables:
- CC C compiler command
- CFLAGS C compiler flags
- LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
- nonstandard directory <lib dir>
- LIBS libraries to pass to the linker, e.g. -l<library>
- CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
- you have headers in a nonstandard directory <include dir>
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d "$ac_dir" ||
- { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
- continue
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
- cd "$ac_dir" || { ac_status=$?; continue; }
- # Check for guested configure.
- if test -f "$ac_srcdir/configure.gnu"; then
- echo &&
- $SHELL "$ac_srcdir/configure.gnu" --help=recursive
- elif test -f "$ac_srcdir/configure"; then
- echo &&
- $SHELL "$ac_srcdir/configure" --help=recursive
- else
- $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi || ac_status=$?
- cd "$ac_pwd" || { ac_status=$?; break; }
- done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
- cat <<\_ACEOF
-configure
-generated by GNU Autoconf 2.63
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit
-fi
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by $as_me, which was
-generated by GNU Autoconf 2.63. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- $as_echo "PATH: $as_dir"
-done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *\'*)
- ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- ac_configure_args="$ac_configure_args '$ac_arg'"
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-(
- for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) $as_unset $ac_var ;;
- esac ;;
- esac
- done
- (set) 2>&1 |
- case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- sed -n \
- "s/'\''/'\''\\\\'\'''\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
- ;; #(
- *)
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-)
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------------- ##
-## File substitutions. ##
-## ------------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- cat confdefs.h
- echo
- fi
- test "$ac_signal" != 0 &&
- $as_echo "$as_me: caught signal $ac_signal"
- $as_echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core core.conftest.* &&
- rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
- ac_site_file1=$CONFIG_SITE
-elif test "x$prefix" != xNONE; then
- ac_site_file1=$prefix/share/config.site
- ac_site_file2=$prefix/etc/config.site
-else
- ac_site_file1=$ac_default_prefix/share/config.site
- ac_site_file2=$ac_default_prefix/etc/config.site
-fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
- test "x$ac_site_file" = xNONE && continue
- if test -r "$ac_site_file"; then
- { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . "$cache_file";;
- *) . "./$cache_file";;
- esac
- fi
-else
- { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val=\$ac_cv_env_${ac_var}_value
- eval ac_new_val=\$ac_env_${ac_var}_value
- case $ac_old_set,$ac_new_set in
- set,)
- { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- # differences in whitespace do not lead to failure.
- ac_old_val_w=`echo x $ac_old_val`
- ac_new_val_w=`echo x $ac_new_val`
- if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- ac_cache_corrupted=:
- else
- { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
- eval $ac_var=\$ac_old_val
- fi
- { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
-$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
- { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
-$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-ac_aux_dir=
-for ac_dir in ../.. "$srcdir"/../..; do
- if test -f "$ac_dir/install-sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f "$ac_dir/install.sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f "$ac_dir/shtool"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ../.. \"$srcdir\"/../.." >&5
-$as_echo "$as_me: error: cannot find install-sh or install.sh in ../.. \"$srcdir\"/../.." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-
-
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
- { (exit 1); exit 1; }; }
-
-{ $as_echo "$as_me:$LINENO: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
- { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-$as_echo "$as_me: error: invalid value of canonical build" >&2;}
- { (exit 1); exit 1; }; };;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:$LINENO: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test "x$host_alias" = x; then
- ac_cv_host=$ac_cv_build
-else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-$as_echo "$as_me: error: invalid value of canonical host" >&2;}
- { (exit 1); exit 1; }; };;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:$LINENO: checking target system type" >&5
-$as_echo_n "checking target system type... " >&6; }
-if test "${ac_cv_target+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test "x$target_alias" = x; then
- ac_cv_target=$ac_cv_host
-else
- ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
- { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-$as_echo "$ac_cv_target" >&6; }
-case $ac_cv_target in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
-$as_echo "$as_me: error: invalid value of canonical target" >&2;}
- { (exit 1); exit 1; }; };;
-esac
-target=$ac_cv_target
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_target
-shift
-target_cpu=$1
-target_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-target_os=$*
-IFS=$ac_save_IFS
-case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CC="gcc"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_CC" = x; then
- CC="gcc"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-else
- CC="$ac_cv_prog_CC"
-fi
-
-: ${CC:=gcc}
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CC="gcc"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-else
- CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- fi
-fi
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
- fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl.exe
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl.exe
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$ac_ct_CC" && break
-done
-
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-fi
-
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler --version >&5") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler -v >&5") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler -V >&5") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
-do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
- * ) ac_rmfiles="$ac_rmfiles $ac_file";;
- esac
-done
-rm -f $ac_rmfiles
-
-if { (ac_try="$ac_link_default"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link_default") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile. We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
- then :; else
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- fi
- # We set ac_cv_exeext here because the later test for it is not
- # safe: cross compilers may not add the suffix if given an `-o'
- # argument, so we may need to know it at that point already.
- # Even if this section looks crufty: it has the advantage of
- # actually working.
- break;;
- * )
- break;;
- esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-else
- ac_file=''
-fi
-
-{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-if test -z "$ac_file"; then
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
- fi
- fi
-fi
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- break;;
- * ) break;;
- esac
-done
-else
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- for ac_file in conftest.o conftest.obj conftest.*; do
- test -f "$ac_file" || continue;
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_compiler_gnu=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_compiler_gnu=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
- GCC=yes
-else
- GCC=
-fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_save_c_werror_flag=$ac_c_werror_flag
- ac_c_werror_flag=yes
- ac_cv_prog_cc_g=no
- CFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_cc_g=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- CFLAGS=""
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- :
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_c_werror_flag=$ac_save_c_werror_flag
- CFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_cc_g=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_cc_c89=$ac_arg
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:$LINENO: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:$LINENO: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5
-$as_echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
- { (exit 1); exit 1; }; }
-
-
-NO_CYGWIN="$(cd ${srcdir}/../utils; pwd)/mingw"
-
-
-test "$program_prefix" != NONE &&
- program_transform_name="s&^&$program_prefix&;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.
-# By default was `s,x,x', remove it if useless.
-ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
-
-
-if test "x$cross_compiling" = "xyes"; then
- if test "x$program_transform_name" = "xs,x,x,"; then
- program_transform_name=""
- fi
- if test "x$program_transform_name" = "x"; then
- program_transform_name="s,^,$host-,"
- else
- program_transform_name="$program_transform_name -e s,^,$host-,"
- fi
-fi
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- rm -rf conftest.one conftest.two conftest.dir
- echo one > conftest.one
- echo two > conftest.two
- mkdir conftest.dir
- if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
- test -s conftest.one && test -s conftest.two &&
- test -s conftest.dir/conftest.one &&
- test -s conftest.dir/conftest.two
- then
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- fi
- done
- done
- ;;
-esac
-
-done
-IFS=$as_save_IFS
-
-rm -rf conftest.one conftest.two conftest.dir
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. Don't cache a
- # value for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the value is a relative name.
- INSTALL=$ac_install_sh
- fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-ac_config_files="$ac_config_files Makefile cyglsa.def:cyglsa.din"
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
- for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) $as_unset $ac_var ;;
- esac ;;
- esac
- done
-
- (set) 2>&1 |
- case $as_nl`(ac_space=' '; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;; #(
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-) |
- sed '
- /^ac_cv_env_/b end
- t clear
- :clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
- if test -w "$cache_file"; then
- test "x$cache_file" != "x/dev/null" &&
- { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
- cat confcache >$cache_file
- else
- { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then branch to the quote section. Otherwise,
-# look for a macro that doesn't take arguments.
-ac_script='
-:mline
-/\\$/{
- N
- s,\\\n,,
- b mline
-}
-t clear
-:clear
-s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
-t quote
-s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
-t quote
-b any
-:quote
-s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
-s/\[/\\&/g
-s/\]/\\&/g
-s/\$/$$/g
-H
-:any
-${
- g
- s/^\n//
- s/\n/ /g
- p
-}
-'
-DEFS=`sed -n "$ac_script" confdefs.h`
-
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
- # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
- # will be set to the directory where LIBOBJS objects are built.
- ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line after each line using $LINENO; the second 'sed'
- # does the real work. The second script uses 'N' to pair each
- # line-number line with the line containing $LINENO, and appends
- # trailing '-' during substitution so that $LINENO is not a special
- # case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # scripts with optimization help from Paolo Bonzini. Blame Lee
- # E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
- case `echo 'x\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- *) ECHO_C='\c';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
- as_ln_s='cp -p'
- fi
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-
-# Save the log message, to keep $[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.63. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
-
-
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTION]... [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number and configuration settings, then exit
- -q, --quiet, --silent
- do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
-
-Configuration files:
-$config_files
-
-Report bugs to <bug-autoconf@gnu.org>."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.63,
- with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2008 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
-test -n "\$AWK" || AWK=awk
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=*)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- *)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- esac
-
- case $ac_option in
- # Handling of the options.
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
- --debug | --debu | --deb | --de | --d | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
- ac_need_defaults=false;;
- --he | --h | --help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { $as_echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1"
- ac_need_defaults=false ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
- shift
- \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
- CONFIG_SHELL='$SHELL'
- export CONFIG_SHELL
- exec "\$@"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
- $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
- case $ac_config_target in
- "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "cyglsa.def") CONFIG_FILES="$CONFIG_FILES cyglsa.def:cyglsa.din" ;;
-
- *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
- tmp=
- trap 'exit_status=$?
- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./conf$$-$RANDOM
- (umask 077 && mkdir "$tmp")
-} ||
-{
- $as_echo "$as_me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=' '
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\\r'
-else
- ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
-_ACEOF
-
-
-{
- echo "cat >conf$$subs.awk <<_ACEOF" &&
- echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
- echo "_ACEOF"
-} >conf$$subs.sh ||
- { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
- . ./conf$$subs.sh ||
- { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
-
- ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
- if test $ac_delim_n = $ac_delim_num; then
- break
- elif $ac_last_try; then
- { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\).*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\).*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
- N
- s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
- for (key in S) S_is_set[key] = 1
- FS = ""
-
-}
-{
- line = $ 0
- nfields = split(line, field, "@")
- substed = 0
- len = length(field[1])
- for (i = 2; i < nfields; i++) {
- key = field[i]
- keylen = length(key)
- if (S_is_set[key]) {
- value = S[key]
- line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
- len += length(value) + length(field[++i])
- substed = 1
- } else
- len += 1 + keylen
- }
-
- print line
-}
-
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
- sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
- cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
- || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
-$as_echo "$as_me: error: could not setup config files machinery" >&2;}
- { (exit 1); exit 1; }; }
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[ ]*\):*/\1/
-s/:*$//
-s/^[^=]*=[ ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
-
-
-eval set X " :F $CONFIG_FILES "
-shift
-for ac_tag
-do
- case $ac_tag in
- :[FHLC]) ac_mode=$ac_tag; continue;;
- esac
- case $ac_mode$ac_tag in
- :[FHL]*:*);;
- :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
-$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
- { (exit 1); exit 1; }; };;
- :[FH]-) ac_tag=-:-;;
- :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
- esac
- ac_save_IFS=$IFS
- IFS=:
- set x $ac_tag
- IFS=$ac_save_IFS
- shift
- ac_file=$1
- shift
-
- case $ac_mode in
- :L) ac_source=$1;;
- :[FH])
- ac_file_inputs=
- for ac_f
- do
- case $ac_f in
- -) ac_f="$tmp/stdin";;
- *) # Look for the file first in the build tree, then in the source tree
- # (if the path is not absolute). The absolute path cannot be DOS-style,
- # because $ac_f cannot contain `:'.
- test -f "$ac_f" ||
- case $ac_f in
- [\\/$]*) false;;
- *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
- esac ||
- { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
- { (exit 1); exit 1; }; };;
- esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
- ac_file_inputs="$ac_file_inputs '$ac_f'"
- done
-
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
- `' by configure.'
- if test x"$ac_file" != x-; then
- configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
- fi
- # Neutralize special characters interpreted by sed in replacement strings.
- case $configure_input in #(
- *\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
- sed 's/[\\\\&|]/\\\\&/g'`;; #(
- *) ac_sed_conf_input=$configure_input;;
- esac
-
- case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin" \
- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
- { (exit 1); exit 1; }; } ;;
- esac
- ;;
- esac
-
- ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- { as_dir="$ac_dir"
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
- { (exit 1); exit 1; }; }; }
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
- case $ac_mode in
- :F)
- #
- # CONFIG_FILE
- #
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
- esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-
-ac_sed_dataroot='
-/datarootdir/ {
- p
- q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p
-'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_datarootdir_hack='
- s&@datadir@&$datadir&g
- s&@docdir@&$docdir&g
- s&@infodir@&$infodir&g
- s&@localedir@&$localedir&g
- s&@mandir@&$mandir&g
- s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
- { (exit 1); exit 1; }; }
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&2;}
-
- rm -f "$tmp/stdin"
- case $ac_file in
- -) cat "$tmp/out" && rm -f "$tmp/out";;
- *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
- esac \
- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
- { (exit 1); exit 1; }; }
- ;;
-
-
-
- esac
-
-done # for ac_tag
-
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-test $ac_write_fail = 0 ||
- { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || { (exit 1); exit 1; }
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
-
diff --git a/winsup/lsaauth/configure.in b/winsup/lsaauth/configure.in
deleted file mode 100644
index 9915d8e..0000000
--- a/winsup/lsaauth/configure.in
+++ /dev/null
@@ -1,45 +0,0 @@
-dnl Copyright (c) 2006, Red Hat, Inc.
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 2 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl A copy of the GNU General Public License can be found at
-dnl http://www.gnu.org/
-dnl
-dnl Written by Christopher Faylor <cgf@redhat.com>
-dnl Changed for lsa subdir by Corinna Vinschen <corinna@vinschen.de>
-
-dnl Autoconf configure script for Cygwin utilities.
-dnl
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.59)
-AC_INIT(Makefile.in)
-
-AC_CONFIG_AUX_DIR(../..)
-
-AC_CANONICAL_SYSTEM
-
-LIB_AC_PROG_CC
-
-NO_CYGWIN="$(cd ${srcdir}/../utils; pwd)/mingw"
-
-AC_SUBST(NO_CYGWIN)
-AC_ARG_PROGRAM
-
-if test "x$cross_compiling" = "xyes"; then
- if test "x$program_transform_name" = "xs,x,x,"; then
- program_transform_name=""
- fi
- if test "x$program_transform_name" = "x"; then
- program_transform_name="s,^,$host-,"
- else
- program_transform_name="$program_transform_name -e s,^,$host-,"
- fi
-fi
-
-AC_PROG_INSTALL
-
-AC_OUTPUT(Makefile cyglsa.def:cyglsa.din)
diff --git a/winsup/lsaauth/cyglsa-config b/winsup/lsaauth/cyglsa-config
deleted file mode 100755
index 0a749f7..0000000
--- a/winsup/lsaauth/cyglsa-config
+++ /dev/null
@@ -1,123 +0,0 @@
-#!/bin/bash
-#
-# cyglsa-config, Copyright 2006 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# A copy of the GNU General Public License can be found at
-# http://www.gnu.org/
-#
-# This file is part of the Cygwin LSA authentication package.
-
-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 if running under at least Windows 2000
-_nt_too_old=`uname | awk -F- '{print ( $2 < 5.0 ) ? 1 : 0;}'`
-if [ ${_nt_too_old} -eq 1 ]
-then
- echo "Cygwin LSA authentication not supported on Windows NT4 or older. Exiting."
- exit 1
-fi
-
-# Directory in which cyglsa DLL is installed as DOS path.
-bindir=`cygpath -w /`\\bin
-
-# Check if we're running on 64 bit Windows. If so, we need the 64 bit
-# cyglsa DLL.
-dll=cyglsa.dll
-test -d `cygpath -p ${SYSTEMROOT}`/SysWOW64 && dll=cyglsa64.dll
-
-# Check if the DLL is actually installed. If not, bail out.
-if [ ! -f /bin/${dll} ]
-then
- echo "Required Cygwin authentication DLL /bin/${dll} doesn't exist. Exiting."
- exit 1
-fi
-
-echo
-echo "Warning: Registering the Cygwin LSA authentication package requires"
-echo "administrator privileges! You also have to reboot the machine to"
-echo "activate the change."
-echo
-request "Are you sure you want to continue?" || exit 0
-
-# The registry value which keeps the authentication packages.
-value='/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Lsa/Authentication Packages'
-
-[ -f /bin/cyglsa -a ! -d /bin/cyglsa ] && rm -rf /bin/cyglsa
-if [ ! -d /bin/cyglsa ]
-then
- if ! mkdir -m 755 /bin/cyglsa
- then
- echo "Creating the /bin/cyglsa directory failed. Exiting."
- exit 1
- fi
-fi
-if ! cp -b "/bin/${dll}" "/bin/cyglsa/${dll}"
-then
- echo "Copying the new LSA authentication package /bin/${dll} to"
- echo "/bin/cyglsa/${dll} failed. Exiting."
- exit 1
-fi
-
-# Get old content, remove every trace of "cyglsa" from it and write the
-# content back to the registry with the new, correct path to the cyglsa DLL.
-old=`regtool get "${value}"`
-new=`for i in ${old}
-do
- echo $i | grep -v cyglsa
-done`
-if ! regtool set "${value}" ${new} "${bindir}\\cyglsa\\${dll}"
-then
- echo "Setting the new registry value failed. Exiting."
- exit 1
-fi
-
-echo
-echo "Cygwin LSA authentication package registered."
-echo
-echo "Activating Cygwin's LSA authentication package requires to reboot."
-if [ -x /bin/shutdown ]
-then
- if request "Do you want to do this immediately?"
- then
- echo
- echo "Other users might still be working on this machine."
- echo
- if request "Are you sure?"
- then
- echo
- echo "Ok, will reboot in 30 seconds."
- echo
- echo "If you change your mind, call 'shutdown -a' within 30 seconds"
- shutdown -r 30
- fi
- fi
-fi
diff --git a/winsup/lsaauth/cyglsa.c b/winsup/lsaauth/cyglsa.c
deleted file mode 100644
index cc44657..0000000
--- a/winsup/lsaauth/cyglsa.c
+++ /dev/null
@@ -1,629 +0,0 @@
-/* cyglsa.c: LSA authentication module for Cygwin
-
- Copyright 2006, 2008 Red Hat, Inc.
-
- Written by Corinna Vinschen <corinna@vinschen.de>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for details. */
-
-#define WINVER 0x0600
-#define _CRT_SECURE_NO_DEPRECATE
-#include <ntstatus.h>
-#define WIN32_NO_STATUS
-#include <wchar.h>
-#include <windows.h>
-#include <wininet.h>
-#include <lm.h>
-#include <iptypes.h>
-#include <ntsecapi.h>
-#ifdef __MINGW32__
-#include <ntddk.h>
-#endif
-#include "../cygwin/cyglsa.h"
-#include "../cygwin/include/cygwin/version.h"
-
-static PLSA_SECPKG_FUNCS funcs;
-static BOOL must_create_logon_sid;
-
-BOOL APIENTRY
-DllMain (HINSTANCE inst, DWORD reason, LPVOID res)
-{
- switch (reason)
- {
- case DLL_PROCESS_ATTACH:
- case DLL_THREAD_ATTACH:
- case DLL_THREAD_DETACH:
- case DLL_PROCESS_DETACH:
- break;
- }
- return TRUE;
-}
-
-#ifndef RtlInitEmptyUnicodeString
-__inline VOID NTAPI
-RtlInitEmptyUnicodeString(PUNICODE_STRING dest, PCWSTR buf, USHORT len)
-{
- dest->Length = 0;
- dest->MaximumLength = len;
- dest->Buffer = (PWSTR) buf;
-}
-#endif
-
-static PUNICODE_STRING
-uni_alloc (PWCHAR src, USHORT len)
-{
- PUNICODE_STRING tgt;
-
- if (!(tgt = funcs->AllocateLsaHeap (sizeof (UNICODE_STRING))))
- return NULL;
- tgt->Length = len * sizeof (WCHAR);
- tgt->MaximumLength = tgt->Length + sizeof (WCHAR);
- if (!(tgt->Buffer = funcs->AllocateLsaHeap (tgt->MaximumLength)))
- {
- funcs->FreeLsaHeap (tgt);
- return NULL;
- }
- wcscpy (tgt->Buffer, src);
- return tgt;
-}
-
-/* No, I don't want to include stdio.h so I take what ntdll offers. */
-extern int _vsnprintf (char *, size_t, const char *, va_list);
-
-static HANDLE fh = INVALID_HANDLE_VALUE;
-
-static int
-cyglsa_printf (const char *format, ...)
-{
- char buf[256];
- DWORD wr;
- int ret;
- va_list ap;
-
- if (fh == INVALID_HANDLE_VALUE)
- return 0;
-
- va_start (ap, format);
- ret = _vsnprintf (buf, 256, format, ap);
- va_end (ap);
- if (ret <= 0)
- return ret;
- if (ret > 256)
- ret = 255;
- buf[255] = '\0';
- WriteFile (fh, buf, ret, &wr, NULL);
- return wr;
-}
-
-static void
-print_sid (const char *prefix, int idx, PISID sid)
-{
- DWORD i;
-
- cyglsa_printf ("%s", prefix);
- if (idx >= 0)
- cyglsa_printf ("[%d] ", idx);
- cyglsa_printf ("(0x%08x) ", (INT_PTR) sid);
- if (!sid)
- cyglsa_printf ("NULL\n");
- else if (IsBadReadPtr (sid, 8))
- cyglsa_printf ("INVALID POINTER\n");
- else if (!IsValidSid ((PSID) sid))
- cyglsa_printf ("INVALID SID\n");
- else if (IsBadReadPtr (sid, 8 + sizeof (DWORD) * sid->SubAuthorityCount))
- cyglsa_printf ("INVALID POINTER SPACE\n");
- else
- {
- cyglsa_printf ("S-%d-%d", sid->Revision, sid->IdentifierAuthority.Value[5]);
- for (i = 0; i < sid->SubAuthorityCount; ++i)
- cyglsa_printf ("-%lu", sid->SubAuthority[i]);
- cyglsa_printf ("\n");
- }
-}
-
-static void
-print_groups (PTOKEN_GROUPS grps)
-{
- DWORD i;
-
- cyglsa_printf ("Groups: (0x%08x) ", (INT_PTR) grps);
- if (!grps)
- cyglsa_printf ("NULL\n");
- else if (IsBadReadPtr (grps, sizeof (DWORD)))
- cyglsa_printf ("INVALID POINTER\n");
- else if (IsBadReadPtr (grps, sizeof (DWORD) + sizeof (SID_AND_ATTRIBUTES)
- * grps->GroupCount))
- cyglsa_printf ("INVALID POINTER SPACE\n");
- else
- {
- cyglsa_printf ("Count: %lu\n", grps->GroupCount);
- for (i = 0; i < grps->GroupCount; ++i)
- {
- cyglsa_printf ("(attr: 0x%lx)", grps->Groups[i].Attributes);
- print_sid (" ", i, (PISID) grps->Groups[i].Sid);
- }
- }
-}
-
-static void
-print_privs (PTOKEN_PRIVILEGES privs)
-{
- DWORD i;
-
- cyglsa_printf ("Privileges: (0x%08x) ", (INT_PTR) privs);
- if (!privs)
- cyglsa_printf ("NULL\n");
- else if (IsBadReadPtr (privs, sizeof (DWORD)))
- cyglsa_printf ("INVALID POINTER\n");
- else if (IsBadReadPtr (privs, sizeof (DWORD) + sizeof (LUID_AND_ATTRIBUTES)
- * privs->PrivilegeCount))
- cyglsa_printf ("INVALID POINTER SPACE\n");
- else
- {
- cyglsa_printf ("Count: %lu\n", privs->PrivilegeCount);
- for (i = 0; i < privs->PrivilegeCount; ++i)
- cyglsa_printf ("Luid: {%ld, %lu} Attributes: 0x%lx\n",
- privs->Privileges[i].Luid.HighPart,
- privs->Privileges[i].Luid.LowPart,
- privs->Privileges[i].Attributes);
- }
-}
-
-static void
-print_dacl (PACL dacl)
-{
- DWORD i;
-
- cyglsa_printf ("DefaultDacl: (0x%08x) ", (INT_PTR) dacl);
- if (!dacl)
- cyglsa_printf ("NULL\n");
- else if (IsBadReadPtr (dacl, sizeof (ACL)))
- cyglsa_printf ("INVALID POINTER\n");
- else if (IsBadReadPtr (dacl, dacl->AclSize))
- cyglsa_printf ("INVALID POINTER SPACE\n");
- else
- {
- cyglsa_printf ("Rev: %d, Count: %d\n", dacl->AclRevision, dacl->AceCount);
- for (i = 0; i < dacl->AceCount; ++i)
- {
- PVOID vace;
- PACCESS_ALLOWED_ACE ace;
-
- if (!GetAce (dacl, i, &vace))
- cyglsa_printf ("[%lu] GetAce error %lu\n", i, GetLastError ());
- else
- {
- ace = (PACCESS_ALLOWED_ACE) vace;
- cyglsa_printf ("Type: %x, Flags: %x, Access: %lx,",
- ace->Header.AceType, ace->Header.AceFlags, (DWORD) ace->Mask);
- print_sid (" ", i, (PISID) &ace->SidStart);
- }
- }
- }
-}
-
-static void
-print_tokinf (PLSA_TOKEN_INFORMATION_V2 ptok, size_t size,
- PVOID got_start, PVOID gotinf_start, PVOID gotinf_end)
-{
- if (fh == INVALID_HANDLE_VALUE)
- return;
-
- cyglsa_printf ("INCOMING: start: 0x%08x infstart: 0x%08x infend: 0x%08x\n",
- (INT_PTR) got_start, (INT_PTR) gotinf_start,
- (INT_PTR) gotinf_end);
-
- cyglsa_printf ("LSA_TOKEN_INFORMATION_V2: 0x%08x - 0x%08x\n",
- (INT_PTR) ptok, (INT_PTR) ptok + size);
-
- /* User SID */
- cyglsa_printf ("User: (attr: 0x%lx)", ptok->User.User.Attributes);
- print_sid (" ", -1, (PISID) ptok->User.User.Sid);
-
- /* Groups */
- print_groups (ptok->Groups);
-
- /* Primary Group SID */
- print_sid ("Primary Group: ", -1, (PISID)ptok->PrimaryGroup.PrimaryGroup);
-
- /* Privileges */
- print_privs (ptok->Privileges);
-
- /* Owner */
- print_sid ("Owner: ", -1, (PISID) ptok->Owner.Owner);
-
- /* Default DACL */
- print_dacl (ptok->DefaultDacl.DefaultDacl);
-
- // CloseHandle (fh);
-}
-
-NTSTATUS NTAPI
-LsaApInitializePackage (ULONG authp_id, PLSA_SECPKG_FUNCS dpt,
- PLSA_STRING dummy1, PLSA_STRING dummy2,
- PLSA_STRING *authp_name)
-{
- PLSA_STRING name = NULL;
- DWORD vers, major, minor;
-
- /* Set global pointer to lsa helper function table. */
- funcs = dpt;
-
- /* Allocate and set the name of the authentication package. This is the
- name which has to be used in LsaLookupAuthenticationPackage. */
- if (!(name = funcs->AllocateLsaHeap (sizeof *name)))
- return STATUS_NO_MEMORY;
- if (!(name->Buffer = funcs->AllocateLsaHeap (sizeof (CYG_LSA_PKGNAME))))
- {
- funcs->FreeLsaHeap (name);
- return STATUS_NO_MEMORY;
- }
- name->Length = sizeof (CYG_LSA_PKGNAME) - 1;
- name->MaximumLength = sizeof (CYG_LSA_PKGNAME);
- strcpy (name->Buffer, CYG_LSA_PKGNAME);
- (*authp_name) = name;
-
- vers = GetVersion ();
- major = LOBYTE (LOWORD (vers));
- minor = HIBYTE (LOWORD (vers));
- /* Check if we're running on Windows 2000 or lower. If so, we must create
- the logon sid in the group list by ourselves. */
- if (major < 5 || (major == 5 && minor == 0))
- must_create_logon_sid = TRUE;
-
-#ifdef DEBUGGING
- fh = CreateFile ("C:\\cyglsa.dbgout", GENERIC_WRITE,
- FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
- NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
- cyglsa_printf ("Initialized\n");
-#endif /* DEBUGGING */
-
- return STATUS_SUCCESS;
-}
-
-NTSTATUS NTAPI
-LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type,
- PVOID auth, PVOID client_auth_base, ULONG auth_len,
- PVOID *pbuf, PULONG pbuf_len, PLUID logon_id,
- PNTSTATUS sub_stat, PLSA_TOKEN_INFORMATION_TYPE tok_type,
- PVOID *tok, PUNICODE_STRING *account,
- PUNICODE_STRING *authority, PUNICODE_STRING *machine)
-{
- DWORD checksum, i;
- PDWORD csp, csp_end;
- NTSTATUS stat;
- SECPKG_CLIENT_INFO clinf;
- PLSA_TOKEN_INFORMATION_V2 tokinf;
-
- cyglsa_t *authinf = (cyglsa_t *) auth;
-
- /* Check if the caller has the SeTcbPrivilege, otherwise refuse service. */
- stat = funcs->GetClientInfo (&clinf);
- if (stat != STATUS_SUCCESS)
- {
- cyglsa_printf ("GetClientInfo failed: 0x%08lx\n", stat);
- return stat;
- }
- if (!clinf.HasTcbPrivilege)
- {
- cyglsa_printf ("Client has no TCB privilege. Access denied.\n");
- return STATUS_ACCESS_DENIED;
- }
-
- /* Make a couple of validity checks. */
- if (auth_len < sizeof *authinf
- || authinf->magic != CYG_LSA_MAGIC
- || !authinf->username[0]
- || !authinf->domain[0])
- {
- cyglsa_printf ("Invalid authentication parameter.\n");
- return STATUS_INVALID_PARAMETER;
- }
- checksum = CYGWIN_VERSION_MAGIC (CYGWIN_VERSION_DLL_MAJOR,
- CYGWIN_VERSION_DLL_MINOR);
- csp = (PDWORD) &authinf->username;
- csp_end = (PDWORD) ((PBYTE) authinf + auth_len);
- while (csp < csp_end)
- checksum += *csp++;
- if (authinf->checksum != checksum)
- {
- cyglsa_printf ("Invalid checksum.\n");
- return STATUS_INVALID_PARAMETER_3;
- }
-
- /* Set account to username and authority to domain resp. machine name.
- The name of the logon account name as returned by LookupAccountSid
- is created from here as "authority\account". */
- authinf->username[UNLEN] = '\0';
- authinf->domain[MAX_DOMAIN_NAME_LEN] = '\0';
- if (account && !(*account = uni_alloc (authinf->username,
- wcslen (authinf->username))))
- {
- cyglsa_printf ("No memory trying to create account.\n");
- return STATUS_NO_MEMORY;
- }
- if (authority && !(*authority = uni_alloc (authinf->domain,
- wcslen (authinf->domain))))
- {
- cyglsa_printf ("No memory trying to create authority.\n");
- return STATUS_NO_MEMORY;
- }
- if (machine)
- {
- WCHAR mach[MAX_COMPUTERNAME_LENGTH + 1];
- DWORD msize = MAX_COMPUTERNAME_LENGTH + 1;
- if (!GetComputerNameW (mach, &msize))
- wcscpy (mach, L"UNKNOWN");
- if (!(*machine = uni_alloc (mach, wcslen (mach))))
- {
- cyglsa_printf ("No memory trying to create machine.\n");
- return STATUS_NO_MEMORY;
- }
- }
- /* Create a fake buffer in pbuf which is free'd again in the client.
- Windows 2000 tends to crash when setting this pointer to NULL. */
- if (pbuf)
- {
-#ifdef JUST_ANOTHER_NONWORKING_SOLUTION
- cygprf_t prf;
- WCHAR sam_username[MAX_DOMAIN_NAME_LEN + UNLEN + 2];
- SECURITY_STRING sam_user, prefix;
- PUCHAR user_auth;
- ULONG user_auth_size;
- WCHAR flatname[UNLEN + 1];
- UNICODE_STRING flatnm;
- TOKEN_SOURCE ts;
- HANDLE token;
-#endif /* JUST_ANOTHER_NONWORKING_SOLUTION */
-
- stat = funcs->AllocateClientBuffer (request, 64UL, pbuf);
- if (!LSA_SUCCESS (stat))
- {
- cyglsa_printf ("AllocateClientBuffer failed: 0x%08lx\n", stat);
- return stat;
- }
-#ifdef JUST_ANOTHER_NONWORKING_SOLUTION
- prf.magic_pre = MAGIC_PRE;
- prf.token = NULL;
- prf.magic_post = MAGIC_POST;
-
-#if 0
- /* That's how it was supposed to work according to MSDN... */
- wcscpy (sam_username, authinf->domain);
- wcscat (sam_username, L"\\");
- wcscat (sam_username, authinf->username);
-#else
- /* That's the only solution which worked, and then it only worked
- for machine local accounts. No domain authentication possible.
- STATUS_NO_SUCH_USER galore! */
- wcscpy (sam_username, authinf->username);
-#endif
- RtlInitUnicodeString (&sam_user, sam_username);
- RtlInitUnicodeString (&prefix, L"");
- RtlInitEmptyUnicodeString (&flatnm, flatname,
- (UNLEN + 1) * sizeof (WCHAR));
-
- stat = funcs->GetAuthDataForUser (&sam_user, SecNameSamCompatible,
- NULL, &user_auth,
- &user_auth_size, &flatnm);
- if (!NT_SUCCESS (stat))
- {
- char sam_u[MAX_DOMAIN_NAME_LEN + UNLEN + 2];
- wcstombs (sam_u, sam_user.Buffer, sizeof (sam_u));
- cyglsa_printf ("GetAuthDataForUser (%u,%u,%s) failed: 0x%08lx\n",
- sam_user.Length, sam_user.MaximumLength, sam_u, stat);
- return stat;
- }
-
- memcpy (ts.SourceName, "Cygwin.1", 8);
- ts.SourceIdentifier.HighPart = 0;
- ts.SourceIdentifier.LowPart = 0x0104;
- RtlInitEmptyUnicodeString (&flatnm, flatname,
- (UNLEN + 1) * sizeof (WCHAR));
- stat = funcs->ConvertAuthDataToToken (user_auth, user_auth_size,
- SecurityDelegation, &ts,
- Interactive, *authority,
- &token, logon_id, &flatnm,
- sub_stat);
- if (!NT_SUCCESS (stat))
- {
- cyglsa_printf ("ConvertAuthDataToToken failed: 0x%08lx\n", stat);
- return stat;
- }
-
- stat = funcs->DuplicateHandle (token, &prf.token);
- if (!NT_SUCCESS (stat))
- {
- cyglsa_printf ("DuplicateHandle failed: 0x%08lx\n", stat);
- return stat;
- }
-
- stat = funcs->CopyToClientBuffer (request, sizeof prf, *pbuf, &prf);
- if (!NT_SUCCESS (stat))
- {
- cyglsa_printf ("CopyToClientBuffer failed: 0x%08lx\n", stat);
- return stat;
- }
- funcs->FreeLsaHeap (user_auth);
-#endif /* JUST_ANOTHER_NONWORKING_SOLUTION */
- }
- if (pbuf_len)
- *pbuf_len = 64UL;
-
- /* A PLSA_TOKEN_INFORMATION_V2 is allocated in one piece, so... */
-#if defined (__x86_64__) || defined (_M_AMD64)
- {
- /* ...on 64 bit systems we have to convert the incoming 32 bit offsets
- into 64 bit pointers. That requires to re-evaluate the size of the
- outgoing tokinf structure and a somewhat awkward procedure to copy
- the information over. */
- LONG_PTR base;
- PBYTE tptr;
- DWORD size, newsize;
- PSID src_sid;
- PCYG_TOKEN_GROUPS src_grps;
- PTOKEN_GROUPS grps;
- PTOKEN_PRIVILEGES src_privs;
- PACL src_acl;
-
- base = (LONG_PTR) &authinf->inf;
-
- newsize = authinf->inf_size;
- newsize += sizeof (TOKEN_USER) - sizeof (CYG_TOKEN_USER); /* User SID */
- newsize += sizeof (PTOKEN_GROUPS) - sizeof (OFFSET); /* Groups */
- src_grps = (PCYG_TOKEN_GROUPS) (base + authinf->inf.Groups);
- newsize += src_grps->GroupCount /* Group SIDs */
- * (sizeof (SID_AND_ATTRIBUTES)
- - sizeof (CYG_SID_AND_ATTRIBUTES));
- newsize += sizeof (PSID) - sizeof (OFFSET); /* Primary Group SID */
- newsize += sizeof (PTOKEN_PRIVILEGES) - sizeof (OFFSET); /* Privileges */
- newsize += 0; /* Owner SID */
- newsize += sizeof (PACL) - sizeof (OFFSET); /* Default DACL */
-
- if (!(tokinf = funcs->AllocateLsaHeap (newsize)))
- return STATUS_NO_MEMORY;
- tptr = (PBYTE)(tokinf + 1);
-
- tokinf->ExpirationTime = authinf->inf.ExpirationTime;
- /* User SID */
- src_sid = (PSID) (base + authinf->inf.User.User.Sid);
- size = GetLengthSid (src_sid);
- CopySid (size, (PSID) tptr, src_sid);
- tokinf->User.User.Sid = (PSID) tptr;
- tptr += size;
- tokinf->User.User.Attributes = authinf->inf.User.User.Attributes;
- /* Groups */
- grps = (PTOKEN_GROUPS) tptr;
- tokinf->Groups = grps;
- grps->GroupCount = src_grps->GroupCount;
- tptr += sizeof grps->GroupCount
- + grps->GroupCount * sizeof (SID_AND_ATTRIBUTES);
- /* Group SIDs */
- for (i = 0; i < src_grps->GroupCount; ++i)
- {
- src_sid = (PSID) (base + src_grps->Groups[i].Sid);
- size = GetLengthSid (src_sid);
- CopySid (size, (PSID) tptr, src_sid);
- tokinf->Groups->Groups[i].Sid = (PSID) tptr;
- tptr += size;
- tokinf->Groups->Groups[i].Attributes = src_grps->Groups[i].Attributes;
- }
- /* Primary Group SID */
- src_sid = (PSID) (base + authinf->inf.PrimaryGroup.PrimaryGroup);
- size = GetLengthSid (src_sid);
- CopySid (size, (PSID) tptr, src_sid);
- tokinf->PrimaryGroup.PrimaryGroup = (PSID) tptr;
- tptr += size;
- /* Privileges */
- src_privs = (PTOKEN_PRIVILEGES) (base + authinf->inf.Privileges);
- size = sizeof src_privs->PrivilegeCount
- + src_privs->PrivilegeCount * sizeof (LUID_AND_ATTRIBUTES);
- memcpy (tptr, src_privs, size);
- tokinf->Privileges = (PTOKEN_PRIVILEGES) tptr;
- tptr += size;
- /* Owner */
- tokinf->Owner.Owner = NULL;
- /* Default DACL */
- src_acl = (PACL) (base + authinf->inf.DefaultDacl.DefaultDacl);
- size = src_acl->AclSize;
- memcpy (tptr, src_acl, size);
- tokinf->DefaultDacl.DefaultDacl = (PACL) tptr;
- }
-#else
- {
- /* ...on 32 bit systems we just allocate tokinf with the same size as
- we get, copy the whole structure and convert offsets into pointers. */
-
- /* Allocate LUID for usage in the logon SID on Windows 2000. This is
- not done in the 64 bit code above for hopefully obvious reasons... */
- LUID logon_sid_id;
-
- if (must_create_logon_sid && !AllocateLocallyUniqueId (&logon_sid_id))
- return STATUS_INSUFFICIENT_RESOURCES;
-
- if (!(tokinf = funcs->AllocateLsaHeap (authinf->inf_size)))
- return STATUS_NO_MEMORY;
- memcpy (tokinf, &authinf->inf, authinf->inf_size);
-
- /* User SID */
- tokinf->User.User.Sid = (PSID)
- ((PBYTE) tokinf + (LONG_PTR) tokinf->User.User.Sid);
- /* Groups */
- tokinf->Groups = (PTOKEN_GROUPS)
- ((PBYTE) tokinf + (LONG_PTR) tokinf->Groups);
- /* Group SIDs */
- for (i = 0; i < tokinf->Groups->GroupCount; ++i)
- {
- tokinf->Groups->Groups[i].Sid = (PSID)
- ((PBYTE) tokinf + (LONG_PTR) tokinf->Groups->Groups[i].Sid);
- if (must_create_logon_sid
- && tokinf->Groups->Groups[i].Attributes & SE_GROUP_LOGON_ID
- && *GetSidSubAuthorityCount (tokinf->Groups->Groups[i].Sid) == 3
- && *GetSidSubAuthority (tokinf->Groups->Groups[i].Sid, 0)
- == SECURITY_LOGON_IDS_RID)
- {
- *GetSidSubAuthority (tokinf->Groups->Groups[i].Sid, 1)
- = logon_sid_id.HighPart;
- *GetSidSubAuthority (tokinf->Groups->Groups[i].Sid, 2)
- = logon_sid_id.LowPart;
- }
- }
-
- /* Primary Group SID */
- tokinf->PrimaryGroup.PrimaryGroup = (PSID)
- ((PBYTE) tokinf + (LONG_PTR) tokinf->PrimaryGroup.PrimaryGroup);
- /* Privileges */
- tokinf->Privileges = (PTOKEN_PRIVILEGES)
- ((PBYTE) tokinf + (LONG_PTR) tokinf->Privileges);
- /* Owner SID */
- tokinf->Owner.Owner = NULL;
- /* Default DACL */
- tokinf->DefaultDacl.DefaultDacl = (PACL)
- ((PBYTE) tokinf + (LONG_PTR) tokinf->DefaultDacl.DefaultDacl);
-
- }
-#endif
-
- *tok = (PVOID) tokinf;
- *tok_type = LsaTokenInformationV2;
-
- print_tokinf (tokinf, authinf->inf_size, authinf, &authinf->inf,
- (PVOID)((LONG_PTR) &authinf->inf + authinf->inf_size));
-
- /* Create logon session. */
- if (!AllocateLocallyUniqueId (logon_id))
- {
- funcs->FreeLsaHeap (*tok);
- *tok = NULL;
- cyglsa_printf ("AllocateLocallyUniqueId failed: Win32 error %lu\n",
- GetLastError ());
- return STATUS_INSUFFICIENT_RESOURCES;
- }
- stat = funcs->CreateLogonSession (logon_id);
- if (stat != STATUS_SUCCESS)
- {
- funcs->FreeLsaHeap (*tok);
- *tok = NULL;
- cyglsa_printf ("CreateLogonSession failed: 0x%08lx\n", stat);
- return stat;
- }
-
- cyglsa_printf ("BINGO!!!\n", stat);
- return STATUS_SUCCESS;
-}
-
-VOID NTAPI
-LsaApLogonTerminated(PLUID LogonId)
-{
-}
-
-NTSTATUS NTAPI
-LsaApCallPackage (PLSA_CLIENT_REQUEST request, PVOID authinf,
- PVOID client_auth_base, ULONG auth_len, PVOID *ret_buf,
- PULONG ret_buf_len, PNTSTATUS ret_stat)
-{
- return STATUS_NOT_IMPLEMENTED;
-}
diff --git a/winsup/lsaauth/cyglsa.din b/winsup/lsaauth/cyglsa.din
deleted file mode 100644
index 69eece0..0000000
--- a/winsup/lsaauth/cyglsa.din
+++ /dev/null
@@ -1,9 +0,0 @@
-LIBRARY "cyglsa"
-
-EXPORTS
-LsaApInitializePackage = LsaApInitializePackage@20
-LsaApLogonUserEx = LsaApLogonUserEx@56
-LsaApLogonTerminated = LsaApLogonTerminated@4
-LsaApCallPackage = LsaApCallPackage@28
-LsaApCallPackagePassthrough = LsaApCallPackage@28
-LsaApCallPackageUntrusted = LsaApCallPackage@28
diff --git a/winsup/lsaauth/cyglsa64.dll b/winsup/lsaauth/cyglsa64.dll
deleted file mode 100644
index ef5c7aa..0000000
--- a/winsup/lsaauth/cyglsa64.dll
+++ /dev/null
Binary files differ
diff --git a/winsup/lsaauth/make-64bit-version-with-visual-c.bat b/winsup/lsaauth/make-64bit-version-with-visual-c.bat
deleted file mode 100644
index cd62303..0000000
--- a/winsup/lsaauth/make-64bit-version-with-visual-c.bat
+++ /dev/null
@@ -1,29 +0,0 @@
-@echo off
-rem This batchfile shows how to generate a 64 bit version of cyglsa.dll.
-rem The 32 bit version will not work on 64 bit systems.
-rem
-rem Note that you need not only the SDK headers and libs, but also the
-rem 64 bit ntdll.lib file from a DDK supporting 64 bit builds.
-rem
-rem Make sure all necessary include paths are set in %Include% (inc\ddk,
-rem inc\atl, inc\crt) and make sure that %Lib% points to the 64 bit libs, not
-rem to the 32 bit libs. In the latter case the link stage will succeed,
-rem but the resulting DLL is non-functional.
-rem
-rem This can be used as long as no x86_64-pe/coff capable gcc is available.
-rem Note that this is for building inside the source dir as not to interfere
-rem with the "official" 32 bit build in the build directory.
-rem
-rem Install the dll into /bin and use the cyglsa-config script to register it.
-rem Don't forget to reboot afterwards.
-rem
-rem Use "/DDEBUGGING" in the cl line to create debugging output to
-rem C:\cyglsa.dbgout at runtime.
-rem
-rem No idea when that changed, but in the latest SDKs you have to disable
-rem the security checks and there's apparently no runtmchk.lib anymore.
-rem I leave the old statements in for reference.
-rem cl /Wp64 /c cyglsa.c
-rem link /nodefaultlib /dll /machine:x64 /entry:DllMain /out:cyglsa64.dll /def:mslsa.def cyglsa.obj runtmchk.lib advapi32.lib kernel32.lib ntdll.lib
-cl /Wp64 /EHs-c- /GS- /GR- /GL- /c cyglsa.c
-link /nodefaultlib /dll /machine:x64 /entry:DllMain /out:cyglsa64.dll /def:mslsa.def cyglsa.obj advapi32.lib kernel32.lib ntdll.lib
diff --git a/winsup/lsaauth/mslsa.def b/winsup/lsaauth/mslsa.def
deleted file mode 100644
index 7b2d592..0000000
--- a/winsup/lsaauth/mslsa.def
+++ /dev/null
@@ -1,9 +0,0 @@
-LIBRARY "cyglsa64"
-
-EXPORTS
-LsaApInitializePackage
-LsaApLogonUserEx
-LsaApLogonTerminated
-LsaApCallPackage
-LsaApCallPackagePassthrough = LsaApCallPackage
-LsaApCallPackageUntrusted = LsaApCallPackage
diff --git a/winsup/mingw/CONTRIBUTORS b/winsup/mingw/CONTRIBUTORS
deleted file mode 100644
index f696f50..0000000
--- a/winsup/mingw/CONTRIBUTORS
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * CONTRIBUTORS
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * HISTORICAL:
- * Colin Peters <colin@fu.is.saga-u.ac.jp> - Original author of the
- * mingw-runtime package.
- * Mumit Khan <khan@xraylith.wisc.EDU> - Original maintainer of the
- * mingw-runtime package.
- * Gunther Ebert <gunther.ebert@ixos-leipzig.de> - Adaptations of his DLL
- * support.
- * Stan Cox <scox@cygnus.com> - Provided gccmain.c.
- * J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl> - Provided
- * dos.h.
- * Mikey <jeffdb@netzone.com> - Adaptated excpt.h from his code.
- * Pedro A. Aranda <paag@tid.es> - Provided lots of types for types.h.
- *
- * CURRENT:
- * Danny Smith <dannysmith@users.sourceforge.net>
- * Earnie Boyd <earnie@users.sourceforge.net>
- * Luke Dunstan <coder_infidel@users.sourceforge.net>
- *
- * Many others in the MinGW user community. They are listed in the ChangeLog.
- * Please review that file for the names of those contributors.
- *
- */
diff --git a/winsup/mingw/CRT_fp10.c b/winsup/mingw/CRT_fp10.c
deleted file mode 100644
index a13fb00..0000000
--- a/winsup/mingw/CRT_fp10.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * CRT_FP10.c
- *
- * This defines _fpreset as asm ("fnint"). Calls to _fpreset
- * will set default floating point precesion to 64-bit mantissa
- * at app startup.
- *
- * Linking in CRT_FP10.o before libmingw.a will override the definition
- * set in CRT_FP8.o.
- */
-
-/* Override library _fpreset() with asm fninit */
-void _fpreset (void)
- { __asm__ ( "fninit" ) ;}
-
-void __attribute__ ((alias ("_fpreset"))) fpreset(void);
diff --git a/winsup/mingw/CRT_fp8.c b/winsup/mingw/CRT_fp8.c
deleted file mode 100644
index d772d75..0000000
--- a/winsup/mingw/CRT_fp8.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * CRT_FP8.c
- *
- * This forces calls of _fpreset to the MSVCRT function
- * exported from dll. Effectively it make default
- * precison same as apps built with MSVC (53-bit mantissa).
-
- *
- * To change to 64-bit mantissa, link in CRT_FP10.o before libmingw.a.
- */
-
-/* Link against the _fpreset visible in import lib */
-
-extern void (*_imp___fpreset)(void) ;
-void _fpreset (void)
-{ (*_imp___fpreset)(); }
-
-void __attribute__ ((alias ("_fpreset"))) fpreset(void);
diff --git a/winsup/mingw/CRT_noglob.c b/winsup/mingw/CRT_noglob.c
deleted file mode 100644
index 2e122fb..0000000
--- a/winsup/mingw/CRT_noglob.c
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * CRT_noglob.c
- * This file has no copyright is assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Include this object file to set _CRT_glob to a state that will turn off
- * command line globbing by default. NOTE: _CRT_glob has a default state of on.
- *
- * To use this object include the object file in your link command:
- * gcc -o foo.exe foo.o CRT_noglob.o
- *
- */
-
-int _CRT_glob = 0;
diff --git a/winsup/mingw/CRTfmode.c b/winsup/mingw/CRTfmode.c
deleted file mode 100644
index cc1653a..0000000
--- a/winsup/mingw/CRTfmode.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * CRTfmode.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * This libmingw.a object sets _CRT_fmode to a state that will cause
- * _mingw32_init_fmode to leave all file modes in their default state
- * (basically text mode).
- *
- * To override the default, add, eg:
- *
- * #include <fcntl.h>
- * int _CRT_fmode = _O_BINARY;
- *
- * to your app.
- */
-
-int _CRT_fmode = 0;
diff --git a/winsup/mingw/CRTglob.c b/winsup/mingw/CRTglob.c
deleted file mode 100644
index a4f5fe0..0000000
--- a/winsup/mingw/CRTglob.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * CRTglob.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Include this object file to set _CRT_glob to a state that will
- * turn on command line globbing by default. NOTE: _CRT_glob has a default
- * state of on. Specify CRT_noglob.o to turn off globbing by default.
- *
- * To use this object include the object file in your link command:
- * gcc -o foo.exe foo.o CRTglob.o
- *
- */
-
-int _CRT_glob = -1;
diff --git a/winsup/mingw/CRTinit.c b/winsup/mingw/CRTinit.c
deleted file mode 100644
index bb2304d..0000000
--- a/winsup/mingw/CRTinit.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * CRTinit.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * A dummy version of _CRT_INIT for MS compatibility. Programs, or more often
- * dlls, which use the static version of the MSVC run time are supposed to
- * call _CRT_INIT to initialize the run time library in DllMain. This does
- * not appear to be necessary when using crtdll or the dll versions of the
- * MSVC runtime, so the dummy call simply does nothing.
- *
- * This object file is included as a standard in the link process as provided
- * by the appropriate GCC frontend.
- *
- * To use this object include the object file in your link command:
- * gcc -o foo.exe foo.o CRTinit.o
- *
- */
-
-void
-_CRT_INIT ()
-{
-}
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog
deleted file mode 100644
index da6a589..0000000
--- a/winsup/mingw/ChangeLog
+++ /dev/null
@@ -1,4136 +0,0 @@
-2008-12-16 Danny Smith <dannysmith@users.sourceforge.net>
-
- * msvcrt.def.in (___lc_codepage_func, ___lc_collate_cp_func,
- ___lc_handle_func, ___mb_cur_max_func, ___setlc_active_func,
- ___unguarded_readlc_active_add_func, __crtCompareStringW,
- __crtGetStringTypeW, __crtLCMapStringW, __pctype_func,
- __pwctype_func, __iob_func, __uncaught_exception, __wcserror,
- __CxxDetectRethrow, __CxxExceptionFilter, __CxxQueryExceptionSize,
- __CxxRegisterExceptionObject, __CxxUnregisterExceptionObject,
- __CxxCallUnwindDtor, __DestructExceptionObject, _aligned_free,
- _aligned_malloc, _aligned_offset_malloc, _aligned_offset_realloc,
- _aligned_realloc, _cgetws, _cputws, _cwprintf, _cwscanf, _getwch,
- _getwche, _putwch, _resetstkoflw, _scprintf, _scwprintf,
- _set_SSE2_enable, _snscanf, _snwscanf, _strtoi64, _strtoui64,
- _ungetwch, _vscprintf, _vscwprintf, _wcserror, _wcstoi64,
- _wcstoui64, _wctype, _wtof, _get_heap_handle): Always export.
-
-2008-12-08 Dmitry G. Gorbachev <d.g.gorbachev@gmail.com>
-
- * cpu_features.c (__cpu_features_init): Remove erroneous ';'.
-
-2008-10-28 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- Correct some binary distribution packaging defects.
-
- * Makefile.in (bindist): Remove `make' conditionals; segregate into...
- (bindist-common, bindist-mingwrt, bindist-mingw-runtime): ...these new
- intermediate goals; they make packages of files, as specified by...
- (BINDIST_FILES, DEVDIST_FILES, DLLDIST_FILES): ...these new macros.
- (dist_prefix) [target_alias !~ cygwin]: Leave it undefined.
-
-2008-10-18 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- Fix MinGW-Bug [2136252]: (Reported by Roumen Petrov).
- Remove extraneous radix point in printf( "%.0f", v ) for v < 0.5
-
- * mingwex/stdio/pformat.c (__pformat_emit_float): Always make output
- of radix point conditional on precision != 0 or `#' flag specified.
-
-2008-10-13 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- Fix MinGW-Bug [2160227]
- Eliminate conflicting declarations and implementations of scalb().
-
- * moldname.def.in (scalb): Comment out of EXPORTS list.
- * include/math.h (scalb): Comment out OLDNAMES prototype; it conflicts
- with GCC's built-in declaration.
-
-2008-10-12 Christopher Faylor <me+cygwin@cgf.cx>
-
- * Makefile.in: Use a different method to invoke gcc in a cygwin-hosted
- environment.
- * mingwex/Makefile.in: Ditto.
- * profile/Makefile.in: Ditto.
- * configure.in: Record mingw front-end for building under Cygwin.
- * mingwex/configure.in: Ditto.
- * profile/configure.in: Ditto.
- * configure: Regenerate.
- * mingwex/configure: Ditto.
- * profile/configure: Ditto.
-
-2008-10-11 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- Use de-facto standard Makefile goals to invoke test suite.
-
- * Makefile.in: Some minor formatting adjustments.
- (test_headers): Unconventionally named goal renamed to...
- (check-headers): ...this; make it a prerequisite of...
- (check): ...this new conventionally named goal.
-
-2008-10-11 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- Make strtod() inline definition C89 compliant.
- (Issue reported by Ilya Shestopalov and Ian Puleston)
- (Correction identified by Danny Smith)
-
- * include/stdlib.h (strtod): Declare as `__inline__', not `inline';
- reformat inline function definition.
-
->>>>>>> 1.423
-2008-10-04 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/_mingw.h: Increment version to 3.15.1 and introduce
- __MINGW32_PATCHLEVEL variable.
-
-2008-10-03 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- Fix MinGW-Bug [2144266]: getopt() sets `optind' incorrectly.
- (Reported by Christian Franke)
-
- * mingwex/getopt.c (optind): Make global variable value conform to
- behaviour specified by POSIX; do not use it for internal state in...
- (getopt_parse): ...this static function; use...
- (optbase): ...this new static local variable instead.
- (getopt_resolved): Update `optind' as required.
-
-2008-10-03 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- Improve package identification in configure script.
-
- * configure.ac (AC_INIT): Redefine parameters...
- (PACKAGE_NAME): Set to `MinGW Runtime'.
- (PACKAGE_BUGREPORT): Set to `http://mingw.org/reporting_bugs'
- (PACKAGE_TARNAME): Set to `mingwrt'.
- (PACKAGE_VERSION): Set generically to `v3.x'; reassigned by...
- (MINGW_AC_CONFIG_SRCDIR): ...this macro, which extracts...
- (__MINGW32_VERSION): ...this, from file `include/_mingw.h'.
-
- * aclocal.m4 (MINGW_AC_CONFIG_SRCDIR): Do not redefine...
- (PACKAGE_TARNAME): ...this.
-
- * configure: Regenerated.
-
-2008-09-25 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- Fix MinGW-Bug [2125708].
- (Reported by Alexandr Zamaraev).
-
- * include/stdlib.h (intptr_t) [!_INTPTR_T_DEFINED]: Unused typedef;
- not wanted here; remove it; replace it by...
- (uintptr_t) [!_UINTPTR_T_DEFINED]: ...this typedef; needed by...
- (_invalid_parameter_handler): ...this function typedef.
-
-2008-09-23 Chris Sutcliffe <ir0nh34d@users.sf.net>
-
- * Makefile.in: Don't include host_os as part of snapshot filename.
-
-2008-09-19 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- Fix MinGW-Bug [2119504].
- (Reported by Peiyuan Song).
-
- * mingwex/getopt.c (getopt_resolved): Do not overwrite...
- (*retindex): ...this already correctly assigned return variable...
- (opt[index].val): ...with this; this should have been assigned to...
- (*opt[index].flag) [opt[index].flag != NULL]: ...this instead.
-
-2008-09-19 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- Fix MinGW-Bug [2117379].
- (Reported by Peiyuan Song).
-
- * include/stdio.h (__argv): Replace all references in function
- prototype argument lists and inline function local variables, with ...
- (__local_argv): ...this, to avoid potential conflict with ...
- * include/stdlib (__argv): ...this #defined macro.
-
-2008-09-07 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/_mingw.h: Increment version to 3.15.
-
-2008-09-06 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * Makefile.in: Adjust to new naming standard for MinGW while maintaining old
- naming standard for Cygwin.
-
-2008-08-31 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- Reimplement getopt.c to add getopt_long_only() function.
-
- (N.B. this reimplementation removes support for BSD/Mac-OS-X
- `optreset' nonsense; user code should set `optind = 0' instead,
- to reinitialise option scanning).
-
- * mingwex/getopt.c: Delete all content; reimplement it.
- * include/getopt.h: Likewise.
-
- * include/unistd.h (__UNISTD_H_SOURCED__): New macro; define it.
- (__UNISTD_GETOPT__): This macro is no longer required; remove it.
-
-2008-08-30 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- Implement conditional replacement for printf() family functions.
-
- * include/_mingw.h (__USE_MINGW_ANSI_STDIO): New macro; define it.
- (__MINGW_ANSI_STDIO__): New manifest constant; define as bitmapped
- flag for use in user specified __MINGW_FEATURES__ attribute.
- (__MINGW_LC_MESSAGES__, __MINGW_LC_ENVVARS__): New manifest constants;
- currently unused: reserved as components of...
- (__MINGW_LC_EXTENSIONS__): ...this new manifest constant; earmarked as
- a __MINGW_FEATURES__ enhancement to setlocale().
-
- * include/stdio.h (__mingw_printf, __mingw_vprintf): Prototype them.
- (__mingw_fprintf, __mingw_vfprintf): Likewise.
- (__mingw_sprintf, __mingw_vsprintf): Likewise.
- (__msvcrt_printf, __msvcrt_vprintf): Likewise.
- (__msvcrt_fprintf, __msvcrt_vfprintf): Likewise.
- (__msvcrt_sprintf, __msvcrt_vsprintf): Likewise.
- (printf, vprintf) [!__USE_MINGW_ANSI_STDIO]: Prototype for default
- usage; link to DLL import stub, importing from MSVCRT.
- (fprintf, vfprintf) [!__USE_MINGW_ANSI_STDIO]: Likewise.
- (sprintf, vsprintf) [!__USE_MINGW_ANSI_STDIO]: Likewise.
- (printf) [__USE_MINGW_ANSI_STDIO]: Redirect to __mingw_printf; use
- locally defined static stub implementation.
- (fprintf, sprintf) [__USE_MINGW_ANSI_STDIO]: Likewise; redirect to
- __mingw_fprintf and __mingw_sprintf respectively.
- (vprintf) [__USE_MINGW_ANSI_STDIO]: Redirect to __mingw_vprintf; use
- static inline implementation for C++ and GNU C, or locally defined
- static stub otherwise.
- (vfprintf, vsprintf) [__USE_MINGW_ANSI_STDIO]: Likewise; redirect to
- __mingw_vfprintf and __mingw_vsprintf respectively.
-
-2008-08-27 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- Avoid access violations, passing NULL to printf( "...%s..." );
- (inconsistencency with MSVCRT and glibc, reported by Colin Harrison).
-
- * mingwex/stdio/pformat.c (__pformat_puts): Substitute "(null)"
- for argument value, if caller passes a NULL pointer.
- (__pformat_wcputs): Likewise, substitute L"(null)".
-
-2008-08-14 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- Add missing dependencies for building libmingwex.a.
-
- * mingwex/Makefile.in (printf.o, fprintf.o, sprintf.o): Make them...
- (vprintf.o, vfprintf.o, vsprintf.o): ...and also these, depend on...
- (pformat.h): ...this.
-
-2008-08-11 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- Add replacements for remaining members of printf() family.
-
- * mingwex/stdio/printf.c: New file.
- * mingwex/stdio/fprintf.c: New file.
- * mingwex/stdio/sprintf.c: New file.
- * mingwex/stdio/vprintf.c: New file.
- * mingwex/stdio/vfprintf.c: New file.
- * mingwex/stdio/vsprintf.c: New file.
-
- * mingwex/Makefile.in (STDIO_DISTFILES): Add them.
- (STDIO_OBJS): Add their corresponding object files.
-
-2008-07-29 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- Replace __mingw_snprintf() with new generic family implementation;
- likewise, replace __mingw_vsnprintf().
-
- * mingwex/stdio/pformat.c mingwex/stdio/pformat.h: New files.
- * mingwex/stdio/snprintf.c mingwex/stdio/vsnprintf.c: New files.
- * mingwex/Makefile.in (STDIO_DISTFILES): Add them.
- (GDTOA_DISTFILES): Remove mingw_snprintf.c
- (STDIO_OBJS): Add pformat.o, snprintf.o and vsnprintf.o
- (GDTOA_OBJS): Remove mingw_snprintf.o
- (PFORMAT_CFLAGS): New macro; define it, as required by...
- (pformat.o): ...this new explicit build target.
- (snprintf.o, vsnprintf.o): Declare prerequisites.
-
- * mingwex/gdtoa/mingw_snprintf.c: Redundant file; delete it.
-
-2008-07-28 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- Lay foundations for new printf() function family implementation.
-
- * ofmt_stub.s: New file; implement forward compatibility stub for...
- (_get_output_format): ...this MSVCR80.DLL and later function.
-
- * Makefile.in (SRCDIST_FILES): Add ofmt_stub.s.
- (NM, OBJCOPY): New macros; define them with AC_SUBSTed values.
- (sym_prefix, NM_LOOKUP, MINGW_REPL_FUNCS): New macros; define them.
- (lib%.a): Include ofmt_stub.o when import library does not already
- advertise availability of the _get_output_format() function;
- Add alias stubs for MINGW_REPL_FUNCS, such that...
- (__msvcrt_printf): ...is an alias for Microsoft's printf().
- (__msvcrt_fprintf): ...is an alias for Microsoft's fprintf().
- (__msvcrt_sprintf): ...is an alias for Microsoft's sprintf().
- (__msvcrt_vprintf): ...is an alias for Microsoft's vprintf().
- (__msvcrt_vfprintf): ...is an alias for Microsoft's vfprintf().
- (__msvcrt_vsprintf): ...is an alias for Microsoft's vsprintf().
- (clean): Add msvcr*.def.
-
- * configure.in (NM, OBJCOPY): Use AC_CHECK_TOOL to specify them.
- * configure: Regenerated.
-
-2008-07-06 Gregory McGarry <gregorymcgarry@users.sourceforge.net>
-
- * include/ctype.h (_imp____mb_cur_max): Correct spelling.
- (_imp____mb_cur_max_dll): Likewise.
-
-2008-07-04 Danny Smith <dannysmith@users,sourceforge.net>
-
- * include/stdio.h (swprintf, vswprintf): Guard with #ifndef __STRICT_ANSI__
- * include/wchar.h (swprintf, vswprintf): Likewise.
-
-2008-07-01 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- * msvcrt.def.in [__msvcr80__, __msvcr80d__, __msvcr90__, __msvcr90d__]
- (_get_output_format, _set_output_format): Add references.
-
- * include/stdio.h [__MSVCRT_VERSION__ >= 0x800]
- (_get_output_format, _set_output_format): Declare prototypes.
- (_TWO_DIGIT_EXPONENT): Define.
- Some other minor formatting adjustments.
-
-2008-06-14 Danny Smith <dannysmith@users.sourceforge.net>
-
- [mingw-Bugs-1801641]
- * include/wchar.h (_wfdopen): Const-ify second arg.
- * include/stdio.h (_wfdopen): Likewise.
- Thanks to <tdragon at users dot sourceforge net>
-
-2008-06-02 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- Avoid precision errors in round(), lround() and llround() functions.
-
- * mingwex/math/round_generic.c: New file; it replaces...
- * mingwex/math/round.c: ...this; delete it.
- * mingwex/math/roundf.c: ...and this; ditto.
- * mingwex/math/roundl.c: ...and this; ditto.
-
- * mingwex/math/lround_generic.c: New file; it replaces...
- * mingwex/math/lround.c: ...this; delete it.
- * mingwex/math/lroundf.c: ...and this; ditto.
- * mingwex/math/lroundl.c: ...and this; ditto.
- * mingwex/math/llround.c: ...and this; ditto.
- * mingwex/math/llroundf.c: ...and this; ditto.
- * mingwex/math/llroundl.c: ...and this; ditto.
-
- * mingwex/math/round_internal.h: New file; it provides generic common
- code, which is shared by `round_generic.c' and `lround_generic.c'; the
- implementation is based on techniques suggested by Danny Smith and
- Greg Chicares.
-
- * mingwex/Makefile.in (MATH_DISTFILES): Remove `round.c', `roundf.c',
- `roundl.c', `lround.c', `lroundf.c', `lroundl.c', `llround.c',
- `llroundf.c' and `llroundl.c'; replace by `round_internal.h',
- `round_generic.c' and `lround_generic.c'.
- (MATH_OBJS): Factor out files listed in...
- (MATH_ROUND_OBJS, MATH_LROUND_OBJS, MATH_LLROUND_OBJS): ...these new
- macros; define them; specify dependencies and build rules; add to...
- (LIB_OBJS): ...this list.
-
-2008-05-22 Danny Smith <dannysmith@users.sourceforge.net>
-
- [ mingw-Bugs-1961893 ]
- * mingwex/gdtoa/mingw_snprint.c (x_sprintf): Always set __ldtoa
- mode to 2 for E format.
-
-2008-05-15 Ramiro Polla <ramiro@lisha.ufsc.br>
-
- * include/stdlib.h: Fix strtod under C++.
-
-2008-05-06 Ramiro Polla <ramiro@lisha.ufsc.br>
-
- * mingwex/gdtoa/strtodnrp.c: Remove alias from strtod to __strtod.
- * include/stdlib.h: Define strtod to __strtod when __NO_ISOCEXT is not set.
-
-2008-05-04 Ramiro Polla <ramiro@lisha.ufsc.br>
-
- * include/sys/types.h (useconds_t): typedef.
- * include/unistd.h (usleep): Add prototype.
- * mingwex/usleep.c: New file.
- * mingwex/makefile.in: Add usleep source and object.
-
-2008-05-02 Ramiro Polla <ramiro@lisha.ufsc.br>
-
- Make strtod() conform to C99.
-
- * include/stdlib.h (strtod): Declare this mingwex function, and...
- (_strtod): rename this MSVCRT counterpart.
-
- * mingwex/gdtoa/strtodnrp.c (strtod): Alias to __strtod.
-
-2008-04-26 Chuck Wilson <cwilso11@users.sourceforge.net>
-
- * Makefile.in: correct issues with mingw10.dll having multiple relocs.
-
-2008-04-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/process.h: Include stdint.h for intptr_t definition.
- (_execl, _execle, _execlp, _execlpe, _execv, _execve, _execvp, _execvpe,
- _spawnl, _spawnle, _spawnlp, _spawnlpe, _spawnv, _spawnve, _spawnvp,
- _spawnvpe): Return intptr_t.
- (execl, execle, execlp, execlpe, execv, execve, execvp, execvpe, spawnl,
- spawnle, spawnlp, spawnlpe, spawnv, spawnve, spawnvp, spawnvpe): Return
- intptr_t.
- * include/wchar.h: Guard wide process.h functions with !__STRICT_ANSI__.
-
- [!_WPROCESS_DEFINED]: Include stdint.h for intptr_t definition.
- (_wexecl, _wexecle, _wexeclp, _wexeclpe, _wexecv, _wexecve, _wexecvp,
- _wexecvpe, _wspawnl, _wspawnle, _wspawnlp, _wspawnlpe, _wspawnv, _wspawnve,
- _wspawnvp, _wspawnvpe): Return intptr_t.
-
-2008-04-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wchar.h (fwide): Return success code rather than failure in inline
- definition.
- * mingwex/fwide.c (fwide): ANSI-fy. Get rid of Q8 comments. Return success
- code rather than failure.
-
-2008-03-21 Danny Smith
-
- * include/math.h (float_t, double_t): Define.
-
-2008-02-08 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/gdtoa/gdtoaimp.h (USE_LOCALE): Define.
- * mingwex/gdtoa/mingw_snprintf.c: [USE_LOCALE] Include locale.h.
- (x_sprintf): [USE_LOCALE] Use *localeconv()->decimal_point.
-
-2008-02-28 Joseph Myers <joseph@codesourcery.com>
-
- * include/complex.h: Don't condition contents on C99 or not
- __STRICT_ANSI__.
-
-2008-02-01 Brian Dessent <brian@dessent.net>
-
- * Makefile.in: Add rules to generate multiple versions of libmoldname.a for
- the different runtime versions.
-
-2008-01-19 Danny Smith <dannysmithusers.sourceforge.net
-
- * inclue/wchar.h (fwide): Add prototype and guard inline definition.
- (mbsinit): Likewise.
-
-2007-12-27 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/_mingw.h: Increment version to 3.14.
-
-2007-11-26 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * Makefile.in: Add libmsvcr90.a and libmsvcr90d.a targets.
- * msvcrt.def.in: Add support for __msvcr90__ and __msvcr90d__ defines.
- * mingwex/math/log10f.S: Correct issue with comments.
- * mingwex/math/log10l.S: Ditto.
- * mingwex/math/log1p.S: Ditto.
- * mingwex/math/log1pf.S: Ditto.
- * mingwex/math/log1pl.S: Ditto.
- * mingwex/math/log2.S: Ditto.
- * mingwex/math/log2f.S: Ditto.
- * mingwex/math/log2l.S: Ditto.
- * mingwex/math/logf.S: Ditto.
- * mingwex/math/logl.S: Ditto.
-
-2007-10-03 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/gdtoa/mingw_snprintf.c: fixed warning during compile.
-
-2007-10-03 Bernd Becker <hugin@users.sourceforge.net>
-
- * include/io.h (__finddata64_t, __wfinddata64_t): changed member 'size'
- from '_fsize_t' to '__int64' to be consistent with the other ...64
- structures and the value set there is 8 bytes not 4. Add guard for both
- as the are only used by functions available from 6.1 on.
-
- * include/malloc.h (_HEAP_MAXREQ): Define.
- (_aligned_offset_recalloc): Define.
- (_aligned_recalloc()): Define.
-
- * include/math.h: fixed a typo in a comment.
- (atanhf): Fixed declaration.
-
- * include/wchar.h (__wfinddata64_t): changed member 'size' from '_fsize_t'
- to '__int64' to be consistent with the other ...64 structures and the value
- set there is 8 bytes not 4. Added guard as this function is only used by
- functions available from 6.1 on.
-
- * include/sys/stat.h: some members of 'stat' were declared with types with
- a prefixed underscore, while the ones without the underscore should have
- been used. Added guard to '__stat64' as it is only used by functions
- available from 6.1 on. Added the wide character versions of the
- exec()/spawn() family for completion
- (_stati64): changed the type of the 'st_mode' member from 'unsigned int' to
- '_mode_t'
-
- * include/sys/timeb.h (timeb, _timb): changed the type of the 'time' member
- from 'long' to 'time_t'
- (__timeb64): moved declaration of structure directly before the declaration
- of the function '_ftime64()', so it is guarded as well
-
- * include/sys/utime.h (__utimbuf64): moved declaration of structure directly
- before the declaration of the functions using it, so it is guarded as well
-
-2007-09-24 David C. Daeschler <daveregs@rsaisp.com>
-
- * mingwex/gdtoa/mingw_snprintf.c (x_sprintf): Correct LEN_L typo in 'l'
- case. Add missing break in 's'/LEN_S case.
-
-2007-08-25 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- Make snprintf() and vsnprintf() conform to C99.
-
- * include/stdio.h: Add note about incompatibility between...
- (snprintf, vsnprintf): These two mingwex functions, and...
- (_snprintf, _vsnprintf): these MSVCRT counterparts.
-
- * mingwex/Makefile.in (STDIO_OBJS): Remove snprintf.o and vsnprintf.o
- (STDIO_DISTFILES): Remove snprintf.c and vsnprintf.c
-
- * mingwex/stdio/snprintf.c: Delete.
- * mingwex/stdio/vsnprintf.c: Delete.
-
- * mingwex/gdtoa/mingw_snprintf.c (snprintf): Alias to __mingw_snprintf
- (vsnprintf): Alias to __mingw_vsnprintf.
-
-2007-07-25 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/_mingw.h: Increment version to 3.13.
- * Makefile.in: Reset CYGRELEASE to 1
-
-2007-07-23 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- * Makefile.in (SUBDIRS): Delete stray line continuation artifact,
- resulting from incomplete removal of enclosing `for ...; do ...; done'
- loop from compound command; (reported by Greg Chicares).
-
-2007-07-19 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/fcntl.h (_O_WTEXT, _O_U16TEXT, _O_U8TEXT) Define for
- Vista.
-
-2007-07-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- [mingw-Bugs-1734142]
- * include/wchar.h (_wsystem) Declare.
- (_wputenv) Declare.
- (_wgetenv): Declare.
- (_wsearchenv): Declare.
- (_wmakepath): Declare.
- (_wsplitpath): Declare.
- (_wfullpath): Declare.
- * include/stdlib.h (_wsystem) Declare.
- (_wputenv, _wgetenv, _wsearchenv, _wmakepath, _wsplitpath,
- _wfullpath): Move into _WSTDLIB_DEFINED guard.
- * include/tchar.h (_tsystem): New UNICODE mapping define.
-
-2007-06-29 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/gdtoa/mingw_snprintf.c: New file.
- * mingwex/Makefile.in (GDTOA_DISTFILES): Add mingw_snprintf.c.
- (GDTOA_OBJS): Add mingw_snprintf.o.
-
-2007-06-28 Danny Smith <dannysmith@users.sourceforge.net>
-
- * msvcrt.def.in: Update comment.
- Exclude _ctype stub if using msvcr71.dll or newer.
- * include/ctype.h: Don't declare _ctype if using msvcr71.dll or newer.
- * include/wctype.h: Likewise.
-
-2007-06-23 Danny Smith <dannysmith@users.sourceforge.net>
-
- *include/wctype.h: Qualify all functions with __MINGW_NOTHROW.
- *include/dirent.h: Likewise.
-
-2007-06-23 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/assert.h: Qualify all functions with __MINGW_NOTHROW.
- * include/conio.h: Likewise.
- * include/ctype.h: Likewise.
- * include/direct.h: Likewise.
- * include/dos.h: Likewise.
- * include/errno.h: Likewise.
- * include/fenv.h: Likewise.
- * include/float.h: Likewise.
- * include/inttypes.h: Likewise.
- * include/io.h: Likewise.
- * include/libgen.h: Likewise.
- * include/locale.h: Likewise.
- * include/malloc.h: Likewise.
- * include/mbctype.h: Likewise.
- * include/mbstring.h: Likewise.
- * include/process.h: Likewise.
- * include/search.h: Likewise.
- * include/setjmp.h: Likewise.
- * include/signal.h: Likewise.
- * include/stdio.h: Likewise.
- * include/stdlib.h: Likewise.
- * include/string.h: Likewise.
- * include/time.h: Likewise.
- * include/wchar.h: Likewise.
- * include/sys/stat.h: Likewise.
- * include/sys/time.h: Likewise.
- * include/sys/timeb.h: Likewise.
- * include/sys/utime.h: Likewise.
-
-2007-06-22 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/Makefile.in (LIB_OBJS): Revert accidental removal.
-
-2007-06-22 Danny Smith <dannysmith@users.sourceforge.net>
-
- Add POSIX binary tree search API.
-
- * mingwex/tfind.c: New file.
- * mingwex/tdelete.c: New file.
- * mingwex/tsearch.c: New file.
- * mingwex/twalk.c: New file.
- * mingwex/Makefile.in (DISTFILES): Add tsearch.c twalk.c tdelete.c tfind.c.
- * mingwex/Makefile.in (POSIX_OBJS): Add tsearch.o twalk.o tdelete.o tfind.o.
- * include/search.h (tfind): Declare.
- (tdelete): Declare.
- (tsearch): Declare.
- (twalk): Declare.
- (ENTRY): Define.
- (ACTION): Define.
- (VISIT): Define.
- (node_t): Define, on condition of _SEARCH_PRIVATE.
-
-2007-06-22 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/_mingw.h (__MINGW_NOTHROW): Define.
-
-2007-06-18 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdio.h (vsnprintf): Remove inline definition.
- Add prototype.
-
-2007-06-16 Danny Smith <dannysmith@users.sourceforge.net>
-
- * CRTfmode.c: Nit-pick comment fix.
-
-2007-06-16 Christopher Faylor <me+cygwin@cgf.cx>
-
- * CRTfmode.c: Fix nested comment.
-
-2007-06-16 Christopher Faylor <me+cygwin@cgf.cx>
-
- * include/string.h (strcasecmp): Fix typo in declaration prototype.
-
-2007-06-14 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/io.h (lseek64) : Add prototype.
-
-2007-06-14 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/string.h (strcasecmp): Add prototype.
- (strncasecmp): Add prototype.
-
-2007-06-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * Makefile.in (CRT0S): Revert last change.
- * CRTfmode.c. Correct comment.
-
-2007-06-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * Makefile.in (CRT0S): Add back CRTfmode.o.
-
-2007-06-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdlib.h: Don't include stdint.h. Conditionally define intptr_t.
- * include/io.h: Likewise.
-
-2007-06-11 Danny Smith <dannysmith@users.sourceforge.net>
-
- * crt1.c (__mingw_CRTStartup): Add explicit call to gcc's __main.
-
-2007-05-08 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdint.h (intptr_t): Fix typo.
- Thanks to Charles Wilson for report.
-
-2007-05-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdint.h (intptr_t): Protect with _INTPTR_T_DEFINED.
- Condition on _WIN64.
- (uintptr_t): Protect with _UINTPTR_T_DEFINED. Condition on _WIN64.
- (INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX): Condition on _WIN64.
- (PTRDIFF_MIN): Define as INTPTR_MIN.
- (PTRDIFF_MAX): Define as INTPTR_MAX.
- (SIG_ATOMIC_MIN): Define as INTPTR_MIN.
- (SIG_ATOMIC_MAX): Define as INTPTR_MAX.
-
-2007-04-07 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * Makefile.in: Removed mansuffix variable. Changed mansection to support
- Cygwin man page location.
-
-2007-04-05 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * Makefile.in: Added mansection and mansuffix variables. Changed mandir to
- support Cygwin man page location.
-
-2007-03-25 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * Include/_mingw.h: Increment version to 3.12.
-
-2007-03-22 Brian Ripley <ripleybd@users.sourceforge.net>
-
- * include/_mingw.h (__CRT_INLINE): Make conditional on __GNUC_STDC_INLINE__.
-
-2007-03-20 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * Makefile.in: Tweak srcdist to fix build issue.
-
-2007-03-20 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- Add --enable-mingw-manpage-transform configure option.
-
- * aclocal.m4 (MINGW_AC_MANPAGE_TRANSFORM): New macro.
- * configure.in, Makefile.in: Use it.
- * configure: Regenerated.
-
-2007-03-18 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/_mingw.h (__CRT_INLINE): Use __gnu_inline__ for gcc 4.2.x too.
-
-2007-03-10 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- Add manpages for dirname and basename functions.
-
- * man: New directory.
- * man/dirname.man: New file; it sources both manpages.
- * Makefile.in: Add provisional rules to distribute them.
-
-2007-03-08 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- * mingwex/basename.c: Make it work with path names containing
- multibyte character strings.
- * mingwex/dirname.c: Likewise.
-
-2007-03-05 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/io.h (__mingw_access): New static inline wrapper to restore
- pre-Vista 'access (fname, X_OK)' behaviour.
- (__USE_MINGW_ACCESS): Use to map access() to __mingw_access().
-
-2007-03-05 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/fesetround.c (fesetround): Use unsigned int as operand
- to stmxcsr.
- Thanks to Alexey Kuznetsov <ring0_mipt at users dot sf dot net>
-
-2007-02-27 Thorsten Dahlheimer <tdahlheim@gmx.net>
-
- * include/stdio.h (_unlink, unlink): Add prototypes.
-
-2007-02-18 Aurimas Cernius <aurisc4@gmail.com>
-
- * include/excpt.h: Replace "_try1" in comments with "__try1".
-
-2007-02-15 Danny Smith <dannysmith@users.sourceforge.net>
-
- * Makefile.in (ALL_CFLAGS): Put W32API_INCLUDE after INCLUDES.
- (ALL_CXXFLAGS): Likewise.
- * mingwex/Makefile.in (ALL_CFLAGS): Put W32API_INCLUDE after INCLUDES.
- (ALL_CXXFLAGS): Likewise.
- * profile/Makefile.in (ALL_CFLAGS): Put W32API_INCLUDE after INCLUDES.
- (ALL_CXXFLAGS): Likewise.
-
-2007-02-08 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/io.h (X_OK): Revert 2007-01-24 change, but leave comment.
-
-2007-01-27 Danny Smith <dannysmith@users.sourceforge.net>
-
- Expose some more msvcr80.dll functions.
- * include/stdio.h (_fseek_nolock. _ftell_nolock, _fseeki64,
- _ftelli64, _fseeki64_nolock, _ftelli64_nolock) Add prototypes
- * msvcrt.def.in (_fseek_nolock. _ftell_nolock, _fseeki64,
- _ftelli64, _fseeki64_nolock, _ftelli64_nolock) Add stubs.
-
-2007-01-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- Expose some msvcr80.dll functions.
- * include/stdlib.h (_set_abort_behavior): Add prototype.
- (_WRITE_ABORT_MSG, _CALL_REPORTFAULT): Add defines for
- _set_abort_behavior mask argument.
- (_invalid_parameter_handler): Add typedef.
- (_set_invalid_parameter_handler): Add prototype.
- * include/stdio.h (_get_printf_count_output): Add prototype.
- (_set_printf_count_output): Add prototype.
- * msvcrt.def.in (_get_printf_count_output,_set_printf_count_output,
- _set_abort_behavior, _set_invalid_parameter_handler): Add stubs.
-
-2007-01-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/_mingw.h (CRT_INLINE): Correct typo.
-
-2007-01-24 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/io.h (X_OK): Define to F_OK.
-
-2007-01-19 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdio.h (SEEK_SET, SEEK_CUR, SEEK_END): Define
- unconditionally. Change comment.
- * include/unistd.h (SEEK_SET, SEEK_CUR, SEEK_END): Define
- here too.
- * include/io.h (rename): Declare.
- (remove): Declare.
-
-2006-12-31 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- * include/libgen.h: New file; required by...
- * mingwex/basename.c, mingwex/dirname.c: New files.
- * mingwex/Makefile.in (DISTFILES): Add them...
- (POSIX_OBJS): ...with corresponding basename.o, dirname.o
- (Dependencies): Typo; s/Dependancies/Dependencies/
-
-2006-11-25 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- * Makefile.in (VERSION): Let configure define it.
-
- * aclocal.m4 (MINGW_AC_CONFIG_SRCDIR): New macro.
- * configure.in: Use it.
- Correct quoting of autoconf macro arguments throughout.
- (AC_INIT, AC_OUTPUT): Update to autoconf 2.5x preferred syntax.
- (AR, AS, RANLIB, LD, DLLTOOL, DLLWRAP): Don't need AC_SUBST.
- (AC_ALLOCA): Invalid after GCC_NO_EXECUTABLES; removed.
- (AC_CONFIG_FILES): Add, to generate Makefile.
-
- * configure: Regenerated.
-
-2006-11-21 Danny Smith <dannysmith@users.sourceforge.net>
-
- * Makefile.in: Add aclocal.m4 to source release.
- * mingwex/Makefile.in: Ditto.
- * profile/Makefile.in: Ditto.
-
-2006-11-18 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * Include/_mingw.h: Increment version to 3.11.
- * Makefile.in: Ditto.
-
-2006-11-09 Danny Smith <dannysmith@users.sourceforge.net>
-
- [ mingw-Bugs-1590623 ]
- * include/_mingw.h (__CRT_INLINE): Use __gnu_inline__ attribute
- in C99 mode.
-
-2006-10-04 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in: Semi-revert semi-reversion of 2006-08-30 change, now
- correctly parenthesized.
-
-2006-09-19 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/mb_wc_common.h (get_codepage): Get it
- from __lc_codepage.
-
-2006-09-18 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/gdtoa/g_xfmt.c (g_xfmt): Fix representation of infinity.
- Use fpclassify.
- * mingwex/gdtoa/strtopx (__strtopx): Avoid cast of long double* to
- void*.
- * mingwex/gdtoa/gdtoa.h (__g_fmt): Make declaration consistent with
- others.
-
-2006-09-16 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/gdtoa/strtopx.c (strtopx): Fix long double representation
- of infinity.
-
-2006-09-11 Christopher Faylor <cgf@timesys.com>
-
- * Makefile.in: Semi-revert 2006-08-30 change.
-
-2006-09-10 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/_mingw.h (__MINGW_ATTRIB_DEPRECATED): Define.
- (__MINGW_IMPORT): Ansify.
- * include/stdlib.h (_sleep, _beep, _seterrormode): Add
- __MINGW_ATTRIB_DEPRECATED.
-
-2006-09-10 Keith Marshall <keithmarshall@users.sourceforge.net>
-
- * aclocal.m4 (LIB_AC_PROG_CC, LIB_AC_PROG_CC_GNU, LIB_AC_PROG_CXX):
- Redundant macros; deleted.
-
- * configure.in (LIB_AC_PROG_CC): Replaced by...
- (AC_PROG_CC): ...this.
-
- * configure: Regenerated.
-
-2006-09-06 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/gdtoa/misc.c (pow5mult): Restore original code.
- * mingwex/gdtoa/gdtoa.h. Add comment that files have been modified.
- * mingwex/gdtoa/gdtoaimp.h: Include system headers with <> brackets.
-
-2006-09-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/gdtoa/(arithchk.c, dmisc.c, dtoa.c, g__fmt.c, g_dfmt.c,
- g_ffmt.c, g_xfmt.c, gd_arith.h, gd_qnan.h, gdtoa.c, gdtoa.h,
- gdtoaimp.h, gethex.c, gmisc.c, hd_init.c, hexnan.c, misc.c, qnan.c,
- README, smisc.c, strtodg.c, strtodnrp.c, strtof.c, strtopx.c, sum.c,
- ulp.c): New files.
- * mingwex/(strtof.c, strtold.c, ldtoa.c): Remove files.
- * mingwex/math/(cephes-emath.c, cephes-emath.h): Remove files.
- * mingwex/mb_wc_common.h (get_cp_from_locale); Rename to get_codepage().
- * mingwex/(btowc.c, wctob.c, mbrtowc.c, wcrtomb.c): Adjust call to get_codepage().
- * mingwex/wcstold.c: Avoid using strtold internals.
- * mingwex/wcstof.c: Rewrite.
- * mingwex/Makefile.in (GDTOA_DISTFILES): Add to distribution.
- (GDTOA_OBJS): Add to library.
- (DISTFILES): Remove strtof.c strtold.c ldtoa.c cephes-emath.c cephes-emath.h.
- (STDLIB_OBJS): Remove.
- (STDLIB_STUB_OBJS): Remove strtof.o wcstof,o.
- (Q8_OBJS): Add wcstof.o wcstold.o.
- * include/stdlib.h (strtof): Remove inline definition.
- (wcstof): Likewise.
- * include/wchar.h (wcstof): Remove inline definition.
-
-2006-08-30 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in: Add with_cross_host to allow more granular checks.
- Set installation directories accordingly. Override CC setting only
- if building a Cygwin target.
- * aclocal.m4: Regenerate.
- * configure.in: Move AC_CANONICAL_SYSTEM check up. Add
- GCC_NO_EXECUTABLES. Substitute with_cross_host in depending files.
- Test AC_ALLOCA only if building on a native system.
- * configure: Regenerate.
-
-2006-08-27 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/ctype.h: Fix typo.
-
-2006-08-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ctype.h: Expose iswblank if __cplusplus.
- * include/wctype.h: Expose iswblank if __cplusplus.
-
-2006-08-03 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ctype.h: Remove stray ')';
-
-2006-08-03 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ctype.h (_BLANK): Expand comment.
- (isblank): Add prototype and inline definition.
- (iswblank): Add prototype and inline definition.
- * include/wctype.h (iswblank): Add prototype and inline definition.
- * mingwex/isblank.c: New file.
- * mingwex/iswblank.c: New file.
- * mingwex/Makefile.in: Add isblank, iswblank to libmingwex.a
-
-2006-07-06 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/math.h (__INFF,__INFL): Remove '#'.
-
-2006-07-04 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/Makefile.in: Add -I$(srcdir)/.. to INCLUDES.
-
-2006-07-03 Danny Smith <dannysmith@users.sourceforge.net>
-
- Support SSE float environment in fenv.h functions.
- * cpu_features.c: New file.
- * cpu_features.h: New file.
- * crt1.c: Include "cpu_features.h".
- (__mingw_CRTStartup): Call cpu_features_init().
- * Makefile.in (MING_OBJS): Add cpu_features.c.
- (SRCDIST_FILES): Add cpu_features.c, cpu_features.h.
- * include/fenv,h ( fenv_t;): Append __mxcsr field.
- (__MXCSR_EXCEPT_FLAG_SHIFT): New define.
- (__MXCSR_EXCEPT_MASK_SHIFT): New define.
- (__MXCSR_ROUND_FLAG_SHIFT): New define.
- * mingwex/feclearexcept.c: Include "cpu_features.h".
- Handle SSE environment.
- * mingwex/fegetenv.c: Likewise.
- * mingwex/feholdexcept.c: Likewise.
- * mingwex/fesetenv.c: Likewise.
- * mingwex/fesetexceptflag.c: Likewise.
- * mingwex/fesetround.c: Likewise.
- * mingwex/fetestexcept.c: Likewise.
- * mingwex/feupdateenv.c: Likewise.
- * mingwex/fegetround.c: Add comment.
-
-2006-06-25 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * Include/_mingw.h: Increment version to 3.10.
- * Makefile.in: Ditto.
-
-2006-06-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/math/tgamma.c (SQTPI): Add braces.
-
-2006-06-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/wcrtomb.c (wcsrtombs): Fix src end-pointer thinko.
- * mingwex/math/lgamma.c: (LOGPI) Avoid type punning.
- (LS2PI): Likewise.
- * mingwex/math/sf_erf.c (erff): Initialize z.
- (erfcf): Likewise.
- * mingwex/math/tgamma.c (SQTPI): Avoid type punning.
-
-2006-06-25 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * Include/_mingw.h: Increment version to 3.10.
- * Makefile.in: Ditto.
-
-2006-06-23 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/sys/time.h (struct timezone): Define.
- * include/time.h: Correct comment about timezone.
-
-2006-06-18 Danny Smith <dannysmith@users.sourceforge.net>
-
- * configure.in (AC_CONFIG_AUX_DIR): Remove.
- * configure: Regenerate.
-
-2006-06-18 Chris Sutcliffe <ir0n3h4d@users.sourceforge.net>
-
- * configure: add srcdir as a possible location for install-sh.
-
-2006-06-18 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/dirent.c (_tGetFileAttributes): New helper function.
- (_topendir): Use it.
-
-2006-06-18 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/sys/time.h: Add header guard. Add extern "C" bracketing
- for __cplusplus.
- (gettimeofday): Add prototype.
- * mingwex/gettimeofday.c: New file.
- * mingwex/makefile.in: Add gettimeofday source and object.
-
-2006-06-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/math.h (HUGE_VAL): Define as builtin if __GNUC__ >= 3.3,
- else global library variable.
- (HUGEVALF): Likewise.
- (HUGEVALL): Likewise.
- (INFINITY): Likewise.
- (NAN): LiKewise.
-
-2006-06-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/wcrtomb.c (wcrtomb_cp): Correct typo.
-
-2006-06-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * Makefile.in (SUBDIRS): Change to lowercase for autoconf 2.59.
-
-2006-05-24 Christopher Faylor <cgf@timesys.com>
-
- * configure.in: Update to newer autoconf.
- (thanks to Steve Ellcey)
- * mingwex/configure.in: Ditto.
- * profile/configure.in: Ditto.
- * configure: Regenerate.
- * mingwex/configure: Ditto.
- * profile/configure: Ditto.
- * aclocal.m4: New file.
- * mingwex/aclocal.m4: Ditto.
- * profile/aclocal.m4: Ditto.
-
-2006-05-17 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/wcrtomb.c (wcrtomb_cp): Test (wc > 255) only if C locale.
- Use supplied codepage as arg to WideCharToMultiByte.
-
-2006-02-13 Earnie Boyd <earnie@users.sf.net>
-
- * Makefile.in (libmsvcr80.a): Add import lib.
- (libmsvcr80d.a): Ditto.
-
-2006-01-18 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * Makefile.in: Bump cygwin build number.
-
-2005-10-27 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * Include/_mingw.h: Increment version to 3.9.
- * Makefile.in: Ditto.
-
-2005-10-14 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/limits.h (SSIZE_MAX): Define.
- (LLONG_MAX, LLONG_MIN, ULLONG_MAX): Separate from non-ISO names.
-
-2005-10-13 Wu Yongwei <adah@users.sourceforge.net>
-
- * include/tchar.h: Include <wchar.h> when _UNICODE is defined.
- (_TEOF): New macro definition for _UNICODE and non_UNICODE cases.
-
-2005-10-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stddef.h: Remove.
- * include/stdarg.h: Remove.
-
-2005-10-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/complex/csqrt.c (csqrt): The sign of real part
- of result is positive when real part of arg == 0;
- * mingwex/complex/csqrtf.c (csqrtf): Ditto.
- * mingwex/complex/csqrtl.c (csqrtl): Ditto.
-
-2005-10-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/time.h (_time64): Correct prototype.
-
-2005-10-08 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/fegetenv.c (fegetenv): Restore exception masks.
- * mingwex/feholdexcept.c (feholdexcept): Don't set exceptions
- to non-stop. Use "fnclex" to clear exception flags.
-
-2005-09-24 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/math.h (HUGE_VALF, HUGE_VALL, INFINITY, NAN)
- Avoid raising FP exceptions.
-
-2005-09-19 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdlib.h (strtof): Add prototype. Uglify
- parameter names in inline definition.
- (wcstof): Likewise.
- (_Exit): Uglify parameter names in inline definition.
- (llabs): Add prototype.
- (_set_error_mode): Add prototype and input defines.
-
-2005-08-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/fe*.c: Revert previous changes.
- * include/fenv.h: Revert previous changes.
-
-2005-08-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/feclearexcept.c (feclearexcept): Change declaration.
- Do not return a value.
- * mingwex/fegetexceptflag.c (fegetexceptflag): Likewise.
- * mingwex/feraiseexcept.c (feraiseexcept): Likewise.
- * mingwex/fesetexceptflag.c (fesetexceptflag): Likewise.
- * mingwex/fegetenv.c (fegetenv): Likewise.
- * mingwex/fesetenv.c (fesetenv): Likewise.
- * mingwex/feupdateenv.c (feupdateenv): Likewise.
- * include/fenv.h (feclearexcept, fegetexceptflag, feraiseexcept,
- fesetexceptflag, fegetenv, fesetenv, feupdateenv): Correct
- prototypes.
-
-2005-08-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/stdio/fseeko64.c (fseeko64): Flush stream before
- getting filelength for SEEK_END.
-
-2005-08-13 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * Include/_mingw.h: Increment version to 3.8.
- * Makefile.in: Ditto.
-
-2005-08-10 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wctype.h (towupper, towlower): Change arg and return value
- types to wint_t.
- * include/ctype.h (towupper, towlower): Likewise.
-
-2005-08-10 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mthr_stub.c (__mingwthr_key_dtor): Replace assert(0) with
- a diagnostic, guarded by #ifdef DEBUG.
- (__mingwthr_remove_key_dtor): Likewise.
-
-2005-08-08 Danny Smith <dannysmith@users.sourceforge.net>
-
- * moldname.def.in (sleep, beep, seterrormode): Remove.
-
-2005-06-16 Danny Smith <dannysmith@users.sourceforge.net>
-
- * profile/profile.h (_MCOUNT_CALL): Define as regparm(2)
- (_MCOUNT_DECL): Use it.
- (MCOUNT): Save and restore eax, ecx, edx registers.
- * profile/mcount.c (_mcount): ANSI-fy.
-
-2005-06-16 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/_mingw.h (__MINGW_GNUC_PREREQ): Define. Use to
- guard __MINGW_ATTRIB macro definitions.
- * include/math.h (logb[fl]): Don't define inlines for
- GCC-4.0+ && __FAST_MATH__.
- (rint[fl], lrint[fl], llrint[fl]); Likewise. Clean up
- line-continuation backslashes.
-
-2005-06-06 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/_mingw.h (__MINGW_ATTRIBUTE_NONNULL): Fix typo
- in GNUC version guard.
-
-2005-05-20 Danny Smith <dannysmith@users.sourceforge.net>
-
- * crt1.c (_gnu_exception_handler): Handle illegal instruction
- OS exception as a signal if user has defined a SIGILL handler.
-
-2005-05-10 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/math/nexttoward.c: New file.
- * mingwex/math/nexttowardf.c: New file.
- * mingwex/math/nextafterl.c: Add nexttowardl alias.
- * mingwex/Makefile.in (MATH_DISTFILES): Add nexttoward.c,
- mexttowardf.c,
- (MATH_OBJS): Add nexttoward.o, nexttowardf.o,
- * include/math.h (nexttoward, nextowardf, nexttowardl): Add
- prototypes.
-
-2005-05-09 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/math/nextafterf.c (nextafterf): Correct
- handling of -0.0.
- * mingwex/math/nextafterl.c: New file.
- * mingwex/Makefile.in (MATH_DISTFILES): Add nextafterl.c.
- (MATH_OBJS): Add nextafterl.o.
- * include/math.h (nextafterl): Uncomment prototype.
-
-2005-05-08 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/math/erfl.c: New file.
- * mingwex/Makefile.in (MATH_DISTFILES): Add erfl.c.
- (MATH_OBJS): Add erfl.o.
- * include/math.h (erfl, erfcl): Uncomment prototypes.
-
-2005-05-04 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wchar.h (WCHAR_MAX): Define as 0xffff, so preprocessor
- #if (WCHAR_MAX <= WCHAR_MIN) is false.
- * include/stdint.h (WCHAR_MAX): Likwise.
- (WINT_MAX): Likewise.
-
-2005-05-03 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/math/signbit.c (__signbit): Make return value
- consistent with GCC's __builtin_signbit.
- * mingwex/math/signbitf.c (__signbitf): Likewise.
- * mingwex/math/signbitf.c (__signbitl): Likewise.
- * include/math.h (__signbit, __signbitf, __signbitl): Likewise
- for inlines.
-
-2005-05-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/_mingw.h (__MINGW_ATTRIB_NONNULL): Don't define as
- variadic macro.
- * mingwex/mbrtowc.c (__mbrtowc_cp): Use __MINGW_ATTRIB_NONNULL.
- Remove unused MBTOWC_FLAGS define.
-
-2005-04-23 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/mbrtowc.c: New file.
- * mingwex/wcrtomb.c: New file.
- * mingwex/btowc.c: New file.
- * mingwex/wctob.c: New file.
- * mingwex/mb_wc_common.h: New file.
- * mingwex/Makefile.in (DISTFILES): Add new files.
- (Q8_OBJS): Add new objects.
- * include/wchar.h: Adjust comment about mbrtowc() and related
- funcions. Add __restrict__ to pointer params in prototypes.
- (wmemset. wmemchr, wmemcpy, wmemmove, wcstoll, wcstoull): Remove
- arg names from protototypes.
-
-2005-04-23 Wu Yongwei <adah@sh163.net>
-
- * mingwex/dirent.c: Formatting changes.
- * mingwex/dirent.c (_topendir): Make the end-of-path slash check
- MBCS-safe.
-
-2005-03-31 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/_mingw.h (__MINGW_ATTRIB_NONNULL): Define.
-
-2005-03-24 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdio.h (__mingw_fwrite): Change return value to
- size_t.
- * mingwex/mingw-fseek.c (__mingw_fwrite): Likewise.
-
-2005-03-15 Hans Leidekker <hans@it.vu.nl>
-
- * include/malloc.h (_FREEENTRY, _USEDENTRY): Correct defines.
-
-2005-02-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wctype.h (wctrans): Remove _CRTIMP.
- (towctrans): Likewise.
- (wctype): Likewise,
-
-2005-02-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wctype.h: Add comment on wctrans, towctrans, wctype.
-
-2005-02-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/wctype.c: New file.
- * mingwex/wctrans.c: New file.
- * mingwex/Makefile.in (DISTFILES): Add wctype.c, wctrans.c.
- * mingwex/Makefile.in (Q8_OBJS): Add wctype.o, wctrans.o.
-
-2005-02-11 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/tchar.h (_tstat64, _tstati64): Add Unicode/ANSI mappings.
-
-2005-02-11 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/assert.h: Remove header guard. #undef assert macro.
- (_assert): Use __MINGW_ATTRIB_NORETURN define.
-
-2005-02-11 Gregory W. Chicares <chicares@cox.net>
- Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/math.h (expm1, expm1f, expmll): Add prototypes.
- * mingwex/Makefile.in (MATH_DISTFILES): Add expm1.c,
- expm1f.c, expm1l.c.
- (MATH_OBJS): Add expm1.o, expm1f.o, expm1l.o.
- * mingwex/math/expm1.c: New file.
- * mingwex/math/expm1f.c: New file.
- * mingwex/math/expm1l.c: New file.
-
-2005-02-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/sys/stat.h (struct stat): Guard with _NO_OLDNAMES.
- * include/wchar.h (struct stat): Likwwise.
- Bug reported to Debian by Anand Kumria <wildfire@progsoc.org>
-
- * include/sys/stat.h: Remove empty __STRICT_ANSI__ guard.
-
-2005-02-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/strtold.c (__asctoe64): Set endptr to 'e' if exponent
- string is not valid.
-
-2005-01-26 Oliver Stoeneberg <oliverst@online.de>
-
- * include/malloc.h: Add missing return code defines for
- _heapwalk()
-
-2005-01-17 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/sys/stat.h (struct __stat64): Change st_size type to
- __int64.
- * include/wchar.h (struct __stat64): Change st_size type to __int64.
-
-2005-01-13 Earnie Boyd <earnie@users.sf.net>
-
- * include/sys/stat.h (_S_IFLNK, S_IFLNK, _S_ISLNK, S_ISLNK, _lstat,
- lstat): Remove.
- * include/errno.h (ELOOP): Ditto.
- * include/_mingw.h: Increment version to 3.7.
- * Makefile.in: Ditto.
-
-2005-01-11 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/tchar.h (_tfreopen): Add UNICODE mappings.
-
-2005-01-11 Earnie Boyd <earnie@users.sf.net>
-
- * include/sys/stat.h (_S_IFLNK, S_IFLNK, _S_ISLNK, S_ISLNK, _lstat,
- lstat): Conditionalize defines for __STRICT_ANSI__.
-
-2005-01-10 Earnie Boyd <earnie@users.sf.net>
-
- * include/errno.h (ELOOP): Add definition.
-
-2005-01-10 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/complex/(cabsl.c cacosl.c cacoshl.c cargl.c casinl.c
- casinhl.c catanl.c catanhl.c ccosl.c ccoshl.c cexpl.c cimagl.c
- clogl.c cpowl.c cprojl.c creall.c csinl.c csinhl.c csqrtl.c
- ctanl.c ctanhl.c): New files.
- * mingwex/Makefile.in (COMPLEX_DISTFILES): Adjust.
- (COMPLEX_OBJS): Adjust.
- * include/complex.h (cabsl, cacosl, cacoshl, cargl, casinf.
- casinhl, catanl, catanhl, ccosl, ccoshl, cexpl, cimagl, clogl,
- cpowl, cprojl, creall, csinl, csinhl, csqrtl, ctanl, ctanhl):
- Declare.
-
-2005-01-06 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/_mingw.h (__int16): Define as short.
- Thanks to: Leo Yuriev <leoyuriev at users dot sf dot net>
-
-2005-01-06 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdio.h (P_tmpdir): Add define.
-
-2005-01-03 Earnie Boyd <earnie@users.sf.net>
-
- * Makefile.in (inst_docdir): For Cygwin target set to share/doc/.
-
-2005-01-02 Earnie Boyd <earnie@users.sf.net>
-
- * include/_mingw.h: Increment version to 3.6
- * Makefile.in: Ditto
-
-2004-12-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/complex/(cabsf.c cacosf.c cacoshf.c cargf.c casinf.c
- casinhf.c catanf.c catanhf.c ccosf.c ccoshf.c cexpf.c cimagf.c
- clogf.c cpowf.c cprojf.c crealf.c csinf.c csinhf.c csqrtf.c
- ctanf.c ctanhf.c): New files.
- * mingwex/Makefile.in (COMPLEX_DISTFILES): Adjust.
- (COMPLEX_OBJS): Adjust.
- * include/complex.h (cabsf, cacosf, cacoshf, cargf, casinf.
- casinhf, catanf, catanhf, ccosf, ccoshf, cexpf, cimagf, clogf,
- cpowf, cprojf, crealf, csinf, csinhf, csqrtf, ctanf, ctanhf):
- Declare.
-
-2004-12-20 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wchar.h (wcsdup): Correct prototype.
- * include/string.h (wcsdup): Correct prototype.
-
-2004-10-14 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/sys/stat.h: Make S_ISLNK comment comply with ISO C90.
-
-2004-10-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/math/fastmath.h: New file.
- * mingwex/math/asinh.c: New file.
- * mingwex/math/asinhf.c: New file.
- * mingwex/math/asinhl.c: New file.
- * mingwex/math/acosh.c: New file.
- * mingwex/math/acoshf.c: New file.
- * mingwex/math/acoshl.c: New file.
- * mingwex/math/atanh.c: New file.
- * mingwex/math/atanhf.c: New file.
- * include/math.h (asinh, asinhf, asinhl, acosh, acoshf, acoshl,
- atanh, atanhf, atanhl): Add prototypes.
- * mingwex/Makefile.in (MATH_OBJS): Add objects for above to list.
- (MATH_DISTFILES): Add sources for above and fastmath.h to list.
- Specify dependency on fastmath.h for new objects.
-
-2004-09-08 Earnie Boyd <earnie@users.sf.net>
-
- * include/sys/stat.h (_S_IFLNK): Add definition.
- (S_IFLNK) Ditto.
- (_lstat) Ditto.
- (lstat) Ditto.
- (_S_ISLNK) Recode.
- (S_ISLNK) Ditto.
-
-2004-09-08 Earnie Boyd <earnie@users.sf.net>
-
- * include/sys/stat.h (_S_ISLNK): Add definition.
- (S_ISLNK): Ditto.
-
-2004-09-05 Earnie Boyd <earnie@users.sf.net>
-
- * include/_mingw.h: Increment minor version for 3.5 release.
- * Makefile.in: Ditto.
- * mingwex/Makefile.in: Correct typo in list of DISTFILES.
-
-2004-08-24 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/malloc.h (__mingw_aligned_offset_malloc,
- __mingw_aligned_offset_realloc, __mingw_aligned_malloc,
- __mingw_aligned_realloc, __mingw_aligned_free): Add
- prototypes.
- * mingwex/Makefile.in (DISTFILES): Add mingw-aligned-malloc.c,
- tst-aligned-malloc.c.
- (REPLACE_OBJS): Add mingw-aligned-malloc.o.
-
-2004-08-24 Steven G. Johnson <stevenj@alum.mit.edu>
-
- * mingwex/mingw-aligned-malloc.c: New file.
- * mingwex/tst-aligned-malloc.c: New file.
-
-2004-08-24 Danny Smith <dannysmith@users.sourceforge.net>
-
- * crt1.c: (__mingw_CRTStartup): Change return to void. Add
- noreturn attribute. Align stack to 16 bytes before passing args
- to main.
- (mainCRTStartup): Change return to void.
- (WinMainCRTStartup): Likewise.
-
-2004-08-15 Danny Smith <dannysmith@users.sourceforge.net>
-
- * profile/COPYING: New file.
- * profile/CYGWIN_LICENSE: New file.
- * profile/Makefile.in (DISTFILES): Add COPYING, CYGWIN_LICENSE.
-
-2004-08-15 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/fopen64.c: Move.
- * mingwex/fseeko64.c: Move.
- * mingwex/ftello64.c: Move.
- * mingwex/lseek64.c: Move.
- * mingwex/stdio/fopen64.c: To here.
- * mingwex/stdio/fseeko64.c: To here.
- * mingwex/stdio/ftello64.c: To here.
- * mingwex/stdio/lseek64.c: To here.
-
-2004-08-15 Danny Smith <dannysmith@users.sourceforge.net>
-
- * profile/gmon.c [__MINGW32__]: Include string.h for
- memset prototype.
-
-2004-08-08 Christopher Faylor <cgf@timesys.com>
-
- * mingwex/stdio/vwscanf.c: Add stdio.h needed after 2004-08-07 change.
-
-2004-08-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/complex.h: Remove __attribute__ ((const)) from
- transcendantal and trig functions. Replace __attribute__ ((const))
- with __MINGW_ATTRIB_CONST on other declarations.
-
-2004-08-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wchar.h: Reorganize, avoid including other headers.
-
-2004-08-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/string.h (memchr, memcmp, strchr, strcmp, strcspn)
- (strlen, strncmp, strpbrk, strrchr, strspn, strstr): Add pure
- attribute.
-
-2004-07-30 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/dirent.h (struct _wdirent): Remove obsolete comment.
-
-2004-07-30 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/string.h: Revert 2004-07-26 additions of
- __ATTRIBUTE_PURE.
-
-2004-07-28 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/math/powl.c (powl): Revert change of 2004-02-01.
- (__convert_inf_to_maxnum): New.static inline.
- (reducl): Use it to protect against Inf - Inf.
- (__fast_ldexpl): New function. Use in lieu of ldexpl.
-
-2004-07-27 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/math/expl.c (expl): Move body of code to new static
- function __expl, removing tests for +/-Inf. Extern function
- expl calls __expl after testing for max, min log thresholds.
-
-2004-07-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/stdio/vsscanf.c: Add "edi" to registers-modified field
- * mingwex/stdio/vfscanf.c: Likewise.
- * mingwex/stdio/vswscanf.c: Likewise.
- * mingwex/stdio/vfwscanf.c: Likewise.
-
-2004-07-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/_mingw.h: Use only two underscores to uglify
- __MINGW_ATTRIB_* macros.
- * include/stdlib.h: Adjust __MINGW_ATTRIB_* tokens.
- * include/setjmp.h: Likewise.
-
- * include/sting.h: Add __MINGW_ATTRIB_PURE to locale-independent
- string functions.
- (_strdup, strdup): Add __MINGW_ATTRIB_MALLOC.
-
-2004-07-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/string.h: Group wide string functions together,
- and protect with _WSTRING_DEFINED.
-
-2004-07-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/_mingw.h (__MINGW_ATTR_*): Replace with
- __MINGW_ATTRIB_*.
- * include/stdlib.h (_ATTRIB_NORETURN): Replace with
- __MINGW_ATTRIB_NORETURN, throughout.
- (malloc): Declare with __MINGW_ATTRIB_MALLOC.
- (calloc): Likewise.
- (abs): Declare with __MINGW_ATTRIB_CONST.
- (labs): Likewise.
- (div): Likewise.
- (ldiv): Likewise.
- (lldiv): Likewise.
- (_rotl): Likewise.
- (_rotr): Likewise.
- (_lrotl): Likewise.
- (_lrotr): Likewise.
- * include/setjmp.h (longjmp): Add __MINGW_ATTRIB_NORETURN.
-
-2004-07-21 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/_mingw.h: Undefine __attribute__.
- (__MINGW_ATTR_NORETURN): New define.
- (__MINGW_ATTR_CONST): New define.
- (__MINGW_ATTR_MALLOC): New define.
- (__MINGW_ATTR_PURE): New define.
- (_CRTIMP, __cdecl, __stdcall, __UNUSED_PARAM): Ansi-fy
- expansions.
-
-2004-07-19 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/time.h (__time64_t): Add missing ';'.
-
-2004-07-17 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/time.h (wcsftime): Move out of !__STRICT_ANSI
- block.
- (struct tm): Protect with _TM_DEFINED.
-
-2004-07-17 Christopher Faylor <cgf@timesys.com>
-
- * Makefile.in (CC): Strip inappropriate include file settings from any
- passed-in CC.
-
-2004-07-15 "dgun" <dgun@umpire.com>
-
- * include/complex.h (conj): Correct typo in prototype.
-
-2004-07-15 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/math.h: Add pragma GCC system_header.
-
-2004-07-15 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/complex/carg.c: New file.
- * mingwex/Makefile.in: Really add carg.o to libmingwex.a.
-
-2004-07-15 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (INCLUDES): Temporarily revert previous change.
- * mingwex/Makefile,in (INCLUDES): Ditto.
- * profile/Makefile,in (INCLUDES): Ditto.
- * mingwex/Makefile,in: Drop carg.o dependency.
-
-2004-07-14 Christopher Faylor <cgf@timesys.com>
-
- * mingwex/fwide.c: Include <stdio.h> to resolve FILE usage.
-
-2004-07-14 Danny Smith <dannysmith@users.sourceforge.net>
-
- * Makefile.in (INCLUDES): Designate $(srcdir)/../include as a
- system dir.
- * mingwex/Makefile,in (INCLUDES): Ditto.
- * profile/Makefile,in (INCLUDES): Ditto.
-
- * mingwex/Makefile,in: Add carg.o to libmingwex.a.
-
-2004-07-13 Earnie Boyd <earnie@users.sourcefourge.net>
-
- * Makefile.in: Move use of --nostdinc++ as GCC3.4 warns to use it
- for C modules.
- * mingwex/Makefile.in: Ditto.
- * profile/Makefile.in: Ditto.
- * include/limits.h: Change to new file header preamble.
- * include/_mingw.h: Increment minor version for 3.4 release.
- * Makefile.in: Ditto.
-
-2004-07-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/math/cephes_emath.h (__etens): Remove declaration.
-
-2004-07-11 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/unistd.h (ftruncate): Add inline definition.
- * mingwex/ftruncate.c: New file.
- * mingwex/Makefile.in: Add ftruncate.o to libmingwex.a.
-
-2004-07-10 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/time.h: Do not include sys/types.h.
-
-2004-07-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/Makefile.in (MATH_DISTFILES): Remove pow.c,
- (MATH_OBJS): Remove pow,o.
- * include/math.h (pow): Declare with _CRTIMP.
- Add comment on how to avoid excess precision problems.
-
-2004-06-30 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdio.h (__mingw_fseeko64): Add prototype.
- * mingwex/mingw-fseek.c (__mingw_fseeko64): Add definition.
- (__mingw_fwrite): Handle huge files.
-
-2004-06-30 Kees Zeelenberg <kzlg@users.sourceforge.net>
- Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdio.h (fopen64): Add inline function.
- (fseeko64): Add prototype.
- (ftello64): Add inline function.
- * include/io.h (lseek64): Add inline function.
- * include/sys/types (off64_t): Add typedef.
- (fpos64_t): Add typedef.
- * mingwex/fopen64.c: New file.
- * mingwex/fseeko64.c: New file.
- * mingwex/ftello64.c: New file.
- * mingwex/lseek64.c: New file.
- * mingwex/Makefile.in (STDIO_DISTFILES): Add fopen64.c,
- fseeko.64.c, ftello64.c, lseek64.c.
- (STDIO_OBJS): Add fopen64.o, fseeko.64.o, ftello64.o, lseek64.o.
-
-2004-04-24 Luke Dunstan <infidel@users.sourceforge.net>
-
- * include/limits.h (_I64_MIN, _I64_MAX, _UI64_MAX): Add defines.
-
-2004-04-22 Earnie Boyd <earnie@users.sf.net>
-
- * DISCLAIMER: Add words about "free to use".
- * README: Modify "Win32 runtime" to "Microsoft C Runtime".
- * Makefile.in (SRCDIST_FILES): Add DISCLAIMER and CONTRIBUTORS.
- (inst_docdir): New variable.
- (INSTDOCS): Ditto.
- (FLAGS_TO_PASS): Include inst_docdir.
- (install-dirs): Add inst_docdir.
- (install): Add loop for INSTDOCS.
- * strncasecmp.c: Reword copyright and disclaimer. Move Contributors
- section to CONTRIBUTORS file. Remove RCS tags.
-
-2004-04-22 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/math/lround.c: Rewrite.
- * mingwex/math/lroundf.c: Rewrite.
- * mingwex/math/lroundl.c: Rewrite.
- * mingwex/math/llround.c: Rewrite.
- * mingwex/math/llroundf.c: Rewrite.
- * mingwex/math/llroundl.c: Rewrite.
-
-2004-04-20 Earnie Boyd <earnie@users.sf.net>
-
- * CONTRIBUTORS: New file.
- * DISCLAIMER: Ditto.
- * CRT_noglob.c: Reword copyright and disclaimer. Move Contributors
- section to CONTRIBUTORS file. Remove RCS tags.
- * CRTFmode.c: Ditto.
- * CRTglob.c: Ditto.
- * CRTinit.c: Ditto.
- * crt1.c: Ditto.
- * crtdll.dev: Ditto.
- * dllcrt1.c: Ditto.
- * dllmain.c: Ditto.
- * gccmain.c: Ditto.
- * init.c: Ditto.
- * isascii.c: Ditto.
- * iscsym.c: Ditto.
- * iscsymf.c: Ditto.
- * jamfile: Ditto.
- * main.c: Ditto.
- * msvcrt.def.in: Ditto.
- * strcasecmp.c: Ditto.
- * toascii.c: Ditto.
- * wcscmpi.c: Ditto.
- * include/assert.h: Ditto.
- * include/conio.h: Ditto.
- * include/ctype.h: Ditto.
- * include/direct.h: Ditto.
- * include/dirent.h: Ditto.
- * include/dos.h: Ditto.
- * include/errno.h: Ditto.
- * include/excpt.h: Ditto.
- * include/fcntl.h: Ditto.
- * include/float.h: Ditto.
- * include/io.h: Ditto.
- * include/locale.h: Ditto.
- * include/malloc.h: Ditto.
- * include/math.h: Ditto.
- * include/process.h: Ditto.
- * include/setjmp.h: Ditto.
- * include/share.h: Ditto.
- * include/signal.h: Ditto.
- * include/stdio.h: Ditto.
- * include/stdlib.h: Ditto.
- * include/string.h: Ditto.
- * include/tchar.h: Ditto.
- * include/time.h: Ditto.
- * include/wchar.h: Ditto.
- * include/sys/locking.h: Ditto.
- * include/sys/param.h: Ditto.
- * include/sys/stat.h: Ditto.
- * include/sys/timeb.h: Ditto.
- * include/sys/types.h: Ditto.
- * include/sys/utime.h: Ditto.
- * mingwex/dirent.c: Ditto.
-
-2004-04-19 Earnie Boyd <earnie@users.sf.net>
-
- * include/_mingw.h: Revert to primary release 3 and increment minor
- release to 3.
- * Makefile.in (VERSION): Ditto.
-
-2004-04-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * crt1.c (_mingw32_init_fmode): Set *_imp___fmode_dll to
- _fmode if not __MSVCRT__.
-
-2004-03-30 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/io.h: (_findfirst): Correct prototype.
-
-2004-03-30 Hans Leidekker <hans@it.vu.nl>
-
- * include/io.h: (_findnext, _findclose): Correct prototype.
-
-2004-03-28 Hans Leidekker <hans@it.vu.nl>
-
- * include/math.h (FP_*): Add defines.
-
-2004-03-29 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/math/round.c: Rewrite.
- * mingwex/math/roundf.c: Rewrite.
- * mingwex/math/roundl.c: Rewrite.
-
-2004-03-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/_mingw.h (__MSVCRT_VERSION__): Define default as 0x0600.
- * include/time.h (__time64_t): Add typedef.
- (_mktime64): Add prototype for __MSVCRT_VERSION__ >= 0x0601.
- (_ctime64): Likewise.
- (_wctime64): Likewise.
- (_gmtime64): Likewise.
- (_localtime64): Likewise.
- (wcsftime): Move into _WTIME_DEFINED block.
- Regroup non-ANSI prototypes.
- * include/io.h: Include <stdint.h>.
- (__finddata64_t): Add struct definition.
- (__wfinddata64_t): Likewise.
- (_findfirst64): Add prototype for __MSVCRT_VERSION__ >= 0x0601.
- (_findnext64): Likewise.
- (_wfindfirst64): Likewise.
- (_wfindnext64): Likewise.
- * include/sys/timeb.h (__timeb64): Add struct definition.
- (_ftime64): Add prototype for __MSVCRT_VERSION__ >= 0x0601.
- * include/sys/utime.h (__utimbuf64): Add struct definition.
- (_utime64): Add prototype for __MSVCRT_VERSION__ >= 0x0601.
- (_futime64): Likewise.
- (_wutime64): Likewise.
- * include/sys/stat.h (__stat64): Add struct definition.
- (_fstat64): Add prototype for __MSVCRT_VERSION__ >= 0x0601.
- (_stat64): Likewise.
- (_wstat64): Likwise.
- * include/sys/types.h (__time64_t): Add typedef.
- * include/wchar.h (__wfinddata64_t): Add structure definition.
- (__stat64): Likewise.
- (_wctime64): Add prototype for __MSVCRT_VERSION__ >= 0x0601.
- (_wfindfirst64): Likewise.
- (_wfindnext64): Likewise.
- (_wutime64): Likewise.
- (_wstat64): Likwise.
- * include/malloc.h (_aligned_free): Add prototype for
- __MSVCRT_VERSION__ >= 0x0700.
- (_aligned_malloc): Likewise.
- (_aligned_offset_malloc): Likewise.
- (_aligned_offset_realloc): Likewise.
- (_aligned_realloc): Likewise.
- * include/string.h (_wcserror): Add prototype for
- __MSVCRT_VERSION__ >= 0x0700.
- (__wcserror): Likewise.
- * include/math.h (_set_SSE2_enable): Add prototype for
- __MSVCRT_VERSION__ >= 0x0701.
-
-2004-03-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdio.h (_fsopen): Add prototype.
- * include/tchar.h (_tfsopen): Add defines.
- Thanks to "Gerik" <gerikr at users dot sourceforge dot net>
-
-2004-03-19 Danny Smith <dannysmith@users.sourceforge.net>
-
- * msvcrt.def.in: Add stubs for msvcrt.dll (version 6.10),
- msvcr70.dll, and msvcr71.dll.
- * Makefile.in (msvcr*.def): Define preprocessor __msvcr*__ constant
- using basename of output def file.
-
-2004-03-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/malloc.h: Remove __STRICT_ANSI__ guard.
-
-2004-03-11 Brian Keener <bkeener@thesoftwaresource.com>
-
- * include/process.h: Remove the #endif associated with removal of
- __STRICT_ANSI__ guard from non-ANSI header.
-
-2004-03-10 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/conio.h: Remove __STRICT_ANSI__ guard from non-ANSI header.
- * include/direct.h: Ditto.
- * include/dirent.h: Ditto.
- * include/dos.h: Ditto.
- * include/excpt.h: Ditto.
- * inlude/fcntl,h
- * include/io.h: Ditto.
- * inlude/mem.h: Ditto.
- * include/memory.h: Ditto.
- * include/process.h: Ditto.
- * inlude/search.h: Ditto.
- * include/share.h: Ditto.
- * include/unistd.h: Ditto.
- * include/sys/fcntl.h: Ditto.
- * include/file.h: Ditto.
- * include/sys/locking.h: Ditto.
- * include/sys/param.h: Ditto.
- * include/sys/stat,h
- * include/sys/time.h: Ditto.
- * include/sys/timeb.h: Ditto.
- * include/sys/types.h: Ditto.
- * include/sys/unistd.h: Ditto.
- * include/sys/utime.h: Ditto.
-
-2004-02-21 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/_mingw.h (__UNUSED_PARAM): Define macro.
- * include/wchar.h (fwide): Use it.
- (mbsinit): Ditto.
-
-2004-02-05 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/getopt.c: Define IS_POSIXLY_CORRECT as per
- NetBSD getopt_long.c.
-
-2004-02-05 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/strtold.c (__asctoe64) Reorganise. Fix setting error
- codes and handling of special chars.
-
-2004-02-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdio.h (feof): Add inlined definition.
- (ferror): Ditto.
-
-2004-02-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/math/ldexpl.c (ldexpl): Call __asm__("fscale")
- directly, rather than via scabnl.
-
-2004-02-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/math/powl.c (powl): Return infinity if
- extended precision multiplication of x by log2(y)
- overflows.
-
-2004-01-31 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/math/cephes_emath.h (__enan_64): Fix thinko.
- (__enan_NI16): Fix another one.
- (__enan_NBITS): Tidy.
-
-2004-01-16 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdint.h Fix __STDC_CONSTANT_MACROS for 8 and 16 bit
- types. (Thanks to John Maddock for report.)
-
-2004-01-14 Greg Chicares <chicares@users.sourceforge.net>
-
- * include/tchar.h (_puttchar): Define.
-
-2003-12-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdio.h:(_fileno): Define macro version after both
- fileno and _fileno functions declared.
-
- * include/stdio.h (_rmtmp, rmtmp): Add prototypes.
- * moldnames.def.in (rmtmp) Add stub.
-
-2003-11-27 Dimitry Sibiryakov <aafemt@users.sourceforge.net>
-
- * include/signal.h (SIG_SGE, SIG_ACK): Add defines.
-
-2003-10-27 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/math.h: Guard ISO C99 additions with __cplusplus
- not __GLIBCPP__.
-
-2003-10-21 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/_mingw.h: Define __attribute__((x)) to nothing
- if not __GNUC__.
-
-2003-10-21 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/complex.h: New file.
- * mingwex/complex: New directory.
- * mingwex/complex/cabs.c: New file.
- * mingwex/complex/cacos.c: New file.
- * mingwex/complex/cacosh.c: New file.
- * mingwex/complex/casin.c: New file.
- * mingwex/complex/casinh.c: New file.
- * mingwex/complex/catan.c: New file.
- * mingwex/complex/catanh.c: New file.
- * mingwex/complex/ccos.c: New file.
- * mingwex/complex/ccosh.c: New file.
- * mingwex/complex/cexp.c: New file.
- * mingwex/complex/cimag.c: New file.
- * mingwex/complex/clog.c: New file.
- * mingwex/complex/cpow.c: New file.
- * mingwex/complex/cproj.c: New file.
- * mingwex/complex/creal.c: New file.
- * mingwex/complex/csin.c: New file.
- * mingwex/complex/csinh.c: New file.
- * mingwex/complex/csqrt.c: New file.
- * mingwex/complex/ctan.c: New file.
- * mingwex/complex/ctanh.c: New file.
- * mingwex/Makefile.in (COMPLEX_DISTFILES): New list of
- files.
- (dist): Use it.
- (COMPLEX_OBJS): New list of objects.
- (LIB_OBJS): Include it in the library.
-
-2003-10-21 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/math.h (cabs): Remove non-ISO prototype.
-
-2003-10-21 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/math/cephes_mconf.h (NAN, NANF, NANL):
- Use GCC __builtin's if available.
- (INFINITY, INFINITYF, INFINITYL): Likewise.
-
-2003-10-21 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/math/s_erf.c (erf): Set errno to ERANGE if
- beyond approximation limit.
- * mingwex/math/sf_erf.c (erff): Likewise.
-
-2003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdio.h (getc): Cast result to unsigned char before
- return.
- (putc): Likewise
- (getchar): Likewise.
- (putchar): Likewise.
- Thanks to M.Fujii <boochang@m4.kcn.ne.jp>
-
-2003-10-10 Earnie Boyd <earnie@users.sf.net>
-
- * include/_mingw.h: Increment version to 3.2.
- * Makefile.in: Ditto.
-
-2003-10-10 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/sys/types.h: Revert last change.
-
-2003-10-10 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/sys/types.h (ssize_t): Correct the definition.
-
-2003-10-03 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdio.h (_filbuf): Add prototype.
- (_flsbuf): Add prototype.
- (getc): Add inline version.
- (putc): Likewise.
- (getchar): Likewise.
- (putchar): Likewise.
-
-2003-10-03 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/dirent.c (_treaddir): Reset errno to 0 if end
- of directory.
-
-2003-09-29 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdlib.h: Guard non-ISO functions with
- !__STRICT_ANSI__, throughout.
-
-2003-09-24 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/io.h (_fileno): Remove prototype.
- (fileno): Likewise.
- (FILENAME_MAX): Define, if needed.
- Don't include <stdio.h>.
- * include/stdio.h (FILENAME_MAX): Protect against
- prior definition.
- (_fileno): Define macro implementation.
- (fileno): Likewise.
-
-2003-09-24 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/inttypes.h: Include _mingw.h.
-
-2003-09-24 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/_mingw.h (__CRT_INLINE): Define.
- * include/ctype.h: Replace 'extern inline' with __CRT_INLINE,
- throughout
- * include/inttypes.h: Likewise.
- * include/math.h: Likewise.
- * include/stdio.h: Likewise.
- * include/stdlib.h: Likewise.
- * include/string.h: Likewise.
- * include/wchar.h: Likewise.
- * include/wctype.h: Likewise.
-
-2003-09-22 Roland Schwingel <rolandschwingel@users.sourceforge.net>
-
- * mingwex/dirent.c (_topendir): Allocate enough memory for
- DIR struct in UNICODE case too.
-
-2003-09-15 Earnie Boyd <earnie@users.sf.net>
-
- * include/_mingw.h: Increment version to 3.2.
- * Makefile.in: Ditto.
-
-2003-07-03 Earnie Boyd <earnie@users.sf.net>
-
- * config.guess, config.sub: Update with versions from ftp.gnu.org.
-
-2003-07-03 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/math/trunc.c (trunc): Provide lvalue for memory input constraint.
- * mingwex/math/truncf.c (truncf): Likewise.
- * mingwex/math/truncl.c (truncl): Likewise.
- * mingwex/math/modff.c (modff): Likewise.
- * mingwex/math/modfl.c (modfl): Likewise.
-
-2003-07-03 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/search.h: New file.
- * include/stdlib.h: Add comment about qsort, bsearch in
- search.h.
- * test_headers.c: Include search.h.
- * moldname.def.in (lfind, lsearch): Add.
-
-2003-07-03 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/process.h (_execv, _execvp, _spawnv, _spawnvp, _execve,
- _execvpe, _spawnve, _spawnvpe, execv, execvp, spawnv, spawnvp,
- execve, execvpe, spawnve, spawnvpe): Const-ify all the char params.
-
-2003-07-01 Earnie Boyd <earnie@users.sf.net>
-
- * include/_mingw.h (small, hyper): Change to __small and __hyper to
- avoid user space name conflicts.
-
-2003-07-01 Earnie Boyd <earnie@users.sf.net>
-
- * include/_mingw.h (__int32, __int16, __int8, small, hyper): Define.
- Note: Also added to w32api/include/basetyps.h.
- * mingwex/math/tgamma.c, tgammaf.c, tgammal.c (small):
- Rename to Small (case difference).
-
-2003-06-18 Earnie Boyd <earnie@users.sf.net>
-
- * include/dirent.h (dirent): Make d_name and array instead of a pointer.
- * mingwex/dirent.c: Modifications througout to fill d_name array.
- * Makefile.in (LIBS): Add new MSVCRT libraries libmsvcr70 and
- libmsvcr71, including debug versions.
- (msvcr70.def, msvcr70d.def, msvcr71.def, msvcr71.def): New targets.
-
-2003-06-17 Danny Smith <dannysmith@users.sourceforge.net>
-
- * msvcrt.def.in (__badioinfo, __lc_codepage, __lc_handle,
- __pioinfo, __setlc_active, _unguarded_readlc_active, _dstbias):
- Mark as DATA.
- Thanks to: Aaron W LaFramboise <AWLaFramboise@aol.com>
-
-2003-05-30 Sascha Sommer <saschasommer@freenet.de>
-
- * include/sys/types.h (_ssize_t, ssize_t): Add typedefs.
-
-2003-05-15 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdlib.h (_Exit): Move out of __STRICT_ANSI__ block,
- but still protect inline definition with __STRICT_ANSI__.
-
-2003-05-14 Danny Smith <dannysmith@users.sourceforge.net>
-
- * string_old.c: Remove, splitting into...
- * strcasecmp.c: New file.
- * strncasecmp.c: New file.
- * wscmpi.c : New file.
- * ctype_old.c: Remove, splitting into...
- * isascii.c: New file.
- * iscsym.c: New file.
- * iscsymf.c: New file.
- * toascii.c: New file.
- * Makefile.in (MOLD_OBJS): Adjust.
- (SRCDIST_FILES): Adjust.
-
-2003-05-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/math.h (fabs) : Remove inline definition.
- (fabsf): Likewise.
- (fabsl): Likewise.
-
-2003-05-06 Earnie Boyd <earnie@users.sf.net>
-
- * include/_mingw.h: Change version to 3.0
- * Makefile.in: Ditto.
-
-2003-05-06 Earnie Boyd <earnie@users.sf.net>
-
- * configure.in (W32API_INCLUDE): Need the -I switch in the value.
- * mingwex/configure.in (W32API_INCLUDE): Ditto.
- * profile/configure.in (W32API_INCLUDE): Ditto.
-
-2003-05-06 Earnie Boyd <earnie@users.sf.net>
-
- * configure.in (CFLAGS): Remove -D__USE_CRTIMP=1 due to possibilites
- of multiply defined symbols if the symbols is defined locally. E.G.:
- A local definition of malloc causes this problem.
- * configure: Regenerate.
- * profile/Makefile.in (W32API_INCLUDE): New variable.
- (ALL_CFLAGS): Use W32API_INCLUDE value.
- (ALL_CXXFLAGS): Ditto.
- (gcrt0.o gcrt1.o gcrt2.o): Use ALL_CFLAGS instead of CFLAGS.
- Thanks to Jeff Bonggren <jbon@users.sf.net>.
- * profile/configure.in (W32API_INCLUDE): Set default value.
- * profile/configure: Regenerate.
- * mingwex/Makefile.in (W32API_INCLUDE): New variable.
- (ALL_CFLAGS): Use W32API-INCLUDE value.
- (ALL_CXXFLAGS): Ditto.
- * mingwex/configure.in (W32API_INCLUDE): Set default value.
- * mingwex/configure: Regenerate.
-
-2003-05-05 Earnie Boyd <earnie@users.sf.net>
-
- * Makefile.in (W32API_INCLUDE): New variable.
- (ALL_CFLAGS): Use W32API_INCLUDE value.
- (ALL_CXXFLAGS): Ditto.
- * configure.in (CFLAGS): Add -D__USE_CRTIMP=1 to default values.
- (W32API_INCLUDE): Set default value.
- * configure: Regenerate.
-
-2003-04-11 Earnie Boyd <earnie@users.sf.net>
-
- * configure.in (LIBM_A): Define for cygwin target.
- * configure (LIBM_A): Ditto.
-
-2003-04-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/time.h (strftime): Remove duplicate declaration.
-
-2003-04-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/_mingw.h (_CRTIMP): Make conditional on __USE_CRTIMP.
-
-2003-03-16 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/dirent.c (_topendir): Eliminate signed/unsigned warning.
- * mingwex/strtoimax.c (strtoimax): Likewise.
- * mingwex/wcstoimax.c (wcstoimax): Likewise.
- * mingwex/wtoll.c (wtoll): Remove unnecessary ';'
- * mingwex/fesentenv.c: Include float.h.
- * mingwex/math/powl.c: Eliminate type punning/strict aliasing
- warning.
- * mingwex/math/tanhl.c: Eliminate signed/unsigned warning in
- constants.
- * mingwex/math/tgammal.c: Likewise.
-
-2003-03-16 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/utime.h: New file, forwarding to sys/utime.h.
-
-2003-03-16 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/sys/param.h (MAXPATHLEN): Define.
-
-2003-03-16 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/tchar.h: Ansi-fy a comment.
-
-2003-03-16 Danny Smith <dannysmith@users.sourceforge.net>
-
- * profile/profile.h (mcount): Use __builtin_return_address
- rather than inline __asm statements.
- * profile/Makefile.in: Remove special rule for mcount.o
- Specify dependencies for mcount.o profil.o gmon.o.
-
-2003-03-10 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdlib.h (qsort): Remove const from first parm.
- Thanks to: Tien-Ren Chen <trchen@sourceforge.users.net>
-
-2003-03-03 Christopher Faylor <cgf@redhat.com>
-
- * mingwex/getopt.c: Refresh from NetBSD sources.
-
-2003-03-03 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/getopt.c: New file, copied from cygwin srcs.
- * include/getopt.h: New file, copied from cygwin srcs.
- * include/unistd.h: Include getopt.h.
- * mingwex/Makefile.in (DISTFILES): Add getopt.c.
- (POSIX_OBJS): Add getopt.o.
-
-2003-03-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdio.h (vscanf): Add prototype.
- (vfscanf): Ditto.
- (vsscanf): Ditto.
- (vwscanf): Ditto.
- (vfwscanf): Ditto.
- (vswscanf): Ditto.
- * include/wchar.h (vwscanf): Add prototype.
- (vfwscanf): Ditto.
- (vswscanf): Ditto.
- * mingwex/snprintf.c: Move to mingwex/stdio.
- * mingwex/vsnprintf.c: Ditto.
- * mingwex/snwprintf.c: Ditto.
- * mingwex/vsnwprintf.c: Ditto.
- * mingwex/Makefile.in (VPATH): Add $(srcdir)/stdio
- (STDIO_DISTFILES): Add.
- (DISTFILES): Adjust.
- (STDIO_STUB_OBJS): Rename to STDIO_OBJS and add v*scanf objects.
- (LIB_OBJS): Adjust.
- (dist): Adjust.
-
-2003-03-02 Aaron W LaFramboise <AWLaFramboise@aol.com>
-
- * mingwex/stdio: New directory
- * mingwex/stdio/vfscanf.c: New file.
- * mingwex/stdio/vfwscanf.c: New file.
- * mingwex/stdio/vscanf.c: New file.
- * mingwex/stdio/vsscanf.c: New file.
- * mingwex/stdio/vswscanf.c: New file.
- * mingwex/stdio/vwscanf.c: New file.
-
-2003-02-25 Earnie Boyd <earnie@users.sf.net>
-
- * Makefile.in (libmsvcrt20.a): Remove target and dependencies.
- (libmsvcrt40.a): Ditto.
-
-2003-02-21 Earnie Boyd <earnie@users.sf.net>
-
- Thanks to David Frasier <davidf@sjsoft.com> who inspired portions of
- this patch.
- * Makefile.in (libmsvcrtd.a): Add target library.
- (libmoldnamed.a): Ditto.
- (msvcrt.def, msvcrtd.def, msvcrt20.def, msvcrt40.def): Use msvcrt.def.in
- template to create.
- ($(srcdir)): Remove explicit reference for depencies of object targets.
- * moldname.def, moldname-msvcrt.def, moldname-crtdll.def, msvcrt.def,
- msvcrt20.def, msvcrt40.def: Remove.
- * msvcrt.def.in: New file (Copy of previous msvcrt.def).
-
-2003-02-20 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in: Make sure libmingwex.a from current build tree is used.
-
-2003-02-14 Christopher Faylor <cgf@redhat.com>
-
- * profile/Makefile.in (mcount.o): Use ALL_CFLAGS for compilation to
- ensure -mno-cygwin where appropriate. Filter out -O2.
-
-2003-02-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * profile/Makefile.in (mcount.o): Use -O1 optimization
- switch to compile.
-
-2003-02-10 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/math.h: Remove _CRTIMP from pow() prototype,
- unless __NO_ISOCEXT.
-
-2003-02-10 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/math/cephes_emath.h: Don't redefine INFINITY.
-
-2003-02-10 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/_mingw.h (_CRTIMP): Define for __GNUC__ if
- __declspec(dllimport) supported.
- (__cdecl): Define if not already defined.
- (__stdcall): Likewise.
- * include/dirent.h: Qualify fuctions with __cdecl.
- * include/fenv.h: Likewise.
- * include/inttypes.h: Likewise.
- * include/assert.h: Qualify fuctions with __cdecl. Qualify
- CRT dll imports with _CRTIMP.
- * include/conio.h: Likewise.
- * include/ctype.h: Likewise.
- * include/direct.h: Likewise.
- * include/dos.h: Likewise.
- * include/errno.h: Likewise.
- * include/float.h: Likewise.
- * include/io.h: Likewise.
- * include/locale.h: Likewise.
- * include/malloc.h: Likewise.
- * include/math.h: Likewise.
- * include/mbctype.h: Likewise.
- * include/mbstring.h: Likewise.
- * include/process.h: Likewise.
- * include/setjmp.h: Likewise.
- * include/signal.h: Likewise.
- * include/stdio.h: Likewise.
- * include/stdlib.h: Likewise.
- * include/string.h: Likewise.
- * include/time.h: Likewise.
- * include/wchar.h: Likewise.
- * include/wctype.h: Likewise.
- * include/sys/stat.h: Likewise.
- * include/sys/timeb.h: Likewise.
- * include/sys/utime.h: Likewise.
-
- * include/ctype.h: Guard ctype inlines with __NO_INLINE__.
- * include/wctype.h: Guard wctype inlines with __NO_INLINE__.
-
- * include/stdio.h (__VALIST): Guard against prior definition.
-
-2003-02-08 Earnie Boyd <earnie@users.sf.net>
-
- * include/_mingw.h: Change version to 3.0
- * Makefile.in: Ditto.
-
-2003-02-08 Earnie Boyd <earnie@users.sf.net>
-
- * include/stdlib.h: Make words after #endif a comment.
-
-2003-02-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/locale.h: Include stddef.h for definition of NULL.
-
-2003-01-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/math.h (tgamma): Correct typo in comment.
-
-2003-01-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/mingw-fseek.c (INLINE): Remove define.
- (__mingw_is_win9x): Remove static inline function.
- (_mingw_fwrite): Use _osver instead of __mingw_is_win9x.
-
-2003-01-11 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/math/llround.c: Correct function name and
- change return value to long long.
-
-2003-01-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ctype.h (__isascii): Don't cast arg to unsigned.
- (iswascii): Likewise. Correct mask.
- * include/wctype.h (iswascii): Don't cast arg to unsigned.
- Correct mask
-
-2003-01-03 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdlib.h (_osver, _winver, _winmajor,
- _winminor): Declare as direct imports from dll if
- __DECLSPEC_SUPPORTED.
-
-2003-01-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * pseudo-reloc.c (do_pseudo_reloc): Make static.
- * pseudo-reloc-list.c: New file.
- * crt1.c (_pei386_runtime_relocator): Declare.
- (__mingw_CRTStartup): Call it.
- * dllcrt1.c (_pei386_runtime_relocator): Declare.
- (DllMainCRTStartup): Call it.
- * Makefile.in: Add pseudo-reloc.o pseude-reloc-list.o to
- libmingw32.a.
-
-2003-01-01 Egor Duda <deo@logos-m.ru>
-
- * pseudo-reloc.c: New file.
-
-2002-12-20 Earnie Boyd <earnie@users.sf.net>
-
- * include/_mingw.h: Increment version to 2.4.
- Makefile.in: Ditto.
-
-2002-12-12 Earnie Boyd <earnie@users.sf.net>
-
- * include/malloc.h (_alloca): Add definition.
- (alloca): Ditto.
-
-2002-12-08 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/math/s_erf.c: New file.
- * mingwex/math/sf_erf.c: New file.
- * mingwex/Makefile.in (MATH_DISTFILES): Add new files.
- (MATH_OBJS): Add new objects.
- * include/math.h (erf[f]): Add prototypes.
- (erfc[f]): Add prototypes.
-
-2002-12-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/math.h: Add traditional/XOPEN math constants.
-
-2002-11-27 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/math/lgamma.c: New file.
- * mingwex/math/lgammaf.c: New file.
- * mingwex/math/lgammal.c: New file.
- * mingwex/math/tgamma.c: New file.
- * mingwex/math/tgammaf.c: New file.
- * mingwex/math/tgammal.c: New file.
- * mingwex/math/cephes_mconf (polevlf): Add float version.
- (p1evlf): Likewise.
- Define _CEPHES_USE_ERRNO.
- * mingwex/Makefile.in (MATH_DISTFILES): Add new files.
- (MATH_OBJS): Add new objects.
- * include/math.h (lgamma[fl]): Add prototypes.
- (tgamma[fl]): Add prototypes.
-
-2002-11-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/strtold.c: New file.
- * mingwex/wcstold.c: New file.
- * mingwex/ldtoa.c: New file.
- * mingwex/math/cephes_emath.h: New file.
- * mingwex/math/cephes_emath.c: New file.
- * mingwex/Makefile.in (DISTFILES): Add new files.
- (MATH_DISTFILES): Ditto.
- (STDLIB_OBJS): New. Define as strtold.c wcstold.c.
- (MATH_OBJS): Add cephes_emath.o.
- (LIB_OBJS): Add $(STDLIB_OBJS).
- * include/stdlib.h (strtold, wcstold): Add prototypes.
- * include/wchar.h (wcstold): Add prototype.
-
-2002-11-09 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/math.h (sqrt): Remove inline definition.
- (sqrtf): Replace inline definition with prototype.
- (sqrtl): Likewise.
- * mingwex/math/sqrtf.c (sqrtf): Set domain error if
- argument less than zero.
- * mingwex/math/sqrtf.c (sqrtl): Likewise.
-
-2002-10-30 Guido Serassio <serassio@libero.it>
-
- * include/stdio.h (_getmaxstdio): Add prototype.
- (_setmaxstdio): Likewise.
-
-2002-10-19 Kang Li <rubylith@users.sourceforge.net>
-
- * include/fcntl.h (O_SEQUENTIAL): Correct typo.
-
-2002-10-19 Danny Smith <dannysmith@users.sourceforge.net>
-
- * crt1.c: Define new macro __IN_MINGW_RUNTIME before including
- stdlib.h.
- Define WIN32_MEAN_AND_LEAN before including windows.h
- * include/stdlib.h (_fmode): Protect declaration as dllimported
- variable with __IN_MINGW_RUNTIME.
-
-2002-10-19 Igor Pechtchanski <pechtcha@cs.nyu.edu>
-
- * crt1.c: Include stdlib.h.
-
-2002-10-19 Danny Smith <dannysmith@users.sourceforge.net>
-
- * Makefile.in (CRT0S): Add txtmode.o binmode.o.
- (MINGW_OBJS): Add txtmode.o.
- (SRCDIST_FILES): Add txtmode.c binmode.c.
- crt1.c: Don't include fcntrl.h, stdlib.h.
- (_fmode): Declare, without dllimport attribute.
- (__p__fmode): Declare access function for dll's _fmode.
- (_mingw32_init_fmode): Sync dll _fmode with staticly linked
- _fmode for app.
- * txtmode.c: New file.
- * binmode.c: New file.
- * samples/fmode/test2.c: New file.
- * samples/fmode/jamfile: Add test2.exe target.
-
-2002-10-11 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdint.h (INT64_C, UINT64_C ): Append suffix to let
- macros work with C89.
- (INTMAX_C, UINTMAX_C): Likewise.
-
-2002-10-11 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/string.h (strcasecmp): Make extern __inline__.
- (strncasecmp): Likewise.
- (wcscmpi): Likewise.
-
-2002-10-08 Heiko Gerdau <hg@technosis.de>
-
- * include/tchar.h (_tchdir. _tgetcwd, _tgetdcwd.
- _tmkdir, _trmdir, _tstat): Add ASCII and UNICODE
- mappings.
-
-2002-10-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/math/powil.c: Rename powil to __powil.
- * mingwex/math/powl.c: Adjust declaration and call
- to __powil. Remove comment on powil.
- * mingwex/math/powi.c: New file.
- * mingwex/math/powif.c: New file.
- * mingwex/math/pow.c: New file.
- * mingwex/math/cephes_mconf.h. Add double and float
- versions of constants.
- (polevl): Add double precision function.
- (p1evl): Likewise.
- * mingwex/Makefile.in (MATH_DISTFILES): Add pow.c,
- powi.c, powif.c.
- (MATH_OBJS): Add pow.o, powi.o, powif.o.
-
-2002-10-03 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/cytpe.h (_imp____mbcur_max): Add missing ';'.
- (_imp____mbcur_max_dll): Likewise.
-
-2002-10-03 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/fcntl.h (_fmode): Remove declarations and
- compatibility defines.
- (_setmode, setmode): Remove prototypes.
- * include/stdlib (_fmode): Add declarations and
- compatibility defines. Change type to int.
- * include/io.h (_setmode, setmode): Add prototypes.
- * samples/fmode/all.c: Adjust includes.
- * samples/fmode/test.c: Likewise.
- * crt1.c (_CRT_fmode): Declare as int.
- * CRTfmode.c (_CRT_fmode): Likewise.
-
- * include/stdlib: Remove comment about MB_CUR_MAX.
-
-2002-10-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdlib.h (_imp____mbcur_max): Add missing ';'.
- (_imp____mbcur_max_dll): Likewise.
-
-2002-09-18 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/math/files.txt: Remove inadvertantly added file.
-
-2002-09-18 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/string.h (_strerror): Move into #ifndef
- __STRICT_ANSI__ block.
-
-2002-09-17 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/time.h (__need_NULL): Define before including
- stddef.h. Thanks to: Rüdiger Dehmel <de@lmnet.de>.
-
-2002-09-16 Ranjit Matthew <rmathew@hotmail.com>
-
- * include/stdio.h: Correct comment about directory separator.
-
-2002-09-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/sys/time.h (timeval): Add struct definition and
- associated macros (copied from w32api/include/winsock.h).
-
-2002-09-05 Earnie Boyd <earnie@users.sf.net>
-
- * include/_mingw.h: Increment version to 2.3.
- Makefile.in: Ditto.
-
-2002-09-05 Earnie Boyd <earnie@users.sf.net>
-
- * mingwex/fegetenv.c: Change to \n line endings.
- * mingwex/vsnprintf.c: Ditto.
- * mingwex/vsnwprintf.c: Ditto.
-
-2002-09-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * mingwex/math/hypotl.c: Replace with version based on cephes
- library.
-
-2002-08-28 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/sys/param.h: Add ENDIAN defines.
- * test_headers.c: Include sys/param.h.
-
-2002-08-28 Danny Smith <dannysmith@users.sourceforge.net>
-
- * test_headers.c: Don't include varargs.h.
- * Makefile.in (test_headers): Don't use -std=xx
- with -xc++.
-
-2002-08-21 Earnie Boyd <earnie@users.sf.net>
-
- * include/sys/param.h: New File.
-
-2002-08-21 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/math.h (asm): Change to __asm__ throughout.
- Expose ISO C99 functions if __GLIPCPP__.
- (hypotf): Use hypot, not _hypot in stub.
-
-2002-08-20 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/tchar.h: Ansi-fy another comment.
-
-2002-08-20 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/tchar.h: Ansi-fy comment.
-
-2002-08-20 Danny Smith <dannysmith@users.sourceforge.net>
-
- * test_headers.c : New file.
- * Makefile.in (test_headers): New target, using it,
- (SRCDIST_FILES): Distribute it.
-
-2002-08-20 Earnie Boyd <earnie@users.sf.net>
-
- * include/_mingw.h: Increment version to 2.2.
- Makefile.in: Ditto.
-
-2002-08-14 Earnie Boyd <earnie@users.sf.net>
-
- * include/unistd.h: Add include of process.h.
-
-2002-08-03 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdio.h (_fcloseall): Add prototype.
-
-2002-07-29 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/tchar.h (_tfdopen): Correct typo.
-
-2002-07-29 Danny Smith <dannysmith@users.sourceforge.net>
-
- * moldname.def.in (chgsign,scalb,finite,fpclass,logb,
- nextafter): Add non-underscored stubs.
- * moldname-msvcrt.def: Regenerate.
- * moldname-crtdll.def: Regenerate.
- * mingwex/math: New directory.
- * mingwex/rint.c: Move to mingwex/math.
- * mingwex/rintf.c: Ditto.
- * mingwex/rintl.c: Ditto.
- * mingwex/round.c: Ditto.
- * mingwex/roundf.c: Ditto.
- * mingwex/roundl.c: Ditto.
- * mingwex/rint.c: Ditto.
- * mingwex/rintf.c: Ditto.
- * mingwex/rintl.c: Ditto.
- * mingwex/trunc.c: Ditto.
- * mingwex/truncf.c: Ditto.
- * mingwex/truncl.c: Ditto.
- * mingwex/signbit.c: Ditto.
- * mingwex/signbitf.c: Ditto.
- * mingwex/signbitl.c: Ditto.
- * mingwex/copysignl.S: Ditto.
- * mingwex/fdim.c: Ditto.
- * mingwex/fdimf.c: Ditto.
- * mingwex/fdiml.c: Ditto.
- * mingwex/fmin.c: Ditto.
- * mingwex/fminf.c: Ditto.
- * mingwex/fminl.c: Ditto.
- * mingwex/fmax.c: Ditto.
- * mingwex/fmaxf.c: Ditto.
- * mingwex/fmaxl.c: Ditto.
- * mingwex/fma.c: Ditto.
- * mingwex/fmaf.c: Ditto.
- * mingwex/fmal.c: Ditto.
- * mingwex/fpclassify.c: Ditto.
- * mingwex/fpclassifyl.c: Ditto.
- * mingwex/fpclassifyl.c: Ditto.
- * mingwex/isnan.c: Ditto.
- * mingwex/isnanf.c: Ditto.
- * mingwex/isnanl.c: Ditto.
- * mingwex/fucom.c: Ditto.
- * mingwex/fp_consts.c: Ditto. Split out float and long double
- definitions.
- * mingwex/math_stubs.c: Remove.
- * mingwex/log2.c: Remove. Replaced by math/log2.S
- * mingwex/log2f.c: Remove. Replaced by math/log2f.S
- * mingwex/log2l.c: Remove. Replaced by math/log2l.S
- * mingwex/math/acosf.c : New file.
- * mingwex/math/acosl.c: New file.
- * mingwex/math/asinf.c: New file.
- * mingwex/math/asinl.c: New file.
- * mingwex/math/atan2f.c: New file.
- * mingwex/math/atan2l.c: New file.
- * mingwex/math/atanf.c: New file.
- * mingwex/math/atanl.c: New file.
- * mingwex/math/cbrt.c: New file.
- * mingwex/math/cbrtf.c: New file.
- * mingwex/math/cbrtl.c: New file.
- * mingwex/math/ceilf.S: New file.
- * mingwex/math/ceill.S: New file.
- * mingwex/math/cephes_ld.h: New file.
- * mingwex/math/copysign.S: New file.
- * mingwex/math/copysignf.S: New file.
- * mingwex/math/cosf.S: New file.
- * mingwex/math/coshf.c: New file.
- * mingwex/math/coshl.c: New file.
- * mingwex/math/cosl.S: New file.
- * mingwex/math/exp2.S: New file.
- * mingwex/math/exp2f.S: New file.
- * mingwex/math/exp2l.S: New file.
- * mingwex/math/expf.c: New file.
- * mingwex/math/expl.c: New file.
- * mingwex/math/fabs.c: New file.
- * mingwex/math/fabsf.c: New file.
- * mingwex/math/fabsl.c: New file.
- * mingwex/math/floorf.S: New file.
- * mingwex/math/floorl.S: New file.
- * mingwex/math/fmodf.c: New file.
- * mingwex/math/fmodl.c: New file.
- * mingwex/math/fp_consts.h: Ditto.
- * mingwex/math/fp_constsf.c: Ditto.
- * mingwex/math/fp_constsl.c: Ditto.
- * mingwex/math/frexpf.c: New file.
- * mingwex/math/frexpl.S: New file.
- * mingwex/math/hypotf.c: New file.
- * mingwex/math/hypotl.c: New file.
- * mingwex/math/ilogb.S: New file.
- * mingwex/math/ilogbf.S: New file.
- * mingwex/math/ilogbl.S: New file.
- * mingwex/math/ldexpf.c: New file.
- * mingwex/math/ldexpl.c: New file.
- * mingwex/math/llrint.c: New file.
- * mingwex/math/llrintf.c: New file.
- * mingwex/math/llrintl.c: New file.
- * mingwex/math/llround.c: New file.
- * mingwex/math/llroundf.c: New file.
- * mingwex/math/llroundl.c: New file.
- * mingwex/math/log10f.S: New file.
- * mingwex/math/log10l.S: New file.
- * mingwex/math/log1p.S: New file.
- * mingwex/math/log1pf.S: New file.
- * mingwex/math/log1pl.S: New file.
- * mingwex/math/log2.S: New file.
- * mingwex/math/log2f.S: New file.
- * mingwex/math/log2l.S: New file.
- * mingwex/math/logb.c: New file.
- * mingwex/math/logbf.c: New file.
- * mingwex/math/logbl.c: New file.
- * mingwex/math/logf.S: New file.
- * mingwex/math/logl.S: New file.
- * mingwex/math/lrint.c: New file.
- * mingwex/math/lrintf.c: New file.
- * mingwex/math/lrintl.c: New file.
- * mingwex/math/lround.c: New file.
- * mingwex/math/lroundf.c: New file.
- * mingwex/math/lroundl.c: New file.
- * mingwex/math/modff.c: New file.
- * mingwex/math/modfl.c: New file.
- * mingwex/math/nearbyint.S: New file.
- * mingwex/math/nearbyintf.S: New file.
- * mingwex/math/nearbyintl.S: New file.
- * mingwex/math/nextafterf.c: New file.
- * mingwex/math/powf.c: New file.
- * mingwex/math/powl.c: New file.
- * mingwex/math/powil.c: New file.
- * mingwex/math/remainder.S: New file.
- * mingwex/math/remainderf.S: New file.
- * mingwex/math/remainderl.S: New file.
- * mingwex/math/remquo.S: New file.
- * mingwex/math/remquof.S: New file.
- * mingwex/math/remquol.S: New file.
- * mingwex/math/scalbn.S: New file.
- * mingwex/math/scalbnf.S: New file.
- * mingwex/math/scalbnl.S: New file.
- * mingwex/math/sinf.S: New file.
- * mingwex/math/sinhf.c: New file.
- * mingwex/math/sinhl.c: New file.
- * mingwex/math/sinl.S: New file.
- * mingwex/math/sqrt.c: New file.
- * mingwex/math/sqrtf.c: New file.
- * mingwex/math/sqrtl.c: New file.
- * mingwex/math/tanf.S: New file.
- * mingwex/math/tanhf.c: New file.
- * mingwex/math/tanhl.c: New file.
- * mingwex/math/tanl.S: New file.
- * mingwex/Makefile.in: Adjust VPATH for source files in
- mingwex/math.
- Adjust MATH_OBJS.
- Add MATH_DISTFILES and use it to build source distro.
- * include/ math.h: Add protypes for new functions and
- reorganise to reflect ANSI,C99 status.
-
-2002-06-19 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/tchar.h (_getts): Define as _getws for _UNICODE.
- (_putts): Define as _putws for _UNICODE.
- Thanks to: Tomasz Pona <cochisek@poczta.onet.pl> for report.
-
-2002-06-18 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/float.h: #include_next<float.h> before header guard.
-
-2002-06-18 Casper S. Hornstrup <chorns@users.sourceforge.net>
-
- * include/_mingw.h (__MINGW_IMPORT): Check for prior definition before
- defining.
- * include/excpt.h (): Include windef.h not windows.h.
- * include/fcntl.h (_O_SHORT_LIVED): Add define.
- (_chmod): Add prototype.
- (_creat): Correct prototype.
- (SH_DENY*): Rename defines to _SH_DENY*.
- (SH_DENY*): Add Non-ANSI names for _SH_DENY*.
- include/stdio.h (_IOMYBUF, _IOEOF, _IOERR, _IOSTRG,
- _IOAPPEND): Add defines.
- (_wfindfirst): Correct prototype.
- (_wfdopen): Add prototype.
- * include/stdlib.h (_rotl, _rotr, _lrotl, _lrotr): Add
- prototypes.
- * include/string.h (_mbschr, _mbstok, _mbsncat): Remove
- prototypes.
- (_wcsdup): Correct prototype.
- * include/mbstring.h: Remove comments about _mbschr, _mbstok,
- _mbsncat being in string.h.
- * include/wchar.h (_wfindfirst): Correct prototype.
- * include/tchar.h (_tfdopen): Add _UNICODE mappings.
-
-2002-06-15 Earnie Boyd <earnie@users.sf.net>
-
- * include/_mingw.h: Increment to version 2.1.
- * Makefile.in: Ditto.
-
-2002-06-15 Earnie Boyd <earnie@users.sf.net>
-
- * Makefile.in (conf_prefix): New variable.
- (dist_prefix): Ditto. Conditionally set to $(conf_prefix).
- (bindist): Use dist_prefix.
-
-2002-06-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/_mingw.h: Increment version to 2.0.
- * Makefile.in: Ditto.
-
- Merge in mingwex branch.
-
- 2002-06-11 Danny Smith <dannysmith@users.sourceforge.net>
- * include/math.h (fdim, fdimf, fdiml): Add prototypes.
- * mingwex/fdim.c: New file.
- * mingwex/fdimf.c: New file.
- * mingwex/fdiml.c: New file.
- * mingwex/Makefile.in (DISTFILES): Add fdim.c, fdimf.c,
- fdiml.c.
- (MATHOBJS):Add fdim.o, fdimf.o. fdiml.o.
-
- 2002-05-23 Danny Smith <dannysmith@users.sourceforge.net>
- * mingwex/Makefile.in (DISTFILES): Add truncf.c, truncl.c.
-
- 2002-05-22 Danny Smith <dannysmith@users.sourceforge.net>
- * mingwex/isnanl.c: New file.
-
- 2002-05-21 Danny Smith <dannysmith@users.sourceforge.net>
- * include/stdint.h: Include stddef.h to get
- wchar_t and wint_t.
- (WINT_MAX): Define to ((wint_t)-1).
-
- 2002-05-21 Danny Smith <dannysmith@users.sourceforge.net>
- * include/wctype.h: Replace 'inline' with '__inline__'.
- * include/inttypes.h: Likewise.
-
- 2002-05-16 Danny Smith <dannysmith@users.sourceforge.net>
- * include/_mingw.h (__MINGW_IMPORT): Put extern at start
- to avoid warnings. Thanks to: Oscar Fuentes <ofv@wanadoo.es>.
-
- 2002-05-16 Danny Smith <dannysmith@users.sourceforge.net>
- * mingwex/snprintf.c: Split out vsnprintf to....
- * mingwex/vsnprintf.c: New file.
- * mingwex/snwprintf.c: Split out vsnwprintf to...
- * mingwex/vsnwprintf.c: New file.
- * mingwex/Makefile.in: Adjust DISTFILES and STDIO_STUB_OBJS.
-
- 2002-05-15 Pascal Obry <obry@gnat.com>
- * include/dirent.h (DIR): Change dd_stat type to int.
- (_WDIR): Likewise.
-
- 2002-05-07 Danny Smith <dannysmith@users.sourceforge.net>
- * include/stdio.h (vsnprintf): Change inline to __inline__;
- (vsnwprintf): Likewise.
- * include/wchar.h (vsnwprintf): Likewise.
- (wcstof): Likewise.
- (fwide): Likewise.
- (mbsinit): Likewise.
-
- 2002-04-29 Danny Smith <dannysmith@users.sourceforge.net>
- Change FP default precison from 53 to 64-bit mantissa.
- * Makefile.in (CRT0S): Add CRT_fp8.o.
- (MINGW_OBJS): Replace CRT_fp8.o with CRT_fp10.o.
- * include/float.h: Replace standard float.h defines with
- #include_next<float.h> to use GCC's defines. Adjust comments
- to reflect change.
-
- 2002-04-26 Danny Smith <dannysmith@users.sourceforge.net>
- * include/dos.h: Change prefix "__imp_" to "_imp__" for
- __GNUC__ without __DECLSPEC_SUPPORTED.
- * include/fnctl.h: Likewise.
- * include/math.h: Likewise.
- * include/stdio.h: Likewise.
- * include/stdlib.h: Likewise.
- * include/time.h: Likewise.
- * include/wctype.h: Likewise.
- * include/ctype.h: Likewise.
-
- 2002-04-26 Danny Smith <dannysmith@users.sourceforge.net>
- Add atexit support for dlls.
- * crt1.c (atexit): Force thunk to _imp__atexit.
- (_onexit): Force thunk to _imp___onexit.
- * dllcrt1.c (DllMainCRTStartup): Initialise private atexit
- table on DLL_PROCESS_ATTACH, clean it up on DLL_PROCESS_DETACH.
- (__dll_exit): New function to run atexit-registered functions
- and flush output buffers on DLL_PROCESS_DETACH or failed
- DLL_PROCESS_ATTACH.
- (atexit): Force use of private atexit table via _dllonexit,
- (_onexit): New function. Force use of private atexit table via
- _dllonexit,
- * msvcrt.def (atexit, _onexit): Add DATA keyword so that only
- _imp_<_symbol> is visible in import lib.
- * msvcrt20.def: Likewise.
- * msvcrt40.def: Likewise.
- * crtdll.def: Likewise.
-
- 2002-04-26 Danny Smith <dannysmith@users.sourceforge.net>
- * include/fenv.h: Change header guard macro to _FENV_H_.
- (fenv_t, fexcept_t): Move into block protected by
- #ifndef RC_INVOKED.
- Cleanup some whitespace.
- * include/inttypes.h: Change header guard macro to
- _INTTYPES_H_.
-
- 2002-04-26 Danny Smith <dannysmith@users.sourceforge.net>
- * include/math.h (copysignl): Declare.
- * mingwex/Makefile.in (DISTFILES): Add copysignl.S.
- (MATHOBJS):Add copysignl.o.
-
- 2002-04-24 Danny Smith <dannysmith@users.sourceforge.net>
- * include/math.h (__signbitl, __isnanl): Declare.
-
- 2002-04-24 Danny Smith <dannysmith@users.sourceforge.net>
- * include/math.h (nanl, __fpcassifyl, fminl, fmaxl, rintl,
- roundl, truncl, fmal, log2l): Declare.
- Protect C99 declarations with _STDC_VERSION__ >= 199901L)
- || !defined __STRICT_ANSI__.
- * mingwex/fmax.c (fmax): Call __isnan, not _isnan.
- * mingwex/fmin.c (fmin): Likewise.
- * mingwex/fmaxf.c (fmaxf): Call __isnanf, not _isnan.
- * mingwex/fminf.c (fminf): Likewise.
- * mingwex/fmaxl.c: New file.
- * mingwex/fminl.c: New file.
- * mingwex/fpclassify.c (__fpclassifyf): Split out to ...
- * mingwex/fpclassifyf.c: New file.
- * mingwex/fpclassifyl.c: New file.
- * mingwex/rint.c (rintf): Split out to...
- * mingwex/rintf.c: New file.
- * mingwex/rintl.c: New file.
- * mingwex/round.c (roundf): Split out to...
- * mingwex/roundf.c: New file.
- * mingwex/roundl.c: New file.
- * mingwex/trunc.c (truncf): Split out to...
- * mingwex/truncf.c: New file.
- * mingwex/truncl.c: New file.
- * mingwex/signbit.c (signbitf): Split out to...
- * mingwex/signbitf.c: New file.
- * mingwex/signbitl.c: New file.
- * mingwex/fmal.c: New file.
- * mingwex/copysignl.S: New file.
- * mingwex/log2l.c: New file.
- * mingwex/fp_consts.c: Add nanl definition.
- Comment out unused constants.
- * mingwex/Makefile.in (DISTFILES): Add fmaxl.c, fminl.c,
- fpclassifyf.c, fpclassifyl.c, rintf.c, rintl.c, roundf.c,
- roundl.c, truncf.c truncl.c, signbitf.c signbitl.c,
- fmal.c, log2l.c
- (MATHOBJS): Add fmaxl.o, fminl.o, fpclassifyf.o,
- fpclassifyl.o, rintf.o, rintl.o, roundf.o, roundl.o,
- truncf.o truncl.o, signbitf.o signbitl.o, fmal.o,
- log2l.o.
- * mingwex/snwprintf.c (snwprintf, vsnwprintf): Correct typo.
-
- 2002-04-23 Danny Smith <dannysmith@users.sourceforge.net>
- Make wide char versions of opendir and friends.
- * include/dirent.h (_wdirent, _WDIR): Define wide versions of
- struct dirent, DIR.
- (_wopendir,_wreaddir,_wclosedir,_wrewinddir,_wtelldir,
- _wseekdir): Add prototypes for wide versions of corresponding
- standard functions.
- * include/tchar.h; Add _UNICODE mappings for dirent.h
- structures and functions.
- * mingwex/dirent.c: Make _UNICODE neutral.
- * mingwex/wdirent.c: New file to define _UNICODE before
- including dirent.c.
- * mingwex/Makefile.in (DISTFILES): Add wdirent.c.
- (POSIX_OBJS): Add wdirent.o.
- (wdirent.o): Specify dependency on dirent.c as well as
- wdirent.c.
- * samples/dirent/wtest.c: New file, wide version of test.c.
-
- 2002-04-17 Danny Smith <dannysmith@users.sourceforge.net>
- * Makefile.in (INCLUDES): Add "-iwithprefixbefore include" to
- ensure gcc include dir is searched despite -nostdinc.
- * profile/Makefile.in (INCLUDES): Likewise.
- * mingwex/Makefile.in (INCLUDES): Likewise.
- * include/stdarg.h: Replace with stub that just guards the
- real gcc system header with #ifndef RC_INVOKED
- * include/varargs.h: Likewise.
- * include/stddef.h: Likewise.
- * include/stdio.h: Include stdarg.h after defining
- __need___va_list.
- (__VALIST): Define as __gnuc_va_list if __GNUC__, else char*.
- Replace va_list with __VALIST throughout.
-
- 2002-04-17 Danny Smith <dannysmith@users.sourceforge.net>
- * crt1.c: Revert changes of 2002-04-16. Use _fpreset again.
- * msvcrt.def (_fpreset): Mark as DATA so that only
- _imp___fpreset is exported.
- * msvcrt20.def (_fpreset): Likewise.
- * msvcrt40.def (_fpreset): Likewise.
- * crtdll.def (_fpreset): Likewise.
- * CRT_fp10.c (_fpreset): Overide library _fpreset with one
- that calls fninit.
- (fpreset): Add alias.
- (__CRT_PC): Delete definition. _fpreset does it now.
- * CRT_fp8.c (_fpreset): Force use of library _imp___fpreset.
- (fpreset): Add alias.
- (__CRT_PC): Delete definition.
- * moldname.def.in: Comment out fpreset.
- * moldname-msvcrt.def: Regenerate.
- * moldname-crtdll.def: Regenerate.
- * include/fenv.h (FE_DFL_ENV): Define as (fenv_t*)0.
- * mingwex/fesetenv.c (FE_DFL_ENV): Use it to set environment
- with the _fpreset determined by startup CRT_fp object.
-
- 2002-04-16 Danny Smith <dannysmith@users.sourceforge.net>
- * CRT_fp8.c: New file.
- * CRT_fp10.c: New file.
- * crt1.c (__CRT_PC) Declare.
- (__CRT_fesetenv): New static function, using _CRT_PC.
- (__mingw_CRTStartup):Use __CRT_fesetenv instead of _fpreset.
- (_gnu_exception_handler): Likewise.
- * Makefile.in (CRT0S): Add CRT_fp10.o.
- (MINGW_OBJS): Add CRT_fp8.o.
- (SRCDIST_FILES): Add CRT_fp8.c, CRT_fp10.c.
- Add CRT_fp8.o, CRT_fp10.o dependancies.
- * include/float.h (_fpreset): Expand comment.
- * include/fenv.h (FE_PC64_ENV): New define for Intel x87
- (extended precison) environmemt.
- (FE_PC53_ENV): New define for MSVCRT default environmemt.
- (FE_DFL_ENV): Define as FE_PC53_ENV.
- * mingwex/fesetenv.c: Use FE_PC53_ENV, FE_PC64_ENV to determine
- precision control for default environment.
-
- * include/math.h: Fix long comment line.
- * profile/configure.in (CRT0S): Set to both gcrt1.o and gcrt2.o
- for mingw.
- * profile/configure: Regenerate.
-
- 2002-04-12 Danny Smith <dannysmith@users.sourceforge.net>
- * mingwex/Makefile.in (DISTFILES): Add suffix to wcstof.c.
-
- 2002-04-10 Danny Smith <dannysmith@users.sourceforge.net>
- * mingwex/mingw-fseek.c: New file, based on Mumit Khan
- mingw-local patch to binutils.
- Sun Nov 7 04:27:07 1999 Mumit Khan <khan@xraylith.wisc.edu>
- (__mingw_fseek): New function to work around Win9x f/lseek bug.
- (__mingw_fwrite): Likewise.
- (__mingw_is_win9x): New helper function.
- * include/stdio.h (__USE_MINGW_FSEEK): New define,guarding...
- (__mingw_fseek): New prototype and define to replace fseek.
- (__mingw_fwrite): New prototype and define to replace fwrite.
- * mingwex/Makefile.in: Add mingw-fseek.o to libmingwex.a.
- * moldname-crtdll.def: Remove CR from end of line.
- * moldname-msvcrt.def: Ditto.
-
- 2002-04-09 Danny Smith <dannysmith@users.sourceforge.net>
- * profile/configure.in (CRT0S): Configure name of gcrt?.o
- based on target, building gcrt0.o for cygwin -mno-cygwin.
- * profile/configure: Regenerate.
- * profile/Makefile.in (CRT0S): Use name from configure.
- (gcrt0.o): New rule.
- (ALL_CRT0S): New define, used to cleanup all gcrt?.o's.
-
- 2002-04-04 Danny Smith <dannysmith@users.sourceforge.net>
- * include/math.h (_controlfp, _control87, _clearfp, _statusfp, _fpreset,
- _fpecode): Remove prototypes copied from float.h.
- (nan, nanf): Move into block protected against RC_INVOKED
- and __cplusplus.
- * include/stdlib.h (_Exit): Change from static inline to
- extern inline.
- * mingwex/_Exit.c : New file.
- * mingwex/Makefile.in: Add _Exit.o to libmingwex.a.
-
- 2002-04-04 Danny Smith <dannysmith@users.sourceforge.net>
- Add libgmon.a and libmingwex.a for cygwin -mno-cygwin.
- * configure.in (SUBDIRS): Add profile and mingwex to cygwin target.
- (configdirs): Likewise.
- (LIBGMON_A): Define for cygwin target as well.
- * configure: Regenerate.
- * profile/configure.in (THREAD_DLL): Remove define.
- (LIBM_A): Remove define.
- (LIBGMON_A): Define for cygwin target as well.
- * profile/configure: Regenerate.
- * profile/makefile.in (install): Install to inst_libdir and
- inst_includedir.
- * mingwex/makefile.in (CFLAGS): Move -fomit-frame-pointer to...
- (OPTFLAGS): New define.
- (ALL_CFLAGS): Add $(OPTFLAGS).
- (ALL_CXXFLAGS): Same.
- (.c.o:): Remove ALL_CXXFLAGS.
-
- 2002-03-29 Danny Smith <dannysmith@users.sourceforge.net>
- * include/stdint.h: Add missing newline at eof.
- * include/stdio.h (snprintf): Add prototype.
- (vsnprintf): Add prototype and inline definition.
- (snwprintf): Add prototype.
- (vsnwprintf): Add prototype and inline definition.
- * include/wchar.h (snwprintf): Add prototype.
- (vsnwprintf): Add prototype and inline definition.
- * mingwex/Makefile.in: Add snprintf.o, snwprintf.o
- to libmingwex.a.
- * mingwex/snprintf.c: New file.
- * mingwex/snwprintf.c: New file.
-
- 2002-03-22 Danny Smith <dannysmith@users.sourceforge.net>
- * configure.in: Add mingwex as SUBDIRS and configdirs.
- * configure: Regenerate.
- * Makefile.in (MINGW_OBJS): Remove dirent.o.
- (SRC_DIST_FILES): Remove dirent.c.
- * dirent.c: Remove.
- * include/stdlib.h (_Exit): Add static inline
- function.
- (struct lldiv_t): Define.
- (lldiv): Add prototype.
- (llabs): Add extern inline function.
- (strtoll,strtoull): Add prototypes.
- (wcstol, wcstoul, wcstod): Group together.
- (strtof, wcstof): Add extern inline definitions.
- (atoll,lltoa,ulltoa, wtoll, lltow ulltow): Add prototypes
- and extern inline definitions.
- * include/wchar.h (fwide, wcstoll,wcstoull, wmemchr
- wmemcmp, wmemcpy, wmemmove, wmemset. mbsinit): Add
- prototypes.
- (wcstol, wcstoul,wcstod): Copy prototypes from stdlib.h.
- (wcstof): Add extern inline definition.
- * include/math.h (nan, nanf): Add prototypes.
- (NAN, INFINITE): Define constants.
- (fpclassify, isnan ,signbit): Add macros and supporting float
- and double functions.
- (isfinite, isinf, isnormal): Add macros.
- (isgreater, isless, isgreaterequal, islessequal,islessgreater):
- Add macros.
- (rint, rintf, round, roundf, trunc. truncf, fmax, fmaxf,
- fmin, fminf, fma, fmaf, log2, log2f): Add prototypes.
- (copysign, logb, nextafter, scalb): Add prototypes and
- inline stubs for underscored versions in msvcrt.dll.
- * include/inttypes.h: New file.
- * include/fenv.h: New file
-
- Add new mingwex subdir and files.
- * mingwex: New directory.
- * mingwex/Makefile.in: New file.
- * mingwex/configure.in: New file.
- * mingwex/configure: Generate.
- * mingwex/dirent.c: Moved here from parent dir.
- * mingwex/atoll.c: New file.
- * mingwex/feclearexcept.c: New file.
- * mingwex/fegetenv.c: New file.
- * mingwex/fegetexceptflag.c: New file.
- * mingwex/fegetround.c: New file.
- * mingwex/feholdexcept.c: New file.
- * mingwex/feraiseexcept.c: New file.
- * mingwex/fesetenv.c: New file.
- * mingwex/fesetexceptflag.c: New file.
- * mingwex/fesetround.o: New file.
- * mingwex/fetestexcept.c: New file.
- * mingwex/feupdateenv.c: New file.
- * mingwex/fma.S: New file.
- * mingwex/fmaf.S: New file.
- * mingwex/fmax.c: New file.
- * mingwex/fmaxf.c: New file.
- * mingwex/fmin.c: New file.
- * mingwex/fminf.c: New file.
- * mingwex/fp_consts.c: New file.
- * mingwex/fpclassify.c: New file.
- * mingwex/fucom.c: New file.
- * mingwex/fwide.c: New file.
- * mingwex/imaxabs.c: New file.
- * mingwex/imaxdiv.c: New file.
- * mingwex/isnan.c: New file.
- * mingwex/isnanf.c: New file.
- * mingwex/lltoa.c: New file.
- * mingwex/lltow.c: New file.
- * mingwex/log2.c: New file.
- * mingwex/log2f.c: New file.
- * mingwex/math_stubs.c: New file.
- * mingwex/mbsinit.c: New file.
- * mingwex/rint.c: New file.
- * mingwex/round.c: New file.
- * mingwex/signbit.c: New file.
- * mingwex/sitest.c: New file.
- * mingwex/strtof.c: New file.
- * mingwex/strtoimax.c: New file.
- * mingwex/strtoumax.c: New file.
- * mingwex/testwmem.c: New file.
- * mingwex/trunc.c: New file.
- * mingwex/ulltoa.c: New file.
- * mingwex/ulltow.c: New file.
- * mingwex/wcstof.c: New file.
- * mingwex/wcstoimax.c: New file.
- * mingwex/wcstoumax.c: New file.
- * mingwex/wmemchr.c: New file.
- * mingwex/wmemcmp.c: New file.
- * mingwex/wmemcpy.c: New file.
- * mingwex/wmemmove.c: New file.
- * mingwex/wmemset.c: New file.
- * mingwex/wtoll.c: New file.
-
-2002-04-20 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/mbstring.h: New file.
- * include/mbctype.h: New file.
-
-2002-04-20 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/tchar.h (__TEXT): Make same as define in
- w32api/include/winnt.h.
-
-2002-04-20 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/tchar.h (_tputenv): Add UNICODE mappings.
- (_tsearchenv): Likewise.
- (_tmakepath): Likewise.
- (_tsplitpath): Likewise.
- (_tfullpath): Likewise.
-
-2002-04-18 Pascal Obry <obry@gnat.com>
-
- * dirent.c (opendir): Convert given pathname to
- absolute pathname.
-
-2002-04-09 Earnie Boyd <earnie@users.sf.net>
-
- * include/_mingw.h: Increment version.
- * Makefile.in: Ditto.
-
-2002-04-09 Earnie Boyd <earnie@users.sf.net>
-
- * moldname-crtdll.def: Remove CR from end of line.
- * moldname-msvcrt.def: Ditto.
- * Makefile.in: Use bzip2 compression for Cygwin target.
-
-2002-04-04 Danny Smith <dannysmith@sourceforge.users.net>
-
- * include/math.h (DOMAIN, SING, OVERFLOW, UNDERFLOW,
- TLOSS, PLOSS): Move oldname defines back, following
- the underscored names.
-
-2002-03-29 Danny Smith <dannysmith@sourceforge.users.net>
-
- * include/stdio.h (_snwprintf): Correct spelling.
- (_vsnwprintf): Likewise.
- * include/wchar.h (_snwprintf): Correct spelling.
- (_vsnwprintf): Likewise.
-
-2002-03-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- * moldname.def.in (__MSVCRT__): Replace with !(__CRTDLL__).
- (wpopen): Add if !(__CRTDLL__).
- * Makefile.in (moldname-msvcrt.def rule): Use -C, not -c to
- preserve comments.
- (moldname-crtdll.def rule): Likewise.
- * moldname-msvcrt.def: Regenerate.
- * moldname-crtdll.def: Regenerate.
- * include/stdio.h (wpopen):Use prototype, not a define.
- (_swnprintf): Add prototype.
- (_vswnprintf): Likewise.
- Tidy up whitespace.
- * include/wchar.h (_swnprintf): Add prototype.
- (_vswnprintf): Likewise.
- Tidy up whitespace.
-
-2002-01-28 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/malloc.h (_heapinfo): Correct structure definition.
- (_USEDENTRY,_FREEENTRY): Add defines.
- Add comment on platform support for _heap* functions.
- (_get_sbh_threshold): Add prototype.
- (_set_sbh_threshold): Likewise.
- (_expand): Likewise.
-
-2002-01-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * profile/profil.c: Update copyright info.
- * profile/profil.h: Likewise.
- * profile/gcrt0.c: Likewise.
-
-2002-01-25 Pascal Obry <obry@gnat.com>
-
- * profile/profil.h (PROFADDR): Cast idx to unsigned long long to
- avoid overflow.
- * profile/gmon.c: Define bzero as memset if mingw32.
- (monstartup): Use it.
-
-2002-01-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/tchar.h (_TCHAR): Add missing ;.
-
-2002-01-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/tchar.h (_TCHAR): Add typedefs.
-
-2002-01-16 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdlib.h (_onexit_t): Add typedef.
- (_onexit): Add prototype.
-
-2002-01-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * msvcrt.def: Revert accidental change.
- * include/stdlib.h: Ditto.
-
-2001-12-07 Earnie Boyd <earnie@users.sf.net>
-
- * Makefile.in: Increment VERSION.
- * include/_mingw.h: Ditto.
-
-2001-12-05 Earnie Boyd <earnie@users.sf.net>
-
- * include/strings.h: New File.
-
-2001-12-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- Apply patches from:
- 2001-06-21 Mumit Khan <khan@nanotech.wisc.edu>
-
- * include/math.h (_FPCLASS* ): Add defines from float.h.
- (IEEE recommended functions): Add declarations from float.h.
- * include/float.h (_FPCLASS* ): Protect against redefinition.
-
-2001-11-29 Wu Yongwei <adah@netstd.com>
-
- * include/_mingw.h,assert.h,conio.h,ctype.h,dir.h,direct.h
- dirent.h,dos.h,errno.h,excpt.h,fcntl.h,float.h,io.h,
- limits.h,locale.h,malloc.h,math.h,process.h,setjmp.h,
- share.h,signal.h,stdarg.h,stddef.h,stdint.h,stdio.h,
- stdlib.h,string.h,tchar.h,time.h,varargs.h,wchar.h,
- wctype.h,sys/stat.h,sys/timeb.h,sys/types.h,sys/utime.h:
- Correct spelling of "disclaimed" in comments.
- * include/excpt.h: Another spelling correction.
-
-2001-11-08 Robert Collins <rbtcollins@hotmail.com>
-
- * include/errno.h: Fix "errno is not a prototype" warning.
-
-2001-11-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ctype.h (tolower, toupper,_tolower,_toupper): Comment
- differences between ANSI and non-ANSI versions.
- (_ctype[],_pctype): Declare vars.
- (__ISCTYPE): New helper macro using _pctype.
- (is* ctype functions): Use __ISCTYPE to define inline versions.
- (_toupper, _tolower, __isascii, __toascii, __iscsym, __iscsymf):
- Inline definitions.
- (isw* ctype functions): Inline definitions.
- * include/wctype.h (_ctype[],_pctype): Declare vars.
- (isw* ctype functions): Inline definitions.
-
-
-2001-11-06 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/float.h (_clearfp, _statusfp, _fpreset, fpreset,
- __fpecode): Use __STDC__ prototypes.
-
-
-2001-11-06 Thomas Pfaff <tpfaff@gmx.net>
-
- * mthr_stub.c (__mingwthr_remove_key_dtor) New.
- * mthr_init.c (DllMain) Run dtors if a process terminates.
- * mthr.c (__mingwthr_add_key_dtor) Removed.
- (___mingwthr_add_key_dtor) New.
- (___mingwthr_remove_key_dtor) New.
- (__mingwthr_run_key_dtors) Complete rewrite.
- (__mingwthr_remove_key_dtor) New.
-
-2001-11-05 Egor Duda <deo@logos-m.ru>
-
- * Makefile.in: Delete unused executable after creating base-files.
-
-2001-11-06 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/errno.h (_errno): Use __STDC__ prototype.
- Thanks to: Jim Barton.
-
-2001-11-04 "stefan" <stefan@lkcc.org>
-
- * include/sys/locking.h (_LK_UNLCK, LK_UNLCK): Correct names.
-
-2001-10-30 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/io.h (_commit): Add declaration.
- Thanks to: "stefan" <stefan@lkcc.org>
-
-2001-10-30 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/sys/stat.h: Make S_IS* macros safer.
-
-2001-10-27 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdlib.h (EXIT_FAILURE): Change value to 1.
-
-2001-10-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdlib.h (__p__environ, __p__wenviron): Use
- __STDC__ prototypes.
-
-2001-09-19 Earnie Boyd <earnie@SF.net>
-
- * Makefile.in: Remove the /usr from the install target.
- (VERSION): Increment.
- include/_mingw.h: Ditto.
-
-2001-09-17 Earnie Boyd <earnie@SF.net>
-
- * Makefile.in: Increment version.
- * include/_mingw.h: Ditto.
-
-2001-09-10 Earnie Boyd <earnie@SF.net>
-
- * dossh: Remove inadvertantly imported file.
-
-2001-09-10 Danny Smith <dannysmith@users.sourceforge.net>
-
- * dirent.c (opendir): Use GetFileAttributes rather than stat
- to determine if input arg is dir.
-
-2001-08-29 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdarg.h (va_list): Typedef as __builtin_va_list if
- __GNUC__ >= 3.
- * include/varargs.h (va_list): Ditto.
- * include/stdio.h (va_list): Ditto.
-
-2001-08-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/stdlib.h (_wpgmptr): Don't declare ifndef __MSVCRT__.
- * include/stdio.h (_IORW): Change constant to 0x0080.
- (TMP_MAX): Add new define.
- (_P_tmpdir): Ditto.
- (_wP_tmpdir): Ditto.
- (L_tmpnam): Change constant to 16.
-
-2001-06-28 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/malloc.h: Fix non-ANSI comment after #endif.
-
-2001-06-11 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
-
- * profile/configure.in: Make msvcrt.dll version default.
- * profile/makefile.in: Build both gcrt1.o and gcrt2.o.
- * provile/configure: Regenerate.
-
-2001-06-11 Mattia Barbon <mbarbon@dsi.unive.it>
-
- * include/stdio.h (swscanf): Make first arugument const.
- * include/wchar.h (swscanf): Ditto.
- * include/tchar.h (_tfopen): New _UNICODE define.
- (_tgetenv): Ditto.
- (_tsetlocale): Ditto.
-
-2001-06-04 Earnie Boyd <earnie@users.sourceforge.net>
-
- * profile/Makefile.in (mkinstalldirs): Correct relative path.
-
-2001-06-04 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/_mingw.h: Change version to 1.0.
- Makefile.in: Ditto.
-
-2000-02-21 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/tchar.h: (__TEXT): Remove undef.
- (_TEXT): Ditto.
- (_T): Ditto.
-
-Fri Feb 2 10:34:07 2001 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/tchar.h: (__TEXT): Add private macro.
- (_TEXT): Modify definition to use __TEXT.
- (_T): Ditto.
- This change allows the passing of a MACRO as an argument and have that
- MACRO resolved first.
- Thanks to: Eric PAIRE <eric.paire@ri.silicomp.com>
-
-Wed Jan 31 17:12:51 2001 Earnie Boyd <earnie@users.sourceforge.net>
-
- * Makefile.in: Increment version to 0.5
- * include/_mingw.h: Increment minor version
-
-Tue Jan 30 13:01:01 2001 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/assert.h: (assert): Remove ; from end of definition
- Thanks to: AJ Reins <tbisp@qwest.net>
-
-Tue Jan 30 07:31:22 2001 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/time.h: (CLOCKS_PER_SEC): Type cast the constant.
- Thanks to: Cosmin Truta <cosmin@cs.toronto.edu>
-
-Mon Jan 29 14:03:07 2001 Earnie Boyd <earnie@users.sourceforge.net>
-
- * time.h: (CLOCKS_PER_SEC) Change from FP to integer constant.
-
-Sun Jan 28 13:01:08 2001 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/wchar.h: The 2001.01.18 Change was incorrect. The functions
- are actually C functions. These functions are resolved via the
- -lmsvcp60 library and comments were placed in the header.
-
-2001-01-28 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
-
- * include/stdlib.h (__p__pgmptr): add prototype.
- (__p__wpgmptr): likewise.
- (_pgmptr_dll): move declaration from dos.h.
- (_wpgmptr_dll): likewise.
- (_pgmptr): conditional define (MSVCT/CRTDLL).
- (_wpgmptr): likewise.
- * include/dos.h (_base*_dll variables): declare only for CRTDLL.
- (_os*_dll variables): likewise.
- (_pgmptr_dll): remove declaration and associated defines to stdlib.h.
- (_wpgmptr_dll): likewise.
-
-2001-01-22 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
-
- * include/stdint.h: New file.
-
-Thu Jan 18 10:33:01 2001 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/wchar.h: Protect prototypes only declared in the C++ STL
- from being declared unless __cplusplus is defined.
-
-Tue Jan 16 11:37:31 2001 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/stdlib.h: Apply Danny Smith patch 102730
- 2000-12-09 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
- (_wgetenv) Correction to return type.
-
-Tue Jan 16 09:41:41 2001 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/locale.h: Apply Danny Smith patch 101834
- 2000-11-23 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
- (LC_MIN) Add definition.
- (LC_MAX) ditto.
- (_wsetlocale) Add prototype.
-
-2000-11-29 Earnie Boyd <earnie_boyd@yahoo.com>
-
- * Makefile.in: eliminate the need for RUNTIME and CRT_ID.
- Always build crt1.o, dllcrt1.o, crt2.o and dllcrt2.o.
- Create a libcoldname.a for the oldname library for CRTDLL.
- Restrict libmoldname.a for the oldname library for MSVCRT.
- * configure.in: eliminate setting RUNTIME and CRT_ID variables.
- Restructure the $target_os case logic.
- Always name the MinGW thread dll helper mingwm.
- Change Cygwin's HEADER_SUBDIR value from mingw32 to mingw.
- * configure: regenerate.
-
-2000-11-22 Earnie Boyd <earnie_boyd@yahoo.com>
-
- * Makefile.in: Fix bindist target to distribute the correct files.
- Remove the use of SNAPSHOT variable and test SNAPDATE instead.
- Set SNAPDATE within the snapshot target on recursive call to $(MAKE).
-
-2000-11-21 Earnie Boyd <earnie_boyd@yahoo.com>
-
- * Makefile.in: Add missing line continuation `\' for $(SUBDIRS) target.
- Add variables and targets to control binary and source distributions.
- Add variables and targets to control snapshot distribution.
- * profile/gmon.h: Add missing #endif for #ifndef.
- * profile/ChangeLog: Merge entries here and remove.
- * profile/Makefile.in: Add variables and targets to control
- distribution.
- * README: Add.
- * TODO: ditto.
- * config.guess: ditto.
- * config.sub: ditto.
- * mkinstalldirs: ditto.
- * install-sh: ditto.
- * configure: regenerate.
- * profile/configure: ditto.
-
-2000-11-20 Earnie Boyd <earnie_boyd@yahoo.com>
-
- * Merge in changes from
- 2000-10-23 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
- * include/direct.h: add guard around MSVCRT-only prototytpes
- * include/io.h: add __int64 struct definitions and function prototypes;
- add guard for MSVCRT-only prototypes
- * include/limits.h: add ISO C9x macros LLONG_MIN, LLONG_MAX, ULLONG_MAX
- * include/stdio.h: add wchar function prototypes (__MSVCRT__);
- put wchar functions together to make sync with wchar.h easier
- * include/stdlib.h: add wide char functions (__MSVCRT__)
- * include/string.h: add string collation functions ( __MSVCRT__)
- * include/sys/stat.h: add __int64 struct and function ( __MSVCRT__)
- * include/tchar.h: add macros and macro function definitions
- * include/wchar.h: add wide char function prototypes ( __MSVCRT__ );
- enclose more functions in __MSVCRT__ guard;
- some oldname wide char function prototypes #if (0)'d
- * profile/gmon.h: add guard around BSD-ish typedefs
-
-Mon Nov 20 18:58:12 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Use a different variable name for subdirectory since the
- previous one was used by the top level make.
-
-Sun Nov 19 20:50:51 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Install mingw stuff in a subdirectory if building under
- cygwin.
-
-Sat Jun 17 21:48:23 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in (subdirs): Eliminate for loop.
-
-Sat Jun 17 18:27:59 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in (subdirs): Previous change did not fix problem in
- broken shells.
-
-Sat Jun 17 13:49:12 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Avoid installing dll if we're cross building and the
- cross-host system isn't a Windows system.
- * configure.in: Detect cross-hosting situation and set appropriate
- variables in Makefile.in.
- * configure: Regenerate.
-
-Wed Apr 19 13:10:54 2000 Christopher Faylor <cgf@cygnus.com>
-
- * configure.in: Change HEADER_SUBDIR to mingw32.
- * configure: Regenerate.
-
-Mon Apr 10 17:24:28 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/string.h: Use proper prototype for _strerror.
-
-2000-03-30 Mumit Khan <khan@xraylith.wisc.edu>
-
- * Makefile.in (subdirs): Workaround for broken shells.
-
-2000-02-03 Mumit Khan <khan@xraylith.wisc.edu>
-
- * Snapshot 2000-02-03.
-
- * include/{assert.h, conio.h, ctype.h, direct.h, dirent.h, fcntl.h,
- float.h, io.h, locale.h, malloc.h, math.h, process.h, signal.h,
- stdio.h, stdlib.h, string.h, time.h, wctype.h, sys/stat.h,
- sys/timeb.h, sys/utime.h}: Remove parameter names to avoid namespace
- pollution.
-
- * Makefile.in (all): Build CRT0S first.
- (libmingwthrd.a): Remove thread support DLL from dependency.
-
-2000-01-21 Mumit Khan <khan@xraylith.wisc.edu>
-
- * Snapshot 2000-01-21.
-
-2000-01-20 Mumit Khan <khan@xraylith.wisc.edu>
-
- Merge in changes from Cygwin:
- * configure.in (HEADER_SUBDIRS): New variable. Substitute.
- (SUBDIRS): Likewise.
- * Makefile.in (HEADER_SUBDIRS): New variable.
- (install): Use to install Mingw headers to a subdirectory if building
- under Cygwin.
- (DLL_CC_STUFF): Add DLL entry point.
- * configure: Regenerate.
-
-2000-01-19 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/stdio.h (fsetpos): Fix prototype.
- (fpos_t): Fix for MSVCRT.
- * include/float.h (fpreset): Add prototype.
- * include/limits.h: Define UINT_MAX, USHRT_MAX and ULONG_MAX with
- constant values.
- * include/time.h: Don't define tzname as a macro for CRTDLL, and
- export using libmoldname.a.
- * crtdll.def: Add DATA tags.
- * msvcrt.def: Likewise.
- * moldname.def.in: Likewise. Add fpreset. Export tzname for
- both MSVCRT and CRTDLL.
- * moldname-crtdll.def: Regenerate.
- * moldname-msvcrt.def: Regenerate.
-
-Tue Dec 21 02:22:14 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * Snapshot 1999-12-21.
-
- * include/wctype.h: New file.
- * include/ctype.h (MB_CUR_MAX): Define.
- (wctype_t): Guard.
- * include/stdlib.h (MB_CUR_MAX): Define.
- * include/wchar.h: Define stat, _stat structures here as well.
- * include/float.h: Add invalid subconditions (_SW) and floating
- point error (_FPE) macros.
- * include/time.h (_CLOCK_T): Rename macro to _CLOCK_T_DEFINED.
- (_TIME_T): Rename macro to _TIME_T_DEFINED.
- * include/sys/types.h: Likewise.
-
-Thu Nov 18 00:22:26 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * profile/profil.c (profile_on): Set the profiler thread priority to
- be time critical. Thanks to Pascal Obry <pascal_obry@csi.com>.
- * Snapshot 1999-11-18.
-
-Sun Nov 7 02:50:09 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- Released 1999-11-07.
-
- * Makefile.in (CRT0S): Add crtst.o.
- (install): Install in subdirs as well.
- * dirent.h (struct _stat): Rename from struct stat.
- * include/tchar.h: Add some new macros. Thanks to
- Eric Kohl <ekohl@abo.rhein-zeitung.de>.
- * profile/Makefile.in (install): Fix target.
-
-Thu Nov 4 14:32:58 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * Makefile.in: Add support for profile directory.
- * configure.in: Likewise.
- * configure: Regenerate.
-
- * profile: Imported profiling sources from winsup-19991026 snapshot.
- * profile/Makefile.in: New file.
- * profile/configure.in: New file.
- * profile/configure: Generate.
- * profile/gcrt0.c (u_char, u_short, u_int, u_long): typedef for Mingw.
- * profile/gmon.h (u_char, u_short, u_int, u_long): Likewise.
- * profile/gmon.c (unistd.h): Include conditionally.
- (sys/param.h): Likewise.
- * profile/mcount.c (sys/param.h): Likewise.
- * profile/profil.c (profile_on): thread id is DWORD, not int.
-
-
-Wed Nov 3 16:26:44 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/stdlib.h: Add wide character version of argv/environ.
- Formatting changes.
- * include/wchar.h: More wide character prototypes.
- * include/sys/stat.h: Likewise. Add struct stat as well as _stat.
-
- * dllcrt1.c (init.c): Don't include.
- (DllMainCRTStartup): Don't call _mingw32_init_mainargs().
- * Makefile.in: Remove init.c from dllcrt{1,2}.c dependency lists.
-
-Sat Oct 30 03:06:26 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * moldname.def: Remove file.
- * moldname.def.in: And add this.
- * moldname-msvcrt.def: Generate from moldname.def.in.
- * moldname-crtdll.def: Likewise.
-
- * mthr.c: New file for -mthread (thread-safe C++ EH) support.
- * mthr_init.c: New file for -mthread (thread-safe C++ EH) support.
- * mthr_stub.c: New file for -mthread (thread-safe C++ EH) support.
-
- * Makefile.in: Update.
- * configure.in: Likewise. Also add *cygwin* target for building
- under Cygwin winsup.
- * configure: Regenerate.
-
-Fri Oct 1 11:10:30 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/_mingw.h: Add version macros.
- * include/direct.h (_diskfree_t, getdiskfree, getdrives): Add.
- Also add wide character versions shared with wchar.h.
- * include/dos.h (_diskfree_t, getdiskfree, getdrives): Add.
- * include/io.h (sopen, _sopen): Fix prototype.
- Add wide character prototypes.
- * include/wchar.h: Likewise.
- * include/stdlib.h (beep, seterrormode, sleep): Remove non-
- underscored versions. Potential incompatibility.
- * include/time.h (daylight, timezone, tzname): Fix MSVCRT cases.
- Add wide character prototypes.
- * include/sys/timeb.h (struct _timeb): Don't use macro, but real
- definition.
-
-Wed Aug 18 18:38:39 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * configure.in (RUNTIME, CRT_ID): Add to differentiate between
- crtdll and msvcrt runtimes. Remove DLL_ENTRY and DEF_DLL_ENTRY
- macros.
- * configure: Rengerate.
- * Makefile.in (RUNTIME, CRT_ID): Use to generate the correct
- dll name and crt's. CRTDLL and MSVCRT are meant to created
- separately, so remove all the *-msvcrt* targets.
- (libmingwthr.a): New target. Dummy thread support archive.
- (LIBS): Add libmingwthr.a.
- (CRT0S): Use CRT_ID. Add crtmt.o.
- (MINGW_OBJS): Add crtst.o.
- * main.c (WinMain): Fix prototype.
- * crtmt.c: New file.
- * crtst.c: New file.
-
- * include/process.h (_beginthreadex): Fix prototype.
- * include/_mingw.h (__int64): Define for __GNUC__.
- * include/tchar.h (_ttol): Add macro.
- * include/stdlib.h (_wtoi, _wtol, _i64toa, _ui64toa, _atoi64,
- _i64tow, _ui64tow, _wtoi64): Add prototypes.
-
- Reported by Emanuele Aliberti <ea@iol.it>:
- * include/tchar.h (_ttoi): Add macro.
-
- Reported by Ulf Moeller <3umoelle@informatik.uni-hamburg.de>:
- * include/stdio.h (_snprintf): Add prototype.
- (_vsnprintf): Likewise.
-
-Sat Aug 7 18:00:00 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- Reported by Tor Lillqvist <tml@iki.fi>:
- * include/stdlib.h (__p___argv): Fix return type.
-
-Fri Jul 30 22:07:06 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- Add UWIN support.
- * include/errno.h (errno): It's linked in from startup, not imported.
- * include/stdlib.h (errno): Likewise.
- * include/io.h: Guard against conflicting macros and prototypes in
- system headers.
- * include/stdlib.h: Likewise.
- * include/string.h: Likewise.
- * include/time.h: Likewise.
-
-Fri Jul 30 13:47:34 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/io.h (X_OK): Fix definition. Thanks to Jan Nijtmans.
- * include/dos.h: Fix typo __MINGW_EXPORT->__MINGW_IMPORT.
- * Makefile.in (INCLUDES): Remove old windows32 include directory.
-
- * crt1.c (_gnu_exception_handler): Fix prototype.
- (__mingw_CRTStartup): New function based on mainCRTStartup.
- (mainCRTStartup): Set the app type for MSVCRT and call
- __mingw_CRTStartup.
- (WinMainCRTStartup): Likewise.
- * init.c (_startupinfo): Define.
- (_getmainargs): Add 5th parameter.
- (_mingw32_init_mainargs): Use.
-
- * ALL *.c files: Reformat according to GNU coding style.
-
-Fri Jul 16 00:46:04 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * Makefile.in (INCLUDES): Add w32api include directory.
-
- * include/_mingw.h: New file.
- * include/{assert.h,conio.h,ctype.h,direct.h,dirent.h,dos.h,
- errno.h,excpt.h,fcntl.h,float.h,io.h,limits.h,locale.h,malloc.h,
- math.h,process.h,setjmp.h,share.h,signal.h,stdarg.h,stdio.h,
- stdlib.h,string.h,tchar.h,time.h,varargs.h,sys/locking.h,
- sys/stat.h,sys/timeb.h,sys/types.h,sys/utime.h}: Include and
- use the macros __DECLSPEC_SUPPORTED and __MINGW_IMPORT.
-
- * include/stdlib.h (atexit): Fix prototype.
-
-Mon Jun 14 18:38:49 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/stdio.h (_tempnam): Fix prototype.
- (tempnam): Likewise.
- * include/stdlib.h: Replace with GCC's version, and guard
- with RC_INVOKED.
-
- From Anders Norlander <anorland@hem2.passagen.se>:
- * include/stdlib.h (__argc): Declare.
- (__argv): Likewise.
-
-Mon Apr 5 13:49:17 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * crt1.c (_gnu_exception_handler): Acknowledge Jacob Navia's
- contribution.
- * Makefile.in (_libm_dummy.o): New target.
- (libm.a): Use.
-
-Tue Mar 16 18:15:26 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * Released 1999-03-16 along with egcs-1.1.2.
-
-Wed Feb 17 17:15:56 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * Makefile.in (LIBS): Add libm.a.
- (libm.a): Dummy libm.a.
-
- * Makefile.in: Update from winsup 1999-02-08 snapshot.
- Preserve local changes.
- (mkinstalldirs): In ../, not ../../.
- (INCLUDES): Point to local windows32api headers and use -nostdinc.
- (LIBGCC): Delete.
- (LIBS): Add libmoldname-msvc.a.
- (libmoldname-msvc.a): Add target.
- (distclean): Add target.
-
-Tue Feb 9 00:26:05 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/dir.h: Reintroduce as an obsolescent header.
- * crt1.c (signal.h): Include.
- (_gnu_exception_handler): New function to properly handle win32
- asynchronous signals.
- (mainCRTStartup): Use.
-
-Sun Jan 3 23:52:25 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/direct.h: Include io.h instead of dir.h
- * include/dirent.h: Likewise.
- * include/dos.h: Likewise.
- * include/stdio.h: Replace reference to dir.h with io.h.
-
-Thu Dec 31 16:04:55 1998 Mumit Khan <khan@xraylith.wisc.edu>
-
- * 1999-01-01 release bundled with egcs-1.1.1.
-
- * include/io.h: Incorporate dir.h.
- * include/dir.h: Remove.
- * include/signal.h: Move RC_INVOKED up a bit.
-
-Tue Dec 29 15:04:38 1998 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/signal.h (sig_atomic_t): Define.
- (NSIG): Define.
- * include/malloc.h: Import defs from deprecated alloc.h.
- * include/alloc.h: Remove.
-
- From "Daniel J. Rodriksson" <djr@dit.upm.es>:
- * include/sys/types.h (_dev_t): Should be unsigned int for MSVCRT.
- * include/sys/stat.h (struct stat): st_uid is of type short. Use
- _off_t instead of long for st_size.
-
-Thu Sep 10 22:28:49 1998 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/errno.h (sys_errlist, sys_nerr): Move from here ...
- * include/stdlib.h: Here.
-
- * include/netdb.h: Remove.
- * include/arpa/inet.h: Remove.
- * include/netinet/in.h: Remove.
- * include/sys/socket.h: Remove.
-
-Fri Sep 4 15:09:11 1998 Mumit Khan <khan@xraylith.wisc.edu>
-
- * Release egcs-1.1.
-
- * include/{ctype.h,dos.h,io.h,string.h,time.h,sys/types.h,
- sys/utime.h}: Protect stddef.h in RC_INVOKED macro.
-
-Thu Sep 3 10:43:29 1998 Mumit Khan <khan@xraylith.wisc.edu>
-
- * setjmp.h (_JBTYPE, _JBLEN): Define correctly.
- (jmpbuf): typedef using above.
- (setjmp, longjmp): Prototype using jmpbuf.
-
- Merge with Colin Peters' 980701 snapshot. I've ignored changes to
- obsolescent imported names, ie., from __imp__ to _imp___.
-
- Also ignored empty include/sys/param.h and incorrect
- include/sys/times.h.
-
- * CRTinit.c: New file.
- * include/{errno.h,fcntl.h,math.h,process.h} (__MSVCRT__): Use #ifdef
- instead of #if.
- * include/io.h (umask): Fix prototype.
- * include/stdlib.h (OS constants): Replace with Colin's.
- * include/time.h (tzset, daylight, timezone): Replace with Colin's.
- * include/sys/state.h: Merge.
-
-Thu Sep 3 09:49:07 1998 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/assert.h (assert): Lose the trailing semicolon.
-
-Thu Jul 30 21:18:49 1998 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/math.h (matherr): Declare.
- * include/stdio.h (fileno, _fileno): Declare.
- * include/stdlib.h (environ, _environ): Fix to use runtime DLL.
-
- From Earnie Boyd:
- * include/stdio.h (fdopen, _fdopen): Add const.
- (getw, putw): Declare.
- * include/stdlib.h (MAX_{DRIVE,DIR,FNAME,EXT}): Fix.
-
-Sat Jun 13 18:19:41 1998 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/time.h (_timezone): Undefine.
- * include/sys/timeb.h (struct timeb): Rename _timezone to timezone.
-
- * include/time.h (_daylight, _timezone, _tzname, _tzset): Remove
- __cdecl for MSVCRT.
- * include/stdlib.h (environ): Use DLL version.
- * init.c (environ): Undefine it before use.
-
-Sun Mar 22 19:59:30 1998 Mumit Khan <khan@xraylith.wisc.edu>
-
- * Update to 980309 snapshot from Colin Peters.
-
- * include/utime.h: remove
- * include/stdlib.h (__imp__osver_dll, __imp__winver_dll,
- __imp__winmajor_dll, __imp__winminor_dll): Apply Jan-Jaap's
- patches to define these.
- * include/time.h (CLK_TCK): Renamed from CLK_TICK.
- (_daylight, _timezone, _tzname, _tzset): Define.
-
- * include/netdb.h: Add from Colin's windows32api changes.
- * include/sys/socket.h: Likewise.
- * include/arpa/inet.h: Likewise.
- * include/netinet/in.h: Likewise.
-
-Wed Feb 4 14:16:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
-
- * Update to 980128 snapshot from Colin Peters.
-
-Sat Dec 6 21:30:35 1997 Mumit Khan <khan@xraylith.wisc.edu>
-
- * configure.in (AC_INIT): Use dllmain.c instead of defunct
- oldnames.c
- * configure: Regenerate.
-
-Fri Dec 5 15:57:36 1997 Mumit Khan <khan@xraylith.wisc.edu>
-
- * Update to 971205 snapshot from Colin Peters. Lots of changes.
- Files renamed and include hierarchy loses directories named
- nonansi.
-
- * include/dos.h: from Jan-Jaap.
-
-Thu Dec 4 21:48:13 1997 Mumit Khan <khan@xraylith.wisc.edu>
-
- Changes to conform to FSF tree.
-
- * crt1.c: Renamed from mcrt0.c.
- * dllcrt1.c: Renamed from dllcrt0.c.
- * Makefile.in: Update above. Also renamed libmoldnames.a to
- libmoldname.a.
-
-Mon Dec 1 16:51:30 1997 Mumit Khan <khan@xraylith.wisc.edu>
-
- * crtdll.def: Export all functions but the ones with funny names.
- * moldnames.def: Add fdopen since fileno is already there.
- * include/nonansi/dos.h: New file from Jan-Jaap.
- * include/errno.h: Add extern decl + various additions from JJ.
- * include/stdio.h: Likewise.
- * include/stdlib.h: Likewise.
- * include/nonansi/io.h: Likewise.
- * include/nonansi/process.h: Likewise.
- * include/sys/types.h: Likewise.
-
-Tue Nov 4 14:51:01 1997 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/time.h (CLK_TCK): Renamed from CLK_TICK.
- (CLK_TICK): Delete.
- * include/stdlib.h (free): Fix prototype to return void, not void*.
- * include/nonansi/process.h: Add P_* and WAIT_* defs.
-
- * dllcrt0.c: Delete now-unneeded '.section .idata$3' asm hack.
- * mcrt0.c: Likewise.
-
- * Makefile.in (LIBS): Delete moldnames.dll from target libs.
- (libmoldnames.a): Add explicit rule to create it.
-
-Fri Aug 15 18:23:43 1997 Rob Savoye <rob@cygnus.com>
-
- New directory for the minimalist cygwin environment.
-
- * crtglob.c: New file. Turn on file globbing support.
- * crt_noglob.c: New file. Turn off file globbing support.
- * ctype_old.c: New file. Wrappers for functions that don't
- have an underscore.
- * dirent.c: New file. Directory routines readdir, opendir, closedir.
- * dllcrt0.c: New file. Initialization code to use crtdll.dll.
- * dllmain.c: New file. A stub DllMain function.
- * hugeval.c: New file. A gross hack to define HUGE_VAL.
- * init.c: New file. Common code to initialize standard file
- handles and command line arguments.
- * main.c: New file. A main for programs that only call WinMain.
- * mcrt0.c: New file. Default crt0 for mingw32.
- * oldnames.c: New File. Wrappers for functions that don't
- have an underscore.
- * string_old.c: New File.
- * include/{assert.h,ctype.h,errno.h,float.h,limits.h,locale.h
- math.h,nonansi,setjmp.h,signal.h,stdarg.h,stddef.h,stdio.h,stdlib.h
- string.h,tchar.h,time.h,wchar.h}: New header files for mingw.
- * include/sys/types.h: New header file for mingw.
- * include/nonansi/{alloc.h,conio.h,dir.h,direct.h,dirent.h
- fcntl.h,io.h,malloc.h,mem.h,memory.h,process.h,share.h,unistd.h
- utime.h,values.h,varargs.h}: New header files for mingw.
- * include/nonansi/sys/{fcntl.h,locking.h,stat.h,time.h
- timeb.h,unistd.h}: New header files for mingw.
- * Makefile.in,configure.in: Build and configure support.
- * configure: Generated from autoconf 2.12 with Cygnus patches.
diff --git a/winsup/mingw/DISCLAIMER b/winsup/mingw/DISCLAIMER
deleted file mode 100644
index be3469c..0000000
--- a/winsup/mingw/DISCLAIMER
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * DISCLAIMER
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- *
- * The mingw-runtime package and its code is distributed in the hope that it
- * will be useful but WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESSED OR
- * IMPLIED ARE HEREBY DISCLAIMED. This includes but is not limited to
- * warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * You are free to use this package and its code without limitation.
- */
diff --git a/winsup/mingw/Makefile.in b/winsup/mingw/Makefile.in
deleted file mode 100644
index 9f0fa96..0000000
--- a/winsup/mingw/Makefile.in
+++ /dev/null
@@ -1,569 +0,0 @@
-# Makefile.in for the winsup/mingw directory.
-# Copyright (c) 1995-2008, 1996, 1997, 1998 Cygnus Solutions
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# This makefile requires GNU make.
-
-VERSION = @PACKAGE_VERSION@
-CYGRELEASE = 1
-
-VPATH = @srcdir@
-srcdir = @srcdir@
-objdir = .
-
-host_alias = @host_alias@
-build_alias = @build_alias@
-target_alias = @target_alias@
-with_cross_host = @with_cross_host@
-prefix = @prefix@
-conf_prefix = @prefix@
-# FIXME: this needs an appropriate AC_SUBST
-host_os = mingw32
-
-ifneq (,$(findstring cygwin, $(target_alias)))
-PACKAGE = mingw-runtime
-else
-PACKAGE = mingwrt
-endif
-
-program_transform_name = @program_transform_name@
-exec_prefix = @exec_prefix@
-bindir = @bindir@
-libdir = @libdir@
-ifneq (,$(findstring cygwin,$(target_alias)))
-mandir = $(prefix)/share/man
-mansection = mingw
-else
-mandir = @mandir@
-mansection = 3
-endif
-manpage_transform = @mingw_manpage_transform@
-ifeq ($(target_alias),$(host_alias))
-ifeq ($(build_alias),$(host_alias))
-tooldir:=$(exec_prefix)
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-datadir = @datadir@
-infodir = @infodir@
-includedir = @includedir@
-ifneq (,$(findstring cygwin,$(target_alias)))
-inst_bindir:=$(tooldir)/bin
-inst_includedir:=$(tooldir)/include/mingw
-inst_libdir:=$(tooldir)/lib/mingw
-inst_docdir:=$(tooldir)/share/doc/mingw-runtime
-else
-ifneq (,$(with_cross_host))
-inst_bindir:=$(tooldir)/bin
-inst_includedir:=$(tooldir)/include
-inst_libdir:=$(tooldir)/lib
-inst_docdir:=$(tooldir)/share/doc/mingw-runtime
-else
-inst_bindir:=$(bindir)
-inst_includedir:=$(includedir)
-inst_libdir:=$(libdir)
-inst_docdir:=$(prefix)/doc/runtime
-endif
-endif
-
-# The Mingw headers are installed under a subdirectory of
-# $(tooldir)/include when configuring in Cygwin.
-HEADER_SUBDIR = @HEADER_SUBDIR@
-
-SHELL = /bin/sh
-
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-mkinstalldirs = $(SHELL) @MKINSTALLDIRS@
-
-CC := @CC@
-ifneq (,$(findstring cygwin,$(target_alias)))
-override CC := ${filter-out -L% -B%,${shell echo $(CC) | sed -e 's%\(-isystem\|-iwithprefixbefore\) *[^ ]*\( \|$$\)% %g'}}
-endif
-# FIXME: Which is it, CC or CC_FOR_TARGET?
-CC_FOR_TARGET = $(CC)
-AS_FOR_TARGET = $(AS)
-CFLAGS = @CFLAGS@
-CXXFLAGS = @CXXFLAGS@
-
-# compiling with Cygwin?
-NO_CYGWIN := @NO_CYGWIN@
-ifdef NO_CYGWIN
-override CC := ${NO_CYGWIN} $(firstword ${CC})
-endif
-
-# Either crtdll (CRT_ID 1) or msvcrt (CRT_ID 2).
-RUNTIME = @RUNTIME@
-CRT_ID = @CRT_ID@
-
-# Needed for threading dll.
-THREAD_DLL = @THREAD_DLL@
-THREAD_DLL_VERSION = 10
-THREAD_DLL_NAME = $(THREAD_DLL)$(THREAD_DLL_VERSION).dll
-
-# Various libraries.
-LIBM_A=@LIBM_A@
-
-W32API_INCLUDE = @W32API_INCLUDE@
-INCLUDES = -I$(srcdir)/include \
- -I$(srcdir)/../include \
- -nostdinc \
- -iwithprefixbefore include
-ALL_CFLAGS = $(CFLAGS) $(INCLUDES) $(W32API_INCLUDE)
-ALL_CXXFLAGS = $(CXXFLAGS) $(INCLUDES) -nostdinc++ $(W32API_INCLUDE)
-
-AS = @AS@
-AR = @AR@
-LD = @LD@
-AR_FLAGS = rcv
-RANLIB = @RANLIB@
-DLLTOOL = @DLLTOOL@
-DLLTOOLFLAGS =
-DLLTOOL_FOR_TARGET = $(DLLTOOL)
-DLLTOOL_FLAGS = --as $(AS_FOR_TARGET)
-DLLWRAP = @DLLWRAP@
-DLLWRAP_FOR_TARGET = $(DLLWRAP)
-DLLWRAP_FLAGS = --dlltool $(DLLTOOL) --as $(AS) --driver-name $(CC)
-OBJCOPY = @OBJCOPY@
-NM = @NM@
-
-TAR = tar
-TARFLAGS = z
-TARFILEEXT = .tar.gz
-
-SUBDIRS := @subdirs@
-
-FLAGS_TO_PASS:=\
- AS="$(AS)" \
- CC="$(CC)" \
- CFLAGS="$(CFLAGS) $(CFLAGS_COMMON) $(CFLAGS_CONFIG)" \
- CXXFLAGS="$(CXXFLAGS) $(CFLAGS_COMMON) $(CFLAGS_CONFIG)" \
- EXE_LDFLAGS="$(EXE_LDFLAGS)" \
- AR="$(AR)" \
- RANLIB="$(RANLIB)" \
- LD="$(LD)" \
- DLLTOOL="$(DLLTOOL)" \
- exec_prefix="$(exec_prefix)" \
- bindir="$(bindir)" \
- libdir="$(libdir)" \
- tooldir="$(tooldir)" \
- datadir="$(datadir)" \
- infodir="$(infodir)" \
- includedir="$(includedir)" \
- inst_bindir="$(inst_bindir)" \
- inst_includedir="$(inst_includedir)" \
- inst_libdir="$(inst_libdir)" \
- inst_docdir="$(inst_docdir)" \
- prefix="$(prefix)" \
- target_alias="$(target_alias)" \
- TAR="$(TAR)" \
- TARFLAGS="$(TARFLAGS)" \
- TARFILEEXT="$(TARFILEEXT)"
-
-CRT0S = crt1.o dllcrt1.o crt2.o dllcrt2.o CRT_noglob.o crtmt.o crtst.o \
- CRT_fp8.o CRT_fp10.o txtmode.o binmode.o
-MINGW_OBJS = CRTglob.o CRTfmode.o CRTinit.o dllmain.o gccmain.o \
- main.o crtst.o mthr_stub.o CRT_fp10.o txtmode.o \
- pseudo-reloc.o pseudo-reloc-list.o cpu_features.o
-
-MOLD_OBJS = isascii.o iscsym.o iscsymf.o toascii.o \
- strcasecmp.o strncasecmp.o wcscmpi.o
-
-LIBS = libcrtdll.a \
- libmsvcrt.a libmsvcrtd.a \
- libmsvcr70.a libmsvcr70d.a \
- libmsvcr71.a libmsvcr71d.a \
- libmsvcr80.a libmsvcr80d.a \
- libmsvcr90.a libmsvcr90d.a \
- libmingw32.a \
- libcoldname.a \
- libmoldname.a libmoldnamed.a \
- libmoldname70.a libmoldname70d.a \
- libmoldname71.a libmoldname71d.a \
- libmoldname80.a libmoldname80d.a \
- libmoldname90.a libmoldname90d.a \
- $(LIBM_A) \
- libmingwthrd.a
-
-DLLS = $(THREAD_DLL_NAME)
-
-INSTDOCS = CONTRIBUTORS \
- DISCLAIMER \
- README
-
-SRCDIST_FILES = CRT_noglob.c CRTfmode.c CRTglob.c CRTinit.c ChangeLog \
-Makefile.in README TODO config.guess config.sub configure configure.in \
-aclocal.m4 crt1.c crtdll.def crtmt.c crtst.c dllcrt1.c dllmain.c \
-gccmain.c init.c install-sh jamfile main.c mkinstalldirs \
-moldname.def.in msvcrt.def.in ofmt_stub.s \
-mthr.c mthr_init.c mthr_stub.c readme.txt \
-isascii.c iscsym.c iscsymf.c toascii.c \
-strcasecmp.c strncasecmp.c wcscmpi.c \
-CRT_fp8.c CRT_fp10.c test_headers.c txtmode.c binmode.c pseudo-reloc.c \
-pseudo-reloc-list.c cpu_features.c cpu_features.h \
-DISCLAIMER CONTRIBUTORS
-
-
-all_dlls_host = @all_dlls_host@
-install_dlls_host = @install_dlls_host@
-
-all: $(CRT0S) $(LIBS) $(all_dlls_host)
- @$(MAKE) subdirs DO=$@ $(FLAGS_TO_PASS)
-
-all_dlls_host: $(DLLS)
-
-install_dlls_host:
- for i in $(DLLS); do \
- $(INSTALL_PROGRAM) $$i $(inst_bindir)/$$i ; \
- done
-
-_libm_dummy.o:
- rm -f _libm_dummy.c
- echo "static int __mingw_libm_dummy;" > _libm_dummy.c
- $(CC) -c $(ALL_CFLAGS) _libm_dummy.c
- rm -f _libm_dummy.c
-
-libm.a: _libm_dummy.o
- $(AR) rc $@ _libm_dummy.o
- $(RANLIB) $@
-
-libmingwthrd.a: crtmt.o mingwthrd.def
- $(DLLTOOL) $(DLLTOOL_FLAGS) --dllname $(THREAD_DLL_NAME) \
- --def mingwthrd.def --output-lib $@
- $(AR) $(ARFLAGS) $@ crtmt.o
- $(RANLIB) $@
-
-DLL_OFILES = mthr.o mthr_init.o
-DLL_CC_STUFF = -B./ -shared $(MNO_CYGWIN) -Wl,--image-base,0x6FBC0000 \
- -Wl,--entry,_DllMainCRTStartup@12 \
- $(DLL_OFILES) mingwthrd.def \
- -Lmingwex
-
-$(THREAD_DLL_NAME) mingwthrd.def: $(DLL_OFILES) Makefile $(SUBDIRS)
- $(DLLTOOL) --as $(AS) --output-def mingwthrd.def $(DLL_OFILES)
- $(CC) $(DLL_CC_STUFF) -o $(THREAD_DLL_NAME)
-
-libmingw32.a: $(MINGW_OBJS)
- $(AR) rc $@ $(MINGW_OBJS)
- $(RANLIB) $@
-
-msvcrt.def msvcrtd.def \
-msvcr70.def msvcr70d.def \
-msvcr71.def msvcr71d.def \
-msvcr80.def msvcr80d.def \
-msvcr90.def msvcr90d.def \
-: msvcrt.def.in
- $(CC) -DRUNTIME=$(basename $(notdir $@)) \
- -D__$(basename $(notdir $@))__=1 \
- -D__MSVCRT__ -C -E -P \
- -xc-header $? > $@
-
-moldname-crtdll.def: moldname.def.in
- $(CC) -DRUNTIME=crtdll \
- -D__FILENAME__=moldname-crtdll.def \
- -D__CRTDLL__ -C -E -P \
- -xc-header $? > $@
-
-moldname-msvcrt.def: moldname.def.in
- $(CC) -DRUNTIME=msvcrt \
- -D__FILENAME__=moldname-msvcrt.def \
- -D__MSVCRT__ -C -E -P \
- -xc-header $? > $@
-
-libcoldname.a: moldname-crtdll.def $(MOLD_OBJS)
- $(DLLTOOL) --as $(AS) -k -U \
- --dllname crtdll.dll \
- --def moldname-crtdll.def \
- --output-lib $@
- $(AR) rc $@ $(MOLD_OBJS)
- $(RANLIB) $@
-
-libmoldname.a libmoldnamed.a: moldname-msvcrt.def $(MOLD_OBJS)
- $(DLLTOOL) --as $(AS) -k -U \
- --dllname msvcrt$(@:libmoldname%a=%)dll \
- --def moldname-msvcrt.def \
- --output-lib $@
- $(AR) rc $@ $(MOLD_OBJS)
- $(RANLIB) $@
-
-libmoldname70.a libmoldname70d.a \
-libmoldname71.a libmoldname71d.a \
-libmoldname80.a libmoldname80d.a \
-libmoldname90.a libmoldname90d.a: moldname-msvcrt.def $(MOLD_OBJS)
- $(DLLTOOL) --as $(AS) -k -U \
- --dllname msvcr$(@:libmoldname%a=%)dll \
- --def moldname-msvcrt.def \
- --output-lib $@
- $(AR) rc $@ $(MOLD_OBJS)
- $(RANLIB) $@
-
-# The special rules are necessary.
-crt1.o dllcrt1.o:
- $(CC) -c -D__CRTDLL__ -U__MSVCRT__ $(ALL_CFLAGS) $< -o $@
-
-crt2.o dllcrt2.o:
- $(CC) -c -D__MSVCRT__ -U__CRTDLL__ $(ALL_CFLAGS) $< -o $@
-
-check: check-headers
-
-TEST_H_OPTIONS = $(ALL_CFLAGS) -Wall -W -Wsystem-headers -c \
- $(srcdir)/test_headers.c -o test_headers.o
-
-.PHONY: check-headers
-check-headers: force
- @echo "Testing runtime headers..."
- @for lang in c c++ objective-c ; do \
- echo "$$lang ..."; \
- $(CC) -x$$lang $(TEST_H_OPTIONS) ; \
- echo "$$lang -ansi"; \
- $(CC) -x$$lang -ansi $(TEST_H_OPTIONS) ; \
- done
-# specify -std=xx only for C
- @for std in gnu89 gnu99 c89 c99 ; do \
- echo "std = $$std"; \
- $(CC) -std=$$std $(TEST_H_OPTIONS) ; \
- done
-
- @rm -f test_headers.o
-
-clean:
- -rm -f *.o *.a *~ core a.out mingwthrd.def mingwthrd.base mingwthrd.exp
- -rm -f $(THREAD_DLL_NAME) mingwthrd_dummy.exe
- -rm -f msvcr*.def moldname-*.def
- @$(MAKE) subdirs DO=$@ $(FLAGS_TO_PASS)
-
-distclean: clean
- @$(MAKE) subdirs DO=$@ $(FLAGS_TO_PASS)
- -rm -f config.cache config.status config.log
- -rm -f Makefile
-
-ifdef SNAPDATE
- distdir=$(PACKAGE)-$(VERSION)-$(SNAPDATE)
-else
- ifneq (,$(findstring cygwin, $(target_alias)))
- distdir=$(PACKAGE)-$(VERSION)-$(CYGRELEASE)
- else
- distdir=$(PACKAGE)-$(VERSION)-$(host_os)
- endif
-endif
-
-ifneq (,$(findstring cygwin, $(target_alias)))
- TARFLAGS = j
- TARFILEEXT = .tar.bz2
- dist_prefix = $(conf_prefix)
-endif
-
-dist: srcdist bindist
-
-srcdist:
- rm -rf $(distdir)
- mkdir $(distdir)
- chmod 755 $(distdir)
- for i in $(SRCDIST_FILES); do \
- cp -p $(srcdir)/$$i $(distdir)/$$i ; \
- done
- for i in $(SUBDIRS); do \
- (cd $$i; $(MAKE) distdir=../$(distdir) dist); \
- done
-#FIXME this needs to be done with SUBDIRS and Makefiles.
-#
-# Maybe, but this is simpler, and adequate for now!
-# However, as more manpages are added, spanning multiple sections,
-# we'll probably need a separate Makefile to organise them.
-#
- mkdir $(distdir)/include
- mkdir $(distdir)/include/sys
- cp $(srcdir)/include/*.h $(distdir)/include/
- cp $(srcdir)/include/sys/*.h $(distdir)/include/sys/
- mkdir $(distdir)/man
- cp $(srcdir)/man/*.man $(distdir)/man/
-#
-#end FIXME
- rm -f $(distdir)-src.tar.gz
- $(TAR) $(TARFLAGS)cf $(distdir)-src$(TARFILEEXT) $(distdir)
-
-# Binary package structure is determined according to the
-# preferred package name assigned at configure time...
-#
-bindist: bindist-$(PACKAGE)
-
-# The directory structure is common to both package styles...
-#
-bindist-common:
- rm -rf $(distdir)
- mkdir $(distdir)
- chmod 755 $(distdir)
- $(MAKE) install prefix=$(shell pwd)/$(distdir)$(dist_prefix)
- rm -f $(distdir).tar.gz
-
-# Current MinGW distributions prefer separate `dev' and `dll' bundles,
-# and use the abbreviated `mingwrt' form for the package name...
-#
-DEVDIST_FILES = * --exclude=bin
-DLLDIST_FILES = bin/*.dll doc/*
-#
-bindist-mingwrt: bindist-common
- cd $(distdir); \
- $(TAR) $(TARFLAGS)cf ../$(distdir)-dev$(TARFILEEXT) $(DEVDIST_FILES); \
- $(TAR) $(TARFLAGS)cf ../$(distdir)-dll$(TARFILEEXT) $(DLLDIST_FILES)
- rm -rf $(distdir)
-
-# However, Cygwin maintainers continue to prefer a composite package,
-# retaining the older `mingw-runtime' naming convention...
-#
-BINDIST_FILES = *
-#
-bindist-mingw-runtime: bindist-common
- cd $(distdir); \
- $(TAR) $(TARFLAGS)cf ../$(distdir)$(TARFILEEXT) $(BINDIST_FILES)
- rm -rf $(distdir)
-
-snapshot:
- make dist SNAPDATE=$(shell date '+%Y%m%d')
-
-info:
-
-info-html:
-
-install-info: info
-
-install-dirs:
- $(mkinstalldirs) $(inst_bindir)
- $(mkinstalldirs) $(inst_includedir)
- $(mkinstalldirs) $(inst_libdir)
- $(mkinstalldirs) $(inst_docdir)
- $(mkinstalldirs) $(mandir)/man$(mansection)
-
-install: all install-dirs $(install_dlls_host)
- for i in $(LIBS); do \
- $(INSTALL_DATA) $$i $(inst_libdir)/$$i ; \
- done
- for i in $(CRT0S); do \
- $(INSTALL_DATA) $$i $(inst_libdir)/$$i ; \
- done
- for i in $(INSTDOCS); do \
- $(INSTALL_DATA) $(srcdir)/$$i $(inst_docdir)/$$i ; \
- done
- for sub in . sys ; do \
- dstdir=$(inst_includedir)/$$sub ; \
- $(mkinstalldirs) $$dstdir ; \
- for i in $(srcdir)/include/$$sub/*.h ; do \
- $(INSTALL_DATA) $$i $$dstdir/`basename $$i` ; \
- done ; \
- done
-#
-# This provisional hack installs the only manpage we have at present...
-# It simply CANNOT suffice, when we have more manpages to ship.
-#
- $(mkinstalldirs) $(mandir)/man$(mansection)
- $(INSTALL_DATA) $(srcdir)/man/dirname.man $(mandir)/man$(mansection)/`\
- echo dirname.man|sed '$(manpage_transform);s,man$$,$(mansection),'`
- $(INSTALL_DATA) $(srcdir)/man/dirname.man $(mandir)/man$(mansection)/`\
- echo basename.man|sed '$(manpage_transform);s,man$$,$(mansection),'`
-#
-# End provisional hack.
-#
- @$(MAKE) subdirs DO=$@ $(FLAGS_TO_PASS)
-
-subdirs: $(SUBDIRS)
- @true
-
-# The . is here because SUBDIRS may be empty
-
-. $(SUBDIRS): force
- @if [ -d ./$@ ]; then \
- echo "Making $(DO) in $@..." ; \
- if (rootme=`pwd`/ ; export rootme ; \
- rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \
- cd ./$@; \
- $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
- else exit 1 ; \
- fi ; \
- else true ; \
- fi
-
-force:
-
-#
-# Dependencies
-#
-libcrtdll.a: crtdll.def
-libmsvcrt.a: msvcrt.def
-libmsvcrtd.a: msvcrtd.def
-CRT_noglob.o: CRT_noglob.c
-CRTfmode.o: CRTfmode.c
-CRTglob.o: CRTglob.c
-CRTinit.o: CRTinit.c
-crt1.o: crt1.c init.c
-crt2.o: crt1.c init.c
-crtmt.o: crtmt.c
-crtst.o: crtst.c
-ctype_old.o: ctype_old.c
-dllcrt1.o: dllcrt1.c
-dllcrt2.o: dllcrt1.c
-dllmain.o: dllmain.c
-main.o: main.c
-oldnames.o: oldnames.c
-string_old.o: string_old.c
-CRT_fp8.o: CRT_fp8.c
-CRT_fp10.o: CRT_fp10.c
-
-
-Makefile: Makefile.in config.status configure
- $(SHELL) config.status
-
-config.status: configure
- $(SHELL) config.status --recheck
-
-.SUFFIXES: .y $(SUFFIXES) .cc .def .a
-
-sym_prefix = __msvcrt
-
-NM_LOOKUP = $(NM) $@ | sed -n \
- -e '/:$$/h;/^[0-7][0-7]* *T */{s///;H;g;s/\n//p' \
- -e '}' | sed -n 's/:_'"$$key"'$$//p'
-
-MINGW_REPL_FUNCS = printf fprintf sprintf vprintf vfprintf vsprintf
-
-lib%.a: %.def
- $(DLLTOOL) --as=$(AS) -k --dllname $*.dll --output-lib $@ --def $<
- for key in $(MINGW_REPL_FUNCS); do \
- src=`$(NM_LOOKUP)`; \
- if test -n "$$src"; then \
- dst=`echo "$$src" | sed 's/0/4/'`; repl="$$repl $$dst"; \
- tmpfiles="$$tmpfiles $$src $$dst"; \
- $(AR) x $@ $$src; \
- $(OBJCOPY) --redefine-sym _$$key=_$(sym_prefix)_$$key \
- --redefine-sym __imp__$$key=__imp__$(sym_prefix)_$$key \
- $$src $$dst; \
- fi; done; \
- test `key=_get_output_format; $(NM_LOOKUP)` || \
- repl="$$repl ofmt_stub.o"; \
- test -n "$$repl" && $(AR) rcs $@ $$repl; \
- $(RM) $$tmpfiles
-
-libmsvcrt.a libmsvcrtd.a: ofmt_stub.o
-libmsvcr70.a libmsvcr70d.a: ofmt_stub.o
-libmsvcr71.a libmsvcr71d.a: ofmt_stub.o
-libcrtdll.a libcrtdlld.a: ofmt_stub.o
-
-.c.o:
- $(CC) -c $(ALL_CFLAGS) $< -o $@
-
diff --git a/winsup/mingw/README b/winsup/mingw/README
deleted file mode 100644
index bcde144..0000000
--- a/winsup/mingw/README
+++ /dev/null
@@ -1,10 +0,0 @@
- Free Microsoft C Runtime and import library definitions
-
- Maintained by MinGW Developers
- Send bug reports and questions to MinGW-users@lists.sourceforge.net
- URL: http://www.mingw.org
-
-A historical readme.txt exists and is distributed for your edification. The
-references within may or may not be correct. Please do not rely on them. See
-http://www.mingw.org for a list of valid references.
-
diff --git a/winsup/mingw/TODO b/winsup/mingw/TODO
deleted file mode 100644
index 60f6bc2..0000000
--- a/winsup/mingw/TODO
+++ /dev/null
@@ -1 +0,0 @@
-Finish the README.
diff --git a/winsup/mingw/aclocal.m4 b/winsup/mingw/aclocal.m4
deleted file mode 100644
index 77786d6..0000000
--- a/winsup/mingw/aclocal.m4
+++ /dev/null
@@ -1,121 +0,0 @@
-# aclocal.m4 for MinGW Runtime package. -*- Autoconf -*-
-#
-# This provides configure definitions used by all the winsup
-# configure.in files.
-
-# MINGW_AC_CONFIG_SRCDIR( VERSION_TAG, UNIQUE_FILE )
-# --------------------------------------------------
-# Wrapper for AC_CONFIG_SRCDIR; in addition to checking for a
-# unique file reference within the source tree, it resolves the
-# definition for PACKAGE_VERSION, based on a tagged definition
-# within that file.
-#
-AC_DEFUN([MINGW_AC_CONFIG_SRCDIR],
-[AC_CONFIG_SRCDIR([$2])
- AC_MSG_CHECKING([package version])
- PACKAGE_VERSION=`awk '$[2] == "'"$1"'" { print $[3] }' ${srcdir}/$2`
- AC_MSG_RESULT([$PACKAGE_VERSION])dnl
-]) #MINGW_AC_CONFIG_SRCDIR
-
-# The following is copied from `no-executables.m4', in the top
-# `src/config' directory.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-# GCC_NO_EXECUTABLES
-# ------------------
-# FIXME: The GCC team has specific needs which the current Autoconf
-# framework cannot solve elegantly. This macro implements a dirty
-# hack until Autoconf is able to provide the services its users
-# need.
-#
-# Several of the support libraries that are often built with GCC can't
-# assume the tool-chain is already capable of linking a program: the
-# compiler often expects to be able to link with some of such
-# libraries.
-#
-# In several of these libraries, workarounds have been introduced to
-# avoid the AC_PROG_CC_WORKS test, that would just abort their
-# configuration. The introduction of AC_EXEEXT, enabled either by
-# libtool or by CVS autoconf, have just made matters worse.
-#
-# Unlike the previous AC_NO_EXECUTABLES, this test does not
-# disable link tests at autoconf time, but at configure time.
-# This allows AC_NO_EXECUTABLES to be invoked conditionally.
-AC_DEFUN_ONCE([GCC_NO_EXECUTABLES],
-[m4_divert_push([KILL])
-
-AC_BEFORE([$0], [_AC_COMPILER_EXEEXT])
-AC_BEFORE([$0], [AC_LINK_IFELSE])
-
-m4_define([_AC_COMPILER_EXEEXT],
-AC_LANG_CONFTEST([AC_LANG_PROGRAM()])
-# FIXME: Cleanup?
-AS_IF([AC_TRY_EVAL(ac_link)], [gcc_no_link=no], [gcc_no_link=yes])
-if test x$gcc_no_link = xyes; then
- # Setting cross_compile will disable run tests; it will
- # also disable AC_CHECK_FILE but that's generally
- # correct if we can't link.
- cross_compiling=yes
- EXEEXT=
-else
- m4_defn([_AC_COMPILER_EXEEXT])dnl
-fi
-)
-
-m4_define([AC_LINK_IFELSE],
-if test x$gcc_no_link = xyes; then
- AC_MSG_ERROR([Link tests are not allowed after [[$0]].])
-fi
-m4_defn([AC_LINK_IFELSE]))
-
-dnl This is a shame. We have to provide a default for some link tests,
-dnl similar to the default for run tests.
-m4_define([AC_FUNC_MMAP],
-if test x$gcc_no_link = xyes; then
- if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
- ac_cv_func_mmap_fixed_mapped=no
- fi
-fi
-if test "x${ac_cv_func_mmap_fixed_mapped}" != xno; then
- m4_defn([AC_FUNC_MMAP])
-fi)
-
-m4_divert_pop()dnl
-])# GCC_NO_EXECUTABLES
-
-
-# MINGW_AC_MANPAGE_TRANSFORM
-# --------------------------
-# Provide support for specifying a manpage name transform.
-# This allows e.g. Cygwin to add a `mingw-' prefix to MinGW specific
-# manpages, when installing as a Cygwin subsystem.
-#
-# Activated by `--enable-mingw-manpage-transform[=SED-SCRIPT]', the
-# default is disabled, (i.e. no transform). If enabled, without any
-# SED-SCRIPT specification, the default `mingw-' prefix is added.
-#
-AC_DEFUN([MINGW_AC_MANPAGE_TRANSFORM],
-[AC_ARG_ENABLE([mingw-manpage-transform],
-[AS_HELP_STRING([--enable-mingw-manpage-transform@<:@=SED-SCRIPT@:>@],
- [apply SED-SCRIPT @<:@s/^/mingw-/@:>@ to installed manpage names])]
-[AS_HELP_STRING([--disable-mingw-manpage-transform],
- [@<:@DEFAULT@:>@ don't transform installed manpage names])],
- [case ${enableval} in
- yes) mingw_manpage_transform='s,^,mingw-,' ;;
- no) mingw_manpage_transform='s,x,x,' ;;
- *) mingw_manpage_transform=${enableval} ;;
- esac])
- AC_SUBST([mingw_manpage_transform],[${mingw_manpage_transform-'s,x,x,'}])dnl
-])# MINGW_AC_MANPAGE_TRANSFORM
-
-# $RCSfile$: end of file: vim: ft=config
diff --git a/winsup/mingw/binmode.c b/winsup/mingw/binmode.c
deleted file mode 100644
index 1cc3ded..0000000
--- a/winsup/mingw/binmode.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <fcntl.h>
-
-/* Set default file mode to binary */
-
-int _fmode = _O_BINARY;
diff --git a/winsup/mingw/config.guess b/winsup/mingw/config.guess
deleted file mode 100755
index 0e30d56..0000000
--- a/winsup/mingw/config.guess
+++ /dev/null
@@ -1,1407 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-
-timestamp='2003-07-02'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit 0 ;;
- --version | -v )
- echo "$version" ; exit 0 ;;
- --help | --h* | -h )
- echo "$usage"; exit 0 ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help" >&2
- exit 1 ;;
- * )
- break ;;
- esac
-done
-
-if test $# != 0; then
- echo "$me: too many arguments$help" >&2
- exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > $dummy.c ;
- for c in cc gcc c89 c99 ; do
- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
- CC_FOR_BUILD="$c"; break ;
- fi ;
- done ;
- if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found ;
- fi
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
- PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
- *:NetBSD:*:*)
- # NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
- # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
- # switched to ELF, *-*-netbsd* would select the old
- # object file format. This provides both forward
- # compatibility and a consistent mechanism for selecting the
- # object file format.
- #
- # Note: NetBSD doesn't particularly care about the vendor
- # portion of the name. We always set it to "unknown".
- sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
- case "${UNAME_MACHINE_ARCH}" in
- armeb) machine=armeb-unknown ;;
- arm*) machine=arm-unknown ;;
- sh3el) machine=shl-unknown ;;
- sh3eb) machine=sh-unknown ;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
- esac
- # The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
- case "${UNAME_MACHINE_ARCH}" in
- arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval $set_cc_for_build
- if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep __ELF__ >/dev/null
- then
- # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
- # Return netbsd for either. FIX?
- os=netbsd
- else
- os=netbsdelf
- fi
- ;;
- *)
- os=netbsd
- ;;
- esac
- # The OS release
- # Debian GNU/NetBSD machines have a different userland, and
- # thus, need a distinct triplet. However, they do not need
- # kernel version information, so it can be replaced with a
- # suitable tag, in the style of linux-gnu.
- case "${UNAME_VERSION}" in
- Debian*)
- release='-gnu'
- ;;
- *)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
- ;;
- esac
- # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
- # contains redundant information, the shorter form:
- # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
- exit 0 ;;
- amiga:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- arc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- hp300:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mac68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- macppc:OpenBSD:*:*)
- echo powerpc-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvme68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvme88k:OpenBSD:*:*)
- echo m88k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvmeppc:OpenBSD:*:*)
- echo powerpc-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- pmax:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- sgi:OpenBSD:*:*)
- echo mipseb-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- sun3:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- wgrisc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- *:OpenBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- alpha:OSF1:*:*)
- if test $UNAME_RELEASE = "V4.0"; then
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- fi
- # According to Compaq, /usr/sbin/psrinfo has been available on
- # OSF/1 and Tru64 systems produced since 1995. I hope that
- # covers most systems running today. This code pipes the CPU
- # types through head -n 1, so we only detect the type of CPU 0.
- ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
- case "$ALPHA_CPU_TYPE" in
- "EV4 (21064)")
- UNAME_MACHINE="alpha" ;;
- "EV4.5 (21064)")
- UNAME_MACHINE="alpha" ;;
- "LCA4 (21066/21068)")
- UNAME_MACHINE="alpha" ;;
- "EV5 (21164)")
- UNAME_MACHINE="alphaev5" ;;
- "EV5.6 (21164A)")
- UNAME_MACHINE="alphaev56" ;;
- "EV5.6 (21164PC)")
- UNAME_MACHINE="alphapca56" ;;
- "EV5.7 (21164PC)")
- UNAME_MACHINE="alphapca57" ;;
- "EV6 (21264)")
- UNAME_MACHINE="alphaev6" ;;
- "EV6.7 (21264A)")
- UNAME_MACHINE="alphaev67" ;;
- "EV6.8CB (21264C)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8AL (21264B)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8CX (21264D)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.9A (21264/EV69A)")
- UNAME_MACHINE="alphaev69" ;;
- "EV7 (21364)")
- UNAME_MACHINE="alphaev7" ;;
- "EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
- esac
- # A Vn.n version is a released version.
- # A Tn.n version is a released field test version.
- # A Xn.n version is an unreleased experimental baselevel.
- # 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- exit 0 ;;
- Alpha*:OpenVMS:*:*)
- echo alpha-hp-vms
- exit 0 ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit 0 ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit 0 ;;
- Amiga*:UNIX_System_V:4.0:*)
- echo m68k-unknown-sysv4
- exit 0;;
- *:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
- exit 0 ;;
- *:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-morphos
- exit 0 ;;
- *:OS/390:*:*)
- echo i370-ibm-openedition
- exit 0 ;;
- arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
- exit 0;;
- SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
- echo hppa1.1-hitachi-hiuxmpp
- exit 0;;
- Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
- # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
- if test "`(/bin/universe) 2>/dev/null`" = att ; then
- echo pyramid-pyramid-sysv3
- else
- echo pyramid-pyramid-bsd
- fi
- exit 0 ;;
- NILE*:*:*:dcosx)
- echo pyramid-pyramid-svr4
- exit 0 ;;
- DRS?6000:unix:4.0:6*)
- echo sparc-icl-nx6
- exit 0 ;;
- DRS?6000:UNIX_SV:4.2*:7*)
- case `/usr/bin/uname -p` in
- sparc) echo sparc-icl-nx7 && exit 0 ;;
- esac ;;
- sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
- sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
- i86pc:SunOS:5.*:*)
- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
- sun4*:SunOS:6*:*)
- # According to config.sub, this is the proper way to canonicalize
- # SunOS6. Hard to guess exactly what SunOS6 will be like, but
- # it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
- sun4*:SunOS:*:*)
- case "`/usr/bin/arch -k`" in
- Series*|S4*)
- UNAME_RELEASE=`uname -v`
- ;;
- esac
- # Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit 0 ;;
- sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
- exit 0 ;;
- sun*:*:4.2BSD:*)
- UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
- case "`/bin/arch`" in
- sun3)
- echo m68k-sun-sunos${UNAME_RELEASE}
- ;;
- sun4)
- echo sparc-sun-sunos${UNAME_RELEASE}
- ;;
- esac
- exit 0 ;;
- aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
- exit 0 ;;
- # The situation for MiNT is a little confusing. The machine name
- # can be virtually everything (everything which is not
- # "atarist" or "atariste" at least should have a processor
- # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
- # to the lowercase version "mint" (or "freemint"). Finally
- # the system name "TOS" denotes a system which is actually not
- # MiNT. But MiNT is downward compatible to TOS, so this should
- # be no problem.
- atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
- atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
- *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
- milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit 0 ;;
- hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit 0 ;;
- *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit 0 ;;
- powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
- exit 0 ;;
- RISC*:Mach:*:*)
- echo mips-dec-mach_bsd4.3
- exit 0 ;;
- RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix${UNAME_RELEASE}
- exit 0 ;;
- VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
- exit 0 ;;
- 2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix${UNAME_RELEASE}
- exit 0 ;;
- mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
- #if defined (host_mips) && defined (MIPSEB)
- #if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
- #endif
- #endif
- exit (-1);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c \
- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
- && exit 0
- echo mips-mips-riscos${UNAME_RELEASE}
- exit 0 ;;
- Motorola:PowerMAX_OS:*:*)
- echo powerpc-motorola-powermax
- exit 0 ;;
- Motorola:*:4.3:PL8-*)
- echo powerpc-harris-powermax
- exit 0 ;;
- Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
- echo powerpc-harris-powermax
- exit 0 ;;
- Night_Hawk:Power_UNIX:*:*)
- echo powerpc-harris-powerunix
- exit 0 ;;
- m88k:CX/UX:7*:*)
- echo m88k-harris-cxux7
- exit 0 ;;
- m88k:*:4*:R4*)
- echo m88k-motorola-sysv4
- exit 0 ;;
- m88k:*:3*:R3*)
- echo m88k-motorola-sysv3
- exit 0 ;;
- AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
- then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
- [ ${TARGET_BINARY_INTERFACE}x = x ]
- then
- echo m88k-dg-dgux${UNAME_RELEASE}
- else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
- fi
- else
- echo i586-dg-dgux${UNAME_RELEASE}
- fi
- exit 0 ;;
- M88*:DolphinOS:*:*) # DolphinOS (SVR3)
- echo m88k-dolphin-sysv3
- exit 0 ;;
- M88*:*:R3*:*)
- # Delta 88k system running SVR3
- echo m88k-motorola-sysv3
- exit 0 ;;
- XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
- echo m88k-tektronix-sysv3
- exit 0 ;;
- Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
- echo m68k-tektronix-bsd
- exit 0 ;;
- *:IRIX*:*:*)
- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit 0 ;;
- ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
- i*86:AIX:*:*)
- echo i386-ibm-aix
- exit 0 ;;
- ia64:AIX:*:*)
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit 0 ;;
- *:AIX:2:3)
- if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <sys/systemcfg.h>
-
- main()
- {
- if (!__power_pc())
- exit(1);
- puts("powerpc-ibm-aix3.2.5");
- exit(0);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
- echo rs6000-ibm-aix3.2.5
- elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
- echo rs6000-ibm-aix3.2.4
- else
- echo rs6000-ibm-aix3.2
- fi
- exit 0 ;;
- *:AIX:*:[45])
- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
- IBM_ARCH=rs6000
- else
- IBM_ARCH=powerpc
- fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit 0 ;;
- *:AIX:*:*)
- echo rs6000-ibm-aix
- exit 0 ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
- echo romp-ibm-bsd4.4
- exit 0 ;;
- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit 0 ;; # report: romp-ibm BSD 4.3
- *:BOSX:*:*)
- echo rs6000-bull-bosx
- exit 0 ;;
- DPX/2?00:B.O.S.:*:*)
- echo m68k-bull-sysv3
- exit 0 ;;
- 9000/[34]??:4.3bsd:1.*:*)
- echo m68k-hp-bsd
- exit 0 ;;
- hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
- echo m68k-hp-bsd4.4
- exit 0 ;;
- 9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
- 9000/[678][0-9][0-9])
- if [ -x /usr/bin/getconf ]; then
- sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
- esac ;;
- esac
- fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-
- #define _HPUX_SOURCE
- #include <stdlib.h>
- #include <unistd.h>
-
- int main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
-
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
-EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
- test -z "$HP_ARCH" && HP_ARCH=hppa
- fi ;;
- esac
- if [ ${HP_ARCH} = "hppa2.0w" ]
- then
- # avoid double evaluation of $set_cc_for_build
- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
- then
- HP_ARCH="hppa2.0w"
- else
- HP_ARCH="hppa64"
- fi
- fi
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit 0 ;;
- ia64:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
- exit 0 ;;
- 3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <unistd.h>
- int
- main ()
- {
- long cpu = sysconf (_SC_CPU_VERSION);
- /* The order matters, because CPU_IS_HP_MC68K erroneously returns
- true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
- results, however. */
- if (CPU_IS_PA_RISC (cpu))
- {
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
- default: puts ("hppa-hitachi-hiuxwe2"); break;
- }
- }
- else if (CPU_IS_HP_MC68K (cpu))
- puts ("m68k-hitachi-hiuxwe2");
- else puts ("unknown-hitachi-hiuxwe2");
- exit (0);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
- echo unknown-hitachi-hiuxwe2
- exit 0 ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
- echo hppa1.1-hp-bsd
- exit 0 ;;
- 9000/8??:4.3bsd:*:*)
- echo hppa1.0-hp-bsd
- exit 0 ;;
- *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
- echo hppa1.0-hp-mpeix
- exit 0 ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
- echo hppa1.1-hp-osf
- exit 0 ;;
- hp8??:OSF1:*:*)
- echo hppa1.0-hp-osf
- exit 0 ;;
- i*86:OSF1:*:*)
- if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-unknown-osf1mk
- else
- echo ${UNAME_MACHINE}-unknown-osf1
- fi
- exit 0 ;;
- parisc*:Lites*:*:*)
- echo hppa1.1-hp-lites
- exit 0 ;;
- C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
- echo c1-convex-bsd
- exit 0 ;;
- C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit 0 ;;
- C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
- echo c34-convex-bsd
- exit 0 ;;
- C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
- echo c38-convex-bsd
- exit 0 ;;
- C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
- echo c4-convex-bsd
- exit 0 ;;
- CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
- CRAY*[A-Z]90:*:*:*)
- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
- | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
- -e 's/\.[^.]*$/.X/'
- exit 0 ;;
- CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
- CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
- CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
- *:UNICOS/mp:*:*)
- echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
- F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit 0 ;;
- i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit 0 ;;
- sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit 0 ;;
- *:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit 0 ;;
- *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
- # Determine whether the default compiler uses glibc.
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #if __GLIBC__ >= 2
- LIBC=gnu
- #else
- LIBC=
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
- # GNU/FreeBSD systems have a "k" prefix to indicate we are using
- # FreeBSD's kernel, but not the complete OS.
- case ${LIBC} in gnu) kernel_only='k' ;; esac
- echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
- exit 0 ;;
- i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
- exit 0 ;;
- i*:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
- exit 0 ;;
- i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
- exit 0 ;;
- x86:Interix*:[34]*)
- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
- exit 0 ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
- exit 0 ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
- exit 0 ;;
- i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
- exit 0 ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
- exit 0 ;;
- prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
- *:GNU:*:*)
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit 0 ;;
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
- exit 0 ;;
- arm*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
- cris:Linux:*:*)
- echo cris-axis-linux-gnu
- exit 0 ;;
- ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
- m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
- mips:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips
- #undef mipsel
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mipsel
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips
- #else
- CPU=
- #endif
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
- ;;
- mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips64
- #undef mips64el
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mips64el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips64
- #else
- CPU=
- #endif
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
- ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit 0 ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- exit 0 ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit 0 ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
- esac
- exit 0 ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
- exit 0 ;;
- s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
- exit 0 ;;
- sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
- sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
- sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
- x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
- exit 0 ;;
- i*86:Linux:*:*)
- # The BFD linker knows what the default object file format is, so
- # first see if it will tell us. cd to the root directory to prevent
- # problems with other programs or directories called `ld' in the path.
- # Set LC_ALL=C to ensure ld outputs messages in English.
- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
- | sed -ne '/supported targets:/!d
- s/[ ][ ]*/ /g
- s/.*supported targets: *//
- s/ .*//
- p'`
- case "$ld_supported_targets" in
- elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
- ;;
- a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit 0 ;;
- coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit 0 ;;
- "")
- # Either a pre-BFD a.out linker (linux-gnuoldld) or
- # one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
- exit 0 ;;
- esac
- # Determine whether the default compiler is a.out or elf
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #ifdef __ELF__
- # ifdef __GLIBC__
- # if __GLIBC__ >= 2
- LIBC=gnu
- # else
- LIBC=gnulibc1
- # endif
- # else
- LIBC=gnulibc1
- # endif
- #else
- #ifdef __INTEL_COMPILER
- LIBC=gnu
- #else
- LIBC=gnuaout
- #endif
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
- ;;
- i*86:DYNIX/ptx:4*:*)
- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
- # earlier versions are messed up and put the nodename in both
- # sysname and nodename.
- echo i386-sequent-sysv4
- exit 0 ;;
- i*86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
- # I am not positive that other SVR4 systems won't match this,
- # I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit 0 ;;
- i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
- # is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
- exit 0 ;;
- i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
- exit 0 ;;
- i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
- exit 0 ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
- i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit 0 ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
- if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
- else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
- fi
- exit 0 ;;
- i*86:*:5:[78]*)
- case `/bin/uname -X | grep "^Machine"` in
- *486*) UNAME_MACHINE=i486 ;;
- *Pentium) UNAME_MACHINE=i586 ;;
- *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
- esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
- exit 0 ;;
- i*86:*:3.2:*)
- if test -f /usr/options/cb.name; then
- UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
- elif /bin/uname -X 2>/dev/null >/dev/null ; then
- UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
- (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
- (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
- && UNAME_MACHINE=i586
- (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
- && UNAME_MACHINE=i686
- (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
- && UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
- else
- echo ${UNAME_MACHINE}-pc-sysv32
- fi
- exit 0 ;;
- pc:*:*:*)
- # Left here for compatibility:
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i386.
- echo i386-pc-msdosdjgpp
- exit 0 ;;
- Intel:Mach:3*:*)
- echo i386-pc-mach3
- exit 0 ;;
- paragon:*:*:*)
- echo i860-intel-osf1
- exit 0 ;;
- i860:*:4.*:*) # i860-SVR4
- if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
- else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
- fi
- exit 0 ;;
- mini*:CTIX:SYS*5:*)
- # "miniframe"
- echo m68010-convergent-sysv
- exit 0 ;;
- mc68k:UNIX:SYSTEM5:3.51m)
- echo m68k-convergent-sysv
- exit 0 ;;
- M680?0:D-NIX:5.3:*)
- echo m68k-diab-dnix
- exit 0 ;;
- M68*:*:R3V[567]*:*)
- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
- OS_REL=''
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && echo i486-ncr-sysv4.3${OS_REL} && exit 0
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
- 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && echo i486-ncr-sysv4 && exit 0 ;;
- m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
- mc68030:UNIX_System_V:4.*:*)
- echo m68k-atari-sysv4
- exit 0 ;;
- TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
- rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
- SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
- exit 0 ;;
- RM*:ReliantUNIX-*:*:*)
- echo mips-sni-sysv4
- exit 0 ;;
- RM*:SINIX-*:*:*)
- echo mips-sni-sysv4
- exit 0 ;;
- *:SINIX-*:*:*)
- if uname -p 2>/dev/null >/dev/null ; then
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo ${UNAME_MACHINE}-sni-sysv4
- else
- echo ns32k-sni-sysv
- fi
- exit 0 ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says <Richard.M.Bartel@ccMail.Census.GOV>
- echo i586-unisys-sysv4
- exit 0 ;;
- *:UNIX_System_V:4*:FTX*)
- # From Gerald Hewes <hewes@openmarket.com>.
- # How about differentiating between stratus architectures? -djm
- echo hppa1.1-stratus-sysv4
- exit 0 ;;
- *:*:*:FTX*)
- # From seanf@swdc.stratus.com.
- echo i860-stratus-sysv4
- exit 0 ;;
- *:VOS:*:*)
- # From Paul.Green@stratus.com.
- echo hppa1.1-stratus-vos
- exit 0 ;;
- mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
- exit 0 ;;
- news*:NEWS-OS:6*:*)
- echo mips-sony-newsos6
- exit 0 ;;
- R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
- if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
- else
- echo mips-unknown-sysv${UNAME_RELEASE}
- fi
- exit 0 ;;
- BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
- echo powerpc-be-beos
- exit 0 ;;
- BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
- echo powerpc-apple-beos
- exit 0 ;;
- BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
- echo i586-pc-beos
- exit 0 ;;
- SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
- exit 0 ;;
- SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
- exit 0 ;;
- SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux${UNAME_RELEASE}
- exit 0 ;;
- Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit 0 ;;
- *:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit 0 ;;
- *:Darwin:*:*)
- case `uname -p` in
- *86) UNAME_PROCESSOR=i686 ;;
- powerpc) UNAME_PROCESSOR=powerpc ;;
- esac
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
- exit 0 ;;
- *:procnto*:*:* | *:QNX:[0123456789]*:*)
- UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
- UNAME_PROCESSOR=i386
- UNAME_MACHINE=pc
- fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
- exit 0 ;;
- *:QNX:*:4*)
- echo i386-pc-qnx
- exit 0 ;;
- NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
- exit 0 ;;
- *:NonStop-UX:*:*)
- echo mips-compaq-nonstopux
- exit 0 ;;
- BS2000:POSIX*:*:*)
- echo bs2000-siemens-sysv
- exit 0 ;;
- DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit 0 ;;
- *:Plan9:*:*)
- # "uname -m" is not consistent, so use $cputype instead. 386
- # is converted to i386 for consistency with other x86
- # operating systems.
- if test "$cputype" = "386"; then
- UNAME_MACHINE=i386
- else
- UNAME_MACHINE="$cputype"
- fi
- echo ${UNAME_MACHINE}-unknown-plan9
- exit 0 ;;
- *:TOPS-10:*:*)
- echo pdp10-unknown-tops10
- exit 0 ;;
- *:TENEX:*:*)
- echo pdp10-unknown-tenex
- exit 0 ;;
- KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
- echo pdp10-dec-tops20
- exit 0 ;;
- XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
- echo pdp10-xkl-tops20
- exit 0 ;;
- *:TOPS-20:*:*)
- echo pdp10-unknown-tops20
- exit 0 ;;
- *:ITS:*:*)
- echo pdp10-unknown-its
- exit 0 ;;
- SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
- exit 0 ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
- exit 0 ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit 0 ;;
- c34*)
- echo c34-convex-bsd
- exit 0 ;;
- c38*)
- echo c38-convex-bsd
- exit 0 ;;
- c4*)
- echo c4-convex-bsd
- exit 0 ;;
- esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
- ftp://ftp.gnu.org/pub/gnu/config/
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo = `(hostinfo) 2>/dev/null`
-/bin/universe = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/winsup/mingw/config.sub b/winsup/mingw/config.sub
deleted file mode 100755
index 0bdc334..0000000
--- a/winsup/mingw/config.sub
+++ /dev/null
@@ -1,1504 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-
-timestamp='2003-06-17'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine. It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support. The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
- $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit 0 ;;
- --version | -v )
- echo "$version" ; exit 0 ;;
- --help | --h* | -h )
- echo "$usage"; exit 0 ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help"
- exit 1 ;;
-
- *local*)
- # First pass through any local machine types.
- echo $1
- exit 0;;
-
- * )
- break ;;
- esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
- exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
- exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
- nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
- os=-$maybe_os
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
- ;;
- *)
- basic_machine=`echo $1 | sed 's/-[^-]*$//'`
- if [ $basic_machine != $1 ]
- then os=`echo $1 | sed 's/.*-/-/'`
- else os=; fi
- ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work. We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
- -sun*os*)
- # Prevent following clause from handling this invalid input.
- ;;
- -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
- -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
- -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
- -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis)
- os=
- basic_machine=$1
- ;;
- -sim | -cisco | -oki | -wec | -winbond)
- os=
- basic_machine=$1
- ;;
- -scout)
- ;;
- -wrs)
- os=-vxworks
- basic_machine=$1
- ;;
- -chorusos*)
- os=-chorusos
- basic_machine=$1
- ;;
- -chorusrdb)
- os=-chorusrdb
- basic_machine=$1
- ;;
- -hiux*)
- os=-hiuxwe2
- ;;
- -sco5)
- os=-sco3.2v5
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco4)
- os=-sco3.2v4
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2.[4-9]*)
- os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2v[4-9]*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco*)
- os=-sco3.2v2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -udk*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -isc)
- os=-isc2.2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -clix*)
- basic_machine=clipper-intergraph
- ;;
- -isc*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -lynx*)
- os=-lynxos
- ;;
- -ptx*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
- ;;
- -windowsnt*)
- os=`echo $os | sed -e 's/windowsnt/winnt/'`
- ;;
- -psos*)
- os=-psos
- ;;
- -mint | -mint[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
- # Recognize the basic CPU types without company name.
- # Some are omitted here because they have special meanings below.
- 1750a | 580 \
- | a29k \
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
- | c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
- | fr30 | frv \
- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
- | i370 | i860 | i960 | ia64 \
- | ip2k \
- | m32r | m68000 | m68k | m88k | mcore \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
- | mips64vr | mips64vrel \
- | mips64orion | mips64orionel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
- | msp430 \
- | ns16k | ns32k \
- | openrisc | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
- | pyramid \
- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
- | sh64 | sh64le \
- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
- | strongarm \
- | tahoe | thumb | tic4x | tic80 | tron \
- | v850 | v850e \
- | we32k \
- | x86 | xscale | xstormy16 | xtensa \
- | z8k)
- basic_machine=$basic_machine-unknown
- ;;
- m6811 | m68hc11 | m6812 | m68hc12)
- # Motorola 68HC11/12.
- basic_machine=$basic_machine-unknown
- os=-none
- ;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
- ;;
-
- # We use `pc' rather than `unknown'
- # because (1) that's what they normally are, and
- # (2) the word "unknown" tends to confuse beginning users.
- i*86 | x86_64)
- basic_machine=$basic_machine-pc
- ;;
- # Object if more than one company name word.
- *-*-*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
- # Recognize the basic CPU types with company name.
- 580-* \
- | a29k-* \
- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* \
- | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
- | clipper-* | cydra-* \
- | d10v-* | d30v-* | dlx-* \
- | elxsi-* \
- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
- | h8300-* | h8500-* \
- | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
- | i*86-* | i860-* | i960-* | ia64-* \
- | ip2k-* \
- | m32r-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | mcore-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
- | mips64vr-* | mips64vrel-* \
- | mips64orion-* | mips64orionel-* \
- | mips64vr4100-* | mips64vr4100el-* \
- | mips64vr4300-* | mips64vr4300el-* \
- | mips64vr5000-* | mips64vr5000el-* \
- | mipsisa32-* | mipsisa32el-* \
- | mipsisa32r2-* | mipsisa32r2el-* \
- | mipsisa64-* | mipsisa64el-* \
- | mipsisa64sb1-* | mipsisa64sb1el-* \
- | mipsisa64sr71k-* | mipsisa64sr71kel-* \
- | mipstx39-* | mipstx39el-* \
- | msp430-* \
- | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
- | orion-* \
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
- | pyramid-* \
- | romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
- | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
- | tahoe-* | thumb-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
- | tron-* \
- | v850-* | v850e-* | vax-* \
- | we32k-* \
- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
- | xtensa-* \
- | ymp-* \
- | z8k-*)
- ;;
- # Recognize the various machine names and aliases which stand
- # for a CPU type and a company and sometimes even an OS.
- 386bsd)
- basic_machine=i386-unknown
- os=-bsd
- ;;
- 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
- basic_machine=m68000-att
- ;;
- 3b*)
- basic_machine=we32k-att
- ;;
- a29khif)
- basic_machine=a29k-amd
- os=-udi
- ;;
- adobe68k)
- basic_machine=m68010-adobe
- os=-scout
- ;;
- alliant | fx80)
- basic_machine=fx80-alliant
- ;;
- altos | altos3068)
- basic_machine=m68k-altos
- ;;
- am29k)
- basic_machine=a29k-none
- os=-bsd
- ;;
- amd64)
- basic_machine=x86_64-pc
- ;;
- amdahl)
- basic_machine=580-amdahl
- os=-sysv
- ;;
- amiga | amiga-*)
- basic_machine=m68k-unknown
- ;;
- amigaos | amigados)
- basic_machine=m68k-unknown
- os=-amigaos
- ;;
- amigaunix | amix)
- basic_machine=m68k-unknown
- os=-sysv4
- ;;
- apollo68)
- basic_machine=m68k-apollo
- os=-sysv
- ;;
- apollo68bsd)
- basic_machine=m68k-apollo
- os=-bsd
- ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
- convex-c1)
- basic_machine=c1-convex
- os=-bsd
- ;;
- convex-c2)
- basic_machine=c2-convex
- os=-bsd
- ;;
- convex-c32)
- basic_machine=c32-convex
- os=-bsd
- ;;
- convex-c34)
- basic_machine=c34-convex
- os=-bsd
- ;;
- convex-c38)
- basic_machine=c38-convex
- os=-bsd
- ;;
- cray | j90)
- basic_machine=j90-cray
- os=-unicos
- ;;
- crds | unos)
- basic_machine=m68k-crds
- ;;
- cris | cris-* | etrax*)
- basic_machine=cris-axis
- ;;
- da30 | da30-*)
- basic_machine=m68k-da30
- ;;
- decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
- basic_machine=mips-dec
- ;;
- decsystem10* | dec10*)
- basic_machine=pdp10-dec
- os=-tops10
- ;;
- decsystem20* | dec20*)
- basic_machine=pdp10-dec
- os=-tops20
- ;;
- delta | 3300 | motorola-3300 | motorola-delta \
- | 3300-motorola | delta-motorola)
- basic_machine=m68k-motorola
- ;;
- delta88)
- basic_machine=m88k-motorola
- os=-sysv3
- ;;
- dpx20 | dpx20-*)
- basic_machine=rs6000-bull
- os=-bosx
- ;;
- dpx2* | dpx2*-bull)
- basic_machine=m68k-bull
- os=-sysv3
- ;;
- ebmon29k)
- basic_machine=a29k-amd
- os=-ebmon
- ;;
- elxsi)
- basic_machine=elxsi-elxsi
- os=-bsd
- ;;
- encore | umax | mmax)
- basic_machine=ns32k-encore
- ;;
- es1800 | OSE68k | ose68k | ose | OSE)
- basic_machine=m68k-ericsson
- os=-ose
- ;;
- fx2800)
- basic_machine=i860-alliant
- ;;
- genix)
- basic_machine=ns32k-ns
- ;;
- gmicro)
- basic_machine=tron-gmicro
- os=-sysv
- ;;
- go32)
- basic_machine=i386-pc
- os=-go32
- ;;
- h3050r* | hiux*)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- h8300hms)
- basic_machine=h8300-hitachi
- os=-hms
- ;;
- h8300xray)
- basic_machine=h8300-hitachi
- os=-xray
- ;;
- h8500hms)
- basic_machine=h8500-hitachi
- os=-hms
- ;;
- harris)
- basic_machine=m88k-harris
- os=-sysv3
- ;;
- hp300-*)
- basic_machine=m68k-hp
- ;;
- hp300bsd)
- basic_machine=m68k-hp
- os=-bsd
- ;;
- hp300hpux)
- basic_machine=m68k-hp
- os=-hpux
- ;;
- hp3k9[0-9][0-9] | hp9[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k2[0-9][0-9] | hp9k31[0-9])
- basic_machine=m68000-hp
- ;;
- hp9k3[2-9][0-9])
- basic_machine=m68k-hp
- ;;
- hp9k6[0-9][0-9] | hp6[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k7[0-79][0-9] | hp7[0-79][0-9])
- basic_machine=hppa1.1-hp
- ;;
- hp9k78[0-9] | hp78[0-9])
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][13679] | hp8[0-9][13679])
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][0-9] | hp8[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hppa-next)
- os=-nextstep3
- ;;
- hppaosf)
- basic_machine=hppa1.1-hp
- os=-osf
- ;;
- hppro)
- basic_machine=hppa1.1-hp
- os=-proelf
- ;;
- i370-ibm* | ibm*)
- basic_machine=i370-ibm
- ;;
-# I'm not sure what "Sysv32" means. Should this be sysv3.2?
- i*86v32)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv32
- ;;
- i*86v4*)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv4
- ;;
- i*86v)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv
- ;;
- i*86sol2)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-solaris2
- ;;
- i386mach)
- basic_machine=i386-mach
- os=-mach
- ;;
- i386-vsta | vsta)
- basic_machine=i386-unknown
- os=-vsta
- ;;
- iris | iris4d)
- basic_machine=mips-sgi
- case $os in
- -irix*)
- ;;
- *)
- os=-irix4
- ;;
- esac
- ;;
- isi68 | isi)
- basic_machine=m68k-isi
- os=-sysv
- ;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=-sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=-sysv
- ;;
- mingw32)
- basic_machine=i386-pc
- os=-mingw32
- ;;
- miniframe)
- basic_machine=m68000-convergent
- ;;
- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
- mips3*-*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
- ;;
- mips3*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
- ;;
- mmix*)
- basic_machine=mmix-knuth
- os=-mmixware
- ;;
- monitor)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- morphos)
- basic_machine=powerpc-unknown
- os=-morphos
- ;;
- msdos)
- basic_machine=i386-pc
- os=-msdos
- ;;
- mvs)
- basic_machine=i370-ibm
- os=-mvs
- ;;
- ncr3000)
- basic_machine=i486-ncr
- os=-sysv4
- ;;
- netbsd386)
- basic_machine=i386-unknown
- os=-netbsd
- ;;
- netwinder)
- basic_machine=armv4l-rebel
- os=-linux
- ;;
- news | news700 | news800 | news900)
- basic_machine=m68k-sony
- os=-newsos
- ;;
- news1000)
- basic_machine=m68030-sony
- os=-newsos
- ;;
- news-3600 | risc-news)
- basic_machine=mips-sony
- os=-newsos
- ;;
- necv70)
- basic_machine=v70-nec
- os=-sysv
- ;;
- next | m*-next )
- basic_machine=m68k-next
- case $os in
- -nextstep* )
- ;;
- -ns2*)
- os=-nextstep2
- ;;
- *)
- os=-nextstep3
- ;;
- esac
- ;;
- nh3000)
- basic_machine=m68k-harris
- os=-cxux
- ;;
- nh[45]000)
- basic_machine=m88k-harris
- os=-cxux
- ;;
- nindy960)
- basic_machine=i960-intel
- os=-nindy
- ;;
- mon960)
- basic_machine=i960-intel
- os=-mon960
- ;;
- nonstopux)
- basic_machine=mips-compaq
- os=-nonstopux
- ;;
- np1)
- basic_machine=np1-gould
- ;;
- nv1)
- basic_machine=nv1-cray
- os=-unicosmp
- ;;
- nsr-tandem)
- basic_machine=nsr-tandem
- ;;
- op50n-* | op60c-*)
- basic_machine=hppa1.1-oki
- os=-proelf
- ;;
- or32 | or32-*)
- basic_machine=or32-unknown
- os=-coff
- ;;
- OSE68000 | ose68000)
- basic_machine=m68000-ericsson
- os=-ose
- ;;
- os68k)
- basic_machine=m68k-none
- os=-os68k
- ;;
- pa-hitachi)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- paragon)
- basic_machine=i860-intel
- os=-osf
- ;;
- pbd)
- basic_machine=sparc-tti
- ;;
- pbb)
- basic_machine=m68k-tti
- ;;
- pc532 | pc532-*)
- basic_machine=ns32k-pc532
- ;;
- pentium | p5 | k5 | k6 | nexgen | viac3)
- basic_machine=i586-pc
- ;;
- pentiumpro | p6 | 6x86 | athlon | athlon_*)
- basic_machine=i686-pc
- ;;
- pentiumii | pentium2 | pentiumiii | pentium3)
- basic_machine=i686-pc
- ;;
- pentium4)
- basic_machine=i786-pc
- ;;
- pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium4-*)
- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pn)
- basic_machine=pn-gould
- ;;
- power) basic_machine=power-ibm
- ;;
- ppc) basic_machine=powerpc-unknown
- ;;
- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppcle | powerpclittle | ppc-le | powerpc-little)
- basic_machine=powerpcle-unknown
- ;;
- ppcle-* | powerpclittle-*)
- basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64) basic_machine=powerpc64-unknown
- ;;
- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
- basic_machine=powerpc64le-unknown
- ;;
- ppc64le-* | powerpc64little-*)
- basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ps2)
- basic_machine=i386-ibm
- ;;
- pw32)
- basic_machine=i586-unknown
- os=-pw32
- ;;
- rom68k)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- rm[46]00)
- basic_machine=mips-siemens
- ;;
- rtpc | rtpc-*)
- basic_machine=romp-ibm
- ;;
- s390 | s390-*)
- basic_machine=s390-ibm
- ;;
- s390x | s390x-*)
- basic_machine=s390x-ibm
- ;;
- sa29200)
- basic_machine=a29k-amd
- os=-udi
- ;;
- sb1)
- basic_machine=mipsisa64sb1-unknown
- ;;
- sb1el)
- basic_machine=mipsisa64sb1el-unknown
- ;;
- sei)
- basic_machine=mips-sei
- os=-seiux
- ;;
- sequent)
- basic_machine=i386-sequent
- ;;
- sh)
- basic_machine=sh-hitachi
- os=-hms
- ;;
- sh64)
- basic_machine=sh64-unknown
- ;;
- sparclite-wrs | simso-wrs)
- basic_machine=sparclite-wrs
- os=-vxworks
- ;;
- sps7)
- basic_machine=m68k-bull
- os=-sysv2
- ;;
- spur)
- basic_machine=spur-unknown
- ;;
- st2000)
- basic_machine=m68k-tandem
- ;;
- stratus)
- basic_machine=i860-stratus
- os=-sysv4
- ;;
- sun2)
- basic_machine=m68000-sun
- ;;
- sun2os3)
- basic_machine=m68000-sun
- os=-sunos3
- ;;
- sun2os4)
- basic_machine=m68000-sun
- os=-sunos4
- ;;
- sun3os3)
- basic_machine=m68k-sun
- os=-sunos3
- ;;
- sun3os4)
- basic_machine=m68k-sun
- os=-sunos4
- ;;
- sun4os3)
- basic_machine=sparc-sun
- os=-sunos3
- ;;
- sun4os4)
- basic_machine=sparc-sun
- os=-sunos4
- ;;
- sun4sol2)
- basic_machine=sparc-sun
- os=-solaris2
- ;;
- sun3 | sun3-*)
- basic_machine=m68k-sun
- ;;
- sun4)
- basic_machine=sparc-sun
- ;;
- sun386 | sun386i | roadrunner)
- basic_machine=i386-sun
- ;;
- sv1)
- basic_machine=sv1-cray
- os=-unicos
- ;;
- symmetry)
- basic_machine=i386-sequent
- os=-dynix
- ;;
- t3e)
- basic_machine=alphaev5-cray
- os=-unicos
- ;;
- t90)
- basic_machine=t90-cray
- os=-unicos
- ;;
- tic54x | c54x*)
- basic_machine=tic54x-unknown
- os=-coff
- ;;
- tic55x | c55x*)
- basic_machine=tic55x-unknown
- os=-coff
- ;;
- tic6x | c6x*)
- basic_machine=tic6x-unknown
- os=-coff
- ;;
- tx39)
- basic_machine=mipstx39-unknown
- ;;
- tx39el)
- basic_machine=mipstx39el-unknown
- ;;
- toad1)
- basic_machine=pdp10-xkl
- os=-tops20
- ;;
- tower | tower-32)
- basic_machine=m68k-ncr
- ;;
- udi29k)
- basic_machine=a29k-amd
- os=-udi
- ;;
- ultra3)
- basic_machine=a29k-nyu
- os=-sym1
- ;;
- v810 | necv810)
- basic_machine=v810-nec
- os=-none
- ;;
- vaxv)
- basic_machine=vax-dec
- os=-sysv
- ;;
- vms)
- basic_machine=vax-dec
- os=-vms
- ;;
- vpp*|vx|vx-*)
- basic_machine=f301-fujitsu
- ;;
- vxworks960)
- basic_machine=i960-wrs
- os=-vxworks
- ;;
- vxworks68)
- basic_machine=m68k-wrs
- os=-vxworks
- ;;
- vxworks29k)
- basic_machine=a29k-wrs
- os=-vxworks
- ;;
- w65*)
- basic_machine=w65-wdc
- os=-none
- ;;
- w89k-*)
- basic_machine=hppa1.1-winbond
- os=-proelf
- ;;
- xps | xps100)
- basic_machine=xps100-honeywell
- ;;
- ymp)
- basic_machine=ymp-cray
- os=-unicos
- ;;
- z8k-*-coff)
- basic_machine=z8k-unknown
- os=-sim
- ;;
- none)
- basic_machine=none-none
- os=-none
- ;;
-
-# Here we handle the default manufacturer of certain CPU types. It is in
-# some cases the only manufacturer, in others, it is the most popular.
- w89k)
- basic_machine=hppa1.1-winbond
- ;;
- op50n)
- basic_machine=hppa1.1-oki
- ;;
- op60c)
- basic_machine=hppa1.1-oki
- ;;
- romp)
- basic_machine=romp-ibm
- ;;
- rs6000)
- basic_machine=rs6000-ibm
- ;;
- vax)
- basic_machine=vax-dec
- ;;
- pdp10)
- # there are many clones, so DEC is not a safe bet
- basic_machine=pdp10-unknown
- ;;
- pdp11)
- basic_machine=pdp11-dec
- ;;
- we32k)
- basic_machine=we32k-att
- ;;
- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
- basic_machine=sh-unknown
- ;;
- sh64)
- basic_machine=sh64-unknown
- ;;
- sparc | sparcv9 | sparcv9b)
- basic_machine=sparc-sun
- ;;
- cydra)
- basic_machine=cydra-cydrome
- ;;
- orion)
- basic_machine=orion-highlevel
- ;;
- orion105)
- basic_machine=clipper-highlevel
- ;;
- mac | mpw | mac-mpw)
- basic_machine=m68k-apple
- ;;
- pmac | pmac-mpw)
- basic_machine=powerpc-apple
- ;;
- *-unknown)
- # Make sure to match an already-canonicalized machine name.
- ;;
- *)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
- *-digital*)
- basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
- ;;
- *-commodore*)
- basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
- ;;
- *)
- ;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
- # -solaris* is a basic system type, with this one exception.
- -solaris1 | -solaris1.*)
- os=`echo $os | sed -e 's|solaris1|sunos4|'`
- ;;
- -solaris)
- os=-solaris2
- ;;
- -svr4*)
- os=-sysv4
- ;;
- -unixware*)
- os=-sysv4.2uw
- ;;
- -gnu/linux*)
- os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
- ;;
- # First accept the basic system types.
- # The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
- case $basic_machine in
- x86-* | i*86-*)
- ;;
- *)
- os=-nto$os
- ;;
- esac
- ;;
- -nto-qnx*)
- ;;
- -nto*)
- os=`echo $os | sed -e 's|nto|nto-qnx|'`
- ;;
- -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
- | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
- ;;
- -mac*)
- os=`echo $os | sed -e 's|mac|macos|'`
- ;;
- -linux*)
- os=`echo $os | sed -e 's|linux|linux-gnu|'`
- ;;
- -sunos5*)
- os=`echo $os | sed -e 's|sunos5|solaris2|'`
- ;;
- -sunos6*)
- os=`echo $os | sed -e 's|sunos6|solaris3|'`
- ;;
- -opened*)
- os=-openedition
- ;;
- -wince*)
- os=-wince
- ;;
- -osfrose*)
- os=-osfrose
- ;;
- -osf*)
- os=-osf
- ;;
- -utek*)
- os=-bsd
- ;;
- -dynix*)
- os=-bsd
- ;;
- -acis*)
- os=-aos
- ;;
- -atheos*)
- os=-atheos
- ;;
- -386bsd)
- os=-bsd
- ;;
- -ctix* | -uts*)
- os=-sysv
- ;;
- -nova*)
- os=-rtmk-nova
- ;;
- -ns2 )
- os=-nextstep2
- ;;
- -nsk*)
- os=-nsk
- ;;
- # Preserve the version number of sinix5.
- -sinix5.*)
- os=`echo $os | sed -e 's|sinix|sysv|'`
- ;;
- -sinix*)
- os=-sysv4
- ;;
- -triton*)
- os=-sysv3
- ;;
- -oss*)
- os=-sysv3
- ;;
- -svr4)
- os=-sysv4
- ;;
- -svr3)
- os=-sysv3
- ;;
- -sysvr4)
- os=-sysv4
- ;;
- # This must come after -sysvr4.
- -sysv*)
- ;;
- -ose*)
- os=-ose
- ;;
- -es1800*)
- os=-ose
- ;;
- -xenix)
- os=-xenix
- ;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- os=-mint
- ;;
- -aros*)
- os=-aros
- ;;
- -kaos*)
- os=-kaos
- ;;
- -none)
- ;;
- *)
- # Get rid of the `-' at the beginning of $os.
- os=`echo $os | sed 's/[^-]*-//'`
- echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
- exit 1
- ;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system. Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
- *-acorn)
- os=-riscix1.2
- ;;
- arm*-rebel)
- os=-linux
- ;;
- arm*-semi)
- os=-aout
- ;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
- # This must come before the *-dec entry.
- pdp10-*)
- os=-tops20
- ;;
- pdp11-*)
- os=-none
- ;;
- *-dec | vax-*)
- os=-ultrix4.2
- ;;
- m68*-apollo)
- os=-domain
- ;;
- i386-sun)
- os=-sunos4.0.2
- ;;
- m68000-sun)
- os=-sunos3
- # This also exists in the configure program, but was not the
- # default.
- # os=-sunos4
- ;;
- m68*-cisco)
- os=-aout
- ;;
- mips*-cisco)
- os=-elf
- ;;
- mips*-*)
- os=-elf
- ;;
- or32-*)
- os=-coff
- ;;
- *-tti) # must be before sparc entry or we get the wrong os.
- os=-sysv3
- ;;
- sparc-* | *-sun)
- os=-sunos4.1.1
- ;;
- *-be)
- os=-beos
- ;;
- *-ibm)
- os=-aix
- ;;
- *-wec)
- os=-proelf
- ;;
- *-winbond)
- os=-proelf
- ;;
- *-oki)
- os=-proelf
- ;;
- *-hp)
- os=-hpux
- ;;
- *-hitachi)
- os=-hiux
- ;;
- i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
- os=-sysv
- ;;
- *-cbm)
- os=-amigaos
- ;;
- *-dg)
- os=-dgux
- ;;
- *-dolphin)
- os=-sysv3
- ;;
- m68k-ccur)
- os=-rtu
- ;;
- m88k-omron*)
- os=-luna
- ;;
- *-next )
- os=-nextstep
- ;;
- *-sequent)
- os=-ptx
- ;;
- *-crds)
- os=-unos
- ;;
- *-ns)
- os=-genix
- ;;
- i370-*)
- os=-mvs
- ;;
- *-next)
- os=-nextstep3
- ;;
- *-gould)
- os=-sysv
- ;;
- *-highlevel)
- os=-bsd
- ;;
- *-encore)
- os=-bsd
- ;;
- *-sgi)
- os=-irix
- ;;
- *-siemens)
- os=-sysv4
- ;;
- *-masscomp)
- os=-rtu
- ;;
- f30[01]-fujitsu | f700-fujitsu)
- os=-uxpv
- ;;
- *-rom68k)
- os=-coff
- ;;
- *-*bug)
- os=-coff
- ;;
- *-apple)
- os=-macos
- ;;
- *-atari*)
- os=-mint
- ;;
- *)
- os=-none
- ;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer. We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
- *-unknown)
- case $os in
- -riscix*)
- vendor=acorn
- ;;
- -sunos*)
- vendor=sun
- ;;
- -aix*)
- vendor=ibm
- ;;
- -beos*)
- vendor=be
- ;;
- -hpux*)
- vendor=hp
- ;;
- -mpeix*)
- vendor=hp
- ;;
- -hiux*)
- vendor=hitachi
- ;;
- -unos*)
- vendor=crds
- ;;
- -dgux*)
- vendor=dg
- ;;
- -luna*)
- vendor=omron
- ;;
- -genix*)
- vendor=ns
- ;;
- -mvs* | -opened*)
- vendor=ibm
- ;;
- -ptx*)
- vendor=sequent
- ;;
- -vxsim* | -vxworks* | -windiss*)
- vendor=wrs
- ;;
- -aux*)
- vendor=apple
- ;;
- -hms*)
- vendor=hitachi
- ;;
- -mpw* | -macos*)
- vendor=apple
- ;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- vendor=atari
- ;;
- -vos*)
- vendor=stratus
- ;;
- esac
- basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
- ;;
-esac
-
-echo $basic_machine$os
-exit 0
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/winsup/mingw/configure b/winsup/mingw/configure
deleted file mode 100755
index f0668c5..0000000
--- a/winsup/mingw/configure
+++ /dev/null
@@ -1,5210 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for MinGW Runtime v3.x.
-#
-# Report bugs to <http://mingw.org/reporting_bugs>.
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-if test "x$CONFIG_SHELL" = x; then
- if (eval ":") 2>/dev/null; then
- as_have_required=yes
-else
- as_have_required=no
-fi
-
- if test $as_have_required = yes && (eval ":
-(as_func_return () {
- (exit \$1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
- :
-else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0) || { (exit 1); exit 1; }
-
-(
- as_lineno_1=\$LINENO
- as_lineno_2=\$LINENO
- test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
- test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
-") 2> /dev/null; then
- :
-else
- as_candidate_shells=
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- case $as_dir in
- /*)
- for as_base in sh bash ksh sh5; do
- as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
- done;;
- esac
-done
-IFS=$as_save_IFS
-
-
- for as_shell in $as_candidate_shells $SHELL; do
- # Try only shells that exist, to save several forks.
- if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { ("$as_shell") 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-_ASEOF
-}; then
- CONFIG_SHELL=$as_shell
- as_have_required=yes
- if { "$as_shell" 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-(as_func_return () {
- (exit $1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = "$1" ); then
- :
-else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test $exitcode = 0) || { (exit 1); exit 1; }
-
-(
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
-
-_ASEOF
-}; then
- break
-fi
-
-fi
-
- done
-
- if test "x$CONFIG_SHELL" != x; then
- for as_var in BASH_ENV ENV
- do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- done
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
-
- if test $as_have_required = no; then
- echo This script requires a shell more modern than all the
- echo shells that I found on your system. Please install a
- echo modern shell, or manually run the script under such a
- echo shell if you do have one.
- { (exit 1); exit 1; }
-fi
-
-
-fi
-
-fi
-
-
-
-(eval "as_func_return () {
- (exit \$1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
- :
-else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0") || {
- echo No shell found that supports shell functions.
- echo Please tell bug-autoconf@gnu.org about your system,
- echo including any error possibly output before this message.
- echo This can help us improve future autoconf versions.
- echo Configuration will now proceed without shell functions.
-}
-
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line after each line using $LINENO; the second 'sed'
- # does the real work. The second script uses 'N' to pair each
- # line-number line with the line containing $LINENO, and appends
- # trailing '-' during substitution so that $LINENO is not a special
- # case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # scripts with optimization help from Paolo Bonzini. Blame Lee
- # E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
- case `echo 'x\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- *) ECHO_C='\c';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
- as_ln_s='cp -p'
- fi
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-exec 7<&0 </dev/null 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Identity of this package.
-PACKAGE_NAME='MinGW Runtime'
-PACKAGE_TARNAME='mingwrt'
-PACKAGE_VERSION='v3.x'
-PACKAGE_STRING='MinGW Runtime v3.x'
-PACKAGE_BUGREPORT='http://mingw.org/reporting_bugs'
-
-ac_unique_file="include/_mingw.h"
-enable_option_checking=no
-ac_subst_vars='LTLIBOBJS
-LIBOBJS
-mingw_manpage_transform
-INSTALL_DATA
-INSTALL_SCRIPT
-INSTALL_PROGRAM
-W32API_INCLUDE
-HEADER_SUBDIR
-LIBGMON_A
-LIBM_A
-NO_CYGWIN
-MKINSTALLDIRS
-THREAD_DLL
-subdirs
-WINDRES
-DLLWRAP
-DLLTOOL
-OBJCOPY
-NM
-LD
-RANLIB
-AS
-AR
-install_dlls_host
-all_dlls_host
-with_cross_host
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
-target_os
-target_vendor
-target_cpu
-target
-host_os
-host_vendor
-host_cpu
-host
-build_os
-build_vendor
-build_cpu
-build
-target_alias
-host_alias
-build_alias
-LIBS
-ECHO_T
-ECHO_N
-ECHO_C
-DEFS
-mandir
-localedir
-libdir
-psdir
-pdfdir
-dvidir
-htmldir
-infodir
-docdir
-oldincludedir
-includedir
-localstatedir
-sharedstatedir
-sysconfdir
-datadir
-datarootdir
-libexecdir
-sbindir
-bindir
-program_transform_name
-prefix
-exec_prefix
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-PATH_SEPARATOR
-SHELL'
-ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-enable_mingw_manpage_transform
-'
- ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS'
-ac_subdirs_all='profile mingwex'
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-ac_unrecognized_opts=
-ac_unrecognized_sep=
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval $ac_prev=\$ac_option
- ac_prev=
- continue
- fi
-
- case $ac_option in
- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *) ac_optarg=yes ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_dashdash$ac_option in
- --)
- ac_dashdash=yes ;;
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=*)
- datadir=$ac_optarg ;;
-
- -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
- | --dataroo | --dataro | --datar)
- ac_prev=datarootdir ;;
- -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
- | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
- datarootdir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
- { (exit 1); exit 1; }; }
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval enable_$ac_useropt=no ;;
-
- -docdir | --docdir | --docdi | --doc | --do)
- ac_prev=docdir ;;
- -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
- docdir=$ac_optarg ;;
-
- -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
- ac_prev=dvidir ;;
- -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
- dvidir=$ac_optarg ;;
-
- -enable-* | --enable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
- { (exit 1); exit 1; }; }
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval enable_$ac_useropt=\$ac_optarg ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
- ac_prev=htmldir ;;
- -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
- | --ht=*)
- htmldir=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir=$ac_optarg ;;
-
- -localedir | --localedir | --localedi | --localed | --locale)
- ac_prev=localedir ;;
- -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
- localedir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst | --locals)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
- localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name=$ac_optarg ;;
-
- -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
- ac_prev=pdfdir ;;
- -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
- pdfdir=$ac_optarg ;;
-
- -psdir | --psdir | --psdi | --psd | --ps)
- ac_prev=psdir ;;
- -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
- psdir=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
- { (exit 1); exit 1; }; }
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval with_$ac_useropt=\$ac_optarg ;;
-
- -without-* | --without-*)
- ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
- { (exit 1); exit 1; }; }
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval with_$ac_useropt=no ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries=$ac_optarg ;;
-
- -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- eval $ac_envvar=\$ac_optarg
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { $as_echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-if test -n "$ac_unrecognized_opts"; then
- case $enable_option_checking in
- no) ;;
- fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
- { (exit 1); exit 1; }; } ;;
- *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
- esac
-fi
-
-# Check all directory arguments for consistency.
-for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
- datadir sysconfdir sharedstatedir localstatedir includedir \
- oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
-do
- eval ac_val=\$$ac_var
- # Remove trailing slashes.
- case $ac_val in
- */ )
- ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
- eval $ac_var=\$ac_val;;
- esac
- # Be sure to have absolute directory names.
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) continue;;
- NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
- esac
- { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; }
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- { $as_echo "$as_me: error: working directory cannot be determined" >&2
- { (exit 1); exit 1; }; }
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
- { (exit 1); exit 1; }; }
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then the parent directory.
- ac_confdir=`$as_dirname -- "$as_myself" ||
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_myself" : 'X\(//\)[^/]' \| \
- X"$as_myself" : 'X\(//\)$' \| \
- X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r "$srcdir/$ac_unique_file"; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
- test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
- { (exit 1); exit 1; }; }
- pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
- srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
- eval ac_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_env_${ac_var}_value=\$${ac_var}
- eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures MinGW Runtime v3.x to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
- --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- --infodir=DIR info documentation [DATAROOTDIR/info]
- --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
- --mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/mingwrt]
- --htmldir=DIR html documentation [DOCDIR]
- --dvidir=DIR dvi documentation [DOCDIR]
- --pdfdir=DIR pdf documentation [DOCDIR]
- --psdir=DIR ps documentation [DOCDIR]
-_ACEOF
-
- cat <<\_ACEOF
-
-System types:
- --build=BUILD configure for building on BUILD [guessed]
- --host=HOST cross-compile to build programs to run on HOST [BUILD]
- --target=TARGET configure for building compilers for TARGET [HOST]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
- case $ac_init_help in
- short | recursive ) echo "Configuration of MinGW Runtime v3.x:";;
- esac
- cat <<\_ACEOF
-
-Optional Features:
- --disable-option-checking ignore unrecognized --enable/--with options
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-mingw-manpage-transform[=SED-SCRIPT]
- apply SED-SCRIPT [s/^/mingw-/] to installed manpage
- names
- --disable-mingw-manpage-transform
- [DEFAULT] don't transform installed manpage names
-
-Some influential environment variables:
- CC C compiler command
- CFLAGS C compiler flags
- LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
- nonstandard directory <lib dir>
- LIBS libraries to pass to the linker, e.g. -l<library>
- CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
- you have headers in a nonstandard directory <include dir>
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-Report bugs to <http://mingw.org/reporting_bugs>.
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d "$ac_dir" ||
- { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
- continue
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
- cd "$ac_dir" || { ac_status=$?; continue; }
- # Check for guested configure.
- if test -f "$ac_srcdir/configure.gnu"; then
- echo &&
- $SHELL "$ac_srcdir/configure.gnu" --help=recursive
- elif test -f "$ac_srcdir/configure"; then
- echo &&
- $SHELL "$ac_srcdir/configure" --help=recursive
- else
- $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi || ac_status=$?
- cd "$ac_pwd" || { ac_status=$?; break; }
- done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
- cat <<\_ACEOF
-MinGW Runtime configure v3.x
-generated by GNU Autoconf 2.63
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit
-fi
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by MinGW Runtime $as_me v3.x, which was
-generated by GNU Autoconf 2.63. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- $as_echo "PATH: $as_dir"
-done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *\'*)
- ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- ac_configure_args="$ac_configure_args '$ac_arg'"
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-(
- for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) $as_unset $ac_var ;;
- esac ;;
- esac
- done
- (set) 2>&1 |
- case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- sed -n \
- "s/'\''/'\''\\\\'\'''\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
- ;; #(
- *)
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-)
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------------- ##
-## File substitutions. ##
-## ------------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- cat confdefs.h
- echo
- fi
- test "$ac_signal" != 0 &&
- $as_echo "$as_me: caught signal $ac_signal"
- $as_echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core core.conftest.* &&
- rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
- ac_site_file1=$CONFIG_SITE
-elif test "x$prefix" != xNONE; then
- ac_site_file1=$prefix/share/config.site
- ac_site_file2=$prefix/etc/config.site
-else
- ac_site_file1=$ac_default_prefix/share/config.site
- ac_site_file2=$ac_default_prefix/etc/config.site
-fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
- test "x$ac_site_file" = xNONE && continue
- if test -r "$ac_site_file"; then
- { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . "$cache_file";;
- *) . "./$cache_file";;
- esac
- fi
-else
- { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val=\$ac_cv_env_${ac_var}_value
- eval ac_new_val=\$ac_env_${ac_var}_value
- case $ac_old_set,$ac_new_set in
- set,)
- { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- # differences in whitespace do not lead to failure.
- ac_old_val_w=`echo x $ac_old_val`
- ac_new_val_w=`echo x $ac_new_val`
- if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- ac_cache_corrupted=:
- else
- { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
- eval $ac_var=\$ac_old_val
- fi
- { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
-$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
- { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
-$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
- { $as_echo "$as_me:$LINENO: checking package version" >&5
-$as_echo_n "checking package version... " >&6; }
- PACKAGE_VERSION=`awk '$2 == "'"__MINGW32_VERSION"'" { print $3 }' ${srcdir}/include/_mingw.h`
- { $as_echo "$as_me:$LINENO: result: $PACKAGE_VERSION" >&5
-$as_echo "$PACKAGE_VERSION" >&6; }
-
-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
- elif test -f "$ac_dir/shtool"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
-$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
- { (exit 1); exit 1; }; }
-
-{ $as_echo "$as_me:$LINENO: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
- { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-$as_echo "$as_me: error: invalid value of canonical build" >&2;}
- { (exit 1); exit 1; }; };;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:$LINENO: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test "x$host_alias" = x; then
- ac_cv_host=$ac_cv_build
-else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-$as_echo "$as_me: error: invalid value of canonical host" >&2;}
- { (exit 1); exit 1; }; };;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:$LINENO: checking target system type" >&5
-$as_echo_n "checking target system type... " >&6; }
-if test "${ac_cv_target+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test "x$target_alias" = x; then
- ac_cv_target=$ac_cv_host
-else
- ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
- { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-$as_echo "$ac_cv_target" >&6; }
-case $ac_cv_target in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
-$as_echo "$as_me: error: invalid value of canonical target" >&2;}
- { (exit 1); exit 1; }; };;
-esac
-target=$ac_cv_target
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_target
-shift
-target_cpu=$1
-target_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-target_os=$*
-IFS=$ac_save_IFS
-case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CC="gcc"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-else
- CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- fi
-fi
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
- fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl.exe
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl.exe
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$ac_ct_CC" && break
-done
-
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-fi
-
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler --version >&5") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler -v >&5") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler -V >&5") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-# FIXME: Cleanup?
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- gcc_no_link=no
-else
- gcc_no_link=yes
-fi
-
-if test x$gcc_no_link = xyes; then
- # Setting cross_compile will disable run tests; it will
- # also disable AC_CHECK_FILE but that's generally
- # correct if we can't link.
- cross_compiling=yes
- EXEEXT=
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
-do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
- * ) ac_rmfiles="$ac_rmfiles $ac_file";;
- esac
-done
-rm -f $ac_rmfiles
-
-if { (ac_try="$ac_link_default"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link_default") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile. We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
- then :; else
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- fi
- # We set ac_cv_exeext here because the later test for it is not
- # safe: cross compilers may not add the suffix if given an `-o'
- # argument, so we may need to know it at that point already.
- # Even if this section looks crufty: it has the advantage of
- # actually working.
- break;;
- * )
- break;;
- esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-else
- ac_file=''
-fi
-
-{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-if test -z "$ac_file"; then
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
- fi
- fi
-fi
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- break;;
- * ) break;;
- esac
-done
-else
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-fi
-{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- for ac_file in conftest.o conftest.obj conftest.*; do
- test -f "$ac_file" || continue;
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_compiler_gnu=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_compiler_gnu=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
- GCC=yes
-else
- GCC=
-fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_save_c_werror_flag=$ac_c_werror_flag
- ac_c_werror_flag=yes
- ac_cv_prog_cc_g=no
- CFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_cc_g=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- CFLAGS=""
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- :
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_c_werror_flag=$ac_save_c_werror_flag
- CFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_cc_g=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_cc_c89=$ac_arg
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:$LINENO: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:$LINENO: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-case "$with_cross_host" in
- ""|*cygwin*) all_dlls_host='all_dlls_host'
- install_dlls_host='install_dlls_host';;
-esac
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
- { $as_echo "$as_me:$LINENO: result: $AR" >&5
-$as_echo "$AR" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_AR"; then
- ac_ct_AR=$AR
- # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_AR"; then
- ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_AR="ar"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_AR" = x; then
- AR="ar"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- AR=$ac_ct_AR
- fi
-else
- AR="$ac_cv_prog_AR"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AS+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-AS=$ac_cv_prog_AS
-if test -n "$AS"; then
- { $as_echo "$as_me:$LINENO: result: $AS" >&5
-$as_echo "$AS" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_AS"; then
- ac_ct_AS=$AS
- # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_AS"; then
- ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_AS="as"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_AS=$ac_cv_prog_ac_ct_AS
-if test -n "$ac_ct_AS"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
-$as_echo "$ac_ct_AS" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_AS" = x; then
- AS="as"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- AS=$ac_ct_AS
- fi
-else
- AS="$ac_cv_prog_AS"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_RANLIB" = x; then
- RANLIB="ranlib"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- RANLIB=$ac_ct_RANLIB
- fi
-else
- RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_LD+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$LD"; then
- ac_cv_prog_LD="$LD" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_LD="${ac_tool_prefix}ld"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-LD=$ac_cv_prog_LD
-if test -n "$LD"; then
- { $as_echo "$as_me:$LINENO: result: $LD" >&5
-$as_echo "$LD" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_LD"; then
- ac_ct_LD=$LD
- # Extract the first word of "ld", so it can be a program name with args.
-set dummy ld; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_LD"; then
- ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_LD="ld"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_LD=$ac_cv_prog_ac_ct_LD
-if test -n "$ac_ct_LD"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_LD" >&5
-$as_echo "$ac_ct_LD" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_LD" = x; then
- LD="ld"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- LD=$ac_ct_LD
- fi
-else
- LD="$ac_cv_prog_LD"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_NM+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$NM"; then
- ac_cv_prog_NM="$NM" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_NM="${ac_tool_prefix}nm"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-NM=$ac_cv_prog_NM
-if test -n "$NM"; then
- { $as_echo "$as_me:$LINENO: result: $NM" >&5
-$as_echo "$NM" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_NM"; then
- ac_ct_NM=$NM
- # Extract the first word of "nm", so it can be a program name with args.
-set dummy nm; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_NM"; then
- ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_NM="nm"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_NM=$ac_cv_prog_ac_ct_NM
-if test -n "$ac_ct_NM"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_NM" >&5
-$as_echo "$ac_ct_NM" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_NM" = x; then
- NM="nm"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- NM=$ac_ct_NM
- fi
-else
- NM="$ac_cv_prog_NM"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}objcopy", so it can be a program name with args.
-set dummy ${ac_tool_prefix}objcopy; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OBJCOPY+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$OBJCOPY"; then
- ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OBJCOPY="${ac_tool_prefix}objcopy"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-OBJCOPY=$ac_cv_prog_OBJCOPY
-if test -n "$OBJCOPY"; then
- { $as_echo "$as_me:$LINENO: result: $OBJCOPY" >&5
-$as_echo "$OBJCOPY" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OBJCOPY"; then
- ac_ct_OBJCOPY=$OBJCOPY
- # Extract the first word of "objcopy", so it can be a program name with args.
-set dummy objcopy; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_OBJCOPY"; then
- ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_OBJCOPY="objcopy"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
-if test -n "$ac_ct_OBJCOPY"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJCOPY" >&5
-$as_echo "$ac_ct_OBJCOPY" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_OBJCOPY" = x; then
- OBJCOPY="objcopy"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- OBJCOPY=$ac_ct_OBJCOPY
- fi
-else
- OBJCOPY="$ac_cv_prog_OBJCOPY"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DLLTOOL+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-DLLTOOL=$ac_cv_prog_DLLTOOL
-if test -n "$DLLTOOL"; then
- { $as_echo "$as_me:$LINENO: result: $DLLTOOL" >&5
-$as_echo "$DLLTOOL" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_DLLTOOL"; then
- ac_ct_DLLTOOL=$DLLTOOL
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_DLLTOOL"; then
- ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_DLLTOOL="dlltool"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
-if test -n "$ac_ct_DLLTOOL"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
-$as_echo "$ac_ct_DLLTOOL" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_DLLTOOL" = x; then
- DLLTOOL="dlltool"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- DLLTOOL=$ac_ct_DLLTOOL
- fi
-else
- DLLTOOL="$ac_cv_prog_DLLTOOL"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DLLWRAP+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$DLLWRAP"; then
- ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_DLLWRAP="${ac_tool_prefix}dlltool"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-DLLWRAP=$ac_cv_prog_DLLWRAP
-if test -n "$DLLWRAP"; then
- { $as_echo "$as_me:$LINENO: result: $DLLWRAP" >&5
-$as_echo "$DLLWRAP" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_DLLWRAP"; then
- ac_ct_DLLWRAP=$DLLWRAP
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DLLWRAP+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_DLLWRAP"; then
- ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_DLLWRAP="dlltool"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
-if test -n "$ac_ct_DLLWRAP"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_DLLWRAP" >&5
-$as_echo "$ac_ct_DLLWRAP" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_DLLWRAP" = x; then
- DLLWRAP="dlltool"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- DLLWRAP=$ac_ct_DLLWRAP
- fi
-else
- DLLWRAP="$ac_cv_prog_DLLWRAP"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_WINDRES+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$WINDRES"; then
- ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-WINDRES=$ac_cv_prog_WINDRES
-if test -n "$WINDRES"; then
- { $as_echo "$as_me:$LINENO: result: $WINDRES" >&5
-$as_echo "$WINDRES" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_WINDRES"; then
- ac_ct_WINDRES=$WINDRES
- # Extract the first word of "windres", so it can be a program name with args.
-set dummy windres; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_WINDRES"; then
- ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_WINDRES="windres"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
-if test -n "$ac_ct_WINDRES"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5
-$as_echo "$ac_ct_WINDRES" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_WINDRES" = x; then
- WINDRES="windres"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- WINDRES=$ac_ct_WINDRES
- fi
-else
- WINDRES="$ac_cv_prog_WINDRES"
-fi
-
-
-
-
-subdirs="$subdirs profile mingwex"
-
-HEADER_SUBDIR=""
-
-LIBGMON_A=libgmon.a
-
-W32API_INCLUDE='-I $(srcdir)/../w32api/include'
-
-case "$target_os" in
-*cygwin*)
- NO_CYGWIN="$(cd ${srcdir}/../utils; pwd)/mingw"
- LIBM_A=libm.a
- # Install mingw headers in mingw subdirectory.
- HEADER_SUBDIR="mingw"
- ;;
-*)
- # Build it for MSVCRT by default.
- NO_CYGWIN=
- LIBM_A=libm.a
- ;;
-esac
-
-# THREAD_DLL used to be set within the above case and was mingwc for CRTDLL.
-# I can find no reason to do this.
-#
-# FIXME: In the future I would like to change the dll name to mingwthrd to
-# to match the libmingwthrd.a name.
-THREAD_DLL=mingwm
-
-
-MKINSTALLDIRS=$ac_aux_dir/mkinstalldirs
-
-
-
-
-
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- rm -rf conftest.one conftest.two conftest.dir
- echo one > conftest.one
- echo two > conftest.two
- mkdir conftest.dir
- if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
- test -s conftest.one && test -s conftest.two &&
- test -s conftest.dir/conftest.one &&
- test -s conftest.dir/conftest.two
- then
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- fi
- done
- done
- ;;
-esac
-
-done
-IFS=$as_save_IFS
-
-rm -rf conftest.one conftest.two conftest.dir
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. Don't cache a
- # value for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the value is a relative name.
- INSTALL=$ac_install_sh
- fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-# Check whether --enable-mingw-manpage-transform was given.
-if test "${enable_mingw_manpage_transform+set}" = set; then
- enableval=$enable_mingw_manpage_transform; case ${enableval} in
- yes) mingw_manpage_transform='s,^,mingw-,' ;;
- no) mingw_manpage_transform='s,x,x,' ;;
- *) mingw_manpage_transform=${enableval} ;;
- esac
-fi
-
- mingw_manpage_transform=${mingw_manpage_transform-'s,x,x,'}
-
-
-ac_config_files="$ac_config_files Makefile"
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
- for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) $as_unset $ac_var ;;
- esac ;;
- esac
- done
-
- (set) 2>&1 |
- case $as_nl`(ac_space=' '; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;; #(
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-) |
- sed '
- /^ac_cv_env_/b end
- t clear
- :clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
- if test -w "$cache_file"; then
- test "x$cache_file" != "x/dev/null" &&
- { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
- cat confcache >$cache_file
- else
- { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then branch to the quote section. Otherwise,
-# look for a macro that doesn't take arguments.
-ac_script='
-:mline
-/\\$/{
- N
- s,\\\n,,
- b mline
-}
-t clear
-:clear
-s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
-t quote
-s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
-t quote
-b any
-:quote
-s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
-s/\[/\\&/g
-s/\]/\\&/g
-s/\$/$$/g
-H
-:any
-${
- g
- s/^\n//
- s/\n/ /g
- p
-}
-'
-DEFS=`sed -n "$ac_script" confdefs.h`
-
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
- # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
- # will be set to the directory where LIBOBJS objects are built.
- ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line after each line using $LINENO; the second 'sed'
- # does the real work. The second script uses 'N' to pair each
- # line-number line with the line containing $LINENO, and appends
- # trailing '-' during substitution so that $LINENO is not a special
- # case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # scripts with optimization help from Paolo Bonzini. Blame Lee
- # E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
- case `echo 'x\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- *) ECHO_C='\c';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
- as_ln_s='cp -p'
- fi
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-
-# Save the log message, to keep $[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by MinGW Runtime $as_me v3.x, which was
-generated by GNU Autoconf 2.63. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
-
-
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTION]... [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number and configuration settings, then exit
- -q, --quiet, --silent
- do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
-
-Configuration files:
-$config_files
-
-Report bugs to <bug-autoconf@gnu.org>."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_version="\\
-MinGW Runtime config.status v3.x
-configured by $0, generated by GNU Autoconf 2.63,
- with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2008 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
-test -n "\$AWK" || AWK=awk
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=*)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- *)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- esac
-
- case $ac_option in
- # Handling of the options.
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
- --debug | --debu | --deb | --de | --d | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
- ac_need_defaults=false;;
- --he | --h | --help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { $as_echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1"
- ac_need_defaults=false ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
- shift
- \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
- CONFIG_SHELL='$SHELL'
- export CONFIG_SHELL
- exec "\$@"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
- $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
- case $ac_config_target in
- "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-
- *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
- tmp=
- trap 'exit_status=$?
- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./conf$$-$RANDOM
- (umask 077 && mkdir "$tmp")
-} ||
-{
- $as_echo "$as_me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=' '
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\\r'
-else
- ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
-_ACEOF
-
-
-{
- echo "cat >conf$$subs.awk <<_ACEOF" &&
- echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
- echo "_ACEOF"
-} >conf$$subs.sh ||
- { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
- . ./conf$$subs.sh ||
- { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
-
- ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
- if test $ac_delim_n = $ac_delim_num; then
- break
- elif $ac_last_try; then
- { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\).*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\).*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
- N
- s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
- for (key in S) S_is_set[key] = 1
- FS = ""
-
-}
-{
- line = $ 0
- nfields = split(line, field, "@")
- substed = 0
- len = length(field[1])
- for (i = 2; i < nfields; i++) {
- key = field[i]
- keylen = length(key)
- if (S_is_set[key]) {
- value = S[key]
- line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
- len += length(value) + length(field[++i])
- substed = 1
- } else
- len += 1 + keylen
- }
-
- print line
-}
-
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
- sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
- cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
- || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
-$as_echo "$as_me: error: could not setup config files machinery" >&2;}
- { (exit 1); exit 1; }; }
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[ ]*\):*/\1/
-s/:*$//
-s/^[^=]*=[ ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
-
-
-eval set X " :F $CONFIG_FILES "
-shift
-for ac_tag
-do
- case $ac_tag in
- :[FHLC]) ac_mode=$ac_tag; continue;;
- esac
- case $ac_mode$ac_tag in
- :[FHL]*:*);;
- :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
-$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
- { (exit 1); exit 1; }; };;
- :[FH]-) ac_tag=-:-;;
- :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
- esac
- ac_save_IFS=$IFS
- IFS=:
- set x $ac_tag
- IFS=$ac_save_IFS
- shift
- ac_file=$1
- shift
-
- case $ac_mode in
- :L) ac_source=$1;;
- :[FH])
- ac_file_inputs=
- for ac_f
- do
- case $ac_f in
- -) ac_f="$tmp/stdin";;
- *) # Look for the file first in the build tree, then in the source tree
- # (if the path is not absolute). The absolute path cannot be DOS-style,
- # because $ac_f cannot contain `:'.
- test -f "$ac_f" ||
- case $ac_f in
- [\\/$]*) false;;
- *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
- esac ||
- { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
- { (exit 1); exit 1; }; };;
- esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
- ac_file_inputs="$ac_file_inputs '$ac_f'"
- done
-
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
- `' by configure.'
- if test x"$ac_file" != x-; then
- configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
- fi
- # Neutralize special characters interpreted by sed in replacement strings.
- case $configure_input in #(
- *\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
- sed 's/[\\\\&|]/\\\\&/g'`;; #(
- *) ac_sed_conf_input=$configure_input;;
- esac
-
- case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin" \
- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
- { (exit 1); exit 1; }; } ;;
- esac
- ;;
- esac
-
- ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- { as_dir="$ac_dir"
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
- { (exit 1); exit 1; }; }; }
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
- case $ac_mode in
- :F)
- #
- # CONFIG_FILE
- #
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
- esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-
-ac_sed_dataroot='
-/datarootdir/ {
- p
- q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p
-'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_datarootdir_hack='
- s&@datadir@&$datadir&g
- s&@docdir@&$docdir&g
- s&@infodir@&$infodir&g
- s&@localedir@&$localedir&g
- s&@mandir@&$mandir&g
- s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
- { (exit 1); exit 1; }; }
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&2;}
-
- rm -f "$tmp/stdin"
- case $ac_file in
- -) cat "$tmp/out" && rm -f "$tmp/out";;
- *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
- esac \
- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
- { (exit 1); exit 1; }; }
- ;;
-
-
-
- esac
-
-done # for ac_tag
-
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-test $ac_write_fail = 0 ||
- { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || { (exit 1); exit 1; }
-fi
-
-#
-# CONFIG_SUBDIRS section.
-#
-if test "$no_recursion" != yes; then
-
- # Remove --cache-file, --srcdir, and --disable-option-checking arguments
- # so they do not pile up.
- ac_sub_configure_args=
- ac_prev=
- eval "set x $ac_configure_args"
- shift
- for ac_arg
- do
- if test -n "$ac_prev"; then
- ac_prev=
- continue
- fi
- case $ac_arg in
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
- | --c=*)
- ;;
- --config-cache | -C)
- ;;
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- ;;
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- ;;
- --disable-option-checking)
- ;;
- *)
- case $ac_arg in
- *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
- esac
- done
-
- # Always prepend --prefix to ensure using the same prefix
- # in subdir configurations.
- ac_arg="--prefix=$prefix"
- case $ac_arg in
- *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
-
- # Pass --silent
- if test "$silent" = yes; then
- ac_sub_configure_args="--silent $ac_sub_configure_args"
- fi
-
- # Always prepend --disable-option-checking to silence warnings, since
- # different subdirs can have different --enable and --with options.
- ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
-
- ac_popdir=`pwd`
- for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
-
- # Do not complain, so a configure script can configure whichever
- # parts of a large source tree are present.
- test -d "$srcdir/$ac_dir" || continue
-
- ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
- $as_echo "$as_me:$LINENO: $ac_msg" >&5
- $as_echo "$ac_msg" >&6
- { as_dir="$ac_dir"
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
- { (exit 1); exit 1; }; }; }
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
- cd "$ac_dir"
-
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f "$ac_srcdir/configure.gnu"; then
- ac_sub_configure=$ac_srcdir/configure.gnu
- elif test -f "$ac_srcdir/configure"; then
- ac_sub_configure=$ac_srcdir/configure
- elif test -f "$ac_srcdir/configure.in"; then
- # This should be Cygnus configure.
- ac_sub_configure=$ac_aux_dir/configure
- else
- { $as_echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
-$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
- ac_sub_configure=
- fi
-
- # The recursion is here.
- if test -n "$ac_sub_configure"; then
- # Make the cache file name correct relative to the subdirectory.
- case $cache_file in
- [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
- *) # Relative name.
- ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
- esac
-
- { $as_echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
-$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
- # The eval makes quoting arguments work.
- eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
- --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
- { { $as_echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
-$as_echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
- { (exit 1); exit 1; }; }
- fi
-
- cd "$ac_popdir"
- done
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
-
-
-# $RCSfile$: end of file
diff --git a/winsup/mingw/configure.in b/winsup/mingw/configure.in
deleted file mode 100644
index cfe58ca..0000000
--- a/winsup/mingw/configure.in
+++ /dev/null
@@ -1,86 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-
-dnl This file is part of winsup/mingw
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 2 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; if not, write to the Free Software
-dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-AC_PREREQ([2.59])
-AC_INIT([MinGW Runtime], [v3.x], [http://mingw.org/reporting_bugs], [mingwrt])
-MINGW_AC_CONFIG_SRCDIR([__MINGW32_VERSION], [include/_mingw.h])
-
-AC_CANONICAL_SYSTEM
-GCC_NO_EXECUTABLES
-AC_PROG_CC
-
-case "$with_cross_host" in
- ""|*cygwin*) all_dlls_host='all_dlls_host'
- install_dlls_host='install_dlls_host';;
-esac
-AC_SUBST([with_cross_host])
-AC_SUBST([all_dlls_host])
-AC_SUBST([install_dlls_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([OBJCOPY], [objcopy], [objcopy])
-AC_CHECK_TOOL([DLLTOOL], [dlltool], [dlltool])
-AC_CHECK_TOOL([DLLWRAP], [dlltool], [dlltool])
-AC_CHECK_TOOL([WINDRES], [windres], [windres])
-
-AC_CONFIG_SUBDIRS([profile mingwex])
-HEADER_SUBDIR=""
-
-LIBGMON_A=libgmon.a
-
-W32API_INCLUDE='-I $(srcdir)/../w32api/include'
-
-case "$target_os" in
-*cygwin*)
- NO_CYGWIN="$(cd ${srcdir}/../utils; pwd)/mingw"
- LIBM_A=libm.a
- # Install mingw headers in mingw subdirectory.
- HEADER_SUBDIR="mingw"
- ;;
-*)
- # Build it for MSVCRT by default.
- NO_CYGWIN=
- LIBM_A=libm.a
- ;;
-esac
-
-# THREAD_DLL used to be set within the above case and was mingwc for CRTDLL.
-# I can find no reason to do this.
-#
-# FIXME: In the future I would like to change the dll name to mingwthrd to
-# to match the libmingwthrd.a name.
-AC_SUBST([THREAD_DLL], [mingwm])
-
-AC_SUBST([MKINSTALLDIRS], [$ac_aux_dir/mkinstalldirs])
-AC_SUBST([NO_CYGWIN])
-AC_SUBST([LIBM_A])
-AC_SUBST([LIBGMON_A])
-AC_SUBST([HEADER_SUBDIR])
-AC_SUBST([W32API_INCLUDE])
-
-AC_PROG_INSTALL
-MINGW_AC_MANPAGE_TRANSFORM
-
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
-
-# $RCSfile$: end of file
diff --git a/winsup/mingw/cpu_features.c b/winsup/mingw/cpu_features.c
deleted file mode 100755
index 5e2c265..0000000
--- a/winsup/mingw/cpu_features.c
+++ /dev/null
@@ -1,105 +0,0 @@
-#include <stdbool.h>
-#include "cpu_features.h"
-
-/* level 1 edx bits */
-#define EDX_CX8 (1 << 8) /* CMPXCHG8B */
-#define EDX_CMOV (1 << 15)
-#define EDX_MMX (1 << 23)
-#define EDX_FXSR (1 << 24) /* FXSAVE and FXRSTOR */
-#define EDX_SSE (1 << 25)
-#define EDX_SSE2 (1 << 26)
-
-/* level 1 ecx bits */
-#define ECX_SSE3 (1 << 0)
-#define ECX_CX16 (1 << 13) /* CMPXCHG16B */
-
-/* extended level 0x80000001 edx bits */
-#define EDX_3DNOW (1 << 31)
-#define EDX_3DNOWP (1 << 30)
-#define EDX_LM (1 << 29) /*LONG MODE */
-
-#define __cpuid(level,a,b,c,d) \
- __asm__ __volatile__ ("cpuid;" \
- : "=a" (a), "=b" (b), "=c" (c), "=d" (d)\
- : "0" (level))
-
-/* Combine the different cpuid flags into a single bitmap. */
-
-unsigned int __cpu_features = 0;
-
-void __cpu_features_init (void)
-{
- unsigned int eax, ebx, ecx, edx;
- /* Try to change the value of CPUID bit (bit 21) in EFLAGS.
- If the bit can be toggled, CPUID is supported. */
- asm volatile ("pushfl; pushfl; popl %0;"
- "movl %0,%1; xorl %2,%0;"
- "pushl %0; popfl; pushfl; popl %0; popfl"
- : "=&r" (eax), "=&r" (ebx)
- : "i" (0x00200000));
-
- if (((eax ^ ebx) & 0x00200000) == 0)
- return;
-
- __cpuid (0, eax, ebx, ecx, edx);
- if (eax == 0)
- return;
-
- __cpuid (1, eax, ebx, ecx, edx);
-
- if (edx & EDX_CX8)
- __cpu_features |= _CRT_CMPXCHG8B;
- if (edx & EDX_CMOV)
- __cpu_features |= _CRT_CMOV;
-
- if (edx & EDX_MMX)
- __cpu_features |= _CRT_MMX;
- if (edx & EDX_FXSR)
- __cpu_features |= _CRT_FXSR;
- if (edx & EDX_SSE)
- __cpu_features |= _CRT_SSE;
- if (edx & EDX_SSE2)
- __cpu_features |= _CRT_SSE2;
-
-
- if (ecx & ECX_SSE3)
- __cpu_features |= _CRT_SSE3;
- if (ecx & ECX_CX16)
- __cpu_features |= _CRT_CMPXCHG16B;
-
- __cpuid (0x80000000, eax, ebx, ecx, edx);
- if (eax < 0x80000001)
- return;
- __cpuid (0x80000001, eax, ebx, ecx, edx);
- if (edx & EDX_3DNOW)
- __cpu_features |= _CRT_3DNOW;
- if (edx & EDX_3DNOWP)
- __cpu_features |= _CRT_3DNOWP;
-
- return;
-}
-
-#ifdef TEST
-
-#include <stdio.h>
-#define report(feature) \
- if ((feature) & __cpu_features) printf( #feature " found\n")
-
-int main()
-{
- __cpu_features_init();
-
- report(_CRT_CMPXCHG8B);
- report(_CRT_CMOV);
- report(_CRT_MMX);
- report(_CRT_FXSR);
- report(_CRT_SSE);
- report(_CRT_SSE2);
- report(_CRT_SSE3);
- report(_CRT_CMPXCHG16B);
- report(_CRT_3DNOW);
- report(_CRT_3DNOWP);
- return 0;
-}
-
-#endif
diff --git a/winsup/mingw/cpu_features.h b/winsup/mingw/cpu_features.h
deleted file mode 100755
index a19f875..0000000
--- a/winsup/mingw/cpu_features.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef _CPU_FEATURES_H
-#define _CPU_FEATURES_H
-
-#include <stdbool.h>
-
-#define _CRT_CMPXCHG8B 0x0001
-#define _CRT_CMOV 0x0002
-#define _CRT_MMX 0x0004
-#define _CRT_FXSR 0x0008
-#define _CRT_SSE 0x0010
-#define _CRT_SSE2 0x0020
-#define _CRT_SSE3 0x0040
-#define _CRT_CMPXCHG16B 0x0080
-#define _CRT_3DNOW 0x0100
-#define _CRT_3DNOWP 0x0200
-
-extern unsigned int __cpu_features;
-
-/* Currently we use this in fpenv functions */
-#define __HAS_SSE __cpu_features & _CRT_SSE
-
-
-#endif
diff --git a/winsup/mingw/crt1.c b/winsup/mingw/crt1.c
deleted file mode 100644
index 6ab7c1d..0000000
--- a/winsup/mingw/crt1.c
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
- * crt1.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Source code for the startup proceedures used by all programs. This code
- * is compiled to make crt1.o, which should be located in the library path.
- *
- */
-
-/* Hide the declaration of _fmode with dllimport attribute in stdlib.h to
- avoid problems with older GCC. */
-#define __IN_MINGW_RUNTIME
-#include <stdlib.h>
-#include <stdio.h>
-#include <io.h>
-#include <process.h>
-#include <float.h>
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <signal.h>
-
-/* NOTE: The code for initializing the _argv, _argc, and environ variables
- * has been moved to a separate .c file which is included in both
- * crt1.c and dllcrt1.c. This means changes in the code don't have to
- * be manually synchronized, but it does lead to this not-generally-
- * a-good-idea use of include. */
-#include "init.c"
-#include "cpu_features.h"
-
-extern void __main ();
-extern void _pei386_runtime_relocator (void);
-
-extern int main (int, char **, char **);
-
-/*
- * Must have the correct app type for MSVCRT.
- */
-
-#ifdef __MSVCRT__
-#define __UNKNOWN_APP 0
-#define __CONSOLE_APP 1
-#define __GUI_APP 2
-__MINGW_IMPORT void __set_app_type(int);
-#endif /* __MSVCRT__ */
-
-/* Global _fmode for this .exe, not the one in msvcrt.dll,
- The default is set in txtmode.o in libmingw32.a */
-/* Override the dllimport'd declarations in stdlib.h */
-#undef _fmode
-extern int _fmode;
-#ifdef __MSVCRT__
-extern int* __p__fmode(void); /* To access the dll _fmode */
-#endif
-
-/*
- * Setup the default file handles to have the _CRT_fmode mode, as well as
- * any new files created by the user.
- */
-extern int _CRT_fmode;
-
-static void
-_mingw32_init_fmode (void)
-{
- /* Don't set the std file mode if the user hasn't set any value for it. */
- if (_CRT_fmode)
- {
- _fmode = _CRT_fmode;
-
- /*
- * This overrides the default file mode settings for stdin,
- * stdout and stderr. At first I thought you would have to
- * test with isatty, but it seems that the DOS console at
- * least is smart enough to handle _O_BINARY stdout and
- * still display correctly.
- */
- if (stdin)
- {
- _setmode (_fileno (stdin), _CRT_fmode);
- }
- if (stdout)
- {
- _setmode (_fileno (stdout), _CRT_fmode);
- }
- if (stderr)
- {
- _setmode (_fileno (stderr), _CRT_fmode);
- }
- }
-
- /* Now sync the dll _fmode to the one for this .exe. */
-#ifdef __MSVCRT__
- *__p__fmode() = _fmode;
-#else
- *_imp___fmode_dll = _fmode;
-#endif
-}
-
-/* This function will be called when a trap occurs. Thanks to Jacob
- Navia for his contribution. */
-static CALLBACK long
-_gnu_exception_handler (EXCEPTION_POINTERS * exception_data)
-{
- void (*old_handler) (int);
- long action = EXCEPTION_CONTINUE_SEARCH;
- int reset_fpu = 0;
-
- switch (exception_data->ExceptionRecord->ExceptionCode)
- {
- case EXCEPTION_ACCESS_VIOLATION:
- /* test if the user has set SIGSEGV */
- old_handler = signal (SIGSEGV, SIG_DFL);
- if (old_handler == SIG_IGN)
- {
- /* this is undefined if the signal was raised by anything other
- than raise (). */
- signal (SIGSEGV, SIG_IGN);
- action = EXCEPTION_CONTINUE_EXECUTION;
- }
- else if (old_handler != SIG_DFL)
- {
- /* This means 'old' is a user defined function. Call it */
- (*old_handler) (SIGSEGV);
- action = EXCEPTION_CONTINUE_EXECUTION;
- }
- break;
-
- case EXCEPTION_ILLEGAL_INSTRUCTION:
- case EXCEPTION_PRIV_INSTRUCTION:
- /* test if the user has set SIGILL */
- old_handler = signal (SIGILL, SIG_DFL);
- if (old_handler == SIG_IGN)
- {
- /* this is undefined if the signal was raised by anything other
- than raise (). */
- signal (SIGILL, SIG_IGN);
- action = EXCEPTION_CONTINUE_EXECUTION;
- }
- else if (old_handler != SIG_DFL)
- {
- /* This means 'old' is a user defined function. Call it */
- (*old_handler) (SIGILL);
- action = EXCEPTION_CONTINUE_EXECUTION;
- }
- break;
-
- case EXCEPTION_FLT_INVALID_OPERATION:
- case EXCEPTION_FLT_DIVIDE_BY_ZERO:
- case EXCEPTION_FLT_DENORMAL_OPERAND:
- case EXCEPTION_FLT_OVERFLOW:
- case EXCEPTION_FLT_UNDERFLOW:
- case EXCEPTION_FLT_INEXACT_RESULT:
- reset_fpu = 1;
- /* fall through. */
-
- case EXCEPTION_INT_DIVIDE_BY_ZERO:
- /* test if the user has set SIGFPE */
- old_handler = signal (SIGFPE, SIG_DFL);
- if (old_handler == SIG_IGN)
- {
- signal (SIGFPE, SIG_IGN);
- if (reset_fpu)
- _fpreset ();
- action = EXCEPTION_CONTINUE_EXECUTION;
- }
- else if (old_handler != SIG_DFL)
- {
- /* This means 'old' is a user defined function. Call it */
- (*old_handler) (SIGFPE);
- action = EXCEPTION_CONTINUE_EXECUTION;
- }
- break;
-
- default:
- break;
- }
- return action;
-}
-
-/*
- * The function mainCRTStartup is the entry point for all console programs.
- */
-static void __attribute__((noreturn))
-__mingw_CRTStartup (void)
-{
- int nRet;
-
- /*
- * Set up the top-level exception handler so that signal handling
- * works as expected. The mapping between ANSI/POSIX signals and
- * Win32 SE is not 1-to-1, so caveat emptore.
- *
- */
- SetUnhandledExceptionFilter (_gnu_exception_handler);
-
- /*
- * Initialize floating point unit.
- */
- __cpu_features_init (); /* Do we have SSE, etc.*/
- _fpreset (); /* Supplied by the runtime library. */
-
- /*
- * Set up __argc, __argv and _environ.
- */
- _mingw32_init_mainargs ();
-
- /*
- * Sets the default file mode.
- * If _CRT_fmode is set, also set mode for stdin, stdout
- * and stderr, as well
- * NOTE: DLLs don't do this because that would be rude!
- */
- _mingw32_init_fmode ();
-
- /* Adust references to dllimported data that have non-zero offsets. */
- _pei386_runtime_relocator ();
-
- /* Align the stack to 16 bytes for the sake of SSE ops in main
- or in functions inlined into main. */
- asm __volatile__ ("andl $-16, %%esp" : : : "%esp");
-
- /* From libgcc.a, __main calls global class constructors via
- __do_global_ctors, This in turn registers __do_global_dtors
- as the first entry of the app's atexit table. We do this
- explicitly at app startup rather than rely on gcc to generate
- the call in main's prologue, since main may be imported from a dll
- which has its own __do_global_ctors. */
- __main ();
-
- /*
- * Call the main function. If the user does not supply one
- * the one in the 'libmingw32.a' library will be linked in, and
- * that one calls WinMain. See main.c in the 'lib' dir
- * for more details.
- */
- nRet = main (_argc, _argv, environ);
-
- /*
- * Perform exit processing for the C library. This means
- * flushing output and calling 'atexit' registered functions.
- */
- _cexit ();
-
- ExitProcess (nRet);
-}
-
-/*
- * The function mainCRTStartup is the entry point for all console programs.
- */
-void
-mainCRTStartup (void)
-{
-#ifdef __MSVCRT__
- __set_app_type (__CONSOLE_APP);
-#endif
- __mingw_CRTStartup ();
-}
-
-/*
- * For now the GUI startup function is the same as the console one.
- * This simply gets rid of the annoying warning about not being able
- * to find WinMainCRTStartup when linking GUI applications.
- */
-void
-WinMainCRTStartup (void)
-{
-#ifdef __MSVCRT__
- __set_app_type (__GUI_APP);
-#endif
- __mingw_CRTStartup ();
-}
-
-/*
- * We force use of library version of atexit, which is only
- * visible in import lib as _imp__atexit
- */
-extern int (*_imp__atexit)(void (*)(void));
-int atexit (void (* pfn )(void) )
-{
- return ( (*_imp__atexit)(pfn));
-}
-
-/* Likewise for non-ANSI _onexit */
-extern _onexit_t (*_imp___onexit)(_onexit_t);
-_onexit_t
-_onexit (_onexit_t pfn )
-{
- return (*_imp___onexit)(pfn);
-}
diff --git a/winsup/mingw/crtdll.def b/winsup/mingw/crtdll.def
deleted file mode 100644
index dbd18ec..0000000
--- a/winsup/mingw/crtdll.def
+++ /dev/null
@@ -1,695 +0,0 @@
-;
-;* crtdll.def
-;* This file has no copyright assigned and is placed in the Public Domain.
-;* This file is a part of the mingw-runtime package.
-;* No warranty is given; refer to the file DISCLAIMER within the package.
-;
-; Exports from crtdll.dll from Windows 95 SYSTEM directory. Hopefully this
-; should also work with the crtdll provided with Windows NT.
-;
-; NOTE: The crtdll is OBSOLETE and msvcrt should be used instead. The msvcrt
-; is available for free download from Microsoft Corporation and will work on
-; Windows 95. Support for the crtdll is deprecated and this file may be
-; deleted in future versions.
-;
-; These three functions appear to be name mangled in some way, so GCC is
-; probably not going to be able to use them in any case.
-;
-; ??2@YAPAXI@Z
-; ??3@YAXPAX@Z
-; ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z
-;
-; These are functions for which I have not yet written prototypes or
-; otherwise set up (they are still included below though unlike those
-; first three).
-;
-; _CIacos
-; _CIasin
-; _CIatan
-; _CIatan2
-; _CIcos
-; _CIcosh
-; _CIexp
-; _CIfmod
-; _CIlog
-; _CIlog10
-; _CIpow
-; _CIsin
-; _CIsinh
-; _CIsqrt
-; _CItan
-; _CItanh
-; __dllonexit
-; __mb_cur_max_dll
-; __threadhandle
-; __threadid
-; _abnormal_termination
-; _acmdln_dll
-; _aexit_rtn_dll
-; _amsg_exit
-; _commit
-; _commode_dll
-; _cpumode_dll
-; _ctype
-; _expand
-; _fcloseall
-; _filbuf
-; _fileinfo_dll
-; _flsbuf
-; _flushall
-; _fmode_dll
-; _fpieee_flt
-; _fsopen
-; _ftol
-; _getdiskfree
-; _getdllprocaddr
-; _getdrive
-; _getdrives
-; _getsystime
-; _initterm
-; _ismbbalnum
-; _ismbbalpha
-; _ismbbgraph
-; _ismbbkalnum
-; _ismbbkana
-; _ismbbkpunct
-; _ismbblead
-; _ismbbprint
-; _ismbbpunct
-; _ismbbtrail
-; _ismbcalpha
-; _ismbcdigit
-; _ismbchira
-; _ismbckata
-; _ismbcl0
-; _ismbcl1
-; _ismbcl2
-; _ismbclegal
-; _ismbclower
-; _ismbcprint
-; _ismbcspace
-; _ismbcsymbol
-; _ismbcupper
-; _ismbslead
-; _ismbstrail
-; _lfind
-; _loaddll
-; _lrotl
-; _lrotr
-; _lsearch
-; _makepath
-; _matherr
-; _mbbtombc
-; _mbbtype
-; _mbccpy
-; _mbcjistojms
-; _mbcjmstojis
-; _mbclen
-; _mbctohira
-; _mbctokata
-; _mbctolower
-; _mbctombb
-; _mbctoupper
-; _mbctype
-; _mbsbtype
-; _mbscat
-; _mbscmp
-; _mbscpy
-; _mbscspn
-; _mbsdec
-; _mbsdup
-; _mbsicmp
-; _mbsinc
-; _mbslen
-; _mbslwr
-; _mbsnbcat
-; _mbsnbcmp
-; _mbsnbcnt
-; _mbsnbcpy
-; _mbsnbicmp
-; _mbsnbset
-; _mbsnccnt
-; _mbsncmp
-; _mbsncpy
-; _mbsnextc
-; _mbsnicmp
-; _mbsninc
-; _mbsnset
-; _mbspbrk
-; _mbsrchr
-; _mbsrev
-; _mbsset
-; _mbsspn
-; _mbsspnp
-; _mbsstr
-; _mbstrlen
-; _mbsupr
-; _onexit
-; _osversion_dll
-; _pctype_dll
-; _purecall
-; _pwctype_dll
-; _rmtmp
-; _rotl
-; _rotr
-; _setsystime
-; _snprintf
-; _snwprintf
-; _splitpath
-; _strdate
-; _strdec
-; _strinc
-; _strncnt
-; _strnextc
-; _strninc
-; _strspnp
-; _strtime
-; _tempnam
-; _ultoa
-; _unloaddll
-; _vsnprintf
-; _vsnwprintf
-; _wtoi
-; _wtol
-;
-EXPORTS
-_CIacos
-_CIasin
-_CIatan
-_CIatan2
-_CIcos
-_CIcosh
-_CIexp
-_CIfmod
-_CIlog
-_CIlog10
-_CIpow
-_CIsin
-_CIsinh
-_CIsqrt
-_CItan
-_CItanh
-_HUGE_dll DATA
-_XcptFilter
-__GetMainArgs
-__argc_dll DATA
-__argv_dll DATA
-__dllonexit
-__doserrno
-__fpecode
-__isascii
-__iscsym
-__iscsymf
-__mb_cur_max_dll DATA
-__pxcptinfoptrs
-__threadhandle
-__threadid
-__toascii
-_abnormal_termination
-_access
-_acmdln_dll DATA
-_aexit_rtn_dll DATA
-_amsg_exit
-_assert
-_basemajor_dll DATA
-_baseminor_dll DATA
-_baseversion_dll DATA
-_beep
-_beginthread
-_c_exit
-_cabs
-_cexit
-_cgets
-_chdir
-_chdrive
-_chgsign
-_chmod
-_chsize
-_clearfp
-_close
-_commit
-_commode_dll DATA
-_control87
-_controlfp
-_copysign
-_cprintf
-_cpumode_dll DATA
-_cputs
-_creat
-_cscanf
-_ctype
-_cwait
-_daylight_dll DATA
-_dup
-_dup2
-_ecvt
-_endthread
-_environ_dll DATA
-_eof
-_errno
-_except_handler2
-_execl
-_execle
-_execlp
-_execlpe
-_execv
-_execve
-_execvp
-_execvpe
-_exit
-_expand
-_fcloseall
-_fcvt
-_fdopen
-_fgetchar
-_fgetwchar
-_filbuf
-_fileinfo_dll DATA
-_filelength
-_fileno
-_findclose
-_findfirst
-_findnext
-_finite
-_flsbuf
-_flushall
-_fmode_dll DATA
-_fpclass
-_fpieee_flt
-_fpreset DATA
-_fputchar
-_fputwchar
-_fsopen
-_fstat
-_ftime
-_ftol
-_fullpath
-_futime
-_gcvt
-_get_osfhandle
-_getch
-_getche
-_getcwd
-_getdcwd
-_getdiskfree
-_getdllprocaddr
-_getdrive
-_getdrives
-_getpid
-_getsystime
-_getw
-_global_unwind2
-_heapchk
-_heapmin
-_heapset
-_heapwalk
-_hypot
-_initterm
-_iob DATA
-_isatty
-_isctype
-_ismbbalnum
-_ismbbalpha
-_ismbbgraph
-_ismbbkalnum
-_ismbbkana
-_ismbbkpunct
-_ismbblead
-_ismbbprint
-_ismbbpunct
-_ismbbtrail
-_ismbcalpha
-_ismbcdigit
-_ismbchira
-_ismbckata
-_ismbcl0
-_ismbcl1
-_ismbcl2
-_ismbclegal
-_ismbclower
-_ismbcprint
-_ismbcspace
-_ismbcsymbol
-_ismbcupper
-_ismbslead
-_ismbstrail
-_isnan
-_itoa
-_j0
-_j1
-_jn
-_kbhit
-_lfind
-_loaddll
-_local_unwind2
-_locking
-_logb
-_lrotl
-_lrotr
-_lsearch
-_lseek
-_ltoa
-_makepath
-_matherr
-_mbbtombc
-_mbbtype
-_mbccpy
-_mbcjistojms
-_mbcjmstojis
-_mbclen
-_mbctohira
-_mbctokata
-_mbctolower
-_mbctombb
-_mbctoupper
-_mbctype
-_mbsbtype
-_mbscat
-_mbschr
-_mbscmp
-_mbscpy
-_mbscspn
-_mbsdec
-_mbsdup
-_mbsicmp
-_mbsinc
-_mbslen
-_mbslwr
-_mbsnbcat
-_mbsnbcmp
-_mbsnbcnt
-_mbsnbcpy
-_mbsnbicmp
-_mbsnbset
-_mbsncat
-_mbsnccnt
-_mbsncmp
-_mbsncpy
-_mbsnextc
-_mbsnicmp
-_mbsninc
-_mbsnset
-_mbspbrk
-_mbsrchr
-_mbsrev
-_mbsset
-_mbsspn
-_mbsspnp
-_mbsstr
-_mbstok
-_mbstrlen
-_mbsupr
-_memccpy
-_memicmp
-_mkdir
-_mktemp
-_msize
-_nextafter
-_onexit DATA
-_open
-_open_osfhandle
-_osmajor_dll DATA
-_osminor_dll DATA
-_osmode_dll DATA
-_osver_dll DATA
-_osversion_dll DATA
-_pclose
-_pctype_dll DATA
-_pgmptr_dll DATA
-_pipe
-_popen
-_purecall
-_putch
-_putenv
-_putw
-_pwctype_dll DATA
-_read
-_rmdir
-_rmtmp
-_rotl
-_rotr
-_scalb
-_searchenv
-_seterrormode
-_setjmp
-_setmode
-_setsystime
-_sleep
-_snprintf
-_snwprintf
-_sopen
-_spawnl
-_spawnle
-_spawnlp
-_spawnlpe
-_spawnv
-_spawnve
-_spawnvp
-_spawnvpe
-_splitpath
-_stat
-_statusfp
-_strcmpi
-_strdate
-_strdec
-_strdup
-_strerror
-_stricmp
-_stricoll
-_strinc
-_strlwr
-_strncnt
-_strnextc
-_strnicmp
-_strninc
-_strnset
-_strrev
-_strset
-_strspnp
-_strtime
-_strupr
-_swab
-_sys_errlist DATA
-_sys_nerr_dll DATA
-_tell
-_tempnam
-_timezone_dll DATA
-_tolower
-_toupper
-_tzname DATA
-_tzset
-_ultoa
-_umask
-_ungetch
-_unlink
-_unloaddll
-_utime
-_vsnprintf
-_vsnwprintf
-_wcsdup
-_wcsicmp
-_wcsicoll
-_wcslwr
-_wcsnicmp
-_wcsnset
-_wcsrev
-_wcsset
-_wcsupr
-_winmajor_dll DATA
-_winminor_dll DATA
-_winver_dll DATA
-_write
-_wtoi
-_wtol
-_y0
-_y1
-_yn
-abort
-abs
-acos
-asctime
-asin
-atan
-atan2
-atexit DATA
-atof
-atoi
-atol
-bsearch
-calloc
-ceil
-clearerr
-clock
-cos
-cosh
-ctime
-difftime
-div
-exit
-exp
-fabs
-fclose
-feof
-ferror
-fflush
-fgetc
-fgetpos
-fgets
-fgetwc
-floor
-fmod
-fopen
-fprintf
-fputc
-fputs
-fputwc
-fread
-free
-freopen
-frexp
-fscanf
-fseek
-fsetpos
-ftell
-fwprintf
-fwrite
-fwscanf
-getc
-getchar
-getenv
-gets
-gmtime
-is_wctype
-isalnum
-isalpha
-iscntrl
-isdigit
-isgraph
-isleadbyte
-islower
-isprint
-ispunct
-isspace
-isupper
-iswalnum
-iswalpha
-iswascii
-iswcntrl
-iswctype
-iswdigit
-iswgraph
-iswlower
-iswprint
-iswpunct
-iswspace
-iswupper
-iswxdigit
-isxdigit
-labs
-ldexp
-ldiv
-localeconv
-localtime
-log
-log10
-longjmp
-malloc
-mblen
-mbstowcs
-mbtowc
-memchr
-memcmp
-memcpy
-memmove
-memset
-mktime
-modf
-perror
-pow
-printf
-putc
-putchar
-puts
-qsort
-raise
-rand
-realloc
-remove
-rename
-rewind
-scanf
-setbuf
-setlocale
-setvbuf
-signal
-sin
-sinh
-sprintf
-sqrt
-srand
-sscanf
-strcat
-strchr
-strcmp
-strcoll
-strcpy
-strcspn
-strerror
-strftime
-strlen
-strncat
-strncmp
-strncpy
-strpbrk
-strrchr
-strspn
-strstr
-strtod
-strtok
-strtol
-strtoul
-strxfrm
-swprintf
-swscanf
-system
-tan
-tanh
-time
-tmpfile
-tmpnam
-tolower
-toupper
-towlower
-towupper
-ungetc
-ungetwc
-vfprintf
-vfwprintf
-vprintf
-vsprintf
-vswprintf
-vwprintf
-wcscat
-wcschr
-wcscmp
-wcscoll
-wcscpy
-wcscspn
-wcsftime
-wcslen
-wcsncat
-wcsncmp
-wcsncpy
-wcspbrk
-wcsrchr
-wcsspn
-wcsstr
-wcstod
-wcstok
-wcstol
-wcstombs
-wcstoul
-wcsxfrm
-wctomb
-wprintf
-wscanf
diff --git a/winsup/mingw/crtmt.c b/winsup/mingw/crtmt.c
deleted file mode 100644
index 116d850..0000000
--- a/winsup/mingw/crtmt.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * crtmt.c
- *
- * This object file defines _CRT_MT to have a value of 1, which will
- * turn on MT support in GCC runtime. This is only linked in when
- * you specify -mthreads when linking with gcc. The Mingw support
- * library, libmingw32.a, contains the complement, crtst.o, which
- * sets this variable to 0.
- *
- * Mumit Khan <khan@nanotech.wisc.edu>
- *
- */
-
-int _CRT_MT = 1;
diff --git a/winsup/mingw/crtst.c b/winsup/mingw/crtst.c
deleted file mode 100644
index 4835b09..0000000
--- a/winsup/mingw/crtst.c
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * crtst.c
- *
- * This object file defines _CRT_MT to have a value of 0, which will
- * turn off MT support in GCC runtime. This is linked by default unless
- * you specify -mthreads when linking with gcc.
- *
- * Mumit Khan <khan@nanotech.wisc.edu>
- *
- */
-
-int _CRT_MT = 0;
diff --git a/winsup/mingw/dllcrt1.c b/winsup/mingw/dllcrt1.c
deleted file mode 100644
index dda8a24..0000000
--- a/winsup/mingw/dllcrt1.c
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * dllcrt1.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Initialization code for DLLs.
- *
- */
-#include <stdlib.h>
-#include <stdio.h>
-#include <io.h>
-#include <process.h>
-#include <errno.h>
-#include <windows.h>
-
-/* Unlike normal crt1, I don't initialize the FPU, because the process
- * should have done that already. I also don't set the file handle modes,
- * because that would be rude. */
-
-#ifdef __GNUC__
-extern void __main ();
-extern void __do_global_dtors ();
-#endif
-
-typedef void (* p_atexit_fn )(void);
-static p_atexit_fn* first_atexit;
-static p_atexit_fn* next_atexit;
-
-static void
-__dll_exit (void);
-
-/* This is based on the function in the Wine project's exit.c */
-p_atexit_fn __dllonexit (p_atexit_fn, p_atexit_fn**, p_atexit_fn**);
-
-
-extern BOOL WINAPI DllMain (HANDLE, DWORD, LPVOID);
-
-extern void _pei386_runtime_relocator (void);
-
-BOOL WINAPI
-DllMainCRTStartup (HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
-{
- BOOL bRet;
-
- if (dwReason == DLL_PROCESS_ATTACH)
- {
-
-#ifdef DEBUG
- printf ("%s: DLL_PROCESS_ATTACH (%d)\n", __FUNCTION__);
-#endif
-
- /* Initialize private atexit table for this dll.
- 32 is min size required by ANSI */
-
- first_atexit = (p_atexit_fn*) malloc (32 * sizeof (p_atexit_fn));
- if (first_atexit == NULL ) /* can't allocate memory */
- {
- errno=ENOMEM;
- return FALSE;
- }
- *first_atexit = NULL;
- next_atexit = first_atexit;
-
- /* Adust references to dllimported data (from other DLL's)
- that have non-zero offsets. */
- _pei386_runtime_relocator ();
-
-#ifdef __GNUC__
- /* From libgcc.a, __main calls global class constructors,
- __do_global_ctors, which registers __do_global_dtors
- as the first entry of the private atexit table we
- have just initialised */
- __main ();
-
-#endif
- }
-
- /*
- * Call the user-supplied DllMain subroutine.
- * This has to come after initialization of atexit table and
- * registration of global constructors.
- * NOTE: DllMain is optional, so libmingw32.a includes a stub
- * which will be used if the user does not supply one.
- */
-
- bRet = DllMain (hDll, dwReason, lpReserved);
- /* Handle case where DllMain returns FALSE on attachment attempt. */
-
- if ( (dwReason == DLL_PROCESS_ATTACH) && !bRet)
- {
-#ifdef DEBUG
- printf ("%s: DLL_PROCESS_ATTACH failed, cleaning up\n", __FUNCTION__);
-#endif
-
- __dll_exit (); /* Cleanup now. This will set first_atexit to NULL so we
- know we've cleaned up */
- }
-
- if (dwReason == DLL_PROCESS_DETACH)
- {
-#ifdef DEBUG
- printf ("%s: DLL_PROCESS_DETACH (%d)\n", __FUNCTION__);
-#endif
- /* If not attached, return FALSE. Cleanup already done above
- if failed attachment attempt. */
- if (! first_atexit )
- bRet = FALSE;
- else
- /*
- * We used to call __do_global_dtors () here. This is
- * no longer necessary since __do_global_dtors is now
- * registered at start (last out) of private atexit table.
- */
- __dll_exit ();
- }
- return bRet;
-}
-
-static
-void
-__dll_exit(void)
-/* Run LIFO terminators registered in private atexit table */
-{
- if ( first_atexit )
- {
- p_atexit_fn* __last = next_atexit - 1;
- while ( __last >= first_atexit )
- {
- if ( *__last != NULL )
- {
-#ifdef DEBUG
- printf ("%s: Calling exit function 0x%x from 0x%x\n",
- __FUNCTION__, (unsigned)(*__last),(unsigned)__last);
-#endif
- (**__last) ();
- }
- __last--;
- }
- free ( first_atexit ) ;
- first_atexit = NULL ;
- }
- /*
- Make sure output buffers opened by DllMain or
- atexit-registered functions are flushed before detaching,
- otherwise we can have problems with redirected output.
- */
- fflush (NULL);
-}
-
-/*
- * The atexit exported from msvcrt.dll causes problems in DLLs.
- * Here, we override the exported version of atexit with one that passes the
- * private table initialised in DllMainCRTStartup to __dllonexit.
- * That means we have to hide the mscvrt.dll atexit because the
- * atexit defined here gets __dllonexit from the same lib.
- */
-
-int
-atexit (p_atexit_fn pfn )
-{
-#ifdef DEBUG
- printf ("%s: registering exit function 0x%x at 0x%x\n",
- __FUNCTION__, (unsigned)pfn, (unsigned)next_atexit);
-#endif
- return (__dllonexit (pfn, &first_atexit, &next_atexit)
- == NULL ? -1 : 0 );
-}
-
-/*
- * Likewise for non-ANSI function _onexit that may be called by
- * code in the dll.
- */
-
-_onexit_t
-_onexit (_onexit_t pfn )
-{
-#ifdef DEBUG
- printf ("%s: registering exit function 0x%x at 0x%x\n",
- __FUNCTION__, (unsigned)pfn, (unsigned)next_atexit);
-#endif
- return ((_onexit_t) __dllonexit ((p_atexit_fn)pfn, &first_atexit, &next_atexit));
-}
diff --git a/winsup/mingw/dllmain.c b/winsup/mingw/dllmain.c
deleted file mode 100644
index 3036823..0000000
--- a/winsup/mingw/dllmain.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * dllmain.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * A stub DllMain function which will be called by DLLs which do not
- * have a user supplied DllMain.
- *
- */
-
-#include <windows.h>
-
-BOOL WINAPI
-DllMain (HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
-{
- return TRUE;
-}
-
diff --git a/winsup/mingw/gccmain.c b/winsup/mingw/gccmain.c
deleted file mode 100644
index 601d15a..0000000
--- a/winsup/mingw/gccmain.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * gccmain.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * A separate version of __main, __do_global_ctors and __do_global_dtors for
- * Mingw32 for use with Cygwin32 b19. Hopefully this object file will only
- * be linked if the libgcc.a doesn't include __main, __do_global_dtors and
- * __do_global_ctors.
- *
- */
-
-/* Needed for the atexit prototype. */
-#include <stdlib.h>
-
-typedef void (*func_ptr) (void);
-extern func_ptr __CTOR_LIST__[];
-extern func_ptr __DTOR_LIST__[];
-
-void
-__do_global_dtors (void)
-{
- static func_ptr *p = __DTOR_LIST__ + 1;
-
- /*
- * Call each destructor in the destructor list until a null pointer
- * is encountered.
- */
- while (*p)
- {
- (*(p)) ();
- p++;
- }
-}
-
-void
-__do_global_ctors (void)
-{
- unsigned long nptrs = (unsigned long) __CTOR_LIST__[0];
- unsigned i;
-
- /*
- * If the first entry in the constructor list is -1 then the list
- * is terminated with a null entry. Otherwise the first entry was
- * the number of pointers in the list.
- */
- if (nptrs == -1)
- {
- for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++)
- ;
- }
-
- /*
- * Go through the list backwards calling constructors.
- */
- for (i = nptrs; i >= 1; i--)
- {
- __CTOR_LIST__[i] ();
- }
-
- /*
- * Register the destructors for processing on exit.
- */
- atexit (__do_global_dtors);
-}
-
-static int initialized = 0;
-
-void
-__main (void)
-{
- if (!initialized)
- {
- initialized = 1;
- __do_global_ctors ();
- }
-}
-
diff --git a/winsup/mingw/include/_mingw.h b/winsup/mingw/include/_mingw.h
deleted file mode 100644
index ec91c6c..0000000
--- a/winsup/mingw/include/_mingw.h
+++ /dev/null
@@ -1,240 +0,0 @@
-#ifndef __MINGW_H
-/*
- * _mingw.h
- *
- * Mingw specific macros included by ALL include files.
- *
- * This file is part of the Mingw32 package.
- *
- * Contributors:
- * Created by Mumit Khan <khan@xraylith.wisc.edu>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-#define __MINGW_H
-
-#define __MINGW32_VERSION 3.15.1
-#define __MINGW32_MAJOR_VERSION 3
-#define __MINGW32_MINOR_VERSION 15
-#define __MINGW32_PATCHLEVEL 1
-
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-/* These are defined by the user (or the compiler)
- to specify how identifiers are imported from a DLL.
-
- __DECLSPEC_SUPPORTED Defined if dllimport attribute is supported.
- __MINGW_IMPORT The attribute definition to specify imported
- variables/functions.
- _CRTIMP As above. For MS compatibility.
- __MINGW32_VERSION Runtime version.
- __MINGW32_MAJOR_VERSION Runtime major version.
- __MINGW32_MINOR_VERSION Runtime minor version.
- __MINGW32_BUILD_DATE Runtime build date.
-
- Macros to enable MinGW features which deviate from standard MSVC
- compatible behaviour; these may be specified directly in user code,
- activated implicitly, (e.g. by specifying _POSIX_C_SOURCE or such),
- or by inclusion in __MINGW_FEATURES__:
-
- __USE_MINGW_ANSI_STDIO Select a more ANSI C99 compatible
- implementation of printf() and friends.
-
- Other macros:
-
- __int64 define to be long long. Using a typedef
- doesn't work for "unsigned __int64"
-
- All headers should include this first, and then use __DECLSPEC_SUPPORTED
- to choose between the old ``__imp__name'' style or __MINGW_IMPORT
- style declarations. */
-
-
-/* Manifest definitions identifying the flag bits, controlling activation
- * of MinGW features, as specified by the user in __MINGW_FEATURES__.
- */
-#define __MINGW_ANSI_STDIO__ 0x0000000000000001ULL
-/*
- * The following three are not yet formally supported; they are
- * included here, to document anticipated future usage.
- */
-#define __MINGW_LC_EXTENSIONS__ 0x0000000000000050ULL
-#define __MINGW_LC_MESSAGES__ 0x0000000000000010ULL
-#define __MINGW_LC_ENVVARS__ 0x0000000000000040ULL
-
-/* Try to avoid problems with outdated checks for GCC __attribute__ support. */
-#undef __attribute__
-
-#ifndef __GNUC__
-# ifndef __MINGW_IMPORT
-# define __MINGW_IMPORT __declspec(dllimport)
-# endif
-# ifndef _CRTIMP
-# define _CRTIMP __declspec(dllimport)
-# endif
-# define __DECLSPEC_SUPPORTED
-# define __attribute__(x) /* nothing */
-#else /* __GNUC__ */
-# ifdef __declspec
-# ifndef __MINGW_IMPORT
- /* Note the extern. This is needed to work around GCC's
- limitations in handling dllimport attribute. */
-# define __MINGW_IMPORT extern __attribute__ ((__dllimport__))
-# endif
-# ifndef _CRTIMP
-# ifdef __USE_CRTIMP
-# define _CRTIMP __attribute__ ((dllimport))
-# else
-# define _CRTIMP
-# endif
-# endif
-# define __DECLSPEC_SUPPORTED
-# else /* __declspec */
-# undef __DECLSPEC_SUPPORTED
-# undef __MINGW_IMPORT
-# ifndef _CRTIMP
-# define _CRTIMP
-# endif
-# endif /* __declspec */
-
-/*
- The next two defines can cause problems if user code adds the __cdecl attribute
- like so:
- void __attribute__ ((__cdecl)) foo(void);
-*/
-# ifndef __cdecl
-# define __cdecl __attribute__ ((__cdecl__))
-# endif
-# ifndef __stdcall
-# define __stdcall __attribute__ ((__stdcall__))
-# endif
-# ifndef __int64
-# define __int64 long long
-# endif
-# ifndef __int32
-# define __int32 long
-# endif
-# ifndef __int16
-# define __int16 short
-# endif
-# ifndef __int8
-# define __int8 char
-# endif
-# ifndef __small
-# define __small char
-# endif
-# ifndef __hyper
-# define __hyper long long
-# endif
-#endif /* __GNUC__ */
-
-#if defined (__GNUC__) && defined (__GNUC_MINOR__)
-#define __MINGW_GNUC_PREREQ(major, minor) \
- (__GNUC__ > (major) \
- || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
-#else
-#define __MINGW_GNUC_PREREQ(major, minor) 0
-#endif
-
-#ifdef __cplusplus
-# define __CRT_INLINE inline
-#else
-# if __GNUC_STDC_INLINE__
-# define __CRT_INLINE extern inline __attribute__((__gnu_inline__))
-# else
-# define __CRT_INLINE extern __inline__
-# endif
-#endif
-
-#ifdef __cplusplus
-# define __UNUSED_PARAM(x)
-#else
-# ifdef __GNUC__
-# define __UNUSED_PARAM(x) x __attribute__ ((__unused__))
-# else
-# define __UNUSED_PARAM(x) x
-# endif
-#endif
-
-#ifdef __GNUC__
-#define __MINGW_ATTRIB_NORETURN __attribute__ ((__noreturn__))
-#define __MINGW_ATTRIB_CONST __attribute__ ((__const__))
-#else
-#define __MINGW_ATTRIB_NORETURN
-#define __MINGW_ATTRIB_CONST
-#endif
-
-#if __MINGW_GNUC_PREREQ (3, 0)
-#define __MINGW_ATTRIB_MALLOC __attribute__ ((__malloc__))
-#define __MINGW_ATTRIB_PURE __attribute__ ((__pure__))
-#else
-#define __MINGW_ATTRIB_MALLOC
-#define __MINGW_ATTRIB_PURE
-#endif
-
-/* Attribute `nonnull' was valid as of gcc 3.3. We don't use GCC's
- variadiac macro facility, because variadic macros cause syntax
- errors with --traditional-cpp. */
-#if __MINGW_GNUC_PREREQ (3, 3)
-#define __MINGW_ATTRIB_NONNULL(arg) __attribute__ ((__nonnull__ (arg)))
-#else
-#define __MINGW_ATTRIB_NONNULL(arg)
-#endif /* GNUC >= 3.3 */
-
-#if __MINGW_GNUC_PREREQ (3, 1)
-#define __MINGW_ATTRIB_DEPRECATED __attribute__ ((__deprecated__))
-#else
-#define __MINGW_ATTRIB_DEPRECATED
-#endif /* GNUC >= 3.1 */
-
-#if __MINGW_GNUC_PREREQ (3, 3)
-#define __MINGW_NOTHROW __attribute__ ((__nothrow__))
-#else
-#define __MINGW_NOTHROW
-#endif /* GNUC >= 3.3 */
-
-
-/* TODO: Mark (almost) all CRT functions as __MINGW_NOTHROW. This will
-allow GCC to optimize away some EH unwind code, at least in DW2 case. */
-
-#ifndef __MSVCRT_VERSION__
-/* High byte is the major version, low byte is the minor. */
-# define __MSVCRT_VERSION__ 0x0600
-#endif
-
-/* Activation of MinGW specific extended features:
- */
-#ifndef __USE_MINGW_ANSI_STDIO
-/*
- * If user didn't specify it explicitly...
- */
-# if defined __STRICT_ANSI__ || defined _ISOC99_SOURCE \
- || defined _POSIX_SOURCE || defined _POSIX_C_SOURCE \
- || defined _XOPEN_SOURCE || defined _XOPEN_SOURCE_EXTENDED \
- || defined _GNU_SOURCE || defined _BSD_SOURCE \
- || defined _SVID_SOURCE
- /*
- * but where any of these source code qualifiers are specified,
- * then assume ANSI I/O standards are preferred over Microsoft's...
- */
-# define __USE_MINGW_ANSI_STDIO 1
-# else
- /*
- * otherwise use whatever __MINGW_FEATURES__ specifies...
- */
-# define __USE_MINGW_ANSI_STDIO (__MINGW_FEATURES__ & __MINGW_ANSI_STDIO__)
-# endif
-#endif
-
-#endif /* __MINGW_H */
diff --git a/winsup/mingw/include/assert.h b/winsup/mingw/include/assert.h
deleted file mode 100644
index 0cf09fe..0000000
--- a/winsup/mingw/include/assert.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * assert.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Define the assert macro for debug output.
- *
- */
-
-/* We should be able to include this file multiple times to allow the assert
- macro to be enabled/disabled for different parts of code. So don't add a
- header guard. */
-
-#ifndef RC_INVOKED
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#undef assert
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef NDEBUG
-/*
- * If not debugging, assert does nothing.
- */
-#define assert(x) ((void)0)
-
-#else /* debugging enabled */
-
-/*
- * CRTDLL nicely supplies a function which does the actual output and
- * call to abort.
- */
-_CRTIMP void __cdecl __MINGW_NOTHROW _assert (const char*, const char*, int) __MINGW_ATTRIB_NORETURN;
-
-/*
- * Definition of the assert macro.
- */
-#define assert(e) ((e) ? (void)0 : _assert(#e, __FILE__, __LINE__))
-
-#endif /* NDEBUG */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
diff --git a/winsup/mingw/include/complex.h b/winsup/mingw/include/complex.h
deleted file mode 100644
index 93f2a80..0000000
--- a/winsup/mingw/include/complex.h
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * complex.h
- *
- * This file is part of the Mingw32 package.
- *
- * Contributors:
- * Created by Danny Smith <dannysmith@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef _COMPLEX_H_
-#define _COMPLEX_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-/* These macros are specified by C99 standard */
-
-#ifndef __cplusplus
-#define complex _Complex
-#endif
-
-#define _Complex_I (0.0F + 1.0iF)
-
-/* GCC doesn't support _Imaginary type yet, so we don't
- define _Imaginary_I */
-
-#define I _Complex_I
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef RC_INVOKED
-
-double __MINGW_ATTRIB_CONST creal (double _Complex);
-double __MINGW_ATTRIB_CONST cimag (double _Complex);
-double __MINGW_ATTRIB_CONST carg (double _Complex);
-double __MINGW_ATTRIB_CONST cabs (double _Complex);
-double _Complex __MINGW_ATTRIB_CONST conj (double _Complex);
-double _Complex cacos (double _Complex);
-double _Complex casin (double _Complex);
-double _Complex catan (double _Complex);
-double _Complex ccos (double _Complex);
-double _Complex csin (double _Complex);
-double _Complex ctan (double _Complex);
-double _Complex cacosh (double _Complex);
-double _Complex casinh (double _Complex);
-double _Complex catanh (double _Complex);
-double _Complex ccosh (double _Complex);
-double _Complex csinh (double _Complex);
-double _Complex ctanh (double _Complex);
-double _Complex cexp (double _Complex);
-double _Complex clog (double _Complex);
-double _Complex cpow (double _Complex, double _Complex);
-double _Complex csqrt (double _Complex);
-double _Complex __MINGW_ATTRIB_CONST cproj (double _Complex);
-
-float __MINGW_ATTRIB_CONST crealf (float _Complex);
-float __MINGW_ATTRIB_CONST cimagf (float _Complex);
-float __MINGW_ATTRIB_CONST cargf (float _Complex);
-float __MINGW_ATTRIB_CONST cabsf (float _Complex);
-float _Complex __MINGW_ATTRIB_CONST conjf (float _Complex);
-float _Complex cacosf (float _Complex);
-float _Complex casinf (float _Complex);
-float _Complex catanf (float _Complex);
-float _Complex ccosf (float _Complex);
-float _Complex csinf (float _Complex);
-float _Complex ctanf (float _Complex);
-float _Complex cacoshf (float _Complex);
-float _Complex casinhf (float _Complex);
-float _Complex catanhf (float _Complex);
-float _Complex ccoshf (float _Complex);
-float _Complex csinhf (float _Complex);
-float _Complex ctanhf (float _Complex);
-float _Complex cexpf (float _Complex);
-float _Complex clogf (float _Complex);
-float _Complex cpowf (float _Complex, float _Complex);
-float _Complex csqrtf (float _Complex);
-float _Complex __MINGW_ATTRIB_CONST cprojf (float _Complex);
-
-long double __MINGW_ATTRIB_CONST creall (long double _Complex);
-long double __MINGW_ATTRIB_CONST cimagl (long double _Complex);
-long double __MINGW_ATTRIB_CONST cargl (long double _Complex);
-long double __MINGW_ATTRIB_CONST cabsl (long double _Complex);
-long double _Complex __MINGW_ATTRIB_CONST conjl (long double _Complex);
-long double _Complex cacosl (long double _Complex);
-long double _Complex casinl (long double _Complex);
-long double _Complex catanl (long double _Complex);
-long double _Complex ccosl (long double _Complex);
-long double _Complex csinl (long double _Complex);
-long double _Complex ctanl (long double _Complex);
-long double _Complex cacoshl (long double _Complex);
-long double _Complex casinhl (long double _Complex);
-long double _Complex catanhl (long double _Complex);
-long double _Complex ccoshl (long double _Complex);
-long double _Complex csinhl (long double _Complex);
-long double _Complex ctanhl (long double _Complex);
-long double _Complex cexpl (long double _Complex);
-long double _Complex clogl (long double _Complex);
-long double _Complex cpowl (long double _Complex, long double _Complex);
-long double _Complex csqrtl (long double _Complex);
-long double _Complex __MINGW_ATTRIB_CONST cprojl (long double _Complex);
-
-#ifdef __GNUC__
-
-/* double */
-__CRT_INLINE double __MINGW_ATTRIB_CONST creal (double _Complex _Z)
-{
- return __real__ _Z;
-}
-
-__CRT_INLINE double __MINGW_ATTRIB_CONST cimag (double _Complex _Z)
-{
- return __imag__ _Z;
-}
-
-__CRT_INLINE double _Complex __MINGW_ATTRIB_CONST conj (double _Complex _Z)
-{
- return __extension__ ~_Z;
-}
-
-__CRT_INLINE double __MINGW_ATTRIB_CONST carg (double _Complex _Z)
-{
- double res;
- __asm__ ("fpatan;"
- : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
- return res;
-}
-
-
-/* float */
-__CRT_INLINE float __MINGW_ATTRIB_CONST crealf (float _Complex _Z)
-{
- return __real__ _Z;
-}
-
-__CRT_INLINE float __MINGW_ATTRIB_CONST cimagf (float _Complex _Z)
-{
- return __imag__ _Z;
-}
-
-__CRT_INLINE float _Complex __MINGW_ATTRIB_CONST conjf (float _Complex _Z)
-{
- return __extension__ ~_Z;
-}
-
-__CRT_INLINE float __MINGW_ATTRIB_CONST cargf (float _Complex _Z)
-{
- float res;
- __asm__ ("fpatan;"
- : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
- return res;
-}
-
-/* long double */
-__CRT_INLINE long double __MINGW_ATTRIB_CONST creall (long double _Complex _Z)
-{
- return __real__ _Z;
-}
-
-__CRT_INLINE long double __MINGW_ATTRIB_CONST cimagl (long double _Complex _Z)
-{
- return __imag__ _Z;
-}
-
-__CRT_INLINE long double _Complex __MINGW_ATTRIB_CONST conjl (long double _Complex _Z)
-{
- return __extension__ ~_Z;
-}
-
-__CRT_INLINE long double __MINGW_ATTRIB_CONST cargl (long double _Complex _Z)
-{
- long double res;
- __asm__ ("fpatan;"
- : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
- return res;
-}
-
-#endif /* __GNUC__ */
-
-
-#endif /* RC_INVOKED */
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _COMPLEX_H */
diff --git a/winsup/mingw/include/conio.h b/winsup/mingw/include/conio.h
deleted file mode 100644
index 8a821cb..0000000
--- a/winsup/mingw/include/conio.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * conio.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Low level console I/O functions. Pretty please try to use the ANSI
- * standard ones if you are writing new code.
- *
- */
-
-#ifndef _CONIO_H_
-#define _CONIO_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#ifndef RC_INVOKED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_CRTIMP char* __cdecl __MINGW_NOTHROW _cgets (char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _cprintf (const char*, ...);
-_CRTIMP int __cdecl __MINGW_NOTHROW _cputs (const char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _cscanf (char*, ...);
-
-_CRTIMP int __cdecl __MINGW_NOTHROW _getch (void);
-_CRTIMP int __cdecl __MINGW_NOTHROW _getche (void);
-_CRTIMP int __cdecl __MINGW_NOTHROW _kbhit (void);
-_CRTIMP int __cdecl __MINGW_NOTHROW _putch (int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ungetch (int);
-
-
-#ifndef _NO_OLDNAMES
-
-_CRTIMP int __cdecl __MINGW_NOTHROW getch (void);
-_CRTIMP int __cdecl __MINGW_NOTHROW getche (void);
-_CRTIMP int __cdecl __MINGW_NOTHROW kbhit (void);
-_CRTIMP int __cdecl __MINGW_NOTHROW putch (int);
-_CRTIMP int __cdecl __MINGW_NOTHROW ungetch (int);
-
-#endif /* Not _NO_OLDNAMES */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _CONIO_H_ */
diff --git a/winsup/mingw/include/ctype.h b/winsup/mingw/include/ctype.h
deleted file mode 100644
index 551566b..0000000
--- a/winsup/mingw/include/ctype.h
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
- * ctype.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Functions for testing character types and converting characters.
- *
- */
-
-#ifndef _CTYPE_H_
-#define _CTYPE_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#define __need_wchar_t
-#define __need_wint_t
-#ifndef RC_INVOKED
-#include <stddef.h>
-#endif /* Not RC_INVOKED */
-
-
-/*
- * The following flags are used to tell iswctype and _isctype what character
- * types you are looking for.
- */
-#define _UPPER 0x0001
-#define _LOWER 0x0002
-#define _DIGIT 0x0004
-#define _SPACE 0x0008 /* HT LF VT FF CR SP */
-#define _PUNCT 0x0010
-#define _CONTROL 0x0020
-/* _BLANK is set for SP and non-ASCII horizontal space chars (eg,
- "no-break space", 0xA0, in CP1250) but not for HT. */
-#define _BLANK 0x0040
-#define _HEX 0x0080
-#define _LEADBYTE 0x8000
-
-#define _ALPHA 0x0103
-
-#ifndef RC_INVOKED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_CRTIMP int __cdecl __MINGW_NOTHROW isalnum(int);
-_CRTIMP int __cdecl __MINGW_NOTHROW isalpha(int);
-_CRTIMP int __cdecl __MINGW_NOTHROW iscntrl(int);
-_CRTIMP int __cdecl __MINGW_NOTHROW isdigit(int);
-_CRTIMP int __cdecl __MINGW_NOTHROW isgraph(int);
-_CRTIMP int __cdecl __MINGW_NOTHROW islower(int);
-_CRTIMP int __cdecl __MINGW_NOTHROW isprint(int);
-_CRTIMP int __cdecl __MINGW_NOTHROW ispunct(int);
-_CRTIMP int __cdecl __MINGW_NOTHROW isspace(int);
-_CRTIMP int __cdecl __MINGW_NOTHROW isupper(int);
-_CRTIMP int __cdecl __MINGW_NOTHROW isxdigit(int);
-
-#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
- || !defined __STRICT_ANSI__
-int __cdecl __MINGW_NOTHROW isblank (int);
-#endif
-
-#ifndef __STRICT_ANSI__
-_CRTIMP int __cdecl __MINGW_NOTHROW _isctype (int, int);
-#endif
-
-/* These are the ANSI versions, with correct checking of argument */
-_CRTIMP int __cdecl __MINGW_NOTHROW tolower(int);
-_CRTIMP int __cdecl __MINGW_NOTHROW toupper(int);
-
-/*
- * NOTE: The above are not old name type wrappers, but functions exported
- * explicitly by MSVCRT/CRTDLL. However, underscored versions are also
- * exported.
- */
-#ifndef __STRICT_ANSI__
-/*
- * These are the cheap non-std versions: The return values are undefined
- * if the argument is not ASCII char or is not of appropriate case
- */
-_CRTIMP int __cdecl __MINGW_NOTHROW _tolower(int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _toupper(int);
-#endif
-
-/* Also defined in stdlib.h */
-#ifndef MB_CUR_MAX
-#ifdef __DECLSPEC_SUPPORTED
-# ifdef __MSVCRT__
-# define MB_CUR_MAX __mb_cur_max
- __MINGW_IMPORT int __mb_cur_max;
-# else /* not __MSVCRT */
-# define MB_CUR_MAX __mb_cur_max_dll
- __MINGW_IMPORT int __mb_cur_max_dll;
-# endif /* not __MSVCRT */
-
-#else /* ! __DECLSPEC_SUPPORTED */
-# ifdef __MSVCRT__
- extern int* _imp____mb_cur_max;
-# define MB_CUR_MAX (*_imp____mb_cur_max)
-# else /* not __MSVCRT */
- extern int* _imp____mb_cur_max_dll;
-# define MB_CUR_MAX (*_imp____mb_cur_max_dll)
-# endif /* not __MSVCRT */
-#endif /* __DECLSPEC_SUPPORTED */
-#endif /* MB_CUR_MAX */
-
-
-#ifdef __DECLSPEC_SUPPORTED
-# if __MSVCRT_VERSION__ <= 0x0700
- __MINGW_IMPORT unsigned short _ctype[];
-# endif
-# ifdef __MSVCRT__
- __MINGW_IMPORT unsigned short* _pctype;
-# else /* CRTDLL */
- __MINGW_IMPORT unsigned short* _pctype_dll;
-# define _pctype _pctype_dll
-# endif
-
-#else /* __DECLSPEC_SUPPORTED */
-# if __MSVCRT_VERSION__ <= 0x0700
- extern unsigned short** _imp___ctype;
-# define _ctype (*_imp___ctype)
-# endif
-# ifdef __MSVCRT__
- extern unsigned short** _imp___pctype;
-# define _pctype (*_imp___pctype)
-# else /* CRTDLL */
- extern unsigned short** _imp___pctype_dll;
-# define _pctype (*_imp___pctype_dll)
-# endif /* CRTDLL */
-#endif /* __DECLSPEC_SUPPORTED */
-
-/*
- * Use inlines here rather than macros, because macros will upset
- * C++ usage (eg, ::isalnum), and so usually get undefined
- *
- * According to standard for SB chars, these function are defined only
- * for input values representable by unsigned char or EOF.
- * Thus, there is no range test.
- * This reproduces behaviour of MSVCRT.dll lib implemention for SB chars.
- *
- * If no MB char support is needed, these can be simplified even
- * more by command line define -DMB_CUR_MAX=1. The compiler will then
- * optimise away the constant condition.
- */
-
-#if !(defined (__NO_INLINE__) || defined (__NO_CTYPE_INLINES) \
- || defined (__STRICT_ANSI__))
-
-/* use simple lookup if SB locale, else _isctype() */
-#define __ISCTYPE(c, mask) (MB_CUR_MAX == 1 ? (_pctype[c] & mask) : _isctype(c, mask))
-__CRT_INLINE int __cdecl __MINGW_NOTHROW isalnum(int c) {return __ISCTYPE(c, (_ALPHA|_DIGIT));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW isalpha(int c) {return __ISCTYPE(c, _ALPHA);}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iscntrl(int c) {return __ISCTYPE(c, _CONTROL);}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW isdigit(int c) {return __ISCTYPE(c, _DIGIT);}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW isgraph(int c) {return __ISCTYPE(c, (_PUNCT|_ALPHA|_DIGIT));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW islower(int c) {return __ISCTYPE(c, _LOWER);}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW isprint(int c) {return __ISCTYPE(c, (_BLANK|_PUNCT|_ALPHA|_DIGIT));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW ispunct(int c) {return __ISCTYPE(c, _PUNCT);}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW isspace(int c) {return __ISCTYPE(c, _SPACE);}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW isupper(int c) {return __ISCTYPE(c, _UPPER);}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW isxdigit(int c) {return __ISCTYPE(c, _HEX);}
-
-#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
- || !defined __STRICT_ANSI__
-__CRT_INLINE int __cdecl __MINGW_NOTHROW isblank (int c)
- {return (__ISCTYPE(c, _BLANK) || c == '\t');}
-#endif
-
-/* these reproduce behaviour of lib underscored versions */
-__CRT_INLINE int __cdecl __MINGW_NOTHROW _tolower(int c) {return ( c -'A'+'a');}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW _toupper(int c) {return ( c -'a'+'A');}
-
-/* TODO? Is it worth inlining ANSI tolower, toupper? Probably only
- if we only want C-locale. */
-
-#endif /* _NO_CTYPE_INLINES */
-
-/* Wide character equivalents */
-
-#ifndef WEOF
-#define WEOF (wchar_t)(0xFFFF)
-#endif
-
-#ifndef _WCTYPE_T_DEFINED
-typedef wchar_t wctype_t;
-#define _WCTYPE_T_DEFINED
-#endif
-
-_CRTIMP int __cdecl __MINGW_NOTHROW iswalnum(wint_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW iswalpha(wint_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW iswascii(wint_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW iswcntrl(wint_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW iswctype(wint_t, wctype_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW is_wctype(wint_t, wctype_t); /* Obsolete! */
-_CRTIMP int __cdecl __MINGW_NOTHROW iswdigit(wint_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW iswgraph(wint_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW iswlower(wint_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW iswprint(wint_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW iswpunct(wint_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW iswspace(wint_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW iswupper(wint_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW iswxdigit(wint_t);
-
-#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
- || !defined __STRICT_ANSI__ || defined __cplusplus
-int __cdecl __MINGW_NOTHROW iswblank (wint_t);
-#endif
-
-/* Older MS docs uses wchar_t for arg and return type, while newer
- online MS docs say arg is wint_t and return is int.
- ISO C uses wint_t for both. */
-_CRTIMP wint_t __cdecl __MINGW_NOTHROW towlower (wint_t);
-_CRTIMP wint_t __cdecl __MINGW_NOTHROW towupper (wint_t);
-
-_CRTIMP int __cdecl __MINGW_NOTHROW isleadbyte (int);
-
-/* Also in wctype.h */
-#if ! (defined (__NO_INLINE__) || defined(__NO_CTYPE_INLINES) \
- || defined(__WCTYPE_INLINES_DEFINED))
-#define __WCTYPE_INLINES_DEFINED
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswascii(wint_t wc) {return ((wc & ~0x7F) ==0);}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswlower(wint_t wc) {return (iswctype(wc,_LOWER));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswspace(wint_t wc) {return (iswctype(wc,_SPACE));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswupper(wint_t wc) {return (iswctype(wc,_UPPER));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);}
-#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
- || !defined __STRICT_ANSI__ || defined __cplusplus
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswblank (wint_t wc)
- {return (iswctype(wc,_BLANK) || wc == L'\t');}
-#endif
-
-#endif /* !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED)) */
-
-#ifndef __STRICT_ANSI__
-int __cdecl __MINGW_NOTHROW __isascii (int);
-int __cdecl __MINGW_NOTHROW __toascii (int);
-int __cdecl __MINGW_NOTHROW __iscsymf (int); /* Valid first character in C symbol */
-int __cdecl __MINGW_NOTHROW __iscsym (int); /* Valid character in C symbol (after first) */
-
-#if !(defined (__NO_INLINE__) || defined (__NO_CTYPE_INLINES))
-__CRT_INLINE int __cdecl __MINGW_NOTHROW __isascii(int c) {return ((c & ~0x7F) == 0);}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW __toascii(int c) {return (c & 0x7F);}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW __iscsymf(int c) {return (isalpha(c) || (c == '_'));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW __iscsym(int c) {return (isalnum(c) || (c == '_'));}
-#endif /* __NO_CTYPE_INLINES */
-
-#ifndef _NO_OLDNAMES
-/* Not _CRTIMP */
-int __cdecl __MINGW_NOTHROW isascii (int);
-int __cdecl __MINGW_NOTHROW toascii (int);
-int __cdecl __MINGW_NOTHROW iscsymf (int);
-int __cdecl __MINGW_NOTHROW iscsym (int);
-#endif /* Not _NO_OLDNAMES */
-
-#endif /* Not __STRICT_ANSI__ */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _CTYPE_H_ */
-
diff --git a/winsup/mingw/include/dir.h b/winsup/mingw/include/dir.h
deleted file mode 100644
index d759a0a..0000000
--- a/winsup/mingw/include/dir.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * dir.h
- *
- * This file OBSOLESCENT and only provided for backward compatibility.
- * Please use io.h instead.
- *
- * This file is part of the Mingw32 package.
- *
- * Contributors:
- * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
- * Mumit Khan <khan@xraylith.wisc.edu>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#include <io.h>
-
diff --git a/winsup/mingw/include/direct.h b/winsup/mingw/include/direct.h
deleted file mode 100644
index 8e39c4c..0000000
--- a/winsup/mingw/include/direct.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * direct.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Functions for manipulating paths and directories (included from io.h)
- * plus functions for setting the current drive.
- *
- */
-#ifndef _DIRECT_H_
-#define _DIRECT_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#define __need_wchar_t
-#ifndef RC_INVOKED
-#include <stddef.h>
-#endif /* Not RC_INVOKED */
-
-#include <io.h>
-
-#ifndef RC_INVOKED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _DISKFREE_T_DEFINED
-/* needed by _getdiskfree (also in dos.h) */
-struct _diskfree_t {
- unsigned total_clusters;
- unsigned avail_clusters;
- unsigned sectors_per_cluster;
- unsigned bytes_per_sector;
-};
-#define _DISKFREE_T_DEFINED
-#endif
-
-/*
- * You really shouldn't be using these. Use the Win32 API functions instead.
- * However, it does make it easier to port older code.
- */
-_CRTIMP int __cdecl __MINGW_NOTHROW _getdrive (void);
-_CRTIMP unsigned long __cdecl __MINGW_NOTHROW _getdrives(void);
-_CRTIMP int __cdecl __MINGW_NOTHROW _chdrive (int);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _getdcwd (int, char*, int);
-_CRTIMP unsigned __cdecl __MINGW_NOTHROW _getdiskfree (unsigned, struct _diskfree_t *);
-
-#ifndef _NO_OLDNAMES
-# define diskfree_t _diskfree_t
-#endif
-
-#ifndef _WDIRECT_DEFINED
-/* wide character versions. Also in wchar.h */
-#ifdef __MSVCRT__
-_CRTIMP int __cdecl __MINGW_NOTHROW _wchdir(const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetcwd(wchar_t*, int);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetdcwd(int, wchar_t*, int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wmkdir(const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wrmdir(const wchar_t*);
-#endif /* __MSVCRT__ */
-#define _WDIRECT_DEFINED
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _DIRECT_H_ */
diff --git a/winsup/mingw/include/dirent.h b/winsup/mingw/include/dirent.h
deleted file mode 100644
index e2a6689..0000000
--- a/winsup/mingw/include/dirent.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * DIRENT.H (formerly DIRLIB.H)
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- */
-#ifndef _DIRENT_H_
-#define _DIRENT_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#include <io.h>
-
-#ifndef RC_INVOKED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct dirent
-{
- long d_ino; /* Always zero. */
- unsigned short d_reclen; /* Always zero. */
- unsigned short d_namlen; /* Length of name in d_name. */
- char d_name[FILENAME_MAX]; /* File name. */
-};
-
-/*
- * This is an internal data structure. Good programmers will not use it
- * except as an argument to one of the functions below.
- * dd_stat field is now int (was short in older versions).
- */
-typedef struct
-{
- /* disk transfer area for this dir */
- struct _finddata_t dd_dta;
-
- /* dirent struct to return from dir (NOTE: this makes this thread
- * safe as long as only one thread uses a particular DIR struct at
- * a time) */
- struct dirent dd_dir;
-
- /* _findnext handle */
- long dd_handle;
-
- /*
- * Status of search:
- * 0 = not started yet (next entry to read is first entry)
- * -1 = off the end
- * positive = 0 based index of next entry
- */
- int dd_stat;
-
- /* given path for dir with search pattern (struct is extended) */
- char dd_name[1];
-} DIR;
-
-DIR* __cdecl __MINGW_NOTHROW opendir (const char*);
-struct dirent* __cdecl __MINGW_NOTHROW readdir (DIR*);
-int __cdecl __MINGW_NOTHROW closedir (DIR*);
-void __cdecl __MINGW_NOTHROW rewinddir (DIR*);
-long __cdecl __MINGW_NOTHROW telldir (DIR*);
-void __cdecl __MINGW_NOTHROW seekdir (DIR*, long);
-
-
-/* wide char versions */
-
-struct _wdirent
-{
- long d_ino; /* Always zero. */
- unsigned short d_reclen; /* Always zero. */
- unsigned short d_namlen; /* Length of name in d_name. */
- wchar_t d_name[FILENAME_MAX]; /* File name. */
-};
-
-/*
- * This is an internal data structure. Good programmers will not use it
- * except as an argument to one of the functions below.
- */
-typedef struct
-{
- /* disk transfer area for this dir */
- struct _wfinddata_t dd_dta;
-
- /* dirent struct to return from dir (NOTE: this makes this thread
- * safe as long as only one thread uses a particular DIR struct at
- * a time) */
- struct _wdirent dd_dir;
-
- /* _findnext handle */
- long dd_handle;
-
- /*
- * Status of search:
- * 0 = not started yet (next entry to read is first entry)
- * -1 = off the end
- * positive = 0 based index of next entry
- */
- int dd_stat;
-
- /* given path for dir with search pattern (struct is extended) */
- wchar_t dd_name[1];
-} _WDIR;
-
-
-
-_WDIR* __cdecl __MINGW_NOTHROW _wopendir (const wchar_t*);
-struct _wdirent* __cdecl __MINGW_NOTHROW _wreaddir (_WDIR*);
-int __cdecl __MINGW_NOTHROW _wclosedir (_WDIR*);
-void __cdecl __MINGW_NOTHROW _wrewinddir (_WDIR*);
-long __cdecl __MINGW_NOTHROW _wtelldir (_WDIR*);
-void __cdecl __MINGW_NOTHROW _wseekdir (_WDIR*, long);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _DIRENT_H_ */
diff --git a/winsup/mingw/include/dos.h b/winsup/mingw/include/dos.h
deleted file mode 100644
index 80ba89e..0000000
--- a/winsup/mingw/include/dos.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * dos.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * DOS-specific functions and structures.
- *
- */
-
-#ifndef _DOS_H_
-#define _DOS_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#define __need_wchar_t
-#ifndef RC_INVOKED
-#include <stddef.h>
-#endif /* Not RC_INVOKED */
-
-/* For DOS file attributes */
-#include <io.h>
-
-#ifndef RC_INVOKED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef __MSVCRT__ /* these are in CRTDLL, but not MSVCRT */
-#ifndef __DECLSPEC_SUPPORTED
-extern unsigned int *_imp___basemajor_dll;
-extern unsigned int *_imp___baseminor_dll;
-extern unsigned int *_imp___baseversion_dll;
-extern unsigned int *_imp___osmajor_dll;
-extern unsigned int *_imp___osminor_dll;
-extern unsigned int *_imp___osmode_dll;
-
-#define _basemajor (*_imp___basemajor_dll)
-#define _baseminor (*_imp___baseminor_dll)
-#define _baseversion (*_imp___baseversion_dll)
-#define _osmajor (*_imp___osmajor_dll)
-#define _osminor (*_imp___osminor_dll)
-#define _osmode (*_imp___osmode_dll)
-
-#else /* __DECLSPEC_SUPPORTED */
-
-__MINGW_IMPORT unsigned int _basemajor_dll;
-__MINGW_IMPORT unsigned int _baseminor_dll;
-__MINGW_IMPORT unsigned int _baseversion_dll;
-__MINGW_IMPORT unsigned int _osmajor_dll;
-__MINGW_IMPORT unsigned int _osminor_dll;
-__MINGW_IMPORT unsigned int _osmode_dll;
-
-#define _basemajor _basemajor_dll
-#define _baseminor _baseminor_dll
-#define _baseversion _baseversion_dll
-#define _osmajor _osmajor_dll
-#define _osminor _osminor_dll
-#define _osmode _osmode_dll
-
-#endif /* __DECLSPEC_SUPPORTED */
-#endif /* ! __MSVCRT__ */
-
-#ifndef _DISKFREE_T_DEFINED
-/* needed by _getdiskfree (also in direct.h) */
-struct _diskfree_t {
- unsigned total_clusters;
- unsigned avail_clusters;
- unsigned sectors_per_cluster;
- unsigned bytes_per_sector;
-};
-#define _DISKFREE_T_DEFINED
-#endif
-
-_CRTIMP unsigned __cdecl __MINGW_NOTHROW _getdiskfree (unsigned, struct _diskfree_t *);
-
-#ifndef _NO_OLDNAMES
-# define diskfree_t _diskfree_t
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _DOS_H_ */
diff --git a/winsup/mingw/include/errno.h b/winsup/mingw/include/errno.h
deleted file mode 100644
index 675b506..0000000
--- a/winsup/mingw/include/errno.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * errno.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Error numbers and access to error reporting.
- *
- */
-
-#ifndef _ERRNO_H_
-#define _ERRNO_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-/*
- * Error numbers.
- * TODO: Can't be sure of some of these assignments, I guessed from the
- * names given by strerror and the defines in the Cygnus errno.h. A lot
- * of the names from the Cygnus errno.h are not represented, and a few
- * of the descriptions returned by strerror do not obviously match
- * their error naming.
- */
-#define EPERM 1 /* Operation not permitted */
-#define ENOFILE 2 /* No such file or directory */
-#define ENOENT 2
-#define ESRCH 3 /* No such process */
-#define EINTR 4 /* Interrupted function call */
-#define EIO 5 /* Input/output error */
-#define ENXIO 6 /* No such device or address */
-#define E2BIG 7 /* Arg list too long */
-#define ENOEXEC 8 /* Exec format error */
-#define EBADF 9 /* Bad file descriptor */
-#define ECHILD 10 /* No child processes */
-#define EAGAIN 11 /* Resource temporarily unavailable */
-#define ENOMEM 12 /* Not enough space */
-#define EACCES 13 /* Permission denied */
-#define EFAULT 14 /* Bad address */
-/* 15 - Unknown Error */
-#define EBUSY 16 /* strerror reports "Resource device" */
-#define EEXIST 17 /* File exists */
-#define EXDEV 18 /* Improper link (cross-device link?) */
-#define ENODEV 19 /* No such device */
-#define ENOTDIR 20 /* Not a directory */
-#define EISDIR 21 /* Is a directory */
-#define EINVAL 22 /* Invalid argument */
-#define ENFILE 23 /* Too many open files in system */
-#define EMFILE 24 /* Too many open files */
-#define ENOTTY 25 /* Inappropriate I/O control operation */
-/* 26 - Unknown Error */
-#define EFBIG 27 /* File too large */
-#define ENOSPC 28 /* No space left on device */
-#define ESPIPE 29 /* Invalid seek (seek on a pipe?) */
-#define EROFS 30 /* Read-only file system */
-#define EMLINK 31 /* Too many links */
-#define EPIPE 32 /* Broken pipe */
-#define EDOM 33 /* Domain error (math functions) */
-#define ERANGE 34 /* Result too large (possibly too small) */
-/* 35 - Unknown Error */
-#define EDEADLOCK 36 /* Resource deadlock avoided (non-Cyg) */
-#define EDEADLK 36
-/* 37 - Unknown Error */
-#define ENAMETOOLONG 38 /* Filename too long (91 in Cyg?) */
-#define ENOLCK 39 /* No locks available (46 in Cyg?) */
-#define ENOSYS 40 /* Function not implemented (88 in Cyg?) */
-#define ENOTEMPTY 41 /* Directory not empty (90 in Cyg?) */
-#define EILSEQ 42 /* Illegal byte sequence */
-
-/*
- * NOTE: ENAMETOOLONG and ENOTEMPTY conflict with definitions in the
- * sockets.h header provided with windows32api-0.1.2.
- * You should go and put an #if 0 ... #endif around the whole block
- * of errors (look at the comment above them).
- */
-
-#ifndef RC_INVOKED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Definitions of errno. For _doserrno, sys_nerr and * sys_errlist, see
- * stdlib.h.
- */
-#ifdef _UWIN
-#undef errno
-extern int errno;
-#else
-_CRTIMP int* __cdecl __MINGW_NOTHROW _errno(void);
-#define errno (*_errno())
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _ERRNO_H_ */
diff --git a/winsup/mingw/include/excpt.h b/winsup/mingw/include/excpt.h
deleted file mode 100644
index e75ceb7..0000000
--- a/winsup/mingw/include/excpt.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * excpt.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Support for operating system level structured exception handling.
- *
- * NOTE: This is very preliminary stuff. I am also pretty sure it is
- * completely Intel specific.
- *
- */
-
-#ifndef _EXCPT_H_
-#define _EXCPT_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#include <windef.h>
-
-/*
- * NOTE: The constants structs and typedefs below should be defined in the
- * Win32 API headers.
- */
-#define EH_NONCONTINUABLE 0x01
-#define EH_UNWINDING 0x02
-#define EH_EXIT_UNWIND 0x04
-#define EH_STACK_INVALID 0x08
-#define EH_NESTED_CALL 0x10
-
-#ifndef RC_INVOKED
-
-typedef enum {
- ExceptionContinueExecution,
- ExceptionContinueSearch,
- ExceptionNestedException,
- ExceptionCollidedUnwind
-} EXCEPTION_DISPOSITION;
-
-
-/*
- * End of stuff that should be in the Win32 API files.
- */
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * The type of function that is expected as an exception handler to be
- * installed with __try1.
- */
-typedef EXCEPTION_DISPOSITION (*PEXCEPTION_HANDLER)
- (struct _EXCEPTION_RECORD*, void*, struct _CONTEXT*, void*);
-
-/*
- * This is not entirely necessary, but it is the structure installed by
- * the __try1 primitive below.
- */
-typedef struct _EXCEPTION_REGISTRATION
-{
- struct _EXCEPTION_REGISTRATION* prev;
- PEXCEPTION_HANDLER handler;
-} EXCEPTION_REGISTRATION, *PEXCEPTION_REGISTRATION;
-
-typedef EXCEPTION_REGISTRATION EXCEPTION_REGISTRATION_RECORD;
-typedef PEXCEPTION_REGISTRATION PEXCEPTION_REGISTRATION_RECORD;
-
-/*
- * A macro which installs the supplied exception handler.
- * Push the pointer to the new handler onto the stack,
- * then push the pointer to the old registration structure (at fs:0)
- * onto the stack, then put a pointer to the new registration
- * structure (i.e. the current stack pointer) at fs:0.
- */
-#define __try1(pHandler) \
- __asm__ ("pushl %0;pushl %%fs:0;movl %%esp,%%fs:0;" : : "g" (pHandler));
-
-/*
- * A macro which (despite its name) *removes* an installed
- * exception handler. Should be used only in conjunction with the above
- * install routine __try1.
- * Move the pointer to the old reg. struct (at the current stack
- * position) to fs:0, replacing the pointer we installed above,
- * then add 8 to the stack pointer to get rid of the space we
- * used when we pushed on our new reg. struct above. Notice that
- * the stack must be in the exact state at this point that it was
- * after we did __try1 or this will smash things.
- */
-#define __except1 \
- __asm__ ("movl (%%esp),%%eax;movl %%eax,%%fs:0;addl $8,%%esp;" \
- : : : "%eax");
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* _EXCPT_H_ not defined */
diff --git a/winsup/mingw/include/fcntl.h b/winsup/mingw/include/fcntl.h
deleted file mode 100644
index 9bff935..0000000
--- a/winsup/mingw/include/fcntl.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * fcntl.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Access constants for _open. Note that the permissions constants are
- * in sys/stat.h (ick).
- *
- */
-#ifndef _FCNTL_H_
-#define _FCNTL_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-/*
- * It appears that fcntl.h should include io.h for compatibility...
- */
-#include <io.h>
-
-/* Specifiy one of these flags to define the access mode. */
-#define _O_RDONLY 0
-#define _O_WRONLY 1
-#define _O_RDWR 2
-
-/* Mask for access mode bits in the _open flags. */
-#define _O_ACCMODE (_O_RDONLY|_O_WRONLY|_O_RDWR)
-
-#define _O_APPEND 0x0008 /* Writes will add to the end of the file. */
-
-#define _O_RANDOM 0x0010
-#define _O_SEQUENTIAL 0x0020
-#define _O_TEMPORARY 0x0040 /* Make the file dissappear after closing.
- * WARNING: Even if not created by _open! */
-#define _O_NOINHERIT 0x0080
-
-#define _O_CREAT 0x0100 /* Create the file if it does not exist. */
-#define _O_TRUNC 0x0200 /* Truncate the file if it does exist. */
-#define _O_EXCL 0x0400 /* Open only if the file does not exist. */
-
-#define _O_SHORT_LIVED 0x1000
-
-/* NOTE: Text is the default even if the given _O_TEXT bit is not on. */
-#define _O_TEXT 0x4000 /* CR-LF in file becomes LF in memory. */
-#define _O_BINARY 0x8000 /* Input and output is not translated. */
-#define _O_RAW _O_BINARY
-
-#if (__MSVCRT_VERSION__ >= 0x0800)
-#define _O_WTEXT 0x10000
-#define _O_U16TEXT 0x20000
-#define _O_U8TEXT 0x40000
-#endif
-
-#ifndef _NO_OLDNAMES
-
-/* POSIX/Non-ANSI names for increased portability */
-#define O_RDONLY _O_RDONLY
-#define O_WRONLY _O_WRONLY
-#define O_RDWR _O_RDWR
-#define O_ACCMODE _O_ACCMODE
-#define O_APPEND _O_APPEND
-#define O_CREAT _O_CREAT
-#define O_TRUNC _O_TRUNC
-#define O_EXCL _O_EXCL
-#define O_TEXT _O_TEXT
-#define O_BINARY _O_BINARY
-#define O_TEMPORARY _O_TEMPORARY
-#define O_NOINHERIT _O_NOINHERIT
-#define O_SEQUENTIAL _O_SEQUENTIAL
-#define O_RANDOM _O_RANDOM
-
-#endif /* Not _NO_OLDNAMES */
-
-#endif /* Not _FCNTL_H_ */
diff --git a/winsup/mingw/include/fenv.h b/winsup/mingw/include/fenv.h
deleted file mode 100644
index ddae892..0000000
--- a/winsup/mingw/include/fenv.h
+++ /dev/null
@@ -1,107 +0,0 @@
-#ifndef _FENV_H_
-#define _FENV_H_
-
-#include <_mingw.h>
-
-/* FPU status word exception flags */
-#define FE_INVALID 0x01
-#define FE_DENORMAL 0x02
-#define FE_DIVBYZERO 0x04
-#define FE_OVERFLOW 0x08
-#define FE_UNDERFLOW 0x10
-#define FE_INEXACT 0x20
-#define FE_ALL_EXCEPT (FE_INVALID | FE_DENORMAL | FE_DIVBYZERO \
- | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
-
-/* FPU control word rounding flags */
-#define FE_TONEAREST 0x0000
-#define FE_DOWNWARD 0x0400
-#define FE_UPWARD 0x0800
-#define FE_TOWARDZERO 0x0c00
-
-/* The MXCSR exception flags are the same as the
- FE flags. */
-#define __MXCSR_EXCEPT_FLAG_SHIFT 0
-
-/* How much to shift FE status word exception flags
- to get the MXCSR exeptions masks, */
-#define __MXCSR_EXCEPT_MASK_SHIFT 7
-
-/* How much to shift FE control word rounding flags
- to get MXCSR rounding flags, */
-#define __MXCSR_ROUND_FLAG_SHIFT 3
-
-#ifndef RC_INVOKED
-/*
- For now, support only for the basic abstraction of flags that are
- either set or clear. fexcept_t could be structure that holds more
- info about the fp environment.
-*/
-typedef unsigned short fexcept_t;
-
-/* This 32-byte struct represents the entire floating point
- environment as stored by fnstenv or fstenv, augmented by
- the contents of the MXCSR register, as stored by stmxcsr
- (if CPU supports it). */
-typedef struct
-{
- unsigned short __control_word;
- unsigned short __unused0;
- unsigned short __status_word;
- unsigned short __unused1;
- unsigned short __tag_word;
- unsigned short __unused2;
- unsigned int __ip_offset; /* instruction pointer offset */
- unsigned short __ip_selector;
- unsigned short __opcode;
- unsigned int __data_offset;
- unsigned short __data_selector;
- unsigned short __unused3;
- unsigned int __mxcsr; /* contents of the MXCSR register */
-} fenv_t;
-
-
-/*The C99 standard (7.6.9) allows us to define implementation-specific macros for
- different fp environments */
-
-/* The default Intel x87 floating point environment (64-bit mantissa) */
-#define FE_PC64_ENV ((const fenv_t *)-1)
-
-/* The floating point environment set by MSVCRT _fpreset (53-bit mantissa) */
-#define FE_PC53_ENV ((const fenv_t *)-2)
-
-/* The FE_DFL_ENV macro is required by standard.
- fesetenv will use the environment set at app startup.*/
-#define FE_DFL_ENV ((const fenv_t *) 0)
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*TODO: Some of these could be inlined */
-/* 7.6.2 Exception */
-
-extern int __cdecl __MINGW_NOTHROW feclearexcept (int);
-extern int __cdecl __MINGW_NOTHROW fegetexceptflag (fexcept_t * flagp, int excepts);
-extern int __cdecl __MINGW_NOTHROW feraiseexcept (int excepts );
-extern int __cdecl __MINGW_NOTHROW fesetexceptflag (const fexcept_t *, int);
-extern int __cdecl __MINGW_NOTHROW fetestexcept (int excepts);
-
-/* 7.6.3 Rounding */
-
-extern int __cdecl __MINGW_NOTHROW fegetround (void);
-extern int __cdecl __MINGW_NOTHROW fesetround (int mode);
-
-/* 7.6.4 Environment */
-
-extern int __cdecl __MINGW_NOTHROW fegetenv (fenv_t * envp);
-extern int __cdecl __MINGW_NOTHROW fesetenv (const fenv_t * );
-extern int __cdecl __MINGW_NOTHROW feupdateenv (const fenv_t *);
-extern int __cdecl __MINGW_NOTHROW feholdexcept (fenv_t *);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* Not RC_INVOKED */
-
-#endif /* ndef _FENV_H */
diff --git a/winsup/mingw/include/float.h b/winsup/mingw/include/float.h
deleted file mode 100644
index 97a2c1c..0000000
--- a/winsup/mingw/include/float.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * float.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Constants related to floating point arithmetic.
- *
- * Also included here are some non-ANSI bits for accessing the floating
- * point controller.
- *
- * NOTE: GCC provides float.h, but it doesn't include the non-standard
- * stuff for accessing the fp controller. We include_next the
- * GCC-supplied header and just define the MS-specific extensions
- * here.
- *
- */
-
-#include_next<float.h>
-
-#ifndef _MINGW_FLOAT_H_
-#define _MINGW_FLOAT_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-/*
- * Functions and definitions for controlling the FPU.
- */
-#ifndef __STRICT_ANSI__
-
-/* TODO: These constants are only valid for x86 machines */
-
-/* Control word masks for unMask */
-#define _MCW_EM 0x0008001F /* Error masks */
-#define _MCW_IC 0x00040000 /* Infinity */
-#define _MCW_RC 0x00000300 /* Rounding */
-#define _MCW_PC 0x00030000 /* Precision */
-
-/* Control word values for unNew (use with related unMask above) */
-#define _EM_INVALID 0x00000010
-#define _EM_DENORMAL 0x00080000
-#define _EM_ZERODIVIDE 0x00000008
-#define _EM_OVERFLOW 0x00000004
-#define _EM_UNDERFLOW 0x00000002
-#define _EM_INEXACT 0x00000001
-#define _IC_AFFINE 0x00040000
-#define _IC_PROJECTIVE 0x00000000
-#define _RC_CHOP 0x00000300
-#define _RC_UP 0x00000200
-#define _RC_DOWN 0x00000100
-#define _RC_NEAR 0x00000000
-#define _PC_24 0x00020000
-#define _PC_53 0x00010000
-#define _PC_64 0x00000000
-
-/* These are also defined in Mingw math.h, needed to work around
- GCC build issues. */
-/* Return values for fpclass. */
-#ifndef __MINGW_FPCLASS_DEFINED
-#define __MINGW_FPCLASS_DEFINED 1
-#define _FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */
-#define _FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */
-#define _FPCLASS_NINF 0x0004 /* Negative Infinity */
-#define _FPCLASS_NN 0x0008 /* Negative Normal */
-#define _FPCLASS_ND 0x0010 /* Negative Denormal */
-#define _FPCLASS_NZ 0x0020 /* Negative Zero */
-#define _FPCLASS_PZ 0x0040 /* Positive Zero */
-#define _FPCLASS_PD 0x0080 /* Positive Denormal */
-#define _FPCLASS_PN 0x0100 /* Positive Normal */
-#define _FPCLASS_PINF 0x0200 /* Positive Infinity */
-#endif /* __MINGW_FPCLASS_DEFINED */
-
-/* invalid subconditions (_SW_INVALID also set) */
-#define _SW_UNEMULATED 0x0040 /* unemulated instruction */
-#define _SW_SQRTNEG 0x0080 /* square root of a neg number */
-#define _SW_STACKOVERFLOW 0x0200 /* FP stack overflow */
-#define _SW_STACKUNDERFLOW 0x0400 /* FP stack underflow */
-
-/* Floating point error signals and return codes */
-#define _FPE_INVALID 0x81
-#define _FPE_DENORMAL 0x82
-#define _FPE_ZERODIVIDE 0x83
-#define _FPE_OVERFLOW 0x84
-#define _FPE_UNDERFLOW 0x85
-#define _FPE_INEXACT 0x86
-#define _FPE_UNEMULATED 0x87
-#define _FPE_SQRTNEG 0x88
-#define _FPE_STACKOVERFLOW 0x8a
-#define _FPE_STACKUNDERFLOW 0x8b
-#define _FPE_EXPLICITGEN 0x8c /* raise( SIGFPE ); */
-
-#ifndef RC_INVOKED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Set the FPU control word as cw = (cw & ~unMask) | (unNew & unMask),
- * i.e. change the bits in unMask to have the values they have in unNew,
- * leaving other bits unchanged. */
-_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _controlfp (unsigned int unNew, unsigned int unMask);
-_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _control87 (unsigned int unNew, unsigned int unMask);
-
-
-_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _clearfp (void); /* Clear the FPU status word */
-_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _statusfp (void); /* Report the FPU status word */
-#define _clear87 _clearfp
-#define _status87 _statusfp
-
-
-/*
- MSVCRT.dll _fpreset initializes the control register to 0x27f,
- the status register to zero and the tag word to 0FFFFh.
- This differs from asm instruction finit/fninit which set control
- word to 0x37f (64 bit mantissa precison rather than 53 bit).
- By default, the mingw version of _fpreset sets fp control as
- per fninit. To use the MSVCRT.dll _fpreset, include CRT_fp8.o when
- building your application.
-*/
-void __cdecl __MINGW_NOTHROW _fpreset (void);
-void __cdecl __MINGW_NOTHROW fpreset (void);
-
-/* Global 'variable' for the current floating point error code. */
-_CRTIMP int * __cdecl __MINGW_NOTHROW __fpecode(void);
-#define _fpecode (*(__fpecode()))
-
-/*
- * IEEE recommended functions. MS puts them in float.h
- * but they really belong in math.h.
- */
-
-_CRTIMP double __cdecl __MINGW_NOTHROW _chgsign (double);
-_CRTIMP double __cdecl __MINGW_NOTHROW _copysign (double, double);
-_CRTIMP double __cdecl __MINGW_NOTHROW _logb (double);
-_CRTIMP double __cdecl __MINGW_NOTHROW _nextafter (double, double);
-_CRTIMP double __cdecl __MINGW_NOTHROW _scalb (double, long);
-
-_CRTIMP int __cdecl __MINGW_NOTHROW _finite (double);
-_CRTIMP int __cdecl __MINGW_NOTHROW _fpclass (double);
-_CRTIMP int __cdecl __MINGW_NOTHROW _isnan (double);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not __STRICT_ANSI__ */
-
-#endif /* _FLOAT_H_ */
-
diff --git a/winsup/mingw/include/getopt.h b/winsup/mingw/include/getopt.h
deleted file mode 100644
index 00cd547..0000000
--- a/winsup/mingw/include/getopt.h
+++ /dev/null
@@ -1,100 +0,0 @@
-#ifndef __GETOPT_H__
-/*
- * getopt.h
- *
- * $Id$
- *
- * Defines constants and function prototypes required to implement
- * the `getopt', `getopt_long' and `getopt_long_only' APIs.
- *
- * This file is part of the MinGW32 package set.
- *
- * Contributed by Keith Marshall <keithmarshall@users.sourceforge.net>
- *
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-#define __GETOPT_H__
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern int optind; /* index of first non-option in argv */
-extern int optopt; /* single option character, as parsed */
-extern int opterr; /* flag to enable built-in diagnostics... */
- /* (user may set to zero, to suppress) */
-
-extern char *optarg; /* pointer to argument of current option */
-
-extern int getopt( int, char * const [], const char * );
-
-#ifdef __cplusplus
-}
-#endif
-/*
- * POSIX requires the `getopt' API to be specified in `unistd.h';
- * thus, `unistd.h' includes this header. However, we do not want
- * to expose the `getopt_long' or `getopt_long_only' APIs, when
- * included in this manner. Thus, close the standard __GETOPT_H__
- * declarations block, and open an additional __GETOPT_LONG_H__
- * specific block, only when *not* __UNISTD_H_SOURCED__, in which
- * to declare the extended API.
- */
-#endif /* !defined(__GETOPT_H__) */
-#if !defined(__UNISTD_H_SOURCED__) && !defined(__GETOPT_LONG_H__)
-#define __GETOPT_LONG_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct option /* specification for a long form option... */
-{
- const char *name; /* option name, without leading hyphens */
- int has_arg; /* does it take an argument? */
- int *flag; /* where to save its status, or NULL */
- int val; /* its associated status value */
-};
-
-enum /* permitted values for its `has_arg' field... */
-{
- no_argument = 0, /* option never takes an argument */
- required_argument, /* option always requires an argument */
- optional_argument /* option may take an argument */
-};
-
-extern int getopt_long( int, char * const [], const char *, const struct option *, int * );
-extern int getopt_long_only( int, char * const [], const char *, const struct option *, int * );
-/*
- * Previous MinGW implementation had...
- */
-#ifndef HAVE_DECL_GETOPT
-/*
- * ...for the long form API only; keep this for compatibility.
- */
-# define HAVE_DECL_GETOPT 1
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !defined(__UNISTD_H_SOURCED__) && !defined(__GETOPT_LONG_H__) */
-/* $RCSfile$Revision$: end of file */
diff --git a/winsup/mingw/include/inttypes.h b/winsup/mingw/include/inttypes.h
deleted file mode 100644
index aff0725..0000000
--- a/winsup/mingw/include/inttypes.h
+++ /dev/null
@@ -1,278 +0,0 @@
-/* 7.8 Format conversion of integer types <inttypes.h> */
-
-#ifndef _INTTYPES_H_
-#define _INTTYPES_H_
-
-#include <_mingw.h>
-#include <stdint.h>
-#define __need_wchar_t
-#include <stddef.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct {
- intmax_t quot;
- intmax_t rem;
- } imaxdiv_t;
-
-#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS)
-
-/* 7.8.1 Macros for format specifiers
- *
- * MS runtime does not yet understand C9x standard "ll"
- * length specifier. It appears to treat "ll" as "l".
- * The non-standard I64 length specifier causes warning in GCC,
- * but understood by MS runtime functions.
- */
-
-/* fprintf macros for signed types */
-#define PRId8 "d"
-#define PRId16 "d"
-#define PRId32 "d"
-#define PRId64 "I64d"
-
-#define PRIdLEAST8 "d"
-#define PRIdLEAST16 "d"
-#define PRIdLEAST32 "d"
-#define PRIdLEAST64 "I64d"
-
-#define PRIdFAST8 "d"
-#define PRIdFAST16 "d"
-#define PRIdFAST32 "d"
-#define PRIdFAST64 "I64d"
-
-#define PRIdMAX "I64d"
-#define PRIdPTR "d"
-
-#define PRIi8 "i"
-#define PRIi16 "i"
-#define PRIi32 "i"
-#define PRIi64 "I64i"
-
-#define PRIiLEAST8 "i"
-#define PRIiLEAST16 "i"
-#define PRIiLEAST32 "i"
-#define PRIiLEAST64 "I64i"
-
-#define PRIiFAST8 "i"
-#define PRIiFAST16 "i"
-#define PRIiFAST32 "i"
-#define PRIiFAST64 "I64i"
-
-#define PRIiMAX "I64i"
-#define PRIiPTR "i"
-
-#define PRIo8 "o"
-#define PRIo16 "o"
-#define PRIo32 "o"
-#define PRIo64 "I64o"
-
-#define PRIoLEAST8 "o"
-#define PRIoLEAST16 "o"
-#define PRIoLEAST32 "o"
-#define PRIoLEAST64 "I64o"
-
-#define PRIoFAST8 "o"
-#define PRIoFAST16 "o"
-#define PRIoFAST32 "o"
-#define PRIoFAST64 "I64o"
-
-#define PRIoMAX "I64o"
-
-#define PRIoPTR "o"
-
-/* fprintf macros for unsigned types */
-#define PRIu8 "u"
-#define PRIu16 "u"
-#define PRIu32 "u"
-#define PRIu64 "I64u"
-
-
-#define PRIuLEAST8 "u"
-#define PRIuLEAST16 "u"
-#define PRIuLEAST32 "u"
-#define PRIuLEAST64 "I64u"
-
-#define PRIuFAST8 "u"
-#define PRIuFAST16 "u"
-#define PRIuFAST32 "u"
-#define PRIuFAST64 "I64u"
-
-#define PRIuMAX "I64u"
-#define PRIuPTR "u"
-
-#define PRIx8 "x"
-#define PRIx16 "x"
-#define PRIx32 "x"
-#define PRIx64 "I64x"
-
-#define PRIxLEAST8 "x"
-#define PRIxLEAST16 "x"
-#define PRIxLEAST32 "x"
-#define PRIxLEAST64 "I64x"
-
-#define PRIxFAST8 "x"
-#define PRIxFAST16 "x"
-#define PRIxFAST32 "x"
-#define PRIxFAST64 "I64x"
-
-#define PRIxMAX "I64x"
-#define PRIxPTR "x"
-
-#define PRIX8 "X"
-#define PRIX16 "X"
-#define PRIX32 "X"
-#define PRIX64 "I64X"
-
-#define PRIXLEAST8 "X"
-#define PRIXLEAST16 "X"
-#define PRIXLEAST32 "X"
-#define PRIXLEAST64 "I64X"
-
-#define PRIXFAST8 "X"
-#define PRIXFAST16 "X"
-#define PRIXFAST32 "X"
-#define PRIXFAST64 "I64X"
-
-#define PRIXMAX "I64X"
-#define PRIXPTR "X"
-
-/*
- * fscanf macros for signed int types
- * NOTE: if 32-bit int is used for int_fast8_t and int_fast16_t
- * (see stdint.h, 7.18.1.3), FAST8 and FAST16 should have
- * no length identifiers
- */
-
-#define SCNd16 "hd"
-#define SCNd32 "d"
-#define SCNd64 "I64d"
-
-#define SCNdLEAST16 "hd"
-#define SCNdLEAST32 "d"
-#define SCNdLEAST64 "I64d"
-
-#define SCNdFAST16 "hd"
-#define SCNdFAST32 "d"
-#define SCNdFAST64 "I64d"
-
-#define SCNdMAX "I64d"
-#define SCNdPTR "d"
-
-#define SCNi16 "hi"
-#define SCNi32 "i"
-#define SCNi64 "I64i"
-
-#define SCNiLEAST16 "hi"
-#define SCNiLEAST32 "i"
-#define SCNiLEAST64 "I64i"
-
-#define SCNiFAST16 "hi"
-#define SCNiFAST32 "i"
-#define SCNiFAST64 "I64i"
-
-#define SCNiMAX "I64i"
-#define SCNiPTR "i"
-
-#define SCNo16 "ho"
-#define SCNo32 "o"
-#define SCNo64 "I64o"
-
-#define SCNoLEAST16 "ho"
-#define SCNoLEAST32 "o"
-#define SCNoLEAST64 "I64o"
-
-#define SCNoFAST16 "ho"
-#define SCNoFAST32 "o"
-#define SCNoFAST64 "I64o"
-
-#define SCNoMAX "I64o"
-#define SCNoPTR "o"
-
-#define SCNx16 "hx"
-#define SCNx32 "x"
-#define SCNx64 "I64x"
-
-#define SCNxLEAST16 "hx"
-#define SCNxLEAST32 "x"
-#define SCNxLEAST64 "I64x"
-
-#define SCNxFAST16 "hx"
-#define SCNxFAST32 "x"
-#define SCNxFAST64 "I64x"
-
-#define SCNxMAX "I64x"
-#define SCNxPTR "x"
-
-
-/* fscanf macros for unsigned int types */
-
-#define SCNu16 "hu"
-#define SCNu32 "u"
-#define SCNu64 "I64u"
-
-#define SCNuLEAST16 "hu"
-#define SCNuLEAST32 "u"
-#define SCNuLEAST64 "I64u"
-
-#define SCNuFAST16 "hu"
-#define SCNuFAST32 "u"
-#define SCNuFAST64 "I64u"
-
-#define SCNuMAX "I64u"
-#define SCNuPTR "u"
-
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-/*
- * no length modifier for char types prior to C9x
- * MS runtime scanf appears to treat "hh" as "h"
- */
-
-/* signed char */
-#define SCNd8 "hhd"
-#define SCNdLEAST8 "hhd"
-#define SCNdFAST8 "hhd"
-
-#define SCNi8 "hhi"
-#define SCNiLEAST8 "hhi"
-#define SCNiFAST8 "hhi"
-
-#define SCNo8 "hho"
-#define SCNoLEAST8 "hho"
-#define SCNoFAST8 "hho"
-
-#define SCNx8 "hhx"
-#define SCNxLEAST8 "hhx"
-#define SCNxFAST8 "hhx"
-
-/* unsigned char */
-#define SCNu8 "hhu"
-#define SCNuLEAST8 "hhu"
-#define SCNuFAST8 "hhu"
-#endif /* __STDC_VERSION__ >= 199901 */
-
-#endif /* !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) */
-
-__CRT_INLINE intmax_t __cdecl __MINGW_NOTHROW imaxabs (intmax_t j)
- {return (j >= 0 ? j : -j);}
-imaxdiv_t __cdecl __MINGW_NOTHROW imaxdiv (intmax_t numer, intmax_t denom);
-
-/* 7.8.2 Conversion functions for greatest-width integer types */
-
-intmax_t __cdecl __MINGW_NOTHROW strtoimax (const char* __restrict__ nptr,
- char** __restrict__ endptr, int base);
-uintmax_t __cdecl __MINGW_NOTHROW strtoumax (const char* __restrict__ nptr,
- char** __restrict__ endptr, int base);
-
-intmax_t __cdecl __MINGW_NOTHROW wcstoimax (const wchar_t* __restrict__ nptr,
- wchar_t** __restrict__ endptr, int base);
-uintmax_t __cdecl __MINGW_NOTHROW wcstoumax (const wchar_t* __restrict__ nptr,
- wchar_t** __restrict__ endptr, int base);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ndef _INTTYPES_H */
diff --git a/winsup/mingw/include/io.h b/winsup/mingw/include/io.h
deleted file mode 100644
index 0d3c110..0000000
--- a/winsup/mingw/include/io.h
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
- * io.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * System level I/O functions and types.
- *
- */
-#ifndef _IO_H_
-#define _IO_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-/* MSVC's io.h contains the stuff from dir.h, so I will too.
- * NOTE: This also defines off_t, the file offset type, through
- * an inclusion of sys/types.h */
-
-#include <sys/types.h> /* To get time_t. */
-
-/*
- * Attributes of files as returned by _findfirst et al.
- */
-#define _A_NORMAL 0x00000000
-#define _A_RDONLY 0x00000001
-#define _A_HIDDEN 0x00000002
-#define _A_SYSTEM 0x00000004
-#define _A_VOLID 0x00000008
-#define _A_SUBDIR 0x00000010
-#define _A_ARCH 0x00000020
-
-
-#ifndef RC_INVOKED
-
-#ifndef _INTPTR_T_DEFINED
-#define _INTPTR_T_DEFINED
-#ifdef _WIN64
- typedef __int64 intptr_t;
-#else
- typedef int intptr_t;
-#endif
-#endif
-
-#ifndef _FSIZE_T_DEFINED
-typedef unsigned long _fsize_t;
-#define _FSIZE_T_DEFINED
-#endif
-
-/*
- * The maximum length of a file name. You should use GetVolumeInformation
- * instead of this constant. But hey, this works.
- * Also defined in stdio.h.
- */
-#ifndef FILENAME_MAX
-#define FILENAME_MAX (260)
-#endif
-
-/*
- * The following structure is filled in by _findfirst or _findnext when
- * they succeed in finding a match.
- */
-struct _finddata_t
-{
- unsigned attrib; /* Attributes, see constants above. */
- time_t time_create;
- time_t time_access; /* always midnight local time */
- time_t time_write;
- _fsize_t size;
- char name[FILENAME_MAX]; /* may include spaces. */
-};
-
-struct _finddatai64_t {
- unsigned attrib;
- time_t time_create;
- time_t time_access;
- time_t time_write;
- __int64 size;
- char name[FILENAME_MAX];
-};
-
-#if __MSVCRT_VERSION__ >= 0x0601
-struct __finddata64_t {
- unsigned attrib;
- __time64_t time_create;
- __time64_t time_access;
- __time64_t time_write;
-/* 8 bytes are returned so it can't be _fsize_t */
- __int64 size;
- char name[FILENAME_MAX];
-};
-#endif
-
-#ifndef _WFINDDATA_T_DEFINED
-struct _wfinddata_t {
- unsigned attrib;
- time_t time_create; /* -1 for FAT file systems */
- time_t time_access; /* -1 for FAT file systems */
- time_t time_write;
- _fsize_t size;
- wchar_t name[FILENAME_MAX]; /* may include spaces. */
-};
-
-struct _wfinddatai64_t {
- unsigned attrib;
- time_t time_create;
- time_t time_access;
- time_t time_write;
- __int64 size;
- wchar_t name[FILENAME_MAX];
-};
-
-#if __MSVCRT_VERSION__ >= 0x0601
-struct __wfinddata64_t {
- unsigned attrib;
- __time64_t time_create;
- __time64_t time_access;
- __time64_t time_write;
-/* 8 bytes are returned so it can't be _fsize_t */
- __int64 size;
- wchar_t name[FILENAME_MAX];
-};
-#endif
-
-#define _WFINDDATA_T_DEFINED
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Functions for searching for files. _findfirst returns -1 if no match
- * is found. Otherwise it returns a handle to be used in _findnext and
- * _findclose calls. _findnext also returns -1 if no match could be found,
- * and 0 if a match was found. Call _findclose when you are finished.
- */
-/* FIXME: Should these all use intptr_t, as per recent MSDN docs? */
-_CRTIMP long __cdecl __MINGW_NOTHROW _findfirst (const char*, struct _finddata_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _findnext (long, struct _finddata_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _findclose (long);
-
-_CRTIMP int __cdecl __MINGW_NOTHROW _chdir (const char*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _getcwd (char*, int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _mkdir (const char*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _mktemp (char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _rmdir (const char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _chmod (const char*, int);
-
-#ifdef __MSVCRT__
-_CRTIMP __int64 __cdecl __MINGW_NOTHROW _filelengthi64(int);
-_CRTIMP long __cdecl __MINGW_NOTHROW _findfirsti64(const char*, struct _finddatai64_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _findnexti64(long, struct _finddatai64_t*);
-_CRTIMP __int64 __cdecl __MINGW_NOTHROW _lseeki64(int, __int64, int);
-_CRTIMP __int64 __cdecl __MINGW_NOTHROW _telli64(int);
-/* These require newer versions of msvcrt.dll (6.1 or higher). */
-#if __MSVCRT_VERSION__ >= 0x0601
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _findfirst64(const char*, struct __finddata64_t*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _findnext64(intptr_t, struct __finddata64_t*);
-#endif /* __MSVCRT_VERSION__ >= 0x0601 */
-#ifndef __NO_MINGW_LFS
-__CRT_INLINE off64_t lseek64 (int, off64_t, int);
-__CRT_INLINE off64_t lseek64 (int fd, off64_t offset, int whence)
-{
- return _lseeki64(fd, (__int64) offset, whence);
-}
-#endif
-
-#endif /* __MSVCRT__ */
-
-#ifndef _NO_OLDNAMES
-
-#ifndef _UWIN
-_CRTIMP int __cdecl __MINGW_NOTHROW chdir (const char*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW getcwd (char*, int);
-_CRTIMP int __cdecl __MINGW_NOTHROW mkdir (const char*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW mktemp (char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW rmdir (const char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW chmod (const char*, int);
-#endif /* _UWIN */
-
-#endif /* Not _NO_OLDNAMES */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-/* TODO: Maximum number of open handles has not been tested, I just set
- * it the same as FOPEN_MAX. */
-#define HANDLE_MAX FOPEN_MAX
-
-/* Some defines for _access nAccessMode (MS doesn't define them, but
- * it doesn't seem to hurt to add them). */
-#define F_OK 0 /* Check for file existence */
-/* Well maybe it does hurt. On newer versions of MSVCRT, an access mode
- of 1 causes invalid parameter error. */
-#define X_OK 1 /* MS access() doesn't check for execute permission. */
-#define W_OK 2 /* Check for write permission */
-#define R_OK 4 /* Check for read permission */
-
-#ifndef RC_INVOKED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_CRTIMP int __cdecl __MINGW_NOTHROW _access (const char*, int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _chsize (int, long);
-_CRTIMP int __cdecl __MINGW_NOTHROW _close (int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _commit(int);
-
-/* NOTE: The only significant bit in unPermissions appears to be bit 7 (0x80),
- * the "owner write permission" bit (on FAT). */
-_CRTIMP int __cdecl __MINGW_NOTHROW _creat (const char*, int);
-
-_CRTIMP int __cdecl __MINGW_NOTHROW _dup (int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _dup2 (int, int);
-_CRTIMP long __cdecl __MINGW_NOTHROW _filelength (int);
-_CRTIMP long __cdecl __MINGW_NOTHROW _get_osfhandle (int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _isatty (int);
-
-/* In a very odd turn of events this function is excluded from those
- * files which define _STREAM_COMPAT. This is required in order to
- * build GNU libio because of a conflict with _eof in streambuf.h
- * line 107. Actually I might just be able to change the name of
- * the enum member in streambuf.h... we'll see. TODO */
-#ifndef _STREAM_COMPAT
-_CRTIMP int __cdecl __MINGW_NOTHROW _eof (int);
-#endif
-
-/* LK_... locking commands defined in sys/locking.h. */
-_CRTIMP int __cdecl __MINGW_NOTHROW _locking (int, int, long);
-
-_CRTIMP long __cdecl __MINGW_NOTHROW _lseek (int, long, int);
-
-/* Optional third argument is unsigned unPermissions. */
-_CRTIMP int __cdecl __MINGW_NOTHROW _open (const char*, int, ...);
-
-_CRTIMP int __cdecl __MINGW_NOTHROW _open_osfhandle (long, int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _pipe (int *, unsigned int, int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _read (int, void*, unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _setmode (int, int);
-/* MS puts remove & rename (but not wide versions) in io.h as well
- as in stdio.h. */
-_CRTIMP int __cdecl __MINGW_NOTHROW remove (const char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW rename (const char*, const char*);
-
-/* SH_... flags for nShFlags defined in share.h
- * Optional fourth argument is unsigned unPermissions */
-_CRTIMP int __cdecl __MINGW_NOTHROW _sopen (const char*, int, int, ...);
-
-_CRTIMP long __cdecl __MINGW_NOTHROW _tell (int);
-/* Should umask be in sys/stat.h and/or sys/types.h instead? */
-_CRTIMP int __cdecl __MINGW_NOTHROW _umask (int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _unlink (const char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _write (int, const void*, unsigned int);
-
-/* Wide character versions. Also declared in wchar.h. */
-/* Not in crtdll.dll */
-#if !defined (_WIO_DEFINED)
-#if defined (__MSVCRT__)
-_CRTIMP int __cdecl __MINGW_NOTHROW _waccess(const wchar_t*, int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wchmod(const wchar_t*, int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wcreat(const wchar_t*, int);
-_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirst(const wchar_t*, struct _wfinddata_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext(long, struct _wfinddata_t *);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wunlink(const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wopen(const wchar_t*, int, ...);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wsopen(const wchar_t*, int, int, ...);
-_CRTIMP wchar_t * __cdecl __MINGW_NOTHROW _wmktemp(wchar_t*);
-_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirsti64(const wchar_t*, struct _wfinddatai64_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnexti64(long, struct _wfinddatai64_t*);
-#if __MSVCRT_VERSION__ >= 0x0601
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64(const wchar_t*, struct __wfinddata64_t*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindnext64(intptr_t, struct __wfinddata64_t*);
-#endif
-#endif /* defined (__MSVCRT__) */
-#define _WIO_DEFINED
-#endif /* _WIO_DEFINED */
-
-#ifndef _NO_OLDNAMES
-/*
- * Non-underscored versions of non-ANSI functions to improve portability.
- * These functions live in libmoldname.a.
- */
-
-#ifndef _UWIN
-_CRTIMP int __cdecl __MINGW_NOTHROW access (const char*, int);
-_CRTIMP int __cdecl __MINGW_NOTHROW chsize (int, long );
-_CRTIMP int __cdecl __MINGW_NOTHROW close (int);
-_CRTIMP int __cdecl __MINGW_NOTHROW creat (const char*, int);
-_CRTIMP int __cdecl __MINGW_NOTHROW dup (int);
-_CRTIMP int __cdecl __MINGW_NOTHROW dup2 (int, int);
-_CRTIMP int __cdecl __MINGW_NOTHROW eof (int);
-_CRTIMP long __cdecl __MINGW_NOTHROW filelength (int);
-_CRTIMP int __cdecl __MINGW_NOTHROW isatty (int);
-_CRTIMP long __cdecl __MINGW_NOTHROW lseek (int, long, int);
-_CRTIMP int __cdecl __MINGW_NOTHROW open (const char*, int, ...);
-_CRTIMP int __cdecl __MINGW_NOTHROW read (int, void*, unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW setmode (int, int);
-_CRTIMP int __cdecl __MINGW_NOTHROW sopen (const char*, int, int, ...);
-_CRTIMP long __cdecl __MINGW_NOTHROW tell (int);
-_CRTIMP int __cdecl __MINGW_NOTHROW umask (int);
-_CRTIMP int __cdecl __MINGW_NOTHROW unlink (const char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW write (int, const void*, unsigned int);
-#endif /* _UWIN */
-
-#ifdef __USE_MINGW_ACCESS
-/* Old versions of MSVCRT access() just ignored X_OK, while the version
- shipped with Vista, returns an error code. This will restore the
- old behaviour */
-static inline int __mingw_access (const char* __fname, int __mode)
- { return _access (__fname, __mode & ~X_OK); }
-#define access(__f,__m) __mingw_access (__f, __m)
-#endif
-
-/* Wide character versions. Also declared in wchar.h. */
-/* Where do these live? Not in libmoldname.a nor in libmsvcrt.a */
-#if 0
-int waccess(const wchar_t *, int);
-int wchmod(const wchar_t *, int);
-int wcreat(const wchar_t *, int);
-long wfindfirst(wchar_t *, struct _wfinddata_t *);
-int wfindnext(long, struct _wfinddata_t *);
-int wunlink(const wchar_t *);
-int wrename(const wchar_t *, const wchar_t *);
-int wopen(const wchar_t *, int, ...);
-int wsopen(const wchar_t *, int, int, ...);
-wchar_t * wmktemp(wchar_t *);
-#endif
-
-#endif /* Not _NO_OLDNAMES */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* _IO_H_ not defined */
diff --git a/winsup/mingw/include/libgen.h b/winsup/mingw/include/libgen.h
deleted file mode 100755
index ff661a6..0000000
--- a/winsup/mingw/include/libgen.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifndef _LIBGEN_H_
-/*
- * libgen.h
- *
- * $Id$
- *
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Functions for splitting pathnames into dirname and basename components.
- *
- */
-#define _LIBGEN_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern __cdecl __MINGW_NOTHROW char *basename (char *);
-extern __cdecl __MINGW_NOTHROW char *dirname (char *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _LIBGEN_H_: end of file */
-
diff --git a/winsup/mingw/include/limits.h b/winsup/mingw/include/limits.h
deleted file mode 100644
index 04f79f5..0000000
--- a/winsup/mingw/include/limits.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * limits.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Functions for manipulating paths and directories (included from io.h)
- * plus functions for setting the current drive.
- *
- * Defines constants for the sizes of integral types.
- *
- * NOTE: GCC should supply a version of this header and it should be safe to
- * use that version instead of this one (maybe safer).
- *
- */
-
-#ifndef _LIMITS_H_
-#define _LIMITS_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-/*
- * File system limits
- *
- * TODO: NAME_MAX and OPEN_MAX are file system limits or not? Are they the
- * same as FILENAME_MAX and FOPEN_MAX from stdio.h?
- * NOTE: Apparently the actual size of PATH_MAX is 260, but a space is
- * required for the NUL. TODO: Test?
- */
-#define PATH_MAX 259
-
-/*
- * Characteristics of the char data type.
- *
- * TODO: Is MB_LEN_MAX correct?
- */
-#define CHAR_BIT 8
-#define MB_LEN_MAX 2
-
-#define SCHAR_MIN (-128)
-#define SCHAR_MAX 127
-
-#define UCHAR_MAX 255
-
-/* TODO: Is this safe? I think it might just be testing the preprocessor,
- * not the compiler itself... */
-#if ('\x80' < 0)
-#define CHAR_MIN SCHAR_MIN
-#define CHAR_MAX SCHAR_MAX
-#else
-#define CHAR_MIN 0
-#define CHAR_MAX UCHAR_MAX
-#endif
-
-/*
- * Maximum and minimum values for ints.
- */
-#define INT_MAX 2147483647
-#define INT_MIN (-INT_MAX-1)
-
-#define UINT_MAX 0xffffffff
-
-/*
- * Maximum and minimum values for shorts.
- */
-#define SHRT_MAX 32767
-#define SHRT_MIN (-SHRT_MAX-1)
-
-#define USHRT_MAX 0xffff
-
-/*
- * Maximum and minimum values for longs and unsigned longs.
- *
- * TODO: This is not correct for Alphas, which have 64 bit longs.
- */
-#define LONG_MAX 2147483647L
-#define LONG_MIN (-LONG_MAX-1)
-
-#define ULONG_MAX 0xffffffffUL
-
-#ifndef __STRICT_ANSI__
-/* POSIX wants this. */
-#define SSIZE_MAX LONG_MAX
-#endif
-
-#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
- || !defined(__STRICT_ANSI__)
-/* ISO C9x macro names */
-#define LLONG_MAX 9223372036854775807LL
-#define LLONG_MIN (-LLONG_MAX - 1)
-#define ULLONG_MAX (2ULL * LLONG_MAX + 1)
-#endif
-
-/*
- * The GNU C compiler also allows 'long long int'
- */
-#if !defined(__STRICT_ANSI__) && defined(__GNUC__)
-
-#define LONG_LONG_MAX 9223372036854775807LL
-#define LONG_LONG_MIN (-LONG_LONG_MAX-1)
-#define ULONG_LONG_MAX (2ULL * LONG_LONG_MAX + 1)
-
-/* MSVC compatibility */
-#define _I64_MIN LONG_LONG_MIN
-#define _I64_MAX LONG_LONG_MAX
-#define _UI64_MAX ULONG_LONG_MAX
-
-#endif /* Not Strict ANSI and GNU C compiler */
-
-
-#endif /* not _LIMITS_H_ */
diff --git a/winsup/mingw/include/locale.h b/winsup/mingw/include/locale.h
deleted file mode 100644
index ee26db3..0000000
--- a/winsup/mingw/include/locale.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * locale.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Functions and types for localization (ie. changing the appearance of
- * output based on the standards of a certain country).
- *
- */
-
-#ifndef _LOCALE_H_
-#define _LOCALE_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-/*
- * NOTE: I have tried to test this, but I am limited by my knowledge of
- * locale issues. The structure does not bomb if you look at the
- * values, and 'decimal_point' even seems to be correct. But the
- * rest of the values are, by default, not particularly useful
- * (read meaningless and not related to the international settings
- * of the system).
- */
-
-#define LC_ALL 0
-#define LC_COLLATE 1
-#define LC_CTYPE 2
-#define LC_MONETARY 3
-#define LC_NUMERIC 4
-#define LC_TIME 5
-#define LC_MIN LC_ALL
-#define LC_MAX LC_TIME
-
-#ifndef RC_INVOKED
-
-/* According to C89 std, NULL is defined in locale.h too. */
-#define __need_NULL
-#include <stddef.h>
-
-/*
- * The structure returned by 'localeconv'.
- */
-struct lconv
-{
- char* decimal_point;
- char* thousands_sep;
- char* grouping;
- char* int_curr_symbol;
- char* currency_symbol;
- char* mon_decimal_point;
- char* mon_thousands_sep;
- char* mon_grouping;
- char* positive_sign;
- char* negative_sign;
- char int_frac_digits;
- char frac_digits;
- char p_cs_precedes;
- char p_sep_by_space;
- char n_cs_precedes;
- char n_sep_by_space;
- char p_sign_posn;
- char n_sign_posn;
-};
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_CRTIMP char* __cdecl __MINGW_NOTHROW setlocale (int, const char*);
-_CRTIMP struct lconv* __cdecl __MINGW_NOTHROW localeconv (void);
-
-#ifndef _WLOCALE_DEFINED /* also declared in wchar.h */
-# define __need_wchar_t
-# include <stddef.h>
- _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wsetlocale(int, const wchar_t*);
-# define _WLOCALE_DEFINED
-#endif /* ndef _WLOCALE_DEFINED */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _LOCALE_H_ */
-
diff --git a/winsup/mingw/include/malloc.h b/winsup/mingw/include/malloc.h
deleted file mode 100644
index 5931b5e..0000000
--- a/winsup/mingw/include/malloc.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * malloc.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Support for programs which want to use malloc.h to get memory management
- * functions. Unless you absolutely need some of these functions and they are
- * not in the ANSI headers you should use the ANSI standard header files
- * instead.
- *
- */
-
-#ifndef _MALLOC_H_
-#define _MALLOC_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#include <stdlib.h>
-
-#ifndef RC_INVOKED
-
-/*
- * The structure used to walk through the heap with _heapwalk.
- */
-typedef struct _heapinfo
-{
- int* _pentry;
- size_t _size;
- int _useflag;
-} _HEAPINFO;
-
-/* Values for _heapinfo.useflag */
-#define _FREEENTRY 0
-#define _USEDENTRY 1
-
-/* Return codes for _heapwalk() */
-#define _HEAPEMPTY (-1)
-#define _HEAPOK (-2)
-#define _HEAPBADBEGIN (-3)
-#define _HEAPBADNODE (-4)
-#define _HEAPEND (-5)
-#define _HEAPBADPTR (-6)
-
-/* maximum size of a user request for memory */
-#define _HEAP_MAXREQ 0xFFFFFFE0
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- The _heap* memory allocation functions are supported on NT
- but not W9x. On latter, they always set errno to ENOSYS.
-*/
-_CRTIMP int __cdecl __MINGW_NOTHROW _heapwalk (_HEAPINFO*);
-#ifdef __GNUC__
-#define _alloca(x) __builtin_alloca((x))
-#endif
-
-#ifndef _NO_OLDNAMES
-_CRTIMP int __cdecl __MINGW_NOTHROW heapwalk (_HEAPINFO*);
-#ifdef __GNUC__
-#define alloca(x) __builtin_alloca((x))
-#endif
-#endif /* Not _NO_OLDNAMES */
-
-_CRTIMP int __cdecl __MINGW_NOTHROW _heapchk (void); /* Verify heap integrety. */
-_CRTIMP int __cdecl __MINGW_NOTHROW _heapmin (void); /* Return unused heap to the OS. */
-_CRTIMP int __cdecl __MINGW_NOTHROW _heapset (unsigned int);
-
-_CRTIMP size_t __cdecl __MINGW_NOTHROW _msize (void*);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW _get_sbh_threshold (void);
-_CRTIMP int __cdecl __MINGW_NOTHROW _set_sbh_threshold (size_t);
-_CRTIMP void* __cdecl __MINGW_NOTHROW _expand (void*, size_t);
-
-/* These require msvcr70.dll or higher. */
-#if __MSVCRT_VERSION__ >= 0x0700
-_CRTIMP void * __cdecl __MINGW_NOTHROW _aligned_offset_malloc(size_t, size_t, size_t);
-_CRTIMP void * __cdecl __MINGW_NOTHROW _aligned_offset_realloc(void*, size_t, size_t, size_t);
-_CRTIMP void * __cdecl __MINGW_NOTHROW _aligned_offset_recalloc(void*, size_t, size_t, size_t, size_t);
-
-_CRTIMP void * __cdecl __MINGW_NOTHROW _aligned_malloc (size_t, size_t);
-_CRTIMP void * __cdecl __MINGW_NOTHROW _aligned_realloc (void*, size_t, size_t);
-_CRTIMP void* __cdecl __MINGW_NOTHROW _aligned_recalloc(void*, size_t, size_t, size_t);
-_CRTIMP void __cdecl __MINGW_NOTHROW _aligned_free (void*);
-#endif /* __MSVCRT_VERSION__ >= 0x0700 */
-
-/* These require libmingwex.a. */
-void * __cdecl __MINGW_NOTHROW __mingw_aligned_offset_malloc (size_t, size_t, size_t);
-void * __cdecl __MINGW_NOTHROW __mingw_aligned_offset_realloc (void*, size_t, size_t, size_t);
-
-void * __cdecl __MINGW_NOTHROW __mingw_aligned_malloc (size_t, size_t);
-void * __cdecl __MINGW_NOTHROW __mingw_aligned_realloc (void*, size_t, size_t);
-void __cdecl __MINGW_NOTHROW __mingw_aligned_free (void*);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* RC_INVOKED */
-
-#endif /* Not _MALLOC_H_ */
diff --git a/winsup/mingw/include/math.h b/winsup/mingw/include/math.h
deleted file mode 100644
index 0577d0c..0000000
--- a/winsup/mingw/include/math.h
+++ /dev/null
@@ -1,873 +0,0 @@
-/*
- * math.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Mathematical functions.
- *
- */
-
-
-#ifndef _MATH_H_
-#define _MATH_H_
-
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-/*
- * Types for the _exception structure.
- */
-
-#define _DOMAIN 1 /* domain error in argument */
-#define _SING 2 /* singularity */
-#define _OVERFLOW 3 /* range overflow */
-#define _UNDERFLOW 4 /* range underflow */
-#define _TLOSS 5 /* total loss of precision */
-#define _PLOSS 6 /* partial loss of precision */
-
-/*
- * Exception types with non-ANSI names for compatibility.
- */
-
-#ifndef __STRICT_ANSI__
-#ifndef _NO_OLDNAMES
-
-#define DOMAIN _DOMAIN
-#define SING _SING
-#define OVERFLOW _OVERFLOW
-#define UNDERFLOW _UNDERFLOW
-#define TLOSS _TLOSS
-#define PLOSS _PLOSS
-
-#endif /* Not _NO_OLDNAMES */
-#endif /* Not __STRICT_ANSI__ */
-
-
-/* Traditional/XOPEN math constants (double precison) */
-#ifndef __STRICT_ANSI__
-#define M_E 2.7182818284590452354
-#define M_LOG2E 1.4426950408889634074
-#define M_LOG10E 0.43429448190325182765
-#define M_LN2 0.69314718055994530942
-#define M_LN10 2.30258509299404568402
-#define M_PI 3.14159265358979323846
-#define M_PI_2 1.57079632679489661923
-#define M_PI_4 0.78539816339744830962
-#define M_1_PI 0.31830988618379067154
-#define M_2_PI 0.63661977236758134308
-#define M_2_SQRTPI 1.12837916709551257390
-#define M_SQRT2 1.41421356237309504880
-#define M_SQRT1_2 0.70710678118654752440
-#endif
-
-/* These are also defined in Mingw float.h; needed here as well to work
- around GCC build issues. */
-#ifndef __STRICT_ANSI__
-#ifndef __MINGW_FPCLASS_DEFINED
-#define __MINGW_FPCLASS_DEFINED 1
-/* IEEE 754 classication */
-#define _FPCLASS_SNAN 0x0001 /* Signaling "Not a Number" */
-#define _FPCLASS_QNAN 0x0002 /* Quiet "Not a Number" */
-#define _FPCLASS_NINF 0x0004 /* Negative Infinity */
-#define _FPCLASS_NN 0x0008 /* Negative Normal */
-#define _FPCLASS_ND 0x0010 /* Negative Denormal */
-#define _FPCLASS_NZ 0x0020 /* Negative Zero */
-#define _FPCLASS_PZ 0x0040 /* Positive Zero */
-#define _FPCLASS_PD 0x0080 /* Positive Denormal */
-#define _FPCLASS_PN 0x0100 /* Positive Normal */
-#define _FPCLASS_PINF 0x0200 /* Positive Infinity */
-#endif /* __MINGW_FPCLASS_DEFINED */
-#endif /* Not __STRICT_ANSI__ */
-
-#ifndef RC_INVOKED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * HUGE_VAL is returned by strtod when the value would overflow the
- * representation of 'double'. There are other uses as well.
- *
- * __imp__HUGE is a pointer to the actual variable _HUGE in
- * MSVCRT.DLL. If we used _HUGE directly we would get a pointer
- * to a thunk function.
- *
- * NOTE: The CRTDLL version uses _HUGE_dll instead.
- */
-
-#if __MINGW_GNUC_PREREQ(3, 3)
-#define HUGE_VAL __builtin_huge_val()
-#else
-
-#ifndef __DECLSPEC_SUPPORTED
-
-#ifdef __MSVCRT__
-extern double* _imp___HUGE;
-#define HUGE_VAL (*_imp___HUGE)
-#else
-/* CRTDLL */
-extern double* _imp___HUGE_dll;
-#define HUGE_VAL (*_imp___HUGE_dll)
-#endif
-
-#else /* __DECLSPEC_SUPPORTED */
-
-#ifdef __MSVCRT__
-__MINGW_IMPORT double _HUGE;
-#define HUGE_VAL _HUGE
-#else
-/* CRTDLL */
-__MINGW_IMPORT double _HUGE_dll;
-#define HUGE_VAL _HUGE_dll
-#endif
-
-#endif /* __DECLSPEC_SUPPORTED */
-#endif /* __MINGW_GNUC_PREREQ(3, 3) */
-
-
-struct _exception
-{
- int type;
- char *name;
- double arg1;
- double arg2;
- double retval;
-};
-
-_CRTIMP double __cdecl sin (double);
-_CRTIMP double __cdecl cos (double);
-_CRTIMP double __cdecl tan (double);
-_CRTIMP double __cdecl sinh (double);
-_CRTIMP double __cdecl cosh (double);
-_CRTIMP double __cdecl tanh (double);
-_CRTIMP double __cdecl asin (double);
-_CRTIMP double __cdecl acos (double);
-_CRTIMP double __cdecl atan (double);
-_CRTIMP double __cdecl atan2 (double, double);
-_CRTIMP double __cdecl exp (double);
-_CRTIMP double __cdecl log (double);
-_CRTIMP double __cdecl log10 (double);
-_CRTIMP double __cdecl pow (double, double);
-_CRTIMP double __cdecl sqrt (double);
-_CRTIMP double __cdecl ceil (double);
-_CRTIMP double __cdecl floor (double);
-_CRTIMP double __cdecl fabs (double);
-_CRTIMP double __cdecl ldexp (double, int);
-_CRTIMP double __cdecl frexp (double, int*);
-_CRTIMP double __cdecl modf (double, double*);
-_CRTIMP double __cdecl fmod (double, double);
-
-/* Excess precision when using a 64-bit mantissa for FPU math ops can
- cause unexpected results with some of the MSVCRT math functions. For
- example, unless the function return value is stored (truncating to
- 53-bit mantissa), calls to pow with both x and y as integral values
- sometimes produce a non-integral result.
- One workaround is to reset the FPU env to 53-bit mantissa
- by a call to fesetenv (FE_PC53_ENV). Amother is to force storage
- of the return value of individual math functions using wrappers.
- NB, using these wrappers will disable builtin math functions and
- hence disable the folding of function results at compile time when
- arguments are constant. */
-
-#if 0
-#define __DEFINE_FLOAT_STORE_MATHFN_D1(fn1) \
-static __inline__ double \
-__float_store_ ## fn1 (double x) \
-{ \
- __volatile__ double res = (fn1) (x); \
- return res; \
-}
-
-#define __DEFINE_FLOAT_STORE_MATHFN_D2(fn2) \
-static __inline__ double \
-__float_store_ ## fn2 (double x, double y) \
-{ \
- __volatile__ double res = (fn2) (x, y); \
- return res; \
-}
-#endif
-
-/* For example, here is how to force the result of the pow function
- to be stored: */
-#if 0
-#undef pow
-/* Define the ___float_store_pow function and use it instead of pow(). */
-__DEFINE_FLOAT_STORE_MATHFN_D2 (pow)
-#define pow __float_store_pow
-#endif
-
-#ifndef __STRICT_ANSI__
-
-/* Complex number (for _cabs). This is the MS version. The ISO
- C99 counterpart _Complex is an intrinsic type in GCC and
- 'complex' is defined as a macro. See complex.h */
-struct _complex
-{
- double x; /* Real part */
- double y; /* Imaginary part */
-};
-
-_CRTIMP double __cdecl _cabs (struct _complex);
-
-_CRTIMP double __cdecl _hypot (double, double);
-_CRTIMP double __cdecl _j0 (double);
-_CRTIMP double __cdecl _j1 (double);
-_CRTIMP double __cdecl _jn (int, double);
-_CRTIMP double __cdecl _y0 (double);
-_CRTIMP double __cdecl _y1 (double);
-_CRTIMP double __cdecl _yn (int, double);
-_CRTIMP int __cdecl _matherr (struct _exception *);
-
-/* These are also declared in Mingw float.h; needed here as well to work
- around GCC build issues. */
-/* BEGIN FLOAT.H COPY */
-/*
- * IEEE recommended functions
- */
-
-_CRTIMP double __cdecl _chgsign (double);
-_CRTIMP double __cdecl _copysign (double, double);
-_CRTIMP double __cdecl _logb (double);
-_CRTIMP double __cdecl _nextafter (double, double);
-_CRTIMP double __cdecl _scalb (double, long);
-
-_CRTIMP int __cdecl _finite (double);
-_CRTIMP int __cdecl _fpclass (double);
-_CRTIMP int __cdecl _isnan (double);
-
-/* END FLOAT.H COPY */
-
-
-/*
- * Non-underscored versions of non-ANSI functions.
- * These reside in liboldnames.a.
- */
-
-#if !defined (_NO_OLDNAMES)
-
-_CRTIMP double __cdecl j0 (double);
-_CRTIMP double __cdecl j1 (double);
-_CRTIMP double __cdecl jn (int, double);
-_CRTIMP double __cdecl y0 (double);
-_CRTIMP double __cdecl y1 (double);
-_CRTIMP double __cdecl yn (int, double);
-
-_CRTIMP double __cdecl chgsign (double);
-/*
- * scalb() is a GCC built-in.
- * Exclude this _scalb() stub; the semantics are incompatible
- * with the built-in implementation.
- *
-_CRTIMP double __cdecl scalb (double, long);
- *
- */
-_CRTIMP int __cdecl finite (double);
-_CRTIMP int __cdecl fpclass (double);
-
-#define FP_SNAN _FPCLASS_SNAN
-#define FP_QNAN _FPCLASS_QNAN
-#define FP_NINF _FPCLASS_NINF
-#define FP_PINF _FPCLASS_PINF
-#define FP_NDENORM _FPCLASS_ND
-#define FP_PDENORM _FPCLASS_PD
-#define FP_NZERO _FPCLASS_NZ
-#define FP_PZERO _FPCLASS_PZ
-#define FP_NNORM _FPCLASS_NN
-#define FP_PNORM _FPCLASS_PN
-
-#endif /* Not _NO_OLDNAMES */
-
-/* This require msvcr70.dll or higher. */
-#if __MSVCRT_VERSION__ >= 0x0700
-_CRTIMP int __cdecl _set_SSE2_enable (int);
-#endif /* __MSVCRT_VERSION__ >= 0x0700 */
-
-
-#endif /* __STRICT_ANSI__ */
-
-
-#ifndef __NO_ISOCEXT
-#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
- || !defined __STRICT_ANSI__ || defined __cplusplus
-
-#if __MINGW_GNUC_PREREQ(3, 3)
-#define HUGE_VALF __builtin_huge_valf()
-#define HUGE_VALL __builtin_huge_vall()
-#define INFINITY __builtin_inf()
-#define NAN __builtin_nan("")
-#else
-extern const float __INFF;
-#define HUGE_VALF __INFF
-extern const long double __INFL;
-#define HUGE_VALL __INFL
-#define INFINITY HUGE_VALF
-extern const double __QNAN;
-#define NAN __QNAN
-#endif /* __MINGW_GNUC_PREREQ(3, 3) */
-
-/* Use the compiler's builtin define for FLT_EVAL_METHOD to
- set float_t and double_t. */
-#if defined(__FLT_EVAL_METHOD__)
-# if ( __FLT_EVAL_METHOD__== 0)
-typedef float float_t;
-typedef double double_t;
-# elif (__FLT_EVAL_METHOD__ == 1)
-typedef double float_t;
-typedef double double_t;
-# elif (__FLT_EVAL_METHOD__ == 2)
-typedef long double float_t;
-typedef long double double_t;
-#endif
-#else /* ix87 FPU default */
-typedef long double float_t;
-typedef long double double_t;
-#endif
-
-/* 7.12.3.1 */
-/*
- Return values for fpclassify.
- These are based on Intel x87 fpu condition codes
- in the high byte of status word and differ from
- the return values for MS IEEE 754 extension _fpclass()
-*/
-#define FP_NAN 0x0100
-#define FP_NORMAL 0x0400
-#define FP_INFINITE (FP_NAN | FP_NORMAL)
-#define FP_ZERO 0x4000
-#define FP_SUBNORMAL (FP_NORMAL | FP_ZERO)
-/* 0x0200 is signbit mask */
-
-
-/*
- We can't inline float or double, because we want to ensure truncation
- to semantic type before classification.
- (A normal long double value might become subnormal when
- converted to double, and zero when converted to float.)
-*/
-
-extern int __cdecl __fpclassifyf (float);
-extern int __cdecl __fpclassify (double);
-
-__CRT_INLINE int __cdecl __fpclassifyl (long double x){
- unsigned short sw;
- __asm__ ("fxam; fstsw %%ax;" : "=a" (sw): "t" (x));
- return sw & (FP_NAN | FP_NORMAL | FP_ZERO );
-}
-
-#define fpclassify(x) (sizeof (x) == sizeof (float) ? __fpclassifyf (x) \
- : sizeof (x) == sizeof (double) ? __fpclassify (x) \
- : __fpclassifyl (x))
-
-/* 7.12.3.2 */
-#define isfinite(x) ((fpclassify(x) & FP_NAN) == 0)
-
-/* 7.12.3.3 */
-#define isinf(x) (fpclassify(x) == FP_INFINITE)
-
-/* 7.12.3.4 */
-/* We don't need to worry about truncation here:
- A NaN stays a NaN. */
-
-__CRT_INLINE int __cdecl __isnan (double _x)
-{
- unsigned short sw;
- __asm__ ("fxam;"
- "fstsw %%ax": "=a" (sw) : "t" (_x));
- return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
- == FP_NAN;
-}
-
-__CRT_INLINE int __cdecl __isnanf (float _x)
-{
- unsigned short sw;
- __asm__ ("fxam;"
- "fstsw %%ax": "=a" (sw) : "t" (_x));
- return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
- == FP_NAN;
-}
-
-__CRT_INLINE int __cdecl __isnanl (long double _x)
-{
- unsigned short sw;
- __asm__ ("fxam;"
- "fstsw %%ax": "=a" (sw) : "t" (_x));
- return (sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
- == FP_NAN;
-}
-
-
-#define isnan(x) (sizeof (x) == sizeof (float) ? __isnanf (x) \
- : sizeof (x) == sizeof (double) ? __isnan (x) \
- : __isnanl (x))
-
-/* 7.12.3.5 */
-#define isnormal(x) (fpclassify(x) == FP_NORMAL)
-
-/* 7.12.3.6 The signbit macro */
-__CRT_INLINE int __cdecl __signbit (double x) {
- unsigned short stw;
- __asm__ ( "fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
- return (stw & 0x0200) != 0;
-}
-
-__CRT_INLINE int __cdecl __signbitf (float x) {
- unsigned short stw;
- __asm__ ("fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
- return (stw & 0x0200) != 0;
-}
-
-__CRT_INLINE int __cdecl __signbitl (long double x) {
- unsigned short stw;
- __asm__ ("fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
- return (stw & 0x0200) != 0;
-}
-
-#define signbit(x) (sizeof (x) == sizeof (float) ? __signbitf (x) \
- : sizeof (x) == sizeof (double) ? __signbit (x) \
- : __signbitl (x))
-
-/* 7.12.4 Trigonometric functions: Double in C89 */
-extern float __cdecl sinf (float);
-extern long double __cdecl sinl (long double);
-
-extern float __cdecl cosf (float);
-extern long double __cdecl cosl (long double);
-
-extern float __cdecl tanf (float);
-extern long double __cdecl tanl (long double);
-
-extern float __cdecl asinf (float);
-extern long double __cdecl asinl (long double);
-
-extern float __cdecl acosf (float);
-extern long double __cdecl acosl (long double);
-
-extern float __cdecl atanf (float);
-extern long double __cdecl atanl (long double);
-
-extern float __cdecl atan2f (float, float);
-extern long double __cdecl atan2l (long double, long double);
-
-/* 7.12.5 Hyperbolic functions: Double in C89 */
-__CRT_INLINE float __cdecl sinhf (float x)
- {return (float) sinh (x);}
-extern long double __cdecl sinhl (long double);
-
-__CRT_INLINE float __cdecl coshf (float x)
- {return (float) cosh (x);}
-extern long double __cdecl coshl (long double);
-
-__CRT_INLINE float __cdecl tanhf (float x)
- {return (float) tanh (x);}
-extern long double __cdecl tanhl (long double);
-
-/* Inverse hyperbolic trig functions */
-/* 7.12.5.1 */
-extern double __cdecl acosh (double);
-extern float __cdecl acoshf (float);
-extern long double __cdecl acoshl (long double);
-
-/* 7.12.5.2 */
-extern double __cdecl asinh (double);
-extern float __cdecl asinhf (float);
-extern long double __cdecl asinhl (long double);
-
-/* 7.12.5.3 */
-extern double __cdecl atanh (double);
-extern float __cdecl atanhf (float);
-extern long double __cdecl atanhl (long double);
-
-/* Exponentials and logarithms */
-/* 7.12.6.1 Double in C89 */
-__CRT_INLINE float __cdecl expf (float x)
- {return (float) exp (x);}
-extern long double __cdecl expl (long double);
-
-/* 7.12.6.2 */
-extern double __cdecl exp2(double);
-extern float __cdecl exp2f(float);
-extern long double __cdecl exp2l(long double);
-
-/* 7.12.6.3 The expm1 functions */
-/* TODO: These could be inlined */
-extern double __cdecl expm1(double);
-extern float __cdecl expm1f(float);
-extern long double __cdecl expm1l(long double);
-
-/* 7.12.6.4 Double in C89 */
-__CRT_INLINE float __cdecl frexpf (float x, int* expn)
- {return (float) frexp (x, expn);}
-extern long double __cdecl frexpl (long double, int*);
-
-/* 7.12.6.5 */
-#define FP_ILOGB0 ((int)0x80000000)
-#define FP_ILOGBNAN ((int)0x80000000)
-extern int __cdecl ilogb (double);
-extern int __cdecl ilogbf (float);
-extern int __cdecl ilogbl (long double);
-
-/* 7.12.6.6 Double in C89 */
-__CRT_INLINE float __cdecl ldexpf (float x, int expn)
- {return (float) ldexp (x, expn);}
-extern long double __cdecl ldexpl (long double, int);
-
-/* 7.12.6.7 Double in C89 */
-extern float __cdecl logf (float);
-extern long double __cdecl logl (long double);
-
-/* 7.12.6.8 Double in C89 */
-extern float __cdecl log10f (float);
-extern long double __cdecl log10l (long double);
-
-/* 7.12.6.9 */
-extern double __cdecl log1p(double);
-extern float __cdecl log1pf(float);
-extern long double __cdecl log1pl(long double);
-
-/* 7.12.6.10 */
-extern double __cdecl log2 (double);
-extern float __cdecl log2f (float);
-extern long double __cdecl log2l (long double);
-
-/* 7.12.6.11 */
-extern double __cdecl logb (double);
-extern float __cdecl logbf (float);
-extern long double __cdecl logbl (long double);
-
-/* Inline versions. GCC-4.0+ can do a better fast-math optimization
- with __builtins. */
-#if !(__MINGW_GNUC_PREREQ (4, 0) && defined __FAST_MATH__ )
-__CRT_INLINE double __cdecl logb (double x)
-{
- double res;
- __asm__ ("fxtract\n\t"
- "fstp %%st" : "=t" (res) : "0" (x));
- return res;
-}
-
-__CRT_INLINE float __cdecl logbf (float x)
-{
- float res;
- __asm__ ("fxtract\n\t"
- "fstp %%st" : "=t" (res) : "0" (x));
- return res;
-}
-
-__CRT_INLINE long double __cdecl logbl (long double x)
-{
- long double res;
- __asm__ ("fxtract\n\t"
- "fstp %%st" : "=t" (res) : "0" (x));
- return res;
-}
-#endif /* !defined __FAST_MATH__ || !__MINGW_GNUC_PREREQ (4, 0) */
-
-/* 7.12.6.12 Double in C89 */
-extern float __cdecl modff (float, float*);
-extern long double __cdecl modfl (long double, long double*);
-
-/* 7.12.6.13 */
-extern double __cdecl scalbn (double, int);
-extern float __cdecl scalbnf (float, int);
-extern long double __cdecl scalbnl (long double, int);
-
-extern double __cdecl scalbln (double, long);
-extern float __cdecl scalblnf (float, long);
-extern long double __cdecl scalblnl (long double, long);
-
-/* 7.12.7.1 */
-/* Implementations adapted from Cephes versions */
-extern double __cdecl cbrt (double);
-extern float __cdecl cbrtf (float);
-extern long double __cdecl cbrtl (long double);
-
-/* 7.12.7.2 The fabs functions: Double in C89 */
-extern float __cdecl fabsf (float x);
-extern long double __cdecl fabsl (long double x);
-
-/* 7.12.7.3 */
-extern double __cdecl hypot (double, double); /* in libmoldname.a */
-__CRT_INLINE float __cdecl hypotf (float x, float y)
- { return (float) hypot (x, y);}
-extern long double __cdecl hypotl (long double, long double);
-
-/* 7.12.7.4 The pow functions. Double in C89 */
-__CRT_INLINE float __cdecl powf (float x, float y)
- {return (float) pow (x, y);}
-extern long double __cdecl powl (long double, long double);
-
-/* 7.12.7.5 The sqrt functions. Double in C89. */
-extern float __cdecl sqrtf (float);
-extern long double __cdecl sqrtl (long double);
-
-/* 7.12.8.1 The erf functions */
-extern double __cdecl erf (double);
-extern float __cdecl erff (float);
-extern long double __cdecl erfl (long double);
-
-/* 7.12.8.2 The erfc functions */
-extern double __cdecl erfc (double);
-extern float __cdecl erfcf (float);
-extern long double __cdecl erfcl (long double);
-
-/* 7.12.8.3 The lgamma functions */
-extern double __cdecl lgamma (double);
-extern float __cdecl lgammaf (float);
-extern long double __cdecl lgammal (long double);
-
-/* 7.12.8.4 The tgamma functions */
-extern double __cdecl tgamma (double);
-extern float __cdecl tgammaf (float);
-extern long double __cdecl tgammal (long double);
-
-/* 7.12.9.1 Double in C89 */
-extern float __cdecl ceilf (float);
-extern long double __cdecl ceill (long double);
-
-/* 7.12.9.2 Double in C89 */
-extern float __cdecl floorf (float);
-extern long double __cdecl floorl (long double);
-
-/* 7.12.9.3 */
-extern double __cdecl nearbyint ( double);
-extern float __cdecl nearbyintf (float);
-extern long double __cdecl nearbyintl (long double);
-
-/* 7.12.9.4 */
-/* round, using fpu control word settings */
-extern double __cdecl rint (double);
-extern float __cdecl rintf (float);
-extern long double __cdecl rintl (long double);
-
-/* 7.12.9.5 */
-extern long __cdecl lrint (double);
-extern long __cdecl lrintf (float);
-extern long __cdecl lrintl (long double);
-
-extern long long __cdecl llrint (double);
-extern long long __cdecl llrintf (float);
-extern long long __cdecl llrintl (long double);
-
-/* Inline versions of above.
- GCC 4.0+ can do a better fast-math job with __builtins. */
-#if !(__MINGW_GNUC_PREREQ (4, 0) && defined __FAST_MATH__ )
-__CRT_INLINE double __cdecl rint (double x)
-{
- double retval;
- __asm__ ("frndint;": "=t" (retval) : "0" (x));
- return retval;
-}
-
-__CRT_INLINE float __cdecl rintf (float x)
-{
- float retval;
- __asm__ ("frndint;" : "=t" (retval) : "0" (x) );
- return retval;
-}
-
-__CRT_INLINE long double __cdecl rintl (long double x)
-{
- long double retval;
- __asm__ ("frndint;" : "=t" (retval) : "0" (x) );
- return retval;
-}
-
-__CRT_INLINE long __cdecl lrint (double x)
-{
- long retval;
- __asm__ __volatile__
- ("fistpl %0" : "=m" (retval) : "t" (x) : "st");
- return retval;
-}
-
-__CRT_INLINE long __cdecl lrintf (float x)
-{
- long retval;
- __asm__ __volatile__
- ("fistpl %0" : "=m" (retval) : "t" (x) : "st");
- return retval;
-}
-
-__CRT_INLINE long __cdecl lrintl (long double x)
-{
- long retval;
- __asm__ __volatile__
- ("fistpl %0" : "=m" (retval) : "t" (x) : "st");
- return retval;
-}
-
-__CRT_INLINE long long __cdecl llrint (double x)
-{
- long long retval;
- __asm__ __volatile__
- ("fistpll %0" : "=m" (retval) : "t" (x) : "st");
- return retval;
-}
-
-__CRT_INLINE long long __cdecl llrintf (float x)
-{
- long long retval;
- __asm__ __volatile__
- ("fistpll %0" : "=m" (retval) : "t" (x) : "st");
- return retval;
-}
-
-__CRT_INLINE long long __cdecl llrintl (long double x)
-{
- long long retval;
- __asm__ __volatile__
- ("fistpll %0" : "=m" (retval) : "t" (x) : "st");
- return retval;
-}
-#endif /* !__FAST_MATH__ || !__MINGW_GNUC_PREREQ (4,0) */
-
-/* 7.12.9.6 */
-/* round away from zero, regardless of fpu control word settings */
-extern double __cdecl round (double);
-extern float __cdecl roundf (float);
-extern long double __cdecl roundl (long double);
-
-/* 7.12.9.7 */
-extern long __cdecl lround (double);
-extern long __cdecl lroundf (float);
-extern long __cdecl lroundl (long double);
-
-extern long long __cdecl llround (double);
-extern long long __cdecl llroundf (float);
-extern long long __cdecl llroundl (long double);
-
-/* 7.12.9.8 */
-/* round towards zero, regardless of fpu control word settings */
-extern double __cdecl trunc (double);
-extern float __cdecl truncf (float);
-extern long double __cdecl truncl (long double);
-
-/* 7.12.10.1 Double in C89 */
-extern float __cdecl fmodf (float, float);
-extern long double __cdecl fmodl (long double, long double);
-
-/* 7.12.10.2 */
-extern double __cdecl remainder (double, double);
-extern float __cdecl remainderf (float, float);
-extern long double __cdecl remainderl (long double, long double);
-
-/* 7.12.10.3 */
-extern double __cdecl remquo(double, double, int *);
-extern float __cdecl remquof(float, float, int *);
-extern long double __cdecl remquol(long double, long double, int *);
-
-/* 7.12.11.1 */
-extern double __cdecl copysign (double, double); /* in libmoldname.a */
-extern float __cdecl copysignf (float, float);
-extern long double __cdecl copysignl (long double, long double);
-
-/* 7.12.11.2 Return a NaN */
-extern double __cdecl nan(const char *tagp);
-extern float __cdecl nanf(const char *tagp);
-extern long double __cdecl nanl(const char *tagp);
-
-#ifndef __STRICT_ANSI__
-#define _nan() nan("")
-#define _nanf() nanf("")
-#define _nanl() nanl("")
-#endif
-
-/* 7.12.11.3 */
-extern double __cdecl nextafter (double, double); /* in libmoldname.a */
-extern float __cdecl nextafterf (float, float);
-extern long double __cdecl nextafterl (long double, long double);
-
-/* 7.12.11.4 The nexttoward functions */
-extern double __cdecl nexttoward (double, long double);
-extern float __cdecl nexttowardf (float, long double);
-extern long double __cdecl nexttowardl (long double, long double);
-
-/* 7.12.12.1 */
-/* x > y ? (x - y) : 0.0 */
-extern double __cdecl fdim (double x, double y);
-extern float __cdecl fdimf (float x, float y);
-extern long double __cdecl fdiml (long double x, long double y);
-
-/* fmax and fmin.
- NaN arguments are treated as missing data: if one argument is a NaN
- and the other numeric, then these functions choose the numeric
- value. */
-
-/* 7.12.12.2 */
-extern double __cdecl fmax (double, double);
-extern float __cdecl fmaxf (float, float);
-extern long double __cdecl fmaxl (long double, long double);
-
-/* 7.12.12.3 */
-extern double __cdecl fmin (double, double);
-extern float __cdecl fminf (float, float);
-extern long double __cdecl fminl (long double, long double);
-
-/* 7.12.13.1 */
-/* return x * y + z as a ternary op */
-extern double __cdecl fma (double, double, double);
-extern float __cdecl fmaf (float, float, float);
-extern long double __cdecl fmal (long double, long double, long double);
-
-
-/* 7.12.14 */
-/*
- * With these functions, comparisons involving quiet NaNs set the FP
- * condition code to "unordered". The IEEE floating-point spec
- * dictates that the result of floating-point comparisons should be
- * false whenever a NaN is involved, with the exception of the != op,
- * which always returns true: yes, (NaN != NaN) is true).
- */
-
-#if __GNUC__ >= 3
-
-#define isgreater(x, y) __builtin_isgreater(x, y)
-#define isgreaterequal(x, y) __builtin_isgreaterequal(x, y)
-#define isless(x, y) __builtin_isless(x, y)
-#define islessequal(x, y) __builtin_islessequal(x, y)
-#define islessgreater(x, y) __builtin_islessgreater(x, y)
-#define isunordered(x, y) __builtin_isunordered(x, y)
-
-#else
-/* helper */
-__CRT_INLINE int __cdecl
-__fp_unordered_compare (long double x, long double y){
- unsigned short retval;
- __asm__ ("fucom %%st(1);"
- "fnstsw;": "=a" (retval) : "t" (x), "u" (y));
- return retval;
-}
-
-#define isgreater(x, y) ((__fp_unordered_compare(x, y) \
- & 0x4500) == 0)
-#define isless(x, y) ((__fp_unordered_compare (y, x) \
- & 0x4500) == 0)
-#define isgreaterequal(x, y) ((__fp_unordered_compare (x, y) \
- & FP_INFINITE) == 0)
-#define islessequal(x, y) ((__fp_unordered_compare(y, x) \
- & FP_INFINITE) == 0)
-#define islessgreater(x, y) ((__fp_unordered_compare(x, y) \
- & FP_SUBNORMAL) == 0)
-#define isunordered(x, y) ((__fp_unordered_compare(x, y) \
- & 0x4500) == 0x4500)
-
-#endif
-
-
-#endif /* __STDC_VERSION__ >= 199901L */
-#endif /* __NO_ISOCEXT */
-
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* Not RC_INVOKED */
-
-
-#endif /* Not _MATH_H_ */
diff --git a/winsup/mingw/include/mbctype.h b/winsup/mingw/include/mbctype.h
deleted file mode 100644
index 0121437..0000000
--- a/winsup/mingw/include/mbctype.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * mbctype.h
- *
- * Functions for testing multibyte character types and converting characters.
- *
- * This file is part of the Mingw32 package.
- *
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef _MBCTYPE_H_
-#define _MBCTYPE_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-/* return values for _mbsbtype and _mbbtype in mbstring.h */
-#define _MBC_SINGLE 0
-#define _MBC_LEAD 1
-#define _MBC_TRAIL 2
-#define _MBC_ILLEGAL (-1)
-
-/* args for setmbcp (in lieu of actual codepage) */
-#define _MB_CP_SBCS 0
-#define _MB_CP_OEM (-2)
-#define _MB_CP_ANSI (-3)
-#define _MB_CP_LOCALE (-4)
-
-/* TODO: bit masks */
-/*
-#define _MS
-#define _MP
-#define _M1
-#define _M2
-#define _SBUP
-#define _SBLOW
-*/
-
-#ifndef RC_INVOKED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef __STRICT_ANSI__
-
-_CRTIMP int __cdecl __MINGW_NOTHROW _setmbcp (int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _getmbcp (void);
-
-/* byte classification */
-/* NB: Corresponding _ismbc* functions are in mbstring.h */
-
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbalpha (unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbalnum (unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbgraph (unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbprint (unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbpunct (unsigned int);
-
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbkana (unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbkalnum (unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbkprint (unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbkpunct (unsigned int);
-
-
-/* these are also in mbstring.h */
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbblead (unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbtrail (unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbslead (const unsigned char*, const unsigned char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbstrail (const unsigned char*, const unsigned char*);
-
-#ifdef __DECLSPEC_SUPPORTED
-__MINGW_IMPORT unsigned char _mbctype[];
-__MINGW_IMPORT unsigned char _mbcasemap[];
-#endif
-
-/* TODO : _MBCS_ mappings go in tchar.h */
-
-#endif /* Not strict ANSI */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _MCTYPE_H_ */
-
diff --git a/winsup/mingw/include/mbstring.h b/winsup/mingw/include/mbstring.h
deleted file mode 100644
index 19261fe..0000000
--- a/winsup/mingw/include/mbstring.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * mbstring.h
- *
- * Protototypes for string functions supporting multibyte characters.
- *
- * This file is part of the Mingw32 package.
- *
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef _MBSTRING_H_
-#define _MBSTRING_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#ifndef RC_INVOKED
-
-#define __need_size_t
-#include <stddef.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef __STRICT_ANSI__
-
-/* character classification */
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcalnum (unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcalpha (unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcdigit (unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcgraph (unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcprint (unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcpunct (unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcspace (unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbclower (unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcupper (unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbclegal (unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcsymbol (unsigned int);
-
-
-/* also in mbctype.h */
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbblead (unsigned int );
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbbtrail (unsigned int );
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbslead ( const unsigned char*, const unsigned char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbstrail ( const unsigned char*, const unsigned char*);
-
-_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbctolower (unsigned int);
-_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbctoupper (unsigned int);
-
-_CRTIMP void __cdecl __MINGW_NOTHROW _mbccpy (unsigned char*, const unsigned char*);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW _mbclen (const unsigned char*);
-
-_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbbtombc (unsigned int);
-_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbctombb (unsigned int);
-
-/* Return value constants for these are defined in mbctype.h. */
-_CRTIMP int __cdecl __MINGW_NOTHROW _mbbtype (unsigned char, int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _mbsbtype (const unsigned char*, size_t);
-
-_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbscpy (unsigned char*, const unsigned char*);
-_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsncpy (unsigned char*, const unsigned char*, size_t);
-_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsnbcpy (unsigned char*, const unsigned char*, size_t);
-_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsset (unsigned char*, unsigned int);
-_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsnset (unsigned char*, unsigned int, size_t);
-_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsnbset (unsigned char*, unsigned int, size_t);
-_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsdup (const unsigned char*);
-_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsrev (unsigned char*);
-_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbscat (unsigned char*, const unsigned char*);
-_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsncat (unsigned char*, const unsigned char*, size_t);
-_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsnbcat (unsigned char*, const unsigned char*, size_t);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW _mbslen (const unsigned char*);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW _mbsnbcnt (const unsigned char*, size_t);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW _mbsnccnt (const unsigned char*, size_t);
-_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbschr (const unsigned char*, unsigned int);
-_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsrchr (const unsigned char*, unsigned int);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW _mbsspn (const unsigned char*, const unsigned char*);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW _mbscspn (const unsigned char*, const unsigned char*);
-_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsspnp (const unsigned char*, const unsigned char*);
-_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbspbrk (const unsigned char*, const unsigned char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _mbscmp (const unsigned char*, const unsigned char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _mbsicmp (const unsigned char*, const unsigned char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _mbsncmp (const unsigned char*, const unsigned char*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW _mbsnicmp (const unsigned char*, const unsigned char*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW _mbsnbcmp (const unsigned char*, const unsigned char*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW _mbsnbicmp (const unsigned char*, const unsigned char*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW _mbscoll (const unsigned char*, const unsigned char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _mbsicoll (const unsigned char*, const unsigned char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _mbsncoll (const unsigned char*, const unsigned char*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW _mbsnicoll (const unsigned char*, const unsigned char*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW _mbsnbcoll (const unsigned char*, const unsigned char*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW _mbsnbicoll (const unsigned char*, const unsigned char*, size_t);
-
-_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsinc (const unsigned char*);
-_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsninc (const unsigned char*, size_t);
-_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsdec (const unsigned char*, const unsigned char*);
-_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbsnextc (const unsigned char*);
-_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbslwr (unsigned char*);
-_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbsupr (unsigned char*);
-_CRTIMP unsigned char* __cdecl __MINGW_NOTHROW _mbstok (unsigned char*, const unsigned char*);
-
-/* Kanji */
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbchira (unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbckata (unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcl0 (unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcl1 (unsigned int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _ismbcl2 (unsigned int);
-_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbcjistojms (unsigned int);
-_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbcjmstojis (unsigned int);
-_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbctohira (unsigned int);
-_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _mbctokata (unsigned int);
-
-#endif /* Not strict ANSI */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-#endif /* Not _MBSTRING_H_ */
-
-
diff --git a/winsup/mingw/include/mem.h b/winsup/mingw/include/mem.h
deleted file mode 100644
index 451de0c..0000000
--- a/winsup/mingw/include/mem.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * This file is part of the Mingw32 package.
- *
- * mem.h maps to string.h
- */
-#include <string.h>
diff --git a/winsup/mingw/include/memory.h b/winsup/mingw/include/memory.h
deleted file mode 100644
index 9ba65cf..0000000
--- a/winsup/mingw/include/memory.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * This file is part of the Mingw32 package.
- *
- * memory.h maps to the standard string.h header.
- */
-
-#include <string.h>
diff --git a/winsup/mingw/include/process.h b/winsup/mingw/include/process.h
deleted file mode 100644
index c0c380f..0000000
--- a/winsup/mingw/include/process.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * process.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Function calls for spawning child processes.
- *
- */
-
-#ifndef _PROCESS_H_
-#define _PROCESS_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#include <sys/types.h> /* For _pid_t and pid_t. */
-#include <stdint.h> /* For intptr_t. */
-/*
- * Constants for cwait actions.
- * Obsolete for Win32.
- */
-#define _WAIT_CHILD 0
-#define _WAIT_GRANDCHILD 1
-
-#ifndef _NO_OLDNAMES
-#define WAIT_CHILD _WAIT_CHILD
-#define WAIT_GRANDCHILD _WAIT_GRANDCHILD
-#endif /* Not _NO_OLDNAMES */
-
-/*
- * Mode constants for spawn functions.
- */
-#define _P_WAIT 0
-#define _P_NOWAIT 1
-#define _P_OVERLAY 2
-#define _OLD_P_OVERLAY _P_OVERLAY
-#define _P_NOWAITO 3
-#define _P_DETACH 4
-
-#ifndef _NO_OLDNAMES
-#define P_WAIT _P_WAIT
-#define P_NOWAIT _P_NOWAIT
-#define P_OVERLAY _P_OVERLAY
-#define OLD_P_OVERLAY _OLD_P_OVERLAY
-#define P_NOWAITO _P_NOWAITO
-#define P_DETACH _P_DETACH
-#endif /* Not _NO_OLDNAMES */
-
-
-#ifndef RC_INVOKED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_CRTIMP void __cdecl __MINGW_NOTHROW _cexit(void);
-_CRTIMP void __cdecl __MINGW_NOTHROW _c_exit(void);
-
-_CRTIMP int __cdecl __MINGW_NOTHROW _cwait (int*, _pid_t, int);
-
-_CRTIMP _pid_t __cdecl __MINGW_NOTHROW _getpid(void);
-
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _execl (const char*, const char*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _execle (const char*, const char*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _execlp (const char*, const char*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _execlpe (const char*, const char*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _execv (const char*, const char* const*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _execve (const char*, const char* const*, const char* const*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _execvp (const char*, const char* const*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _execvpe (const char*, const char* const*, const char* const*);
-
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnl (int, const char*, const char*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnle (int, const char*, const char*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnlp (int, const char*, const char*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnlpe (int, const char*, const char*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnv (int, const char*, const char* const*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnve (int, const char*, const char* const*, const char* const*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnvp (int, const char*, const char* const*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnvpe (int, const char*, const char* const*, const char* const*);
-
-
-/*
- * The functions _beginthreadex and _endthreadex are not provided by CRTDLL.
- * They are provided by MSVCRT.
- *
- * NOTE: Apparently _endthread calls CloseHandle on the handle of the thread,
- * making for race conditions if you are not careful. Basically you have to
- * make sure that no-one is going to do *anything* with the thread handle
- * after the thread calls _endthread or returns from the thread function.
- *
- * NOTE: No old names for these functions. Use the underscore.
- */
-_CRTIMP unsigned long __cdecl __MINGW_NOTHROW
- _beginthread (void (*)(void *), unsigned, void*);
-_CRTIMP void __cdecl __MINGW_NOTHROW _endthread (void);
-
-#ifdef __MSVCRT__
-_CRTIMP unsigned long __cdecl __MINGW_NOTHROW
- _beginthreadex (void *, unsigned, unsigned (__stdcall *) (void *),
- void*, unsigned, unsigned*);
-_CRTIMP void __cdecl __MINGW_NOTHROW _endthreadex (unsigned);
-#endif
-
-
-#ifndef _NO_OLDNAMES
-/*
- * Functions without the leading underscore, for portability. These functions
- * live in liboldnames.a.
- */
-_CRTIMP int __cdecl __MINGW_NOTHROW cwait (int*, pid_t, int);
-_CRTIMP pid_t __cdecl __MINGW_NOTHROW getpid (void);
-
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW execl (const char*, const char*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW execle (const char*, const char*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW execlp (const char*, const char*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW execlpe (const char*, const char*,...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW execv (const char*, const char* const*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW execve (const char*, const char* const*, const char* const*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW execvp (const char*, const char* const*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW execvpe (const char*, const char* const*, const char* const*);
-
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW spawnl (int, const char*, const char*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW spawnle (int, const char*, const char*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW spawnlp (int, const char*, const char*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW spawnlpe (int, const char*, const char*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW spawnv (int, const char*, const char* const*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW spawnve (int, const char*, const char* const*, const char* const*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW spawnvp (int, const char*, const char* const*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW spawnvpe (int, const char*, const char* const*, const char* const*);
-#endif /* Not _NO_OLDNAMES */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* _PROCESS_H_ not defined */
diff --git a/winsup/mingw/include/search.h b/winsup/mingw/include/search.h
deleted file mode 100644
index af71a32..0000000
--- a/winsup/mingw/include/search.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * search.h
- *
- * Functions for searching and sorting.
- *
- * This file is part of the Mingw32 package.
- *
- * Contributors:
- * Created by Danny Smith <dannysmith@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef _SEARCH_H_
-#define _SEARCH_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#ifndef RC_INVOKED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _SIZE_T_DEFINED
-typedef unsigned int size_t;
-#define _SIZE_T_DEFINED
-#endif
-
-/* bsearch and qsort are also declared in stdlib.h */
-_CRTIMP void* __cdecl bsearch (const void*, const void*, size_t, size_t,
- int (*)(const void*, const void*));
-_CRTIMP void __cdecl qsort (void*, size_t, size_t,
- int (*)(const void*, const void*));
-
-_CRTIMP void* __cdecl _lfind (const void*, const void*, unsigned int*,
- unsigned int, int (*)(const void*, const void*));
-_CRTIMP void* __cdecl _lsearch (const void*, void*, unsigned int*, unsigned int,
- int (*)(const void*, const void*));
-/*
-Documentation for these POSIX definitions and prototypes can be found in
-The Open Group Base Specifications Issue 6
-IEEE Std 1003.1, 2004 Edition.
-eg: http://www.opengroup.org/onlinepubs/009695399/functions/twalk.html
-*/
-
-
-typedef struct entry {
- char *key;
- void *data;
-} ENTRY;
-
-typedef enum {
- FIND,
- ENTER
-} ACTION;
-
-typedef enum {
- preorder,
- postorder,
- endorder,
- leaf
-} VISIT;
-
-#ifdef _SEARCH_PRIVATE
-typedef struct node {
- char *key;
- struct node *llink, *rlink;
-} node_t;
-#endif
-
-void * __cdecl tdelete (const void * __restrict__, void ** __restrict__,
- int (*)(const void *, const void *))
- __MINGW_ATTRIB_NONNULL (1) __MINGW_ATTRIB_NONNULL (3);
-void * __cdecl tfind (const void *, void * const *,
- int (*)(const void *, const void *))
- __MINGW_ATTRIB_NONNULL (1) __MINGW_ATTRIB_NONNULL (3);
-void * __cdecl tsearch (const void *, void **,
- int (*)(const void *, const void *))
- __MINGW_ATTRIB_NONNULL (1) __MINGW_ATTRIB_NONNULL (3);
-void __cdecl twalk (const void *, void (*)(const void *, VISIT, int));
-
-#ifndef _NO_OLDNAMES
-_CRTIMP void* __cdecl lfind (const void*, const void*, unsigned int*,
- unsigned int, int (*)(const void*, const void*));
-_CRTIMP void* __cdecl lsearch (const void*, void*, unsigned int*, unsigned int,
- int (*)(const void*, const void*));
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* RC_INVOKED */
-
-#endif /* _SEARCH_H_ */
diff --git a/winsup/mingw/include/setjmp.h b/winsup/mingw/include/setjmp.h
deleted file mode 100644
index 96eb5bd..0000000
--- a/winsup/mingw/include/setjmp.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * setjmp.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Declarations supporting setjmp and longjump, a method for avoiding
- * the normal function call return sequence. (Bleah!)
- *
- */
-
-#ifndef _SETJMP_H_
-#define _SETJMP_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#ifndef RC_INVOKED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * The buffer used by setjmp to store the information used by longjmp
- * to perform it's evil goto-like work. The size of this buffer was
- * determined through experimentation; it's contents are a mystery.
- * NOTE: This was determined on an i386 (actually a Pentium). The
- * contents could be different on an Alpha or something else.
- */
-#define _JBLEN 16
-#define _JBTYPE int
-typedef _JBTYPE jmp_buf[_JBLEN];
-
-/*
- * The function provided by CRTDLL which appears to do the actual work
- * of setjmp.
- */
-_CRTIMP int __cdecl __MINGW_NOTHROW _setjmp (jmp_buf);
-
-#define setjmp(x) _setjmp(x)
-
-/*
- * Return to the last setjmp call and act as if setjmp had returned
- * nVal (which had better be non-zero!).
- */
-_CRTIMP void __cdecl __MINGW_NOTHROW longjmp (jmp_buf, int) __MINGW_ATTRIB_NORETURN;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _SETJMP_H_ */
-
diff --git a/winsup/mingw/include/share.h b/winsup/mingw/include/share.h
deleted file mode 100644
index 09a54ad..0000000
--- a/winsup/mingw/include/share.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * share.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Constants for file sharing functions.
- *
- */
-
-#ifndef _SHARE_H_
-#define _SHARE_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#define _SH_COMPAT 0x00 /* Compatibility */
-#define _SH_DENYRW 0x10 /* Deny read/write */
-#define _SH_DENYWR 0x20 /* Deny write */
-#define _SH_DENYRD 0x30 /* Deny read */
-#define _SH_DENYNO 0x40 /* Deny nothing */
-
-#ifndef _NO_OLDNAMES
-
-/* Non ANSI names */
-#define SH_DENYRW _SH_DENYRW
-#define SH_DENYWR _SH_DENYWR
-#define SH_DENYRD _SH_DENYRD
-#define SH_DENYNO _SH_DENYNO
-
-#endif /* Not _NO_OLDNAMES */
-
-#endif /* Not _SHARE_H_ */
diff --git a/winsup/mingw/include/signal.h b/winsup/mingw/include/signal.h
deleted file mode 100644
index 6fe336d..0000000
--- a/winsup/mingw/include/signal.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * signal.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * A way to set handlers for exceptional conditions (also known as signals).
- *
- */
-
-#ifndef _SIGNAL_H_
-#define _SIGNAL_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-/*
- * The actual signal values. Using other values with signal
- * produces a SIG_ERR return value.
- *
- * NOTE: SIGINT is produced when the user presses Ctrl-C.
- * SIGILL has not been tested.
- * SIGFPE doesn't seem to work?
- * SIGSEGV does not catch writing to a NULL pointer (that shuts down
- * your app; can you say "segmentation violation core dump"?).
- * SIGTERM comes from what kind of termination request exactly?
- * SIGBREAK is indeed produced by pressing Ctrl-Break.
- * SIGABRT is produced by calling abort.
- * TODO: The above results may be related to not installing an appropriate
- * structured exception handling frame. Results may be better if I ever
- * manage to get the SEH stuff down.
- */
-#define SIGINT 2 /* Interactive attention */
-#define SIGILL 4 /* Illegal instruction */
-#define SIGFPE 8 /* Floating point error */
-#define SIGSEGV 11 /* Segmentation violation */
-#define SIGTERM 15 /* Termination request */
-#define SIGBREAK 21 /* Control-break */
-#define SIGABRT 22 /* Abnormal termination (abort) */
-
-#define NSIG 23 /* maximum signal number + 1 */
-
-#ifndef RC_INVOKED
-
-#ifndef _SIG_ATOMIC_T_DEFINED
-typedef int sig_atomic_t;
-#define _SIG_ATOMIC_T_DEFINED
-#endif
-
-/*
- * The prototypes (below) are the easy part. The hard part is figuring
- * out what signals are available and what numbers they are assigned
- * along with appropriate values of SIG_DFL and SIG_IGN.
- */
-
-/*
- * A pointer to a signal handler function. A signal handler takes a
- * single int, which is the signal it handles.
- */
-typedef void (*__p_sig_fn_t)(int);
-
-/*
- * These are special values of signal handler pointers which are
- * used to send a signal to the default handler (SIG_DFL), ignore
- * the signal (SIG_IGN), indicate an error return (SIG_ERR),
- * get an error (SIG_SGE), or acknowledge (SIG_ACK).
- */
-#define SIG_DFL ((__p_sig_fn_t) 0)
-#define SIG_IGN ((__p_sig_fn_t) 1)
-#define SIG_ERR ((__p_sig_fn_t) -1)
-#define SIG_SGE ((__p_sig_fn_t) 3)
-#define SIG_ACK ((__p_sig_fn_t) 4)
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Call signal to set the signal handler for signal sig to the
- * function pointed to by handler. Returns a pointer to the
- * previous handler, or SIG_ERR if an error occurs. Initially
- * unhandled signals defined above will return SIG_DFL.
- */
-_CRTIMP __p_sig_fn_t __cdecl __MINGW_NOTHROW signal(int, __p_sig_fn_t);
-
-/*
- * Raise the signal indicated by sig. Returns non-zero on success.
- */
-_CRTIMP int __cdecl __MINGW_NOTHROW raise (int);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _SIGNAL_H_ */
-
diff --git a/winsup/mingw/include/stdint.h b/winsup/mingw/include/stdint.h
deleted file mode 100644
index 57db989..0000000
--- a/winsup/mingw/include/stdint.h
+++ /dev/null
@@ -1,206 +0,0 @@
-/* ISO C9x 7.18 Integer types <stdint.h>
- * Based on ISO/IEC SC22/WG14 9899 Committee draft (SC22 N2794)
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * Contributor: Danny Smith <danny_r_smith_2001@yahoo.co.nz>
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Date: 2000-12-02
- */
-
-
-#ifndef _STDINT_H
-#define _STDINT_H
-#define __need_wint_t
-#define __need_wchar_t
-#include <stddef.h>
-
-/* 7.18.1.1 Exact-width integer types */
-typedef signed char int8_t;
-typedef unsigned char uint8_t;
-typedef short int16_t;
-typedef unsigned short uint16_t;
-typedef int int32_t;
-typedef unsigned uint32_t;
-typedef long long int64_t;
-typedef unsigned long long uint64_t;
-
-/* 7.18.1.2 Minimum-width integer types */
-typedef signed char int_least8_t;
-typedef unsigned char uint_least8_t;
-typedef short int_least16_t;
-typedef unsigned short uint_least16_t;
-typedef int int_least32_t;
-typedef unsigned uint_least32_t;
-typedef long long int_least64_t;
-typedef unsigned long long uint_least64_t;
-
-/* 7.18.1.3 Fastest minimum-width integer types
- * Not actually guaranteed to be fastest for all purposes
- * Here we use the exact-width types for 8 and 16-bit ints.
- */
-typedef char int_fast8_t;
-typedef unsigned char uint_fast8_t;
-typedef short int_fast16_t;
-typedef unsigned short uint_fast16_t;
-typedef int int_fast32_t;
-typedef unsigned int uint_fast32_t;
-typedef long long int_fast64_t;
-typedef unsigned long long uint_fast64_t;
-
-/* 7.18.1.4 Integer types capable of holding object pointers */
-
-#ifndef _INTPTR_T_DEFINED
-#define _INTPTR_T_DEFINED
-#ifdef _WIN64
- typedef __int64 intptr_t;
-#else
- typedef int intptr_t;
-#endif
-#endif
-
-#ifndef _UINTPTR_T_DEFINED
-#define _UINTPTR_T_DEFINED
-#ifdef _WIN64
- typedef unsigned __int64 uintptr_t;
-#else
- typedef unsigned int uintptr_t;
-#endif
-#endif
-
-/* 7.18.1.5 Greatest-width integer types */
-typedef long long intmax_t;
-typedef unsigned long long uintmax_t;
-
-/* 7.18.2 Limits of specified-width integer types */
-#if !defined ( __cplusplus) || defined (__STDC_LIMIT_MACROS)
-
-/* 7.18.2.1 Limits of exact-width integer types */
-#define INT8_MIN (-128)
-#define INT16_MIN (-32768)
-#define INT32_MIN (-2147483647 - 1)
-#define INT64_MIN (-9223372036854775807LL - 1)
-
-#define INT8_MAX 127
-#define INT16_MAX 32767
-#define INT32_MAX 2147483647
-#define INT64_MAX 9223372036854775807LL
-
-#define UINT8_MAX 0xff /* 255U */
-#define UINT16_MAX 0xffff /* 65535U */
-#define UINT32_MAX 0xffffffff /* 4294967295U */
-#define UINT64_MAX 0xffffffffffffffffULL /* 18446744073709551615ULL */
-
-/* 7.18.2.2 Limits of minimum-width integer types */
-#define INT_LEAST8_MIN INT8_MIN
-#define INT_LEAST16_MIN INT16_MIN
-#define INT_LEAST32_MIN INT32_MIN
-#define INT_LEAST64_MIN INT64_MIN
-
-#define INT_LEAST8_MAX INT8_MAX
-#define INT_LEAST16_MAX INT16_MAX
-#define INT_LEAST32_MAX INT32_MAX
-#define INT_LEAST64_MAX INT64_MAX
-
-#define UINT_LEAST8_MAX UINT8_MAX
-#define UINT_LEAST16_MAX UINT16_MAX
-#define UINT_LEAST32_MAX UINT32_MAX
-#define UINT_LEAST64_MAX UINT64_MAX
-
-/* 7.18.2.3 Limits of fastest minimum-width integer types */
-#define INT_FAST8_MIN INT8_MIN
-#define INT_FAST16_MIN INT16_MIN
-#define INT_FAST32_MIN INT32_MIN
-#define INT_FAST64_MIN INT64_MIN
-
-#define INT_FAST8_MAX INT8_MAX
-#define INT_FAST16_MAX INT16_MAX
-#define INT_FAST32_MAX INT32_MAX
-#define INT_FAST64_MAX INT64_MAX
-
-#define UINT_FAST8_MAX UINT8_MAX
-#define UINT_FAST16_MAX UINT16_MAX
-#define UINT_FAST32_MAX UINT32_MAX
-#define UINT_FAST64_MAX UINT64_MAX
-
-/* 7.18.2.4 Limits of integer types capable of holding
- object pointers */
-#ifdef _WIN64
-#define INTPTR_MIN INT64_MIN
-#define INTPTR_MAX INT64_MAX
-#define UINTPTR_MAX UINT64_MAX
-#else
-#define INTPTR_MIN INT32_MIN
-#define INTPTR_MAX INT32_MAX
-#define UINTPTR_MAX UINT32_MAX
-#endif
-
-/* 7.18.2.5 Limits of greatest-width integer types */
-#define INTMAX_MIN INT64_MIN
-#define INTMAX_MAX INT64_MAX
-#define UINTMAX_MAX UINT64_MAX
-
-/* 7.18.3 Limits of other integer types */
-#define PTRDIFF_MIN INTPTR_MIN
-#define PTRDIFF_MAX INTPTR_MAX
-
-#define SIG_ATOMIC_MIN INTPTR_MIN
-#define SIG_ATOMIC_MAX INTPTR_MAX
-
-#define SIZE_MAX UINTPTR_MAX
-
-#ifndef WCHAR_MIN /* also in wchar.h */
-#define WCHAR_MIN 0
-#define WCHAR_MAX 0xffff /* UINT16_MAX */
-#endif
-
-/*
- * wint_t is unsigned short for compatibility with MS runtime
- */
-#define WINT_MIN 0
-#define WINT_MAX 0xffff /* UINT16_MAX */
-
-#endif /* !defined ( __cplusplus) || defined __STDC_LIMIT_MACROS */
-
-
-/* 7.18.4 Macros for integer constants */
-#if !defined ( __cplusplus) || defined (__STDC_CONSTANT_MACROS)
-
-/* 7.18.4.1 Macros for minimum-width integer constants
-
- Accoding to Douglas Gwyn <gwyn@arl.mil>:
- "This spec was changed in ISO/IEC 9899:1999 TC1; in ISO/IEC
- 9899:1999 as initially published, the expansion was required
- to be an integer constant of precisely matching type, which
- is impossible to accomplish for the shorter types on most
- platforms, because C99 provides no standard way to designate
- an integer constant with width less than that of type int.
- TC1 changed this to require just an integer constant
- *expression* with *promoted* type."
-*/
-
-#define INT8_C(val) ((int8_t) + (val))
-#define UINT8_C(val) ((uint8_t) + (val##U))
-#define INT16_C(val) ((int16_t) + (val))
-#define UINT16_C(val) ((uint16_t) + (val##U))
-
-#define INT32_C(val) val##L
-#define UINT32_C(val) val##UL
-#define INT64_C(val) val##LL
-#define UINT64_C(val) val##ULL
-
-/* 7.18.4.2 Macros for greatest-width integer constants */
-#define INTMAX_C(val) INT64_C(val)
-#define UINTMAX_C(val) UINT64_C(val)
-
-#endif /* !defined ( __cplusplus) || defined __STDC_CONSTANT_MACROS */
-
-#endif
diff --git a/winsup/mingw/include/stdio.h b/winsup/mingw/include/stdio.h
deleted file mode 100644
index 1765bed..0000000
--- a/winsup/mingw/include/stdio.h
+++ /dev/null
@@ -1,647 +0,0 @@
-/*
- * stdio.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Definitions of types and prototypes of functions for standard input and
- * output.
- *
- * NOTE: The file manipulation functions provided by Microsoft seem to
- * work with either slash (/) or backslash (\) as the directory separator.
- *
- */
-
-#ifndef _STDIO_H_
-#define _STDIO_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#ifndef RC_INVOKED
-#define __need_size_t
-#define __need_NULL
-#define __need_wchar_t
-#define __need_wint_t
-#include <stddef.h>
-#define __need___va_list
-#include <stdarg.h>
-#endif /* Not RC_INVOKED */
-
-
-/* Flags for the iobuf structure */
-#define _IOREAD 1 /* currently reading */
-#define _IOWRT 2 /* currently writing */
-#define _IORW 0x0080 /* opened as "r+w" */
-
-
-/*
- * The three standard file pointers provided by the run time library.
- * NOTE: These will go to the bit-bucket silently in GUI applications!
- */
-#define STDIN_FILENO 0
-#define STDOUT_FILENO 1
-#define STDERR_FILENO 2
-
-/* Returned by various functions on end of file condition or error. */
-#define EOF (-1)
-
-/*
- * The maximum length of a file name. You should use GetVolumeInformation
- * instead of this constant. But hey, this works.
- * Also defined in io.h.
- */
-#ifndef FILENAME_MAX
-#define FILENAME_MAX (260)
-#endif
-
-/*
- * The maximum number of files that may be open at once. I have set this to
- * a conservative number. The actual value may be higher.
- */
-#define FOPEN_MAX (20)
-
-/* After creating this many names, tmpnam and tmpfile return NULL */
-#define TMP_MAX 32767
-/*
- * Tmpnam, tmpfile and, sometimes, _tempnam try to create
- * temp files in the root directory of the current drive
- * (not in pwd, as suggested by some older MS doc's).
- * Redefining these macros does not effect the CRT functions.
- */
-#define _P_tmpdir "\\"
-#ifndef __STRICT_ANSI__
-#define P_tmpdir _P_tmpdir
-#endif
-#define _wP_tmpdir L"\\"
-
-/*
- * The maximum size of name (including NUL) that will be put in the user
- * supplied buffer caName for tmpnam.
- * Inferred from the size of the static buffer returned by tmpnam
- * when passed a NULL argument. May actually be smaller.
- */
-#define L_tmpnam (16)
-
-#define _IOFBF 0x0000 /* full buffered */
-#define _IOLBF 0x0040 /* line buffered */
-#define _IONBF 0x0004 /* not buffered */
-
-#define _IOMYBUF 0x0008 /* stdio malloc()'d buffer */
-#define _IOEOF 0x0010 /* EOF reached on read */
-#define _IOERR 0x0020 /* I/O error from system */
-#define _IOSTRG 0x0040 /* Strange or no file descriptor */
-#ifdef _POSIX_SOURCE
-# define _IOAPPEND 0x0200
-#endif
-/*
- * The buffer size as used by setbuf such that it is equivalent to
- * (void) setvbuf(fileSetBuffer, caBuffer, _IOFBF, BUFSIZ).
- */
-#define BUFSIZ 512
-
-/* Constants for nOrigin indicating the position relative to which fseek
- * sets the file position. Defined unconditionally since ISO and POSIX
- * say they are defined here. */
-#define SEEK_SET 0
-#define SEEK_CUR 1
-#define SEEK_END 2
-
-#ifndef RC_INVOKED
-
-#ifndef __VALIST
-#ifdef __GNUC__
-#define __VALIST __gnuc_va_list
-#else
-#define __VALIST char*
-#endif
-#endif /* defined __VALIST */
-
-/*
- * The structure underlying the FILE type.
- *
- * Some believe that nobody in their right mind should make use of the
- * internals of this structure. Provided by Pedro A. Aranda Gutiirrez
- * <paag@tid.es>.
- */
-#ifndef _FILE_DEFINED
-#define _FILE_DEFINED
-typedef struct _iobuf
-{
- char* _ptr;
- int _cnt;
- char* _base;
- int _flag;
- int _file;
- int _charbuf;
- int _bufsiz;
- char* _tmpfname;
-} FILE;
-#endif /* Not _FILE_DEFINED */
-
-
-/*
- * The standard file handles
- */
-#ifndef __DECLSPEC_SUPPORTED
-
-extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */
-
-#define _iob (*_imp___iob) /* An array of FILE */
-
-#else /* __DECLSPEC_SUPPORTED */
-
-__MINGW_IMPORT FILE _iob[]; /* An array of FILE imported from DLL. */
-
-#endif /* __DECLSPEC_SUPPORTED */
-
-#define stdin (&_iob[STDIN_FILENO])
-#define stdout (&_iob[STDOUT_FILENO])
-#define stderr (&_iob[STDERR_FILENO])
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * File Operations
- */
-_CRTIMP FILE* __cdecl __MINGW_NOTHROW fopen (const char*, const char*);
-_CRTIMP FILE* __cdecl __MINGW_NOTHROW freopen (const char*, const char*, FILE*);
-_CRTIMP int __cdecl __MINGW_NOTHROW fflush (FILE*);
-_CRTIMP int __cdecl __MINGW_NOTHROW fclose (FILE*);
-/* MS puts remove & rename (but not wide versions) in io.h also */
-_CRTIMP int __cdecl __MINGW_NOTHROW remove (const char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW rename (const char*, const char*);
-_CRTIMP FILE* __cdecl __MINGW_NOTHROW tmpfile (void);
-_CRTIMP char* __cdecl __MINGW_NOTHROW tmpnam (char*);
-
-#ifndef __STRICT_ANSI__
-_CRTIMP char* __cdecl __MINGW_NOTHROW _tempnam (const char*, const char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _rmtmp(void);
-_CRTIMP int __cdecl __MINGW_NOTHROW _unlink (const char*);
-
-#ifndef NO_OLDNAMES
-_CRTIMP char* __cdecl __MINGW_NOTHROW tempnam (const char*, const char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW rmtmp(void);
-_CRTIMP int __cdecl __MINGW_NOTHROW unlink (const char*);
-#endif
-#endif /* __STRICT_ANSI__ */
-
-_CRTIMP int __cdecl __MINGW_NOTHROW setvbuf (FILE*, char*, int, size_t);
-
-_CRTIMP void __cdecl __MINGW_NOTHROW setbuf (FILE*, char*);
-
-/*
- * Formatted Output
- *
- * MSVCRT implementations are not ANSI C99 conformant...
- * we offer these conforming alternatives from libmingwex.a
- */
-#undef __mingw_stdio_redirect__
-#define __mingw_stdio_redirect__(F) __cdecl __MINGW_NOTHROW __mingw_##F
-
-extern int __mingw_stdio_redirect__(fprintf)(FILE*, const char*, ...);
-extern int __mingw_stdio_redirect__(printf)(const char*, ...);
-extern int __mingw_stdio_redirect__(sprintf)(char*, const char*, ...);
-extern int __mingw_stdio_redirect__(snprintf)(char*, size_t, const char*, ...);
-extern int __mingw_stdio_redirect__(vfprintf)(FILE*, const char*, __VALIST);
-extern int __mingw_stdio_redirect__(vprintf)(const char*, __VALIST);
-extern int __mingw_stdio_redirect__(vsprintf)(char*, const char*, __VALIST);
-extern int __mingw_stdio_redirect__(vsnprintf)(char*, size_t, const char*, __VALIST);
-
-#if __USE_MINGW_ANSI_STDIO
-/*
- * User has expressed a preference for C99 conformance...
- */
-# undef __mingw_stdio_redirect__
-# ifdef __cplusplus
-/*
- * For C++ we use inline implementations, to avoid interference
- * with namespace qualification, which may result from using #defines.
- */
-# define __mingw_stdio_redirect__ static inline __cdecl __MINGW_NOTHROW
-
-# elif defined __GNUC__
-/*
- * FIXME: Is there any GCC version prerequisite here?
- *
- * We also prefer inline implementations for C, when we can be confident
- * that the GNU specific __inline__ mechanism is supported.
- */
-# define __mingw_stdio_redirect__ static __inline__ __cdecl __MINGW_NOTHROW
-
-# else
-/*
- * Can't use inlines; fall back on module local static stubs.
- */
-# define __mingw_stdio_redirect__ static __cdecl __MINGW_NOTHROW
-# endif
-
-__mingw_stdio_redirect__
-int fprintf (FILE *__stream, const char *__format, ...)
-{
- register int __retval;
- __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
- __retval = __mingw_vfprintf( __stream, __format, __local_argv );
- __builtin_va_end( __local_argv );
- return __retval;
-}
-
-__mingw_stdio_redirect__
-int printf (const char *__format, ...)
-{
- register int __retval;
- __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
- __retval = __mingw_vprintf( __format, __local_argv );
- __builtin_va_end( __local_argv );
- return __retval;
-}
-
-__mingw_stdio_redirect__
-int sprintf (char *__stream, const char *__format, ...)
-{
- register int __retval;
- __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
- __retval = __mingw_vsprintf( __stream, __format, __local_argv );
- __builtin_va_end( __local_argv );
- return __retval;
-}
-
-__mingw_stdio_redirect__
-int vfprintf (FILE *__stream, const char *__format, __VALIST __local_argv)
-{
- return __mingw_vfprintf( __stream, __format, __local_argv );
-}
-
-__mingw_stdio_redirect__
-int vprintf (const char *__format, __VALIST __local_argv)
-{
- return __mingw_vprintf( __format, __local_argv );
-}
-
-__mingw_stdio_redirect__
-int vsprintf (char *__stream, const char *__format, __VALIST __local_argv)
-{
- return __mingw_vsprintf( __stream, __format, __local_argv );
-}
-
-#else
-/*
- * Default configuration: simply direct all calls to MSVCRT...
- */
-_CRTIMP int __cdecl __MINGW_NOTHROW fprintf (FILE*, const char*, ...);
-_CRTIMP int __cdecl __MINGW_NOTHROW printf (const char*, ...);
-_CRTIMP int __cdecl __MINGW_NOTHROW sprintf (char*, const char*, ...);
-_CRTIMP int __cdecl __MINGW_NOTHROW vfprintf (FILE*, const char*, __VALIST);
-_CRTIMP int __cdecl __MINGW_NOTHROW vprintf (const char*, __VALIST);
-_CRTIMP int __cdecl __MINGW_NOTHROW vsprintf (char*, const char*, __VALIST);
-
-#endif
-/*
- * Regardless of user preference, always offer these alternative
- * entry points, for direct access to the MSVCRT implementations.
- */
-#undef __mingw_stdio_redirect__
-#define __mingw_stdio_redirect__(F) __cdecl __MINGW_NOTHROW __msvcrt_##F
-
-_CRTIMP int __mingw_stdio_redirect__(fprintf)(FILE*, const char*, ...);
-_CRTIMP int __mingw_stdio_redirect__(printf)(const char*, ...);
-_CRTIMP int __mingw_stdio_redirect__(sprintf)(char*, const char*, ...);
-_CRTIMP int __mingw_stdio_redirect__(vfprintf)(FILE*, const char*, __VALIST);
-_CRTIMP int __mingw_stdio_redirect__(vprintf)(const char*, __VALIST);
-_CRTIMP int __mingw_stdio_redirect__(vsprintf)(char*, const char*, __VALIST);
-
-#undef __mingw_stdio_redirect__
-
-/* The following pair ALWAYS refer to the MSVCRT implementations...
- */
-_CRTIMP int __cdecl __MINGW_NOTHROW _snprintf (char*, size_t, const char*, ...);
-_CRTIMP int __cdecl __MINGW_NOTHROW _vsnprintf (char*, size_t, const char*, __VALIST);
-
-#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
-/*
- * Microsoft does not provide implementations for the following,
- * which are required by C99. Note in particular that the corresponding
- * Microsoft implementations of _snprintf() and _vsnprintf() are *not*
- * compatible with C99, but the following are; if you want the MSVCRT
- * behaviour, you *must* use the Microsoft uglified names.
- */
-int __cdecl __MINGW_NOTHROW snprintf (char *, size_t, const char *, ...);
-int __cdecl __MINGW_NOTHROW vsnprintf (char *, size_t, const char *, __VALIST);
-
-int __cdecl __MINGW_NOTHROW vscanf (const char * __restrict__, __VALIST);
-int __cdecl __MINGW_NOTHROW vfscanf (FILE * __restrict__, const char * __restrict__,
- __VALIST);
-int __cdecl __MINGW_NOTHROW vsscanf (const char * __restrict__,
- const char * __restrict__, __VALIST);
-
-#endif /* !__NO_ISOCEXT */
-
-/*
- * Formatted Input
- */
-
-_CRTIMP int __cdecl __MINGW_NOTHROW fscanf (FILE*, const char*, ...);
-_CRTIMP int __cdecl __MINGW_NOTHROW scanf (const char*, ...);
-_CRTIMP int __cdecl __MINGW_NOTHROW sscanf (const char*, const char*, ...);
-/*
- * Character Input and Output Functions
- */
-
-_CRTIMP int __cdecl __MINGW_NOTHROW fgetc (FILE*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW fgets (char*, int, FILE*);
-_CRTIMP int __cdecl __MINGW_NOTHROW fputc (int, FILE*);
-_CRTIMP int __cdecl __MINGW_NOTHROW fputs (const char*, FILE*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW gets (char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW puts (const char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW ungetc (int, FILE*);
-
-/* Traditionally, getc and putc are defined as macros. but the
- standard doesn't say that they must be macros.
- We use inline functions here to allow the fast versions
- to be used in C++ with namespace qualification, eg., ::getc.
-
- _filbuf and _flsbuf are not thread-safe. */
-_CRTIMP int __cdecl __MINGW_NOTHROW _filbuf (FILE*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _flsbuf (int, FILE*);
-
-#if !defined _MT
-
-__CRT_INLINE int __cdecl __MINGW_NOTHROW getc (FILE* __F)
-{
- return (--__F->_cnt >= 0)
- ? (int) (unsigned char) *__F->_ptr++
- : _filbuf (__F);
-}
-
-__CRT_INLINE int __cdecl __MINGW_NOTHROW putc (int __c, FILE* __F)
-{
- return (--__F->_cnt >= 0)
- ? (int) (unsigned char) (*__F->_ptr++ = (char)__c)
- : _flsbuf (__c, __F);
-}
-
-__CRT_INLINE int __cdecl __MINGW_NOTHROW getchar (void)
-{
- return (--stdin->_cnt >= 0)
- ? (int) (unsigned char) *stdin->_ptr++
- : _filbuf (stdin);
-}
-
-__CRT_INLINE int __cdecl __MINGW_NOTHROW putchar(int __c)
-{
- return (--stdout->_cnt >= 0)
- ? (int) (unsigned char) (*stdout->_ptr++ = (char)__c)
- : _flsbuf (__c, stdout);}
-
-#else /* Use library functions. */
-
-_CRTIMP int __cdecl __MINGW_NOTHROW getc (FILE*);
-_CRTIMP int __cdecl __MINGW_NOTHROW putc (int, FILE*);
-_CRTIMP int __cdecl __MINGW_NOTHROW getchar (void);
-_CRTIMP int __cdecl __MINGW_NOTHROW putchar (int);
-
-#endif
-
-/*
- * Direct Input and Output Functions
- */
-
-_CRTIMP size_t __cdecl __MINGW_NOTHROW fread (void*, size_t, size_t, FILE*);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW fwrite (const void*, size_t, size_t, FILE*);
-
-/*
- * File Positioning Functions
- */
-
-_CRTIMP int __cdecl __MINGW_NOTHROW fseek (FILE*, long, int);
-_CRTIMP long __cdecl __MINGW_NOTHROW ftell (FILE*);
-_CRTIMP void __cdecl __MINGW_NOTHROW rewind (FILE*);
-
-#if __MSVCRT_VERSION__ >= 0x800
-_CRTIMP int __cdecl __MINGW_NOTHROW _fseek_nolock (FILE*, long, int);
-_CRTIMP long __cdecl __MINGW_NOTHROW _ftell_nolock (FILE*);
-
-_CRTIMP int __cdecl __MINGW_NOTHROW _fseeki64 (FILE*, __int64, int);
-_CRTIMP __int64 __cdecl __MINGW_NOTHROW _ftelli64 (FILE*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _fseeki64_nolock (FILE*, __int64, int);
-_CRTIMP __int64 __cdecl __MINGW_NOTHROW _ftelli64_nolock (FILE*);
-#endif
-
-#ifdef __USE_MINGW_FSEEK /* These are in libmingwex.a */
-/*
- * Workaround for limitations on win9x where a file contents are
- * not zero'd out if you seek past the end and then write.
- */
-
-int __cdecl __MINGW_NOTHROW __mingw_fseek (FILE *, long, int);
-size_t __cdecl __MINGW_NOTHROW __mingw_fwrite (const void*, size_t, size_t, FILE*);
-#define fseek(fp, offset, whence) __mingw_fseek(fp, offset, whence)
-#define fwrite(buffer, size, count, fp) __mingw_fwrite(buffer, size, count, fp)
-#endif /* __USE_MINGW_FSEEK */
-
-/*
- * An opaque data type used for storing file positions... The contents of
- * this type are unknown, but we (the compiler) need to know the size
- * because the programmer using fgetpos and fsetpos will be setting aside
- * storage for fpos_t structres. Actually I tested using a byte array and
- * it is fairly evident that the fpos_t type is a long (in CRTDLL.DLL).
- * Perhaps an unsigned long? TODO? It's definitely a 64-bit number in
- * MSVCRT however, and for now `long long' will do.
- */
-#ifdef __MSVCRT__
-typedef long long fpos_t;
-#else
-typedef long fpos_t;
-#endif
-
-_CRTIMP int __cdecl __MINGW_NOTHROW fgetpos (FILE*, fpos_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW fsetpos (FILE*, const fpos_t*);
-
-/*
- * Error Functions
- */
-
-_CRTIMP int __cdecl __MINGW_NOTHROW feof (FILE*);
-_CRTIMP int __cdecl __MINGW_NOTHROW ferror (FILE*);
-
-#ifdef __cplusplus
-inline int __cdecl __MINGW_NOTHROW feof (FILE* __F)
- { return __F->_flag & _IOEOF; }
-inline int __cdecl __MINGW_NOTHROW ferror (FILE* __F)
- { return __F->_flag & _IOERR; }
-#else
-#define feof(__F) ((__F)->_flag & _IOEOF)
-#define ferror(__F) ((__F)->_flag & _IOERR)
-#endif
-
-_CRTIMP void __cdecl __MINGW_NOTHROW clearerr (FILE*);
-_CRTIMP void __cdecl __MINGW_NOTHROW perror (const char*);
-
-
-#ifndef __STRICT_ANSI__
-/*
- * Pipes
- */
-_CRTIMP FILE* __cdecl __MINGW_NOTHROW _popen (const char*, const char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _pclose (FILE*);
-
-#ifndef NO_OLDNAMES
-_CRTIMP FILE* __cdecl __MINGW_NOTHROW popen (const char*, const char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW pclose (FILE*);
-#endif
-
-/*
- * Other Non ANSI functions
- */
-_CRTIMP int __cdecl __MINGW_NOTHROW _flushall (void);
-_CRTIMP int __cdecl __MINGW_NOTHROW _fgetchar (void);
-_CRTIMP int __cdecl __MINGW_NOTHROW _fputchar (int);
-_CRTIMP FILE* __cdecl __MINGW_NOTHROW _fdopen (int, const char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _fileno (FILE*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _fcloseall (void);
-_CRTIMP FILE* __cdecl __MINGW_NOTHROW _fsopen (const char*, const char*, int);
-#ifdef __MSVCRT__
-_CRTIMP int __cdecl __MINGW_NOTHROW _getmaxstdio (void);
-_CRTIMP int __cdecl __MINGW_NOTHROW _setmaxstdio (int);
-#endif
-
-#if __MSVCRT_VERSION__ >= 0x800
-_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _get_output_format (void);
-_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _set_output_format (unsigned int);
-
-#define _TWO_DIGIT_EXPONENT 1
-
-_CRTIMP int __cdecl __MINGW_NOTHROW _get_printf_count_output (void);
-_CRTIMP int __cdecl __MINGW_NOTHROW _set_printf_count_output (int);
-#endif
-
-#ifndef _NO_OLDNAMES
-_CRTIMP int __cdecl __MINGW_NOTHROW fgetchar (void);
-_CRTIMP int __cdecl __MINGW_NOTHROW fputchar (int);
-_CRTIMP FILE* __cdecl __MINGW_NOTHROW fdopen (int, const char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW fileno (FILE*);
-#endif /* Not _NO_OLDNAMES */
-
-#define _fileno(__F) ((__F)->_file)
-#ifndef _NO_OLDNAMES
-#define fileno(__F) ((__F)->_file)
-#endif
-
-#if defined (__MSVCRT__) && !defined (__NO_MINGW_LFS)
-#include <sys/types.h>
-__CRT_INLINE FILE* __cdecl __MINGW_NOTHROW fopen64 (const char* filename, const char* mode)
-{
- return fopen (filename, mode);
-}
-
-int __cdecl __MINGW_NOTHROW fseeko64 (FILE*, off64_t, int);
-
-#ifdef __USE_MINGW_FSEEK
-int __cdecl __MINGW_NOTHROW __mingw_fseeko64 (FILE *, off64_t, int);
-#define fseeko64(fp, offset, whence) __mingw_fseeko64(fp, offset, whence)
-#endif
-
-__CRT_INLINE off64_t __cdecl __MINGW_NOTHROW ftello64 (FILE * stream)
-{
- fpos_t pos;
- if (fgetpos(stream, &pos))
- return -1LL;
- else
- return ((off64_t) pos);
-}
-#endif /* __NO_MINGW_LFS */
-
-#endif /* Not __STRICT_ANSI__ */
-
-/* Wide versions */
-
-#ifndef _WSTDIO_DEFINED
-/* also in wchar.h - keep in sync */
-_CRTIMP int __cdecl __MINGW_NOTHROW fwprintf (FILE*, const wchar_t*, ...);
-_CRTIMP int __cdecl __MINGW_NOTHROW wprintf (const wchar_t*, ...);
-_CRTIMP int __cdecl __MINGW_NOTHROW _snwprintf (wchar_t*, size_t, const wchar_t*, ...);
-_CRTIMP int __cdecl __MINGW_NOTHROW vfwprintf (FILE*, const wchar_t*, __VALIST);
-_CRTIMP int __cdecl __MINGW_NOTHROW vwprintf (const wchar_t*, __VALIST);
-_CRTIMP int __cdecl __MINGW_NOTHROW _vsnwprintf (wchar_t*, size_t, const wchar_t*, __VALIST);
-_CRTIMP int __cdecl __MINGW_NOTHROW fwscanf (FILE*, const wchar_t*, ...);
-_CRTIMP int __cdecl __MINGW_NOTHROW wscanf (const wchar_t*, ...);
-_CRTIMP int __cdecl __MINGW_NOTHROW swscanf (const wchar_t*, const wchar_t*, ...);
-_CRTIMP wint_t __cdecl __MINGW_NOTHROW fgetwc (FILE*);
-_CRTIMP wint_t __cdecl __MINGW_NOTHROW fputwc (wchar_t, FILE*);
-_CRTIMP wint_t __cdecl __MINGW_NOTHROW ungetwc (wchar_t, FILE*);
-
-/* These differ from the ISO C prototypes, which have a maxlen parameter (like snprintf). */
-#ifndef __STRICT_ANSI__
-_CRTIMP int __cdecl __MINGW_NOTHROW swprintf (wchar_t*, const wchar_t*, ...);
-_CRTIMP int __cdecl __MINGW_NOTHROW vswprintf (wchar_t*, const wchar_t*, __VALIST);
-#endif
-
-#ifdef __MSVCRT__
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW fgetws (wchar_t*, int, FILE*);
-_CRTIMP int __cdecl __MINGW_NOTHROW fputws (const wchar_t*, FILE*);
-_CRTIMP wint_t __cdecl __MINGW_NOTHROW getwc (FILE*);
-_CRTIMP wint_t __cdecl __MINGW_NOTHROW getwchar (void);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _getws (wchar_t*);
-_CRTIMP wint_t __cdecl __MINGW_NOTHROW putwc (wint_t, FILE*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _putws (const wchar_t*);
-_CRTIMP wint_t __cdecl __MINGW_NOTHROW putwchar (wint_t);
-_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfdopen(int, const wchar_t *);
-_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfopen (const wchar_t*, const wchar_t*);
-_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfreopen (const wchar_t*, const wchar_t*, FILE*);
-_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfsopen (const wchar_t*, const wchar_t*, int);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wtmpnam (wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wtempnam (const wchar_t*, const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wrename (const wchar_t*, const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wremove (const wchar_t*);
-_CRTIMP void __cdecl __MINGW_NOTHROW _wperror (const wchar_t*);
-_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wpopen (const wchar_t*, const wchar_t*);
-#endif /* __MSVCRT__ */
-
-#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
-int __cdecl __MINGW_NOTHROW snwprintf (wchar_t* s, size_t n, const wchar_t* format, ...);
-__CRT_INLINE int __cdecl __MINGW_NOTHROW
-vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, __VALIST arg)
- { return _vsnwprintf ( s, n, format, arg);}
-int __cdecl __MINGW_NOTHROW vwscanf (const wchar_t * __restrict__, __VALIST);
-int __cdecl __MINGW_NOTHROW vfwscanf (FILE * __restrict__,
- const wchar_t * __restrict__, __VALIST);
-int __cdecl __MINGW_NOTHROW vswscanf (const wchar_t * __restrict__,
- const wchar_t * __restrict__, __VALIST);
-#endif
-
-#define _WSTDIO_DEFINED
-#endif /* _WSTDIO_DEFINED */
-
-#ifndef __STRICT_ANSI__
-#ifdef __MSVCRT__
-#ifndef NO_OLDNAMES
-_CRTIMP FILE* __cdecl __MINGW_NOTHROW wpopen (const wchar_t*, const wchar_t*);
-#endif /* not NO_OLDNAMES */
-#endif /* MSVCRT runtime */
-
-/*
- * Other Non ANSI wide functions
- */
-_CRTIMP wint_t __cdecl __MINGW_NOTHROW _fgetwchar (void);
-_CRTIMP wint_t __cdecl __MINGW_NOTHROW _fputwchar (wint_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW _getw (FILE*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _putw (int, FILE*);
-
-#ifndef _NO_OLDNAMES
-_CRTIMP wint_t __cdecl __MINGW_NOTHROW fgetwchar (void);
-_CRTIMP wint_t __cdecl __MINGW_NOTHROW fputwchar (wint_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW getw (FILE*);
-_CRTIMP int __cdecl __MINGW_NOTHROW putw (int, FILE*);
-#endif /* Not _NO_OLDNAMES */
-
-#endif /* __STRICT_ANSI */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* _STDIO_H_ */
diff --git a/winsup/mingw/include/stdlib.h b/winsup/mingw/include/stdlib.h
deleted file mode 100644
index b586430..0000000
--- a/winsup/mingw/include/stdlib.h
+++ /dev/null
@@ -1,558 +0,0 @@
-/*
- * stdlib.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Definitions for common types, variables, and functions.
- *
- */
-
-#ifndef _STDLIB_H_
-#define _STDLIB_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#define __need_size_t
-#define __need_wchar_t
-#define __need_NULL
-#ifndef RC_INVOKED
-#include <stddef.h>
-#endif /* RC_INVOKED */
-
-/*
- * RAND_MAX is the maximum value that may be returned by rand.
- * The minimum is zero.
- */
-#define RAND_MAX 0x7FFF
-
-/*
- * These values may be used as exit status codes.
- */
-#define EXIT_SUCCESS 0
-#define EXIT_FAILURE 1
-
-/*
- * Definitions for path name functions.
- * NOTE: All of these values have simply been chosen to be conservatively high.
- * Remember that with long file names we can no longer depend on
- * extensions being short.
- */
-#ifndef __STRICT_ANSI__
-
-#ifndef MAX_PATH
-#define MAX_PATH (260)
-#endif
-
-#define _MAX_PATH MAX_PATH
-#define _MAX_DRIVE (3)
-#define _MAX_DIR 256
-#define _MAX_FNAME 256
-#define _MAX_EXT 256
-
-#endif /* Not __STRICT_ANSI__ */
-
-
-#ifndef RC_INVOKED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined (__STRICT_ANSI__)
-
-/*
- * This seems like a convenient place to declare these variables, which
- * give programs using WinMain (or main for that matter) access to main-ish
- * argc and argv. environ is a pointer to a table of environment variables.
- * NOTE: Strings in _argv and environ are ANSI strings.
- */
-extern int _argc;
-extern char** _argv;
-
-/* imports from runtime dll of the above variables */
-#ifdef __MSVCRT__
-
-extern int* __cdecl __MINGW_NOTHROW __p___argc(void);
-extern char*** __cdecl __MINGW_NOTHROW __p___argv(void);
-extern wchar_t*** __cdecl __MINGW_NOTHROW __p___wargv(void);
-
-#define __argc (*__p___argc())
-#define __argv (*__p___argv())
-#define __wargv (*__p___wargv())
-
-#else /* !MSVCRT */
-
-#ifndef __DECLSPEC_SUPPORTED
-
-extern int* _imp____argc_dll;
-extern char*** _imp____argv_dll;
-#define __argc (*_imp____argc_dll)
-#define __argv (*_imp____argv_dll)
-
-#else /* __DECLSPEC_SUPPORTED */
-
-__MINGW_IMPORT int __argc_dll;
-__MINGW_IMPORT char** __argv_dll;
-#define __argc __argc_dll
-#define __argv __argv_dll
-
-#endif /* __DECLSPEC_SUPPORTED */
-
-#endif /* __MSVCRT */
-#endif /* __STRICT_ANSI__ */
-/*
- * Also defined in ctype.h.
- */
-#ifndef MB_CUR_MAX
-#ifdef __DECLSPEC_SUPPORTED
-# ifdef __MSVCRT__
-# define MB_CUR_MAX __mb_cur_max
- __MINGW_IMPORT int __mb_cur_max;
-# else /* not __MSVCRT */
-# define MB_CUR_MAX __mb_cur_max_dll
- __MINGW_IMPORT int __mb_cur_max_dll;
-# endif /* not __MSVCRT */
-
-#else /* ! __DECLSPEC_SUPPORTED */
-# ifdef __MSVCRT__
- extern int* _imp____mbcur_max;
-# define MB_CUR_MAX (*_imp____mb_cur_max)
-# else /* not __MSVCRT */
- extern int* _imp____mbcur_max_dll;
-# define MB_CUR_MAX (*_imp____mb_cur_max_dll)
-# endif /* not __MSVCRT */
-#endif /* __DECLSPEC_SUPPORTED */
-#endif /* MB_CUR_MAX */
-
-/*
- * MS likes to declare errno in stdlib.h as well.
- */
-
-#ifdef _UWIN
-#undef errno
-extern int errno;
-#else
- _CRTIMP int* __cdecl __MINGW_NOTHROW _errno(void);
-#define errno (*_errno())
-#endif
- _CRTIMP int* __cdecl __MINGW_NOTHROW __doserrno(void);
-#define _doserrno (*__doserrno())
-
-#if !defined (__STRICT_ANSI__)
-/*
- * Use environ from the DLL, not as a global.
- */
-
-#ifdef __MSVCRT__
- extern _CRTIMP char *** __cdecl __MINGW_NOTHROW __p__environ(void);
- extern _CRTIMP wchar_t *** __cdecl __MINGW_NOTHROW __p__wenviron(void);
-# define _environ (*__p__environ())
-# define _wenviron (*__p__wenviron())
-#else /* ! __MSVCRT__ */
-# ifndef __DECLSPEC_SUPPORTED
- extern char *** _imp___environ_dll;
-# define _environ (*_imp___environ_dll)
-# else /* __DECLSPEC_SUPPORTED */
- __MINGW_IMPORT char ** _environ_dll;
-# define _environ _environ_dll
-# endif /* __DECLSPEC_SUPPORTED */
-#endif /* ! __MSVCRT__ */
-
-#define environ _environ
-
-#ifdef __MSVCRT__
-/* One of the MSVCRTxx libraries */
-
-#ifndef __DECLSPEC_SUPPORTED
- extern int* _imp___sys_nerr;
-# define sys_nerr (*_imp___sys_nerr)
-#else /* __DECLSPEC_SUPPORTED */
- __MINGW_IMPORT int _sys_nerr;
-# ifndef _UWIN
-# define sys_nerr _sys_nerr
-# endif /* _UWIN */
-#endif /* __DECLSPEC_SUPPORTED */
-
-#else /* ! __MSVCRT__ */
-
-/* CRTDLL run time library */
-
-#ifndef __DECLSPEC_SUPPORTED
- extern int* _imp___sys_nerr_dll;
-# define sys_nerr (*_imp___sys_nerr_dll)
-#else /* __DECLSPEC_SUPPORTED */
- __MINGW_IMPORT int _sys_nerr_dll;
-# define sys_nerr _sys_nerr_dll
-#endif /* __DECLSPEC_SUPPORTED */
-
-#endif /* ! __MSVCRT__ */
-
-#ifndef __DECLSPEC_SUPPORTED
-extern char*** _imp__sys_errlist;
-#define sys_errlist (*_imp___sys_errlist)
-#else /* __DECLSPEC_SUPPORTED */
-__MINGW_IMPORT char* _sys_errlist[];
-#ifndef _UWIN
-#define sys_errlist _sys_errlist
-#endif /* _UWIN */
-#endif /* __DECLSPEC_SUPPORTED */
-
-/*
- * OS version and such constants.
- */
-
-#ifdef __MSVCRT__
-/* msvcrtxx.dll */
-
-extern _CRTIMP unsigned __cdecl __MINGW_NOTHROW int* __p__osver(void);
-extern _CRTIMP unsigned __cdecl __MINGW_NOTHROW int* __p__winver(void);
-extern _CRTIMP unsigned __cdecl __MINGW_NOTHROW int* __p__winmajor(void);
-extern _CRTIMP unsigned __cdecl __MINGW_NOTHROW int* __p__winminor(void);
-
-#ifndef __DECLSPEC_SUPPORTED
-# define _osver (*__p__osver())
-# define _winver (*__p__winver())
-# define _winmajor (*__p__winmajor())
-# define _winminor (*__p__winminor())
-#else
-__MINGW_IMPORT unsigned int _osver;
-__MINGW_IMPORT unsigned int _winver;
-__MINGW_IMPORT unsigned int _winmajor;
-__MINGW_IMPORT unsigned int _winminor;
-#endif /* __DECLSPEC_SUPPORTED */
-
-#else
-/* Not msvcrtxx.dll, thus crtdll.dll */
-
-#ifndef __DECLSPEC_SUPPORTED
-
-extern unsigned int* _imp___osver_dll;
-extern unsigned int* _imp___winver_dll;
-extern unsigned int* _imp___winmajor_dll;
-extern unsigned int* _imp___winminor_dll;
-
-#define _osver (*_imp___osver_dll)
-#define _winver (*_imp___winver_dll)
-#define _winmajor (*_imp___winmajor_dll)
-#define _winminor (*_imp___winminor_dll)
-
-#else /* __DECLSPEC_SUPPORTED */
-
-__MINGW_IMPORT unsigned int _osver_dll;
-__MINGW_IMPORT unsigned int _winver_dll;
-__MINGW_IMPORT unsigned int _winmajor_dll;
-__MINGW_IMPORT unsigned int _winminor_dll;
-
-#define _osver _osver_dll
-#define _winver _winver_dll
-#define _winmajor _winmajor_dll
-#define _winminor _winminor_dll
-
-#endif /* __DECLSPEC_SUPPORTED */
-
-#endif
-
-#if defined __MSVCRT__
-/* although the _pgmptr is exported as DATA,
- * be safe and use the access function __p__pgmptr() to get it. */
-_CRTIMP char** __cdecl __MINGW_NOTHROW __p__pgmptr(void);
-#define _pgmptr (*__p__pgmptr())
-_CRTIMP wchar_t** __cdecl __MINGW_NOTHROW __p__wpgmptr(void);
-#define _wpgmptr (*__p__wpgmptr())
-#else /* ! __MSVCRT__ */
-# ifndef __DECLSPEC_SUPPORTED
- extern char** __imp__pgmptr_dll;
-# define _pgmptr (*_imp___pgmptr_dll)
-# else /* __DECLSPEC_SUPPORTED */
- __MINGW_IMPORT char* _pgmptr_dll;
-# define _pgmptr _pgmptr_dll
-# endif /* __DECLSPEC_SUPPORTED */
-/* no wide version in CRTDLL */
-#endif /* __MSVCRT__ */
-
-/*
- * This variable determines the default file mode.
- * TODO: Which flags work?
- */
-#if !defined (__DECLSPEC_SUPPORTED) || defined (__IN_MINGW_RUNTIME)
-
-#ifdef __MSVCRT__
-extern int* _imp___fmode;
-#define _fmode (*_imp___fmode)
-#else
-/* CRTDLL */
-extern int* _imp___fmode_dll;
-#define _fmode (*_imp___fmode_dll)
-#endif
-
-#else /* __DECLSPEC_SUPPORTED */
-
-#ifdef __MSVCRT__
-__MINGW_IMPORT int _fmode;
-#else /* ! __MSVCRT__ */
-__MINGW_IMPORT int _fmode_dll;
-#define _fmode _fmode_dll
-#endif /* ! __MSVCRT__ */
-
-#endif /* __DECLSPEC_SUPPORTED */
-
-#endif /* Not __STRICT_ANSI__ */
-
-_CRTIMP double __cdecl __MINGW_NOTHROW atof (const char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW atoi (const char*);
-_CRTIMP long __cdecl __MINGW_NOTHROW atol (const char*);
-#if !defined (__STRICT_ANSI__)
-_CRTIMP int __cdecl __MINGW_NOTHROW _wtoi (const wchar_t *);
-_CRTIMP long __cdecl __MINGW_NOTHROW _wtol (const wchar_t *);
-#endif
-#if !defined __NO_ISOCEXT /* in libmingwex.a */
-double __cdecl __MINGW_NOTHROW __strtod (const char*, char**);
-#ifdef __cplusplus
-/* We require a function with external linkage. */
-#else
-static
-#endif /* Not __cplusplus */
-__inline__ double __cdecl __MINGW_NOTHROW
-strtod (const char* __restrict__ __nptr, char** __restrict__ __endptr)
-{
- return __strtod(__nptr, __endptr);
-}
-float __cdecl __MINGW_NOTHROW strtof (const char * __restrict__, char ** __restrict__);
-long double __cdecl __MINGW_NOTHROW strtold (const char * __restrict__, char ** __restrict__);
-#else
-_CRTIMP double __cdecl __MINGW_NOTHROW strtod (const char*, char**);
-#endif /* __NO_ISOCEXT */
-
-_CRTIMP long __cdecl __MINGW_NOTHROW strtol (const char*, char**, int);
-_CRTIMP unsigned long __cdecl __MINGW_NOTHROW strtoul (const char*, char**, int);
-
-#ifndef _WSTDLIB_DEFINED
-/* also declared in wchar.h */
-_CRTIMP long __cdecl __MINGW_NOTHROW wcstol (const wchar_t*, wchar_t**, int);
-_CRTIMP unsigned long __cdecl __MINGW_NOTHROW wcstoul (const wchar_t*, wchar_t**, int);
-_CRTIMP double __cdecl __MINGW_NOTHROW wcstod (const wchar_t*, wchar_t**);
-#if !defined __NO_ISOCEXT /* in libmingwex.a */
-float __cdecl __MINGW_NOTHROW wcstof( const wchar_t * __restrict__, wchar_t ** __restrict__);
-long double __cdecl __MINGW_NOTHROW wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__);
-#endif /* __NO_ISOCEXT */
-#ifdef __MSVCRT__
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetenv(const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wputenv(const wchar_t*);
-_CRTIMP void __cdecl __MINGW_NOTHROW _wsearchenv(const wchar_t*, const wchar_t*, wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wsystem(const wchar_t*);
-_CRTIMP void __cdecl __MINGW_NOTHROW _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*);
-_CRTIMP void __cdecl __MINGW_NOTHROW _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wfullpath (wchar_t*, const wchar_t*, size_t);
-#endif
-#define _WSTDLIB_DEFINED
-#endif
-
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcstombs (char*, const wchar_t*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW wctomb (char*, wchar_t);
-
-_CRTIMP int __cdecl __MINGW_NOTHROW mblen (const char*, size_t);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW mbstowcs (wchar_t*, const char*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW mbtowc (wchar_t*, const char*, size_t);
-
-_CRTIMP int __cdecl __MINGW_NOTHROW rand (void);
-_CRTIMP void __cdecl __MINGW_NOTHROW srand (unsigned int);
-
-_CRTIMP void* __cdecl __MINGW_NOTHROW calloc (size_t, size_t) __MINGW_ATTRIB_MALLOC;
-_CRTIMP void* __cdecl __MINGW_NOTHROW malloc (size_t) __MINGW_ATTRIB_MALLOC;
-_CRTIMP void* __cdecl __MINGW_NOTHROW realloc (void*, size_t);
-_CRTIMP void __cdecl __MINGW_NOTHROW free (void*);
-_CRTIMP void __cdecl __MINGW_NOTHROW abort (void) __MINGW_ATTRIB_NORETURN;
-_CRTIMP void __cdecl __MINGW_NOTHROW exit (int) __MINGW_ATTRIB_NORETURN;
-
-/* Note: This is in startup code, not imported directly from dll */
-int __cdecl __MINGW_NOTHROW atexit (void (*)(void));
-
-_CRTIMP int __cdecl __MINGW_NOTHROW system (const char*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW getenv (const char*);
-
-/* bsearch and qsort are also in non-ANSI header search.h */
-_CRTIMP void* __cdecl bsearch (const void*, const void*, size_t, size_t,
- int (*)(const void*, const void*));
-_CRTIMP void __cdecl qsort(void*, size_t, size_t,
- int (*)(const void*, const void*));
-
-_CRTIMP int __cdecl __MINGW_NOTHROW abs (int) __MINGW_ATTRIB_CONST;
-_CRTIMP long __cdecl __MINGW_NOTHROW labs (long) __MINGW_ATTRIB_CONST;
-
-/*
- * div_t and ldiv_t are structures used to return the results of div and
- * ldiv.
- *
- * NOTE: div and ldiv appear not to work correctly unless
- * -fno-pcc-struct-return is specified. This is included in the
- * mingw32 specs file.
- */
-typedef struct { int quot, rem; } div_t;
-typedef struct { long quot, rem; } ldiv_t;
-
-_CRTIMP div_t __cdecl __MINGW_NOTHROW div (int, int) __MINGW_ATTRIB_CONST;
-_CRTIMP ldiv_t __cdecl __MINGW_NOTHROW ldiv (long, long) __MINGW_ATTRIB_CONST;
-
-#if !defined (__STRICT_ANSI__)
-
-/*
- * NOTE: Officially the three following functions are obsolete. The Win32 API
- * functions SetErrorMode, Beep and Sleep are their replacements.
- */
-_CRTIMP void __cdecl __MINGW_NOTHROW _beep (unsigned int, unsigned int) __MINGW_ATTRIB_DEPRECATED;
-/* Not to be confused with _set_error_mode (int). */
-_CRTIMP void __cdecl __MINGW_NOTHROW _seterrormode (int) __MINGW_ATTRIB_DEPRECATED;
-_CRTIMP void __cdecl __MINGW_NOTHROW _sleep (unsigned long) __MINGW_ATTRIB_DEPRECATED;
-
-_CRTIMP void __cdecl __MINGW_NOTHROW _exit (int) __MINGW_ATTRIB_NORETURN;
-
-/* _onexit is MS extension. Use atexit for portability. */
-/* Note: This is in startup code, not imported directly from dll */
-typedef int (* _onexit_t)(void);
-_onexit_t __cdecl __MINGW_NOTHROW _onexit( _onexit_t );
-
-_CRTIMP int __cdecl __MINGW_NOTHROW _putenv (const char*);
-_CRTIMP void __cdecl __MINGW_NOTHROW _searchenv (const char*, const char*, char*);
-
-_CRTIMP char* __cdecl __MINGW_NOTHROW _ecvt (double, int, int*, int*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _fcvt (double, int, int*, int*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _gcvt (double, int, char*);
-
-_CRTIMP void __cdecl __MINGW_NOTHROW _makepath (char*, const char*, const char*, const char*, const char*);
-_CRTIMP void __cdecl __MINGW_NOTHROW _splitpath (const char*, char*, char*, char*, char*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _fullpath (char*, const char*, size_t);
-
-_CRTIMP char* __cdecl __MINGW_NOTHROW _itoa (int, char*, int);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _ltoa (long, char*, int);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _ultoa(unsigned long, char*, int);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _itow (int, wchar_t*, int);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _ltow (long, wchar_t*, int);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _ultow (unsigned long, wchar_t*, int);
-
-#ifdef __MSVCRT__
-_CRTIMP __int64 __cdecl __MINGW_NOTHROW _atoi64(const char *);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _i64toa(__int64, char *, int);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _ui64toa(unsigned __int64, char *, int);
-_CRTIMP __int64 __cdecl __MINGW_NOTHROW _wtoi64(const wchar_t *);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _i64tow(__int64, wchar_t *, int);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _ui64tow(unsigned __int64, wchar_t *, int);
-
-_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _rotl(unsigned int, int) __MINGW_ATTRIB_CONST;
-_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _rotr(unsigned int, int) __MINGW_ATTRIB_CONST;
-_CRTIMP unsigned long __cdecl __MINGW_NOTHROW _lrotl(unsigned long, int) __MINGW_ATTRIB_CONST;
-_CRTIMP unsigned long __cdecl __MINGW_NOTHROW _lrotr(unsigned long, int) __MINGW_ATTRIB_CONST;
-
-_CRTIMP int __cdecl __MINGW_NOTHROW _set_error_mode (int);
-
-# define _OUT_TO_DEFAULT 0
-# define _OUT_TO_STDERR 1
-# define _OUT_TO_MSGBOX 2
-# define _REPORT_ERRMODE 3
-
-# if __MSVCRT_VERSION__ >= 0x800
-# ifndef _UINTPTR_T_DEFINED
-# define _UINTPTR_T_DEFINED
-# ifdef _WIN64
- typedef unsigned __int64 uintptr_t;
-# else
- typedef unsigned int uintptr_t;
-# endif
-# endif
-
-_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _set_abort_behavior (unsigned int, unsigned int);
-
-/* These masks work with msvcr80.dll version 8.0.50215.44 (a beta release). */
-# define _WRITE_ABORT_MSG 1
-# define _CALL_REPORTFAULT 2
-
-typedef void
-(* _invalid_parameter_handler) (
- const wchar_t *,
- const wchar_t *,
- const wchar_t *,
- unsigned int,
- uintptr_t);
-_invalid_parameter_handler _set_invalid_parameter_handler (_invalid_parameter_handler);
-
-# endif /* __MSVCRT_VERSION__ >= 0x800 */
-#endif /* __MSVCRT__ */
-
-#ifndef _NO_OLDNAMES
-
-_CRTIMP int __cdecl __MINGW_NOTHROW putenv (const char*);
-_CRTIMP void __cdecl __MINGW_NOTHROW searchenv (const char*, const char*, char*);
-
-_CRTIMP char* __cdecl __MINGW_NOTHROW itoa (int, char*, int);
-_CRTIMP char* __cdecl __MINGW_NOTHROW ltoa (long, char*, int);
-
-#ifndef _UWIN
-_CRTIMP char* __cdecl __MINGW_NOTHROW ecvt (double, int, int*, int*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW fcvt (double, int, int*, int*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW gcvt (double, int, char*);
-#endif /* _UWIN */
-#endif /* Not _NO_OLDNAMES */
-
-#endif /* Not __STRICT_ANSI__ */
-
-/* C99 names */
-
-#if !defined __NO_ISOCEXT /* externs in static libmingwex.a */
-
-/* C99 name for _exit */
-void __cdecl __MINGW_NOTHROW _Exit(int) __MINGW_ATTRIB_NORETURN;
-#ifndef __STRICT_ANSI__ /* inline using non-ansi functions */
-__CRT_INLINE void __cdecl __MINGW_NOTHROW _Exit(int __status)
- { _exit (__status); }
-#endif
-
-typedef struct { long long quot, rem; } lldiv_t;
-
-lldiv_t __cdecl __MINGW_NOTHROW lldiv (long long, long long) __MINGW_ATTRIB_CONST;
-
-long long __cdecl __MINGW_NOTHROW llabs(long long);
-__CRT_INLINE long long __cdecl __MINGW_NOTHROW llabs(long long _j)
- {return (_j >= 0 ? _j : -_j);}
-
-long long __cdecl __MINGW_NOTHROW strtoll (const char* __restrict__, char** __restrict, int);
-unsigned long long __cdecl __MINGW_NOTHROW strtoull (const char* __restrict__, char** __restrict__, int);
-
-#if defined (__MSVCRT__) /* these are stubs for MS _i64 versions */
-long long __cdecl __MINGW_NOTHROW atoll (const char *);
-
-#if !defined (__STRICT_ANSI__)
-long long __cdecl __MINGW_NOTHROW wtoll (const wchar_t *);
-char* __cdecl __MINGW_NOTHROW lltoa (long long, char *, int);
-char* __cdecl __MINGW_NOTHROW ulltoa (unsigned long long , char *, int);
-wchar_t* __cdecl __MINGW_NOTHROW lltow (long long, wchar_t *, int);
-wchar_t* __cdecl __MINGW_NOTHROW ulltow (unsigned long long, wchar_t *, int);
-
- /* inline using non-ansi functions */
-__CRT_INLINE long long __cdecl __MINGW_NOTHROW atoll (const char * _c)
- { return _atoi64 (_c); }
-__CRT_INLINE char* __cdecl __MINGW_NOTHROW lltoa (long long _n, char * _c, int _i)
- { return _i64toa (_n, _c, _i); }
-__CRT_INLINE char* __cdecl __MINGW_NOTHROW ulltoa (unsigned long long _n, char * _c, int _i)
- { return _ui64toa (_n, _c, _i); }
-__CRT_INLINE long long __cdecl __MINGW_NOTHROW wtoll (const wchar_t * _w)
- { return _wtoi64 (_w); }
-__CRT_INLINE wchar_t* __cdecl __MINGW_NOTHROW lltow (long long _n, wchar_t * _w, int _i)
- { return _i64tow (_n, _w, _i); }
-__CRT_INLINE wchar_t* __cdecl __MINGW_NOTHROW ulltow (unsigned long long _n, wchar_t * _w, int _i)
- { return _ui64tow (_n, _w, _i); }
-#endif /* (__STRICT_ANSI__) */
-
-#endif /* __MSVCRT__ */
-
-#endif /* !__NO_ISOCEXT */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _STDLIB_H_ */
-
diff --git a/winsup/mingw/include/string.h b/winsup/mingw/include/string.h
deleted file mode 100644
index 62bdb3f..0000000
--- a/winsup/mingw/include/string.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * string.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Definitions for memory and string functions.
- *
- */
-
-#ifndef _STRING_H_
-#define _STRING_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-/*
- * Define size_t, wchar_t and NULL
- */
-#define __need_size_t
-#define __need_wchar_t
-#define __need_NULL
-#ifndef RC_INVOKED
-#include <stddef.h>
-#endif /* Not RC_INVOKED */
-
-#ifndef RC_INVOKED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Prototypes of the ANSI Standard C library string functions.
- */
-_CRTIMP void* __cdecl __MINGW_NOTHROW memchr (const void*, int, size_t) __MINGW_ATTRIB_PURE;
-_CRTIMP int __cdecl __MINGW_NOTHROW memcmp (const void*, const void*, size_t) __MINGW_ATTRIB_PURE;
-_CRTIMP void* __cdecl __MINGW_NOTHROW memcpy (void*, const void*, size_t);
-_CRTIMP void* __cdecl __MINGW_NOTHROW memmove (void*, const void*, size_t);
-_CRTIMP void* __cdecl __MINGW_NOTHROW memset (void*, int, size_t);
-_CRTIMP char* __cdecl __MINGW_NOTHROW strcat (char*, const char*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW strchr (const char*, int) __MINGW_ATTRIB_PURE;
-_CRTIMP int __cdecl __MINGW_NOTHROW strcmp (const char*, const char*) __MINGW_ATTRIB_PURE;
-_CRTIMP int __cdecl __MINGW_NOTHROW strcoll (const char*, const char*); /* Compare using locale */
-_CRTIMP char* __cdecl __MINGW_NOTHROW strcpy (char*, const char*);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW strcspn (const char*, const char*) __MINGW_ATTRIB_PURE;
-_CRTIMP char* __cdecl __MINGW_NOTHROW strerror (int); /* NOTE: NOT an old name wrapper. */
-
-_CRTIMP size_t __cdecl __MINGW_NOTHROW strlen (const char*) __MINGW_ATTRIB_PURE;
-_CRTIMP char* __cdecl __MINGW_NOTHROW strncat (char*, const char*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW strncmp (const char*, const char*, size_t) __MINGW_ATTRIB_PURE;
-_CRTIMP char* __cdecl __MINGW_NOTHROW strncpy (char*, const char*, size_t);
-_CRTIMP char* __cdecl __MINGW_NOTHROW strpbrk (const char*, const char*) __MINGW_ATTRIB_PURE;
-_CRTIMP char* __cdecl __MINGW_NOTHROW strrchr (const char*, int) __MINGW_ATTRIB_PURE;
-_CRTIMP size_t __cdecl __MINGW_NOTHROW strspn (const char*, const char*) __MINGW_ATTRIB_PURE;
-_CRTIMP char* __cdecl __MINGW_NOTHROW strstr (const char*, const char*) __MINGW_ATTRIB_PURE;
-_CRTIMP char* __cdecl __MINGW_NOTHROW strtok (char*, const char*);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW strxfrm (char*, const char*, size_t);
-
-#ifndef __STRICT_ANSI__
-/*
- * Extra non-ANSI functions provided by the CRTDLL library
- */
-_CRTIMP char* __cdecl __MINGW_NOTHROW _strerror (const char *);
-_CRTIMP void* __cdecl __MINGW_NOTHROW _memccpy (void*, const void*, int, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW _memicmp (const void*, const void*, size_t);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _strdup (const char*) __MINGW_ATTRIB_MALLOC;
-_CRTIMP int __cdecl __MINGW_NOTHROW _strcmpi (const char*, const char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _stricmp (const char*, const char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _stricoll (const char*, const char*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _strlwr (char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _strnicmp (const char*, const char*, size_t);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _strnset (char*, int, size_t);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _strrev (char*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _strset (char*, int);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _strupr (char*);
-_CRTIMP void __cdecl __MINGW_NOTHROW _swab (const char*, char*, size_t);
-
-#ifdef __MSVCRT__
-_CRTIMP int __cdecl __MINGW_NOTHROW _strncoll(const char*, const char*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW _strnicoll(const char*, const char*, size_t);
-#endif
-
-#ifndef _NO_OLDNAMES
-/*
- * Non-underscored versions of non-ANSI functions. They live in liboldnames.a
- * and provide a little extra portability. Also a few extra UNIX-isms like
- * strcasecmp.
- */
-_CRTIMP void* __cdecl __MINGW_NOTHROW memccpy (void*, const void*, int, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW memicmp (const void*, const void*, size_t);
-_CRTIMP char* __cdecl __MINGW_NOTHROW strdup (const char*) __MINGW_ATTRIB_MALLOC;
-_CRTIMP int __cdecl __MINGW_NOTHROW strcmpi (const char*, const char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW stricmp (const char*, const char*);
-__CRT_INLINE int __cdecl __MINGW_NOTHROW strcasecmp (const char*, const char *);
-__CRT_INLINE int __cdecl __MINGW_NOTHROW
-strcasecmp (const char * __sz1, const char * __sz2)
- {return _stricmp (__sz1, __sz2);}
-_CRTIMP int __cdecl __MINGW_NOTHROW stricoll (const char*, const char*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW strlwr (char*);
-_CRTIMP int __cdecl __MINGW_NOTHROW strnicmp (const char*, const char*, size_t);
-__CRT_INLINE int __cdecl __MINGW_NOTHROW strncasecmp (const char *, const char *, size_t);
-__CRT_INLINE int __cdecl __MINGW_NOTHROW
-strncasecmp (const char * __sz1, const char * __sz2, size_t __sizeMaxCompare)
- {return _strnicmp (__sz1, __sz2, __sizeMaxCompare);}
-_CRTIMP char* __cdecl __MINGW_NOTHROW strnset (char*, int, size_t);
-_CRTIMP char* __cdecl __MINGW_NOTHROW strrev (char*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW strset (char*, int);
-_CRTIMP char* __cdecl __MINGW_NOTHROW strupr (char*);
-#ifndef _UWIN
-_CRTIMP void __cdecl __MINGW_NOTHROW swab (const char*, char*, size_t);
-#endif /* _UWIN */
-#endif /* _NO_OLDNAMES */
-
-#endif /* Not __STRICT_ANSI__ */
-
-#ifndef _WSTRING_DEFINED
-/*
- * Unicode versions of the standard calls.
- * Also in wchar.h, where they belong according to ISO standard.
- */
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscat (wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcschr (const wchar_t*, wchar_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW wcscmp (const wchar_t*, const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW wcscoll (const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscpy (wchar_t*, const wchar_t*);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcscspn (const wchar_t*, const wchar_t*);
-/* Note: _wcserror requires __MSVCRT_VERSION__ >= 0x0700. */
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcslen (const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncat (wchar_t*, const wchar_t*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW wcsncmp(const wchar_t*, const wchar_t*, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncpy(wchar_t*, const wchar_t*, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcspbrk(const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrchr(const wchar_t*, wchar_t);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsspn(const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsstr(const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcstok(wchar_t*, const wchar_t*);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsxfrm(wchar_t*, const wchar_t*, size_t);
-
-#ifndef __STRICT_ANSI__
-/*
- * Unicode versions of non-ANSI string functions provided by CRTDLL.
- */
-
-/* NOTE: _wcscmpi not provided by CRTDLL, this define is for portability */
-#define _wcscmpi _wcsicmp
-
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsdup (const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wcsicmp (const wchar_t*, const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wcsicoll (const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcslwr (wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wcsnicmp (const wchar_t*, const wchar_t*, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsnset (wchar_t*, wchar_t, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsrev (wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsset (wchar_t*, wchar_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsupr (wchar_t*);
-
-#ifdef __MSVCRT__
-_CRTIMP int __cdecl __MINGW_NOTHROW _wcsncoll(const wchar_t*, const wchar_t*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wcsnicoll(const wchar_t*, const wchar_t*, size_t);
-#if __MSVCRT_VERSION__ >= 0x0700
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcserror(int);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW __wcserror(const wchar_t*);
-#endif
-#endif
-
-#ifndef _NO_OLDNAMES
-/* NOTE: There is no _wcscmpi, but this is for compatibility. */
-int __cdecl __MINGW_NOTHROW wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2);
-__CRT_INLINE int __cdecl __MINGW_NOTHROW
-wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2)
- {return _wcsicmp (__ws1, __ws2);}
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsdup (const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW wcsicmp (const wchar_t*, const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW wcsicoll (const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcslwr (wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW wcsnicmp (const wchar_t*, const wchar_t*, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsnset (wchar_t*, wchar_t, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrev (wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsset (wchar_t*, wchar_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsupr (wchar_t*);
-#endif /* Not _NO_OLDNAMES */
-
-#endif /* Not strict ANSI */
-
-#define _WSTRING_DEFINED
-#endif /* _WSTRING_DEFINED */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _STRING_H_ */
diff --git a/winsup/mingw/include/strings.h b/winsup/mingw/include/strings.h
deleted file mode 100644
index 2a777c2..0000000
--- a/winsup/mingw/include/strings.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- File: strings.h
- Copyright: Public Domain
-
- This file is provided because non ANSI fuctions are described in string.h
- that belong in strings.h. These functions are provided for in the OLDNAME
- libraries.
-*/
-#if !defined(_STRINGS_H_)
-# define _STRINGS_H_ 1
-# include <string.h>
-#endif
diff --git a/winsup/mingw/include/sys/fcntl.h b/winsup/mingw/include/sys/fcntl.h
deleted file mode 100644
index a2090bc..0000000
--- a/winsup/mingw/include/sys/fcntl.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * This file is part of the Mingw32 package.
- *
- * This fcntl.h maps to the root fcntl.h
- */
-
-#include <fcntl.h>
diff --git a/winsup/mingw/include/sys/file.h b/winsup/mingw/include/sys/file.h
deleted file mode 100644
index e95654c..0000000
--- a/winsup/mingw/include/sys/file.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * This file is part of the Mingw32 package.
- *
- * This file.h maps to the root fcntl.h
- * TODO?
- */
-#include <fcntl.h>
diff --git a/winsup/mingw/include/sys/locking.h b/winsup/mingw/include/sys/locking.h
deleted file mode 100644
index eee5e3c..0000000
--- a/winsup/mingw/include/sys/locking.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * locking.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Constants for the mode parameter of the locking function.
- *
- */
-
-#ifndef _LOCKING_H_
-#define _LOCKING_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#define _LK_UNLCK 0 /* Unlock */
-#define _LK_LOCK 1 /* Lock */
-#define _LK_NBLCK 2 /* Non-blocking lock */
-#define _LK_RLCK 3 /* Lock for read only */
-#define _LK_NBRLCK 4 /* Non-blocking lock for read only */
-
-#ifndef NO_OLDNAMES
-#define LK_UNLCK _LK_UNLCK
-#define LK_LOCK _LK_LOCK
-#define LK_NBLCK _LK_NBLCK
-#define LK_RLCK _LK_RLCK
-#define LK_NBRLCK _LK_NBRLCK
-#endif /* Not NO_OLDNAMES */
-
-#endif /* Not _LOCKING_H_ */
diff --git a/winsup/mingw/include/sys/param.h b/winsup/mingw/include/sys/param.h
deleted file mode 100644
index 74966bd..0000000
--- a/winsup/mingw/include/sys/param.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * param.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- */
-
-#ifndef _SYS_PARAM_H
-#define _SYS_PARAM_H
-
-#include <sys/types.h>
-#include <limits.h>
-
-/* These are useful for cross-compiling */
-#define BIG_ENDIAN 4321
-#define LITTLE_ENDIAN 1234
-#define BYTE_ORDER LITTLE_ENDIAN
-
-#define MAXPATHLEN PATH_MAX
-
-#endif
diff --git a/winsup/mingw/include/sys/stat.h b/winsup/mingw/include/sys/stat.h
deleted file mode 100644
index 3bd4627..0000000
--- a/winsup/mingw/include/sys/stat.h
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * stat.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Symbolic constants for opening and creating files, also stat, fstat and
- * chmod functions.
- *
- */
-
-#ifndef _STAT_H_
-#define _STAT_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#define __need_size_t
-#define __need_wchar_t
-#ifndef RC_INVOKED
-#include <stddef.h>
-#endif /* Not RC_INVOKED */
-
-#include <sys/types.h>
-
-/*
- * Constants for the stat st_mode member.
- */
-#define _S_IFIFO 0x1000 /* FIFO */
-#define _S_IFCHR 0x2000 /* Character */
-#define _S_IFBLK 0x3000 /* Block: Is this ever set under w32? */
-#define _S_IFDIR 0x4000 /* Directory */
-#define _S_IFREG 0x8000 /* Regular */
-
-#define _S_IFMT 0xF000 /* File type mask */
-
-#define _S_IEXEC 0x0040
-#define _S_IWRITE 0x0080
-#define _S_IREAD 0x0100
-
-#define _S_IRWXU (_S_IREAD | _S_IWRITE | _S_IEXEC)
-#define _S_IXUSR _S_IEXEC
-#define _S_IWUSR _S_IWRITE
-#define _S_IRUSR _S_IREAD
-
-#define _S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
-#define _S_ISFIFO(m) (((m) & _S_IFMT) == _S_IFIFO)
-#define _S_ISCHR(m) (((m) & _S_IFMT) == _S_IFCHR)
-#define _S_ISBLK(m) (((m) & _S_IFMT) == _S_IFBLK)
-#define _S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
-
-#ifndef _NO_OLDNAMES
-
-#define S_IFIFO _S_IFIFO
-#define S_IFCHR _S_IFCHR
-#define S_IFBLK _S_IFBLK
-#define S_IFDIR _S_IFDIR
-#define S_IFREG _S_IFREG
-#define S_IFMT _S_IFMT
-#define S_IEXEC _S_IEXEC
-#define S_IWRITE _S_IWRITE
-#define S_IREAD _S_IREAD
-#define S_IRWXU _S_IRWXU
-#define S_IXUSR _S_IXUSR
-#define S_IWUSR _S_IWUSR
-#define S_IRUSR _S_IRUSR
-
-#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
-#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
-#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
-#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
-#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
-
-#endif /* Not _NO_OLDNAMES */
-
-#ifndef RC_INVOKED
-
-#ifndef _STAT_DEFINED
-/*
- * The structure manipulated and returned by stat and fstat.
- *
- * NOTE: If called on a directory the values in the time fields are not only
- * invalid, they will cause localtime et. al. to return NULL. And calling
- * asctime with a NULL pointer causes an Invalid Page Fault. So watch it!
- */
-struct _stat
-{
- _dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
- _ino_t st_ino; /* Always zero ? */
- _mode_t st_mode; /* See above constants */
- short st_nlink; /* Number of links. */
- short st_uid; /* User: Maybe significant on NT ? */
- short st_gid; /* Group: Ditto */
- _dev_t st_rdev; /* Seems useless (not even filled in) */
- _off_t st_size; /* File size in bytes */
- time_t st_atime; /* Accessed date (always 00:00 hrs local
- * on FAT) */
- time_t st_mtime; /* Modified time */
- time_t st_ctime; /* Creation time */
-};
-
-#ifndef _NO_OLDNAMES
-/* NOTE: Must be the same as _stat above. */
-struct stat
-{
- dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
- ino_t st_ino; /* Always zero ? */
- mode_t st_mode; /* See above constants */
- short st_nlink; /* Number of links. */
- short st_uid; /* User: Maybe significant on NT ? */
- short st_gid; /* Group: Ditto */
- dev_t st_rdev; /* Seems useless (not even filled in) */
- off_t st_size; /* File size in bytes */
- time_t st_atime; /* Accessed date (always 00:00 hrs local
- * on FAT) */
- time_t st_mtime; /* Modified time */
- time_t st_ctime; /* Creation time */
-};
-#endif /* _NO_OLDNAMES */
-
-#if defined (__MSVCRT__)
-struct _stati64 {
- _dev_t st_dev;
- _ino_t st_ino;
- _mode_t st_mode;
- short st_nlink;
- short st_uid;
- short st_gid;
- _dev_t st_rdev;
- __int64 st_size;
- time_t st_atime;
- time_t st_mtime;
- time_t st_ctime;
-};
-#if __MSVCRT_VERSION__ >= 0x0601
-struct __stat64
-{
- _dev_t st_dev;
- _ino_t st_ino;
- _mode_t st_mode;
- short st_nlink;
- short st_uid;
- short st_gid;
- _dev_t st_rdev;
- __int64 st_size;
- __time64_t st_atime;
- __time64_t st_mtime;
- __time64_t st_ctime;
-};
-#endif /* __MSVCRT_VERSION__ */
-#endif /* __MSVCRT__ */
-#define _STAT_DEFINED
-#endif /* _STAT_DEFINED */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_CRTIMP int __cdecl __MINGW_NOTHROW _fstat (int, struct _stat*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _chmod (const char*, int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _stat (const char*, struct _stat*);
-
-#ifndef _NO_OLDNAMES
-
-/* These functions live in liboldnames.a. */
-_CRTIMP int __cdecl __MINGW_NOTHROW fstat (int, struct stat*);
-_CRTIMP int __cdecl __MINGW_NOTHROW chmod (const char*, int);
-_CRTIMP int __cdecl __MINGW_NOTHROW stat (const char*, struct stat*);
-
-#endif /* Not _NO_OLDNAMES */
-
-#if defined (__MSVCRT__)
-_CRTIMP int __cdecl __MINGW_NOTHROW _fstati64(int, struct _stati64 *);
-_CRTIMP int __cdecl __MINGW_NOTHROW _stati64(const char *, struct _stati64 *);
-/* These require newer versions of msvcrt.dll (6.10 or higher). */
-#if __MSVCRT_VERSION__ >= 0x0601
-_CRTIMP int __cdecl __MINGW_NOTHROW _fstat64 (int, struct __stat64*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _stat64 (const char*, struct __stat64*);
-#endif /* __MSVCRT_VERSION__ >= 0x0601 */
-#if !defined ( _WSTAT_DEFINED) /* also declared in wchar.h */
-_CRTIMP int __cdecl __MINGW_NOTHROW _wstat(const wchar_t*, struct _stat*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wstati64 (const wchar_t*, struct _stati64*);
-#if __MSVCRT_VERSION__ >= 0x0601
-_CRTIMP int __cdecl __MINGW_NOTHROW _wstat64 (const wchar_t*, struct __stat64*);
-#endif /* __MSVCRT_VERSION__ >= 0x0601 */
-#define _WSTAT_DEFINED
-#endif /* _WSTAT_DEFIND */
-#endif /* __MSVCRT__ */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _STAT_H_ */
diff --git a/winsup/mingw/include/sys/time.h b/winsup/mingw/include/sys/time.h
deleted file mode 100644
index b689d73..0000000
--- a/winsup/mingw/include/sys/time.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#ifndef _SYS_TIME_H_
-#define _SYS_TIME_H_
-#include <time.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _TIMEVAL_DEFINED /* also in winsock[2].h */
-#define _TIMEVAL_DEFINED
-struct timeval {
- long tv_sec;
- long tv_usec;
-};
-#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
-#define timercmp(tvp, uvp, cmp) \
- (((tvp)->tv_sec != (uvp)->tv_sec) ? \
- ((tvp)->tv_sec cmp (uvp)->tv_sec) : \
- ((tvp)->tv_usec cmp (uvp)->tv_usec))
-#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
-#endif /* _TIMEVAL_DEFINED */
-
-/* Provided for compatibility with code that assumes that
- the presence of gettimeofday function implies a definition
- of struct timezone. */
-struct timezone
-{
- int tz_minuteswest; /* of Greenwich */
- int tz_dsttime; /* type of dst correction to apply */
-};
-
-/*
- Implementation as per:
- The Open Group Base Specifications, Issue 6
- IEEE Std 1003.1, 2004 Edition
-
- The timezone pointer arg is ignored. Errors are ignored.
-*/
-int __cdecl __MINGW_NOTHROW gettimeofday(struct timeval *__restrict__,
- void *__restrict__ /* tzp (unused) */);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _SYS_TIME_H_ */
diff --git a/winsup/mingw/include/sys/timeb.h b/winsup/mingw/include/sys/timeb.h
deleted file mode 100644
index 24af367..0000000
--- a/winsup/mingw/include/sys/timeb.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * timeb.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Support for the UNIX System V ftime system call.
- *
- */
-
-#ifndef _TIMEB_H_
-#define _TIMEB_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-#include <sys/types.h>
-
-#ifndef RC_INVOKED
-
-/*
- * TODO: Structure not tested.
- */
-struct _timeb
-{
- time_t time;
- short millitm;
- short timezone;
- short dstflag;
-};
-
-#ifndef _NO_OLDNAMES
-/*
- * TODO: Structure not tested.
- */
-struct timeb
-{
- time_t time;
- short millitm;
- short timezone;
- short dstflag;
-};
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* TODO: Not tested. */
-_CRTIMP void __cdecl __MINGW_NOTHROW _ftime (struct _timeb*);
-
-#ifndef _NO_OLDNAMES
-_CRTIMP void __cdecl __MINGW_NOTHROW ftime (struct timeb*);
-#endif /* Not _NO_OLDNAMES */
-
-/* This requires newer versions of msvcrt.dll (6.10 or higher). */
-#if __MSVCRT_VERSION__ >= 0x0601
-struct __timeb64
-{
- __time64_t time;
- short millitm;
- short timezone;
- short dstflag;
-};
-
-_CRTIMP void __cdecl __MINGW_NOTHROW _ftime64 (struct __timeb64*);
-#endif /* __MSVCRT_VERSION__ >= 0x0601 */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _TIMEB_H_ */
diff --git a/winsup/mingw/include/sys/types.h b/winsup/mingw/include/sys/types.h
deleted file mode 100644
index ed25e52..0000000
--- a/winsup/mingw/include/sys/types.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * types.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * The definition of constants, data types and global variables.
- *
- */
-
-#ifndef _TYPES_H_
-#define _TYPES_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#define __need_wchar_t
-#define __need_size_t
-#define __need_ptrdiff_t
-#ifndef RC_INVOKED
-#include <stddef.h>
-#endif /* Not RC_INVOKED */
-
-#ifndef RC_INVOKED
-
-#ifndef _TIME_T_DEFINED
-typedef long time_t;
-#define _TIME_T_DEFINED
-#endif
-
-#ifndef _TIME64_T_DEFINED
-typedef __int64 __time64_t;
-#define _TIME64_T_DEFINED
-#endif
-
-#ifndef _OFF_T_
-#define _OFF_T_
-typedef long _off_t;
-
-#ifndef _NO_OLDNAMES
-typedef _off_t off_t;
-#endif
-#endif /* Not _OFF_T_ */
-
-
-#ifndef _DEV_T_
-#define _DEV_T_
-#ifdef __MSVCRT__
-typedef unsigned int _dev_t;
-#else
-typedef short _dev_t;
-#endif
-
-#ifndef _NO_OLDNAMES
-typedef _dev_t dev_t;
-#endif
-#endif /* Not _DEV_T_ */
-
-
-#ifndef _INO_T_
-#define _INO_T_
-typedef short _ino_t;
-
-#ifndef _NO_OLDNAMES
-typedef _ino_t ino_t;
-#endif
-#endif /* Not _INO_T_ */
-
-
-#ifndef _PID_T_
-#define _PID_T_
-typedef int _pid_t;
-
-#ifndef _NO_OLDNAMES
-typedef _pid_t pid_t;
-#endif
-#endif /* Not _PID_T_ */
-
-
-#ifndef _MODE_T_
-#define _MODE_T_
-typedef unsigned short _mode_t;
-
-#ifndef _NO_OLDNAMES
-typedef _mode_t mode_t;
-#endif
-#endif /* Not _MODE_T_ */
-
-
-#ifndef _SIGSET_T_
-#define _SIGSET_T_
-typedef int _sigset_t;
-
-#ifndef _NO_OLDNAMES
-typedef _sigset_t sigset_t;
-#endif
-#endif /* Not _SIGSET_T_ */
-
-#ifndef _SSIZE_T_
-#define _SSIZE_T_
-typedef long _ssize_t;
-
-#ifndef _NO_OLDNAMES
-typedef _ssize_t ssize_t;
-#endif
-#endif /* Not _SSIZE_T_ */
-
-#ifndef _FPOS64_T_
-#define _FPOS64_T_
-typedef long long fpos64_t;
-#endif
-
-#ifndef _OFF64_T_
-#define _OFF64_T_
-typedef long long off64_t;
-#endif
-
-#if !defined __NO_ISOCEXT
-typedef unsigned int useconds_t;
-#endif /* Not __NO_ISOCEXT */
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _TYPES_H_ */
diff --git a/winsup/mingw/include/sys/unistd.h b/winsup/mingw/include/sys/unistd.h
deleted file mode 100644
index 39eac4a..0000000
--- a/winsup/mingw/include/sys/unistd.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * This file is part of the Mingw32 package.
- *
- * unistd.h maps (roughly) to io.h
- */
-#include <io.h>
diff --git a/winsup/mingw/include/sys/utime.h b/winsup/mingw/include/sys/utime.h
deleted file mode 100644
index b444792..0000000
--- a/winsup/mingw/include/sys/utime.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * utime.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Support for the utime function.
- *
- */
-#ifndef _UTIME_H_
-#define _UTIME_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#define __need_wchar_t
-#define __need_size_t
-#ifndef RC_INVOKED
-#include <stddef.h>
-#endif /* Not RC_INVOKED */
-#include <sys/types.h>
-
-#ifndef RC_INVOKED
-
-/*
- * Structure used by _utime function.
- */
-struct _utimbuf
-{
- time_t actime; /* Access time */
- time_t modtime; /* Modification time */
-};
-
-
-#ifndef _NO_OLDNAMES
-/* NOTE: Must be the same as _utimbuf above. */
-struct utimbuf
-{
- time_t actime;
- time_t modtime;
-};
-#endif /* Not _NO_OLDNAMES */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_CRTIMP int __cdecl __MINGW_NOTHROW _utime (const char*, struct _utimbuf*);
-
-#ifndef _NO_OLDNAMES
-_CRTIMP int __cdecl __MINGW_NOTHROW utime (const char*, struct utimbuf*);
-#endif /* Not _NO_OLDNAMES */
-
-_CRTIMP int __cdecl __MINGW_NOTHROW _futime (int, struct _utimbuf*);
-
-/* The wide character version, only available for MSVCRT versions of the
- * C runtime library. */
-#ifdef __MSVCRT__
-_CRTIMP int __cdecl __MINGW_NOTHROW _wutime (const wchar_t*, struct _utimbuf*);
-#endif /* MSVCRT runtime */
-
-/* These require newer versions of msvcrt.dll (6.10 or higher). */
-#if __MSVCRT_VERSION__ >= 0x0601
-struct __utimbuf64
-{
- __time64_t actime;
- __time64_t modtime;
-};
-
-_CRTIMP int __cdecl __MINGW_NOTHROW _utime64 (const char*, struct __utimbuf64*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wutime64 (const wchar_t*, struct __utimbuf64*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _futime64 (int, struct __utimbuf64*);
-#endif /* __MSVCRT_VERSION__ >= 0x0601 */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _UTIME_H_ */
diff --git a/winsup/mingw/include/tchar.h b/winsup/mingw/include/tchar.h
deleted file mode 100644
index f680562..0000000
--- a/winsup/mingw/include/tchar.h
+++ /dev/null
@@ -1,420 +0,0 @@
-/*
- * tchar.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Unicode mapping layer for the standard C library. By including this
- * file and using the 't' names for string functions
- * (eg. _tprintf) you can make code which can be easily adapted to both
- * Unicode and non-unicode environments. In a unicode enabled compile define
- * _UNICODE before including tchar.h, otherwise the standard non-unicode
- * library functions will be used.
- *
- * Note that you still need to include string.h or stdlib.h etc. to define
- * the appropriate functions. Also note that there are several defines
- * included for non-ANSI functions which are commonly available (but using
- * the convention of prepending an underscore to non-ANSI library function
- * names).
- *
- */
-
-#ifndef _TCHAR_H_
-#define _TCHAR_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-/*
- * NOTE: This tests _UNICODE, which is different from the UNICODE define
- * used to differentiate Win32 API calls.
- */
-#ifdef _UNICODE
-
-/*
- * Include <wchar.h> for wchar_t and WEOF if _UNICODE.
- */
-#include <wchar.h>
-
-/*
- * Use TCHAR instead of char or wchar_t. It will be appropriately translated
- * if _UNICODE is correctly defined (or not).
- */
-#ifndef _TCHAR_DEFINED
-#ifndef RC_INVOKED
-typedef wchar_t TCHAR;
-typedef wchar_t _TCHAR;
-#endif /* Not RC_INVOKED */
-#define _TCHAR_DEFINED
-#endif
-
-/*
- * Use _TEOF instead of EOF or WEOF. It will be appropriately translated if
- * _UNICODE is correctly defined (or not).
- */
-#define _TEOF WEOF
-
-/*
- * __TEXT is a private macro whose specific use is to force the expansion of a
- * macro passed as an argument to the macros _T or _TEXT. DO NOT use this
- * macro within your programs. It's name and function could change without
- * notice.
- */
-#define __TEXT(q) L##q
-
-/* for porting from other Windows compilers */
-#if 0 /* no wide startup module */
-#define _tmain wmain
-#define _tWinMain wWinMain
-#define _tenviron _wenviron
-#define __targv __wargv
-#endif
-
-/*
- * Unicode functions
- */
-#define _tprintf wprintf
-#define _ftprintf fwprintf
-#define _stprintf swprintf
-#define _sntprintf _snwprintf
-#define _vtprintf vwprintf
-#define _vftprintf vfwprintf
-#define _vstprintf vswprintf
-#define _vsntprintf _vsnwprintf
-#define _tscanf wscanf
-#define _ftscanf fwscanf
-#define _stscanf swscanf
-#define _fgettc fgetwc
-#define _fgettchar _fgetwchar
-#define _fgetts fgetws
-#define _fputtc fputwc
-#define _fputtchar _fputwchar
-#define _fputts fputws
-#define _gettc getwc
-#define _getts _getws
-#define _puttc putwc
-#define _puttchar putwchar
-#define _putts _putws
-#define _ungettc ungetwc
-#define _tcstod wcstod
-#define _tcstol wcstol
-#define _tcstoul wcstoul
-#define _itot _itow
-#define _ltot _ltow
-#define _ultot _ultow
-#define _ttoi _wtoi
-#define _ttol _wtol
-#define _tcscat wcscat
-#define _tcschr wcschr
-#define _tcscmp wcscmp
-#define _tcscpy wcscpy
-#define _tcscspn wcscspn
-#define _tcslen wcslen
-#define _tcsncat wcsncat
-#define _tcsncmp wcsncmp
-#define _tcsncpy wcsncpy
-#define _tcspbrk wcspbrk
-#define _tcsrchr wcsrchr
-#define _tcsspn wcsspn
-#define _tcsstr wcsstr
-#define _tcstok wcstok
-#define _tcsdup _wcsdup
-#define _tcsicmp _wcsicmp
-#define _tcsnicmp _wcsnicmp
-#define _tcsnset _wcsnset
-#define _tcsrev _wcsrev
-#define _tcsset _wcsset
-#define _tcslwr _wcslwr
-#define _tcsupr _wcsupr
-#define _tcsxfrm wcsxfrm
-#define _tcscoll wcscoll
-#define _tcsicoll _wcsicoll
-#define _istalpha iswalpha
-#define _istupper iswupper
-#define _istlower iswlower
-#define _istdigit iswdigit
-#define _istxdigit iswxdigit
-#define _istspace iswspace
-#define _istpunct iswpunct
-#define _istalnum iswalnum
-#define _istprint iswprint
-#define _istgraph iswgraph
-#define _istcntrl iswcntrl
-#define _istascii iswascii
-#define _totupper towupper
-#define _totlower towlower
-#define _tcsftime wcsftime
-/* Macro functions */
-#define _tcsdec _wcsdec
-#define _tcsinc _wcsinc
-#define _tcsnbcnt _wcsncnt
-#define _tcsnccnt _wcsncnt
-#define _tcsnextc _wcsnextc
-#define _tcsninc _wcsninc
-#define _tcsspnp _wcsspnp
-#define _wcsdec(_wcs1, _wcs2) ((_wcs1)>=(_wcs2) ? NULL : (_wcs2)-1)
-#define _wcsinc(_wcs) ((_wcs)+1)
-#define _wcsnextc(_wcs) ((unsigned int) *(_wcs))
-#define _wcsninc(_wcs, _inc) (((_wcs)+(_inc)))
-#define _wcsncnt(_wcs, _cnt) ((wcslen(_wcs)>_cnt) ? _count : wcslen(_wcs))
-#define _wcsspnp(_wcs1, _wcs2) ((*((_wcs1)+wcsspn(_wcs1,_wcs2))) ? ((_wcs1)+wcsspn(_wcs1,_wcs2)) : NULL)
-
-#if 1 /* defined __MSVCRT__ */
-/*
- * These wide functions not in crtdll.dll.
- * Define macros anyway so that _wfoo rather than _tfoo is undefined
- */
-#define _ttoi64 _wtoi64
-#define _i64tot _i64tow
-#define _ui64tot _ui64tow
-#define _tasctime _wasctime
-#define _tctime _wctime
-#define _tstrdate _wstrdate
-#define _tstrtime _wstrtime
-#define _tutime _wutime
-#define _tcsnccoll _wcsncoll
-#define _tcsncoll _wcsncoll
-#define _tcsncicoll _wcsnicoll
-#define _tcsnicoll _wcsnicoll
-#define _taccess _waccess
-#define _tchmod _wchmod
-#define _tcreat _wcreat
-#define _tfindfirst _wfindfirst
-#define _tfindnext _wfindnext
-#define _tfdopen _wfdopen
-#define _tfopen _wfopen
-#define _tfreopen _wfreopen
-#define _tfsopen _wfsopen
-#define _tgetenv _wgetenv
-#define _tputenv _wputenv
-#define _tsearchenv _wsearchenv
-#define _tsystem _wsystem
-#define _tmakepath _wmakepath
-#define _tsplitpath _wsplitpath
-#define _tfullpath _wfullpath
-#define _tmktemp _wmktemp
-#define _topen _wopen
-#define _tremove _wremove
-#define _trename _wrename
-#define _tsopen _wsopen
-#define _tsetlocale _wsetlocale
-#define _tunlink _wunlink
-#define _tfinddata_t _wfinddata_t
-#define _tfindfirsti64 _wfindfirsti64
-#define _tfindnexti64 _wfindnexti64
-#define _tfinddatai64_t _wfinddatai64_t
-#define _tchdir _wchdir
-#define _tgetcwd _wgetcwd
-#define _tgetdcwd _wgetdcwd
-#define _tmkdir _wmkdir
-#define _trmdir _wrmdir
-#define _tstat _wstat
-#define _tstati64 _wstati64
-#define _tstat64 _wstat64
-#endif /* __MSVCRT__ */
-
-/* dirent structures and functions */
-#define _tdirent _wdirent
-#define _TDIR _WDIR
-#define _topendir _wopendir
-#define _tclosedir _wclosedir
-#define _treaddir _wreaddir
-#define _trewinddir _wrewinddir
-#define _ttelldir _wtelldir
-#define _tseekdir _wseekdir
-
-#else /* Not _UNICODE */
-
-/*
- * TCHAR, the type you should use instead of char.
- */
-#ifndef _TCHAR_DEFINED
-#ifndef RC_INVOKED
-typedef char TCHAR;
-typedef char _TCHAR;
-#endif
-#define _TCHAR_DEFINED
-#endif
-
-/*
- * _TEOF, the constant you should use instead of EOF.
- */
-#define _TEOF EOF
-
-/*
- * __TEXT is a private macro whose specific use is to force the expansion of a
- * macro passed as an argument to the macros _T or _TEXT. DO NOT use this
- * macro within your programs. It's name and function could change without
- * notice.
- */
-#define __TEXT(q) q
-
-/* for porting from other Windows compilers */
-#define _tmain main
-#define _tWinMain WinMain
-#define _tenviron _environ
-#define __targv __argv
-
-/*
- * Non-unicode (standard) functions
- */
-
-#define _tprintf printf
-#define _ftprintf fprintf
-#define _stprintf sprintf
-#define _sntprintf _snprintf
-#define _vtprintf vprintf
-#define _vftprintf vfprintf
-#define _vstprintf vsprintf
-#define _vsntprintf _vsnprintf
-#define _tscanf scanf
-#define _ftscanf fscanf
-#define _stscanf sscanf
-#define _fgettc fgetc
-#define _fgettchar _fgetchar
-#define _fgetts fgets
-#define _fputtc fputc
-#define _fputtchar _fputchar
-#define _fputts fputs
-#define _tfdopen _fdopen
-#define _tfopen fopen
-#define _tfreopen freopen
-#define _tfsopen _fsopen
-#define _tgetenv getenv
-#define _tputenv _putenv
-#define _tsearchenv _searchenv
-#define _tsystem system
-#define _tmakepath _makepath
-#define _tsplitpath _splitpath
-#define _tfullpath _fullpath
-#define _gettc getc
-#define _getts gets
-#define _puttc putc
-#define _puttchar putchar
-#define _putts puts
-#define _ungettc ungetc
-#define _tcstod strtod
-#define _tcstol strtol
-#define _tcstoul strtoul
-#define _itot _itoa
-#define _ltot _ltoa
-#define _ultot _ultoa
-#define _ttoi atoi
-#define _ttol atol
-#define _tcscat strcat
-#define _tcschr strchr
-#define _tcscmp strcmp
-#define _tcscpy strcpy
-#define _tcscspn strcspn
-#define _tcslen strlen
-#define _tcsncat strncat
-#define _tcsncmp strncmp
-#define _tcsncpy strncpy
-#define _tcspbrk strpbrk
-#define _tcsrchr strrchr
-#define _tcsspn strspn
-#define _tcsstr strstr
-#define _tcstok strtok
-#define _tcsdup _strdup
-#define _tcsicmp _stricmp
-#define _tcsnicmp _strnicmp
-#define _tcsnset _strnset
-#define _tcsrev _strrev
-#define _tcsset _strset
-#define _tcslwr _strlwr
-#define _tcsupr _strupr
-#define _tcsxfrm strxfrm
-#define _tcscoll strcoll
-#define _tcsicoll _stricoll
-#define _istalpha isalpha
-#define _istupper isupper
-#define _istlower islower
-#define _istdigit isdigit
-#define _istxdigit isxdigit
-#define _istspace isspace
-#define _istpunct ispunct
-#define _istalnum isalnum
-#define _istprint isprint
-#define _istgraph isgraph
-#define _istcntrl iscntrl
-#define _istascii isascii
-#define _totupper toupper
-#define _totlower tolower
-#define _tasctime asctime
-#define _tctime ctime
-#define _tstrdate _strdate
-#define _tstrtime _strtime
-#define _tutime _utime
-#define _tcsftime strftime
-/* Macro functions */
-#define _tcsdec _strdec
-#define _tcsinc _strinc
-#define _tcsnbcnt _strncnt
-#define _tcsnccnt _strncnt
-#define _tcsnextc _strnextc
-#define _tcsninc _strninc
-#define _tcsspnp _strspnp
-#define _strdec(_str1, _str2) ((_str1)>=(_str2) ? NULL : (_str2)-1)
-#define _strinc(_str) ((_str)+1)
-#define _strnextc(_str) ((unsigned int) *(_str))
-#define _strninc(_str, _inc) (((_str)+(_inc)))
-#define _strncnt(_str, _cnt) ((strlen(_str)>_cnt) ? _count : strlen(_str))
-#define _strspnp(_str1, _str2) ((*((_str1)+strspn(_str1,_str2))) ? ((_str1)+strspn(_str1,_str2)) : NULL)
-
-#define _tchmod _chmod
-#define _tcreat _creat
-#define _tfindfirst _findfirst
-#define _tfindnext _findnext
-#define _tmktemp _mktemp
-#define _topen _open
-#define _taccess _access
-#define _tremove remove
-#define _trename rename
-#define _tsopen _sopen
-#define _tsetlocale setlocale
-#define _tunlink _unlink
-#define _tfinddata_t _finddata_t
-#define _tchdir _chdir
-#define _tgetcwd _getcwd
-#define _tgetdcwd _getdcwd
-#define _tmkdir _mkdir
-#define _trmdir _rmdir
-#define _tstat _stat
-
-#if 1 /* defined __MSVCRT__ */
-/* Not in crtdll.dll. Define macros anyway? */
-#define _ttoi64 _atoi64
-#define _i64tot _i64toa
-#define _ui64tot _ui64toa
-#define _tcsnccoll _strncoll
-#define _tcsncoll _strncoll
-#define _tcsncicoll _strnicoll
-#define _tcsnicoll _strnicoll
-#define _tfindfirsti64 _findfirsti64
-#define _tfindnexti64 _findnexti64
-#define _tfinddatai64_t _finddatai64_t
-#define _tstati64 _stati64
-#define _tstat64 _stat64
-#endif /* __MSVCRT__ */
-
-/* dirent structures and functions */
-#define _tdirent dirent
-#define _TDIR DIR
-#define _topendir opendir
-#define _tclosedir closedir
-#define _treaddir readdir
-#define _trewinddir rewinddir
-#define _ttelldir telldir
-#define _tseekdir seekdir
-
-#endif /* Not _UNICODE */
-
-/*
- * UNICODE a constant string when _UNICODE is defined else returns the string
- * unmodified. Also defined in w32api/winnt.h.
- */
-#define _TEXT(x) __TEXT(x)
-#define _T(x) __TEXT(x)
-
-#endif /* Not _TCHAR_H_ */
-
diff --git a/winsup/mingw/include/time.h b/winsup/mingw/include/time.h
deleted file mode 100644
index 804778f..0000000
--- a/winsup/mingw/include/time.h
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * time.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Date and time functions and types.
- *
- */
-
-#ifndef _TIME_H_
-#define _TIME_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#define __need_wchar_t
-#define __need_size_t
-#define __need_NULL
-#ifndef RC_INVOKED
-#include <stddef.h>
-#endif /* Not RC_INVOKED */
-
-/*
- * Number of clock ticks per second. A clock tick is the unit by which
- * processor time is measured and is returned by 'clock'.
- */
-#define CLOCKS_PER_SEC ((clock_t)1000)
-#define CLK_TCK CLOCKS_PER_SEC
-
-
-#ifndef RC_INVOKED
-
-/*
- * A type for storing the current time and date. This is the number of
- * seconds since midnight Jan 1, 1970.
- * NOTE: This is also defined in non-ISO sys/types.h.
- */
-#ifndef _TIME_T_DEFINED
-typedef long time_t;
-#define _TIME_T_DEFINED
-#endif
-
-#ifndef __STRICT_ANSI__
-/* A 64-bit time_t to get to Y3K */
-#ifndef _TIME64_T_DEFINED
-typedef __int64 __time64_t;
-#define _TIME64_T_DEFINED
-#endif
-#endif
-/*
- * A type for measuring processor time (in clock ticks).
- */
-#ifndef _CLOCK_T_DEFINED
-typedef long clock_t;
-#define _CLOCK_T_DEFINED
-#endif
-
-#ifndef _TM_DEFINED
-/*
- * A structure for storing all kinds of useful information about the
- * current (or another) time.
- */
-struct tm
-{
- int tm_sec; /* Seconds: 0-59 (K&R says 0-61?) */
- int tm_min; /* Minutes: 0-59 */
- int tm_hour; /* Hours since midnight: 0-23 */
- int tm_mday; /* Day of the month: 1-31 */
- int tm_mon; /* Months *since* january: 0-11 */
- int tm_year; /* Years since 1900 */
- int tm_wday; /* Days since Sunday (0-6) */
- int tm_yday; /* Days since Jan. 1: 0-365 */
- int tm_isdst; /* +1 Daylight Savings Time, 0 No DST,
- * -1 don't know */
-};
-#define _TM_DEFINED
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_CRTIMP clock_t __cdecl __MINGW_NOTHROW clock (void);
-_CRTIMP time_t __cdecl __MINGW_NOTHROW time (time_t*);
-_CRTIMP double __cdecl __MINGW_NOTHROW difftime (time_t, time_t);
-_CRTIMP time_t __cdecl __MINGW_NOTHROW mktime (struct tm*);
-
-/*
- * These functions write to and return pointers to static buffers that may
- * be overwritten by other function calls. Yikes!
- *
- * NOTE: localtime, and perhaps the others of the four functions grouped
- * below may return NULL if their argument is not 'acceptable'. Also note
- * that calling asctime with a NULL pointer will produce an Invalid Page
- * Fault and crap out your program. Guess how I know. Hint: stat called on
- * a directory gives 'invalid' times in st_atime etc...
- */
-_CRTIMP char* __cdecl __MINGW_NOTHROW asctime (const struct tm*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW ctime (const time_t*);
-_CRTIMP struct tm* __cdecl __MINGW_NOTHROW gmtime (const time_t*);
-_CRTIMP struct tm* __cdecl __MINGW_NOTHROW localtime (const time_t*);
-
-_CRTIMP size_t __cdecl __MINGW_NOTHROW strftime (char*, size_t, const char*, const struct tm*);
-
-#ifndef __STRICT_ANSI__
-
-extern _CRTIMP void __cdecl __MINGW_NOTHROW _tzset (void);
-
-#ifndef _NO_OLDNAMES
-extern _CRTIMP void __cdecl __MINGW_NOTHROW tzset (void);
-#endif
-
-_CRTIMP char* __cdecl __MINGW_NOTHROW _strdate(char*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _strtime(char*);
-
-/* These require newer versions of msvcrt.dll (6.10 or higher). */
-#if __MSVCRT_VERSION__ >= 0x0601
-_CRTIMP __time64_t __cdecl __MINGW_NOTHROW _time64( __time64_t*);
-_CRTIMP __time64_t __cdecl __MINGW_NOTHROW _mktime64 (struct tm*);
-_CRTIMP char* __cdecl __MINGW_NOTHROW _ctime64 (const __time64_t*);
-_CRTIMP struct tm* __cdecl __MINGW_NOTHROW _gmtime64 (const __time64_t*);
-_CRTIMP struct tm* __cdecl __MINGW_NOTHROW _localtime64 (const __time64_t*);
-#endif /* __MSVCRT_VERSION__ >= 0x0601 */
-
-/*
- * _daylight: non zero if daylight savings time is used.
- * _timezone: difference in seconds between GMT and local time.
- * _tzname: standard/daylight savings time zone names (an array with two
- * elements).
- */
-#ifdef __MSVCRT__
-
-/* These are for compatibility with pre-VC 5.0 suppied MSVCRT. */
-extern _CRTIMP int* __cdecl __MINGW_NOTHROW __p__daylight (void);
-extern _CRTIMP long* __cdecl __MINGW_NOTHROW __p__timezone (void);
-extern _CRTIMP char** __cdecl __MINGW_NOTHROW __p__tzname (void);
-
-__MINGW_IMPORT int _daylight;
-__MINGW_IMPORT long _timezone;
-__MINGW_IMPORT char *_tzname[2];
-
-#else /* not __MSVCRT (ie. crtdll) */
-
-#ifndef __DECLSPEC_SUPPORTED
-
-extern int* _imp___daylight_dll;
-extern long* _imp___timezone_dll;
-extern char** _imp___tzname;
-
-#define _daylight (*_imp___daylight_dll)
-#define _timezone (*_imp___timezone_dll)
-#define _tzname (*_imp___tzname)
-
-#else /* __DECLSPEC_SUPPORTED */
-
-__MINGW_IMPORT int _daylight_dll;
-__MINGW_IMPORT long _timezone_dll;
-__MINGW_IMPORT char* _tzname[2];
-
-#define _daylight _daylight_dll
-#define _timezone _timezone_dll
-
-#endif /* __DECLSPEC_SUPPORTED */
-
-#endif /* not __MSVCRT__ */
-
-#ifndef _NO_OLDNAMES
-
-#ifdef __MSVCRT__
-
-/* These go in the oldnames import library for MSVCRT. */
-__MINGW_IMPORT int daylight;
-__MINGW_IMPORT long timezone;
-__MINGW_IMPORT char *tzname[2];
-
-#else /* not __MSVCRT__ */
-
-/* CRTDLL is royally messed up when it comes to these macros.
- TODO: import and alias these via oldnames import library instead
- of macros. */
-
-#define daylight _daylight
-/* NOTE: timezone not defined as macro because it would conflict with
- struct timezone in sys/time.h.
- Also, tzname used to a be macro, but now it's in moldname. */
-__MINGW_IMPORT char *tzname[2];
-
-#endif /* not __MSVCRT__ */
-
-#endif /* Not _NO_OLDNAMES */
-#endif /* Not __STRICT_ANSI__ */
-
-#ifndef _WTIME_DEFINED
-/* wide function prototypes, also declared in wchar.h */
-#ifndef __STRICT_ANSI__
-#ifdef __MSVCRT__
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wasctime(const struct tm*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime(const time_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wstrdate(wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wstrtime(wchar_t*);
-#if __MSVCRT_VERSION__ >= 0x0601
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime64 (const __time64_t*);
-#endif
-#endif /* __MSVCRT__ */
-#endif /* __STRICT_ANSI__ */
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*);
-#define _WTIME_DEFINED
-#endif /* _WTIME_DEFINED */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _TIME_H_ */
-
diff --git a/winsup/mingw/include/unistd.h b/winsup/mingw/include/unistd.h
deleted file mode 100644
index 3e7f236..0000000
--- a/winsup/mingw/include/unistd.h
+++ /dev/null
@@ -1,52 +0,0 @@
-#ifndef _UNISTD_H
-/*
- * This file is part of the Mingw32 package.
- *
- * unistd.h maps (roughly) to io.h
- * Other headers included by unistd.h may be selectively processed;
- * __UNISTD_H_SOURCED__ enables such selective processing.
- */
-#define _UNISTD_H
-#define __UNISTD_H_SOURCED__ 1
-
-#include <io.h>
-#include <process.h>
-#include <getopt.h>
-
-/* These are also defined in stdio.h. */
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#endif
-
-#ifndef SEEK_CUR
-#define SEEK_CUR 1
-#endif
-
-#ifndef SEEK_END
-#define SEEK_END 2
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined __NO_ISOCEXT
-#include <sys/types.h> /* For useconds_t. */
-
-int __cdecl __MINGW_NOTHROW usleep(useconds_t useconds);
-#endif /* Not __NO_ISOCEXT */
-
-/* This is defined as a real library function to allow autoconf
- to verify its existence. */
-int ftruncate(int, off_t);
-__CRT_INLINE int ftruncate(int __fd, off_t __length)
-{
- return _chsize (__fd, __length);
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#undef __UNISTD_H_SOURCED__
-#endif /* _UNISTD_H */
diff --git a/winsup/mingw/include/utime.h b/winsup/mingw/include/utime.h
deleted file mode 100644
index 8285f38..0000000
--- a/winsup/mingw/include/utime.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <sys/utime.h>
diff --git a/winsup/mingw/include/values.h b/winsup/mingw/include/values.h
deleted file mode 100644
index 10e16a2..0000000
--- a/winsup/mingw/include/values.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/*
- * TODO: Nothing here yet. Should provide UNIX compatibility constants
- * comparible to those in limits.h and float.h.
- */
diff --git a/winsup/mingw/include/varargs.h b/winsup/mingw/include/varargs.h
deleted file mode 100644
index c1197e9..0000000
--- a/winsup/mingw/include/varargs.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * This is just an RC_INVOKED guard for the real varargs.h
- * fixincluded in gcc system dir. One day we will delete this file.
- */
-#ifndef RC_INVOKED
-#include_next<varargs.h>
-#endif
diff --git a/winsup/mingw/include/wchar.h b/winsup/mingw/include/wchar.h
deleted file mode 100644
index be76952..0000000
--- a/winsup/mingw/include/wchar.h
+++ /dev/null
@@ -1,518 +0,0 @@
-/*
- * wchar.h
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Defines of all functions for supporting wide characters. Actually it
- * just includes all those headers, which is not a good thing to do from a
- * processing time point of view, but it does mean that everything will be
- * in sync.
- *
- */
-
-#ifndef _WCHAR_H_
-#define _WCHAR_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#ifndef RC_INVOKED
-
-#define __need_size_t
-#define __need_wint_t
-#define __need_wchar_t
-#define __need_NULL
-#include <stddef.h>
-
-#ifndef __VALIST
-#if defined __GNUC__ && __GNUC__ >= 3
-#define __need___va_list
-#include <stdarg.h>
-#define __VALIST __builtin_va_list
-#else
-#define __VALIST char*
-#endif
-#endif
-
-#endif /* Not RC_INVOKED */
-
-/*
- * MSDN says that isw* char classifications are in wchar.h and wctype.h.
- * Although the wctype names are ANSI, their exposure in this header is
- * not.
- */
-#include <wctype.h>
-
-#ifndef __STRICT_ANSI__
-/* This is necessary to support the the non-ANSI wchar declarations
- here. */
-#include <sys/types.h>
-#endif /* __STRICT_ANSI__ */
-
-#define WCHAR_MIN 0
-#define WCHAR_MAX 0xffff
-
-#ifndef WEOF
-#define WEOF (wchar_t)(0xFFFF)
-#endif
-
-#ifndef RC_INVOKED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _FILE_DEFINED /* Also in stdio.h */
-#define _FILE_DEFINED
-typedef struct _iobuf
-{
- char* _ptr;
- int _cnt;
- char* _base;
- int _flag;
- int _file;
- int _charbuf;
- int _bufsiz;
- char* _tmpfname;
-} FILE;
-#endif /* Not _FILE_DEFINED */
-
-#ifndef _TIME_T_DEFINED /* Also in time.h */
-typedef long time_t;
-#define _TIME_T_DEFINED
-#endif
-
-#ifndef _TM_DEFINED /* Also in time.h */
-struct tm {
- int tm_sec; /* seconds after the minute - [0,59] */
- int tm_min; /* minutes after the hour - [0,59] */
- int tm_hour; /* hours since midnight - [0,23] */
- int tm_mday; /* day of the month - [1,31] */
- int tm_mon; /* months since January - [0,11] */
- int tm_year; /* years since 1900 */
- int tm_wday; /* days since Sunday - [0,6] */
- int tm_yday; /* days since January 1 - [0,365] */
- int tm_isdst; /* daylight savings time flag */
- };
-#define _TM_DEFINED
-#endif
-
-#ifndef _WSTDIO_DEFINED
-/* Also in stdio.h - keep in sync */
-_CRTIMP int __cdecl __MINGW_NOTHROW fwprintf (FILE*, const wchar_t*, ...);
-_CRTIMP int __cdecl __MINGW_NOTHROW wprintf (const wchar_t*, ...);
-_CRTIMP int __cdecl __MINGW_NOTHROW _snwprintf (wchar_t*, size_t, const wchar_t*, ...);
-_CRTIMP int __cdecl __MINGW_NOTHROW vfwprintf (FILE*, const wchar_t*, __VALIST);
-_CRTIMP int __cdecl __MINGW_NOTHROW vwprintf (const wchar_t*, __VALIST);
-_CRTIMP int __cdecl __MINGW_NOTHROW _vsnwprintf (wchar_t*, size_t, const wchar_t*, __VALIST);
-_CRTIMP int __cdecl __MINGW_NOTHROW fwscanf (FILE*, const wchar_t*, ...);
-_CRTIMP int __cdecl __MINGW_NOTHROW wscanf (const wchar_t*, ...);
-_CRTIMP int __cdecl __MINGW_NOTHROW swscanf (const wchar_t*, const wchar_t*, ...);
-_CRTIMP wint_t __cdecl __MINGW_NOTHROW fgetwc (FILE*);
-_CRTIMP wint_t __cdecl __MINGW_NOTHROW fputwc (wchar_t, FILE*);
-_CRTIMP wint_t __cdecl __MINGW_NOTHROW ungetwc (wchar_t, FILE*);
-
-/* These differ from the ISO C prototypes, which have a maxlen parameter like snprintf. */
-#ifndef __STRICT_ANSI__
-_CRTIMP int __cdecl __MINGW_NOTHROW swprintf (wchar_t*, const wchar_t*, ...);
-_CRTIMP int __cdecl __MINGW_NOTHROW vswprintf (wchar_t*, const wchar_t*, __VALIST);
-#endif
-
-#ifdef __MSVCRT__
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW fgetws (wchar_t*, int, FILE*);
-_CRTIMP int __cdecl __MINGW_NOTHROW fputws (const wchar_t*, FILE*);
-_CRTIMP wint_t __cdecl __MINGW_NOTHROW getwc (FILE*);
-_CRTIMP wint_t __cdecl __MINGW_NOTHROW getwchar (void);
-_CRTIMP wint_t __cdecl __MINGW_NOTHROW putwc (wint_t, FILE*);
-_CRTIMP wint_t __cdecl __MINGW_NOTHROW putwchar (wint_t);
-#ifndef __STRICT_ANSI__
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _getws (wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _putws (const wchar_t*);
-_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfdopen(int, const wchar_t *);
-_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfopen (const wchar_t*, const wchar_t*);
-_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfreopen (const wchar_t*, const wchar_t*, FILE*);
-_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfsopen (const wchar_t*, const wchar_t*, int);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wtmpnam (wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wtempnam (const wchar_t*, const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wrename (const wchar_t*, const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wremove (const wchar_t*);
-_CRTIMP void __cdecl __MINGW_NOTHROW _wperror (const wchar_t*);
-_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wpopen (const wchar_t*, const wchar_t*);
-#endif /* __STRICT_ANSI__ */
-#endif /* __MSVCRT__ */
-
-#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
-int __cdecl __MINGW_NOTHROW snwprintf (wchar_t* s, size_t n, const wchar_t* format, ...);
-__CRT_INLINE int __cdecl __MINGW_NOTHROW
-vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, __VALIST arg)
- { return _vsnwprintf ( s, n, format, arg);}
-int __cdecl __MINGW_NOTHROW vwscanf (const wchar_t * __restrict__, __VALIST);
-int __cdecl __MINGW_NOTHROW vfwscanf (FILE * __restrict__,
- const wchar_t * __restrict__, __VALIST);
-int __cdecl __MINGW_NOTHROW vswscanf (const wchar_t * __restrict__,
- const wchar_t * __restrict__, __VALIST);
-#endif
-
-#define _WSTDIO_DEFINED
-#endif /* _WSTDIO_DEFINED */
-
-#ifndef _WSTDLIB_DEFINED /* also declared in stdlib.h */
-_CRTIMP long __cdecl __MINGW_NOTHROW wcstol (const wchar_t*, wchar_t**, int);
-_CRTIMP unsigned long __cdecl __MINGW_NOTHROW wcstoul (const wchar_t*, wchar_t**, int);
-_CRTIMP double __cdecl __MINGW_NOTHROW wcstod (const wchar_t*, wchar_t**);
-#if !defined __NO_ISOCEXT /* in libmingwex.a */
-float __cdecl __MINGW_NOTHROW wcstof (const wchar_t * __restrict__, wchar_t ** __restrict__);
-long double __cdecl __MINGW_NOTHROW wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__);
-#endif /* __NO_ISOCEXT */
-#ifdef __MSVCRT__
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetenv(const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wputenv(const wchar_t*);
-_CRTIMP void __cdecl __MINGW_NOTHROW _wsearchenv(const wchar_t*, const wchar_t*, wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wsystem(const wchar_t*);
-_CRTIMP void __cdecl __MINGW_NOTHROW _wmakepath(wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*);
-_CRTIMP void __cdecl __MINGW_NOTHROW _wsplitpath (const wchar_t*, wchar_t*, wchar_t*, wchar_t*, wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wfullpath (wchar_t*, const wchar_t*, size_t);
-#endif
-#define _WSTDLIB_DEFINED
-#endif /* _WSTDLIB_DEFINED */
-
-#ifndef _WTIME_DEFINED
-#ifndef __STRICT_ANSI__
-#ifdef __MSVCRT__
-/* wide function prototypes, also declared in time.h */
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wasctime (const struct tm*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime (const time_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wstrdate (wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wstrtime (wchar_t*);
-#if __MSVCRT_VERSION__ >= 0x601
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wctime64 (const __time64_t*);
-#endif
-#endif /* __MSVCRT__ */
-#endif /* __STRICT_ANSI__ */
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*);
-#define _WTIME_DEFINED
-#endif /* _WTIME_DEFINED */
-
-
-#ifndef _WSTRING_DEFINED
-/*
- * Unicode versions of the standard string calls.
- * Also in string.h.
- */
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscat (wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcschr (const wchar_t*, wchar_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW wcscmp (const wchar_t*, const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW wcscoll (const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcscpy (wchar_t*, const wchar_t*);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcscspn (const wchar_t*, const wchar_t*);
-/* Note: _wcserror requires __MSVCRT_VERSION__ >= 0x0700. */
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcslen (const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncat (wchar_t*, const wchar_t*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW wcsncmp(const wchar_t*, const wchar_t*, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsncpy(wchar_t*, const wchar_t*, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcspbrk(const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrchr(const wchar_t*, wchar_t);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsspn(const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsstr(const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcstok(wchar_t*, const wchar_t*);
-_CRTIMP size_t __cdecl __MINGW_NOTHROW wcsxfrm(wchar_t*, const wchar_t*, size_t);
-
-#ifndef __STRICT_ANSI__
-/*
- * Unicode versions of non-ANSI functions provided by CRTDLL.
- */
-
-/* NOTE: _wcscmpi not provided by CRTDLL, this define is for portability */
-#define _wcscmpi _wcsicmp
-
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsdup (const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wcsicmp (const wchar_t*, const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wcsicoll (const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcslwr (wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wcsnicmp (const wchar_t*, const wchar_t*, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsnset (wchar_t*, wchar_t, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsrev (wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsset (wchar_t*, wchar_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcsupr (wchar_t*);
-
-#ifdef __MSVCRT__
-_CRTIMP int __cdecl __MINGW_NOTHROW _wcsncoll(const wchar_t*, const wchar_t*, size_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wcsnicoll(const wchar_t*, const wchar_t*, size_t);
-#if __MSVCRT_VERSION__ >= 0x0700
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wcserror(int);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW __wcserror(const wchar_t*);
-#endif
-#endif
-
-#ifndef _NO_OLDNAMES
-/* NOTE: There is no _wcscmpi, but this is for compatibility. */
-__CRT_INLINE int __cdecl __MINGW_NOTHROW
-wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2)
- {return _wcsicmp (__ws1, __ws2);}
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsdup (const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW wcsicmp (const wchar_t*, const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW wcsicoll (const wchar_t*, const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcslwr (wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW wcsnicmp (const wchar_t*, const wchar_t*, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsnset (wchar_t*, wchar_t, size_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsrev (wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsset (wchar_t*, wchar_t);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW wcsupr (wchar_t*);
-#endif /* Not _NO_OLDNAMES */
-
-#endif /* Not strict ANSI */
-
-#define _WSTRING_DEFINED
-#endif /* _WSTRING_DEFINED */
-
-/* These are resolved by -lmingwex. Alternatively, they can be resolved by
- adding -lmsvcp60 to your command line, which will give you the VC++
- versions of these functions. If you want the latter and don't have
- msvcp60.dll in your windows system directory, you can easily obtain
- it with a search from your favorite search engine. */
-#ifndef __STRICT_ANSI__
-typedef wchar_t _Wint_t;
-#endif
-
-typedef int mbstate_t;
-
-wint_t __cdecl __MINGW_NOTHROW btowc(int);
-size_t __cdecl __MINGW_NOTHROW mbrlen(const char * __restrict__, size_t,
- mbstate_t * __restrict__);
-size_t __cdecl __MINGW_NOTHROW mbrtowc(wchar_t * __restrict__, const char * __restrict__,
- size_t, mbstate_t * __restrict__);
-size_t __cdecl __MINGW_NOTHROW mbsrtowcs(wchar_t * __restrict__, const char ** __restrict__,
- size_t, mbstate_t * __restrict__);
-size_t __cdecl __MINGW_NOTHROW wcrtomb(char * __restrict__, wchar_t,
- mbstate_t * __restrict__);
-size_t __cdecl __MINGW_NOTHROW wcsrtombs(char * __restrict__, const wchar_t ** __restrict__,
- size_t, mbstate_t * __restrict__);
-int __cdecl __MINGW_NOTHROW wctob(wint_t);
-
-#ifndef __NO_ISOCEXT /* these need static lib libmingwex.a */
-int __cdecl __MINGW_NOTHROW fwide(FILE*, int);
-int __cdecl __MINGW_NOTHROW mbsinit(const mbstate_t*);
-#ifndef __NO_INLINE__
-__CRT_INLINE int __cdecl __MINGW_NOTHROW fwide(FILE* __UNUSED_PARAM(stream),
- int mode)
- {return mode;} /* Nothing to do */
-__CRT_INLINE int __cdecl __MINGW_NOTHROW mbsinit(const mbstate_t* __UNUSED_PARAM(ps))
- {return 1;}
-#endif
-wchar_t* __cdecl __MINGW_NOTHROW wmemset(wchar_t *, wchar_t, size_t);
-wchar_t* __cdecl __MINGW_NOTHROW wmemchr(const wchar_t*, wchar_t, size_t);
-int wmemcmp(const wchar_t*, const wchar_t *, size_t);
-wchar_t* __cdecl __MINGW_NOTHROW wmemcpy(wchar_t* __restrict__,
- const wchar_t* __restrict__,
- size_t);
-wchar_t* __cdecl __MINGW_NOTHROW wmemmove(wchar_t* s1, const wchar_t *, size_t);
-long long __cdecl __MINGW_NOTHROW wcstoll(const wchar_t * __restrict__,
- wchar_t** __restrict__, int);
-unsigned long long __cdecl __MINGW_NOTHROW wcstoull(const wchar_t * __restrict__,
- wchar_t ** __restrict__, int);
-#endif /* __NO_ISOCEXT */
-
-#ifndef __STRICT_ANSI__
-/* non-ANSI wide char functions from io.h, direct.h, sys/stat.h and locale.h. */
-
-#ifndef _FSIZE_T_DEFINED
-typedef unsigned long _fsize_t;
-#define _FSIZE_T_DEFINED
-#endif
-
-#ifndef _WFINDDATA_T_DEFINED
-struct _wfinddata_t {
- unsigned attrib;
- time_t time_create; /* -1 for FAT file systems */
- time_t time_access; /* -1 for FAT file systems */
- time_t time_write;
- _fsize_t size;
- wchar_t name[260]; /* may include spaces. */
-};
-struct _wfinddatai64_t {
- unsigned attrib;
- time_t time_create;
- time_t time_access;
- time_t time_write;
- __int64 size;
- wchar_t name[260];
-};
-#if __MSVCRT_VERSION__ >= 0x0601
-struct __wfinddata64_t {
- unsigned attrib;
- __time64_t time_create;
- __time64_t time_access;
- __time64_t time_write;
-/* 8 bytes are returned so it can't be _fsize_t */
- __int64 size;
- wchar_t name[260];
-};
-#endif
-#define _WFINDDATA_T_DEFINED
-#endif
-
-/* Wide character versions. Also defined in io.h. */
-/* CHECK: I believe these only exist in MSVCRT, and not in CRTDLL. Also
- applies to other wide character versions? */
-#if !defined (_WIO_DEFINED)
-#if defined (__MSVCRT__)
-#include <stdint.h> /* For intptr_t. */
-_CRTIMP int __cdecl __MINGW_NOTHROW _waccess (const wchar_t*, int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wchmod (const wchar_t*, int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wcreat (const wchar_t*, int);
-_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirst (const wchar_t*, struct _wfinddata_t *);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnext (long, struct _wfinddata_t *);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wunlink (const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wopen (const wchar_t*, int, ...);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wsopen (const wchar_t*, int, int, ...);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wmktemp (wchar_t*);
-_CRTIMP long __cdecl __MINGW_NOTHROW _wfindfirsti64 (const wchar_t*, struct _wfinddatai64_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wfindnexti64 (long, struct _wfinddatai64_t*);
-#if __MSVCRT_VERSION__ >= 0x0601
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindfirst64(const wchar_t*, struct __wfinddata64_t*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wfindnext64(intptr_t, struct __wfinddata64_t*);
-#endif /* __MSVCRT_VERSION__ >= 0x0601 */
-#endif /* defined (__MSVCRT__) */
-#define _WIO_DEFINED
-#endif /* _WIO_DEFINED */
-
-#ifndef _WDIRECT_DEFINED
-/* Also in direct.h */
-#ifdef __MSVCRT__
-_CRTIMP int __cdecl __MINGW_NOTHROW _wchdir (const wchar_t*);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetcwd (wchar_t*, int);
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wgetdcwd (int, wchar_t*, int);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wmkdir (const wchar_t*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wrmdir (const wchar_t*);
-#endif /* __MSVCRT__ */
-#define _WDIRECT_DEFINED
-#endif /* _WDIRECT_DEFINED */
-
-#ifndef _STAT_DEFINED
-/*
- * The structure manipulated and returned by stat and fstat.
- *
- * NOTE: If called on a directory the values in the time fields are not only
- * invalid, they will cause localtime et. al. to return NULL. And calling
- * asctime with a NULL pointer causes an Invalid Page Fault. So watch it!
- */
-struct _stat
-{
- _dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
- _ino_t st_ino; /* Always zero ? */
- _mode_t st_mode; /* See above constants */
- short st_nlink; /* Number of links. */
- short st_uid; /* User: Maybe significant on NT ? */
- short st_gid; /* Group: Ditto */
- _dev_t st_rdev; /* Seems useless (not even filled in) */
- _off_t st_size; /* File size in bytes */
- time_t st_atime; /* Accessed date (always 00:00 hrs local
- * on FAT) */
- time_t st_mtime; /* Modified time */
- time_t st_ctime; /* Creation time */
-};
-
-#ifndef _NO_OLDNAMES
-/* NOTE: Must be the same as _stat above. */
-struct stat
-{
- dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
- ino_t st_ino; /* Always zero ? */
- mode_t st_mode; /* See above constants */
- short st_nlink; /* Number of links. */
- short st_uid; /* User: Maybe significant on NT ? */
- short st_gid; /* Group: Ditto */
- dev_t st_rdev; /* Seems useless (not even filled in) */
- off_t st_size; /* File size in bytes */
- time_t st_atime; /* Accessed date (always 00:00 hrs local
- * on FAT) */
- time_t st_mtime; /* Modified time */
- time_t st_ctime; /* Creation time */
-};
-#endif /* _NO_OLDNAMES */
-
-#if defined (__MSVCRT__)
-struct _stati64 {
- _dev_t st_dev;
- _ino_t st_ino;
- unsigned short st_mode;
- short st_nlink;
- short st_uid;
- short st_gid;
- _dev_t st_rdev;
- __int64 st_size;
- time_t st_atime;
- time_t st_mtime;
- time_t st_ctime;
-};
-
-#if __MSVCRT_VERSION__ >= 0x0601
-struct __stat64
-{
- _dev_t st_dev;
- _ino_t st_ino;
- _mode_t st_mode;
- short st_nlink;
- short st_uid;
- short st_gid;
- _dev_t st_rdev;
- __int64 st_size;
- __time64_t st_atime;
- __time64_t st_mtime;
- __time64_t st_ctime;
-};
-#endif /* __MSVCRT_VERSION__ */
-#endif /* __MSVCRT__ */
-#define _STAT_DEFINED
-#endif /* _STAT_DEFINED */
-
-#if !defined ( _WSTAT_DEFINED)
-/* also declared in sys/stat.h */
-#if defined __MSVCRT__
-_CRTIMP int __cdecl __MINGW_NOTHROW _wstat (const wchar_t*, struct _stat*);
-_CRTIMP int __cdecl __MINGW_NOTHROW _wstati64 (const wchar_t*, struct _stati64*);
-#if __MSVCRT_VERSION__ >= 0x0601
-_CRTIMP int __cdecl __MINGW_NOTHROW _wstat64 (const wchar_t*, struct __stat64*);
-#endif /* __MSVCRT_VERSION__ >= 0x0601 */
-#endif /* __MSVCRT__ */
-#define _WSTAT_DEFINED
-#endif /* ! _WSTAT_DEFIND */
-
-#ifndef _WLOCALE_DEFINED /* also declared in locale.h */
-_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wsetlocale (int, const wchar_t*);
-#define _WLOCALE_DEFINED
-#endif
-
-#ifndef _WPROCESS_DEFINED /* also declared in process.h */
-#include <stdint.h> /* For intptr_t. */
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecl (const wchar_t*, const wchar_t*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecle (const wchar_t*, const wchar_t*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexeclp (const wchar_t*, const wchar_t*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexeclpe (const wchar_t*, const wchar_t*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecv (const wchar_t*, const wchar_t* const*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecve (const wchar_t*, const wchar_t* const*, const wchar_t* const*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecvp (const wchar_t*, const wchar_t* const*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wexecvpe (const wchar_t*, const wchar_t* const*, const wchar_t* const*);
-
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnl (int, const wchar_t*, const wchar_t*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnle (int, const wchar_t*, const wchar_t*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnlp (int, const wchar_t*, const wchar_t*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnlpe (int, const wchar_t*, const wchar_t*, ...);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnv (int, const wchar_t*, const wchar_t* const*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnve (int, const wchar_t*, const wchar_t* const*, const wchar_t* const*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnvp (int, const wchar_t*, const wchar_t* const*);
-_CRTIMP intptr_t __cdecl __MINGW_NOTHROW _wspawnvpe (int, const wchar_t*, const wchar_t* const*, const wchar_t* const*);
-
-#define _WPROCESS_DEFINED
-#endif
-#endif /* not __STRICT_ANSI__ */
-
-#ifdef __cplusplus
-} /* end of extern "C" */
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* not _WCHAR_H_ */
-
diff --git a/winsup/mingw/include/wctype.h b/winsup/mingw/include/wctype.h
deleted file mode 100644
index 1266034..0000000
--- a/winsup/mingw/include/wctype.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * wctype.h
- *
- * Functions for testing wide character types and converting characters.
- *
- * This file is part of the Mingw32 package.
- *
- * Contributors:
- * Created by Mumit Khan <khan@xraylith.wisc.edu>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef _WCTYPE_H_
-#define _WCTYPE_H_
-
-/* All the headers include this file. */
-#include <_mingw.h>
-
-#define __need_wchar_t
-#define __need_wint_t
-#ifndef RC_INVOKED
-#include <stddef.h>
-#endif /* Not RC_INVOKED */
-
-/*
- * The following flags are used to tell iswctype and _isctype what character
- * types you are looking for.
- */
-#define _UPPER 0x0001
-#define _LOWER 0x0002
-#define _DIGIT 0x0004
-#define _SPACE 0x0008
-#define _PUNCT 0x0010
-#define _CONTROL 0x0020
-#define _BLANK 0x0040
-#define _HEX 0x0080
-#define _LEADBYTE 0x8000
-
-#define _ALPHA 0x0103
-
-#ifndef RC_INVOKED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef WEOF
-#define WEOF (wchar_t)(0xFFFF)
-#endif
-
-#ifndef _WCTYPE_T_DEFINED
-typedef wchar_t wctype_t;
-#define _WCTYPE_T_DEFINED
-#endif
-
-/* Wide character equivalents - also in ctype.h */
-_CRTIMP int __cdecl __MINGW_NOTHROW iswalnum(wint_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW iswalpha(wint_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW iswascii(wint_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW iswcntrl(wint_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW iswctype(wint_t, wctype_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW is_wctype(wint_t, wctype_t); /* Obsolete! */
-_CRTIMP int __cdecl __MINGW_NOTHROW iswdigit(wint_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW iswgraph(wint_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW iswlower(wint_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW iswprint(wint_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW iswpunct(wint_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW iswspace(wint_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW iswupper(wint_t);
-_CRTIMP int __cdecl __MINGW_NOTHROW iswxdigit(wint_t);
-
-#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
- || !defined __STRICT_ANSI__ || defined __cplusplus
-int __cdecl __MINGW_NOTHROW iswblank (wint_t);
-#endif
-
-/* Older MS docs uses wchar_t for arg and return type, while newer
- online MS docs say arg is wint_t and return is int.
- ISO C uses wint_t for both. */
-_CRTIMP wint_t __cdecl __MINGW_NOTHROW towlower (wint_t);
-_CRTIMP wint_t __cdecl __MINGW_NOTHROW towupper (wint_t);
-
-_CRTIMP int __cdecl __MINGW_NOTHROW isleadbyte (int);
-
-/* Also in ctype.h */
-
-#ifdef __DECLSPEC_SUPPORTED
-# if __MSVCRT_VERSION__ <= 0x0700
- __MINGW_IMPORT unsigned short _ctype[];
-# endif
-# ifdef __MSVCRT__
- __MINGW_IMPORT unsigned short* _pctype;
-# else /* CRTDLL */
- __MINGW_IMPORT unsigned short* _pctype_dll;
-# define _pctype _pctype_dll
-# endif
-
-#else /* ! __DECLSPEC_SUPPORTED */
-# if __MSVCRT_VERSION__ <= 0x0700
- extern unsigned short** _imp___ctype;
-# define _ctype (*_imp___ctype)
-# endif
-# ifdef __MSVCRT__
- extern unsigned short** _imp___pctype;
-# define _pctype (*_imp___pctype)
-# else /* CRTDLL */
- extern unsigned short** _imp___pctype_dll;
-# define _pctype (*_imp___pctype_dll)
-# endif /* CRTDLL */
-#endif /* __DECLSPEC_SUPPORTED */
-
-
-#if !(defined (__NO_INLINE__) || defined(__NO_CTYPE_INLINES) \
- || defined(__WCTYPE_INLINES_DEFINED))
-#define __WCTYPE_INLINES_DEFINED
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswascii(wint_t wc) {return ((wc & ~0x7F) ==0);}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswlower(wint_t wc) {return (iswctype(wc,_LOWER));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswspace(wint_t wc) {return (iswctype(wc,_SPACE));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswupper(wint_t wc) {return (iswctype(wc,_UPPER));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));}
-__CRT_INLINE int __cdecl __MINGW_NOTHROW isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);}
-
-#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
- || !defined __STRICT_ANSI__ || defined __cplusplus
-__CRT_INLINE int __cdecl __MINGW_NOTHROW iswblank (wint_t wc)
- {return (iswctype(wc, _BLANK) || wc == L'\t');}
-#endif
-
-#endif /* !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED)) */
-
-typedef wchar_t wctrans_t;
-
-/* These are resolved by libmingwex.a. Note, that they are also exported
- by the MS C++ runtime lib (msvcp60.dll). The msvcp60.dll implementations
- of wctrans and towctrans are not C99 compliant in that wctrans("tolower")
- returns 0, while std specifies that a non-zero value should be returned
- for a valid string descriptor. If you want the MS behaviour (and you have
- msvcp60.dll in your path) add -lmsvcp60 to your command line. */
-
-wint_t __cdecl __MINGW_NOTHROW towctrans(wint_t, wctrans_t);
-wctrans_t __cdecl __MINGW_NOTHROW wctrans(const char*);
-wctype_t __cdecl __MINGW_NOTHROW wctype(const char*);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not RC_INVOKED */
-
-#endif /* Not _WCTYPE_H_ */
-
diff --git a/winsup/mingw/init.c b/winsup/mingw/init.c
deleted file mode 100644
index a30c035..0000000
--- a/winsup/mingw/init.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * init.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Code to initialize standard file handles and command line arguments.
- * This file is #included in both crt1.c and dllcrt1.c.
- *
- */
-
-/*
- * Access to a standard 'main'-like argument count and list. Also included
- * is a table of environment variables.
- */
-int _argc = 0;
-char **_argv = 0;
-
-/* NOTE: Thanks to Pedro A. Aranda Gutiirrez <paag@tid.es> for pointing
- * this out to me. GetMainArgs (used below) takes a fourth argument
- * which is an int that controls the globbing of the command line. If
- * _CRT_glob is non-zero the command line will be globbed (e.g. *.*
- * expanded to be all files in the startup directory). In the mingw32
- * library a _CRT_glob variable is defined as being -1, enabling
- * this command line globbing by default. To turn it off and do all
- * command line processing yourself (and possibly escape bogons in
- * MS's globbing code) include a line in one of your source modules
- * defining _CRT_glob and setting it to zero, like this:
- * int _CRT_glob = 0;
- */
-extern int _CRT_glob;
-
-#ifdef __MSVCRT__
-typedef struct {
- int newmode;
-} _startupinfo;
-extern void __getmainargs (int *, char ***, char ***, int, _startupinfo *);
-#else
-extern void __GetMainArgs (int *, char ***, char ***, int);
-#endif
-
-/*
- * Initialize the _argc, _argv and environ variables.
- */
-static void
-_mingw32_init_mainargs ()
-{
- /* The environ variable is provided directly in stdlib.h through
- * a dll function call. */
- char **dummy_environ;
-#ifdef __MSVCRT__
- _startupinfo start_info;
- start_info.newmode = 0;
-#endif
-
- /*
- * Microsoft's runtime provides a function for doing just that.
- */
-#ifdef __MSVCRT__
- (void) __getmainargs (&_argc, &_argv, &dummy_environ, _CRT_glob,
- &start_info);
-#else
- /* CRTDLL version */
- (void) __GetMainArgs (&_argc, &_argv, &dummy_environ, _CRT_glob);
-#endif
-}
-
diff --git a/winsup/mingw/install-sh b/winsup/mingw/install-sh
deleted file mode 100755
index 9344e52..0000000
--- a/winsup/mingw/install-sh
+++ /dev/null
@@ -1,253 +0,0 @@
-#!/bin/sh
-#
-# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
-#
-# Copyright 1991 by the Massachusetts Institute of Technology
-#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission. M.I.T. makes no representations about the
-# suitability of this software for any purpose. It is provided "as is"
-# without express or implied warranty.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch. It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
- case $1 in
- -c) instcmd="$cpprog"
- shift
- continue;;
-
- -d) dir_arg=true
- shift
- continue;;
-
- -m) chmodcmd="$chmodprog $2"
- shift
- shift
- continue;;
-
- -o) chowncmd="$chownprog $2"
- shift
- shift
- continue;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift
- shift
- continue;;
-
- -s) stripcmd="$stripprog"
- shift
- continue;;
-
- -t=*) transformarg=`echo $1 | sed 's/-t=//'`
- shift
- continue;;
-
- -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
- shift
- continue;;
-
- *) if [ x"$src" = x ]
- then
- src=$1
- else
- # this colon is to work around a 386BSD /bin/sh bug
- :
- dst=$1
- fi
- shift
- continue;;
- esac
-done
-
-if [ x"$src" = x ]
-then
- echo "install: no input file specified"
- exit 1
-else
- true
-fi
-
-if [ x"$dir_arg" != x ]; then
- dst=$src
- src=""
-
- if [ -d $dst ]; then
- instcmd=:
- chmodcmd=""
- else
- instcmd=mkdir
- fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
-# if $src (and thus $dsttmp) contains '*'.
-
- if [ -f $src -o -d $src ]
- then
- true
- else
- echo "install: $src does not exist"
- exit 1
- fi
-
- if [ x"$dst" = x ]
- then
- echo "install: no destination specified"
- exit 1
- else
- true
- fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
- if [ -d $dst ]
- then
- dst="$dst"/`basename $src`
- else
- true
- fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-# this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
- pathcomp="${pathcomp}${1}"
- shift
-
- if [ ! -d "${pathcomp}" ] ;
- then
- $mkdirprog "${pathcomp}"
- else
- true
- fi
-
- pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
- $doit $instcmd $dst &&
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
- if [ x"$transformarg" = x ]
- then
- dstfile=`basename $dst`
- else
- dstfile=`basename $dst $transformbasename |
- sed $transformarg`$transformbasename
- fi
-
-# don't allow the sed command to completely eliminate the filename
-
- if [ x"$dstfile" = x ]
- then
- dstfile=`basename $dst`
- else
- true
- fi
-
-# Make a temp file name in the proper directory.
-
- dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
- $doit $instcmd $src $dsttmp &&
-
- trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing. If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
- $doit $rmcmd -f $dstdir/$dstfile
- ([ -f $dstdir/$dstfile ] &&
- $doit $mvcmd $dstdir/$dstfile $dstdir/$dstfile.$$ );
- exec $doit $mvcmd $dsttmp $dstdir/$dstfile
-
-fi &&
-
-
-exit 0
diff --git a/winsup/mingw/isascii.c b/winsup/mingw/isascii.c
deleted file mode 100644
index 9d3385c..0000000
--- a/winsup/mingw/isascii.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * isascii.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Oldnames from ANSI header ctype.h
- *
- * Some wrapper functions for those old name functions whose appropriate
- * equivalents are not simply underscore prefixed.
- *
- */
-
-#include <ctype.h>
-
-int
-isascii (int c)
-{
- return __isascii(c);
-}
-
diff --git a/winsup/mingw/iscsym.c b/winsup/mingw/iscsym.c
deleted file mode 100644
index ea9a571..0000000
--- a/winsup/mingw/iscsym.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * iscsym.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Oldnames from ANSI header ctype.h
- *
- * Some wrapper functions for those old name functions whose appropriate
- * equivalents are not simply underscore prefixed.
- *
- */
-
-#include <ctype.h>
-
-int
-iscsym (int c)
-{
- return __iscsym(c);
-}
diff --git a/winsup/mingw/iscsymf.c b/winsup/mingw/iscsymf.c
deleted file mode 100644
index 6afde99..0000000
--- a/winsup/mingw/iscsymf.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * iscsymf.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Oldnames from ANSI header ctype.h
- *
- * Some wrapper functions for those old name functions whose appropriate
- * equivalents are not simply underscore prefixed.
- *
- */
-
-#include <ctype.h>
-
-int
-iscsymf (int c)
-{
- return __iscsymf(c);
-}
-
diff --git a/winsup/mingw/jamfile b/winsup/mingw/jamfile
deleted file mode 100644
index 85f0b2b..0000000
--- a/winsup/mingw/jamfile
+++ /dev/null
@@ -1,71 +0,0 @@
-#
-# Jamfile for building various libraries and object files for the
-# Minimalist GNU-Win32 package.
-#* This file has no copyright assigned and is placed in the Public Domain.
-#* This file is a part of the mingw-runtime package.
-#* No warranty is given; refer to the file DISCLAIMER within the package.
-#
-
-# Change this line if you have installed Mingw32 in another directory.
-#
-LOCATE_TARGET = /mingw32/lib ;
-
-RUNTIME default = crtdll ;
-
-# Build the mingw32 library which contains startup code and extra support
-# routines.
-#
-Library libmingw32.a :
- CRTglob.c
- CRTfmode.c
- CRTinit.c
- dirent.c
- dllmain.c
- gccmain.c
- main.c
- ;
-
-
-# Build the startup object files for normal applications and for DLLs.
-# The crt2 and dllcrt2 versions are for MSVCRTxx.DLL runtimes. crt1 and
-# dllcrt1 are for the CRTDLL.DLL runtime.
-#
-Object crt1.o : crt1.c ;
-Object crt2.o : crt1.c ;
-
-CCFLAGS on crt2.o += -D__MSVCRT__ ;
-
-Object dllcrt1.o : dllcrt1.c ;
-Object dllcrt2.o : dllcrt1.c ;
-
-CCFLAGS on dllcrt2.o += -D__MSVCRT__ ;
-
-DEPENDS all : crt1.o dllcrt1.o crt2.o dllcrt2.o ;
-
-
-# Build an object file which contains a single global variable initialized
-# so that globbing will not be performed on the command line.
-#
-Object CRT_noglob.o : CRT_noglob.c ;
-LOCATE on CRT_noglob.o = $(LOCATE_TARGET) ;
-
-DEPENDS all : CRT_noglob.o ;
-
-
-# Build a special import library which contains mostly the imports defined
-# in moldname.def, but with their leading underscores stripped off, plus the
-# extra code in the C modules included.
-#
-ImportLib libmoldname.a : moldname.def ctype_old.c string_old.c ;
-
-DLLNAME on libmoldname.a = $(RUNTIME).dll ;
-DLLTOOLFLAGS on libmoldname.a += -U ;
-
-
-# Build import libraries for the various runtimes.
-#
-ImportLib libcrtdll.a : crtdll.def ;
-ImportLib libmsvcrt.a : msvcrt.def ;
-ImportLib libmsvcrt20.a : msvcrt20.def ;
-ImportLib libmsvcrt40.a : msvcrt40.def ;
-
diff --git a/winsup/mingw/main.c b/winsup/mingw/main.c
deleted file mode 100644
index 2eec16b..0000000
--- a/winsup/mingw/main.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * main.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Extra startup code for applications which do not have a main function
- * of their own (but do have a WinMain). Generally these are GUI
- * applications, but they don't *have* to be.
- *
- */
-
-#include <stdlib.h>
-#include <process.h>
-#include <windows.h>
-
-#define ISSPACE(a) (a == ' ' || a == '\t')
-
-extern int PASCAL WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
- LPSTR szCmdLine, int nShow);
-
-int
-main (int argc, char *argv[], char *environ[])
-{
- char *szCmd;
- STARTUPINFO startinfo;
- int nRet;
-
- /* Get the command line passed to the process. */
- szCmd = GetCommandLineA ();
- GetStartupInfoA (&startinfo);
-
- /* Strip off the name of the application and any leading
- * whitespace. */
- if (szCmd)
- {
- while (ISSPACE (*szCmd))
- {
- szCmd++;
- }
-
- /* On my system I always get the app name enclosed
- * in quotes... */
- if (*szCmd == '\"')
- {
- do
- {
- szCmd++;
- }
- while (*szCmd != '\"' && *szCmd != '\0');
-
- if (*szCmd == '\"')
- {
- szCmd++;
- }
- }
- else
- {
- /* If no quotes then assume first token is program
- * name. */
- while (!ISSPACE (*szCmd) && *szCmd != '\0')
- {
- szCmd++;
- }
- }
-
- while (ISSPACE (*szCmd))
- {
- szCmd++;
- }
- }
-
- nRet = WinMain (GetModuleHandle (NULL), NULL, szCmd,
- (startinfo.dwFlags & STARTF_USESHOWWINDOW) ?
- startinfo.wShowWindow : SW_SHOWDEFAULT);
-
- return nRet;
-}
-
diff --git a/winsup/mingw/man/dirname.man b/winsup/mingw/man/dirname.man
deleted file mode 100755
index 82e1a9a..0000000
--- a/winsup/mingw/man/dirname.man
+++ /dev/null
@@ -1,474 +0,0 @@
-.\" t
-.TH DIRNAME 3 04-Jan-2007 MinGW "Programmer's Reference Manual"
-.
-.SH NAME
-.
-.BR dirname ,\0 basename
-\- parse path name components
-.
-.
-.SH SYNOPSIS
-.
-.B #include
-.RB < libgen.h >
-.PP
-.B char *dirname( char
-.BI * path
-.B );
-.br
-.B char *basename( char
-.BI * path
-.B );
-.
-.
-.SH DESCRIPTION
-.
-The
-.B dirname
-and
-.B basename
-functions parse a null\-terminated path name string,
-and split it into its
-.B directory name
-and
-.B file name
-components.
-Splitting is performed on the basis of the location of the
-.B directory separator
-characters,
-which,
-for this MS\-Windows(\(tm) implementation,
-are the characters
-.RB \(dq / \(dq
-and
-.RB \(dq \e \(dq,
-each of which is interpreted as being equivalent.
-Additionally,
-if the
-.I second
-character of
-.I path
-is a colon
-.RB (\(dq : \(dq),
-the first two characters of
-.I path
-are interpreted as an MS\-Windows(\(tm) drive designator,
-which will be included in the
-.B directory name
-component of
-.IR path ,
-but is never considered to form part of the
-.B file name
-component.
-.
-.PP
-In normal usage,
-.B dirname
-returns a pointer to a string representing the path name component of
-.IR path ,
-up to but not including the rightmost directory separator,
-while
-.B basename
-returns a pointer to the component following this separator.
-Any trailing directory separators present in
-.I path
-are disregarded,
-when determining the rightmost separator,
-and, in the case of the return value from
-.BR dirname ,
-any internal sequences of recurring separator characters
-are each reduced to a single such character.
-.
-.PP
-If
-.I path
-contains no MS\-Windows(\(tm) drive designator,
-and no directory separator character,
-then
-.B dirname
-returns the string
-.RB \(dq . \(dq,
-and
-.B basename
-returns a copy of
-.IR path.
-If
-.I path
-does commence with an MS\-Windows(\(tm) drive designator,
-but contains no directory separators,
-then
-.B dirname
-returns the string
-.RB \(dq d:. \(dq,
-where
-.RB \(dq d: \(dq
-represents the drive designator,
-while
-.B basename
-returns a copy of
-.IR path ,
-with its initial two characters,
-(i.e.\ the drive designator),
-deleted.
-.
-.PP
-If
-.I path
-is a NULL pointer,
-or is a pointer to an empty string,
-then both
-.B dirname
-and
-.B basename
-return the string
-.RB \(dq . \(dq.
-.
-.PP
-If
-.I path
-is the string
-.RB \(dq / \(dq,
-or the string
-.RB \(dq \e \(dq,
-both
-.B dirname
-and
-.B basename
-return the string
-.RB \(dq / \(dq,
-or the string
-.RB \(dq \e \(dq,
-respectively.
-.
-.PP
-If
-.I path
-commences with
-.I exactly
-two directory separator characters,
-which must be similar,
-then
-.B dirname
-will preserve these two characters in the returned path name.
-This construct does not affect the string returned by
-.BR basename ,
-neither is this behaviour replicated by
-.BR dirname ,
-if
-.I path
-includes an MS\-Windows(\(tm) drive designator.
-.
-.PP
-In the special case,
-where
-.I path
-is specified as
-.I exactly
-two identical directory separator characters,
-with no MS\-Windows(\(tm) drive designator,
-and no following path name,
-.B dirname
-returns
-.I path
-unchanged;
-.B basename
-normalises the return string to only a single character,
-either
-.RB \(dq / \(dq
-or
-.RB \(dq \e \(dq,
-matching the characters used to specify
-.IR path .
-.
-.PP
-Concatenating the string returned by
-.BR dirname ,
-a
-.RB \(dq / \(dq
-or a
-.RB \(dq \e \(dq,
-and the string returned by
-.B basename
-yields a complete path name.
-.
-.PP
-The
-.B dirname
-and
-.B basename
-functions conform generally to SUSv3,
-extended to accommodate the handling of
-.RB \(dq / \(dq
-and
-.RB \(dq \e \(dq
-as alternative directory separator characters,
-and also to accommodate the likelihood of MS\-Windows(\(tm)
-drive designators appearing in any path name specification.
-The example,
-which follows,
-illustrates the conformance to SUSv3,
-and also the effects of the extended behaviour.
-.
-.
-.SH EXAMPLE
-.
-To verify the behaviour of the
-.B dirname
-and
-.B basename
-functions,
-the test program defines the following function:\(em
-.
-.PP
-.RS
-.nf
-#include <stdio.h>
-#include <string.h>
-#include <libgen.h>
-
-void result( char *path )
-{
- char *dir = strdup( path );
- char *file = strdup( path );
-
- printf( " %-15s%-15s%-12s", path, dirname( dir ),
- basename( file ) );
-
- free( dir );
- free( file );
-}
-.fi
-.RE
-.PP
-This illustrates the correct use of the
-.B dirname
-and the
-.B basename
-functions,
-with copies of the original
-.I path
-string being passed in the function calls.
-Note that the return values from each function are used immediately,
-in the
-.B printf
-call,
-and the temporary copies of
-.I path
-are discarded,
-and the associated memory is freed,
-before these go out of scope.
-.
-.PP
-Calling this example function illustrates the effect of each of the
-.B dirname
-and
-.B basename
-functions,
-for various values of
-.IR path .
-The following,
-taken from SUSv3,
-illustrate general conformance with the standard:\(em
-.RS
-.TS
-tab(!);
-lB lB lB
-lw(15n) lw(10n) lw(10n).
-\0path!\0dirname!\0basename
-\_!\_!\_
-\0/usr/lib!\0/usr!\0lib
-\0//usr//lib//!\0//usr!\0lib
-\0///usr//lib//!\0/usr!\0lib
-\0/usr/!\0/!\0usr
-\0usr!\0.!\0usr
-\0//!\0//!\0/
-\0/!\0/!\0/
-\0.!\0.!\0.
-\0..!\0.!\0..
-.TE
-.RE
-.
-.PP
-Similarly,
-for the case where path names are expressed using the MS\-Windows(\(tm)
-.RB \(dq \e \(dq
-directory separator notation,
-calling the example function displays:\(em
-.RS
-.TS
-tab(!);
-lB lB lB
-lw(15n) lw(10n) lw(10n).
-\0path!\0dirname!\0basename
-\_!\_!\_
-\0\eusr\elib!\0\eusr!\0lib
-\0\e\eusr\e\elib\e\e!\0\e\eusr!\0lib
-\0\e\e\eusr\e\elib\e\e!\0\eusr!\0lib
-\0\eusr\e!\0\e!\0usr
-\0usr!\0.!\0usr
-\0\e\e!\0\e\e!\0\e
-\0\e!\0\e!\0\e
-\0.!\0.!\0.
-\0..!\0.!\0..
-.TE
-.RE
-.
-.PP
-and,
-when an MS\-Windows(\(tm) drive designator is also specified,
-this becomes:\(em
-.RS
-.TS
-tab(!);
-lB lB lB
-lw(15n) lw(10n) lw(10n).
-\0path!\0dirname!\0basename
-\_!\_!\_
-\0d:\eusr\elib!\0d:\eusr!\0lib
-\0d:\e\eusr\e\elib\e\e!\0d:\eusr!\0lib
-\0d:\e\e\eusr\e\elib\e\e!\0d:\eusr!\0lib
-\0d:\eusr\e!\0d:\e!\0usr
-\0d:usr!\0d:.!\0usr
-\0d:\e\e!\0d:\e!\0\e
-\0d:\e!\0d:\e!\0\e
-\0d:.!\0d:.!\0.
-\0d:..!\0d:.!\0..
-.TE
-.RE
-.
-.PP
-Please note,
-in particular,
-the special handling of path names which begin with
-.I exactly
-two directory separator characters,
-and also that this special handling is suppressed
-when these two characters are dissimilar,
-or when an MS\-Windows(\(tm) drive designator is specified:\(em
-.RS
-.TS
-tab(!);
-lB lB lB
-lw(15n) lw(10n) lw(10n).
-\0path!\0dirname!\0basename
-\_!\_!\_
-\0//usr//lib//!\0//usr!\0lib
-\0\e\eusr\e\elib\e\e!\0\e\eusr!\0lib
-\0/\eusr\e\elib\e\e!\0/usr!\0lib
-\0\e/usr\e\elib\e\e!\0\eusr!\0lib
-\0d:\e\eusr\e\elib\e\e!\0d:\eusr!\0lib
-\0//!\0//!\0/
-\0\e\e!\0\e\e!\0\e
-\0/\e!\0/!\0/
-\0\e/!\0\e!\0\e
-\0d:\e\e!\0d:\e!\0\e
-.TE
-.RE
-.
-.
-.SH RETURN VALUE
-.
-The
-.B dirname
-function returns a pointer to a null terminated string,
-which represents the directory path component of the passed
-.I path
-string,
-without any trailing directory separator character,
-and with all internal sequences of directory separator characters
-normalised to a single separator at each level of directory nesting.
-.
-.PP
-The
-.B basename
-function
-returns a pointer to a null terminated string,
-which represents the rightmost element of the passed
-.I path
-string,
-with all trailing directory separator characters removed.
-.
-.PP
-If any MS\-Windows(\(tm) drive designator is specified in the input
-.I path
-string,
-it is included in the return value of the
-.B dirname
-function,
-but not in that of the
-.B basename
-function.
-.
-.
-.SH ERROR RETURNS
-.
-None.
-.
-.
-.SH CAVEATS AND BUGS
-.
-The
-.B dirname
-and
-.B basename
-functions may modify the
-.I path
-string passed to them.
-Therefore, it is an error to pass a character constant as the
-.I path
-parameter;
-to do so may result in memory violation errors,
-(segmentation faults),
-and consequent abnormal program termination.
-.PP
-Also note that,
-since the
-.I path
-argument may be modified by the
-.B dirname
-or the
-.B basename
-function call,
-if you wish to preserve the original content of
-.IR path ,
-you should pass a copy to the function.
-Furthermore,
-either function may return its result in a statically allocated buffer,
-which may be overwritten on a subsequent function call.
-.PP
-Although the
-.B dirname
-and
-.B basename
-functions parse path name strings,
-they are basically just
-.I string
-functions.
-The presence of an MS\-Windows(\(tm) drive designator is determined
-by the appearance of a colon
-.RB (\(dq : \(dq)
-as the second character of the
-.I path
-string,
-but neither function performs any check
-to ensure that the first character represents a valid file system device;
-neither is any form of validation performed,
-to ensure that the remainder of the string
-represents a valid path name.
-.
-.
-.SH AUTHOR
-.
-This manpage was written for the MinGW implementation of the
-.B dirname
-and
-.B basename
-functions by Keith\ Marshall,
-<keithmarshall@users.sourceforge.net>.
-It may copied, modified and redistributed,
-without restriction of copyright,
-provided this acknowledgement of contribution by
-the original author remains unchanged.
-.
-.
-.\" EOF
diff --git a/winsup/mingw/mingwex/Makefile.in b/winsup/mingw/mingwex/Makefile.in
deleted file mode 100644
index bf11bc6..0000000
--- a/winsup/mingw/mingwex/Makefile.in
+++ /dev/null
@@ -1,318 +0,0 @@
-#
-# mingw/mingwex/Makefile.in: This file is part of Mingw runtime.
-#
-# This makefile requires GNU make.
-
-srcdir = @srcdir@
-VPATH = $(srcdir):$(srcdir)/math:$(srcdir)/stdio:$(srcdir)/complex $(srcdir)/gdtoa
-objdir = .
-
-target_alias = @target_alias@
-prefix = @prefix@
-
-program_transform_name = @program_transform_name@
-exec_prefix = @exec_prefix@
-bindir = @bindir@
-libdir = @libdir@
-tooldir = $(exec_prefix)/$(target_alias)
-datadir = @datadir@
-infodir = @infodir@
-includedir = @includedir@
-
-SHELL = /bin/sh
-
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-mkinstalldirs = $(SHELL) $(srcdir)/../mkinstalldirs
-
-DISTFILES = \
- Makefile.in configure configure.in aclocal.m4 \
- _Exit.c atoll.c dirent.c feclearexcept.c fegetenv.c \
- fegetexceptflag.c fegetround.c feholdexcept.c feraiseexcept.c \
- fesetenv.c fesetexceptflag.c fesetround.c fetestexcept.c \
- feupdateenv.c ftruncate.c fwide.c getopt.c imaxabs.c imaxdiv.c \
- lltoa.c lltow.c mbsinit.c mingw-aligned-malloc.c \
- mingw-fseek.c sitest.c strtoimax.c strtoumax.c \
- testwmem.c tst-aligned-malloc.c ulltoa.c ulltow.c wcstof.c \
- wcstoimax.c wcstold.c wcstoumax.c wctrans.c wctype.c \
- wdirent.c wmemchr.c wmemcmp.c wmemcpy.c wmemmove.c wmemset.c wtoll.c \
- wcrtomb.c wctob.c mbrtowc.c btowc.c mb_wc_common.h \
- gettimeofday.c isblank.c iswblank.c \
- basename.c dirname.c usleep.c \
- tsearch.c twalk.c tdelete.c tfind.c
-
-MATH_DISTFILES = \
- acosf.c acosl.c asinf.c asinl.c atan2f.c atan2l.c \
- atanf.c atanl.c cbrt.c cbrtf.c cbrtl.c ceilf.S ceill.S \
- cephes_mconf.h \
- copysign.S copysignf.S copysignl.S cosf.S coshf.c coshl.c cosl.S \
- erfl.c exp2.S exp2f.S exp2l.S expf.c expl.c expm1.c expm1l.c expm1f.c \
- fabs.c fabsf.c fabsl.c \
- fdim.c fdimf.c fdiml.c floorf.S floorl.S fma.S fmaf.S fmal.c \
- fmax.c fmaxf.c fmaxl.c fmin.c fminf.c fminl.c fmodf.c \
- fmodl.c fp_consts.c fp_consts.h fp_constsf.c fp_constsl.c \
- fpclassify.c fpclassifyf.c fpclassifyl.c \
- frexpf.c frexpl.S fucom.c hypotf.c hypotl.c ilogb.S ilogbf.S \
- ilogbl.S isnan.c isnanf.c isnanl.c ldexpf.c ldexpl.c \
- lgamma.c lgammaf.c lgammal.c llrint.c llrintf.c llrintl.c \
- log10f.S log10l.S log1p.S log1pf.S log1pl.S log2.S log2f.S \
- log2l.S logb.c logbf.c logbl.c logf.S logl.S lrint.c lrintf.c \
- lrintl.c lround_generic.c modff.c modfl.c \
- nearbyint.S nearbyintf.S nearbyintl.S \
- nextafterf.c nextafterl.c nexttowardf.c nexttoward.c \
- powf.c powi.c powif.c powil.c powl.c \
- remainder.S remainderf.S remainderl.S remquo.S \
- remquof.S remquol.S rint.c rintf.c rintl.c round_internal.h \
- round_generic.c scalbn.S scalbnf.S scalbnl.S s_erf.c sf_erf.c \
- signbit.c signbitf.c signbitl.c sinf.S sinhf.c sinhl.c sinl.S \
- sqrtf.c sqrtl.c tanf.S tanhf.c tanhl.c tanl.S tgamma.c \
- tgammaf.c tgammal.c trunc.c truncf.c truncl.c \
- acosh.c acoshf.c acoshl.c asinh.c asinhf.c asinhl.c \
- atanh.c atanhf.c atanhl.c fastmath.h
-
-STDIO_DISTFILES = \
- fopen64.c fseeko64.c ftello64.c lseek64.c \
- vfscanf.c vfwscanf.c vscanf.c vsscanf.c vswscanf.c vwscanf.c \
- pformat.c pformat.h printf.c fprintf.c sprintf.c snprintf.c \
- vprintf.c vfprintf.c vsprintf.c vsnprintf.c \
- snwprintf.c vsnwprintf.c
-
-COMPLEX_DISTFILES = \
- cabs.c cabsf.c cabsl.c cacos.c cacosf.c cacosl.c cacosh.c \
- cacoshf.c cacoshl.c carg.c cargf.c cargl.c casin.c casinf.c \
- casinl.c casinh.c casinhf.c casinhl.c catan.c catanf.c catanl.c \
- catanh.c catanhf.c catanhl.c ccos.c ccosf.c ccosl.c ccosh.c \
- ccoshf.c ccoshl.c cexp.c cexpf.c cexpl.c cimag.c cimagf.c \
- cimagl.c clog.c clogf.c clogl.c cpow.c cpowf.c cpowl.c cproj.c \
- cprojf.c cprojl.c creal.c crealf.c creall.c csin.c csinf.c \
- csinl.c csinh.c csinhf.c csinhl.c csqrt.c csqrtf.c csqrtl.c \
- ctan.c ctanf.c ctanl.c ctanh.c ctanhf.c ctanhl.c
-
-GDTOA_DISTFILES = \
- arithchk.c dmisc.c dtoa.c g__fmt.c g_dfmt.c g_ffmt.c g_xfmt.c \
- gd_arith.h gd_qnan.h gdtoa.c gdtoa.h gdtoaimp.h gethex.c gmisc.c \
- hd_init.c hexnan.c misc.c qnan.c README smisc.c strtodg.c strtodnrp.c \
- strtof.c strtopx.c sum.c ulp.c
-
-CC = @CC@
-# FIXME: Which is it, CC or CC_FOR_TARGET?
-CC_FOR_TARGET = $(CC)
-AS_FOR_TARGET = $(AS)
-CFLAGS = @CFLAGS@
-CXXFLAGS = @CXXFLAGS@
-OPTFLAGS = -fomit-frame-pointer
-WARNFLAGS = -Wall
-
-
-# compiling with Cygwin?
-NO_CYGWIN := @NO_CYGWIN@
-ifdef NO_CYGWIN
-override CC := ${NO_CYGWIN} $(firstword $(filter-out ${NO_CYGWIN},${CC}))
-endif
-
-W32API_INCLUDE = @W32API_INCLUDE@
-INCLUDES = -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../include \
- -nostdinc \
- -iwithprefixbefore include
-ALL_CFLAGS = $(CFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(INCLUDES) $(W32API_INCLUDE)
-ALL_CXXFLAGS = $(CXXFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(INCLUDES) -nostdinc++ $(W32API_INCLUDE)
-
-AS = @AS@
-AR = @AR@
-LD = @LD@
-AR_FLAGS = rcv
-RANLIB = @RANLIB@
-DLLTOOL = @DLLTOOL@
-DLLTOOLFLAGS =
-DLLTOOL_FOR_TARGET = $(DLLTOOL)
-DLLTOOL_FLAGS = --as $(AS_FOR_TARGET)
-
-LIBMINGWEX_A = libmingwex.a
-
-Q8_OBJS = \
- fwide.o imaxabs.o imaxdiv.o mbsinit.o \
- strtoimax.o strtoumax.o wcstoimax.o wcstoumax.o \
- wmemchr.o wmemcmp.o wmemcpy.o wmemmove.o wmemset.o \
- wctrans.o wctype.o wcrtomb.o wctob.o mbrtowc.o btowc.o \
- wcstof.o wcstold.o
-CTYPE_OBJS = \
- isblank.o iswblank.o
-STDLIB_STUB_OBJS = \
- lltoa.o ulltoa.o \
- lltow.o ulltow.o \
- atoll.o wtoll.o \
- _Exit.o
-STDIO_OBJS = \
- fopen64.o fseeko64.o ftello64.o lseek64.o \
- vfscanf.o vfwscanf.o vscanf.o vsscanf.o vswscanf.o vwscanf.o \
- pformat.o snprintf.o vsnprintf.o snwprintf.o vsnwprintf.o \
- printf.o fprintf.o sprintf.o vprintf.o vfprintf.o vsprintf.o
-MATH_OBJS = \
- acosf.o acosl.o asinf.o asinl.o atan2f.o atan2l.o \
- atanf.o atanl.o cbrt.o cbrtf.o cbrtl.o ceilf.o ceill.o \
- copysign.o copysignf.o copysignl.o cosf.o coshf.o coshl.o cosl.o \
- erfl.o exp2.o exp2f.o exp2l.o expf.o expl.o expm1.o expm1l.o expm1f.o \
- fabs.o fabsf.o fabsl.o \
- fdim.o fdimf.o fdiml.o floorf.o floorl.o fma.o fmaf.o fmal.o \
- fmax.o fmaxf.o fmaxl.o fmin.o fminf.o fminl.o fmodf.o \
- fmodl.o fp_consts.o fp_constsf.o fp_constsl.o \
- fpclassify.o fpclassifyf.o fpclassifyl.o \
- frexpf.o frexpl.o fucom.o hypotf.o hypotl.o ilogb.o ilogbf.o \
- ilogbl.o isnan.o isnanf.o isnanl.o ldexpf.o ldexpl.o \
- lgamma.o lgammaf.o lgammal.o llrint.o llrintf.o llrintl.o \
- log10f.o log10l.o log1p.o log1pf.o log1pl.o log2.o log2f.o \
- log2l.o logb.o logbf.o logbl.o logf.o logl.o \
- lrint.o lrintf.o lrintl.o modff.o modfl.o \
- nearbyint.o nearbyintf.o nearbyintl.o \
- nextafterf.o nextafterl.o nexttowardf.o nexttoward.o \
- powf.o powi.o powif.o powil.o powl.o \
- remainder.o remainderf.o remainderl.o remquo.o \
- remquof.o remquol.o rint.o rintf.o rintl.o \
- scalbn.o scalbnf.o scalbnl.o s_erf.o sf_erf.o \
- signbit.o signbitf.o signbitl.o sinf.o sinhf.o sinhl.o sinl.o \
- sqrtf.o sqrtl.o tanf.o tanhf.o tanhl.o tanl.o tgamma.o \
- tgammaf.o tgammal.o trunc.o truncf.o truncl.o \
- acosh.o acoshf.o acoshl.o asinh.o asinhf.o asinhl.o \
- atanh.o atanhf.o atanhl.o
-MATH_ROUND_OBJS = round.o roundf.o roundl.o
-MATH_LROUND_OBJS = lround.o lroundf.o lroundl.o
-MATH_LLROUND_OBJS = llround.o llroundf.o llroundl.o
-FENV_OBJS = fesetround.o fegetround.o \
- fegetenv.o fesetenv.o feupdateenv.o \
- feclearexcept.o feholdexcept.o fegetexceptflag.o \
- feraiseexcept.o fetestexcept.o fesetexceptflag.o
-POSIX_OBJS = \
- dirent.o wdirent.o getopt.o ftruncate.o gettimeofday.o usleep.o \
- basename.o dirname.o tsearch.o twalk.o tdelete.o tfind.o
-REPLACE_OBJS = \
- mingw-aligned-malloc.o mingw-fseek.o
-COMPLEX_OBJS = \
- cabs.o cabsf.o cabsl.o cacos.o cacosf.o cacosl.o cacosh.o \
- cacoshf.o cacoshl.o carg.o cargf.o cargl.o casin.o casinf.o \
- casinl.o casinh.o casinhf.o casinhl.o catan.o catanf.o catanl.o \
- catanh.o catanhf.o catanhl.o ccos.o ccosf.o ccosl.o ccosh.o \
- ccoshf.o ccoshl.o cexp.o cexpf.o cexpl.o cimag.o cimagf.o \
- cimagl.o clog.o clogf.o clogl.o cpow.o cpowf.o cpowl.o cproj.o \
- cprojf.o cprojl.o creal.o crealf.o creall.o csin.o csinf.o \
- csinl.o csinh.o csinhf.o csinhl.o csqrt.o csqrtf.o csqrtl.o \
- ctan.o ctanf.o ctanl.o ctanh.o ctanhf.o ctanhl.o
-GDTOA_OBJS = \
- dmisc.o dtoa.o g__fmt.o g_dfmt.o g_ffmt.o g_xfmt.o gdtoa.o \
- gethex.o gmisc.o hd_init.o hexnan.o misc.o smisc.o \
- strtodg.o strtodnrp.o strtof.o strtopx.o sum.o ulp.o
-
-LIB_OBJS = $(Q8_OBJS) $(CTYPE_OBJS) $(STDLIB_STUB_OBJS) \
- $(STDIO_OBJS) $(MATH_OBJS) $(MATH_ROUND_OBJS) \
- $(MATH_LROUND_OBJS) $(MATH_LLROUND_OBJS) $(FENV_OBJS) \
- $(POSIX_OBJS) $(REPLACE_OBJS) $(COMPLEX_OBJS) \
- $(GDTOA_OBJS)
-
-LIBS = $(LIBMINGWEX_A)
-DLLS =
-
-all: $(LIBMINGWEX_A)
-
-$(LIBMINGWEX_A): $(LIB_OBJS)
- rm -f $(LIBMINGWEX_A)
- $(AR) $(ARFLAGS) $@ $(LIB_OBJS)
- $(RANLIB) $@
-
-$(MATH_ROUND_OBJS): round_generic.c
- $(CC) $(ALL_CFLAGS) -I$(srcdir)/math -c -o $@ \
- -D FUNCTION=$* $(srcdir)/math/round_generic.c
-
-$(MATH_LROUND_OBJS) $(MATH_LLROUND_OBJS): lround_generic.c
- $(CC) $(ALL_CFLAGS) -I$(srcdir)/math -c -o $@ \
- -D FUNCTION=$* $(srcdir)/math/lround_generic.c
-
-Makefile: Makefile.in config.status configure
- $(SHELL) config.status
-
-config.status: configure
- $(SHELL) config.status --recheck
-
-info:
-
-info-html:
-
-install-info: info
-
-install: all
- $(mkinstalldirs) $(inst_libdir)
- for i in $(LIBS); do \
- $(INSTALL_DATA) $$i $(inst_libdir)/$$i ; \
- done
-
-clean:
- -rm -f $(LIB_OBJS) $(LIBMINGWEX_A)
-
-distclean:
- -rm -f *.o *.a *~ core a.out
- -rm -f config.cache config.status config.log
- -rm -f Makefile
-.c.o:
- $(CC) -c $(ALL_CFLAGS) $< -o $@
-.S.o:
- $(CC) -c $< -o $@
-.s.o:
- $(CC) -c $< -o $@
-
-# pformat.o needs an explicit build rule; we always build it
-# assuming __MSVCRT_VERSION__ >= 0x0800, relying on ofmt_stub.s
-# (in the parent directory) to maintain forward compatibility
-# for earlier versions of MSVCRT.DLL
-#
-PFORMAT_CFLAGS = $(ALL_CFLAGS) -I $(srcdir)/gdtoa -D__MSVCRT_VERSION__=0x0800
-pformat.o: pformat.c pformat.h
- $(CC) -c $(PFORMAT_CFLAGS) $(srcdir)/stdio/$*.c -o $@
-
-#
-# Dependencies
-#
-wdirent.o: $(srcdir)/dirent.c $(srcdir)/wdirent.c
-
-acosh.o acoshf.o acoshl.o \
-asinh.o asinhf.o asinhl.o \
-atanh.o atanhf.o atanhl.o: fastmath.h
-mbrtowc.o wcrtomb.o wcstof.o wcstold.o: mb_wc_common.h
-
-$(GDTOA_OBJS): gd_arith.h gdtoa.h gdtoaimp.h gd_qnan.h
-
-$(MATH_ROUND_OBJS) $(MATH_LROUND_OBJS) $(MATH_LLROUND_OBJS): round_internal.h
-
-printf.o: printf.c pformat.h
-fprintf.o: fprintf.c pformat.h
-sprintf.o: sprintf.c pformat.h
-snprintf.o: snprintf.c pformat.h
-vprintf.o: vprintf.c pformat.h
-vfprintf.o: vfprintf.c pformat.h
-vsprintf.o: vsprintf.c pformat.h
-vsnprintf.o: vsnprintf.c pformat.h
-
-dist:
- mkdir $(distdir)/mingwex
- chmod 755 $(distdir)/mingwex
- @for i in $(DISTFILES); do\
- cp -p $(srcdir)/$$i $(distdir)/mingwex/$$i ; \
- done
- mkdir $(distdir)/mingwex/math
- chmod 755 $(distdir)/mingwex/math
- @for i in $(MATH_DISTFILES); do\
- cp -p $(srcdir)/math/$$i $(distdir)/mingwex/math/$$i ; \
- done
- mkdir $(distdir)/mingwex/stdio
- chmod 755 $(distdir)/mingwex/stdio
- @for i in $(STDIO_DISTFILES); do\
- cp -p $(srcdir)/stdio/$$i $(distdir)/mingwex/stdio/$$i ; \
- done
- mkdir $(distdir)/mingwex/complex
- chmod 755 $(distdir)/mingwex/complex
- @for i in $(COMPLEX_DISTFILES); do\
- cp -p $(srcdir)/complex/$$i $(distdir)/mingwex/complex/$$i ; \
- done
- mkdir $(distdir)/mingwex/gdtoa
- chmod 755 $(distdir)/mingwex/gdtoa
- @for i in $(GDTOA_DISTFILES); do\
- cp -p $(srcdir)/gdtoa/$$i $(distdir)/mingwex/gdtoa/$$i ; \
- done
diff --git a/winsup/mingw/mingwex/_Exit.c b/winsup/mingw/mingwex/_Exit.c
deleted file mode 100644
index 38f7e18..0000000
--- a/winsup/mingw/mingwex/_Exit.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <stdlib.h>
-void _Exit(int status)
- { _exit(status); }
diff --git a/winsup/mingw/mingwex/aclocal.m4 b/winsup/mingw/mingwex/aclocal.m4
deleted file mode 100644
index 177c013..0000000
--- a/winsup/mingw/mingwex/aclocal.m4
+++ /dev/null
@@ -1,831 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-# lib-prefix.m4 serial 4 (gettext-0.14.2)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
-dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
-dnl require excessive bracketing.
-ifdef([AC_HELP_STRING],
-[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
-[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
-
-dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
-dnl to access previously installed libraries. The basic assumption is that
-dnl a user will want packages to use other packages he previously installed
-dnl with the same --prefix option.
-dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
-dnl libraries, but is otherwise very convenient.
-AC_DEFUN([AC_LIB_PREFIX],
-[
- AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib-prefix],
-[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
- --without-lib-prefix don't search for libraries in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
- fi
- fi
-])
- if test $use_additional = yes; then
- dnl Potentially add $additional_includedir to $CPPFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's already present in $CPPFLAGS,
- dnl 3. if it's /usr/local/include and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- for x in $CPPFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $CPPFLAGS.
- CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- dnl Potentially add $additional_libdir to $LDFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's already present in $LDFLAGS,
- dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
- haveit=
- for x in $LDFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_libdir" = "X/usr/local/lib"; then
- if test -n "$GCC"; then
- case $host_os in
- linux*) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LDFLAGS.
- LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- fi
-])
-
-dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
-dnl acl_final_exec_prefix, containing the values to which $prefix and
-dnl $exec_prefix will expand at the end of the configure script.
-AC_DEFUN([AC_LIB_PREPARE_PREFIX],
-[
- dnl Unfortunately, prefix and exec_prefix get only finally determined
- dnl at the end of configure.
- if test "X$prefix" = "XNONE"; then
- acl_final_prefix="$ac_default_prefix"
- else
- acl_final_prefix="$prefix"
- fi
- if test "X$exec_prefix" = "XNONE"; then
- acl_final_exec_prefix='${prefix}'
- else
- acl_final_exec_prefix="$exec_prefix"
- fi
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
- prefix="$acl_save_prefix"
-])
-
-dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
-dnl variables prefix and exec_prefix bound to the values they will have
-dnl at the end of the configure script.
-AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
-[
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- acl_save_exec_prefix="$exec_prefix"
- exec_prefix="$acl_final_exec_prefix"
- $1
- exec_prefix="$acl_save_exec_prefix"
- prefix="$acl_save_prefix"
-])
-
-# lib-link.m4 serial 6 (gettext-0.14.3)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_PREREQ(2.50)
-
-dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
-dnl augments the CPPFLAGS variable.
-AC_DEFUN([AC_LIB_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
- ac_cv_lib[]Name[]_libs="$LIB[]NAME"
- ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
- ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
- ])
- LIB[]NAME="$ac_cv_lib[]Name[]_libs"
- LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
- INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
- dnl results of this search when this library appears as a dependency.
- HAVE_LIB[]NAME=yes
- undefine([Name])
- undefine([NAME])
-])
-
-dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
-dnl searches for libname and the libraries corresponding to explicit and
-dnl implicit dependencies, together with the specified include files and
-dnl the ability to compile and link the specified testcode. If found, it
-dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
-dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
-dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
-dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
-AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-
- dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
- dnl accordingly.
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
-
- dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
- dnl because if the user has installed lib[]Name and not disabled its use
- dnl via --without-lib[]Name-prefix, he wants to use it.
- ac_save_CPPFLAGS="$CPPFLAGS"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-
- AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS $LIB[]NAME"
- AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
- LIBS="$ac_save_LIBS"
- ])
- if test "$ac_cv_lib[]Name" = yes; then
- HAVE_LIB[]NAME=yes
- AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
- AC_MSG_CHECKING([how to link with lib[]$1])
- AC_MSG_RESULT([$LIB[]NAME])
- else
- HAVE_LIB[]NAME=no
- dnl If $LIB[]NAME didn't lead to a usable library, we don't need
- dnl $INC[]NAME either.
- CPPFLAGS="$ac_save_CPPFLAGS"
- LIB[]NAME=
- LTLIB[]NAME=
- fi
- AC_SUBST([HAVE_LIB]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- undefine([Name])
- undefine([NAME])
-])
-
-dnl Determine the platform dependent parameters needed to use rpath:
-dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
-dnl hardcode_direct, hardcode_minus_L.
-AC_DEFUN([AC_LIB_RPATH],
-[
- dnl Tell automake >= 1.10 to complain if config.rpath is missing.
- m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
- AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
- AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
- AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
- AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
- CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
- ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
- . ./conftest.sh
- rm -f ./conftest.sh
- acl_cv_rpath=done
- ])
- wl="$acl_cv_wl"
- libext="$acl_cv_libext"
- shlibext="$acl_cv_shlibext"
- hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
- hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
- hardcode_direct="$acl_cv_hardcode_direct"
- hardcode_minus_L="$acl_cv_hardcode_minus_L"
- dnl Determine whether the user wants rpath handling at all.
- AC_ARG_ENABLE(rpath,
- [ --disable-rpath do not hardcode runtime library paths],
- :, enable_rpath=yes)
-])
-
-dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
-AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
-[
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib$1-prefix],
-[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
- --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
- fi
- fi
-])
- dnl Search the library and its dependencies in $additional_libdir and
- dnl $LDFLAGS. Using breadth-first-seach.
- LIB[]NAME=
- LTLIB[]NAME=
- INC[]NAME=
- rpathdirs=
- ltrpathdirs=
- names_already_handled=
- names_next_round='$1 $2'
- while test -n "$names_next_round"; do
- names_this_round="$names_next_round"
- names_next_round=
- for name in $names_this_round; do
- already_handled=
- for n in $names_already_handled; do
- if test "$n" = "$name"; then
- already_handled=yes
- break
- fi
- done
- if test -z "$already_handled"; then
- names_already_handled="$names_already_handled $name"
- dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
- dnl or AC_LIB_HAVE_LINKFLAGS call.
- uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
- eval value=\"\$HAVE_LIB$uppername\"
- if test -n "$value"; then
- if test "$value" = yes; then
- eval value=\"\$LIB$uppername\"
- test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
- eval value=\"\$LTLIB$uppername\"
- test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
- else
- dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
- dnl that this library doesn't exist. So just drop it.
- :
- fi
- else
- dnl Search the library lib$name in $additional_libdir and $LDFLAGS
- dnl and the already constructed $LIBNAME/$LTLIBNAME.
- found_dir=
- found_la=
- found_so=
- found_a=
- if test $use_additional = yes; then
- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
- found_dir="$additional_libdir"
- found_so="$additional_libdir/lib$name.$shlibext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- else
- if test -f "$additional_libdir/lib$name.$libext"; then
- found_dir="$additional_libdir"
- found_a="$additional_libdir/lib$name.$libext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- fi
- fi
- fi
- if test "X$found_dir" = "X"; then
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- case "$x" in
- -L*)
- dir=`echo "X$x" | sed -e 's/^X-L//'`
- if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
- found_dir="$dir"
- found_so="$dir/lib$name.$shlibext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- else
- if test -f "$dir/lib$name.$libext"; then
- found_dir="$dir"
- found_a="$dir/lib$name.$libext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- fi
- fi
- ;;
- esac
- if test "X$found_dir" != "X"; then
- break
- fi
- done
- fi
- if test "X$found_dir" != "X"; then
- dnl Found the library.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
- if test "X$found_so" != "X"; then
- dnl Linking with a shared library. We attempt to hardcode its
- dnl directory into the executable's runpath, unless it's the
- dnl standard /usr/lib.
- if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
- dnl No hardcoding is needed.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $found_dir"
- fi
- dnl The hardcoding into $LIBNAME is system dependent.
- if test "$hardcode_direct" = yes; then
- dnl Using DIR/libNAME.so during linking hardcodes DIR into the
- dnl resulting binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $found_dir"
- fi
- else
- dnl Rely on "-L$found_dir".
- dnl But don't add it if it's already contained in the LDFLAGS
- dnl or the already constructed $LIBNAME
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
- fi
- if test "$hardcode_minus_L" != no; then
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
- dnl here, because this doesn't fit in flags passed to the
- dnl compiler. So give up. No hardcoding. This affects only
- dnl very old systems.
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- fi
- else
- if test "X$found_a" != "X"; then
- dnl Linking with a static library.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
- else
- dnl We shouldn't come here, but anyway it's good to have a
- dnl fallback.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
- fi
- fi
- dnl Assume the include files are nearby.
- additional_includedir=
- case "$found_dir" in
- */lib | */lib/)
- basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
- additional_includedir="$basedir/include"
- ;;
- esac
- if test "X$additional_includedir" != "X"; then
- dnl Potentially add $additional_includedir to $INCNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's /usr/local/include and we are using GCC on Linux,
- dnl 3. if it's already present in $CPPFLAGS or the already
- dnl constructed $INCNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- for x in $CPPFLAGS $INC[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $INCNAME.
- INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- fi
- dnl Look for dependencies.
- if test -n "$found_la"; then
- dnl Read the .la file. It defines the variables
- dnl dlname, library_names, old_library, dependency_libs, current,
- dnl age, revision, installed, dlopen, dlpreopen, libdir.
- save_libdir="$libdir"
- case "$found_la" in
- */* | *\\*) . "$found_la" ;;
- *) . "./$found_la" ;;
- esac
- libdir="$save_libdir"
- dnl We use only dependency_libs.
- for dep in $dependency_libs; do
- case "$dep" in
- -L*)
- additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
- dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 3. if it's already present in $LDFLAGS or the already
- dnl constructed $LIBNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
- haveit=
- if test "X$additional_libdir" = "X/usr/local/lib"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LIBNAME.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- haveit=
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LTLIBNAME.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- ;;
- -R*)
- dir=`echo "X$dep" | sed -e 's/^X-R//'`
- if test "$enable_rpath" != no; then
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $dir"
- fi
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $dir"
- fi
- fi
- ;;
- -l*)
- dnl Handle this in the next round.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
- ;;
- *.la)
- dnl Handle this in the next round. Throw away the .la's
- dnl directory; it is already contained in a preceding -L
- dnl option.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
- ;;
- *)
- dnl Most likely an immediate library name.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
- ;;
- esac
- done
- fi
- else
- dnl Didn't find the library; assume it is in the system directories
- dnl known to the linker and runtime loader. (All the system
- dnl directories known to the linker should also be known to the
- dnl runtime loader, otherwise the system is severely misconfigured.)
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- done
- done
- if test "X$rpathdirs" != "X"; then
- if test -n "$hardcode_libdir_separator"; then
- dnl Weird platform: only the last -rpath option counts, the user must
- dnl pass all path elements in one option. We can arrange that for a
- dnl single library, but not when more than one $LIBNAMEs are used.
- alldirs=
- for found_dir in $rpathdirs; do
- alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
- done
- dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
- acl_save_libdir="$libdir"
- libdir="$alldirs"
- eval flag=\"$hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- else
- dnl The -rpath options are cumulative.
- for found_dir in $rpathdirs; do
- acl_save_libdir="$libdir"
- libdir="$found_dir"
- eval flag=\"$hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- done
- fi
- fi
- if test "X$ltrpathdirs" != "X"; then
- dnl When using libtool, the option that works for both libraries and
- dnl executables is -R. The -R options are cumulative.
- for found_dir in $ltrpathdirs; do
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
- done
- fi
-])
-
-dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
-dnl unless already present in VAR.
-dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
-dnl contains two or three consecutive elements that belong together.
-AC_DEFUN([AC_LIB_APPENDTOVAR],
-[
- for element in [$2]; do
- haveit=
- for x in $[$1]; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X$element"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- [$1]="${[$1]}${[$1]:+ }$element"
- fi
- done
-])
-
-# lib-ld.m4 serial 3 (gettext-0.13)
-dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
-
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
-AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- acl_cv_prog_gnu_ld=yes ;;
-*)
- acl_cv_prog_gnu_ld=no ;;
-esac])
-with_gnu_ld=$acl_cv_prog_gnu_ld
-])
-
-dnl From libtool-1.4. Sets the variable LD.
-AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- [re_direlt='/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(acl_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- acl_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break ;;
- *)
- test "$with_gnu_ld" != yes && break ;;
- esac
- fi
- done
- IFS="$ac_save_ifs"
-else
- acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$acl_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_LIB_PROG_LD_GNU
-])
-
diff --git a/winsup/mingw/mingwex/atoll.c b/winsup/mingw/mingwex/atoll.c
deleted file mode 100644
index 97920b4..0000000
--- a/winsup/mingw/mingwex/atoll.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <stdlib.h>
-long long atoll (const char * _c)
- { return _atoi64 (_c); }
diff --git a/winsup/mingw/mingwex/basename.c b/winsup/mingw/mingwex/basename.c
deleted file mode 100755
index c531cab..0000000
--- a/winsup/mingw/mingwex/basename.c
+++ /dev/null
@@ -1,167 +0,0 @@
-/* basename.c
- *
- * $Id$
- *
- * Provides an implementation of the "basename" function, conforming
- * to SUSv3, with extensions to accommodate Win32 drive designators,
- * and suitable for use on native Microsoft(R) Win32 platforms.
- *
- * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- *
- * This is free software. You may redistribute and/or modify it as you
- * see fit, without restriction of copyright.
- *
- * This software is provided "as is", in the hope that it may be useful,
- * but WITHOUT WARRANTY OF ANY KIND, not even any implied warranty of
- * MERCHANTABILITY, nor of FITNESS FOR ANY PARTICULAR PURPOSE. At no
- * time will the author accept any form of liability for any damages,
- * however caused, resulting from the use of this software.
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <libgen.h>
-#include <locale.h>
-
-#ifndef __cdecl /* If compiling on any non-Win32 platform ... */
-#define __cdecl /* this may not be defined. */
-#endif
-
-__cdecl char *basename( char *path )
-{
- size_t len;
- static char *retfail = NULL;
-
- /* to handle path names for files in multibyte character locales,
- * we need to set up LC_CTYPE to match the host file system locale
- */
-
- char *locale = setlocale( LC_CTYPE, NULL );
- if( locale != NULL ) locale = strdup( locale );
- setlocale( LC_CTYPE, "" );
-
- if( path && *path )
- {
- /* allocate sufficient local storage space,
- * in which to create a wide character reference copy of path
- */
-
- wchar_t refcopy[1 + (len = mbstowcs( NULL, path, 0 ))];
-
- /* create the wide character reference copy of path,
- * and step over the drive designator, if present ...
- */
-
- wchar_t *refpath = refcopy;
- if( ((len = mbstowcs( refpath, path, len )) > 1) && (refpath[1] == L':') )
- {
- /* FIXME: maybe should confirm *refpath is a valid drive designator */
-
- refpath += 2;
- }
-
- /* ensure that our wide character reference path is NUL terminated */
-
- refcopy[ len ] = L'\0';
-
- /* check again, just to ensure we still have a non-empty path name ... */
-
- if( *refpath )
- {
- /* and, when we do, process it in the wide character domain ...
- * scanning from left to right, to the char after the final dir separator
- */
-
- wchar_t *refname;
- for( refname = refpath ; *refpath ; ++refpath )
- {
- if( (*refpath == L'/') || (*refpath == L'\\') )
- {
- /* we found a dir separator ...
- * step over it, and any others which immediately follow it
- */
-
- while( (*refpath == L'/') || (*refpath == L'\\') )
- ++refpath;
-
- /* if we didn't reach the end of the path string ... */
-
- if( *refpath )
-
- /* then we have a new candidate for the base name */
-
- refname = refpath;
-
- /* otherwise ...
- * strip off any trailing dir separators which we found
- */
-
- else while( (refpath > refname)
- && ((*--refpath == L'/') || (*refpath == L'\\')) )
- *refpath = L'\0';
- }
- }
-
- /* in the wide character domain ...
- * refname now points at the resolved base name ...
- */
-
- if( *refname )
- {
- /* if it's not empty,
- * then we transform the full normalised path back into
- * the multibyte character domain, and skip over the dirname,
- * to return the resolved basename.
- */
-
- if( (len = wcstombs( path, refcopy, len )) != (size_t)(-1) )
- path[ len ] = '\0';
- *refname = L'\0';
- if( (len = wcstombs( NULL, refcopy, 0 )) != (size_t)(-1) )
- path += len;
- }
-
- else
- {
- /* the basename is empty, so return the default value of "/",
- * transforming from wide char to multibyte char domain, and
- * returning it in our own buffer.
- */
-
- retfail = realloc( retfail, len = 1 + wcstombs( NULL, L"/", 0 ));
- wcstombs( path = retfail, L"/", len );
- }
-
- /* restore the caller's locale, clean up, and return the result */
-
- setlocale( LC_CTYPE, locale );
- free( locale );
- return( path );
- }
-
- /* or we had an empty residual path name, after the drive designator,
- * in which case we simply fall through ...
- */
- }
-
- /* and, if we get to here ...
- * the path name is either NULL, or it decomposes to an empty string;
- * in either case, we return the default value of "." in our own buffer,
- * reloading it with the correct value, transformed from the wide char
- * to the multibyte char domain, just in case the caller trashed it
- * after a previous call.
- */
-
- retfail = realloc( retfail, len = 1 + wcstombs( NULL, L".", 0 ));
- wcstombs( retfail, L".", len );
-
- /* restore the caller's locale, clean up, and return the result */
-
- setlocale( LC_CTYPE, locale );
- free( locale );
- return( retfail );
-}
-
-/* $RCSfile$$Revision$: end of file */
diff --git a/winsup/mingw/mingwex/btowc.c b/winsup/mingw/mingwex/btowc.c
deleted file mode 100755
index 26b8870..0000000
--- a/winsup/mingw/mingwex/btowc.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#include "mb_wc_common.h"
-#include <wchar.h>
-#include <stdio.h>
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
-wint_t btowc (int c)
-{
- if (c == EOF)
- return (WEOF);
- else
- {
- unsigned char ch = c;
- wchar_t wc = WEOF;
- MultiByteToWideChar (get_codepage(), MB_ERR_INVALID_CHARS,
- (char*)&ch, 1, &wc, 1);
- return wc;
- }
-}
diff --git a/winsup/mingw/mingwex/complex/cabs.c b/winsup/mingw/mingwex/complex/cabs.c
deleted file mode 100644
index ff547dd..0000000
--- a/winsup/mingw/mingwex/complex/cabs.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <math.h>
-#include <complex.h>
-
-double cabs (double complex Z)
-{
- return _hypot ( __real__ Z, __imag__ Z);
-}
diff --git a/winsup/mingw/mingwex/complex/cabsf.c b/winsup/mingw/mingwex/complex/cabsf.c
deleted file mode 100755
index 452e88f..0000000
--- a/winsup/mingw/mingwex/complex/cabsf.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <math.h>
-#include <complex.h>
-
-float cabsf (float complex Z)
-{
- return (float) _hypot ( __real__ Z, __imag__ Z);
-}
diff --git a/winsup/mingw/mingwex/complex/cabsl.c b/winsup/mingw/mingwex/complex/cabsl.c
deleted file mode 100755
index 3312465..0000000
--- a/winsup/mingw/mingwex/complex/cabsl.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <math.h>
-#include <complex.h>
-
-long double cabsl (long double complex Z)
-{
- return hypotl ( __real__ Z, __imag__ Z);
-}
diff --git a/winsup/mingw/mingwex/complex/cacos.c b/winsup/mingw/mingwex/complex/cacos.c
deleted file mode 100644
index 265cba0..0000000
--- a/winsup/mingw/mingwex/complex/cacos.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- cacos.c
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-#include <math.h>
-#include <complex.h>
-
-#if 0
-/* cacos (Z) = -I * clog(Z + I * csqrt(1 - Z * Z)) */
-
-double complex cacos (double complex Z)
-{
- double complex Res;
- double x, y;
-
- x = __real__ Z;
- y = __imag__ Z;
-
- if (y == 0.0)
- {
- __real__ Res = acos (x);
- __imag__ Res = 0.0;
- }
-
- else
- {
- double complex ZZ;
- /* Z * Z = ((x - y) * (x + y)) + (2.0 * x * y) * I */
- /* caculate 1 - Z * Z */
- __real__ ZZ = 1.0 - (x - y) * (x + y);
- __imag__ ZZ = -2.0 * x * y;
-
-
- Res = csqrt(ZZ);
-
- /* calculate ZZ + I * sqrt (ZZ) */
-
- __real__ ZZ = x - __imag__ Res;
- __imag__ ZZ = y + __real__ Res;
-
- ZZ = clog(ZZ);
-
- /* mult by -I */
-
- __real__ Res = __imag__ ZZ;
- __imag__ Res = - __real__ ZZ;
- }
- return Res;
-}
-
-#else
-
-/* cacos ( Z ) = pi/2 - casin ( Z ) */
-
-double complex cacos (double complex Z)
-{
- double complex Res = casin (Z);
- __real__ Res = M_PI_2 - __real__ Res;
- __imag__ Res = - __imag__ Res;
- return Res;
-}
-#endif
-
-#if 0
-#include <stdio.h>
-int main()
-{
- double z;
- double complex bar = 0.7 + 1.2 * I;
- double complex foo = cacos (bar);
-
- printf ("%.16e\t%.16e\n", __real__ foo, __imag__ foo);
-
- foo = cacos (bar);
- printf ("%.16e\t%.16e\n", __real__ foo, __imag__ foo);
-
- return 1;
-}
-#endif
-
diff --git a/winsup/mingw/mingwex/complex/cacosf.c b/winsup/mingw/mingwex/complex/cacosf.c
deleted file mode 100755
index f2fbbd9..0000000
--- a/winsup/mingw/mingwex/complex/cacosf.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- cacosf.c
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-#include <math.h>
-#include <complex.h>
-
-#if 0
-/* cacos (Z) = -I * clog(Z + I * csqrt(1 - Z * Z)) */
-
-float complex cacos (float complex Z)
-{
- float complex Res;
- float x, y;
-
- x = __real__ Z;
- y = __imag__ Z;
-
- if (y == 0.0f)
- {
- __real__ Res = acosf (x);
- __imag__ Res = 0.0f;
- }
-
- else
- {
- float complex ZZ;
- /* Z * Z = ((x - y) * (x + y)) + (2.0 * x * y) * I */
- /* caculate 1 - Z * Z */
- __real__ ZZ = 1.0f - (x - y) * (x + y);
- __imag__ ZZ = -2.0f * x * y;
-
-
- Res = csqrtf(ZZ);
-
- /* calculate ZZ + I * sqrt (ZZ) */
-
- __real__ ZZ = x - __imag__ Res;
- __imag__ ZZ = y + __real__ Res;
-
- ZZ = clog(ZZ);
-
- /* mult by -I */
-
- __real__ Res = __imag__ ZZ;
- __imag__ Res = - __real__ ZZ;
- }
- return Res;
-}
-
-#else
-
-/* cacos ( Z ) = pi/2 - casin ( Z ) */
-
-float complex cacosf (float complex Z)
-{
- float complex Res = casinf (Z);
- __real__ Res = M_PI_2 - __real__ Res;
- __imag__ Res = - __imag__ Res;
- return Res;
-}
-#endif
diff --git a/winsup/mingw/mingwex/complex/cacosh.c b/winsup/mingw/mingwex/complex/cacosh.c
deleted file mode 100644
index 34469cb..0000000
--- a/winsup/mingw/mingwex/complex/cacosh.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- cacosh.c
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-#include <math.h>
-#include <complex.h>
-
-#if 0
-/* cacosh (z) = I * cacos (z) */
-double complex cacosh (double complex Z)
-{
- double complex Tmp;
- double complex Res;
-
- Tmp = cacos (Z);
- __real__ Res = -__imag__ Tmp;
- __imag__ Res = __real__ Tmp;
- return Res;
-}
-
-#else
-
-/* cacosh (z) = I * cacos (z) = I * (pi/2 - casin (z)) */
-
-double complex cacosh (double complex Z)
-{
- double complex Tmp;
- double complex Res;
-
- Tmp = casin (Z);
- __real__ Res = __imag__ Tmp;
- __imag__ Res = M_PI_2 - __real__ Tmp;
- return Res;
-}
-#endif
diff --git a/winsup/mingw/mingwex/complex/cacoshf.c b/winsup/mingw/mingwex/complex/cacoshf.c
deleted file mode 100755
index 411afb3..0000000
--- a/winsup/mingw/mingwex/complex/cacoshf.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- cacoshf.c
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-#include <math.h>
-#include <complex.h>
-
-#if 0
-/* cacoshf (z) = I * cacos (z) */
-float complex cacosh (float complex Z)
-{
- float complex Tmp;
- float complex Res;
-
- Tmp = cacosf (Z);
- __real__ Res = -__imag__ Tmp;
- __imag__ Res = __real__ Tmp;
- return Res;
-}
-
-#else
-
-/* cacosh (z) = I * cacos (z) = I * (pi/2 - casin (z)) */
-
-float complex cacoshf (float complex Z)
-{
- float complex Tmp;
- float complex Res;
-
- Tmp = casinf (Z);
- __real__ Res = __imag__ Tmp;
- __imag__ Res = M_PI_2 - __real__ Tmp;
- return Res;
-}
-#endif
diff --git a/winsup/mingw/mingwex/complex/cacoshl.c b/winsup/mingw/mingwex/complex/cacoshl.c
deleted file mode 100755
index 7f482c4..0000000
--- a/winsup/mingw/mingwex/complex/cacoshl.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- cacoshl.c
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-
-#if 0
-/* cacosh (z) = I * cacos (z) */
-long double complex cacoshl (long double complex Z)
-{
- long double complex Tmp;
- long double complex Res;
-
- Tmp = cacosl (Z);
- __real__ Res = -__imag__ Tmp;
- __imag__ Res = __real__ Tmp;
- return Res;
-}
-
-#else
-
-/* cacosh (z) = I * cacos (z) = I * (pi/2 - casin (z)) */
-#ifndef _M_PI_2L
-#define _M_PI_2L 1.5707963267948966192313L
-#endif
-long double complex cacoshl (long double complex Z)
-{
- long double complex Tmp;
- long double complex Res;
-
- Tmp = casinl (Z);
- __real__ Res = __imag__ Tmp;
- __imag__ Res = _M_PI_2L - __real__ Tmp;
- return Res;
-}
-#endif
diff --git a/winsup/mingw/mingwex/complex/cacosl.c b/winsup/mingw/mingwex/complex/cacosl.c
deleted file mode 100755
index c8e0b6e..0000000
--- a/winsup/mingw/mingwex/complex/cacosl.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- cacosl.c
- Contributed by Danny Smith
- 2004-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-
-#if 0
-/* cacos (Z) = -I * clog(Z + I * csqrt(1 - Z * Z)) */
-
-long double complex cacosl (long double complex Z)
-{
- long double complex Res;
- long double x, y;
-
- x = __real__ Z;
- y = __imag__ Z;
-
- if (y == 0.0L)
- {
- __real__ Res = acosl (x);
- __imag__ Res = 0.0L;
- }
-
- else
- {
- long double complex ZZ;
- /* Z * Z = ((x - y) * (x + y)) + (2.0 * x * y) * I */
- /* caculate 1 - Z * Z */
- __real__ ZZ = 1.0L - (x - y) * (x + y);
- __imag__ ZZ = -2.0L * x * y;
-
-
- Res = csqrtl(ZZ);
-
- /* calculate ZZ + I * sqrt (ZZ) */
-
- __real__ ZZ = x - __imag__ Res;
- __imag__ ZZ = y + __real__ Res;
-
- ZZ = clogl(ZZ);
-
- /* mult by -I */
-
- __real__ Res = __imag__ ZZ;
- __imag__ Res = - __real__ ZZ;
- }
- return Res;
-}
-
-#else
-
-/* cacos ( Z ) = pi/2 - casin ( Z ) */
-#ifndef _M_PI_2L
-#define _M_PI_2L 1.5707963267948966192313L
-#endif
-long double complex cacosl (long double complex Z)
-{
- long double complex Res = casinl (Z);
- __real__ Res = _M_PI_2L - __real__ Res;
- __imag__ Res = - __imag__ Res;
- return Res;
-}
-#endif
diff --git a/winsup/mingw/mingwex/complex/carg.c b/winsup/mingw/mingwex/complex/carg.c
deleted file mode 100755
index cb47acc..0000000
--- a/winsup/mingw/mingwex/complex/carg.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <complex.h>
-double __attribute__ ((const)) carg (double _Complex _Z)
-{
- double res;
- __asm__ ("fpatan;"
- : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
- return res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/cargf.c b/winsup/mingw/mingwex/complex/cargf.c
deleted file mode 100755
index 360beef..0000000
--- a/winsup/mingw/mingwex/complex/cargf.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <complex.h>
-float __attribute__ ((const)) cargf (float _Complex _Z)
-{
- float res;
- __asm__ ("fpatan;"
- : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
- return res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/cargl.c b/winsup/mingw/mingwex/complex/cargl.c
deleted file mode 100755
index 179dae7..0000000
--- a/winsup/mingw/mingwex/complex/cargl.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <complex.h>
-long double __attribute__ ((const)) cargl (long double _Complex _Z)
-{
- long double res;
- __asm__ ("fpatan;"
- : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)");
- return res;
-}
diff --git a/winsup/mingw/mingwex/complex/casin.c b/winsup/mingw/mingwex/complex/casin.c
deleted file mode 100644
index cd79767..0000000
--- a/winsup/mingw/mingwex/complex/casin.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- casin.c
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* casin (Z ) = -I * clog(I * Z + csqrt (1.0 - Z * Z))) */
-
-double complex casin (double complex Z)
-{
- double complex Res;
- double x, y;
-
- x = __real__ Z;
- y = __imag__ Z;
-
- if (y == 0.0)
- {
- __real__ Res = asin (x);
- __imag__ Res = 0.0;
- }
- else /* -I * clog(I * Z + csqrt(1.0 - Z * Z))) */
- {
- double complex ZZ;
-
- /* Z * Z = ((x - y) * (x + y)) + (2.0 * x * y) * I */
- /* calculate 1 - Z * Z */
- __real__ ZZ = 1.0 - (x - y) * (x + y);
- __imag__ ZZ = -2.0 * x * y;
- ZZ = csqrt (ZZ);
-
-
- /* add I * Z to ZZ */
-
- __real__ ZZ -= y;
- __imag__ ZZ += x;
-
- ZZ = clog (ZZ);
-
- /* mult by -I */
- __real__ Res = __imag__ ZZ;
- __imag__ Res = - __real__ ZZ;
- }
- return (Res);
-}
diff --git a/winsup/mingw/mingwex/complex/casinf.c b/winsup/mingw/mingwex/complex/casinf.c
deleted file mode 100755
index a70058b..0000000
--- a/winsup/mingw/mingwex/complex/casinf.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- casinf.c
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* casin (Z ) = -I * clog(I * Z + csqrt (1.0 - Z * Z))) */
-
-float complex casinf (float complex Z)
-{
- float complex Res;
- float x, y;
-
- x = __real__ Z;
- y = __imag__ Z;
-
- if (y == 0.0f)
- {
- __real__ Res = asinf (x);
- __imag__ Res = 0.0f;
- }
- else /* -I * clog(I * Z + csqrt(1.0 - Z * Z))) */
- {
- float complex ZZ;
-
- /* Z * Z = ((x - y) * (x + y)) + (2.0 * x * y) * I */
- /* calculate 1 - Z * Z */
- __real__ ZZ = 1.0f - (x - y) * (x + y);
- __imag__ ZZ = -2.0f * x * y;
- ZZ = csqrtf (ZZ);
-
-
- /* add I * Z to ZZ */
-
- __real__ ZZ -= y;
- __imag__ ZZ += x;
-
- ZZ = clogf (ZZ);
-
- /* mult by -I */
- __real__ Res = __imag__ ZZ;
- __imag__ Res = - __real__ ZZ;
- }
- return (Res);
-}
diff --git a/winsup/mingw/mingwex/complex/casinh.c b/winsup/mingw/mingwex/complex/casinh.c
deleted file mode 100644
index a86c1d6..0000000
--- a/winsup/mingw/mingwex/complex/casinh.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- casinh.c
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* casinh (z) = -I casin (I * z) */
-
-double complex casinh (double complex Z)
-{
- double complex Tmp;
- double complex Res;
-
- __real__ Tmp = - __imag__ Z;
- __imag__ Tmp = __real__ Z;
- Tmp = casin (Tmp);
- __real__ Res = __imag__ Tmp;
- __imag__ Res = - __real__ Tmp;
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/casinhf.c b/winsup/mingw/mingwex/complex/casinhf.c
deleted file mode 100755
index 421cd3a..0000000
--- a/winsup/mingw/mingwex/complex/casinhf.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- casinhf.c
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* casinh (z) = -I casin (I * z) */
-
-float complex casinhf (float complex Z)
-{
- float complex Tmp;
- float complex Res;
-
- __real__ Tmp = - __imag__ Z;
- __imag__ Tmp = __real__ Z;
- Tmp = casinf (Tmp);
- __real__ Res = __imag__ Tmp;
- __imag__ Res = - __real__ Tmp;
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/casinhl.c b/winsup/mingw/mingwex/complex/casinhl.c
deleted file mode 100755
index 348bf80..0000000
--- a/winsup/mingw/mingwex/complex/casinhl.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- casinhl.c
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* casinh (z) = -I casin (I * z) */
-
-long double complex casinhl (long double complex Z)
-{
- long double complex Tmp;
- long double complex Res;
-
- __real__ Tmp = - __imag__ Z;
- __imag__ Tmp = __real__ Z;
- Tmp = casinl (Tmp);
- __real__ Res = __imag__ Tmp;
- __imag__ Res = - __real__ Tmp;
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/casinl.c b/winsup/mingw/mingwex/complex/casinl.c
deleted file mode 100755
index 3093fa5..0000000
--- a/winsup/mingw/mingwex/complex/casinl.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- casinl.c
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* casin (Z ) = -I * clog(I * Z + csqrt (1.0 - Z * Z))) */
-
-long double complex casinl (long double complex Z)
-{
- long double complex Res;
- long double x, y;
-
- x = __real__ Z;
- y = __imag__ Z;
-
- if (y == 0.0L)
- {
- __real__ Res = asinl (x);
- __imag__ Res = 0.0L;
- }
- else /* -I * clog(I * Z + csqrt(1.0 - Z * Z))) */
- {
- long double complex ZZ;
-
- /* Z * Z = ((x - y) * (x + y)) + (2.0 * x * y) * I */
- /* calculate 1 - Z * Z */
- __real__ ZZ = 1.0L - (x - y) * (x + y);
- __imag__ ZZ = -2.0L * x * y;
- ZZ = csqrtl (ZZ);
-
-
- /* add I * Z to ZZ */
-
- __real__ ZZ -= y;
- __imag__ ZZ += x;
-
- ZZ = clogl (ZZ);
-
- /* mult by -I */
- __real__ Res = __imag__ ZZ;
- __imag__ Res = - __real__ ZZ;
- }
- return (Res);
-}
diff --git a/winsup/mingw/mingwex/complex/catan.c b/winsup/mingw/mingwex/complex/catan.c
deleted file mode 100644
index eee1e8f..0000000
--- a/winsup/mingw/mingwex/complex/catan.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* catan.c */
-
-/*
- Contributed by Danny Smith
- 2003-10-17
-
- FIXME: This needs some serious numerical analysis.
-*/
-
-#include <math.h>
-#include <complex.h>
-#include <errno.h>
-
-/* catan (z) = -I/2 * clog ((I + z) / (I - z)) */
-
-double complex
-catan (double complex Z)
-{
- double complex Res;
- double complex Tmp;
- double x = __real__ Z;
- double y = __imag__ Z;
-
- if ( x == 0.0 && (1.0 - fabs (y)) == 0.0)
- {
- errno = ERANGE;
- __real__ Res = HUGE_VAL;
- __imag__ Res = HUGE_VAL;
- }
- else if (isinf (_hypot (x, y)))
- {
- __real__ Res = (x > 0 ? M_PI_2 : -M_PI_2);
- __imag__ Res = 0.0;
- }
- else
- {
- __real__ Tmp = - x;
- __imag__ Tmp = 1.0 - y;
-
- __real__ Res = x;
- __imag__ Res = y + 1.0;
-
- Tmp = clog (Res/Tmp);
- __real__ Res = - 0.5 * __imag__ Tmp;
- __imag__ Res = 0.5 * __real__ Tmp;
- }
-
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/catanf.c b/winsup/mingw/mingwex/complex/catanf.c
deleted file mode 100755
index adddde8..0000000
--- a/winsup/mingw/mingwex/complex/catanf.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* catanf.c */
-
-/*
- Contributed by Danny Smith
- 2004-12-24
-
- FIXME: This needs some serious numerical analysis.
-*/
-
-#include <math.h>
-#include <complex.h>
-#include <errno.h>
-
-/* catan (z) = -I/2 * clog ((I + z) / (I - z)) */
-
-float complex
-catanf (float complex Z)
-{
- float complex Res;
- float complex Tmp;
- float x = __real__ Z;
- float y = __imag__ Z;
-
- if ( x == 0.0f && (1.0f - fabsf (y)) == 0.0f)
- {
- errno = ERANGE;
- __real__ Res = HUGE_VALF;
- __imag__ Res = HUGE_VALF;
- }
- else if (isinf (hypotf (x, y)))
- {
- __real__ Res = (x > 0 ? M_PI_2 : -M_PI_2);
- __imag__ Res = 0.0f;
- }
- else
- {
- __real__ Tmp = - x;
- __imag__ Tmp = 1.0f - y;
-
- __real__ Res = x;
- __imag__ Res = y + 1.0f;
-
- Tmp = clogf (Res/Tmp);
- __real__ Res = - 0.5f * __imag__ Tmp;
- __imag__ Res = 0.5f * __real__ Tmp;
- }
-
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/catanh.c b/winsup/mingw/mingwex/complex/catanh.c
deleted file mode 100644
index 78f0280..0000000
--- a/winsup/mingw/mingwex/complex/catanh.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* catanh.c */
-/*
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* catanh (z) = -I * catan (I * z) */
-
-double complex catanh (double complex Z)
-{
- double complex Tmp;
- double complex Res;
-
- __real__ Tmp = - __imag__ Z;
- __imag__ Tmp = __real__ Z;
- Tmp = catan (Tmp);
- __real__ Res = __imag__ Tmp;
- __imag__ Res = - __real__ Tmp;
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/catanhf.c b/winsup/mingw/mingwex/complex/catanhf.c
deleted file mode 100755
index 7a792e8..0000000
--- a/winsup/mingw/mingwex/complex/catanhf.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* catanhf.c */
-/*
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* catanh (z) = -I * catan (I * z) */
-
-float complex catanhf (float complex Z)
-{
- float complex Tmp;
- float complex Res;
-
- __real__ Tmp = - __imag__ Z;
- __imag__ Tmp = __real__ Z;
- Tmp = catanf (Tmp);
- __real__ Res = __imag__ Tmp;
- __imag__ Res = - __real__ Tmp;
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/catanhl.c b/winsup/mingw/mingwex/complex/catanhl.c
deleted file mode 100755
index 50a3be9..0000000
--- a/winsup/mingw/mingwex/complex/catanhl.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* catanhl.c */
-/*
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* catanh (z) = -I * catan (I * z) */
-
-long double complex catanhl (long double complex Z)
-{
- long double complex Tmp;
- long double complex Res;
-
- __real__ Tmp = - __imag__ Z;
- __imag__ Tmp = __real__ Z;
- Tmp = catanl (Tmp);
- __real__ Res = __imag__ Tmp;
- __imag__ Res = - __real__ Tmp;
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/catanl.c b/winsup/mingw/mingwex/complex/catanl.c
deleted file mode 100755
index 1fd6268..0000000
--- a/winsup/mingw/mingwex/complex/catanl.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* catanl.c */
-
-/*
- Contributed by Danny Smith
- 2005-01-04
-
- FIXME: This needs some serious numerical analysis.
-*/
-
-#include <math.h>
-#include <complex.h>
-#include <errno.h>
-
-/* catan (z) = -I/2 * clog ((I + z) / (I - z)) */
-
-#ifndef _M_PI_2L
-#define _M_PI_2L 1.5707963267948966192313L
-#endif
-
-long double complex
-catanl (long double complex Z)
-{
- long double complex Res;
- long double complex Tmp;
- long double x = __real__ Z;
- long double y = __imag__ Z;
-
- if ( x == 0.0L && (1.0L - fabsl (y)) == 0.0L)
- {
- errno = ERANGE;
- __real__ Res = HUGE_VALL;
- __imag__ Res = HUGE_VALL;
- }
- else if (isinf (hypotl (x, y)))
- {
- __real__ Res = (x > 0 ? _M_PI_2L : -_M_PI_2L);
- __imag__ Res = 0.0L;
- }
- else
- {
- __real__ Tmp = - x;
- __imag__ Tmp = 1.0L - y;
-
- __real__ Res = x;
- __imag__ Res = y + 1.0L;
-
- Tmp = clogl (Res/Tmp);
- __real__ Res = - 0.5L * __imag__ Tmp;
- __imag__ Res = 0.5L * __real__ Tmp;
- }
-
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/ccos.c b/winsup/mingw/mingwex/complex/ccos.c
deleted file mode 100644
index ef5b5a7..0000000
--- a/winsup/mingw/mingwex/complex/ccos.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- ccos.c
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* ccos (x + I * y) = cos (x) * cosh (y)
- + I * (sin (x) * sinh (y)) */
-
-
-double complex ccos (double complex Z)
-{
- double complex Res;
- __real__ Res = cos (__real__ Z) * cosh ( __imag__ Z);
- __imag__ Res = -sin (__real__ Z) * sinh ( __imag__ Z);
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/ccosf.c b/winsup/mingw/mingwex/complex/ccosf.c
deleted file mode 100755
index 64a6764..0000000
--- a/winsup/mingw/mingwex/complex/ccosf.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- ccosf.c
- Contributed by Danny Smith
- 2003-12-24
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* ccos (x + I * y) = cos (x) * cosh (y)
- + I * (sin (x) * sinh (y)) */
-
-
-float complex ccosf (float complex Z)
-{
- float complex Res;
- __real__ Res = cosf (__real__ Z) * coshf ( __imag__ Z);
- __imag__ Res = -sinf (__real__ Z) * sinhf ( __imag__ Z);
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/ccosh.c b/winsup/mingw/mingwex/complex/ccosh.c
deleted file mode 100644
index 8d304fd..0000000
--- a/winsup/mingw/mingwex/complex/ccosh.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- ccosh.c
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* ccosh (x + I * y) = cosh (x) * cos (y)
- + I * (sinh (x) * sin (y)) */
-
-double complex ccosh (double complex Z)
-{
- double complex Res;
- __real__ Res = cosh (__real__ Z) * cos (__imag__ Z);
- __imag__ Res = sinh (__real__ Z) * sin (__imag__ Z);
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/ccoshf.c b/winsup/mingw/mingwex/complex/ccoshf.c
deleted file mode 100755
index ce78cd6..0000000
--- a/winsup/mingw/mingwex/complex/ccoshf.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- ccoshf.c
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* ccosh (x + I * y) = cosh (x) * cos (y)
- + I * (sinh (x) * sin (y)) */
-
-float complex ccoshf (float complex Z)
-{
- float complex Res;
- __real__ Res = coshf (__real__ Z) * cosf (__imag__ Z);
- __imag__ Res = sinhf (__real__ Z) * sinf (__imag__ Z);
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/ccoshl.c b/winsup/mingw/mingwex/complex/ccoshl.c
deleted file mode 100755
index 0fb2526..0000000
--- a/winsup/mingw/mingwex/complex/ccoshl.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- ccoshl.c
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* ccosh (x + I * y) = cosh (x) * cos (y)
- + I * (sinh (x) * sin (y)) */
-
-long double complex ccoshl (long double complex Z)
-{
- long double complex Res;
- __real__ Res = coshl (__real__ Z) * cosl (__imag__ Z);
- __imag__ Res = sinhl (__real__ Z) * sinl (__imag__ Z);
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/ccosl.c b/winsup/mingw/mingwex/complex/ccosl.c
deleted file mode 100755
index 981fdf0..0000000
--- a/winsup/mingw/mingwex/complex/ccosl.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- ccosl.c
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* ccos (x + I * y) = cos (x) * cosh (y)
- + I * (sin (x) * sinh (y)) */
-
-
-long double complex ccosl (long double complex Z)
-{
- long double complex Res;
- __real__ Res = cosl (__real__ Z) * coshl ( __imag__ Z);
- __imag__ Res = -sinl (__real__ Z) * sinhl ( __imag__ Z);
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/cexp.c b/winsup/mingw/mingwex/complex/cexp.c
deleted file mode 100644
index 43ac9ab..0000000
--- a/winsup/mingw/mingwex/complex/cexp.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- cexp.c
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* cexp (x + I * y) = exp (x) * cos (y) + I * exp (x) * sin (y) */
-
-double complex cexp (double complex Z)
-{
- double complex Res;
- long double rho = exp (__real__ Z);
- __real__ Res = rho * cos(__imag__ Z);
- __imag__ Res = rho * sin(__imag__ Z);
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/cexpf.c b/winsup/mingw/mingwex/complex/cexpf.c
deleted file mode 100755
index fabb1a0..0000000
--- a/winsup/mingw/mingwex/complex/cexpf.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- cexpf.c
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* cexp (x + I * y) = exp (x) * cos (y) + I * exp (x) * sin (y) */
-
-float complex cexpf (float complex Z)
-{
- float complex Res;
- double rho = exp (__real__ Z);
- __real__ Res = rho * cosf(__imag__ Z);
- __imag__ Res = rho * sinf(__imag__ Z);
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/cexpl.c b/winsup/mingw/mingwex/complex/cexpl.c
deleted file mode 100755
index 9f2ed26..0000000
--- a/winsup/mingw/mingwex/complex/cexpl.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- cexpl.c
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* cexp (x + I * y) = exp (x) * cos (y) + I * exp (x) * sin (y) */
-
-long double complex cexpl (long double complex Z)
-{
- long double complex Res;
- long double rho = expl (__real__ Z);
- __real__ Res = rho * cosl(__imag__ Z);
- __imag__ Res = rho * sinl(__imag__ Z);
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/cimag.c b/winsup/mingw/mingwex/complex/cimag.c
deleted file mode 100644
index b6b3256..0000000
--- a/winsup/mingw/mingwex/complex/cimag.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <complex.h>
-double __attribute__ ((const)) cimag (double complex _Z)
-{
- return __imag__ _Z;
-}
-
diff --git a/winsup/mingw/mingwex/complex/cimagf.c b/winsup/mingw/mingwex/complex/cimagf.c
deleted file mode 100755
index f77b9ec..0000000
--- a/winsup/mingw/mingwex/complex/cimagf.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <complex.h>
-float __attribute__ ((const)) cimagf (float complex _Z)
-{
- return __imag__ _Z;
-}
-
diff --git a/winsup/mingw/mingwex/complex/cimagl.c b/winsup/mingw/mingwex/complex/cimagl.c
deleted file mode 100755
index 9b023b4..0000000
--- a/winsup/mingw/mingwex/complex/cimagl.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <complex.h>
-long double __attribute__ ((const)) cimagl (long double complex _Z)
-{
- return __imag__ _Z;
-}
diff --git a/winsup/mingw/mingwex/complex/clog.c b/winsup/mingw/mingwex/complex/clog.c
deleted file mode 100644
index 57c51eb..0000000
--- a/winsup/mingw/mingwex/complex/clog.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- clog.c
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-/* clog (x + I * y) = log (hypot (x, y)) + I * atan2 (y, x) */
-
-#include <math.h>
-#include <complex.h>
-
-double complex clog (double complex Z)
-{
- double complex Res;
- __real__ Res = log (_hypot (__real__ Z, __imag__ Z));
- __imag__ Res = carg (Z);
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/clogf.c b/winsup/mingw/mingwex/complex/clogf.c
deleted file mode 100755
index ead7602..0000000
--- a/winsup/mingw/mingwex/complex/clogf.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- clogf.c
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-/* clog (x + I * y) = log (hypot (x, y)) + I * atan2 (y, x) */
-
-#include <math.h>
-#include <complex.h>
-
-float complex clogf (float complex Z)
-{
- float complex Res;
- __real__ Res = logf (_hypot (__real__ Z, __imag__ Z));
- __imag__ Res = cargf (Z);
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/clogl.c b/winsup/mingw/mingwex/complex/clogl.c
deleted file mode 100755
index 0114c91..0000000
--- a/winsup/mingw/mingwex/complex/clogl.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- clogl.c
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-/* clog (x + I * y) = log (hypot (x, y)) + I * atan2 (y, x) */
-
-#include <math.h>
-#include <complex.h>
-
-long double complex clogl (long double complex Z)
-{
- long double complex Res;
- __real__ Res = logl (hypotl (__real__ Z, __imag__ Z));
- __imag__ Res = cargl (Z);
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/cpow.c b/winsup/mingw/mingwex/complex/cpow.c
deleted file mode 100644
index c12b12f..0000000
--- a/winsup/mingw/mingwex/complex/cpow.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* cpow.c */
-/*
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-/* cpow(X, Y) = cexp(X * clog(Y)) */
-
-#include <math.h>
-#include <complex.h>
-
-/* Use dll version of pow */
-extern double (*_imp__pow) (double, double);
-#define pow (*_imp__pow)
-
-double complex cpow (double complex X, double complex Y)
-{
- double complex Res;
- double i;
- double r = hypot (__real__ X, __imag__ X);
- if (r == 0.0)
- {
- __real__ Res = __imag__ Res = 0.0;
- }
- else
- {
- double rho;
- double theta;
- i = carg (X);
- theta = i * __real__ Y;
-
- if (__imag__ Y == 0.0)
- /* This gives slightly more accurate results in these cases. */
- rho = pow (r, __real__ Y);
- else
- {
- r = log (r);
- /* rearrangement of cexp(X * clog(Y)) */
- theta += r * __imag__ Y;
- rho = exp (r * __real__ Y - i * __imag__ Y);
- }
-
- __real__ Res = rho * cos (theta);
- __imag__ Res = rho * sin (theta);
- }
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/cpowf.c b/winsup/mingw/mingwex/complex/cpowf.c
deleted file mode 100755
index eeeed1b..0000000
--- a/winsup/mingw/mingwex/complex/cpowf.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* cpowf.c */
-/*
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-/* cpow(X, Y) = cexp(X * clog(Y)) */
-
-#include <math.h>
-#include <complex.h>
-
-float complex cpowf (float complex X, float complex Y)
-{
- float complex Res;
- float i;
- float r = _hypot (__real__ X, __imag__ X);
- if (r == 0.0f)
- {
- __real__ Res = __imag__ Res = 0.0;
- }
- else
- {
- float rho;
- float theta;
- i = cargf (X);
- theta = i * __real__ Y;
-
- if (__imag__ Y == 0.0f)
- /* This gives slightly more accurate results in these cases. */
- rho = powf (r, __real__ Y);
- else
- {
- r = logf (r);
- /* rearrangement of cexp(X * clog(Y)) */
- theta += r * __imag__ Y;
- rho = expf (r * __real__ Y - i * __imag__ Y);
- }
-
- __real__ Res = rho * cosf (theta);
- __imag__ Res = rho * sinf (theta);
- }
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/cpowl.c b/winsup/mingw/mingwex/complex/cpowl.c
deleted file mode 100755
index c614a6d..0000000
--- a/winsup/mingw/mingwex/complex/cpowl.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* cpowl.c */
-/*
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-/* cpow(X, Y) = cexp(X * clog(Y)) */
-
-#include <math.h>
-#include <complex.h>
-
-long double complex cpowl (long double complex X, long double complex Y)
-{
- long double complex Res;
- long double i;
- long double r = hypotl (__real__ X, __imag__ X);
- if (r == 0.0L)
- {
- __real__ Res = __imag__ Res = 0.0L;
- }
- else
- {
- long double rho;
- long double theta;
- i = cargl (X);
- theta = i * __real__ Y;
-
- if (__imag__ Y == 0.0L)
- /* This gives slightly more accurate results in these cases. */
- rho = powl (r, __real__ Y);
- else
- {
- r = logl (r);
- /* rearrangement of cexp(X * clog(Y)) */
- theta += r * __imag__ Y;
- rho = expl (r * __real__ Y - i * __imag__ Y);
- }
-
- __real__ Res = rho * cosl (theta);
- __imag__ Res = rho * sinl (theta);
- }
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/cproj.c b/winsup/mingw/mingwex/complex/cproj.c
deleted file mode 100644
index cc7c48d..0000000
--- a/winsup/mingw/mingwex/complex/cproj.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- cproj.c
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* Return the value of the projection onto the Riemann sphere.*/
-
-double complex cproj (double complex Z)
-{
- complex double Res = Z;
- if (isinf (__real__ Z) || isinf (__imag__ Z))
- {
- __real__ Res = HUGE_VAL;
- __imag__ Res = copysign (0.0, __imag__ Z);
- }
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/cprojf.c b/winsup/mingw/mingwex/complex/cprojf.c
deleted file mode 100755
index f1d2d73..0000000
--- a/winsup/mingw/mingwex/complex/cprojf.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- cprojf.c
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* Return the value of the projection onto the Riemann sphere.*/
-
-float complex cprojf (float complex Z)
-{
- complex float Res = Z;
- if (isinf (__real__ Z) || isinf (__imag__ Z))
- {
- __real__ Res = HUGE_VALF;
- __imag__ Res = copysignf (0.0f, __imag__ Z);
- }
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/cprojl.c b/winsup/mingw/mingwex/complex/cprojl.c
deleted file mode 100755
index 224d26f..0000000
--- a/winsup/mingw/mingwex/complex/cprojl.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- cprojl.c
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* Return the value of the projection onto the Riemann sphere.*/
-
-long double complex cprojl (long double complex Z)
-{
- complex long double Res = Z;
- if (isinf (__real__ Z) || isinf (__imag__ Z))
- {
- __real__ Res = HUGE_VALL;
- __imag__ Res = copysignl (0.0L, __imag__ Z);
- }
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/creal.c b/winsup/mingw/mingwex/complex/creal.c
deleted file mode 100644
index 6905b7e..0000000
--- a/winsup/mingw/mingwex/complex/creal.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <complex.h>
-double __attribute__ ((const)) creal (double complex _Z)
-{
- return __real__ _Z;
-}
-
diff --git a/winsup/mingw/mingwex/complex/crealf.c b/winsup/mingw/mingwex/complex/crealf.c
deleted file mode 100755
index 16dc7ec..0000000
--- a/winsup/mingw/mingwex/complex/crealf.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <complex.h>
-float __attribute__ ((const)) crealf (float complex _Z)
-{
- return __real__ _Z;
-}
-
diff --git a/winsup/mingw/mingwex/complex/creall.c b/winsup/mingw/mingwex/complex/creall.c
deleted file mode 100755
index 62470d9..0000000
--- a/winsup/mingw/mingwex/complex/creall.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <complex.h>
-long double __attribute__ ((const)) creall (long double complex _Z)
-{
- return __real__ _Z;
-}
diff --git a/winsup/mingw/mingwex/complex/csin.c b/winsup/mingw/mingwex/complex/csin.c
deleted file mode 100644
index 37df805..0000000
--- a/winsup/mingw/mingwex/complex/csin.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* csin.c */
-
-/*
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* csin (x + I * y) = sin (x) * cosh (y)
- + I * (cos (x) * sinh (y)) */
-
-double complex csin (double complex Z)
-{
- double complex Res;
- __real__ Res = sin (__real__ Z) * cosh ( __imag__ Z);
- __imag__ Res = cos (__real__ Z) * sinh ( __imag__ Z);
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/csinf.c b/winsup/mingw/mingwex/complex/csinf.c
deleted file mode 100755
index def23f2..0000000
--- a/winsup/mingw/mingwex/complex/csinf.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* csinf.c */
-
-/*
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* csin (x + I * y) = sin (x) * cosh (y)
- + I * (cos (x) * sinh (y)) */
-
-float complex csinf (float complex Z)
-{
- float complex Res;
- __real__ Res = sinf (__real__ Z) * coshf ( __imag__ Z);
- __imag__ Res = cosf (__real__ Z) * sinhf ( __imag__ Z);
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/csinh.c b/winsup/mingw/mingwex/complex/csinh.c
deleted file mode 100644
index 4ee6cbe..0000000
--- a/winsup/mingw/mingwex/complex/csinh.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* csinh.c */
-/*
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-
-#include <math.h>
-#include <complex.h>
-
-/* csinh (x + I * y) = sinh (x) * cos (y)
- + I * (cosh (x) * sin (y)) */
-
-
-double complex csinh (double complex Z)
-{
- double complex Res;
- __real__ Res = sinh (__real__ Z) * cos (__imag__ Z);
- __imag__ Res = cosh (__real__ Z) * sin (__imag__ Z);
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/csinhf.c b/winsup/mingw/mingwex/complex/csinhf.c
deleted file mode 100755
index b0d008e..0000000
--- a/winsup/mingw/mingwex/complex/csinhf.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* csinhf.c */
-/*
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-
-#include <math.h>
-#include <complex.h>
-
-/* csinh (x + I * y) = sinh (x) * cos (y)
- + I * (cosh (x) * sin (y)) */
-
-
-float complex csinhf (float complex Z)
-{
- float complex Res;
- __real__ Res = sinhf (__real__ Z) * cosf (__imag__ Z);
- __imag__ Res = coshf (__real__ Z) * sinf (__imag__ Z);
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/csinhl.c b/winsup/mingw/mingwex/complex/csinhl.c
deleted file mode 100755
index 187ccf0..0000000
--- a/winsup/mingw/mingwex/complex/csinhl.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* csinhl.c */
-/*
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* csinh (x + I * y) = sinh (x) * cos (y)
- + I * (cosh (x) * sin (y)) */
-
-
-long double complex csinhl (long double complex Z)
-{
- long double complex Res;
- __real__ Res = sinhl (__real__ Z) * cosl (__imag__ Z);
- __imag__ Res = coshl (__real__ Z) * sinl (__imag__ Z);
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/csinl.c b/winsup/mingw/mingwex/complex/csinl.c
deleted file mode 100755
index 2a98c7c..0000000
--- a/winsup/mingw/mingwex/complex/csinl.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* csinl.c */
-
-/*
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-
-/* csin (x + I * y) = sin (x) * cosh (y)
- + I * (cos (x) * sinh (y)) */
-
-long double complex csinl (long double complex Z)
-{
- long double complex Res;
- __real__ Res = sinl (__real__ Z) * coshl ( __imag__ Z);
- __imag__ Res = cosl (__real__ Z) * sinhl ( __imag__ Z);
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/csqrt.c b/winsup/mingw/mingwex/complex/csqrt.c
deleted file mode 100644
index b5f8868..0000000
--- a/winsup/mingw/mingwex/complex/csqrt.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- csqrt.c
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-#include <math.h>
-#include <complex.h>
-
-double complex csqrt (double complex Z)
-{
- double complex Res;
- double t;
- double x = __real__ Z;
- double y = __imag__ Z;
-
- if (y == 0.0)
- {
- if (x < 0.0)
- {
- __real__ Res = 0.0;
- __imag__ Res = sqrt (-x);
- }
- else
- {
- __real__ Res = sqrt (x);
- __imag__ Res = 0.0;
- }
- }
-
- else if (x == 0.0)
- {
- t = sqrt(0.5 * fabs (y));
- __real__ Res = t;
- __imag__ Res = y > 0 ? t : -t;
- }
-
- else
- {
- t = sqrt (2.0 * (_hypot (x, y) + fabs (x)));
- double u = t / 2.0;
- if ( x > 0.0)
- {
- __real__ Res = u;
- __imag__ Res = y / t;
- }
- else
- {
- __real__ Res = fabs ( y / t);
- __imag__ Res = y < 0.0 ? -u : u;
- }
- }
-
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/csqrtf.c b/winsup/mingw/mingwex/complex/csqrtf.c
deleted file mode 100755
index 7c37e99..0000000
--- a/winsup/mingw/mingwex/complex/csqrtf.c
+++ /dev/null
@@ -1,49 +0,0 @@
-#include <math.h>
-#include <complex.h>
-
-float complex csqrtf (float complex Z)
-{
- float complex Res;
- float r;
- float x = __real__ Z;
- float y = __imag__ Z;
-
- if (y == 0.0f)
- {
- if (x < 0.0f)
- {
- __real__ Res = 0.0f;
- __imag__ Res = sqrtf (-x);
- }
- else
- {
- __real__ Res = sqrtf (x);
- __imag__ Res = 0.0f;
- }
- }
-
- else if (x == 0.0f)
- {
- r = sqrtf(0.5f * fabsf (y));
- __real__ Res = r;
- __imag__ Res = y > 0 ? r : -r;
- }
-
- else
- {
- float t = sqrtf (2 * (_hypot (__real__ Z, __imag__ Z) + fabsf (x)));
- float u = t / 2.0f;
- if ( x > 0.0f)
- {
- __real__ Res = u;
- __imag__ Res = y / t;
- }
- else
- {
- __real__ Res = fabsf (y / t);
- __imag__ Res = y < 0 ? -u : u;
- }
- }
-
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/csqrtl.c b/winsup/mingw/mingwex/complex/csqrtl.c
deleted file mode 100755
index 1b2ebbe..0000000
--- a/winsup/mingw/mingwex/complex/csqrtl.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* csqrtl.c */
-/*
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-
-long double complex csqrtl (long double complex Z)
-{
- long double complex Res;
- long double r;
- long double x = __real__ Z;
- long double y = __imag__ Z;
-
- if (y == 0.0L)
- {
- if (x < 0.0L)
- {
- __real__ Res = 0.0L;
- __imag__ Res = sqrtl (-x);
- }
- else
- {
- __real__ Res = sqrtl (x);
- __imag__ Res = 0.0L;
- }
- }
-
- else if (x == 0.0L)
- {
- r = sqrtl(0.5L * fabsl (y));
- __real__ Res = r;
- __imag__ Res = y > 0 ? r : -r;
- }
-
- else
- {
- long double t = sqrtl (2.0L * (hypotl (__real__ Z, __imag__ Z) + fabsl (x)));
- long double u = t / 2.0L;
- if ( x > 0.0L)
- {
- __real__ Res = u;
- __imag__ Res = y / t;
- }
- else
- {
- __real__ Res = fabsl (y / t);
- __imag__ Res = y < 0 ? -u : u;
- }
- }
-
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/ctan.c b/winsup/mingw/mingwex/complex/ctan.c
deleted file mode 100644
index a479772..0000000
--- a/winsup/mingw/mingwex/complex/ctan.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* ctan.c */
-
-/*
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-#include <math.h>
-#include <complex.h>
-#include <errno.h>
-
-
-/* ctan (x + I * y) = (sin (2 * x) + I * sinh(2 * y))
- / (cos (2 * x) + cosh (2 * y)) */
-
-double complex ctan (double complex Z)
-{
- double complex Res;
- double two_I = 2.0 * __imag__ Z;
- double two_R = 2.0 * __real__ Z;
- double denom = cos (two_R) + cosh (two_I);
- if (denom == 0.0)
- {
- errno = ERANGE;
- __real__ Res = HUGE_VAL;
- __imag__ Res = HUGE_VAL;
- }
- else if (isinf (denom))
- {
- errno = ERANGE;
- __real__ Res = 0.0;
- __imag__ Res = two_I > 0 ? 1.0 : -1.0;
- }
- else
- {
- __real__ Res = sin (two_R) / denom;
- __imag__ Res = sinh (two_I) / denom;
- }
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/ctanf.c b/winsup/mingw/mingwex/complex/ctanf.c
deleted file mode 100755
index 99699e4..0000000
--- a/winsup/mingw/mingwex/complex/ctanf.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* ctanf.c */
-
-/*
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-#include <math.h>
-#include <complex.h>
-#include <errno.h>
-
-
-/* ctan (x + I * y) = (sin (2 * x) + I * sinh(2 * y))
- / (cos (2 * x) + cosh (2 * y)) */
-
-float complex ctanf (float complex Z)
-{
- float complex Res;
- float two_I = 2.0f * __imag__ Z;
- float two_R = 2.0f * __real__ Z;
- float denom = cosf (two_R) + coshf (two_I);
- if (denom == 0.0f)
- {
- errno = ERANGE;
- __real__ Res = HUGE_VALF;
- __imag__ Res = HUGE_VALF;
- }
- else if (isinf (denom))
- {
- errno = ERANGE;
- __real__ Res = 0.0;
- __imag__ Res = two_I > 0 ? 1.0f : -1.0f;
- }
- else
- {
- __real__ Res = sinf (two_R) / denom;
- __imag__ Res = sinhf (two_I) / denom;
- }
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/complex/ctanh.c b/winsup/mingw/mingwex/complex/ctanh.c
deleted file mode 100644
index 6d3e615..0000000
--- a/winsup/mingw/mingwex/complex/ctanh.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* ctanh.c */
-
-/*
- Contributed by Danny Smith
- 2003-10-20
-*/
-
-
-#include <math.h>
-#include <complex.h>
-#include <errno.h>
-
-/*
- ctanh (x + I * y) = (sinh (2 * x) + sin (2 * y) * I )
- / (cosh (2 * x) + cos (2 * y)) .
-*/
-
-double complex
-ctanh (double complex Z)
-{
- double complex Res;
- double two_R = 2.0 * __real__ Z;
- double two_I = 2.0 * __imag__ Z;
- double denom = cosh (two_R) + cos (two_I);
-
- if (denom == 0.0)
- {
- errno = ERANGE;
- __real__ Res = HUGE_VAL;
- __imag__ Res = HUGE_VAL;
- }
- else if ( isinf (denom))
- {
- errno = ERANGE;
- __real__ Res = two_R > 0 ? 1.0 : -1.0;
- __imag__ Res = 0.0;
- }
- else
- {
- __real__ Res = sinh (two_R) / denom;
- __imag__ Res = sin (two_I) / denom;
- }
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/ctanhf.c b/winsup/mingw/mingwex/complex/ctanhf.c
deleted file mode 100755
index 82a9c9a..0000000
--- a/winsup/mingw/mingwex/complex/ctanhf.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* ctanhf.c */
-
-/*
- Contributed by Danny Smith
- 2004-12-24
-*/
-
-
-#include <math.h>
-#include <complex.h>
-#include <errno.h>
-
-/*
- ctanh (x + I * y) = (sinh (2 * x) + sin (2 * y) * I )
- / (cosh (2 * x) + cos (2 * y)) .
-*/
-
-float complex
-ctanhf (float complex Z)
-{
- float complex Res;
- float two_R = 2.0f * __real__ Z;
- float two_I = 2.0f * __imag__ Z;
- float denom = coshf (two_R) + cosf (two_I);
-
- if (denom == 0.0f)
- {
- errno = ERANGE;
- __real__ Res = HUGE_VALF;
- __imag__ Res = HUGE_VALF;
- }
- else if (isinf (denom))
- {
- errno = ERANGE;
- __real__ Res = two_R > 0 ? 1.0f : -1.0f;
- __imag__ Res = 0.0f;
- }
- else
- {
- __real__ Res = sinhf (two_R) / denom;
- __imag__ Res = sinf (two_I) / denom;
- }
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/ctanhl.c b/winsup/mingw/mingwex/complex/ctanhl.c
deleted file mode 100755
index 050b636..0000000
--- a/winsup/mingw/mingwex/complex/ctanhl.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* ctanhl.c */
-
-/*
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-
-#include <math.h>
-#include <complex.h>
-#include <errno.h>
-
-/*
- ctanh (x + I * y) = (sinh (2 * x) + sin (2 * y) * I )
- / (cosh (2 * x) + cos (2 * y)) .
-*/
-
-long double complex
-ctanhl (long double complex Z)
-{
- long double complex Res;
- long double two_R = 2.0L * __real__ Z;
- long double two_I = 2.0L * __imag__ Z;
- long double denom = coshl (two_R) + cosl (two_I);
-
- if (denom == 0.0L)
- {
- errno = ERANGE;
- __real__ Res = HUGE_VALL;
- __imag__ Res = HUGE_VALL;
- }
- else if (isinf (denom))
- {
- errno = ERANGE;
- __real__ Res = two_R > 0 ? 1.0L : -1.0L;
- __imag__ Res = 0.0L;
- }
- else
- {
- __real__ Res = sinhl (two_R) / denom;
- __imag__ Res = sinl (two_I) / denom;
- }
- return Res;
-}
diff --git a/winsup/mingw/mingwex/complex/ctanl.c b/winsup/mingw/mingwex/complex/ctanl.c
deleted file mode 100755
index 7d30761..0000000
--- a/winsup/mingw/mingwex/complex/ctanl.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* ctanl.c */
-
-/*
- Contributed by Danny Smith
- 2005-01-04
-*/
-
-#include <math.h>
-#include <complex.h>
-#include <errno.h>
-
-
-/* ctan (x + I * y) = (sin (2 * x) + I * sinh(2 * y))
- / (cos (2 * x) + cosh (2 * y)) */
-
-long double complex ctanl (long double complex Z)
-{
- long double complex Res;
- long double two_I = 2.0L * __imag__ Z;
- long double two_R = 2.0L * __real__ Z;
- long double denom = cosl (two_R) + coshl (two_I);
- if (denom == 0.0L)
- {
- errno = ERANGE;
- __real__ Res = HUGE_VALL;
- __imag__ Res = HUGE_VALL;
- }
- else if (isinf (denom))
- {
- errno = ERANGE;
- __real__ Res = 0.0;
- __imag__ Res = two_I > 0 ? 1.0L : -1.0L;
- }
- else
- {
- __real__ Res = sinl (two_R) / denom;
- __imag__ Res = sinhl (two_I) / denom;
- }
- return Res;
-}
-
diff --git a/winsup/mingw/mingwex/configure b/winsup/mingw/mingwex/configure
deleted file mode 100755
index 0e2195e..0000000
--- a/winsup/mingw/mingwex/configure
+++ /dev/null
@@ -1,3127 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63.
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-if test "x$CONFIG_SHELL" = x; then
- if (eval ":") 2>/dev/null; then
- as_have_required=yes
-else
- as_have_required=no
-fi
-
- if test $as_have_required = yes && (eval ":
-(as_func_return () {
- (exit \$1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
- :
-else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0) || { (exit 1); exit 1; }
-
-(
- as_lineno_1=\$LINENO
- as_lineno_2=\$LINENO
- test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
- test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
-") 2> /dev/null; then
- :
-else
- as_candidate_shells=
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- case $as_dir in
- /*)
- for as_base in sh bash ksh sh5; do
- as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
- done;;
- esac
-done
-IFS=$as_save_IFS
-
-
- for as_shell in $as_candidate_shells $SHELL; do
- # Try only shells that exist, to save several forks.
- if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { ("$as_shell") 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-_ASEOF
-}; then
- CONFIG_SHELL=$as_shell
- as_have_required=yes
- if { "$as_shell" 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-(as_func_return () {
- (exit $1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = "$1" ); then
- :
-else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test $exitcode = 0) || { (exit 1); exit 1; }
-
-(
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
-
-_ASEOF
-}; then
- break
-fi
-
-fi
-
- done
-
- if test "x$CONFIG_SHELL" != x; then
- for as_var in BASH_ENV ENV
- do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- done
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
-
- if test $as_have_required = no; then
- echo This script requires a shell more modern than all the
- echo shells that I found on your system. Please install a
- echo modern shell, or manually run the script under such a
- echo shell if you do have one.
- { (exit 1); exit 1; }
-fi
-
-
-fi
-
-fi
-
-
-
-(eval "as_func_return () {
- (exit \$1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
- :
-else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0") || {
- echo No shell found that supports shell functions.
- echo Please tell bug-autoconf@gnu.org about your system,
- echo including any error possibly output before this message.
- echo This can help us improve future autoconf versions.
- echo Configuration will now proceed without shell functions.
-}
-
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line after each line using $LINENO; the second 'sed'
- # does the real work. The second script uses 'N' to pair each
- # line-number line with the line containing $LINENO, and appends
- # trailing '-' during substitution so that $LINENO is not a special
- # case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # scripts with optimization help from Paolo Bonzini. Blame Lee
- # E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
- case `echo 'x\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- *) ECHO_C='\c';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
- as_ln_s='cp -p'
- fi
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-exec 7<&0 </dev/null 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-
-ac_unique_file="imaxabs.c"
-ac_subst_vars='LTLIBOBJS
-LIBOBJS
-INSTALL_DATA
-INSTALL_SCRIPT
-INSTALL_PROGRAM
-W32API_INCLUDE
-NO_CYGWIN
-target_os
-target_vendor
-target_cpu
-target
-host_os
-host_vendor
-host_cpu
-host
-build_os
-build_vendor
-build_cpu
-build
-DLLWRAP
-DLLTOOL
-RANLIB
-LD
-AR
-AS
-CC
-target_alias
-host_alias
-build_alias
-LIBS
-ECHO_T
-ECHO_N
-ECHO_C
-DEFS
-mandir
-localedir
-libdir
-psdir
-pdfdir
-dvidir
-htmldir
-infodir
-docdir
-oldincludedir
-includedir
-localstatedir
-sharedstatedir
-sysconfdir
-datadir
-datarootdir
-libexecdir
-sbindir
-bindir
-program_transform_name
-prefix
-exec_prefix
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-PATH_SEPARATOR
-SHELL'
-ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-'
- ac_precious_vars='build_alias
-host_alias
-target_alias'
-
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-ac_unrecognized_opts=
-ac_unrecognized_sep=
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval $ac_prev=\$ac_option
- ac_prev=
- continue
- fi
-
- case $ac_option in
- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *) ac_optarg=yes ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_dashdash$ac_option in
- --)
- ac_dashdash=yes ;;
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=*)
- datadir=$ac_optarg ;;
-
- -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
- | --dataroo | --dataro | --datar)
- ac_prev=datarootdir ;;
- -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
- | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
- datarootdir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
- { (exit 1); exit 1; }; }
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval enable_$ac_useropt=no ;;
-
- -docdir | --docdir | --docdi | --doc | --do)
- ac_prev=docdir ;;
- -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
- docdir=$ac_optarg ;;
-
- -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
- ac_prev=dvidir ;;
- -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
- dvidir=$ac_optarg ;;
-
- -enable-* | --enable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
- { (exit 1); exit 1; }; }
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval enable_$ac_useropt=\$ac_optarg ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
- ac_prev=htmldir ;;
- -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
- | --ht=*)
- htmldir=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir=$ac_optarg ;;
-
- -localedir | --localedir | --localedi | --localed | --locale)
- ac_prev=localedir ;;
- -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
- localedir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst | --locals)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
- localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name=$ac_optarg ;;
-
- -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
- ac_prev=pdfdir ;;
- -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
- pdfdir=$ac_optarg ;;
-
- -psdir | --psdir | --psdi | --psd | --ps)
- ac_prev=psdir ;;
- -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
- psdir=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
- { (exit 1); exit 1; }; }
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval with_$ac_useropt=\$ac_optarg ;;
-
- -without-* | --without-*)
- ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
- { (exit 1); exit 1; }; }
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval with_$ac_useropt=no ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries=$ac_optarg ;;
-
- -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- eval $ac_envvar=\$ac_optarg
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { $as_echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-if test -n "$ac_unrecognized_opts"; then
- case $enable_option_checking in
- no) ;;
- fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
- { (exit 1); exit 1; }; } ;;
- *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
- esac
-fi
-
-# Check all directory arguments for consistency.
-for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
- datadir sysconfdir sharedstatedir localstatedir includedir \
- oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
-do
- eval ac_val=\$$ac_var
- # Remove trailing slashes.
- case $ac_val in
- */ )
- ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
- eval $ac_var=\$ac_val;;
- esac
- # Be sure to have absolute directory names.
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) continue;;
- NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
- esac
- { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; }
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- { $as_echo "$as_me: error: working directory cannot be determined" >&2
- { (exit 1); exit 1; }; }
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
- { (exit 1); exit 1; }; }
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then the parent directory.
- ac_confdir=`$as_dirname -- "$as_myself" ||
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_myself" : 'X\(//\)[^/]' \| \
- X"$as_myself" : 'X\(//\)$' \| \
- X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r "$srcdir/$ac_unique_file"; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
- test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
- { (exit 1); exit 1; }; }
- pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
- srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
- eval ac_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_env_${ac_var}_value=\$${ac_var}
- eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
- --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- --infodir=DIR info documentation [DATAROOTDIR/info]
- --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
- --mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
- --htmldir=DIR html documentation [DOCDIR]
- --dvidir=DIR dvi documentation [DOCDIR]
- --pdfdir=DIR pdf documentation [DOCDIR]
- --psdir=DIR ps documentation [DOCDIR]
-_ACEOF
-
- cat <<\_ACEOF
-
-System types:
- --build=BUILD configure for building on BUILD [guessed]
- --host=HOST cross-compile to build programs to run on HOST [BUILD]
- --target=TARGET configure for building compilers for TARGET [HOST]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-
- cat <<\_ACEOF
-
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d "$ac_dir" ||
- { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
- continue
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
- cd "$ac_dir" || { ac_status=$?; continue; }
- # Check for guested configure.
- if test -f "$ac_srcdir/configure.gnu"; then
- echo &&
- $SHELL "$ac_srcdir/configure.gnu" --help=recursive
- elif test -f "$ac_srcdir/configure"; then
- echo &&
- $SHELL "$ac_srcdir/configure" --help=recursive
- else
- $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi || ac_status=$?
- cd "$ac_pwd" || { ac_status=$?; break; }
- done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
- cat <<\_ACEOF
-configure
-generated by GNU Autoconf 2.63
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit
-fi
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by $as_me, which was
-generated by GNU Autoconf 2.63. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- $as_echo "PATH: $as_dir"
-done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *\'*)
- ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- ac_configure_args="$ac_configure_args '$ac_arg'"
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-(
- for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) $as_unset $ac_var ;;
- esac ;;
- esac
- done
- (set) 2>&1 |
- case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- sed -n \
- "s/'\''/'\''\\\\'\'''\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
- ;; #(
- *)
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-)
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------------- ##
-## File substitutions. ##
-## ------------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- cat confdefs.h
- echo
- fi
- test "$ac_signal" != 0 &&
- $as_echo "$as_me: caught signal $ac_signal"
- $as_echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core core.conftest.* &&
- rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
- ac_site_file1=$CONFIG_SITE
-elif test "x$prefix" != xNONE; then
- ac_site_file1=$prefix/share/config.site
- ac_site_file2=$prefix/etc/config.site
-else
- ac_site_file1=$ac_default_prefix/share/config.site
- ac_site_file2=$ac_default_prefix/etc/config.site
-fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
- test "x$ac_site_file" = xNONE && continue
- if test -r "$ac_site_file"; then
- { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . "$cache_file";;
- *) . "./$cache_file";;
- esac
- fi
-else
- { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val=\$ac_cv_env_${ac_var}_value
- eval ac_new_val=\$ac_env_${ac_var}_value
- case $ac_old_set,$ac_new_set in
- set,)
- { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- # differences in whitespace do not lead to failure.
- ac_old_val_w=`echo x $ac_old_val`
- ac_new_val_w=`echo x $ac_new_val`
- if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- ac_cache_corrupted=:
- else
- { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
- eval $ac_var=\$ac_old_val
- fi
- { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
-$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
- { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
-$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-CC=${CC-cc}
-
-AS=${AS-as}
-
-AR=${AR-ar}
-
-LD=${LD-ld}
-
-RANLIB=${RANLIB-ranlib}
-
-DLLTOOL=${DLLTOOL-dlltool}
-
-DLLWRAP=${DLLWRAP-dllwrap}
-
-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
- elif test -f "$ac_dir/shtool"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
-$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
- { (exit 1); exit 1; }; }
-
-{ $as_echo "$as_me:$LINENO: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
- { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-$as_echo "$as_me: error: invalid value of canonical build" >&2;}
- { (exit 1); exit 1; }; };;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:$LINENO: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test "x$host_alias" = x; then
- ac_cv_host=$ac_cv_build
-else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-$as_echo "$as_me: error: invalid value of canonical host" >&2;}
- { (exit 1); exit 1; }; };;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:$LINENO: checking target system type" >&5
-$as_echo_n "checking target system type... " >&6; }
-if test "${ac_cv_target+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test "x$target_alias" = x; then
- ac_cv_target=$ac_cv_host
-else
- ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
- { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-$as_echo "$ac_cv_target" >&6; }
-case $ac_cv_target in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
-$as_echo "$as_me: error: invalid value of canonical target" >&2;}
- { (exit 1); exit 1; }; };;
-esac
-target=$ac_cv_target
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_target
-shift
-target_cpu=$1
-target_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-target_os=$*
-IFS=$ac_save_IFS
-case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-case "$target_os" in
-*cygwin*)
- NO_CYGWIN="$(cd ${srcdir}/../../utils; pwd)/mingw"
- ;;
-*)
- # Build it for MSVCRT by default.
- NO_CYGWIN=
- ;;
-esac
-
-
-
-W32API_INCLUDE='-I $(srcdir)/../../w32api/include'
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- rm -rf conftest.one conftest.two conftest.dir
- echo one > conftest.one
- echo two > conftest.two
- mkdir conftest.dir
- if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
- test -s conftest.one && test -s conftest.two &&
- test -s conftest.dir/conftest.one &&
- test -s conftest.dir/conftest.two
- then
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- fi
- done
- done
- ;;
-esac
-
-done
-IFS=$as_save_IFS
-
-rm -rf conftest.one conftest.two conftest.dir
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. Don't cache a
- # value for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the value is a relative name.
- INSTALL=$ac_install_sh
- fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-ac_config_files="$ac_config_files Makefile"
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
- for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) $as_unset $ac_var ;;
- esac ;;
- esac
- done
-
- (set) 2>&1 |
- case $as_nl`(ac_space=' '; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;; #(
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-) |
- sed '
- /^ac_cv_env_/b end
- t clear
- :clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
- if test -w "$cache_file"; then
- test "x$cache_file" != "x/dev/null" &&
- { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
- cat confcache >$cache_file
- else
- { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then branch to the quote section. Otherwise,
-# look for a macro that doesn't take arguments.
-ac_script='
-:mline
-/\\$/{
- N
- s,\\\n,,
- b mline
-}
-t clear
-:clear
-s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
-t quote
-s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
-t quote
-b any
-:quote
-s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
-s/\[/\\&/g
-s/\]/\\&/g
-s/\$/$$/g
-H
-:any
-${
- g
- s/^\n//
- s/\n/ /g
- p
-}
-'
-DEFS=`sed -n "$ac_script" confdefs.h`
-
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
- # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
- # will be set to the directory where LIBOBJS objects are built.
- ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line after each line using $LINENO; the second 'sed'
- # does the real work. The second script uses 'N' to pair each
- # line-number line with the line containing $LINENO, and appends
- # trailing '-' during substitution so that $LINENO is not a special
- # case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # scripts with optimization help from Paolo Bonzini. Blame Lee
- # E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
- case `echo 'x\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- *) ECHO_C='\c';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
- as_ln_s='cp -p'
- fi
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-
-# Save the log message, to keep $[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.63. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
-
-
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTION]... [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number and configuration settings, then exit
- -q, --quiet, --silent
- do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
-
-Configuration files:
-$config_files
-
-Report bugs to <bug-autoconf@gnu.org>."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.63,
- with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2008 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
-test -n "\$AWK" || AWK=awk
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=*)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- *)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- esac
-
- case $ac_option in
- # Handling of the options.
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
- --debug | --debu | --deb | --de | --d | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
- ac_need_defaults=false;;
- --he | --h | --help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { $as_echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1"
- ac_need_defaults=false ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
- shift
- \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
- CONFIG_SHELL='$SHELL'
- export CONFIG_SHELL
- exec "\$@"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
- $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
- case $ac_config_target in
- "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-
- *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
- tmp=
- trap 'exit_status=$?
- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./conf$$-$RANDOM
- (umask 077 && mkdir "$tmp")
-} ||
-{
- $as_echo "$as_me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=' '
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\\r'
-else
- ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
-_ACEOF
-
-
-{
- echo "cat >conf$$subs.awk <<_ACEOF" &&
- echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
- echo "_ACEOF"
-} >conf$$subs.sh ||
- { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
- . ./conf$$subs.sh ||
- { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
-
- ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
- if test $ac_delim_n = $ac_delim_num; then
- break
- elif $ac_last_try; then
- { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\).*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\).*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
- N
- s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
- for (key in S) S_is_set[key] = 1
- FS = ""
-
-}
-{
- line = $ 0
- nfields = split(line, field, "@")
- substed = 0
- len = length(field[1])
- for (i = 2; i < nfields; i++) {
- key = field[i]
- keylen = length(key)
- if (S_is_set[key]) {
- value = S[key]
- line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
- len += length(value) + length(field[++i])
- substed = 1
- } else
- len += 1 + keylen
- }
-
- print line
-}
-
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
- sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
- cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
- || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
-$as_echo "$as_me: error: could not setup config files machinery" >&2;}
- { (exit 1); exit 1; }; }
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[ ]*\):*/\1/
-s/:*$//
-s/^[^=]*=[ ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
-
-
-eval set X " :F $CONFIG_FILES "
-shift
-for ac_tag
-do
- case $ac_tag in
- :[FHLC]) ac_mode=$ac_tag; continue;;
- esac
- case $ac_mode$ac_tag in
- :[FHL]*:*);;
- :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
-$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
- { (exit 1); exit 1; }; };;
- :[FH]-) ac_tag=-:-;;
- :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
- esac
- ac_save_IFS=$IFS
- IFS=:
- set x $ac_tag
- IFS=$ac_save_IFS
- shift
- ac_file=$1
- shift
-
- case $ac_mode in
- :L) ac_source=$1;;
- :[FH])
- ac_file_inputs=
- for ac_f
- do
- case $ac_f in
- -) ac_f="$tmp/stdin";;
- *) # Look for the file first in the build tree, then in the source tree
- # (if the path is not absolute). The absolute path cannot be DOS-style,
- # because $ac_f cannot contain `:'.
- test -f "$ac_f" ||
- case $ac_f in
- [\\/$]*) false;;
- *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
- esac ||
- { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
- { (exit 1); exit 1; }; };;
- esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
- ac_file_inputs="$ac_file_inputs '$ac_f'"
- done
-
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
- `' by configure.'
- if test x"$ac_file" != x-; then
- configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
- fi
- # Neutralize special characters interpreted by sed in replacement strings.
- case $configure_input in #(
- *\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
- sed 's/[\\\\&|]/\\\\&/g'`;; #(
- *) ac_sed_conf_input=$configure_input;;
- esac
-
- case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin" \
- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
- { (exit 1); exit 1; }; } ;;
- esac
- ;;
- esac
-
- ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- { as_dir="$ac_dir"
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
- { (exit 1); exit 1; }; }; }
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
- case $ac_mode in
- :F)
- #
- # CONFIG_FILE
- #
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
- esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-
-ac_sed_dataroot='
-/datarootdir/ {
- p
- q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p
-'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_datarootdir_hack='
- s&@datadir@&$datadir&g
- s&@docdir@&$docdir&g
- s&@infodir@&$infodir&g
- s&@localedir@&$localedir&g
- s&@mandir@&$mandir&g
- s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
- { (exit 1); exit 1; }; }
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&2;}
-
- rm -f "$tmp/stdin"
- case $ac_file in
- -) cat "$tmp/out" && rm -f "$tmp/out";;
- *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
- esac \
- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
- { (exit 1); exit 1; }; }
- ;;
-
-
-
- esac
-
-done # for ac_tag
-
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-test $ac_write_fail = 0 ||
- { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || { (exit 1); exit 1; }
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
-
-
diff --git a/winsup/mingw/mingwex/configure.in b/winsup/mingw/mingwex/configure.in
deleted file mode 100644
index cc6f1ad..0000000
--- a/winsup/mingw/mingwex/configure.in
+++ /dev/null
@@ -1,55 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-
-dnl This file is part of Mingw runtime.
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 2 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; if not, write to the Free Software
-dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-AC_PREREQ(2.59)
-AC_INIT(imaxabs.c)
-
-CC=${CC-cc}
-AC_SUBST(CC)
-AS=${AS-as}
-AC_SUBST(AS)
-AR=${AR-ar}
-AC_SUBST(AR)
-LD=${LD-ld}
-AC_SUBST(LD)
-RANLIB=${RANLIB-ranlib}
-AC_SUBST(RANLIB)
-DLLTOOL=${DLLTOOL-dlltool}
-AC_SUBST(DLLTOOL)
-DLLWRAP=${DLLWRAP-dllwrap}
-AC_SUBST(DLLWRAP)
-AC_CANONICAL_SYSTEM
-
-case "$target_os" in
-*cygwin*)
- NO_CYGWIN="$(cd ${srcdir}/../../utils; pwd)/mingw"
- ;;
-*)
- # Build it for MSVCRT by default.
- NO_CYGWIN=
- ;;
-esac
-
-AC_SUBST(NO_CYGWIN)
-
-W32API_INCLUDE='-I $(srcdir)/../../w32api/include'
-AC_SUBST(W32API_INCLUDE)
-
-AC_PROG_INSTALL
-AC_OUTPUT(Makefile)
-
diff --git a/winsup/mingw/mingwex/dirent.c b/winsup/mingw/mingwex/dirent.c
deleted file mode 100644
index 399a8d1..0000000
--- a/winsup/mingw/mingwex/dirent.c
+++ /dev/null
@@ -1,341 +0,0 @@
-/*
- * dirent.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Derived from DIRLIB.C by Matt J. Weinstein
- * This note appears in the DIRLIB.H
- * DIRLIB.H by M. J. Weinstein Released to public domain 1-Jan-89
- *
- * Updated by Jeremy Bettis <jeremy@hksys.com>
- * Significantly revised and rewinddir, seekdir and telldir added by Colin
- * Peters <colin@fu.is.saga-u.ac.jp>
- *
- */
-
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <io.h>
-#include <direct.h>
-#include <dirent.h>
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h> /* for GetFileAttributes */
-
-#include <tchar.h>
-#define SUFFIX _T("*")
-#define SLASH _T("\\")
-
-
-/* Helper for opendir(). */
-static inline unsigned _tGetFileAttributes (const _TCHAR * tPath)
-{
-#ifdef _UNICODE
- /* GetFileAttributesW does not work on W9x, so convert to ANSI */
- if (_osver & 0x8000)
- {
- char aPath [MAX_PATH];
- WideCharToMultiByte (CP_ACP, 0, tPath, -1, aPath, MAX_PATH, NULL,
- NULL);
- return GetFileAttributesA (aPath);
- }
- return GetFileAttributesW (tPath);
-#else
- return GetFileAttributesA (tPath);
-#endif
-}
-
-/*
- * opendir
- *
- * Returns a pointer to a DIR structure appropriately filled in to begin
- * searching a directory.
- */
-_TDIR *
-_topendir (const _TCHAR *szPath)
-{
- _TDIR *nd;
- unsigned int rc;
- _TCHAR szFullPath[MAX_PATH];
-
- errno = 0;
-
- if (!szPath)
- {
- errno = EFAULT;
- return (_TDIR *) 0;
- }
-
- if (szPath[0] == _T('\0'))
- {
- errno = ENOTDIR;
- return (_TDIR *) 0;
- }
-
- /* Attempt to determine if the given path really is a directory. */
- rc = _tGetFileAttributes (szPath);
- if (rc == (unsigned int)-1)
- {
- /* call GetLastError for more error info */
- errno = ENOENT;
- return (_TDIR *) 0;
- }
- if (!(rc & FILE_ATTRIBUTE_DIRECTORY))
- {
- /* Error, entry exists but not a directory. */
- errno = ENOTDIR;
- return (_TDIR *) 0;
- }
-
- /* Make an absolute pathname. */
- _tfullpath (szFullPath, szPath, MAX_PATH);
-
- /* Allocate enough space to store DIR structure and the complete
- * directory path given. */
- nd = (_TDIR *) malloc (sizeof (_TDIR) + (_tcslen (szFullPath)
- + _tcslen (SLASH)
- + _tcslen (SUFFIX) + 1)
- * sizeof (_TCHAR));
-
- if (!nd)
- {
- /* Error, out of memory. */
- errno = ENOMEM;
- return (_TDIR *) 0;
- }
-
- /* Create the search expression. */
- _tcscpy (nd->dd_name, szFullPath);
-
- /* Add on a slash if the path does not end with one. */
- if (nd->dd_name[0] != _T('\0')
- && _tcsrchr (nd->dd_name, _T('/')) != nd->dd_name
- + _tcslen (nd->dd_name) - 1
- && _tcsrchr (nd->dd_name, _T('\\')) != nd->dd_name
- + _tcslen (nd->dd_name) - 1)
- {
- _tcscat (nd->dd_name, SLASH);
- }
-
- /* Add on the search pattern */
- _tcscat (nd->dd_name, SUFFIX);
-
- /* Initialize handle to -1 so that a premature closedir doesn't try
- * to call _findclose on it. */
- nd->dd_handle = -1;
-
- /* Initialize the status. */
- nd->dd_stat = 0;
-
- /* Initialize the dirent structure. ino and reclen are invalid under
- * Win32, and name simply points at the appropriate part of the
- * findfirst_t structure. */
- nd->dd_dir.d_ino = 0;
- nd->dd_dir.d_reclen = 0;
- nd->dd_dir.d_namlen = 0;
- memset (nd->dd_dir.d_name, 0, FILENAME_MAX);
-
- return nd;
-}
-
-
-/*
- * readdir
- *
- * Return a pointer to a dirent structure filled with the information on the
- * next entry in the directory.
- */
-struct _tdirent *
-_treaddir (_TDIR * dirp)
-{
- errno = 0;
-
- /* Check for valid DIR struct. */
- if (!dirp)
- {
- errno = EFAULT;
- return (struct _tdirent *) 0;
- }
-
- if (dirp->dd_stat < 0)
- {
- /* We have already returned all files in the directory
- * (or the structure has an invalid dd_stat). */
- return (struct _tdirent *) 0;
- }
- else if (dirp->dd_stat == 0)
- {
- /* We haven't started the search yet. */
- /* Start the search */
- dirp->dd_handle = _tfindfirst (dirp->dd_name, &(dirp->dd_dta));
-
- if (dirp->dd_handle == -1)
- {
- /* Whoops! Seems there are no files in that
- * directory. */
- dirp->dd_stat = -1;
- }
- else
- {
- dirp->dd_stat = 1;
- }
- }
- else
- {
- /* Get the next search entry. */
- if (_tfindnext (dirp->dd_handle, &(dirp->dd_dta)))
- {
- /* We are off the end or otherwise error.
- _findnext sets errno to ENOENT if no more file
- Undo this. */
- DWORD winerr = GetLastError ();
- if (winerr == ERROR_NO_MORE_FILES)
- errno = 0;
- _findclose (dirp->dd_handle);
- dirp->dd_handle = -1;
- dirp->dd_stat = -1;
- }
- else
- {
- /* Update the status to indicate the correct
- * number. */
- dirp->dd_stat++;
- }
- }
-
- if (dirp->dd_stat > 0)
- {
- /* Successfully got an entry. Everything about the file is
- * already appropriately filled in except the length of the
- * file name. */
- dirp->dd_dir.d_namlen = _tcslen (dirp->dd_dta.name);
- _tcscpy (dirp->dd_dir.d_name, dirp->dd_dta.name);
- return &dirp->dd_dir;
- }
-
- return (struct _tdirent *) 0;
-}
-
-
-/*
- * closedir
- *
- * Frees up resources allocated by opendir.
- */
-int
-_tclosedir (_TDIR * dirp)
-{
- int rc;
-
- errno = 0;
- rc = 0;
-
- if (!dirp)
- {
- errno = EFAULT;
- return -1;
- }
-
- if (dirp->dd_handle != -1)
- {
- rc = _findclose (dirp->dd_handle);
- }
-
- /* Delete the dir structure. */
- free (dirp);
-
- return rc;
-}
-
-/*
- * rewinddir
- *
- * Return to the beginning of the directory "stream". We simply call findclose
- * and then reset things like an opendir.
- */
-void
-_trewinddir (_TDIR * dirp)
-{
- errno = 0;
-
- if (!dirp)
- {
- errno = EFAULT;
- return;
- }
-
- if (dirp->dd_handle != -1)
- {
- _findclose (dirp->dd_handle);
- }
-
- dirp->dd_handle = -1;
- dirp->dd_stat = 0;
-}
-
-/*
- * telldir
- *
- * Returns the "position" in the "directory stream" which can be used with
- * seekdir to go back to an old entry. We simply return the value in stat.
- */
-long
-_ttelldir (_TDIR * dirp)
-{
- errno = 0;
-
- if (!dirp)
- {
- errno = EFAULT;
- return -1;
- }
- return dirp->dd_stat;
-}
-
-/*
- * seekdir
- *
- * Seek to an entry previously returned by telldir. We rewind the directory
- * and call readdir repeatedly until either dd_stat is the position number
- * or -1 (off the end). This is not perfect, in that the directory may
- * have changed while we weren't looking. But that is probably the case with
- * any such system.
- */
-void
-_tseekdir (_TDIR * dirp, long lPos)
-{
- errno = 0;
-
- if (!dirp)
- {
- errno = EFAULT;
- return;
- }
-
- if (lPos < -1)
- {
- /* Seeking to an invalid position. */
- errno = EINVAL;
- return;
- }
- else if (lPos == -1)
- {
- /* Seek past end. */
- if (dirp->dd_handle != -1)
- {
- _findclose (dirp->dd_handle);
- }
- dirp->dd_handle = -1;
- dirp->dd_stat = -1;
- }
- else
- {
- /* Rewind and read forward to the appropriate index. */
- _trewinddir (dirp);
-
- while ((dirp->dd_stat < lPos) && _treaddir (dirp))
- ;
- }
-}
diff --git a/winsup/mingw/mingwex/dirname.c b/winsup/mingw/mingwex/dirname.c
deleted file mode 100755
index 20d7a30..0000000
--- a/winsup/mingw/mingwex/dirname.c
+++ /dev/null
@@ -1,235 +0,0 @@
-/* dirname.c
- *
- * $Id$
- *
- * Provides an implementation of the "dirname" function, conforming
- * to SUSv3, with extensions to accommodate Win32 drive designators,
- * and suitable for use on native Microsoft(R) Win32 platforms.
- *
- * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- *
- * This is free software. You may redistribute and/or modify it as you
- * see fit, without restriction of copyright.
- *
- * This software is provided "as is", in the hope that it may be useful,
- * but WITHOUT WARRANTY OF ANY KIND, not even any implied warranty of
- * MERCHANTABILITY, nor of FITNESS FOR ANY PARTICULAR PURPOSE. At no
- * time will the author accept any form of liability for any damages,
- * however caused, resulting from the use of this software.
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <libgen.h>
-#include <locale.h>
-
-#ifndef __cdecl /* If compiling on any non-Win32 platform ... */
-#define __cdecl /* this may not be defined. */
-#endif
-
-__cdecl char *dirname( char *path )
-{
- size_t len;
- static char *retfail = NULL;
-
- /* to handle path names for files in multibyte character locales,
- * we need to set up LC_CTYPE to match the host file system locale.
- */
-
- char *locale = setlocale( LC_CTYPE, NULL );
- if( locale != NULL ) locale = strdup( locale );
- setlocale( LC_CTYPE, "" );
-
- if( path && *path )
- {
- /* allocate sufficient local storage space,
- * in which to create a wide character reference copy of path
- */
-
- wchar_t refcopy[1 + (len = mbstowcs( NULL, path, 0 ))];
-
- /* create the wide character reference copy of path */
-
- wchar_t *refpath = refcopy;
- len = mbstowcs( refpath, path, len );
- refcopy[ len ] = L'\0';
-
- /* SUSv3 identifies a special case, where path is exactly equal to "//";
- * (we will also accept "\\" in the Win32 context, but not "/\" or "\/",
- * and neither will we consider paths with an initial drive designator).
- * For this special case, SUSv3 allows the implementation to choose to
- * return "/" or "//", (or "\" or "\\", since this is Win32); we will
- * simply return the path unchanged, (i.e. "//" or "\\").
- */
-
- if( (len > 1) && ((refpath[0] == L'/') || (refpath[0] == L'\\')) )
- {
- if( (refpath[1] == refpath[0]) && (refpath[2] == L'\0') )
- {
- setlocale( LC_CTYPE, locale );
- free( locale );
- return path;
- }
- }
-
- /* For all other cases ...
- * step over the drive designator, if present ...
- */
-
- else if( (len > 1) && (refpath[1] == L':') )
- {
- /* FIXME: maybe should confirm *refpath is a valid drive designator */
-
- refpath += 2;
- }
-
- /* check again, just to ensure we still have a non-empty path name ... */
-
- if( *refpath )
- {
- /* reproduce the scanning logic of the "basename" function
- * to locate the basename component of the current path string,
- * (but also remember where the dirname component starts).
- */
-
- wchar_t *refname, *basename;
- for( refname = basename = refpath ; *refpath ; ++refpath )
- {
- if( (*refpath == L'/') || (*refpath == L'\\') )
- {
- /* we found a dir separator ...
- * step over it, and any others which immediately follow it
- */
-
- while( (*refpath == L'/') || (*refpath == L'\\') )
- ++refpath;
-
- /* if we didn't reach the end of the path string ... */
-
- if( *refpath )
-
- /* then we have a new candidate for the base name */
-
- basename = refpath;
-
- else
-
- /* we struck an early termination of the path string,
- * with trailing dir separators following the base name,
- * so break out of the for loop, to avoid overrun.
- */
-
- break;
- }
- }
-
- /* now check,
- * to confirm that we have distinct dirname and basename components
- */
-
- if( basename > refname )
- {
- /* and, when we do ...
- * backtrack over all trailing separators on the dirname component,
- * (but preserve exactly two initial dirname separators, if identical),
- * and add a NUL terminator in their place.
- */
-
- do --basename;
- while( (basename > refname) && ((*basename == L'/') || (*basename == L'\\')) );
- if( (basename == refname) && ((refname[0] == L'/') || (refname[0] == L'\\'))
- && (refname[1] == refname[0]) && (refname[2] != L'/') && (refname[2] != L'\\') )
- ++basename;
- *++basename = L'\0';
-
- /* if the resultant dirname begins with EXACTLY two dir separators,
- * AND both are identical, then we preserve them.
- */
-
- refpath = refcopy;
- while( ((*refpath == L'/') || (*refpath == L'\\')) )
- ++refpath;
- if( ((refpath - refcopy) > 2) || (refcopy[1] != refcopy[0]) )
- refpath = refcopy;
-
- /* and finally ...
- * we remove any residual, redundantly duplicated separators from the dirname,
- * reterminate, and return it.
- */
-
- refname = refpath;
- while( *refpath )
- {
- if( ((*refname++ = *refpath) == L'/') || (*refpath++ == L'\\') )
- {
- while( (*refpath == L'/') || (*refpath == L'\\') )
- ++refpath;
- }
- }
- *refname = L'\0';
-
- /* finally ...
- * transform the resolved dirname back into the multibyte char domain,
- * restore the caller's locale, and return the resultant dirname
- */
-
- if( (len = wcstombs( path, refcopy, len )) != (size_t)(-1) )
- path[ len ] = '\0';
- }
-
- else
- {
- /* either there were no dirname separators in the path name,
- * or there was nothing else ...
- */
-
- if( (*refname == L'/') || (*refname == L'\\') )
- {
- /* it was all separators, so return one */
-
- ++refname;
- }
-
- else
- {
- /* there were no separators, so return '.' */
-
- *refname++ = L'.';
- }
-
- /* add a NUL terminator, in either case,
- * then transform to the multibyte char domain,
- * using our own buffer
- */
-
- *refname = L'\0';
- retfail = realloc( retfail, len = 1 + wcstombs( NULL, refcopy, 0 ));
- wcstombs( path = retfail, refcopy, len );
- }
-
- /* restore caller's locale, clean up, and return the resolved dirname */
-
- setlocale( LC_CTYPE, locale );
- free( locale );
- return path;
- }
- }
-
- /* path is NULL, or an empty string; default return value is "." ...
- * return this in our own buffer, regenerated by wide char transform,
- * in case the caller trashed it after a previous call.
- */
-
- retfail = realloc( retfail, len = 1 + wcstombs( NULL, L".", 0 ));
- wcstombs( retfail, L".", len );
-
- /* restore caller's locale, clean up, and return the default dirname */
-
- setlocale( LC_CTYPE, locale );
- free( locale );
- return retfail;
-}
-
-/* $RCSfile$$Revision$: end of file */
diff --git a/winsup/mingw/mingwex/feclearexcept.c b/winsup/mingw/mingwex/feclearexcept.c
deleted file mode 100644
index a68884f..0000000
--- a/winsup/mingw/mingwex/feclearexcept.c
+++ /dev/null
@@ -1,24 +0,0 @@
-#include <fenv.h>
-#include "cpu_features.h"
-
-/* 7.6.2.1
- The feclearexcept function clears the supported exceptions
- represented by its argument. */
-
-int feclearexcept (int excepts)
-{
- fenv_t _env;
- excepts &= FE_ALL_EXCEPT;
- __asm__ volatile ("fnstenv %0;" : "=m" (_env)); /* get the env */
- _env.__status_word &= ~excepts; /* clear the except */
- __asm__ volatile ("fldenv %0;" :: "m" (_env)); /*set the env */
-
- if (__HAS_SSE)
- {
- unsigned _csr;
- __asm__ volatile("stmxcsr %0" : "=m" (_csr)); /* get the register */
- _csr &= ~excepts; /* clear the except */
- __asm__ volatile("ldmxcsr %0" : : "m" (_csr)); /* set the register */
- }
- return 0;
-}
diff --git a/winsup/mingw/mingwex/fegetenv.c b/winsup/mingw/mingwex/fegetenv.c
deleted file mode 100644
index 0c5d591..0000000
--- a/winsup/mingw/mingwex/fegetenv.c
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <fenv.h>
-#include "cpu_features.h"
-
-/* 7.6.4.1
- The fegetenv function stores the current floating-point environment
- in the object pointed to by envp. */
-
-int fegetenv (fenv_t * envp)
-{
- __asm__ ("fnstenv %0;": "=m" (*envp));
- /* fnstenv sets control word to non-stop for all exceptions, so we
- need to reload our env to restore the original mask. */
- __asm__ ("fldenv %0" : : "m" (*envp));
-
- /* And the SSE environment. */
- if (__HAS_SSE)
- __asm__ ("stmxcsr %0" : "=m" (envp->__mxcsr));
-
- return 0;
-}
diff --git a/winsup/mingw/mingwex/fegetexceptflag.c b/winsup/mingw/mingwex/fegetexceptflag.c
deleted file mode 100644
index 353e90d..0000000
--- a/winsup/mingw/mingwex/fegetexceptflag.c
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <fenv.h>
-
-
-/* 7.6.2.2
- The fegetexceptflag function stores an implementation-defined
- representation of the exception flags indicated by the argument
- excepts in the object pointed to by the argument flagp. */
-
-int fegetexceptflag (fexcept_t * flagp, int excepts)
-{
- unsigned short _sw;
- __asm__ ("fnstsw %%ax;": "=a" (_sw));
- *flagp = _sw & excepts & FE_ALL_EXCEPT;
- return 0;
-}
diff --git a/winsup/mingw/mingwex/fegetround.c b/winsup/mingw/mingwex/fegetround.c
deleted file mode 100644
index 01d4284..0000000
--- a/winsup/mingw/mingwex/fegetround.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <fenv.h>
-#include "cpu_features.h"
-
-/* 7.6.3.1
- The fegetround function returns the value of the rounding direction
- macro representing the current rounding direction. */
-
-int
-fegetround (void)
-{
- unsigned short _cw;
- __asm__ ("fnstcw %0;" : "=m" (_cw));
-
- /* If the MXCSR flag is different, there is no way to indicate, so just
- report the FPU flag. */
- return _cw
- & (FE_TONEAREST | FE_DOWNWARD | FE_UPWARD | FE_TOWARDZERO);
-
-}
diff --git a/winsup/mingw/mingwex/feholdexcept.c b/winsup/mingw/mingwex/feholdexcept.c
deleted file mode 100644
index 66912d8..0000000
--- a/winsup/mingw/mingwex/feholdexcept.c
+++ /dev/null
@@ -1,30 +0,0 @@
-#include <fenv.h>
-#include "cpu_features.h"
-
-/* 7.6.4.2
- The feholdexcept function saves the current floating-point
- environment in the object pointed to by envp, clears the exception
- flags, and then installs a non-stop (continue on exceptions) mode,
- if available, for all exceptions. */
-
-int feholdexcept (fenv_t * envp)
-{
- __asm__ ("fnstenv %0;" : "=m" (* envp)); /* save current into envp */
- /* fnstenv sets control word to non-stop for all exceptions, so all we
- need to do is clear the exception flags. */
- __asm__ ("fnclex");
-
- if (__HAS_SSE)
- {
- unsigned int _csr;
- /* Save the SSE MXCSR register. */
- __asm__ ("stmxcsr %0" : "=m" (envp->__mxcsr));
- /* Clear the exception flags. */
- _csr = envp->__mxcsr & ~FE_ALL_EXCEPT;
- /* Set exception mask to non-stop */
- _csr |= (FE_ALL_EXCEPT << __MXCSR_EXCEPT_MASK_SHIFT) /*= 0x1f80 */;
- __asm__ volatile ("ldmxcsr %0" : : "m" (_csr));
- }
-
- return 0;
-}
diff --git a/winsup/mingw/mingwex/feraiseexcept.c b/winsup/mingw/mingwex/feraiseexcept.c
deleted file mode 100644
index b1ba870..0000000
--- a/winsup/mingw/mingwex/feraiseexcept.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <fenv.h>
-
-/* 7.6.2.3
- The feraiseexcept function raises the supported exceptions
- represented by its argument The order in which these exceptions
- are raised is unspecified, except as stated in F.7.6.
- Whether the feraiseexcept function additionally raises
- the inexact exception whenever it raises the overflow
- or underflow exception is implementation-defined. */
-
-int feraiseexcept (int excepts)
-{
- fenv_t _env;
- __asm__ volatile ("fnstenv %0;" : "=m" (_env));
- _env.__status_word |= excepts & FE_ALL_EXCEPT;
- __asm__ volatile ("fldenv %0;"
- "fwait;" : : "m" (_env));
- return 0;
-}
diff --git a/winsup/mingw/mingwex/fesetenv.c b/winsup/mingw/mingwex/fesetenv.c
deleted file mode 100644
index 105a0af..0000000
--- a/winsup/mingw/mingwex/fesetenv.c
+++ /dev/null
@@ -1,57 +0,0 @@
-#include <fenv.h>
-#include <float.h>
-#include "cpu_features.h"
-
-/* 7.6.4.3
- The fesetenv function establishes the floating-point environment
- represented by the object pointed to by envp. The argument envp
- points to an object set by a call to fegetenv or feholdexcept, or
- equal the macro FE_DFL_ENV or an implementation-defined environment
- macro. Note that fesetenv merely installs the state of the exception
- flags represented through its argument, and does not raise these
- exceptions.
- */
-
-extern void (*_imp___fpreset)( void ) ;
-
-int fesetenv (const fenv_t * envp)
-{
- /* Default mxcsr status is to mask all exceptions. All other bits
- are zero. */
-
- unsigned int _csr = FE_ALL_EXCEPT << __MXCSR_EXCEPT_MASK_SHIFT /*= 0x1f80 */;
-
- if (envp == FE_PC64_ENV)
- /*
- * fninit initializes the control register to 0x37f,
- * the status register to zero and the tag word to 0FFFFh.
- * The other registers are unaffected.
- */
- __asm__ ("fninit");
-
- else if (envp == FE_PC53_ENV)
- /*
- * MS _fpreset() does same *except* it sets control word
- * to 0x27f (53-bit precison).
- * We force calling _fpreset in msvcrt.dll
- */
-
- (*_imp___fpreset)();
-
- else if (envp == FE_DFL_ENV)
- /* Use the choice made at app startup */
- _fpreset();
-
- else
- {
- __asm__ ("fldenv %0;" : : "m" (*envp));
- /* Setting the reserved high order bits of MXCSR causes a segfault */
- _csr = envp ->__mxcsr & 0xffff;
- }
-
- /* Set MXCSR */
- if (__HAS_SSE)
- __asm__ volatile ("ldmxcsr %0" : : "m" (_csr));
-
- return 0;
-}
diff --git a/winsup/mingw/mingwex/fesetexceptflag.c b/winsup/mingw/mingwex/fesetexceptflag.c
deleted file mode 100644
index 876174b..0000000
--- a/winsup/mingw/mingwex/fesetexceptflag.c
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <fenv.h>
-#include "cpu_features.h"
-
-/* 7.6.2.4
- The fesetexceptflag function sets the complete status for those
- exception flags indicated by the argument excepts, according to the
- representation in the object pointed to by flagp. The value of
- *flagp shall have been set by a previous call to fegetexceptflag
- whose second argument represented at least those exceptions
- represented by the argument excepts. This function does not raise
- exceptions, but only sets the state of the flags. */
-
-int fesetexceptflag (const fexcept_t * flagp, int excepts)
-{
- fenv_t _env;
-
- excepts &= FE_ALL_EXCEPT;
- __asm__ volatile ("fnstenv %0;" : "=m" (_env));
- _env.__status_word &= ~excepts;
- _env.__status_word |= (*flagp & excepts);
- __asm__ volatile ("fldenv %0;" : : "m" (_env));
-
- if (__HAS_SSE)
- {
- unsigned int _csr;
- __asm__ __volatile__("stmxcsr %0" : "=m" (_csr));
- _csr &= ~excepts;
- _csr |= *flagp & excepts;
- __asm__ volatile ("ldmxcsr %0" : : "m" (_csr));
- }
-
- return 0;
-}
diff --git a/winsup/mingw/mingwex/fesetround.c b/winsup/mingw/mingwex/fesetround.c
deleted file mode 100644
index f14e6a6..0000000
--- a/winsup/mingw/mingwex/fesetround.c
+++ /dev/null
@@ -1,31 +0,0 @@
-#include <fenv.h>
-#include "cpu_features.h"
-
- /* 7.6.3.2
- The fesetround function establishes the rounding direction
- represented by its argument round. If the argument is not equal
- to the value of a rounding direction macro, the rounding direction
- is not changed. */
-
-int fesetround (int mode)
-{
- unsigned short _cw;
- if ((mode & ~(FE_TONEAREST | FE_DOWNWARD | FE_UPWARD | FE_TOWARDZERO))
- != 0)
- return -1;
- __asm__ volatile ("fnstcw %0;": "=m" (_cw));
- _cw &= ~(FE_TONEAREST | FE_DOWNWARD | FE_UPWARD | FE_TOWARDZERO);
- _cw |= mode;
- __asm__ volatile ("fldcw %0;" : : "m" (_cw));
-
- if (__HAS_SSE)
- {
- unsigned int _mxcsr;
- __asm__ volatile ("stmxcsr %0" : "=m" (_mxcsr));
- _mxcsr &= ~ 0x6000;
- _mxcsr |= (mode << __MXCSR_ROUND_FLAG_SHIFT);
- __asm__ volatile ("ldmxcsr %0" : : "m" (_mxcsr));
- }
-
- return 0;
-}
diff --git a/winsup/mingw/mingwex/fetestexcept.c b/winsup/mingw/mingwex/fetestexcept.c
deleted file mode 100644
index 062d585..0000000
--- a/winsup/mingw/mingwex/fetestexcept.c
+++ /dev/null
@@ -1,27 +0,0 @@
-#include <fenv.h>
-#include "cpu_features.h"
-/* 7.6.2.5
- The fetestexcept function determines which of a specified subset of
- the exception flags are currently set. The excepts argument
- specifies the exception flags to be queried.
- The fetestexcept function returns the value of the bitwise OR of the
- exception macros corresponding to the currently set exceptions
- included in excepts. */
-
-int fetestexcept (int excepts)
-{
-
- unsigned int _res;
- __asm__ ("fnstsw %%ax" : "=a" (_res));
-
-
- /* If SSE supported, return the union of the FPU and SSE flags. */
- if (__HAS_SSE)
- {
- unsigned int _csr;
- __asm__ volatile("stmxcsr %0" : "=m" (_csr));
- _res |= _csr;
- }
-
- return (_res & excepts & FE_ALL_EXCEPT);
-}
diff --git a/winsup/mingw/mingwex/feupdateenv.c b/winsup/mingw/mingwex/feupdateenv.c
deleted file mode 100644
index e37566b..0000000
--- a/winsup/mingw/mingwex/feupdateenv.c
+++ /dev/null
@@ -1,26 +0,0 @@
-#include <fenv.h>
-#include "cpu_features.h"
-
-/* 7.6.4.4
- The feupdateenv function saves the currently raised exceptions in
- its automatic storage, installs the floating-point environment
- represented by the object pointed to by envp, and then raises the
- saved exceptions. The argument envp shall point to an object
- set by a call to feholdexcept or fegetenv, or equal the macro
- FE_DFL_ENV or an implementation-defined environment macro. */
-
-
-int feupdateenv (const fenv_t * envp)
-{
- unsigned int _fexcept;
- __asm__ ("fnstsw %%ax" : "=a" (_fexcept)); /*save excepts */
- if (__HAS_SSE)
- {
- unsigned int _csr;
- __asm__ ("stmxcsr %0" : "=m" (_csr));
- _fexcept |= _csr;
- }
- fesetenv (envp); /* install the env */
- feraiseexcept (_fexcept & FE_ALL_EXCEPT); /* raise the execeptions */
- return 0;
-}
diff --git a/winsup/mingw/mingwex/ftruncate.c b/winsup/mingw/mingwex/ftruncate.c
deleted file mode 100755
index fdb6295..0000000
--- a/winsup/mingw/mingwex/ftruncate.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <unistd.h>
-int ftruncate(int __fd, off_t __length)
-{
- return _chsize (__fd, __length);
-}
diff --git a/winsup/mingw/mingwex/fwide.c b/winsup/mingw/mingwex/fwide.c
deleted file mode 100644
index 79d5848..0000000
--- a/winsup/mingw/mingwex/fwide.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <wchar.h>
-#include <stdio.h>
-
-int
-fwide(FILE* stream, int mode)
-{
- return mode; /* Nothing to do. */
-}
-
diff --git a/winsup/mingw/mingwex/gdtoa/README b/winsup/mingw/mingwex/gdtoa/README
deleted file mode 100755
index cf1947a..0000000
--- a/winsup/mingw/mingwex/gdtoa/README
+++ /dev/null
@@ -1,336 +0,0 @@
-This directory contains source for a library of binary -> decimal
-and decimal -> binary conversion routines, for single-, double-,
-and extended-precision IEEE binary floating-point arithmetic, and
-other IEEE-like binary floating-point, including "double double",
-as in
-
- T. J. Dekker, "A Floating-Point Technique for Extending the
- Available Precision", Numer. Math. 18 (1971), pp. 224-242
-
-and
-
- "Inside Macintosh: PowerPC Numerics", Addison-Wesley, 1994
-
-The conversion routines use double-precision floating-point arithmetic
-and, where necessary, high precision integer arithmetic. The routines
-are generalizations of the strtod and dtoa routines described in
-
- David M. Gay, "Correctly Rounded Binary-Decimal and
- Decimal-Binary Conversions", Numerical Analysis Manuscript
- No. 90-10, Bell Labs, Murray Hill, 1990;
- http://cm.bell-labs.com/cm/cs/what/ampl/REFS/rounding.ps.gz
-
-(based in part on papers by Clinger and Steele & White: see the
-references in the above paper).
-
-The present conversion routines should be able to use any of IEEE binary,
-VAX, or IBM-mainframe double-precision arithmetic internally, but I (dmg)
-have so far only had a chance to test them with IEEE double precision
-arithmetic.
-
-The core conversion routines are strtodg for decimal -> binary conversions
-and gdtoa for binary -> decimal conversions. These routines operate
-on arrays of unsigned 32-bit integers of type ULong, a signed 32-bit
-exponent of type Long, and arithmetic characteristics described in
-struct FPI; FPI, Long, and ULong are defined in gdtoa.h. File arith.h
-is supposed to provide #defines that cause gdtoa.h to define its
-types correctly. File arithchk.c is source for a program that
-generates a suitable arith.h on all systems where I've been able to
-test it.
-
-The core conversion routines are meant to be called by helper routines
-that know details of the particular binary arithmetic of interest and
-convert. The present directory provides helper routines for 5 variants
-of IEEE binary floating-point arithmetic, each indicated by one or
-two letters:
-
- f IEEE single precision
- d IEEE double precision
- x IEEE extended precision, as on Intel 80x87
- and software emulations of Motorola 68xxx chips
- that do not pad the way the 68xxx does, but
- only store 80 bits
- xL IEEE extended precision, as on Motorola 68xxx chips
- Q quad precision, as on Sun Sparc chips
- dd double double, pairs of IEEE double numbers
- whose sum is the desired value
-
-For decimal -> binary conversions, there are three families of
-helper routines: one for round-nearest:
-
- strtof
- strtod
- strtodd
- strtopd
- strtopf
- strtopx
- strtopxL
- strtopQ
-
-one with rounding direction specified:
-
- strtorf
- strtord
- strtordd
- strtorx
- strtorxL
- strtorQ
-
-and one for computing an interval (at most one bit wide) that contains
-the decimal number:
-
- strtoIf
- strtoId
- strtoIdd
- strtoIx
- strtoIxL
- strtoIQ
-
-The latter call strtoIg, which makes one call on strtodg and adjusts
-the result to provide the desired interval. On systems where native
-arithmetic can easily make one-ulp adjustments on values in the
-desired floating-point format, it might be more efficient to use the
-native arithmetic. Routine strtodI is a variant of strtoId that
-illustrates one way to do this for IEEE binary double-precision
-arithmetic -- but whether this is more efficient remains to be seen.
-
-Functions strtod and strtof have "natural" return types, float and
-double -- strtod is specified by the C standard, and strtof appears
-in the stdlib.h of some systems, such as (at least some) Linux systems.
-The other functions write their results to their final argument(s):
-to the final two argument for the strtoI... (interval) functions,
-and to the final argument for the others (strtop... and strtor...).
-Where possible, these arguments have "natural" return types (double*
-or float*), to permit at least some type checking. In reality, they
-are viewed as arrays of ULong (or, for the "x" functions, UShort)
-values. On systems where long double is the appropriate type, one can
-pass long double* final argument(s) to these routines. The int value
-that these routines return is the return value from the call they make
-on strtodg; see the enum of possible return values in gdtoa.h.
-
-Source files g_ddfmt.c, misc.c, smisc.c, strtod.c, strtodg.c, and ulp.c
-should use true IEEE double arithmetic (not, e.g., double extended),
-at least for storing (and viewing the bits of) the variables declared
-"double" within them.
-
-One detail indicated in struct FPI is whether the target binary
-arithmetic departs from the IEEE standard by flushing denormalized
-numbers to 0. On systems that do this, the helper routines for
-conversion to double-double format (when compiled with
-Sudden_Underflow #defined) penalize the bottom of the exponent
-range so that they return a nonzero result only when the least
-significant bit of the less significant member of the pair of
-double values returned can be expressed as a normalized double
-value. An alternative would be to drop to 53-bit precision near
-the bottom of the exponent range. To get correct rounding, this
-would (in general) require two calls on strtodg (one specifying
-126-bit arithmetic, then, if necessary, one specifying 53-bit
-arithmetic).
-
-By default, the core routine strtodg and strtod set errno to ERANGE
-if the result overflows to +Infinity or underflows to 0. Compile
-these routines with NO_ERRNO #defined to inhibit errno assignments.
-
-Routine strtod is based on netlib's "dtoa.c from fp", and
-(f = strtod(s,se)) is more efficient for some conversions than, say,
-strtord(s,se,1,&f). Parts of strtod require true IEEE double
-arithmetic with the default rounding mode (round-to-nearest) and, on
-systems with IEEE extended-precision registers, double-precision
-(53-bit) rounding precision. If the machine uses (the equivalent of)
-Intel 80x87 arithmetic, the call
- _control87(PC_53, MCW_PC);
-does this with many compilers. Whether this or another call is
-appropriate depends on the compiler; for this to work, it may be
-necessary to #include "float.h" or another system-dependent header
-file.
-
-Source file strtodnrp.c gives a strtod that does not require 53-bit
-rounding precision on systems (such as Intel IA32 systems) that may
-suffer double rounding due to use of extended-precision registers.
-For some conversions this variant of strtod is less efficient than the
-one in strtod.c when the latter is run with 53-bit rounding precision.
-
-The values that the strto* routines return for NaNs are determined by
-gd_qnan.h, which the makefile generates by running the program whose
-source is qnan.c. Note that the rules for distinguishing signaling
-from quiet NaNs are system-dependent. For cross-compilation, you need
-to determine arith.h and gd_qnan.h suitably, e.g., using the
-arithmetic of the target machine.
-
-C99's hexadecimal floating-point constants are recognized by the
-strto* routines (but this feature has not yet been heavily tested).
-Compiling with NO_HEX_FP #defined disables this feature.
-
-When compiled with -DINFNAN_CHECK, the strto* routines recognize C99's
-NaN and Infinity syntax. Moreover, unless No_Hex_NaN is #defined, the
-strto* routines also recognize C99's NaN(...) syntax: they accept
-(case insensitively) strings of the form NaN(x), where x is a string
-of hexadecimal digits and spaces; if there is only one string of
-hexadecimal digits, it is taken for the fraction bits of the resulting
-NaN; if there are two or more strings of hexadecimal digits, each
-string is assigned to the next available sequence of 32-bit words of
-fractions bits (starting with the most significant), right-aligned in
-each sequence.
-
-For binary -> decimal conversions, I've provided just one family
-of helper routines:
-
- g_ffmt
- g_dfmt
- g_ddfmt
- g_xfmt
- g_xLfmt
- g_Qfmt
-
-which do a "%g" style conversion either to a specified number of decimal
-places (if their ndig argument is positive), or to the shortest
-decimal string that rounds to the given binary floating-point value
-(if ndig <= 0). They write into a buffer supplied as an argument
-and return either a pointer to the end of the string (a null character)
-in the buffer, if the buffer was long enough, or 0. Other forms of
-conversion are easily done with the help of gdtoa(), such as %e or %f
-style and conversions with direction of rounding specified (so that, if
-desired, the decimal value is either >= or <= the binary value).
-
-For an example of more general conversions based on dtoa(), see
-netlib's "printf.c from ampl/solvers".
-
-For double-double -> decimal, g_ddfmt() assumes IEEE-like arithmetic
-of precision max(126, #bits(input)) bits, where #bits(input) is the
-number of mantissa bits needed to represent the sum of the two double
-values in the input.
-
-The makefile creates a library, gdtoa.a. To use the helper
-routines, a program only needs to include gdtoa.h. All the
-source files for gdtoa.a include a more extensive gdtoaimp.h;
-among other things, gdtoaimp.h has #defines that make "internal"
-names end in _D2A. To make a "system" library, one could modify
-these #defines to make the names start with __.
-
-Various comments about possible #defines appear in gdtoaimp.h,
-but for most purposes, arith.h should set suitable #defines.
-
-Systems with preemptive scheduling of multiple threads require some
-manual intervention. On such systems, it's necessary to compile
-dmisc.c, dtoa.c gdota.c, and misc.c with MULTIPLE_THREADS #defined,
-and to provide (or suitably #define) two locks, acquired by
-ACQUIRE_DTOA_LOCK(n) and freed by FREE_DTOA_LOCK(n) for n = 0 or 1.
-(The second lock, accessed in pow5mult, ensures lazy evaluation of
-only one copy of high powers of 5; omitting this lock would introduce
-a small probability of wasting memory, but would otherwise be harmless.)
-Routines that call dtoa or gdtoa directly must also invoke freedtoa(s)
-to free the value s returned by dtoa or gdtoa. It's OK to do so whether
-or not MULTIPLE_THREADS is #defined, and the helper g_*fmt routines
-listed above all do this indirectly (in gfmt_D2A(), which they all call).
-
-By default, there is a private pool of memory of length 2000 bytes
-for intermediate quantities, and MALLOC (see gdtoaimp.h) is called only
-if the private pool does not suffice. 2000 is large enough that MALLOC
-is called only under very unusual circumstances (decimal -> binary
-conversion of very long strings) for conversions to and from double
-precision. For systems with preemptively scheduled multiple threads
-or for conversions to extended or quad, it may be appropriate to
-#define PRIVATE_MEM nnnn, where nnnn is a suitable value > 2000.
-For extended and quad precisions, -DPRIVATE_MEM=20000 is probably
-plenty even for many digits at the ends of the exponent range.
-Use of the private pool avoids some overhead.
-
-Directory test provides some test routines. See its README.
-I've also tested this stuff (except double double conversions)
-with Vern Paxson's testbase program: see
-
- V. Paxson and W. Kahan, "A Program for Testing IEEE Binary-Decimal
- Conversion", manuscript, May 1991,
- ftp://ftp.ee.lbl.gov/testbase-report.ps.Z .
-
-(The same ftp directory has source for testbase.)
-
-Some system-dependent additions to CFLAGS in the makefile:
-
- HU-UX: -Aa -Ae
- OSF (DEC Unix): -ieee_with_no_inexact
- SunOS 4.1x: -DKR_headers -DBad_float_h
-
-If you want to put this stuff into a shared library and your
-operating system requires export lists for shared libraries,
-the following would be an appropriate export list:
-
- dtoa
- freedtoa
- g_Qfmt
- g_ddfmt
- g_dfmt
- g_ffmt
- g_xLfmt
- g_xfmt
- gdtoa
- strtoIQ
- strtoId
- strtoIdd
- strtoIf
- strtoIx
- strtoIxL
- strtod
- strtodI
- strtodg
- strtof
- strtopQ
- strtopd
- strtopdd
- strtopf
- strtopx
- strtopxL
- strtorQ
- strtord
- strtordd
- strtorf
- strtorx
- strtorxL
-
-When time permits, I (dmg) hope to write in more detail about the
-present conversion routines; for now, this README file must suffice.
-Meanwhile, if you wish to write helper functions for other kinds of
-IEEE-like arithmetic, some explanation of struct FPI and the bits
-array may be helpful. Both gdtoa and strtodg operate on a bits array
-described by FPI *fpi. The bits array is of type ULong, a 32-bit
-unsigned integer type. Floating-point numbers have fpi->nbits bits,
-with the least significant 32 bits in bits[0], the next 32 bits in
-bits[1], etc. These numbers are regarded as integers multiplied by
-2^e (i.e., 2 to the power of the exponent e), where e is the second
-argument (be) to gdtoa and is stored in *exp by strtodg. The minimum
-and maximum exponent values fpi->emin and fpi->emax for normalized
-floating-point numbers reflect this arrangement. For example, the
-P754 standard for binary IEEE arithmetic specifies doubles as having
-53 bits, with normalized values of the form 1.xxxxx... times 2^(b-1023),
-with 52 bits (the x's) and the biased exponent b represented explicitly;
-b is an unsigned integer in the range 1 <= b <= 2046 for normalized
-finite doubles, b = 0 for denormals, and b = 2047 for Infinities and NaNs.
-To turn an IEEE double into the representation used by strtodg and gdtoa,
-we multiply 1.xxxx... by 2^52 (to make it an integer) and reduce the
-exponent e = (b-1023) by 52:
-
- fpi->emin = 1 - 1023 - 52
- fpi->emax = 1046 - 1023 - 52
-
-In various wrappers for IEEE double, we actually write -53 + 1 rather
-than -52, to emphasize that there are 53 bits including one implicit bit.
-Field fpi->rounding indicates the desired rounding direction, with
-possible values
- FPI_Round_zero = toward 0,
- FPI_Round_near = unbiased rounding -- the IEEE default,
- FPI_Round_up = toward +Infinity, and
- FPI_Round_down = toward -Infinity
-given in gdtoa.h.
-
-Field fpi->sudden_underflow indicates whether strtodg should return
-denormals or flush them to zero. Normal floating-point numbers have
-bit fpi->nbits in the bits array on. Denormals have it off, with
-exponent = fpi->emin. Strtodg provides distinct return values for normals
-and denormals; see gdtoa.h.
-
-Compiling g__fmt.c, strtod.c, and strtodg.c with -DUSE_LOCALE causes
-the decimal-point character to be taken from the current locale; otherwise
-it is '.'.
-
-Please send comments to David M. Gay (dmg at acm dot org, with " at "
-changed at "@" and " dot " changed to ".").
diff --git a/winsup/mingw/mingwex/gdtoa/arithchk.c b/winsup/mingw/mingwex/gdtoa/arithchk.c
deleted file mode 100755
index 3211aed..0000000
--- a/winsup/mingw/mingwex/gdtoa/arithchk.c
+++ /dev/null
@@ -1,183 +0,0 @@
-/****************************************************************
-Copyright (C) 1997, 1998 Lucent Technologies
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the name of Lucent or any of its entities
-not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-****************************************************************/
-
-/* Try to deduce arith.h from arithmetic properties. */
-
-#include <stdio.h>
-
- static int dalign;
- typedef struct
-Akind {
- char *name;
- int kind;
- } Akind;
-
- static Akind
-IEEE_8087 = { "IEEE_8087", 1 },
-IEEE_MC68k = { "IEEE_MC68k", 2 },
-IBM = { "IBM", 3 },
-VAX = { "VAX", 4 },
-CRAY = { "CRAY", 5};
-
- static Akind *
-Lcheck()
-{
- union {
- double d;
- long L[2];
- } u;
- struct {
- double d;
- long L;
- } x[2];
-
- if (sizeof(x) > 2*(sizeof(double) + sizeof(long)))
- dalign = 1;
- u.L[0] = u.L[1] = 0;
- u.d = 1e13;
- if (u.L[0] == 1117925532 && u.L[1] == -448790528)
- return &IEEE_MC68k;
- if (u.L[1] == 1117925532 && u.L[0] == -448790528)
- return &IEEE_8087;
- if (u.L[0] == -2065213935 && u.L[1] == 10752)
- return &VAX;
- if (u.L[0] == 1267827943 && u.L[1] == 704643072)
- return &IBM;
- return 0;
- }
-
- static Akind *
-icheck()
-{
- union {
- double d;
- int L[2];
- } u;
- struct {
- double d;
- int L;
- } x[2];
-
- if (sizeof(x) > 2*(sizeof(double) + sizeof(int)))
- dalign = 1;
- u.L[0] = u.L[1] = 0;
- u.d = 1e13;
- if (u.L[0] == 1117925532 && u.L[1] == -448790528)
- return &IEEE_MC68k;
- if (u.L[1] == 1117925532 && u.L[0] == -448790528)
- return &IEEE_8087;
- if (u.L[0] == -2065213935 && u.L[1] == 10752)
- return &VAX;
- if (u.L[0] == 1267827943 && u.L[1] == 704643072)
- return &IBM;
- return 0;
- }
-
-char *emptyfmt = ""; /* avoid possible warning message with printf("") */
-
- static Akind *
-ccheck()
-{
- union {
- double d;
- long L;
- } u;
- long Cray1;
-
- /* Cray1 = 4617762693716115456 -- without overflow on non-Crays */
- Cray1 = printf(emptyfmt) < 0 ? 0 : 4617762;
- if (printf(emptyfmt, Cray1) >= 0)
- Cray1 = 1000000*Cray1 + 693716;
- if (printf(emptyfmt, Cray1) >= 0)
- Cray1 = 1000000*Cray1 + 115456;
- u.d = 1e13;
- if (u.L == Cray1)
- return &CRAY;
- return 0;
- }
-
- static int
-fzcheck()
-{
- double a, b;
- int i;
-
- a = 1.;
- b = .1;
- for(i = 155;; b *= b, i >>= 1) {
- if (i & 1) {
- a *= b;
- if (i == 1)
- break;
- }
- }
- b = a * a;
- return b == 0.;
- }
-
- int
-main()
-{
- Akind *a = 0;
- int Ldef = 0;
- FILE *f;
-
-#ifdef WRITE_ARITH_H /* for Symantec's buggy "make" */
- f = fopen("arith.h", "w");
- if (!f) {
- printf("Cannot open arith.h\n");
- return 1;
- }
-#else
- f = stdout;
-#endif
-
- if (sizeof(double) == 2*sizeof(long))
- a = Lcheck();
- else if (sizeof(double) == 2*sizeof(int)) {
- Ldef = 1;
- a = icheck();
- }
- else if (sizeof(double) == sizeof(long))
- a = ccheck();
- if (a) {
- fprintf(f, "#define %s\n#define Arith_Kind_ASL %d\n",
- a->name, a->kind);
- if (Ldef)
- fprintf(f, "#define Long int\n#define Intcast (int)(long)\n");
- if (dalign)
- fprintf(f, "#define Double_Align\n");
- if (sizeof(char*) == 8)
- fprintf(f, "#define X64_bit_pointers\n");
-#ifndef NO_LONG_LONG
- if (sizeof(long long) < 8)
-#endif
- fprintf(f, "#define NO_LONG_LONG\n");
- if (a->kind <= 2 && fzcheck())
- fprintf(f, "#define Sudden_Underflow\n");
- return 0;
- }
- fprintf(f, "/* Unknown arithmetic */\n");
- return 1;
- }
diff --git a/winsup/mingw/mingwex/gdtoa/dmisc.c b/winsup/mingw/mingwex/gdtoa/dmisc.c
deleted file mode 100755
index b09b0f5..0000000
--- a/winsup/mingw/mingwex/gdtoa/dmisc.c
+++ /dev/null
@@ -1,212 +0,0 @@
-/****************************************************************
-
-The author of this software is David M. Gay.
-
-Copyright (C) 1998 by Lucent Technologies
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the name of Lucent or any of its entities
-not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-
-****************************************************************/
-
-/* Please send bug reports to David M. Gay (dmg at acm dot org,
- * with " at " changed at "@" and " dot " changed to "."). */
-
-#include "gdtoaimp.h"
-
- char *
-#ifdef KR_headers
-rv_alloc(i) int i;
-#else
-rv_alloc(int i)
-#endif
-{
- int j, k, *r;
-
- j = sizeof(ULong);
- for(k = 0;
- sizeof(Bigint) - sizeof(ULong) - sizeof(int) + j <= i;
- j <<= 1)
- k++;
- r = (int*)Balloc(k);
- *r = k;
- return
-#ifndef MULTIPLE_THREADS
- dtoa_result =
-#endif
- (char *)(r+1);
- }
-
- char *
-#ifdef KR_headers
-nrv_alloc(s, rve, n) char *s, **rve; int n;
-#else
-nrv_alloc(char *s, char **rve, int n)
-#endif
-{
- char *rv, *t;
-
- t = rv = rv_alloc(n);
- while((*t = *s++) !=0)
- t++;
- if (rve)
- *rve = t;
- return rv;
- }
-
-/* freedtoa(s) must be used to free values s returned by dtoa
- * when MULTIPLE_THREADS is #defined. It should be used in all cases,
- * but for consistency with earlier versions of dtoa, it is optional
- * when MULTIPLE_THREADS is not defined.
- */
-
- void
-#ifdef KR_headers
-__freedtoa(s) char *s;
-#else
-__freedtoa(char *s)
-#endif
-{
- Bigint *b = (Bigint *)((int *)s - 1);
- b->maxwds = 1 << (b->k = *(int*)b);
- Bfree(b);
-#ifndef MULTIPLE_THREADS
- if (s == dtoa_result)
- dtoa_result = 0;
-#endif
- }
-
- int
-quorem
-#ifdef KR_headers
- (b, S) Bigint *b, *S;
-#else
- (Bigint *b, Bigint *S)
-#endif
-{
- int n;
- ULong *bx, *bxe, q, *sx, *sxe;
-#ifdef ULLong
- ULLong borrow, carry, y, ys;
-#else
- ULong borrow, carry, y, ys;
-#ifdef Pack_32
- ULong si, z, zs;
-#endif
-#endif
-
- n = S->wds;
-#ifdef DEBUG
- /*debug*/ if (b->wds > n)
- /*debug*/ Bug("oversize b in quorem");
-#endif
- if (b->wds < n)
- return 0;
- sx = S->x;
- sxe = sx + --n;
- bx = b->x;
- bxe = bx + n;
- q = *bxe / (*sxe + 1); /* ensure q <= true quotient */
-#ifdef DEBUG
- /*debug*/ if (q > 9)
- /*debug*/ Bug("oversized quotient in quorem");
-#endif
- if (q) {
- borrow = 0;
- carry = 0;
- do {
-#ifdef ULLong
- ys = *sx++ * (ULLong)q + carry;
- carry = ys >> 32;
- y = *bx - (ys & 0xffffffffUL) - borrow;
- borrow = y >> 32 & 1UL;
- *bx++ = y & 0xffffffffUL;
-#else
-#ifdef Pack_32
- si = *sx++;
- ys = (si & 0xffff) * q + carry;
- zs = (si >> 16) * q + (ys >> 16);
- carry = zs >> 16;
- y = (*bx & 0xffff) - (ys & 0xffff) - borrow;
- borrow = (y & 0x10000) >> 16;
- z = (*bx >> 16) - (zs & 0xffff) - borrow;
- borrow = (z & 0x10000) >> 16;
- Storeinc(bx, z, y);
-#else
- ys = *sx++ * q + carry;
- carry = ys >> 16;
- y = *bx - (ys & 0xffff) - borrow;
- borrow = (y & 0x10000) >> 16;
- *bx++ = y & 0xffff;
-#endif
-#endif
- }
- while(sx <= sxe);
- if (!*bxe) {
- bx = b->x;
- while(--bxe > bx && !*bxe)
- --n;
- b->wds = n;
- }
- }
- if (cmp(b, S) >= 0) {
- q++;
- borrow = 0;
- carry = 0;
- bx = b->x;
- sx = S->x;
- do {
-#ifdef ULLong
- ys = *sx++ + carry;
- carry = ys >> 32;
- y = *bx - (ys & 0xffffffffUL) - borrow;
- borrow = y >> 32 & 1UL;
- *bx++ = y & 0xffffffffUL;
-#else
-#ifdef Pack_32
- si = *sx++;
- ys = (si & 0xffff) + carry;
- zs = (si >> 16) + (ys >> 16);
- carry = zs >> 16;
- y = (*bx & 0xffff) - (ys & 0xffff) - borrow;
- borrow = (y & 0x10000) >> 16;
- z = (*bx >> 16) - (zs & 0xffff) - borrow;
- borrow = (z & 0x10000) >> 16;
- Storeinc(bx, z, y);
-#else
- ys = *sx++ + carry;
- carry = ys >> 16;
- y = *bx - (ys & 0xffff) - borrow;
- borrow = (y & 0x10000) >> 16;
- *bx++ = y & 0xffff;
-#endif
-#endif
- }
- while(sx <= sxe);
- bx = b->x;
- bxe = bx + n;
- if (!*bxe) {
- while(--bxe > bx && !*bxe)
- --n;
- b->wds = n;
- }
- }
- return q;
- }
diff --git a/winsup/mingw/mingwex/gdtoa/dtoa.c b/winsup/mingw/mingwex/gdtoa/dtoa.c
deleted file mode 100755
index 9360e80..0000000
--- a/winsup/mingw/mingwex/gdtoa/dtoa.c
+++ /dev/null
@@ -1,753 +0,0 @@
-/****************************************************************
-
-The author of this software is David M. Gay.
-
-Copyright (C) 1998, 1999 by Lucent Technologies
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the name of Lucent or any of its entities
-not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-
-****************************************************************/
-
-/* Please send bug reports to David M. Gay (dmg at acm dot org,
- * with " at " changed at "@" and " dot " changed to "."). */
-
-#include "gdtoaimp.h"
-
-/* dtoa for IEEE arithmetic (dmg): convert double to ASCII string.
- *
- * Inspired by "How to Print Floating-Point Numbers Accurately" by
- * Guy L. Steele, Jr. and Jon L. White [Proc. ACM SIGPLAN '90, pp. 112-126].
- *
- * Modifications:
- * 1. Rather than iterating, we use a simple numeric overestimate
- * to determine k = floor(log10(d)). We scale relevant
- * quantities using O(log2(k)) rather than O(k) multiplications.
- * 2. For some modes > 2 (corresponding to ecvt and fcvt), we don't
- * try to generate digits strictly left to right. Instead, we
- * compute with fewer bits and propagate the carry if necessary
- * when rounding the final digit up. This is often faster.
- * 3. Under the assumption that input will be rounded nearest,
- * mode 0 renders 1e23 as 1e23 rather than 9.999999999999999e22.
- * That is, we allow equality in stopping tests when the
- * round-nearest rule will give the same floating-point value
- * as would satisfaction of the stopping test with strict
- * inequality.
- * 4. We remove common factors of powers of 2 from relevant
- * quantities.
- * 5. When converting floating-point integers less than 1e16,
- * we use floating-point arithmetic rather than resorting
- * to multiple-precision integers.
- * 6. When asked to produce fewer than 15 digits, we first try
- * to get by with floating-point arithmetic; we resort to
- * multiple-precision integer arithmetic only if we cannot
- * guarantee that the floating-point calculation has given
- * the correctly rounded result. For k requested digits and
- * "uniformly" distributed input, the probability is
- * something like 10^(k-15) that we must resort to the Long
- * calculation.
- */
-
-#ifdef Honor_FLT_ROUNDS
-#define Rounding rounding
-#undef Check_FLT_ROUNDS
-#define Check_FLT_ROUNDS
-#else
-#define Rounding Flt_Rounds
-#endif
-
- char *
-__dtoa
-#ifdef KR_headers
- (d, mode, ndigits, decpt, sign, rve)
- double d; int mode, ndigits, *decpt, *sign; char **rve;
-#else
- (double d, int mode, int ndigits, int *decpt, int *sign, char **rve)
-#endif
-{
- /* Arguments ndigits, decpt, sign are similar to those
- of ecvt and fcvt; trailing zeros are suppressed from
- the returned string. If not null, *rve is set to point
- to the end of the return value. If d is +-Infinity or NaN,
- then *decpt is set to 9999.
-
- mode:
- 0 ==> shortest string that yields d when read in
- and rounded to nearest.
- 1 ==> like 0, but with Steele & White stopping rule;
- e.g. with IEEE P754 arithmetic , mode 0 gives
- 1e23 whereas mode 1 gives 9.999999999999999e22.
- 2 ==> max(1,ndigits) significant digits. This gives a
- return value similar to that of ecvt, except
- that trailing zeros are suppressed.
- 3 ==> through ndigits past the decimal point. This
- gives a return value similar to that from fcvt,
- except that trailing zeros are suppressed, and
- ndigits can be negative.
- 4,5 ==> similar to 2 and 3, respectively, but (in
- round-nearest mode) with the tests of mode 0 to
- possibly return a shorter string that rounds to d.
- With IEEE arithmetic and compilation with
- -DHonor_FLT_ROUNDS, modes 4 and 5 behave the same
- as modes 2 and 3 when FLT_ROUNDS != 1.
- 6-9 ==> Debugging modes similar to mode - 4: don't try
- fast floating-point estimate (if applicable).
-
- Values of mode other than 0-9 are treated as mode 0.
-
- Sufficient space is allocated to the return value
- to hold the suppressed trailing zeros.
- */
-
- int bbits, b2, b5, be, dig, i, ieps, ilim = 0, ilim0, ilim1 = 0,
- j, j1, k, k0, k_check, leftright, m2, m5, s2, s5,
- spec_case, try_quick;
- Long L;
-#ifndef Sudden_Underflow
- int denorm;
- ULong x;
-#endif
- Bigint *b, *b1, *delta, *mlo, *mhi, *S;
- double d2, ds, eps;
- char *s, *s0;
-#ifdef Honor_FLT_ROUNDS
- int rounding;
-#endif
-#ifdef SET_INEXACT
- int inexact, oldinexact;
-#endif
-
-#ifndef MULTIPLE_THREADS
- if (dtoa_result) {
- __freedtoa(dtoa_result);
- dtoa_result = 0;
- }
-#endif
-
- if (word0(d) & Sign_bit) {
- /* set sign for everything, including 0's and NaNs */
- *sign = 1;
- word0(d) &= ~Sign_bit; /* clear sign bit */
- }
- else
- *sign = 0;
-
-#if defined(IEEE_Arith) + defined(VAX)
-#ifdef IEEE_Arith
- if ((word0(d) & Exp_mask) == Exp_mask)
-#else
- if (word0(d) == 0x8000)
-#endif
- {
- /* Infinity or NaN */
- *decpt = 9999;
-#ifdef IEEE_Arith
- if (!word1(d) && !(word0(d) & 0xfffff))
- return nrv_alloc("Infinity", rve, 8);
-#endif
- return nrv_alloc("NaN", rve, 3);
- }
-#endif
-#ifdef IBM
- dval(d) += 0; /* normalize */
-#endif
- if (!dval(d)) {
- *decpt = 1;
- return nrv_alloc("0", rve, 1);
- }
-
-#ifdef SET_INEXACT
- try_quick = oldinexact = get_inexact();
- inexact = 1;
-#endif
-#ifdef Honor_FLT_ROUNDS
- if ((rounding = Flt_Rounds) >= 2) {
- if (*sign)
- rounding = rounding == 2 ? 0 : 2;
- else
- if (rounding != 2)
- rounding = 0;
- }
-#endif
-
- b = d2b(dval(d), &be, &bbits);
-#ifdef Sudden_Underflow
- i = (int)(word0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1));
-#else
- if (( i = (int)(word0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1)) )!=0) {
-#endif
- dval(d2) = dval(d);
- word0(d2) &= Frac_mask1;
- word0(d2) |= Exp_11;
-#ifdef IBM
- if (( j = 11 - hi0bits(word0(d2) & Frac_mask) )!=0)
- dval(d2) /= 1 << j;
-#endif
-
- /* log(x) ~=~ log(1.5) + (x-1.5)/1.5
- * log10(x) = log(x) / log(10)
- * ~=~ log(1.5)/log(10) + (x-1.5)/(1.5*log(10))
- * log10(d) = (i-Bias)*log(2)/log(10) + log10(d2)
- *
- * This suggests computing an approximation k to log10(d) by
- *
- * k = (i - Bias)*0.301029995663981
- * + ( (d2-1.5)*0.289529654602168 + 0.176091259055681 );
- *
- * We want k to be too large rather than too small.
- * The error in the first-order Taylor series approximation
- * is in our favor, so we just round up the constant enough
- * to compensate for any error in the multiplication of
- * (i - Bias) by 0.301029995663981; since |i - Bias| <= 1077,
- * and 1077 * 0.30103 * 2^-52 ~=~ 7.2e-14,
- * adding 1e-13 to the constant term more than suffices.
- * Hence we adjust the constant term to 0.1760912590558.
- * (We could get a more accurate k by invoking log10,
- * but this is probably not worthwhile.)
- */
-
- i -= Bias;
-#ifdef IBM
- i <<= 2;
- i += j;
-#endif
-#ifndef Sudden_Underflow
- denorm = 0;
- }
- else {
- /* d is denormalized */
-
- i = bbits + be + (Bias + (P-1) - 1);
- x = i > 32 ? word0(d) << (64 - i) | word1(d) >> (i - 32)
- : word1(d) << (32 - i);
- dval(d2) = x;
- word0(d2) -= 31*Exp_msk1; /* adjust exponent */
- i -= (Bias + (P-1) - 1) + 1;
- denorm = 1;
- }
-#endif
- ds = (dval(d2)-1.5)*0.289529654602168 + 0.1760912590558 + i*0.301029995663981;
- k = (int)ds;
- if (ds < 0. && ds != k)
- k--; /* want k = floor(ds) */
- k_check = 1;
- if (k >= 0 && k <= Ten_pmax) {
- if (dval(d) < tens[k])
- k--;
- k_check = 0;
- }
- j = bbits - i - 1;
- if (j >= 0) {
- b2 = 0;
- s2 = j;
- }
- else {
- b2 = -j;
- s2 = 0;
- }
- if (k >= 0) {
- b5 = 0;
- s5 = k;
- s2 += k;
- }
- else {
- b2 -= k;
- b5 = -k;
- s5 = 0;
- }
- if (mode < 0 || mode > 9)
- mode = 0;
-
-#ifndef SET_INEXACT
-#ifdef Check_FLT_ROUNDS
- try_quick = Rounding == 1;
-#else
- try_quick = 1;
-#endif
-#endif /*SET_INEXACT*/
-
- if (mode > 5) {
- mode -= 4;
- try_quick = 0;
- }
- leftright = 1;
- switch(mode) {
- case 0:
- case 1:
- ilim = ilim1 = -1;
- i = 18;
- ndigits = 0;
- break;
- case 2:
- leftright = 0;
- /* no break */
- case 4:
- if (ndigits <= 0)
- ndigits = 1;
- ilim = ilim1 = i = ndigits;
- break;
- case 3:
- leftright = 0;
- /* no break */
- case 5:
- i = ndigits + k + 1;
- ilim = i;
- ilim1 = i - 1;
- if (i <= 0)
- i = 1;
- }
- s = s0 = rv_alloc(i);
-
-#ifdef Honor_FLT_ROUNDS
- if (mode > 1 && rounding != 1)
- leftright = 0;
-#endif
-
- if (ilim >= 0 && ilim <= Quick_max && try_quick) {
-
- /* Try to get by with floating-point arithmetic. */
-
- i = 0;
- dval(d2) = dval(d);
- k0 = k;
- ilim0 = ilim;
- ieps = 2; /* conservative */
- if (k > 0) {
- ds = tens[k&0xf];
- j = k >> 4;
- if (j & Bletch) {
- /* prevent overflows */
- j &= Bletch - 1;
- dval(d) /= bigtens[n_bigtens-1];
- ieps++;
- }
- for(; j; j >>= 1, i++)
- if (j & 1) {
- ieps++;
- ds *= bigtens[i];
- }
- dval(d) /= ds;
- }
- else if (( j1 = -k )!=0) {
- dval(d) *= tens[j1 & 0xf];
- for(j = j1 >> 4; j; j >>= 1, i++)
- if (j & 1) {
- ieps++;
- dval(d) *= bigtens[i];
- }
- }
- if (k_check && dval(d) < 1. && ilim > 0) {
- if (ilim1 <= 0)
- goto fast_failed;
- ilim = ilim1;
- k--;
- dval(d) *= 10.;
- ieps++;
- }
- dval(eps) = ieps*dval(d) + 7.;
- word0(eps) -= (P-1)*Exp_msk1;
- if (ilim == 0) {
- S = mhi = 0;
- dval(d) -= 5.;
- if (dval(d) > dval(eps))
- goto one_digit;
- if (dval(d) < -dval(eps))
- goto no_digits;
- goto fast_failed;
- }
-#ifndef No_leftright
- if (leftright) {
- /* Use Steele & White method of only
- * generating digits needed.
- */
- dval(eps) = 0.5/tens[ilim-1] - dval(eps);
- for(i = 0;;) {
- L = dval(d);
- dval(d) -= L;
- *s++ = '0' + (int)L;
- if (dval(d) < dval(eps))
- goto ret1;
- if (1. - dval(d) < dval(eps))
- goto bump_up;
- if (++i >= ilim)
- break;
- dval(eps) *= 10.;
- dval(d) *= 10.;
- }
- }
- else {
-#endif
- /* Generate ilim digits, then fix them up. */
- dval(eps) *= tens[ilim-1];
- for(i = 1;; i++, dval(d) *= 10.) {
- L = (Long)(dval(d));
- if (!(dval(d) -= L))
- ilim = i;
- *s++ = '0' + (int)L;
- if (i == ilim) {
- if (dval(d) > 0.5 + dval(eps))
- goto bump_up;
- else if (dval(d) < 0.5 - dval(eps)) {
- while(*--s == '0');
- s++;
- goto ret1;
- }
- break;
- }
- }
-#ifndef No_leftright
- }
-#endif
- fast_failed:
- s = s0;
- dval(d) = dval(d2);
- k = k0;
- ilim = ilim0;
- }
-
- /* Do we have a "small" integer? */
-
- if (be >= 0 && k <= Int_max) {
- /* Yes. */
- ds = tens[k];
- if (ndigits < 0 && ilim <= 0) {
- S = mhi = 0;
- if (ilim < 0 || dval(d) <= 5*ds)
- goto no_digits;
- goto one_digit;
- }
- for(i = 1;; i++, dval(d) *= 10.) {
- L = (Long)(dval(d) / ds);
- dval(d) -= L*ds;
-#ifdef Check_FLT_ROUNDS
- /* If FLT_ROUNDS == 2, L will usually be high by 1 */
- if (dval(d) < 0) {
- L--;
- dval(d) += ds;
- }
-#endif
- *s++ = '0' + (int)L;
- if (!dval(d)) {
-#ifdef SET_INEXACT
- inexact = 0;
-#endif
- break;
- }
- if (i == ilim) {
-#ifdef Honor_FLT_ROUNDS
- if (mode > 1)
- switch(rounding) {
- case 0: goto ret1;
- case 2: goto bump_up;
- }
-#endif
- dval(d) += dval(d);
- if (dval(d) > ds || (dval(d) == ds && L & 1)) {
- bump_up:
- while(*--s == '9')
- if (s == s0) {
- k++;
- *s = '0';
- break;
- }
- ++*s++;
- }
- break;
- }
- }
- goto ret1;
- }
-
- m2 = b2;
- m5 = b5;
- mhi = mlo = 0;
- if (leftright) {
- i =
-#ifndef Sudden_Underflow
- denorm ? be + (Bias + (P-1) - 1 + 1) :
-#endif
-#ifdef IBM
- 1 + 4*P - 3 - bbits + ((bbits + be - 1) & 3);
-#else
- 1 + P - bbits;
-#endif
- b2 += i;
- s2 += i;
- mhi = i2b(1);
- }
- if (m2 > 0 && s2 > 0) {
- i = m2 < s2 ? m2 : s2;
- b2 -= i;
- m2 -= i;
- s2 -= i;
- }
- if (b5 > 0) {
- if (leftright) {
- if (m5 > 0) {
- mhi = pow5mult(mhi, m5);
- b1 = mult(mhi, b);
- Bfree(b);
- b = b1;
- }
- if (( j = b5 - m5 )!=0)
- b = pow5mult(b, j);
- }
- else
- b = pow5mult(b, b5);
- }
- S = i2b(1);
- if (s5 > 0)
- S = pow5mult(S, s5);
-
- /* Check for special case that d is a normalized power of 2. */
-
- spec_case = 0;
- if ((mode < 2 || leftright)
-#ifdef Honor_FLT_ROUNDS
- && rounding == 1
-#endif
- ) {
- if (!word1(d) && !(word0(d) & Bndry_mask)
-#ifndef Sudden_Underflow
- && word0(d) & (Exp_mask & ~Exp_msk1)
-#endif
- ) {
- /* The special case */
- b2 += Log2P;
- s2 += Log2P;
- spec_case = 1;
- }
- }
-
- /* Arrange for convenient computation of quotients:
- * shift left if necessary so divisor has 4 leading 0 bits.
- *
- * Perhaps we should just compute leading 28 bits of S once
- * and for all and pass them and a shift to quorem, so it
- * can do shifts and ors to compute the numerator for q.
- */
-#ifdef Pack_32
- if (( i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0x1f )!=0)
- i = 32 - i;
-#else
- if (( i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0xf )!=0)
- i = 16 - i;
-#endif
- if (i > 4) {
- i -= 4;
- b2 += i;
- m2 += i;
- s2 += i;
- }
- else if (i < 4) {
- i += 28;
- b2 += i;
- m2 += i;
- s2 += i;
- }
- if (b2 > 0)
- b = lshift(b, b2);
- if (s2 > 0)
- S = lshift(S, s2);
- if (k_check) {
- if (cmp(b,S) < 0) {
- k--;
- b = multadd(b, 10, 0); /* we botched the k estimate */
- if (leftright)
- mhi = multadd(mhi, 10, 0);
- ilim = ilim1;
- }
- }
- if (ilim <= 0 && (mode == 3 || mode == 5)) {
- if (ilim < 0 || cmp(b,S = multadd(S,5,0)) <= 0) {
- /* no digits, fcvt style */
- no_digits:
- k = -1 - ndigits;
- goto ret;
- }
- one_digit:
- *s++ = '1';
- k++;
- goto ret;
- }
- if (leftright) {
- if (m2 > 0)
- mhi = lshift(mhi, m2);
-
- /* Compute mlo -- check for special case
- * that d is a normalized power of 2.
- */
-
- mlo = mhi;
- if (spec_case) {
- mhi = Balloc(mhi->k);
- Bcopy(mhi, mlo);
- mhi = lshift(mhi, Log2P);
- }
-
- for(i = 1;;i++) {
- dig = quorem(b,S) + '0';
- /* Do we yet have the shortest decimal string
- * that will round to d?
- */
- j = cmp(b, mlo);
- delta = diff(S, mhi);
- j1 = delta->sign ? 1 : cmp(b, delta);
- Bfree(delta);
-#ifndef ROUND_BIASED
- if (j1 == 0 && mode != 1 && !(word1(d) & 1)
-#ifdef Honor_FLT_ROUNDS
- && rounding >= 1
-#endif
- ) {
- if (dig == '9')
- goto round_9_up;
- if (j > 0)
- dig++;
-#ifdef SET_INEXACT
- else if (!b->x[0] && b->wds <= 1)
- inexact = 0;
-#endif
- *s++ = dig;
- goto ret;
- }
-#endif
- if (j < 0 || (j == 0 && mode != 1
-#ifndef ROUND_BIASED
- && !(word1(d) & 1)
-#endif
- )) {
- if (!b->x[0] && b->wds <= 1) {
-#ifdef SET_INEXACT
- inexact = 0;
-#endif
- goto accept_dig;
- }
-#ifdef Honor_FLT_ROUNDS
- if (mode > 1)
- switch(rounding) {
- case 0: goto accept_dig;
- case 2: goto keep_dig;
- }
-#endif /*Honor_FLT_ROUNDS*/
- if (j1 > 0) {
- b = lshift(b, 1);
- j1 = cmp(b, S);
- if ((j1 > 0 || (j1 == 0 && dig & 1))
- && dig++ == '9')
- goto round_9_up;
- }
- accept_dig:
- *s++ = dig;
- goto ret;
- }
- if (j1 > 0) {
-#ifdef Honor_FLT_ROUNDS
- if (!rounding)
- goto accept_dig;
-#endif
- if (dig == '9') { /* possible if i == 1 */
- round_9_up:
- *s++ = '9';
- goto roundoff;
- }
- *s++ = dig + 1;
- goto ret;
- }
-#ifdef Honor_FLT_ROUNDS
- keep_dig:
-#endif
- *s++ = dig;
- if (i == ilim)
- break;
- b = multadd(b, 10, 0);
- if (mlo == mhi)
- mlo = mhi = multadd(mhi, 10, 0);
- else {
- mlo = multadd(mlo, 10, 0);
- mhi = multadd(mhi, 10, 0);
- }
- }
- }
- else
- for(i = 1;; i++) {
- *s++ = dig = quorem(b,S) + '0';
- if (!b->x[0] && b->wds <= 1) {
-#ifdef SET_INEXACT
- inexact = 0;
-#endif
- goto ret;
- }
- if (i >= ilim)
- break;
- b = multadd(b, 10, 0);
- }
-
- /* Round off last digit */
-
-#ifdef Honor_FLT_ROUNDS
- switch(rounding) {
- case 0: goto trimzeros;
- case 2: goto roundoff;
- }
-#endif
- b = lshift(b, 1);
- j = cmp(b, S);
- if (j > 0 || (j == 0 && dig & 1)) {
- roundoff:
- while(*--s == '9')
- if (s == s0) {
- k++;
- *s++ = '1';
- goto ret;
- }
- ++*s++;
- }
- else {
- // trimzeros:
- while(*--s == '0');
- s++;
- }
- ret:
- Bfree(S);
- if (mhi) {
- if (mlo && mlo != mhi)
- Bfree(mlo);
- Bfree(mhi);
- }
- ret1:
-#ifdef SET_INEXACT
- if (inexact) {
- if (!oldinexact) {
- word0(d) = Exp_1 + (70 << Exp_shift);
- word1(d) = 0;
- dval(d) += 1.;
- }
- }
- else if (!oldinexact)
- clear_inexact();
-#endif
- Bfree(b);
- *s = 0;
- *decpt = k + 1;
- if (rve)
- *rve = s;
- return s0;
- }
diff --git a/winsup/mingw/mingwex/gdtoa/g__fmt.c b/winsup/mingw/mingwex/gdtoa/g__fmt.c
deleted file mode 100755
index e40d4bb..0000000
--- a/winsup/mingw/mingwex/gdtoa/g__fmt.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/****************************************************************
-
-The author of this software is David M. Gay.
-
-Copyright (C) 1998 by Lucent Technologies
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the name of Lucent or any of its entities
-not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-
-****************************************************************/
-
-/* Please send bug reports to David M. Gay (dmg at acm dot org,
- * with " at " changed at "@" and " dot " changed to "."). */
-
-#include "gdtoaimp.h"
-
-#ifdef USE_LOCALE
-#include "locale.h"
-#endif
-
- char *
-#ifdef KR_headers
-__g__fmt(b, s, se, decpt, sign) char *b; char *s; char *se; int decpt; ULong sign;
-#else
-__g__fmt(char *b, char *s, char *se, int decpt, ULong sign)
-#endif
-{
- int i, j, k;
- char *s0 = s;
-#ifdef USE_LOCALE
- char decimalpoint = *localeconv()->decimal_point;
-#else
-#define decimalpoint '.'
-#endif
- if (sign)
- *b++ = '-';
- if (decpt <= -4 || decpt > se - s + 5) {
- *b++ = *s++;
- if (*s) {
- *b++ = decimalpoint;
- while((*b = *s++) !=0)
- b++;
- }
- *b++ = 'e';
- /* sprintf(b, "%+.2d", decpt - 1); */
- if (--decpt < 0) {
- *b++ = '-';
- decpt = -decpt;
- }
- else
- *b++ = '+';
- for(j = 2, k = 10; 10*k <= decpt; j++, k *= 10){}
- for(;;) {
- i = decpt / k;
- *b++ = i + '0';
- if (--j <= 0)
- break;
- decpt -= i*k;
- decpt *= 10;
- }
- *b = 0;
- }
- else if (decpt <= 0) {
- *b++ = decimalpoint;
- for(; decpt < 0; decpt++)
- *b++ = '0';
- while((*b = *s++) !=0)
- b++;
- }
- else {
- while((*b = *s++) !=0) {
- b++;
- if (--decpt == 0 && *s)
- *b++ = decimalpoint;
- }
- for(; decpt > 0; decpt--)
- *b++ = '0';
- *b = 0;
- }
- __freedtoa(s0);
- return b;
- }
diff --git a/winsup/mingw/mingwex/gdtoa/g_dfmt.c b/winsup/mingw/mingwex/gdtoa/g_dfmt.c
deleted file mode 100755
index 2d8f070..0000000
--- a/winsup/mingw/mingwex/gdtoa/g_dfmt.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/****************************************************************
-
-The author of this software is David M. Gay.
-
-Copyright (C) 1998 by Lucent Technologies
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the name of Lucent or any of its entities
-not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-
-****************************************************************/
-
-/* Please send bug reports to David M. Gay (dmg at acm dot org,
- * with " at " changed at "@" and " dot " changed to "."). */
-
-#include "gdtoaimp.h"
-
- char*
-#ifdef KR_headers
-__g_dfmt(buf, d, ndig, bufsize) char *buf; double *d; int ndig; unsigned bufsize;
-#else
-__g_dfmt(char *buf, double *d, int ndig, unsigned bufsize)
-#endif
-{
- static FPI fpi = { 53, 1-1023-53+1, 2046-1023-53+1, 1, 0 };
- char *b, *s, *se;
- ULong bits[2], *L, sign;
- int decpt, ex, i, mode;
-
- if (ndig < 0)
- ndig = 0;
- if (bufsize < ndig + 10)
- return 0;
-
- L = (ULong*)d;
- sign = L[_0] & 0x80000000L;
- if ((L[_0] & 0x7ff00000) == 0x7ff00000) {
- /* Infinity or NaN */
- if (L[_0] & 0xfffff || L[_1]) {
- return strcp(buf, "NaN");
- }
- b = buf;
- if (sign)
- *b++ = '-';
- return strcp(b, "Infinity");
- }
- if (L[_1] == 0 && (L[_0] ^ sign) == 0 /*d == 0.*/) {
- b = buf;
-#ifndef IGNORE_ZERO_SIGN
- if (L[_0] & 0x80000000L)
- *b++ = '-';
-#endif
- *b++ = '0';
- *b = 0;
- return b;
- }
- bits[0] = L[_1];
- bits[1] = L[_0] & 0xfffff;
- if ( (ex = (L[_0] >> 20) & 0x7ff) !=0)
- bits[1] |= 0x100000;
- else
- ex = 1;
- ex -= 0x3ff + 52;
- mode = 2;
- if (ndig <= 0) {
- if (bufsize < 25)
- return 0;
- mode = 0;
- }
- i = STRTOG_Normal;
- s = __gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
- return __g__fmt(buf, s, se, decpt, sign);
- }
diff --git a/winsup/mingw/mingwex/gdtoa/g_ffmt.c b/winsup/mingw/mingwex/gdtoa/g_ffmt.c
deleted file mode 100755
index e62259d..0000000
--- a/winsup/mingw/mingwex/gdtoa/g_ffmt.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************
-
-The author of this software is David M. Gay.
-
-Copyright (C) 1998 by Lucent Technologies
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the name of Lucent or any of its entities
-not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-
-****************************************************************/
-
-/* Please send bug reports to David M. Gay (dmg at acm dot org,
- * with " at " changed at "@" and " dot " changed to "."). */
-
-#include "gdtoaimp.h"
-
- char*
-#ifdef KR_headers
-__g_ffmt(buf, f, ndig, bufsize) char *buf; float *f; int ndig; unsigned bufsize;
-#else
-__g_ffmt(char *buf, float *f, int ndig, unsigned bufsize)
-#endif
-{
- static FPI fpi = { 24, 1-127-24+1, 254-127-24+1, 1, 0 };
- char *b, *s, *se;
- ULong bits[1], *L, sign;
- int decpt, ex, i, mode;
-
- if (ndig < 0)
- ndig = 0;
- if (bufsize < ndig + 10)
- return 0;
-
- L = (ULong*)f;
- sign = L[0] & 0x80000000L;
- if ((L[0] & 0x7f800000) == 0x7f800000) {
- /* Infinity or NaN */
- if (L[0] & 0x7fffff) {
- return strcp(buf, "NaN");
- }
- b = buf;
- if (sign)
- *b++ = '-';
- return strcp(b, "Infinity");
- }
- if (*f == 0.) {
- b = buf;
-#ifndef IGNORE_ZERO_SIGN
- if (L[0] & 0x80000000L)
- *b++ = '-';
-#endif
- *b++ = '0';
- *b = 0;
- return b;
- }
- bits[0] = L[0] & 0x7fffff;
- if ( (ex = (L[0] >> 23) & 0xff) !=0)
- bits[0] |= 0x800000;
- else
- ex = 1;
- ex -= 0x7f + 23;
- mode = 2;
- if (ndig <= 0) {
- if (bufsize < 16)
- return 0;
- mode = 0;
- }
- i = STRTOG_Normal;
- s = __gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
- return __g__fmt(buf, s, se, decpt, sign);
- }
diff --git a/winsup/mingw/mingwex/gdtoa/g_xfmt.c b/winsup/mingw/mingwex/gdtoa/g_xfmt.c
deleted file mode 100755
index 8015403..0000000
--- a/winsup/mingw/mingwex/gdtoa/g_xfmt.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/****************************************************************
-
-The author of this software is David M. Gay.
-
-Copyright (C) 1998 by Lucent Technologies
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the name of Lucent or any of its entities
-not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-
-****************************************************************/
-
-/* Please send bug reports to David M. Gay (dmg at acm dot org,
- * with " at " changed at "@" and " dot " changed to "."). */
-
-#include "gdtoaimp.h"
-
-#undef _0
-#undef _1
-
-/* one or the other of IEEE_MC68k or IEEE_8087 should be #defined */
-
-#ifdef IEEE_MC68k
-#define _0 0
-#define _1 1
-#define _2 2
-#define _3 3
-#define _4 4
-#endif
-#ifdef IEEE_8087
-#define _0 4
-#define _1 3
-#define _2 2
-#define _3 1
-#define _4 0
-#endif
-
- char*
-#ifdef KR_headers
-__g_xfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; unsigned bufsize;
-#else
-__g_xfmt(char *buf, void *V, int ndig, unsigned bufsize)
-#endif
-{
- static FPI fpi = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0 };
- char *b, *s, *se;
- ULong bits[2], sign;
- UShort *L;
- int decpt, ex, i, mode;
-
- int fptype = __fpclassifyl (*(long double*) V);
-
- if (ndig < 0)
- ndig = 0;
- if (bufsize < ndig + 10)
- return 0;
-
- L = (UShort *)V;
- sign = L[_0] & 0x8000;
- ex = L[_0] & 0x7fff;
-
- bits[1] = (L[_1] << 16) | L[_2];
- bits[0] = (L[_3] << 16) | L[_4];
-
- if (fptype & FP_NAN) /* NaN or Inf */
- {
- if (fptype & FP_NORMAL)
- {
- b = buf;
- *b++ = sign ? '-': '+';
- strncpy (b, "Infinity", ndig ? ndig : 8);
- return (buf + strlen (buf));
- }
- strncpy (buf, "NaN", ndig ? ndig : 3);
- return (buf + strlen (buf));
- }
-
- else if (fptype & FP_NORMAL) /* Normal or subnormal */
- {
- if (fptype & FP_ZERO)
- {
- i = STRTOG_Denormal;
- ex = 1;
- }
- else
- i = STRTOG_Normal;
- }
- else {
- i = STRTOG_Zero;
- b = buf;
-#ifndef IGNORE_ZERO_SIGN
- if (sign)
- *b++ = '-';
-#endif
- *b++ = '0';
- *b = 0;
- return b;
- }
-
- ex -= 0x3fff + 63;
- mode = 2;
- if (ndig <= 0) {
- if (bufsize < 32)
- return 0;
- mode = 0;
- }
- s = __gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se);
- return __g__fmt(buf, s, se, decpt, sign);
- }
diff --git a/winsup/mingw/mingwex/gdtoa/gd_arith.h b/winsup/mingw/mingwex/gdtoa/gd_arith.h
deleted file mode 100644
index 9746f9c..0000000
--- a/winsup/mingw/mingwex/gdtoa/gd_arith.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#define IEEE_8087
-#define Arith_Kind_ASL 1
-#define Double_Align
diff --git a/winsup/mingw/mingwex/gdtoa/gd_qnan.h b/winsup/mingw/mingwex/gdtoa/gd_qnan.h
deleted file mode 100644
index de55c3a..0000000
--- a/winsup/mingw/mingwex/gdtoa/gd_qnan.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#define f_QNAN 0xffc00000
-#define d_QNAN0 0x0
-#define d_QNAN1 0xfff80000
-#define ld_QNAN0 0x0
-#define ld_QNAN1 0xc0000000
-#define ld_QNAN2 0xffff
-#define ld_QNAN3 0x0
-#define ldus_QNAN0 0x0
-#define ldus_QNAN1 0x0
-#define ldus_QNAN2 0x0
-#define ldus_QNAN3 0xc000
-#define ldus_QNAN4 0xffff
diff --git a/winsup/mingw/mingwex/gdtoa/gdtoa.c b/winsup/mingw/mingwex/gdtoa/gdtoa.c
deleted file mode 100755
index cafb807..0000000
--- a/winsup/mingw/mingwex/gdtoa/gdtoa.c
+++ /dev/null
@@ -1,758 +0,0 @@
-/****************************************************************
-
-The author of this software is David M. Gay.
-
-Copyright (C) 1998, 1999 by Lucent Technologies
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the name of Lucent or any of its entities
-not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-
-****************************************************************/
-
-/* Please send bug reports to David M. Gay (dmg at acm dot org,
- * with " at " changed at "@" and " dot " changed to "."). */
-
-#include "gdtoaimp.h"
-
- static Bigint *
-#ifdef KR_headers
-bitstob(bits, nbits, bbits) ULong *bits; int nbits; int *bbits;
-#else
-bitstob(ULong *bits, int nbits, int *bbits)
-#endif
-{
- int i, k;
- Bigint *b;
- ULong *be, *x, *x0;
-
- i = ULbits;
- k = 0;
- while(i < nbits) {
- i <<= 1;
- k++;
- }
-#ifndef Pack_32
- if (!k)
- k = 1;
-#endif
- b = Balloc(k);
- be = bits + ((nbits - 1) >> kshift);
- x = x0 = b->x;
- do {
- *x++ = *bits & ALL_ON;
-#ifdef Pack_16
- *x++ = (*bits >> 16) & ALL_ON;
-#endif
- } while(++bits <= be);
- i = x - x0;
- while(!x0[--i])
- if (!i) {
- b->wds = 0;
- *bbits = 0;
- goto ret;
- }
- b->wds = i + 1;
- *bbits = i*ULbits + 32 - hi0bits(b->x[i]);
- ret:
- return b;
- }
-
-/* dtoa for IEEE arithmetic (dmg): convert double to ASCII string.
- *
- * Inspired by "How to Print Floating-Point Numbers Accurately" by
- * Guy L. Steele, Jr. and Jon L. White [Proc. ACM SIGPLAN '90, pp. 112-126].
- *
- * Modifications:
- * 1. Rather than iterating, we use a simple numeric overestimate
- * to determine k = floor(log10(d)). We scale relevant
- * quantities using O(log2(k)) rather than O(k) multiplications.
- * 2. For some modes > 2 (corresponding to ecvt and fcvt), we don't
- * try to generate digits strictly left to right. Instead, we
- * compute with fewer bits and propagate the carry if necessary
- * when rounding the final digit up. This is often faster.
- * 3. Under the assumption that input will be rounded nearest,
- * mode 0 renders 1e23 as 1e23 rather than 9.999999999999999e22.
- * That is, we allow equality in stopping tests when the
- * round-nearest rule will give the same floating-point value
- * as would satisfaction of the stopping test with strict
- * inequality.
- * 4. We remove common factors of powers of 2 from relevant
- * quantities.
- * 5. When converting floating-point integers less than 1e16,
- * we use floating-point arithmetic rather than resorting
- * to multiple-precision integers.
- * 6. When asked to produce fewer than 15 digits, we first try
- * to get by with floating-point arithmetic; we resort to
- * multiple-precision integer arithmetic only if we cannot
- * guarantee that the floating-point calculation has given
- * the correctly rounded result. For k requested digits and
- * "uniformly" distributed input, the probability is
- * something like 10^(k-15) that we must resort to the Long
- * calculation.
- */
-
- char *
-__gdtoa
-#ifdef KR_headers
- (fpi, be, bits, kindp, mode, ndigits, decpt, rve)
- FPI *fpi; int be; ULong *bits;
- int *kindp, mode, ndigits, *decpt; char **rve;
-#else
- (FPI *fpi, int be, ULong *bits, int *kindp, int mode, int ndigits, int *decpt, char **rve)
-#endif
-{
- /* Arguments ndigits and decpt are similar to the second and third
- arguments of ecvt and fcvt; trailing zeros are suppressed from
- the returned string. If not null, *rve is set to point
- to the end of the return value. If d is +-Infinity or NaN,
- then *decpt is set to 9999.
-
- mode:
- 0 ==> shortest string that yields d when read in
- and rounded to nearest.
- 1 ==> like 0, but with Steele & White stopping rule;
- e.g. with IEEE P754 arithmetic , mode 0 gives
- 1e23 whereas mode 1 gives 9.999999999999999e22.
- 2 ==> max(1,ndigits) significant digits. This gives a
- return value similar to that of ecvt, except
- that trailing zeros are suppressed.
- 3 ==> through ndigits past the decimal point. This
- gives a return value similar to that from fcvt,
- except that trailing zeros are suppressed, and
- ndigits can be negative.
- 4-9 should give the same return values as 2-3, i.e.,
- 4 <= mode <= 9 ==> same return as mode
- 2 + (mode & 1). These modes are mainly for
- debugging; often they run slower but sometimes
- faster than modes 2-3.
- 4,5,8,9 ==> left-to-right digit generation.
- 6-9 ==> don't try fast floating-point estimate
- (if applicable).
-
- Values of mode other than 0-9 are treated as mode 0.
-
- Sufficient space is allocated to the return value
- to hold the suppressed trailing zeros.
- */
-
- int bbits, b2, b5, be0, dig, i, ieps, ilim = 0, ilim0, ilim1 = 0, inex;
- int j, j1, k, k0, k_check, kind, leftright, m2, m5, nbits;
- int rdir, s2, s5, spec_case, try_quick;
- Long L;
- Bigint *b, *b1, *delta, *mlo, *mhi, *mhi1, *S;
- double d, d2, ds, eps;
- char *s, *s0;
-
-#ifndef MULTIPLE_THREADS
- if (dtoa_result) {
- __freedtoa(dtoa_result);
- dtoa_result = 0;
- }
-#endif
- inex = 0;
- kind = *kindp &= ~STRTOG_Inexact;
- switch(kind & STRTOG_Retmask) {
- case STRTOG_Zero:
- goto ret_zero;
- case STRTOG_Normal:
- case STRTOG_Denormal:
- break;
- case STRTOG_Infinite:
- *decpt = -32768;
- return nrv_alloc("Infinity", rve, 8);
- case STRTOG_NaN:
- *decpt = -32768;
- return nrv_alloc("NaN", rve, 3);
- default:
- return 0;
- }
- b = bitstob(bits, nbits = fpi->nbits, &bbits);
- be0 = be;
- if ( (i = trailz(b)) !=0) {
- rshift(b, i);
- be += i;
- bbits -= i;
- }
- if (!b->wds) {
- Bfree(b);
- ret_zero:
- *decpt = 1;
- return nrv_alloc("0", rve, 1);
- }
-
- dval(d) = b2d(b, &i);
- i = be + bbits - 1;
- word0(d) &= Frac_mask1;
- word0(d) |= Exp_11;
-#ifdef IBM
- if ( (j = 11 - hi0bits(word0(d) & Frac_mask)) !=0)
- dval(d) /= 1 << j;
-#endif
-
- /* log(x) ~=~ log(1.5) + (x-1.5)/1.5
- * log10(x) = log(x) / log(10)
- * ~=~ log(1.5)/log(10) + (x-1.5)/(1.5*log(10))
- * log10(d) = (i-Bias)*log(2)/log(10) + log10(d2)
- *
- * This suggests computing an approximation k to log10(d) by
- *
- * k = (i - Bias)*0.301029995663981
- * + ( (d2-1.5)*0.289529654602168 + 0.176091259055681 );
- *
- * We want k to be too large rather than too small.
- * The error in the first-order Taylor series approximation
- * is in our favor, so we just round up the constant enough
- * to compensate for any error in the multiplication of
- * (i - Bias) by 0.301029995663981; since |i - Bias| <= 1077,
- * and 1077 * 0.30103 * 2^-52 ~=~ 7.2e-14,
- * adding 1e-13 to the constant term more than suffices.
- * Hence we adjust the constant term to 0.1760912590558.
- * (We could get a more accurate k by invoking log10,
- * but this is probably not worthwhile.)
- */
-#ifdef IBM
- i <<= 2;
- i += j;
-#endif
- ds = (dval(d)-1.5)*0.289529654602168 + 0.1760912590558 + i*0.301029995663981;
-
- /* correct assumption about exponent range */
- if ((j = i) < 0)
- j = -j;
- if ((j -= 1077) > 0)
- ds += j * 7e-17;
-
- k = (int)ds;
- if (ds < 0. && ds != k)
- k--; /* want k = floor(ds) */
- k_check = 1;
-#ifdef IBM
- j = be + bbits - 1;
- if ( (j1 = j & 3) !=0)
- dval(d) *= 1 << j1;
- word0(d) += j << Exp_shift - 2 & Exp_mask;
-#else
- word0(d) += (be + bbits - 1) << Exp_shift;
-#endif
- if (k >= 0 && k <= Ten_pmax) {
- if (dval(d) < tens[k])
- k--;
- k_check = 0;
- }
- j = bbits - i - 1;
- if (j >= 0) {
- b2 = 0;
- s2 = j;
- }
- else {
- b2 = -j;
- s2 = 0;
- }
- if (k >= 0) {
- b5 = 0;
- s5 = k;
- s2 += k;
- }
- else {
- b2 -= k;
- b5 = -k;
- s5 = 0;
- }
- if (mode < 0 || mode > 9)
- mode = 0;
- try_quick = 1;
- if (mode > 5) {
- mode -= 4;
- try_quick = 0;
- }
- leftright = 1;
- switch(mode) {
- case 0:
- case 1:
- ilim = ilim1 = -1;
- i = (int)(nbits * .30103) + 3;
- ndigits = 0;
- break;
- case 2:
- leftright = 0;
- /* no break */
- case 4:
- if (ndigits <= 0)
- ndigits = 1;
- ilim = ilim1 = i = ndigits;
- break;
- case 3:
- leftright = 0;
- /* no break */
- case 5:
- i = ndigits + k + 1;
- ilim = i;
- ilim1 = i - 1;
- if (i <= 0)
- i = 1;
- }
- s = s0 = rv_alloc(i);
-
- if ( (rdir = fpi->rounding - 1) !=0) {
- if (rdir < 0)
- rdir = 2;
- if (kind & STRTOG_Neg)
- rdir = 3 - rdir;
- }
-
- /* Now rdir = 0 ==> round near, 1 ==> round up, 2 ==> round down. */
-
- if (ilim >= 0 && ilim <= Quick_max && try_quick && !rdir
-#ifndef IMPRECISE_INEXACT
- && k == 0
-#endif
- ) {
-
- /* Try to get by with floating-point arithmetic. */
-
- i = 0;
- d2 = dval(d);
-#ifdef IBM
- if ( (j = 11 - hi0bits(word0(d) & Frac_mask)) !=0)
- dval(d) /= 1 << j;
-#endif
- k0 = k;
- ilim0 = ilim;
- ieps = 2; /* conservative */
- if (k > 0) {
- ds = tens[k&0xf];
- j = k >> 4;
- if (j & Bletch) {
- /* prevent overflows */
- j &= Bletch - 1;
- dval(d) /= bigtens[n_bigtens-1];
- ieps++;
- }
- for(; j; j >>= 1, i++)
- if (j & 1) {
- ieps++;
- ds *= bigtens[i];
- }
- }
- else {
- ds = 1.;
- if ( (j1 = -k) !=0) {
- dval(d) *= tens[j1 & 0xf];
- for(j = j1 >> 4; j; j >>= 1, i++)
- if (j & 1) {
- ieps++;
- dval(d) *= bigtens[i];
- }
- }
- }
- if (k_check && dval(d) < 1. && ilim > 0) {
- if (ilim1 <= 0)
- goto fast_failed;
- ilim = ilim1;
- k--;
- dval(d) *= 10.;
- ieps++;
- }
- dval(eps) = ieps*dval(d) + 7.;
- word0(eps) -= (P-1)*Exp_msk1;
- if (ilim == 0) {
- S = mhi = 0;
- dval(d) -= 5.;
- if (dval(d) > dval(eps))
- goto one_digit;
- if (dval(d) < -dval(eps))
- goto no_digits;
- goto fast_failed;
- }
-#ifndef No_leftright
- if (leftright) {
- /* Use Steele & White method of only
- * generating digits needed.
- */
- dval(eps) = ds*0.5/tens[ilim-1] - dval(eps);
- for(i = 0;;) {
- L = (Long)(dval(d)/ds);
- dval(d) -= L*ds;
- *s++ = '0' + (int)L;
- if (dval(d) < dval(eps)) {
- if (dval(d))
- inex = STRTOG_Inexlo;
- goto ret1;
- }
- if (ds - dval(d) < dval(eps))
- goto bump_up;
- if (++i >= ilim)
- break;
- dval(eps) *= 10.;
- dval(d) *= 10.;
- }
- }
- else {
-#endif
- /* Generate ilim digits, then fix them up. */
- dval(eps) *= tens[ilim-1];
- for(i = 1;; i++, dval(d) *= 10.) {
- if ( (L = (Long)(dval(d)/ds)) !=0)
- dval(d) -= L*ds;
- *s++ = '0' + (int)L;
- if (i == ilim) {
- ds *= 0.5;
- if (dval(d) > ds + dval(eps))
- goto bump_up;
- else if (dval(d) < ds - dval(eps)) {
- while(*--s == '0'){}
- s++;
- if (dval(d))
- inex = STRTOG_Inexlo;
- goto ret1;
- }
- break;
- }
- }
-#ifndef No_leftright
- }
-#endif
- fast_failed:
- s = s0;
- dval(d) = d2;
- k = k0;
- ilim = ilim0;
- }
-
- /* Do we have a "small" integer? */
-
- if (be >= 0 && k <= Int_max) {
- /* Yes. */
- ds = tens[k];
- if (ndigits < 0 && ilim <= 0) {
- S = mhi = 0;
- if (ilim < 0 || dval(d) <= 5*ds)
- goto no_digits;
- goto one_digit;
- }
- for(i = 1;; i++, dval(d) *= 10.) {
- L = dval(d) / ds;
- dval(d) -= L*ds;
-#ifdef Check_FLT_ROUNDS
- /* If FLT_ROUNDS == 2, L will usually be high by 1 */
- if (dval(d) < 0) {
- L--;
- dval(d) += ds;
- }
-#endif
- *s++ = '0' + (int)L;
- if (dval(d) == 0.)
- break;
- if (i == ilim) {
- if (rdir) {
- if (rdir == 1)
- goto bump_up;
- inex = STRTOG_Inexlo;
- goto ret1;
- }
- dval(d) += dval(d);
- if (dval(d) > ds || (dval(d) == ds && L & 1)) {
- bump_up:
- inex = STRTOG_Inexhi;
- while(*--s == '9')
- if (s == s0) {
- k++;
- *s = '0';
- break;
- }
- ++*s++;
- }
- else
- inex = STRTOG_Inexlo;
- break;
- }
- }
- goto ret1;
- }
-
- m2 = b2;
- m5 = b5;
- mhi = mlo = 0;
- if (leftright) {
- if (mode < 2) {
- i = nbits - bbits;
- if (be - i++ < fpi->emin)
- /* denormal */
- i = be - fpi->emin + 1;
- }
- else {
- j = ilim - 1;
- if (m5 >= j)
- m5 -= j;
- else {
- s5 += j -= m5;
- b5 += j;
- m5 = 0;
- }
- if ((i = ilim) < 0) {
- m2 -= i;
- i = 0;
- }
- }
- b2 += i;
- s2 += i;
- mhi = i2b(1);
- }
- if (m2 > 0 && s2 > 0) {
- i = m2 < s2 ? m2 : s2;
- b2 -= i;
- m2 -= i;
- s2 -= i;
- }
- if (b5 > 0) {
- if (leftright) {
- if (m5 > 0) {
- mhi = pow5mult(mhi, m5);
- b1 = mult(mhi, b);
- Bfree(b);
- b = b1;
- }
- if ( (j = b5 - m5) !=0)
- b = pow5mult(b, j);
- }
- else
- b = pow5mult(b, b5);
- }
- S = i2b(1);
- if (s5 > 0)
- S = pow5mult(S, s5);
-
- /* Check for special case that d is a normalized power of 2. */
-
- spec_case = 0;
- if (mode < 2) {
- if (bbits == 1 && be0 > fpi->emin + 1) {
- /* The special case */
- b2++;
- s2++;
- spec_case = 1;
- }
- }
-
- /* Arrange for convenient computation of quotients:
- * shift left if necessary so divisor has 4 leading 0 bits.
- *
- * Perhaps we should just compute leading 28 bits of S once
- * and for all and pass them and a shift to quorem, so it
- * can do shifts and ors to compute the numerator for q.
- */
-#ifdef Pack_32
- if ( (i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0x1f) !=0)
- i = 32 - i;
-#else
- if ( (i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0xf) !=0)
- i = 16 - i;
-#endif
- if (i > 4) {
- i -= 4;
- b2 += i;
- m2 += i;
- s2 += i;
- }
- else if (i < 4) {
- i += 28;
- b2 += i;
- m2 += i;
- s2 += i;
- }
- if (b2 > 0)
- b = lshift(b, b2);
- if (s2 > 0)
- S = lshift(S, s2);
- if (k_check) {
- if (cmp(b,S) < 0) {
- k--;
- b = multadd(b, 10, 0); /* we botched the k estimate */
- if (leftright)
- mhi = multadd(mhi, 10, 0);
- ilim = ilim1;
- }
- }
- if (ilim <= 0 && mode > 2) {
- if (ilim < 0 || cmp(b,S = multadd(S,5,0)) <= 0) {
- /* no digits, fcvt style */
- no_digits:
- k = -1 - ndigits;
- inex = STRTOG_Inexlo;
- goto ret;
- }
- one_digit:
- inex = STRTOG_Inexhi;
- *s++ = '1';
- k++;
- goto ret;
- }
- if (leftright) {
- if (m2 > 0)
- mhi = lshift(mhi, m2);
-
- /* Compute mlo -- check for special case
- * that d is a normalized power of 2.
- */
-
- mlo = mhi;
- if (spec_case) {
- mhi = Balloc(mhi->k);
- Bcopy(mhi, mlo);
- mhi = lshift(mhi, 1);
- }
-
- for(i = 1;;i++) {
- dig = quorem(b,S) + '0';
- /* Do we yet have the shortest decimal string
- * that will round to d?
- */
- j = cmp(b, mlo);
- delta = diff(S, mhi);
- j1 = delta->sign ? 1 : cmp(b, delta);
- Bfree(delta);
-#ifndef ROUND_BIASED
- if (j1 == 0 && !mode && !(bits[0] & 1) && !rdir) {
- if (dig == '9')
- goto round_9_up;
- if (j <= 0) {
- if (b->wds > 1 || b->x[0])
- inex = STRTOG_Inexlo;
- }
- else {
- dig++;
- inex = STRTOG_Inexhi;
- }
- *s++ = dig;
- goto ret;
- }
-#endif
- if (j < 0 || (j == 0 && !mode
-#ifndef ROUND_BIASED
- && !(bits[0] & 1)
-#endif
- )) {
- if (rdir && (b->wds > 1 || b->x[0])) {
- if (rdir == 2) {
- inex = STRTOG_Inexlo;
- goto accept;
- }
- while (cmp(S,mhi) > 0) {
- *s++ = dig;
- mhi1 = multadd(mhi, 10, 0);
- if (mlo == mhi)
- mlo = mhi1;
- mhi = mhi1;
- b = multadd(b, 10, 0);
- dig = quorem(b,S) + '0';
- }
- if (dig++ == '9')
- goto round_9_up;
- inex = STRTOG_Inexhi;
- goto accept;
- }
- if (j1 > 0) {
- b = lshift(b, 1);
- j1 = cmp(b, S);
- if ((j1 > 0 || (j1 == 0 && dig & 1))
- && dig++ == '9')
- goto round_9_up;
- inex = STRTOG_Inexhi;
- }
- if (b->wds > 1 || b->x[0])
- inex = STRTOG_Inexlo;
- accept:
- *s++ = dig;
- goto ret;
- }
- if (j1 > 0 && rdir != 2) {
- if (dig == '9') { /* possible if i == 1 */
- round_9_up:
- *s++ = '9';
- inex = STRTOG_Inexhi;
- goto roundoff;
- }
- inex = STRTOG_Inexhi;
- *s++ = dig + 1;
- goto ret;
- }
- *s++ = dig;
- if (i == ilim)
- break;
- b = multadd(b, 10, 0);
- if (mlo == mhi)
- mlo = mhi = multadd(mhi, 10, 0);
- else {
- mlo = multadd(mlo, 10, 0);
- mhi = multadd(mhi, 10, 0);
- }
- }
- }
- else
- for(i = 1;; i++) {
- *s++ = dig = quorem(b,S) + '0';
- if (i >= ilim)
- break;
- b = multadd(b, 10, 0);
- }
-
- /* Round off last digit */
-
- if (rdir) {
- if (rdir == 2 || (b->wds <= 1 && !b->x[0]))
- goto chopzeros;
- goto roundoff;
- }
- b = lshift(b, 1);
- j = cmp(b, S);
- if (j > 0 || (j == 0 && dig & 1)) {
- roundoff:
- inex = STRTOG_Inexhi;
- while(*--s == '9')
- if (s == s0) {
- k++;
- *s++ = '1';
- goto ret;
- }
- ++*s++;
- }
- else {
- chopzeros:
- if (b->wds > 1 || b->x[0])
- inex = STRTOG_Inexlo;
- while(*--s == '0'){}
- s++;
- }
- ret:
- Bfree(S);
- if (mhi) {
- if (mlo && mlo != mhi)
- Bfree(mlo);
- Bfree(mhi);
- }
- ret1:
- Bfree(b);
- *s = 0;
- *decpt = k + 1;
- if (rve)
- *rve = s;
- *kindp |= inex;
- return s0;
- }
diff --git a/winsup/mingw/mingwex/gdtoa/gdtoa.h b/winsup/mingw/mingwex/gdtoa/gdtoa.h
deleted file mode 100755
index 88e0e54..0000000
--- a/winsup/mingw/mingwex/gdtoa/gdtoa.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/****************************************************************
-
-The author of this software is David M. Gay.
-
-Copyright (C) 1998 by Lucent Technologies
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the name of Lucent or any of its entities
-not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-
-****************************************************************/
-
-/* Please send bug reports to David M. Gay (dmg at acm dot org,
- * with " at " changed at "@" and " dot " changed to "."). */
-
-/* Modified by Danny Smith for inclusion in libmingwex.a
- Aug 2006 */
-
-#ifndef GDTOA_H_INCLUDED
-#define GDTOA_H_INCLUDED
-
-#include "gd_arith.h"
-
-#ifndef Long
-#define Long long
-#endif
-#ifndef ULong
-typedef unsigned Long ULong;
-#endif
-#ifndef UShort
-typedef unsigned short UShort;
-#endif
-
-#ifndef ANSI
-#ifdef KR_headers
-#define ANSI(x) ()
-#define Void /*nothing*/
-#else
-#define ANSI(x) x
-#define Void void
-#endif
-#endif /* ANSI */
-
-#ifndef CONST
-#ifdef KR_headers
-#define CONST /* blank */
-#else
-#define CONST const
-#endif
-#endif /* CONST */
-
- enum { /* return values from strtodg */
- STRTOG_Zero = 0,
- STRTOG_Normal = 1,
- STRTOG_Denormal = 2,
- STRTOG_Infinite = 3,
- STRTOG_NaN = 4,
- STRTOG_NaNbits = 5,
- STRTOG_NoNumber = 6,
- STRTOG_Retmask = 7,
-
- /* The following may be or-ed into one of the above values. */
-
- STRTOG_Neg = 0x08,
- STRTOG_Inexlo = 0x10,
- STRTOG_Inexhi = 0x20,
- STRTOG_Inexact = 0x30,
- STRTOG_Underflow= 0x40,
- STRTOG_Overflow = 0x80
- };
-
- typedef struct
-FPI {
- int nbits;
- int emin;
- int emax;
- int rounding;
- int sudden_underflow;
- } FPI;
-
-enum { /* FPI.rounding values: same as FLT_ROUNDS */
- FPI_Round_zero = 0,
- FPI_Round_near = 1,
- FPI_Round_up = 2,
- FPI_Round_down = 3
- };
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern char* __dtoa ANSI((double d, int mode, int ndigits, int *decpt,
- int *sign, char **rve));
-extern char* __gdtoa ANSI((FPI *fpi, int be, ULong *bits, int *kindp,
- int mode, int ndigits, int *decpt, char **rve));
-extern void __freedtoa ANSI((char*));
-
-extern int __strtodg ANSI((CONST char*, char**, FPI*, Long*, ULong*));
-extern float __strtof ANSI((CONST char *, char **));
-extern double __strtod ANSI((CONST char *, char **));
-extern long double strtold ANSI((CONST char *, char **));
-
-extern char* __g__fmt ANSI((char *, char *, char *e, int, ULong));
-extern char* __g_dfmt ANSI((char*, double*, int, unsigned));
-extern char* __g_ffmt ANSI((char*, float*, int, unsigned));
-extern char* __g_xfmt ANSI((char*, void*, int, unsigned));
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* GDTOA_H_INCLUDED */
diff --git a/winsup/mingw/mingwex/gdtoa/gdtoaimp.h b/winsup/mingw/mingwex/gdtoa/gdtoaimp.h
deleted file mode 100755
index 04e625c..0000000
--- a/winsup/mingw/mingwex/gdtoa/gdtoaimp.h
+++ /dev/null
@@ -1,632 +0,0 @@
-/****************************************************************
-
-The author of this software is David M. Gay.
-
-Copyright (C) 1998-2008 by Lucent Technologies
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the name of Lucent or any of its entities
-not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-
-****************************************************************/
-
-/* This is a variation on dtoa.c that converts arbitary binary
- floating-point formats to and from decimal notation. It uses
- double-precision arithmetic internally, so there are still
- various #ifdefs that adapt the calculations to the native
- double-precision arithmetic (any of IEEE, VAX D_floating,
- or IBM mainframe arithmetic).
-
- Please send bug reports to David M. Gay (dmg at acm dot org,
- with " at " changed at "@" and " dot " changed to ".").
- */
-
-/* On a machine with IEEE extended-precision registers, it is
- * necessary to specify double-precision (53-bit) rounding precision
- * before invoking strtod or dtoa. If the machine uses (the equivalent
- * of) Intel 80x87 arithmetic, the call
- * _control87(PC_53, MCW_PC);
- * does this with many compilers. Whether this or another call is
- * appropriate depends on the compiler; for this to work, it may be
- * necessary to #include "float.h" or another system-dependent header
- * file.
- */
-
-/* strtod for IEEE-, VAX-, and IBM-arithmetic machines.
- *
- * This strtod returns a nearest machine number to the input decimal
- * string (or sets errno to ERANGE). With IEEE arithmetic, ties are
- * broken by the IEEE round-even rule. Otherwise ties are broken by
- * biased rounding (add half and chop).
- *
- * Inspired loosely by William D. Clinger's paper "How to Read Floating
- * Point Numbers Accurately" [Proc. ACM SIGPLAN '90, pp. 112-126].
- *
- * Modifications:
- *
- * 1. We only require IEEE, IBM, or VAX double-precision
- * arithmetic (not IEEE double-extended).
- * 2. We get by with floating-point arithmetic in a case that
- * Clinger missed -- when we're computing d * 10^n
- * for a small integer d and the integer n is not too
- * much larger than 22 (the maximum integer k for which
- * we can represent 10^k exactly), we may be able to
- * compute (d*10^k) * 10^(e-k) with just one roundoff.
- * 3. Rather than a bit-at-a-time adjustment of the binary
- * result in the hard case, we use floating-point
- * arithmetic to determine the adjustment to within
- * one bit; only in really hard cases do we need to
- * compute a second residual.
- * 4. Because of 3., we don't need a large table of powers of 10
- * for ten-to-e (just some small tables, e.g. of 10^k
- * for 0 <= k <= 22).
- */
-
-/*
- * #define IEEE_8087 for IEEE-arithmetic machines where the least
- * significant byte has the lowest address.
- * #define IEEE_MC68k for IEEE-arithmetic machines where the most
- * significant byte has the lowest address.
- * #define Long int on machines with 32-bit ints and 64-bit longs.
- * #define Sudden_Underflow for IEEE-format machines without gradual
- * underflow (i.e., that flush to zero on underflow).
- * #define IBM for IBM mainframe-style floating-point arithmetic.
- * #define VAX for VAX-style floating-point arithmetic (D_floating).
- * #define No_leftright to omit left-right logic in fast floating-point
- * computation of dtoa.
- * #define Check_FLT_ROUNDS if FLT_ROUNDS can assume the values 2 or 3.
- * #define RND_PRODQUOT to use rnd_prod and rnd_quot (assembly routines
- * that use extended-precision instructions to compute rounded
- * products and quotients) with IBM.
- * #define ROUND_BIASED for IEEE-format with biased rounding.
- * #define Inaccurate_Divide for IEEE-format with correctly rounded
- * products but inaccurate quotients, e.g., for Intel i860.
- * #define NO_LONG_LONG on machines that do not have a "long long"
- * integer type (of >= 64 bits). On such machines, you can
- * #define Just_16 to store 16 bits per 32-bit Long when doing
- * high-precision integer arithmetic. Whether this speeds things
- * up or slows things down depends on the machine and the number
- * being converted. If long long is available and the name is
- * something other than "long long", #define Llong to be the name,
- * and if "unsigned Llong" does not work as an unsigned version of
- * Llong, #define #ULLong to be the corresponding unsigned type.
- * #define KR_headers for old-style C function headers.
- * #define Bad_float_h if your system lacks a float.h or if it does not
- * define some or all of DBL_DIG, DBL_MAX_10_EXP, DBL_MAX_EXP,
- * FLT_RADIX, FLT_ROUNDS, and DBL_MAX.
- * #define MALLOC your_malloc, where your_malloc(n) acts like malloc(n)
- * if memory is available and otherwise does something you deem
- * appropriate. If MALLOC is undefined, malloc will be invoked
- * directly -- and assumed always to succeed.
- * #define Omit_Private_Memory to omit logic (added Jan. 1998) for making
- * memory allocations from a private pool of memory when possible.
- * When used, the private pool is PRIVATE_MEM bytes long: 2304 bytes,
- * unless #defined to be a different length. This default length
- * suffices to get rid of MALLOC calls except for unusual cases,
- * such as decimal-to-binary conversion of a very long string of
- * digits. When converting IEEE double precision values, the
- * longest string gdtoa can return is about 751 bytes long. For
- * conversions by strtod of strings of 800 digits and all gdtoa
- * conversions of IEEE doubles in single-threaded executions with
- * 8-byte pointers, PRIVATE_MEM >= 7400 appears to suffice; with
- * 4-byte pointers, PRIVATE_MEM >= 7112 appears adequate.
- * #define INFNAN_CHECK on IEEE systems to cause strtod to check for
- * Infinity and NaN (case insensitively).
- * When INFNAN_CHECK is #defined and No_Hex_NaN is not #defined,
- * strtodg also accepts (case insensitively) strings of the form
- * NaN(x), where x is a string of hexadecimal digits and spaces;
- * if there is only one string of hexadecimal digits, it is taken
- * for the fraction bits of the resulting NaN; if there are two or
- * more strings of hexadecimal digits, each string is assigned
- * to the next available sequence of 32-bit words of fractions
- * bits (starting with the most significant), right-aligned in
- * each sequence.
- * #define MULTIPLE_THREADS if the system offers preemptively scheduled
- * multiple threads. In this case, you must provide (or suitably
- * #define) two locks, acquired by ACQUIRE_DTOA_LOCK(n) and freed
- * by FREE_DTOA_LOCK(n) for n = 0 or 1. (The second lock, accessed
- * in pow5mult, ensures lazy evaluation of only one copy of high
- * powers of 5; omitting this lock would introduce a small
- * probability of wasting memory, but would otherwise be harmless.)
- * You must also invoke freedtoa(s) to free the value s returned by
- * dtoa. You may do so whether or not MULTIPLE_THREADS is #defined.
- * #define IMPRECISE_INEXACT if you do not care about the setting of
- * the STRTOG_Inexact bits in the special case of doing IEEE double
- * precision conversions (which could also be done by the strtog in
- * dtoa.c).
- * #define NO_HEX_FP to disable recognition of C9x's hexadecimal
- * floating-point constants.
- * #define -DNO_ERRNO to suppress setting errno (in strtod.c and
- * strtodg.c).
- * #define NO_STRING_H to use private versions of memcpy.
- * On some K&R systems, it may also be necessary to
- * #define DECLARE_SIZE_T in this case.
- * #define YES_ALIAS to permit aliasing certain double values with
- * arrays of ULongs. This leads to slightly better code with
- * some compilers and was always used prior to 19990916, but it
- * is not strictly legal and can cause trouble with aggressively
- * optimizing compilers (e.g., gcc 2.95.1 under -O2).
- * #define USE_LOCALE to use the current locale's decimal_point value.
- */
-
-#ifndef GDTOAIMP_H_INCLUDED
-#define GDTOAIMP_H_INCLUDED
-#include "gdtoa.h"
-#include "gd_qnan.h"
-
-#define INFNAN_CHECK 1
-#define MULTIPLE_THREADS 1
-#define USE_LOCALE 1
-
-#ifdef DEBUG
-#include <stdio.h>
-#define Bug(x) {fprintf(stderr, "%s\n", x); exit(1);}
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef KR_headers
-#define Char char
-#else
-#define Char void
-#endif
-
-#ifdef MALLOC
-extern Char *MALLOC ANSI((size_t));
-#else
-#define MALLOC malloc
-#endif
-
-#undef IEEE_Arith
-#undef Avoid_Underflow
-#ifdef IEEE_MC68k
-#define IEEE_Arith
-#endif
-#ifdef IEEE_8087
-#define IEEE_Arith
-#endif
-
-#include <errno.h>
-#ifdef Bad_float_h
-
-#ifdef IEEE_Arith
-#define DBL_DIG 15
-#define DBL_MAX_10_EXP 308
-#define DBL_MAX_EXP 1024
-#define FLT_RADIX 2
-#define DBL_MAX 1.7976931348623157e+308
-#endif
-
-#ifdef IBM
-#define DBL_DIG 16
-#define DBL_MAX_10_EXP 75
-#define DBL_MAX_EXP 63
-#define FLT_RADIX 16
-#define DBL_MAX 7.2370055773322621e+75
-#endif
-
-#ifdef VAX
-#define DBL_DIG 16
-#define DBL_MAX_10_EXP 38
-#define DBL_MAX_EXP 127
-#define FLT_RADIX 2
-#define DBL_MAX 1.7014118346046923e+38
-#define n_bigtens 2
-#endif
-
-#ifndef LONG_MAX
-#define LONG_MAX 2147483647
-#endif
-
-#else /* ifndef Bad_float_h */
-#include <float.h>
-#endif /* Bad_float_h */
-
-#ifdef IEEE_Arith
-#define Scale_Bit 0x10
-#define n_bigtens 5
-#endif
-
-#ifdef IBM
-#define n_bigtens 3
-#endif
-
-#ifdef VAX
-#define n_bigtens 2
-#endif
-
-#ifndef __MATH_H__
-#include <math.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if defined(IEEE_8087) + defined(IEEE_MC68k) + defined(VAX) + defined(IBM) != 1
-Exactly one of IEEE_8087, IEEE_MC68k, VAX, or IBM should be defined.
-#endif
-
-typedef union { double d; ULong L[2]; } U;
-
-#ifdef YES_ALIAS
-#define dval(x) x
-#ifdef IEEE_8087
-#define word0(x) ((ULong *)&x)[1]
-#define word1(x) ((ULong *)&x)[0]
-#else
-#define word0(x) ((ULong *)&x)[0]
-#define word1(x) ((ULong *)&x)[1]
-#endif
-#else /* !YES_ALIAS */
-#ifdef IEEE_8087
-#define word0(x) ((U*)&x)->L[1]
-#define word1(x) ((U*)&x)->L[0]
-#else
-#define word0(x) ((U*)&x)->L[0]
-#define word1(x) ((U*)&x)->L[1]
-#endif
-#define dval(x) ((U*)&x)->d
-#endif /* YES_ALIAS */
-
-/* The following definition of Storeinc is appropriate for MIPS processors.
- * An alternative that might be better on some machines is
- * #define Storeinc(a,b,c) (*a++ = b << 16 | c & 0xffff)
- */
-#if defined(IEEE_8087) + defined(VAX)
-#define Storeinc(a,b,c) (((unsigned short *)a)[1] = (unsigned short)b, \
-((unsigned short *)a)[0] = (unsigned short)c, a++)
-#else
-#define Storeinc(a,b,c) (((unsigned short *)a)[0] = (unsigned short)b, \
-((unsigned short *)a)[1] = (unsigned short)c, a++)
-#endif
-
-/* #define P DBL_MANT_DIG */
-/* Ten_pmax = floor(P*log(2)/log(5)) */
-/* Bletch = (highest power of 2 < DBL_MAX_10_EXP) / 16 */
-/* Quick_max = floor((P-1)*log(FLT_RADIX)/log(10) - 1) */
-/* Int_max = floor(P*log(FLT_RADIX)/log(10) - 1) */
-
-#ifdef IEEE_Arith
-#define Exp_shift 20
-#define Exp_shift1 20
-#define Exp_msk1 0x100000
-#define Exp_msk11 0x100000
-#define Exp_mask 0x7ff00000
-#define P 53
-#define Bias 1023
-#define Emin (-1022)
-#define Exp_1 0x3ff00000
-#define Exp_11 0x3ff00000
-#define Ebits 11
-#define Frac_mask 0xfffff
-#define Frac_mask1 0xfffff
-#define Ten_pmax 22
-#define Bletch 0x10
-#define Bndry_mask 0xfffff
-#define Bndry_mask1 0xfffff
-#define LSB 1
-#define Sign_bit 0x80000000
-#define Log2P 1
-#define Tiny0 0
-#define Tiny1 1
-#define Quick_max 14
-#define Int_max 14
-
-#ifndef Flt_Rounds
-#ifdef FLT_ROUNDS
-#define Flt_Rounds FLT_ROUNDS
-#else
-#define Flt_Rounds 1
-#endif
-#endif /*Flt_Rounds*/
-
-#else /* ifndef IEEE_Arith */
-#undef Sudden_Underflow
-#define Sudden_Underflow
-#ifdef IBM
-#undef Flt_Rounds
-#define Flt_Rounds 0
-#define Exp_shift 24
-#define Exp_shift1 24
-#define Exp_msk1 0x1000000
-#define Exp_msk11 0x1000000
-#define Exp_mask 0x7f000000
-#define P 14
-#define Bias 65
-#define Exp_1 0x41000000
-#define Exp_11 0x41000000
-#define Ebits 8 /* exponent has 7 bits, but 8 is the right value in b2d */
-#define Frac_mask 0xffffff
-#define Frac_mask1 0xffffff
-#define Bletch 4
-#define Ten_pmax 22
-#define Bndry_mask 0xefffff
-#define Bndry_mask1 0xffffff
-#define LSB 1
-#define Sign_bit 0x80000000
-#define Log2P 4
-#define Tiny0 0x100000
-#define Tiny1 0
-#define Quick_max 14
-#define Int_max 15
-#else /* VAX */
-#undef Flt_Rounds
-#define Flt_Rounds 1
-#define Exp_shift 23
-#define Exp_shift1 7
-#define Exp_msk1 0x80
-#define Exp_msk11 0x800000
-#define Exp_mask 0x7f80
-#define P 56
-#define Bias 129
-#define Exp_1 0x40800000
-#define Exp_11 0x4080
-#define Ebits 8
-#define Frac_mask 0x7fffff
-#define Frac_mask1 0xffff007f
-#define Ten_pmax 24
-#define Bletch 2
-#define Bndry_mask 0xffff007f
-#define Bndry_mask1 0xffff007f
-#define LSB 0x10000
-#define Sign_bit 0x8000
-#define Log2P 1
-#define Tiny0 0x80
-#define Tiny1 0
-#define Quick_max 15
-#define Int_max 15
-#endif /* IBM, VAX */
-#endif /* IEEE_Arith */
-
-#ifndef IEEE_Arith
-#define ROUND_BIASED
-#endif
-
-#ifdef RND_PRODQUOT
-#define rounded_product(a,b) a = rnd_prod(a, b)
-#define rounded_quotient(a,b) a = rnd_quot(a, b)
-#ifdef KR_headers
-extern double rnd_prod(), rnd_quot();
-#else
-extern double rnd_prod(double, double), rnd_quot(double, double);
-#endif
-#else
-#define rounded_product(a,b) a *= b
-#define rounded_quotient(a,b) a /= b
-#endif
-
-#define Big0 (Frac_mask1 | Exp_msk1*(DBL_MAX_EXP+Bias-1))
-#define Big1 0xffffffff
-
-#undef Pack_16
-#ifndef Pack_32
-#define Pack_32
-#endif
-
-#ifdef NO_LONG_LONG
-#undef ULLong
-#ifdef Just_16
-#undef Pack_32
-#define Pack_16
-/* When Pack_32 is not defined, we store 16 bits per 32-bit Long.
- * This makes some inner loops simpler and sometimes saves work
- * during multiplications, but it often seems to make things slightly
- * slower. Hence the default is now to store 32 bits per Long.
- */
-#endif
-#else /* long long available */
-#ifndef Llong
-#define Llong long long
-#endif
-#ifndef ULLong
-#define ULLong unsigned Llong
-#endif
-#endif /* NO_LONG_LONG */
-
-#ifdef Pack_32
-#define ULbits 32
-#define kshift 5
-#define kmask 31
-#define ALL_ON 0xffffffff
-#else
-#define ULbits 16
-#define kshift 4
-#define kmask 15
-#define ALL_ON 0xffff
-#endif
-
-#ifndef MULTIPLE_THREADS
-#define ACQUIRE_DTOA_LOCK(n) /*nothing*/
-#define FREE_DTOA_LOCK(n) /*nothing*/
-#endif
-
-#define Kmax 15
-
-#define Bigint __Bigint
- struct
-Bigint {
- struct Bigint *next;
- int k, maxwds, sign, wds;
- ULong x[1];
- };
-
- typedef struct Bigint Bigint;
-
-#ifdef NO_STRING_H
-#ifdef DECLARE_SIZE_T
-typedef unsigned int size_t;
-#endif
-extern void memcpy_D2A ANSI((void*, const void*, size_t));
-#define Bcopy(x,y) memcpy_D2A(&x->sign,&y->sign,y->wds*sizeof(ULong) + 2*sizeof(int))
-#else /* !NO_STRING_H */
-#define Bcopy(x,y) memcpy(&x->sign,&y->sign,y->wds*sizeof(ULong) + 2*sizeof(int))
-#endif /* NO_STRING_H */
-
-#ifdef __GNUC__
-static inline int
-__lo0bits_D2A (ULong *y)
-{
- int ret = __builtin_ctz(*y);
- *y = *y >> ret;
- return ret;
-}
-
-static inline int
-__hi0bits_D2A (ULong y)
-{
- return __builtin_clz(y);
-}
-#endif
-
-#define Balloc __Balloc_D2A
-#define Bfree __Bfree_D2A
-#define ULtoQ __ULtoQ_D2A
-#define ULtof __ULtof_D2A
-#define ULtod __ULtod_D2A
-#define ULtodd __ULtodd_D2A
-#define ULtox __ULtox_D2A
-#define ULtoxL __ULtoxL_D2A
-#define any_on __any_on_D2A
-#define b2d __b2d_D2A
-#define bigtens __bigtens_D2A
-#define cmp __cmp_D2A
-#define copybits __copybits_D2A
-#define d2b __d2b_D2A
-#define decrement __decrement_D2A
-#define diff __diff_D2A
-#define dtoa_result __dtoa_result_D2A
-#define gethex __gethex_D2A
-#define hexdig __hexdig_D2A
-#define hexnan __hexnan_D2A
-#define hi0bits_D2A __hi0bits_D2A
-#define hi0bits(x) __hi0bits_D2A((ULong)(x))
-#define i2b __i2b_D2A
-#define increment __increment_D2A
-#define lo0bits __lo0bits_D2A
-#define lshift __lshift_D2A
-#define match __match_D2A
-#define mult __mult_D2A
-#define multadd __multadd_D2A
-#define nrv_alloc __nrv_alloc_D2A
-#define pow5mult __pow5mult_D2A
-#define quorem __quorem_D2A
-#define ratio __ratio_D2A
-#define rshift __rshift_D2A
-#define rv_alloc __rv_alloc_D2A
-#define s2b __s2b_D2A
-#define set_ones __set_ones_D2A
-#define strcp_D2A __strcp_D2A
-#define strcp __strcp_D2A
-#define strtoIg __strtoIg_D2A
-#define sum __sum_D2A
-#define tens __tens_D2A
-#define tinytens __tinytens_D2A
-#define tinytens __tinytens_D2A
-#define trailz __trailz_D2A
-#define ulp __ulp_D2A
-
- extern char *dtoa_result;
- extern CONST double bigtens[], tens[], tinytens[];
- extern unsigned char hexdig[];
-
- extern Bigint *Balloc ANSI((int));
- extern void Bfree ANSI((Bigint*));
- extern void ULtof ANSI((ULong*, ULong*, Long, int));
- extern void ULtod ANSI((ULong*, ULong*, Long, int));
- extern void ULtodd ANSI((ULong*, ULong*, Long, int));
- extern void ULtoQ ANSI((ULong*, ULong*, Long, int));
- extern void ULtox ANSI((UShort*, ULong*, Long, int));
- extern void ULtoxL ANSI((ULong*, ULong*, Long, int));
- extern ULong any_on ANSI((Bigint*, int));
- extern double b2d ANSI((Bigint*, int*));
- extern int cmp ANSI((Bigint*, Bigint*));
- extern void copybits ANSI((ULong*, int, Bigint*));
- extern Bigint *d2b ANSI((double, int*, int*));
- extern int decrement ANSI((Bigint*));
- extern Bigint *diff ANSI((Bigint*, Bigint*));
- extern int gethex ANSI((CONST char**, FPI*, Long*, Bigint**, int));
- extern void hexdig_init_D2A(Void);
- extern int hexnan ANSI((CONST char**, FPI*, ULong*));
- extern int hi0bits_D2A ANSI((ULong));
- extern Bigint *i2b ANSI((int));
- extern Bigint *increment ANSI((Bigint*));
- extern int lo0bits ANSI((ULong*));
- extern Bigint *lshift ANSI((Bigint*, int));
- extern int match ANSI((CONST char**, char*));
- extern Bigint *mult ANSI((Bigint*, Bigint*));
- extern Bigint *multadd ANSI((Bigint*, int, int));
- extern char *nrv_alloc ANSI((char*, char **, int));
- extern Bigint *pow5mult ANSI((Bigint*, int));
- extern int quorem ANSI((Bigint*, Bigint*));
- extern double ratio ANSI((Bigint*, Bigint*));
- extern void rshift ANSI((Bigint*, int));
- extern char *rv_alloc ANSI((int));
- extern Bigint *s2b ANSI((CONST char*, int, int, ULong));
- extern Bigint *set_ones ANSI((Bigint*, int));
- extern char *strcp ANSI((char*, const char*));
- extern Bigint *sum ANSI((Bigint*, Bigint*));
- extern int trailz ANSI((Bigint*));
- extern double ulp ANSI((double));
-
-#ifdef __cplusplus
-}
-#endif
-/*
- * NAN_WORD0 and NAN_WORD1 are only referenced in strtod.c. Prior to
- * 20050115, they used to be hard-wired here (to 0x7ff80000 and 0,
- * respectively), but now are determined by compiling and running
- * qnan.c to generate gd_qnan.h, which specifies d_QNAN0 and d_QNAN1.
- * Formerly gdtoaimp.h recommended supplying suitable -DNAN_WORD0=...
- * and -DNAN_WORD1=... values if necessary. This should still work.
- * (On HP Series 700/800 machines, -DNAN_WORD0=0x7ff40000 works.)
- */
-#ifdef IEEE_Arith
-#ifdef IEEE_MC68k
-#define _0 0
-#define _1 1
-#ifndef NAN_WORD0
-#define NAN_WORD0 d_QNAN0
-#endif
-#ifndef NAN_WORD1
-#define NAN_WORD1 d_QNAN1
-#endif
-#else
-#define _0 1
-#define _1 0
-#ifndef NAN_WORD0
-#define NAN_WORD0 d_QNAN1
-#endif
-#ifndef NAN_WORD1
-#define NAN_WORD1 d_QNAN0
-#endif
-#endif
-#else
-#undef INFNAN_CHECK
-#endif
-
-#undef SI
-#ifdef Sudden_Underflow
-#define SI 1
-#else
-#define SI 0
-#endif
-
-#endif /* GDTOAIMP_H_INCLUDED */
diff --git a/winsup/mingw/mingwex/gdtoa/gethex.c b/winsup/mingw/mingwex/gdtoa/gethex.c
deleted file mode 100755
index b3a8b54..0000000
--- a/winsup/mingw/mingwex/gdtoa/gethex.c
+++ /dev/null
@@ -1,247 +0,0 @@
-/****************************************************************
-
-The author of this software is David M. Gay.
-
-Copyright (C) 1998 by Lucent Technologies
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the name of Lucent or any of its entities
-not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-
-****************************************************************/
-
-/* Please send bug reports to David M. Gay (dmg at acm dot org,
- * with " at " changed at "@" and " dot " changed to "."). */
-
-#include "gdtoaimp.h"
-
-#ifdef USE_LOCALE
-#include "locale.h"
-#endif
-
- int
-#ifdef KR_headers
-gethex(sp, fpi, exp, bp, sign)
- CONST char **sp; FPI *fpi; Long *exp; Bigint **bp; int sign;
-#else
-gethex( CONST char **sp, FPI *fpi, Long *exp, Bigint **bp, int sign)
-#endif
-{
- Bigint *b;
- CONST unsigned char *decpt, *s0, *s, *s1;
- int esign, havedig, irv, k, n, nbits, up, zret;
- ULong L, lostbits, *x;
- Long e, e1;
-#ifdef USE_LOCALE
- unsigned char decimalpoint = *localeconv()->decimal_point;
-#else
-#define decimalpoint '.'
-#endif
-
- if (!hexdig['0'])
- hexdig_init_D2A();
- havedig = 0;
- s0 = *(CONST unsigned char **)sp + 2;
- while(s0[havedig] == '0')
- havedig++;
- s0 += havedig;
- s = s0;
- decpt = 0;
- zret = 0;
- e = 0;
- if (!hexdig[*s]) {
- zret = 1;
- if (*s != decimalpoint)
- goto pcheck;
- decpt = ++s;
- if (!hexdig[*s])
- goto pcheck;
- while(*s == '0')
- s++;
- if (hexdig[*s])
- zret = 0;
- havedig = 1;
- s0 = s;
- }
- while(hexdig[*s])
- s++;
- if (*s == decimalpoint && !decpt) {
- decpt = ++s;
- while(hexdig[*s])
- s++;
- }
- if (decpt)
- e = -(((Long)(s-decpt)) << 2);
- pcheck:
- s1 = s;
- switch(*s) {
- case 'p':
- case 'P':
- esign = 0;
- switch(*++s) {
- case '-':
- esign = 1;
- /* no break */
- case '+':
- s++;
- }
- if ((n = hexdig[*s]) == 0 || n > 0x19) {
- s = s1;
- break;
- }
- e1 = n - 0x10;
- while((n = hexdig[*++s]) !=0 && n <= 0x19)
- e1 = 10*e1 + n - 0x10;
- if (esign)
- e1 = -e1;
- e += e1;
- }
- *sp = (char*)s;
- if (zret)
- return havedig ? STRTOG_Zero : STRTOG_NoNumber;
- n = s1 - s0 - 1;
- for(k = 0; n > 7; n >>= 1)
- k++;
- b = Balloc(k);
- x = b->x;
- n = 0;
- L = 0;
- while(s1 > s0) {
- if (*--s1 == decimalpoint)
- continue;
- if (n == 32) {
- *x++ = L;
- L = 0;
- n = 0;
- }
- L |= (hexdig[*s1] & 0x0f) << n;
- n += 4;
- }
- *x++ = L;
- b->wds = n = x - b->x;
- n = 32*n - hi0bits(L);
- nbits = fpi->nbits;
- lostbits = 0;
- x = b->x;
- if (n > nbits) {
- n -= nbits;
- if (any_on(b,n)) {
- lostbits = 1;
- k = n - 1;
- if (x[k>>kshift] & 1 << (k & kmask)) {
- lostbits = 2;
- if (k > 1 && any_on(b,k-1))
- lostbits = 3;
- }
- }
- rshift(b, n);
- e += n;
- }
- else if (n < nbits) {
- n = nbits - n;
- b = lshift(b, n);
- e -= n;
- x = b->x;
- }
- if (e > fpi->emax) {
- ovfl:
- Bfree(b);
- *bp = 0;
- return STRTOG_Infinite | STRTOG_Overflow | STRTOG_Inexhi;
- }
- irv = STRTOG_Normal;
- if (e < fpi->emin) {
- irv = STRTOG_Denormal;
- n = fpi->emin - e;
- if (n >= nbits) {
- switch (fpi->rounding) {
- case FPI_Round_near:
- if (n == nbits && (n < 2 || any_on(b,n-1)))
- goto one_bit;
- break;
- case FPI_Round_up:
- if (!sign)
- goto one_bit;
- break;
- case FPI_Round_down:
- if (sign) {
- one_bit:
- *exp = fpi->emin;
- x[0] = b->wds = 1;
- *bp = b;
- return STRTOG_Denormal | STRTOG_Inexhi
- | STRTOG_Underflow;
- }
- }
- Bfree(b);
- *bp = 0;
- return STRTOG_Zero | STRTOG_Inexlo | STRTOG_Underflow;
- }
- k = n - 1;
- if (lostbits)
- lostbits = 1;
- else if (k > 0)
- lostbits = any_on(b,k);
- if (x[k>>kshift] & 1 << (k & kmask))
- lostbits |= 2;
- nbits -= n;
- rshift(b,n);
- e = fpi->emin;
- }
- if (lostbits) {
- up = 0;
- switch(fpi->rounding) {
- case FPI_Round_zero:
- break;
- case FPI_Round_near:
- if (lostbits & 2
- && (lostbits & 1) | (x[0] & 1))
- up = 1;
- break;
- case FPI_Round_up:
- up = 1 - sign;
- break;
- case FPI_Round_down:
- up = sign;
- }
- if (up) {
- k = b->wds;
- b = increment(b);
- x = b->x;
- if (irv == STRTOG_Denormal) {
- if (nbits == fpi->nbits - 1
- && x[nbits >> kshift] & 1 << (nbits & kmask))
- irv = STRTOG_Normal;
- }
- else if (b->wds > k
- || ((n = nbits & kmask) !=0
- && hi0bits(x[k-1]) < 32-n)) {
- rshift(b,1);
- if (++e > fpi->emax)
- goto ovfl;
- }
- irv |= STRTOG_Inexhi;
- }
- else
- irv |= STRTOG_Inexlo;
- }
- *bp = b;
- *exp = e;
- return irv;
- }
diff --git a/winsup/mingw/mingwex/gdtoa/gmisc.c b/winsup/mingw/mingwex/gdtoa/gmisc.c
deleted file mode 100755
index 8270ef9..0000000
--- a/winsup/mingw/mingwex/gdtoa/gmisc.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************
-
-The author of this software is David M. Gay.
-
-Copyright (C) 1998 by Lucent Technologies
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the name of Lucent or any of its entities
-not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-
-****************************************************************/
-
-/* Please send bug reports to David M. Gay (dmg at acm dot org,
- * with " at " changed at "@" and " dot " changed to "."). */
-
-#include "gdtoaimp.h"
-
- void
-#ifdef KR_headers
-rshift(b, k) Bigint *b; int k;
-#else
-rshift(Bigint *b, int k)
-#endif
-{
- ULong *x, *x1, *xe, y;
- int n;
-
- x = x1 = b->x;
- n = k >> kshift;
- if (n < b->wds) {
- xe = x + b->wds;
- x += n;
- if (k &= kmask) {
- n = ULbits - k;
- y = *x++ >> k;
- while(x < xe) {
- *x1++ = (y | (*x << n)) & ALL_ON;
- y = *x++ >> k;
- }
- if ((*x1 = y) !=0)
- x1++;
- }
- else
- while(x < xe)
- *x1++ = *x++;
- }
- if ((b->wds = x1 - b->x) == 0)
- b->x[0] = 0;
- }
-
- int
-#ifdef KR_headers
-trailz(b) Bigint *b;
-#else
-trailz(Bigint *b)
-#endif
-{
- ULong L, *x, *xe;
- int n = 0;
-
- x = b->x;
- xe = x + b->wds;
- for(n = 0; x < xe && !*x; x++)
- n += ULbits;
- if (x < xe) {
- L = *x;
- n += lo0bits(&L);
- }
- return n;
- }
diff --git a/winsup/mingw/mingwex/gdtoa/hd_init.c b/winsup/mingw/mingwex/gdtoa/hd_init.c
deleted file mode 100755
index fa6e18d..0000000
--- a/winsup/mingw/mingwex/gdtoa/hd_init.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************
-
-The author of this software is David M. Gay.
-
-Copyright (C) 2000 by Lucent Technologies
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the name of Lucent or any of its entities
-not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-
-****************************************************************/
-
-/* Please send bug reports to David M. Gay (dmg at acm dot org,
- * with " at " changed at "@" and " dot " changed to "."). */
-
-#include "gdtoaimp.h"
-
- unsigned char hexdig[256];
-
- static void
-#ifdef KR_headers
-htinit(h, s, inc) unsigned char *h; unsigned char *s; int inc;
-#else
-htinit(unsigned char *h, unsigned char *s, int inc)
-#endif
-{
- int i, j;
- for(i = 0; (j = s[i]) !=0; i++)
- h[j] = i + inc;
- }
-
- void
-hexdig_init_D2A(Void)
-{
-#define USC (unsigned char *)
- htinit(hexdig, USC "0123456789", 0x10);
- htinit(hexdig, USC "abcdef", 0x10 + 10);
- htinit(hexdig, USC "ABCDEF", 0x10 + 10);
- }
diff --git a/winsup/mingw/mingwex/gdtoa/hexnan.c b/winsup/mingw/mingwex/gdtoa/hexnan.c
deleted file mode 100755
index 77d1ea7..0000000
--- a/winsup/mingw/mingwex/gdtoa/hexnan.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/****************************************************************
-
-The author of this software is David M. Gay.
-
-Copyright (C) 2000 by Lucent Technologies
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the name of Lucent or any of its entities
-not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-
-****************************************************************/
-
-/* Please send bug reports to David M. Gay (dmg at acm dot org,
- * with " at " changed at "@" and " dot " changed to "."). */
-
-#include "gdtoaimp.h"
-
- static void
-#ifdef KR_headers
-L_shift(x, x1, i) ULong *x; ULong *x1; int i;
-#else
-L_shift(ULong *x, ULong *x1, int i)
-#endif
-{
- int j;
-
- i = 8 - i;
- i <<= 2;
- j = ULbits - i;
- do {
- *x |= x[1] << j;
- x[1] >>= i;
- } while(++x < x1);
- }
-
- int
-#ifdef KR_headers
-hexnan(sp, fpi, x0)
- CONST char **sp; FPI *fpi; ULong *x0;
-#else
-hexnan( CONST char **sp, FPI *fpi, ULong *x0)
-#endif
-{
- ULong c, h, *x, *x1, *xe;
- CONST char *s;
- int havedig, hd0, i, nbits;
-
- if (!hexdig['0'])
- hexdig_init_D2A();
- nbits = fpi->nbits;
- x = x0 + (nbits >> kshift);
- if (nbits & kmask)
- x++;
- *--x = 0;
- x1 = xe = x;
- havedig = hd0 = i = 0;
- s = *sp;
- while((c = *(CONST unsigned char*)++s)) {
- if (!(h = hexdig[c])) {
- if (c <= ' ') {
- if (hd0 < havedig) {
- if (x < x1 && i < 8)
- L_shift(x, x1, i);
- if (x <= x0) {
- i = 8;
- continue;
- }
- hd0 = havedig;
- *--x = 0;
- x1 = x;
- i = 0;
- }
- continue;
- }
- if (/*(*/ c == ')' && havedig) {
- *sp = s + 1;
- break;
- }
- return STRTOG_NaN;
- }
- havedig++;
- if (++i > 8) {
- if (x <= x0)
- continue;
- i = 1;
- *--x = 0;
- }
- *x = (*x << 4) | (h & 0xf);
- }
- if (!havedig)
- return STRTOG_NaN;
- if (x < x1 && i < 8)
- L_shift(x, x1, i);
- if (x > x0) {
- x1 = x0;
- do *x1++ = *x++;
- while(x <= xe);
- do *x1++ = 0;
- while(x1 <= xe);
- }
- else {
- /* truncate high-order word if necessary */
- if ( (i = nbits & (ULbits-1)) !=0)
- *xe &= ((ULong)0xffffffff) >> (ULbits - i);
- }
- for(x1 = xe;; --x1) {
- if (*x1 != 0)
- break;
- if (x1 == x0) {
- *x1 = 1;
- break;
- }
- }
- return STRTOG_NaNbits;
- }
diff --git a/winsup/mingw/mingwex/gdtoa/misc.c b/winsup/mingw/mingwex/gdtoa/misc.c
deleted file mode 100755
index 784f900..0000000
--- a/winsup/mingw/mingwex/gdtoa/misc.c
+++ /dev/null
@@ -1,962 +0,0 @@
-/****************************************************************
-
-The author of this software is David M. Gay.
-
-Copyright (C) 1998, 1999 by Lucent Technologies
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the name of Lucent or any of its entities
-not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-
-****************************************************************/
-
-/* Please send bug reports to David M. Gay (dmg at acm dot org,
- * with " at " changed at "@" and " dot " changed to "."). */
-
-
-#ifdef __MINGW32__
-/* we have to include windows.h before gdtoa headers, otherwise
- defines cause conflicts. */
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
-#define NLOCKS 2
-
-#ifdef USE_WIN32_SL
-/* Use spin locks. */
-static long dtoa_sl[NLOCKS];
-
-#define ACQUIRE_DTOA_LOCK(n) \
- while (InterlockedCompareExchange (&dtoa_sl[n], 1, 0) != 0) \
- Sleep (0);
-#define FREE_DTOA_LOCK(n) InterlockedExchange (&dtoa_sl[n], 0);
-
-#else
-#include <stdlib.h>
-static CRITICAL_SECTION dtoa_CritSec[NLOCKS];
-static long dtoa_CS_init = 0;
-/*
- 1 = initializing
- 2 = initialized
- 3 = deleted
-*/
-static void dtoa_lock_cleanup()
-{
- long last_CS_init = InterlockedExchange (&dtoa_CS_init,3);
-
- if (2 == last_CS_init)
- {
- int i;
- for (i = 0; i < NLOCKS; i++)
- DeleteCriticalSection (&dtoa_CritSec[i]);
- }
-}
-
-static void dtoa_lock(int n)
-{
- if (2 == dtoa_CS_init)
- {
- EnterCriticalSection (&dtoa_CritSec[n]);
- return;
- }
-
- else if (0 == dtoa_CS_init)
- {
- long last_CS_init = InterlockedExchange (&dtoa_CS_init, 1);
- if (0 == last_CS_init)
- {
- int i;
- for (i = 0; i < NLOCKS; i++)
- InitializeCriticalSection (&dtoa_CritSec[i]);
- atexit (dtoa_lock_cleanup);
- dtoa_CS_init = 2;
- }
- else if (2 == last_CS_init)
- dtoa_CS_init = 2;
- }
- /* Another thread is initializing. Wait. */
- while (1 == dtoa_CS_init)
- Sleep (1);
-
- /* It had better be initialized now. */
- if (2 == dtoa_CS_init)
- EnterCriticalSection(&dtoa_CritSec[n]);
-}
-
-static void dtoa_unlock(int n)
-{
- if (2 == dtoa_CS_init)
- LeaveCriticalSection (&dtoa_CritSec[n]);
-}
-
-#define ACQUIRE_DTOA_LOCK(n) dtoa_lock(n)
-#define FREE_DTOA_LOCK(n) dtoa_unlock(n)
-#endif
-
-#endif /* __MINGW32__ */
-
-#include "gdtoaimp.h"
-
-#ifndef MULTIPLE_THREADS
- char *dtoa_result;
-#endif
-
- static Bigint *freelist[Kmax+1];
-#ifndef Omit_Private_Memory
-#ifndef PRIVATE_MEM
-#define PRIVATE_MEM 2304
-#endif
-#define PRIVATE_mem ((PRIVATE_MEM+sizeof(double)-1)/sizeof(double))
-static double private_mem[PRIVATE_mem], *pmem_next = private_mem;
-#endif
-
- Bigint *
-Balloc
-#ifdef KR_headers
- (k) int k;
-#else
- (int k)
-#endif
-{
- int x;
- Bigint *rv;
-#ifndef Omit_Private_Memory
- unsigned int len;
-#endif
-
- ACQUIRE_DTOA_LOCK(0);
- if ( (rv = freelist[k]) !=0) {
- freelist[k] = rv->next;
- }
- else {
- x = 1 << k;
-#ifdef Omit_Private_Memory
- rv = (Bigint *)MALLOC(sizeof(Bigint) + (x-1)*sizeof(ULong));
-#else
- len = (sizeof(Bigint) + (x-1)*sizeof(ULong) + sizeof(double) - 1)
- /sizeof(double);
- if (pmem_next - private_mem + len <= PRIVATE_mem) {
- rv = (Bigint*)pmem_next;
- pmem_next += len;
- }
- else
- rv = (Bigint*)MALLOC(len*sizeof(double));
-#endif
- rv->k = k;
- rv->maxwds = x;
- }
- FREE_DTOA_LOCK(0);
- rv->sign = rv->wds = 0;
- return rv;
- }
-
- void
-Bfree
-#ifdef KR_headers
- (v) Bigint *v;
-#else
- (Bigint *v)
-#endif
-{
- if (v) {
- ACQUIRE_DTOA_LOCK(0);
- v->next = freelist[v->k];
- freelist[v->k] = v;
- FREE_DTOA_LOCK(0);
- }
- }
-
-// Shift y so lowest bit is 1 and return the number of bits y was
-// shifted.
-// With __GNUC__, we use an inline wrapper for __builtin_clz()
-#ifndef __GNUC__
- int
-lo0bits
-#ifdef KR_headers
- (y) ULong *y;
-#else
- (ULong *y)
-#endif
-{
- register int k;
- register ULong x = *y;
-
- if (x & 7) {
- if (x & 1)
- return 0;
- if (x & 2) {
- *y = x >> 1;
- return 1;
- }
- *y = x >> 2;
- return 2;
- }
- k = 0;
- if (!(x & 0xffff)) {
- k = 16;
- x >>= 16;
- }
- if (!(x & 0xff)) {
- k += 8;
- x >>= 8;
- }
- if (!(x & 0xf)) {
- k += 4;
- x >>= 4;
- }
- if (!(x & 0x3)) {
- k += 2;
- x >>= 2;
- }
- if (!(x & 1)) {
- k++;
- x >>= 1;
- if (!x)
- return 32;
- }
- *y = x;
- return k;
- }
-
-#endif /* __GNUC__ */
-
- Bigint *
-multadd
-#ifdef KR_headers
- (b, m, a) Bigint *b; int m, a;
-#else
- (Bigint *b, int m, int a) /* multiply by m and add a */
-#endif
-{
- int i, wds;
-#ifdef ULLong
- ULong *x;
- ULLong carry, y;
-#else
- ULong carry, *x, y;
-#ifdef Pack_32
- ULong xi, z;
-#endif
-#endif
- Bigint *b1;
-
- wds = b->wds;
- x = b->x;
- i = 0;
- carry = a;
- do {
-#ifdef ULLong
- y = *x * (ULLong)m + carry;
- carry = y >> 32;
- *x++ = y & 0xffffffffUL;
-#else
-#ifdef Pack_32
- xi = *x;
- y = (xi & 0xffff) * m + carry;
- z = (xi >> 16) * m + (y >> 16);
- carry = z >> 16;
- *x++ = (z << 16) + (y & 0xffff);
-#else
- y = *x * m + carry;
- carry = y >> 16;
- *x++ = y & 0xffff;
-#endif
-#endif
- }
- while(++i < wds);
- if (carry) {
- if (wds >= b->maxwds) {
- b1 = Balloc(b->k+1);
- Bcopy(b1, b);
- Bfree(b);
- b = b1;
- }
- b->x[wds++] = carry;
- b->wds = wds;
- }
- return b;
- }
-
-// With __GNUC__, we use an inline wrapper for __builtin_clz()
-#ifndef __GNUC__
- int
-hi0bits_D2A
-#ifdef KR_headers
- (x) register ULong x;
-#else
- (register ULong x)
-#endif
-{
- register int k = 0;
-
- if (!(x & 0xffff0000)) {
- k = 16;
- x <<= 16;
- }
- if (!(x & 0xff000000)) {
- k += 8;
- x <<= 8;
- }
- if (!(x & 0xf0000000)) {
- k += 4;
- x <<= 4;
- }
- if (!(x & 0xc0000000)) {
- k += 2;
- x <<= 2;
- }
- if (!(x & 0x80000000)) {
- k++;
- if (!(x & 0x40000000))
- return 32;
- }
- return k;
- }
-
-#endif
-
- Bigint *
-i2b
-#ifdef KR_headers
- (i) int i;
-#else
- (int i)
-#endif
-{
- Bigint *b;
-
- b = Balloc(1);
- b->x[0] = i;
- b->wds = 1;
- return b;
- }
-
- Bigint *
-mult
-#ifdef KR_headers
- (a, b) Bigint *a, *b;
-#else
- (Bigint *a, Bigint *b)
-#endif
-{
- Bigint *c;
- int k, wa, wb, wc;
- ULong *x, *xa, *xae, *xb, *xbe, *xc, *xc0;
- ULong y;
-#ifdef ULLong
- ULLong carry, z;
-#else
- ULong carry, z;
-#ifdef Pack_32
- ULong z2;
-#endif
-#endif
-
- if (a->wds < b->wds) {
- c = a;
- a = b;
- b = c;
- }
- k = a->k;
- wa = a->wds;
- wb = b->wds;
- wc = wa + wb;
- if (wc > a->maxwds)
- k++;
- c = Balloc(k);
- for(x = c->x, xa = x + wc; x < xa; x++)
- *x = 0;
- xa = a->x;
- xae = xa + wa;
- xb = b->x;
- xbe = xb + wb;
- xc0 = c->x;
-#ifdef ULLong
- for(; xb < xbe; xc0++) {
- if ( (y = *xb++) !=0) {
- x = xa;
- xc = xc0;
- carry = 0;
- do {
- z = *x++ * (ULLong)y + *xc + carry;
- carry = z >> 32;
- *xc++ = z & 0xffffffffUL;
- }
- while(x < xae);
- *xc = carry;
- }
- }
-#else
-#ifdef Pack_32
- for(; xb < xbe; xb++, xc0++) {
- if ( (y = *xb & 0xffff) !=0) {
- x = xa;
- xc = xc0;
- carry = 0;
- do {
- z = (*x & 0xffff) * y + (*xc & 0xffff) + carry;
- carry = z >> 16;
- z2 = (*x++ >> 16) * y + (*xc >> 16) + carry;
- carry = z2 >> 16;
- Storeinc(xc, z2, z);
- }
- while(x < xae);
- *xc = carry;
- }
- if ( (y = *xb >> 16) !=0) {
- x = xa;
- xc = xc0;
- carry = 0;
- z2 = *xc;
- do {
- z = (*x & 0xffff) * y + (*xc >> 16) + carry;
- carry = z >> 16;
- Storeinc(xc, z, z2);
- z2 = (*x++ >> 16) * y + (*xc & 0xffff) + carry;
- carry = z2 >> 16;
- }
- while(x < xae);
- *xc = z2;
- }
- }
-#else
- for(; xb < xbe; xc0++) {
- if ( (y = *xb++) !=0) {
- x = xa;
- xc = xc0;
- carry = 0;
- do {
- z = *x++ * y + *xc + carry;
- carry = z >> 16;
- *xc++ = z & 0xffff;
- }
- while(x < xae);
- *xc = carry;
- }
- }
-#endif
-#endif
- for(xc0 = c->x, xc = xc0 + wc; wc > 0 && !*--xc; --wc) ;
- c->wds = wc;
- return c;
- }
-
- static Bigint *p5s;
-
- Bigint *
-pow5mult
-#ifdef KR_headers
- (b, k) Bigint *b; int k;
-#else
- (Bigint *b, int k)
-#endif
-{
- Bigint *b1, *p5, *p51;
- int i;
- static int p05[3] = { 5, 25, 125 };
-
- if ( (i = k & 3) !=0)
- b = multadd(b, p05[i-1], 0);
-
- if (!(k >>= 2))
- return b;
- if ((p5 = p5s) == 0) {
- /* first time */
-#ifdef MULTIPLE_THREADS
- ACQUIRE_DTOA_LOCK(1);
- if (!(p5 = p5s)) {
- p5 = p5s = i2b(625);
- p5->next = 0;
- }
- FREE_DTOA_LOCK(1);
-#else
- p5 = p5s = i2b(625);
- p5->next = 0;
-#endif
- }
- for(;;) {
- if (k & 1) {
- b1 = mult(b, p5);
- Bfree(b);
- b = b1;
- }
- if (!(k >>= 1))
- break;
- if ((p51 = p5->next) == 0) {
-#ifdef MULTIPLE_THREADS
- ACQUIRE_DTOA_LOCK(1);
- if (!(p51 = p5->next)) {
- p51 = p5->next = mult(p5,p5);
- p51->next = 0;
- }
- FREE_DTOA_LOCK(1);
-#else
- p51 = p5->next = mult(p5,p5);
- p51->next = 0;
-#endif
- }
- p5 = p51;
- }
- return b;
- }
-
-
- Bigint *
-lshift
-#ifdef KR_headers
- (b, k) Bigint *b; int k;
-#else
- (Bigint *b, int k)
-#endif
-{
- int i, k1, n, n1;
- Bigint *b1;
- ULong *x, *x1, *xe, z;
-
- n = k >> kshift;
- k1 = b->k;
- n1 = n + b->wds + 1;
- for(i = b->maxwds; n1 > i; i <<= 1)
- k1++;
- b1 = Balloc(k1);
- x1 = b1->x;
- for(i = 0; i < n; i++)
- *x1++ = 0;
- x = b->x;
- xe = x + b->wds;
- if (k &= kmask) {
-#ifdef Pack_32
- k1 = 32 - k;
- z = 0;
- do {
- *x1++ = *x << k | z;
- z = *x++ >> k1;
- }
- while(x < xe);
- if ((*x1 = z) !=0)
- ++n1;
-#else
- k1 = 16 - k;
- z = 0;
- do {
- *x1++ = *x << k & 0xffff | z;
- z = *x++ >> k1;
- }
- while(x < xe);
- if (*x1 = z)
- ++n1;
-#endif
- }
- else do
- *x1++ = *x++;
- while(x < xe);
- b1->wds = n1 - 1;
- Bfree(b);
- return b1;
- }
-
- int
-cmp
-#ifdef KR_headers
- (a, b) Bigint *a, *b;
-#else
- (Bigint *a, Bigint *b)
-#endif
-{
- ULong *xa, *xa0, *xb, *xb0;
- int i, j;
-
- i = a->wds;
- j = b->wds;
-#ifdef DEBUG
- if (i > 1 && !a->x[i-1])
- Bug("cmp called with a->x[a->wds-1] == 0");
- if (j > 1 && !b->x[j-1])
- Bug("cmp called with b->x[b->wds-1] == 0");
-#endif
- if (i -= j)
- return i;
- xa0 = a->x;
- xa = xa0 + j;
- xb0 = b->x;
- xb = xb0 + j;
- for(;;) {
- if (*--xa != *--xb)
- return *xa < *xb ? -1 : 1;
- if (xa <= xa0)
- break;
- }
- return 0;
- }
-
- Bigint *
-diff
-#ifdef KR_headers
- (a, b) Bigint *a, *b;
-#else
- (Bigint *a, Bigint *b)
-#endif
-{
- Bigint *c;
- int i, wa, wb;
- ULong *xa, *xae, *xb, *xbe, *xc;
-#ifdef ULLong
- ULLong borrow, y;
-#else
- ULong borrow, y;
-#ifdef Pack_32
- ULong z;
-#endif
-#endif
-
- i = cmp(a,b);
- if (!i) {
- c = Balloc(0);
- c->wds = 1;
- c->x[0] = 0;
- return c;
- }
- if (i < 0) {
- c = a;
- a = b;
- b = c;
- i = 1;
- }
- else
- i = 0;
- c = Balloc(a->k);
- c->sign = i;
- wa = a->wds;
- xa = a->x;
- xae = xa + wa;
- wb = b->wds;
- xb = b->x;
- xbe = xb + wb;
- xc = c->x;
- borrow = 0;
-#ifdef ULLong
- do {
- y = (ULLong)*xa++ - *xb++ - borrow;
- borrow = y >> 32 & 1UL;
- *xc++ = y & 0xffffffffUL;
- }
- while(xb < xbe);
- while(xa < xae) {
- y = *xa++ - borrow;
- borrow = y >> 32 & 1UL;
- *xc++ = y & 0xffffffffUL;
- }
-#else
-#ifdef Pack_32
- do {
- y = (*xa & 0xffff) - (*xb & 0xffff) - borrow;
- borrow = (y & 0x10000) >> 16;
- z = (*xa++ >> 16) - (*xb++ >> 16) - borrow;
- borrow = (z & 0x10000) >> 16;
- Storeinc(xc, z, y);
- }
- while(xb < xbe);
- while(xa < xae) {
- y = (*xa & 0xffff) - borrow;
- borrow = (y & 0x10000) >> 16;
- z = (*xa++ >> 16) - borrow;
- borrow = (z & 0x10000) >> 16;
- Storeinc(xc, z, y);
- }
-#else
- do {
- y = *xa++ - *xb++ - borrow;
- borrow = (y & 0x10000) >> 16;
- *xc++ = y & 0xffff;
- }
- while(xb < xbe);
- while(xa < xae) {
- y = *xa++ - borrow;
- borrow = (y & 0x10000) >> 16;
- *xc++ = y & 0xffff;
- }
-#endif
-#endif
- while(!*--xc)
- wa--;
- c->wds = wa;
- return c;
- }
-
- double
-b2d
-#ifdef KR_headers
- (a, e) Bigint *a; int *e;
-#else
- (Bigint *a, int *e)
-#endif
-{
- ULong *xa, *xa0, w, y, z;
- int k;
- double d;
-#ifdef VAX
- ULong d0, d1;
-#else
-#define d0 word0(d)
-#define d1 word1(d)
-#endif
-
- xa0 = a->x;
- xa = xa0 + a->wds;
- y = *--xa;
-#ifdef DEBUG
- if (!y) Bug("zero y in b2d");
-#endif
- k = hi0bits(y);
- *e = 32 - k;
-#ifdef Pack_32
- if (k < Ebits) {
- d0 = Exp_1 | y >> (Ebits - k);
- w = xa > xa0 ? *--xa : 0;
- d1 = y << ((32-Ebits) + k) | w >> (Ebits - k);
- goto ret_d;
- }
- z = xa > xa0 ? *--xa : 0;
- if (k -= Ebits) {
- d0 = Exp_1 | y << k | z >> (32 - k);
- y = xa > xa0 ? *--xa : 0;
- d1 = z << k | y >> (32 - k);
- }
- else {
- d0 = Exp_1 | y;
- d1 = z;
- }
-#else
- if (k < Ebits + 16) {
- z = xa > xa0 ? *--xa : 0;
- d0 = Exp_1 | y << k - Ebits | z >> Ebits + 16 - k;
- w = xa > xa0 ? *--xa : 0;
- y = xa > xa0 ? *--xa : 0;
- d1 = z << k + 16 - Ebits | w << k - Ebits | y >> 16 + Ebits - k;
- goto ret_d;
- }
- z = xa > xa0 ? *--xa : 0;
- w = xa > xa0 ? *--xa : 0;
- k -= Ebits + 16;
- d0 = Exp_1 | y << k + 16 | z << k | w >> 16 - k;
- y = xa > xa0 ? *--xa : 0;
- d1 = w << k + 16 | y << k;
-#endif
- ret_d:
-#ifdef VAX
- word0(d) = d0 >> 16 | d0 << 16;
- word1(d) = d1 >> 16 | d1 << 16;
-#endif
- return dval(d);
- }
-#undef d0
-#undef d1
-
- Bigint *
-d2b
-#ifdef KR_headers
- (d, e, bits) double d; int *e, *bits;
-#else
- (double d, int *e, int *bits)
-#endif
-{
- Bigint *b;
-#ifndef Sudden_Underflow
- int i;
-#endif
- int de, k;
- ULong *x, y, z;
-#ifdef VAX
- ULong d0, d1;
- d0 = word0(d) >> 16 | word0(d) << 16;
- d1 = word1(d) >> 16 | word1(d) << 16;
-#else
-#define d0 word0(d)
-#define d1 word1(d)
-#endif
-
-#ifdef Pack_32
- b = Balloc(1);
-#else
- b = Balloc(2);
-#endif
- x = b->x;
-
- z = d0 & Frac_mask;
- d0 &= 0x7fffffff; /* clear sign bit, which we ignore */
-#ifdef Sudden_Underflow
- de = (int)(d0 >> Exp_shift);
-#ifndef IBM
- z |= Exp_msk11;
-#endif
-#else
- if ( (de = (int)(d0 >> Exp_shift)) !=0)
- z |= Exp_msk1;
-#endif
-#ifdef Pack_32
- if ( (y = d1) !=0) {
- if ( (k = lo0bits(&y)) !=0) {
- x[0] = y | z << (32 - k);
- z >>= k;
- }
- else
- x[0] = y;
-#ifndef Sudden_Underflow
- i =
-#endif
- b->wds = (x[1] = z) !=0 ? 2 : 1;
- }
- else {
-#ifdef DEBUG
- if (!z)
- Bug("Zero passed to d2b");
-#endif
- k = lo0bits(&z);
- x[0] = z;
-#ifndef Sudden_Underflow
- i =
-#endif
- b->wds = 1;
- k += 32;
- }
-#else
- if ( (y = d1) !=0) {
- if ( (k = lo0bits(&y)) !=0)
- if (k >= 16) {
- x[0] = y | z << 32 - k & 0xffff;
- x[1] = z >> k - 16 & 0xffff;
- x[2] = z >> k;
- i = 2;
- }
- else {
- x[0] = y & 0xffff;
- x[1] = y >> 16 | z << 16 - k & 0xffff;
- x[2] = z >> k & 0xffff;
- x[3] = z >> k+16;
- i = 3;
- }
- else {
- x[0] = y & 0xffff;
- x[1] = y >> 16;
- x[2] = z & 0xffff;
- x[3] = z >> 16;
- i = 3;
- }
- }
- else {
-#ifdef DEBUG
- if (!z)
- Bug("Zero passed to d2b");
-#endif
- k = lo0bits(&z);
- if (k >= 16) {
- x[0] = z;
- i = 0;
- }
- else {
- x[0] = z & 0xffff;
- x[1] = z >> 16;
- i = 1;
- }
- k += 32;
- }
- while(!x[i])
- --i;
- b->wds = i + 1;
-#endif
-#ifndef Sudden_Underflow
- if (de) {
-#endif
-#ifdef IBM
- *e = (de - Bias - (P-1) << 2) + k;
- *bits = 4*P + 8 - k - hi0bits(word0(d) & Frac_mask);
-#else
- *e = de - Bias - (P-1) + k;
- *bits = P - k;
-#endif
-#ifndef Sudden_Underflow
- }
- else {
- *e = de - Bias - (P-1) + 1 + k;
-#ifdef Pack_32
- *bits = 32*i - hi0bits(x[i-1]);
-#else
- *bits = (i+2)*16 - hi0bits(x[i]);
-#endif
- }
-#endif
- return b;
- }
-#undef d0
-#undef d1
-
- CONST double
-#ifdef IEEE_Arith
-bigtens[] = { 1e16, 1e32, 1e64, 1e128, 1e256 };
-CONST double tinytens[] = { 1e-16, 1e-32, 1e-64, 1e-128, 1e-256
- };
-#else
-#ifdef IBM
-bigtens[] = { 1e16, 1e32, 1e64 };
-CONST double tinytens[] = { 1e-16, 1e-32, 1e-64 };
-#else
-bigtens[] = { 1e16, 1e32 };
-CONST double tinytens[] = { 1e-16, 1e-32 };
-#endif
-#endif
-
- CONST double
-tens[] = {
- 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9,
- 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19,
- 1e20, 1e21, 1e22
-#ifdef VAX
- , 1e23, 1e24
-#endif
- };
-
- char *
-#ifdef KR_headers
-strcp_D2A(a, b) char *a; char *b;
-#else
-strcp_D2A(char *a, CONST char *b)
-#endif
-{
- while((*a = *b++))
- a++;
- return a;
- }
-
-#ifdef NO_STRING_H
-
- Char *
-#ifdef KR_headers
-memcpy_D2A(a, b, len) Char *a; Char *b; size_t len;
-#else
-memcpy_D2A(void *a1, void *b1, size_t len)
-#endif
-{
- register char *a = (char*)a1, *ae = a + len;
- register char *b = (char*)b1, *a0 = a;
- while(a < ae)
- *a++ = *b++;
- return a0;
- }
-
-#endif /* NO_STRING_H */
diff --git a/winsup/mingw/mingwex/gdtoa/qnan.c b/winsup/mingw/mingwex/gdtoa/qnan.c
deleted file mode 100755
index ca56472..0000000
--- a/winsup/mingw/mingwex/gdtoa/qnan.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/****************************************************************
-
-The author of this software is David M. Gay.
-
-Copyright (C) 2005 by David M. Gay
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that the copyright notice and this permission notice and warranty
-disclaimer appear in supporting documentation, and that the name of
-the author or any of his current or former employers not be used in
-advertising or publicity pertaining to distribution of the software
-without specific, written prior permission.
-
-THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
-NO EVENT SHALL THE AUTHOR OR ANY OF HIS CURRENT OR FORMER EMPLOYERS BE
-LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
-DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-****************************************************************/
-
-/* Please send bug reports to David M. Gay (dmg at acm dot org,
- * with " at " changed at "@" and " dot " changed to "."). */
-
-/* Program to compute quiet NaNs of various precisions (float, */
-/* double, and perhaps long double) on the current system, */
-/* provided the system uses binary IEEE (P754) arithmetic. */
-/* Note that one system's quiet NaN may be a signaling NaN on */
-/* another system. The IEEE arithmetic standards (P754, P854) */
-/* do not specify how to distinguish signaling NaNs from quiet */
-/* ones, and this detail varies across systems. The computed */
-/* NaN values are encoded in #defines for values for an */
-/* unsigned 32-bit integer type, called Ulong below, and */
-/* (for long double) perhaps as unsigned short values. Once */
-/* upon a time, there were PC compilers for Intel CPUs that */
-/* had sizeof(long double) = 10. Are such compilers still */
-/* distributed? */
-
-#include <stdio.h>
-#include "gd_arith.h"
-
-#ifndef Long
-#define Long long
-#endif
-
-typedef unsigned Long Ulong;
-
-#undef HAVE_IEEE
-#ifdef IEEE_8087
-#define _0 1
-#define _1 0
-#define HAVE_IEEE
-#endif
-#ifdef IEEE_MC68k
-#define _0 0
-#define _1 1
-#define HAVE_IEEE
-#endif
-
-#define UL (unsigned long)
-
- int
-main(void)
-{
-#ifdef HAVE_IEEE
- typedef union {
- float f;
- double d;
- Ulong L[4];
-#ifndef NO_LONG_LONG
- unsigned short u[5];
- long double D;
-#endif
- } U;
- U a, b, c;
- int i;
-
- a.L[0] = b.L[0] = 0x7f800000;
- c.f = a.f - b.f;
- printf("#define f_QNAN 0x%lx\n", UL c.L[0]);
- a.L[_0] = b.L[_0] = 0x7ff00000;
- a.L[_1] = b.L[_1] = 0;
- c.d = a.d - b.d; /* quiet NaN */
- printf("#define d_QNAN0 0x%lx\n", UL c.L[0]);
- printf("#define d_QNAN1 0x%lx\n", UL c.L[1]);
-#ifdef NO_LONG_LONG
- for(i = 0; i < 4; i++)
- printf("#define ld_QNAN%d 0xffffffff\n", i);
- for(i = 0; i < 5; i++)
- printf("#define ldus_QNAN%d 0xffff\n", i);
-#else
- b.D = c.D = a.d;
- if (printf("") < 0)
- c.D = 37; /* never executed; just defeat optimization */
- a.L[2] = a.L[3] = 0;
- a.D = b.D - c.D;
- for(i = 0; i < 4; i++)
- printf("#define ld_QNAN%d 0x%lx\n", i, UL a.L[i]);
- for(i = 0; i < 5; i++)
- printf("#define ldus_QNAN%d 0x%x\n", i, a.u[i]);
-#endif
-#endif /* HAVE_IEEE */
- return 0;
- }
diff --git a/winsup/mingw/mingwex/gdtoa/smisc.c b/winsup/mingw/mingwex/gdtoa/smisc.c
deleted file mode 100755
index 163011e..0000000
--- a/winsup/mingw/mingwex/gdtoa/smisc.c
+++ /dev/null
@@ -1,191 +0,0 @@
-/****************************************************************
-
-The author of this software is David M. Gay.
-
-Copyright (C) 1998, 1999 by Lucent Technologies
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the name of Lucent or any of its entities
-not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-
-****************************************************************/
-
-/* Please send bug reports to David M. Gay (dmg at acm dot org,
- * with " at " changed at "@" and " dot " changed to "."). */
-
-#include "gdtoaimp.h"
-
- Bigint *
-s2b
-#ifdef KR_headers
- (s, nd0, nd, y9) CONST char *s; int nd0, nd; ULong y9;
-#else
- (CONST char *s, int nd0, int nd, ULong y9)
-#endif
-{
- Bigint *b;
- int i, k;
- Long x, y;
-
- x = (nd + 8) / 9;
- for(k = 0, y = 1; x > y; y <<= 1, k++) ;
-#ifdef Pack_32
- b = Balloc(k);
- b->x[0] = y9;
- b->wds = 1;
-#else
- b = Balloc(k+1);
- b->x[0] = y9 & 0xffff;
- b->wds = (b->x[1] = y9 >> 16) ? 2 : 1;
-#endif
-
- i = 9;
- if (9 < nd0) {
- s += 9;
- do b = multadd(b, 10, *s++ - '0');
- while(++i < nd0);
- s++;
- }
- else
- s += 10;
- for(; i < nd; i++)
- b = multadd(b, 10, *s++ - '0');
- return b;
- }
-
- double
-ratio
-#ifdef KR_headers
- (a, b) Bigint *a, *b;
-#else
- (Bigint *a, Bigint *b)
-#endif
-{
- double da, db;
- int k, ka, kb;
-
- dval(da) = b2d(a, &ka);
- dval(db) = b2d(b, &kb);
- k = ka - kb + ULbits*(a->wds - b->wds);
-#ifdef IBM
- if (k > 0) {
- word0(da) += (k >> 2)*Exp_msk1;
- if (k &= 3)
- dval(da) *= 1 << k;
- }
- else {
- k = -k;
- word0(db) += (k >> 2)*Exp_msk1;
- if (k &= 3)
- dval(db) *= 1 << k;
- }
-#else
- if (k > 0)
- word0(da) += k*Exp_msk1;
- else {
- k = -k;
- word0(db) += k*Exp_msk1;
- }
-#endif
- return dval(da) / dval(db);
- }
-
-#ifdef INFNAN_CHECK
-
- int
-match
-#ifdef KR_headers
- (sp, t) char **sp, *t;
-#else
- (CONST char **sp, char *t)
-#endif
-{
- int c, d;
- CONST char *s = *sp;
-
- while( (d = *t++) !=0) {
- if ((c = *++s) >= 'A' && c <= 'Z')
- c += 'a' - 'A';
- if (c != d)
- return 0;
- }
- *sp = s + 1;
- return 1;
- }
-#endif /* INFNAN_CHECK */
-
- void
-#ifdef KR_headers
-copybits(c, n, b) ULong *c; int n; Bigint *b;
-#else
-copybits(ULong *c, int n, Bigint *b)
-#endif
-{
- ULong *ce, *x, *xe;
-#ifdef Pack_16
- int nw, nw1;
-#endif
-
- ce = c + ((n-1) >> kshift) + 1;
- x = b->x;
-#ifdef Pack_32
- xe = x + b->wds;
- while(x < xe)
- *c++ = *x++;
-#else
- nw = b->wds;
- nw1 = nw & 1;
- for(xe = x + (nw - nw1); x < xe; x += 2)
- Storeinc(c, x[1], x[0]);
- if (nw1)
- *c++ = *x;
-#endif
- while(c < ce)
- *c++ = 0;
- }
-
- ULong
-#ifdef KR_headers
-any_on(b, k) Bigint *b; int k;
-#else
-any_on(Bigint *b, int k)
-#endif
-{
- int n, nwds;
- ULong *x, *x0, x1, x2;
-
- x = b->x;
- nwds = b->wds;
- n = k >> kshift;
- if (n > nwds)
- n = nwds;
- else if (n < nwds && (k &= kmask)) {
- x1 = x2 = x[n];
- x1 >>= k;
- x1 <<= k;
- if (x1 != x2)
- return 1;
- }
- x0 = x;
- x += n;
- while(x > x0)
- if (*--x)
- return 1;
- return 0;
- }
diff --git a/winsup/mingw/mingwex/gdtoa/strtodg.c b/winsup/mingw/mingwex/gdtoa/strtodg.c
deleted file mode 100755
index 1f8de7c..0000000
--- a/winsup/mingw/mingwex/gdtoa/strtodg.c
+++ /dev/null
@@ -1,1012 +0,0 @@
-/****************************************************************
-
-The author of this software is David M. Gay.
-
-Copyright (C) 1998-2001 by Lucent Technologies
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the name of Lucent or any of its entities
-not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-
-****************************************************************/
-
-/* Please send bug reports to David M. Gay (dmg at acm dot org,
- * with " at " changed at "@" and " dot " changed to "."). */
-
-#include "gdtoaimp.h"
-
-#ifdef USE_LOCALE
-#include "locale.h"
-#endif
-
- static CONST int
-fivesbits[] = { 0, 3, 5, 7, 10, 12, 14, 17, 19, 21,
- 24, 26, 28, 31, 33, 35, 38, 40, 42, 45,
- 47, 49, 52
-#ifdef VAX
- , 54, 56
-#endif
- };
-
- Bigint *
-#ifdef KR_headers
-increment(b) Bigint *b;
-#else
-increment(Bigint *b)
-#endif
-{
- ULong *x, *xe;
- Bigint *b1;
-#ifdef Pack_16
- ULong carry = 1, y;
-#endif
-
- x = b->x;
- xe = x + b->wds;
-#ifdef Pack_32
- do {
- if (*x < (ULong)0xffffffffL) {
- ++*x;
- return b;
- }
- *x++ = 0;
- } while(x < xe);
-#else
- do {
- y = *x + carry;
- carry = y >> 16;
- *x++ = y & 0xffff;
- if (!carry)
- return b;
- } while(x < xe);
- if (carry)
-#endif
- {
- if (b->wds >= b->maxwds) {
- b1 = Balloc(b->k+1);
- Bcopy(b1,b);
- Bfree(b);
- b = b1;
- }
- b->x[b->wds++] = 1;
- }
- return b;
- }
-
- int
-#ifdef KR_headers
-decrement(b) Bigint *b;
-#else
-decrement(Bigint *b)
-#endif
-{
- ULong *x, *xe;
-#ifdef Pack_16
- ULong borrow = 1, y;
-#endif
-
- x = b->x;
- xe = x + b->wds;
-#ifdef Pack_32
- do {
- if (*x) {
- --*x;
- break;
- }
- *x++ = 0xffffffffL;
- }
- while(x < xe);
-#else
- do {
- y = *x - borrow;
- borrow = (y & 0x10000) >> 16;
- *x++ = y & 0xffff;
- } while(borrow && x < xe);
-#endif
- return STRTOG_Inexlo;
- }
-
- static int
-#ifdef KR_headers
-all_on(b, n) Bigint *b; int n;
-#else
-all_on(Bigint *b, int n)
-#endif
-{
- ULong *x, *xe;
-
- x = b->x;
- xe = x + (n >> kshift);
- while(x < xe)
- if ((*x++ & ALL_ON) != ALL_ON)
- return 0;
- if (n &= kmask)
- return ((*x | (ALL_ON << n)) & ALL_ON) == ALL_ON;
- return 1;
- }
-
- Bigint *
-#ifdef KR_headers
-set_ones(b, n) Bigint *b; int n;
-#else
-set_ones(Bigint *b, int n)
-#endif
-{
- int k;
- ULong *x, *xe;
-
- k = (n + ((1 << kshift) - 1)) >> kshift;
- if (b->k < k) {
- Bfree(b);
- b = Balloc(k);
- }
- k = n >> kshift;
- if (n &= kmask)
- k++;
- b->wds = k;
- x = b->x;
- xe = x + k;
- while(x < xe)
- *x++ = ALL_ON;
- if (n)
- x[-1] >>= ULbits - n;
- return b;
- }
-
- static int
-rvOK
-#ifdef KR_headers
- (d, fpi, exp, bits, exact, rd, irv)
- double d; FPI *fpi; Long *exp; ULong *bits; int exact, rd, *irv;
-#else
- (double d, FPI *fpi, Long *exp, ULong *bits, int exact, int rd, int *irv)
-#endif
-{
- Bigint *b;
- ULong carry, inex, lostbits;
- int bdif, e, j, k, k1, nb, rv;
-
- carry = rv = 0;
- b = d2b(d, &e, &bdif);
- bdif -= nb = fpi->nbits;
- e += bdif;
- if (bdif <= 0) {
- if (exact)
- goto trunc;
- goto ret;
- }
- if (P == nb) {
- if (
-#ifndef IMPRECISE_INEXACT
- exact &&
-#endif
- fpi->rounding ==
-#ifdef RND_PRODQUOT
- FPI_Round_near
-#else
- Flt_Rounds
-#endif
- ) goto trunc;
- goto ret;
- }
- switch(rd) {
- case 1:
- goto trunc;
- case 2:
- break;
- default: /* round near */
- k = bdif - 1;
- if (k < 0)
- goto trunc;
- if (!k) {
- if (!exact)
- goto ret;
- if (b->x[0] & 2)
- break;
- goto trunc;
- }
- if (b->x[k>>kshift] & ((ULong)1 << (k & kmask)))
- break;
- goto trunc;
- }
- /* "break" cases: round up 1 bit, then truncate; bdif > 0 */
- carry = 1;
- trunc:
- inex = lostbits = 0;
- if (bdif > 0) {
- if ( (lostbits = any_on(b, bdif)) !=0)
- inex = STRTOG_Inexlo;
- rshift(b, bdif);
- if (carry) {
- inex = STRTOG_Inexhi;
- b = increment(b);
- if ( (j = nb & kmask) !=0)
- j = ULbits - j;
- if (hi0bits(b->x[b->wds - 1]) != j) {
- if (!lostbits)
- lostbits = b->x[0] & 1;
- rshift(b, 1);
- e++;
- }
- }
- }
- else if (bdif < 0)
- b = lshift(b, -bdif);
- if (e < fpi->emin) {
- k = fpi->emin - e;
- e = fpi->emin;
- if (k > nb || fpi->sudden_underflow) {
- b->wds = inex = 0;
- *irv = STRTOG_Underflow | STRTOG_Inexlo;
- }
- else {
- k1 = k - 1;
- if (k1 > 0 && !lostbits)
- lostbits = any_on(b, k1);
- if (!lostbits && !exact)
- goto ret;
- lostbits |=
- carry = b->x[k1>>kshift] & (1 << (k1 & kmask));
- rshift(b, k);
- *irv = STRTOG_Denormal;
- if (carry) {
- b = increment(b);
- inex = STRTOG_Inexhi | STRTOG_Underflow;
- }
- else if (lostbits)
- inex = STRTOG_Inexlo | STRTOG_Underflow;
- }
- }
- else if (e > fpi->emax) {
- e = fpi->emax + 1;
- *irv = STRTOG_Infinite | STRTOG_Overflow | STRTOG_Inexhi;
-#ifndef NO_ERRNO
- errno = ERANGE;
-#endif
- b->wds = inex = 0;
- }
- *exp = e;
- copybits(bits, nb, b);
- *irv |= inex;
- rv = 1;
- ret:
- Bfree(b);
- return rv;
- }
-
- static int
-#ifdef KR_headers
-mantbits(d) double d;
-#else
-mantbits(double d)
-#endif
-{
- ULong L;
-#ifdef VAX
- L = word1(d) << 16 | word1(d) >> 16;
- if (L)
-#else
- if ( (L = word1(d)) !=0)
-#endif
- return P - lo0bits(&L);
-#ifdef VAX
- L = word0(d) << 16 | word0(d) >> 16 | Exp_msk11;
-#else
- L = word0(d) | Exp_msk1;
-#endif
- return P - 32 - lo0bits(&L);
- }
-
- int
-__strtodg
-#ifdef KR_headers
- (s00, se, fpi, exp, bits)
- CONST char *s00; char **se; FPI *fpi; Long *exp; ULong *bits;
-#else
- (CONST char *s00, char **se, FPI *fpi, Long *exp, ULong *bits)
-#endif
-{
- int abe, abits, asub;
- int bb0, bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, decpt, denorm;
- int dsign, e, e1, e2, emin, esign, finished, i, inex, irv;
- int j, k, nbits, nd, nd0, nf, nz, nz0, rd, rvbits, rve, rve1, sign;
- int sudden_underflow;
- CONST char *s, *s0, *s1;
- double adj, adj0, rv, tol;
- Long L;
- ULong y, z;
- Bigint *ab, *bb, *bb1, *bd, *bd0, *bs, *delta, *rvb, *rvb0;
-
- irv = STRTOG_Zero;
- denorm = sign = nz0 = nz = 0;
- dval(rv) = 0.;
- rvb = 0;
- nbits = fpi->nbits;
- for(s = s00;;s++) switch(*s) {
- case '-':
- sign = 1;
- /* no break */
- case '+':
- if (*++s)
- goto break2;
- /* no break */
- case 0:
- sign = 0;
- irv = STRTOG_NoNumber;
- s = s00;
- goto ret;
- case '\t':
- case '\n':
- case '\v':
- case '\f':
- case '\r':
- case ' ':
- continue;
- default:
- goto break2;
- }
- break2:
- if (*s == '0') {
-#ifndef NO_HEX_FP
- switch(s[1]) {
- case 'x':
- case 'X':
- irv = gethex(&s, fpi, exp, &rvb, sign);
- if (irv == STRTOG_NoNumber) {
- s = s00;
- sign = 0;
- }
- goto ret;
- }
-#endif
- nz0 = 1;
- while(*++s == '0') ;
- if (!*s)
- goto ret;
- }
- sudden_underflow = fpi->sudden_underflow;
- s0 = s;
- y = z = 0;
- for(decpt = nd = nf = 0; (c = *s) >= '0' && c <= '9'; nd++, s++)
- if (nd < 9)
- y = 10*y + c - '0';
- else if (nd < 16)
- z = 10*z + c - '0';
- nd0 = nd;
-#ifdef USE_LOCALE
- if (c == *localeconv()->decimal_point)
-#else
- if (c == '.')
-#endif
- {
- decpt = 1;
- c = *++s;
- if (!nd) {
- for(; c == '0'; c = *++s)
- nz++;
- if (c > '0' && c <= '9') {
- s0 = s;
- nf += nz;
- nz = 0;
- goto have_dig;
- }
- goto dig_done;
- }
- for(; c >= '0' && c <= '9'; c = *++s) {
- have_dig:
- nz++;
- if (c -= '0') {
- nf += nz;
- for(i = 1; i < nz; i++)
- if (nd++ < 9)
- y *= 10;
- else if (nd <= DBL_DIG + 1)
- z *= 10;
- if (nd++ < 9)
- y = 10*y + c;
- else if (nd <= DBL_DIG + 1)
- z = 10*z + c;
- nz = 0;
- }
- }
- }
- dig_done:
- e = 0;
- if (c == 'e' || c == 'E') {
- if (!nd && !nz && !nz0) {
- irv = STRTOG_NoNumber;
- s = s00;
- goto ret;
- }
- s00 = s;
- esign = 0;
- switch(c = *++s) {
- case '-':
- esign = 1;
- case '+':
- c = *++s;
- }
- if (c >= '0' && c <= '9') {
- while(c == '0')
- c = *++s;
- if (c > '0' && c <= '9') {
- L = c - '0';
- s1 = s;
- while((c = *++s) >= '0' && c <= '9')
- L = 10*L + c - '0';
- if (s - s1 > 8 || L > 19999)
- /* Avoid confusion from exponents
- * so large that e might overflow.
- */
- e = 19999; /* safe for 16 bit ints */
- else
- e = (int)L;
- if (esign)
- e = -e;
- }
- else
- e = 0;
- }
- else
- s = s00;
- }
- if (!nd) {
- if (!nz && !nz0) {
-#ifdef INFNAN_CHECK
- /* Check for Nan and Infinity */
- if (!decpt)
- switch(c) {
- case 'i':
- case 'I':
- if (match(&s,"nf")) {
- --s;
- if (!match(&s,"inity"))
- ++s;
- irv = STRTOG_Infinite;
- goto infnanexp;
- }
- break;
- case 'n':
- case 'N':
- if (match(&s, "an")) {
- irv = STRTOG_NaN;
- *exp = fpi->emax + 1;
-#ifndef No_Hex_NaN
- if (*s == '(') /*)*/
- irv = hexnan(&s, fpi, bits);
-#endif
- goto infnanexp;
- }
- }
-#endif /* INFNAN_CHECK */
- irv = STRTOG_NoNumber;
- s = s00;
- }
- goto ret;
- }
-
- irv = STRTOG_Normal;
- e1 = e -= nf;
- rd = 0;
- switch(fpi->rounding & 3) {
- case FPI_Round_up:
- rd = 2 - sign;
- break;
- case FPI_Round_zero:
- rd = 1;
- break;
- case FPI_Round_down:
- rd = 1 + sign;
- }
-
- /* Now we have nd0 digits, starting at s0, followed by a
- * decimal point, followed by nd-nd0 digits. The number we're
- * after is the integer represented by those digits times
- * 10**e */
-
- if (!nd0)
- nd0 = nd;
- k = nd < DBL_DIG + 1 ? nd : DBL_DIG + 1;
- dval(rv) = y;
- if (k > 9)
- dval(rv) = tens[k - 9] * dval(rv) + z;
- bd0 = 0;
- if (nbits <= P && nd <= DBL_DIG) {
- if (!e) {
- if (rvOK(dval(rv), fpi, exp, bits, 1, rd, &irv))
- goto ret;
- }
- else if (e > 0) {
- if (e <= Ten_pmax) {
-#ifdef VAX
- goto vax_ovfl_check;
-#else
- i = fivesbits[e] + mantbits(dval(rv)) <= P;
- /* rv = */ rounded_product(dval(rv), tens[e]);
- if (rvOK(dval(rv), fpi, exp, bits, i, rd, &irv))
- goto ret;
- e1 -= e;
- goto rv_notOK;
-#endif
- }
- i = DBL_DIG - nd;
- if (e <= Ten_pmax + i) {
- /* A fancier test would sometimes let us do
- * this for larger i values.
- */
- e2 = e - i;
- e1 -= i;
- dval(rv) *= tens[i];
-#ifdef VAX
- /* VAX exponent range is so narrow we must
- * worry about overflow here...
- */
- vax_ovfl_check:
- dval(adj) = dval(rv);
- word0(adj) -= P*Exp_msk1;
- /* adj = */ rounded_product(dval(adj), tens[e2]);
- if ((word0(adj) & Exp_mask)
- > Exp_msk1*(DBL_MAX_EXP+Bias-1-P))
- goto rv_notOK;
- word0(adj) += P*Exp_msk1;
- dval(rv) = dval(adj);
-#else
- /* rv = */ rounded_product(dval(rv), tens[e2]);
-#endif
- if (rvOK(dval(rv), fpi, exp, bits, 0, rd, &irv))
- goto ret;
- e1 -= e2;
- }
- }
-#ifndef Inaccurate_Divide
- else if (e >= -Ten_pmax) {
- /* rv = */ rounded_quotient(dval(rv), tens[-e]);
- if (rvOK(dval(rv), fpi, exp, bits, 0, rd, &irv))
- goto ret;
- e1 -= e;
- }
-#endif
- }
- rv_notOK:
- e1 += nd - k;
-
- /* Get starting approximation = rv * 10**e1 */
-
- e2 = 0;
- if (e1 > 0) {
- if ( (i = e1 & 15) !=0)
- dval(rv) *= tens[i];
- if (e1 &= ~15) {
- e1 >>= 4;
- while(e1 >= (1 << (n_bigtens-1))) {
- e2 += ((word0(rv) & Exp_mask)
- >> Exp_shift1) - Bias;
- word0(rv) &= ~Exp_mask;
- word0(rv) |= Bias << Exp_shift1;
- dval(rv) *= bigtens[n_bigtens-1];
- e1 -= 1 << (n_bigtens-1);
- }
- e2 += ((word0(rv) & Exp_mask) >> Exp_shift1) - Bias;
- word0(rv) &= ~Exp_mask;
- word0(rv) |= Bias << Exp_shift1;
- for(j = 0; e1 > 0; j++, e1 >>= 1)
- if (e1 & 1)
- dval(rv) *= bigtens[j];
- }
- }
- else if (e1 < 0) {
- e1 = -e1;
- if ( (i = e1 & 15) !=0)
- dval(rv) /= tens[i];
- if (e1 &= ~15) {
- e1 >>= 4;
- while(e1 >= (1 << (n_bigtens-1))) {
- e2 += ((word0(rv) & Exp_mask)
- >> Exp_shift1) - Bias;
- word0(rv) &= ~Exp_mask;
- word0(rv) |= Bias << Exp_shift1;
- dval(rv) *= tinytens[n_bigtens-1];
- e1 -= 1 << (n_bigtens-1);
- }
- e2 += ((word0(rv) & Exp_mask) >> Exp_shift1) - Bias;
- word0(rv) &= ~Exp_mask;
- word0(rv) |= Bias << Exp_shift1;
- for(j = 0; e1 > 0; j++, e1 >>= 1)
- if (e1 & 1)
- dval(rv) *= tinytens[j];
- }
- }
-#ifdef IBM
- /* e2 is a correction to the (base 2) exponent of the return
- * value, reflecting adjustments above to avoid overflow in the
- * native arithmetic. For native IBM (base 16) arithmetic, we
- * must multiply e2 by 4 to change from base 16 to 2.
- */
- e2 <<= 2;
-#endif
- rvb = d2b(dval(rv), &rve, &rvbits); /* rv = rvb * 2^rve */
- rve += e2;
- if ((j = rvbits - nbits) > 0) {
- rshift(rvb, j);
- rvbits = nbits;
- rve += j;
- }
- bb0 = 0; /* trailing zero bits in rvb */
- e2 = rve + rvbits - nbits;
- if (e2 > fpi->emax + 1)
- goto huge;
- rve1 = rve + rvbits - nbits;
- if (e2 < (emin = fpi->emin)) {
- denorm = 1;
- j = rve - emin;
- if (j > 0) {
- rvb = lshift(rvb, j);
- rvbits += j;
- }
- else if (j < 0) {
- rvbits += j;
- if (rvbits <= 0) {
- if (rvbits < -1) {
- ufl:
- rvb->wds = 0;
- rvb->x[0] = 0;
- *exp = emin;
- irv = STRTOG_Underflow | STRTOG_Inexlo;
- goto ret;
- }
- rvb->x[0] = rvb->wds = rvbits = 1;
- }
- else
- rshift(rvb, -j);
- }
- rve = rve1 = emin;
- if (sudden_underflow && e2 + 1 < emin)
- goto ufl;
- }
-
- /* Now the hard part -- adjusting rv to the correct value.*/
-
- /* Put digits into bd: true value = bd * 10^e */
-
- bd0 = s2b(s0, nd0, nd, y);
-
- for(;;) {
- bd = Balloc(bd0->k);
- Bcopy(bd, bd0);
- bb = Balloc(rvb->k);
- Bcopy(bb, rvb);
- bbbits = rvbits - bb0;
- bbe = rve + bb0;
- bs = i2b(1);
-
- if (e >= 0) {
- bb2 = bb5 = 0;
- bd2 = bd5 = e;
- }
- else {
- bb2 = bb5 = -e;
- bd2 = bd5 = 0;
- }
- if (bbe >= 0)
- bb2 += bbe;
- else
- bd2 -= bbe;
- bs2 = bb2;
- j = nbits + 1 - bbbits;
- i = bbe + bbbits - nbits;
- if (i < emin) /* denormal */
- j += i - emin;
- bb2 += j;
- bd2 += j;
- i = bb2 < bd2 ? bb2 : bd2;
- if (i > bs2)
- i = bs2;
- if (i > 0) {
- bb2 -= i;
- bd2 -= i;
- bs2 -= i;
- }
- if (bb5 > 0) {
- bs = pow5mult(bs, bb5);
- bb1 = mult(bs, bb);
- Bfree(bb);
- bb = bb1;
- }
- bb2 -= bb0;
- if (bb2 > 0)
- bb = lshift(bb, bb2);
- else if (bb2 < 0)
- rshift(bb, -bb2);
- if (bd5 > 0)
- bd = pow5mult(bd, bd5);
- if (bd2 > 0)
- bd = lshift(bd, bd2);
- if (bs2 > 0)
- bs = lshift(bs, bs2);
- asub = 1;
- inex = STRTOG_Inexhi;
- delta = diff(bb, bd);
- if (delta->wds <= 1 && !delta->x[0])
- break;
- dsign = delta->sign;
- delta->sign = finished = 0;
- L = 0;
- i = cmp(delta, bs);
- if (rd && i <= 0) {
- irv = STRTOG_Normal;
- if ( (finished = dsign ^ (rd&1)) !=0) {
- if (dsign != 0) {
- irv |= STRTOG_Inexhi;
- goto adj1;
- }
- irv |= STRTOG_Inexlo;
- if (rve1 == emin)
- goto adj1;
- for(i = 0, j = nbits; j >= ULbits;
- i++, j -= ULbits) {
- if (rvb->x[i] & ALL_ON)
- goto adj1;
- }
- if (j > 1 && lo0bits(rvb->x + i) < j - 1)
- goto adj1;
- rve = rve1 - 1;
- rvb = set_ones(rvb, rvbits = nbits);
- break;
- }
- irv |= dsign ? STRTOG_Inexlo : STRTOG_Inexhi;
- break;
- }
- if (i < 0) {
- /* Error is less than half an ulp -- check for
- * special case of mantissa a power of two.
- */
- irv = dsign
- ? STRTOG_Normal | STRTOG_Inexlo
- : STRTOG_Normal | STRTOG_Inexhi;
- if (dsign || bbbits > 1 || denorm || rve1 == emin)
- break;
- delta = lshift(delta,1);
- if (cmp(delta, bs) > 0) {
- irv = STRTOG_Normal | STRTOG_Inexlo;
- goto drop_down;
- }
- break;
- }
- if (i == 0) {
- /* exactly half-way between */
- if (dsign) {
- if (denorm && all_on(rvb, rvbits)) {
- /*boundary case -- increment exponent*/
- rvb->wds = 1;
- rvb->x[0] = 1;
- rve = emin + nbits - (rvbits = 1);
- irv = STRTOG_Normal | STRTOG_Inexhi;
- denorm = 0;
- break;
- }
- irv = STRTOG_Normal | STRTOG_Inexlo;
- }
- else if (bbbits == 1) {
- irv = STRTOG_Normal;
- drop_down:
- /* boundary case -- decrement exponent */
- if (rve1 == emin) {
- irv = STRTOG_Normal | STRTOG_Inexhi;
- if (rvb->wds == 1 && rvb->x[0] == 1)
- sudden_underflow = 1;
- break;
- }
- rve -= nbits;
- rvb = set_ones(rvb, rvbits = nbits);
- break;
- }
- else
- irv = STRTOG_Normal | STRTOG_Inexhi;
- if ((bbbits < nbits && !denorm) || !(rvb->x[0] & 1))
- break;
- if (dsign) {
- rvb = increment(rvb);
- if ( (j = rvbits & kmask) !=0)
- j = ULbits - j;
- if (hi0bits(rvb->x[(rvb->wds - 1) >> kshift])
- != j)
- rvbits++;
- irv = STRTOG_Normal | STRTOG_Inexhi;
- }
- else {
- if (bbbits == 1)
- goto undfl;
- decrement(rvb);
- irv = STRTOG_Normal | STRTOG_Inexlo;
- }
- break;
- }
- if ((dval(adj) = ratio(delta, bs)) <= 2.) {
- adj1:
- inex = STRTOG_Inexlo;
- if (dsign) {
- asub = 0;
- inex = STRTOG_Inexhi;
- }
- else if (denorm && bbbits <= 1) {
- undfl:
- rvb->wds = 0;
- rve = emin;
- irv = STRTOG_Underflow | STRTOG_Inexlo;
- break;
- }
- adj0 = dval(adj) = 1.;
- }
- else {
- adj0 = dval(adj) *= 0.5;
- if (dsign) {
- asub = 0;
- inex = STRTOG_Inexlo;
- }
- if (dval(adj) < 2147483647.) {
- L = adj0;
- adj0 -= L;
- switch(rd) {
- case 0:
- if (adj0 >= .5)
- goto inc_L;
- break;
- case 1:
- if (asub && adj0 > 0.)
- goto inc_L;
- break;
- case 2:
- if (!asub && adj0 > 0.) {
- inc_L:
- L++;
- inex = STRTOG_Inexact - inex;
- }
- }
- dval(adj) = L;
- }
- }
- y = rve + rvbits;
-
- /* adj *= ulp(dval(rv)); */
- /* if (asub) rv -= adj; else rv += adj; */
-
- if (!denorm && rvbits < nbits) {
- rvb = lshift(rvb, j = nbits - rvbits);
- rve -= j;
- rvbits = nbits;
- }
- ab = d2b(dval(adj), &abe, &abits);
- if (abe < 0)
- rshift(ab, -abe);
- else if (abe > 0)
- ab = lshift(ab, abe);
- rvb0 = rvb;
- if (asub) {
- /* rv -= adj; */
- j = hi0bits(rvb->x[rvb->wds-1]);
- rvb = diff(rvb, ab);
- k = rvb0->wds - 1;
- if (denorm)
- /* do nothing */;
- else if (rvb->wds <= k
- || hi0bits( rvb->x[k]) >
- hi0bits(rvb0->x[k])) {
- /* unlikely; can only have lost 1 high bit */
- if (rve1 == emin) {
- --rvbits;
- denorm = 1;
- }
- else {
- rvb = lshift(rvb, 1);
- --rve;
- --rve1;
- L = finished = 0;
- }
- }
- }
- else {
- rvb = sum(rvb, ab);
- k = rvb->wds - 1;
- if (k >= rvb0->wds
- || hi0bits(rvb->x[k]) < hi0bits(rvb0->x[k])) {
- if (denorm) {
- if (++rvbits == nbits)
- denorm = 0;
- }
- else {
- rshift(rvb, 1);
- rve++;
- rve1++;
- L = 0;
- }
- }
- }
- Bfree(ab);
- Bfree(rvb0);
- if (finished)
- break;
-
- z = rve + rvbits;
- if (y == z && L) {
- /* Can we stop now? */
- tol = dval(adj) * 5e-16; /* > max rel error */
- dval(adj) = adj0 - .5;
- if (dval(adj) < -tol) {
- if (adj0 > tol) {
- irv |= inex;
- break;
- }
- }
- else if (dval(adj) > tol && adj0 < 1. - tol) {
- irv |= inex;
- break;
- }
- }
- bb0 = denorm ? 0 : trailz(rvb);
- Bfree(bb);
- Bfree(bd);
- Bfree(bs);
- Bfree(delta);
- }
- if (!denorm && (j = nbits - rvbits)) {
- if (j > 0)
- rvb = lshift(rvb, j);
- else
- rshift(rvb, -j);
- rve -= j;
- }
- *exp = rve;
- Bfree(bb);
- Bfree(bd);
- Bfree(bs);
- Bfree(bd0);
- Bfree(delta);
- if (rve > fpi->emax) {
- huge:
- rvb->wds = 0;
- irv = STRTOG_Infinite | STRTOG_Overflow | STRTOG_Inexhi;
-#ifndef NO_ERRNO
- errno = ERANGE;
-#endif
- infnanexp:
- *exp = fpi->emax + 1;
- }
- ret:
- if (denorm) {
- if (sudden_underflow) {
- rvb->wds = 0;
- irv = STRTOG_Underflow | STRTOG_Inexlo;
- }
- else {
- irv = (irv & ~STRTOG_Retmask) |
- (rvb->wds > 0 ? STRTOG_Denormal : STRTOG_Zero);
- if (irv & STRTOG_Inexact)
- irv |= STRTOG_Underflow;
- }
- }
- if (se)
- *se = (char *)s;
- if (sign)
- irv |= STRTOG_Neg;
- if (rvb) {
- copybits(bits, nbits, rvb);
- Bfree(rvb);
- }
- return irv;
- }
diff --git a/winsup/mingw/mingwex/gdtoa/strtodnrp.c b/winsup/mingw/mingwex/gdtoa/strtodnrp.c
deleted file mode 100755
index ac81b2b..0000000
--- a/winsup/mingw/mingwex/gdtoa/strtodnrp.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/****************************************************************
-
-The author of this software is David M. Gay.
-
-Copyright (C) 2004 by David M. Gay.
-All Rights Reserved
-Based on material in the rest of /netlib/fp/gdota.tar.gz,
-which is copyright (C) 1998, 2000 by Lucent Technologies.
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the name of Lucent or any of its entities
-not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-
-****************************************************************/
-
-/* This is a variant of strtod that works on Intel ia32 systems */
-/* with the default extended-precision arithmetic -- it does not */
-/* require setting the precision control to 53 bits. */
-
-/* Please send bug reports to David M. Gay (dmg at acm dot org,
- * with " at " changed at "@" and " dot " changed to "."). */
-
-#include "gdtoaimp.h"
-
- double
-#ifdef KR_headers
-__strtod(s, sp) CONST char *s; char **sp;
-#else
-__strtod(CONST char *s, char **sp)
-#endif
-{
- static FPI fpi = { 53, 1-1023-53+1, 2046-1023-53+1, 1, SI };
- ULong bits[2];
- Long exp;
- int k;
- union { ULong L[2]; double d; } u;
-
- k = __strtodg(s, sp, &fpi, &exp, bits);
- switch(k & STRTOG_Retmask) {
- case STRTOG_NoNumber:
- case STRTOG_Zero:
- u.L[0] = u.L[1] = 0;
- break;
-
- case STRTOG_Normal:
- u.L[_1] = bits[0];
- u.L[_0] = (bits[1] & ~0x100000) | ((exp + 0x3ff + 52) << 20);
- break;
-
- case STRTOG_Denormal:
- u.L[_1] = bits[0];
- u.L[_0] = bits[1];
- break;
-
- case STRTOG_Infinite:
- u.L[_0] = 0x7ff00000;
- u.L[_1] = 0;
- break;
-
- case STRTOG_NaN:
- u.L[0] = d_QNAN0;
- u.L[1] = d_QNAN1;
- break;
-
- case STRTOG_NaNbits:
- u.L[_0] = 0x7ff00000 | bits[1];
- u.L[_1] = bits[0];
- }
- if (k & STRTOG_Neg)
- u.L[_0] |= 0x80000000L;
- return u.d;
- }
diff --git a/winsup/mingw/mingwex/gdtoa/strtof.c b/winsup/mingw/mingwex/gdtoa/strtof.c
deleted file mode 100755
index f5d7f4d..0000000
--- a/winsup/mingw/mingwex/gdtoa/strtof.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************
-
-The author of this software is David M. Gay.
-
-Copyright (C) 1998, 2000 by Lucent Technologies
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the name of Lucent or any of its entities
-not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-
-****************************************************************/
-
-/* Please send bug reports to David M. Gay (dmg at acm dot org,
- * with " at " changed at "@" and " dot " changed to "."). */
-
-#include "gdtoaimp.h"
-
- float
-#ifdef KR_headers
-__strtof(s, sp) CONST char *s; char **sp;
-#else
-__strtof(CONST char *s, char **sp)
-#endif
-{
- static FPI fpi = { 24, 1-127-24+1, 254-127-24+1, 1, SI };
- ULong bits[1];
- Long exp;
- int k;
- union { ULong L[1]; float f; } u;
-
- k = __strtodg(s, sp, &fpi, &exp, bits);
- switch(k & STRTOG_Retmask) {
- case STRTOG_NoNumber:
- case STRTOG_Zero:
- u.L[0] = 0;
- break;
-
- case STRTOG_Normal:
- case STRTOG_NaNbits:
- u.L[0] = (bits[0] & 0x7fffff) | (exp + 0x7f + 23) << 23;
- break;
-
- case STRTOG_Denormal:
- u.L[0] = bits[0];
- break;
-
- case STRTOG_Infinite:
- u.L[0] = 0x7f800000;
- break;
-
- case STRTOG_NaN:
- u.L[0] = f_QNAN;
- }
- if (k & STRTOG_Neg)
- u.L[0] |= 0x80000000L;
- return u.f;
- }
-
-float __cdecl
-strtof (const char * __restrict__ src, char ** __restrict__ endptr)
- __attribute__((alias("__strtof")));
diff --git a/winsup/mingw/mingwex/gdtoa/strtopx.c b/winsup/mingw/mingwex/gdtoa/strtopx.c
deleted file mode 100755
index 59b7c22..0000000
--- a/winsup/mingw/mingwex/gdtoa/strtopx.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/****************************************************************
-
-The author of this software is David M. Gay.
-
-Copyright (C) 1998, 2000 by Lucent Technologies
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the name of Lucent or any of its entities
-not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-
-****************************************************************/
-
-/* Please send bug reports to David M. Gay (dmg at acm dot org,
- * with " at " changed at "@" and " dot " changed to "."). */
-
-#include "gdtoaimp.h"
-
-#undef _0
-#undef _1
-
-/* one or the other of IEEE_MC68k or IEEE_8087 should be #defined */
-
-#ifdef IEEE_MC68k
-#define _0 0
-#define _1 1
-#define _2 2
-#define _3 3
-#define _4 4
-#endif
-#ifdef IEEE_8087
-#define _0 4
-#define _1 3
-#define _2 2
-#define _3 1
-#define _4 0
-#endif
-
-static int
-#ifdef KR_headers
-__strtopx(s, sp, V) CONST char *s; char **sp; long double *V;
-#else
-__strtopx(CONST char *s, char **sp, long double *V)
-#endif
-{
- static FPI fpi = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, SI };
- ULong bits[2];
- Long exp;
- int k;
- UShort *L = (UShort*)V;
-
- k = __strtodg(s, sp, &fpi, &exp, bits);
- switch(k & STRTOG_Retmask) {
- case STRTOG_NoNumber:
- case STRTOG_Zero:
- L[0] = L[1] = L[2] = L[3] = L[4] = 0;
- break;
-
- case STRTOG_Denormal:
- L[_0] = 0;
- goto normal_bits;
-
- case STRTOG_Normal:
- case STRTOG_NaNbits:
- L[_0] = exp + 0x3fff + 63;
- normal_bits:
- L[_4] = (UShort)bits[0];
- L[_3] = (UShort)(bits[0] >> 16);
- L[_2] = (UShort)bits[1];
- L[_1] = (UShort)(bits[1] >> 16);
- break;
-
- case STRTOG_Infinite:
- L[_0] = 0x7fff;
- L[_1] = 0x8000;
- L[_2] = L[_3] = L[_4] = 0;
- break;
-
- case STRTOG_NaN:
- L[0] = ldus_QNAN0;
- L[1] = ldus_QNAN1;
- L[2] = ldus_QNAN2;
- L[3] = ldus_QNAN3;
- L[4] = ldus_QNAN4;
- }
- if (k & STRTOG_Neg)
- L[_0] |= 0x8000;
- return k;
- }
-
-long double
-__cdecl
-__strtold (const char * __restrict__ src, char ** __restrict__ endptr)
-{
- long double ret;
- __strtopx(src, endptr, &ret);
- return ret;
-}
-
-long double
-__cdecl
-strtold (const char * __restrict__ src, char ** __restrict__ endptr)
- __attribute__((alias("__strtold")));
-
diff --git a/winsup/mingw/mingwex/gdtoa/sum.c b/winsup/mingw/mingwex/gdtoa/sum.c
deleted file mode 100755
index dc0c88b..0000000
--- a/winsup/mingw/mingwex/gdtoa/sum.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************
-
-The author of this software is David M. Gay.
-
-Copyright (C) 1998 by Lucent Technologies
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the name of Lucent or any of its entities
-not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-
-****************************************************************/
-
-/* Please send bug reports to David M. Gay (dmg at acm dot org,
- * with " at " changed at "@" and " dot " changed to "."). */
-
-#include "gdtoaimp.h"
-
- Bigint *
-#ifdef KR_headers
-sum(a, b) Bigint *a; Bigint *b;
-#else
-sum(Bigint *a, Bigint *b)
-#endif
-{
- Bigint *c;
- ULong carry, *xc, *xa, *xb, *xe, y;
-#ifdef Pack_32
- ULong z;
-#endif
-
- if (a->wds < b->wds) {
- c = b; b = a; a = c;
- }
- c = Balloc(a->k);
- c->wds = a->wds;
- carry = 0;
- xa = a->x;
- xb = b->x;
- xc = c->x;
- xe = xc + b->wds;
-#ifdef Pack_32
- do {
- y = (*xa & 0xffff) + (*xb & 0xffff) + carry;
- carry = (y & 0x10000) >> 16;
- z = (*xa++ >> 16) + (*xb++ >> 16) + carry;
- carry = (z & 0x10000) >> 16;
- Storeinc(xc, z, y);
- }
- while(xc < xe);
- xe += a->wds - b->wds;
- while(xc < xe) {
- y = (*xa & 0xffff) + carry;
- carry = (y & 0x10000) >> 16;
- z = (*xa++ >> 16) + carry;
- carry = (z & 0x10000) >> 16;
- Storeinc(xc, z, y);
- }
-#else
- do {
- y = *xa++ + *xb++ + carry;
- carry = (y & 0x10000) >> 16;
- *xc++ = y & 0xffff;
- }
- while(xc < xe);
- xe += a->wds - b->wds;
- while(xc < xe) {
- y = *xa++ + carry;
- carry = (y & 0x10000) >> 16;
- *xc++ = y & 0xffff;
- }
-#endif
- if (carry) {
- if (c->wds == c->maxwds) {
- b = Balloc(c->k + 1);
- Bcopy(b, c);
- Bfree(c);
- c = b;
- }
- c->x[c->wds++] = 1;
- }
- return c;
- }
diff --git a/winsup/mingw/mingwex/gdtoa/ulp.c b/winsup/mingw/mingwex/gdtoa/ulp.c
deleted file mode 100755
index 8e7b4d8..0000000
--- a/winsup/mingw/mingwex/gdtoa/ulp.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************
-
-The author of this software is David M. Gay.
-
-Copyright (C) 1998, 1999 by Lucent Technologies
-All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the name of Lucent or any of its entities
-not be used in advertising or publicity pertaining to
-distribution of the software without specific, written prior
-permission.
-
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-
-****************************************************************/
-
-/* Please send bug reports to David M. Gay (dmg at acm dot org,
- * with " at " changed at "@" and " dot " changed to "."). */
-
-#include "gdtoaimp.h"
-
- double
-ulp
-#ifdef KR_headers
- (x) double x;
-#else
- (double x)
-#endif
-{
- Long L;
- double a;
-
- L = (word0(x) & Exp_mask) - (P-1)*Exp_msk1;
-#ifndef Sudden_Underflow
- if (L > 0) {
-#endif
-#ifdef IBM
- L |= Exp_msk1 >> 4;
-#endif
- word0(a) = L;
- word1(a) = 0;
-#ifndef Sudden_Underflow
- }
- else {
- L = -L >> Exp_shift;
- if (L < Exp_shift) {
- word0(a) = 0x80000 >> L;
- word1(a) = 0;
- }
- else {
- word0(a) = 0;
- L -= Exp_shift;
- word1(a) = L >= 31 ? 1 : 1 << (31 - L);
- }
- }
-#endif
- return a;
- }
diff --git a/winsup/mingw/mingwex/getopt.c b/winsup/mingw/mingwex/getopt.c
deleted file mode 100644
index 081cc56..0000000
--- a/winsup/mingw/mingwex/getopt.c
+++ /dev/null
@@ -1,667 +0,0 @@
-/*
- * getopt.c
- *
- * $Id$
- *
- * Implementation of the `getopt', `getopt_long' and `getopt_long_only'
- * APIs, for inclusion in the MinGW runtime library.
- *
- * This file is part of the MinGW32 package set.
- *
- * Contributed by Keith Marshall <keithmarshall@users.sourceforge.net>
- *
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <getopt.h>
-
-/* Identify how to get the calling program name, for use in messages...
- */
-#ifdef __CYGWIN__
-/*
- * CYGWIN uses this DLL reference...
- */
-# define PROGNAME __progname
-extern char __declspec(dllimport) *__progname;
-#else
-/*
- * ...while elsewhere, we simply use the first argument passed.
- */
-# define PROGNAME *argv
-#endif
-
-/* Initialise the public variables. */
-
-int optind = 1; /* index for first non-option arg */
-int opterr = 1; /* enable built-in error messages */
-
-char *optarg = NULL; /* pointer to current option argument */
-
-#define CHAR char /* argument type selector */
-
-#define getopt_switchar '-' /* option prefix character in argv */
-#define getopt_pluschar '+' /* prefix for POSIX mode in optstring */
-#define getopt_takes_argument ':' /* marker for optarg in optstring */
-#define getopt_arg_assign '=' /* longopt argument field separator */
-#define getopt_unknown '?' /* return code for unmatched option */
-#define getopt_ordered 1 /* return code for ordered non-option */
-
-#define getopt_all_done -1 /* return code to indicate completion */
-
-enum
-{ /* All `getopt' API functions are implemented via calls to the
- * common static function `getopt_parse()'; these `mode' selectors
- * determine the behaviour of `getopt_parse()', to deliver the
- * appropriate result in each case.
- */
- getopt_mode_standard = 0, /* getopt() */
- getopt_mode_long, /* getopt_long() */
- getopt_mode_long_only /* getopt_long_only() */
-};
-
-enum
-{ /* When attempting to match a command line argument to a long form option,
- * these indicate the status of the match.
- */
- getopt_no_match = 0, /* no successful match */
- getopt_abbreviated_match, /* argument is an abbreviation for an option */
- getopt_exact_match /* argument matches the full option name */
-};
-
-int optopt = getopt_unknown; /* return value for option being evaluated */
-
-static __inline__
-int getopt_missing_arg( const CHAR *optstring )
-{
- /* Helper function to determine the appropriate return value,
- * for the case where a required option argument is missing.
- */
- if( (*optstring == getopt_pluschar) || (*optstring == getopt_switchar) )
- ++optstring;
- return (*optstring == getopt_takes_argument)
- ? getopt_takes_argument
- : getopt_unknown;
-}
-
-/* `complain' macro facilitates the generation of simple built-in
- * error messages, displayed on various fault conditions, provided
- * `opterr' is non-zero.
- */
-#define complain( MSG, ARG ) if( opterr ) \
- fprintf( stderr, "%s: "MSG"\n", PROGNAME, ARG )
-
-static __inline__
-int getopt_argerror( int mode, char *fmt, CHAR *prog, struct option *opt, int retval )
-{
- /* Helper function, to generate more complex built-in error
- * messages, for invalid arguments to long form options ...
- */
- if( opterr )
- {
- /* ... but, displayed only if `opterr' is non-zero.
- */
- char flag[] = "--";
- if( mode != getopt_mode_long )
- /*
- * only display one hyphen, for implicit long form options,
- * improperly resolved by `getopt_long_only()'.
- */
- flag[1] = 0;
- /*
- * always preface the program name ...
- */
- fprintf( stderr, "%s: ", prog );
- /*
- * to the appropriate, option specific message.
- */
- fprintf( stderr, fmt, flag, opt->name );
- }
- /* Whether displaying the message, or not, always set `optopt'
- * to identify the faulty option ...
- */
- optopt = opt->val;
- /*
- * and return the `invalid option' indicator.
- */
- return retval;
-}
-
-/* `getopt_conventions' establish behavioural options, to control
- * the operation of `getopt_parse()', e.g. to select between POSIX
- * and GNU style argument parsing behaviour.
- */
-#define getopt_set_conventions 0x1000
-#define getopt_posixly_correct 0x0010
-
-static __inline__
-int getopt_conventions( int flags )
-{
- static int conventions = 0;
-
- if( (conventions == 0) && ((flags & getopt_set_conventions) == 0) )
- {
- /* default conventions have not yet been established;
- * initialise them now!
- */
- conventions = getopt_set_conventions;
- if( (flags == getopt_pluschar) || (getenv( "POSIXLY_CORRECT" ) != NULL) )
- conventions |= getopt_posixly_correct;
- }
-
- else if( flags & getopt_set_conventions )
- /*
- * default conventions may have already been established,
- * but this is a specific request to augment them.
- */
- conventions |= flags;
-
- /* in any event, return the currently established conventions.
- */
- return conventions;
-}
-
-static __inline__
-int is_switchar( CHAR flag )
-{
- /* A simple helper function, used to identify the switch character
- * introducing an optional command line argument.
- */
- return flag == getopt_switchar;
-}
-
-static __inline__
-const CHAR *getopt_match( CHAR lookup, const CHAR *opt_string )
-{
- /* Helper function, used to identify short form options.
- */
- if( (*opt_string == getopt_pluschar) || (*opt_string == getopt_switchar) )
- ++opt_string;
- if( *opt_string == getopt_takes_argument )
- ++opt_string;
- do if( lookup == *opt_string ) return opt_string;
- while( *++opt_string );
- return NULL;
-}
-
-static __inline__
-int getopt_match_long( const CHAR *nextchar, const CHAR *optname )
-{
- /* Helper function, used to identify potential matches for
- * long form options.
- */
- CHAR matchchar;
- while( (matchchar = *nextchar++) && (matchchar == *optname) )
- /*
- * skip over initial substring which DOES match.
- */
- ++optname;
-
- if( matchchar )
- {
- /* did NOT match the entire argument to an initial substring
- * of a defined option name ...
- */
- if( matchchar != getopt_arg_assign )
- /*
- * ... and didn't stop at an `=' internal field separator,
- * so this is NOT a possible match.
- */
- return getopt_no_match;
-
- /* DID stop at an `=' internal field separator,
- * so this IS a possible match, and what follows is an
- * argument to the possibly matched option.
- */
- optarg = (char *)(nextchar);
- }
- return *optname
- /*
- * if we DIDN'T match the ENTIRE text of the option name,
- * then it's a possible abbreviated match ...
- */
- ? getopt_abbreviated_match
- /*
- * but if we DID match the entire option name,
- * then it's a DEFINITE EXACT match.
- */
- : getopt_exact_match;
-}
-
-static __inline__
-int getopt_resolved( int mode, int argc, CHAR *const *argv, int *argind,
-struct option *opt, int index, int *retindex, const CHAR *optstring )
-{
- /* Helper function to establish appropriate return conditions,
- * on resolution of a long form option.
- */
- if( retindex != NULL )
- *retindex = index;
-
- /* On return, `optind' should normally refer to the argument, if any,
- * which follows the current one; it is convenient to set this, before
- * checking for the presence of any `optarg'.
- */
- optind = *argind + 1;
-
- if( optarg && (opt[index].has_arg == no_argument) )
- /*
- * it is an error for the user to specify an option specific argument
- * with an option which doesn't expect one!
- */
- return getopt_argerror( mode, "option `%s%s' doesn't accept an argument\n",
- PROGNAME, opt + index, getopt_unknown );
-
- else if( (optarg == NULL) && (opt[index].has_arg == required_argument) )
- {
- /* similarly, it is an error if no argument is specified
- * with an option which requires one ...
- */
- if( optind < argc )
- /*
- * ... except that the requirement may be satisfied from
- * the following command line argument, if any ...
- */
- optarg = argv[*argind = optind++];
-
- else
- /* so fail this case, only if no such argument exists!
- */
- return getopt_argerror( mode, "option `%s%s' requires an argument\n",
- PROGNAME, opt + index, getopt_missing_arg( optstring ) );
- }
-
- /* when the caller has provided a return buffer ...
- */
- if( opt[index].flag != NULL )
- {
- /* ... then we place the proper return value there,
- * and return a status code of zero ...
- */
- *(opt[index].flag) = opt[index].val;
- return 0;
- }
- /* ... otherwise, the return value becomes the status code.
- */
- return opt[index].val;
-}
-
-static
-#define getopt_std_args int argc, CHAR *const argv[], const CHAR *optstring
-int getopt_parse( int mode, getopt_std_args, ... )
-{
- /* Common core implementation for ALL `getopt' functions.
- */
- static int argind = 0;
- static int optbase = 0;
- static const CHAR *nextchar = NULL;
- static int optmark = 0;
-
- if( optind < optbase )
- {
- /* POSIX does not prescribe any definitive mechanism for restarting
- * a `getopt' scan, but some applications may require such capability.
- * We will support it, by allowing the caller to adjust the value of
- * `optind' downwards, (nominally setting it to zero). Since POSIX
- * wants `optind' to have an initial value of one, but we want all
- * of our internal placeholders to be initialised to zero, when we
- * are called for the first time, we will handle such a reset by
- * adjusting all of the internal placeholders to one less than the
- * adjusted `optind' value, (but never to less than zero).
- */
- optmark = optbase = argind = (optind > 0) ? optind - 1 : 0;
- nextchar = NULL;
- }
-
- if( nextchar && *nextchar )
- {
- /* we are parsing a standard, or short format, option argument ...
- */
- const CHAR *optchar;
- if( (optchar = getopt_match( optopt = *nextchar++, optstring )) != NULL )
- {
- /* we have identified it as valid ...
- */
- if( optchar[1] == getopt_takes_argument )
- {
- /* and determined that it requires an associated argument ...
- */
- if( ! *(optarg = (char *)(nextchar)) )
- {
- /* the argument is NOT attached ...
- */
- if( optchar[2] == getopt_takes_argument )
- /*
- * but this GNU extension marks it as optional,
- * so we don't provide one on this occasion.
- */
- optarg = NULL;
-
- /* otherwise this option takes a mandatory argument,
- * so, provided there is one available ...
- */
- else if( (argc - argind) > 1 )
- /*
- * we take the following command line argument,
- * as the appropriate option argument.
- */
- optarg = argv[++argind];
-
- /* but if no further argument is available,
- * then there is nothing we can do, except for
- * issuing the requisite diagnostic message.
- */
- else
- {
- complain( "option requires an argument -- %c", optopt );
- return getopt_missing_arg( optstring );
- }
- }
- optind = argind + 1;
- nextchar = NULL;
- }
- else
- optarg = NULL;
- optind = (nextchar && *nextchar) ? argind : argind + 1;
- return optopt;
- }
- /* if we didn't find a valid match for the specified option character,
- * then we fall through to here, so take appropriate diagnostic action.
- */
- if( mode == getopt_mode_long_only )
- {
- complain( "unrecognised option `-%s'", --nextchar );
- nextchar = NULL;
- optopt = 0;
- }
- else
- complain( "invalid option -- %c", optopt );
- optind = (nextchar && *nextchar) ? argind : argind + 1;
- return getopt_unknown;
- }
-
- if( optmark > optbase )
- {
- /* This can happen, in GNU parsing mode ONLY, when we have
- * skipped over non-option arguments, and found a subsequent
- * option argument; in this case we permute the arguments.
- */
- int index;
- /*
- * `optspan' specifies the number of contiguous arguments
- * which are spanned by the current option, and so must be
- * moved together during permutation.
- */
- int optspan = argind - optmark + 1;
- /*
- * we use `this_arg' to store these temporarily.
- */
- CHAR *this_arg[optspan];
- /*
- * we cannot manipulate `argv' directly, since the `getopt'
- * API prototypes it as `read-only'; this cast to `arglist'
- * allows us to work around that restriction.
- */
- CHAR **arglist = (char **)(argv);
-
- /* save temporary copies of the arguments which are associated
- * with the current option ...
- */
- for( index = 0; index < optspan; ++index )
- this_arg[index] = arglist[optmark + index];
-
- /* move all preceding non-option arguments to the right,
- * overwriting these saved arguments, while making space
- * to replace them in their permuted location.
- */
- for( --optmark; optmark >= optbase; --optmark )
- arglist[optmark + optspan] = arglist[optmark];
-
- /* restore the temporarily saved option arguments to
- * their permuted location.
- */
- for( index = 0; index < optspan; ++index )
- arglist[optbase + index] = this_arg[index];
-
- /* adjust `optbase', to account for the relocated option.
- */
- optbase += optspan;
- }
-
- else
- /* no permutation occurred ...
- * simply adjust `optbase' for all options parsed so far.
- */
- optbase = argind + 1;
-
- /* enter main parsing loop ...
- */
- while( argc > ++argind )
- {
- /* inspect each argument in turn, identifying possible options ...
- */
- if( is_switchar( *(nextchar = argv[optmark = argind]) ) && *++nextchar )
- {
- /* we've found a candidate option argument ... */
-
- if( is_switchar( *nextchar ) )
- {
- /* it's a double hyphen argument ... */
-
- const CHAR *refchar = nextchar;
- if( *++refchar )
- {
- /* and it looks like a long format option ...
- * `getopt_long' mode must be active to accept it as such,
- * `getopt_long_only' also qualifies, but we must downgrade
- * it to force explicit handling as a long format option.
- */
- if( mode >= getopt_mode_long )
- {
- nextchar = refchar;
- mode = getopt_mode_long;
- }
- }
- else
- {
- /* this is an explicit `--' end of options marker, so wrap up now!
- */
- if( optmark > optbase )
- {
- /* permuting the argument list as necessary ...
- * (note use of `this_arg' and `arglist', as above).
- */
- CHAR *this_arg = argv[optmark];
- CHAR **arglist = (CHAR **)(argv);
-
- /* move all preceding non-option arguments to the right ...
- */
- do arglist[optmark] = arglist[optmark - 1];
- while( optmark-- > optbase );
-
- /* reinstate the `--' marker, in its permuted location.
- */
- arglist[optbase] = this_arg;
- }
- /* ... before finally bumping `optbase' past the `--' marker,
- * and returning the `all done' completion indicator.
- */
- optind = ++optbase;
- return getopt_all_done;
- }
- }
- else if( mode < getopt_mode_long_only )
- {
- /* it's not an explicit long option, and `getopt_long_only' isn't active,
- * so we must explicitly try to match it as a short option.
- */
- mode = getopt_mode_standard;
- }
-
- if( mode >= getopt_mode_long )
- {
- /* the current argument is a long form option, (either explicitly,
- * introduced by a double hyphen, or implicitly because we were called
- * by `getopt_long_only'); this is where we parse it.
- */
- int lookup;
- int matched = -1;
-
- /* we need to fetch the `extra' function arguments, which are
- * specified for the `getopt_long' APIs.
- */
- va_list refptr;
- va_start( refptr, optstring );
- struct option *longopts = va_arg( refptr, struct option * );
- int *optindex = va_arg( refptr, int * );
- va_end( refptr );
-
- /* ensuring that `optarg' does not inherit any junk, from parsing
- * preceding arguments ...
- */
- optarg = NULL;
- for( lookup = 0; longopts && longopts[lookup].name; ++lookup )
- {
- /* scan the list of defined long form options ...
- */
- switch( getopt_match_long( nextchar, longopts[lookup].name ) )
- {
- /* looking for possible matches for the current argument.
- */
- case getopt_exact_match:
- /*
- * when an exact match is found,
- * return it immediately, setting `nextchar' to NULL,
- * to ensure we don't mistakenly try to match any
- * subsequent characters as short form options.
- */
- nextchar = NULL;
- return getopt_resolved( mode, argc, argv, &argind,
- longopts, lookup, optindex, optstring );
-
- case getopt_abbreviated_match:
- /*
- * but, for a partial (initial substring) match ...
- */
- if( matched >= 0 )
- {
- /* if this is not the first, then we have an ambiguity ...
- */
- optopt = 0;
- nextchar = NULL;
- optind = argind + 1;
- complain( "option `%s' is ambiguous", argv[argind] );
- return getopt_unknown;
- }
- /* otherwise just note that we've found a possible match ...
- */
- matched = lookup;
- }
- }
- if( matched >= 0 )
- {
- /* if we get to here, then we found exactly one partial match,
- * so return it, as for an exact match.
- */
- nextchar = NULL;
- return getopt_resolved( mode, argc, argv, &argind,
- longopts, matched, optindex, optstring );
- }
- if( mode < getopt_mode_long_only )
- {
- /* if here, then we had what SHOULD have been a long form option,
- * but it is unmatched; (perversely, `mode == getopt_mode_long_only'
- * allows us to still try to match it as a short form option).
- */
- optopt = 0;
- nextchar = NULL;
- optind = argind + 1;
- complain( "unrecognised option `%s'", argv[argind] );
- return getopt_unknown;
- }
- }
- /* fall through to handle standard short form options...
- * when the option argument format is neither explictly identified
- * as long, nor implicitly matched as such, and the argument isn't
- * just a bare hyphen, (which isn't an option), then we make one
- * recursive call to explicitly interpret it as short format.
- */
- if( *nextchar )
- return getopt_parse( mode, argc, argv, optstring );
- }
- /* if we get to here, then we've parsed a non-option argument ...
- * in GNU compatibility mode, we step over it, so we can permute
- * any subsequent option arguments, but ...
- */
- if( *optstring == getopt_switchar )
- {
- /* if `optstring' begins with a `-' character, this special
- * GNU specific behaviour requires us to return the non-option
- * arguments in strict order, as pseudo-arguments to a special
- * option, with return value defined as `getopt_ordered'.
- */
- nextchar = NULL;
- optind = argind + 1;
- optarg = argv[argind];
- return getopt_ordered;
- }
- if( getopt_conventions( *optstring ) & getopt_posixly_correct )
- /*
- * otherwise ...
- * for POSIXLY_CORRECT behaviour, or if `optstring' begins with
- * a `+' character, then we break out of the parsing loop, so that
- * the scan ends at the current argument, with no permutation.
- */
- break;
- }
- /* fall through when all arguments have been evaluated,
- */
- optind = optbase;
- return getopt_all_done;
-}
-
-/* All three public API entry points are trivially defined,
- * in terms of the internal `getopt_parse' function.
- */
-int getopt( getopt_std_args )
-{
- return getopt_parse( getopt_mode_standard, argc, argv, optstring );
-}
-
-int getopt_long( getopt_std_args, const struct option *opts, int *index )
-{
- return getopt_parse( getopt_mode_long, argc, argv, optstring, opts, index );
-}
-
-int getopt_long_only( getopt_std_args, const struct option *opts, int *index )
-{
- return getopt_parse( getopt_mode_long_only, argc, argv, optstring, opts, index );
-}
-
-#ifdef __weak_alias
-/*
- * These Microsnot style uglified aliases are provided for compatibility
- * with the previous MinGW implementation of the getopt API.
- */
-__weak_alias( getopt, _getopt )
-__weak_alias( getopt_long, _getopt_long )
-__weak_alias( getopt_long_only, _getopt_long_only )
-#endif
-
-/* $RCSfile$Revision$: end of file */
diff --git a/winsup/mingw/mingwex/gettimeofday.c b/winsup/mingw/mingwex/gettimeofday.c
deleted file mode 100755
index 194cf04..0000000
--- a/winsup/mingw/mingwex/gettimeofday.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * gettimeofday
- * Implementation according to:
- * The Open Group Base Specifications Issue 6
- * IEEE Std 1003.1, 2004 Edition
- */
-
-/*
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Contributed by:
- * Danny Smith <dannysmith@users.sourceforge.net>
- */
-
-#include <sys/time.h>
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
-/* Offset between 1/1/1601 and 1/1/1970 in 100 nanosec units */
-#define _W32_FT_OFFSET (116444736000000000ULL)
-
-
-int __cdecl gettimeofday(struct timeval *__restrict__ tp,
- void *__restrict__ tzp __attribute__((unused)))
- {
- union {
- unsigned long long ns100; /*time since 1 Jan 1601 in 100ns units */
- FILETIME ft;
- } _now;
-
- if(tp)
- {
- GetSystemTimeAsFileTime (&_now.ft);
- tp->tv_usec=(long)((_now.ns100 / 10ULL) % 1000000ULL );
- tp->tv_sec= (long)((_now.ns100 - _W32_FT_OFFSET) / 10000000ULL);
- }
- /* Always return 0 as per Open Group Base Specifications Issue 6.
- Do not set errno on error. */
- return 0;
-}
-
diff --git a/winsup/mingw/mingwex/imaxabs.c b/winsup/mingw/mingwex/imaxabs.c
deleted file mode 100644
index b643cea..0000000
--- a/winsup/mingw/mingwex/imaxabs.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- This source code was extracted from the Q8 package created and
- placed in the PUBLIC DOMAIN by Doug Gwyn <gwyn@arl.mil>
- last edit: 1999/11/05 gwyn@arl.mil
-
- Implements subclause 7.8.2 of ISO/IEC 9899:1999 (E).
-
- This particular implementation requires the matching <inttypes.h>.
-*/
-
-#include <inttypes.h>
-
-intmax_t
-imaxabs (intmax_t _j)
- { return _j >= 0 ? _j : -_j; }
-
-long long __attribute__ ((alias ("imaxabs"))) llabs (long long);
diff --git a/winsup/mingw/mingwex/imaxdiv.c b/winsup/mingw/mingwex/imaxdiv.c
deleted file mode 100644
index 6acfcf6..0000000
--- a/winsup/mingw/mingwex/imaxdiv.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- This source code was extracted from the Q8 package created and
- placed in the PUBLIC DOMAIN by Doug Gwyn <gwyn@arl.mil>
- last edit: 1999/11/05 gwyn@arl.mil
-
-
- last edit: 1999/11/05 gwyn@arl.mil
-
- Implements subclause 7.8.2 of ISO/IEC 9899:1999 (E).
-
-*/
-
-#include <inttypes.h>
-
-imaxdiv_t
-imaxdiv(intmax_t numer, intmax_t denom)
-{
- imaxdiv_t result;
- result.quot = numer / denom;
- result.rem = numer % denom;
- return result;
-}
-
-long long __attribute__ ((alias ("imaxdiv")))
-lldiv (long long, long long);
diff --git a/winsup/mingw/mingwex/isblank.c b/winsup/mingw/mingwex/isblank.c
deleted file mode 100755
index d3ba74d..0000000
--- a/winsup/mingw/mingwex/isblank.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#define __NO_CTYPE_LINES
-#include <ctype.h>
-
-int _cdecl isblank (int c)
-{return (_isctype(c, _BLANK) || c == '\t');}
diff --git a/winsup/mingw/mingwex/iswblank.c b/winsup/mingw/mingwex/iswblank.c
deleted file mode 100755
index 3161689..0000000
--- a/winsup/mingw/mingwex/iswblank.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#define __NO_CTYPE_LINES
-#include <wctype.h>
-
-int __cdecl iswblank (wint_t wc)
- {return (iswctype(wc, _BLANK) || wc == L'\t');}
diff --git a/winsup/mingw/mingwex/lltoa.c b/winsup/mingw/mingwex/lltoa.c
deleted file mode 100644
index 28248a8..0000000
--- a/winsup/mingw/mingwex/lltoa.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <stdlib.h>
-char* lltoa(long long _n, char * _c, int _i)
- { return _i64toa (_n, _c, _i); }
diff --git a/winsup/mingw/mingwex/lltow.c b/winsup/mingw/mingwex/lltow.c
deleted file mode 100644
index cdf45b7..0000000
--- a/winsup/mingw/mingwex/lltow.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <stdlib.h>
-wchar_t* lltow(long long _n, wchar_t * _w, int _i)
- { return _i64tow (_n, _w, _i); }
diff --git a/winsup/mingw/mingwex/math/acosf.c b/winsup/mingw/mingwex/math/acosf.c
deleted file mode 100644
index 364f6a9..0000000
--- a/winsup/mingw/mingwex/math/acosf.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- */
-
-#include <math.h>
-
-float
-acosf (float x)
-{
- float res;
-
- /* acosl = atanl (sqrtl(1 - x^2) / x) */
- asm ( "fld %%st\n\t"
- "fmul %%st(0)\n\t" /* x^2 */
- "fld1\n\t"
- "fsubp\n\t" /* 1 - x^2 */
- "fsqrt\n\t" /* sqrtl (1 - x^2) */
- "fxch %%st(1)\n\t"
- "fpatan"
- : "=t" (res) : "0" (x) : "st(1)");
- return res;
-}
diff --git a/winsup/mingw/mingwex/math/acosh.c b/winsup/mingw/mingwex/math/acosh.c
deleted file mode 100755
index 1497883..0000000
--- a/winsup/mingw/mingwex/math/acosh.c
+++ /dev/null
@@ -1,26 +0,0 @@
-#include <math.h>
-#include <errno.h>
-#include "fastmath.h"
-
-/* acosh(x) = log (x + sqrt(x * x - 1)) */
-double acosh (double x)
-{
- if (isnan (x))
- return x;
-
- if (x < 1.0)
- {
- errno = EDOM;
- return nan("");
- }
-
- if (x > 0x1p32)
- /* Avoid overflow (and unnecessary calculation when
- sqrt (x * x - 1) == x). GCC optimizes by replacing
- the long double M_LN2 const with a fldln2 insn. */
- return __fast_log (x) + 6.9314718055994530941723E-1L;
-
- /* Since x >= 1, the arg to log will always be greater than
- the fyl2xp1 limit (approx 0.29) so just use logl. */
- return __fast_log (x + __fast_sqrt((x + 1.0) * (x - 1.0)));
-}
diff --git a/winsup/mingw/mingwex/math/acoshf.c b/winsup/mingw/mingwex/math/acoshf.c
deleted file mode 100755
index 08f190f..0000000
--- a/winsup/mingw/mingwex/math/acoshf.c
+++ /dev/null
@@ -1,25 +0,0 @@
-#include <math.h>
-#include <errno.h>
-#include "fastmath.h"
-
-/* acosh(x) = log (x + sqrt(x * x - 1)) */
-float acoshf (float x)
-{
- if (isnan (x))
- return x;
- if (x < 1.0f)
- {
- errno = EDOM;
- return nan("");
- }
-
- if (x > 0x1p32f)
- /* Avoid overflow (and unnecessary calculation when
- sqrt (x * x - 1) == x). GCC optimizes by replacing
- the long double M_LN2 const with a fldln2 insn. */
- return __fast_log (x) + 6.9314718055994530941723E-1L;
-
- /* Since x >= 1, the arg to log will always be greater than
- the fyl2xp1 limit (approx 0.29) so just use logl. */
- return __fast_log (x + __fast_sqrt((x + 1.0) * (x - 1.0)));
-}
diff --git a/winsup/mingw/mingwex/math/acoshl.c b/winsup/mingw/mingwex/math/acoshl.c
deleted file mode 100755
index c461176..0000000
--- a/winsup/mingw/mingwex/math/acoshl.c
+++ /dev/null
@@ -1,27 +0,0 @@
-#include <math.h>
-#include <errno.h>
-#include "fastmath.h"
-
-/* acosh(x) = log (x + sqrt(x * x - 1)) */
-long double acoshl (long double x)
-{
- if (isnan (x))
- return x;
-
- if (x < 1.0L)
- {
- errno = EDOM;
- return nanl("");
- }
- if (x > 0x1p32L)
- /* Avoid overflow (and unnecessary calculation when
- sqrt (x * x - 1) == x).
- The M_LN2 define doesn't have enough precison for
- long double so use this one. GCC optimizes by replacing
- the const with a fldln2 insn. */
- return __fast_logl (x) + 6.9314718055994530941723E-1L;
-
- /* Since x >= 1, the arg to log will always be greater than
- the fyl2xp1 limit (approx 0.29) so just use logl. */
- return __fast_logl (x + __fast_sqrtl((x + 1.0L) * (x - 1.0L)));
-}
diff --git a/winsup/mingw/mingwex/math/acosl.c b/winsup/mingw/mingwex/math/acosl.c
deleted file mode 100644
index f98d2cd..0000000
--- a/winsup/mingw/mingwex/math/acosl.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
- */
-
-#include <math.h>
-
-long double
-acosl (long double x)
-{
- long double res;
-
- /* acosl = atanl (sqrtl(1 - x^2) / x) */
- asm ( "fld %%st\n\t"
- "fmul %%st(0)\n\t" /* x^2 */
- "fld1\n\t"
- "fsubp\n\t" /* 1 - x^2 */
- "fsqrt\n\t" /* sqrtl (1 - x^2) */
- "fxch %%st(1)\n\t"
- "fpatan"
- : "=t" (res) : "0" (x) : "st(1)");
- return res;
-}
diff --git a/winsup/mingw/mingwex/math/asinf.c b/winsup/mingw/mingwex/math/asinf.c
deleted file mode 100644
index e79429e..0000000
--- a/winsup/mingw/mingwex/math/asinf.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- */
-
-/* asin = atan (x / sqrt(1 - x^2)) */
-
-float asinf (float x)
-{
- float res;
-
- asm ( "fld %%st\n\t"
- "fmul %%st(0)\n\t" /* x^2 */
- "fld1\n\t"
- "fsubp\n\t" /* 1 - x^2 */
- "fsqrt\n\t" /* sqrt (1 - x^2) */
- "fpatan"
- : "=t" (res) : "0" (x) : "st(1)");
- return res;
-}
diff --git a/winsup/mingw/mingwex/math/asinh.c b/winsup/mingw/mingwex/math/asinh.c
deleted file mode 100755
index 3040449..0000000
--- a/winsup/mingw/mingwex/math/asinh.c
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <math.h>
-#include <errno.h>
-#include "fastmath.h"
-
- /* asinh(x) = copysign(log(fabs(x) + sqrt(x * x + 1.0)), x) */
-double asinh(double x)
-{
- double z;
- if (!isfinite (x))
- return x;
- z = fabs (x);
-
- /* Avoid setting FPU underflow exception flag in x * x. */
-#if 0
- if ( z < 0x1p-32)
- return x;
-#endif
-
- /* Use log1p to avoid cancellation with small x. Put
- x * x in denom, so overflow is harmless.
- asinh(x) = log1p (x + sqrt (x * x + 1.0) - 1.0)
- = log1p (x + x * x / (sqrt (x * x + 1.0) + 1.0)) */
-
- z = __fast_log1p (z + z * z / (__fast_sqrt (z * z + 1.0) + 1.0));
-
- return ( x > 0.0 ? z : -z);
-}
-
diff --git a/winsup/mingw/mingwex/math/asinhf.c b/winsup/mingw/mingwex/math/asinhf.c
deleted file mode 100755
index 080a927..0000000
--- a/winsup/mingw/mingwex/math/asinhf.c
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <math.h>
-#include <errno.h>
-#include "fastmath.h"
-
- /* asinh(x) = copysign(log(fabs(x) + sqrt(x * x + 1.0)), x) */
-float asinhf(float x)
-{
- float z;
- if (!isfinite (x))
- return x;
- z = fabsf (x);
-
- /* Avoid setting FPU underflow exception flag in x * x. */
-#if 0
- if ( z < 0x1p-32)
- return x;
-#endif
-
-
- /* Use log1p to avoid cancellation with small x. Put
- x * x in denom, so overflow is harmless.
- asinh(x) = log1p (x + sqrt (x * x + 1.0) - 1.0)
- = log1p (x + x * x / (sqrt (x * x + 1.0) + 1.0)) */
-
- z = __fast_log1p (z + z * z / (__fast_sqrt (z * z + 1.0) + 1.0));
-
- return ( x > 0.0 ? z : -z);
-}
diff --git a/winsup/mingw/mingwex/math/asinhl.c b/winsup/mingw/mingwex/math/asinhl.c
deleted file mode 100755
index 8f027e8..0000000
--- a/winsup/mingw/mingwex/math/asinhl.c
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <math.h>
-#include <errno.h>
-#include "fastmath.h"
-
- /* asinh(x) = copysign(log(fabs(x) + sqrt(x * x + 1.0)), x) */
-long double asinhl(long double x)
-{
- long double z;
- if (!isfinite (x))
- return x;
-
- z = fabsl (x);
-
- /* Avoid setting FPU underflow exception flag in x * x. */
-#if 0
- if ( z < 0x1p-32)
- return x;
-#endif
-
- /* Use log1p to avoid cancellation with small x. Put
- x * x in denom, so overflow is harmless.
- asinh(x) = log1p (x + sqrt (x * x + 1.0) - 1.0)
- = log1p (x + x * x / (sqrt (x * x + 1.0) + 1.0)) */
-
- z = __fast_log1pl (z + z * z / (__fast_sqrtl (z * z + 1.0L) + 1.0L));
-
- return ( x > 0.0 ? z : -z);
-}
diff --git a/winsup/mingw/mingwex/math/asinl.c b/winsup/mingw/mingwex/math/asinl.c
deleted file mode 100644
index a2ac32b..0000000
--- a/winsup/mingw/mingwex/math/asinl.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- * Adapted for long double type by Danny Smith <dannysmith@users.sourceforge.net>.
- */
-
-/* asin = atan (x / sqrt(1 - x^2)) */
-
-long double asinl (long double x)
-{
- long double res;
-
- asm ( "fld %%st\n\t"
- "fmul %%st(0)\n\t" /* x^2 */
- "fld1\n\t"
- "fsubp\n\t" /* 1 - x^2 */
- "fsqrt\n\t" /* sqrt (1 - x^2) */
- "fpatan"
- : "=t" (res) : "0" (x) : "st(1)");
- return res;
-}
diff --git a/winsup/mingw/mingwex/math/atan2f.c b/winsup/mingw/mingwex/math/atan2f.c
deleted file mode 100644
index 52ec6f6..0000000
--- a/winsup/mingw/mingwex/math/atan2f.c
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- */
-
-#include <math.h>
-
-float
-atan2f (float y, float x)
-{
- float res;
- asm ("fpatan" : "=t" (res) : "u" (y), "0" (x) : "st(1)");
- return res;
-}
diff --git a/winsup/mingw/mingwex/math/atan2l.c b/winsup/mingw/mingwex/math/atan2l.c
deleted file mode 100644
index efd62c1..0000000
--- a/winsup/mingw/mingwex/math/atan2l.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
- */
-
-#include <math.h>
-
-long double
-atan2l (long double y, long double x)
-{
- long double res;
- asm ("fpatan" : "=t" (res) : "u" (y), "0" (x) : "st(1)");
- return res;
-}
diff --git a/winsup/mingw/mingwex/math/atanf.c b/winsup/mingw/mingwex/math/atanf.c
deleted file mode 100644
index ae70d5d..0000000
--- a/winsup/mingw/mingwex/math/atanf.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- */
-
-#include <math.h>
-
-float
-atanf (float x)
-{
- float res;
-
- asm ("fld1\n\t"
- "fpatan" : "=t" (res) : "0" (x));
- return res;
-}
diff --git a/winsup/mingw/mingwex/math/atanh.c b/winsup/mingw/mingwex/math/atanh.c
deleted file mode 100755
index b5d9ce1..0000000
--- a/winsup/mingw/mingwex/math/atanh.c
+++ /dev/null
@@ -1,31 +0,0 @@
-#include <math.h>
-#include <errno.h>
-#include "fastmath.h"
-
-/* atanh (x) = 0.5 * log ((1.0 + x)/(1.0 - x)) */
-
-double atanh(double x)
-{
- double z;
- if isnan (x)
- return x;
- z = fabs (x);
- if (z == 1.0)
- {
- errno = ERANGE;
- return (x > 0 ? INFINITY : -INFINITY);
- }
- if (z > 1.0)
- {
- errno = EDOM;
- return nan("");
- }
- /* Rearrange formula to avoid precision loss for small x.
-
- atanh(x) = 0.5 * log ((1.0 + x)/(1.0 - x))
- = 0.5 * log1p ((1.0 + x)/(1.0 - x) - 1.0)
- = 0.5 * log1p ((1.0 + x - 1.0 + x) /(1.0 - x))
- = 0.5 * log1p ((2.0 * x ) / (1.0 - x)) */
- z = 0.5 * __fast_log1p ((z + z) / (1.0 - z));
- return x >= 0 ? z : -z;
-}
diff --git a/winsup/mingw/mingwex/math/atanhf.c b/winsup/mingw/mingwex/math/atanhf.c
deleted file mode 100755
index b7c3082..0000000
--- a/winsup/mingw/mingwex/math/atanhf.c
+++ /dev/null
@@ -1,30 +0,0 @@
-#include <math.h>
-#include <errno.h>
-#include "fastmath.h"
-
-/* atanh (x) = 0.5 * log ((1.0 + x)/(1.0 - x)) */
-float atanhf (float x)
-{
- float z;
- if isnan (x)
- return x;
- z = fabsf (x);
- if (z == 1.0)
- {
- errno = ERANGE;
- return (x > 0 ? INFINITY : -INFINITY);
- }
- if ( z > 1.0)
- {
- errno = EDOM;
- return nanf("");
- }
- /* Rearrange formula to avoid precision loss for small x.
-
- atanh(x) = 0.5 * log ((1.0 + x)/(1.0 - x))
- = 0.5 * log1p ((1.0 + x)/(1.0 - x) - 1.0)
- = 0.5 * log1p ((1.0 + x - 1.0 + x) /(1.0 - x))
- = 0.5 * log1p ((2.0 * x ) / (1.0 - x)) */
- z = 0.5 * __fast_log1p ((z + z) / (1.0 - z));
- return x >= 0 ? z : -z;
-}
diff --git a/winsup/mingw/mingwex/math/atanhl.c b/winsup/mingw/mingwex/math/atanhl.c
deleted file mode 100755
index 2d5fec0..0000000
--- a/winsup/mingw/mingwex/math/atanhl.c
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <math.h>
-#include <errno.h>
-#include "fastmath.h"
-
-/* atanh (x) = 0.5 * log ((1.0 + x)/(1.0 - x)) */
-long double atanhl (long double x)
-{
- long double z;
- if isnan (x)
- return x;
- z = fabsl (x);
- if (z == 1.0L)
- {
- errno = ERANGE;
- return (x > 0 ? INFINITY : -INFINITY);
- }
- if ( z > 1.0L)
- {
- errno = EDOM;
- return nanl("");
- }
- /* Rearrange formula to avoid precision loss for small x.
- atanh(x) = 0.5 * log ((1.0 + x)/(1.0 - x))
- = 0.5 * log1p ((1.0 + x)/(1.0 - x) - 1.0)
- = 0.5 * log1p ((1.0 + x - 1.0 + x) /(1.0 - x))
- = 0.5 * log1p ((2.0 * x ) / (1.0 - x)) */
- z = 0.5L * __fast_log1pl ((z + z) / (1.0L - z));
- return x >= 0 ? z : -z;
-}
diff --git a/winsup/mingw/mingwex/math/atanl.c b/winsup/mingw/mingwex/math/atanl.c
deleted file mode 100644
index 5de06d3..0000000
--- a/winsup/mingw/mingwex/math/atanl.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
- */
-
-#include <math.h>
-
-long double
-atanl (long double x)
-{
- long double res;
-
- asm ("fld1\n\t"
- "fpatan"
- : "=t" (res) : "0" (x));
- return res;
-}
diff --git a/winsup/mingw/mingwex/math/cbrt.c b/winsup/mingw/mingwex/math/cbrt.c
deleted file mode 100644
index 93f5c81..0000000
--- a/winsup/mingw/mingwex/math/cbrt.c
+++ /dev/null
@@ -1,162 +0,0 @@
-/* cbrt.c
- *
- * Cube root
- *
- *
- *
- * SYNOPSIS:
- *
- * double x, y, cbrt();
- *
- * y = cbrt( x );
- *
- *
- *
- * DESCRIPTION:
- *
- * Returns the cube root of the argument, which may be negative.
- *
- * Range reduction involves determining the power of 2 of
- * the argument. A polynomial of degree 2 applied to the
- * mantissa, and multiplication by the cube root of 1, 2, or 4
- * approximates the root to within about 0.1%. Then Newton's
- * iteration is used three times to converge to an accurate
- * result.
- *
- *
- *
- * ACCURACY:
- *
- * Relative error:
- * arithmetic domain # trials peak rms
- * DEC -10,10 200000 1.8e-17 6.2e-18
- * IEEE 0,1e308 30000 1.5e-16 5.0e-17
- *
- */
- /* cbrt.c */
-
-/*
-Cephes Math Library Release 2.2: January, 1991
-Copyright 1984, 1991 by Stephen L. Moshier
-Direct inquiries to 30 Frost Street, Cambridge, MA 02140
-*/
-
-/*
- Modified for mingwex.a
- 2002-07-01 Danny Smith <dannysmith@users.sourceforge.net>
- */
-#ifdef __MINGW32__
-#include <math.h>
-#include "cephes_mconf.h"
-#else
-#include "mconf.h"
-#endif
-
-
-static const double CBRT2 = 1.2599210498948731647672;
-static const double CBRT4 = 1.5874010519681994747517;
-static const double CBRT2I = 0.79370052598409973737585;
-static const double CBRT4I = 0.62996052494743658238361;
-
-#ifndef __MINGW32__
-#ifdef ANSIPROT
-extern double frexp ( double, int * );
-extern double ldexp ( double, int );
-extern int isnan ( double );
-extern int isfinite ( double );
-#else
-double frexp(), ldexp();
-int isnan(), isfinite();
-#endif
-#endif
-
-double cbrt(x)
-double x;
-{
-int e, rem, sign;
-double z;
-
-#ifdef __MINGW32__
-if (!isfinite (x) || x == 0 )
- return x;
-#else
-
-#ifdef NANS
-if( isnan(x) )
- return x;
-#endif
-#ifdef INFINITIES
-if( !isfinite(x) )
- return x;
-#endif
-if( x == 0 )
- return( x );
-
-#endif /* __MINGW32__ */
-
-if( x > 0 )
- sign = 1;
-else
- {
- sign = -1;
- x = -x;
- }
-
-z = x;
-/* extract power of 2, leaving
- * mantissa between 0.5 and 1
- */
-x = frexp( x, &e );
-
-/* Approximate cube root of number between .5 and 1,
- * peak relative error = 9.2e-6
- */
-x = (((-1.3466110473359520655053e-1 * x
- + 5.4664601366395524503440e-1) * x
- - 9.5438224771509446525043e-1) * x
- + 1.1399983354717293273738e0 ) * x
- + 4.0238979564544752126924e-1;
-
-/* exponent divided by 3 */
-if( e >= 0 )
- {
- rem = e;
- e /= 3;
- rem -= 3*e;
- if( rem == 1 )
- x *= CBRT2;
- else if( rem == 2 )
- x *= CBRT4;
- }
-
-
-/* argument less than 1 */
-
-else
- {
- e = -e;
- rem = e;
- e /= 3;
- rem -= 3*e;
- if( rem == 1 )
- x *= CBRT2I;
- else if( rem == 2 )
- x *= CBRT4I;
- e = -e;
- }
-
-/* multiply by power of 2 */
-x = ldexp( x, e );
-
-/* Newton iteration */
-x -= ( x - (z/(x*x)) )*0.33333333333333333333;
-#ifdef DEC
-x -= ( x - (z/(x*x)) )/3.0;
-#else
-x -= ( x - (z/(x*x)) )*0.33333333333333333333;
-#endif
-
-if( sign < 0 )
- x = -x;
-return(x);
-}
diff --git a/winsup/mingw/mingwex/math/cbrtf.c b/winsup/mingw/mingwex/math/cbrtf.c
deleted file mode 100644
index 537cf8d..0000000
--- a/winsup/mingw/mingwex/math/cbrtf.c
+++ /dev/null
@@ -1,147 +0,0 @@
-/* cbrtf.c
- *
- * Cube root
- *
- *
- *
- * SYNOPSIS:
- *
- * float x, y, cbrtf();
- *
- * y = cbrtf( x );
- *
- *
- *
- * DESCRIPTION:
- *
- * Returns the cube root of the argument, which may be negative.
- *
- * Range reduction involves determining the power of 2 of
- * the argument. A polynomial of degree 2 applied to the
- * mantissa, and multiplication by the cube root of 1, 2, or 4
- * approximates the root to within about 0.1%. Then Newton's
- * iteration is used to converge to an accurate result.
- *
- *
- *
- * ACCURACY:
- *
- * Relative error:
- * arithmetic domain # trials peak rms
- * IEEE 0,1e38 100000 7.6e-8 2.7e-8
- *
- */
- /* cbrt.c */
-
-/*
-Cephes Math Library Release 2.2: June, 1992
-Copyright 1984, 1987, 1988, 1992 by Stephen L. Moshier
-Direct inquiries to 30 Frost Street, Cambridge, MA 02140
-*/
-
-/*
- Modified for mingwex.a
- 2002-07-01 Danny Smith <dannysmith@users.sourceforge.net>
- */
-#ifdef __MINGW32__
-#include <math.h>
-#include "cephes_mconf.h"
-#else
-#include "mconf.h"
-#endif
-
-static const float CBRT2 = 1.25992104989487316477;
-static const float CBRT4 = 1.58740105196819947475;
-
-#ifndef __MINGW32__
-#ifdef ANSIC
-float frexpf(float, int *), ldexpf(float, int);
-
-float cbrtf( float xx )
-#else
-float frexpf(), ldexpf();
-
-float cbrtf(xx)
-double xx;
-#endif
-{
-int e, rem, sign;
-float x, z;
-
-x = xx;
-
-#else /* __MINGW32__ */
-float cbrtf (float x)
-{
-int e, rem, sign;
-float z;
-#endif /* __MINGW32__ */
-
-#ifdef __MINGW32__
-if (!isfinite (x) || x == 0.0F )
- return x;
-#else
-if( x == 0 )
- return( 0.0 );
-#endif
-if( x > 0 )
- sign = 1;
-else
- {
- sign = -1;
- x = -x;
- }
-
-z = x;
-/* extract power of 2, leaving
- * mantissa between 0.5 and 1
- */
-x = frexpf( x, &e );
-
-/* Approximate cube root of number between .5 and 1,
- * peak relative error = 9.2e-6
- */
-x = (((-0.13466110473359520655053 * x
- + 0.54664601366395524503440 ) * x
- - 0.95438224771509446525043 ) * x
- + 1.1399983354717293273738 ) * x
- + 0.40238979564544752126924;
-
-/* exponent divided by 3 */
-if( e >= 0 )
- {
- rem = e;
- e /= 3;
- rem -= 3*e;
- if( rem == 1 )
- x *= CBRT2;
- else if( rem == 2 )
- x *= CBRT4;
- }
-
-
-/* argument less than 1 */
-
-else
- {
- e = -e;
- rem = e;
- e /= 3;
- rem -= 3*e;
- if( rem == 1 )
- x /= CBRT2;
- else if( rem == 2 )
- x /= CBRT4;
- e = -e;
- }
-
-/* multiply by power of 2 */
-x = ldexpf( x, e );
-
-/* Newton iteration */
-x -= ( x - (z/(x*x)) ) * 0.333333333333;
-
-if( sign < 0 )
- x = -x;
-return(x);
-}
diff --git a/winsup/mingw/mingwex/math/cbrtl.c b/winsup/mingw/mingwex/math/cbrtl.c
deleted file mode 100644
index 36bd48f..0000000
--- a/winsup/mingw/mingwex/math/cbrtl.c
+++ /dev/null
@@ -1,161 +0,0 @@
-/* cbrtl.c
- *
- * Cube root, long double precision
- *
- *
- *
- * SYNOPSIS:
- *
- * long double x, y, cbrtl();
- *
- * y = cbrtl( x );
- *
- *
- *
- * DESCRIPTION:
- *
- * Returns the cube root of the argument, which may be negative.
- *
- * Range reduction involves determining the power of 2 of
- * the argument. A polynomial of degree 2 applied to the
- * mantissa, and multiplication by the cube root of 1, 2, or 4
- * approximates the root to within about 0.1%. Then Newton's
- * iteration is used three times to converge to an accurate
- * result.
- *
- *
- *
- * ACCURACY:
- *
- * Relative error:
- * arithmetic domain # trials peak rms
- * IEEE .125,8 80000 7.0e-20 2.2e-20
- * IEEE exp(+-707) 100000 7.0e-20 2.4e-20
- *
- */
-
-
-/*
-Cephes Math Library Release 2.2: January, 1991
-Copyright 1984, 1991 by Stephen L. Moshier
-Direct inquiries to 30 Frost Street, Cambridge, MA 02140
-*/
-
-/*
- Modified for mingwex.a
- 2002-07-01 Danny Smith <dannysmith@users.sourceforge.net>
- */
-#ifdef __MINGW32__
-#include "cephes_mconf.h"
-#else
-#include "mconf.h"
-#endif
-
-static const long double CBRT2 = 1.2599210498948731647672L;
-static const long double CBRT4 = 1.5874010519681994747517L;
-static const long double CBRT2I = 0.79370052598409973737585L;
-static const long double CBRT4I = 0.62996052494743658238361L;
-
-#ifndef __MINGW32__
-
-#ifdef ANSIPROT
-extern long double frexpl ( long double, int * );
-extern long double ldexpl ( long double, int );
-extern int isnanl ( long double );
-#else
-long double frexpl(), ldexpl();
-extern int isnanl();
-#endif
-
-#ifdef INFINITIES
-extern long double INFINITYL;
-#endif
-
-#endif /* __MINGW32__ */
-
-long double cbrtl(x)
-long double x;
-{
-int e, rem, sign;
-long double z;
-
-#ifdef __MINGW32__
-if (!isfinite (x) || x == 0.0L)
- return(x);
-#else
-
-#ifdef NANS
-if(isnanl(x))
- return(x);
-#endif
-#ifdef INFINITIES
-if( x == INFINITYL)
- return(x);
-if( x == -INFINITYL)
- return(x);
-#endif
-if( x == 0 )
- return( x );
-
-#endif /* __MINGW32__ */
-
-if( x > 0 )
- sign = 1;
-else
- {
- sign = -1;
- x = -x;
- }
-
-z = x;
-/* extract power of 2, leaving
- * mantissa between 0.5 and 1
- */
-x = frexpl( x, &e );
-
-/* Approximate cube root of number between .5 and 1,
- * peak relative error = 1.2e-6
- */
-x = (((( 1.3584464340920900529734e-1L * x
- - 6.3986917220457538402318e-1L) * x
- + 1.2875551670318751538055e0L) * x
- - 1.4897083391357284957891e0L) * x
- + 1.3304961236013647092521e0L) * x
- + 3.7568280825958912391243e-1L;
-
-/* exponent divided by 3 */
-if( e >= 0 )
- {
- rem = e;
- e /= 3;
- rem -= 3*e;
- if( rem == 1 )
- x *= CBRT2;
- else if( rem == 2 )
- x *= CBRT4;
- }
-else
- { /* argument less than 1 */
- e = -e;
- rem = e;
- e /= 3;
- rem -= 3*e;
- if( rem == 1 )
- x *= CBRT2I;
- else if( rem == 2 )
- x *= CBRT4I;
- e = -e;
- }
-
-/* multiply by power of 2 */
-x = ldexpl( x, e );
-
-/* Newton iteration */
-
-x -= ( x - (z/(x*x)) )*0.3333333333333333333333L;
-x -= ( x - (z/(x*x)) )*0.3333333333333333333333L;
-
-if( sign < 0 )
- x = -x;
-return(x);
-}
diff --git a/winsup/mingw/mingwex/math/ceilf.S b/winsup/mingw/mingwex/math/ceilf.S
deleted file mode 100644
index ffcdfc6..0000000
--- a/winsup/mingw/mingwex/math/ceilf.S
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- */
-
- .file "ceilf.S"
- .text
- .align 4
-.globl _ceilf
- .def _ceilf; .scl 2; .type 32; .endef
-_ceilf:
- flds 4(%esp)
- subl $8,%esp
-
- fstcw 4(%esp) /* store fpu control word */
-
- /* We use here %edx although only the low 1 bits are defined.
- But none of the operations should care and they are faster
- than the 16 bit operations. */
- movl $0x0800,%edx /* round towards +oo */
- orl 4(%esp),%edx
- andl $0xfbff,%edx
- movl %edx,(%esp)
- fldcw (%esp) /* load modified control word */
-
- frndint /* round */
-
- fldcw 4(%esp) /* restore original control word */
-
- addl $8,%esp
- ret
diff --git a/winsup/mingw/mingwex/math/ceill.S b/winsup/mingw/mingwex/math/ceill.S
deleted file mode 100644
index 29cb27a..0000000
--- a/winsup/mingw/mingwex/math/ceill.S
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- * Changes for long double by Ulrich Drepper <drepper@cygnus.com>
- */
-
-
- .file "ceill.S"
- .text
- .align 4
-.globl _ceill
- .def _ceill; .scl 2; .type 32; .endef
-_ceill:
- fldt 4(%esp)
- subl $8,%esp
-
- fstcw 4(%esp) /* store fpu control word */
-
- /* We use here %edx although only the low 1 bits are defined.
- But none of the operations should care and they are faster
- than the 16 bit operations. */
- movl $0x0800,%edx /* round towards +oo */
- orl 4(%esp),%edx
- andl $0xfbff,%edx
- movl %edx,(%esp)
- fldcw (%esp) /* load modified control word */
-
- frndint /* round */
-
- fldcw 4(%esp) /* restore original control word */
-
- addl $8,%esp
- ret
diff --git a/winsup/mingw/mingwex/math/cephes_mconf.h b/winsup/mingw/mingwex/math/cephes_mconf.h
deleted file mode 100644
index 9818c45..0000000
--- a/winsup/mingw/mingwex/math/cephes_mconf.h
+++ /dev/null
@@ -1,395 +0,0 @@
-#include <math.h>
-#include <errno.h>
-
-
-#define IBMPC 1
-#define ANSIPROT 1
-#define MINUSZERO 1
-#define INFINITIES 1
-#define NANS 1
-#define DENORMAL 1
-#define VOLATILE
-#define mtherr(fname, code)
-#define XPD 0,
-
-#define _CEPHES_USE_ERRNO
-
-#ifdef _CEPHES_USE_ERRNO
-#define _SET_ERRNO(x) errno = (x)
-#else
-#define _SET_ERRNO(x)
-#endif
-
-/* constants used by cephes functions */
-
-/* double */
-#define MAXNUM 1.7976931348623158E308
-#define MAXLOG 7.09782712893383996843E2
-#define MINLOG -7.08396418532264106224E2
-#define LOGE2 6.93147180559945309417E-1
-#define LOG2E 1.44269504088896340736
-#define PI 3.14159265358979323846
-#define PIO2 1.57079632679489661923
-#define PIO4 7.85398163397448309616E-1
-
-#define NEGZERO (-0.0)
-#undef NAN
-#undef INFINITY
-#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 2))
-#define INFINITY __builtin_huge_val()
-#define NAN __builtin_nan("")
-#else
-extern double __INF;
-#define INFINITY (__INF)
-extern double __QNAN;
-#define NAN (__QNAN)
-#endif
-
-/*long double*/
-#define MAXNUML 1.189731495357231765021263853E4932L
-#define MAXLOGL 1.1356523406294143949492E4L
-#define MINLOGL -1.13994985314888605586758E4L
-#define LOGE2L 6.9314718055994530941723E-1L
-#define LOG2EL 1.4426950408889634073599E0L
-#define PIL 3.1415926535897932384626L
-#define PIO2L 1.5707963267948966192313L
-#define PIO4L 7.8539816339744830961566E-1L
-
-#define isfinitel isfinite
-#define isinfl isinf
-#define isnanl isnan
-#define signbitl signbit
-
-#define NEGZEROL (-0.0L)
-
-#undef NANL
-#undef INFINITYL
-#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 2))
-#define INFINITYL __builtin_huge_vall()
-#define NANL __builtin_nanl("")
-#else
-extern long double __INFL;
-#define INFINITYL (__INFL)
-extern long double __QNANL;
-#define NANL (__QNANL)
-#endif
-
-/* float */
-
-#define MAXNUMF 3.4028234663852885981170418348451692544e38F
-#define MAXLOGF 88.72283905206835F
-#define MINLOGF -103.278929903431851103F /* log(2^-149) */
-#define LOG2EF 1.44269504088896341F
-#define LOGE2F 0.693147180559945309F
-#define PIF 3.141592653589793238F
-#define PIO2F 1.5707963267948966192F
-#define PIO4F 0.7853981633974483096F
-
-#define isfinitef isfinite
-#define isinff isinf
-#define isnanf isnan
-#define signbitf signbit
-
-#define NEGZEROF (-0.0F)
-
-#undef NANF
-#undef INFINITYF
-#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 2))
-#define INFINITYF __builtin_huge_valf()
-#define NANF __builtin_nanf("")
-#else
-extern float __INFF;
-#define INFINITYF (__INFF)
-extern float __QNANF;
-#define NANF (__QNANF)
-#endif
-
-
-/* double */
-
-/*
-Cephes Math Library Release 2.2: July, 1992
-Copyright 1984, 1987, 1988, 1992 by Stephen L. Moshier
-Direct inquiries to 30 Frost Street, Cambridge, MA 02140
-*/
-
-
-/* polevl.c
- * p1evl.c
- *
- * Evaluate polynomial
- *
- *
- *
- * SYNOPSIS:
- *
- * int N;
- * double x, y, coef[N+1], polevl[];
- *
- * y = polevl( x, coef, N );
- *
- *
- *
- * DESCRIPTION:
- *
- * Evaluates polynomial of degree N:
- *
- * 2 N
- * y = C + C x + C x +...+ C x
- * 0 1 2 N
- *
- * Coefficients are stored in reverse order:
- *
- * coef[0] = C , ..., coef[N] = C .
- * N 0
- *
- * The function p1evl() assumes that coef[N] = 1.0 and is
- * omitted from the array. Its calling arguments are
- * otherwise the same as polevl().
- *
- *
- * SPEED:
- *
- * In the interest of speed, there are no checks for out
- * of bounds arithmetic. This routine is used by most of
- * the functions in the library. Depending on available
- * equipment features, the user may wish to rewrite the
- * program in microcode or assembly language.
- *
- */
-
-/* Polynomial evaluator:
- * P[0] x^n + P[1] x^(n-1) + ... + P[n]
- */
-static __inline__ double polevl( x, p, n )
-double x;
-const void *p;
-int n;
-{
-register double y;
-register double *P = (double *)p;
-
-y = *P++;
-do
- {
- y = y * x + *P++;
- }
-while( --n );
-return(y);
-}
-
-
-
-/* Polynomial evaluator:
- * x^n + P[0] x^(n-1) + P[1] x^(n-2) + ... + P[n]
- */
-static __inline__ double p1evl( x, p, n )
-double x;
-const void *p;
-int n;
-{
-register double y;
-register double *P = (double *)p;
-
-n -= 1;
-y = x + *P++;
-do
- {
- y = y * x + *P++;
- }
-while( --n );
-return( y );
-}
-
-
-/* long double */
-/*
-Cephes Math Library Release 2.2: July, 1992
-Copyright 1984, 1987, 1988, 1992 by Stephen L. Moshier
-Direct inquiries to 30 Frost Street, Cambridge, MA 02140
-*/
-
-
-/* polevll.c
- * p1evll.c
- *
- * Evaluate polynomial
- *
- *
- *
- * SYNOPSIS:
- *
- * int N;
- * long double x, y, coef[N+1], polevl[];
- *
- * y = polevll( x, coef, N );
- *
- *
- *
- * DESCRIPTION:
- *
- * Evaluates polynomial of degree N:
- *
- * 2 N
- * y = C + C x + C x +...+ C x
- * 0 1 2 N
- *
- * Coefficients are stored in reverse order:
- *
- * coef[0] = C , ..., coef[N] = C .
- * N 0
- *
- * The function p1evll() assumes that coef[N] = 1.0 and is
- * omitted from the array. Its calling arguments are
- * otherwise the same as polevll().
- *
- *
- * SPEED:
- *
- * In the interest of speed, there are no checks for out
- * of bounds arithmetic. This routine is used by most of
- * the functions in the library. Depending on available
- * equipment features, the user may wish to rewrite the
- * program in microcode or assembly language.
- *
- */
-
-/* Polynomial evaluator:
- * P[0] x^n + P[1] x^(n-1) + ... + P[n]
- */
-static __inline__ long double polevll( x, p, n )
-long double x;
-const void *p;
-int n;
-{
-register long double y;
-register long double *P = (long double *)p;
-
-y = *P++;
-do
- {
- y = y * x + *P++;
- }
-while( --n );
-return(y);
-}
-
-
-
-/* Polynomial evaluator:
- * x^n + P[0] x^(n-1) + P[1] x^(n-2) + ... + P[n]
- */
-static __inline__ long double p1evll( x, p, n )
-long double x;
-const void *p;
-int n;
-{
-register long double y;
-register long double *P = (long double *)p;
-
-n -= 1;
-y = x + *P++;
-do
- {
- y = y * x + *P++;
- }
-while( --n );
-return( y );
-}
-
-/* Float version */
-
-/* polevlf.c
- * p1evlf.c
- *
- * Evaluate polynomial
- *
- *
- *
- * SYNOPSIS:
- *
- * int N;
- * float x, y, coef[N+1], polevlf[];
- *
- * y = polevlf( x, coef, N );
- *
- *
- *
- * DESCRIPTION:
- *
- * Evaluates polynomial of degree N:
- *
- * 2 N
- * y = C + C x + C x +...+ C x
- * 0 1 2 N
- *
- * Coefficients are stored in reverse order:
- *
- * coef[0] = C , ..., coef[N] = C .
- * N 0
- *
- * The function p1evl() assumes that coef[N] = 1.0 and is
- * omitted from the array. Its calling arguments are
- * otherwise the same as polevl().
- *
- *
- * SPEED:
- *
- * In the interest of speed, there are no checks for out
- * of bounds arithmetic. This routine is used by most of
- * the functions in the library. Depending on available
- * equipment features, the user may wish to rewrite the
- * program in microcode or assembly language.
- *
- */
-
-/*
-Cephes Math Library Release 2.1: December, 1988
-Copyright 1984, 1987, 1988 by Stephen L. Moshier
-Direct inquiries to 30 Frost Street, Cambridge, MA 02140
-*/
-
-static __inline__ float polevlf(float x, const float* coef, int N )
-{
-float ans;
-float *p;
-int i;
-
-p = (float*)coef;
-ans = *p++;
-
-/*
-for( i=0; i<N; i++ )
- ans = ans * x + *p++;
-*/
-
-i = N;
-do
- ans = ans * x + *p++;
-while( --i );
-
-return( ans );
-}
-
-/* p1evl() */
-/* N
- * Evaluate polynomial when coefficient of x is 1.0.
- * Otherwise same as polevl.
- */
-
-static __inline__ float p1evlf( float x, const float *coef, int N )
-{
-float ans;
-float *p;
-int i;
-
-p = (float*)coef;
-ans = x + *p++;
-i = N-1;
-
-do
- ans = ans * x + *p++;
-while( --i );
-
-return( ans );
-}
diff --git a/winsup/mingw/mingwex/math/copysign.S b/winsup/mingw/mingwex/math/copysign.S
deleted file mode 100644
index 60d6c72..0000000
--- a/winsup/mingw/mingwex/math/copysign.S
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- */
-
- .file "copysign.S"
- .text
- .align 4
-.globl _copysign
- .def _copysign; .scl 2; .type 32; .endef
-_copysign:
- movl 16(%esp),%edx
- movl 8(%esp),%eax
- andl $0x80000000,%edx
- andl $0x7fffffff,%eax
- orl %edx,%eax
- movl %eax,8(%esp)
- fldl 4(%esp)
- ret
diff --git a/winsup/mingw/mingwex/math/copysignf.S b/winsup/mingw/mingwex/math/copysignf.S
deleted file mode 100644
index 8a60c46..0000000
--- a/winsup/mingw/mingwex/math/copysignf.S
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- */
-
- .file "copysignf.S"
- .text
- .align 4
-.globl _copysignf
- .def _copysignf; .scl 2; .type 32; .endef
-_copysignf:
- movl 8(%esp),%edx
- movl 4(%esp),%eax
- andl $0x80000000,%edx
- andl $0x7fffffff,%eax
- orl %edx,%eax
- movl %eax,4(%esp)
- flds 4(%esp)
- ret
diff --git a/winsup/mingw/mingwex/math/copysignl.S b/winsup/mingw/mingwex/math/copysignl.S
deleted file mode 100644
index 4143b37..0000000
--- a/winsup/mingw/mingwex/math/copysignl.S
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Changes for long double by Ulrich Drepper <drepper@cygnus.com>
- * Public domain.
- */
-
- .file "copysignl.S"
- .text
- .align 4
-.globl _copysignl
- .def _copysignl; .scl 2; .type 32; .endef
-_copysignl:
- movl 24(%esp),%edx
- movl 12(%esp),%eax
- andl $0x8000,%edx
- andl $0x7fff,%eax
- orl %edx,%eax
- movl %eax,12(%esp)
- fldt 4(%esp)
- ret
diff --git a/winsup/mingw/mingwex/math/cosf.S b/winsup/mingw/mingwex/math/cosf.S
deleted file mode 100644
index 862f6ce..0000000
--- a/winsup/mingw/mingwex/math/cosf.S
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- * Removed glibc header dependancy by Danny Smith
- * <dannysmith@users.sourceforge.net>
- */
- .file "cosf.S"
- .text
- .align 4
-.globl _cosl
- .def _cosf; .scl 2; .type 32; .endef
-_cosf:
- flds 4(%esp)
- fcos
- fnstsw %ax
- testl $0x400,%eax
- jnz 1f
- ret
-1: fldpi
- fadd %st(0)
- fxch %st(1)
-2: fprem1
- fnstsw %ax
- testl $0x400,%eax
- jnz 2b
- fstp %st(1)
- fcos
- ret
diff --git a/winsup/mingw/mingwex/math/coshf.c b/winsup/mingw/mingwex/math/coshf.c
deleted file mode 100644
index 4e44f08..0000000
--- a/winsup/mingw/mingwex/math/coshf.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <math.h>
-float coshf (float x)
- {return (float) cosh (x);}
diff --git a/winsup/mingw/mingwex/math/coshl.c b/winsup/mingw/mingwex/math/coshl.c
deleted file mode 100644
index c698e50..0000000
--- a/winsup/mingw/mingwex/math/coshl.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/* coshl.c
- *
- * Hyperbolic cosine, long double precision
- *
- *
- *
- * SYNOPSIS:
- *
- * long double x, y, coshl();
- *
- * y = coshl( x );
- *
- *
- *
- * DESCRIPTION:
- *
- * Returns hyperbolic cosine of argument in the range MINLOGL to
- * MAXLOGL.
- *
- * cosh(x) = ( exp(x) + exp(-x) )/2.
- *
- *
- *
- * ACCURACY:
- *
- * Relative error:
- * arithmetic domain # trials peak rms
- * IEEE +-10000 30000 1.1e-19 2.8e-20
- *
- *
- * ERROR MESSAGES:
- *
- * message condition value returned
- * cosh overflow |x| > MAXLOGL+LOGE2L INFINITYL
- *
- *
- */
-
-
-/*
-Cephes Math Library Release 2.7: May, 1998
-Copyright 1985, 1991, 1998 by Stephen L. Moshier
-*/
-
-/*
-Modified for mingw
-2002-07-22 Danny Smith <dannysmith@users.sourceforge.net>
-*/
-
-#ifdef __MINGW32__
-#include "cephes_mconf.h"
-#else
-#include "mconf.h"
-#endif
-
-#ifndef _SET_ERRNO
-#define _SET_ERRNO(x)
-#endif
-
-
-#ifndef __MINGW32__
-extern long double MAXLOGL, MAXNUML, LOGE2L;
-#ifdef ANSIPROT
-extern long double expl ( long double );
-extern int isnanl ( long double );
-#else
-long double expl(), isnanl();
-#endif
-#ifdef INFINITIES
-extern long double INFINITYL;
-#endif
-#ifdef NANS
-extern long double NANL;
-#endif
-#endif /* __MINGW32__ */
-
-long double coshl(x)
-long double x;
-{
-long double y;
-
-#ifdef NANS
-if( isnanl(x) )
- {
- _SET_ERRNO(EDOM);
- return(x);
- }
-#endif
-if( x < 0 )
- x = -x;
-if( x > (MAXLOGL + LOGE2L) )
- {
- mtherr( "coshl", OVERFLOW );
- _SET_ERRNO(ERANGE);
-#ifdef INFINITIES
- return( INFINITYL );
-#else
- return( MAXNUML );
-#endif
- }
-if( x >= (MAXLOGL - LOGE2L) )
- {
- y = expl(0.5L * x);
- y = (0.5L * y) * y;
- return(y);
- }
-y = expl(x);
-y = 0.5L * (y + 1.0L / y);
-return( y );
-}
diff --git a/winsup/mingw/mingwex/math/cosl.S b/winsup/mingw/mingwex/math/cosl.S
deleted file mode 100644
index 59d9858..0000000
--- a/winsup/mingw/mingwex/math/cosl.S
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
- * Removed glibc header dependancy by Danny Smith
- * <dannysmith@users.sourceforge.net>
- */
- .file "cosl.S"
- .text
- .align 4
-.globl _cosl
- .def _cosl; .scl 2; .type 32; .endef
-_cosl:
- fldt 4(%esp)
- fcos
- fnstsw %ax
- testl $0x400,%eax
- jnz 1f
- ret
-1: fldpi
- fadd %st(0)
- fxch %st(1)
-2: fprem1
- fnstsw %ax
- testl $0x400,%eax
- jnz 2b
- fstp %st(1)
- fcos
- ret
diff --git a/winsup/mingw/mingwex/math/erfl.c b/winsup/mingw/mingwex/math/erfl.c
deleted file mode 100755
index ac50d98..0000000
--- a/winsup/mingw/mingwex/math/erfl.c
+++ /dev/null
@@ -1,299 +0,0 @@
-/* erfl.c
- *
- * Error function
- *
- *
- *
- * SYNOPSIS:
- *
- * long double x, y, erfl();
- *
- * y = erfl( x );
- *
- *
- *
- * DESCRIPTION:
- *
- * The integral is
- *
- * x
- * -
- * 2 | | 2
- * erf(x) = -------- | exp( - t ) dt.
- * sqrt(pi) | |
- * -
- * 0
- *
- * The magnitude of x is limited to about 106.56 for IEEE
- * arithmetic; 1 or -1 is returned outside this range.
- *
- * For 0 <= |x| < 1, erf(x) = x * P6(x^2)/Q6(x^2);
- * Otherwise: erf(x) = 1 - erfc(x).
- *
- *
- *
- * ACCURACY:
- *
- * Relative error:
- * arithmetic domain # trials peak rms
- * IEEE 0,1 50000 2.0e-19 5.7e-20
- *
- */
-
-/* erfcl.c
- *
- * Complementary error function
- *
- *
- *
- * SYNOPSIS:
- *
- * long double x, y, erfcl();
- *
- * y = erfcl( x );
- *
- *
- *
- * DESCRIPTION:
- *
- *
- * 1 - erf(x) =
- *
- * inf.
- * -
- * 2 | | 2
- * erfc(x) = -------- | exp( - t ) dt
- * sqrt(pi) | |
- * -
- * x
- *
- *
- * For small x, erfc(x) = 1 - erf(x); otherwise rational
- * approximations are computed.
- *
- * A special function expx2l.c is used to suppress error amplification
- * in computing exp(-x^2).
- *
- *
- * ACCURACY:
- *
- * Relative error:
- * arithmetic domain # trials peak rms
- * IEEE 0,13 50000 8.4e-19 9.7e-20
- * IEEE 6,106.56 20000 2.9e-19 7.1e-20
- *
- *
- * ERROR MESSAGES:
- *
- * message condition value returned
- * erfcl underflow x^2 > MAXLOGL 0.0
- *
- *
- */
-
-
-/*
-Modified from file ndtrl.c
-Cephes Math Library Release 2.3: January, 1995
-Copyright 1984, 1995 by Stephen L. Moshier
-*/
-
-#include <math.h>
-#include "cephes_mconf.h"
-
-/* erfc(x) = exp(-x^2) P(1/x)/Q(1/x)
- 1/8 <= 1/x <= 1
- Peak relative error 5.8e-21 */
-
-static const unsigned short P[] = {
-0x4bf0,0x9ad8,0x7a03,0x86c7,0x401d, XPD
-0xdf23,0xd843,0x4032,0x8881,0x401e, XPD
-0xd025,0xcfd5,0x8494,0x88d3,0x401e, XPD
-0xb6d0,0xc92b,0x5417,0xacb1,0x401d, XPD
-0xada8,0x356a,0x4982,0x94a6,0x401c, XPD
-0x4e13,0xcaee,0x9e31,0xb258,0x401a, XPD
-0x5840,0x554d,0x37a3,0x9239,0x4018, XPD
-0x3b58,0x3da2,0xaf02,0x9780,0x4015, XPD
-0x0144,0x489e,0xbe68,0x9c31,0x4011, XPD
-0x333b,0xd9e6,0xd404,0x986f,0xbfee, XPD
-};
-static const unsigned short Q[] = {
-/* 0x0000,0x0000,0x0000,0x8000,0x3fff, XPD */
-0x0e43,0x302d,0x79ed,0x86c7,0x401d, XPD
-0xf817,0x9128,0xc0f8,0xd48b,0x401e, XPD
-0x8eae,0x8dad,0x6eb4,0x9aa2,0x401f, XPD
-0x00e7,0x7595,0xcd06,0x88bb,0x401f, XPD
-0x4991,0xcfda,0x52f1,0xa2a9,0x401e, XPD
-0xc39d,0xe415,0xc43d,0x87c0,0x401d, XPD
-0xa75d,0x436f,0x30dd,0xa027,0x401b, XPD
-0xc4cb,0x305a,0xbf78,0x8220,0x4019, XPD
-0x3708,0x33b1,0x07fa,0x8644,0x4016, XPD
-0x24fa,0x96f6,0x7153,0x8a6c,0x4012, XPD
-};
-
-/* erfc(x) = exp(-x^2) 1/x R(1/x^2) / S(1/x^2)
- 1/128 <= 1/x < 1/8
- Peak relative error 1.9e-21 */
-
-static const unsigned short R[] = {
-0x260a,0xab95,0x2fc7,0xe7c4,0x4000, XPD
-0x4761,0x613e,0xdf6d,0xe58e,0x4001, XPD
-0x0615,0x4b00,0x575f,0xdc7b,0x4000, XPD
-0x521d,0x8527,0x3435,0x8dc2,0x3ffe, XPD
-0x22cf,0xc711,0x6c5b,0xdcfb,0x3ff9, XPD
-};
-static const unsigned short S[] = {
-/* 0x0000,0x0000,0x0000,0x8000,0x3fff, XPD */
-0x5de6,0x17d7,0x54d6,0xaba9,0x4002, XPD
-0x55d5,0xd300,0xe71e,0xf564,0x4002, XPD
-0xb611,0x8f76,0xf020,0xd255,0x4001, XPD
-0x3684,0x3798,0xb793,0x80b0,0x3fff, XPD
-0xf5af,0x2fb2,0x1e57,0xc3d7,0x3ffa, XPD
-};
-
-/* erf(x) = x T(x^2)/U(x^2)
- 0 <= x <= 1
- Peak relative error 7.6e-23 */
-
-static const unsigned short T[] = {
-0xfd7a,0x3a1a,0x705b,0xe0c4,0x3ffb, XPD
-0x3128,0xc337,0x3716,0xace5,0x4001, XPD
-0x9517,0x4e93,0x540e,0x8f97,0x4007, XPD
-0x6118,0x6059,0x9093,0xa757,0x400a, XPD
-0xb954,0xa987,0xc60c,0xbc83,0x400e, XPD
-0x7a56,0xe45a,0xa4bd,0x975b,0x4010, XPD
-0xc446,0x6bab,0x0b2a,0x86d0,0x4013, XPD
-};
-
-static const unsigned short U[] = {
-/* 0x0000,0x0000,0x0000,0x8000,0x3fff, XPD */
-0x3453,0x1f8e,0xf688,0xb507,0x4004, XPD
-0x71ac,0xb12f,0x21ca,0xf2e2,0x4008, XPD
-0xffe8,0x9cac,0x3b84,0xc2ac,0x400c, XPD
-0x481d,0x445b,0xc807,0xc232,0x400f, XPD
-0x9ad5,0x1aef,0x45b1,0xe25e,0x4011, XPD
-0x71a7,0x1cad,0x012e,0xeef3,0x4012, XPD
-};
-
-/* expx2l.c
- *
- * Exponential of squared argument
- *
- *
- *
- * SYNOPSIS:
- *
- * long double x, y, expmx2l();
- * int sign;
- *
- * y = expx2l( x );
- *
- *
- *
- * DESCRIPTION:
- *
- * Computes y = exp(x*x) while suppressing error amplification
- * that would ordinarily arise from the inexactness of the
- * exponential argument x*x.
- *
- *
- *
- * ACCURACY:
- *
- * Relative error:
- * arithmetic domain # trials peak rms
- * IEEE -106.566, 106.566 10^5 1.6e-19 4.4e-20
- *
- */
-
-#define M 32768.0L
-#define MINV 3.0517578125e-5L
-
-static long double expx2l (long double x)
-{
- long double u, u1, m, f;
-
- x = fabsl (x);
- /* Represent x as an exact multiple of M plus a residual.
- M is a power of 2 chosen so that exp(m * m) does not overflow
- or underflow and so that |x - m| is small. */
- m = MINV * floorl(M * x + 0.5L);
- f = x - m;
-
- /* x^2 = m^2 + 2mf + f^2 */
- u = m * m;
- u1 = 2 * m * f + f * f;
-
- if ((u+u1) > MAXLOGL)
- return (INFINITYL);
-
- /* u is exact, u1 is small. */
- u = expl(u) * expl(u1);
- return(u);
-}
-
-long double erfcl(long double a)
-{
-long double p,q,x,y,z;
-
-if (isinf (a))
- return (signbit (a) ? 2.0 : 0.0);
-
-x = fabsl (a);
-
-if (x < 1.0L)
- return (1.0L - erfl(a));
-
-z = a * a;
-
-if( z > MAXLOGL )
- {
-under:
- mtherr( "erfcl", UNDERFLOW );
- errno = ERANGE;
- return (signbit (a) ? 2.0 : 0.0);
- }
-
-/* Compute z = expl(a * a). */
-z = expx2l (a);
-y = 1.0L/x;
-
-if (x < 8.0L)
- {
- p = polevll (y, P, 9);
- q = p1evll (y, Q, 10);
- }
-else
- {
- q = y * y;
- p = y * polevll (q, R, 4);
- q = p1evll (q, S, 5);
- }
-y = p/(q * z);
-
-if (a < 0.0L)
- y = 2.0L - y;
-
-if (y == 0.0L)
- goto under;
-
-return (y);
-}
-
-long double erfl(long double x)
-{
-long double y, z;
-
-if( x == 0.0L )
- return (x);
-
-if (isinf (x))
- return (signbit (x) ? -1.0L : 1.0L);
-
-if (fabsl(x) > 1.0L)
- return (1.0L - erfcl (x));
-
-z = x * x;
-y = x * polevll( z, T, 6 ) / p1evll( z, U, 6 );
-return( y );
-}
diff --git a/winsup/mingw/mingwex/math/exp2.S b/winsup/mingw/mingwex/math/exp2.S
deleted file mode 100644
index 3200657..0000000
--- a/winsup/mingw/mingwex/math/exp2.S
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Adapted for exp2 by Ulrich Drepper <drepper@cygnus.com>.
- * Public domain.
- */
-
- .file "exp2.S"
- .text
- .align 4
-.globl _exp2
- .def _exp2; .scl 2; .type 32; .endef
-_exp2:
- fldl 4(%esp)
-/* I added the following ugly construct because exp(+-Inf) resulted
- in NaN. The ugliness results from the bright minds at Intel.
- For the i686 the code can be written better.
- -- drepper@cygnus.com. */
- fxam /* Is NaN or +-Inf? */
- fstsw %ax
- movb $0x45, %dh
- andb %ah, %dh
- cmpb $0x05, %dh
- je 1f /* Is +-Inf, jump. */
- fld %st
- frndint /* int(x) */
- fsubr %st,%st(1) /* fract(x) */
- fxch
- f2xm1 /* 2^(fract(x)) - 1 */
- fld1
- faddp /* 2^(fract(x)) */
- fscale /* e^x */
- fstp %st(1)
- ret
-
-1: testl $0x200, %eax /* Test sign. */
- jz 2f /* If positive, jump. */
- fstp %st
- fldz /* Set result to 0. */
-2: ret
diff --git a/winsup/mingw/mingwex/math/exp2f.S b/winsup/mingw/mingwex/math/exp2f.S
deleted file mode 100644
index 0707a0c..0000000
--- a/winsup/mingw/mingwex/math/exp2f.S
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Adapted for exp2 by Ulrich Drepper <drepper@cygnus.com>.
- * Public domain.
- */
-
- .file "exp2f.S"
- .text
- .align 4
-.globl _exp2f
- .def _exp2f; .scl 2; .type 32; .endef
-_exp2f:
- flds 4(%esp)
-/* I added the following ugly construct because exp(+-Inf) resulted
- in NaN. The ugliness results from the bright minds at Intel.
- For the i686 the code can be written better.
- -- drepper@cygnus.com. */
- fxam /* Is NaN or +-Inf? */
- fstsw %ax
- movb $0x45, %dh
- andb %ah, %dh
- cmpb $0x05, %dh
- je 1f /* Is +-Inf, jump. */
- fld %st
- frndint /* int(x) */
- fsubr %st,%st(1) /* fract(x) */
- fxch
- f2xm1 /* 2^(fract(x)) - 1 */
- fld1
- faddp /* 2^(fract(x)) */
- fscale /* e^x */
- fstp %st(1)
- ret
-
-1: testl $0x200, %eax /* Test sign. */
- jz 2f /* If positive, jump. */
- fstp %st
- fldz /* Set result to 0. */
-2: ret
diff --git a/winsup/mingw/mingwex/math/exp2l.S b/winsup/mingw/mingwex/math/exp2l.S
deleted file mode 100644
index 2457c26..0000000
--- a/winsup/mingw/mingwex/math/exp2l.S
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Adapted for exp2 by Ulrich Drepper <drepper@cygnus.com>.
- * Public domain.
- */
-
- .file "exp2l.S"
- .text
- .align 4
-.globl _exp2l
- .def _exp2l; .scl 2; .type 32; .endef
-_exp2l:
- fldt 4(%esp)
-/* I added the following ugly construct because exp(+-Inf) resulted
- in NaN. The ugliness results from the bright minds at Intel.
- For the i686 the code can be written better.
- -- drepper@cygnus.com. */
- fxam /* Is NaN or +-Inf? */
- fstsw %ax
- movb $0x45, %dh
- andb %ah, %dh
- cmpb $0x05, %dh
- je 1f /* Is +-Inf, jump. */
- fld %st
- frndint /* int(x) */
- fsubr %st,%st(1) /* fract(x) */
- fxch
- f2xm1 /* 2^(fract(x)) - 1 */
- fld1
- faddp /* 2^(fract(x)) */
- fscale /* e^x */
- fstp %st(1)
- ret
-
-1: testl $0x200, %eax /* Test sign. */
- jz 2f /* If positive, jump. */
- fstp %st
- fldz /* Set result to 0. */
-2: ret
diff --git a/winsup/mingw/mingwex/math/expf.c b/winsup/mingw/mingwex/math/expf.c
deleted file mode 100644
index e56e0bc..0000000
--- a/winsup/mingw/mingwex/math/expf.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <math.h>
-float expf (float x)
- {return (float) exp (x);}
diff --git a/winsup/mingw/mingwex/math/expl.c b/winsup/mingw/mingwex/math/expl.c
deleted file mode 100644
index 9731a90..0000000
--- a/winsup/mingw/mingwex/math/expl.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
- */
-
-/*
- * The 8087 method for the exponential function is to calculate
- * exp(x) = 2^(x log2(e))
- * after separating integer and fractional parts
- * x log2(e) = i + f, |f| <= .5
- * 2^i is immediate but f needs to be precise for long double accuracy.
- * Suppress range reduction error in computing f by the following.
- * Separate x into integer and fractional parts
- * x = xi + xf, |xf| <= .5
- * Separate log2(e) into the sum of an exact number c0 and small part c1.
- * c0 + c1 = log2(e) to extra precision
- * Then
- * f = (c0 xi - i) + c0 xf + c1 x
- * where c0 xi is exact and so also is (c0 xi - i).
- * -- moshier@na-net.ornl.gov
- */
-
-#include <math.h>
-#include "cephes_mconf.h" /* for max and min log thresholds */
-
-static long double c0 = 1.44268798828125L;
-static long double c1 = 7.05260771340735992468e-6L;
-
-static long double
-__expl (long double x)
-{
- long double res;
- asm ("fldl2e\n\t" /* 1 log2(e) */
- "fmul %%st(1),%%st\n\t" /* 1 x log2(e) */
- "frndint\n\t" /* 1 i */
- "fld %%st(1)\n\t" /* 2 x */
- "frndint\n\t" /* 2 xi */
- "fld %%st(1)\n\t" /* 3 i */
- "fldt %2\n\t" /* 4 c0 */
- "fld %%st(2)\n\t" /* 5 xi */
- "fmul %%st(1),%%st\n\t" /* 5 c0 xi */
- "fsubp %%st,%%st(2)\n\t" /* 4 f = c0 xi - i */
- "fld %%st(4)\n\t" /* 5 x */
- "fsub %%st(3),%%st\n\t" /* 5 xf = x - xi */
- "fmulp %%st,%%st(1)\n\t" /* 4 c0 xf */
- "faddp %%st,%%st(1)\n\t" /* 3 f = f + c0 xf */
- "fldt %3\n\t" /* 4 */
- "fmul %%st(4),%%st\n\t" /* 4 c1 * x */
- "faddp %%st,%%st(1)\n\t" /* 3 f = f + c1 * x */
- "f2xm1\n\t" /* 3 2^(fract(x * log2(e))) - 1 */
- "fld1\n\t" /* 4 1.0 */
- "faddp\n\t" /* 3 2^(fract(x * log2(e))) */
- "fstp %%st(1)\n\t" /* 2 */
- "fscale\n\t" /* 2 scale factor is st(1); e^x */
- "fstp %%st(1)\n\t" /* 1 */
- "fstp %%st(1)\n\t" /* 0 */
- : "=t" (res) : "0" (x), "m" (c0), "m" (c1) : "ax", "dx");
- return res;
-}
-
-long double expl (long double x)
-{
- if (x > MAXLOGL)
- return INFINITY;
- else if (x < MINLOGL)
- return 0.0L;
- else
- return __expl (x);
-}
diff --git a/winsup/mingw/mingwex/math/expm1.c b/winsup/mingw/mingwex/math/expm1.c
deleted file mode 100755
index 4b2f439..0000000
--- a/winsup/mingw/mingwex/math/expm1.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Written 2005 by Gregory W. Chicares <chicares@cox.net>.
- * Adapted to double by Danny Smith <dannysmith@users.sourceforge.net>.
- * Public domain.
- *
- * F2XM1's input is constrained to (-1, +1), so the domain of
- * 'x * LOG2EL' is (-LOGE2L, +LOGE2L). Outside that domain,
- * delegating to exp() handles C99 7.12.6.3/2 range errors.
- *
- * Constants from moshier.net, file cephes/ldouble/constl.c,
- * are used instead of M_LN2 and M_LOG2E, which would not be
- * visible with 'gcc std=c99'. The use of these extended precision
- * constants also allows gcc to replace them with x87 opcodes.
- */
-
-#include <math.h> /* expl() */
-#include "cephes_mconf.h"
-double expm1 (double x)
-{
- if (fabs(x) < LOGE2L)
- {
- x *= LOG2EL;
- __asm__("f2xm1" : "=t" (x) : "0" (x));
- return x;
- }
- else
- return exp(x) - 1.0;
-}
diff --git a/winsup/mingw/mingwex/math/expm1f.c b/winsup/mingw/mingwex/math/expm1f.c
deleted file mode 100755
index e38665c..0000000
--- a/winsup/mingw/mingwex/math/expm1f.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Written 2005 by Gregory W. Chicares <chicares@cox.net>.
- * Adapted to float by Danny Smith <dannysmith@users.sourceforge.net>.
- * Public domain.
- *
- * F2XM1's input is constrained to (-1, +1), so the domain of
- * 'x * LOG2EL' is (-LOGE2L, +LOGE2L). Outside that domain,
- * delegating to exp() handles C99 7.12.6.3/2 range errors.
- *
- * Constants from moshier.net, file cephes/ldouble/constl.c,
- * are used instead of M_LN2 and M_LOG2E, which would not be
- * visible with 'gcc std=c99'. The use of these extended precision
- * constants also allows gcc to replace them with x87 opcodes.
- */
-
-#include <math.h> /* expl() */
-#include "cephes_mconf.h"
-
-float expm1f (float x)
-{
- if (fabsf(x) < LOGE2L)
- {
- x *= LOG2EL;
- __asm__("f2xm1" : "=t" (x) : "0" (x));
- return x;
- }
- else
- return expf(x) - 1.0F;
-}
diff --git a/winsup/mingw/mingwex/math/expm1l.c b/winsup/mingw/mingwex/math/expm1l.c
deleted file mode 100755
index 69fe8e5..0000000
--- a/winsup/mingw/mingwex/math/expm1l.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Written 2005 by Gregory W. Chicares <chicares@cox.net> with
- * help from Danny Smith. dannysmith@users.sourceforge.net>.
- * Public domain.
- *
- * F2XM1's input is constrained to (-1, +1), so the domain of
- * 'x * LOG2EL' is (-LOGE2L, +LOGE2L). Outside that domain,
- * delegating to expl() handles C99 7.12.6.3/2 range errors.
- *
- * Constants from moshier.net, file cephes/ldouble/constl.c,
- * are used instead of M_LN2 and M_LOG2E, which would not be
- * visible with 'gcc std=c99'. The use of these extended precision
- * constants also allows gcc to replace them with x87 opcodes.
- */
-
-#include <math.h> /* expl() */
-#include "cephes_mconf.h"
-
-long double expm1l (long double x)
-{
- if (fabsl(x) < LOGE2L)
- {
- x *= LOG2EL;
- __asm__("f2xm1" : "=t" (x) : "0" (x));
- return x;
- }
- else
- return expl(x) - 1.0L;
-}
diff --git a/winsup/mingw/mingwex/math/fabs.c b/winsup/mingw/mingwex/math/fabs.c
deleted file mode 100644
index c2074e8..0000000
--- a/winsup/mingw/mingwex/math/fabs.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <math.h>
-
-double
-fabs (double x)
-{
- double res;
-
- asm ("fabs;" : "=t" (res) : "0" (x));
- return res;
-}
diff --git a/winsup/mingw/mingwex/math/fabsf.c b/winsup/mingw/mingwex/math/fabsf.c
deleted file mode 100644
index 6580f95..0000000
--- a/winsup/mingw/mingwex/math/fabsf.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <math.h>
-
-float
-fabsf (float x)
-{
- float res;
- asm ("fabs;" : "=t" (res) : "0" (x));
- return res;
-}
diff --git a/winsup/mingw/mingwex/math/fabsl.c b/winsup/mingw/mingwex/math/fabsl.c
deleted file mode 100644
index eead724..0000000
--- a/winsup/mingw/mingwex/math/fabsl.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <math.h>
-
-long double
-fabsl (long double x)
-{
- long double res;
- asm ("fabs;" : "=t" (res) : "0" (x));
- return res;
-}
diff --git a/winsup/mingw/mingwex/math/fastmath.h b/winsup/mingw/mingwex/math/fastmath.h
deleted file mode 100755
index 01b06b3..0000000
--- a/winsup/mingw/mingwex/math/fastmath.h
+++ /dev/null
@@ -1,115 +0,0 @@
-#ifndef _MINGWEX_FASTMATH_H_
-#define _MINGWEX_FASTMATH_H_
-
-/* Fast math inlines
- No range or domain checks. No setting of errno. No tweaks to
- protect precision near range limits. */
-
-/* For now this is an internal header with just the functions that
- are currently used in building libmingwex.a math components */
-
-/* FIXME: We really should get rid of the code duplication using euther
- C++ templates or tgmath-type macros. */
-
-static __inline__ double __fast_sqrt (double x)
-{
- double res;
- asm __volatile__ ("fsqrt" : "=t" (res) : "0" (x));
- return res;
-}
-
-static __inline__ long double __fast_sqrtl (long double x)
-{
- long double res;
- asm __volatile__ ("fsqrt" : "=t" (res) : "0" (x));
- return res;
-}
-
-static __inline__ float __fast_sqrtf (float x)
-{
- float res;
- asm __volatile__ ("fsqrt" : "=t" (res) : "0" (x));
- return res;
-}
-
-
-static __inline__ double __fast_log (double x)
-{
- double res;
- asm __volatile__
- ("fldln2\n\t"
- "fxch\n\t"
- "fyl2x"
- : "=t" (res) : "0" (x) : "st(1)");
- return res;
-}
-
-static __inline__ long double __fast_logl (long double x)
-{
- long double res;
- asm __volatile__
- ("fldln2\n\t"
- "fxch\n\t"
- "fyl2x"
- : "=t" (res) : "0" (x) : "st(1)");
- return res;
-}
-
-
-static __inline__ float __fast_logf (float x)
-{
- float res;
- asm __volatile__
- ("fldln2\n\t"
- "fxch\n\t"
- "fyl2x"
- : "=t" (res) : "0" (x) : "st(1)");
- return res;
-}
-
-static __inline__ double __fast_log1p (double x)
-{
- double res;
- /* fyl2xp1 accurate only for |x| <= 1.0 - 0.5 * sqrt (2.0) */
- if (fabs (x) >= 1.0 - 0.5 * 1.41421356237309504880)
- res = __fast_log (1.0 + x);
- else
- asm __volatile__
- ("fldln2\n\t"
- "fxch\n\t"
- "fyl2xp1"
- : "=t" (res) : "0" (x) : "st(1)");
- return res;
-}
-
-static __inline__ long double __fast_log1pl (long double x)
-{
- long double res;
- /* fyl2xp1 accurate only for |x| <= 1.0 - 0.5 * sqrt (2.0) */
- if (fabsl (x) >= 1.0L - 0.5L * 1.41421356237309504880L)
- res = __fast_logl (1.0L + x);
- else
- asm __volatile__
- ("fldln2\n\t"
- "fxch\n\t"
- "fyl2xp1"
- : "=t" (res) : "0" (x) : "st(1)");
- return res;
-}
-
-static __inline__ float __fast_log1pf (float x)
-{
- float res;
- /* fyl2xp1 accurate only for |x| <= 1.0 - 0.5 * sqrt (2.0) */
- if (fabsf (x) >= 1.0 - 0.5 * 1.41421356237309504880)
- res = __fast_logf (1.0 + x);
- else
- asm __volatile__
- ("fldln2\n\t"
- "fxch\n\t"
- "fyl2xp1"
- : "=t" (res) : "0" (x) : "st(1)");
- return res;
-}
-
-#endif
diff --git a/winsup/mingw/mingwex/math/fdim.c b/winsup/mingw/mingwex/math/fdim.c
deleted file mode 100644
index 330b092..0000000
--- a/winsup/mingw/mingwex/math/fdim.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <math.h>
-
-double
-fdim (double x, double y)
-{
- return (isgreater(x, y) ? (x - y) : 0.0);
-}
diff --git a/winsup/mingw/mingwex/math/fdimf.c b/winsup/mingw/mingwex/math/fdimf.c
deleted file mode 100644
index 02bfc6e..0000000
--- a/winsup/mingw/mingwex/math/fdimf.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <math.h>
-
-float
-fdimf (float x, float y)
-{
- return (isgreater(x, y) ? (x - y) : 0.0F);
-}
diff --git a/winsup/mingw/mingwex/math/fdiml.c b/winsup/mingw/mingwex/math/fdiml.c
deleted file mode 100644
index 1c3d0aa..0000000
--- a/winsup/mingw/mingwex/math/fdiml.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <math.h>
-
-long double
-fdiml (long double x, long double y)
-{
- return (isgreater(x, y) ? (x - y) : 0.0L);
-}
diff --git a/winsup/mingw/mingwex/math/floorf.S b/winsup/mingw/mingwex/math/floorf.S
deleted file mode 100644
index 8ae8100..0000000
--- a/winsup/mingw/mingwex/math/floorf.S
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- * Changes for long double by Ulrich Drepper <drepper@cygnus.com>
- *
- * Removed header file dependency for use in libmingwex.a by
- * Danny Smith <dannysmith@users.sourceforge.net>
- */
- .file "floorf.S"
- .text
- .align 4
-.globl _floorf
- .def _floorf; .scl 2; .type 32; .endef
-_floorf:
- flds 4(%esp)
- subl $8,%esp
-
- fstcw 4(%esp) /* store fpu control word */
-
- /* We use here %edx although only the low 1 bits are defined.
- But none of the operations should care and they are faster
- than the 16 bit operations. */
- movl $0x400,%edx /* round towards -oo */
- orl 4(%esp),%edx
- andl $0xf7ff,%edx
- movl %edx,(%esp)
- fldcw (%esp) /* load modified control word */
-
- frndint /* round */
-
- fldcw 4(%esp) /* restore original control word */
-
- addl $8,%esp
- ret
diff --git a/winsup/mingw/mingwex/math/floorl.S b/winsup/mingw/mingwex/math/floorl.S
deleted file mode 100644
index 5ab9214..0000000
--- a/winsup/mingw/mingwex/math/floorl.S
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- * Changes for long double by Ulrich Drepper <drepper@cygnus.com>
- *
- */
- .file "floorl.S"
- .text
- .align 4
-.globl _floorl
- .def _floorl; .scl 2; .type 32; .endef
-_floorl:
- fldt 4(%esp)
- subl $8,%esp
-
- fstcw 4(%esp) /* store fpu control word */
-
- /* We use here %edx although only the low 1 bits are defined.
- But none of the operations should care and they are faster
- than the 16 bit operations. */
- movl $0x400,%edx /* round towards -oo */
- orl 4(%esp),%edx
- andl $0xf7ff,%edx
- movl %edx,(%esp)
- fldcw (%esp) /* load modified control word */
-
- frndint /* round */
-
- fldcw 4(%esp) /* restore original control word */
-
- addl $8,%esp
- ret
diff --git a/winsup/mingw/mingwex/math/fma.S b/winsup/mingw/mingwex/math/fma.S
deleted file mode 100644
index d622665..0000000
--- a/winsup/mingw/mingwex/math/fma.S
+++ /dev/null
@@ -1,12 +0,0 @@
- .file "fma.S"
- .text
- .align 2
- .p2align 4,,15
-.globl _fma
- .def _fma; .scl 2; .type 32; .endef
-_fma:
- fldl 4(%esp)
- fmull 12(%esp)
- fldl 20(%esp)
- faddp
- ret
diff --git a/winsup/mingw/mingwex/math/fmaf.S b/winsup/mingw/mingwex/math/fmaf.S
deleted file mode 100644
index 0d64ac2..0000000
--- a/winsup/mingw/mingwex/math/fmaf.S
+++ /dev/null
@@ -1,12 +0,0 @@
- .file "fmaf.S"
- .text
- .align 2
- .p2align 4,,15
-.globl _fmaf
- .def _fmaf; .scl 2; .type 32; .endef
-_fmaf:
- flds 4(%esp)
- fmuls 8(%esp)
- flds 12(%esp)
- faddp
- ret
diff --git a/winsup/mingw/mingwex/math/fmal.c b/winsup/mingw/mingwex/math/fmal.c
deleted file mode 100644
index 1fbd41d..0000000
--- a/winsup/mingw/mingwex/math/fmal.c
+++ /dev/null
@@ -1,5 +0,0 @@
-long double
-fmal ( long double _x, long double _y, long double _z)
-{
- return ((_x * _y) + _z);
-}
diff --git a/winsup/mingw/mingwex/math/fmax.c b/winsup/mingw/mingwex/math/fmax.c
deleted file mode 100644
index 35c1f45..0000000
--- a/winsup/mingw/mingwex/math/fmax.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <math.h>
-
-double
-fmax (double _x, double _y)
-{
- return ( isgreaterequal (_x, _y)|| __isnan (_y) ? _x : _y );
-}
diff --git a/winsup/mingw/mingwex/math/fmaxf.c b/winsup/mingw/mingwex/math/fmaxf.c
deleted file mode 100644
index 079a7e7..0000000
--- a/winsup/mingw/mingwex/math/fmaxf.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <math.h>
-
-float
-fmaxf (float _x, float _y)
-{
- return (( isgreaterequal(_x, _y) || __isnanf (_y)) ? _x : _y );
-}
diff --git a/winsup/mingw/mingwex/math/fmaxl.c b/winsup/mingw/mingwex/math/fmaxl.c
deleted file mode 100644
index 4e38da4..0000000
--- a/winsup/mingw/mingwex/math/fmaxl.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <math.h>
-
-long double
-fmaxl (long double _x, long double _y)
-{
- return (( isgreaterequal(_x, _y) || __isnanl (_y)) ? _x : _y );
-}
diff --git a/winsup/mingw/mingwex/math/fmin.c b/winsup/mingw/mingwex/math/fmin.c
deleted file mode 100644
index 96a6ed1..0000000
--- a/winsup/mingw/mingwex/math/fmin.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <math.h>
-
-double
-fmin (double _x, double _y)
-{
- return ((islessequal(_x, _y) || __isnan (_y)) ? _x : _y );
-}
diff --git a/winsup/mingw/mingwex/math/fminf.c b/winsup/mingw/mingwex/math/fminf.c
deleted file mode 100644
index f3d7148..0000000
--- a/winsup/mingw/mingwex/math/fminf.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <math.h>
-
-float
-fminf (float _x, float _y)
-{
- return ((islessequal(_x, _y) || _isnan (_y)) ? _x : _y );
-}
diff --git a/winsup/mingw/mingwex/math/fminl.c b/winsup/mingw/mingwex/math/fminl.c
deleted file mode 100644
index d8a3fea..0000000
--- a/winsup/mingw/mingwex/math/fminl.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <math.h>
-
-long double
-fminl (long double _x, long double _y)
-{
- return ((islessequal(_x, _y) || __isnanl (_y)) ? _x : _y );
-}
diff --git a/winsup/mingw/mingwex/math/fmodf.c b/winsup/mingw/mingwex/math/fmodf.c
deleted file mode 100644
index 6405d72..0000000
--- a/winsup/mingw/mingwex/math/fmodf.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- * Adapted for float type by Danny Smith
- * <dannysmith@users.sourceforge.net>.
- */
-
-#include <math.h>
-
-float
-fmodf (float x, float y)
-{
- float res;
-
- asm ("1:\tfprem\n\t"
- "fstsw %%ax\n\t"
- "sahf\n\t"
- "jp 1b\n\t"
- "fstp %%st(1)"
- : "=t" (res) : "0" (x), "u" (y) : "ax", "st(1)");
- return res;
-}
diff --git a/winsup/mingw/mingwex/math/fmodl.c b/winsup/mingw/mingwex/math/fmodl.c
deleted file mode 100644
index f1c97f1..0000000
--- a/winsup/mingw/mingwex/math/fmodl.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
- */
-
-#include <math.h>
-
-long double
-fmodl (long double x, long double y)
-{
- long double res;
-
- asm ("1:\tfprem\n\t"
- "fstsw %%ax\n\t"
- "sahf\n\t"
- "jp 1b\n\t"
- "fstp %%st(1)"
- : "=t" (res) : "0" (x), "u" (y) : "ax", "st(1)");
- return res;
-}
diff --git a/winsup/mingw/mingwex/math/fp_consts.c b/winsup/mingw/mingwex/math/fp_consts.c
deleted file mode 100644
index 285c9d7..0000000
--- a/winsup/mingw/mingwex/math/fp_consts.c
+++ /dev/null
@@ -1,14 +0,0 @@
-
-#include "fp_consts.h"
-const union _ieee_rep __QNAN = { __DOUBLE_QNAN_REP };
-const union _ieee_rep __SNAN = { __DOUBLE_SNAN_REP };
-const union _ieee_rep __INF = { __DOUBLE_INF_REP };
-const union _ieee_rep __DENORM = { __DOUBLE_DENORM_REP };
-
-/* ISO C99 */
-#undef nan
-/* FIXME */
-double nan (const char * tagp __attribute__((unused)) )
- { return __QNAN.double_val; }
-
-
diff --git a/winsup/mingw/mingwex/math/fp_consts.h b/winsup/mingw/mingwex/math/fp_consts.h
deleted file mode 100644
index 2493395..0000000
--- a/winsup/mingw/mingwex/math/fp_consts.h
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef _FP_CONSTS_H
-#define _FP_CONSTS_H
-
-/*
-According to IEEE 754 a QNaN has exponent bits of all 1 values and
-initial significand bit of 1. A SNaN has has an exponent of all 1
-values and initial significand bit of 0 (with one or more other
-significand bits of 1). An Inf has significand of 0 and
-exponent of all 1 values. A denormal value has all exponent bits of 0.
-
-The following does _not_ follow those rules, but uses values
-equal to those exported from MS C++ runtime lib, msvcprt.dll
-for float and double. MSVC however, does not have long doubles.
-*/
-
-
-#define __DOUBLE_INF_REP { 0, 0, 0, 0x7ff0 }
-#define __DOUBLE_QNAN_REP { 0, 0, 0, 0xfff8 } /* { 0, 0, 0, 0x7ff8 } */
-#define __DOUBLE_SNAN_REP { 0, 0, 0, 0xfff0 } /* { 1, 0, 0, 0x7ff0 } */
-#define __DOUBLE_DENORM_REP {1, 0, 0, 0}
-
-#define D_NAN_MASK 0x7ff0000000000000LL /* this will mask NaN's and Inf's */
-
-#define __FLOAT_INF_REP { 0, 0x7f80 }
-#define __FLOAT_QNAN_REP { 0, 0xffc0 } /* { 0, 0x7fc0 } */
-#define __FLOAT_SNAN_REP { 0, 0xff80 } /* { 1, 0x7f80 } */
-#define __FLOAT_DENORM_REP {1,0}
-
-#define F_NAN_MASK 0x7f800000
-
-/*
- This assumes no implicit (hidden) bit in extended mode.
- Padded to 96 bits
- */
-#define __LONG_DOUBLE_INF_REP { 0, 0, 0, 0x8000, 0x7fff, 0 }
-#define __LONG_DOUBLE_QNAN_REP { 0, 0, 0, 0xc000, 0xffff, 0 }
-#define __LONG_DOUBLE_SNAN_REP { 0, 0, 0, 0x8000, 0xffff, 0 }
-#define __LONG_DOUBLE_DENORM_REP {1, 0, 0, 0, 0, 0}
-
-union _ieee_rep
-{
- unsigned short rep[6];
- float float_val;
- double double_val;
- long double ldouble_val;
-} ;
-
-#endif
diff --git a/winsup/mingw/mingwex/math/fp_constsf.c b/winsup/mingw/mingwex/math/fp_constsf.c
deleted file mode 100644
index 5a4afef..0000000
--- a/winsup/mingw/mingwex/math/fp_constsf.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "fp_consts.h"
-
-const union _ieee_rep __QNANF = { __FLOAT_QNAN_REP };
-const union _ieee_rep __SNANF = { __FLOAT_SNAN_REP };
-const union _ieee_rep __INFF = { __FLOAT_INF_REP };
-const union _ieee_rep __DENORMF = { __FLOAT_DENORM_REP };
-
-/* ISO C99 */
-#undef nanf
-/* FIXME */
-float nanf(const char * tagp __attribute__((unused)) )
- { return __QNANF.float_val;}
diff --git a/winsup/mingw/mingwex/math/fp_constsl.c b/winsup/mingw/mingwex/math/fp_constsl.c
deleted file mode 100644
index 44fdb7f..0000000
--- a/winsup/mingw/mingwex/math/fp_constsl.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "fp_consts.h"
-
-const union _ieee_rep __QNANL = { __LONG_DOUBLE_QNAN_REP };
-const union _ieee_rep __SNANL = { __LONG_DOUBLE_SNAN_REP };
-const union _ieee_rep __INFL = { __LONG_DOUBLE_INF_REP };
-const union _ieee_rep __DENORML = { __LONG_DOUBLE_DENORM_REP };
-
-
-#undef nanl
-/* FIXME */
-long double nanl (const char * tagp __attribute__((unused)) )
- { return __QNANL.ldouble_val; }
diff --git a/winsup/mingw/mingwex/math/fpclassify.c b/winsup/mingw/mingwex/math/fpclassify.c
deleted file mode 100644
index f8cd8cb..0000000
--- a/winsup/mingw/mingwex/math/fpclassify.c
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <math.h>
-
-/* 'fxam' sets FPU flags C3,C2,C0 'fstsw' stores:
- FP_NAN 001 0x0100
- FP_NORMAL 010 0x0400
- FP_INFINITE 011 0x0500
- FP_ZERO 100 0x4000
- FP_SUBNORMAL 110 0x4400
-
-and sets C1 flag (signbit) if neg */
-
-int __fpclassify (double _x){
- unsigned short sw;
- __asm__ (
- "fxam; fstsw %%ax;"
- : "=a" (sw)
- : "t" (_x)
- );
- return sw & (FP_NAN | FP_NORMAL | FP_ZERO );
-}
diff --git a/winsup/mingw/mingwex/math/fpclassifyf.c b/winsup/mingw/mingwex/math/fpclassifyf.c
deleted file mode 100644
index aca4e59..0000000
--- a/winsup/mingw/mingwex/math/fpclassifyf.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <math.h>
-int __fpclassifyf (float _x){
- unsigned short sw;
- __asm__ (
- "fxam; fstsw %%ax;"
- : "=a" (sw)
- : "t" (_x)
- );
- return sw & (FP_NAN | FP_NORMAL | FP_ZERO );
-}
diff --git a/winsup/mingw/mingwex/math/fpclassifyl.c b/winsup/mingw/mingwex/math/fpclassifyl.c
deleted file mode 100644
index 9979d62..0000000
--- a/winsup/mingw/mingwex/math/fpclassifyl.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <math.h>
-int __fpclassifyl (long double _x){
- unsigned short sw;
- __asm__ (
- "fxam; fstsw %%ax;"
- : "=a" (sw)
- : "t" (_x)
- );
- return sw & (FP_NAN | FP_NORMAL | FP_ZERO );
-}
diff --git a/winsup/mingw/mingwex/math/frexpf.c b/winsup/mingw/mingwex/math/frexpf.c
deleted file mode 100644
index df262ab..0000000
--- a/winsup/mingw/mingwex/math/frexpf.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <math.h>
-float frexpf (float x, int* expn)
- {return (float)frexp(x, expn);}
diff --git a/winsup/mingw/mingwex/math/frexpl.S b/winsup/mingw/mingwex/math/frexpl.S
deleted file mode 100644
index 2b691c8..0000000
--- a/winsup/mingw/mingwex/math/frexpl.S
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- Cephes Math Library Release 2.7: May, 1998
- Copyright 1984, 1987, 1988, 1992, 1998 by Stephen L. Moshier
-
- Extracted from floorl.387 for use in libmingwex.a by
- Danny Smith <dannysmith@users.sourceforge.net>
- 2002-06-20
-*/
-
-/*
- * frexpl(long double x, int* expnt) extracts the exponent from x.
- * It returns an integer power of two to expnt and the significand
- * between 0.5 and 1 to y. Thus x = y * 2**expn.
- */
- .align 2
-.globl _frexpl
-_frexpl:
- pushl %ebp
- movl %esp,%ebp
- subl $24,%esp
- pushl %esi
- pushl %ebx
- fldt 8(%ebp)
- movl 20(%ebp),%ebx
- fld %st(0)
- fstpt -12(%ebp)
- leal -4(%ebp),%ecx
- movw -4(%ebp),%dx
- andl $32767,%edx
- jne L25
- fldz
- fucompp
- fnstsw %ax
- andb $68,%ah
- xorb $64,%ah
- jne L21
- movl $0,(%ebx)
- fldz
- jmp L24
- .align 2,0x90
- .align 2,0x90
-L21:
- fldt -12(%ebp)
- fadd %st(0),%st
- fstpt -12(%ebp)
- decl %edx
- movw (%ecx),%si
- andl $32767,%esi
- jne L22
- cmpl $-66,%edx
- jg L21
-L22:
- addl %esi,%edx
- jmp L19
- .align 2,0x90
-L25:
- fstp %st(0)
-L19:
- addl $-16382,%edx
- movl %edx,(%ebx)
- movw (%ecx),%ax
- andl $-32768,%eax
- orl $16382,%eax
- movw %ax,(%ecx)
- fldt -12(%ebp)
-L24:
- leal -32(%ebp),%esp
- popl %ebx
- popl %esi
- leave
- ret
diff --git a/winsup/mingw/mingwex/math/fucom.c b/winsup/mingw/mingwex/math/fucom.c
deleted file mode 100644
index 80c9372..0000000
--- a/winsup/mingw/mingwex/math/fucom.c
+++ /dev/null
@@ -1,11 +0,0 @@
-int
-__fp_unordered_compare (long double x, long double y){
- unsigned short retval;
- __asm__ (
- "fucom %%st(1);"
- "fnstsw;"
- : "=a" (retval)
- : "t" (x), "u" (y)
- );
- return retval;
-}
diff --git a/winsup/mingw/mingwex/math/hypotf.c b/winsup/mingw/mingwex/math/hypotf.c
deleted file mode 100644
index ee67a45..0000000
--- a/winsup/mingw/mingwex/math/hypotf.c
+++ /dev/null
@@ -1,4 +0,0 @@
-#include <math.h>
-
-float hypotf (float x, float y)
- { return (float) _hypot (x, y);}
diff --git a/winsup/mingw/mingwex/math/hypotl.c b/winsup/mingw/mingwex/math/hypotl.c
deleted file mode 100644
index 2a25b82..0000000
--- a/winsup/mingw/mingwex/math/hypotl.c
+++ /dev/null
@@ -1,73 +0,0 @@
-#include <math.h>
-#include <float.h>
-#include <errno.h>
-
-/*
-This implementation is based largely on Cephes library
-function cabsl (cmplxl.c), which bears the following notice:
-
-Cephes Math Library Release 2.1: January, 1989
-Copyright 1984, 1987, 1989 by Stephen L. Moshier
-Direct inquiries to 30 Frost Street, Cambridge, MA 02140
-*/
-
-/*
- Modified for use in libmingwex.a
- 02 Sept 2002 Danny Smith <dannysmith@users.sourceforege.net>
- Calls to ldexpl replaced by logbl and calls to frexpl replaced
- by scalbnl to avoid duplicated range checks.
-*/
-
-extern long double __INFL;
-#define PRECL 32
-
-long double
-hypotl (long double x, long double y)
-{
- int exx;
- int eyy;
- int scale;
- long double xx =fabsl(x);
- long double yy =fabsl(y);
- if (!isfinite(xx) || !isfinite(yy))
- return xx + yy; /* Return INF or NAN. */
-
- if (xx == 0.0L)
- return yy;
- if (yy == 0.0L)
- return xx;
-
- /* Get exponents */
- exx = logbl (xx);
- eyy = logbl (yy);
-
- /* Check if large differences in scale */
- scale = exx - eyy;
- if ( scale > PRECL)
- return xx;
- if ( scale < -PRECL)
- return yy;
-
- /* Exponent of approximate geometric mean (x 2) */
- scale = (exx + eyy) >> 1;
-
- /* Rescale: Geometric mean is now about 2 */
- x = scalbnl(xx, -scale);
- y = scalbnl(yy, -scale);
-
- xx = sqrtl(x * x + y * y);
-
- /* Check for overflow and underflow */
- exx = logbl(xx);
- exx += scale;
- if (exx > LDBL_MAX_EXP)
- {
- errno = ERANGE;
- return __INFL;
- }
- if (exx < LDBL_MIN_EXP)
- return 0.0L;
-
- /* Undo scaling */
- return (scalbnl (xx, scale));
-}
diff --git a/winsup/mingw/mingwex/math/ilogb.S b/winsup/mingw/mingwex/math/ilogb.S
deleted file mode 100644
index 2335b51..0000000
--- a/winsup/mingw/mingwex/math/ilogb.S
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- */
-
-
- .file "ilogb.S"
- .text
- .align 4
-.globl _ilogb
- .def _ilogb; .scl 2; .type 32; .endef
-_ilogb:
-
- fldl 4(%esp)
-/* I added the following ugly construct because ilogb(+-Inf) is
- required to return INT_MAX in ISO C99.
- -- jakub@redhat.com. */
- fxam /* Is NaN or +-Inf? */
- fstsw %ax
- movb $0x45, %dh
- andb %ah, %dh
- cmpb $0x05, %dh
- je 1f /* Is +-Inf, jump. */
-
- fxtract
- pushl %eax
- fstp %st
-
- fistpl (%esp)
- fwait
- popl %eax
-
- ret
-
-1: fstp %st
- movl $0x7fffffff, %eax
- ret
diff --git a/winsup/mingw/mingwex/math/ilogbf.S b/winsup/mingw/mingwex/math/ilogbf.S
deleted file mode 100644
index fa3e78e..0000000
--- a/winsup/mingw/mingwex/math/ilogbf.S
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- */
-
- .file "ilogbf.S"
- .text
- .align 4
-.globl _ilogbf
- .def _ilogbf; .scl 2; .type 32; .endef
-_ilogbf:
- flds 4(%esp)
-/* I added the following ugly construct because ilogb(+-Inf) is
- required to return INT_MAX in ISO C99.
- -- jakub@redhat.com. */
- fxam /* Is NaN or +-Inf? */
- fstsw %ax
- movb $0x45, %dh
- andb %ah, %dh
- cmpb $0x05, %dh
- je 1f /* Is +-Inf, jump. */
-
- fxtract
- pushl %eax
- fstp %st
-
- fistpl (%esp)
- fwait
- popl %eax
-
- ret
-
-1: fstp %st
- movl $0x7fffffff, %eax
- ret
diff --git a/winsup/mingw/mingwex/math/ilogbl.S b/winsup/mingw/mingwex/math/ilogbl.S
deleted file mode 100644
index b9dc6ea..0000000
--- a/winsup/mingw/mingwex/math/ilogbl.S
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Changes for long double by Ulrich Drepper <drepper@cygnus.com>
- * Public domain.
- */
-
- .file "ilogbl.S"
- .text
- .align 4
-.globl _ilogbl
- .def _ilogbl; .scl 2; .type 32; .endef
-_ilogbl:
- fldt 4(%esp)
-/* I added the following ugly construct because ilogb(+-Inf) is
- required to return INT_MAX in ISO C99.
- -- jakub@redhat.com. */
- fxam /* Is NaN or +-Inf? */
- fstsw %ax
- movb $0x45, %dh
- andb %ah, %dh
- cmpb $0x05, %dh
- je 1f /* Is +-Inf, jump. */
-
- fxtract
- pushl %eax
- fstp %st
-
- fistpl (%esp)
- fwait
- popl %eax
-
- ret
-
-1: fstp %st
- movl $0x7fffffff, %eax
- ret
diff --git a/winsup/mingw/mingwex/math/isnan.c b/winsup/mingw/mingwex/math/isnan.c
deleted file mode 100644
index b38bc29..0000000
--- a/winsup/mingw/mingwex/math/isnan.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <math.h>
-
-int
-__isnan (double _x)
-{
- unsigned short _sw;
- __asm__ ("fxam;"
- "fstsw %%ax": "=a" (_sw) : "t" (_x));
- return (_sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
- == FP_NAN;
-}
-
-#undef isnan
-int __attribute__ ((alias ("__isnan"))) isnan (double);
diff --git a/winsup/mingw/mingwex/math/isnanf.c b/winsup/mingw/mingwex/math/isnanf.c
deleted file mode 100644
index 73fe0eb..0000000
--- a/winsup/mingw/mingwex/math/isnanf.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include <math.h>
-int
-__isnanf (float _x)
-{
- unsigned short _sw;
- __asm__ ("fxam;"
- "fstsw %%ax": "=a" (_sw) : "t" (_x) );
- return (_sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
- == FP_NAN;
-}
-
-int __attribute__ ((alias ("__isnanf"))) isnanf (float);
diff --git a/winsup/mingw/mingwex/math/isnanl.c b/winsup/mingw/mingwex/math/isnanl.c
deleted file mode 100644
index 86d0088..0000000
--- a/winsup/mingw/mingwex/math/isnanl.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <math.h>
-
-int
-__isnanl (long double _x)
-{
- unsigned short _sw;
- __asm__ ("fxam;"
- "fstsw %%ax": "=a" (_sw) : "t" (_x));
- return (_sw & (FP_NAN | FP_NORMAL | FP_INFINITE | FP_ZERO | FP_SUBNORMAL))
- == FP_NAN;
-}
-
-int __attribute__ ((alias ("__isnanl"))) isnanl (long double);
diff --git a/winsup/mingw/mingwex/math/ldexpf.c b/winsup/mingw/mingwex/math/ldexpf.c
deleted file mode 100644
index 5d01a01..0000000
--- a/winsup/mingw/mingwex/math/ldexpf.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <math.h>
-float ldexpf (float x, int expn)
- {return (float) ldexp (x, expn);}
diff --git a/winsup/mingw/mingwex/math/ldexpl.c b/winsup/mingw/mingwex/math/ldexpl.c
deleted file mode 100644
index 19a3d56..0000000
--- a/winsup/mingw/mingwex/math/ldexpl.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <math.h>
-#include <errno.h>
-
-long double ldexpl(long double x, int expn)
-{
- long double res;
- if (!isfinite (x) || x == 0.0L)
- return x;
-
- __asm__ ("fscale"
- : "=t" (res)
- : "0" (x), "u" ((long double) expn));
-
- if (!isfinite (res) || res == 0.0L)
- errno = ERANGE;
-
- return res;
-}
-
diff --git a/winsup/mingw/mingwex/math/lgamma.c b/winsup/mingw/mingwex/math/lgamma.c
deleted file mode 100644
index b569f9a..0000000
--- a/winsup/mingw/mingwex/math/lgamma.c
+++ /dev/null
@@ -1,369 +0,0 @@
-/* lgam()
- *
- * Natural logarithm of gamma function
- *
- *
- *
- * SYNOPSIS:
- *
- * double x, y, __lgamma_r();
- * int* sgngam;
- * y = __lgamma_r( x, sgngam );
- *
- * double x, y, lgamma();
- * y = lgamma( x);
- *
- *
- *
- * DESCRIPTION:
- *
- * Returns the base e (2.718...) logarithm of the absolute
- * value of the gamma function of the argument. In the reentrant
- * version, the sign (+1 or -1) of the gamma function is returned
- * in the variable referenced by sgngam.
- *
- * For arguments greater than 13, the logarithm of the gamma
- * function is approximated by the logarithmic version of
- * Stirling's formula using a polynomial approximation of
- * degree 4. Arguments between -33 and +33 are reduced by
- * recurrence to the interval [2,3] of a rational approximation.
- * The cosecant reflection formula is employed for arguments
- * less than -33.
- *
- * Arguments greater than MAXLGM return MAXNUM and an error
- * message. MAXLGM = 2.035093e36 for DEC
- * arithmetic or 2.556348e305 for IEEE arithmetic.
- *
- *
- *
- * ACCURACY:
- *
- *
- * arithmetic domain # trials peak rms
- * DEC 0, 3 7000 5.2e-17 1.3e-17
- * DEC 2.718, 2.035e36 5000 3.9e-17 9.9e-18
- * IEEE 0, 3 28000 5.4e-16 1.1e-16
- * IEEE 2.718, 2.556e305 40000 3.5e-16 8.3e-17
- * The error criterion was relative when the function magnitude
- * was greater than one but absolute when it was less than one.
- *
- * The following test used the relative error criterion, though
- * at certain points the relative error could be much higher than
- * indicated.
- * IEEE -200, -4 10000 4.8e-16 1.3e-16
- *
- */
-
-/*
- * Cephes Math Library Release 2.8: June, 2000
- * Copyright 1984, 1987, 1989, 1992, 2000 by Stephen L. Moshier
- */
-
-/*
- * 26-11-2002 Modified for mingw.
- * Danny Smith <dannysmith@users.sourceforge.net>
- */
-
-
-#ifndef __MINGW32__
-#include "mconf.h"
-#ifdef ANSIPROT
-extern double pow ( double, double );
-extern double log ( double );
-extern double exp ( double );
-extern double sin ( double );
-extern double polevl ( double, void *, int );
-extern double p1evl ( double, void *, int );
-extern double floor ( double );
-extern double fabs ( double );
-extern int isnan ( double );
-extern int isfinite ( double );
-#else
-double pow(), log(), exp(), sin(), polevl(), p1evl(), floor(), fabs();
-int isnan(), isfinite();
-#endif
-#ifdef INFINITIES
-extern double INFINITY;
-#endif
-#ifdef NANS
-extern double NAN;
-#endif
-#else /* __MINGW32__ */
-#include "cephes_mconf.h"
-#endif /* __MINGW32__ */
-
-
-/* A[]: Stirling's formula expansion of log gamma
- * B[], C[]: log gamma function between 2 and 3
- */
-#ifdef UNK
-static double A[] = {
- 8.11614167470508450300E-4,
--5.95061904284301438324E-4,
- 7.93650340457716943945E-4,
--2.77777777730099687205E-3,
- 8.33333333333331927722E-2
-};
-static double B[] = {
--1.37825152569120859100E3,
--3.88016315134637840924E4,
--3.31612992738871184744E5,
--1.16237097492762307383E6,
--1.72173700820839662146E6,
--8.53555664245765465627E5
-};
-static double C[] = {
-/* 1.00000000000000000000E0, */
--3.51815701436523470549E2,
--1.70642106651881159223E4,
--2.20528590553854454839E5,
--1.13933444367982507207E6,
--2.53252307177582951285E6,
--2.01889141433532773231E6
-};
-/* log( sqrt( 2*pi ) ) */
-static double LS2PI = 0.91893853320467274178;
-#define MAXLGM 2.556348e305
-static double LOGPI = 1.14472988584940017414;
-#endif
-
-#ifdef DEC
-static const unsigned short A[] = {
-0035524,0141201,0034633,0031405,
-0135433,0176755,0126007,0045030,
-0035520,0006371,0003342,0172730,
-0136066,0005540,0132605,0026407,
-0037252,0125252,0125252,0125132
-};
-static const unsigned short B[] = {
-0142654,0044014,0077633,0035410,
-0144027,0110641,0125335,0144760,
-0144641,0165637,0142204,0047447,
-0145215,0162027,0146246,0155211,
-0145322,0026110,0010317,0110130,
-0145120,0061472,0120300,0025363
-};
-static const unsigned short C[] = {
-/*0040200,0000000,0000000,0000000*/
-0142257,0164150,0163630,0112622,
-0143605,0050153,0156116,0135272,
-0144527,0056045,0145642,0062332,
-0145213,0012063,0106250,0001025,
-0145432,0111254,0044577,0115142,
-0145366,0071133,0050217,0005122
-};
-/* log( sqrt( 2*pi ) ) */
-static const unsigned short LS2P[] = {040153,037616,041445,0172645,};
-#define LS2PI *(double *)LS2P
-#define MAXLGM 2.035093e36
-static const unsigned short LPI[4] = {
-0040222,0103202,0043475,0006750,
-};
-#define LOGPI *(double *)LPI
-
-#endif
-
-#ifdef IBMPC
-static const unsigned short A[] = {
-0x6661,0x2733,0x9850,0x3f4a,
-0xe943,0xb580,0x7fbd,0xbf43,
-0x5ebb,0x20dc,0x019f,0x3f4a,
-0xa5a1,0x16b0,0xc16c,0xbf66,
-0x554b,0x5555,0x5555,0x3fb5
-};
-static const unsigned short B[] = {
-0x6761,0x8ff3,0x8901,0xc095,
-0xb93e,0x355b,0xf234,0xc0e2,
-0x89e5,0xf890,0x3d73,0xc114,
-0xdb51,0xf994,0xbc82,0xc131,
-0xf20b,0x0219,0x4589,0xc13a,
-0x055e,0x5418,0x0c67,0xc12a
-};
-static const unsigned short C[] = {
-/*0x0000,0x0000,0x0000,0x3ff0,*/
-0x12b2,0x1cf3,0xfd0d,0xc075,
-0xd757,0x7b89,0xaa0d,0xc0d0,
-0x4c9b,0xb974,0xeb84,0xc10a,
-0x0043,0x7195,0x6286,0xc131,
-0xf34c,0x892f,0x5255,0xc143,
-0xe14a,0x6a11,0xce4b,0xc13e
-};
-/* log( sqrt( 2*pi ) ) */
-static const union
-{
- unsigned short s[4];
- double d;
-} ls2p = {{0xbeb5,0xc864,0x67f1,0x3fed}};
-#define LS2PI (ls2p.d)
-#define MAXLGM 2.556348e305
-/* log (pi) */
-static const union
-{
- unsigned short s[4];
- double d;
-} lpi = {{0xa1bd,0x48e7,0x50d0,0x3ff2}};
-#define LOGPI (lpi.d)
-#endif
-
-#ifdef MIEEE
-static const unsigned short A[] = {
-0x3f4a,0x9850,0x2733,0x6661,
-0xbf43,0x7fbd,0xb580,0xe943,
-0x3f4a,0x019f,0x20dc,0x5ebb,
-0xbf66,0xc16c,0x16b0,0xa5a1,
-0x3fb5,0x5555,0x5555,0x554b
-};
-static const unsigned short B[] = {
-0xc095,0x8901,0x8ff3,0x6761,
-0xc0e2,0xf234,0x355b,0xb93e,
-0xc114,0x3d73,0xf890,0x89e5,
-0xc131,0xbc82,0xf994,0xdb51,
-0xc13a,0x4589,0x0219,0xf20b,
-0xc12a,0x0c67,0x5418,0x055e
-};
-static const unsigned short C[] = {
-0xc075,0xfd0d,0x1cf3,0x12b2,
-0xc0d0,0xaa0d,0x7b89,0xd757,
-0xc10a,0xeb84,0xb974,0x4c9b,
-0xc131,0x6286,0x7195,0x0043,
-0xc143,0x5255,0x892f,0xf34c,
-0xc13e,0xce4b,0x6a11,0xe14a
-};
-/* log( sqrt( 2*pi ) ) */
-static const union
-{
- unsigned short s[4];
- double d;
-} ls2p = {{0x3fed,0x67f1,0xc864,0xbeb5}};
-#define LS2PI ls2p.d
-#define MAXLGM 2.556348e305
-/* log (pi) */
-static const union
-{
- unsigned short s[4];
- double d;
-} lpi = {{0x3ff2, 0x50d0, 0x48e7, 0xa1bd}};
-#define LOGPI (lpi.d)
-#endif
-
-
-/* Logarithm of gamma function */
-/* Reentrant version */
-
-double __lgamma_r(double x, int* sgngam)
-{
-double p, q, u, w, z;
-int i;
-
-*sgngam = 1;
-#ifdef NANS
-if( isnan(x) )
- return(x);
-#endif
-
-#ifdef INFINITIES
-if( !isfinite(x) )
- return(INFINITY);
-#endif
-
-if( x < -34.0 )
- {
- q = -x;
- w = __lgamma_r(q, sgngam); /* note this modifies sgngam! */
- p = floor(q);
- if( p == q )
- {
-lgsing:
- _SET_ERRNO(EDOM);
- mtherr( "lgam", SING );
-#ifdef INFINITIES
- return (INFINITY);
-#else
- return (MAXNUM);
-#endif
- }
- i = p;
- if( (i & 1) == 0 )
- *sgngam = -1;
- else
- *sgngam = 1;
- z = q - p;
- if( z > 0.5 )
- {
- p += 1.0;
- z = p - q;
- }
- z = q * sin( PI * z );
- if( z == 0.0 )
- goto lgsing;
-/* z = log(PI) - log( z ) - w;*/
- z = LOGPI - log( z ) - w;
- return( z );
- }
-
-if( x < 13.0 )
- {
- z = 1.0;
- p = 0.0;
- u = x;
- while( u >= 3.0 )
- {
- p -= 1.0;
- u = x + p;
- z *= u;
- }
- while( u < 2.0 )
- {
- if( u == 0.0 )
- goto lgsing;
- z /= u;
- p += 1.0;
- u = x + p;
- }
- if( z < 0.0 )
- {
- *sgngam = -1;
- z = -z;
- }
- else
- *sgngam = 1;
- if( u == 2.0 )
- return( log(z) );
- p -= 2.0;
- x = x + p;
- p = x * polevl( x, B, 5 ) / p1evl( x, C, 6);
- return( log(z) + p );
- }
-
-if( x > MAXLGM )
- {
- _SET_ERRNO(ERANGE);
- mtherr( "lgamma", OVERFLOW );
-#ifdef INFINITIES
- return( *sgngam * INFINITY );
-#else
- return( *sgngam * MAXNUM );
-#endif
- }
-
-q = ( x - 0.5 ) * log(x) - x + LS2PI;
-if( x > 1.0e8 )
- return( q );
-
-p = 1.0/(x*x);
-if( x >= 1000.0 )
- q += (( 7.9365079365079365079365e-4 * p
- - 2.7777777777777777777778e-3) *p
- + 0.0833333333333333333333) / x;
-else
- q += polevl( p, A, 4 ) / x;
-return( q );
-}
-
-/* This is the C99 version */
-
-double lgamma(double x)
-{
- int local_sgngam=0;
- return (__lgamma_r(x, &local_sgngam));
-}
diff --git a/winsup/mingw/mingwex/math/lgammaf.c b/winsup/mingw/mingwex/math/lgammaf.c
deleted file mode 100644
index 20982f9..0000000
--- a/winsup/mingw/mingwex/math/lgammaf.c
+++ /dev/null
@@ -1,253 +0,0 @@
-/* lgamf()
- *
- * Natural logarithm of gamma function
- *
- *
- *
- * SYNOPSIS:
- *
- * float x, y, __lgammaf_r();
- * int* sgngamf;
- * y = __lgammaf_r( x, sgngamf );
- *
- * float x, y, lgammaf();
- * y = lgammaf( x);
- *
- *
- *
- * DESCRIPTION:
- *
- * Returns the base e (2.718...) logarithm of the absolute
- * value of the gamma function of the argument. In the reentrant
- * version the sign (+1 or -1) of the gamma function is returned in
- * variable referenced by sgngamf.
- *
- * For arguments greater than 6.5, the logarithm of the gamma
- * function is approximated by the logarithmic version of
- * Stirling's formula. Arguments between 0 and +6.5 are reduced by
- * by recurrence to the interval [.75,1.25] or [1.5,2.5] of a rational
- * approximation. The cosecant reflection formula is employed for
- * arguments less than zero.
- *
- * Arguments greater than MAXLGM = 2.035093e36 return MAXNUM and an
- * error message.
- *
- *
- *
- * ACCURACY:
- *
- *
- *
- * arithmetic domain # trials peak rms
- * IEEE -100,+100 500,000 7.4e-7 6.8e-8
- * The error criterion was relative when the function magnitude
- * was greater than one but absolute when it was less than one.
- * The routine has low relative error for positive arguments.
- *
- * The following test used the relative error criterion.
- * IEEE -2, +3 100000 4.0e-7 5.6e-8
- *
- */
-
-
-/*
- Cephes Math Library Release 2.7: July, 1998
- Copyright 1984, 1987, 1989, 1992, 1998 by Stephen L. Moshier
-*/
-
-/*
- 26-11-2002 Modified for mingw.
- Danny Smith <dannysmith@users.sourceforge.net>
-*/
-
-
-/* log gamma(x+2), -.5 < x < .5 */
-static const float B[] = {
- 6.055172732649237E-004,
--1.311620815545743E-003,
- 2.863437556468661E-003,
--7.366775108654962E-003,
- 2.058355474821512E-002,
--6.735323259371034E-002,
- 3.224669577325661E-001,
- 4.227843421859038E-001
-};
-
-/* log gamma(x+1), -.25 < x < .25 */
-static const float C[] = {
- 1.369488127325832E-001,
--1.590086327657347E-001,
- 1.692415923504637E-001,
--2.067882815621965E-001,
- 2.705806208275915E-001,
--4.006931650563372E-001,
- 8.224670749082976E-001,
--5.772156501719101E-001
-};
-
-/* log( sqrt( 2*pi ) ) */
-static const float LS2PI = 0.91893853320467274178;
-#define MAXLGM 2.035093e36
-static const float PIINV = 0.318309886183790671538;
-
-#ifndef __MINGW32__
-#include "mconf.h"
-float floorf(float);
-float polevlf( float, float *, int );
-float p1evlf( float, float *, int );
-#else
-#include "cephes_mconf.h"
-#endif
-
-/* Reentrant version */
-/* Logarithm of gamma function */
-
-float __lgammaf_r( float x, int* sgngamf )
-{
-float p, q, w, z;
-float nx, tx;
-int i, direction;
-
-*sgngamf = 1;
-#ifdef NANS
-if( isnan(x) )
- return(x);
-#endif
-
-#ifdef INFINITIES
-if( !isfinite(x) )
- return(x);
-#endif
-
-
-if( x < 0.0 )
- {
- q = -x;
- w = __lgammaf_r(q, sgngamf); /* note this modifies sgngam! */
- p = floorf(q);
- if( p == q )
- {
-lgsing:
- _SET_ERRNO(EDOM);
- mtherr( "lgamf", SING );
-#ifdef INFINITIES
- return (INFINITYF);
-#else
- return( *sgngamf * MAXNUMF );
-#endif
- }
- i = p;
- if( (i & 1) == 0 )
- *sgngamf = -1;
- else
- *sgngamf = 1;
- z = q - p;
- if( z > 0.5 )
- {
- p += 1.0;
- z = p - q;
- }
- z = q * sinf( PIF * z );
- if( z == 0.0 )
- goto lgsing;
- z = -logf( PIINV*z ) - w;
- return( z );
- }
-
-if( x < 6.5 )
- {
- direction = 0;
- z = 1.0;
- tx = x;
- nx = 0.0;
- if( x >= 1.5 )
- {
- while( tx > 2.5 )
- {
- nx -= 1.0;
- tx = x + nx;
- z *=tx;
- }
- x += nx - 2.0;
-iv1r5:
- p = x * polevlf( x, B, 7 );
- goto cont;
- }
- if( x >= 1.25 )
- {
- z *= x;
- x -= 1.0; /* x + 1 - 2 */
- direction = 1;
- goto iv1r5;
- }
- if( x >= 0.75 )
- {
- x -= 1.0;
- p = x * polevlf( x, C, 7 );
- q = 0.0;
- goto contz;
- }
- while( tx < 1.5 )
- {
- if( tx == 0.0 )
- goto lgsing;
- z *=tx;
- nx += 1.0;
- tx = x + nx;
- }
- direction = 1;
- x += nx - 2.0;
- p = x * polevlf( x, B, 7 );
-
-cont:
- if( z < 0.0 )
- {
- *sgngamf = -1;
- z = -z;
- }
- else
- {
- *sgngamf = 1;
- }
- q = logf(z);
- if( direction )
- q = -q;
-contz:
- return( p + q );
- }
-
-if( x > MAXLGM )
- {
- _SET_ERRNO(ERANGE);
- mtherr( "lgamf", OVERFLOW );
-#ifdef INFINITIES
- return( *sgngamf * INFINITYF );
-#else
- return( *sgngamf * MAXNUMF );
-#endif
-
- }
-
-/* Note, though an asymptotic formula could be used for x >= 3,
- * there is cancellation error in the following if x < 6.5. */
-q = LS2PI - x;
-q += ( x - 0.5 ) * logf(x);
-
-if( x <= 1.0e4 )
- {
- z = 1.0/x;
- p = z * z;
- q += (( 6.789774945028216E-004 * p
- - 2.769887652139868E-003 ) * p
- + 8.333316229807355E-002 ) * z;
- }
-return( q );
-}
-
-/* This is the C99 version */
-
-float lgammaf(float x)
-{
- int local_sgngamf=0;
- return (__lgammaf_r(x, &local_sgngamf));
-}
diff --git a/winsup/mingw/mingwex/math/lgammal.c b/winsup/mingw/mingwex/math/lgammal.c
deleted file mode 100644
index d2b306a..0000000
--- a/winsup/mingw/mingwex/math/lgammal.c
+++ /dev/null
@@ -1,416 +0,0 @@
-/* lgaml()
- *
- * Natural logarithm of gamma function
- *
- *
- *
- * SYNOPSIS:
- *
- * long double x, y, __lgammal_r();
- * int* sgngaml;
- * y = __lgammal_r( x, sgngaml );
- *
- * long double x, y, lgammal();
- * y = lgammal( x);
- *
- *
- *
- * DESCRIPTION:
- *
- * Returns the base e (2.718...) logarithm of the absolute
- * value of the gamma function of the argument. In the reentrant
- * version, the sign (+1 or -1) of the gamma function is returned
- * in the variable referenced by sgngaml.
- *
- * For arguments greater than 33, the logarithm of the gamma
- * function is approximated by the logarithmic version of
- * Stirling's formula using a polynomial approximation of
- * degree 4. Arguments between -33 and +33 are reduced by
- * recurrence to the interval [2,3] of a rational approximation.
- * The cosecant reflection formula is employed for arguments
- * less than -33.
- *
- * Arguments greater than MAXLGML (10^4928) return MAXNUML.
- *
- *
- *
- * ACCURACY:
- *
- *
- * arithmetic domain # trials peak rms
- * IEEE -40, 40 100000 2.2e-19 4.6e-20
- * IEEE 10^-2000,10^+2000 20000 1.6e-19 3.3e-20
- * The error criterion was relative when the function magnitude
- * was greater than one but absolute when it was less than one.
- *
- */
-
-/*
- * Copyright 1994 by Stephen L. Moshier
- */
-
-/*
- * 26-11-2002 Modified for mingw.
- * Danny Smith <dannysmith@users.sourceforge.net>
- */
-
-#ifndef __MINGW32__
-#include "mconf.h"
-#ifdef ANSIPROT
-extern long double fabsl ( long double );
-extern long double lgaml ( long double );
-extern long double logl ( long double );
-extern long double expl ( long double );
-extern long double gammal ( long double );
-extern long double sinl ( long double );
-extern long double floorl ( long double );
-extern long double powl ( long double, long double );
-extern long double polevll ( long double, void *, int );
-extern long double p1evll ( long double, void *, int );
-extern int isnanl ( long double );
-extern int isfinitel ( long double );
-#else
-long double fabsl(), lgaml(), logl(), expl(), gammal(), sinl();
-long double floorl(), powl(), polevll(), p1evll(), isnanl(), isfinitel();
-#endif
-#ifdef INFINITIES
-extern long double INFINITYL;
-#endif
-#ifdef NANS
-extern long double NANL;
-#endif
-#else /* __MINGW32__ */
-#include "cephes_mconf.h"
-#endif /* __MINGW32__ */
-
-#if UNK
-static long double S[9] = {
--1.193945051381510095614E-3L,
- 7.220599478036909672331E-3L,
--9.622023360406271645744E-3L,
--4.219773360705915470089E-2L,
- 1.665386113720805206758E-1L,
--4.200263503403344054473E-2L,
--6.558780715202540684668E-1L,
- 5.772156649015328608253E-1L,
- 1.000000000000000000000E0L,
-};
-#endif
-#if IBMPC
-static const unsigned short S[] = {
-0xbaeb,0xd6d3,0x25e5,0x9c7e,0xbff5, XPD
-0xfe9a,0xceb4,0xc74e,0xec9a,0x3ff7, XPD
-0x9225,0xdfef,0xb0e9,0x9da5,0xbff8, XPD
-0x10b0,0xec17,0x87dc,0xacd7,0xbffa, XPD
-0x6b8d,0x7515,0x1905,0xaa89,0x3ffc, XPD
-0xf183,0x126b,0xf47d,0xac0a,0xbffa, XPD
-0x7bf6,0x57d1,0xa013,0xa7e7,0xbffe, XPD
-0xc7a9,0x7db0,0x67e3,0x93c4,0x3ffe, XPD
-0x0000,0x0000,0x0000,0x8000,0x3fff, XPD
-};
-#endif
-#if MIEEE
-static long S[27] = {
-0xbff50000,0x9c7e25e5,0xd6d3baeb,
-0x3ff70000,0xec9ac74e,0xceb4fe9a,
-0xbff80000,0x9da5b0e9,0xdfef9225,
-0xbffa0000,0xacd787dc,0xec1710b0,
-0x3ffc0000,0xaa891905,0x75156b8d,
-0xbffa0000,0xac0af47d,0x126bf183,
-0xbffe0000,0xa7e7a013,0x57d17bf6,
-0x3ffe0000,0x93c467e3,0x7db0c7a9,
-0x3fff0000,0x80000000,0x00000000,
-};
-#endif
-
-#if UNK
-static long double SN[9] = {
- 1.133374167243894382010E-3L,
- 7.220837261893170325704E-3L,
- 9.621911155035976733706E-3L,
--4.219773343731191721664E-2L,
--1.665386113944413519335E-1L,
--4.200263503402112910504E-2L,
- 6.558780715202536547116E-1L,
- 5.772156649015328608727E-1L,
--1.000000000000000000000E0L,
-};
-#endif
-#if IBMPC
-static const unsigned SN[] = {
-0x5dd1,0x02de,0xb9f7,0x948d,0x3ff5, XPD
-0x989b,0xdd68,0xc5f1,0xec9c,0x3ff7, XPD
-0x2ca1,0x18f0,0x386f,0x9da5,0x3ff8, XPD
-0x783f,0x41dd,0x87d1,0xacd7,0xbffa, XPD
-0x7a5b,0xd76d,0x1905,0xaa89,0xbffc, XPD
-0x7f64,0x1234,0xf47d,0xac0a,0xbffa, XPD
-0x5e26,0x57d1,0xa013,0xa7e7,0x3ffe, XPD
-0xc7aa,0x7db0,0x67e3,0x93c4,0x3ffe, XPD
-0x0000,0x0000,0x0000,0x8000,0xbfff, XPD
-};
-#endif
-#if MIEEE
-static long SN[27] = {
-0x3ff50000,0x948db9f7,0x02de5dd1,
-0x3ff70000,0xec9cc5f1,0xdd68989b,
-0x3ff80000,0x9da5386f,0x18f02ca1,
-0xbffa0000,0xacd787d1,0x41dd783f,
-0xbffc0000,0xaa891905,0xd76d7a5b,
-0xbffa0000,0xac0af47d,0x12347f64,
-0x3ffe0000,0xa7e7a013,0x57d15e26,
-0x3ffe0000,0x93c467e3,0x7db0c7aa,
-0xbfff0000,0x80000000,0x00000000,
-};
-#endif
-
-
-/* A[]: Stirling's formula expansion of log gamma
- * B[], C[]: log gamma function between 2 and 3
- */
-
-
-/* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x A(1/x^2)
- * x >= 8
- * Peak relative error 1.51e-21
- * Relative spread of error peaks 5.67e-21
- */
-#if UNK
-static long double A[7] = {
- 4.885026142432270781165E-3L,
--1.880801938119376907179E-3L,
- 8.412723297322498080632E-4L,
--5.952345851765688514613E-4L,
- 7.936507795855070755671E-4L,
--2.777777777750349603440E-3L,
- 8.333333333333331447505E-2L,
-};
-#endif
-#if IBMPC
-static const unsigned short A[] = {
-0xd984,0xcc08,0x91c2,0xa012,0x3ff7, XPD
-0x3d91,0x0304,0x3da1,0xf685,0xbff5, XPD
-0x3bdc,0xaad1,0xd492,0xdc88,0x3ff4, XPD
-0x8b20,0x9fce,0x844e,0x9c09,0xbff4, XPD
-0xf8f2,0x30e5,0x0092,0xd00d,0x3ff4, XPD
-0x4d88,0x03a8,0x60b6,0xb60b,0xbff6, XPD
-0x9fcc,0xaaaa,0xaaaa,0xaaaa,0x3ffb, XPD
-};
-#endif
-#if MIEEE
-static long A[21] = {
-0x3ff70000,0xa01291c2,0xcc08d984,
-0xbff50000,0xf6853da1,0x03043d91,
-0x3ff40000,0xdc88d492,0xaad13bdc,
-0xbff40000,0x9c09844e,0x9fce8b20,
-0x3ff40000,0xd00d0092,0x30e5f8f2,
-0xbff60000,0xb60b60b6,0x03a84d88,
-0x3ffb0000,0xaaaaaaaa,0xaaaa9fcc,
-};
-#endif
-
-/* log gamma(x+2) = x B(x)/C(x)
- * 0 <= x <= 1
- * Peak relative error 7.16e-22
- * Relative spread of error peaks 4.78e-20
- */
-#if UNK
-static long double B[7] = {
--2.163690827643812857640E3L,
--8.723871522843511459790E4L,
--1.104326814691464261197E6L,
--6.111225012005214299996E6L,
--1.625568062543700591014E7L,
--2.003937418103815175475E7L,
--8.875666783650703802159E6L,
-};
-static long double C[7] = {
-/* 1.000000000000000000000E0L,*/
--5.139481484435370143617E2L,
--3.403570840534304670537E4L,
--6.227441164066219501697E5L,
--4.814940379411882186630E6L,
--1.785433287045078156959E7L,
--3.138646407656182662088E7L,
--2.099336717757895876142E7L,
-};
-#endif
-#if IBMPC
-static const unsigned short B[] = {
-0x9557,0x4995,0x0da1,0x873b,0xc00a, XPD
-0xfe44,0x9af8,0x5b8c,0xaa63,0xc00f, XPD
-0x5aa8,0x7cf5,0x3684,0x86ce,0xc013, XPD
-0x259a,0x258c,0xf206,0xba7f,0xc015, XPD
-0xbe18,0x1ca3,0xc0a0,0xf80a,0xc016, XPD
-0x168f,0x2c42,0x6717,0x98e3,0xc017, XPD
-0x2051,0x9d55,0x92c8,0x876e,0xc016, XPD
-};
-static const unsigned short C[] = {
-/*0x0000,0x0000,0x0000,0x8000,0x3fff, XPD*/
-0xaa77,0xcf2f,0xae76,0x807c,0xc008, XPD
-0xb280,0x0d74,0xb55a,0x84f3,0xc00e, XPD
-0xa505,0xcd30,0x81dc,0x9809,0xc012, XPD
-0x3369,0x4246,0xb8c2,0x92f0,0xc015, XPD
-0x63cf,0x6aee,0xbe6f,0x8837,0xc017, XPD
-0x26bb,0xccc7,0xb009,0xef75,0xc017, XPD
-0x462b,0xbae8,0xab96,0xa02a,0xc017, XPD
-};
-#endif
-#if MIEEE
-static long B[21] = {
-0xc00a0000,0x873b0da1,0x49959557,
-0xc00f0000,0xaa635b8c,0x9af8fe44,
-0xc0130000,0x86ce3684,0x7cf55aa8,
-0xc0150000,0xba7ff206,0x258c259a,
-0xc0160000,0xf80ac0a0,0x1ca3be18,
-0xc0170000,0x98e36717,0x2c42168f,
-0xc0160000,0x876e92c8,0x9d552051,
-};
-static long C[21] = {
-/*0x3fff0000,0x80000000,0x00000000,*/
-0xc0080000,0x807cae76,0xcf2faa77,
-0xc00e0000,0x84f3b55a,0x0d74b280,
-0xc0120000,0x980981dc,0xcd30a505,
-0xc0150000,0x92f0b8c2,0x42463369,
-0xc0170000,0x8837be6f,0x6aee63cf,
-0xc0170000,0xef75b009,0xccc726bb,
-0xc0170000,0xa02aab96,0xbae8462b,
-};
-#endif
-
-/* log( sqrt( 2*pi ) ) */
-static const long double LS2PI = 0.91893853320467274178L;
-#define MAXLGM 1.04848146839019521116e+4928L
-
-
-/* Logarithm of gamma function */
-/* Reentrant version */
-
-long double __lgammal_r(long double x, int* sgngaml)
-{
-long double p, q, w, z, f, nx;
-int i;
-
-*sgngaml = 1;
-#ifdef NANS
-if( isnanl(x) )
- return(NANL);
-#endif
-#ifdef INFINITIES
-if( !isfinitel(x) )
- return(INFINITYL);
-#endif
-if( x < -34.0L )
- {
- q = -x;
- w = __lgammal_r(q, sgngaml); /* note this modifies sgngam! */
- p = floorl(q);
- if( p == q )
- {
-lgsing:
- _SET_ERRNO(EDOM);
- mtherr( "lgammal", SING );
-#ifdef INFINITIES
- return (INFINITYL);
-#else
- return (MAXNUML);
-#endif
- }
- i = p;
- if( (i & 1) == 0 )
- *sgngaml = -1;
- else
- *sgngaml = 1;
- z = q - p;
- if( z > 0.5L )
- {
- p += 1.0L;
- z = p - q;
- }
- z = q * sinl( PIL * z );
- if( z == 0.0L )
- goto lgsing;
-/* z = LOGPI - logl( z ) - w; */
- z = logl( PIL/z ) - w;
- return( z );
- }
-
-if( x < 13.0L )
- {
- z = 1.0L;
- nx = floorl( x + 0.5L );
- f = x - nx;
- while( x >= 3.0L )
- {
- nx -= 1.0L;
- x = nx + f;
- z *= x;
- }
- while( x < 2.0L )
- {
- if( fabsl(x) <= 0.03125 )
- goto lsmall;
- z /= nx + f;
- nx += 1.0L;
- x = nx + f;
- }
- if( z < 0.0L )
- {
- *sgngaml = -1;
- z = -z;
- }
- else
- *sgngaml = 1;
- if( x == 2.0L )
- return( logl(z) );
- x = (nx - 2.0L) + f;
- p = x * polevll( x, B, 6 ) / p1evll( x, C, 7);
- return( logl(z) + p );
- }
-
-if( x > MAXLGM )
- {
- _SET_ERRNO(ERANGE);
- mtherr( "lgammal", OVERFLOW );
-#ifdef INFINITIES
- return( *sgngaml * INFINITYL );
-#else
- return( *sgngaml * MAXNUML );
-#endif
- }
-
-q = ( x - 0.5L ) * logl(x) - x + LS2PI;
-if( x > 1.0e10L )
- return(q);
-p = 1.0L/(x*x);
-q += polevll( p, A, 6 ) / x;
-return( q );
-
-
-lsmall:
-if( x == 0.0L )
- goto lgsing;
-if( x < 0.0L )
- {
- x = -x;
- q = z / (x * polevll( x, SN, 8 ));
- }
-else
- q = z / (x * polevll( x, S, 8 ));
-if( q < 0.0L )
- {
- *sgngaml = -1;
- q = -q;
- }
-else
- *sgngaml = 1;
-q = logl( q );
-return(q);
-}
-
-/* This is the C99 version */
-
-long double lgammal(long double x)
-{
- int local_sgngaml=0;
- return (__lgammal_r(x, &local_sgngaml));
-}
diff --git a/winsup/mingw/mingwex/math/llrint.c b/winsup/mingw/mingwex/math/llrint.c
deleted file mode 100644
index b6d9f32..0000000
--- a/winsup/mingw/mingwex/math/llrint.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <math.h>
-
-long long llrint (double x)
-{
- long long retval;
- __asm__ __volatile__ \
- ("fistpll %0" : "=m" (retval) : "t" (x) : "st"); \
- return retval;
-}
-
diff --git a/winsup/mingw/mingwex/math/llrintf.c b/winsup/mingw/mingwex/math/llrintf.c
deleted file mode 100644
index 7fa67db..0000000
--- a/winsup/mingw/mingwex/math/llrintf.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <math.h>
-
-long long llrintf (float x)
-{
- long long retval;
- __asm__ __volatile__ \
- ("fistpll %0" : "=m" (retval) : "t" (x) : "st"); \
- return retval;
-}
diff --git a/winsup/mingw/mingwex/math/llrintl.c b/winsup/mingw/mingwex/math/llrintl.c
deleted file mode 100644
index 948d962..0000000
--- a/winsup/mingw/mingwex/math/llrintl.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <math.h>
-
-long long llrintl (long double x)
-{
- long long retval;
- __asm__ __volatile__ \
- ("fistpll %0" : "=m" (retval) : "t" (x) : "st"); \
- return retval;
-}
-
diff --git a/winsup/mingw/mingwex/math/log10f.S b/winsup/mingw/mingwex/math/log10f.S
deleted file mode 100644
index 6483814..0000000
--- a/winsup/mingw/mingwex/math/log10f.S
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- * Adapted for float type by Ulrich Drepper <drepper@cygnus.com>.
- *
- * Changed to use fyl2xp1 for values near 1, <drepper@cygnus.com>.
- */
-
- .file "log10f.S"
- .text
- .align 4
-one: .double 1.0
- /* It is not important that this constant is precise. It is only
- a value which is known to be on the safe side for using the
- fyl2xp1 instruction. */
-limit: .double 0.29
-
- .text
- .align 4
-.globl _log10f
- .def _log10f; .scl 2; .type 32; .endef
-_log10f:
- fldlg2 /* log10(2) */
- flds 4(%esp) /* x : log10(2) */
- fxam
- fnstsw
- fld %st /* x : x : log10(2) */
- sahf
- jc 3f /* in case x is NaN or ±Inf */
-4: fsubl one /* x-1 : x : log10(2) */
- fld %st /* x-1 : x-1 : x : log10(2) */
- fabs /* |x-1| : x-1 : x : log10(2) */
- fcompl limit /* x-1 : x : log10(2) */
- fnstsw /* x-1 : x : log10(2) */
- andb $0x45, %ah
- jz 2f
- fstp %st(1) /* x-1 : log10(2) */
- fyl2xp1 /* log10(x) */
- ret
-
-2: fstp %st(0) /* x : log10(2) */
- fyl2x /* log10(x) */
- ret
-
-3: jp 4b /* in case x is ±Inf */
- fstp %st(1)
- fstp %st(1)
- ret
diff --git a/winsup/mingw/mingwex/math/log10l.S b/winsup/mingw/mingwex/math/log10l.S
deleted file mode 100644
index 46f6b98..0000000
--- a/winsup/mingw/mingwex/math/log10l.S
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
- *
- * Changed to use fyl2xp1 for values near 1, <drepper@cygnus.com>.
- *
- * Removed header file dependency for use in libmingwex.a by
- * Danny Smith <dannysmith@users.sourceforge.net>
- */
-
- .file "log10l.S"
- .text
- .align 4
-one: .double 1.0
- /* It is not important that this constant is precise. It is only
- a value which is known to be on the safe side for using the
- fyl2xp1 instruction. */
-limit: .double 0.29
-
- .text
- .align 4
-.globl _log10l
- .def _log10l; .scl 2; .type 32; .endef
-_log10l:
- fldlg2 /* log10(2) */
- fldt 4(%esp) /* x : log10(2) */
- fxam
- fnstsw
- fld %st /* x : x : log10(2) */
- sahf
- jc 3f /* in case x is NaN or ±Inf */
-4: fsubl one /* x-1 : x : log10(2) */
- fld %st /* x-1 : x-1 : x : log10(2) */
- fabs /* |x-1| : x-1 : x : log10(2) */
- fcompl limit /* x-1 : x : log10(2) */
- fnstsw /* x-1 : x : log10(2) */
- andb $0x45, %ah
- jz 2f
- fstp %st(1) /* x-1 : log10(2) */
- fyl2xp1 /* log10(x) */
- ret
-
-2: fstp %st(0) /* x : log10(2) */
- fyl2x /* log10(x) */
- ret
-
-3: jp 4b /* in case x is ±Inf */
- fstp %st(1)
- fstp %st(1)
- ret
diff --git a/winsup/mingw/mingwex/math/log1p.S b/winsup/mingw/mingwex/math/log1p.S
deleted file mode 100644
index 12e223c..0000000
--- a/winsup/mingw/mingwex/math/log1p.S
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- * Removed header file dependency for use in libmingwex.a by
- * Danny Smith <dannysmith@users.sourceforge.net>
- */
-
- .file "log1p.S"
- .text
- .align 4
- /* The fyl2xp1 can only be used for values in
- -1 + sqrt(2) / 2 <= x <= 1 - sqrt(2) / 2
- 0.29 is a safe value.
- */
-limit: .double 0.29
-one: .double 1.0
-/*
- * Use the fyl2xp1 function when the argument is in the range -0.29 to 0.29,
- * otherwise fyl2x with the needed extra computation.
- */
-.globl _log1p;
- .def _log1p; .scl 2; .type 32; .endef
-_log1p:
- fldln2
- fldl 4(%esp)
- fxam
- fnstsw
- fld %st
- sahf
- jc 3f /* in case x is NaN or ±Inf */
-
-4: fabs
- fcompl limit
- fnstsw
- sahf
- jc 2f
- faddl one
- fyl2x
- ret
-
-2: fyl2xp1
- ret
-
-3: jp 4b /* in case x is ±Inf */
- fstp %st(1)
- fstp %st(1)
- ret
diff --git a/winsup/mingw/mingwex/math/log1pf.S b/winsup/mingw/mingwex/math/log1pf.S
deleted file mode 100644
index b5b1acb..0000000
--- a/winsup/mingw/mingwex/math/log1pf.S
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- * Removed header file dependency for use in libmingwex.a by
- * Danny Smith <dannysmith@users.sourceforge.net>
- */
-
- .file "log1pf.S"
- .text
- .align 4
- /* The fyl2xp1 can only be used for values in
- -1 + sqrt(2) / 2 <= x <= 1 - sqrt(2) / 2
- 0.29 is a safe value.
- */
-limit: .float 0.29
-one: .float 1.0
-/*
- * Use the fyl2xp1 function when the argument is in the range -0.29 to 0.29,
- * otherwise fyl2x with the needed extra computation.
- */
-.globl _log1pf;
- .def _log1pf; .scl 2; .type 32; .endef
-_log1pf:
- fldln2
- flds 4(%esp)
- fxam
- fnstsw
- fld %st
- sahf
- jc 3f /* in case x is NaN or ±Inf */
-
-4: fabs
- fcomps limit
- fnstsw
- sahf
- jc 2f
- fadds one
- fyl2x
- ret
-
-2: fyl2xp1
- ret
-
-3: jp 4b /* in case x is ±Inf */
- fstp %st(1)
- fstp %st(1)
- ret
diff --git a/winsup/mingw/mingwex/math/log1pl.S b/winsup/mingw/mingwex/math/log1pl.S
deleted file mode 100644
index 158d8ae..0000000
--- a/winsup/mingw/mingwex/math/log1pl.S
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
-* Removed header file dependency for use in libmingwex.a by
- * Danny Smith <dannysmith@users.sourceforge.net>
- */
-
- .file "log1pl.S"
- .text
- .align 4
- /* The fyl2xp1 can only be used for values in
- -1 + sqrt(2) / 2 <= x <= 1 - sqrt(2) / 2
- 0.29 is a safe value.
- */
-limit: .tfloat 0.29
- /* Please note: we use a double value here. Since 1.0 has
- an exact representation this does not effect the accuracy
- but it helps to optimize the code. */
-one: .double 1.0
-
-/*
- * Use the fyl2xp1 function when the argument is in the range -0.29 to 0.29,
- * otherwise fyl2x with the needed extra computation.
- */
-.globl _log1pl;
- .def _log1pl; .scl 2; .type 32; .endef
-_log1pl:
- fldln2
- fldt 4(%esp)
- fxam
- fnstsw
- fld %st
- sahf
- jc 3f /* in case x is NaN or ±Inf */
-4:
- fabs
- fldt limit
- fcompp
- fnstsw
- sahf
- jnc 2f
- faddl one
- fyl2x
- ret
-
-2: fyl2xp1
- ret
-
-3: jp 4b /* in case x is ±Inf */
- fstp %st(1)
- fstp %st(1)
- ret
diff --git a/winsup/mingw/mingwex/math/log2.S b/winsup/mingw/mingwex/math/log2.S
deleted file mode 100644
index 68e7fc7..0000000
--- a/winsup/mingw/mingwex/math/log2.S
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Adapted for use as log2 by Ulrich Drepper <drepper@cygnus.com>.
- * Public domain.
- *
- * Changed to use fyl2xp1 for values near 1, <drepper@cygnus.com>.
- *
- * Removed header file dependency for use in libmingwex.a by
- * Danny Smith <dannysmith@users.sourceforge.net>
- */
-
- .file "log2.S"
- .text
- .align 4
-one: .double 1.0
- /* It is not important that this constant is precise. It is only
- a value which is known to be on the safe side for using the
- fyl2xp1 instruction. */
-limit: .double 0.29
-
- .text
- .align 4
-.globl _log2
- .def _log2; .scl 2; .type 32; .endef
-_log2:
- fldl one
- fldl 4(%esp) /* x : 1 */
- fxam
- fnstsw
- fld %st /* x : x : 1 */
- sahf
- jc 3f /* in case x is NaN or ±Inf */
-4: fsub %st(2), %st /* x-1 : x : 1 */
- fld %st /* x-1 : x-1 : x : 1 */
- fabs /* |x-1| : x-1 : x : 1 */
- fcompl limit /* x-1 : x : 1 */
- fnstsw /* x-1 : x : 1 */
- andb $0x45, %ah
- jz 2f
- fstp %st(1) /* x-1 : 1 */
- fyl2xp1 /* log(x) */
- ret
-
-2: fstp %st(0) /* x : 1 */
- fyl2x /* log(x) */
- ret
-
-3: jp 4b /* in case x is ±Inf */
- fstp %st(1)
- fstp %st(1)
- ret
diff --git a/winsup/mingw/mingwex/math/log2f.S b/winsup/mingw/mingwex/math/log2f.S
deleted file mode 100644
index 900e26d..0000000
--- a/winsup/mingw/mingwex/math/log2f.S
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Adapted for use as log2 by Ulrich Drepper <drepper@cygnus.com>.
- * Public domain.
- *
- * Changed to use fyl2xp1 for values near 1, <drepper@cygnus.com>.
- *
- * Removed header file dependency for use in libmingwex.a by
- * Danny Smith <dannysmith@users.sourceforge.net>
- */
-
- .file "log2f.S"
- .text
- .align 4
-one: .double 1.0
- /* It is not important that this constant is precise. It is only
- a value which is known to be on the safe side for using the
- fyl2xp1 instruction. */
-limit: .double 0.29
-
- .text
- .align 4
-.globl _log2f
- .def _log2f; .scl 2; .type 32; .endef
-_log2f:
- fldl one
- flds 4(%esp) /* x : 1 */
- fxam
- fnstsw
- fld %st /* x : x : 1 */
- sahf
- jc 3f /* in case x is NaN or ±Inf */
-4: fsub %st(2), %st /* x-1 : x : 1 */
- fld %st /* x-1 : x-1 : x : 1 */
- fabs /* |x-1| : x-1 : x : 1 */
- fcompl limit /* x-1 : x : 1 */
- fnstsw /* x-1 : x : 1 */
- andb $0x45, %ah
- jz 2f
- fstp %st(1) /* x-1 : 1 */
- fyl2xp1 /* log(x) */
- ret
-
-2: fstp %st(0) /* x : 1 */
- fyl2x /* log(x) */
- ret
-
-3: jp 4b /* in case x is ±Inf */
- fstp %st(1)
- fstp %st(1)
- ret
diff --git a/winsup/mingw/mingwex/math/log2l.S b/winsup/mingw/mingwex/math/log2l.S
deleted file mode 100644
index 0ad5696..0000000
--- a/winsup/mingw/mingwex/math/log2l.S
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Adapted for use as log2 by Ulrich Drepper <drepper@cygnus.com>.
- * Public domain.
- *
- * Changed to use fyl2xp1 for values near 1, <drepper@cygnus.com>.
- */
-
- .file "log2l.S"
- .text
- .align 4
-one: .double 1.0
- /* It is not important that this constant is precise. It is only
- a value which is known to be on the safe side for using the
- fyl2xp1 instruction. */
-limit: .double 0.29
-
- .text
- .align 4
-.globl _log2l
- .def _log2l; .scl 2; .type 32; .endef
-_log2l:
- fldl one
- fldt 4(%esp) /* x : 1 */
- fxam
- fnstsw
- fld %st /* x : x : 1 */
- sahf
- jc 3f /* in case x is NaN or ±Inf */
-4: fsub %st(2), %st /* x-1 : x : 1 */
- fld %st /* x-1 : x-1 : x : 1 */
- fabs /* |x-1| : x-1 : x : 1 */
- fcompl limit /* x-1 : x : 1 */
- fnstsw /* x-1 : x : 1 */
- andb $0x45, %ah
- jz 2f
- fstp %st(1) /* x-1 : 1 */
- fyl2xp1 /* log(x) */
- ret
-
-2: fstp %st(0) /* x : 1 */
- fyl2x /* log(x) */
- ret
-
-3: jp 4b /* in case x is ±Inf */
- fstp %st(1)
- fstp %st(1)
- ret
diff --git a/winsup/mingw/mingwex/math/logb.c b/winsup/mingw/mingwex/math/logb.c
deleted file mode 100644
index cdff136..0000000
--- a/winsup/mingw/mingwex/math/logb.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Changes for long double by Ulrich Drepper <drepper@cygnus.com>
- * Public domain.
- */
-
-#include <math.h>
-
-double
-logb (double x)
-{
- double res;
- asm ("fxtract\n\t"
- "fstp %%st" : "=t" (res) : "0" (x));
- return res;
-}
diff --git a/winsup/mingw/mingwex/math/logbf.c b/winsup/mingw/mingwex/math/logbf.c
deleted file mode 100644
index b5f57d2..0000000
--- a/winsup/mingw/mingwex/math/logbf.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Changes for long double by Ulrich Drepper <drepper@cygnus.com>
- * Public domain.
- */
-
-#include <math.h>
-
-float
-logbf (float x)
-{
- float res;
- asm ("fxtract\n\t"
- "fstp %%st" : "=t" (res) : "0" (x));
- return res;
-}
diff --git a/winsup/mingw/mingwex/math/logbl.c b/winsup/mingw/mingwex/math/logbl.c
deleted file mode 100644
index f1448eb..0000000
--- a/winsup/mingw/mingwex/math/logbl.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Changes for long double by Ulrich Drepper <drepper@cygnus.com>
- * Public domain.
- */
-
-#include <math.h>
-
-long double
-logbl (long double x)
-{
- long double res;
-
- asm ("fxtract\n\t"
- "fstp %%st" : "=t" (res) : "0" (x));
- return res;
-}
diff --git a/winsup/mingw/mingwex/math/logf.S b/winsup/mingw/mingwex/math/logf.S
deleted file mode 100644
index d59fe58..0000000
--- a/winsup/mingw/mingwex/math/logf.S
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- * Adapted for float by Ulrich Drepper <drepper@cygnus.com>.
- *
- * Changed to use fyl2xp1 for values near 1, <drepper@cygnus.com>.
- */
-
- .file "logf.S"
- .text
- .align 4
-one: .double 1.0
- /* It is not important that this constant is precise. It is only
- a value which is known to be on the safe side for using the
- fyl2xp1 instruction. */
-limit: .double 0.29
-
- .text
- .align 4
-.globl _logf
- .def _logf; .scl 2; .type 32; .endef
-_logf:
- fldln2 /* log(2) */
- flds 4(%esp) /* x : log(2) */
- fld %st /* x : x : log(2) */
- fsubl one /* x-1 : x : log(2) */
- fld %st /* x-1 : x-1 : x : log(2) */
- fabs /* |x-1| : x-1 : x : log(2) */
- fcompl limit /* x-1 : x : log(2) */
- fnstsw /* x-1 : x : log(2) */
- andb $0x45, %ah
- jz 2f
- fstp %st(1) /* x-1 : log(2) */
- fyl2xp1 /* log(x) */
- ret
-
-2: fstp %st(0) /* x : log(2) */
- fyl2x /* log(x) */
- ret
diff --git a/winsup/mingw/mingwex/math/logl.S b/winsup/mingw/mingwex/math/logl.S
deleted file mode 100644
index 75a282f..0000000
--- a/winsup/mingw/mingwex/math/logl.S
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
- *
- * Removed header file dependency for use in libmingwex.a by
- * Danny Smith <dannysmith@users.sourceforge.net>
- */
- .file "logl.S"
- .text
- .align 4
-one: .double 1.0
- /* It is not important that this constant is precise. It is only
- a value which is known to be on the safe side for using the
- fyl2xp1 instruction. */
-limit: .double 0.29
-
- .text
- .align 4
-.globl _logl
- .def _logl; .scl 2; .type 32; .endef
-_logl:
- fldln2 /* log(2) */
- fldt 4(%esp) /* x : log(2) */
- fld %st /* x : x : log(2) */
- fsubl one /* x-1 : x : log(2) */
- fld %st /* x-1 : x-1 : x : log(2) */
- fabs /* |x-1| : x-1 : x : log(2) */
- fcompl limit /* x-1 : x : log(2) */
- fnstsw /* x-1 : x : log(2) */
- andb $0x45, %ah
- jz 2f
- fstp %st(1) /* x-1 : log(2) */
- fyl2xp1 /* log(x) */
- ret
-
-2: fstp %st(0) /* x : log(2) */
- fyl2x /* log(x) */
- ret
diff --git a/winsup/mingw/mingwex/math/lrint.c b/winsup/mingw/mingwex/math/lrint.c
deleted file mode 100644
index 7dfa233..0000000
--- a/winsup/mingw/mingwex/math/lrint.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <math.h>
-
-long lrint (double x)
-{
- long retval;
- __asm__ __volatile__ \
- ("fistpl %0" : "=m" (retval) : "t" (x) : "st"); \
- return retval;
-}
diff --git a/winsup/mingw/mingwex/math/lrintf.c b/winsup/mingw/mingwex/math/lrintf.c
deleted file mode 100644
index 24b7a7d..0000000
--- a/winsup/mingw/mingwex/math/lrintf.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <math.h>
-
-long lrintf (float x)
-{
- long retval;
- __asm__ __volatile__ \
- ("fistpl %0" : "=m" (retval) : "t" (x) : "st"); \
- return retval;
-}
diff --git a/winsup/mingw/mingwex/math/lrintl.c b/winsup/mingw/mingwex/math/lrintl.c
deleted file mode 100644
index f555993..0000000
--- a/winsup/mingw/mingwex/math/lrintl.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <math.h>
-
-long lrintl (long double x)
-{
- long retval;
- __asm__ __volatile__ \
- ("fistpl %0" : "=m" (retval) : "t" (x) : "st"); \
- return retval;
-}
-
diff --git a/winsup/mingw/mingwex/math/lround_generic.c b/winsup/mingw/mingwex/math/lround_generic.c
deleted file mode 100644
index e0056a6..0000000
--- a/winsup/mingw/mingwex/math/lround_generic.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * lround_generic.c
- *
- * $Id$
- *
- * Provides a generic implementation for the `lround()', `lroundf()',
- * `lroundl()', `llround()', `llroundf()' and `llroundl()' functions;
- * compile with `-D FUNCTION=name', with `name' set to each of these
- * six in turn, to create separate object files for each of the six
- * functions.
- *
- * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- *
- * This is free software. You may redistribute and/or modify it as you
- * see fit, without restriction of copyright.
- *
- * This software is provided "as is", in the hope that it may be useful,
- * but WITHOUT WARRANTY OF ANY KIND, not even any implied warranty of
- * MERCHANTABILITY, nor of FITNESS FOR ANY PARTICULAR PURPOSE. At no
- * time will the author accept any form of liability for any damages,
- * however caused, resulting from the use of this software.
- *
- */
-#ifndef FUNCTION
-/*
- * Normally specified with `-D FUNCTION=name', on the command line.
- * Valid FUNCTION names are `lround', `lroundf', `lroundl', `llround'
- * `llroundf' and `llroundl'; specifying anything else will most likely
- * cause a compilation error. If user did not specify an appropriate
- * FUNCTION name, default to `lround'.
- */
-#define FUNCTION lround
-#endif
-
-#include "round_internal.h"
-
-#include <limits.h>
-#include <errno.h>
-
-/* Generic implementation.
- * The user is required to specify the FUNCTION name;
- * the RETURN_TYPE and INPUT_TYPE macros resolve to appropriate
- * type declarations, to match the selected FUNCTION prototype,
- * while RETURN_MAX and RETURN_MIN map to the correspondingly
- * appropriate limits.h manifest values, to establish the
- * valid range for the RETURN_TYPE.
- */
-RETURN_TYPE FUNCTION( INPUT_TYPE x )
-{
- if( !isfinite( x ) || !isfinite( x = round_internal( x ) )
- || (x > MAX_RETURN_VALUE) || (x < MIN_RETURN_VALUE) )
- /*
- * Undefined behaviour...
- * POSIX requires us to report a domain error; ANSI C99 says we
- * _may_ report a range error, and previous MinGW implementation
- * set `errno = ERANGE' here; we change that, conforming to the
- * stricter requiremment of the POSIX standard.
- */
- errno = EDOM;
-
- return (RETURN_TYPE)(x);
-}
-
-/* $RCSfile$$Revision$: end of file */
diff --git a/winsup/mingw/mingwex/math/modff.c b/winsup/mingw/mingwex/math/modff.c
deleted file mode 100644
index 072faac..0000000
--- a/winsup/mingw/mingwex/math/modff.c
+++ /dev/null
@@ -1,22 +0,0 @@
-#include <fenv.h>
-#include <math.h>
-#include <errno.h>
-#define FE_ROUNDING_MASK \
- (FE_TONEAREST | FE_DOWNWARD | FE_UPWARD | FE_TOWARDZERO)
-
-float
-modff (float value, float* iptr)
-{
- float int_part;
- unsigned short saved_cw;
- unsigned short tmp_cw;
- /* truncate */
- asm ("fnstcw %0;" : "=m" (saved_cw)); /* save control word */
- tmp_cw = (saved_cw & ~FE_ROUNDING_MASK) | FE_TOWARDZERO;
- asm ("fldcw %0;" : : "m" (tmp_cw));
- asm ("frndint;" : "=t" (int_part) : "0" (value)); /* round */
- asm ("fldcw %0;" : : "m" (saved_cw)); /* restore saved cw */
- if (iptr)
- *iptr = int_part;
- return (isinf (value) ? 0.0F : value - int_part);
-}
diff --git a/winsup/mingw/mingwex/math/modfl.c b/winsup/mingw/mingwex/math/modfl.c
deleted file mode 100644
index c7ea2cb..0000000
--- a/winsup/mingw/mingwex/math/modfl.c
+++ /dev/null
@@ -1,22 +0,0 @@
-#include <fenv.h>
-#include <math.h>
-#include <errno.h>
-#define FE_ROUNDING_MASK \
- (FE_TONEAREST | FE_DOWNWARD | FE_UPWARD | FE_TOWARDZERO)
-
-long double
-modfl (long double value, long double* iptr)
-{
- long double int_part;
- unsigned short saved_cw;
- unsigned short tmp_cw;
- /* truncate */
- asm ("fnstcw %0;" : "=m" (saved_cw)); /* save control word */
- tmp_cw = (saved_cw & ~FE_ROUNDING_MASK) | FE_TOWARDZERO;
- asm ("fldcw %0;" : : "m" (tmp_cw));
- asm ("frndint;" : "=t" (int_part) : "0" (value)); /* round */
- asm ("fldcw %0;" : : "m" (saved_cw)); /* restore saved cw */
- if (iptr)
- *iptr = int_part;
- return (isinf (value) ? 0.0L : value - int_part);
-}
diff --git a/winsup/mingw/mingwex/math/nearbyint.S b/winsup/mingw/mingwex/math/nearbyint.S
deleted file mode 100644
index 9730aee..0000000
--- a/winsup/mingw/mingwex/math/nearbyint.S
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- * Adapted for use as nearbyint by Ulrich Drepper <drepper@cygnus.com>.
- *
- * Removed header file dependency for use in libmingwex.a by
- * Danny Smith <dannysmith@users.sourceforge.net>
- */
-
- .file "nearbyint.S"
- .text
- .align 4
-.globl _nearbyint
- .def _nearbyint; .scl 2; .type 32; .endef
-_nearbyint:
- fldl 4(%esp)
- pushl %eax
- pushl %ecx
- fnstcw (%esp)
- movl (%esp), %eax
- orl $0x20, %eax
- movl %eax, 4(%esp)
- fldcw 4(%esp)
- frndint
- fclex
- fldcw (%esp)
- popl %ecx
- popl %eax
- ret
diff --git a/winsup/mingw/mingwex/math/nearbyintf.S b/winsup/mingw/mingwex/math/nearbyintf.S
deleted file mode 100644
index 1c57340..0000000
--- a/winsup/mingw/mingwex/math/nearbyintf.S
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- * Adapted for use as nearbyint by Ulrich Drepper <drepper@cygnus.com>.
- *
- * Removed header file dependency for use in libmingwex.a by
- * Danny Smith <dannysmith@users.sourceforge.net>
- */
-
- .file "nearbyintf.S"
- .text
- .align 4
-.globl _nearbyintf
- .def _nearbyintf; .scl 2; .type 32; .endef
-_nearbyintf:
- flds 4(%esp)
- pushl %eax
- pushl %ecx
- fnstcw (%esp)
- movl (%esp), %eax
- orl $0x20, %eax
- movl %eax, 4(%esp)
- fldcw 4(%esp)
- frndint
- fclex
- fldcw (%esp)
- popl %ecx
- popl %eax
- ret
diff --git a/winsup/mingw/mingwex/math/nearbyintl.S b/winsup/mingw/mingwex/math/nearbyintl.S
deleted file mode 100644
index 7dbc2a8..0000000
--- a/winsup/mingw/mingwex/math/nearbyintl.S
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- * Adaptedfor use as nearbyint by Ulrich Drepper <drepper@cygnus.com>.
- *
- * Removed header file dependency for use in libmingwex.a by
- * Danny Smith <dannysmith@users.sourceforge.net>
- */
-
- .file "nearbyintl.S"
- .text
- .align 4
-.globl _nearbyintl
- .def _nearbyintl; .scl 2; .type 32; .endef
-_nearbyintl:
- fldt 4(%esp)
- pushl %eax
- pushl %ecx
- fnstcw (%esp)
- movl (%esp), %eax
- orl $0x20, %eax
- movl %eax, 4(%esp)
- fldcw 4(%esp)
- frndint
- fclex
- fldcw (%esp)
- popl %ecx
- popl %eax
- ret
diff --git a/winsup/mingw/mingwex/math/nextafterf.c b/winsup/mingw/mingwex/math/nextafterf.c
deleted file mode 100644
index 47309a0..0000000
--- a/winsup/mingw/mingwex/math/nextafterf.c
+++ /dev/null
@@ -1,27 +0,0 @@
-#include <math.h>
-
-float
-nextafterf (float x, float y)
-{
- union
- {
- float f;
- unsigned int i;
- } u;
- if (isnan (y) || isnan (x))
- return x + y;
- if (x == y )
- /* nextafter (0.0, -O.0) should return -0.0. */
- return y;
- u.f = x;
- if (x == 0.0F)
- {
- u.i = 1;
- return y > 0.0F ? u.f : -u.f;
- }
- if (((x > 0.0F) ^ (y > x)) == 0)
- u.i++;
- else
- u.i--;
- return u.f;
-}
diff --git a/winsup/mingw/mingwex/math/nextafterl.c b/winsup/mingw/mingwex/math/nextafterl.c
deleted file mode 100755
index eaf6a3f..0000000
--- a/winsup/mingw/mingwex/math/nextafterl.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- nextafterl.c
- Contributed by Danny Smith <dannysmith@users.sourceforge.net>
- No copyright claimed, absolutely no warranties.
-
- 2005-05-09
-*/
-
-#include <math.h>
-
-long double
-nextafterl (long double x, long double y)
-{
- union {
- long double ld;
- struct {
- unsigned long long mantissa;
- unsigned short expn;
- unsigned short pad;
- } __attribute__ ((packed)) parts;
- } u;
-
- /* The normal bit is explicit for long doubles, unlike
- float and double. */
- static const unsigned long long normal_bit = 0x8000000000000000ull;
-
- if (isnan (y) || isnan (x))
- return x + y;
-
- if (x == y )
- /* nextafter (0.0, -O.0) should return -0.0. */
- return y;
-
- u.ld = x;
- if (x == 0.0L)
- {
- u.parts.mantissa = 1ull;
- return y > 0.0L ? u.ld : -u.ld;
- }
-
- if (((x > 0.0L) ^ (y > x)) == 0)
- {
- u.parts.mantissa++;
- if ((u.parts.mantissa & ~normal_bit) == 0ull)
- u.parts.expn++;
- }
- else
- {
- if ((u.parts.mantissa & ~normal_bit) == 0ull)
- u.parts.expn--;
- u.parts.mantissa--;
- }
-
- /* If we have updated the expn of a normal number,
- or moved from denormal to normal, [re]set the normal bit. */
-
- if (u.parts.expn & 0x7fff)
- u.parts.mantissa |= normal_bit;
-
- return u.ld;
-}
-
-/* nexttowardl is the same function with a different name. */
-long double
-nexttowardl (long double, long double) __attribute__ ((alias("nextafterl")));
diff --git a/winsup/mingw/mingwex/math/nexttoward.c b/winsup/mingw/mingwex/math/nexttoward.c
deleted file mode 100755
index 6a4c820..0000000
--- a/winsup/mingw/mingwex/math/nexttoward.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- nexttoward.c
- Contributed by Danny Smith <dannysmith@users.sourceforge.net>
- No copyright claimed, absolutely no warranties.
-
- 2005-05-10
-*/
-
-#include <math.h>
-
-double
-nexttoward (double x, long double y)
-{
- union
- {
- double d;
- unsigned long long ll;
- } u;
-
- long double xx = x;
-
- if (isnan (y) || isnan (x))
- return x + y;
-
- if (xx == y)
- /* nextafter (0.0, -O.0) should return -0.0. */
- return y;
- u.d = x;
- if (x == 0.0)
- {
- u.ll = 1;
- return y > 0.0L ? u.d : -u.d;
- }
-
- /* Non-extended encodings are lexicographically ordered,
- with implicit "normal" bit. */
- if (((x > 0.0) ^ (y > xx)) == 0)
- u.ll++;
- else
- u.ll--;
- return u.d;
-}
diff --git a/winsup/mingw/mingwex/math/nexttowardf.c b/winsup/mingw/mingwex/math/nexttowardf.c
deleted file mode 100755
index 80ac1a3..0000000
--- a/winsup/mingw/mingwex/math/nexttowardf.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- nexttowardf.c
- Contributed by Danny Smith <dannysmith@users.sourceforge.net>
- No copyright claimed, absolutely no warranties.
-
- 2005-05-10
-*/
-
-#include <math.h>
-
-float
-nexttowardf (float x, long double y)
-{
- union
- {
- float f;
- unsigned int i;
- } u;
-
- long double xx = x;
-
- if (isnan (y) || isnan (x))
- return x + y;
- if (xx == y )
- /* nextafter (0.0, -O.0) should return -0.0. */
- return y;
- u.f = x;
- if (x == 0.0F)
- {
- u.i = 1;
- return y > 0.0L ? u.f : -u.f;
- }
- if (((x > 0.0F) ^ (y > xx)) == 0)
- u.i++;
- else
- u.i--;
- return u.f;
-}
diff --git a/winsup/mingw/mingwex/math/pow.c b/winsup/mingw/mingwex/math/pow.c
deleted file mode 100644
index 1fa548e..0000000
--- a/winsup/mingw/mingwex/math/pow.c
+++ /dev/null
@@ -1,781 +0,0 @@
-/* pow.c
- *
- * Power function
- *
- *
- *
- * SYNOPSIS:
- *
- * double x, y, z, pow();
- *
- * z = pow( x, y );
- *
- *
- *
- * DESCRIPTION:
- *
- * Computes x raised to the yth power. Analytically,
- *
- * x**y = exp( y log(x) ).
- *
- * Following Cody and Waite, this program uses a lookup table
- * of 2**-i/16 and pseudo extended precision arithmetic to
- * obtain an extra three bits of accuracy in both the logarithm
- * and the exponential.
- *
- *
- *
- * ACCURACY:
- *
- * Relative error:
- * arithmetic domain # trials peak rms
- * IEEE -26,26 30000 4.2e-16 7.7e-17
- * DEC -26,26 60000 4.8e-17 9.1e-18
- * 1/26 < x < 26, with log(x) uniformly distributed.
- * -26 < y < 26, y uniformly distributed.
- * IEEE 0,8700 30000 1.5e-14 2.1e-15
- * 0.99 < x < 1.01, 0 < y < 8700, uniformly distributed.
- *
- *
- * ERROR MESSAGES:
- *
- * message condition value returned
- * pow overflow x**y > MAXNUM INFINITY
- * pow underflow x**y < 1/MAXNUM 0.0
- * pow domain x<0 and y noninteger 0.0
- *
- */
-
-/*
-Cephes Math Library Release 2.8: June, 2000
-Copyright 1984, 1995, 2000 by Stephen L. Moshier
-*/
-
-/*
-Modified for mingw
-2002-09-27 Danny Smith <dannysmith@users.sourceforge.net>
-*/
-
-#ifdef __MINGW32__
-#include "cephes_mconf.h"
-#else
-#include "mconf.h"
-static char fname[] = {"pow"};
-#endif
-
-#ifndef _SET_ERRNO
-#define _SET_ERRNO(x)
-#endif
-
-#define SQRTH 0.70710678118654752440
-
-#ifdef UNK
-static double P[] = {
- 4.97778295871696322025E-1,
- 3.73336776063286838734E0,
- 7.69994162726912503298E0,
- 4.66651806774358464979E0
-};
-static double Q[] = {
-/* 1.00000000000000000000E0, */
- 9.33340916416696166113E0,
- 2.79999886606328401649E1,
- 3.35994905342304405431E1,
- 1.39995542032307539578E1
-};
-/* 2^(-i/16), IEEE precision */
-static double A[] = {
- 1.00000000000000000000E0,
- 9.57603280698573700036E-1,
- 9.17004043204671215328E-1,
- 8.78126080186649726755E-1,
- 8.40896415253714502036E-1,
- 8.05245165974627141736E-1,
- 7.71105412703970372057E-1,
- 7.38413072969749673113E-1,
- 7.07106781186547572737E-1,
- 6.77127773468446325644E-1,
- 6.48419777325504820276E-1,
- 6.20928906036742001007E-1,
- 5.94603557501360513449E-1,
- 5.69394317378345782288E-1,
- 5.45253866332628844837E-1,
- 5.22136891213706877402E-1,
- 5.00000000000000000000E-1
-};
-static double B[] = {
- 0.00000000000000000000E0,
- 1.64155361212281360176E-17,
- 4.09950501029074826006E-17,
- 3.97491740484881042808E-17,
--4.83364665672645672553E-17,
- 1.26912513974441574796E-17,
- 1.99100761573282305549E-17,
--1.52339103990623557348E-17,
- 0.00000000000000000000E0
-};
-static double R[] = {
- 1.49664108433729301083E-5,
- 1.54010762792771901396E-4,
- 1.33335476964097721140E-3,
- 9.61812908476554225149E-3,
- 5.55041086645832347466E-2,
- 2.40226506959099779976E-1,
- 6.93147180559945308821E-1
-};
-
-#define douba(k) A[k]
-#define doubb(k) B[k]
-#define MEXP 16383.0
-#ifdef DENORMAL
-#define MNEXP -17183.0
-#else
-#define MNEXP -16383.0
-#endif
-#endif
-
-#ifdef DEC
-static unsigned short P[] = {
-0037776,0156313,0175332,0163602,
-0040556,0167577,0052366,0174245,
-0040766,0062753,0175707,0055564,
-0040625,0052035,0131344,0155636,
-};
-static unsigned short Q[] = {
-/*0040200,0000000,0000000,0000000,*/
-0041025,0052644,0154404,0105155,
-0041337,0177772,0007016,0047646,
-0041406,0062740,0154273,0020020,
-0041137,0177054,0106127,0044555,
-};
-static unsigned short A[] = {
-0040200,0000000,0000000,0000000,
-0040165,0022575,0012444,0103314,
-0040152,0140306,0163735,0022071,
-0040140,0146336,0166052,0112341,
-0040127,0042374,0145326,0116553,
-0040116,0022214,0012437,0102201,
-0040105,0063452,0010525,0003333,
-0040075,0004243,0117530,0006067,
-0040065,0002363,0031771,0157145,
-0040055,0054076,0165102,0120513,
-0040045,0177326,0124661,0050471,
-0040036,0172462,0060221,0120422,
-0040030,0033760,0050615,0134251,
-0040021,0141723,0071653,0010703,
-0040013,0112701,0161752,0105727,
-0040005,0125303,0063714,0044173,
-0040000,0000000,0000000,0000000
-};
-static unsigned short B[] = {
-0000000,0000000,0000000,0000000,
-0021473,0040265,0153315,0140671,
-0121074,0062627,0042146,0176454,
-0121413,0003524,0136332,0066212,
-0121767,0046404,0166231,0012553,
-0121257,0015024,0002357,0043574,
-0021736,0106532,0043060,0056206,
-0121310,0020334,0165705,0035326,
-0000000,0000000,0000000,0000000
-};
-
-static unsigned short R[] = {
-0034173,0014076,0137624,0115771,
-0035041,0076763,0003744,0111311,
-0035656,0141766,0041127,0074351,
-0036435,0112533,0073611,0116664,
-0037143,0054106,0134040,0152223,
-0037565,0176757,0176026,0025551,
-0040061,0071027,0173721,0147572
-};
-
-/*
-static double R[] = {
-0.14928852680595608186e-4,
-0.15400290440989764601e-3,
-0.13333541313585784703e-2,
-0.96181290595172416964e-2,
-0.55504108664085595326e-1,
-0.24022650695909537056e0,
-0.69314718055994529629e0
-};
-*/
-#define douba(k) (*(double *)&A[(k)<<2])
-#define doubb(k) (*(double *)&B[(k)<<2])
-#define MEXP 2031.0
-#define MNEXP -2031.0
-#endif
-
-#ifdef IBMPC
-static const unsigned short P[] = {
-0x5cf0,0x7f5b,0xdb99,0x3fdf,
-0xdf15,0xea9e,0xddef,0x400d,
-0xeb6f,0x7f78,0xccbd,0x401e,
-0x9b74,0xb65c,0xaa83,0x4012,
-};
-static const unsigned short Q[] = {
-/*0x0000,0x0000,0x0000,0x3ff0,*/
-0x914e,0x9b20,0xaab4,0x4022,
-0xc9f5,0x41c1,0xffff,0x403b,
-0x6402,0x1b17,0xccbc,0x4040,
-0xe92e,0x918a,0xffc5,0x402b,
-};
-static const unsigned short A[] = {
-0x0000,0x0000,0x0000,0x3ff0,
-0x90da,0xa2a4,0xa4af,0x3fee,
-0xa487,0xdcfb,0x5818,0x3fed,
-0x529c,0xdd85,0x199b,0x3fec,
-0xd3ad,0x995a,0xe89f,0x3fea,
-0xf090,0x82a3,0xc491,0x3fe9,
-0xa0db,0x422a,0xace5,0x3fe8,
-0x0187,0x73eb,0xa114,0x3fe7,
-0x3bcd,0x667f,0xa09e,0x3fe6,
-0x5429,0xdd48,0xab07,0x3fe5,
-0x2a27,0xd536,0xbfda,0x3fe4,
-0x3422,0x4c12,0xdea6,0x3fe3,
-0xb715,0x0a31,0x06fe,0x3fe3,
-0x6238,0x6e75,0x387a,0x3fe2,
-0x517b,0x3c7d,0x72b8,0x3fe1,
-0x890f,0x6cf9,0xb558,0x3fe0,
-0x0000,0x0000,0x0000,0x3fe0
-};
-static const unsigned short B[] = {
-0x0000,0x0000,0x0000,0x0000,
-0x3707,0xd75b,0xed02,0x3c72,
-0xcc81,0x345d,0xa1cd,0x3c87,
-0x4b27,0x5686,0xe9f1,0x3c86,
-0x6456,0x13b2,0xdd34,0xbc8b,
-0x42e2,0xafec,0x4397,0x3c6d,
-0x82e4,0xd231,0xf46a,0x3c76,
-0x8a76,0xb9d7,0x9041,0xbc71,
-0x0000,0x0000,0x0000,0x0000
-};
-static const unsigned short R[] = {
-0x937f,0xd7f2,0x6307,0x3eef,
-0x9259,0x60fc,0x2fbe,0x3f24,
-0xef1d,0xc84a,0xd87e,0x3f55,
-0x33b7,0x6ef1,0xb2ab,0x3f83,
-0x1a92,0xd704,0x6b08,0x3fac,
-0xc56d,0xff82,0xbfbd,0x3fce,
-0x39ef,0xfefa,0x2e42,0x3fe6
-};
-
-#define douba(k) (*(double *)&A[(k)<<2])
-#define doubb(k) (*(double *)&B[(k)<<2])
-#define MEXP 16383.0
-#ifdef DENORMAL
-#define MNEXP -17183.0
-#else
-#define MNEXP -16383.0
-#endif
-#endif
-
-#ifdef MIEEE
-static unsigned short P[] = {
-0x3fdf,0xdb99,0x7f5b,0x5cf0,
-0x400d,0xddef,0xea9e,0xdf15,
-0x401e,0xccbd,0x7f78,0xeb6f,
-0x4012,0xaa83,0xb65c,0x9b74
-};
-static unsigned short Q[] = {
-0x4022,0xaab4,0x9b20,0x914e,
-0x403b,0xffff,0x41c1,0xc9f5,
-0x4040,0xccbc,0x1b17,0x6402,
-0x402b,0xffc5,0x918a,0xe92e
-};
-static unsigned short A[] = {
-0x3ff0,0x0000,0x0000,0x0000,
-0x3fee,0xa4af,0xa2a4,0x90da,
-0x3fed,0x5818,0xdcfb,0xa487,
-0x3fec,0x199b,0xdd85,0x529c,
-0x3fea,0xe89f,0x995a,0xd3ad,
-0x3fe9,0xc491,0x82a3,0xf090,
-0x3fe8,0xace5,0x422a,0xa0db,
-0x3fe7,0xa114,0x73eb,0x0187,
-0x3fe6,0xa09e,0x667f,0x3bcd,
-0x3fe5,0xab07,0xdd48,0x5429,
-0x3fe4,0xbfda,0xd536,0x2a27,
-0x3fe3,0xdea6,0x4c12,0x3422,
-0x3fe3,0x06fe,0x0a31,0xb715,
-0x3fe2,0x387a,0x6e75,0x6238,
-0x3fe1,0x72b8,0x3c7d,0x517b,
-0x3fe0,0xb558,0x6cf9,0x890f,
-0x3fe0,0x0000,0x0000,0x0000
-};
-static unsigned short B[] = {
-0x0000,0x0000,0x0000,0x0000,
-0x3c72,0xed02,0xd75b,0x3707,
-0x3c87,0xa1cd,0x345d,0xcc81,
-0x3c86,0xe9f1,0x5686,0x4b27,
-0xbc8b,0xdd34,0x13b2,0x6456,
-0x3c6d,0x4397,0xafec,0x42e2,
-0x3c76,0xf46a,0xd231,0x82e4,
-0xbc71,0x9041,0xb9d7,0x8a76,
-0x0000,0x0000,0x0000,0x0000
-};
-static unsigned short R[] = {
-0x3eef,0x6307,0xd7f2,0x937f,
-0x3f24,0x2fbe,0x60fc,0x9259,
-0x3f55,0xd87e,0xc84a,0xef1d,
-0x3f83,0xb2ab,0x6ef1,0x33b7,
-0x3fac,0x6b08,0xd704,0x1a92,
-0x3fce,0xbfbd,0xff82,0xc56d,
-0x3fe6,0x2e42,0xfefa,0x39ef
-};
-
-#define douba(k) (*(double *)&A[(k)<<2])
-#define doubb(k) (*(double *)&B[(k)<<2])
-#define MEXP 16383.0
-#ifdef DENORMAL
-#define MNEXP -17183.0
-#else
-#define MNEXP -16383.0
-#endif
-#endif
-
-/* log2(e) - 1 */
-#define LOG2EA 0.44269504088896340736
-
-#define F W
-#define Fa Wa
-#define Fb Wb
-#define G W
-#define Ga Wa
-#define Gb u
-#define H W
-#define Ha Wb
-#define Hb Wb
-
-#ifdef __MINGW32__
-static __inline__ double reduc( double );
-extern double __powi ( double, int );
-extern double pow ( double x, double y);
-
-#else /* __MINGW32__ */
-
-#ifdef ANSIPROT
-extern double floor ( double );
-extern double fabs ( double );
-extern double frexp ( double, int * );
-extern double ldexp ( double, int );
-extern double polevl ( double, void *, int );
-extern double p1evl ( double, void *, int );
-extern double __powi ( double, int );
-extern int signbit ( double );
-extern int isnan ( double );
-extern int isfinite ( double );
-static double reduc ( double );
-#else
-double floor(), fabs(), frexp(), ldexp();
-double polevl(), p1evl(), __powi();
-int signbit(), isnan(), isfinite();
-static double reduc();
-#endif
-extern double MAXNUM;
-#ifdef INFINITIES
-extern double INFINITY;
-#endif
-#ifdef NANS
-extern double NAN;
-#endif
-#ifdef MINUSZERO
-extern double NEGZERO;
-#endif
-
-#endif /* __MINGW32__ */
-
-double pow( x, y )
-double x, y;
-{
-double w, z, W, Wa, Wb, ya, yb, u;
-/* double F, Fa, Fb, G, Ga, Gb, H, Ha, Hb */
-double aw, ay, wy;
-int e, i, nflg, iyflg, yoddint;
-
-if( y == 0.0 )
- return( 1.0 );
-#ifdef NANS
-if( isnan(x) || isnan(y) )
- {
- _SET_ERRNO (EDOM);
- return( x + y );
- }
-#endif
-if( y == 1.0 )
- return( x );
-
-
-#ifdef INFINITIES
-if( !isfinite(y) && (x == 1.0 || x == -1.0) )
- {
- mtherr( "pow", DOMAIN );
-#ifdef NANS
- return( NAN );
-#else
- return( INFINITY );
-#endif
- }
-#endif
-
-if( x == 1.0 )
- return( 1.0 );
-
-if( y >= MAXNUM )
- {
- _SET_ERRNO (ERANGE);
-#ifdef INFINITIES
- if( x > 1.0 )
- return( INFINITY );
-#else
- if( x > 1.0 )
- return( MAXNUM );
-#endif
- if( x > 0.0 && x < 1.0 )
- return( 0.0);
- if( x < -1.0 )
- {
-#ifdef INFINITIES
- return( INFINITY );
-#else
- return( MAXNUM );
-#endif
- }
- if( x > -1.0 && x < 0.0 )
- return( 0.0 );
- }
-if( y <= -MAXNUM )
- {
- _SET_ERRNO (ERANGE);
- if( x > 1.0 )
- return( 0.0 );
-#ifdef INFINITIES
- if( x > 0.0 && x < 1.0 )
- return( INFINITY );
-#else
- if( x > 0.0 && x < 1.0 )
- return( MAXNUM );
-#endif
- if( x < -1.0 )
- return( 0.0 );
-#ifdef INFINITIES
- if( x > -1.0 && x < 0.0 )
- return( INFINITY );
-#else
- if( x > -1.0 && x < 0.0 )
- return( MAXNUM );
-#endif
- }
-if( x >= MAXNUM )
- {
-#if INFINITIES
- if( y > 0.0 )
- return( INFINITY );
-#else
- if( y > 0.0 )
- return( MAXNUM );
-#endif
- return(0.0);
- }
-/* Set iyflg to 1 if y is an integer. */
-iyflg = 0;
-w = floor(y);
-if( w == y )
- iyflg = 1;
-
-/* Test for odd integer y. */
-yoddint = 0;
-if( iyflg )
- {
- ya = fabs(y);
- ya = floor(0.5 * ya);
- yb = 0.5 * fabs(w);
- if( ya != yb )
- yoddint = 1;
- }
-
-if( x <= -MAXNUM )
- {
- if( y > 0.0 )
- {
-#ifdef INFINITIES
- if( yoddint )
- return( -INFINITY );
- return( INFINITY );
-#else
- if( yoddint )
- return( -MAXNUM );
- return( MAXNUM );
-#endif
- }
- if( y < 0.0 )
- {
-#ifdef MINUSZERO
- if( yoddint )
- return( NEGZERO );
-#endif
- return( 0.0 );
- }
- }
-
-nflg = 0; /* flag = 1 if x<0 raised to integer power */
-if( x <= 0.0 )
- {
- if( x == 0.0 )
- {
- if( y < 0.0 )
- {
-#ifdef MINUSZERO
- if( signbit(x) && yoddint )
- return( -INFINITY );
-#endif
-#ifdef INFINITIES
- return( INFINITY );
-#else
- return( MAXNUM );
-#endif
- }
- if( y > 0.0 )
- {
-#ifdef MINUSZERO
- if( signbit(x) && yoddint )
- return( NEGZERO );
-#endif
- return( 0.0 );
- }
- return( 1.0 );
- }
- else
- {
- if( iyflg == 0 )
- { /* noninteger power of negative number */
- mtherr( fname, DOMAIN );
- _SET_ERRNO (EDOM);
-#ifdef NANS
- return(NAN);
-#else
- return(0.0L);
-#endif
- }
- nflg = 1;
- }
- }
-
-/* Integer power of an integer. */
-
-if( iyflg )
- {
- i = w;
- w = floor(x);
- if( (w == x) && (fabs(y) < 32768.0) )
- {
- w = __powi( x, (int) y );
- return( w );
- }
- }
-
-if( nflg )
- x = fabs(x);
-
-/* For results close to 1, use a series expansion. */
-w = x - 1.0;
-aw = fabs(w);
-ay = fabs(y);
-wy = w * y;
-ya = fabs(wy);
-if((aw <= 1.0e-3 && ay <= 1.0)
- || (ya <= 1.0e-3 && ay >= 1.0))
- {
- z = (((((w*(y-5.)/720. + 1./120.)*w*(y-4.) + 1./24.)*w*(y-3.)
- + 1./6.)*w*(y-2.) + 0.5)*w*(y-1.) )*wy + wy + 1.;
- goto done;
- }
-/* These are probably too much trouble. */
-#if 0
-w = y * log(x);
-if (aw > 1.0e-3 && fabs(w) < 1.0e-3)
- {
- z = ((((((
- w/7. + 1.)*w/6. + 1.)*w/5. + 1.)*w/4. + 1.)*w/3. + 1.)*w/2. + 1.)*w + 1.;
- goto done;
- }
-
-if(ya <= 1.0e-3 && aw <= 1.0e-4)
- {
- z = (((((
- wy*1./720.
- + (-w*1./48. + 1./120.) )*wy
- + ((w*17./144. - 1./12.)*w + 1./24.) )*wy
- + (((-w*5./16. + 7./24.)*w - 1./4.)*w + 1./6.) )*wy
- + ((((w*137./360. - 5./12.)*w + 11./24.)*w - 1./2.)*w + 1./2.) )*wy
- + (((((-w*1./6. + 1./5.)*w - 1./4)*w + 1./3.)*w -1./2.)*w ) )*wy
- + wy + 1.0;
- goto done;
- }
-#endif
-
-/* separate significand from exponent */
-x = frexp( x, &e );
-
-#if 0
-/* For debugging, check for gross overflow. */
-if( (e * y) > (MEXP + 1024) )
- goto overflow;
-#endif
-
-/* Find significand of x in antilog table A[]. */
-i = 1;
-if( x <= douba(9) )
- i = 9;
-if( x <= douba(i+4) )
- i += 4;
-if( x <= douba(i+2) )
- i += 2;
-if( x >= douba(1) )
- i = -1;
-i += 1;
-
-
-/* Find (x - A[i])/A[i]
- * in order to compute log(x/A[i]):
- *
- * log(x) = log( a x/a ) = log(a) + log(x/a)
- *
- * log(x/a) = log(1+v), v = x/a - 1 = (x-a)/a
- */
-x -= douba(i);
-x -= doubb(i/2);
-x /= douba(i);
-
-
-/* rational approximation for log(1+v):
- *
- * log(1+v) = v - v**2/2 + v**3 P(v) / Q(v)
- */
-z = x*x;
-w = x * ( z * polevl( x, P, 3 ) / p1evl( x, Q, 4 ) );
-w = w - ldexp( z, -1 ); /* w - 0.5 * z */
-
-/* Convert to base 2 logarithm:
- * multiply by log2(e)
- */
-w = w + LOG2EA * w;
-/* Note x was not yet added in
- * to above rational approximation,
- * so do it now, while multiplying
- * by log2(e).
- */
-z = w + LOG2EA * x;
-z = z + x;
-
-/* Compute exponent term of the base 2 logarithm. */
-w = -i;
-w = ldexp( w, -4 ); /* divide by 16 */
-w += e;
-/* Now base 2 log of x is w + z. */
-
-/* Multiply base 2 log by y, in extended precision. */
-
-/* separate y into large part ya
- * and small part yb less than 1/16
- */
-ya = reduc(y);
-yb = y - ya;
-
-
-F = z * y + w * yb;
-Fa = reduc(F);
-Fb = F - Fa;
-
-G = Fa + w * ya;
-Ga = reduc(G);
-Gb = G - Ga;
-
-H = Fb + Gb;
-Ha = reduc(H);
-w = ldexp( Ga+Ha, 4 );
-
-/* Test the power of 2 for overflow */
-if( w > MEXP )
- {
-#ifndef INFINITIES
- mtherr( fname, OVERFLOW );
-#endif
-#ifdef INFINITIES
- if( nflg && yoddint )
- return( -INFINITY );
- return( INFINITY );
-#else
- if( nflg && yoddint )
- return( -MAXNUM );
- return( MAXNUM );
-#endif
- }
-
-if( w < (MNEXP - 1) )
- {
-#ifndef DENORMAL
- mtherr( fname, UNDERFLOW );
-#endif
-#ifdef MINUSZERO
- if( nflg && yoddint )
- return( NEGZERO );
-#endif
- return( 0.0 );
- }
-
-e = w;
-Hb = H - Ha;
-
-if( Hb > 0.0 )
- {
- e += 1;
- Hb -= 0.0625;
- }
-
-/* Now the product y * log2(x) = Hb + e/16.0.
- *
- * Compute base 2 exponential of Hb,
- * where -0.0625 <= Hb <= 0.
- */
-z = Hb * polevl( Hb, R, 6 ); /* z = 2**Hb - 1 */
-
-/* Express e/16 as an integer plus a negative number of 16ths.
- * Find lookup table entry for the fractional power of 2.
- */
-if( e < 0 )
- i = 0;
-else
- i = 1;
-i = e/16 + i;
-e = 16*i - e;
-w = douba( e );
-z = w + w * z; /* 2**-e * ( 1 + (2**Hb-1) ) */
-z = ldexp( z, i ); /* multiply by integer power of 2 */
-
-done:
-
-/* Negate if odd integer power of negative number */
-if( nflg && yoddint )
- {
-#ifdef MINUSZERO
- if( z == 0.0 )
- z = NEGZERO;
- else
-#endif
- z = -z;
- }
-return( z );
-}
-
-
-/* Find a multiple of 1/16 that is within 1/16 of x. */
-static __inline__ double reduc(x)
-double x;
-{
-double t;
-
-t = ldexp( x, 4 );
-t = floor( t );
-t = ldexp( t, -4 );
-return(t);
-}
diff --git a/winsup/mingw/mingwex/math/powf.c b/winsup/mingw/mingwex/math/powf.c
deleted file mode 100644
index 1af4d2d..0000000
--- a/winsup/mingw/mingwex/math/powf.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <math.h>
-float powf (float x, float y)
- {return (float) pow (x, y);}
diff --git a/winsup/mingw/mingwex/math/powi.c b/winsup/mingw/mingwex/math/powi.c
deleted file mode 100644
index 9dd0c3d..0000000
--- a/winsup/mingw/mingwex/math/powi.c
+++ /dev/null
@@ -1,200 +0,0 @@
-/* powi.c
- *
- * Real raised to integer power
- *
- *
- *
- * SYNOPSIS:
- *
- * double x, y, __powi();
- * int n;
- *
- * y = __powi( x, n );
- *
- *
- *
- * DESCRIPTION:
- *
- * Returns argument x raised to the nth power.
- * The routine efficiently decomposes n as a sum of powers of
- * two. The desired power is a product of two-to-the-kth
- * powers of x. Thus to compute the 32767 power of x requires
- * 28 multiplications instead of 32767 multiplications.
- *
- *
- *
- * ACCURACY:
- *
- *
- * Relative error:
- * arithmetic x domain n domain # trials peak rms
- * DEC .04,26 -26,26 100000 2.7e-16 4.3e-17
- * IEEE .04,26 -26,26 50000 2.0e-15 3.8e-16
- * IEEE 1,2 -1022,1023 50000 8.6e-14 1.6e-14
- *
- * Returns MAXNUM on overflow, zero on underflow.
- *
- */
-
-/* powi.c */
-
-/*
-Cephes Math Library Release 2.8: June, 2000
-Copyright 1984, 1995, 2000 by Stephen L. Moshier
-*/
-
-/*
-Modified for mingw
-2002-07-22 Danny Smith <dannysmith@users.sourceforge.net>
-*/
-
-#ifdef __MINGW32__
-#include "cephes_mconf.h"
-#else
-#include "mconf.h"
-#ifdef ANSIPROT
-extern double log ( double );
-extern double frexp ( double, int * );
-extern int signbit ( double );
-#else
-double log(), frexp();
-int signbit();
-#endif
-extern double NEGZERO, INFINITY, MAXNUM, MAXLOG, MINLOG, LOGE2;
-#endif /* __MINGW32__ */
-
-#ifndef _SET_ERRNO
-#define _SET_ERRNO(x)
-#endif
-
-double __powi( x, nn )
-double x;
-int nn;
-{
-int n, e, sign, asign, lx;
-double w, y, s;
-
-/* See pow.c for these tests. */
-if( x == 0.0 )
- {
- if( nn == 0 )
- return( 1.0 );
- else if( nn < 0 )
- return( INFINITY );
- else
- {
- if( nn & 1 )
- return( x );
- else
- return( 0.0 );
- }
- }
-
-if( nn == 0 )
- return( 1.0 );
-
-if( nn == -1 )
- return( 1.0/x );
-
-if( x < 0.0 )
- {
- asign = -1;
- x = -x;
- }
-else
- asign = 0;
-
-
-if( nn < 0 )
- {
- sign = -1;
- n = -nn;
- }
-else
- {
- sign = 1;
- n = nn;
- }
-
-/* Even power will be positive. */
-if( (n & 1) == 0 )
- asign = 0;
-
-/* Overflow detection */
-
-/* Calculate approximate logarithm of answer */
-s = frexp( x, &lx );
-e = (lx - 1)*n;
-if( (e == 0) || (e > 64) || (e < -64) )
- {
- s = (s - 7.0710678118654752e-1) / (s + 7.0710678118654752e-1);
- s = (2.9142135623730950 * s - 0.5 + lx) * nn * LOGE2;
- }
-else
- {
- s = LOGE2 * e;
- }
-
-if( s > MAXLOG )
- {
- mtherr( "powi", OVERFLOW );
- _SET_ERRNO(ERANGE);
- y = INFINITY;
- goto done;
- }
-
-#if DENORMAL
-if( s < MINLOG )
- {
- y = 0.0;
- goto done;
- }
-
-/* Handle tiny denormal answer, but with less accuracy
- * since roundoff error in 1.0/x will be amplified.
- * The precise demarcation should be the gradual underflow threshold.
- */
-if( (s < (-MAXLOG+2.0)) && (sign < 0) )
- {
- x = 1.0/x;
- sign = -sign;
- }
-#else
-/* do not produce denormal answer */
-if( s < -MAXLOG )
- return(0.0);
-#endif
-
-
-/* First bit of the power */
-if( n & 1 )
- y = x;
-
-else
- y = 1.0;
-
-w = x;
-n >>= 1;
-while( n )
- {
- w = w * w; /* arg to the 2-to-the-kth power */
- if( n & 1 ) /* if that bit is set, then include in product */
- y *= w;
- n >>= 1;
- }
-
-if( sign < 0 )
- y = 1.0/y;
-
-done:
-
-if( asign )
- {
- /* odd power of negative number */
- if( y == 0.0 )
- y = NEGZERO;
- else
- y = -y;
- }
-return(y);
-}
diff --git a/winsup/mingw/mingwex/math/powif.c b/winsup/mingw/mingwex/math/powif.c
deleted file mode 100644
index 160fb54..0000000
--- a/winsup/mingw/mingwex/math/powif.c
+++ /dev/null
@@ -1,198 +0,0 @@
-/* powi.c
- *
- * Real raised to integer power
- *
- *
- *
- * SYNOPSIS:
- *
- * float x, y, __powif();
- * int n;
- *
- * y = powi( x, n );
- *
- *
- *
- * DESCRIPTION:
- *
- * Returns argument x raised to the nth power.
- * The routine efficiently decomposes n as a sum of powers of
- * two. The desired power is a product of two-to-the-kth
- * powers of x. Thus to compute the 32767 power of x requires
- * 28 multiplications instead of 32767 multiplications.
- *
- *
- *
- * ACCURACY:
- *
- *
- * Relative error:
- * arithmetic x domain n domain # trials peak rms
- * DEC .04,26 -26,26 100000 2.7e-16 4.3e-17
- * IEEE .04,26 -26,26 50000 2.0e-15 3.8e-16
- * IEEE 1,2 -1022,1023 50000 8.6e-14 1.6e-14
- *
- * Returns MAXNUM on overflow, zero on underflow.
- *
- */
-
-/* powi.c */
-
-/*
-Cephes Math Library Release 2.8: June, 2000
-Copyright 1984, 1995, 2000 by Stephen L. Moshier
-*/
-
-/*
-Modified for float from powi.c and adapted to mingw
-2002-10-01 Danny Smith <dannysmith@users.sourceforge.net>
-*/
-
-#ifdef __MINGW32__
-#include "cephes_mconf.h"
-#else
-#include "mconf.h"
-#ifdef ANSIPROT
-extern float logf ( float );
-extern float frexpf ( float, int * );
-extern int signbitf ( float );
-#else
-float logf(), frexpf();
-int signbitf();
-#endif
-extern float NEGZEROF, INFINITYF, MAXNUMF, MAXLOGF, MINLOGF, LOGE2F;
-#endif /* __MINGW32__ */
-
-#ifndef _SET_ERRNO
-#define _SET_ERRNO(x)
-#endif
-
-float __powif( float x, int nn )
-{
-int n, e, sign, asign, lx;
-float w, y, s;
-
-/* See pow.c for these tests. */
-if( x == 0.0F )
- {
- if( nn == 0 )
- return( 1.0F );
- else if( nn < 0 )
- return( INFINITYF );
- else
- {
- if( nn & 1 )
- return( x );
- else
- return( 0.0 );
- }
- }
-
-if( nn == 0 )
- return( 1.0 );
-
-if( nn == -1 )
- return( 1.0/x );
-
-if( x < 0.0 )
- {
- asign = -1;
- x = -x;
- }
-else
- asign = 0;
-
-
-if( nn < 0 )
- {
- sign = -1;
- n = -nn;
- }
-else
- {
- sign = 1;
- n = nn;
- }
-
-/* Even power will be positive. */
-if( (n & 1) == 0 )
- asign = 0;
-
-/* Overflow detection */
-
-/* Calculate approximate logarithm of answer */
-s = frexpf( x, &lx );
-e = (lx - 1)*n;
-if( (e == 0) || (e > 64) || (e < -64) )
- {
- s = (s - 7.0710678118654752e-1) / (s + 7.0710678118654752e-1);
- s = (2.9142135623730950 * s - 0.5 + lx) * nn * LOGE2F;
- }
-else
- {
- s = LOGE2F * e;
- }
-
-if( s > MAXLOGF )
- {
- mtherr( "__powif", OVERFLOW );
- _SET_ERRNO(ERANGE);
- y = INFINITYF;
- goto done;
- }
-
-#if DENORMAL
-if( s < MINLOGF )
- {
- y = 0.0;
- goto done;
- }
-
-/* Handle tiny denormal answer, but with less accuracy
- * since roundoff error in 1.0/x will be amplified.
- * The precise demarcation should be the gradual underflow threshold.
- */
-if( (s < (-MAXLOGF+2.0)) && (sign < 0) )
- {
- x = 1.0/x;
- sign = -sign;
- }
-#else
-/* do not produce denormal answer */
-if( s < -MAXLOGF )
- return(0.0);
-#endif
-
-
-/* First bit of the power */
-if( n & 1 )
- y = x;
-
-else
- y = 1.0;
-
-w = x;
-n >>= 1;
-while( n )
- {
- w = w * w; /* arg to the 2-to-the-kth power */
- if( n & 1 ) /* if that bit is set, then include in product */
- y *= w;
- n >>= 1;
- }
-
-if( sign < 0 )
- y = 1.0/y;
-
-done:
-
-if( asign )
- {
- /* odd power of negative number */
- if( y == 0.0 )
- y = NEGZEROF;
- else
- y = -y;
- }
-return(y);
-}
diff --git a/winsup/mingw/mingwex/math/powil.c b/winsup/mingw/mingwex/math/powil.c
deleted file mode 100644
index ec7a286..0000000
--- a/winsup/mingw/mingwex/math/powil.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/* __powil.c
- *
- * Real raised to integer power, long double precision
- *
- *
- *
- * SYNOPSIS:
- *
- * long double x, y, __powil();
- * int n;
- *
- * y = __powil( x, n );
- *
- *
- *
- * DESCRIPTION:
- *
- * Returns argument x raised to the nth power.
- * The routine efficiently decomposes n as a sum of powers of
- * two. The desired power is a product of two-to-the-kth
- * powers of x. Thus to compute the 32767 power of x requires
- * 28 multiplications instead of 32767 multiplications.
- *
- *
- *
- * ACCURACY:
- *
- *
- * Relative error:
- * arithmetic x domain n domain # trials peak rms
- * IEEE .001,1000 -1022,1023 50000 4.3e-17 7.8e-18
- * IEEE 1,2 -1022,1023 20000 3.9e-17 7.6e-18
- * IEEE .99,1.01 0,8700 10000 3.6e-16 7.2e-17
- *
- * Returns INFINITY on overflow, zero on underflow.
- *
- */
-
-/* __powil.c */
-
-/*
-Cephes Math Library Release 2.2: December, 1990
-Copyright 1984, 1990 by Stephen L. Moshier
-Direct inquiries to 30 Frost Street, Cambridge, MA 02140
-*/
-
-/*
-Modified for mingw
-2002-07-22 Danny Smith <dannysmith@users.sourceforge.net>
-*/
-
-#ifdef __MINGW32__
-#include "cephes_mconf.h"
-#else
-#include "mconf.h"
-extern long double MAXNUML, MAXLOGL, MINLOGL;
-extern long double LOGE2L;
-#ifdef ANSIPROT
-extern long double frexpl ( long double, int * );
-#else
-long double frexpl();
-#endif
-#endif /* __MINGW32__ */
-
-#ifndef _SET_ERRNO
-#define _SET_ERRNO(x)
-#endif
-
-long double __powil( x, nn )
-long double x;
-int nn;
-{
-long double w, y;
-long double s;
-int n, e, sign, asign, lx;
-
-if( x == 0.0L )
- {
- if( nn == 0 )
- return( 1.0L );
- else if( nn < 0 )
- return( INFINITYL );
- else
- return( 0.0L );
- }
-
-if( nn == 0 )
- return( 1.0L );
-
-
-if( x < 0.0L )
- {
- asign = -1;
- x = -x;
- }
-else
- asign = 0;
-
-
-if( nn < 0 )
- {
- sign = -1;
- n = -nn;
- }
-else
- {
- sign = 1;
- n = nn;
- }
-
-/* Overflow detection */
-
-/* Calculate approximate logarithm of answer */
-s = x;
-s = frexpl( s, &lx );
-e = (lx - 1)*n;
-if( (e == 0) || (e > 64) || (e < -64) )
- {
- s = (s - 7.0710678118654752e-1L) / (s + 7.0710678118654752e-1L);
- s = (2.9142135623730950L * s - 0.5L + lx) * nn * LOGE2L;
- }
-else
- {
- s = LOGE2L * e;
- }
-
-if( s > MAXLOGL )
- {
- mtherr( "__powil", OVERFLOW );
- _SET_ERRNO(ERANGE);
- y = INFINITYL;
- goto done;
- }
-
-if( s < MINLOGL )
- {
- mtherr( "__powil", UNDERFLOW );
- _SET_ERRNO(ERANGE);
- return(0.0L);
- }
-/* Handle tiny denormal answer, but with less accuracy
- * since roundoff error in 1.0/x will be amplified.
- * The precise demarcation should be the gradual underflow threshold.
- */
-if( s < (-MAXLOGL+2.0L) )
- {
- x = 1.0L/x;
- sign = -sign;
- }
-
-/* First bit of the power */
-if( n & 1 )
- y = x;
-
-else
- {
- y = 1.0L;
- asign = 0;
- }
-
-w = x;
-n >>= 1;
-while( n )
- {
- w = w * w; /* arg to the 2-to-the-kth power */
- if( n & 1 ) /* if that bit is set, then include in product */
- y *= w;
- n >>= 1;
- }
-
-
-done:
-
-if( asign )
- y = -y; /* odd power of negative number */
-if( sign < 0 )
- y = 1.0L/y;
-return(y);
-}
diff --git a/winsup/mingw/mingwex/math/powl.c b/winsup/mingw/mingwex/math/powl.c
deleted file mode 100644
index f85e556..0000000
--- a/winsup/mingw/mingwex/math/powl.c
+++ /dev/null
@@ -1,804 +0,0 @@
-/* powl.c
- *
- * Power function, long double precision
- *
- *
- *
- * SYNOPSIS:
- *
- * long double x, y, z, powl();
- *
- * z = powl( x, y );
- *
- *
- *
- * DESCRIPTION:
- *
- * Computes x raised to the yth power. Analytically,
- *
- * x**y = exp( y log(x) ).
- *
- * Following Cody and Waite, this program uses a lookup table
- * of 2**-i/32 and pseudo extended precision arithmetic to
- * obtain several extra bits of accuracy in both the logarithm
- * and the exponential.
- *
- *
- *
- * ACCURACY:
- *
- * The relative error of pow(x,y) can be estimated
- * by y dl ln(2), where dl is the absolute error of
- * the internally computed base 2 logarithm. At the ends
- * of the approximation interval the logarithm equal 1/32
- * and its relative error is about 1 lsb = 1.1e-19. Hence
- * the predicted relative error in the result is 2.3e-21 y .
- *
- * Relative error:
- * arithmetic domain # trials peak rms
- *
- * IEEE +-1000 40000 2.8e-18 3.7e-19
- * .001 < x < 1000, with log(x) uniformly distributed.
- * -1000 < y < 1000, y uniformly distributed.
- *
- * IEEE 0,8700 60000 6.5e-18 1.0e-18
- * 0.99 < x < 1.01, 0 < y < 8700, uniformly distributed.
- *
- *
- * ERROR MESSAGES:
- *
- * message condition value returned
- * pow overflow x**y > MAXNUM INFINITY
- * pow underflow x**y < 1/MAXNUM 0.0
- * pow domain x<0 and y noninteger 0.0
- *
- */
-
-/*
-Cephes Math Library Release 2.7: May, 1998
-Copyright 1984, 1991, 1998 by Stephen L. Moshier
-*/
-
-/*
-Modified for mingw
-2002-07-22 Danny Smith <dannysmith@users.sourceforge.net>
-*/
-
-#ifdef __MINGW32__
-#include "cephes_mconf.h"
-#else
-#include "mconf.h"
-
-static char fname[] = {"powl"};
-#endif
-
-#ifndef _SET_ERRNO
-#define _SET_ERRNO(x)
-#endif
-
-
-/* Table size */
-#define NXT 32
-/* log2(Table size) */
-#define LNXT 5
-
-#ifdef UNK
-/* log(1+x) = x - .5x^2 + x^3 * P(z)/Q(z)
- * on the domain 2^(-1/32) - 1 <= x <= 2^(1/32) - 1
- */
-static long double P[] = {
- 8.3319510773868690346226E-4L,
- 4.9000050881978028599627E-1L,
- 1.7500123722550302671919E0L,
- 1.4000100839971580279335E0L,
-};
-static long double Q[] = {
-/* 1.0000000000000000000000E0L,*/
- 5.2500282295834889175431E0L,
- 8.4000598057587009834666E0L,
- 4.2000302519914740834728E0L,
-};
-/* A[i] = 2^(-i/32), rounded to IEEE long double precision.
- * If i is even, A[i] + B[i/2] gives additional accuracy.
- */
-static long double A[33] = {
- 1.0000000000000000000000E0L,
- 9.7857206208770013448287E-1L,
- 9.5760328069857364691013E-1L,
- 9.3708381705514995065011E-1L,
- 9.1700404320467123175367E-1L,
- 8.9735453750155359320742E-1L,
- 8.7812608018664974155474E-1L,
- 8.5930964906123895780165E-1L,
- 8.4089641525371454301892E-1L,
- 8.2287773907698242225554E-1L,
- 8.0524516597462715409607E-1L,
- 7.8799042255394324325455E-1L,
- 7.7110541270397041179298E-1L,
- 7.5458221379671136985669E-1L,
- 7.3841307296974965571198E-1L,
- 7.2259040348852331001267E-1L,
- 7.0710678118654752438189E-1L,
- 6.9195494098191597746178E-1L,
- 6.7712777346844636413344E-1L,
- 6.6261832157987064729696E-1L,
- 6.4841977732550483296079E-1L,
- 6.3452547859586661129850E-1L,
- 6.2092890603674202431705E-1L,
- 6.0762367999023443907803E-1L,
- 5.9460355750136053334378E-1L,
- 5.8186242938878875689693E-1L,
- 5.6939431737834582684856E-1L,
- 5.5719337129794626814472E-1L,
- 5.4525386633262882960438E-1L,
- 5.3357020033841180906486E-1L,
- 5.2213689121370692017331E-1L,
- 5.1094857432705833910408E-1L,
- 5.0000000000000000000000E-1L,
-};
-static long double B[17] = {
- 0.0000000000000000000000E0L,
- 2.6176170809902549338711E-20L,
--1.0126791927256478897086E-20L,
- 1.3438228172316276937655E-21L,
- 1.2207982955417546912101E-20L,
--6.3084814358060867200133E-21L,
- 1.3164426894366316434230E-20L,
--1.8527916071632873716786E-20L,
- 1.8950325588932570796551E-20L,
- 1.5564775779538780478155E-20L,
- 6.0859793637556860974380E-21L,
--2.0208749253662532228949E-20L,
- 1.4966292219224761844552E-20L,
- 3.3540909728056476875639E-21L,
--8.6987564101742849540743E-22L,
--1.2327176863327626135542E-20L,
- 0.0000000000000000000000E0L,
-};
-
-/* 2^x = 1 + x P(x),
- * on the interval -1/32 <= x <= 0
- */
-static long double R[] = {
- 1.5089970579127659901157E-5L,
- 1.5402715328927013076125E-4L,
- 1.3333556028915671091390E-3L,
- 9.6181291046036762031786E-3L,
- 5.5504108664798463044015E-2L,
- 2.4022650695910062854352E-1L,
- 6.9314718055994530931447E-1L,
-};
-
-#define douba(k) A[k]
-#define doubb(k) B[k]
-#define MEXP (NXT*16384.0L)
-/* The following if denormal numbers are supported, else -MEXP: */
-#ifdef DENORMAL
-#define MNEXP (-NXT*(16384.0L+64.0L))
-#else
-#define MNEXP (-NXT*16384.0L)
-#endif
-/* log2(e) - 1 */
-#define LOG2EA 0.44269504088896340735992L
-#endif
-
-
-#ifdef IBMPC
-static const unsigned short P[] = {
-0xb804,0xa8b7,0xc6f4,0xda6a,0x3ff4, XPD
-0x7de9,0xcf02,0x58c0,0xfae1,0x3ffd, XPD
-0x405a,0x3722,0x67c9,0xe000,0x3fff, XPD
-0xcd99,0x6b43,0x87ca,0xb333,0x3fff, XPD
-};
-static const unsigned short Q[] = {
-/* 0x0000,0x0000,0x0000,0x8000,0x3fff, */
-0x6307,0xa469,0x3b33,0xa800,0x4001, XPD
-0xfec2,0x62d7,0xa51c,0x8666,0x4002, XPD
-0xda32,0xd072,0xa5d7,0x8666,0x4001, XPD
-};
-static const unsigned short A[] = {
-0x0000,0x0000,0x0000,0x8000,0x3fff, XPD
-0x033a,0x722a,0xb2db,0xfa83,0x3ffe, XPD
-0xcc2c,0x2486,0x7d15,0xf525,0x3ffe, XPD
-0xf5cb,0xdcda,0xb99b,0xefe4,0x3ffe, XPD
-0x392f,0xdd24,0xc6e7,0xeac0,0x3ffe, XPD
-0x48a8,0x7c83,0x06e7,0xe5b9,0x3ffe, XPD
-0xe111,0x2a94,0xdeec,0xe0cc,0x3ffe, XPD
-0x3755,0xdaf2,0xb797,0xdbfb,0x3ffe, XPD
-0x6af4,0xd69d,0xfcca,0xd744,0x3ffe, XPD
-0xe45a,0xf12a,0x1d91,0xd2a8,0x3ffe, XPD
-0x80e4,0x1f84,0x8c15,0xce24,0x3ffe, XPD
-0x27a3,0x6e2f,0xbd86,0xc9b9,0x3ffe, XPD
-0xdadd,0x5506,0x2a11,0xc567,0x3ffe, XPD
-0x9456,0x6670,0x4cca,0xc12c,0x3ffe, XPD
-0x36bf,0x580c,0xa39f,0xbd08,0x3ffe, XPD
-0x9ee9,0x62fb,0xaf47,0xb8fb,0x3ffe, XPD
-0x6484,0xf9de,0xf333,0xb504,0x3ffe, XPD
-0x2590,0xd2ac,0xf581,0xb123,0x3ffe, XPD
-0x4ac6,0x42a1,0x3eea,0xad58,0x3ffe, XPD
-0x0ef8,0xea7c,0x5ab4,0xa9a1,0x3ffe, XPD
-0x38ea,0xb151,0xd6a9,0xa5fe,0x3ffe, XPD
-0x6819,0x0c49,0x4303,0xa270,0x3ffe, XPD
-0x11ae,0x91a1,0x3260,0x9ef5,0x3ffe, XPD
-0x5539,0xd54e,0x39b9,0x9b8d,0x3ffe, XPD
-0xa96f,0x8db8,0xf051,0x9837,0x3ffe, XPD
-0x0961,0xfef7,0xefa8,0x94f4,0x3ffe, XPD
-0xc336,0xab11,0xd373,0x91c3,0x3ffe, XPD
-0x53c0,0x45cd,0x398b,0x8ea4,0x3ffe, XPD
-0xd6e7,0xea8b,0xc1e3,0x8b95,0x3ffe, XPD
-0x8527,0x92da,0x0e80,0x8898,0x3ffe, XPD
-0x7b15,0xcc48,0xc367,0x85aa,0x3ffe, XPD
-0xa1d7,0xac2b,0x8698,0x82cd,0x3ffe, XPD
-0x0000,0x0000,0x0000,0x8000,0x3ffe, XPD
-};
-static const unsigned short B[] = {
-0x0000,0x0000,0x0000,0x0000,0x0000, XPD
-0x1f87,0xdb30,0x18f5,0xf73a,0x3fbd, XPD
-0xac15,0x3e46,0x2932,0xbf4a,0xbfbc, XPD
-0x7944,0xba66,0xa091,0xcb12,0x3fb9, XPD
-0xff78,0x40b4,0x2ee6,0xe69a,0x3fbc, XPD
-0xc895,0x5069,0xe383,0xee53,0xbfbb, XPD
-0x7cde,0x9376,0x4325,0xf8ab,0x3fbc, XPD
-0xa10c,0x25e0,0xc093,0xaefd,0xbfbd, XPD
-0x7d3e,0xea95,0x1366,0xb2fb,0x3fbd, XPD
-0x5d89,0xeb34,0x5191,0x9301,0x3fbd, XPD
-0x80d9,0xb883,0xfb10,0xe5eb,0x3fbb, XPD
-0x045d,0x288c,0xc1ec,0xbedd,0xbfbd, XPD
-0xeded,0x5c85,0x4630,0x8d5a,0x3fbd, XPD
-0x9d82,0xe5ac,0x8e0a,0xfd6d,0x3fba, XPD
-0x6dfd,0xeb58,0xaf14,0x8373,0xbfb9, XPD
-0xf938,0x7aac,0x91cf,0xe8da,0xbfbc, XPD
-0x0000,0x0000,0x0000,0x0000,0x0000, XPD
-};
-static const unsigned short R[] = {
-0xa69b,0x530e,0xee1d,0xfd2a,0x3fee, XPD
-0xc746,0x8e7e,0x5960,0xa182,0x3ff2, XPD
-0x63b6,0xadda,0xfd6a,0xaec3,0x3ff5, XPD
-0xc104,0xfd99,0x5b7c,0x9d95,0x3ff8, XPD
-0xe05e,0x249d,0x46b8,0xe358,0x3ffa, XPD
-0x5d1d,0x162c,0xeffc,0xf5fd,0x3ffc, XPD
-0x79aa,0xd1cf,0x17f7,0xb172,0x3ffe, XPD
-};
-
-/* 10 byte sizes versus 12 byte */
-#define douba(k) (*(long double *)(&A[(sizeof( long double )/2)*(k)]))
-#define doubb(k) (*(long double *)(&B[(sizeof( long double )/2)*(k)]))
-#define MEXP (NXT*16384.0L)
-#ifdef DENORMAL
-#define MNEXP (-NXT*(16384.0L+64.0L))
-#else
-#define MNEXP (-NXT*16384.0L)
-#endif
-static const
-union
-{
- unsigned short L[6];
- long double ld;
-} log2ea = {{0xc2ef,0x705f,0xeca5,0xe2a8,0x3ffd, XPD}};
-
-#define LOG2EA (log2ea.ld)
-/*
-#define LOG2EA 0.44269504088896340735992L
-*/
-#endif
-
-#ifdef MIEEE
-static long P[] = {
-0x3ff40000,0xda6ac6f4,0xa8b7b804,
-0x3ffd0000,0xfae158c0,0xcf027de9,
-0x3fff0000,0xe00067c9,0x3722405a,
-0x3fff0000,0xb33387ca,0x6b43cd99,
-};
-static long Q[] = {
-/* 0x3fff0000,0x80000000,0x00000000, */
-0x40010000,0xa8003b33,0xa4696307,
-0x40020000,0x8666a51c,0x62d7fec2,
-0x40010000,0x8666a5d7,0xd072da32,
-};
-static long A[] = {
-0x3fff0000,0x80000000,0x00000000,
-0x3ffe0000,0xfa83b2db,0x722a033a,
-0x3ffe0000,0xf5257d15,0x2486cc2c,
-0x3ffe0000,0xefe4b99b,0xdcdaf5cb,
-0x3ffe0000,0xeac0c6e7,0xdd24392f,
-0x3ffe0000,0xe5b906e7,0x7c8348a8,
-0x3ffe0000,0xe0ccdeec,0x2a94e111,
-0x3ffe0000,0xdbfbb797,0xdaf23755,
-0x3ffe0000,0xd744fcca,0xd69d6af4,
-0x3ffe0000,0xd2a81d91,0xf12ae45a,
-0x3ffe0000,0xce248c15,0x1f8480e4,
-0x3ffe0000,0xc9b9bd86,0x6e2f27a3,
-0x3ffe0000,0xc5672a11,0x5506dadd,
-0x3ffe0000,0xc12c4cca,0x66709456,
-0x3ffe0000,0xbd08a39f,0x580c36bf,
-0x3ffe0000,0xb8fbaf47,0x62fb9ee9,
-0x3ffe0000,0xb504f333,0xf9de6484,
-0x3ffe0000,0xb123f581,0xd2ac2590,
-0x3ffe0000,0xad583eea,0x42a14ac6,
-0x3ffe0000,0xa9a15ab4,0xea7c0ef8,
-0x3ffe0000,0xa5fed6a9,0xb15138ea,
-0x3ffe0000,0xa2704303,0x0c496819,
-0x3ffe0000,0x9ef53260,0x91a111ae,
-0x3ffe0000,0x9b8d39b9,0xd54e5539,
-0x3ffe0000,0x9837f051,0x8db8a96f,
-0x3ffe0000,0x94f4efa8,0xfef70961,
-0x3ffe0000,0x91c3d373,0xab11c336,
-0x3ffe0000,0x8ea4398b,0x45cd53c0,
-0x3ffe0000,0x8b95c1e3,0xea8bd6e7,
-0x3ffe0000,0x88980e80,0x92da8527,
-0x3ffe0000,0x85aac367,0xcc487b15,
-0x3ffe0000,0x82cd8698,0xac2ba1d7,
-0x3ffe0000,0x80000000,0x00000000,
-};
-static long B[51] = {
-0x00000000,0x00000000,0x00000000,
-0x3fbd0000,0xf73a18f5,0xdb301f87,
-0xbfbc0000,0xbf4a2932,0x3e46ac15,
-0x3fb90000,0xcb12a091,0xba667944,
-0x3fbc0000,0xe69a2ee6,0x40b4ff78,
-0xbfbb0000,0xee53e383,0x5069c895,
-0x3fbc0000,0xf8ab4325,0x93767cde,
-0xbfbd0000,0xaefdc093,0x25e0a10c,
-0x3fbd0000,0xb2fb1366,0xea957d3e,
-0x3fbd0000,0x93015191,0xeb345d89,
-0x3fbb0000,0xe5ebfb10,0xb88380d9,
-0xbfbd0000,0xbeddc1ec,0x288c045d,
-0x3fbd0000,0x8d5a4630,0x5c85eded,
-0x3fba0000,0xfd6d8e0a,0xe5ac9d82,
-0xbfb90000,0x8373af14,0xeb586dfd,
-0xbfbc0000,0xe8da91cf,0x7aacf938,
-0x00000000,0x00000000,0x00000000,
-};
-static long R[] = {
-0x3fee0000,0xfd2aee1d,0x530ea69b,
-0x3ff20000,0xa1825960,0x8e7ec746,
-0x3ff50000,0xaec3fd6a,0xadda63b6,
-0x3ff80000,0x9d955b7c,0xfd99c104,
-0x3ffa0000,0xe35846b8,0x249de05e,
-0x3ffc0000,0xf5fdeffc,0x162c5d1d,
-0x3ffe0000,0xb17217f7,0xd1cf79aa,
-};
-
-#define douba(k) (*(long double *)&A[3*(k)])
-#define doubb(k) (*(long double *)&B[3*(k)])
-#define MEXP (NXT*16384.0L)
-#ifdef DENORMAL
-#define MNEXP (-NXT*(16384.0L+64.0L))
-#else
-#define MNEXP (-NXT*16382.0L)
-#endif
-static long L[3] = {0x3ffd0000,0xe2a8eca5,0x705fc2ef};
-#define LOG2EA (*(long double *)(&L[0]))
-#endif
-
-
-#define F W
-#define Fa Wa
-#define Fb Wb
-#define G W
-#define Ga Wa
-#define Gb u
-#define H W
-#define Ha Wb
-#define Hb Wb
-
-#ifndef __MINGW32__
-extern long double MAXNUML;
-#endif
-
-static VOLATILE long double z;
-static long double w, W, Wa, Wb, ya, yb, u;
-
-#ifdef __MINGW32__
-static __inline__ long double reducl( long double );
-extern long double __powil ( long double, int );
-extern long double powl ( long double x, long double y);
-#else
-#ifdef ANSIPROT
-extern long double floorl ( long double );
-extern long double fabsl ( long double );
-extern long double frexpl ( long double, int * );
-extern long double ldexpl ( long double, int );
-extern long double polevll ( long double, void *, int );
-extern long double p1evll ( long double, void *, int );
-extern long double __powil ( long double, int );
-extern int isnanl ( long double );
-extern int isfinitel ( long double );
-static long double reducl( long double );
-extern int signbitl ( long double );
-#else
-long double floorl(), fabsl(), frexpl(), ldexpl();
-long double polevll(), p1evll(), __powil();
-static long double reducl();
-int isnanl(), isfinitel(), signbitl();
-#endif /* __MINGW32__ */
-
-#ifdef INFINITIES
-extern long double INFINITYL;
-#else
-#define INFINITYL MAXNUML
-#endif
-
-#ifdef NANS
-extern long double NANL;
-#endif
-#ifdef MINUSZERO
-extern long double NEGZEROL;
-#endif
-
-#endif /* __MINGW32__ */
-
-#ifdef __MINGW32__
-
-/* No error checking. We handle Infs and zeros ourselves. */
-static __inline__ long double
-__fast_ldexpl (long double x, int expn)
-{
- long double res;
- __asm__ ("fscale"
- : "=t" (res)
- : "0" (x), "u" ((long double) expn));
- return res;
-}
-
-#define ldexpl __fast_ldexpl
-
-#endif
-
-
-long double powl( x, y )
-long double x, y;
-{
-/* double F, Fa, Fb, G, Ga, Gb, H, Ha, Hb */
-int i, nflg, iyflg, yoddint;
-long e;
-
-if( y == 0.0L )
- return( 1.0L );
-
-#ifdef NANS
-if( isnanl(x) )
- {
- _SET_ERRNO (EDOM);
- return( x );
- }
-if( isnanl(y) )
- {
- _SET_ERRNO (EDOM);
- return( y );
- }
-#endif
-
-if( y == 1.0L )
- return( x );
-
-if( isinfl(y) && (x == -1.0L || x == 1.0L) )
- return( y );
-
-if( x == 1.0L )
- return( 1.0L );
-
-if( y >= MAXNUML )
- {
- _SET_ERRNO (ERANGE);
-#ifdef INFINITIES
- if( x > 1.0L )
- return( INFINITYL );
-#else
- if( x > 1.0L )
- return( MAXNUML );
-#endif
- if( x > 0.0L && x < 1.0L )
- return( 0.0L );
-#ifdef INFINITIES
- if( x < -1.0L )
- return( INFINITYL );
-#else
- if( x < -1.0L )
- return( MAXNUML );
-#endif
- if( x > -1.0L && x < 0.0L )
- return( 0.0L );
- }
-if( y <= -MAXNUML )
- {
- _SET_ERRNO (ERANGE);
- if( x > 1.0L )
- return( 0.0L );
-#ifdef INFINITIES
- if( x > 0.0L && x < 1.0L )
- return( INFINITYL );
-#else
- if( x > 0.0L && x < 1.0L )
- return( MAXNUML );
-#endif
- if( x < -1.0L )
- return( 0.0L );
-#ifdef INFINITIES
- if( x > -1.0L && x < 0.0L )
- return( INFINITYL );
-#else
- if( x > -1.0L && x < 0.0L )
- return( MAXNUML );
-#endif
- }
-if( x >= MAXNUML )
- {
-#if INFINITIES
- if( y > 0.0L )
- return( INFINITYL );
-#else
- if( y > 0.0L )
- return( MAXNUML );
-#endif
- return( 0.0L );
- }
-
-w = floorl(y);
-/* Set iyflg to 1 if y is an integer. */
-iyflg = 0;
-if( w == y )
- iyflg = 1;
-
-/* Test for odd integer y. */
-yoddint = 0;
-if( iyflg )
- {
- ya = fabsl(y);
- ya = floorl(0.5L * ya);
- yb = 0.5L * fabsl(w);
- if( ya != yb )
- yoddint = 1;
- }
-
-if( x <= -MAXNUML )
- {
- if( y > 0.0L )
- {
-#ifdef INFINITIES
- if( yoddint )
- return( -INFINITYL );
- return( INFINITYL );
-#else
- if( yoddint )
- return( -MAXNUML );
- return( MAXNUML );
-#endif
- }
- if( y < 0.0L )
- {
-#ifdef MINUSZERO
- if( yoddint )
- return( NEGZEROL );
-#endif
- return( 0.0 );
- }
- }
-
-
-nflg = 0; /* flag = 1 if x<0 raised to integer power */
-if( x <= 0.0L )
- {
- if( x == 0.0L )
- {
- if( y < 0.0 )
- {
-#ifdef MINUSZERO
- if( signbitl(x) && yoddint )
- return( -INFINITYL );
-#endif
-#ifdef INFINITIES
- return( INFINITYL );
-#else
- return( MAXNUML );
-#endif
- }
- if( y > 0.0 )
- {
-#ifdef MINUSZERO
- if( signbitl(x) && yoddint )
- return( NEGZEROL );
-#endif
- return( 0.0 );
- }
- if( y == 0.0L )
- return( 1.0L ); /* 0**0 */
- else
- return( 0.0L ); /* 0**y */
- }
- else
- {
- if( iyflg == 0 )
- { /* noninteger power of negative number */
- mtherr( fname, DOMAIN );
- _SET_ERRNO (EDOM);
-#ifdef NANS
- return(NANL);
-#else
- return(0.0L);
-#endif
- }
- nflg = 1;
- }
- }
-
-/* Integer power of an integer. */
-
-if( iyflg )
- {
- i = w;
- w = floorl(x);
- if( (w == x) && (fabsl(y) < 32768.0) )
- {
- w = __powil( x, (int) y );
- return( w );
- }
- }
-
-
-if( nflg )
- x = fabsl(x);
-
-/* separate significand from exponent */
-x = frexpl( x, &i );
-e = i;
-
-/* find significand in antilog table A[] */
-i = 1;
-if( x <= douba(17) )
- i = 17;
-if( x <= douba(i+8) )
- i += 8;
-if( x <= douba(i+4) )
- i += 4;
-if( x <= douba(i+2) )
- i += 2;
-if( x >= douba(1) )
- i = -1;
-i += 1;
-
-
-/* Find (x - A[i])/A[i]
- * in order to compute log(x/A[i]):
- *
- * log(x) = log( a x/a ) = log(a) + log(x/a)
- *
- * log(x/a) = log(1+v), v = x/a - 1 = (x-a)/a
- */
-x -= douba(i);
-x -= doubb(i/2);
-x /= douba(i);
-
-
-/* rational approximation for log(1+v):
- *
- * log(1+v) = v - v**2/2 + v**3 P(v) / Q(v)
- */
-z = x*x;
-w = x * ( z * polevll( x, P, 3 ) / p1evll( x, Q, 3 ) );
-w = w - ldexpl( z, -1 ); /* w - 0.5 * z */
-
-/* Convert to base 2 logarithm:
- * multiply by log2(e) = 1 + LOG2EA
- */
-z = LOG2EA * w;
-z += w;
-z += LOG2EA * x;
-z += x;
-
-/* Compute exponent term of the base 2 logarithm. */
-w = -i;
-w = ldexpl( w, -LNXT ); /* divide by NXT */
-w += e;
-/* Now base 2 log of x is w + z. */
-
-/* Multiply base 2 log by y, in extended precision. */
-
-/* separate y into large part ya
- * and small part yb less than 1/NXT
- */
-ya = reducl(y);
-yb = y - ya;
-
-/* (w+z)(ya+yb)
- * = w*ya + w*yb + z*y
- */
-F = z * y + w * yb;
-Fa = reducl(F);
-Fb = F - Fa;
-
-G = Fa + w * ya;
-Ga = reducl(G);
-Gb = G - Ga;
-
-H = Fb + Gb;
-Ha = reducl(H);
-w = ldexpl( Ga + Ha, LNXT );
-
-/* Test the power of 2 for overflow */
-if( w > MEXP )
- {
- _SET_ERRNO (ERANGE);
- mtherr( fname, OVERFLOW );
- return( MAXNUML );
- }
-
-if( w < MNEXP )
- {
- _SET_ERRNO (ERANGE);
- mtherr( fname, UNDERFLOW );
- return( 0.0L );
- }
-
-e = w;
-Hb = H - Ha;
-
-if( Hb > 0.0L )
- {
- e += 1;
- Hb -= (1.0L/NXT); /*0.0625L;*/
- }
-
-/* Now the product y * log2(x) = Hb + e/NXT.
- *
- * Compute base 2 exponential of Hb,
- * where -0.0625 <= Hb <= 0.
- */
-z = Hb * polevll( Hb, R, 6 ); /* z = 2**Hb - 1 */
-
-/* Express e/NXT as an integer plus a negative number of (1/NXT)ths.
- * Find lookup table entry for the fractional power of 2.
- */
-if( e < 0 )
- i = 0;
-else
- i = 1;
-i = e/NXT + i;
-e = NXT*i - e;
-w = douba( e );
-z = w * z; /* 2**-e * ( 1 + (2**Hb-1) ) */
-z = z + w;
-z = ldexpl( z, i ); /* multiply by integer power of 2 */
-
-if( nflg )
- {
-/* For negative x,
- * find out if the integer exponent
- * is odd or even.
- */
- w = ldexpl( y, -1 );
- w = floorl(w);
- w = ldexpl( w, 1 );
- if( w != y )
- z = -z; /* odd exponent */
- }
-
-return( z );
-}
-
-static __inline__ long double
-__convert_inf_to_maxnum(long double x)
-{
- if (isinf(x))
- return (x > 0.0L ? MAXNUML : -MAXNUML);
- else
- return x;
-}
-
-
-/* Find a multiple of 1/NXT that is within 1/NXT of x. */
-static __inline__ long double reducl(x)
-long double x;
-{
-long double t;
-
-/* If the call to ldexpl overflows, set it to MAXNUML.
- This avoids Inf - Inf = Nan result when calculating the 'small'
- part of a reduction. Instead, the small part becomes Inf,
- causing under/overflow when adding it to the 'large' part.
- There must be a cleaner way of doing this. */
-t = __convert_inf_to_maxnum (ldexpl( x, LNXT ));
-t = floorl( t );
-t = ldexpl( t, -LNXT );
-return(t);
-}
diff --git a/winsup/mingw/mingwex/math/remainder.S b/winsup/mingw/mingwex/math/remainder.S
deleted file mode 100644
index 01930d3..0000000
--- a/winsup/mingw/mingwex/math/remainder.S
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- */
-
- .file "remainder.S"
- .text
- .align 4
-.globl _remainder
- .def _remainder; .scl 2; .type 32; .endef
-_remainder:
- fldl 12(%esp)
- fldl 4(%esp)
-1: fprem1
- fstsw %ax
- sahf
- jp 1b
- fstp %st(1)
- ret
diff --git a/winsup/mingw/mingwex/math/remainderf.S b/winsup/mingw/mingwex/math/remainderf.S
deleted file mode 100644
index 81e7841..0000000
--- a/winsup/mingw/mingwex/math/remainderf.S
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- */
-
- .file "remainderf.S"
- .text
- .align 4
-.globl _remainder
- .def _remainderf; .scl 2; .type 32; .endef
-_remainderf:
- flds 8(%esp)
- flds 4(%esp)
-1: fprem1
- fstsw %ax
- sahf
- jp 1b
- fstp %st(1)
- ret
diff --git a/winsup/mingw/mingwex/math/remainderl.S b/winsup/mingw/mingwex/math/remainderl.S
deleted file mode 100644
index b5ce373..0000000
--- a/winsup/mingw/mingwex/math/remainderl.S
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
- * Removed header file dependency for use in libmingwex.a by
- * Danny Smith <dannysmith@users.sourceforge.net>
- */
-
- .file "remainderl.S"
- .text
- .align 4
-.globl _remainderl
- .def _remainderl; .scl 2; .type 32; .endef
-_remainderl:
- fldt 16(%esp)
- fldt 4(%esp)
-1: fprem1
- fstsw %ax
- sahf
- jp 1b
- fstp %st(1)
- ret
diff --git a/winsup/mingw/mingwex/math/remquo.S b/winsup/mingw/mingwex/math/remquo.S
deleted file mode 100644
index 987c37c..0000000
--- a/winsup/mingw/mingwex/math/remquo.S
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Written by Ulrich Drepper <drepper@cygnus.com>.
- * Based on e_remainder by J.T. Conklin <jtc@netbsd.org>.
- * Removed header file dependency for use in libmingwex.a by
- * Danny Smith <dannysmith@users.sourceforge.ne
- * Public domain.
- */
-
- .file "remquo.S"
- .text
- .align 4;
-.globl _remquo;
-_remquo:
- fldl 4 +8(%esp)
- fldl 4(%esp)
-1: fprem1
- fstsw %ax
- sahf
- jp 1b
- fstp %st(1)
- movl %eax, %ecx
- shrl $8, %eax
- shrl $12, %ecx
- andl $4, %ecx
- andl $3, %eax
- orl %eax, %ecx
- movl $0xef2960, %eax
- shrl %cl, %eax
- andl $3, %eax
- movl 4 +8 +8(%esp), %ecx
- movl 4 +4(%esp), %edx
- xorl 4 +8 +4(%esp), %edx
- testl $0x80000000, %edx
- jz 1f
- negl %eax
-1: movl %eax, (%ecx)
-
- ret
diff --git a/winsup/mingw/mingwex/math/remquof.S b/winsup/mingw/mingwex/math/remquof.S
deleted file mode 100644
index af540ef..0000000
--- a/winsup/mingw/mingwex/math/remquof.S
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Written by Ulrich Drepper <drepper@cygnus.com>.
- * Based on e_remainder by J.T. Conklin <jtc@netbsd.org>.
- * Removed header file dependency for use in libmingwex.a by
- * Danny Smith <dannysmith@users.sourceforge.ne
- * Public domain.
- */
-
- .file "remquo.S"
- .text
- .align 4;
-.globl _remquof;
-_remquof:
- flds 4 +4(%esp)
- flds 4(%esp)
-1: fprem1
- fstsw %ax
- sahf
- jp 1b
- fstp %st(1)
- movl %eax, %ecx
- shrl $8, %eax
- shrl $12, %ecx
- andl $4, %ecx
- andl $3, %eax
- orl %eax, %ecx
- movl $0xef2960, %eax
- shrl %cl, %eax
- andl $3, %eax
- movl 4 +4 +4(%esp), %ecx
- movl 4(%esp), %edx
- xorl 4 +4(%esp), %edx
- testl $0x80000000, %edx
- jz 1f
- negl %eax
-1: movl %eax, (%ecx)
-
- ret
diff --git a/winsup/mingw/mingwex/math/remquol.S b/winsup/mingw/mingwex/math/remquol.S
deleted file mode 100644
index e6f1b54..0000000
--- a/winsup/mingw/mingwex/math/remquol.S
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Written by Ulrich Drepper <drepper@cygnus.com>.
- * Based on e_remainder by J.T. Conklin <jtc@netbsd.org>.
- * Removed header file dependency for use in libmingwex.a by
- * Danny Smith <dannysmith@users.sourceforge.net>
- * Public domain.
- */
- .text
- .align 4;
-.globl _remquol;
- _remquol:
- fldt 4 +12(%esp)
- fldt 4(%esp)
-1: fprem1
- fstsw %ax
- sahf
- jp 1b
- fstp %st(1)
- movl %eax, %ecx
- shrl $8, %eax
- shrl $12, %ecx
- andl $4, %ecx
- andl $3, %eax
- orl %eax, %ecx
- movl $0xef2960, %eax
- shrl %cl, %eax
- andl $3, %eax
- movl 4 +12 +12(%esp), %ecx
- movl 4 +8(%esp), %edx
- xorl 4 +12 +8(%esp), %edx
- testl $0x8000, %edx
- jz 1f
- negl %eax
-1: movl %eax, (%ecx)
-
- ret
diff --git a/winsup/mingw/mingwex/math/rint.c b/winsup/mingw/mingwex/math/rint.c
deleted file mode 100644
index 3198f4b..0000000
--- a/winsup/mingw/mingwex/math/rint.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <math.h>
-double rint (double x){
- double retval;
- __asm__ ("frndint;" : "=t" (retval) : "0" (x));
- return retval;
-}
diff --git a/winsup/mingw/mingwex/math/rintf.c b/winsup/mingw/mingwex/math/rintf.c
deleted file mode 100644
index 0b05e8f..0000000
--- a/winsup/mingw/mingwex/math/rintf.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <math.h>
-
-float rintf (float x){
- float retval;
- __asm__ ("frndint;": "=t" (retval) : "0" (x));
- return retval;
-}
diff --git a/winsup/mingw/mingwex/math/rintl.c b/winsup/mingw/mingwex/math/rintl.c
deleted file mode 100644
index ffc9d11..0000000
--- a/winsup/mingw/mingwex/math/rintl.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <math.h>
-
-long double rintl (long double x){
- long double retval;
- __asm__ ("frndint;": "=t" (retval) : "0" (x));
- return retval;
-}
diff --git a/winsup/mingw/mingwex/math/round_generic.c b/winsup/mingw/mingwex/math/round_generic.c
deleted file mode 100644
index b3e0f26..0000000
--- a/winsup/mingw/mingwex/math/round_generic.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * round_generic.c
- *
- * $Id$
- *
- * Provides a generic implementation for the `round()', `roundf()'
- * and `roundl()' functions; compile with `-D FUNCTION=name', with
- * `name' set to each of these three in turn, to create separate
- * object files for each of the three functions.
- *
- * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- *
- * This is free software. You may redistribute and/or modify it as you
- * see fit, without restriction of copyright.
- *
- * This software is provided "as is", in the hope that it may be useful,
- * but WITHOUT WARRANTY OF ANY KIND, not even any implied warranty of
- * MERCHANTABILITY, nor of FITNESS FOR ANY PARTICULAR PURPOSE. At no
- * time will the author accept any form of liability for any damages,
- * however caused, resulting from the use of this software.
- *
- */
-#ifndef FUNCTION
-/*
- * Normally specified with `-D FUNCTION=name', on the command line.
- * Valid FUNCTION names are `round', `roundf' and `roundl'; specifying
- * anything else will most likely cause a compilation error. If user
- * did not specify any FUNCTION name, default to `round'.
- */
-#define FUNCTION round
-#endif
-
-#include "round_internal.h"
-
-/* Generic implementation.
- * The user is required to specify the FUNCTION name;
- * the RETURN_TYPE and INPUT_TYPE macros resolve to appropriate
- * type declarations, to match the selected FUNCTION prototype.
- */
-RETURN_TYPE FUNCTION( INPUT_TYPE x )
-{
- /* Round to nearest integer, away from zero for half-way.
- *
- * We split it with the `round_internal()' function in
- * a private header file, so that it may be shared by this,
- * `lround()' and `llround()' implementations.
- */
- return isfinite( x ) ? round_internal( x ) : x;
-}
-
-/* $RCSfile$$Revision$: end of file */
diff --git a/winsup/mingw/mingwex/math/round_internal.h b/winsup/mingw/mingwex/math/round_internal.h
deleted file mode 100644
index bb3c5ad..0000000
--- a/winsup/mingw/mingwex/math/round_internal.h
+++ /dev/null
@@ -1,155 +0,0 @@
-#ifndef _ROUND_INTERNAL_H
-/*
- * round_internal.h
- *
- * $Id$
- *
- * Provides a generic implementation of the numerical rounding
- * algorithm, which is shared by all functions in the `round()',
- * `lround()' and `llround()' families.
- *
- * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- *
- * This is free software. You may redistribute and/or modify it as you
- * see fit, without restriction of copyright.
- *
- * This software is provided "as is", in the hope that it may be useful,
- * but WITHOUT WARRANTY OF ANY KIND, not even any implied warranty of
- * MERCHANTABILITY, nor of FITNESS FOR ANY PARTICULAR PURPOSE. At no
- * time will the author accept any form of liability for any damages,
- * however caused, resulting from the use of this software.
- *
- */
-#define _ROUND_INTERNAL_H
-
-#include <math.h>
-#include <fenv.h>
-
-#define TYPE_PASTE( NAME, TYPE ) NAME##TYPE
-
-#define INPUT_TYPE INPUT_TYPEDEF( FUNCTION )
-#define INPUT_TYPEDEF( FUNCTION ) TYPE_PASTE( FUNCTION, _input_type )
-/*
- * The types for the formal parameter, to each of the derived functions.
- */
-#define round_input_type double
-#define roundf_input_type float
-#define roundl_input_type long double
-
-#define lround_input_type double
-#define lroundf_input_type float
-#define lroundl_input_type long double
-
-#define llround_input_type double
-#define llroundf_input_type float
-#define llroundl_input_type long double
-
-#define RETURN_TYPE RETURN_TYPEDEF( FUNCTION )
-#define RETURN_TYPEDEF( FUNCTION ) TYPE_PASTE( FUNCTION, _return_type )
-/*
- * The types for the return value, from each of the derived functions.
- */
-#define round_return_type double
-#define roundf_return_type float
-#define roundl_return_type long double
-
-#define lround_return_type long
-#define lroundf_return_type long
-#define lroundl_return_type long
-
-#define llround_return_type long long
-#define llroundf_return_type long long
-#define llroundl_return_type long long
-
-#define MAX_RETURN_VALUE RETURN_MAX( FUNCTION )
-#define RETURN_MAX( FUNCTION ) TYPE_PASTE( FUNCTION, _return_max )
-/*
- * The maximum values which may be returned by each of the derived functions
- * in the `lround' or the `llround' families.
- */
-#define lround_return_max LONG_MAX
-#define lroundf_return_max LONG_MAX
-#define lroundl_return_max LONG_MAX
-
-#define llround_return_max LLONG_MAX
-#define llroundf_return_max LLONG_MAX
-#define llroundl_return_max LLONG_MAX
-
-#define MIN_RETURN_VALUE RETURN_MIN( FUNCTION )
-#define RETURN_MIN( FUNCTION ) TYPE_PASTE( FUNCTION, _return_min )
-/*
- * The minimum values which may be returned by each of the derived functions
- * in the `lround' or the `llround' families.
- */
-#define lround_return_min LONG_MIN
-#define lroundf_return_min LONG_MIN
-#define lroundl_return_min LONG_MIN
-
-#define llround_return_min LLONG_MIN
-#define llroundf_return_min LLONG_MIN
-#define llroundl_return_min LLONG_MIN
-
-#define REF_VALUE( VALUE ) REF_TYPE( FUNCTION, VALUE )
-#define REF_TYPE( FUNC, VAL ) TYPE_PASTE( FUNC, _ref )( VAL )
-/*
- * Macros for expressing constant values of the appropriate data type,
- * for use in each of the derived functions.
- */
-#define round_ref( VALUE ) VALUE
-#define lround_ref( VALUE ) VALUE
-#define llround_ref( VALUE ) VALUE
-
-#define roundl_ref( VALUE ) TYPE_PASTE( VALUE, L )
-#define lroundl_ref( VALUE ) TYPE_PASTE( VALUE, L )
-#define llroundl_ref( VALUE ) TYPE_PASTE( VALUE, L )
-
-#define roundf_ref( VALUE ) TYPE_PASTE( VALUE, F )
-#define lroundf_ref( VALUE ) TYPE_PASTE( VALUE, F )
-#define llroundf_ref( VALUE ) TYPE_PASTE( VALUE, F )
-
-static __inline__
-INPUT_TYPE __attribute__(( always_inline )) round_internal( INPUT_TYPE x )
-#define ROUND_MODES ( FE_TONEAREST | FE_UPWARD | FE_DOWNWARD | FE_TOWARDZERO )
-{
- /* Generic helper function, for rounding of the input parameter value to
- * the nearest integer value.
- */
- INPUT_TYPE z;
- unsigned short saved_CW, tmp_required_CW;
-
- /* Rounding method suggested by Danny Smith <dannysmith@users.sf.net>
- *
- * Save the FPU control word state, set rounding mode TONEAREST, round the
- * input value, then restore the original FPU control word state.
- */
- __asm__( "fnstcw %0;" : "=m"( saved_CW ));
- tmp_required_CW = ( saved_CW & ~ROUND_MODES ) | FE_TONEAREST;
- __asm__( "fldcw %0;" :: "m"( tmp_required_CW ));
- __asm__( "frndint;" : "=t"( z ) : "0"( x ));
- __asm__( "fldcw %0;" :: "m"( saved_CW ));
-
- /* We now have a possible rounded value; unfortunately the FPU uses the
- * `round-to-even' rule for exact mid-way cases, where both C99 and POSIX
- * require us to always round away from zero, so we need to adjust those
- * mid-way cases which the FPU rounded in the wrong direction.
- *
- * Correction method suggested by Greg Chicares <gchicares@sbcglobal.net>
- */
- return x < REF_VALUE( 0.0 )
- ? /*
- * For negative input values, an incorrectly rounded value will be
- * exactly 0.5 greater than the original value; when we find such an
- * exact rounding offset, we must subtract an additional 1.0 from the
- * rounded result, otherwise we return the rounded result unchanged.
- */
- z - x == REF_VALUE( 0.5 ) ? z - REF_VALUE( 1.0 ) : z
-
- : /* For positive input values, an incorrectly rounded value will be
- * exactly 0.5 less than the original value; when we find such an exact
- * rounding offset, we must add an additional 1.0 to the rounded result,
- * otherwise we return the rounded result unchanged.
- */
- x - z == REF_VALUE( 0.5 ) ? z + REF_VALUE( 1.0 ) : z;
-}
-
-#endif /* !defined _ROUND_INTERNAL_H: $RCSfile$: end of file */
diff --git a/winsup/mingw/mingwex/math/s_erf.c b/winsup/mingw/mingwex/math/s_erf.c
deleted file mode 100644
index 3cba24d..0000000
--- a/winsup/mingw/mingwex/math/s_erf.c
+++ /dev/null
@@ -1,345 +0,0 @@
-
-/* @(#)s_erf.c 1.3 95/01/18 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunSoft, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-/* double erf(double x)
- * double erfc(double x)
- * x
- * 2 |\
- * erf(x) = --------- | exp(-t*t)dt
- * sqrt(pi) \|
- * 0
- *
- * erfc(x) = 1-erf(x)
- * Note that
- * erf(-x) = -erf(x)
- * erfc(-x) = 2 - erfc(x)
- *
- * Method:
- * 1. For |x| in [0, 0.84375]
- * erf(x) = x + x*R(x^2)
- * erfc(x) = 1 - erf(x) if x in [-.84375,0.25]
- * = 0.5 + ((0.5-x)-x*R) if x in [0.25,0.84375]
- * where R = P/Q where P is an odd poly of degree 8 and
- * Q is an odd poly of degree 10.
- * -57.90
- * | R - (erf(x)-x)/x | <= 2
- *
- *
- * Remark. The formula is derived by noting
- * erf(x) = (2/sqrt(pi))*(x - x^3/3 + x^5/10 - x^7/42 + ....)
- * and that
- * 2/sqrt(pi) = 1.128379167095512573896158903121545171688
- * is close to one. The interval is chosen because the fix
- * point of erf(x) is near 0.6174 (i.e., erf(x)=x when x is
- * near 0.6174), and by some experiment, 0.84375 is chosen to
- * guarantee the error is less than one ulp for erf.
- *
- * 2. For |x| in [0.84375,1.25], let s = |x| - 1, and
- * c = 0.84506291151 rounded to single (24 bits)
- * erf(x) = sign(x) * (c + P1(s)/Q1(s))
- * erfc(x) = (1-c) - P1(s)/Q1(s) if x > 0
- * 1+(c+P1(s)/Q1(s)) if x < 0
- * |P1/Q1 - (erf(|x|)-c)| <= 2**-59.06
- * Remark: here we use the taylor series expansion at x=1.
- * erf(1+s) = erf(1) + s*Poly(s)
- * = 0.845.. + P1(s)/Q1(s)
- * That is, we use rational approximation to approximate
- * erf(1+s) - (c = (single)0.84506291151)
- * Note that |P1/Q1|< 0.078 for x in [0.84375,1.25]
- * where
- * P1(s) = degree 6 poly in s
- * Q1(s) = degree 6 poly in s
- *
- * 3. For x in [1.25,1/0.35(~2.857143)],
- * erfc(x) = (1/x)*exp(-x*x-0.5625+R1/S1)
- * erf(x) = 1 - erfc(x)
- * where
- * R1(z) = degree 7 poly in z, (z=1/x^2)
- * S1(z) = degree 8 poly in z
- *
- * 4. For x in [1/0.35,28]
- * erfc(x) = (1/x)*exp(-x*x-0.5625+R2/S2) if x > 0
- * = 2.0 - (1/x)*exp(-x*x-0.5625+R2/S2) if -6<x<0
- * = 2.0 - tiny (if x <= -6)
- * erf(x) = sign(x)*(1.0 - erfc(x)) if x < 6, else
- * erf(x) = sign(x)*(1.0 - tiny)
- * where
- * R2(z) = degree 6 poly in z, (z=1/x^2)
- * S2(z) = degree 7 poly in z
- *
- * Note1:
- * To compute exp(-x*x-0.5625+R/S), let s be a single
- * precision number and s := x; then
- * -x*x = -s*s + (s-x)*(s+x)
- * exp(-x*x-0.5626+R/S) =
- * exp(-s*s-0.5625)*exp((s-x)*(s+x)+R/S);
- * Note2:
- * Here 4 and 5 make use of the asymptotic series
- * exp(-x*x)
- * erfc(x) ~ ---------- * ( 1 + Poly(1/x^2) )
- * x*sqrt(pi)
- * We use rational approximation to approximate
- * g(s)=f(1/x^2) = log(erfc(x)*x) - x*x + 0.5625
- * Here is the error bound for R1/S1 and R2/S2
- * |R1/S1 - f(x)| < 2**(-62.57)
- * |R2/S2 - f(x)| < 2**(-61.52)
- *
- * 5. For inf > x >= 28
- * erf(x) = sign(x) *(1 - tiny) (raise inexact)
- * erfc(x) = tiny*tiny (raise underflow) if x > 0
- * = 2 - tiny if x<0
- *
- * 7. Special case:
- * erf(0) = 0, erf(inf) = 1, erf(-inf) = -1,
- * erfc(0) = 1, erfc(inf) = 0, erfc(-inf) = 2,
- * erfc/erf(NaN) is NaN
- */
-
-
-/* #include "fdlibm.h" */
-
-#include <math.h>
-#include <stdint.h>
-#include <errno.h>
-
-#define __ieee754_exp exp
-
-typedef union
-{
- double value;
- struct
- {
- uint32_t lsw;
- uint32_t msw;
- } parts;
-} ieee_double_shape_type;
-
-
-static inline int __get_hi_word(const double x)
-{
- ieee_double_shape_type u;
- u.value = x;
- return u.parts.msw;
-}
-
-static inline void __trunc_lo_word(double *x)
-{
- ieee_double_shape_type u;
- u.value = *x;
- u.parts.lsw = 0;
- *x = u.value;
-}
-
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-tiny = 1e-300,
-half= 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */
-one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
-two = 2.00000000000000000000e+00, /* 0x40000000, 0x00000000 */
- /* c = (float)0.84506291151 */
-erx = 8.45062911510467529297e-01, /* 0x3FEB0AC1, 0x60000000 */
-/*
- * Coefficients for approximation to erf on [0,0.84375]
- */
-efx = 1.28379167095512586316e-01, /* 0x3FC06EBA, 0x8214DB69 */
-efx8= 1.02703333676410069053e+00, /* 0x3FF06EBA, 0x8214DB69 */
-pp0 = 1.28379167095512558561e-01, /* 0x3FC06EBA, 0x8214DB68 */
-pp1 = -3.25042107247001499370e-01, /* 0xBFD4CD7D, 0x691CB913 */
-pp2 = -2.84817495755985104766e-02, /* 0xBF9D2A51, 0xDBD7194F */
-pp3 = -5.77027029648944159157e-03, /* 0xBF77A291, 0x236668E4 */
-pp4 = -2.37630166566501626084e-05, /* 0xBEF8EAD6, 0x120016AC */
-qq1 = 3.97917223959155352819e-01, /* 0x3FD97779, 0xCDDADC09 */
-qq2 = 6.50222499887672944485e-02, /* 0x3FB0A54C, 0x5536CEBA */
-qq3 = 5.08130628187576562776e-03, /* 0x3F74D022, 0xC4D36B0F */
-qq4 = 1.32494738004321644526e-04, /* 0x3F215DC9, 0x221C1A10 */
-qq5 = -3.96022827877536812320e-06, /* 0xBED09C43, 0x42A26120 */
-/*
- * Coefficients for approximation to erf in [0.84375,1.25]
- */
-pa0 = -2.36211856075265944077e-03, /* 0xBF6359B8, 0xBEF77538 */
-pa1 = 4.14856118683748331666e-01, /* 0x3FDA8D00, 0xAD92B34D */
-pa2 = -3.72207876035701323847e-01, /* 0xBFD7D240, 0xFBB8C3F1 */
-pa3 = 3.18346619901161753674e-01, /* 0x3FD45FCA, 0x805120E4 */
-pa4 = -1.10894694282396677476e-01, /* 0xBFBC6398, 0x3D3E28EC */
-pa5 = 3.54783043256182359371e-02, /* 0x3FA22A36, 0x599795EB */
-pa6 = -2.16637559486879084300e-03, /* 0xBF61BF38, 0x0A96073F */
-qa1 = 1.06420880400844228286e-01, /* 0x3FBB3E66, 0x18EEE323 */
-qa2 = 5.40397917702171048937e-01, /* 0x3FE14AF0, 0x92EB6F33 */
-qa3 = 7.18286544141962662868e-02, /* 0x3FB2635C, 0xD99FE9A7 */
-qa4 = 1.26171219808761642112e-01, /* 0x3FC02660, 0xE763351F */
-qa5 = 1.36370839120290507362e-02, /* 0x3F8BEDC2, 0x6B51DD1C */
-qa6 = 1.19844998467991074170e-02, /* 0x3F888B54, 0x5735151D */
-/*
- * Coefficients for approximation to erfc in [1.25,1/0.35]
- */
-ra0 = -9.86494403484714822705e-03, /* 0xBF843412, 0x600D6435 */
-ra1 = -6.93858572707181764372e-01, /* 0xBFE63416, 0xE4BA7360 */
-ra2 = -1.05586262253232909814e+01, /* 0xC0251E04, 0x41B0E726 */
-ra3 = -6.23753324503260060396e+01, /* 0xC04F300A, 0xE4CBA38D */
-ra4 = -1.62396669462573470355e+02, /* 0xC0644CB1, 0x84282266 */
-ra5 = -1.84605092906711035994e+02, /* 0xC067135C, 0xEBCCABB2 */
-ra6 = -8.12874355063065934246e+01, /* 0xC0545265, 0x57E4D2F2 */
-ra7 = -9.81432934416914548592e+00, /* 0xC023A0EF, 0xC69AC25C */
-sa1 = 1.96512716674392571292e+01, /* 0x4033A6B9, 0xBD707687 */
-sa2 = 1.37657754143519042600e+02, /* 0x4061350C, 0x526AE721 */
-sa3 = 4.34565877475229228821e+02, /* 0x407B290D, 0xD58A1A71 */
-sa4 = 6.45387271733267880336e+02, /* 0x40842B19, 0x21EC2868 */
-sa5 = 4.29008140027567833386e+02, /* 0x407AD021, 0x57700314 */
-sa6 = 1.08635005541779435134e+02, /* 0x405B28A3, 0xEE48AE2C */
-sa7 = 6.57024977031928170135e+00, /* 0x401A47EF, 0x8E484A93 */
-sa8 = -6.04244152148580987438e-02, /* 0xBFAEEFF2, 0xEE749A62 */
-/*
- * Coefficients for approximation to erfc in [1/.35,28]
- */
-rb0 = -9.86494292470009928597e-03, /* 0xBF843412, 0x39E86F4A */
-rb1 = -7.99283237680523006574e-01, /* 0xBFE993BA, 0x70C285DE */
-rb2 = -1.77579549177547519889e+01, /* 0xC031C209, 0x555F995A */
-rb3 = -1.60636384855821916062e+02, /* 0xC064145D, 0x43C5ED98 */
-rb4 = -6.37566443368389627722e+02, /* 0xC083EC88, 0x1375F228 */
-rb5 = -1.02509513161107724954e+03, /* 0xC0900461, 0x6A2E5992 */
-rb6 = -4.83519191608651397019e+02, /* 0xC07E384E, 0x9BDC383F */
-sb1 = 3.03380607434824582924e+01, /* 0x403E568B, 0x261D5190 */
-sb2 = 3.25792512996573918826e+02, /* 0x40745CAE, 0x221B9F0A */
-sb3 = 1.53672958608443695994e+03, /* 0x409802EB, 0x189D5118 */
-sb4 = 3.19985821950859553908e+03, /* 0x40A8FFB7, 0x688C246A */
-sb5 = 2.55305040643316442583e+03, /* 0x40A3F219, 0xCEDF3BE6 */
-sb6 = 4.74528541206955367215e+02, /* 0x407DA874, 0xE79FE763 */
-sb7 = -2.24409524465858183362e+01; /* 0xC03670E2, 0x42712D62 */
-
-#ifdef __STDC__
- double erf(double x)
-#else
- double erf(x)
- double x;
-#endif
-{
- int hx,ix,i;
- double R,S,P,Q,s,y,z,r;
- hx = __get_hi_word(x);
- ix = hx&0x7fffffff;
- if(ix>=0x7ff00000) { /* erf(nan)=nan */
- i = ((unsigned)hx>>31)<<1;
- return (double)(1-i)+one/x; /* erf(+-inf)=+-1 */
- }
-
- if(ix < 0x3feb0000) { /* |x|<0.84375 */
- if(ix < 0x3e300000) { /* |x|<2**-28 */
- if (ix < 0x00800000)
- return 0.125*(8.0*x+efx8*x); /*avoid underflow */
- return x + efx*x;
- }
- z = x*x;
- r = pp0+z*(pp1+z*(pp2+z*(pp3+z*pp4)));
- s = one+z*(qq1+z*(qq2+z*(qq3+z*(qq4+z*qq5))));
- y = r/s;
- return x + x*y;
- }
- if(ix < 0x3ff40000) { /* 0.84375 <= |x| < 1.25 */
- s = fabs(x)-one;
- P = pa0+s*(pa1+s*(pa2+s*(pa3+s*(pa4+s*(pa5+s*pa6)))));
- Q = one+s*(qa1+s*(qa2+s*(qa3+s*(qa4+s*(qa5+s*qa6)))));
- if(hx>=0) return erx + P/Q; else return -erx - P/Q;
- }
- if (ix >= 0x40180000) { /* inf>|x|>=6 */
- if(hx>=0) return one-tiny; else return tiny-one;
- }
- x = fabs(x);
- s = one/(x*x);
- if(ix< 0x4006DB6E) { /* |x| < 1/0.35 */
- R=ra0+s*(ra1+s*(ra2+s*(ra3+s*(ra4+s*(
- ra5+s*(ra6+s*ra7))))));
- S=one+s*(sa1+s*(sa2+s*(sa3+s*(sa4+s*(
- sa5+s*(sa6+s*(sa7+s*sa8)))))));
- } else { /* |x| >= 1/0.35 */
- R=rb0+s*(rb1+s*(rb2+s*(rb3+s*(rb4+s*(
- rb5+s*rb6)))));
- S=one+s*(sb1+s*(sb2+s*(sb3+s*(sb4+s*(
- sb5+s*(sb6+s*sb7))))));
- }
- z = x;
- __trunc_lo_word(&z);
- r = __ieee754_exp(-z*z-0.5625)*__ieee754_exp((z-x)*(z+x)+R/S);
- if(hx>=0) return one-r/x; else return r/x-one;
-}
-
-#ifdef __STDC__
- double erfc(double x)
-#else
- double erfc(x)
- double x;
-#endif
-{
- int hx,ix;
- double R,S,P,Q,s,y,z,r;
- hx = __get_hi_word(x);
- ix = hx&0x7fffffff;
- if(ix>=0x7ff00000) { /* erfc(nan)=nan */
- /* erfc(+-inf)=0,2 */
- return (double)(((unsigned)hx>>31)<<1)+one/x;
- }
-
- if(ix < 0x3feb0000) { /* |x|<0.84375 */
- if(ix < 0x3c700000) /* |x|<2**-56 */
- return one-x;
- z = x*x;
- r = pp0+z*(pp1+z*(pp2+z*(pp3+z*pp4)));
- s = one+z*(qq1+z*(qq2+z*(qq3+z*(qq4+z*qq5))));
- y = r/s;
- if(hx < 0x3fd00000) { /* x<1/4 */
- return one-(x+x*y);
- } else {
- r = x*y;
- r += (x-half);
- return half - r ;
- }
- }
- if(ix < 0x3ff40000) { /* 0.84375 <= |x| < 1.25 */
- s = fabs(x)-one;
- P = pa0+s*(pa1+s*(pa2+s*(pa3+s*(pa4+s*(pa5+s*pa6)))));
- Q = one+s*(qa1+s*(qa2+s*(qa3+s*(qa4+s*(qa5+s*qa6)))));
- if(hx>=0) {
- z = one-erx; return z - P/Q;
- } else {
- z = erx+P/Q; return one+z;
- }
- }
- if (ix < 0x403c0000) { /* |x|<28 */
- x = fabs(x);
- s = one/(x*x);
- if(ix< 0x4006DB6D) { /* |x| < 1/.35 ~ 2.857143*/
- R=ra0+s*(ra1+s*(ra2+s*(ra3+s*(ra4+s*(
- ra5+s*(ra6+s*ra7))))));
- S=one+s*(sa1+s*(sa2+s*(sa3+s*(sa4+s*(
- sa5+s*(sa6+s*(sa7+s*sa8)))))));
- } else { /* |x| >= 1/.35 ~ 2.857143 */
- if(hx<0&&ix>=0x40180000) return two-tiny;/* x < -6 */
- R=rb0+s*(rb1+s*(rb2+s*(rb3+s*(rb4+s*(
- rb5+s*rb6)))));
- S=one+s*(sb1+s*(sb2+s*(sb3+s*(sb4+s*(
- sb5+s*(sb6+s*sb7))))));
- }
- z = x;
- __trunc_lo_word(&z);
- r = __ieee754_exp(-z*z-0.5625)*
- __ieee754_exp((z-x)*(z+x)+R/S);
- if(hx>0) return r/x; else return two-r/x;
- } else {
- /* set range error */
- errno = ERANGE;
- if(hx>0) return tiny*tiny; else return two-tiny;
- }
-}
diff --git a/winsup/mingw/mingwex/math/scalbn.S b/winsup/mingw/mingwex/math/scalbn.S
deleted file mode 100644
index 76e2d39..0000000
--- a/winsup/mingw/mingwex/math/scalbn.S
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- */
-
- .file "scalbn.S"
- .text
- .align 4
-.globl _scalbn
- .def _scalbn; .scl 2; .type 32; .endef
-_scalbn:
- fildl 12(%esp)
- fldl 4(%esp)
- fscale
- fstp %st(1)
- ret
-
-.globl _scalbln
- .set _scalbln,_scalbn
diff --git a/winsup/mingw/mingwex/math/scalbnf.S b/winsup/mingw/mingwex/math/scalbnf.S
deleted file mode 100644
index 1fe42a3..0000000
--- a/winsup/mingw/mingwex/math/scalbnf.S
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- */
-
- .file "scalbnf.S"
- .text
- .align 4
-.globl _scalbnf
- .def _scalbnf; .scl 2; .type 32; .endef
-_scalbnf:
- fildl 8(%esp)
- flds 4(%esp)
- fscale
- fstp %st(1)
- ret
-
-.globl _scalblnf
- .set _scalblnf,_scalbnf
diff --git a/winsup/mingw/mingwex/math/scalbnl.S b/winsup/mingw/mingwex/math/scalbnl.S
deleted file mode 100644
index 77eaff7..0000000
--- a/winsup/mingw/mingwex/math/scalbnl.S
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Changes for long double by Ulrich Drepper <drepper@cygnus.com>
- * Public domain.
- */
-
- .file "scalbnl.S"
- .text
- .align 4
-.globl _scalbnl
- .def _scalbnl; .scl 2; .type 32; .endef
-_scalbnl:
- fildl 16(%esp)
- fldt 4(%esp)
- fscale
- fstp %st(1)
- ret
-
-.globl _scalblnl
- .set _scalblnl,_scalbnl
diff --git a/winsup/mingw/mingwex/math/sf_erf.c b/winsup/mingw/mingwex/math/sf_erf.c
deleted file mode 100644
index 2188539..0000000
--- a/winsup/mingw/mingwex/math/sf_erf.c
+++ /dev/null
@@ -1,267 +0,0 @@
-/* sf_erf.c -- float version of s_erf.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-/*
-#include "fdlibm.h"
-*/
-#include <math.h>
-#include <stdint.h>
-#include <errno.h>
-
-#define __ieee754_expf expf
-
-
-
-typedef union
-{
- float value;
- uint32_t word;
-} ieee_float_shape_type;
-
-/* Get a 32 bit int from a float. */
-
-static inline int
-__get_float_word(float d)
-{
- ieee_float_shape_type u;
- u.value = d;
- return u.word;
-}
-
-/* Set a float from a 32 bit int. */
-
-#define SET_FLOAT_WORD(d,i) \
-do { \
- ieee_float_shape_type sf_u; \
- sf_u.word = (i); \
- (d) = sf_u.value; \
-} while (0)
-
-static inline void __trunc_float_word(float * x)
-{
- ieee_float_shape_type u;
- u.value = * x;
- u.word &= 0xfffff000;
-}
-
-#ifdef __v810__
-#define const
-#endif
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-tiny = 1e-30,
-half= 5.0000000000e-01, /* 0x3F000000 */
-one = 1.0000000000e+00, /* 0x3F800000 */
-two = 2.0000000000e+00, /* 0x40000000 */
- /* c = (subfloat)0.84506291151 */
-erx = 8.4506291151e-01, /* 0x3f58560b */
-/*
- * Coefficients for approximation to erf on [0,0.84375]
- */
-efx = 1.2837916613e-01, /* 0x3e0375d4 */
-efx8= 1.0270333290e+00, /* 0x3f8375d4 */
-pp0 = 1.2837916613e-01, /* 0x3e0375d4 */
-pp1 = -3.2504209876e-01, /* 0xbea66beb */
-pp2 = -2.8481749818e-02, /* 0xbce9528f */
-pp3 = -5.7702702470e-03, /* 0xbbbd1489 */
-pp4 = -2.3763017452e-05, /* 0xb7c756b1 */
-qq1 = 3.9791721106e-01, /* 0x3ecbbbce */
-qq2 = 6.5022252500e-02, /* 0x3d852a63 */
-qq3 = 5.0813062117e-03, /* 0x3ba68116 */
-qq4 = 1.3249473704e-04, /* 0x390aee49 */
-qq5 = -3.9602282413e-06, /* 0xb684e21a */
-/*
- * Coefficients for approximation to erf in [0.84375,1.25]
- */
-pa0 = -2.3621185683e-03, /* 0xbb1acdc6 */
-pa1 = 4.1485610604e-01, /* 0x3ed46805 */
-pa2 = -3.7220788002e-01, /* 0xbebe9208 */
-pa3 = 3.1834661961e-01, /* 0x3ea2fe54 */
-pa4 = -1.1089469492e-01, /* 0xbde31cc2 */
-pa5 = 3.5478305072e-02, /* 0x3d1151b3 */
-pa6 = -2.1663755178e-03, /* 0xbb0df9c0 */
-qa1 = 1.0642088205e-01, /* 0x3dd9f331 */
-qa2 = 5.4039794207e-01, /* 0x3f0a5785 */
-qa3 = 7.1828655899e-02, /* 0x3d931ae7 */
-qa4 = 1.2617121637e-01, /* 0x3e013307 */
-qa5 = 1.3637083583e-02, /* 0x3c5f6e13 */
-qa6 = 1.1984500103e-02, /* 0x3c445aa3 */
-/*
- * Coefficients for approximation to erfc in [1.25,1/0.35]
- */
-ra0 = -9.8649440333e-03, /* 0xbc21a093 */
-ra1 = -6.9385856390e-01, /* 0xbf31a0b7 */
-ra2 = -1.0558626175e+01, /* 0xc128f022 */
-ra3 = -6.2375331879e+01, /* 0xc2798057 */
-ra4 = -1.6239666748e+02, /* 0xc322658c */
-ra5 = -1.8460508728e+02, /* 0xc3389ae7 */
-ra6 = -8.1287437439e+01, /* 0xc2a2932b */
-ra7 = -9.8143291473e+00, /* 0xc11d077e */
-sa1 = 1.9651271820e+01, /* 0x419d35ce */
-sa2 = 1.3765776062e+02, /* 0x4309a863 */
-sa3 = 4.3456588745e+02, /* 0x43d9486f */
-sa4 = 6.4538726807e+02, /* 0x442158c9 */
-sa5 = 4.2900814819e+02, /* 0x43d6810b */
-sa6 = 1.0863500214e+02, /* 0x42d9451f */
-sa7 = 6.5702495575e+00, /* 0x40d23f7c */
-sa8 = -6.0424413532e-02, /* 0xbd777f97 */
-/*
- * Coefficients for approximation to erfc in [1/.35,28]
- */
-rb0 = -9.8649431020e-03, /* 0xbc21a092 */
-rb1 = -7.9928326607e-01, /* 0xbf4c9dd4 */
-rb2 = -1.7757955551e+01, /* 0xc18e104b */
-rb3 = -1.6063638306e+02, /* 0xc320a2ea */
-rb4 = -6.3756646729e+02, /* 0xc41f6441 */
-rb5 = -1.0250950928e+03, /* 0xc480230b */
-rb6 = -4.8351919556e+02, /* 0xc3f1c275 */
-sb1 = 3.0338060379e+01, /* 0x41f2b459 */
-sb2 = 3.2579251099e+02, /* 0x43a2e571 */
-sb3 = 1.5367296143e+03, /* 0x44c01759 */
-sb4 = 3.1998581543e+03, /* 0x4547fdbb */
-sb5 = 2.5530502930e+03, /* 0x451f90ce */
-sb6 = 4.7452853394e+02, /* 0x43ed43a7 */
-sb7 = -2.2440952301e+01; /* 0xc1b38712 */
-
-#ifdef __STDC__
- float erff(float x)
-#else
- float erff(x)
- float x;
-#endif
-{
- int32_t hx,ix,i;
- float R,S,P,Q,s,y,z,r;
- hx = __get_float_word(x);
- ix = hx&0x7fffffff;
- if(!(ix<0x7f800000L)) { /* erf(nan)=nan */
- i = ((uint32_t)hx>>31)<<1;
- return (float)(1-i)+one/x; /* erf(+-inf)=+-1 */
- }
-
- if(ix < 0x3f580000) { /* |x|<0.84375 */
- if(ix < 0x31800000) { /* |x|<2**-28 */
- if (ix < 0x04000000)
- /*avoid underflow */
- return (float)0.125*((float)8.0*x+efx8*x);
- return x + efx*x;
- }
- z = x*x;
- r = pp0+z*(pp1+z*(pp2+z*(pp3+z*pp4)));
- s = one+z*(qq1+z*(qq2+z*(qq3+z*(qq4+z*qq5))));
- y = r/s;
- return x + x*y;
- }
- if(ix < 0x3fa00000) { /* 0.84375 <= |x| < 1.25 */
- s = fabsf(x)-one;
- P = pa0+s*(pa1+s*(pa2+s*(pa3+s*(pa4+s*(pa5+s*pa6)))));
- Q = one+s*(qa1+s*(qa2+s*(qa3+s*(qa4+s*(qa5+s*qa6)))));
- if(hx>=0) return erx + P/Q; else return -erx - P/Q;
- }
- if (ix >= 0x40c00000) { /* inf>|x|>=6 */
- if(hx>=0) return one-tiny; else return tiny-one;
- }
- x = fabsf(x);
- s = one/(x*x);
- if(ix< 0x4036DB6E) { /* |x| < 1/0.35 */
- R=ra0+s*(ra1+s*(ra2+s*(ra3+s*(ra4+s*(
- ra5+s*(ra6+s*ra7))))));
- S=one+s*(sa1+s*(sa2+s*(sa3+s*(sa4+s*(
- sa5+s*(sa6+s*(sa7+s*sa8)))))));
- } else { /* |x| >= 1/0.35 */
- R=rb0+s*(rb1+s*(rb2+s*(rb3+s*(rb4+s*(
- rb5+s*rb6)))));
- S=one+s*(sb1+s*(sb2+s*(sb3+s*(sb4+s*(
- sb5+s*(sb6+s*sb7))))));
- }
-
- z = x;
- __trunc_float_word (&z);
- r = __ieee754_expf(-z*z-(float)0.5625)*__ieee754_expf((z-x)*(z+x)+R/S);
- if(hx>=0) return one-r/x; else return r/x-one;
-}
-
-#ifdef __STDC__
- float erfcf(float x)
-#else
- float erfcf(x)
- float x;
-#endif
-{
- int32_t hx,ix;
- float R,S,P,Q,s,y,z,r;
- hx = __get_float_word(x);
- ix = hx&0x7fffffff;
- if(!(ix<0x7f800000L)) { /* erfc(nan)=nan */
- /* erfc(+-inf)=0,2 */
- return (float)(((uint32_t)hx>>31)<<1)+one/x;
- }
-
- if(ix < 0x3f580000) { /* |x|<0.84375 */
- if(ix < 0x23800000) /* |x|<2**-56 */
- return one-x;
- z = x*x;
- r = pp0+z*(pp1+z*(pp2+z*(pp3+z*pp4)));
- s = one+z*(qq1+z*(qq2+z*(qq3+z*(qq4+z*qq5))));
- y = r/s;
- if(hx < 0x3e800000) { /* x<1/4 */
- return one-(x+x*y);
- } else {
- r = x*y;
- r += (x-half);
- return half - r ;
- }
- }
- if(ix < 0x3fa00000) { /* 0.84375 <= |x| < 1.25 */
- s = fabsf(x)-one;
- P = pa0+s*(pa1+s*(pa2+s*(pa3+s*(pa4+s*(pa5+s*pa6)))));
- Q = one+s*(qa1+s*(qa2+s*(qa3+s*(qa4+s*(qa5+s*qa6)))));
- if(hx>=0) {
- z = one-erx; return z - P/Q;
- } else {
- z = erx+P/Q; return one+z;
- }
- }
-
- if (ix < 0x41e00000) { /* |x|<28 */
- x = fabsf(x);
- s = one/(x*x);
- if(ix< 0x4036DB6D) { /* |x| < 1/.35 ~ 2.857143*/
- R=ra0+s*(ra1+s*(ra2+s*(ra3+s*(ra4+s*(
- ra5+s*(ra6+s*ra7))))));
- S=one+s*(sa1+s*(sa2+s*(sa3+s*(sa4+s*(
- sa5+s*(sa6+s*(sa7+s*sa8)))))));
- } else { /* |x| >= 1/.35 ~ 2.857143 */
- if(hx<0&&ix>=0x40c00000) return two-tiny;/* x < -6 */
- R=rb0+s*(rb1+s*(rb2+s*(rb3+s*(rb4+s*(
- rb5+s*rb6)))));
- S=one+s*(sb1+s*(sb2+s*(sb3+s*(sb4+s*(
- sb5+s*(sb6+s*sb7))))));
- }
- z = x;
- __trunc_float_word (&z);
- r = __ieee754_expf(-z*z-(float)0.5625)*
- __ieee754_expf((z-x)*(z+x)+R/S);
- if(hx>0) return r/x; else return two-r/x;
- } else {
- /* set range error */
- errno = ERANGE;
- if(hx>0) return tiny*tiny; else return two-tiny;
- }
-}
diff --git a/winsup/mingw/mingwex/math/signbit.c b/winsup/mingw/mingwex/math/signbit.c
deleted file mode 100644
index 997ddf8..0000000
--- a/winsup/mingw/mingwex/math/signbit.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#define __FP_SIGNBIT 0x0200
-
-int __signbit (double x) {
- unsigned short sw;
- __asm__ ("fxam; fstsw %%ax;"
- : "=a" (sw)
- : "t" (x) );
- return (sw & __FP_SIGNBIT) != 0;
-}
-
-#undef signbit
-int __attribute__ ((alias ("__signbit"))) signbit (double);
-
diff --git a/winsup/mingw/mingwex/math/signbitf.c b/winsup/mingw/mingwex/math/signbitf.c
deleted file mode 100644
index 1c96b9f..0000000
--- a/winsup/mingw/mingwex/math/signbitf.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#define __FP_SIGNBIT 0x0200
-
-int __signbitf (float x) {
- unsigned short sw;
- __asm__ ("fxam; fstsw %%ax;"
- : "=a" (sw)
- : "t" (x) );
- return (sw & __FP_SIGNBIT) != 0;
-}
-int __attribute__ ((alias ("__signbitf"))) signbitf (float);
diff --git a/winsup/mingw/mingwex/math/signbitl.c b/winsup/mingw/mingwex/math/signbitl.c
deleted file mode 100644
index 8b7bca5..0000000
--- a/winsup/mingw/mingwex/math/signbitl.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#define __FP_SIGNBIT 0x0200
-
-int __signbitl (long double x) {
- unsigned short sw;
- __asm__ ("fxam; fstsw %%ax;"
- : "=a" (sw)
- : "t" (x) );
- return (sw & __FP_SIGNBIT) != 0;
-}
-
-int __attribute__ ((alias ("__signbitl"))) signbitl (long double);
diff --git a/winsup/mingw/mingwex/math/sinf.S b/winsup/mingw/mingwex/math/sinf.S
deleted file mode 100644
index 23e986d..0000000
--- a/winsup/mingw/mingwex/math/sinf.S
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
- *
- * Removed header file dependency for use in libmingwex.a by
- * Danny Smith <dannysmith@users.sourceforge.net>
- */
-
- .file "sinf.S"
- .text
- .align 4
-.globl _sinf
- .def _sinf; .scl 2; .type 32; .endef
-_sinf:
- flds 4(%esp)
- fsin
- fnstsw %ax
- testl $0x400,%eax
- jnz 1f
- ret
-1: fldpi
- fadd %st(0)
- fxch %st(1)
-2: fprem1
- fnstsw %ax
- testl $0x400,%eax
- jnz 2b
- fstp %st(1)
- fsin
- ret
diff --git a/winsup/mingw/mingwex/math/sinhf.c b/winsup/mingw/mingwex/math/sinhf.c
deleted file mode 100644
index 3d6bcff..0000000
--- a/winsup/mingw/mingwex/math/sinhf.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <math.h>
-float sinhf (float x)
- {return (float) sinh (x);}
diff --git a/winsup/mingw/mingwex/math/sinhl.c b/winsup/mingw/mingwex/math/sinhl.c
deleted file mode 100644
index ca6a370..0000000
--- a/winsup/mingw/mingwex/math/sinhl.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/* sinhl.c
- *
- * Hyperbolic sine, long double precision
- *
- *
- *
- * SYNOPSIS:
- *
- * long double x, y, sinhl();
- *
- * y = sinhl( x );
- *
- *
- *
- * DESCRIPTION:
- *
- * Returns hyperbolic sine of argument in the range MINLOGL to
- * MAXLOGL.
- *
- * The range is partitioned into two segments. If |x| <= 1, a
- * rational function of the form x + x**3 P(x)/Q(x) is employed.
- * Otherwise the calculation is sinh(x) = ( exp(x) - exp(-x) )/2.
- *
- *
- *
- * ACCURACY:
- *
- * Relative error:
- * arithmetic domain # trials peak rms
- * IEEE -2,2 10000 1.5e-19 3.9e-20
- * IEEE +-10000 30000 1.1e-19 2.8e-20
- *
- */
-
-/*
-Cephes Math Library Release 2.7: January, 1998
-Copyright 1984, 1991, 1998 by Stephen L. Moshier
-*/
-
-/*
-Modified for mingw
-2002-07-22 Danny Smith <dannysmith@users.sourceforge.net>
-*/
-
-#ifdef __MINGW32__
-#include "cephes_mconf.h"
-#else
-#include "mconf.h"
-#endif
-
-#ifndef _SET_ERRNO
-#define _SET_ERRNO(x)
-#endif
-
-#ifdef UNK
-static long double P[] = {
- 1.7550769032975377032681E-6L,
- 4.1680702175874268714539E-4L,
- 3.0993532520425419002409E-2L,
- 9.9999999999999999998002E-1L,
-};
-static long double Q[] = {
- 1.7453965448620151484660E-8L,
--5.9116673682651952419571E-6L,
- 1.0599252315677389339530E-3L,
--1.1403880487744749056675E-1L,
- 6.0000000000000000000200E0L,
-};
-#endif
-
-#ifdef IBMPC
-static const unsigned short P[] = {
-0xec6a,0xd942,0xfbb3,0xeb8f,0x3feb, XPD
-0x365e,0xb30a,0xe437,0xda86,0x3ff3, XPD
-0x8890,0x01f6,0x2612,0xfde6,0x3ff9, XPD
-0x0000,0x0000,0x0000,0x8000,0x3fff, XPD
-};
-static const unsigned short Q[] = {
-0x4edd,0x4c21,0xad09,0x95ed,0x3fe5, XPD
-0x4376,0x9b70,0xd605,0xc65c,0xbfed, XPD
-0xc8ad,0x5d21,0x3069,0x8aed,0x3ff5, XPD
-0x9c32,0x6374,0x2d4b,0xe98d,0xbffb, XPD
-0x0000,0x0000,0x0000,0xc000,0x4001, XPD
-};
-#endif
-
-#ifdef MIEEE
-static long P[] = {
-0x3feb0000,0xeb8ffbb3,0xd942ec6a,
-0x3ff30000,0xda86e437,0xb30a365e,
-0x3ff90000,0xfde62612,0x01f68890,
-0x3fff0000,0x80000000,0x00000000,
-};
-static long Q[] = {
-0x3fe50000,0x95edad09,0x4c214edd,
-0xbfed0000,0xc65cd605,0x9b704376,
-0x3ff50000,0x8aed3069,0x5d21c8ad,
-0xbffb0000,0xe98d2d4b,0x63749c32,
-0x40010000,0xc0000000,0x00000000,
-};
-#endif
-
-#ifndef __MINGW32__
-extern long double MAXNUML, MAXLOGL, MINLOGL, LOGE2L;
-#ifdef ANSIPROT
-extern long double fabsl ( long double );
-extern long double expl ( long double );
-extern long double polevll ( long double, void *, int );
-extern long double p1evll ( long double, void *, int );
-#else
-long double fabsl(), expl(), polevll(), p1evll();
-#endif
-#ifdef INFINITIES
-extern long double INFINITYL;
-#endif
-#ifdef NANS
-extern long double NANL;
-#endif
-#endif /* __MINGW32__ */
-
-long double sinhl(x)
-long double x;
-{
-long double a;
-
-#ifdef MINUSZERO
-if( x == 0.0 )
- return(x);
-#endif
-#ifdef NANS
-if (isnanl(x))
- {
- _SET_ERRNO(EDOM);
- }
-#endif
-a = fabsl(x);
-if( (x > (MAXLOGL + LOGE2L)) || (x > -(MINLOGL-LOGE2L) ) )
- {
- mtherr( "sinhl", DOMAIN );
- _SET_ERRNO(ERANGE);
-#ifdef INFINITIES
- if( x > 0.0L )
- return( INFINITYL );
- else
- return( -INFINITYL );
-#else
- if( x > 0.0L )
- return( MAXNUML );
- else
- return( -MAXNUML );
-#endif
- }
-if( a > 1.0L )
- {
- if( a >= (MAXLOGL - LOGE2L) )
- {
- a = expl(0.5L*a);
- a = (0.5L * a) * a;
- if( x < 0.0L )
- a = -a;
- return(a);
- }
- a = expl(a);
- a = 0.5L*a - (0.5L/a);
- if( x < 0.0L )
- a = -a;
- return(a);
- }
-
-a *= a;
-return( x + x * a * (polevll(a,P,3)/polevll(a,Q,4)) );
-}
diff --git a/winsup/mingw/mingwex/math/sinl.S b/winsup/mingw/mingwex/math/sinl.S
deleted file mode 100644
index 16b2d9e..0000000
--- a/winsup/mingw/mingwex/math/sinl.S
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
- *
- * Removed header file dependency for use in libmingwex.a by
- * Danny Smith <dannysmith@users.sourceforge.net>
- */
-
- .file "sinl.S"
- .text
- .align 4
-.globl _sinl
- .def _sinl; .scl 2; .type 32; .endef
-_sinl:
- fldt 4(%esp)
- fsin
- fnstsw %ax
- testl $0x400,%eax
- jnz 1f
- ret
-1: fldpi
- fadd %st(0)
- fxch %st(1)
-2: fprem1
- fnstsw %ax
- testl $0x400,%eax
- jnz 2b
- fstp %st(1)
- fsin
- ret
diff --git a/winsup/mingw/mingwex/math/sqrtf.c b/winsup/mingw/mingwex/math/sqrtf.c
deleted file mode 100644
index b1029ca..0000000
--- a/winsup/mingw/mingwex/math/sqrtf.c
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <math.h>
-#include <errno.h>
-
-extern float __QNANF;
-
-float
-sqrtf (float x)
-{
- if (x < 0.0F )
- {
- errno = EDOM;
- return __QNANF;
- }
- else
- {
- float res;
- asm ("fsqrt" : "=t" (res) : "0" (x));
- return res;
- }
-}
diff --git a/winsup/mingw/mingwex/math/sqrtl.c b/winsup/mingw/mingwex/math/sqrtl.c
deleted file mode 100644
index dba68d8..0000000
--- a/winsup/mingw/mingwex/math/sqrtl.c
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <math.h>
-#include <errno.h>
-
-extern long double __QNANL;
-
-long double
-sqrtl (long double x)
-{
- if (x < 0.0L )
- {
- errno = EDOM;
- return __QNANL;
- }
- else
- {
- long double res;
- asm ("fsqrt" : "=t" (res) : "0" (x));
- return res;
- }
-}
diff --git a/winsup/mingw/mingwex/math/tanf.S b/winsup/mingw/mingwex/math/tanf.S
deleted file mode 100644
index 540fc68..0000000
--- a/winsup/mingw/mingwex/math/tanf.S
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- * Removed header file dependency for use in libmingwex.a by
- * Danny Smith <dannysmith@users.sourceforge.net>
- */
- .file "tanf.S"
- .text
- .align 4
-.globl _tanf
- .def _tanf; .scl 2; .type 32; .endef
-_tanf:
- flds 4(%esp)
- fptan
- fnstsw %ax
- testl $0x400,%eax
- jnz 1f
- fstp %st(0)
- ret
-1: fldpi
- fadd %st(0)
- fxch %st(1)
-2: fprem1
- fstsw %ax
- testl $0x400,%eax
- jnz 2b
- fstp %st(1)
- fptan
- fstp %st(0)
- ret
diff --git a/winsup/mingw/mingwex/math/tanhf.c b/winsup/mingw/mingwex/math/tanhf.c
deleted file mode 100644
index b7c56f0..0000000
--- a/winsup/mingw/mingwex/math/tanhf.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <math.h>
-float tanhf (float x)
- {return (float) tanh (x);}
diff --git a/winsup/mingw/mingwex/math/tanhl.c b/winsup/mingw/mingwex/math/tanhl.c
deleted file mode 100644
index d5d86d0..0000000
--- a/winsup/mingw/mingwex/math/tanhl.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/* tanhl.c
- *
- * Hyperbolic tangent, long double precision
- *
- *
- *
- * SYNOPSIS:
- *
- * long double x, y, tanhl();
- *
- * y = tanhl( x );
- *
- *
- *
- * DESCRIPTION:
- *
- * Returns hyperbolic tangent of argument in the range MINLOGL to
- * MAXLOGL.
- *
- * A rational function is used for |x| < 0.625. The form
- * x + x**3 P(x)/Q(x) of Cody _& Waite is employed.
- * Otherwise,
- * tanh(x) = sinh(x)/cosh(x) = 1 - 2/(exp(2x) + 1).
- *
- *
- *
- * ACCURACY:
- *
- * Relative error:
- * arithmetic domain # trials peak rms
- * IEEE -2,2 30000 1.3e-19 2.4e-20
- *
- */
-
-/*
-Cephes Math Library Release 2.7: May, 1998
-Copyright 1984, 1987, 1989, 1998 by Stephen L. Moshier
-*/
-
-/*
-Modified for mingw
-2002-07-22 Danny Smith <dannysmith@users.sourceforge.net>
-*/
-
-#ifdef __MINGW32__
-#include "cephes_mconf.h"
-#else
-#include "mconf.h"
-#endif
-
-#ifndef _SET_ERRNO
-#define _SET_ERRNO(x)
-#endif
-
-#ifdef UNK
-static long double P[] = {
--6.8473739392677100872869E-5L,
--9.5658283111794641589011E-1L,
--8.4053568599672284488465E1L,
--1.3080425704712825945553E3L,
-};
-static long double Q[] = {
-/* 1.0000000000000000000000E0L,*/
- 9.6259501838840336946872E1L,
- 1.8218117903645559060232E3L,
- 3.9241277114138477845780E3L,
-};
-#endif
-
-#ifdef IBMPC
-static unsigned short P[] = {
-0xd2a4,0x1b0c,0x8f15,0x8f99,0xbff1, XPD
-0x5959,0x9111,0x9cc7,0xf4e2,0xbffe, XPD
-0xb576,0xef5e,0x6d57,0xa81b,0xc005, XPD
-0xe3be,0xbfbd,0x5cbc,0xa381,0xc009, XPD
-};
-static unsigned short Q[] = {
-/*0x0000,0x0000,0x0000,0x8000,0x3fff,*/
-0x687f,0xce24,0xdd6c,0xc084,0x4005, XPD
-0x3793,0xc95f,0xfa2f,0xe3b9,0x4009, XPD
-0xd5a2,0x1f9c,0x0b1b,0xf542,0x400a, XPD
-};
-#endif
-
-#ifdef MIEEE
-static long P[] = {
-0xbff10000,0x8f998f15,0x1b0cd2a4,
-0xbffe0000,0xf4e29cc7,0x91115959,
-0xc0050000,0xa81b6d57,0xef5eb576,
-0xc0090000,0xa3815cbc,0xbfbde3be,
-};
-static long Q[] = {
-/*0x3fff0000,0x80000000,0x00000000,*/
-0x40050000,0xc084dd6c,0xce24687f,
-0x40090000,0xe3b9fa2f,0xc95f3793,
-0x400a0000,0xf5420b1b,0x1f9cd5a2,
-};
-#endif
-
-#ifndef __MINGW32__
-extern long double MAXLOGL;
-#ifdef ANSIPROT
-extern long double fabsl ( long double );
-extern long double expl ( long double );
-extern long double polevll ( long double, void *, int );
-extern long double p1evll ( long double, void *, int );
-#else
-long double fabsl(), expl(), polevll(), p1evll();
-#endif
-#endif /* __MINGW32__ */
-
-long double tanhl(x)
-long double x;
-{
-long double s, z;
-
-#ifdef MINUSZERO
-if( x == 0.0L )
- return(x);
-#endif
-if (isnanl(x))
- {
- _SET_ERRNO (EDOM);
- return x;
- }
-
-z = fabsl(x);
-if( z > 0.5L * MAXLOGL )
- {
- _SET_ERRNO (ERANGE);
- if( x > 0 )
- return( 1.0L );
- else
- return( -1.0L );
- }
-if( z >= 0.625L )
- {
- s = expl(2.0*z);
- z = 1.0L - 2.0/(s + 1.0L);
- if( x < 0 )
- z = -z;
- }
-else
- {
- s = x * x;
- z = polevll( s, P, 3 )/p1evll(s, Q, 3);
- z = x * s * z;
- z = x + z;
- }
-return( z );
-}
diff --git a/winsup/mingw/mingwex/math/tanl.S b/winsup/mingw/mingwex/math/tanl.S
deleted file mode 100644
index fd30019..0000000
--- a/winsup/mingw/mingwex/math/tanl.S
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Written by J.T. Conklin <jtc@netbsd.org>.
- * Public domain.
- *
- * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
- *
- * Removed header file dependency for use in libmingwex.a by
- * Danny Smith <dannysmith@users.sourceforge.net>
- */
- .file "tanl.S"
- .text
- .align 4
-.globl _tanl
- .def _tanl; .scl 2; .type 32; .endef
-_tanl:
- fldt 4(%esp)
- fptan
- fnstsw %ax
- testl $0x400,%eax
- jnz 1f
- fstp %st(0)
- ret
-1: fldpi
- fadd %st(0)
- fxch %st(1)
-2: fprem1
- fstsw %ax
- testl $0x400,%eax
- jnz 2b
- fstp %st(1)
- fptan
- fstp %st(0)
- ret
diff --git a/winsup/mingw/mingwex/math/tgamma.c b/winsup/mingw/mingwex/math/tgamma.c
deleted file mode 100644
index b48ac5c..0000000
--- a/winsup/mingw/mingwex/math/tgamma.c
+++ /dev/null
@@ -1,388 +0,0 @@
-/* gamma.c
- *
- * Gamma function
- *
- *
- *
- * SYNOPSIS:
- *
- * double x, y, __tgamma_r();
- * int* sgngam;
- * y = __tgamma_r( x, sgngam );
- *
- * double x, y, tgamma();
- * y = tgamma( x)
- *
- *
- *
- * DESCRIPTION:
- *
- * Returns gamma function of the argument. The result is
- * correctly signed. In the reentrant version the sign (+1 or -1)
- * is returned in the variable referenced by sgngam.
- *
- * Arguments |x| <= 34 are reduced by recurrence and the function
- * approximated by a rational function of degree 6/7 in the
- * interval (2,3). Large arguments are handled by Stirling's
- * formula. Large negative arguments are made positive using
- * a reflection formula.
- *
- *
- * ACCURACY:
- *
- * Relative error:
- * arithmetic domain # trials peak rms
- * DEC -34, 34 10000 1.3e-16 2.5e-17
- * IEEE -170,-33 20000 2.3e-15 3.3e-16
- * IEEE -33, 33 20000 9.4e-16 2.2e-16
- * IEEE 33, 171.6 20000 2.3e-15 3.2e-16
- *
- * Error for arguments outside the test range will be larger
- * owing to error amplification by the exponential function.
- *
- */
-
-/*
-Cephes Math Library Release 2.8: June, 2000
-Copyright 1984, 1987, 1989, 1992, 2000 by Stephen L. Moshier
-*/
-
-
-/*
- * 26-11-2002 Modified for mingw.
- * Danny Smith <dannysmith@users.sourceforge.net>
- */
-
-
-#ifndef __MINGW32__
-#include "mconf.h"
-#else
-#include "cephes_mconf.h"
-#endif
-
-#ifdef UNK
-static const double P[] = {
- 1.60119522476751861407E-4,
- 1.19135147006586384913E-3,
- 1.04213797561761569935E-2,
- 4.76367800457137231464E-2,
- 2.07448227648435975150E-1,
- 4.94214826801497100753E-1,
- 9.99999999999999996796E-1
-};
-static const double Q[] = {
--2.31581873324120129819E-5,
- 5.39605580493303397842E-4,
--4.45641913851797240494E-3,
- 1.18139785222060435552E-2,
- 3.58236398605498653373E-2,
--2.34591795718243348568E-1,
- 7.14304917030273074085E-2,
- 1.00000000000000000320E0
-};
-#define MAXGAM 171.624376956302725
-static const double LOGPI = 1.14472988584940017414;
-#endif
-
-#ifdef DEC
-static const unsigned short P[] = {
-0035047,0162701,0146301,0005234,
-0035634,0023437,0032065,0176530,
-0036452,0137157,0047330,0122574,
-0037103,0017310,0143041,0017232,
-0037524,0066516,0162563,0164605,
-0037775,0004671,0146237,0014222,
-0040200,0000000,0000000,0000000
-};
-static const unsigned short Q[] = {
-0134302,0041724,0020006,0116565,
-0035415,0072121,0044251,0025634,
-0136222,0003447,0035205,0121114,
-0036501,0107552,0154335,0104271,
-0037022,0135717,0014776,0171471,
-0137560,0034324,0165024,0037021,
-0037222,0045046,0047151,0161213,
-0040200,0000000,0000000,0000000
-};
-#define MAXGAM 34.84425627277176174
-#endif
-
-#ifdef IBMPC
-static const unsigned short P[] = {
-0x2153,0x3998,0xfcb8,0x3f24,
-0xbfab,0xe686,0x84e3,0x3f53,
-0x14b0,0xe9db,0x57cd,0x3f85,
-0x23d3,0x18c4,0x63d9,0x3fa8,
-0x7d31,0xdcae,0x8da9,0x3fca,
-0xe312,0x3993,0xa137,0x3fdf,
-0x0000,0x0000,0x0000,0x3ff0
-};
-static const unsigned short Q[] = {
-0xd3af,0x8400,0x487a,0xbef8,
-0x2573,0x2915,0xae8a,0x3f41,
-0xb44a,0xe750,0x40e4,0xbf72,
-0xb117,0x5b1b,0x31ed,0x3f88,
-0xde67,0xe33f,0x5779,0x3fa2,
-0x87c2,0x9d42,0x071a,0xbfce,
-0x3c51,0xc9cd,0x4944,0x3fb2,
-0x0000,0x0000,0x0000,0x3ff0
-};
-#define MAXGAM 171.624376956302725
-#endif
-
-#ifdef MIEEE
-static const unsigned short P[] = {
-0x3f24,0xfcb8,0x3998,0x2153,
-0x3f53,0x84e3,0xe686,0xbfab,
-0x3f85,0x57cd,0xe9db,0x14b0,
-0x3fa8,0x63d9,0x18c4,0x23d3,
-0x3fca,0x8da9,0xdcae,0x7d31,
-0x3fdf,0xa137,0x3993,0xe312,
-0x3ff0,0x0000,0x0000,0x0000
-};
-static const unsigned short Q[] = {
-0xbef8,0x487a,0x8400,0xd3af,
-0x3f41,0xae8a,0x2915,0x2573,
-0xbf72,0x40e4,0xe750,0xb44a,
-0x3f88,0x31ed,0x5b1b,0xb117,
-0x3fa2,0x5779,0xe33f,0xde67,
-0xbfce,0x071a,0x9d42,0x87c2,
-0x3fb2,0x4944,0xc9cd,0x3c51,
-0x3ff0,0x0000,0x0000,0x0000
-};
-#define MAXGAM 171.624376956302725
-#endif
-
-/* Stirling's formula for the gamma function */
-#if UNK
-static const double STIR[5] = {
- 7.87311395793093628397E-4,
--2.29549961613378126380E-4,
--2.68132617805781232825E-3,
- 3.47222221605458667310E-3,
- 8.33333333333482257126E-2,
-};
-#define MAXSTIR 143.01608
-static const double SQTPI = 2.50662827463100050242E0;
-#endif
-#if DEC
-static const unsigned short STIR[20] = {
-0035516,0061622,0144553,0112224,
-0135160,0131531,0037460,0165740,
-0136057,0134460,0037242,0077270,
-0036143,0107070,0156306,0027751,
-0037252,0125252,0125252,0146064,
-};
-#define MAXSTIR 26.77
-static const unsigned short SQT[4] = {
-0040440,0066230,0177661,0034055,
-};
-#define SQTPI *(double *)SQT
-#endif
-#if IBMPC
-static const unsigned short STIR[20] = {
-0x7293,0x592d,0xcc72,0x3f49,
-0x1d7c,0x27e6,0x166b,0xbf2e,
-0x4fd7,0x07d4,0xf726,0xbf65,
-0xc5fd,0x1b98,0x71c7,0x3f6c,
-0x5986,0x5555,0x5555,0x3fb5,
-};
-#define MAXSTIR 143.01608
-
-static const union
-{
- unsigned short s[4];
- double d;
-} sqt = {{0x2706,0x1ff6,0x0d93,0x4004}};
-#define SQTPI (sqt.d)
-#endif
-#if MIEEE
-static const unsigned short STIR[20] = {
-0x3f49,0xcc72,0x592d,0x7293,
-0xbf2e,0x166b,0x27e6,0x1d7c,
-0xbf65,0xf726,0x07d4,0x4fd7,
-0x3f6c,0x71c7,0x1b98,0xc5fd,
-0x3fb5,0x5555,0x5555,0x5986,
-};
-#define MAXSTIR 143.01608
-static const unsigned short SQT[4] = {
-0x4004,0x0d93,0x1ff6,0x2706,
-};
-#define SQTPI *(double *)SQT
-#endif
-
-#ifndef __MINGW32__
-int sgngam = 0;
-extern int sgngam;
-extern double MAXLOG, MAXNUM, PI;
-#ifdef ANSIPROT
-extern double pow ( double, double );
-extern double log ( double );
-extern double exp ( double );
-extern double sin ( double );
-extern double polevl ( double, void *, int );
-extern double p1evl ( double, void *, int );
-extern double floor ( double );
-extern double fabs ( double );
-extern int isnan ( double );
-extern int isfinite ( double );
-static double stirf ( double );
-double lgam ( double );
-#else
-double pow(), log(), exp(), sin(), polevl(), p1evl(), floor(), fabs();
-int isnan(), isfinite();
-static double stirf();
-double lgam();
-#endif
-#ifdef INFINITIES
-extern double INFINITY;
-#endif
-#ifdef NANS
-extern double NAN;
-#endif
-#else /* __MINGW32__ */
-static double stirf ( double );
-#endif
-
-/* Gamma function computed by Stirling's formula.
- * The polynomial STIR is valid for 33 <= x <= 172.
- */
-static double stirf(x)
-double x;
-{
-double y, w, v;
-
-w = 1.0/x;
-w = 1.0 + w * polevl( w, STIR, 4 );
-y = exp(x);
-if( x > MAXSTIR )
- { /* Avoid overflow in pow() */
- v = pow( x, 0.5 * x - 0.25 );
- y = v * (v / y);
- }
-else
- {
- y = pow( x, x - 0.5 ) / y;
- }
-y = SQTPI * y * w;
-return( y );
-}
-
-
-
-double __tgamma_r(double x, int* sgngam)
-{
-double p, q, z;
-int i;
-
-*sgngam = 1;
-#ifdef NANS
-if( isnan(x) )
- return(x);
-#endif
-#ifdef INFINITIES
-#ifdef NANS
-if( x == INFINITY )
- return(x);
-if( x == -INFINITY )
- return(NAN);
-#else
-if( !isfinite(x) )
- return(x);
-#endif
-#endif
-q = fabs(x);
-
-if( q > 33.0 )
- {
- if( x < 0.0 )
- {
- p = floor(q);
- if( p == q )
- {
-gsing:
- _SET_ERRNO(EDOM);
- mtherr( "tgamma", SING );
-#ifdef INFINITIES
- return (INFINITY);
-#else
- return (MAXNUM);
-#endif
- }
- i = p;
- if( (i & 1) == 0 )
- *sgngam = -1;
- z = q - p;
- if( z > 0.5 )
- {
- p += 1.0;
- z = q - p;
- }
- z = q * sin( PI * z );
- if( z == 0.0 )
- {
- _SET_ERRNO(ERANGE);
- mtherr( "tgamma", OVERFLOW );
-#ifdef INFINITIES
- return( *sgngam * INFINITY);
-#else
- return( *sgngam * MAXNUM);
-#endif
- }
- z = fabs(z);
- z = PI/(z * stirf(q) );
- }
- else
- {
- z = stirf(x);
- }
- return( *sgngam * z );
- }
-
-z = 1.0;
-while( x >= 3.0 )
- {
- x -= 1.0;
- z *= x;
- }
-
-while( x < 0.0 )
- {
- if( x > -1.E-9 )
- goto Small;
- z /= x;
- x += 1.0;
- }
-
-while( x < 2.0 )
- {
- if( x < 1.e-9 )
- goto Small;
- z /= x;
- x += 1.0;
- }
-
-if( x == 2.0 )
- return(z);
-
-x -= 2.0;
-p = polevl( x, P, 6 );
-q = polevl( x, Q, 7 );
-return( z * p / q );
-
-Small:
-if( x == 0.0 )
- {
- goto gsing;
- }
-else
- return( z/((1.0 + 0.5772156649015329 * x) * x) );
-}
-
-/* This is the C99 version */
-
-double tgamma(double x)
-{
- int local_sgngam=0;
- return (__tgamma_r(x, &local_sgngam));
-}
diff --git a/winsup/mingw/mingwex/math/tgammaf.c b/winsup/mingw/mingwex/math/tgammaf.c
deleted file mode 100644
index 07d2949..0000000
--- a/winsup/mingw/mingwex/math/tgammaf.c
+++ /dev/null
@@ -1,265 +0,0 @@
-/* gammaf.c
- *
- * Gamma function
- *
- *
- *
- * SYNOPSIS:
- *
- * float x, y, __tgammaf_r();
- * int* sgngamf;
- * y = __tgammaf_r( x, sgngamf );
- *
- * float x, y, tgammaf();
- * y = tgammaf( x);
- *
- *
- * DESCRIPTION:
- *
- * Returns gamma function of the argument. The result is
- * correctly signed. In the reentrant version the sign (+1 or -1)
- * is returned in the variable referenced by sgngamf.
- *
- * Arguments between 0 and 10 are reduced by recurrence and the
- * function is approximated by a polynomial function covering
- * the interval (2,3). Large arguments are handled by Stirling's
- * formula. Negative arguments are made positive using
- * a reflection formula.
- *
- *
- * ACCURACY:
- *
- * Relative error:
- * arithmetic domain # trials peak rms
- * IEEE 0,-33 100,000 5.7e-7 1.0e-7
- * IEEE -33,0 100,000 6.1e-7 1.2e-7
- *
- *
- */
-
-/*
-Cephes Math Library Release 2.7: July, 1998
-Copyright 1984, 1987, 1989, 1992, 1998 by Stephen L. Moshier
-*/
-
-
-/*
- * 26-11-2002 Modified for mingw.
- * Danny Smith <dannysmith@users.sourceforge.net>
- */
-
-
-#ifndef __MINGW32__
-#include "mconf.h"
-#else
-#include "cephes_mconf.h"
-#endif
-
-/* define MAXGAM 34.84425627277176174 */
-
-/* Stirling's formula for the gamma function
- * gamma(x) = sqrt(2 pi) x^(x-.5) exp(-x) ( 1 + 1/x P(1/x) )
- * .028 < 1/x < .1
- * relative error < 1.9e-11
- */
-static const float STIR[] = {
--2.705194986674176E-003,
- 3.473255786154910E-003,
- 8.333331788340907E-002,
-};
-static const float MAXSTIR = 26.77;
-static const float SQTPIF = 2.50662827463100050242; /* sqrt( 2 pi ) */
-
-#ifndef __MINGW32__
-
-extern float MAXLOGF, MAXNUMF, PIF;
-
-#ifdef ANSIC
-float expf(float);
-float logf(float);
-float powf( float, float );
-float sinf(float);
-float gammaf(float);
-float floorf(float);
-static float stirf(float);
-float polevlf( float, float *, int );
-float p1evlf( float, float *, int );
-#else
-float expf(), logf(), powf(), sinf(), floorf();
-float polevlf(), p1evlf();
-static float stirf();
-#endif
-
-#else /* __MINGW32__ */
-static float stirf(float);
-#endif
-
-/* Gamma function computed by Stirling's formula,
- * sqrt(2 pi) x^(x-.5) exp(-x) (1 + 1/x P(1/x))
- * The polynomial STIR is valid for 33 <= x <= 172.
- */
-static float stirf( float x )
-{
-float y, w, v;
-
-w = 1.0/x;
-w = 1.0 + w * polevlf( w, STIR, 2 );
-y = expf( -x );
-if( x > MAXSTIR )
- { /* Avoid overflow in pow() */
- v = powf( x, 0.5 * x - 0.25 );
- y *= v;
- y *= v;
- }
-else
- {
- y = powf( x, x - 0.5 ) * y;
- }
-y = SQTPIF * y * w;
-return( y );
-}
-
-
-/* gamma(x+2), 0 < x < 1 */
-static const float P[] = {
- 1.536830450601906E-003,
- 5.397581592950993E-003,
- 4.130370201859976E-003,
- 7.232307985516519E-002,
- 8.203960091619193E-002,
- 4.117857447645796E-001,
- 4.227867745131584E-001,
- 9.999999822945073E-001,
-};
-
-float __tgammaf_r( float x, int* sgngamf)
-{
-float p, q, z, nz;
-int i, direction, negative;
-
-#ifdef NANS
-if( isnan(x) )
- return(x);
-#endif
-#ifdef INFINITIES
-#ifdef NANS
-if( x == INFINITYF )
- return(x);
-if( x == -INFINITYF )
- return(NANF);
-#else
-if( !isfinite(x) )
- return(x);
-#endif
-#endif
-
-*sgngamf = 1;
-negative = 0;
-nz = 0.0;
-if( x < 0.0 )
- {
- negative = 1;
- q = -x;
- p = floorf(q);
- if( p == q )
- {
-gsing:
- _SET_ERRNO(EDOM);
- mtherr( "tgammaf", SING );
-#ifdef INFINITIES
- return (INFINITYF);
-#else
- return (MAXNUMF);
-#endif
- }
- i = p;
- if( (i & 1) == 0 )
- *sgngamf = -1;
- nz = q - p;
- if( nz > 0.5 )
- {
- p += 1.0;
- nz = q - p;
- }
- nz = q * sinf( PIF * nz );
- if( nz == 0.0 )
- {
- _SET_ERRNO(ERANGE);
- mtherr( "tgamma", OVERFLOW );
-#ifdef INFINITIES
- return( *sgngamf * INFINITYF);
-#else
- return( *sgngamf * MAXNUMF);
-#endif
- }
- if( nz < 0 )
- nz = -nz;
- x = q;
- }
-if( x >= 10.0 )
- {
- z = stirf(x);
- }
-if( x < 2.0 )
- direction = 1;
-else
- direction = 0;
-z = 1.0;
-while( x >= 3.0 )
- {
- x -= 1.0;
- z *= x;
- }
-/*
-while( x < 0.0 )
- {
- if( x > -1.E-4 )
- goto Small;
- z *=x;
- x += 1.0;
- }
-*/
-while( x < 2.0 )
- {
- if( x < 1.e-4 )
- goto Small;
- z *=x;
- x += 1.0;
- }
-
-if( direction )
- z = 1.0/z;
-
-if( x == 2.0 )
- return(z);
-
-x -= 2.0;
-p = z * polevlf( x, P, 7 );
-
-gdone:
-
-if( negative )
- {
- p = *sgngamf * PIF/(nz * p );
- }
-return(p);
-
-Small:
-if( x == 0.0 )
- {
- goto gsing;
- }
-else
- {
- p = z / ((1.0 + 0.5772156649015329 * x) * x);
- goto gdone;
- }
-}
-
-/* This is the C99 version */
-
-float tgammaf(float x)
-{
- int local_sgngamf=0;
- return (__tgammaf_r(x, &local_sgngamf));
-}
diff --git a/winsup/mingw/mingwex/math/tgammal.c b/winsup/mingw/mingwex/math/tgammal.c
deleted file mode 100644
index 6db4e3a..0000000
--- a/winsup/mingw/mingwex/math/tgammal.c
+++ /dev/null
@@ -1,501 +0,0 @@
-/* gammal.c
- *
- * Gamma function
- *
- *
- *
- * SYNOPSIS:
- *
- * long double x, y, __tgammal_r();
- * int* sgngaml;
- * y = __tgammal_r( x, sgngaml );
- *
- * long double x, y, tgammal();
- * y = tgammal( x); *
- *
- *
- * DESCRIPTION:
- *
- * Returns gamma function of the argument. The result is
- * correctly signed. In the reentrant version the sign (+1 or -1)
- * is returned in the variable referenced by sgngamf.
- *
- * Arguments |x| <= 13 are reduced by recurrence and the function
- * approximated by a rational function of degree 7/8 in the
- * interval (2,3). Large arguments are handled by Stirling's
- * formula. Large negative arguments are made positive using
- * a reflection formula.
- *
- *
- * ACCURACY:
- *
- * Relative error:
- * arithmetic domain # trials peak rms
- * IEEE -40,+40 10000 3.6e-19 7.9e-20
- * IEEE -1755,+1755 10000 4.8e-18 6.5e-19
- *
- * Accuracy for large arguments is dominated by error in powl().
- *
- */
-
-/*
-Copyright 1994 by Stephen L. Moshier
-*/
-
-
-/*
- * 26-11-2002 Modified for mingw.
- * Danny Smith <dannysmith@users.sourceforge.net>
- */
-
-
-#ifndef __MINGW32__
-#include "mconf.h"
-#else
-#include "cephes_mconf.h"
-#endif
-
-/*
-gamma(x+2) = gamma(x+2) P(x)/Q(x)
-0 <= x <= 1
-Relative error
-n=7, d=8
-Peak error = 1.83e-20
-Relative error spread = 8.4e-23
-*/
-
-#if UNK
-static const long double P[8] = {
- 4.212760487471622013093E-5L,
- 4.542931960608009155600E-4L,
- 4.092666828394035500949E-3L,
- 2.385363243461108252554E-2L,
- 1.113062816019361559013E-1L,
- 3.629515436640239168939E-1L,
- 8.378004301573126728826E-1L,
- 1.000000000000000000009E0L,
-};
-static const long double Q[9] = {
--1.397148517476170440917E-5L,
- 2.346584059160635244282E-4L,
--1.237799246653152231188E-3L,
--7.955933682494738320586E-4L,
- 2.773706565840072979165E-2L,
--4.633887671244534213831E-2L,
--2.243510905670329164562E-1L,
- 4.150160950588455434583E-1L,
- 9.999999999999999999908E-1L,
-};
-#endif
-#if IBMPC
-static const unsigned short P[] = {
-0x434a,0x3f22,0x2bda,0xb0b2,0x3ff0, XPD
-0xf5aa,0xe82f,0x335b,0xee2e,0x3ff3, XPD
-0xbe6c,0x3757,0xc717,0x861b,0x3ff7, XPD
-0x7f43,0x5196,0xb166,0xc368,0x3ff9, XPD
-0x9549,0x8eb5,0x8c3a,0xe3f4,0x3ffb, XPD
-0x8d75,0x23af,0xc8e4,0xb9d4,0x3ffd, XPD
-0x29cf,0x19b3,0x16c8,0xd67a,0x3ffe, XPD
-0x0000,0x0000,0x0000,0x8000,0x3fff, XPD
-};
-static const unsigned short Q[] = {
-0x5473,0x2de8,0x1268,0xea67,0xbfee, XPD
-0x334b,0xc2f0,0xa2dd,0xf60e,0x3ff2, XPD
-0xbeed,0x1853,0xa691,0xa23d,0xbff5, XPD
-0x296e,0x7cb1,0x5dfd,0xd08f,0xbff4, XPD
-0x0417,0x7989,0xd7bc,0xe338,0x3ff9, XPD
-0x3295,0x3698,0xd580,0xbdcd,0xbffa, XPD
-0x75ef,0x3ab7,0x4ad3,0xe5bc,0xbffc, XPD
-0xe458,0x2ec7,0xfd57,0xd47c,0x3ffd, XPD
-0x0000,0x0000,0x0000,0x8000,0x3fff, XPD
-};
-#endif
-#if MIEEE
-static const long P[24] = {
-0x3ff00000,0xb0b22bda,0x3f22434a,
-0x3ff30000,0xee2e335b,0xe82ff5aa,
-0x3ff70000,0x861bc717,0x3757be6c,
-0x3ff90000,0xc368b166,0x51967f43,
-0x3ffb0000,0xe3f48c3a,0x8eb59549,
-0x3ffd0000,0xb9d4c8e4,0x23af8d75,
-0x3ffe0000,0xd67a16c8,0x19b329cf,
-0x3fff0000,0x80000000,0x00000000,
-};
-static const long Q[27] = {
-0xbfee0000,0xea671268,0x2de85473,
-0x3ff20000,0xf60ea2dd,0xc2f0334b,
-0xbff50000,0xa23da691,0x1853beed,
-0xbff40000,0xd08f5dfd,0x7cb1296e,
-0x3ff90000,0xe338d7bc,0x79890417,
-0xbffa0000,0xbdcdd580,0x36983295,
-0xbffc0000,0xe5bc4ad3,0x3ab775ef,
-0x3ffd0000,0xd47cfd57,0x2ec7e458,
-0x3fff0000,0x80000000,0x00000000,
-};
-#endif
-/*
-static const long double P[] = {
--3.01525602666895735709e0L,
--3.25157411956062339893e1L,
--2.92929976820724030353e2L,
--1.70730828800510297666e3L,
--7.96667499622741999770e3L,
--2.59780216007146401957e4L,
--5.99650230220855581642e4L,
--7.15743521530849602425e4L
-};
-static const long double Q[] = {
- 1.00000000000000000000e0L,
--1.67955233807178858919e1L,
- 8.85946791747759881659e1L,
- 5.69440799097468430177e1L,
--1.98526250512761318471e3L,
- 3.31667508019495079814e3L,
- 1.60577839621734713377e4L,
--2.97045081369399940529e4L,
--7.15743521530849602412e4L
-};
-*/
-#define MAXGAML 1755.455L
-/*static const long double LOGPI = 1.14472988584940017414L;*/
-
-/* Stirling's formula for the gamma function
-gamma(x) = sqrt(2 pi) x^(x-.5) exp(-x) (1 + 1/x P(1/x))
-z(x) = x
-13 <= x <= 1024
-Relative error
-n=8, d=0
-Peak error = 9.44e-21
-Relative error spread = 8.8e-4
-*/
-#if UNK
-static const long double STIR[9] = {
- 7.147391378143610789273E-4L,
--2.363848809501759061727E-5L,
--5.950237554056330156018E-4L,
- 6.989332260623193171870E-5L,
- 7.840334842744753003862E-4L,
--2.294719747873185405699E-4L,
--2.681327161876304418288E-3L,
- 3.472222222230075327854E-3L,
- 8.333333333333331800504E-2L,
-};
-#endif
-#if IBMPC
-static const unsigned short STIR[] = {
-0x6ede,0x69f7,0x54e3,0xbb5d,0x3ff4, XPD
-0xc395,0x0295,0x4443,0xc64b,0xbfef, XPD
-0xba6f,0x7c59,0x5e47,0x9bfb,0xbff4, XPD
-0x5704,0x1a39,0xb11d,0x9293,0x3ff1, XPD
-0x30b7,0x1a21,0x98b2,0xcd87,0x3ff4, XPD
-0xbef3,0x7023,0x6a08,0xf09e,0xbff2, XPD
-0x3a1c,0x5ac8,0x3478,0xafb9,0xbff6, XPD
-0xc3c9,0x906e,0x38e3,0xe38e,0x3ff6, XPD
-0xa1d5,0xaaaa,0xaaaa,0xaaaa,0x3ffb, XPD
-};
-#endif
-#if MIEEE
-static const long STIR[27] = {
-0x3ff40000,0xbb5d54e3,0x69f76ede,
-0xbfef0000,0xc64b4443,0x0295c395,
-0xbff40000,0x9bfb5e47,0x7c59ba6f,
-0x3ff10000,0x9293b11d,0x1a395704,
-0x3ff40000,0xcd8798b2,0x1a2130b7,
-0xbff20000,0xf09e6a08,0x7023bef3,
-0xbff60000,0xafb93478,0x5ac83a1c,
-0x3ff60000,0xe38e38e3,0x906ec3c9,
-0x3ffb0000,0xaaaaaaaa,0xaaaaa1d5,
-};
-#endif
-#define MAXSTIR 1024.0L
-static const long double SQTPI = 2.50662827463100050242E0L;
-
-/* 1/gamma(x) = z P(z)
- * z(x) = 1/x
- * 0 < x < 0.03125
- * Peak relative error 4.2e-23
- */
-#if UNK
-static const long double S[9] = {
--1.193945051381510095614E-3L,
- 7.220599478036909672331E-3L,
--9.622023360406271645744E-3L,
--4.219773360705915470089E-2L,
- 1.665386113720805206758E-1L,
--4.200263503403344054473E-2L,
--6.558780715202540684668E-1L,
- 5.772156649015328608253E-1L,
- 1.000000000000000000000E0L,
-};
-#endif
-#if IBMPC
-static const unsigned short S[] = {
-0xbaeb,0xd6d3,0x25e5,0x9c7e,0xbff5, XPD
-0xfe9a,0xceb4,0xc74e,0xec9a,0x3ff7, XPD
-0x9225,0xdfef,0xb0e9,0x9da5,0xbff8, XPD
-0x10b0,0xec17,0x87dc,0xacd7,0xbffa, XPD
-0x6b8d,0x7515,0x1905,0xaa89,0x3ffc, XPD
-0xf183,0x126b,0xf47d,0xac0a,0xbffa, XPD
-0x7bf6,0x57d1,0xa013,0xa7e7,0xbffe, XPD
-0xc7a9,0x7db0,0x67e3,0x93c4,0x3ffe, XPD
-0x0000,0x0000,0x0000,0x8000,0x3fff, XPD
-};
-#endif
-#if MIEEE
-static const long S[27] = {
-0xbff50000,0x9c7e25e5,0xd6d3baeb,
-0x3ff70000,0xec9ac74e,0xceb4fe9a,
-0xbff80000,0x9da5b0e9,0xdfef9225,
-0xbffa0000,0xacd787dc,0xec1710b0,
-0x3ffc0000,0xaa891905,0x75156b8d,
-0xbffa0000,0xac0af47d,0x126bf183,
-0xbffe0000,0xa7e7a013,0x57d17bf6,
-0x3ffe0000,0x93c467e3,0x7db0c7a9,
-0x3fff0000,0x80000000,0x00000000,
-};
-#endif
-/* 1/gamma(-x) = z P(z)
- * z(x) = 1/x
- * 0 < x < 0.03125
- * Peak relative error 5.16e-23
- * Relative error spread = 2.5e-24
- */
-#if UNK
-static const long double SN[9] = {
- 1.133374167243894382010E-3L,
- 7.220837261893170325704E-3L,
- 9.621911155035976733706E-3L,
--4.219773343731191721664E-2L,
--1.665386113944413519335E-1L,
--4.200263503402112910504E-2L,
- 6.558780715202536547116E-1L,
- 5.772156649015328608727E-1L,
--1.000000000000000000000E0L,
-};
-#endif
-#if IBMPC
-static const unsigned short SN[] = {
-0x5dd1,0x02de,0xb9f7,0x948d,0x3ff5, XPD
-0x989b,0xdd68,0xc5f1,0xec9c,0x3ff7, XPD
-0x2ca1,0x18f0,0x386f,0x9da5,0x3ff8, XPD
-0x783f,0x41dd,0x87d1,0xacd7,0xbffa, XPD
-0x7a5b,0xd76d,0x1905,0xaa89,0xbffc, XPD
-0x7f64,0x1234,0xf47d,0xac0a,0xbffa, XPD
-0x5e26,0x57d1,0xa013,0xa7e7,0x3ffe, XPD
-0xc7aa,0x7db0,0x67e3,0x93c4,0x3ffe, XPD
-0x0000,0x0000,0x0000,0x8000,0xbfff, XPD
-};
-#endif
-#if MIEEE
-static const long SN[27] = {
-0x3ff50000,0x948db9f7,0x02de5dd1,
-0x3ff70000,0xec9cc5f1,0xdd68989b,
-0x3ff80000,0x9da5386f,0x18f02ca1,
-0xbffa0000,0xacd787d1,0x41dd783f,
-0xbffc0000,0xaa891905,0xd76d7a5b,
-0xbffa0000,0xac0af47d,0x12347f64,
-0x3ffe0000,0xa7e7a013,0x57d15e26,
-0x3ffe0000,0x93c467e3,0x7db0c7aa,
-0xbfff0000,0x80000000,0x00000000,
-};
-#endif
-
-#ifndef __MINGW32__
-extern long double MAXLOGL, MAXNUML, PIL;
-/* #define PIL 3.14159265358979323846L */
-/* #define MAXNUML 1.189731495357231765021263853E4932L */
-
-#ifdef ANSIPROT
-extern long double fabsl ( long double );
-extern long double lgaml ( long double );
-extern long double logl ( long double );
-extern long double expl ( long double );
-extern long double gammal ( long double );
-extern long double sinl ( long double );
-extern long double floorl ( long double );
-extern long double powl ( long double, long double );
-extern long double polevll ( long double, void *, int );
-extern long double p1evll ( long double, void *, int );
-extern int isnanl ( long double );
-extern int isfinitel ( long double );
-static long double stirf ( long double );
-#else
-long double fabsl(), lgaml(), logl(), expl(), gammal(), sinl();
-long double floorl(), powl(), polevll(), p1evll(), isnanl(), isfinitel();
-static long double stirf();
-#endif
-#ifdef INFINITIES
-extern long double INFINITYL;
-#endif
-#ifdef NANS
-extern long double NANL;
-#endif
-
-#else /* __MINGW32__ */
-static long double stirf ( long double );
-#endif
-
-
-/* Gamma function computed by Stirling's formula. */
-
-static long double stirf(x)
-long double x;
-{
-long double y, w, v;
-
-w = 1.0L/x;
-/* For large x, use rational coefficients from the analytical expansion. */
-if( x > 1024.0L )
- w = (((((6.97281375836585777429E-5L * w
- + 7.84039221720066627474E-4L) * w
- - 2.29472093621399176955E-4L) * w
- - 2.68132716049382716049E-3L) * w
- + 3.47222222222222222222E-3L) * w
- + 8.33333333333333333333E-2L) * w
- + 1.0L;
-else
- w = 1.0L + w * polevll( w, STIR, 8 );
-y = expl(x);
-if( x > MAXSTIR )
- { /* Avoid overflow in pow() */
- v = powl( x, 0.5L * x - 0.25L );
- y = v * (v / y);
- }
-else
- {
- y = powl( x, x - 0.5L ) / y;
- }
-y = SQTPI * y * w;
-return( y );
-}
-
-
-long double __tgammal_r(long double x, int* sgngaml)
-{
-long double p, q, z;
-int i;
-
-*sgngaml = 1;
-#ifdef NANS
-if( isnanl(x) )
- return(NANL);
-#endif
-#ifdef INFINITIES
-#ifdef NANS
-if( x == INFINITYL )
- return(x);
-if( x == -INFINITYL )
- return(NANL);
-#else
-if( !isfinite(x) )
- return(x);
-#endif
-#endif
-q = fabsl(x);
-
-if( q > 13.0L )
- {
- if( q > MAXGAML )
- goto goverf;
- if( x < 0.0L )
- {
- p = floorl(q);
- if( p == q )
- {
-gsing:
- _SET_ERRNO(EDOM);
- mtherr( "tgammal", SING );
-#ifdef INFINITIES
- return (INFINITYL);
-#else
- return( *sgngaml * MAXNUML);
-#endif
- }
- i = p;
- if( (i & 1) == 0 )
- *sgngaml = -1;
- z = q - p;
- if( z > 0.5L )
- {
- p += 1.0L;
- z = q - p;
- }
- z = q * sinl( PIL * z );
- z = fabsl(z) * stirf(q);
- if( z <= PIL/MAXNUML )
- {
-goverf:
- _SET_ERRNO(ERANGE);
- mtherr( "tgammal", OVERFLOW );
-#ifdef INFINITIES
- return( *sgngaml * INFINITYL);
-#else
- return( *sgngaml * MAXNUML);
-#endif
- }
- z = PIL/z;
- }
- else
- {
- z = stirf(x);
- }
- return( *sgngaml * z );
- }
-
-z = 1.0L;
-while( x >= 3.0L )
- {
- x -= 1.0L;
- z *= x;
- }
-
-while( x < -0.03125L )
- {
- z /= x;
- x += 1.0L;
- }
-
-if( x <= 0.03125L )
- goto Small;
-
-while( x < 2.0L )
- {
- z /= x;
- x += 1.0L;
- }
-
-if( x == 2.0L )
- return(z);
-
-x -= 2.0L;
-p = polevll( x, P, 7 );
-q = polevll( x, Q, 8 );
-return( z * p / q );
-
-Small:
-if( x == 0.0L )
- {
- goto gsing;
- }
-else
- {
- if( x < 0.0L )
- {
- x = -x;
- q = z / (x * polevll( x, SN, 8 ));
- }
- else
- q = z / (x * polevll( x, S, 8 ));
- }
-return q;
-}
-
-
-/* This is the C99 version. */
-
-long double tgammal(long double x)
-{
- int local_sgngaml=0;
- return (__tgammal_r(x, &local_sgngaml));
-}
-
diff --git a/winsup/mingw/mingwex/math/trunc.c b/winsup/mingw/mingwex/math/trunc.c
deleted file mode 100644
index 5c7dc68..0000000
--- a/winsup/mingw/mingwex/math/trunc.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <fenv.h>
-#include <math.h>
-
-double
-trunc (double _x){
- double retval;
- unsigned short saved_cw;
- unsigned short tmp_cw;
- __asm__ ("fnstcw %0;" : "=m" (saved_cw)); /* save FPU control word */
- tmp_cw = (saved_cw & ~(FE_TONEAREST | FE_DOWNWARD | FE_UPWARD | FE_TOWARDZERO))
- | FE_TOWARDZERO;
- __asm__ ("fldcw %0;" : : "m" (tmp_cw));
- __asm__ ("frndint;" : "=t" (retval) : "0" (_x)); /* round towards zero */
- __asm__ ("fldcw %0;" : : "m" (saved_cw) ); /* restore saved control word */
- return retval;
-}
diff --git a/winsup/mingw/mingwex/math/truncf.c b/winsup/mingw/mingwex/math/truncf.c
deleted file mode 100644
index 8869e37..0000000
--- a/winsup/mingw/mingwex/math/truncf.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <fenv.h>
-#include <math.h>
-
-float
-truncf (float _x)
-{
- float retval;
- unsigned short saved_cw;
- unsigned short tmp_cw;
- __asm__ ("fnstcw %0;" : "=m" (saved_cw)); /* save FPU control word */
- tmp_cw = (saved_cw & ~(FE_TONEAREST | FE_DOWNWARD | FE_UPWARD | FE_TOWARDZERO))
- | FE_TOWARDZERO;
- __asm__ ("fldcw %0;" : : "m" (tmp_cw));
- __asm__ ("frndint;" : "=t" (retval) : "0" (_x)); /* round towards zero */
- __asm__ ("fldcw %0;" : : "m" (saved_cw) ); /* restore saved control word */
- return retval;
-}
diff --git a/winsup/mingw/mingwex/math/truncl.c b/winsup/mingw/mingwex/math/truncl.c
deleted file mode 100644
index e34b21b..0000000
--- a/winsup/mingw/mingwex/math/truncl.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <fenv.h>
-#include <math.h>
-
-long double
-truncl (long double _x){
- long double retval;
- unsigned short saved_cw;
- unsigned short tmp_cw;
- __asm__ ("fnstcw %0;" : "=m" (saved_cw)); /* save FPU control word */
- tmp_cw = (saved_cw & ~(FE_TONEAREST | FE_DOWNWARD | FE_UPWARD | FE_TOWARDZERO))
- | FE_TOWARDZERO;
- __asm__ ("fldcw %0;" : : "m" (tmp_cw));
- __asm__ ("frndint;" : "=t" (retval) : "0" (_x)); /* round towards zero */
- __asm__ ("fldcw %0;" : : "m" (saved_cw) ); /* restore saved control word */
- return retval;
-}
diff --git a/winsup/mingw/mingwex/mb_wc_common.h b/winsup/mingw/mingwex/mb_wc_common.h
deleted file mode 100755
index 40028d6..0000000
--- a/winsup/mingw/mingwex/mb_wc_common.h
+++ /dev/null
@@ -1,7 +0,0 @@
-__declspec(dllimport) unsigned int __lc_codepage;
-
-static inline
-unsigned int get_codepage (void)
-{
- return __lc_codepage;
-}
diff --git a/winsup/mingw/mingwex/mbrtowc.c b/winsup/mingw/mingwex/mbrtowc.c
deleted file mode 100755
index 52fb5ec..0000000
--- a/winsup/mingw/mingwex/mbrtowc.c
+++ /dev/null
@@ -1,154 +0,0 @@
-#include "mb_wc_common.h"
-#include <wchar.h>
-#include <stdlib.h>
-#include <errno.h>
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
-static int __MINGW_ATTRIB_NONNULL(1) __MINGW_ATTRIB_NONNULL(4)
-__mbrtowc_cp (wchar_t * __restrict__ pwc, const char * __restrict__ s,
- size_t n, mbstate_t* __restrict__ ps,
- const unsigned int cp, const unsigned int mb_max)
-{
- union {
- mbstate_t val;
- char mbcs[4];
- } shift_state;
-
-
- /* Do the prelim checks */
- if (s == NULL)
- return 0;
-
- if (n == 0)
- /* The standard doesn't mention this case explicitly. Tell
- caller that the conversion from a non-null s is incomplete. */
- return -2;
-
- /* Save the current shift state, in case we need it in DBCS case. */
- shift_state.val = *ps;
- *ps = 0;
-
- if (!*s)
- {
- *pwc = 0;
- return 0;
- }
-
- if (mb_max > 1)
- {
- if (shift_state.mbcs[0] != 0)
- {
- /* Complete the mb char with the trailing byte. */
- shift_state.mbcs[1] = *s; /* the second byte */
- if (MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS,
- shift_state.mbcs, 2, pwc, 1)
- == 0)
- {
- /* An invalid trailing byte */
- errno = EILSEQ;
- return -1;
- }
- return 2;
- }
- else if (IsDBCSLeadByteEx (cp, *s))
- {
- /* If told to translate one byte, just save the leadbyte
- in *ps. */
- if (n < 2)
- {
- ((char*) ps)[0] = *s;
- return -2;
- }
- /* Else translate the first two bytes */
- else if (MultiByteToWideChar (cp, MB_ERR_INVALID_CHARS,
- s, 2, pwc, 1)
- == 0)
- {
- errno = EILSEQ;
- return -1;
- }
- return 2;
- }
- }
-
- /* Fall through to single byte char */
- if (cp == 0)
- *pwc = (wchar_t)(unsigned char)*s;
-
- else if (MultiByteToWideChar (cp, MB_ERR_INVALID_CHARS, s, 1, pwc, 1)
- == 0)
- {
- errno = EILSEQ;
- return -1;
- }
- return 1;
-}
-
-size_t
-mbrtowc (wchar_t * __restrict__ pwc, const char * __restrict__ s,
- size_t n, mbstate_t* __restrict__ ps)
-{
- static mbstate_t internal_mbstate = 0;
- wchar_t byte_bucket = 0;
- wchar_t* dst = pwc ? pwc : &byte_bucket;
-
- return (size_t) __mbrtowc_cp (dst, s, n, ps ? ps : &internal_mbstate,
- get_codepage(), MB_CUR_MAX);
-}
-
-
-size_t
-mbsrtowcs (wchar_t* __restrict__ dst, const char ** __restrict__ src,
- size_t len, mbstate_t* __restrict__ ps)
-{
- int ret =0 ;
- size_t n = 0;
- static mbstate_t internal_mbstate = 0;
- mbstate_t* internal_ps = ps ? ps : &internal_mbstate;
- const unsigned int cp = get_codepage();
- const unsigned int mb_max = MB_CUR_MAX;
-
- if ( src == NULL || *src == NULL ) /* undefined behavior */
- return 0;
-
- if (dst != NULL)
- {
- while (n < len
- && (ret = __mbrtowc_cp(dst, *src, len - n,
- internal_ps, cp, mb_max))
- > 0)
- {
- ++dst;
- *src += ret;
- n += ret;
- }
-
- if (n < len && ret == 0)
- *src = (char *)NULL;
- }
-
- else
- {
- wchar_t byte_bucket = 0;
- while (n < len
- && (ret = __mbrtowc_cp (&byte_bucket, *src, mb_max,
- internal_ps, cp, mb_max))
- > 0)
- {
- *src += ret;
- n += ret;
- }
- }
- return n;
-}
-
-size_t
-mbrlen (const char * __restrict__ s, size_t n,
- mbstate_t * __restrict__ ps)
-{
- static mbstate_t s_mbstate = 0;
- wchar_t byte_bucket = 0;
- return __mbrtowc_cp (&byte_bucket, s, n, (ps) ? ps : &s_mbstate,
- get_codepage(), MB_CUR_MAX);
-}
diff --git a/winsup/mingw/mingwex/mbsinit.c b/winsup/mingw/mingwex/mbsinit.c
deleted file mode 100644
index c130afe..0000000
--- a/winsup/mingw/mingwex/mbsinit.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* This source code was extracted from the Q8 package created and placed
- in the PUBLIC DOMAIN by Doug Gwyn <gwyn@arl.mil>
- last edit: 1999/11/05 gwyn@arl.mil
-
- Implements subclause 7.24 of ISO/IEC 9899:1999 (E).
-
- It supports an encoding where all char codes are mapped
- to the *same* code values within a wchar_t or wint_t,
- so long as no other wchar_t codes are used by the program.
-
-*/
-
-#include <wchar.h>
-
-int
-mbsinit(ps)
- const mbstate_t *ps;
- {
- return 1; /* don't have shift states */
- }
-
diff --git a/winsup/mingw/mingwex/mingw-aligned-malloc.c b/winsup/mingw/mingwex/mingw-aligned-malloc.c
deleted file mode 100755
index a6d4ac9..0000000
--- a/winsup/mingw/mingwex/mingw-aligned-malloc.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- __mingw_aligned_malloc and friends, implemented using Microsoft's public
- interfaces and with the help of the algorithm description provided
- by Wu Yongwei: http://sourceforge.net/mailarchive/message.php?msg_id=3847075
-
- I hereby place this implementation in the public domain.
- -- Steven G. Johnson (stevenj@alum.mit.edu)
-*/
-
-#include <stdlib.h>
-#include <errno.h>
-#include <stddef.h> /* ptrdiff_t */
-#include <string.h> /* memmove */
-
-#ifdef HAVE_STDINT_H
-# include <stdint.h> /* uintptr_t */
-#else
-# define uintptr_t size_t
-#endif
-
-#define NOT_POWER_OF_TWO(n) (((n) & ((n) - 1)))
-#define UI(p) ((uintptr_t) (p))
-#define CP(p) ((char *) p)
-
-#define PTR_ALIGN(p0, alignment, offset) \
- ((void *) (((UI(p0) + (alignment + sizeof(void*)) + offset) \
- & (~UI(alignment - 1))) \
- - offset))
-
-/* Pointer must sometimes be aligned; assume sizeof(void*) is a power of two. */
-#define ORIG_PTR(p) (*(((void **) (UI(p) & (~UI(sizeof(void*) - 1)))) - 1))
-
-void *
-__mingw_aligned_offset_malloc (size_t size, size_t alignment, size_t offset)
-{
- void *p0, *p;
-
- if (NOT_POWER_OF_TWO (alignment))
- {
- errno = EINVAL;
- return ((void *) 0);
- }
- if (size == 0)
- return ((void *) 0);
- if (alignment < sizeof (void *))
- alignment = sizeof (void *);
-
- /* Including the extra sizeof(void*) is overkill on a 32-bit
- machine, since malloc is already 8-byte aligned, as long
- as we enforce alignment >= 8 ...but oh well. */
-
- p0 = malloc (size + (alignment + sizeof (void *)));
- if (!p0)
- return ((void *) 0);
- p = PTR_ALIGN (p0, alignment, offset);
- ORIG_PTR (p) = p0;
- return p;
-}
-
-void *
-__mingw_aligned_malloc (size_t size, size_t alignment)
-{
- return __mingw_aligned_offset_malloc (size, alignment, 0);
-}
-
-void
-__mingw_aligned_free (void *memblock)
-{
- if (memblock)
- free (ORIG_PTR (memblock));
-}
-
-void *
-__mingw_aligned_offset_realloc (void *memblock, size_t size,
- size_t alignment, size_t offset)
-{
- void *p0, *p;
- ptrdiff_t shift;
-
- if (!memblock)
- return __mingw_aligned_offset_malloc (size, alignment, offset);
- if (NOT_POWER_OF_TWO (alignment))
- goto bad;
- if (size == 0)
- {
- __mingw_aligned_free (memblock);
- return ((void *) 0);
- }
- if (alignment < sizeof (void *))
- alignment = sizeof (void *);
-
- p0 = ORIG_PTR (memblock);
- /* It is an error for the alignment to change. */
- if (memblock != PTR_ALIGN (p0, alignment, offset))
- goto bad;
- shift = CP (memblock) - CP (p0);
-
- p0 = realloc (p0, size + (alignment + sizeof (void *)));
- if (!p0)
- return ((void *) 0);
- p = PTR_ALIGN (p0, alignment, offset);
-
- /* Relative shift of actual data may be different from before, ugh. */
- if (shift != CP (p) - CP (p0))
- /* ugh, moves more than necessary if size is increased. */
- memmove (CP (p), CP (p0) + shift, size);
-
- ORIG_PTR (p) = p0;
- return p;
-
-bad:
- errno = EINVAL;
- return ((void *) 0);
-}
-
-void *
-__mingw_aligned_realloc (void *memblock, size_t size, size_t alignment)
-{
- return __mingw_aligned_offset_realloc (memblock, size, alignment, 0);
-}
diff --git a/winsup/mingw/mingwex/mingw-fseek.c b/winsup/mingw/mingwex/mingw-fseek.c
deleted file mode 100644
index b4f45cc..0000000
--- a/winsup/mingw/mingwex/mingw-fseek.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Workaround for limitations on win9x where a file contents are
- * not zero'd out if you seek past the end and then write.
- * Copied from ming local-patch to binutils/bfd/libbfd.c written by
- * Mumit Khan <khan@xraylith.wisc.edu>
- */
-
-#include <windows.h>
-#include <stdio.h>
-#include <io.h>
-#include <stdlib.h>
-
-#define ZEROBLOCKSIZE 512
-static int __mingw_fseek_called;
-
-/* The fseek in Win9x runtime does not zero out the file if seeking past
- the end; if you don't want random stuff from your disk included in your
- output DLL/executable, use this version instead. On WinNT/Win2k, it
- just calls runtime fseek().
-
- CHECK/FIXME: Does this work for both text and binary modes?? */
-
-
-int
-__mingw_fseek (FILE *fp, long offset, int whence)
-{
-# undef fseek
- __mingw_fseek_called = 1;
- return fseek (fp, offset, whence);
-}
-
-int
-__mingw_fseeko64 (FILE *fp, off64_t offset, int whence)
-{
-# undef fseeko64
- __mingw_fseek_called = 1;
- return fseeko64 (fp, offset, whence);
-}
-
-size_t
-__mingw_fwrite (const void *buffer, size_t size, size_t count, FILE *fp)
-{
-# undef fwrite
- if ((_osver & 0x8000) && __mingw_fseek_called)
- {
- ULARGE_INTEGER actual_length;
- LARGE_INTEGER current_position = {{0LL}};
- __mingw_fseek_called = 0;
- fflush (fp);
- actual_length.LowPart = GetFileSize ((HANDLE) _get_osfhandle (fileno (fp)),
- &actual_length.HighPart);
- if (actual_length.LowPart == 0xFFFFFFFF
- && GetLastError() != NO_ERROR )
- return -1;
- current_position.LowPart = SetFilePointer ((HANDLE) _get_osfhandle (fileno (fp)),
- current_position.LowPart,
- &current_position.HighPart,
- FILE_CURRENT);
- if (current_position.LowPart == 0xFFFFFFFF
- && GetLastError() != NO_ERROR )
- return -1;
-
-#ifdef DEBUG
- printf ("__mingw_fwrite: current %I64u, actual %I64u\n",
- current_position.QuadPart, actual_length.QuadPart);
-#endif /* DEBUG */
- if (current_position.QuadPart > actual_length.QuadPart)
- {
- static char __mingw_zeros[ZEROBLOCKSIZE];
- long long numleft;
-
- SetFilePointer ((HANDLE) _get_osfhandle (fileno (fp)),
- 0, 0, FILE_END);
- numleft = current_position.QuadPart - actual_length.QuadPart;
-
-#ifdef DEBUG
- printf ("__mingw_fwrite: Seeking %I64d bytes past end\n", numleft);
-#endif /* DEBUG */
- while (numleft > 0LL)
- {
- DWORD nzeros = (numleft > ZEROBLOCKSIZE)
- ? ZEROBLOCKSIZE : numleft;
- DWORD written;
- if (! WriteFile ((HANDLE) _get_osfhandle (fileno (fp)),
- __mingw_zeros, nzeros, &written, NULL))
- {
- /* Best we can hope for, or at least DJ says so. */
- SetFilePointer ((HANDLE) _get_osfhandle (fileno (fp)),
- 0, 0, FILE_BEGIN);
- return -1;
- }
- if (written < nzeros)
- {
- /* Likewise. */
- SetFilePointer ((HANDLE) _get_osfhandle (fileno (fp)),
- 0, 0, FILE_BEGIN);
- return -1;
- }
-
- numleft -= written;
- }
- FlushFileBuffers ((HANDLE) _get_osfhandle (fileno (fp)));
- }
- }
- return fwrite (buffer, size, count, fp);
-}
diff --git a/winsup/mingw/mingwex/sitest.c b/winsup/mingw/mingwex/sitest.c
deleted file mode 100644
index 9e06bf1..0000000
--- a/winsup/mingw/mingwex/sitest.c
+++ /dev/null
@@ -1,1527 +0,0 @@
-/*
- sitest -- exercise features of C99 <stdint.h> and <inttypes.h>
-
- This source code has been placed into the PUBLIC DOMAIN by its author.
-
- last edit: 1999/11/05 gwyn@arl.mil
-
- Tries to accommodate pre-C99 versions of <inttypes.h>.
-
- Takes advantage of __Q8_* symbols defined by a particular
- implementation of <stdint.h>, but doesn't require them.
-
- NOTE: This is not a thorough validation test of the facilities.
-*/
-
-#include <errno.h>
-#include <limits.h> /* for CHAR_BIT */
-#include <stdio.h>
-#include <stddef.h> /* for ptrdiff_t */
-#include <stdlib.h>
-#include <string.h>
-
-#include <inttypes.h> /* embeds <stdint.h> */
-#include <signal.h> /* for sig_atomic_t */
-#if defined(INTMAX_MAX) /* <inttypes.h> has C99 features */
-#include <wchar.h>
-#endif
-
-#include <inttypes.h> /* test idempotency */
-
-#if 1 /* __STDC_VERSION__ >= 199901 */
-#ifndef __Q8_QT
-#define __Q8_QT long long
-#endif
-#endif
-
-#ifdef PRIdMAX
-#define HAVE_PRIdMAX
-#ifndef __Q8_MT
-#define __Q8_MT intmax_t
-#endif
-#else
-#ifdef PRIdLEAST64
-#ifndef __Q8_MT
-#define __Q8_MT int_least64_t
-#endif
-#define PRIdMAX PRIdLEAST64
-#else
-#ifndef __Q8_MT
-#define __Q8_MT long
-#endif
-#define PRIdMAX "ld"
-#endif
-#endif
-
-#ifdef PRIuMAX
-#define HAVE_PRIuMAX
-#define U__Q8_MT uintmax_t
-#else
-#ifdef PRIuLEAST64
-#define U__Q8_MT uint_least64_t
-#define PRIuMAX PRIuLEAST64
-#else
-#define U__Q8_MT unsigned long
-#define PRIuMAX "lu"
-#endif
-#endif
-
-#define STR_SUB(s) #s
-#define STRINGIZE(s) STR_SUB(s) /* extra level to expand argument */
-
-#if defined(SCNo32) || defined(PRIo32)
-static int32_t int32;
-#endif
-static int_least16_t intl16;
-static uint_least16_t uintl16;
-static uint_fast16_t uintf16;
-static intmax_t intmax;
-static uintmax_t uintmax;
-
-int
-main() {
- int status = 0; /* exit status to be returned */
-
- /* <stdint.h> features: */
-
- printf("CHAR_BIT=%u\n", (unsigned)CHAR_BIT );
- printf("sizeof(char)=%u\n", (unsigned)sizeof(char)); /* s.b. 1 */
- printf("sizeof(short)=%u\n", (unsigned)sizeof(short));
- printf("sizeof(int)=%u\n", (unsigned)sizeof(int));
- printf("sizeof(long)=%u\n", (unsigned)sizeof(long));
-#ifdef __Q8_QT
- printf("sizeof(long long)=%u\n", (unsigned)sizeof(__Q8_QT));
-#endif
- printf("sizeof(intmax_t)=%u\n", (unsigned)sizeof(intmax_t));
- printf("sizeof(ptrdiff_t)=%u\n", (unsigned)sizeof(ptrdiff_t));
- printf("sizeof(size_t)=%u\n", (unsigned)sizeof(size_t));
- printf("sizeof(sig_atomic_t)=%u\n", (unsigned)sizeof(sig_atomic_t));
- printf("sizeof(wchar_t)=%u\n", (unsigned)sizeof(wchar_t));
-#if defined(WINT_MAX) || __STDC_VERSION__ >= 199901
- printf("sizeof(wint_t)=%u\n", (unsigned)sizeof(wint_t));
-#else
- printf("*** wint_t isn't defined ***\n");
- status = EXIT_FAILURE;
-#endif
-#ifdef INT8_MAX
- printf("sizeof(int8_t)=%u\n", (unsigned)sizeof(int8_t));
- printf("sizeof(uint8_t)=%u\n", (unsigned)sizeof(uint8_t));
-#endif
-#ifdef INT9_MAX
- printf("sizeof(int9_t)=%u\n", (unsigned)sizeof(int9_t));
- printf("sizeof(uint9_t)=%u\n", (unsigned)sizeof(uint9_t));
-#endif
-#ifdef INT12_MAX
- printf("sizeof(int12_t)=%u\n", (unsigned)sizeof(int12_t));
- printf("sizeof(uint12_t)=%u\n", (unsigned)sizeof(uint12_t));
-#endif
-#ifdef INT16_MAX
- printf("sizeof(int16_t)=%u\n", (unsigned)sizeof(int16_t));
- printf("sizeof(uint16_t)=%u\n", (unsigned)sizeof(uint16_t));
-#endif
-#ifdef INT18_MAX
- printf("sizeof(int18_t)=%u\n", (unsigned)sizeof(int18_t));
- printf("sizeof(uint18_t)=%u\n", (unsigned)sizeof(uint18_t));
-#endif
-#ifdef INT24_MAX
- printf("sizeof(int24_t)=%u\n", (unsigned)sizeof(int24_t));
- printf("sizeof(uint24_t)=%u\n", (unsigned)sizeof(uint24_t));
-#endif
-#ifdef INT32_MAX
- printf("sizeof(int32_t)=%u\n", (unsigned)sizeof(int32_t));
- printf("sizeof(uint32_t)=%u\n", (unsigned)sizeof(uint32_t));
-#endif
-#ifdef INT36_MAX
- printf("sizeof(int36_t)=%u\n", (unsigned)sizeof(int36_t));
- printf("sizeof(uint36_t)=%u\n", (unsigned)sizeof(uint36_t));
-#endif
-#ifdef INT40_MAX
- printf("sizeof(int40_t)=%u\n", (unsigned)sizeof(int40_t));
- printf("sizeof(uint40_t)=%u\n", (unsigned)sizeof(uint40_t));
-#endif
-#ifdef INT48_MAX
- printf("sizeof(int48_t)=%u\n", (unsigned)sizeof(int48_t));
- printf("sizeof(uint48_t)=%u\n", (unsigned)sizeof(uint48_t));
-#endif
-#ifdef INT60_MAX
- printf("sizeof(int60_t)=%u\n", (unsigned)sizeof(int60_t));
- printf("sizeof(uint60_t)=%u\n", (unsigned)sizeof(uint60_t));
-#endif
-#ifdef INT64_MAX
- printf("sizeof(int64_t)=%u\n", (unsigned)sizeof(int64_t));
- printf("sizeof(uint64_t)=%u\n", (unsigned)sizeof(uint64_t));
-#endif
-#ifdef INT72_MAX
- printf("sizeof(int72_t)=%u\n", (unsigned)sizeof(int72_t));
- printf("sizeof(uint72_t)=%u\n", (unsigned)sizeof(uint72_t));
-#endif
-#ifdef INT128_MAX
- printf("sizeof(int128_t)=%u\n", (unsigned)sizeof(int128_t));
- printf("sizeof(uint128_t)=%u\n", (unsigned)sizeof(uint128_t));
-#endif
- printf("sizeof(int_least8_t)=%u\n", (unsigned)sizeof(int_least8_t));
- printf("sizeof(uint_least8_t)=%u\n", (unsigned)sizeof(uint_least8_t));
- printf("sizeof(int_least16_t)=%u\n", (unsigned)sizeof(int_least16_t));
- printf("sizeof(uint_least16_t)=%u\n", (unsigned)sizeof(uint_least16_t));
- printf("sizeof(int_least32_t)=%u\n", (unsigned)sizeof(int_least32_t));
- printf("sizeof(uint_least32_t)=%u\n", (unsigned)sizeof(uint_least32_t));
-#ifdef INT_LEAST64_MAX
- printf("sizeof(int_least64_t)=%u\n", (unsigned)sizeof(int_least64_t));
- printf("sizeof(uint_least64_t)=%u\n", (unsigned)sizeof(uint_least64_t));
-#else
- printf("*** uint_least64_t isn't defined ***\n");
- status = EXIT_FAILURE;
-#endif
-#ifdef INT_LEAST128_MAX
- printf("sizeof(int_least128_t)=%u\n", (unsigned)sizeof(int_least128_t));
- printf("sizeof(uint_least128_t)=%u\n",
- (unsigned)sizeof(uint_least128_t));
-#endif
- printf("sizeof(int_fast8_t)=%u\n", (unsigned)sizeof(int_fast8_t));
- printf("sizeof(uint_fast8_t)=%u\n", (unsigned)sizeof(uint_fast8_t));
- printf("sizeof(int_fast16_t)=%u\n", (unsigned)sizeof(int_fast16_t));
- printf("sizeof(uint_fast16_t)=%u\n", (unsigned)sizeof(uint_fast16_t));
- printf("sizeof(int_fast32_t)=%u\n", (unsigned)sizeof(int_fast32_t));
- printf("sizeof(uint_fast32_t)=%u\n", (unsigned)sizeof(uint_fast32_t));
-#ifdef INT_FAST64_MAX
- printf("sizeof(int_fast64_t)=%u\n", (unsigned)sizeof(int_fast64_t));
- printf("sizeof(uint_fast64_t)=%u\n", (unsigned)sizeof(uint_fast64_t));
-#else
- printf("*** int_fast64_t isn't defined ***\n");
- status = EXIT_FAILURE;
-#endif
-#ifdef INT_FAST128_MAX
- printf("sizeof(int_fast128_t)=%u\n", (unsigned)sizeof(int_fast128_t));
- printf("sizeof(uint_fast128_t)=%u\n", (unsigned)sizeof(uint_fast128_t));
-#endif
-#if defined(INTPTR_MAX)
- printf("sizeof(intptr_t)=%u\n", (unsigned)sizeof(intptr_t));
-#if defined(UINTPTR_MAX)
- printf("sizeof(uintptr_t)=%u\n", (unsigned)sizeof(uintptr_t));
-#else
- printf("*** intptr_t is defined but uintptr_t isn't ***\n");
- status = EXIT_FAILURE;
-#endif
-#elif defined(UINTPTR_MAX)
- printf("sizeof(uintptr_t)=%u\n", (unsigned)sizeof(uintptr_t));
- printf("*** uintptr_t is defined but intptr_t isn't ***\n");
- status = EXIT_FAILURE;
-#else
- printf("*** neither intptr_t nor uintptr_t is defined ***\n");
- status = EXIT_FAILURE;
-#endif
-#ifdef INTMAX_MAX
- printf("sizeof(intmax_t)=%u\n", (unsigned)sizeof(intmax_t));
- printf("sizeof(uintmax_t)=%u\n", (unsigned)sizeof(uintmax_t));
-#else
- printf("*** intmax_t isn't defined ***\n");
- status = EXIT_FAILURE;
-#endif
-
-#ifdef INT8_MAX
- printf("INT8_MIN=%"PRIdMAX"\n", (__Q8_MT)INT8_MIN);
- printf("INT8_MAX=%"PRIdMAX"\n", (__Q8_MT)INT8_MAX);
- printf("UINT8_MAX=%"PRIuMAX"\n", (U__Q8_MT)UINT8_MAX);
-#endif
-#ifdef INT9_MAX
- printf("INT9_MIN=%"PRIdMAX"\n", (__Q8_MT)INT9_MIN);
- printf("INT9_MAX=%"PRIdMAX"\n", (__Q8_MT)INT9_MAX);
- printf("UINT9_MAX=%"PRIuMAX"\n", (U__Q8_MT)UINT9_MAX);
-#endif
-#ifdef INT12_MAX
- printf("INT12_MIN=%"PRIdMAX"\n", (__Q8_MT)INT12_MIN);
- printf("INT12_MAX=%"PRIdMAX"\n", (__Q8_MT)INT12_MAX);
- printf("UINT12_MAX=%"PRIuMAX"\n", (U__Q8_MT)UINT12_MAX);
-#endif
-#ifdef INT16_MAX
- printf("INT16_MIN=%"PRIdMAX"\n", (__Q8_MT)INT16_MIN);
- printf("INT16_MAX=%"PRIdMAX"\n", (__Q8_MT)INT16_MAX);
- printf("UINT16_MAX=%"PRIuMAX"\n", (U__Q8_MT)UINT16_MAX);
-#endif
-#ifdef INT18_MAX
- printf("INT18_MIN=%"PRIdMAX"\n", (__Q8_MT)INT18_MIN);
- printf("INT18_MAX=%"PRIdMAX"\n", (__Q8_MT)INT18_MAX);
- printf("UINT18_MAX=%"PRIuMAX"\n", (U__Q8_MT)UINT18_MAX);
-#endif
-#ifdef INT24_MAX
- printf("INT24_MIN=%"PRIdMAX"\n", (__Q8_MT)INT24_MIN);
- printf("INT24_MAX=%"PRIdMAX"\n", (__Q8_MT)INT24_MAX);
- printf("UINT24_MAX=%"PRIuMAX"\n", (U__Q8_MT)UINT24_MAX);
-#endif
-#ifdef INT32_MAX
- printf("INT32_MIN=%"PRIdMAX"\n", (__Q8_MT)INT32_MIN);
- printf("INT32_MAX=%"PRIdMAX"\n", (__Q8_MT)INT32_MAX);
- printf("UINT32_MAX=%"PRIuMAX"\n", (U__Q8_MT)UINT32_MAX);
-#endif
-#ifdef INT36_MAX
- printf("INT36_MIN=%"PRIdMAX"\n", (__Q8_MT)INT36_MIN);
- printf("INT36_MAX=%"PRIdMAX"\n", (__Q8_MT)INT36_MAX);
- printf("UINT36_MAX=%"PRIuMAX"\n", (U__Q8_MT)UINT36_MAX);
-#endif
-#ifdef INT40_MAX
- printf("INT40_MIN=%"PRIdMAX"\n", (__Q8_MT)INT40_MIN);
- printf("INT40_MAX=%"PRIdMAX"\n", (__Q8_MT)INT40_MAX);
- printf("UINT40_MAX=%"PRIuMAX"\n", (U__Q8_MT)UINT40_MAX);
-#endif
-#ifdef INT48_MAX
- printf("INT48_MIN=%"PRIdMAX"\n", (__Q8_MT)INT48_MIN);
- printf("INT48_MAX=%"PRIdMAX"\n", (__Q8_MT)INT48_MAX);
- printf("UINT48_MAX=%"PRIuMAX"\n", (U__Q8_MT)UINT48_MAX);
-#endif
-#ifdef INT60_MAX
- printf("INT60_MIN=%"PRIdMAX"\n", (__Q8_MT)INT60_MIN);
- printf("INT60_MAX=%"PRIdMAX"\n", (__Q8_MT)INT60_MAX);
- printf("UINT60_MAX=%"PRIuMAX"\n", (U__Q8_MT)UINT60_MAX);
-#endif
-#ifdef INT64_MAX
- printf("INT64_MIN=%"PRIdMAX"\n", (__Q8_MT)INT64_MIN);
- printf("INT64_MAX=%"PRIdMAX"\n", (__Q8_MT)INT64_MAX);
- printf("UINT64_MAX=%"PRIuMAX"\n", (U__Q8_MT)UINT64_MAX);
-#endif
-#ifdef INT72_MAX
- printf("INT72_MIN=%"PRIdMAX"\n", (__Q8_MT)INT72_MIN);
- printf("INT72_MAX=%"PRIdMAX"\n", (__Q8_MT)INT72_MAX);
- printf("UINT72_MAX=%"PRIuMAX"\n", (U__Q8_MT)UINT72_MAX);
-#endif
-#ifdef INT128_MAX
- printf("INT128_MIN=%"PRIdMAX"\n", (__Q8_MT)INT128_MIN);
- printf("INT128_MAX=%"PRIdMAX"\n", (__Q8_MT)INT128_MAX);
- printf("UINT128_MAX=%"PRIuMAX"\n", (U__Q8_MT)UINT128_MAX);
-#endif
- printf("INT_LEAST8_MIN=%"PRIdMAX"\n", (__Q8_MT)INT_LEAST8_MIN);
- printf("INT_LEAST8_MAX=%"PRIdMAX"\n", (__Q8_MT)INT_LEAST8_MAX);
- printf("UINT_LEAST8_MAX=%"PRIuMAX"\n",
- (U__Q8_MT)UINT_LEAST8_MAX);
- printf("INT_LEAST16_MIN=%"PRIdMAX"\n", (__Q8_MT)INT_LEAST16_MIN);
- printf("INT_LEAST16_MAX=%"PRIdMAX"\n", (__Q8_MT)INT_LEAST16_MAX);
- printf("UINT_LEAST16_MAX=%"PRIuMAX"\n",
- (U__Q8_MT)UINT_LEAST16_MAX);
- printf("INT_LEAST32_MIN=%"PRIdMAX"\n", (__Q8_MT)INT_LEAST32_MIN);
- printf("INT_LEAST32_MAX=%"PRIdMAX"\n", (__Q8_MT)INT_LEAST32_MAX);
- printf("UINT_LEAST32_MAX=%"PRIuMAX"\n",
- (U__Q8_MT)UINT_LEAST32_MAX);
-#ifdef INT_LEAST64_MAX
- printf("INT_LEAST64_MIN=%"PRIdMAX"\n", (__Q8_MT)INT_LEAST64_MIN);
- printf("INT_LEAST64_MAX=%"PRIdMAX"\n", (__Q8_MT)INT_LEAST64_MAX);
- printf("UINT_LEAST64_MAX=%"PRIuMAX"\n", (U__Q8_MT)UINT_LEAST64_MAX);
-#endif
-#ifdef INT_LEAST128_MAX
- printf("INT_LEAST128_MIN=%"PRIdMAX"\n", (__Q8_MT)INT_LEAST128_MIN);
- printf("INT_LEAST128_MAX=%"PRIdMAX"\n", (__Q8_MT)INT_LEAST128_MAX);
- printf("UINT_LEAST128_MAX=%"PRIuMAX"\n", (U__Q8_MT)UINT_LEAST128_MAX);
-#endif
- printf("INT_FAST8_MIN=%"PRIdMAX"\n", (__Q8_MT)INT_FAST8_MIN);
- printf("INT_FAST8_MAX=%"PRIdMAX"\n", (__Q8_MT)INT_FAST8_MAX);
- printf("UINT_FAST8_MAX=%"PRIuMAX"\n",
- (U__Q8_MT)UINT_FAST8_MAX);
- printf("INT_FAST16_MIN=%"PRIdMAX"\n", (__Q8_MT)INT_FAST16_MIN);
- printf("INT_FAST16_MAX=%"PRIdMAX"\n", (__Q8_MT)INT_FAST16_MAX);
- printf("UINT_FAST16_MAX=%"PRIuMAX"\n",
- (U__Q8_MT)UINT_FAST16_MAX);
- printf("INT_FAST32_MIN=%"PRIdMAX"\n", (__Q8_MT)INT_FAST32_MIN);
- printf("INT_FAST32_MAX=%"PRIdMAX"\n", (__Q8_MT)INT_FAST32_MAX);
- printf("UINT_FAST32_MAX=%"PRIuMAX"\n",
- (U__Q8_MT)UINT_FAST32_MAX);
-#ifdef INT_FAST64_MAX
- printf("INT_FAST64_MIN=%"PRIdMAX"\n", (__Q8_MT)INT_FAST64_MIN);
- printf("INT_FAST64_MAX=%"PRIdMAX"\n", (__Q8_MT)INT_FAST64_MAX);
- printf("UINT_FAST64_MAX=%"PRIuMAX"\n", (U__Q8_MT)UINT_FAST64_MAX);
-#endif
-#ifdef INT_FAST128_MAX
- printf("INT_FAST128_MIN=%"PRIdMAX"\n", (__Q8_MT)INT_FAST128_MIN);
- printf("INT_FAST128_MAX=%"PRIdMAX"\n", (__Q8_MT)INT_FAST128_MAX);
- printf("UINT_FAST128_MAX=%"PRIuMAX"\n", (U__Q8_MT)UINT_FAST128_MAX);
-#endif
-#ifdef INTPTR_MAX
- printf("INTPTR_MIN=%"PRIdMAX"\n", (__Q8_MT)INTPTR_MIN);
- printf("INTPTR_MAX=%"PRIdMAX"\n", (__Q8_MT)INTPTR_MAX);
-#endif
-#ifdef UINTPTR_MAX
- printf("UINTPTR_MAX=%"PRIuMAX"\n", (U__Q8_MT)UINTPTR_MAX);
-#endif
-#ifdef INTMAX_MAX
- printf("INTMAX_MIN=%"PRIdMAX"\n", (__Q8_MT)INTMAX_MIN);
- printf("INTMAX_MAX=%"PRIdMAX"\n", (__Q8_MT)INTMAX_MAX);
- printf("UINTMAX_MAX=%"PRIuMAX"\n", (U__Q8_MT)UINTMAX_MAX);
-#endif
-#ifdef PTRDIFF_MAX
- printf("PTRDIFF_MIN=%"PRIdMAX"\n", (__Q8_MT)PTRDIFF_MIN);
- printf("PTRDIFF_MAX=%"PRIdMAX"\n", (__Q8_MT)PTRDIFF_MAX);
-#endif
-#ifdef SIG_ATOMIC_MAX
-#if SIG_ATOMIC_MIN < 0
- printf("SIG_ATOMIC_MIN=%"PRIdMAX"\n", (__Q8_MT)SIG_ATOMIC_MIN);
- printf("SIG_ATOMIC_MAX=%"PRIdMAX"\n", (__Q8_MT)SIG_ATOMIC_MAX);
-#else
- printf("SIG_ATOMIC_MIN=%"PRIuMAX"\n", (U__Q8_MT)SIG_ATOMIC_MIN);
- printf("SIG_ATOMIC_MAX=%"PRIuMAX"\n", (U__Q8_MT)SIG_ATOMIC_MAX);
-#endif
-#endif
-#ifdef SIZE_MAX
- printf("SIZE_MAX=%"PRIuMAX"\n", (U__Q8_MT)SIZE_MAX);
-#endif
-
-#ifdef WCHAR_MAX
-#if WCHAR_MIN < 0
- printf("WCHAR_MIN=%"PRIdMAX"\n", (__Q8_MT)WCHAR_MIN);
- printf("WCHAR_MAX=%"PRIdMAX"\n", (__Q8_MT)WCHAR_MAX);
-#else
- printf("WCHAR_MIN=%"PRIuMAX"\n", (U__Q8_MT)WCHAR_MIN);
- printf("WCHAR_MAX=%"PRIuMAX"\n", (U__Q8_MT)WCHAR_MAX);
-#endif
-#endif
-#ifdef WINT_MAX
-#if WINT_MIN < 0
- printf("WINT_MIN=%"PRIdMAX"\n", (__Q8_MT)WINT_MIN);
- printf("WINT_MAX=%"PRIdMAX"\n", (__Q8_MT)WINT_MAX);
-#else
- printf("WINT_MIN=%"PRIuMAX"\n", (U__Q8_MT)WINT_MIN);
- printf("WINT_MAX=%"PRIuMAX"\n", (U__Q8_MT)WINT_MAX);
-#endif
-#endif
-
- /*
- 7.18.4 Macros for integer constants
- */
-
- /* INTn_C for n=8 and 16 were at one point unimplementable
- on most platforms, so they're treated as "optional": */
-#ifdef INT8_C
- if ( INT8_C(-123) != -123 )
- printf("*** INT8_C(-123) produced %"PRIdMAX" ***\n",
- (__Q8_MT)INT8_C(-123)
- );
- if ( UINT8_C(123) != 123 )
- printf("*** UINT8_C(123) produced %"PRIuMAX" ***\n",
- (U__Q8_MT)UINT8_C(123)
- );
-#endif
-#ifdef INT16_C
- if ( INT16_C(-12345) != -12345 )
- printf("*** INT16_C(-12345) produced %"PRIdMAX" ***\n",
- (__Q8_MT)INT16_C(-12345)
- );
- if ( UINT16_C(12345) != 12345 )
- printf("*** UINT16_C(12345) produced %"PRIuMAX" ***\n",
- (U__Q8_MT)UINT16_C(12345)
- );
-#endif
- if ( INT32_C(-123456789) != -123456789 )
- printf("*** INT32_C(-123456789) produced %"PRIdMAX" ***\n",
- (__Q8_MT)INT32_C(-123456789)
- );
- if ( UINT32_C(123456789) != 123456789 )
- printf("*** UINT32_C(123456789) produced %"PRIuMAX" ***\n",
- (U__Q8_MT)UINT32_C(123456789)
- );
-#ifdef INT_LEAST64_MAX
- if ( INT64_C(-1234567890123456789) != -1234567890123456789 )
- printf("*** INT64_C(-1234567890123456789) produced %"PRIdMAX
- " ***\n",
- (__Q8_MT)INT64_C(-1234567890123456789)
- );
- if ( UINT64_C(1234567890123456789) != 1234567890123456789 )
- printf("*** UINT64_C(1234567890123456789) produced %"PRIuMAX
- " ***\n",
- (U__Q8_MT)UINT64_C(1234567890123456789)
- );
-#endif
-#ifdef INTMAX_MAX
- if ( INTMAX_C(-1234567890123456789) != -1234567890123456789 )
- printf("*** INTMAX_C(-1234567890123456789) produced %"PRIdMAX
- " ***\n",
- (__Q8_MT)INTMAX_C(-1234567890123456789)
- );
- if ( UINTMAX_C(1234567890123456789) != 1234567890123456789 )
- printf("*** UINTMAX_C(1234567890123456789) produced %"PRIuMAX
- " ***\n",
- (U__Q8_MT)UINTMAX_C(1234567890123456789)
- );
-#endif
-
- /* <inttypes.h> features: */
-
-#if __STDC_VERSION__ >= 199901
- printf("sizeof(imaxdiv_t)=%u\n", (unsigned)sizeof(imaxdiv_t));
-#endif
-
- /*
- 7.8.1 Macros for format specifiers
- */
-
- {
- /* scanf these strings */
- static const char in_dn[] = "Z119bZ";
- static const char in_dmo[] = "Z-0119bZ";
- static const char in_dspx[] = "Z \t\n +0X119bZ";
- static const char in_dsmx[] = "Z \t\n -0x119bZ";
- static const char in_dsn[] = "Z \t\n 119bZ";
- static const char in_dp[] = "Z+119bZ";
- static const char in_dpx[] = "Z+0X119bz";
-
- /* sprintf into this */
- static char buffer[1024];
-
-#define SCAN(buf,fs,var,exp) if ( sscanf(buf, "Z%" fs, &var) != 1 ) \
- { \
- printf("*** " #fs "=" STR_SUB(fs) \
- " failed ***\n" \
- ); \
- status = EXIT_FAILURE; \
- } \
- else if ( var != (exp) ) \
- { \
- printf("*** " #fs "=" STR_SUB(fs) \
- " should be: " STR_SUB(exp) \
- ", was: %" fs " ***\n", var \
- ); \
- status = EXIT_FAILURE; \
- } \
- else
-
-#define PRINT(fs,var,exp) if ( sprintf(buffer, "%" fs, var ) <= 0 ) \
- { \
- printf("*** " #fs "=" STR_SUB(fs) \
- " failed ***\n" \
- ); \
- status = EXIT_FAILURE; \
- } \
- else if ( strcmp(buffer, STR_SUB(exp)) != 0 ) \
- { \
- printf("*** " #fs "=" STR_SUB(fs) \
- " should be: " STR_SUB(exp) \
- ", was: %s ***\n", buffer \
- ); \
- status = EXIT_FAILURE; \
- } \
- else
-
-#ifdef SCNo32
- SCAN(in_dn, SCNo32, int32, 9);
-#endif
-#ifdef PRIo32
- PRINT(PRIo32, int32, 11);
-#endif
- SCAN(in_dmo, SCNiLEAST16, intl16, -9);
- SCAN(in_dspx, SCNdLEAST16, intl16, 0);
- SCAN(in_dsmx, SCNiLEAST16, intl16, -4507);
- PRINT(PRIdLEAST16, intl16, -4507);
- PRINT(PRIiLEAST16, intl16, -4507);
- SCAN(in_dsn, SCNxLEAST16, uintl16, 4507);
- PRINT(PRIoLEAST16, uintl16, 10633);
- PRINT(PRIuLEAST16, uintl16, 4507);
- PRINT(PRIxLEAST16, uintl16, 119b);
- PRINT(PRIXLEAST16, uintl16, 119B);
- SCAN(in_dp, SCNxFAST16, uintf16, 4507);
- PRINT(PRIxFAST16, uintf16, 119b);
-#ifdef SCNdMAX
- SCAN(in_dp, SCNdMAX, intmax, 119);
-#endif
-#ifdef PRIiMAX
- PRINT(PRIiMAX, intmax, 119);
-#endif
-#ifdef SCNoMAX
- SCAN(in_dpx, SCNoMAX, uintmax, 0);
-#endif
-#ifdef PRIxMAX
- PRINT(PRIxMAX, uintmax, 0);
-#endif
- /* Obviously there should be a much larger battery of such tests. */
- }
-
-#if defined(INTMAX_MAX) /* <inttypes.h> has C99 features */
- /*
- 7.8.2 Functions for greatest-width integer types
- */
-
- {
- static struct
- {
- intmax_t input;
- intmax_t expect;
- } abs_data[] =
- {
-#ifdef INT8_MAX
- {INT8_MAX, INT8_MAX},
- {-INT8_MAX, INT8_MAX},
- {UINT8_MAX, UINT8_MAX},
-#endif
-
-#ifdef INT16_MAX
- { INT16_MAX, INT16_MAX},
- { -INT16_MAX, INT16_MAX},
- { UINT16_MAX, UINT16_MAX},
-#endif
-#ifdef INT32_MAX
- { INT32_MAX, INT32_MAX},
- { -INT32_MAX, INT32_MAX},
-#ifdef INT_LEAST64_MAX
- { UINT32_MAX, UINT32_MAX},
-#endif
-#endif
-#ifdef INT64_MAX
- { INT64_MAX, INT64_MAX},
- { -INT64_MAX, INT64_MAX},
-#endif
- { INT_LEAST8_MAX, INT_LEAST8_MAX},
- { -INT_LEAST8_MAX, INT_LEAST8_MAX},
- { UINT_LEAST8_MAX, UINT_LEAST8_MAX},
- { INT_LEAST16_MAX, INT_LEAST16_MAX},
- { -INT_LEAST16_MAX, INT_LEAST16_MAX},
- { UINT_LEAST16_MAX, UINT_LEAST16_MAX},
- { INT_LEAST32_MAX, INT_LEAST32_MAX},
- { -INT_LEAST32_MAX, INT_LEAST32_MAX},
-#ifdef INT_LEAST64_MAX
- { UINT_LEAST32_MAX, UINT_LEAST32_MAX},
- { INT_LEAST64_MAX, INT_LEAST64_MAX},
- { -INT_LEAST64_MAX, INT_LEAST64_MAX},
-#endif
- { INT_FAST8_MAX, INT_FAST8_MAX},
- { -INT_FAST8_MAX, INT_FAST8_MAX},
- { UINT_FAST8_MAX, UINT_FAST8_MAX},
- { INT_FAST16_MAX, INT_FAST16_MAX},
- { -INT_FAST16_MAX, INT_FAST16_MAX},
- { UINT_FAST16_MAX, UINT_FAST16_MAX},
- { INT_FAST32_MAX, INT_FAST32_MAX},
- { -INT_FAST32_MAX, INT_FAST32_MAX},
-#ifdef INT_FAST64_MAX
- { UINT_FAST32_MAX, UINT_FAST32_MAX},
- { INT_FAST64_MAX, INT_FAST64_MAX},
- { -INT_FAST64_MAX, INT_FAST64_MAX},
-#endif
-#ifdef INTPTR_MAX
- { INTPTR_MAX, INTPTR_MAX},
- { -INTPTR_MAX, INTPTR_MAX},
-#endif
-#ifdef UINTPTR_MAX
- { UINTPTR_MAX, UINTPTR_MAX},
-#endif
- { INTMAX_MAX, INTMAX_MAX},
-#ifdef PTRDIFF_MAX
- { PTRDIFF_MAX, PTRDIFF_MAX},
-#endif
-#ifdef SIG_ATOMIC_MAX
- { SIG_ATOMIC_MAX, SIG_ATOMIC_MAX},
-#if SIG_ATOMIC_MIN < 0
- { -SIG_ATOMIC_MAX, SIG_ATOMIC_MAX},
-#endif
-#endif
-#ifdef SIZE_MAX
- { SIZE_MAX, SIZE_MAX},
-#endif
-#ifdef WCHAR_MAX
- { WCHAR_MAX, WCHAR_MAX},
-#if WCHAR_MIN < 0
- { -WCHAR_MAX, WCHAR_MAX},
-#endif
-#endif
-#ifdef WINT_MAX
- { WINT_MAX, WINT_MAX},
-#if WINT_MIN < 0
- { -WINT_MAX, WINT_MAX},
-#endif
-#endif
- { 127, 127},
- { -127, 127},
- { 128, 128},
- { -127-1, 128},
- { 255, 255},
- { -256+1, 255},
- { 256, 256},
- { -256, 256},
- { 32767, 32767},
- { -32767, 32767},
- { 32768, 32768},
- { -32767-1, 32768},
- { 65535, 65535},
- { -65536+1, 65535},
- { 65536, 65536},
- { -65536, 65536},
- { 2147483647, 2147483647},
- { -2147483647, 2147483647},
- { 2147483648LL, 2147483648LL},
- { -2147483647LL-1, 2147483648LL},
-#ifdef INT_LEAST64_MAX
- { 4294967295LL, 4294967295LL},
- { -4294967296LL+1, 4294967295LL},
- { 4294967296LL, 4294967296LL},
- { -4294967296LL, 4294967296LL},
- { 9223372036854775807LL, 9223372036854775807LL},
- { -9223372036854775807LL, 9223372036854775807LL},
- { 1234567890123456789LL, 1234567890123456789LL},
- { -1234567890123456789LL, 1234567890123456789LL},
-#endif
- { 1, 1},
- { -1, 1},
- { 2, 2},
- { -2, 2},
- { 10, 10},
- { -10, 10},
- { 16, 16},
- { -16, 16},
- /* Other test cases can be added here. */
- {0, 0} /* terminates the list */
- }, *adp=abs_data;
- int count=0;
- do{
- intmax = imaxabs(adp->input);
- count++;
- if (intmax != adp->expect )
- {
-
- printf("*** imaxabs(%"PRIdMAX") failed; should be: %"
- PRIdMAX", was: %"PRIdMAX" ***\n",
- adp->input, adp->expect, intmax
- );
- status = EXIT_FAILURE;
- }
- }
- while ( adp++->input != 0 );
- }
-
- {
- imaxdiv_t result;
- static struct
- {
- intmax_t numer;
- intmax_t denom;
- intmax_t exp_quot;
- intmax_t exp_rem;
- } div_data[] =
- {
- { 0, 1, 0, 0},
- { 0, -1, 0, 0},
- { 0, 2, 0, 0},
- { 0, -2, 0, 0},
- { 0, 5, 0, 0},
- { 0, -5, 0, 0},
- { 1, 1, 1, 0},
- { 1, -1, -1, 0},
- { 1, 2, 0, 1},
- { 1, -2, 0, 1},
- { 1, 5, 0, 1},
- { 1, -5, 0, 1},
- { -1, 1, -1, 0},
- { -1, -1, 1, 0},
- { -1, 2, 0, -1},
- { -1, -2, 0, -1},
- { -1, 5, 0, -1},
- { -1, -5, 0, -1},
- { 2, 1, 2, 0},
- { 2, -1, -2, 0},
- { 2, 2, 1, 0},
- { 2, -2, -1, 0},
- { 2, 5, 0, 2},
- { 2, -5, 0, 2},
- { -2, 1, -2, 0},
- { -2, -1, 2, 0},
- { -2, 2, -1, 0},
- { -2, -2, 1, 0},
- { -2, 5, 0, -2},
- { -2, -5, 0, -2},
- { 17, 5, 3, 2},
- { -17, -5, 3, -2},
- { 17, -5, -3, 2},
- { -17, 5, -3, -2},
- { 2147483647, 1, 2147483647, 0},
- { -2147483647LL, 1, -2147483647LL, 0},
- { 2147483648LL, 1LL, 2147483648LL, 0LL},
- { -2147483647-1LL, 1LL, -2147483647-1LL, 0LL},
- { 2147483647LL, 2LL, 1073741823LL, 1LL},
- { -2147483647LL, 2LL, -1073741823LL, -1LL},
- { 2147483648LL, 2LL, 1073741824LL, 0LL},
- { -2147483647-1LL, 2LL, -1073741824LL, 0LL},
-#ifdef INT_LEAST64_MAX /* else might support only 32 bits */
- { 4294967295LL, 1LL, 4294967295LL, 0LL},
- { -4294967296LL+1LL, 1LL, -4294967296LL+1, 0},
- { 4294967296LL, 1, 4294967296LL, 0},
- { -4294967296LL, 1LL, -4294967296LL, 0LL},
- { 4294967295LL, -1LL, -4294967296+1LL, 0LL},
- { -4294967296+1LL, -1LL, 4294967295LL, 0LL},
- { 4294967296LL, -1LL, -4294967296LL, 0LL},
- { -4294967296LL, -1LL, 4294967296LL, 0LL},
- { 4294967295LL, 2LL, 2147483647LL, 1LL},
- { -4294967296+1LL, 2LL, -2147483647LL, -1LL},
- { 4294967296LL, 2LL, 2147483648LL, 0LL},
- { -4294967296LL, 2LL, -2147483647-1LL, 0LL},
- { 4294967295LL, 2147483647LL, 2LL, 1LL},
- { -4294967296+1LL, 2147483647LL, -2LL, -1LL},
- { 4294967296LL, 2147483647LL, 2LL, 2LL},
- { -4294967296LL, 2147483647LL, -2LL, -2LL},
- { 4294967295LL, -2147483647LL, -2LL, 1LL},
- { -4294967296+1LL, -2147483647LL, 2LL, -1LL},
- { 4294967296LL, -2147483647LL, -2LL, 2LL},
- { -4294967296LL, -2147483647LL, 2LL, -2LL},
- { 4294967295LL, 2147483648LL, 1LL, 2147483647LL},
- { -4294967296+1LL, 2147483648LL, -1LL, -2147483647LL},
- { 4294967296LL, 2147483648LL, 2LL, 0LL},
- { -4294967296LL, 2147483648LL, -2LL, 0LL},
- { 4294967295LL, -2147483647-1LL, -1LL, 2147483647LL},
- { -4294967296+1LL, -2147483647-1LL, 1LL, -2147483647LL},
- { 4294967296LL, -2147483647-1LL, -2LL, 0LL},
- { -4294967296LL, -2147483647-1LL, 2LL, 0LL},
- { 9223372036854775807LL, 1LL, 9223372036854775807LL, 0LL},
- { -9223372036854775807LL, 1LL, -9223372036854775807LL, 0LL},
- { 9223372036854775807LL, 2LL, 4611686018427387903LL, 1LL},
- { -9223372036854775807LL, 2LL, -4611686018427387903LL, -1LL},
-#endif
- /* There should be a much larger battery of such tests. */
- { 0, 0, 0, 0} /* 0 denom terminates the list */
- }, *ddp;
-
- for ( ddp = div_data; ddp->denom != 0; ++ddp )
- if ( (result = imaxdiv(ddp->numer, ddp->denom)).quot
- != ddp->exp_quot || result.rem != ddp->exp_rem
- ) {
- printf("*** imaxdiv(%"PRIdMAX",%"PRIdMAX
- ") failed; should be: (%"PRIdMAX",%"PRIdMAX
- "), was: (%"PRIdMAX",%"PRIdMAX") ***\n",
- ddp->numer, ddp->denom, ddp->exp_quot,
- ddp->exp_rem, result.quot, result.rem
- );
- status = EXIT_FAILURE;
- }
- }
-
- {
- char *endptr;
- wchar_t *wendptr;
- static char saved[64]; /* holds copy of input string */
- static wchar_t wnptr[64]; /* holds wide copy of test string */
- static int warned; /* "warned for null endptr" flag */
- register int i;
- static struct
- {
- char * nptr;
- int base;
- intmax_t exp_val;
- int exp_len;
- } str_data[] =
- {
- { "", 0, 0, 0},
- { "", 2, 0, 0},
- { "", 8, 0, 0},
- { "", 9, 0, 0},
- { "", 10, 0, 0},
- { "", 16, 0, 0},
- { "", 36, 0, 0},
- { "0", 0, 0, 1},
- { "0", 2, 0, 1},
- { "0", 8, 0, 1},
- { "0", 9, 0, 1},
- { "0", 10, 0, 1},
- { "0", 16, 0, 1},
- { "0", 36, 0, 1},
- { "+0", 0, 0, 2},
- { "+0", 2, 0, 2},
- { "+0", 8, 0, 2},
- { "+0", 9, 0, 2},
- { "+0", 10, 0, 2},
- { "+0", 16, 0, 2},
- { "+0", 36, 0, 2},
- { "-0", 0, 0, 2},
- { "-0", 2, 0, 2},
- { "-0", 8, 0, 2},
- { "-0", 9, 0, 2},
- { "-0", 10, 0, 2},
- { "-0", 16, 0, 2},
- { "-0", 36, 0, 2},
- { "Inf", 0, 0, 0},
- { "Inf", 2, 0, 0},
- { "Inf", 8, 0, 0},
- { "Inf", 9, 0, 0},
- { "Inf", 10, 0, 0},
- { "Inf", 16, 0, 0},
- { "Inf", 36, 24171, 3},
- { "+Inf", 0, 0, 0},
- { "+Inf", 2, 0, 0},
- { "+Inf", 8, 0, 0},
- { "+Inf", 9, 0, 0},
- { "+Inf", 10, 0, 0},
- { "+Inf", 16, 0, 0},
- { "+Inf", 36, 24171, 4},
- { "-Inf", 0, 0, 0},
- { "-Inf", 2, 0, 0},
- { "-Inf", 8, 0, 0},
- { "-Inf", 9, 0, 0},
- { "-Inf", 10, 0, 0},
- { "-Inf", 16, 0, 0},
- { "-Inf", 36, -24171, 4},
- { "inf", 0, 0, 0},
- { "inf", 2, 0, 0},
- { "inf", 8, 0, 0},
- { "inf", 9, 0, 0},
- { "inf", 10, 0, 0},
- { "inf", 16, 0, 0},
- { "inf", 36, 24171, 3},
- { "+inf", 0, 0, 0},
- { "+inf", 2, 0, 0},
- { "+inf", 8, 0, 0},
- { "+inf", 9, 0, 0},
- { "+inf", 10, 0, 0},
- { "+inf", 16, 0, 0},
- { "+inf", 36, 24171, 4},
- { "-inf", 0, 0, 0},
- { "-inf", 2, 0, 0},
- { "-inf", 8, 0, 0},
- { "-inf", 9, 0, 0},
- { "-inf", 10, 0, 0},
- { "-inf", 16, 0, 0},
- { "-inf", 36, -24171, 4},
- { "119b8Z", 0, 119, 3},
- { "119bZ", 0, 119, 3},
- { "-0119bZ", 0, -9, 4},
- { " \t\n 0X119bZ", 0, 4507, 10},
- { " \t\n +0X119bZ", 0, 4507, 11},
- { " \t\n -0x119bZ", 0, -4507, 11},
- { " \t\n 119bZ", 0, 119, 7},
- { "+119bZ", 0, 119, 4},
- { "+0X119bz", 0, 4507, 7},
- { "119b8Z", 2, 3, 2},
- { "119bZ", 2, 3, 2},
- { "-0119bZ", 2, -3, 4},
- { " \t\n 0X119bZ", 2, 0, 5},
- { " \t\n +0X119bZ", 2, 0, 6},
- { " \t\n -0x119bZ", 2, 0, 6},
- { " \t\n 119bZ", 2, 3, 6},
- { "+119bZ", 2, 3, 3},
- { "+0X119bz", 2, 0, 2},
- { "119b8Z", 8, 9, 2},
- { "119bZ", 8, 9, 2},
- { "-0119bZ", 8, -9, 4},
- { " \t\n 0X119bZ", 8, 0, 5},
- { " \t\n +0X119bZ", 8, 0, 6},
- { " \t\n -0x119bZ", 8, 0, 6},
- { " \t\n 119bZ", 8, 9, 6},
- { "+119bZ", 8, 9, 3},
- { "+0X119bz", 8, 0, 2},
- { "119b8Z", 9, 10, 2},
- { "119bZ", 9, 10, 2},
- { "-0119bZ", 9, -10, 4},
- { " \t\n 0X119bZ", 9, 0, 5},
- { " \t\n +0X119bZ", 9, 0, 6},
- { " \t\n -0x119bZ", 9, 0, 6},
- { " \t\n 119bZ", 9, 10, 6},
- { "+119bZ", 9, 10, 3},
- { "+0X119bz", 9, 0, 2},
- { "119b8Z", 10, 119, 3},
- { "119bZ", 10, 119, 3},
- { "-0119bZ", 10, -119, 5},
- { " \t\n 0X119bZ", 10, 0, 5},
- { " \t\n +0X119bZ", 10, 0, 6},
- { " \t\n -0x119bZ", 10, 0, 6},
- { " \t\n 119bZ", 10, 119, 7},
- { "+119bZ", 10, 119, 4},
- { "+0X119bz", 10, 0, 2},
- { "119b8Z", 16, 72120, 5},
- { "119bZ", 16, 4507, 4},
- { "-0119bZ", 16, -4507, 6},
- { " \t\n 0X119bZ", 16, 4507, 10},
- { " \t\n +0X119bZ", 16, 4507, 11},
- { " \t\n -0x119bZ", 16, -4507, 11},
- { " \t\n 119bZ", 16, 4507,8},
- { "+119bZ", 16, 4507, 5},
- { "+0X119bz", 16, 4507, 7},
- { "119b8Z", 36, 62580275, 6},
- { "119bZ", 36, 1738367, 5},
- { "-0119bZ", 36, -1738367, 7},
- { " \t\n 0X119bZ", 36, 1997122175, 11},
- { " \t\n +0X119bZ", 36, 1997122175, 12},
- { " \t\n -0x119bZ", 36, -1997122175, 12},
- { " \t\n 119bZ", 36, 1738367, 9},
- { "+119bZ", 36, 1738367, 6},
- { "+0X119bz", 36, 1997122175, 8},
- /* There should be a much larger battery of such tests. */
- { "127", 0, 127, 3},
- { "-127", 0, -127, 4},
- { "128", 0, 128, 3},
- { "-128", 0, -127-1, 4},
- { "255", 0, 255, 3},
- { "-255", 0, -255, 4},
- { "256", 0, 256, 3},
- { "-256", 0, -255-1, 4},
- { "32767", 0, 32767, 5},
- { "-32767", 0, -32767, 6},
- { "32768", 0, 32768, 5},
- { "-32768", 0, -32767-1, 6},
- { "65535", 0, 65535, 5},
- { "-65535", 0, -65536+1, 6},
- { "65536", 0, 65536, 5},
- { "-65536", 0, -65536, 6},
- { "2147483647", 0, 2147483647, 10},
- { "-2147483647", 0, -2147483647, 11},
- { "2147483648", 0, 2147483648LL, 10},
- { "-2147483648", 0, -2147483647LL-1, 11},
- { "4294967295", 0, 4294967295LL, 10},
- { "-4294967295", 0, -4294967296LL+1, 11},
- { "4294967296", 0, 4294967296LL, 10},
- { "-4294967296", 0, -4294967296L, 11},
- { "9223372036854775807", 0, 9223372036854775807LL, 19},
- { "-9223372036854775807", 0, -9223372036854775807LL, 20},
- { "1234567890123456789", 0, 1234567890123456789LL, 19},
- { "-1234567890123456789", 0, -1234567890123456789LL, 20},
- { "1", 0, 1, 1},
- { "-1", 0, -1, 2},
- { "2", 0, 2, 1},
- { "-2", 0, -2, 2},
- { "10", 0, 10, 2},
- { "-10", 0, -10, 3},
- { "16", 0, 16, 2},
- { "-16", 0, -16, 3},
- /* Other test cases can be added here. */
- { NULL, 0, 0, 0 } /* terminates the list */
- }, *sdp;
-
- for ( sdp = str_data; sdp->nptr != NULL ; ++sdp )
- {
- /*
- 7.8.2.3 The strtoimax and strtoumax functions
- */
-
- strcpy(saved, sdp->nptr);
-
- errno = 0; /* shouldn't be changed */
-
- if ( (intmax = strtoimax(sdp->nptr, &endptr, sdp->base))
- != sdp->exp_val
- ) {
- int save = errno;
-
- printf("*** strtoimax(%s,,%d) failed; should be: %"
- PRIdMAX", was: %"PRIdMAX" ***\n", sdp->nptr,
- sdp->base, sdp->exp_val, intmax
- );
- status = EXIT_FAILURE;
- errno = save;
- }
- else if ( endptr != sdp->nptr + sdp->exp_len )
- {
- int save = errno;
-
- printf("*** strtoimax(%s,,%d) returned wrong endptr"
- " ***\n", sdp->nptr, sdp->base
- );
- status = EXIT_FAILURE;
- errno = save;
- }
-
- if ( errno != 0 )
- {
- printf("*** strtoimax modified errno ***\n");
- status = EXIT_FAILURE;
- }
-
- if ( strcmp(sdp->nptr, saved) != 0 )
- {
- printf("*** strtoimax modified its input ***\n");
- status = EXIT_FAILURE;
- strcpy(saved, sdp->nptr);
- }
-
- if ( sdp->exp_val >= 0 ) /* else some sign extension */
- {
- errno = 0; /* shouldn't be changed */
-
- if ( (uintmax = strtoumax(sdp->nptr, &endptr, sdp->base
- )
- ) != sdp->exp_val
- ) {
- int save = errno;
-
- printf("*** strtoumax(%s,,%d) failed; "
- "should be: %"PRIuMAX", was: %"PRIuMAX
- " ***\n", sdp->nptr, sdp->base,
- sdp->exp_val, uintmax
- );
- status = EXIT_FAILURE;
- errno = save;
- }
- else if ( endptr != sdp->nptr + sdp->exp_len )
- {
- int save = errno;
-
- printf("*** strtoumax(%s,,%d) returned wrong "
- "endptr ***\n", sdp->nptr, sdp->base
- );
- status = EXIT_FAILURE;
- errno = save;
- }
-
- if ( errno != 0 )
- {
- printf("*** strtoumax modified errno ***\n");
- status = EXIT_FAILURE;
- }
-
- if ( strcmp(sdp->nptr, saved) != 0 )
- {
- printf("*** strtoumax"
- " modified its input ***\n"
- );
- status = EXIT_FAILURE;
- strcpy(saved, sdp->nptr);
- }
- }
-
- /* tests for null endptr */
-
-#define WARN() if (!warned) warned = 1, printf("*** Using null endptr: ***\n")
-
- warned = 0;
- errno = 0; /* shouldn't be changed */
-
- if ( (intmax = strtoimax(sdp->nptr, (char **)NULL, sdp->base))
- != sdp->exp_val
- ) {
- int save = errno;
-
- WARN();
- printf("*** strtoimax(%s,NULL,%d) failed; "
- "should be: %"PRIdMAX", was: %"PRIdMAX" ***\n",
- sdp->nptr, sdp->base, sdp->exp_val, intmax
- );
- status = EXIT_FAILURE;
- errno = save;
- }
-
- if ( errno != 0 )
- {
- WARN();
- printf("*** strtoimax modified errno ***\n");
- status = EXIT_FAILURE;
- }
-
- if ( strcmp(sdp->nptr, saved) != 0 )
- {
- WARN();
- printf("*** strtoimax modified its input ***\n");
- status = EXIT_FAILURE;
- strcpy(saved, sdp->nptr);
- }
-
- if ( sdp->exp_val >= 0 ) /* else some sign extension */
- {
- errno = 0; /* shouldn't be changed */
-
- if ( (uintmax = strtoumax(sdp->nptr, (char **)NULL,
- sdp->base
- )
- ) != sdp->exp_val
- ) {
- int save = errno;
-
- WARN();
- printf("*** strtoumax(%s,NULL,%d) failed; "
- "should be: %"PRIuMAX", was: %"PRIuMAX
- " ***\n", sdp->nptr, sdp->base,
- sdp->exp_val, uintmax
- );
- status = EXIT_FAILURE;
- errno = save;
- }
-
- if ( errno != 0 )
- {
- WARN();
- printf("*** strtoumax modified errno ***\n");
- status = EXIT_FAILURE;
- }
-
- if ( strcmp(sdp->nptr, saved) != 0 )
- {
- WARN();
- printf("*** strtoumax"
- " modified its input ***\n"
- );
- status = EXIT_FAILURE;
- strcpy(saved, sdp->nptr);
- }
- }
-
- /*
- 7.8.2.4 The wcstoimax and wcstoumax functions
- */
-
- for ( i = 0; i < 64; ++i )
- if ( (wnptr[i] = sdp->nptr[i]) == '\0' )
- break;
-
- errno = 0; /* shouldn't be changed */
-
- if ( (intmax = wcstoimax(wnptr, &wendptr, sdp->base))
- != sdp->exp_val
- ) {
- int save = errno;
-
- printf("*** wcstoimax(%s,,%d) failed; should be: %"
- PRIdMAX", was: %"PRIdMAX" ***\n", sdp->nptr,
- sdp->base, sdp->exp_val, intmax
- );
- status = EXIT_FAILURE;
- errno = save;
- }
- else if ( wendptr != wnptr + sdp->exp_len )
- {
- int save = errno;
-
- printf("*** wcstoimax(%s,,%d) returned wrong endptr"
- " ***\n", sdp->nptr, sdp->base
- );
- status = EXIT_FAILURE;
- errno = save;
- }
-
- if ( errno != 0 )
- {
- printf("*** wcstoimax modified errno ***\n");
- status = EXIT_FAILURE;
- }
-
- for ( i = 0; i < 64; ++i )
- if ( wnptr[i] != sdp->nptr[i] )
- {
- printf("*** wcstoimax modified its input ***\n"
- );
- status = EXIT_FAILURE;
-
- for ( ; i < 64; ++i )
- if ( (wnptr[i] = sdp->nptr[i]) == '\0' )
- break;
-
- break;
- }
- else if ( wnptr[i] == '\0' )
- break;
-
- if ( sdp->exp_val >= 0 ) /* else some sign extension */
- {
- errno = 0; /* shouldn't be changed */
-
- if ( (uintmax = wcstoumax(wnptr, &wendptr, sdp->base)
- ) != sdp->exp_val
- ) {
- int save = errno;
-
- printf("*** wcstoumax(%s,,%d) failed; "
- "should be: %"PRIuMAX", was: %"PRIuMAX
- " ***\n", sdp->nptr, sdp->base,
- sdp->exp_val, uintmax
- );
- status = EXIT_FAILURE;
- errno = save;
- }
- else if ( wendptr != wnptr + sdp->exp_len )
- {
- int save = errno;
-
- printf("*** wcstoumax(%s,,%d) returned wrong "
- "endptr ***\n", sdp->nptr, sdp->base
- );
- status = EXIT_FAILURE;
- errno = save;
- }
-
- if ( errno != 0 )
- {
- printf("*** wcstoumax modified errno ***\n");
- status = EXIT_FAILURE;
- }
-
- for ( i = 0; i < 64; ++i )
- if ( wnptr[i] != sdp->nptr[i] )
- {
- printf("*** wcstoumax"
- " modified its input ***\n"
- );
- status = EXIT_FAILURE;
-
- for ( ; i < 64; ++i )
- if ( (wnptr[i] = sdp->nptr[i])
- == '\0'
- )
- break;
-
- break;
- }
- else if ( wnptr[i] == '\0' )
- break;
- }
-
- /* tests for null endptr */
-
- warned = 0;
- errno = 0; /* shouldn't be changed */
-
- if ( (intmax = wcstoimax(wnptr, (wchar_t **)NULL, sdp->base))
- != sdp->exp_val
- ) {
- int save = errno;
-
- WARN();
- printf("*** wcstoimax(%s,NULL,%d) failed; should be: %"
- PRIdMAX", was: %"PRIdMAX" ***\n", sdp->nptr,
- sdp->base, sdp->exp_val, intmax
- );
- status = EXIT_FAILURE;
- errno = save;
- }
-
- if ( errno != 0 )
- {
- WARN();
- printf("*** wcstoimax modified errno ***\n");
- status = EXIT_FAILURE;
- }
-
- for ( i = 0; i < 64; ++i )
- if ( wnptr[i] != sdp->nptr[i] )
- {
- WARN();
- printf("*** wcstoimax modified its input ***\n"
- );
- status = EXIT_FAILURE;
-
- for ( ; i < 64; ++i )
- if ( (wnptr[i] = sdp->nptr[i])
- == '\0'
- )
- break;
-
- break;
- }
- else if ( wnptr[i] == '\0' )
- break;
-
- if ( sdp->exp_val >= 0 ) /* else some sign extension */
- {
- errno = 0; /* shouldn't be changed */
-
- if ( (uintmax = wcstoumax(wnptr, (wchar_t **)NULL,
- sdp->base
- )
- ) != sdp->exp_val
- ) {
- int save = errno;
-
- WARN();
- printf("*** wcstoumax(%s,NULL,%d) failed; "
- "should be: %"PRIuMAX", was: %"PRIuMAX
- " ***\n", sdp->nptr, sdp->base,
- sdp->exp_val, uintmax
- );
- status = EXIT_FAILURE;
- errno = save;
- }
-
- if ( errno != 0 )
- {
- WARN();
- printf("*** wcstoumax modified errno ***\n");
- status = EXIT_FAILURE;
- }
-
- for ( i = 0; i < 64; ++i )
- if ( wnptr[i] != sdp->nptr[i] )
- {
- WARN();
- printf("*** wcstoumax"
- " modified its input ***\n"
- );
- status = EXIT_FAILURE;
-
- for ( ; i < 64; ++i )
- if ( (wnptr[i] = sdp->nptr[i])
- == '\0'
- )
- break;
-
- break;
- }
- else if ( wnptr[i] == '\0' )
- break;
- }
- }
-
- /*
- 7.8.2.3 The strtoimax and strtoumax functions (continued)
- */
-
- if ( (intmax = strtoimax("1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890",
- &endptr, 0
- )
- ) != INTMAX_MAX || errno != ERANGE
- ) {
- printf("*** strtoimax failed overflow test ***\n");
- status = EXIT_FAILURE;
- }
-
- if ( (intmax = strtoimax("+1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890",
- &endptr, 0
- )
- ) != INTMAX_MAX || errno != ERANGE
- ) {
- printf("*** strtoimax failed +overflow test ***\n");
- status = EXIT_FAILURE;
- }
-
- if ( (intmax = strtoimax("-1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890",
- &endptr, 0
- )
- ) != INTMAX_MIN || errno != ERANGE
- ) {
- printf("*** strtoimax failed -overflow test ***\n");
- status = EXIT_FAILURE;
- }
-
- if ( (uintmax = strtoumax("1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890",
- &endptr, 0
- )
- ) != UINTMAX_MAX || errno != ERANGE
- ) {
- printf("*** strtoumax failed overflow test ***\n");
- status = EXIT_FAILURE;
- }
-
- if ( (uintmax = strtoumax("+1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890",
- &endptr, 0
- )
- ) != UINTMAX_MAX || errno != ERANGE
- ) {
- printf("*** strtoumax failed +overflow test ***\n");
- status = EXIT_FAILURE;
- }
-
- if ( (uintmax = strtoumax("-1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890"
- "1234567890123456789012345678901234567890",
- &endptr, 0
- )
- ) != UINTMAX_MAX || errno != ERANGE
- ) {
- printf("*** strtoumax failed -overflow test ***\n");
- status = EXIT_FAILURE;
- }
-
- /*
- 7.8.2.4 The wcstoimax and wcstoumax functions (continued)
- */
-
- if ( (intmax = wcstoimax(L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890",
- &wendptr, 0
- )
- ) != INTMAX_MAX || errno != ERANGE
- ) {
- printf("*** wcstoimax failed overflow test ***\n");
- status = EXIT_FAILURE;
- }
-
- if ( (intmax = wcstoimax(L"+1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890",
- &wendptr, 0
- )
- ) != INTMAX_MAX || errno != ERANGE
- ) {
- printf("*** wcstoimax failed +overflow test ***\n");
- status = EXIT_FAILURE;
- }
-
- if ( (intmax = wcstoimax(L"-1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890",
- &wendptr, 0
- )
- ) != INTMAX_MIN || errno != ERANGE
- ) {
- printf("*** wcstoimax failed -overflow test ***\n");
- status = EXIT_FAILURE;
- }
-
- if ( (uintmax = wcstoumax(L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890",
- &wendptr, 0
- )
- ) != UINTMAX_MAX || errno != ERANGE
- ) {
- printf("*** wcstoumax failed overflow test ***\n");
- status = EXIT_FAILURE;
- }
-
- if ( (uintmax = wcstoumax(L"+1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890",
- &wendptr, 0
- )
- ) != UINTMAX_MAX || errno != ERANGE
- ) {
- printf("*** wcstoumax failed +overflow test ***\n");
- status = EXIT_FAILURE;
- }
-
- if ( (uintmax = wcstoumax(L"-1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890"
- L"1234567890123456789012345678901234567890",
- &wendptr, 0
- )
- ) != UINTMAX_MAX || errno != ERANGE
- ) {
- printf("*** wcstoumax failed -overflow test ***\n");
- status = EXIT_FAILURE;
- }
- }
-#endif /* defined(INTMAX_MAX) */
-
- if ( status != 0 )
- fprintf(stderr, "sitest failed; see stdout for details\n");
-
- return status;
- }
diff --git a/winsup/mingw/mingwex/stdio/fopen64.c b/winsup/mingw/mingwex/stdio/fopen64.c
deleted file mode 100755
index d1dca88..0000000
--- a/winsup/mingw/mingwex/stdio/fopen64.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stdio.h>
-
-FILE* __cdecl
-fopen64 (const char* filename, const char* mode)
-{
- return fopen (filename, mode);
-}
diff --git a/winsup/mingw/mingwex/stdio/fprintf.c b/winsup/mingw/mingwex/stdio/fprintf.c
deleted file mode 100644
index 8e0582c..0000000
--- a/winsup/mingw/mingwex/stdio/fprintf.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/* fprintf.c
- *
- * $Id$
- *
- * Provides an implementation of the "fprintf" function, conforming
- * generally to C99 and SUSv3/POSIX specifications, with extensions
- * to support Microsoft's non-standard format specifications. This
- * is included in libmingwex.a, whence it may replace the Microsoft
- * function of the same name.
- *
- * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- *
- * This implementation of "fprintf" will normally be invoked by calling
- * "__mingw_fprintf()" in preference to a direct reference to "fprintf()"
- * itself; this leaves the MSVCRT implementation as the default, which
- * will be deployed when user code invokes "fprint()". Users who then
- * wish to use this implementation may either call "__mingw_fprintf()"
- * directly, or may use conditional preprocessor defines, to redirect
- * references to "fprintf()" to "__mingw_fprintf()".
- *
- * Compiling this module with "-D INSTALL_AS_DEFAULT" will change this
- * recommended convention, such that references to "fprintf()" in user
- * code will ALWAYS be redirected to "__mingw_fprintf()"; if this option
- * is adopted, then users wishing to use the MSVCRT implementation of
- * "fprintf()" will be forced to use a "back-door" mechanism to do so.
- * Such a "back-door" mechanism is provided with MinGW, allowing the
- * MSVCRT implementation to be called as "__msvcrt_fprintf()"; however,
- * since users may not expect this behaviour, a standard libmingwex.a
- * installation does not employ this option.
- *
- *
- * This is free software. You may redistribute and/or modify it as you
- * see fit, without restriction of copyright.
- *
- * This software is provided "as is", in the hope that it may be useful,
- * but WITHOUT WARRANTY OF ANY KIND, not even any implied warranty of
- * MERCHANTABILITY, nor of FITNESS FOR ANY PARTICULAR PURPOSE. At no
- * time will the author accept any form of liability for any damages,
- * however caused, resulting from the use of this software.
- *
- */
-#include <stdio.h>
-#include <stdarg.h>
-
-#include "pformat.h"
-
-int __cdecl __fprintf (FILE *, const char *, ...) __MINGW_NOTHROW;
-
-#ifdef INSTALL_AS_DEFAULT
-/*
- * This implementation is to become the default for calls to fprintf();
- * establish the alias to make this so, forcing users to use the back-door
- * __msvcrt_fprintf() reference, to access the original MSVCRT function.
- */
-int __cdecl __mingw_alias(fprintf) (FILE *, const char *, ...) __MINGW_NOTHROW;
-
-#endif
-
-int __cdecl __fprintf( FILE *stream, const char *fmt, ... )
-{
- register int retval;
- va_list argv; va_start( argv, fmt );
- retval = __pformat( PFORMAT_TO_FILE | PFORMAT_NOLIMIT, stream, 0, fmt, argv );
- va_end( argv );
- return retval;
-}
-
-/* $RCSfile$Revision$: end of file */
diff --git a/winsup/mingw/mingwex/stdio/fseeko64.c b/winsup/mingw/mingwex/stdio/fseeko64.c
deleted file mode 100755
index d8dcc0c..0000000
--- a/winsup/mingw/mingwex/stdio/fseeko64.c
+++ /dev/null
@@ -1,30 +0,0 @@
-#include <stdio.h>
-#include <io.h>
-#include <errno.h>
-
-int __cdecl
-fseeko64 (FILE* stream, off64_t offset, int whence)
-{
- fpos_t pos;
- if (whence == SEEK_CUR)
- {
- /* If stream is invalid, fgetpos sets errno. */
- if (fgetpos (stream, &pos))
- return (-1);
- pos += (fpos_t) offset;
- }
- else if (whence == SEEK_END)
- {
- /* If writing, we need to flush before getting file length. */
- fflush (stream);
- pos = (fpos_t) (_filelengthi64 (_fileno (stream)) + offset);
- }
- else if (whence == SEEK_SET)
- pos = (fpos_t) offset;
- else
- {
- errno = EINVAL;
- return (-1);
- }
- return fsetpos (stream, &pos);
-}
diff --git a/winsup/mingw/mingwex/stdio/ftello64.c b/winsup/mingw/mingwex/stdio/ftello64.c
deleted file mode 100755
index 97a388c..0000000
--- a/winsup/mingw/mingwex/stdio/ftello64.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <stdio.h>
-
-off64_t __cdecl
-ftello64 (FILE * stream)
-{
- fpos_t pos;
- if (fgetpos(stream, &pos))
- return -1LL;
- else
- return ((off64_t) pos);
-}
diff --git a/winsup/mingw/mingwex/stdio/lseek64.c b/winsup/mingw/mingwex/stdio/lseek64.c
deleted file mode 100755
index 8f8bfa5..0000000
--- a/winsup/mingw/mingwex/stdio/lseek64.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <io.h>
-
-off64_t lseek64
-(int fd, off64_t offset, int whence)
-{
- return _lseeki64(fd, (__int64) offset, whence);
-}
-
diff --git a/winsup/mingw/mingwex/stdio/pformat.c b/winsup/mingw/mingwex/stdio/pformat.c
deleted file mode 100644
index 8b3e93e..0000000
--- a/winsup/mingw/mingwex/stdio/pformat.c
+++ /dev/null
@@ -1,2516 +0,0 @@
-/* FIXME: to be removed one day; for now we explicitly are not
- * prepared to support the POSIX-XSI additions to the C99 standard.
- */
-#undef WITH_XSI_FEATURES
-
-/* pformat.c
- *
- * $Id$
- *
- * Provides a core implementation of the formatting capabilities
- * common to the entire `printf()' family of functions; it conforms
- * generally to C99 and SUSv3/POSIX specifications, with extensions
- * to support Microsoft's non-standard format specifications.
- *
- * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- *
- * This is free software. You may redistribute and/or modify it as you
- * see fit, without restriction of copyright.
- *
- * This software is provided "as is", in the hope that it may be useful,
- * but WITHOUT WARRANTY OF ANY KIND, not even any implied warranty of
- * MERCHANTABILITY, nor of FITNESS FOR ANY PARTICULAR PURPOSE. At no
- * time will the author accept any form of liability for any damages,
- * however caused, resulting from the use of this software.
- *
- * The elements of this implementation which deal with the formatting
- * of floating point numbers, (i.e. the `%e', `%E', `%f', `%F', `%g'
- * and `%G' format specifiers, but excluding the hexadecimal floating
- * point `%a' and `%A' specifiers), make use of the `__gdtoa' function
- * written by David M. Gay, and are modelled on his sample code, which
- * has been deployed under its accompanying terms of use:--
- *
- ******************************************************************
- * Copyright (C) 1997, 1999, 2001 Lucent Technologies
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby
- * granted, provided that the above copyright notice appear in all
- * copies and that both that the copyright notice and this
- * permission notice and warranty disclaimer appear in supporting
- * documentation, and that the name of Lucent or any of its entities
- * not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior
- * permission.
- *
- * LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
- * IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
- * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
- * THIS SOFTWARE.
- ******************************************************************
- *
- */
-#include <stdio.h>
-#include <stdarg.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-#include <locale.h>
-#include <wchar.h>
-#include <math.h>
-
-/* FIXME: The following belongs in values.h, but current MinGW
- * has nothing useful there! OTOH, values.h is not a standard
- * header, and it's use may be considered obsolete; perhaps it
- * is better to just keep these definitions here.
- */
-#ifndef _VALUES_H
-/*
- * values.h
- *
- */
-#define _VALUES_H
-
-#include <limits.h>
-
-#define _TYPEBITS(type) (sizeof(type) * CHAR_BIT)
-
-#define LLONGBITS _TYPEBITS(long long)
-
-#endif /* !defined _VALUES_H -- end of file */
-
-#include "pformat.h"
-
-/* Bit-map constants, defining the internal format control
- * states, which propagate through the flags.
- */
-#define PFORMAT_HASHED 0x0800
-#define PFORMAT_LJUSTIFY 0x0400
-#define PFORMAT_ZEROFILL 0x0200
-
-#define PFORMAT_JUSTIFY (PFORMAT_LJUSTIFY | PFORMAT_ZEROFILL)
-#define PFORMAT_IGNORE -1
-
-#define PFORMAT_SIGNED 0x01C0
-#define PFORMAT_POSITIVE 0x0100
-#define PFORMAT_NEGATIVE 0x0080
-#define PFORMAT_ADDSPACE 0x0040
-
-#define PFORMAT_XCASE 0x0020
-
-#define PFORMAT_LDOUBLE 0x0004
-
-/* `%o' format digit extraction mask, and shift count...
- * (These are constant, and do not propagate through the flags).
- */
-#define PFORMAT_OMASK 0x0007
-#define PFORMAT_OSHIFT 0x0003
-
-/* `%x' and `%X' format digit extraction mask, and shift count...
- * (These are constant, and do not propagate through the flags).
- */
-#define PFORMAT_XMASK 0x000F
-#define PFORMAT_XSHIFT 0x0004
-
-/* The radix point character, used in floating point formats, is
- * localised on the basis of the active LC_NUMERIC locale category.
- * It is stored locally, as a `wchar_t' entity, which is converted
- * to a (possibly multibyte) character on output. Initialisation
- * of the stored `wchar_t' entity, together with a record of its
- * effective multibyte character length, is required each time
- * `__pformat()' is entered, (static storage would not be thread
- * safe), but this initialisation is deferred until it is actually
- * needed; on entry, the effective character length is first set to
- * the following value, (and the `wchar_t' entity is zeroed), to
- * indicate that a call of `localeconv()' is needed, to complete
- * the initialisation.
- */
-#define PFORMAT_RPINIT -3
-
-/* The floating point format handlers return the following value
- * for the radix point position index, when the argument value is
- * infinite, or not a number.
- */
-#define PFORMAT_INFNAN -32768
-
-#ifdef _WIN32
-/*
- * The Microsoft standard for printing `%e' format exponents is
- * with a minimum of three digits, unless explicitly set otherwise,
- * by a prior invocation of the `_set_output_format()' function.
- *
- * The following macro allows us to replicate this behaviour.
- */
-# define PFORMAT_MINEXP __pformat_exponent_digits()
- /*
- * However, this feature is unsupported for versions of the
- * MSVC runtime library prior to msvcr80.dll, and by default,
- * MinGW uses an earlier version, (equivalent to msvcr60.dll),
- * for which `_TWO_DIGIT_EXPONENT' will be undefined.
- */
-# ifndef _TWO_DIGIT_EXPONENT
- /*
- * This hack works around the lack of the `_set_output_format()'
- * feature, when supporting versions of the MSVC runtime library
- * prior to msvcr80.dll; it simply enforces Microsoft's original
- * convention, for all cases where the feature is unsupported.
- */
-# define _get_output_format() 0
-# define _TWO_DIGIT_EXPONENT 1
-# endif
-/*
- * Irrespective of the MSVCRT version supported, *we* will add
- * an additional capability, through the following inline function,
- * which will allow the user to choose his own preferred default
- * for `PRINTF_EXPONENT_DIGITS', through the simple expedient
- * of defining it as an environment variable.
- */
-static __inline__ __attribute__((__always_inline__))
-int __pformat_exponent_digits( void )
-{
- char *exponent_digits = getenv( "PRINTF_EXPONENT_DIGITS" );
- return ((exponent_digits != NULL) && ((unsigned)(*exponent_digits - '0') < 3))
- || (_get_output_format() & _TWO_DIGIT_EXPONENT)
- ? 2
- : 3
- ;
-}
-#else
-/*
- * When we don't care to mimic Microsoft's standard behaviour,
- * we adopt the C99/POSIX standard of two digit exponents.
- */
-# define PFORMAT_MINEXP 2
-#endif
-
-typedef union
-{
- /* A data type agnostic representation,
- * for printf arguments of any integral data type...
- */
- signed long __pformat_long_t;
- signed long long __pformat_llong_t;
- unsigned long __pformat_ulong_t;
- unsigned long long __pformat_ullong_t;
- unsigned short __pformat_ushort_t;
- unsigned char __pformat_uchar_t;
- signed short __pformat_short_t;
- signed char __pformat_char_t;
- void * __pformat_ptr_t;
-} __pformat_intarg_t;
-
-typedef enum
-{
- /* Format interpreter state indices...
- * (used to identify the active phase of format string parsing).
- */
- PFORMAT_INIT = 0,
- PFORMAT_SET_WIDTH,
- PFORMAT_GET_PRECISION,
- PFORMAT_SET_PRECISION,
- PFORMAT_END
-} __pformat_state_t;
-
-typedef enum
-{
- /* Argument length classification indices...
- * (used for arguments representing integer data types).
- */
- PFORMAT_LENGTH_INT = 0,
- PFORMAT_LENGTH_SHORT,
- PFORMAT_LENGTH_LONG,
- PFORMAT_LENGTH_LLONG,
- PFORMAT_LENGTH_CHAR
-} __pformat_length_t;
-/*
- * And a macro to map any arbitrary data type to an appropriate
- * matching index, selected from those above; the compiler should
- * collapse this to a simple assignment.
- */
-#define __pformat_arg_length( type ) \
- sizeof( type ) == sizeof( long long ) ? PFORMAT_LENGTH_LLONG : \
- sizeof( type ) == sizeof( long ) ? PFORMAT_LENGTH_LONG : \
- sizeof( type ) == sizeof( short ) ? PFORMAT_LENGTH_SHORT : \
- sizeof( type ) == sizeof( char ) ? PFORMAT_LENGTH_CHAR : \
- /* should never need this default */ PFORMAT_LENGTH_INT
-
-typedef struct
-{
- /* Formatting and output control data...
- * An instance of this control block is created, (on the stack),
- * for each call to `__pformat()', and is passed by reference to
- * each of the output handlers, as required.
- */
- void * dest;
- int flags;
- int width;
- int precision;
- int rplen;
- wchar_t rpchr;
- int count;
- int quota;
- int expmin;
-} __pformat_t;
-
-static
-void __pformat_putc( int c, __pformat_t *stream )
-{
- /* Place a single character into the `__pformat()' output queue,
- * provided any specified output quota has not been exceeded.
- */
- if( (stream->flags & PFORMAT_NOLIMIT) || (stream->quota > stream->count) )
- {
- /* Either there was no quota specified,
- * or the active quota has not yet been reached.
- */
- if( stream->flags & PFORMAT_TO_FILE )
- /*
- * This is single character output to a FILE stream...
- */
- fputc( c, (FILE *)(stream->dest) );
-
- else
- /* Whereas, this is to an internal memory buffer...
- */
- ((char *)(stream->dest))[stream->count] = c;
- }
- ++stream->count;
-}
-
-static
-void __pformat_putchars( const char *s, int count, __pformat_t *stream )
-{
- /* Handler for `%c' and (indirectly) `%s' conversion specifications.
- *
- * Transfer characters from the string buffer at `s', character by
- * character, up to the number of characters specified by `count', or
- * if `precision' has been explicitly set to a value less than `count',
- * stopping after the number of characters specified for `precision',
- * to the `__pformat()' output stream.
- *
- * Characters to be emitted are passed through `__pformat_putc()', to
- * ensure that any specified output quota is honoured.
- */
- if( (stream->precision >= 0) && (count > stream->precision) )
- /*
- * Ensure that the maximum number of characters transferred doesn't
- * exceed any explicitly set `precision' specification.
- */
- count = stream->precision;
-
- /* Establish the width of any field padding required...
- */
- if( stream->width > count )
- /*
- * as the number of spaces equivalent to the number of characters
- * by which those to be emitted is fewer than the field width...
- */
- stream->width -= count;
-
- else
- /* ignoring any width specification which is insufficient.
- */
- stream->width = PFORMAT_IGNORE;
-
- if( (stream->width > 0) && ((stream->flags & PFORMAT_LJUSTIFY) == 0) )
- /*
- * When not doing flush left justification, (i.e. the `-' flag
- * is not set), any residual unreserved field width must appear
- * as blank padding, to the left of the output string.
- */
- while( stream->width-- )
- __pformat_putc( '\x20', stream );
-
- /* Emit the data...
- */
- while( count-- )
- /*
- * copying the requisite number of characters from the input.
- */
- __pformat_putc( *s++, stream );
-
- /* If we still haven't consumed the entire specified field width,
- * we must be doing flush left justification; any residual width
- * must be filled with blanks, to the right of the output value.
- */
- while( stream->width-- > 0 )
- __pformat_putc( '\x20', stream );
-}
-
-static __inline__
-void __pformat_puts( const char *s, __pformat_t *stream )
-{
- /* Handler for `%s' conversion specifications.
- *
- * Transfer a NUL terminated character string, character by character,
- * stopping when the end of the string is encountered, or if `precision'
- * has been explicitly set, when the specified number of characters has
- * been emitted, if that is less than the length of the input string,
- * to the `__pformat()' output stream.
- *
- * This is implemented as a trivial call to `__pformat_putchars()',
- * passing the length of the input string as the character count,
- * (after first verifying that the input pointer is not NULL).
- */
- if( s == NULL ) s = "(null)";
- __pformat_putchars( s, strlen( s ), stream );
-}
-
-static
-void __pformat_wputchars( const wchar_t *s, int count, __pformat_t *stream )
-{
- /* Handler for `%C'(`%lc') and `%S'(`%ls') conversion specifications;
- * (this is a wide character variant of `__pformat_putchars()').
- *
- * Each multibyte character sequence to be emitted is passed, byte
- * by byte, through `__pformat_putc()', to ensure that any specified
- * output quota is honoured.
- */
- char buf[16]; mbstate_t state; int len = wcrtomb( buf, L'\0', &state );
-
- if( (stream->precision >= 0) && (count > stream->precision) )
- /*
- * Ensure that the maximum number of characters transferred doesn't
- * exceed any explicitly set `precision' specification.
- */
- count = stream->precision;
-
- /* Establish the width of any field padding required...
- */
- if( stream->width > count )
- /*
- * as the number of spaces equivalent to the number of characters
- * by which those to be emitted is fewer than the field width...
- */
- stream->width -= count;
-
- else
- /* ignoring any width specification which is insufficient.
- */
- stream->width = PFORMAT_IGNORE;
-
- if( (stream->width > 0) && ((stream->flags & PFORMAT_LJUSTIFY) == 0) )
- /*
- * When not doing flush left justification, (i.e. the `-' flag
- * is not set), any residual unreserved field width must appear
- * as blank padding, to the left of the output string.
- */
- while( stream->width-- )
- __pformat_putc( '\x20', stream );
-
- /* Emit the data, converting each character from the wide
- * to the multibyte domain as we go...
- */
- while( (count-- > 0) && ((len = wcrtomb( buf, *s++, &state )) > 0) )
- {
- char *p = buf;
- while( len-- > 0 )
- __pformat_putc( *p++, stream );
- }
-
- /* If we still haven't consumed the entire specified field width,
- * we must be doing flush left justification; any residual width
- * must be filled with blanks, to the right of the output value.
- */
- while( stream->width-- > 0 )
- __pformat_putc( '\x20', stream );
-}
-
-static __inline__ __attribute__((__always_inline__))
-void __pformat_wcputs( const wchar_t *s, __pformat_t *stream )
-{
- /* Handler for `%S' (`%ls') conversion specifications.
- *
- * Transfer a NUL terminated wide character string, character by
- * character, converting to its equivalent multibyte representation
- * on output, and stopping when the end of the string is encountered,
- * or if `precision' has been explicitly set, when the specified number
- * of characters has been emitted, if that is less than the length of
- * the input string, to the `__pformat()' output stream.
- *
- * This is implemented as a trivial call to `__pformat_wputchars()',
- * passing the length of the input string as the character count,
- * (after first verifying that the input pointer is not NULL).
- */
- if( s == NULL ) s = L"(null)";
- __pformat_wputchars( s, wcslen( s ), stream );
-}
-
-static __inline__
-int __pformat_int_bufsiz( int bias, int size, __pformat_t *stream )
-{
- /* Helper to establish the size of the internal buffer, which
- * is required to queue the ASCII decomposition of an integral
- * data value, prior to transfer to the output stream.
- */
- size = ((size - 1 + LLONGBITS) / size) + bias;
- size += (stream->precision > 0) ? stream->precision : 0;
- return (size > stream->width) ? size : stream->width;
-}
-
-static
-void __pformat_int( __pformat_intarg_t value, __pformat_t *stream )
-{
- /* Handler for `%d', `%i' and `%u' conversion specifications.
- *
- * Transfer the ASCII representation of an integer value parameter,
- * formatted as a decimal number, to the `__pformat()' output queue;
- * output will be truncated, if any specified quota is exceeded.
- */
- char buf[__pformat_int_bufsiz(1, PFORMAT_OSHIFT, stream)];
- char *p = buf; int precision;
-
- if( stream->flags & PFORMAT_NEGATIVE )
- {
- /* The input value might be negative, (i.e. it is a signed value)...
- */
- if( value.__pformat_llong_t < 0LL )
- /*
- * It IS negative, but we want to encode it as unsigned,
- * displayed with a leading minus sign, so convert it...
- */
- value.__pformat_llong_t = -value.__pformat_llong_t;
-
- else
- /* It is unequivocally a POSITIVE value, so turn off the
- * request to prefix it with a minus sign...
- */
- stream->flags &= ~PFORMAT_NEGATIVE;
- }
-
- /* Encode the input value for display...
- */
- while( value.__pformat_ullong_t )
- {
- /* decomposing it into its constituent decimal digits,
- * in order from least significant to most significant, using
- * the local buffer as a LIFO queue in which to store them.
- */
- *p++ = '0' + (unsigned char)(value.__pformat_ullong_t % 10LL);
- value.__pformat_ullong_t /= 10LL;
- }
-
- if( (stream->precision > 0)
- && ((precision = stream->precision - (p - buf)) > 0) )
- /*
- * We have not yet queued sufficient digits to fill the field width
- * specified for minimum `precision'; pad with zeros to achieve this.
- */
- while( precision-- > 0 )
- *p++ = '0';
-
- if( (p == buf) && (stream->precision != 0) )
- /*
- * Input value was zero; make sure we print at least one digit,
- * unless the precision is also explicitly zero.
- */
- *p++ = '0';
-
- if( (stream->width > 0) && ((stream->width -= p - buf) > 0) )
- {
- /* We have now queued sufficient characters to display the input value,
- * at the desired precision, but this will not fill the output field...
- */
- if( stream->flags & PFORMAT_SIGNED )
- /*
- * We will fill one additional space with a sign...
- */
- stream->width--;
-
- if( (stream->precision < 0)
- && ((stream->flags & PFORMAT_JUSTIFY) == PFORMAT_ZEROFILL) )
- /*
- * and the `0' flag is in effect, so we pad the remaining spaces,
- * to the left of the displayed value, with zeros.
- */
- while( stream->width-- > 0 )
- *p++ = '0';
-
- else if( (stream->flags & PFORMAT_LJUSTIFY) == 0 )
- /*
- * the `0' flag is not in effect, and neither is the `-' flag,
- * so we pad to the left of the displayed value with spaces, so that
- * the value appears right justified within the output field.
- */
- while( stream->width-- > 0 )
- __pformat_putc( '\x20', stream );
- }
-
- if( stream->flags & PFORMAT_NEGATIVE )
- /*
- * A negative value needs a sign...
- */
- *p++ = '-';
-
- else if( stream->flags & PFORMAT_POSITIVE )
- /*
- * A positive value may have an optionally displayed sign...
- */
- *p++ = '+';
-
- else if( stream->flags & PFORMAT_ADDSPACE )
- /*
- * Space was reserved for displaying a sign, but none was emitted...
- */
- *p++ = '\x20';
-
- while( p > buf )
- /*
- * Emit the accumulated constituent digits,
- * in order from most significant to least significant...
- */
- __pformat_putc( *--p, stream );
-
- while( stream->width-- > 0 )
- /*
- * The specified output field has not yet been completely filled;
- * the `-' flag must be in effect, resulting in a displayed value which
- * appears left justified within the output field; we must pad the field
- * to the right of the displayed value, by emitting additional spaces,
- * until we reach the rightmost field boundary.
- */
- __pformat_putc( '\x20', stream );
-}
-
-static
-void __pformat_xint( int fmt, __pformat_intarg_t value, __pformat_t *stream )
-{
- /* Handler for `%o', `%p', `%x' and `%X' conversions.
- *
- * These can be implemented using a simple `mask and shift' strategy;
- * set up the mask and shift values appropriate to the conversion format,
- * and allocate a suitably sized local buffer, in which to queue encoded
- * digits of the formatted value, in preparation for output.
- */
- int width;
- int mask = (fmt == 'o') ? PFORMAT_OMASK : PFORMAT_XMASK;
- int shift = (fmt == 'o') ? PFORMAT_OSHIFT : PFORMAT_XSHIFT;
- char buf[__pformat_int_bufsiz(2, shift, stream)];
- char *p = buf;
-
- while( value.__pformat_ullong_t )
- {
- /* Encode the specified non-zero input value as a sequence of digits,
- * in the appropriate `base' encoding and in reverse digit order, each
- * encoded in its printable ASCII form, with no leading zeros, using
- * the local buffer as a LIFO queue in which to store them.
- */
- char *q;
- if( (*(q = p++) = '0' + (value.__pformat_ullong_t & mask)) > '9' )
- *q = (*q + 'A' - '9' - 1) | (fmt & PFORMAT_XCASE);
- value.__pformat_ullong_t >>= shift;
- }
-
- if( p == buf )
- /*
- * Nothing was queued; input value must be zero, which should never be
- * emitted in the `alternative' PFORMAT_HASHED style.
- */
- stream->flags &= ~PFORMAT_HASHED;
-
- if( ((width = stream->precision) > 0) && ((width -= p - buf) > 0) )
- /*
- * We have not yet queued sufficient digits to fill the field width
- * specified for minimum `precision'; pad with zeros to achieve this.
- */
- while( width-- > 0 )
- *p++ = '0';
-
- else if( (fmt == 'o') && (stream->flags & PFORMAT_HASHED) )
- /*
- * The field width specified for minimum `precision' has already
- * been filled, but the `alternative' PFORMAT_HASHED style for octal
- * output requires at least one initial zero; that will not have
- * been queued, so add it now.
- */
- *p++ = '0';
-
- if( (p == buf) && (stream->precision != 0) )
- /*
- * Still nothing queued for output, but the `precision' has not been
- * explicitly specified as zero, (which is necessary if no output for
- * an input value of zero is desired); queue exactly one zero digit.
- */
- *p++ = '0';
-
- if( stream->width > (width = p - buf) )
- /*
- * Specified field width exceeds the minimum required...
- * Adjust so that we retain only the additional padding width.
- */
- stream->width -= width;
-
- else
- /* Ignore any width specification which is insufficient.
- */
- stream->width = PFORMAT_IGNORE;
-
- if( ((width = stream->width) > 0)
- && (fmt != 'o') && (stream->flags & PFORMAT_HASHED) )
- /*
- * For `%#x' or `%#X' formats, (which have the `#' flag set),
- * further reduce the padding width to accommodate the radix
- * indicating prefix.
- */
- width -= 2;
-
- if( (width > 0) && (stream->precision < 0)
- && ((stream->flags & PFORMAT_JUSTIFY) == PFORMAT_ZEROFILL) )
- /*
- * When the `0' flag is set, and not overridden by the `-' flag,
- * or by a specified precision, add sufficient leading zeros to
- * consume the remaining field width.
- */
- while( width-- > 0 )
- *p++ = '0';
-
- if( (fmt != 'o') && (stream->flags & PFORMAT_HASHED) )
- {
- /* For formats other than octal, the PFORMAT_HASHED output style
- * requires the addition of a two character radix indicator, as a
- * prefix to the actual encoded numeric value.
- */
- *p++ = fmt;
- *p++ = '0';
- }
-
- if( (width > 0) && ((stream->flags & PFORMAT_LJUSTIFY) == 0) )
- /*
- * When not doing flush left justification, (i.e. the `-' flag
- * is not set), any residual unreserved field width must appear
- * as blank padding, to the left of the output value.
- */
- while( width-- > 0 )
- __pformat_putc( '\x20', stream );
-
- while( p > buf )
- /*
- * Move the queued output from the local buffer to the ultimate
- * destination, in LIFO order.
- */
- __pformat_putc( *--p, stream );
-
- /* If we still haven't consumed the entire specified field width,
- * we must be doing flush left justification; any residual width
- * must be filled with blanks, to the right of the output value.
- */
- while( width-- > 0 )
- __pformat_putc( '\x20', stream );
-}
-
-typedef union
-{
- /* A multifaceted representation of an IEEE extended precision,
- * (80-bit), floating point number, facilitating access to its
- * component parts.
- */
- double __pformat_fpreg_double_t;
- long double __pformat_fpreg_ldouble_t;
- struct
- { unsigned long long __pformat_fpreg_mantissa;
- signed short __pformat_fpreg_exponent;
- };
- unsigned short __pformat_fpreg_bitmap[5];
- unsigned long __pformat_fpreg_bits;
-} __pformat_fpreg_t;
-
-#ifdef _WIN32
-/* TODO: make this unconditional in final release...
- * (see note at head of associated `#else' block.
- */
-#include "gdtoa.h"
-
-static
-char *__pformat_cvt( int mode, __pformat_fpreg_t x, int nd, int *dp, int *sign )
-{
- /* Helper function, derived from David M. Gay's `g_xfmt()', calling
- * his `__gdtoa()' function in a manner to provide extended precision
- * replacements for `ecvt()' and `fcvt()'.
- */
- unsigned int k, e = 0; char *ep;
- static FPI fpi = { 64, 1-16383-64+1, 32766-16383-64+1, FPI_Round_near, 0 };
-
- /* Classify the argument into an appropriate `__gdtoa()' category...
- */
- if( (k = __fpclassifyl( x.__pformat_fpreg_ldouble_t )) & FP_NAN )
- /*
- * identifying infinities or not-a-number...
- */
- k = (k & FP_NORMAL) ? STRTOG_Infinite : STRTOG_NaN;
-
- else if( k & FP_NORMAL )
- {
- /* normal and near-zero `denormals'...
- */
- if( k & FP_ZERO )
- {
- /* with appropriate exponent adjustment for a `denormal'...
- */
- k = STRTOG_Denormal;
- e = 1 - 0x3FFF - 63;
- }
- else
- {
- /* or with `normal' exponent adjustment...
- */
- k = STRTOG_Normal;
- e = (x.__pformat_fpreg_exponent & 0x7FFF) - 0x3FFF - 63;
- }
- }
-
- else
- /* or, if none of the above, it's a zero, (positive or negative).
- */
- k = STRTOG_Zero;
-
- /* Check for negative values, always treating NaN as unsigned...
- * (return value is zero for positive/unsigned; non-zero for negative).
- */
- *sign = (k == STRTOG_NaN) ? 0 : x.__pformat_fpreg_exponent & 0x8000;
-
- /* Finally, get the raw digit string, and radix point position index.
- */
- return __gdtoa( &fpi, e, &x.__pformat_fpreg_bits, &k, mode, nd, dp, &ep );
-}
-
-static __inline__ __attribute__((__always_inline__))
-char *__pformat_ecvt( long double x, int precision, int *dp, int *sign )
-{
- /* A convenience wrapper for the above...
- * it emulates `ecvt()', but takes a `long double' argument.
- */
- __pformat_fpreg_t z; z.__pformat_fpreg_ldouble_t = x;
- return __pformat_cvt( 2, z, precision, dp, sign );
-}
-
-static __inline__ __attribute__((__always_inline__))
-char *__pformat_fcvt( long double x, int precision, int *dp, int *sign )
-{
- /* A convenience wrapper for the above...
- * it emulates `fcvt()', but takes a `long double' argument.
- */
- __pformat_fpreg_t z; z.__pformat_fpreg_ldouble_t = x;
- return __pformat_cvt( 3, z, precision, dp, sign );
-}
-
-/* The following are required, to clean up the `__gdtoa()' memory pool,
- * after processing the data returned by the above.
- */
-#define __pformat_ecvt_release( value ) __freedtoa( value )
-#define __pformat_fcvt_release( value ) __freedtoa( value )
-
-#else
-/*
- * TODO: remove this before final release; it is included here as a
- * convenience for testing, without requiring a working `__gdtoa()'.
- */
-static __inline__
-char *__pformat_ecvt( long double x, int precision, int *dp, int *sign )
-{
- /* Define in terms of `ecvt()'...
- */
- char *retval = ecvt( (double)(x), precision, dp, sign );
- if( isinf( x ) || isnan( x ) )
- {
- /* emulating `__gdtoa()' reporting for infinities and NaN.
- */
- *dp = PFORMAT_INFNAN;
- if( *retval == '-' )
- {
- /* Need to force the `sign' flag, (particularly for NaN).
- */
- ++retval; *sign = 1;
- }
- }
- return retval;
-}
-
-static __inline__
-char *__pformat_fcvt( long double x, int precision, int *dp, int *sign )
-{
- /* Define in terms of `fcvt()'...
- */
- char *retval = fcvt( (double)(x), precision, dp, sign );
- if( isinf( x ) || isnan( x ) )
- {
- /* emulating `__gdtoa()' reporting for infinities and NaN.
- */
- *dp = PFORMAT_INFNAN;
- if( *retval == '-' )
- {
- /* Need to force the `sign' flag, (particularly for NaN).
- */
- ++retval; *sign = 1;
- }
- }
- return retval;
-}
-
-/* No memory pool clean up needed, for these emulated cases...
- */
-#define __pformat_ecvt_release( value ) /* nothing to be done */
-#define __pformat_fcvt_release( value ) /* nothing to be done */
-
-/* TODO: end of conditional to be removed. */
-#endif
-
-static __inline__
-void __pformat_emit_radix_point( __pformat_t *stream )
-{
- /* Helper to place a localised representation of the radix point
- * character at the ultimate destination, when formatting fixed or
- * floating point numbers.
- */
- if( stream->rplen == PFORMAT_RPINIT )
- {
- /* Radix point initialisation not yet completed;
- * establish a multibyte to `wchar_t' converter...
- */
- int len; wchar_t rpchr; mbstate_t state;
-
- /* Initialise the conversion state...
- */
- memset( &state, 0, sizeof( state ) );
-
- /* Fetch and convert the localised radix point representation...
- */
- if( (len = mbrtowc( &rpchr, localeconv()->decimal_point, 16, &state )) > 0 )
- /*
- * and store it, if valid.
- */
- stream->rpchr = rpchr;
-
- /* In any case, store the reported effective multibyte length,
- * (or the error flag), marking initialisation as `done'.
- */
- stream->rplen = len;
- }
-
- if( stream->rpchr != (wchar_t)(0) )
- {
- /* We have a localised radix point mark;
- * establish a converter to make it a multibyte character...
- */
- int len; char buf[len = stream->rplen]; mbstate_t state;
-
- /* Initialise the conversion state...
- */
- memset( &state, 0, sizeof( state ) );
-
- /* Convert the `wchar_t' representation to multibyte...
- */
- if( (len = wcrtomb( buf, stream->rpchr, &state )) > 0 )
- {
- /* and copy to the output destination, when valid...
- */
- char *p = buf;
- while( len-- > 0 )
- __pformat_putc( *p++, stream );
- }
-
- else
- /* otherwise fall back to plain ASCII '.'...
- */
- __pformat_putc( '.', stream );
- }
-
- else
- /* No localisation: just use ASCII '.'...
- */
- __pformat_putc( '.', stream );
-}
-
-static __inline__ __attribute__((__always_inline__))
-void __pformat_emit_numeric_value( int c, __pformat_t *stream )
-{
- /* Convenience helper to transfer numeric data from an internal
- * formatting buffer to the ultimate destination...
- */
- if( c == '.' )
- /*
- * converting this internal representation of the the radix
- * point to the appropriately localised representation...
- */
- __pformat_emit_radix_point( stream );
-
- else
- /* and passing all other characters through, unmodified.
- */
- __pformat_putc( c, stream );
-}
-
-static
-void __pformat_emit_inf_or_nan( int sign, char *value, __pformat_t *stream )
-{
- /* Helper to emit INF or NAN where a floating point value
- * resolves to one of these special states.
- */
- int i;
- char buf[4];
- char *p = buf;
-
- /* We use the string formatting helper to display INF/NAN,
- * but we don't want truncation if the precision set for the
- * original floating point output request was insufficient;
- * ignore it!
- */
- stream->precision = PFORMAT_IGNORE;
-
- if( sign )
- /*
- * Negative infinity: emit the sign...
- */
- *p++ = '-';
-
- else if( stream->flags & PFORMAT_POSITIVE )
- /*
- * Not negative infinity, but '+' flag is in effect;
- * thus, we emit a positive sign...
- */
- *p++ = '+';
-
- else if( stream->flags & PFORMAT_ADDSPACE )
- /*
- * No sign required, but space was reserved for it...
- */
- *p++ = '\x20';
-
- /* Copy the appropriate status indicator, up to a maximum of
- * three characters, transforming to the case corresponding to
- * the format specification...
- */
- for( i = 3; i > 0; --i )
- *p++ = (*value++ & ~PFORMAT_XCASE) | (stream->flags & PFORMAT_XCASE);
-
- /* and emit the result.
- */
- __pformat_putchars( buf, p - buf, stream );
-}
-
-static
-void __pformat_emit_float( int sign, char *value, int len, __pformat_t *stream )
-{
- /* Helper to emit a fixed point representation of numeric data,
- * as encoded by a prior call to `ecvt()' or `fcvt()'; (this does
- * NOT include the exponent, for floating point format).
- */
- if( len > 0 )
- {
- /* The magnitude of `x' is greater than or equal to 1.0...
- * reserve space in the output field, for the required number of
- * decimal digits to be placed before the decimal point...
- */
- if( stream->width > len )
- /*
- * adjusting as appropriate, when width is sufficient...
- */
- stream->width -= len;
-
- else
- /* or simply ignoring the width specification, if not.
- */
- stream->width = PFORMAT_IGNORE;
- }
-
- else if( stream->width > 0 )
- /*
- * The magnitude of `x' is less than 1.0...
- * reserve space for exactly one zero before the decimal point.
- */
- stream->width--;
-
- /* Reserve additional space for the digits which will follow the
- * decimal point...
- */
- if( (stream->width >= 0) && (stream->width > stream->precision) )
- /*
- * adjusting appropriately, when sufficient width remains...
- * (note that we must check both of these conditions, because
- * precision may be more negative than width, as a result of
- * adjustment to provide extra padding when trailing zeros
- * are to be discarded from "%g" format conversion with a
- * specified field width, but if width itself is negative,
- * then there is explicitly to be no padding anyway).
- */
- stream->width -= stream->precision;
-
- else
- /* or again, ignoring the width specification, if not.
- */
- stream->width = PFORMAT_IGNORE;
-
- /* Reserve space in the output field, for display of the decimal point,
- * unless the precision is explicity zero, with the `#' flag not set.
- */
- if( (stream->width > 0)
- && ((stream->precision > 0) || (stream->flags & PFORMAT_HASHED)) )
- stream->width--;
-
- /* Reserve space in the output field, for display of the sign of the
- * formatted value, if required; (i.e. if the value is negative, or if
- * either the `space' or `+' formatting flags are set).
- */
- if( (stream->width > 0) && (sign || (stream->flags & PFORMAT_SIGNED)) )
- stream->width--;
-
- /* Emit any padding space, as required to correctly right justify
- * the output within the alloted field width.
- */
- if( (stream->width > 0) && ((stream->flags & PFORMAT_JUSTIFY) == 0) )
- while( stream->width-- > 0 )
- __pformat_putc( '\x20', stream );
-
- /* Emit the sign indicator, as appropriate...
- */
- if( sign )
- /*
- * mandatory, for negative values...
- */
- __pformat_putc( '-', stream );
-
- else if( stream->flags & PFORMAT_POSITIVE )
- /*
- * optional, for positive values...
- */
- __pformat_putc( '+', stream );
-
- else if( stream->flags & PFORMAT_ADDSPACE )
- /*
- * or just fill reserved space, when the space flag is in effect.
- */
- __pformat_putc( '\x20', stream );
-
- /* If the `0' flag is in effect, and not overridden by the `-' flag,
- * then zero padding, to fill out the field, goes here...
- */
- if( (stream->width > 0)
- && ((stream->flags & PFORMAT_JUSTIFY) == PFORMAT_ZEROFILL) )
- while( stream->width-- > 0 )
- __pformat_putc( '0', stream );
-
- /* Emit the digits of the encoded numeric value...
- */
- if( len > 0 )
- /*
- * ...beginning with those which precede the radix point,
- * and appending any necessary significant trailing zeros.
- */
- do __pformat_putc( *value ? *value++ : '0', stream );
- while( --len > 0 );
-
- else
- /* The magnitude of the encoded value is less than 1.0, so no
- * digits precede the radix point; we emit a mandatory initial
- * zero, followed immediately by the radix point.
- */
- __pformat_putc( '0', stream );
-
- /* Unless the encoded value is integral, AND the radix point
- * is not expressly demanded by the `#' flag, we must insert
- * the appropriately localised radix point mark here...
- */
- if( (stream->precision > 0) || (stream->flags & PFORMAT_HASHED) )
- __pformat_emit_radix_point( stream );
-
- /* When the radix point offset, `len', is negative, this implies
- * that additional zeros must appear, following the radix point,
- * and preceding the first significant digit...
- */
- if( len < 0 )
- {
- /* To accommodate these, we adjust the precision, (reducing it
- * by adding a negative value), and then we emit as many zeros
- * as are required.
- */
- stream->precision += len;
- do __pformat_putc( '0', stream );
- while( ++len < 0 );
- }
-
- /* Now we emit any remaining significant digits, or trailing zeros,
- * until the required precision has been achieved.
- */
- while( stream->precision-- > 0 )
- __pformat_putc( *value ? *value++ : '0', stream );
-}
-
-static
-void __pformat_emit_efloat( int sign, char *value, int e, __pformat_t *stream )
-{
- /* Helper to emit a floating point representation of numeric data,
- * as encoded by a prior call to `ecvt()' or `fcvt()'; (this DOES
- * include the following exponent).
- */
- int exp_width = 1;
- __pformat_intarg_t exponent; exponent.__pformat_llong_t = e -= 1;
-
- /* Determine how many digit positions are required for the exponent.
- */
- while( (e /= 10) != 0 )
- exp_width++;
-
- /* Ensure that this is at least as many as the standard requirement.
- */
- if( exp_width < stream->expmin )
- exp_width = stream->expmin;
-
- /* Adjust the residual field width allocation, to allow for the
- * number of exponent digits to be emitted, together with a sign
- * and exponent separator...
- */
- if( stream->width > (exp_width += 2) )
- stream->width -= exp_width;
-
- else
- /* ignoring the field width specification, if insufficient.
- */
- stream->width = PFORMAT_IGNORE;
-
- /* Emit the significand, as a fixed point value with one digit
- * preceding the radix point.
- */
- __pformat_emit_float( sign, value, 1, stream );
-
- /* Reset precision, to ensure the mandatory minimum number of
- * exponent digits will be emitted, and set the flags to ensure
- * the sign is displayed.
- */
- stream->precision = stream->expmin;
- stream->flags |= PFORMAT_SIGNED;
-
- /* Emit the exponent separator.
- */
- __pformat_putc( ('E' | (stream->flags & PFORMAT_XCASE)), stream );
-
- /* Readjust the field width setting, such that it again allows
- * for the digits of the exponent, (which had been discounted when
- * computing any left side padding requirement), so that they are
- * correctly included in the computation of any right side padding
- * requirement, (but here we exclude the exponent separator, which
- * has been emitted, and so counted already).
- */
- stream->width += exp_width - 1;
-
- /* And finally, emit the exponent itself, as a signed integer,
- * with any padding required to achieve flush left justification,
- * (which will be added automatically, by `__pformat_int()').
- */
- __pformat_int( exponent, stream );
-}
-
-static
-void __pformat_float( long double x, __pformat_t *stream )
-{
- /* Handler for `%f' and `%F' format specifiers.
- *
- * This wraps calls to `__pformat_cvt()', `__pformat_emit_float()'
- * and `__pformat_emit_inf_or_nan()', as appropriate, to achieve
- * output in fixed point format.
- */
- int sign, intlen; char *value;
-
- /* Establish the precision for the displayed value, defaulting to six
- * digits following the decimal point, if not explicitly specified.
- */
- if( stream->precision < 0 )
- stream->precision = 6;
-
- /* Encode the input value as ASCII, for display...
- */
- value = __pformat_fcvt( x, stream->precision, &intlen, &sign );
-
- if( intlen == PFORMAT_INFNAN )
- /*
- * handle cases of `infinity' or `not-a-number'...
- */
- __pformat_emit_inf_or_nan( sign, value, stream );
-
- else
- { /* or otherwise, emit the formatted result.
- */
- __pformat_emit_float( sign, value, intlen, stream );
-
- /* and, if there is any residual field width as yet unfilled,
- * then we must be doing flush left justification, so pad out to
- * the right hand field boundary.
- */
- while( stream->width-- > 0 )
- __pformat_putc( '\x20', stream );
- }
-
- /* Clean up `__pformat_fcvt()' memory allocation for `value'...
- */
- __pformat_fcvt_release( value );
-}
-
-static
-void __pformat_efloat( long double x, __pformat_t *stream )
-{
- /* Handler for `%e' and `%E' format specifiers.
- *
- * This wraps calls to `__pformat_cvt()', `__pformat_emit_efloat()'
- * and `__pformat_emit_inf_or_nan()', as appropriate, to achieve
- * output in floating point format.
- */
- int sign, intlen; char *value;
-
- /* Establish the precision for the displayed value, defaulting to six
- * digits following the decimal point, if not explicitly specified.
- */
- if( stream->precision < 0 )
- stream->precision = 6;
-
- /* Encode the input value as ASCII, for display...
- */
- value = __pformat_ecvt( x, stream->precision + 1, &intlen, &sign );
-
- if( intlen == PFORMAT_INFNAN )
- /*
- * handle cases of `infinity' or `not-a-number'...
- */
- __pformat_emit_inf_or_nan( sign, value, stream );
-
- else
- /* or otherwise, emit the formatted result.
- */
- __pformat_emit_efloat( sign, value, intlen, stream );
-
- /* Clean up `__pformat_ecvt()' memory allocation for `value'...
- */
- __pformat_ecvt_release( value );
-}
-
-static
-void __pformat_gfloat( long double x, __pformat_t *stream )
-{
- /* Handler for `%g' and `%G' format specifiers.
- *
- * This wraps calls to `__pformat_cvt()', `__pformat_emit_float()',
- * `__pformat_emit_efloat()' and `__pformat_emit_inf_or_nan()', as
- * appropriate, to achieve output in the more suitable of either
- * fixed or floating point format.
- */
- int sign, intlen; char *value;
-
- /* Establish the precision for the displayed value, defaulting to
- * six significant digits, if not explicitly specified...
- */
- if( stream->precision < 0 )
- stream->precision = 6;
-
- /* or to a minimum of one digit, otherwise...
- */
- else if( stream->precision == 0 )
- stream->precision = 1;
-
- /* Encode the input value as ASCII, for display.
- */
- value = __pformat_ecvt( x, stream->precision, &intlen, &sign );
-
- if( intlen == PFORMAT_INFNAN )
- /*
- * Handle cases of `infinity' or `not-a-number'.
- */
- __pformat_emit_inf_or_nan( sign, value, stream );
-
- else if( (-4 < intlen) && (intlen <= stream->precision) )
- {
- /* Value lies in the acceptable range for fixed point output,
- * (i.e. the exponent is no less than minus four, and the number
- * of significant digits which precede the radix point is fewer
- * than the least number which would overflow the field width,
- * specified or implied by the established precision).
- */
- if( (stream->flags & PFORMAT_HASHED) == PFORMAT_HASHED )
- /*
- * The `#' flag is in effect...
- * Adjust precision to retain the specified number of significant
- * digits, with the proper number preceding the radix point, and
- * the balance following it...
- */
- stream->precision -= intlen;
-
- else
- /* The `#' flag is not in effect...
- * Here we adjust the precision to accommodate all digits which
- * precede the radix point, but we truncate any balance following
- * it, to suppress output of non-significant trailing zeros...
- */
- if( ((stream->precision = strlen( value ) - intlen) < 0)
- /*
- * This may require a compensating adjustment to the field
- * width, to accommodate significant trailing zeros, which
- * precede the radix point...
- */
- && (stream->width > 0) )
- stream->width += stream->precision;
-
- /* Now, we format the result as any other fixed point value.
- */
- __pformat_emit_float( sign, value, intlen, stream );
-
- /* If there is any residual field width as yet unfilled, then
- * we must be doing flush left justification, so pad out to the
- * right hand field boundary.
- */
- while( stream->width-- > 0 )
- __pformat_putc( '\x20', stream );
- }
-
- else
- { /* Value lies outside the acceptable range for fixed point;
- * one significant digit will precede the radix point, so we
- * decrement the precision to retain only the appropriate number
- * of additional digits following it, when we emit the result
- * in floating point format.
- */
- if( (stream->flags & PFORMAT_HASHED) == PFORMAT_HASHED )
- /*
- * The `#' flag is in effect...
- * Adjust precision to emit the specified number of significant
- * digits, with one preceding the radix point, and the balance
- * following it, retaining any non-significant trailing zeros
- * which are required to exactly match the requested precision...
- */
- stream->precision--;
-
- else
- /* The `#' flag is not in effect...
- * Adjust precision to emit only significant digits, with one
- * preceding the radix point, and any others following it, but
- * suppressing non-significant trailing zeros...
- */
- stream->precision = strlen( value ) - 1;
-
- /* Now, we format the result as any other floating point value.
- */
- __pformat_emit_efloat( sign, value, intlen, stream );
- }
-
- /* Clean up `__pformat_ecvt()' memory allocation for `value'.
- */
- __pformat_ecvt_release( value );
-}
-
-static
-void __pformat_emit_xfloat( __pformat_fpreg_t value, __pformat_t *stream )
-{
- /* Helper for emitting floating point data, originating as
- * either `double' or `long double' type, as a hexadecimal
- * representation of the argument value.
- */
- char buf[18], *p = buf;
- __pformat_intarg_t exponent; short exp_width = 2;
-
- /* The mantissa field of the argument value representation can
- * accommodate at most 16 hexadecimal digits, of which one will
- * be placed before the radix point, leaving at most 15 digits
- * to satisfy any requested precision; thus...
- */
- if( (stream->precision >= 0) && (stream->precision < 15) )
- {
- /* When the user specifies a precision within this range,
- * we want to adjust the mantissa, to retain just the number
- * of digits required, rounding up when the high bit of the
- * leftmost discarded digit is set; (mask of 0x08 accounts
- * for exactly one digit discarded, shifting 4 bits per
- * digit, with up to 14 additional digits, to consume the
- * full availability of 15 precision digits).
- *
- * However, before we perform the rounding operation, we
- * normalise the mantissa, shifting it to the left by as many
- * bit positions may be necessary, until its highest order bit
- * is set, thus preserving the maximum number of bits in the
- * rounded result as possible.
- */
- while( value.__pformat_fpreg_mantissa < (LLONG_MAX + 1ULL) )
- value.__pformat_fpreg_mantissa <<= 1;
-
- /* We then shift the mantissa one bit position back to the
- * right, to guard against possible overflow when the rounding
- * adjustment is added.
- */
- value.__pformat_fpreg_mantissa >>= 1;
-
- /* We now add the rounding adjustment, noting that to keep the
- * 0x08 mask aligned with the shifted mantissa, we also need to
- * shift it right by one bit initially, changing its starting
- * value to 0x04...
- */
- value.__pformat_fpreg_mantissa += 0x04LL << (4 * (14 - stream->precision));
- if( (value.__pformat_fpreg_mantissa & (LLONG_MAX + 1ULL)) == 0ULL )
- /*
- * When the rounding adjustment would not have overflowed,
- * then we shift back to the left again, to fill the vacated
- * bit we reserved to accommodate the carry.
- */
- value.__pformat_fpreg_mantissa <<= 1;
-
- else
- /* Otherwise the rounding adjustment would have overflowed,
- * so the carry has already filled the vacated bit; the effect
- * of this is equivalent to an increment of the exponent.
- */
- value.__pformat_fpreg_exponent++;
-
- /* We now complete the rounding to the required precision, by
- * shifting the unwanted digits out, from the right hand end of
- * the mantissa.
- */
- value.__pformat_fpreg_mantissa >>= 4 * (15 - stream->precision);
- }
-
- /* Encode the significant digits of the mantissa in hexadecimal
- * ASCII notation, ready for transfer to the output stream...
- */
- while( value.__pformat_fpreg_mantissa )
- {
- /* taking the rightmost digit in each pass...
- */
- int c = value.__pformat_fpreg_mantissa & 0xF;
- if( c == value.__pformat_fpreg_mantissa )
- {
- /* inserting the radix point, when we reach the last,
- * (i.e. the most significant digit), unless we found no
- * less significant digits, with no mandatory radix point
- * inclusion, and no additional required precision...
- */
- if( (p > buf)
- || (stream->flags & PFORMAT_HASHED) || (stream->precision > 0) )
- /*
- * Internally, we represent the radix point as an ASCII '.';
- * we will replace it with any locale specific alternative,
- * at the time of transfer to the ultimate destination.
- */
- *p++ = '.';
-
- /* If the most significant hexadecimal digit of the encoded
- * output value is greater than one, then the indicated value
- * will appear too large, by an additional binary exponent
- * corresponding to the number of higher order bit positions
- * which it occupies...
- */
- while( value.__pformat_fpreg_mantissa > 1 )
- {
- /* so reduce the exponent value to compensate...
- */
- value.__pformat_fpreg_exponent--;
- value.__pformat_fpreg_mantissa >>= 1;
- }
- }
-
- else if( stream->precision > 0 )
- /*
- * we have not yet fulfilled the desired precision,
- * and we have not yet found the most significant digit,
- * so account for the current digit, within the field
- * width required to meet the specified precision.
- */
- stream->precision--;
-
- if( (c > 0) || (p > buf) || (stream->precision >= 0) )
- /*
- * Ignoring insignificant trailing zeros, (unless required to
- * satisfy specified precision), store the current encoded digit
- * into the pending output buffer, in LIFO order, and using the
- * appropriate case for digits in the `A'..`F' range.
- */
- *p++ = c > 9 ? (c - 10 + 'A') | (stream->flags & PFORMAT_XCASE) : c + '0';
-
- /* Shift out the current digit, (4-bit logical shift right),
- * to align the next more significant digit to be extracted,
- * and encoded in the next pass.
- */
- value.__pformat_fpreg_mantissa >>= 4;
- }
-
- if( p == buf )
- {
- /* Nothing has been queued for output...
- * We need at least one zero, and possibly a radix point.
- */
- if( (stream->precision > 0) || (stream->flags & PFORMAT_HASHED) )
- *p++ = '.';
-
- *p++ = '0';
- }
-
- if( stream->width > 0 )
- {
- /* Adjust the user specified field width, to account for the
- * number of digits minimally required, to display the encoded
- * value, at the requested precision.
- *
- * FIXME: this uses the minimum number of digits possible for
- * representation of the binary exponent, in strict conformance
- * with C99 and POSIX specifications. Although there appears to
- * be no Microsoft precedent for doing otherwise, we may wish to
- * relate this to the `_get_output_format()' result, to maintain
- * consistency with `%e', `%f' and `%g' styles.
- */
- int min_width = p - buf;
- int exponent = value.__pformat_fpreg_exponent;
-
- /* If we have not yet queued sufficient digits to fulfil the
- * requested precision, then we must adjust the minimum width
- * specification, to accommodate the additional digits which
- * are required to do so.
- */
- if( stream->precision > 0 )
- min_width += stream->precision;
-
- /* Adjust the minimum width requirement, to accomodate the
- * sign, radix indicator and at least one exponent digit...
- */
- min_width += stream->flags & PFORMAT_SIGNED ? 6 : 5;
- while( (exponent = exponent / 10) != 0 )
- {
- /* and increase as required, if additional exponent digits
- * are needed, also saving the exponent field width adjustment,
- * for later use when that is emitted.
- */
- min_width++;
- exp_width++;
- }
-
- if( stream->width > min_width )
- {
- /* When specified field width exceeds the minimum required,
- * adjust to retain only the excess...
- */
- stream->width -= min_width;
-
- /* and then emit any required left side padding spaces.
- */
- if( (stream->flags & PFORMAT_JUSTIFY) == 0 )
- while( stream->width-- > 0 )
- __pformat_putc( '\x20', stream );
- }
-
- else
- /* Specified field width is insufficient; just ignore it!
- */
- stream->width = PFORMAT_IGNORE;
- }
-
- /* Emit the sign of the encoded value, as required...
- */
- if( stream->flags & PFORMAT_NEGATIVE )
- /*
- * this is mandatory, to indicate a negative value...
- */
- __pformat_putc( '-', stream );
-
- else if( stream->flags & PFORMAT_POSITIVE )
- /*
- * but this is optional, for a positive value...
- */
- __pformat_putc( '+', stream );
-
- else if( stream->flags & PFORMAT_ADDSPACE )
- /*
- * with this optional alternative.
- */
- __pformat_putc( '\x20', stream );
-
- /* Prefix a `0x' or `0X' radix indicator to the encoded value,
- * with case appropriate to the format specification.
- */
- __pformat_putc( '0', stream );
- __pformat_putc( 'X' | (stream->flags & PFORMAT_XCASE), stream );
-
- /* If the `0' flag is in effect...
- * Zero padding, to fill out the field, goes here...
- */
- if( (stream->width > 0) && (stream->flags & PFORMAT_ZEROFILL) )
- while( stream->width-- > 0 )
- __pformat_putc( '0', stream );
-
- /* Next, we emit the encoded value, without its exponent...
- */
- while( p > buf )
- __pformat_emit_numeric_value( *--p, stream );
-
- /* followed by any additional zeros needed to satisfy the
- * precision specification...
- */
- while( stream->precision-- > 0 )
- __pformat_putc( '0', stream );
-
- /* then the exponent prefix, (C99 and POSIX specify `p'),
- * in the case appropriate to the format specification...
- */
- __pformat_putc( 'P' | (stream->flags & PFORMAT_XCASE), stream );
-
- /* and finally, the decimal representation of the binary exponent,
- * as a signed value with mandatory sign displayed, in a field width
- * adjusted to accommodate it, LEFT justified, with any additional
- * right side padding remaining from the original field width.
- */
- stream->width += exp_width;
- stream->flags |= PFORMAT_SIGNED;
- exponent.__pformat_llong_t = value.__pformat_fpreg_exponent;
- __pformat_int( exponent, stream );
-}
-
-static
-void __pformat_xdouble( double x, __pformat_t *stream )
-{
- /* Handler for `%a' and `%A' format specifiers, (with argument
- * value specified as `double' type).
- */
- unsigned sign_bit = 0;
- __pformat_fpreg_t z; z.__pformat_fpreg_double_t = x;
-
- /* First check for NaN; it is emitted unsigned...
- */
- if( isnan( x ) )
- __pformat_emit_inf_or_nan( sign_bit, "NaN", stream );
-
- else
- { /* Capture the sign bit up-front, so we can show it correctly
- * even when the argument value is zero or infinite.
- */
- if( (sign_bit = (z.__pformat_fpreg_bitmap[3] & 0x8000)) != 0 )
- stream->flags |= PFORMAT_NEGATIVE;
-
- /* Check for infinity, (positive or negative)...
- */
- if( isinf( x ) )
- /*
- * displaying the appropriately signed indicator,
- * when appropriate.
- */
- __pformat_emit_inf_or_nan( sign_bit, "Inf", stream );
-
- else
- { /* The argument value is a representable number...
- * first move its exponent into the appropriate field...
- */
- z.__pformat_fpreg_bitmap[4] = (z.__pformat_fpreg_bitmap[3] >> 4) & 0x7FF;
-
- /* Realign the mantissa, leaving space for a
- * normalised most significant digit...
- */
- z.__pformat_fpreg_mantissa <<= 8;
- z.__pformat_fpreg_bitmap[3] = (z.__pformat_fpreg_bitmap[3] & 0x0FFF);
-
- /* Check for zero value...
- */
- if( z.__pformat_fpreg_exponent || z.__pformat_fpreg_mantissa )
- {
- /* and only when the value is non-zero,
- * eliminate the bias from the exponent...
- */
- z.__pformat_fpreg_exponent -= 0x3FF;
-
- /* Check for a possible denormalised value...
- */
- if( z.__pformat_fpreg_exponent > -126 )
- /*
- * and normalise when it isn't.
- */
- z.__pformat_fpreg_bitmap[3] += 0x1000;
- }
-
- /* Finally, hand the adjusted representation off to the generalised
- * hexadecimal floating point format handler...
- */
- __pformat_emit_xfloat( z, stream );
- }
- }
-}
-
-static
-void __pformat_xldouble( long double x, __pformat_t *stream )
-{
- /* Handler for `%La' and `%LA' format specifiers, (with argument
- * value specified as `long double' type).
- */
- unsigned sign_bit = 0;
- __pformat_fpreg_t z; z.__pformat_fpreg_ldouble_t = x;
-
- /* First check for NaN; it is emitted unsigned...
- */
- if( isnan( x ) )
- __pformat_emit_inf_or_nan( sign_bit, "NaN", stream );
-
- else
- { /* Capture the sign bit up-front, so we can show it correctly
- * even when the argument value is zero or infinite.
- */
- if( (sign_bit = (z.__pformat_fpreg_exponent & 0x8000)) != 0 )
- stream->flags |= PFORMAT_NEGATIVE;
-
- /* Check for infinity, (positive or negative)...
- */
- if( isinf( x ) )
- /*
- * displaying the appropriately signed indicator,
- * when appropriate.
- */
- __pformat_emit_inf_or_nan( sign_bit, "Inf", stream );
-
- else
- { /* The argument value is a representable number...
- * extract the effective value of the biased exponent...
- */
- z.__pformat_fpreg_exponent &= 0x7FFF;
- if( z.__pformat_fpreg_exponent || z.__pformat_fpreg_mantissa )
- /*
- * and if the argument value itself is non-zero,
- * eliminate the bias from the exponent...
- */
- z.__pformat_fpreg_exponent -= 0x3FFF;
-
- /* Finally, hand the adjusted representation off to the
- * generalised hexadecimal floating point format handler...
- */
- __pformat_emit_xfloat( z, stream );
- }
- }
-}
-
-int __pformat( int flags, void *dest, int max, const char *fmt, va_list argv )
-{
- int c;
-
- __pformat_t stream =
- {
- /* Create and initialise a format control block
- * for this output request.
- */
- dest, /* output goes to here */
- flags &= PFORMAT_TO_FILE | PFORMAT_NOLIMIT, /* only these valid initially */
- PFORMAT_IGNORE, /* no field width yet */
- PFORMAT_IGNORE, /* nor any precision spec */
- PFORMAT_RPINIT, /* radix point uninitialised */
- (wchar_t)(0), /* leave it unspecified */
- 0, /* zero output char count */
- max, /* establish output limit */
- PFORMAT_MINEXP /* exponent chars preferred */
- };
-
- format_scan: while( (c = *fmt++) != 0 )
- {
- /* Format string parsing loop...
- * The entry point is labelled, so that we can return to the start state
- * from within the inner `conversion specification' interpretation loop,
- * as soon as a conversion specification has been resolved.
- */
- if( c == '%' )
- {
- /* Initiate parsing of a `conversion specification'...
- */
- __pformat_intarg_t argval;
- __pformat_state_t state = PFORMAT_INIT;
- __pformat_length_t length = PFORMAT_LENGTH_INT;
-
- /* Restart capture for dynamic field width and precision specs...
- */
- int *width_spec = &stream.width;
-
- /* Reset initial state for flags, width and precision specs...
- */
- stream.flags = flags;
- stream.width = stream.precision = PFORMAT_IGNORE;
-
- while( *fmt )
- {
- switch( c = *fmt++ )
- {
- /* Data type specifiers...
- * All are terminal, so exit the conversion spec parsing loop
- * with a `goto format_scan', thus resuming at the outer level
- * in the regular format string parser.
- */
- case '%':
- /*
- * Not strictly a data type specifier...
- * it simply converts as a literal `%' character.
- *
- * FIXME: should we require this to IMMEDIATELY follow the
- * initial `%' of the "conversion spec"? (glibc `printf()'
- * on GNU/Linux does NOT appear to require this, but POSIX
- * and SUSv3 do seem to demand it).
- */
- __pformat_putc( c, &stream );
- goto format_scan;
-
- case 'C':
- /*
- * Equivalent to `%lc'; set `length' accordingly,
- * and simply fall through.
- */
- length = PFORMAT_LENGTH_LONG;
-
- case 'c':
- /*
- * Single, (or single multibyte), character output...
- *
- * We handle these by copying the argument into our local
- * `argval' buffer, and then we pass the address of that to
- * either `__pformat_putchars()' or `__pformat_wputchars()',
- * as appropriate, effectively formatting it as a string of
- * the appropriate type, with a length of one.
- *
- * A side effect of this method of handling character data
- * is that, if the user sets a precision of zero, then no
- * character is actually emitted; we don't want that, so we
- * forcibly override any user specified precision.
- */
- stream.precision = PFORMAT_IGNORE;
-
- /* Now we invoke the appropriate format handler...
- */
- if( (length == PFORMAT_LENGTH_LONG)
- || (length == PFORMAT_LENGTH_LLONG) )
- {
- /* considering any `long' type modifier as a reference to
- * `wchar_t' data, (which is promoted to an `int' argument)...
- */
- argval.__pformat_ullong_t = (wchar_t)(va_arg( argv, int ));
- __pformat_wputchars( (wchar_t *)(&argval), 1, &stream );
- }
-
- else
- { /* while anything else is simply taken as `char', (which
- * is also promoted to an `int' argument)...
- */
- argval.__pformat_uchar_t = (unsigned char)(va_arg( argv, int ));
- __pformat_putchars( (char *)(&argval), 1, &stream );
- }
- goto format_scan;
-
- case 'S':
- /*
- * Equivalent to `%ls'; set `length' accordingly,
- * and simply fall through.
- */
- length = PFORMAT_LENGTH_LONG;
-
- case 's':
- if( (length == PFORMAT_LENGTH_LONG)
- || (length == PFORMAT_LENGTH_LLONG) )
- {
- /* considering any `long' type modifier as a reference to
- * a `wchar_t' string...
- */
- __pformat_wcputs( va_arg( argv, wchar_t * ), &stream );
- }
-
- else
- /* This is normal string output;
- * we simply invoke the appropriate handler...
- */
- __pformat_puts( va_arg( argv, char * ), &stream );
-
- goto format_scan;
-
- case 'o':
- case 'u':
- case 'x':
- case 'X':
- /*
- * Unsigned integer values; octal, decimal or hexadecimal format...
- */
- if( length == PFORMAT_LENGTH_LLONG )
- /*
- * with an `unsigned long long' argument, which we
- * process `as is'...
- */
- argval.__pformat_ullong_t = va_arg( argv, unsigned long long );
-
- else if( length == PFORMAT_LENGTH_LONG )
- /*
- * or with an `unsigned long', which we promote to
- * `unsigned long long'...
- */
- argval.__pformat_ullong_t = va_arg( argv, unsigned long );
-
- else
- { /* or for any other size, which will have been promoted
- * to `unsigned int', we select only the appropriately sized
- * least significant segment, and again promote to the same
- * size as `unsigned long long'...
- */
- argval.__pformat_ullong_t = va_arg( argv, unsigned int );
- if( length == PFORMAT_LENGTH_SHORT )
- /*
- * from `unsigned short'...
- */
- argval.__pformat_ullong_t = argval.__pformat_ushort_t;
-
- else if( length == PFORMAT_LENGTH_CHAR )
- /*
- * or even from `unsigned char'...
- */
- argval.__pformat_ullong_t = argval.__pformat_uchar_t;
- }
-
- /* so we can pass any size of argument to either of two
- * common format handlers...
- */
- if( c == 'u' )
- /*
- * depending on whether output is to be encoded in
- * decimal format...
- */
- __pformat_int( argval, &stream );
-
- else
- /* or in octal or hexadecimal format...
- */
- __pformat_xint( c, argval, &stream );
-
- goto format_scan;
-
- case 'd':
- case 'i':
- /*
- * Signed integer values; decimal format...
- * This is similar to `u', but must process `argval' as signed,
- * and be prepared to handle negative numbers.
- */
- stream.flags |= PFORMAT_NEGATIVE;
-
- if( length == PFORMAT_LENGTH_LLONG )
- /*
- * The argument is a `long long' type...
- */
- argval.__pformat_llong_t = va_arg( argv, long long );
-
- else if( length == PFORMAT_LENGTH_LONG )
- /*
- * or here, a `long' type...
- */
- argval.__pformat_llong_t = va_arg( argv, long );
-
- else
- { /* otherwise, it's an `int' type...
- */
- argval.__pformat_llong_t = va_arg( argv, int );
- if( length == PFORMAT_LENGTH_SHORT )
- /*
- * but it was promoted from a `short' type...
- */
- argval.__pformat_llong_t = argval.__pformat_short_t;
- else if( length == PFORMAT_LENGTH_CHAR )
- /*
- * or even from a `char' type...
- */
- argval.__pformat_llong_t = argval.__pformat_char_t;
- }
-
- /* In any case, all share a common handler...
- */
- __pformat_int( argval, &stream );
- goto format_scan;
-
- case 'p':
- /*
- * Pointer argument; format as hexadecimal, with `0x' prefix...
- */
- stream.flags |= PFORMAT_HASHED;
- argval.__pformat_ullong_t = va_arg( argv, uintptr_t );
- __pformat_xint( 'x', argval, &stream );
- goto format_scan;
-
- case 'e':
- /*
- * Floating point format, with lower case exponent indicator
- * and lower case `inf' or `nan' representation when required;
- * select lower case mode, and simply fall through...
- */
- stream.flags |= PFORMAT_XCASE;
-
- case 'E':
- /*
- * Floating point format, with upper case exponent indicator
- * and upper case `INF' or `NAN' representation when required,
- * (or lower case for all of these, on fall through from above);
- * select lower case mode, and simply fall through...
- */
- if( stream.flags & PFORMAT_LDOUBLE )
- /*
- * for a `long double' argument...
- */
- __pformat_efloat( va_arg( argv, long double ), &stream );
-
- else
- /* or just a `double', which we promote to `long double',
- * so the two may share a common format handler.
- */
- __pformat_efloat( (long double)(va_arg( argv, double )), &stream );
-
- goto format_scan;
-
- case 'f':
- /*
- * Fixed point format, using lower case for `inf' and
- * `nan', when appropriate; select lower case mode, and
- * simply fall through...
- */
- stream.flags |= PFORMAT_XCASE;
-
- case 'F':
- /*
- * Fixed case format using upper case, or lower case on
- * fall through from above, for `INF' and `NAN'...
- */
- if( stream.flags & PFORMAT_LDOUBLE )
- /*
- * for a `long double' argument...
- */
- __pformat_float( va_arg( argv, long double ), &stream );
-
- else
- /* or just a `double', which we promote to `long double',
- * so the two may share a common format handler.
- */
- __pformat_float( (long double)(va_arg( argv, double )), &stream );
-
- goto format_scan;
-
- case 'g':
- /*
- * Generalised floating point format, with lower case
- * exponent indicator when required; select lower case
- * mode, and simply fall through...
- */
- stream.flags |= PFORMAT_XCASE;
-
- case 'G':
- /*
- * Generalised floating point format, with upper case,
- * or on fall through from above, with lower case exponent
- * indicator when required...
- */
- if( stream.flags & PFORMAT_LDOUBLE )
- /*
- * for a `long double' argument...
- */
- __pformat_gfloat( va_arg( argv, long double ), &stream );
-
- else
- /* or just a `double', which we promote to `long double',
- * so the two may share a common format handler.
- */
- __pformat_gfloat( (long double)(va_arg( argv, double )), &stream );
-
- goto format_scan;
-
- case 'a':
- /*
- * Hexadecimal floating point format, with lower case radix
- * and exponent indicators; select the lower case mode, and
- * fall through...
- */
- stream.flags |= PFORMAT_XCASE;
-
- case 'A':
- /*
- * Hexadecimal floating point format; handles radix and
- * exponent indicators in either upper or lower case...
- */
- if( stream.flags & PFORMAT_LDOUBLE )
- /*
- * with a `long double' argument...
- */
- __pformat_xldouble( va_arg( argv, long double ), &stream );
-
- else
- /* or just a `double'.
- */
- __pformat_xdouble( va_arg( argv, double ), &stream );
-
- goto format_scan;
-
- case 'n':
- /*
- * Save current output character count...
- */
- if( length == PFORMAT_LENGTH_CHAR )
- /*
- * to a signed `char' destination...
- */
- *va_arg( argv, char * ) = stream.count;
-
- else if( length == PFORMAT_LENGTH_SHORT )
- /*
- * or to a signed `short'...
- */
- *va_arg( argv, short * ) = stream.count;
-
- else if( length == PFORMAT_LENGTH_LONG )
- /*
- * or to a signed `long'...
- */
- *va_arg( argv, long * ) = stream.count;
-
- else if( length == PFORMAT_LENGTH_LLONG )
- /*
- * or to a signed `long long'...
- */
- *va_arg( argv, long long * ) = stream.count;
-
- else
- /*
- * or, by default, to a signed `int'.
- */
- *va_arg( argv, int * ) = stream.count;
-
- goto format_scan;
-
- /* Argument length modifiers...
- * These are non-terminal; each sets the format parser
- * into the PFORMAT_END state, and ends with a `break'.
- */
- case 'h':
- /*
- * Interpret the argument as explicitly of a `short'
- * or `char' data type, truncated from the standard
- * length defined for integer promotion.
- */
- if( *fmt == 'h' )
- {
- /* Modifier is `hh'; data type is `char' sized...
- * Skip the second `h', and set length accordingly.
- */
- ++fmt;
- length = PFORMAT_LENGTH_CHAR;
- }
-
- else
- /* Modifier is `h'; data type is `short' sized...
- */
- length = PFORMAT_LENGTH_SHORT;
-
- state = PFORMAT_END;
- break;
-
- case 'j':
- /*
- * Interpret the argument as being of the same size as
- * a `intmax_t' entity...
- */
- length = __pformat_arg_length( intmax_t );
- state = PFORMAT_END;
- break;
-
-# ifdef _WIN32
-
- case 'I':
- /*
- * The MSVCRT implementation of the printf() family of
- * functions explicitly uses...
- */
- if( (fmt[0] == '6') && (fmt[1] == '4') )
- {
- /* I64' instead of `ll',
- * when referring to `long long' integer types...
- */
- length = PFORMAT_LENGTH_LLONG;
- fmt += 2;
- }
-
- else if( (fmt[0] == '3') && (fmt[1] == '2') )
- {
- /* and `I32' instead of `l',
- * when referring to `long' integer types...
- */
- length = PFORMAT_LENGTH_LONG;
- fmt += 2;
- }
-
- else
- /* or unqualified `I' instead of `t' or `z',
- * when referring to `ptrdiff_t' or `size_t' entities;
- * (we will choose to map it to `ptrdiff_t').
- */
- length = __pformat_arg_length( ptrdiff_t );
-
- state = PFORMAT_END;
- break;
-
-# endif
-
- case 'l':
- /*
- * Interpret the argument as explicitly of a
- * `long' or `long long' data type.
- */
- if( *fmt == 'l' )
- {
- /* Modifier is `ll'; data type is `long long' sized...
- * Skip the second `l', and set length accordingly.
- */
- ++fmt;
- length = PFORMAT_LENGTH_LLONG;
- }
-
- else
- /* Modifier is `l'; data type is `long' sized...
- */
- length = PFORMAT_LENGTH_LONG;
-
-# ifndef _WIN32
- /*
- * Microsoft's MSVCRT implementation also uses `l'
- * as a modifier for `long double'; if we don't want
- * to support that, we end this case here...
- */
- state = PFORMAT_END;
- break;
-
- /* otherwise, we simply fall through...
- */
-# endif
-
- case 'L':
- /*
- * Identify the appropriate argument as a `long double',
- * when associated with `%a', `%A', `%e', `%E', `%f', `%F',
- * `%g' or `%G' format specifications.
- */
- stream.flags |= PFORMAT_LDOUBLE;
- state = PFORMAT_END;
- break;
-
- case 't':
- /*
- * Interpret the argument as being of the same size as
- * a `ptrdiff_t' entity...
- */
- length = __pformat_arg_length( ptrdiff_t );
- state = PFORMAT_END;
- break;
-
- case 'z':
- /*
- * Interpret the argument as being of the same size as
- * a `size_t' entity...
- */
- length = __pformat_arg_length( size_t );
- state = PFORMAT_END;
- break;
-
- /* Precision indicator...
- * May appear once only; it must precede any modifier
- * for argument length, or any data type specifier.
- */
- case '.':
- if( state < PFORMAT_GET_PRECISION )
- {
- /* We haven't seen a precision specification yet,
- * so initialise it to zero, (in case no digits follow),
- * and accept any following digits as the precision.
- */
- stream.precision = 0;
- width_spec = &stream.precision;
- state = PFORMAT_GET_PRECISION;
- }
-
- else
- /* We've already seen a precision specification,
- * so this is just junk; proceed to end game.
- */
- state = PFORMAT_END;
-
- /* Either way, we must not fall through here.
- */
- break;
-
- /* Variable field width, or precision specification,
- * derived from the argument list...
- */
- case '*':
- /*
- * When this appears...
- */
- if( width_spec
- && ((state == PFORMAT_INIT) || (state == PFORMAT_GET_PRECISION)) )
- {
- /* in proper context; assign to field width
- * or precision, as appropriate.
- */
- if( (*width_spec = va_arg( argv, int )) < 0 )
- {
- /* Assigned value was negative...
- */
- if( state == PFORMAT_INIT )
- {
- /* For field width, this is equivalent to
- * a positive value with the `-' flag...
- */
- stream.flags |= PFORMAT_LJUSTIFY;
- stream.width = -stream.width;
- }
-
- else
- /* while as a precision specification,
- * it should simply be ignored.
- */
- stream.precision = PFORMAT_IGNORE;
- }
- }
-
- else
- /* out of context; give up on width and precision
- * specifications for this conversion.
- */
- state = PFORMAT_END;
-
- /* Mark as processed...
- * we must not see `*' again, in this context.
- */
- width_spec = NULL;
- break;
-
- /* Formatting flags...
- * Must appear while in the PFORMAT_INIT state,
- * and are non-terminal, so again, end with `break'.
- */
- case '#':
- /*
- * Select alternate PFORMAT_HASHED output style.
- */
- if( state == PFORMAT_INIT )
- stream.flags |= PFORMAT_HASHED;
- break;
-
- case '+':
- /*
- * Print a leading sign with numeric output,
- * for both positive and negative values.
- */
- if( state == PFORMAT_INIT )
- stream.flags |= PFORMAT_POSITIVE;
- break;
-
- case '-':
- /*
- * Select left justification of displayed output
- * data, within the output field width, instead of
- * the default flush right justification.
- */
- if( state == PFORMAT_INIT )
- stream.flags |= PFORMAT_LJUSTIFY;
- break;
-
-# ifdef WITH_XSI_FEATURES
-
- case '\'':
- /*
- * This is an XSI extension to the POSIX standard,
- * which we do not support, at present.
- */
- if( state == PFORMAT_INIT )
- stream.flags |= PFORMAT_GROUPED;
- break;
-
-# endif
-
- case '\x20':
- /*
- * Reserve a single space, within the output field,
- * for display of the sign of signed data; this will
- * be occupied by the minus sign, if the data value
- * is negative, or by a plus sign if the data value
- * is positive AND the `+' flag is also present, or
- * by a space otherwise. (Technically, this flag
- * is redundant, if the `+' flag is present).
- */
- if( state == PFORMAT_INIT )
- stream.flags |= PFORMAT_ADDSPACE;
- break;
-
- case '0':
- /*
- * May represent a flag, to activate the `pad with zeros'
- * option, or it may simply be a digit in a width or in a
- * precision specification...
- */
- if( state == PFORMAT_INIT )
- {
- /* This is the flag usage...
- */
- stream.flags |= PFORMAT_ZEROFILL;
- break;
- }
-
- default:
- /*
- * If we didn't match anything above, then we will check
- * for digits, which we may accumulate to generate field
- * width or precision specifications...
- */
- if( (state < PFORMAT_END) && ('9' >= c) && (c >= '0') )
- {
- if( state == PFORMAT_INIT )
- /*
- * Initial digits explicitly relate to field width...
- */
- state = PFORMAT_SET_WIDTH;
-
- else if( state == PFORMAT_GET_PRECISION )
- /*
- * while those following a precision indicator
- * explicitly relate to precision.
- */
- state = PFORMAT_SET_PRECISION;
-
- if( width_spec )
- {
- /* We are accepting a width or precision specification...
- */
- if( *width_spec < 0 )
- /*
- * and accumulation hasn't started yet; we simply
- * initialise the accumulator with the current digit
- * value, converting from ASCII to decimal.
- */
- *width_spec = c - '0';
-
- else
- /* Accumulation has already started; we perform a
- * `leftwise decimal digit shift' on the accumulator,
- * (i.e. multiply it by ten), then add the decimal
- * equivalent value of the current digit.
- */
- *width_spec = *width_spec * 10 + c - '0';
- }
- }
-
- else
- /* We found a digit out of context, or some other character
- * with no designated meaning; silently reject it, and any
- * further characters other than argument length modifiers,
- * until this format specification is completely resolved.
- */
- state = PFORMAT_END;
- }
- }
- }
-
- else
- /* We just parsed a character which is not included within any format
- * specification; we simply emit it as a literal.
- */
- __pformat_putc( c, &stream );
- }
-
- /* When we have fully dispatched the format string, the return value is the
- * total number of bytes we transferred to the output destination.
- */
- return stream.count;
-}
-
-/* $RCSfile$Revision$: end of file */
diff --git a/winsup/mingw/mingwex/stdio/pformat.h b/winsup/mingw/mingwex/stdio/pformat.h
deleted file mode 100644
index a2ace69..0000000
--- a/winsup/mingw/mingwex/stdio/pformat.h
+++ /dev/null
@@ -1,90 +0,0 @@
-#ifndef PFORMAT_H
-/*
- * pformat.h
- *
- * $Id$
- *
- * A private header, defining the `pformat' API; it is to be included
- * in each compilation unit implementing any of the `printf' family of
- * functions, but serves no useful purpose elsewhere.
- *
- * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- *
- * This is free software. You may redistribute and/or modify it as you
- * see fit, without restriction of copyright.
- *
- * This software is provided "as is", in the hope that it may be useful,
- * but WITHOUT WARRANTY OF ANY KIND, not even any implied warranty of
- * MERCHANTABILITY, nor of FITNESS FOR ANY PARTICULAR PURPOSE. At no
- * time will the author accept any form of liability for any damages,
- * however caused, resulting from the use of this software.
- */
-#define PFORMAT_H
-
-/* The following macros reproduce definitions from _mingw.h,
- * so that compilation will not choke, if using any compiler
- * other than the MinGW implementation of GCC.
- */
-#ifndef __cdecl
-# ifdef __GNUC__
-# define __cdecl __attribute__((__cdecl__))
-# else
-# define __cdecl
-# endif
-#endif
-
-#ifndef __MINGW_GNUC_PREREQ
-# if defined __GNUC__ && defined __GNUC_MINOR__
-# define __MINGW_GNUC_PREREQ( major, minor )\
- (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
-# else
-# define __MINGW_GNUC_PREREQ( major, minor )
-# endif
-#endif
-
-#ifndef __MINGW_NOTHROW
-# if __MINGW_GNUC_PREREQ( 3, 3 )
-# define __MINGW_NOTHROW __attribute__((__nothrow__))
-# else
-# define __MINGW_NOTHROW
-# endif
-#endif
-
-/* This isn't currently defined therein,
- * but is a potential candidate for inclusion in _mingw.h
- */
-#ifdef __MINGW32__
-# define __stringify__(NAME) #NAME
-# define __mingw_quoted(NAME) __stringify__(__mingw_##NAME)
-# define __mingw_alias(NAME) __attribute__((alias(__mingw_quoted(NAME)))) NAME
-#else
-# define __mingw_alias(NAME) NAME
-#endif
-
-/* The following are the declarations specific to the `pformat' API...
- */
-#define PFORMAT_TO_FILE 0x1000
-#define PFORMAT_NOLIMIT 0x2000
-
-#ifdef __MINGW32__
- /*
- * Map MinGW specific function names, for use in place of the generic
- * implementation defined equivalent function names.
- */
-# define __pformat __mingw_pformat
-
-# define __printf __mingw_printf
-# define __fprintf __mingw_fprintf
-# define __sprintf __mingw_sprintf
-# define __snprintf __mingw_snprintf
-
-# define __vprintf __mingw_vprintf
-# define __vfprintf __mingw_vfprintf
-# define __vsprintf __mingw_vsprintf
-# define __vsnprintf __mingw_vsnprintf
-
-#endif
-
-int __cdecl __pformat( int, void *, int, const char *, va_list ) __MINGW_NOTHROW;
-
-#endif /* !defined PFORMAT_H: $RCSfile$Revision$: end of file */
diff --git a/winsup/mingw/mingwex/stdio/printf.c b/winsup/mingw/mingwex/stdio/printf.c
deleted file mode 100644
index 98b4e62..0000000
--- a/winsup/mingw/mingwex/stdio/printf.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/* printf.c
- *
- * $Id$
- *
- * Provides an implementation of the "printf" function, conforming
- * generally to C99 and SUSv3/POSIX specifications, with extensions
- * to support Microsoft's non-standard format specifications. This
- * is included in libmingwex.a, whence it may replace the Microsoft
- * function of the same name.
- *
- * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- *
- * This implementation of "printf" will normally be invoked by calling
- * "__mingw_printf()" in preference to a direct reference to "printf()"
- * itself; this leaves the MSVCRT implementation as the default, which
- * will be deployed when user code invokes "print()". Users who then
- * wish to use this implementation may either call "__mingw_printf()"
- * directly, or may use conditional preprocessor defines, to redirect
- * references to "printf()" to "__mingw_printf()".
- *
- * Compiling this module with "-D INSTALL_AS_DEFAULT" will change this
- * recommended convention, such that references to "printf()" in user
- * code will ALWAYS be redirected to "__mingw_printf()"; if this option
- * is adopted, then users wishing to use the MSVCRT implementation of
- * "printf()" will be forced to use a "back-door" mechanism to do so.
- * Such a "back-door" mechanism is provided with MinGW, allowing the
- * MSVCRT implementation to be called as "__msvcrt_printf()"; however,
- * since users may not expect this behaviour, a standard libmingwex.a
- * installation does not employ this option.
- *
- *
- * This is free software. You may redistribute and/or modify it as you
- * see fit, without restriction of copyright.
- *
- * This software is provided "as is", in the hope that it may be useful,
- * but WITHOUT WARRANTY OF ANY KIND, not even any implied warranty of
- * MERCHANTABILITY, nor of FITNESS FOR ANY PARTICULAR PURPOSE. At no
- * time will the author accept any form of liability for any damages,
- * however caused, resulting from the use of this software.
- *
- */
-#include <stdio.h>
-#include <stdarg.h>
-
-#include "pformat.h"
-
-int __cdecl __printf( const char *, ... ) __MINGW_NOTHROW;
-
-#ifdef INSTALL_AS_DEFAULT
-/*
- * This implementation is to become the default for calls to printf();
- * establish the alias to make this so, forcing users to use the back-door
- * __msvcrt_printf() reference, to access the original MSVCRT function.
- */
-int __cdecl __mingw_alias(printf) (const char *, ...) __MINGW_NOTHROW;
-
-#endif
-
-int __cdecl __printf( const char *fmt, ... )
-{
- register int retval;
- va_list argv; va_start( argv, fmt );
- retval = __pformat( PFORMAT_TO_FILE | PFORMAT_NOLIMIT, stdout, 0, fmt, argv );
- va_end( argv );
- return retval;
-}
-
-/* $RCSfile$Revision$: end of file */
diff --git a/winsup/mingw/mingwex/stdio/snprintf.c b/winsup/mingw/mingwex/stdio/snprintf.c
deleted file mode 100644
index 4d022e7..0000000
--- a/winsup/mingw/mingwex/stdio/snprintf.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* snprintf.c
- *
- * $Id$
- *
- * Provides an implementation of the "snprintf" function, conforming
- * generally to C99 and SUSv3/POSIX specifications, with extensions
- * to support Microsoft's non-standard format specifications. This
- * is included in libmingwex.a, replacing the redirection through
- * libmoldnames.a, to the MSVCRT standard "_snprintf" function; (the
- * standard MSVCRT function remains available, and may be invoked
- * directly, using this fully qualified form of its name).
- *
- * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- *
- * This is free software. You may redistribute and/or modify it as you
- * see fit, without restriction of copyright.
- *
- * This software is provided "as is", in the hope that it may be useful,
- * but WITHOUT WARRANTY OF ANY KIND, not even any implied warranty of
- * MERCHANTABILITY, nor of FITNESS FOR ANY PARTICULAR PURPOSE. At no
- * time will the author accept any form of liability for any damages,
- * however caused, resulting from the use of this software.
- *
- */
-
-#include <stdio.h>
-#include <stdarg.h>
-
-#include "pformat.h"
-
-int __cdecl __snprintf (char *, size_t, const char *fmt, ...) __MINGW_NOTHROW;
-int __cdecl __mingw_alias(snprintf) (char *, size_t, const char *, ...) __MINGW_NOTHROW;
-
-int __cdecl __vsnprintf (char *, size_t, const char *fmt, va_list) __MINGW_NOTHROW;
-
-int __cdecl __snprintf( char *buf, size_t length, const char *fmt, ... )
-{
- va_list argv; va_start( argv, fmt );
- register int retval = __vsnprintf( buf, length, fmt, argv );
- va_end( argv );
- return retval;
-}
-
-/* $RCSfile$Revision$: end of file */
diff --git a/winsup/mingw/mingwex/stdio/snwprintf.c b/winsup/mingw/mingwex/stdio/snwprintf.c
deleted file mode 100644
index 42b05b2..0000000
--- a/winsup/mingw/mingwex/stdio/snwprintf.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <stdarg.h>
-#include <wchar.h>
-
-int snwprintf(wchar_t* buffer, size_t n, const wchar_t* format, ...)
-{
- int retval;
- va_list argptr;
-
- va_start( argptr, format );
- retval = _vsnwprintf( buffer, n, format, argptr );
- va_end( argptr );
- return retval;
-}
diff --git a/winsup/mingw/mingwex/stdio/sprintf.c b/winsup/mingw/mingwex/stdio/sprintf.c
deleted file mode 100644
index c3381d3..0000000
--- a/winsup/mingw/mingwex/stdio/sprintf.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/* sprintf.c
- *
- * $Id$
- *
- * Provides an implementation of the "sprintf" function, conforming
- * generally to C99 and SUSv3/POSIX specifications, with extensions
- * to support Microsoft's non-standard format specifications. This
- * is included in libmingwex.a, whence it may replace the Microsoft
- * function of the same name.
- *
- * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- *
- * This implementation of "sprintf" will normally be invoked by calling
- * "__mingw_sprintf()" in preference to a direct reference to "sprintf()"
- * itself; this leaves the MSVCRT implementation as the default, which
- * will be deployed when user code invokes "sprint()". Users who then
- * wish to use this implementation may either call "__mingw_sprintf()"
- * directly, or may use conditional preprocessor defines, to redirect
- * references to "sprintf()" to "__mingw_sprintf()".
- *
- * Compiling this module with "-D INSTALL_AS_DEFAULT" will change this
- * recommended convention, such that references to "sprintf()" in user
- * code will ALWAYS be redirected to "__mingw_sprintf()"; if this option
- * is adopted, then users wishing to use the MSVCRT implementation of
- * "sprintf()" will be forced to use a "back-door" mechanism to do so.
- * Such a "back-door" mechanism is provided with MinGW, allowing the
- * MSVCRT implementation to be called as "__msvcrt_sprintf()"; however,
- * since users may not expect this behaviour, a standard libmingwex.a
- * installation does not employ this option.
- *
- *
- * This is free software. You may redistribute and/or modify it as you
- * see fit, without restriction of copyright.
- *
- * This software is provided "as is", in the hope that it may be useful,
- * but WITHOUT WARRANTY OF ANY KIND, not even any implied warranty of
- * MERCHANTABILITY, nor of FITNESS FOR ANY PARTICULAR PURPOSE. At no
- * time will the author accept any form of liability for any damages,
- * however caused, resulting from the use of this software.
- *
- */
-#include <stdio.h>
-#include <stdarg.h>
-
-#include "pformat.h"
-
-int __cdecl __sprintf (char *, const char *, ...) __MINGW_NOTHROW;
-
-#ifdef INSTALL_AS_DEFAULT
-/*
- * This implementation is to become the default for calls to sprintf();
- * establish the alias to make this so, forcing users to use the back-door
- * __msvcrt_sprintf() reference, to access the original MSVCRT function.
- */
-int __cdecl __mingw_alias(sprintf) (char *, const char *, ...) __MINGW_NOTHROW;
-
-#endif
-
-int __cdecl __sprintf( char *buf, const char *fmt, ... )
-{
- register int retval;
- va_list argv; va_start( argv, fmt );
- buf[retval = __pformat( PFORMAT_NOLIMIT, buf, 0, fmt, argv )] = '\0';
- va_end( argv );
- return retval;
-}
-
-/* $RCSfile$Revision$: end of file */
diff --git a/winsup/mingw/mingwex/stdio/vfprintf.c b/winsup/mingw/mingwex/stdio/vfprintf.c
deleted file mode 100644
index 19de7ae..0000000
--- a/winsup/mingw/mingwex/stdio/vfprintf.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* vfprintf.c
- *
- * $Id$
- *
- * Provides an implementation of the "vfprintf" function, conforming
- * generally to C99 and SUSv3/POSIX specifications, with extensions
- * to support Microsoft's non-standard format specifications. This
- * is included in libmingwex.a, whence it may replace the Microsoft
- * function of the same name.
- *
- * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- *
- * This implementation of "vfprintf" will normally be invoked by calling
- * "__mingw_vfprintf()" in preference to a direct reference to "vfprintf()"
- * itself; this leaves the MSVCRT implementation as the default, which
- * will be deployed when user code invokes "vfprint()". Users who then
- * wish to use this implementation may either call "__mingw_vfprintf()"
- * directly, or may use conditional preprocessor defines, to redirect
- * references to "vfprintf()" to "__mingw_vfprintf()".
- *
- * Compiling this module with "-D INSTALL_AS_DEFAULT" will change this
- * recommended convention, such that references to "vfprintf()" in user
- * code will ALWAYS be redirected to "__mingw_vfprintf()"; if this option
- * is adopted, then users wishing to use the MSVCRT implementation of
- * "vfprintf()" will be forced to use a "back-door" mechanism to do so.
- * Such a "back-door" mechanism is provided with MinGW, allowing the
- * MSVCRT implementation to be called as "__msvcrt_vfprintf()"; however,
- * since users may not expect this behaviour, a standard libmingwex.a
- * installation does not employ this option.
- *
- *
- * This is free software. You may redistribute and/or modify it as you
- * see fit, without restriction of copyright.
- *
- * This software is provided "as is", in the hope that it may be useful,
- * but WITHOUT WARRANTY OF ANY KIND, not even any implied warranty of
- * MERCHANTABILITY, nor of FITNESS FOR ANY PARTICULAR PURPOSE. At no
- * time will the author accept any form of liability for any damages,
- * however caused, resulting from the use of this software.
- *
- */
-#include <stdio.h>
-#include <stdarg.h>
-
-#include "pformat.h"
-
-int __cdecl __vfprintf (FILE *, const char *, va_list) __MINGW_NOTHROW;
-
-#ifdef INSTALL_AS_DEFAULT
-/*
- * This implementation is to become the default for calls to vfprintf();
- * establish the alias to make this so, forcing users to use the back-door
- * __msvcrt_vfprintf() reference, to access the original MSVCRT function.
- */
-int __cdecl __mingw_alias(vfprintf) (FILE *, const char *, va_list) __MINGW_NOTHROW;
-
-#endif
-
-int __cdecl __vfprintf( FILE *stream, const char *fmt, va_list argv )
-{
- return __pformat( PFORMAT_TO_FILE | PFORMAT_NOLIMIT, stream, 0, fmt, argv );
-}
-
-/* $RCSfile$Revision$: end of file */
diff --git a/winsup/mingw/mingwex/stdio/vfscanf.c b/winsup/mingw/mingwex/stdio/vfscanf.c
deleted file mode 100644
index 3c1b137..0000000
--- a/winsup/mingw/mingwex/stdio/vfscanf.c
+++ /dev/null
@@ -1,40 +0,0 @@
-// By aaronwl 2003-01-28 for mingw-msvcrt
-// Public domain: all copyrights disclaimed, absolutely no warranties */
-
-#include <stdarg.h>
-#include <stdio.h>
-
-int vfscanf(FILE * __restrict__ stream, const char * __restrict__ format, va_list arg) {
- int ret;
-
- __asm__(
-
- /* allocate stack (esp += frame - arg3 - (8[arg1,2] + 12)) */
- "movl %%esp, %%ebx\n\t"
- "lea 0xFFFFFFEC(%%esp, %6), %%esp\n\t"
- "subl %5, %%esp\n\t"
-
- // set up stack
- "movl %1, 0xC(%%esp)\n\t" // stream
- "movl %2, 0x10(%%esp)\n\t" // format
- "lea 0x14(%%esp), %%edi\n\t"
- "movl %%edi, (%%esp)\n\t" // memcpy dest
- "movl %5, 0x4(%%esp)\n\t" // memcpy src
- "movl %5, 0x8(%%esp)\n\t"
- "subl %6, 0x8(%%esp)\n\t" // memcpy len
- "call _memcpy\n\t"
- "addl $12, %%esp\n\t"
-
- // call fscanf
- "call _fscanf\n\t"
-
- // restore stack
- "movl %%ebx, %%esp\n\t"
-
- : "=a"(ret), "=c"(stream), "=d"(format)
- : "1"(stream), "2"(format), "S"(arg),
- "a"(&ret)
- : "ebx", "edi");
-
- return ret;
-}
diff --git a/winsup/mingw/mingwex/stdio/vfwscanf.c b/winsup/mingw/mingwex/stdio/vfwscanf.c
deleted file mode 100644
index 2a1d095..0000000
--- a/winsup/mingw/mingwex/stdio/vfwscanf.c
+++ /dev/null
@@ -1,42 +0,0 @@
-// By aaronwl 2003-01-28 for mingw-msvcrt.
-// Public domain: all copyrights disclaimed, absolutely no warranties.
-
-#include <stdarg.h>
-#include <wchar.h>
-
-int vfwscanf(FILE * __restrict__ stream, const wchar_t * __restrict__ format,
- va_list arg) {
-
- int ret;
-
- __asm__(
-
- // allocate stack (esp += frame - arg3 - (8[arg1,2] + 12))
- "movl %%esp, %%ebx\n\t"
- "lea 0xFFFFFFEC(%%esp, %6), %%esp\n\t"
- "subl %5, %%esp\n\t"
-
- // set up stack
- "movl %1, 0xC(%%esp)\n\t" // stream
- "movl %2, 0x10(%%esp)\n\t" // format
- "lea 0x14(%%esp), %%edi\n\t"
- "movl %%edi, (%%esp)\n\t" // memcpy dest
- "movl %5, 0x4(%%esp)\n\t" // memcpy src
- "movl %5, 0x8(%%esp)\n\t"
- "subl %6, 0x8(%%esp)\n\t" // memcpy len
- "call _memcpy\n\t"
- "addl $12, %%esp\n\t"
-
- // call fscanf
- "call _fwscanf\n\t"
-
- // restore stack
- "movl %%ebx, %%esp\n\t"
-
- : "=a"(ret), "=c"(stream), "=d"(format)
- : "1"(stream), "2"(format), "S"(arg),
- "a"(&ret)
- : "ebx", "edi");
-
- return ret;
-}
diff --git a/winsup/mingw/mingwex/stdio/vprintf.c b/winsup/mingw/mingwex/stdio/vprintf.c
deleted file mode 100644
index 20d4385..0000000
--- a/winsup/mingw/mingwex/stdio/vprintf.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* vprintf.c
- *
- * $Id$
- *
- * Provides an implementation of the "vprintf" function, conforming
- * generally to C99 and SUSv3/POSIX specifications, with extensions
- * to support Microsoft's non-standard format specifications. This
- * is included in libmingwex.a, whence it may replace the Microsoft
- * function of the same name.
- *
- * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- *
- * This implementation of "vprintf" will normally be invoked by calling
- * "__mingw_vprintf()" in preference to a direct reference to "vprintf()"
- * itself; this leaves the MSVCRT implementation as the default, which
- * will be deployed when user code invokes "vprint()". Users who then
- * wish to use this implementation may either call "__mingw_vprintf()"
- * directly, or may use conditional preprocessor defines, to redirect
- * references to "vprintf()" to "__mingw_vprintf()".
- *
- * Compiling this module with "-D INSTALL_AS_DEFAULT" will change this
- * recommended convention, such that references to "vprintf()" in user
- * code will ALWAYS be redirected to "__mingw_vprintf()"; if this option
- * is adopted, then users wishing to use the MSVCRT implementation of
- * "vprintf()" will be forced to use a "back-door" mechanism to do so.
- * Such a "back-door" mechanism is provided with MinGW, allowing the
- * MSVCRT implementation to be called as "__msvcrt_vprintf()"; however,
- * since users may not expect this behaviour, a standard libmingwex.a
- * installation does not employ this option.
- *
- *
- * This is free software. You may redistribute and/or modify it as you
- * see fit, without restriction of copyright.
- *
- * This software is provided "as is", in the hope that it may be useful,
- * but WITHOUT WARRANTY OF ANY KIND, not even any implied warranty of
- * MERCHANTABILITY, nor of FITNESS FOR ANY PARTICULAR PURPOSE. At no
- * time will the author accept any form of liability for any damages,
- * however caused, resulting from the use of this software.
- *
- */
-#include <stdio.h>
-#include <stdarg.h>
-
-#include "pformat.h"
-
-int __cdecl __vprintf (const char *, va_list) __MINGW_NOTHROW;
-
-#ifdef INSTALL_AS_DEFAULT
-/*
- * This implementation is to become the default for calls to vprintf();
- * establish the alias to make this so, forcing users to use the back-door
- * __msvcrt_vprintf() reference, to access the original MSVCRT function.
- */
-int __cdecl __mingw_alias(vprintf) (const char *, va_list) __MINGW_NOTHROW;
-
-#endif
-
-int __cdecl __vprintf( const char *fmt, va_list argv )
-{
- return __pformat( PFORMAT_TO_FILE | PFORMAT_NOLIMIT, stdout, 0, fmt, argv );
-}
-
-/* $RCSfile$Revision$: end of file */
diff --git a/winsup/mingw/mingwex/stdio/vscanf.c b/winsup/mingw/mingwex/stdio/vscanf.c
deleted file mode 100644
index 53f5434..0000000
--- a/winsup/mingw/mingwex/stdio/vscanf.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// By aaronwl 2003-01-28 for mingw-msvcrt
-// Public domain: all copyrights disclaimed, absolutely no warranties
-
-#include <stdarg.h>
-#include <stdio.h>
-
-int vscanf(const char * __restrict__ format, va_list arg) {
- return vfscanf(stdin, format, arg);
-}
diff --git a/winsup/mingw/mingwex/stdio/vsnprintf.c b/winsup/mingw/mingwex/stdio/vsnprintf.c
deleted file mode 100644
index a9722c2..0000000
--- a/winsup/mingw/mingwex/stdio/vsnprintf.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* vsnprintf.c
- *
- * $Id$
- *
- * Provides an implementation of the "vsnprintf" function, conforming
- * generally to C99 and SUSv3/POSIX specifications, with extensions
- * to support Microsoft's non-standard format specifications. This
- * is included in libmingwex.a, replacing the redirection through
- * libmoldnames.a, to the MSVCRT standard "_vsnprintf" function; (the
- * standard MSVCRT function remains available, and may be invoked
- * directly, using this fully qualified form of its name).
- *
- * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- *
- * This is free software. You may redistribute and/or modify it as you
- * see fit, without restriction of copyright.
- *
- * This software is provided "as is", in the hope that it may be useful,
- * but WITHOUT WARRANTY OF ANY KIND, not even any implied warranty of
- * MERCHANTABILITY, nor of FITNESS FOR ANY PARTICULAR PURPOSE. At no
- * time will the author accept any form of liability for any damages,
- * however caused, resulting from the use of this software.
- *
- */
-
-#include <stdio.h>
-#include <stdarg.h>
-
-#include "pformat.h"
-
-int __cdecl __vsnprintf (char *, size_t, const char *fmt, va_list) __MINGW_NOTHROW;
-int __cdecl __mingw_alias(vsnprintf) (char *, size_t, const char *, va_list) __MINGW_NOTHROW;
-
-int __cdecl __vsnprintf( char *buf, size_t length, const char *fmt, va_list argv )
-{
- register int retval;
-
- if( length == (size_t)(0) )
- /*
- * No buffer; simply compute and return the size required,
- * without actually emitting any data.
- */
- return __pformat( 0, buf, 0, fmt, argv );
-
- /* If we get to here, then we have a buffer...
- * Emit data up to the limit of buffer length less one,
- * then add the requisite NUL terminator.
- */
- retval = __pformat( 0, buf, --length, fmt, argv );
- buf[retval < length ? retval : length] = '\0';
-
- return retval;
-}
-
-/* $RCSfile$Revision$: end of file */
diff --git a/winsup/mingw/mingwex/stdio/vsnwprintf.c b/winsup/mingw/mingwex/stdio/vsnwprintf.c
deleted file mode 100644
index 1b59a07..0000000
--- a/winsup/mingw/mingwex/stdio/vsnwprintf.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <stdarg.h>
-#include <wchar.h>
-
-int vsnwprintf(wchar_t *buffer, size_t n, const wchar_t * format, va_list argptr)
- { return _vsnwprintf( buffer, n, format, argptr );}
diff --git a/winsup/mingw/mingwex/stdio/vsprintf.c b/winsup/mingw/mingwex/stdio/vsprintf.c
deleted file mode 100644
index babfebd..0000000
--- a/winsup/mingw/mingwex/stdio/vsprintf.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/* vsprintf.c
- *
- * $Id$
- *
- * Provides an implementation of the "vsprintf" function, conforming
- * generally to C99 and SUSv3/POSIX specifications, with extensions
- * to support Microsoft's non-standard format specifications. This
- * is included in libmingwex.a, whence it may replace the Microsoft
- * function of the same name.
- *
- * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- *
- * This implementation of "vsprintf" will normally be invoked by calling
- * "__mingw_vsprintf()" in preference to a direct reference to "vsprintf()"
- * itself; this leaves the MSVCRT implementation as the default, which
- * will be deployed when user code invokes "vsprint()". Users who then
- * wish to use this implementation may either call "__mingw_vsprintf()"
- * directly, or may use conditional preprocessor defines, to redirect
- * references to "vsprintf()" to "__mingw_vsprintf()".
- *
- * Compiling this module with "-D INSTALL_AS_DEFAULT" will change this
- * recommended convention, such that references to "vsprintf()" in user
- * code will ALWAYS be redirected to "__mingw_vsprintf()"; if this option
- * is adopted, then users wishing to use the MSVCRT implementation of
- * "vsprintf()" will be forced to use a "back-door" mechanism to do so.
- * Such a "back-door" mechanism is provided with MinGW, allowing the
- * MSVCRT implementation to be called as "__msvcrt_vsprintf()"; however,
- * since users may not expect this behaviour, a standard libmingwex.a
- * installation does not employ this option.
- *
- *
- * This is free software. You may redistribute and/or modify it as you
- * see fit, without restriction of copyright.
- *
- * This software is provided "as is", in the hope that it may be useful,
- * but WITHOUT WARRANTY OF ANY KIND, not even any implied warranty of
- * MERCHANTABILITY, nor of FITNESS FOR ANY PARTICULAR PURPOSE. At no
- * time will the author accept any form of liability for any damages,
- * however caused, resulting from the use of this software.
- *
- */
-#include <stdio.h>
-#include <stdarg.h>
-
-#include "pformat.h"
-
-int __cdecl __vsprintf (char *, const char *, va_list) __MINGW_NOTHROW;
-
-#ifdef INSTALL_AS_DEFAULT
-/*
- * This implementation is to become the default for calls to vsprintf();
- * establish the alias to make this so, forcing users to use the back-door
- * __msvcrt_vsprintf() reference, to access the original MSVCRT function.
- */
-int __cdecl __mingw_alias(vsprintf) (char *, const char *, va_list) __MINGW_NOTHROW;
-
-#endif
-
-int __cdecl __vsprintf( char *buf, const char *fmt, va_list argv )
-{
- register int retval;
- buf[retval = __pformat( PFORMAT_NOLIMIT, buf, 0, fmt, argv )] = '\0';
- return retval;
-}
-
-/* $RCSfile$Revision$: end of file */
diff --git a/winsup/mingw/mingwex/stdio/vsscanf.c b/winsup/mingw/mingwex/stdio/vsscanf.c
deleted file mode 100644
index f59490d..0000000
--- a/winsup/mingw/mingwex/stdio/vsscanf.c
+++ /dev/null
@@ -1,41 +0,0 @@
-// By aaronwl 2003-01-28 for mingw-msvcrt.
-// Public domain: all copyrights disclaimed, absolutely no warranties.
-
-#include <stdarg.h>
-#include <stdio.h>
-
-
-int vsscanf(const char * __restrict__ s, const char * __restrict__ format, va_list arg) {
- int ret;
-
- __asm__(
-
- // allocate stack (esp += frame - arg3 - (8[arg1,2] + 12))
- "movl %%esp, %%ebx\n\t"
- "lea 0xFFFFFFEC(%%esp, %6), %%esp\n\t"
- "subl %5, %%esp\n\t"
-
- // set up stack
- "movl %1, 0xC(%%esp)\n\t" // s
- "movl %2, 0x10(%%esp)\n\t" // format
- "lea 0x14(%%esp), %%edi\n\t"
- "movl %%edi, (%%esp)\n\t" // memcpy dest
- "movl %5, 0x4(%%esp)\n\t" // memcpy src
- "movl %5, 0x8(%%esp)\n\t"
- "subl %6, 0x8(%%esp)\n\t" // memcpy len
- "call _memcpy\n\t"
- "addl $12, %%esp\n\t"
-
- // call sscanf
- "call _sscanf\n\t"
-
- // restore stack
- "movl %%ebx, %%esp\n\t"
-
- : "=a"(ret), "=c"(s), "=d"(format)
- : "1"(s), "2"(format), "S"(arg),
- "a"(&ret)
- : "ebx", "edi");
-
- return ret;
-}
diff --git a/winsup/mingw/mingwex/stdio/vswscanf.c b/winsup/mingw/mingwex/stdio/vswscanf.c
deleted file mode 100644
index ea359f3..0000000
--- a/winsup/mingw/mingwex/stdio/vswscanf.c
+++ /dev/null
@@ -1,43 +0,0 @@
-// By aaronwl 2003-01-28 for mingw-msvcrt
-// Public domain: all copyrights disclaimed, absolutely no warranties */
-
-#include <stdarg.h>
-#include <wchar.h>
-
-
-int vswscanf(const wchar_t * __restrict__ s, const wchar_t * __restrict__ format,
- va_list arg) {
-
- int ret;
-
- __asm__(
-
- // allocate stack (esp += frame - arg3 - (8[arg1,2] + 12))
- "movl %%esp, %%ebx\n\t"
- "lea 0xFFFFFFEC(%%esp, %6), %%esp\n\t"
- "subl %5, %%esp\n\t"
-
- // set up stack
- "movl %1, 0xC(%%esp)\n\t" // s
- "movl %2, 0x10(%%esp)\n\t" // format
- "lea 0x14(%%esp), %%edi\n\t"
- "movl %%edi, (%%esp)\n\t" // memcpy dest
- "movl %5, 0x4(%%esp)\n\t" // memcpy src
- "movl %5, 0x8(%%esp)\n\t"
- "subl %6, 0x8(%%esp)\n\t" // memcpy len
- "call _memcpy\n\t"
- "addl $12, %%esp\n\t"
-
- // call sscanf
- "call _swscanf\n\t"
-
- // restore stack
- "movl %%ebx, %%esp\n\t"
-
- : "=a"(ret), "=c"(s), "=d"(format)
- : "1"(s), "2"(format), "S"(arg),
- "a"(&ret)
- : "ebx", "edi");
-
- return ret;
-}
diff --git a/winsup/mingw/mingwex/stdio/vwscanf.c b/winsup/mingw/mingwex/stdio/vwscanf.c
deleted file mode 100644
index 0b20e2e..0000000
--- a/winsup/mingw/mingwex/stdio/vwscanf.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// By aaronwl 2003-01-28 for mingw-msvcrt.
-// Public domain: all copyrights disclaimed, absolutely no warranties.
-
-#include <stdarg.h>
-#include <wchar.h>
-#include <stdio.h>
-
-int vwscanf(const wchar_t * __restrict__ format, va_list arg) {
- return vfwscanf(stdin, format, arg);
-}
diff --git a/winsup/mingw/mingwex/strtoimax.c b/winsup/mingw/mingwex/strtoimax.c
deleted file mode 100644
index 9072d4b..0000000
--- a/winsup/mingw/mingwex/strtoimax.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- This source code was extracted from the Q8 package created and
- placed in the PUBLIC DOMAIN by Doug Gwyn <gwyn@arl.mil>
- last edit: 1999/11/05 gwyn@arl.mil
-
- Implements subclause 7.8.2 of ISO/IEC 9899:1999 (E).
-
- This particular implementation requires the matching <inttypes.h>.
- It also assumes that character codes for A..Z and a..z are in
- contiguous ascending order; this is true for ASCII but not EBCDIC.
-*/
-#include <stdlib.h>
-#include <errno.h>
-#include <ctype.h>
-#include <inttypes.h>
-
-/* Helper macros */
-
-/* convert digit character to number, in any base */
-#define ToNumber(c) (isdigit(c) ? (c) - '0' : \
- isupper(c) ? (c) - 'A' + 10 : \
- islower(c) ? (c) - 'a' + 10 : \
- -1 /* "invalid" flag */ \
- )
-/* validate converted digit character for specific base */
-#define valid(n, b) ((n) >= 0 && (n) < (b))
-
-intmax_t
-strtoimax(nptr, endptr, base)
- register const char * __restrict__ nptr;
- char ** __restrict__ endptr;
- register int base;
- {
- register uintmax_t accum; /* accumulates converted value */
- register int n; /* numeral from digit character */
- int minus; /* set iff minus sign seen */
- int toobig; /* set iff value overflows */
-
- if ( endptr != NULL )
- *endptr = (char *)nptr; /* in case no conversion's performed */
-
- if ( base < 0 || base == 1 || base > 36 )
- {
- errno = EDOM;
- return 0; /* unspecified behavior */
- }
-
- /* skip initial, possibly empty sequence of white-space characters */
-
- while ( isspace(*nptr) )
- ++nptr;
-
- /* process subject sequence: */
-
- /* optional sign */
- if ( (minus = *nptr == '-') || *nptr == '+' )
- ++nptr;
-
- if ( base == 0 ) {
- if ( *nptr == '0' ) {
- if ( nptr[1] == 'X' || nptr[1] == 'x' )
- base = 16;
- else
- base = 8;
- }
- else
- base = 10;
- }
- /* optional "0x" or "0X" for base 16 */
-
- if ( base == 16 && *nptr == '0' && (nptr[1] == 'X' || nptr[1] == 'x') )
- nptr += 2; /* skip past this prefix */
-
- /* check whether there is at least one valid digit */
-
- n = ToNumber(*nptr);
- ++nptr;
-
- if ( !valid(n, base) )
- return 0; /* subject seq. not of expected form */
-
- accum = n;
-
- for ( toobig = 0; n = ToNumber(*nptr), valid(n, base); ++nptr )
- if ( accum > (uintmax_t)(INTMAX_MAX / base + 2) ) /* major wrap-around */
- toobig = 1; /* but keep scanning */
- else
- accum = base * accum + n;
-
- if ( endptr != NULL )
- *endptr = (char *)nptr; /* points to first not-valid-digit */
-
- if ( minus )
- {
- if ( accum > (uintmax_t)INTMAX_MAX + 1 )
- toobig = 1;
- }
- else
- if ( accum > (uintmax_t)INTMAX_MAX )
- toobig = 1;
-
- if ( toobig )
- {
- errno = ERANGE;
- return minus ? INTMAX_MIN : INTMAX_MAX;
- }
- else
- return (intmax_t)(minus ? -accum : accum);
- }
-
-long long __attribute__ ((alias ("strtoimax")))
-strtoll (const char* __restrict__ nptr, char ** __restrict__ endptr, int base);
diff --git a/winsup/mingw/mingwex/strtoumax.c b/winsup/mingw/mingwex/strtoumax.c
deleted file mode 100644
index 2c052ac..0000000
--- a/winsup/mingw/mingwex/strtoumax.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- This source code was extracted from the Q8 package created and
- placed in the PUBLIC DOMAIN by Doug Gwyn <gwyn@arl.mil>
- last edit: 1999/11/05 gwyn@arl.mil
-
- Implements subclause 7.8.2 of ISO/IEC 9899:1999 (E).
-
- This particular implementation requires the matching <inttypes.h>.
- It also assumes that character codes for A..Z and a..z are in
- contiguous ascending order; this is true for ASCII but not EBCDIC.
-*/
-#include <stdlib.h>
-#include <errno.h>
-#include <ctype.h>
-#include <inttypes.h>
-
-/* Helper macros */
-
-/* convert digit character to number, in any base */
-#define ToNumber(c) (isdigit(c) ? (c) - '0' : \
- isupper(c) ? (c) - 'A' + 10 : \
- islower(c) ? (c) - 'a' + 10 : \
- -1 /* "invalid" flag */ \
- )
-/* validate converted digit character for specific base */
-#define valid(n, b) ((n) >= 0 && (n) < (b))
-
-uintmax_t
-strtoumax(nptr, endptr, base)
- register const char * __restrict__ nptr;
- char ** __restrict__ endptr;
- register int base;
- {
- register uintmax_t accum; /* accumulates converted value */
- register uintmax_t next; /* for computing next value of accum */
- register int n; /* numeral from digit character */
- int minus; /* set iff minus sign seen (yes!) */
- int toobig; /* set iff value overflows */
-
- if ( endptr != NULL )
- *endptr = (char *)nptr; /* in case no conversion's performed */
-
- if ( base < 0 || base == 1 || base > 36 )
- {
- errno = EDOM;
- return 0; /* unspecified behavior */
- }
-
- /* skip initial, possibly empty sequence of white-space characters */
-
- while ( isspace(*nptr) )
- ++nptr;
-
- /* process subject sequence: */
-
- /* optional sign (yes!) */
-
- if ( (minus = *nptr == '-') || *nptr == '+' )
- ++nptr;
-
- if ( base == 0 )
- {
- if ( *nptr == '0' )
- {
- if ( nptr[1] == 'X' || nptr[1] == 'x' )
- base = 16;
- else
- base = 8;
- }
- else
- base = 10;
- }
-
- /* optional "0x" or "0X" for base 16 */
-
- if ( base == 16 && *nptr == '0' && (nptr[1] == 'X' || nptr[1] == 'x') )
- nptr += 2; /* skip past this prefix */
-
- /* check whether there is at least one valid digit */
-
- n = ToNumber(*nptr);
- ++nptr;
-
- if ( !valid(n, base) )
- return 0; /* subject seq. not of expected form */
-
- accum = n;
-
- for ( toobig = 0; n = ToNumber(*nptr), valid(n, base); ++nptr )
- if ( accum > UINTMAX_MAX / base + 1 /* major wrap-around */
- || (next = base * accum + n) < accum /* minor wrap-around */
- )
- toobig = 1; /* but keep scanning */
- else
- accum = next;
-
- if ( endptr != NULL )
- *endptr = (char *)nptr; /* points to first not-valid-digit */
-
- if ( toobig )
- {
- errno = ERANGE;
- return UINTMAX_MAX;
- }
- else
- return minus ? -accum : accum; /* (yes!) */
- }
-
-unsigned long long __attribute__ ((alias ("strtoumax")))
-strtoull (const char* __restrict__ nptr, char ** __restrict__ endptr, int base);
diff --git a/winsup/mingw/mingwex/tdelete.c b/winsup/mingw/mingwex/tdelete.c
deleted file mode 100755
index 4de3897..0000000
--- a/winsup/mingw/mingwex/tdelete.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* $NetBSD: tdelete.c,v 1.3 1999/09/20 04:39:43 lukem Exp $ */
-
-/*
- * Tree search generalized from Knuth (6.2.2) Algorithm T just like
- * the AT&T man page says.
- *
- * The node_t structure is for internal use only, lint doesn't grok it.
- *
- * Written by reading the System V Interface Definition, not the code.
- *
- * Totally public domain.
- */
-
-#include <assert.h>
-#define _SEARCH_PRIVATE
-#include <search.h>
-#include <stdlib.h>
-
-#define _DIAGASSERT assert
-
-
-
-/* delete node with given key */
-void *
-tdelete(const void *vkey, /* key to be deleted */
- void **vrootp, /* address of the root of tree */
- int (*compar)(const void *, const void *))
-{
- node_t **rootp = (node_t **)vrootp;
- node_t *p, *q, *r;
- int cmp;
-
- _DIAGASSERT(vkey != NULL);
- _DIAGASSERT(compar != NULL);
-
- if (rootp == NULL || (p = *rootp) == NULL)
- return NULL;
-
- while ((cmp = (*compar)(vkey, (*rootp)->key)) != 0) {
- p = *rootp;
- rootp = (cmp < 0) ?
- &(*rootp)->llink : /* follow llink branch */
- &(*rootp)->rlink; /* follow rlink branch */
- if (*rootp == NULL)
- return NULL; /* key not found */
- }
- r = (*rootp)->rlink; /* D1: */
- if ((q = (*rootp)->llink) == NULL) /* Left NULL? */
- q = r;
- else if (r != NULL) { /* Right link is NULL? */
- if (r->llink == NULL) { /* D2: Find successor */
- r->llink = q;
- q = r;
- } else { /* D3: Find NULL link */
- for (q = r->llink; q->llink != NULL; q = r->llink)
- r = q;
- r->llink = q->rlink;
- q->llink = (*rootp)->llink;
- q->rlink = (*rootp)->rlink;
- }
- }
- free(*rootp); /* D4: Free node */
- *rootp = q; /* link parent to new node */
- return p;
-}
diff --git a/winsup/mingw/mingwex/testwmem.c b/winsup/mingw/mingwex/testwmem.c
deleted file mode 100644
index 1310718..0000000
--- a/winsup/mingw/mingwex/testwmem.c
+++ /dev/null
@@ -1,104 +0,0 @@
-#include <memory.h>
-#include <wchar.h>
-#include <stdio.h>
-
-wchar_t fmt1[] = L" 1 2 3 4 5";
-wchar_t fmt2[] = L"12345678901234567890123456789012345678901234567890";
-
-void test_wmemchr( void )
-{
- wchar_t* dest;
- wint_t result;
- wint_t ch = L'r';
- wchar_t str[] = L"lazy";
- wchar_t string1[60] = L"The quick brown dog jumps over the lazy fox";
-
- wprintf( L"Wmemchr\n" );
- wprintf( L"String to be searched:\n\t\t%s\n", string1 );
- wprintf( L"\t\t%s\n\t\t%s\n\n", fmt1, fmt2 );
-
- wprintf( L"Search char:\t%c\n", ch );
- dest = wmemchr( string1, ch, sizeof( string1 ) );
- result = dest - string1 + 1;
- if( dest != NULL )
- wprintf( L"Result:\t\t%c found at position %d\n\n", ch, result );
- else
- wprintf( L"Result:\t\t%c not found\n\n" );
-return;
-}
-void test_wmemset( void )
-{/* 1 2
- 0123456789012345678901234567890 */
- wchar_t buffer[] = L"This is a test of the wmemset function";
- wprintf( L"Before: %s\n", buffer );
- wmemset( buffer+22, L'*', 7 );
- wprintf( L"After: %s\n\n", buffer );
-return;
-}
-
-void test_wmemmove( void )
-{
- wchar_t string1[60] = L"The quick brown dog jumps over the lazy fox";
- wchar_t string2[60] = L"The quick brown fox jumps over the lazy dog";
-
- wprintf( L"Wmemcpy without overlap\n" );
- wprintf( L"Source:\t\t%s\n", string1 + 40 );
- wprintf( L"Destination:\t%s\n", string1 + 16 );
- wmemcpy( string1 + 16, string1 + 40, 3 );
- wprintf( L"Result:\t\t%s\n", string1 );
- wprintf( L"Length:\t\t%d characters\n\n", wcslen( string1 ) );
- wmemcpy( string1 + 16, string2 + 40, 3 );
-
- wprintf( L"Wmemmove with overlap\n" );
- wprintf( L"Source:\t\t%s\n", string2 + 4 );
- wprintf( L"Destination:\t%s\n", string2 + 10 );
- wmemmove( string2 + 10, string2 + 4, 40 );
- wprintf( L"Result:\t\t%s\n", string2 );
- wprintf( L"Length:\t\t%d characters\n\n", wcslen( string2 ) );
-
- wprintf( L"Wmemcpy with overlap\n" );
- wprintf( L"Source:\t\t%s\n", string1 + 4 );
- wprintf( L"Destination:\t%s\n", string1 + 10 );
- wmemcpy( string1 + 10, string1 + 4, 40 );
- wprintf( L"Result:\t\t%s\n", string1 );
- wprintf( L"Length:\t\t%d characters\n\n", wcslen( string1 ) );
-}
-
-
-void test_wmemcmp( void )
-{
- wchar_t first[] = L"12345678901234567890";
- wchar_t second[] = L"12345678901234567891";
- wint_t result;
- wprintf(L"Wmemcmp\n");
- wprintf( L"Compare '%.19s' to '%.19s':\n", first, second );
- result = wmemcmp( first, second, 19 );
- if( result < 0 )
- wprintf( L"First is less than second.\n" );
- else if( result == 0 )
- wprintf( L"First is equal to second.\n" );
- else if( result > 0 )
- wprintf( L"First is greater than second.\n" );
- wprintf( L"\nCompare '%.20s' to '%.20s':\n", first, second );
- result = wmemcmp( first, second, 20 );
- if( result < 0 )
- wprintf( L"First is less than second.\n\n" );
- else if( result == 0 )
- wprintf( L"First is equal to second.\n\n" );
- else if( result > 0 )
- wprintf( L"First is greater than second.\n\n" );
-}
-
-
-
-int main(){
-test_wmemset();
-test_wmemmove();
-test_wmemchr();
-test_wmemcmp();
-return 0;
-}
-
-
-
-
diff --git a/winsup/mingw/mingwex/tfind.c b/winsup/mingw/mingwex/tfind.c
deleted file mode 100755
index e8ffe65..0000000
--- a/winsup/mingw/mingwex/tfind.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* $NetBSD: tfind.c,v 1.3.18.2 2005/03/23 11:12:21 tron Exp $ */
-
-/*
- * Tree search generalized from Knuth (6.2.2) Algorithm T just like
- * the AT&T man page says.
- *
- * The node_t structure is for internal use only, lint doesn't grok it.
- *
- * Written by reading the System V Interface Definition, not the code.
- *
- * Totally public domain.
- */
-
-#include <assert.h>
-#define _SEARCH_PRIVATE
-#include <stdlib.h>
-#include <search.h>
-
-
-/* find a node, or return 0 */
-void *
-tfind(const void *vkey,
- void * const *vrootp,
- int (*compar) (const void *, const void *))
-{
- node_t * const *rootp = (node_t * const*)vrootp;
-
- if (rootp == NULL)
- return NULL;
-
- while (*rootp != NULL) { /* T1: */
- int r;
-
- if ((r = (*compar)(vkey, (*rootp)->key)) == 0) /* T2: */
- return *rootp; /* key found */
- rootp = (r < 0) ?
- &(*rootp)->llink : /* T3: follow left branch */
- &(*rootp)->rlink; /* T4: follow right branch */
- }
- return NULL;
-}
diff --git a/winsup/mingw/mingwex/tsearch.c b/winsup/mingw/mingwex/tsearch.c
deleted file mode 100755
index a0aa0eb..0000000
--- a/winsup/mingw/mingwex/tsearch.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* $NetBSD: tsearch.c,v 1.4 1999/09/20 04:39:43 lukem Exp $ */
-
-/*
- * Tree search generalized from Knuth (6.2.2) Algorithm T just like
- * the AT&T man page says.
- *
- * The node_t structure is for internal use only, lint doesn't grok it.
- *
- * Written by reading the System V Interface Definition, not the code.
- *
- * Totally public domain.
- */
-
-#include <assert.h>
-#define _SEARCH_PRIVATE
-#include <search.h>
-#include <stdlib.h>
-
-
-/* find or insert datum into search tree */
-void *
-tsearch(const void * __restrict__ vkey, /* key to be located */
- void ** __restrict__ vrootp, /* address of tree root */
- int (*compar) (const void *, const void *))
-{
- node_t *q;
- node_t **rootp = (node_t **)vrootp;
-
- if (rootp == NULL)
- return NULL;
-
- while (*rootp != NULL) { /* Knuth's T1: */
- int r;
-
- if ((r = (*compar)(vkey, (*rootp)->key)) == 0) /* T2: */
- return *rootp; /* we found it! */
-
- rootp = (r < 0) ?
- &(*rootp)->llink : /* T3: follow left branch */
- &(*rootp)->rlink; /* T4: follow right branch */
- }
-
- q = malloc(sizeof(node_t)); /* T5: key not found */
- if (q != 0) { /* make new node */
- *rootp = q; /* link new node to old */
- /* LINTED const castaway ok */
- q->key = (void *)vkey; /* initialize new node */
- q->llink = q->rlink = NULL;
- }
- return q;
-}
diff --git a/winsup/mingw/mingwex/tst-aligned-malloc.c b/winsup/mingw/mingwex/tst-aligned-malloc.c
deleted file mode 100755
index 43ee734..0000000
--- a/winsup/mingw/mingwex/tst-aligned-malloc.c
+++ /dev/null
@@ -1,90 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
-#include <string.h>
-#include <errno.h>
-#include <malloc.h>
-
-#ifdef HAVE_STDINT_H
-# include <stdint.h> /* uintptr_t */
-#else
-# define uintptr_t size_t
-#endif
-
-#define NELEM(a) (sizeof(a) / sizeof(a[0]))
-
-static int
-is_aligned (void *p, size_t alignment, size_t offset)
-{
- return !((((uintptr_t) p) + offset) & (alignment - 1));
-}
-
-#define MAX_SIZE (1 << sizeof(unsigned char))
-#define NP 1000
-#define NTST 100000U
-
-#define ERRMSG fprintf(stderr, "Iteration %u, align = %u, offset = %u, size = %u (oldsize = %u), errno = %d (%s)\n", i, align[j % NELEM(align)], offset[j % NELEM(offset)], size[j], oldsize, errno, strerror(errno))
-
-int
-main (void)
-{
- unsigned char *p[NP];
- size_t size[NP];
- size_t align[] = { 2, 4, 8, 16, 32, 64 };
- size_t offset[20];
- unsigned i;
-
- srand (time (NULL));
-
- for (i = 0; i < NELEM (p); ++i)
- {
- p[i] = 0;
- size[i] = 0;
- }
-
- for (i = 0; i < NELEM (offset); ++i)
- offset[i] = rand () % 512;
-
- for (i = 0; i < NTST; ++i)
- {
- size_t oldsize;
- unsigned j, k;
- j = rand () % NELEM (p);
- oldsize = size[j];
- p[j] = __mingw_aligned_offset_realloc (p[j],
- size[j] = rand () % MAX_SIZE,
- align[j % NELEM (align)],
- offset[j % NELEM (offset)]);
-
- if (size[j] && !p[j])
- {
- fprintf (stderr, "Returned NULL!\n");
- ERRMSG;
- return EXIT_FAILURE;
- }
- if (size[j] && !is_aligned (p[j],
- align[j % NELEM (align)],
- offset[j % NELEM (offset)]))
- {
- fprintf (stderr, "Misaligned block!\n");
- ERRMSG;
- return EXIT_FAILURE;
- }
- if (oldsize > size[j])
- oldsize = size[j];
- for (k = 0; k < oldsize; ++k)
- if (p[j][k] != k)
- {
- fprintf (stderr, "Miscopied block!\n");
- ERRMSG;
- return EXIT_FAILURE;
- }
- for (k = 0; k < size[j]; ++k)
- p[j][k] = k;
- }
-
- for (i = 0; i < NELEM (p); ++i)
- __mingw_aligned_free (p[i]);
-
- return EXIT_SUCCESS;
-}
diff --git a/winsup/mingw/mingwex/twalk.c b/winsup/mingw/mingwex/twalk.c
deleted file mode 100755
index aa7909c..0000000
--- a/winsup/mingw/mingwex/twalk.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* $NetBSD: twalk.c,v 1.2 1999/09/16 11:45:37 lukem Exp $ */
-
-/*
- * Tree search generalized from Knuth (6.2.2) Algorithm T just like
- * the AT&T man page says.
- *
- * The node_t structure is for internal use only, lint doesn't grok it.
- *
- * Written by reading the System V Interface Definition, not the code.
- *
- * Totally public domain.
- */
-
-#include <assert.h>
-#define _SEARCH_PRIVATE
-#include <search.h>
-#include <stdlib.h>
-
-static void trecurse (const node_t *, void (*action)(const void *, VISIT, int),
- int level) __MINGW_ATTRIB_NONNULL (1)
- __MINGW_ATTRIB_NONNULL (2);
-/* Walk the nodes of a tree */
-static void
-trecurse( const node_t *root, /* Root of the tree to be walked */
- void (*action)(const void *, VISIT, int),
- int level)
-{
- if (root->llink == NULL && root->rlink == NULL)
- (*action)(root, leaf, level);
- else {
- (*action)(root, preorder, level);
- if (root->llink != NULL)
- trecurse(root->llink, action, level + 1);
- (*action)(root, postorder, level);
- if (root->rlink != NULL)
- trecurse(root->rlink, action, level + 1);
- (*action)(root, endorder, level);
- }
-}
-
-/* Walk the nodes of a tree */
-void
-twalk( const void *vroot, /* Root of the tree to be walked */
- void (*action) (const void *, VISIT, int))
-{
- if (vroot != NULL && action != NULL)
- trecurse(vroot, action, 0);
-}
diff --git a/winsup/mingw/mingwex/ulltoa.c b/winsup/mingw/mingwex/ulltoa.c
deleted file mode 100644
index 8e90de7..0000000
--- a/winsup/mingw/mingwex/ulltoa.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <stdlib.h>
-char* ulltoa(unsigned long long _n, char * _c, int _i)
- { return _ui64toa (_n, _c, _i); }
diff --git a/winsup/mingw/mingwex/ulltow.c b/winsup/mingw/mingwex/ulltow.c
deleted file mode 100644
index 8e4f228..0000000
--- a/winsup/mingw/mingwex/ulltow.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <stdlib.h>
-wchar_t* ulltow(unsigned long long _n, wchar_t * _w, int _i)
- { return _ui64tow (_n, _w, _i); }
diff --git a/winsup/mingw/mingwex/usleep.c b/winsup/mingw/mingwex/usleep.c
deleted file mode 100755
index b322a77..0000000
--- a/winsup/mingw/mingwex/usleep.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * usleep
- * Implementation according to:
- * The Open Group Base Specifications Issue 6
- * IEEE Std 1003.1, 2004 Edition
- */
-
-/*
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Contributed by:
- * Ramiro Polla <ramiro@lisha.ufsc.br>
- */
-
-#include <sys/types.h>
-#include <errno.h>
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
-int __cdecl usleep(useconds_t useconds)
-{
- if(useconds == 0)
- return 0;
-
- if(useconds >= 1000000)
- return EINVAL;
-
- Sleep(useconds / 1000);
-
- return 0;
-}
diff --git a/winsup/mingw/mingwex/wcrtomb.c b/winsup/mingw/mingwex/wcrtomb.c
deleted file mode 100755
index 61ae6d6..0000000
--- a/winsup/mingw/mingwex/wcrtomb.c
+++ /dev/null
@@ -1,94 +0,0 @@
-#include "mb_wc_common.h"
-#include <wchar.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <limits.h>
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
-
-static int __MINGW_ATTRIB_NONNULL(1)
- __wcrtomb_cp (char *dst, wchar_t wc, const unsigned int cp,
- const unsigned int mb_max)
-{
- if (cp == 0)
- {
- if (wc > 255)
- {
- errno = EILSEQ;
- return -1;
- }
- *dst = (char) wc;
- return 1;
- }
- else
- {
- int invalid_char = 0;
-
- int size = WideCharToMultiByte (cp, 0 /* Is this correct flag? */,
- &wc, 1, dst, mb_max,
- NULL, &invalid_char);
- if (size == 0 || invalid_char)
- {
- errno = EILSEQ;
- return -1;
- }
- return size;
- }
-}
-
-size_t
-wcrtomb (char *dst, wchar_t wc, mbstate_t * __UNUSED_PARAM (ps))
-{
- char byte_bucket [MB_LEN_MAX];
- char* tmp_dst = dst ? dst : byte_bucket;
- return (size_t)__wcrtomb_cp (tmp_dst, wc, get_codepage (),
- MB_CUR_MAX);
-}
-
-size_t wcsrtombs (char *dst, const wchar_t **src, size_t len,
- mbstate_t * __UNUSED_PARAM (ps))
-{
- int ret = 0;
- size_t n = 0;
- const unsigned int cp = get_codepage();
- const unsigned int mb_max = MB_CUR_MAX;
- const wchar_t *pwc = *src;
-
- if (src == NULL || *src == NULL) /* undefined behavior */
- return 0;
-
- if (dst != NULL)
- {
- while (n < len)
- {
- if ((ret = __wcrtomb_cp (dst, *pwc, cp, mb_max)) <= 0)
- return (size_t) -1;
- n += ret;
- dst += ret;
- if (*(dst - 1) == '\0')
- {
- *src = (wchar_t*) NULL;;
- return (n - 1);
- }
- pwc++;
- }
- *src = pwc;
- }
- else
- {
- char byte_bucket [MB_LEN_MAX];
- while (n < len)
- {
- if ((ret = __wcrtomb_cp (byte_bucket, *pwc, cp, mb_max))
- <= 0)
- return (size_t) -1;
- n += ret;
- if (byte_bucket [ret - 1] == '\0')
- return (n - 1);
- pwc++;
- }
- }
-
- return n;
-}
diff --git a/winsup/mingw/mingwex/wcstof.c b/winsup/mingw/mingwex/wcstof.c
deleted file mode 100644
index c08e7f1..0000000
--- a/winsup/mingw/mingwex/wcstof.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Wide char wrapper for strtof
- * Revision history:
- * 25 Aug 2006 Initial version.
- *
- * Contributor: Danny Smith <dannysmith@users.sourceforege.net>
- */
-
- /* This routine has been placed in the public domain.*/
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <locale.h>
-#include <wchar.h>
-#include <stdlib.h>
-#include <string.h>
-#include <mbstring.h>
-
-#include "mb_wc_common.h"
-
-float wcstof (const wchar_t * __restrict__ wcs, wchar_t ** __restrict__ wcse)
-{
- char * cs;
- char * cse;
- unsigned int i;
- float ret;
- const unsigned int cp = get_codepage ();
-
- /* Allocate enough room for (possibly) mb chars */
- cs = (char *) malloc ((wcslen(wcs)+1) * MB_CUR_MAX);
-
- if (cp == 0) /* C locale */
- {
- for (i = 0; (wcs[i] != 0) && wcs[i] <= 255; i++)
- cs[i] = (char) wcs[i];
- cs[i] = '\0';
- }
- else
- {
- int nbytes = -1;
- int mb_len = 0;
- /* loop through till we hit null or invalid character */
- for (i = 0; (wcs[i] != 0) && (nbytes != 0); i++)
- {
- nbytes = WideCharToMultiByte(cp, WC_COMPOSITECHECK | WC_SEPCHARS,
- wcs + i, 1, cs + mb_len, MB_CUR_MAX,
- NULL, NULL);
- mb_len += nbytes;
- }
- cs[mb_len] = '\0';
- }
-
- ret = strtof (cs, &cse);
-
- if (wcse)
- {
- /* Make sure temp mbstring cs has 0 at cse. */
- *cse = '\0';
- i = _mbslen ((unsigned char*) cs); /* Number of chars, not bytes */
- *wcse = (wchar_t *) wcs + i;
- }
- free (cs);
-
- return ret;
-}
diff --git a/winsup/mingw/mingwex/wcstoimax.c b/winsup/mingw/mingwex/wcstoimax.c
deleted file mode 100644
index 99bacf4..0000000
--- a/winsup/mingw/mingwex/wcstoimax.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- This source code was extracted from the Q8 package created and
- placed in the PUBLIC DOMAIN by Doug Gwyn <gwyn@arl.mil>
-
- last edit: 1999/11/05 gwyn@arl.mil
-
- Implements subclause 7.8.2 of ISO/IEC 9899:1999 (E).
-
- This particular implementation requires the matching <inttypes.h>.
- It also assumes that character codes for A..Z and a..z are in
- contiguous ascending order; this is true for ASCII but not EBCDIC.
-*/
-
-#include <wchar.h>
-#include <errno.h>
-#include <ctype.h>
-#include <inttypes.h>
-
-/* convert digit wide character to number, in any base */
-
-#define ToWNumber(c) (iswdigit(c) ? (c) - L'0' : \
- iswupper(c) ? (c) - L'A' + 10 : \
- iswlower(c) ? (c) - L'a' + 10 : \
- -1 /* "invalid" flag */ \
- )
-
-/* validate converted digit character for specific base */
-#define valid(n, b) ((n) >= 0 && (n) < (b))
-
-intmax_t
-wcstoimax(nptr, endptr, base)
- register const wchar_t * __restrict__ nptr;
- wchar_t ** __restrict__ endptr;
- register int base;
- {
- register uintmax_t accum; /* accumulates converted value */
- register int n; /* numeral from digit character */
- int minus; /* set iff minus sign seen */
- int toobig; /* set iff value overflows */
-
- if ( endptr != NULL )
- *endptr = (wchar_t *)nptr; /* in case no conv performed */
-
- if ( base < 0 || base == 1 || base > 36 )
- {
- errno = EDOM;
- return 0; /* unspecified behavior */
- }
-
- /* skip initial, possibly empty sequence of white-space w.characters */
-
- while ( iswspace(*nptr) )
- ++nptr;
-
- /* process subject sequence: */
-
- /* optional sign */
-
- if ( (minus = *nptr == L'-') || *nptr == L'+' )
- ++nptr;
-
- if ( base == 0 )
- {
- if ( *nptr == L'0' )
- {
- if ( nptr[1] == L'X' || nptr[1] == L'x' )
- base = 16;
- else
- base = 8;
- }
- else
- base = 10;
- }
- /* optional "0x" or "0X" for base 16 */
-
- if ( base == 16 && *nptr == L'0'
- && (nptr[1] == L'X' || nptr[1] == L'x')
- )
- nptr += 2; /* skip past this prefix */
-
- /* check whether there is at least one valid digit */
-
- n = ToWNumber(*nptr);
- ++nptr;
-
- if ( !valid(n, base) )
- return 0; /* subject seq. not of expected form */
-
- accum = n;
-
- for ( toobig = 0; n = ToWNumber(*nptr), valid(n, base); ++nptr )
- if ( accum > (uintmax_t)(INTMAX_MAX / base + 2) ) /* major wrap-around */
- toobig = 1; /* but keep scanning */
- else
- accum = base * accum + n;
-
- if ( endptr != NULL )
- *endptr = (wchar_t *)nptr; /* -> first not-valid-digit */
-
- if ( minus )
- {
- if ( accum > (uintmax_t)INTMAX_MAX + 1 )
- toobig = 1;
- }
- else
- if ( accum > (uintmax_t)INTMAX_MAX )
- toobig = 1;
-
- if ( toobig )
- {
- errno = ERANGE;
- return minus ? INTMAX_MIN : INTMAX_MAX;
- }
- else
- return (intmax_t)(minus ? -accum : accum);
- }
-
-long long __attribute__ ((alias ("wcstoimax")))
-wcstoll (const wchar_t* __restrict__ nptr, wchar_t ** __restrict__ endptr, int base);
diff --git a/winsup/mingw/mingwex/wcstold.c b/winsup/mingw/mingwex/wcstold.c
deleted file mode 100644
index b2fdd74..0000000
--- a/winsup/mingw/mingwex/wcstold.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Wide char wrapper for strtold
- * Revision history:
- * 6 Nov 2002 Initial version.
- * 25 Aug 2006 Don't use strtold internal functions.
- *
- * Contributor: Danny Smith <dannysmith@users.sourceforege.net>
- */
-
- /* This routine has been placed in the public domain.*/
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <locale.h>
-#include <wchar.h>
-#include <stdlib.h>
-#include <string.h>
-#include <mbstring.h>
-
-#include "mb_wc_common.h"
-
-long double wcstold (const wchar_t * __restrict__ wcs, wchar_t ** __restrict__ wcse)
-{
- char * cs;
- char * cse;
- unsigned int i;
- long double ret;
- const unsigned int cp = get_codepage ();
-
- /* Allocate enough room for (possibly) mb chars */
- cs = (char *) malloc ((wcslen(wcs)+1) * MB_CUR_MAX);
-
- if (cp == 0) /* C locale */
- {
- for (i = 0; (wcs[i] != 0) && wcs[i] <= 255; i++)
- cs[i] = (char) wcs[i];
- cs[i] = '\0';
- }
- else
- {
- int nbytes = -1;
- int mb_len = 0;
- /* loop through till we hit null or invalid character */
- for (i = 0; (wcs[i] != 0) && (nbytes != 0); i++)
- {
- nbytes = WideCharToMultiByte(cp, WC_COMPOSITECHECK | WC_SEPCHARS,
- wcs + i, 1, cs + mb_len, MB_CUR_MAX,
- NULL, NULL);
- mb_len += nbytes;
- }
- cs[mb_len] = '\0';
- }
-
- ret = strtold (cs, &cse);
-
- if (wcse)
- {
- /* Make sure temp mbstring has 0 at cse. */
- *cse = '\0';
- i = _mbslen ((unsigned char*) cs); /* Number of chars, not bytes */
- *wcse = (wchar_t *) wcs + i;
- }
- free (cs);
-
- return ret;
-}
diff --git a/winsup/mingw/mingwex/wcstoumax.c b/winsup/mingw/mingwex/wcstoumax.c
deleted file mode 100644
index 9bd6cd7..0000000
--- a/winsup/mingw/mingwex/wcstoumax.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- This source code was extracted from the Q8 package created and
- placed in the PUBLIC DOMAIN by Doug Gwyn <gwyn@arl.mil>
-
- last edit: 1999/11/05 gwyn@arl.mil
-
- Implements subclause 7.8.2 of ISO/IEC 9899:1999 (E).
-
- This particular implementation requires the matching <inttypes.h>.
- It also assumes that character codes for A..Z and a..z are in
- contiguous ascending order; this is true for ASCII but not EBCDIC.
-*/
-
-#include <wchar.h>
-#include <errno.h>
-#include <ctype.h>
-#include <inttypes.h>
-
-/* convert digit wide character to number, in any base */
-
-#define ToWNumber(c) (iswdigit(c) ? (c) - L'0' : \
- iswupper(c) ? (c) - L'A' + 10 : \
- iswlower(c) ? (c) - L'a' + 10 : \
- -1 /* "invalid" flag */ \
- )
-
-/* validate converted digit character for specific base */
-#define valid(n, b) ((n) >= 0 && (n) < (b))
-
-uintmax_t
-wcstoumax(nptr, endptr, base)
- register const wchar_t * __restrict__ nptr;
- wchar_t ** __restrict__ endptr;
- register int base;
- {
- register uintmax_t accum; /* accumulates converted value */
- register uintmax_t next; /* for computing next value of accum */
- register int n; /* numeral from digit character */
- int minus; /* set iff minus sign seen (yes!) */
- int toobig; /* set iff value overflows */
-
- if ( endptr != NULL )
- *endptr = (wchar_t *)nptr; /* in case no conv performed */
-
- if ( base < 0 || base == 1 || base > 36 )
- {
- errno = EDOM;
- return 0; /* unspecified behavior */
- }
-
- /* skip initial, possibly empty sequence of white-space w.characters */
-
- while ( iswspace(*nptr) )
- ++nptr;
-
- /* process subject sequence: */
-
- /* optional sign */
-
- if ( (minus = *nptr == L'-') || *nptr == L'+' )
- ++nptr;
-
- if ( base == 0 )
- {
- if ( *nptr == L'0' )
- {
- if ( nptr[1] == L'X' || nptr[1] == L'x' )
- base = 16;
- else
- base = 8;
- }
- else
- base = 10;
- }
- /* optional "0x" or "0X" for base 16 */
-
- if ( base == 16 && *nptr == L'0'
- && (nptr[1] == L'X' || nptr[1] == L'x')
- )
- nptr += 2; /* skip past this prefix */
-
- /* check whether there is at least one valid digit */
-
- n = ToWNumber(*nptr);
- ++nptr;
-
- if ( !valid(n, base) )
- return 0; /* subject seq. not of expected form */
-
- accum = n;
-
- for ( toobig = 0; n = ToWNumber(*nptr), valid(n, base); ++nptr )
- if ( accum > UINTMAX_MAX / base + 1 /* major wrap-around */
- || (next = base * accum + n) < accum /* minor wrap-around */
- )
- toobig = 1; /* but keep scanning */
- else
- accum = next;
-
- if ( endptr != NULL )
- *endptr = (wchar_t *)nptr; /* -> first not-valid-digit */
-
- if ( toobig )
- {
- errno = ERANGE;
- return UINTMAX_MAX;
- }
- else
- return minus ? -accum : accum; /* (yes!) */
- }
-
-unsigned long long __attribute__ ((alias ("wcstoumax")))
-wcstoull (const wchar_t* __restrict__ nptr, wchar_t ** __restrict__ endptr, int base);
diff --git a/winsup/mingw/mingwex/wctob.c b/winsup/mingw/mingwex/wctob.c
deleted file mode 100755
index 01a57bf..0000000
--- a/winsup/mingw/mingwex/wctob.c
+++ /dev/null
@@ -1,21 +0,0 @@
-#include "mb_wc_common.h"
-#include <wchar.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
-/* Return just the first byte after translating to multibyte. */
-int wctob (wint_t wc )
-{
- wchar_t w = wc;
- char c;
- int invalid_char = 0;
- if (!WideCharToMultiByte (get_codepage(),
- 0 /* Is this correct flag? */,
- &w, 1, &c, 1, NULL, &invalid_char)
- || invalid_char)
- return EOF;
- return (int) c;
-}
diff --git a/winsup/mingw/mingwex/wctrans.c b/winsup/mingw/mingwex/wctrans.c
deleted file mode 100755
index e129af4..0000000
--- a/winsup/mingw/mingwex/wctrans.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- wctrans.c
- 7.25.3.2 Extensible wide-character case mapping functions
-
- Contributed by: Danny Smith <dannysmith@usesr.sourcefoge.net>
- 2005-02-24
-
- This source code is placed in the PUBLIC DOMAIN. It is modified
- from the Q8 package created by Doug Gwyn <gwyn@arl.mil>
-
- */
-
-#include <string.h>
-#include <wctype.h>
-
-/*
- This differs from the MS implementation of wctrans which
- returns 0 for tolower and 1 for toupper. According to
- C99, a 0 return value indicates invalid input.
-
- These two function go in the same translation unit so that we
- can ensure that
- towctrans(wc, wctrans("tolower")) == towlower(wc)
- towctrans(wc, wctrans("toupper")) == towupper(wc)
- It also ensures that
- towctrans(wc, wctrans("")) == wc
- which is not required by standard.
-*/
-
-static const struct {
- const char *name;
- wctrans_t val; } tmap[] = {
- {"tolower", _LOWER},
- {"toupper", _UPPER}
- };
-
-#define NTMAP (sizeof tmap / sizeof tmap[0])
-
-wctrans_t
-wctrans (const char* property)
-{
- int i;
- for ( i = 0; i < NTMAP; ++i )
- if (strcmp (property, tmap[i].name) == 0)
- return tmap[i].val;
- return 0;
-}
-
-wint_t towctrans (wint_t wc, wctrans_t desc)
-{
- switch (desc)
- {
- case _LOWER:
- return towlower (wc);
- case _UPPER:
- return towupper (wc);
- default:
- return wc;
- }
-}
diff --git a/winsup/mingw/mingwex/wctype.c b/winsup/mingw/mingwex/wctype.c
deleted file mode 100755
index 197fde5..0000000
--- a/winsup/mingw/mingwex/wctype.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- wctype.c
- 7.25.2.2.2 The wctype function
-
- Contributed by: Danny Smith <dannysmith@usesr.sourcefoge.net>
- 2005-02-24
-
- This source code is placed in the PUBLIC DOMAIN. It is modified
- from the Q8 package created by Doug Gwyn <gwyn@arl.mil>
-
- The wctype function constructs a value with type wctype_t that
- describes a class of wide characters identified by the string
- argument property.
-
- In particular, we map the property strings so that:
-
- iswctype(wc, wctype("alnum")) == iswalnum(wc)
- iswctype(wc, wctype("alpha")) == iswalpha(wc)
- iswctype(wc, wctype("cntrl")) == iswcntrl(wc)
- iswctype(wc, wctype("digit")) == iswdigit(wc)
- iswctype(wc, wctype("graph")) == iswgraph(wc)
- iswctype(wc, wctype("lower")) == iswlower(wc)
- iswctype(wc, wctype("print")) == iswprint(wc)
- iswctype(wc, wctype("punct")) == iswpunct(wc)
- iswctype(wc, wctype("space")) == iswspace(wc)
- iswctype(wc, wctype("upper")) == iswupper(wc)
- iswctype(wc, wctype("xdigit")) == iswxdigit(wc)
-
-*/
-
-#include <string.h>
-#include <wctype.h>
-
-/* Using the bit-OR'd ctype character classification flags as return
- values achieves compatibility with MS iswctype(). */
-static const struct {
- const char *name;
- wctype_t flags;} cmap[] = {
- {"alnum", _ALPHA|_DIGIT},
- {"alpha", _ALPHA},
- {"cntrl", _CONTROL},
- {"digit", _DIGIT},
- {"graph", _PUNCT|_ALPHA|_DIGIT},
- {"lower", _LOWER},
- {"print", _BLANK|_PUNCT|_ALPHA|_DIGIT},
- {"punct", _PUNCT},
- {"space", _SPACE},
- {"upper", _UPPER},
- {"xdigit", _HEX}
- };
-
-#define NCMAP (sizeof cmap / sizeof cmap[0])
-wctype_t wctype (const char *property)
-{
- int i;
- for (i = 0; i < NCMAP; ++i)
- if (strcmp (property, cmap[i].name) == 0)
- return cmap[i].flags;
- return 0;
-}
diff --git a/winsup/mingw/mingwex/wdirent.c b/winsup/mingw/mingwex/wdirent.c
deleted file mode 100644
index 6dcf42b..0000000
--- a/winsup/mingw/mingwex/wdirent.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#define _UNICODE 1
-#define UNICODE 1
-
-#include <wchar.h>
-#include "dirent.c"
diff --git a/winsup/mingw/mingwex/wmemchr.c b/winsup/mingw/mingwex/wmemchr.c
deleted file mode 100644
index dc5cedd..0000000
--- a/winsup/mingw/mingwex/wmemchr.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* This source code was extracted from the Q8 package created and placed
- in the PUBLIC DOMAIN by Doug Gwyn <gwyn@arl.mil>
- last edit: 1999/11/05 gwyn@arl.mil
-
- Implements subclause 7.24 of ISO/IEC 9899:1999 (E).
-
- It supports an encoding where all char codes are mapped
- to the *same* code values within a wchar_t or wint_t,
- so long as no other wchar_t codes are used by the program.
-
-*/
-
-#include <wchar.h>
-
-wchar_t*
-wmemchr(s, c, n)
- register const wchar_t *s;
- register wchar_t c;
- register size_t n;
- {
- if ( s != NULL )
- for ( ; n > 0; ++s, --n )
- if ( *s == c )
- return (wchar_t *)s;
-
- return NULL;
- }
-
diff --git a/winsup/mingw/mingwex/wmemcmp.c b/winsup/mingw/mingwex/wmemcmp.c
deleted file mode 100644
index e1e034c..0000000
--- a/winsup/mingw/mingwex/wmemcmp.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* This source code was extracted from the Q8 package created and placed
- in the PUBLIC DOMAIN by Doug Gwyn <gwyn@arl.mil>
- last edit: 1999/11/05 gwyn@arl.mil
-
- Implements subclause 7.24 of ISO/IEC 9899:1999 (E).
-
- It supports an encoding where all char codes are mapped
- to the *same* code values within a wchar_t or wint_t,
- so long as no other wchar_t codes are used by the program.
-
-*/
-
-#include <wchar.h>
-
-int
-wmemcmp(s1, s2, n)
- register const wchar_t *s1;
- register const wchar_t *s2;
- size_t n;
- {
- if ( n == 0 || s1 == s2 )
- return 0; /* even for NULL pointers */
-
- if ( (s1 != NULL) != (s2 != NULL) )
- return s2 == NULL ? 1 : -1; /* robust */
-
- for ( ; n > 0; ++s1, ++s2, --n )
- if ( *s1 != *s2 )
- return *s1 - *s2;
-
- return 0;
- }
diff --git a/winsup/mingw/mingwex/wmemcpy.c b/winsup/mingw/mingwex/wmemcpy.c
deleted file mode 100644
index d7e7b4c..0000000
--- a/winsup/mingw/mingwex/wmemcpy.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* This source code was extracted from the Q8 package created and placed
- in the PUBLIC DOMAIN by Doug Gwyn <gwyn@arl.mil>
- last edit: 1999/11/05 gwyn@arl.mil
-
- Implements subclause 7.24 of ISO/IEC 9899:1999 (E).
-
- It supports an encoding where all char codes are mapped
- to the *same* code values within a wchar_t or wint_t,
- so long as no other wchar_t codes are used by the program.
-
-*/
-
-#include <wchar.h>
-
-
-wchar_t *
-wmemcpy(s1, s2, n)
- register wchar_t * __restrict__ s1;
- register const wchar_t * __restrict__ s2;
- register size_t n;
- {
- wchar_t *orig_s1 = s1;
-
- if ( s1 == NULL || s2 == NULL || n == 0 )
- return orig_s1; /* robust */
-
- for ( ; n > 0; --n )
- *s1++ = *s2++;
-
- return orig_s1;
- }
-
diff --git a/winsup/mingw/mingwex/wmemmove.c b/winsup/mingw/mingwex/wmemmove.c
deleted file mode 100644
index 3c545ac..0000000
--- a/winsup/mingw/mingwex/wmemmove.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* This source code was extracted from the Q8 package created and placed
- in the PUBLIC DOMAIN by Doug Gwyn <gwyn@arl.mil>
- last edit: 1999/11/05 gwyn@arl.mil
-
- Implements subclause 7.24 of ISO/IEC 9899:1999 (E).
-
- It supports an encoding where all char codes are mapped
- to the *same* code values within a wchar_t or wint_t,
- so long as no other wchar_t codes are used by the program.
-
-*/
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <wchar.h>
-
-wchar_t *
-wmemmove(s1, s2, n)
- register wchar_t *s1;
- register const wchar_t *s2;
- register size_t n;
- {
- wchar_t *orig_s1 = s1;
-
- if ( s1 == NULL || s2 == NULL || n == 0 )
- return orig_s1; /* robust */
-
- /* XXX -- The following test works only within a flat address space! */
- if ( s2 >= s1 )
- for ( ; n > 0; --n )
- *s1++ = *s2++;
- else {
- s1 += n;
- s2 += n;
-
- for ( ; n > 0; --n )
- *--s1 = *--s2;
- }
-
- return orig_s1;
- }
-
diff --git a/winsup/mingw/mingwex/wmemset.c b/winsup/mingw/mingwex/wmemset.c
deleted file mode 100644
index dadd9fb..0000000
--- a/winsup/mingw/mingwex/wmemset.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* This source code was extracted from the Q8 package created and placed
- in the PUBLIC DOMAIN by Doug Gwyn <gwyn@arl.mil>
- last edit: 1999/11/05 gwyn@arl.mil
-
- Implements subclause 7.24 of ISO/IEC 9899:1999 (E).
-
- It supports an encoding where all char codes are mapped
- to the *same* code values within a wchar_t or wint_t,
- so long as no other wchar_t codes are used by the program.
-
-*/
-
-#include <wchar.h>
-
-
-wchar_t *
-wmemset(s, c, n)
- register wchar_t *s;
- register wchar_t c;
- register size_t n;
- {
- wchar_t *orig_s = s;
-
- if ( s != NULL )
- for ( ; n > 0; --n )
- *s++ = c;
-
- return orig_s;
- }
-
diff --git a/winsup/mingw/mingwex/wtoll.c b/winsup/mingw/mingwex/wtoll.c
deleted file mode 100644
index 0bff278..0000000
--- a/winsup/mingw/mingwex/wtoll.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <stdlib.h>
-long long wtoll(const wchar_t * _w)
- { return _wtoi64 (_w); }
diff --git a/winsup/mingw/mkinstalldirs b/winsup/mingw/mkinstalldirs
deleted file mode 100755
index cc8783e..0000000
--- a/winsup/mingw/mkinstalldirs
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman@prep.ai.mit.edu>
-# Created: 1993-05-16
-# Last modified: 1994-03-25
-# Public domain
-
-errstatus=0
-
-for file in ${1+"$@"} ; do
- set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
- shift
-
- pathcomp=
- for d in ${1+"$@"} ; do
- pathcomp="$pathcomp$d"
- case "$pathcomp" in
- -* ) pathcomp=./$pathcomp ;;
- esac
-
- if test ! -d "$pathcomp"; then
- echo "mkdir $pathcomp" 1>&2
- mkdir "$pathcomp" > /dev/null 2>&1 || lasterr=$?
- fi
-
- if test ! -d "$pathcomp"; then
- errstatus=$lasterr
- fi
-
- pathcomp="$pathcomp/"
- done
-done
-
-exit $errstatus
-
-# mkinstalldirs ends here
diff --git a/winsup/mingw/moldname.def.in b/winsup/mingw/moldname.def.in
deleted file mode 100644
index b8bae6b..0000000
--- a/winsup/mingw/moldname.def.in
+++ /dev/null
@@ -1,154 +0,0 @@
-;
-; __FILENAME__
-;
-; Exports from the runtime except that these exports are actually preceeded
-; by a underscore in the actual DLL. These correspond to functions which
-; are non-ANSI and were prefixed with an underscore to avoid name space
-; clutter. However many, in fact most programs still use a few of these
-; functions without the underscore. This .def file is specially processed
-; to make those non-underscored name function calls call the equivalent
-; underscored functions.
-;
-; Contributors:
-; Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
-; Maintained by Mumit Khan <khan@xraylith.wisc.edu>
-;
-; THIS SOFTWARE IS NOT COPYRIGHTED
-;
-; This source code is offered for use in the public domain. You may
-; use, modify or distribute it freely.
-;
-; This code is distributed in the hope that it will be useful but
-; WITHOUT ANY WARRANTY. ALL WARRENTIES, EXPRESS OR IMPLIED ARE HEREBY
-; DISCLAMED. This includes but is not limited to warrenties of
-; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-;
-EXPORTS
-access
-chdir
-chmod
-chsize
-close
-creat
-cwait
-#if !(__CRTDLL__)
-daylight DATA
-#endif
-dup
-dup2
-ecvt
-eof
-execl
-execle
-execlp
-execlpe
-execv
-execve
-execvp
-execvpe
-fcvt
-fdopen
-fgetchar
-fgetwchar
-filelength
-fileno
-; Alias fpreset is set in CRT_fp10,c and CRT_fp8.c.
-; fpreset
-fputchar
-fputwchar
-fstat
-ftime
-gcvt
-getch
-getche
-getcwd
-getpid
-getw
-heapwalk
-isatty
-itoa
-kbhit
-lfind
-lsearch
-lseek
-ltoa
-memccpy
-memicmp
-mkdir
-mktemp
-open
-pclose
-popen
-putch
-putenv
-putw
-read
-rmdir
-rmtmp
-searchenv
-setmode
-sopen
-spawnl
-spawnle
-spawnlp
-spawnlpe
-spawnv
-spawnve
-spawnvp
-spawnvpe
-stat
-strcmpi
-strdup
-stricmp
-stricoll
-strlwr
-strnicmp
-strnset
-strrev
-strset
-strupr
-swab
-tell
-tempnam
-#if !(__CRTDLL__)
-timezone DATA
-#endif
-; export tzname for both. See <time.h>
-tzname DATA
-tzset
-umask
-ungetch
-unlink
-utime
-wcsdup
-wcsicmp
-wcsicoll
-wcslwr
-wcsnicmp
-wcsnset
-wcsrev
-wcsset
-wcsupr
-#if !(__CRTDLL__)
-wpopen
-#endif
-write
-; non-ANSI functions declared in math.h
-j0
-j1
-jn
-y0
-y1
-yn
-chgsign
-; omit scalb...
-; it would conflict with the GCC built-in, which exhibits
-; semantics differing from the MSVCRT implementation.
-;scalb
-finite
-fpclass
-; C99 functions
-cabs
-hypot
-logb
-nextafter
diff --git a/winsup/mingw/msvcrt.def.in b/winsup/mingw/msvcrt.def.in
deleted file mode 100644
index d9ce11e..0000000
--- a/winsup/mingw/msvcrt.def.in
+++ /dev/null
@@ -1,826 +0,0 @@
-;
-; __FILENAME__
-; created from msvcrt.def.in
-;* This file has no copyright assigned and is placed in the Public Domain.
-;* This file is a part of the mingw-runtime package.
-;* No warranty is given; refer to the file DISCLAIMER within the package.
-;
-; Exports from msvcrt.dll, msvcr70.dll, msvcr71.dll, msvcr80.dll and msvcr90.dll
-;
-; NOTE: All exports, except for what appeared to be C++ mangled names,
-; are included. Not all functions have prototypes in the headers
-; (and some are not functions at all).
-;
-EXPORTS
-_CIacos
-_CIasin
-_CIatan
-_CIatan2
-_CIcos
-_CIcosh
-_CIexp
-_CIfmod
-_CIlog
-_CIlog10
-_CIpow
-_CIsin
-_CIsinh
-_CIsqrt
-_CItan
-_CItanh
-_CxxThrowException
-_EH_prolog
-_Getdays
-_Getmonths
-_Gettnames
-_HUGE DATA
-_Strftime
-_XcptFilter
-__CxxFrameHandler
-__CxxLongjmpUnwind
-__RTCastToVoid
-__RTDynamicCast
-__RTtypeid
-__STRINGTOLD
-__argc DATA
-__argv DATA
-__badioinfo DATA
-__crtCompareStringA
-__crtGetLocaleInfoW
-__crtLCMapStringA
-__dllonexit
-__doserrno
-__fpecode
-__getmainargs
-__initenv DATA
-__isascii
-__iscsym
-__iscsymf
-__lc_codepage DATA
-__lc_handle DATA
-__lconv_init
-__mb_cur_max DATA
-__p___argc
-__p___argv
-__p___initenv
-__p___mb_cur_max
-__p___wargv
-__p___winitenv
-__p__acmdln
-__p__amblksiz
-__p__commode
-__p__daylight
-__p__dstbias
-__p__environ
-__p__fileinfo
-__p__fmode
-__p__iob
-__p__mbctype
-__p__osver
-__p__pctype
-__p__pgmptr
-__p__pwctype
-__p__timezone
-__p__tzname
-__p__wcmdln
-__p__wenviron
-__p__winmajor
-__p__winminor
-__p__winver
-__p__wpgmptr
-__pioinfo DATA
-__pxcptinfoptrs
-__set_app_type
-__setlc_active DATA
-__setusermatherr
-__threadhandle
-__threadid
-__toascii
-__unDName
-__unguarded_readlc_active DATA
-__wargv DATA
-__wgetmainargs
-__winitenv DATA
-_abnormal_termination
-_access
-_acmdln DATA
-_adj_fdiv_m16i
-_adj_fdiv_m32
-_adj_fdiv_m32i
-_adj_fdiv_m64
-_adj_fdiv_r
-_adj_fdivr_m16i
-_adj_fdivr_m32
-_adj_fdivr_m32i
-_adj_fdivr_m64
-_adj_fpatan
-_adj_fprem
-_adj_fprem1
-_adj_fptan
-_adjust_fdiv DATA
-_aexit_rtn DATA
-_amsg_exit
-_assert
-_atodbl
-_atoi64
-_atoldbl
-_beep
-_beginthread
-_beginthreadex
-_c_exit
-_cabs
-_callnewh
-_cexit
-_cgets
-_chdir
-_chdrive
-_chgsign
-_chmod
-_chsize
-_clearfp
-_close
-_commit
-_commode DATA
-_control87
-_controlfp
-_copysign
-_cprintf
-_cputs
-_creat
-_cscanf
-#if !(__msvcr71__ || __msvcr71d__ || __msvcr80__ || __msvcr80d__ || __msvcr90__ || msvcr90d__)
-_ctype DATA
-#endif
-_cwait
-_daylight DATA
-_dstbias DATA
-_dup
-_dup2
-_ecvt
-_endthread
-_endthreadex
-_environ DATA
-_eof
-_errno
-_except_handler2
-_except_handler3
-_execl
-_execle
-_execlp
-_execlpe
-_execv
-_execve
-_execvp
-_execvpe
-_exit
-_expand
-_fcloseall
-_fcvt
-_fdopen
-_fgetchar
-_fgetwchar
-_filbuf
-_fileinfo DATA
-_filelength
-_filelengthi64
-_fileno
-_findclose
-_findfirst
-_findfirsti64
-_findnext
-_findnexti64
-_finite
-_flsbuf
-_flushall
-_fmode DATA
-_fpclass
-_fpieee_flt
-_fpreset DATA
-_fputchar
-_fputwchar
-_fsopen
-_fstat
-_fstati64
-_ftime
-_ftol
-_fullpath
-_futime
-_gcvt
-_get_osfhandle
-_get_sbh_threshold
-_getch
-_getche
-_getcwd
-_getdcwd
-_getdiskfree
-_getdllprocaddr
-_getdrive
-_getdrives
-_getmaxstdio
-_getmbcp
-_getpid
-_getsystime
-_getw
-_getws
-_global_unwind2
-_heapadd
-_heapchk
-_heapmin
-_heapset
-_heapused
-_heapwalk
-_hypot
-_i64toa
-_i64tow
-_initterm
-_inp
-_inpd
-_inpw
-_iob DATA
-_isatty
-_isctype
-_ismbbalnum
-_ismbbalpha
-_ismbbgraph
-_ismbbkalnum
-_ismbbkana
-_ismbbkprint
-_ismbbkpunct
-_ismbblead
-_ismbbprint
-_ismbbpunct
-_ismbbtrail
-_ismbcalnum
-_ismbcalpha
-_ismbcdigit
-_ismbcgraph
-_ismbchira
-_ismbckata
-_ismbcl0
-_ismbcl1
-_ismbcl2
-_ismbclegal
-_ismbclower
-_ismbcprint
-_ismbcpunct
-_ismbcspace
-_ismbcsymbol
-_ismbcupper
-_ismbslead
-_ismbstrail
-_isnan
-_itoa
-_itow
-_j0
-_j1
-_jn
-_kbhit
-_lfind
-_loaddll
-_local_unwind2
-_lock
-_locking
-_logb
-_longjmpex
-_lrotl
-_lrotr
-_lsearch
-_lseek
-_lseeki64
-_ltoa
-_ltow
-_makepath
-_mbbtombc
-_mbbtype
-_mbccpy
-_mbcjistojms
-_mbcjmstojis
-_mbclen
-_mbctohira
-_mbctokata
-_mbctolower
-_mbctombb
-_mbctoupper
-_mbctype DATA
-_mbsbtype
-_mbscat
-_mbschr
-_mbscmp
-_mbscoll
-_mbscpy
-_mbscspn
-_mbsdec
-_mbsdup
-_mbsicmp
-_mbsicoll
-_mbsinc
-_mbslen
-_mbslwr
-_mbsnbcat
-_mbsnbcmp
-_mbsnbcnt
-_mbsnbcoll
-_mbsnbcpy
-_mbsnbicmp
-_mbsnbicoll
-_mbsnbset
-_mbsncat
-_mbsnccnt
-_mbsncmp
-_mbsncoll
-_mbsncpy
-_mbsnextc
-_mbsnicmp
-_mbsnicoll
-_mbsninc
-_mbsnset
-_mbspbrk
-_mbsrchr
-_mbsrev
-_mbsset
-_mbsspn
-_mbsspnp
-_mbsstr
-_mbstok
-_mbstrlen
-_mbsupr
-_memccpy
-_memicmp
-_mkdir
-_mktemp
-_msize
-_nextafter
-_onexit DATA
-_open
-_open_osfhandle
-_osver DATA
-_outp
-_outpd
-_outpw
-_pclose
-_pctype DATA
-_pgmptr DATA
-_pipe
-_popen
-_purecall
-_putch
-_putenv
-_putw
-_putws
-_pwctype DATA
-_read
-_rmdir
-_rmtmp
-_rotl
-_rotr
-_safe_fdiv
-_safe_fdivr
-_safe_fprem
-_safe_fprem1
-_scalb
-_searchenv
-_seh_longjmp_unwind
-_set_error_mode
-_set_sbh_threshold
-_seterrormode
-_setjmp
-_setjmp3
-_setmaxstdio
-_setmbcp
-_setmode
-_setsystime
-_sleep
-_snprintf
-_snwprintf
-_sopen
-_spawnl
-_spawnle
-_spawnlp
-_spawnlpe
-_spawnv
-_spawnve
-_spawnvp
-_spawnvpe
-_splitpath
-_stat
-_stati64
-_statusfp
-_strcmpi
-_strdate
-_strdup
-_strerror
-_stricmp
-_stricoll
-_strlwr
-_strncoll
-_strnicmp
-_strnicoll
-_strnset
-_strrev
-_strset
-_strtime
-_strupr
-_swab
-_sys_errlist DATA
-_sys_nerr DATA
-_tell
-_telli64
-_tempnam
-_timezone DATA
-_tolower
-_toupper
-_tzname DATA
-_tzset
-_ui64toa
-_ui64tow
-_ultoa
-_ultow
-_umask
-_ungetch
-_unlink
-_unloaddll
-_unlock
-_utime
-_vsnprintf
-_vsnwprintf
-_waccess
-_wasctime
-_wchdir
-_wchmod
-_wcmdln DATA
-_wcreat
-_wcsdup
-_wcsicmp
-_wcsicoll
-_wcslwr
-_wcsncoll
-_wcsnicmp
-_wcsnicoll
-_wcsnset
-_wcsrev
-_wcsset
-_wcsupr
-_wctime
-_wenviron DATA
-_wexecl
-_wexecle
-_wexeclp
-_wexeclpe
-_wexecv
-_wexecve
-_wexecvp
-_wexecvpe
-_wfdopen
-_wfindfirst
-_wfindfirsti64
-_wfindnext
-_wfindnexti64
-_wfopen
-_wfreopen
-_wfsopen
-_wfullpath
-_wgetcwd
-_wgetdcwd
-_wgetenv
-_winmajor DATA
-_winminor DATA
-_winver DATA
-_wmakepath
-_wmkdir
-_wmktemp
-_wopen
-_wperror
-_wpgmptr DATA
-_wpopen
-_wputenv
-_wremove
-_wrename
-_write
-_wrmdir
-_wsearchenv
-_wsetlocale
-_wsopen
-_wspawnl
-_wspawnle
-_wspawnlp
-_wspawnlpe
-_wspawnv
-_wspawnve
-_wspawnvp
-_wspawnvpe
-_wsplitpath
-_wstat
-_wstati64
-_wstrdate
-_wstrtime
-_wsystem
-_wtempnam
-_wtmpnam
-_wtoi
-_wtoi64
-_wtol
-_wunlink
-_wutime
-_y0
-_y1
-_yn
-abort
-abs
-acos
-asctime
-asin
-atan
-atan2
-atexit DATA
-atof
-atoi
-atol
-bsearch
-calloc
-ceil
-clearerr
-clock
-cos
-cosh
-ctime
-difftime
-div
-exit
-exp
-fabs
-fclose
-feof
-ferror
-fflush
-fgetc
-fgetpos
-fgets
-fgetwc
-fgetws
-floor
-fmod
-fopen
-fprintf
-fputc
-fputs
-fputwc
-fputws
-fread
-free
-freopen
-frexp
-fscanf
-fseek
-fsetpos
-ftell
-fwprintf
-fwrite
-fwscanf
-getc
-getchar
-getenv
-gets
-getwc
-getwchar
-gmtime
-is_wctype
-isalnum
-isalpha
-iscntrl
-isdigit
-isgraph
-isleadbyte
-islower
-isprint
-ispunct
-isspace
-isupper
-iswalnum
-iswalpha
-iswascii
-iswcntrl
-iswctype
-iswdigit
-iswgraph
-iswlower
-iswprint
-iswpunct
-iswspace
-iswupper
-iswxdigit
-isxdigit
-labs
-ldexp
-ldiv
-localeconv
-localtime
-log
-log10
-longjmp
-malloc
-mblen
-mbstowcs
-mbtowc
-memchr
-memcmp
-memcpy
-memmove
-memset
-mktime
-modf
-perror
-pow
-printf
-putc
-putchar
-puts
-putwc
-putwchar
-qsort
-raise
-rand
-realloc
-remove
-rename
-rewind
-scanf
-setbuf
-setlocale
-setvbuf
-signal
-sin
-sinh
-sprintf
-sqrt
-srand
-sscanf
-strcat
-strchr
-strcmp
-strcoll
-strcpy
-strcspn
-strerror
-strftime
-strlen
-strncat
-strncmp
-strncpy
-strpbrk
-strrchr
-strspn
-strstr
-strtod
-strtok
-strtol
-strtoul
-strxfrm
-swprintf
-swscanf
-system
-tan
-tanh
-time
-tmpfile
-tmpnam
-tolower
-toupper
-towlower
-towupper
-ungetc
-ungetwc
-vfprintf
-vfwprintf
-vprintf
-vsprintf
-vswprintf
-vwprintf
-wcscat
-wcschr
-wcscmp
-wcscoll
-wcscpy
-wcscspn
-wcsftime
-wcslen
-wcsncat
-wcsncmp
-wcsncpy
-wcspbrk
-wcsrchr
-wcsspn
-wcsstr
-wcstod
-wcstok
-wcstol
-wcstombs
-wcstoul
-wcsxfrm
-wctomb
-wprintf
-wscanf
-; msvcrt.dll(version 6.10) and later
-__lc_collate_cp DATA
-__p__mbcasemap
-__unDNameEx
-_chkesp
-_ctime64
-_findfirst64
-_findnext64
-_fstat64
-_ftime64
-_futime64
-_gmtime64
-_localtime64
-_mbcasemap
-_mktime64
-_osplatform DATA
-_stat64
-_time64
-_utime64
-_wctime64
-_wfindfirst64
-_wfindnext64
-_wstat64
-_wutime64
-; msvcrt.dll (file version 7.0.xxxx, as shipped with XP)
-___lc_codepage_func
-___lc_collate_cp_func
-___lc_handle_func
-___mb_cur_max_func
-___setlc_active_func
-___unguarded_readlc_active_add_func
-__crtCompareStringW
-__crtGetStringTypeW
-__crtLCMapStringW
-__pctype_func
-__pwctype_func
-__iob_func
-__uncaught_exception
-__wcserror
-__CxxDetectRethrow
-__CxxExceptionFilter
-__CxxQueryExceptionSize
-__CxxRegisterExceptionObject
-__CxxUnregisterExceptionObject
-__CxxCallUnwindDtor
-__DestructExceptionObject
-_aligned_free
-_aligned_malloc
-_aligned_offset_malloc
-_aligned_offset_realloc
-_aligned_realloc
-_cgetws
-_cputws
-_cwprintf
-_cwscanf
-_getwch
-_getwche
-_putwch
-_resetstkoflw
-_scprintf
-_scwprintf
-_set_SSE2_enable
-_snscanf
-_snwscanf
-_strtoi64
-_strtoui64
-_ungetwch
-_vscprintf
-_vscwprintf
-_wcserror
-_wcstoi64
-_wcstoui64
-_wctype
-_wtof
-_get_heap_handle
-#if ( __msvcr70__ || __msvcr70d__ || __msvcr71__ || __msvcr71d__ || __msvcr80__ || __msvcr80d__ || __msvcr90__ || __msvcr90d__)
-; msvcr70.dll and later
-__buffer_overrun
-__lc_clike
-__security_error_handler
-__set_buffer_overrun_handler
-_CRT_RTC_INIT
-_set_security_error_handler
-#endif /* 7.0 */
-#if (__msvcr71__ || __msvcr71d__ || __msvcr80__ || __msvcr80d__ || __msvcr90__ || __msvcr90d__)
-; msvcr71.dll
-__CppXcptFilter
-__CxxCallUnwindVecDtor
-_set_purecall_handler
-#endif /* 7.1 */
-#if ( __msvcr80__ || __msvcr80d__ || __msvcr90__ || __msvcr90d__)
-; msvcr80.dll
-_get_output_format
-_set_output_format
-_get_printf_count_output
-_set_printf_count_output
-_set_abort_behavior
-_set_invalid_parameter_handler
-_fseek_nolock
-_ftell_nolock
-_fseeki64
-_ftelli64
-_fseeki64_nolock
-_ftelli64_nolock
-#endif /* 8.0 */
diff --git a/winsup/mingw/mthr.c b/winsup/mingw/mthr.c
deleted file mode 100644
index f282364..0000000
--- a/winsup/mingw/mthr.c
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * mthr.c
- *
- * Implement Mingw thread-support DLL .
- *
- * This file is used iff the following conditions are met:
- * - gcc uses -mthreads option
- * - user code uses C++ exceptions
- *
- * The sole job of the Mingw thread support DLL (MingwThr) is to catch
- * all the dying threads and clean up the data allocated in the TLSs
- * for exception contexts during C++ EH. Posix threads have key dtors,
- * but win32 TLS keys do not, hence the magic. Without this, there's at
- * least `6 * sizeof (void*)' bytes leaks for each catch/throw in each
- * thread. The only public interface is __mingwthr_key_dtor().
- *
- * Created by Mumit Khan <khan@nanotech.wisc.edu>
- *
- */
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-#include <stdlib.h>
-
-/* To protect the thread/key association data structure modifications. */
-CRITICAL_SECTION __mingwthr_cs;
-
-typedef struct __mingwthr_key __mingwthr_key_t;
-
-/* The list of threads active with key/dtor pairs. */
-struct __mingwthr_key {
- DWORD key;
- void (*dtor) (void *);
- __mingwthr_key_t *next;
-};
-
-
-static __mingwthr_key_t *key_dtor_list;
-
-/*
- * __mingwthr_key_add:
- *
- * Add key/dtor association for this thread. If the thread entry does not
- * exist, create a new one and add to the head of the threads list; add
- * the new assoc at the head of the keys list.
- *
- */
-
-static int
-___mingwthr_add_key_dtor ( DWORD key, void (*dtor) (void *))
-{
- __mingwthr_key_t *new_key;
-
- new_key = (__mingwthr_key_t *) calloc (1, sizeof (__mingwthr_key_t));
- if (new_key == NULL)
- return -1;
-
- new_key->key = key;
- new_key->dtor = dtor;
-
- EnterCriticalSection (&__mingwthr_cs);
-
- new_key->next = key_dtor_list;
- key_dtor_list = new_key;
-
- LeaveCriticalSection (&__mingwthr_cs);
-
-#ifdef DEBUG
- printf ("%s: allocating: (%ld, %x)\n",
- __FUNCTION__, key, dtor);
-#endif
-
- return 0;
-}
-
-static int
-___mingwthr_remove_key_dtor ( DWORD key )
-{
- __mingwthr_key_t *prev_key;
- __mingwthr_key_t *cur_key;
-
- EnterCriticalSection (&__mingwthr_cs);
-
- prev_key = NULL;
- cur_key = key_dtor_list;
-
- while( cur_key != NULL )
- {
- if( cur_key->key == key )
- {
-// take key/dtor out of list
- if( prev_key == NULL )
- {
- key_dtor_list = cur_key->next;
- }
- else
- {
- prev_key->next = cur_key->next;
- }
-
-#ifdef DEBUG
- printf ("%s: removing: (%ld)\n",
- __FUNCTION__, key );
-#endif
-
- free( cur_key );
- break;
- }
-
- prev_key = cur_key;
- cur_key = cur_key->next;
- }
-
- LeaveCriticalSection (&__mingwthr_cs);
-
- return 0;
-}
-
-/*
- * __mingwthr_run_key_dtors (void):
- *
- * Callback from DllMain when thread detaches to clean up the key
- * storage.
- *
- * Note that this does not delete the key itself, but just runs
- * the dtor if the current value are both non-NULL. Note that the
- * keys with NULL dtors are not added by __mingwthr_key_dtor, the
- * only public interface, so we don't need to check.
- *
- */
-
-void
-__mingwthr_run_key_dtors (void)
-{
- __mingwthr_key_t *keyp;
-
-#ifdef DEBUG
- printf ("%s: Entering Thread id %ld\n", __FUNCTION__, GetCurrentThreadId() );
-#endif
-
- EnterCriticalSection (&__mingwthr_cs);
-
- for (keyp = key_dtor_list; keyp; )
- {
- LPVOID value = TlsGetValue (keyp->key);
- if (GetLastError () == ERROR_SUCCESS)
- {
-#ifdef DEBUG
- printf (" (%ld, %x)\n", keyp->key, keyp->dtor);
-#endif
- if (value)
- (*keyp->dtor) (value);
- }
-#ifdef DEBUG
- else
- {
- printf (" TlsGetValue FAILED (%ld, %x)\n",
- keyp->key, keyp->dtor);
- }
-#endif
- keyp = keyp->next;
- }
-
- LeaveCriticalSection (&__mingwthr_cs);
-
-#ifdef DEBUG
- printf ("%s: Exiting Thread id %ld\n", __FUNCTION__, GetCurrentThreadId() );
-#endif
-}
-
-/*
- * __mingwthr_register_key_dtor (DWORD key, void (*dtor) (void *))
- *
- * Public interface called by C++ exception handling mechanism in
- * libgcc (cf: __gthread_key_create).
- *
- */
-
-__declspec(dllexport)
-int
-__mingwthr_key_dtor (DWORD key, void (*dtor) (void *))
-{
- if (dtor)
- {
- return ___mingwthr_add_key_dtor (key, dtor);
- }
-
- return 0;
-}
-
-__declspec(dllexport)
-int
-__mingwthr_remove_key_dtor (DWORD key )
-{
- return ___mingwthr_remove_key_dtor ( key );
-}
diff --git a/winsup/mingw/mthr_init.c b/winsup/mingw/mthr_init.c
deleted file mode 100644
index 5c8c8bb..0000000
--- a/winsup/mingw/mthr_init.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * mthr_init.c
- *
- * Do the thread-support DLL initialization.
- *
- * This file is used iff the following conditions are met:
- * - gcc uses -mthreads option
- * - user code uses C++ exceptions
- *
- * The sole job of the Mingw thread support DLL (MingwThr) is to catch
- * all the dying threads and clean up the data allocated in the TLSs
- * for exception contexts during C++ EH. Posix threads have key dtors,
- * but win32 TLS keys do not, hence the magic. Without this, there's at
- * least `24 * sizeof (void*)' bytes leaks for each catch/throw in each
- * thread.
- *
- * See mthr.c for all the magic.
- *
- * Created by Mumit Khan <khan@nanotech.wisc.edu>
- *
- */
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-#include <stdio.h>
-
-BOOL APIENTRY DllMain (HANDLE hDllHandle, DWORD reason,
- LPVOID reserved /* Not used. */ );
-
-/*
- *----------------------------------------------------------------------
- *
- * DllMain --
- *
- * This routine is called by the Mingw32, Cygwin32 or VC++ C run
- * time library init code, or the Borland DllEntryPoint routine. It
- * is responsible for initializing various dynamically loaded
- * libraries.
- *
- * Results:
- * TRUE on sucess, FALSE on failure.
- *
- * Side effects:
- *
- *----------------------------------------------------------------------
- */
-BOOL APIENTRY
-DllMain (HANDLE hDllHandle /* Library instance handle. */,
- DWORD reason /* Reason this function is being called. */,
- LPVOID reserved /* Not used. */)
-{
-
- extern CRITICAL_SECTION __mingwthr_cs;
- extern void __mingwthr_run_key_dtors( void );
-
-#ifdef DEBUG
- printf ("%s: reason %d\n", __FUNCTION__, reason );
-#endif
-
- switch (reason)
- {
- case DLL_PROCESS_ATTACH:
- InitializeCriticalSection (&__mingwthr_cs);
- break;
-
- case DLL_PROCESS_DETACH:
- __mingwthr_run_key_dtors();
- DeleteCriticalSection (&__mingwthr_cs);
- break;
-
- case DLL_THREAD_ATTACH:
- break;
-
- case DLL_THREAD_DETACH:
- __mingwthr_run_key_dtors();
- break;
- }
- return TRUE;
-}
diff --git a/winsup/mingw/mthr_stub.c b/winsup/mingw/mthr_stub.c
deleted file mode 100644
index e337b9a..0000000
--- a/winsup/mingw/mthr_stub.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * mthr_stub.c
- *
- * Implement Mingw thread-support stubs for single-threaded C++ apps.
- *
- * This file is used by if gcc is built with --enable-threads=win32 and
- * iff gcc does *NOT* use -mthreads option.
- *
- * The -mthreads implementation is in mthr.c.
- *
- * Created by Mumit Khan <khan@nanotech.wisc.edu>
- *
- */
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-
-/*
- * __mingwthr_register_key_dtor (DWORD key, void (*dtor) (void *))
- *
- * Public interface called by C++ exception handling mechanism in
- * libgcc (cf: __gthread_key_create).
- * No-op versions.
- */
-
-int
-__mingwthr_key_dtor (DWORD key, void (*dtor) (void *))
-{
-#ifdef DEBUG
- printf ("%s: ignoring key: (%ld) / dtor: (%x)\n",
- __FUNCTION__, key, dtor);
-#endif
- return 0;
-}
-
-int
-__mingwthr_remove_key_dtor (DWORD key )
-{
-#ifdef DEBUG
- printf ("%s: ignoring key: (%ld)\n", __FUNCTION__, key );
-#endif
- return 0;
-}
diff --git a/winsup/mingw/ofmt_stub.s b/winsup/mingw/ofmt_stub.s
deleted file mode 100644
index 388dcb4..0000000
--- a/winsup/mingw/ofmt_stub.s
+++ /dev/null
@@ -1,40 +0,0 @@
-/* ofmt_stub.s
- *
- * $Id$
- *
- * A trivial stub, to replace the _get_output_format() function.
- *
- * _pformat() requires this function, which is provided by MSVCRT runtimes
- * from msvcr80.dll onwards; add this stub to the import libraries for earlier
- * versions of MSVCRT, (those which do not already advertise availability of
- * any exported _get_output_format() function); this will permit _pformat()
- * to transparently interoperate with all supported versions of MSVCRT.
- * (Likewise for CRTDLL).
- *
- * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- * Contributed to the MinGW Project, and hereby assigned to the public domain.
- *
- * This is free software. It is provided AS IS, in the hope that it may be
- * useful. There is NO WARRANTY OF ANY KIND, not even an implied warranty of
- * merchantability, nor of fitness for any particular purpose.
- *
- */
- .text
- .p2align 1,,4
-
-.globl __get_output_format
- .def __get_output_format; .scl 2; .type 32; .endef
-
-__get_output_format:
-/*
- * int _get_output_format( void );
- *
- * Implementation is trivial: we immediately return zero, thus matching the
- * default behaviour of Microsoft's own implementation, in the absence of any
- * preceding call to _set_output_format(); (if we are using this stub, then
- * that entire API is unsupported, so no such prior call is possible).
- */
- xorl %eax, %eax
- ret
-
-/* $RCSfile$Revision$: end of file */
diff --git a/winsup/mingw/profile/COPYING b/winsup/mingw/profile/COPYING
deleted file mode 100755
index 60549be..0000000
--- a/winsup/mingw/profile/COPYING
+++ /dev/null
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) 19yy <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) 19yy name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/winsup/mingw/profile/CYGWIN_LICENSE b/winsup/mingw/profile/CYGWIN_LICENSE
deleted file mode 100755
index 7c6adad..0000000
--- a/winsup/mingw/profile/CYGWIN_LICENSE
+++ /dev/null
@@ -1,38 +0,0 @@
---------------------------------------------------------------------------
-This program is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License (GPL) as published by
-the Free Software Foundation; either version 2 of the License, or (at
-your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
---------------------------------------------------------------------------
-
- *** NOTE ***
-
-In accordance with section 10 of the GPL, Red Hat permits programs whose
-sources are distributed under a license that complies with the Open
-Source definition to be linked with libcygwin.a without libcygwin.a
-itself causing the resulting program to be covered by the GNU GPL.
-
-This means that you can port an Open Source(tm) application to cygwin,
-and distribute that executable as if it didn't include a copy of
-libcygwin.a linked into it. Note that this does not apply to the cygwin
-DLL itself. If you distribute a (possibly modified) version of the DLL
-you must adhere to the terms of the GPL, i.e. you must provide sources
-for the cygwin DLL.
-
-See http://www.opensource.org/docs/definition_plain.html for the precise Open Source
-Definition referenced above.
-
-Red Hat sells a special Cygwin License for customers who are unable to
-provide their application in open source code form. For more
-information, please see: http://www.redhat.com/software/tools/cygwin/,
-or call 866-2REDHAT ext. 3007
-
diff --git a/winsup/mingw/profile/Makefile.in b/winsup/mingw/profile/Makefile.in
deleted file mode 100644
index f9c71be..0000000
--- a/winsup/mingw/profile/Makefile.in
+++ /dev/null
@@ -1,145 +0,0 @@
-#
-# mingw/profile/Makefile.in: This file is part of Mingw runtime.
-#
-# This makefile requires GNU make.
-
-VPATH = @srcdir@
-srcdir = @srcdir@
-objdir = .
-
-target_alias = @target_alias@
-prefix = @prefix@
-
-program_transform_name = @program_transform_name@
-exec_prefix = @exec_prefix@
-bindir = @bindir@
-libdir = @libdir@
-tooldir = $(exec_prefix)/$(target_alias)
-datadir = @datadir@
-infodir = @infodir@
-includedir = @includedir@
-
-SHELL = /bin/sh
-
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-mkinstalldirs = $(SHELL) $(srcdir)/../mkinstalldirs
-DISTFILES = Makefile.in configure configure.in aclocal.m4 gcrt0.c gmon.c gmon.h \
-mcount.c profil.c profil.h profile.h CYGWIN_LICENSE COPYING
-
-CC = @CC@
-# FIXME: Which is it, CC or CC_FOR_TARGET?
-CC_FOR_TARGET = $(CC)
-AS_FOR_TARGET = $(AS)
-CFLAGS = @CFLAGS@
-CXXFLAGS = @CXXFLAGS@
-
-# compiling with Cygwin?
-NO_CYGWIN := @NO_CYGWIN@
-ifdef NO_CYGWIN
-override CC := ${NO_CYGWIN} $(firstword $(filter-out ${NO_CYGWIN},${CC}))
-endif
-
-# Either crtdll (CRT_ID 1) or msvcrt (CRT_ID 2).
-RUNTIME = @RUNTIME@
-CRT_ID = @CRT_ID@
-
-# Needed for threading dll.
-THREAD_DLL = @THREAD_DLL@
-THREAD_DLL_VERSION = 10
-THREAD_DLL_NAME = $(THREAD_DLL)$(THREAD_DLL_VERSION).dll
-
-W32API_INCLUDE = @W32API_INCLUDE@
-INCLUDES = -I$(srcdir) -I$(srcdir)/../include \
- -nostdinc \
- -iwithprefixbefore include
-ALL_CFLAGS = $(CFLAGS) $(INCLUDES) $(W32API_INCLUDE)
-ALL_CXXFLAGS = $(CXXFLAGS) $(INCLUDES) -nostdinc++ $(W32API_INCLUDE)
-
-AS = @AS@
-AR = @AR@
-LD = @LD@
-AR_FLAGS = rcv
-RANLIB = @RANLIB@
-DLLTOOL = @DLLTOOL@
-DLLTOOLFLAGS =
-DLLTOOL_FOR_TARGET = $(DLLTOOL)
-DLLTOOL_FLAGS = --as $(AS_FOR_TARGET)
-
-LIBGMON_A = @LIBGMON_A@
-LIBGMON_OBJS = gmon.o mcount.o profil.o
-CRT0S = @CRT0S@
-ALL_CRT0S = gcrt0.o gcrt1.o gcrt2.o
-
-LIBS = $(LIBGMON_A)
-DLLS =
-
-all: $(LIBGMON_A)
-
-$(LIBGMON_A): $(LIBGMON_OBJS) $(CRT0S)
- $(AR) $(ARFLAGS) $@ $(LIBGMON_OBJS)
- $(RANLIB) $@
-
-# FIXME: These are really the same, but gcc specs want different names.
-# The only CRT dependency is atexit.
-gcrt0.o: gcrt0.c
- $(CC) -c -o $@ $(CPPFLAGS) $(ALL_CFLAGS) $?
-
-gcrt1.o: gcrt0.c
- $(CC) -U__MSVCRT__ -c -o $@ $(CPPFLAGS) $(ALL_CFLAGS) $?
-
-gcrt2.o: gcrt0.c
- $(CC) -D__MSVCRT__ -c -o $@ $(CPPFLAGS) $(ALL_CFLAGS) $?
-
-#
-# Dependancies
-#
-gmon.o: gmon.c gmon.h profile.h profil.h
-mcount.o: mcount.c gmon.h profile.h
-profil.o: profil.c profil.h
-
-Makefile: Makefile.in config.status configure
- $(SHELL) config.status
-
-config.status: configure
- $(SHELL) config.status --recheck
-
-info:
-
-info-html:
-
-install-info: info
-
-install: all
- $(mkinstalldirs) $(inst_libdir)
- for i in $(LIBS); do \
- $(INSTALL_DATA) $$i $(inst_libdir)/$$i ; \
- done
- for i in $(CRT0S); do \
- $(INSTALL_DATA) $$i $(inst_libdir)/$$i ; \
- done
- for sub in . ; do \
- $(mkinstalldirs) $(inst_includedir)/$$sub ; \
- for i in $(srcdir)/$$sub/*.h ; do \
- $(INSTALL_DATA) $$i $(inst_includedir)/$$sub/`basename $$i` ; \
- done ; \
- done
-
-clean:
- -rm -f $(LIBGMON_OBJS) $(ALL_CRT0S) $(LIBGMON_A)
-
-distclean:
- -rm -f *.o *.a *~ core a.out
- -rm -f config.cache config.status config.log
- -rm -f Makefile
-.c.o:
- $(CC) -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) $< -o $@
-
-dist:
- mkdir $(distdir)/profile
- chmod 755 $(distdir)/profile
- @for i in $(DISTFILES); do\
- cp -p $(srcdir)/$$i $(distdir)/profile/$$i ; \
- done
-
diff --git a/winsup/mingw/profile/aclocal.m4 b/winsup/mingw/profile/aclocal.m4
deleted file mode 100644
index 177c013..0000000
--- a/winsup/mingw/profile/aclocal.m4
+++ /dev/null
@@ -1,831 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-# lib-prefix.m4 serial 4 (gettext-0.14.2)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
-dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
-dnl require excessive bracketing.
-ifdef([AC_HELP_STRING],
-[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
-[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
-
-dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
-dnl to access previously installed libraries. The basic assumption is that
-dnl a user will want packages to use other packages he previously installed
-dnl with the same --prefix option.
-dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
-dnl libraries, but is otherwise very convenient.
-AC_DEFUN([AC_LIB_PREFIX],
-[
- AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib-prefix],
-[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
- --without-lib-prefix don't search for libraries in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
- fi
- fi
-])
- if test $use_additional = yes; then
- dnl Potentially add $additional_includedir to $CPPFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's already present in $CPPFLAGS,
- dnl 3. if it's /usr/local/include and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- for x in $CPPFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $CPPFLAGS.
- CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- dnl Potentially add $additional_libdir to $LDFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's already present in $LDFLAGS,
- dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
- haveit=
- for x in $LDFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_libdir" = "X/usr/local/lib"; then
- if test -n "$GCC"; then
- case $host_os in
- linux*) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LDFLAGS.
- LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- fi
-])
-
-dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
-dnl acl_final_exec_prefix, containing the values to which $prefix and
-dnl $exec_prefix will expand at the end of the configure script.
-AC_DEFUN([AC_LIB_PREPARE_PREFIX],
-[
- dnl Unfortunately, prefix and exec_prefix get only finally determined
- dnl at the end of configure.
- if test "X$prefix" = "XNONE"; then
- acl_final_prefix="$ac_default_prefix"
- else
- acl_final_prefix="$prefix"
- fi
- if test "X$exec_prefix" = "XNONE"; then
- acl_final_exec_prefix='${prefix}'
- else
- acl_final_exec_prefix="$exec_prefix"
- fi
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
- prefix="$acl_save_prefix"
-])
-
-dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
-dnl variables prefix and exec_prefix bound to the values they will have
-dnl at the end of the configure script.
-AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
-[
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- acl_save_exec_prefix="$exec_prefix"
- exec_prefix="$acl_final_exec_prefix"
- $1
- exec_prefix="$acl_save_exec_prefix"
- prefix="$acl_save_prefix"
-])
-
-# lib-link.m4 serial 6 (gettext-0.14.3)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_PREREQ(2.50)
-
-dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
-dnl augments the CPPFLAGS variable.
-AC_DEFUN([AC_LIB_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
- ac_cv_lib[]Name[]_libs="$LIB[]NAME"
- ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
- ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
- ])
- LIB[]NAME="$ac_cv_lib[]Name[]_libs"
- LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
- INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
- dnl results of this search when this library appears as a dependency.
- HAVE_LIB[]NAME=yes
- undefine([Name])
- undefine([NAME])
-])
-
-dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
-dnl searches for libname and the libraries corresponding to explicit and
-dnl implicit dependencies, together with the specified include files and
-dnl the ability to compile and link the specified testcode. If found, it
-dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
-dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
-dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
-dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
-AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-
- dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
- dnl accordingly.
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
-
- dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
- dnl because if the user has installed lib[]Name and not disabled its use
- dnl via --without-lib[]Name-prefix, he wants to use it.
- ac_save_CPPFLAGS="$CPPFLAGS"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-
- AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS $LIB[]NAME"
- AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
- LIBS="$ac_save_LIBS"
- ])
- if test "$ac_cv_lib[]Name" = yes; then
- HAVE_LIB[]NAME=yes
- AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
- AC_MSG_CHECKING([how to link with lib[]$1])
- AC_MSG_RESULT([$LIB[]NAME])
- else
- HAVE_LIB[]NAME=no
- dnl If $LIB[]NAME didn't lead to a usable library, we don't need
- dnl $INC[]NAME either.
- CPPFLAGS="$ac_save_CPPFLAGS"
- LIB[]NAME=
- LTLIB[]NAME=
- fi
- AC_SUBST([HAVE_LIB]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- undefine([Name])
- undefine([NAME])
-])
-
-dnl Determine the platform dependent parameters needed to use rpath:
-dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
-dnl hardcode_direct, hardcode_minus_L.
-AC_DEFUN([AC_LIB_RPATH],
-[
- dnl Tell automake >= 1.10 to complain if config.rpath is missing.
- m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
- AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
- AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
- AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
- AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
- CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
- ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
- . ./conftest.sh
- rm -f ./conftest.sh
- acl_cv_rpath=done
- ])
- wl="$acl_cv_wl"
- libext="$acl_cv_libext"
- shlibext="$acl_cv_shlibext"
- hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
- hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
- hardcode_direct="$acl_cv_hardcode_direct"
- hardcode_minus_L="$acl_cv_hardcode_minus_L"
- dnl Determine whether the user wants rpath handling at all.
- AC_ARG_ENABLE(rpath,
- [ --disable-rpath do not hardcode runtime library paths],
- :, enable_rpath=yes)
-])
-
-dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
-AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
-[
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib$1-prefix],
-[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
- --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
- fi
- fi
-])
- dnl Search the library and its dependencies in $additional_libdir and
- dnl $LDFLAGS. Using breadth-first-seach.
- LIB[]NAME=
- LTLIB[]NAME=
- INC[]NAME=
- rpathdirs=
- ltrpathdirs=
- names_already_handled=
- names_next_round='$1 $2'
- while test -n "$names_next_round"; do
- names_this_round="$names_next_round"
- names_next_round=
- for name in $names_this_round; do
- already_handled=
- for n in $names_already_handled; do
- if test "$n" = "$name"; then
- already_handled=yes
- break
- fi
- done
- if test -z "$already_handled"; then
- names_already_handled="$names_already_handled $name"
- dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
- dnl or AC_LIB_HAVE_LINKFLAGS call.
- uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
- eval value=\"\$HAVE_LIB$uppername\"
- if test -n "$value"; then
- if test "$value" = yes; then
- eval value=\"\$LIB$uppername\"
- test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
- eval value=\"\$LTLIB$uppername\"
- test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
- else
- dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
- dnl that this library doesn't exist. So just drop it.
- :
- fi
- else
- dnl Search the library lib$name in $additional_libdir and $LDFLAGS
- dnl and the already constructed $LIBNAME/$LTLIBNAME.
- found_dir=
- found_la=
- found_so=
- found_a=
- if test $use_additional = yes; then
- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
- found_dir="$additional_libdir"
- found_so="$additional_libdir/lib$name.$shlibext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- else
- if test -f "$additional_libdir/lib$name.$libext"; then
- found_dir="$additional_libdir"
- found_a="$additional_libdir/lib$name.$libext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- fi
- fi
- fi
- if test "X$found_dir" = "X"; then
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- case "$x" in
- -L*)
- dir=`echo "X$x" | sed -e 's/^X-L//'`
- if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
- found_dir="$dir"
- found_so="$dir/lib$name.$shlibext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- else
- if test -f "$dir/lib$name.$libext"; then
- found_dir="$dir"
- found_a="$dir/lib$name.$libext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- fi
- fi
- ;;
- esac
- if test "X$found_dir" != "X"; then
- break
- fi
- done
- fi
- if test "X$found_dir" != "X"; then
- dnl Found the library.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
- if test "X$found_so" != "X"; then
- dnl Linking with a shared library. We attempt to hardcode its
- dnl directory into the executable's runpath, unless it's the
- dnl standard /usr/lib.
- if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
- dnl No hardcoding is needed.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $found_dir"
- fi
- dnl The hardcoding into $LIBNAME is system dependent.
- if test "$hardcode_direct" = yes; then
- dnl Using DIR/libNAME.so during linking hardcodes DIR into the
- dnl resulting binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $found_dir"
- fi
- else
- dnl Rely on "-L$found_dir".
- dnl But don't add it if it's already contained in the LDFLAGS
- dnl or the already constructed $LIBNAME
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
- fi
- if test "$hardcode_minus_L" != no; then
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
- dnl here, because this doesn't fit in flags passed to the
- dnl compiler. So give up. No hardcoding. This affects only
- dnl very old systems.
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- fi
- else
- if test "X$found_a" != "X"; then
- dnl Linking with a static library.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
- else
- dnl We shouldn't come here, but anyway it's good to have a
- dnl fallback.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
- fi
- fi
- dnl Assume the include files are nearby.
- additional_includedir=
- case "$found_dir" in
- */lib | */lib/)
- basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
- additional_includedir="$basedir/include"
- ;;
- esac
- if test "X$additional_includedir" != "X"; then
- dnl Potentially add $additional_includedir to $INCNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's /usr/local/include and we are using GCC on Linux,
- dnl 3. if it's already present in $CPPFLAGS or the already
- dnl constructed $INCNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- for x in $CPPFLAGS $INC[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $INCNAME.
- INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- fi
- dnl Look for dependencies.
- if test -n "$found_la"; then
- dnl Read the .la file. It defines the variables
- dnl dlname, library_names, old_library, dependency_libs, current,
- dnl age, revision, installed, dlopen, dlpreopen, libdir.
- save_libdir="$libdir"
- case "$found_la" in
- */* | *\\*) . "$found_la" ;;
- *) . "./$found_la" ;;
- esac
- libdir="$save_libdir"
- dnl We use only dependency_libs.
- for dep in $dependency_libs; do
- case "$dep" in
- -L*)
- additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
- dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 3. if it's already present in $LDFLAGS or the already
- dnl constructed $LIBNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
- haveit=
- if test "X$additional_libdir" = "X/usr/local/lib"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LIBNAME.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- haveit=
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LTLIBNAME.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- ;;
- -R*)
- dir=`echo "X$dep" | sed -e 's/^X-R//'`
- if test "$enable_rpath" != no; then
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $dir"
- fi
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $dir"
- fi
- fi
- ;;
- -l*)
- dnl Handle this in the next round.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
- ;;
- *.la)
- dnl Handle this in the next round. Throw away the .la's
- dnl directory; it is already contained in a preceding -L
- dnl option.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
- ;;
- *)
- dnl Most likely an immediate library name.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
- ;;
- esac
- done
- fi
- else
- dnl Didn't find the library; assume it is in the system directories
- dnl known to the linker and runtime loader. (All the system
- dnl directories known to the linker should also be known to the
- dnl runtime loader, otherwise the system is severely misconfigured.)
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- done
- done
- if test "X$rpathdirs" != "X"; then
- if test -n "$hardcode_libdir_separator"; then
- dnl Weird platform: only the last -rpath option counts, the user must
- dnl pass all path elements in one option. We can arrange that for a
- dnl single library, but not when more than one $LIBNAMEs are used.
- alldirs=
- for found_dir in $rpathdirs; do
- alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
- done
- dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
- acl_save_libdir="$libdir"
- libdir="$alldirs"
- eval flag=\"$hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- else
- dnl The -rpath options are cumulative.
- for found_dir in $rpathdirs; do
- acl_save_libdir="$libdir"
- libdir="$found_dir"
- eval flag=\"$hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- done
- fi
- fi
- if test "X$ltrpathdirs" != "X"; then
- dnl When using libtool, the option that works for both libraries and
- dnl executables is -R. The -R options are cumulative.
- for found_dir in $ltrpathdirs; do
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
- done
- fi
-])
-
-dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
-dnl unless already present in VAR.
-dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
-dnl contains two or three consecutive elements that belong together.
-AC_DEFUN([AC_LIB_APPENDTOVAR],
-[
- for element in [$2]; do
- haveit=
- for x in $[$1]; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X$element"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- [$1]="${[$1]}${[$1]:+ }$element"
- fi
- done
-])
-
-# lib-ld.m4 serial 3 (gettext-0.13)
-dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
-
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
-AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- acl_cv_prog_gnu_ld=yes ;;
-*)
- acl_cv_prog_gnu_ld=no ;;
-esac])
-with_gnu_ld=$acl_cv_prog_gnu_ld
-])
-
-dnl From libtool-1.4. Sets the variable LD.
-AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- [re_direlt='/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(acl_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- acl_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break ;;
- *)
- test "$with_gnu_ld" != yes && break ;;
- esac
- fi
- done
- IFS="$ac_save_ifs"
-else
- acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$acl_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_LIB_PROG_LD_GNU
-])
-
diff --git a/winsup/mingw/profile/configure b/winsup/mingw/profile/configure
deleted file mode 100755
index b1f4278..0000000
--- a/winsup/mingw/profile/configure
+++ /dev/null
@@ -1,3151 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63.
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-if test "x$CONFIG_SHELL" = x; then
- if (eval ":") 2>/dev/null; then
- as_have_required=yes
-else
- as_have_required=no
-fi
-
- if test $as_have_required = yes && (eval ":
-(as_func_return () {
- (exit \$1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
- :
-else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0) || { (exit 1); exit 1; }
-
-(
- as_lineno_1=\$LINENO
- as_lineno_2=\$LINENO
- test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
- test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
-") 2> /dev/null; then
- :
-else
- as_candidate_shells=
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- case $as_dir in
- /*)
- for as_base in sh bash ksh sh5; do
- as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
- done;;
- esac
-done
-IFS=$as_save_IFS
-
-
- for as_shell in $as_candidate_shells $SHELL; do
- # Try only shells that exist, to save several forks.
- if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { ("$as_shell") 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-_ASEOF
-}; then
- CONFIG_SHELL=$as_shell
- as_have_required=yes
- if { "$as_shell" 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-(as_func_return () {
- (exit $1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = "$1" ); then
- :
-else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test $exitcode = 0) || { (exit 1); exit 1; }
-
-(
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
-
-_ASEOF
-}; then
- break
-fi
-
-fi
-
- done
-
- if test "x$CONFIG_SHELL" != x; then
- for as_var in BASH_ENV ENV
- do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- done
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
-
- if test $as_have_required = no; then
- echo This script requires a shell more modern than all the
- echo shells that I found on your system. Please install a
- echo modern shell, or manually run the script under such a
- echo shell if you do have one.
- { (exit 1); exit 1; }
-fi
-
-
-fi
-
-fi
-
-
-
-(eval "as_func_return () {
- (exit \$1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
- :
-else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0") || {
- echo No shell found that supports shell functions.
- echo Please tell bug-autoconf@gnu.org about your system,
- echo including any error possibly output before this message.
- echo This can help us improve future autoconf versions.
- echo Configuration will now proceed without shell functions.
-}
-
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line after each line using $LINENO; the second 'sed'
- # does the real work. The second script uses 'N' to pair each
- # line-number line with the line containing $LINENO, and appends
- # trailing '-' during substitution so that $LINENO is not a special
- # case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # scripts with optimization help from Paolo Bonzini. Blame Lee
- # E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
- case `echo 'x\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- *) ECHO_C='\c';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
- as_ln_s='cp -p'
- fi
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-exec 7<&0 </dev/null 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-
-ac_unique_file="gcrt0.c"
-ac_subst_vars='LTLIBOBJS
-LIBOBJS
-INSTALL_DATA
-INSTALL_SCRIPT
-INSTALL_PROGRAM
-W32API_INCLUDE
-CRT0S
-LIBGMON_A
-NO_CYGWIN
-RUNTIME
-CRT_ID
-target_os
-target_vendor
-target_cpu
-target
-host_os
-host_vendor
-host_cpu
-host
-build_os
-build_vendor
-build_cpu
-build
-DLLWRAP
-DLLTOOL
-RANLIB
-LD
-AR
-AS
-CC
-target_alias
-host_alias
-build_alias
-LIBS
-ECHO_T
-ECHO_N
-ECHO_C
-DEFS
-mandir
-localedir
-libdir
-psdir
-pdfdir
-dvidir
-htmldir
-infodir
-docdir
-oldincludedir
-includedir
-localstatedir
-sharedstatedir
-sysconfdir
-datadir
-datarootdir
-libexecdir
-sbindir
-bindir
-program_transform_name
-prefix
-exec_prefix
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-PATH_SEPARATOR
-SHELL'
-ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-'
- ac_precious_vars='build_alias
-host_alias
-target_alias'
-
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-ac_unrecognized_opts=
-ac_unrecognized_sep=
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval $ac_prev=\$ac_option
- ac_prev=
- continue
- fi
-
- case $ac_option in
- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *) ac_optarg=yes ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_dashdash$ac_option in
- --)
- ac_dashdash=yes ;;
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=*)
- datadir=$ac_optarg ;;
-
- -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
- | --dataroo | --dataro | --datar)
- ac_prev=datarootdir ;;
- -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
- | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
- datarootdir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
- { (exit 1); exit 1; }; }
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval enable_$ac_useropt=no ;;
-
- -docdir | --docdir | --docdi | --doc | --do)
- ac_prev=docdir ;;
- -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
- docdir=$ac_optarg ;;
-
- -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
- ac_prev=dvidir ;;
- -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
- dvidir=$ac_optarg ;;
-
- -enable-* | --enable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
- { (exit 1); exit 1; }; }
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval enable_$ac_useropt=\$ac_optarg ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
- ac_prev=htmldir ;;
- -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
- | --ht=*)
- htmldir=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir=$ac_optarg ;;
-
- -localedir | --localedir | --localedi | --localed | --locale)
- ac_prev=localedir ;;
- -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
- localedir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst | --locals)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
- localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name=$ac_optarg ;;
-
- -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
- ac_prev=pdfdir ;;
- -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
- pdfdir=$ac_optarg ;;
-
- -psdir | --psdir | --psdi | --psd | --ps)
- ac_prev=psdir ;;
- -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
- psdir=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
- { (exit 1); exit 1; }; }
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval with_$ac_useropt=\$ac_optarg ;;
-
- -without-* | --without-*)
- ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
- { (exit 1); exit 1; }; }
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval with_$ac_useropt=no ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries=$ac_optarg ;;
-
- -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- eval $ac_envvar=\$ac_optarg
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { $as_echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-if test -n "$ac_unrecognized_opts"; then
- case $enable_option_checking in
- no) ;;
- fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
- { (exit 1); exit 1; }; } ;;
- *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
- esac
-fi
-
-# Check all directory arguments for consistency.
-for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
- datadir sysconfdir sharedstatedir localstatedir includedir \
- oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
-do
- eval ac_val=\$$ac_var
- # Remove trailing slashes.
- case $ac_val in
- */ )
- ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
- eval $ac_var=\$ac_val;;
- esac
- # Be sure to have absolute directory names.
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) continue;;
- NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
- esac
- { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; }
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- { $as_echo "$as_me: error: working directory cannot be determined" >&2
- { (exit 1); exit 1; }; }
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
- { (exit 1); exit 1; }; }
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then the parent directory.
- ac_confdir=`$as_dirname -- "$as_myself" ||
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_myself" : 'X\(//\)[^/]' \| \
- X"$as_myself" : 'X\(//\)$' \| \
- X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r "$srcdir/$ac_unique_file"; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
- test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
- { (exit 1); exit 1; }; }
- pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
- srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
- eval ac_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_env_${ac_var}_value=\$${ac_var}
- eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
- --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- --infodir=DIR info documentation [DATAROOTDIR/info]
- --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
- --mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
- --htmldir=DIR html documentation [DOCDIR]
- --dvidir=DIR dvi documentation [DOCDIR]
- --pdfdir=DIR pdf documentation [DOCDIR]
- --psdir=DIR ps documentation [DOCDIR]
-_ACEOF
-
- cat <<\_ACEOF
-
-System types:
- --build=BUILD configure for building on BUILD [guessed]
- --host=HOST cross-compile to build programs to run on HOST [BUILD]
- --target=TARGET configure for building compilers for TARGET [HOST]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-
- cat <<\_ACEOF
-
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d "$ac_dir" ||
- { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
- continue
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
- cd "$ac_dir" || { ac_status=$?; continue; }
- # Check for guested configure.
- if test -f "$ac_srcdir/configure.gnu"; then
- echo &&
- $SHELL "$ac_srcdir/configure.gnu" --help=recursive
- elif test -f "$ac_srcdir/configure"; then
- echo &&
- $SHELL "$ac_srcdir/configure" --help=recursive
- else
- $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi || ac_status=$?
- cd "$ac_pwd" || { ac_status=$?; break; }
- done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
- cat <<\_ACEOF
-configure
-generated by GNU Autoconf 2.63
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit
-fi
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by $as_me, which was
-generated by GNU Autoconf 2.63. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- $as_echo "PATH: $as_dir"
-done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *\'*)
- ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- ac_configure_args="$ac_configure_args '$ac_arg'"
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-(
- for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) $as_unset $ac_var ;;
- esac ;;
- esac
- done
- (set) 2>&1 |
- case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- sed -n \
- "s/'\''/'\''\\\\'\'''\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
- ;; #(
- *)
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-)
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------------- ##
-## File substitutions. ##
-## ------------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- cat confdefs.h
- echo
- fi
- test "$ac_signal" != 0 &&
- $as_echo "$as_me: caught signal $ac_signal"
- $as_echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core core.conftest.* &&
- rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
- ac_site_file1=$CONFIG_SITE
-elif test "x$prefix" != xNONE; then
- ac_site_file1=$prefix/share/config.site
- ac_site_file2=$prefix/etc/config.site
-else
- ac_site_file1=$ac_default_prefix/share/config.site
- ac_site_file2=$ac_default_prefix/etc/config.site
-fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
- test "x$ac_site_file" = xNONE && continue
- if test -r "$ac_site_file"; then
- { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . "$cache_file";;
- *) . "./$cache_file";;
- esac
- fi
-else
- { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val=\$ac_cv_env_${ac_var}_value
- eval ac_new_val=\$ac_env_${ac_var}_value
- case $ac_old_set,$ac_new_set in
- set,)
- { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- # differences in whitespace do not lead to failure.
- ac_old_val_w=`echo x $ac_old_val`
- ac_new_val_w=`echo x $ac_new_val`
- if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- ac_cache_corrupted=:
- else
- { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
- eval $ac_var=\$ac_old_val
- fi
- { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
-$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
- { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
-$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-CC=${CC-cc}
-
-AS=${AS-as}
-
-AR=${AR-ar}
-
-LD=${LD-ld}
-
-RANLIB=${RANLIB-ranlib}
-
-DLLTOOL=${DLLTOOL-dlltool}
-
-DLLWRAP=${DLLWRAP-dllwrap}
-
-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
- elif test -f "$ac_dir/shtool"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
-$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
- { (exit 1); exit 1; }; }
-
-{ $as_echo "$as_me:$LINENO: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
- { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-$as_echo "$as_me: error: invalid value of canonical build" >&2;}
- { (exit 1); exit 1; }; };;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:$LINENO: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test "x$host_alias" = x; then
- ac_cv_host=$ac_cv_build
-else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-$as_echo "$as_me: error: invalid value of canonical host" >&2;}
- { (exit 1); exit 1; }; };;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:$LINENO: checking target system type" >&5
-$as_echo_n "checking target system type... " >&6; }
-if test "${ac_cv_target+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test "x$target_alias" = x; then
- ac_cv_target=$ac_cv_host
-else
- ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
- { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-$as_echo "$ac_cv_target" >&6; }
-case $ac_cv_target in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
-$as_echo "$as_me: error: invalid value of canonical target" >&2;}
- { (exit 1); exit 1; }; };;
-esac
-target=$ac_cv_target
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_target
-shift
-target_cpu=$1
-target_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-target_os=$*
-IFS=$ac_save_IFS
-case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-LIBGMON_A=libgmon.a
-
-case "$target_os" in
-*mingw32crt*)
- CRT_ID=1
- NO_CYGWIN=
- RUNTIME=crtdll
- CRT0S="gcrt1.o gcrt2.o"
- ;;
-*cygwin*)
- CRT_ID=2
- NO_CYGWIN="$(cd ${srcdir}/../../utils; pwd)/mingw"
- RUNTIME=msvcrt
- CRT0S=gcrt0.o
- # Do not build libm.a when building under Cygwin winsup. Otherwise, it'll
- # overwrite Cygwin's one. Likewise for libgmon.a.
- ;;
-*)
- # Build it for MSVCRT by default.
- CRT_ID=2
- NO_CYGWIN=
- RUNTIME=msvcrt
- CRT0S="gcrt1.o gcrt2.o"
- ;;
-esac
-
-W32API_INCLUDE='-I $(srcdir)/../../w32api/include'
-
-
-
-
-
-
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- rm -rf conftest.one conftest.two conftest.dir
- echo one > conftest.one
- echo two > conftest.two
- mkdir conftest.dir
- if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
- test -s conftest.one && test -s conftest.two &&
- test -s conftest.dir/conftest.one &&
- test -s conftest.dir/conftest.two
- then
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- fi
- done
- done
- ;;
-esac
-
-done
-IFS=$as_save_IFS
-
-rm -rf conftest.one conftest.two conftest.dir
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. Don't cache a
- # value for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the value is a relative name.
- INSTALL=$ac_install_sh
- fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-ac_config_files="$ac_config_files Makefile"
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
- for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) $as_unset $ac_var ;;
- esac ;;
- esac
- done
-
- (set) 2>&1 |
- case $as_nl`(ac_space=' '; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;; #(
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-) |
- sed '
- /^ac_cv_env_/b end
- t clear
- :clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
- if test -w "$cache_file"; then
- test "x$cache_file" != "x/dev/null" &&
- { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
- cat confcache >$cache_file
- else
- { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then branch to the quote section. Otherwise,
-# look for a macro that doesn't take arguments.
-ac_script='
-:mline
-/\\$/{
- N
- s,\\\n,,
- b mline
-}
-t clear
-:clear
-s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
-t quote
-s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
-t quote
-b any
-:quote
-s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
-s/\[/\\&/g
-s/\]/\\&/g
-s/\$/$$/g
-H
-:any
-${
- g
- s/^\n//
- s/\n/ /g
- p
-}
-'
-DEFS=`sed -n "$ac_script" confdefs.h`
-
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
- # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
- # will be set to the directory where LIBOBJS objects are built.
- ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line after each line using $LINENO; the second 'sed'
- # does the real work. The second script uses 'N' to pair each
- # line-number line with the line containing $LINENO, and appends
- # trailing '-' during substitution so that $LINENO is not a special
- # case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # scripts with optimization help from Paolo Bonzini. Blame Lee
- # E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
- case `echo 'x\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- *) ECHO_C='\c';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
- as_ln_s='cp -p'
- fi
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-
-# Save the log message, to keep $[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.63. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
-
-
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTION]... [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number and configuration settings, then exit
- -q, --quiet, --silent
- do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
-
-Configuration files:
-$config_files
-
-Report bugs to <bug-autoconf@gnu.org>."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.63,
- with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2008 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
-test -n "\$AWK" || AWK=awk
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=*)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- *)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- esac
-
- case $ac_option in
- # Handling of the options.
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
- --debug | --debu | --deb | --de | --d | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
- ac_need_defaults=false;;
- --he | --h | --help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { $as_echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1"
- ac_need_defaults=false ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
- shift
- \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
- CONFIG_SHELL='$SHELL'
- export CONFIG_SHELL
- exec "\$@"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
- $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
- case $ac_config_target in
- "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-
- *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
- tmp=
- trap 'exit_status=$?
- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./conf$$-$RANDOM
- (umask 077 && mkdir "$tmp")
-} ||
-{
- $as_echo "$as_me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=' '
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\\r'
-else
- ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
-_ACEOF
-
-
-{
- echo "cat >conf$$subs.awk <<_ACEOF" &&
- echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
- echo "_ACEOF"
-} >conf$$subs.sh ||
- { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
- . ./conf$$subs.sh ||
- { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
-
- ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
- if test $ac_delim_n = $ac_delim_num; then
- break
- elif $ac_last_try; then
- { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\).*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\).*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
- N
- s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
- for (key in S) S_is_set[key] = 1
- FS = ""
-
-}
-{
- line = $ 0
- nfields = split(line, field, "@")
- substed = 0
- len = length(field[1])
- for (i = 2; i < nfields; i++) {
- key = field[i]
- keylen = length(key)
- if (S_is_set[key]) {
- value = S[key]
- line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
- len += length(value) + length(field[++i])
- substed = 1
- } else
- len += 1 + keylen
- }
-
- print line
-}
-
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
- sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
- cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
- || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
-$as_echo "$as_me: error: could not setup config files machinery" >&2;}
- { (exit 1); exit 1; }; }
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[ ]*\):*/\1/
-s/:*$//
-s/^[^=]*=[ ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
-
-
-eval set X " :F $CONFIG_FILES "
-shift
-for ac_tag
-do
- case $ac_tag in
- :[FHLC]) ac_mode=$ac_tag; continue;;
- esac
- case $ac_mode$ac_tag in
- :[FHL]*:*);;
- :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
-$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
- { (exit 1); exit 1; }; };;
- :[FH]-) ac_tag=-:-;;
- :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
- esac
- ac_save_IFS=$IFS
- IFS=:
- set x $ac_tag
- IFS=$ac_save_IFS
- shift
- ac_file=$1
- shift
-
- case $ac_mode in
- :L) ac_source=$1;;
- :[FH])
- ac_file_inputs=
- for ac_f
- do
- case $ac_f in
- -) ac_f="$tmp/stdin";;
- *) # Look for the file first in the build tree, then in the source tree
- # (if the path is not absolute). The absolute path cannot be DOS-style,
- # because $ac_f cannot contain `:'.
- test -f "$ac_f" ||
- case $ac_f in
- [\\/$]*) false;;
- *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
- esac ||
- { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
- { (exit 1); exit 1; }; };;
- esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
- ac_file_inputs="$ac_file_inputs '$ac_f'"
- done
-
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
- `' by configure.'
- if test x"$ac_file" != x-; then
- configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
- fi
- # Neutralize special characters interpreted by sed in replacement strings.
- case $configure_input in #(
- *\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
- sed 's/[\\\\&|]/\\\\&/g'`;; #(
- *) ac_sed_conf_input=$configure_input;;
- esac
-
- case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin" \
- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
- { (exit 1); exit 1; }; } ;;
- esac
- ;;
- esac
-
- ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- { as_dir="$ac_dir"
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
- { (exit 1); exit 1; }; }; }
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
- case $ac_mode in
- :F)
- #
- # CONFIG_FILE
- #
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
- esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-
-ac_sed_dataroot='
-/datarootdir/ {
- p
- q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p
-'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_datarootdir_hack='
- s&@datadir@&$datadir&g
- s&@docdir@&$docdir&g
- s&@infodir@&$infodir&g
- s&@localedir@&$localedir&g
- s&@mandir@&$mandir&g
- s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
- { (exit 1); exit 1; }; }
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&2;}
-
- rm -f "$tmp/stdin"
- case $ac_file in
- -) cat "$tmp/out" && rm -f "$tmp/out";;
- *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
- esac \
- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
- { (exit 1); exit 1; }; }
- ;;
-
-
-
- esac
-
-done # for ac_tag
-
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-test $ac_write_fail = 0 ||
- { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || { (exit 1); exit 1; }
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
-
-
diff --git a/winsup/mingw/profile/configure.in b/winsup/mingw/profile/configure.in
deleted file mode 100644
index 38e52d1..0000000
--- a/winsup/mingw/profile/configure.in
+++ /dev/null
@@ -1,75 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-
-dnl This file is part of Mingw runtime.
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 2 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; if not, write to the Free Software
-dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-AC_PREREQ(2.59)
-AC_INIT(gcrt0.c)
-
-CC=${CC-cc}
-AC_SUBST(CC)
-AS=${AS-as}
-AC_SUBST(AS)
-AR=${AR-ar}
-AC_SUBST(AR)
-LD=${LD-ld}
-AC_SUBST(LD)
-RANLIB=${RANLIB-ranlib}
-AC_SUBST(RANLIB)
-DLLTOOL=${DLLTOOL-dlltool}
-AC_SUBST(DLLTOOL)
-DLLWRAP=${DLLWRAP-dllwrap}
-AC_SUBST(DLLWRAP)
-AC_CANONICAL_SYSTEM
-
-LIBGMON_A=libgmon.a
-
-case "$target_os" in
-*mingw32crt*)
- CRT_ID=1
- NO_CYGWIN=
- RUNTIME=crtdll
- CRT0S="gcrt1.o gcrt2.o"
- ;;
-*cygwin*)
- CRT_ID=2
- NO_CYGWIN="$(cd ${srcdir}/../../utils; pwd)/mingw"
- RUNTIME=msvcrt
- CRT0S=gcrt0.o
- # Do not build libm.a when building under Cygwin winsup. Otherwise, it'll
- # overwrite Cygwin's one. Likewise for libgmon.a.
- ;;
-*)
- # Build it for MSVCRT by default.
- CRT_ID=2
- NO_CYGWIN=
- RUNTIME=msvcrt
- CRT0S="gcrt1.o gcrt2.o"
- ;;
-esac
-
-W32API_INCLUDE='-I $(srcdir)/../../w32api/include'
-
-AC_SUBST(CRT_ID)
-AC_SUBST(RUNTIME)
-AC_SUBST(NO_CYGWIN)
-AC_SUBST(LIBGMON_A)
-AC_SUBST(CRT0S)
-AC_SUBST(W32API_INCLUDE)
-
-AC_PROG_INSTALL
-AC_OUTPUT(Makefile)
-
diff --git a/winsup/mingw/profile/gcrt0.c b/winsup/mingw/profile/gcrt0.c
deleted file mode 100644
index 20f3c7c..0000000
--- a/winsup/mingw/profile/gcrt0.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* gcrt0.c
-
- Copyright 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/*
- * This file is taken from Cygwin distribution. Please keep it in sync.
- * The differences should be within __MINGW32__ guard.
- */
-
-#include <sys/types.h>
-#include <stdlib.h>
-
-#ifdef __MINGW32__
-typedef unsigned char u_char;
-typedef unsigned short u_short;
-typedef unsigned int u_int;
-typedef unsigned long u_long;
-#endif
-
-extern u_char etext asm ("etext");
-extern u_char eprol asm ("__eprol");
-extern void _mcleanup (void);
-extern void monstartup (u_long, u_long);
-void _monstartup (void) __attribute__((__constructor__));
-
-/* startup initialization for -pg support */
-
-void
-_monstartup (void)
-{
- static int called;
-
- /* Guard against multiple calls that may happen if DLLs are linked
- with profile option set as well. Addede side benefit is that it
- makes profiling backward compatible (GCC used to emit a call to
- _monstartup when compiling main with profiling enabled). */
- if (called++)
- return;
-
- monstartup ((u_long) &eprol, (u_long) &etext);
- atexit (&_mcleanup);
-}
-
-asm (".text");
-asm ("__eprol:");
-
diff --git a/winsup/mingw/profile/gmon.c b/winsup/mingw/profile/gmon.c
deleted file mode 100644
index a20c337..0000000
--- a/winsup/mingw/profile/gmon.c
+++ /dev/null
@@ -1,290 +0,0 @@
-/*-
- * Copyright (c) 1983, 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if !defined(lint) && defined(LIBC_SCCS)
-static char rcsid[] = "$OpenBSD: gmon.c,v 1.8 1997/07/23 21:11:27 kstailey Exp $";
-#endif
-
-/*
- * This file is taken from Cygwin distribution. Please keep it in sync.
- * The differences should be within __MINGW32__ guard.
- */
-
-#include <fcntl.h>
-#include <stdlib.h>
-#include <stdio.h>
-#ifndef __MINGW32__
-#include <unistd.h>
-#include <sys/param.h>
-#endif
-#include <sys/types.h>
-#include <gmon.h>
-
-#include <profil.h>
-
-/* XXX needed? */
-//extern char *minbrk __asm ("minbrk");
-
-#ifdef __MINGW32__
-#include <string.h>
-#define bzero(ptr,size) memset (ptr, 0, size);
-#endif
-
-struct gmonparam _gmonparam = { GMON_PROF_OFF };
-
-static int s_scale;
-/* see profil(2) where this is describe (incorrectly) */
-#define SCALE_1_TO_1 0x10000L
-
-#define ERR(s) write(2, s, sizeof(s))
-
-void moncontrol __P((int));
-
-static void *
-fake_sbrk(int size)
-{
- return malloc(size);
-}
-
-void
-monstartup(lowpc, highpc)
- u_long lowpc;
- u_long highpc;
-{
- register int o;
- char *cp;
- struct gmonparam *p = &_gmonparam;
-
- /*
- * round lowpc and highpc to multiples of the density we're using
- * so the rest of the scaling (here and in gprof) stays in ints.
- */
- p->lowpc = ROUNDDOWN(lowpc, HISTFRACTION * sizeof(HISTCOUNTER));
- p->highpc = ROUNDUP(highpc, HISTFRACTION * sizeof(HISTCOUNTER));
- p->textsize = p->highpc - p->lowpc;
- p->kcountsize = p->textsize / HISTFRACTION;
- p->hashfraction = HASHFRACTION;
- p->fromssize = p->textsize / p->hashfraction;
- p->tolimit = p->textsize * ARCDENSITY / 100;
- if (p->tolimit < MINARCS)
- p->tolimit = MINARCS;
- else if (p->tolimit > MAXARCS)
- p->tolimit = MAXARCS;
- p->tossize = p->tolimit * sizeof(struct tostruct);
-
- cp = fake_sbrk(p->kcountsize + p->fromssize + p->tossize);
- if (cp == (char *)-1) {
- ERR("monstartup: out of memory\n");
- return;
- }
-
- /* zero out cp as value will be added there */
- bzero(cp, p->kcountsize + p->fromssize + p->tossize);
-
- p->tos = (struct tostruct *)cp;
- cp += p->tossize;
- p->kcount = (u_short *)cp;
- cp += p->kcountsize;
- p->froms = (u_short *)cp;
-
- /* XXX minbrk needed? */
- //minbrk = fake_sbrk(0);
- p->tos[0].link = 0;
-
- o = p->highpc - p->lowpc;
- if (p->kcountsize < o) {
-#ifndef notdef
- s_scale = ((float)p->kcountsize / o ) * SCALE_1_TO_1;
-#else /* avoid floating point */
- int quot = o / p->kcountsize;
-
- if (quot >= 0x10000)
- s_scale = 1;
- else if (quot >= 0x100)
- s_scale = 0x10000 / quot;
- else if (o >= 0x800000)
- s_scale = 0x1000000 / (o / (p->kcountsize >> 8));
- else
- s_scale = 0x1000000 / ((o << 8) / p->kcountsize);
-#endif
- } else
- s_scale = SCALE_1_TO_1;
-
- moncontrol(1);
-}
-
-void
-_mcleanup()
-{
- int fd;
- int hz;
- int fromindex;
- int endfrom;
- u_long frompc;
- int toindex;
- struct rawarc rawarc;
- struct gmonparam *p = &_gmonparam;
- struct gmonhdr gmonhdr, *hdr;
- char *proffile;
-#ifdef DEBUG
- int log, len;
- char dbuf[200];
-#endif
-
- if (p->state == GMON_PROF_ERROR)
- ERR("_mcleanup: tos overflow\n");
-
- hz = PROF_HZ;
- moncontrol(0);
-
-#ifdef nope
- if ((profdir = getenv("PROFDIR")) != NULL) {
- extern char *__progname;
- char *s, *t, *limit;
- pid_t pid;
- long divisor;
-
- /* If PROFDIR contains a null value, no profiling
- output is produced */
- if (*profdir == '\0') {
- return;
- }
-
- limit = buf + sizeof buf - 1 - 10 - 1 -
- strlen(__progname) - 1;
- t = buf;
- s = profdir;
- while((*t = *s) != '\0' && t < limit) {
- t++;
- s++;
- }
- *t++ = '/';
-
- /*
- * Copy and convert pid from a pid_t to a string. For
- * best performance, divisor should be initialized to
- * the largest power of 10 less than PID_MAX.
- */
- pid = getpid();
- divisor=10000;
- while (divisor > pid) divisor /= 10; /* skip leading zeros */
- do {
- *t++ = (pid/divisor) + '0';
- pid %= divisor;
- } while (divisor /= 10);
- *t++ = '.';
-
- s = __progname;
- while ((*t++ = *s++) != '\0')
- ;
-
- proffile = buf;
- } else {
- proffile = "gmon.out";
- }
-#else
- proffile = "gmon.out";
-#endif
-
- fd = open(proffile , O_CREAT|O_TRUNC|O_WRONLY|O_BINARY, 0666);
- if (fd < 0) {
- perror( proffile );
- return;
- }
-#ifdef DEBUG
- log = open("gmon.log", O_CREAT|O_TRUNC|O_WRONLY, 0664);
- if (log < 0) {
- perror("mcount: gmon.log");
- return;
- }
- len = sprintf(dbuf, "[mcleanup1] kcount 0x%x ssiz %d\n",
- p->kcount, p->kcountsize);
- write(log, dbuf, len);
-#endif
- hdr = (struct gmonhdr *)&gmonhdr;
- hdr->lpc = p->lowpc;
- hdr->hpc = p->highpc;
- hdr->ncnt = p->kcountsize + sizeof(gmonhdr);
- hdr->version = GMONVERSION;
- hdr->profrate = hz;
- write(fd, (char *)hdr, sizeof *hdr);
- write(fd, p->kcount, p->kcountsize);
- endfrom = p->fromssize / sizeof(*p->froms);
- for (fromindex = 0; fromindex < endfrom; fromindex++) {
- if (p->froms[fromindex] == 0)
- continue;
-
- frompc = p->lowpc;
- frompc += fromindex * p->hashfraction * sizeof(*p->froms);
- for (toindex = p->froms[fromindex]; toindex != 0;
- toindex = p->tos[toindex].link) {
-#ifdef DEBUG
- len = sprintf(dbuf,
- "[mcleanup2] frompc 0x%x selfpc 0x%x count %d\n" ,
- frompc, p->tos[toindex].selfpc,
- p->tos[toindex].count);
- write(log, dbuf, len);
-#endif
- rawarc.raw_frompc = frompc;
- rawarc.raw_selfpc = p->tos[toindex].selfpc;
- rawarc.raw_count = p->tos[toindex].count;
- write(fd, &rawarc, sizeof rawarc);
- }
- }
- close(fd);
-}
-
-/*
- * Control profiling
- * profiling is what mcount checks to see if
- * all the data structures are ready.
- */
-void
-moncontrol(mode)
- int mode;
-{
- struct gmonparam *p = &_gmonparam;
-
- if (mode) {
- /* start */
- profil((char *)p->kcount, p->kcountsize, p->lowpc,
- s_scale);
- p->state = GMON_PROF_ON;
- } else {
- /* stop */
- profil((char *)0, 0, 0, 0);
- p->state = GMON_PROF_OFF;
- }
-}
-
-
diff --git a/winsup/mingw/profile/gmon.h b/winsup/mingw/profile/gmon.h
deleted file mode 100644
index 1f01bf4..0000000
--- a/winsup/mingw/profile/gmon.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/* $OpenBSD: gmon.h,v 1.3 1996/04/21 22:31:46 deraadt Exp $ */
-/* $NetBSD: gmon.h,v 1.5 1996/04/09 20:55:30 cgd Exp $ */
-
-/*-
- * Copyright (c) 1982, 1986, 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)gmon.h 8.2 (Berkeley) 1/4/94
- */
-
-/*
- * This file is taken from Cygwin distribution. Please keep it in sync.
- * The differences should be within __MINGW32__ guard.
- */
-
-#ifndef _SYS_GMON_H_
-#define _SYS_GMON_H_
-
-#ifndef __P
-#define __P(x) x
-#endif
-
-#include <profile.h>
-
-#ifdef __MINGW32__
-#ifndef _BSDTYPES_DEFINED
-typedef unsigned char u_char;
-typedef unsigned short u_short;
-typedef unsigned int u_int;
-typedef unsigned long u_long;
-#define _BSDTYPES_DEFINED
-#endif /* _BSDTYPES_DEFINED */
-#endif /* __MINGW32__*/
-
-/*
- * Structure prepended to gmon.out profiling data file.
- */
-struct gmonhdr {
- u_long lpc; /* base pc address of sample buffer */
- u_long hpc; /* max pc address of sampled buffer */
- int ncnt; /* size of sample buffer (plus this header) */
- int version; /* version number */
- int profrate; /* profiling clock rate */
- int spare[3]; /* reserved */
-};
-#define GMONVERSION 0x00051879
-
-/*
- * histogram counters are unsigned shorts (according to the kernel).
- */
-#define HISTCOUNTER unsigned short
-
-/*
- * fraction of text space to allocate for histogram counters here, 1/2
- */
-#define HISTFRACTION 2
-
-/*
- * Fraction of text space to allocate for from hash buckets.
- * The value of HASHFRACTION is based on the minimum number of bytes
- * of separation between two subroutine call points in the object code.
- * Given MIN_SUBR_SEPARATION bytes of separation the value of
- * HASHFRACTION is calculated as:
- *
- * HASHFRACTION = MIN_SUBR_SEPARATION / (2 * sizeof(short) - 1);
- *
- * For example, on the VAX, the shortest two call sequence is:
- *
- * calls $0,(r0)
- * calls $0,(r0)
- *
- * which is separated by only three bytes, thus HASHFRACTION is
- * calculated as:
- *
- * HASHFRACTION = 3 / (2 * 2 - 1) = 1
- *
- * Note that the division above rounds down, thus if MIN_SUBR_FRACTION
- * is less than three, this algorithm will not work!
- *
- * In practice, however, call instructions are rarely at a minimal
- * distance. Hence, we will define HASHFRACTION to be 2 across all
- * architectures. This saves a reasonable amount of space for
- * profiling data structures without (in practice) sacrificing
- * any granularity.
- */
-#define HASHFRACTION 2
-
-/*
- * percent of text space to allocate for tostructs with a minimum.
- */
-#define ARCDENSITY 2
-#define MINARCS 50
-#define MAXARCS ((1 << (8 * sizeof(HISTCOUNTER))) - 2)
-
-struct tostruct {
- u_long selfpc;
- long count;
- u_short link;
- u_short pad;
-};
-
-/*
- * a raw arc, with pointers to the calling site and
- * the called site and a count.
- */
-struct rawarc {
- u_long raw_frompc;
- u_long raw_selfpc;
- long raw_count;
-};
-
-/*
- * general rounding functions.
- */
-#define ROUNDDOWN(x,y) (((x)/(y))*(y))
-#define ROUNDUP(x,y) ((((x)+(y)-1)/(y))*(y))
-
-/*
- * The profiling data structures are housed in this structure.
- */
-struct gmonparam {
- int state;
- u_short *kcount;
- u_long kcountsize;
- u_short *froms;
- u_long fromssize;
- struct tostruct *tos;
- u_long tossize;
- long tolimit;
- u_long lowpc;
- u_long highpc;
- u_long textsize;
- u_long hashfraction;
-};
-extern struct gmonparam _gmonparam;
-
-/*
- * Possible states of profiling.
- */
-#define GMON_PROF_ON 0
-#define GMON_PROF_BUSY 1
-#define GMON_PROF_ERROR 2
-#define GMON_PROF_OFF 3
-
-/*
- * Sysctl definitions for extracting profiling information from the kernel.
- */
-#define GPROF_STATE 0 /* int: profiling enabling variable */
-#define GPROF_COUNT 1 /* struct: profile tick count buffer */
-#define GPROF_FROMS 2 /* struct: from location hash bucket */
-#define GPROF_TOS 3 /* struct: destination/count structure */
-#define GPROF_GMONPARAM 4 /* struct: profiling parameters (see above) */
-#endif /* !_SYS_GMONH_ */
diff --git a/winsup/mingw/profile/mcount.c b/winsup/mingw/profile/mcount.c
deleted file mode 100644
index 9f1736d..0000000
--- a/winsup/mingw/profile/mcount.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/*-
- * Copyright (c) 1983, 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if !defined(lint) && !defined(_KERNEL) && defined(LIBC_SCCS)
-static char rcsid[] = "$OpenBSD: mcount.c,v 1.6 1997/07/23 21:11:27 kstailey Exp $";
-#endif
-
-/*
- * This file is taken from Cygwin distribution. Please keep it in sync.
- * The differences should be within __MINGW32__ guard.
- */
-
-#ifndef __MINGW32__
-#include <sys/param.h>
-#endif
-#include <sys/types.h>
-#include <gmon.h>
-
-/*
- * mcount is called on entry to each function compiled with the profiling
- * switch set. _mcount(), which is declared in a machine-dependent way
- * with _MCOUNT_DECL, does the actual work and is either inlined into a
- * C routine or called by an assembly stub. In any case, this magic is
- * taken care of by the MCOUNT definition in <machine/profile.h>.
- *
- * _mcount updates data structures that represent traversals of the
- * program's call graph edges. frompc and selfpc are the return
- * address and function address that represents the given call graph edge.
- *
- * Note: the original BSD code used the same variable (frompcindex) for
- * both frompcindex and frompc. Any reasonable, modern compiler will
- * perform this optimization.
- */
-/* _mcount; may be static, inline, etc */
-_MCOUNT_DECL (u_long frompc, u_long selfpc)
-{
- register u_short *frompcindex;
- register struct tostruct *top, *prevtop;
- register struct gmonparam *p;
- register long toindex;
-
- p = &_gmonparam;
- /*
- * check that we are profiling
- * and that we aren't recursively invoked.
- */
- if (p->state != GMON_PROF_ON)
- return;
- p->state = GMON_PROF_BUSY;
- /*
- * check that frompcindex is a reasonable pc value.
- * for example: signal catchers get called from the stack,
- * not from text space. too bad.
- */
- frompc -= p->lowpc;
- if (frompc > p->textsize)
- goto done;
-
-#if (HASHFRACTION & (HASHFRACTION - 1)) == 0
- if (p->hashfraction == HASHFRACTION)
- frompcindex =
- &p->froms[frompc / (HASHFRACTION * sizeof(*p->froms))];
- else
-#endif
- frompcindex =
- &p->froms[frompc / (p->hashfraction * sizeof(*p->froms))];
- toindex = *frompcindex;
- if (toindex == 0) {
- /*
- * first time traversing this arc
- */
- toindex = ++p->tos[0].link;
- if (toindex >= p->tolimit)
- /* halt further profiling */
- goto overflow;
-
- *frompcindex = toindex;
- top = &p->tos[toindex];
- top->selfpc = selfpc;
- top->count = 1;
- top->link = 0;
- goto done;
- }
- top = &p->tos[toindex];
- if (top->selfpc == selfpc) {
- /*
- * arc at front of chain; usual case.
- */
- top->count++;
- goto done;
- }
- /*
- * have to go looking down chain for it.
- * top points to what we are looking at,
- * prevtop points to previous top.
- * we know it is not at the head of the chain.
- */
- for (; /* goto done */; ) {
- if (top->link == 0) {
- /*
- * top is end of the chain and none of the chain
- * had top->selfpc == selfpc.
- * so we allocate a new tostruct
- * and link it to the head of the chain.
- */
- toindex = ++p->tos[0].link;
- if (toindex >= p->tolimit)
- goto overflow;
-
- top = &p->tos[toindex];
- top->selfpc = selfpc;
- top->count = 1;
- top->link = *frompcindex;
- *frompcindex = toindex;
- goto done;
- }
- /*
- * otherwise, check the next arc on the chain.
- */
- prevtop = top;
- top = &p->tos[top->link];
- if (top->selfpc == selfpc) {
- /*
- * there it is.
- * increment its count
- * move it to the head of the chain.
- */
- top->count++;
- toindex = prevtop->link;
- prevtop->link = top->link;
- top->link = *frompcindex;
- *frompcindex = toindex;
- goto done;
- }
- }
-done:
- p->state = GMON_PROF_ON;
- return;
-overflow:
- p->state = GMON_PROF_ERROR;
- return;
-}
-
-/*
- * Actual definition of mcount function. Defined in <machine/profile.h>,
- * which is included by <sys/gmon.h>
- */
-MCOUNT
-
diff --git a/winsup/mingw/profile/profil.c b/winsup/mingw/profile/profil.c
deleted file mode 100644
index dae59d7..0000000
--- a/winsup/mingw/profile/profil.c
+++ /dev/null
@@ -1,185 +0,0 @@
-/* profil.c -- win32 profil.c equivalent
-
- Copyright 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-/*
- * This file is taken from Cygwin distribution. Please keep it in sync.
- * The differences should be within __MINGW32__ guard.
- */
-
-#include <windows.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <errno.h>
-#include <math.h>
-
-#include <profil.h>
-
-#define SLEEPTIME (1000 / PROF_HZ)
-
-/* global profinfo for profil() call */
-static struct profinfo prof;
-
-/* Get the pc for thread THR */
-
-static u_long
-get_thrpc (HANDLE thr)
-{
- CONTEXT ctx;
- u_long pc;
- int res;
-
- res = SuspendThread (thr);
- if (res == -1)
- return (u_long) - 1;
- ctx.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER;
- pc = (u_long) - 1;
- if (GetThreadContext (thr, &ctx))
- pc = ctx.Eip;
- ResumeThread (thr);
- return pc;
-}
-
-/* Display cell of profile buffer */
-#if 0
-static void
-print_prof (struct profinfo *p)
-{
- printf ("profthr %x\ttarget thr %x\n", p->profthr, p->targthr);
- printf ("pc: %x - %x\n", p->lowpc, p->highpc);
- printf ("scale: %x\n", p->scale);
- return;
-}
-#endif
-
-/* Everytime we wake up use the main thread pc to hash into the cell in the
- profile buffer ARG. */
-
-static DWORD CALLBACK
-profthr_func (LPVOID arg)
-{
- struct profinfo *p = (struct profinfo *) arg;
- u_long pc, idx;
-
- for (;;)
- {
- pc = (u_long) get_thrpc (p->targthr);
- if (pc >= p->lowpc && pc < p->highpc)
- {
- idx = PROFIDX (pc, p->lowpc, p->scale);
- p->counter[idx]++;
- }
-#if 0
- print_prof (p);
-#endif
- Sleep (SLEEPTIME);
- }
- return 0;
-}
-
-/* Stop profiling to the profiling buffer pointed to by P. */
-
-static int
-profile_off (struct profinfo *p)
-{
- if (p->profthr)
- {
- TerminateThread (p->profthr, 0);
- CloseHandle (p->profthr);
- }
- if (p->targthr)
- CloseHandle (p->targthr);
- return 0;
-}
-
-/* Create a timer thread and pass it a pointer P to the profiling buffer. */
-
-static int
-profile_on (struct profinfo *p)
-{
- DWORD thrid;
-
- /* get handle for this thread */
- if (!DuplicateHandle (GetCurrentProcess (), GetCurrentThread (),
- GetCurrentProcess (), &p->targthr, 0, FALSE,
- DUPLICATE_SAME_ACCESS))
- {
- errno = ESRCH;
- return -1;
- }
-
- p->profthr = CreateThread (0, 0, profthr_func, (void *) p, 0, &thrid);
-
- /* Set profiler thread priority to highest to be sure that it gets the
- processor as soon it request it (i.e. when the Sleep terminate) to get
- the next data out of the profile. */
-
- SetThreadPriority (p->profthr, THREAD_PRIORITY_TIME_CRITICAL);
-
- if (!p->profthr)
- {
- CloseHandle (p->targthr);
- p->targthr = 0;
- errno = EAGAIN;
- return -1;
- }
- return 0;
-}
-
-/*
- * start or stop profiling
- *
- * profiling goes into the SAMPLES buffer of size SIZE (which is treated
- * as an array of u_shorts of size size/2)
- *
- * each bin represents a range of pc addresses from OFFSET. The number
- * of pc addresses in a bin depends on SCALE. (A scale of 65536 maps
- * each bin to two addresses, A scale of 32768 maps each bin to 4 addresses,
- * a scale of 1 maps each bin to 128k addreses). Scale may be 1 - 65536,
- * or zero to turn off profiling
- */
-int
-profile_ctl (struct profinfo * p, char *samples, size_t size,
- u_long offset, u_int scale)
-{
- u_long maxbin;
-
- if (scale > 65536)
- {
- errno = EINVAL;
- return -1;
- }
-
- profile_off (p);
- if (scale)
- {
- memset (samples, 0, size);
- memset (p, 0, sizeof *p);
- maxbin = size >> 1;
- prof.counter = (u_short *) samples;
- prof.lowpc = offset;
- prof.highpc = PROFADDR (maxbin, offset, scale);
- prof.scale = scale;
-
- return profile_on (p);
- }
- return 0;
-}
-
-/* Equivalent to unix profil()
- Every SLEEPTIME interval, the user's program counter (PC) is examined:
- offset is subtracted and the result is multiplied by scale.
- The word pointed to by this address is incremented. Buf is unused. */
-
-int
-profil (char *samples, size_t size, u_long offset, u_int scale)
-{
- return profile_ctl (&prof, samples, size, offset, scale);
-}
-
diff --git a/winsup/mingw/profile/profil.h b/winsup/mingw/profile/profil.h
deleted file mode 100644
index 9245dd2..0000000
--- a/winsup/mingw/profile/profil.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* profil.h: gprof profiling header file
-
- Copyright 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/*
- * This file is taken from Cygwin distribution. Please keep it in sync.
- * The differences should be within __MINGW32__ guard.
- */
-
-/* profiling frequency. (No larger than 1000) */
-#define PROF_HZ 100
-
-/* convert an addr to an index */
-#define PROFIDX(pc, base, scale) \
- ({ \
- size_t i = (pc - base) / 2; \
- if (sizeof (unsigned long long int) > sizeof (size_t)) \
- i = (unsigned long long int) i * scale / 65536; \
- else \
- i = i / 65536 * scale + i % 65536 * scale / 65536; \
- i; \
- })
-
-/* convert an index into an address */
-#define PROFADDR(idx, base, scale) \
- ((base) \
- + ((((unsigned long long)(idx) << 16) \
- / (unsigned long long)(scale)) << 1))
-
-/* convert a bin size into a scale */
-#define PROFSCALE(range, bins) (((bins) << 16) / ((range) >> 1))
-
-typedef void *_WINHANDLE;
-
-struct profinfo {
- _WINHANDLE targthr; /* thread to profile */
- _WINHANDLE profthr; /* profiling thread */
- u_short *counter; /* profiling counters */
- u_long lowpc, highpc; /* range to be profiled */
- u_int scale; /* scale value of bins */
-};
-
-int profile_ctl(struct profinfo *, char *, size_t, u_long, u_int);
-int profil(char *, size_t, u_long, u_int);
-
diff --git a/winsup/mingw/profile/profile.h b/winsup/mingw/profile/profile.h
deleted file mode 100644
index d1de0f9..0000000
--- a/winsup/mingw/profile/profile.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* $NetBSD: profile.h,v 1.6 1995/03/28 18:17:08 jtc Exp $ */
-
-/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)profile.h 8.1 (Berkeley) 6/11/93
- */
-
-/*
- * This file is taken from Cygwin distribution. Please keep it in sync.
- * The differences should be within __MINGW32__ guard.
- */
-/* If compiler doesn't inline, at least avoid passing args on the stack. */
-#define _MCOUNT_CALL __attribute__ ((regparm (2)))
-#define _MCOUNT_DECL static __inline__ void _MCOUNT_CALL _mcount
-
-/* FIXME: This works, but it would be cleaner to convert mcount into an
- assembler stub that calls an extern _mcount.
- Older versions of GCC (pre-4.1) will still fail with regparm since the
- compiler used %edx to store an unneeded counter variable. */
-
-#define MCOUNT \
-void \
-mcount() \
-{ \
- u_long selfpc, frompcindex; \
- /* \
- * Save registers, since this may be called from \
- * the prologue of a regparm function. \
- */ \
- __asm __volatile__ ("pushl %eax\n\t" \
- "pushl %ecx\n\t" \
- "pushl %edx"); \
- /* \
- * find the return address for mcount, \
- * and the return address for mcount's caller. \
- * \
- * selfpc = pc pushed by mcount call \
- */ \
- /* __asm ("movl 4(%%ebp),%0" : "=r" (selfpc)); */ \
- selfpc = (u_long) __builtin_return_address (0); \
- /* \
- * frompcindex = pc pushed by call into self. \
- */ \
- /* __asm ("movl (%%ebp),%0;movl 4(%0),%0" : "=r" (frompcindex)); */ \
- frompcindex = (u_long) __builtin_return_address (1); \
- _mcount(frompcindex, selfpc); \
- /* \
- * Restore registers. \
- */ \
- __asm __volatile__ ("popl %edx\n\t" \
- "popl %ecx\n\t" \
- "popl %eax"); \
-}
diff --git a/winsup/mingw/pseudo-reloc-list.c b/winsup/mingw/pseudo-reloc-list.c
deleted file mode 100644
index 87a2be2..0000000
--- a/winsup/mingw/pseudo-reloc-list.c
+++ /dev/null
@@ -1,3 +0,0 @@
-/* Define here in .bss in case not defined by linker script. */
-char __RUNTIME_PSEUDO_RELOC_LIST_END__ = 0;
-char __RUNTIME_PSEUDO_RELOC_LIST__ = 0;
diff --git a/winsup/mingw/pseudo-reloc.c b/winsup/mingw/pseudo-reloc.c
deleted file mode 100644
index 9fe607d..0000000
--- a/winsup/mingw/pseudo-reloc.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* pseudo-reloc.c
-
- Written by Egor Duda <deo@logos-m.ru>
- THIS SOFTWARE IS NOT COPYRIGHTED
-
- This source code is offered for use in the public domain. You may
- use, modify or distribute it freely.
-
- This code is distributed in the hope that it will be useful but
- WITHOUT ANY WARRANTY. ALL WARRENTIES, EXPRESS OR IMPLIED ARE HEREBY
- DISCLAMED. This includes but is not limited to warrenties of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-*/
-
-#include <windows.h>
-
-extern char __RUNTIME_PSEUDO_RELOC_LIST__;
-extern char __RUNTIME_PSEUDO_RELOC_LIST_END__;
-extern char _image_base__;
-
-typedef struct
- {
- DWORD addend;
- DWORD target;
- }
-runtime_pseudo_reloc;
-
-static void
-do_pseudo_reloc (void* start, void* end, void* base)
-{
- DWORD reloc_target;
- runtime_pseudo_reloc* r;
- for (r = (runtime_pseudo_reloc*) start; r < (runtime_pseudo_reloc*) end; r++)
- {
- reloc_target = (DWORD) base + r->target;
- *((DWORD*) reloc_target) += r->addend;
- }
-}
-
-void
-_pei386_runtime_relocator ()
-{
- do_pseudo_reloc (&__RUNTIME_PSEUDO_RELOC_LIST__,
- &__RUNTIME_PSEUDO_RELOC_LIST_END__,
- &_image_base__);
-}
diff --git a/winsup/mingw/readme.txt b/winsup/mingw/readme.txt
deleted file mode 100644
index 4b680df..0000000
--- a/winsup/mingw/readme.txt
+++ /dev/null
@@ -1,685 +0,0 @@
- Minimalist GNU-Win32 Readme
- version 0.1.3
- March 20, 1997
- Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
-
-
-0. Introduction
-
-Mingw32 is short for the Minimalist GNU-Win32 package, and it is a
-package which allows you to use GCC (as supplied by Cygnus in their GNU-
-Win32 or Cygwin32 package) the GNU compiler, on Win32 platforms like
-Windows 95 or NT, to compile "native" programs.
-
-In this case "native" means programs which don't require extra DLLs like
-the cygwin DLL. Mingw32 programs use CRTDLL.DLL to provide their C run
-time library functions, and CRTDLL.DLL is supplied with all current
-Win32 platforms. Thus the programs are light weight and easy to
-distribute, they also do not automatically fall under the GNU Public
-License as programs written with the GPL version of Cygwin32 do.
-
-
-0.1 Archive Contents
-
-Mingw32 version 0.1.3 is distributed in two files, mingw32_013.tar.gz
-and mingsrc013.tar.gz. The first file contains the following components:
-
- - Import libraries for building programs which use the
- CRTDLL.DLL C run time library supplied with Win32 platforms.
-
- - crt0.o and dllcrt0.o, two "startup code" object files that
- perform program or DLL initialization without using
- CRTDLL.DLL (instead of CYGWIN.DLL).
-
- - specs, a configuration file for GCC which defines appropriate
- options for creating executables which use the CRTDLL.DLL C
- run time library.
-
- - Include files with appropriate type and macro definitions,
- and function prototypes for use with CRTDLL.DLL.
-
-The source distribution (mingsrc013.tar.gz) contains the .def files and
-source files used to create the various import libraries and object
-files in the above list.
-
-
-0.2 Usage Notes
-
-Unlike some previous releases of Mingw32 the current version defaults to
-building console applications, the same way that GCC normally does when
-installed from the Cygnus distribution. The Mingw32 specs file also
-introduces two command line arguments to GCC which can be used to
-conveniently specify a console or GUI type build. When building console
-programs "-console" can be used on the GCC command line, while GUI
-programs can be built by specifying "-windows" (I tried defining -gui,
-and it works, but produces an annoying warning about -gui not being
-supported (?)). For example:
-
- gcc -o hellogui.exe hellogui.c -luser32 -windows
-
-Although using different "crt0" files for GUI and console applications
-has been suggested I have left the system more-or-less as it was in
-0.1.1: crt0 sets up for and calls main, and if you don't supply a main
-there is one in libmingw32.a, which in turn calls WinMain (actually
-WinMain@16). This allows either main or WinMain entry points in console
-or GUI applications, but if you don't supply main or WinMain, or don't
-prototype WinMain as __stdcall__ you will get a linker error about an
-"unresolved reference to WinMain@16." This is unfortunately cryptic, but
-otherwise the system works quite well.
-
-An important note if you want to rebuild from the sources of Mingw32 or
-otherwise use the special version of Jam made for Mingw32: you need to
-have a version of "rm", the UNIX equivalent of del, somewhere in your
-path to use the current Jambase (which is built into the Jam
-executable). The version that comes with the Cygnus files is perfectly
-adequate.
-
-
-0.3 Fixes and Improvements
-
-Numerous small bug fixes have been made in the header files.
-
-Floating point initialization, originally added in version 0.1.2, has
-been modified to use the _fpreset function from CRTDLL.DLL instead of
-cryptic and possibly less portable assembly code.
-
-A new DLL-building option has been added to the specs file so that the
-following link line will appropriately link in dllcrt0.o instead of the
-normal crt0.o, and set the entry point correctly:
-
- gcc -dll -o dll.dll dll.o -Wl,dll.exp
-
-A bug that would cause the wrong include files to be included in dual
-installations of Cygwin32 and Mingw32 has been fixed (I hope) in the
-Mingw32 specs file.
-
-Alongside this release is a new release of Jam specially built for use
-with Mingw32. It should be available from the same place you got this
-file. This release of Jam includes rules for building DLLs, including
-resources in your executables and creating import libraries. I also
-intend to distribute a small set of example files showing how to do all
-of these things with Mingw32 and Jam.
-
-In the "coming soon" category I have a version of the GNU Standard C++
-library ported to Mingw32. This means you can use iostreams, complex
-numbers and all those neat STL (Standard Template Library) things
-without needing the Cygwin DLL. I hope to put this port up for
-downloading soon (along with the source of course).
-
-
-
-1. Installing
-
-1.1 Download and Unpack GNU-Win32 Beta 17.1
-
-Because of the enormous size of the beta 17.1 release from Cygnus this
-process will require about 85 MB or more of free disk space. The first
-step, after downloading the Mingw32 package, is to download the GCC
-binary distribution, all.tar.gz, from Cygnus (or a mirror), which is
-about 10 MB. (Of course, if you just want the Cygwin32 install and are
-not actually interested in adding on Mingw32 you don't need the Mingw32
-package at all.)
-
-Just to be safe, and if you have the 10 MB to spare, you should probably
-copy the all.tar.gz file to a reasonably safe place at this point. This
-will save you from the pain of downloading it again if something goes
-wrong later.
-
-To complete this step you need a gzip program (or just gunzip) and a tar
-program. You can use the ones supplied by Cygnus (although some people
-seem to have trouble with them, especially if you try to use pipes) or
-one of the other ports available from your favorite freeware/shareware
-software site.
-
-First un-gzip the file with a command line like:
- gunzip all.tar.gz
-or
- gzip -d all.tar.gz
-
-This will produce a all.tar file and erase the all.tar.gz file (there
-are options for gzip if you want to keep the original around). The tar
-file is about 40 MB.
-
-Make a directory for the cygnus stuff, such as C:\cygnus for example.
-Move the tar file there (e.g. move \tmp\all.tar \cygnus). Don’t copy it
-unless you like waiting and wasting 40 MB of disk space.
-
-Unpack the tar file into your new directory with a command line like:
- tar xvf all.tar
-
-Run from the new directory (now containing the tar file). This is the
-step where disk space usage reaches its peak, since the tar extraction
-does not delete the all.tar file, and the amount of space taken by the
-extracted files plus the tar file itself is well in excess of 80 MB
-(mainly because, on my system at least, the files which are symbolic
-links in the tar archive are copied as they are expanded onto the FAT
-filesystem, so for example, a symbolic link to cygwin.dll, a 3 MB file,
-takes an extra 3 MB, since the file is simply duplicated in the new
-location). I could not actually do this on my laptop and had to extract
-the tar file from a mounted network drive!
-
-NOTE: From here on I will refer to files as if you had installed in
-C:\cygnus. If you installed somewhere else then just replace C:\cygnus
-with the appropriate path wherever it occurs.
-
-
-1.2 Setup Cygwin32
-
-This step is not 100% necessary, but it helps at this point to determine
-if you’ve gotten this far without any major problems. Also, if you
-intend to use both Cygwin32 and Mingw32 you will have to do some of
-these steps eventually.
-
-GCC and the other programs in the compiler suite all require cygwin.dll
-to run. There are two copies of this file: one in C:\cygnus\H-i386-
-cygwin32\bin (this might be a symbolic link), and one in C:\cygnus\H-
-i386-cygwin32\i386-cygwin32\lib (the original). Since this DLL is
-required by all Cygwin32 programs it makes sense to put one copy of it
-in your C:\Windows\System directory (or equivalent) and remove the extra
-copies. This will also save you headaches when the next release comes
-along and you have to make sure that everything is using the latest
-release of the DLL.
-
-After doing that run the cygwin32.bat batch file included with this
-distribution, or otherwise perform the following settings:
-
- PATH=%PATH%;C:\cygnus\H-i386-cygwin32\bin
- SET GCC_EXEC_PREFIX=C:\cygnus\H-i386-cygwin32\lib\gcc-lib\i386-
- cygwin32\cygnus-2.7.2-961023
- SET LIBRARY_PATH=/cygnus/H-i386-cygwin32/lib/gcc-lib/i386-
- cygwin32/cygnus-2.7.2-961023:/cygnus/H-i386-cygwin32/i386-
- cygwin32/lib:/cygnus/H-i386-cygwin32/lib
- SET C_INCLUDE_PATH=/cygnus/H-i386-cygwin32/lib/gcc-lib/i386-
- cygwin32/cygnus-2.7.2-961023/include:/cygnus/H-i386-
- cygwin32/i386-cygwin32/include:/cygnus/include
- SET CPLUS_INCLUDE_PATH=%C_INCLUDE_PATH%
-
-NOTE: You may need to increase the amount of environment space available
-at the command prompt to get these extremely long environment variables
-set. You can do this under Windows 95 by modifying the properties of the
-command prompt shortcut you use under the "Program" tab, adding a
-/e:#### argument to the command line COMMAND.COM, where #### is the
-number of bytes to set aside for the environment.
-
-NOTE: Under Windows 95 changes made in your autoexec.bat file will not
-show up in new DOS boxes unless you reboot your machine.
-
-Now write and compile a small test hello world program like this:
-
-#include <stdio.h>
-
-int
-main ()
-{
- printf ("Hello, world!\n");
- return 0;
-}
-
-Then compile it like this (assuming your file is called hello.c):
-
- gcc -o hello.exe hello.c
-
-The compile should proceed without problems and you should be able to
-run the hello program at the end. It should print "Hello, world!"
-(without the quotes) to the console and then return to the command
-prompt.
-
-If you wanted a full Cygwin32 install you now have it. With this setup
-(say, by adding those lines above to your autoexec.bat or global
-settings) you can port a great deal of UNIX code to run under Win32
-systems. No more steps are necessary.
-
-If you are a minimalist or otherwise want to save disk space you should
-continue from here. Also if you intend to use the Minimalist GNU-Win32
-files to compile programs which don't use the Cygwin32 API you will need
-to do some of the things mentioned below.
-
-If the compile didn't work for some reason check very carefully that you
-followed the instructions above correctly and then check whether one or
-more of the files in the download got corrupted. If neither of these
-seems to be the case then your system is not behaving like my system.
-Try looking at the troubleshooting section later in this file, and if
-none of that helps then you can email me (colin@bird.fu.is.saga-
-u.ac.jp), though I can't promise I'll be a lot of help.
-
-
-1.3 Separating the Win32 API Files
-
-Mingw32 and Cygwin32 share the same set of Win32 API include files and
-import libraries as included in the GCC distribution from Cygnus. In
-order to use the Win32 API with a dual setup or with Mingw32 alone you
-will have to separate those files from the bulk of the Cygwin32 API
-files.
-
-Make a new directory to serve as the root for the Win32 API files. I put
-mine under C:\cygnus and called it win32, but you can put it where you
-like and just replace later references to C:\cygnus\win32 with your own
-root directory.
-
-Move the following from C:\cygnus\H-i386-cygwin32\i386-cygwin32\include
-to a new C:\cygnus\win32\include directory:
-
-windows.h, winadvapi.h, winbase.h, wincon.h, windef.h, windowsx.h,
-winerror.h, wingdi.h, winkernel.h, winnt.h, wintypes.h, winuser.h,
-winversion.h, commdlg.h, ddeml.h and the Windows32 sub-directory and all
-its contents.
-
-Move the following files from C:\cygnus\H-i386-cygwin32\i386-
-cygwin32\lib to a new C:\cygnus\win32\lib directory:
-
-libadvapi32.a, libcomctl32.a, libcomdlg32.a, libctl3d32.a, libgdi32.a,
-libglaux.a, libglu32.a, libimm32.a, libkernel32.a, liblz32.a,
-libmapi32.a, libmfcuia32.a, libmgmtapi.a, libmpr.a, libmsacm32.a,
-libnddeapi.a, libnetapi32.a, libodbc32.a, libodbccp32.a, libole32.a,
-liboleaut32.a, liboledlg.a, libolepro32.a, libopengl32.a, libpenwin32.a,
-libpkpd32.a, librasapi32.a, librpcdce4.a, librpcndr.a, librpcns4.a,
-librpcrt4.a, libscrnsave.a, libshell32.a, libsnmp.a, libsvrapi.a,
-libtapi32.a, libth32.a, libthunk32.a, liburl.a libuser32.a, libvdmdbg.a,
-libversion.a, libvfw32.a, libwin32spl.a, libwinmm.a, libwinserve.a,
-libwinspool.a, libwinstrm.a, libwow32.a, libwsock32.a, libwst.a.
-
-That list is quite excessive for most basic Windows programming, which
-will only require kernel32, user32, gdi32, shell32 and possibly a couple
-of others like the common control and dialog libraries or advapi32. You
-may not need the ODBC support, or OLE, or Pen Windows, TAPI and on and
-on. Still, if you have the space and intend to use the Win32 API you
-might as well keep the ones you’re not sure you’ll ever use around.
-
-The lists above can also act as lists of files you can safely delete if
-you are never going to use the Win32 API in your programs except that
-libkernel32.a is still required even if you don’t use the Win32 API
-yourself. Note that this means that libkernel32.a must be on the library
-path as well, even if you don’t use the Win32 API. (Actually this
-appears to be an artifact of the specs file supplied with Cygwin32. If
-you like, and feel up to it, you can play around with the specs file and
-remove the reference to kernel32.)
-
-Here are the variable settings you need to make to allow GCC to find the
-Win32 API files in their new positions:
-
- SET LIBRARY_PATH=%LIBRARY_PATH%:/cygnus/win32/lib
- SET C_INCLUDE_PATH=%C_INCLUDE_PATH%:/cygnus/win32/include
- SET CPLUS_INCLUDE_PATH=%CPLUS_INCLUDE_PATH%:/cygnus/win32/include
-
-The file win32-api.bat performs these settings. Run it after you run
-cygwin32.bat (or mingw32.bat below).
-
-At this point you should be able to compile programs that use the Win32
-API, just as you could before. You might want to do a simple test
-compile to find out, for example this code:
-
-#include <windows.h>
-
-int STDCALL
-WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow)
-{
- MessageBox (NULL, "Test message", "Test", MB_OK);
- return 0;
-}
-
-Should compile with the following command line:
- gcc -o test.exe test.c -lkernel32 -luser32 -Wl,--subsystem,windows
-
-It will produce a warning at link time about not finding
-_WinMainCRTStartup, but this is harmless.
-
-If you have trouble check the troubleshooting section later in this
-file.
-
-
-1.4 Specs
-
-The file C:\cygnus\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\cygnus-
-2.7.2-961023\specs includes a set of options and defaults for GCC,
-including such things as which libraries are automatically linked into
-executables and such. A different specs file is required depending on
-whether you use Cygwin32 or Mingw32.
-
-To avoid GCC accidentally using the wrong specs file move specs to
-C:\cygnus\H-i386-cygwin32\i386-cygwin32\lib.
-
-You can verify what specs file is being used by attempting a compile
-with the -v option to gcc. Note that if no specs file is mentioned the
-compiler will default to Cygwin32 behavior.
-
-
-1.5 The Mingw32 Files
-
-Now we can install the Mingw32 files and start making programs which
-don’t use cygwin.dll or the Cygwin32 API. I install my copy under a
-separate directory called C:\mingw32, but you could put them wherever
-you like (e.g. C:\cygnus\mingw32). Again simply replace references to
-C:\mingw32 with the directory where you perform your installation.
-
-After making the install directory copy mingw32_012.tgz to that
-directory and run a command like this:
- gunzip -d mingw32_012.tgz
-
-in that directory, followed by:
- tar xvf mingw32_012.tar
-
-This will unpack the required files. Then you can use the following
-environment variable settings (as included in mingw32.bat) to setup for
-compiles using Mingw32:
-
- PATH=%PATH%;C:\cygnus\H-i386-cygwin32\bin
- SET GCC_EXEC_PREFIX=C:\cygnus\H-i386-cygwin32\lib\gcc-lib\i386-
- cygwin32\cygnus-2.7.2-961023\
- SET LIBRARY_PATH=/mingw32/lib
- SET C_INCLUDE_PATH=/mingw32/include:/mingw32/include/nonansi
- SET CPLUS_INCLUDE_PATH=%C_INCLUDE_PATH%
-
-The mingw32.bat file can be used the same way as the cygwin32.bat file.
-Depending on which one you run you will be able to do Mingw32 compiles
-or Cygwin32 compiles. Note that whichever one you use you must follow it
-with an invocation of win32-api.bat so that libkernel32.a will be in the
-library path.
-
-Setup is now complete, you have complete working Mingw32 and Cygwin32
-compiles available along with the bash shell, tons of UNIX-like
-utilities.
-
-If you had trouble with any of the steps above then the next section is
-for you.
-
-
-
-2. Troubleshooting Setup Problems
-
-If you ran into trouble at any stage in the section 1 here are a few
-general guidelines as well as some solutions to common problems.
-
-2.1 Winzip, gunzip or tar Complains of Errors
-
-Winzip may complain that it could not create a file with garbage
-characters in it's name. Gunzip, gzip or tar may complain about
-formatting errors. Usually this means that the downloaded file is
-corrupted. As of this writing this problem was most commonly caused when
-downloading the files from Geocities using Netscape Navigator for
-Windows 95 or NT. A combination of a badly set MIME type at Geocities
-and a bug in Netscape will corrupt files saved with "Save Link As" (and
-clicking on the links would display the files as garbage text). At this
-time the only solutions are to use another browser (IE, or Netscape for
-UNIX or Apple systems) or to download from the Japanese mirror
-(http://www.fu.is.saga-u.ac.jp/~colin/gcc.html). Hopefully Geocities
-will eventually fix their problem.
-
-
-2.2 Compile and Link Time Problems: General Steps
-
-First, evaluate that your environment variables are what you expect them
-to be by running the SET command with no arguments (if you are using the
-bash shell then the output of env might also be illuminating). Do this
-immediately before you attempt a compile in the same window as the
-compile.
-
-Secondly include the '-v' option on the gcc command line. This will give
-you far more information on what happens during the compile, especially
-important are which specs file is being used and what include file
-directories are being read, as well as the arguments to cpp and ld.
-
-If you send me email about a problem the output of these two general
-steps will be very helpful in making a diagnosis.
-
-
-2.3 Cannot exec 'cpp'
-
-On compiling you get an error message like this:
-
- GCC.EXE: installation problem, cannot exec `cpp': No such file
- or directory
- GCC.EXE: Internal compiler error: program cpp got fatal signal 127
-
-This means more or less what it says. The program cpp is the C
-preprocessor (it strips comments and interprets all those lines
-beginning in '#') and running it is the first step in compiling a C or
-C++ program. The problem here is that GCC.EXE cannot find CPP.EXE.
-Normally CPP.EXE is in the directory C:\cygnus\H-i386-cygwin32\lib\gcc-
-lib\i386-cygwin32\cygnus-2.7.2-961023\. If the file is there then
-probably the GCC_EXEC_PREFIX environment variable is not correctly set.
-
-
-2.4 Can't Find Include Files
-
-You get an error like this:
-
- hello.c:2: No include path in which to find stdio.h
-
-This, again, means what it says (more or less). The compiler cannot find
-the file stdio.h which is #included in the source file hello.c at line
-2. Of course the particular file names may differ in your case. If this
-is not simply a case of including a really non-existent file or
-misspelling the file name then probably your C_INCLUDE_PATH or
-CPLUS_INCLUDE_PATH environment variable is wrong. (If not, see "But the
-environment variables are right" below.)
-
-
-2.5 Can't Find Libraries
-
-At link time you get an error like this:
-
- ld: cannot open -lkernel32: No such file or directory
-
-This one is a bit cryptic, mainly because the name of the file that
-can't be opened is not "-lkernel32" but "libkernel32.a". "-lname" is the
-ld command line syntax for linking the library named "libname.a". So
-basically this error is saying it can't find libkernel32.a (or whatever
-library matches the error you got). If you weren't trying to manually
-link in a library that doesn't exist or was misspelled (by accidentally
-including the 'lib' or '.a' on the command line for example) then
-probably your LIBRARY_PATH environment variable is wrong. (If not, see
-"But the environment variables are right" below.)
-
-
-2.6 But the Environment Variables are Right!
-
-You had one of the problems with not finding include files or libraries
-but the environment variables all seem to be pointing at the right
-places and the files are all there.
-
-If you installed on a drive other than C: drive this may be your
-problem. The Cygwin DLL, and thus all the basic compiler tools,
-automatically map C: drive to (UNIX-style) '/'. Thus /cygnus is actually
-C:\cygnus. There are a few ways to fix this (without reinstalling on C:
-drive):
-
- - Map your actual install directory to /cygnus using mount
- (mount.exe is included with the Cygnus distribution). Simply
- type "mount D:\mydir /cygnus" (assuming you installed in the
- directory \mydir on D: drive). Similar tricks can be used for
- other directories which you may have installed on other drives.
-
- - Change the mount of C: to / to the actual install drive. This is
- possible by using the registry editor (regedit) included with
- Windows. Start the editor and go to the key (or folder) "My
- Computer\HKEY_CURRENT_USER\Software\Cygnus Support\CYGWIN.DLL
- setup\b15.0\mounts". Under this key there are several numbered
- keys. One of them will have the variables "native" set to "c:" and
- "unix" set to "/". Change the value of "native" to whatever drive
- you did your install on and everything should be fixed. NOTE: You
- should probably do this after a fresh boot with no Cygnus based
- programs running.
-
-
-2.7 Unresolved References to _impure_ptr and/or _ctype_ etc.
-
-At link time your code produces unresolved references to _impure_ptr,
-_ctype_ and/or _errno, among others.
-
-This is the result of using the Cygwin header files but linking against
-the Mingw32 libraries. I have hopefully managed to fix the bug that used
-to cause this problem on any dual installation, but perhaps I haven't.
-To check you can run gcc with the -v option and see if the list of
-directories searched for include files contains any include directories
-with Cygwin headers in them. If everything is working correctly you
-should only see the directories on your C_INCLUDE_PATH in this list.
-
-If you have this problem then you may have to modify the Mingw32 specs
-file, specifically the part that says:
-
-*cpp:
-%{posix:-D_POSIX_SOURCE} -iprefix /mingw32/include/
-
-These are options that get passed to the C preprocessor by gcc. Consult
-the documentation for cpp and try options other than -iprefix. You may
-have to use -nostdinc and/or -nostdinc++ plus -I options to get the
-correct behavior.
-
-
-2.8 My Program Doesn't Print Any Output OR My Windows Program Creates
- A Console Window
-
-Your console application runs, but doesn't print any output, or your GUI
-application runs fine, but always creates an extra console window when
-run from Explorer or by double clicking on an icon.
-
-These are basically two sides of the same coin. You have created a GUI
-(or console) application when you meant to create a console (or GUI)
-application. By default gcc creates console applications. If you make a
-windows GUI application with a WinMain and all that you will still get a
-console application if you don't tell gcc what to do at link time. The
-relevant options are "-windows" "-Wl,--subsystem,windows" or "-Wl,--
-subsystem,console". The first two, if used on a gcc link line, will
-create a proper GUI application. The last will make sure you are making
-a console application.
-
-
-
-3. Optimizing and Reducing Disk Space Usage
-
-There are still vast amounts of disk space used by the Cygwin32
-installation on your hard-drive, and much of it can be removed while
-still maintaining a fully functional compiler system. The following
-sections point out which files you actually need for certain tasks, so
-that you won’t delete them.
-
-
-3.1 Bare Minimum
-
-For C only, Mingw32 compiles which don’t use the Win32 API, and if you
-don’t want to produce DLLs or do debugging with any of the GNU tools the
-list of files required is as follows:
-
-In C:\cygnus\H-i386-cygwin32\bin:
- ar.exe, as.exe, gcc.exe, ld.exe
-
-In C:\cygnus\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\cygnus-2.7.2-
-961023:
- cc1.exe, cpp.exe, libgcc.a
-
-In C:\cygnus\win32\lib:
- libkernel32.a
-
-Plus all the files in C:\mingw32\lib and C:\mingw32\include and their
-subdirectories.
-
-
-3.2 C++ Support
-
-To add C++ Support to the above the following extra files are required:
-
-In C:\cygnus\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\cygnus-2.7.2-
-961023:
- cc1plus.exe
-
-Note that this does not include support for the standard C++ libraries
-(only the C run time libraries) or for iostreams. That support is still
-only available with the Cygwin32 API.
-
-
-3.3 Extra Utilities of Extreme Usefulness
-
-Even if you do not use the bash shell or UNIX utilities in general some
-of the utilities in C:\cygnus\H-i386-cygwin32\bin are extremely useful
-for debugging and probably shouldn’t be deleted if you intend to do any
-actual programming using the system.
-
-These include:
- dlltool.exe, gdb.exe, nm.exe, and strip.exe.
-
-
-3.4 Jam
-
-Jam is a make replacement program that I use pretty much exclusively,
-which is why you don't find any Makefile, makefile, makefile.mk or all
-that in the stuff that I do. You do find jamfiles and the occaisional
-mk.bat file. The executable of Jam is only 80 KB and the program is
-incredibly useful, so I would encourage you do download the special
-Mingw32 version and check it out. The Mingw32 version has built in rules
-for adding resources, building DLLs and import libraries as well as
-normal C and C++ files. The source code is, of course, freely available.
-
-The actual point of this section though, is to point out that to use Jam
-you need not only the Jam executable but also rm.exe from the Cygwin
-distribution. You also might want to download rcl.exe and res2coff.exe
-as these are the helper programs Jam expects to use for resource script
-handling.
-
-
-4. Legalities
-
-All of the code in the Mingw32 package is available as public domain
-source. You may use and modify the code as you like. Of course I
-encourage you to write software which is free, either public domain or
-under the GNU Public License for example, but that is up to you. Linking
-with the libraries included with Mingw32 similarly does not impose any
-licensing restrictions on your code or binaries.
-
-The library libgcc.a, which is linked into all code produced with GCC,
-is under a special version of the LGPL (as far as I know, you should
-check for yourself) which allows the distribution of programs which are
-simply linked with unmodified versions of libgcc.a with no licensing
-restrictions.
-
-Thus, using Mingw32, you should be able to produce code with no
-licensing restrictions imposed by use of the compiler or libraries. The
-Cygwin32 API, and the GNU libraries are another matter and you should
-consult their license agreements.
-
-Again I must stress that I am not a lawyer and the above statements only
-reflect my personal understanding of the situation. You would be well
-advised to consult the actual text of the appropriate copyright notices
-and license agreements if you have any concerns.
-
-
-5. Support
-
-First of all, the Mingw32 code is supplied AS IS with NO WARRANTY either
-EXPRESS or IMPLIED.
-
-There is also no support staff standing by to take your calls. There
-are, however, a few people, including myself, using Mingw32 who might be
-able to help you. If you have problems you can email me at
-colin@bird.fu.is.saga-u.ac.jp and I will try to get back to you. No
-guarantees, but I will do my best.
-
-
-6. Suggestions and Contributions
-
-If you find a bug in the Mingw32 files themselves then feel free to
-report it, or even better to supply a fix, by emailing me at
-colin@bird.fu.is.saga-u.ac.jp. Any fixes I receive will probably go into
-the next release, and if they seem high-priority I may put the patched
-files on my web page until I can make a complete release. Please note
-that if you supply code it must be in the public domain or I cannot
-include it in Mingw32. Please attach an appropriate legal message to the
-code or otherwise make sure that there are no copyright issues. Of
-course if you just suggest a possible method for solving a problem or
-point out a bug then there should be no need for all that.
-
-Note that the Win32 API header files are not actually part of the
-Mingw32 package. I know there are many bugs and omissions, and I try to
-keep informed about them, so I do appreciate mail pointing them out.
-However I can’t fix these problems at the source. You should send email
-to Scott Christley (the author of the GPL windows32-api) or possibly to
-Cygnus. Sending email to me might get me to mention it on my homepage or
-fix it in my personal copy of the header files, but that’s about it
-(sorry).
-
-Aside from bug reports, suggestions for improvements, testing of the
-header files and otherwise praise or criticism is all welcome in my
-inbox.
-
-Good luck,
-Colin Peters (colin@bird.fu.is.saga-u.ac.jp)
-
diff --git a/winsup/mingw/samples/dirent/jamfile b/winsup/mingw/samples/dirent/jamfile
deleted file mode 100644
index c920ffe..0000000
--- a/winsup/mingw/samples/dirent/jamfile
+++ /dev/null
@@ -1,3 +0,0 @@
-
-Main test.exe : test.c ;
-
diff --git a/winsup/mingw/samples/dirent/test.c b/winsup/mingw/samples/dirent/test.c
deleted file mode 100644
index 9ff4267..0000000
--- a/winsup/mingw/samples/dirent/test.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * A test which demonstrates the use of opendir and related functions
- * declared in dirent.h.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-
-#include <dirent.h>
-
-int
-main (int argc, char* argv[])
-{
- int i;
- struct dirent* de;
- DIR* dir;
- long lPos;
-
- if (argc == 2)
- {
- printf ("Opening directory \"%s\"\n", argv[1]);
- dir = opendir(argv[1]);
- }
- else
- {
- printf ("Opening \".\"\n");
- dir = opendir(".");
- }
-
- if (!dir)
- {
- printf ("Directory open failed!\n");
- if (errno)
- {
- printf ("Error : %s\n", strerror(errno));
- }
- return 1;
- }
-
- i = 0;
- lPos = -1;
-
- while (de = readdir (dir))
- {
- i++;
- printf ("%d : \"%s\" (tell %ld)\n", i, de->d_name,
- telldir(dir));
-
- if (i == 3)
- {
- printf ("We will seek here later.\n");
- lPos = telldir (dir);
- }
- }
-
- printf ("Rewind directory.\n");
- rewinddir (dir);
-
- if (de = readdir (dir))
- {
- printf ("First entry : \"%s\"\n", de->d_name);
- }
- else
- {
- printf ("Empty directory.\n");
- }
-
- if (lPos != -1)
- {
- printf ("Seeking to fourth entry.\n");
- seekdir (dir, lPos);
-
- if (de = readdir (dir))
- {
- printf ("Fourth entry : \"%s\"\n", de->d_name);
- }
- else
- {
- printf ("No fourth entry.\n");
- }
- }
- else
- {
- printf ("Seek position is past end of directory.\n");
- }
-
- printf ("Closing directory.\n");
- closedir (dir);
-}
-
diff --git a/winsup/mingw/samples/dirent/wtest.c b/winsup/mingw/samples/dirent/wtest.c
deleted file mode 100644
index 7985443..0000000
--- a/winsup/mingw/samples/dirent/wtest.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * A test which demonstrates the use of _wopendir and related
- * wide char functions declared in dirent.h.
- *
- * TODO: Make this _UNICODE neutral using tchar.h mappings.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <dirent.h>
-
-int
-main (int argc, char* argv[])
-{
- int i;
- struct _wdirent* de;
- _WDIR* dir;
- long lPos;
-
- if (argc == 2)
- {
- size_t len = strlen(argv[1]) + 1;
- wchar_t* wpath = (wchar_t*) malloc(len *sizeof(wchar_t));
- mbstowcs(wpath, argv[1], len);
- wprintf (L"Opening directory \"%s\"\n", wpath);
- dir = _wopendir(wpath);
- free (wpath);
- }
- else
- {
- wprintf (L"Opening \".\"\n");
- dir = _wopendir(L".");
- }
-
- if (!dir)
- {
- wprintf (L"Directory open failed!\n");
- if (errno)
- {
- wprintf (L"Error : %S\n", strerror(errno));
- }
- return 1;
- }
-
- i = 0;
- lPos = -1;
-
- while ((de = _wreaddir (dir)))
- {
- i++;
- wprintf (L"%d : \"%s\" (tell %ld)\n", i, de->d_name,
- _wtelldir(dir));
-
- if (i == 3)
- {
- wprintf (L"We will seek here later.\n");
- lPos = _wtelldir (dir);
- }
- }
-
- printf ("Rewind directory.\n");
- _wrewinddir (dir);
-
- if ((de = _wreaddir (dir)))
- {
- wprintf (L"First entry : \"%s\"\n", de->d_name);
- }
- else
- {
- wprintf (L"Empty directory.\n");
- }
-
- if (lPos != -1)
- {
- wprintf (L"Seeking to fourth entry.\n");
- _wseekdir (dir, lPos);
-
- if ((de = _wreaddir (dir)))
- {
- wprintf (L"Fourth entry : \"%s\"\n", de->d_name);
- }
- else
- {
- wprintf (L"No fourth entry.\n");
- }
- }
- else
- {
- wprintf (L"Seek position is past end of directory.\n");
- }
-
- wprintf (L"Closing directory.\n");
- _wclosedir (dir);
-return 0;
-}
-
diff --git a/winsup/mingw/samples/dlltest/dll.c b/winsup/mingw/samples/dlltest/dll.c
deleted file mode 100644
index 257b1b8..0000000
--- a/winsup/mingw/samples/dlltest/dll.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Source code of the functions inside our test DLL. Note that DllMain is
- * not required (it will be provided by the stub in libmingw32.a).
- */
-
-#if 0
-#include <windows.h>
-#endif
-
-int Add (int x, int y)
-{
- printf ("In add!\nx = %d\ny = %d\n", x, y);
- return (x + y);
-}
-
-
-double __attribute__((stdcall)) Sub (double x, double y)
-{
- printf ("In sub!\nx = %f\ny = %f\n", x, y);
- return (x - y);
-}
-
diff --git a/winsup/mingw/samples/dlltest/dll.def b/winsup/mingw/samples/dlltest/dll.def
deleted file mode 100644
index b20a405..0000000
--- a/winsup/mingw/samples/dlltest/dll.def
+++ /dev/null
@@ -1,3 +0,0 @@
-EXPORTS
-Add
-Sub@16
diff --git a/winsup/mingw/samples/dlltest/dll.h b/winsup/mingw/samples/dlltest/dll.h
deleted file mode 100644
index 8fac533..0000000
--- a/winsup/mingw/samples/dlltest/dll.h
+++ /dev/null
@@ -1,4 +0,0 @@
-
-int Add (int x, int y);
-double __attribute__((stdcall)) Sub (double x, double y);
-
diff --git a/winsup/mingw/samples/dlltest/exe.c b/winsup/mingw/samples/dlltest/exe.c
deleted file mode 100644
index d778348..0000000
--- a/winsup/mingw/samples/dlltest/exe.c
+++ /dev/null
@@ -1,23 +0,0 @@
-#include <stdio.h>
-
-#include "dll.h"
-
-int main()
-{
- int i, j, k;
- double dk;
-
- i = 10;
- j = 13;
-
- k = Add(i, j);
-
- printf ("%d + %d = %d\n", i, j, k);
-
- dk = Sub(i, j);
-
- printf ("%d - %d = %f\n", i, j, dk);
-
- return 0;
-}
-
diff --git a/winsup/mingw/samples/dlltest/exe.exp b/winsup/mingw/samples/dlltest/exe.exp
deleted file mode 100644
index 887fdb0..0000000
--- a/winsup/mingw/samples/dlltest/exe.exp
+++ /dev/null
@@ -1,8 +0,0 @@
-In add!
-x = 10
-y = 13
-10 + 13 = 23
-In sub!
-x = 10
-y = 13
-10 - 13 = -3
diff --git a/winsup/mingw/samples/dlltest/expexe.c b/winsup/mingw/samples/dlltest/expexe.c
deleted file mode 100644
index d94ea1e..0000000
--- a/winsup/mingw/samples/dlltest/expexe.c
+++ /dev/null
@@ -1,17 +0,0 @@
-
-#include <stdio.h>
-
-int
-ExportedFromExe ()
-{
- printf ("This output produced by ExportedFromExe.\n");
- return 0;
-}
-
-int main()
-{
- printf ("Hello, world\n");
-
- return 0;
-}
-
diff --git a/winsup/mingw/samples/dlltest/expexe.def b/winsup/mingw/samples/dlltest/expexe.def
deleted file mode 100644
index 309f150..0000000
--- a/winsup/mingw/samples/dlltest/expexe.def
+++ /dev/null
@@ -1,2 +0,0 @@
-EXPORTS
-ExportedFromExe
diff --git a/winsup/mingw/samples/dlltest/jamfile b/winsup/mingw/samples/dlltest/jamfile
deleted file mode 100644
index 5278d03..0000000
--- a/winsup/mingw/samples/dlltest/jamfile
+++ /dev/null
@@ -1,46 +0,0 @@
-
-# This option is required to successfully return doubles via STDCALL as in
-# Sub function in dll.c.
-CCFLAGS = -mno-fp-ret-in-387 ;
-
-Main exe.exe : exe.c ;
-
-LinkLibraries exe.exe : libdll.a ;
-
-DEPENDS exe.exe : dll.dll ;
-
-LINKFLAGS on exe.exe = $(LINKFLAGS) -L. ;
-
-
-Main loaddll.exe : loaddll.c ;
-
-DEPENDS loaddll.exe : dll.dll ;
-
-
-Dll dll.dll : dll.c ;
-
-ImportLib libdll.a : dll.def ;
-
-
-Main expexe.exe : expexe.c ;
-
-# Force the executable to include the expexe.def file.
-Exports expexe.exe : expexe.def ;
-
-Main loadexe.exe : loadexe.c ;
-
-DEPENDS loadexe.exe : expexe.exe ;
-
-
-Main silly.exe : silly.cpp ;
-
-LinkLibraries silly.exe : libsilly.a ;
-
-DEPENDS silly.exe : silly.dll ;
-
-LINKFLAGS on silly.exe += -L. ;
-
-Dll silly.dll : sillydll.cpp ;
-
-ImportLib libsilly.a : silly.def ;
-
diff --git a/winsup/mingw/samples/dlltest/loaddll.c b/winsup/mingw/samples/dlltest/loaddll.c
deleted file mode 100644
index ec69c9a..0000000
--- a/winsup/mingw/samples/dlltest/loaddll.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * This version attempts to load dll.dll dynamically, get the address of the
- * Add function, and then call it.
- */
-
-#include <stdio.h>
-#include <windows.h>
-
-int (*Add)(int x, int y);
-
-int main()
-{
- HINSTANCE hDll;
- int i, j, k;
-
- hDll = LoadLibrary ("dll.dll");
- if (!hDll)
- {
- printf ("Error %d loading dll.\n", GetLastError());
- exit (-1);
- }
-
- if (!(Add = GetProcAddress (hDll, "Add")))
- {
- printf ("Error %d getting Add function.\n", GetLastError());
- exit (-1);
- }
-
- i = 10;
- j = 13;
-
- k = Add(i, j);
-
- printf ("i %d, j %d, k %d\n", i, j, k);
-
- FreeLibrary (hDll);
-
- return 0;
-}
-
diff --git a/winsup/mingw/samples/dlltest/loadexe.c b/winsup/mingw/samples/dlltest/loadexe.c
deleted file mode 100644
index 2ee4e84..0000000
--- a/winsup/mingw/samples/dlltest/loadexe.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * This program attempts to load expexe.exe dynamically, get the address of the
- * ExportedFromExe function, and then call it.
- *
- * This example DOES NOT WORK! I don't know exactly what can be done, but
- * it simply seems that LoadLibrary refuses to load executables.
- */
-
-#include <stdio.h>
-#include <windows.h>
-
-int (*ExportedFromExe)();
-
-int main()
-{
- HINSTANCE hDll;
- int i, j, k;
-
- hDll = LoadLibrary ("expexe.exe");
- if (!hDll)
- {
- printf ("Error %d loading exe.\n", GetLastError());
- exit (-1);
- }
-
- if (!(ExportedFromExe = GetProcAddress (hDll, "ExportedFromExe")))
- {
- printf ("Error %d getting ExportedFromExe function.\n",
- GetLastError());
- exit (-1);
- }
- else
- {
- ExportedFromExe ();
- }
-
- /* NOTE: Unlike a DLL the exe doesn't have an entry point which
- * initializes global objects and adds __do_global_dtors to
- * the atexit list. Thus it should be safe(?) to free the
- * library. Of course, this also makes it unsafe to use
- * executables at all in this manner.
- */
- FreeLibrary (hDll);
-
- return 0;
-}
-
diff --git a/winsup/mingw/samples/dlltest/readme.txt b/winsup/mingw/samples/dlltest/readme.txt
deleted file mode 100644
index 3d31013..0000000
--- a/winsup/mingw/samples/dlltest/readme.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-This directory contains two examples of building DLLs. The exe.c and dll.c
-files are used to build a very simple example DLL with a function that
-adds two numbers together (and prints some text at the same time). The
-exe.c program links to the DLL and prints the results of the function
-call.
-
-The C++ example "silly" is more interesting because it involves a DLL which
-contains the code for a C++ class. The CSilly class has all of its code in
-the sillydll.cpp source file, which is used to build the silly.dll. The
-silly.cpp source code builds the main silly.exe executable which makes a
-dynamic instance of the object and calls its member functions.
-
-The C++ silly.def file was generated by doing a nm of sillydll.o after it
-was generated and then getting the symbol names from that. Removing the
-leading underscore produces the appropriate name to include in the EXPORTS
-section. Notice there are a few weird functions.
-
-Since there are now several different versions of the GNU compiler capable
-of doing this, and they each seem to have different requirements for exports
-for classes, it has gotten kind of messy. The silly.def file here is for
-use with the native Mingw32 build of the EGCS version of GCC. The silly.def.old
-file was the def file I used when I was using Jan-Jaap's Mingw32 native port
-of GCC. The Cygnus version is different again, if I recall correctly, but I
-don't have it hanging around anymore.
-
-The jamfile builds all the components from the raw sources.
-
-The expected output of exe.exe and silly.exe are in the files exe.exp
-and silly.exp.
-
-
-The source code in this directory is in the PUBLIC DOMAIN and can be
-used or abused as you see fit. There is NO WARRANTY for this code,
-including (but not limited to) implied warranties of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE.
-
-
-Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
-
diff --git a/winsup/mingw/samples/dlltest/silly.cpp b/winsup/mingw/samples/dlltest/silly.cpp
deleted file mode 100644
index ee9e1fe..0000000
--- a/winsup/mingw/samples/dlltest/silly.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-//
-// C++ test of a dll which contains a C++ class.
-//
-
-#include <stdlib.h>
-#include <stdio.h>
-
-// Interface of class.
-#include "silly.h"
-
-#ifdef DERIVED_TEST
-// Here is a derived class too.
-class CMoreSilly : public CSilly
-{
- public:
- CMoreSilly (char* szNewName) : CSilly (szNewName) {};
- ~CMoreSilly ();
-
- WhatsYourName();
-};
-
-CMoreSilly::
-~CMoreSilly ()
-{
- printf ("In CMoreSilly \"%s\" destructor!\n", szName);
-}
-
-CMoreSilly::
-WhatsYourName ()
-{
- printf ("I'm more silly and my name is \"%s\"\n", szName);
-}
-#endif
-
-int
-main ()
-{
- CSilly* psilly = new CSilly("silly");
-
- psilly->WhatsYourName();
- psilly->Poke(); // Poke him, he should say "Ouch!"
- psilly->Stab(4); // Stab him four times he should say "Ugh!!!!"
-
- delete psilly;
-
-#ifdef DERIVED_TEST
- psilly = new CMoreSilly("more silly");
- psilly->WhatsYourName();
- psilly->Stab(5);
- delete psilly;
-#endif
-
- return 0;
-}
-
diff --git a/winsup/mingw/samples/dlltest/silly.def b/winsup/mingw/samples/dlltest/silly.def
deleted file mode 100644
index a766ff9..0000000
--- a/winsup/mingw/samples/dlltest/silly.def
+++ /dev/null
@@ -1,11 +0,0 @@
-EXPORTS
-DllMain@12
-Poke__6CSilly
-Stab__6CSillyi
-WhatsYourName__6CSilly
-_$_6CSilly
-__6CSilly
-__6CSillyPc
-__tf6CSilly
-__ti6CSilly
-_vt$6CSilly
diff --git a/winsup/mingw/samples/dlltest/silly.exp b/winsup/mingw/samples/dlltest/silly.exp
deleted file mode 100644
index ab544f9..0000000
--- a/winsup/mingw/samples/dlltest/silly.exp
+++ /dev/null
@@ -1,8 +0,0 @@
-I'm silly.
-Ouch!
-Ugh!!!!
-In CSilly destructor.
-I'm more silly and my name is "more silly"
-Ugh!!!!!
-In CMoreSilly "more silly" destructor!
-In CSilly destructor.
diff --git a/winsup/mingw/samples/dlltest/silly.h b/winsup/mingw/samples/dlltest/silly.h
deleted file mode 100644
index d3f99be..0000000
--- a/winsup/mingw/samples/dlltest/silly.h
+++ /dev/null
@@ -1,27 +0,0 @@
-
-#define DERIVED_TEST 1
-
-class CSilly
-{
- protected:
- char* szName;
-
- public:
- CSilly();
- CSilly(char* szName);
-#ifdef DERIVED_TEST
- virtual ~CSilly();
-#else
- ~CSilly();
-#endif
-
- Poke ();
- Stab (int nTimes);
-#ifdef DERIVED_TEST
- virtual WhatsYourName ();
-#else
- WhatsYourName ();
-#endif
-
-};
-
diff --git a/winsup/mingw/samples/dlltest/sillydll.cpp b/winsup/mingw/samples/dlltest/sillydll.cpp
deleted file mode 100644
index 87385e5..0000000
--- a/winsup/mingw/samples/dlltest/sillydll.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <windows.h>
-
-
-#if 0
-#define STREAMS_VERSION
-#endif
-
-#if defined(STREAMS_VERSION)
-#include <iostream.h>
-#endif
-
-#include "silly.h"
-
-extern "C"
-BOOL WINAPI DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
-{
- return TRUE;
-}
-
-CSilly::
-CSilly()
-{
- szName = NULL;
-}
-
-CSilly::
-CSilly(char* new_szName)
-{
- szName = new char[strlen(new_szName)+1];
-
- if (szName)
- {
- strcpy (szName, new_szName);
- }
-}
-
-CSilly::
-~CSilly()
-{
- printf ("In CSilly destructor.\n");
- if (szName)
- {
- delete szName;
- }
-}
-
-CSilly::
-Poke ()
-{
-#ifndef STREAMS_VERSION
- printf ("Ouch!\n");
-#else
- cout << "Ouch!" << endl;
-#endif
-}
-
-CSilly::
-Stab (int nTimes)
-{
-#ifndef STREAMS_VERSION
- printf ("Ugh");
-#else
- cout << "Ugh";
-#endif
-
- int i;
- for (i = 0; i < nTimes; i++)
- {
-#ifndef STREAMS_VERSION
- putchar('!');
-#else
- cout << '!' ;
-#endif
- }
-
-#ifndef STREAMS_VERSION
- putchar('\n');
-#else
- cout << endl;
-#endif
-}
-
-CSilly::
-WhatsYourName ()
-{
- if (szName)
- {
-#ifndef STREAMS_VERSION
- printf ("I'm %s.\n", szName);
-#else
- cout << "I'm " << szName << "." << endl;
-#endif
- }
- else
- {
-#ifndef STREAMS_VERSION
- printf ("I have no name.\n");
-#else
- cout << "I have no name." << endl;
-#endif
- }
-}
-
diff --git a/winsup/mingw/samples/filehand/filehand.c b/winsup/mingw/samples/filehand/filehand.c
deleted file mode 100644
index 2af69b3..0000000
--- a/winsup/mingw/samples/filehand/filehand.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * An example showing how you can obtain the UNIX-ish file number from a
- * FILE* and in turn how you can get the Win32 HANDLE of the file from
- * the file number.
- *
- * This code is in the PUBLIC DOMAIN and has NO WARRANTY.
- *
- * Colin Peters <colin@fu.is.saga-u.ac.jp>
- */
-
-#include <stdio.h>
-#include <io.h>
-#include <windows.h>
-
-int
-main (int argc, char* argv[])
-{
- char* szFileName;
- FILE* fileIn;
- int fnIn;
- HANDLE hFileIn;
- char caBuf[81];
- int nRead;
-
- if (argc >= 2)
- {
- szFileName = argv[1];
- }
- else
- {
- szFileName = "junk.txt";
- }
-
- fileIn = fopen (szFileName, "r");
-
- if (!fileIn)
- {
- printf ("Could not open %s for reading\n", szFileName);
- exit(1);
- }
-
- fnIn = fileno (fileIn);
- hFileIn = (HANDLE) _get_osfhandle (fnIn);
-
- printf ("OS file handle %d\n", (int) hFileIn);
-
- ReadFile (hFileIn, caBuf, 80, &nRead, NULL);
-
- printf ("Read %d bytes using ReadFile.\n", nRead);
-
- caBuf[nRead] = '\0';
-
- printf ("\"%s\"\n", caBuf);
-
- fclose (fileIn);
-}
-
diff --git a/winsup/mingw/samples/filehand/jamfile b/winsup/mingw/samples/filehand/jamfile
deleted file mode 100644
index 3b2c726..0000000
--- a/winsup/mingw/samples/filehand/jamfile
+++ /dev/null
@@ -1,3 +0,0 @@
-
-Main filehand.exe : filehand.c ;
-
diff --git a/winsup/mingw/samples/filehand/junk.txt b/winsup/mingw/samples/filehand/junk.txt
deleted file mode 100644
index 6de7b8c..0000000
--- a/winsup/mingw/samples/filehand/junk.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is a test file.
diff --git a/winsup/mingw/samples/fixargv/fixargv.c b/winsup/mingw/samples/fixargv/fixargv.c
deleted file mode 100644
index c2e2a41..0000000
--- a/winsup/mingw/samples/fixargv/fixargv.c
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
- * fixargv.c
- *
- * A special function which "fixes" an argv array by replacing arguments
- * that need quoting with quoted versions.
- *
- * NOTE: In order to be reasonably consistent there is some misuse of the
- * const keyword here-- which leads to compilation warnings. These
- * should be ok to ignore.
- *
- * This is a sample distributed as part of the Mingw32 package.
- *
- * Contributors:
- * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRENTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warrenties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#include <string.h>
-#include "fixargv.h"
-
-/*
- * This takes a single string and fixes it, enclosing it in quotes if it
- * contains any spaces and/or escaping the quotes it contains.
- */
-char*
-fix_arg (const char* szArg)
-{
- int nQuoteAll; /* Does the whole arg need quoting? */
- int nBkSlRun; /* How may backslashes in a row? */
- char* sz;
- char* szNew;
- size_t sizeLen;
-
- nQuoteAll = 0;
- nBkSlRun = 0;
- sz = szArg;
- sizeLen = 1;
-
- /* First we figure out how much bigger the new string has to be
- * than the old one. */
- while (*sz != '\0')
- {
- /*
- * Arguments containing whitespace of wildcards will be
- * quoted to preserve tokenization and/or those special
- * characters (i.e. wildcarding will NOT be done at the
- * other end-- they will get the * and ? characters as is).
- * TODO: Is this the best way? Do we want to enable wildcards?
- * If so, when?
- */
- if (!nQuoteAll &&
- (*sz == ' ' || *sz == '\t' || *sz == '*' || *sz == '?'))
- {
- nQuoteAll = 1;
- }
- else if (*sz == '\\')
- {
- nBkSlRun++;
- }
- else
- {
- if (*sz == '\"')
- {
- sizeLen += nBkSlRun + 1;
- }
- nBkSlRun = 0;
- }
-
- sizeLen++;
- sz++;
- }
-
- if (nQuoteAll)
- {
- sizeLen += 2;
- }
-
- /*
- * Make a new string big enough.
- */
- szNew = (char*) malloc (sizeLen);
- if (!szNew)
- {
- return NULL;
- }
- sz = szNew;
-
- /* First enclosing quote for fully quoted args. */
- if (nQuoteAll)
- {
- *sz = '\"';
- sz++;
- }
-
- /*
- * Go through the string putting backslashes in front of quotes,
- * and doubling all backslashes immediately in front of quotes.
- */
- nBkSlRun = 0;
- while (*szArg != '\0')
- {
- if (*szArg == '\\')
- {
- nBkSlRun++;
- }
- else
- {
- if (*szArg == '\"')
- {
- while (nBkSlRun > 0)
- {
- *sz = '\\';
- sz++;
- nBkSlRun--;
- }
- *sz = '\\';
- sz++;
- }
- nBkSlRun = 0;
- }
-
- *sz = *szArg;
- sz++;
- szArg++;
- }
-
- /* Closing quote for fully quoted args. */
- if (nQuoteAll)
- {
- *sz = '\"';
- sz++;
- }
-
- *sz = '\0';
- return szNew;
-}
-
-/*
- * Takes argc and argv and returns a new argv with escaped members. Pass
- * this fixed argv (along with the old one) to free_fixed_argv after
- * you finish with it. Pass in an argc of -1 and make sure the argv vector
- * ends with a null pointer to have fix_argv count the arguments for you.
- */
-char* const*
-fix_argv (int argc, char* const* szaArgv)
-{
- char** szaNew;
- char* sz;
- int i;
-
- if (!szaArgv)
- {
- return NULL;
- }
-
- /*
- * Count the arguments if asked.
- */
- if (argc == -1)
- {
- for (i = 0; szaArgv[i]; i++)
- ;
-
- argc = i;
- }
-
- /*
- * If there are no args or only one arg then do no escaping.
- */
- if (argc < 2)
- {
- return szaArgv;
- }
-
- for (i = 1, szaNew = NULL; i < argc; i++)
- {
- sz = szaArgv[i];
-
- /*
- * If an argument needs fixing, then fix it.
- */
- if (strpbrk (sz, "\" \t*?"))
- {
- /*
- * If we haven't created a new argv list already
- * then make one.
- */
- if (!szaNew)
- {
- szaNew = (char**) malloc ((argc + 1) *
- sizeof (char*));
- if (!szaNew)
- {
- return NULL;
- }
-
- /*
- * Copy previous args from old to new.
- */
- memcpy (szaNew, szaArgv, sizeof(char*) * i);
- }
-
- /*
- * Now do the fixing.
- */
- szaNew[i] = fix_arg (sz);
- if (!szaNew[i])
- {
- /* Fixing failed, free up and return error. */
- free_fixed_argv (szaNew, szaArgv);
- return NULL;
- }
- }
- else if (szaNew)
- {
- szaNew[i] = sz;
- }
- }
-
- if (szaNew)
- {
- /* If we have created a new argv list then we might as well
- * terminate it nicely. (And we depend on it in
- * free_fixed_argv.) */
- szaNew[argc] = NULL;
- }
- else
- {
- /* If we didn't create a new argv list then return the
- * original. */
- return szaArgv;
- }
-
- return szaNew;
-}
-
-void
-free_fixed_argv (char* const* szaFixed, char* const* szaOld)
-{
- char* const* sza;
-
- /*
- * Check for error conditions. Also note that if no corrections
- * were required the fixed argv will actually be the same as
- * the old one, and we don't need to do anything.
- */
- if (!szaFixed || !szaOld || szaFixed == szaOld)
- {
- return;
- }
-
- /*
- * Go through all members of the argv list. If any of the
- * members in the fixed list are different from the old
- * list we free those members.
- * NOTE: The first member is never modified, so we don't need to
- * check.
- */
- sza = szaFixed + 1;
- szaOld++;
- while (*sza)
- {
- if (*sza != *szaOld)
- {
- free (*sza);
- }
- sza++;
- szaOld++;
- }
-
- /*
- * Now we can free the array of char pointers itself.
- */
- free (szaFixed);
-}
-
diff --git a/winsup/mingw/samples/fixargv/fixargv.h b/winsup/mingw/samples/fixargv/fixargv.h
deleted file mode 100644
index e4a83fa..0000000
--- a/winsup/mingw/samples/fixargv/fixargv.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * fixargv.h
- *
- * Prototypes of utility functions for 'properly' escaping argv vectors.
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * $Revision$
- * $Author$
- * $Date$
- *
- */
-
-#ifndef _FIXARGV_H_
-#define _FIXARGV_H_
-
-char* fix_arg (const char* szArg);
-char* const* fix_argv (int argc, char* const* szaArgv);
-void free_fixed_argv (char* const* szaFixed, char* const* szaOld);
-
-#endif
diff --git a/winsup/mingw/samples/fixargv/readme.txt b/winsup/mingw/samples/fixargv/readme.txt
deleted file mode 100644
index 555ef9b..0000000
--- a/winsup/mingw/samples/fixargv/readme.txt
+++ /dev/null
@@ -1,85 +0,0 @@
-
-This code is a utility function I was considering adding to Mingw32. The
-Microsoft versions of argc, argv construction use quotes and backslashes
-to allow the user to pass arguments containing spaces (or quotes) to
-programs they invoke. The rules are
-
- - Arguments containing spaces must be enclosed in quotes.
- - A quote can be passed by preceeding it with a backslash.
- - Backslashes immediately preceeding a quote must be doubled to avoid
- escaping the quote.
-
-Thus an argument like:
-
- -D="Foo Bar\\"
-
-needs to be mangled as:
-
- "-D\"Foo Bar\\\\\""
-
-in order to get to the program as what was intended above.
-
-The fix_argv set of functions is meant to be used with spawnv and the
-like to allow a program to set up an argv array for the spawned program
-and have that array duplicated *exactly* in the spawned program, no
-matter what it contains (it also quotes 'globbing' characters like *
-and ?, so it does not matter if the destination has globbing turned on
-or not; it might be a reasonable extension to allow a flag to allow
-globbing characters to pass through unmolested, but they would still
-be quoted if the string contained whitespace).
-
-The reason for writing this came up because of problems with arguments
-like -DBLAH="Foo Bar" to GCC (define BLAH as a preprocessor constant
-being the string "Foo Bar", including the quotes). Because GCC simply
-passes the argument directly to CPP (the preprocessor) it had to be
-escaped *twice*:
-
- "-DBLAH=\"\\\"Foo Bar\\\"\""
-
-This would reach GCC as
-
- -DBLAH="\"Foo Bar\""
-
-And that would reach CPP as the desired
-
- -DBLAH="Foo Bar"
-
-One level of quoting and escaping is to be expected (although MS's
-standard is, arguably, not very good), but forcing the user to know
-how many different programs the argument is going to pass through,
-and perform double quoting and escaping, seems unreasonable. If
-GCC and friends all used fix_argv (they use their own version of
-it now) then the original argument could be
-
- "-DBLAH=\"Foo Bar\""
-
-And that would work fine, no matter how many different tools it
-passed through.
-
-The only basic limitation with this code is that it assumes that all
-the spawned programs use Microsoft-type escaping when interpreting
-their command line. Most programs on Win32 machines do (anything
-compiled with Mingw32 will).
-
-For now, this code has been relegated to 'sample' status. If you want
-to use it, feel free (it is public domain after all).
-
-Colin.
-
-P.S. Just out of interest you might try writing your own little program
- to look at the interaction of wildcards and quotes. Use the glob.exe
- program in ../globbing and see what it does with
-
- glob "foo*.txt"
-
- even if there are files foo.txt and foobar.txt in the same directory.
-
- Note that
-
- del "My *.txt"
-
- works (i.e. it deletes all files starting with My<space>). This could
- not be done unless del does globbing *after* processing escapes and
- quotes, which is not the way it seems to work normally (again see
- the glob example).
-
diff --git a/winsup/mingw/samples/fmode/all.c b/winsup/mingw/samples/fmode/all.c
deleted file mode 100644
index f052b93..0000000
--- a/winsup/mingw/samples/fmode/all.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * A sample program demonstrating how to use _CRT_fmode to change the default
- * file opening mode to binary AND change stdin, stdout and stderr. Redirect
- * stdout to a file from the command line to see the difference.
- *
- * Also try directing a file into stdin. If you type into stdin you will get
- * \r\n at the end of every line... unlike UNIX. But at least if you
- * redirect a file in you will get exactly the characters in the file as input.
- *
- * THIS CODE IS IN THE PUBLIC DOMAIN.
- *
- * Colin Peters <colin@fu.is.saga-u.ac.jp>
- */
-
-#include <stdio.h>
-#include <stdlib.h> /* _fmode */
-#include <fcntl.h> /* _O_BINARY */
-#include <io.h> /* _setmode */
-
-
-unsigned int _CRT_fmode = _O_BINARY;
-
-main ()
-{
- char* sz = "This is line one.\nThis is line two.\n";
- FILE* fp;
- int c;
-
- printf (sz);
-
- /* Note how this fopen does NOT indicate "wb" to open the file in
- * binary mode. */
- fp = fopen ("all.out", "w");
-
- fprintf (fp, sz);
-
- fclose (fp);
-
- if (_isatty (_fileno(stdin)))
- {
- fprintf (stderr, "Waiting for input, press Ctrl-Z to finish.\n");
- }
-
- while ((c = fgetc(stdin)) != EOF)
- {
- printf ("\'%c\' %02X\n", (char) c, c);
- }
-}
-
diff --git a/winsup/mingw/samples/fmode/jamfile b/winsup/mingw/samples/fmode/jamfile
deleted file mode 100644
index 5b7a1cb..0000000
--- a/winsup/mingw/samples/fmode/jamfile
+++ /dev/null
@@ -1,7 +0,0 @@
-
-Main test.exe : test.c ;
-
-Main test2.exe : test2.c ;
-
-Main all.exe : all.c ;
-
diff --git a/winsup/mingw/samples/fmode/readme.txt b/winsup/mingw/samples/fmode/readme.txt
deleted file mode 100644
index b865bfd..0000000
--- a/winsup/mingw/samples/fmode/readme.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-
-These two demos show how _fmode and _CRT_fmode can be used to modify the
-default file opening mode (text vs. binary) and/or the mode of the standard
-file handles.
-
diff --git a/winsup/mingw/samples/fmode/test.c b/winsup/mingw/samples/fmode/test.c
deleted file mode 100644
index 0ec3645..0000000
--- a/winsup/mingw/samples/fmode/test.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * A sample program demonstrating how to use fmode to change the default
- * file opening mode to binary. NOTE: Does not change stdin, stdout or
- * stderr.
- *
- * THIS CODE IS IN THE PUBLIC DOMAIN.
- *
- * Colin Peters <colin@fu.is.saga-u.ac.jp>
- */
-
-#include <stdio.h>
-#include <stdlib.h> /* _fmode */
-#include <fcntl.h> /* _O_BINARY */
-
-main ()
-{
- char* sz = "This is line one.\nThis is line two.\n";
- FILE* fp;
-
- _fmode = _O_BINARY;
-
- printf (sz);
-
- /* Note how this fopen does NOT indicate "wb" to open the file in
- * binary mode. */
- fp = fopen ("test.out", "w");
-
- fprintf (fp, sz);
-
- fclose (fp);
-}
-
diff --git a/winsup/mingw/samples/fmode/test2.c b/winsup/mingw/samples/fmode/test2.c
deleted file mode 100644
index b7d6b18..0000000
--- a/winsup/mingw/samples/fmode/test2.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * A sample program demonstrating how to use fmode to change the default
- * file opening mode to binary. Compare this file, which sets _fmode
- * at file level to test.c, which sets the dll variable directly within
- * main.
- * NOTE: Does not change stdin, stdout or stderr.
- *
- * THIS CODE IS IN THE PUBLIC DOMAIN.
- *
- * Colin Peters <colin@fu.is.saga-u.ac.jp>
- * Danny Smith <dannysmith@users.sourceforge.net>
- */
-
-#include <stdio.h>
-#include <stdlib.h> /* _fmode */
-#include <fcntl.h> /* _O_BINARY */
-
-#undef _fmode
-int _fmode = _O_BINARY;
-
-main ()
-{
-
- char* sz = "This is line one.\nThis is line two.\n";
- FILE* fp;
-
- printf (sz);
-
- /* Note how this fopen does NOT indicate "wb" to open the file in
- * binary mode. */
- fp = fopen ("test2.out", "w");
-
- fprintf (fp, sz);
-
- fclose (fp);
-}
-
diff --git a/winsup/mingw/samples/globbing/glob.c b/winsup/mingw/samples/globbing/glob.c
deleted file mode 100644
index 6bf8aca..0000000
--- a/winsup/mingw/samples/globbing/glob.c
+++ /dev/null
@@ -1,20 +0,0 @@
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <windows.h>
-
-int
-main (int argc, char* argv[])
-{
- int i;
-
- printf ("Command line (via GetCommandLine) \"%s\"\n",
- GetCommandLine());
-
- for (i = 0; i < argc; i++)
- {
- printf ("Argv[%d] \"%s\"\n", i, argv[i]);
- }
-
- return 0;
-}
diff --git a/winsup/mingw/samples/globbing/jamfile b/winsup/mingw/samples/globbing/jamfile
deleted file mode 100644
index ff3a585..0000000
--- a/winsup/mingw/samples/globbing/jamfile
+++ /dev/null
@@ -1,11 +0,0 @@
-
-Object glob.o : glob.c ;
-
-MainFromObjects glob.exe : glob.o ;
-
-Main noglob.exe : noglob.c ;
-
-LIBDIR = \\mingw32\\lib\\ ;
-
-MainFromObjects CRTnoglob.exe : glob.o $(LIBDIR)CRT_noglob.o ;
-
diff --git a/winsup/mingw/samples/globbing/noglob.c b/winsup/mingw/samples/globbing/noglob.c
deleted file mode 100644
index 8bc4c82..0000000
--- a/winsup/mingw/samples/globbing/noglob.c
+++ /dev/null
@@ -1,22 +0,0 @@
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <windows.h>
-
-/* This line turns off automatic command line globbing. */
-int _CRT_glob = 0;
-
-int
-main (int argc, char* argv[])
-{
- int i;
-
- printf ("Command line (via GetCommandLine) \"%s\"\n",
- GetCommandLine());
- for (i = 0; i < argc; i++)
- {
- printf ("Argv[%d] \"%s\"\n", i, argv[i]);
- }
-
- return 0;
-}
diff --git a/winsup/mingw/samples/globbing/readme.txt b/winsup/mingw/samples/globbing/readme.txt
deleted file mode 100644
index 5e20de8..0000000
--- a/winsup/mingw/samples/globbing/readme.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-
-This directory contains samples which demonstrate default (globbing on)
-behavior, how to turn the globbing off with the _CRT_glob variable, and
-how to turn it off with the CRT_noglob object file.
-
-Run jam and then run glob, noglob and CRTnoglob with an argument like
-*.* to see the difference.
-
-The code in this directory is in the PUBLIC DOMAIN. It has NO WARRANTY,
-including, but not restricted to, warranties of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.
-
-Colin Peters <colin@bird.fu.is.saga-u.ac.jp>.
-
diff --git a/winsup/mingw/samples/print/jamfile b/winsup/mingw/samples/print/jamfile
deleted file mode 100644
index b77e6d6..0000000
--- a/winsup/mingw/samples/print/jamfile
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# A simple example which prints a message on a selected printer. This won't
-# work right unless you make PRINTDLG a packed structure!
-#
-
-Main prntest.exe : prntest.c ;
-
-Gui prntest.exe ;
-
diff --git a/winsup/mingw/samples/print/prntest.c b/winsup/mingw/samples/print/prntest.c
deleted file mode 100644
index a70e7ed..0000000
--- a/winsup/mingw/samples/print/prntest.c
+++ /dev/null
@@ -1,65 +0,0 @@
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <windows.h>
-
-main ()
-{
- PRINTDLG pd;
- DOCINFO di;
- char* szMessage;
-
- memset (&pd, 0, sizeof(PRINTDLG));
- memset (&di, 0, sizeof(DOCINFO));
-
- di.cbSize = sizeof(DOCINFO);
- di.lpszDocName = "Test";
-
- pd.lStructSize = sizeof(PRINTDLG);
- pd.Flags = PD_PAGENUMS | PD_RETURNDC;
- pd.nFromPage = 1;
- pd.nToPage = 1;
- pd.nMinPage = 1;
- pd.nMaxPage = 1;
-
- szMessage = 0;
-
- if (PrintDlg (&pd))
- {
- if (pd.hDC)
- {
- if (StartDoc (pd.hDC, &di) != SP_ERROR)
- {
- StartPage (pd.hDC);
-
- TextOut (pd.hDC, 0, 0, "Hello, printer!", 15);
-
- EndPage (pd.hDC);
-
- EndDoc (pd.hDC);
-
- szMessage = "Printed.";
- }
- else
- {
- szMessage = "Could not start document.";
- }
- }
- else
- {
- szMessage = "Could not create device context.";
- }
- }
- else
- {
- szMessage = "Canceled or printer could not be setup.";
- }
-
- if (szMessage)
- {
- MessageBox (NULL, szMessage, "Print Test", MB_OK);
- }
-
- return 0;
-}
diff --git a/winsup/mingw/samples/seh/eh3.c b/winsup/mingw/samples/seh/eh3.c
deleted file mode 100644
index 49a06ce..0000000
--- a/winsup/mingw/samples/seh/eh3.c
+++ /dev/null
@@ -1,112 +0,0 @@
-int
-__except_handler3(
- struct _EXCEPTION_RECORD* pExceptionRecord,
- struct EXCEPTION_REGISTRATION* pRegistrationFrame,
- struct _CONTEXT* pContextRecord,
- void* pDispatcherContext
- )
-{
- LONG filterFuncRet;
- LONG trylevel;
- EXCEPTION_POINTERS exceptPtrs;
- PSCOPETABLE pScopeTable;
-
-
- CLD // Clear the direction flag (make no assumptions!)
-
- // if neither the EXCEPTION_UNWINDING nor EXCEPTION_EXIT_UNWIND bit
- // is set... This is true the first time through the handler (the
- // non-unwinding case)
-
- if ( ! (pExceptionRecord->ExceptionFlags
- & (EXCEPTION_UNWINDING | EXCEPTION_EXIT_UNWIND)
- ) )
- {
- // Build the EXCEPTION_POINTERS structure on the stack
- exceptPtrs.ExceptionRecord = pExceptionRecord;
- exceptPtrs.ContextRecord = pContextRecord;
-
- // Put the pointer to the EXCEPTION_POINTERS 4 bytes below the
- // establisher frame. See ASM code for GetExceptionInformation
- *(PDWORD)((PBYTE)pRegistrationFrame - 4) = &exceptPtrs;
-
- // Get initial "trylevel" value
- trylevel = pRegistrationFrame->trylevel
-
- // Get a pointer to the scopetable array
- scopeTable = pRegistrationFrame->scopetable;
-
-search_for_handler:
- if ( pRegistrationFrame->trylevel != TRYLEVEL_NONE )
- {
- if ( pRegistrationFrame->scopetable[trylevel].lpfnFilter )
- {
-
- PUSH EBP // Save this frame EBP
-
- // !!!Very Important!!! Switch to original EBP. This is
- // what allows all locals in the frame to have the same
- // value as before the exception occurred.
-
- EBP = &pRegistrationFrame->_ebp
-
- // Call the filter function
- filterFuncRet = scopetable[trylevel].lpfnFilter();
-
- POP EBP // Restore handler frame EBP
-
- if ( filterFuncRet != EXCEPTION_CONTINUE_SEARCH )
- {
- if ( filterFuncRet < 0 ) // EXCEPTION_CONTINUE_EXECUTION
- return ExceptionContinueExecution;
-
- // If we get here, EXCEPTION_EXECUTE_HANDLER was specified
- scopetable == pRegistrationFrame->scopetable
-
- // Does the actual OS cleanup of registration frames
- // Causes this function to recurse
- __global_unwind2( pRegistrationFrame );
-
-
- // Once we get here, everything is all cleaned up, except
- // for the last frame, where we'll continue execution
- EBP = &pRegistrationFrame->_ebp
-
- __local_unwind2( pRegistrationFrame, trylevel );
-
- // NLG == "non-local-goto" (setjmp/longjmp stuff)
- __NLG_Notify( 1 ); // EAX == scopetable->lpfnHandler
-
- // Set the current trylevel to whatever SCOPETABLE entry
- // was being used when a handler was found
- pRegistrationFrame->trylevel = scopetable->previousTryLevel;
-
- // Call the _except {} block. Never returns.
- pRegistrationFrame->scopetable[trylevel].lpfnHandler();
- }
- }
-
- scopeTable = pRegistrationFrame->scopetable;
- trylevel = scopeTable->previousTryLevel
-
- goto search_for_handler;
- }
- else // trylevel == TRYLEVEL_NONE
- {
- retvalue == DISPOSITION_CONTINUE_SEARCH;
- }
- }
- else // EXCEPTION_UNWINDING or EXCEPTION_EXIT_UNWIND flags are set
- {
- PUSH EBP // Save EBP
-
- EBP = pRegistrationFrame->_ebp // Set EBP for __local_unwind2
-
- __local_unwind2( pRegistrationFrame, TRYLEVEL_NONE )
-
- POP EBP // Restore EBP
-
- retvalue == DISPOSITION_CONTINUE_SEARCH;
- }
-}
-
diff --git a/winsup/mingw/samples/seh/exutil.c b/winsup/mingw/samples/seh/exutil.c
deleted file mode 100644
index 187242c..0000000
--- a/winsup/mingw/samples/seh/exutil.c
+++ /dev/null
@@ -1,68 +0,0 @@
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <excpt.h>
-#include <windows.h>
-
-#include "exutil.h"
-
-void
-WalkExceptionHandlers ()
-{
- PEXCEPTION_REGISTRATION_RECORD p;
- int i;
-
- __asm__("movl %%fs:0,%%eax;movl %%eax,%0" : "=g" (p) : : "%eax");
-
- i = 0;
- while (p != (PEXCEPTION_REGISTRATION_RECORD) -1 && p)
- {
- printf ("Registration %d at %08x : ", i, p);
- printf ("Handler = %08x ", p->handler);
- printf ("Next Registration = %08x\n", p->prev);
- p = p->prev;
- i++;
- }
- printf ("End of exception handler list.\n");
- fflush (stdout);
-}
-
-void
-DumpExceptionRecord (struct _EXCEPTION_RECORD* pExRec)
-{
- printf ("Exception: Code = %08x Flags %08x", pExRec->ExceptionCode,
- pExRec->ExceptionFlags);
-
- if (pExRec->ExceptionFlags)
- {
- printf (" ( ");
- if (pExRec->ExceptionFlags & EH_NONCONTINUABLE)
- {
- printf ("EH_NONCONTINUABLE ");
- }
- if (pExRec->ExceptionFlags & EH_UNWINDING)
- {
- printf ("EH_UNWINDING ");
- }
- if (pExRec->ExceptionFlags & EH_EXIT_UNWIND)
- {
- printf ("EH_EXIT_UNWIND ");
- }
- if (pExRec->ExceptionFlags & EH_STACK_INVALID)
- {
- printf ("EH_STACK_INVALID ");
- }
- if (pExRec->ExceptionFlags & EH_NESTED_CALL)
- {
- printf ("EH_NESTED_CALL ");
- }
- printf (")\n");
- }
- else
- {
- printf ("\n");
- }
-
- fflush(stdout);
-}
-
diff --git a/winsup/mingw/samples/seh/exutil.def b/winsup/mingw/samples/seh/exutil.def
deleted file mode 100644
index a474be7..0000000
--- a/winsup/mingw/samples/seh/exutil.def
+++ /dev/null
@@ -1,3 +0,0 @@
-EXPORTS
- WalkExceptionHandlers
- DumpExceptionRecord
diff --git a/winsup/mingw/samples/seh/exutil.h b/winsup/mingw/samples/seh/exutil.h
deleted file mode 100644
index a56155b..0000000
--- a/winsup/mingw/samples/seh/exutil.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Definitions of some internal stuff for exception handling, including
- * a version of the all-important EXCEPTION_REGISTRATION_RECORD.
- */
-
-#ifndef _EXUTIL_H_
-#define _EXUTIL_H_
-
-#include <windows.h>
-#include <excpt.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void WalkExceptionHandlers ();
-void DumpExceptionRecord (struct _EXCEPTION_RECORD* pExRec);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/winsup/mingw/samples/seh/jamfile b/winsup/mingw/samples/seh/jamfile
deleted file mode 100644
index 04d83c7..0000000
--- a/winsup/mingw/samples/seh/jamfile
+++ /dev/null
@@ -1,13 +0,0 @@
-
-Dll exutil.dll : exutil.c ;
-
-ImportLib libexutil.a : exutil.def ;
-
-Main sehtest.exe : sehtest.c ;
-
-Main sehfix.exe : sehfix.c ;
-
-Main sehsub.exe : sehsub.c ;
-
-LinkLibraries sehtest.exe sehfix.exe sehsub.exe : libexutil.a ;
-
diff --git a/winsup/mingw/samples/seh/sehfix.c b/winsup/mingw/samples/seh/sehfix.c
deleted file mode 100644
index be527ab..0000000
--- a/winsup/mingw/samples/seh/sehfix.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * sehfix.c
- *
- * A test program involving an exception handler that fixes the exception
- * causing condition.
- *
- * In this code we install an exception handler my_handler and then a piece
- * of inline assembly attempts to write at the address marked in eax, after
- * setting eax to 10. This should produce an exception. The handler then
- * changes the eax register of the exception context to be the address of
- * a static variable and restarts the code. This should allow everything
- * to continue.
- */
-
-#include <windows.h>
-#include <excpt.h>
-
-#include "exutil.h"
-
-int x;
-
-EXCEPTION_DISPOSITION
-my_handler (
- struct _EXCEPTION_RECORD* pExceptionRec,
- void* pEstablisherFrame,
- struct _CONTEXT* pContextRecord,
- void* pDispatcherContext
- )
-{
- printf ("In my exception handler!\n");
- DumpExceptionRecord (pExceptionRec);
- pContextRecord->Eax = (DWORD) &x;
- return ExceptionContinueExecution;
-}
-
-main ()
-{
- x = 2;
-
- printf ("x = %d\n", x);
-
- WalkExceptionHandlers();
-
- __try1(my_handler)
-
- WalkExceptionHandlers();
-
- /* This assembly code should produce an exception. */
- __asm__("movl $10,%%eax;movl $1,(%%eax);" : : : "%eax");
-
- __except1
-
- WalkExceptionHandlers();
-
- printf ("x = %d\n", x);
-
- printf ("Finished!\n");
-}
-
-
diff --git a/winsup/mingw/samples/seh/sehsub.c b/winsup/mingw/samples/seh/sehsub.c
deleted file mode 100644
index 466b2e8..0000000
--- a/winsup/mingw/samples/seh/sehsub.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * sehsub.c
- *
- * In an attempt to see what might be going on inside CRTDLL, this program
- * walks the exception list after creating a new thread with _beginthread.
- *
- * It turns out that _beginthread DOES install an exception handler, as
- * expected, but this handler is NOT exported by CRTDLL (it is certainly
- * not _except_handler2 or _XcptFilter)... an odd and unpleasant turn of
- * events.
- */
-
-#include <windows.h>
-#include <excpt.h>
-#include <process.h>
-
-#include "exutil.h"
-
-extern void* __imp__except_handler3;
-
-unsigned
-my_thread (void * p)
-{
- printf ("In my thread.\n");
- WalkExceptionHandlers();
- return 0;
-}
-
-main ()
-{
- unsigned long h;
- unsigned id;
- printf ("In main.\n");
- WalkExceptionHandlers();
-
- printf ("Except_handler3 %08x\n", __imp__except_handler3);
- h = _beginthreadex (NULL, 0, my_thread, NULL, 0, &id);
-
- WaitForSingleObject ((HANDLE) h, INFINITE);
- CloseHandle ((HANDLE) h);
- return;
-}
-
diff --git a/winsup/mingw/samples/seh/sehtest.c b/winsup/mingw/samples/seh/sehtest.c
deleted file mode 100644
index f1c18d0..0000000
--- a/winsup/mingw/samples/seh/sehtest.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * This file tests some of the basics of structured exception handling as
- * implemented in excpt.h and the Windows API header files.
- *
- * The program installs two exception handlers, then attempts to write to
- * a pointer to an invalid address. This causes an exception which passes
- * through the exception handlers and on to the default system exception
- * handler. That handler brings up the dialog box all Windows users know
- * and love, and then the program is terminated.
- *
- * You might note that after the initial run up through our exception frames
- * we get a second run up through them with the exception code
- * STATUS_INVALID_DISPOSITION and the code EH_UNWINDING. This seems normal
- * except that the code got changed from the previous STATUS_ACCESS_VIOLATION.
- * I don't understand that bit particularly.
- */
-
-#include <stdio.h>
-#include <excpt.h>
-
-#include "exutil.h"
-
-EXCEPTION_DISPOSITION
-my_handler (
- struct _EXCEPTION_RECORD* pExceptionRec,
- void* pEstablisherFrame,
- struct _CONTEXT* pContextRecord,
- void* pDispatcherContext
- )
-{
- printf ("In my exception handler!\n");
- DumpExceptionRecord (pExceptionRec);
- return ExceptionContinueSearch;
-}
-
-EXCEPTION_DISPOSITION
-my_handler2 (
- struct _EXCEPTION_RECORD* pExceptionRec,
- void* pEstablisherFrame,
- struct _CONTEXT* pContextRecord,
- void* pDispatcherContext
- )
-{
- printf ("In top exception handler!\n");
- DumpExceptionRecord (pExceptionRec);
- return ExceptionContinueSearch;
-}
-
-main ()
-{
- char* x;
-
- printf ("my_handler2 = %08x\n", my_handler2);
- printf ("my_handler = %08x\n", my_handler);
-
- WalkExceptionHandlers();
-
- __try1(my_handler2)
- x = (char*) 10;
-
- WalkExceptionHandlers();
-
- __try1(my_handler)
-
- WalkExceptionHandlers();
-
- *x = 1;
- __except1
- __except1
- printf ("Finished!\n");
-}
-
diff --git a/winsup/mingw/samples/simpledll/dll.c b/winsup/mingw/samples/simpledll/dll.c
deleted file mode 100644
index c642af4..0000000
--- a/winsup/mingw/samples/simpledll/dll.c
+++ /dev/null
@@ -1,33 +0,0 @@
-
-#include <windows.h>
-
-BOOL WINAPI
-DllMain (HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
-{
- switch (dwReason)
- {
- case DLL_PROCESS_ATTACH:
- printf ("DLL Attached.\n");
- break;
-
- case DLL_PROCESS_DETACH:
- printf ("DLL Detached.\n");
- break;
-
- case DLL_THREAD_ATTACH:
- printf ("DLL Thread Attached.\n");
- break;
-
- case DLL_THREAD_DETACH:
- printf ("DLL Thread Detached.\n");
- break;
- }
- return TRUE;
-}
-
-void
-Test ()
-{
- printf ("Test Function called!\n");
-}
-
diff --git a/winsup/mingw/samples/simpledll/dll.cpp b/winsup/mingw/samples/simpledll/dll.cpp
deleted file mode 100644
index cdf0dfb..0000000
--- a/winsup/mingw/samples/simpledll/dll.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-//
-// This is a C++ version of the code in dll.c. NOTE that you need to put
-// extern "C" { ... } around DllMain or it will not be called when your
-// Dll starts up! (It will get name mangled as a C++ function and the C
-// default version in libmingw32.a will get called instead.)
-//
-
-#include <windows.h>
-
-#include <iostream>
-
-extern "C" {
-
-BOOL WINAPI
-DllMain (HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
-{
- switch (dwReason)
- {
- case DLL_PROCESS_ATTACH:
- cout << "Dll Attached" << endl ;
- break;
-
- case DLL_PROCESS_DETACH:
- cout << "Dll Detached" << endl ;
- break;
-
- case DLL_THREAD_ATTACH:
- printf ("DLL Thread Attached.\n");
- break;
-
- case DLL_THREAD_DETACH:
- printf ("DLL Thread Detached.\n");
- break;
- }
- return TRUE;
-}
-
-void
-Test ()
-{
- printf ("Test Function called!\n");
-}
-
-};
diff --git a/winsup/mingw/samples/simpledll/dll.def b/winsup/mingw/samples/simpledll/dll.def
deleted file mode 100644
index 3cabd50..0000000
--- a/winsup/mingw/samples/simpledll/dll.def
+++ /dev/null
@@ -1,2 +0,0 @@
-EXPORTS
-Test
diff --git a/winsup/mingw/samples/simpledll/exe.c b/winsup/mingw/samples/simpledll/exe.c
deleted file mode 100644
index af5bb41..0000000
--- a/winsup/mingw/samples/simpledll/exe.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <stdio.h>
-
-extern void Test();
-
-int main()
-{
- printf ("Program started.\n");
- Test ();
- printf ("Program ends.\n");
-
- return 0;
-}
-
diff --git a/winsup/mingw/samples/simpledll/jamfile b/winsup/mingw/samples/simpledll/jamfile
deleted file mode 100644
index d1e2591..0000000
--- a/winsup/mingw/samples/simpledll/jamfile
+++ /dev/null
@@ -1,14 +0,0 @@
-
-Dll dll.dll : dll.c ;
-
-ImportLib libdll.a : dll.def ;
-
-
-Main exe.exe : exe.c ;
-
-LinkLibraries exe.exe : libdll.a ;
-
-DEPENDS exe.exe : dll.dll ;
-
-LINKFLAGS on exe.exe = $(LINKFLAGS) -L. ;
-
diff --git a/winsup/mingw/samples/simpledll/makedll.bat b/winsup/mingw/samples/simpledll/makedll.bat
deleted file mode 100644
index c7f9b2a..0000000
--- a/winsup/mingw/samples/simpledll/makedll.bat
+++ /dev/null
@@ -1,23 +0,0 @@
-rem *** Create the import library for the dll ***
-dlltool --dllname dll.dll --def dll.def --output-lib libdll.a
-
-rem *** Compile the dll ***
-gcc -c -o dll.o dll.c
-
-rem *** Link the dll ***
-gcc -s -mdll -o dll.dll -Wl,--base-file,dll.b dll.o
-dlltool --dllname dll.dll --base-file dll.b --output-exp dll.e --def dll.def
-gcc -s -mdll -o dll.dll -Wl,--base-file,dll.b dll.o -Wl,dll.e
-dlltool --dllname dll.dll --base-file dll.b --output-exp dll.e --def dll.def
-gcc -s -mdll -o dll.dll dll.o -Wl,dll.e
-
-rem *** Delete temporary files from dll linking ***
-del dll.b
-del dll.e
-
-rem *** Compile exe, which uses dll. ***
-gcc -c -o exe.o exe.c
-
-rem *** Link exe.exe, which uses dll.dll ***
-gcc -s -L. -o exe.exe exe.o libdll.a
-
diff --git a/winsup/mingw/samples/test/jamfile b/winsup/mingw/samples/test/jamfile
deleted file mode 100644
index 2fc7b84..0000000
--- a/winsup/mingw/samples/test/jamfile
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# A very simple example with which you can test your compiler/jam setup.
-# Also an interesting example of a hybrid console/GUI application.
-#
-
-Main test.exe : test.c ;
-
-GuiLibs test.exe ;
-
diff --git a/winsup/mingw/samples/test/test.c b/winsup/mingw/samples/test/test.c
deleted file mode 100644
index 82ca6b0..0000000
--- a/winsup/mingw/samples/test/test.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * This source code is in the PUBLIC DOMAIN and has NO WARRANTY.
- *
- * Colin Peters <colin@bird.fu.is.saga-u.ac.jp>, April 15, 1997.
- */
-
-#include <windows.h>
-#include <stdio.h>
-
-int STDCALL
-WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow)
-{
- char text[80];
-
- printf ("Enter message box text:");
- fgets(text, 80, stdin);
- MessageBox (NULL, text, "Test", MB_OK);
- printf ("\nHello after message box.\n");
- return 0;
-}
diff --git a/winsup/mingw/samples/wintest/jamfile b/winsup/mingw/samples/wintest/jamfile
deleted file mode 100644
index b2f7831..0000000
--- a/winsup/mingw/samples/wintest/jamfile
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# A example of Win32 GUI programming in C.
-#
-
-Main test.exe : test.c ;
-
-Gui test.exe ;
-
diff --git a/winsup/mingw/samples/wintest/test.c b/winsup/mingw/samples/wintest/test.c
deleted file mode 100644
index 056888f..0000000
--- a/winsup/mingw/samples/wintest/test.c
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * A basic example of Win32 programming in C.
- *
- * This source code is in the PUBLIC DOMAIN and has NO WARRANTY.
- *
- * Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
- */
-
-#include <windows.h>
-#include <string.h>
-
-/*
- * This is the window function for the main window. Whenever a message is
- * dispatched using DispatchMessage (or sent with SendMessage) this function
- * gets called with the contents of the message.
- */
-LRESULT CALLBACK
-MainWndProc (HWND hwnd, UINT nMsg, WPARAM wParam, LPARAM lParam)
-{
- /* The window handle for the "Click Me" button. */
- static HWND hwndButton = 0;
- static int cx, cy; /* Height and width of our button. */
-
- HDC hdc; /* A device context used for drawing */
- PAINTSTRUCT ps; /* Also used during window drawing */
- RECT rc; /* A rectangle used during drawing */
-
- /*
- * Perform processing based on what kind of message we got.
- */
- switch (nMsg)
- {
- case WM_CREATE:
- {
- /* The window is being created. Create our button
- * window now. */
- TEXTMETRIC tm;
-
- /* First we use the system fixed font size to choose
- * a nice button size. */
- hdc = GetDC (hwnd);
- SelectObject (hdc, GetStockObject (SYSTEM_FIXED_FONT));
- GetTextMetrics (hdc, &tm);
- cx = tm.tmAveCharWidth * 30;
- cy = (tm.tmHeight + tm.tmExternalLeading) * 2;
- ReleaseDC (hwnd, hdc);
-
- /* Now create the button */
- hwndButton = CreateWindow (
- "button", /* Builtin button class */
- "Click Here",
- WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
- 0, 0, cx, cy,
- hwnd, /* Parent is this window. */
- (HMENU) 1, /* Control ID: 1 */
- ((LPCREATESTRUCT) lParam)->hInstance,
- NULL
- );
-
- return 0;
- break;
- }
-
- case WM_DESTROY:
- /* The window is being destroyed, close the application
- * (the child button gets destroyed automatically). */
- PostQuitMessage (0);
- return 0;
- break;
-
- case WM_PAINT:
- /* The window needs to be painted (redrawn). */
- hdc = BeginPaint (hwnd, &ps);
- GetClientRect (hwnd, &rc);
-
- /* Draw "Hello, World" in the middle of the upper
- * half of the window. */
- rc.bottom = rc.bottom / 2;
- DrawText (hdc, "Hello, World", -1, &rc,
- DT_SINGLELINE | DT_CENTER | DT_VCENTER);
-
- EndPaint (hwnd, &ps);
- return 0;
- break;
-
- case WM_SIZE:
- /* The window size is changing. If the button exists
- * then place it in the center of the bottom half of
- * the window. */
- if (hwndButton &&
- (wParam == SIZEFULLSCREEN ||
- wParam == SIZENORMAL)
- )
- {
- rc.left = (LOWORD(lParam) - cx) / 2;
- rc.top = HIWORD(lParam) * 3 / 4 - cy / 2;
- MoveWindow (
- hwndButton,
- rc.left, rc.top, cx, cy, TRUE);
- }
- break;
-
- case WM_COMMAND:
- /* Check the control ID, notification code and
- * control handle to see if this is a button click
- * message from our child button. */
- if (LOWORD(wParam) == 1 &&
- HIWORD(wParam) == BN_CLICKED &&
- (HWND) lParam == hwndButton)
- {
- /* Our button was clicked. Close the window. */
- DestroyWindow (hwnd);
- }
- return 0;
- break;
- }
-
- /* If we don't handle a message completely we hand it to the system
- * provided default window function. */
- return DefWindowProc (hwnd, nMsg, wParam, lParam);
-}
-
-
-int STDCALL
-WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow)
-{
- HWND hwndMain; /* Handle for the main window. */
- MSG msg; /* A Win32 message structure. */
- WNDCLASSEX wndclass; /* A window class structure. */
- char* szMainWndClass = "WinTestWin";
- /* The name of the main window class */
-
- /*
- * First we create a window class for our main window.
- */
-
- /* Initialize the entire structure to zero. */
- memset (&wndclass, 0, sizeof(WNDCLASSEX));
-
- /* This class is called WinTestWin */
- wndclass.lpszClassName = szMainWndClass;
-
- /* cbSize gives the size of the structure for extensibility. */
- wndclass.cbSize = sizeof(WNDCLASSEX);
-
- /* All windows of this class redraw when resized. */
- wndclass.style = CS_HREDRAW | CS_VREDRAW;
-
- /* All windows of this class use the MainWndProc window function. */
- wndclass.lpfnWndProc = MainWndProc;
-
- /* This class is used with the current program instance. */
- wndclass.hInstance = hInst;
-
- /* Use standard application icon and arrow cursor provided by the OS */
- wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION);
- wndclass.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
- wndclass.hCursor = LoadCursor (NULL, IDC_ARROW);
-
- /* Color the background white */
- wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH);
-
- /*
- * Now register the window class for use.
- */
- RegisterClassEx (&wndclass);
-
- /*
- * Create our main window using that window class.
- */
- hwndMain = CreateWindow (
- szMainWndClass, /* Class name */
- "Hello", /* Caption */
- WS_OVERLAPPEDWINDOW, /* Style */
- CW_USEDEFAULT, /* Initial x (use default) */
- CW_USEDEFAULT, /* Initial y (use default) */
- CW_USEDEFAULT, /* Initial x size (use default) */
- CW_USEDEFAULT, /* Initial y size (use default) */
- NULL, /* No parent window */
- NULL, /* No menu */
- hInst, /* This program instance */
- NULL /* Creation parameters */
- );
-
- /*
- * Display the window which we just created (using the nShow
- * passed by the OS, which allows for start minimized and that
- * sort of thing).
- */
- ShowWindow (hwndMain, nShow);
- UpdateWindow (hwndMain);
-
- /*
- * The main message loop. All messages being sent to the windows
- * of the application (or at least the primary thread) are retrieved
- * by the GetMessage call, then translated (mainly for keyboard
- * messages) and dispatched to the appropriate window procedure.
- * This is the simplest kind of message loop. More complex loops
- * are required for idle processing or handling modeless dialog
- * boxes. When one of the windows calls PostQuitMessage GetMessage
- * will return zero and the wParam of the message will be filled
- * with the argument to PostQuitMessage. The loop will end and
- * the application will close.
- */
- while (GetMessage (&msg, NULL, 0, 0))
- {
- TranslateMessage (&msg);
- DispatchMessage (&msg);
- }
- return msg.wParam;
-}
-
diff --git a/winsup/mingw/strcasecmp.c b/winsup/mingw/strcasecmp.c
deleted file mode 100644
index a238e22..0000000
--- a/winsup/mingw/strcasecmp.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * strcasecmp.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Oldnames from ANSI header string.h
- *
- * Some wrapper functions for those old name functions whose appropriate
- * equivalents are not simply underscore prefixed.
- *
- */
-
-#include <string.h>
-
-int
-strcasecmp (const char *sz1, const char *sz2)
-{
- return _stricmp (sz1, sz2);
-}
-
diff --git a/winsup/mingw/strncasecmp.c b/winsup/mingw/strncasecmp.c
deleted file mode 100644
index 7607ea1..0000000
--- a/winsup/mingw/strncasecmp.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * strncasecmp.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Oldnames from ANSI header string.h
- *
- * Some wrapper functions for those old name functions whose appropriate
- * equivalents are not simply underscore prefixed.
- *
- */
-
-#include <string.h>
-
-int
-strncasecmp (const char *sz1, const char *sz2, size_t sizeMaxCompare)
-{
- return _strnicmp (sz1, sz2, sizeMaxCompare);
-}
-
diff --git a/winsup/mingw/test_headers.c b/winsup/mingw/test_headers.c
deleted file mode 100644
index 62402a6..0000000
--- a/winsup/mingw/test_headers.c
+++ /dev/null
@@ -1,54 +0,0 @@
-#include <_mingw.h>
-#include <assert.h>
-#include <conio.h>
-#include <ctype.h>
-#include <dir.h>
-#include <direct.h>
-#include <dirent.h>
-#include <dos.h>
-#include <errno.h>
-#include <excpt.h>
-#include <fcntl.h>
-#include <fenv.h>
-#include <float.h>
-#include <inttypes.h>
-#include <io.h>
-#include <limits.h>
-#include <locale.h>
-#include <malloc.h>
-#include <math.h>
-#include <mbctype.h>
-#include <mbstring.h>
-#include <mem.h>
-#include <memory.h>
-#include <process.h>
-#include <search.h>
-#include <setjmp.h>
-#include <share.h>
-#include <signal.h>
-#include <stdarg.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <strings.h>
-#include <tchar.h>
-#include <time.h>
-#include <unistd.h>
-#include <values.h>
-#include <wchar.h>
-#include <wctype.h>
-#include <sys/fcntl.h>
-#include <sys/file.h>
-#include <sys/locking.h>
-#include <sys/param.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/timeb.h>
-#include <sys/types.h>
-#include <sys/unistd.h>
-#include <sys/utime.h>
-
-int main()
-{return 0;}
diff --git a/winsup/mingw/toascii.c b/winsup/mingw/toascii.c
deleted file mode 100644
index be9f2f5..0000000
--- a/winsup/mingw/toascii.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * toascii.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Oldnames from ANSI header ctype.h
- *
- * Some wrapper functions for those old name functions whose appropriate
- * equivalents are not simply underscore prefixed.
- *
- */
-
-#include <ctype.h>
-
-
-int
-toascii (int c)
-{
- return __toascii(c);
-}
-
diff --git a/winsup/mingw/txtmode.c b/winsup/mingw/txtmode.c
deleted file mode 100644
index 0771746..0000000
--- a/winsup/mingw/txtmode.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <fcntl.h>
-
-/* Set default file mode to text */
-
-/* Is this correct? Default value of _fmode in msvcrt.dll is 0. */
-
-int _fmode = _O_TEXT;
diff --git a/winsup/mingw/wcscmpi.c b/winsup/mingw/wcscmpi.c
deleted file mode 100644
index 497964b..0000000
--- a/winsup/mingw/wcscmpi.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * wcscmpi.c
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is a part of the mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within the package.
- *
- * Oldnames from ANSI header string.h
- *
- * Some wrapper functions for those old name functions whose appropriate
- * equivalents are not simply underscore prefixed.
- *
- */
-
-#include <string.h>
-
-int
-wcscmpi (const wchar_t * ws1, const wchar_t * ws2)
-{
- return _wcsicmp (ws1, ws2);
-}
-
diff --git a/winsup/testsuite/ChangeLog b/winsup/testsuite/ChangeLog
deleted file mode 100644
index 87723a2..0000000
--- a/winsup/testsuite/ChangeLog
+++ /dev/null
@@ -1,767 +0,0 @@
-2008-11-26 Christopher Faylor <me+cygwin@cgf.cx>
-
- * Revert erroneous checkin.
-
-2006-07-23 Christopher Faylor <cgf@timesys.com>
-
- * Makefile.in: Update copyright. Remove unused stuff.
-
-2006-07-17 Christopher Faylor <cgf@timesys.com>
-
- * Makefile.in: Simplify a little.
-
-2006-06-12 Pierre Humblet Pierre.Humblet@ieee.org
-
- * winsup.api/user_malloc.c: New file.
-
-2006-05-30 Christopher Faylor <cgf@timesys.com>
-
- * winsup.api/cygload.h: Increase padding to 32768.
-
-2006-05-24 Christopher Faylor <cgf@timesys.com>
-
- * configure.in: Update to newer autoconf.
- (thanks to Steve Ellcey)
- * configure: Regenerate.
- * aclocal.m4: New file.
-
-2006-03-23 Christopher Faylor <cgf@timesys.com>
-
- * winsup.api/checksignal.c (main): Add test for siginterrupt.
-
-2006-01-02 Christopher Faylor <cgf@timesys.com>
-
- * cygload/README: Delete.
- * cygload/cygload.cc: Move to winsup.api. Add comments from README.
- * cygload/cygload.h: Move to winsup.api.
- * cygload/cygload.exp: Move to winsup.api.
- * Makefile.in: Remove cygload.
- * winsup.api/winsup.exp: If a .exp file is detected, run it rather than
- using standard compile.
-
- * winsup.api/resethand.c (main): Use printf to print status or expect
- thinks something is wrong.
-
-2006-01-01 Christopher Faylor <cgf@timesys.com>
-
- * winsup.api/resethand.c (main): Remove core dump flag from exit
- status.
-
-2006-01-01 Christopher Faylor <cgf@timesys.com>
-
- * winsup.api/resethand.c (main): Coerce argument to pointer to stop gcc
- complaint.
-
-2006-01-01 Christopher Faylor <cgf@timesys.com>
-
- * winsup.api/resethand.c: Use SIGSEGV for the signal to test.
-
-2006-01-01 Christopher Faylor <cgf@timesys.com>
-
- * winsup.api/resethand.c: New file.
-
-2005-12-11 Christopher Faylor <cgf@timesys.com>
-
- * winsup.api/ltp/dup03.c (cleanup): Fix longstanding off-by-one error
- when setting array element to -1.
-
-2005-06-11 Christopher Faylor <cgf@timesys.com>
-
- * winsup.api/pthread/cancel2.c: Use explicit initializer for mutex.
- * winsup.api/pthread/mutex4.c (main): Ditto.
- * winsup.api/pthread/mutex5.c: Reflect change in cygwin default mutex type.
- * winsup.api/pthread/mutex6d.c: Ditto.
-
-2005-06-10 Christopher Faylor <cgf@timesys.com>
-
- * winsup.api/winsup.exp: Remove (temporarily?) -nostdinc from build
- since it causes compile failures with gcc 3.4.4.
-
-2005-06-06 Christopher Faylor <cgf@timesys.com>
-
- * cygload/cygload.exp: .cpp -> .cc.
-
-2005-06-06 Max Kaehn <slothman@electric-cloud.com>
-
- * Makefile.in: Test cygload.
- * cygload: New directory.
- * cygload/README: New file.
- * cygload/Makefile: Ditto.
- * cygload/cygload.h: Ditto.
- * cygload/cygload.cc: Ditto.
- * cygload/cygload.exp: Ditto.
-
-2005-05-17 Brian Dessent <brian@dessent.net>
-
- * winsup.api/signal-into-win32-api.c (main): Use 'NULL' instead of '0'
- in argument list to avoid compiler warning with gcc4.
- * winsup.api/ltp/execle01.c (main): Ditto.
- * winsup.api/ltp/execlp01.c (main): Ditto.
- * winsup.api/ltp/fcntl07.c (do_exec): Ditto.
- * winsup.api/ltp/fcntl07B.c (do_exec): Ditto.
-
-2005-02-10 Christopher Faylor <cgf@timesys.com>
-
- * winsup.api/known_bugs.tcl: Remove dup05, fcntl07B, lseek04, select03,
- unlink06.
- * winsup.api/mmaptest03.c: Make a little more verbose so that it is
- easier to figure out where something failed.
-
-2005-01-09 Christopher Faylor <cgf@timesys.com>
-
- * cygrun.c (main): Fix exit code so that it reflects UNIX style.
- * winsup.api/ltp/fork04.c (setup): Accommodate change in putenv
- declaration.
-
-2004-08-24 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.api/mmaptest01.c (main): Accomodate 9x memory usage.
-
-2004-08-24 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.api/ltp/symlink01.c (do_link): Print inode numbers using %llu
- format specifier.
-
-2004-08-17 Gerd Spalink <Gerd.Spalink@t-online.de>
- Pierre Humblet <Pierre.Humblet@ieee.org>
-
- * devdsp.c: Outputs the names of the main test functions.
- (forkrectest): Expect child success.
- (forkplaytest): Ditto.
- (syncwithchild): Output the child status and the desired value.
- (sinegenw): Reduce volume of the beep.
- (sinegenb): Ditto.
- (dup_test): New test.
-
-2004-04-13 Gerd Spalink <Gerd.Spalink@t-online.de>
-
- * winsup.api/devdsp.c (forkrectest): Move synchronization with child
- so that test passes also under high CPU load.
- (forkplaytest): Ditto.
- (abortplaytest): New function to test ioctl code SNDCTL_DSP_RESET.
-
-2004-04-04 Gerd Spalink <Gerd.Spalink@t-online.de>
-
- * winsup.api/devdsp.c (ioctltest): Add 2 tests for ioctl codes
- SNDCTL_DSP_CHANNELS and SNDCTL_DSP_GETCAPS.
-
-2004-03-24 Gerd Spalink <Gerd.Spalink@t-online.de>
-
- * winsup.api/devdsp.c: New file, testing fhandler_dev_dsp code.
- * winsup.api/devdsp_okay.h: Ditto.
-
-2004-03-06 Christopher Faylor <cgf@redhat.com>
-
- * winsup.api/known_bugs.tcl: Remove mknod01 since mknod now works.
- * winsup.api/ltp/mknod01.c: Remove root check when running on cygwin.
-
-2004-03-04 Thomas Pfaff <tpfaff@gmx.net>
-
- * winsup.api/pthread/mutex8e.c: New testcase.
- * winsup.api/pthread/mutex8n.c: Ditto.
- * winsup.api/pthread/mutex8r.c: Ditto.
-
-2003-12-23 Christopher Faylor <cgf@redhat.com>
-
- * winsup.api/pthread/rwlock7.c (main): Don't assume that result of rand
- operation is non-zero.
-
-2003-12-01 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.api/known_bugs.tcl: Remove fcntl09 and fcntl10. These
- tests had a compatibility bug.
- * winsup.api/ltp/fcntl09.c: Don't use F_RDLCK | F_WRLCK but only
- F_WRLCK to set a write lock.
- * winsup.api/ltp/fcntl10.c: Ditto.
-
-2003-11-25 Christopher Faylor <cgf@redhat.com>
-
- * winsup.api/known_bugs.tcl: Remove lseek10 since mknod now works.
-
-2003-11-20 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.api/msgtest.c (main): Revert to use the SIGSYS signal handler.
- * winsup.api/semtest.c (main): Ditto.
- * winsup.api/shmtest.c (main): Ditto.
-
-2003-11-19 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.api/msgtest.c: New file derived from FreeBSD, testing
- XSI Message Queue support.
- * winsup.api/semtest.c: Ditto, testing XSI Semaphore support.
- * winsup.api/shmtest.c: Ditto, testing XSI Shared Memory support.
-
-2003-07-06 Christopher Faylor <cgf@redhat.com>
-
- * winsup.api/known_bugs.tcl: Remove gethostid01 from list of known
- bugs.
-
-2003-07-06 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Remove .dat files when cleaning.
-
-2003-07-06 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Remove .d files when cleaning.
-
-2003-05-09 Corinna Vinschen <corinna@vinschen.de>
-
- * libltp/include/test.h: Remove gethostid declaration.
-
-2003-04-08 Thomas Pfaff <tpfaff@gmx.net>
-
- * winsup.api/pthread/condvar9.c: Fix test.
-
-2003-03-27 Thomas Pfaff <tpfaff@gmx.net>
-
- * winsup.api/pthread/rwlock1.c: Remove pthreads-win32 header.
- * winsup.api/pthread/rwlock2.c: Ditto.
- * winsup.api/pthread/rwlock3.c: Ditto.
- * winsup.api/pthread/rwlock4.c: Ditto.
- * winsup.api/pthread/rwlock5.c: Ditto.
- * winsup.api/pthread/rwlock6.c: Ditto.
-
-2003-03-27 Brian Ford <ford@vss.fsi.com>
-
- * winsup.api/pthread/condvar7.c (mythread): Cast
- pthread_mutex_unlock argument of pthread_cleanup_push
- to void *, preventing a compiler warning / testsuite failure.
- * winsup.api/pthread/condvar9.c (mythread): Likewise.
- * winsup.api/pthread/rwlock7.c (main): Use ftime instead of
- _ftime.
-
-2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
-
- * winsup.api/pthread/rwlock1.c: New test.
- * winsup.api/pthread/rwlock2.c: Ditto.
- * winsup.api/pthread/rwlock3.c: Ditto.
- * winsup.api/pthread/rwlock4.c: Ditto.
- * winsup.api/pthread/rwlock5.c: Ditto.
- * winsup.api/pthread/rwlock6.c: Ditto.
- * winsup.api/pthread/rwlock7.c: Ditto.
-
-2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
-
- * winsup.api/pthread/condvar7.c: New test.
- * winsup.api/pthread/condvar9.c: Ditto.
-
-2003-03-18 Thomas Pfaff <tpfaff@gmx.net>
-
- * winsup.api/pthread/mutex1n.c: New test.
- * winsup.api/pthread/mutex6n.c: Ditto.
- * winsup.api/pthread/mutex7n.c: Ditto.
-
-2003-03-09 Christopher Faylor <cgf@redhat.com>
-
- * winsup.api/winsup.exp: Use -nostdinc when compiling.
- * Makefile.in: Specifically search compiler include directory since it
- is now stripped via -nostdinc.
-
-2003-03-09 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.api/ltp/fork10.c (main): Remove non-portable declaration
- of lseek.
-
-2003-03-09 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Use "cygwin0" rather than "new-cygwin" to denote
- in-build-tree version of library or dll.
- * config/default.exp: Ditto.
- * winsup.api/winsup.exp: Ditto.
-
-2003-03-07 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.api/known_bugs.tcl: Remove fsync01, setregid01 and setreuid01
- from list of known bugs.
-
-2003-02-19 Vaclav Haisman <V.Haisman@sh.cvut.cz>
-
- * winsup.api/crlf.c: Fix C signed/unsigned compare warning.
- * winsup.api/mmaptest01.c: Ditto.
- * winsup.api/ltp/chmod01.c: Ditto.
- * winsup.api/ltp/fork04.c: Ditto.
- * winsup.api/ltp/lseek03.c: Ditto.
- * winsup.api/ltp/lseek06.c: Ditto.
- * winsup.api/ltp/lseek07.c: Ditto.
- * winsup.api/ltp/lseek08.c: Ditto.
- * winsup.api/ltp/mmap001.c: Ditto.
- * winsup.api/ltp/mmap02.c: Ditto.
- * winsup.api/ltp/mmap03.c: Ditto.
- * winsup.api/ltp/mmap04.c: Ditto.
- * winsup.api/ltp/mmap05.c: Ditto.
- * winsup.api/ltp/mmap06.c: Ditto.
- * winsup.api/ltp/mmap07.c: Ditto.
- * winsup.api/ltp/mmap08.c: Ditto.
- * winsup.api/ltp/pipe11.c: Ditto.
- * winsup.api/ltp/poll01.c: Ditto.
- * winsup.api/ltp/sync02.c: Ditto.
- * winsup.api/ltp/times03.c: Ditto.
- * winsup.api/ltp/umask03.c: Ditto.
- * winsup.api/ltp/getpgid01.c: Remove unused obsolete include.
- * winsup.api/ltp/getpgid02.c: Ditto.
-
-2003-02-08 Christopher Faylor <cgf@redhat.com>
-
- * winsup.api/winsup.exp (ws_spawn): Tweak slightly to work with tcl
- 8.4.1.
-
-2003-02-07 Christopher Faylor <cgf@redhat.com>
-
- * libltp/lib/parse_opts.c: Deal with C warnings.
- * winsup.api/pthread/cancel12.c: Ditto.
- * winsup.api/winsup.exp: Don't use -g3.
-
-2003-02-04 Thomas Pfaff <tpfaff@gmx.net>
-
- * winsup.api/pthread/cancel11.c: New test.
- * winsup.api/pthread/cancel12.c: Ditto.
-
-2003-01-23 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Don't filter out -g. Actually pass correct CFLAGS to
- site.exp.
- * winsup.api/winsup.exp: Use -g flag from CFLAGS.
-
-2003-01-23 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Turn off all optimizations.
- * libltp/lib/parse_opts.c (TEST_VALID_ENO): Move define outside of
- conditional.
- (TEST_ERRNO): Ditto.
- (btime): Ditto.
- (etime): Ditto.
- (tmptime): Ditto.
-
-2003-01-23 Christopher Faylor <cgf@redhat.com>
-
- * libltp/include/usctest.h: Add externs to some variables that need it.
- * winsup.api/ltp/mmap05.c (main): Make file_content volatile to avoid
- optimization glitch.
-
-2003-01-23 Christopher Faylor <cgf@redhat.com>
-
- * winsup.api/mmaptest03.c (main): Mark variables as volatile to avoid
- optimization induced problems.
-
-2003-01-23 Christopher Faylor <cgf@redhat.com>
-
- * Makefile (check): Add cygrun.exe dependency.
-
-2003-01-23 Christopher Faylor <cgf@redhat.com>
-
- Perform more C warning fixup on all C source files and headers.
-
-2003-01-23 Christopher Faylor <cgf@redhat.com>
-
- * libltp/include/test.h: Fix C warnings.
- * winsup.api/checksignal.c: Ditto.
- * winsup.api/crlf.c: Ditto.
- * winsup.api/devzero.c: Ditto.
- * winsup.api/iospeed.c: Ditto.
- * winsup.api/mmaptest01.c: Ditto.
- * winsup.api/mmaptest02.c: Ditto.
- * winsup.api/mmaptest03.c: Ditto.
- * winsup.api/mmaptest04.c: Ditto.
- * winsup.api/nullgetcwd.c: Ditto.
- * winsup.api/sigchld.c: Ditto.
- * winsup.api/signal-into-win32-api.c: Ditto.
- * winsup.api/systemcall.c: Ditto.
- * winsup.api/waitpid.c: Ditto.
- * winsup.api/pthread/mainthreadexits.c: Ditto.
- * winsup.api/pthread/test.h: Ditto.
- * winsup.api/pthread/threadidafterfork.c: Ditto.
-
- * Makefile.in: Remove cygrun.exe from RUNTIME since it is built here
- now.
-
-2003-01-23 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Use ALL_CFLAGS to build test programs so that correct
- libraries and other options are used.
-
-2003-01-22 Corinna Vinschen <corinna@vinschen.de>
-
- * cygrun.c: Move here from ../cygwin.
- * Makefile.in: Build cygrun.exe.
- * winsup.api/winsup.exp: Expect cygrun.exe in $rootme.
-
-2003-01-21 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Find tcl library in the right place.
-
-2003-01-21 Thomas Pfaff <tpfaff@gmx.net>
-
- * winsup.api/pthread/cancel9.c: Make child pid static global.
- (main): Wait in mainthread until child process has terminated.
-
-2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
-
- * winsup.api/pthread/cancel10.c: New test.
-
-2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
-
- * winsup.api/pthread/cancel9.c: New test.
-
-2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
-
- * winsup.api/pthread/cancel7.c: New test.
- * winsup.api/pthread/cancel8.c: Ditto.
-
-2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
-
- * winsup.api/pthread/cancel6.c: New test.
-
-2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
-
- * winsup.api/pthread/mutex1d.c: New test. Port from pthreads-win32
- project.
- * winsup.api/pthread/mutex1e.c: Ditto.
- * winsup.api/pthread/mutex4.c: Ditto.
- * winsup.api/pthread/mutex5.c: Ditto.
- * winsup.api/pthread/mutex6d.c: Ditto.
- * winsup.api/pthread/mutex6e.c: Ditto.
- * winsup.api/pthread/mutex7.c: Ditto.
- * winsup.api/pthread/mutex7d.c: Ditto.
- * winsup.api/pthread/mutex7e.c: Ditto.
- * winsup.api/pthread/mutex7r.c: Ditto.
-
-2002-11-25 Robert Collins <rbtcollins@hotmail.com>
-
- * readme: Document running portions of the test suite (Thanks Egor!).
- * winsup.api/pthread/mainthreadexits.c: New file, derived from
- Thomas Pfaff's test cases.
- * winsup.api/pthread/threadidafterfork.c: Ditto.
-
-2002-08-25 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (RUNTEST): Use Makefile's srcdir and bupdir* macros,
- where appropriate.
- * winsup.api/winsup.exp: Use -nodefaultlibs when linking executable to
- avoid potentially linking installed dll.
-
-2002-07-06 Christopher Faylor <cgf@redhat.com>
-
- * testsuite/winsup.api/winsup.exp: Add -mwin32 to gcc flags so
- windows.h will be found.
-
-2002-07-04 Egor Duda <deo@logos-m.ru>
-
- * winsup.api/pthread/cancel1.c: New test. Port from pthreads-win32
- project.
- * winsup.api/pthread/cancel2.c: Ditto.
- * winsup.api/pthread/cancel3.c: Ditto.
- * winsup.api/pthread/cancel4.c: Ditto.
- * winsup.api/pthread/cancel5.c: Ditto.
-
-2002-07-03 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Eliminate unneeded Makefile recreation rule.
-
-2002-02-27 Christopher Faylor <cgf@redhat.com>
-
- * winsup.api/systemcall.c (main): Ensure that stdin is redirected.
-
-2001-11-18 Egor Duda <deo@logos-m.ru>
-
- * winsup.api/pthread/condvar3_1.c: Fix debugging output.
-
-2001-11-15 Egor Duda <deo@logos-m.ru>
-
- * winsup.api/pthread/: New directory. Ports of pthread functionality
- tests from pthreads-win32 project.
- * winsup.api/pthread/test.h: Commmon declaraions for pthread tests.
- * winsup.api/pthread/cleanup2.c: New test.
- * winsup.api/pthread/cleanup3.c: Ditto.
- * winsup.api/pthread/condvar1.c: Ditto.
- * winsup.api/pthread/condvar2.c: Ditto.
- * winsup.api/pthread/condvar2_1.c: Ditto.
- * winsup.api/pthread/condvar3.c: Ditto.
- * winsup.api/pthread/condvar3_1.c: Ditto.
- * winsup.api/pthread/condvar3_2.c: Ditto.
- * winsup.api/pthread/condvar3_3.c: Ditto.
- * winsup.api/pthread/condvar4.c: Ditto.
- * winsup.api/pthread/condvar5.c: Ditto.
- * winsup.api/pthread/condvar6.c: Ditto.
- * winsup.api/pthread/condvar8.c: Ditto.
- * winsup.api/pthread/count1.c: Ditto.
- * winsup.api/pthread/create1.c: Ditto.
- * winsup.api/pthread/create2.c: Ditto.
- * winsup.api/pthread/equal1.c: Ditto.
- * winsup.api/pthread/exit1.c: Ditto.
- * winsup.api/pthread/exit2.c: Ditto.
- * winsup.api/pthread/exit3.c: Ditto.
- * winsup.api/pthread/inherit1.c: Ditto.
- * winsup.api/pthread/join0.c: Ditto.
- * winsup.api/pthread/join1.c: Ditto.
- * winsup.api/pthread/join2.c: Ditto.
- * winsup.api/pthread/mutex1.c: Ditto.
- * winsup.api/pthread/mutex1r.c: Ditto.
- * winsup.api/pthread/mutex2.c: Ditto.
- * winsup.api/pthread/mutex3.c: Ditto.
- * winsup.api/pthread/mutex6r.c: Ditto.
- * winsup.api/pthread/once1.c: Ditto.
- * winsup.api/pthread/priority1.c: Ditto.
- * winsup.api/pthread/priority2.c: Ditto.
- * winsup.api/pthread/self1.c: Ditto.
- * winsup.api/pthread/self2.c: Ditto.
- * winsup.api/pthread/tsd1.c: Ditto.
-
-2001-11-08 Corinna Vinschen <corinna@vinschen.de>
-
- * checksignal.c: New testcase.
-
-2001-11-04 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Oops. Revert previous change. Add Makefile/Makefile.in
- dependency.
-
-2001-11-04 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Add check target.
-
-2001-11-02 Egor Duda <deo@logos-m.ru>
-
- * libltp/lib/forker.c: Include proper header to avoid compiler
- warning.
-
-2001-10-29 Egor Duda <deo@logos-m.ru>
-
- * winsup.api/ltp/stat03.c: Supress compiler warning.
-
-2001-10-29 Egor Duda <deo@logos-m.ru>
-
- * winsup.api/signal-into-win32-api.c: Supress compiler warning.
-
-Mon Oct 8 14:15:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.api/mmaptest01.c: Add several tests on mmaps. Use libltp.
- * winsup.api/winsup.exp: Link all tests agains libltp.
-
-Fri Oct 5 11:15:55 2001 Christopher Faylor <cgf@cygnus.com>
-
- * winsup.api/nullgetcwd.c: New file. Check that NULL first argument to
- getcwd works.
-
-Thu Oct 4 22:47:51 2001 Christopher Faylor <cgf@cygnus.com>
-
- * winsup.api/systemcall.c (main): Change some messages for clarity.
-
-Thu Oct 4 22:19:39 2001 Christopher Faylor <cgf@cygnus.com>
-
- * winsup.api/systemcall.c: New file. Check for system call problems.
-
-2001-09-20 Egor Duda <deo@logos-m.ru>
-
- * libltp/lib/get_high_address.c (get_high_address): Get inaccessible
- address more robustly.
- * winsup.api/ltp/stat06.c (high_address_setup): Use generic function
- from ltp library to obtain inaccessible address.
-
-2001-09-15 Egor Duda <deo@logos-m.ru>
-
- * winsup.api/ltp/sbrk01.c (main): Force output at startup to
- make sure that stdio file buffer get allocated.
- * winsup.api/ltp/stat06.c (high_address_setup): On cygwin, area
- after sbrk(0) may be available, use 0xffff0000 as "high address".
- * winsup.api/ltp/symlink01.c: Perform all tests. Mark those tests that
- don't work on cygwin with '-1'. Close open files so that temporary
- directory can be deleted on exit.
- * winsup.api/ltp/vfork01.c: New test.
-
-2001-09-13 Egor Duda <deo@logos-m.ru>
-
- * winsup.api/winsup.exp: Run only selected test if environment
- variable CYGWIN_TESTSUITE_TESTS is set. Use its value as regular
- expression to filter test names.
- * winsup.api/ltp/symlink01.c (creat_path_max): Provide explicit
- buffer to getcwd to conform to standards and avoid memory leak.
- (do_chdir): Ditto.
-
-2001-09-13 Egor Duda <deo@logos-m.ru>
-
- * libltp/lib/tst_sig.c: Pass SIGSEGV to application to consider
- whether it's expected or not.
- * winsup.api/known_bugs.tcl: lseek10 is known to fail because mknod
- is not implemented.
- * winsup.api/ltp/rename02.c: Fix formatting.
- * libltp/lib/libtestsuite.c: New file.
- * winsup.api/signal-into-win32-api.c: New test.
- * winsup.api/ltp/access04.c: Ditto.
- * winsup.api/ltp/access05.c: Ditto.
- * winsup.api/ltp/alarm07.c: Ditto.
- * winsup.api/ltp/chdir04.c: Ditto.
- * winsup.api/ltp/chmod01.c: Ditto.
- * winsup.api/ltp/close01.c: Ditto.
- * winsup.api/ltp/close02.c: Ditto.
- * winsup.api/ltp/creat01.c: Ditto.
- * winsup.api/ltp/creat03.c: Ditto.
- * winsup.api/ltp/exit01.c: Ditto.
- * winsup.api/ltp/exit02.c: Ditto.
- * winsup.api/ltp/fchdir01.c: Ditto.
- * winsup.api/ltp/fchdir02.c: Ditto.
- * winsup.api/ltp/fork02.c: Ditto.
- * winsup.api/ltp/fork03.c: Ditto.
- * winsup.api/ltp/fork06.c: Ditto.
- * winsup.api/ltp/fork07.c: Ditto.
- * winsup.api/ltp/fork09.c: Ditto.
- * winsup.api/ltp/fork10.c: Ditto.
- * winsup.api/ltp/fork11.c: Ditto.
- * winsup.api/ltp/fstat02.c: Ditto.
- * winsup.api/ltp/fstat03.c: Ditto.
- * winsup.api/ltp/fstat04.c: Ditto.
- * winsup.api/ltp/ftruncate01.c: Ditto.
- * winsup.api/ltp/ftruncate02.c: Ditto.
- * winsup.api/ltp/ftruncate03.c: Ditto.
- * winsup.api/ltp/getgid02.c: Ditto.
- * winsup.api/ltp/getgid03.c: Ditto.
- * winsup.api/ltp/getpgid01.c: Ditto.
- * winsup.api/ltp/getpgid02.c: Ditto.
- * winsup.api/ltp/getpid02.c: Ditto.
- * winsup.api/ltp/getppid02.c: Ditto.
- * winsup.api/ltp/getuid02.c: Ditto.
- * winsup.api/ltp/getuid03.c: Ditto.
- * winsup.api/ltp/kill01.c: Ditto.
- * winsup.api/ltp/kill02.c: Ditto.
- * winsup.api/ltp/kill03.c: Ditto.
- * winsup.api/ltp/kill04.c: Ditto.
- * winsup.api/ltp/lseek06.c: Ditto.
- * winsup.api/ltp/lseek07.c: Ditto.
- * winsup.api/ltp/lseek08.c: Ditto.
- * winsup.api/ltp/lseek09.c: Ditto.
- * winsup.api/ltp/lseek10.c: Ditto.
- * winsup.api/ltp/mmap02.c: Ditto.
- * winsup.api/ltp/mmap03.c: Ditto.
- * winsup.api/ltp/mmap04.c: Ditto.
- * winsup.api/ltp/mmap05.c: Ditto.
- * winsup.api/ltp/mmap06.c: Ditto.
- * winsup.api/ltp/mmap07.c: Ditto.
- * winsup.api/ltp/mmap08.c: Ditto.
- * winsup.api/ltp/munmap01.c: Ditto.
- * winsup.api/ltp/munmap02.c: Ditto.
- * winsup.api/ltp/open02.c: Ditto.
- * winsup.api/ltp/pipe01.c: Ditto.
- * winsup.api/ltp/pipe08.c: Ditto.
- * winsup.api/ltp/pipe09.c: Ditto.
- * winsup.api/ltp/pipe10.c: Ditto.
- * winsup.api/ltp/pipe11.c: Ditto.
- * winsup.api/ltp/poll01.c: Ditto.
- * winsup.api/ltp/read04.c: Ditto.
- * winsup.api/ltp/readlink01.c: Ditto.
- * winsup.api/ltp/readlink03.c: Ditto.
- * winsup.api/ltp/rename01.c: Ditto.
- * winsup.api/ltp/rename08.c: Ditto.
- * winsup.api/ltp/rename10.c: Ditto.
- * winsup.api/ltp/rmdir01.c: Ditto.
- * winsup.api/ltp/stat01.c: Ditto.
- * winsup.api/ltp/stat02.c: Ditto.
- * winsup.api/ltp/stat03.c: Ditto.
- * winsup.api/ltp/symlink03.c: Ditto.
- * winsup.api/ltp/symlink04.c: Ditto.
- * winsup.api/ltp/symlink05.c: Ditto.
- * winsup.api/ltp/sync02.c: Ditto.
- * winsup.api/ltp/time02.c: Ditto.
- * winsup.api/ltp/times02.c: Ditto.
- * winsup.api/ltp/times03.c: Ditto.
- * winsup.api/ltp/truncate01.c: Ditto.
- * winsup.api/ltp/truncate02.c: Ditto.
- * winsup.api/ltp/umask02.c: Ditto.
- * winsup.api/ltp/umask03.c: Ditto.
- * winsup.api/ltp/wait401.c: Ditto.
- * winsup.api/ltp/wait402.c: Ditto.
- * winsup.api/ltp/write02.c: Ditto.
- * winsup.api/ltp/write03.c: Ditto.
-
-2001-09-09 Egor Duda <deo@logos-m.ru>
-
- * winsup.api/ltp/dup03.c: New test.
- * winsup.api/ltp/lseek03.c: Ditto.
- * winsup.api/ltp/mmap001.c: Ditto.
- * winsup.api/ltp/read01.c: Ditto.
- * winsup.api/ltp/readdir01.c: Ditto.
- * winsup.api/ltp/rmdir05.c: Ditto.
- * winsup.api/ltp/sbrk01.c: Ditto.
- * winsup.api/ltp/select02.c: Ditto.
- * winsup.api/ltp/select03.c: Ditto.
- * winsup.api/ltp/signal03.c: Ditto.
- * winsup.api/ltp/stat06.c: Ditto.
- * winsup.api/ltp/unlink08.c: Ditto.
- * winsup.api/known_bugs.tcl: Update to reflect new test's known
- failures.
- * winsup.api/winsup.exp: Don't delete executable in case of
- unexpected pass, as well as in case of unexpected failure.
- * README: Update paragraph about expected failures.
-
-2001-05-21 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.api/mmaptest01.c: Add log output.
- * winsup.api/mmaptest02.c: Write log output to stdout.
- * winsup.api/mmaptest03.c: Ditto.
-
-2001-05-15 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.api/winsup.exp: Force linking all tests against binmode.o.
-
-2001-04-27 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.api/mmaptest04.c: Take care for binmode explicitely.
-
-2001-04-19 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.api/mmaptest02.c: New test.
- * winsup.api/mmaptest03.c: Ditto.
- * winsup.api/mmaptest04.c: Ditto.
-
-2001-04-03 Corinna Vinschen <corinna@vinschen.de>
-
- * winsup.api/mmaptest01.c: New test.
-
-2001-03-10 Egor Duda <deo@logos-m.ru>
-
- * winsup.api/ltp/access01.c: Avoid compilation error if X_OK
- isn't declared as a constant.
-
-2001-03-09 Egor Duda <deo@logos-m.ru>
-
- * config/default.exp: Remove unneeded debugging output.
- * Makefile.in: Use correct path to find dejagnu in local tree.
-
-2000-09-06 Egor Duda <deo@logos-m.ru>
-
- Add 'const' qualifiers where needed to avoid compiler warnings.
- * libltp/lib/tst_sig.c (tst_sig): Don't attempt to cleanup on
- fatal errors.
- * libltp/lib/parse_opts.c (parse_opts): Initialize allocated
- string to prevent heap corruption.
-
-2000-09-04 Egor Duda <deo@logos-m.ru>
-
- * Makefile.in: Always add libltp headers directory to headers
- search path.
-
-2000-09-02 Egor Duda <deo@logos-m.ru>
-
- * moved here everything from cygwin/testsuite/
- * configure.in: New file
- * configure: New file, generated from configure.in
- with autoconf 2.13
- * Makefile.in: New file
- * libltp/: New directory. Contains a support library
- and headers for tests in winsup.api/ltp/
- * config/default.exp: Print value of CYGWIN environment
- variable when test completed
- * winsup.api/samples/xf-sample-fail.c renamed to
- winsup.api/samples/sample-fail.c
- * winsup.api/samples/xf-sample-miscompile.c renamed to
- winsup.api/samples/sample-miscompile.c
- * winsup.api/known_bugs.tcl: New file.
- * winsup.api/winsup.exp: Xfail test if its name is in
- list from known_bugs.tcl
- * winsup.api/winsup.exp: Don't stop if compiled test executable
- can't be deleted
- * winsup.api/winsup.exp: If in verbose mode, write test output
- to <testname>.log
- * winsup.api/ltp/: New directory. Contains cygwin port of testsuite
- from Linux Testing Project
- * winsup.api/sigchld.c: New file. Test if process recieves SIGCHLD
- signal when its child terminates.
- * winsup.api/waitpid.c: New file. Test if waitpid function works
diff --git a/winsup/testsuite/Makefile.in b/winsup/testsuite/Makefile.in
deleted file mode 100644
index d7d1515..0000000
--- a/winsup/testsuite/Makefile.in
+++ /dev/null
@@ -1,175 +0,0 @@
-# Makefile.in for Cygwin's testsuite.
-# Copyright 2000, 2001, 2002, 2003, 2005, 2006 Red Hat, Inc.
-#
-# This file is part of Cygwin.
-#
-# This software is a copyrighted work licensed under the terms of the
-# Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-# details.
-
-# This makefile requires GNU make.
-
-SHELL:=@SHELL@
-srcdir:=@srcdir@
-objdir:=.
-libltp_srcdir=$(srcdir)/libltp
-
-VPATH:=$(srcdir):$(libltp_srcdir)/lib
-
-target_alias:=@target_alias@
-build_alias:=@build_alias@
-host_alias:=@host_alias@
-
-DESTDIR=
-prefix:=${DESTDIR}@prefix@
-
-program_transform_name:=@program_transform_name@
-exec_prefix:=${DESTDIR}@exec_prefix@
-bindir:=${DESTDIR}@bindir@
-libdir:=${DESTDIR}@libdir@
-ifeq ($(target_alias),$(host_alias))
-ifeq ($(build_alias),$(host_alias))
-tooldir:=$(exec_prefix)
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-datadir:=${DESTDIR}@datadir@
-infodir:=${DESTDIR}@infodir@
-includedir:=${DESTDIR}@includedir@
-
-TESTSUP_INCLUDES:=-I$(libltp_srcdir)/include
-
-#
-# --enable options from configure
-#
-
-CC:=@CC@
-# FIXME: Which is it, CC or CC_FOR_TARGET?
-CC_FOR_TARGET:=$(CC)
-ifneq (,$(CFLAGS))
- override CFLAGS+= -MD $(TESTSUP_INCLUDES)
-else
- CFLAGS:=@CFLAGS@ -MD $(TESTSUP_INCLUDES)
-endif
-
-AR:=@AR@
-AR_FLAGS:=qv
-
-#
-# Include common definitions for winsup directory
-#
-include $(srcdir)/../Makefile.common
-
-override CC:=$(CC) $(GCC_INCLUDE)
-export CC
-
-RUNTESTFLAGS =
-
-ifdef VERBOSE
- RUNTESTFLAGS = -v
-endif
-
-RUNTIME=$(cygwin_build)/cygwin0.dll $(cygwin_build)/libcygwin0.a
-
-TESTSUP_LIB_NAME:=libltp.a
-TESTSUP_OFILES:=${sort ${addsuffix .o,${basename ${notdir ${wildcard $(libltp_srcdir)/lib/*.c}}}}}
-
-override ALL_CFLAGS:=${filter-out -O%,$(ALL_CFLAGS)}
-override COMPILE_CC:=${filter-out -O%,$(COMPILE_CC)}
-override CFLAGS:=${filter-out -O%,$(CFLAGS)}
-export CFLAGS
-
-.PHONY: all force dll_ofiles install all_target install_target install_host
-
-.SUFFIXES:
-.SUFFIXES: .c .cc .def .a .o .d
-
-all: $(TESTSUP_LIB_NAME)
-
-force:
-
-install:
-
-install_host:
-
-clean:
- -rm -f *.o *.dll *.a *.exp junk *.bak *.base *.exe testsuite/* *.d *.dat
-
-maintainer-clean realclean: clean
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
- -rm -fr configure
-
-# Rule to build libltp.a
-
-$(TESTSUP_LIB_NAME): $(TESTSUP_OFILES)
- $(AR) rcv temp.a $(TESTSUP_OFILES)
- mv temp.a $(TESTSUP_LIB_NAME)
-
-$(RUNTIME) : $(cygwin_build)/Makefile
- @$(MAKE) --no-print-dir -C $(@D) $(@F)
-
-# Rule to make stub library used by "make check"
-
-#
-
-# These targets are for the dejagnu testsuites. The file site.exp
-# contains global variables that all the testsuites will use.
-
-# Set to $(target_alias)/ for cross.
-target_subdir = @target_subdir@
-
-site.exp: ./config.status Makefile
- @echo "Making a new config file..."
- -@rm -f ./tmp?
- @touch site.exp
- -@mv site.exp site.bak
- @echo "## these variables are automatically generated by make ##" > ./tmp0
- @echo "# Do not edit here. If you wish to override these values" >> ./tmp0
- @echo "# add them to the last section" >> ./tmp0
- @echo "set rootme \"`pwd`\"" >> ./tmp0
- @echo "set runtime_root \"\$$rootme/../cygwin\"" >> ./tmp0
- @echo "set srcdir \"`cd ${srcdir}; pwd`\"" >> ./tmp0
- @echo "set host_triplet $(host_canonical)" >> ./tmp0
- @echo "set build_triplet $(build_canonical)" >> ./tmp0
- @echo "set target_triplet $(target)" >> ./tmp0
- @echo "set target_alias $(target_alias)" >> ./tmp0
- @echo "set CC \"$(CC)\"" >> ./tmp0
-# CFLAGS is set even though it's empty to show we reserve the right to set it.
- @echo "set CFLAGS \"$(ALL_CFLAGS)\"" >> ./tmp0
- echo "set tmpdir $(objdir)/testsuite" >> ./tmp0
- @echo "set ltp_includes \"$(libltp_srcdir)/include\"" >> ./tmp0
- @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
- @cat ./tmp0 > site.exp
- @cat site.bak | sed \
- -e '1,/^## All variables above are.*##/ d' >> site.exp
- -@rm -f ./tmp?
-
-testsuite/site.exp: site.exp
- if [ -d testsuite ]; then \
- true; \
- else \
- mkdir testsuite; \
- fi
- rm -rf testsuite/site.exp
- cp site.exp testsuite/site.exp
-
-# Note: we set the PATH so that we can pick up cygwin0.dll
-
-check: $(TESTSUP_LIB_NAME) $(RUNTIME) cygrun.exe testsuite/site.exp
- cd testsuite; \
- export EXPECT=expect ; \
- if [ -f $(bupdir2)/expect/expect ] ; then \
- TCL_LIBRARY=`cd .. ; cd ${srcdir}/../../tcl/library ; pwd` ; \
- export TCL_LIBRARY ; fi ; \
- PATH=$(bupdir)/cygwin:$${PATH} ;\
- runtest --tool winsup $(RUNTESTFLAGS) ;\
-
-cygrun.o: cygrun.c
- $(CC) $(MINGW_CFLAGS) -o $@ -c $<
-
-cygrun.exe : cygrun.o
- $(CC) ${MINGW_LDFLAGS} -mno-cygwin -o $@ $<
diff --git a/winsup/testsuite/README b/winsup/testsuite/README
deleted file mode 100644
index 2f6749b..0000000
--- a/winsup/testsuite/README
+++ /dev/null
@@ -1,40 +0,0 @@
-1999-12-23 DJ Delorie <dj@cygnus.com>
-
-Here are some notes about adding and using this testsuite.
-
-First, all the programs are linked with libcygwin0.a, which is just
-like libcygwin.a, except that it wants cygwin0.dll, not
-cygwin1.dll. The testsuite adds the winsup build directory to the
-PATH so that cygwin0.dll can be found by windows during testing.
-
-Because we'll probably run into complaints about using two DLLs, we
-run cygrun.exe for each test. All this does is run the test with
-CreateProcess() so that we don't attempt to do the special code for
-when a cygwin program calls another cygwin program, as this might be a
-"multiple cygwins" problem.
-
-Any test that needs to test command line args or redirection needs to
-run such a child program itself, as the testsuite will not do any
-arguments or redirection for it. Same for fork, signals, etc.
-
-The testsuite/winsup.api subdirectory is for testing the API to
-cygwin1.dll ONLY. Create other subdirs under testsuite/ for other
-classes of testing.
-
-Tests in winsup.api/*.c or winsup.api/*/*.c (only one subdirectory
-level is allowed) either compile, run, and exit(0) or they fail.
-Either abort or exit with a non-zero code to indicate failure. Don't
-print anything to the screen if you can avoid it (except for failure
-reasons, of course). One .c file per test, no compile options are
-allowed (we're testing the api, not the compiler).
-
-Tests whose filename is mentioned in known-bugs.tcl will be *expected*
-to fail, and will "fail" if they compile, run, and return zero.
-
-"make check" will only work if you run it *on* an NT machine.
-Cross-checking is not supported.
-
-To test a subset of the test-suite, use
-$ make check CYGWIN_TESTSUITE_TESTS=regexp
-
-
diff --git a/winsup/testsuite/aclocal.m4 b/winsup/testsuite/aclocal.m4
deleted file mode 100644
index 177c013..0000000
--- a/winsup/testsuite/aclocal.m4
+++ /dev/null
@@ -1,831 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-# lib-prefix.m4 serial 4 (gettext-0.14.2)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
-dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
-dnl require excessive bracketing.
-ifdef([AC_HELP_STRING],
-[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
-[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
-
-dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
-dnl to access previously installed libraries. The basic assumption is that
-dnl a user will want packages to use other packages he previously installed
-dnl with the same --prefix option.
-dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
-dnl libraries, but is otherwise very convenient.
-AC_DEFUN([AC_LIB_PREFIX],
-[
- AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib-prefix],
-[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
- --without-lib-prefix don't search for libraries in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
- fi
- fi
-])
- if test $use_additional = yes; then
- dnl Potentially add $additional_includedir to $CPPFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's already present in $CPPFLAGS,
- dnl 3. if it's /usr/local/include and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- for x in $CPPFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $CPPFLAGS.
- CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- dnl Potentially add $additional_libdir to $LDFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's already present in $LDFLAGS,
- dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
- haveit=
- for x in $LDFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_libdir" = "X/usr/local/lib"; then
- if test -n "$GCC"; then
- case $host_os in
- linux*) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LDFLAGS.
- LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- fi
-])
-
-dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
-dnl acl_final_exec_prefix, containing the values to which $prefix and
-dnl $exec_prefix will expand at the end of the configure script.
-AC_DEFUN([AC_LIB_PREPARE_PREFIX],
-[
- dnl Unfortunately, prefix and exec_prefix get only finally determined
- dnl at the end of configure.
- if test "X$prefix" = "XNONE"; then
- acl_final_prefix="$ac_default_prefix"
- else
- acl_final_prefix="$prefix"
- fi
- if test "X$exec_prefix" = "XNONE"; then
- acl_final_exec_prefix='${prefix}'
- else
- acl_final_exec_prefix="$exec_prefix"
- fi
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
- prefix="$acl_save_prefix"
-])
-
-dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
-dnl variables prefix and exec_prefix bound to the values they will have
-dnl at the end of the configure script.
-AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
-[
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- acl_save_exec_prefix="$exec_prefix"
- exec_prefix="$acl_final_exec_prefix"
- $1
- exec_prefix="$acl_save_exec_prefix"
- prefix="$acl_save_prefix"
-])
-
-# lib-link.m4 serial 6 (gettext-0.14.3)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_PREREQ(2.50)
-
-dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
-dnl augments the CPPFLAGS variable.
-AC_DEFUN([AC_LIB_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
- ac_cv_lib[]Name[]_libs="$LIB[]NAME"
- ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
- ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
- ])
- LIB[]NAME="$ac_cv_lib[]Name[]_libs"
- LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
- INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
- dnl results of this search when this library appears as a dependency.
- HAVE_LIB[]NAME=yes
- undefine([Name])
- undefine([NAME])
-])
-
-dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
-dnl searches for libname and the libraries corresponding to explicit and
-dnl implicit dependencies, together with the specified include files and
-dnl the ability to compile and link the specified testcode. If found, it
-dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
-dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
-dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
-dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
-AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-
- dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
- dnl accordingly.
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
-
- dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
- dnl because if the user has installed lib[]Name and not disabled its use
- dnl via --without-lib[]Name-prefix, he wants to use it.
- ac_save_CPPFLAGS="$CPPFLAGS"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-
- AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS $LIB[]NAME"
- AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
- LIBS="$ac_save_LIBS"
- ])
- if test "$ac_cv_lib[]Name" = yes; then
- HAVE_LIB[]NAME=yes
- AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
- AC_MSG_CHECKING([how to link with lib[]$1])
- AC_MSG_RESULT([$LIB[]NAME])
- else
- HAVE_LIB[]NAME=no
- dnl If $LIB[]NAME didn't lead to a usable library, we don't need
- dnl $INC[]NAME either.
- CPPFLAGS="$ac_save_CPPFLAGS"
- LIB[]NAME=
- LTLIB[]NAME=
- fi
- AC_SUBST([HAVE_LIB]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- undefine([Name])
- undefine([NAME])
-])
-
-dnl Determine the platform dependent parameters needed to use rpath:
-dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
-dnl hardcode_direct, hardcode_minus_L.
-AC_DEFUN([AC_LIB_RPATH],
-[
- dnl Tell automake >= 1.10 to complain if config.rpath is missing.
- m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
- AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
- AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
- AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
- AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
- CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
- ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
- . ./conftest.sh
- rm -f ./conftest.sh
- acl_cv_rpath=done
- ])
- wl="$acl_cv_wl"
- libext="$acl_cv_libext"
- shlibext="$acl_cv_shlibext"
- hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
- hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
- hardcode_direct="$acl_cv_hardcode_direct"
- hardcode_minus_L="$acl_cv_hardcode_minus_L"
- dnl Determine whether the user wants rpath handling at all.
- AC_ARG_ENABLE(rpath,
- [ --disable-rpath do not hardcode runtime library paths],
- :, enable_rpath=yes)
-])
-
-dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
-AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
-[
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib$1-prefix],
-[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
- --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
- fi
- fi
-])
- dnl Search the library and its dependencies in $additional_libdir and
- dnl $LDFLAGS. Using breadth-first-seach.
- LIB[]NAME=
- LTLIB[]NAME=
- INC[]NAME=
- rpathdirs=
- ltrpathdirs=
- names_already_handled=
- names_next_round='$1 $2'
- while test -n "$names_next_round"; do
- names_this_round="$names_next_round"
- names_next_round=
- for name in $names_this_round; do
- already_handled=
- for n in $names_already_handled; do
- if test "$n" = "$name"; then
- already_handled=yes
- break
- fi
- done
- if test -z "$already_handled"; then
- names_already_handled="$names_already_handled $name"
- dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
- dnl or AC_LIB_HAVE_LINKFLAGS call.
- uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
- eval value=\"\$HAVE_LIB$uppername\"
- if test -n "$value"; then
- if test "$value" = yes; then
- eval value=\"\$LIB$uppername\"
- test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
- eval value=\"\$LTLIB$uppername\"
- test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
- else
- dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
- dnl that this library doesn't exist. So just drop it.
- :
- fi
- else
- dnl Search the library lib$name in $additional_libdir and $LDFLAGS
- dnl and the already constructed $LIBNAME/$LTLIBNAME.
- found_dir=
- found_la=
- found_so=
- found_a=
- if test $use_additional = yes; then
- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
- found_dir="$additional_libdir"
- found_so="$additional_libdir/lib$name.$shlibext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- else
- if test -f "$additional_libdir/lib$name.$libext"; then
- found_dir="$additional_libdir"
- found_a="$additional_libdir/lib$name.$libext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- fi
- fi
- fi
- if test "X$found_dir" = "X"; then
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- case "$x" in
- -L*)
- dir=`echo "X$x" | sed -e 's/^X-L//'`
- if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
- found_dir="$dir"
- found_so="$dir/lib$name.$shlibext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- else
- if test -f "$dir/lib$name.$libext"; then
- found_dir="$dir"
- found_a="$dir/lib$name.$libext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- fi
- fi
- ;;
- esac
- if test "X$found_dir" != "X"; then
- break
- fi
- done
- fi
- if test "X$found_dir" != "X"; then
- dnl Found the library.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
- if test "X$found_so" != "X"; then
- dnl Linking with a shared library. We attempt to hardcode its
- dnl directory into the executable's runpath, unless it's the
- dnl standard /usr/lib.
- if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
- dnl No hardcoding is needed.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $found_dir"
- fi
- dnl The hardcoding into $LIBNAME is system dependent.
- if test "$hardcode_direct" = yes; then
- dnl Using DIR/libNAME.so during linking hardcodes DIR into the
- dnl resulting binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $found_dir"
- fi
- else
- dnl Rely on "-L$found_dir".
- dnl But don't add it if it's already contained in the LDFLAGS
- dnl or the already constructed $LIBNAME
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
- fi
- if test "$hardcode_minus_L" != no; then
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
- dnl here, because this doesn't fit in flags passed to the
- dnl compiler. So give up. No hardcoding. This affects only
- dnl very old systems.
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- fi
- else
- if test "X$found_a" != "X"; then
- dnl Linking with a static library.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
- else
- dnl We shouldn't come here, but anyway it's good to have a
- dnl fallback.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
- fi
- fi
- dnl Assume the include files are nearby.
- additional_includedir=
- case "$found_dir" in
- */lib | */lib/)
- basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
- additional_includedir="$basedir/include"
- ;;
- esac
- if test "X$additional_includedir" != "X"; then
- dnl Potentially add $additional_includedir to $INCNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's /usr/local/include and we are using GCC on Linux,
- dnl 3. if it's already present in $CPPFLAGS or the already
- dnl constructed $INCNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- for x in $CPPFLAGS $INC[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $INCNAME.
- INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- fi
- dnl Look for dependencies.
- if test -n "$found_la"; then
- dnl Read the .la file. It defines the variables
- dnl dlname, library_names, old_library, dependency_libs, current,
- dnl age, revision, installed, dlopen, dlpreopen, libdir.
- save_libdir="$libdir"
- case "$found_la" in
- */* | *\\*) . "$found_la" ;;
- *) . "./$found_la" ;;
- esac
- libdir="$save_libdir"
- dnl We use only dependency_libs.
- for dep in $dependency_libs; do
- case "$dep" in
- -L*)
- additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
- dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 3. if it's already present in $LDFLAGS or the already
- dnl constructed $LIBNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
- haveit=
- if test "X$additional_libdir" = "X/usr/local/lib"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LIBNAME.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- haveit=
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LTLIBNAME.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- ;;
- -R*)
- dir=`echo "X$dep" | sed -e 's/^X-R//'`
- if test "$enable_rpath" != no; then
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $dir"
- fi
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $dir"
- fi
- fi
- ;;
- -l*)
- dnl Handle this in the next round.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
- ;;
- *.la)
- dnl Handle this in the next round. Throw away the .la's
- dnl directory; it is already contained in a preceding -L
- dnl option.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
- ;;
- *)
- dnl Most likely an immediate library name.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
- ;;
- esac
- done
- fi
- else
- dnl Didn't find the library; assume it is in the system directories
- dnl known to the linker and runtime loader. (All the system
- dnl directories known to the linker should also be known to the
- dnl runtime loader, otherwise the system is severely misconfigured.)
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- done
- done
- if test "X$rpathdirs" != "X"; then
- if test -n "$hardcode_libdir_separator"; then
- dnl Weird platform: only the last -rpath option counts, the user must
- dnl pass all path elements in one option. We can arrange that for a
- dnl single library, but not when more than one $LIBNAMEs are used.
- alldirs=
- for found_dir in $rpathdirs; do
- alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
- done
- dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
- acl_save_libdir="$libdir"
- libdir="$alldirs"
- eval flag=\"$hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- else
- dnl The -rpath options are cumulative.
- for found_dir in $rpathdirs; do
- acl_save_libdir="$libdir"
- libdir="$found_dir"
- eval flag=\"$hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- done
- fi
- fi
- if test "X$ltrpathdirs" != "X"; then
- dnl When using libtool, the option that works for both libraries and
- dnl executables is -R. The -R options are cumulative.
- for found_dir in $ltrpathdirs; do
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
- done
- fi
-])
-
-dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
-dnl unless already present in VAR.
-dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
-dnl contains two or three consecutive elements that belong together.
-AC_DEFUN([AC_LIB_APPENDTOVAR],
-[
- for element in [$2]; do
- haveit=
- for x in $[$1]; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X$element"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- [$1]="${[$1]}${[$1]:+ }$element"
- fi
- done
-])
-
-# lib-ld.m4 serial 3 (gettext-0.13)
-dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
-
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
-AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- acl_cv_prog_gnu_ld=yes ;;
-*)
- acl_cv_prog_gnu_ld=no ;;
-esac])
-with_gnu_ld=$acl_cv_prog_gnu_ld
-])
-
-dnl From libtool-1.4. Sets the variable LD.
-AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- [re_direlt='/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(acl_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- acl_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break ;;
- *)
- test "$with_gnu_ld" != yes && break ;;
- esac
- fi
- done
- IFS="$ac_save_ifs"
-else
- acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$acl_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_LIB_PROG_LD_GNU
-])
-
diff --git a/winsup/testsuite/config/default.exp b/winsup/testsuite/config/default.exp
deleted file mode 100644
index 3936979..0000000
--- a/winsup/testsuite/config/default.exp
+++ /dev/null
@@ -1,13 +0,0 @@
-proc winsup_version {} {
- global env
- global rootme
- clone_output "\n[exec grep ^%%% $rootme/../cygwin/cygwin0.dll]\n"
- if { [info exists env(CYGWIN)] } {
- clone_output "CYGWIN=$env(CYGWIN)\n"
- } else {
- clone_output "CYGWIN=\n"
- }
-}
-
-proc winsup_exit {} {
-}
diff --git a/winsup/testsuite/configure b/winsup/testsuite/configure
deleted file mode 100644
index 4d97f3f..0000000
--- a/winsup/testsuite/configure
+++ /dev/null
@@ -1,3399 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59.
-#
-# Copyright (C) 2003 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-exec 6>&1
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_config_libobj_dir=.
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete. It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
-# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-
-ac_unique_file="Makefile.in"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP AR ac_ct_AR LIBOBJS LTLIBOBJS'
-ac_subst_files=''
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-ac_prev=
-for ac_option
-do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_option in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- eval "enable_$ac_feature=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_$ac_feature='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "with_$ac_package='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
- eval "with_$ac_package=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries=$ac_optarg ;;
-
- -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$ac_envvar='$ac_optarg'"
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$0" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
- fi
-fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
- { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-_ACEOF
-
- cat <<_ACEOF
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
-_ACEOF
-
- cat <<\_ACEOF
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-
- cat <<\_ACEOF
-
-Some influential environment variables:
- CC C compiler command
- CFLAGS C compiler flags
- LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
- nonstandard directory <lib dir>
- CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
- headers in a nonstandard directory <include dir>
- CPP C preprocessor
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-_ACEOF
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- ac_popdir=`pwd`
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_srcdir/configure.gnu; then
- echo
- $SHELL $ac_srcdir/configure.gnu --help=recursive
- elif test -f $ac_srcdir/configure; then
- echo
- $SHELL $ac_srcdir/configure --help=recursive
- elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
- else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
- cd "$ac_popdir"
- done
-fi
-
-test -n "$ac_init_help" && exit 0
-if $ac_init_version; then
- cat <<\_ACEOF
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit 0
-fi
-exec 5>config.log
-cat >&5 <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- echo "PATH: $as_dir"
-done
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_sep=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-{
- (set) 2>&1 |
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- ;;
- *)
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-}
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- sed "/^$/d" confdefs.h | sort
- echo
- fi
- test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
- ' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
- esac
- fi
-else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val="\$ac_cv_env_${ac_var}_value"
- eval ac_new_val="\$ac_env_${ac_var}_value"
- case $ac_old_set,$ac_new_set in
- set,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-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 "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
- fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$ac_ct_CC" && break
-done
-
- CC=$ac_ct_CC
-fi
-
-fi
-
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
- (eval $ac_link_default) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Find the output, starting from the most likely. This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
- conftest.$ac_ext )
- # This is the source file.
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool,
- # but it would be cool to find out if it's true. Does anybody
- # maintain Libtool? --akim.
- export ac_cv_exeext
- break;;
- * )
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
-
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
-fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
- break;;
- * ) break;;
- esac
-done
-else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
-if test "${ac_cv_objext+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_prog_cc_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std1 is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std1. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-
-fi
-
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
- *)
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
-
-# Some people use a C++ compiler to compile C. Since we use `exit',
-# in C++ we need to declare it. In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
- choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- break
-fi
-
- done
- ac_cv_prog_CPP=$CPP
-
-fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
-fi
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- :
-else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
- echo "$as_me:$LINENO: result: $AR" >&5
-echo "${ECHO_T}$AR" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_AR"; then
- ac_ct_AR=$AR
- # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_AR"; then
- ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_AR="ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
- echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-echo "${ECHO_T}$ac_ct_AR" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- AR=$ac_ct_AR
-else
- AR="$ac_cv_prog_AR"
-fi
-
-
- ac_config_files="$ac_config_files Makefile"
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-{
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-} |
- sed '
- t clear
- : clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
- cat confcache >$cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[ ]*$//;
-}'
-fi
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then we branch to the quote section. Otherwise,
-# look for a macro that doesn't take arguments.
-cat >confdef2opt.sed <<\_ACEOF
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
-t quote
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
-t quote
-d
-: quote
-s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
-s,\[,\\&,g
-s,\],\\&,g
-s,\$,$$,g
-p
-_ACEOF
-# We use echo to avoid assuming a particular line-breaking character.
-# The extra dot is to prevent the shell from consuming trailing
-# line-breaks from the sub-command output. A line-break within
-# single-quotes doesn't work because, if this script is created in a
-# platform that uses two characters for line-breaks (e.g., DOS), tr
-# would break.
-ac_LF_and_DOT=`echo; echo .`
-DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f confdef2opt.sed
-
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling. Logging --version etc. is OK.
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
-_ACEOF
-
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_headers"; then
- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_links"; then
- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
-
-Configuration files:
-$config_files
-
-Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.59,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=*)
- ac_option=`expr "x$1" : 'x\([^=]*\)='`
- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- -*)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- *) # This is not an option, so the user has probably given explicit
- # arguments.
- ac_option=$1
- ac_need_defaults=false;;
- esac
-
- case $ac_option in
- # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --vers* | -V )
- echo "$ac_cs_version"; exit 0 ;;
- --he | --h)
- # Conflict between --help and --header
- { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
- ac_need_defaults=false;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1" ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-if \$ac_cs_recheck; then
- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-
-
-
-
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_config_target in $ac_config_targets
-do
- case "$ac_config_target" in
- # Handling of arguments.
- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./confstat$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
-{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-
-#
-# CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@CC@,$CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@CPP@,$CPP,;t t
-s,@AR@,$AR,;t t
-s,@ac_ct_AR@,$ac_ct_AR,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
-
-_ACEOF
-
- cat >>$CONFIG_STATUS <<\_ACEOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_lines=48
- ac_sed_frag=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_lines # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- else
- # The purpose of the label and of the branching condition is to
- # speed up the sed processing (if there are no `@' at all, there
- # is no need to browse any of the substitutions).
- # These are the two extra sed commands mentioned above.
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_lines`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
-fi # test -n "$CONFIG_FILES"
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
-
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- if test x"$ac_file" = x-; then
- configure_input=
- else
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
-
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;t t
-s,@srcdir@,$ac_srcdir,;t t
-s,@abs_srcdir@,$ac_abs_srcdir,;t t
-s,@top_srcdir@,$ac_top_srcdir,;t t
-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s,@builddir@,$ac_builddir,;t t
-s,@abs_builddir@,$ac_abs_builddir,;t t
-s,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- rm -f $tmp/stdin
- if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
- else
- cat $tmp/out
- rm -f $tmp/out
- fi
-
-done
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || { (exit 1); exit 1; }
-fi
-
diff --git a/winsup/testsuite/configure.in b/winsup/testsuite/configure.in
deleted file mode 100755
index 37190f9..0000000
--- a/winsup/testsuite/configure.in
+++ /dev/null
@@ -1,19 +0,0 @@
-dnl Autoconf configure script for Cygwin's testsuite.
-dnl Copyright 2000 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.59)
-AC_INIT(Makefile.in)
-
-AC_PROG_CC
-AC_PROG_CPP
-AC_CHECK_TOOL(AR,ar)
-
-AC_OUTPUT(Makefile)
diff --git a/winsup/testsuite/cygrun.c b/winsup/testsuite/cygrun.c
deleted file mode 100644
index 60330ca..0000000
--- a/winsup/testsuite/cygrun.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/* cygrun.c: testsuite support program
-
- Copyright 1999, 2000, 2001, 2002 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* This program is intended to be used only by the testsuite. It runs
- programs without using the cygwin api, so that the just-built dll
- can be tested without interference from the currently installed
- dll. */
-
-#include <stdio.h>
-#include <windows.h>
-#include <stdlib.h>
-
-int
-main (int argc, char **argv)
-{
- STARTUPINFO sa;
- PROCESS_INFORMATION pi;
- DWORD ec = 1;
- char *p;
-
- if (argc < 2)
- {
- fprintf (stderr, "Usage: cygrun [program]\n");
- exit (0);
- }
-
- SetEnvironmentVariable ("CYGWIN_TESTING", "1");
- if ((p = getenv ("CYGWIN")) == NULL || (strstr (p, "ntsec") == NULL))
- {
- char buf[4096];
- if (!p)
- {
- p = buf;
- p[0] = '\0';
- }
- else
- {
- strcpy (buf, p);
- strcat (buf, " ");
- }
- strcat(buf, "ntsec");
- SetEnvironmentVariable ("CYGWIN", buf);
- }
-
- memset (&sa, 0, sizeof (sa));
- memset (&pi, 0, sizeof (pi));
- if (!CreateProcess (0, argv[1], 0, 0, 1, 0, 0, 0, &sa, &pi))
- {
- fprintf (stderr, "CreateProcess %s failed\n", argv[1]);
- exit (1);
- }
-
- WaitForSingleObject (pi.hProcess, INFINITE);
-
- GetExitCodeProcess (pi.hProcess, &ec);
-
- CloseHandle (pi.hProcess);
- CloseHandle (pi.hThread);
- if (ec > 0xff)
- ec >>= 8;
- return ec;
-}
diff --git a/winsup/testsuite/libltp/include/dataascii.h b/winsup/testsuite/libltp/include/dataascii.h
deleted file mode 100644
index cd75245..0000000
--- a/winsup/testsuite/libltp/include/dataascii.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-#ifndef _DATAASCII_H_
-#define _DATAASCII_H_
-
-/***********************************************************************
- * int dataasciigen(listofchars, buffer, size, offset)
- *
- * This function fills buffer with ascii characters.
- * The ascii characters are obtained from listofchars or the CHARS array
- * if listofchars is NULL.
- * Each char is selected by an index. The index is the remainder
- * of count divided by the array size.
- * This method allows more than one process to write to a location
- * in a file without corrupting it for another process' point of view.
- *
- * The return value will be the number of character written in buffer
- * (size).
- *
- ***********************************************************************/
-int dataasciigen(char *, char *, int, int);
-
-/***********************************************************************
- * int dataasciichk(listofchars, buffer, size, count, errmsg)
- *
- * This function checks the contents of a buffer produced by
- * dataasciigen.
- *
- * return values:
- * >= 0 : error at character count
- * < 0 : no error
- ***********************************************************************/
-
-int dataasciichk(char *, char *, int, int, char**);
-
-#endif
diff --git a/winsup/testsuite/libltp/include/databin.h b/winsup/testsuite/libltp/include/databin.h
deleted file mode 100644
index b71fbc0..0000000
--- a/winsup/testsuite/libltp/include/databin.h
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef _DATABIN_H_
-#define _DATABIN_H_
-
-/*******************************************************************************
-* NAME
-* databingen - fill a buffer with a data pattern
-*
-* SYNOPSIS
-* (void) databingen(mode, buffer, bsize, offset)
-* int mode;
-* char *buffer;
-* int bsize;
-* int offset;
-*
-* DESCRIPTION
-* datagen fills the buffer pointed to by 'buffer' with 'bsize' bytes
-* of data of the form indicated by 'mode'.
-* All modes (expect r -random) are file offset based.
-* This allows more than process to do writing to the file without
-* corrupting it if the same modes were used.
-* They data modes to choose from, these are:
-*
-* 'a' - writes an alternating bit pattern (i.e. 0x5555555...)
-*
-* 'c' - writes a checkerboard pattern (i.e. 0xff00ff00ff00...)
-*
-* 'C' - writes counting pattern (i.e. 0 - 07, 0 - 07, ...);
-*
-* 'o' - writes all bits set (i.e. 0xffffffffffffff...)
-*
-* 'z' - writes all bits cleared (i.e. 0x000000000...);
-*
-* 'r' - writes random integers
-*
-* RETURN VALUE
-* None
-*
-*******************************************************************************/
-
-void databingen( int mode, unsigned char *buffer, int bsize, int offset );
-
-void databinchedk( int mode, unsigned char *buffer, int bsize, int offset, char **errmsg);
-
-#endif
diff --git a/winsup/testsuite/libltp/include/file_lock.h b/winsup/testsuite/libltp/include/file_lock.h
deleted file mode 100644
index 8c9a948..0000000
--- a/winsup/testsuite/libltp/include/file_lock.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-#ifndef _FILE_LOCK_H_
-#define _FILE_LOCK_H_
-
-extern char Fl_syscall_str[128];
-
-int file_lock( int , int, char ** );
-int record_lock( int , int , int , int , char ** );
-
-#endif /* _FILE_LOCK_H_ */
diff --git a/winsup/testsuite/libltp/include/forker.h b/winsup/testsuite/libltp/include/forker.h
deleted file mode 100644
index effd5d6..0000000
--- a/winsup/testsuite/libltp/include/forker.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-#ifndef _FORKER_H_
-#define _FORKER_H_
-
-#define FORKER_MAX_PIDS 4098
-
-extern int Forker_pids[FORKER_MAX_PIDS]; /* holds pids of forked processes */
-extern int Forker_npids; /* number of entries in Forker_pids */
-
-/*
- * This function will fork and the parent will exit zero and
- * the child will return. This will orphan the returning process
- * putting it in the background.
- */
-int background( char * );
-
-/*
- * Forker will fork ncopies-1 copies of self.
- *
- * arg 1: Number of copies of the process to be running after return.
- * This value minus one is the number of forks performed.
- * arg 2: mode: 0 - all children are first generation descendents.
- * 1 - each subsequent child is a descendent of another
- * descendent, resulting in only one direct descendent of the
- * parent and each other child is a child of another child in
- * relation to the parent.
- * arg 3: prefix: string to preceed any error messages. A value of NULL
- * results in no error messages on failure.
- * returns: returns to parent the number of children forked.
- */
-int forker( int , int , char * );
-
-#endif /* _FORKER_H_ */
diff --git a/winsup/testsuite/libltp/include/open_flags.h b/winsup/testsuite/libltp/include/open_flags.h
deleted file mode 100644
index 87fe6ff..0000000
--- a/winsup/testsuite/libltp/include/open_flags.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-#ifndef _OPEN_FLAGS_H_
-#define _OPEN_FLAGS_H_
-
-/***********************************************************************
- * This function attempts to convert open flag bits into human readable
- * symbols (i.e. O_TRUNC). If there are more than one symbol,
- * the <sep> string will be placed as a separator between symbols.
- * Commonly used separators would be a comma "," or pipe "|".
- * If <mode> is one and not all <openflags> bits can be converted to
- * symbols, the "UNKNOWN" symbol will be added to return string.
- *
- * Return Value
- * openflags2symbols will return the indentified symbols.
- * If no symbols are recognized the return value will be a empty
- * string or the "UNKNOWN" symbol.
- *
- * Limitations
- * Currently (05/96) all known symbols are coded into openflags2symbols.
- * If new open flags are added this code will have to updated
- * to know about them or they will not be recognized.
- *
- * The Open_symbols must be large enough to hold all possible symbols
- * for a given system.
- *
- ***********************************************************************/
-char *openflags2symbols( int, char *, int );
-
-/***********************************************************************
- * This function will take a string of comma separated open flags symbols
- * and translate them into an open flag bitmask.
- * If any symbol is not valid, -1 is returned. On this error condition
- * the badname pointer is updated if not NULL. badname will point
- * to the beginning location of where the invalid symbol was found.
- * string will be returned unchanged.
- *
- * A signal received while parsing string could cause the string to
- * contain a NULL character in the middle of it.
- *
- ***********************************************************************/
-int parse_open_flags( char *, char ** );
-
-#endif
diff --git a/winsup/testsuite/libltp/include/pattern.h b/winsup/testsuite/libltp/include/pattern.h
deleted file mode 100644
index 74f841c..0000000
--- a/winsup/testsuite/libltp/include/pattern.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-#ifndef _PATTERN_H_
-#define _PATTERN_H_
-
-/*
- * pattern_check(buf, buflen, pat, patlen, patshift)
- *
- * Check a buffer of length buflen against repeated occurrances of
- * a pattern whose length is patlen. Patshift can be used to rotate
- * the pattern by patshift bytes to the left.
- *
- * Patshift may be greater than patlen, the pattern will be rotated by
- * (patshift % patshift) bytes.
- *
- * pattern_check returns -1 if the buffer does not contain repeated
- * occurrances of the indicated pattern (shifted by patshift).
- *
- * The algorithm used to check the buffer relies on the fact that buf is
- * supposed to be repeated copies of pattern. The basic algorithm is
- * to validate the first patlen bytes of buf against the pat argument
- * passed in - then validate the next patlen bytes against the 1st patlen
- * bytes - the next (2*patlen) bytes against the 1st (2*pathen) bytes, and
- * so on. This algorithm only works when the assumption of a buffer full
- * of repeated copies of a pattern holds, and gives MUCH better results
- * then walking the buffer byte by byte.
- *
- * Performance wise, It appears to be about 5% slower than doing a straight
- * memcmp of 2 buffers, but the big win is that it does not require a
- * 2nd comparison buffer, only the pattern.
- */
-int pattern_check( char * , int , char * , int , int );
-
-/*
- * pattern_fill(buf, buflen, pat, patlen, patshift)
- *
- * Fill a buffer of length buflen with repeated occurrances of
- * a pattern whose length is patlen. Patshift can be used to rotate
- * the pattern by patshift bytes to the left.
- *
- * Patshift may be greater than patlen, the pattern will be rotated by
- * (patshift % patlen) bytes.
- *
- * If buflen is not a multiple of patlen, a partial pattern will be written
- * in the last part of the buffer. This implies that a buffer which is
- * shorter than the pattern length will receive only a partial pattern ...
- *
- * pattern_fill always returns 0 - no validation of arguments is done.
- *
- * The algorithm used to fill the buffer relies on the fact that buf is
- * supposed to be repeated copies of pattern. The basic algorithm is
- * to fill the first patlen bytes of buf with the pat argument
- * passed in - then copy the next patlen bytes with the 1st patlen
- * bytes - the next (2*patlen) bytes with the 1st (2*pathen) bytes, and
- * so on. This algorithm only works when the assumption of a buffer full
- * of repeated copies of a pattern holds, and gives MUCH better results
- * then filling the buffer 1 byte at a time.
- */
-int pattern_fill( char * , int , char * , int , int );
-
-#endif
diff --git a/winsup/testsuite/libltp/include/random_range.h b/winsup/testsuite/libltp/include/random_range.h
deleted file mode 100644
index d3e1cce..0000000
--- a/winsup/testsuite/libltp/include/random_range.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-#ifndef _RANDOM_RANGE_H_
-#define _RANDOM_RANGE_H_
-
-int parse_ranges ( char *, int, int, int, int (*)(), char **, char ** );
-int range_min ( char *, int );
-int range_max ( char *, int );
-int range_mult ( char *, int );
-long random_range ( int, int, int, char ** );
-long random_rangel ( long, long, long, char ** );
-long long random_rangell ( long long, long long, long long, char ** );
-void random_range_seed( long );
-long random_bit ( long );
-
-#endif
diff --git a/winsup/testsuite/libltp/include/rmobj.h b/winsup/testsuite/libltp/include/rmobj.h
deleted file mode 100644
index 4808ca2..0000000
--- a/winsup/testsuite/libltp/include/rmobj.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _RMOBJ_H_
-#define _RMOBJ_H_
-
-/*
- * rmobj() - Remove the specified object. If the specified object is a
- * directory, recursively remove everything inside of it. If
- * there are any problems, set errmsg (if it is not NULL) and
- * return -1. Otherwise return 0.
- */
-int rmobj( char *object , char **errmesg );
-
-#endif
diff --git a/winsup/testsuite/libltp/include/search_path.h b/winsup/testsuite/libltp/include/search_path.h
deleted file mode 100644
index 58b7a36..0000000
--- a/winsup/testsuite/libltp/include/search_path.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-
-/* $Id$ */
-
-
-int search_path(const char *cmd, const char *res_path, int access_mode, int fullpath);
diff --git a/winsup/testsuite/libltp/include/str_to_bytes.h b/winsup/testsuite/libltp/include/str_to_bytes.h
deleted file mode 100644
index 100d37d..0000000
--- a/winsup/testsuite/libltp/include/str_to_bytes.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-#ifndef _STR_TO_BYTES_
-#define _STR_TO_BYTES_
-
-int str_to_bytes ( char * );
-long str_to_lbytes ( char * );
-long long str_to_llbytes( char * );
-
-#endif
diff --git a/winsup/testsuite/libltp/include/string_to_tokens.h b/winsup/testsuite/libltp/include/string_to_tokens.h
deleted file mode 100644
index 9c0935e..0000000
--- a/winsup/testsuite/libltp/include/string_to_tokens.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-#ifndef _STRING_TO_TOKENS_H_
-#define _STRING_TO_TOKENS_H_
-
-/*
- * string_to_tokens()
- *
- * This function parses the string 'arg_string', placing pointers to
- * the 'separator' separated tokens into the elements of 'arg_array'.
- * The array is terminated with a null pointer.
- *
- * NOTE: This function uses strtok() to parse 'arg_string', and thus
- * physically alters 'arg_string' by placing null characters where the
- * separators originally were.
- */
-int string_to_tokens(char *, char **, int, char *);
-
-#endif
diff --git a/winsup/testsuite/libltp/include/test.h b/winsup/testsuite/libltp/include/test.h
deleted file mode 100644
index 8cffea4..0000000
--- a/winsup/testsuite/libltp/include/test.h
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *.
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-
-/* $Id$ */
-
-#ifndef __TEST_H__
-#define __TEST_H__
-
-#define execve execve_foo
-#define execv execv_foo
-#define execvp execvp_foo
-#include <stdio.h>
-#include <signal.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#undef execvp
-#undef execv
-#undef execve
-
-int execve(const char *, const char * const [], char * const *);
-int execv(const char *, const char * const []);
-int execvp(const char *, const char * const []);
-
-/* CGF: Avoid compilation warnings for undefined functions */
-extern int setregid (gid_t, gid_t);
-int setreuid (uid_t, uid_t);
-
-#define TPASS 0 /* Test passed flag */
-#define TFAIL 1 /* Test failed flag */
-#define TBROK 2 /* Test broken flag */
-#define TWARN 4 /* Test warning flag */
-#define TRETR 8 /* Test retire flag */
-#define TINFO 16 /* Test information flag */
-#define TCONF 32 /* Test not appropriate for configuration flag */
-
-/*
- * To determine if you are on a Umk or Unicos system,
- * use sysconf(_SC_CRAY_SYSTEM). But since _SC_CRAY_SYSTEM
- * is not defined until 90, it will be define here if not already
- * defined.
- * if ( sysconf(_SC_CRAY_SYSTEM) == 1 )
- * on UMK
- * else # returned 0 or -1
- * on Unicos
- * This is only being done on CRAY systems.
- */
-#ifdef CRAY
-#ifndef _SC_CRAY_SYSTEM
-#define _SC_CRAY_SYSTEM 140
-#endif /* ! _SC_CRAY_SYSTEM */
-#endif /* CRAY */
-
-/*
- * Ensure that NUMSIGS is defined.
- * It should be defined in signal.h or sys/signal.h on
- * UNICOS/mk and IRIX systems. On UNICOS systems,
- * it is not defined, thus it is being set to UNICOS's NSIG.
- * Note: IRIX's NSIG (signals are 1-(NSIG-1))
- * is not same meaning as UNICOS/UMK's NSIG (signals 1-NSIG)
- */
-#ifndef NUMSIGS
-#define NUMSIGS NSIG
-#endif
-
-
-/* defines for unexpected signal setup routine (set_usig.c) */
-#define FORK 1 /* SIGCLD is to be ignored */
-#define NOFORK 0 /* SIGCLD is to be caught */
-#define DEF_HANDLER 0 /* tells set_usig() to use default signal handler */
-
-/*
- * The following defines are used to control tst_res and t_result reporting.
- */
-
-#define TOUTPUT "TOUTPUT" /* The name of the environment variable */
- /* that can be set to one of the following */
- /* strings to control tst_res output */
- /* If not set, TOUT_VERBOSE_S is assumed */
-
-#define TOUT_VERBOSE_S "VERBOSE" /* All test cases reported */
-#define TOUT_CONDENSE_S "CONDENSE" /* ranges are used where identical messages*/
- /* occur for sequential test cases */
-#define TOUT_NOPASS_S "NOPASS" /* No pass test cases are reported */
-#define TOUT_DISCARD_S "DISCARD" /* No output is reported */
-
-#define TST_NOBUF "TST_NOBUF" /* The name of the environment variable */
- /* that can be set to control whether or not */
- /* tst_res will buffer output into 4096 byte */
- /* blocks of output */
- /* If not set, buffer is done. If set, no */
- /* internal buffering will be done in tst_res */
- /* t_result does not have internal buffering */
-
-/*
- * The following defines are used to control tst_tmpdir, tst_wildcard and t_mkchdir
- */
-
-#define TDIRECTORY "TDIRECTORY" /* The name of the environment variable */
- /* that if is set, the value (directory) */
- /* is used by all tests as their working */
- /* directory. tst_rmdir and t_rmdir will */
- /* not attempt to clean up. */
- /* This environment variable should only */
- /* be set when doing system testing since */
- /* tests will collide and break and fail */
- /* because of setting it. */
-
-#define TEMPDIR "/tmp" /* This is the default temporary directory. */
- /* The environment variable TMPDIR is */
- /* used prior to this valid by tempnam(3). */
- /* To control the base location of the */
- /* temporary directory, set the TMPDIR */
- /* environment variable to desired path */
-
-/*
- * The following contains support for error message passing.
- * See test_error.c for details.
- */
-#define TST_ERR_MESG_SIZE 1023 /* max size of error message */
-#define TST_ERR_FILE_SIZE 511 /* max size of module name used by compiler */
-#define TST_ERR_FUNC_SIZE 127 /* max size of func name */
-
-typedef struct {
- int te_line; /* line where last error was reported. Use */
- /* "__LINE__" and let compiler do the rest */
- int te_level; /* If set, will prevent current stored */
- /* error to not be overwritten */
- char te_func[TST_ERR_FUNC_SIZE+1]; /* name of function of last error */
- /* Name of function or NULL */
- char te_file[TST_ERR_FILE_SIZE+1]; /* module of last error. Use */
- /* "__FILE__" and let compiler do the rest */
- char te_mesg[TST_ERR_MESG_SIZE+1]; /* string of last error */
-
-} _TST_ERROR;
-
-extern _TST_ERROR Tst_error; /* defined in test_error.c */
-#if __STDC__
-extern void tst_set_error(char *file, int line, char *func, char *fmt, ...);
-#else
-extern void tst_set_error();
-#endif
-extern void tst_clear_error();
-
-
-/*
- * The following define contains the name of an environmental variable
- * that can be used to specify the number of iterations.
- * It is supported in parse_opts.c and USC_setup.c.
- */
-#define USC_ITERATION_ENV "USC_ITERATIONS"
-
-/*
- * The following define contains the name of an environmental variable
- * that can be used to specify to iteration until desired time
- * in floating point seconds has gone by.
- * Supported in USC_setup.c.
- */
-#define USC_LOOP_WALLTIME "USC_LOOP_WALLTIME"
-
-/*
- * The following define contains the name of an environmental variable
- * that can be used to specify that no functional checks are wanted.
- * It is supported in parse_opts.c and USC_setup.c.
- */
-#define USC_NO_FUNC_CHECK "USC_NO_FUNC_CHECK"
-
-/*
- * The following define contains the name of an environmental variable
- * that can be used to specify the delay between each loop iteration.
- * The value is in seconds (fractional numbers are allowed).
- * It is supported in parse_opts.c.
- */
-#define USC_LOOP_DELAY "USC_LOOP_DELAY"
-
-/*
- * The following prototypes are needed to remove compile errors
- * on IRIX systems when compiled with -n32 and -64.
- */
-extern void tst_res(int ttype, const char *fname, const char *arg_fmt, ...);
-extern void tst_resm(int ttype, const char *arg_fmt, ...);
-extern void tst_brk(int ttype, char *fname, void (*func)(),
- const char *arg_fmt, ...);
-extern void tst_brkloop(int ttype, char *fname, void (*func)(),
- const char *arg_fmt, ...);
-extern void tst_brkm(int ttype, void (*func)(), const char *arg_fmt, ...);
-extern void tst_brkloopm(int ttype, void (*func)(), const char *arg_fmt, ...);
-
-extern int tst_environ();
-extern void tst_exit() __attribute__ ((noreturn));
-extern void tst_flush();
-
-/* prototypes for the t_res.c functions */
-extern void t_result(char *tcid, int tnum, int ttype, char *tmesg);
-extern void tt_exit();
-extern int t_environ();
-extern void t_breakum(char *tcid, int total, int typ, char *msg, void (*fnc)());
-
-extern void tst_sig(int fork_flag, void (*handler)(), void (*cleanup)());
-extern void tst_tmpdir();
-extern void tst_rmdir();
-
-#endif /* end of __TEST_H__ */
diff --git a/winsup/testsuite/libltp/include/tlibio.h b/winsup/testsuite/libltp/include/tlibio.h
deleted file mode 100644
index ac0d570..0000000
--- a/winsup/testsuite/libltp/include/tlibio.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-
-#define LIO_IO_SYNC 00001 /* read/write */
-#define LIO_IO_ASYNC 00002 /* reada/writea/aio_write/aio_read */
-#define LIO_IO_SLISTIO 00004 /* single stride sync listio */
-#define LIO_IO_ALISTIO 00010 /* single stride async listio */
-#define LIO_IO_SYNCV 00020 /* single-buffer readv/writev */
-#define LIO_IO_SYNCP 00040 /* pread/pwrite */
-
-#ifdef sgi
-#define LIO_IO_ATYPES 00077 /* all io types */
-#define LIO_IO_TYPES 00061 /* all io types, non-async */
-#endif /* sgi */
-#ifdef linux
-#define LIO_IO_TYPES 00021 /* all io types */
-#endif /* linux */
-#ifdef CRAY
-#define LIO_IO_TYPES 00017 /* all io types */
-#endif /* CRAY */
-
-#define LIO_WAIT_NONE 00010000 /* return asap -- use with care */
-#define LIO_WAIT_ACTIVE 00020000 /* spin looking at iosw fields, or EINPROGRESS */
-#define LIO_WAIT_RECALL 00040000 /* call recall(2)/aio_suspend(3) */
-#define LIO_WAIT_SIGPAUSE 00100000 /* call pause */
-#define LIO_WAIT_SIGACTIVE 00200000 /* spin waiting for signal */
-#ifdef sgi
-#define LIO_WAIT_CBSUSPEND 00400000 /* aio_suspend waiting for callback */
-#define LIO_WAIT_SIGSUSPEND 01000000 /* aio_suspend waiting for signal */
-#define LIO_WAIT_ATYPES 01760000 /* all async wait types, except nowait */
-#define LIO_WAIT_TYPES 00020000 /* all sync wait types (sorta) */
-#endif /* sgi */
-#ifdef linux
-#define LIO_WAIT_TYPES 00300000 /* all wait types, except nowait */
-#endif /* linux */
-#ifdef CRAY
-#define LIO_WAIT_TYPES 00360000 /* all wait types, except nowait */
-#endif /* CRAY */
-
-/* meta wait io */
-/* 00 000 0000 */
-
-#ifdef sgi
-/* all callback wait types */
-#define LIO_WAIT_CBTYPES (LIO_WAIT_CBSUSPEND)
-/* all signal wait types */
-#define LIO_WAIT_SIGTYPES (LIO_WAIT_SIGPAUSE|LIO_WAIT_SIGACTIVE|LIO_WAIT_SIGSUSPEND)
-/* all aio_{read,write} or lio_listio */
-#define LIO_IO_ASYNC_TYPES (LIO_IO_ASYNC|LIO_IO_SLISTIO|LIO_IO_ALISTIO)
-#endif /* sgi */
-#ifdef linux
-/* all signal wait types */
-#define LIO_WAIT_SIGTYPES (LIO_WAIT_SIGPAUSE)
-#endif /* linux */
-#ifdef CRAY
-/* all signal wait types */
-#define LIO_WAIT_SIGTYPES (LIO_WAIT_SIGPAUSE|LIO_WAIT_SIGACTIVE)
-#endif /* CRAY */
-
-/*
- * This bit provides a way to randomly pick an io type and wait method.
- * lio_read_buffer() and lio_write_buffer() functions will call
- * lio_random_methods() with the given method.
- */
-#define LIO_RANDOM 010000000
-
-/*
- * This bit provides a way for the programmer to use async i/o with
- * signals and to use their own signal handler. By default,
- * the signal will only be given to the system call if the wait
- * method is LIO_WAIT_SIGPAUSE or LIO_WAIT_SIGACTIVE.
- * Whenever these wait methods are used, libio signal handler
- * will be used.
- */
-#define LIO_USE_SIGNAL 020000000
-
-/*
- * prototypes/structures for functions in the libio.c module. See comments
- * in that module, or man page entries for information on the individual
- * functions.
- */
-
-int stride_bounds(int offset, int stride, int nstrides,
- int bytes_per_stride, int *min_byte, int *max_byte);
-
-int lio_set_debug(int level);
-int lio_parse_io_arg1(char *string);
-void lio_help1(char *prefex);
-int lio_parse_io_arg2(char *string, char **badtoken);
-void lio_help2(char *prefex);
-int lio_write_buffer(int fd, int method, char *buffer, int size,
- int sig, char **errmsg, long wrd);
-
-int lio_read_buffer(int fd, int method, char *buffer, int size,
- int sig, char **errmsg, long wrd);
-int lio_random_methods(long mask);
-
-#if CRAY
-#include <sys/iosw.h>
-int lio_wait4asyncio(int method, int fd, struct iosw **statptr);
-int lio_check_asyncio(char *io_type, int size, struct iosw *status);
-#endif /* CRAY */
-#ifdef sgi
-#include <aio.h>
-int lio_wait4asyncio(int method, int fd, aiocb_t *aiocbp);
-int lio_check_asyncio(char *io_type, int size, aiocb_t *aiocbp, int method);
-#endif /* sgi */
-
-/*
- * Define the structure that contains the infomation that is used
- * by the parsing and help functions.
- */
-struct lio_info_type {
- char *token;
- int bits;
- char *desc;
-};
-
-
diff --git a/winsup/testsuite/libltp/include/usctest.h b/winsup/testsuite/libltp/include/usctest.h
deleted file mode 100644
index 6a095db..0000000
--- a/winsup/testsuite/libltp/include/usctest.h
+++ /dev/null
@@ -1,319 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-
-/* $Id$ */
-
-/**********************************************************
- *
- * IRIX/Linux Feature Test and Evaluation - Silicon Graphics, Inc.
- *
- * FUNCTION NAME : usctest.h
- *
- * FUNCTION TITLE : System Call Test Macros
- *
- * SYNOPSIS:
- * See DESCRIPTION below.
- *
- * AUTHOR : William Roske
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * DESCRIPTION
- * TEST(SCALL) - calls a system call
- * TEST_VOID(SCALL) - same as TEST() but for syscalls with no return value.
- * TEST_CLEANUP - print the log of errno return counts if STD_ERRNO_LOG
- * is set.
- * TEST_PAUSEF(HAND) - Pause for SIGUSR1 if the pause flag is set.
- * Use "hand" as the interrupt handling function
- * TEST_PAUSE - Pause for SIGUSR1 if the pause flag is set.
- * Use internal function to do nothing on signal and go on.
- * TEST_LOOPING(COUNTER) - Conditional to check if test should
- * loop. Evaluates to TRUE (1) or FALSE (0).
- * TEST_ERROR_LOG(eno) - log that this errno was received,
- * if STD_ERRNO_LOG is set.
- * TEST_EXP_ENOS(array) - set the bits in TEST_VALID_ENO array at
- * positions specified in integer "array"
- *
- * RETURN VALUE
- * TEST(SCALL) - Global Variables set:
- * int TEST_RETURN=return code from SCALL
- * int TEST_ERRNO=value of errno at return from SCALL
- * TEST_VOID(SCALL) - Global Variables set:
- * int TEST_ERRNO=value of errno at return from SCALL
- * TEST_CLEANUP - None.
- * TEST_PAUSEF(HAND) - None.
- * TEST_PAUSE - None.
- * TEST_LOOPING(COUNTER) - True if COUNTER < STD_LOOP_COUNT or
- * STD_INFINITE is set.
- * TEST_ERROR_LOG(eno) - None
- * TEST_EXP_ENOS(array) - None
- *
- * KNOWN BUGS
- * If you use the TEST_PAUSE or TEST_LOOPING macros, you must
- * link in parse_opts.o, which contains the code for those functions.
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#ifndef __USCTEST_H__
-#define __USCTEST_H__ 1
-
-#ifndef _SC_CLK_TCK
-#include <unistd.h>
-#endif
-
-#include <sys/param.h>
-
-/*
- * Ensure that PATH_MAX is defined
- */
-#ifndef PATH_MAX
-#ifdef MAXPATHLEN
-#define PATH_MAX MAXPATHLEN
-#else
-#define PATH_MAX 1024
-#endif
-#endif
-
-#ifndef CRAY
-#ifndef BSIZE
-#define BSIZE BBSIZE
-#endif
-#endif
-
-/***********************************************************************
- * Define option_t structure type.
- * Entries in this struct are used by the parse_opts routine
- * to indicate valid options and return option arguments
- ***********************************************************************/
-typedef struct {
- const char *option; /* Valid option string (one option only) like "a:" */
- int *flag; /* pointer to location to set true if option given */
- char **arg; /* pointer to location to place argument, if needed */
-} option_t;
-
-/***********************************************************************
- * The following globals are defined in parse_opts.c but must be
- * externed here because they are used in the macros defined below.
- ***********************************************************************/
-extern int STD_FUNCTIONAL_TEST, /* turned off by -f to not do functional test */
- STD_TIMING_ON, /* turned on by -t to print timing stats */
- STD_PAUSE, /* turned on by -p to pause before loop */
- STD_INFINITE, /* turned on by -c0 to loop forever */
- STD_LOOP_COUNT, /* changed by -cn to set loop count to n */
- STD_ERRNO_LOG, /* turned on by -e to log errnos returned */
- STD_ERRNO_LIST[], /* counts of errnos returned. indexed by errno */
- STD_COPIES,
- STD_argind;
-
-extern float STD_LOOP_DURATION, /* wall clock time to iterate */
- STD_LOOP_DELAY; /* delay time after each iteration */
-
-#define USC_MAX_ERRNO 2000
-
-/**********************************************************************
- * Prototype for parse_opts routine
- **********************************************************************/
-extern const char *parse_opts(int ac, char **av, option_t *user_optarr, void (*uhf)());
-
-
-/*
- * define a structure
- */
-struct usc_errno_t {
- int flag;
-};
-
-/***********************************************************************
- ****
- ****
- ****
- **********************************************************************/
-#ifdef _USC_LIB_
-
-extern int TEST_RETURN;
-extern int TEST_ERRNO;
-
-#else
-/***********************************************************************
- * Global array of bit masks to indicate errnos that are expected.
- * Bits set by TEST_EXP_ENOS() macro and used by TEST_CLEANUP() macro.
- ***********************************************************************/
-extern struct usc_errno_t TEST_VALID_ENO[USC_MAX_ERRNO];
-
-/***********************************************************************
- * Globals for returning the return code and errno from the system call
- * test macros.
- ***********************************************************************/
-extern int TEST_RETURN;
-extern int TEST_ERRNO;
-
-/***********************************************************************
- * temporary variables for determining max and min times in TEST macro
- ***********************************************************************/
-extern long btime, etime, tmptime;
-
-#endif /* _USC_LIB_ */
-
-/***********************************************************************
- * structure for timing accumulator and counters
- ***********************************************************************/
-struct tblock {
- long tb_max;
- long tb_min;
- long tb_total;
- long tb_count;
-};
-
-/***********************************************************************
- * The following globals are externed here so that they are accessable
- * in the macros that follow.
- ***********************************************************************/
-extern struct tblock tblock;
-extern void STD_go();
-extern int (*_TMP_FUNC)(void);
-extern void STD_opts_help();
-
-
-/***********************************************************************
- * TEST: calls a system call
- *
- * parameters:
- * SCALL = system call and parameters to execute
- *
- ***********************************************************************/
-#define TEST(SCALL) TEST_RETURN = (unsigned) SCALL; TEST_ERRNO=errno;
-
-/***********************************************************************
- * TEST_VOID: calls a system call
- *
- * parameters:
- * SCALL = system call and parameters to execute
- *
- * Note: This is IDENTICAL to the TEST() macro except that it is intended
- * for use with syscalls returning no values (void syscall()). The
- * Typecasting nothing (void) into an unsigned integer causes compilation
- * errors.
- *
- ***********************************************************************/
-#define TEST_VOID(SCALL) SCALL; TEST_ERRNO=errno;
-
-/***********************************************************************
- * TEST_CLEANUP: print system call timing stats and errno log entries
- * to stdout if STD_TIMING_ON and STD_ERRNO_LOG are set, respectively.
- * Do NOT print ANY information if no system calls logged.
- *
- * parameters:
- * none
- *
- ***********************************************************************/
-#define TEST_CLEANUP \
-if ( STD_ERRNO_LOG ) { \
- for (tmptime=0; tmptime<USC_MAX_ERRNO; tmptime++) { \
- if ( STD_ERRNO_LIST[tmptime] ) { \
- if ( TEST_VALID_ENO[tmptime].flag ) \
- tst_resm(TINFO, "ERRNO %d:\tReceived %d Times", \
- tmptime, STD_ERRNO_LIST[tmptime]); \
- else \
- tst_resm(TINFO, \
- "ERRNO %d:\tReceived %d Times ** UNEXPECTED **", \
- tmptime, STD_ERRNO_LIST[tmptime]); \
- } \
- } \
-}
-
-/***********************************************************************
- * TEST_PAUSEF: Pause for SIGUSR1 if the pause flag is set.
- * Set the user specified function as the interrupt
- * handler instead of "STD_go"
- *
- * parameters:
- * none
- *
- ***********************************************************************/
-#define TEST_PAUSEF(HANDLER) \
-if ( STD_PAUSE ) { \
- _TMP_FUNC = (int (*)())signal(SIGUSR1, HANDLER); \
- pause(); \
- signal(SIGUSR1, (void (*)())_TMP_FUNC); \
-}
-
-/***********************************************************************
- * TEST_PAUSE: Pause for SIGUSR1 if the pause flag is set.
- * Just continue when signal comes in.
- *
- * parameters:
- * none
- *
- ***********************************************************************/
-#define TEST_PAUSE usc_global_setup_hook();
-int usc_global_setup_hook();
-
-/***********************************************************************
- * TEST_LOOPING now call the usc_test_looping function.
- * The function will return 1 if the test should continue
- * iterating.
- *
- ***********************************************************************/
-#define TEST_LOOPING usc_test_looping
-int usc_test_looping(int counter);
-
-/***********************************************************************
- * TEST_ERROR_LOG(eno): log this errno if STD_ERRNO_LOG flag set
- *
- * parameters:
- * int eno: the errno location in STD_ERRNO_LIST to log.
- *
- ***********************************************************************/
-#define TEST_ERROR_LOG(eno) \
- if ( STD_ERRNO_LOG ) \
- if ( eno < USC_MAX_ERRNO ) \
- STD_ERRNO_LIST[eno]++; \
-
-
-/***********************************************************************
- * TEST_EXP_ENOS(array): set the bits associated with the nput errnos
- * in the TEST_VALID_ENO array.
- *
- * parameters:
- * int array[]: a zero terminated array of errnos expected.
- *
- ***********************************************************************/
-#define TEST_EXP_ENOS(array) \
- tmptime=0; \
- while (array[tmptime] != 0) { \
- if (array[tmptime] < USC_MAX_ERRNO) \
- TEST_VALID_ENO[array[tmptime]].flag=1; \
- tmptime++; \
- }
-
-
-#endif /* end of __USCTEST_H__ */
diff --git a/winsup/testsuite/libltp/include/write_log.h b/winsup/testsuite/libltp/include/write_log.h
deleted file mode 100644
index 784d5b3..0000000
--- a/winsup/testsuite/libltp/include/write_log.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-#ifndef _WRITE_LOG_H_
-#define _WRITE_LOG_H_
-
-/*
- * Constants defining the max size of various wlog_rec fields. ANY SIZE
- * CHANGES HERE MUST BE REFLECTED IN THE WLOG_REC_DISK STRUCTURE DEFINED
- * BELOW.
- */
-
-#define WLOG_MAX_PATH 128
-#define WLOG_MAX_PATTERN 64
-#define WLOG_MAX_HOST 8
-#define WLOG_REC_MAX_SIZE (sizeof(struct wlog_rec)+WLOG_MAX_PATH+WLOG_MAX_PATTERN+WLOG_MAX_HOST+2)
-
-/*
- * User view of a write log record. Note that this is not necessiliary
- * how the data is formatted on disk (signifigant compression occurrs), so
- * don't expect to od the write log file and see things formatted this way.
- */
-
-struct wlog_rec {
- int w_pid; /* pid doing the write */
- int w_offset; /* file offset */
- int w_nbytes; /* # bytes written */
- int w_oflags; /* low-order open() flags */
- int w_done; /* 1 if io confirmed done */
- int w_async; /* 1 if async write (writea) */
-
- char w_host[WLOG_MAX_HOST+1]; /* host doing write - */
- /* null terminated */
- int w_hostlen; /* host name length */
- char w_path[WLOG_MAX_PATH+1]; /* file written to - */
- /* null terminated */
- int w_pathlen; /* file name length */
- char w_pattern[WLOG_MAX_PATTERN+1]; /* pattern written - */
- /* null terminated */
- int w_patternlen; /* pattern length */
-};
-
-#ifndef uint
-#define uint unsigned int
-#endif
-
-/*
- * On-disk structure of a wlog_rec. Actually, the record consists of
- * 3 parts: [wlog_rec_disk structure][variable length data][length]
- * where length is a 2 byte field containing the total record length
- * (including the 2 bytes). It is used for scanning the logfile in reverse
- * order.
- *
- * The variable length data includes the path, host, and pattern (in that
- * order). The lengths of these pieces of data are held in the
- * wlog_rec_disk structure. Thus, the actual on-disk record looks like
- * this (top is lower byte offset):
- *
- * struct wlog_rec_disk
- * path (w_pathlen bytes - not null terminated)
- * host (w_hostlen bytes - not null terminated)
- * pattern (w_patternlen bytes - not null terminated)
- * 2-byte record length
- *
- * Another way of looking at it is:
- *
- * <struct wlog_rec_disk><path (wpathlen bytes)>-->
- * --><host (w_hostlen bytes)><pattern (w_patternlen bytes)><length (2 bytes)>
- *
- * The maximum length of this record is defined by the WLOG_REC_MAX_SIZE
- * record. Note that the 2-byte record length forces this to be
- * <= 64k bytes.
- *
- * Note that there is lots of bit-masking done here. The w_pathlen,
- * w_hostlen, and w_patternlen fields MUST have enough bits to hold
- * WLOG_MAX_PATH, WLOG_MAX_HOST, and WLOG_MAX_PATTERN bytes respectivly.
- */
-
-struct wlog_rec_disk {
-#ifdef CRAY
- uint w_offset : 44; /* file offset */
- uint w_extra0 : 20; /* EXTRA BITS IN WORD 0 */
-#else
- uint w_offset : 32; /* file offset */
- uint w_extra0 : 32; /* EXTRA BITS IN WORD 0 */
-#endif
-
- uint w_nbytes : 32; /* # bytes written */
- uint w_oflags : 32; /* low-order open() flags */
-
- uint w_pid : 17; /* pid doing the write */
- uint w_pathlen : 7; /* length of file path */
- uint w_patternlen: 6; /* length of pattern */
- uint w_hostlen : 4; /* length of host */
- uint w_done : 1; /* 1 if io confirmed done */
- uint w_async : 1; /* 1 if async write (writea) */
- uint w_extra2 : 28; /* EXTRA BITS IN WORD 2 */
-};
-
-/*
- * write log file datatype. wlog_open() initializes this structure
- * which is then passed around to the various wlog_xxx routines.
- */
-
-struct wlog_file {
- int w_afd; /* append fd */
- int w_rfd; /* random-access fd */
- char w_file[1024]; /* name of the write_log */
-};
-
-/*
- * return value defines for the user-supplied function to
- * wlog_scan_backward().
- */
-
-#define WLOG_STOP_SCAN 0
-#define WLOG_CONTINUE_SCAN 1
-
-/*
- * wlog prototypes
- */
-
-#if __STDC__
-extern int wlog_open(struct wlog_file *wfile, int trunc, int mode);
-extern int wlog_close(struct wlog_file *wfile);
-extern int wlog_record_write(struct wlog_file *wfile,
- struct wlog_rec *wrec, long offset);
-extern int wlog_scan_backward(struct wlog_file *wfile, int nrecs,
- int (*func)(struct wlog_rec *rec),
- long data);
-#else
-int wlog_open();
-int wlog_close();
-int wlog_record_write();
-int wlog_scan_backward();
-#endif
-
-extern char Wlog_Error_String[];
-
-#endif /* _WRITE_LOG_H_ */
-
diff --git a/winsup/testsuite/libltp/lib/dataascii.c b/winsup/testsuite/libltp/lib/dataascii.c
deleted file mode 100644
index 5bc2018..0000000
--- a/winsup/testsuite/libltp/lib/dataascii.c
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-#include <stdio.h>
-#include <string.h>
-#include "dataascii.h"
-
-#define CHARS "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghjiklmnopqrstuvwxyz\n"
-#define CHARS_SIZE sizeof(CHARS)
-
-#ifdef UNIT_TEST
-#include <stdlib.h> /* malloc */
-#endif
-
-static char Errmsg[80];
-
-int
-dataasciigen(listofchars, buffer, bsize, offset)
-char *listofchars; /* a null terminated list of characters */
-char *buffer;
-int bsize;
-int offset;
-{
- int cnt;
- int total;
- int ind; /* index into CHARS array */
- char *chr;
- int chars_size;
- const char *charlist;
-
- chr=buffer;
- total=offset+bsize;
-
- if ( listofchars == NULL ) {
- charlist=CHARS;
- chars_size=CHARS_SIZE;
- }
- else {
- charlist=listofchars;
- chars_size=strlen(listofchars);
- }
-
- for(cnt=offset; cnt<total; cnt++) {
- ind=cnt%chars_size;
- *chr++=charlist[ind];
- }
-
- return bsize;
-
-} /* end of dataasciigen */
-
-int
-dataasciichk(listofchars, buffer, bsize, offset, errmsg)
-char *listofchars; /* a null terminated list of characters */
-char *buffer;
-int bsize;
-int offset;
-char **errmsg;
-{
- int cnt;
- int total;
- int ind; /* index into CHARS array */
- char *chr;
- int chars_size;
- const char *charlist;
-
- chr=buffer;
- total=offset+bsize;
-
- if ( listofchars == NULL ) {
- charlist=CHARS;
- chars_size=CHARS_SIZE;
- }
- else {
- charlist=listofchars;
- chars_size=strlen(listofchars);
- }
-
- if ( errmsg != NULL ) {
- *errmsg = Errmsg;
- }
-
- for(cnt=offset; cnt<total; chr++, cnt++) {
- ind=cnt%chars_size;
- if ( *chr != charlist[ind] ) {
- sprintf(Errmsg,
- "data mismatch at offset %d, exp:%#o, act:%#o", cnt,
- charlist[ind], *chr);
- return cnt;
- }
- }
-
- sprintf(Errmsg, "all %d bytes match desired pattern", bsize);
- return -1; /* buffer is ok */
-
-} /* end of dataasciichk */
-
-
-#if UNIT_TEST
-
-/***********************************************************************
- * main for doing unit testing
- ***********************************************************************/
-int
-main(ac, ag)
-int ac;
-char **ag;
-{
-
-int size=1023;
-char *buffer;
-int ret;
-char *errmsg;
-
- if ((buffer=(char *)malloc(size)) == NULL ) {
- perror("malloc");
- exit(2);
- }
-
- dataasciigen(NULL, buffer, size, 0);
- printf("dataasciigen(NULL, buffer, %d, 0)\n", size);
-
- ret=dataasciichk(NULL, buffer, size, 0, &errmsg);
- printf("dataasciichk(NULL, buffer, %d, 0, &errmsg) returned %d %s\n",
- size, ret, errmsg);
-
- if ( ret == -1 )
- printf("\tPASS return value is -1 as expected\n");
- else
- printf("\tFAIL return value is %d, expected -1\n", ret);
-
- ret=dataasciichk(NULL, &buffer[1], size-1, 1, &errmsg);
- printf("dataasciichk(NULL, &buffer[1], %d, 1, &errmsg) returned %d %s\n",
- size-1, ret, errmsg);
-
- if ( ret == -1 )
- printf("\tPASS return value is -1 as expected\n");
- else
- printf("\tFAIL return value is %d, expected -1\n", ret);
-
- buffer[25]= 0x0;
- printf("changing char 25\n");
-
- ret=dataasciichk(NULL, &buffer[1], size-1, 1, &errmsg);
- printf("dataasciichk(NULL, &buffer[1], %d, 1, &errmsg) returned %d %s\n",
- size-1, ret, errmsg);
-
- if ( ret == 25 )
- printf("\tPASS return value is 25 as expected\n");
- else
- printf("\tFAIL return value is %d, expected 25\n", ret);
-
- dataasciigen("this is a test of the my string" , buffer, size, 0);
- printf("dataasciigen(\"this is a test of the my string\", buffer, %d, 0)\n", size);
-
- ret=dataasciichk("this is a test of the my string", buffer, size, 0, &errmsg);
- printf("dataasciichk(\"this is a test of the my string\", buffer, %d, 0, &errmsg) returned %d %s\n",
- size, ret, errmsg);
-
- if ( ret == -1 )
- printf("\tPASS return value is -1 as expected\n");
- else
- printf("\tFAIL return value is %d, expected -1\n", ret);
-
- ret=dataasciichk("this is a test of the my string", &buffer[1], size-1, 1, &errmsg);
- printf("dataasciichk(\"this is a test of the my string\", &buffer[1], %d, 1, &errmsg) returned %d %s\n",
- size-1, ret, errmsg);
-
- if ( ret == -1 )
- printf("\tPASS return value is -1 as expected\n");
- else
- printf("\tFAIL return value is %d, expected -1\n", ret);
-
- buffer[25]= 0x0;
- printf("changing char 25\n");
-
- ret=dataasciichk("this is a test of the my string", &buffer[1], size-1, 1, &errmsg);
- printf("dataasciichk(\"this is a test of the my string\", &buffer[1], %d, 1, &errmsg) returned %d %s\n",
- size-1, ret, errmsg);
-
- if ( ret == 25 )
- printf("\tPASS return value is 25 as expected\n");
- else
- printf("\tFAIL return value is %d, expected 25\n", ret);
-
- exit(0);
-}
-
-#endif
-
diff --git a/winsup/testsuite/libltp/lib/databin.c b/winsup/testsuite/libltp/lib/databin.c
deleted file mode 100644
index f09c2c8..0000000
--- a/winsup/testsuite/libltp/lib/databin.c
+++ /dev/null
@@ -1,298 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-#include <stdio.h>
-#include <sys/param.h>
-#include <string.h> /* memset */
-#include <stdlib.h> /* rand */
-#include "databin.h"
-
-#if UNIT_TEST
-#include <malloc.h>
-#endif
-
-static char Errmsg[80];
-
-void
-databingen (mode, buffer, bsize, offset)
-int mode; /* either a, c, r, o, z or C */
-unsigned char *buffer; /* buffer pointer */
-int bsize; /* size of buffer */
-int offset; /* offset into the file where buffer starts */
-{
-int ind;
-
- switch (mode)
- {
- default:
- case 'a': /* alternating bit pattern */
- memset(buffer,0x55,bsize);
- break;
-
- case 'c': /* checkerboard pattern */
- memset(buffer,0xf0,bsize);
- break;
-
- case 'C': /* */
- for (ind=0;ind< bsize;ind++) {
- buffer[ind] = ((offset+ind)%8 & 0177);
- }
- break;
-
- case 'o':
- memset(buffer,0xff,bsize);
- break;
-
- case 'z':
- memset(buffer,0x0,bsize);
- break;
-
- case 'r': /* random */
- for (ind=0;ind< bsize;ind++) {
- buffer[ind] = (rand () & 0177) | 0100;
- }
- }
-}
-
-/***********************************************************************
- *
- * return values:
- * >= 0 : error at byte offset into the file, offset+buffer[0-(bsize-1)]
- * < 0 : no error
- ***********************************************************************/
-int
-databinchk(mode, buffer, bsize, offset, errmsg)
-int mode; /* either a, c, r, z, o, or C */
-unsigned char *buffer; /* buffer pointer */
-int bsize; /* size of buffer */
-int offset; /* offset into the file where buffer starts */
-char **errmsg;
-{
- int cnt;
- unsigned char *chr;
- int total;
- long expbits;
- long actbits;
-
- chr=buffer;
- total=bsize;
-
- if ( errmsg != NULL ) {
- *errmsg = Errmsg;
- }
-
- switch (mode)
- {
- default:
- case 'a': /* alternating bit pattern */
- expbits=0x55;
- break;
-
- case 'c': /* checkerboard pattern */
- expbits=0xf0;
- break;
-
- case 'C': /* counting pattern */
- for (cnt=0;cnt< bsize;cnt++) {
- expbits = ((offset+cnt)%8 & 0177);
-
- if ( buffer[cnt] != expbits ) {
- sprintf(Errmsg,
- "data mismatch at offset %d, exp:%#lo, act:%#o",
- offset+cnt, expbits, buffer[cnt]);
- return offset+cnt;
- }
- }
- sprintf(Errmsg, "all %d bytes match desired pattern", bsize);
- return -1;
-
- case 'o':
- expbits=0xff;
- break;
-
- case 'z':
- expbits=0;
- break;
-
- case 'r':
- return -1; /* no check can be done for random */
- }
-
- for (cnt=0; cnt<bsize; chr++, cnt++) {
- actbits = (long)*chr;
-
- if ( actbits != expbits ) {
- sprintf(Errmsg, "data mismatch at offset %d, exp:%#lo, act:%#lo",
- offset+cnt, expbits, actbits);
- return offset+cnt;
- }
- }
-
- sprintf(Errmsg, "all %d bytes match desired pattern", bsize);
- return -1; /* all ok */
-}
-
-#if UNIT_TEST
-
-/***********************************************************************
- * main for doing unit testing
- ***********************************************************************/
-int
-main(ac, ag)
-int ac;
-char **ag;
-{
-
- int size=1023;
- int offset;
- int number;
- unsigned char *buffer;
- int ret;
- char *errmsg;
-
- if ((buffer=(unsigned char *)malloc(size)) == NULL ) {
- perror("malloc");
- exit(2);
- }
-
-
-printf("***** for a ****************************\n");
- databingen('a', buffer, size, 0);
- printf("databingen('a', buffer, %d, 0)\n", size);
-
- ret=databinchk('a', buffer, size, 0, &errmsg);
- printf("databinchk('a', buffer, %d, 0, &errmsg) returned %d: %s\n",
- size, ret, errmsg);
- if ( ret == -1 )
- printf("\tPASS return value of -1 as expected\n");
- else
- printf("\tFAIL return value %d, expected -1\n", ret);
-
- offset=232400;
- ret=databinchk('a', &buffer[1], size-1, offset, &errmsg);
- printf("databinchk('a', &buffer[1], %d, %d, &errmsg) returned %d: %s\n",
- size, offset, ret, errmsg);
- if ( ret == -1 )
- printf("\tPASS return value of -1 as expected\n");
- else
- printf("\tFAIL return value %d, expected -1\n", ret);
-
- buffer[15]= 0x0;
- printf("changing char 15 (offset (%d+15) = %d) to 0x0\n", offset, offset+15);
- number=offset+15;
-
- ret=databinchk('a', &buffer[1], size-1, offset+1, &errmsg);
- printf("databinchk('a', &buffer[1], %d, %d, &errmsg) returned %d: %s\n",
- size-1, offset+1, ret, errmsg);
- if ( ret == number )
- printf("\tPASS return value of %d as expected\n", number);
- else
- printf("\tFAIL return value %d, expected %d\n", ret, number);
-
-
-
-printf("***** for c ****************************\n");
- databingen('c', buffer, size, 0);
- printf("databingen('c', buffer, %d, 0)\n", size);
-
- ret=databinchk('c', buffer, size, 0, &errmsg);
- printf("databinchk('c', buffer, %d, 0, &errmsg) returned %d: %s\n",
- size, ret, errmsg);
- if ( ret == -1 )
- printf("\tPASS return value of -1 as expected\n");
- else
- printf("\tFAIL return value %d, expected -1\n", ret);
-
- offset=232400;
- ret=databinchk('c', &buffer[1], size-1, offset, &errmsg);
- printf("databinchk('c', &buffer[1], %d, %d, &errmsg) returned %d: %s\n",
- size, offset, ret, errmsg);
- if ( ret == -1 )
- printf("\tPASS return value of -1 as expected\n");
- else
- printf("\tFAIL return value %d, expected -1\n", ret);
-
- buffer[15]= 0x0;
- printf("changing char 15 (offset (%d+15) = %d) to 0x0\n", offset, offset+15);
- number=offset+15;
-
- ret=databinchk('c', &buffer[1], size-1, offset+1, &errmsg);
- printf("databinchk('c', &buffer[1], %d, %d, &errmsg) returned %d: %s\n",
- size-1, offset+1, ret, errmsg);
- if ( ret == number )
- printf("\tPASS return value of %d as expected\n", number);
- else
- printf("\tFAIL return value %d, expected %d\n", ret, number);
-
-printf("***** for C ****************************\n");
-
- databingen('C', buffer, size, 0);
- printf("databingen('C', buffer, %d, 0)\n", size);
-
- ret=databinchk('C', buffer, size, 0, &errmsg);
- printf("databinchk('C', buffer, %d, 0, &errmsg) returned %d: %s\n",
- size, ret, errmsg);
- if ( ret == -1 )
- printf("\tPASS return value of -1 as expected\n");
- else
- printf("\tFAIL return value %d, expected -1\n", ret);
-
- offset=18;
- ret=databinchk('C', &buffer[18], size-18, 18, &errmsg);
- printf("databinchk('C', &buffer[18], %d, 18, &errmsg) returned %d: %s\n",
- size-18, ret, errmsg);
- if ( ret == -1 )
- printf("\tPASS return value of -1 as expected\n");
- else
- printf("\tFAIL return value %d, expected -1\n", ret);
-
- buffer[20]= 0x0;
- buffer[21]= 0x0;
- printf("changing char 20 and 21 to 0x0 (offset %d and %d)\n", 20,
- 21);
-
- ret=databinchk('C', &buffer[18], size-18, 18, &errmsg);
- printf("databinchk('C', &buffer[18], %d, 18, &errmsg) returned %d: %s\n",
- size-18, ret, errmsg);
-
- if ( ret == 20 || ret == 21 )
- printf("\tPASS return value of %d or %d as expected\n",
- 20, 21);
- else
- printf("\tFAIL return value %d, expected %d or %d\n", ret,
- 20, 21 );
-
- exit(0);
-
-}
-
-#endif
-
diff --git a/winsup/testsuite/libltp/lib/datapid.c b/winsup/testsuite/libltp/lib/datapid.c
deleted file mode 100644
index 9414eae..0000000
--- a/winsup/testsuite/libltp/lib/datapid.c
+++ /dev/null
@@ -1,374 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-/************
-
-64 bits in a Cray word
-
- 12345678901234567890123456789012
-1234567890123456789012345678901234567890123456789012345678901234
-________________________________________________________________
-< pid >< word-offset in file (same #) >< pid >
-
-1234567890123456789012345678901234567890123456789012345678901234
-________________________________________________________________
-< pid >< offset in file of this word >< pid >
-
-
-8 bits to a bytes == character
- NBPW 8
-************/
-
-#include <stdio.h>
-#include <sys/param.h>
-#ifdef UNIT_TEST
-#include <unistd.h>
-#include <stdlib.h>
-#endif
-
-static char Errmsg[80];
-
-#define LOWER16BITS(X) (X & 0177777)
-#define LOWER32BITS(X) (X & 0xffffffff)
-
-/***
-#define HIGHBITS(WRD, bits) ( (-1 << (64-bits)) & WRD)
-#define LOWBITS(WRD, bits) ( (-1 >> (64-bits)) & WRD)
-****/
-
-#define NBPBYTE 8 /* number bits per byte */
-
-#ifndef DEBUG
-#define DEBUG 0
-#endif
-
-/***********************************************************************
- *
- *
- * 1 2 3 4 5 6 7 8 9 10 11 12 13 14 14 15 bytes
- * 1234567890123456789012345678901234567890123456789012345678901234 bits
- * ________________________________________________________________ 1 word
- * < pid >< offset in file of this word >< pid >
- *
- * the words are put together where offset zero is the start.
- * thus, offset 16 is the start of the second full word
- * Thus, offset 8 is in middle of word 1
- ***********************************************************************/
-int
-datapidgen(pid, buffer, bsize, offset)
-int pid;
-char *buffer;
-int bsize;
-int offset;
-{
-#if CRAY
-
- int cnt;
- int tmp;
- char *chr;
- long *wptr;
- long word;
- int woff; /* file offset for the word */
- int boff; /* buffer offset or index */
- int num_full_words;
-
- num_full_words = bsize/NBPW;
- boff = 0;
-
- if ( cnt=(offset % NBPW) ) { /* partial word */
-
- woff = offset - cnt;
-#if DEBUG
-printf("partial at beginning, cnt = %d, woff = %d\n", cnt, woff);
-#endif
-
- word = ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) | LOWER16BITS(pid));
-
- chr = (char *)&word;
-
- for (tmp=0; tmp<cnt; tmp++) { /* skip unused bytes */
- chr++;
- }
-
- for (; boff<(NBPW-cnt) && boff<bsize; boff++, chr++) {
- buffer[boff] = *chr;
- }
- }
-
- /*
- * full words
- */
-
- num_full_words = (bsize-boff)/NBPW;
-
- woff = offset+boff;
-
- for (cnt=0; cnt<num_full_words; woff += NBPW, cnt++ ) {
-
- word = ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) | LOWER16BITS(pid));
-
- chr = (char *)&word;
- for(tmp=0; tmp<NBPW; tmp++, chr++) {
- buffer[boff++] = *chr;
- }
-/****** Only if wptr is a word ellined
- wptr = (long *)&buffer[boff];
- *wptr = word;
- boff += NBPW;
-*****/
-
- }
-
- /*
- * partial word at end of buffer
- */
-
- if ( cnt=((bsize-boff) % NBPW) ) {
-#if DEBUG
-printf("partial at end\n");
-#endif
- word = ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) | LOWER16BITS(pid));
-
- chr = (char *)&word;
-
- for (tmp=0; tmp<cnt && boff<bsize; tmp++, chr++) {
- buffer[boff++] = *chr;
- }
- }
-
- return bsize;
-
-#else
- return -1; /* not support on non-64 bits word machines */
-
-#endif
-
-}
-
-/***********************************************************************
- *
- *
- ***********************************************************************/
-int
-datapidchk(pid, buffer, bsize, offset, errmsg)
-int pid;
-char *buffer;
-int bsize;
-int offset;
-char **errmsg;
-{
-#if CRAY
-
- int cnt;
- int tmp;
- char *chr;
- long *wptr;
- long word;
- int woff; /* file offset for the word */
- int boff; /* buffer offset or index */
- int num_full_words;
-
-
- if ( errmsg != NULL ) {
- *errmsg = Errmsg;
- }
-
-
- num_full_words = bsize/NBPW;
- boff = 0;
-
- if ( cnt=(offset % NBPW) ) { /* partial word */
- woff = offset - cnt;
- word = ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) | LOWER16BITS(pid));
-
- chr = (char *)&word;
-
- for (tmp=0; tmp<cnt; tmp++) { /* skip unused bytes */
- chr++;
- }
-
- for (; boff<(NBPW-cnt) && boff<bsize; boff++, chr++) {
- if (buffer[boff] != *chr) {
- sprintf(Errmsg, "Data mismatch at offset %d, exp:%#o, act:%#o",
- offset+boff, *chr, buffer[boff]);
- return offset+boff;
- }
- }
- }
-
- /*
- * full words
- */
-
- num_full_words = (bsize-boff)/NBPW;
-
- woff = offset+boff;
-
- for (cnt=0; cnt<num_full_words; woff += NBPW, cnt++ ) {
- word = ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) | LOWER16BITS(pid));
-
- chr = (char *)&word;
- for(tmp=0; tmp<NBPW; tmp++, boff++, chr++) {
- if ( buffer[boff] != *chr ) {
- sprintf(Errmsg, "Data mismatch at offset %d, exp:%#o, act:%#o",
- woff, *chr, buffer[boff]);
- return woff;
- }
- }
-
-/****** only if a word elined
- wptr = (long *)&buffer[boff];
- if ( *wptr != word ) {
- sprintf(Errmsg, "Data mismatch at offset %d, exp:%#o, act:%#o",
- woff, word, *wptr);
- return woff;
- }
- boff += NBPW;
-******/
- }
-
- /*
- * partial word at end of buffer
- */
-
- if ( cnt=((bsize-boff) % NBPW) ) {
-#if DEBUG
-printf("partial at end\n");
-#endif
- word = ((LOWER16BITS(pid) << 48) | (LOWER32BITS(woff) << 16) | LOWER16BITS(pid));
-
- chr = (char *)&word;
-
-
- for (tmp=0; tmp<cnt && boff<bsize; boff++, tmp++, chr++) {
- if ( buffer[boff] != *chr ) {
- sprintf(Errmsg, "Data mismatch at offset %d, exp:%#o, act:%#o",
- offset+boff, *chr, buffer[boff]);
- return offset+boff;
- }
- }
- }
-
- sprintf(Errmsg, "all %d bytes match desired pattern", bsize);
- return -1; /* buffer is ok */
-
-#else
-
- if ( errmsg != NULL ) {
- *errmsg = Errmsg;
- }
- sprintf(Errmsg, "Not supported on this OS.");
- return 0;
-
-#endif
-
-
-} /* end of datapidchk */
-
-#if UNIT_TEST
-
-/***********************************************************************
- * main for doing unit testing
- ***********************************************************************/
-int
-main(ac, ag)
-int ac;
-char **ag;
-{
-
-int size=1234;
-char *buffer;
-int ret;
-char *errmsg;
-
- if ((buffer=(char *)malloc(size)) == NULL ) {
- perror("malloc");
- exit(2);
- }
-
-
- datapidgen(-1, buffer, size, 3);
-
-/***
-fwrite(buffer, size, 1, stdout);
-fwrite("\n", 1, 1, stdout);
-****/
-
- printf("datapidgen(-1, buffer, size, 3)\n");
-
- ret=datapidchk(-1, buffer, size, 3, &errmsg);
- printf("datapidchk(-1, buffer, %d, 3, &errmsg) returned %d %s\n",
- size, ret, errmsg);
- ret=datapidchk(-1, &buffer[1], size-1, 4, &errmsg);
- printf("datapidchk(-1, &buffer[1], %d, 4, &errmsg) returned %d %s\n",
- size-1, ret, errmsg);
-
- buffer[25]= 0x0;
- buffer[26]= 0x0;
- buffer[27]= 0x0;
- buffer[28]= 0x0;
- printf("changing char 25-28\n");
-
- ret=datapidchk(-1, &buffer[1], size-1, 4, &errmsg);
- printf("datapidchk(-1, &buffer[1], %d, 4, &errmsg) returned %d %s\n",
- size-1, ret, errmsg);
-
-printf("------------------------------------------\n");
-
- datapidgen(getpid(), buffer, size, 5);
-
-/*******
-fwrite(buffer, size, 1, stdout);
-fwrite("\n", 1, 1, stdout);
-******/
-
- printf("\ndatapidgen(getpid(), buffer, size, 5)\n");
-
- ret=datapidchk(getpid(), buffer, size, 5, &errmsg);
- printf("datapidchk(getpid(), buffer, %d, 5, &errmsg) returned %d %s\n",
- size, ret, errmsg);
-
- ret=datapidchk(getpid(), &buffer[1], size-1, 6, &errmsg);
- printf("datapidchk(getpid(), &buffer[1], %d, 6, &errmsg) returned %d %s\n",
- size-1, ret, errmsg);
-
- buffer[25]= 0x0;
- printf("changing char 25\n");
-
- ret=datapidchk(getpid(), &buffer[1], size-1, 6, &errmsg);
- printf("datapidchk(getpid(), &buffer[1], %d, 6, &errmsg) returned %d %s\n",
- size-1, ret, errmsg);
-
- exit(0);
-}
-
-#endif
-
diff --git a/winsup/testsuite/libltp/lib/forker.c b/winsup/testsuite/libltp/lib/forker.c
deleted file mode 100644
index 99bc585..0000000
--- a/winsup/testsuite/libltp/lib/forker.c
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-/**************************************************************
- *
- * OS Testing - Silicon Graphics, Inc.
- *
- * FUNCTION NAME : forker
- * background
- *
- * FUNCTION TITLE : fork desired number of copies of the current process
- * fork a process and return control to caller
- *
- * SYNOPSIS:
- * int forker(ncopies, mode, prefix)
- * int ncopies;
- * int mode;
- * char *prefix;
- *
- * int background(prefix);
- * char *prefix;
- *
- * extern int Forker_pids[];
- * extern int Forker_npids;
- *
- * AUTHOR : Richard Logan
- *
- * CO-PILOT(s) : Dean Roehrich
- *
- * INITIAL RELEASE : UNICOS 8.0
- *
- * DESIGN DESCRIPTION
- * The background function will do a fork of the current process.
- * The parent process will then exit, thus orphaning the
- * child process. Doing this will not nice the child process
- * like executing a cmd in the background using "&" from the shell.
- * If the fork fails and prefix is not NULL, a error message is printed
- * to stderr and the process will exit with a value of errno.
- *
- * The forker function will fork <ncopies> minus one copies
- * of the current process. There are two modes in how the forks
- * will be done. Mode 0 (default) will have all new processes
- * be childern of the parent process. Using Mode 1,
- * the parent process will have one child and that child will
- * fork the next process, if necessary, and on and on.
- * The forker function will return the number of successful
- * forks. This value will be different for the parent and each child.
- * Using mode 0, the parent will get the total number of successful
- * forks. Using mode 1, the newest child will get the total number
- * of forks. The parent will get a return value of 1.
- *
- * The forker function also updates the global variables
- * Forker_pids[] and Forker_npids. The Forker_pids array will
- * be updated to contain the pid of each new process. The
- * Forker_npids variable contains the number of entries
- * in Forker_pids. Note, not all processes will have
- * access to all pids via Forker_pids. If using mode 0, only the
- * parent process and the last process will have all information.
- * If using mode 1, only the last child process will have all information.
- *
- * If the prefix parameter is not NULL and the fork system call fails,
- * a error message will be printed to stderr. The error message
- * the be preceeded with prefix string. If prefix is NULL,
- * no error message is printed.
- *
- * SPECIAL REQUIREMENTS
- * None.
- *
- * UPDATE HISTORY
- * This should contain the description, author, and date of any
- * "interesting" modifications (i.e. info should helpful in
- * maintaining/enhancing this module).
- * username description
- * ----------------------------------------------------------------
- * rrl This functions will first written during
- * the SFS testing days, 1993.
- *
- * BUGS/LIMITATIONS
- * The child pids are stored in the fixed array, Forker_pids.
- * The array only has space for 4098 pids. Only the first
- * 4098 pids will be stored in the array.
- *
- **************************************************************/
-
-#include <stdio.h>
-#include <errno.h>
-#include <unistd.h> /* fork, getpid, sleep */
-#include <string.h>
-#include <stdlib.h>
-#include "forker.h"
-
-extern int errno;
-
-int Forker_pids[FORKER_MAX_PIDS]; /* holds pids of forked processes */
-int Forker_npids=0; /* number of entries in Forker_pids */
-
-/***********************************************************************
- *
- * This function will fork and the parent will exit zero and
- * the child will return. This will orphan the returning process
- * putting it in the background.
- *
- * Return Value
- * 0 : if fork did not fail
- * !0 : if fork failed, the return value will be the errno.
- ***********************************************************************/
-int
-background(prefix)
-char *prefix;
-{
- switch (fork()) {
- case -1:
- if ( prefix != NULL )
- fprintf(stderr, "%s: In %s background(), fork() failed, errno:%d %s\n",
- prefix, __FILE__, errno, strerror(errno));
- exit(errno);
-
- case 0: /* child process */
- break;
-
- default:
- exit(0);
- }
-
- return 0;
-
-} /* end of background */
-
-/***********************************************************************
- * Forker will fork ncopies-1 copies of self.
- *
- ***********************************************************************/
-int
-forker(ncopies, mode, prefix)
-int ncopies;
-int mode; /* 0 - all childern of parent, 1 - only 1 direct child */
-char *prefix; /* if ! NULL, an message will be printed to stderr */
- /* if fork fails. The prefix (program name) will */
- /* preceed the message */
-{
- int cnt;
- int pid;
- static int ind = 0;
-
- Forker_pids[ind]=0;
-
- for ( cnt=1; cnt < ncopies; cnt++ ) {
-
- switch ( mode ) {
- case 1 : /* only 1 direct child */
- if ( (pid = fork()) == -1 ) {
- if ( prefix != NULL )
- fprintf(stderr, "%s: %s,forker(): fork() failed, errno:%d %s\n",
- prefix, __FILE__, errno, strerror(errno));
- return 0;
- }
- Forker_npids++;
-
- switch (pid ) {
- case 0: /* child - continues the forking */
-
- if ( Forker_npids < FORKER_MAX_PIDS )
- Forker_pids[Forker_npids-1]=getpid();
- break;
-
- default: /* parent - stop the forking */
- if ( Forker_npids < FORKER_MAX_PIDS )
- Forker_pids[Forker_npids-1]=pid;
- return cnt-1;
- }
-
- break;
-
- default : /* all new processes are childern of parent */
- if ( (pid = fork()) == -1 ) {
- if ( prefix != NULL )
- fprintf(stderr, "%s: %s,forker(): fork() failed, errno:%d %s\n",
- prefix, __FILE__, errno, strerror(errno));
- return cnt-1;
- }
- Forker_npids++;
-
- switch (pid ) {
- case 0: /* child - stops the forking */
- if ( Forker_npids < FORKER_MAX_PIDS )
- Forker_pids[Forker_npids-1]=getpid();
- return cnt;
-
- default: /* parent - continues the forking */
- if ( Forker_npids < FORKER_MAX_PIDS )
- Forker_pids[Forker_npids-1]=pid;
- break;
- }
- break;
- }
- }
-
- if ( Forker_npids < FORKER_MAX_PIDS )
- Forker_pids[Forker_npids]=0;
- return cnt-1;
-
-} /* end of forker */
-
-
-#if UNIT_TEST
-
-/*
- * The following is a unit test main for the background and forker
- * functions.
- */
-
-int
-main(argc, argv)
-int argc;
-char **argv;
-{
- int ncopies=1;
- int mode=0;
- int ret;
- int ind;
-
- if ( argc == 1 ) {
- printf("Usage: %s ncopies [mode]\n", argv[0]);
- exit(1);
- }
-
- if ( sscanf(argv[1], "%i", &ncopies) != 1 ) {
- printf("%s: ncopies argument must be integer\n", argv[0]);
- exit(1);
- }
-
- if ( argc == 3 )
- if ( sscanf(argv[2], "%i", &mode) != 1 ) {
- printf("%s: mode argument must be integer\n", argv[0]);
- exit(1);
- }
-
- printf("Starting Pid = %d\n", getpid());
- ret=background(argv[0]);
- printf("After background() ret:%d, pid = %d\n", ret, getpid());
-
- ret=forker(ncopies, mode, argv[0]);
-
- printf("forker(%d, %d, %s) ret:%d, pid = %d, sleeping 30 seconds.\n",
- ncopies, mode, argv[0], ret, getpid());
-
- printf("%d My version of Forker_pids[], Forker_npids = %d\n",
- getpid(), Forker_npids);
-
- for (ind=0; ind<Forker_npids; ind++){
- printf("%d ind:%-2d pid:%d\n", getpid(), ind, Forker_pids[ind]);
- }
-
- sleep(30);
- exit(0);
-}
-
-#endif /* UNIT_TEST */
diff --git a/winsup/testsuite/libltp/lib/get_high_address.c b/winsup/testsuite/libltp/lib/get_high_address.c
deleted file mode 100644
index 5fe1e81..0000000
--- a/winsup/testsuite/libltp/lib/get_high_address.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * (C) COPYRIGHT CRAY RESEARCH, INC.
- * UNPUBLISHED PROPRIETARY INFORMATION.
- * ALL RIGHTS RESERVED.
- */
-
-#include <unistd.h>
-#ifdef __CYGWIN__
-#include <windows.h>
-#endif
-
-char *
-get_high_address()
-{
-#ifdef __CYGWIN__
- return VirtualAlloc (NULL, 4096, MEM_COMMIT, PAGE_NOACCESS) + 2048;
-#else
- return (char *)sbrk(0) + 16384;
-#endif
-}
diff --git a/winsup/testsuite/libltp/lib/libtestsuite.c b/winsup/testsuite/libltp/lib/libtestsuite.c
deleted file mode 100644
index e741d25..0000000
--- a/winsup/testsuite/libltp/lib/libtestsuite.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * libtestsuite.c
- *
- * DESCRIPTION
- * file containing generic routines which are used by some of the LTP
- * testsuite tests. Currently, the following routines are present in
- * this library:
- *
- * my_getpwnam(), do_file_setup()
- *
- */
-#include <pwd.h>
-#include <errno.h>
-#include <fcntl.h>
-
-#include "test.h"
-#include "usctest.h"
-
-struct passwd *
-my_getpwnam(char *name)
-{
- struct passwd *saved_pwent;
- struct passwd *pwent;
-
- if ((pwent = getpwnam(name)) == NULL) {
- perror("getpwnam");
- tst_brkm(TBROK, NULL, "getpwnam() failed");
- }
- saved_pwent = (struct passwd *)malloc(sizeof(struct passwd));
-
- *saved_pwent = *pwent;
-
- return(saved_pwent);
-}
-
-void
-do_file_setup(char *fname)
-{
- int fd;
-
- if ((fd = open(fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_resm(TBROK, "open(%s, O_RDWR|O_CREAT,0700) Failed, "
- "errno=%d : %s", fname, errno, strerror(errno));
- }
-
- if (close(fd) == -1) {
- tst_resm(TWARN, "close(%s) Failed on file create, errno=%d : "
- "%s", fname, errno, strerror(errno));
- }
-}
diff --git a/winsup/testsuite/libltp/lib/open_flags.c b/winsup/testsuite/libltp/lib/open_flags.c
deleted file mode 100644
index 3105955..0000000
--- a/winsup/testsuite/libltp/lib/open_flags.c
+++ /dev/null
@@ -1,330 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-/**************************************************************
- *
- * OS Testing - Silicon Graphics, Inc.
- *
- * FUNCTION NAME : parse_open_flags
- * openflags2symbols
- *
- * FUNCTION TITLE : converts open flag symbols into bitmask
- * converts open flag bitmask into symbols
- *
- * SYNOPSIS:
- * int parse_open_flags(symbols, badname)
- * char *symbols;
- * char **badname;
- *
- * char *openflags2symbols(openflags, sep, mode)
- * int openflags;
- * char *sep;
- * int mode;
- *
- * AUTHOR : Richard Logan
- *
- * CO-PILOT(s) : Dean Roehrich
- *
- * INITIAL RELEASE : UNICOS 8.0
- *
- * DESIGN DESCRIPTION
- * The parse_open_flags function can be used to convert
- * a list of comma separated open(2) flag symbols (i.e. O_TRUNC)
- * into the bitmask that can be used by open(2).
- * If a symbol is unknown and <badname> is not NULL, <badname>
- * will updated to point that symbol in <string>.
- * Parse_open_flags will return -1 on this error.
- * Otherwise parse_open_flags will return the open flag bitmask.
- * If parse_open_flags returns, <string> will left unchanged.
- *
- * The openflags2symbols function attempts to convert open flag
- * bits into human readable symbols (i.e. O_TRUNC). If there
- * are more than one symbol, the <sep> string will be placed as
- * a separator between symbols. Commonly used separators would
- * be a comma "," or pipe "|". If <mode> is one and not all
- * <openflags> bits can be converted to symbols, the "UNKNOWN"
- * symbol will be added to return string.
- * Openflags2symbols will return the indentified symbols.
- * If no symbols are recognized the return value will be a empty
- * string or the "UNKNOWN" symbol.
- *
- * SPECIAL REQUIREMENTS
- * None.
- *
- * UPDATE HISTORY
- * This should contain the description, author, and date of any
- * "interesting" modifications (i.e. info should helpful in
- * maintaining/enhancing this module).
- * username description
- * ----------------------------------------------------------------
- * rrl This code was first created during the beginning
- * of the SFS testing days. I think that was in 1993.
- * This code was updated in 05/96.
- * (05/96) openflags2symbols was written.
- *
- * BUGS/LIMITATIONS
- * Currently (05/96) all known symbols are coded into openflags2symbols.
- * If new open flags are added this code will have to updated
- * to know about them or they will not be recognized.
- *
- **************************************************************/
-
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/param.h>
-#include <string.h> /* strcat */
-#include "open_flags.h"
-
-#define UNKNOWN_SYMBOL "UNKNOWN"
-
-static char Open_symbols[512]; /* space for openflags2symbols return value */
-
-struct open_flag_t {
- const char *symbol;
- int flag;
-};
-
-static struct open_flag_t Open_flags[] = {
- { "O_RDONLY", O_RDONLY },
- { "O_WRONLY", O_WRONLY },
- { "O_RDWR", O_RDWR },
- { "O_SYNC", O_SYNC },
- { "O_CREAT", O_CREAT },
- { "O_TRUNC", O_TRUNC },
- { "O_EXCL", O_EXCL },
- { "O_APPEND", O_APPEND },
- { "O_NONBLOCK", O_NONBLOCK },
-#if O_NOCTTY
- { "O_NOCTTY", O_NOCTTY },
-#endif
-#if O_DSYNC
- { "O_DSYNC", O_DSYNC },
-#endif
-#if O_RSYNC
- { "O_RSYNC", O_RSYNC },
-#endif
-#if O_ASYNC
- { "O_ASYNC", O_ASYNC },
-#endif
-#if O_PTYIGN
- { "O_PTYIGN", O_PTYIGN },
-#endif
-#if O_NDELAY
- { "O_NDELAY", O_NDELAY },
-#endif
-#if O_RAW
- { "O_RAW", O_RAW },
-#endif
-#ifdef O_SSD
- { "O_SSD", O_SSD },
-#endif
-#if O_BIG
- { "O_BIG", O_BIG },
-#endif
-#if O_PLACE
- { "O_PLACE", O_PLACE },
-#endif
-#if O_RESTART
- { "O_RESTART", O_RESTART },
-#endif
-#if O_SFSXOP
- { "O_SFSXOP", O_SFSXOP },
-#endif
-#if O_SFS_DEFER_TM
- { "O_SFS_DEFER_TM", O_SFS_DEFER_TM },
-#endif
-#if O_WELLFORMED
- { "O_WELLFORMED", O_WELLFORMED },
-#endif
-#if O_LDRAW
- { "O_LDRAW", O_LDRAW },
-#endif
-#if O_T3D
- { "O_T3D", O_T3D },
-#endif /* O_T3D */
-#if O_PARALLEL
- { "O_PARALLEL", O_PARALLEL },
- { "O_FSA", O_PARALLEL|O_WELLFORMED|O_RAW }, /* short cut */
-#endif /* O_PARALLEL */
-#ifdef O_LARGEFILE
- { "O_LARGEFILE", O_LARGEFILE },
-#endif
-#ifdef O_DIRECT
- { "O_DIRECT", O_DIRECT },
-#endif
-#ifdef O_PRIV
- { "O_PRIV", O_PRIV },
-#endif
-
-};
-
-int
-parse_open_flags(char *string, char **badname)
-{
- int bits = 0;
- char *name;
- char *cc;
- char savecc;
- int found;
- int ind;
-
- name=string;
- cc=name;
-
- while ( 1 ) {
-
- for(; ((*cc != ',') && (*cc != '\0')); cc++);
- savecc = *cc;
- *cc = '\0';
-
- found = 0;
-
- for(ind=0; ind < sizeof(Open_flags)/sizeof(struct open_flag_t); ind++) {
- if ( strcmp(name, Open_flags[ind].symbol) == 0 ) {
- bits |= Open_flags[ind].flag;
- found=1;
- break;
- }
- }
-
- *cc = savecc; /* restore string */
-
- if ( found == 0 ) { /* invalid name */
- if ( badname != NULL )
- *badname = name;
- return -1;
- }
-
- if ( savecc == '\0' )
- break;
-
- name = ++cc;
-
- } /* end while */
-
- return bits;
-
-} /* end of parse_open_flags */
-
-
-char *
-openflags2symbols(int openflags, char *sep, int mode)
-{
- int ind;
- int size;
- int bits = openflags;
- int havesome=0;
-
- Open_symbols[0]='\0';
-
- size=sizeof(Open_flags)/sizeof(struct open_flag_t);
-
- /*
- * Deal with special case of O_RDONLY. If O_WRONLY nor O_RDWR
- * bits are not set, assume O_RDONLY.
- */
-
- if ( (bits & (O_WRONLY | O_RDWR)) == 0 ) {
- strcat(Open_symbols, "O_RDONLY");
- havesome=1;
- }
-
- /*
- * Loop through all but O_RDONLY elments of Open_flags
- */
- for(ind=1; ind < size; ind++) {
-
- if ( (bits & Open_flags[ind].flag) == Open_flags[ind].flag ) {
- if ( havesome )
- strcat(Open_symbols, sep);
-
- strcat(Open_symbols, Open_flags[ind].symbol);
- havesome++;
-
- /* remove flag bits from bits */
- bits = bits & (~Open_flags[ind].flag);
- }
- }
-
- /*
- * If not all bits were identified and mode was equal to 1,
- * added UNKNOWN_SYMBOL to return string
- */
- if ( bits && mode == 1 ) { /* not all bits were identified */
- if ( havesome )
- strcat(Open_symbols, sep);
- strcat(Open_symbols, UNKNOWN_SYMBOL);
- }
-
- return Open_symbols;
-
-} /* end of openflags2symbols */
-
-
-#ifdef UNIT_TEST
-
-/*
- * The following code provides a UNIT test main for
- * parse_open_flags and openflags2symbols functions.
- */
-
-int
-main(argc, argv)
-int argc;
-char **argv;
-{
- int bits;
- int ret;
- char *err;
-
- if (argc == 1 ) {
- printf("Usage: %s openflagsbits\n\t%s symbols\n", argv[0], argv[0]);
- exit(1);
- }
-
- if ( sscanf(argv[1], "%i", &bits) == 1 ) {
- printf("openflags2symbols(%#o, \",\", 1) returned %s\n",
- bits, openflags2symbols(bits, ",", 1));
-
- } else {
- ret=parse_open_flags(argv[1], &err);
- if ( ret == -1 )
- printf("parse_open_flags(%s, &err) returned -1, err = %s\n",
- argv[0], err);
- else
- printf("parse_open_flags(%s, &err) returned %#o\n", argv[0], ret);
- }
-
- exit(0);
-}
-
-#endif /* end of UNIT_TEST */
diff --git a/winsup/testsuite/libltp/lib/parse_opts.c b/winsup/testsuite/libltp/lib/parse_opts.c
deleted file mode 100644
index 4a80589..0000000
--- a/winsup/testsuite/libltp/lib/parse_opts.c
+++ /dev/null
@@ -1,876 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-
-/* $Id$ */
-
-/**********************************************************
- *
- * OS Testing - Silicon Graphics, Inc.
- *
- * FUNCTION NAME : parse_opts
- *
- * FUNCTION TITLE : parse standard & user options for system call tests
- *
- * SYNOPSIS:
- * #include "usctest.h"
- *
- * char *parse_opts(ac, av, user_optarr, uhf)
- * int ac;
- * char **av;
- * option_t user_optarr[];
- * void (*uhf)();
- *
- * AUTHOR : William Roske/Richard Logan
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * DESCRIPTION
- * The parse_opts library routine takes that argc and argv parameters
- * recevied by main() and an array of structures defining user options.
- * It parses the command line setting flag and argument locations
- * associated with the options. It uses getopt to do the actual cmd line
- * parsing. uhf() is a function to print user define help
- *
- * This module contains the functions usc_global_setup_hook and
- * usc_test_looping, which are called by marcos defined in usctest.h.
- *
- * RETURN VALUE
- * parse_opts returns a pointer to an error message if an error occurs.
- * This pointer is (char *)NULL if parsing is successful.
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-#include <errno.h>
-#include <string.h>
-#include <sys/param.h>
-#include <sys/signal.h>
-#include <sys/types.h>
-#include <sys/time.h>
-
-#ifdef __CYGWIN__
-#include <getopt.h>
-#endif
-
-
-#if UNIT_TEST
-#include <time.h>
-#endif /* UNIT_TEST */
-
-#include "test.h"
-#define _USC_LIB_ 1 /* indicates we are the library to the usctest.h include */
-#include "usctest.h"
-
-#ifndef USC_COPIES
-#define USC_COPIES "USC_COPIES"
-#endif
-
-#ifndef UNIT_TEST
-#define UNIT_TEST 0
-#endif
-
-#ifndef DEBUG
-#define DEBUG 0
-#endif
-
-/*
- * Code from usctest.h that not part of this file since we are the library.
- */
-
-struct usc_errno_t TEST_VALID_ENO[USC_MAX_ERRNO];
-
- /***********************************************************************
- * Globals for returning the return code and errno from the system call
- * test macros.
- ***********************************************************************/
-int TEST_RETURN;
-int TEST_ERRNO;
-
- /***********************************************************************
- * temporary variables for determining max and min times in TEST macro
- ***********************************************************************/
-long btime, etime, tmptime;
-
-/* The timing information block. */
-struct tblock tblock={0,((long) -1)>>1,0,0};
-
-
-/* Define flags and args for standard options */
-int STD_FUNCTIONAL_TEST=1, /* flag indicating to do functional testing code */
- STD_TIMING_ON=0, /* flag indicating to print timing stats */
- STD_PAUSE=0, /* flag indicating to pause before actual start, */
- /* for contention mode */
- STD_INFINITE=0, /* flag indciating to loop forever */
- STD_LOOP_COUNT=1, /* number of iterations */
- STD_COPIES=1, /* number of copies */
- STD_ERRNO_LOG=0; /* flag indicating to do errno logging */
-
-float STD_LOOP_DURATION=0.0, /* duration value in fractional seconds */
- STD_LOOP_DELAY=0.0; /* loop delay value in fractional seconds */
-
-
-char **STD_opt_arr = NULL; /* array of option strings */
-int STD_nopts=0, /* number of elements in STD_opt_arr */
- STD_argind=1; /* argv index to next argv element */
- /* (first argument) */
- /* To getopt users, it is like optind */
-
-/*
- * The following variables are to support system testing additions.
- */
-static int STD_TP_barrier=0; /* flag to do barrier in TEST_PAUSE */
- /* 2 - wait_barrier(), 3 - set_barrier(), * - barrier() */
-static int STD_LP_barrier=0; /* flag to do barrier in TEST_LOOPING */
- /* 2 - wait_barrier(), 3 - set_barrier(), * - barrier() */
-static int STD_TP_shmem_sz=0; /* shmalloc this many words per pe in TEST_PAUSE */
-static int STD_LD_shmem=0; /* flag to do shmem_puts and shmem_gets during delay */
-static int STD_LP_shmem=0; /* flag to do shmem_puts and gets during TEST_LOOPING */
-static int STD_LD_recfun=0; /* do recressive function calls in loop delay */
-static int STD_LP_recfun=0; /* do recressive function calls in TEST_LOOPING */
-static int STD_TP_sbrk=0; /* do sbrk in TEST_PAUSE */
-static int STD_LP_sbrk=0; /* do sbrk in TEST_LOOPING */
-static char *STD_start_break=0; /* original sbrk size */
-static int Debug=0;
-
-struct std_option_t {
- const char *optstr;
- const char *help;
- char *flag;
- char **arg;
-} std_options[] = {
- { "c:", " -c n Run n copies concurrently\n", NULL, NULL},
- { "e" , " -e Turn on errno logging\n", NULL, NULL},
- { "f" , " -f Turn off functional testing\n", NULL, NULL},
- { "h" , " -h Show this help screen\n", NULL, NULL},
- { "i:", " -i n Execute test n times\n", NULL, NULL},
- { "I:", " -I x Execute test for x seconds\n", NULL, NULL},
- { "p" , " -p Pause for SIGUSR1 before starting\n", NULL, NULL},
- { "P:", " -P x Pause for x seconds between iterations\n", NULL, NULL},
- { "t" , " -t Turn on syscall timing\n", NULL, NULL},
- {NULL, NULL, NULL, NULL}};
-
-void print_help(void (*user_help)());
-
-/*
- * Structure for usc_recressive_func argument
- */
-struct usc_bigstack_t {
- char space[4096];
-};
-
-static struct usc_bigstack_t *STD_bigstack=NULL;
-
-/*
- * Counter of errnos returned (-e option). Indexed by errno.
- * Make the array USC_MAX_ERRNO long. That is the first Fortran
- * Lib errno. No syscall should return an errno that high.
- */
-int STD_ERRNO_LIST[USC_MAX_ERRNO];
-
-/* define the string length for Mesg and Mesg2 strings */
-#define STRLEN 2048
-
-static char Mesg2[STRLEN]; /* holds possible return string */
-static void usc_recressive_func();
-
-/*
- * Define bits for options that might have env variable default
- */
-#define OPT_iteration 01
-#define OPT_nofunccheck 02
-#define OPT_duration 04
-#define OPT_delay 010
-#define OPT_copies 020
-
-
-/**********************************************************************
- * parse_opts:
- **********************************************************************/
-const char *
-parse_opts(int ac, char **av, option_t *user_optarr, void (*uhf)())
-{
- int found; /* flag to indicate that an option specified was */
- /* found in the user's list */
- int k; /* scratch integer for returns and short time usage */
- float ftmp; /* tmp float for parsing env variables */
- char *ptr; /* used in getting env variables */
- int options=0; /* no options specified */
- int optstrlen, i;
- char *optionstr;
- int opt; /* return of getopt */
-
- /*
- * If not the first time this function is called, release the old STD_opt_arr
- * vector.
- */
-
- if ( STD_opt_arr != NULL ) {
- free(STD_opt_arr);
- STD_opt_arr=NULL;
- }
- /* Calculate how much space we need for the option string */
- optstrlen = 0;
- for (i = 0; std_options[i].optstr; ++i)
- optstrlen += strlen(std_options[i].optstr);
- if (user_optarr)
- for (i = 0; user_optarr[i].option; ++i) {
- if (strlen(user_optarr[i].option) > 2)
- return "parse_opts: ERROR - Only short options are allowed";
- optstrlen += strlen(user_optarr[i].option);
- }
- optstrlen += 1;
-
- /* Create the option string for getopt */
- optionstr = (char *)malloc(optstrlen);
- if (!optionstr)
- return "parse_opts: ERROR - Could not allocate memory for optionstr";
-
- optionstr[0] = '\0';
-
- for (i = 0; std_options[i].optstr; ++i)
- strcat(optionstr, std_options[i].optstr);
- if (user_optarr)
- for (i = 0; user_optarr[i].option; ++i)
- /* only add the option if it wasn't there already */
- if (strchr(optionstr, user_optarr[i].option[0]) == NULL)
- strcat(optionstr, user_optarr[i].option);
-
-#if DEBUG > 1
- printf("STD_nopts = %d\n", STD_nopts);
-#endif
-
- /*
- * Loop through av parsing options.
- */
- while ( (opt = getopt(ac, av, optionstr)) > 0) {
-
- STD_argind = optind;
-#if DEBUG > 0
- printf("parse_opts: getopt returned '%c'\n", opt);
-#endif
-
- switch (opt) {
- case '?': /* Unknown option */
- return "Unknown option";
- break;
- case ':': /* Missing Arg */
- return "Missing argument";
- break;
- case 'i': /* Iterations */
- options |= OPT_iteration;
- STD_LOOP_COUNT = atoi(optarg);
- if (STD_LOOP_COUNT == 0) STD_INFINITE = 1;
- break;
- case 'P': /* Delay between iterations */
- options |= OPT_delay;
- STD_LOOP_DELAY = atof(optarg);
- break;
- case 'I': /* Time duration */
- options |= OPT_duration;
- STD_LOOP_DURATION = atof(optarg);
- if ( STD_LOOP_DURATION == 0.0 ) STD_INFINITE=1;
- break;
- case 'c': /* Copies */
- options |= OPT_copies;
- STD_COPIES = atoi(optarg);
- break;
- case 'f': /* Functional testing */
- STD_FUNCTIONAL_TEST = 0;
- break;
- case 'p': /* Pause for SIGUSR1 */
- STD_PAUSE = 1;
- break;
- case 't': /* syscall timing */
- STD_TIMING_ON = 1;
- break;
- case 'e': /* errno loggin */
- STD_ERRNO_LOG = 1;
- break;
- case 'h': /* Help */
- print_help(uhf);
- exit(0);
- break;
- default:
-
- /* Check all the user specified options */
- found=0;
- for(i = 0; user_optarr[i].option; ++i) {
-
- if (opt == user_optarr[i].option[0]) {
- /* Yup, This is a user option, set the flag and look for argument */
- if ( user_optarr[i].flag ) {
- *user_optarr[i].flag=1;
- }
- found++;
-
- /* save the argument at the user's location */
- if ( user_optarr[i].option[strlen(user_optarr[i].option)-1] == ':' ) {
- *user_optarr[i].arg=optarg;
- }
- break; /* option found - break out of the for loop */
- }
- }
- /* This condition "should never happen". SO CHECK FOR IT!!!! */
- if ( ! found ) {
- sprintf(Mesg2,
- "parse_opts: ERROR - option:\"%c\" NOT FOUND... INTERNAL ERROR", opt);
- return(Mesg2);
- }
- }
-
- } /* end of while */
-
- STD_argind = optind;
-
- /*
- * Turn on debug
- */
- if ( (ptr=getenv("USC_DEBUG")) != NULL ) {
- Debug=1;
- printf("env USC_DEBUG is defined, turning on debug\n");
- }
- if ( (ptr=getenv("USC_VERBOSE")) != NULL ) {
- Debug=1;
- printf("env USC_VERBOSE is defined, turning on debug\n");
- }
-
- /*
- * If the USC_ITERATION_ENV environmental variable is set to
- * a number, use that number as iteration count (same as -c option).
- * The -c option with arg will be used even if this env var is set.
- */
- if ( !(options & OPT_iteration) && (ptr=getenv(USC_ITERATION_ENV)) != NULL ) {
- if ( sscanf(ptr, "%i", &k) == 1) {
- if ( k == 0 ) { /* if arg is 0, set infinite loop flag */
- STD_INFINITE=1;
- if ( Debug )
- printf("Using env %s, set STD_INFINITE to 1\n",
- USC_ITERATION_ENV);
- } else { /* else, set the loop count to the arguement */
- STD_LOOP_COUNT=k;
- if ( Debug )
- printf("Using env %s, set STD_LOOP_COUNT to %d\n",
- USC_ITERATION_ENV, k);
- }
- }
- }
-
- /*
- * If the USC_NO_FUNC_CHECK environmental variable is set, we'll
- * unset the STD_FUNCTIONAL_TEST variable.
- */
- if ( !(options & OPT_nofunccheck) && (ptr=getenv(USC_NO_FUNC_CHECK)) != NULL ) {
- STD_FUNCTIONAL_TEST=0; /* Turn off functional testing */
- if ( Debug )
- printf("Using env %s, set STD_FUNCTIONAL_TEST to 0\n",
- USC_NO_FUNC_CHECK);
- }
-
- /*
- * If the USC_LOOP_WALLTIME environmental variable is set,
- * use that number as duration (same as -I option).
- * The -I option with arg will be used even if this env var is set.
- */
-
- if ( !(options & OPT_duration) && (ptr=getenv(USC_LOOP_WALLTIME)) != NULL ) {
- if ( sscanf(ptr, "%f", &ftmp) == 1 && ftmp >= 0.0 ) {
- STD_LOOP_DURATION=ftmp;
- if ( Debug )
- printf("Using env %s, set STD_LOOP_DURATION to %f\n",
- USC_LOOP_WALLTIME, ftmp);
- if ( STD_LOOP_DURATION == 0.0 ) { /* if arg is 0, set infinite loop flag */
- STD_INFINITE=1;
- if ( Debug )
- printf("Using env %s, set STD_INFINITE to 1\n", USC_LOOP_WALLTIME);
- }
- }
- }
- if ( !(options & OPT_duration) && (ptr=getenv("USC_DURATION")) != NULL ) {
- if ( sscanf(ptr, "%f", &ftmp) == 1 && ftmp >= 0.0 ) {
- STD_LOOP_DURATION=ftmp;
- if ( Debug )
- printf("Using env USC_DURATION, set STD_LOOP_DURATION to %f\n", ftmp);
- if ( STD_LOOP_DURATION == 0.0 ) { /* if arg is 0, set infinite loop flag */
- STD_INFINITE=1;
- if ( Debug )
- printf("Using env USC_DURATION, set STD_INFINITE to 1\n");
- }
- }
- }
- /*
- * If the USC_LOOP_DELAY environmental variable is set,
- * use that number as delay in factional seconds (same as -P option).
- * The -P option with arg will be used even if this env var is set.
- */
- if ( !(options & OPT_delay) && (ptr=getenv(USC_LOOP_DELAY)) != NULL ) {
- if ( sscanf(ptr, "%f", &ftmp) == 1 && ftmp >= 0.0 ) {
- STD_LOOP_DELAY=ftmp;
- if ( Debug )
- printf("Using env %s, set STD_LOOP_DELAY = %f\n",
- USC_LOOP_DELAY, ftmp);
- }
- }
-
- /*
- * If the USC_COPIES environmental variable is set,
- * use that number as copies (same as -c option).
- * The -c option with arg will be used even if this env var is set.
- */
- if ( !(options & OPT_copies) && (ptr=getenv(USC_COPIES)) != NULL ) {
- if ( sscanf(ptr, "%d", &STD_COPIES) == 1 && STD_COPIES >= 0 ) {
- if ( Debug )
- printf("Using env %s, set STD_COPIES = %d\n",
- USC_COPIES, STD_COPIES);
- }
- }
-
- /*
- * The following are special system testing envs to turn on special
- * hooks in the code.
- */
- if ( (ptr=getenv("USC_TP_BARRIER")) != NULL ) {
- if ( sscanf(ptr, "%i", &k) == 1 && k >= 0 ) {
- STD_TP_barrier=k;
- }
- else
- STD_TP_barrier=1;
- if ( Debug )
- printf("using env USC_TP_BARRIER, Set STD_TP_barrier to %d\n",
- STD_TP_barrier);
- }
-
- if ( (ptr=getenv("USC_LP_BARRIER")) != NULL ) {
- if ( sscanf(ptr, "%i", &k) == 1 && k >= 0 ) {
- STD_LP_barrier=k;
- }
- else
- STD_LP_barrier=1;
- if ( Debug )
- printf("using env USC_LP_BARRIER, Set STD_LP_barrier to %d\n",
- STD_LP_barrier);
- }
-
- if ( (ptr=getenv("USC_TP_SHMEM")) != NULL ) {
- if ( sscanf(ptr, "%i", &k) == 1 && k >= 0 ) {
- STD_TP_shmem_sz=k;
- if ( Debug )
- printf("Using env USC_TP_SHMEM, Set STD_TP_shmem_sz to %d\n",
- STD_TP_shmem_sz);
- }
- }
-
- if ( (ptr=getenv("USC_LP_SHMEM")) != NULL ) {
- if ( sscanf(ptr, "%i", &k) == 1 && k >= 0 ) {
- STD_LP_shmem=k;
- if ( Debug )
- printf("Using env USC_LP_SHMEM, Set STD_LP_shmem to %d\n",
- STD_LP_shmem);
- }
- }
-
- if ( (ptr=getenv("USC_LD_SHMEM")) != NULL ) {
- if ( sscanf(ptr, "%i", &k) == 1 && k >= 0 ) {
- STD_LD_shmem=k;
- if ( Debug )
- printf("Using env USC_LD_SHMEM, Set STD_LD_shmem to %d\n",
- STD_LD_shmem);
- }
- }
-
- if ( (ptr=getenv("USC_TP_SBRK")) != NULL ) {
- if ( sscanf(ptr, "%i", &k) == 1 && k >= 0 ) {
- STD_TP_sbrk=k;
- if ( Debug )
- printf("Using env USC_TP_SBRK, Set STD_TP_sbrk to %d\n",
- STD_TP_sbrk);
- }
- }
-
- if ( (ptr=getenv("USC_LP_SBRK")) != NULL ) {
- if ( sscanf(ptr, "%i", &k) == 1 && k >= 0 ) {
- STD_LP_sbrk=k;
- if ( Debug )
- printf("Using env USC_LP_SBRK, Set STD_LP_sbrk to %d\n",
- STD_LP_sbrk);
- }
- }
-
- if ( (ptr=getenv("USC_LP_RECFUN")) != NULL ) {
- if ( sscanf(ptr, "%i", &k) == 1 && k >= 0 ) {
- STD_LP_recfun=k;
- if ( STD_bigstack != (struct usc_bigstack_t *)NULL )
- STD_bigstack=(struct usc_bigstack_t *)
- malloc(sizeof(struct usc_bigstack_t));
- if ( Debug )
- printf("Using env USC_LP_RECFUN, Set STD_LP_recfun to %d\n",
- STD_LP_recfun);
- }
- }
-
- if ( (ptr=getenv("USC_LD_RECFUN")) != NULL ) {
- if ( sscanf(ptr, "%i", &k) == 1 && k >= 0 ) {
- STD_LD_recfun=k;
- if ( STD_bigstack != (struct usc_bigstack_t *)NULL )
- STD_bigstack=(struct usc_bigstack_t *)
- malloc(sizeof(struct usc_bigstack_t));
- if ( Debug )
- printf("Using env USC_LD_RECFUN, Set STD_LD_recfun to %d\n",
- STD_LD_recfun);
- }
- }
-
-#if UNIT_TEST
- printf("The following variables after option and env parsing:\n");
- printf("STD_FUNCTIONAL_TEST = %d\n", STD_FUNCTIONAL_TEST);
- printf("STD_LOOP_DURATION = %f\n", STD_LOOP_DURATION);
- printf("STD_LOOP_DELAY = %f\n", STD_LOOP_DELAY);
- printf("STD_COPIES = %d\n", STD_COPIES);
- printf("STD_LOOP_COUNT = %d\n", STD_LOOP_COUNT);
- printf("STD_INFINITE = %d\n", STD_INFINITE);
- printf("STD_TIMING_ON = %d\n", STD_TIMING_ON);
- printf("STD_ERRNO_LOG = %d\n", STD_ERRNO_LOG);
- printf("STD_PAUSE = %d\n", STD_PAUSE);
-#endif
-
- return((char *) NULL);
-
-} /* end of parse_opts */
-
-/*********************************************************************
- * print_help() - print help message and user help message
- *********************************************************************/
-void print_help(void (*user_help)())
-{
- STD_opts_help();
-
- if (user_help) user_help();
-}
-
-/*********************************************************************
- * STD_opts_help() - return a help string for the STD_OPTIONS.
- *********************************************************************/
-void
-STD_opts_help()
-{
- int i;
-
- for(i = 0; std_options[i].optstr; ++i) {
- if (std_options[i].help)
- printf(std_options[i].help);
- }
-}
-
-/*
- * routine to goto when we get the SIGUSR1 for STD_PAUSE
- */
-void STD_go(int sig)
-{
- return;
-}
-
-/***********************************************************************
- * This function will do desired end of global setup test
- * hooks.
- * Currently it will only do a pause waiting for sigusr1 if
- * STD_PAUSE is set.
- *
- ***********************************************************************/
-int
-usc_global_setup_hook()
-{
- int cnt;
- /* temp variable to store old signal action to be restored after pause */
- int (*_TMP_FUNC)(void);
-
- /*
- * Fork STD_COPIES-1 copies.
- */
- for(cnt=1;cnt<STD_COPIES;cnt++) {
- switch(fork() ) {
- case -1:
- fprintf(stderr, "%s: fork() failed, errno:%d %s\n",
- __FILE__, errno, strerror(errno));
- break;
- case 0: /* child */
- cnt=STD_COPIES; /* to stop the forking */
- break;
-
- default: /* parent */
- break;
- }
- }
-
- /*
- * pause waiting for sigusr1.
- */
- if ( STD_PAUSE ) {
- _TMP_FUNC = (int (*)())signal(SIGUSR1, STD_go);
- pause();
- signal(SIGUSR1, (void (*)())_TMP_FUNC);
- }
-
-
- if ( STD_TP_sbrk || STD_LP_sbrk) {
- STD_start_break=sbrk(0); /* get original sbreak size */
- }
-
- if ( STD_TP_sbrk ) {
- sbrk(STD_TP_sbrk);
- if ( Debug )
- printf("after sbrk(%d)\n", STD_TP_sbrk);
- }
- return 0;
-}
-
-#define USECS_PER_SEC 1000000 /* microseconds per second */
-
-/***********************************************************************
- * This function returns the number of get_current_time()'s return
- * per second.
- ***********************************************************************/
-
-static int
-get_timepersec()
-{
- return USECS_PER_SEC; /* microseconds per second */
-
-}
-
-/***********************************************************************
- * this function will get current time in microseconds since 1970.
- ***********************************************************************/
-static int
-get_current_time()
-{
- struct timeval curtime;
-
- gettimeofday(&curtime, NULL);
-
- /* microseconds since 1970 */
- return (curtime.tv_sec*USECS_PER_SEC) + curtime.tv_usec;
-
-
-}
-
-/***********************************************************************
- *
- * This function will determine if test should continue iterating
- * If the STD_INFINITE flag is set, return 1.
- * If the STD_LOOP_COUNT variable is set, compare it against
- * the counter.
- * If the STD_LOOP_DURATION variable is set, compare current time against
- * calculated stop_time.
- * This function will return 1 until all desired looping methods
- * have been met.
- *
- * counter integer is supplied by the user program.
- ***********************************************************************/
-int
-usc_test_looping(counter)
-int counter;
-{
- static int first_time = 1;
- static int stop_time = 0; /* stop time in rtc or usecs */
- static int delay; /* delay in clocks or usecs */
- int hz=0; /* clocks per second or usecs per second */
- int ct, end; /* current time, end delay time */
- int keepgoing=0; /* used to determine return value */
-
- /*
- * If this is the first iteration and we are looping for
- * duration of STD_LOOP_DURATION seconds (fractional) or
- * doing loop delays, get the clocks per second.
- */
- if ( first_time ) {
-
- first_time=0;
- if ( STD_LOOP_DELAY || STD_LOOP_DURATION ) {
- hz = get_timepersec();
- }
-
- /*
- * If looping for duration, calculate stop time in
- * clocks.
- */
-
- if ( STD_LOOP_DURATION) {
- ct=get_current_time();
- stop_time=(int)((float)hz * STD_LOOP_DURATION) + ct;
- }
-
- /*
- * If doing delay each iteration, calcuate the number
- * of clocks for each delay.
- */
- if ( STD_LOOP_DELAY ) {
- delay=(int)((float)hz * STD_LOOP_DELAY);
- }
-
- }
-
- /*
- * if delay each iteration, loop for delay clocks.
- * This will not be done on first iteration.
- * The delay will happen before determining if
- * there will be another iteration.
- */
- else if ( STD_LOOP_DELAY ) {
- ct=get_current_time();
- end=ct+delay;
- while ( ct < end ) {
- /*
- * The following are special test hooks in the delay loop.
- */
- if ( STD_LD_recfun ) {
- if ( Debug )
- printf("calling usc_recressive_func(0, %d, &STD_bigstack)\n",
- STD_LD_recfun);
- usc_recressive_func(0, STD_LD_recfun, &STD_bigstack);
- }
-
- ct=get_current_time();
- }
- }
-
- if ( STD_INFINITE ) {
- keepgoing++;
- }
-
- if ( STD_LOOP_COUNT && counter < STD_LOOP_COUNT ) {
- keepgoing++;
- }
-
- if ( STD_LOOP_DURATION != 0.0 && get_current_time() < stop_time ) {
- keepgoing++;
- }
-
- if ( keepgoing == 0 )
- return 0;
-
- /*
- * The following code allows special system testing hooks.
- */
-
- if ( STD_LP_recfun ) {
- if ( Debug )
- printf("calling usc_recressive_func(0, %d, &STD_bigstack)\n",
- STD_LP_recfun);
- usc_recressive_func(0, STD_LP_recfun, &STD_bigstack);
- }
-
- if ( STD_LP_sbrk ) {
- if ( Debug )
- printf("about to do sbrk(%d)\n", STD_LP_sbrk);
- sbrk(STD_LP_sbrk);
- }
-
-
- if ( keepgoing )
- return 1;
- else
- return 0; /* done - stop iterating */
-}
-
-
-/*
- * This function recressively calls itself max times.
- */
-static void
-usc_recressive_func(cnt, max, bstack)
-int cnt;
-int max;
-struct usc_bigstack_t bstack;
-{
- if ( cnt < max )
- usc_recressive_func(cnt+1, max, bstack);
-
-}
-
-#if UNIT_TEST
-/******************************************************************************
- * UNIT TEST CODE
- * UNIT TEST CODE
- *
- * this following code is provide so that unit testing can
- * be done fairly easily.
- ******************************************************************************/
-
-int Help = 0;
-int Help2 = 0;
-char *ptr;
-
-
-
-/* for test specific parse_opts options */
-option_t Options[] = {
- { "help", &Help2, NULL }, /* -help option */
- { "h", &Help, NULL }, /* -h option */
- { TIMING, NULL, NULL}, /* disable -timing option */
-
-#if INVALID_TEST_CASES
- { "missingflag", NULL, &ptr }, /* error */
- { "missingarg:", &Help, NULL }, /* error */
-#endif /* INVALID_TEST_CASES */
-
- { NULL, NULL, NULL }
-};
-
-
-main(argc, argv)
-int argc;
-char **argv;
-{
- int lc;
- char *msg;
- struct timeval t;
- int cnt;
-
- if ( (msg=parse_opts(argc, argv,
- (option_t *) Options)) != (char *) NULL ) {
- printf("ERROR : %s\n", msg);
- exit(1);
- }
-
- TEST_PAUSE;
-
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- TEST( gettimeofday(&t, NULL) );
- printf("iter=%d: sec:%d, usec:%6.6d %s", lc+1, t.tv_sec,
- t.tv_usec, ctime(&t.tv_sec));
- }
-
-
- TEST_CLEANUP;
-
- exit(0);
-}
-
-#endif /* UNIT_TEST */
diff --git a/winsup/testsuite/libltp/lib/pattern.c b/winsup/testsuite/libltp/lib/pattern.c
deleted file mode 100644
index 7f4d587..0000000
--- a/winsup/testsuite/libltp/lib/pattern.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-#include <string.h>
-#include "pattern.h"
-
-/*
- * The routines in this module are used to fill/check a data buffer
- * with/against a known pattern.
- */
-
-int
-pattern_check(buf, buflen, pat, patlen, patshift)
-char *buf;
-int buflen;
-char *pat;
-int patlen;
-int patshift;
-{
- int nb, ncmp, nleft;
- char *cp;
-
- if (patlen)
- patshift = patshift % patlen;
-
- cp = buf;
- nleft = buflen;
-
- /*
- * The following 2 blocks of code are to compare the first patlen
- * bytes of buf. We need 2 checks if patshift is > 0 since we
- * must check the last (patlen - patshift) bytes, and then the
- * first (patshift) bytes.
- */
-
- nb = patlen - patshift;
- if (nleft < nb) {
- return (memcmp(cp, pat + patshift, nleft) ? -1 : 0);
- } else {
- if (memcmp(cp, pat + patshift, nb))
- return -1;
-
- nleft -= nb;
- cp += nb;
- }
-
- if (patshift > 0) {
- nb = patshift;
- if (nleft < nb) {
- return (memcmp(cp, pat, nleft) ? -1 : 0);
- } else {
- if (memcmp(cp, pat, nb))
- return -1;
-
- nleft -= nb;
- cp += nb;
- }
- }
-
- /*
- * Now, verify the rest of the buffer using the algorithm described
- * in the function header.
- */
-
- ncmp = cp - buf;
- while (ncmp < buflen) {
- nb = (ncmp < nleft) ? ncmp : nleft;
- if (memcmp(buf, cp, nb))
- return -1;
-
- cp += nb;
- ncmp += nb;
- nleft -= nb;
- }
-
- return 0;
-}
-
-int
-pattern_fill(buf, buflen, pat, patlen, patshift)
-char *buf;
-int buflen;
-char *pat;
-int patlen;
-int patshift;
-{
- int trans, ncopied, nleft;
- char *cp;
-
- if (patlen)
- patshift = patshift % patlen;
-
- cp = buf;
- nleft = buflen;
-
- /*
- * The following 2 blocks of code are to fill the first patlen
- * bytes of buf. We need 2 sections if patshift is > 0 since we
- * must first copy the last (patlen - patshift) bytes into buf[0]...,
- * and then the first (patshift) bytes of pattern following them.
- */
-
- trans = patlen - patshift;
- if (nleft < trans) {
- memcpy(cp, pat + patshift, nleft);
- return 0;
- } else {
- memcpy(cp, pat + patshift, trans);
- nleft -= trans;
- cp += trans;
- }
-
- if (patshift > 0) {
- trans = patshift;
- if (nleft < trans) {
- memcpy(cp, pat, nleft);
- return 0;
- } else {
- memcpy(cp, pat, trans);
- nleft -= trans;
- cp += trans;
- }
- }
-
- /*
- * Now, fill the rest of the buffer using the algorithm described
- * in the function header comment.
- */
-
- ncopied = cp - buf;
- while (ncopied < buflen) {
- trans = (ncopied < nleft) ? ncopied : nleft;
- memcpy(cp, buf, trans);
- cp += trans;
- ncopied += trans;
- nleft -= trans;
- }
-
- return(0);
-}
diff --git a/winsup/testsuite/libltp/lib/rmobj.c b/winsup/testsuite/libltp/lib/rmobj.c
deleted file mode 100644
index 63122c4..0000000
--- a/winsup/testsuite/libltp/lib/rmobj.c
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-
-/* $Id$ */
-
-/**********************************************************
- *
- * OS Testing - Silicon Graphics, Inc.
- *
- * FUNCTION NAME : rmobj()
- *
- * FUNCTION TITLE : Remove an object
- *
- * SYNOPSIS:
- * int rmobj(char *obj, char **errmsg)
- *
- * AUTHOR : Kent Rogers
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * USER DESCRIPTION
- * This routine will remove the specified object. If the specified
- * object is a directory, it will recursively remove the directory
- * and everything underneath it. It assumes that it has privilege
- * to remove everything that it tries to remove. If rmobj() encounters
- * any problems, and errmsg is not NULL, errmsg is set to point to a
- * string explaining the error.
- *
- * DETAILED DESCRIPTION
- * Allocate space for the directory and its contents
- * Open the directory to get access to what is in it
- * Loop through the objects in the directory:
- * If the object is not "." or "..":
- * Determine the file type by calling lstat()
- * If the object is not a directory:
- * Remove the object with unlink()
- * Else:
- * Call rmobj(object) to remove the object's contents
- * Determine the link count on object by calling lstat()
- * If the link count >= 3:
- * Remove the directory with unlink()
- * Else
- * Remove the directory with rmdir()
- * Close the directory and free the pointers
- *
- * RETURN VALUE
- * If there are any problems, rmobj() will set errmsg (if it was not
- * NULL) and return -1. Otherwise it will return 0.
- *
- ************************************************************/
-#include <errno.h> /* for errno */
-#include <stdio.h> /* for NULL */
-#include <stdlib.h> /* for malloc() */
-#include <string.h> /* for string function */
-#include <limits.h> /* for PATH_MAX */
-#include <sys/types.h> /* for opendir(), readdir(), closedir(), stat() */
-#include <sys/stat.h> /* for [l]stat() */
-#include <dirent.h> /* for opendir(), readdir(), closedir() */
-#include <unistd.h> /* for rmdir(), unlink() */
-#include "rmobj.h"
-
-#define SYSERR strerror(errno)
-
-int
-rmobj(char *obj, char **errmsg)
-{
- int ret_val = 0; /* return value from this routine */
- DIR *dir; /* pointer to a directory */
- struct dirent *dir_ent; /* pointer to directory entries */
- char dirobj[PATH_MAX]; /* object inside directory to modify */
- struct stat statbuf; /* used to hold stat information */
- static char err_msg[1024]; /* error message */
-
- /* Determine the file type */
- if ( lstat(obj, &statbuf) < 0 ) {
- if ( errmsg != NULL ) {
- sprintf(err_msg, "lstat(%s) failed; errno=%d: %s",
- obj, errno, SYSERR);
- *errmsg = err_msg;
- }
- return -1;
- }
-
- /* Take appropriate action, depending on the file type */
- if ( (statbuf.st_mode & S_IFMT) == S_IFDIR ) {
- /* object is a directory */
-
- /* Do NOT perform the request if the directory is "/" */
- if ( !strcmp(obj, "/") ) {
- if ( errmsg != NULL ) {
- sprintf(err_msg, "Cannot remove /");
- *errmsg = err_msg;
- }
- return -1;
- }
-
- /* Open the directory to get access to what is in it */
- if ( (dir = opendir(obj)) == NULL ) {
- if ( rmdir(obj) != 0 ) {
- if ( errmsg != NULL ) {
- sprintf(err_msg, "rmdir(%s) failed; errno=%d: %s",
- obj, errno, SYSERR);
- *errmsg = err_msg;
- }
- return -1;
- } else {
- return 0;
- }
- }
-
- /* Loop through the entries in the directory, removing each one */
- for ( dir_ent = (struct dirent *)readdir(dir);
- dir_ent != NULL;
- dir_ent = (struct dirent *)readdir(dir)) {
-
- /* Don't remove "." or ".." */
- if ( !strcmp(dir_ent->d_name, ".") || !strcmp(dir_ent->d_name, "..") )
- continue;
-
- /* Recursively call this routine to remove the current entry */
- sprintf(dirobj, "%s/%s", obj, dir_ent->d_name);
- if ( rmobj(dirobj, errmsg) != 0 )
- ret_val = -1;
- }
-
- /* Close the directory */
- closedir(dir);
-
- /* If there were problems removing an entry, don't attempt to
- remove the directory itself */
- if ( ret_val == -1 )
- return -1;
-
- /* Get the link count, now that all the entries have been removed */
- if ( lstat(obj, &statbuf) < 0 ) {
- if ( errmsg != NULL ) {
- sprintf(err_msg, "lstat(%s) failed; errno=%d: %s",
- obj, errno, SYSERR);
- *errmsg = err_msg;
- }
- return -1;
- }
-
- /* Remove the directory itself */
- if ( statbuf.st_nlink >= 3 ) {
- /* The directory is linked; unlink() must be used */
- if ( unlink(obj) < 0 ) {
- if ( errmsg != NULL ) {
- sprintf(err_msg, "unlink(%s) failed; errno=%d: %s",
- obj, errno, SYSERR);
- *errmsg = err_msg;
- }
- return -1;
- }
- } else {
- /* The directory is not linked; rmdir() can be used */
- if ( rmdir(obj) < 0 ) {
- if ( errmsg != NULL ) {
- sprintf(err_msg, "rmdir(%s) failed; errno=%d: %s",
- obj, errno, SYSERR);
- *errmsg = err_msg;
- }
- return -1;
- }
- }
- } else {
- /* object is not a directory; just use unlink() */
- if ( unlink(obj) < 0 ) {
- if ( errmsg != NULL ) {
- sprintf(err_msg, "unlink(%s) failed; errno=%d: %s",
- obj, errno, SYSERR);
- *errmsg = err_msg;
- }
- return -1;
- }
- } /* if obj is a directory */
-
- /*
- * Everything must have went ok.
- */
- return 0;
-} /* rmobj() */
diff --git a/winsup/testsuite/libltp/lib/search_path.c b/winsup/testsuite/libltp/lib/search_path.c
deleted file mode 100644
index 775c7b1..0000000
--- a/winsup/testsuite/libltp/lib/search_path.c
+++ /dev/null
@@ -1,249 +0,0 @@
-/*
- * (C) COPYRIGHT CRAY RESEARCH, INC.
- * UNPUBLISHED PROPRIETARY INFORMATION.
- * ALL RIGHTS RESERVED.
- */
-/**********************************************************
- *
- * UNICOS Feature Test and Evaluation - Cray Research, Inc.
- *
- * FUNCTION NAME : search_path
- *
- * FUNCTION TITLE : search PATH locations for desired filename
- *
- * SYNOPSIS:
- * int search_path(cmd, res_path, access_mode, fullpath)
- * char *cmd;
- * char *res_path;
- * int access_mode;
- * int fullpath;
- *
- * AUTHOR : Richard Logan
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * DESCRIPTION
- * Search_path will walk through PATH and attempt to find "cmd". If cmd is
- * a full or relative path, it is checked but PATH locations are not scanned.
- * search_path will put the resulting path in res_path. It is assumed
- * that res_path points to a string that is at least PATH_MAX
- * (or MAXPATHLEN on the suns) in size. Access_mode is just as is
- * says, the mode to be used on access to determine if cmd can be found.
- * If fullpath is set, res_path will contain the full path to cmd.
- * If it is not set, res_path may or may not contain the full path to cmd.
- * If fullpath is not set, the path in PATH prepended to cmd is used,
- * which could be a relative path. If fullpath is set, the current
- * directory is prepended to path/cmd before access is called.
- * If cmd is found, search_path will return 0. If cmd cannot be
- * found, 1 is returned. If an error has occurred, -1 is returned
- * and an error mesg is placed in res_path.
- * If the length of path/cmd is larger then PATH_MAX, then that path
- * location is skipped.
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/errno.h>
-#include <sys/param.h>
-#include <sys/stat.h>
-
-extern int errno;
-
-struct stat stbuf;
-
-#ifndef AS_CMD
-#define AS_CMD 0
-#endif
-
-/*
- * Make sure PATH_MAX is defined. Define it to MAXPATHLEN, if set. Otherwise
- * set it to 1024.
- */
-#ifndef PATH_MAX
-#ifndef MAXPATHLEN
-#define PATH_MAX 1024
-#else /* MAXPATHLEN */
-#define PATH_MAX MAXPATHLEN
-#endif /* MAXPATHLEN */
-#endif /* PATH_MAX */
-
-
-#if AS_CMD
-main(argc, argv)
-int argc;
-char **argv;
-{
- char path[PATH_MAX];
- int ind;
-
- if (argc <= 1 ) {
- printf("missing argument\n");
- exit(1);
- }
-
- for(ind=1;ind < argc; ind++) {
- if ( search_path(argv[ind], path, F_OK, 0) < 0 ) {
- printf("ERROR: %s\n", path);
- }
- else {
- printf("path of %s is %s\n", argv[ind], path);
- }
- }
-
-}
-
-#endif
-
-/*
- */
-int
-search_path(cmd, res_path, access_mode, fullpath)
-const char *cmd; /* The requested filename */
-char *res_path; /* The resulting path or error mesg */
-int access_mode; /* the mode used by access(2) */
-int fullpath; /* if set, cwd will be prepended to all non-full paths */
-{
- char *cp; /* used to scan PATH for directories */
- int ret; /* return value from access */
- char *pathenv;
- char tmppath[PATH_MAX];
- char curpath[PATH_MAX];
- char *path;
- int lastpath;
- int toolong=0;
-
-#if DEBUG
-printf("search_path: cmd = %s, access_mode = %d, fullpath = %d\n", cmd, access_mode, fullpath);
-#endif
-
- /*
- * full or relative path was given
- */
- if ( (cmd[0] == '/') || ( (cp=strchr(cmd, '/')) != NULL )) {
- if ( access(cmd, access_mode) == 0 ) {
-
- if ( cmd[0] != '/' ) { /* relative path */
- if ( getcwd(curpath, PATH_MAX) == NULL ) {
- strcpy(res_path, curpath);
- return -1;
- }
- if ( (strlen(curpath) + strlen(cmd) + 1) > (size_t)PATH_MAX ) {
- sprintf(res_path, "cmd (as relative path) and cwd is longer than %d",
- PATH_MAX);
- return -1;
- }
- sprintf(res_path, "%s/%s", curpath, cmd);
- }
- else
- strcpy(res_path, cmd);
- return 0;
- }
- else {
- sprintf(res_path, "file %s not found", cmd);
- return -1;
- }
- }
-
- /* get the PATH variable */
- if ( (pathenv=getenv("PATH")) == NULL) {
- /* no path to scan, return */
- sprintf(res_path, "Unable to get PATH env. variable");
- return -1;
- }
-
- /*
- * walk through each path in PATH.
- * Each path in PATH is placed in tmppath.
- * pathenv cannot be modified since it will affect PATH.
- * If a signal came in while we have modified the PATH
- * memory, we could create a problem for the caller.
- */
-
- curpath[0]='\0';
-
- cp = pathenv;
- path = pathenv;
- lastpath = 0;
- for (;;) {
-
- if ( lastpath )
- break;
-
- if ( cp != pathenv )
- path = ++cp; /* already set on first iteration */
-
- /* find end of current path */
-
- for (; ((*cp != ':') && (*cp != '\0')); cp++);
-
- /*
- * copy path to tmppath so it can be NULL terminated
- * and so we do not modify path memory.
- */
- strncpy(tmppath, path, (cp-path) );
- tmppath[cp-path]='\0';
-#if DEBUG
-printf("search_path: tmppath = %s\n", tmppath);
-#endif
-
- if ( *cp == '\0' )
- lastpath=1; /* this is the last path entry */
-
- /* Check lengths so not to overflow res_path */
- if ( strlen(tmppath) + strlen(cmd) + 2 > (size_t)PATH_MAX ) {
- toolong++;
- continue;
- }
-
- sprintf(res_path, "%s/%s", tmppath, cmd);
-#if DEBUG
-printf("search_path: res_path = '%s'\n", res_path);
-#endif
-
-
- /* if the path is not full at this point, prepend the current
- * path to get the full path.
- * Note: this could not be wise to do when under a protected
- * directory.
- */
-
- if ( fullpath && res_path[0] != '/' ) { /* not a full path */
- if ( curpath[0] == '\0' ) {
- if ( getcwd(curpath, PATH_MAX) == NULL ) {
- strcpy(res_path, curpath);
- return -1;
- }
- }
- if ( (strlen(curpath) + strlen(res_path) + 2) > (size_t)PATH_MAX ) {
- toolong++;
- continue;
- }
- sprintf(tmppath, "%s/%s", curpath, res_path);
- strcpy(res_path, tmppath);
-#if DEBUG
-printf("search_path: full res_path= '%s'\n", res_path);
-#endif
-
- }
-
-
- if ( (ret=access(res_path, access_mode)) == 0 ) {
-#if DEBUG
-printf("search_path: found res_path = %s\n", res_path);
-#endif
- return 0;
- }
- }
-
- /* return failure */
- if ( toolong )
- sprintf(res_path,
- "Unable to find file, %d path/file strings were too long", toolong);
- else
- strcpy(res_path, "Unable to find file");
- return 1; /* not found */
-}
-
diff --git a/winsup/testsuite/libltp/lib/str_to_bytes.c b/winsup/testsuite/libltp/lib/str_to_bytes.c
deleted file mode 100644
index beecb71..0000000
--- a/winsup/testsuite/libltp/lib/str_to_bytes.c
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-#include <stdio.h>
-#include <sys/param.h>
-#include "str_to_bytes.h"
-
-/****************************************************************************
- * str_to_bytes(s)
- *
- * Computes the number of bytes described by string s. s is assumed to be
- * a base 10 positive (ie. >= 0) number followed by an optional single
- * character multiplier. The following multipliers are supported:
- *
- * char mult
- * -----------------
- * b BSIZE or BBSIZE
- * k 1024 bytes
- * K 1024 * sizeof(long)
- * m 2^20 (1048576)
- * M 2^20 (1048576 * sizeof(long)
- * g 2^30 (1073741824)
- * G 2^30 (1073741824) * sizeof(long)
- *
- * for instance, "1k" and "1024" would both cause str_to_bytes to return 1024.
- *
- * Returns -1 if mult is an invalid character, or if the integer portion of
- * s is not a positive integer.
- *
- ****************************************************************************/
-
-#if CRAY
-#define B_MULT BSIZE /* block size */
-#elif sgi
-#define B_MULT BBSIZE /* block size */
-#elif linux
-#define B_MULT DEV_BSIZE /* block size */
-#elif __CYGWIN__
-#include <sys/stat.h>
-#define B_MULT S_BLKSIZE /* block size */
-#endif
-
-
-#define K_MULT 1024 /* Kilo or 2^10 */
-#define M_MULT 1048576 /* Mega or 2^20 */
-#define G_MULT 1073741824 /* Giga or 2^30 */
-#define T_MULT 1099511627776 /* tera or 2^40 */
-
-int
-str_to_bytes(s)
-char *s;
-{
- char mult, junk;
- int nconv;
- float num;
-
- nconv = sscanf(s, "%f%c%c", &num, &mult, &junk);
- if (nconv == 0 || nconv == 3 )
- return -1;
-
- if (nconv == 1)
- return num;
-
- switch (mult) {
- case 'b':
- return (int)(num * (float)B_MULT);
- case 'k':
- return (int)(num * (float)K_MULT);
- case 'K':
- return (int)((num * (float)K_MULT) * sizeof(long));
- case 'm':
- return (int)(num * (float)M_MULT);
- case 'M':
- return (int)((num * (float)M_MULT) * sizeof(long));
- case 'g':
- return (int)(num * (float)G_MULT);
- case 'G':
- return (int)((num * (float)G_MULT) * sizeof(long));
- default:
- return -1;
- }
-}
-
-long
-str_to_lbytes(s)
-char *s;
-{
- char mult, junk;
- long nconv;
- float num;
-
- nconv = sscanf(s, "%f%c%c", &num, &mult, &junk);
- if (nconv == 0 || nconv == 3 )
- return -1;
-
- if (nconv == 1)
- return (long)num;
-
- switch (mult) {
- case 'b':
- return (long)(num * (float)B_MULT);
- case 'k':
- return (long)(num * (float)K_MULT);
- case 'K':
- return (long)((num * (float)K_MULT) * sizeof(long));
- case 'm':
- return (long)(num * (float)M_MULT);
- case 'M':
- return (long)((num * (float)M_MULT) * sizeof(long));
- case 'g':
- return (long)(num * (float)G_MULT);
- case 'G':
- return (long)((num * (float)G_MULT) * sizeof(long));
- default:
- return -1;
- }
-}
-
-/*
- * Force 64 bits number when compiled as 32 IRIX binary.
- * This allows for a number bigger than 2G.
- */
-
-long long
-str_to_llbytes(s)
-char *s;
-{
- char mult, junk;
- long nconv;
- double num;
-
- nconv = sscanf(s, "%lf%c%c", &num, &mult, &junk);
- if (nconv == 0 || nconv == 3 )
- return -1;
-
- if (nconv == 1)
- return (long long)num;
-
- switch (mult) {
- case 'b':
- return (long long)(num * (float)B_MULT);
- case 'k':
- return (long long)(num * (float)K_MULT);
- case 'K':
- return (long long)((num * (float)K_MULT) * sizeof(long long));
- case 'm':
- return (long long)(num * (float)M_MULT);
- case 'M':
- return (long long)((num * (float)M_MULT) * sizeof(long long));
- case 'g':
- return (long long)(num * (float)G_MULT);
- case 'G':
- return (long long)((num * (float)G_MULT) * sizeof(long long));
- default:
- return -1;
- }
-}
-
-#ifdef UNIT_TEST
-
-main(int argc, char **argv)
-{
- int ind;
-
- if (argc == 1 ) {
- fprintf(stderr, "missing str_to_bytes() parameteres\n");
- exit(1);
- }
-
- for (ind=1; ind<argc; ind++) {
-
- printf("str_to_bytes(%s) returned %d\n",
- argv[ind], str_to_bytes(argv[ind]));
-
- printf("str_to_lbytes(%s) returned %ld\n",
- argv[ind], str_to_lbytes(argv[ind]));
-
- printf("str_to_llbytes(%s) returned %lld\n",
- argv[ind], str_to_llbytes(argv[ind]));
- }
-}
-
-#endif
diff --git a/winsup/testsuite/libltp/lib/string_to_tokens.c b/winsup/testsuite/libltp/lib/string_to_tokens.c
deleted file mode 100644
index 6f0d775..0000000
--- a/winsup/testsuite/libltp/lib/string_to_tokens.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-/**********************************************************
- *
- * OS Testing - Silicon Graphics, Inc.
- *
- * FUNCTION NAME : string_to_tokens
- *
- * FUNCTION TITLE : Break a string into its tokens
- *
- * SYNOPSIS:
- *
- * int string_to_tokens(arg_string, arg_array, array_size, separator)
- * char *arg_string;
- * char *arg_array[];
- * int array_size;
- * char *separator;
- *
- * AUTHOR : Richard Logan
- *
- * DATE : 10/94
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * DESCRIPTION
- * This function parses the string 'arg_string', placing pointers to
- * the 'separator' separated tokens into the elements of 'arg_array'.
- * The array is terminated with a null pointer.
- * 'arg_array' must contains at least 'array_size' elements.
- * Only the first 'array_size' minus one tokens will be placed into
- * 'arg_array'. If there are more than 'array_size'-1 tokens, the rest are
- * ignored by this routine.
- *
- * RETURN VALUE
- * This function returns the number of 'separator' separated tokens that
- * were found in 'arg_string'.
- * If 'arg_array' or 'separator' is NULL or 'array_size' is less than 2, -1 is returned.
- *
- * WARNING
- * This function uses strtok() to parse 'arg_string', and thus
- * physically alters 'arg_string' by placing null characters where the
- * separators originally were.
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-#include <stdio.h>
-#include <string.h> /* for string functions */
-#include "string_to_tokens.h"
-
-int
-string_to_tokens(char *arg_string, char *arg_array[], int array_size, char *separator)
-{
- int num_toks = 0; /* number of tokens found */
- char *strtok();
-
- if ( arg_array == NULL || array_size <= 1 || separator == NULL )
- return -1;
-
- /*
- * Use strtok() to parse 'arg_string', placing pointers to the
- * individual tokens into the elements of 'arg_array'.
- */
- if ( (arg_array[num_toks] = strtok(arg_string, separator)) == NULL ) {
- return 0;
- }
-
- for (num_toks=1;num_toks<array_size; num_toks++) {
- if ( (arg_array[num_toks] = strtok(NULL, separator)) == NULL )
- break;
- }
-
- if ( num_toks == array_size )
- arg_array[num_toks] = NULL;
-
- /*
- * Return the number of tokens that were found in 'arg_string'.
- */
- return(num_toks);
-
-} /* end of string_to_tokens */
diff --git a/winsup/testsuite/libltp/lib/tst_res.c b/winsup/testsuite/libltp/lib/tst_res.c
deleted file mode 100644
index 99767ec..0000000
--- a/winsup/testsuite/libltp/lib/tst_res.c
+++ /dev/null
@@ -1,960 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-
-
-/* $Id$ */
-
-/**********************************************************
- *
- * OS Testing - Silicon Graphics, Inc.
- *
- * FUNCTION NAME :
- * tst_res() - Print result message (include file contents)
- * tst_resm() - Print result message
- * tst_brk() - Print result message (include file contents)
- * and break remaining test cases
- * tst_brkm() - Print result message and break remaining test
- * cases
- * tst_brkloop() - Print result message (include file contents)
- * and break test cases remaining in current loop
- * tst_brkloopm() - Print result message and break test case
- * remaining in current loop
- * tst_flush() - Print any messages pending because of
- * CONDENSE mode, and flush output stream
- * tst_exit() - Exit test with a meaningful exit value.
- * tst_environ() - Keep results coming to original stdout
- *
- * FUNCTION TITLE : Standard automated test result reporting mechanism
- *
- * SYNOPSIS:
- * #include "test.h"
- *
- * void tst_res(ttype, fname, tmesg [,arg]...)
- * int ttype;
- * char *fname;
- * char *tmesg;
- *
- * void tst_resm(ttype, tmesg [,arg]...)
- * int ttype;
- * char *tmesg;
- *
- * void tst_brk(ttype, fname, cleanup, tmesg, [,argv]...)
- * int ttype;
- * char *fname;
- * void (*cleanup)();
- * char *tmesg;
- *
- * void tst_brkm(ttype, cleanup, tmesg [,arg]...)
- * int ttype;
- * void (*cleanup)();
- * char *tmesg;
- *
- * void tst_brkloop(ttype, fname, cleanup, char *tmesg, [,argv]...)
- * int ttype;
- * char *fname;
- * void (*cleanup)();
- * char *tmesg;
- *
- * void tst_brkloopm(ttype, cleanup, tmesg [,arg]...)
- * int ttype;
- * void (*cleanup)();
- * char *tmesg;
- *
- * void tst_flush()
- *
- * void tst_exit()
- *
- * int tst_environ()
- *
- * AUTHOR : Kent Rogers (from Dave Fenner's original)
- *
- * CO-PILOT : Rich Logan
- *
- * DATE STARTED : 05/01/90 (rewritten 1/96)
- *
- * DESCRIPTION
- * See the man page(s).
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-#include <errno.h>
-#include <stdarg.h> /* for varargs stuff */
-#include "test.h" /* for output display mode & result type */
- /* defines */
-
-/*
- * Define some useful macros.
- */
-#define VERBOSE 1 /* flag values for the T_mode variable */
-#define CONDENSE 2
-#define NOPASS 3
-#define DISCARD 4
-
-#define MAXMESG 80 /* max length of internal messages */
-#define USERMESG 2048 /* max length of user message */
-#define TRUE 1
-#define FALSE 0
-
-/*
- * EXPAND_VAR_ARGS - Expand the variable portion (arg_fmt) of a result
- * message into the specified string.
- */
-#define EXPAND_VAR_ARGS(arg_fmt, str) { \
- va_list ap; /* varargs mechanism */ \
- \
- if ( arg_fmt != NULL ) { \
- if ( Expand_varargs == TRUE ) { \
- va_start(ap, arg_fmt); \
- vsprintf(str, arg_fmt, ap); \
- va_end(ap); \
- Expand_varargs = FALSE; \
- } else { \
- strcpy(str, arg_fmt); \
- } \
- } else { \
- str[0] = '\0'; \
- } \
-} /* EXPAND_VAR_ARGS() */
-
-/*
- * Define local function prototypes.
- */
-static void check_env();
-static void tst_condense(int tnum, int ttype, char *tmesg);
-static void tst_print(char *tcid, int tnum, int trange, int ttype, const char *tmesg);
-static void cat_file(const char *filename);
-
-
-/*
- * Define some static/global variables.
- */
-static FILE *T_out = NULL; /* tst_res() output file descriptor */
-static const char *File; /* file whose contents is part of result */
-static int T_exitval = 0; /* exit value used by tst_exit() */
-static int T_mode = VERBOSE; /* flag indicating print mode: VERBOSE, */
- /* CONDENSE, NOPASS, DISCARD */
-
-static int Expand_varargs = TRUE; /* if TRUE, expand varargs stuff */
-static char Warn_mesg[MAXMESG]; /* holds warning messages */
-
-/*
- * These are used for condensing output when NOT in verbose mode.
- */
-static int Buffered = FALSE; /* TRUE if condensed output is currently */
- /* buffered (i.e. not yet printed) */
-static char *Last_tcid; /* previous test case id */
-static int Last_num; /* previous test case number */
-static int Last_type; /* previous test result type */
-static char *Last_mesg; /* previous test result message */
-
-
-/*
- * These globals may be externed by the test.
- */
-int Tst_count = 0; /* current count of test cases executed; NOTE: */
- /* Tst_count may be externed by other programs */
-int Tst_lptotal = 0; /* tst_brkloop() external */
-int Tst_lpstart = 0; /* tst_brkloop() external */
-int Tst_range = 1; /* for specifying multiple results */
-int Tst_nobuf = 1; /* this is a no-op; buffering is never done, but */
- /* this will stay for compatibility reasons */
-
-/*
- * These globals must be defined in the test.
- */
-extern char *TCID; /* Test case identifier from the test source */
-extern int TST_TOTAL; /* Total number of test cases from the test */
- /* source */
-
-/*
- * This global is used by the temp. dir. maintenance functions,
- * tst_tmpdir()/tst_rmdir(), tst_wildcard()/tst_tr_rmdir(). It is the
- * name of the directory created (if any). It is defined here, so that
- * it only has to be declared once and can then be referenced from more
- * than one module. Also, since the temp. dir. maintenance functions
- * rely on the tst_res.c package this seemed like a reasonable place.
- */
-char *TESTDIR = NULL;
-
-/*
- * tst_res() - Main result reporting function. Handle test information
- * appropriately depending on output display mode. Call
- * tst_condense() or tst_print() to actually print results.
- * All result functions (tst_resm(), tst_brk(), etc.)
- * eventually get here to print the results.
- */
-void
-tst_res(int ttype, const char *fname, const char *arg_fmt, ...)
-{
- int i;
- char tmesg[USERMESG]; /* expanded message */
-
-#if DEBUG
- printf("IN tst_res; Tst_count = %d; Tst_range = %d\n",
- Tst_count, Tst_range); fflush(stdout);
-#endif
-
- /*
- * Expand the arg_fmt string into tmesg, if necessary.
- */
- EXPAND_VAR_ARGS(arg_fmt, tmesg);
-
- /*
- * Save the test result type by ORing ttype into the current exit
- * value (used by tst_exit()).
- */
- T_exitval |= ttype;
-
- /*
- * Unless T_out has already been set by tst_environ(), make tst_res()
- * output go to standard output.
- */
- if ( T_out == NULL )
- T_out = stdout;
-
- /*
- * Check TOUTPUT environment variable (if first time) and set T_mode
- * flag.
- */
- check_env();
-
- /*
- * A negative or NULL range is invalid.
- */
- if ( Tst_range <= 0 ) {
- Tst_range = 1;
- tst_print(TCID, 0, 1, TWARN,
- "tst_res(): Tst_range must be positive");
- }
-
- /*
- * If a filename was specified, set 'File' if it exists.
- */
- if ( fname != NULL && access(fname, F_OK) == 0 )
- File = fname;
-
- /*
- * Set the test case number and print the results, depending on the
- * display type.
- */
- if ( ttype == TWARN || ttype == TINFO ) {
- /*
- * Handle WARN and INFO results (test case number is 0).
- */
- if ( Tst_range > 1 ) {
- tst_print(TCID, 0, 1, TWARN,
- "tst_res(): Range not valid for TINFO or TWARN types");
- }
- tst_print(TCID, 0, 1, ttype, tmesg);
- } else {
- /*
- * Handle all other types of results other than WARN and INFO.
- */
- if ( Tst_count < 0 )
- tst_print(TCID, 0, 1, TWARN,
- "tst_res(): Tst_count < 0 is not valid");
-
- /*
- * Process each display type.
- */
- switch ( T_mode ) {
- case DISCARD:
- /* do not print any results */
- break;
-
- case NOPASS: /* passing result types are filtered by tst_print() */
- case CONDENSE:
- tst_condense(Tst_count + 1, ttype, tmesg);
- break;
-
- default: /* VERBOSE */
- for ( i = 1 ; i <= Tst_range ; i++ )
- tst_print(TCID, Tst_count + i, Tst_range, ttype, tmesg);
- break;
- } /* end switch() */
-
- /*
- * Increment Tst_count.
- */
- Tst_count += Tst_range;
- } /* if ( ttype == TWARN || ttype == TINFO ) */
-
- /*
- * Reset some values.
- */
- Tst_range = 1;
- Expand_varargs = TRUE;
-} /* tst_res() */
-
-
-/*
- * tst_condense() - Handle test cases in CONDENSE or NOPASS mode (i.e.
- * buffer the current result and print the last result
- * if different than the current). If a file was
- * specified, print the current result and do not
- * buffer it.
- */
-static void
-tst_condense(int tnum, int ttype, char *tmesg)
-{
- const char *file;
-
-#if DEBUG
- printf("IN tst_condense: tcid = %s, tnum = %d, ttype = %d, tmesg = %s\n",
- TCID, tnum, ttype, tmesg);
- fflush(stdout);
-#endif
-
- /*
- * If this result is the same as the previous result, return.
- */
- if ( Buffered == TRUE ) {
- if ( strcmp(Last_tcid, TCID) == 0 && Last_type == ttype &&
- strcmp(Last_mesg, tmesg) == 0 && File == NULL )
- return;
-
- /*
- * This result is different from the previous result. First,
- * print the previous result.
- */
- file = File;
- File = NULL;
- tst_print(Last_tcid, Last_num, tnum - Last_num, Last_type,
- Last_mesg);
- free(Last_tcid);
- free(Last_mesg);
- File = file;
- } /* if ( Buffered == TRUE ) */
-
- /*
- * If a file was specified, print the current result since we have no
- * way of retaining the file contents for comparing with future
- * results. Otherwise, buffer the current result info for next time.
- */
- if ( File != NULL ) {
- tst_print(TCID, tnum, Tst_range, ttype, tmesg);
- Buffered = FALSE;
- } else {
- Last_tcid = (char *)malloc(strlen(TCID) + 1);
- strcpy(Last_tcid, TCID);
- Last_num = tnum;
- Last_type = ttype;
- Last_mesg = (char *)malloc(strlen(tmesg) + 1);
- strcpy(Last_mesg, tmesg);
- Buffered = TRUE;
- }
-} /* tst_condense() */
-
-
-/*
- * tst_flush() - Print any messages pending because of CONDENSE mode,
- * and flush T_out.
- */
-void
-tst_flush()
-{
-#if DEBUG
- printf("IN tst_flush\n");
- fflush(stdout);
-#endif
-
- /*
- * Print out last line if in CONDENSE or NOPASS mode.
- */
- if ( Buffered == TRUE && (T_mode == CONDENSE || T_mode == NOPASS) ) {
- tst_print(Last_tcid, Last_num, Tst_count - Last_num + 1,
- Last_type, Last_mesg);
- Buffered = FALSE;
- }
- fflush(T_out);
-} /* tst_flush() */
-
-
-/*
- * tst_print() - Actually print a line or range of lines to the output
- * stream.
- */
-static void
-tst_print(char *tcid, int tnum, int trange, int ttype, const char *tmesg)
-{
- char type[5];
-
-#if DEBUG
- printf("IN tst_print: tnum = %d, trange = %d, ttype = %d, tmesg = %s\n",
- tnum, trange, ttype, tmesg);
- fflush(stdout);
-#endif
-
- /*
- * Save the test result type by ORing ttype into the current exit
- * value (used by tst_exit()). This is already done in tst_res(), but
- * is also done here to catch internal warnings. For internal warnings,
- * tst_print() is called directly with a case of TWARN.
- */
- T_exitval |= ttype;
-
- /*
- * If output mode is DISCARD, or if the output mode is NOPASS and
- * this result is not one of FAIL, BROK, or WARN, just return. This
- * check is necessary even though we check for DISCARD mode inside of
- * tst_res(), since occasionally we get to this point without going
- * through tst_res() (e.g. internal TWARN messages).
- */
- if ( T_mode == DISCARD || (T_mode == NOPASS && ttype != TFAIL &&
- ttype != TBROK && ttype != TWARN) )
- return;
-
- /*
- * Fill in the type string according to ttype.
- */
- switch ( ttype ) {
- case TPASS:
- strcpy(type, "PASS");
- break;
- case TFAIL:
- strcpy(type, "FAIL");
- break;
- case TBROK:
- strcpy(type, "BROK");
- break;
- case TRETR:
- strcpy(type, "RETR");
- break;
- case TCONF:
- strcpy(type, "CONF");
- break;
- case TWARN:
- strcpy(type, "WARN");
- break;
- case TINFO:
- strcpy(type, "INFO");
- break;
- default:
- strcpy(type, "????");
- break;
- } /* switch ( ttype ) */
-
- /*
- * Build the result line and print it.
- */
- if ( T_mode == VERBOSE ) {
- fprintf(T_out, "%-8s %4d %s : %s\n", tcid, tnum, type, tmesg);
- } else {
- /* condense results if a range is specified */
- if ( trange > 1 )
- fprintf(T_out, "%-8s %4d-%-4d %s : %s\n",
- tcid, tnum, tnum + trange - 1, type, tmesg);
- else
- fprintf(T_out, "%-8s %4d %s : %s\n",
- tcid, tnum, type, tmesg);
- }
-
- /*
- * If tst_res() was called with a file, append file contents to the
- * end of last printed result.
- */
- if ( File != NULL )
- cat_file(File);
- File = NULL;
-} /* tst_print() */
-
-
-/*
- * check_env() - Check the value of the environment variable TOUTPUT and
- * set the global variable T_mode. The TOUTPUT environment
- * variable should be set to "VERBOSE", "CONDENSE",
- * "NOPASS", or "DISCARD". If TOUTPUT does not exist or
- * is not set to a valid value, the default is "VERBOSE".
- */
-static void
-check_env()
-{
- static int first_time = 1;
- char *value; /* value of TOUTPUT environment variable */
-
-#if DEBUG
- printf("IN check_env\n");
- fflush(stdout);
-#endif
-
- if ( !first_time )
- return;
-
- first_time = 0;
-
- if ( (value = getenv(TOUTPUT)) == NULL ) {
- /* TOUTPUT not defined, use default */
- T_mode = VERBOSE;
- } else if ( strcmp(value, TOUT_CONDENSE_S) == 0 ) {
- T_mode = CONDENSE;
- } else if ( strcmp(value, TOUT_NOPASS_S) == 0 ) {
- T_mode = NOPASS;
- } else if ( strcmp(value, TOUT_DISCARD_S) == 0 ) {
- T_mode = DISCARD;
- } else {
- /* default */
- T_mode = VERBOSE;
- }
-
- return;
-} /* check_env() */
-
-
-/*
- * tst_exit() - Call exit() with the value T_exitval, set up by
- * tst_res(). T_exitval has a bit set for most of the
- * result types that were seen (including TPASS, TFAIL,
- * TBROK, TWARN, TCONF). Also, print the last result (if
- * necessary) before exiting.
- */
-void
-tst_exit()
-{
-#if DEBUG
- printf("IN tst_exit\n"); fflush(stdout);
- fflush(stdout);
-#endif
-
- /*
- * Call tst_flush() flush any ouput in the buffer or the last
- * result not printed because of CONDENSE mode.
- */
- tst_flush();
-
- /*
- * Mask out TRETR, TINFO, and TCONF results from the exit status.
- */
- exit(T_exitval & ~(TRETR | TINFO | TCONF));
-} /* tst_exit() */
-
-
-/*
- * tst_environ() - Preserve the tst_res() output location, despite any
- * changes to stdout.
- */
-int
-tst_environ()
-{
- FILE *fdopen();
-
- if ( (T_out = fdopen(dup(fileno(stdout)), "w")) == NULL )
- return(-1);
- else
- return(0);
-} /* tst_environ() */
-
-
-/*
- * tst_brk() - Fail or break current test case, and break the remaining
- * tests cases.
- */
-void
-tst_brk(int ttype, char *fname, void (*func)(), const char *arg_fmt, ...)
-{
- char tmesg[USERMESG]; /* expanded message */
-
-#if DEBUG
- printf("IN tst_brk\n"); fflush(stdout);
- fflush(stdout);
-#endif
-
- /*
- * Expand the arg_fmt string into tmesg, if necessary.
- */
- EXPAND_VAR_ARGS(arg_fmt, tmesg);
-
- /*
- * Only FAIL, BROK, CONF, and RETR are supported by tst_brk().
- */
- if ( ttype != TFAIL && ttype != TBROK && ttype != TCONF &&
- ttype != TRETR ) {
- sprintf(Warn_mesg, "tst_brk(): Invalid Type: %d. Using TBROK",
- ttype);
- tst_print(TCID, 0, 1, TWARN, Warn_mesg);
- ttype = TBROK;
- }
-
- /*
- * Print the first result, if necessary.
- */
- if ( Tst_count < TST_TOTAL )
- tst_res(ttype, fname, tmesg);
-
- /*
- * Determine the number of results left to report.
- */
- Tst_range = TST_TOTAL - Tst_count;
-
- /*
- * Print the rest of the results, if necessary.
- */
- if ( Tst_range > 0 ) {
- if ( ttype == TCONF )
- tst_res(ttype, NULL,
- "Remaining cases not appropriate for configuration");
- else if ( ttype == TRETR )
- tst_res(ttype, NULL, "Remaining cases retired");
- else
- tst_res(TBROK, NULL, "Remaining cases broken");
- } else {
- Tst_range = 1;
- Expand_varargs = TRUE;
- } /* if ( Tst_range > 0 ) */
-
- /*
- * If no cleanup function was specified, just return to the caller.
- * Otherwise call the specified function. If specified function
- * returns, call tst_exit().
- */
- if ( func != NULL ) {
- (*func)();
- tst_exit();
- }
-
- return;
-} /* tst_brk() */
-
-
-/*
- * tst_brkloop() - Fail or break current test case, and break the
- * remaining test cases within test case loop.
- */
-void
-tst_brkloop(int ttype, char *fname, void (*func)(), const char *arg_fmt, ...)
-{
- char tmesg[USERMESG]; /* expanded message */
-
-#if DEBUG
- printf("IN tst_brkloop\n"); fflush(stdout);
- fflush(stdout);
-#endif
-
- /*
- * Expand the arg_fmt string into tmesg.
- */
- EXPAND_VAR_ARGS(arg_fmt, tmesg);
-
- /*
- * Verify that Tst_lpstart & Tst_lptotal are valid.
- */
- if ( Tst_lpstart < 0 || Tst_lptotal < 0 ) {
- tst_print(TCID, 0, 1, TWARN,
- "tst_brkloop(): Tst_lpstart & Tst_lptotal must both be assigned non-negative values");
- Expand_varargs = TRUE;
- return;
- }
-
- /*
- * Only FAIL, BROK, CONF, and RETR are supported by tst_brkloop().
- */
- if ( ttype != TFAIL && ttype != TBROK && ttype != TCONF &&
- ttype != TRETR ) {
- sprintf(Warn_mesg,
- "tst_brkloop(): Invalid Type: %d. Using TBROK",
- ttype);
- tst_print(TCID, 0, 1, TWARN, Warn_mesg);
- ttype = TBROK;
- }
-
- /*
- * Print the first result, if necessary.
- */
- if ( Tst_count < Tst_lpstart + Tst_lptotal )
- tst_res(ttype, fname, tmesg);
-
- /*
- * Determine the number of results left to report.
- */
- Tst_range = Tst_lptotal + Tst_lpstart - Tst_count;
-
- /*
- * Print the rest of the results, if necessary.
- */
- if ( Tst_range > 0 ) {
- if ( ttype == TCONF )
- tst_res(ttype, NULL,
- "Remaining cases in loop not appropriate for configuration");
- else if ( ttype == TRETR )
- tst_res(ttype, NULL, "Remaining cases in loop retired");
- else
- tst_res(TBROK, NULL, "Remaining cases in loop broken");
- } else {
- Tst_range = 1;
- Expand_varargs = TRUE;
- } /* if ( Tst_range > 0 ) */
-
- /*
- * If a cleanup function was specified, call it.
- */
- if ( func != NULL )
- (*func)();
-} /* tst_brkloop() */
-
-
-/*
- * tst_resm() - Interface to tst_res(), with no filename.
- */
-void
-tst_resm(int ttype, const char *arg_fmt, ...)
-{
- char tmesg[USERMESG]; /* expanded message */
-
-#if DEBUG
- printf("IN tst_resm\n"); fflush(stdout);
- fflush(stdout);
-#endif
-
- /*
- * Expand the arg_fmt string into tmesg.
- */
- EXPAND_VAR_ARGS(arg_fmt, tmesg);
-
- /*
- * Call tst_res with a null filename argument.
- */
- tst_res(ttype, NULL, tmesg);
-} /* tst_resm() */
-
-
-/*
- * tst_brkm() - Interface to tst_brk(), with no filename.
- */
-void
-tst_brkm(int ttype, void (*func)(), const char *arg_fmt, ...)
-{
- char tmesg[USERMESG]; /* expanded message */
-
-#if DEBUG
- printf("IN tst_brkm\n"); fflush(stdout);
- fflush(stdout);
-#endif
-
- /*
- * Expand the arg_fmt string into tmesg.
- */
- EXPAND_VAR_ARGS(arg_fmt, tmesg);
-
- /*
- * Call tst_brk with a null filename argument.
- */
- tst_brk(ttype, NULL, func, tmesg);
-} /* tst_brkm() */
-
-
-/*
- * tst_brkloopm() - Interface to tst_brkloop(), with no filename.
- */
-void
-tst_brkloopm(int ttype, void (*func)(), const char *arg_fmt, ...)
-{
- char tmesg[USERMESG]; /* expanded message */
-
-#if DEBUG
- printf("IN tst_brkloopm\n");
- fflush(stdout);
-#endif
-
- /*
- * Expand the arg_fmt string into tmesg.
- */
- EXPAND_VAR_ARGS(arg_fmt, tmesg);
-
- /*
- * Call tst_brkloop with a null filename argument.
- */
- tst_brkloop(ttype, NULL, func, tmesg);
-} /* tst_brkloopm() */
-
-
-/*
- * cat_file() - Print the contents of a file to standard out.
- */
-static void
-cat_file(const char *filename)
-{
- FILE *fp; /* file pointer */
- int b_read; /* number of bytes read with read() */
- int b_written; /* number of bytes written with write() */
- char buffer[BUFSIZ]; /* read/write buffer; BUFSIZ defined in */
- /* stdio.h */
-
-#if DEBUG
- printf("IN cat_file\n"); fflush(stdout);
-#endif
-
- /*
- * Open the file for reading.
- */
- if ( (fp = fopen(filename, "r")) == NULL ) {
- sprintf(Warn_mesg,
- "tst_res(): fopen(%s, \"r\") failed; errno = %d: %s",
- filename, errno, strerror(errno));
- tst_print(TCID, 0, 1, TWARN, Warn_mesg);
- return;
- } /* if ( fopen(filename, "r") == -1 ) */
-
- /*
- * While something to read, continue to read blocks.
- * From fread(3) man page:
- * If an error occurs, or the end-of-file is reached, the return
- * value is zero.
- */
- errno = 0;
- while ( (b_read = fread((void *)buffer, 1, BUFSIZ, fp)) != (size_t)0 ) {
- /*
- * Write what was read to the result output stream.
- */
- if ( (b_written = fwrite((void *)buffer, 1, b_read, T_out)) !=
- b_read ) {
- sprintf(Warn_mesg,
- "tst_res(): While trying to cat \"%s\", fwrite() wrote only %d of %d bytes",
- filename, b_written, b_read);
- tst_print(TCID, 0, 1, TWARN, Warn_mesg);
- break;
- } /* if ( b_written != b_read ) */
- } /* while ( fread() != 0 ) */
-
- /*
- * Check for an fread() error.
- */
- if ( !feof(fp) ) {
- sprintf(Warn_mesg,
- "tst_res(): While trying to cat \"%s\", fread() failed, errno = %d: %s",
- filename, errno, strerror(errno));
- tst_print(TCID, 0, 1, TWARN, Warn_mesg);
- } /* if ( !feof() ) */
-
- /*
- * Close the file.
- */
- if ( fclose(fp) == EOF ) {
- sprintf(Warn_mesg,
- "tst_res(): While trying to cat \"%s\", fclose() failed, errno = %d: %s",
- filename, errno, strerror(errno));
- tst_print(TCID, 0, 1, TWARN, Warn_mesg);
- } /* if ( fclose(fp) == EOF ) */
-} /* cat_file() */
-
-
-
-#ifdef UNIT_TEST
-/****************************************************************************
- * Unit test code: Takes input from stdin and can make the following
- * calls: tst_res(), tst_resm(), tst_brk(), tst_brkm(),
- * tst_flush_buf(), tst_exit().
- ****************************************************************************/
-int TST_TOTAL = 10;
-char *TCID = "TESTTCID";
-
-#define RES "tst_res.c UNIT TEST message; ttype = %d; contents of \"%s\":"
-#define RESM "tst_res.c UNIT TEST message; ttype = %d"
-
-main()
-{
- int ttype;
- int range;
- char *chrptr;
- char chr;
- char fname[MAXMESG];
-
- printf("UNIT TEST of tst_res.c. Options for ttype:\n\
- -1 : call tst_exit()\n\
- -2 : call tst_flush()\n\
- -3 : call tst_brk()\n\
- -4 : call tst_brkloop()\n\
- -5 : call tst_res() with a range\n\
- 0 : call tst_res(TPASS, ...)\n\
- 1 : call tst_res(TFAIL, ...)\n\
- 2 : call tst_res(TBROK, ...)\n\
- 4 : call tst_res(TWARN, ...)\n\
- 8 : call tst_res(TRETR, ...)\n\
- 16 : call tst_res(TINFO, ...)\n\
- 32 : call tst_res(TCONF, ...)\n\n");
-
- while ( 1 ) {
- printf("Enter ttype (-5,-4,-3,-2,-1,0,1,2,4,8,16,32): ");
- (void) scanf("%d%c", &ttype, &chr);
-
-
- switch ( ttype ) {
- case -1:
- tst_exit();
- break;
-
- case -2:
- tst_flush();
- break;
-
- case -3:
- printf("Enter the current type (1=FAIL, 2=BROK, 8=RETR, 32=CONF): ");
- (void) scanf("%d%c", &ttype, &chr);
- printf("Enter file name (<cr> for none): ");
- gets(fname);
- if ( strcmp(fname, "") == 0 )
- tst_brkm(ttype, tst_exit, RESM, ttype);
- else
- tst_brk(ttype, fname, tst_exit, RES, ttype, fname);
- break;
-
- case -4:
- printf("Enter the size of the loop: ");
- (void) scanf("%d%c", &range, &chr);
- Tst_lpstart = Tst_count;
- Tst_lptotal = range;
- printf("Enter the current type (1=FAIL, 2=BROK, 8=RETR, 32=CONF): ");
- (void) scanf("%d%c", &ttype, &chr);
- printf("Enter file name (<cr> for none): ");
- gets(fname);
- if ( strcmp(fname, "") == 0 )
- tst_brkloopm(ttype, NULL, RESM, ttype);
- else
- tst_brkloop(ttype, fname, NULL, RES, ttype, fname);
- break;
-
- case -5:
- printf("Enter the size of the range: ");
- (void) scanf("%d%c", &Tst_range, &chr);
- printf("Enter the current type (0,1,2,4,8,16,32): ");
- (void) scanf("%d%c", &ttype, &chr);
- /* fall through to tst_res() call */
-
- default:
- printf("Enter file name (<cr> for none): ");
- gets(fname);
- if ( strcmp(fname, "") == 0 )
- tst_resm(ttype, RESM, ttype);
- else
- tst_res(ttype, fname, RES, ttype, fname);
- break;
- } /* switch() */
- } /* while() */
-}
-#endif /* UNIT_TEST */
diff --git a/winsup/testsuite/libltp/lib/tst_sig.c b/winsup/testsuite/libltp/lib/tst_sig.c
deleted file mode 100644
index f5b64b6..0000000
--- a/winsup/testsuite/libltp/lib/tst_sig.c
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-
-/* $Id$ */
-
-/*****************************************************************************
- OS Testing - Silicon Graphics, Inc.
-
- FUNCTION IDENTIFIER : tst_sig Set up for unexpected signals.
-
- AUTHOR : David D. Fenner
-
- CO-PILOT : Bill Roske
-
- DATE STARTED : 06/06/90
-
- This module may be linked with c-modules requiring unexpected
- signal handling. The parameters to tst_sig are as follows:
-
- fork_flag - set to FORK or NOFORK depending upon whether the
- calling program executes a fork() system call. It
- is normally the case that the calling program treats
- SIGCLD as an expected signal if fork() is being used.
-
- handler - a pointer to the unexpected signal handler to
- be executed after an unexpected signal has been
- detected. If handler is set to DEF_HANDLER, a
- default handler is used. This routine should be
- declared as function returning an int.
-
- cleanup - a pointer to a cleanup routine to be executed
- by the unexpected signal handler before tst_exit is
- called. This parameter is set to NULL if no cleanup
- routine is required. An external variable, T_cleanup
- is set so that other user-defined handlers have
- access to the cleanup routine. This routine should be
- declared as returning type void.
-
-***************************************************************************/
-
-#ifndef CRAY
-#define _BSD_SIGNALS 1 /* Specify that we are using BSD signal interface */
-#endif
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-
-#define MAXMESG 150 /* size of mesg string sent to tst_res */
-
-void (*T_cleanup)(); /* pointer to cleanup function */
-
-extern int errno;
-static void def_handler(); /* default signal handler */
-
-/****************************************************************************
- * tst_sig() : set-up to catch unexpected signals. fork_flag is set to NOFORK
- * if SIGCLD is to be an "unexpected signal", otherwise it is set to
- * FORK. cleanup points to a cleanup routine to be executed before
- * tst_exit is called (cleanup is set to NULL if no cleanup is desired).
- * handler is a pointer to the signal handling routine (if handler is
- * set to NULL, a default handler is used).
- ***************************************************************************/
-
-void
-tst_sig(int fork_flag, void (*handler)(), void (*cleanup)())
-{
- char mesg[MAXMESG]; /* message buffer for tst_res */
- int sig;
-
- /*
- * save T_cleanup and handler function pointers
- */
- T_cleanup = cleanup; /* used by default handler */
-
- if (handler == DEF_HANDLER) {
- /* use default handler */
- handler = def_handler;
- }
-
- /*
- * now loop through all signals and set the handlers
- */
-
- for (sig = 1; sig < NSIG; sig++) {
- /*
- * SIGKILL is never unexpected.
- * SIGCLD is only unexpected when
- * no forking is being done.
- * SIGINFO is used for file quotas and should be expected
- */
-
- switch (sig) {
- case SIGKILL:
- case SIGSTOP:
- case SIGCONT:
-#ifdef CRAY
- case SIGINFO:
- case SIGRECOVERY: /* allow chkpnt/restart */
-#endif /* CRAY */
-
-#ifdef SIGSWAP
- case SIGSWAP:
-#endif /* SIGSWAP */
-
-#ifdef SIGCKPT
- case SIGCKPT:
-#endif
-#ifdef SIGRESTART
- case SIGRESTART:
-#endif
- /*
- * pthread-private signals SIGPTINTR and SIGPTRESCHED.
- * Setting a handler for these signals is disallowed when
- * the binary is linked against libpthread.
- */
-#ifdef SIGPTINTR
- case SIGPTINTR:
-#endif /* SIGPTINTR */
-#ifdef SIGPTRESCHED
- case SIGPTRESCHED:
-#endif /* SIGPTRESCHED */
-#ifdef __CYGWIN__
- case SIGILL:
- case SIGTRAP:
- case SIGABRT:
- case SIGEMT:
- case SIGFPE:
- case SIGBUS:
-#endif
- break;
-
- case SIGCLD:
- if ( fork_flag == FORK )
- continue;
-
- default:
- if (signal(sig, handler) == SIG_ERR) {
- (void) sprintf(mesg,
- "signal() failed for signal %d. error:%d %s.",
- sig, errno, strerror(errno));
- tst_resm(TWARN, mesg);
- }
- break;
- }
-#ifdef __sgi
- /* On irix (07/96), signal() fails when signo is 33 or higher */
- if ( sig+1 >= 33 )
- break;
-#endif /* __sgi */
-
- } /* endfor */
-}
-
-
-
-/****************************************************************************
- * def_handler() : default signal handler that is invoked when
- * an unexpected signal is caught.
- ***************************************************************************/
-
-static void
-def_handler(int sig)
-{
- char mesg[MAXMESG]; /* holds tst_res message */
-
- /* first reset trap for this signal (except SIGCLD - its weird) */
- if ((sig != SIGCLD) && (sig != SIGSTOP) && (sig != SIGCONT)) {
- if (signal(sig, def_handler) == SIG_ERR) {
- (void) sprintf(mesg,
- "def_handler: signal() failed for signal %d. error:%d %s.",
- sig, errno, strerror(errno));
- tst_resm(TWARN, mesg);
- }
- }
-
- (void) sprintf(mesg, "Unexpected signal %d received.", sig);
-
- /*
- * Break remaining test cases, do any cleanup, then exit
- */
- tst_brkm(TBROK, 0, mesg);
-
- /* now cleanup and exit */
- if (T_cleanup) {
- (*T_cleanup)();
- }
-
- tst_exit();
-}
diff --git a/winsup/testsuite/libltp/lib/tst_tmpdir.c b/winsup/testsuite/libltp/lib/tst_tmpdir.c
deleted file mode 100644
index cd9d9c8..0000000
--- a/winsup/testsuite/libltp/lib/tst_tmpdir.c
+++ /dev/null
@@ -1,347 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-
-/* $Id$ */
-
-/**********************************************************
- *
- * OS Testing - Silicon Graphics, Inc.
- *
- * FUNCTION NAME : tst_tmpdir, tst_rmdir
- *
- * FUNCTION TITLE : Create/remove a testing temp dir
- *
- * SYNOPSIS:
- * void tst_tmpdir();
- * void tst_rmdir();
- *
- * AUTHOR : Dave Fenner
- *
- * INITIAL RELEASE : UNICOS 8.0
- *
- * DESCRIPTION
- * tst_tmpdir() is used to create a unique, temporary testing
- * directory, and make it the current working directory.
- * tst_rmdir() is used to remove the directory created by
- * tst_tmpdir().
- *
- * Setting the env variable "TDIRECTORY" will override the creation
- * of a new temp dir. The directory specified by TDIRECTORY will
- * be used as the temporary directory, and no removal will be done
- * in tst_rmdir().
- *
- * RETURN VALUE
- * Neither tst_tmpdir() or tst_rmdir() has a return value.
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-#include <errno.h>
-#include <sys/types.h> /* for mkdir() */
-#include <sys/stat.h> /* for mkdir() */
-#include "test.h"
-#include "rmobj.h"
-
-/*
- * Define some useful macros.
- */
-#define PREFIX_SIZE 4
-#define STRING_SIZE 256
-#define DIR_MODE 0777 /* mode of tmp dir that will be created */
-
-#ifndef PATH_MAX
-#ifdef MAXPATHLEN
-#define PATH_MAX MAXPATHLEN
-#else
-#define PATH_MAX 1024
-#endif
-#endif
-
-/*
- * Define function prototypes.
- */
-static void tmpdir_cleanup();
-
-/*
- * Define global variables.
- */
-extern char *TCID; /* defined/initialized in main() */
-extern int TST_TOTAL; /* defined/initialized in main() */
-extern char *TESTDIR; /* the directory created; defined in */
- /* tst_res.c */
-
-/*
- * tst_tmpdir() - Create a unique temporary directory and chdir() to it.
- * It expects the caller to have defined/initialized the
- * TCID/TST_TOTAL global variables. The TESTDIR global
- * variable will be set to the directory that gets used
- * as the testing directory.
- *
- * NOTE: This function must be called BEFORE any activity
- * that would require CLEANUP. If tst_tmpdir() fails, it
- * cleans up afer itself and calls tst_exit() (i.e. does
- * not return).
- */
-#undef FN_NAME
-#define FN_NAME "tst_tmpdir()"
-
-void
-tst_tmpdir()
-{
- char prefix[PREFIX_SIZE]; /* first three characters from TCID */
- int no_cleanup = 0; /* !0 means TDIRECTORY env var was set */
-
- /*
- * If the TDIRECTORY env variable is not set, a temp dir will be
- * created.
- */
- if ( (TESTDIR = getenv(TDIRECTORY)) == NULL ) {
- /*
- * Create a unique name based on the first three characters of the
- * TCID. The last byte in "prefix" is for the null.
- */
- strncpy(prefix, TCID, PREFIX_SIZE - 1);
- prefix[PREFIX_SIZE-1] = '\0';
- if ( (TESTDIR = tempnam(TEMPDIR, prefix)) == NULL )
- tst_brkm(TBROK, tmpdir_cleanup, "%s: tempnam(%s, %s) failed",
- FN_NAME, TEMPDIR, prefix);
-
- /*
- * Create the temporary directory.
- */
- if ( mkdir(TESTDIR, DIR_MODE) == -1 )
- tst_brkm(TBROK, tmpdir_cleanup,
- "%s: mkdir(%s, %#o) failed; errno = %d: %s",
- FN_NAME, TESTDIR, DIR_MODE, errno, strerror(errno));
-
- /*
- * Change the group on this temporary directory to be that of the
- * gid of the person running the tests.
- */
- if ( chown(TESTDIR, -1, getgid()) == -1 )
- tst_brkm(TBROK, tmpdir_cleanup,
- "chown(%s, -1, %d) failed; errno = %d: %s",
- TESTDIR, getgid(), errno, strerror(errno));
- } else {
- /*
- * The TDIRECTORY env. variable is set, so no temp dir is created.
- * Also, no clean up will be done via tst_rmdir().
- */
- no_cleanup++;
-#if UNIT_TEST
- printf("TDIRECTORY env var is set\n");
-#endif
- }
-
-#if UNIT_TEST
- printf("TESTDIR = %s\n", TESTDIR);
-#endif
-
- /*
- * Change to the temporary directory. If the chdir() fails, issue
- * TBROK messages for all test cases, attempt to remove the
- * directory (if it was created), and exit. If the removal also
- * fails, also issue a TWARN message.
- */
- if ( chdir(TESTDIR) == -1 ) {
- tst_brkm(TBROK, NULL, "%s: chdir(%s) failed; errno = %d: %s",
- FN_NAME, TESTDIR, errno, strerror(errno) );
-
- /* Try to remove the directory */
- if ( !no_cleanup && rmdir(TESTDIR) == -1 )
- tst_resm(TWARN, "%s: rmdir(%s) failed; errno = %d: %s",
- FN_NAME, TESTDIR, errno, strerror(errno) );
-
- tmpdir_cleanup();
- }
-
-#if UNIT_TEST
- printf("CWD is %s\n", getcwd((char *)NULL, PATH_MAX));
-#endif
-
- /*
- * If we made through all this stuff, return.
- */
- return;
-} /* tst_tmpdir() */
-
-
-/*
- *
- * tst_rmdir() - Recursively remove the temporary directory created by
- * tst_tmpdir(). This function is intended ONLY as a
- * companion to tst_tmpdir(). If the TDIRECTORY
- * environment variable is set, no cleanup will be
- * attempted.
- */
-#undef FN_NAME
-#define FN_NAME "tst_rmdir()"
-
-void
-tst_rmdir()
-{
- char *errmsg;
- char *tdirectory;
- char current_dir[PATH_MAX]; /* current working directory */
- char parent_dir[PATH_MAX]; /* directory above TESTDIR */
- char *basename; /* basename of the TESTDIR */
-
- /*
- * If the TDIRECTORY env variable is set, this indicates that no
- * temp dir was created by tst_tmpdir(). Thus no cleanup will be
- * necessary.
- */
- if ( (tdirectory = getenv(TDIRECTORY)) != NULL ) {
-#if UNIT_TEST
- printf("\"TDIRECORY\" env variable is set; no cleanup was performed\n");
-#endif
- return;
- }
-
- /*
- * Check that TESTDIR is not NULL.
- */
- if ( TESTDIR == NULL ) {
- tst_resm(TWARN, "%s: TESTDIR was NULL; no removal attempted",
- FN_NAME);
- return;
- }
-
- /*
- * Check that the value of TESTDIR is not "*" or "/". These could
- * have disastrous effects in a test run by root.
- */
- if ( strcmp(TESTDIR, "/") == 0 ) {
- tst_resm(TWARN,
- "%s: Recursive remove of root directory not attempted",
- FN_NAME);
- return;
- }
-
- if ( strchr(TESTDIR, '*') != NULL ) {
- tst_resm(TWARN, "%s: Recursive remove of '*' not attempted",
- FN_NAME);
- return;
- }
-
- /*
- * Get the directory name of TESTDIR. If TESTDIR is a relative path,
- * get full path.
- */
- if ( TESTDIR[0] != '/' ) {
- if ( getcwd(current_dir,PATH_MAX) == NULL )
- strcpy(parent_dir, TESTDIR);
- else
- sprintf(parent_dir, "%s/%s", current_dir, TESTDIR);
- } else {
- strcpy(parent_dir, TESTDIR);
- }
- if ( (basename = strrchr(parent_dir, '/')) != NULL ) {
- *basename='\0'; /* terminate at end of parent_dir */
- }
-
- /*
- * Change directory to parent_dir (The dir above TESTDIR).
- */
- if ( chdir(parent_dir) != 0 )
- tst_resm(TWARN,
- "%s: chdir(%s) failed; errno = %d: %s\nAttempting to remove temp dir anyway",
- FN_NAME, parent_dir, errno, strerror(errno));
-
- /*
- * Attempt to remove the "TESTDIR" directory, using rmobj().
- */
- if ( rmobj(TESTDIR, &errmsg) == -1 )
- tst_resm(TWARN, "%s: rmobj(%s) failed: %s",
- FN_NAME, TESTDIR, errmsg);
-
- return;
-} /* tst_rmdir() */
-
-
-/*
- * tmpdir_cleanup() - This function is used when tst_tmpdir()
- * encounters an error, and must cleanup and exit.
- * It prints a warning message via tst_resm(), and
- * then calls tst_exit().
- */
-#undef FN_NAME
-#define FN_NAME "tst_tmpdir()"
-
-static void
-tmpdir_cleanup()
-{
- /*
- * Print a warning message and call tst_exit() to exit the test.
- */
- tst_resm(TWARN, "%s: No user cleanup function called before exiting",
- FN_NAME);
- tst_exit();
-} /* tmpdir_cleanup() */
-
-
-#ifdef UNIT_TEST
-/****************************************************************************
- * Unit test code: Takes input from stdin and can make the following
- * calls: tst_tmpdir(), tst_rmdir().
- ****************************************************************************/
-int TST_TOTAL = 10;
-char *TCID = "TESTTCID";
-
-main()
-{
- int option;
- char *chrptr;
-
- printf("UNIT TEST of tst_tmpdir.c. Options to try:\n\
- -1 : call tst_exit()\n\
- 0 : call tst_tmpdir()\n\
- 1 : call tst_rmdir()\n\n");
-
- while ( 1 ) {
- printf("Enter options (-1, 0, 1): ");
- (void) scanf("%d%c", &option, &chrptr);
-
- switch ( option ) {
- case -1:
- tst_exit();
- break;
-
- case 0:
- tst_tmpdir();
- break;
-
- case 1:
- tst_rmdir();
- break;
- } /* switch() */
- } /* while() */
-}
-#endif /* UNIT_TEST */
diff --git a/winsup/testsuite/libltp/lib/write_log.c b/winsup/testsuite/libltp/lib/write_log.c
deleted file mode 100644
index 316dfe7..0000000
--- a/winsup/testsuite/libltp/lib/write_log.c
+++ /dev/null
@@ -1,468 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-/*
- * This module contains code for logging writes to files, and for
- * perusing the resultant logfile. The main intent of all this is
- * to provide a 'write history' of a file which can be examined to
- * judge the state of a file (ie. whether it is corrupted or not) based
- * on the write activity.
- *
- * The main abstractions available to the user are the wlog_file, and
- * the wlog_rec. A wlog_file is a handle encapsulating a write logfile.
- * It is initialized with the wlog_open() function. This handle is
- * then passed to the various wlog_xxx() functions to provide transparent
- * access to the write logfile.
- *
- * The wlog_rec datatype is a structure which contains all the information
- * about a file write. Examples include the file name, offset, length,
- * pattern, etc. In addition there is a bit which is cleared/set based
- * on whether or not the write has been confirmed as complete. This
- * allows the write logfile to contain information on writes which have
- * been initiated, but not yet completed (as in async io).
- *
- * There is also a function to scan a write logfile in reverse order.
- *
- * NOTE: For target file analysis based on a write logfile, the
- * assumption is made that the file being written to is
- * locked from simultaneous access, so that the order of
- * write completion is predictable. This is an issue when
- * more than 1 process is trying to write data to the same
- * target file simultaneously.
- *
- * The history file created is a collection of variable length records
- * described by scruct wlog_rec_disk in write_log.h. See that module for
- * the layout of the data on disk.
- */
-
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/param.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include "write_log.h"
-
-#ifndef BSIZE
-#ifdef linux
-#define BSIZE DEV_BSIZE
-#else
-#ifdef __CYGWIN__
-#define BSIZE S_BLKSIZE
-#else
-#define BSIZE BBSIZE
-#endif
-#endif
-#endif
-
-#ifndef PATH_MAX
-#define PATH_MAX 255
-/*#define PATH_MAX pathconf("/", _PC_PATH_MAX)*/
-#endif
-
-char Wlog_Error_String[256];
-
-#if __STDC__
-static int wlog_rec_pack(struct wlog_rec *wrec, char *buf, int flag);
-static int wlog_rec_unpack(struct wlog_rec *wrec, char *buf);
-#else
-static int wlog_rec_pack();
-static int wlog_rec_unpack();
-#endif
-
-/*
- * Initialize a write logfile. wfile is a wlog_file structure that has
- * the w_file field filled in. The rest of the information in the
- * structure is initialized by the routine.
- *
- * The trunc flag is used to indicate whether or not the logfile should
- * be truncated if it currently exists. If it is non-zero, the file will
- * be truncated, otherwise it will be appended to.
- *
- * The mode argument is the [absolute] mode which the file will be
- * given if it does not exist. This mode is not affected by your process
- * umask.
- */
-
-int
-wlog_open(wfile, trunc, mode)
-struct wlog_file *wfile;
-int trunc;
-int mode;
-{
- int omask, oflags;
-
- if (trunc)
- trunc = O_TRUNC;
-
- omask = umask(0);
-
- /*
- * Open 1 file descriptor as O_APPEND
- */
-
- oflags = O_WRONLY | O_APPEND | O_CREAT | trunc;
- wfile->w_afd =
- open(wfile->w_file, oflags, mode);
- umask(omask);
-
- if (wfile->w_afd == -1) {
- sprintf(Wlog_Error_String,
- "Could not open write_log - open(%s, %#o, %#o) failed: %s\n",
- wfile->w_file, oflags, mode, strerror(errno));
- return -1;
- }
-
- /*
- * Open the next fd as a random access descriptor
- */
-
- oflags = O_RDWR;
- if ((wfile->w_rfd = open(wfile->w_file, oflags)) == -1) {
- sprintf(Wlog_Error_String,
- "Could not open write log - open(%s, %#o) failed: %s\n",
- wfile->w_file, oflags, strerror(errno));
- close(wfile->w_afd);
- wfile->w_afd = -1;
- return -1;
- }
-
- return 0;
-}
-
-/*
- * Release all resources associated with a wlog_file structure allocated
- * with the wlog_open() call.
- */
-
-int
-wlog_close(wfile)
-struct wlog_file *wfile;
-{
- close(wfile->w_afd);
- close(wfile->w_rfd);
- return 0;
-}
-
-/*
- * Write a wlog_rec structure to a write logfile. Offset is used to
- * control where the record will be written. If offset is < 0, the
- * record will be appended to the end of the logfile. Otherwise, the
- * record which exists at the indicated offset will be overlayed. This
- * is so that we can record writes which are outstanding (with the w_done
- * bit in wrec cleared), but not completed, and then later update the
- * logfile when the write request completes (as with async io). When
- * offset is >= 0, only the fixed length portion of the record is
- * rewritten. See text in write_log.h for details on the format of an
- * on-disk record.
- *
- * The return value of the function is the byte offset in the logfile
- * where the record begins.
- *
- * Note: It is the callers responsibility to make sure that the offset
- * parameter 'points' to a valid record location when a record is to be
- * overlayed. This is guarenteed by saving the return value of a previous
- * call to wlog_record_write() which wrote the record to be overlayed.
- *
- * Note2: The on-disk version of the wlog_rec is MUCH different than
- * the user version. Don't expect to od the logfile and see data formatted
- * as it is in the wlog_rec structure. Considerable data packing takes
- * place before the record is written.
- */
-
-int
-wlog_record_write(wfile, wrec, offset)
-struct wlog_file *wfile;
-struct wlog_rec *wrec;
-long offset;
-{
- int reclen;
- char wbuf[WLOG_REC_MAX_SIZE + 2];
-
- /*
- * If offset is -1, we append the record at the end of file
- *
- * Otherwise, we overlay wrec at the file offset indicated and assume
- * that the caller passed us the correct offset. We do not record the
- * fname in this case.
- */
-
- reclen = wlog_rec_pack(wrec, wbuf, (offset < 0));
-
- if (offset < 0) {
- /*
- * Since we're writing a complete new record, we must also tack
- * its length onto the end so that wlog_scan_backward() will work.
- * Length is asumed to fit into 2 bytes.
- */
-
- wbuf[reclen] = reclen / 256;
- wbuf[reclen+1] = reclen % 256;
- reclen += 2;
-
- write(wfile->w_afd, wbuf, reclen);
- offset = lseek(wfile->w_afd, 0, SEEK_CUR) - reclen;
- } else {
- lseek(wfile->w_rfd, offset, SEEK_SET);
- write(wfile->w_rfd, wbuf, reclen);
- }
-
- return offset;
-}
-
-/*
- * Function to scan a logfile in reverse order. Wfile is a valid
- * wlog_file structure initialized by wlog_open(). nrecs is the number
- * of records to scan (all records are scanned if nrecs is 0). func is
- * a user-supplied function to call for each record found. The function
- * will be passed a single parameter - a wlog_rec structure .
- */
-
-int
-wlog_scan_backward(wfile, nrecs, func, data)
-struct wlog_file *wfile;
-int nrecs;
-int (*func)();
-long data;
-{
- int fd, leftover, nbytes, offset, recnum, reclen, rval;
- char buf[BSIZE*32], *bufend, *cp, *bufstart;
- char albuf[WLOG_REC_MAX_SIZE];
- struct wlog_rec wrec;
-
- fd = wfile->w_rfd;
-
- /*
- * Move to EOF. offset will always hold the current file offset
- */
-
- lseek(fd, 0, SEEK_END);
- offset = lseek(fd, 0, SEEK_CUR);
-
- bufend = buf + sizeof(buf);
- bufstart = buf;
-
- recnum = 0;
- leftover = 0;
- while ((!nrecs || recnum < nrecs) && offset > 0) {
- /*
- * Check for beginning of file - if there aren't enough bytes
- * remaining to fill buf, adjust bufstart.
- */
-
- if (offset + leftover < sizeof(buf)) {
- bufstart = bufend - (offset + leftover);
- offset = 0;
- } else {
- offset -= sizeof(buf) - leftover;
- }
-
- /*
- * Move to the proper file offset, and read into buf
- */
-
- lseek(fd, offset, SEEK_SET);
- nbytes = read(fd, bufstart, bufend - bufstart - leftover);
-
- if (nbytes == -1) {
- sprintf(Wlog_Error_String,
- "Could not read history file at offset %d - read(%d, %#o, %d) failed: %s\n",
- offset, fd, (int)bufstart,
- bufend - bufstart - leftover, strerror(errno));
- return -1;
- }
-
- cp = bufend;
- leftover = 0;
-
- while (cp >= bufstart) {
-
- /*
- * If cp-bufstart is not large enough to hold a piece
- * of record length information, copy remainder to end
- * of buf and continue reading the file.
- */
-
- if (cp - bufstart < 2) {
- leftover = cp - bufstart;
- memcpy(bufend - leftover, bufstart, leftover);
- break;
- }
-
- /*
- * Extract the record length. We must do it this way
- * instead of casting cp to an int because cp might
- * not be word aligned.
- */
-
- reclen = (*(cp-2) * 256) + *(cp -1);
-
- /*
- * If cp-bufstart isn't large enough to hold a
- * complete record, plus the length information, copy
- * the leftover bytes to the end of buf and continue
- * reading.
- */
-
- if (cp - bufstart < reclen + 2) {
- leftover = cp - bufstart;
- memcpy(bufend - leftover, bufstart, leftover);
- break;
- }
-
- /*
- * Adjust cp to point at the start of the record.
- * Copy the record into wbuf so that it is word
- * aligned and pass the record to the user supplied
- * function.
- */
-
- cp -= reclen + 2;
- memcpy(albuf, cp, reclen);
-
- wlog_rec_unpack(&wrec, albuf);
-
- /*
- * Call the user supplied function -
- * stop if instructed to.
- */
-
- if ((rval = (*func)(&wrec, data)) == WLOG_STOP_SCAN) {
- break;
- }
-
- recnum++;
-
- if (nrecs && recnum >= nrecs)
- break;
- }
- }
-
- return 0;
-}
-
-/*
- * The following 2 routines are used to pack and unpack the user
- * visible wlog_rec structure to/from a character buffer which is
- * stored or read from the write logfile. Any changes to either of
- * these routines must be reflected in the other.
- */
-
-static int
-wlog_rec_pack(wrec, buf, flag)
-struct wlog_rec *wrec;
-char *buf;
-int flag;
-{
- char *file, *host, *pattern;
- struct wlog_rec_disk *wrecd;
-
- wrecd = (struct wlog_rec_disk *)buf;
-
- wrecd->w_pid = (uint)wrec->w_pid;
- wrecd->w_offset = (uint)wrec->w_offset;
- wrecd->w_nbytes = (uint)wrec->w_nbytes;
- wrecd->w_oflags = (uint)wrec->w_oflags;
- wrecd->w_done = (uint)wrec->w_done;
- wrecd->w_async = (uint)wrec->w_async;
-
- wrecd->w_pathlen = (wrec->w_pathlen > 0) ? (uint)wrec->w_pathlen : 0;
- wrecd->w_hostlen = (wrec->w_hostlen > 0) ? (uint)wrec->w_hostlen : 0;
- wrecd->w_patternlen = (wrec->w_patternlen > 0) ? (uint)wrec->w_patternlen : 0;
-
- /*
- * If flag is true, we should also pack the variable length parts
- * of the wlog_rec. By default, we only pack the fixed length
- * parts.
- */
-
- if (flag) {
- file = buf + sizeof(struct wlog_rec_disk);
- host = file + wrecd->w_pathlen;
- pattern = host + wrecd->w_hostlen;
-
- if (wrecd->w_pathlen > 0)
- memcpy(file, wrec->w_path, wrecd->w_pathlen);
-
- if (wrecd->w_hostlen > 0)
- memcpy(host, wrec->w_host, wrecd->w_hostlen);
-
- if (wrecd->w_patternlen > 0)
- memcpy(pattern, wrec->w_pattern, wrecd->w_patternlen);
-
- return (sizeof(struct wlog_rec_disk) +
- wrecd->w_pathlen + wrecd->w_hostlen + wrecd->w_patternlen);
- } else {
- return sizeof(struct wlog_rec_disk);
- }
-}
-
-static int
-wlog_rec_unpack(wrec, buf)
-struct wlog_rec *wrec;
-char *buf;
-{
- char *file, *host, *pattern;
- struct wlog_rec_disk *wrecd;
-
- bzero((char *)wrec, sizeof(struct wlog_rec));
- wrecd = (struct wlog_rec_disk *)buf;
-
- wrec->w_pid = wrecd->w_pid;
- wrec->w_offset = wrecd->w_offset;
- wrec->w_nbytes = wrecd->w_nbytes;
- wrec->w_oflags = wrecd->w_oflags;
- wrec->w_hostlen = wrecd->w_hostlen;
- wrec->w_pathlen = wrecd->w_pathlen;
- wrec->w_patternlen = wrecd->w_patternlen;
- wrec->w_done = wrecd->w_done;
- wrec->w_async = wrecd->w_async;
-
- if (wrec->w_pathlen > 0) {
- file = buf + sizeof(struct wlog_rec_disk);
- memcpy(wrec->w_path, file, wrec->w_pathlen);
- }
-
- if (wrec->w_hostlen > 0) {
- host = buf + sizeof(struct wlog_rec_disk) + wrec->w_pathlen;
- memcpy(wrec->w_host, host, wrec->w_hostlen);
- }
-
- if (wrec->w_patternlen > 0) {
- pattern = buf + sizeof(struct wlog_rec_disk) +
- wrec->w_pathlen + wrec->w_hostlen;
- memcpy(wrec->w_pattern, pattern, wrec->w_patternlen);
- }
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/checksignal.c b/winsup/testsuite/winsup.api/checksignal.c
deleted file mode 100644
index 47dc2f6..0000000
--- a/winsup/testsuite/winsup.api/checksignal.c
+++ /dev/null
@@ -1,91 +0,0 @@
-#include <errno.h>
-#include <signal.h>
-
-#include "test.h"
-#include "usctest.h"
-
-const char *TCID = "checksignal"; /* Test program identifier. */
-int TST_TOTAL = 3; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-void
-sig_handler (int signo)
-{
- errno = EINVAL;
-}
-
-int
-main ()
-{
- int n, ret;
- int fds[2];
- char buf[10];
- struct sigaction act;
- int i;
-
- Tst_count = 0;
-
- /* Reset SA_RESTART flag. */
- while ((ret = sigaction (SIGALRM, NULL, &act)) == EINTR)
- ;
- if (ret)
- tst_brk (TBROK, NULL, NULL, "Get signal action structure");
- act.sa_flags &= ~SA_RESTART;
- while ((ret = sigaction (SIGALRM, &act, NULL)) == EINTR)
- ;
- if (ret)
- tst_brk (TBROK, NULL, NULL, "Reset SA_RESTART");
-
- for (i = 0; i < 2; i++)
- {
- if (pipe (fds) < 0)
- tst_brk (TBROK, NULL, NULL, "Create pipe");
- /* Set signal handler using signal(2) call... */
- if (signal (SIGALRM, sig_handler) < 0)
- tst_brk (TBROK, NULL, NULL, "Call signal() to install signal handler");
- /* ...and check if signal(2) sets SA_RESTART again. */
- while ((ret = sigaction (SIGALRM, NULL, &act)) == EINTR)
- ;
- if (ret)
- tst_brk (TBROK, NULL, NULL, "Get signal action structure");
- tst_resm (act.sa_flags & SA_RESTART ? TPASS : TFAIL,
- "signal() sets SA_RESTART");
-
- const char *msg1, *msg2;
- if (i == 1)
- {
- siginterrupt (SIGALRM, 1);
- msg1 = "Reset SA_RESTART via siginterrupt";
- msg2 = "Set EINTR on interrupted read() call via siginterrupt";
- }
- else
- {
- /* Reset SA_RESTART flag again. */
- act.sa_handler = sig_handler;
- act.sa_flags &= ~SA_RESTART;
- while ((ret = sigaction (SIGALRM, &act, NULL)) == EINTR)
- ;
- msg1 = "Reset SA_RESTART via sigaction";
- msg2 = "Set EINTR on interrupted read() call via sigaction";
- }
- if (ret)
- tst_brk (TBROK, NULL, NULL, msg1);
-
- /* Start timer to force a SIGALRM. */
- alarm (1);
-
- /* Call read(2) to check if the EINTR errno is correctly preserved,
- even if the signal handler routine changes errno. */
- n = read(fds[0], buf, 10);
- tst_resm (n < 0 && errno == EINTR ? TPASS : TFAIL, msg2);
- close (fds[0]);
- close (fds[1]);
- }
-
- /* Check if another errno is correctly returned (here EBADF). */
- n = read(fds[0], buf, 10);
- tst_resm (n < 0 && errno == EBADF ? TPASS : TFAIL,
- "Set EBADF on closed file descriptor");
-
- tst_exit ();
-}
diff --git a/winsup/testsuite/winsup.api/crlf.c b/winsup/testsuite/winsup.api/crlf.c
deleted file mode 100644
index ea79122..0000000
--- a/winsup/testsuite/winsup.api/crlf.c
+++ /dev/null
@@ -1,527 +0,0 @@
-typedef enum {
- Nop=100000, /* ; do nothing */
- New1, /* ; reset and begin new test */
- Open, /* ; open test file */
- Read, /* [askfor] [get] ; read bytes into buffer */
- Write, /* [expect] [bytestream] ; write to file (expect 0 = ignore)*/
- Compare, /* [bytestream] ; compare buffer to given bytes */
- Verify, /* [bytestream] ; compare file to given bytes */
- Seek, /* [offset] [whence] ; seek in file */
- Tell, /* [offset] ; compare file positions */
- BufSize, /* [size] ; change the stdio buffer size */
- Flush, /* ; flush the stdio stream */
- Text, /* ; switch file to text mode */
- Binary, /* ; switch file to binary mode */
- Rep, /* [count] ; repeat 'R' bytes (used in bytestream) */
- Fill, /* [posn] ; fill 'F' until given byte position */
- Start, /* ; for Seek */
- Current, /* ; for Seek */
- End, /* ; for Seek, or end of byte stream */
- Max } Opcode;
-
-#define New New1,__LINE__
-
-/* Byte streams are just inserted into the command stream, and must
- end in an End code. */
-
-int commands[] = {
-#ifndef __DJGPP__
- New,
- Write, 1605, Rep, 1600, 'h', 'e', 'l', 'l', 'o', End,
- Tell, 1605,
-
- Open,
- BufSize, 16,
- Read, 1605, 1605,
- Compare, Rep, 1600, 'h', 'e', 'l', 'l', 'o', End,
- Tell, 1605,
- Flush,
- Tell, 1605,
- Seek, 1000, Start,
- Tell, 1000,
-
- New,
- Text,
- Write, 2, 'x', 10, End,
- Verify, 'x', 13, 10, End,
-
- New,
- Binary,
- Write, 2, 'x', 10, End,
- Verify, 'x', 10, End,
-
- BufSize, 16,
-
- New,
- Binary,
- Write, 0, Fill, 15, 13, 10, 'x', End,
- Text, Open,
- Read, 17, 17,
- Compare, Fill, 15, 10, 'x', End,
- Tell, 18,
-
- New,
- Binary,
- Write, 0, Fill, 14, 13, 10, 'x', End,
- Text, Open,
- Read, 16, 16,
- Compare, Fill, 14, 10, 'x', End,
- Tell, 17,
-
- New,
- Binary,
- Write, 0, 13, 10, 'a', 'b', End,
- Text, Open,
- Read, 2, 2,
- Compare, 10, 'a', End,
- Tell, 3,
-
- New,
- Binary,
- Write, 0, 10, 'a', 'b', End,
- Text, Open,
- Read, 2, 2,
- Compare, 10, 'a', End,
- Tell, 2,
-
- New,
- Binary,
- Write, 0, 13, 'a', 'b', End,
- Text, Open,
- Read, 2, 2,
- Compare, 13, 'a', End,
- Tell, 2,
-
- New,
- Binary,
- Write, 0, 13, 13, 10, 'a', End,
- Text, Open,
- Read, 2, 2,
- Compare, 13, 10, End,
- Tell, 3,
-
- New,
- Binary,
- Write, 0, 13, 10, 'a', 13, End,
- Text, Open,
- Read, 2, 2,
- Compare, 10, 'a', End,
- Tell, 3,
-
- New,
- Binary,
- Write, 0, 13, 10, 'a', 10, End,
- Text, Open,
- Read, 2, 2,
- Compare, 10, 'a', End,
- Tell, 3,
-
- New,
- Binary,
- Write, 0, 13, 13, 13, 10, 'a', 10, 10, 10, End,
- Text, Open,
- Read, 4, 4,
- Compare, 13, 13, 10, 'a', End,
- Tell, 5,
-#endif
-
- New,
- Binary,
- Write, 0, 13, 13, 13, 10, 'a', 'b', 13, 10, 13, 10, End,
- Text, Open,
- Read, 4, 4,
- Compare, 13, 13, 10, 'a', End,
- Tell, 5,
-
- };
-
-/*==========================================================================*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <string.h>
-
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
-#ifndef O_TEXT
-#define O_TEXT 0
-#endif
-
-int errors = 0;
-
-#define num_commands (int)(sizeof(commands)/sizeof(commands[0]))
-
-int pc;
-int askfor, get, expect, count, posn, whence, size;
-
-typedef struct {
- unsigned char *bytes;
- int max, count;
-} Buffer;
-
-Buffer rw_buf={0,0,0}, cmp_buf={0,0,0}, vfy_buf={0,0,0};
-
-void
-expand_buf(Buffer *buf, int len)
-{
- if (buf->max < len)
- {
- buf->max = len+20;
- if (buf->bytes)
- buf->bytes = (unsigned char *)realloc(buf->bytes, buf->max);
- else
- buf->bytes = (unsigned char *)malloc(buf->max);
- }
-}
-
-void
-get_bytestream(Buffer *buf)
-{
- int tpc;
- int len = 0, rep, byte;
- unsigned char *bp;
-
- for (tpc = pc+1; tpc < num_commands && commands[tpc] != End; tpc++)
- {
- switch (commands[tpc])
- {
- case Rep:
- len += commands[tpc+1];
- tpc ++;
- break;
- case Fill:
- if (len < commands[tpc+1])
- len = commands[tpc+1];
- tpc ++;
- break;
- default:
- len ++;
- break;
- }
- }
-
- expand_buf(buf, len);
-
- len = 0;
- bp = buf->bytes;
-
- for (tpc = pc+1; tpc < num_commands && commands[tpc] != End; tpc++)
- {
- switch (commands[tpc])
- {
- case Rep:
- rep = commands[++tpc];
- byte = 'R';
- while (rep--) *bp++ = byte;
- break;
- case Fill:
- rep = commands[++tpc];
- byte = 'F';
- while (bp-buf->bytes < rep) *bp++ = byte;
- break;
- default:
- *bp++ = commands[tpc];
- break;
- }
- }
- buf->count = bp - buf->bytes;
- pc = tpc;
-}
-
-char dataname[] = "crlf.dat";
-
-int verbose=0;
-void
-v(char *fmt, ...)
-{
- va_list ap;
- if (!verbose) return;
- va_start(ap, fmt);
- vfprintf(stdout, fmt, ap);
- va_end(ap);
- printf("\n");
-}
-
-void
-vp(const char *fmt, ...)
-{
- va_list ap;
- if (!verbose) return;
- printf("%08x: ", pc);
- va_start(ap, fmt);
- vfprintf(stdout, fmt, ap);
- va_end(ap);
- printf("\n");
-}
-
-void
-errorq(int use_errno, const char *fmt, ...)
-{
- va_list ap;
- fprintf(stderr, "crlf: Error at pc=%d: ", pc);
- va_start(ap, fmt);
- vfprintf(stderr, fmt, ap);
- va_end(ap);
- fprintf(stderr, "\n");
- if (use_errno)
- perror("The error was");
- errors++;
-}
-
-void
-error(int use_errno, const char *fmt, ...)
-{
- va_list ap;
- fprintf(stderr, "crlf: Error at pc=%d: ", pc);
- va_start(ap, fmt);
- vfprintf(stderr, fmt, ap);
- va_end(ap);
- fprintf(stderr, "\n");
- if (use_errno)
- perror("The error was");
- fprintf(stderr, "FAIL\n");
- exit(1);
-}
-
-void
-display_buf(const char *which, Buffer *buf, int ofs)
-{
- int i;
- fprintf(stderr, "%s %04x:", which, ofs);
- for (i=0; i<8; i++)
- if (i+ofs < buf->count)
- {
- unsigned char b = buf->bytes[i+ofs];
- fprintf(stderr, " %02x", b);
- if (isgraph(b))
- fprintf(stderr, " %c ", b);
- else
- fprintf(stderr, " . "/*, b*/);
- }
- fprintf(stderr, "\n");
-}
-
-void
-compare_bufs(const char *name, Buffer *actual, Buffer *expected)
-{
- int i, got_one=0;
- for (i=0; i<actual->count && i<expected->count; i++)
- if (actual->bytes[i] != expected->bytes[i])
- {
- errorq(0, "%s: byte mismatch at offset 0x%x", name, i);
- got_one = 1;
- break;
- }
- if (!got_one)
- {
- if (actual->count < expected->count)
- errorq(0, "%s: too few bytes (0x%x vs 0x%x)", name,
- actual->count, expected->count);
- else if (actual->count > expected->count)
- errorq(0, "%s: too many bytes (0x%x vs 0x%x)", name,
- actual->count, expected->count);
- else
- return;
- }
-
- i -= 4;
- if (i<0) i = 0;
- display_buf("Actual ", actual, i);
- display_buf("Expected", expected, i);
-}
-
-int
-main(int argc, char **argv)
-{
- const char *readmode = "rb";
- const char *writemode = "wb";
- FILE *file = 0;
- int i;
- struct stat st;
- const char *str = "";
-
- while (argc > 1 && argv[1][0] == '-')
- {
- if (strcmp(argv[1], "-v") == 0)
- verbose++;
- argc--;
- argv++;
- }
-
- size = 0;
-
- for (pc=0; pc<num_commands; pc++)
- {
- switch (commands[pc])
- {
- case Nop:
- vp("Nop");
- break;
-
- case New1:
- i = commands[++pc];
- vp("New %d", i);
- if (file) fclose(file);
- file = 0;
- remove(dataname);
- break;
-
- case Open:
- vp("Open");
- if (file) fclose(file);
- file = 0;
- break;
-
- case Read:
- if (!file)
- {
- file = fopen(dataname, readmode);
- if (size)
- setvbuf(file, 0, _IOFBF, size);
- }
- if (!file)
- error(1, "cannot open %s, mode %s", dataname, readmode);
- askfor = commands[++pc];
- get = commands[++pc];
- vp("Read %d %d", askfor, get);
- expand_buf(&rw_buf, askfor);
- if (askfor == 1)
- {
- i = getc(file);
- rw_buf.bytes[0] = i;
- i = (i == EOF) ? 0 : 1;
- }
- else
- i = fread(rw_buf.bytes, 1, askfor, file);
- if (i != get)
- error(0, "read wrong number of bytes (%d vs %d)", i, get);
- rw_buf.count = i;
- break;
-
- case Write:
- if (!file)
- {
- file = fopen(dataname, writemode);
- if (size)
- setvbuf(file, 0, _IOFBF, size);
- }
- if (!file)
- error(1, "cannot open %s, mode %s\n", dataname, writemode);
- expect = commands[++pc];
- get_bytestream(&rw_buf);
- vp("Write %d %d", rw_buf.count, expect);
- if (askfor == 1)
- {
- i = putc(rw_buf.bytes[0], file);
- i = (i == EOF) ? 0 : 1;
- }
- else
- i = fwrite(rw_buf.bytes, 1, rw_buf.count, file);
- if (expect && (i != expect))
- error(0, "wrote wrong number of bytes (%d vs %d)", i, expect);
- break;
-
- case Compare:
- get_bytestream(&cmp_buf);
- vp("Compare %d/%d", rw_buf.count, cmp_buf.count);
- compare_bufs("Compare", &rw_buf, &cmp_buf);
- break;
-
- case Verify:
- if (file) fclose(file);
- file = 0;
- get_bytestream(&cmp_buf);
- vp("Verify %s", dataname);
- if (stat(dataname, &st))
- error(1, "Can't stat %s", dataname);
- expand_buf(&vfy_buf, st.st_size);
- i = open(dataname, O_RDONLY|O_BINARY, 0);
- vfy_buf.count = read(i, vfy_buf.bytes, st.st_size);
- close(i);
- compare_bufs("Verify", &vfy_buf, &cmp_buf);
- break;
-
- case Seek:
- posn = commands[++pc];
- whence = commands[++pc];
- switch (whence)
- {
- case Start:
- whence = SEEK_SET;
- str = "Start";
- break;
- case Current:
- whence = SEEK_CUR;
- str = "Current";
- break;
- case End:
- whence = SEEK_END;
- str = "End";
- break;
- }
- vp("Seek 0x%x %s", posn, str);
- i = fseek(file, posn, whence);
- if (i)
- error(1, "fseek failed");
- break;
-
- case Tell:
- posn = commands[++pc];
- vp("Tell 0x%x", posn);
- i = ftell(file);
- if (i != posn)
- error(0, "ftell failed, got 0x%x expected 0x%x", i, posn);
- break;
-
- case BufSize:
- size = commands[++pc];
- vp("BufSize 0x%x", size);
- if (file)
- {
- fflush(file);
- setvbuf(file, 0, _IOFBF, size);
- }
- break;
-
- case Flush:
- vp("Flush");
- if (file)
- fflush(file);
- break;
-
- case Text:
- vp("Text");
- readmode = "rt";
- writemode = "wt";
- break;
-
- case Binary:
- vp("Binary");
- readmode = "rb";
- writemode = "wb";
- break;
-
- default:
- printf("Invalid command code %d at offset %d\n", commands[pc], pc);
- exit(1);
- }
- }
-
- if (file) fclose(file);
-
- if (errors)
- printf("FAIL: %d error%s\n", errors, errors==1?"":"s");
- else
- {
- printf("PASS\n");
- unlink (dataname);
- }
- return errors;
-}
diff --git a/winsup/testsuite/winsup.api/cygload.cc b/winsup/testsuite/winsup.api/cygload.cc
deleted file mode 100644
index bdbbcd1..0000000
--- a/winsup/testsuite/winsup.api/cygload.cc
+++ /dev/null
@@ -1,628 +0,0 @@
-/* cygload.cc
-
- Copyright 2005, 2006 Red Hat, Inc.
-
- Written by Max Kaehn <slothman@electric-cloud.com>
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for details.
-
- Note that dynamically linking to cygwin1.dll automatically places your code
- under the GPL unless you purchase a Cygwin Contract with Red Hat, Inc.
- See http://www.redhat.com/software/cygwin/ for more information.
-
- cygload demonstrates how to dynamically load cygwin1.dll. The default
- build uses MinGW to compile it; the Makefile also shows how to build
- it using the Microsoft compiler.
-
- By default, the program will silently test basic functionality:
- * Making space on the stack for cygtls
- * Loading and initializing cygwin1.dll
- * Path translation
- * Error handling
- * Signal handling
-
- Options for this program:
- -v Verbose output. Normal operation is entirely silent,
- save for errors.
- -testinterrupts Pauses the program for 30 seconds so you can demonstrate
- that it handles ^C properly.
- -cygwin Name of DLL to load. Defaults to "cygwin1.dll". */
-
-#include "cygload.h"
-#include <iostream>
-#include <sstream>
-#include <vector>
-#include <errno.h> // for ENOENT
-#include <sys/types.h>
-#include <sys/stat.h>
-
-using std::cout;
-using std::cerr;
-using std::endl;
-using std::string;
-
-cygwin::padding *cygwin::padding::_main = NULL;
-DWORD cygwin::padding::_mainTID = 0;
-
-// A few cygwin constants.
-static const int SIGHUP = 1;
-static const int SIGINT = 2;
-static const int SIGTERM = 15; // Cygwin won't deliver this one to us;
- // expect unadorned "kill" to just kill
- // your process.
-static const int SIGSTOP = 17; // Cygwin insists on delivering SIGSTOP to
- // the main thread. If your main thread
- // is not interruptible, you'll miss the
- // signal and ignore the request to suspend.
-static const int SIGTSTP = 18; // ^Z on a tty.
-static const int SIGCONT = 19; // Resume a stopped process.
-static const int SIGUSR1 = 30;
-static const int SIGUSR2 = 31;
-
-// Using *out instead of cout. In verbose mode, out == &cout.
-static std::ostream *out = NULL;
-
-cygwin::padding::padding ()
-{
- _main = this;
- _mainTID = GetCurrentThreadId ();
-
- _end = _padding + sizeof (_padding);
- char *stackbase;
-#ifdef __GNUC__
- __asm__ (
- "movl %%fs:4, %0"
- :"=r"(stackbase)
- );
-#else
- __asm
- {
- mov eax, fs:[4];
- mov stackbase, eax;
- }
-#endif
- _stackbase = stackbase;
-
- // We've gotten as close as we can to the top of the stack. Even
- // subverting the entry point, though, still doesn't get us there-- I'm
- // getting 64 bytes in use before the entry point. So we back up the data
- // there and restore it when the destructor is called:
- if ((_stackbase - _end) != 0)
- {
- size_t delta = (_stackbase - _end);
-
- _backup.resize (delta);
-
- memcpy (&(_backup[0]), _end, delta);
- }
-}
-
-cygwin::padding::~padding ()
-{
- _main = NULL;
-
- if (_backup.size ())
- {
- memcpy (_end, &(_backup[0]), _backup.size ());
- }
-}
-
-void
-cygwin::padding::check ()
-{
- if (_main == NULL)
- throw std::runtime_error ("No padding declared!");
- if (_mainTID != GetCurrentThreadId ())
- throw std::runtime_error ("You need to initialize cygwin::connector "
- "in the same thread in which you declared the "
- "padding.");
-
- if (_main->_backup.size ())
- *out << "Warning! Stack base is "
- << static_cast<void *>(_main->_stackbase)
- << ". padding ends at " << static_cast<void *>(_main->_end)
- << ". Delta is " << (_main->_stackbase - _main->_end)
- << ". Stack variables could be overwritten!" << endl;
-}
-
-cygwin::connector::connector (const char *dll)
-{
- // This will throw if padding is not in place.
- padding::check ();
-
- *out << "Loading " << dll << "..." << endl;
-
- // This should call init.cc:dll_entry() with DLL_PROCESS_ATTACH,
- // which calls dll_crt0_0().
- if ((_library = LoadLibrary (dll)) == NULL)
- throw windows_error ("LoadLibrary", dll);
-
- *out << "Initializing cygwin..." << endl;
-
- // This calls dcrt0.cc:cygwin_dll_init(), which calls dll_crt0_1(),
- // which will, among other things:
- // * spawn the cygwin signal handling thread from sigproc_init()
- // * initialize the thread-local storage for this thread and overwrite
- // the first 4K of the stack
- void (*cyginit) ();
- get_symbol ("cygwin_dll_init", cyginit);
- (*cyginit) ();
-
- *out << "Loading symbols..." << endl;
-
- // Pick up the function pointers for the basic infrastructure.
- get_symbol ("__errno", _errno);
- get_symbol ("strerror", _strerror);
- get_symbol ("cygwin_conv_to_full_posix_path", _conv_to_full_posix_path);
- get_symbol ("cygwin_conv_to_full_win32_path", _conv_to_full_win32_path);
-
- // Note that you need to be running an interruptible cygwin function if
- // you want to receive signals. You can use the standard signal()
- // mechanism if you're willing to have your main thread spend all its time
- // in interruptible cygwin functions like sleep(). Christopher Faylor
- // cautions that this solution "could be slightly racy": if a second
- // signal comes in before the first one is done processing, the thread
- // won't be back in sigwait() to catch it.
- *out << "Spawning signal handling thread..." << endl;
-
- _waiting_for_signals = true;
- _signal_thread_done = false;
- InitializeCriticalSection (&_thread_mutex);
-
- DWORD tid;
-
- _signal_thread = CreateThread (NULL, // Default security.
- 32768, // Adjust the stack size as
- // appropriate for what your signal
- // handler needs in order to run, and
- // then add 4K for cygtls.
- &signal_thread, // Function to call
- this, // Context
- 0, // Flags
- &tid); // Thread ID
-
- if (_signal_thread == NULL)
- throw windows_error ("CreateThread", "signal_thread");
-}
-
-cygwin::connector::~connector ()
-{
- try
- {
- // First, shut down signal handling.
- int (*raze) (int);
- int (*pthread_join) (void *, void **);
-
- get_symbol ("raise", raze);
- get_symbol ("pthread_join", pthread_join);
-
- // Tell the listener to shut down...
- _waiting_for_signals = false;
- int err = 0;
- EnterCriticalSection (&_thread_mutex);
- if (!_signal_thread_done)
- err = raze (SIGUSR2);
- LeaveCriticalSection (&_thread_mutex);
- if (err)
- cerr << error (this, "raise", "SIGUSR2").what () << endl;
- // ...and get the thread to join.
- if (!CloseHandle (_signal_thread))
- throw windows_error ("CloseHandle", "signal_thread");
-
- // This should call init.cc:dll_entry() with DLL_PROCESS_DETACH.
- if (!FreeLibrary (_library))
- throw windows_error ("FreeLibrary", "cygwin1.dll");
- }
- catch (std::exception &x)
- {
- cerr << x.what () << endl;
- }
-}
-
-DWORD WINAPI
-cygwin::connector::signal_thread (void *param)
-{
- connector *that = reinterpret_cast < connector * > (param);
-
- try
- {
- that->await_signal ();
- }
- catch (std::exception &x)
- {
- cerr << "signal_thread caught " << x.what () << endl;
- return 0;
- }
- return 0;
-}
-
-void
-cygwin::connector::await_signal ()
-{
- // Wait for signals.
- unsigned long sigset[32];
- int sig;
- int (*empty) (void *);
- int (*add) (void *, int);
- int (*wait) (void *, int *);
-
- get_symbol ("sigemptyset", empty);
- get_symbol ("sigaddset", add);
- get_symbol ("sigwait", wait);
-
- empty (sigset);
- add (sigset, SIGHUP);
- add (sigset, SIGINT);
-// add (sigset, SIGSTOP);
-// add (sigset, SIGTSTP); // I can't get this to suspend properly, so
- // I'll leave it up to chance that the main
- // thread is interruptible.
- add (sigset, SIGUSR1);
- add (sigset, SIGUSR2);
-
- while (_waiting_for_signals)
- {
- int err = wait (sigset, &sig);
- if (err)
- cerr << error (this, "sigwait").what () << endl;
- else
- *out << "Received signal " << sig << "." << endl;
- switch (sig)
- {
- case SIGUSR2:
- if (!_waiting_for_signals)
- {
- // SIGUSR2 is how ~connector wakes this thread
- goto done;
- }
- break;
- default:
- break;
- }
- handle_signals (sig);
- }
-done:
- EnterCriticalSection (&_thread_mutex);
- _signal_thread_done = true;
- LeaveCriticalSection (&_thread_mutex);
-
- *out << "await_signal done." << endl;
-}
-
-cygwin::connector::signal_handler *
-cygwin::connector::set_handler (int signal, signal_handler *handler)
-{
- signal_handler *retval = _signal_handlers[signal];
-
- if (handler == NULL)
- _signal_handlers.erase (signal);
- else
- _signal_handlers[signal] = handler;
-
- return retval;
-}
-
-void
-cygwin::connector::handle_signals (int sig)
-{
- callback_list::iterator h = _signal_handlers.find (sig);
-
- if (h != _signal_handlers.end ())
- {
- try
- {
- signal_handler *handler = h->second;
- (*handler) (sig);
- return;
- }
- catch (std::exception &x)
- {
- cerr << "cygwin::connector::handle_signals caught "
- << x.what () << "!" << endl;
- return;
- }
- }
-
- cerr << "No handler for signal " << sig << "!" << endl;
-}
-
-int
-cygwin::connector::err_no () const
-{
- int *e = (*_errno) ();
- if (e == NULL)
- {
- return -1;
- }
- return *e;
-}
-
-string
-cygwin::connector::str_error (int err_no) const
-{
- string retval;
-
- const char *s = (*_strerror) (err_no);
- if (s != NULL)
- {
- retval = s;
- }
- else
- {
- std::ostringstream o;
- o << "Unexpected errno " << err_no;
- retval = o.str ();
- }
-
- return retval;
-}
-
-string
-cygwin::connector::unix_path (const string &windows) const
-{
- char buf[MAX_PATH];
-
- _conv_to_full_posix_path (windows.c_str (), buf);
-
- return string (buf);
-}
-
-string
-cygwin::connector::win_path (const string &unix) const
-{
- char buf[MAX_PATH];
-
- _conv_to_full_win32_path (unix.c_str (), buf);
-
- return string (buf);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-
-string
-cygwin::error::format (cygwin::connector *c,
- int err_no, const char *message, const char *detail)
-{
- std::ostringstream ret;
-
- ret << message;
- if (detail)
- {
- ret << "(" << detail << ")";
- }
- ret << ": " << c->str_error (err_no);
-
- return ret.str ();
-}
-
-string
-windows_error::format (DWORD error, const char *message, const char *detail)
-{
- std::ostringstream ret;
- char buf[512];
- DWORD bytes;
-
- ret << message;
- if (detail)
- ret << "(" << detail << ")";
- ret << ": ";
-
- bytes = FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM, 0, error,
- MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
- buf, sizeof (buf), 0);
-
- if (bytes == 0)
- ret << "Unexpected Windows error " << error;
- else
- {
- // Remove trailing whitespace
- char *p = buf + bytes - 1;
- while (isspace (*p))
- *p-- = '\0';
- ret << buf << " (" << error << ")";
- }
-
- return ret.str ();
-}
-
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-
-extern "C" int mainCRTStartup ();
-
-// This just pushes 4K onto the stack, backs up the original stack, and
-// jumps into the regular startup code. This avoids having to worry about
-// backing up argc and argv.
-extern "C" int __stdcall
-cygloadCRTStartup ()
-{
- cygwin::padding padding;
- return mainCRTStartup ();
-}
-
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-
-static void
-hangup (int sig)
-{
- cout << "Hangup (" << sig << ")." << endl;
-}
-
-static void
-interrupt (int sig)
-{
- cerr << "Interrupt (" << sig << ")!" << endl;
- exit (0);
-}
-
-static int caught = false;
-
-static void
-catch_signal (int)
-{
- *out << "Signals are working." << endl;
- caught = true;
-}
-
-int
-main (int argc, char *argv[])
-{
- // If you do not want to use cygloadCRTStartup() as an entry point,
- // uncomment this line, but be sure to have *everything* you want
- // from the stack below it backed up before you call the
- // constructor for cygwin::connector.
- //cygwin::padding padding;
-
- std::ostringstream output;
- bool verbose = false, testinterrupts = false;
- const char *dll = "cygwin1.dll";
-
- out = &output;
-
- for (int i = 1; i < argc; ++i)
- {
- string arg = string (argv[i]);
-
- if (arg == "-v")
- {
- verbose = true;
- out = &cout;
- }
- else if (arg == "-testinterrupts")
- testinterrupts = true;
- else if (arg == "-cygwin")
- {
- if (i+1 >= argc)
- {
- cerr << "Need to supply an argument with -cygwin." << endl;
- return 255;
- }
- dll = argv[++i];
- }
- }
-
-
- try
- {
- *out << "Connecting to cygwin..." << endl;
- cygwin::connector cygwin (dll);
- *out << "Successfully connected." << endl;
-
- string result = cygwin.str_error (ENOENT);
-
- if (result != "No such file or directory")
- {
- cerr << "strerror(ENOENT) returned \""
- << result
- << "\" instead of \"No such file or directory\"!"
- << endl;
- return 1;
- }
- else if (verbose)
- {
- *out << "strerror(ENOENT) = " << result << endl;
- }
-
- // Path conversion: from cygwin to Windows...
- result = cygwin.win_path ("/usr");
- struct _stat statbuf;
- if (::_stat (result.c_str (), &statbuf) < 0)
- {
- cerr << "stat(\"" << result << "\") failed!" << endl;
- return 2;
- }
- else if (verbose)
- {
- *out << "/usr == " << result << endl;
- }
-
- // ...and back:
- char buf[MAX_PATH], scratch[256];
- GetSystemDirectory (buf, sizeof(buf));
- int (*cygstat) (const char *, void *);
- cygwin.get_symbol ("stat", cygstat);
-
- if (cygstat (buf, scratch) < 0)
- {
- cerr << "cygwin stat(\"" << buf << "\") failed!" << endl;
- return 3;
- }
- else if (verbose)
- {
- *out << buf << " == " << cygwin.unix_path(buf) << endl;
- }
-
- // Test error handling. This should output
- // "open(/potrzebie/furshlugginer): No such file or directory"
- {
- int (*cygopen) (const char *, int);
- cygwin.get_symbol ("open", cygopen);
-
- if (cygopen ("/potrzebie/furshlugginer", 0 /* O_RDONLY */ ) < 0)
- {
- int err = cygwin.err_no ();
- if (err != ENOENT)
- {
- cerr << "cygwin open(\"/potrzebie/furshlugginer\", "
- "O_RDONLY): expected to fail with ENOENT, got "
- << err << "!" << endl;
- return 4;
- }
- if (verbose)
- *out << cygwin::error (&cygwin, "open",
- "/potrzebie/furshlugginer").what ()
- << endl;
- }
- else
- {
- cerr << "/potrzebie/furshlugginer should not exist!"
- << endl;
- return 5;
- }
- }
-
- // And signal handling:
- std::pointer_to_unary_function < int , void > h1 (&hangup);
- std::pointer_to_unary_function < int , void > h2 (&interrupt);
- std::pointer_to_unary_function < int , void > h3 (&catch_signal);
- cygwin.set_handler (SIGHUP, &h1);
- cygwin.set_handler (SIGINT, &h2);
- cygwin.set_handler (SIGUSR1, &h3);
-
- // Make sure the signal handler thread has had time to start...
- Sleep (100);
- // Send a test signal to set "caught" to true...
- int (*raze) (int);
- cygwin.get_symbol ("raise", raze);
- raze (SIGUSR1);
- // And give the thread time to wait for the shutdown signal.
- Sleep (100);
-
- if (testinterrupts)
- {
- // This is a worst case scenario for testing interrupts: the
- // main thread is in a long-duration Windows API call. This
- // makes the main thread uninterruptible; cygwin will retry
- // 20 times, with a low_priority_sleep(0) between each try.
- cout << "Sleeping for 30 seconds, waiting for a signal..." << endl;
- Sleep (30000);
- cout << "Done waiting." << endl;
- }
- }
- catch (std::exception &x)
- {
- cerr << x.what () << endl;
- return 2;
- }
-
- if (caught)
- return 0;
- else
- {
- cerr << "Never received SIGUSR1." << endl;
- return 1;
- }
-}
diff --git a/winsup/testsuite/winsup.api/cygload.exp b/winsup/testsuite/winsup.api/cygload.exp
deleted file mode 100644
index a07a549..0000000
--- a/winsup/testsuite/winsup.api/cygload.exp
+++ /dev/null
@@ -1,40 +0,0 @@
-source "site.exp"
-
-if { ! [isnative] } {
- verbose "skipping cygload because it's not native \"$target_triplet\" != \"$build_triplet\""
- return
-}
-
-proc ws_spawn {cmd args} {
- global rv
- verbose "running $cmd\n"
- set rv {}
- # First item in rv is the return code, second item is the message
- lappend rv [catch "exec $cmd" message] $message
- verbose send "catchCode = $rv\n"
-}
-
-ws_spawn "gcc -mno-cygwin $srcdir/$subdir/cygload.cc -o mingw-cygload.exe -lstdc++ -Wl,-e,_cygloadCRTStartup@0"
-
-if { $rv != {0 {}} } {
- verbose -log "$rv"
- fail "cygload (compile)"
-} else {
- if { $verbose } {
- set redirect_output "./mingw-cygwin.log"
- } else {
- set redirect_output /dev/null
- }
- set windows_runtime_root [exec cygpath -m $runtime_root]
- ws_spawn "./mingw-cygload.exe -cygwin $windows_runtime_root/cygwin0.dll > $redirect_output"
- if { $rv != {0 {}} } {
- verbose -log "cygload: $rv"
- fail "cygload (execute)"
- } else {
- pass "cygload"
- }
- catch { file delete "mingw-cygload.exe" } err
- if { $err != "" } {
- note "error deleting mingw-cygload.exe: $err"
- }
-}
diff --git a/winsup/testsuite/winsup.api/cygload.h b/winsup/testsuite/winsup.api/cygload.h
deleted file mode 100644
index c7c5620..0000000
--- a/winsup/testsuite/winsup.api/cygload.h
+++ /dev/null
@@ -1,158 +0,0 @@
-// cygload.h -*- C++ -*-
-//
-// Copyright 2005, Red Hat, Inc.
-//
-// Written by Max Kaehn <slothman@electric-cloud.com>
-//
-// This software is a copyrighted work licensed under the terms of the
-// Cygwin license. Please consult the file "CYGWIN_LICENSE" for details.
-//
-// Note that dynamically linking to cygwin1.dll automatically places your code
-// under the GPL unless you purchase a Cygwin Contract with Red Hat, Inc.
-// See http://www.redhat.com/software/cygwin/ for more information.
-
-// This program has large numbers of progress messages so as to provide
-// maximum information about crash locations for anyone without access to
-// a Microsoft debugger.
-
-
-// This file contains the basic infrastructure for connecting an MSVC
-// process to Cygwin.
-
-#ifndef __CYGLOAD_H__
-#define __CYGLOAD_H__
-
-#include <windows.h> // for GetProcAddress()
-#include <functional> // for pointer_to_unary_function
-#include <stdexcept> // for runtime_error
-#include <string>
-#include <map>
-#include <vector>
-
-// Convert GetLastError() to a human-readable STL exception.
-class windows_error : public std::runtime_error
-{
-public:
- windows_error (const char *message, const char *detail = NULL)
- : runtime_error (format (GetLastError (), message, detail)) { }
- windows_error(DWORD error, const char *message, const char *detail = NULL)
- : runtime_error (format (error, message, detail)) { }
-
- static std::string format (DWORD error, const char *message,
- const char *detail);
-};
-
-namespace cygwin
-{
-
- // Cygwin keeps important thread-local information at the top of the
- // stack. Its DllMain-equivalent will do the right thing for any threads
- // you spawn, but you need to declare one of these as the very first thing
- // in your main() function so horrible things won't happen when cygwin
- // overwrites your stack. This will back up the data that will be
- // overwritten and restore it when the destructor is called.
- class padding {
- public:
- padding ();
- ~padding ();
-
- // Verifies that padding has been declared.
- static void check ();
-
- private:
- std::vector< char > _backup;
- char *_stackbase, *_end;
-
- // gdb reports sizeof(_cygtls) == 3964 at the time of this writing.
- // This is at the end of the object so it'll be toward the bottom
- // of the stack when it gets declared.
- char _padding[32768];
-
- static padding *_main;
- static DWORD _mainTID;
- };
-
- // This hooks your application up to cygwin: it loads cygwin1.dll,
- // initializes it properly, grabs some important symbols, and
- // spawns a thread to let you receive signals from cygwin.
- class connector {
- public:
- connector (const char *dll = "cygwin1.dll");
- ~connector ();
-
- // A wrapper around GetProcAddress() for fetching symbols from the
- // cygwin DLL. Can throw windows_error.
- template < class T > void get_symbol (const char *name, T &fn) const;
-
- // Wrappers for errno() and strerror().
- int err_no () const;
- std::string str_error (int) const;
-
- // Converting between the worlds of Windows and Cygwin.
- std::string unix_path (const std::string &windows) const;
- std::string win_path (const std::string &unix) const;
-
- private:
- HMODULE _library;
-
- int *(*_errno) ();
- const char *(*_strerror) (int);
- void (*_conv_to_full_posix_path) (const char *, char *);
- void (*_conv_to_full_win32_path) (const char *, char *);
-
- public:
- // The constructor will automatically hook you up for receiving
- // cygwin signals. Just specify a signal and pass in a signal_handler.
- typedef std::pointer_to_unary_function<int,void> signal_handler;
- signal_handler *set_handler (int signal, signal_handler *);
-
- private:
- // Cygwin signals can only be received in threads that are calling
- // interruptible functions or otherwise ready to intercept signals, so
- // we spawn a thread that does nothing but call sigwait().
-
- // This is the entry point:
- static DWORD WINAPI signal_thread (void *);
- // It runs this:
- void await_signal ();
- // And will execute this on receipt of any signal for which it's
- // registered:
- void handle_signals (int);
-
- HANDLE _signal_thread;
- bool _waiting_for_signals, _signal_thread_done;
- CRITICAL_SECTION _thread_mutex;
-
- typedef std::map< int, signal_handler * > callback_list;
- callback_list _signal_handlers;
- };
-
- template <class T> void connector::get_symbol (const char *name,
- T &symbol) const
- {
- FARPROC retval = NULL;
-
- retval = GetProcAddress (_library, name);
-
- if (retval == NULL)
- throw windows_error ("GetProcAddress", name);
-
- symbol = reinterpret_cast < T > (retval);
- }
-
- // cygwin::error converts errno to a human-readable exception.
- class error : public std::runtime_error
- {
- public:
- error (connector *c, const char *function, const char *detail = NULL)
- : runtime_error (format (c, c->err_no (), function, detail)) { }
- error (connector *c, int err_no, const char *function,
- const char *detail = NULL)
- : runtime_error (format (c, err_no, function, detail)) { }
-
- static std::string format(connector *c, int err_no,
- const char *message, const char *detail);
- };
-}
-
-#endif // __CYGLOAD_H__
diff --git a/winsup/testsuite/winsup.api/devdsp.c b/winsup/testsuite/winsup.api/devdsp.c
deleted file mode 100644
index d5ed653..0000000
--- a/winsup/testsuite/winsup.api/devdsp.c
+++ /dev/null
@@ -1,783 +0,0 @@
-/* devdsp.c: Device tests for /dev/dsp
-
- Copyright 2004 Red Hat, Inc
-
- Written by Gerd Spalink (Gerd.Spalink@t-online.de)
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* Conventions used here:
- We use the libltp framework
- 1. Any unexpected behaviour leads to an exit with nonzero exit status
- 2. Unexpected behaviour from /dev/dsp results in an exit status of TFAIL
- 3. Unexpected behaviour from OS (malloc, fork, waitpid...) result
- in an exit status of TBROK */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/wait.h>
-#include <sys/types.h>
-#include <sys/soundcard.h>
-#include <math.h>
-#include <errno.h>
-#include "test.h" /* use libltp framework */
-
-/* Controls if a child can open the device after the parent */
-#define CHILD_EXPECT 0 /* 0 or 1 */
-
-static const char wavfile_okay[] =
- {
-#include "devdsp_okay.h" /* a sound sample */
- };
-
-/* Globals required by libltp */
-const char *TCID = "devdsp"; /* set test case identifier */
-int TST_TOTAL = 37;
-
-/* Prototypes */
-void sinegen (void *wave, int rate, int bits, int len, int stride);
-void sinegenw (int freq, int samprate, short *value, int len, int stride);
-void sinegenb (int freq, int samprate, unsigned char *value, int len,
- int stride);
-void playtest (int fd, int rate, int stereo, int bits);
-void rectest (int fd, int rate, int stereo, int bits);
-void rwtest (int fd, int rate, int stereo, int bits);
-void setpars (int fd, int rate, int stereo, int bits);
-void forkplaytest (void);
-void forkrectest (void);
-void recordingtest (void);
-void playbacktest (void);
-void monitortest (void);
-void ioctltest (void);
-void abortplaytest (void);
-void playwavtest (void);
-void syncwithchild (pid_t pid, int expected_exit_status);
-void cleanup (void);
-void dup_test (void);
-
-static int expect_child_failure = 0;
-
-/* Sampling rates we want to test */
-static const int rates[] = { 44100, 22050, 8000 };
-
-/* Combinations of stereo/bits we want to test */
-struct sb
-{
- int stereo;
- int bits;
-};
-static const struct sb sblut[] = { {0, 8}, {0, 16}, {1, 8}, {1, 16} };
-
-int
-main (int argc, char *argv[])
-{
- /* tst_brkm(TBROK, cleanup, "see if it breaks all right"); */
- ioctltest ();
- playbacktest ();
- recordingtest ();
- monitortest ();
- forkplaytest ();
- forkrectest ();
- abortplaytest ();
- playwavtest ();
- dup_test ();
- tst_exit ();
- /* NOTREACHED */
- return 0;
-}
-
-/* test some extra ioctls */
-void
-ioctltest (void)
-{
- int audio1;
- int ioctl_par;
- int channels;
-
- tst_resm (TINFO, "Running %s", __FUNCTION__);
- audio1 = open ("/dev/dsp", O_WRONLY);
- if (audio1 < 0)
- {
- tst_brkm (TFAIL, cleanup, "open W: %s", strerror (errno));
- }
- setpars (audio1, 44100, 1, 16);
-
- channels = ioctl_par = 1;
- while (ioctl (audio1, SNDCTL_DSP_CHANNELS, &ioctl_par) == 0)
- {
- channels++;
- ioctl_par = channels;
- }
- if (channels == ioctl_par)
- tst_resm (TFAIL, "Max channels=%d failed", ioctl_par);
- else
- tst_resm (TPASS, "Max channels=%d failed, OK=%d", channels, ioctl_par);
-
- /* Note: block size may depend on parameters */
- if (ioctl (audio1, SNDCTL_DSP_GETBLKSIZE, &ioctl_par) < 0)
- {
- tst_brkm (TFAIL, cleanup, "ioctl GETBLKSIZE: %s", strerror (errno));
- }
- tst_resm (TPASS, "ioctl get buffer size=%d", ioctl_par);
- if (ioctl (audio1, SNDCTL_DSP_GETFMTS, &ioctl_par) < 0)
- {
- tst_brkm (TFAIL, cleanup, "ioctl GETFMTS: %s", strerror (errno));
- }
- tst_resm (TPASS, "ioctl get formats=%08x", ioctl_par);
- if (ioctl (audio1, SNDCTL_DSP_GETCAPS, &ioctl_par) < 0)
- {
- tst_brkm (TFAIL, cleanup, "ioctl GETCAPS: %s", strerror (errno));
- }
- tst_resm (TPASS, "ioctl get caps=%08x", ioctl_par);
- if (close (audio1) < 0)
- {
- tst_brkm (TFAIL, cleanup, "Close audio: %s", strerror (errno));
- }
-}
-
-/* test write / play */
-void
-playbacktest (void)
-{
- int audio1, audio2;
- int rate, k;
-
- tst_resm (TINFO, "Running %s", __FUNCTION__);
- audio1 = open ("/dev/dsp", O_WRONLY);
- if (audio1 < 0)
- {
- tst_brkm (TFAIL, cleanup, "Error open /dev/dsp W: %s",
- strerror (errno));
- }
- audio2 = open ("/dev/dsp", O_WRONLY);
- if (audio2 >= 0)
- {
- tst_brkm (TFAIL, cleanup,
- "Second open /dev/dsp W succeeded, but is expected to fail");
- }
- else if (errno != EBUSY)
- {
- tst_brkm (TFAIL, cleanup, "Expected EBUSY here, exit: %s",
- strerror (errno));
- }
- for (rate = 0; rate < sizeof (rates) / sizeof (int); rate++)
- for (k = 0; k < sizeof (sblut) / sizeof (struct sb); k++)
- {
- playtest (audio1, rates[rate], sblut[k].stereo, sblut[k].bits);
- tst_resm (TPASS, "Play bits=%2d stereo=%d rate=%5d",
- sblut[k].bits, sblut[k].stereo, rates[rate]);
- }
- if (close (audio1) < 0)
- {
- tst_brkm (TFAIL, cleanup, "Close audio: %s", strerror (errno));
- }
-}
-
-/* test read / record */
-void
-recordingtest (void)
-{
- int audio1, audio2;
- int rate, k;
-
- /* test read / record */
- tst_resm (TINFO, "Running %s", __FUNCTION__);
- audio1 = open ("/dev/dsp", O_RDONLY);
- if (audio1 < 0)
- {
- tst_brkm (TFAIL, cleanup, "Error open /dev/dsp R: %s",
- strerror (errno));
- }
- audio2 = open ("/dev/dsp", O_RDONLY);
- if (audio2 >= 0)
- {
- tst_brkm (TFAIL, cleanup,
- "Second open /dev/dsp R succeeded, but is expected to fail");
- }
- else if (errno != EBUSY)
- {
- tst_brkm (TFAIL, cleanup, "Expected EBUSY here, exit: %s",
- strerror (errno));
- }
- for (rate = 0; rate < sizeof (rates) / sizeof (int); rate++)
- for (k = 0; k < sizeof (sblut) / sizeof (struct sb); k++)
- {
- rectest (audio1, rates[rate], sblut[k].stereo, sblut[k].bits);
- tst_resm (TPASS, "Record bits=%2d stereo=%d rate=%5d",
- sblut[k].bits, sblut[k].stereo, rates[rate]);
- }
- if (close (audio1) < 0)
- {
- tst_brkm (TFAIL, cleanup, "Close audio: %s", strerror (errno));
- }
-}
-
-/* simultaneous read/write */
-void
-monitortest (void)
-{
- int fd;
-
- tst_resm (TINFO, "Running %s", __FUNCTION__);
- fd = open ("/dev/dsp", O_RDWR);
- if (fd < 0)
- {
- tst_brkm (TFAIL, cleanup, "open RW: %s", strerror (errno));
- }
- rwtest (fd, 44100, 1, 16);
- tst_resm (TPASS, "Record+Play rate=44100, stereo, 16 bits");
- if (close (fd) < 0)
- {
- tst_brkm (TFAIL, cleanup, "Close audio: %s", strerror (errno));
- }
-}
-
-void
-forkrectest (void)
-{
- int pid;
- int fd;
-
- tst_resm (TINFO, "Running %s", __FUNCTION__);
- fd = open ("/dev/dsp", O_RDONLY);
- if (fd < 0)
- {
- tst_brkm (TFAIL, cleanup, "Error open /dev/dsp R: %s",
- strerror (errno));
- }
- pid = fork ();
- if (pid < 0)
- {
- tst_brkm (TBROK, cleanup, "Fork failed: %s", strerror (errno));
- }
- if (pid)
- {
- tst_resm (TINFO, "forked, child PID=%d", pid);
- syncwithchild (pid, 0);
- tst_resm (TINFO, "parent records..");
- rectest (fd, 22050, 1, 16);
- tst_resm (TINFO, "parent done");
- }
- else
- { /* child */
- tst_resm (TINFO, "child records..");
- rectest (fd, 44100, 1, 16);
- tst_resm (TINFO, "child done");
- fflush (stdout);
- exit (0); /* implicit close */
- }
- tst_resm (TPASS, "child records after fork");
- /* fork again, but now we have done a read before,
- * so the child is expected to fail
- */
- pid = fork ();
- if (pid < 0)
- {
- tst_brkm (TBROK, cleanup, "Fork failed: %s", strerror (errno));
- }
- if (pid)
- {
- tst_resm (TINFO, "forked, child PID=%d", pid);
- syncwithchild (pid, CHILD_EXPECT?TFAIL:0); /* expecting error exit */
- tst_resm (TINFO, "parent records again ..");
- rectest (fd, 22050, 1, 16);
- tst_resm (TINFO, "parent done");
- }
- else
- { /* child */
- expect_child_failure = CHILD_EXPECT;
- tst_resm (TINFO, "child trying to record %s",
- CHILD_EXPECT?"(should fail)..":"");
- rectest (fd, 44100, 1, 16);
- /* NOTREACHED */
- tst_resm (TINFO, "child done");
- fflush (stdout);
- exit (0); /* implicit close */
- }
- if (close (fd) < 0)
- {
- tst_brkm (TFAIL, cleanup, "Close audio: %s", strerror (errno));
- }
- tst_resm (TPASS, "child tries to record while parent is already recording");
-}
-
-void
-forkplaytest (void)
-{
- int pid;
- int fd;
-
- tst_resm (TINFO, "Running %s", __FUNCTION__);
- fd = open ("/dev/dsp", O_WRONLY);
- if (fd < 0)
- {
- tst_brkm (TFAIL, cleanup, "Error open /dev/dsp R: %s",
- strerror (errno));
- }
- pid = fork ();
- if (pid < 0)
- {
- tst_brkm (TBROK, cleanup, "Fork failed: %s", strerror (errno));
- }
- if (pid)
- {
- tst_resm (TINFO, "forked, child PID=%d", pid);
- syncwithchild (pid, 0);
- tst_resm (TINFO, "parent plays..");
- playtest (fd, 22050, 0, 8);
- tst_resm (TINFO, "parent done");
- }
- else
- { /* child */
- tst_resm (TINFO, "child plays..");
- playtest (fd, 44100, 1, 16);
- tst_resm (TINFO, "child done");
- fflush (stdout);
- exit (0); /* implicit close */
- }
- tst_resm (TPASS, "child plays after fork");
- /* fork again, but now we have done a write before,
- * so the child is expected to fail
- */
- pid = fork ();
- if (pid < 0)
- {
- tst_brkm (TBROK, cleanup, "Fork failed");
- }
- if (pid)
- {
- tst_resm (TINFO, "forked, child PID=%d", pid);
- syncwithchild (pid, CHILD_EXPECT?TFAIL:0); /* expected failure */
- tst_resm (TINFO, "parent plays again..");
- playtest (fd, 22050, 0, 8);
- tst_resm (TINFO, "parent done");
- }
- else
- { /* child */
- expect_child_failure = CHILD_EXPECT;
- tst_resm (TINFO, "child trying to play %s",
- CHILD_EXPECT?"(should fail)..":"");
- playtest (fd, 44100, 1, 16);
- /* NOTREACHED */
- tst_resm (TINFO, "child done");
- fflush (stdout);
- exit (0); /* implicit close */
- }
- if (close (fd) < 0)
- {
- tst_brkm (TFAIL, cleanup, "Close audio: %s", strerror (errno));
- }
- tst_resm (TPASS, "child tries to play while parent is already playing");
-}
-
-void
-playtest (int fd, int rate, int stereo, int bits)
-{ /* Play sine waves, always 0.25 sec */
- void *wave;
- int n, c, b;
- int size;
- if (stereo)
- c = 2;
- else
- c = 1;
- if (bits == 8)
- b = 1;
- else
- b = 2;
- size = rate / 4 * c * b;
-
- wave = malloc (size);
- if (wave == NULL)
- {
- tst_brkm (TBROK, cleanup, "Malloc failed, exit");
- }
- setpars (fd, rate, stereo, bits);
- sinegen (wave, rate, bits, rate / 4, c);
-
- if ((n = write (fd, wave, size)) < 0)
- {
- tst_brkm (TFAIL, cleanup, "write: %s", strerror (errno));
- }
- if (n != size)
- {
- tst_brkm (TFAIL, cleanup, "Wrote %d, expected %d; exit", n, size);
- }
- free (wave);
-}
-
-void
-rectest (int fd, int rate, int stereo, int bits)
-{
- void *wave;
- int n, c, b;
- int size;
- if (stereo)
- c = 2;
- else
- c = 1;
- if (bits == 8)
- b = 1;
- else
- b = 2;
- size = rate / 4 * c * b;
-
- wave = malloc (size);
- if (wave == NULL)
- {
- tst_brkm (TBROK, cleanup, "Malloc failed, exit");
- }
- setpars (fd, rate, stereo, bits);
- if ((n = read (fd, wave, size)) < 0)
- {
- tst_brkm (TFAIL, cleanup, "read: %s", strerror (errno));
- }
- if (n != size)
- {
- tst_brkm (TFAIL, cleanup, "Read n=%d (%d expected); exit", n, size);
- }
- if ((n = read (fd, wave, size)) < 0)
- {
- tst_brkm (TFAIL, cleanup, "read: %s", strerror (errno));
- }
- if (n != size)
- {
- tst_brkm (TFAIL, cleanup, "Read n=%d (%d expected); exit", n, size);
- }
- free (wave);
-}
-
-void
-rwtest (int fd, int rate, int stereo, int bits)
-{
- int pid;
- void *wave;
- int n, c, b;
- int size;
- if (stereo)
- c = 2;
- else
- c = 1;
- if (bits == 8)
- b = 1;
- else
- b = 2;
- size = rate / 4 * c * b;
-
- wave = malloc (size);
- if (wave == NULL)
- {
- tst_brkm (TBROK, cleanup, "Malloc failed, exit");
- }
- setpars (fd, rate, stereo, bits);
- pid = fork ();
- if (pid < 0)
- {
- tst_brkm (TBROK, cleanup, "Fork failed: %s", strerror (errno));
- }
- if (pid)
- {
- tst_resm (TINFO, "forked, child PID=%d parent records", pid);
- if ((n = read (fd, wave, size)) < 0)
- {
- tst_brkm (TFAIL, cleanup, "read: %s", strerror (errno));
- }
- if (n != size)
- {
- tst_brkm (TFAIL, cleanup, "Read n=%d (%d expected)", n, size);
- }
- free (wave);
- syncwithchild (pid, 0);
- }
- else
- { /* child */
- tst_resm (TINFO, "child plays");
- sinegen (wave, rate, bits, rate / 4, c);
- if ((n = write (fd, wave, size)) < 0)
- {
- tst_brkm (TFAIL, cleanup, "child write: %s", strerror (errno));
- }
- if (n != size)
- {
- tst_brkm (TFAIL, cleanup, "child write n=%d OK (%d expected)", n,
- size);
- }
- free (wave);
- exit (0);
- }
-}
-
-void
-setpars (int fd, int rate, int stereo, int bits)
-{
- int ioctl_par = 0;
-
- if (ioctl (fd, SNDCTL_DSP_SAMPLESIZE, &bits) < 0)
- {
- if (expect_child_failure)
- { /* Note: Don't print this to stderr because we expect failures here
- * for the some cases after fork()
- */
- tst_resm (TINFO, "ioctl SNDCTL_DSP_SAMPLESIZE: %s",
- strerror (errno));
- exit (TFAIL);
- }
- else
- {
- tst_brkm (TFAIL, cleanup, "ioctl SNDCTL_DSP_SAMPLESIZE: %s",
- strerror (errno));
- }
- }
- if (ioctl (fd, SNDCTL_DSP_STEREO, &stereo) < 0)
- {
- tst_brkm (TFAIL, cleanup, "ioctl SNDCTL_DSP_STEREO: %s",
- strerror (errno));
- }
- if (ioctl (fd, SNDCTL_DSP_SPEED, &rate) < 0)
- {
- tst_brkm (TFAIL, cleanup, "ioctl SNDCTL_DSP_SPEED: %s",
- strerror (errno));
- }
- if (ioctl (fd, SNDCTL_DSP_SYNC, &ioctl_par) < 0)
- {
- tst_brkm (TFAIL, cleanup, "ioctl SNDCTL_DSP_SYNC: %s",
- strerror (errno));
- }
-}
-
-void
-syncwithchild (pid_t pid, int expected_exit_status)
-{
- int status;
-
- if (waitpid (pid, &status, 0) != pid)
- {
- tst_brkm (TBROK, cleanup, "Wait for child: %s", strerror (errno));
- }
- if (!WIFEXITED (status))
- {
- tst_brkm (TBROK, cleanup, "Child had abnormal exit");
- }
- if (WEXITSTATUS (status) != expected_exit_status)
- {
- tst_brkm (TFAIL, cleanup, "Child had exit status %d != %d",
- WEXITSTATUS (status), expected_exit_status);
- }
-}
-
-void
-sinegen (void *wave, int rate, int bits, int len, int stride)
-{
- if (bits == 8)
- {
- sinegenb (1000, rate, (unsigned char *) wave, len, stride);
- if (stride == 2)
- sinegenb (800, rate, (unsigned char *) wave + 1, len, stride);
- }
- else
- {
- sinegenw (1000, rate, (short *) wave, len, stride);
- if (stride == 2)
- sinegenw (800, rate, (short *) wave + 1, len, stride);
- }
-}
-
-void
-sinegenw (int freq, int samprate, short *value, int len, int stride)
-{
- double phase, incr;
-
- phase = 0.0;
- incr = M_PI * 2.0 * (double) freq / (double) samprate;
- while (len-- > 0)
- {
- *value = (short) floor (0.5 + 6553 * sin (phase));
- value += stride;
- phase += incr;
- }
-}
-
-void
-sinegenb (int freq, int samprate, unsigned char *value, int len, int stride)
-{
- double phase, incr;
-
- phase = 0.0;
- incr = M_PI * 2.0 * (double) freq / (double) samprate;
- while (len-- > 0)
- {
- *value = (unsigned char) floor (128.5 + 26 * sin (phase));
- value += stride;
- phase += incr;
- }
-}
-
-void
-abortplaytest (void)
-{
- int audio;
- int size = sizeof (wavfile_okay);
- int n;
- int ioctl_par = 0;
-
- tst_resm (TINFO, "Running %s", __FUNCTION__);
- audio = open ("/dev/dsp", O_WRONLY);
- if (audio < 0)
- {
- tst_brkm (TFAIL, cleanup, "Error open /dev/dsp W: %s",
- strerror (errno));
- }
- if ((n = write (audio, wavfile_okay, size)) < 0)
- {
- tst_brkm (TFAIL, cleanup, "write: %s", strerror (errno));
- }
- if (n != size)
- {
- tst_brkm (TFAIL, cleanup, "Wrote %d, expected %d; exit", n, size);
- }
- if (ioctl (audio, SNDCTL_DSP_RESET, &ioctl_par) < 0)
- {
- tst_brkm (TFAIL, cleanup, "ioctl DSP_RESET: %s", strerror (errno));
- }
- if (close (audio) < 0)
- {
- tst_brkm (TFAIL, cleanup, "Close audio: %s", strerror (errno));
- }
- tst_resm (TPASS, "Playwav + ioctl DSP_RESET=%d", ioctl_par);
-}
-
-void
-playwavtest (void)
-{
- int audio;
- int size = sizeof (wavfile_okay);
- int n;
-
- tst_resm (TINFO, "Running %s", __FUNCTION__);
- audio = open ("/dev/dsp", O_WRONLY);
- if (audio < 0)
- {
- tst_brkm (TFAIL, cleanup, "Error open /dev/dsp W: %s",
- strerror (errno));
- }
- if ((n = write (audio, wavfile_okay, size)) < 0)
- {
- tst_brkm (TFAIL, cleanup, "write: %s", strerror (errno));
- }
- if (n != size)
- {
- tst_brkm (TFAIL, cleanup, "Wrote %d, expected %d; exit", n, size);
- }
- if (close (audio) < 0)
- {
- tst_brkm (TFAIL, cleanup, "Close audio: %s", strerror (errno));
- }
- tst_resm (TPASS, "Set parameters from wave file header");
-}
-
-void dup_test (void)
-{
- int audio, fd, n;
- int bits1, bits2;
- int size = sizeof (wavfile_okay);
- int header = 44;
- const char *okay = wavfile_okay + header;
-
- tst_resm (TINFO, "Running %s", __FUNCTION__);
- audio = open ("/dev/dsp", O_WRONLY);
- if (audio < 0)
- {
- tst_brkm (TFAIL, cleanup, "Error open /dev/dsp W: %s",
- strerror (errno));
- }
- /* write header once to set parameters correctly */
- n = write (audio, wavfile_okay, header);
- if (n != header)
- {
- tst_brkm (TFAIL, cleanup, "Wrote %d, expected %d; exit", n, header);
- }
- size = size - header;
- /* dup / close */
- for (fd = audio+1; fd <= audio+5; fd++)
- if (dup2 (fd-1, fd) != -1)
- {
- if (fd-2 >= audio)
- if (close (fd-2) < 0)
- {
- tst_brkm (TFAIL, cleanup, "Close audio: %s", strerror (errno));
- }
- if ((n = write (fd, okay, size)) < 0)
- {
- tst_brkm (TFAIL, cleanup, "write: %s", strerror (errno));
- }
- if (n != size)
- {
- tst_brkm (TFAIL, cleanup, "Wrote %d, expected %d; exit", n, size);
- }
- }
- else
- tst_brkm (TFAIL, cleanup, "dup: %s", strerror (errno));
-
- for (fd = audio+4; fd <= audio+5; fd++)
- if (close (fd) < 0)
- {
- tst_brkm (TFAIL, cleanup, "Close audio: %s", strerror (errno));
- }
- tst_resm (TPASS, "Write to duped fd");
-
- audio = open ("/dev/dsp", O_WRONLY);
- if (audio < 0)
- {
- tst_brkm (TFAIL, cleanup, "Error open /dev/dsp W: %s",
- strerror (errno));
- }
- fd = audio + 1;
- if (dup2 (audio, fd) == -1)
- {
- tst_brkm (TFAIL, cleanup, "dup: %s", strerror (errno));
- }
- bits1 = AFMT_U8;
- if (ioctl (audio, SNDCTL_DSP_SAMPLESIZE, &bits1) < 0)
- {
- tst_brkm (TFAIL, cleanup, "ioctl: %s", strerror (errno));
- }
- bits1 = AFMT_S16_LE;
- if (ioctl (fd, SNDCTL_DSP_SAMPLESIZE, &bits1) < 0)
- {
- tst_brkm (TFAIL, cleanup, "ioctl: %s", strerror (errno));
- }
- bits1 = AFMT_QUERY;
- if (ioctl (audio, SNDCTL_DSP_SAMPLESIZE, &bits1) < 0)
- {
- tst_brkm (TFAIL, cleanup, "ioctl: %s", strerror (errno));
- }
- bits2 = AFMT_QUERY;
- if (ioctl (fd, SNDCTL_DSP_SAMPLESIZE, &bits2) < 0)
- {
- tst_brkm (TFAIL, cleanup, "ioctl: %s", strerror (errno));
- }
- if (bits1 != AFMT_S16_LE || bits2 != AFMT_S16_LE)
- {
- tst_brkm (TFAIL, cleanup, "Inconsistent state of duped fd: %d %d %d",
- AFMT_S16_LE,bits1,bits2);
- }
- if (close (audio) < 0)
- {
- tst_brkm (TFAIL, cleanup, "Close audio: %s", strerror (errno));
- }
- if (close (fd) < 0)
- {
- tst_brkm (TFAIL, cleanup, "Close audio: %s", strerror (errno));
- }
- tst_resm (TPASS, "Parameter change to duped fd");
-}
-void
-cleanup (void)
-{
-}
diff --git a/winsup/testsuite/winsup.api/devdsp_okay.h b/winsup/testsuite/winsup.api/devdsp_okay.h
deleted file mode 100644
index 0fefa63..0000000
--- a/winsup/testsuite/winsup.api/devdsp_okay.h
+++ /dev/null
@@ -1,531 +0,0 @@
-/* This is the decimal representation of a wave file.
- It contains the spoken word "okay" sampled at 11025 Hz
- and 8 bit resolution. */
- 82, 73, 70, 70, 108, 30, 0, 0, 87, 65, 86, 69, 102, 109, 116, 32, 16, 0, 0,
- 0, 1, 0, 1, 0, 17, 43, 0, 0, 17, 43, 0, 0, 1, 0, 8, 0, 100, 97, 116, 97,
- 72, 30, 0, 0, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116,
- 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116,
- 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
- 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116,
- 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 115, 114, 114, 115, 115,
- 115, 117, 117, 117, 116, 115, 115, 115, 115, 116, 116, 116, 118, 116, 115,
- 115, 115, 115, 115, 116, 116, 116, 117, 116, 116, 115, 116, 116, 116, 116,
- 117, 116, 116, 117, 116, 115, 116, 116, 116, 117, 117, 117, 116, 116, 117,
- 116, 116, 116, 117, 117, 117, 117, 116, 116, 116, 118, 117, 117, 117, 117,
- 116, 116, 116, 116, 116, 116, 117, 117, 117, 117, 116, 116, 116, 116, 116,
- 116, 116, 117, 116, 116, 116, 115, 116, 116, 116, 116, 116, 117, 116, 116,
- 116, 116, 116, 116, 116, 116, 116, 116, 117, 115, 115, 116, 116, 116, 116,
- 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117,
- 116, 117, 117, 117, 117, 117, 117, 117, 117, 117, 118, 119, 118, 118, 118,
- 118, 119, 119, 119, 119, 119, 120, 120, 120, 120, 121, 120, 120, 120, 120,
- 121, 121, 120, 119, 118, 116, 115, 114, 115, 114, 113, 112, 112, 111, 112,
- 113, 114, 116, 116, 117, 117, 117, 116, 115, 115, 115, 115, 116, 115, 115,
- 114, 114, 114, 114, 114, 114, 114, 116, 115, 115, 115, 114, 114, 113, 113,
- 114, 115, 115, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116,
- 115, 115, 115, 115, 116, 116, 116, 118, 117, 117, 117, 117, 117, 118, 118,
- 119, 119, 119, 120, 120, 120, 120, 120, 120, 121, 121, 121, 120, 119, 118,
- 117, 117, 117, 116, 117, 116, 116, 115, 115, 115, 115, 115, 116, 116, 117,
- 116, 116, 116, 116, 116, 116, 116, 115, 115, 115, 114, 113, 113, 113, 113,
- 113, 113, 113, 115, 114, 113, 113, 113, 113, 114, 114, 114, 115, 114, 114,
- 114, 114, 114, 114, 114, 115, 116, 115, 115, 115, 115, 114, 114, 115, 115,
- 115, 117, 116, 116, 116, 116, 116, 116, 117, 117, 118, 118, 119, 118, 118,
- 118, 118, 119, 120, 120, 121, 121, 122, 122, 123, 124, 125, 126, 127, 126,
- 126, 126, 126, 127, -127, 124, 114, 102, 94, 89, 94, 102, 109, 115, 120,
- 124, 123, 122, 121, 117, 116, 121, 124, 125, 124, 120, 114, 109, 107, 105,
- 104, 108, 111, 115, 118, 120, 118, 116, 114, 114, 116, 117, 119, 120, 119,
- 118, 116, 113, 112, 111, 113, 117, 120, 122, 122, 121, 118, 115, 114, 113,
- 112, 113, 114, 113, 114, 114, 112, 111, 110, 110, 113, 116, 118, 119, 120,
- 119, 116, 115, 114, 112, 111, 114, 114, 115, 115, 113, 110, 109, 110, 113,
- 115, 118, 120, 120, 119, 119, 116, 114, 112, 112, 113, 114, 115, 115, 114,
- 115, 114, 114, 115, 117, 117, 118, 119, 119, 118, 117, 116, 115, 115, 116,
- 116, 118, 119, 119, 119, 118, 118, 118, 119, 120, 121, 122, 123, 123, 123,
- 122, 122, 124, 122, 121, 119, 118, 117, 115, 115, 115, 115, 116, 117, 118,
- 118, 119, 117, 112, 110, 110, 110, 111, 117, 118, 118, 118, 119, 118, 116,
- 115, 114, 114, 116, 118, 118, 116, 116, 115, 113, 112, 113, 113, 114, 117,
- 117, 117, 117, 115, 113, 112, 111, 108, 108, 110, 111, 113, 115, 116, 115,
- 115, 116, 116, 114, 115, 115, 114, 115, 114, 112, 111, 113, 112, 113, 115,
- 116, 117, 118, 118, 117, 116, 117, 115, 115, 116, 117, 117, 118, 118, 119,
- 119, 119, 120, 122, 122, 124, 125, 126, -128, -127, -126, -124, -121,
- -117, -112, -113, -123, 121, 108, 91, 75, 75, 84, 91, 103, 119, 127, -128,
- -126, -127, 124, 120, 122, 121, 123, 127, 126, 120, 114, 110, 104, 99,
- 101, 104, 107, 114, 120, 123, 123, 122, 119, 116, 116, 117, 116, 117, 118,
- 117, 115, 113, 111, 110, 111, 113, 116, 120, 123, 124, 123, 121, 118, 115,
- 113, 112, 112, 112, 114, 113, 112, 110, 107, 107, 107, 110, 112, 116, 119,
- 120, 119, 118, 115, 113, 110, 110, 111, 112, 113, 114, 114, 116, 115, 114,
- 115, 116, 117, 118, 119, 119, 118, 117, 116, 115, 113, 114, 114, 115, 117,
- 119, 119, 120, 120, 120, 121, 122, 123, 123, 125, 127, -128, -127, -126,
- -126, -124, -121, -120, -119, -123, 124, 113, 101, 90, 81, 81, 87, 96,
- 108, 121, 127, -127, -125, -125, 126, 122, 121, 120, 120, 122, 121, 118,
- 114, 110, 106, 103, 102, 104, 106, 112, 117, 120, 122, 123, 122, 119, 117,
- 117, 116, 115, 116, 116, 115, 115, 114, 113, 113, 113, 115, 117, 119, 120,
- 120, 120, 118, 114, 112, 110, 108, 108, 108, 109, 110, 112, 111, 112, 112,
- 112, 112, 112, 114, 117, 117, 118, 117, 115, 113, 112, 111, 111, 113, 114,
- 116, 118, 119, 119, 118, 118, 118, 117, 117, 117, 118, 117, 118, 118, 118,
- 119, 119, 120, 121, 122, 124, 126, 127, -128, -127, -124, -122, -120,
- -117, -115, -117, -125, 119, 102, 85, 77, 76, 83, 91, 103, 115, 124, -125,
- -122, -126, 124, 121, 119, 119, 121, 122, 121, 118, 117, 114, 109, 106,
- 103, 102, 107, 112, 117, 119, 122, 122, 120, 119, 117, 114, 112, 114, 114,
- 115, 116, 115, 114, 114, 114, 114, 116, 116, 118, 119, 120, 121, 119, 116,
- 113, 109, 108, 107, 107, 109, 111, 112, 113, 114, 115, 113, 112, 112, 112,
- 113, 114, 115, 116, 115, 114, 113, 113, 113, 113, 113, 114, 117, 117, 118,
- 118, 117, 117, 117, 116, 116, 117, 117, 118, 119, 118, 118, 118, 118, 119,
- 120, 121, 122, 124, 126, -128, -127, -125, -124, -123, -120, -117, -114,
- -115, -123, 119, 102, 84, 76, 76, 80, 90, 102, 115, 125, -124, -120, -125,
- 124, 121, 119, 119, 120, 121, 121, 120, 119, 117, 110, 105, 101, 101, 104,
- 110, 114, 118, 121, 123, 122, 120, 118, 115, 113, 114, 116, 116, 117, 117,
- 115, 115, 114, 114, 113, 114, 117, 118, 120, 120, 119, 117, 114, 111, 109,
- 107, 107, 107, 109, 112, 115, 115, 115, 115, 115, 114, 113, 113, 113, 113,
- 114, 114, 114, 114, 113, 113, 113, 114, 116, 117, 118, 119, 119, 120, 118,
- 118, 117, 116, 117, 117, 118, 118, 118, 119, 119, 120, 121, 121, 121, 123,
- 124, 125, 126, -128, -127, -124, -121, -118, -116, -112, -114, -123, 118,
- 99, 81, 75, 77, 82, 92, 104, 114, 125, -123, -122, -128, 123, 120, 118,
- 119, 121, 121, 120, 121, 121, 117, 112, 107, 102, 102, 105, 110, 114, 118,
- 121, 124, 123, 121, 118, 114, 113, 113, 113, 115, 116, 116, 117, 117, 116,
- 115, 115, 115, 115, 116, 118, 119, 118, 118, 115, 112, 110, 107, 106, 107,
- 110, 112, 115, 117, 118, 117, 117, 115, 113, 112, 112, 111, 112, 113, 113,
- 113, 114, 114, 116, 115, 116, 117, 118, 119, 119, 118, 118, 117, 116, 115,
- 116, 116, 117, 118, 119, 121, 120, 120, 121, 121, 121, 121, 121, 122, 123,
- 125, 125, 126, -127, -124, -122, -119, -117, -115, -117, -123, 120, 102,
- 88, 81, 80, 85, 92, 100, 110, 120, -127, -125, 127, 123, 121, 120, 121,
- 122, 121, 121, 123, 122, 119, 114, 109, 104, 103, 104, 107, 110, 114, 117,
- 119, 121, 121, 119, 117, 114, 114, 114, 116, 117, 117, 117, 118, 118, 117,
- 115, 113, 113, 113, 115, 116, 117, 116, 114, 113, 110, 109, 109, 110, 111,
- 113, 116, 117, 117, 116, 115, 112, 111, 110, 109, 112, 113, 115, 117, 118,
- 117, 117, 116, 115, 114, 115, 115, 116, 118, 119, 120, 120, 120, 118, 117,
- 116, 116, 116, 118, 118, 120, 121, 122, 122, 122, 120, 120, 120, 121, 123,
- 125, 127, -126, -123, -121, -120, -119, -118, -120, -128, 115, 101, 91,
- 87, 86, 89, 94, 100, 109, 117, 123, 125, 123, 121, 119, 119, 120, 121,
- 120, 121, 122, 122, 121, 117, 112, 107, 105, 106, 106, 108, 111, 113, 117,
- 119, 119, 118, 117, 114, 113, 114, 115, 116, 117, 118, 119, 120, 118, 117,
- 114, 112, 112, 113, 113, 114, 114, 114, 114, 112, 111, 110, 110, 110, 111,
- 113, 114, 115, 115, 115, 113, 112, 111, 110, 111, 111, 113, 115, 116, 117,
- 117, 117, 116, 115, 115, 113, 114, 115, 116, 118, 119, 120, 120, 119, 118,
- 118, 117, 116, 117, 118, 119, 120, 121, 121, 121, 121, 121, 121, 121, 122,
- 123, 125, 127, -128, -126, -124, -122, -120, -120, -126, 119, 108, 101,
- 93, 91, 93, 93, 97, 105, 112, 117, 120, 120, 118, 117, 118, 118, 117, 118,
- 120, 122, 123, 123, 121, 116, 114, 110, 108, 107, 107, 108, 110, 114, 116,
- 117, 117, 116, 115, 114, 114, 114, 115, 117, 117, 119, 120, 120, 119, 118,
- 116, 115, 114, 113, 113, 112, 112, 112, 111, 111, 111, 111, 112, 112, 113,
- 113, 115, 116, 116, 116, 115, 115, 113, 113, 113, 113, 114, 115, 116, 117,
- 117, 117, 116, 116, 115, 116, 116, 116, 117, 118, 119, 120, 120, 120, 119,
- 119, 118, 118, 117, 117, 118, 119, 119, 120, 121, 121, 122, 123, 121, 121,
- 121, 122, 123, 125, 127, -127, -126, -125, -124, -127, 122, 115, 109, 103,
- 100, 101, 100, 102, 105, 109, 114, 115, 115, 115, 113, 113, 114, 114, 115,
- 117, 120, 121, 122, 123, 121, 118, 116, 113, 112, 111, 111, 111, 112, 114,
- 115, 116, 116, 115, 114, 113, 114, 113, 113, 114, 115, 117, 120, 121, 121,
- 120, 119, 118, 117, 115, 113, 113, 113, 113, 114, 114, 113, 113, 111, 111,
- 111, 111, 112, 112, 114, 116, 116, 117, 116, 116, 115, 115, 114, 114, 114,
- 116, 116, 117, 118, 118, 118, 118, 117, 117, 116, 116, 116, 118, 118, 119,
- 119, 118, 118, 118, 117, 117, 117, 117, 117, 119, 119, 119, 120, 120, 120,
- 120, 120, 119, 119, 119, 119, 120, 120, 120, 121, 120, 120, 120, 120, 120,
- 120, 119, 118, 117, 115, 114, 113, 113, 112, 112, 112, 112, 113, 113, 113,
- 114, 113, 113, 113, 113, 113, 114, 115, 116, 118, 117, 117, 117, 116, 116,
- 116, 115, 115, 115, 115, 116, 115, 115, 115, 115, 115, 115, 115, 115, 115,
- 117, 116, 117, 117, 117, 117, 117, 117, 117, 116, 116, 117, 116, 115, 115,
- 115, 115, 115, 115, 115, 114, 115, 114, 114, 114, 114, 114, 115, 115, 116,
- 117, 116, 116, 116, 116, 116, 116, 116, 116, 117, 117, 118, 117, 117, 117,
- 116, 116, 116, 116, 116, 117, 117, 118, 118, 117, 117, 117, 117, 117, 117,
- 117, 117, 117, 117, 118, 117, 117, 117, 116, 116, 116, 116, 116, 117, 117,
- 118, 117, 117, 117, 117, 116, 117, 117, 117, 117, 117, 117, 118, 117, 117,
- 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 115, 115,
- 115, 115, 115, 116, 114, 114, 115, 115, 115, 115, 116, 116, 116, 117, 116,
- 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116,
- 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 117, 117, 117,
- 118, 117, 117, 117, 117, 117, 117, 117, 117, 116, 116, 116, 117, 115, 115,
- 116, 116, 116, 117, 117, 117, 117, 117, 118, 117, 117, 117, 117, 117, 117,
- 117, 117, 117, 117, 117, 116, 116, 116, 116, 116, 116, 116, 117, 117, 116,
- 117, 116, 116, 116, 117, 117, 117, 117, 117, 117, 117, 118, 117, 117, 116,
- 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 117, 117,
- 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117,
- 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116,
- 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116,
- 116, 118, 117, 117, 117, 116, 116, 116, 116, 116, 115, 116, 116, 116, 116,
- 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116,
- 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 115,
- 115, 115, 116, 116, 117, 117, 117, 117, 117, 118, 116, 116, 116, 116, 116,
- 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 117, 117,
- 117, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116,
- 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116,
- 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117,
- 116, 117, 117, 116, 116, 116, 116, 116, 115, 116, 116, 116, 116, 116, 116,
- 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116,
- 116, 117, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 115, 115, 116,
- 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116,
- 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116,
- 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116,
- 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
- 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 117, 117, 117,
- 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116,
- 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116,
- 116, 117, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116,
- 116, 116, 116, 116, 117, 116, 117, 116, 117, 117, 117, 117, 117, 116, 116,
- 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116,
- 116, 116, 116, 117, 116, 116, 117, 117, 116, 116, 116, 117, 116, 116, 116,
- 116, 116, 116, 117, 117, 117, 116, 116, 116, 116, 116, 116, 116, 116, 117,
- 116, 116, 116, 116, 116, 117, 117, 116, 116, 117, 118, 117, 117, 117, 117,
- 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 117, 117,
- 117, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116,
- 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116,
- 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117,
- 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116,
- 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116,
- 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116,
- 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116,
- 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117,
- 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116,
- 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116,
- 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116,
- 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116,
- 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117,
- 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116,
- 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116,
- 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116,
- 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116,
- 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116,
- 114, 108, 108, 118, 125, -126, 123, 98, 95, 109, 117, 124, 127, 123, 118,
- 109, 103, 113, 125, -127, 120, 108, 106, 112, 115, 112, 110, 112, 111,
- 112, 112, 116, 120, 120, 118, 114, 113, 120, 122, 119, 116, 115, 115, 117,
- 117, 116, 115, 115, 115, 112, 107, 109, 119, 121, 120, 118, 114, 117, 120,
- 118, 119, 119, 117, 119, 116, 113, 119, 120, 117, 114, 112, 114, 117, 117,
- 116, 113, 114, 118, 117, 117, 119, 121, 118, 113, 114, 116, 116, 118, 116,
- 114, 113, 111, 112, 117, 118, 121, 119, 117, 117, 113, 110, 114, 117, 119,
- 117, 114, 113, 113, 114, 115, 115, 117, 117, 114, 114, 116, 119, 121, 119,
- 115, 116, 117, 117, 120, 122, 121, 115, 109, 112, 117, 117, 116, 115, 116,
- 117, 113, 113, 116, 118, 118, 115, 115, 118, 120, 120, 120, 118, 119, 120,
- 119, 119, 118, 119, 119, 117, 116, 117, 118, 119, 116, 115, 117, 118, 118,
- 118, 118, 118, 119, 119, 120, 120, 121, 120, 118, 118, 119, 119, 119, 118,
- 118, 117, 116, 117, 117, 118, 118, 117, 116, 117, 116, 117, 119, 118, 117,
- 116, 118, 120, 117, 117, 119, 120, 119, 118, 118, 118, 119, 118, 117, 116,
- 119, 118, 117, 116, 117, 118, 118, 117, 116, 117, 118, 117, 116, 116, 117,
- 118, 117, 115, 116, 118, 119, 117, 117, 119, 117, 117, 116, 117, 118, 118,
- 117, 116, 116, 117, 117, 117, 116, 116, 116, 117, 116, 115, 116, 116, 116,
- 118, 117, 116, 116, 117, 117, 117, 117, 117, 116, 115, 116, 116, 117, 118,
- 116, 114, 115, 115, 116, 116, 117, 117, 115, 115, 116, 116, 118, 118, 117,
- 117, 116, 116, 117, 117, 118, 117, 116, 116, 115, 115, 115, 115, 116, 118,
- 116, 115, 115, 116, 116, 116, 116, 117, 117, 117, 118, 117, 117, 117, 117,
- 116, 116, 116, 117, 115, 115, 114, 114, 115, 115, 115, 116, 115, 114, 114,
- 117, 116, 116, 115, 115, 115, 116, 116, 116, 116, 116, 115, 116, 116, 116,
- 116, 115, 115, 115, 116, 115, 115, 115, 116, 116, 116, 116, 115, 115, 116,
- 116, 117, 116, 116, 116, 117, 117, 116, 116, 116, 117, 117, 118, 117, 117,
- 117, 117, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 117,
- 118, 118, 117, 118, 117, 117, 117, 117, 117, 118, 117, 117, 116, 115, 117,
- 117, 117, 116, 115, 116, 117, 117, 117, 117, 117, 117, 116, 117, 117, 117,
- 116, 115, 115, 116, 117, 118, 116, 116, 118, 117, 116, 117, 117, 117, 116,
- 116, 116, 117, 116, 117, 115, 115, 116, 117, 117, 116, 115, 115, 117, 118,
- 119, 117, 116, 116, 115, 116, 117, 117, 116, 115, 115, 117, 117, 117, 115,
- 115, 115, 115, 114, 115, 116, 116, 115, 116, 116, 116, 116, 115, 116, 116,
- 116, 116, 115, 116, 116, 116, 116, 115, 116, 117, 116, 117, 118, 116, 116,
- 116, 116, 116, 117, 117, 117, 117, 118, 118, 117, 118, 118, 117, 116, 117,
- 117, 118, 118, 117, 115, 117, 118, 118, 118, 117, 115, 115, 117, 118, 117,
- 116, 116, 114, 115, 117, 117, 117, 116, 115, 116, 116, 116, 117, 116, 116,
- 115, 115, 115, 115, 116, 115, 114, 116, 115, 115, 115, 114, 113, 113, 113,
- 113, 114, 113, 112, 111, 113, 114, 113, 113, 114, 112, 113, 113, 113, 114,
- 113, 113, 113, 114, 114, 114, 114, 114, 114, 115, 115, 116, 117, 116, 116,
- 116, 117, 117, 117, 117, 117, 117, 118, 118, 120, 120, 121, 120, 120, 122,
- 123, 123, 125, 126, 127, -128, -128, -126, -124, -121, -117, -112, -113,
- -127, 106, 94, 105, 117, 114, 106, 94, 85, 89, 105, 116, 121, 118, 109,
- 106, 116, 127, -126, 127, 121, 116, 115, 117, 117, 117, 116, 112, 103, 99,
- 106, 110, 111, 108, 103, 104, 109, 112, 115, 116, 114, 111, 110, 113, 116,
- 118, 116, 112, 110, 111, 112, 112, 114, 115, 113, 111, 111, 113, 116, 118,
- 116, 115, 115, 117, 119, 120, 120, 120, 121, 122, 125, -126, -121, -119,
- -116, -111, -107, -100, -101, -111, 110, 73, 90, 124, 119, 96, 82, 71, 71,
- 95, 119, -127, 126, 114, 103, 115, -117, -108, -116, -126, 123, 119, 116,
- 114, 116, 118, 112, 101, 91, 93, 103, 112, 113, 107, 108, 111, 114, 120,
- 125, 124, 119, 111, 110, 116, 120, 117, 112, 107, 106, 108, 112, 112, 114,
- 114, 110, 107, 110, 115, 118, 117, 114, 111, 110, 112, 114, 116, 116, 114,
- 110, 110, 113, 117, 118, 116, 113, 114, 117, 118, 119, 120, 122, 123, 122,
- 124, -127, -124, -122, -117, -114, -112, -110, -103, -96, -116, 80, 53,
- 97, -125, 112, 89, 77, 65, 73, 107, -121, -114, -123, 113, 104, 127, -104,
- -103, -117, -127, 124, 115, 106, 105, 113, 117, 108, 91, 80, 86, 103, 114,
- 112, 110, 111, 111, 113, 122, -127, -128, 120, 113, 110, 114, 117, 115,
- 112, 109, 106, 105, 105, 109, 116, 116, 109, 105, 108, 115, 119, 120, 117,
- 114, 112, 114, 118, 122, 124, 120, 117, 118, 121, 125, -128, -127, -124,
- -121, -116, -108, -93, -75, -73, -120, 57, 40, 106, -108, 120, 81, 62, 48,
- 59, 104, -106, -99, -123, 106, 100, -128, -96, -92, -107, -120, 127, 108,
- 93, 100, 118, 123, 105, 79, 69, 82, 106, 119, 118, 116, 117, 116, 118,
- 127, -121, -123, 121, 111, 108, 110, 110, 111, 111, 109, 105, 101, 102,
- 112, 121, 122, 112, 105, 111, 120, 123, 120, 115, 112, 108, 110, 114, 115,
- 113, 111, 109, 111, 115, 119, 122, 122, 120, 120, 120, 125, -124, -119,
- -117, -118, -114, -105, -88, -73, -79, 120, 40, 37, 115, -106, 109, 69,
- 57, 51, 67, 119, -95, -97, -125, 108, 110, -118, -92, -93, -109, -122,
- 120, 97, 84, 95, 118, 121, 98, 72, 68, 88, 110, 123, 124, 123, 123, 119,
- 115, 125, -119, -125, 116, 106, 103, 104, 106, 110, 114, 111, 103, 99,
- 105, 120, -127, 123, 111, 105, 111, 118, 120, 118, 114, 109, 106, 110,
- 116, 122, 122, 118, 114, 117, 121, 126, -126, -124, -123, -122, -119,
- -106, -88, -68, -59, -99, 61, 9, 75, -100, -117, 80, 54, 47, 46, 87, -103,
- -78, -104, 115, 104, 124, -100, -85, -95, -114, -127, 105, 76, 77, 110,
- -127, 111, 76, 60, 73, 101, 122, -127, -126, -128, 122, 116, 123, -120,
- -116, 124, 107, 99, 98, 99, 105, 114, 112, 104, 96, 100, 115, -126, -126,
- 118, 108, 107, 116, 122, 121, 117, 111, 103, 103, 110, 116, 119, 117, 113,
- 112, 114, 118, 126, -126, 126, 123, 125, -126, -114, -104, -96, -88, -76,
- -72, -119, 48, 20, 94, -102, 120, 67, 50, 48, 60, 109, -94, -84, -115,
- 114, 111, -122, -94, -87, -104, -120, 120, 94, 71, 81, 115, 126, 100, 64,
- 58, 83, 118, -122, -126, 125, 125, 121, 117, 127, -118, -125, 111, 97, 94,
- 99, 101, 106, 110, 109, 103, 101, 108, 122, -126, 126, 113, 107, 112, 117,
- 117, 115, 114, 112, 108, 106, 112, 121, 123, 118, 115, 117, 120, 124,
- -126, -122, -119, -118, -113, -100, -81, -57, -59, -123, 30, 11, 103, -96,
- 115, 62, 48, 42, 50, 108, -85, -76, -112, 114, 112, -121, -92, -85, -100,
- -117, 119, 85, 63, 80, 117, 126, 99, 66, 60, 82, 115, -121, -120, -121,
- -124, 120, 112, 123, -119, -123, 113, 96, 90, 92, 98, 108, 115, 113, 104,
- 102, 109, 124, -121, -127, 113, 105, 110, 116, 116, 114, 112, 109, 106,
- 107, 114, 121, 123, 119, 116, 116, 119, 124, -125, -122, -124, -123, -118,
- -107, -90, -67, -56, -80, 87, 7, 42, -117, -104, 91, 53, 46, 44, 72, -117,
- -74, -89, -126, 111, 118, -113, -89, -90, -107, -124, 104, 68, 64, 98,
- -127, 118, 84, 59, 68, 102, -124, -119, -121, -121, 126, 113, 114, -127,
- -119, 124, 101, 88, 91, 96, 104, 114, 116, 109, 103, 104, 118, -122, -122,
- 117, 103, 105, 115, 120, 118, 115, 113, 108, 104, 109, 120, 124, 122, 117,
- 114, 117, 124, -124, -121, -118, -117, -113, -103, -83, -60, -52, -107,
- 44, 4, 87, -98, 125, 70, 50, 45, 49, 99, -96, -77, -103, 123, 112, 126,
- -102, -88, -100, -113, 124, 87, 58, 76, 118, -127, 102, 71, 65, 85, 119,
- -121, -121, -118, -121, 120, 111, 119, -123, -126, 110, 92, 88, 92, 98,
- 109, 117, 113, 106, 104, 113, -128, -119, -128, 111, 104, 109, 115, 119,
- 119, 116, 110, 102, 103, 116, 126, 124, 117, 113, 115, 120, 125, -125,
- -120, -120, -119, -115, -103, -81, -59, -57, -105, 50, 7, 84, -101, -126,
- 76, 51, 40, 49, 101, -94, -80, -103, 125, 113, 124, -106, -92, -100, -112,
- 124, 85, 58, 76, 116, -125, 106, 74, 63, 85, 120, -119, -118, -120, -126,
- 118, 112, 120, -125, -128, 109, 91, 87, 93, 99, 110, 117, 113, 106, 104,
- 114, -127, -120, 126, 110, 103, 109, 116, 119, 117, 113, 109, 102, 105,
- 117, 126, 123, 115, 111, 114, 121, 127, -124, -123, -125, -124, -116,
- -104, -88, -70, -55, -77, 91, 9, 45, -118, -108, 94, 59, 43, 42, 77, -116,
- -79, -91, -123, 111, 116, -114, -93, -99, -110, -124, 98, 63, 65, 105,
- -125, 117, 84, 65, 79, 111, -122, -118, -121, -125, 123, 112, 114, 127,
- -126, 114, 94, 88, 90, 97, 105, 114, 115, 110, 105, 110, 124, -121, -125,
- 115, 105, 108, 115, 117, 114, 112, 110, 104, 103, 112, 123, 125, 118, 113,
- 113, 117, 125, -126, -125, -127, 127, -125, -115, -101, -88, -76, -68,
- -80, 107, 24, 42, -128, -109, 97, 59, 47, 48, 79, -122, -89, -97, -124,
- 115, 118, -114, -97, -102, -115, -127, 102, 71, 72, 103, 127, 117, 88, 68,
- 81, 113, -121, -122, -127, -128, 122, 115, 116, 123, 125, 114, 98, 91, 94,
- 100, 106, 111, 111, 108, 105, 113, 125, -125, 126, 114, 108, 111, 117,
- 118, 114, 110, 108, 104, 105, 112, 118, 120, 117, 114, 113, 118, 125,
- -128, 127, 124, 122, 125, -122, -111, -104, -100, -92, -79, -73, -101, 75,
- 26, 82, -115, 122, 74, 55, 51, 67, 108, -110, -100, -111, -128, 117, -126,
- -105, -102, -115, -125, 118, 92, 77, 87, 113, 122, 103, 79, 75, 101, -126,
- -119, 127, 121, 123, 122, 118, 119, 124, 118, 102, 91, 93, 101, 106, 106,
- 107, 109, 111, 114, 121, -128, 127, 119, 111, 111, 115, 116, 112, 109,
- 108, 108, 106, 106, 112, 120, 121, 117, 114, 117, 122, 125, 126, 124, 124,
- 126, -127, -122, -115, -110, -108, -100, -87, -77, -87, 108, 40, 60, 127,
- -123, 89, 65, 60, 65, 92, -127, -107, -105, -121, 116, 119, -117, -106,
- -112, -121, 123, 101, 83, 85, 108, 123, 110, 88, 80, 97, 121, -125, 126,
- 119, 121, 123, 120, 119, 121, 118, 107, 96, 94, 101, 106, 106, 105, 108,
- 111, 114, 120, 123, 125, 123, 116, 111, 111, 114, 113, 109, 108, 106, 105,
- 108, 114, 119, 120, 116, 114, 119, 124, 126, 124, 122, 121, 123, 125,
- -128, -123, -119, -116, -114, -105, -94, -86, -86, -109, 86, 49, 90, -124,
- 117, 83, 64, 60, 76, 111, -118, -110, -118, 121, 114, -127, -108, -107,
- -120, 125, 113, 98, 94, 102, 116, 115, 99, 87, 90, 107, 126, -127, 119,
- 115, 120, 123, 122, 121, 118, 112, 103, 98, 100, 107, 111, 107, 103, 104,
- 110, 119, 124, 123, 119, 116, 111, 111, 115, 117, 112, 108, 106, 106, 108,
- 114, 117, 118, 116, 115, 117, 121, 124, 124, 121, 117, 118, 123, 125, 126,
- -128, -125, -123, -118, -109, -99, -92, -91, -98, -113, 97, 59, 90, -126,
- 118, 82, 61, 63, 84, 116, -122, -121, -127, 117, 115, -123, -106, -108,
- -124, 119, 111, 105, 103, 106, 114, 113, 99, 89, 91, 107, 126, -127, 116,
- 109, 115, 124, 125, 123, 117, 108, 104, 103, 106, 110, 111, 107, 105, 106,
- 108, 113, 119, 121, 118, 113, 109, 112, 118, 120, 117, 109, 105, 108, 112,
- 116, 117, 116, 113, 110, 112, 118, 122, 120, 118, 117, 117, 119, 122, 125,
- 126, 125, 126, -124, -119, -115, -110, -104, -103, -100, -99, -103, 124,
- 76, 74, 109, 118, 96, 77, 69, 76, 100, 121, -127, -123, 127, 116, 123,
- -116, -113, -120, 126, 118, 113, 107, 104, 108, 113, 108, 97, 93, 100,
- 115, 125, 119, 111, 114, 118, 121, 122, 119, 112, 108, 105, 106, 111, 111,
- 108, 107, 107, 109, 113, 118, 117, 116, 115, 113, 112, 116, 117, 114, 111,
- 108, 109, 110, 111, 113, 113, 113, 114, 113, 115, 118, 121, 120, 117, 117,
- 119, 122, 124, 124, 121, 121, 125, -125, -120, -117, -118, -114, -104,
- -98, -100, -103, -110, 117, 80, 80, 110, 113, 95, 79, 68, 78, 102, 121,
- -126, -123, 126, 117, 123, -118, -111, -118, 125, 114, 111, 110, 109, 110,
- 112, 105, 98, 96, 102, 115, 122, 117, 109, 111, 120, 123, 120, 115, 110,
- 110, 109, 110, 112, 111, 107, 107, 111, 113, 116, 116, 115, 113, 113, 113,
- 111, 112, 113, 111, 107, 107, 108, 111, 114, 113, 113, 114, 117, 120, 119,
- 118, 117, 116, 116, 118, 118, 117, 116, 117, 119, 121, 124, 126, -128,
- -124, -122, -122, -119, -111, -102, -102, -106, -110, -114, 125, 91, 82,
- 104, 112, 95, 79, 73, 83, 103, 117, 123, 125, 124, 119, 122, -120, -113,
- -121, 122, 116, 117, 118, 114, 108, 107, 107, 100, 97, 101, 109, 116, 114,
- 107, 110, 119, 125, 124, 119, 115, 113, 113, 114, 114, 115, 112, 108, 107,
- 109, 112, 114, 110, 108, 110, 110, 110, 112, 115, 114, 111, 109, 111, 115,
- 116, 114, 112, 113, 113, 115, 116, 116, 115, 115, 115, 115, 118, 121, 119,
- 118, 117, 118, 120, 123, 125, 125, 125, -128, -124, -119, -115, -111,
- -107, -108, -108, -106, -105, -122, 93, 75, 100, 116, 100, 80, 74, 79, 95,
- 112, 120, 127, -128, 119, 118, -123, -110, -114, -128, 118, 116, 117, 114,
- 108, 108, 107, 103, 97, 99, 107, 116, 116, 110, 110, 119, 125, 125, 122,
- 118, 114, 114, 113, 114, 116, 113, 105, 103, 108, 114, 116, 111, 107, 107,
- 111, 114, 115, 115, 113, 112, 112, 111, 114, 116, 114, 112, 112, 113, 115,
- 116, 117, 116, 116, 115, 114, 116, 118, 118, 117, 117, 116, 119, 122, 123,
- 124, 124, 126, -128, -124, -120, -118, -117, -113, -110, -108, -107, -107,
- -116, 112, 82, 91, 115, 110, 89, 78, 76, 87, 105, 117, 121, 126, 121, 115,
- 125, -115, -113, -124, 122, 116, 118, 120, 116, 111, 109, 104, 99, 99,
- 106, 113, 115, 110, 107, 112, 122, 126, 124, 119, 115, 114, 116, 117, 118,
- 114, 108, 105, 109, 113, 115, 112, 107, 107, 109, 112, 114, 114, 112, 110,
- 110, 113, 116, 118, 116, 112, 111, 113, 117, 118, 116, 115, 112, 112, 114,
- 115, 116, 116, 114, 114, 117, 118, 120, 121, 122, 121, 122, 124, -128,
- -125, -124, -124, -121, -117, -114, -112, -110, -108, -108, -117, 110, 81,
- 92, 117, 112, 89, 79, 76, 87, 106, 117, 122, 124, 118, 111, 124, -112,
- -110, -123, 121, 116, 119, 122, 118, 113, 108, 102, 98, 99, 106, 112, 114,
- 108, 105, 111, 121, 125, 124, 120, 116, 115, 116, 117, 119, 118, 112, 106,
- 107, 109, 111, 112, 111, 109, 109, 109, 110, 113, 116, 114, 113, 112, 113,
- 114, 115, 113, 113, 113, 113, 114, 114, 115, 114, 114, 114, 114, 114, 116,
- 117, 117, 117, 117, 117, 119, 121, 122, 121, 121, 124, 127, -125, -123,
- -123, -120, -115, -112, -111, -109, -108, -112, 119, 87, 90, 116, 116, 94,
- 81, 78, 87, 103, 113, 118, 121, 117, 112, 120, -118, -112, -123, 121, 117,
- 120, 123, 121, 114, 109, 106, 101, 100, 105, 111, 113, 107, 103, 109, 119,
- 124, 122, 119, 116, 116, 119, 120, 120, 118, 113, 108, 109, 113, 114, 113,
- 107, 104, 107, 111, 113, 112, 112, 109, 110, 113, 116, 116, 115, 113, 111,
- 112, 114, 116, 115, 113, 111, 112, 113, 116, 115, 115, 115, 114, 114, 116,
- 118, 119, 119, 119, 119, 122, 123, 125, 127, -126, -124, -122, -120, -115,
- -112, -111, -109, -107, -112, 117, 84, 91, 119, 118, 93, 78, 78, 87, 103,
- 112, 117, 120, 116, 112, 120, -118, -112, -122, 120, 117, 122, 125, 121,
- 114, 110, 107, 103, 102, 104, 110, 112, 107, 104, 110, 119, 123, 121, 118,
- 117, 118, 118, 119, 120, 119, 114, 110, 111, 112, 114, 114, 109, 107, 107,
- 110, 110, 112, 113, 111, 109, 111, 113, 116, 116, 114, 113, 114, 115, 116,
- 116, 114, 113, 113, 113, 114, 114, 114, 114, 114, 114, 116, 120, 120, 119,
- 119, 120, 122, 125, 127, -128, -126, -124, -123, -120, -115, -113, -113,
- -110, -107, -112, 117, 86, 94, 122, 119, 93, 79, 81, 89, 103, 112, 116,
- 118, 115, 110, 119, -117, -111, -123, 120, 117, 123, -128, 124, 115, 110,
- 107, 104, 104, 106, 110, 110, 104, 103, 109, 119, 122, 119, 116, 117, 119,
- 119, 120, 121, 119, 114, 112, 112, 114, 115, 113, 108, 106, 109, 110, 110,
- 110, 110, 109, 110, 113, 114, 115, 115, 114, 114, 115, 116, 116, 116, 115,
- 112, 113, 115, 115, 114, 114, 113, 114, 117, 117, 117, 117, 118, 119, 121,
- 123, 124, 125, 126, -128, -125, -122, -120, -118, -118, -116, -112, -108,
- -108, -128, 95, 88, 115, 125, 103, 84, 81, 86, 99, 111, 114, 117, 115,
- 109, 113, -124, -112, -120, 121, 116, 121, -128, 127, 119, 112, 108, 106,
- 103, 106, 110, 110, 106, 104, 106, 116, 122, 119, 116, 116, 117, 119, 120,
- 122, 119, 115, 112, 111, 114, 116, 114, 108, 105, 106, 111, 113, 111, 109,
- 108, 111, 113, 116, 116, 115, 113, 112, 114, 117, 118, 115, 113, 112, 114,
- 115, 116, 114, 114, 115, 114, 116, 117, 118, 118, 118, 118, 120, 122, 123,
- 124, 125, 126, -127, -124, -122, -119, -117, -116, -114, -111, -109, -121,
- 101, 86, 112, 126, 107, 89, 82, 86, 98, 107, 111, 115, 116, 110, 110, 127,
- -116, -120, 122, 115, 120, -128, -128, 121, 113, 110, 109, 107, 107, 109,
- 111, 107, 103, 106, 115, 120, 117, 113, 115, 117, 119, 120, 119, 119, 116,
- 113, 113, 115, 116, 115, 110, 106, 108, 111, 111, 110, 110, 109, 109, 112,
- 115, 116, 116, 114, 114, 114, 116, 117, 116, 114, 112, 113, 115, 115, 115,
- 114, 114, 114, 115, 117, 117, 118, 118, 119, 120, 122, 121, 122, 125, 126,
- 127, -127, -125, -123, -120, -120, -117, -113, -110, -112, 126, 97, 94,
- 119, 124, 103, 87, 83, 89, 101, 109, 111, 114, 114, 108, 114, -126, -117,
- -124, 120, 116, 123, -127, 126, 118, 113, 111, 108, 108, 109, 109, 109,
- 107, 104, 107, 116, 118, 115, 114, 115, 117, 118, 119, 118, 118, 115, 114,
- 113, 114, 115, 113, 110, 108, 110, 114, 112, 110, 110, 111, 113, 114, 114,
- 115, 114, 114, 114, 115, 116, 116, 115, 114, 114, 117, 117, 115, 114, 114,
- 115, 116, 116, 116, 116, 118, 117, 119, 120, 121, 122, 123, 125, 127,
- -126, -125, -123, -119, -118, -117, -114, -113, -113, 125, 96, 95, 121,
- 123, 101, 88, 86, 92, 104, 109, 111, 114, 113, 108, 115, -126, -118, -126,
- 118, 115, 123, -127, 126, 118, 113, 110, 110, 109, 110, 110, 110, 107,
- 105, 108, 116, 118, 115, 113, 114, 117, 119, 119, 118, 119, 116, 114, 115,
- 116, 117, 115, 111, 109, 113, 114, 112, 110, 108, 109, 111, 113, 114, 113,
- 113, 114, 114, 115, 117, 116, 116, 116, 114, 115, 115, 114, 114, 114, 114,
- 114, 115, 116, 116, 117, 117, 119, 120, 120, 121, 122, 123, 125, 127,
- -127, -126, -124, -122, -122, -119, -116, -115, -116, 125, 100, 98, 119,
- 122, 105, 92, 88, 94, 106, 109, 109, 113, 113, 109, 114, 126, -123, -128,
- 119, 116, 123, -128, 125, 117, 112, 111, 111, 111, 110, 110, 111, 108,
- 105, 109, 116, 117, 115, 113, 114, 116, 118, 117, 116, 117, 115, 113, 113,
- 114, 116, 115, 111, 109, 112, 114, 113, 111, 111, 112, 113, 113, 113, 114,
- 114, 114, 114, 116, 116, 116, 116, 115, 115, 116, 116, 115, 115, 116, 115,
- 115, 115, 116, 117, 118, 119, 120, 120, 121, 122, 124, 125, 127, -128,
- -127, -125, -122, -121, -120, -119, -117, -117, 127, 102, 98, 119, 122,
- 106, 95, 90, 96, 106, 110, 110, 114, 115, 110, 114, 125, -124, -128, 119,
- 115, 120, 126, 124, 118, 114, 112, 112, 111, 111, 112, 112, 109, 107, 110,
- 116, 117, 115, 114, 113, 116, 118, 116, 116, 117, 116, 115, 115, 117, 117,
- 116, 111, 110, 112, 113, 113, 112, 110, 111, 113, 113, 113, 114, 115, 115,
- 116, 115, 116, 116, 116, 115, 115, 116, 116, 115, 116, 115, 115, 116, 116,
- 116, 117, 117, 118, 119, 120, 121, 121, 124, 125, 127, -128, -127, -125,
- -124, -122, -121, -120, -118, -120, 119, 100, 107, 121, 116, 103, 96, 95,
- 100, 109, 110, 111, 115, 113, 111, 116, 126, -127, 124, 117, 114, 121,
- 125, 122, 116, 113, 111, 111, 112, 112, 113, 111, 107, 107, 112, 116, 117,
- 114, 112, 113, 117, 117, 116, 115, 115, 115, 115, 115, 115, 115, 114, 111,
- 111, 114, 115, 113, 111, 111, 112, 113, 113, 113, 114, 115, 114, 114, 115,
- 115, 116, 116, 115, 116, 116, 117, 115, 115, 115, 116, 116, 115, 116, 117,
- 118, 120, 120, 120, 121, 122, 123, 125, 127, -128, -128, -127, -125, -123,
- -123, -124, -125, -126, 118, 105, 108, 118, 114, 105, 102, 99, 105, 112,
- 111, 112, 116, 115, 113, 117, 122, 124, 122, 116, 114, 119, 121, 119, 115,
- 113, 111, 112, 112, 112, 113, 112, 110, 111, 113, 116, 116, 114, 112, 113,
- 116, 116, 115, 114, 114, 114, 115, 114, 113, 115, 114, 114, 113, 114, 114,
- 113, 113, 112, 113, 114, 115, 113, 114, 114, 115, 116, 116, 116, 116, 116,
- 117, 116, 117, 116, 115, 115, 115, 116, 116, 116, 117, 117, 118, 119, 120,
- 121, 122, 123, 124, 125, 126, 127, 127, -127, -126, -127, -127, -127,
- -126, 125, 112, 107, 116, 117, 111, 108, 104, 105, 112, 113, 113, 116,
- 117, 113, 114, 118, 120, 121, 118, 112, 114, 118, 118, 115, 113, 111, 112,
- 114, 113, 114, 115, 113, 111, 113, 115, 115, 115, 113, 110, 113, 114, 113,
- 114, 114, 113, 114, 115, 115, 117, 116, 115, 114, 114, 114, 113, 114, 113,
- 113, 113, 113, 113, 114, 114, 114, 115, 116, 116, 117, 116, 116, 116, 116,
- 116, 116, 116, 115, 116, 118, 117, 117, 117, 118, 118, 119, 120, 121, 122,
- 123, 123, 125, 126, 127, 126, 126, 126, 125, 126, 127, 126, 120, 114, 112,
- 117, 116, 112, 110, 108, 110, 115, 114, 114, 117, 116, 114, 115, 117, 118,
- 118, 116, 113, 114, 116, 115, 115, 112, 112, 114, 115, 115, 114, 114, 113,
- 114, 114, 114, 114, 114, 113, 112, 113, 114, 114, 114, 114, 114, 116, 117,
- 115, 116, 116, 115, 115, 114, 114, 114, 115, 113, 113, 115, 115, 115, 115,
- 115, 115, 116, 117, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 118,
- 118, 117, 117, 117, 118, 119, 120, 120, 121, 121, 122, 123, 124, 124, 124,
- 124, 123, 123, 123, 124, 124, 122, 119, 118, 117, 116, 117, 115, 113, 113,
- 114, 113, 115, 115, 115, 115, 115, 115, 115, 116, 115, 114, 113, 113, 114,
- 114, 113, 112, 114, 115, 114, 114, 113, 113, 115, 115, 113, 114, 114, 114,
- 113, 113, 114, 114, 115, 114, 115, 116, 116, 115, 115, 115, 115, 115, 115,
- 114, 115, 115, 114, 114, 115, 115, 115, 115, 115, 115, 117, 116, 116, 116,
- 116, 116, 116, 116, 116, 117, 117, 116, 116, 117, 117, 117, 117, 118, 119,
- 119, 119, 120, 120, 122, 121, 121, 121, 121, 121, 121, 120, 121, 122, 121,
- 121, 119, 118, 118, 119, 118, 117, 115, 116, 116, 115, 115, 115, 116, 116,
- 115, 116, 115, 115, 115, 114, 114, 114, 114, 114, 113, 112, 115, 115, 113,
- 114, 113, 114, 115, 115, 114, 114, 114, 113, 113, 114, 114, 114, 115, 114,
- 114, 116, 115, 115, 116, 115, 115, 115, 115, 115, 115, 115, 114, 115, 115,
- 115, 116, 116, 116, 116, 115, 115, 116, 116, 116, 116, 116, 116, 117, 117,
- 117, 116, 117, 117, 117, 117, 117, 117, 118, 118, 119, 118, 119, 120, 120,
- 119, 119, 119, 120, 120, 119, 119, 119, 120, 119, 120, 119, 118, 118, 118,
- 117, 117, 117, 117, 116, 116, 115, 117, 116, 115, 115, 115, 115, 115, 115,
- 114, 115, 114, 114, 114, 114, 113, 113, 113, 113, 115, 114, 114, 113, 114,
- 114, 115, 114, 114, 115, 115, 114, 114, 114, 114, 114, 115, 115, 115, 116,
- 115, 115, 115, 115, 116, 115, 115, 115, 115, 116, 115, 116, 116, 116, 116,
- 116, 116, 116, 116, 117, 116, 116, 116, 116, 117, 117, 117, 117, 117, 117,
- 118, 119, 118, 118, 118, 119, 119, 119, 118, 118, 118, 118, 118, 118, 119,
- 119, 118, 118, 118, 119, 119, 119, 118, 117, 117, 117, 117, 117, 117, 116,
- 116, 116, 116, 116, 116, 116, 115, 117, 116, 115, 114, 114, 114, 114, 114,
- 114, 114, 116, 115, 114, 115, 115, 115, 115, 115, 115, 116, 115, 115, 115,
- 115, 115, 115, 115, 115, 115, 116, 115, 115, 115, 115, 115, 115, 115, 115,
- 116, 117, 115, 115, 116, 115, 116, 116, 116, 116, 116, 116, 117, 116, 116,
- 116, 116, 116, 116, 117, 117, 117, 117, 118, 117, 117, 117, 117, 117, 117,
- 117, 118, 117, 118, 118, 119, 118, 118, 118, 118, 117, 117, 117, 117, 117,
- 117, 117, 119, 117, 117, 117, 117, 117, 116, 116, 116, 116, 116, 117, 116,
- 116, 116, 116, 116, 116, 116, 115, 115, 116, 115, 115, 115, 115, 115, 116,
- 116, 116, 115, 116, 115, 115, 115, 115, 115, 115, 115, 115, 116, 117, 115,
- 115, 115, 116, 115, 115, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116,
- 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 117, 117,
- 118, 117, 117, 117, 117, 117, 117, 116, 116, 117, 117, 117, 118, 117, 117,
- 117, 118, 117, 117, 117, 117, 117, 117, 118, 117, 117, 117, 117, 117, 117,
- 117, 117, 117, 116, 116, 118, 116, 116, 116, 116, 116, 116, 116, 116, 116,
- 115, 116, 116, 116, 115, 115, 115, 115, 116, 116, 116, 117, 116, 116, 115,
- 115, 116, 115, 115, 115, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116,
- 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116,
- 116, 116, 116, 116, 116, 116, 116, 117, 118, 117, 117, 117, 117, 117, 117,
- 117, 116, 116, 116, 117, 117, 116, 116, 116, 117, 117, 117, 117, 117, 117,
- 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 116, 117, 118, 116, 116,
- 116, 116, 117, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116,
- 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117,
- 116, 116, 116, 116, 115, 115, 116, 116, 116, 116, 117, 116, 116, 116, 116,
- 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116,
- 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116,
- 116, 116, 116, 116, 117, 117, 117, 117, 118, 117, 116, 117, 117, 117, 117,
- 116, 116, 116, 116, 117, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116,
- 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116,
- 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116,
- 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
- 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116,
- 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117,
- 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 118, 117, 116, 116, 116,
- 116, 116, 116, 116, 116, 116, 117, 116, 117, 117, 116, 116, 116, 116, 116,
- 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116,
- 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116,
- 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117,
- 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116,
- 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116,
- 116, 117, 118, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116,
- 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116,
- 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117,
- 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116,
- 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116,
- 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116,
- 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116,
- 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117,
- 116, 116, 116, 116, 117, 117, 116, 116, 116, 116, 117, 116, 116, 116, 116,
- 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116,
- 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116,
- 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116,
- 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117,
- 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116,
- 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116,
- 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116,
- 116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116,
- 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116
-
diff --git a/winsup/testsuite/winsup.api/devzero.c b/winsup/testsuite/winsup.api/devzero.c
deleted file mode 100644
index 948b0bf..0000000
--- a/winsup/testsuite/winsup.api/devzero.c
+++ /dev/null
@@ -1,115 +0,0 @@
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-
-int
-main(int argc, char **argv)
-{
- int fd, r, l;
- char buf[1024];
- char *v;
-
- fd = open("/dev/zero", O_RDONLY);
- if (fd < 0)
- {
- fprintf(stderr, "Unable to open /dev/zero for reading\n");
- perror("The error was");
- exit(1);
- }
-
- l = read(fd, buf, 1024);
- if (l != 1024)
- {
- fprintf(stderr, "Asked to read 1024 bytes, got %d\n", l);
- exit(1);
- }
-
- for (r=0; r<1024; r++)
- if (buf[r] != 0)
- {
- fprintf(stderr, "/dev/zero returned a byte of %02x at offset %d\n",
- buf[r], r);
- exit(1);
- }
-
- l = lseek(fd, 4096, 0);
- if (l != 0)
- {
- fprintf(stderr, "l == %d\n", l);
- exit(1);
- }
-
- l = close(fd);
- if (l != 0)
- {
- fprintf(stderr, "close: returned %d\n", l);
- perror("The error was");
- exit(1);
- }
-
- fd = open("/dev/zero", O_WRONLY);
- if (fd < 0)
- {
- fprintf(stderr, "Unable to open /dev/zero for writing\n");
- perror("The error was");
- exit(1);
- }
-
- l = write(fd, buf, 1024);
- if (l != 1024)
- {
- fprintf(stderr, "Asked to write 1024 bytes, got %d\n", l);
- exit(1);
- }
-
- l = close(fd);
- if (l != 0)
- {
- fprintf(stderr, "close: returned %d\n", l);
- perror("The error was");
- exit(1);
- }
-
- fd = open("/dev/zero", O_RDWR);
- v = (char *)mmap(0, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
- if (v == (char *)-1)
- {
- fprintf(stderr, "mmap r/w /dev/zero failed\n");
- perror("The error was");
- exit(1);
- }
-
- for (r=0; r<65536; r++)
- if (v[r] != 0)
- {
- fprintf(stderr, "mmap'd r/w /dev/zero has byte %d at offset %d\n",
- v[r], r);
- exit(1);
- }
- munmap(v, 65536);
- close(fd);
-
- fd = open("/dev/zero", O_RDONLY);
- v = (char *)mmap(0, 65536, PROT_READ, MAP_SHARED, fd, 0);
- if (v == (char *)-1)
- {
- fprintf(stderr, "mmap /dev/zero r/o failed\n");
- perror("The error was");
- exit(1);
- }
-
- for (r=0; r<65536; r++)
- if (v[r] != 0)
- {
- fprintf(stderr, "mmap'd r/o /dev/zero has byte %d at offset %d\n",
- v[r], r);
- exit(1);
- }
- munmap(v, 65536);
- close(fd);
-
- exit(0);
-}
diff --git a/winsup/testsuite/winsup.api/iospeed.c b/winsup/testsuite/winsup.api/iospeed.c
deleted file mode 100644
index 56bf715..0000000
--- a/winsup/testsuite/winsup.api/iospeed.c
+++ /dev/null
@@ -1,115 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <windows.h>
-
-int verbose = 0;
-
-void
-v(char *fmt, ...)
-{
- va_list ap;
- if (!verbose) return;
- va_start(ap, fmt);
- vfprintf(stdout, fmt, ap);
- va_end(ap);
-}
-
-#define TSIZE (1024 * 1024 * 16)
-
-unsigned long start_tic;
-
-void
-start(FILE *f)
-{
- fseek(f, 0, SEEK_SET);
- start_tic = GetTickCount();
-}
-
-void
-end()
-{
- unsigned long end_tic = GetTickCount();
- printf("%6ld", end_tic - start_tic);
-}
-
-void
-test(int linesz, int cr)
-{
- FILE *f = fopen("iospeed.dat", "wb");
- char buf[65536];
- int i, fd;
-
- memset(buf, 'x', linesz);
- buf[linesz-1] = '\n';
- if (cr)
- buf[linesz-2] = '\r';
- for (i=0; i<TSIZE; i += linesz)
- fwrite(buf, 1, linesz, f);
- fclose(f);
-
- f = fopen("iospeed.dat", "rt");
- fd = fileno(f);
-
- printf("%6d%6d", linesz, cr);
- for (i=0; i<TSIZE; i+= 65536)
- read(fd, buf, 65536);
-
- start(f);
- while (getc(f) != EOF);
- end();
-
- start(f);
- while (fread(buf, 1, 256, f) > 0);
- end();
-
- start(f);
- while (fgets(buf, 64436, f));
- end();
-
- f = fopen("iospeed.dat", "rb");
- fd = fileno(f);
-
- for (i=0; i<TSIZE; i+= 65536)
- read(fd, buf, 65536);
-
- start(f);
- while (getc(f) != EOF);
- end();
-
- start(f);
- while (fread(buf, 1, 256, f) > 0);
- end();
-
- start(f);
- while (fgets(buf, 64436, f));
- end();
-
- printf("\n");
-}
-
-int
-main(int argc, char **argv)
-{
- if (argc > 1 && strcmp(argv[1],"-v") == 0)
- verbose = 1;
-
- setbuf(stdout, 0);
-
- printf(" ----- text ----- ---- binary ----\n");
- printf("linesz cr getc fread fgets getc fread fgets\n");
-
- test(4, 0);
- test(64, 0);
- test(4096, 0);
- test(4, 1);
- test(64, 1);
- test(4096, 1);
-
- remove ("iospeed.dat");
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/known_bugs.tcl b/winsup/testsuite/winsup.api/known_bugs.tcl
deleted file mode 100644
index e063ee6..0000000
--- a/winsup/testsuite/winsup.api/known_bugs.tcl
+++ /dev/null
@@ -1,4 +0,0 @@
-set xfail_list [list dup03 \
- fcntl05 setgroups01 setuid02 \
- ulimit01 unlink08 \
- sample-fail sample-miscompile]
diff --git a/winsup/testsuite/winsup.api/ltp/access01.c b/winsup/testsuite/winsup.api/ltp/access01.c
deleted file mode 100644
index ae9be94..0000000
--- a/winsup/testsuite/winsup.api/ltp/access01.c
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : access01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for access(2) using F_OK,
- * R_OK, W_OK and X_OK arguments.
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 6
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) access(2) returns 0 for F_OK...(See Description)
- * 2.) access(2) returns 0 for R_OK...(See Description)
- * 3.) access(2) returns 0 for W_OK...(See Description)
- * 4.) access(2) returns 0 for X_OK...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * The libcuts.a and libsys.a libraries must be included in
- * the compilation of this test.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the access(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * access(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- * Create a temp directory and cd to it.
- * Creat a temp file wil read, write and execute permissions.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call with F_OK on tmp file
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- * Execute system call with X_OK on tmp file...
- * Execute system call with W_OK on tmp file...
- * Execute system call with R_OK on tmp file...
- *
- * Cleanup:
- * Print errno log
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <signal.h>
-#include <sys/stat.h>
-#include "test.h"
-#include "usctest.h"
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-const char *TCID="access01"; /* Test program identifier. */
-int TST_TOTAL=4; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-
-char Fname[255];
-
-
-/***********************************************************************
- * Main
- ***********************************************************************/
-int main(int ac, char **av)
-{
- struct test_case_t {
- char *file;
- unsigned mode;
- const char *string;
- int experrno;
- } Test_cases[] = {
- { Fname, F_OK, "F_OK", 0 },
- { Fname, X_OK, "X_OK", 0 },
- { Fname, W_OK, "W_OK", 0 },
- { Fname, R_OK, "R_OK", 0 },
- };
-
- int Ntc = sizeof(Test_cases) / sizeof(struct test_case_t);
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- int tc;
-
- TST_TOTAL=Ntc;
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- for (tc=0; tc<Ntc; tc++) {
- /*
- * Call access(2)
- */
- TEST(access(Test_cases[tc].file, Test_cases[tc].mode));
-
- /* check return code */
- if ( TEST_RETURN == -1 && Test_cases[tc].experrno == 0 ) {
- tst_resm(TFAIL, "access(%s, %s) Failed, errno=%d : %s",
- Test_cases[tc].file, Test_cases[tc].string,
- TEST_ERRNO, strerror(TEST_ERRNO));
-
- } else if ( TEST_RETURN != -1 && Test_cases[tc].experrno != 0 ) {
- tst_resm(TFAIL, "access(%s, %s) returned %d, exp -1, errno:%d",
- Test_cases[tc].file, Test_cases[tc].string,
- TEST_RETURN, Test_cases[tc].experrno);
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "access(%s, %s) returned %d",
- Test_cases[tc].file, Test_cases[tc].string,
- TEST_RETURN);
- }
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- int fd;
- struct stat stbuf;
-
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- umask(0); /* reset umask avoid it affects on modes */
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /*
- * Since files inherit group ids, make sure our dir has a valid grp
- * to us.
- */
- chown(".", -1, getgid());
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(Fname,"accessfile");
-
- if ((fd = open(Fname, O_RDWR|O_CREAT, 06777)) == -1) {
- tst_brkm(TBROK, cleanup, "open(%s, O_RDWR|O_CREAT,06777) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- }
- else if (close(fd) == -1) {
- tst_resm(TINFO, "close(%s) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- }
-
- /*
- * force the mode to be set to 6777
- */
- if (chmod(Fname, 06777) == -1 ) {
- tst_brkm(TBROK, cleanup, "chmod(%s, 06777) failed, errno:%d %s\n",
- Fname, errno, strerror(errno));
- }
-
- stat(Fname, &stbuf);
-
- if ( (stbuf.st_mode & 06777) != 06777 ) {
- /*
- * file can not be properly setup
- */
- }
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- */
- TEST_CLEANUP;
-
- /* remove the temp dir */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/access03.c b/winsup/testsuite/winsup.api/ltp/access03.c
deleted file mode 100644
index f0870a6..0000000
--- a/winsup/testsuite/winsup.api/ltp/access03.c
+++ /dev/null
@@ -1,506 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : access03
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : EFAULT error testing for access(2)
- *
- * PARENT DOCUMENT : acstds01
- *
- * TEST CASE TOTAL : 8
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Kathy Olmsted
- *
- * CO-PILOT : Tom Hampson
- *
- * DATE STARTED : 05/13/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * access(2) test for errno(s) EFAULT.
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * DETAILED DESCRIPTION
- *
- * Setup:
- * Setup signal handling.
- * Make and change to a temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno.
- * If doing functional test
- * check the errno returned and print result message
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Remove the temporary directory and exit.
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-
-
-#include "test.h"
-#include "usctest.h"
-
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-
-char *get_high_address();
-
-const char *TCID="access03"; /* Test program identifier. */
-int TST_TOTAL=8; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={EFAULT, 0}; /* List must end with 0 */
-
-int main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
-
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos. */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
-
- /*
- * TEST CASE:
- * R_OK on low pointer (-1) for path
- */
-
-
- /* Call access(2) */
- TEST(access( (char *)-1,R_OK));
-
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- }
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- if ( TEST_RETURN == -1 ) {
- if (TEST_ERRNO == EFAULT) {
- tst_resm(TPASS,
- "access((char *)-1,R_OK) failed as expected with errno %d (EFAULT) : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- }
- else {
- tst_resm(TFAIL,
- "access((char *)-1,R_OK) failed with errno %d : %s but expected %d (EFAULT)",
- TEST_ERRNO, strerror(TEST_ERRNO),EFAULT);
- }
- }
- else {
- tst_resm(TFAIL,
- "access((char *)-1,R_OK) succeeded unexpectedly.");
-
- }
- }
-
-
- /*
- * TEST CASE:
- * W_OK on low pointer (-1) for path
- */
-
-
- /* Call access(2) */
- TEST(access( (char *)-1,W_OK));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- }
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- if ( TEST_RETURN == -1 ) {
- if (TEST_ERRNO == EFAULT) {
- tst_resm(TPASS,
- "access((char *)-1,W_OK) failed as expected with errno %d (EFAULT) : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- }
- else {
- tst_resm(TFAIL,
- "access((char *)-1,W_OK) failed with errno %d : %s but expected %d (EFAULT)",
- TEST_ERRNO, strerror(TEST_ERRNO),EFAULT);
- }
- }
- else {
- tst_resm(TFAIL,
- "access((char *)-1,W_OK) succeeded unexpectedly.");
-
- }
- }
-
-
- /*
- * TEST CASE:
- * X_OK on low pointer (-1) for path
- */
-
-
- /* Call access(2) */
- TEST(access( (char *)-1,X_OK));
-
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- }
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- if ( TEST_RETURN == -1 ) {
- if (TEST_ERRNO == EFAULT) {
- tst_resm(TPASS,
- "access((char*)-1,X_OK) failed as expected with errno %d (EFAULT) : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- }
- else {
- tst_resm(TFAIL,
- "access((char*)-1,X_OK) failed with errno %d : %s but expected %d (EFAULT)",
- TEST_ERRNO, strerror(TEST_ERRNO),EFAULT);
- }
- }
- else {
- tst_resm(TFAIL,
- "access((char*)-1,X_OK) succeeded unexpectedly.");
-
- }
- }
-
-
- /*
- * TEST CASE:
- * F_OK on low pointer (-1) for path
- */
-
-
- /* Call access(2) */
- TEST(access( (char *)-1,F_OK));
-
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- }
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- if ( TEST_RETURN == -1 ) {
- if (TEST_ERRNO == EFAULT) {
- tst_resm(TPASS,
- "access((char*)-1,F_OK) failed as expected with errno %d (EFAULT) : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- }
- else {
- tst_resm(TFAIL,
- "access((char*)-1,F_OK) failed with errno %d : %s but expected %d (EFAULT)",
- TEST_ERRNO, strerror(TEST_ERRNO),EFAULT);
- }
- }
- else {
- tst_resm(TFAIL,
- "access((char*)-1,F_OK) succeeded unexpectedly.");
-
- }
- }
-
-
- /*
- * TEST CASE:
- * R_OK on high pointer (sbrk(0)+1) for path
- */
-
-
- /* Call access(2) */
- TEST(access(get_high_address(),R_OK));
-
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- }
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- if ( TEST_RETURN == -1 ) {
- if (TEST_ERRNO == EFAULT) {
- tst_resm(TPASS,
- "access((char*)sbrk(0)+1,R_OK) failed as expected with errno %d (EFAULT) : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- }
- else {
- tst_resm(TFAIL,
- "access((char*)sbrk(0)+1,R_OK) failed with errno %d : %s but expected %d (EFAULT)",
- TEST_ERRNO, strerror(TEST_ERRNO),EFAULT);
- }
- }
- else {
- tst_resm(TFAIL,
- "access((char*)sbrk(0)+1,R_OK) succeeded unexpectedly.");
-
- }
- }
-
-
- /*
- * TEST CASE:
- * W_OK on high pointer (sbrk(0)+1) for path
- */
-
-
- /* Call access(2) */
- TEST(access(get_high_address(),W_OK));
-
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- }
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- if ( TEST_RETURN == -1 ) {
- if (TEST_ERRNO == EFAULT) {
- tst_resm(TPASS,
- "access((char*)sbrk(0)+1,W_OK) failed as expected with errno %d (EFAULT) : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- }
- else {
- tst_resm(TFAIL,
- "access((char*)sbrk(0)+1,W_OK) failed with errno %d : %s but expected %d (EFAULT)",
- TEST_ERRNO, strerror(TEST_ERRNO),EFAULT);
- }
- }
- else {
- tst_resm(TFAIL,
- "access((char*)sbrk(0)+1,W_OK) succeeded unexpectedly.");
-
- }
- }
-
-
- /*
- * TEST CASE:
- * X_OK on high pointer (sbrk(0)+1) for path
- */
-
-
- /* Call access(2) */
- TEST(access(get_high_address(),X_OK));
-
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- }
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- if ( TEST_RETURN == -1 ) {
- if (TEST_ERRNO == EFAULT) {
- tst_resm(TPASS,
- "access(high_address,X_OK) failed as expected with errno %d (EFAULT) : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- }
- else {
- tst_resm(TFAIL,
- "access(high_address,X_OK) failed with errno %d : %s but expected %d (EFAULT)",
- TEST_ERRNO, strerror(TEST_ERRNO),EFAULT);
- }
- }
- else {
- tst_resm(TFAIL,
- "access(high_address,X_OK) succeeded unexpectedly.");
-
- }
- }
-
-
- /*
- * TEST CASE:
- * F_OK on high pointer (sbrk(0)+1) for path
- */
-
-
- /* Call access(2) */
- TEST(access(get_high_address(),F_OK));
-
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- }
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- if ( TEST_RETURN == -1 ) {
- if (TEST_ERRNO == EFAULT) {
- tst_resm(TPASS,
- "access((char*)sbrk(0)+1,F_OK) failed as expected with errno %d (EFAULT) : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- }
- else {
- tst_resm(TFAIL,
- "access((char*)sbrk(0)+1,F_OK) failed with errno %d : %s but expected %d (EFAULT)",
- TEST_ERRNO, strerror(TEST_ERRNO),EFAULT);
- }
- }
- else {
- tst_resm(TFAIL,
- "access((char*)sbrk(0)+1,F_OK) succeeded unexpectedly.");
-
- }
- }
-
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make and change to a temporary directory */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* remove the temporary directory and exit with
- return code appropriate for results */
- tst_rmdir();
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/access04.c b/winsup/testsuite/winsup.api/ltp/access04.c
deleted file mode 100644
index 0694588..0000000
--- a/winsup/testsuite/winsup.api/ltp/access04.c
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: access01
- *
- * Test Description:
- * Verify that access() succeeds to check the existance of a file if
- * search access is permitted on the pathname of the specified file.
- *
- * Expected Result:
- * access() should return 0 value and the specified file should exist
- * on the file system.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.
- *
- * Usage: <for command-line>
- * access01 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * None.
- *
- */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/stat.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define TESTDIR "testdir"
-#define TESTFILE "testdir/testfile"
-#define DIR_MODE S_IRWXU | S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP
-#define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
-
-const char *TCID="access01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-void setup(); /* Main setup function of test */
-void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- struct stat stat_buf; /* struct buffer for stat(2) */
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *)NULL, NULL);
- if (msg != (char *)NULL) {
- tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
- }
-
- /* Perform global setup for test */
- setup();
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call access(2) to check the existence of a
- * file under specified path.
- */
- TEST(access(TESTFILE, F_OK));
-
- /* check return code of access(2) */
- if (TEST_RETURN == -1) {
- tst_resm(TFAIL,
- "access(%s, F_OK) Failed, errno=%d : %s",
- TESTFILE, TEST_ERRNO, strerror(TEST_ERRNO));
- continue;
- }
-
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- /*
- * Use stat(2) to cross-check the
- * existance of testfile under
- * specified path.
- */
- if (stat(TESTFILE, &stat_buf) < 0) {
- tst_resm(TFAIL, "stat() on %s Failed, errno=%d",
- TESTFILE, TEST_ERRNO);
- } else {
- tst_resm(TPASS, "Functionality of access(%s, "
- "F_OK) successful", TESTFILE);
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- *
- * Create a temporary directory and change directory to it.
- * Create a test directory and a file under test directory.
- * Modify the mode permissions of testfile.
- */
-void
-setup()
-{
- int fd; /* File handle for testfile */
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Check that the test process id is not root/super-user */
- if (geteuid() == 0) {
- tst_brkm(TBROK, NULL, "Must be non-root/super for this test!");
- tst_exit();
- }
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Creat a test directory under temporary directory */
- if (mkdir(TESTDIR, DIR_MODE) < 0) {
- tst_brkm(TBROK, cleanup,
- "mkdir(%s, %#o) Failed, errno=%d : %s",
- TESTDIR, DIR_MODE, errno, strerror(errno));
- }
-
- /* Make sure test directory has search permissions set */
- if (chmod(TESTDIR, DIR_MODE) < 0) {
- tst_brkm(TBROK, cleanup,
- "chmod(%s, %#o) Failed, errno=%d : %s",
- TESTDIR, DIR_MODE, errno, strerror(errno));
- }
-
- /* Creat a test file under above directory created */
- if ((fd = open(TESTFILE, O_RDWR|O_CREAT, FILE_MODE)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, %#o) Failed, errno=%d :%s",
- TESTFILE, FILE_MODE, errno, strerror(errno));
- }
-
- /* Close the testfile created above */
- if (close(fd) == -1) {
- tst_brkm(TBROK, cleanup,
- "close(%s) Failed, errno=%d : %s",
- TESTFILE, errno, strerror(errno));
- }
-
- /* Change the mode permissions on the testfile */
- if (chmod(TESTFILE, 0) < 0) {
- tst_brkm(TBROK, cleanup,
- "chmod(%s, 0) Failed, errno=%d : %s",
- TESTFILE, errno, strerror(errno));
- }
-}
-
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- *
- * Remove the test directory and testfile created in the setup.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /*
- * Delete the test directory/file and temporary directory
- * created in the setup.
- */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/access05.c b/winsup/testsuite/winsup.api/ltp/access05.c
deleted file mode 100644
index 757c64f..0000000
--- a/winsup/testsuite/winsup.api/ltp/access05.c
+++ /dev/null
@@ -1,424 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: access03
- *
- * Test Description:
- * Verify that,
- * 1. access() fails with -1 return value and sets errno to EACCES
- * if the permission bits of the file mode do not permit the
- * requested (Read/Write/Execute) access.
- * 2. access() fails with -1 return value and sets errno to EINVAL
- * if the specified access mode argument is invalid.
- * 3. access() fails with -1 return value and sets errno to EFAULT
- * if the pathname points outside allocate address space for the
- * process.
- * 4. access() fails with -1 return value and sets errno to ENOENT
- * if the specified file doesn't exist (or pathname is NULL).
- * 5. access() fails with -1 return value and sets errno to ENAMETOOLONG
- * if the pathname size is > PATH_MAX characters.
- *
- * Expected Result:
- * access() should fail with return value -1 and set expected errno.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * if errno set == expected errno
- * Issue sys call fails with expected return value and errno.
- * Otherwise,
- * Issue sys call fails with unexpected errno.
- * Otherwise,
- * Issue sys call returns unexpected value.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory(s)/file(s) created.
- *
- * Usage: <for command-line>
- * access03 [-c n] [-e] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * This test should be run by 'non-super-user' only.
- *
- */
-
-#include <errno.h>
-#include <fcntl.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define INV_OK -1
-#define TEST_FILE1 "test_file1"
-#define TEST_FILE2 "test_file2"
-#define TEST_FILE3 "test_file3"
-#define TEST_FILE4 "test_file4"
-
-#define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
-
-int no_setup();
-int setup1(); /* setup() to test access() for EACCES */
-int setup2(); /* setup() to test access() for EACCES */
-int setup3(); /* setup() to test access() for EACCES */
-int setup4(); /* setup() to test access() for EINVAL */
-int longpath_setup(); /* setup function to test access() for ENAMETOOLONG */
-
-char Longpathname[PATH_MAX+2];
-char High_address_node[64];
-
-struct test_case_t { /* test case structure */
- const char *pathname;
- int a_mode;
- const char *desc;
- int exp_errno;
- int (*setupfunc)();
-} Test_cases[] = {
- { TEST_FILE1, R_OK, "Read Access denied on file", EACCES, setup1 },
- { TEST_FILE2, W_OK, "Write Access denied on file", EACCES, setup2 },
- { TEST_FILE3, X_OK, "Execute Access denied on file", EACCES, setup3 },
- { TEST_FILE4, INV_OK, "Access mode invalid", EINVAL, setup4 },
- { High_address_node, R_OK, "Address beyond address space", EFAULT, no_setup },
- { (char *)-1, R_OK, "Negative address", EFAULT, no_setup },
- { "", W_OK, "Pathname is empty", ENOENT, no_setup },
- { Longpathname, R_OK, "Pathname too long", ENAMETOOLONG, longpath_setup },
- { NULL, 0, NULL, 0, no_setup }
-};
-
-const char *TCID="access03"; /* Test program identifier. */
-int TST_TOTAL=8; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int exp_enos[]={EACCES, EFAULT, EINVAL, ENOENT, ENAMETOOLONG, 0};
-
-void setup(); /* Main setup function of test */
-void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
-char *get_high_address (void);
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- const char *file_name; /* name of the testfile */
- const char *test_desc; /* test specific message */
- int access_mode; /* specified access mode for testfile */
- int ind; /* counter for testcase looping */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
- }
-
- /* Perform global setup for test */
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count = 0;
-
- for (ind = 0; Test_cases[ind].desc != NULL; ind++) {
- file_name = Test_cases[ind].pathname;
- access_mode = Test_cases[ind].a_mode;
- test_desc = Test_cases[ind].desc;
-
- if (file_name == High_address_node) {
- file_name = (char *)get_high_address();
- }
-
- /*
- * Call access(2) to test different test conditions.
- * verify that it fails with -1 return value and
- * sets appropriate errno.
- */
- TEST(access(file_name, access_mode));
-
- if (TEST_RETURN != -1) {
- tst_resm(TFAIL, "access() returned %d, "
- "expected -1, errno:%d", TEST_RETURN,
- Test_cases[ind].exp_errno);
- continue;
- }
-
- TEST_ERROR_LOG(TEST_ERRNO);
-
- /*
- * Call a function to verify whether
- * the specified file has specified
- * access mode.
- */
- if (TEST_ERRNO == Test_cases[ind].exp_errno) {
- tst_resm(TPASS, "access() fails, %s, errno:%d",
- test_desc, TEST_ERRNO);
- } else {
- tst_resm(TFAIL, "access() fails, %s, errno:%d, "
- "expected errno:%d", test_desc,
- TEST_ERRNO, Test_cases[ind].exp_errno);
- }
- } /* Test Case Looping */
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- *
- * Create a temporary directory and change directory to it.
- * Call individual test specific setup functions.
- */
-void
-setup()
-{
- int ind; /* counter for testsetup functions */
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Check that the test process id is not root/super-user */
- if (geteuid() == 0) {
- tst_brkm(TBROK, NULL, "Must be non-root/super for this test!");
- tst_exit();
- }
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* call individual setup functions */
- for (ind = 0; Test_cases[ind].desc != NULL; ind++) {
- Test_cases[ind].setupfunc();
- }
-}
-
-/*
- * no_setup() - some test conditions do not need any setup.
- * Hence, this function simply returns 0.
- */
-int
-no_setup()
-{
- return 0;
-}
-
-/*
- * setup1() - Setup function to test access() for return value -1
- * and errno EACCES when read access denied for specified
- * testfile.
- *
- * Creat/open a testfile and close it.
- * Deny read access permissions on testfile.
- * This function returns 0.
- */
-int
-setup1()
-{
- int fd1; /* file handle for testfile */
-
- /* Creat a test file under above directory created */
- if ((fd1 = open(TEST_FILE1, O_RDWR|O_CREAT, FILE_MODE)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, %#o) Failed, errno=%d :%s",
- TEST_FILE1, FILE_MODE, errno, strerror(errno));
- }
-
- /* Close the testfile created above */
- if (close(fd1) == -1) {
- tst_brkm(TBROK, cleanup, "close(%s) Failed, errno=%d : %s",
- TEST_FILE1, errno, strerror(errno));
- }
-
- /* Change mode permissions on testfile */
- if (chmod(TEST_FILE1, 0333) < 0) {
- tst_brkm(TBROK, cleanup, "chmod() failed on %s, errno=%d",
- TEST_FILE1, errno);
- }
-
- return 0;
-}
-
-/*
- * setup2() - Setup function to test access() for return value -1 and
- * errno EACCES when write access denied on testfile.
- *
- * Creat/open a testfile and close it.
- * Deny write access permissions on testfile.
- * This function returns 0.
- */
-int
-setup2()
-{
- int fd2; /* file handle for testfile */
-
- /* Creat a test file under above directory created */
- if ((fd2 = open(TEST_FILE2, O_RDWR|O_CREAT, FILE_MODE)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, %#o) Failed, errno=%d :%s",
- TEST_FILE2, FILE_MODE, errno, strerror(errno));
- }
-
- /* Close the testfile created above */
- if (close(fd2) == -1) {
- tst_brkm(TBROK, cleanup, "close(%s) Failed, errno=%d : %s",
- TEST_FILE2, errno, strerror(errno));
- }
-
- /* Change mode permissions on testfile */
- if (chmod(TEST_FILE2, 0555) < 0) {
- tst_brkm(TBROK, cleanup, "chmod() failed on %s, errno=%d",
- TEST_FILE2, errno);
- }
-
- return 0;
-}
-
-/*
- * setup3() - Setup function to test access() for return value -1 and
- * errno EACCES when execute access denied on testfile.
- *
- * Creat/open a testfile and close it.
- * Deny search access permissions on testfile.
- * This function returns 0.
- */
-int
-setup3()
-{
- int fd3; /* file handle for testfile */
-
- /* Creat a test file under above directory created */
- if ((fd3 = open(TEST_FILE3, O_RDWR|O_CREAT, FILE_MODE)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, %#o) Failed, errno=%d :%s",
- TEST_FILE3, FILE_MODE, errno, strerror(errno));
- }
-
- /* Close the testfile created above */
- if (close(fd3) == -1) {
- tst_brkm(TBROK, cleanup, "close(%s) Failed, errno=%d : %s",
- TEST_FILE3, errno, strerror(errno));
- }
-
- /* Change mode permissions on testfile */
- if (chmod(TEST_FILE3, 0666) < 0) {
- tst_brkm(TBROK, cleanup, "chmod() failed on %s, errno=%d",
- TEST_FILE3, errno);
- }
-
- return 0;
-}
-
-/*
- * setup4() - Setup function to test access() for return value -1
- * and errno EINVAL when specified access mode argument is
- * invalid.
- *
- * Creat/open a testfile and close it.
- * This function returns 0.
- */
-int
-setup4()
-{
- int fd4; /* file handle for testfile */
-
- /* Creat a test file under above directory created */
- if ((fd4 = open(TEST_FILE4, O_RDWR|O_CREAT, FILE_MODE)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, %#o) Failed, errno=%d :%s",
- TEST_FILE4, FILE_MODE, errno, strerror(errno));
- }
-
- /* Close the testfile created above */
- if (close(fd4) == -1) {
- tst_brkm(TBROK, cleanup, "close(%s) Failed, errno=%d : %s",
- TEST_FILE4, errno, strerror(errno));
- }
-
- return 0;
-}
-
-/*
- * longpath_setup() - setup to create a node with a name length exceeding
- * the MAX. length of PATH_MAX.
- */
-int
-longpath_setup()
-{
- int ind;
-
- for (ind = 0; ind <= (PATH_MAX + 1); ind++) {
- Longpathname[ind] = 'a';
- }
-
- return 0;
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- *
- * Remove the test directory and testfile created in the setup.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /*
- * Delete the test directory/file and temporary directory
- * created in the setup.
- */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/alarm01.c b/winsup/testsuite/winsup.api/ltp/alarm01.c
deleted file mode 100644
index 187e488..0000000
--- a/winsup/testsuite/winsup.api/ltp/alarm01.c
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : alarm01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for alarm(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) alarm(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * The libcuts.a and libsys.a libraries must be included in
- * the compilation of this test.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the alarm(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * alarm(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="alarm01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call alarm(2)
- */
- TEST(alarm(1));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- tst_resm(TFAIL, "alarm(1) Failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "alarm(1) returned %d", TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- void trapper();
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- signal(SIGALRM, trapper);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-void
-trapper(sig)
-int sig;
-{
- signal(SIGALRM, trapper);
-}
-
diff --git a/winsup/testsuite/winsup.api/ltp/alarm02.c b/winsup/testsuite/winsup.api/ltp/alarm02.c
deleted file mode 100644
index 03a41b4..0000000
--- a/winsup/testsuite/winsup.api/ltp/alarm02.c
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : alarm02
- *
- * TEST TITLE : Boundary Value Test for alarm(2)
- *
- * PARENT DOCUMENT : almtds02
- *
- * TEST CASE TOTAL : 3
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * BINARY LOCATION : CUTS_BIN/rf_tests/sys
- *
- * SOURCE LOCATION : CUTS_SRC/src/tests/sys
- *
- * AUTHOR : Billy Jean Horne
- *
- * CO-PILOT : Kathy Olmsted
- *
- * DATE STARTED : 06/01/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- * Test Case One - A call to alarm() shall not return an error if
- * seconds is a -1.
- * Test FAILS if a non-zero value is returned.
- * Test Case Two - A call to alarm() shall not return an error if
- * seconds is the maximum unsigned integer (2**63).
- * Test FAILS if a non-zero value is returned.
- * Test Case Three - A call to alarm() shall not return an error if
- * seconds is the maximum unsigned integer plus 1 ((2**63)+1).
- * Test FAILS if a non-zero value is returned.
- *
- * ENVIRONMENTAL NEEDS
- * The libcuts.a and libsys.a libraries must be included in
- * the compilation of this test.
- *
- * DETAILED DESCRIPTION
- *
- * Setup:
- * Define a cleanup function.
- *
- * Test:
- * Loop for each test case.
- * Execute alarm (0) system call to clear previous alarm.
- * Check return code, if system call failed (return=-1)
- * Issue a BROK message and exit the test.
- * Call alarm() with boundary values for seconds.
- * Verify that returned value is as expected.
- * Report results.
- *
- * Cleanup:
- *
- */
-#include <sys/types.h>
-#include <errno.h>
-#include <sys/signal.h>
-#include <limits.h>
-#include "test.h"
-#include "usctest.h" /* required for usctest */
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-void alarm_received();
-
-
-
-const char *TCID="alarm02"; /* Test program identifier. */
-int TST_TOTAL=3; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_ * routines */
-
-int received_alarm = 0; /* Indicates a SIGALRM was received */
-
-/************************************************************
- * Main program
- ***********************************************************/
-
-int
-main(int ac, char **av)
-{
-
- /* Parameters for usc code */
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* Parameters for alarm test */
- const char *buf[] = { "-1", "ULONG_MAX", "ULONG_MAX+1"};
- unsigned long int sec[] = {-1, ULONG_MAX, ULONG_MAX+1};
- int exp[] = {0,0,0};
- int i;
-
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
-
- setup();
-
- /***************************************************************
- * check looping state
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
-
- Tst_count=0;
-
- for (i=0;i<TST_TOTAL;i++) {
-
- /* capture an SIGALRM signal */
- received_alarm = 0;
- signal(SIGALRM, alarm_received);
-
- TEST (alarm (sec[i]));
- /* reset the alarm */
- alarm (0);
- if (TEST_RETURN != 0) {
- tst_resm(TFAIL,
- "alarm(%u) returned %u, when %u was expected for value %s.",
- sec[i], TEST_RETURN, exp[i], buf[i]);
-
- }
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- else if (STD_FUNCTIONAL_TEST) {
- if (received_alarm == 1) {
- tst_resm (TFAIL,
- "alarm(%u) returned %u but an alarm signal was received for value %s.",
- sec[i], TEST_RETURN, buf[i]);
- } else {
- tst_resm (TPASS,
- "alarm(%u) returned %u as expected for value %s.",
- sec[i], TEST_RETURN, buf[i]);
- }
-
- } /* End of STD_FUNCTIONAL_TEST */
- } /* End of for loop */
- /*
- * Reset alarm before cleanup.
- */
-
- alarm(0);
-
- } /* End for TEST_LOOPING */
-
- cleanup();
-
- return 0;
-}
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-
-void
-setup()
-{
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* End setup() */
-
-}
-
-/***********************************************************
- * Cleanup:
- * exit using tst_exit.
- ***********************************************************/
-
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
-
- tst_exit();
-}
-
-void alarm_received()
-{
- received_alarm = 1;
-}
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/alarm03.c b/winsup/testsuite/winsup.api/ltp/alarm03.c
deleted file mode 100644
index 871f6fa..0000000
--- a/winsup/testsuite/winsup.api/ltp/alarm03.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : alarm03
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : alarm(2) cleared by a fork
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Richard Logan
- *
- * CO-PILOT : Dennis Arason
- *
- * DATE STARTED : 08/96
- *
- *
- * TEST CASES
- *
- * 1.) alarm(100), fork, child's alarm(0) shall return 0;
- * 2.) alarm(100), fork, parent's alarm(0) shall return non-zero.
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the alarm(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * alarm(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-
-const char *TCID="alarm03"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call alarm(2)
- */
- TEST(alarm(100));
-
- switch ( fork()) {
- case -1:
- tst_brkm(TBROK, cleanup, "fork failed, errno:%d %s",
- errno, strerror(errno));
- break;
-
- case 0:
- TEST( alarm(0) );
-
- if ( TEST_RETURN != 0 )
- tst_resm(TFAIL,
- "alarm(100), fork, alarm(0) child's alarm returned %d",
- TEST_RETURN);
- else if ( STD_FUNCTIONAL_TEST )
- tst_resm(TPASS,
- "alarm(100), fork, alarm(0) child's alarm returned %d",
- TEST_RETURN);
-
- exit(0);
- break;
-
- default:
- Tst_count++;
- TEST( alarm(0) );
- if ( TEST_RETURN <= 0 || TEST_RETURN > 100 )
- tst_resm(TFAIL,
- "alarm(100), fork, alarm(0) parent's alarm returned %d",
- TEST_RETURN);
-
- else if ( STD_FUNCTIONAL_TEST )
- tst_resm(TPASS,
- "alarm(100), fork, alarm(0) parent's alarm returned %d",
- TEST_RETURN);
-
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- void trapper();
-
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- signal(SIGALRM, trapper);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-void
-trapper(sig)
-int sig;
-{
- signal(SIGALRM, trapper);
-}
-
diff --git a/winsup/testsuite/winsup.api/ltp/alarm07.c b/winsup/testsuite/winsup.api/ltp/alarm07.c
deleted file mode 100644
index a9f2695..0000000
--- a/winsup/testsuite/winsup.api/ltp/alarm07.c
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: alarm03
- *
- * Test Description:
- * Check the functionality of the alarm() when the time input
- * parameter is non-zero and the process does a fork.
- *
- * Expected Result:
- * The alarm request should be cleared in the child process.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- * Usage: <for command-line>
- * alarm03 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * None.
- */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/wait.h>
-
-#include "test.h"
-#include "usctest.h"
-
-const char *TCID="alarm03"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int almreceived = 0; /* flag to indicate SIGALRM received or not */
-
-void setup(); /* Main setup function of test */
-void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
-void sigproc(int sig); /* signal catching function */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- int time_sec = 3; /* time for which alarm is set */
- int sleep_time = 5; /* waiting time for the SIGALRM signal */
- pid_t cpid; /* child process id */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *)NULL, NULL);
- if (msg != (char *)NULL) {
- tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
- }
-
- /* Perform global setup for test */
- setup();
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call First alarm() with non-zero time parameter
- * 'time_sec' to send SIGALRM to the process.
- */
- TEST(alarm(time_sec));
-
- /* Now, fork a child process */
- cpid = fork();
- if (cpid < 0) {
- tst_resm(TFAIL, "fork() fails to create child, "
- "errno:%d", errno);
- }
-
- /* Wait for signal SIGALRM to be generated */
- sleep(sleep_time);
-
- if (STD_FUNCTIONAL_TEST) {
- if (cpid == 0) { /* Child process */
- /*
- * For child process if almreceived is 0
- * means alarm request is cleared.
- */
- if (almreceived == 0) {
- tst_resm(TPASS, "Functionality of "
- "alarm(%u) successful",
- time_sec);
- } else {
- tst_resm(TFAIL, "alarm request not "
- "cleared in child, "
- "almreceived:%d", almreceived);
- }
- } else { /* Parent process */
- /* Wait for child to complete execution */
- wait(0);
- }
- } else {
- tst_resm(TPASS, "call returned %d", TEST_RETURN);
- }
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- * Setup signal handler to catch SIGALRM signal.
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* Set the signal catching function */
- if (signal(SIGALRM, sigproc) == SIG_ERR) {
- tst_brkm(TFAIL, cleanup,
- "signal() fails to catch SIGALARM, errno=%d",
- errno);
- }
-}
-
-
-/*
- * sigproc(int) - This function defines the action that has to be taken
- * when the SIGALRM signal is caught.
- * It also sets the variable which is used to check whether the
- * alarm system call was successful.
- */
-void
-sigproc(int sig)
-{
- almreceived = almreceived + 1;
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/asyncio02.c b/winsup/testsuite/winsup.api/ltp/asyncio02.c
deleted file mode 100644
index 36c03b4..0000000
--- a/winsup/testsuite/winsup.api/ltp/asyncio02.c
+++ /dev/null
@@ -1,364 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/************************************************************
- * OS Test - Silicon Graphics, Inc.
- * Mendota Heights, Minnesota
- *
- * TEST IDENTIFIER: aiotcs02: write/close flushes data to the file
- *
- * PARENT DOCUMENT: aiotds01: kernel i/o
- *
- * AUTHOR: Barrie Kletscher
- *
- * CO-PILOT: Dave Baumgartner
- *
- * TEST ITEMS:
- * for each open flags set used:
- * 1. Multiple writes to a file work as specified for
- * more than BUFSIZ bytes.
- * 2. Multiple writes to a file work as specified for
- * BUFSIZ bytes.
- * 3. Multiple writes to a file work as specified for
- * lower than BUFSIZ bytes.
- *
- * INPUT SPECIFICATIONS:
- * Standard parse_opts supported options.
- *
- * OUTPUT SPECIFICATIONS
- * Standard tst_res output format
- *
- * ENVIRONMENTAL NEEDS:
- * This program uses the environment variable TMPDIR for the location
- * of the temporary directory.
- *
- *
- * SPECIAL PROCEDURAL REQUIREMENTS:
- * The program must be linked with tst_*.o and parse_opts.o.
- *
- * INTERCASE DEPENDENCIES:
- * NONE.
- *
- * DETAILED DESCRIPTION:
- * Attempt to get some memory to work with.
- * Call testrun writing (BUFSIZ + 1) bytes
- * Call testrun writing BUFSIZ bytes
- * Repeated call to testrun() with decreasing write sizes
- * less than BUFSIZ
- * End
- *
- * Start testrun()
- * Attempt to open a temporary file.
- * Write the memory to the file.
- * Attempt to close the file which also flushes the buffers.
- * Now check to see if the number of bytes written is the
- * same as the number of bytes in the file.
- * Cleanup
- *
- * BUGS:
- * NONE.
- *
-************************************************************/
-
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/signal.h>
-#include <errno.h>
-#include "test.h"
-#include "usctest.h"
-
-#define FLAG O_RDWR | O_CREAT | O_TRUNC /* Flags used when opening temp tile */
-#define MODE 0777 /* Mode to open file with */
-#define WRITES 10 /* Number of times buffer is written */
-#define DECR 1000 /* Number of bytes decremented between */
- /* Calls to testrun() */
-#define OK -1 /* Return value from testrun() */
-
-#define FNAME1 "aio02.1"
-#define FNAME2 "aio02.2"
-#define FNAME3 "aio02.3"
-
-#define ERR_MSG1 "Bytes in file not equal to bytes written."
-#define ERR_MSG2 "Bytes in file (%d) not equal to bytes written (%d)."
-
-char *dp; /* pointer to area of memory */
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-int testrun(int flag, int bytes, int ti);
-
-const char *TCID="asyncio02"; /* Test program identifier. */
-int TST_TOTAL=6; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-extern int Tst_nobuf; /* variable used to turn off tst_res buffering */
-
-extern int errno;
-
-int exp_enos[]={0}; /* Array of expected errnos */
-char mesg[150];
-const char *filename; /* name of the temporary file */
-
-char *Progname;
-int Open_flags;
-
-int Flags[] = {
- O_RDWR | O_CREAT | O_TRUNC,
- O_RDWR | O_CREAT | O_TRUNC
-};
-
-int Num_flags;
-
-/***********************************************************************
- * MAIN
- ***********************************************************************/
-int
-main(int ac, char **av)
-{
-
- int i; /* counter */
- int ret_val; /* return value from testrun call */
- int eok; /* everything is ok flag */
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- int flag_cnt;
-
- Tst_nobuf=1;
- Num_flags = sizeof(Flags)/sizeof(int);
- TST_TOTAL= 3 * Num_flags;
-
- /***************************************************************
- * parse standard options, and exit if there is an error
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- for (flag_cnt=0; flag_cnt<Num_flags; flag_cnt++) {
-
- /*
- * call testrun writing (BUFSIZ + 1) byte chunks
- */
-
- filename=FNAME1;
- if( testrun(Flags[flag_cnt],BUFSIZ+1,1) != OK)
- tst_resm(TFAIL,ERR_MSG1);
-
- else if ( STD_FUNCTIONAL_TEST ) {
- tst_resm(TPASS,
- "More than BUFSIZE bytes multiple synchronous writes to a file check out ok");
- }
-
- /*
- * call testrun writing BUFSIZ byte chunks
- */
-
- filename=FNAME2;
- if(testrun(Flags[flag_cnt],BUFSIZ,2) != OK) {
- tst_resm(TFAIL,ERR_MSG1);
- }
- else if ( STD_FUNCTIONAL_TEST ) {
- tst_resm(TPASS,
- "BUFSIZE bytes multiple synchronous writes to a file checks out ok");
- }
-
- /*
- * while the byte chunks are greater than 0
- * call testrun() with decreasing chunk sizes
- */
-
- filename=FNAME3;
- eok=1;
- for(i = BUFSIZ-1; i >= 0; i -= DECR) {
- if((ret_val = testrun(Flags[flag_cnt],i,3)) != OK) {
- char output[80]; /* local output char string */
-
- (void)sprintf(output,ERR_MSG2,ret_val,i*WRITES);
- tst_resm(TFAIL,output);
- }
- }
-
- if ( eok && STD_FUNCTIONAL_TEST )
- tst_resm(TPASS,
- "Less than BUFSIZE bytes multiple synchronous writes to a file checks out ok");
-
- }
- }
- cleanup();
-
- return 0;
-} /* end main() */
-
-/***********************************************************
- *
- * This function does the actual running of the tests.
- *
- ***********************************************************/
-int
-testrun(int flag, int bytes, int ti)
-{
-
- void cleanup();
-
- int fildes, /* temporary file's descriptor */
- i; /* counter */
-
- int ret;
-
- struct stat buffer; /* buffer of memory required for stat command */
-
- /*
- * Attempt to open a temporary file.
- */
-
- if((fildes = open(filename,flag,MODE)) == -1) {
- sprintf(mesg, "open failed, errno:%d", errno);
- tst_brkm(TBROK, cleanup, mesg);
- }
-
- /*
- * Write the memory to the file.
- */
-
- for(i = 0; i < WRITES; i++) {
- TEST( write(fildes,dp,(unsigned)bytes) );
-
- if( TEST_RETURN == -1) {
- sprintf(mesg, "write failed, errno:%d", errno);
- tst_brkm(TBROK, cleanup, mesg);
- }
- } /* end for() */
-
- /*
- * Attempt to close the file which also flushes the buffers.
- */
-
- if(close(fildes) == -1) {
- sprintf(mesg, "close failed, errno:%d", errno);
- tst_brkm(TBROK, cleanup, mesg);
- }
-
- ret=OK;
- if ( STD_FUNCTIONAL_TEST ) {
-
- /*
- * Now check to see if the number of bytes written is the
- * same as the number of bytes in the file.
- */
-
- if(stat(filename,&buffer) == -1) {
- sprintf(mesg, "stat failed, errno:%d", errno);
- tst_brkm(TBROK, cleanup, mesg);
- }
-
-
- if(buffer.st_size != (off_t)(bytes * WRITES)) {
- ret=(int)buffer.st_size;
- }
- }
-
- if ( unlink(filename) == -1 ) {
- sprintf(mesg, "unlink failed, errno:%d", errno);
- tst_brkm(TBROK, cleanup, mesg);
- }
-
- return ret;
-
-} /* end testrun() */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* create a temporary directory and go to it */
- tst_tmpdir();
-
- /* Indicate which errnos are expected */
- TEST_EXP_ENOS(exp_enos);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /*
- * Attempt to get some memory to work with.
- */
-
- if((dp = (char *)malloc((unsigned)BUFSIZ+1)) == NULL) {
- sprintf(mesg, "malloc failed, errno:%d", errno);
- tst_brkm(TBROK, cleanup, mesg);
- }
-
-
-} /* End setup() */
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* remove temporary directory and all files in it. */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/chdir02.c b/winsup/testsuite/winsup.api/ltp/chdir02.c
deleted file mode 100644
index 552f912..0000000
--- a/winsup/testsuite/winsup.api/ltp/chdir02.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : chdir02
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for chdir(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) chdir(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the chdir(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * chdir(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-const char *TCID="chdir02"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-const char *dirs[2] = { "/", "/tmp" };
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call chdir(2)
- */
- TEST(chdir(dirs[lc%2]));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "chdir(%s) Failed, errno=%d : %s", dirs[lc%2],
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "chdir(%s) returned %d", dirs[lc%2], TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/chdir04.c b/winsup/testsuite/winsup.api/ltp/chdir04.c
deleted file mode 100644
index da2b0ac..0000000
--- a/winsup/testsuite/winsup.api/ltp/chdir04.c
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * chdir02.c
- *
- * DESCRIPTION
- * Testcase to test whether chdir(2) sets errno correctly.
- *
- * ALGORITHM
- * 1. Test for ENAMETOOLONG:
- * Create a bad directory name with length more than
- *
- * VFS_MAXNAMELEN (Linux kernel variable), and attempt to
- * chdir(2) to it.
- *
- * 2. Test for ENOENT:
- * Attempt to chdir(2) on a non-existent directory
- *
- * 3. Test for EFAULT:
- * Pass an address which lies outside the address space of the
- * process, and expect an EFAULT.
- *
- * USAGE: <for command-line>
- * chdir02 [-c n] [-e] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * NONE
- */
-
-#include <errno.h>
-#include <sys/stat.h>
-#include <test.h>
-#include <usctest.h>
-
-const char *TCID = "chdir02";
-int TST_TOTAL = 3;
-extern int Tst_count;
-
-int exp_enos[] = {ENAMETOOLONG, ENOENT, EFAULT, 0};
-
-char bad_dir[] = "abcdefghijklmnopqrstmnopqrstuvwxyzabcdefghijklmnopqrstmnopqrstuvwxyzabcdefghijklmnopqrstmnopqrstuvwxyzabcdefghijklmnopqrstmnopqrstuvwxyzabcdefghijklmnopqrstmnopqrstuvwxyzabcdefghijklmnopqrstmnopqrstuvwxyzabcdefghijklmnopqrstmnopqrstuvwxyzabcdefghijklmnopqrstmnopqrstuvwxyz";
-
-char noexist_dir[] = "/tmp/noexistdir";
-
-struct test_case_t {
- char *dname;
- int error;
-} TC[] = {
- /*
- * to test whether chdir() is setting ENAMETOOLONG if the
- * directory is more than VFS_MAXNAMELEN
- */
- {bad_dir, ENAMETOOLONG},
-
- /*
- * to test whether chdir() is setting ENOENT if the
- * directory is not existing.
- */
- {noexist_dir, ENOENT},
-
- /*
- * to test whether chdir() is setting EFAULT if the
- * directory is an invalid address.
- */
- {(void *)-1, EFAULT}
-};
-
-int flag;
-#define FAILED 1
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- int i;
- const char *msg; /* message returned from parse_opts */
-
- /* parse standard options */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- }
-
- setup();
-
- /* set up the expected errnos */
- TEST_EXP_ENOS(exp_enos);
-
- /* check looping state if -i option is given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
- /* loop through the test cases */
- for (i=0; i<TST_TOTAL; i++) {
-
- TEST(chdir(TC[i].dname));
-
- if (TEST_RETURN != -1) {
- tst_resm(TFAIL, "call succeeded unexpectedly");
- continue;
- }
-
- TEST_ERROR_LOG(TEST_ERRNO);
-
- if (TEST_ERRNO == TC[i].error) {
- tst_resm(TPASS, "expected failure - "
- "errno = %d : %s", TEST_ERRNO,
- strerror(TEST_ERRNO));
- } else {
- tst_resm(TFAIL, "unexpected error - %d : %s - "
- "expected %d", TEST_ERRNO,
- strerror(TEST_ERRNO), TC[i].error);
- }
- }
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* make a temporary directory and cd to it */
- tst_tmpdir();
-}
-
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /*
- * Delete the test directory created in setup().
- */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/chmod01.c b/winsup/testsuite/winsup.api/ltp/chmod01.c
deleted file mode 100644
index c20e617..0000000
--- a/winsup/testsuite/winsup.api/ltp/chmod01.c
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: chmod01
- *
- * Test Description:
- * Verify that, chmod(2) succeeds when used to change the mode permissions
- * of a file.
- *
- * Expected Result:
- * chmod(2) should return 0 and the mode permissions set on file should match
- * the specified mode.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.
- *
- * Usage: <for command-line>
- * chmod01 [-c n] [-e] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * None.
- *
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
-#define TESTFILE "testfile"
-
-const char *TCID="chmod01"; /* Test program identifier. */
-int TST_TOTAL=8; /* Total number of test conditions */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int Modes[] = {0, 07, 070, 0700, 0777, 02777, 04777, 06777};
-
-void setup(); /* setup function for the test */
-void cleanup() __attribute__ ((noreturn));/* cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- struct stat stat_buf; /* stat(2) struct contents */
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- int ind; /* counter variable for chmod(2) tests */
- unsigned mode; /* file mode permission */
-
- TST_TOTAL = sizeof(Modes) / sizeof(int);
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /* Perform global setup for test */
- setup();
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count = 0;
-
- for (ind = 0; ind < TST_TOTAL; ind++) {
- mode = Modes[ind];
-
- /*
- * Call chmod(2) with different mode permission
- * bits to set it for "testfile".
- */
- TEST(chmod(TESTFILE, mode));
-
- /* check return code of chmod(2) */
- if (TEST_RETURN == -1) {
- tst_resm(TFAIL,
- "chmod(%s, %#o) Failed, errno=%d : %s",
- TESTFILE, mode, TEST_ERRNO,
- strerror(TEST_ERRNO));
- continue;
- }
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- /*
- * Get the testfile information using
- * stat(2).
- */
- if (stat(TESTFILE, &stat_buf) < 0) {
- tst_brkm(TFAIL, cleanup, "stat(2) of "
- "%s failed, errno:%d",
- TESTFILE, TEST_ERRNO);
- }
- stat_buf.st_mode &= ~S_IFREG;
-
- /*
- * Check for expected mode permissions
- * on testfile.
- */
- if (stat_buf.st_mode == mode) {
- tst_resm(TPASS, "Functionality of "
- "chmod(%s, %#o) successful",
- TESTFILE, mode);
- } else {
- tst_resm(TFAIL, "%s: Incorrect "
- "modes 0%03o, Expected 0%03o",
- TESTFILE, stat_buf.st_mode,
- mode);
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
- }
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * void
- * setup() - performs all ONE TIME setup for this test.
- * Create a temporary directory and change directory to it.
- * Create a test file under temporary directory and close it
- */
-void
-setup()
-{
- int fd;
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Creat a test file under temporary directory and close it */
- if ((fd = open(TESTFILE, O_RDWR|O_CREAT, FILE_MODE)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, %o) Failed, errno=%d : %s",
- TESTFILE, FILE_MODE, errno, strerror(errno));
- }
- if (close(fd) == -1) {
- tst_brkm(TBROK, cleanup,
- "close(%s) Failed, errno=%d : %s",
- TESTFILE, errno, strerror(errno));
- }
-
-} /* End setup() */
-
-/*
- * void
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Remove the test directory and testfile created in the setup.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/chmod02.c b/winsup/testsuite/winsup.api/ltp/chmod02.c
deleted file mode 100644
index 8026768..0000000
--- a/winsup/testsuite/winsup.api/ltp/chmod02.c
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : chmod02
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for chmod(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 8
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) chmod(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * The libcuts.a and libsys.a libraries must be included in
- * the compilation of this test.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the chmod(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * chmod(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-
-
-const char *TCID="chmod02"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-char fname[255];
-const char *buf = "file contents\n";
-
-int Modes[] = {0, 07, 070, 0700, 0777, 02777, 04777, 06777};
-
-
-/***********************************************************************
- * Main
- ***********************************************************************/
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- int ind;
- int mode;
-
- TST_TOTAL = sizeof(Modes) / sizeof(int);
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- for (ind=0; ind<TST_TOTAL; ind++) {
- mode=Modes[ind];
-
- /*
- * Call chmod(2) with mode argument on fname
- */
- TEST(chmod(fname, mode));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- tst_resm(TFAIL, "chmod(%s, %#o) Failed, errno=%d : %s", fname,
- mode, TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "chmod(%s, %#o) returned %d", fname,
- mode, TEST_RETURN);
- }
- else
- Tst_count++;
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- int fd;
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- strcat(fname, "tfile");
- if ((fd = open(fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- } else if (write(fd, &buf, strlen(buf)) == -1) {
- tst_brkm(TBROK, cleanup,
- "write(%s, &buf, strlen(buf)) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- } else if (close(fd) == -1) {
- tst_brkm(TBROK, cleanup,
- "close(%s) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
diff --git a/winsup/testsuite/winsup.api/ltp/chown01.c b/winsup/testsuite/winsup.api/ltp/chown01.c
deleted file mode 100644
index b3cd088..0000000
--- a/winsup/testsuite/winsup.api/ltp/chown01.c
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : chown01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for chown(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) chown(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the chown(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * chown(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="chown01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char fname[255];
-int fd, uid, gid;
-const char *buf = "davef";
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call chown(2)
- */
- TEST(chown(fname, uid,gid));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "chown(%s, %d,%d) Failed, errno=%d : %s", fname, uid, gid,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "chown(%s, %d,%d) returned %d", fname, uid, gid, TEST_RETURN);
- }
- } /* end else */
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* create a temp dir and cd to it. */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* set uid and gid */
- uid=geteuid();
- gid=getegid();
-
- sprintf(fname,"t_%d",getpid());
- if ((fd = open(fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_brkm(TBROK, cleanup, "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s", fname, errno, strerror(errno));
- } else if (write(fd, &buf, strlen(buf)) == -1) {
- tst_brkm(TBROK, cleanup, "write(%s, &buf, strlen(buf)) Failed, errno=%d : %s", fname, errno, strerror(errno));
- } else if (close(fd) == -1) {
- tst_brkm(TBROK, cleanup, "close(%s) Failed, errno=%d : %s", fname, errno, strerror(errno));
- }
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* remove temp dir and files */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/close01.c b/winsup/testsuite/winsup.api/ltp/close01.c
deleted file mode 100644
index 4d40598..0000000
--- a/winsup/testsuite/winsup.api/ltp/close01.c
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * close01.c
- *
- * DESCRIPTION
- * Test that closing a regular file and a pipe works correctly
- *
- * ALGORITHM
- * Creat a file, and dup() a fildes
- * Open a pipe
- * call close() using the TEST macro
- * if the call fails
- * issue a FAIL message and continue
- * else if STD_FUNCTIONAL_TEST
- * attempt to close the file/pipe again
- * if there is an error
- * issue a PASS message
- * else
- * issue a FAIL message
- * else
- * issue a PASS message
- *
- *
- * USAGE: <for command-line>
- * close01 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None
- */
-
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include "test.h"
-#include "usctest.h"
-
-void cleanup(void) __attribute__((noreturn));
-void setup(void);
-
-const char *TCID = "close01()";
-int TST_TOTAL = 2;
-extern int Tst_count;
-
-char fname[40] = "";
-
-int fild = -1;
-int newfd = -1;
-int pipefildes[2];
-
-struct test_case_t {
- int *fd;
- const char *type;
-} TC[] = {
- /* file descriptor for a regular file */
- {&newfd, "file"},
-
- /* file descriptor for a pipe */
- {&pipefildes[0], "pipe"}
-};
-
-int
-main(int ac, char **av)
-{
-
- int i;
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* parse standard options */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- setup(); /* global setup */
-
- /* The following loop checks looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
- /* set up the file and pipe for the test */
- if ((fild = creat(fname, 0777)) == -1) {
- perror (fname);
- tst_brkm(TBROK, cleanup, "can't open file %s", fname);
- }
-
- if ((newfd = dup(fild)) == -1) {
- tst_brkm(TBROK, cleanup, "can't dup the file des");
- }
-
- if (pipe(pipefildes) == -1) {
- tst_brkm(TBROK, cleanup, "can't open pipe");
- }
-
- /* loop through the test cases */
-
- for (i = 0; i < TST_TOTAL; i++) {
-
- TEST(close(*TC[i].fd));
-
- if (TEST_RETURN == -1) {
- tst_resm(TFAIL, "call failed unexpectedly");
- continue;
- }
-
- if (STD_FUNCTIONAL_TEST) {
- /* attempt to close the fd again */
- if (close(*TC[i].fd) == -1) {
- tst_resm(TPASS, "%s appears closed",
- TC[i].type);
- } else {
- tst_resm(TFAIL, "%s close succeeded on"
- "second attempt", TC[i].type);
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
- }
-
- }
- cleanup();
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test
- */
-void
-setup(void)
-{
- int mypid;
-
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- umask(0);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- mypid = getpid();
- sprintf(fname, "fname.%d", mypid);
-}
-
-/*
- * cleanup() - performs all the ONE TIME cleanup for this test at completion
- * or premature exit.
- */
-void
-cleanup(void)
-{
- /*
- * print timing status if that option was specified.
- * print errno log if that option was specified
- */
- TEST_CLEANUP;
-
- if (fild >= 0)
- close (fild);
- if (newfd >= 0)
- close (newfd);
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/close02.c b/winsup/testsuite/winsup.api/ltp/close02.c
deleted file mode 100644
index 72ecf81..0000000
--- a/winsup/testsuite/winsup.api/ltp/close02.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * close02.c
- *
- * DESCRIPTION
- * Check that an invalid file descriptor returns EBADF
- *
- * ALGORITHM
- * loop if that option is specified
- * call close using the TEST macro and passing in an invalid fd
- * if the call succeedes
- * issue a FAIL message
- * else
- * log the errno
- * if the errno == EBADF
- * issue a PASS message
- * else
- * issue a FAIL message
- * cleanup
- *
- * USAGE: <for command-line>
- * close02 [-c n] [-e] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None
- */
-
-#include <errno.h>
-#include <sys/stat.h>
-#include "test.h"
-#include "usctest.h"
-
-void cleanup(void) __attribute__((noreturn));
-void setup(void);
-
-int exp_enos[] = {EBADF, 0};
-
-const char *TCID = "close02()";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* parse standard options */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- setup(); /* global setup */
-
- /* set up expected errnos */
- TEST_EXP_ENOS(exp_enos);
-
- /* The following loop checks looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
- TEST(close(-1));
-
- if (TEST_RETURN != -1) {
- tst_resm(TFAIL, "Closed a non existent fildes");
- } else {
- TEST_ERROR_LOG(TEST_ERRNO);
-
- if (TEST_ERRNO != EBADF) {
- tst_resm(TFAIL, "close() FAILED to set errno "
- "to EBADF on an invalid fd, got %d",
- errno);
- } else {
- tst_resm(TPASS, "call returned EBADF");
- }
- }
- }
- cleanup();
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test
- */
-void
-setup(void)
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- umask(0);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-}
-
-/*
- * cleanup() - performs all the ONE TIME cleanup for this test at completion
- * or premature exit.
- */
-void
-cleanup(void)
-{
- /*
- * print timing status if that option was specified.
- * print errno log if that option was specified
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/close08.c b/winsup/testsuite/winsup.api/ltp/close08.c
deleted file mode 100644
index 3fbcc3b..0000000
--- a/winsup/testsuite/winsup.api/ltp/close08.c
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : close08
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for close(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) close(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the close(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * close(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="close08"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char fname[255];
-int fd;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- if ((fd=open(fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
- fname, TEST_ERRNO, strerror(TEST_ERRNO));
- }
- /*
- * Call close(2)
- */
- TEST(close(fd));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "close(%s) Failed, errno=%d : %s", fname,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "close(%s) returned %d", fname, TEST_RETURN);
- }
- }
-
- if (unlink(fname) == -1) {
- tst_brkm(TBROK, cleanup, "unlink(%s) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(fname,"tfile_%d",getpid());
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/creat01.c b/winsup/testsuite/winsup.api/ltp/creat01.c
deleted file mode 100644
index 6f89170..0000000
--- a/winsup/testsuite/winsup.api/ltp/creat01.c
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * creat01.c
- *
- * DESCRIPTION
- * Testcase to check the basic functionality of the creat(2) system call.
- *
- * ALGORITHM
- * 1. creat() a file using 0444 mode, write to the fildes, write
- * should return a positive count.
- *
- * 2. creat() should truncate a file to 0 bytes if it already
- * exists, and should not fail.
- *
- * USAGE: <for command-line>
- * creat01 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None
- */
-
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-void functest1(void);
-void functest2(void);
-
-const char *TCID = "creat01";
-int TST_TOTAL = 2;
-extern int Tst_count;
-
-char filename[40];
-
-#define MODE1 0644
-#define MODE2 0444
-
-struct test_case_t {
- char *fname;
- int mode;
- void (*functest)();
-} TC[] = {
- /* creat() the file and write to it */
- {filename, MODE1, functest1},
-
- /* creat() the same file and check that it is now 0 length */
- {filename, MODE2, functest2}
-};
-
-int
-main(int ac, char **av)
-{
- int i;
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* parse standard options */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
- }
-
- setup(); /* set "tstdir", and "testfile" variables */
-
- /* check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
- /* loop through the test cases */
-
- for (i=0; i<TST_TOTAL; i++) {
- TEST(creat(filename, TC[i].mode));
-
- if (TEST_RETURN == -1) {
- tst_resm(TFAIL, "Could not creat file %s",
- filename);
- continue;
- }
-
- if (STD_FUNCTIONAL_TEST) {
- (*TC[i].functest)();
- } else {
- tst_resm(TPASS, "call succeeded");
- }
- if (TEST_RETURN >= 0) {
- close(TEST_RETURN);
- }
- }
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * functest1() - check the functionality of the first test by making sure
- * that a write to the file succeeds
- */
-void
-functest1()
-{
- if (write(TEST_RETURN, "A", 1) != 1) {
- tst_resm(TFAIL, "write was unsuccessful");
- } else {
- tst_resm(TPASS, "file was created and written to successfully");
- }
-}
-
-/*
- * functest2() - check the functionality of the second test by making sure
- * that the file is now 0 length
- */
-void
-functest2()
-{
- struct stat buf;
-
- if (stat(filename, &buf) < 0) {
- tst_brkm(TBROK, cleanup, "failed to stat test file");
- /*NOTREACHED*/
- }
- if (buf.st_size != 0) {
- tst_resm(TFAIL, "creat() FAILED to truncate "
- "file to zero bytes");
- } else {
- tst_resm(TPASS, "creat() truncated existing file to 0 bytes");
- }
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test
- */
-void
-setup()
-{
- if (geteuid() == 0) {
- tst_brkm(TBROK, tst_exit, "Must not run this as root");
- /*NOTREACHED*/
- }
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- umask(0);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- tst_tmpdir();
-
- sprintf(filename, "creat01.%d", getpid());
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- unlink(filename);
-
- /* delete the test directory created in setup() */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/creat03.c b/winsup/testsuite/winsup.api/ltp/creat03.c
deleted file mode 100644
index 2ca21f1..0000000
--- a/winsup/testsuite/winsup.api/ltp/creat03.c
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * creat03.c
- *
- * DESCRIPTION
- * Testcase to check whether the sticky bit cleared.
- *
- * ALGORITHM
- * Creat a new file, fstat.st_mode should have the 01000 bit off
- *
- * USAGE: <for command-line>
- * creat03 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None
- */
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include "test.h"
-#include "usctest.h"
-
-const char *TCID = "creat03"; /* Test program identifier */
-int TST_TOTAL = 1; /* Total number of test cases */
-extern int Tst_count; /* Test case counter */
-
-char pfilname[40] = "";
-#define FMODE 0444
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-
-int
-main(int ac, char **av)
-{
- struct stat statbuf;
- unsigned short filmode;
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* parse standard options */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- setup();
-
- /* check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
- TEST(creat(pfilname, FMODE));
-
- if (TEST_RETURN == -1) {
- tst_resm(TFAIL, "Cannot creat %s", pfilname);
- continue;
- /*NOTREACHED*/
- }
-
- if (STD_FUNCTIONAL_TEST) {
- if (fstat(TEST_RETURN, &statbuf) == -1) {
- tst_brkm(TBROK, cleanup, "fstat() failed");
- }
- filmode = statbuf.st_mode;
- tst_resm(TINFO, "Created file has mode = 0%o", filmode);
- if ((filmode & S_ISVTX) != 0) {
- tst_resm(TFAIL, "save text bit not cleared");
- } else {
- tst_resm(TPASS, "save text bit cleared");
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
-
- if (TEST_RETURN >= 0) {
- close(TEST_RETURN);
- }
-
- /* clean up things in case we are looping */
- if (unlink(pfilname) == -1) {
- tst_brkm(TBROK, cleanup, "couldn't remove file");
- }
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test
- */
-void
-setup(void)
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* make a temp dir and cd to it */
- tst_tmpdir();
-
- sprintf(pfilname, "./creat4.%d", getpid());
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at completion or
- * premature exit
- */
-void
-cleanup(void)
-{
- TEST_CLEANUP;
-
- /* remove the tmp dir and all its files */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/creat09.c b/winsup/testsuite/winsup.api/ltp/creat09.c
deleted file mode 100644
index c3c88a7..0000000
--- a/winsup/testsuite/winsup.api/ltp/creat09.c
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : creat09
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for creat(2) using 0700 argument.
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) creat(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the creat(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * creat(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="creat09"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char fname[255];
-int fd;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
-
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- *******************************************
- * Call creat(2) with 0700 argument on fname
- *******************************************
- */
- TEST(creat(fname, 0700));
-
- /* check return code */
-
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "creat(%s, 0700) Failed, errno=%d : %s", fname,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "creat(%s, 0700) returned %d", fname, TEST_RETURN);
- }
- }
-
- /* close and remove file, possibly for next loop */
- if (close(TEST_RETURN) == -1) {
- tst_brkm(TBROK, cleanup,
- "close(%s) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- } else if (unlink(fname) == -1) {
- tst_resm(TWARN, "unlink(%s) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(fname,"tfile_%d",getpid());
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/dup01.c b/winsup/testsuite/winsup.api/ltp/dup01.c
deleted file mode 100644
index 521df6a..0000000
--- a/winsup/testsuite/winsup.api/ltp/dup01.c
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : dup01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for dup(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) dup(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the dup(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * dup(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-const char *TCID="dup01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char Fname[255];
-int Fd;
-
-/***********************************************************************
- * Main
- ***********************************************************************/
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call dup(2)
- */
- TEST( dup(Fd) );
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "dup(%s) Failed, errno=%d : %s", Fname,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "dup(%s) returned %d", Fname, TEST_RETURN);
- }
-
- /* close the new file so loops do not open too many files */
- if (close(TEST_RETURN) == -1) {
- tst_brkm(TBROK, cleanup, "close(%s) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /*
- * Initialize Fd in case we get a quick signal
- */
- Fd=-1;
-
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(Fname, "dupfile");
- if ((Fd = open(Fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- }
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* close the open file we've been dup'ing */
- if (Fd != -1) {
- if (close(Fd) == -1) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- }
- Fd=-1;
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/dup02.c b/winsup/testsuite/winsup.api/ltp/dup02.c
deleted file mode 100644
index ee759b8..0000000
--- a/winsup/testsuite/winsup.api/ltp/dup02.c
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : dup02
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Negative test for dup(2) with bad fd.
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 2
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Richard Logan
- *
- * CO-PILOT : William Roske
- *
- * DATE STARTED : 06/94
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1-?.) dup(2) returns -1 with errno set to EBADF...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- * Standard tst_res formatted output
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Loop through the test cases
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * if doing functional check
- * check if errno set correctly, report results
- * Otherwise, Issue a FAIL message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-const char *TCID="dup02"; /* Test program identifier. */
-int TST_TOTAL=2; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-int Fds[] = { -1, 1500 };
-
-
-/***********************************************************************
- * Main
- ***********************************************************************/
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- int nfds = sizeof(Fds) / sizeof(int);
- int ind;
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- for (ind=0; ind<nfds; ind++) {
-
- /*
- * Call dup(2)
- */
- TEST( dup(Fds[ind]) );
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- if ( STD_FUNCTIONAL_TEST ) {
- if ( TEST_ERRNO == EBADF ) {
- tst_resm(TPASS, "dup(%d) Failed, errno=%d : %s", Fds[ind],
- TEST_ERRNO, strerror(TEST_ERRNO));
- }
- else {
- tst_resm(TFAIL,
- "dup(%d) Failed, errno=%d %s, expected %d (EBADF)",
- Fds[ind], TEST_ERRNO, strerror(TEST_ERRNO), EBADF);
- }
- }
- } else {
- tst_resm(TFAIL, "dup(%d) returned %d, expected -1, errno:%d (EBADF)",
- Fds[ind], TEST_RETURN, EBADF);
-
- /* close the new file so loops do not open too many files */
- if (close(TEST_RETURN) == -1) {
- tst_brkm(TBROK, cleanup, "close(%d) Failed, errno=%d : %s",
- TEST_RETURN, errno, strerror(errno));
- }
- }
- }
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/dup03.c b/winsup/testsuite/winsup.api/ltp/dup03.c
deleted file mode 100644
index dc2efbb..0000000
--- a/winsup/testsuite/winsup.api/ltp/dup03.c
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : dup03
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Negative test for dup(2) (too many fds)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Richard Logan
- *
- * CO-PILOT : William Roske
- *
- * DATE STARTED : 06/94
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) dup(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-const char *TCID="dup03"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-
-char Fname[255];
-int *Fd = NULL;
-int Nfds=0;
-
-/***********************************************************************
- * Main
- ***********************************************************************/
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call dup(2)
- */
- TEST( dup(Fd[0]) );
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- if ( STD_FUNCTIONAL_TEST ) {
- if ( TEST_ERRNO == EMFILE ) {
- tst_resm(TPASS, "dup(%d) Failed, errno=%d : %s", Fd[0],
- TEST_ERRNO, strerror(TEST_ERRNO));
- }
- else {
- tst_resm(TFAIL, "dup(%d) Failed, errno=%d %s, expected %d (EMFILE)",
- Fd[0], TEST_ERRNO, strerror(TEST_ERRNO), EMFILE);
- }
- }
- } else {
- tst_resm(TFAIL, "dup(%d) returned %d, expected -1, errno:%d (EMFILE)",
- Fd[0], TEST_RETURN, EMFILE);
-
- /* close the new file so loops do not open too many files */
- if (close(TEST_RETURN) == -1) {
- tst_brkm(TBROK, cleanup, "close(%s) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- long maxfds;
-
- /*
- * Initialize Fd in case we get a quick signal
- */
- maxfds = sysconf(_SC_OPEN_MAX);
- if (maxfds < 1) {
- tst_brkm(TBROK, cleanup,
- "sysconf(_SC_OPEN_MAX) Failed, errno=%d : %s",
- errno, strerror(errno));
- }
-
- Fd = (int *)malloc(maxfds*sizeof(int));
- Fd[0]=-1;
-
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /*
- * open the file as many times as it takes to use up all fds
- */
- sprintf(Fname, "dupfile");
- for (Nfds=1; Nfds<=maxfds; Nfds++) {
- if ((Fd[Nfds-1] = open(Fname,O_RDWR|O_CREAT,0700)) == -1) {
-
- Nfds--; /* on a open failure, decrement the counter */
- if ( errno == EMFILE ) {
- break;
- }
- else { /* open failed for some other reason */
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- }
- }
- }
-
- /*
- * make sure at least one was open and that all fds were opened.
- */
- if ( Nfds == 0 ) {
- tst_brkm(TBROK, cleanup, "Unable to open at least one file");
- }
- if ( Nfds > maxfds ) {
- tst_brkm(TBROK, cleanup,
- "Unable to open enough files to use all file descriptors, tried %d",
- maxfds);
- }
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* close the open file we've been dup'ing */
- if (Fd) {
- while (Nfds-- >0) {
- if (close(Fd[Nfds]) == -1) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- }
- Fd[Nfds]=-1;
- }
- free(Fd);
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/dup04.c b/winsup/testsuite/winsup.api/ltp/dup04.c
deleted file mode 100644
index 1c4eaf1..0000000
--- a/winsup/testsuite/winsup.api/ltp/dup04.c
+++ /dev/null
@@ -1,297 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : dup04
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for dup(2) of a system pipe descriptor
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 2
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Richard Logan
- *
- * CO-PILOT : William Roske
- *
- * DATE STARTED : 06/94
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) dup(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the dup(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * dup(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-const char *TCID="dup04"; /* Test program identifier. */
-int TST_TOTAL=2; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-int Fd[2];
-
-/***********************************************************************
- * Main
- ***********************************************************************/
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call dup(2) for read side
- */
- TEST( dup(Fd[0]) );
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "dup(%d) read side of syspipe Failed, errno=%d : %s", Fd[0],
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "dup(%d) read side of syspipe returned %d", Fd[0],
- TEST_RETURN);
-
- }
- else
- Tst_count++;
-
- /* close the new file so loops do not open too many files */
- if (close(TEST_RETURN) == -1) {
- tst_brkm(TBROK, cleanup, "close(%d) Failed, errno=%d : %s",
- TEST_RETURN, errno, strerror(errno));
- }
- }
-
- /*
- * Call dup(2) for write side
- */
- TEST( dup(Fd[1]) );
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "dup(%d) write side of syspipe Failed, errno=%d : %s", Fd[1],
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "dup(%d) write side of syspipe returned %d", Fd[1],
- TEST_RETURN);
-
- }
- else
- Tst_count++;
-
- /* close the new file so loops do not open too many files */
- if (close(TEST_RETURN) == -1) {
- tst_brkm(TBROK, cleanup, "close(%d) Failed, errno=%d : %s",
- TEST_RETURN, errno, strerror(errno));
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /*
- * Initialize Fd in case we get a quick signal
- */
- Fd[0]=-1;
-
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- if ( pipe(Fd) == -1 ) {
- tst_brkm(TBROK, cleanup, "pipe(&Fd) Failed, errno=%d : %s",
- errno, strerror(errno));
- }
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- int ind;
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* close the open file we've been dup'ing */
- if (Fd[0] != -1) {
- for (ind=0; ind<2; ind++) {
- if (close(Fd[ind]) == -1) {
- tst_resm(TWARN, "close(%d) Failed, errno=%d : %s",
- Fd[ind], errno, strerror(errno));
- }
- Fd[ind]=-1;
- }
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/dup05.c b/winsup/testsuite/winsup.api/ltp/dup05.c
deleted file mode 100644
index 0976883..0000000
--- a/winsup/testsuite/winsup.api/ltp/dup05.c
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : dup05
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for dup(2) of a named pipe descriptor
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Richard Logan
- *
- * CO-PILOT : William Roske
- *
- * DATE STARTED : 06/94
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) dup(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the dup(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * dup(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-const char *TCID="dup05"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char Fname[255];
-int Fd;
-
-/***********************************************************************
- * Main
- ***********************************************************************/
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call dup(2)
- */
- TEST( dup(Fd) );
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "dup(%s) Failed, errno=%d : %s", Fname,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "dup(%s) returned %d", Fname, TEST_RETURN);
- }
-
- /* close the new file so loops do not open too many files */
- if (close(TEST_RETURN) == -1) {
- tst_brkm(TBROK, cleanup, "close(%s) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /*
- * Initialize Fd in case we get a quick signal
- */
- Fd=-1;
-
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(Fname, "dupfile");
- if ( mkfifo(Fname, 0777) == -1 ) {
- tst_brkm(TBROK, cleanup,
- "mkfifo(%s, 0700) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- }
- if ((Fd = open(Fname, O_RDWR, 0700)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR, 0700) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- }
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* close the open file we've been dup'ing */
- if (Fd != -1) {
- if (close(Fd) == -1) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- }
- Fd=-1;
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/execl01.c b/winsup/testsuite/winsup.api/ltp/execl01.c
deleted file mode 100644
index f91b0a8..0000000
--- a/winsup/testsuite/winsup.api/ltp/execl01.c
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : execl01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for execl(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 06/01/02
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) execl(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the execl(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * execl(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-
-#include <sys/types.h>
-#include <sys/wait.h>
-
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="execl01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-extern int Tst_nobuf; /* used to turn off buffering in tst_ routines */
-
-int exp_enos[]={0, 0}; /* Zero terminated list of expected errnos */
-
-int pid; /* process id from fork */
-int status; /* status returned from waitpid */
-
-
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- Tst_nobuf=1; /* turn off buffering in tst_ routines */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
-
- /*
- * TEST CASE:
- * fork, then call execl from child
- */
- switch(pid=fork()) {
- case 0: /* CHILD - Call execl(2) */
- execl("test", "test", NULL);
- /* should not get here!! if we do, the parent will fail the Test Case */
- exit(errno);
- case -1: /* ERROR!!! exit now!!*/
- tst_brkm(TBROK, cleanup,
- "Unable to fork a child process to exec over! Errno:%d,:%s",
- errno, strerror(errno));
- break;
- default:
- waitpid(pid, &status, 0);
- if ( WIFEXITED(status) ) {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "execl - properly exec's a simple program..");
- }
- } else {
- TEST_ERROR_LOG(WEXITSTATUS(status));
- tst_resm(TFAIL, "Child process did not terminate properly, status=%d", status);
- }
- break;
- } /* switch */
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* make a temp dir and cd to it */
- tst_tmpdir();
-
- /*
- * Send out info message that timing and errnolog info is not
- * available because of the use of a child process for each exec
- */
- if ( STD_TIMING_ON )
- tst_resm(TINFO, "There are NO timing statistics produced by this test.\n\
-This is because the test forks to create a child process which then calls execl.\n\
-The TEST macro is NOT used.");
-
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* remove files and temp dir */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/execle01.c b/winsup/testsuite/winsup.api/ltp/execle01.c
deleted file mode 100644
index ca2cdec..0000000
--- a/winsup/testsuite/winsup.api/ltp/execle01.c
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : execle01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for execle(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 06/01/02
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) execle(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the execle(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * execle(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-
-#include <sys/types.h>
-#include <sys/wait.h>
-
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="execle01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-extern int Tst_nobuf; /* used to turn off buffering in tst_ routines */
-
-int exp_enos[]={0, 0}; /* Zero terminated list of expected errnos */
-
-int pid; /* process id from fork */
-int status; /* status returned from waitpid */
-extern char **environ; /* pointer to this processes env, to pass along */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- Tst_nobuf=1; /* turn off buffering in tst_ routines */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
-
- /*
- * TEST CASE:
- * fork, then call execle from child
- */
- switch(pid=fork()) {
- case 0: /* CHILD - Call execle(2) */
- execle("test", "test", NULL, environ);
- /* should not get here!! if we do, the parent will fail the Test Case */
- exit(errno);
- case -1: /* ERROR!!! exit now!!*/
- tst_brkm(TBROK, cleanup,
- "Unable to fork a child process to exec over! Errno:%d,:%s",
- errno, strerror(errno));
- break;
- default:
- waitpid(pid, &status, 0);
- if ( WIFEXITED(status) ) {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "execle - properly exec's a simple program..");
- }
- } else {
- TEST_ERROR_LOG(WEXITSTATUS(status));
- tst_resm(TFAIL, "Child process did not terminate properly, status=%d", status);
- }
- break;
- } /* switch */
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* make a temp dir and cd to it */
- tst_tmpdir();
-
- /*
- * Send out info message that timing and errnolog info is not
- * available because of the use of a child process for each exec
- */
- if ( STD_TIMING_ON )
- tst_resm(TINFO, "There are NO timing statistics produced by this test.\n\
-This is because the test forks to create a child process which then calls execle.\n\
-The TEST macro is NOT used.");
-
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* remove files and temp dir */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/execlp01.c b/winsup/testsuite/winsup.api/ltp/execlp01.c
deleted file mode 100644
index c3f8b21..0000000
--- a/winsup/testsuite/winsup.api/ltp/execlp01.c
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : execlp01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for execlp(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 06/01/02
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) execlp(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the execlp(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * execlp(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-
-#include <sys/types.h>
-#include <sys/wait.h>
-
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="execlp01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-extern int Tst_nobuf; /* used to turn off buffering in tst_ routines */
-
-int exp_enos[]={0, 0}; /* Zero terminated list of expected errnos */
-
-int pid; /* process id from fork */
-int status; /* status returned from waitpid */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- Tst_nobuf=1; /* turn off buffering in tst_ routines */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
-
- /*
- * TEST CASE:
- * fork, then call execlp from child
- */
- switch(pid=fork()) {
- case 0: /* CHILD - Call execlp(2) */
- execlp("/usr/bin/test", "/usr/bin/test", NULL);
- /* should not get here!! if we do, the parent will fail the Test Case */
- exit(errno);
- case -1: /* ERROR!!! exit now!!*/
- tst_brkm(TBROK, cleanup,
- "Unable to fork a child process to exec over! Errno:%d,:%s",
- errno, strerror(errno));
- break;
- default:
- waitpid(pid, &status, 0);
- if ( WIFEXITED(status) ) {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "execlp - properly exec's a simple program..");
- }
- } else {
- TEST_ERROR_LOG(WEXITSTATUS(status));
- tst_resm(TFAIL, "Child process did not terminate properly, status=%d", status);
- }
- break;
- } /* switch */
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* make a temp dir and cd to it */
- tst_tmpdir();
-
- /*
- * Send out info message that timing and errnolog info is not
- * available because of the use of a child process for each exec
- */
- if ( STD_TIMING_ON )
- tst_resm(TINFO, "There are NO timing statistics produced by this test.\n\
-This is because the test forks to create a child process which then calls execlp.\n\
-The TEST macro is NOT used.");
-
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* remove files and temp dir */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/execv01.c b/winsup/testsuite/winsup.api/ltp/execv01.c
deleted file mode 100644
index f59f297..0000000
--- a/winsup/testsuite/winsup.api/ltp/execv01.c
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : execv01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for execv(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 06/01/02
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) execv(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the execv(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * execv(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <signal.h>
-
-#include <sys/types.h>
-#include <sys/wait.h>
-
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-void cleanup();
-
-const char *TCID="execv01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-extern int Tst_nobuf; /* used to turn off buffering in tst_ routines */
-
-int exp_enos[]={0, 0}; /* Zero terminated list of expected errnos */
-
-int pid; /* process id from fork */
-int status; /* status returned from waitpid */
-const char * const args[2]={"/usr/bin/test", 0}; /* argument list for execv call */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- Tst_nobuf=1; /* turn off buffering in tst_ routines */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
-
- /*
- * TEST CASE:
- * fork, then call execv from child
- */
- switch(pid=fork()) {
- case 0: /* CHILD - Call execv(2) */
- execv("/usr/bin/test", args);
- /* should not get here!! if we do, the parent will fail the Test Case */
- exit(errno);
- case -1: /* ERROR!!! exit now!!*/
- tst_brkm(TBROK, cleanup,
- "Unable to fork a child process to exec over! Errno:%d,:%s",
- errno, strerror(errno));
- break;
- default:
- waitpid(pid, &status, 0);
- if ( WIFEXITED(status) ) {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "execv - properly exec's a simple program..");
- }
- } else {
- TEST_ERROR_LOG(WEXITSTATUS(status));
- tst_resm(TFAIL, "Child process did not terminate properly, status=%d", status);
- }
- break;
- } /* switch */
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* make a temp dir and cd to it */
- tst_tmpdir();
-
- /*
- * Send out info message that timing and errnolog info is not
- * available because of the use of a child process for each exec
- */
- if ( STD_TIMING_ON )
- tst_resm(TINFO, "There are NO timing statistics produced by this test.\n\
-This is because the test forks to create a child process which then calls execv.\n\
-The TEST macro is NOT used.");
-
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* remove files and temp dir */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/execve01.c b/winsup/testsuite/winsup.api/ltp/execve01.c
deleted file mode 100644
index 2584bdf..0000000
--- a/winsup/testsuite/winsup.api/ltp/execve01.c
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : execve01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for execve(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 06/01/02
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) execve(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the execve(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * execve(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-
-#include <sys/types.h>
-#include <sys/wait.h>
-
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="execve01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-extern int Tst_nobuf; /* used to turn off buffering in tst_ routines */
-
-int exp_enos[]={0, 0}; /* Zero terminated list of expected errnos */
-
-int pid; /* process id from fork */
-int status; /* status returned from waitpid */
-const char *const args[2]={"/usr/bin/test", 0}; /* argument list for execve call */
-extern char **environ; /* pointer to this processes env, to pass along */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- Tst_nobuf=1; /* turn off buffering in tst_ routines */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
-
- /*
- * TEST CASE:
- * fork, then call execve from child
- */
- switch(pid=fork()) {
- case 0: /* CHILD - Call execve(2) */
- execve("/usr/bin/test", args, environ);
- /* should not get here!! if we do, the parent will fail the Test Case */
- exit(errno);
- case -1: /* ERROR!!! exit now!!*/
- tst_brkm(TBROK, cleanup,
- "Unable to fork a child process to exec over! Errno:%d,:%s",
- errno, strerror(errno));
- break;
- default:
- waitpid(pid, &status, 0);
- if ( WIFEXITED(status) ) {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "execve - properly exec's a simple program..");
- }
- } else {
- TEST_ERROR_LOG(WEXITSTATUS(status));
- tst_resm(TFAIL, "Child process did not terminate properly, status=%d", status);
- }
- break;
- } /* switch */
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* make a temp dir and cd to it */
- tst_tmpdir();
-
- /*
- * Send out info message that timing and errnolog info is not
- * available because of the use of a child process for each exec
- */
- if ( STD_TIMING_ON )
- tst_resm(TINFO, "There are NO timing statistics produced by this test.\n\
-This is because the test forks to create a child process which then calls execve.\n\
-The TEST macro is NOT used.");
-
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* remove files and temp dir */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/execvp01.c b/winsup/testsuite/winsup.api/ltp/execvp01.c
deleted file mode 100644
index 8a1726a..0000000
--- a/winsup/testsuite/winsup.api/ltp/execvp01.c
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : execvp01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for execvp(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 06/01/02
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) execvp(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the execvp(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * execvp(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-
-#include <sys/types.h>
-#include <sys/wait.h>
-
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="execvp01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-extern int Tst_nobuf; /* used to turn off buffering in tst_ routines */
-
-int exp_enos[]={0, 0}; /* Zero terminated list of expected errnos */
-
-int pid; /* process id from fork */
-int status; /* status returned from waitpid */
-const char *const args[2]={"/usr/bin/test", 0}; /* argument list for execvp call */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- Tst_nobuf=1; /* turn off buffering in tst_ routines */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
-
- /*
- * TEST CASE:
- * fork, then call execvp from child
- */
- switch(pid=fork()) {
- case 0: /* CHILD - Call execvp(2) */
- execvp("/usr/bin/test", args);
- /* should not get here!! if we do, the parent will fail the Test Case */
- exit(errno);
- case -1: /* ERROR!!! exit now!!*/
- tst_brkm(TBROK, cleanup,
- "Unable to fork a child process to exec over! Errno:%d,:%s",
- errno, strerror(errno));
- break;
- default:
- waitpid(pid, &status, 0);
- if ( WIFEXITED(status) ) {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "execvp - properly exec's a simple program..");
- }
- } else {
- TEST_ERROR_LOG(WEXITSTATUS(status));
- tst_resm(TFAIL, "Child process did not terminate properly, status=%d", status);
- }
- break;
- } /* switch */
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* make a temp dir and cd to it */
- tst_tmpdir();
-
- /*
- * Send out info message that timing and errnolog info is not
- * available because of the use of a child process for each exec
- */
- if ( STD_TIMING_ON )
- tst_resm(TINFO, "There are NO timing statistics produced by this test.\n\
-This is because the test forks to create a child process which then calls execvp.\n\
-The TEST macro is NOT used.");
-
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* remove files and temp dir */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/exit01.c b/winsup/testsuite/winsup.api/ltp/exit01.c
deleted file mode 100644
index 74e6c09..0000000
--- a/winsup/testsuite/winsup.api/ltp/exit01.c
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * exit01.c
- *
- * DESCRIPTION
- * Check that exit returns the correct values to the waiting parent
- *
- * ALGORITHM
- * Fork a process that immediately calls exit() with a known
- * value. Check for that value in the parent.
- *
- * USAGE
- * exit01
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None
- */
-
-#include <signal.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include "test.h"
-#include "usctest.h"
-
-void cleanup(void) __attribute__((noreturn));
-void setup(void);
-
-const char *TCID = "exit01";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-int
-main(int ac, char **av)
-{
- int pid, npid, sig, nsig, exno, nexno, status;
- int rval = 0;
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* parse standard options */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSIkNG ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- setup(); /* global setup for test */
-
- /* check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count = 0;
-
- sig = 0;
- exno = 1;
-
- if ((pid = fork()) == -1) {
- tst_brkm(TBROK, cleanup, "fork failed, errno=%d",
- errno, strerror(errno));
- }
-
- if (pid == 0) { /* parent */
- exit(exno);
- } else {
- sleep(1); /* let child start */
- npid = wait(&status);
-
- if (npid != pid) {
- tst_resm(TFAIL, "wait error: "
- "unexpected pid returned");
- rval = 1;
- }
-
- nsig = status % 256;
-
- /*
- * Check if the core dump bit has been set, bit # 7
- */
- if (nsig >= 128) {
- nsig = nsig - 128;
- }
-
- /*
- * nsig is the signal number returned by wait
- */
- if (nsig != sig) {
- tst_resm(TFAIL, "wait error: "
- "unexpected signal returned");
- rval = 1;
- }
-
- /*
- * nexno is the exit number returned by wait
- */
- nexno = status / 256;
- if (nexno != exno) {
- tst_resm(TFAIL, "wait error: "
- "unexpected exit number returned");
- rval = 1;
- }
- }
-
- if (rval != 1) {
- tst_resm(TPASS, "exit() test PASSED");
- }
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- umask(0);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at completion or
- * premature exit.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/exit02.c b/winsup/testsuite/winsup.api/ltp/exit02.c
deleted file mode 100644
index 1503106..0000000
--- a/winsup/testsuite/winsup.api/ltp/exit02.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * exit02.c
- *
- * DESCRIPTION
- * Check that exit flushes output file buffers and closes files upon
- * exitting
- *
- * ALGORITHM
- * Fork a process that creates a file and writes a few bytes, and
- * calls exit WITHOUT calling close(). The parent then reads the
- * file. If everything that was written is present in the file, then
- * the test passes.
- *
- * USAGE
- * exit02
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None
- */
-
-#include <errno.h>
-#include <signal.h>
-#include <fcntl.h>
-#include <sys/wait.h>
-#include "test.h"
-#include "usctest.h"
-
-void cleanup(void) __attribute__((noreturn));
-void setup(void);
-
-const char *TCID = "exit02";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-#define READ 0
-#define WRITE 1
-#define MODE 0666
-
-char filen[40];
-
-int
-main(int ac, char **av)
-{
- int pid, npid, sig, nsig, exno, nexno, status;
- int filed;
- char wbuf[BUFSIZ], rbuf[BUFSIZ];
- int len, rlen;
- int rval = 0;
- char *strcpy();
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /*
- * parse standard options
- */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- setup(); /* global setup for test */
-
- /*
- * The following loop checks looping state if -i option given
- */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /*
- * reset Tst_count in case we are looping.
- */
- Tst_count = 0;
-
- strcpy(wbuf, "abcd");
- len = strlen(wbuf);
-
- exno = sig = 0;
-
- if ((pid = fork()) == -1) {
- tst_brkm(TBROK, cleanup, "fork failed, error no = %d",
- errno, strerror(errno));
- }
-
- if (pid == 0) { /* child */
- sleep(1);
- if ((filed = creat(filen, MODE)) == -1) {
- tst_resm(TINFO, "creat error: unable to"
- "open output file");
- exit(2);
- }
- if (write(filed, wbuf, len) != len) {
- tst_resm(TINFO, "write error");
- exit(2);
- }
- close(filed);
- exit(exno);
- } else { /* parent */
- npid = wait(&status);
-
- if (npid != pid) {
- tst_resm(TFAIL, "wait error: "
- "unexpected pid returned");
- rval = 1;
- }
-
- nsig = status % 256;
-
- /*
- * to check if the core dump bit has been
- * set, bit # 7
- */
- if (nsig >= 128)
- nsig = nsig - 128;
-
- /*
- * nsig is the signal number returned by
- * wait
- */
- if (nsig != sig) {
- tst_resm(TFAIL, "wait error: unexpected "
- "signal returned %d", nsig);
- rval = 1;
- }
-
- /*
- * nexno is the exit number returned by wait
- */
- nexno = status / 256;
- if (nexno != exno) {
- tst_resm(TFAIL, "wait error: unexpected exit "
- "number %d", nexno);
- rval = 1;
- }
-
- sleep(2); /* let child's exit close opened file */
-
- filed = open(filen, O_RDONLY, READ);
- if (filed == -1) {
- tst_resm(TFAIL, "open error: "
- "unable to open input file");
- rval = 1;
- } else {
- rlen = read(filed, rbuf, len);
- if (len != rlen) {
- tst_resm(TFAIL, "exit error: file "
- "buffer was not flushed");
- rval = 1;
- } else if (memcmp(rbuf, wbuf, rlen) != 0) {
- tst_resm(TFAIL, "exit error: file "
- "buffer was not flushed");
- rval = 1;
- }
- }
- close(filed);
- unlink(filen);
- }
- if (!rval) {
- tst_resm(TPASS, "exit() test PASSED");
- }
- }
- cleanup();
- /*NOTREACHED*/
-}
-
-/*
- * setup() - perform all ONE TIME setup for this test
- */
-void
-setup(void)
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- umask(0);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- sprintf(filen, "tfile_%d",getpid());
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at completion or
- * premature exit.
- */
-void
-cleanup(void)
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified
- */
- TEST_CLEANUP;
-
- /*
- * Remove tmp dir and all files in it
- */
- tst_rmdir();
-
- /*
- * exit with return code appropriate for results
- */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/fchdir01.c b/winsup/testsuite/winsup.api/ltp/fchdir01.c
deleted file mode 100644
index bd70c01..0000000
--- a/winsup/testsuite/winsup.api/ltp/fchdir01.c
+++ /dev/null
@@ -1,249 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * fchdir01.c
- *
- * DESCRIPTION
- * fchdir01 - create a directory and cd into it.
- *
- * ALGORITHM
- * create a new directory
- * open the directory and get a file descriptor
- * loop if that option was specified
- * fchdir() into the directory
- * check the return code
- * if failure, issue a FAIL message.
- * otherwise,
- * if doing functionality testing, call check_functionality()
- * if correct,
- * issue a PASS message
- * otherwise
- * issue a FAIL message
- * call cleanup
- *
- * USAGE: <for command-line>
- * fchdir01 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 03/2001 - Written by Wayne Boyer
- *
- * RESTRICTIONS
- * none
- */
-
-#include "test.h"
-#include "usctest.h"
-
-#include <errno.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <string.h>
-
-void cleanup(void) __attribute__((noreturn));
-void setup(void);
-
-const char *TCID = "fchdir01";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-int fd = -1;
-char temp_dir_buf [PATH_MAX];
-char* temp_dir;
-const char *TEST_DIR = "alpha";
-
-#define MODES S_IRWXU
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- void check_functionality(void);
- int r_val;
-
- /* parse standard options */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- }
-
- setup(); /* global setup */
-
- /* The following loop checks looping state if -i option given */
-
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
- /* get the name of the test dirctory */
- if ((temp_dir = (getcwd(temp_dir_buf, sizeof (temp_dir_buf)))) == NULL) {
- tst_brkm(TBROK, cleanup, "%s - getcwd() in main() "
- "failed", TCID);
- }
-
- /*
- * create a new directory and open it
- */
-
- if ((r_val = mkdir(TEST_DIR, MODES)) == -1){
- tst_brkm(TBROK, cleanup, "%s - mkdir() in main() "
- "failed", TCID);
- }
-
- if ((fd = open(TEST_DIR, O_RDONLY)) == -1) {
- tst_brkm(TBROK, cleanup, "open of directory failed");
- }
-
- /*
- * Use TEST macro to make the call
- */
-
- TEST(fchdir(fd));
-
- if (TEST_RETURN == -1) {
- tst_brkm(TFAIL, cleanup, "%s call failed - errno = %d :"
- " %s", TCID, TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- if (STD_FUNCTIONAL_TEST) {
- check_functionality();
- } else {
- tst_resm(TPASS, "call succeeded");
- }
- }
-
- /*
- * clean up things in case we are looping
- */
-
- /*
- * NOTE: in case of failure here, we need to use "tst_resm()"
- * and not "tst_brkm()". This is because if we get to this
- * point, we have already set a PASS or FAIL for the test
- * and "tst_brkm()" won't report as we might expect.
- */
-
- /* chdir back to our temporary work directory */
- if ((r_val = chdir("..")) == -1){
- tst_resm(TBROK, "fchdir failed - errno = %d : %s",
- errno, strerror(errno));
- }
-
- if ((r_val = rmdir(TEST_DIR)) == -1){
- tst_resm(TBROK, "rmdir failed - errno = %d : %s",
- errno, strerror(errno));
- }
-
- /*
- * clean up things in case we are looping
- */
- /* free(temp_dir); */
- temp_dir = NULL;
- }
-
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * check_functionality() - check that we are in the correct directory.
- */
-void
-check_functionality(void)
-{
- char buf [PATH_MAX];
- char *cwd;
- char **bufptr = &cwd;
- char *dir;
-
- /*
- * Get the current directory path.
- */
- if ((cwd = (getcwd(buf, sizeof (buf)))) == NULL) {
- tst_brkm(TBROK, cleanup, "%s - getcwd() in "
- "check_functionality() failed", TCID);
- }
-
- /*
- * strip off all but the last directory name in the
- * current working directory.
- */
- do {
- if ((dir = strsep(bufptr, "/")) == NULL) {
- tst_brkm(TBROK, cleanup, "%s - strsep() in "
- "check_functionality() failed", TCID);
- }
- } while(*bufptr != NULL);
-
- /*
- * Make sure we are in the right place.
- */
- if (strcmp(TEST_DIR, dir) == 0) {
- tst_resm(TPASS, "%s call succeeded", TCID);
- } else {
- tst_resm(TFAIL, "%s functionality test failed", TCID);
- }
-}
-
-/*
- * setup() - performs all the ONE TIME setup for this test.
- */
-void
-setup(void)
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* create a test directory and cd into it */
- tst_tmpdir();
-}
-
-/*
- * cleanup() - performs all the ONE TIME cleanup for this test at completion
- * or premature exit.
- */
-void
-cleanup(void)
-{
- if (fd >= 0)
- close (fd);
-
- /* remove the test directory */
- tst_rmdir();
-
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
-
diff --git a/winsup/testsuite/winsup.api/ltp/fchdir02.c b/winsup/testsuite/winsup.api/ltp/fchdir02.c
deleted file mode 100644
index 4e1d9e7..0000000
--- a/winsup/testsuite/winsup.api/ltp/fchdir02.c
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * fchdir02.c
- *
- * DESCRIPTION
- * fchdir02 - try to cd into a bad directory (bad fd).
- *
- * CALLS
- * fchdir()
- *
- * ALGORITHM
- * loop if that option was specified
- * call fchdir() with an invalid file descriptor
- * check the errno value
- * issue a PASS message if we get EBADF - errno 9
- * otherwise, the tests fails
- * issue a FAIL message
- * break any remaining tests
- * call cleanup
- *
- * USAGE: <for command-line>
- * fchdir02 [-c n] [-e] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 03/2001 - Written by Wayne Boyer
- *
- * RESTRICTIONS
- * none
- */
-
-#include "test.h"
-#include "usctest.h"
-
-#include <errno.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-void cleanup(void) __attribute__((noreturn));
-void setup(void);
-
-const char *TCID = "fchdir02";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-int exp_enos[] = {9, 0}; /* 0 terminated list of expected errnos */
-
-int
-main(int ac, char **av)
-{
- const int bad_fd = -5;
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* parse standard options */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- }
-
- setup(); /* global setup */
-
- /* The following loop checks looping state if -i option given */
-
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
- /*
- * Look for a failure by using an invalid number for fd
- */
-
- TEST(fchdir(bad_fd));
-
- if (TEST_RETURN != -1) {
- tst_brkm(TFAIL, cleanup, "call succeeded with bad "
- "file descriptor");
- }
-
- TEST_ERROR_LOG(TEST_ERRNO);
-
- switch(TEST_ERRNO) {
- case EBADF:
- tst_resm(TPASS, "expected failure - errno = %d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- break;
- default:
- tst_brkm(TFAIL, cleanup, "call failed with an "
- "unexpected error - %d : %s", TEST_ERRNO,
- strerror(TEST_ERRNO));
- }
- }
-
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all the ONE TIME setup for this test.
- */
-void
-setup(void)
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* create a test directory and cd into it */
- tst_tmpdir();
-
- /* Set up the expected error numbers for -e option */
- TEST_EXP_ENOS(exp_enos);
-}
-
-/*
- * cleanup() - performs all the ONE TIME cleanup for this test at completion
- * or premature exit.
- */
-void
-cleanup(void)
-{
- /* remove the test directory */
- tst_rmdir();
-
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
-
diff --git a/winsup/testsuite/winsup.api/ltp/fchmod01.c b/winsup/testsuite/winsup.api/ltp/fchmod01.c
deleted file mode 100644
index e2db716..0000000
--- a/winsup/testsuite/winsup.api/ltp/fchmod01.c
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : fchmod01
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) fchmod(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the fchmod(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * fchmod(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="fchmod01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char fname[255];
-int fd;
-const char *buf = "davef";
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call fchmod(2)
- */
- TEST(fchmod(fd, 0700));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "fchmod(%s, 0700) Failed, errno=%d : %s", fname,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "fchmod(%s, 0700) returned %d", fname, TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(fname,"tfile_%d",getpid());
- if ((fd = open(fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_brkm(TBROK, cleanup, "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s", fname, errno, strerror(errno));
- } else if (write(fd, &buf, strlen(buf)) == -1) {
- tst_brkm(TBROK, cleanup, "write(%s, &buf, strlen(buf)) Failed, errno=%d : %s", fname, errno, strerror(errno));
- }
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* close the open file wev'e been chmoding */
- if (close(fd) == -1) {
- tst_brkm(TBROK, cleanup, "close(%s) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/fchown01.c b/winsup/testsuite/winsup.api/ltp/fchown01.c
deleted file mode 100644
index d692bfc..0000000
--- a/winsup/testsuite/winsup.api/ltp/fchown01.c
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : fchown01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for fchown(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 02/14/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) fchown(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the fchown(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * fchown(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="fchown01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int Fd; /* file descriptor for fchown */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /* Call fchown(2) just once */
- TEST(fchown(Fd, geteuid(), getegid()));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL,
- "fchown(Fd, geteuid(), getegid()) failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* Perform functional verification here */
- tst_resm(TPASS,
- "fchown(Fd, geteuid(), getegid()) returned %d",
- TEST_RETURN);
- }
- }
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- char fname[1024];
-
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* make a tempdir and change to it */
- tst_tmpdir();
-
- /* open a file for read/write */
- sprintf(fname, "./tmpfile.%d", getpid());
- if ( (Fd=open(fname, O_RDWR|O_CREAT, 0700)) == -1 )
- tst_brkm(TBROK, cleanup,
- "Unable to open %s for read/write. Error:%d, %s",
- fname, errno, strerror(errno)); /* this exits */
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- close(Fd);
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* remove temp dir and files */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/fcntl02.c b/winsup/testsuite/winsup.api/ltp/fcntl02.c
deleted file mode 100644
index cbdd085..0000000
--- a/winsup/testsuite/winsup.api/ltp/fcntl02.c
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : fcntl02
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for fcntl(2) using F_DUPFD argument.
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) fcntl(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the fcntl(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * fcntl(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="fcntl02"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char fname[255];
-int fd;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call fcntl(2) with F_DUPFD argument on fname
- */
- TEST(fcntl(fd, F_DUPFD, 0));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "fcntl(%s, F_DUPFD, 0) Failed, errno=%d : %s", fname,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "fcntl(%s, F_DUPFD, 0) returned %d", fname, TEST_RETURN);
- }
- if (close(TEST_RETURN) == -1) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s", fname, errno, strerror(errno));
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(fname,"tfile_%d",getpid());
- if ((fd = open(fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* close the file we've had open */
- if (close(fd) == -1) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s", fname, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/fcntl03.c b/winsup/testsuite/winsup.api/ltp/fcntl03.c
deleted file mode 100644
index 8199469..0000000
--- a/winsup/testsuite/winsup.api/ltp/fcntl03.c
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : fcntl03
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for fcntl(2) using F_GETFD argument.
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) fcntl(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the fcntl(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * fcntl(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="fcntl03"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char fname[255];
-int fd;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call fcntl(2) with F_GETFD argument on fname
- */
- TEST(fcntl(fd, F_GETFD, 0));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "fcntl(%s, F_GETFD, 0) Failed, errno=%d : %s", fname,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "fcntl(%s, F_GETFD, 0) returned %d", fname, TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(fname,"tfile_%d",getpid());
- if ((fd = open(fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- if (close(fd) == -1) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s", fname, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/fcntl04.c b/winsup/testsuite/winsup.api/ltp/fcntl04.c
deleted file mode 100644
index 7af7789..0000000
--- a/winsup/testsuite/winsup.api/ltp/fcntl04.c
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : fcntl04
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for fcntl(2) using F_GETFL argument.
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) fcntl(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the fcntl(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * fcntl(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="fcntl04"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char fname[255];
-int fd;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call fcntl(2) with F_GETFL argument on fname
- */
- TEST(fcntl(fd, F_GETFL, 0));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "fcntl(%s, F_GETFL, 0) Failed, errno=%d : %s", fname,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "fcntl(%s, F_GETFL, 0) returned %d", fname, TEST_RETURN);
- }
- }
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(fname,"tfile_%d",getpid());
- if ((fd = open(fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
- fname, TEST_ERRNO, strerror(TEST_ERRNO));
- }
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- if (close(fd) == -1) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s", fname, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/fcntl05.c b/winsup/testsuite/winsup.api/ltp/fcntl05.c
deleted file mode 100644
index 80cfe8c..0000000
--- a/winsup/testsuite/winsup.api/ltp/fcntl05.c
+++ /dev/null
@@ -1,249 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : fcntl05
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for fcntl(2) using F_GETLK argument.
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) fcntl(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the fcntl(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * fcntl(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="fcntl05"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char fname[255];
-int fd;
-struct flock flocks;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- flocks.l_type = F_RDLCK;
- /*
- * Call fcntl(2) with F_GETLK argument on fname
- */
- TEST(fcntl(fd, F_GETLK, &flocks));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "fcntl(%s, F_GETLK, &flocks) Failed, errno=%d : %s", fname,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "fcntl(%s, F_GETLK, &flocks) returned %d", fname, TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(fname,"tfile_%d",getpid());
- if ((fd = open(fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
-
- /* set needed flags in the flocks structure */
- flocks.l_whence=1;
- flocks.l_start=0;
- flocks.l_len=0;
- flocks.l_pid=getpid();
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Close the file we have open */
- if (close(fd) == -1) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s", fname, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/fcntl07.c b/winsup/testsuite/winsup.api/ltp/fcntl07.c
deleted file mode 100644
index e0082df..0000000
--- a/winsup/testsuite/winsup.api/ltp/fcntl07.c
+++ /dev/null
@@ -1,423 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : fcntl07
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Close-On-Exec functional test
- *
- * PARENT DOCUMENT : none
- *
- * TEST CASE TOTAL : 2
- *
- * WALL CLOCK TIME : 5
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Glen Overby
- *
- * CO-PILOT : William Roske
- *
- * DATE STARTED : 08/11/93
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) test close-on-exec with a regular file
- * 2.) test close-on-exec with a system pipe
- *
- * INPUT SPECIFICATIONS
- *
- * Standard arguments accepted by parse_opts(3).
- *
- * The -t (timing) and -e options apply to the fcntl(.., F_SETFD, ..)
- * system call.
- *
- * -T fd : If this option is given, the program runs as "test_open",
- * testing <fd> to see if it is open or not and exiting
- * accordingly:
- * 0 not open (EBADF from fcntl(..., F_GETFD, ...))
- * 3 no error from fcntl
- * errno fcntl returned an error other than EBADF
- *
- * -F name : File to open. Must be an absolute path
- * and the file must be writable;
- * -n program: path to the 'test_open' program
- *
- * OUTPUT SPECIFICATIONS
- * This test uses the cuts-style test_res format output consisting of:
- *
- * test-name PASS/FAIL/BROK message
- *
- * the message will tell what type of test and, if it failed, indicate
- * what the failure was.
- *
- * DURATION
- * Terminates
- *
- * SIGNALS
- * None
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * If this test is not called with a full pathname, it must be able
- * to find itself on $PATH
- *
- * INTERCASE DEPENDENCIES
- * none
- *
- * DETAILED DESCRIPTION
- *
- * Setup:
- * Setup signal handling.
- * Create and make current a temporary directory.
- * Open a regular file for writing
- * Create a system pipe
- * Create a named pipe and open it for writing
- *
- * Test:
- * Set the file descriptor for close-on-exec
- * Fork
- * Child execlp's the program "test_open".
- * If the exec fails, exit "2"
- * Parent waits
- * Report results.
- *
- * Cleanup:
- * Close file and pipes
- * Remove the temporary directory
- *
- * BUGS
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/wait.h>
-#include <limits.h>
-
-#include "test.h"
-#include "usctest.h"
-#include "search_path.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-void help();
-
-const char *TCID="fcntl07"; /* Test program identifier. */
-int TST_TOTAL=2; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-
-
-/* for parse_opts */
-int fflag, Tflag; /* binary flags: opt or not */
-char *fopt, *Topt; /* option arguments */
-
-option_t options[] = {
- { "F:", &fflag, &fopt }, /* -F filename */
- { "T:", &Tflag, &Topt }, /* -T <fd> exec'ed by test: test FD */
- { NULL, NULL, NULL }
-};
-
-int stat_loc; /* for waitpid() */
-
-int file_fd, pipe_fds[2];
- /* file descriptors for a file and a system pipe */
-#define DEFAULT_FILE "DefaultFileName"
-const char *File1 = DEFAULT_FILE;
-
-#define DEFAULT_SUBPROG "test_open"
-const char *openck = DEFAULT_SUBPROG; /* support program name to check for open FD */
-char subprog_path[_POSIX_PATH_MAX]; /* path to exec "openck" with */
-#define STRSIZE 255
-
-int *testfds[] = {
- &file_fd, &pipe_fds[1], 0
- };
-
-const char *testfdtypes[] = {
- "regular file",
- "write side of system pipe",
- };
-
-int test_open(const char *arg);
-int do_exec(const char *prog, int fd, const char *tcd);
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- int exec_return; /* return from do_exec */
- int **tcp; /* testcase pointer (pointer to FD) */
- const char **tcd; /* testcase description pointer */
-
- /***************************************************************
- * parse standard options, and exit if there is an error
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, options, &help)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- if(fflag) /* -F option */
- File1 = fopt;
-
- if(Tflag) { /* -T option */
- exit(test_open(Topt));
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup(av[0]);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- for(tcp = testfds, tcd = testfdtypes; *tcp; tcp++, tcd++) {
-
- TEST(fcntl(**tcp, F_SETFD, FD_CLOEXEC));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "fcntl(%s[%d], F_SETFD, FD_CLOEXEC) Failed, errno=%d : %s",
- *tcd, **tcp, TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /*************************************************************
- * only perform functional verification if flag set
- * (-f not given)
- *************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
-
- exec_return = do_exec(subprog_path, **tcp, *tcd);
-
- switch(exec_return) {
- case -1:
- tst_resm(TBROK, "fork failed. Errno %s [%d]",
- strerror(errno), errno);
- break;
- case 1:
- tst_resm(TBROK, "waitpid return was 0%o", stat_loc);
- break;
- case 2:
- tst_resm(TBROK, "exec failed"); /* errno was in child */
- break;
- case 0:
- tst_resm(TPASS, "%s child exited 0, indicating that the file was closed",
- *tcd);
- break;
- default:
- tst_resm(TFAIL, "%s child exited non-zero, %d", *tcd,
- exec_return);
- break;
- }
- }
- }
- }
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup(char *path)
-{
- search_path(path, subprog_path, X_OK, 1);
-
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* create a temporary directory and go to it */
- tst_tmpdir();
-
- /* set up a regular file */
- if((file_fd=open(File1, O_CREAT|O_RDWR, 0666)) == -1) {
- tst_brkm(TBROK, cleanup, "Open of file %s failed errno %d (%s)\n", File1, errno, strerror(errno));
- }
-
- /* set up a system pipe (write side gets CLOSE-ON-EXEC) */
- pipe(pipe_fds);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* close everything */
- close(file_fd);
- close(pipe_fds[0]);
- close(pipe_fds[1]);
-
- /* remove temporary directory and all files in it. */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-/***************************************************************************
- * issue a help message
- ***************************************************************************/
-void
-help()
-{
- printf("-T fd : If this option is given, the program runs as 'test_open'\n");
- printf(" testing <fd> to see if it is open or not and exiting accordingly\n");
- printf("-F name : File to open. Must be an absolute path,\n");
- printf(" and the file must be writable\n");
- printf("-n program: path to the 'test_open' program\n");
-}
-
-/*---------------------------------------------------------------------------*/
-/* Perform an exec, then wait for the child to terminate.
- * The child's termination status determines the success of the test
- *
- * Return codes:
- * -1 BROK fork failed
- * 1 BROK waitpid returned != exit status
- * <else> ???? exit code from child:
- * 2 BROK exec failed
- * 0 PASS fd was properly closed
- *
- */
-
-int
-do_exec(const char *prog, int fd, const char *tcd)
-{
- int pid;
- char pidname[STRSIZE];
-#ifdef DEBUG
- int rc, status; /* for the fcntl */
-#endif
-
- /* set up arguments to exec'ed child */
- sprintf(pidname, "%d", fd);
-
-#ifdef DEBUG
- rc = fcntl(fd, F_GETFD, &status);
- printf("%s: fd = %d rc = %d status= %d, errno= %d\n", tcd, fd, rc, status, errno);
-#endif
-
- switch(pid=fork()) {
- case -1:
- return(-1);
- case 0: /* child */
- execlp(prog, openck, "-T", pidname, NULL);
-
- /* the ONLY reason to do this is to get the errno printed out */
- fprintf(stderr, "exec(%s, %s, -T, %s) failed. Errno %s [%d]\n",
- prog, openck, pidname, strerror(errno), errno);
- exit(2);
- default: /* parent */
- waitpid(pid, &stat_loc, 0);
- if(WIFEXITED(stat_loc)) {
- return(WEXITSTATUS(stat_loc));
- } else {
- return(1);
- }
- }
-}
-
-/*
- * PROGRAM TITLE : Test if a named file descriptor is open
- * This function is called when fcntcs07 is called with the -T option.
- * It tests if a file descriptor is open and exits accordingly.
- */
-int
-test_open(const char *arg)
-{
- int fd, rc;
- int status;
-
- fd = atoi(arg);
-
- rc = fcntl(fd, F_GETFD, &status);
-
-#ifdef DEBUG_T
- printf("%s: fd = %d rc = %d status= %d, errno= %d\n", openck, fd, rc,
- status, errno);
-#endif
-
- if(rc == -1 && errno == EBADF) {
- exit(0);
- }
-
- if(rc != -1)
- exit(3);
-
- exit(errno);
- return -1; /* to remove compiler warning on IRIX */
-}
diff --git a/winsup/testsuite/winsup.api/ltp/fcntl07B.c b/winsup/testsuite/winsup.api/ltp/fcntl07B.c
deleted file mode 100644
index 4e94ff2..0000000
--- a/winsup/testsuite/winsup.api/ltp/fcntl07B.c
+++ /dev/null
@@ -1,422 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : fcntl07B
- * <same
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Close-On-Exec of named pipe functional test
- *
- * PARENT DOCUMENT : none
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 5
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Richard Logan :copied from fcntcs07 written by Glen Overby
- *
- * CO-PILOT : William Roske
- *
- * DATE STARTED : 08/11/93
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) test close-on-exec with a named pipe
- *
- * INPUT SPECIFICATIONS
- *
- * Standard arguments accepted by parse_opts(3).
- *
- * The -t (timing) and -e options apply to the fcntl(.., F_SETFD, ..)
- * system call.
- *
- * -T fd : If this option is given, the program runs as "test_open",
- * testing <fd> to see if it is open or not and exiting
- * accordingly:
- * 0 not open (EBADF from fcntl(..., F_GETFD, ...))
- * 3 no error from fcntl
- * errno fcntl returned an error other than EBADF
- *
- * -F name : File to open. Must be an absolute path
- * and the file must be writable;
- * -n program: path to the 'test_open' program
- *
- * OUTPUT SPECIFICATIONS
- * This test uses the cuts-style test_res format output consisting of:
- *
- * test-name PASS/FAIL/BROK message
- *
- * the message will tell what type of test and, if it failed, indicate
- * what the failure was.
- *
- * DURATION
- * Terminates
- *
- * SIGNALS
- * None
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * If this test is not called with a full pathname, it must be able
- * to find itself on $PATH
- *
- * INTERCASE DEPENDENCIES
- * none
- *
- * DETAILED DESCRIPTION
- *
- * Setup:
- * Setup signal handling.
- * Create and make current a temporary directory.
- * Create a named pipe and open it for writing
- *
- * Test:
- * Set the file descriptor for close-on-exec
- * Fork
- * Child execlp's the program "test_open".
- * If the exec fails, exit "2"
- * Parent waits
- * Report results.
- *
- * Cleanup:
- * Close file and pipes
- * Remove the temporary directory
- *
- * BUGS
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/wait.h>
-#include <limits.h>
-
-#include "test.h"
-#include "usctest.h"
-#include "search_path.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-void help();
-
-const char *TCID="fcntl07B"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-
-/* for parse_opts */
-int fflag, Tflag; /* binary flags: opt or not */
-char *fopt, *Topt; /* option arguments */
-
-option_t options[] = {
- { "F:", &fflag, &fopt }, /* -F filename */
- { "T:", &Tflag, &Topt }, /* -T <fd> exec'ed by test: test FD */
- { NULL, NULL, NULL }
-};
-
-int stat_loc; /* for waitpid() */
-
-int npipe_fd;
- /* file descriptors for a named pipe */
-#define DEFAULT_FILE "DefaultFileName"
-const char *File1 = DEFAULT_FILE;
-
-#define DEFAULT_SUBPROG "test_open"
-const char *openck = DEFAULT_SUBPROG; /* support program name to check for open FD */
-const char subprog_path[_POSIX_PATH_MAX];/* path to exec "openck" with */
-#define STRSIZE 255
-#define FIFONAME "FiFo"
-
-int *testfds[] = {
- &npipe_fd, 0
- };
-
-const char *testfdtypes[] = {
- "named pipe"
- };
-
-int test_open(char *arg);
-int do_exec(const char *prog, int fd, const char *tcd);
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- int exec_return; /* return from do_exec */
- int **tcp; /* testcase pointer (pointer to FD) */
- const char **tcd; /* testcase description pointer */
-
- /***************************************************************
- * parse standard options, and exit if there is an error
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, options, &help)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- if(fflag) /* -F option */
- File1 = fopt;
-
- if(Tflag) { /* -T option */
- exit(test_open(Topt));
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup(av[0]);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- for(tcp = testfds, tcd = testfdtypes; *tcp; tcp++, tcd++) {
-
- TEST(fcntl(**tcp, F_SETFD, FD_CLOEXEC));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "fcntl(%s[%d], F_SETFD, FD_CLOEXEC) Failed, errno=%d : %s",
- *tcd, **tcp, TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /*************************************************************
- * only perform functional verification if flag set
- * (-f not given)
- *************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
-
- exec_return = do_exec(subprog_path, **tcp, *tcd);
-
- switch(exec_return) {
- case -1:
- tst_resm(TBROK, "fork failed. Errno %s [%d]",
- strerror(errno), errno);
- break;
- case 1:
- tst_resm(TBROK, "waitpid return was 0%o", stat_loc);
- break;
- case 2:
- tst_resm(TBROK, "exec failed"); /* errno was in child */
- break;
- case 0:
- tst_resm(TPASS, "%s child exited 0, indicating that the file was closed",
- *tcd);
- break;
- default:
- tst_resm(TFAIL, "%s child exited non-zero, %d", *tcd,
- exec_return);
- break;
- }
- }
- }
- }
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup(char *path)
-{
- search_path(path, subprog_path, X_OK, 1);
-
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* create a temporary directory and go to it */
- tst_tmpdir();
-
- /* set up a named pipe (write side gets CLOSE-ON-EXEC) */
- if(mkfifo(FIFONAME, 0666) == -1) {
- tst_brkm(TBROK, cleanup, "mkfifo of named pipe %s failed errno %d (%s)\n", FIFONAME, errno, strerror(errno));
- }
-
- if((npipe_fd=open(FIFONAME, O_RDWR, 0666)) == -1) {
- tst_brkm(TBROK, cleanup, "Open of named pipe %s failed errno %d (%s)\n", File1, errno, strerror(errno));
- }
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* close everything */
- close(npipe_fd);
-
- /* remove temporary directory and all files in it. */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-/***************************************************************************
- * issue a help message
- ***************************************************************************/
-void
-help()
-{
- printf("-T fd : If this option is given, the program runs as 'test_open'\n");
- printf(" testing <fd> to see if it is open or not and exiting accordingly\n");
- printf("-F name : File to open. Must be an absolute path,\n");
- printf(" and the file must be writable\n");
- printf("-n program: path to the 'test_open' program\n");
-
-}
-
-/*---------------------------------------------------------------------------*/
-/* Perform an exec, then wait for the child to terminate.
- * The child's termination status determines the success of the test
- *
- * Return codes:
- * -1 BROK fork failed
- * 1 BROK waitpid returned != exit status
- * <else> ???? exit code from child:
- * 2 BROK exec failed
- * 0 PASS fd was properly closed
- *
- */
-
-int
-do_exec(const char *prog, int fd, const char *tcd)
-{
- int pid;
- char pidname[STRSIZE];
-#ifdef DEBUG
- int rc, status; /* for the fcntl */
-#endif
-
- /* set up arguments to exec'ed child */
- sprintf(pidname, "%d", fd);
-
-#ifdef DEBUG
- rc = fcntl(fd, F_GETFD, &status);
- printf("%s: fd = %d rc = %d status= %d, errno= %d\n", tcd, fd, rc, status, errno);
-#endif
-
- switch(pid=fork()) {
- case -1:
- return(-1);
- case 0: /* child */
- execlp(prog, openck, "-T", pidname, NULL);
-
- /* the ONLY reason to do this is to get the errno printed out */
- fprintf(stderr, "exec(%s, %s, -T, %s) failed. Errno %s [%d]\n",
- prog, openck, pidname, strerror(errno), errno);
- exit(2);
- default: /* parent */
- waitpid(pid, &stat_loc, 0);
- if(WIFEXITED(stat_loc)) {
- return(WEXITSTATUS(stat_loc));
- } else {
- return(1);
- }
- }
-}
-
-/*
- * PROGRAM TITLE : Test if a named file descriptor is open
- * This function is called when fcntcs07 is called with the -T option.
- * It tests if a file descriptor is open and exits accordingly.
- */
-int
-test_open(char *arg)
-{
- int fd, rc;
- int status;
-
- fd = atoi(arg);
-
- rc = fcntl(fd, F_GETFD, &status);
-
-#ifdef DEBUG_T
- printf("%s: fd = %d rc = %d status= %d, errno= %d\n", openck, fd, rc,
- status, errno);
-#endif
-
- if(rc == -1 && errno == EBADF) {
- exit(0);
- }
-
- if(rc != -1)
- exit(3);
-
- exit(errno);
- return -1; /* To remove compiler warning on IRIX */
-}
diff --git a/winsup/testsuite/winsup.api/ltp/fcntl08.c b/winsup/testsuite/winsup.api/ltp/fcntl08.c
deleted file mode 100644
index eaf2243..0000000
--- a/winsup/testsuite/winsup.api/ltp/fcntl08.c
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : fcntl08
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for fcntl(2) using F_SETFL argument.
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) fcntl(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the fcntl(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * fcntl(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * close file
- * remove temp directory
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-#ifndef O_NDELAY
-#define O_NDELAY 0
-#endif
-
-const char *TCID="fcntl08"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-char fname[255];
-int arg, fd;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call fcntl(2) with F_SETFL argument on fname
- */
- TEST(fcntl(fd, F_SETFL, arg));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- tst_resm(TFAIL, "fcntl(%s, F_SETFL, %d) Failed, errno=%d : %s",
- fname, arg, TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "fcntl(%s, F_SETFL, %d) returned %d",
- fname, arg, TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(fname,"tfile_%d",getpid());
- if ((fd = open(fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
-
- /* set the flags to be used */
-#ifdef CRAY
- arg = (O_NDELAY | O_APPEND | O_RAW | O_NONBLOCK);
-#else
- arg = (O_NDELAY | O_APPEND | O_NONBLOCK);
-#endif /* ! CRAY */
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* close the file we have open */
- if (close(fd) == -1) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/fcntl09.c b/winsup/testsuite/winsup.api/ltp/fcntl09.c
deleted file mode 100644
index 3a827e1..0000000
--- a/winsup/testsuite/winsup.api/ltp/fcntl09.c
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : fcntl09
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for fcntl(2) using F_SETLK argument.
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 2
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) fcntl(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the fcntl(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * fcntl(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="fcntl09"; /* Test program identifier. */
-int TST_TOTAL=2; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char fname[255];
-int fd;
-struct flock flocks;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
-#if 0
- /* Ouch! Either read *or* write lock, but not both!
- This code depends on F_RDLCK being 0. */
- flocks.l_type = F_RDLCK | F_WRLCK;
-#else
- flocks.l_type = F_WRLCK;
-#endif
- /*
- * Call fcntl(2) with F_SETLK argument on fname
- */
- TEST(fcntl(fd, F_SETLK, &flocks));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL,
- "fcntl(%s, F_SETLK, &flocks) flocks.l_type = F_RDLCK | F_WRLCK Failed, errno=%d : %s",
- fname, TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS,
- "fcntl(%s, F_SETLK, &flocks) flocks.l_type = F_RDLCK | F_WRLCK returned %d",
- fname, TEST_RETURN);
- }
- }
-
- flocks.l_type = F_UNLCK;
- /*
- * Call fcntl(2) with F_SETLK argument on fname
- */
- TEST(fcntl(fd, F_SETLK, &flocks));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL,
- "fcntl(%s, F_SETLK, &flocks) flocks.l_type = F_UNLCK Failed, errno=%d : %s",
- fname, TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS,
- "fcntl(%s, F_SETLK, &flocks) flocks.l_type = F_UNLCK returned %d",
- fname, TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(fname,"./file_%d",getpid());
- if (creat(fname, 02644) == -1) {
- tst_brkm(TBROK, cleanup, "creat(%s, 02644) Failed, errno=%d : %s", fname, errno, strerror(errno));
- } else if (close(fd) == -1) {
- tst_brkm(TBROK, cleanup, "close(%s) Failed, errno=%d : %s", fname, errno, strerror(errno));
- } else if ((fd = open(fname,O_RDWR,0700)) == -1) {
- tst_brkm(TBROK, cleanup, "open(%s, O_RDWR,0700) Failed, errno=%d : %s", fname, errno, strerror(errno));
- }
- flocks.l_whence=1;
- flocks.l_start=0;
- flocks.l_len=0;
- flocks.l_pid=getpid();
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- if (close(fd) == -1) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s", fname, errno, strerror(errno));
- } else if (unlink(fname) == -1) {
- tst_resm(TWARN, "unlink(%s) Failed, errno=%d : %s", fname, errno, strerror(errno));
-
- }
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/fcntl10.c b/winsup/testsuite/winsup.api/ltp/fcntl10.c
deleted file mode 100644
index e2de44b..0000000
--- a/winsup/testsuite/winsup.api/ltp/fcntl10.c
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : fcntl10
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for fcntl(2) using F_SETLKW argument.
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 2
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) fcntl(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the fcntl(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * fcntl(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="fcntl10"; /* Test program identifier. */
-int TST_TOTAL=2; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char fname[255];
-int fd;
-struct flock flocks;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
-#if 0
- /* Ouch! Either read *or* write lock, but not both!
- This code depends on F_RDLCK being 0. */
- flocks.l_type = F_RDLCK | F_WRLCK;
-#else
- flocks.l_type = F_WRLCK;
-#endif
- /*
- * Call fcntl(2) with F_SETLKW flocks.l_type = F_UNLCK argument on fname
- */
- TEST(fcntl(fd, F_SETLKW, &flocks));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL,
- "fcntl(%s, F_SETLKW, &flocks) flocks.l_type = F_RDLCK | F_WRLCK Failed, errno=%d : %s",
- fname, TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS,
- "fcntl(%s, F_SETLKW, &flocks) flocks.l_type = F_RDLCK | F_WRLCK returned %d",
- fname, TEST_RETURN);
- }
- }
-
- flocks.l_type = F_UNLCK;
- /*
- * Call fcntl(2) with F_SETLKW flocks.l_type = F_UNLCK argument on fname
- */
- TEST(fcntl(fd, F_SETLKW, &flocks));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL,
- "fcntl(%s, F_SETLKW, &flocks) flocks.l_type = F_UNLCK Failed, errno=%d : %s",
- fname, TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS,
- "fcntl(%s, F_SETLKW, &flocks) flocks.l_type = F_UNLCK returned %d",
- fname, TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(fname,"tfile_%d",getpid());
- if ((fd = creat(fname, 02644)) == -1) {
- tst_brkm(TBROK, cleanup, "creat(%s, 02644) Failed, errno=%d : %s", fname, errno, strerror(errno));
- } else if (close(fd) == -1) {
- tst_brkm(TBROK, cleanup, "close(%s) Failed, errno=%d : %s", fname, errno, strerror(errno));
- } else if ((fd = open(fname,O_RDWR,0700)) == -1) {
- tst_brkm(TBROK, cleanup, "open(%s, O_RDWR,0700) Failed, errno=%d : %s", fname, errno, strerror(errno));
- }
-
- /* set needed fields in the flocks structure */
- flocks.l_whence=1;
- flocks.l_start=0;
- flocks.l_len=0;
- flocks.l_pid=getpid();
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- if (close(fd) == -1) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s", fname, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/fork01.c b/winsup/testsuite/winsup.api/ltp/fork01.c
deleted file mode 100644
index 2aac2d4..0000000
--- a/winsup/testsuite/winsup.api/ltp/fork01.c
+++ /dev/null
@@ -1,316 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : fork01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for fork(2)
- *
- * PARENT DOCUMENT : frktds02
- *
- * TEST CASE TOTAL : 2
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Kathy Olmsted
- *
- * CO-PILOT : Steve Shaw
- *
- * DATE STARTED : 06/17/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) fork returns without error
- * 2.) fork returns the pid of the child
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * fork()
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- * CHILD:
- * determine PID
- * write to PID to a file and close the file
- * exit
- * PARENT:
- * wait for child to exit
- * read child PID from file
- * compare child PID to fork() return code and report
- * results
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include "test.h"
-#include "usctest.h"
-
-#define KIDEXIT 42
-extern void setup();
-extern void cleanup();
-
-#define LINE_SZ 20 /* size of the line written/read to the file */
-#define FILENAME "childpid"
-
-
-
-const char *TCID="fork01"; /* Test program identifier. */
-int TST_TOTAL=2; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-/***************************************************************
- * child_pid - the child side of the test
- * determine the PID and write to a file
- ***************************************************************/
-void child_pid()
-{
-
- int fildes;
- char tmp_line[LINE_SZ];
-
- fildes = creat(FILENAME,0700);
- sprintf(tmp_line,"%d\n",getpid());
- write(fildes,tmp_line,LINE_SZ);
- close(fildes);
-
-}
-
-/***************************************************************
- * parent_pid - the parent side of the test
- * read the value determined by the child
- * compare and report results
- ***************************************************************/
-void parent_pid()
-{
-
- int fildes;
- char tmp_line[LINE_SZ];
- pid_t child_id;
-
- if ((fildes = open(FILENAME,O_RDWR)) == -1) {
- tst_brkm(TBROK, cleanup,
- "parent open failed. errno: %d (%s)\n",
- errno, strerror(errno));
- }
- else {
- if (read(fildes,tmp_line,LINE_SZ) == 0) {
- tst_brkm(TBROK,cleanup, "fork(): parent failed to read PID from file errno: %d (%s)",
- errno, strerror(errno));
- }
- else {
- child_id = atoi(tmp_line);
- if (TEST_RETURN != child_id) {
- tst_resm(TFAIL,"child reported a pid of %d. parent received %d from fork()",
- child_id,TEST_RETURN);
- } else {
- tst_resm(TPASS,"child pid and fork() return agree: %d",child_id);
- }
- }
- close(fildes);
- }
-}
-
-/***************************************************************
- * main() - performs tests
- *
- ***************************************************************/
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- int fails;
- int kid_status, wait_status;
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
- fails = 0;
-
- /*
- * Call fork(2)
- */
- TEST(fork());
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- if ( STD_FUNCTIONAL_TEST ) {
- tst_resm(TFAIL, "fork() Failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- tst_resm(TBROK,"unable to continue");
- }
- }
- if (TEST_RETURN == 0) {
- /* child */
- if ( STD_FUNCTIONAL_TEST ) {
- child_pid();
- }
- exit(KIDEXIT);
- } else {
- /* parent */
- if ( STD_FUNCTIONAL_TEST ) {
- tst_resm(TPASS, "fork() returned %d", TEST_RETURN);
- }
- /* wait for the child to complete */
- wait_status = wait(&kid_status);
- if ( STD_FUNCTIONAL_TEST ) {
- if (wait_status == TEST_RETURN) {
- if (kid_status != KIDEXIT << 8) {
- tst_resm(TBROK,
- "incorrect child status returned on wait(): %d",
- kid_status);
- fails++;
- }
- }
- else {
- tst_resm(TBROK,
- "wait() for child status failed with %d errno: %d : %s",
- wait_status,errno,strerror(errno));
- fails++;
- }
- if (fails == 0 ) {
- /* verification tests */
- parent_pid();
- }
- } /* STD_FUNCTIONAL_TEST */
- } /* TEST_RETURN */
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
- setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
- cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_rmdir();
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/fork02.c b/winsup/testsuite/winsup.api/ltp/fork02.c
deleted file mode 100644
index eeec828..0000000
--- a/winsup/testsuite/winsup.api/ltp/fork02.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * fork02.c
- *
- * DESCRIPTION
- * Test correct operation of fork:
- * pid == 0 in child;
- * pid > 0 in parent from wait;
- *
- * ALGORITHM
- * Fork one process, check for pid == 0 in child.
- * Check for pid > 0 in parent after wait.
- *
- * USAGE
- * fork02
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None
- */
-
-#include <sys/wait.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-
-const char *TCID = "fork02";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-int
-main(int ac, char **av)
-{
- int pid1, pid2, status;
-
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /*
- * parse standard options
- */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- /*
- * perform global setup for the test
- */
- setup();
-
- /*
- * check looping state if -i option is given
- */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /*
- * reset Tst_count in case we are looping.
- */
- Tst_count = 0;
-
- if ((pid1 = fork()) == -1) {
- tst_brkm(TBROK, cleanup, "fork() failed");
- }
-
- if (pid1 == 0) {
- tst_resm(TINFO, "Inside child");
- _exit(0);
- } else {
- tst_resm(TINFO, "Inside parent");
- pid2 = wait(&status);
- tst_resm(TINFO, "exit status of wait %d", status);
-
- if (pid1 == pid2) {
- tst_resm(TPASS, "test 1 PASSED");
- } else {
- tst_resm(TFAIL, "test 1 FAILED");
- }
- }
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test
- */
-void
-setup()
-{
- /*
- * capture signals
- */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /*
- * Pause if that option was specified
- */
- TEST_PAUSE;
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/fork03.c b/winsup/testsuite/winsup.api/ltp/fork03.c
deleted file mode 100644
index fbc23bb..0000000
--- a/winsup/testsuite/winsup.api/ltp/fork03.c
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * fork03.c
- *
- * DESCRIPTION
- * Check that child can use a large text space and do a large
- * number of operations.
- *
- * ALGORITHM
- * Fork one process, check for pid == 0 in child.
- * Check for pid > 0 in parent after wait.
- *
- * USAGE
- * fork03
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None
- */
-
-#include <sys/wait.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-
-const char *TCID = "fork03";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-
-int
-main(int ac, char **av)
-{
- float fl1, fl2;
- int i;
- int pid1, pid2, status;
-
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /*
- * parse standard options
- */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- /*
- * perform global setup for the test
- */
- setup();
-
- /*
- * check looping state if -i option is given
- */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /*
- * reset Tst_count in case we are looping.
- */
- Tst_count = 0;
-
- if ((pid1 = fork()) == -1) {
- tst_brkm(TBROK, cleanup, "fork() failed");
- }
-
- if (pid1 == 0) { /* child */
- /* child uses some cpu cycles */
- for (i = 1; i < 32767; i++) {
- fl1 = 0.000001;
- fl1 = fl2 = 0.000001;
- fl1 = fl1 * 10.0;
- fl2 = fl1 / 1.232323;
- fl1 = fl2 - fl2;
- fl1 = fl2;
- }
-
- /* Pid must always be zero in child */
-
- if (pid1 != 0) {
- exit(1);
- } else {
- exit(0);
- }
- } else { /* parent */
- tst_resm(TINFO, "process id in parent of child from "
- "fork : %d", pid1);
- pid2 = wait(&status); /* wait for child */
-
- if (pid1 != pid2) {
- tst_resm(TFAIL, "pids don't match : %d vs %d",
- pid1, pid2);
- continue;
- }
-
- if ((status >> 8) != 0) {
- tst_resm(TFAIL, "child exited with failure");
- continue;
- }
-
- tst_resm(TPASS, "test 1 PASSED");
- }
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test
- */
-void
-setup()
-{
- /*
- * capture signals
- */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /*
- * Pause if that option was specified
- */
- TEST_PAUSE;
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/fork04.c b/winsup/testsuite/winsup.api/ltp/fork04.c
deleted file mode 100644
index 7e8d80f..0000000
--- a/winsup/testsuite/winsup.api/ltp/fork04.c
+++ /dev/null
@@ -1,403 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : fork04
- *
- * TEST TITLE : Child inheritance of Environment Variables after fork()
- *
- * PARENT DOCUMENT : frktds01
- *
- * TEST CASE TOTAL : 3
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Kathy Olmsted
- *
- * CO-PILOT : Steve Shaw
- *
- * DATE STARTED : 06/17/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- * Test these environment variables correctly inherited by child:
- * 1. TERM
- * 2. NoTSetzWq
- * 3. TESTPROG
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * DETAILED DESCRIPTION
- *
- * Setup:
- * Setup signal handling.
- * Make and change to a temporary directory.
- * Pause for SIGUSR1 if option specified.
- * Add TESTPROG variable to the environment
- *
- * Test:
- * Loop if the proper options are given.
- * fork()
- * Check return code, if system call failed (return=-1)
- * Log the errno
- * CHILD:
- * open a temp file
- * Determine environment values and write to file
- * close file containing test values.
- * exit.
- * PARENT:
- * Wait for child to exit.
- * Verify exit status
- * Open file containing test values.
- * For each test case:
- * Read the value from the file.
- * Determine and report PASS/FAIL result.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Remove the temporary directory and exit.
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <fcntl.h>
-#include <string.h>
-#include <sys/param.h>
-#include <signal.h> /*Includes signal information. */
-#include <errno.h>
-#include "test.h"
-#include "usctest.h"
-
-const char *TCID="fork04"; /* Test program identifier. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-
-
-#define KIDEXIT 42 /* Known value for child exit status */
-#define MAX_LINE_LENGTH 256
-#define OUTPUT_FILE "env.out"
-#define ENV_NOT_SET "getenv() does not find variable set"
-
-/* list of environment variables to test */
-const char *environ_list[] = {"TERM","NoTSetzWq","TESTPROG"};
-#define NUMBER_OF_ENVIRON (int)(sizeof(environ_list)/sizeof(char *))
-int TST_TOTAL=NUMBER_OF_ENVIRON; /* Total number of test cases. */
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* remove the temporary directory and exit with
- return code appropriate for results */
- tst_rmdir();
- tst_exit();
-
-} /* End cleanup() */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* make and change to a temporary directory */
- tst_tmpdir();
-
- /* add a variable to the environment */
- putenv(strdup("TESTPROG=FRKTCS04"));
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
-} /* End setup() */
-
-
-/***************************************************************
- * child_environment - the child side of the environment tests
- * determine values for the variables and write to a file
- ***************************************************************/
-void child_environment()
-{
-
- int fildes;
- int index;
- char msg[MAX_LINE_LENGTH];
- char *var;
-
- fildes = creat(OUTPUT_FILE,0700);
-
-
- for (index=0;index<NUMBER_OF_ENVIRON;index++) {
- memset(msg, 0, MAX_LINE_LENGTH);
-
- if ( (var=getenv(environ_list[index])) == NULL )
- (void)sprintf(msg,"%s:%s",environ_list[index], ENV_NOT_SET);
- else
- (void)sprintf(msg,"%s:%s",environ_list[index], var);
-
- write(fildes,msg,sizeof(msg)); /* includes extra null chars */
- }
-
- close(fildes);
-
-}
-
-/***********************************************************************
- *
- * Compare parent env string to child's string.
- * Each string is in the format: <env var>:<value>
- *
- ***********************************************************************/
-int
-cmp_env_strings(char *pstring, char *cstring)
-{
- char *penv, *cenv, *pvalue, *cvalue;
-
- /*
- * Break pstring into env and value
- */
- penv=pstring;
- if ( (pvalue=strchr(pstring, ':')) == NULL ) {
- tst_resm(TBROK,
- "internal error - parent's env string not in correct format:'%s'",
- pstring);
- return -1;
- } else {
- *pvalue='\0';
- pvalue++;
- if ( *pvalue == '\0' ) {
- tst_resm(TBROK, "internal error - missing parent's env value");
- return -1;
- }
- }
-
- /*
- * Break cstring into env and value
- */
- cenv=cstring;
- if ( (cvalue=strchr(cstring, ':')) == NULL ) {
- tst_resm(TBROK,
- "internal error - parent's env string not in correct format:'%s'",
- cstring);
- return -1;
- } else {
- *cvalue='\0';
- cvalue++;
- if ( *cvalue == '\0' ) {
- tst_resm(TBROK, "internal error - missing child's env value");
- return -1;
- }
- }
-
- if ( strcmp(penv, cenv) != 0 ) {
- tst_resm(TBROK, "internal error - parent(%s) != child (%s) env",
- penv, cenv);
- return -1;
- }
-
- if ( strcmp(pvalue, cvalue) != 0 ) {
- tst_resm(TFAIL, "Env var %s changed after fork(), parent's %s, child's %s",
- penv, pvalue, cvalue);
- } else {
- tst_resm(TPASS, "Env var %s unchanged after fork(): %s",
- penv, cvalue);
- }
- return 0;
-
-}
-
-/***************************************************************
- * parent_environment - the parent side of the environment tests
- * determine values for the variables
- * read the values determined by the child
- * compare values
- ***************************************************************/
-void parent_environment()
-{
-
- int fildes;
- char tmp_line[MAX_LINE_LENGTH];
- char parent_value[MAX_LINE_LENGTH];
- int index;
- int ret;
- char *var;
-
- if ((fildes = open(OUTPUT_FILE,O_RDWR)) == -1) {
- tst_brkm(TBROK, cleanup,
- "fork() test. Parent open of temporary file failed. errno %d (%s)\n",
- errno, strerror(errno));
- }
- for (index=0;index<NUMBER_OF_ENVIRON;index++)
- {
- if ((ret=read(fildes,tmp_line,MAX_LINE_LENGTH)) == 0) {
- tst_resm(TBROK,"fork() test. parent_environment: failed to read from file with %d (%s)",
- errno,strerror(errno));
- }
- else {
-
- if ( (var=getenv(environ_list[index])) == NULL )
- sprintf(parent_value,"%s:%s", environ_list[index], ENV_NOT_SET);
- else
- sprintf(parent_value,"%s:%s", environ_list[index], var);
-
- cmp_env_strings(parent_value, tmp_line);
-
- }
- }
- close(fildes);
-
-}
-
-/***************************************************************
- * main() - performs tests
- *
- ***************************************************************/
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- int kid_status; /* status returned from child */
- int wait_status; /* status of wait system call in parent */
- int fails; /* indicates whether to continue with tests */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count and fail indicator in case we are looping. */
- Tst_count=0;
- fails = 0;
-
- /* make the call to fork */
- TEST(fork());
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- /* fork failed */
- if ( STD_FUNCTIONAL_TEST ) {
- tst_brkm(TFAIL, cleanup, "fork() failed with %d (%s)",
- TEST_ERRNO, strerror(TEST_ERRNO));
- }
- }
- else if (TEST_RETURN == 0) {
- /* child */
- if ( STD_FUNCTIONAL_TEST ) {
- /* determine environment variables */
- child_environment();
- }
- /* exit with known value */
- exit(KIDEXIT);
- } else {
- /* parent of successful fork */
- /* wait for the child to complete */
- wait_status = wait(&kid_status);
- if ( STD_FUNCTIONAL_TEST ) {
- /* validate the child exit status */
- if (wait_status == TEST_RETURN) {
- if (kid_status != KIDEXIT << 8) {
- tst_brkm(TBROK, cleanup,
- "fork(): Incorrect child status returned on wait(): %d",
- kid_status);
- fails++;
- }
- }
- else {
- tst_brkm(TBROK, cleanup,
- "fork(): wait() for child status failed with %d errno: %d : %s",
- wait_status,errno,strerror(errno));
- fails++;
- }
-
- if (fails == 0 ) {
- /* verification tests */
- parent_environment();
- }
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
diff --git a/winsup/testsuite/winsup.api/ltp/fork06.c b/winsup/testsuite/winsup.api/ltp/fork06.c
deleted file mode 100644
index 9755e50..0000000
--- a/winsup/testsuite/winsup.api/ltp/fork06.c
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * fork06.c
- *
- * DESCRIPTION
- * Test that a process can fork children a large number of
- * times in succession
- *
- * ALGORITHM
- * Attempt to fork a child that exits immediately
- * Repeat it many times(1000), counting the number of successes and
- * failures
- *
- * USAGE
- * fork06
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None
- */
-
-#include <sys/wait.h>
-#include "test.h"
-#include "usctest.h"
-
-const char *TCID = "fork06";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-
-#define NUMFORKS 1000
-
-int
-main(int ac, char **av)
-{
- int i, pid, status, childpid, succeed, fail;
-
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /*
- * parse standard options
- */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- /*
- * perform global setup for the test
- */
- setup();
-
- /*
- * check looping state if -i option is given
- */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /*
- * reset Tst_count in case we are looping.
- */
- Tst_count = 0;
-
- succeed = 0;
- fail = 0;
-
- for (i = 0; i < NUMFORKS; i++) {
- if ((pid = fork()) == -1) {
- fail++;
- continue;
- }
-
- if (pid == 0) { /* child */
- _exit(0);
- }
-
- /* parent */
- childpid = wait(&status);
- if (pid != childpid) {
- tst_resm(TFAIL, "pid from wait %d", childpid);
- }
- succeed++;
- }
-
- tst_resm(TINFO, "tries %d", i);
- tst_resm(TINFO, "successes %d", succeed);
- tst_resm(TINFO, "failures %d", fail);
-
- if ((wait(&status)) == -1) {
- tst_resm(TINFO, "There were no children to wait for");
- } else {
- tst_resm(TINFO, "There were children left");
- }
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test
- */
-void
-setup()
-{
- /*
- * capture signals
- */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /*
- * Pause if that option was specified
- */
- TEST_PAUSE;
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/fork07.c b/winsup/testsuite/winsup.api/ltp/fork07.c
deleted file mode 100644
index 7e06db7..0000000
--- a/winsup/testsuite/winsup.api/ltp/fork07.c
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * fork07.c
- *
- * DESCRIPTION
- * Check that all children inherit parent's file descriptor
- *
- * ALGORITHM
- * Parent opens a file, writes to it; forks processes until
- * -1 is returned. Each child attempts to read the file then returns.
- *
- * USAGE
- * fork07
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None
- */
-
-#include <sys/wait.h>
-#include <sys/stat.h>
-#include "test.h"
-#include "usctest.h"
-
-const char *TCID = "fork07";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-
-char pbuf[10];
-char fnamebuf[40];
-
-int
-main(int ac, char **av)
-{
- int status, count, forks, pid1;
- int ch_r_stat;
- FILE *rea = NULL, *writ = NULL;
-
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /*
- * parse standard options
- */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- /*
- * perform global setup for the test
- */
- setup();
-
- /*
- * check looping state if -i option is given
- */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /*
- * reset Tst_count in case we are looping.
- */
- Tst_count = 0;
-
- if ((writ = fopen(fnamebuf, "w")) == NULL)
- tst_resm(TFAIL, "failed to fopen file for write");
- if ((rea = fopen(fnamebuf, "r")) == NULL)
- tst_resm(TFAIL, "failed to fopen file for read");
-
- fprintf(writ,"abcdefghijklmnopqrstuv") ;
- fflush(writ);
- sleep(1);
-
- if ((getc(rea)) != 'a')
- tst_resm(TFAIL, "getc from read side was confused");
-
- forks = 0;
-
-forkone:
- ++forks;
- pid1 = -1;
- if ( forks >= 1000 || (pid1 = fork()) != 0) { /* parent */
- if (pid1 > 0) {
- goto forkone;
- } else if (pid1 < 0) {
- tst_resm(TINFO, "last child forked");
- }
- } else { /* child */
- ch_r_stat = getc(rea);
-#ifdef DEBUG
- tst_resm(TINFO, "Child got char: %c", ch_r_stat);
- tst_resm(TINFO, "integer value of getc in child "
- "expected %d got %d", 'b', ch_r_stat);
-#endif
- if (ch_r_stat != EOF) { /* for error or EOF */
- tst_resm(TPASS, "test passed in child no %d",
- forks);
- exit(0);
- } else {
- tst_resm(TFAIL, "Test failed in child no. %d",
- forks);
- exit(-1);
- }
- }
-
- /* parent */
- --forks;
- for (count = 0; count <= forks; count++) {
- wait(&status);
-#ifdef DEBUG
- tst_resm(TINFO, " exit status of wait "
- " expected 0 got %d", status);
-#endif
- if (status == 0) {
- tst_resm(TPASS, "parent test passed");
- } else {
- tst_resm(TFAIL, "parent test failed");
- }
- }
- tst_resm(TINFO, "Number of processes forked is %d", forks);
- }
- fclose (writ);
- fclose (rea);
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test
- */
-void
-setup()
-{
- /*
- * capture signals
- */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- umask(0);
-
- /*
- * Pause if that option was specified
- */
- TEST_PAUSE;
-
- /*
- * make a temp directory and cd to it
- */
- tst_tmpdir();
-
- strcpy(fnamebuf, "fork07.");
- sprintf(pbuf, "%d", getpid());
- strcat(fnamebuf, pbuf);
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /*
- * remove tmp dir and all files in it
- */
- unlink(fnamebuf);
- tst_rmdir();
-
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/fork09.c b/winsup/testsuite/winsup.api/ltp/fork09.c
deleted file mode 100644
index 233acc7..0000000
--- a/winsup/testsuite/winsup.api/ltp/fork09.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * fork01.c
- *
- * DESCRIPTION
- * Check that child has access to a full set of files.
- *
- * ALGORITHM
- * Parent opens a maximum number of files
- * Child closes one and attempts to open another, it should be
- * available
- *
- * USAGE
- * fork01
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None
- */
-
-#include <errno.h>
-#include <limits.h> /* for OPEN_MAX */
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include "test.h"
-#include "usctest.h"
-
-const char *TCID = "fork01";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-
-char filname[40], childfile[40];
-int first;
-FILE **fildeses; /* file streams */
-int mypid, nfiles;
-
-int
-main(int ac, char **av)
-{
- int pid, status, nf;
-
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /*
- * parse standard options
- */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- /*
- * perform global setup for the test
- */
- setup();
-
- fildeses = (FILE**)malloc((OPEN_MAX + 10) * sizeof(FILE *));
- if (fildeses == NULL) {
- tst_brkm(TBROK, cleanup, "malloc failed");
- /*NOTREACHED*/
- }
-
- /*
- * check looping state if -i option is given
- */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /*
- * reset Tst_count in case we are looping.
- */
- Tst_count = 0;
-
- mypid = getpid();
-
- tst_resm(TINFO, "OPEN_MAX is %d", OPEN_MAX);
-
- /* establish first free file */
- sprintf(filname, "fork01.%d", mypid);
- if ((first = creat(filname, 0660)) == -1) {
- tst_brkm(TBROK, cleanup, "Cannot open first file %s, "
- "errno = %d", filname, errno);
- /*NOTREACHED*/
- }
- close(first);
-
- tst_resm(TINFO, "first file descriptor is %d ", first);
-
- if (unlink(filname) == -1) {
- tst_brkm(TBROK, cleanup, "Cannot unlink file %s, "
- "errno = %d", filname, errno);
- /*NOTREACHED*/
- }
-
- /*
- * now open all the files for the test
- */
- for (nfiles = first; nfiles < OPEN_MAX; nfiles++) {
- sprintf(filname, "file%d.%d", nfiles, mypid);
- if ((fildeses[nfiles] = fopen(filname, "a")) == NULL) {
- tst_brkm(TBROK, cleanup, "Parent: cannot open "
- "file %d %s errno = %d", nfiles,
- filname, errno);
- /*NOTREACHED*/
- }
-#ifdef DEBUG
- tst_resm(TINFO, "filname: %s", filname);
-#endif
- }
-
- tst_resm(TINFO, "Parent reporting %d files open", nfiles - 1);
-
- if ((pid = fork()) == -1) {
- tst_brkm(TBROK, cleanup, "Fork failed");
- /*NOTREACHED*/
- }
-
- if (pid == 0) { /* child */
- nfiles--;
- if (fclose(fildeses[nfiles]) == -1) {
- tst_resm(TINFO, "Child could not close file "
- "#%d, errno = %d", nfiles, errno);
- exit(1);
- /*NOTREACHED*/
- } else {
- sprintf(childfile, "cfile.%d", getpid());
- if ((fildeses[nfiles] =
- fopen(childfile, "a")) == NULL) {
- tst_resm(TINFO, "Child could not open "
- "file %s, errno = %d",
- childfile, errno);
- exit(1);
- /*NOTREACHED*/
- } else {
- tst_resm(TINFO, "Child opened new "
- "file #%d", nfiles);
- unlink(childfile);
- exit(0);
- }
- }
- } else { /* parent */
- wait(&status);
- if (status >> 8 != 0) {
- tst_resm(TFAIL, "test 1 FAILED");
- } else {
- tst_resm(TPASS, "test 1 PASSED");
- }
- }
-
- /* clean up things in case we are looping */
- for (nf = first; nf < nfiles; nf++) {
- fclose(fildeses[nf]);
- sprintf(filname, "file%d.%d", nf, mypid);
- unlink(filname);
- }
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test
- */
-void
-setup()
-{
- /*
- * capture signals
- */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- umask(0);
-
- /*
- * Pause if that option was specified
- */
- TEST_PAUSE;
-
- /*
- * make a temp directory and cd to it
- */
- tst_tmpdir();
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or at premature exit
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /*
- * remove tmp dir and all files in it
- */
- tst_rmdir();
-
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/fork10.c b/winsup/testsuite/winsup.api/ltp/fork10.c
deleted file mode 100644
index 9dcbbb3..0000000
--- a/winsup/testsuite/winsup.api/ltp/fork10.c
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * fork04.c
- *
- * DESCRIPTION
- * Check inheritance of file descriptor by children, they
- * should all be refering to the same file.
- *
- * ALGORITHM
- * Child reads several chars and exits.
- * Parent forks another child, have the child and parent attempt to use
- * that location
- *
- * USAGE
- * fork04
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None
- */
-
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/wait.h>
-#include "test.h"
-#include "usctest.h"
-
-const char *TCID = "fork04";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-
-char pidbuf[10];
-char fnamebuf[40];
-
-int
-main(int ac, char **av)
-{
- int status, pid, fildes;
- char parchar[2];
- char chilchar[2];
-
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /*
- * parse standard options
- */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- /*
- * perform global setup for the test
- */
- setup();
-
- /*
- * check looping state if -i option is given
- */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /*
- * reset Tst_count in case we are looping.
- */
- Tst_count = 0;
-
- if ((fildes = creat(fnamebuf, 0600)) < 0) {
- tst_brkm(TBROK, cleanup, "Parent: cannot open %s for "
- "write, errno = %d", fnamebuf, errno);
- /*NOTREACHED*/
- }
- write(fildes, "ABCDEFGHIJKLMNOPQRSTUVWXYZ\n", 27);
- close(fildes);
-
- if ((fildes = open(fnamebuf, 0)) == -1) {
- tst_brkm(TBROK, cleanup, "Parent: cannot open %s for "
- "reading", fnamebuf);
- /*NOTREACHED*/
- }
-
- if ((pid = fork()) == -1) {
- tst_brkm(TBROK, cleanup, "fork() #1 failed");
- /*NOTREACHED*/
- }
-
- if (pid == 0) { /* child */
- tst_resm(TINFO, "fork child A");
- if (lseek(fildes, 10L, 0) == -1L) {
- tst_resm(TFAIL, "bad lseek by child");
- exit(1);
- }
- exit(0);
- } else { /* parent */
- wait(&status);
-
- /* parent starts second child */
- if ((pid = fork()) == -1) {
- tst_brkm(TBROK, cleanup, "fork() #2 failed");
- /*NOTREACHED*/
- }
-
- if (pid == 0) { /* child */
- if (read(fildes, chilchar, 1) <= 0) {
- tst_resm(TFAIL, "Child can't read "
- "file");
- exit(1);
- } else {
- if (chilchar[0] != 'K') {
- chilchar[1] = '\n';
- exit(1);
- } else {
- exit(0);
- }
- }
- } else { /* parent */
- (void)wait(&status);
- if (status >> 8 != 0) {
- tst_resm(TFAIL, "Bad return from "
- "second child");
- continue;
- }
- /* parent reads */
- if (read(fildes, parchar, 1) <= 0) {
- tst_resm(TFAIL, "Parent cannot read "
- "file");
- continue;
- } else {
- write(fildes, parchar, 1);
- if (parchar[0] != 'L') {
- parchar[1] = '\n';
- tst_resm(TFAIL, "Test failed");
- continue;
- }
- }
- }
- }
- tst_resm(TPASS, "test 1 PASSED");
- close (fildes);
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test
- */
-void
-setup()
-{
- /*
- * capture signals
- */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- umask(0);
-
- /*
- * Pause if that option was specified
- */
- TEST_PAUSE;
-
- /*
- * make a temp directory and cd to it
- */
- tst_tmpdir();
-
- strcpy(fnamebuf, "fork04.");
- sprintf(pidbuf, "%d", getpid());
- strcat(fnamebuf, pidbuf);
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /*
- * remove tmp dir and all files in it
- */
- tst_rmdir();
-
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/fork11.c b/winsup/testsuite/winsup.api/ltp/fork11.c
deleted file mode 100644
index 2b10352..0000000
--- a/winsup/testsuite/winsup.api/ltp/fork11.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * fork05.c
- *
- * DESCRIPTION
- * Test that parent gets a pid from each child when doing wait
- *
- * ALGORITHM
- * Fork NUMFORKS children that do nothing.
- *
- * USAGE
- * fork05
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None
- */
-
-#include <errno.h>
-#include <sys/wait.h>
-#include "test.h"
-#include "usctest.h"
-
-const char *TCID = "fork05";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-
-#define NUMFORKS 100
-
-int
-main(int ac, char **av)
-{
- int i, pid, cpid, status;
-
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /*
- * parse standard options
- */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- /*
- * perform global setup for the test
- */
- setup();
-
- /*
- * check looping state if -i option is given
- */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- /*
- * reset Tst_count in case we are looping.
- */
- Tst_count = 0;
-
- for (i=0; i<NUMFORKS; i++) {
- if ((pid = fork()) == 0) { /* child */
- exit(0);
- }
-
- if (pid > 0) { /* parent */
- cpid = wait(&status);
- if (cpid == pid) {
- tst_resm(TPASS, "fork #%d passed", i+1);
- } else {
- tst_resm(TFAIL, "fork #%d failed", i+1);
- }
- } else {
- tst_resm(TFAIL, "fork #%d failed", i+1);
- break;
- }
- }
- tst_resm(TINFO, "Number of processes forked = %d", i);
- tst_resm(TINFO, "Exit test 1");
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test
- */
-void
-setup()
-{
- /*
- * capture signals
- */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /*
- * Pause if that option was specified
- */
- TEST_PAUSE;
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/fpathconf01.c b/winsup/testsuite/winsup.api/ltp/fpathconf01.c
deleted file mode 100644
index 37fbe96..0000000
--- a/winsup/testsuite/winsup.api/ltp/fpathconf01.c
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : fpathconf01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for fpathconf(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 7
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) fpathconf(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the fpathconf(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * fpathconf(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="fpathconf01"; /* Test program identifier. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-#define FILENAME "fpafile01"
-
-int exp_enos[]={0, 0};
-
-int i;
-
-struct pathconf_args
-{
- const char *define_tag;
- int value;
- int defined; /* Some of these are undefined on regular files.
- * Cancer does a slightly better job with these already,
- * so this is all I'll do to this test. 11/19/98 roehrich
- */
-} args[] = {
- {"_PC_MAX_CANON", _PC_MAX_CANON, 0},
- {"_PC_MAX_INPUT", _PC_MAX_INPUT, 0},
- {"_PC_VDISABLE", _PC_VDISABLE, 0},
- {"_PC_LINK_MAX", _PC_LINK_MAX, 1},
- {"_PC_NAME_MAX", _PC_NAME_MAX, 1},
- {"_PC_PATH_MAX", _PC_PATH_MAX, 1},
- {"_PC_PIPE_BUF", _PC_PIPE_BUF, 0}
-};
-
-int TST_TOTAL=((sizeof(args)/sizeof(args[0])));
-int fd; /* temp file for fpathconf */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- for (i=0; i<TST_TOTAL; i++) {
- /*
- * Call fpathconf(2) with one of the valid arguments in the args array
- */
- TEST(fpathconf(fd,args[i].value));
-
- /* check return code -- if the return value is defined */
- if ( (TEST_RETURN == -1) && args[i].defined ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "fpathconf(fd, %s) Failed, errno=%d : %s", args[i].define_tag,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "fpathconf(fd, %s) returned %d", args[i].define_tag, TEST_RETURN);
- }
- }
- } /* End for i */
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
-
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- tst_tmpdir();
-
- if ( (fd=open(FILENAME, O_RDWR|O_CREAT, 0700)) == -1 )
- tst_brkm(TBROK, cleanup, "Unable to open temp file %s!", FILENAME);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- close(fd);
-
- /* exit with return code appropriate for results */
- tst_rmdir();
- tst_exit();
-
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/fstat01.c b/winsup/testsuite/winsup.api/ltp/fstat01.c
deleted file mode 100644
index d766841..0000000
--- a/winsup/testsuite/winsup.api/ltp/fstat01.c
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : fstat01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for fstat(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) fstat(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the fstat(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * fstat(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-const char *TCID="fstat01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char fname[255];
-int fd;
-struct stat statter;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call fstat(2)
- */
- TEST(fstat(fd, &statter));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "fstat(%s, &statter) Failed, errno=%d : %s", fname,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "fstat(%s, &statter) returned %d", fname, TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(fname,"tfile_%d",getpid());
- if ((fd = open(fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_brkm(TBROK, cleanup, "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s", fname, errno, strerror(errno));
- }
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- if (close(fd) == -1) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s", fname, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/fstat02.c b/winsup/testsuite/winsup.api/ltp/fstat02.c
deleted file mode 100644
index 224caf0..0000000
--- a/winsup/testsuite/winsup.api/ltp/fstat02.c
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: fstat02
- *
- * Test Description:
- * Verify that, fstat(2) succeeds to get the status of a file and fills
- * the stat structure elements though file pointed to by file descriptor
- * not opened for reading.
- *
- * Expected Result:
- * fstat() should return value 0 on success and the stat structure elements
- * should be filled with specified 'file' information.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.
- *
- * Usage: <for command-line>
- * fstat02 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * This test should be run by 'non-super-user' only.
- *
- */
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define FILE_MODE 0644
-#define TESTFILE "testfile"
-#define FILE_SIZE 1024
-#define BUF_SIZE 256
-#define MASK 0777
-
-const char *TCID="fstat02"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-uid_t User_id; /* user id/group id of test process */
-gid_t Group_id;
-int fildes; /* File descriptor of testfile */
-
-void setup(); /* Setup function for the test */
-void cleanup() __attribute__((noreturn));/* Cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- struct stat stat_buf; /* stat structure buffer */
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /* Perform global setup for test */
- setup();
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count = 0;
-
- /*
- * Call fstat(2) to get the status of
- * specified 'file' pointed to by 'fd'
- * into stat structure.
- */
- TEST(fstat(fildes, &stat_buf));
-
- /* check return code of fstat(2) */
- if (TEST_RETURN == -1) {
- tst_resm(TFAIL,
- "fstat on %s Failed, errno=%d : %s",
- TESTFILE, TEST_ERRNO, strerror(TEST_ERRNO));
- continue;
- }
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- /*
- * Verify the data returned by fstat(2)
- * aganist the expected data.
- */
- if ((stat_buf.st_uid != User_id) ||
- (stat_buf.st_gid != Group_id) ||
- (stat_buf.st_size != FILE_SIZE) ||
- ((stat_buf.st_mode & MASK) != FILE_MODE)) {
- tst_resm(TFAIL, "Functionality of fstat(2) on "
- "'%s' Failed", TESTFILE);
- } else {
- tst_resm(TPASS, "Functionality of fstat(2) on "
- "'%s' Succcessful", TESTFILE);
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * void
- * setup() - Performs setup function for the test.
- * Creat a temporary directory and chdir to it.
- * Creat a temporary file and write some known data into it.
- * Get the effective uid/gid of test process.
- */
-void
-setup()
-{
- int i;
- char tst_buff[BUF_SIZE];
- int wbytes;
- int write_len = 0;
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Check that the test process id is not super/root */
- if (geteuid() == 0) {
- tst_brkm(TBROK, NULL, "Must be non-super/root for this test!");
- tst_exit();
- }
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- if ((fildes = open(TESTFILE, O_WRONLY|O_CREAT, FILE_MODE)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, %#o) Failed, errno=%d : %s",
- TESTFILE, FILE_MODE, errno, strerror(errno));
- }
-
- /* Fill the test buffer with the known data */
- for (i = 0; i < BUF_SIZE; i++) {
- tst_buff[i] = 'a';
- }
-
- /* Write to the file 1k data from the buffer */
- while (write_len < FILE_SIZE) {
- if ((wbytes = write(fildes, tst_buff, sizeof(tst_buff))) <= 0) {
- tst_brkm(TBROK, cleanup,
- "write(2) on %s Failed, errno=%d : %s",
- TESTFILE, errno, strerror(errno));
- } else {
- write_len += wbytes;
- }
- }
-
- /* Get the uid/gid of the process */
- User_id = getuid();
- Group_id = getgid();
-
-} /* End setup() */
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Close the test file and remove the test file and temporary directory.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Close the test file */
- if (close(fildes) == -1) {
- tst_brkm(TFAIL, NULL, "close(%s) Failed, errno=%d : %s",
- TESTFILE, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/fstat03.c b/winsup/testsuite/winsup.api/ltp/fstat03.c
deleted file mode 100644
index 47982ed..0000000
--- a/winsup/testsuite/winsup.api/ltp/fstat03.c
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Test Name: fstat03
- *
- * Test Description:
- * Verify that, fstat(2) returns -1 and sets errno to EBADF if the file
- * pointed to by file descriptor is not valid.
- *
- * Expected Result:
- * fstat() should fail with return value -1 and set expected errno.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * if errno set == expected errno
- * Issue sys call fails with expected return value and errno.
- * Otherwise,
- * Issue sys call fails with unexpected errno.
- * Otherwise,
- * Issue sys call returns unexpected value.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory(s)/file(s) created.
- *
- * Usage: <for command-line>
- * fstat03 [-c n] [-e] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * This test should be executed by 'non-super-user' only.
- *
- */
-
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
-#define TEST_FILE "testfile"
-
-const char *TCID="fstat03"; /* Test program identifier. */
-int TST_TOTAL = 1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int exp_enos[]={EBADF, 0};
-int fildes; /* testfile descriptor */
-
-void setup(); /* Main setup function for the tests */
-void cleanup() __attribute__((noreturn));/* cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- struct stat stat_buf; /* stat structure buffer */
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /*
- * Invoke setup function to create a testfile under temporary
- * directory.
- */
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
- /*
- * Call fstat(2) to get the status information
- * of a closed testfile pointed to by 'fd'.
- * verify that fstat fails with -1 return value and
- * sets appropriate errno.
- */
- TEST(fstat(fildes, &stat_buf));
-
- /* Check return code from fstat(2) */
- if (TEST_RETURN == -1) {
- TEST_ERROR_LOG(TEST_ERRNO);
- if (TEST_ERRNO == EBADF) {
- tst_resm(TPASS, "fstat() fails with "
- "expected error EBADF");
- } else {
- tst_resm(TFAIL, "fstat() fails with "
- "wrong errno:%d", TEST_ERRNO);
- }
- } else {
- tst_resm(TFAIL, "fstat() returned %d, "
- "expected -1, error EBADF");
- }
- } /* End for TEST_LOOPING */
-
- /*
- * Invoke cleanup() to delete the test directory/file(s) created
- * in the setup().
- */
- cleanup();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * void
- * setup(void) - performs all ONE TIME setup for this test.
- * Exit the test program on receipt of unexpected signals.
- * Create a temporary directory and change directory to it.
- * Create a testfile under temporary directory.
- * Close the testfile.
- */
-void
-setup()
-{
- /* Capture unexpected signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* Make a temp dir and cd to it */
- tst_tmpdir();
-
- /* Create a testfile under temporary directory */
- if ((fildes = open(TEST_FILE, O_RDWR|O_CREAT, 0666)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, 0666) failed, errno=%d : %s",
- TEST_FILE, errno, strerror(errno));
- }
-
- if (close(fildes) == -1) {
- tst_brkm(TBROK, cleanup,
- "close(%s) Failed, errno=%d : %s",
- TEST_FILE, errno, strerror(errno));
- }
-} /* End of setup */
-
-/*
- * void
- * cleanup() - Performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Print test timing stats and errno log if test executed with options.
- * Close the testfile if still opened.
- * Remove temporary directory and sub-directories/files under it
- * created during setup().
- * Exit the test program with normal exit code.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove files and temporary directory created */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/fstat04.c b/winsup/testsuite/winsup.api/ltp/fstat04.c
deleted file mode 100644
index 1de507e..0000000
--- a/winsup/testsuite/winsup.api/ltp/fstat04.c
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: fstat01
- *
- * Test Description:
- * Verify that, fstat(2) succeeds to get the status of a file pointed by
- * file descriptor and fills the stat structure elements.
- *
- * Expected Result:
- * fstat() should return value 0 on success and the stat structure should
- * be filled with specified 'file' information.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.
- *
- * Usage: <for command-line>
- * fstat01 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * This test should be run by 'non-super-user' only.
- *
- */
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define FILE_MODE 0644
-#define TESTFILE "testfile"
-#define FILE_SIZE 1024
-#define BUF_SIZE 256
-#define MASK 0777
-
-const char *TCID="fstat01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-uid_t User_id; /* user id/group id of test process */
-gid_t Group_id;
-int fildes; /* File descriptor of testfile */
-
-void setup(); /* Setup function for the test */
-void cleanup() __attribute__((noreturn));/* Cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- struct stat stat_buf; /* stat structure buffer */
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /* Perform global setup for test */
- setup();
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count = 0;
-
- /*
- * Call fstat(2) to get the status of
- * specified 'file' pointed to 'fd'
- * into stat structure.
- */
- TEST(fstat(fildes, &stat_buf));
-
- /* check return code of fstat(2) */
- if (TEST_RETURN == -1) {
- tst_resm(TFAIL,
- "fstat on %s Failed, errno=%d : %s",
- TESTFILE, TEST_ERRNO, strerror(TEST_ERRNO));
- continue;
- }
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- /*
- * Verify the data returned by fstat(2)
- * aganist the expected data.
- */
- if ((stat_buf.st_uid != User_id) ||
- (stat_buf.st_gid != Group_id) ||
- (stat_buf.st_size != FILE_SIZE) ||
- ((stat_buf.st_mode & MASK) != FILE_MODE)) {
- tst_resm(TFAIL, "Functionality of fstat(2) on "
- "'%s' Failed", TESTFILE);
- } else {
- tst_resm(TPASS, "Functionality of fstat(2) on "
- "'%s' Succcessful", TESTFILE);
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * void
- * setup() - Performs setup function for the test.
- * Creat a temporary directory and chdir to it.
- * Creat a test file and write some data into it.
- * Get the user/group id info. of test process.
- */
-void
-setup()
-{
- int i; /* counter */
- char tst_buff[BUF_SIZE]; /* data buffer */
- int wbytes; /* no. of bytes written */
- int write_len = 0; /* data length */
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Check that the test process id is not super/root */
- if (geteuid() == 0) {
- tst_brkm(TBROK, NULL, "Must be non-super/root for this test!");
- tst_exit();
- }
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- if ((fildes = open(TESTFILE, O_RDWR|O_CREAT, FILE_MODE)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, %#o) Failed, errno=%d : %s",
- TESTFILE, FILE_MODE, errno, strerror(errno));
- }
-
- /* Fill the test buffer with the known data */
- for (i = 0; i < BUF_SIZE; i++) {
- tst_buff[i] = 'a';
- }
-
- /* Write to the file 1k data from the buffer */
- while (write_len < FILE_SIZE) {
- if ((wbytes = write(fildes, tst_buff, sizeof(tst_buff))) <= 0) {
- tst_brkm(TBROK, cleanup,
- "write(2) on %s Failed, errno=%d : %s",
- TESTFILE, errno, strerror(errno));
- } else {
- write_len += wbytes;
- }
- }
-
- /* Get the uid/gid of the process */
- User_id = getuid();
- Group_id = getgid();
-
-} /* End setup() */
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Close the testfile opened for reading/writing.
- * Delete the testfile and temporary directory.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Close the test file */
- if (close(fildes) == -1) {
- tst_brkm(TFAIL, NULL, "close(%s) Failed, errno=%d : %s",
- TESTFILE, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/fsync01.c b/winsup/testsuite/winsup.api/ltp/fsync01.c
deleted file mode 100644
index 261ea0d..0000000
--- a/winsup/testsuite/winsup.api/ltp/fsync01.c
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : fsync01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for fsync(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) fsync(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the fsync(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * fsync(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/statfs.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="fsync01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char fname[255];
-int fd;
-const char *buf = "davef";
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /* write sone data to get fsync'd out */
- if (write(fd, &buf, strlen(buf)) == -1) {
- tst_brkm(TBROK, cleanup,
- "write(%s, &buf, strlen(buf)) Failed, errno=%d : %s",
- fname, TEST_ERRNO, strerror(TEST_ERRNO));
- }
- /*
- * Call fsync(2)
- */
- TEST(fsync(fd));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "fsync(%s) Failed, errno=%d : %s", fname,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "fsync(%s) returned %d", fname, TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(fname,"tfile_%d",getpid());
- if ((fd = open(fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* close the file we have open */
- if (close(fd) == -1) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s", fname, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/ftruncate01.c b/winsup/testsuite/winsup.api/ltp/ftruncate01.c
deleted file mode 100644
index a45c167..0000000
--- a/winsup/testsuite/winsup.api/ltp/ftruncate01.c
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: ftruncate01
- *
- * Test Description:
- * Verify that, ftruncate(2) succeeds to truncate a file to a specified
- * length if the file indicated by file descriptor opened for writing.
- *
- * Expected Result:
- * ftruncate(2) should return a value 0 and the length of the file after
- * truncation should be equal to the length it is truncated to.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.
- *
- * Usage: <for command-line>
- * ftruncate01 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * This test should be run by 'non-super-user' only.
- *
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define TESTFILE "testfile" /* file under test */
-#define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
-#define BUF_SIZE 256 /* buffer size */
-#define FILE_SIZE 1024 /* test file size */
-#define TRUNC_LEN 256 /* truncation length */
-
-const char *TCID="ftruncate01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test conditions */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int fildes; /* file descriptor for test file */
-
-void setup(); /* setup function for the test */
-void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- struct stat stat_buf; /* stat(2) struct contents */
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- off_t file_length; /* test file length */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /* Perform global setup for test */
- setup();
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count = 0;
-
- /*
- * Call ftruncate(2) to truncate a test file to a
- * specified length.
- */
- TEST(ftruncate(fildes, TRUNC_LEN));
-
- /* check return code of ftruncate(2) */
- if (TEST_RETURN == -1) {
- tst_resm(TFAIL,
- "ftruncate() of %s Failed, errno=%d : %s",
- TESTFILE, TEST_ERRNO,
- strerror(TEST_ERRNO));
- continue;
- }
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- /*
- * Get the testfile information using
- * fstat(2).
- */
- if (fstat(fildes, &stat_buf) < 0) {
- tst_brkm(TFAIL, cleanup,
- "stat(2) of %s failed, error:%d",
- TESTFILE, errno);
- }
- stat_buf.st_mode &= ~S_IFREG;
- file_length = stat_buf.st_size;
-
- /*
- * Check for expected size of testfile after
- * truncate(2) on it.
- */
- if (file_length != TRUNC_LEN) {
- tst_resm(TFAIL, "%s: Incorrect file size %d, "
- "Expected %d", TESTFILE, file_length,
- TRUNC_LEN);
- } else {
- tst_resm(TPASS, "Functionality of ftruncate() "
- "on %s successful", TESTFILE);
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * void
- * setup() - performs all ONE TIME setup for this test.
- * Create a temporary directory and change directory to it.
- * Create a test file under temporary directory and write some
- * data into it.
- */
-void
-setup()
-{
- int i; /* counter for for loop() */
- int c, c_total = 0; /* bytes to be written to file */
- char tst_buff[BUF_SIZE]; /* buffer to hold data */
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Fill the test buffer with the known data */
- for (i = 0; i < BUF_SIZE; i++) {
- tst_buff[i] = 'a';
- }
-
- /* open a file for reading/writing */
- if ((fildes = open(TESTFILE, O_RDWR|O_CREAT, FILE_MODE)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, %o) Failed, errno=%d : %s",
- TESTFILE, FILE_MODE, errno, strerror(errno));
- }
-
- /* Write to the file 1k data from the buffer */
- while (c_total < FILE_SIZE) {
- if ((c = write(fildes, tst_buff, sizeof(tst_buff))) <= 0) {
- tst_brkm(TBROK, cleanup,
- "write(2) on %s Failed, errno=%d : %s",
- TESTFILE, errno, strerror(errno));
- } else {
- c_total += c;
- }
- }
-} /* End setup() */
-
-/*
- * void
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Close the temporary file.
- * Remove the test directory and testfile created in the setup.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Close the testfile after writing data into it */
- if (close(fildes) == -1) {
- tst_brkm(TFAIL, NULL,
- "close(%s) Failed, errno=%d : %s",
- TESTFILE, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/ftruncate02.c b/winsup/testsuite/winsup.api/ltp/ftruncate02.c
deleted file mode 100644
index 2b4e723..0000000
--- a/winsup/testsuite/winsup.api/ltp/ftruncate02.c
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: ftruncate02
- *
- * Test Description:
- * Verify that, ftruncate(2) succeeds to truncate a file to a certain length,
- * but the attempt to read past the truncated length will fail.
- *
- * Expected Result:
- * ftruncate(2) should return a value 0 and the attempt to read past the
- * truncated length will fail. In case where the file before truncation was
- * shorter, the bytes between the old and new should be all zeroes.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.
- *
- * Usage: <for command-line>
- * ftruncate02 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * This test should be run by 'non-super-user' only.
- *
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define TESTFILE "testfile" /* file under test */
-#define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
-#define BUF_SIZE 256 /* buffer size */
-#define FILE_SIZE 1024 /* test file size */
-#define TRUNC_LEN1 256 /* truncation length */
-#define TRUNC_LEN2 512 /* truncation length */
-
-const char *TCID="ftruncate02"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test conditions */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int fd; /* file descriptor of testfile */
-char tst_buff[BUF_SIZE]; /* buffer to hold testfile contents */
-
-void setup(); /* setup function for the test */
-void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- struct stat stat_buf; /* stat(2) struct contents */
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- off_t file_length2; /* test file length */
- off_t file_length1; /* test file length */
- int rbytes, i; /* bytes read from testfile */
- int read_len = 0; /* total no. of bytes read from testfile */
- int err_flag = 0; /* error indicator flag */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /* Perform global setup for test */
- setup();
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count = 0;
-
- /*
- * Call ftruncate(2) to truncate a test file to a
- * specified length (TRUNC_LEN1).
- */
- TEST(ftruncate(fd, TRUNC_LEN1));
-
- /* check return code of ftruncate(2) */
- if (TEST_RETURN == -1) {
- tst_resm(TFAIL, "ftruncate of %s to size %d Failed, "
- "errno=%d : %s", TESTFILE, TRUNC_LEN1,
- TEST_ERRNO, strerror(TEST_ERRNO));
- continue;
- }
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- /*
- * Get the testfile information using
- * fstat(2).
- */
- if (fstat(fd, &stat_buf) < 0) {
- tst_brkm(TFAIL, cleanup, "fstat(2) of %s failed"
- " after 1st truncate, error:%d",
- TESTFILE, errno);
- }
- stat_buf.st_mode &= ~S_IFREG;
- file_length1 = stat_buf.st_size;
-
- /*
- * Set the file pointer of testfile to the
- * beginning of the file.
- */
- if (lseek(fd, 0, SEEK_SET) < 0) {
- tst_brkm(TFAIL, cleanup, "lseek(2) on %s failed"
- " after 1st ftruncate, error:%d",
- TESTFILE, errno);
- }
-
- /* Read the testfile from the beginning. */
- while ((rbytes = read(fd, tst_buff,
- sizeof(tst_buff))) > 0) {
- read_len += rbytes;
- }
-
- /*
- * Execute ftruncate(2) again to truncate
- * testfile to a size TRUNC_LEN2.
- */
- TEST(ftruncate(fd, TRUNC_LEN2));
-
- /* check return code of ftruncate(2) */
- if (TEST_RETURN == -1) {
- tst_resm(TFAIL, "ftruncate of %s to size %d "
- "Failed, errno=%d : %s", TESTFILE,
- TRUNC_LEN2, TEST_ERRNO,
- strerror(TEST_ERRNO));
- continue;
- }
-
- /*
- * Get the testfile information using
- * fstat(2)
- */
- if (fstat(fd, &stat_buf) < 0) {
- tst_brkm(TFAIL, cleanup, "fstat(2) of %s failed"
- " after 2nd truncate, error:%d",
- TESTFILE, errno);
- }
- stat_buf.st_mode &= ~S_IFREG;
- file_length2 = stat_buf.st_size;
-
- /*
- * Set the file pointer of testfile to the
- * offset TRUNC_LEN1 of testfile.
- */
- if (lseek(fd, TRUNC_LEN1, SEEK_SET) < 0) {
- tst_brkm(TFAIL, cleanup, "lseek(2) on %s failed"
- " after 2nd ftruncate, error:%d",
- TESTFILE, errno);
- }
-
- /* Read the testfile contents till EOF */
- while((rbytes = read(fd, tst_buff,
- sizeof(tst_buff))) > 0) {
- for (i = 0; i < rbytes; i++) {
- if (tst_buff[i] != 0) {
- err_flag++;
- }
- }
- }
-
- /*
- * Check for expected size of testfile after
- * issuing ftruncate(2) on it.
- */
- if ((file_length1 != TRUNC_LEN1) ||
- (file_length2 != TRUNC_LEN2) ||
- (read_len != TRUNC_LEN1) ||
- (err_flag != 0)) {
- tst_resm(TFAIL, "Functionality of ftruncate(2) "
- "on %s Failed", TESTFILE);
- } else {
- tst_resm(TPASS, "Functionality of ftruncate(2) "
- "on %s successful", TESTFILE);
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * void
- * setup() - performs all ONE TIME setup for this test.
- * Create a temporary directory and change directory to it.
- * Create a test file under temporary directory and write some
- * data into it.
- */
-void
-setup()
-{
- int i; /* counter variable */
- int wbytes; /* bytes written to testfile */
- int write_len = 0; /* total no. of bytes written to testfile */
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Fill the test buffer with the known data */
- for (i = 0; i < BUF_SIZE; i++) {
- tst_buff[i] = 'a';
- }
- /* open a file for reading/writing */
- if ((fd = open(TESTFILE, O_RDWR|O_CREAT, FILE_MODE)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, %o) Failed, errno=%d : %s",
- TESTFILE, FILE_MODE, errno, strerror(errno));
- }
-
- /* Write to the file 1k data from the buffer */
- while (write_len < FILE_SIZE) {
- if ((wbytes = write(fd, tst_buff, sizeof(tst_buff))) <= 0) {
- tst_brkm(TBROK, cleanup,
- "write(2) on %s Failed, errno=%d : %s",
- TESTFILE, errno, strerror(errno));
- } else {
- write_len += wbytes;
- }
- }
-} /* End setup() */
-
-/*
- * void
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Close the testfile.
- * Remove the test directory and testfile created in the setup.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Close the testfile after writing data into it */
- if (close(fd) == -1) {
- tst_brkm(TFAIL, NULL, "close(%s) Failed, errno=%d : %s",
- TESTFILE, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/ftruncate03.c b/winsup/testsuite/winsup.api/ltp/ftruncate03.c
deleted file mode 100644
index 279b4e8..0000000
--- a/winsup/testsuite/winsup.api/ltp/ftruncate03.c
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: ftruncate03
- *
- * Test Description:
- * Verify that,
- * 1) ftruncate(2) returns -1 and sets errno to EINVAL if the specified
- * truncate length is less than 0.
- * 2) ftruncate(2) returns -1 and sets errno to EBADF if the file descriptor
- * of the specified file is not valid.
- *
- * Expected Result:
- * ftruncate() should fail with return value -1 and set expected errno.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * if errno set == expected errno
- * Issue sys call fails with expected return value and errno.
- * Otherwise,
- * Issue sys call fails with unexpected errno.
- * Otherwise,
- * Issue sys call returns unexpected value.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory(s)/file(s) created.
- *
- * Usage: <for command-line>
- * ftruncate03 [-c n] [-e] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * This test should be executed by 'non-super-user' only.
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define TEST_FILE1 "test_file1" /* file under test */
-#define TEST_FILE2 "test_file2" /* file under test */
-#define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
-#define BUF_SIZE 256 /* buffer size */
-#define FILE_SIZE 1024 /* test file size */
-
-int no_setup();
-int setup1(); /* setup function to test chmod for EBADF */
-int setup2(); /* setup function to test chmod for EINVAL */
-
-int fd1; /* File descriptor for testfile1 */
-int fd2; /* File descriptor for testfile2 */
-
-struct test_case_t { /* test case struct. to hold ref. test cond's*/
- int fd;
- const char *desc;
- int exp_errno;
- int len;
- int (*setupfunc)();
-} Test_cases[] = {
- { 1, "Length argument is -ve", EINVAL, -1, setup1 },
- { 2, "File descriptor is not valid", EBADF, 256, setup2 },
- { 0, NULL, 0, 0, no_setup }
-};
-
-const char *TCID="ftruncate03"; /* Test program identifier. */
-int TST_TOTAL=2; /* Total number of test conditions */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int exp_enos[]={EINVAL, EBADF, 0};
-
-void setup(); /* Main setup function for the test */
-void cleanup(void) __attribute__((noreturn)); /* Main cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- const char *test_desc; /* test specific error message */
- int fildes; /* File descriptor of testfile */
- off_t trunc_len; /* truncate length */
- int ind;
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /*
- * Perform global setup for test to call individual test specific
- * setup functions.
- */
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count = 0;
-
- for (ind = 0; Test_cases[ind].desc != NULL; ind++) {
- fildes = Test_cases[ind].fd;
- test_desc = Test_cases[ind].desc;
- trunc_len = Test_cases[ind].len;
-
- if (fildes == 1) {
- fildes = fd1;
- } else {
- fildes = fd2;
- }
-
- /*
- * Call ftruncate(2) to test different test conditions.
- * verify that it fails with return code -1 and sets
- * appropriate errno.
- */
- TEST(ftruncate(fildes, trunc_len));
-
- /* check return code of ftruncate(2) */
- if (TEST_RETURN == -1) {
- TEST_ERROR_LOG(TEST_ERRNO);
- if (TEST_ERRNO == Test_cases[ind].exp_errno) {
- tst_resm(TPASS, "ftruncate() fails, %s,"
- " errno=%d", test_desc,
- TEST_ERRNO);
- } else {
- tst_resm(TFAIL, "ftruncate() fails, %s,"
- " errno=%d, expected errno:%d",
- test_desc, TEST_ERRNO,
- Test_cases[ind].exp_errno);
- }
- } else {
- tst_resm(TFAIL, "ftruncate() returned %d, "
- "expected -1, errno:%d", TEST_RETURN,
- Test_cases[ind].exp_errno);
- }
- } /* End of TEST CASE LOOPING. */
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * void
- * setup() - performs all ONE TIME setup for this test.
- * Create a temporary directory and change directory to it.
- * Fill the test buffer with some date used to fill test file(s).
- * Call individual test specific setup functions.
- */
-void
-setup()
-{
- int ind;
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Check that the test process id is not root/super-user */
- if (geteuid() == 0) {
- tst_brkm(TBROK, NULL, "Must be non-root/super for this test!");
- tst_exit();
- }
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* call individual setup functions */
- for (ind = 0; Test_cases[ind].desc != NULL; ind++) {
- Test_cases[ind].setupfunc();
- }
-} /* End of setup */
-
-/*
- * int
- * setup1() - setup function for a test condition for which ftruncate(2)
- * returns -1 and sets errno to EINVAL.
- * Create a test file and open it for writing only.
- */
-int
-setup1()
-{
- /* Open the testfile in write-only mode */
- if ((fd1 = open(TEST_FILE1, O_WRONLY|O_CREAT, 0644)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_WRONLY) Failed, errno=%d : %s",
- TEST_FILE1, errno, strerror(errno));
- }
- return 0;
-} /* End setup1() */
-
-/*
- * int
- * setup2() - setup function for a test condition for which ftruncate(2)
- * returns -1 and sets errno to EBADF.
- * Create a test file and open it for reading/writing, and fill the
- * testfile with the contents of test buffer.
- * Close the test file.
- *
- */
-int
-setup2()
-{
- int c, i, c_total = 0;
- char tst_buff[BUF_SIZE]; /* buffer to hold testfile contents */
-
- /* Fill the test buffer with the known data */
- for (i = 0; i < BUF_SIZE; i++) {
- tst_buff[i] = 'a';
- }
-
- /* open a testfile for reading/writing */
- if ((fd2 = open(TEST_FILE2, O_RDWR|O_CREAT, FILE_MODE)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, %o) Failed, errno=%d : %s",
- TEST_FILE2, FILE_MODE, errno, strerror(errno));
- }
-
- /* Write to the file 1k data from the buffer */
- while (c_total < FILE_SIZE) {
- if ((c = write(fd2, tst_buff, sizeof(tst_buff))) <= 0) {
- tst_brkm(TBROK, cleanup,
- "write(2) on %s Failed, errno=%d : %s",
- TEST_FILE2, errno, strerror(errno));
- } else {
- c_total += c;
- }
- }
-
- /* Close the testfile after writing data into it */
- if (close(fd2) == -1) {
- tst_brkm(TBROK, cleanup,
- "close(%s) Failed, errno=%d : %s",
- TEST_FILE2, errno, strerror(errno));
- }
- return 0;
-} /* End of setup2 */
-
-/*
- * int
- * no_setup() - This function just returns 0.
- */
-int
-no_setup()
-{
- return 0;
-}
-
-/*
- * void
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Close the temporary file.
- * Remove the test directory and testfile created in the setup.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Close the testfile after opening it read-only in setup1 */
- if (close(fd1) == -1) {
- tst_brkm(TFAIL, NULL,
- "close(%s) Failed, errno=%d : %s",
- TEST_FILE1, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/getegid01.c b/winsup/testsuite/winsup.api/ltp/getegid01.c
deleted file mode 100644
index 9422010..0000000
--- a/winsup/testsuite/winsup.api/ltp/getegid01.c
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : getegid01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for getegid(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) getegid(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the getegid(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * getegid(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-
-#include <sys/types.h>
-
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="getegid01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0}; /* must be a 0 terminated list */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- ;
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
-
- /*
- * TEST CASE:
- * Get effective group id.
- */
- ;
-
- /* Call getegid(2) */
- TEST(getegid( ));
-
- /* check return code */
- if ( TEST_RETURN < 0 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "getegid - Get effective group id. failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- continue; /* next loop for MTKERNEL */
- }
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "getegid - Get effective group id. returned %d", TEST_RETURN);
- }
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/geteuid01.c b/winsup/testsuite/winsup.api/ltp/geteuid01.c
deleted file mode 100644
index 82a681e..0000000
--- a/winsup/testsuite/winsup.api/ltp/geteuid01.c
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : geteuid01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for geteuid(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) geteuid(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the geteuid(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * geteuid(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-
-#include <sys/types.h>
-
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="geteuid01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0}; /* must be a 0 terminated list */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- ;
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
-
- /*
- * TEST CASE:
- * Get effective user id.
- */
- ;
-
- /* Call geteuid(2) */
- TEST(geteuid( ));
-
- /* check return code */
- if ( TEST_RETURN < 0 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "geteuid - Get effective user id. failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- continue; /* next loop for MTKERNEL */
- }
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "geteuid - Get effective user id. returned %d", TEST_RETURN);
- }
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/getgid01.c b/winsup/testsuite/winsup.api/ltp/getgid01.c
deleted file mode 100644
index e5b138c..0000000
--- a/winsup/testsuite/winsup.api/ltp/getgid01.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : getgid01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for getgid(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) getgid(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the getgid(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * getgid(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="getgid01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call getgid(2)
- */
- TEST(getgid());
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "getgid() Failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "getgid() returned %d", TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/getgid02.c b/winsup/testsuite/winsup.api/ltp/getgid02.c
deleted file mode 100644
index 5efbda5..0000000
--- a/winsup/testsuite/winsup.api/ltp/getgid02.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * getgid02.c
- *
- * DESCRIPTION
- * Testcase to check the basic functionality of getegid().
- *
- * ALGORITHM
- * call setup
- * loop if that option was specified
- * Execute getegid() call using TEST macro
- * if not expected value
- * break remaining tests and cleanup
- * if STD_FUNCTIONAL_TEST
- * Execute geteuid() call
- * Execute getpwduid() call
- * if the passwd entry is NULL
- * break the remaining tests and cleanup
- * else if pwent->pw_gid != TEST_RETURN
- * print failure message
- * else
- * print pass message
- * else
- * print pass message
- * call cleanup
- *
- * USAGE: <for command-line>
- * getgid02 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * none
- */
-
-#include <pwd.h>
-#include <errno.h>
-
-#include "test.h"
-#include "usctest.h"
-
-void cleanup(void) __attribute__((noreturn));
-void setup(void);
-
-const char *TCID= "getgid02";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- int euid;
- struct passwd *pwent;
-
- /* parse standard options */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- setup(); /* global setup */
-
- /* The following loop checks looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
- TEST(getegid());
-
- if (TEST_RETURN < 0) {
- tst_brkm(TBROK, cleanup, "This should never happen");
- }
-
- if (STD_FUNCTIONAL_TEST) {
- euid = geteuid();
-
- pwent = getpwuid(euid);
-
- if (pwent == NULL) {
- tst_brkm(TBROK, cleanup, "geteuid() returned "
- "unexpected value %d", euid);
- } else {
- if (pwent->pw_gid != TEST_RETURN) {
- tst_resm(TFAIL, "getegid() return value"
- " %d unexpected - expected %d",
- TEST_RETURN, pwent->pw_gid);
- } else {
- tst_resm(TPASS, "effective group id %d "
- "is correct", TEST_RETURN);
- }
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-
-/*
- * setup() - performs all ONE TIME setup for this test
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-}
-
-/*
- * cleanup() - performs all the ONE TIME cleanup for this test at completion
- * or premature exit.
- */
-void
-cleanup()
-{
- /*
- * print timing status if that option was specified.
- * print errno log if that option was specified
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/getgid03.c b/winsup/testsuite/winsup.api/ltp/getgid03.c
deleted file mode 100644
index ef0eaea..0000000
--- a/winsup/testsuite/winsup.api/ltp/getgid03.c
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * getgid01.c
- *
- * DESCRIPTION
- * Testcase to check the basic functionality of getgid().
- *
- * ALGORITHM
- * call setup
- * loop if that option was specified
- * Execute getgid() call using TEST macro
- * if not expected value
- * break remaining tests and cleanup
- * if STD_FUNCTIONAL_TEST
- * Execute getuid() call
- * Execute getpwduid() call
- * if the passwd entry is NULL
- * break the remaining tests and cleanup
- * else if pwent->pw_gid != TEST_RETURN
- * print failure message
- * else
- * print pass message
- * else
- * print pass message
- * call cleanup
- *
- * USAGE: <for command-line>
- * getgid01 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * none
- */
-
-#include <pwd.h>
-#include <errno.h>
-
-#include "test.h"
-#include "usctest.h"
-
-void cleanup(void) __attribute__((noreturn));
-void setup(void);
-
-const char *TCID= "getgid01";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- int uid;
- struct passwd *pwent;
-
- /* parse standard options */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- setup(); /* global setup */
-
- /* The following loop checks looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
- TEST(getgid());
-
- if (TEST_RETURN < 0) {
- tst_brkm(TBROK, cleanup, "This should never happen");
- }
-
- if (STD_FUNCTIONAL_TEST) {
- uid = getuid();
- pwent = getpwuid(uid);
-
- if (pwent == NULL) {
- tst_brkm(TBROK, cleanup, "getuid() returned "
- "unexpected value %d", uid);
- } else {
- if (pwent->pw_gid != TEST_RETURN) {
- tst_resm(TFAIL, "getgid() return value "
- "%d unexpected - expected %d",
- TEST_RETURN, pwent->pw_gid);
- } else {
- tst_resm(TPASS, "group id %d returned "
- "correctly", TEST_RETURN);
- }
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-
-/*
- * setup() - performs all ONE TIME setup for this test
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-}
-
-/*
- * cleanup() - performs all the ONE TIME cleanup for this test at completion
- * or premature exit.
- */
-void
-cleanup()
-{
- /*
- * print timing status if that option was specified.
- * print errno log if that option was specified
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/getgroups01.c b/winsup/testsuite/winsup.api/ltp/getgroups01.c
deleted file mode 100644
index db9f942..0000000
--- a/winsup/testsuite/winsup.api/ltp/getgroups01.c
+++ /dev/null
@@ -1,314 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/***********************************************************************
-TEST IDENTIFIER: getgroups01 : Getgroups system call critical test
-
-PARENT DOCUMENT: ggrtds01: Getgroups system call test design spec
-
-AUTHOR: Barrie Kletscher
- Rewrote : 11-92 by Richard Logan
-
-CO-PILOT: Dave Baumgartner
-
-TEST ITEMS:
- 1. Check to see if getgroups(-1, gidset) fails and sets errno to EINVAL
- 2. Check to see if getgroups(0, gidset) does not return -1 and gidset is
- not modified.
- 3. Check to see if getgroups(x, gigset) fails and sets errno to EINVAL,
- where x is one less then what is returned by getgroups(0, gidset).
- 4. Check to see if getgroups() succeeds and gidset contains
- group id returned from getgid().
-
-INPUT SPECIFICATIONS:
- NONE
-
-OUTPUT SPECIFICATIONS:
- Standard tst_res output format
-
-ENVIRONMENTAL NEEDS:
- NONE.
-
-SPECIAL PROCEDURAL REQUIREMENTS:
- None
-
-INTERCASE DEPENDENCIES:
- Test case #3 depends on test case #2.
-
-DETAILED DESCRIPTION:
- Set up the signal handling capabilities.
- execute tests
- exit
-
-BUGS:
- None known.
-
-************************************************************/
-
-#include <signal.h>
-#include <string.h>
-#include <errno.h>
-#include <sys/param.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-const char *TCID="getgroups01"; /* Test program identifier. */
-int TST_TOTAL=4; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-/***********************************************************************
- * MAIN
- ***********************************************************************/
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *ptr; /* message returned from parse_opts */
-
- int i, /* counter */
- group, /* return value from Getgid() call */
- entries; /* number of group entries */
-
- gid_t gidset[NGROUPS]; /* storage for all group ids */
- gid_t cmpset[NGROUPS];
- int ret;
- int ret2;
- int errors = 0;
- char msg[500];
-
- /***************************************************************
- * parse standard options, and exit if there is an error
- ***************************************************************/
- if ( (ptr=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", ptr);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
-
- /*
- * Check to see if getgroups() fails on erraneous condition.
- */
- TEST( getgroups(-1,gidset) );
-
- if((ret=TEST_RETURN) != -1) {
- sprintf(msg,
- "getgroups(-1,gidset) returned %d, expected -1 and errno = EINVAL",
- ret);
- tst_resm(TFAIL,msg);
- errors++;
- }
- else if ( STD_FUNCTIONAL_TEST ) {
- if(errno != EINVAL) {
- sprintf(msg,
- "getgroups(-1,gidset) returned %d, errno = %d, expected errno %d (EINVAL)",
- ret, errno, EINVAL);
- tst_resm(TFAIL,msg);
- errors++;
- }
- else {
- sprintf(msg,
- "getgroups(-1,gidset) returned %d and error = %d (EINVAL) as expected",
- ret, errno);
- tst_resm(TPASS, msg);
- }
- }
-
- /*
- * Check that if ngrps is zero that the number of groups is return and
- * the the gidset array is not modified.
- * This is a POSIX special case.
- */
-
- memset(gidset, 052, NGROUPS);
- memset(cmpset, 052, NGROUPS);
-
- TEST( getgroups(0,gidset) );
- if((ret=TEST_RETURN) < 0) {
- sprintf(msg,
- "getgroups(0,gidset) returned %d with errno = %d, expected num gids with no change to gidset",
- ret, errno);
- tst_resm(TFAIL,msg);
- errors++;
- }
- else if ( STD_FUNCTIONAL_TEST ) {
- /*
- * check that gidset was unchanged
- */
- if ( memcmp(cmpset, gidset, NGROUPS) != 0 ) {
- sprintf(msg,
- "getgroups(0,gidset) returned %d, the gidset array was modified",
- ret);
- tst_resm(TFAIL,msg);
- errors++;
- }
- else {
- sprintf(msg,
- "getgroups(0,gidset) returned %d, the gidset array not was modified",
- ret);
- tst_resm(TPASS, msg);
- }
- }
-
- /*
- * Check to see that is -1 is returned and errno is set to EINVAL when
- * ngroups is not big enough to hold all groups.
- */
-
- if ( ret <= 1 ) {
- sprintf(msg, "getgroups(0,gidset) returned %d, Unable to test that\nusing ngrps >=1 but less than number of grps", ret);
- tst_resm(TCONF, msg);
- errors++;
- }
- else {
- TEST( getgroups(ret-1, gidset) );
- if ((ret2 = TEST_RETURN) == -1 ) {
- if ( STD_FUNCTIONAL_TEST ) {
- if ( errno != EINVAL ) {
- sprintf(msg,
- "getgroups(%d, gidset) returned -1, but not errno %d (EINVAL) but %d",
- ret-1, EINVAL, errno);
- tst_resm(TFAIL, msg);
- errors++;
- }
- else {
- sprintf(msg,
- "getgroups(%d, gidset) returned -1, and errno %d (EINVAL) when %d grps",
- ret-1, errno, ret);
- tst_resm(TPASS, msg);
- }
- }
- }
- else {
- sprintf(msg,
- "getgroups(%d, gidset) returned %d, expected -1 and errno EINVAL.",
- ret-1, ret2);
- tst_resm(TFAIL, msg);
- errors++;
- }
- }
-
- /*
- * Check to see if getgroups() succeeds and contains getgid's gid.
- */
-
- TEST( getgroups(NGROUPS,gidset) );
- if((entries = TEST_RETURN) == -1) {
- sprintf(msg, "getgroups(NGROUPS,gidset) returned -1 and errno = %d", errno);
- tst_resm(TFAIL, msg);
- errors++;
- }
- else if ( STD_FUNCTIONAL_TEST ) {
-
- /*
- * Check to see if getgroups() contains getgid().
- */
-
- group = getgid();
-
- for(i = 0; i < entries; i++)
- {
- if(gidset[i] == group)
- {
- sprintf(msg,
- "getgroups(NGROUPS,gidset) ret %d contains gid %d (from getgid)",
- entries, group);
- tst_resm(TPASS, msg);
- break;
- }
- }
-
- if( i == entries ) {
- sprintf(msg,
- "getgroups(NGROUPS,gidset) ret %d, does not contain gid %d (from getgid)",
- entries, group);
- tst_resm(TFAIL,msg);
- errors++;
- }
- }
-
- }
- cleanup();
-
- return 0;
-} /* end main() */
-
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-
-} /* End cleanup() */
-
diff --git a/winsup/testsuite/winsup.api/ltp/getgroups02.c b/winsup/testsuite/winsup.api/ltp/getgroups02.c
deleted file mode 100644
index e052589..0000000
--- a/winsup/testsuite/winsup.api/ltp/getgroups02.c
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : getgroups02
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for getgroups(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) getgroups(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the getgroups(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * getgroups(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="getgroups02"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-/* define array size for gids */
-#define GID_ARRAY_SIZE 100
-
-gid_t gidset[GID_ARRAY_SIZE]; /* array of gids */
-
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call getgroups(2)
- */
- TEST(getgroups(GID_ARRAY_SIZE, gidset));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "getgroups() Failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "getgroups() returned %d", TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/gethostid01.c b/winsup/testsuite/winsup.api/ltp/gethostid01.c
deleted file mode 100644
index ebb6d17..0000000
--- a/winsup/testsuite/winsup.api/ltp/gethostid01.c
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : gethostid01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for gethostid(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) gethostid(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the gethostid(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * gethostid(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="gethostid01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0}; /* must be a 0 terminated list */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- ;
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
-
- /*
- * TEST CASE:
- * Get host name
- */
- ;
-
- /* Call gethostid(2) */
- TEST(gethostid( ));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "gethostid - Get host name failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- continue; /* next loop for MTKERNEL */
- }
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "gethostid - Get host name returned %d", TEST_RETURN);
- }
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/gethostname01.c b/winsup/testsuite/winsup.api/ltp/gethostname01.c
deleted file mode 100644
index 0e765bf..0000000
--- a/winsup/testsuite/winsup.api/ltp/gethostname01.c
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : gethostname01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for gethostname(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) gethostname(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the gethostname(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * gethostname(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-
-
-
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="gethostname01";/* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0}; /* must be a 0 terminated list */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- char hname[100]; /* host name */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
-
- /*
- * TEST CASE:
- * Get host name
- */
- ;
-
- /* Call gethostname(2) */
- TEST(gethostname(hname, sizeof(hname) ));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "gethostname - Get host name failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- continue; /* next loop for MTKERNEL */
- }
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "gethostname - Get host name returned %d", TEST_RETURN);
- }
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/getpgid01.c b/winsup/testsuite/winsup.api/ltp/getpgid01.c
deleted file mode 100644
index 88907f4..0000000
--- a/winsup/testsuite/winsup.api/ltp/getpgid01.c
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * getpgid01.c
- *
- * DESCRIPTION
- * Testcase to check the basic functionality of getpgid().
- *
- * ALGORITHM
- * block1: Does getpgid(0), and checks for error.
- * block2: Does getpgid(getpid()) and checks for error.
- * block3: Does getpgid(getppid()) and checks for error.
- * block4: Verifies that getpgid(getpgid(0)) == getpgid(0).
- * block5: Does getpgid(1) and checks for error.
- *
- * USAGE
- * getpgid01
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * Expects that there are no EPERM limitations on getting the
- * process group ID from proc 1 (init).
- */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <sys/wait.h>
-#include <test.h>
-#include <usctest.h>
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-
-const char *TCID = "getpgid01";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned by parse_opts */
-
- register int pgid_0, pgid_1;
- register int my_pid, my_ppid;
- int ex_stat, fail = 0;
-
- /* parse standard options */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- }
-
- setup();
-
- /* check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
- if ((pgid_0 = fork()) < 0) {
- tst_brkm(TBROK, cleanup, "fork() failed");
- }
- if (pgid_0 > 0) { /* parent */
- /*
- * parent process waits for child to exit, and then
- * exits itself.
- */
- while ((pgid_0 = wait(&ex_stat)) > 0);
-
- if (WEXITSTATUS(ex_stat) == 0) {
- tst_resm(TINFO, "%s PASSED", TCID);
- } else {
- tst_resm(TINFO, "%s FAILED", TCID);
- }
-
- /* let the child carry on */
- exit(0);
- }
-
- /* child */
- tst_resm(TINFO, "Enter block 1");
- fail = 0;
- if ((pgid_0 = getpgid(0)) < 0) {
- perror("getpgid");
- tst_resm(TFAIL, "getpgid(0) failed");
- fail = 1;
- }
-
- if (fail) {
- tst_resm(TINFO, "Test block 1: getpgid(0) FAILED");
- } else {
- tst_resm(TPASS, "Test block 1: getpgid(0) PASSED");
- }
- tst_resm(TINFO, "Exit block 1");
-
- tst_resm(TINFO, "Enter block 2");
- fail = 0;
-
- my_pid = getpid();
- if ((pgid_1 = getpgid(my_pid)) < 0) {
- perror("getpgid");
- tst_resm(TFAIL, "getpgid(my_pid=%d) failed", my_pid);
- tst_exit();
- }
- if (pgid_0 != pgid_1) {
- tst_resm(TFAIL, "getpgid(my_pid=%d) != getpgid(0) "
- "[%d != %d]", my_pid, pgid_1, pgid_0);
- fail = 1;
- }
- if (fail) {
- tst_resm(TINFO, "Test block 2: getpgid(getpid()) "
- "FAILED");
- } else {
- tst_resm(TPASS, "Test blcok 2: getpgid(getpid()) "
- "PASSED");
- }
- tst_resm(TINFO, "Exit block 2");
-
- tst_resm(TINFO, "Enter block 3");
- fail = 0;
-
- my_ppid = getppid();
- if ((pgid_1 = getpgid(my_ppid)) < 0) {
- perror("getpgid");
- tst_resm(TFAIL, "getpgid(my_ppid=%d) failed",
- my_ppid);
- tst_exit();
- }
- if (pgid_0 != pgid_1) {
- tst_resm(TFAIL, "getpgid(my_ppid=%d) != getpgid(0) "
- "[%d != %d]", my_ppid, pgid_1, pgid_0);
- fail = 1;
- }
-
- if (fail) {
- tst_resm(TINFO, "Test block 3: getpgid(getppid()) "
- "FAILED");
- } else {
- tst_resm(TPASS, "Test block 3: getpgid(getppid()) "
- "PASSED");
- }
- tst_resm(TINFO, "Exit block 3");
-
- tst_resm(TINFO, "Enter block 4");
- fail = 0;
-
- if ((pgid_1 = getpgid(pgid_0)) < 0) {
- perror("getpgid");
- tst_resm(TFAIL, "getpgid(my_pgid=%d) failed", pgid_0);
- tst_exit();
- }
- if (pgid_0 != pgid_1) {
- tst_resm(TFAIL, "getpgid(my_pgid=%d) != getpgid(0) "
- "[%d != %d]", pgid_0, pgid_1, pgid_0);
- fail = 1;
- }
-
- if (fail) {
- tst_resm(TINFO, "Test block 4: getpgid(1) FAILED");
- } else {
- tst_resm(TPASS, "Test block 4: getpgid(1) PASSED");
- }
- tst_resm(TINFO, "Exit block 4");
-#ifndef __CYGWIN__
-block5:
- tst_resm(TINFO, "Enter block 5");
- fail = 0;
-
- if (getpgid(1) < 0) {
- perror("getpgid");
- tst_resm(TFAIL, "getpgid(1) failed");
- fail = 1;
- }
-
- if (fail) {
- tst_resm(TINFO, "Test block 5: getpgid(1) FAILED");
- } else {
- tst_resm(TPASS, "Test block 5: getpgid(1) PASSED");
- }
- tst_resm(TINFO, "Exit block 5");
-#endif
- }
- cleanup();
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-}
-
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
-
diff --git a/winsup/testsuite/winsup.api/ltp/getpgid02.c b/winsup/testsuite/winsup.api/ltp/getpgid02.c
deleted file mode 100644
index f6eaec6..0000000
--- a/winsup/testsuite/winsup.api/ltp/getpgid02.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * getpgid02.c
- *
- * DESCRIPTION
- * Testcase to check the basic functionality of getpgid().
- *
- * ALGORITHM
- * test 1: Does getpgid(-99) and expects ESRCH.
- * test 2: Searches an unused pid and expects ESRCH.
- *
- * USAGE: <for command-line>
- * getpgid02 [-c n] [-e] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * none
- */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <sys/wait.h>
-#include <test.h>
-#include <usctest.h>
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-
-const char *TCID = "getpgid01";
-int TST_TOTAL = 2;
-extern int Tst_count;
-
-int pgid_0, pgid_1;
-#define BADPID -99
-
-int exp_enos[]={ESRCH, 0};
-
-struct test_case_t {
- int *id;
- int error;
-} TC[] = {
- /* The pid value is negative */
- {&pgid_0, ESRCH},
-
- /* The pid value does not match any process */
- {&pgid_1, ESRCH}
-};
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- int i;
- const char *msg; /* message returned by parse_opts */
-
- /* parse standard options */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- }
-
- setup();
-
- /* set up the expected errnos */
- TEST_EXP_ENOS(exp_enos);
-
- /* check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
-
- /* loop through the test cases */
- for (i = 0; i < TST_TOTAL; i++) {
-
- TEST(getpgid(*TC[i].id));
-
- if (TEST_RETURN != -1) {
- tst_resm(TFAIL, "call succeeded unexpectedly");
- continue;
- }
-
- TEST_ERROR_LOG(TEST_ERRNO);
-
- if (TEST_ERRNO == TC[i].error) {
- tst_resm(TPASS, "expected failure - "
- "errno = %d : %s", TEST_ERRNO,
- strerror(TEST_ERRNO));
- } else {
- tst_resm(TFAIL, "unexpected error - %d : %s - "
- "expected %d", TEST_ERRNO,
- strerror(TEST_ERRNO), TC[i].error);
- }
- }
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- pgid_0 = BADPID;
-
- /*
- * Find a pid that isn't currently being used. Start
- * at 'our pid - 1' and go backwards until we find one.
- * In this way, we can be reasonably sure that the pid
- * we find won't be reused for a while as new pids are
- * allocated counting up to PID_MAX.
- */
- for (pgid_1 = getpid() - 1; --pgid_1 > 0; ) {
- if (kill(pgid_1, 0) < 0 && errno == ESRCH) {
- break;
- }
- }
-}
-
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
-
diff --git a/winsup/testsuite/winsup.api/ltp/getpgrp01.c b/winsup/testsuite/winsup.api/ltp/getpgrp01.c
deleted file mode 100644
index 6997be2..0000000
--- a/winsup/testsuite/winsup.api/ltp/getpgrp01.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : getpgrp01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for getpgrp(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) getpgrp(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the getpgrp(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * getpgrp(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="getpgrp01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call getpgrp(2)
- */
- TEST(getpgrp());
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "getpgrp() Failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "getpgrp() returned %d", TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/getpid01.c b/winsup/testsuite/winsup.api/ltp/getpid01.c
deleted file mode 100644
index df8197d..0000000
--- a/winsup/testsuite/winsup.api/ltp/getpid01.c
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : getpid01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for getpid(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) getpid(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the getpid(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * getpid(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="getpid01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call getpid(2)
- */
- TEST(getpid());
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "getpid() Failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "getpid() returned %d", TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/getpid02.c b/winsup/testsuite/winsup.api/ltp/getpid02.c
deleted file mode 100644
index 06d80b3..0000000
--- a/winsup/testsuite/winsup.api/ltp/getpid02.c
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: getpid01
- *
- * Test Description:
- * Verify that getpid() system call gets the process ID of the of the
- * calling process.
- *
- * Expected Result:
- * getpid() should return pid of the process on success.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- * Usage: <for command-line>
- * getpid01 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * None.
- */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/wait.h>
-
-#include "test.h"
-#include "usctest.h"
-
-void setup(); /* Main setup function of test */
-void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
-
-const char *TCID="getpid01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- pid_t proc_id; /* process id of the test process */
- pid_t pid; /* process id of the child process */
- pid_t pproc_id; /* parent process id */
- int status; /* exit status of child process */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /* Perform global setup for test */
- setup();
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Invoke getpid() to get the process id of
- * the test process.
- */
- TEST(getpid());
-
- /* Save the process id returned by getpid() */
- proc_id = TEST_RETURN;
-
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- /* Fork a child now */
- if ((pid = fork()) < 0) {
- tst_resm(TFAIL, "fork() failed to create child,"
- " error=%d", TEST_ERRNO);
- } else if (pid == 0) { /* Child process */
- /* Get the parent process id */
- pproc_id = getppid();
-
- /* Verify if the two process IDs match */
- if (pproc_id != proc_id) {
- exit(1);
- }
- exit(0);
- } else { /* parent process */
- wait(&status);
-
- /* Check exit status of child */
- if (WEXITSTATUS(status) != 0) {
- tst_resm(TFAIL, "getpid() returned "
- "invalid pid %d", proc_id);
- } else {
- tst_resm(TPASS, "Functionality of "
- "getpid() successful");
- }
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- * Setup signal catching function.
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-}
-
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/getppid01.c b/winsup/testsuite/winsup.api/ltp/getppid01.c
deleted file mode 100644
index d0e6032..0000000
--- a/winsup/testsuite/winsup.api/ltp/getppid01.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : getppid01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for getppid(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) getppid(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the getppid(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * getppid(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="getppid01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call getppid(2)
- */
- TEST(getppid());
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "getppid() Failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "getppid() returned %d", TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/getppid02.c b/winsup/testsuite/winsup.api/ltp/getppid02.c
deleted file mode 100644
index 50a72e4..0000000
--- a/winsup/testsuite/winsup.api/ltp/getppid02.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * getppid01.c
- *
- * DESCRIPTION
- * Testcase to check the basic functionality of the getppid() syscall.
- *
- * USAGE: <for command-line>
- * getppid01 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None
- */
-
-#include <errno.h>
-#include <test.h>
-#include <usctest.h>
-#include <sys/wait.h>
-
-const char *TCID = "getppid01";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-
-int
-main(int ac, char **av)
-{
- int pid, ppid;
-
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /*
- * parse standard options
- */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- }
-
- setup();
-
- /*
- * check looping state if -i option is given
- */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /*
- * reset Tst_count in case we are looping.
- */
- Tst_count = 0;
-
- ppid = getpid();
- pid = fork();
- if (pid < 0) {
- tst_brkm(TBROK, cleanup, "fork() failed");
- }
-
- if (pid == 0) { /* child */
- TEST(getppid());
-
- if (TEST_RETURN < 0) {
- tst_resm(TFAIL, "something is really broken");
- continue;
- }
-
- if (STD_FUNCTIONAL_TEST) {
- if (TEST_RETURN != ppid) {
- tst_resm(TFAIL, "getppid() failed");
- } else {
- tst_resm(TPASS, "return value = "
- "parent's pid value");
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
-
- } else {
- wait(NULL);
-
- /* let the child carry on */
- exit(0);
- }
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-}
-
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
-
diff --git a/winsup/testsuite/winsup.api/ltp/getuid01.c b/winsup/testsuite/winsup.api/ltp/getuid01.c
deleted file mode 100644
index cd3dff7..0000000
--- a/winsup/testsuite/winsup.api/ltp/getuid01.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : getuid01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for getuid(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) getuid(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the getuid(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * getuid(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="getuid01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call getuid(2)
- */
- TEST(getuid());
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "getuid() Failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "getuid() returned %d", TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/getuid02.c b/winsup/testsuite/winsup.api/ltp/getuid02.c
deleted file mode 100644
index 966b552..0000000
--- a/winsup/testsuite/winsup.api/ltp/getuid02.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * getuid02.c
- *
- * DESCRIPTION
- * Testcase to check the basic functionality of the geteuid() system call.
- *
- * USAGE: <for command-line>
- * getuid02 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None
- */
-
-#include <pwd.h>
-#include <errno.h>
-#include <test.h>
-#include <usctest.h>
-
-const char *TCID = "getuid02";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned by parse_opts */
-
- struct passwd *pwent;
-
- /* parse standard options */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- }
-
- setup();
-
- /* check looping state if -i option is given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
- TEST(geteuid());
-
- if (TEST_RETURN < 0) {
- tst_brkm(TBROK, cleanup, "This should never happen");
- }
-
- if (STD_FUNCTIONAL_TEST) {
-
- pwent = getpwuid(TEST_RETURN);
- if (pwent == NULL) {
- tst_resm(TFAIL, "geteuid() returned unexpected "
- "value %d", TEST_RETURN);
- } else {
- if (pwent->pw_uid != TEST_RETURN) {
- tst_resm(TFAIL, "getpwuid() value, %d, "
- "does not match geteuid() "
- "value, %d", pwent->pw_uid,
- TEST_RETURN);
- } else {
- tst_resm(TPASS, "values from geteuid()"
- " and getpwuid() match");
- }
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-}
-
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
-
diff --git a/winsup/testsuite/winsup.api/ltp/getuid03.c b/winsup/testsuite/winsup.api/ltp/getuid03.c
deleted file mode 100644
index e18c366..0000000
--- a/winsup/testsuite/winsup.api/ltp/getuid03.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * getuid01.c
- *
- * DESCRIPTION
- * Testcase to check the basic functionality of the getuid() system call.
- *
- * USAGE: <for command-line>
- * getuid01 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None
- */
-
-#include <pwd.h>
-#include <errno.h>
-#include <test.h>
-#include <usctest.h>
-
-const char *TCID = "getuid01";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned by parse_opts */
-
- struct passwd *pwent;
-
- /* parse standard options */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- }
-
- setup();
-
- /* check looping state if -i option is given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
- TEST(getuid());
-
- if (TEST_RETURN < 0) {
- tst_brkm(TBROK, cleanup, "This should never happen");
- }
-
- if (STD_FUNCTIONAL_TEST) {
-
- pwent = getpwuid(TEST_RETURN);
- if (pwent == NULL) {
- tst_resm(TFAIL, "getuid() returned unexpected "
- "value %d", TEST_RETURN);
- } else {
- if (pwent->pw_uid != TEST_RETURN) {
- tst_resm(TFAIL, "getpwuid() value, %d, "
- "does not match getuid() "
- "value, %d", pwent->pw_uid,
- TEST_RETURN);
- } else {
- tst_resm(TPASS, "values from getuid()"
- " and getpwuid() match");
- }
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-}
-
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
-
diff --git a/winsup/testsuite/winsup.api/ltp/kill01.c b/winsup/testsuite/winsup.api/ltp/kill01.c
deleted file mode 100644
index 0428991..0000000
--- a/winsup/testsuite/winsup.api/ltp/kill01.c
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * kill01.c
- *
- * DESCRIPTION
- * Test case to check the basic functionality of kill().
- *
- * ALGORITHM
- * call setup
- * loop if the -i option was given
- * fork a child
- * execute the kill system call
- * check the return value
- * if return value is -1
- * issue a FAIL message, break remaining tests and cleanup
- * if we are doing functional testing
- * if the process was terminated with the expected signal.
- * issue a PASS message
- * otherwise
- * issue a FAIL message
- * call cleanup
- *
- * USAGE
- * kill01 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * This test should be ran as a non-root user.
- */
-
-#include "test.h"
-#include "usctest.h"
-
-#include <signal.h>
-#include <errno.h>
-#include <sys/wait.h>
-
-void cleanup(void) __attribute__((noreturn));
-void setup(void);
-
-const char *TCID= "kill01()";
-int TST_TOTAL = 1;
-
-extern int Tst_count;
-
-#define TEST_SIG SIGKILL
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- pid_t pid;
- int exno, status, nsig;
-
- /* parse standard options */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- }
-
- setup(); /* global setup */
-
- /* The following loop checks looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
- status = 1;
- exno = 1;
- pid = fork();
- if (pid < 0) {
- tst_brkm(TBROK, cleanup, "Fork of child failed");
- } else if (pid == 0) {
- pause();
- /*NOTREACHED*/
- exit(exno);
- } else {
- TEST(kill(pid, TEST_SIG));
- waitpid(pid, &status, 0);
- }
-
- if (TEST_RETURN == -1) {
- tst_brkm(TFAIL, cleanup, "%s failed - errno = %d : %s",
- TCID, TEST_ERRNO, strerror(TEST_ERRNO));
- /*NOTREACHED*/
- }
-
- if (STD_FUNCTIONAL_TEST) {
- /*
- * Check to see if the process was terminated with the
- * expected signal.
- */
- nsig = WTERMSIG(status);
- if (nsig == TEST_SIG) {
- tst_resm(TPASS, "received expected signal %d",
- nsig);
- } else {
- tst_resm(TFAIL, "expected signal %d received %d" ,TEST_SIG,nsig);
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-
-/*
- * setup() - performs all ONE TIME setup for this test
- */
-void
-setup(void)
-{
- /* Pause if that option was specified */
- TEST_PAUSE;
-}
-
-/*
- * cleanup() - performs all the ONE TIME cleanup for this test at completion
- * or premature exit.
- */
-void
-cleanup(void)
-{
- /*
- * print timing status if that option was specified.
- * print errno log if that option was specified
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/kill02.c b/winsup/testsuite/winsup.api/ltp/kill02.c
deleted file mode 100644
index eba47cc..0000000
--- a/winsup/testsuite/winsup.api/ltp/kill02.c
+++ /dev/null
@@ -1,857 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/***********************************************************************************
-
- OS Test - Silicon Graphics, Inc.
-
- TEST IDENTIFIER : kill02 Sending a signal to processes with the same process group ID.
-
- PARENT DOCUMENT : kiltds01 Kill System Call.
-
- AUTHOR : Dave Baumgartner
-
- CO-PILOT : Barrie Kletscher
-
- DATE STARTED : 12/30/85
-
- TEST ITEMS
-
- 1. Sending a signal to pid of zero sends to all processes whose process
- group ID is equal to the process group ID as the sender.
-
- 2. Sending a signal to pid of zero does not send to processes in another process group.
-
-
- OUTPUT SPECIFICATIONS
-
- PASS :
- kiltcs02 1 PASS The signal was sent to all processes in the process group.
- kiltcs02 2 PASS The signal was not sent to selective processes that were not in the process group.
-
- FAIL :
- kiltcs02 1 FAIL The signal was not sent to all processes in the process group.
- kiltcs02 2 FAIL The signal was sent to a process that was not in the process group.
-
- BROK :
- kiltcs02 # BROK System call XXX failed. Errno:X, Error message:XXX.
- kiltcs02 # BROK Setting to catch unexpected signal %d failed. Errno: %d, Error message %s.
- kiltcs02 # BROK Setting to ignore signal %d failed. Errno: %d, Error message %s.
-
- WARN :
- kiltcs02 0 WARN Unexpected signal X was caught.
-
- SPECIAL PROCEDURAL REQUIREMENTS
-
- The program must be linked with tst_res.o.
-
- DETAILED DESCRIPTION
-
- **Setup**
- Set up unexpected signal handling.
- Set up one pipe for each process to be created with no blocking for read.
-
- **MAIN**
- If setup fails exit.
- Fork 2 children(1 & 2).
- Wait for set up complete messages from the 1st and 2nd child.
- Send the signal SIGUSR1 with pid equal to zero.
- Sleep a reasonable amount of time so that each child has been swapped in
- to process the signal.
- Now decide the outcome of the test items by reading from each pipe to find
- out if the child was interrupted by the signal and wrote to it.
- Remove the second child.
- Tell the first child it is time to remove it's child B because the decisions have been made.
- Exit.
-
- **First Child**
- Set to catch SIGUSR1 with an int_rout1.
- Set up to handle the message from the parent to remove child B.
- Fork two children(A & B).
- Wait for set up complete messages from child A & child B.
- Send a set up complete message to the parent.
- Pause until the signal SIGUSR1 comes in from the parent.
- Pause until the parent says it is time to remove the child.
- Exit.
-
- **Second Child**
- Set to catch SIGUSR1 with an int_rout2.
- Set the process group to be something different than the parents.
- Send a set up complete message to the parent.
- Pause until killed by parent because this child shouldn't receive signal SIGUSR1.
-
- **Child A**
- Set to catch SIGUSR1 with an int_routA.
- Send a set up complete message to the parent(First Child).
- Pause until the signal SIGUSR1 comes in from the parent.
- Exit.
-
- **Child B**
- Set to catch SIGUSR1 with an int_routB.
- Set the process group to be something different than the parents(First Child's).
- Send a set up complete message to the parent.
- Pause until killed by parent because this child shouldn't receive signal SIGUSR1.
-
- **usr1_rout-Used by all children**
- Write to the appropriate pipe that the signal SIGUSR1 was caught.
-
- **usr2_rout**
- Remove child B.
-
-******************************************************************************/
-#include <sys/param.h>
-#include <signal.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <string.h>
-#include "test.h"
-#include "usctest.h"
-
-#define MAXMESG 150 /*The maximum message that can be created. */
-#define CHAR_SET_FAILED "0" /*Set up failing status transferred through the pipe. */
-#define CHAR_SET_PASSED "1" /*Set up passing status transferred through the pipe. */
-#define SIG_CAUGHT "2" /*Indicates that the signal SIGUSR1 was caught. */
-#define SIG_RECEIVED 1 /*Integer value that indicates that the signal SIGUSR1 */
- /*was caught. */
-#define SIG_NOT_RECD 0 /*Integer value that indicates that the signal SIGUSR1 */
- /*was caught. */
-#define INT_SET_FAILED 0 /*Set up failing status transferred through the pipe. */
-#define INT_SET_PASSED 1 /*Set up passing status transferred through the pipe. */
-#define SLEEP_TIME 10 /*Amount of time the children get to catch the signal */
-#define TRUE 40 /*Child exits with this if execution was as */
- /*expected. */
-#define FALSE 50 /*Child exits with this if it timed out waiting for the */
- /*parents signal. */
-#define TIMEOUT 60 /*Amount of time given in alarm calls. */
-#define CHILD_EXIT(VAR) ((VAR >> 8) & 0377) /*Exit value from the child. */
-#define CHILD_SIG(VAR) (VAR & 0377) /*Signal value from the termination of child. */
- /*from the parent. */
-#define SYS_FAIL "The system call %s failed. Errno: %d, Error message: %s."
-
-int pid1; /*Return value from 1st fork. Global so that it can be */
- /*used in interrupt handling routines. */
-int pid2; /*Return value from 2nd fork. Global so that it can be */
- /*used in interrupt handling routines. */
-int pidA; /*Return value from 1st fork in child 1. Global so that it */
- /*can be used in interrupt handling routines. */
-int pidB; /*Return value from 2nd fork in child 1. Global so that it */
- /*can be used in interrupt handling routines. */
-extern int errno; /*Error number returned by a system call. */
-int pipe1_fd[2]; /*Pipe file descriptors used for communication */
- /*between child 1 and the 1st parent. */
-int pipe2_fd[2]; /*Pipe file descriptors used for communication */
- /*between child 2 and the 1st parent. */
-int pipeA_fd[2]; /*Pipe file descriptors used for communication */
- /*between child A and the 1st parent. */
-int pipeB_fd[2]; /*Pipe file descriptors used for communication */
- /*between child B and the 1st parent. */
-char pipe_buf[10]; /*Pipe buffer. */
-char buf_tmp1[2],buf_tmp2[2]; /*Temp hold for info read into pipe_buf. */
-int read1_stat = 0; /*Number of characters read from pipe 1. */
-int read2_stat = 0; /*Number of characters read from pipe 2. */
-int readA_stat = 0; /*Number of characters read from pipe A. */
-int readB_stat = 0; /*Number of characters read from pipe B. */
-int alarm_flag = FALSE; /*This flag indicates an alarm time out. */
-char who_am_i = '0'; /*This indicates which process is which when using */
- /*interrupt routine usr1_rout. */
-
-void notify_timeout(); /*Signal handler that the parent enters if it times out */
- /*waiting for the child to indicate its set up status. */
-void parent_rout(); /*This is the parents routine. */
-void child1_rout(); /*This is child 1's routine. */
-void child2_rout(); /*This is child 2's routine. */
-void childA_rout(); /*This is child A's routine. */
-void childB_rout(); /*This is child B's routine. */
-void usr1_rout(); /*This routine is used by all children to indicate that */
- /*they have caught signal SIGUSR1. */
-void par_kill(); /*This routine is called by the original parent to */
- /*remove child 2 and to indicate to child 1 to */
- /*remove its children. */
-void chld1_kill(); /*This routine is used by child 1 to remove itself and */
- /*its children A and B. */
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-const char *TCID="kill02"; /* Test program identifier. */
-int TST_TOTAL=2; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-extern int Tst_nobuf; /* var. used to turn off tst_res buffering */
-
-int exp_enos[]={0}; /* Array of expected errnos */
-
-/***********************************************************************
- * MAIN
- ***********************************************************************/
-int
-main(int ac, char **av)
-{
- char mesg[MAXMESG]; /* Holds messages to pass to tst_res. */
-
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- Tst_nobuf=1;
-
- /***************************************************************
- * parse standard options, and exit if there is an error
- * the -t and -f options not support yet.
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- if ((pid1 = fork()) > 0)
- {
- /*
- * This is the parent, fork again to create child 2.
- */
- if ((pid2 = fork()) > 0) {
- /*
- * This is the parent.
- */
- (void) parent_rout();
- }
- else if (pid2 == 0) {
- /*
- * This is child 2.
- */
- (void) child2_rout();
- }
- else {
- /*
- * The second fork failed kill the first child.
- */
- if (kill(pid1,SIGKILL) == -1 && errno != ESRCH) {
- tst_resm(TWARN,"Child process may not have been killed.");
- }
- (void) sprintf(mesg,SYS_FAIL,"fork",errno,strerror(errno));
- tst_brkm(TBROK,cleanup,mesg);
- }
-
- }
- else if (pid1 == 0) {
- /*
- * This is child 1.
- */
- (void) child1_rout();
- }
- else {
- /*
- * Fork failed.
- */
- (void) sprintf(mesg,SYS_FAIL,"fork",errno,strerror(errno));
- tst_brkm(TBROK,cleanup,mesg);
- }
- }
-
- cleanup();
-
- return 0;
-} /* END OF MAIN.*/
-
-/******************************************************************************
- * This is the parents routine. The parent waits for the children 1 and 2 to
- * get set up. Then sends the signal and checks the outcome.
- *********************************************************************************/
-void parent_rout()
-{
- char mesg[MAXMESG]; /*Used to buffer messages for tst_resm. */
-
- /*
- * Set to catch the alarm signal SIGALRM.
- */
- if (signal(SIGALRM,notify_timeout) == SIG_ERR) {
- (void) par_kill();
- tst_brkm(TBROK, NULL,
- "Could not set to catch the parents time out alarm.");
- tst_exit();
- }
-
- /*
- * Setting to catch the timeout alarm worked now let the children start up.
- * Set an alarm which causes a time out on the read pipe loop.
- * The children will notify the parent that set up is complete
- * and the pass/fail status of set up.
- */
- (void) alarm(TIMEOUT);
-
- while ((read(pipe1_fd[0],pipe_buf,1) != 1) && (alarm_flag == FALSE))
- /*EMPTY*/;
- strncpy(buf_tmp1,pipe_buf,1);
- (void) alarm(TIMEOUT);
-
- while ((read(pipe2_fd[0],pipe_buf,1) != 1) && (alarm_flag == FALSE))
- /*EMPTY*/;
- (void) alarm(0); /*Reset the alarm clock.*/
- strncpy(buf_tmp2,pipe_buf,1);
-
- /*
- * Check the alarm flag.
- */
- if (alarm_flag == TRUE) {
- tst_brkm(TBROK,NULL,"The set up of the children failed by timing out.");
- (void) par_kill();
- cleanup();
- }
-
- /*
- * Check to see if either child failed in the set up.
- */
- if ( (strncmp(buf_tmp1,CHAR_SET_FAILED,1) == 0) ||
- (strncmp(buf_tmp2,CHAR_SET_FAILED,1) == 0)) {
- /*
- * Problems were encountered in the set up of one of the children.
- * The error message has been displayed by the child.
- */
- (void) par_kill();
- cleanup();
- }
-
- /*
- * Setup passed, now send SIGUSR1 to process id of zero.
- */
- TEST( kill(0,SIGUSR1) );
-
- if ( TEST_RETURN == -1)
- {
- (void) sprintf(mesg,SYS_FAIL,"kill",errno,strerror(errno));
- tst_brkm(TBROK,NULL,mesg);
- (void) par_kill();
- cleanup();
- }
-
- /*
- * Sleep for a while to allow the children to get a chance to
- * catch the signal.
- */
- (void) sleep(SLEEP_TIME);
-
- /*
- * The signal was sent above and time has run out for child response,
- * check the outcomes.
- */
- read1_stat = read(pipe1_fd[0],pipe_buf,1);
- if (read1_stat == -1 && errno == EAGAIN) read1_stat = 0;
- read2_stat = read(pipe2_fd[0],pipe_buf,1);
- if (read2_stat == -1 && errno == EAGAIN) read2_stat = 0;
- readA_stat = read(pipeA_fd[0],pipe_buf,1);
- if (readA_stat == -1 && errno == EAGAIN) readA_stat = 0;
- readB_stat = read(pipeB_fd[0],pipe_buf,1);
- if (readB_stat == -1 && errno == EAGAIN) readB_stat = 0;
-
- if (read1_stat == -1 || read2_stat == -1 ||
- readA_stat == -1 || readB_stat == -1) {
- /*
- * The read system call failed.
- */
- (void) sprintf(mesg,SYS_FAIL,"read",errno,strerror(errno));
- tst_brkm(TBROK,NULL,mesg);
- (void) par_kill();
- cleanup();
- }
-
- /*
- * Check the processes that were supposed to get the signal.
- */
- if (read1_stat == SIG_RECEIVED) {
- if (readA_stat == SIG_RECEIVED) {
- /*
- * Both processes, 1 and A, that were supposed to receive
- * the signal did receive the signal.
- */
- if ( STD_FUNCTIONAL_TEST )
- tst_resm(TPASS,
- "The signal was sent to all processes in the process group.");
- else
- Tst_count++;
- }
- else { /*Process A didn't receive the signal.*/
- tst_resm(TFAIL,"Process A did not receive the signal.");
- }
-
- }
- else { /*Process 1 didn't receive the signal.*/
- tst_resm(TFAIL,"Process 1 did not receive the signal.");
- }
-
- /*
- * Check the processes that were not supposed to get the signal.
- */
- if (read2_stat == SIG_NOT_RECD) {
- if (readB_stat == SIG_NOT_RECD) {
- /*
- * Both processes, 2 and B did not receive the signal.
- */
- if ( STD_FUNCTIONAL_TEST )
- tst_resm(TPASS,
- "The signal was not sent to selective processes that were not in the process group.");
- else
- Tst_count++;
- }
- else { /*Process B received the signal.*/
- tst_resm(TFAIL,"Process B received the signal.");
- }
-
- }
-
- else /*Process 2 received the signal.*/
- {
- tst_resm(TFAIL,"Process 2 received the signal.");
- }
-
- (void) par_kill();
- return;
-} /*End of parent_rout*/
-
-/*******************************************************************************
- * This is child 1's routine. It creates children A & B, checks their set up,
- * reports to the parent set up pass/fail info., then waits for
- * the parents signal.
- ******************************************************************************/
-void child1_rout()
-{
- char mesg[MAXMESG]; /*Used to buffer messages for tst_resm. */
- who_am_i = '1';
-
- /*
- * Set to catch the SIGUSR1 with int1_rout.
- */
- if (signal(SIGUSR1,usr1_rout) == SIG_ERR)
- {
- tst_brkm(TBROK,NULL,"Could not set to catch the childrens signal.");
- (void) write(pipe1_fd[1],CHAR_SET_FAILED,1);
- exit(0);
- }
-
- /*
- * Create children A & B.
- */
- if ((pidA = fork()) > 0) {
- /*
- * This is the parent(child1), fork again to create child B.
- */
- if ((pidB = fork()) == 0) {
- /* This is child B. */
- (void) childB_rout();
- }
-
- else if (pidB == -1) {
- /*
- * The fork of child B failed kill child A.
- */
- if (kill(pidA,SIGKILL) == -1)
- tst_resm(TWARN,"Child process may not have been killed.");
- (void) sprintf(mesg,SYS_FAIL,"fork",errno,strerror(errno));
- tst_brkm(TBROK,NULL,mesg);
- (void) write(pipe2_fd[1],CHAR_SET_FAILED,1);
- exit(0);
- }
- }
-
- else if (pidA == 0) {
- /* This is child A. */
- (void) childA_rout();
-
- }
-
- else if (pidA == -1) {
- /*
- * The fork of child A failed.
- */
- (void) sprintf(mesg,SYS_FAIL,"fork",errno,strerror(errno));
- tst_brkm(TBROK,NULL,mesg);
- (void) write(pipe1_fd[1],CHAR_SET_FAILED,1);
- exit(0);
- }
-
- /*
- * Set to catch the SIGUSR2 with chld1_kill.
- */
- if (signal(SIGUSR2,chld1_kill) == SIG_ERR) {
- tst_brkm(TBROK,NULL,"Could not set to catch the parents signal.");
- (void) write(pipe1_fd[1],CHAR_SET_FAILED,1);
- (void) chld1_kill();
- exit(0);
- }
-
- /*
- * Set to catch the alarm signal SIGALRM.
- */
- if (signal(SIGALRM,notify_timeout) == SIG_ERR) {
- tst_brkm(TBROK,NULL,"Could not set to catch the childs time out alarm.");
- (void) write(pipe1_fd[1],CHAR_SET_FAILED,1);
- (void) chld1_kill();
- exit(0);
- }
-
- /*
- * Setting to catch the signals worked now let the children start up.
- * Set an alarm which causes a time out on the pipe read loop.
- * The children A & B will notify the parent(child1) that set up is complete
- * and the pass/fail status of set up.
- */
- (void) alarm(TIMEOUT-40);
-
- while ((read(pipeA_fd[0],pipe_buf,1) != 1) && (alarm_flag == FALSE))
- /*EMPTY*/;
- (void) alarm(TIMEOUT-40);
-
- while ((read(pipeB_fd[0],pipe_buf,1) != 1) && (alarm_flag == FALSE))
- /*EMPTY*/;
- (void) alarm(0); /*Reset the alarm clock.*/
-
- /*
- * Check the alarm flag.
- */
- if (alarm_flag == TRUE) {
- tst_brkm(TBROK,NULL,"The set up of the children failed by timing out.");
- (void) chld1_kill();
- (void) write(pipe1_fd[1],CHAR_SET_FAILED,1);
- exit(0);
- }
-
- /*
- * Send a set up complete message to the parent.
- */
- (void) write(pipe1_fd[1],CHAR_SET_PASSED,1);
-
- /*
- * Pause until the signal SIGUSR1 or SIGUSR2 is sent from the parent.
- */
- (void) pause();
-
- /*
- * Pause until signal SIGUSR2 is sent from the parent.
- * This pause will only be executed if SIGUSR2 has not been received yet.
- */
- while (1) {
- sleep(1);
- }
-
-} /*End of child1_rout*/
-
-/*******************************************************************************
- * This is the routine for child 2, which should not receive the parents signal.
- ******************************************************************************/
-void child2_rout()
-{
- who_am_i = '2';
-
- /*
- * Set the process group of this process to be different
- * than the other processes.
- */
- (void) setpgrp();
-
- /*
- * Set to catch the SIGUSR1 with usr1_rout.
- */
- if (signal(SIGUSR1,usr1_rout) == SIG_ERR) {
- tst_brkm(TBROK,cleanup,"Could not set to catch the parents signal.");
- (void) write(pipe2_fd[1],CHAR_SET_FAILED,1);
- exit(0);
- }
-
- /* Send a set up complete message to parent.*/
- (void) write(pipe2_fd[1],CHAR_SET_PASSED,1);
-
- /*
- * Pause until killed by the parent or SIGUSR1 is received.
- */
- (void) pause();
-}
-
-
-/*******************************************************************************
- * This is the routine for child A, which should receive the parents signal.
- ******************************************************************************/
-void childA_rout()
-{
- who_am_i = 'A';
-
- /* Send a set up complete message to parent.*/
- write(pipeA_fd[1],CHAR_SET_PASSED,1);
-
- /*
- * Pause until killed by the parent or SIGUSR1 is received.
- */
- (void) pause();
-
- exit(0);
-} /*End of childA_rout*/
-
-/*******************************************************************************
- * This is the routine for child B, which should not receive the parents signal.
- ******************************************************************************/
-void childB_rout()
-{
- who_am_i = 'B';
-
- /*
- * Set the process group of this process to be different
- * than the other processes.
- */
- (void) setpgrp();
-
- /* Send a set up complete message to parent(child 1).*/
- write(pipeB_fd[1],CHAR_SET_PASSED,1);
-
- /*
- * Pause until killed by the parent(child 1) or SIGUSR1 is received.
- */
- (void) pause();
-
- exit(0);
-}
-
-/*******************************************************************************
- * This routine sets up the interprocess communication pipes, signal handling,
- * and process group information.
- ******************************************************************************/
-void
-setup()
-{
- int errno_buf = 0; /*indicates the errno if pipe set up fails. */
- int err_flag = FALSE; /*Indicates if an error has occurred in pipe set up. */
- char mesg[MAXMESG]; /*Used to buffer messages for tst_res. */
-
- /*
- * Set the process group ID to be equal between the parent and children.
- */
- (void) setpgrp();
-
- /*
- * Set to catch unexpected signals.
- * SIGCLD is set to be ignored because we do not wait for termination status.
- * SIGUSR1 is set to be ignored because this is the signal we are using for
- * the test and we are not concerned with the parent getting it.
- */
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- if (signal(SIGUSR1,SIG_IGN) == SIG_ERR) {
- (void) sprintf(mesg,
- "Setting to ignore signal SIGCLD failed. Errno: %d, Error message %s.",
- errno,strerror(errno));
- tst_brkm(TBROK,NULL,mesg);
- tst_exit();
- }
-
- if (signal(SIGCLD,SIG_IGN) == SIG_ERR) {
- (void) sprintf(mesg,
- "Setting to ignore signal SIGCLD failed. Errno: %d, Error message %s.",
- errno,strerror(errno));
- tst_brkm(TBROK,NULL,mesg);
- tst_exit();
- }
-
- /* Indicate which errnos are expected */
- TEST_EXP_ENOS(exp_enos);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
-
- /*
- * Set up pipe1, pipe2, pipeA, and pipeB.
- */
- if ((pipe(pipe1_fd) == -1) || (fcntl(pipe1_fd[0],F_SETFL,O_NDELAY) == -1))
- {
- errno_buf = errno;
- err_flag = TRUE;
- }
-
- if ((pipe(pipe2_fd) == -1) || (fcntl(pipe2_fd[0],F_SETFL,O_NDELAY) == -1))
- {
- errno_buf = errno;
- err_flag = TRUE;
- }
-
- if ((pipe(pipeA_fd) == -1) || (fcntl(pipeA_fd[0],F_SETFL,O_NDELAY) == -1))
- {
- errno_buf = errno;
- err_flag = TRUE;
- }
-
- if ((pipe(pipeB_fd) == -1) || (fcntl(pipeB_fd[0],F_SETFL,O_NDELAY) == -1))
- {
- errno_buf = errno;
- err_flag = TRUE;
- }
-
- /*
- * Check for errors.
- */
- if (err_flag == TRUE)
- {
- (void) sprintf(mesg,SYS_FAIL,"pipe",errno_buf,strerror(errno_buf));
- tst_brkm(TBROK, NULL, mesg);
- tst_exit();
- }
- return;
-
-}
-
-/***********************************************************
- * This routine indicates that the process caught SIGUSR1.
- **********************************************************/
-void usr1_rout()
-{
- char mesg[MAXMESG]; /*Used to buffer messages for tst_res. */
-
- switch (who_am_i)
- {
- case '1': if (write(pipe1_fd[1],SIG_CAUGHT,1) == -1)
- tst_resm(TWARN,"Writing signal catching status failed in child 1.");
- break;
- case '2': if (write(pipe2_fd[1],SIG_CAUGHT,1) == -1)
- tst_resm(TWARN,"Writing signal catching status failed in child 2.");
- break;
- case 'A': if (write(pipeA_fd[1],SIG_CAUGHT,1) == -1)
- tst_resm(TWARN,"Writing signal catching status failed in child A.");
- break;
- case 'B': if (write(pipeB_fd[1],SIG_CAUGHT,1) == -1)
- tst_resm(TWARN,"Writing signal catching status failed in child B.");
- break;
- default:
- sprintf(mesg,"Unexpected value %d for who_am_i in usr1_rout().",who_am_i);
- tst_resm(TWARN,mesg);
- break;
- }
-
-} /*End of usr1_rout*/
-
-
-/***********************************************************
- * This routine handles the timeout alarm in the parent,
- * which occurs when the child fails to notify the parent
- * the status of set up.
- **********************************************************/
-void notify_timeout()
-{
- alarm_flag = TRUE;
-
-} /*End of notify_timeout*/
-
-/***********************************************************
- * This routine handles the procedure for removing the
- * children forked off during this test.
- **********************************************************/
-void par_kill()
-{
- char mesg[MAXMESG]; /*Used to buffer messages for tst_res. */
- /*
- * Indicate to child1 that it can remove it's children and itself now.
- */
- if (kill(pid1,SIGUSR2) == -1 && errno != ESRCH)
- {
- (void) sprintf(mesg,SYS_FAIL,"kill",errno,strerror(errno));
- tst_resm(TWARN,mesg);
- tst_resm(TWARN,"Child 1 and it's children may still be alive.");
- }
-
- /*
- * Remove child 2.
- */
- if (kill(pid2,SIGKILL) == -1 && errno != ESRCH)
- tst_resm(TWARN,"Child2 may still be alive.");
-
- return;
-
-} /*End of par_kill*/
-
-
-/*********************************************************************
- * This routine is executed by child 1 when the parent tells it to
- * remove it's children and itself.
- ********************************************************************/
-void chld1_kill()
-{
- char mesg[MAXMESG]; /*Used to buffer messages for tst_resm. */
-
- /*
- * Remove children A & B.
- */
- if (kill(pidA,SIGKILL) == -1 && errno != ESRCH)
- {
- (void) sprintf(mesg,
- "The system call kill failed. Child 1's(A) child may still be alive. Errno: %d, Error message %s.",
- errno,strerror(errno));
- tst_resm(TWARN,mesg);
- }
- if (kill(pidB,SIGKILL) == -1 && errno != ESRCH)
- {
- (void) sprintf(mesg,
- "The system call kill failed. Child 1's(B) child may still be alive. Errno: %d, Error message %s.",
- errno,strerror(errno));
- tst_resm(TWARN,mesg);
- }
-
- exit(0);
-
-} /*End of chld1_kill*/
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/kill03.c b/winsup/testsuite/winsup.api/ltp/kill03.c
deleted file mode 100644
index 1de727f..0000000
--- a/winsup/testsuite/winsup.api/ltp/kill03.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * kill03.c
- *
- * DESCRIPTION
- * Test case to check that kill fails when given an invalid signal.
- *
- * ALGORITHM
- * call setup
- * loop if the -i option was given
- * fork a child
- * execute the kill system call with an invalid signal
- * check the return value
- * if return value is not -1
- * issue a FAIL message, break remaining tests and cleanup
- * if we are doing functional testing
- * if the errno was set to 22 (invalid argument).
- * issue a PASS message
- * otherwise
- * issue a FAIL message
- * call cleanup
- *
- * USAGE
- * kill03 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * none
- */
-
-#include "test.h"
-#include "usctest.h"
-
-#include <signal.h>
-#include <errno.h>
-#include <sys/wait.h>
-
-void cleanup(void) __attribute__((noreturn));
-void setup(void);
-
-const char *TCID= "kill03()";
-int TST_TOTAL = 1;
-
-extern int Tst_count;
-
-int exp_enos[] = {EINVAL, 0};
-
-#define TEST_SIG 2000
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- pid_t pid;
- int exno, status;
-
- /* parse standard options */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- }
-
- setup(); /* global setup */
-
- TEST_EXP_ENOS(exp_enos);
-
- /* The following loop checks looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
- status = 1;
- exno = 1;
- pid = fork();
- if (pid < 0) {
- tst_brkm(TBROK, cleanup, "Fork of child failed");
- } else if (pid == 0) {
- pause();
- /*NOTREACHED*/
- exit(exno);
- } else {
- TEST(kill(pid, TEST_SIG));
- kill(pid, SIGKILL);
- waitpid(pid, &status, 0);
- }
-
- if (TEST_RETURN != -1) {
- tst_brkm(TFAIL, cleanup, "%s failed - errno = %d : %s "
- "Expected a return value of -1 got %d",
- TCID, TEST_ERRNO, strerror(TEST_ERRNO)),
- TEST_RETURN;
- /*NOTREACHED*/
- }
-
- if (STD_FUNCTIONAL_TEST) {
- /*
- * Check to see if the errno was set to the expected
- * value of 22 : EINVAL.
- */
- TEST_ERROR_LOG(TEST_ERRNO);
- if (TEST_ERRNO == EINVAL) {
- tst_resm(TPASS, "errno set to %d : %s, as "
- "expected", TEST_ERRNO,
- strerror(TEST_ERRNO));
- } else {
- tst_resm(TFAIL, "errno set to %d : %s expected "
- "%d : %s", TEST_ERRNO,
- strerror(TEST_ERRNO), 22, strerror(22));
- }
- }
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-
-/*
- * setup() - performs all ONE TIME setup for this test
- */
-void
-setup(void)
-{
- /* Pause if that option was specified */
- TEST_PAUSE;
-}
-
-/*
- * cleanup() - performs all the ONE TIME cleanup for this test at completion
- * or premature exit.
- */
-void
-cleanup(void)
-{
- /*
- * print timing status if that option was specified.
- * print errno log if that option was specified
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/kill04.c b/winsup/testsuite/winsup.api/ltp/kill04.c
deleted file mode 100644
index a7b3274..0000000
--- a/winsup/testsuite/winsup.api/ltp/kill04.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * kill04.c
- *
- * DESCRIPTION
- * Test case to check that kill() fails when passed a non-existant pid.
- *
- * ALGORITHM
- * call setup
- * loop if the -i option was given
- * fork a child
- * execute the kill system call with a non-existant PID
- * check the return value
- * if return value is not -1
- * issue a FAIL message, break remaining tests and cleanup
- * if we are doing functional testing
- * if the errno was set to 3 (No such proccess)
- * issue a PASS message
- * otherwise
- * issue a FAIL message
- * call cleanup
- *
- * USAGE
- * kill04 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * This test should be run by a non-root user
- */
-
-#include "test.h"
-#include "usctest.h"
-
-#include <signal.h>
-#include <errno.h>
-#include <sys/wait.h>
-
-void cleanup(void) __attribute__((noreturn));
-void setup(void);
-
-const char *TCID= "kill04()";
-int TST_TOTAL = 1;
-
-extern int Tst_count;
-
-int exp_enos[] = {ESRCH, 0};
-
-#define TEST_SIG SIGKILL
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- pid_t pid, fake_pid;
- int exno, status, fake_status, nsig;
-
- /* parse standard options */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- }
-
- setup(); /* global setup */
-
- TEST_EXP_ENOS(exp_enos);
-
- /* The following loop checks looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
- status = 1;
- exno = 1;
- pid = fork();
- if (pid < 0) {
- tst_brkm(TBROK, cleanup, "Fork failed");
- } else if (pid == 0) {
- pause();
- /*NOTREACHED*/
- exit(exno);
- } else {
- fake_pid = fork();
- if (fake_pid < 0) {
- tst_brkm(TBROK, cleanup, "Second fork failed");
- } else if (fake_pid == 0) {
- pause();
- /*NOTREACHED*/
- exit(exno);
- }
- kill(fake_pid, TEST_SIG);
- waitpid(fake_pid, &fake_status, 0);
- TEST(kill(fake_pid, TEST_SIG));
- kill(pid, TEST_SIG);
- waitpid(pid, &status, 0);
- }
-
- if (TEST_RETURN != -1) {
- tst_brkm(TFAIL, cleanup, "%s failed - errno = %d : %s "
- "Expected a return value of -1 got %d",
- TCID, TEST_ERRNO, strerror(TEST_ERRNO)),
- TEST_RETURN;
- /*NOTREACHED*/
- }
-
- if (STD_FUNCTIONAL_TEST) {
- /*
- * Check to see if the errno was set to the expected
- * value of 3 : ESRCH
- */
- nsig = WTERMSIG(status);
- TEST_ERROR_LOG(TEST_ERRNO);
- if (TEST_ERRNO == ESRCH) {
- tst_resm(TPASS, "errno set to %d : %s, as "
- "expected", TEST_ERRNO,
- strerror(TEST_ERRNO));
- } else {
- tst_resm(TFAIL, "errno set to %d : %s expected "
- "%d : %s", TEST_ERRNO,
- strerror(TEST_ERRNO), 3, strerror(3));
- }
- }
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-
-/*
- * setup() - performs all ONE TIME setup for this test
- */
-void
-setup(void)
-{
- /* Pause if that option was specified */
- TEST_PAUSE;
-}
-
-/*
- * cleanup() - performs all the ONE TIME cleanup for this test at completion
- * or premature exit.
- */
-void
-cleanup(void)
-{
- /*
- * print timing status if that option was specified.
- * print errno log if that option was specified
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/kill09.c b/winsup/testsuite/winsup.api/ltp/kill09.c
deleted file mode 100644
index 3b4c24f..0000000
--- a/winsup/testsuite/winsup.api/ltp/kill09.c
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : kill09
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for kill(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) kill(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the kill(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * kill(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-void alarm_handler(int sig);
-
-
-
-
-const char *TCID="kill09"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int fork_pid;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- int status;
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /* make a child process so we can kill it */
- /* If we cannot fork => we cannot test kill, so break and exit */
- if ((fork_pid=fork()) == -1) {
- tst_brkm(TBROK, cleanup,
- "fork() Failure. errno=%d : %s",
- errno, strerror(errno));
- }
-
- if (fork_pid == 0) {
- /* CHILD */
- /*
- * Setup alarm signal if we don't get the signal to prevent this process
- * from hanging around forever.
- */
- signal(SIGALRM, alarm_handler);
- alarm(20);
- pause();
- exit(1);
- }
-
- /* PARENT */
- /*
- * Call kill(2)
- */
- TEST(kill(fork_pid, SIGKILL));
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "kill(%d, SIGKILL) Failed, errno=%d : %s", fork_pid,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "kill(%d, SIGKILL) returned %d", fork_pid, TEST_RETURN);
- }
- }
-
- /*
- * wait for process to cleanup zombies.
- *
- */
- waitpid(0, &status, WNOHANG);
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- (void) signal(SIGCHLD, SIG_IGN);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-void
-alarm_handler(int sig)
-{
- exit(8);
-}
diff --git a/winsup/testsuite/winsup.api/ltp/link02.c b/winsup/testsuite/winsup.api/ltp/link02.c
deleted file mode 100644
index 84c53c2..0000000
--- a/winsup/testsuite/winsup.api/ltp/link02.c
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : link02
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for link(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) link(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the link(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * link(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-
-
-const char *TCID="link02"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char Fname[255], Lname[255];
-
-/***********************************************************************
- * Main
- ***********************************************************************/
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- struct stat fbuf, lbuf;
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call link(2)
- */
- TEST(link(Fname, Lname));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "link(%s, %s) Failed, errno=%d : %s",
- Fname, Lname, TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- stat(Fname, &fbuf);
- stat(Lname, &lbuf);
- if ( fbuf.st_nlink > 1 && lbuf.st_nlink > 1 &&
- fbuf.st_nlink == lbuf.st_nlink )
-
- tst_resm(TPASS, "link(%s, %s) returned %d and link cnts match",
- Fname, Lname, TEST_RETURN);
- else {
- tst_resm(TFAIL,
- "link(%s, %s) returned %d, stat link cnts do not match %d %d",
- Fname, Lname, TEST_RETURN, fbuf.st_nlink,
- lbuf.st_nlink);
- }
- }
- if (unlink(Lname) == -1) {
- tst_resm(TWARN, "unlink(%s) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- int fd;
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- strcpy(Fname, "tfile");
- if ((fd = open(Fname, O_RDWR|O_CREAT, 0700)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, 0700) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- } else if (close(fd) == -1) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- }
- strcpy(Lname, "lfile");
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/link03.c b/winsup/testsuite/winsup.api/ltp/link03.c
deleted file mode 100644
index 38c16af..0000000
--- a/winsup/testsuite/winsup.api/ltp/link03.c
+++ /dev/null
@@ -1,330 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : link03
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : multi links tests
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 2
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Richard Logan
- *
- * CO-PILOT : William Roske
- *
- * DATE STARTED : 03/31/94
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) link(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- * -N #links : Use #links links every iteration
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the link(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * link(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void help();
-void cleanup(void) __attribute__((noreturn));
-
-
-
-const char *TCID="link03"; /* Test program identifier. */
-int TST_TOTAL=2; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-extern int Tst_nobuf;
-
-int exp_enos[]={0, 0};
-
-#define BASENAME "lkfile"
-
-char Basename[255];
-char Fname[255];
-int Nlinks=0;
-char *Nlinkarg;
-
-int Nflag=0;
-
-
-/* for test specific parse_opts options */
-option_t options[] = {
- { "N:", &Nflag, &Nlinkarg }, /* -N #links */
- { NULL, NULL, NULL }
-};
-
-/***********************************************************************
- * Main
- ***********************************************************************/
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- struct stat fbuf, lbuf;
- int cnt;
- int nlinks;
- char lname[255];
-
- Tst_nobuf=1;
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, options, &help)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- if ( Nflag ) {
- if (sscanf(Nlinkarg, "%i", &Nlinks) != 1 ) {
- tst_brkm(TBROK, NULL, "--N option arg is not a number");
- tst_exit();
- }
- if ( Nlinks > 1000 ) {
- tst_resm(TWARN, "--N option arg > 1000 - may get errno:%d (EMLINK)",
- EMLINK);
- }
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- if ( Nlinks )
- nlinks = Nlinks;
- else
- /* min of 10 links and max of a 100 links */
- nlinks = (lc%90)+10;
-
- for(cnt=1; cnt < nlinks; cnt++) {
-
- sprintf(lname, "%s%d", Basename, cnt);
- /*
- * Call link(2)
- */
- TEST(link(Fname, lname));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_brkm(TFAIL, cleanup, "link(%s, %s) Failed, errno=%d : %s",
- Fname, lname, TEST_ERRNO, strerror(TEST_ERRNO));
- }
- }
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- stat(Fname, &fbuf);
-
- for(cnt=1; cnt < nlinks; cnt++) {
- sprintf(lname, "%s%d", Basename, cnt);
-
- stat(lname, &lbuf);
- if ( fbuf.st_nlink <= 1 || lbuf.st_nlink <= 1 ||
- (fbuf.st_nlink != lbuf.st_nlink) ) {
-
- tst_resm(TFAIL,
- "link(%s, %s[1-%d]) ret %d for %d files, stat values do not match %d %d",
- Fname, Basename, nlinks, TEST_RETURN, nlinks,
- fbuf.st_nlink, lbuf.st_nlink);
- break;
- }
- }
- if ( cnt >= nlinks ) {
- tst_resm(TPASS,
- "link(%s, %s[1-%d]) ret %d for %d files, stat linkcounts match %d",
- Fname, Basename, nlinks, TEST_RETURN, nlinks,
- fbuf.st_nlink);
- }
- }
- else
- Tst_count++;
-
- for(cnt=1; cnt < nlinks; cnt++) {
-
- sprintf(lname, "%s%d", Basename, cnt);
-
- if (unlink(lname) == -1) {
- tst_res(TWARN, "unlink(%s) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * help
- ***************************************************************/
-void
-help()
-{
- printf(" -N #links : create #links hard links every iteration\n");
-}
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- int fd;
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(Fname,"%s_%d", BASENAME, getpid());
- if ((fd = open(Fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- } else if (close(fd) == -1) {
- tst_res(TWARN, "close(%s) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- }
- sprintf(Basename, "%s_%d.", BASENAME, getpid());
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/link04.c b/winsup/testsuite/winsup.api/ltp/link04.c
deleted file mode 100644
index b3453b5..0000000
--- a/winsup/testsuite/winsup.api/ltp/link04.c
+++ /dev/null
@@ -1,426 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : link04
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Negative test cases for link(2).
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 14
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Richard Logan
- *
- * CO-PILOT : William Roske
- *
- * DATE STARTED : 03/30/94
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1-14.) link(2) returns...(See Test_cases structure below)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- * Standard tst_res output formt.
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the link(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * link(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/param.h> /* for PATH_MAX */
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-
-extern char *get_high_address();
-
-const char *TCID="link04"; /* Test program identifier. */
-int TST_TOTAL=14; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-int longpath_setup();
-int no_setup();
-int filepath_setup();
-int filepath2_setup();
-char Longpathname[PATH_MAX+2];
-char High_address[64];
-int dir_setup();
-
-struct test_case_t {
- const char *file1;
- const char *desc1;
- const char *file2;
- const char *desc2;
- int exp_errno;
- int (*setupfunc1)();
- int (*setupfunc2)();
-} Test_cases[] = {
- /* This test program should contain test cases where link */
- /* will fail regardless of who executed it (i.e. joe-user or root) */
-
- /* first path is invalid */
-
- { "nonexistfile", "non-existent file", "nefile", "nefile",
- ENOENT, no_setup, no_setup},
-
- { "", "path is empty string", "nefile", "nefile",
- ENOENT, no_setup, no_setup},
-
- { "neefile/file", "path contains a non-existent file", "nefile", "nefile",
- ENOENT, no_setup, no_setup },
-
-#ifndef __CYGWIN__
- { "regfile/file", "path contains a regular file", "nefile", "nefile",
- ENOTDIR, filepath_setup, no_setup },
-#endif
-
- { Longpathname, "pathname too long", "nefile", "nefile",
- ENAMETOOLONG, longpath_setup, no_setup },
-
- { High_address, "address beyond address space", "nefile", "nefile",
- EFAULT, no_setup, no_setup },
-
- { (char *)-1, "negative address", "nefile", "nefile",
- EFAULT, no_setup, no_setup },
-
- /* second path is invalid */
-
- { "regfile", "regfile", "", "empty string",
- ENOENT, no_setup, no_setup},
-
- { "regfile", "regfile", "neefile/file", "path contains a non-existent file",
- ENOENT, filepath_setup, no_setup},
-
- { "regfile", "regfile", "file/file", "path contains a regular file",
- ENOENT, filepath_setup, no_setup},
-
- { "regfile", "regfile", Longpathname, "pathname too long",
- ENAMETOOLONG, no_setup, longpath_setup },
-
- { "regfile", "regfile", High_address, "address beyond address space",
- EFAULT, no_setup, no_setup },
-
- { "regfile", "regfile", (char *)-1, "negative address",
- EFAULT, no_setup, no_setup},
-
- /* two existing files */
-
- { "regfile", "regfile", "regfile2", "regfile2",
- EEXIST, filepath_setup, filepath2_setup },
-
- { NULL, NULL, NULL, NULL, 0, no_setup, no_setup }
-};
-
-
-/***********************************************************************
- * Main
- ***********************************************************************/
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- const char *fname1, *fname2;
- const char *desc1, *desc2;
- int ind;
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- for (ind=0; Test_cases[ind].desc1 != NULL; ind++ ) {
-
- fname1 = Test_cases[ind].file1;
- desc1 = Test_cases[ind].desc1;
- fname2 = Test_cases[ind].file2;
- desc2 = Test_cases[ind].desc2;
-
- if ( fname1 == High_address )
- fname1 = get_high_address();
-
- if ( fname2 == High_address )
- fname2 = get_high_address();
-
- /*
- * Call link(2)
- */
- TEST(link(fname1, fname2));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- if ( STD_FUNCTIONAL_TEST ) {
- if ( TEST_ERRNO == Test_cases[ind].exp_errno )
- tst_resm(TPASS, "link(<%s>, <%s>) Failed, errno=%d",
- desc1, desc2, TEST_ERRNO);
- else
- tst_resm(TFAIL,
- "link(<%s>, <%s>) Failed, errno=%d, expected errno:%d",
- desc1, desc2, TEST_ERRNO, Test_cases[ind].exp_errno);
- }
- else
- Tst_count++;
- } else {
- tst_resm(TFAIL,
- "link(<%s>, <%s>) returned %d, expected -1, errno:%d",
- desc1, desc2, TEST_RETURN, Test_cases[ind].exp_errno);
- }
- }
-
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- int ind;
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- for (ind=0; Test_cases[ind].desc1 != NULL; ind++ ) {
- Test_cases[ind].setupfunc1();
- Test_cases[ind].setupfunc2();
- }
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-/******************************************************************
- *
- ******************************************************************/
-int
-no_setup()
-{
- return 0;
-}
-
-/******************************************************************
- *
- ******************************************************************/
-int
-longpath_setup()
-{
- int ind;
-
- static int alreadycalled = 0;
-
- if ( alreadycalled )
- return 0;
- alreadycalled++;
-
- for(ind=0; ind<= PATH_MAX+1; ind++) {
- Longpathname[ind] = 'a';
- }
- return 0;
-
-}
-
-/******************************************************************
- *
- ******************************************************************/
-int
-filepath2_setup()
-{
- int fd;
- static int alreadycalled = 0;
-
- if ( alreadycalled )
- return 0;
- alreadycalled++;
-
- if ( (fd=creat("regfile2", 0777)) == -1 ) {
- tst_brkm(TBROK, cleanup, "creat(regfile2, 0777) failed, errno:%d %s",
- errno, strerror(errno));
- }
- close(fd);
- return 0;
-}
-/******************************************************************
- *
- ******************************************************************/
-int
-filepath_setup()
-{
- int fd;
- static int alreadycalled = 0;
-
- if ( alreadycalled )
- return 0;
- alreadycalled++;
-
- if ( (fd=creat("regfile", 0777)) == -1 ) {
- tst_brkm(TBROK, cleanup, "creat(regfile, 0777) failed, errno:%d %s",
- errno, strerror(errno));
- }
- close(fd);
- return 0;
-}
-
-/******************************************************************
- *
- ******************************************************************/
-int
-dir_setup()
-{
- static int alreadycalled = 0;
-
- if ( alreadycalled )
- return 0;
- alreadycalled++;
-
- if ( mkdir("dir", 0777) == -1 ) {
- tst_brkm(TBROK, cleanup,
- "mkdir(dir, 0700) Failed, errno=%d : %s",
- errno, strerror(errno));
- }
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/ltp/link05.c b/winsup/testsuite/winsup.api/ltp/link05.c
deleted file mode 100644
index 9387c25..0000000
--- a/winsup/testsuite/winsup.api/ltp/link05.c
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : link05
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : multi links (EMLINK) negative test
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 2
- *
- * WALL CLOCK TIME : 3
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Richard Logan
- *
- * CO-PILOT : William Roske
- *
- * DATE STARTED : 03/31/94
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) link(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the link(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * link(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-void help();
-
-
-
-const char *TCID="link05"; /* Test program identifier. */
-#ifdef CRAY
-int TST_TOTAL=2; /* Total number of test cases. */
-#else
-int TST_TOTAL=1; /* Total number of test cases. */
-#endif
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-#define BASENAME "lkfile"
-
-char Basename[255];
-char Fname[255];
-
-int Nflag=0;
-char *Noptlinks;
-
-/* for test specific parse_opts options */
-option_t options[] = {
- { "N:", &Nflag, &Noptlinks }, /* -N option */
- { NULL, NULL, NULL }
-};
-
-int nlinks = 1000;
-
-/***********************************************************************
- * Main
- ***********************************************************************/
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- struct stat fbuf, lbuf;
- int cnt;
- char lname[255];
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, options, &help)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- if ( Nflag ) {
- if ( sscanf(Noptlinks, "%i", &nlinks) != 1 ) {
- tst_brkm(TBROK, cleanup, "-N option invalid, must be numeric");
- }
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- for(cnt=1; cnt < nlinks; cnt++) {
-
- sprintf(lname, "%s%d", Basename, cnt);
- /*
- * Call link(2)
- */
- TEST(link(Fname, lname));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- tst_resm(TFAIL, "link(%s, %s) Failed, errno=%d : %s",
- Fname, lname, TEST_ERRNO, strerror(TEST_ERRNO));
- }
- }
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- stat(Fname, &fbuf);
-
- for(cnt=1; cnt < nlinks; cnt++) {
- sprintf(lname, "%s%d", Basename, cnt);
-
- stat(lname, &lbuf);
- if ( fbuf.st_nlink <= 1 || lbuf.st_nlink <= 1 ||
- (fbuf.st_nlink != lbuf.st_nlink) ) {
-
- tst_resm(TFAIL,
- "link(%s, %s[1-%d]) ret %d for %d files, stat values do not match %d %d",
- Fname, Basename, nlinks, TEST_RETURN, nlinks,
- fbuf.st_nlink, lbuf.st_nlink);
- break;
- }
- }
- if ( cnt >= nlinks ) {
- tst_resm(TPASS,
- "link(%s, %s[1-%d]) ret %d for %d files, stat linkcounts match %d",
- Fname, Basename, nlinks, TEST_RETURN, nlinks,
- fbuf.st_nlink);
- }
- }
- else
- Tst_count++;
-
-#ifdef CRAY
-/*
- * IRIX (xfs) systems do not have the 1000 link limit.
- * I tried 100000 links on 2/97 without error on IRIX 6.4.
- */
- /*
- * Now check that one more link will put you over the top
- */
- sprintf(lname, "%s%d", Basename, cnt);
-
- /*
- * Call link(2)
- */
- TEST(link(Fname, lname));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- if ( STD_FUNCTIONAL_TEST ) {
- if ( TEST_ERRNO == EMLINK ) {
- tst_resm(TPASS,
- "link(%s, %s) ret %d on %d link, errno:%d",
- Fname, lname, TEST_RETURN, nlinks+1, EMLINK);
- }
- else {
- tst_resm(TFAIL,
- "link(%s, %s) ret %d on %d link, errno:%d, expected -1, errno:%d",
- Fname, lname, TEST_RETURN, nlinks+1,
- TEST_ERRNO, EMLINK);
- }
- }
- else
- Tst_count++;
- }
- else {
- tst_resm(TFAIL, "link(%s, %s) ret %d on %d link, expected -1, errno:%d",
- Fname, lname, TEST_RETURN, nlinks+1, EMLINK);
- }
-#endif /* CRAY */
-
- for(cnt=1; cnt < nlinks; cnt++) {
-
- sprintf(lname, "%s%d", Basename, cnt);
-
- if (unlink(lname) == -1) {
- tst_res(TWARN, "unlink(%s) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * help
- ***************************************************************/
-void
-help()
-{
- printf(" -N #links : create #links hard links every iteration\n");
-}
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- int fd;
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(Fname,"%s_%d", BASENAME, getpid());
- if ((fd = open(Fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- } else if (close(fd) == -1) {
- tst_res(TWARN, "close(%s) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- }
- sprintf(Basename, "%s_%d.", BASENAME, getpid());
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/lseek01.c b/winsup/testsuite/winsup.api/ltp/lseek01.c
deleted file mode 100644
index 22d0c6c..0000000
--- a/winsup/testsuite/winsup.api/ltp/lseek01.c
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : lseek01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for lseek(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 3
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) lseek(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the lseek(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * lseek(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-
-
-const char *TCID="lseek01"; /* Test program identifier. */
-int TST_TOTAL=3; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char Fname[255];
-int Fd;
-
-int Whence[] = {SEEK_SET, SEEK_CUR, SEEK_END, -1};
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- int ind;
- int offset;
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- offset=(lc%100)*4096; /* max size is 100 blocks */
-
- for (ind=0; Whence[ind] >= 0; ind++) {
-
- /*
- * Call lseek(2)
- */
- TEST(lseek(Fd, (long)offset, Whence[ind]));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "lseek(%s, %ld, 0) Failed, errno=%d : %s",
- Fname, offset, TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "lseek(%s, %ld, %d) returned %d", Fname,
- offset, Whence[ind], TEST_RETURN);
- }
- else
- Tst_count++;
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(Fname, "tfile_%d",getpid());
- if ((Fd = open(Fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- }
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* close the file we have open */
- if (close(Fd) == -1) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s", Fname, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/lseek02.c b/winsup/testsuite/winsup.api/ltp/lseek02.c
deleted file mode 100644
index 04fa3f1..0000000
--- a/winsup/testsuite/winsup.api/ltp/lseek02.c
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : lseek02
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Negative test for lseek(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Richard Logan
- *
- * CO-PILOT : William Roske
- *
- * DATE STARTED : 04/25/94
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) lseek(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the lseek(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * lseek(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-
-
-const char *TCID="lseek02"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char fname[255];
-int fd;
-
-int Whence[] = {SEEK_SET, SEEK_CUR, SEEK_END, -1};
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call lseek(2)
- */
- TEST( lseek(-1, (long)1, SEEK_SET) );
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- if ( STD_FUNCTIONAL_TEST ) {
-
- if ( TEST_ERRNO == EBADF )
-
- tst_resm(TPASS,
- "lseek(-1, 1, SEEK_SET) Failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- else
- tst_resm(TFAIL,
- "lseek(-1, 1, SEEK_SET) Failed, errno=%d : %s, expected %d(EBADF)",
- TEST_ERRNO, strerror(TEST_ERRNO), EBADF);
-
- }
- else
- Tst_count++;
-
- } else {
-
- tst_resm(TFAIL, "lseek(-1, 1, SEEK_SET) returned %d",
- TEST_RETURN);
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/lseek03.c b/winsup/testsuite/winsup.api/ltp/lseek03.c
deleted file mode 100644
index 51c303d..0000000
--- a/winsup/testsuite/winsup.api/ltp/lseek03.c
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : lseek03
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Negative test for lseek(2) whence
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 2
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Richard Logan
- *
- * CO-PILOT : William Roske
- *
- * DATE STARTED : 04/25/94
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) lseek(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the lseek(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * lseek(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-void rec_sigsys(int);
-
-const char *TCID="lseek03"; /* Test program identifier. */
-int TST_TOTAL=3; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-char fname[255];
-int fd;
-int Rec_sigsys = 0;
-
-int Whences[] = { 4, -1, 7 };
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- unsigned ind;
- int whence;
-
- TST_TOTAL=sizeof(Whences)/sizeof(int);
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
-
- signal(SIGSYS, rec_sigsys);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- for (ind=0; ind<sizeof(Whences)/sizeof(int); ind++) {
-
- whence=Whences[ind];
-
- /*
- * On IRIX systems, the SIGSYS signal is also sent.
- */
- Rec_sigsys=0;
-
- /*
- * Call lseek(2)
- */
- TEST(lseek(fd, (long)1, whence));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- if ( STD_FUNCTIONAL_TEST ) {
-
- if ( TEST_ERRNO == EINVAL )
-#if defined(sgi)
- if ( Rec_sigsys ) {
- tst_resm(TPASS,
- "lseek(%s, 1, %d) Failed as expected, errno=%d : %s\n\
-and SIGSYS signal was received.",
- fname, whence, TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- tst_resm(TFAIL,
- "lseek(%s, 1, %d) Failed as expected, errno=%d : %s\n\
-But SIGSYS signal was NOT received.",
- fname, whence, TEST_ERRNO, strerror(TEST_ERRNO));
- }
-#elif defined(linux) || defined (__CYGWIN__)
- tst_resm(TPASS,
- "lseek(%s, 1, %d) Failed, errno=%d : %s",
- fname, whence, TEST_ERRNO, strerror(TEST_ERRNO));
-#endif
- else
- tst_resm(TFAIL,
- "lseek(%s, 1, %d) Failed, errno=%d %s, expected %d(EINVAL)",
- fname, whence, TEST_ERRNO, strerror(TEST_ERRNO),
- EINVAL);
- }
-
- else
- Tst_count++;
- } else {
-
- tst_resm(TFAIL, "lseek(%s, 1, %d) returned %d",
- fname, whence, TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/*
- * signal handler for the SIGSYS signal.
- */
-void
-rec_sigsys(int sig)
-{
- Rec_sigsys++;
-
- signal(sig, rec_sigsys);
-}
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- sprintf(fname,"tfile_%d",getpid());
- if ((fd = open(fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
- /* Pause if that option was specified */
- TEST_PAUSE;
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* close the file we have open */
- if (close(fd) == -1) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s", fname, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/lseek04.c b/winsup/testsuite/winsup.api/ltp/lseek04.c
deleted file mode 100644
index faba3f1..0000000
--- a/winsup/testsuite/winsup.api/ltp/lseek04.c
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : lseek04
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Negative test for lseek(2) of a fifo
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Richard Logan
- *
- * CO-PILOT : William Roske
- *
- * DATE STARTED : 04/25/94
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) lseek(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the lseek(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * lseek(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-
-
-const char *TCID="lseek04"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char Fname[255];
-int Fd;
-
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call lseek(2)
- */
- TEST(lseek(Fd, (long)1, SEEK_SET));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- if ( STD_FUNCTIONAL_TEST ) {
-
- if ( TEST_ERRNO == ESPIPE )
- tst_resm(TPASS,
- "lseek(fifofd, 1, SEEK_SET) Failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- else
- tst_resm(TFAIL,
- "lseek(fifofd, 1, SEEK_SET) Failed, errno=%d %s, expected %d(ESPIPE)",
- TEST_ERRNO, strerror(TEST_ERRNO),
- EINVAL);
- }
- else
- Tst_count++;
- } else {
-
- tst_resm(TFAIL, "lseek(fifofd, 1, SEEK_SET) returned %d",
- TEST_RETURN);
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(Fname,"tfile_%d",getpid());
- if ( mkfifo(Fname,0700) == -1) {
- tst_brkm(TBROK, cleanup,
- "mkfifo(%s, 0700) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- }
-
- if ( (Fd=open(Fname, O_RDWR, 0777)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR, 0777) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- }
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* close the file we have open */
- if (close(Fd) == -1) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s", Fname, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/lseek05.c b/winsup/testsuite/winsup.api/ltp/lseek05.c
deleted file mode 100644
index 8867086..0000000
--- a/winsup/testsuite/winsup.api/ltp/lseek05.c
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : lseek05
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Negative test for lseek(2) of a pipe
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Richard Logan
- *
- * CO-PILOT : William Roske
- *
- * DATE STARTED : 04/25/94
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) lseek(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the lseek(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * lseek(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-
-
-const char *TCID="lseek05"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-int Fd;
-
-/***********************************************************************
- * Main
- ***********************************************************************/
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call lseek(2)
- */
- TEST(lseek(Fd, (long)1, SEEK_SET));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- if ( STD_FUNCTIONAL_TEST ) {
-
- if ( TEST_ERRNO == ESPIPE )
- tst_resm(TPASS,
- "lseek(pipefd, 1, SEEK_SET) Failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- else
- tst_resm(TFAIL,
- "lseek(pipefd, 1, SEEK_SET) Failed, errno=%d %s, expected %d(ESPIPE)",
- TEST_ERRNO, strerror(TEST_ERRNO),
- EINVAL);
- }
- else
- Tst_count++;
- } else {
-
- tst_resm(TFAIL, "lseek(pipefd, 1, SEEK_SET) returned %d",
- TEST_RETURN);
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- int fds[2];
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- if ( pipe(fds) == -1) {
- tst_brkm(TBROK, cleanup,
- "pipe(&fds) Failed, errno=%d : %s", errno, strerror(errno));
- }
- Fd = fds[0];
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* close the file we have open */
- if (close(Fd) == -1) {
- tst_resm(TWARN, "close(%d) Failed, errno=%d : %s", Fd, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/lseek06.c b/winsup/testsuite/winsup.api/ltp/lseek06.c
deleted file mode 100644
index f62c342..0000000
--- a/winsup/testsuite/winsup.api/ltp/lseek06.c
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: lseek01
- *
- * Test Description:
- * Verify that, lseek() call succeeds to set the file pointer position
- * to less than or equal to the file size, when a file is opened for
- * read or write.
- *
- * Expected Result:
- * lseek() should return the offset from the beginning of the file measured
- * in bytes. Also check if able to read valid data from this location.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- * Create temporary directory.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.
- *
- * Usage: <for command-line>
- * lseek01 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * None.
- */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <utime.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <signal.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define OFFSET 4
-#define TEMP_FILE "tmp_file"
-#define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
-
-const char *TCID="lseek01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int fildes; /* file handle for temp file */
-
-void setup(); /* Main setup function of test */
-void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- char read_buf[1]; /* data read from temp. file */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /* Perform global setup for test */
- setup();
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Invoke lseek(2) to move the read/write file
- * pointer/handle by OFFSET bytes.
- */
- TEST(lseek(fildes, OFFSET, SEEK_SET));
-
- /* check return code of lseek(2) */
- if (TEST_RETURN == (off_t)-1) {
- tst_resm(TFAIL, "lseek on (%s) Failed, errno=%d : %s",
- TEMP_FILE, TEST_ERRNO, strerror(TEST_ERRNO));
- continue;
- }
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- /*
- * Check if the return value from lseek(2)
- * is equal to the specified OFFSET value.
- */
- if (TEST_RETURN != OFFSET) {
- tst_resm(TFAIL, "lseek() returned incorrect "
- "value %d, expected %d",
- TEST_RETURN, OFFSET);
- continue;
- }
- /*
- * The return value is good, now check data.
- * Read the data byte from this location.
- */
- if (read(fildes, &read_buf, sizeof(read_buf)) < 0) {
- tst_brkm(TFAIL, cleanup, "read() failed "
- "on %s, error=%d", TEMP_FILE, errno);
- } else {
- /*
- * Check if read byte is the expected character.
- * For pos 4 ---> 'e'
- */
- if (read_buf[0] != 'e') {
- tst_resm(TFAIL, "Incorrect data read "
- "from file %s", TEMP_FILE);
- } else {
- tst_resm(TPASS, "Functionality "
- "of lseek() on %s "
- "successful", TEMP_FILE);
- }
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- * Create a temporary directory and change directory to it.
- * Create a test file under temporary directory and write some
- * data into it.
- */
-void
-setup()
-{
- char write_buf[BUFSIZ]; /* buffer to hold data */
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Get the data to be written to temporary file */
- strcpy(write_buf, "abcdefg");
-
- /* Creat/open a temporary file under above directory */
- if ((fildes = open(TEMP_FILE, O_RDWR | O_CREAT, FILE_MODE)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, %#o) Failed, errno=%d :%s",
- TEMP_FILE, FILE_MODE, errno, strerror(errno));
- }
-
- /* Write data into temporary file */
- if(write(fildes, write_buf, strlen(write_buf)) != (int)strlen(write_buf)) {
- tst_brkm(TBROK, cleanup, "write(2) on %s Failed, errno=%d : %s",
- TEMP_FILE, errno, strerror(errno));
- }
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Remove the test directory and testfile created in the setup.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Close the temporary file created */
- if (close(fildes) < 0) {
- tst_brkm(TFAIL, NULL, "close(%s) Failed, errno=%d : %s:",
- TEMP_FILE, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/lseek07.c b/winsup/testsuite/winsup.api/ltp/lseek07.c
deleted file mode 100644
index c5a27b5..0000000
--- a/winsup/testsuite/winsup.api/ltp/lseek07.c
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: lseek02
- *
- * Test Description:
- * Verify that, lseek() call succeeds to set the file pointer position
- * to more than the file size, when a file is opened for reading/writing.
- *
- * Expected Result:
- * lseek() should return n+1, where n is the size of the file.
- * Also when some data is written into this file it should start
- * from that offset.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- * Create temporary directory.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.
- *
- * Usage: <for command-line>
- * lseek02 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * None.
- */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <utime.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <signal.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define TEMP_FILE "tmp_file"
-#define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
-
-const char *TCID="lseek02"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int fildes; /* file handle for temp file */
-size_t file_size; /* size of temporary file */
-char write_buf1[BUFSIZ]; /* buffer to hold data */
-char write_buf2[BUFSIZ]; /* buffer to hold data */
-
-void setup(); /* Main setup function of test */
-void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- char read_buf[BUFSIZ]; /* data read from temp. file */
- off_t offset; /* byte position in temporary file */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /* Perform global setup for test */
- setup();
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /* Set the offset position */
- offset = file_size + (lc * strlen(write_buf2));
-
- /*
- * Invoke lseek(2) to move the write file
- * pointer/handle by the specified offset value.
- */
- TEST(lseek(fildes, offset, SEEK_SET));
-
- /* check return code of lseek(2) */
- if (TEST_RETURN == (off_t)-1) {
- tst_resm(TFAIL, "lseek on (%s) Failed, errno=%d : %s",
- TEMP_FILE, TEST_ERRNO, strerror(TEST_ERRNO));
- continue;
- }
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- /*
- * Check if the return value from lseek(2)
- * is equal to the specified offset value.
- */
- if (TEST_RETURN != offset) {
- tst_resm(TFAIL, "lseek() returned "
- "incorrect value %d, expected "
- "%d", TEST_RETURN, offset);
- continue;
- }
- /*
- * The return value is okay, now write some data at
- * the current offset position.
- */
- if (write(fildes, write_buf2, strlen(write_buf2)) !=
- (int)strlen(write_buf2)) {
- tst_brkm(TFAIL, cleanup, "write() failed to "
- "write additional data, error = %d",
- errno);
- }
-
- /*
- * Now close the file and open it again
- * and read all of the data.
- */
- if (close(fildes) < 0) {
- tst_brkm(TFAIL, cleanup, "close() on %s Failed,"
- " errno = %d", TEMP_FILE, errno);
- }
-
- /* Open the file again in read/write mode */
- if ((fildes = open(TEMP_FILE, O_RDWR)) < 0) {
- tst_brkm(TFAIL, cleanup, "Could not open the "
- "%s readonly, error = %d",
- TEMP_FILE, errno);
- }
-
- /*
- * Now read all of the data. The size should be the
- * offset + strlen(write_buf2).
- */
- if (read(fildes, &read_buf, (offset +
- strlen(write_buf2))) < 0) {
- tst_brkm(TFAIL, cleanup, "read() failed on %s, "
- "error=%d", TEMP_FILE, errno);
- } else {
- /*
- * Check data read is the complete data and not
- * the only portion written.
- */
- if ((strncmp(read_buf, write_buf1,
- strlen(write_buf1))) != 0) {
- tst_brkm(TFAIL, cleanup,
- "Incorrect data read #1 from "
- "file %s", TEMP_FILE);
- }
- if ((strncmp(&read_buf[offset], write_buf2,
- strlen(write_buf2))) != 0) {
- tst_brkm(TFAIL, cleanup,
- "Incorrect data read #2 from "
- "file %s", TEMP_FILE);
- }
- tst_resm(TPASS, "Functionality of "
- "lseek() on %s successful", TEMP_FILE);
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- * Create a temporary directory and change directory to it.
- * Create a test file under temporary directory and write some
- * data into it.
- * Get the size of the file using fstat().
- */
-void
-setup()
-{
- struct stat stat_buf; /* struct buffer for stat(2) */
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Get the data to be written to temporary file */
- strcpy(write_buf1, "abcdefg");
- strcpy(write_buf2, "ijk");
-
- /* Creat/open a temporary file for writing under above directory */
- if ((fildes = open(TEMP_FILE, O_WRONLY | O_CREAT, FILE_MODE)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_WRONLY|O_CREAT, %#o) Failed, errno=%d :%s",
- TEMP_FILE, FILE_MODE, errno, strerror(errno));
- }
-
- /* Write data into temporary file */
- if(write(fildes, write_buf1, strlen(write_buf1)) !=
- (int)strlen(write_buf1)) {
- tst_brkm(TBROK, cleanup, "write(2) on %s Failed, errno=%d : %s",
- TEMP_FILE, errno, strerror(errno));
- }
-
- /* Get the size of the temporary file after writing data */
- if (fstat(fildes, &stat_buf) < 0) {
- tst_brkm(TBROK, cleanup, "fstat() on %s Failed, errno=%d : %s",
- TEMP_FILE, errno, strerror(errno));
- }
-
- file_size = stat_buf.st_size;
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Remove the test directory and testfile created in the setup.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Close the temporary file created */
- if (close(fildes) < 0) {
- tst_brkm(TFAIL, NULL, "close(%s) Failed, errno=%d : %s:",
- TEMP_FILE, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/lseek08.c b/winsup/testsuite/winsup.api/ltp/lseek08.c
deleted file mode 100644
index 32fdcc0..0000000
--- a/winsup/testsuite/winsup.api/ltp/lseek08.c
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: lseek03
- *
- * Test Description:
- * Verify that, lseek() call succeeds to set the file pointer position
- * to the end of the file when 'whence' value set to SEEK_END and any
- * attempts to read from that position should fail.
- *
- * Expected Result:
- * lseek() should return the offset which is set to the file size measured
- * in bytes. read() attempt should fail with -1 return value.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.
- *
- * Usage: <for command-line>
- * lseek03 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * None.
- */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <utime.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <signal.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define TEMP_FILE "tmp_file"
-#define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
-
-const char *TCID="lseek03"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int fildes; /* file handle for temp file */
-ssize_t file_size; /* size of the temporary file */
-
-void setup(); /* Main setup function of test */
-void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- char read_buf[1]; /* data read from temp. file */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /* Perform global setup for test */
- setup();
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Invoke lseek(2) to move the read/write file
- * pointer/handle to the END of the file.
- */
- TEST(lseek(fildes, 0, SEEK_END));
-
- /* check return code of lseek(2) */
- if (TEST_RETURN == (off_t)-1) {
- tst_resm(TFAIL, "lseek on (%s) Failed, errno=%d : %s",
- TEMP_FILE, TEST_ERRNO, strerror(TEST_ERRNO));
- continue;
- }
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- /*
- * Check if the return value from lseek(2)
- * is equal to the file_size.
- */
- if (TEST_RETURN != file_size) {
- tst_resm(TFAIL, "lseek() returned incorrect "
- "value %d, expected %d",
- TEST_RETURN, file_size);
- continue;
- }
- /*
- * The return value is okay, now attempt to read data
- * from the file. This should fail as the file pointer
- * should be pointing to END OF FILE.
- */
- read_buf[0] = '\0';
- if (read(fildes, &read_buf, sizeof(read_buf)) > 0) {
- tst_resm(TFAIL, "read() successful on %s",
- TEMP_FILE);
- } else {
- tst_resm(TPASS, "Functionality of lseek() on "
- "%s successful", TEMP_FILE);
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /* NOTREACHED*/
-} /* End main */
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- * Create a temporary directory and change directory to it.
- * Create a test file under temporary directory and write some
- * data into it.
- * Get the size of the file using fstat().
- */
-void
-setup()
-{
- struct stat stat_buf; /* struct. buffer for stat(2) */
- char write_buf[BUFSIZ]; /* buffer to hold data */
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Get the data to be written to temporary file */
- strcpy(write_buf, "abcdefg\n");
-
- /* Creat/open a temporary file under above directory */
- if ((fildes = open(TEMP_FILE, O_RDWR | O_CREAT, FILE_MODE)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, %#o) Failed, errno=%d :%s",
- TEMP_FILE, FILE_MODE, errno, strerror(errno));
- }
-
- /* Write data into temporary file */
- if(write(fildes, write_buf, strlen(write_buf)) <= 0) {
- tst_brkm(TBROK, cleanup,
- "write(2) on %s Failed, errno=%d : %s",
- TEMP_FILE, errno, strerror(errno));
- }
-
- /* Get the size of the file using fstat */
- if (fstat(fildes, &stat_buf) < 0) {
- tst_brkm(TBROK, cleanup,
- "fstat(2) on %s Failed, errno=%d : %s",
- TEMP_FILE, errno, strerror(errno));
- }
-
- file_size = stat_buf.st_size;
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Remove the test directory and testfile created in the setup.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Close the temporary file created */
- if (close(fildes) < 0) {
- tst_brkm(TFAIL, NULL,
- "close(%s) Failed, errno=%d : %s:",
- TEMP_FILE, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/lseek09.c b/winsup/testsuite/winsup.api/ltp/lseek09.c
deleted file mode 100644
index 36688c6..0000000
--- a/winsup/testsuite/winsup.api/ltp/lseek09.c
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: lseek04
- *
- * Test Description:
- * Verify that, lseek() call succeeds to set the file pointer position
- * to the current specified location, when 'whence' value is set to
- * SEEK_CUR and the data read from the specified location should match
- * the expected data.
- *
- * Expected Result:
- * lseek() should return the specified offset from the beginning of the file
- * measured in bytes. The data read from this location should match the
- * expected data.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.
- *
- * Usage: <for command-line>
- * lseek04 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * None.
- */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <utime.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <signal.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define TEMP_FILE "tmp_file"
-#define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
-
-const char *TCID="lseek04"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int fildes; /* file handle for temp file */
-size_t file_size; /* total size of file after data write */
-
-void setup(); /* Main setup function of test */
-void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- char read_buf[BUFSIZ]; /* data read from temp. file */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /* Perform global setup for test */
- setup();
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Invoke lseek(2) to set the file
- * pointer/handle from the current location
- * of the file descriptor + specified offset.
- */
- TEST(lseek(fildes, 1, SEEK_CUR));
-
- /* check return code of lseek(2) */
- if (TEST_RETURN == (off_t)-1) {
- tst_resm(TFAIL, "lseek on (%s) Failed, errno=%d : %s",
- TEMP_FILE, TEST_ERRNO, strerror(TEST_ERRNO));
- continue;
- }
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- /*
- * Check if the return value from lseek(2) is equal
- * to the 3 positions from the beginning of the file.
- * ie, 2 positions from lseek() in the setup +
- * 1 position from above above.
- */
- if (TEST_RETURN != 3) {
- tst_resm(TFAIL, "lseek() returned incorrect "
- "value %d, expected 4", TEST_RETURN);
- continue;
- }
- /*
- * Read the data byte from this location.
- */
- read_buf[0] = '\0';
- if (read(fildes, &read_buf, (file_size - 3)) < 0) {
- tst_brkm(TFAIL, cleanup,
- "read() failed on %s, error=%d",
- TEMP_FILE, errno);
- } else {
- /*
- * Check if read data contains
- * expected characters
- * From pos 4 ---> 'defg'.
- */
- if (memcmp(read_buf, "defg", 4)) {
- tst_resm(TFAIL, "Incorrect data read "
- "from file %s", TEMP_FILE);
- } else {
- tst_resm(TPASS, "Functionality of "
- "lseek() on %s successful",
- TEMP_FILE);
- }
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
-
- /* reset file pointer in case we are looping */
- if (lseek(fildes, 2, SEEK_SET) == -1) {
- tst_brkm(TBROK, cleanup, "lseek failed - could not "
- "reset file pointer");
- }
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- * Create a temporary directory and change directory to it.
- * Create a test file under temporary directory and write some
- * data into it.
- * Get the size of the file using fstat().
- */
-void
-setup()
-{
- struct stat stat_buf; /* buffer to hold stat info. */
- char write_buf[BUFSIZ]; /* buffer to hold data */
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Get the data to be written to temporary file */
- strcpy(write_buf, "abcdefg");
-
- /* Creat/open a temporary file under above directory */
- if ((fildes = open(TEMP_FILE, O_RDWR | O_CREAT, FILE_MODE)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, %#o) Failed, errno=%d :%s",
- TEMP_FILE, FILE_MODE, errno, strerror(errno));
- }
-
- /* Write data into temporary file */
- if(write(fildes, write_buf, strlen(write_buf)) <= 0) {
- tst_brkm(TBROK, cleanup, "write(2) on %s Failed, errno=%d : %s",
- TEMP_FILE, errno, strerror(errno));
- }
-
- /* Get the temporary file information */
- if (fstat(fildes, &stat_buf) < 0) {
- tst_brkm(TBROK, cleanup, "fstat(2) on %s Failed, errno=%d : %s",
- TEMP_FILE, errno, strerror(errno));
- }
-
- file_size = stat_buf.st_size;
-
- /*
- * Reset the file pointer position to the specified offset
- * from the beginning of the file.
- */
- if (lseek(fildes, 2, SEEK_SET) != 2) {
- tst_brkm(TBROK, cleanup,
- "lseek() fails to set file ptr. to specified offset");
- }
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Remove the test directory and testfile created in the setup.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Close the temporary file created */
- if (close(fildes) < 0) {
- tst_brkm(TFAIL, NULL, "close(%s) Failed, errno=%d : %s:",
- TEMP_FILE, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/lseek10.c b/winsup/testsuite/winsup.api/ltp/lseek10.c
deleted file mode 100644
index ab3cc6b..0000000
--- a/winsup/testsuite/winsup.api/ltp/lseek10.c
+++ /dev/null
@@ -1,344 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: lseek05
- *
- * Test Description:
- * Verify that,
- * 1. lseek() returns -1 and sets errno to ESPIPE, if the file handle of
- * the specified file is associated with a pipe, socket, or FIFO.
- * 2. lseek() returns -1 and sets errno to EINVAL, if the 'Whence' argument
- * is not a proper value.
- * 3. lseek() returns -1 and sets errno to EBADF, if the file handle of
- * the specified file is not valid.
- *
- * Expected Result:
- * lseek() should fail with return value -1 and set expected errno.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * if errno set == expected errno
- * Issue sys call fails with expected return value and errno.
- * Otherwise,
- * Issue sys call fails with unexpected errno.
- * Otherwise,
- * Issue sys call returns unexpected value.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory(s)/file(s) created.
- *
- * Usage: <for command-line>
- * lseek05 [-c n] [-e] [-i n] [-I x] [-p x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * None.
- */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <utime.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <signal.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define TEMP_FILE1 "tmp_file1"
-#define TEMP_FILE2 "tmp_file2"
-#define TEMP_FILE3 "tmp_file3"
-#define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
-#define PIPE_MODE S_IFIFO | S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
-#define SEEK_TOP 10
-
-const char *TCID="lseek05"; /* Test program identifier. */
-int TST_TOTAL=3; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int exp_enos[]={ESPIPE, EINVAL, EBADF, 0};
-
-int no_setup();
-int setup1(); /* setup function to test lseek() for ESPIPE */
-int setup2(); /* setup function to test lseek() for EINVAL */
-int setup3(); /* setup function to test lseek() for EBADF */
-
-int fd1; /* file handle for testfile1 */
-int fd2; /* file handle for testfile2 */
-int fd3; /* file handle for testfile3 */
-
-struct test_case_t { /* test case struct. to hold ref. test cond's*/
- int fd;
- int Whence;
- const char *desc;
- int exp_errno;
- int (*setupfunc)();
-} Test_cases[] = {
- { 1, SEEK_SET, "'fd' associated with a pipe/fifo", ESPIPE, setup1 },
- { 2, SEEK_TOP, "'whence' argument is not valid", EINVAL, setup2 },
- { 3, SEEK_SET, "'fd' is not an open file descriptor", EBADF, setup3 },
- { 0, 0, NULL, 0, no_setup }
-};
-
-void setup(); /* Main setup function of test */
-void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- int fildes; /* file handle for testfile */
- int whence; /* position of file handle in the file */
- const char *test_desc; /* test specific error message */
- int ind; /* counter to test different test conditions */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /* Perform global setup for test */
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- for (ind = 0; Test_cases[ind].desc != NULL; ind++) {
- fildes = Test_cases[ind].fd;
- test_desc = Test_cases[ind].desc;
- whence = Test_cases[ind].Whence;
-
- /* Assign the 'fd' values appropriatly */
- if (fildes == 1) {
- fildes = fd1;
- } else if (fildes == 2) {
- fildes = fd2;
- } else {
- fildes = fd3;
- }
- /*
- * Invoke lseek(2) to test different test conditions.
- * Verify that it fails with -1 return value and
- * sets appropriate errno.
- */
- TEST(lseek(fildes, 0, whence));
-
- /* check return code of lseek(2) */
- if (TEST_RETURN != (off_t)-1) {
- tst_resm(TFAIL, "lseek() returned %d, expected "
- "-1, errno:%d", TEST_RETURN,
- Test_cases[ind].exp_errno);
- continue;
- }
- TEST_ERROR_LOG(TEST_ERRNO);
- if (TEST_ERRNO == Test_cases[ind].exp_errno) {
- tst_resm(TPASS, "lseek() fails, %s, errno:%d",
- test_desc, TEST_ERRNO);
- } else {
- tst_resm(TFAIL, "lseek() fails, %s, errno:%d, "
- "expected errno:%d", test_desc,
- TEST_ERRNO, Test_cases[ind].exp_errno);
- }
- }
- }
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- * Create a temporary directory and change directory to it.
- * Invoke individual test setup functions according to the order
- * set in test struct. definition.
- */
-void
-setup()
-{
- int ind; /* counter for test setup function */
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* call individual setup functions */
- for (ind = 0; Test_cases[ind].desc != NULL; ind++) {
- Test_cases[ind].setupfunc();
- }
-}
-
-/*
- * no_setup() - This is a dummy function which simply returns 0.
- */
-int
-no_setup()
-{
- return 0;
-}
-
-/*
- * setup1() - setup function for a test condition for which lseek(2)
- * returns -1 and sets errno to ESPIPE.
- * Creat a named pipe/fifo using mknod() and open it for
- * reading/writing.
- * This function returns 0 on success.
- */
-int
-setup1()
-{
- /* Creat a named pipe/fifo using mknod() */
- if (mknod(TEMP_FILE1, PIPE_MODE, 0) < 0) {
- tst_brkm(TBROK, cleanup,
- "mknod(%s, %#o, 0) Failed, errno=%d :%s",
- TEMP_FILE1, FILE_MODE, errno, strerror(errno));
- }
-
- /* Open the named pipe/fifo for reading/writing */
- if ((fd1 = open(TEMP_FILE1, O_RDWR)) < 0) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR) Failed, errno=%d, :%s",
- TEMP_FILE1, errno, strerror(errno));
- }
-
- return 0;
-}
-
-/*
- * setup2() - setup function for a test condition for which lseek(2)
- * returns -1 and sets errno to EINVAL.
- * Creat a temporary file for reading/writing and write some data
- * into it.
- * This function returns 0 on success.
- */
-int
-setup2()
-{
- char write_buff[BUFSIZ]; /* buffer to hold data */
-
- /* Get the data to be written to temporary file */
- strcpy(write_buff, "abcdefg");
-
- /* Creat/open a temporary file under above directory */
- if ((fd2 = open(TEMP_FILE2, O_RDWR | O_CREAT, FILE_MODE)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, %#o) Failed, errno=%d :%s",
- TEMP_FILE2, FILE_MODE, errno, strerror(errno));
- }
-
- /* Write data into temporary file */
- if(write(fd2, write_buff, sizeof(write_buff)) <= 0) {
- tst_brkm(TBROK, cleanup,
- "write(2) on %s Failed, errno=%d : %s",
- TEMP_FILE2, errno, strerror(errno));
- }
-
- return 0;
-}
-
-/*
- * setup3() - setup function for a test condition for which lseek(2)
- * returns -1 and sets errno to EBADF.
- * Creat a temporary file for reading/writing and close it.
- * This function returns 0 on success.
- */
-int
-setup3()
-{
- /* Creat/open a temporary file under above directory */
- if ((fd3 = open(TEMP_FILE3, O_RDWR | O_CREAT, FILE_MODE)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, %#o) Failed, errno=%d :%s",
- TEMP_FILE3, FILE_MODE, errno, strerror(errno));
- }
-
- /* Close the temporary file created above */
- if (close(fd3) < 0) {
- tst_brkm(TBROK, cleanup,
- "close(%s) Failed, errno=%d : %s:",
- TEMP_FILE3, errno, strerror(errno));
- }
-
- return 0;
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Remove the test directory and testfile(s) created in the setup.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Close the temporary file(s) created in setup1/setup2*/
- if (close(fd1) < 0) {
- tst_brkm(TFAIL, NULL,
- "close(%s) Failed, errno=%d : %s:",
- TEMP_FILE1, errno, strerror(errno));
- }
- if (close(fd2) < 0) {
- tst_brkm(TFAIL, NULL,
- "close(%s) Failed, errno=%d : %s:",
- TEMP_FILE2, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/lstat02.c b/winsup/testsuite/winsup.api/ltp/lstat02.c
deleted file mode 100644
index eed8f78..0000000
--- a/winsup/testsuite/winsup.api/ltp/lstat02.c
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : lstat02
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for lstat(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) lstat(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the lstat(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * lstat(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="lstat02"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char fname[255], lname[255], symlnk[255], buf[255];
-int fd;
-struct stat statter;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call lstat(2)
- */
- TEST(lstat(symlnk, &statter));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "lstat(%s, &statter) Failed, errno=%d : %s", symlnk,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "lstat(%s, &statter) returned %d", symlnk, TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(fname,"tfile_%d",getpid());
- if ((fd = open(fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- } else if (close(fd) == -1) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
-
- sprintf(symlnk,"lnfile_%d",getpid());
- if (symlink(fname, symlnk) == -1) {
- tst_resm(TWARN, "symlink(%s, %s) Failed, errno=%d : %s",
- fname, symlnk, errno, strerror(errno));
- } else if (readlink(symlnk, buf, 255) == -1) {
- tst_resm(TWARN, "readlink(%s, buf, 255) Failed, errno=%d : %s",
- symlnk, errno, strerror(errno));
- } else if (strcmp(buf, fname) != 0) {
- tst_resm(TWARN,
- "Setup Failure : Expected symbolic link contents of %s : Actual is %s",
- fname, buf);
- }
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/mkdir01.c b/winsup/testsuite/winsup.api/ltp/mkdir01.c
deleted file mode 100644
index 5772f06..0000000
--- a/winsup/testsuite/winsup.api/ltp/mkdir01.c
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : mkdir01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic errno test for mkdir(2)
- *
- * PARENT DOCUMENT : mkstds02
- *
- * TEST CASE TOTAL : 2
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Bill Branum
- *
- * CO-PILOT : Kathy Olmsted
- *
- * DATE STARTED : 4/15/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * mkdir(2) test for errno(s) EFAULT.
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * DETAILED DESCRIPTION
- * This test will verify that mkdir(2) returns a value of
- * -1 and sets errno to EFAULT when the path argument points
- * outside (above/below) the allocated address space of the
- * process.
- *
- * Setup:
- * Setup signal handling.
- * Create and make current a temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno.
- * If doing functional test
- * check the errno returned and print result message
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Remove the temporary directory.
- * Exit.
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-
-char *get_high_address();
-
-const char *TCID="mkdir01"; /* Test program identifier. */
-int TST_TOTAL=2; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={EFAULT, 0}; /* List must end with 0 */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * TEST CASE: 1
- * mkdir() call with pointer below allocated address space.
- */
-
- /* Call mkdir(2) */
- TEST(mkdir((char *)-1,0777));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- }
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- if ( TEST_RETURN == -1 ) {
- if (TEST_ERRNO == EFAULT) {
- tst_resm(TPASS, "mkdir - path argument pointing below allocated address space failed as expected with errno %d : %s", TEST_ERRNO, strerror(TEST_ERRNO));
- }
- else {
- tst_resm(TFAIL, "mkdir - path argument pointing below allocated address space failed with errno %d : %s but expected %d (EFAULT)", TEST_ERRNO, strerror(TEST_ERRNO),EFAULT);
- }
- }
- else {
- tst_resm(TFAIL, "mkdir - path argument pointing below allocated address space succeeded unexpectedly.");
-
- }
- }
-
-
- /*
- * TEST CASE: 2
- * mkdir() call with pointer above allocated address space.
- */
-
- /* Call mkdir(2) */
- TEST(mkdir(get_high_address(),0777));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- }
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- if ( TEST_RETURN == -1 ) {
- if (TEST_ERRNO == EFAULT) {
- tst_resm(TPASS, "mkdir - path argument pointing above allocated address space failed as expected with errno %d : %s", TEST_ERRNO, strerror(TEST_ERRNO));
- }
- else {
- tst_resm(TFAIL, "mkdir - path argument pointing above allocated address space failed with errno %d : %s but expected %d (EFAULT)", TEST_ERRNO, strerror(TEST_ERRNO),EFAULT);
- }
- }
- else {
- tst_resm(TFAIL, "mkdir - path argument pointing above allocated address space succeeded unexpectedly.");
-
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Create a temporary directory and make it current. */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /*
- * Remove the temporary directory.
- */
- tst_rmdir();
-
- /*
- * Exit with return code appropriate for results.
- */
- tst_exit();
-
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/mkdir08.c b/winsup/testsuite/winsup.api/ltp/mkdir08.c
deleted file mode 100644
index d1cc193..0000000
--- a/winsup/testsuite/winsup.api/ltp/mkdir08.c
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : mkdir08
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for mkdir(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) mkdir(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the mkdir(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * mkdir(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="mkdir08"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char fname[255];
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call mkdir(2)
- */
- TEST(mkdir(fname, 0777));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "mkdir(%s) Failed, errno=%d : %s", fname,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "mkdir(%s) returned %d", fname, TEST_RETURN);
- }
- if(rmdir(fname) == -1) {
- tst_brkm(TBROK, cleanup, "rmdir(%s) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(fname, "./dir_%d", getpid());
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/mknod01.c b/winsup/testsuite/winsup.api/ltp/mknod01.c
deleted file mode 100644
index e25194e..0000000
--- a/winsup/testsuite/winsup.api/ltp/mknod01.c
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : mknod01
- *
- * EXECUTED BY : root
- *
- * TEST TITLE : Basic test for mknod(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 4
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 05/13/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) mknod(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the mknod(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * mknod(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-
-
-const char *TCID="mknod01"; /* Test program identifier. */
-int TST_TOTAL; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-char Path[1024]; /* path to create */
-int i; /* counter for test case loop */
-int tcases[] = { /* modes to give nodes created (1 per text case) */
- S_IFREG|0777, /* ordinary file with mode 0777 */
- S_IFIFO|0777, /* fifo special with mode 0777 */
- S_IFCHR|0777, /* character special with mode 0777 */
- S_IFBLK|0777, /* block special with mode 0777 */
-
- S_IFREG|04700, /* ordinary file with mode 04700 (suid) */
- S_IFREG|02700, /* ordinary file with mode 02700 (sgid) */
- S_IFREG|06700, /* ordinary file with mode 06700 (sgid & suid) */
-
-#ifdef CRAY
- S_IFDIR|0777, /* Direcory */
- S_IRESTART|0400, /* restartbit */
-#ifdef S_IFOFD
- S_IFOFD|0777, /* off line, with data */
-#endif
-#ifdef S_IFOFL
- S_IFOFL|0777, /* off line, with no data */
-#endif
-#endif /* CRAY */
-
-};
-
-
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- TST_TOTAL=(sizeof(tcases)/sizeof(tcases[0]));
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
-
- /*
- * TEST CASES:
- * Make nodes in tcases array
- */
- for(i=0; i<TST_TOTAL; i++) {
- /* Call mknod(2) */
- TEST(mknod(Path, tcases[i], 0));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "mknod(%s, %#o, 0) failed, errno=%d : %s",
- Path, tcases[i], TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "mknod(%s, %#o, 0) returned %d",
- Path, tcases[i], TEST_RETURN);
- }
- }
-
- /* remove the node for the next go `round */
- if (unlink(Path) == -1 ) {
- if ( rmdir(Path) == -1 ) {
- tst_resm(TWARN, "unlink(%s) & rmdir(%s) failed, errno:%d %s",
- Path, Path, errno, strerror(errno));
- }
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp dir and cd to it */
- tst_tmpdir();
-
-#ifndef __CYGWIN__
- /* Check that user is root */
- if ( geteuid() != 0 )
- tst_brkm(TBROK, cleanup, "Must be root for this test!");
-#endif
-
- /* build a temp node name to bre created my mknod */
- sprintf(Path, "./tnode_%d", getpid());
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* remove files and temp dir */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/mmap001.c b/winsup/testsuite/winsup.api/ltp/mmap001.c
deleted file mode 100644
index 6c47d49..0000000
--- a/winsup/testsuite/winsup.api/ltp/mmap001.c
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * mmap001.c - Tests mmapping a big file and writing it once
- *
- * Copyright (C) 2000 Juan Quintela <quintela@fi.udc.es>
- * Aaron Laffin <alaffin@sgi.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-#include <errno.h>
-#include <string.h>
-
-#include "test.h"
-#include "usctest.h"
-
-const char *TCID="mmap001";
-int TST_TOTAL=5;
-extern int Tst_count;
-static char *filename=NULL;
-static int m_opt = 0;
-static char *m_copt;
-
-void cleanup()
-{
- /*
- * remove the tmp directory and exit
- */
-
- if ( filename )
- free(filename);
-
- TEST_CLEANUP;
-
- tst_rmdir();
-
- tst_exit();
-}
-
-void setup()
-{
- char buf[1024];
- /*
- * setup a default signal hander and a
- * temporary working directory.
- */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- tst_tmpdir();
-
- TEST_PAUSE;
-
- snprintf(buf,1024,"testfile.%d",getpid());
-
- filename = strdup(buf);
-}
-
-void help()
-{
- printf(" -m x size of mmap in pages (default 1000)\n");
-}
-
-/*
- * add the -m option whose parameter is the
- * pages that should be mapped.
- */
-option_t options[] =
-{
- { "m:", &m_opt, &m_copt },
- { NULL, NULL, NULL }
-};
-
-int main(int argc, char * argv[])
-{
- char *array;
- const char *msg;
- int i,lc;
- int fd;
- int pages,memsize;
-
- if ( (msg=parse_opts(argc, argv, options, help)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- if ( m_opt )
- {
- memsize = pages = atoi( m_copt );
-
- if (memsize < 1)
- {
- tst_brkm(TBROK, cleanup, "Invalid arg for -m: %s",m_copt);
- }
-
- memsize *= getpagesize(); /* N PAGES */
-
- }
- else
- {
- /*
- * default size 1000 pages;
- */
- memsize = pages = 1000;
- memsize *= getpagesize();
- }
-
- tst_resm(TINFO,"mmap()ing file of %u pages or %u bytes", pages,memsize);
-
- setup();
-
- for (lc=0; TEST_LOOPING(lc); lc++)
- {
- Tst_count=0;
-
- fd = open(filename, O_RDWR | O_CREAT, 0666);
- if ((fd == -1))
- tst_brkm(TBROK, cleanup, "Problems opening files");
-
- if (lseek(fd, memsize, SEEK_SET) != memsize)
- {
- close(fd);
- tst_brkm(TBROK, cleanup, "Problems doing the lseek: %d: %s",
- errno,strerror(errno));
- }
-
- if (write(fd,"\0",1) !=1)
- {
- close(fd);
- tst_brkm(TBROK, cleanup, "Problems writing: %d: %s",
- errno,strerror(errno));
- }
-
- array = mmap(0, memsize, PROT_WRITE, MAP_SHARED,fd,0);
- if (array == (char *)MAP_FAILED)
- {
- tst_resm(TFAIL, "mmap() failed: %d: %s",
- errno,strerror(errno));
- tst_exit();
- }
- else
- {
- tst_resm(TPASS, "mmap() completed successfully.");
- }
-
- if ( STD_FUNCTIONAL_TEST )
- {
- tst_resm(TINFO,"touching mmaped memory");
-
- for(i = 0; i < memsize; i++)
- {
- array[i] = (char) i;
- }
-
- /*
- * seems that if the map area was bad, we'd get SEGV, hence we can
- * indicate a PASS.
- */
- tst_resm(TPASS, "we're still here, mmaped area must be good");
-
- TEST( msync(array, memsize, MS_SYNC) );
-
- if ( TEST_RETURN == -1 )
- {
- tst_resm(TFAIL, "msync() failed: errno: %d: %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- }
- else
- {
- tst_resm(TPASS, "msync() was successful");
- }
-
- } /* STD_FUNCTIONAL_TEST */
-
- TEST( munmap(array, memsize) );
-
- if ( TEST_RETURN == -1 )
- {
- tst_resm(TFAIL, "munmap() failed: errno: %d: %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- }
- else
- {
- tst_resm(TPASS, "munmap() was successful");
- }
-
- close(fd);
- unlink(filename);
- }
- cleanup();
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/ltp/mmap02.c b/winsup/testsuite/winsup.api/ltp/mmap02.c
deleted file mode 100644
index 33a1273..0000000
--- a/winsup/testsuite/winsup.api/ltp/mmap02.c
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: mmap02
- *
- * Test Description:
- * Call mmap() with prot parameter set to PROT_READ and with the file
- * descriptor being open for read, to map a file creating mapped memory
- * with read access. The minimum file permissions should be 0444.
- *
- * The call should succeed to create the mapped region with required
- * attributes.
- *
- * Expected Result:
- * mmap() should succeed returning the address of the mapped region,
- * the mapped region should contain the contents of the mapped file.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- * Create temporary directory.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print timing stats if options given
- * Delete the temporary directory created.
- *
- * Usage: <for command-line>
- * mmap02 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * None.
- */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define TEMPFILE "mmapfile"
-
-const char *TCID="mmap02"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-char *addr; /* addr of memory mapped region */
-char *dummy; /* dummy string */
-size_t page_sz; /* system page size */
-int fildes = -1; /* file descriptor for temporary file */
-
-void setup(); /* Main setup function of test */
-void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /* Perform global setup for test */
- setup();
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call mmap to map the temporary file 'TEMPFILE'
- * with read access.
- */
- TEST(mmap(0, page_sz, PROT_READ,
- MAP_FILE|MAP_SHARED, fildes, 0));
-
- /* Check for the return value of mmap() */
- if (TEST_RETURN == (int)MAP_FAILED) {
- tst_resm(TFAIL, "mmap() Failed on %s, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- continue;
- }
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- /* Get the mmap return value */
- addr = (char *)TEST_RETURN;
-
- /*
- * Read the file contents into the dummy
- * string.
- */
- if (read(fildes, dummy, page_sz) < 0) {
- tst_brkm(TFAIL, cleanup, "read() on %s Failed, "
- "error:%d", TEMPFILE, errno);
- }
-
- /*
- * Check whether mapped memory region has
- * the file contents.
- */
- if (memcmp(dummy, addr, page_sz)) {
- tst_resm(TFAIL, "mapped memory area contains "
- "invalid data");
- } else {
- tst_resm(TPASS,
- "Functionality of mmap() successful");
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
-
- /* Clean up things in case we are looping */
- /* Unmap the mapped memory */
- if (munmap(addr, page_sz) != 0) {
- tst_brkm(TFAIL, NULL, "munmap() fails to unmap the "
- "memory, errno=%d", errno);
- }
-
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- *
- * Get system page size, allocate and initialize the string dummy.
- * Initialize addr such that it is more than one page below the break
- * address of the process, and initialize one page region from addr
- * with char 'A'.
- * Create a temporary directory a file under it.
- * Write some known data into file and close it.
- * Change mode permissions on file to 0444.
- */
-void
-setup()
-{
- char *tst_buff; /* test buffer to hold known data */
-
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* Get the system page size */
- if ((page_sz = getpagesize()) < 0) {
- tst_brkm(TFAIL, NULL,
- "getpagesize() fails to get system page size");
- tst_exit();
- }
-
- /* Allocate space for the test buffer */
- if ((tst_buff = (char *)calloc(page_sz, sizeof(char))) == NULL) {
- tst_brkm(TFAIL, NULL,
- "calloc() failed to allocate space for tst_buff");
- tst_exit();
- }
-
- /* Fill the test buffer with the known data */
- memset(tst_buff, 'A', page_sz);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Creat a temporary file used for mapping */
- if ((fildes = open(TEMPFILE, O_RDWR | O_CREAT, 0666)) < 0) {
- tst_brkm(TFAIL, NULL, "open() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- free(tst_buff);
- cleanup();
- }
-
- /* Write test buffer contents into temporary file */
- if (write(fildes, tst_buff, sizeof(tst_buff)) < (int)sizeof(tst_buff)) {
- tst_brkm(TFAIL, NULL, "write() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- free(tst_buff);
- cleanup();
- }
-
- /* Free the memory allocated for test buffer */
- free(tst_buff);
-
- /* Close the temporary file */
- if (close(fildes) < 0) {
- tst_brkm(TFAIL, cleanup, "close() Failed on %s, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- }
-
- /* Change Mode permissions on Temporary file */
- if (chmod(TEMPFILE, 0444) < 0) {
- tst_brkm(TFAIL, cleanup, "chmod(%s, 0444) Failed, errno=%d : "
- "%s", TEMPFILE, errno, strerror(errno));
- }
-
- /* Open the temporary file again, - Readonly mode */
- if ((fildes = open(TEMPFILE, O_RDONLY)) < 0) {
- tst_brkm(TFAIL, cleanup, "open(%s, O_RDONLY) Failed, errno=%d "
- ": %s", TEMPFILE, errno, strerror(errno));
- }
-
-
- /* Allocate and initialize dummy string of system page size bytes */
- if ((dummy = (char *)calloc(page_sz, sizeof(char))) == NULL) {
- tst_brkm(TFAIL, NULL, "calloc() failed to allocate space");
- tst_exit();
- }
-
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Free the memory allocated to dummy variable.
- * Remove the temporary directory created.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Free the memory allocated for dummy string */
- if (dummy) {
- free(dummy);
- }
-
- if (fildes >= 0)
- close (fildes);
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/mmap03.c b/winsup/testsuite/winsup.api/ltp/mmap03.c
deleted file mode 100644
index 9302d33..0000000
--- a/winsup/testsuite/winsup.api/ltp/mmap03.c
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: mmap03
- *
- * Test Description:
- * Call mmap() to map a file creating a mapped region with execute access
- * under the following conditions -
- * - The prot parameter is set to PROT_EXE
- * - The file descriptor is open for read
- * - The file being mapped has execute permission bit set.
- * - The minimum file permissions should be 0555.
- *
- * The call should succeed to map the file creating mapped memory with the
- * required attributes.
- *
- * Expected Result:
- * mmap() should succeed returning the address of the mapped region,
- * and the mapped region should contain the contents of the mapped file.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- * Create temporary directory.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print timing stats if options given
- * Delete the temporary directory created.
- *
- * Usage: <for command-line>
- * mmap03 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * None.
- */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define TEMPFILE "mmapfile"
-
-const char *TCID="mmap03"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-size_t page_sz; /* system page size */
-char *addr; /* addr of memory mapped region */
-char *dummy; /* dummy variable to hold temp file contents */
-int fildes = -1; /* file descriptor for temporary file */
-
-void setup(); /* Main setup function of test */
-void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /* Perform global setup for test */
- setup();
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call mmap to map the temporary file 'TEMPFILE'
- * with execute access.
- */
- TEST(mmap(0, page_sz, PROT_EXEC,
- MAP_FILE|MAP_SHARED, fildes, 0));
-
- /* Check for the return value of mmap() */
- if (TEST_RETURN == (int)MAP_FAILED) {
- tst_resm(TFAIL, "mmap() Failed on %s, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- continue;
- }
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- /* Get the mmap return value */
- addr = (char *)TEST_RETURN;
-
- /*
- * Read the file contents into the dummy
- * variable.
- */
- if (read(fildes, dummy, page_sz) < 0) {
- tst_brkm(TFAIL, cleanup, "read() on %s Failed, "
- "error:%d", TEMPFILE, errno);
- }
-
- /*
- * Check whether the mapped memory region
- * has the file contents.
- */
- if (memcmp(dummy, addr, page_sz)) {
- tst_resm(TFAIL, "mapped memory region contains "
- "invalid data");
- } else {
- tst_resm(TPASS,
- "Functionality of mmap() successful");
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
-
- /* Clean up things in case we are looping */
- /* Unmap the mapped memory */
- if (munmap(addr, page_sz) != 0) {
- tst_brkm(TFAIL, NULL, "munmap() fails to unmap the "
- "memory, errno=%d", errno);
- }
-
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- * Get the system page size.
- * Create a temporary directory and a file under it.
- * Write some known data into file and close it.
- * Change the mode permissions on file to 0555.
- * Re-open the file for reading.
- */
-void
-setup()
-{
- char *tst_buff; /* test buffer to hold known data */
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* Get the system page size */
- if ((page_sz = getpagesize()) < 0) {
- tst_brkm(TFAIL, NULL,
- "getpagesize() fails to get system page size");
- tst_exit();
- }
-
- /* Allocate space for the test buffer */
- if ((tst_buff = (char *)calloc(page_sz, sizeof(char))) == NULL) {
- tst_brkm(TFAIL, NULL,
- "calloc() failed to allocate space for tst_buff");
- tst_exit();
- }
-
- /* Fill the test buffer with the known data */
- memset(tst_buff, 'A', page_sz);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Creat a temporary file used for mapping */
- if ((fildes = open(TEMPFILE, O_WRONLY | O_CREAT, 0666)) < 0) {
- tst_brkm(TFAIL, NULL, "open() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- free(tst_buff);
- cleanup();
- }
-
- /* Write test buffer contents into temporary file */
- if (write(fildes, tst_buff, strlen(tst_buff)) < (int)strlen(tst_buff)) {
- tst_brkm(TFAIL, NULL, "write() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- free(tst_buff);
- cleanup();
- }
-
- /* Free the memory allocated for test buffer */
- free(tst_buff);
-
- /* Make sure proper permissions set on file */
- if (chmod(TEMPFILE, 0555) < 0) {
- tst_brkm(TFAIL, cleanup, "chmod() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- }
-
- /* Close the temporary file opened for write */
- if (close(fildes) < 0) {
- tst_brkm(TFAIL, cleanup, "close() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- }
-
- /* Allocate and initialize dummy string of system page size bytes */
- if ((dummy = (char *)calloc(page_sz, sizeof(char))) == NULL) {
- tst_brkm(TFAIL, cleanup,
- "calloc() failed to allocate memory for dummy");
- }
-
- /* Open the temporary file again for reading */
- if ((fildes = open(TEMPFILE, O_RDONLY)) < 0) {
- tst_brkm(TFAIL, cleanup, "open(%s) with read-only Failed, "
- "errno:%d", TEMPFILE, errno);
- }
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- Free the memory allocated to dummy variable.
- * Remove the temporary directory created.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Free the memory space allocated for dummy variable */
- if (dummy) {
- free(dummy);
- }
-
- if (fildes >= 0)
- close (fildes);
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/mmap04.c b/winsup/testsuite/winsup.api/ltp/mmap04.c
deleted file mode 100644
index 64d3a8e..0000000
--- a/winsup/testsuite/winsup.api/ltp/mmap04.c
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: mmap04
- *
- * Test Description:
- * Call mmap() to map a file creating a mapped region with read/exec access
- * under the following conditions -
- * - The prot parameter is set to PROT_READ|PROT_EXEC
- * - The file descriptor is open for read
- * - The file being mapped has read and execute permission bit set.
- * - The minimum file permissions should be 0555.
- *
- * The call should succeed to map the file creating mapped memory with the
- * required attributes.
- *
- * Expected Result:
- * mmap() should succeed returning the address of the mapped region,
- * and the mapped region should contain the contents of the mapped file.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- * Create temporary directory.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print timing stats if options given
- * Delete the temporary directory created.
- *
- * Usage: <for command-line>
- * mmap04 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * None.
- */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define TEMPFILE "mmapfile"
-
-const char *TCID="mmap04"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-size_t page_sz; /* system page size */
-char *addr; /* addr of memory mapped region */
-char *dummy; /* dummy variable to hold temp file contents */
-int fildes = -1; /* file descriptor for temporary file */
-
-void setup(); /* Main setup function of test */
-void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /* Perform global setup for test */
- setup();
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call mmap to map the temporary file 'TEMPFILE'
- * with read and execute access.
- */
- TEST(mmap(0, page_sz, PROT_READ|PROT_EXEC,
- MAP_FILE|MAP_SHARED, fildes, 0));
-
- /* Check for the return value of mmap() */
- if (TEST_RETURN == (int)MAP_FAILED) {
- tst_resm(TFAIL, "mmap() Failed on %s, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- continue;
- }
-
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- /* Get the mmap return value */
- addr = (char *)TEST_RETURN;
-
- /*
- * Read the file contents into the dummy
- * variable.
- */
- if (read(fildes, dummy, page_sz) < 0) {
- tst_brkm(TFAIL, cleanup, "read() on %s Failed, "
- "error:%d", TEMPFILE, errno);
- }
-
- /*
- * Check whether the mapped memory region
- * has the file contents.
- */
- if (memcmp(dummy, addr, page_sz)) {
- tst_resm(TFAIL, "mapped memory region contains "
- "invalid data");
- } else {
- tst_resm(TPASS,
- "Functionality of mmap() successful");
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
- /* Clean up things in case we are looping. */
- /* Unmap the mapped memory */
- if (munmap(addr, page_sz) != 0) {
- tst_brkm(TFAIL, NULL, "munmap() fails to unmap the "
- "memory, errno=%d", errno);
- }
-
-
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- * Get the system page size.
- * Create a temporary directory and a file under it.
- * Write some known data into file and close it.
- * Change the mode permissions on file to 0555.
- * Re-open the file for reading.
- */
-void
-setup()
-{
- char *tst_buff; /* test buffer to hold known data */
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* Get the system page size */
- if ((page_sz = getpagesize()) < 0) {
- tst_brkm(TFAIL, NULL,
- "getpagesize() fails to get system page size");
- tst_exit();
- }
-
- if ((tst_buff = (char *)calloc(page_sz, sizeof(char))) == NULL) {
- tst_brkm(TFAIL, NULL,
- "calloc() failed to allocate space for tst_buff");
- tst_exit();
- }
-
- /* Fill the test buffer with the known data */
- memset(tst_buff, 'A', page_sz);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Creat a temporary file used for mapping */
- if ((fildes = open(TEMPFILE, O_WRONLY | O_CREAT, 0666)) < 0) {
- tst_brkm(TFAIL, NULL, "open() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- free(tst_buff);
- cleanup();
- }
-
- /* Write test buffer contents into temporary file */
- if (write(fildes, tst_buff, strlen(tst_buff)) < (int)strlen(tst_buff)) {
- tst_brkm(TFAIL, NULL, "write() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- free(tst_buff);
- cleanup();
- }
-
- /* Free the memory allocated for test buffer */
- free(tst_buff);
-
- /* Make sure proper permissions set on file */
- if (chmod(TEMPFILE, 0555) < 0) {
- tst_brkm(TFAIL, cleanup, "chmod() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- }
-
- /* Close the temporary file opened for write */
- if (close(fildes) < 0) {
- tst_brkm(TFAIL, cleanup, "close() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- }
-
- /* Allocate and initialize dummy string of system page size bytes */
- if ((dummy = (char *)calloc(page_sz, sizeof(char))) == NULL) {
- tst_brkm(TFAIL, cleanup,
- "calloc() failed to allocate memory for dummy");
- }
-
- /* Open the temporary file again for reading */
- if ((fildes = open(TEMPFILE, O_RDONLY)) < 0) {
- tst_brkm(TFAIL, cleanup, "open(%s) with read-only Failed, "
- "errno:%d", TEMPFILE, errno);
- }
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Free the memeory allocated to dummy variable.
- * Remove the temporary directory created.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Free the memory space allocated for dummy variable */
- if (dummy) {
- free(dummy);
- }
-
- if (fildes >= 0)
- close (fildes);
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/mmap05.c b/winsup/testsuite/winsup.api/ltp/mmap05.c
deleted file mode 100644
index bcdfd0c..0000000
--- a/winsup/testsuite/winsup.api/ltp/mmap05.c
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: mmap05
- *
- * Test Description:
- * Call mmap() to map a file creating mapped memory with no access under
- * the following conditions -
- * - The prot parameter is set to PROT_NONE
- * - The file descriptor is open for read(any mode other than write)
- * - The minimum file permissions should be 0444.
- *
- * The call should succeed to map the file creating mapped memory with the
- * required attributes.
- *
- * Expected Result:
- * mmap() should succeed returning the address of the mapped region,
- * and an attempt to access the contents of the mapped region should give
- * rise to the signal SIGSEGV.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- * Create temporary directory.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.
- *
- * Usage: <for command-line>
- * mmap05 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * None.
- */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-#include <setjmp.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define TEMPFILE "mmapfile"
-
-const char *TCID="mmap05"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-size_t page_sz; /* system page size */
-char *addr; /* addr of memory mapped region */
-int fildes = -1; /* file descriptor for temporary file */
-int pass=0; /* pass flag perhaps set to 1 in sig_handler */
-sigjmp_buf env; /* environment for sigsetjmp/siglongjmp */
-
-void setup(); /* Main setup function of test */
-void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
-void sig_handler(); /* signal handler to catch SIGSEGV */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- volatile char file_content; /* tempfile content */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /* Perform global setup for test */
- setup();
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call mmap to map the temporary file 'TEMPFILE'
- * with no access.
- */
-
- TEST(mmap(0, page_sz, PROT_NONE,
- MAP_FILE|MAP_SHARED, fildes, 0));
-
- /* Check for the return value of mmap() */
- if (TEST_RETURN == (int)MAP_FAILED) {
- tst_resm(TFAIL, "mmap() Failed on %s, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- continue;
- }
-
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
-
- /*
- * Try to access the mapped region. This should
- * generate a SIGSEGV which will be caught below.
- *
- * This is wrapped by the sigsetjmp() call that will
- * take care of restoring the program's context in an
- * elegant way in conjunction with the call to
- * siglongjmp() in the signal handler.
- */
- if (sigsetjmp(env, 1) == 0) {
- file_content = addr[0];
- }
-
- if (pass) {
- tst_resm(TPASS, "Got SIGSEGV as expected");
- } else {
- tst_resm(TFAIL, "Mapped memory region with NO "
- "access is accessible");
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
-
- /* Unmap mapped memory and reset pass in case we are looping */
- if (munmap(addr, page_sz) != 0) {
- tst_brkm(TFAIL, cleanup, "munmap() fails to unmap the "
- "memory, errno=%d", errno);
- }
- pass = 0;
-
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- * Get the system page size.
- * Create a temporary directory and a file under it.
- * Write some known data into file and close it.
- * Change the mode permissions on file to 0444
- * Re-open the file for reading.
- */
-void
-setup()
-{
- char *tst_buff; /* test buffer to hold known data */
-
- /* capture signals */
- tst_sig(NOFORK, sig_handler, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* Get the system page size */
- if ((page_sz = getpagesize()) < 0) {
- tst_brkm(TFAIL, NULL,
- "getpagesize() fails to get system page size");
- tst_exit();
- }
-
- /* Allocate space for the test buffer */
- if ((tst_buff = (char *)calloc(page_sz, sizeof(char))) == NULL) {
- tst_brkm(TFAIL, NULL,
- "calloc() failed to allocate space for tst_buff");
- tst_exit();
- }
-
- /* Fill the test buffer with the known data */
- memset(tst_buff, 'A', page_sz);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Creat a temporary file used for mapping */
- if ((fildes = open(TEMPFILE, O_WRONLY | O_CREAT, 0666)) < 0) {
- tst_brkm(TFAIL, NULL, "open() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- free(tst_buff);
- cleanup();
- }
-
- /* Write test buffer contents into temporary file */
- if (write(fildes, tst_buff, strlen(tst_buff))
- != (int)strlen(tst_buff)) {
- tst_brkm(TFAIL, NULL, "write() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- free(tst_buff);
- cleanup();
- }
-
- /* Free the memory allocated for test buffer */
- free(tst_buff);
-
- /* Close the temporary file opened for write */
- if (close(fildes) < 0) {
- tst_brkm(TFAIL, cleanup, "close() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- }
-
- /* Make sure proper permissions set on file */
- if (chmod(TEMPFILE, 0444) < 0) {
- tst_brkm(TFAIL, cleanup, "chmod() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- }
-
- /* Open the temporary file again for reading */
- if ((fildes = open(TEMPFILE, O_RDONLY)) < 0) {
- tst_brkm(TFAIL, cleanup, "open(%s) with read-only Failed, "
- "errno:%d", TEMPFILE, errno);
- }
-}
-
-/*
- * sig_handler() - Signal Cathing function.
- * This function gets executed when the test process receives
- * the signal SIGSEGV while trying to access the contents of memory which
- * is not accessible.
- */
-void
-sig_handler(sig)
-{
- if (sig == SIGSEGV) {
- /* set the global variable and jump back */
- pass = 1;
- siglongjmp(env, 1);
- } else {
- tst_brkm(TBROK, cleanup, "received an unexpected signal");
- }
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Remove the temporary directory created.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- if (fildes >= 0)
- close (fildes);
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/mmap06.c b/winsup/testsuite/winsup.api/ltp/mmap06.c
deleted file mode 100644
index ec113c0..0000000
--- a/winsup/testsuite/winsup.api/ltp/mmap06.c
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: mmap06
- *
- * Test Description:
- * Call mmap() to map a file creating a mapped region with read access
- * under the following conditions -
- * - The prot parameter is set to PROT_READ
- * - The file descriptor is open for writing.
- *
- * The call should fail to map the file.
- *
- * Expected Result:
- * mmap() should fail returning -1 and errno should get set to EACCES.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- * Create temporary directory.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * if errno set == expected errno
- * Issue sys call fails with expected return value and errno.
- * Otherwise,
- * Issue sys call fails with unexpected errno.
- * Otherwise,
- * Issue sys call returns unexpected value.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory(s)/file(s) created.
- *
- * Usage: <for command-line>
- * mmap06 [-c n] [-e] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * None.
- */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define TEMPFILE "mmapfile"
-
-const char *TCID="mmap06"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int exp_enos[]={EACCES, 0};
-
-size_t page_sz; /* system page size */
-char *addr; /* addr of memory mapped region */
-int fildes = -1; /* file descriptor for temporary file */
-
-void setup(); /* Main setup function of test */
-void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /* Perform global setup for test */
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call mmap to map the temporary file 'TEMPFILE'
- * with read access.
- */
- TEST(mmap(0, page_sz, PROT_READ,
- MAP_FILE|MAP_SHARED, fildes, 0));
-
- /* Check for the return value of mmap() */
- if (TEST_RETURN != (int)MAP_FAILED) {
- tst_resm(TFAIL, "mmap() returned invalid value, "
- "expected: -1");
- /* Unmap the mapped memory */
- if (munmap(addr, page_sz) != 0) {
- tst_brkm(TBROK, cleanup, "munmap() failed");
- }
- continue;
- }
- TEST_ERROR_LOG(TEST_ERRNO);
- if (TEST_ERRNO == EACCES) {
- tst_resm(TPASS, "mmap() fails, 'fd' doesn't allow "
- "desired access, errno:%d", errno);
- } else {
- tst_resm(TFAIL, "mmap() fails, 'fd' doesn't allow "
- "desired access, invalid errno:%d", errno);
- }
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- * Get the system page size.
- * Create a temporary directory and a file under it.
- * Write some known data into file.
- */
-void
-setup()
-{
- char *tst_buff; /* test buffer to hold known data */
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* Get the system page size */
- if ((page_sz = getpagesize()) < 0) {
- tst_brkm(TFAIL, NULL,
- "getpagesize() fails to get system page size");
- tst_exit();
- }
-
- /* Allocate space for the test buffer */
- if ((tst_buff = (char *)calloc(page_sz, sizeof(char))) == NULL) {
- tst_brkm(TFAIL, NULL,
- "calloc() failed to allocate space for tst_buff");
- tst_exit();
- }
-
- /* Fill the test buffer with the known data */
- memset(tst_buff, 'A', page_sz);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Creat a temporary file used for mapping */
- if ((fildes = open(TEMPFILE, O_WRONLY | O_CREAT, 0666)) < 0) {
- tst_brkm(TFAIL, NULL,
- "open() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- free(tst_buff);
- cleanup();
- }
-
- /* Write test buffer contents into temporary file */
- if (write(fildes, tst_buff, strlen(tst_buff)) < (int)strlen(tst_buff)) {
- tst_brkm(TFAIL, NULL,
- "write() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- free(tst_buff);
- cleanup();
- }
-
- /* Free the memory allocated for test buffer */
- free(tst_buff);
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Remove the temporary directory created.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- if (fildes >= 0)
- close (fildes);
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/mmap07.c b/winsup/testsuite/winsup.api/ltp/mmap07.c
deleted file mode 100644
index ab989f4..0000000
--- a/winsup/testsuite/winsup.api/ltp/mmap07.c
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: mmap07
- *
- * Test Description:
- * Call mmap() to map a file creating a mapped region with read access
- * under the following conditions -
- * - The prot parameter is set to PROT_WRITE
- * - The file descriptor is open for writing.
- * - The flags parameter has MAP_PRIVATE set.
- *
- * The call should fail to map the file.
- *
- * Expected Result:
- * mmap() should fail returning -1 and errno should get set to EACCES.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- * Create temporary directory.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * if errno set == expected errno
- * Issue sys call fails with expected return value and errno.
- * Otherwise,
- * Issue sys call fails with unexpected errno.
- * Otherwise,
- * Issue sys call returns unexpected value.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory(s)/file(s) created.
- *
- * Usage: <for command-line>
- * mmap07 [-c n] [-e] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * None.
- */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define TEMPFILE "mmapfile"
-
-const char *TCID="mmap07"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int exp_enos[]={EACCES, 0};
-
-size_t page_sz; /* system page size */
-char *addr; /* addr of memory mapped region */
-int fildes = -1; /* file descriptor for temporary file */
-
-void setup(); /* Main setup function of test */
-void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /* Perform global setup for test */
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call mmap to map the temporary file 'TEMPFILE'
- * with write access.
- */
- TEST(mmap(0, page_sz, PROT_WRITE,
- MAP_FILE|MAP_PRIVATE, fildes, 0));
-
- /* Check for the return value of mmap() */
- if (TEST_RETURN != (int)MAP_FAILED) {
- tst_resm(TFAIL, "mmap() returned invalid value, "
- "expected: -1");
- /* Unmap the mapped memory */
- if (munmap(addr, page_sz) != 0) {
- tst_brkm(TBROK, cleanup, "munmap() failed");
- }
- continue;
- }
- TEST_ERROR_LOG(TEST_ERRNO);
- if (TEST_ERRNO == EACCES) {
- tst_resm(TPASS, "mmap() fails, 'fd' doesn't allow "
- "desired access, errno:%d", errno);
- } else {
- tst_resm(TFAIL, "mmap() fails, 'fd' doesn't allow "
- "desired access, invalid errno:%d", errno);
- }
-
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- * Get the system page size.
- * Create a temporary directory and a file under it.
- * Write some known data into file.
- */
-void
-setup()
-{
- char *tst_buff; /* test buffer to hold known data */
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* Get the system page size */
- if ((page_sz = getpagesize()) < 0) {
- tst_brkm(TFAIL, NULL,
- "getpagesize() fails to get system page size");
- tst_exit();
- }
-
- /* Allocate space for the test buffer */
- if ((tst_buff = (char *)calloc(page_sz, sizeof(char))) == NULL) {
- tst_brkm(TFAIL, NULL,
- "calloc() failed to allocate space for tst_buff");
- tst_exit();
- }
-
- /* Fill the test buffer with the known data */
- memset(tst_buff, 'A', page_sz);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Creat a temporary file used for mapping */
- if ((fildes = open(TEMPFILE, O_WRONLY | O_CREAT, 0666)) < 0) {
- tst_brkm(TFAIL, NULL, "open() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- free(tst_buff);
- cleanup();
- }
-
- /* Write test buffer contents into temporary file */
- if (write(fildes, tst_buff, strlen(tst_buff)) < (int)strlen(tst_buff)) {
- tst_brkm(TFAIL, NULL, "write() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- free(tst_buff);
- cleanup();
- }
-
- /* Free the memory allocated for test buffer */
- free(tst_buff);
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Remove the temporary directory created.
- */
-void
-cleanup()
-{
- /*
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- if (fildes >= 0)
- close (fildes);
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/mmap08.c b/winsup/testsuite/winsup.api/ltp/mmap08.c
deleted file mode 100644
index 543c539..0000000
--- a/winsup/testsuite/winsup.api/ltp/mmap08.c
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: mmap08
- *
- * Test Description:
- * Verify that mmap() fails to map a file creating a mapped region
- * when the file specified by file descriptor is not valid.
- *
- * Expected Result:
- * mmap() should fail returning -1 and errno should get set to EBADF.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- * Create temporary directory.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * if errno set == expected errno
- * Issue sys call fails with expected return value and errno.
- * Otherwise,
- * Issue sys call fails with unexpected errno.
- * Otherwise,
- * Issue sys call returns unexpected value.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory(s)/file(s) created.
- *
- * Usage: <for command-line>
- * mmap08 [-c n] [-e] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * None.
- */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define TEMPFILE "mmapfile"
-
-const char *TCID="mmap08"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int exp_enos[]={EBADF, 0};
-
-size_t page_sz; /* system page size */
-char *addr; /* addr of memory mapped region */
-int fildes = -1; /* file descriptor for temporary file */
-
-void setup(); /* Main setup function of test */
-void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /* Perform global setup for test */
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call mmap to map the temporary file 'TEMPFILE'
- * which is already closed. so, fildes is not valid.
- */
- TEST(mmap(0, page_sz, PROT_WRITE,
- MAP_FILE|MAP_SHARED, fildes, 0));
-
- /* Check for the return value of mmap() */
- if (TEST_RETURN != (int)MAP_FAILED) {
- tst_resm(TFAIL, "mmap() returned invalid value, "
- "expected: -1");
- /* Unmap the mapped memory */
- if (munmap(addr, page_sz) != 0) {
- tst_brkm(TBROK, cleanup, "munmap() failed");
- }
- continue;
- }
- TEST_ERROR_LOG(TEST_ERRNO);
- if (TEST_ERRNO == EBADF) {
- tst_resm(TPASS, "mmap() fails, 'fd' is not valid, "
- "errno:%d", errno);
- } else {
- tst_resm(TFAIL, "mmap() fails, 'fd' is not valid, "
- "invalid errno:%d", errno);
- }
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- * Get the system page size.
- * Create a temporary directory and a file under it.
- * Write some known data into file and close it.
- */
-void
-setup()
-{
- char *tst_buff; /* test buffer to hold known data */
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* Get the system page size */
- if ((page_sz = getpagesize()) < 0) {
- tst_brkm(TFAIL, NULL,
- "getpagesize() fails to get system page size");
- tst_exit();
- }
-
- if ((tst_buff = (char *)calloc(page_sz, sizeof(char))) == NULL) {
- tst_brkm(TFAIL, NULL,
- "calloc() failed to allocate space for tst_buff");
- tst_exit();
- }
-
- /* Fill the test buffer with the known data */
- memset(tst_buff, 'A', page_sz);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Creat a temporary file used for mapping */
- if ((fildes = open(TEMPFILE, O_WRONLY | O_CREAT, 0666)) < 0) {
- tst_brkm(TFAIL, NULL, "open() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- free(tst_buff);
- cleanup();
- }
-
- /* Write test buffer contents into temporary file */
- if (write(fildes, tst_buff, strlen(tst_buff))
- != (int)strlen(tst_buff)) {
- tst_brkm(TFAIL, NULL, "write() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- free(tst_buff);
- cleanup();
- }
-
- /* Free the memory allocated for test buffer */
- free(tst_buff);
-
- /* Close the temporary file opened for writing */
- if (close(fildes) < 0) {
- tst_brkm(TFAIL, cleanup, "close() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- }
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Remove the temporary directory created.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- if (fildes >= 0)
- close (fildes);
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/munmap01.c b/winsup/testsuite/winsup.api/ltp/munmap01.c
deleted file mode 100644
index 0527201..0000000
--- a/winsup/testsuite/winsup.api/ltp/munmap01.c
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: munmap01
- *
- * Test Description:
- * Verify that, munmap call will succeed to unmap a mapped file or
- * anonymous shared memory region from the calling process's address space
- * and after successful completion of munmap, the unmapped region is no
- * longer accessible.
- *
- * Expected Result:
- * munmap call should succeed to unmap a mapped file or anonymous shared
- * memory region from the process's address space and it returns with a
- * value 0, further reference to the unmapped region should result in a
- * segmentation fault (SIGSEGV).
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.
- *
- * Usage: <for command-line>
- * munmap01 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * None.
- */
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define TEMPFILE "mmapfile"
-
-const char *TCID="munmap01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-char *addr; /* addr of memory mapped region */
-int fildes; /* file descriptor for tempfile */
-unsigned int map_len; /* length of the region to be mapped */
-
-void setup(); /* Main setup function of test */
-void cleanup(void); /* cleanup function for the test */
-void sig_handler(); /* signal catching function */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *)NULL, NULL);
- if (msg != (char *)NULL) {
- tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
- }
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /* Perform global setup for test */
- setup();
-
- /*
- * Call munmap to unmap the mapped region of the
- * temporary file from the calling process's address space.
- */
- TEST(munmap(addr, map_len));
-
- /* Check for the return value of munmap() */
- if (TEST_RETURN == -1) {
- tst_resm(TFAIL, "munmap() fails, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- continue;
- }
-
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- /*
- * Check whether further reference is possible
- * to the unmapped memory region by writing
- * to the first byte of region with
- * some arbitrary number.
- */
- *addr = 50;
-
- /* This message is printed if no SIGSEGV */
- tst_resm(TFAIL, "process succeeds to refer unmapped "
- "memory region");
- } else {
- tst_resm(TPASS, "call succeeded");
- }
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- } /* End for TEST_LOOPING */
-
- /* exit with return code appropriate for results */
- tst_exit();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- *
- * Set up signal handler to catch SIGSEGV.
- * Get system page size, create a temporary file for reading/writing,
- * write one byte data into it, map the open file for the specified
- * map length.
- */
-void
-setup()
-{
- size_t page_sz; /* system page size */
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* call signal function to trap the signal generated */
- if (signal(SIGSEGV, sig_handler) == SIG_ERR) {
- tst_brkm(TBROK, cleanup, "signal fails to catch signal");
- tst_exit();
- }
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* Get the system page size */
- if ((page_sz = getpagesize()) < 0) {
- tst_brkm(TBROK, cleanup,
- "getpagesize() fails to get system page size");
- tst_exit();
- }
-
- /*
- * Get the length of the open file to be mapped into process
- * address space.
- */
- map_len = 3 * page_sz;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Creat a temporary file used for mapping */
- if ((fildes = open(TEMPFILE, O_RDWR | O_CREAT, 0666)) < 0) {
- tst_brkm(TBROK, cleanup, "open() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- tst_exit();
- }
-
- /*
- * move the file pointer to maplength position from the beginning
- * of the file.
- */
- if (lseek(fildes, map_len, SEEK_SET) == -1) {
- tst_brkm(TBROK, cleanup, "lseek() fails on %s, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- tst_exit();
- }
-
- /* Write one byte into temporary file */
- if (write(fildes, "a", 1) != 1) {
- tst_brkm(TBROK, cleanup, "write() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- tst_exit();
- }
-
- /*
- * map the open file 'TEMPFILE' from its beginning up to the maplength
- * into the calling process's address space at the system choosen
- * with read/write permissions to the the mapped region.
- */
- addr = mmap(0, map_len, PROT_READ | PROT_WRITE, \
- MAP_FILE | MAP_SHARED, fildes, 0);
-
- /* check for the return value of mmap system call */
- if (addr == (char *)MAP_FAILED) {
- tst_brkm(TBROK, cleanup, "mmap() Failed on %s, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- tst_exit();
- }
-}
-
-/*
- * sig_handler() - signal catching function.
- * This function is used to trap the signal generated when tried to read or
- * write to the memory mapped region which is already detached from the
- * calling process address space.
- * this function is invoked when SIGSEGV generated and it calls test
- * cleanup function and exit the program.
- */
-void
-sig_handler()
-{
- tst_resm(TPASS, "Functionality of munmap() successful");
-
- /* Invoke test cleanup function and exit */
- cleanup();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Close the temporary file.
- * Remove the temporary directory.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Close the temporary file */
- if (close(fildes) < 0) {
- tst_brkm(TFAIL, NULL, "close() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- }
-
- /* Remove the temporary directory and all files in it */
- tst_rmdir();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/munmap02.c b/winsup/testsuite/winsup.api/ltp/munmap02.c
deleted file mode 100644
index 7345e73..0000000
--- a/winsup/testsuite/winsup.api/ltp/munmap02.c
+++ /dev/null
@@ -1,306 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: munmap02
- *
- * Test Description:
- * Verify that, munmap call will succeed to unmap a mapped file or
- * anonymous shared memory region from the calling process's address space
- * if the region specified by the address and the length is part or all of
- * the mapped region.
- *
- * Expected Result:
- * munmap call should succeed to unmap a part or all of mapped region of a
- * file or anonymous shared memory from the process's address space and it
- * returns with a value 0,
- * further reference to the unmapped region should result in a segmentation
- * fault (SIGSEGV).
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.
- *
- * Usage: <for command-line>
- * munmap01 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * None.
- */
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define TEMPFILE "mmapfile"
-
-const char *TCID="munmap02"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-size_t page_sz; /* system page size */
-char *addr; /* addr of memory mapped region */
-int fildes; /* file descriptor for tempfile */
-unsigned int map_len; /* length of the region to be mapped */
-
-void setup(); /* Main setup function of test */
-void cleanup(void); /* cleanup function for the test */
-void sig_handler(); /* signal catching function */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *)NULL, NULL);
- if (msg != (char *)NULL) {
- tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
- }
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /* Perform global setup for test */
- setup();
-
- /*
- * Call munmap to unmap the part of the mapped region of the
- * temporary file from the address and length that is part of
- * the mapped region.
- */
- TEST(munmap(addr, map_len));
-
- /* Check for the return value of munmap() */
- if (TEST_RETURN == -1) {
- tst_resm(TFAIL, "munmap() fails, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- continue;
- }
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- /*
- * Check whether further reference is possible
- * to the unmapped memory region by writing
- * to the first byte of region with
- * some arbitrary number.
- */
- *addr = 50;
-
- /* This message is printed if no SIGSEGV */
- tst_resm(TFAIL, "process succeeds to refer unmapped "
- "memory region");
- } else {
- tst_resm(TPASS, "call succeeded");
- }
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- } /* End for TEST_LOOPING */
-
- /* exit with return code appropriate for results */
- tst_exit();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- * Setup signal handler to catch SIGSEGV.
- * Get system page size, create a temporary file for reading/writing,
- * write one byte data into it, map the open file for the specified
- * map length.
- */
-void
-setup()
-{
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* call signal function to trap the signal generated */
- if (signal(SIGSEGV, sig_handler) == SIG_ERR) {
- tst_brkm(TBROK, cleanup, "signal fails to catch signal");
- tst_exit();
- }
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* Get the system page size */
- if ((page_sz = getpagesize()) < 0) {
- tst_brkm(TBROK, cleanup,
- "getpagesize() fails to get system page size");
- tst_exit();
- }
-
- /*
- * Get the length of the open file to be mapped into process
- * address space.
- */
- map_len = 3 * page_sz;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Creat a temporary file used for mapping */
- if ((fildes = open(TEMPFILE, O_RDWR | O_CREAT, 0666)) < 0) {
- tst_brkm(TBROK, cleanup, "open() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- tst_exit();
- }
-
- /*
- * move the file pointer to maplength position from the beginning
- * of the file.
- */
- if (lseek(fildes, map_len, SEEK_SET) == -1) {
- tst_brkm(TBROK, cleanup, "lseek() fails on %s, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- tst_exit();
- }
-
- /* Write one byte into temporary file */
- if (write(fildes, "a", 1) != 1) {
- tst_brkm(TBROK, cleanup, "write() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- tst_exit();
- }
-
- /*
- * map the open file 'TEMPFILE' from its beginning up to the maplength
- * into the calling process's address space at the system choosen
- * with read/write permissions to the the mapped region.
- */
- addr = mmap(0, map_len, PROT_READ | PROT_WRITE,
- MAP_FILE | MAP_SHARED, fildes, 0);
-
- /* check for the return value of mmap system call */
- if (addr == (char *)MAP_FAILED) {
- tst_brkm(TBROK, cleanup, "mmap() Failed on %s, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- tst_exit();
- }
-
- /*
- * increment the start address of the region at which the file is
- * mapped to a maplength of 3 times the system page size by the value
- * of system page size and decrement the maplength value by the value
- * of system page size.
- */
- addr = (char *)((long)addr + page_sz);
- map_len = map_len - page_sz;
-}
-
-/*
- * void
- * sig_handler() - signal catching function.
- * This function is used to trap the signal generated when tried to read or
- * write to the memory mapped region which is already detached from the
- * calling process address space.
- * this function is invoked when SIGSEGV generated and it calls test
- * cleanup function and exit the program.
- */
-void
-sig_handler()
-{
- tst_resm(TPASS, "Functionality of munmap() successful");
-
- /* Invoke test cleanup function and exit */
- cleanup();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Unmap the portion of the region of the file left unmapped.
- * Close the temporary file.
- * Remove the temporary directory.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /*
- * get the start address and length of the portion of
- * the mapped region of the file.
- */
- addr = (char *)((long)addr - page_sz);
- map_len = map_len - page_sz;
-
- /* unmap the portion of the region of the file left unmapped */
- if (munmap(addr, map_len) < 0) {
- tst_brkm(TBROK, NULL,
- "munmap() fails to unmap portion of mapped region");
- }
-
- /* Close the temporary file */
- if (close(fildes) < 0) {
- tst_brkm(TBROK, NULL, "close() on %s Failed, errno=%d : %s",
- TEMPFILE, errno, strerror(errno));
- }
-
- /* Remove the temporary directory and all files in it */
- tst_rmdir();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/nice05.c b/winsup/testsuite/winsup.api/ltp/nice05.c
deleted file mode 100644
index 1246e7f..0000000
--- a/winsup/testsuite/winsup.api/ltp/nice05.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : nice05
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for nice(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) nice(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the nice(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * nice(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-
-
-const char *TCID="nice05"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int val;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- val = lc % 39;
- /*
- * Call nice(2)
- */
- TEST(nice(val));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "nice(%d) Failed, errno=%d : %s", val,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "nice(%d) returned %d", val, TEST_RETURN);
- }
- }
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/open02.c b/winsup/testsuite/winsup.api/ltp/open02.c
deleted file mode 100644
index 594ab5b..0000000
--- a/winsup/testsuite/winsup.api/ltp/open02.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * open02.c
- *
- * DESCRIPTION
- * Test if open without O_CREAT returns -1 if a file does not exist.
- *
- * ALGORITHM
- * 1. open a new file without O_CREAT, test for return value of -1
- *
- * USAGE: <for command-line>
- * open02 [-c n] [-e] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None
- */
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <sys/fcntl.h>
-#include <test.h>
-#include <usctest.h>
-
-const char *TCID = "open02";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-char pfilname[40] = "";
-
-int exp_enos[] = {ENOENT, 0};
-
-void cleanup(void) __attribute__((noreturn));
-void setup(void);
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /*
- * parse standard command line options
- */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- setup(); /* global setup for test */
-
- TEST_EXP_ENOS(exp_enos);
-
- /*
- * check looping state if -i option given on the command line
- */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- Tst_count = 0; /* reset Tst_count while looping. */
-
- TEST(open(pfilname, O_RDWR, 0444));
-
- if (TEST_RETURN != -1) {
- tst_resm(TFAIL, "opened non-existent file");
- continue;
- }
-
- TEST_ERROR_LOG(TEST_ERRNO);
-
- if (TEST_ERRNO != ENOENT) {
- tst_resm(TFAIL, "open(2) set invalid errno: "
- "expected ENOENT, got %d", TEST_ERRNO);
- } else {
- tst_resm(TPASS, "open returned ENOENT");
- }
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test
- */
-void
-setup(void)
-{
- umask(0);
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that options was specified */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- sprintf(pfilname, "./open3.%d", getpid());
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at completion or
- * premature exit.
- */
-void
-cleanup(void)
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/open03.c b/winsup/testsuite/winsup.api/ltp/open03.c
deleted file mode 100644
index 6a699ba..0000000
--- a/winsup/testsuite/winsup.api/ltp/open03.c
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : open03
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for open(2)
- *
- * PARENT DOCUMENT : xxxtds01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) open(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the open(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * open(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="open03"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char fname[255];
-int fd;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call open(2)
- */
- TEST(open(fname,O_RDWR|O_CREAT,0700));
-
- fd=TEST_RETURN;
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "open(%s,O_RDWR|O_CREAT,0700) Failed, errno=%d : %s", fname,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "open(%s, O_RDWR|O_CREAT,0700) returned %d",
- fname, TEST_RETURN);
- }
-
- if (close(fd) == -1) {
- tst_brkm(TBROK, cleanup,
- "close(%s) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- } else if (unlink(fname) == -1) {
- tst_brkm(TBROK, cleanup,
- "unlink(%s) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
- }
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(fname,"tfile_%d",getpid());
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/pathconf01.c b/winsup/testsuite/winsup.api/ltp/pathconf01.c
deleted file mode 100644
index 466875f..0000000
--- a/winsup/testsuite/winsup.api/ltp/pathconf01.c
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : pathconf01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for pathconf(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 6
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) pathconf(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the pathconf(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * pathconf(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="pathconf01"; /* Test program identifier. */
-int TST_TOTAL; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-int i;
-const char *path = "/tmp";
-
-struct pathconf_args
-{
- const char *define_tag;
- int value;
-} args[] = {
- {"_PC_LINK_MAX", _PC_LINK_MAX},
- {"_PC_NAME_MAX", _PC_NAME_MAX},
- {"_PC_PATH_MAX", _PC_PATH_MAX},
- {"_PC_PIPE_BUF", _PC_PIPE_BUF},
- {"_PC_CHOWN_RESTRICTED", _PC_CHOWN_RESTRICTED},
- {"_PC_NO_TRUNC", _PC_NO_TRUNC},
- {NULL, 0}
-};
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- TST_TOTAL=(sizeof(args)/sizeof(args[0]))-1;
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- for (i=0; i<TST_TOTAL; i++) {
-
- errno=-4;
-
- /*
- * Call pathconf(2)
- */
- TEST(pathconf(path, args[i].value));
-
- /*
- * A test case can only fail if -1 is returned and the errno
- * was set. If the errno remains unchanged, the
- * system call did not fail.
- */
- if ( TEST_RETURN == -1 && errno != -4 ) {
- tst_resm(TFAIL, "pathconf(%s, %s) Failed, errno=%d : %s",
- path, args[i].define_tag,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "pathconf(%s, %s) returned %d",
- path, args[i].define_tag, TEST_RETURN);
- }
- }
- }
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/pause01.c b/winsup/testsuite/winsup.api/ltp/pause01.c
deleted file mode 100644
index 1c3b946..0000000
--- a/winsup/testsuite/winsup.api/ltp/pause01.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : pause01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for pause(2)
- *
- * PARENT DOCUMENT : xxxtds01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 2
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) pause(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the pause(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * pause(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="pause01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={EINTR, 0};
-void go();
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- (void) signal(SIGALRM, go);
- alarm(1);
- /*
- * Call pause(2)
- */
- TEST(pause());
-
- /* check return code. Pause returns -1 and EINTR errno */
- if (TEST_RETURN != -1) {
- tst_resm(TFAIL,
- "pause() returned WITHOUT an error return code : %d",
- TEST_ERRNO);
- } else {
- /* log the errno */
- TEST_ERROR_LOG(TEST_ERRNO);
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* check the errno */
- if (TEST_ERRNO == EINTR)
- tst_resm(TPASS, "pause() returned %d", TEST_RETURN);
- else
- tst_resm(TFAIL, "pause() returned %d. Expected %d (EINTR)",
- TEST_RETURN, EINTR);
- }
- }
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-/* routine to catch the alarm signal */
-void
-go()
-{
-}
diff --git a/winsup/testsuite/winsup.api/ltp/pipe01.c b/winsup/testsuite/winsup.api/ltp/pipe01.c
deleted file mode 100644
index cc01cc9..0000000
--- a/winsup/testsuite/winsup.api/ltp/pipe01.c
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * pipe01.c
- *
- * DESCRIPTION
- * Testcase to check the basic functionality of the pipe(2) syscall:
- * Check that both ends of the pipe (both file descriptors) are
- * available to a process opening the pipe.
- *
- * ALGORITHM
- * Write a string of characters down a pipe; read the string from the
- * other file descriptor. Test passes if both can be done, as reported
- * by the number of characters written and read.
- *
- * USAGE: <for command-line>
- * pipe01 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * RESTRICITONS
- * NONE
- */
-#include <errno.h>
-#include "test.h"
-#include "usctest.h"
-
-const char *TCID = "pipe01";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- int fildes[2]; /* fds for pipe read and write */
- char wrbuf[BUFSIZ], rebuf[BUFSIZ];
- int red, written; /* no. of chars read/written to pipe */
- int greater, length;
- char *strcpy();
-
- /* parse standard options */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- setup();
-
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
- TEST(pipe(fildes));
-
- if (TEST_RETURN == -1) {
- tst_resm(TFAIL, "pipe() failed unexpectedly - errno %d",
- TEST_ERRNO);
- continue;
- }
-
- if (STD_FUNCTIONAL_TEST) {
-
- strcpy(wrbuf, "abcdefghijklmnopqrstuvwxyz");
- length = strlen(wrbuf);
-
- if ((written = write(fildes[1], wrbuf, length)) == -1) {
- tst_brkm(TBROK, cleanup, "write() failed");
- }
-
- if ((written < 0) || (written > 26)) {
- tst_resm(TFAIL, "Condition #1 test failed");
- continue;
- }
-
- if ((red = read(fildes[0], rebuf, written)) == -1) {
- tst_brkm(TBROK, cleanup, "read() failed");
- }
-
- if ((red < 0) || (red > written)) {
- tst_resm(TFAIL, "Condition #2 test failed");
- continue;
- }
-
- /* are the strings written and read equal */
- if ((greater = memcmp(rebuf, wrbuf, red)) != 0) {
- tst_resm(TFAIL, "Condition #3 test failed");
- continue;
- }
- tst_resm(TPASS, "pipe() functionality is correct");
- } else {
- tst_resm(TPASS, "call succeeded");
- }
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/pipe08.c b/winsup/testsuite/winsup.api/ltp/pipe08.c
deleted file mode 100644
index 70d61da..0000000
--- a/winsup/testsuite/winsup.api/ltp/pipe08.c
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * pipe08.c
- *
- * DESCRIPTION
- * Check that a SIGPIPE signal is generated when a write is
- * attempted on an empty pipe.
- *
- * ALGORITHM
- * 1. Write to a pipe after closing the read side.
- * 2. Check for the signal SIGPIPE to be received.
- *
- * USAGE: <for command-line>
- * pipe08 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * USAGE
- * pipe08
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None
- */
-#include <errno.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-const char *TCID = "pipe08";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-void sighandler(int);
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- int pipefd[2]; /* fds for pipe read/write */
- char wrbuf[BUFSIZ];
- int written, length;
- int close_stat; /* exit status of close(read fd) */
-
- /* parse standard options */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- if (!STD_FUNCTIONAL_TEST) {
- tst_resm(TWARN, "-f option should not be used");
- }
-
- setup();
-
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
- TEST(pipe(pipefd));
-
- if (TEST_RETURN != 0) {
- tst_resm(TFAIL, "call failed unexpectedly");
- continue;
- }
-
- if ((close_stat = close(pipefd[0])) == -1) {
- tst_brkm(TBROK, cleanup, "close of read side failed");
- }
-
- strcpy(wrbuf, "abcdefghijklmnopqrstuvwxyz\0");
- length = strlen(wrbuf);
-
- /*
- * the SIGPIPE signal will be caught here or else
- * the program will dump core when the signal is
- * sent
- */
- written = write(pipefd[1], wrbuf, length);
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * sighandler - catch signals and look for SIGPIPE
- */
-void
-sighandler(int sig)
-{
- if (sig != SIGPIPE) {
- tst_resm(TFAIL, "expected SIGPIPE, got %d", sig);
- } else {
- tst_resm(TPASS, "got expected SIGPIPE signal");
- }
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, sighandler, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/pipe09.c b/winsup/testsuite/winsup.api/ltp/pipe09.c
deleted file mode 100644
index eb21bb6..0000000
--- a/winsup/testsuite/winsup.api/ltp/pipe09.c
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * pipe09.c
- *
- * DESCRIPTION
- * Check that two processes can use the same pipe at the same time.
- *
- * ALGORITHM
- * 1. Open a pipe
- * 2. Fork a child which writes to the pipe
- * 3. Fork another child which writes a different character to the pipe
- * 4. Have the parent read from the pipe
- * 5. It should get the characters from both children.
- *
- * USAGE: <for command-line>
- * pipe09 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None
- */
-#include <signal.h>
-#include <sys/wait.h>
-#include <errno.h>
-#include "test.h"
-#include "usctest.h"
-
-#define PIPEWRTCNT 100 /* must be an even number */
-
-const char *TCID = "pipe09";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- int i, red, wtstatus;
- int pipefd[2]; /* fds for pipe read/write */
- char rebuf[BUFSIZ];
- int Acnt = 0, Bcnt = 0; /* count 'A' and 'B' */
- int fork_1, fork_2; /* ret values in parent */
-
- /* parse standard options */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- setup();
-
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
- TEST(pipe(pipefd));
-
- if (TEST_RETURN == -1) {
- tst_resm(TFAIL, "pipe() call failed");
- continue;
- }
-
- if (!STD_FUNCTIONAL_TEST) {
- tst_resm(TWARN, "-f option should not be used");
- tst_resm(TPASS, "call succeeded");
- continue;
- }
-
- if ((fork_1 = fork()) == -1) {
- tst_brkm(TBROK, cleanup, "fork() #1 failed");
- /*NOTREACHED*/
- }
-
- if (fork_1 == 0) { /* 1st child */
- if (close(pipefd[0]) != 0) {
- tst_resm(TWARN, "pipefd[0] close failed, "
- "errno = %d", errno);
- exit(1);
- }
-
- for (i = 0; i < PIPEWRTCNT / 2; ++i) {
- if (write(pipefd[1], "A", 1) != 1) {
- tst_resm(TWARN, "write to pipe failed");
- exit(1);
- }
- }
- exit(0);
- }
-
- /* parent */
-
- waitpid(fork_1, &wtstatus, 0);
- if (WEXITSTATUS(wtstatus) != 0) {
- tst_brkm(TBROK, cleanup, "problem detected in child, "
- "wait status %d, errno = %d", wtstatus, errno);
- }
-
- if ((fork_2 = fork()) == -1) {
- tst_brkm(TBROK, cleanup, "fork() #2 failed");
- /*NOTREACHED*/
- }
-
- if (fork_2 == 0) { /* 2nd child */
- if (close(pipefd[0]) != 0) {
- tst_resm(TWARN, "pipefd[0] close "
- "failed, errno = %d", errno);
- exit(1);
- }
-
- for (i = 0; i < PIPEWRTCNT / 2; ++i) {
- if (write(pipefd[1], "B", 1) != 1) {
- tst_resm(TWARN, "write to pipe failed");
- exit(1);
- }
- }
- exit(0);
- }
-
- /* parent */
-
- waitpid(fork_2, &wtstatus, 0);
- if (WEXITSTATUS(wtstatus) != 0) {
- tst_brkm(TBROK, cleanup, "problem detected in child, "
- "wait status %d, errno = %d", wtstatus, errno);
- }
-
- if (close(pipefd[1]) != 0) {
- tst_brkm(TBROK, cleanup, "pipefd[1] close failed, "
- "errno = %d", errno);
- /*NOTREACHED*/
- }
-
- while ((red = read(pipefd[0], rebuf, 100)) > 0) {
- for (i = 0; i < red; i++) {
- if (rebuf[i] == 'A') {
- Acnt++;
- continue;
- }
- if (rebuf[i] == 'B') {
- Bcnt++;
- continue;
- }
- tst_resm(TFAIL, "got bogus '%c' character",
- rebuf[i]);
- break;
- }
- }
-
- if (red == -1) {
- tst_brkm(TBROK, cleanup, "Failure reading pipefd pipe, "
- "errno = %d", errno);
- }
-
- if (Bcnt == Acnt && Bcnt == (PIPEWRTCNT / 2)) {
- tst_resm(TPASS, "functionality appears to be correct");
- } else {
- tst_resm(TFAIL, "functionality is not correct - Acnt "
- "= %d, Bcnt = %d", Acnt, Bcnt);
- }
-
- /* clean up things in case we are looping */
- Acnt = Bcnt = 0;
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/pipe10.c b/winsup/testsuite/winsup.api/ltp/pipe10.c
deleted file mode 100644
index 52ac5d9..0000000
--- a/winsup/testsuite/winsup.api/ltp/pipe10.c
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * pipe10.c
- *
- * DESCRIPTION
- * Check that parent can open a pipe and have a child read from it
- *
- * ALGORITHM
- * Parent opens pipe, child reads. Passes if child can read all the
- * characters written by the parent.
- *
- * USAGE: <for command-line>
- * pipe10 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None
- */
-#include <errno.h>
-#include <sys/wait.h>
-#include <test.h>
-#include <usctest.h>
-
-const char *TCID = "pipe10";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- int fd[2]; /* fds for pipe read/write */
- char wrbuf[BUFSIZ], rebuf[BUFSIZ];
- int red, written; /* no of chars read and */
- /* written to pipe */
- int length, greater, forkstat;
-
- /* parse standard options */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- setup();
-
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
- TEST(pipe(fd));
-
- if (TEST_RETURN == -1) {
- tst_resm(TFAIL, "pipe creation failed");
- continue;
- }
-
- if (!STD_FUNCTIONAL_TEST) {
- tst_resm(TPASS, "call succeeded");
- continue;
- }
-
- strcpy(wrbuf, "abcdefghijklmnopqrstuvwxyz\0");
- length = strlen(wrbuf);
-
- written = write(fd[1], wrbuf, length);
-
- /* did write write at least some chars */
- if ((written < 0) || (written > length)) {
- tst_brkm(TBROK, cleanup, "write to pipe failed");
- }
-
- forkstat = fork();
-
- if (forkstat == -1) {
- tst_brkm(TBROK, cleanup, "fork() failed");
- /*NOTREACHED*/
- }
-
- if (forkstat == 0) { /* child */
- red = read(fd[0], rebuf, written);
-
- /* did read , get at least some chars */
- if ((red < 0) || (red > written)) {
- tst_brkm(TBROK, cleanup, "read pipe failed");
- }
-
- greater = memcmp(rebuf, wrbuf, red);
-
- /* are the strings written and read equal */
- if (greater == 0) {
- tst_resm(TPASS, "functionality is correct");
- } else {
- tst_resm(TFAIL, "read & write strings do "
- "not match");
- }
- } else { /* parent */
- /* let the child carry on */
- exit(0);
- }
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/pipe11.c b/winsup/testsuite/winsup.api/ltp/pipe11.c
deleted file mode 100644
index 558e70a..0000000
--- a/winsup/testsuite/winsup.api/ltp/pipe11.c
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * pipe11.c
- *
- * DESCRIPTION
- * Check if many children can read what is written to a pipe by the
- * parent.
- *
- * ALGORITHM
- * 1. Open a pipe and write to it
- * 2. Fork a large number of children
- * 3. Have the children read the pipe and check how many characters
- * each got
- *
- * USAGE: <for command-line>
- * pipe11 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None
- */
-#include <errno.h>
-#include <limits.h>
-#include <sys/wait.h>
-#include "test.h"
-#include "usctest.h"
-
-const char *TCID = "pipe11";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-
-#define NUMCHILD 50
-#define NCPERCHILD 50
-char rawchars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
-int kidid;
-int numchild; /* no of children to fork */
-int ncperchild; /* no of chars child should read */
-int szcharbuf; /* size of char buf */
-int pipewrcnt; /* chars written to pipe */
-char *wrbuf, *rdbuf;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- int fd[2]; /* fds for pipe read/write */
- int i;
- int fork_ret, status;
- int nread, written; /* no of chars read and written */
-
- /* parse standard options */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- setup();
-
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
- TEST(pipe(fd));
-
- if (TEST_RETURN != 0) {
- tst_resm(TFAIL, "pipe creation failed");
- continue;
- }
-
- if (!STD_FUNCTIONAL_TEST) {
- tst_resm(TPASS, "call succeeded");
- continue;
- }
-
- written = write(fd[1], wrbuf, szcharbuf);
- if (written != szcharbuf) {
- tst_brkm(TBROK, cleanup, "write to pipe failed");
- }
-
-refork:
- ++kidid;
- fork_ret = fork();
-
- if (fork_ret < 0) {
- tst_brkm(TBROK, cleanup, "fork() failed");
- /*NOTREACHED*/
- }
-
- if ((fork_ret != 0) && (fork_ret != -1) && (kidid < numchild)) {
- goto refork;
- }
-
- if (fork_ret == 0) { /* child */
- if (close(fd[1])) {
- tst_resm(TINFO, "child %d " "could not close "
- "pipe", kidid);
- exit(0);
- }
- nread = read(fd[0], rdbuf, ncperchild);
- if (nread == ncperchild) {
- tst_resm(TINFO, "child %d " "got %d chars",
- kidid, nread);
- exit(0);
- } else {
- tst_resm(TFAIL, "child %d did not receive "
- "expected no of characters, got %d "
- "characters", kidid, nread);
- exit(1);
- }
- }
-
- /* parent */
- sleep(5);
- tst_resm(TINFO, "There are %d children to wait for", kidid);
- for (i = 1; i <= kidid; ++i) {
- wait(&status);
- if (status == 0) {
- tst_resm(TPASS, "child %d exitted successfully",
- i);
- } else {
- tst_resm(TFAIL, "child %d exitted with bad "
- "status", i);
- }
- }
- }
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- */
-void
-setup()
-{
- int i, j;
-
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- numchild = NUMCHILD;
- ncperchild = NCPERCHILD;
-
- kidid = 0;
-
- /* allocate read and write buffers */
- szcharbuf = numchild * ncperchild;
-
- /* make sure pipe write doesn't block */
- if (szcharbuf == PIPE_BUF) {
- /* adjust number of characters per child */
- ncperchild = szcharbuf / numchild;
- }
-
- if ((wrbuf = (char *)malloc(szcharbuf)) == (char *)0) {
- tst_brkm(TBROK, cleanup, "malloc failed");
- /*NOTREACHED*/
- }
-
- if ((rdbuf = (char *)malloc(szcharbuf)) == (char *)0) {
- tst_brkm(TBROK, cleanup, "malloc of rdbuf failed");
- /*NOTREACHED*/
- }
-
- /* initialize wrbuf */
- j = 0;
- for (i = 0; i < szcharbuf; ) {
- wrbuf[i++] = rawchars[j++];
- if (j >= (int)sizeof(rawchars)) {
- j = 0;
- }
- }
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/poll01.c b/winsup/testsuite/winsup.api/ltp/poll01.c
deleted file mode 100644
index 704b738..0000000
--- a/winsup/testsuite/winsup.api/ltp/poll01.c
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: poll01
- *
- * Test Description:
- * Verify that valid open file descriptor must be provided to poll() to
- * succeed.
- *
- * Expected Result:
- * poll should return the correct values when an valid file descriptor is
- * provided.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- * Usage: <for command-line>
- * poll01 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * None.
- */
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/wait.h>
-#include <sys/poll.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define BUF_SIZE 512
-
-const char *TCID="poll01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int fildes[2]; /* file descriptors of the pipe. */
-struct pollfd fds[1]; /* struct. for poll() */
-
-void setup(); /* Main setup function of test */
-void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- pid_t cpid; /* child process id */
- char write_buf[] = "Testing\0"; /* buffer string for write */
- char read_buf[BUF_SIZE]; /* buffer for read-end of pipe */
- int status; /* exit status of child process */
- int rval;
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *)NULL, NULL);
- if (msg != (char *)NULL) {
- tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
- }
-
- /* Perform global setup for test */
- setup();
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- /* Reset Tst_count in case we are looping. */
- Tst_count = 0;
-
- /*
- * Call poll() with the TEST macro.
- */
- TEST(poll(fds, 1, -1));
-
- /* check return code of poll() */
- if (TEST_RETURN == -1) {
- tst_resm(TFAIL, "poll() failed on write, errno=%d"
- " : %s", TEST_ERRNO, strerror(TEST_ERRNO));
- continue;
- }
-
- /* write the message to the pipe */
- if (write(fildes[1], write_buf, strlen(write_buf))
- < (int)strlen(write_buf)) {
- tst_brkm(TBROK, cleanup, "write() failed on write "
- "to pipe, error:%d", errno);
- }
-
- /* Fork child process */
- if ((cpid = fork()) == -1) {
- tst_brkm(TBROK, cleanup, "fork() failed");
- }
-
- if (cpid == 0) { /* Child process */
- /*
- * close writing end of pipe and read from
- * the pipe
- */
- if (close(fildes[1]) == -1) {
- tst_brkm(TFAIL, NULL, "close() failed on write "
- "endof pipe, errno:%d", errno);
- exit(1);
- }
-
- /*
- * Set poll() data structures to check
- * if data is present on read
- */
- fds[0].fd = fildes[0];
- fds[0].events = POLLIN;
-
- /*
- * If data are present, then read the data. If poll()
- * and read() return expected values, then the
- * functionality of poll() is correct.
- */
- rval = (poll(fds, 1, -1));
-
- if (rval == -1) {
- tst_resm(TFAIL, "poll() failed on read - "
- "errno=%d : %s",
- TEST_ERRNO, strerror(errno));
- exit(1);
- }
-
- /* Read data from read end of pipe */
- if (read(fildes[0], read_buf, sizeof(read_buf)) !=
- (int)strlen(write_buf)) {
- tst_brkm(TFAIL, NULL, "read() failed - "
- "error:%d", errno);
- exit(1);
- }
-
- /* Now, do the actual comparision */
- if (memcmp(read_buf, write_buf, strlen(write_buf))) {
- tst_resm(TFAIL, "Data from reading pipe "
- "are different");
- exit(1);
- }
-
- /* Everything is fine, exit normally */
- exit(0);
- } else { /* Parent process */
- /* Wait for child to complete execution */
- wait(&status);
-
- if (WEXITSTATUS(status) == 1) {
- tst_resm(TFAIL, "child exited abnormally");
- } else {
- tst_resm(TPASS,
- "Functionality of poll() successful");
- }
- }
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- * Creat read/write pipe using pipe().
- * Set poll data structures to check writing to the pipe.
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* Creat read/write pipe */
- if (pipe(fildes) < 0) {
- tst_brkm(TBROK, tst_exit,
- "pipe() failed to create interprocess channel");
- }
-
- /* Set poll data structures */
- fds[0].fd = fildes[1];
- fds[0].events = POLLOUT;
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * close read end of pipe if still open.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* close read end of pipe if still open */
- if (close(fildes[0]) < 0) {
- tst_brkm(TFAIL, NULL, "close() failed on read-end of pipe, "
- "errno:%d", errno);
- }
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/read01.c b/winsup/testsuite/winsup.api/ltp/read01.c
deleted file mode 100644
index 332b939..0000000
--- a/winsup/testsuite/winsup.api/ltp/read01.c
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : read01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for read(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) read(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the read(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * read(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/param.h>
-#include <errno.h>
-#include <signal.h>
-#include <string.h>
-#include "test.h"
-#include "usctest.h"
-
-/*
- * Set READ_BLOCK_SIZE to the block size of the system.
- */
-#ifdef linux
-#define READ_BLOCK_SIZE DEV_BSIZE
-#else
-#ifdef __CYGWIN__
-#define READ_BLOCK_SIZE S_BLKSIZE
-#else
-#define READ_BLOCK_SIZE BSIZE
-#endif
-#endif
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="read01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-char fname[255];
-int fd, i;
-int offset=0;
-char *s;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- if (write(fd, s, READ_BLOCK_SIZE) == -1) {
- tst_brkm(TBROK, cleanup,
- "write(%s, %s, %d) Failed, errno=%d : %s",
- fname, s, READ_BLOCK_SIZE, errno, strerror(errno));
- }
- offset+=READ_BLOCK_SIZE;
- if (lseek(fd, (long)(offset-READ_BLOCK_SIZE), 0) == -1) {
- tst_brkm(TBROK, cleanup,
- "lseek(%s, %ld, 0) Failed, errno=%d : %s",
- fname, (long)(offset-READ_BLOCK_SIZE), errno, strerror(errno));
- }
- /*
- * Call read(2)
- */
- TEST(read(fd, s, READ_BLOCK_SIZE));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "read(fd, s, READ_BLOCK_SIZE) Failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "read(pfds) returned %d", TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- if ((s = malloc(READ_BLOCK_SIZE)) == NULL) {
- tst_brkm(TBROK, cleanup,
- "malloc(%d) Failed, errno=%d : %s",
- READ_BLOCK_SIZE, errno, strerror(errno));
- }
- (void) memset(s, '*', READ_BLOCK_SIZE);
- for (i=0; i < READ_BLOCK_SIZE; i++) {
- if ( s[i] != '*' ) {
- tst_brkm(TBROK, cleanup,
- "File Data pattern not setup correctly : expected * at s[%d] : found %c",
- i, s[i]);
- }
- }
- sprintf(fname,"./tfile_%d",getpid());
- if ((fd=open(fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- if (close(fd) == -1 ) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/read04.c b/winsup/testsuite/winsup.api/ltp/read04.c
deleted file mode 100644
index c976cd6..0000000
--- a/winsup/testsuite/winsup.api/ltp/read04.c
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * read01.c
- *
- * DESCRIPTION
- * Testcase to check if read returns the number of bytes read correctly.
- *
- * ALGORITHM
- * Create a file and write some bytes out to it.
- * Attempt to read more than written.
- * Check the return count, and the read buffer. The read buffer should be
- * same as the write buffer.
- *
- * USAGE: <for command-line>
- * read01 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None
- */
-#include <fcntl.h>
-#include <errno.h>
-#include "test.h"
-#include "usctest.h"
-
-void cleanup(void) __attribute__((noreturn));
-void setup(void);
-
-const char *TCID = "read01";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-#define TST_SIZE 26 /* could also do strlen(palfa) */
-char fname[255];
-char palfa[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ;
-int fild;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- int rfild;
- char prbuf[BUFSIZ];
-
- /*
- * parse standard options
- */
- if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
- tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- setup(); /* global setup for test */
-
- /* check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- Tst_count = 0; /* reset Tst_count while looping */
-
- if ((rfild = open(fname, O_RDONLY)) == -1) {
- tst_brkm(TBROK, cleanup, "can't open for reading");
- /*NOTREACHED*/
- }
- TEST(read(rfild, prbuf, BUFSIZ));
-
- if (TEST_RETURN == -1) {
- tst_resm(TFAIL, "call failed unexpectedly");
- continue;
- }
-
- if (STD_FUNCTIONAL_TEST) {
- if (TEST_RETURN != TST_SIZE) {
- tst_resm(TFAIL, "Bad read count - got %d - "
- "expected %d", TEST_RETURN, TST_SIZE);
- continue;
- }
- if (memcmp(palfa, prbuf, TST_SIZE) != 0) {
- tst_resm(TFAIL, "read buffer not equal "
- "to write buffer");
- continue;
- }
- tst_resm(TPASS, "functionality of read() is correct");
- } else {
- tst_resm(TPASS, "call succeeded");
- }
- if (close(rfild) == -1) {
- tst_brkm(TBROK, cleanup, "close() failed");
- /*NOTREACHED*/
- }
- }
- cleanup();
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test
- */
-void
-setup(void)
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- umask(0);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- sprintf(fname,"tfile_%d",getpid());
-
- if ((fild = creat(fname, 0777)) == -1) {
- tst_brkm(TBROK, cleanup, "creat(%s, 0777) Failed, errno = %d"
- " : %s", fname, errno, strerror(errno));
- /*NOTREACHED*/
- }
- if (write(fild, palfa, TST_SIZE) != TST_SIZE) {
- tst_brkm(TBROK, cleanup, "can't write to Xread");
- /*NOTREACHED*/
- }
- close (fild);
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at completion or
- * premature exit.
- */
-void
-cleanup(void)
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- unlink(fname);
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/readdir01.c b/winsup/testsuite/winsup.api/ltp/readdir01.c
deleted file mode 100644
index c77e906..0000000
--- a/winsup/testsuite/winsup.api/ltp/readdir01.c
+++ /dev/null
@@ -1,350 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : readdir01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : write multiple files and try to find them with readdir
- *
- * TEST CASE TOTAL :
- *
- * WALL CLOCK TIME :
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Nate Straz
- *
- * CO-PILOT :
- *
- * DATE STARTED : 02/16/2001
- *
- * INITIAL RELEASE : Linux 2.4.x
- *
- * TEST CASES
- *
- * 1.) Create n files and check that readdir() finds n files
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the readdir(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * readdir(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
- /* test.h and usctest.h are the two header files that are required by the
- * quickhit package. They contain function and macro declarations which you
- * can use in your test programs
- */
-#include "test.h"
-#include "usctest.h"
-
- /* The setup and cleanup functions are basic parts of a test case. These
- * steps are usually put in separate functions for clarity. The help function
- * is only needed when you are adding new command line options.
- */
-void setup();
-void help();
-void cleanup(void) __attribute__((noreturn));
-
-const char *TCID="readdir01"; /* Test program identifier. */
-int TST_TOTAL=2; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-extern int Tst_nobuf;
-
-int exp_enos[]={0, 0};
-
-#define BASENAME "readdirfile"
-
-char Basename[255];
-char Fname[255];
-int Nfiles=0;
-
-/* To add command line options you need to declare a structure to pass to
- * parse_opts(). options is the structure used in this example. The format is
- * the string that should be added to optstring in getopt(3), an integer that
- * will be used as a flag if the option is given, and a pointer to a string that
- * should receive the optarg parameter from getopt(3). Here we add a -N
- * option. Long options are not supported at this time.
- */
-char *Nfilearg;
-int Nflag=0;
-
-/* for test specific parse_opts options */
-option_t options[] = {
- { "N:", &Nflag, &Nfilearg }, /* -N #files */
- { NULL, NULL, NULL }
-};
-
-/***********************************************************************
- * Main
- ***********************************************************************/
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- int cnt;
- int nfiles, fd;
- char fname[255];
- DIR *test_dir;
- struct dirent *dptr;
-
- Tst_nobuf=1;
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- /* start off by parsing the command line options. We provide a function
- * that understands many common options to control looping. If you are not
- * adding any new options, pass NULL in place of options and &help.
- */
- if ( (msg=parse_opts(ac, av, options, &help)) ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- if ( Nflag ) {
- if (sscanf(Nfilearg, "%i", &Nfiles) != 1 ) {
- tst_brkm(TBROK, NULL, "--N option arg is not a number");
- tst_exit();
- }
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- /* Next you should run a setup routine to make sure your environment is
- * sane.
- */
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state
- ***************************************************************/
- /* TEST_LOOPING() is a macro that will make sure the test continues
- * looping according to the standard command line args.
- */
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- if ( Nfiles )
- nfiles = Nfiles;
- else
- /* min of 10 links and max of a 100 links */
- nfiles = (lc%90)+10;
-
- /* create a bunch of files to look at */
- for(cnt=0; cnt < nfiles; cnt++) {
-
- sprintf(fname, "%s%d", Basename, cnt);
- if ((fd = open(fname, O_RDWR|O_CREAT, 0700)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s", fname, errno, strerror(errno));
- } else if (write(fd, "hello\n", 6) < 0) {
- tst_brkm(TBROK, cleanup,
- "write(%s, \"hello\\n\", 6) Failed, errno=%d : %s", fname, errno, strerror(errno));
- } else if (close(fd) < 0) {
- tst_res(TWARN, "close(%s) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
- }
-
- if ((test_dir = opendir(".")) == NULL) {
- tst_resm(TFAIL, "opendir(\".\") Failed, errno=%d : %s",
- errno, strerror(errno));
- } else {
- /* count the entries we find to see if any are missing */
- cnt = 0;
- errno = 0;
- while ( (dptr = readdir(test_dir)) ) {
- if (strcmp(dptr->d_name, ".") && strcmp(dptr->d_name, ".."))
- cnt++;
- }
-
- if (errno != 0) {
- tst_resm(TFAIL, "readir(test_dir) Failed on try %d, errno=%d : %s",
- cnt, errno, strerror(errno));
- }
- if (cnt == nfiles) {
- tst_resm(TPASS, "found all %d that were created", nfiles);
- } else if (cnt > nfiles) {
- tst_resm(TFAIL, "found more files than were created");
- tst_resm(TINFO, "created: %d, found: %d", nfiles, cnt);
- } else {
- tst_resm(TFAIL, "found less files than were created");
- tst_resm(TINFO, "created: %d, found: %d", nfiles, cnt);
- }
- }
-
- /* Here we clean up after the test case so we can do another iteration.
- */
- for(cnt=0; cnt < nfiles; cnt++) {
-
- sprintf(fname, "%s%d", Basename, cnt);
-
- if (unlink(fname) == -1) {
- tst_res(TWARN, "unlink(%s) Failed, errno=%d : %s",
- Fname, errno, strerror(errno));
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * help
- ***************************************************************/
-/* The custom help() function is really simple. Just write your help message to
- * standard out. Your help function will be called after the standard options
- * have been printed
- */
-void
-help()
-{
- printf(" -N #files : create #files files every iteration\n");
-}
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* You will want to enable some signal handling so you can capture
- * unexpected signals like SIGSEGV.
- */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- /* One cavet that hasn't been fixed yet. TEST_PAUSE contains the code to
- * fork the test with the -c option. You want to make sure you do this
- * before you create your temporary directory.
- */
- TEST_PAUSE;
-
- /* If you are doing any file work, you should use a temporary directory. We
- * provide tst_tmpdir() which will create a uniquely named temporary
- * directory and cd into it. You can now create files in the current
- * directory without worrying.
- */
- tst_tmpdir();
-
- sprintf(Basename, "%s_%d.", BASENAME, getpid());
-}
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* If you use a temporary directory, you need to be sure you remove it. Use
- * tst_rmdir() to do it automatically.
- */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/readlink01.c b/winsup/testsuite/winsup.api/ltp/readlink01.c
deleted file mode 100644
index 744fff0..0000000
--- a/winsup/testsuite/winsup.api/ltp/readlink01.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name : readlink01
- *
- * Test Description :
- * Verify that, readlink will succeed to read the contents of the symbolic
- * link created the process.
- *
- * Expected Result:
- * readlink() should return the contents of symbolic link path in the buffer
- * on success.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.
- *
- * Usage: <for command-line>
- * readlink01 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * This test should be run by 'non-super-user' only.
- *
- */
-#include <fcntl.h>
-#include <errno.h>
-#include <sys/stat.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define TESTFILE "testfile"
-#define SYMFILE "slink_file"
-#define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
-#define MAX_SIZE 256
-
-const char *TCID="readlink01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_val; /* strlen of testfile */
-
-void setup(); /* Setup function for the test */
-void cleanup(void) __attribute__((noreturn)); /* Cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- char buffer[MAX_SIZE]; /* temporary buffer to hold symlink contents*/
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *)NULL, NULL);
- if (msg != (char *)NULL) {
- tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
- }
-
- /* Perform global setup for test */
- setup();
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call readlink(2) to read the contents of
- * symlink into a buffer.
- */
- TEST(readlink(SYMFILE, buffer, sizeof(buffer)));
-
- /* Check return code of readlink(2) */
- if (TEST_RETURN == -1) {
- tst_resm(TFAIL, "readlink() on %s failed, errno=%d : %s"
- , SYMFILE, TEST_ERRNO, strerror(TEST_ERRNO));
- continue;
- }
-
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- /*
- * Compare the return value of readlink()
- * with the expected value which is the
- * strlen() of testfile.
- */
- if (TEST_RETURN == exp_val) {
- /* Check for the contents of buffer */
- if (memcmp(buffer, TESTFILE, exp_val) != 0) {
- tst_resm(TFAIL, "Pathname %s and buffer"
- " contents %s differ",
- TESTFILE, buffer);
- } else {
- tst_resm(TPASS, "readlink() "
- "functionality on '%s' is "
- "correct", SYMFILE);
- }
- } else {
- tst_resm(TFAIL, "readlink() return value %d "
- "does't match, Expected %d",
- TEST_RETURN, exp_val);
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- *
- * Create a temporary directory and change directory to it.
- * Create a test file under temporary directory and close it
- * Create a symbolic link of testfile.
- */
-void
-setup()
-{
- int fd; /* file handle for testfile */
-
- /* make sure test is not being run as root */
- if (0 == geteuid()) {
- tst_brkm(TBROK, tst_exit, "Must not run test as root");
- }
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- if ((fd = open(TESTFILE, O_RDWR|O_CREAT, FILE_MODE)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, %#o) failed, errno=%d : %s",
- TESTFILE, FILE_MODE, errno, strerror(errno));
- }
-
- if (close(fd) == -1) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s",
- TESTFILE, errno, strerror(errno));
- }
-
- /* Create a symlink of testfile under temporary directory */
- if (symlink(TESTFILE, SYMFILE) < 0) {
- tst_brkm(TBROK, cleanup,
- "symlink(%s, %s) failed, errno=%d : %s",
- TESTFILE, SYMFILE, errno, strerror(errno));
- }
-
- /* Get the strlen of testfile */
- exp_val = strlen(TESTFILE);
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- *
- * Remove the test directory and testfile created in the setup.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/readlink02.c b/winsup/testsuite/winsup.api/ltp/readlink02.c
deleted file mode 100644
index 4ef6ffa..0000000
--- a/winsup/testsuite/winsup.api/ltp/readlink02.c
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : readlink02
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for readlink(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) readlink(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the readlink(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * readlink(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="readlink02"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-char fname[255], buf[255], symlnk[255];
-int fd;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call readlink(2)
- */
- TEST(readlink(symlnk, buf, 255));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "readlink(%s, buf, 255) Failed, errno=%d : %s", symlnk,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "readlink(%s, buf, 255) returned %d", symlnk, TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(fname,"./tfile_%d",getpid());
- if ((fd=open(fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
- if (close(fd) == -1 ) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
- sprintf(symlnk,"./sl_%d",getpid());
- if (symlink(fname, symlnk) == -1) {
- tst_resm(TWARN, "symlnk(%s, %s) Failed, errno=%d : %s",
- fname, symlnk, errno, strerror(errno));
- }
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/readlink03.c b/winsup/testsuite/winsup.api/ltp/readlink03.c
deleted file mode 100644
index 41cf4bb..0000000
--- a/winsup/testsuite/winsup.api/ltp/readlink03.c
+++ /dev/null
@@ -1,360 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name : readlink03
- *
- * Test Description :
- * Verify that,
- * 1) readlink(2) returns -1 and sets errno to EACCES if search/write
- * permission is denied in the directory where the symbolic link
- * resides.
- * 2) readlink(2) returns -1 and sets errno to EINVAL if the buffer size
- * is not positive.
- * 3) readlink(2) returns -1 and sets errno to EINVAL if the specified
- * file is not a symbolic link file.
- * 4) readlink(2) returns -1 and sets errno to ENAMETOOLONG if the
- * pathname component of symbolic link is too long (ie, > PATH_MAX).
- * 5) readlink(2) returns -1 and sets errno to ENOENT if the component of
- * symbolic link points to an empty string.
- *
- * Expected Result:
- * readlink() should fail with return value -1 and set expected errno.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * if errno set == expected errno
- * Issue sys call fails with expected return value and errno.
- * Otherwise,
- * Issue sys call fails with unexpected errno.
- * Otherwise,
- * Issue sys call returns unexpected value.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory(s)/file(s) created.
- *
- * Usage: <for command-line>
- * readlink03 [-c n] [-e] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS:
- * This test should be executed by 'non-super-user' only.
- */
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/stat.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define MODE_RWX S_IRWXU | S_IRWXG | S_IRWXO
-#define FILE_MODE S_IRUSR | S_IRGRP | S_IROTH
-#define DIR_TEMP "testdir_1"
-#define TESTFILE "testfile"
-#define TEST_FILE1 "testdir_1/tfile_1"
-#define SYM_FILE1 "testdir_1/sfile_1"
-#define TEST_FILE2 "tfile_2"
-#define SYM_FILE2 "sfile_2"
-#define MAX_SIZE 256
-
-const char *TCID="readlink03"; /* Test program identifier. */
-int TST_TOTAL=5; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int exp_enos[]={EACCES, EINVAL, ENAMETOOLONG, ENOENT, 0};
-
-int no_setup();
-int setup1(); /* setup function to test symlink for EACCES */
-int setup2(); /* setup function to test symlink for EEXIST */
-int lpath_setup(); /* setup function to test chmod for ENAMETOOLONG */
-
-char Longpathname[PATH_MAX+2];
-
-struct test_case_t { /* test case struct. to hold ref. test cond's*/
- const char *link;
- const char *desc;
- int exp_errno;
- size_t buf_siz;
- int (*setupfunc)();
-} Test_cases[] = {
-#ifndef __CYGWIN__
- { SYM_FILE1, "No Search permissions to process", EACCES, 1, setup1 },
- { SYM_FILE2, "Buffer size is not positive", EINVAL, -1, setup2 },
- { TEST_FILE2, "File is not symbolic link", EINVAL, 1, no_setup },
-#else
- { TEST_FILE2, "File is not symbolic link", EINVAL, 1, setup2 },
-#endif
- { Longpathname, "Symlink path too long", ENAMETOOLONG, 1, lpath_setup },
- { "", "Symlink Pathname is empty", ENOENT, 1, no_setup },
- { NULL, NULL, 0, 0, no_setup }
-};
-
-extern void setup(); /* Setup function for the test */
-void cleanup() __attribute__((noreturn));/* Cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- char buffer[MAX_SIZE]; /* temporary buffer to hold symlink contents*/
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- const char *sym_file; /* symbolic link file name */
- const char *test_desc; /* test specific error message */
- int i; /* counter to test different test conditions */
- size_t buf_size; /* size of buffer for readlink */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *)NULL, NULL);
- if (msg != (char *)NULL) {
- tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
- }
-
- /*
- * Invoke setup function to call individual test setup functions
- * to simulate test conditions.
- */
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- for (i = 0; Test_cases[i].desc != NULL; i++) {
- sym_file = Test_cases[i].link;
- test_desc = Test_cases[i].desc;
- buf_size = Test_cases[i].buf_siz;
-
- if (buf_size == 1) {
- buf_size = sizeof(buffer);
- }
-
- /*
- * Call readlink(2) to test different test conditions.
- * verify that it fails with -1 return value and sets
- * appropriate errno.
- */
- TEST(readlink(sym_file, buffer, buf_size));
-
- /* Check return code of readlink(2) */
- if (TEST_RETURN != -1) {
- tst_resm(TFAIL, "readlink() returned %d, "
- "expected -1, errno:%d", TEST_RETURN,
- Test_cases[i].exp_errno);
- continue;
- }
-
- TEST_ERROR_LOG(TEST_ERRNO);
-
- if (TEST_ERRNO == Test_cases[i].exp_errno) {
- tst_resm(TPASS, "readlink(), %s, returned "
- "errno %d", test_desc, TEST_ERRNO);
- tst_resm(TPASS, "readlink(), %s, returned "
- "errno %d", test_desc, TEST_ERRNO);
- } else {
- tst_resm(TFAIL, "readlink() failed, %s, "
- "errno=%d, expected errno=%d",
- test_desc, TEST_ERRNO,
- Test_cases[i].exp_errno);
- }
- } /* End of TEST CASE LOOPING. */
- } /* End for TEST_LOOPING */
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
-
- /*NOTREACHED*/
-} /* End main */
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- *
- * Create a temporary directory and change directory to it.
- * Call test specific setup functions.
- */
-void
-setup()
-{
- int i;
-
- /* make sure test is not being run as root */
- if (0 == geteuid()) {
- tst_brkm(TBROK, tst_exit, "Must not run test as root");
- }
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* call individual setup functions */
- for (i = 0; Test_cases[i].desc != NULL; i++) {
- Test_cases[i].setupfunc();
- }
-}
-
-/*
- * no_setup() - Some test conditions for readlink(2) do not any setup.
- */
-int
-no_setup()
-{
- return 0;
-}
-
-/*
- * setup1() - setup function for a test condition for which readlink(2)
- * returns -1 and sets errno to EACCES.
- *
- * Create a test directory under temporary directory and create a test file
- * under this directory with mode "0666" permissions.
- * Create a symlink of testfile under test directory.
- * Modify the mode permissions on test directory such that process will not
- * have search permissions on test directory.
- */
-int
-setup1()
-{
- int fd; /* file handle for testfile */
-
- if (mkdir(DIR_TEMP, MODE_RWX) < 0) {
- tst_brkm(TBROK, cleanup, "mkdir(2) of %s failed", DIR_TEMP);
- }
-
- if ((fd = open(TEST_FILE1, O_RDWR|O_CREAT, 0666)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, 0666) failed, errno=%d : %s",
- TEST_FILE1, errno, strerror(errno));
- }
- if (close(fd) == -1) {
- tst_brkm(TBROK, cleanup, "close(%s) failed, errno=%d : %s",
- TEST_FILE1, errno, strerror(errno));
- }
-
- /* Creat a symbolic link of testfile under test directory */
- if (symlink(TEST_FILE1, SYM_FILE1) < 0) {
- tst_brkm(TBROK, cleanup, "symlink of %s failed", TEST_FILE1);
- }
-
- /* Modify mode permissions on test directory */
- if (chmod(DIR_TEMP, FILE_MODE) < 0) {
- tst_brkm(TBROK, cleanup, "chmod(2) of %s failed", DIR_TEMP);
- }
- return 0;
-}
-
-/*
- * setup2() - setup function for a test condition for which readlink(2)
- * returns -1 and sets errno to EINVAL.
- *
- * Create a testfile under temporary directory and create a symlink
- * file of it.
- */
-int
-setup2()
-{
- int fd; /* file handle for testfile */
-
- /* Creat a testfile and close it */
- if ((fd = open(TEST_FILE2, O_RDWR|O_CREAT, 0666)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, 0666) failed, errno=%d : %s",
- TEST_FILE2, errno, strerror(errno));
- }
- if (close(fd) == -1) {
- tst_brkm(TBROK, cleanup, "close(%s) failed, errno=%d : %s",
- TEST_FILE2, errno, strerror(errno));
- }
-
- /* Creat a symlink of testfile created above */
- if (symlink(TEST_FILE2, SYM_FILE2) < 0) {
- tst_brkm(TBROK, cleanup, "symlink() failed to create %s in "
- "setup2, error=%d", SYM_FILE2, errno);
- }
- return 0;
-}
-
-/*
- * lpath_setup() - setup to create a node with a name length exceeding
- * the MAX. length of PATH_MAX.
- */
-int
-lpath_setup()
-{
- int i; /* counter variable */
-
- for (i = 0; i <= (PATH_MAX + 1); i++) {
- Longpathname[i] = 'a';
- }
- return 0;
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- *
- * Restore the mode permissions on test directory.
- * Remove the temporary directory created in the setup.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Restore mode permissions on test directory created in setup2() */
- if (chmod(DIR_TEMP, MODE_RWX) < 0) {
- tst_brkm(TBROK, NULL, "chmod(2) of %s failed", DIR_TEMP);
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/rename01.c b/winsup/testsuite/winsup.api/ltp/rename01.c
deleted file mode 100644
index 14ae1f2..0000000
--- a/winsup/testsuite/winsup.api/ltp/rename01.c
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * rename01
- *
- * DESCRIPTION
- * This test will verify the rename(2) syscall basic functionality.
- * Verify rename() works when the "new" file or directory does not exist.
- *
- * ALGORITHM
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * 1. "old" is plain file, new does not exists
- * create the "old" file, make sure the "new" file
- * dose not exist
- * rename the "old" to the "new" file
- * verify the "new" file points to the "old" file
- * verify the "old" file does not exist
- *
- * 2. "old" is a directory,"new" does not exists
- * create the "old" directory, make sure "new"
- * dose not exist
- * rename the "old" to the "new"
- * verify the "new" points to the "old"
- * verify the "old" does not exist
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.
- *
- * USAGE
- * rename01 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None.
- */
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-extern void do_file_setup(char *);
-
-const char *TCID="rename01"; /* Test program identifier. */
-int TST_TOTAL=2; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-char fname[255], mname[255];
-char fdir[255], mdir[255];
-struct stat buf1;
-dev_t f_olddev, d_olddev;
-ino_t f_oldino, d_oldino;
-
-struct test_case_t {
- const char *name1;
- const char *name2;
- const char *desc;
- dev_t *olddev;
- ino_t *oldino;
-} TC[] = {
- /* comment goes here */
- {fname, mname, "file", &f_olddev, &f_oldino},
-
- /* comment goes here */
- {fdir, mdir, "directory", &d_olddev, &d_oldino}
-};
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- int i;
-
- /*
- * parse standard options
- */
- if ((msg=parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL) {
- tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
- }
-
- /*
- * perform global setup for test
- */
- setup();
-
- /*
- * check looping state if -i option given
- */
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /* loop through the test cases */
- for (i=0; i<TST_TOTAL; i++) {
-
- TEST(rename(TC[i].name1, TC[i].name2));
-
- if (TEST_RETURN == -1) {
- tst_resm(TFAIL, "call failed unexpectedly");
- continue;
- }
-
- if (STD_FUNCTIONAL_TEST) {
- if (stat(TC[i].name2, &buf1) == -1) {
- tst_brkm(TBROK, cleanup, "stat of %s "
- "failed", TC[i].desc);
- /* NOTREACHED */
- }
-
- /*
- * verify the new file or directory is the
- * same as the old one
- */
- if (buf1.st_dev != *TC[i].olddev ||
- buf1.st_ino != *TC[i].oldino) {
- tst_resm(TFAIL, "rename() failed: the "
- "new %s points to a different "
- "inode/location", TC[i].desc);
- continue;
- }
- /*
- * verify that the old file or directory
- * does not exist
- */
- if (stat(fname, &buf1) != -1) {
- tst_resm(TFAIL, "the old %s still "
- "exists", TC[i].desc);
- continue;
- }
-
- tst_resm(TPASS, "functionality is correct "
- "for renaming a %s", TC[i].desc);
- } else {
- tst_resm(TPASS, "call succeeded on %s rename",
- TC[i].desc);
- }
- }
- /* reset things in case we are looping */
- if (rename(mname, fname) == -1) {
- tst_brkm(TBROK, cleanup, "file rename failed");
- }
-
- if (rename(mdir, fdir) == -1) {
- tst_brkm(TBROK, cleanup, "directory rename failed");
- }
- } /* End for TEST_LOOPING */
-
- /*
- * cleanup and exit
- */
- cleanup();
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* Create a temporary directory and make it current. */
- tst_tmpdir();
-
- sprintf(fname,"./tfile_%d",getpid());
- sprintf(mname,"./rnfile_%d",getpid());
- sprintf(fdir,"./tdir_%d",getpid());
- sprintf(mdir,"./rndir_%d",getpid());
-
- /* create the "old" file */
- do_file_setup(fname);
-
- if (stat(fname, &buf1)== -1) {
- tst_brkm(TBROK,cleanup, "failed to stat file %s"
- "in setup()", fname);
- /* NOTREACHED */
- }
-
- f_olddev = buf1.st_dev;
- f_oldino = buf1.st_ino;
-
- /* create "old" directory */
- if (mkdir(fdir, 00770) == -1) {
- tst_brkm(TBROK, cleanup, "Could not create directory %s", fdir);
- /*NOTREACHED*/
- }
-
- if (stat(fdir, &buf1) == -1) {
- tst_brkm(TBROK, cleanup, "failed to stat directory %s"
- "in setup()", fname);
- /* NOTREACHED */
- }
-
- d_olddev = buf1.st_dev;
- d_oldino = buf1.st_ino;
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /*
- * Remove the temporary directory.
- */
- tst_rmdir();
-
- /*
- * Exit with return code appropriate for results.
- */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/rename02.c b/winsup/testsuite/winsup.api/ltp/rename02.c
deleted file mode 100644
index d34cd10..0000000
--- a/winsup/testsuite/winsup.api/ltp/rename02.c
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : rename02
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for rename(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) rename(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the rename(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * rename(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-void do_file_setup();
-
-
-
-const char *TCID="rename02"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-int fd;
-char fname[255], mname[255];
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call rename(2)
- */
- TEST(rename(fname, mname));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "rename(%s, %s) Failed, errno=%d : %s", fname, mname,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "rename(%s, %s) returned %d", fname, mname, TEST_RETURN);
- }
- if (unlink(mname) == -1) {
- tst_resm(TWARN, "unlink(%s) Failed, errno=%d : %s", mname, errno, strerror(errno));
- }
- do_file_setup();
- }
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(fname,"./tfile_%d",getpid());
- sprintf(mname,"./rnfile_%d",getpid());
- do_file_setup();
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-
-} /* End cleanup() */
-
-void
-do_file_setup()
-{
- if ((fd=open(fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
-
- if (close(fd) == -1 )
- tst_resm(TWARN, "close(%s) Failed on file create, errno=%d : %s",
- fname, errno, strerror(errno));
-
-}
diff --git a/winsup/testsuite/winsup.api/ltp/rename08.c b/winsup/testsuite/winsup.api/ltp/rename08.c
deleted file mode 100644
index 0788ddc..0000000
--- a/winsup/testsuite/winsup.api/ltp/rename08.c
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * rename08
- *
- * DESCRIPTION
- * This test will verify that rename(2) syscall failed in EFAULT
- *
- * ALGORITHM
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- * Create a valid file to use in the rename() call.
- *
- * Test:
- * Loop if the proper options are given.
- * 1. "old" is a valid file, newpath points to address
- * outside allocated address space
- * rename the "old" to the "new" file
- * verify rename() failed with error EFAULT
- *
- * 2. "old" points to address outside allocated address space
- * ,"new" is a valid file
- * rename the "old" to the "new"
- * verify rename() failed with error EFAULT
- *
- * 3. oldpath and newpath are all NULL
- * try to rename NULL to NULL
- * verify rename() failed with error EFAULT
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.*
- * USAGE
- * rename08 [-c n] [-e] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None.
- */
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-extern void do_file_setup(char *);
-
-const char *TCID="rename08"; /* Test program identifier. */
-int TST_TOTAL=3; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={EFAULT, 0}; /* List must end with 0 */
-
-int fd;
-char fname[255];
-
-struct test_case_t {
- char *fd;
- char *fd2;
- int error;
-} TC[] = {
- /* "new" file is invalid - EFAULT */
- {fname, (char *)-1, EFAULT},
-
- /* "old" file is invalid - EFAULT */
- {(char *)-1, fname, EFAULT},
-
- /* both files are NULL - EFAULT */
- {NULL, NULL, EFAULT}
-};
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- int i;
-
- /*
- * parse standard options
- */
- if ((msg=parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL) {
- tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
- }
-
- /*
- * perform global setup for test
- */
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /*
- * check looping state if -i option given
- */
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /* loop through the test cases */
- for (i = 0; i < TST_TOTAL; i++) {
-
- TEST(rename(TC[i].fd, TC[i].fd2));
-
- if (TEST_RETURN != -1) {
- tst_resm(TFAIL, "call succeeded unexpectedly");
- continue;
- }
-
- TEST_ERROR_LOG(TEST_ERRNO);
-
- if (TEST_ERRNO == TC[i].error) {
- tst_resm(TPASS, "expected failure - "
- "errno = %d : %s", TEST_ERRNO,
- strerror(TEST_ERRNO));
- } else {
- tst_resm(TFAIL, "unexpected error - %d : %s - "
- "expected %d", TEST_ERRNO,
- strerror(TEST_ERRNO), TC[i].error);
- }
- }
- } /* End for TEST_LOOPING */
-
- /*
- * cleanup and exit
- */
- cleanup();
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* Create a temporary directory and make it current. */
- tst_tmpdir();
-
- sprintf(fname,"./tfile_%d",getpid());
-
- do_file_setup(fname);
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /*
- * Remove the temporary directory.
- */
- tst_rmdir();
-
- /*
- * Exit with return code appropriate for results.
- */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/rename10.c b/winsup/testsuite/winsup.api/ltp/rename10.c
deleted file mode 100644
index 438ef37..0000000
--- a/winsup/testsuite/winsup.api/ltp/rename10.c
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * rename10
- *
- * DESCRIPTION
- * This test will verify that rename(2) syscall fails with ENAMETOOLONG
- * and ENOENT
- *
- * ALGORITHM
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- * create the "old" file
- *
- * Test:
- * Loop if the proper options are given.
- * 1. rename the "old" to the "new" file
- * verify rename() failed with error ENAMETOOLONG
- *
- * 2. "new" path contains a directory that does not exist
- * rename the "old" to the "new"
- * verify rename() failed with error ENOENT
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.*
- *
- * USAGE
- * rename10 [-c n] [-e] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None.
- */
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-extern void do_file_setup(char *);
-
-const char *TCID="rename10"; /* Test program identifier. */
-int TST_TOTAL=2; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-char badmname[] = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstmnopqrstuvwxyzabcdefghijklmnopqrstmnopqrstuvwxyzabcdefghijklmnopqrstmnopqrstuvwxyzabcdefghijklmnopqrstmnopqrstuvwxyzabcdefghijklmnopqrstmnopqrstuvwxyzabcdefghijklmnopqrstmnopqrstuvwxyz";
-
-int exp_enos[]={ENAMETOOLONG, ENOENT, 0}; /* List must end with 0 */
-
-int fd;
-char fname[255], mname[255];
-char mdir[255];
-
-struct test_case_t {
- char *fd1;
- char *fd2;
- int error;
-} TC[] = {
- /* badmname is too long for a file name - ENAMETOOLONG */
- {fname, badmname, ENAMETOOLONG},
-
- /* mname contains a directory component which does not exist - ENOENT */
- {fname, mname, ENOENT}
-};
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- int i;
-
- /*
- * parse standard options
- */
- if ((msg=parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL) {
- tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
- }
-
- /*
- * perform global setup for test
- */
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /*
- * check looping state if -i option given
- */
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /* loop through the test cases */
- for (i=0; i < TST_TOTAL; i++) {
-
- TEST(rename(TC[i].fd1, TC[i].fd2));
-
- if (TEST_RETURN != -1) {
- tst_resm(TFAIL, "call succeeded unexpectedly");
- continue;
- }
-
- TEST_ERROR_LOG(TEST_ERRNO);
-
- if (TEST_ERRNO == TC[i].error) {
- tst_resm(TPASS, "expected failure - "
- "errno = %d : %s", TEST_ERRNO,
- strerror(TEST_ERRNO));
- } else {
- tst_resm(TFAIL, "unexpected error - %d : %s - "
- "expected %d", TEST_ERRNO,
- strerror(TEST_ERRNO), TC[i].error);
- }
- }
- } /* End for TEST_LOOPING */
-
- /*
- * cleanup and exit
- */
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* Create a temporary directory and make it current. */
- tst_tmpdir();
-
- sprintf(fname,"./tfile_%d",getpid());
- sprintf(mdir,"./rndir_%d",getpid());
- sprintf(mname,"%s/rnfile_%d",mdir,getpid());
-
- do_file_setup(fname);
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /*
- * Remove the temporary directory.
- */
- tst_rmdir();
-
- /*
- * Exit with return code appropriate for results.
- */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/rmdir01.c b/winsup/testsuite/winsup.api/ltp/rmdir01.c
deleted file mode 100644
index 1d41f1c..0000000
--- a/winsup/testsuite/winsup.api/ltp/rmdir01.c
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * rmdir01
- *
- * DESCRIPTION
- * This test will verify that rmdir(2) syscall basic functionality.
- * verify rmdir(2) returns a value of 0 and the directory being
- * removed
- *
- * ALGORITHM
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * make a directory tstdir
- * call rmdir(tstdir), check the return value
- * verify the directory tstdir does not exists.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.*
- * USAGE
- * rmdir01 [-c n] [-f] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * HISTORY
- * 07/2001 Ported by Wayne Boyer
- *
- * RESTRICTIONS
- * None.
- */
-#include <errno.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup() __attribute__((noreturn));
-
-#define PERMS 0777
-
-const char *TCID="rmdir01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-char tstdir [100];
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- struct stat buf;
-
- /*
- * parse standard options
- */
- if ((msg=parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL) {
- tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
- }
-
- /*
- * perform global setup for test
- */
- setup();
-
- /*
- * check looping state if -i option given
- */
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * TEST rmdir() base functionality
- */
-
- /* Initialize the test directory name */
-
- /* create a directory */
- if ( mkdir(tstdir, PERMS) == -1 ) {
- tst_brkm(TBROK, cleanup, "mkdir(%s, %#o) Failed",
- tstdir, PERMS);
- /*NOTREACHED*/
- }
- /* call rmdir using TEST macro */
-
- TEST(rmdir(tstdir));
-
- if (TEST_RETURN == -1 ) {
- tst_resm(TFAIL, "rmdir(%s) Failed", tstdir);
- continue;
- }
-
- if (STD_FUNCTIONAL_TEST) {
- /* check whether tstdir been removed */
- if (stat(tstdir, &buf) != -1) {
- tst_resm(TFAIL, "directory %s still exists",
- tstdir);
- continue;
- } else {
- tst_resm(TPASS, "directory has been removed");
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
-
- } /* End for TEST_LOOPING */
-
- /*
- * cleanup and exit
- */
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* Create a temporary directory and make it current. */
- tst_tmpdir();
-
- sprintf(tstdir,"./tstdir_%d",getpid());
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /*
- * Remove the temporary directory.
- */
- tst_rmdir();
-
- /*
- * Exit with return code appropriate for results.
- */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/rmdir04.c b/winsup/testsuite/winsup.api/ltp/rmdir04.c
deleted file mode 100644
index ece6a9f..0000000
--- a/winsup/testsuite/winsup.api/ltp/rmdir04.c
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : rmdir04
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for rmdir(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) rmdir(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the rmdir(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * rmdir(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <fcntl.h>
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="rmdir04"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-char *cwd;
-char fname[255];
-
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- if (mkdir(fname, 0777) == -1) {
- tst_brkm(TBROK, cleanup,
- "mkdir(%s) Failure. errno=%d : %s", fname, errno, strerror(errno));
- }
- /*
- * Call rmdir(2)
- */
- TEST(rmdir(fname));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "rmdir(%s) Failed, errno=%d : %s", fname,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "rmdir(%s) returned %d", fname, TEST_RETURN);
- }
- }
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(fname, "./dir_%d", getpid());
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/rmdir05.c b/winsup/testsuite/winsup.api/ltp/rmdir05.c
deleted file mode 100644
index ff19b3a..0000000
--- a/winsup/testsuite/winsup.api/ltp/rmdir05.c
+++ /dev/null
@@ -1,447 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : rmdir05
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Functionality Tests for rmdir(2)
- *
- * PARENT DOCUMENT : rmstds02
- *
- * TEST CASE TOTAL : 6
- *
- * WALL CLOCK TIME : 2
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Bill Branum
- *
- * CO-PILOT : Steve Shaw
- *
- * DATE STARTED : 4/23/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- * rmdir(2) test for errno(s) EINVAL, EMLINK, EFAULT
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * DETAILED DESCRIPTION
- * Verify that rmdir(2) returns a value of -1 and sets errno
- * to indicate the error.
- *
- * Setup:
- * Setup signal handling.
- * Create a temporary directory and make it current.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno.
- * If doing functional test
- * check the errno returned and print result message
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given.
- * Remove the temporary directory.
- * Exit.
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <string.h>
-#include "test.h"
-#include "usctest.h"
-
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-
-extern char *get_high_address();
-
-const char *TCID="rmdir05"; /* Test program identifier. */
-int TST_TOTAL=6; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines. */
-struct stat stat_buf; /* Stat buffer used for verification. */
-char dir_name[256]; /* Array to hold directory name. */
-
-
-int
-main(int argc, char **argv)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(argc, argv, (option_t *) NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * TEST CASE: 1
- * path points to the current directory
- */
-
- /* Call rmdir(2) */
- TEST(rmdir("."));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- }
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
-
- if ( TEST_RETURN == -1 ) {
-#if defined(sgi)
- if (TEST_ERRNO == EINVAL) {
-#elif defined(linux) || defined (__CYGWIN__)
- if (TEST_ERRNO & (EBUSY | ENOTEMPTY)) {
-#endif
-
- /* For functionality tests, verify that the
- * directory wasn't removed.
- */
- if (stat(".",&stat_buf) == -1){
- tst_resm(TFAIL,"rmdir(\".\") removed the current working directory when it should have failed.");
- } else {
- tst_resm(TPASS,"rmdir(\".\") failed to remove the current working directory. Returned %d : %s",TEST_ERRNO,strerror(TEST_ERRNO));
- }
- } else {
-#if defined(sgi)
- tst_resm(TFAIL,"rmdir(\".\") failed with errno %d : %s but expected %d (EINVAL)",TEST_ERRNO,strerror(TEST_ERRNO),EINVAL);
-#elif defined(linux) || defined (__CYGWIN__)
- tst_resm(TFAIL,"rmdir(\".\") failed with errno %d : %s but expected %d (EBUSY)",TEST_ERRNO,strerror(TEST_ERRNO),EBUSY);
-#endif
- }
- } else {
- tst_resm(TFAIL,"rmdir(\".\") succeeded unexpectedly.");
- }
- }
-
-
- /*
- * TEST CASE: 2
- * path points to the "." (dot) entry of a directory
- */
-#if defined(linux) || defined (__CYGWIN__)
- tst_resm(TCONF, "rmdir on \"dir/.\" supported on Linux");
-#elif defined(sgi)
- /* Call rmdir(2) */
- TEST(rmdir("dir1/."));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- }
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
-
- if ( TEST_RETURN == -1 ) {
- if (TEST_ERRNO == EINVAL) {
-
- /* For functionality tests, verify that the
- * directory wasn't removed.
- */
- if (stat("dir1/.",&stat_buf) == -1){
- tst_resm(TFAIL,"rmdir(\"dir1/.\") removed the \".\" entry of a directory when it should have failed.");
- } else {
- tst_resm(TPASS,"rmdir(\"dir1/.\") failed to remove the \".\" entry of a directory. Returned %d : %s",TEST_ERRNO,strerror(TEST_ERRNO));
- }
- } else {
- tst_resm(TFAIL,"rmdir(\"dir1/.\") failed with errno %d : %s but expected %d (EINVAL)",TEST_ERRNO,strerror(TEST_ERRNO),EINVAL);
- }
- } else {
- tst_resm(TFAIL,"rmdir(\"dir1/.\") - path points to the \".\" entry of a directory succeeded unexpectedly.");
- }
- }
-#endif
-
-#if defined(sgi)
- /*
- * TEST CASE: 3
- * the directory has been linked
- */
- tst_resm(TCONF, "linked directories not valid on IRIX");
-#elif defined(linux)
- tst_resm(TCONF, "linked directories test not implemented on Linux");
-#elif defined(CRAY)
-
-
- /* Call rmdir(2) */
- TEST(rmdir("dir2"));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- }
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
-
- if ( TEST_RETURN == -1 ) {
- if (TEST_ERRNO == EMLINK) {
- /* For functionality tests, verify that the directory wasn't
- * removed.
- */
- if (stat("dir2",&stat_buf) == -1){
- tst_resm(TFAIL,"rmdir(\"dir2\") removed a directory with multiple links when it should have failed.");
- } else {
- tst_resm(TPASS,"rmdir(\"dir2\") failed to remove a directory with multiple links. Returned %d : %s",TEST_ERRNO,strerror(TEST_ERRNO));
- }
- } else {
- tst_resm(TFAIL,"rmdir(\"dir2\") failed with errno %d : %s but expected %d (EMLINK)",TEST_ERRNO,strerror(TEST_ERRNO),EMLINK);
- }
- } else {
- tst_resm(TFAIL,"rmdir(\"dir2\") - the directory has been linked succeeded unexpectedly.");
- }
- }
-#endif /* linux */
-
-
- /*
- * TEST CASE: 4
- * path argument points below the minimum allocated address space
- */
-
-
- /* Call rmdir(2) */
- TEST(rmdir((char *)-1));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- }
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
-
- if ( TEST_RETURN == -1 ) {
- if (TEST_ERRNO == EFAULT) {
- tst_resm(TPASS,"rmdir() - path argument points below the minimum allocated address space failed as expected with errno %d : %s",TEST_ERRNO,strerror(TEST_ERRNO));
- } else {
- tst_resm(TFAIL,"rmdir() - path argument points below the minimum allocated address space failed with errno %d : %s but expected %d (EFAULT)",TEST_ERRNO,strerror(TEST_ERRNO),EFAULT);
- }
- } else {
- tst_resm(TFAIL,"rmdir() - path argument points below the minimum allocated address space succeeded unexpectedly.");
- }
- }
-
- /*
- * TEST CASE: 5
- * path argument points above the maximum allocated address space
- */
-
-
- /* Call rmdir(2) */
- TEST(rmdir( get_high_address()));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- }
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
-
- if ( TEST_RETURN == -1 ) {
- if (TEST_ERRNO == EFAULT) {
- tst_resm(TPASS,"rmdir() - path argument points above the maximum allocated address space failed as expected with errno %d : %s",TEST_ERRNO,strerror(TEST_ERRNO));
- } else {
- tst_resm(TFAIL,"rmdir() - path argument points above the maximum allocated address space failed with errno %d : %s but expected %d (EFAULT)",TEST_ERRNO,strerror(TEST_ERRNO),EFAULT);
- }
- } else {
- tst_resm(TFAIL,"rmdir() - path argument points above the maximum allocated address space succeeded unexpectedly.");
- }
- }
-
- /*
- * TEST CASE: 6
- * able to remove a directory
- */
-
- /* Create a directory. */
- if (mkdir(dir_name,0777) != 0){
- tst_brkm(TBROK,cleanup,"mkdir(\"%s\") failed with errno %d : %s",dir_name,errno,strerror(errno));
- }
-
- /* Call rmdir(2) */
- TEST(rmdir(dir_name));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL,"rmdir(\"%s\") failed when it should have passed. Returned %d : %s",dir_name,TEST_ERRNO,strerror(TEST_ERRNO));
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
-
- /* Verify the directory was removed. */
- if (stat(dir_name,&stat_buf) != 0){
- tst_resm(TPASS,"rmdir(\"%s\") removed the directory as expected.",dir_name);
- } else {
- tst_resm(TFAIL,"rmdir(\"%s\") returned a zero exit status but failed to remove the directory.",dir_name);
- }
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* Create a temporary directory and make it current. */
- tst_tmpdir();
-
- /* Create a directory. */
- if (mkdir("dir1",0777) == -1){
- tst_brkm(TBROK,cleanup,"mkdir() failed to create dir1.");
- }
-
-#if defined(CRAY)
- /* NOTE: linking directories is NOT valid on IRIX */
-
- /* Create a directory that has multiple links to it. */
- if (mkdir("dir2",0777) == -1){
- tst_brkm(TBROK,cleanup,"mkdir() failed to create dir2.");
- } else {
- if (system("runcmd `get_attrib -A link` dir2 mlink_dir > link.out 2>&1") != 0){
- tst_brk(TBROK,"link.out",cleanup,"link failed to link dir2 and mlink_dir.");
- }
- }
-
-#endif
-
- /* Create a unique directory name. */
- sprintf(dir_name,"./dir_%d",getpid());
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
-#if defined(CRAY)
- /* NOTE: setup was not done on IRIX */
- /* Unlink the directory. */
- if (system("runcmd `get_attrib -A unlink` dir2 > unlink.out 2>&1") != 0){
- tst_res(TWARN,"unlink.out","unlink failed to unlink dir2.");
- }
-#endif
-
- /*
- * Remove the temporary directory.
- */
- tst_rmdir();
-
- /*
- * Exit with a return value appropriate for the results.
- */
- tst_exit();
-
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/sbrk01.c b/winsup/testsuite/winsup.api/ltp/sbrk01.c
deleted file mode 100644
index 700fb6b..0000000
--- a/winsup/testsuite/winsup.api/ltp/sbrk01.c
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : sbrk01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for sbrk(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 2
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 06/05/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) sbrk(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the sbrk(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * sbrk(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/types.h>
-
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-
-
-const char *TCID="sbrk01"; /* Test program identifier. */
-int TST_TOTAL=2; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int Increment; /* Amount to make change size by */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- long tret;
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit(0);
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
-#ifdef __CYGWIN__
- /* we need to initialize output buffer before first sbrk.
- otherwise, when memory is freed bu second sbrk, fwrite will
- fail */
- tst_resm(TINFO, "Entering test");
-#endif
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
-
- /*
- * TEST CASE:
- * Increase by 8192 bytes
- */
- Increment = 8192;
-
- /* Call sbrk(2) */
-#if defined(sgi)
- tret=(long)sbrk(Increment); /* Remove -64 IRIX compiler warning */
- TEST_ERRNO=errno;
-#else
- TEST(sbrk(Increment));
- tret=TEST_RETURN;
-#endif
-
- /* check return code */
- if ( tret == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "sbrk - Increase by 8192 bytes failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "sbrk - Increase by 8192 bytes returned %d",
- tret);
- }
- }
-
-
- /*
- * TEST CASE:
- * Decrease to original size
- */
- Increment=(Increment * -1);
-
- /* Call sbrk(2) */
-#ifdef CRAY
- TEST(sbrk(Increment));
- tret=TEST_RETURN;
-#else
- tret=(long)sbrk(Increment);
- TEST_ERRNO=errno;
-#endif
-
- /* check return code */
- if ( tret == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "sbrk - Decrease to original size failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "sbrk - Decrease to original size returned %d", tret);
- }
- }
-
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp dir and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
-
-
- /* remove files and temp dir */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/select01.c b/winsup/testsuite/winsup.api/ltp/select01.c
deleted file mode 100644
index 3b81f93..0000000
--- a/winsup/testsuite/winsup.api/ltp/select01.c
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : select01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : select to a file
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 3
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Richard Logan
- *
- * CO-PILOT : William Roske
- *
- * DATE STARTED : 02/24/93
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) select(2) to a fd of regular file with no I/O and small timeout
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the select(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * join(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <signal.h>
-#include <fcntl.h> /* For open system call parameters. */
-#include <signal.h>
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/time.h>
-
-#ifdef __CYGWIN__
-/*
- FIXME: workaround for bug in newlib -- FD_ZERO is defined via bzero and
- if we don't include strings.h compiler warns about implicit declaration
-*/
-#include <strings.h>
-#endif
-
-#include "test.h"
-#include "usctest.h"
-
-#define FILENAME "select01"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-const char *TCID="select01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int Fd;
-fd_set Readfds;
-
-/***********************************************************************
- * MAIN
- ***********************************************************************/
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- struct timeval timeout;
- long test_time = 0; /* in usecs */
-
-
- /***************************************************************
- * parse standard options, and exit if there is an error
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Assigning the specified seconds within the timeval structure.
- */
- test_time = ((lc%2000)*100000); /* 100 milli-seconds */
-
- /*
- * Bound the time to a value less than 60 seconds
- */
-
- if ( test_time > 1000000 * 60 )
- test_time = test_time % (1000000 * 60);
-
- timeout.tv_sec = test_time / 1000000;
- timeout.tv_usec = test_time - (timeout.tv_sec * 1000000);
-
-
- /* Call the system call being tested. */
- TEST(select(4, &Readfds, 0, 0, &timeout));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL,
- "%d select(4, &Readfds, 0, 0, &timeout), timeout = %ld usecs, errno=%d",
- lc, test_time, errno);
- }
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* Perform functional verification here */
- tst_resm(TPASS,
- "select(4, &Readfds, 0, 0, &timeout) timeout = %ld usecs",
- test_time);
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* create a temporary directory and go to it */
- tst_tmpdir();
-
- if ((Fd=open(FILENAME, O_CREAT | O_RDWR)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_CREAT | O_RDWR) failed: errno:%d\n",
- errno);
- }
-
- /*
- * Initializing and assigning the standard output file descriptor to
- * fd_set for select.
- */
-
- FD_ZERO(&Readfds);
- FD_SET(Fd, &Readfds);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- close(Fd);
-
- /* remove temporary directory and all files in it. */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/select02.c b/winsup/testsuite/winsup.api/ltp/select02.c
deleted file mode 100644
index 935f4b2..0000000
--- a/winsup/testsuite/winsup.api/ltp/select02.c
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : select02
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : select of system pipe fds
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Richard Logan
- *
- * CO-PILOT : Glen Overby
- *
- * DATE STARTED : 02/24/93
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) select(2) to fd of system pipe with no I/O and small timeout
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the select(2) system call. It is intended
- * to provide a limited exposure of the system call, for now.
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <signal.h>
-#include <fcntl.h> /* For open system call parameters. */
-#include <signal.h>
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/time.h>
-
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-const char *TCID="select02"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int Fd[2];
-fd_set saved_Readfds, saved_Writefds;
-fd_set Readfds, Writefds;
-
-/***********************************************************************
- * MAIN
- ***********************************************************************/
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- struct timeval timeout;
- long test_time = 0; /* in usecs */
-
-
- /***************************************************************
- * parse standard options, and exit if there is an error
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Assigning the specified seconds within the timeval structure.
- */
-
- test_time = ((lc%2000)*100000); /* 100 milli-seconds */
-
- /*
- * Bound the time to a value less than 60 seconds
- */
-
- if ( test_time > 1000000 * 60 )
- test_time = test_time % (1000000 * 60);
-
- timeout.tv_sec = test_time / 1000000;
- timeout.tv_usec = test_time - (timeout.tv_sec * 1000000);
-
- Readfds = saved_Readfds;
- Writefds = saved_Writefds;
-
- /* Call the system call being tested. */
-
- TEST(select(5, &Readfds, &Writefds, 0, &timeout));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL,
- "%d select(5, &Readfds, &Writefds, 0, &timeout) failed, errno=%d\n",
- lc, errno);
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* Perform functional verification here */
- tst_resm(TPASS,
- "select(5, &Readfds, &Writefds, 0, &timeout) timeout = %ld usecs",
- test_time);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* create a temporary directory and go to it */
- tst_tmpdir();
-
- if (pipe(Fd) == -1 ) {
- tst_brkm(TBROK, cleanup, "pipe(&Fd) failed, errno=%d", errno);
- }
-
- /*
- * Initializing and assigning the standard output file descriptor to
- * fd_set for select.
- */
-
- FD_ZERO(&saved_Readfds);
- FD_ZERO(&saved_Writefds);
- FD_SET(Fd[0], &saved_Readfds);
- FD_SET(Fd[1], &saved_Writefds);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* remove temporary directory and all files in it. */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/select03.c b/winsup/testsuite/winsup.api/ltp/select03.c
deleted file mode 100644
index 225ef19..0000000
--- a/winsup/testsuite/winsup.api/ltp/select03.c
+++ /dev/null
@@ -1,282 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : select03
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : select of fd of a named-pipe (FIFO)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Richard Logan
- *
- * CO-PILOT : Glen Overby
- *
- * DATE STARTED : 02/24/93
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) select(2) of fd of a named-pipe (FIFO) with no I/O and small timeout value
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the select(2) system call. It is intended
- * to provide a limited exposure of the system call, for now.
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <signal.h>
-#include <fcntl.h> /* For open system call parameters. */
-#include <signal.h>
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/stat.h>
-
-
-#include "test.h"
-#include "usctest.h"
-
-#define FILENAME "select03"
-
-extern void setup();
-extern void cleanup();
-
-const char *TCID="select03"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int Fd;
-fd_set saved_Readfds, saved_Writefds;
-fd_set Readfds, Writefds;
-
-
-/***********************************************************************
- * MAIN
- ***********************************************************************/
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- struct timeval timeout;
- long test_time = 0; /* in usecs */
-
-
- /***************************************************************
- * parse standard options, and exit if there is an error
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Assigning the specified seconds within the timeval structure.
- */
-
- test_time = ((lc%2000)*100000); /* 100 milli-seconds */
-
- /*
- * Bound the time to a value less than 60 seconds
- */
-
- if ( test_time > 1000000 * 60 )
- test_time = test_time % (1000000 * 60);
-
- timeout.tv_sec = test_time / 1000000;
- timeout.tv_usec = test_time - (timeout.tv_sec * 1000000);
-
- Readfds = saved_Readfds;
- Writefds = saved_Writefds;
-
- /* Call the system call being tested. */
-
- TEST(select(5, &Readfds, &Writefds, 0, &timeout));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL,
- "%d select(5, &Readfds, &Writefds, 0, &timeout) failed errno=%d\n",
- lc, errno);
- } else {
-
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* Perform functional verification here */
- tst_resm(TPASS,
- "select(5, &Readfds, &Writefds, 0, &timeout) timeout = %ld usecs",
- test_time);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* create a temporary directory and go to it */
- tst_tmpdir();
-
-
- /* make and open FIFO */
- if ( mkfifo(FILENAME, 0777) == -1 ) {
- tst_brkm(TBROK, cleanup, "mkfifo(%s, 0777) failed, errno=%d",
- FILENAME, errno);
- }
-
- if ((Fd=open(FILENAME, O_RDWR)) == -1 ) {
- tst_brkm(TBROK, cleanup, "open(%s, O_RDWR) failed, errno=%d",
- FILENAME, errno);
- }
-
- /*
- * Initializing and assigning the standard output file descriptor to
- * fd_set for select.
- */
-
- FD_ZERO(&saved_Readfds);
- FD_ZERO(&saved_Writefds);
- FD_SET(Fd, &saved_Readfds);
- FD_SET(Fd, &saved_Writefds);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* remove temporary directory and all files in it. */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/setgid01.c b/winsup/testsuite/winsup.api/ltp/setgid01.c
deleted file mode 100644
index a75e88a..0000000
--- a/winsup/testsuite/winsup.api/ltp/setgid01.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : setgid01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for setgid(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) setgid(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the setgid(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * setgid(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="setgid01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-int gid;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call setgid(2)
- */
- TEST(setgid(gid));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "setgid(%d) Failed, errno=%d : %s", gid,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "setgid(%d) returned %d", gid, TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- gid = getgid();
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/setgroups01.c b/winsup/testsuite/winsup.api/ltp/setgroups01.c
deleted file mode 100644
index ee1c54b..0000000
--- a/winsup/testsuite/winsup.api/ltp/setgroups01.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : setgroups01
- *
- * EXECUTED BY : root
- *
- * TEST TITLE : Basic test for setgroups(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) setgroups(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the setgroups(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * setgroups(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/param.h>
-#include <grp.h>
-
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-
-
-const char *TCID="setgroups01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int len = NGROUPS;
-gid_t list[NGROUPS];
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call setgroups(2)
- */
- TEST(setgroups(len, list));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "setgroups(%d, list) Failed, errno=%d : %s", len,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "setgroups(%d, list) returned %d", len, TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- if ( geteuid() != 0 )
- tst_brkm(TBROK, cleanup, "Must be ROOT to run this test.");
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- if (getgroups(len, list) == -1) {
- tst_brkm(TBROK, cleanup,
- "getgroups(%d, list) Failure. errno=%d : %s",
- len, errno, strerror(errno));
- }
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/setpgid01.c b/winsup/testsuite/winsup.api/ltp/setpgid01.c
deleted file mode 100644
index 0835c66..0000000
--- a/winsup/testsuite/winsup.api/ltp/setpgid01.c
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : setpgid01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for setpgid(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) setpgid(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the setpgid(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * setpgid(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/wait.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup() __attribute__ ((noreturn));
-
-const char *TCID="setpgid01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-int pgid, pid;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call setpgid(2)
- */
- TEST(setpgid(pid, pgid));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "setpgid(%d, %d) Failed, errno=%d : %s", pid, pgid,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "setpgid(%d, %d) returned %d", pid, pgid, TEST_RETURN);
- }
- }
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- int status;
-
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /*
- * Make sure current process is NOT a session or pgrp leader
- */
-
- pgid=getpgrp();
- pid=getpid();
-
- if (pgid == pid) {
- if ((pid = fork()) == -1) {
- tst_brkm(TBROK, cleanup, "fork() in setup() failed - errno %d",
- errno);
- }
-
- if (pid != 0) { /* parent - sits and waits */
- wait(&status);
- exit(WEXITSTATUS(status));
- } else { /* child - continues with test */
- pid = getpid();
- }
- }
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/setregid01.c b/winsup/testsuite/winsup.api/ltp/setregid01.c
deleted file mode 100644
index e4251f0..0000000
--- a/winsup/testsuite/winsup.api/ltp/setregid01.c
+++ /dev/null
@@ -1,338 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : setregid01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for setregid(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 5
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 05/13/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) setregid(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the setregid(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * setregid(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-
-#include <sys/types.h>
-
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="setregid01"; /* Test program identifier. */
-int TST_TOTAL=5; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0}; /* Zero terminated list of expected errnos */
-
-int gid, egid; /* current real and effective group id */
-
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
-
- /*
- * TEST CASE:
- * Dont change either real or effective gid
- */
- gid=getgid();
- egid=getegid();
-
-
- /* Call setregid(2) */
- TEST(setregid(-1, -1));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "setregid - Dont change either real or effective gid failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "setregid - Dont change either real or effective gid returned %d", TEST_RETURN);
- }
- }
-
-
- /*
- * TEST CASE:
- * change effective to effective gid
- */
-
-
- /* Call setregid(2) */
- TEST(setregid(-1, egid));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "setregid - change effective to effective gid failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "setregid - change effective to effective gid returned %d", TEST_RETURN);
- }
- }
-
-
- /*
- * TEST CASE:
- * change real to real gid
- */
-
-
- /* Call setregid(2) */
- TEST(setregid(gid, -1));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "setregid - change real to real gid failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "setregid - change real to real gid returned %d", TEST_RETURN);
- }
- }
-
-
- /*
- * TEST CASE:
- * change effective to real gid
- */
-
-
- /* Call setregid(2) */
- TEST(setregid(-1, gid));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "setregid - change effective to real gid failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "setregid - change effective to real gid returned %d", TEST_RETURN);
- }
- }
-
-
- /*
- * TEST CASE:
- * try to change real to current real
- */
-
-
- /* Call setregid(2) */
- TEST(setregid(gid, gid));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "setregid - try to change real to current real failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "setregid - try to change real to current real returned %d", TEST_RETURN);
- }
- }
-
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp dir and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* remove files and temp dir */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/setreuid01.c b/winsup/testsuite/winsup.api/ltp/setreuid01.c
deleted file mode 100644
index 05467c8..0000000
--- a/winsup/testsuite/winsup.api/ltp/setreuid01.c
+++ /dev/null
@@ -1,338 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : setreuid01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for setreuid(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 5
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 05/14/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) setreuid(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the setreuid(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * setreuid(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-
-#include <sys/types.h>
-
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="setreuid01"; /* Test program identifier. */
-int TST_TOTAL=5; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0}; /* Zero terminated list of expected errnos */
-
-int ruid, euid; /* real and effective user ids */
-
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
-
- /*
- * TEST CASE:
- * Don't change either real or effective uid
- */
- ruid=getuid(); /* get real uid */
- euid=geteuid(); /* get effective uid */
-
-
- /* Call setreuid(2) */
- TEST(setreuid(-1, -1));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "setreuid - Don't change either real or effective uid failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "setreuid - Don't change either real or effective uid returned %d", TEST_RETURN);
- }
- }
-
-
- /*
- * TEST CASE:
- * change effective to effective uid
- */
-
-
- /* Call setreuid(2) */
- TEST(setreuid(-1, euid));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "setreuid - change effective to effective uid failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "setreuid - change effective to effective uid returned %d", TEST_RETURN);
- }
- }
-
-
- /*
- * TEST CASE:
- * change real to real uid
- */
-
-
- /* Call setreuid(2) */
- TEST(setreuid(ruid, -1));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "setreuid - change real to real uid failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "setreuid - change real to real uid returned %d", TEST_RETURN);
- }
- }
-
-
- /*
- * TEST CASE:
- * change effective to real uid
- */
-
-
- /* Call setreuid(2) */
- TEST(setreuid(-1, ruid));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "setreuid - change effective to real uid failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "setreuid - change effective to real uid returned %d", TEST_RETURN);
- }
- }
-
-
- /*
- * TEST CASE:
- * try to change real to current real
- */
-
-
- /* Call setreuid(2) */
- TEST(setreuid(ruid, ruid));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "setreuid - try to change real to current real failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "setreuid - try to change real to current real returned %d", TEST_RETURN);
- }
- }
-
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp dir and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* remove files and temp dir */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/setuid01.c b/winsup/testsuite/winsup.api/ltp/setuid01.c
deleted file mode 100644
index 37e18fd..0000000
--- a/winsup/testsuite/winsup.api/ltp/setuid01.c
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : setuid01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for setuid(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 05/14/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) setuid(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * The libcuts.a and libsys.a libraries must be included in
- * the compilation of this test.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the setuid(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * setuid(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-
-#include <sys/types.h>
-
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-
-
-const char *TCID="setuid01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int uid; /* current user id */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * TEST CASE:
- * Set the effective user ID to the current real uid
- */
- uid=getuid();
-
- /* Call setuid(2) */
- TEST(setuid(uid));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "setuid - Set the effective user ID to the current real uid failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "setuid - Set the effective user ID to the current real uid returned %d", TEST_RETURN);
- }
- }
-
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/setuid02.c b/winsup/testsuite/winsup.api/ltp/setuid02.c
deleted file mode 100644
index ee55ae1..0000000
--- a/winsup/testsuite/winsup.api/ltp/setuid02.c
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : setuid02
- *
- * EXECUTED BY : root
- *
- * TEST TITLE : Basic test for setuid(2) as root
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 05/14/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) setuid(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the setuid(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * setuid(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-
-#include <sys/types.h>
-
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="setuid02"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0}; /* Zero terminated list of expected errnos */
-
-int uid; /* current user id */
-
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- uid=getuid();
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
-
- /*
- * TEST CASE:
- * Set the effective user ID to the current real uid
- */
-
- /* Call setuid(2) */
- TEST(setuid(uid));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "setuid - Set the effective user ID to the current real uid failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "setuid - Set the effective user ID to the current real uid returned %d", TEST_RETURN);
- }
- }
-
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp dir and cd to it */
- tst_tmpdir();
-
- /* must be root */
- if ( geteuid() != 0 )
- tst_brkm(TBROK, cleanup, "Must be root for this test!");
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* remove files and temp dir */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/signal03.c b/winsup/testsuite/winsup.api/ltp/signal03.c
deleted file mode 100644
index 2a0923c..0000000
--- a/winsup/testsuite/winsup.api/ltp/signal03.c
+++ /dev/null
@@ -1,663 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/***********************************************************************************
- *
- * OS Test - Silicon Graphics, Inc. Eagan, Minnesota
- *
- * TEST IDENTIFIER : signal03 Boundary value and other invalid value checking
- * of signal setup and signal sending.
- *
- * PARENT DOCUMENT : sgntds01 Signal System Call
- *
- * AUTHOR : Dave Baumgartner
- * : Rewrote 12/92 by Richard Logan
- *
- * CO-PILOT : Barrie Kletscher
- *
- * DATE STARTED : 10/17/85
- *
- * TEST ITEMS
- *
- * 1. SIGKILL can not be set to be caught, errno:EINVAL (POSIX).
- * 2. SIGKILL can not be caught.
- * 3. SIGKILL can not be set to be ignored, errno:EINVAL (POSIX).
- * 4. SIGKILL can not be ignored.
- * 5. SIGKILL can not be reset to default, errno:EINVAL (POSIX.
- *
- * ENVIRONMENTAL NEEDS
- *
- * NONE
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- *
- * None
- *
- * INTERCASE DEPENDENCIES
- *
- * 2 depends on 1 and 4 on 3.
- *
- * DETAILED DESCRIPTION
- *
- * main()
- * Call catch_test to test setup and catching of SIGKILL.
- *
- *
- * Call ignore_test to test setup and ignoring of SIGKILL.
- *
- *
- * Call sigdfl_test to test setting SIGKILL to default.
- *
- * * END OF MAIN *
- *
- *
- * catch_test()
- *
- * fork a child
- * if this is the parent
- * sleep to let child start.
- * send sig to child.
- * wait for the child to terminate.
- *
- * if the termination status of the child equals the signal sent to it
- * Test item 1 PASSED the child was killed.
- * else if status equals the exit value of SIG_CAUGHT
- * Test item 2 FAILED sig was caught.
- * else
- * Test item 2 FAILED because the child was not killed
- * but sig was not caught either.
- *
- * else this the child
- * set exit_val to SIG_NOT_CAUGHT.
- * set to catch sig, where the interrupt routine just sets
- * exit_val to SIG_CAUGHT.
- *
- * If the return value and errno, after trying to set to catch sig,
- * do not indicate that an error has occurred.
- * Test item 1 FAILED bad return, return value:X, errno:X.
- * else
- * Test item 1 PASSED sig was not set to be caught.
- *
- * pause until the parent sends a signal.
- * The child should be killed by the signal but if not exit
- * with exit_val.
- *
- * * End of catch_test. *
- *
- *
- * ignore_test()
- *
- * fork a child
- * if this is the parent
- * sleep to let child start.
- * send SIGKILL to child.
- * wait for the child to terminate.
- *
- * if the termination status of the child equals SIGKILL
- * Test item 4 PASSED the child was killed.
- * else if the status equals the exit value of SIG_IGNORED
- * Test item 4 FAILED SIGKILL was ignored.
- *
- * else this the child
- *
- * If the return value and errno, after trying to set to ignore SIGKILL,
- * do not indicate that an error has occurred.
- * Test item 3 FAILED bad return, return value:X, errno:X.
- * else
- * Test item 3 PASSED SIGKILL was not set to be ignored.
- *
- * pause until the parent sends SIGKILL.
- * The child should be killed by the signal but if not exit
- * with SIG_IGNORED.
- *
- * * End of ignore_test. *
- *
- *
- * sigdfl_test()
- *
- * If the return value and errno, after trying to set to SIGKILL to default,
- * do not indicate that an error has occurred.
- * Test item 5 FAILED bad return, return value:X, errno:X.
- * else
- * Test item 5 PASSED SIGKILL was not set to default.
- *
- * * End of sigdfl_test. *
- *
- * BUGS/NOTES
- * Since the system call under test is executed in the child, no
- * timings on this system call will be reported.
- *
-***********************************************************************************/
-
-#include <signal.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <string.h>
-#include <sys/wait.h>
-
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-void do_test();
-void sigdfl_test();
-void update_timings();
-
-#if defined(linux)
-# define SIG_PF sig_t /* This might need to be sighandler_t on some systems */
-#elif defined(__CYGWIN__)
-typedef void (*sighandler_t) (int);
-#define SIG_PF sighandler_t
-#endif
-
-#define SIG_CAUGHT 1
-#define SIG_NOT_CAUGHT 0
-#define SIG_IGNORED 5
-#define TIMED_OUT 99
-
-#define TIMEOUT 20
-
-#define GO_FLAG 1
-#define ERROR_FLAG 2
-#define PASS_FLAG 3
-#define FAIL_FLAG 4
-
-#define IGNORE_TEST 1
-#define CATCH_TEST 2
-
-#define MAXMESG 150 /* The Maximum message that can be created. */
-
-int exit_val; /* Global variable, used to tell whether the */
- /* child exited instead of being killed. */
-extern int errno; /* errno holds the error value returned by */
- /* a system call. */
-char mesg[MAXMESG]; /* Holds messages to pass to tst_res. */
-
-struct ipc_t {
- int status;
- char mesg[MAXMESG];
- struct tblock timings;
-} Ipc_info;
-
-const char *TCID = "signal03";
-int TST_TOTAL = 5;
-extern int Tst_count; /* count of test items completed */
-
-int Pid; /* Return value from fork. */
-
-long Tret;
-
-/***********************************************************************
- * M A I N
- ***********************************************************************/
-int
-main(argc, argv)
-int argc;
-char **argv;
-{
- int lc;
- const char *msg;
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(argc, argv, (option_t *) NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- errno=-4;
-
- /*
- * Call catch_test to test setup and catching of SIGKILL.
- */
- (void) do_test(CATCH_TEST, Tst_count);
-
- /*
- * Call ignore_test to test setup and ignoring of SIGKILL.
- */
- (void) do_test(IGNORE_TEST, Tst_count);
-
- /*
- * Call sigdfl_test to test setting SIGKILL to default.
- */
- (void) sigdfl_test();
-
- }
-
- cleanup();
-
- return 0;
-} /*End of main*/
-
-/***********************************************************************
- *
- ***********************************************************************/
-void
-do_test(test_case, tst_count)
-int test_case;
-int tst_count;
-{
- int term_stat; /* Termination status of the child returned to */
- /* the parent. */
- char string[30];
- int fd1[2]; /* ipc */
- int rd_sz; /* size of read */
- void p_timeout_handler();
- void c_timeout_handler();
- void catchsig();
-
- Tst_count = tst_count;
-
- /*
- * Create a pipe of ipc
- */
- if ( pipe(fd1) == -1 ) {
- sprintf(mesg,
- "pipe system call failed, Errno: %d, Error message: %s",
- errno,strerror(errno));
- tst_resm(TBROK,mesg);
- tst_resm(TBROK,mesg);
- return;
- }
-
- /*
- * Cause the read to return 0 once EOF is encountered and the
- * read to return -1 if pipe is empty.
- */
-
- if ( fcntl(fd1[0], F_SETFL, O_NONBLOCK) == -1 ) {
- sprintf(mesg, "fcntl(fd1[0], F_SETFL, O_NONBLOCK) failed: errno=%d",
- errno);
- tst_resm(TBROK,mesg);
- tst_resm(TBROK,mesg);
- close(fd1[0]);
- close(fd1[1]);
- return;
- }
-
- if ((Pid = fork()) > 0) { /* parent */
-
- signal(SIGALRM, p_timeout_handler);
-
- alarm(TIMEOUT);
-
- close(fd1[1]); /* close write side */
-
- /*
- * Deal with child's messages.
- * Only the GO_FLAG status will allow parent to
- * go on. All pipe io will be in the ipc_t structure sizes
- * to avoid reading part of next message.
- */
- while ( 1 ) {
-
- while ( (rd_sz=read(fd1[0], (char *)&Ipc_info, sizeof(Ipc_info))) != 0 ) {
- if ( rd_sz > 0 )
- break; /* read something */
- }
-
- if ( rd_sz == 0 ) { /* if EOF encountered */
- sprintf(mesg, "child's pipe is closed before 'go' message received");
- tst_resm(TBROK, Ipc_info.mesg);
- tst_resm(TBROK, Ipc_info.mesg);
- close(fd1[0]);
- return;
- }
-
- else if ( Ipc_info.status == GO_FLAG ) {
- break; /* go on */
- }
- else if ( Ipc_info.status == ERROR_FLAG ) {
- tst_resm(TBROK, "From child: %s", Ipc_info.mesg);
- tst_resm(TBROK, "From child: %s", Ipc_info.mesg);
- close(fd1[0]);
- return;
- }
- else if ( Ipc_info.status == PASS_FLAG ) {
-
- if ( STD_FUNCTIONAL_TEST )
- tst_resm(TPASS, "From child: %s", Ipc_info.mesg);
- else
- Tst_count++;
- update_timings(Ipc_info.timings);
- }
- else if ( Ipc_info.status == FAIL_FLAG ) {
- tst_resm(TFAIL, "From child: %s", Ipc_info.mesg);
- update_timings(Ipc_info.timings);
- }
- else {
- tst_resm(TINFO, "Unknown message from child: %s", mesg);
- }
- }
-
- /*
- * Send the signal SIGKILL to the child.
- */
- if (kill(Pid,SIGKILL) == -1)
- {
- /*
- * The kill system call failed.
- */
- sprintf(mesg,
- "kill(Pid,SIGKILL) failed, Errno: %d, Error message: %s",
- errno,strerror(errno));
- tst_resm(TBROK,mesg);
- tst_resm(TBROK,mesg);
- close(fd1[0]);
- return;
- }
-
- /*
- * Wait for the child to terminate and check the termination status.
- */
- if (wait(&term_stat) == -1) {
- /*
- * The wait system call failed.
- */
- sprintf(mesg,
- "Wait system call failed. Errno: %d, Error message: %s",
- errno,strerror(errno));
- tst_resm(TBROK,mesg);
- tst_resm(TBROK,mesg);
- close(fd1[0]);
- return;
- }
- else if ( STD_FUNCTIONAL_TEST ) {
- if ((term_stat & 0377) == SIGKILL) {
- /*
- * The child was killed by the signal sent,
- * which is correct.
- */
- tst_resm(TPASS,"The child was killed by SIGKILL.");
- }
- else if ( (term_stat >> 8) == TIMED_OUT ) {
- sprintf(mesg, "child exited with a timed out exit status");
- tst_resm(TBROK,mesg);
- }
- else {
- if ((term_stat >> 8) == SIG_IGNORED && test_case == IGNORE_TEST ) {
- sprintf(mesg,
- "SIGKILL was ignored by child after sent by parent.");
- }
- else if ((term_stat >> 8) == SIG_CAUGHT && test_case == CATCH_TEST ) {
- sprintf(mesg,
- "SIGKILL was caught by child after sent by parent.");
- }
- else {
- sprintf(mesg,
- "Child's termination status is unexpected. Status: %d (%#o).",
- term_stat, term_stat);
- }
- tst_resm(TFAIL, mesg);
- }
- }
- else {
- Tst_count++; /* increment test counter */
- }
- close(fd1[0]);
-
- } /* End of parent. */
- else if (Pid == 0) {
- /*
- * This is the child.
- * Set up to ignore/catch SIGKILL and check the return values.
- */
- errno=0;
- if ( test_case == IGNORE_TEST ) {
- exit_val = SIG_IGNORED;
- strcpy(string, "signal(SIGKILL, SIG_IGN)");
-
- Tret=(long)signal(SIGKILL, SIG_IGN);
- TEST_ERRNO=errno;
- }
- else {
- exit_val = SIG_NOT_CAUGHT;
- strcpy(string, "signal(SIGKILL, catchsig)");
- Tret=(long)signal(SIGKILL, catchsig);
- TEST_ERRNO=errno;
- }
- Ipc_info.timings=tblock;
-
- if ( (SIG_PF)Tret == SIG_ERR ) {
- if ( TEST_ERRNO == EINVAL ) {
- sprintf(Ipc_info.mesg, "%s ret:%ld SIG_ERR (%ld) as expected",
- string, Tret, (long)SIG_ERR);
- Ipc_info.status = PASS_FLAG;
- }
- else {
- sprintf(Ipc_info.mesg,
- "%s ret:%ld, errno:%d expected ret:%ld, errno:%d",
- string, Tret, TEST_ERRNO, (long)SIG_ERR, EINVAL);
- Ipc_info.status = FAIL_FLAG;
- }
-
- write(fd1[1], (char *)&Ipc_info, sizeof(Ipc_info));
- }
- else {
- /*
- * The child was not allowed to set the signal to
- * be ignored and errno was correct.
- */
- sprintf(Ipc_info.mesg,
- "%s ret:%ld, errno:%d expected ret:%ld, errno:%d",
- string, Tret, TEST_ERRNO, (long)SIG_ERR, EINVAL);
- Ipc_info.status = FAIL_FLAG;
- write(fd1[1], (char *)&Ipc_info, sizeof(Ipc_info));
- }
-
- /*
- * tell parent we are ready - setup by child is done
- */
- Ipc_info.status = GO_FLAG;
- write(fd1[1], (char *)&Ipc_info, sizeof(Ipc_info));
-
- /*
- * Set the alarm to wake up from the pause below if
- * the parents signal is ignored.
- */
- signal(SIGALRM, p_timeout_handler);
- alarm(TIMEOUT);
-
- /*
- * Pause until the parent sends a signal or until alarm is received.
- */
- pause();
-
- exit(exit_val);
-
-
- } /* End of child. */
- else {
- /*
- * The fork system call failed.
- */
- sprintf(mesg,
- "Fork system call failed. Errno: %d, Error message: %s",
- errno,strerror(errno));
- tst_resm(TBROK,mesg);
- tst_resm(TBROK,mesg);
- close(fd1[0]);
- close(fd1[1]);
- return;
- }
-
-} /* End of do_test. */
-
-/***********************************************************************
- * sigdfl_test - test for attempt to set SIGKILL to default
- ***********************************************************************/
-void
-sigdfl_test()
-{
- /*
- * Try to set SIGKILL to default and check the return values.
- */
- errno=-4;
-
- Tret=(long)signal(SIGKILL,SIG_DFL);
- TEST_RETURN=Tret;
- TEST_ERRNO=errno;
-
-
- if ( (SIG_PF)TEST_RETURN == SIG_ERR ) {
- if ( STD_FUNCTIONAL_TEST ) {
- if ( TEST_ERRNO != EINVAL ) {
- sprintf(mesg,
- "signal(SIGKILL,SIG_DFL) ret:%d, errno:%d expected ret:-1, errno:%d",
- TEST_RETURN, TEST_ERRNO, EINVAL);
- tst_resm(TFAIL, mesg);
- }
- else {
- sprintf(mesg,
- "signal(SIGKILL,SIG_DFL) ret:%d, errno:%d as expected.",
- TEST_RETURN, TEST_ERRNO);
- tst_resm(TPASS, mesg);
- }
- }
- else
- Tst_count++;
- }
- else {
- sprintf(mesg,
- "signal(SIGKILL,SIG_DFL) ret:%d, errno:%d expected ret:-1, errno:%d",
- TEST_RETURN, TEST_ERRNO, EINVAL);
- tst_resm(TFAIL, mesg);
- }
-
-} /* End of sigdfl_test. */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* make and change to a temporary directory */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
-} /* End setup() */
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
-
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
-
- TEST_CLEANUP;
-
- /*
- * remove the temporary directory and exit with
- * return code appropriate for results
- */
-
- tst_rmdir();
-
- tst_exit();
-
-} /* End cleanup() */
-
-/***********************************************************************
- * Signal handler routine that used by the parent to handler
- * a time out situation. It will attempt to kill the child and
- * call cleanup.
- ***********************************************************************/
-void
-p_timeout_handler()
-{
- kill(Pid, SIGKILL);
- cleanup();
-}
-
-/***********************************************************************
- * Signal handler routine that used by the child to handle
- * a time out situation. It will set a global varaible and return
- * if called.
- ***********************************************************************/
-void
-c_timeout_handler()
-{
- exit_val = TIMED_OUT;
- return;
-}
-
-/***********************************************************************
- * This signal handling routine will set a global variable and return
- * if called.
- ***********************************************************************/
-void
-catchsig()
-{
- exit_val = SIG_CAUGHT;
- return;
-}
-
-/***********************************************************************
- * Update timing information
- ***********************************************************************/
-void
-update_timings(atblock)
-struct tblock atblock;
-{
- tblock.tb_max += atblock.tb_max;
- tblock.tb_min += atblock.tb_min;
- tblock.tb_total += atblock.tb_total;
- tblock.tb_count += atblock.tb_count;
-}
diff --git a/winsup/testsuite/winsup.api/ltp/stat01.c b/winsup/testsuite/winsup.api/ltp/stat01.c
deleted file mode 100644
index da3596e..0000000
--- a/winsup/testsuite/winsup.api/ltp/stat01.c
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: stat01
- *
- * Test Description:
- * Verify that, stat(2) succeeds to get the status of a file and fills the
- * stat structure elements.
- *
- * Expected Result:
- * stat() should return value 0 on success and fills the stat structure
- * elements with the specified 'file' information.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.
- *
- * Usage: <for command-line>
- * stat01 [-c n] [-e] [-f] [-i n] [-I x] [-p x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * History
- * 07/2001 John George
- * -Ported
- *
- * Restrictions:
- *
- */
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <pwd.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define FILE_MODE 0644
-#define TESTFILE "testfile"
-#define FILE_SIZE 1024
-#define BUF_SIZE 256
-#define MASK 0777
-
-const char *TCID="stat01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int exp_enos[]={0};
-uid_t User_id; /* Owner id of the test file */
-gid_t Group_id; /* Group id of the test file */
-char nobody_uid[] = "nobody";
-struct passwd *ltpuser;
-
-void setup(); /* Setup function for the test */
-void cleanup(void) __attribute__((noreturn)); /* Cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- struct stat stat_buf; /* stat structure buffer */
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- /*NOTREACHED*/
- }
-
- /* Perform global setup for test */
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count = 0;
-
- /*
- * Call stat(2) to get the status of
- * specified 'file' into stat structure.
- */
- TEST(stat(TESTFILE, &stat_buf));
-
- /* check return code of stat(2) */
- if (TEST_RETURN == -1) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, \
- "stat(%s, &stat_buf) Failed, errno=%d : %s",
- TESTFILE, TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- stat_buf.st_mode &= ~S_IFREG;
- /*
- * Verify the data returned by stat(2)
- * aganist the expected data.
- */
- if ((stat_buf.st_uid != User_id) || \
- (stat_buf.st_gid != Group_id) || \
- (stat_buf.st_size != FILE_SIZE) || \
- ((stat_buf.st_mode & MASK) != FILE_MODE)) {
- tst_resm(TFAIL, "Functionality of "
- "stat(2) on '%s' Failed",
- TESTFILE);
- } else {
- tst_resm(TPASS, "Functionality of "
- "stat(2) on '%s' Succcessful",
- TESTFILE);
- }
- } else {
- tst_resm(TINFO, "Call succeeded");
- }
- }
- Tst_count++; /* incr. TEST_LOOP counter */
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
- /*NOTREACHED*/
-
-} /* End main */
-
-/*
- * void
- * setup() - Performs setup function for the test.
- * Creat a temporary directory and change directory to it.
- * Creat a testfile and write some known data into it.
- * Get the effective uid/gid of test process.
- */
-void
-setup()
-{
- int i, fd;
- char tst_buff[BUF_SIZE];
- int wbytes;
- int write_len = 0;
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-#if 0
- /* Switch to nobody user for correct error code collection */
- if (geteuid() != 0) {
- tst_brkm(TBROK, tst_exit, "Test must be run as root");
- }
- ltpuser = getpwnam(nobody_uid);
- if (setuid(ltpuser->pw_uid) == -1) {
- tst_resm(TINFO, "setuid failed to "
- "to set the effective uid to %d",
- ltpuser->pw_uid);
- perror("setuid");
- }
-#endif
- /* Pause if that option was specified
- * TEST_PAUSE contains the code to fork the test with the -i option.
- * You want to make sure you do this before you create your temporary
- * directory.
- */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- if ((fd = open(TESTFILE, O_RDWR|O_CREAT, FILE_MODE)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, %#o) Failed, errno=%d : %s",
- TESTFILE, FILE_MODE, errno, strerror(errno));
- /*NOTREACHED*/
- }
-
- /* Fill the test buffer with the known data */
- for (i = 0; i < BUF_SIZE; i++) {
- tst_buff[i] = 'a';
- }
-
- /* Write to the file 1k data from the buffer */
- while (write_len < FILE_SIZE) {
- if ((wbytes = write(fd, tst_buff, sizeof(tst_buff))) <= 0) {
- tst_brkm(TBROK, cleanup,
- "write(2) on %s Failed, errno=%d : %s",
- TESTFILE, errno, strerror(errno));
- /*NOTREACHED*/
- } else {
- write_len += wbytes;
- }
- }
-
- /* Close the testfile created */
- if (close(fd) == -1) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s",
- TESTFILE, errno, strerror(errno));
- }
-
- /* Get the uid/gid of the process */
- User_id = getuid();
- Group_id = getgid();
-
-} /* End setup() */
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Remove the test file and temporary directory created.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/stat02.c b/winsup/testsuite/winsup.api/ltp/stat02.c
deleted file mode 100644
index 745476f..0000000
--- a/winsup/testsuite/winsup.api/ltp/stat02.c
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: stat02
- *
- * Test Description:
- * Verify that, stat(2) succeeds to get the status of a file and fills the
- * stat structure elements though process doesn't have read access to the
- * file.
- *
- * Expected Result:
- * stat() should return value 0 on success and the stat structure elements
- * should be filled with specified 'file' information.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.
- *
- * Usage: <for command-line>
- * stat02 [-c n] [-e] [-f] [-i n] [-I x] [-p x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * History
- * 07/2001 John George
- * -Ported
- *
- * Restrictions:
- *
- */
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <pwd.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
-#define TESTFILE "testfile"
-#define FILE_SIZE 1024
-#define BUF_SIZE 256
-#define NEW_MODE 0222
-#define MASK 0777
-
-const char *TCID="stat02"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int exp_enos[]={0};
-uid_t User_id; /* eff. user id/group id of test process */
-gid_t Group_id;
-char nobody_uid[] = "nobody";
-struct passwd *ltpuser;
-
-void setup(); /* Setup function for the test */
-void cleanup(void) __attribute__((noreturn)); /* Cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- struct stat stat_buf; /* stat structure buffer */
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /* Perform global setup for test */
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count = 0;
-
- /*
- * Call stat(2) to get the status of
- * specified 'file' into stat structure.
- */
- TEST(stat(TESTFILE, &stat_buf));
-
- /* check return code of stat(2) */
- if (TEST_RETURN == -1) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL,
- "stat(%s, &stat_buf) Failed, errno=%d : %s",
- TESTFILE, TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- stat_buf.st_mode &= ~S_IFREG;
- /*
- * Verify the data returned by stat(2)
- * aganist the expected data.
- */
- if ((stat_buf.st_uid != User_id) || \
- (stat_buf.st_gid != Group_id) || \
- (stat_buf.st_size != FILE_SIZE) || \
- ((stat_buf.st_mode & MASK) != NEW_MODE)) {
- tst_resm(TFAIL, "Functionality of "
- "stat(2) on '%s' Failed",
- TESTFILE);
- } else {
- tst_resm(TPASS, "Functionality of "
- "stat(2) on '%s' Succcessful",
- TESTFILE);
- }
- } else {
- tst_resm(TPASS, "Call succeeded");
- }
- }
- Tst_count++; /* incr TEST_LOOP counter */
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
- /*NOTREACHED*/
-
-} /* End main */
-
-/*
- * void
- * setup() - Performs setup function for the test.
- * Creat a temporary directory and change directory to it.
- * Creat a testfile and write some data into it.
- * Modify the mode permissions of testfile such that test process
- * has read-only access to testfile.
- */
-void
-setup()
-{
- int i, fd; /* counter, file handle for file */
- char tst_buff[BUF_SIZE]; /* data buffer for file */
- int wbytes; /* no. of bytes written to file */
- int write_len = 0;
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-#if 0
- /* Switch to nobody user for correct error code collection */
- if (geteuid() != 0) {
- tst_brkm(TBROK, tst_exit, "Test must be run as root");
- }
- ltpuser = getpwnam(nobody_uid);
- if (setuid(ltpuser->pw_uid) == -1) {
- tst_resm(TINFO, "setuid failed to "
- "to set the effective uid to %d",
- ltpuser->pw_uid);
- perror("setuid");
- }
-#endif
- /* Pause if that option was specified
- * TEST_PAUSE contains the code to fork the test with the -i option.
- * You want to make sure you do this before you create your temporary
- * directory.
- */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- if ((fd = open(TESTFILE, O_RDWR|O_CREAT, FILE_MODE)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, %#o) Failed, errno=%d : %s",
- TESTFILE, FILE_MODE, errno, strerror(errno));
- /*NOTREACHED*/
- }
-
- /* Fill the test buffer with the known data */
- for (i = 0; i < BUF_SIZE; i++) {
- tst_buff[i] = 'a';
- }
-
- /* Write to the file 1k data from the buffer */
- while (write_len < FILE_SIZE) {
- if ((wbytes = write(fd, tst_buff, sizeof(tst_buff))) <= 0) {
- tst_brkm(TBROK, cleanup,
- "write(2) on %s Failed, errno=%d : %s",
- TESTFILE, errno, strerror(errno));
- /*NOTREACHED*/
- } else {
- write_len += wbytes;
- }
- }
-
- if (close(fd) == -1) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s",
- TESTFILE, errno, strerror(errno));
- }
-
- /* Modify mode permissions on the testfile */
- if (chmod(TESTFILE, NEW_MODE) < 0) {
- tst_brkm(TBROK, cleanup,
- "chmod(2) on %s Failed, errno=%d : %s",
- TESTFILE, errno, strerror(errno));
- /*NOTREACHED*/
- }
-
- /* Get the uid/gid of the process */
- User_id = getuid();
- Group_id = getgid();
-
-} /* End setup() */
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Remove the temporary directory and file created.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/stat03.c b/winsup/testsuite/winsup.api/ltp/stat03.c
deleted file mode 100644
index dcddfd2..0000000
--- a/winsup/testsuite/winsup.api/ltp/stat03.c
+++ /dev/null
@@ -1,391 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: stat03
- *
- * Test Description:
- * Verify that,
- * 1) stat(2) returns -1 and sets errno to EACCES if search permission is
- * denied on a component of the path prefix.
- * 2) stat(2) returns -1 and sets errno to ENOENT if the specified file
- * does not exists or empty string.
- * 3) stat(2) returns -1 and sets errno to EFAULT if pathname points
- * outside user's accessible address space.
- * 4) stat(2) returns -1 and sets errno to ENAMETOOLONG if the pathname
- * component is too long.
- * 5) stat(2) returns -1 and sets errno to ENOTDIR if the directory
- * component in pathname is not a directory.
- *
- * Expected Result:
- * stat() should fail with return value -1 and set expected errno.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * if errno set == expected errno
- * Issue sys call fails with expected return value and errno.
- * Otherwise,
- * Issue sys call fails with unexpected errno.
- * Otherwise,
- * Issue sys call returns unexpected value.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory(s)/file(s) created.
- *
- * Usage: <for command-line>
- * stat03 [-c n] [-e] [-i n] [-I x] [-p x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * History
- * 07/2001 John George
- * -Ported
- *
- * Restrictions:
- *
- */
-
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <pwd.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define MODE_RWX S_IRWXU | S_IRWXG | S_IRWXO
-#define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
-#define DIR_TEMP "testdir_1"
-#define TEST_FILE1 "testdir_1/tfile_1"
-#define TEST_FILE2 "t_file/tfile_2"
-
-int no_setup();
-int setup1(); /* setup function to test chmod for EACCES */
-int setup2(); /* setup function to test chmod for ENOTDIR */
-int longpath_setup(); /* setup function to test chmod for ENAMETOOLONG */
-char nobody_uid[] = "nobody";
-struct passwd *ltpuser;
-
-
-char Longpathname[PATH_MAX+2];
-char High_address_node[64];
-
-struct test_case_t { /* test case struct. to hold ref. test cond's*/
- const char *pathname;
- const char *desc;
- int exp_errno;
- int (*setupfunc)();
-} Test_cases[] = {
-#ifndef __CYGWIN__
- { TEST_FILE1, "No Search permissions to process", EACCES, setup1 },
-#endif
- { High_address_node, "Address beyond address space", EFAULT, no_setup },
- { (char *)-1, "Negative address", EFAULT, no_setup },
- { Longpathname, "Pathname too long", ENAMETOOLONG, longpath_setup },
- { "", "Pathname is empty", ENOENT, no_setup },
-#ifndef __CYGWIN__
- { TEST_FILE2, "Path contains regular file", ENOTDIR, setup2 },
-#endif
- { NULL, NULL, 0, no_setup }
-};
-
-const char *TCID="stat03"; /* Test program identifier. */
-int TST_TOTAL = 6; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int exp_enos[]={EACCES, EFAULT, ENAMETOOLONG, ENOENT, ENOTDIR, 0};
-
-void setup(); /* Main setup function for the tests */
-void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
-char *get_high_address(void);
-
-int
-main(int ac, char **av)
-{
- struct stat stat_buf; /* stat structure buffer */
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- const char *file_name; /* ptr. for file name whose mode is modified*/
- const char *test_desc; /* test specific error message */
- int ind; /* counter to test different test conditions */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- /*NOTREACHED*/
- }
-
- /*
- * Invoke setup function to call individual test setup functions
- * to simulate test conditions.
- */
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- for (ind = 0; Test_cases[ind].desc != NULL; ind++) {
- file_name = Test_cases[ind].pathname;
- test_desc = Test_cases[ind].desc;
-
- if (file_name == High_address_node) {
- file_name = (char *)get_high_address();
- }
-
- /*
- * Call stat(2) to test different test conditions.
- * verify that it fails with -1 return value and
- * sets appropriate errno.
- */
- TEST(stat(file_name, &stat_buf));
-
- /* Check return code from stat(2) */
- if (TEST_RETURN == -1) {
- TEST_ERROR_LOG(TEST_ERRNO);
- if (TEST_ERRNO == Test_cases[ind].exp_errno) {
- tst_resm(TPASS,
- "stat() fails, %s, errno:%d",
- test_desc, TEST_ERRNO);
- } else {
- tst_resm(TFAIL, "stat() fails, %s,"
- " errno:%d, expected errno:%d",
- test_desc, TEST_ERRNO,
- Test_cases[ind].exp_errno);
- }
- } else {
- tst_resm(TFAIL, "stat(2) returned %d,"
- " expected -1, errno:%d", TEST_RETURN,
- Test_cases[ind].exp_errno);
- }
- } /* End of TEST CASE LOOPING. */
- Tst_count++; /* incr TEST_LOOP counter */
- } /* End for TEST_LOOPING */
-
- /*
- * Invoke cleanup() to delete the test directory/file(s) created
- * in the setup().
- */
- cleanup();
- /*NOTREACHED*/
-
-} /* End main */
-
-/*
- * void
- * setup(void) - performs all ONE TIME setup for this test.
- * Exit the test program on receipt of unexpected signals.
- * Create a temporary directory and change directory to it.
- * Invoke individual test setup functions according to the order
- * set in struct. definition.
- */
-void
-setup()
-{
- int ind; /* counter for setup functions */
-
- /* Capture unexpected signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-#if 0
- /* Switch to nobody user for correct error code collection */
- if (geteuid() != 0) {
- tst_brkm(TBROK, tst_exit, "Test must be run as root");
- }
- ltpuser = getpwnam(nobody_uid);
- if (setuid(ltpuser->pw_uid) == -1) {
- tst_resm(TINFO, "setuid failed to "
- "to set the effective uid to %d",
- ltpuser->pw_uid);
- perror("setuid");
- }
-#endif
- /* Pause if that option was specified
- * TEST_PAUSE contains the code to fork the test with the -i option.
- * You want to make sure you do this before you create your temporary
- * directory.
- */
- TEST_PAUSE;
-
- /* Make a temp dir and cd to it */
- tst_tmpdir();
-
- /* call individual setup functions */
- for (ind = 0; Test_cases[ind].desc != NULL; ind++) {
- Test_cases[ind].setupfunc();
- }
-} /* End setup() */
-
-/*
- * int
- * no_setup() - Some test conditions for stat(2) do not any setup.
- * Hence, this function just returns 0.
- * This function simply returns 0.
- */
-int
-no_setup()
-{
- return 0;
-}
-
-
-/*
- * int
- * setup1() - setup function for a test condition for which stat(2)
- * returns -1 and sets errno to EACCES.
- * Create a test directory under temporary directory and create a test file
- * under this directory with mode "0666" permissions.
- * Modify the mode permissions on test directory such that process will not
- * have search permissions on test directory.
- *
- * The function returns 0.
- */
-int
-setup1()
-{
- int fd; /* file handle for testfile */
-
- /* Creat a test directory */
- if (mkdir(DIR_TEMP, MODE_RWX) < 0) {
- tst_brkm(TBROK, cleanup, "mkdir(2) of %s failed", DIR_TEMP);
- /*NOTREACHED*/
- }
-
- /* Creat a test file under above test directory */
- if ((fd = open(TEST_FILE1, O_RDWR|O_CREAT, 0666)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, 0666) failed, errno=%d : %s",
- TEST_FILE1, errno, strerror(errno));
- /*NOTREACHED*/
- }
- /* Close the test file */
- if (close(fd) == -1) {
- tst_brkm(TBROK, cleanup,
- "close(%s) Failed, errno=%d : %s",
- TEST_FILE1, errno, strerror(errno));
- /*NOTREACHED*/
- }
-
- /* Modify mode permissions on test directory */
- if (chmod(DIR_TEMP, FILE_MODE) < 0) {
- tst_brkm(TBROK, cleanup, "chmod(2) of %s failed", DIR_TEMP);
- /*NOTREACHED*/
- }
- return 0;
-}
-
-/*
- * int
- * setup2() - setup function for a test condition for which stat(2)
- * returns -1 and sets errno to ENOTDIR.
- *
- * Create a test file under temporary directory so that test tries to
- * change mode of a testfile "tfile_2" under "t_file" which happens to be
- * another regular file.
- */
-int
-setup2()
-{
- int fd; /* File handle for test file */
-
- /* Creat a test file under temporary directory */
- if ((fd = open("t_file", O_RDWR|O_CREAT, MODE_RWX)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(2) on t_file failed, errno=%d : %s",
- errno, strerror(errno));
- /*NOTREACHED*/
- }
- /* Close the test file created above */
- if (close(fd) == -1) {
- tst_brkm(TBROK, cleanup,
- "close(t_file) Failed, errno=%d : %s",
- errno, strerror(errno));
- /*NOTREACHED*/
- }
- return 0;
-}
-
-/*
- * int
- * longpath_setup() - setup to create a node with a name length exceeding
- * the MAX. length of PATH_MAX.
- * This function retruns 0.
- */
-int
-longpath_setup()
-{
- int ind; /* counter variable */
-
- for (ind = 0; ind <= (PATH_MAX + 1); ind++) {
- Longpathname[ind] = 'a';
- }
- return 0;
-}
-
-/*
- * void
- * cleanup() - Performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Print test timing stats and errno log if test executed with options.
- * Remove temporary directory and sub-directories/files under it
- * created during setup().
- * Exit the test program with normal exit code.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
-#ifndef __CYGWIN__
- /* Restore mode permissions on test directory created in setup2() */
- if (chmod(DIR_TEMP, MODE_RWX) < 0) {
- tst_brkm(TFAIL, NULL, "chmod(2) of %s failed", DIR_TEMP);
- }
-#endif
-
- /* Remove files and temporary directory created */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/stat05.c b/winsup/testsuite/winsup.api/ltp/stat05.c
deleted file mode 100644
index 5c0964a..0000000
--- a/winsup/testsuite/winsup.api/ltp/stat05.c
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : stat05
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for stat(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) stat(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the stat(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * stat(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="stat05"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char fname[255];
-int fd;
-struct stat statter;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call stat(2) with F_CLRALF argument on fname
- */
- TEST(stat(fname, &statter));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "stat(%s, &statter) Failed, errno=%d : %s", fname,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "stat(%s, &statter) returned %d", fname, TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(fname,"tfile_%d",getpid());
- if ((fd = open(fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
-
- if (close(fd) == -1) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/stat06.c b/winsup/testsuite/winsup.api/ltp/stat06.c
deleted file mode 100644
index c5fae6f..0000000
--- a/winsup/testsuite/winsup.api/ltp/stat06.c
+++ /dev/null
@@ -1,377 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : stat06
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : stat(2) negative path testcases
- *
- * PARENT DOCUMENT : None
- *
- * TEST CASE TOTAL : 7
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Richard Logan
- *
- * CO-PILOT : William Roske
- *
- * DATE STARTED : 03/30/94
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1-7) See Testcases structure below.
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- * -h : print help and exit
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * The libcuts.a and libsys.a libraries must be included in
- * the compilation of this test.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the stat(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * stat(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <setjmp.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-const char *TCID="stat06"; /* Test program identifier. */
-int TST_TOTAL=8; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-extern char *get_high_address();
-
-int exp_enos[]={0, 0};
-
-int high_address_setup();
-int longpath_setup();
-int no_setup();
-int filepath_setup();
-char Longpathname[PATH_MAX+2];
-char High_address[64];
-struct stat statbuf;
-jmp_buf sig11_recover;
-void sig11_handler(int sig);
-
-struct test_case_t {
- const char *pathname;
- struct stat *stbuf;
- const char *desc;
- int exp_errno;
- int (*setupfunc)();
-} Test_cases[] = {
- { "nonexistfile", &statbuf, "non-existent file", ENOENT, no_setup},
- { "", &statbuf, "path is empty string", ENOENT, no_setup},
- { "nefile/file", &statbuf, "path contains a non-existent file",
- ENOENT, no_setup },
-#ifndef __CYGWIN__
- { "file/file", &statbuf, "path contains a regular file",
- ENOTDIR, filepath_setup },
-#endif
- { Longpathname, &statbuf, "pathname too long", ENAMETOOLONG, longpath_setup },
- { High_address, &statbuf, "address beyond address space", EFAULT, high_address_setup },
- { (char *)-1, &statbuf, "negative address", EFAULT, no_setup },
- { "file", (struct stat *)-1, "invalid struct stat address", EFAULT, filepath_setup },
- { NULL, NULL, NULL, 0, no_setup }
-};
-
-/***********************************************************************
- * Main
- ***********************************************************************/
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- const char *fname;
- const char *desc;
- int ind;
- struct stat *stbuf;
- struct sigaction sa, osa;
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
-
- for (ind=0; Test_cases[ind].desc != NULL; ind++ ) {
-
- fname = Test_cases[ind].pathname;
- desc = Test_cases[ind].desc;
- stbuf = Test_cases[ind].stbuf;
-
- if (stbuf == (struct stat *)-1) {
- /* special sig11 case */
- sa.sa_handler = &sig11_handler;
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = 0;
-
- sigaction(SIGSEGV, NULL, &osa);
- sigaction(SIGSEGV, &sa, NULL);
-
- if (setjmp(sig11_recover)) {
- TEST_RETURN = -1;
- TEST_ERRNO = EFAULT;
- } else {
- TEST(stat(fname, stbuf));
- }
- sigaction(SIGSEGV, &osa, NULL);
- } else {
- /*
- * Call stat(2)
- */
-
- TEST(stat(fname, stbuf));
- }
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- if ( STD_FUNCTIONAL_TEST ) {
- if ( TEST_ERRNO == Test_cases[ind].exp_errno )
- tst_resm(TPASS, "stat(<%s>, &stbuf) Failed, errno=%d",
- desc, TEST_ERRNO);
- else
- tst_resm(TFAIL,
- "stat(<%s>, &stbuf) Failed, errno=%d, expected errno:%d",
- desc, TEST_ERRNO, Test_cases[ind].exp_errno);
- }
- else
- Tst_count++;
- } else {
- tst_resm(TFAIL,
- "stat(<%s>, &stbuf) returned %d, expected -1, errno:%d",
- desc, TEST_RETURN, Test_cases[ind].exp_errno);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- int ind;
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- for (ind=0; Test_cases[ind].desc != NULL; ind++ ) {
- Test_cases[ind].setupfunc();
- }
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-
-} /* End cleanup() */
-
-/******************************************************************
- * no_setup() - does nothing
- ******************************************************************/
-int
-no_setup()
-{
- return 0;
-}
-
-/******************************************************************
- * high_address_setup() - generates an address that should cause a segfault
- ******************************************************************/
-int
-high_address_setup()
-{
- int ind;
-
- for (ind=0; Test_cases[ind].desc != NULL; ind++ ) {
- if ( Test_cases[ind].pathname == High_address ) {
- /*if ( strcmp(Test_cases[ind].pathname, HIGH_ADDRESS) == 0 ) { ***/
- Test_cases[ind].pathname = get_high_address();
- break;
- }
- }
- return 0;
-
-}
-
-/******************************************************************
- * longpath_setup() - creates a filename that is too long
- ******************************************************************/
-int
-longpath_setup()
-{
- int ind;
-
- for(ind=0; ind<= PATH_MAX+1; ind++) {
- Longpathname[ind] = 'a';
- }
- return 0;
-
-}
-
-/******************************************************************
- * filepath_setup() creates a file the exists that we will treat as a directory
- ******************************************************************/
-int
-filepath_setup()
-{
- int fd;
-
- if ( (fd=creat("file", 0777)) == -1 ) {
- tst_brkm(TBROK, cleanup, "creat(file) failed, errno:%d %s",
- errno, strerror(errno));
- }
- close(fd);
- return 0;
-}
-
-/******************************************************************
- * sig11_handler() - our segfault recover hack
- ******************************************************************/
-void
-sig11_handler(int sig)
-{
- longjmp(sig11_recover, 1);
-}
diff --git a/winsup/testsuite/winsup.api/ltp/symlink01.c b/winsup/testsuite/winsup.api/ltp/symlink01.c
deleted file mode 100644
index 54a24b8..0000000
--- a/winsup/testsuite/winsup.api/ltp/symlink01.c
+++ /dev/null
@@ -1,2032 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-/* $Id$ */
-/**********************************************************
-*
-* OS Test - Silicon Graphics, Inc.
-*
-* TEST IDENTIFIER : symlink01 (symlink)
-*
-* TEST TITLE : Make a Symbolic Link to a File
-*
-* PARENT DOCUMENT : symtds01
-*
-* TEST CASE TOTAL : 5
-*
-* WALL CLOCK TIME : 3
-*
-* TEST IDENTIFIER : readlink01 (readlink)
-*
-* TEST TITLE : Reads Value of a Symbolic Link
-*
-* PARENT DOCUMENT : symtds01
-*
-* TEST CASE TOTAL : 4
-*
-* WALL CLOCK TIME : 3
-*
-* TEST IDENTIFIER : stat04 (stat)
-*
-* TEST TITLE : Gets File Status Indirectly From a Symbolic Link
-* File
-*
-* PARENT DOCUMENT : symtds01
-*
-* TEST CASE TOTAL : 3
-*
-* WALL CLOCK TIME : 3
-*
-* TEST IDENTIFIER : lstat01 (lstat)
-*
-* TEST TITLE : Get file Status About a Symbolic Link File
-*
-* PARENT DOCUMENT : symtds01
-*
-* TEST CASE TOTAL : 3
-*
-* WALL CLOCK TIME : 3
-*
-* TEST IDENTIFIER : mkdir05 (mkdir)
-*
-* TEST TITLE : Fail When Making a Directory File Indirectly From
-* a Symbolic Link File
-*
-* PARENT DOCUMENT : symtds01
-*
-* TEST CASE TOTAL : 1
-*
-* WALL CLOCK TIME : 3
-*
-* TEST IDENTIFIER : rmdir03 (rmdir)
-*
-* TEST TITLE : Fail When Removing a Directory File Indirectly
-* From a Symbolic Link File
-*
-* PARENT DOCUMENT : symtds01
-*
-* TEST CASE TOTAL : 1
-*
-* WALL CLOCK TIME : 3
-*
-* TEST IDENTIFIER : chdir01 (chdir)
-*
-* TEST TITLE : Changes Current Working DIrectory Location
-* Indirectly From a Symbolic Link File
-*
-* PARENT DOCUMENT : symtds01
-*
-* TEST CASE TOTAL : 3
-*
-* WALL CLOCK TIME : 3
-*
-* TEST IDENTIFIER : link01 (link)
-*
-* TEST TITLE : Creates a Link To a File Indirectly From a
-* Symbolic Link File
-*
-* PARENT DOCUMENT : symtds01
-*
-* TEST CASE TOTAL : 3
-*
-* WALL CLOCK TIME : 3
-*
-* TEST IDENTIFIER : unlink01 (unlink)
-*
-* TEST TITLE : Removes a Link To a File And Not Any Object File
-* Which Maybe Pointed At
-*
-* PARENT DOCUMENT : symtds01
-*
-* TEST CASE TOTAL : 1
-*
-* WALL CLOCK TIME : 3
-*
-* TEST IDENTIFIER : chmod01 (chmod)
-*
-* TEST TITLE : Change Object File Permissions Indirectly From a
-* Symbolic Link File
-*
-* PARENT DOCUMENT : symtds01
-*
-* TEST CASE TOTAL : 3
-*
-* WALL CLOCK TIME : 3
-*
-* TEST IDENTIFIER : utime01 (utime)
-*
-* TEST TITLE : Set File Access And Modify Object File Times
-* Indirectly From a Symbolic Link File
-*
-* PARENT DOCUMENT : symtds01
-*
-* TEST CASE TOTAL : 3
-*
-* WALL CLOCK TIME : 3
-*
-* TEST IDENTIFIER : rename01 (rename)
-*
-* TEST TITLE : Rename a Symbolic Link File And Not Any Object
-* File
-*
-* PARENT DOCUMENT : symtds01
-*
-* TEST CASE TOTAL : 3
-*
-* WALL CLOCK TIME : 3
-*
-* TEST IDENTIFIER : open01 (open)
-*
-* TEST TITLE : Create/Open a File For Reading Or Writing
-* Indirectly From a Symbolic Link File
-*
-* PARENT DOCUMENT : symtds01
-*
-* TEST CASE TOTAL : 5
-*
-* WALL CLOCK TIME : 3
-*
-* EXECUTED BY : whom ever
-*
-* CPU TYPES : ALL
-*
-* AUTHOR : David Fenner
-*
-* CO-PILOT : Jon Hendrickson
-*
-* DATE STARTED : 07/25/90
-*
-* INITIAL RELEASE : UNICOS 6.0
-*
-* TEST CASES
-*
-* For symlink
-*
-* 1. Create symbolic link with abnormal object name path
-* 2. Create symbolic link with normal object name path
-* 3. Create symbolic link with path to an existing object file
-* 4. Receive EEXIST error when creating an already existing symbolic link file.
-* 5. Receive ENAMETOOLONG error when creating symbolic link which exceeds PATH_MAX in length
-*
-* For readlink
-*
-* 1. Read a symbolic link file which points at no object file
-* 2. Read a symbolic link file which points at an object file
-* 3. Receive ENAMETOOLONG error when reading symbolic link which exceeds PATH_MAX in length
-* 4. Receive an EINVAL error when reading a file which is not a symbolic
-* link file.
-*
-* For stat
-*
-* 1. Get object file status through symbolic link file
-* 2. Receive ENOENT error when accessing non-existent object file through symbolic link file
-* 3. Receive ELOOP error when nesting of symbolic links exceed maximum
-*
-* For lstat
-*
-* 1. Get symbolic link file status when pointing at no object file
-* 2. Get symbolic link file status when pointing at an object file
-* 3. Get object file status when argument is not a symbolic link
-* file.
-*
-* For mkdir
-*
-* 1. Receive EEXIST error when creating a directory through a symbolic link file
-*
-* For rmdir
-*
-* 1. Receive ENOTDIR error when removing an existing directory through a symbolic link file
-*
-* For chdir
-*
-* 1. Change current working directory through a symbolic link file
-* 2. Receive ENOENT error when accessing non-existent directory through symbolic link file
-* 3. Receive ELOOP error when nesting of symbolic links exceed maximum
-*
-* For link
-*
-* 1. Link an object file to a new file through symbolic link file
-* 2. Receive ENOENT error when accessing non-existent object file through symbolic link file
-* 3. Receive ELOOP error when nesting of symbolic links exceed maximum
-*
-* For unlink
-*
-* 1. Delete a symbolic link file and not the object file which it points at
-*
-* For chmod
-*
-* 1. Change file permissions of object file through a symbolic link file
-* 2. Receive ENOENT error when accessing non-existent directory through symbolic link file
-* 3. Receive ELOOP error when nesting of symbolic links exceed maximum
-*
-* For utime
-*
-* 1. Change inode times of object file through a symbolic link file
-* 2. Receive ENOENT error when accessing non-existent directory through symbolic link file
-* 3. Receive ELOOP error when nesting of symbolic links exceed maximum
-*
-* For rename
-*
-* 1. Rename a symbolic link file which points at no object file
-* 2. Rename a symbolic link file which points at an object file without any object file alterations.
-* 3. Receive EXDEV when trying to rename a symbolic link file to an address outside of current file system
-*
-* For open
-*
-* 1. Create an object file through a symbolic link file
-* 2. Open an object file through a symbolic link file
-* 3. Receive EEXIST error when exclusively creating an object file through a symbolic link file
-* 4. Receive ENOENT error when accessing non-existent object file through symbolic link file
-* 5. Receive ELOOP error when nesting of symbolic links exceed maximum
-*
-* ENVIRONMENTAL NEEDS
-* None
-*
-* DETAILED DESCRIPTION
-*
-* Self-documenting code so see below
-*
-*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <signal.h>
-#include <string.h>
-#include <fcntl.h> /* open(2) system call */
-#include <errno.h>
-#include <sys/types.h>
-#include <utime.h> /* utime(2) system call */
-#include <sys/param.h>
-#include <sys/stat.h> /* stat(2) and lstat(2) system calls */
-
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-void help();
-void delete_files();
-void do_EEXIST();
-void do_ENOENT();
-void do_ELOOP();
-void do_ENOTDIR();
-void do_EXDEV();
-void do_ENAMETOOLONG();
-void do_EINVAL();
-void do_readlink();
-void do_stat();
-void do_chdir();
-void do_link();
-void do_unlink();
-void do_chmod();
-void do_utime();
-void do_rename();
-void do_open();
-
-#define S_FILE "symbolic" /* Name of symbolic link file */
-#define O_FILE "object" /* Name of object file */
-#define A_S_FILE "asymbolic" /* Another name for a symbolic link file */
-#define Y_A_S_FILE "/NiCkEr" /* Yet another symbolic link file */
-#define BIG_STRING "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"
-
-#define DEFAULT_TCID "symlink01"
-#define ALL 1
-
-#define SYMLINK "symlink01"
-#define READLINK "readlink01"
-#define STAT "stat04"
-#define LSTAT "lstat01"
-#define MKDIR "mkdir05"
-#define RMDIR "rmdir03"
-#define CHDIR "chdir01"
-#define LINK "link01"
-#define UNLINK "unlink01"
-#define CHMOD "chmod01"
-#define UTIME "utime01"
-#define RENAME "rename01"
-#define OPEN "open01"
-
-#define cktcsid(s1,s2) (!strcmp(s1,s2))
-#define BUFMAX 512
-#define MODE 0700
-#define MASK 0100777 /* A regular file with r,w,x for all mask */
-
-/*
- * Lets be optimistic and only define messages for passing test cases
- */
-const char *msgs[] = {
- "Creation of symbolic link file to no object file is ok",
- "Creation of symbolic link file and object file via symbolic link is ok",
- "Creating an existing symbolic link file error is caught",
- "Creating a symbolic link which exceeds maximum pathname error is caught",
- "Reading of symbolic link file contents checks out ok",
- "Reading a symbolic link which exceeds maximum pathname error is caught",
- "Getting stat info about object file through symbolic link file is ok",
- "Stat(2) error when accessing non-existent object through symbolic link is caught",
- "lstat(2) of symbolic link file which points to no object file is ok",
- "lstat(2) of symbolic link file which points at an object file is ok",
- "mkdir(2) of object file through symbolic link file failed as expected",
- "rmdir(2) of object file through symbolic link file failed as expected",
- "chdir(2) to object file location through symbolic link file is ok",
- "chdir(2) to non-existent object file location through symbolic link file failed as expected",
- "link(2) to a symbolic link, which is pointing to an existing object file worked - file created and link count adjusted",
- "link(2) to a symbolic link, which is pointing to a non-existing object file worked ok - file created and link count adjusted.",
- "unlink(2) of symbolic link file with no object file removal is ok",
- "chmod(2) of object file permissions through symbolic link file is ok",
- "chmod(2) error when accessing non-existent object through symbolic link is caught",
- "utime(2) change of object file access and modify times through symbolic link file is ok",
- "utime(2) error when accessing non-existent object through symbolic link is caught",
- "rename(3) of symbolic link file name which points at no object file is ok",
- "rename(3) of symbolic link file name which points at object file is ok",
- "rename(3) error of symbolic link file name across file systems is caught",
- "open(2) with (O_CREAT | O_RDWR) to create object file through symbolic link file and all writes, reads, and lseeks are ok",
- "open(2) with O_RDWR of existing object file through symbolic link file and all writes, reads, and lseeks are ok",
- "open(2) with (O_CREAT | O_EXCL) error is caught when creating object file through symbolic link file",
- "open(2) error with O_RDWR is caught when processing symbolic link file which points at no object file",
- "Nested symbolic link access condition caught. ELOOP is returned",
- "Reading a nonsymbolic link file error condition is caught. EINVAL is returned",
- "lstat(2) of object file returns object file inode information",
- "NULL"
-};
-
-/*
- * Define test object setup and validation functions
- */
-int creat_both(), creat_symlink(), creat_path_max(), ck_symlink(),
- creat_object(), ck_object(), ck_both(), ck_path_max();
-
-
-/*
- * Define test cases
- */
-struct all_test_cases
-{
- const char *tcid;
- int test_fail;
- int errno_val;
- int pass_msg;
- int (*test_setup)();
- int (*ck_test)();
- const char *fn_arg[3];
-
-} test_objects[] = {
- {SYMLINK, 0, 0, 0, creat_symlink, ck_symlink, {"%bc+eFhi!k", S_FILE, NULL}},
- {SYMLINK, 0, 0, 0, creat_symlink, ck_symlink, {O_FILE, S_FILE, NULL}},
- {SYMLINK, 0, 0, 1, creat_both, ck_both, {O_FILE, S_FILE, O_FILE}},
- {SYMLINK, 1, EEXIST, 2, creat_symlink, ck_symlink, {O_FILE, S_FILE, NULL}},
- {SYMLINK, 1, ENAMETOOLONG, 3, creat_path_max, ck_path_max, {O_FILE, S_FILE, NULL}},
- {READLINK, 0, 0, 4, creat_symlink, ck_symlink, {O_FILE, S_FILE, NULL}},
- {READLINK, 0, 0, 4, creat_both, ck_both, {O_FILE, S_FILE, O_FILE}},
- {READLINK, 1, ENAMETOOLONG, 5, creat_path_max, ck_path_max, {O_FILE, S_FILE, NULL}},
- {READLINK, 1, EINVAL, 29, creat_object, ck_object, {O_FILE, NULL, NULL}},
- {STAT, 0, 0, 6, creat_both, ck_both, {O_FILE, S_FILE, O_FILE}},
- {STAT, 1, ENOENT, 7, creat_symlink, ck_symlink, {O_FILE, S_FILE, NULL}},
- {STAT, 1, ELOOP, 28, creat_symlink, ck_symlink, {S_FILE, S_FILE, NULL}},
- {LSTAT, 0, 0, 8, creat_symlink, ck_symlink, {O_FILE, S_FILE, NULL}},
- {LSTAT, 0, 0, 9, creat_both, ck_both, {O_FILE, S_FILE, O_FILE}},
- {LSTAT, 0, 0, 30, creat_object, ck_object, {O_FILE, NULL, NULL}},
- {MKDIR, 1, EEXIST, 10, creat_symlink, ck_symlink, {O_FILE, S_FILE, NULL}},
- {RMDIR, 1, ENOTDIR, 11, creat_symlink, ck_symlink, {O_FILE, S_FILE, NULL}},
- {CHDIR, 0, 0, 12, creat_symlink, ck_symlink, {O_FILE, S_FILE, O_FILE}},
- {CHDIR, 1, ENOENT, 13, creat_symlink, ck_symlink, {"%bc+eFhi!k", S_FILE, NULL}},
- {CHDIR, 1, ELOOP, 28, creat_symlink, ck_symlink, {S_FILE, S_FILE, NULL}},
- {LINK, 0, 0, 14, creat_both, ck_both, {O_FILE, S_FILE, O_FILE}},
- {LINK, 0, 0, 15, creat_symlink, ck_symlink, {O_FILE, S_FILE, NULL}},
- /* The following link test case is invalid - leaving it defined so */
- /* I don't have to change all the entries in the all_tcses array after link */
- {LINK, -1, -1, -1, creat_symlink, ck_symlink, {NULL, NULL, NULL}},
- {UNLINK, 0, 0, 16, creat_both, ck_both, {O_FILE, S_FILE, O_FILE}},
- {CHMOD, 0, 0, 17, creat_both, ck_both, {O_FILE, S_FILE, O_FILE}},
- {CHMOD, 1, ENOENT, 18, creat_symlink, ck_symlink, {O_FILE, S_FILE, NULL}},
- {CHMOD, 1, ELOOP, 28, creat_symlink, ck_symlink, {S_FILE, S_FILE, NULL}},
- {UTIME, 0, 0, 19, creat_both, ck_both, {O_FILE, S_FILE, O_FILE}},
- {UTIME, 1, ENOENT, 20, creat_symlink, ck_symlink, {O_FILE, S_FILE, NULL}},
- {UTIME, 1, ELOOP, 28, creat_symlink, ck_symlink, {S_FILE, S_FILE, NULL}},
- {RENAME, 0, 0, 21, creat_symlink, ck_symlink, {O_FILE, S_FILE, NULL}},
- {RENAME, 0, 0, 22, creat_both, ck_both, {O_FILE, S_FILE, O_FILE}},
- {RENAME, -1, EXDEV, 23, creat_both, ck_both, {O_FILE, S_FILE, O_FILE}},
- {OPEN, 0, 0, 24, creat_symlink, ck_symlink, {O_FILE, S_FILE, NULL}},
- {OPEN, 0, 0, 25, creat_both, ck_both, {O_FILE, S_FILE, O_FILE}},
- {OPEN, -1, EEXIST, 26, creat_symlink, ck_symlink, {O_FILE, S_FILE, O_FILE}},
- {OPEN, 1, ENOENT, 27, creat_symlink, ck_symlink, {O_FILE, S_FILE, NULL}},
- {OPEN, 1, ELOOP, 28, creat_symlink, ck_symlink, {S_FILE, S_FILE, NULL}}
-};
-
-/*
- * Define tcses
- */
-struct tcses
-{
- const char *tcid;
- const char *syscall;
- int test_cases; /* number of entries in test_objects array */
- struct all_test_cases *tc_ptr;
- const char *desc;
-} all_tcses[] = {
-
- { SYMLINK, "symlink", 5, &test_objects[0],
- "Make a Symbolic Link to a File" },
- { READLINK, "readlink", 4, &test_objects[5],
- "Reads Value of a Symbolic Link" },
- { STAT, "stat", 3, &test_objects[9],
- "Gets File Status Indirectly From a Symbolic Link file" },
- { LSTAT, "lstat", 3, &test_objects[12],
- "Get file Status About a Symbolic Link File" },
- { MKDIR, "mkdir", 1, &test_objects[15],
- "Fail When Making a Directory File Indirectly from a symlink" },
- { RMDIR, "rmdir", 1, &test_objects[16],
- "Fail When Removing a Directory File Indirectly from a symlink" },
- { CHDIR, "chdir", 3, &test_objects[17],
- "Changes CWD Location Indirectly from a symlink" },
- { LINK, "link", 2, &test_objects[20],
- "Creates a Link To a File Indirectly From a Symbolic" },
- { UNLINK, "unlink", 1, &test_objects[23],
- "Removes a Link To a File but not the Object File" },
- { CHMOD, "chmod", 3, &test_objects[24],
- "Change Object File Permissions Indirectly From a Symbolic" },
- { UTIME, "utime", 3, &test_objects[27],
- "Set File Access And Modify Object File Times via symlink" },
- { RENAME, "rename", 3, &test_objects[30],
- "Rename a Symbolic Link File And Not Any Object file" },
- { OPEN, "open", 5, &test_objects[33],
- "Create/Open a File For Reading Or Writing via symlink" },
-};
-
-/*
- * Define GLOBAL variables
- */
-
-int TST_TOTAL;
-int TEST_RESULT;
-time_t a_time_value = 100;
-const char *TCID = NULL;
-char *Selectedtests = NULL; /* Name (tcid) of selected test cases */
-char test_msg[BUFMAX];
-char full_path[PATH_MAX+1];
-extern int Tst_count;
-extern char *TESTDIR;
-extern char *strrchr();
-extern int errno;
-
-struct stat asymlink, statter;
-char Buffer[1024];
-char Buf[1024];
-
-char *Tcid = NULL;
-
-option_t Options[] = {
- { "T:", NULL, &Tcid }, /* -T tcid option */
- { NULL, NULL, NULL }
-};
-
-/***********************************************************************
- * MAIN
- ***********************************************************************/
-int
-main(int argc, char *argv[])
-{
- struct tcses *tcs_ptr, *get_tcs_info();
- int do_syscalltests();
- void cleanup();
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
-
- /***************************************************************
- * parse standard options, and exit if there is an error
- ***************************************************************/
- if ( (msg=parse_opts(argc, argv, Options, &help)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /*
- * If the -T option was used, use that TCID or use the default
- */
- if ( Tcid != NULL ) {
- TCID = Tcid;
- Selectedtests=Tcid;
-
- }
- else {
- TCID = DEFAULT_TCID;
-#ifndef ALL
- Selectedtests = DEFAULT_TCID;
-#else
- Selectedtests = NULL;
-#endif
- }
-
- /*
- * Get test case specification information and assign TST_TOTAL
- */
- if ((tcs_ptr=get_tcs_info(Selectedtests)) == NULL) {
- TST_TOTAL=1;
- tst_brkm(TBROK, cleanup,
- "Unknown symbolic link test case specification executed");
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
-
- setup();
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Execute tcs testing function and all defined test cases
- */
- do_syscalltests(tcs_ptr);
-
- } /* End for TEST_LOOPING */
-
- /*
- * End appropriately
- */
- cleanup();
-
- return 0;
-}
-
-/***********************************************************************
- * This function maps the name of the process to a test case specification
- * defined in the all_tcses array of tcses structures. Either a pointer
- * to the mapped test case specification information is returned or a
- * null pointer.
- *
- * Argument is path to program name.
- ***********************************************************************/
-struct tcses *get_tcs_info(ptr)
-char *ptr;
-{
- unsigned ctr;
- struct tcses *tcs_ptr;
-
-#if ALL
- if ( ptr == NULL ) {
-
- TST_TOTAL=0;
- for (ctr=1; ctr < sizeof(all_tcses)/sizeof(struct tcses); ctr++)
- TST_TOTAL += all_tcses[ctr].test_cases;
- return all_tcses;
- }
-#endif
-
-
- for(ctr=0; ctr < (sizeof(all_tcses)/sizeof(struct tcses)); ctr++) {
- if ( strcmp(ptr, all_tcses[ctr].tcid) == 0 ||
- strcmp(ptr, all_tcses[ctr].syscall) == 0 ) {
- tcs_ptr = &all_tcses[ctr];
- TCID = all_tcses[ctr].tcid;
- TST_TOTAL=tcs_ptr->test_cases;
- return(tcs_ptr);
- }
-
- }
- return(NULL);
-}
-
-/***********************************************************************
- * Determines if what path points at is a symbolic link file
- *
- * Argument is path to symbolic link file.
- *
- * Return status is one if a symbolic link file. Zero if not a symbolic
- * link file and a minus one if the path doesn't point at a file.
- ***********************************************************************/
-int
-see_if_a_symlink(path)
-char *path;
-{
- if (lstat(path, &asymlink) < 0)
- return(-1);
-
- if ((asymlink.st_mode & S_IFMT) == S_IFLNK)
- return(1);
- else
- return(0);
-}
-
-/***********************************************************************
- * This function performs without any hesitation, file(s) deletions
- ***********************************************************************/
-void
-delete_files(path1, path2)
-char *path1, *path2;
-{
- unlink(path1);
- unlink(path2);
-}
-
-/***********************************************************************
- *
- * This routine creates a symbolic link file.
- *
- * Argument one is symbolic link pathname to point at.
- * Argument two is name of symbolic link file.
- *
- ***********************************************************************/
-int
-creat_symlink(path1, path2)
-char *path1, *path2;
-{
- TEST( symlink(path1, path2) );
- errno=TEST_ERRNO;
- if (TEST_RETURN == -1) {
- TEST_RESULT=TBROK;
- sprintf(test_msg,
- "symlink(2) Failure when creating setup %s object file: errno:%d %s",
- path1, errno, strerror(errno));
- return(0);
- }
- else {
- sprintf(Buf, "symlink(%s, %s) was succesful.\n", path1, path2);
- strcat(Buffer, Buf);
-#if DEBUG
- tst_resm(TPASS, "symlink(%s, %s) was succesful.", path1, path2);
-#endif
- }
- return(1);
-}
-
-/***********************************************************************
- *
- * This routine creates a regular file.
- *
- * Argument one is a pathname
- *
- ***********************************************************************/
-int
-creat_object(path1)
-char *path1;
-{
- int fd;
- if ((fd=creat(path1, MODE)) == -1) {
- TEST_RESULT=TBROK;
- sprintf(test_msg,
- "creat(2) Failure when creating setup %s object file: errno:%d %s",
- path1, errno, strerror(errno));
- return(0);
- }
- else {
- sprintf(Buf, "creat(%s, %#o) was succesful.\n", path1, MODE);
- strcat(Buffer, Buf);
-#if DEBUG
- tst_resm(TPASS, "creat(%s, %#o) was succesful.", path1, MODE);
-#endif
- }
- if (close(fd) == -1) {
- TEST_RESULT=TBROK;
- sprintf(test_msg,
- "close(2) Failure when closing setup %s object file: errno:%d %s",
- path1, errno, strerror(errno));
- return(0);
- }
- return(1);
-}
-
-/***********************************************************************
- *
- * This routine creates a symbolic link file and a regular file.
- *
- * Argument one is a pathname of object file
- * Argument two is symbolic link file name
- * Argument three is regular file name
- *
- ***********************************************************************/
-int
-creat_both(path1, path2, path3)
-char *path1, *path2, *path3;
-{
- if (creat_symlink(path1, path2) == -1)
- return(0);
- else if (creat_object(path3) == -1)
- return(0);
- return(1);
-}
-
-/***********************************************************************
- *
- * This routine checks if symbolic link file is a symbolic link file.
- *
- * Argument one is a pathname of object file
- * Argument two is symbolic link file name
- * Argument three is regular file name
- *
- ***********************************************************************/
-int
-ck_symlink(path1, path2, path3)
-char *path1, *path2, *path3;
-{
- int ret;
-
- if ((ret=see_if_a_symlink(path2)) == -1) {
- TEST_RESULT=TBROK;
- sprintf(test_msg,
- "lstat(2) Failure when accessing %s symbolic link file which should contain %s path to %s file ",
- path2, path1, path3);
- return(0);
- }
- else if (ret == 0) {
- TEST_RESULT=TBROK;
- sprintf(test_msg,
- "%s is not a symbolic link file which contains %s path to %s file",
- path2, path1, path3);
- return(0);
- }
- return(1);
-}
-
-/***********************************************************************
- *
- * This routine checks if symbolic link file points at object file.
- *
- * Argument one is a pathname of object file
- * Argument two is symbolic link file name
- * Argument three is regular file name
- *
- ***********************************************************************/
-int
-ck_both(path1, path2, path3)
-char *path1, *path2, *path3;
-{
- if (ck_symlink(path1, path2, path3) == 0)
- return(0);
- else if ((stat(path3, &statter) == -1) && (errno == ENOENT)) {
- TEST_RESULT=TBROK;
- sprintf(test_msg, "stat(2) Failure when accessing %s object file ", path3);
- return(0);
- }
- else if ((stat(path2, &asymlink) == -1) && (errno == ENOENT)) {
- TEST_RESULT=TBROK;
- sprintf(test_msg, "stat(2) Failure when accessing %s symbolic link file ",
- path2);
- return(0);
- }
- else if (statter.st_ino != asymlink.st_ino) {
- TEST_RESULT=TBROK;
- sprintf(test_msg,
- "stat(2) Failure when accessing %s object file through %s symbolic link file ",
- path3, path2);
- return(0);
- }
- return(1);
-
-}
-
-/***********************************************************************
- * This routine populates full_path with a pathname whose length exceeds
- * the PATH_MAX define value in param.h
- *
- * Argument one is a pathname of object file
- * Argument two is symbolic link file name
- * Argument three is regular file name
- ***********************************************************************/
-int
-creat_path_max(path1, path2, path3)
-char *path1, *path2, *path3;
-{
- int ctr, to_go, size, whole_chunks;
- char buf [PATH_MAX];
- char *cwd;
-
- if ((cwd = getcwd(buf, sizeof (buf))) == NULL)
- {
- TEST_RESULT=TBROK;
- sprintf(test_msg,
- "getcwd(3) Failure in setup of %s %s %s test case object elements",
- path1, path2, path3);
- return(0);
- }
- size = strlen(cwd);
-
- to_go = PATH_MAX - size;
- size = strlen(path1);
- whole_chunks = to_go / size;
- strcpy(full_path, cwd);
- for (ctr=0; ctr < whole_chunks; ctr++) {
- strcat(full_path, path1);
- }
- size= strlen(full_path);
- to_go = PATH_MAX - size;
- strcat(full_path, "/");
- for (ctr=0; ctr < to_go; ctr++)
- strcat(full_path, "Z");
-
- return(1);
-}
-
-/***********************************************************************
- * This routine checks that full_path's length exceeds the PATH_MAX
- * define value in param.h
- *
- * Argument one is a pathname of object file
- * Argument two is symbolic link file name
- * Argument three is regular file name
- ***********************************************************************/
-int
-ck_path_max(path1, path2, path3)
-char *path1, *path2, *path3;
-{
- if (strlen(full_path) == (PATH_MAX+1))
- return(1);
- else
- {
- TEST_RESULT=TBROK;
- sprintf(test_msg, "%s %d %s %s %s %s",
- "full_path character array length was not", (PATH_MAX+1),
- "characters long for test case object elements",
- path1, path2, path3);
- return(0);
- }
-}
-
-/***********************************************************************
- * This routine checks if the stat(2) and lstat(2) calls return the same
- * information when the path is not a symbolic link file
- *
- * Argument one is a pathname of object file
- * Argument two is symbolic link file name
- * Argument three is regular file name
- *
- ***********************************************************************/
-int
-ck_object(path1, path2, path3)
-char *path1, *path2, *path3;
-{
- int ret;
-
- if ((ret=see_if_a_symlink(path1)) < 0) {
- TEST_RESULT=TFAIL;
- sprintf(test_msg,
- "lstat(2) failed to return inode information for a regular object file");
- return(0);
- }
- else if (ret == 1) {
- TEST_RESULT=TFAIL;
- sprintf(test_msg,
- "lstat(2) detected a regular object file as a symbolic link file");
- return(0);
- }
- else if (stat(path1, &statter) == -1) {
- TEST_RESULT=TBROK;
- sprintf(test_msg,
- "stat(2) failed to return inode information for a regular object file");
- return(0);
- }
- else if (bcmp((char *)&statter, (char *)&asymlink, sizeof(statter)) != 0) {
- TEST_RESULT=TFAIL;
- sprintf(test_msg,
- "lstat(2) and stat(2) do not return same inode information for an object file");
- return(0);
-
- }
- return(1);
-}
-
-/***********************************************************************
- * Main test case processing function
- *
- * Argument is a ptr into the all_tcses array of structures of type tcses
- ***********************************************************************/
-int
-do_syscalltests(tcs)
-struct tcses *tcs;
-{
- int ctr, ret;
- struct all_test_cases *tc_ptr;
-
- /*
- * loop through desired number of test cases
- */
- for (ctr=0, tc_ptr=tcs->tc_ptr; ctr < TST_TOTAL; ctr++, tc_ptr++) {
-
- if (tc_ptr->test_fail < 0) continue;
-
- Buffer[0]='\0';
-
- /*
- * If running all test cases for all tcid, set the TCID if needed.
- */
- if ( Selectedtests == NULL ) {
- if ( !TCID || strcmp(TCID, tc_ptr->tcid) != 0 ) {
- TCID = tc_ptr->tcid;
- Tst_count=0;
- }
- }
- /*
- * Insure that we are executing the correct tcs test case
- */
- if (strcmp(TCID, tc_ptr->tcid) != 0) {
- tst_resm(TBROK, "%s TCID attempted to execute %s %d %d test case",
- TCID, tc_ptr->tcid, tc_ptr->test_fail, tc_ptr->errno_val);
- continue;
- }
- TEST_RESULT=TPASS;
- delete_files(S_FILE, O_FILE);
- /*
- * Perform test case setup
- */
- ret = (tc_ptr->test_setup)(tc_ptr->fn_arg[0], tc_ptr->fn_arg[1],
- tc_ptr->fn_arg[2], tc_ptr->errno_val);
-
- /* If an expected error, try it out */
-
- if (tc_ptr->test_fail) {
- /*
- * Try to perform test verification function
- */
- if (! (tc_ptr->ck_test)(tc_ptr->fn_arg[0], tc_ptr->fn_arg[1],
- tc_ptr->fn_arg[2], tc_ptr->errno_val))
- tst_resm(TEST_RESULT, test_msg);
- else if (tc_ptr->errno_val == EEXIST)
- do_EEXIST(tc_ptr);
- else if (tc_ptr->errno_val == ENOENT)
- do_ENOENT(tc_ptr);
- else if (tc_ptr->errno_val == ELOOP)
- do_ELOOP(tc_ptr);
- else if (tc_ptr->errno_val == ENOTDIR)
- do_ENOTDIR(tc_ptr);
- else if (tc_ptr->errno_val == EXDEV)
- do_EXDEV(tc_ptr);
- else if (tc_ptr->errno_val == ENAMETOOLONG)
- do_ENAMETOOLONG(tc_ptr);
- else if (tc_ptr->errno_val == EINVAL)
- do_EINVAL(tc_ptr);
- else
- tst_resm(TBROK, "Test Case Declaration Error");
- }
- else if (ret == 1) { /* No setup function error */
-
- if (tc_ptr->errno_val != 0)
- tst_resm(TBROK, "Test Case Declaration Error");
- else {
- /*
- * Perform test verification function
- */
- ret=(tc_ptr->ck_test)(tc_ptr->fn_arg[0], tc_ptr->fn_arg[1],
- tc_ptr->fn_arg[2], tc_ptr->errno_val);
-
- /* Perform requested symbolic link system call test */
-
- if ((cktcsid(tc_ptr->tcid, SYMLINK)) ||
- (cktcsid(tc_ptr->tcid, LSTAT))) {
- if (ret == 1)
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- tst_resm(TEST_RESULT, test_msg);
- }
- else if (ret == 0)
- tst_resm(TEST_RESULT, test_msg);
- else if (cktcsid(tc_ptr->tcid, READLINK))
- do_readlink(tc_ptr);
- else if (cktcsid(tc_ptr->tcid, STAT))
- do_stat(tc_ptr);
- else if (cktcsid(tc_ptr->tcid, CHDIR))
- do_chdir(tc_ptr);
- else if (cktcsid(tc_ptr->tcid, LINK))
- do_link(tc_ptr);
- else if (cktcsid(tc_ptr->tcid, UNLINK))
- do_unlink(tc_ptr);
- else if (cktcsid(tc_ptr->tcid, CHMOD))
- do_chmod(tc_ptr);
- else if (cktcsid(tc_ptr->tcid, UTIME))
- do_utime(tc_ptr);
- else if (cktcsid(tc_ptr->tcid, RENAME))
- do_rename(tc_ptr);
- else if (cktcsid(tc_ptr->tcid, OPEN))
- do_open(tc_ptr);
- else
- tst_resm(TBROK, "Unknown test case processing actions declared");
- }
- }
- else
- tst_resm(TBROK, "Test Case Declaration Error");
- }
- return(0);
-}
-
-/***********************************************************************
- * This routine checks for the return of EEXIST errno from requested
- * system call
- *
- * Argument is pointer to test_objects array of structures of type
- * all_test_cases
- ***********************************************************************/
-void
-do_EEXIST(tc_ptr)
-struct all_test_cases *tc_ptr;
-{
- if (cktcsid(tc_ptr->tcid, SYMLINK)) {
-
- TEST( symlink(tc_ptr->fn_arg[0], tc_ptr->fn_arg[1]) );
- errno=TEST_ERRNO;
- if ((TEST_RETURN == -1) && (errno == EEXIST))
- if ( STD_FUNCTIONAL_TEST )
- tst_resm(TPASS, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- else
- tst_resm(TFAIL, "%s %s",
- "Expected EEXIST error when creating a symbolic link file",
- "which already existed");
- }
- else if (cktcsid(tc_ptr->tcid, MKDIR)) {
-
- TEST ( mkdir(tc_ptr->fn_arg[1],MODE) );
- errno=TEST_ERRNO;
- if ((TEST_RETURN == -1) && (errno == EEXIST))
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- else {
-
- tst_resm(TFAIL, "%s %s",
- "Expected EEXIST error when creating a directory by a symbolic",
- "link file which pointed at no object file");
- rmdir(tc_ptr->fn_arg[1]);
- }
- }
- else if (cktcsid(tc_ptr->tcid, OPEN)) {
-
- TEST( open(tc_ptr->fn_arg[1], (O_EXCL | O_CREAT)) )
- errno=TEST_ERRNO;
- if ((TEST_RETURN == -1) && (errno == EEXIST))
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- else
- tst_resm(TFAIL, "%s %s errno:%d %s",
- "Expected EEXIST error for exclusively opening an object file",
- "through a symbolic link file was not received:",
- errno, strerror(errno));
- close (TEST_RETURN);
- }
- else
- tst_resm(TBROK, "Unknown test case processing actions declared");
-}
-
-/***********************************************************************
- * This routine checks for the return of ENOENT errno from requested
- * system call
- *
- * Argument is pointer to test_objects array of structures of type
- * all_test_cases
- ***********************************************************************/
-void
-do_ENOENT(tc_ptr)
-struct all_test_cases *tc_ptr;
-{
- if (cktcsid(tc_ptr->tcid, STAT)) {
-
- if ((stat(tc_ptr->fn_arg[1], &asymlink) == -1) && (errno == ENOENT))
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- else
- tst_resm(TFAIL, "%s %s errno:%d %s",
- "Expected ENOENT error for stating a non-existent directory",
- "through a symbolic link file was not received:",
- errno, strerror(errno));
- }
- else if (cktcsid(tc_ptr->tcid, CHDIR)) {
- if ((chdir(tc_ptr->fn_arg[1]) == -1) && (errno == ENOENT))
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- else {
- tst_resm(TFAIL, "%s %s errno:%d %s",
- "Expected ENOENT error for changing to a non-existent",
- "directory through a symbolic link file was not received:",
- errno, strerror(errno));
- chdir(TESTDIR);
- }
- }
- else if (cktcsid(tc_ptr->tcid, LINK)) {
-
- if ((link(tc_ptr->fn_arg[1], "nick") == -1) && (errno == ENOENT))
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- else
- {
- tst_resm(TFAIL, "%s %s errno:%d %s",
- "Expected ENOENT error condition when link(2) a symbolic",
- "link which pointed at no object:", errno, strerror(errno));
- delete_files("nick", NULL);
- }
- }
- else if (cktcsid(tc_ptr->tcid, CHMOD)) {
-
- if ((chmod(tc_ptr->fn_arg[1], MODE) == -1) && (errno == ENOENT))
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- else
- tst_resm(TFAIL, "%s %s errno:%d %s",
- "Expected ENOENT error condition when chmod(2) a symbolic",
- "link which pointed at no object,", errno, strerror(errno));
- }
- else if (cktcsid(tc_ptr->tcid, UTIME)) {
-
- if ((utime(tc_ptr->fn_arg[1], NULL) == -1) && (errno == ENOENT))
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- else
- tst_resm(TFAIL, "%s %s errno:%d %s",
- "Expected ENOENT error condition when utime(2) a symbolic",
- "link which pointed at no object:", errno, strerror(errno));
- }
- else if (cktcsid(tc_ptr->tcid, OPEN)) {
-
- if ((open(tc_ptr->fn_arg[1], O_RDWR) == -1) && (errno == ENOENT))
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- else
- tst_resm(TFAIL, "%s %s errno:%d %s",
- "Expected ENOENT error for opening a non-existent object",
- " file through a symbolic link file was not received,",
- errno, strerror(errno));
- close (TEST_RETURN);
- }
- else
- tst_resm(TBROK, "Unknown test case processing actions declared");
-}
-
-/***********************************************************************
- * This routine checks for the return of ELOOP errno from requested
- * system call
- *
- * Argument is pointer to test_objects array of structures of type
- * all_test_cases
- ***********************************************************************/
-void
-do_ELOOP(tc_ptr)
-struct all_test_cases *tc_ptr;
-{
- if (cktcsid(tc_ptr->tcid, STAT)) {
-
- TEST( stat(tc_ptr->fn_arg[1], &asymlink) );
- errno=TEST_ERRNO;
- if ((TEST_RETURN == -1) && (errno == ELOOP))
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- else
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, "%s errno:%d %s",
- "Expected ELOOP errno from stat(2) (nested symb link),",
- errno, strerror(errno));
- else
- Tst_count++;
- }
- else if (cktcsid(tc_ptr->tcid, CHDIR)) {
-
- TEST( chdir(tc_ptr->fn_arg[1]) );
- errno=TEST_ERRNO;
- if ((TEST_RETURN == -1) && (errno == ELOOP))
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- else {
-
- tst_resm(TFAIL, "%s errno:%d %s",
- "Expected ELOOP error condition when chdir(2) a nested symbolic link:",
- errno, strerror(errno));
- chdir(TESTDIR);
- }
- }
- else if (cktcsid(tc_ptr->tcid, LINK)) {
-
- TEST ( link(tc_ptr->fn_arg[1], O_FILE) );
- errno=TEST_ERRNO;
- if ((TEST_RETURN == -1) && (errno == ELOOP))
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- else
- tst_resm(TFAIL, "%s errno:%d %s",
- "Expected ELOOP error condition when link(2) a nested symbolic link:",
- errno, strerror(errno));
- }
- else if (cktcsid(tc_ptr->tcid, CHMOD)) {
-
- TEST ( chmod(tc_ptr->fn_arg[1], MODE) );
- errno=TEST_ERRNO;
- if ((TEST_RETURN == -1) && (errno == ELOOP))
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- else
- tst_resm(TFAIL, "%s errno:%d %s",
- "Expected ELOOP error condition when chmod(2) a nested symbolic link:",
- errno, strerror(errno));
- return;
- }
- else if (cktcsid(tc_ptr->tcid, UTIME)) {
-
- TEST( utime(tc_ptr->fn_arg[1], NULL) );
- errno=TEST_ERRNO;
-
- if ((TEST_RETURN == -1) && (errno == ELOOP))
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- else
- tst_resm(TFAIL, "%s errno:%d %s",
- "Expected ELOOP error condition when utime(2) a nested symbolic link:",
- errno, strerror(errno));
- }
- else if (cktcsid(tc_ptr->tcid, OPEN)) {
-
- int fd;
- TEST( open(tc_ptr->fn_arg[1], O_CREAT) );
- fd=TEST_RETURN;
- errno=TEST_ERRNO;
- if ((fd == -1) && (errno == ELOOP))
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- else
- tst_resm(TFAIL, "%s errno:%d %s",
- "Expected ELOOP error condition when open(2) a nested symbolic link:",
- errno, strerror(errno));
- close (fd);
- }
- else
- tst_resm(TBROK, "Unknown test case processing actions declared");
-}
-
-/***********************************************************************
- * This routine checks for the return of ENOTDIR errno from requested
- * system call
- *
- * Argument is pointer to test_objects array of structures of type
- * all_test_cases
- ***********************************************************************/
-void
-do_ENOTDIR(tc_ptr)
-struct all_test_cases *tc_ptr;
-{
- if (cktcsid(tc_ptr->tcid, RMDIR)) {
-
- TEST( mkdir(tc_ptr->fn_arg[0], MODE) );
- errno=TEST_ERRNO;
- if (TEST_RETURN == -1)
- tst_resm(TBROK, "mkdir(2) Failure when creating %s",
- tc_ptr->fn_arg[0]);
- else if ((rmdir(tc_ptr->fn_arg[1]) == -1) && (errno == ENOTDIR)) {
-
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- rmdir(tc_ptr->fn_arg[0]);
- }
- else
- tst_resm(TFAIL, "%s %s errno:%d %s",
- "Expected ENOTDIR error for removing a non-existent",
- "directory through a symbolic link file was not received,",
- errno, strerror(errno));
- }
- else
- tst_resm(TBROK, "Unknown test case processing actions declared");
-}
-
-/***********************************************************************
- * This routine checks for the return of EXDEV errno from requested
- * system call
- *
- * Argument is pointer to test_objects array of structures of type
- * all_test_cases
- ***********************************************************************/
-void
-do_EXDEV(tc_ptr)
-struct all_test_cases *tc_ptr;
-{
- if (cktcsid(tc_ptr->tcid, RENAME)) {
-
- TEST( rename(tc_ptr->fn_arg[1], Y_A_S_FILE) );
- errno=TEST_ERRNO;
- if ((TEST_RETURN == -1) && (errno == EXDEV)) {
- if (see_if_a_symlink(Y_A_S_FILE) == -1)
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- else
- tst_resm(TFAIL, "%s %s %s file outside of current file system",
- "rename(3) returned -1 when trying to move symbolic link file",
- "outside of current file system, but created", Y_A_S_FILE);
- }
- else {
- tst_resm(TFAIL, "%s %s errno:%d %s",
- "Expected EXDEV error for renaming an existing symbolic",
- "link file to a location outside of existing file system,",
- errno, strerror(errno));
- delete_files("/NiCkEr", NULL);
- }
- }
- else
- tst_resm(TBROK, "Unknown test case processing actions declared");
-}
-
-/***********************************************************************
- * This routine checks for the return of ENAMETOOLONG errno from requested
- * system call
- *
- * Argument is pointer to test_objects array of structures of type
- * all_test_cases
- ***********************************************************************/
-void
-do_ENAMETOOLONG(tc_ptr)
-struct all_test_cases *tc_ptr;
-{
- int ret;
-
- if (cktcsid(tc_ptr->tcid, SYMLINK)) {
-
- TEST( symlink(tc_ptr->fn_arg[0], full_path) );
- errno=TEST_ERRNO;
- if ((TEST_RETURN == -1) && (errno == ENAMETOOLONG))
- if (see_if_a_symlink(full_path) == -1)
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- else
- tst_resm(TFAIL, "%s %s %d %s",
- "symlink(2) returned -1 when trying to create a symbolic",
- "link file whose name exceeded", (PATH_MAX+1),
- "characters, but it created the symbolic link file");
- else
- tst_resm(TFAIL,
- "Expected ENAMETOOLONG error when creating %s symbolic link file with a path exceeding %d characters: errno:%d %s",
- tc_ptr->fn_arg[1], (PATH_MAX+1), errno, strerror(errno));
- }
- else if (cktcsid(tc_ptr->tcid, READLINK)) {
-
- char scratch[PATH_MAX+1];
-
- ret=readlink(full_path, scratch, strlen(full_path));
- if (( ret == -1) && (errno == ENAMETOOLONG))
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- else
- tst_resm(TFAIL,
- "Expected ENAMETOOLONG error when reading %s symbolic link file with a path exceeding %d characters: errno:%d %s",
- tc_ptr->fn_arg[1], (PATH_MAX+1), errno, strerror(errno));
- }
- else
- tst_resm(TBROK, "Unknown test case processing actions declared");
-}
-
-/***********************************************************************
- * This routine checks for the return of EINVAL errno from requested
- * system call
- *
- * Argument is pointer to test_objects array of structures of type
- * all_test_cases
- ***********************************************************************/
-void
-do_EINVAL(tc_ptr)
-struct all_test_cases *tc_ptr;
-{
- if (cktcsid(tc_ptr->tcid, READLINK)) {
- TEST( readlink(tc_ptr->fn_arg[0], test_msg, BUFMAX) );
- errno=TEST_ERRNO;
- if (TEST_RETURN == -1) {
- if (errno == EINVAL) {
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- } else
- tst_resm(TFAIL, "readlink(2) ret:-1, errno:%d, : Exp errno:%d",
- errno, EINVAL);
- }
- else {
- tst_resm(TFAIL, "readlink(2) did not returned -1 when reading %s",
- "a file which is not a symbolic link file");
- }
- }
- else
- tst_resm(TBROK, "Unknown test case processing actions declared");
-}
-
-/***********************************************************************
- * This routine checks out the readlink(2) system call for a successful
- * invocation
- *
- * Argument is pointer to test_objects array of structures of type
- * all_test_cases
- ***********************************************************************/
-void
-do_readlink(tc_ptr)
-struct all_test_cases *tc_ptr;
-{
- char scratch[PATH_MAX];
- int ret;
-
- ret=readlink(tc_ptr->fn_arg[1], scratch, strlen(tc_ptr->fn_arg[0]));
-
- /*** the TEST macro cannot be used here for some reason ****/
-
- if (ret == -1) {
- tst_resm(TFAIL,
- "readlink(2) failure on %s symbolic link file, errno=%d",
- tc_ptr->fn_arg[1], errno);
-
- }
- else if (strncmp(tc_ptr->fn_arg[0], scratch,
- strlen(tc_ptr->fn_arg[0])) != 0) {
-
- /* Must null terminate scratch because readlink(2) doesn't */
-
- scratch[strlen(tc_ptr->fn_arg[0])] = '\0';
-
- tst_resm(TFAIL,
- "readlink(2) Error : Expected %s symbolic link file contents but %s actual contents were returned",
- tc_ptr->fn_arg[0], scratch);
- }
- else if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
-}
-
-/***********************************************************************
- * This routine checks out the stat(2) system call for a successful
- * invocation
- *
- * Argument is pointer to test_objects array of structures of type
- * all_test_cases
- ***********************************************************************/
-void
-do_stat(tc_ptr)
-struct all_test_cases *tc_ptr;
-{
- if (statter.st_dev != asymlink.st_dev)
- tst_resm(TFAIL,
- "stat of symbolic link reference to object device info %ld != stat of object file device info %ld",
- statter.st_dev, asymlink.st_dev);
-
- else if (statter.st_mode != asymlink.st_mode)
- tst_resm(TFAIL,
- "stat of symbolic link reference to object file permissions %ld != stat of object file permissions %ld",
- statter.st_mode, asymlink.st_mode);
-
- else if (statter.st_nlink != asymlink.st_nlink)
- tst_resm(TFAIL,
- "stat of symbolic link reference to object file link count %ld != stat of object file link count %ld",
- statter.st_nlink, asymlink.st_nlink);
-
- else if (statter.st_uid != asymlink.st_uid)
- tst_resm(TFAIL,
- "stat of symbolic link reference to object file uid %ld != stat of object file uid %ld",
- statter.st_uid, asymlink.st_uid);
-
- else if (statter.st_gid != asymlink.st_gid)
- tst_resm(TFAIL,
- "stat of symbolic link reference to object file gid %ld != stat of object file gid %ld",
- statter.st_gid, asymlink.st_gid);
-
- else if (statter.st_size != asymlink.st_size)
- tst_resm(TFAIL,
- "stat of symbolic link reference to object file size %ld != stat of object file size %ld",
- statter.st_size, asymlink.st_size);
-
- else if (statter.st_atime != asymlink.st_atime)
- tst_resm(TFAIL,
- "stat of symbolic link reference to object access time %ld != stat of object file access time %ld",
- statter.st_atime, asymlink.st_atime);
-
- else if (statter.st_mtime != asymlink.st_mtime)
- tst_resm(TFAIL,
- "stat of symbolic link reference to object modify time %ld != stat of object file modify time %ld",
- statter.st_atime, asymlink.st_atime);
-
- else if (statter.st_ctime != asymlink.st_ctime)
- tst_resm(TFAIL,
- "stat of symbolic link reference to object change time %ld != stat of object file change time %ld",
- statter.st_atime, asymlink.st_atime);
- else if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
-}
-
-/***********************************************************************
- * This routine checks out the chdir(2) system call for a successful
- * invocation
- *
- * Argument is pointer to test_objects array of structures of type
- * all_test_cases
- ***********************************************************************/
-void
-do_chdir(tc_ptr)
-struct all_test_cases *tc_ptr;
-{
- if (mkdir(tc_ptr->fn_arg[2],MODE) == -1)
- tst_resm(TFAIL, "Could not create a setup directory file");
- else {
-
- sprintf(Buf, "mkdir(%s, %#o) was successful\n", tc_ptr->fn_arg[2],MODE);
- strcat(Buffer, Buf);
-
- if (chdir(tc_ptr->fn_arg[1]) == -1)
- tst_resm(TFAIL, "%sCould not change a directory file through a %s",
- Buffer, "symbolic link which which pointed at object");
- else {
-
- char buf [PATH_MAX];
- char *cwd;
- char expected_location[PATH_MAX];
- /*
- * Build expected current directory position
- */
- strcpy(expected_location, TESTDIR);
- strcat(expected_location, "/");
- strcat(expected_location, tc_ptr->fn_arg[2]);
-
- if ((cwd = getcwd(buf, sizeof (buf))) == NULL)
- tst_resm(TFAIL, "getcwd(3) FAILURE");
- else if (strcmp(cwd, expected_location) == 0)
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- else {
- tst_resm(TFAIL, "%s%s %s %s not equal to expected %s", Buffer,
- "chdir(2) returned successfully, but getcwd(3) indicated",
- "new current working directory location", cwd, expected_location);
- }
- chdir(TESTDIR);
- }
- rmdir(tc_ptr->fn_arg[2]);
- }
-}
-
-/***********************************************************************
- * This routine checks out the link(2) system call for a successful
- * invocation
- *
- * Argument is pointer to test_objects array of structures of type
- * all_test_cases
- ***********************************************************************/
-void
-do_link(tc_ptr)
-struct all_test_cases *tc_ptr;
-{
- struct stat stbuf;
-
- if (link(tc_ptr->fn_arg[1], "nick") == -1) {
- tst_resm(TFAIL, "%slink(%s, \"nick\") failed, errno: %d\n%s %s",
- Buffer, tc_ptr->fn_arg[1], errno,
- "link of new file to object file via symbolic link file failed",
- "when expected not to");
- }
- else {
- sprintf(Buf, "link(%s, \"nick\") was successful\n", tc_ptr->fn_arg[1]);
- strcat(Buffer, Buf);
-
- if ( STD_FUNCTIONAL_TEST ) {
- /*
- * Check that links counts were properly set
- */
- if (lstat(tc_ptr->fn_arg[1], &asymlink) == -1) {
- tst_resm(TBROK, "lstat(%s) failed. errno: %d",
- tc_ptr->fn_arg[1], errno);
-
- } else if (lstat("nick", &statter) == -1) {
- tst_resm(TBROK, "lstat(nick) failed, errno:%d", errno);
- } else {
- if (statter.st_ino == asymlink.st_ino) {
- if ((statter.st_nlink ==2) && (asymlink.st_nlink == 2)) {
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- } else {
- lstat(tc_ptr->fn_arg[2], &stbuf);
-
- tst_resm(TFAIL,
- "%slink(%s, %s) failed to adjust link count.\n\
- count for nick is %d, count for %s is %d, count for %s is %d.",
- Buffer, tc_ptr->fn_arg[1], "nick",
- statter.st_nlink, tc_ptr->fn_arg[1], asymlink.st_nlink,
- tc_ptr->fn_arg[2], stbuf.st_nlink);
- }
- } else {
- tst_resm(TFAIL,
- "%sA lstat of %s (ino:%llu) and of\n\t\t\
-%s (ino:%llu), does not show them being the same ino.", Buffer,
- tc_ptr->fn_arg[1], asymlink.st_ino, "nick", statter.st_ino);
- }
- }
- }
- delete_files("nick", NULL);
- }
-}
-
-/***********************************************************************
- * This routine checks out the unlink(2) system call for a successful
- * invocation
- *
- * Argument is pointer to test_objects array of structures of type
- * all_test_cases
- ***********************************************************************/
-void
-do_unlink(tc_ptr)
-struct all_test_cases *tc_ptr;
-{
- if (stat(tc_ptr->fn_arg[2], &asymlink) == -1)
- tst_resm(TBROK,
- "stat(2) Failure when accessing %s object file", tc_ptr->fn_arg[2]);
- else if (unlink(tc_ptr->fn_arg[1]) == -1)
- tst_resm(TFAIL, "unlink(2) failed when removing symbolic link file");
- else {
- sprintf(Buf, "unlink(%s) was successful\n", tc_ptr->fn_arg[1]);
- strcat(Buffer, Buf);
- if (stat(tc_ptr->fn_arg[2], &statter) == -1)
- tst_resm(TFAIL,"%s %s",
- "unlink(2) failed because it not only removed symbolic link",
- "file which pointed at object file, but object file as well");
-
- else
- if ((statter.st_ino == asymlink.st_ino) &&
- (statter.st_dev == asymlink.st_dev) &&
- (statter.st_size == asymlink.st_size))
-
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- else
- tst_resm(TFAIL, "%s%s %s %s", Buffer,
- "unlink(2) failed because it not only removed symbolic link",
- "file which pointed at object file, but it changed object",
- "file inode information");
- }
-
-}
-
-/***********************************************************************
- * This routine checks out the chmod(2) system call for a successful
- * invocation
- *
- * Argument is pointer to test_objects array of structures of type
- * all_test_cases
- ***********************************************************************/
-void
-do_chmod(tc_ptr)
-struct all_test_cases *tc_ptr;
-{
- if (stat(tc_ptr->fn_arg[2], &asymlink) == -1)
- tst_resm(TBROK,
- "stat(2) Failure when accessing %s object file", tc_ptr->fn_arg[2]);
- else if (chmod(tc_ptr->fn_arg[1], (MODE | MASK)) == -1)
- tst_resm(TFAIL, "%s%s %s", Buffer,
- "chmod(2) failed when changing file permission",
- "through symbolic link file");
- else {
- sprintf(Buf, "chmod(%s, %#o) was successful\n", tc_ptr->fn_arg[1],
- (MODE | MASK));
- strcat(Buffer, Buf);
-
- if (stat(tc_ptr->fn_arg[2], &statter) == -1)
- tst_resm(TBROK,
- "stat(2) Failure when accessing %s object file", tc_ptr->fn_arg[2]);
- else
- if ((statter.st_mode == (MODE | MASK)) &&
- (statter.st_mode != asymlink.st_mode))
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- else
- tst_resm(TFAIL, "%s%s %o to %o %s", Buffer,
- "chmod(2) failed to change object file permissions from",
- asymlink.st_mode, (MODE | MASK),
- "through symbolic link file");
- }
-
-}
-
-/***********************************************************************
- * This routine checks out the utime(2) system call for a successful
- * invocation
- *
- * Argument is pointer to test_objects array of structures of type
- * all_test_cases
- ***********************************************************************/
-void
-do_utime(tc_ptr)
-struct all_test_cases *tc_ptr;
-{
- struct utimbuf utimes;
-
- if (stat(tc_ptr->fn_arg[2], &asymlink) == -1)
- tst_resm(TBROK, "stat(2) Failure when accessing %s object file",
- tc_ptr->fn_arg[2]);
- else {
- /* Now add a few values to access and modify times */
-
- utimes.actime = asymlink.st_atime + a_time_value;
- utimes.modtime = asymlink.st_mtime + a_time_value;
-
- /* Now hand off to utime(2) via symbolic link file*/
-
- if (utime(tc_ptr->fn_arg[1], &utimes) == -1)
- tst_resm(TFAIL, "%s %s",
- "utime(2) failed to process object file access and modify",
- "time updates through symbolic link");
- else {
- /* Now verify changes were made */
-
- if (stat(tc_ptr->fn_arg[2], &statter) == -1)
- tst_resm(TBROK,
- "stat(2) Failure when accessing %s object file",
- tc_ptr->fn_arg[2]);
- else {
- time_t temp, diff;
-
- temp = statter.st_atime - asymlink.st_atime;
- diff = (statter.st_mtime - asymlink.st_mtime) - temp;
-
- if (! diff)
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- else
- tst_resm(TFAIL, "%s %s %d greater than original times",
- "utime(2) failed to change object file access and",
- "modify times through symbolic link to a value",
- a_time_value);
- }
- }
- }
-}
-
-/***********************************************************************
- * This routine checks out the rename(2) system call for a successful
- * invocation
- *
- * Argument is pointer to test_objects array of structures of type
- * all_test_cases
- ***********************************************************************/
-void
-do_rename(tc_ptr)
-struct all_test_cases *tc_ptr;
-{
- int pts_at_object = 0;
-
-
- if (stat(tc_ptr->fn_arg[2], &statter) != -1)
- pts_at_object=1;
-
- TEST (rename(tc_ptr->fn_arg[1], A_S_FILE) );
- errno=TEST_ERRNO;
- if (TEST_RETURN == -1)
- tst_resm(TFAIL, "rename(3) failed to rename %s symbolic link file to %s",
- tc_ptr->fn_arg[2], A_S_FILE);
- else if (pts_at_object)
- if (ck_both(tc_ptr->fn_arg[0], A_S_FILE, tc_ptr->fn_arg[2]))
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- else
- tst_resm(TFAIL, test_msg);
- else if ( ! ck_symlink(tc_ptr->fn_arg[0], A_S_FILE, NULL))
- tst_resm(TFAIL, test_msg);
- else if (stat(tc_ptr->fn_arg[1], &asymlink) != -1)
- tst_resm(TFAIL,
- "rename(3) did not remove %s when renaming to %s",
- tc_ptr->fn_arg[1], A_S_FILE);
- else if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
-}
-
-/***********************************************************************
- * This routine checks out the open(2) system call for a successful
- * invocation
- *
- * Argument is pointer to test_objects array of structures of type
- * all_test_cases
- ***********************************************************************/
-void
-do_open(tc_ptr)
-struct all_test_cases *tc_ptr;
-{
- int fd = -1;
- int ret, pts_at_object = 0;
- char scratch[PATH_MAX];
-
-
- if (stat(tc_ptr->fn_arg[2], &statter) != -1)
- pts_at_object=1;
-
- if (pts_at_object) {
- TEST( open(tc_ptr->fn_arg[1], O_RDWR) );
- errno=TEST_ERRNO;
- if ((fd=TEST_RETURN) == -1) {
- tst_resm(TFAIL,
- "open(2) Failure when opening object file through symbolic link file");
- return;
- }
- }
- else {
- TEST(open(tc_ptr->fn_arg[1], (O_CREAT | O_RDWR), MODE) );
- errno=TEST_ERRNO;
- if ((fd=TEST_RETURN) == -1) {
- tst_resm(TFAIL,
- "open(2) Failure when creating object file through symbolic link file");
- return;
- }
- }
- if ((ret=write(fd, BIG_STRING, strlen(BIG_STRING))) == -1) {
- tst_resm(TFAIL,
- "write(2) Failure to object file opened through a symbolic link file: errno:%d",
- errno);
- }
- else if (ret != strlen(BIG_STRING)) {
- tst_resm(TFAIL,
- "write(2) Failed to write %d bytes to object file opened through a symbolic link file",
- strlen(BIG_STRING));
- }
- else if (lseek(fd, 0L, 0) == -1) {
- tst_resm(TFAIL,
- "lseek(2) Failed to position to beginning of object file opened through a symbolic link file: errno = %d",
- errno);
- }
- else if ((ret=read(fd, scratch, strlen(BIG_STRING))) == -1) {
- tst_resm(TFAIL,
- "read(2) Failure of object file opened through a symbolic link file: errno = %d",
- errno);
- }
- else if (ret != strlen(BIG_STRING)) {
- tst_resm(TFAIL,
- "read(2) Failed to read %d bytes to object file opened through a symbolic link file",
- strlen(BIG_STRING));
- }
- else if (strncmp(BIG_STRING, scratch, strlen(BIG_STRING)) != 0) {
- tst_resm(TFAIL,
- "Content of write(2) and read(2) Failed to object file through symbolic link file was not as expected. Expected %s and read returned %s",
- BIG_STRING, scratch);
- }
- else {
- /*
- * Close off symbolic link file to object file access
- */
- if (close(fd) == -1) {
- tst_resm(TFAIL,
- "close(2) Failure when closing object file accessed symbolic link file");
- }
- /*
- * Now, lets open up and read object file and compare contents
- */
- else if ((fd=open(tc_ptr->fn_arg[0], O_RDONLY)) == -1) {
- tst_resm(TFAIL, "open(2) Failure when opening %s file: errno:%d %s",
- tc_ptr->fn_arg[0], errno, strerror(errno));
- }
- else if ((ret=read(fd, scratch, strlen(BIG_STRING))) == -1) {
- tst_resm(TFAIL,
- "read(2) Failure of object file opened through a symbolic link file: errno:%d", errno);
- }
- else if (ret != strlen(BIG_STRING)) {
- tst_resm(TFAIL,
- "read(2) Failed to read %d bytes to object file opened through a symbolic link file",
- strlen(BIG_STRING));
- }
- else if (strncmp(BIG_STRING, scratch, strlen(BIG_STRING)) != 0) {
- tst_resm(TFAIL,
- "Content of write(2) and read(2) Failed to object file through symbolic link file was not as expected. Expected %s and read returned %s",
- BIG_STRING, scratch);
- }
- else if (pts_at_object) {
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- }
- else { /* Insure newly created object file is pointed at */
- if (ck_both(tc_ptr->fn_arg[0], tc_ptr->fn_arg[1], tc_ptr->fn_arg[0]))
- if ( TEST_RESULT != TPASS || STD_FUNCTIONAL_TEST )
- tst_resm(TEST_RESULT, msgs[tc_ptr->pass_msg]);
- else
- Tst_count++;
- else
- tst_resm(TFAIL, test_msg);
- }
- close(fd);
- }
-}
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* create a temporary directory and go to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- */
- TEST_CLEANUP;
-
- /* remove temporary directory and all files in it. */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-
-} /* End cleanup() */
-
-
-/*
- *
- */
-void help()
-{
- unsigned ind;
-
- printf(" -T id Determines which tests cases to execute:\n");
-
- for (ind=0; ind<sizeof(all_tcses)/sizeof(struct tcses ); ind++) {
- printf(" %s/%s - %s\n", all_tcses[ind].tcid, all_tcses[ind].syscall,
- all_tcses[ind].desc);
- }
-}
diff --git a/winsup/testsuite/winsup.api/ltp/symlink02.c b/winsup/testsuite/winsup.api/ltp/symlink02.c
deleted file mode 100644
index 4157cea..0000000
--- a/winsup/testsuite/winsup.api/ltp/symlink02.c
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : symlink02
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for symlink(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) symlink(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the symlink(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * symlink(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="symlink02"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char fname[255], symlnk[255];
-int fd;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call symlink(2)
- */
- TEST(symlink(fname, symlnk));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "symlink(%s, %s) Failed, errno=%d : %s",
- fname, symlnk, TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "symlink(%s, %s) returned %d",
- fname, symlnk, TEST_RETURN);
- }
- if (unlink(symlnk) == -1) {
- tst_brkm(TBROK, cleanup,
- "unlink(%s) Failed, errno=%d : %s",
- symlnk, errno, strerror(errno));
- }
- }
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(fname,"tfile_%d",getpid());
- if ((fd=open(fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
-
- if (close(fd) == -1 ) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
- sprintf(symlnk,"st_%d",getpid());
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/symlink03.c b/winsup/testsuite/winsup.api/ltp/symlink03.c
deleted file mode 100644
index 4d05427..0000000
--- a/winsup/testsuite/winsup.api/ltp/symlink03.c
+++ /dev/null
@@ -1,404 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name : symlink03
- *
- * Test Description :
- * Verify that,
- * 1) symlink(2) returns -1 and sets errno to EACCES if search/write
- * permission is denied in the directory where the symbolic link is
- * being created.
- * 2) symlink(2) returns -1 and sets errno to EEXIST if the specified
- * symbolic link already exists.
- * 3) symlink(2) returns -1 and sets errno to EFAULT if the specified
- * file or symbolic link points to invalid address.
- * 4) symlink(2) returns -1 and sets errno to ENAMETOOLONG if the
- * pathname component of symbolic link is too long (ie, > PATH_MAX).
- * 5) symlink(2) returns -1 and sets errno to ENOTDIR if the directory
- * component in pathname of symbolic link is not a directory.
- * 6) symlink(2) returns -1 and sets errno to ENOENT if the component of
- * symbolic link points to an empty string.
- *
- * Expected Result:
- * symlink() should fail with return value -1 and set expected errno.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * if errno set == expected errno
- * Issue sys call fails with expected return value and errno.
- * Otherwise,
- * Issue sys call fails with unexpected errno.
- * Otherwise,
- * Issue sys call returns unexpected value.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory(s)/file(s) created.
- *
- * Usage: <for command-line>
- * symlink03 [-c n] [-e] [-i n] [-I x] [-p x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * History
- * 07/2001 John George
- * -Ported
- *
- * Restrictions:
- * This test should be executed by 'non-super-user' only.
- */
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/stat.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define MODE_RWX S_IRWXU | S_IRWXG | S_IRWXO
-#define FILE_MODE S_IRUSR | S_IRGRP | S_IROTH
-#define DIR_TEMP "testdir_1"
-#define TESTFILE "testfile"
-#define TEST_FILE1 "testdir_1/tfile_1"
-#define SYM_FILE1 "testdir_1/sfile_1"
-#define TEST_FILE2 "tfile_2"
-#define SYM_FILE2 "sfile_2"
-#define TEST_FILE3 "tfile_3"
-#define SYM_FILE3 "t_file/sfile_3"
-
-const char *TCID="symlink03"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int exp_enos[]={ENOTDIR, ENOENT, ENAMETOOLONG, EFAULT, EEXIST, EACCES, 0};
-
-int no_setup();
-int setup1(); /* setup function to test symlink for EACCES */
-int setup2(); /* setup function to test symlink for EEXIST */
-int setup3(); /* setup function to test symlink for ENOTDIR */
-int longpath_setup(); /* setup function to test chmod for ENAMETOOLONG */
-
-char Longpathname[PATH_MAX+2];
-char High_address_node[64];
-
-struct test_case_t { /* test case struct. to hold ref. test cond's*/
- const char *file;
- const char *link;
- const char *desc;
- int exp_errno;
- int (*setupfunc)();
-} Test_cases[] = {
- { TEST_FILE1, SYM_FILE1, "No Search permissions to process", EACCES, setup1 },
- { TEST_FILE2, SYM_FILE2, "Specified symlink already exists", EEXIST, setup2 },
- { TESTFILE, High_address_node, "Address beyond address space", EFAULT, no_setup },
- { TESTFILE, (char *)-1, "Negative address", EFAULT, no_setup },
- { TESTFILE, Longpathname, "Symlink path too long", ENAMETOOLONG, longpath_setup },
- { TESTFILE, "", "Symlink Pathname is empty", ENOENT, no_setup },
-#ifndef __CYGWIN__
- { TEST_FILE3, SYM_FILE3, "Symlink Path contains regular file", ENOTDIR, setup3 },
-#endif
- { NULL, NULL, NULL, 0, no_setup }
-};
-
-extern void setup(); /* Setup function for the test */
-void cleanup() __attribute__((noreturn));/* Cleanup function for the test */
-char *get_high_address (void);
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- const char *test_file; /* testfile name */
- const char *sym_file; /* symbolic link file name */
- const char *test_desc; /* test specific error message */
- int ind; /* counter to test different test conditions */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- /*NOTREACHED*/
- }
-
- /*
- * Invoke setup function to call individual test setup functions
- * to simulate test conditions.
- */
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- for (ind = 0; Test_cases[ind].desc != NULL; ind++) {
- test_file = Test_cases[ind].file;
- sym_file = Test_cases[ind].link;
- test_desc = Test_cases[ind].desc;
-
- if (sym_file == High_address_node) {
- sym_file = (char *)get_high_address();
- }
- /*
- * Call symlink(2) to test different test conditions.
- * verify that it fails with -1 return value and sets
- * appropriate errno.
- */
- TEST(symlink(test_file, sym_file));
-
- /* Check return code of symlink(2) */
- if (TEST_RETURN == -1) {
- /*
- * Perform functional verification if
- * test executed without (-f) option.
- */
- TEST_ERROR_LOG(TEST_ERRNO);
- if (TEST_ERRNO == Test_cases[ind].exp_errno) {
- tst_resm(TPASS, "symlink() Fails, %s, "
- "errno=%d", test_desc,
- TEST_ERRNO);
- } else {
- tst_resm(TFAIL, "symlink() Fails, %s, "
- "errno=%d, expected errno=%d",
- test_desc, TEST_ERRNO,
- Test_cases[ind].exp_errno);
- }
- } else {
- tst_resm(TFAIL, "symlink() returned %d, "
- "expected -1, errno:%d", TEST_RETURN,
- Test_cases[ind].exp_errno);
- }
- } /* End of TEST CASE LOOPING. */
-
- Tst_count++; /* incr. TEST_LOOP counter */
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
- /*NOTREACHED*/
-
-} /* End main */
-
-/*
- * void
- * setup() - performs all ONE TIME setup for this test.
- * Create a temporary directory and change directory to it.
- * Call test specific setup functions.
- */
-void
-setup()
-{
- int ind;
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified
- * TEST_PAUSE contains the code to fork the test with the -i option.
- * You want to make sure you do this before you create your temporary
- * directory.
- */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* call individual setup functions */
- for (ind = 0; Test_cases[ind].desc != NULL; ind++) {
- Test_cases[ind].setupfunc();
- }
-} /* End setup() */
-
-/*
- * int
- * no_setup() - Some test conditions for mknod(2) do not any setup.
- * Hence, this function just returns 0.
- * This function simply returns 0.
- */
-int
-no_setup()
-{
- return 0;
-}
-
-/*
- * int
- * setup1() - setup function for a test condition for which symlink(2)
- * returns -1 and sets errno to EACCES.
- * Create a test directory under temporary directory and create a test file
- * under this directory with mode "0666" permissions.
- * Modify the mode permissions on test directory such that process will not
- * have search permissions on test directory.
- *
- * The function returns 0.
- */
-int
-setup1()
-{
- int fd; /* file handle for testfile */
-
- if (mkdir(DIR_TEMP, MODE_RWX) < 0) {
- tst_brkm(TBROK, cleanup, "mkdir(2) of %s failed", DIR_TEMP);
- /*NOTREACHED*/
- }
-
- if ((fd = open(TEST_FILE1, O_RDWR|O_CREAT, 0666)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, 0666) failed, errno=%d : %s",
- TEST_FILE1, errno, strerror(errno));
- /*NOTREACHED*/
- }
- if (close(fd) == -1) {
- tst_brkm(TBROK, cleanup,
- "close(%s) Failed, errno=%d : %s",
- TEST_FILE1, errno, strerror(errno));
- /*NOTREACHED*/
- }
-
- /* Modify mode permissions on test directory */
- if (chmod(DIR_TEMP, FILE_MODE) < 0) {
- tst_brkm(TBROK, cleanup, "chmod(2) of %s failed", DIR_TEMP);
- /*NOTREACHED*/
- }
- return 0;
-}
-
-/*
- * int
- * setup2() - EEXIST
- */
-int
-setup2()
-{
- int fd; /* file handle for testfile */
-
- if ((fd = open(TEST_FILE2, O_RDWR|O_CREAT, 0666)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, 0666) failed, errno=%d : %s",
- TEST_FILE1, errno, strerror(errno));
- /*NOTREACHED*/
- }
- if (close(fd) == -1) {
- tst_brkm(TBROK, cleanup,
- "close(%s) Failed, errno=%d : %s",
- TEST_FILE2, errno, strerror(errno));
- /*NOTREACHED*/
- }
-
- if (symlink(TEST_FILE2, SYM_FILE2) < 0) {
- tst_brkm(TBROK, cleanup,
- "symlink() Fails to create %s in setup2, error=%d",
- SYM_FILE2, errno);
- /*NOTREACHED*/
- }
- return 0;
-}
-
-/*
- * int
- * longpath_setup() - setup to create a node with a name length exceeding
- * the MAX. length of PATH_MAX.
- * This function retruns 0.
- */
-int
-longpath_setup()
-{
- int ind; /* counter variable */
-
- for (ind = 0; ind <= (PATH_MAX + 1); ind++) {
- Longpathname[ind] = 'a';
- }
- return 0;
-}
-
-/*
- * int
- * setup3() - setup function for a test condition for which symlink(2)
- * returns -1 and sets errno to ENOTDIR.
- *
- * Create a symlink file under temporary directory so that test tries to
- * create symlink file "tfile_3" under "t_file" which happens to be
- * another symlink file.
- */
-int
-setup3()
-{
- int fd; /* file handle for testfile */
-
- /* Creat/open a testfile and close it */
- if ((fd = open("t_file", O_RDWR|O_CREAT, MODE_RWX)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(2) on t_file failed, errno=%d : %s",
- errno, strerror(errno));
- /*NOTREACHED*/
- }
- if (close(fd) == -1) {
- tst_brkm(TBROK, cleanup, "close(t_file) Failed, errno=%d : %s",
- errno, strerror(errno));
- /*NOTREACHED*/
- }
- return 0;
-}
-
-/*
- * void
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Restore the mode permissions on test directory.
- * Remove the temporary directory created in the setup.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Restore mode permissions on test directory created in setup2() */
- if (chmod(DIR_TEMP, MODE_RWX) < 0) {
- tst_brkm(TBROK, NULL, "chmod(2) of %s failed", DIR_TEMP);
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/symlink04.c b/winsup/testsuite/winsup.api/ltp/symlink04.c
deleted file mode 100644
index c6ddd06..0000000
--- a/winsup/testsuite/winsup.api/ltp/symlink04.c
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name : symlink01
- *
- * Test Description :
- * Verify that, symlink will succeed to creat a symbolic link of an existing
- * object name path.
- *
- * Expected Result:
- * symlink() should return value 0 on success and symbolic link of an
- * existing object should be created.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.
- *
- * Usage: <for command-line>
- * symlink01 [-c n] [-e] [-f] [-i n] [-I x] [-p x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * History
- * 07/2001 John George
- * -Ported
- *
- * Restrictions:
- * None.
- *
- */
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/stat.h>
-#include "test.h"
-#include "usctest.h"
-
-#define TESTFILE "testfile"
-#define SYMFILE "slink_file"
-#define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
-
-const char *TCID="symlink01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int exp_enos[]={0};
-
-extern void setup(); /* Setup function for the test */
-void cleanup() __attribute__((noreturn));/* Cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- struct stat stat_buf; /* stat structure buffer */
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- /*NOTREACHED*/
- }
-
- /* Perform global setup for test */
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call symlink(2) to create a symlink of
- * testfile.
- */
- TEST(symlink(TESTFILE, SYMFILE));
-
- /* Check return code of symlink(2) */
- if (TEST_RETURN == -1) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "symlink(%s, %s) Failed, errno=%d : %s",
- TESTFILE, SYMFILE, TEST_ERRNO,
- strerror(TEST_ERRNO));
- } else {
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- /*
- * Get the symlink file status information
- * using lstat(2).
- */
- if (lstat(SYMFILE, &stat_buf) < 0) {
- tst_brkm(TFAIL, cleanup, "lstat(2) of "
- "%s failed, error:%d", SYMFILE,
- errno);
- /*NOTREACHED*/
- }
-
- /* Check if the st_mode contains a link */
- if (!S_ISLNK(stat_buf.st_mode)) {
- tst_resm(TFAIL,
- "symlink of %s doesn't exist",
- TESTFILE);
- } else {
- tst_resm(TPASS, "symlink(%s, %s) "
- "functionality successful",
- TESTFILE, SYMFILE);
- }
- } else {
- tst_resm(TPASS, "Call succeeded");
- }
- }
-
- /* Unlink the symlink file for next loop */
- if (unlink(SYMFILE) == -1) {
- tst_brkm(TBROK, cleanup,
- "unlink(%s) Failed, errno=%d : %s",
- SYMFILE, errno, strerror(errno));
- /*NOTREACHED*/
- }
- Tst_count++; /* incr TEST_LOOP counter */
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
- /*NOTREACHED*/
-
-} /* End main */
-
-/*
- * void
- * setup() - performs all ONE TIME setup for this test.
- * Create a temporary directory and change directory to it.
- * Create a test file under temporary directory and close it
- */
-void
-setup()
-{
- int fd; /* file handle for testfile */
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified
- * TEST_PAUSE contains the code to fork the test with the -i option.
- * You want to make sure you do this before you create your temporary
- * directory.
- */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* creat/open a testfile */
- if ((fd = open(TESTFILE, O_RDWR|O_CREAT, FILE_MODE)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, %#o) Failed, errno=%d : %s",
- TESTFILE, FILE_MODE, errno, strerror(errno));
- /*NOTREACHED*/
- }
-
- /* Close the temporary file created above */
- if (close(fd) == -1) {
- tst_resm(TBROK, "close(%s) Failed, errno=%d : %s",
- TESTFILE, errno, strerror(errno));
- }
-} /* End setup() */
-
-
-/*
- * void
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Remove the test directory and testfile created in the setup.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/symlink05.c b/winsup/testsuite/winsup.api/ltp/symlink05.c
deleted file mode 100644
index 3b2bbcb..0000000
--- a/winsup/testsuite/winsup.api/ltp/symlink05.c
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name : symlink02
- *
- * Test Description :
- * Verify that, symlink will succeed to creat a symbolic link of an
- * non-existing object name path.
- *
- * Expected Result:
- * symlink() should return value 0 on success and symlink of an
- * non-existing object should be created.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.
- *
- * Usage: <for command-line>
- * symlink02 [-c n] [-e] [-f] [-i n] [-I x] [-p x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * History
- * 07/2001 John George
- * -Ported
- *
- * Restrictions:
- * This test should be run by 'non-super-user' only.
- *
- */
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/stat.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define TESTFILE "testfile"
-#define SYMFILE "slink_file"
-
-const char *TCID="symlink02"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int exp_enos[]={0};
-
-extern void setup(); /* Setup function for the test */
-void cleanup() __attribute__((noreturn));/* Cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- struct stat stat_buf; /* stat structure buffer */
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- /*NOTREACHED*/
- }
-
- /* Perform global setup for test */
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call symlink(2) to create a symlink of
- * an non-existing testfile.
- */
- TEST(symlink(TESTFILE, SYMFILE));
-
- /* Check return code of symlink(2) */
- if (TEST_RETURN == -1) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, \
- "symlink(%s, %s) Failed, errno=%d : %s",
- TESTFILE, SYMFILE, TEST_ERRNO,
- strerror(TEST_ERRNO));
- } else {
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- /*
- * Get the symlink file status information
- * using lstat(2).
- */
- if (lstat(SYMFILE, &stat_buf) < 0) {
- tst_brkm(TFAIL, cleanup, "lstat(2) of "
- "%s failed, error:%d",
- SYMFILE, errno);
- /*NOTREACHED*/
- }
-
- /* Check if the st_mode contains a link */
- if (!S_ISLNK(stat_buf.st_mode)) {
- tst_resm(TFAIL, \
- "symlink of %s doesn't exist",
- TESTFILE);
- } else {
- tst_resm(TPASS, "symlink(%s, %s) "
- "functionality successful",
- TESTFILE, SYMFILE);
- }
- } else {
- tst_resm(TPASS, "Call succeeded");
- }
- }
-
- /* Unlink the symlink file for next loop */
- if (unlink(SYMFILE) == -1) {
- tst_brkm(TBROK, cleanup,
- "unlink(%s) Failed, errno=%d : %s",
- SYMFILE, errno, strerror(errno));
- }
- Tst_count++; /* incr TEST_LOOP counter */
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
- /*NOTREACHED*/
-
-} /* End main */
-
-/*
- * void
- * setup() - performs all ONE TIME setup for this test.
- * Create a temporary directory and change directory to it.
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified
- * TEST_PAUSE contains the code to fork the test with the -i option.
- * You want to make sure you do this before you create your temporary
- * directory.
- */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
-} /* End setup() */
-
-
-/*
- * void
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Remove the temporary directory created in the setup.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/sync01.c b/winsup/testsuite/winsup.api/ltp/sync01.c
deleted file mode 100644
index c7df322..0000000
--- a/winsup/testsuite/winsup.api/ltp/sync01.c
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : sync01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for sync(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) sync(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the sync(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * sync(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="sync01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call sync(2)
- */
- TEST_VOID(sync());
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "sync() Failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "sync() returned %d", TEST_RETURN);
- }
- }
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/sync02.c b/winsup/testsuite/winsup.api/ltp/sync02.c
deleted file mode 100644
index 5535e1a..0000000
--- a/winsup/testsuite/winsup.api/ltp/sync02.c
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: sync01
- *
- * Test Description:
- * Open a file for write; modify the file, then do a sync().
- * Verify that the data has been written to disk by re-opening the file.
- *
- * Expected Result:
- * sync() alawys returns 0 in Linux. The data written to the file should
- * be updated to the disk.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.
- *
- * Usage: <for command-line>
- * sync01 [-c n] [-f] [-i n] [-I x] [-p x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * History
- * 07/2001 John George
- * -Ported
- *
- * Restrictions:
- * None.
- */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/stat.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define TEMP_FILE "temp_file"
-#define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
-
-const char *TCID="sync01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-char write_buffer[BUFSIZ]; /* buffer used to write data to file*/
-int fildes; /* file descriptor for temporary file */
-
-void setup(); /* Main setup function of test */
-void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- char read_buffer[BUFSIZ]; /* buffer used to read data from file*/
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- /* Perform global setup for test */
- setup();
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call sync(2) to commit buffer data to disk.
- */
- TEST_VOID(sync());
-
- if (TEST_RETURN == -1) {
- tst_resm(TFAIL, "%s, Failed, errno=%d : %s",
- TCID, TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- /* Set the file ptr to b'nning of file */
- if (lseek(fildes, 0, SEEK_SET) < 0) {
- tst_brkm(TFAIL, cleanup, "lseek() "
- "failed on %s, error=%d",
- TEMP_FILE, errno);
- /*NOTREACHED*/
- }
-
- /* Read the contents of file */
- if (read(fildes, read_buffer, \
- sizeof(read_buffer)) > 0) {
- if (memcmp(read_buffer, write_buffer, strlen(write_buffer))) {
- tst_resm(TFAIL, "Data read "
- "from %s doesn't match "
- "with witten data",
- TEMP_FILE);
- } else {
- tst_resm(TPASS, "Functionality "
- "of sync() successful");
- }
- } else {
- tst_brkm(TFAIL, cleanup,
- "read() Fails on %s, error=%d",
- TEMP_FILE, errno);
- /*NOTREACHED*/
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
- }
- Tst_count++; /* incr. TEST_LOOP counter */
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
- /*NOTREACHED*/
-
-} /* End main */
-
-/*
- * void
- * setup() - performs all ONE TIME setup for this test.
- * Create a temporary directory and change directory to it.
- * Create a test file under temporary directory and write some
- * data into it.
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified
- * TEST_PAUSE contains the code to fork the test with the -i option.
- * You want to make sure you do this before you create your temporary
- * directory.
- */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Copy some data into data buffer */
- strcpy(write_buffer, "abcdefghijklmnopqrstuvwxyz");
-
- /* Creat a temporary file under above directory */
- if ((fildes = open(TEMP_FILE, O_RDWR | O_CREAT, FILE_MODE)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR | O_CREAT, %#o) Failed, errno=%d :%s",
- TEMP_FILE, FILE_MODE, errno, strerror(errno));
- /*NOTREACHED*/
- }
-
- /* Write the buffer data into file */
- if (write(fildes, write_buffer, strlen(write_buffer)) != \
- (int)strlen(write_buffer)) {
- tst_brkm(TBROK, cleanup,
- "write() failed to write buffer data to %s",
- TEMP_FILE);
- /*NOTREACHED*/
- }
-
-} /* End setup() */
-
-/*
- * void
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Remove the test directory and testfile created in the setup.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Close the temporary file */
- if (close(fildes) == -1) {
- tst_brkm(TFAIL, NULL,
- "close(%s) Failed, errno=%d : %s",
- TEMP_FILE, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/time01.c b/winsup/testsuite/winsup.api/ltp/time01.c
deleted file mode 100644
index c5658e2..0000000
--- a/winsup/testsuite/winsup.api/ltp/time01.c
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : time01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for time(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) time(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the time(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * time(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <time.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="time01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call time(2)
- */
- TEST(time(0));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "time(0) Failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "time(0) returned %d", TEST_RETURN);
- }
- }
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- void trapper();
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/time02.c b/winsup/testsuite/winsup.api/ltp/time02.c
deleted file mode 100644
index 011546e..0000000
--- a/winsup/testsuite/winsup.api/ltp/time02.c
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: time01
- *
- * Test Description:
- * Verify that time(2) returns the value of time in seconds since
- * the Epoch and stores this value in the memory pointed to by the parameter.
- *
- * Expected Result:
- * time() should return the time (seconds) since the Epoch and this value
- * should be equal to the value stored in the specified parameter.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- * Usage: <for command-line>
- * time01 [-c n] [-e] [-f] [-i n] [-I x] [-p x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * History
- * 07/2001 John George
- * -Ported
- *
- * Restrictions:
- * None.
- *
- */
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <time.h>
-#include <sys/types.h>
-
-#include "test.h"
-#include "usctest.h"
-
-extern void setup(); /* setup function for the test */
-void cleanup(void) __attribute__((noreturn));/* cleanup function for the test */
-
-const char *TCID="time01"; /* Test program identifier. */
-int TST_TOTAL = 1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int exp_enos[]={0};
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- time_t tloc; /* time_t variables for time(2) */
-
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /* Perform global setup for test */
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /* Check looping state if -i option given */
- for (lc=0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call time() to get the time in seconds
- * since Epoch.
- */
- TEST(time(&tloc));
-
- /* Check return code from time(2) */
- if (TEST_RETURN == -1) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "time(0) Failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /*
- * Perform functional verification if test executed
- * without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- if (tloc == TEST_RETURN) {
- tst_resm(TPASS, "time() returned value "
- "%d, stored value %d are same",
- TEST_RETURN, tloc);
- } else {
- tst_resm(TFAIL, "time() returned value "
- "%d, stored value %d are "
- "different", TEST_RETURN, tloc);
- }
- } else {
- tst_resm(TPASS, "call succeeded");
- }
-
- }
- Tst_count++; /* incr. TEST_LOOP counter */
- } /* End for TEST_LOOPING */
-
- /* cleanup and exit */
- cleanup();
- /*NOTREACHED*/
-
-} /* End main */
-
-/*
- * setup() - performs all ONE TIME setup for this test.
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/times01.c b/winsup/testsuite/winsup.api/ltp/times01.c
deleted file mode 100644
index a1bd1d8..0000000
--- a/winsup/testsuite/winsup.api/ltp/times01.c
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : times01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for times(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) times(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the times(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * times(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/times.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="times01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-struct tms mytimes;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call times(2)
- */
- TEST(times(&mytimes));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "times(&mytimes) Failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "times(&mytimes) returned %d", TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- void trapper();
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/times02.c b/winsup/testsuite/winsup.api/ltp/times02.c
deleted file mode 100644
index 1dae36c..0000000
--- a/winsup/testsuite/winsup.api/ltp/times02.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * times02.c
- *
- * DESCRIPTION
- * Testcase to test that times() sets errno correctly
- *
- * ALGORITHM
- * block1: Pass an invalid address as the "tms" structure, and expect
- * that times() would return EFAULT.
- *
- * USAGE: <for command-line>
- * times02 [-c n] [-e] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * History
- * 07/2001 John George
- * -Ported
- *
- * Restrictions
- * NONE
- */
-
-#include <sys/times.h>
-#include <errno.h>
-#include <test.h>
-#include <usctest.h>
-
-const char *TCID = "times02";
-int TST_TOTAL = 1;
-extern int Tst_count;
-int exp_enos[]={EFAULT, 0};
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-
-int
-main(int argc, char **argv)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /* parse standard options */
- if ((msg = parse_opts(argc, argv, (option_t *)NULL, NULL)) !=
- (char *)NULL) {
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- setup();
-
- /* check for looping state if -i option is given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
- TEST(times((void *)-1));
- if (TEST_RETURN == -1) {
- TEST_ERROR_LOG(TEST_ERRNO);
- if (errno != EFAULT) {
- tst_resm(TFAIL, "Expected EFAULT, got %d",
- errno);
- } else {
- tst_resm(TPASS, "Received EFAULT as expected");
- }
-
- } else {
- tst_resm(TFAIL, "times(2) failed to FAIL");
- }
-
- }
- cleanup();
- /*NOTREACHED*/
-}
-
-/*
- * setup()
- * performs all ONE TIME setup for this test
- */
-void
-setup(void)
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /* Pause if that option was specified
- * TEST_PAUSE contains the code to fork the test with the -c option.
- */
- TEST_PAUSE;
-}
-
-/*
- * cleanup()
- * performs all ONE TIME cleanup for this test at
- * completion or premature exit
- */
-void
-cleanup(void)
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
- /*NOTREACHED*/
-}
diff --git a/winsup/testsuite/winsup.api/ltp/times03.c b/winsup/testsuite/winsup.api/ltp/times03.c
deleted file mode 100644
index 453d311..0000000
--- a/winsup/testsuite/winsup.api/ltp/times03.c
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * times01.c
- *
- * DESCRIPTION
- * Testcase to check the basic functionality of the times() system call.
- *
- * ALGORITHM
- * This testcase checks the values that times(2) system call returns.
- * Start a process, and spend some CPU time by performing a spin in
- * a for-loop. Then use the times() system call, to determine the
- * cpu time/sleep time, and other statistics.
- *
- * USAGE: <for command-line>
- * times01 [-c n] [-f] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * History
- * 07/2001 John George
- * -Ported
- *
- * Restrictions
- * NONE
- */
-
-#include <sys/types.h>
-#include <sys/times.h>
-#include <errno.h>
-#include <sys/wait.h>
-#include <test.h>
-#include <usctest.h>
-
-const char *TCID = "times01";
-int TST_TOTAL = 1;
-extern int Tst_count;
-int exp_enos[]={0};
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-
-int
-main(int argc, char **argv)
-{
- const char *msg; /* message returned from parse_opts */
-
- struct tms buf1, buf2;
- time_t start_time, end_time;
- int i, pid2, status, fail=0;
-
- /* parse standard options */
- if ((msg = parse_opts(argc, argv, (option_t *)NULL, NULL)) !=
- (char *)NULL) {
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- setup();
-
-
- for (i = 0; i < 1000000; i++);
- /*
- * At least some CPU time must be used. This is
- * achieved by executing the times(2) call for
- * atleast 5 secs. This logic makes it independant
- * of the processor speed.
- */
- start_time = time(NULL);
- for (;;) {
- if (times(&buf1) == (clock_t)-1) {
- TEST_ERROR_LOG(errno);
- tst_resm(TFAIL, "Call to times(2) "
- "failed, errno = %d", errno);
- }
- end_time = time(NULL);
- if ((end_time - start_time) > 5) {
- break;
- }
- }
- if (times(&buf1) == (clock_t)-1) {
- TEST_ERROR_LOG(errno);
- tst_resm(TFAIL, "Call to times(2) failed, "
- "errno = %d", errno);
- } else {
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- if (buf1.tms_utime == 0) {
- tst_resm(TFAIL, "Error: times() report "
- "0 user time");
- fail=1;
- }
- if (buf1.tms_stime == 0) {
- tst_resm(TFAIL, "Error: times() report "
- "0 system time");
- fail=1;
- }
- if (buf1.tms_cutime != 0) {
- tst_resm(TFAIL, "Error: times() report "
- "%d child user time",
- buf1.tms_cutime);
- fail=1;
- }
- if (buf1.tms_cstime != 0) {
- tst_resm(TFAIL, "Error: times() report " "%d child system time",
- buf1.tms_cstime);
- fail=1;
- }
-
- pid2 = fork();
- if (pid2 < 0) {
- tst_brkm(TFAIL, cleanup, "Fork failed");
- /*NOTREACHED*/
- } else if (pid2 == 0) {
- for (i = 0; i < 2000000; i++);
- /*
- * Atleast some CPU time must be used
- * even in the child process (thereby
- * making it independent of the
- * processor speed). In fact the child
- * uses twice as much CPU time.
- */
- start_time = time(NULL);
- for (;;) {
- if (times(&buf2) == (clock_t)-1) {
- tst_resm(TFAIL,
- "Call to times "
- "failed, "
- "errno = %d",
- errno);
- exit(1);
- }
- end_time = time(NULL);
- if ((end_time - start_time)
- > 10) {
- break;
- }
- }
- exit(0);
- }
- waitpid(pid2, &status, 0);
- if (WEXITSTATUS(status) != 0) {
- tst_resm(TFAIL, "Call to times(2) "
- "failed in child");
- }
- if (times(&buf2) == (clock_t)-1) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "Call to times failed "
- "errno = %d", errno);
- fail=1;
- }
- if (buf1.tms_utime > buf2.tms_utime) {
- tst_resm(TFAIL, "Error: parents's "
- "user time(%d) before child "
- "> parent's user time (%d) "
- "after child",
- buf1.tms_utime,
- buf2.tms_utime);
- fail=1;
- }
- if (buf2.tms_cutime == 0) {
- tst_resm(TFAIL, "Error: times() "
- "report %d child user "
- "time should be > than "
- "zero", buf2.tms_cutime);
- fail=1;
- }
- if (buf2.tms_cstime == 0) {
- tst_resm(TFAIL, "Error: times() "
- "report %d child system time "
- "should be > than zero",
- buf2.tms_cstime);
- fail=1;
- }
- if (fail == 0) {
- tst_resm(TPASS, "%s: Functionality "
- "test passed", TCID);
- }
-
- } else {
- tst_resm(TPASS, "%s call succeeded", TCID);
- }
- }
- cleanup();
- /*NOTREACHED*/
-}
-
-/*
- * setup()
- * performs all ONE TIME setup for this test
- */
-void
-setup(void)
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /* Pause if that option was specified
- * TEST_PAUSE contains the code to fork the test with the -c option.
- */
- TEST_PAUSE;
-}
-
-/*
- * cleanup()
- * performs all ONE TIME cleanup for this test at
- * completion or premature exit
- */
-void
-cleanup(void)
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
- /*NOTREACHED*/
-}
diff --git a/winsup/testsuite/winsup.api/ltp/truncate01.c b/winsup/testsuite/winsup.api/ltp/truncate01.c
deleted file mode 100644
index 1e29316..0000000
--- a/winsup/testsuite/winsup.api/ltp/truncate01.c
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: truncate01
- *
- * Test Description:
- * Verify that, truncate(2) succeeds to truncate a file to a specified
- * length.
- *
- * Expected Result:
- * truncate(2) should return a value 0 and the length of the file after
- * truncation should be equal to the length it is truncated to.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.
- *
- * Usage: <for command-line>
- * truncate01 [-c n] [-e] [-f] [-i n] [-I x] [-p x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * History
- * 07/2001 John George
- * -Ported
- *
- * Restrictions:
- * This test should be run by 'non-super-user' only.
- *
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define TESTFILE "testfile" /* file under test */
-#define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
-#define BUF_SIZE 256 /* buffer size */
-#define FILE_SIZE 1024 /* test file size */
-#define TRUNC_LEN 256 /* truncation length */
-
-const char *TCID="truncate01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test conditions */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int exp_enos[]={0};
-
-void setup(); /* setup function for the test */
-void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- struct stat stat_buf; /* stat(2) struct contents */
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- off_t file_length; /* test file length */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /* Perform global setup for test */
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count = 0;
-
- /*
- * Call truncate(2) to truncate a test file to a
- * specified length.
- */
- TEST(truncate(TESTFILE, TRUNC_LEN));
-
- /* check return code of truncate(2) */
- if (TEST_RETURN == -1) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL,
- "truncate(%s, %d) Failed, errno=%d : %s",
- TESTFILE, TRUNC_LEN, TEST_ERRNO,
- strerror(TEST_ERRNO));
- } else {
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- /*
- * Get the testfile information using
- * stat(2).
- */
- if (stat(TESTFILE, &stat_buf) < 0) {
- tst_brkm(TFAIL, cleanup, "stat(2) of "
- "%s failed, error:%d",
- TESTFILE, errno);
- /*NOTREACHED*/
- }
- stat_buf.st_mode &= ~S_IFREG;
- file_length = stat_buf.st_size;
-
- /*
- * Check for expected size of testfile after
- * truncate(2) on it.
- */
- if (file_length != TRUNC_LEN) {
- tst_resm(TFAIL, "%s: Incorrect file "
- "size %d, Expected %d",
- TESTFILE, file_length,
- TRUNC_LEN);
- } else {
- tst_resm(TPASS, "Functionality of "
- "truncate(%s, %d) successful",
- TESTFILE, TRUNC_LEN);
- }
- } else {
- tst_resm(TPASS, "%s call succeeded", TCID);
- }
- }
- Tst_count++; /* incr TEST_LOOP counter */
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
- /*NOTREACHED*/
-
-} /* End main */
-
-/*
- * void
- * setup() - performs all ONE TIME setup for this test.
- * Create a temporary directory and change directory to it.
- * Fill the buffer with some arbitrary data to be written to a file.
- * Create a test file under temporary directory and close it
- * write arbitrary data into testfile.
- */
-void
-setup()
-{
- int fd, i; /* file handler for testfile */
- int c, c_total = 0; /* no. bytes to be written to file */
- char tst_buff[BUF_SIZE]; /* buffer to hold data */
-
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
-
- /* Pause if that option was specified
- * TEST_PAUSE contains the code to fork the test with the -i option.
- * You want to make sure you do this before you create your temporary
- * directory.
- */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Fill the test buffer with the known data */
- for (i = 0; i < BUF_SIZE; i++) {
- tst_buff[i] = 'a';
- }
-
- /* Creat a testfile under temporary directory */
- if ((fd = open(TESTFILE, O_RDWR|O_CREAT, FILE_MODE)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, %o) Failed, errno=%d : %s",
- TESTFILE, FILE_MODE, errno, strerror(errno));
- /*NOTREACHED*/
- }
-
- /* Write to the file 1k data from the buffer */
- while (c_total < FILE_SIZE) {
- if ((c = write(fd, tst_buff, sizeof(tst_buff))) <= 0) {
- tst_brkm(TBROK, cleanup,
- "write(2) on %s Failed, errno=%d : %s",
- TESTFILE, errno, strerror(errno));
- /*NOTREACHED*/
- } else {
- c_total += c;
- }
- }
-
- /* Close the testfile after writing data into it */
- if (close(fd) == -1) {
- tst_brkm(TBROK, cleanup,
- "close(%s) Failed, errno=%d : %s",
- TESTFILE, errno, strerror(errno));
- /*NOTREACHED*/
- }
-} /* End setup() */
-
-/*
- * void
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Remove the test directory and testfile created in the setup.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/truncate02.c b/winsup/testsuite/winsup.api/ltp/truncate02.c
deleted file mode 100644
index 4ba8029..0000000
--- a/winsup/testsuite/winsup.api/ltp/truncate02.c
+++ /dev/null
@@ -1,335 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Test Name: truncate02
- *
- * Test Description:
- * Verify that, truncate(2) succeeds to truncate a file to a certain length,
- * but the attempt to read past the truncated length will fail.
- *
- * Expected Result:
- * truncate(2) should return a value 0 and the attempt to read past the
- * truncated length will fail. In case where the file before truncation was
- * shorter, the bytes between the old and new should be all zeroes.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Create temporary directory.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- * Delete the temporary directory created.
- *
- * Usage: <for command-line>
- * truncate02 [-c n] [-e] [-f] [-i n] [-I x] [-p x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * History
- * 07/2001 John George
- * -Ported
- *
- * Restrictions:
- * This test should be run by 'non-super-user' only.
- *
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-
-#include "test.h"
-#include "usctest.h"
-
-#define TESTFILE "testfile" /* file under test */
-#define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
-#define BUF_SIZE 256 /* buffer size */
-#define FILE_SIZE 1024 /* test file size */
-#define TRUNC_LEN1 256 /* truncation length */
-#define TRUNC_LEN2 512 /* truncation length */
-
-const char *TCID="truncate02"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test conditions */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int fd; /* file descriptor of testfile */
-char tst_buff[BUF_SIZE]; /* buffer to hold testfile contents */
-int exp_enos[]={0};
-
-void setup(); /* setup function for the test */
-void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- struct stat stat_buf; /* stat(2) struct contents */
- int lc, i; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- off_t file_length2; /* test file length */
- off_t file_length1; /* test file length */
- int rbytes; /* bytes read from testfile */
- int read_len = 0; /* total no. of bytes read from testfile */
- int err_flag = 0; /* error indicator flag */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /* Perform global setup for test */
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count = 0;
-
- /*
- * Call truncate(2) to truncate a test file to a
- * specified length (TRUNC_LEN1).
- */
- TEST(truncate(TESTFILE, TRUNC_LEN1));
-
- /* check return code of truncate(2) */
- if (TEST_RETURN == -1) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, \
- "truncate(%s, %d) Failed, errno=%d : %s",
- TESTFILE, TRUNC_LEN1, TEST_ERRNO,
- strerror(TEST_ERRNO));
- } else {
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- /*
- * Get the testfile information using
- * stat(2).
- */
- if (stat(TESTFILE, &stat_buf) < 0) {
- tst_brkm(TFAIL, cleanup, "stat(2) of "
- "%s failed after 1st truncate, "
- "error:%d", TESTFILE, errno);
- /*NOTREACHED*/
- }
- file_length1 = stat_buf.st_size;
-
- /*
- * Set the file pointer of testfile to the
- * beginning of the file.
- */
- if (lseek(fd, 0, SEEK_SET) < 0) {
- tst_brkm(TFAIL, cleanup, "lseek(2) on "
- "%s failed after 1st truncate, "
- "error:%d", TESTFILE, errno);
- /*NOTREACHED*/
- }
-
- /* Read the testfile from the beginning. */
- while ((rbytes = read(fd, tst_buff, \
- sizeof(tst_buff))) > 0) {
- read_len += rbytes;
- }
-
- /*
- * Execute truncate(2) again to truncate
- * testfile to a size TRUNC_LEN2.
- */
- TEST(truncate(TESTFILE, TRUNC_LEN2));
-
- /* check return code of truncate(2) */
- if (TEST_RETURN == -1) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "truncate of %s to "
- "size %d Failed, errno=%d : %s",
- TESTFILE, TRUNC_LEN2,
- TEST_ERRNO,
- strerror(TEST_ERRNO));
- }
-
- /*
- * Get the testfile information using
- * stat(2)
- */
- if (stat(TESTFILE, &stat_buf) < 0) {
- tst_brkm(TFAIL, cleanup, "stat(2) of "
- "%s failed after 2nd truncate, "
- "error:%d", TESTFILE, errno);
- /*NOTREACHED*/
- }
- file_length2 = stat_buf.st_size;
-
- /*
- * Set the file pointer of testfile to the
- * offset TRUNC_LEN1 of testfile.
- */
- if (lseek(fd, TRUNC_LEN1, SEEK_SET) < 0) {
- tst_brkm(TFAIL, cleanup, "lseek(2) on "
- "%s failed after 2nd truncate, "
- "error:%d", TESTFILE, errno);
- /*NOTREACHED*/
- }
-
- /* Read the testfile contents till EOF */
- while((rbytes = read(fd, tst_buff, \
- sizeof(tst_buff))) > 0) {
- for (i = 0; i < rbytes; i++) {
- if (tst_buff[i] != 0) {
- err_flag++;
- }
- }
- }
-
- /*
- * Check for expected size of testfile after
- * issuing truncate(2) on it.
- */
- if ((file_length1 != TRUNC_LEN1) || \
- (file_length2 != TRUNC_LEN2) || \
- (read_len != TRUNC_LEN1) || \
- (err_flag != 0)) {
- tst_resm(TFAIL, "Functionality of "
- "truncate(2) on %s Failed",
- TESTFILE);
- } else {
- tst_resm(TPASS, \
- "Functionality of truncate(2) "
- "on %s successful", TESTFILE);
- }
- } else {
- tst_resm(TPASS, "%s call succeeded", TCID);
- }
- }
- Tst_count++; /* incr. TEST_LOOP counter */
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
- /*NOTREACHED*/
-
-} /* End main */
-
-/*
- * void
- * setup() - performs all ONE TIME setup for this test.
- * Create a temporary directory and change directory to it.
- * Create a test file under temporary directory and write some
- * data into it.
- */
-void
-setup()
-{
- int i; /* counter variable */
- int wbytes; /* bytes written to testfile */
- int write_len = 0; /* total no. of bytes written to testfile */
-
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified
- * TEST_PAUSE contains the code to fork the test with the -i option.
- * You want to make sure you do this before you create your temporary
- * directory.
- */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
-
- /* Fill the test buffer with the known data */
- for (i = 0; i < BUF_SIZE; i++) {
- tst_buff[i] = 'a';
- }
-
- /* Creat a testfile and write some data into it */
- if ((fd = open(TESTFILE, O_RDWR|O_CREAT, FILE_MODE)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT, %o) Failed, errno=%d : %s",
- TESTFILE, FILE_MODE, errno, strerror(errno));
- /*NOTREACHED*/
- }
-
- /* Write to the file 1k data from the buffer */
- while (write_len < FILE_SIZE) {
- if ((wbytes = write(fd, tst_buff, sizeof(tst_buff))) <= 0) {
- tst_brkm(TBROK, cleanup,
- "write(2) on %s Failed, errno=%d : %s",
- TESTFILE, errno, strerror(errno));
- } else {
- write_len += wbytes;
- }
- }
-} /* End setup() */
-
-/*
- * void
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- * Close the temporary file opened for reading/writing.
- * Remove the test directory and testfile created in the setup.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Close the testfile after writing data into it */
- if (close(fd) == -1) {
- tst_brkm(TFAIL, NULL,
- "close(%s) Failed, errno=%d : %s",
- TESTFILE, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/ulimit01.c b/winsup/testsuite/winsup.api/ltp/ulimit01.c
deleted file mode 100644
index c3f09fb..0000000
--- a/winsup/testsuite/winsup.api/ltp/ulimit01.c
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : ulimit01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for ulimit(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 6
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) ulimit(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * The libcuts.a and libsys.a libraries must be included in
- * the compilation of this test.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the ulimit(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * ulimit(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <ulimit.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-
-
-const char *TCID="ulimit01"; /* Test program identifier. */
-int TST_TOTAL=6; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int cmd;
-long limit; /* saved limit */
-
-struct limits_t {
- int cmd;
- long newlimit;
- int nlim_flag; /* special flag for UL_SETFSIZE records */
- int exp_fail;
-} Scenarios[] = {
-
- { UL_GETFSIZE, -1, 0, 0 },
- { UL_SETFSIZE, -1, 0, 1 }, /* negative test */
- { UL_SETFSIZE, -2, 1, 0 }, /* case case: must be after UL_GETFSIZE */
- { UL_SETFSIZE, -2, 2, 0 }, /* case case: must be after UL_GETFSIZE */
-
-#if UL_GMEMLIM
- { UL_GMEMLIM, -1, 0, 0 },
-#endif
-#if UL_GDESLIM
- { UL_GDESLIM, -1, 0, 0 },
-#endif
-#if UL_GSHMEMLIM
- { UL_GSHMEMLIM, -1, 0, 0 },
-#endif
-
-};
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- int i; /* inner loop (test case) counter */
- const char *msg; /* message returned from parse_opts */
- int tmp;
-
- TST_TOTAL = sizeof(Scenarios)/sizeof(struct limits_t);
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- for ( i=0; i<TST_TOTAL; i++) {
-
- cmd=Scenarios[i].cmd;
- limit=Scenarios[i].newlimit;
-
- /*
- * Call ulimit(2)
- */
- TEST(ulimit(cmd, limit));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- if ( Scenarios[i].exp_fail ) {
- if ( STD_FUNCTIONAL_TEST ) {
- tst_resm(TPASS, "ulimit(%d, %d) Failed, errno=%d : %s", cmd, limit,
- TEST_ERRNO, strerror(TEST_ERRNO));
- }
- } else {
- tst_resm(TFAIL, "ulimit(%d, %d) Failed, errno=%d : %s", cmd, limit,
- TEST_ERRNO, strerror(TEST_ERRNO));
- }
- } else {
- if ( Scenarios[i].exp_fail ) {
- tst_resm(TFAIL, "ulimit(%d, %d) returned %d",
- cmd, limit, TEST_RETURN);
- } else if ( STD_FUNCTIONAL_TEST ) {
- tst_resm(TPASS, "ulimit(%d, %d) returned %d",
- cmd, limit, TEST_RETURN);
- }
-
- /*
- * Save the UL_GETFSIZE return value in the newlimit field
- * for UL_SETFSIZE test cases.
- */
- if ( cmd == UL_GETFSIZE ) {
- for (tmp=i+1; tmp<TST_TOTAL; tmp++) {
- if ( Scenarios[tmp].nlim_flag == 1 ) {
- Scenarios[tmp].newlimit = TEST_RETURN;
- }
- if ( Scenarios[tmp].nlim_flag == 2 ) {
- Scenarios[tmp].newlimit = TEST_RETURN-1;
- }
- }
- }
- }
- }
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/umask01.c b/winsup/testsuite/winsup.api/ltp/umask01.c
deleted file mode 100644
index fb86f0d..0000000
--- a/winsup/testsuite/winsup.api/ltp/umask01.c
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : umask01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for umask(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) umask(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the umask(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * umask(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="umask01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call umask(2)
- */
- TEST(umask(022));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "umask(022) Failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "umask(022) returned %d", TEST_RETURN);
- }
- }
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- void trapper();
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/umask02.c b/winsup/testsuite/winsup.api/ltp/umask02.c
deleted file mode 100644
index 9a1c61c..0000000
--- a/winsup/testsuite/winsup.api/ltp/umask02.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * umask02.c
- *
- * DESCRIPTION
- * Check that umask changes the mask, and that the previous
- * value of the mask is returned correctly for each value.
- *
- * ALGORITHM
- * For each mask value (9 bits) set mask, and check that the return
- * corresponds to the previous value set.
- *
- * USAGE: <for command-line>
- * umask02 [-c n] [-e] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * History
- * 07/2001 John George
- * -Ported
- *
- * Restrictions
- * None
- */
-
-#include <sys/stat.h>
-#include "test.h"
-#include "usctest.h"
-
-const char *TCID = "umask02";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-
-int
-main(int argc, char **argv)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- int uret = 0, i, mskval = 0000;
-
- /* parse standard options */
- if ((msg = parse_opts(argc, argv, (option_t *)NULL, NULL)) !=
- (char *) NULL) {
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- setup();
-
- /* Check for looping state if -i option is given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
- for (umask(++mskval), i = 1; mskval < 01000;
- uret = umask(++mskval), i++) {
- if ((uret != mskval - 1) && (mskval != 0000)) {
- tst_brkm(TBROK, cleanup, "bad mask value "
- "returned");
- /*NOTREACHED*/
- } else {
- tst_resm(TPASS, "umask(%d) susuccessfully "
- "returned %d.", mskval, uret);
- }
- }
- mskval = 0000;
- uret = 0;
- tst_resm(TINFO, "end of loop %d\n", lc);
- }
- cleanup();
- /*NOTREACHED*/
-}
-
-/*
- * setup()
- * performs all ONE TIME setup for this test
- */
-void
-setup(void)
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified
- * TEST_PAUSE contains the code to fork the test with the -c option.
- */
- TEST_PAUSE;
-}
-
-/*
- * cleanup()
- * performs all ONE TIME cleanup for this test at
- * completion or premature exit
- */
-void
-cleanup(void)
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
- /*NOTREACHED*/
-}
diff --git a/winsup/testsuite/winsup.api/ltp/umask03.c b/winsup/testsuite/winsup.api/ltp/umask03.c
deleted file mode 100644
index 341da75..0000000
--- a/winsup/testsuite/winsup.api/ltp/umask03.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * umask01.c
- *
- * DESCRIPTION
- * Check that umask changes the mask, and that the previous
- * value of the mask is returned correctly for each value.
- *
- * ALGORITHM
- * For each mask value (9 bits) set mask, and check that the return
- * corresponds to the previous value set.
- *
- * USAGE: <for command-line>
- * umask01 [-c n] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * History
- * 07/2001 John George
- * -Ported
- *
- * Restrictions
- * None
- */
-
-#include "test.h"
-#include "usctest.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-const char *TCID = "umask01";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-char filname[40];
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-
-int
-main(int argc, char **argv)
-{
- int lc;
- const char *msg;
-
- struct stat statbuf;
- unsigned mskval = 0000;
- int fildes, i;
- unsigned low9mode;
-
- /* parse standard options */
- if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL))
- != (char *) NULL) {
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- setup(); /* global setup */
-
- /* check looping state if -i option is given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
- for (umask(mskval = 0077), i = 1; mskval < 01000;
- i++, umask(++mskval)) {
- unlink(filname);
- if ((fildes = creat(filname, 0777)) == -1) {
- tst_resm(TBROK, "cannot create "
- "file with mskval 0%o %d",
- mskval, mskval);
- } else {
- if (fstat(fildes, &statbuf) != 0) {
- tst_resm(TBROK, "cannot fstat file");
- } else {
- low9mode = statbuf.st_mode & 0777;
- if (low9mode != (~mskval & 0777)) {
- tst_brkm(TBROK, cleanup,
- "got %0 expected %o"
- "mask didnot take",
- low9mode,
- (~mskval & 0777));
- /*NOTREACHED*/
- } else {
- tst_resm(TPASS, "Test "
- "condition: %d, umask: "
- "0%o", i, mskval);
- }
- }
- }
- close(fildes);
- }
- }
- cleanup();
- /*NOTREACHED*/
-}
-
-/*
- * setup
- * performs all ONE TIME setup for this test
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
-
- /* Pause if that option was specified
- * TEST_PAUSE contains the code to fork the test with the -i option.
- * You want to make sure you do this before you create your temporary
- * directory.
- */
- TEST_PAUSE;
-
- /* make temp dir and cd to it */
- tst_tmpdir();
-
- sprintf(filname, "umask2.%d", getpid());
-}
-
-/*
- * cleanup
- * performs all ONE TIME cleanup for this test at completion or
- * premature exit
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified
- * print errno log if that option was specified
- */
- TEST_CLEANUP;
-
- /*
- * cleanup the temporary files and the temporary directory
- */
- unlink(filname);
- tst_rmdir();
-
- /*
- * exit with return code appropriate for results
- */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/uname01.c b/winsup/testsuite/winsup.api/ltp/uname01.c
deleted file mode 100644
index 36b1667..0000000
--- a/winsup/testsuite/winsup.api/ltp/uname01.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : uname01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for uname(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) uname(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the uname(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * uname(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/utsname.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="uname01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-struct utsname un;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call uname(2)
- */
- TEST(uname(&un));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "uname(&un) Failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "uname(&un) returned %d", TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- void trapper();
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/unlink05.c b/winsup/testsuite/winsup.api/ltp/unlink05.c
deleted file mode 100644
index 3aae0cf..0000000
--- a/winsup/testsuite/winsup.api/ltp/unlink05.c
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : unlink05
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for unlink(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) unlink(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the unlink(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * unlink(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-void create_file();
-
-
-
-const char *TCID="unlink05"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char fname[255];
-int fd;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call unlink(2)
- */
- TEST(unlink(fname));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "unlink(%s) Failed, errno=%d : %s", fname,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "unlink(%s) returned %d", fname, TEST_RETURN);
- }
- /* recreate file for next loop */
- create_file();
- }
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- create_file();
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-void
-create_file()
-{
- sprintf(fname,"tfile_%d",getpid());
- if ((fd = open(fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
- if (close(fd) == -1) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
-}
diff --git a/winsup/testsuite/winsup.api/ltp/unlink06.c b/winsup/testsuite/winsup.api/ltp/unlink06.c
deleted file mode 100644
index a62a268..0000000
--- a/winsup/testsuite/winsup.api/ltp/unlink06.c
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : unlink06
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : unlink(2) of a FIFO
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Richard Logan
- *
- * CO-PILOT : William Roske
- *
- * DATE STARTED : 03/30/94
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) unlink(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the unlink(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * unlink(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void create_file();
-void cleanup(void) __attribute__((noreturn));
-
-
-const char *TCID="unlink06"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char Fname[255];
-
-/***********************************************************************
- * Main
- ***********************************************************************/
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- create_file();
-
- /*
- * Call unlink(2)
- */
- TEST(unlink(Fname));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "unlink(%s) Failed, errno=%d : %s", Fname,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else if ( STD_FUNCTIONAL_TEST ) {
- if ( access(Fname, F_OK) != -1 ) {
- tst_resm(TFAIL,
- "unlink(%s) returned %d, but access says file still exists.",
- Fname, TEST_RETURN);
- }
- else {
- tst_resm(TPASS, "unlink(%s) returned %d", Fname, TEST_RETURN);
- }
- }
- else
- Tst_count++;
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- sprintf(Fname, "fifo_unlink%d", getpid());
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-
-} /* End cleanup() */
-
-/******************************************************************
- *
- ******************************************************************/
-void
-create_file()
-{
- if(mkfifo(Fname, 0777) == -1) {
- tst_brkm(TBROK, cleanup,
- "mkfifo(%s, 0777) failed errno:%d %s\n", Fname,
- errno, strerror(errno));
- }
-}
diff --git a/winsup/testsuite/winsup.api/ltp/unlink07.c b/winsup/testsuite/winsup.api/ltp/unlink07.c
deleted file mode 100644
index 1331096..0000000
--- a/winsup/testsuite/winsup.api/ltp/unlink07.c
+++ /dev/null
@@ -1,328 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : unlink07
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : unlink(2) negative testcases
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Richard Logan
- *
- * CO-PILOT : William Roske
- *
- * DATE STARTED : 03/30/94
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1-8) See Testcases structure below.
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the unlink(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * unlink(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/param.h> /* for PATH_MAX */
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-
-extern char *get_high_address();
-
-const char *TCID="unlink07"; /* Test program identifier. */
-int TST_TOTAL=6; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-int longpath_setup();
-int no_setup();
-int filepath_setup();
-char Longpathname[PATH_MAX+2];
-char High_address[64];
-
-struct test_case_t {
- const char *pathname;
- const char *desc;
- int exp_errno;
- int (*setupfunc)();
-} Test_cases[] = {
- { "nonexistfile", "non-existent file", ENOENT, no_setup},
- { "", "path is empty string", ENOENT, no_setup},
- { "nefile/file", "path contains a non-existent file",
- ENOENT, no_setup },
- { High_address, "address beyond address space", EFAULT, no_setup },
-#ifndef __CYGWIN__
- { "file/file", "path contains a regular file",
- ENOTDIR, filepath_setup },
-#endif
- { High_address, "address beyond address space", EFAULT, no_setup },
- { Longpathname, "pathname too long", ENAMETOOLONG, longpath_setup },
- { (char *)-1, "negative address", EFAULT, no_setup },
- { NULL, NULL, 0, no_setup }
-};
-
-/***********************************************************************
- * Main
- ***********************************************************************/
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- const char *fname;
- const char *desc;
- int ind;
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
-
- for (ind=0; Test_cases[ind].desc != NULL; ind++ ) {
-
- fname = Test_cases[ind].pathname;
- desc = Test_cases[ind].desc;
-
- if ( fname == High_address )
- fname = get_high_address();
-
- /*
- * Call unlink(2)
- */
- TEST(unlink(fname));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- if ( STD_FUNCTIONAL_TEST ) {
- if ( TEST_ERRNO == Test_cases[ind].exp_errno )
- tst_resm(TPASS, "unlink(<%s>) Failed, errno=%d",
- desc, TEST_ERRNO);
- else
- tst_resm(TFAIL,
- "unlink(<%s>) Failed, errno=%d, expected errno:%d",
- desc, TEST_ERRNO, Test_cases[ind].exp_errno);
- }
- else
- Tst_count++;
- } else {
- tst_resm(TFAIL,
- "unlink(<%s>) returned %d, expected -1, errno:%d",
- desc, TEST_RETURN, Test_cases[ind].exp_errno);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- int ind;
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- for (ind=0; Test_cases[ind].desc != NULL; ind++ ) {
- Test_cases[ind].setupfunc();
- }
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- chmod("unwrite_dir", 0777);
- chmod("unsearch_dir", 0777);
-
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-
-} /* End cleanup() */
-
-/******************************************************************
- *
- ******************************************************************/
-int
-no_setup()
-{
- return 0;
-}
-
-/******************************************************************
- *
- ******************************************************************/
-int
-longpath_setup()
-{
- int ind;
-
- for(ind=0; ind<= PATH_MAX+1; ind++) {
- Longpathname[ind] = 'a';
- }
- return 0;
-
-}
-/******************************************************************
- *
- ******************************************************************/
-int
-filepath_setup()
-{
- int fd;
-
- if ( (fd=creat("file", 0777)) == -1 ) {
- tst_brkm(TBROK, cleanup, "creat(file) failed, errno:%d %s",
- errno, strerror(errno));
- }
- close(fd);
- return 0;
-}
-
diff --git a/winsup/testsuite/winsup.api/ltp/unlink08.c b/winsup/testsuite/winsup.api/ltp/unlink08.c
deleted file mode 100644
index e793b46..0000000
--- a/winsup/testsuite/winsup.api/ltp/unlink08.c
+++ /dev/null
@@ -1,432 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : unlink08
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : unlink(2) negative testcases
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 3
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : Richard Logan
- *
- * CO-PILOT : William Roske
- *
- * DATE STARTED : 03/30/94
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1-3) See Testcases structure below.
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the unlink(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * unlink(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <signal.h>
-#include <string.h>
-#include "test.h"
-#include "usctest.h"
-
-void setup();
-void cleanup(void) __attribute__((noreturn));
-
-
-
-const char *TCID="unlink08"; /* Test program identifier. */
-int TST_TOTAL=3; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-int unwrite_dir_setup();
-int unsearch_dir_setup();
-int dir_setup();
-int no_setup();
-
-struct test_case_t {
- const char *pathname;
- const char *desc;
- int (*setupfunc)();
- int exp_ret; /* -1 means error, 0 means != -1 */
- int exp_errno;
-} Test_cases[] = {
- { "unwrite_dir/file", "unwritable directory", unwrite_dir_setup,
- -1, EACCES},
- { "unsearch_dir/file", "unsearchable directory", unsearch_dir_setup,
- -1, EACCES },
-#ifdef linux
- { "regdir", "directory", dir_setup, -1, EISDIR},
-#else
- { "regdir", "directory", dir_setup, -1, EPERM},
-#endif
-
- { NULL, NULL, no_setup, -1, 0 }
-};
-
-/***********************************************************************
- * Main
- ***********************************************************************/
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- const char *fname;
- const char *desc;
- int ind;
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
-
- for (ind=0; Test_cases[ind].desc != NULL; ind++ ) {
-
- fname = Test_cases[ind].pathname;
- desc = Test_cases[ind].desc;
-
- /*
- * Call unlink(2)
- */
- TEST(unlink(fname));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- if ( Test_cases[ind].exp_ret == -1 ) { /* neg test */
- if ( STD_FUNCTIONAL_TEST ) {
- if ( TEST_ERRNO == Test_cases[ind].exp_errno )
- tst_resm(TPASS, "unlink(<%s>) Failed, errno=%d",
- desc, TEST_ERRNO);
- else
- tst_resm(TFAIL,
- "unlink(<%s>) Failed, errno=%d, expected errno:%d",
- desc, TEST_ERRNO, Test_cases[ind].exp_errno);
- }
- else
- Tst_count++;
- }
- else {
- tst_resm(TFAIL, "unlink(<%s>) Failed, errno=%d",
- desc, TEST_ERRNO);
- }
- } else {
- if ( Test_cases[ind].exp_ret == -1 ) {
- tst_resm(TFAIL,
- "unlink(<%s>) returned %d, expected -1, errno:%d",
- desc, TEST_RETURN, Test_cases[ind].exp_errno);
- }
- else if ( STD_FUNCTIONAL_TEST ) {
- tst_resm(TPASS,
- "unlink(<%s>) returned %d",
- desc, TEST_RETURN);
- }
- else
- Tst_count++;
- Test_cases[ind].setupfunc(1);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- int ind;
- int postest = 0;
-
- /* capture signals */
- tst_sig(NOFORK, DEF_HANDLER, cleanup);
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- if ( geteuid() == 0 ) {
- postest++;
- }
-
- for (ind=0; Test_cases[ind].desc != NULL; ind++ ) {
- if ( Test_cases[ind].exp_errno == EACCES && postest )
- Test_cases[ind].exp_ret=0; /* set as a pos test */
- Test_cases[ind].setupfunc(0);
- }
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- chmod("unwrite_dir", 0777);
- chmod("unsearch_dir", 0777);
-
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-
-} /* End cleanup() */
-
-/******************************************************************
- *
- ******************************************************************/
-int
-unwrite_dir_setup(flag)
-int flag;
-{
- int fd;
-
- if ( ! flag ) { /* initial setup */
- if (mkdir("unwrite_dir", 0777) == -1 ) {
- tst_brkm(TBROK, cleanup,
- "mkdir(unwrite_dir, 0777) failed, errno:%d %s",
- errno, strerror(errno));
- }
-
- if ( (fd=creat("unwrite_dir/file", 0777)) == -1 ) {
- tst_brkm(TBROK, cleanup,
- "creat(unwrite_dir/file, 0777) failed, errno:%d %s",
- errno, strerror(errno));
- }
- close(fd);
-
- if ( chmod("unwrite_dir", 0555) == -1 ) {
- tst_brkm(TBROK, cleanup,
- "chmod(unwrite_dir, 0555) failed, errno:%d %s",
- errno, strerror(errno));
- }
- }
- else { /* resetup */
- if ( chmod("unwrite_dir", 0777) == -1 ) {
- tst_brkm(TBROK, cleanup,
- "chmod(unwrite_dir, 0777) failed, errno:%d %s",
- errno, strerror(errno));
- }
-
- if ( (fd=creat("unwrite_dir/file", 0777)) == -1 ) {
- tst_brkm(TBROK, cleanup,
- "creat(unwrite_dir/file, 0777) failed, errno:%d %s",
- errno, strerror(errno));
- }
- close(fd);
-
- if ( chmod("unwrite_dir", 0555) == -1 ) {
- tst_brkm(TBROK, cleanup,
- "chmod(unwrite_dir, 0555) failed, errno:%d %s",
- errno, strerror(errno));
- }
- }
- return 0;
-}
-
-/******************************************************************
- *
- ******************************************************************/
-int
-unsearch_dir_setup(flag)
-int flag;
-{
- int fd;
-
- if ( ! flag ) { /* initial setup */
- if (mkdir("unsearch_dir", 0777) == -1 ) {
- tst_brkm(TBROK, cleanup,
- "mkdir(unsearch_dir, 0777) failed, errno:%d %s",
- errno, strerror(errno));
- }
-
- if ( (fd=creat("unsearch_dir/file", 0777)) == -1 ) {
- tst_brkm(TBROK, cleanup,
- "creat(unsearch_dir/file, 0777) failed, errno:%d %s",
- errno, strerror(errno));
- }
- close(fd);
-
- if ( chmod("unsearch_dir", 0666) == -1 ) {
- tst_brkm(TBROK, cleanup,
- "chmod(unsearch_dir, 0666) failed, errno:%d %s",
- errno, strerror(errno));
- }
- }
- else { /* resetup */
- if ( chmod("unsearch_dir", 0777) == -1 ) {
- tst_brkm(TBROK, cleanup,
- "chmod(unsearch_dir, 0777) failed, errno:%d %s",
- errno, strerror(errno));
- }
-
- if ( (fd=creat("unsearch_dir/file", 0777)) == -1 ) {
- tst_brkm(TBROK, cleanup,
- "creat(unsearch_dir/file, 0777) failed, errno:%d %s",
- errno, strerror(errno));
- }
- close(fd);
-
- if ( chmod("unsearch_dir", 0666) == -1 ) {
- tst_brkm(TBROK, cleanup,
- "chmod(unsearch_dir, 0666) failed, errno:%d %s",
- errno, strerror(errno));
- }
- }
- return 0;
-}
-
-/******************************************************************
- *
- ******************************************************************/
-int
-dir_setup(flag)
-int flag;
-{
- if (mkdir("regdir", 0777) == -1 ) {
- tst_brkm(TBROK, cleanup,
- "mkdir(unwrite_dir, 0777) failed, errno:%d %s",
- errno, strerror(errno));
- }
- return 0;
-}
-
-/******************************************************************
- *
- ******************************************************************/
-int
-no_setup(flag)
-int flag;
-{
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/ltp/vfork01.c b/winsup/testsuite/winsup.api/ltp/vfork01.c
deleted file mode 100644
index 2792ce0..0000000
--- a/winsup/testsuite/winsup.api/ltp/vfork01.c
+++ /dev/null
@@ -1,400 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Name: vfork01
- *
- * Test Description:
- * Fork a process using vfork() and verify that, the attribute values like
- * euid, ruid, suid, egid, rgid, sgid, umask, inode and device number of
- * root and current working directories are same as that of the parent
- * process.
- *
- * Expected Result:
- * The attribute values like euid, ruid, suid, egid, rgid, sgid, umask, inode
- * and device number of root and current working directory of the parent and
- * child processes should be equal.
- *
- * Algorithm:
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise,
- * Verify the Functionality of system call
- * if successful,
- * Issue Functionality-Pass message.
- * Otherwise,
- * Issue Functionality-Fail message.
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- * Usage: <for command-line>
- * vfork01 [-c n] [-e] [-f] [-i n] [-I x] [-p x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * History
- * 07/2001 John George
- * -Ported
- *
- * Restrictions:
- * None.
- *
- */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-
-#include "test.h"
-#include "usctest.h"
-
-const char *TCID="vfork01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-int exp_enos[]={0};
-
-/* Variables to hold parent/child eff/real/saved uid/gid values */
-uid_t Peuid, Ceuid, Csuid, Psuid, Pruid, Cruid;
-gid_t Pegid, Cegid, Psgid, Csgid, Prgid, Crgid;
-mode_t Pumask,Cumask;
-
-char Pcwd_buf [PATH_MAX], Ccwd_buf [PATH_MAX];
-char *Pcwd, *Ccwd; /*
- * pathname of working directory of
- * child/parent process.
- */
-/* stat structure to hold directory/inode information for parent/child */
-struct stat StatPbuf;
-struct stat StatCbuf;
-struct stat Stat_cwd_Pbuf;
-struct stat Stat_cwd_Cbuf;
-
-void setup(); /* Main setup function of test */
-void cleanup() __attribute__((noreturn));/* cleanup function for the test */
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- pid_t cpid; /* process id of the child process */
- int exit_status; /* exit status of child process */
-
- /* Parse standard options given to run the test. */
- msg = parse_opts(ac, av, (option_t *) NULL, NULL);
- if (msg != (char *) NULL) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /* Perform global setup for test */
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /* Check looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* Reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call vfork(2) to create a child process without
- * fully copying the address space of parent.
- */
- TEST(vfork());
-
- /* check return code of vfork() */
- if ((cpid = TEST_RETURN) == -1) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "vfork() Failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else if (cpid == 0) { /* Child process */
- /*
- * Perform functional verification if test
- * executed without (-f) option.
- */
- if (STD_FUNCTIONAL_TEST) {
- /*
- * Get the euid, ruid, egid, rgid, umask value
- * and the current working directory of the
- * child process
- */
-#if (linux)
- if (getresuid(&Cruid, &Ceuid, &Csuid) < 0) {
- tst_resm(TFAIL, "getresuid() fails to "
- "get real/eff./saved uid of "
- "child process");
- _exit(1);
- }
-
- if (getresgid(&Crgid, &Cegid, &Csgid) < 0) {
- tst_resm(TFAIL, "getresgid() fails to "
- "get real/eff./saved gid of "
- "child process");
- _exit(1);
- }
-#else
- Cruid = getuid ();
- Ceuid = geteuid ();
- Csuid = 0;
- Crgid = getgid ();
- Cegid = getegid ();
- Csgid = 0;
-#endif
- /*
- * Get the file mode creation mask value of
- * child process by setting value zero and
- * restore the previous mask value.
- */
- Cumask = umask(0);
-
- /*
- * Restore the process mask of child to
- * previous value.
- */
- umask(Cumask);
-
- /*
- * Get the pathname of current working
- * directory for the child process.
- */
- if ((Ccwd = (char *)getcwd(Ccwd_buf, \
- BUFSIZ)) == NULL) {
- tst_resm(TFAIL, "getcwd failed for the "
- "child process");
- _exit(1);
- }
-
- /*
- * Get the device number and the inode
- * number of "/" directory for the child
- * process.
- */
- if (stat("/", &StatCbuf) < 0) {
- tst_resm(TFAIL, "stat(2) failed to get "
- "info. of'/' in the child "
- "process");
- _exit(1);
- }
-
- /*
- * Get the device/inode number of "."
- * (working directory) for the child process.
- */
- if (stat(Ccwd, &Stat_cwd_Cbuf) < 0) {
- tst_resm(TFAIL, "stat(2) failed to get "
- "info. of working irectory in "
- "the child");
- _exit(1);
- }
-
- /* Now, do the actual comparision */
- if (Peuid != Ceuid || Pegid != Cegid || \
- Psuid != Csuid || Psgid != Csgid || \
- Pruid != Cruid || Prgid != Crgid || \
- Pumask != Cumask) {
- tst_resm(TFAIL, "Arribute values of "
- "parent and child don't match");
- _exit(1);
- } else {
- tst_resm(TINFO, "Arribute values of "
- "parent and child match");
- }
-
- /* Check for the same working directories */
- if (strcmp(Pcwd, Ccwd) != 0) {
- tst_resm(TFAIL, "Working directories "
- "of parent and child don't "
- "match");
- _exit(1);
- } else {
- tst_resm(TINFO, "Working directories "
- "of parent and child match");
- }
-
- /*
- * Check for the same device/inode number of
- * '/' directory.
- */
- if ((StatPbuf.st_ino != StatCbuf.st_ino) || \
- (StatPbuf.st_dev != StatCbuf.st_dev)) {
- tst_resm(TFAIL, "Device/inode number "
- "of parent and childs '/' "
- " don't match");
- _exit(1);
- } else {
- tst_resm(TINFO, "Device/inode number "
- "of parent and childs '/' "
- "match");
- }
-
- /*
- * Check for the same device and inode number
- * of "." (current working directory.
- */
- if ((Stat_cwd_Pbuf.st_ino != \
- Stat_cwd_Cbuf.st_ino) || \
- (Stat_cwd_Pbuf.st_dev != \
- Stat_cwd_Cbuf.st_dev)) {
- tst_resm(TFAIL, "Device/inode number "
- "of parent and childs '.' "
- "don't match");
- _exit(1);
- } else {
- tst_resm(TINFO, "Device/inode number "
- "of parent and childs '.' "
- "match");
- }
-
- /*
- * Exit with normal exit code if everything
- * fine
- */
- _exit(0);
- }
- } else { /* parent process */
- /*
- * Let the parent process wait till child completes
- * its execution.
- */
- wait(&exit_status);
-
- /* Check for the exit status of child process */
- if (WEXITSTATUS(exit_status) == 0) {
- tst_resm(TPASS, \
- "Call of vfork() successful");
- } else if (WEXITSTATUS(exit_status) == 1) {
- tst_resm(TFAIL, \
- "Child process exited abnormally");
- }
- }
- Tst_count++; /* incr. TEST_LOOP counter */
- } /* End for TEST_LOOPING */
-
- /* Call cleanup() to undo setup done for the test. */
- cleanup();
- /*NOTREACHED*/
-
-} /* End main */
-
-/*
- * void
- * setup() - performs all ONE TIME setup for this test.
- * This function gets real/effective/saved uid/gid, umask, the device/inode
- * number of '/' and current working directory for the parent process.
- */
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /*
- * Get the euid, ruid, egid, rgid, umask value
- * and the current working directory of the parent process.
- */
-#if (linux)
- if (getresuid(&Pruid, &Peuid, &Psuid) < 0) {
- tst_brkm(TFAIL, cleanup, "getresuid() fails to get "
- "real/eff./saved uid of parent");
- }
-
- if (getresgid(&Prgid, &Pegid, &Psgid) < 0) {
- tst_brkm(TFAIL, cleanup, "getresgid() fails to get "
- "real/eff./saved gid of parent");
- }
-#else
- Pruid = getuid ();
- Peuid = geteuid ();
- Psuid = 0;
- Prgid = getgid ();
- Pegid = getegid ();
- Psgid = 0;
-#endif
- /* Get the process file mode creation mask by setting value 0 */
- Pumask = umask(0);
- umask(Pumask); /*
- * Restore the mask value of the
- * process.
- */
- /*
- * Get the pathname of current working directory of the parent
- * process.
- */
- if ((Pcwd = (char *) getcwd(Pcwd_buf, BUFSIZ)) == NULL) {
- tst_brkm(TFAIL, cleanup,
- "getcwd failed for the parent process");
- }
-
- /*
- * Get the device and inode number of root directory for the
- * parent process.
- */
- if (stat("/", &StatPbuf) == -1) {
- tst_brkm(TFAIL, cleanup, "stat(2) failed to get info. of '/' "
- "in parent process");
- }
-
- /*
- * Get the device number and the inode number of "." (current-
- * working directory) for the parent process.
- */
- if (stat(Pcwd, &Stat_cwd_Pbuf) < 0) {
- tst_brkm(TFAIL, cleanup, "stat(2) failed to get info. of "
- "working directory in parent process");
- }
-} /* End setup() */
-
-/*
- * void
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- */
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
diff --git a/winsup/testsuite/winsup.api/ltp/wait02.c b/winsup/testsuite/winsup.api/ltp/wait02.c
deleted file mode 100644
index a7de67a..0000000
--- a/winsup/testsuite/winsup.api/ltp/wait02.c
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : wait02
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for wait(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) wait(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the wait(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * wait(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="wait02"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-int fork_pid, ret_code;
-void trapper();
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL )
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /* create a child to wait for */
- if ((fork_pid=fork()) == -1) {
- tst_brkm(TBROK, cleanup, "fork() Failure. errno=%d : %s", errno, strerror(errno));
- } else if (fork_pid == 0) {
- /* Child, sleep a second then exit */
- sleep(1);
- exit(1);
- }
-
- /* Parent, wait for child to die */
- TEST(wait(&ret_code));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "wait(1) Failed, errno=%d : %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "wait(&ret_code) returned %d", TEST_RETURN);
- }
- }
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/wait401.c b/winsup/testsuite/winsup.api/ltp/wait401.c
deleted file mode 100644
index 51f71da..0000000
--- a/winsup/testsuite/winsup.api/ltp/wait401.c
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * wait401.c
- *
- * DESCRIPTION
- * wait401 - check that a call to wait4() correctly waits for a child
- * process to exit
- *
- * ALGORITHM
- * loop if that option was specified
- * fork a child.
- * issue the system call
- * check the return value
- * if return value == -1
- * issue a FAIL message, break remaining tests and cleanup
- * if we are doing functional testing
- * issue a PASS message if the wait4 call returned the child's pid
- * else
- * issue a FAIL message
- * call cleanup
- *
- * USAGE: <for command-line>
- * wait401 [-c n] [-f] [-e] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -f : Turn off functionality Testing.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * History
- * 07/2001 John George
- * -Ported
- *
- * Restrictions
- * none
- */
-
-#include "test.h"
-#include "usctest.h"
-
-#include <errno.h>
-#define _USE_BSD
-#include <sys/types.h>
-#include <sys/resource.h>
-#include <sys/wait.h>
-
-void cleanup(void) __attribute__((noreturn));
-void setup(void);
-
-const char *TCID= "wait401()";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- pid_t pid;
- int status = 1;
- struct rusage *rusage = NULL;
-
- /* parse standard options */
- if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL) {
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- }
-
- setup(); /* global setup */
-
- /* The following loop checks looping state if -i option given */
-
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
- /*
- * Allocate some space for the rusage structure
- */
-
- if ((rusage = (struct rusage *)malloc(sizeof(struct rusage)))
- == NULL) {
- tst_brkm(TBROK, cleanup, "malloc() failed");
- }
-
- pid = fork();
-
- if (pid == -1) {
- tst_brkm(TBROK, cleanup, "fork() failed");
- }
-
- if (pid == 0) { /* this is the child */
- /*
- * sleep for a moment to let us do the test
- */
- sleep(1);
- exit(0);
- } else { /* this is the parent */
-
- /* call wait4 with the TEST() macro */
- TEST(wait4(pid, &status, 0, rusage));
- }
-
- if (TEST_RETURN == -1) {
- tst_brkm(TFAIL, cleanup, "%s call failed - errno = %d "
- ": %s", TCID, TEST_ERRNO, strerror(TEST_ERRNO));
- }
-
- if (STD_FUNCTIONAL_TEST) {
- /*
- * The return from this call should be non-zero.
- */
- if (WIFEXITED(status) == 0) {
- tst_brkm(TFAIL, cleanup, "%s call succeeded but "
- "WIFEXITED() did not return expected value "
- "- %d", TCID, WIFEXITED(status));
- } else if (TEST_RETURN != pid) {
- tst_resm(TFAIL, "%s did not return the "
- "expected value. %d", TCID,
- TEST_RETURN);
- } else {
-
- tst_resm(TPASS, "Received child pid as expected.");
- }
- }
- tst_resm(TPASS, "%s call succeeded", TCID);
-
- /*
- * Clean up things in case we are looping.
- */
- free(rusage);
- rusage = NULL;
- }
-
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all the ONE TIME setup for this test.
- */
-void
-setup(void)
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-}
-
-/*
- * cleanup() - performs all the ONE TIME cleanup for this test at completion
- * or premature exit.
- */
-void
-cleanup(void)
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
-
diff --git a/winsup/testsuite/winsup.api/ltp/wait402.c b/winsup/testsuite/winsup.api/ltp/wait402.c
deleted file mode 100644
index 30f7500..0000000
--- a/winsup/testsuite/winsup.api/ltp/wait402.c
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * wait402.c
- *
- * DESCRIPTION
- * wait402 - check for ECHILD errno when using an illegal pid value
- *
- * ALGORITHM
- * loop if that option was specified
- * issue the system call with an illegal pid value
- * check the errno value
- * issue a PASS message if we get ECHILD
- * otherwise, the tests fails
- * issue a FAIL message
- * break any remaining tests
- * call cleanup
- *
- * USAGE: <for command-line>
- * wait402 [-c n] [-e] [-i n] [-I x] [-p x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * History
- * 07/2001 John George
- * -Ported
- *
- * Restrictions
- * none
- */
-
-#include "test.h"
-#include "usctest.h"
-
-#include <errno.h>
-#define _USE_BSD
-#include <sys/types.h>
-#include <sys/resource.h>
-#include <sys/wait.h>
-
-/*
- * See the Makefile for comments about the following preprocessor code.
- */
-#if defined (__CYGWIN__)
-#define PID_MAX 0xfffffffd
-#else
-#ifndef _LTP_TASKS_H
-#include <linux/threads.h> /* for PID_MAX value - new */
-#else
-#include <linux/tasks.h> /* for PID_MAX value - old */
-#endif
-#endif
-
-void cleanup(void) __attribute__((noreturn));
-void setup(void);
-
-const char *TCID= "wait402()";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-int exp_enos[] = {10, 0};
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
- pid_t pid;
- pid_t epid = PID_MAX + 1;
- int status = 1;
- struct rusage *rusage=NULL;
-
- /* parse standard options */
- if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL) {
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- }
-
- setup(); /* global setup */
-
- /* The following loop checks looping state if -i option given */
-
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
-
- /*
- * Allocate some space for the rusage structure.
- */
-
- if ((rusage = (struct rusage *)malloc(sizeof(struct rusage)))
- == NULL) {
- tst_brkm(TBROK, cleanup, "malloc() failed");
- }
-
- pid = fork();
-
- if (pid == -1) {
- tst_brkm(TBROK, cleanup, "fork() failed");
- }
-
- if (pid == 0) { /* this is the child */
- /*
- * sleep for a moment to let us do the test
- */
- sleep(1);
- exit(0);
- } else { /* this is the parent */
- /*
- * call wait4 with the TEST() macro. epid is set
- * to an illegal positive value. This should give
- * an ECHILD error.
- */
- TEST(wait4(epid, &status, 0, rusage));
- }
-
- if (TEST_RETURN == 0) {
- tst_brkm(TFAIL, cleanup, "call failed to produce expected error - errno = %d - %s", TEST_ERRNO, strerror(TEST_ERRNO));
- }
-
- TEST_ERROR_LOG(TEST_ERRNO);
-
- switch (TEST_ERRNO) {
- case ECHILD:
- tst_resm(TPASS, "received expected failure - errno = %d - %s",
- TEST_ERRNO, strerror(TEST_ERRNO));
- break;
- default:
- tst_brkm(TFAIL, cleanup, "call failed to produce expected "
- "error - errno = %d - %s", TEST_ERRNO,
- strerror(TEST_ERRNO));
- }
-
- /*
- * Clean up things in case we are looping.
- */
- if (pid > 0) {
- wait4(pid, &status, 0, rusage);
- }
- free(rusage);
- rusage = NULL;
- }
-
- cleanup();
-
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all the ONE TIME setup for this test.
- */
-void
-setup(void)
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* Set up the expected error numbers for -e option */
- TEST_EXP_ENOS(exp_enos);
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-}
-
-/*
- * cleanup() - performs all the ONE TIME cleanup for this test at completion
- * or premature exit.
- */
-void
-cleanup(void)
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
-
diff --git a/winsup/testsuite/winsup.api/ltp/write01.c b/winsup/testsuite/winsup.api/ltp/write01.c
deleted file mode 100644
index 355190a..0000000
--- a/winsup/testsuite/winsup.api/ltp/write01.c
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like. Any license provided herein, whether implied or
- * otherwise, applies only to this software file. Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- *
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA 94043, or:
- *
- * http://www.sgi.com
- *
- * For further information regarding this notice, see:
- *
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
- *
- */
-/* $Id$ */
-/**********************************************************
- *
- * OS Test - Silicon Graphics, Inc.
- *
- * TEST IDENTIFIER : write01
- *
- * EXECUTED BY : anyone
- *
- * TEST TITLE : Basic test for write(2)
- *
- * PARENT DOCUMENT : usctpl01
- *
- * TEST CASE TOTAL : 1
- *
- * WALL CLOCK TIME : 1
- *
- * CPU TYPES : ALL
- *
- * AUTHOR : William Roske
- *
- * CO-PILOT : Dave Fenner
- *
- * DATE STARTED : 03/30/92
- *
- * INITIAL RELEASE : UNICOS 7.0
- *
- * TEST CASES
- *
- * 1.) write(2) returns...(See Description)
- *
- * INPUT SPECIFICATIONS
- * The standard options for system call tests are accepted.
- * (See the parse_opts(3) man page).
- *
- * OUTPUT SPECIFICATIONS
- *
- * DURATION
- * Terminates - with frequency and infinite modes.
- *
- * SIGNALS
- * Uses SIGUSR1 to pause before test if option set.
- * (See the parse_opts(3) man page).
- *
- * RESOURCES
- * None
- *
- * ENVIRONMENTAL NEEDS
- * No run-time environmental needs.
- *
- * SPECIAL PROCEDURAL REQUIREMENTS
- * None
- *
- * INTERCASE DEPENDENCIES
- * None
- *
- * DETAILED DESCRIPTION
- * This is a Phase I test for the write(2) system call. It is intended
- * to provide a limited exposure of the system call, for now. It
- * should/will be extended when full functional tests are written for
- * write(2).
- *
- * Setup:
- * Setup signal handling.
- * Pause for SIGUSR1 if option specified.
- *
- * Test:
- * Loop if the proper options are given.
- * Execute system call
- * Check return code, if system call failed (return=-1)
- * Log the errno and Issue a FAIL message.
- * Otherwise, Issue a PASS message.
- *
- * Cleanup:
- * Print errno log and/or timing stats if options given
- *
- * UPDATE HISTORY
- * user date description
- * ------------------------------------------------------
- * wermager 3/00 Switched sequence of calls to TEST_PAUSE
- * and tst_tmpdir() in setup().
- *
- *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include "test.h"
-#include "usctest.h"
-
-extern void setup();
-extern void cleanup();
-
-
-
-const char *TCID="write01"; /* Test program identifier. */
-int TST_TOTAL=1; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int exp_enos[]={0, 0};
-
-char fname[255];
-int fd;
-char buf = 'w';
-
-int
-main(int ac, char **av)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- /***************************************************************
- * parse standard options
- ***************************************************************/
- if ( (msg=parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *) NULL ) {
- tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
- tst_exit();
- }
-
- /***************************************************************
- * perform global setup for test
- ***************************************************************/
- setup();
-
- /* set the expected errnos... */
- TEST_EXP_ENOS(exp_enos);
-
- /***************************************************************
- * check looping state if -c option given
- ***************************************************************/
- for (lc=0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping. */
- Tst_count=0;
-
- /*
- * Call write(2)
- */
- TEST(write(fd, &buf, 1));
-
- /* check return code */
- if ( TEST_RETURN == -1 ) {
- TEST_ERROR_LOG(TEST_ERRNO);
- tst_resm(TFAIL, "write(%s, F_CLRALF, 1) Failed, errno=%d : %s", fname,
- TEST_ERRNO, strerror(TEST_ERRNO));
- } else {
- /***************************************************************
- * only perform functional verification if flag set (-f not given)
- ***************************************************************/
- if ( STD_FUNCTIONAL_TEST ) {
- /* No Verification test, yet... */
- tst_resm(TPASS, "write(%s, F_CLRALF, 1) returned %d", fname, TEST_RETURN);
- }
- }
-
- } /* End for TEST_LOOPING */
-
- /***************************************************************
- * cleanup and exit
- ***************************************************************/
- cleanup();
-
- return 0;
-} /* End main */
-
-/***************************************************************
- * setup() - performs all ONE TIME setup for this test.
- ***************************************************************/
-void
-setup()
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
-
- /* Pause if that option was specified */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- sprintf(fname,"tfile_%d",getpid());
- if ((fd = open(fname,O_RDWR|O_CREAT,0700)) == -1) {
- tst_brkm(TBROK, cleanup,
- "open(%s, O_RDWR|O_CREAT,0700) Failed, errno=%d : %s",
- fname, errno, strerror(errno));
- }
-} /* End setup() */
-
-
-/***************************************************************
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit.
- ***************************************************************/
-void
-cleanup()
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- /* close the file we have open */
- if (close(fd) == -1) {
- tst_resm(TWARN, "close(%s) Failed, errno=%d : %s", fname, errno, strerror(errno));
- }
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-} /* End cleanup() */
-
-
diff --git a/winsup/testsuite/winsup.api/ltp/write02.c b/winsup/testsuite/winsup.api/ltp/write02.c
deleted file mode 100644
index a5675bd..0000000
--- a/winsup/testsuite/winsup.api/ltp/write02.c
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * write02.c
- *
- * DESCRIPTION
- * Basic functionality test: does the return from write match the count
- * of the number of bytes written.
- *
- *
- * ALGORITHM
- * Create a file and write some bytes out to it.
- * Check the return count against the number returned.
- *
- * USAGE: <for command-line>
- * write02 [-c n] [-e] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * History
- * 07/2001 John George
- * -Ported
- *
- * Restrictions
- * None
- */
-
-#include <errno.h>
-#include "test.h"
-#include "usctest.h"
-#include <fcntl.h>
-
-const char *TCID = "write02()";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-void cleanup(void) __attribute__ ((noreturn));
-void setup(void);
-
-char pfiln[40] = "";
-
-int
-main(int argc, char **argv)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- int cwrite;
- int fild;
- int iws;
- int badcount = 0;
- char pwbuf[BUFSIZ + 1];
-
- /* parse standard options */
- if ((msg = parse_opts(argc, argv, (option_t *) NULL, NULL))) {
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- setup(); /* global setup for test */
-
- /* The following loop checks looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
- tst_resm(TINFO, "Block 1: test to see write() returns proper "
- "write count");
-
- for (iws = 0; iws < BUFSIZ; iws++) {
- pwbuf[iws] = 'A' + (iws % 26);
- }
- pwbuf[BUFSIZ] = '\n';
-
- if ((fild = creat(pfiln, 0777)) == -1) {
- tst_brkm(TBROK, cleanup, "Can't creat Xwrit");
- /*NOTREACHED*/
- }
- for (iws = BUFSIZ; iws > 0; iws--) {
- if ((cwrite = write(fild, pwbuf, iws)) != iws) {
- TEST_ERROR_LOG(errno);
- badcount++;
- tst_resm(TINFO, "bad write count");
- }
- }
- if (badcount != 0) {
- tst_resm(TFAIL, "write() FAILED to return proper cnt");
- } else {
- tst_resm(TPASS, "write() PASSED");
- }
- tst_resm(TINFO, "block 1 passed");
- close(fild);
- }
- cleanup();
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test
- */
-void
-setup(void)
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- umask(0);
-
- /* Pause if that option was specified
- * TEST_PAUSE contains the code to fork the test with the -i option.
- * You want to make sure you do this before you create your temporary
- * directory.
- */
- TEST_PAUSE;
-
- /* make a temp directory and cd to it */
- tst_tmpdir();
-
- sprintf(pfiln, "./write1.%d", getpid());
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at completion or
- * premature exit.
- */
-void
-cleanup(void)
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- unlink(pfiln);
-
- /* Remove tmp dir and all files in it */
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
-}
diff --git a/winsup/testsuite/winsup.api/ltp/write03.c b/winsup/testsuite/winsup.api/ltp/write03.c
deleted file mode 100644
index 7d6f1f9..0000000
--- a/winsup/testsuite/winsup.api/ltp/write03.c
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- *
- * Copyright (c) International Business Machines Corp., 2001
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * NAME
- * write03.c
- *
- * DESCRIPTION
- * Testcase to check that write(2) doesn't corrupt a file when it fails
- *
- * ALGORITHM
- * Create a file for writing, write 100 bytes to it. Then make write(2)
- * fail with some erroneous parameter, close the fd. Then reopen the
- * file in RDONLY mode, and read the contents of the file. Compare the
- * buffers, to see whether they are same.
- *
- * USAGE: <for command-line>
- * write03 [-c n] [-e] [-i n] [-I x] [-P x] [-t]
- * where, -c n : Run n copies concurrently.
- * -e : Turn on errno logging.
- * -i n : Execute test n times.
- * -I x : Execute test for x seconds.
- * -P x : Pause for x seconds between iterations.
- * -t : Turn on syscall timing.
- *
- * History
- * 07/2001 John George
- * -Ported
- *
- * Restrictions
- * NONE
- */
-
-#include <string.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <test.h>
-#include <usctest.h>
-
-/* 0 terminated list of expected errnos */
-int exp_enos[] = {14,0};
-
-const char *TCID = "write03";
-int TST_TOTAL = 1;
-extern int Tst_count;
-
-void setup(void);
-void cleanup(void) __attribute__((noreturn));
-
-int fd = -1;
-char filename[100];
-
-int
-main(int argc, char **argv)
-{
- int lc; /* loop counter */
- const char *msg; /* message returned from parse_opts */
-
- char wbuf[BUFSIZ], rbuf[BUFSIZ];
-
- /* parse standard options */
- if ((msg = parse_opts(argc, argv, (option_t *)NULL, NULL)) !=
- (char *)NULL) {
- tst_brkm(TBROK, cleanup, "OPTION PARSING ERROR - %s", msg);
- /*NOTREACHED*/
- }
-
- /* global setup */
- setup();
-
- /* The following loop checks looping state if -i option given */
- for (lc = 0; TEST_LOOPING(lc); lc++) {
-
- /* reset Tst_count in case we are looping */
- Tst_count = 0;
-
- tst_resm(TINFO, "Enter Block 1: test to check if write "
- "corrupts the file when write fails");
-
- fd = creat(filename, 0644);
- if (fd < 0) {
- tst_resm(TBROK, "creating a new file failed");
- cleanup();
- /*NOTREACHED*/
- }
-
- (void)memset(wbuf, '0', 100);
-
- if (write(fd, wbuf, 100) == -1) {
- tst_resm(TFAIL, "failed to write to %s", filename);
- cleanup();
- /*NOTREACHED*/
- }
-
- if (write(fd, (void *)-1, 100) != -1) {
- tst_resm(TFAIL, "write(2) failed to fail");
- cleanup();
- /*NOTREACHED*/
- }
- TEST_ERROR_LOG(errno);
- close(fd);
- fd = -1;
-
- if ((fd = open(filename, O_RDONLY)) == -1) {
- tst_resm(TBROK, "open(2) failed, errno: %d", errno);
- cleanup();
- /*NOTREACHED*/
- }
-
- if (read(fd, rbuf, 100) == -1) {
- tst_resm(TBROK, "read(2) failed, errno: %d", errno);
- cleanup();
- /*NOTREACHED*/
- }
-
- if (memcmp(wbuf, rbuf, 100) == 0) {
- tst_resm(TPASS, "failure of write(2) didnot corrupt "
- "the file");
- } else {
- tst_resm(TFAIL, "failure of write(2) corrupted the "
- "file");
- }
- tst_resm(TINFO, "Exit block 1");
- }
- cleanup();
- /*NOTREACHED*/
-}
-
-/*
- * setup() - performs all ONE TIME setup for this test
- */
-void
-setup(void)
-{
- /* capture signals */
- tst_sig(FORK, DEF_HANDLER, cleanup);
-
- /* Set up the expected error numbers for -e option */
- TEST_EXP_ENOS(exp_enos);
-
- /* Pause if that option was specified
- * TEST_PAUSE contains the code to fork the test with the -i option.
- * You want to make sure you do this before you create your temporary
- * directory.
- */
- TEST_PAUSE;
-
- /* Create a unique temporary directory and chdir() to it. */
- tst_tmpdir();
-
- sprintf(filename, "./write03.%d", getpid());
-}
-
-/*
- * cleanup() - performs all ONE TIME cleanup for this test at
- * completion or premature exit
- */
-void
-cleanup(void)
-{
- /*
- * print timing stats if that option was specified.
- * print errno log if that option was specified.
- */
- TEST_CLEANUP;
-
- if (fd >= 0)
- close (fd);
-
- unlink(filename);
- tst_rmdir();
-
- /* exit with return code appropriate for results */
- tst_exit();
- /*NOTREACHED*/
-}
diff --git a/winsup/testsuite/winsup.api/mmaptest01.c b/winsup/testsuite/winsup.api/mmaptest01.c
deleted file mode 100644
index fe3226d..0000000
--- a/winsup/testsuite/winsup.api/mmaptest01.c
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- Copyright 2001 Free Software Foundation, Inc.
- Written by Michael Chastain, <chastain@redhat.com>
- Changes by Corinna Vinschen, <corinna@vinschen.de>:
- - Using mkstemp to generate filenames.
- - Adding tests
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-
- This program demonstrates a bug in cygwin's mmap.
- I open one file, mmap it, and close it.
- I open a different file, mmap it, and close it.
-
- The second file re-uses the file handle (which is OK),
- but then it re-uses the buffer as well! Ouch!
-
- This bug occurs on cygwin1.dll dated 2001-01-31.
- It causes gnu cpp to screw up its include file buffers.
-
- Compile with "gcc -o y1 y1.c".
-
- Output from a bad cygwin1.dll:
-
- y1.txt: 3 0x4660000 y1 y1 y1 y1 y1 y1 y1
- y2.txt: 3 0x4660000 y1 y1 y1 y1 y1 y1 y1
-
- Output from a good cygwin1.dll:
-
- y1.txt: 3 0x14060000 y1 y1 y1 y1 y1 y1 y1
- y2.txt: 3 0x14070000 y2 y2 y2 y2 y2 y2 y2
-
- Output from Red Hat Linux 7:
-
- y1.txt: 3 0x40017000 y1 y1 y1 y1 y1 y1 y1
- y2.txt: 3 0x40018000 y2 y2 y2 y2 y2 y2 y2
- */
-
-#include <sys/mman.h>
-#include <fcntl.h>
-#include <string.h>
-
-#include "test.h"
-#include "usctest.h"
-
-const char *TCID = "mmaptest01"; /* Test program identifier. */
-int TST_TOTAL = 7; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-/* some systems have O_BINARY and some do not */
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
-
-/* filler for file 1 */
-char const line1 [] = "y1 y1 y1 y1 y1 y1 y1 y1 y1 y1 y1 y1 y1 y1 y1 y1 y1\n";
-#define size1 (sizeof(line1) - 1)
-#define count1 ((4096 / size1) + 1)
-
-/* filler for file 2 */
-char const line2 [] = "y2 y2 y2 y2 y2 y2 y2 y2 y2 y2 y2 y2 y2 y2 y2 y2 y2\n";
-#define size2 (sizeof(line2) - 1)
-#define count2 ((4096 / size2) + 1)
-
-int main ()
-{
- char fnam1[32];
- char fnam2[32];
-
- int fd1;
- char * buf1;
-
- int fd2;
- char * buf2;
-
- char buf3[20];
-
- unsigned i;
-
- strcpy (fnam1, "mmaptest01.1.XXXXXX");
- strcpy (fnam2, "mmaptest01.2.XXXXXX");
-
- /* create file 1 */
- //fd1 = open (fnam1, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0644);
- fd1 = mkstemp (fnam1);
- for (i = 0; i < count1; i++)
- write (fd1, line1, size1);
- close (fd1);
-
- /* create file 2 */
- //fd2 = open (fnam2, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0644);
- fd2 = mkstemp (fnam2);
- for (i = 0; i < count2; i++)
- write (fd2, line2, size2);
- close (fd2);
-
- /* mmap file 1 */
- fd1 = open (fnam1, O_RDONLY | O_BINARY, 0644);
- buf1 = mmap (0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd1, 0);
- close (fd1);
-
- /* mmap file 2 */
- fd2 = open (fnam2, O_RDONLY | O_BINARY, 0644);
- buf2 = mmap (0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd2, 0);
- close (fd2);
-
- /* the buffers have to be different */
- Tst_count = 0;
- tst_resm (buf1 == buf2 || !memcmp (buf1, buf2, 20) ? TFAIL : TPASS,
- "mmap uses unique buffers when mapping different already closed files");
- munmap (buf2, 4096);
-
- /* mmap file 1 twice with MAP_PRIVATE */
- fd2 = open (fnam1, O_RDONLY | O_BINARY, 0644);
- buf2 = mmap (0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd2, 0);
- close (fd2);
-
- tst_resm (buf1 == buf2 ? TFAIL : TPASS,
- "mmap uses different buffers on MAP_PRIVATE mapping");
-
- tst_resm (memcmp (buf1, buf2, 20) ? TFAIL : TPASS,
- "two private buffers of the same file are identical");
-
- buf1[0] = 0x7f;
- tst_resm (!memcmp (buf1, buf2, 20) ? TFAIL : TPASS,
- "changes are private in MAP_PRIVATE mappings");
-
- munmap (buf1, 4096);
- munmap (buf2, 4096);
-
- /* mmap file 1 twice with MAP_SHARED */
- fd1 = open (fnam1, O_RDWR | O_BINARY, 0644);
- buf1 = mmap (0, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, fd1, 0);
- close (fd1);
-
- fd2 = open (fnam1, O_RDWR | O_BINARY, 0644);
- buf2 = mmap (0, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, fd2, 0);
- close (fd2);
-
- tst_resm (memcmp (buf1, buf2, 20) ? TFAIL : TPASS,
- "two shared buffers of the same file are identical");
-
- buf1[0] = 0x7f;
- tst_resm (memcmp (buf1, buf2, 20) ? TFAIL : TPASS,
- "changes are shared between MAP_SHARED mappings of the same file");
- if (buf1 == buf2) /* Win 9x weirdness */
- msync (buf2, 4096, MS_SYNC);
- else
- munmap (buf2, 4096);
-
- fd2 = open (fnam1, O_RDWR | O_BINARY, 0644);
- memset (buf3, 0, 20);
- read (fd2, buf3, 20);
- close (fd2);
-
- tst_resm (memcmp (buf1, buf3, 20) ? TFAIL : TPASS,
- "changes are propagated to the mapped file on MAP_SHARED mapping");
-
- munmap (buf1, 4096);
- unlink (fnam1);
- unlink (fnam2);
- tst_exit ();
-}
-
diff --git a/winsup/testsuite/winsup.api/mmaptest02.c b/winsup/testsuite/winsup.api/mmaptest02.c
deleted file mode 100644
index bec7c39..0000000
--- a/winsup/testsuite/winsup.api/mmaptest02.c
+++ /dev/null
@@ -1,190 +0,0 @@
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <setjmp.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-
-sigset_t unblock_sigsegv;
-jmp_buf r;
-size_t pg;
-
-int fd;
-
-/* Checks behaviour of anonymous mmap.
-
- test_1: If we map a 2-page region and unmap its second page, the first page
- must remain.
-
- test_2: If we map a 2-page region and unmap its first page, the second
- page must remain.
-
- test_3: If we map two consecutive 1-page regions and unmap them both with
- one munmap, both must go away.
-*/
-
-void
-perror_exit (const char *str, int code)
-{
- printf ("%s: %s\n", str, strerror (errno));
- exit (code);
-}
-
-void
-anonmap_init ()
-{
- sigemptyset (&unblock_sigsegv);
- sigaddset (&unblock_sigsegv, SIGSEGV);
- pg = getpagesize ();
- fd = open ("/dev/zero", O_RDWR);
-}
-
-char *
-anonmap (size_t size)
-{
- return (char *) mmap (0, size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
-}
-
-void
-anonfree (char *loc, size_t size)
-{
- munmap (loc, size);
-}
-
-void
-sigsegv (int unused)
-{
- sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
- longjmp (r, 1);
-}
-
-int
-compare_pointers (const void *a, const void *b)
-{
- const char *x = *(const char *const *)a;
- const char *y = *(const char *const *)b;
-
- if (x > y)
- return 1;
- if (x < y)
- return -1;
- return 0;
-}
-
-void
-test_1 ()
-{
- char *x = anonmap (pg * 2);
- if (x == (char *)MAP_FAILED)
- perror_exit ("test 1 mmap", 1);
-
- signal (SIGSEGV, sigsegv);
- if (setjmp (r))
- perror_exit ("test 1 fault", 2);
-
- x[0] = 1;
- x[pg] = 1;
-
- anonfree (x + pg, pg);
- x[0] = 2;
-
- if (setjmp (r) == 0)
- {
- x[pg] = 1;
- perror_exit ("test 1 no fault", 3);
- }
-}
-
-void
-test_2 ()
-{
- char *x = anonmap (pg * 2);
- if (x == (char *)MAP_FAILED)
- perror_exit ("test 2 mmap", 4);
-
- signal (SIGSEGV, sigsegv);
- if (setjmp (r))
- perror_exit ("test 2 fault", 5);
-
- x[0] = 1;
- x[pg] = 1;
-
- anonfree (x, pg);
- x[pg] = 2;
-
- if (setjmp (r) == 0)
- {
- x[0] = 1;
- perror_exit ("test 2 no fault", 6);
- }
-}
-
-void
-test_3 ()
-{
- char *x[10];
- char *y;
- int i;
-
- /* There's no way to guarantee we get consecutive pages from the OS. The
- approach taken here is to allocate ten of them, sort the list, and
- look for consecutive pages. */
- for (i = 0; i < 10; i++)
- {
- x[i] = anonmap (pg);
- if (x[i] == (char *)MAP_FAILED)
- perror_exit ("test 3 mmap 1", 7);
- }
- qsort (x, 10, sizeof (char *), compare_pointers);
-
- y = 0;
- for (i = 0; i < 9; i++)
- if (x[i] + pg == x[i+1])
- {
- y = x[i];
- break;
- }
- if (y == 0)
- {
- fputs ("test 3: couldn't get two consecutive pages, giving up\n", stdout);
- exit (65);
- }
-
- signal (SIGSEGV, sigsegv);
- if (setjmp (r))
- perror_exit ("test 3 fault", 8);
-
- y[0] = 1;
- y[pg] = 1;
-
- anonfree (y, pg * 2);
-
- if (setjmp (r) == 0)
- {
- y[0] = 1;
- perror_exit ("test 3 no fault 1", 9);
- }
-
- signal (SIGSEGV, sigsegv);
- if (setjmp (r) == 0)
- {
- y[pg] = 1;
- perror_exit ("test 3 no fault 2", 10);
- }
-}
-
-int
-main ()
-{
- anonmap_init();
-
- test_1();
- test_2();
- test_3();
-
- exit(0);
-}
diff --git a/winsup/testsuite/winsup.api/mmaptest03.c b/winsup/testsuite/winsup.api/mmaptest03.c
deleted file mode 100644
index 8046f0b..0000000
--- a/winsup/testsuite/winsup.api/mmaptest03.c
+++ /dev/null
@@ -1,154 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <setjmp.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-#include <sys/wait.h>
-#include <errno.h>
-#include <string.h>
-
-/* - Checks if mapping of already closed file survives fork()
- - Checks if mapping the same region of the same file twice
- is done correctly.
-*/
-
-sigset_t unblock_sigsegv;
-jmp_buf r;
-
-static const char *msg;
-static const char *what;
-/* filler for file */
-char const line[] = "y1 y1 y1 y1 y1 y1 y1 y1 y1 y1 y1 y1 y1 y1 y1 y1 y1";
-
-void
-perror_exit (const char *str)
-{
- printf ("%s: %s\n", str, strerror (errno));
- fflush (stdout);
- exit (1);
-}
-
-void
-sigsegv (int unused)
-{
- sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0);
- if (msg)
- {
- char buf[132];
- sprintf (buf, "%s %s\n", what, msg);
- write (1, buf, strlen (buf));
- msg = NULL;
- }
- longjmp (r, 1);
-}
-
-int
-main(int argc, char **argv)
-{
- int fd, status;
- struct stat statbuf;
- volatile char c, *buf1, *buf2;
- pid_t pid;
-
- /* Create data file */
- if ((fd = open("y.txt", O_RDWR | O_CREAT | O_TRUNC, 0644)) == -1)
- perror_exit ("Can't create data file");
- write (fd, line, sizeof(line) - 1);
- close (fd);
-
- /* Open data file */
- if ((fd = open("y.txt", O_RDONLY)) == -1)
- perror_exit ("Can't open data file");
-
- if (fstat(fd, &statbuf) < 0)
- perror_exit ("fstat failed");
-
- if (!statbuf.st_size)
- perror_exit ("filesize is 0");
-
- if ((buf1 = mmap(NULL, statbuf.st_size, PROT_READ, MAP_SHARED, fd, 0))
- == MAP_FAILED)
- perror_exit ("mmap 1 failed");
-
- close(fd);
-
- /* Open data file a second time */
- if ((fd = open("y.txt", O_RDONLY)) == -1)
- perror_exit ("Can't open data file in second run");
-
- if ((buf2 = mmap(NULL, statbuf.st_size, PROT_READ, MAP_SHARED, fd, 0))
- == MAP_FAILED)
- perror_exit ("mmap 2 failed");
-
- close(fd);
-
- sigemptyset (&unblock_sigsegv);
- sigaddset (&unblock_sigsegv, SIGSEGV);
- signal (SIGSEGV, sigsegv);
-
- if (setjmp (r))
- perror_exit ("SEGV in fork");
-
- if ((pid = fork()))
- {
- // write (1, "continuing in parent\n", strlen ("continuing in parent\n"));
- what = "parent";
- }
- else
- {
- // write (1, "continuing in child\n", strlen ("continuing in child\n"));
- what = "child";
- }
-
- if (pid == -1)
- perror_exit ("fork failed");
-
- if (setjmp (r))
- perror_exit (pid ? "SEGV in parent" : "SEGV in child");
-
- msg = "testing buf1";
- c = buf1[0];
- msg = "testing buf2";
- c = buf2[0];
-
- if (setjmp (r))
- perror_exit (pid ? "SEGV in parent's munmap" : "SEGV in child's munmap");
-
- if (munmap((void *) buf1, statbuf.st_size))
- perror_exit (pid ? "munmap failed in parent" : "munmap failed in child");
-
- if (setjmp (r) == 0)
- {
- msg = "testing buf1 after unmap";
- c = buf1[0];
- perror_exit (pid ? "no SEGV in parent after munmap" : "no SEGV in child after munmap");
- }
-
- if (setjmp (r))
- perror_exit (pid ? "SEGV in parent after munmap" : "SEGV in child after munmap");
-
- msg = "testing buf2 again";
- c = buf2[0];
-
- if (setjmp (r))
- perror_exit (pid ? "SEGV in parent's munmap" : "SEGV in child's munmap");
-
- if (munmap((void *) buf2, statbuf.st_size))
- perror_exit (pid ? "munmap failed in parent" : "munmap failed in child");
-
- if (pid)
- {
- waitpid (pid, &status, 0);
- unlink ("y.txt");
- if (!WIFEXITED (status) || WEXITSTATUS (status))
- {
- printf ("forked process exited with status %p\n", (char *) status);
- return 1;
- }
- }
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/mmaptest04.c b/winsup/testsuite/winsup.api/mmaptest04.c
deleted file mode 100644
index 52302ba..0000000
--- a/winsup/testsuite/winsup.api/mmaptest04.c
+++ /dev/null
@@ -1,103 +0,0 @@
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <stdio.h>
-
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
-
-int
-main ()
-{
- char *data, *data2 = NULL, *data3;
- int i, pagesize;
- int fd;
-
- pagesize = 65536; //getpagesize();
-
- /*
- * First, make a file with some known garbage in it.
- */
- data = (char *) malloc (pagesize);
- if (!data)
- exit (1);
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand ();
- umask (0);
- fd = open ("conftestmmap", O_CREAT | O_TRUNC | O_WRONLY | O_BINARY, 0600);
- if (fd < 0)
- {
- printf ("creat: %d\n", errno);
- exit (1);
- }
- if (write (fd, data, pagesize) != pagesize)
- {
- printf ("write: %d\n", errno);
- exit (1);
- }
- close (fd);
-
- /*
- * Next, try to mmap the file.
- */
- fd = open ("conftestmmap", O_RDWR | O_BINARY);
- if (fd < 0)
- {
- printf ("write: %d\n", errno);
- exit (1);
- }
- if ((data2 = mmap (data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE, fd, 0L)) == MAP_FAILED)
- {
- printf ("mmap: %d\n", errno);
- exit (1);
- }
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- {
- printf ("check-if: %d\n", errno);
- exit (1);
- }
-
- /*
- * Finally, make sure that changes to the mapped area
- * do not percolate back to the file as seen by read().
- * (This is a bug on some variants of i386 svr4.0.)
- */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = (char *) malloc (pagesize);
- if (!data3)
- {
- printf ("malloc2: %d\n", errno);
- exit (1);
- }
- if (read (fd, data3, pagesize) != pagesize)
- {
- printf ("read: %d\n", errno);
- exit (1);
- }
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- {
- printf ("check-if2: %d\n", errno);
- exit (1);
- }
- if (msync (data2, pagesize, MS_SYNC))
- {
- printf ("msync: %d\n", errno);
- exit (1);
- }
- if (munmap (data2, pagesize))
- {
- printf ("munmap: %d\n", errno);
- exit (1);
- }
- close (fd);
- unlink ("conftestmmap");
- exit (0);
-}
diff --git a/winsup/testsuite/winsup.api/msgtest.c b/winsup/testsuite/winsup.api/msgtest.c
deleted file mode 100644
index e002a7f..0000000
--- a/winsup/testsuite/winsup.api/msgtest.c
+++ /dev/null
@@ -1,348 +0,0 @@
-/*-
- * Copyright (c) 1999 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
- * NASA Ames Research Center.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * Obtained from: $NetBSD: msgtest.c,v 1.7 2002/07/20 08:36:25 grant Exp $
- * $FreeBSD: /repoman/r/ncvs/src/tools/regression/sysvmsg/msgtest.c,v 1.1 2002/08/15 06:34:37 alfred Exp $
- */
-
-/*
- * Test the SVID-compatible Message Queue facility.
- */
-
-/*
- * CV, 2003-11-17: Add to Cygwin testsuite.
- */
-#include <sys/param.h>
-#include <sys/ipc.h>
-#include <sys/msg.h>
-#include <sys/wait.h>
-
-#include <err.h>
-#include <errno.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include "test.h"
-#include "usctest.h"
-
-const char *TCID = "msgtest"; /* Test program identifier. */
-int TST_TOTAL = 31; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-void print_msqid_ds (struct msqid_ds *, mode_t);
-void sigsys_handler(int);
-void sigchld_handler (int);
-void cleanup (void);
-void receiver (void);
-
-#define MESSAGE_TEXT_LEN 255
-
-/*
- * Define it as test_mymsg because we already have struct mymsg and we dont
- * want to conflict with it. Also, regression fails when the default mymsg
- * struct is used, because mtext[] array is '1', so the passed string cannot
- * be processed.
- */
-struct test_mymsg {
- long mtype;
- char mtext[MESSAGE_TEXT_LEN];
-};
-
-const char *m1_str = "California is overrated.";
-const char *m2_str = "The quick brown fox jumped over the lazy dog.";
-
-#define MTYPE_1 1
-#define MTYPE_1_ACK 2
-
-#define MTYPE_2 3
-#define MTYPE_2_ACK 4
-
-int sender_msqid = -1;
-pid_t child_pid;
-
-key_t msgkey;
-
-int
-main(int argc, char *argv[])
-{
- struct sigaction sa;
- struct msqid_ds m_ds;
- struct test_mymsg m;
- sigset_t sigmask;
-
- Tst_count = 0;
-
- /*
- * Install a SIGSYS handler so that we can exit gracefully if
- * System V Message Queue support isn't in the kernel.
- */
- sa.sa_handler = sigsys_handler;
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = 0;
- if (sigaction(SIGSYS, &sa, NULL) == -1)
- tst_brkm (TBROK, cleanup, "sigaction SIGSYS");
-
- /*
- * Install and SIGCHLD handler to deal with all possible exit
- * conditions of the receiver.
- */
- sa.sa_handler = sigchld_handler;
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = 0;
- if (sigaction(SIGCHLD, &sa, NULL) == -1)
- tst_brkm (TBROK, cleanup, "sigaction SIGCHLD");
-
- msgkey = ftok("/", 4160);
- tst_resm (msgkey == (key_t)-1 ? TFAIL : TPASS,
- "ftok(\"/\") returns valid value");
-
- /*
- * Initialize child_pid to ourselves to that the cleanup function
- * works before we create the receiver.
- */
- child_pid = getpid();
-
- sender_msqid = msgget(msgkey, IPC_CREAT | 0640);
- tst_resm (sender_msqid == -1 ? TFAIL : TPASS, "sender calls msgget");
-
- tst_resm (msgctl(sender_msqid, IPC_STAT, &m_ds) == -1 ? TFAIL : TPASS,
- "msgctl IPC_STAT");
-
- print_msqid_ds(&m_ds, 0640);
-
- m_ds.msg_perm.mode = (m_ds.msg_perm.mode & ~0777) | 0600;
-
- tst_resm (msgctl(sender_msqid, IPC_SET, &m_ds) == -1 ? TFAIL : TPASS,
- "msgctl IPC_SET");
-
- bzero(&m_ds, sizeof m_ds);
-
- tst_resm (msgctl(sender_msqid, IPC_STAT, &m_ds) == -1 ? TFAIL : TPASS,
- "msgctl IPC_STAT");
-
- tst_resm ((m_ds.msg_perm.mode & 0777) != 0600 ? TFAIL : TPASS,
- "IPC_SET of mode holds");
-
- print_msqid_ds(&m_ds, 0600);
-
- switch ((child_pid = fork())) {
- case -1:
- tst_brkm (TBROK, cleanup, "fork");
- /* NOTREACHED */
-
- case 0:
- tst_resm (TPASS, "fork");
- receiver();
- break;
-
- default:
- Tst_count += 8;
- break;
- }
-
- /*
- * Send the first message to the receiver and wait for the ACK.
- */
- m.mtype = MTYPE_1;
- strcpy(m.mtext, m1_str);
- tst_resm (msgsnd(sender_msqid, &m, sizeof(m), 0) == -1 ? TFAIL : TPASS,
- "sender: msgsnd 1");
-
- tst_resm (msgrcv(sender_msqid, &m, sizeof(m), MTYPE_1_ACK, 0)
- != sizeof(m) ? TFAIL : TPASS, "sender: msgrcv 1 ack");
-
- print_msqid_ds(&m_ds, 0600);
-
- /*
- * Send the second message to the receiver and wait for the ACK.
- */
- m.mtype = MTYPE_2;
- strcpy(m.mtext, m2_str);
- tst_resm (msgsnd(sender_msqid, &m, sizeof(m), 0) == -1 ? TFAIL : TPASS,
- "sender: msgsnd 2");
-
- tst_resm (msgrcv(sender_msqid, &m, sizeof(m), MTYPE_2_ACK, 0)
- != sizeof(m) ? TFAIL : TPASS, "sender: msgrcv 2 ack");
-
- /*
- * Suspend forever; when we get SIGCHLD, the handler will exit.
- */
- sigemptyset(&sigmask);
- (void) sigsuspend(&sigmask);
-
- /*
- * ...and any other signal is an unexpected error.
- */
- tst_brkm (TBROK, cleanup, "sender: received unexpected signal");
- exit (1);
-}
-
-void
-sigsys_handler(int signo)
-{
-
- tst_brkm (TBROK, cleanup,
- "System V Message Queue support is not present in the kernel");
-}
-
-void
-sigchld_handler(int signo)
-{
- struct msqid_ds m_ds;
- int cstatus;
-
- /*
- * Reap the child; if it exited successfully, then the test passed!
- */
- if (waitpid(child_pid, &cstatus, 0) != child_pid)
- tst_brkm (TBROK, cleanup, "waitpid");
-
- if (WIFEXITED(cstatus) == 0)
- tst_brkm (TBROK, cleanup, "receiver exited abnormally");
-
- if (WEXITSTATUS(cstatus) != 0)
- tst_brkm (TBROK, cleanup, "receiver exited with status %d",
- WEXITSTATUS(cstatus));
-
- /*
- * If we get here, the child has exited normally, and thus
- * we should exit normally too. First, tho, we print out
- * the final stats for the message queue.
- */
-
- tst_resm (msgctl(sender_msqid, IPC_STAT, &m_ds) == -1 ? TFAIL : TPASS,
- "msgctl IPC_STAT");
-
- print_msqid_ds(&m_ds, 0600);
-
- cleanup ();
-}
-
-void
-cleanup()
-{
-
- /*
- * If we're the sender, and it exists, remove the message queue.
- */
- if (child_pid != 0 && sender_msqid != -1) {
- tst_resm (msgctl(sender_msqid, IPC_RMID, NULL) == -1
- ? TFAIL : TPASS, "msgctl IPC_RMID");
- }
- tst_exit ();
-}
-
-void
-print_msqid_ds(struct msqid_ds *mp, mode_t mode)
-{
- uid_t uid = geteuid();
- gid_t gid = getegid();
-
- printf("PERM: uid %d, gid %d, cuid %d, cgid %d, mode 0%o\n",
- (int)mp->msg_perm.uid, (int)mp->msg_perm.gid,
- (int)mp->msg_perm.cuid, (int)mp->msg_perm.cgid,
- mp->msg_perm.mode & 0777);
-
- printf("qnum %lu, qbytes %lu, lspid %d, lrpid %d\n",
- mp->msg_qnum, (u_long)mp->msg_qbytes, mp->msg_lspid,
- mp->msg_lrpid);
-
- printf("stime: %s", ctime(&mp->msg_stime));
- printf("rtime: %s", ctime(&mp->msg_rtime));
- printf("ctime: %s", ctime(&mp->msg_ctime));
-
- /*
- * Sanity check a few things.
- */
-
- tst_resm (mp->msg_perm.uid != uid || mp->msg_perm.cuid != uid
- ? TFAIL : TPASS, "uid matches");
-
- tst_resm (mp->msg_perm.gid != gid || mp->msg_perm.cgid != gid
- ? TFAIL : TPASS, "gid matches");
-
- tst_resm ((mp->msg_perm.mode & 0777) != mode ? TFAIL : TPASS,
- "mode matches");
-}
-
-void
-receiver()
-{
- struct test_mymsg m;
- int msqid;
-
- tst_resm ((msqid = msgget(msgkey, 0)) == -1 ? TFAIL : TPASS,
- "receiver: msgget");
-
- /*
- * Receive the first message, print it, and send an ACK.
- */
-
- tst_resm (msgrcv(msqid, &m, sizeof(m), MTYPE_1, 0) != sizeof(m)
- ? TFAIL : TPASS, "receiver: msgrcv 1");
-
- printf("%s\n", m.mtext);
- tst_resm (strcmp(m.mtext, m1_str) != 0 ? TFAIL : TPASS,
- "receiver: message 1 data is correct");
-
- m.mtype = MTYPE_1_ACK;
-
- tst_resm (msgsnd(msqid, &m, sizeof(m), 0) == -1 ? TFAIL : TPASS,
- "receiver: msgsnd ack 1");
-
- /*
- * Receive the second message, print it, and send an ACK.
- */
-
- tst_resm (msgrcv(msqid, &m, sizeof(m), MTYPE_2, 0) != sizeof(m)
- ? TFAIL : TPASS, "receiver: msgrcv 2");
-
- printf("%s\n", m.mtext);
- tst_resm (strcmp(m.mtext, m2_str) != 0 ? TFAIL : TPASS,
- "receiver: message 2 data is correct");
-
- m.mtype = MTYPE_2_ACK;
-
- tst_resm (msgsnd(msqid, &m, sizeof(m), 0) == -1 ? TFAIL : TPASS,
- "receiver: msgsnd ack 2");
-
- /* Allow parent to receive message before getting SIGCHLD. */
- sleep (1);
- exit(0);
-}
diff --git a/winsup/testsuite/winsup.api/nullgetcwd.c b/winsup/testsuite/winsup.api/nullgetcwd.c
deleted file mode 100644
index 25bdf45..0000000
--- a/winsup/testsuite/winsup.api/nullgetcwd.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdlib.h>
-int
-main (int argc, char **argv)
-{
- char *cwd = getcwd (NULL, 256);
- if (cwd == NULL)
- {
- fprintf (stderr, "%s: getcwd returns NULL\n", argv[0]);
- exit (1);
- }
-
- exit (0);
-}
-
diff --git a/winsup/testsuite/winsup.api/pthread/cancel1.c b/winsup/testsuite/winsup.api/pthread/cancel1.c
deleted file mode 100644
index 96ae390..0000000
--- a/winsup/testsuite/winsup.api/pthread/cancel1.c
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * File: cancel1.c
- *
- * Test Synopsis: Test setting cancel state and cancel type.
- * -
- *
- * Test Method (Validation or Falsification):
- * -
- *
- * Requirements Tested:
- * - pthread_setcancelstate function
- * - pthread_setcanceltype function
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * -
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * - pthread_create, pthread_self work.
- *
- * Pass Criteria:
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-
-/*
- * Create NUMTHREADS threads in addition to the Main thread.
- */
-enum {
- NUMTHREADS = 10
-};
-
-typedef struct bag_t_ bag_t;
-struct bag_t_ {
- int threadnum;
- int started;
- /* Add more per-thread state variables here */
-};
-
-static bag_t threadbag[NUMTHREADS + 1];
-
-void *
-mythread(void * arg)
-{
- bag_t * bag = (bag_t *) arg;
-
- assert(bag == &threadbag[bag->threadnum]);
- assert(bag->started == 0);
- bag->started = 1;
-
- /* ... */
- {
- int oldstate;
- int oldtype;
-
- assert(pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &oldstate) == 0);
- assert(oldstate == PTHREAD_CANCEL_ENABLE); /* Check default */
- assert(pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL) == 0);
- assert(pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL) == 0);
- assert(pthread_setcancelstate(oldstate, &oldstate) == 0);
- assert(oldstate == PTHREAD_CANCEL_DISABLE); /* Check setting */
-
- assert(pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype) == 0);
- assert(oldtype == PTHREAD_CANCEL_DEFERRED); /* Check default */
- assert(pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL) == 0);
- assert(pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL) == 0);
- assert(pthread_setcanceltype(oldtype, &oldtype) == 0);
- assert(oldtype == PTHREAD_CANCEL_ASYNCHRONOUS); /* Check setting */
- }
-
- return 0;
-}
-
-int
-main()
-{
- int failed = 0;
- int i;
- pthread_t t[NUMTHREADS + 1];
-
- assert((t[0] = pthread_self()) != NULL);
-
- for (i = 1; i <= NUMTHREADS; i++)
- {
- threadbag[i].started = 0;
- threadbag[i].threadnum = i;
- assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);
- }
-
- /*
- * Code to control or munipulate child threads should probably go here.
- */
-
- /*
- * Give threads time to run.
- */
- Sleep(NUMTHREADS * 1000);
-
- /*
- * Standard check that all threads started.
- */
- for (i = 1; i <= NUMTHREADS; i++)
- {
- failed = !threadbag[i].started;
-
- if (failed)
- {
- fprintf(stderr, "Thread %d: started %d\n", i, threadbag[i].started);
- }
- }
-
- assert(!failed);
-
- /*
- * Check any results here. Set "failed" and only print ouput on failure.
- */
- for (i = 1; i <= NUMTHREADS; i++)
- {
- /* ... */
- }
-
- assert(!failed);
-
- /*
- * Success.
- */
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/cancel10.c b/winsup/testsuite/winsup.api/pthread/cancel10.c
deleted file mode 100644
index 5e0cc67..0000000
--- a/winsup/testsuite/winsup.api/pthread/cancel10.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * File: cancel10.c
- *
- * Test Synopsis: Test if system is a cancellation point.
- *
- * Test Method (Validation or Falsification):
- * -
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * -
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * - have working pthread_create, pthread_cancel, pthread_setcancelstate
- * pthread_join
- *
- * Pass Criteria:
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-
-static int cancelled = 0;
-
-static void *Thread(void *punused)
-{
- while (!cancelled)
- Sleep (0);
-
- system (NULL);
-
- return NULL;
-}
-
-int main (void)
-{
- void * result;
- pthread_t t;
-
- assert (pthread_create (&t, NULL, Thread, NULL) == 0);
- assert (pthread_cancel (t) == 0);
- cancelled = 1;
- assert (pthread_join (t, &result) == 0);
- assert (result == PTHREAD_CANCELED);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/cancel11.c b/winsup/testsuite/winsup.api/pthread/cancel11.c
deleted file mode 100644
index b6554ed..0000000
--- a/winsup/testsuite/winsup.api/pthread/cancel11.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * File: cancel11.c
- *
- * Test Synopsis: Test if system is a cancellation point.
- *
- * Test Method (Validation or Falsification):
- * -
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * -
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * - have working pthread_create, pthread_cancel, pthread_setcancelstate
- * pthread_join
- *
- * Pass Criteria:
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-
-static void sig_handler(int sig)
-{
-}
-
-static void *Thread(void *punused)
-{
- system ("sleep 10");
-
- return NULL;
-}
-
-int main (void)
-{
- void * result;
- pthread_t t;
-
- signal (SIGINT, sig_handler);
-
- assert (pthread_create (&t, NULL, Thread, NULL) == 0);
- sleep (5);
- assert (pthread_cancel (t) == 0);
- assert (pthread_join (t, &result) == 0);
- assert (result == PTHREAD_CANCELED);
-
- assert ((void *)signal (SIGINT, NULL) == sig_handler);
-
- /* Wait until child process has terminated */
- sleep (10);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/cancel12.c b/winsup/testsuite/winsup.api/pthread/cancel12.c
deleted file mode 100644
index 12273d6..0000000
--- a/winsup/testsuite/winsup.api/pthread/cancel12.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * File: cancel12.c
- *
- * Test Synopsis: Test if system is a cancellation point.
- *
- * Test Method (Validation or Falsification):
- * -
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * -
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * - have working pthread_create, pthread_cancel, pthread_setcancelstate
- * pthread_join
- *
- * Pass Criteria:
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-
-static void sig_handler(int sig)
-{
-}
-
-static void *Thread(void *punused)
-{
- signal (SIGINT, sig_handler);
-
- system ("sleep 5");
-
- assert ((void *)signal (SIGINT, NULL) == sig_handler);
-
- return NULL;
-}
-
-int main (void)
-{
- void * result;
- pthread_t t;
-
- assert (pthread_create (&t, NULL, Thread, NULL) == 0);
- assert (pthread_join (t, &result) == 0);
- assert (result == NULL);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/cancel2.c b/winsup/testsuite/winsup.api/pthread/cancel2.c
deleted file mode 100644
index 1488931..0000000
--- a/winsup/testsuite/winsup.api/pthread/cancel2.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * File: cancel2.c
- *
- * Test Synopsis: Test SEH or C++ cancel exception handling within
- * application exception blocks.
- *
- * Test Method (Validation or Falsification):
- * -
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * -
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock
- * pthread_testcancel, pthread_cancel, pthread_join
- *
- * Pass Criteria:
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-
-/*
- * Create NUMTHREADS threads in addition to the Main thread.
- */
-enum {
- NUMTHREADS = 10
-};
-
-typedef struct bag_t_ bag_t;
-struct bag_t_ {
- int threadnum;
- int started;
- /* Add more per-thread state variables here */
-};
-
-static bag_t threadbag[NUMTHREADS + 1];
-
-static pthread_mutex_t waitLock = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
-
-void *
-mythread(void * arg)
-{
- int result = 0;
- bag_t * bag = (bag_t *) arg;
-
- assert(bag == &threadbag[bag->threadnum]);
- assert(bag->started == 0);
- bag->started = 1;
-
- /* Set to known state and type */
-
- assert(pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL) == 0);
-
- switch (bag->threadnum % 2)
- {
- case 0:
- assert(pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL) == 0);
- result = 0;
- break;
- case 1:
- assert(pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL) == 0);
- result = 1;
- break;
- }
-
- /* Wait for go from main */
- assert(pthread_mutex_lock(&waitLock) == 0);
- assert(pthread_mutex_unlock(&waitLock) == 0);
- sched_yield();
-
- for (;;)
- {
- pthread_testcancel();
- }
-
- return (void *) result;
-}
-
-int
-main()
-{
- int failed = 0;
- int i;
- pthread_t t[NUMTHREADS + 1];
-
- assert((t[0] = pthread_self()) != NULL);
- assert(pthread_mutex_lock(&waitLock) == 0);
-
- for (i = 1; i <= NUMTHREADS; i++)
- {
- threadbag[i].started = 0;
- threadbag[i].threadnum = i;
- assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);
- }
-
- /*
- * Code to control or munipulate child threads should probably go here.
- */
- Sleep(500);
-
- assert(pthread_mutex_unlock(&waitLock) == 0);
-
- Sleep(500);
-
- for (i = 1; i <= NUMTHREADS; i++)
- {
- assert(pthread_cancel(t[i]) == 0);
- }
-
- /*
- * Give threads time to run.
- */
- Sleep(NUMTHREADS * 100);
-
- /*
- * Standard check that all threads started.
- */
- for (i = 1; i <= NUMTHREADS; i++)
- {
- if (!threadbag[i].started)
- {
- failed |= !threadbag[i].started;
- fprintf(stderr, "Thread %d: started %d\n", i, threadbag[i].started);
- }
- }
-
- assert(!failed);
-
- /*
- * Check any results here. Set "failed" and only print output on failure.
- */
- failed = 0;
- for (i = 1; i <= NUMTHREADS; i++)
- {
- int fail = 0;
- int result = 0;
-
- assert(pthread_join(t[i], (void **) &result) == 0);
- fail = (result != (int) PTHREAD_CANCELED);
- if (fail)
- {
- fprintf(stderr, "Thread %d: started %d: location %d: cancel type %s\n",
- i,
- threadbag[i].started,
- result,
- ((result % 2) == 0) ? "ASYNCHRONOUS" : "DEFERRED");
- }
- failed |= fail;
- }
-
- assert(!failed);
-
- /*
- * Success.
- */
- return 0;
-}
-
diff --git a/winsup/testsuite/winsup.api/pthread/cancel3.c b/winsup/testsuite/winsup.api/pthread/cancel3.c
deleted file mode 100644
index 3ac03e4..0000000
--- a/winsup/testsuite/winsup.api/pthread/cancel3.c
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * File: cancel3.c
- *
- * Test Synopsis: Test asynchronous cancelation.
- *
- * Test Method (Validation or Falsification):
- * -
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * -
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock
- * pthread_testcancel, pthread_cancel, pthread_join
- *
- * Pass Criteria:
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-
-/*
- * Create NUMTHREADS threads in addition to the Main thread.
- */
-enum {
- NUMTHREADS = 10
-};
-
-typedef struct bag_t_ bag_t;
-struct bag_t_ {
- int threadnum;
- int started;
- /* Add more per-thread state variables here */
- int count;
-};
-
-static bag_t threadbag[NUMTHREADS + 1];
-
-void *
-mythread(void * arg)
-{
- int result = ((int)PTHREAD_CANCELED + 1);
- bag_t * bag = (bag_t *) arg;
-
- assert(bag == &threadbag[bag->threadnum]);
- assert(bag->started == 0);
- bag->started = 1;
-
- /* Set to known state and type */
-
- assert(pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL) == 0);
-
- assert(pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL) == 0);
-
- /*
- * We wait up to 10 seconds, waking every 0.1 seconds,
- * for a cancelation to be applied to us.
- */
- for (bag->count = 0; bag->count < 100; bag->count++)
- Sleep(100);
-
- return (void *) result;
-}
-
-int
-main()
-{
- int failed = 0;
- int i;
- pthread_t t[NUMTHREADS + 1];
-
- assert((t[0] = pthread_self()) != NULL);
-
- for (i = 1; i <= NUMTHREADS; i++)
- {
- threadbag[i].started = 0;
- threadbag[i].threadnum = i;
- assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);
- }
-
- /*
- * Code to control or munipulate child threads should probably go here.
- */
- Sleep(500);
-
- for (i = 1; i <= NUMTHREADS; i++)
- {
- assert(pthread_cancel(t[i]) == 0);
- }
-
- /*
- * Give threads time to run.
- */
- Sleep(NUMTHREADS * 100);
-
- /*
- * Standard check that all threads started.
- */
- for (i = 1; i <= NUMTHREADS; i++)
- {
- if (!threadbag[i].started)
- {
- failed |= !threadbag[i].started;
- fprintf(stderr, "Thread %d: started %d\n", i, threadbag[i].started);
- }
- }
-
- assert(!failed);
-
- /*
- * Check any results here. Set "failed" and only print output on failure.
- */
- failed = 0;
- for (i = 1; i <= NUMTHREADS; i++)
- {
- int fail = 0;
- int result = 0;
-
- /*
- * The thread does not contain any cancelation points, so
- * a return value of PTHREAD_CANCELED confirms that async
- * cancelation succeeded.
- */
- assert(pthread_join(t[i], (void **) &result) == 0);
-
- fail = (result != (int) PTHREAD_CANCELED);
-
- if (fail)
- {
- fprintf(stderr, "Thread %d: started %d: count %d\n",
- i,
- threadbag[i].started,
- threadbag[i].count);
- }
- failed = (failed || fail);
- }
-
- assert(!failed);
-
- /*
- * Success.
- */
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/cancel4.c b/winsup/testsuite/winsup.api/pthread/cancel4.c
deleted file mode 100644
index d6b2ffa..0000000
--- a/winsup/testsuite/winsup.api/pthread/cancel4.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * File: cancel4.c
- *
- * Test Synopsis: Test cancelation does not occur in deferred
- * cancelation threads with no cancelation points.
- *
- * Test Method (Validation or Falsification):
- * -
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * -
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * - pthread_create
- * pthread_self
- * pthread_cancel
- * pthread_join
- * pthread_setcancelstate
- * pthread_setcanceltype
- *
- * Pass Criteria:
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-
-/*
- * Create NUMTHREADS threads in addition to the Main thread.
- */
-enum {
- NUMTHREADS = 10
-};
-
-typedef struct bag_t_ bag_t;
-struct bag_t_ {
- int threadnum;
- int started;
- /* Add more per-thread state variables here */
- int count;
-};
-
-static bag_t threadbag[NUMTHREADS + 1];
-
-void *
-mythread(void * arg)
-{
- int result = ((int)PTHREAD_CANCELED + 1);
- bag_t * bag = (bag_t *) arg;
-
- assert(bag == &threadbag[bag->threadnum]);
- assert(bag->started == 0);
- bag->started = 1;
-
- /* Set to known state and type */
-
- assert(pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL) == 0);
-
- assert(pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL) == 0);
-
- /*
- * We wait up to 10 seconds, waking every 0.1 seconds,
- * for a cancelation to be applied to us.
- */
- for (bag->count = 0; bag->count < 100; bag->count++)
- Sleep(100);
-
- return (void *) result;
-}
-
-int
-main()
-{
- int failed = 0;
- int i;
- pthread_t t[NUMTHREADS + 1];
-
- assert((t[0] = pthread_self()) != NULL);
-
- for (i = 1; i <= NUMTHREADS; i++)
- {
- threadbag[i].started = 0;
- threadbag[i].threadnum = i;
- assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);
- }
-
- /*
- * Code to control or munipulate child threads should probably go here.
- */
- Sleep(500);
-
- for (i = 1; i <= NUMTHREADS; i++)
- {
- assert(pthread_cancel(t[i]) == 0);
- }
-
- /*
- * Give threads time to run.
- */
- Sleep(NUMTHREADS * 100);
-
- /*
- * Standard check that all threads started.
- */
- for (i = 1; i <= NUMTHREADS; i++)
- {
- if (!threadbag[i].started)
- {
- failed |= !threadbag[i].started;
- fprintf(stderr, "Thread %d: started %d\n", i, threadbag[i].started);
- }
- }
-
- assert(!failed);
-
- /*
- * Check any results here. Set "failed" and only print output on failure.
- */
- failed = 0;
- for (i = 1; i <= NUMTHREADS; i++)
- {
- int fail = 0;
- int result = 0;
-
- /*
- * The thread does not contain any cancelation points, so
- * a return value of PTHREAD_CANCELED indicates that async
- * cancelation occurred.
- */
- assert(pthread_join(t[i], (void **) &result) == 0);
-
- fail = (result == (int) PTHREAD_CANCELED);
-
- if (fail)
- {
- fprintf(stderr, "Thread %d: started %d: count %d\n",
- i,
- threadbag[i].started,
- threadbag[i].count);
- }
- failed = (failed || fail);
- }
-
- assert(!failed);
-
- /*
- * Success.
- */
- return 0;
-}
-
diff --git a/winsup/testsuite/winsup.api/pthread/cancel5.c b/winsup/testsuite/winsup.api/pthread/cancel5.c
deleted file mode 100644
index 9dd5795..0000000
--- a/winsup/testsuite/winsup.api/pthread/cancel5.c
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * File: cancel5.c
- *
- * Test Synopsis: Test calling pthread_cancel from the main thread
- * without calling pthread_self() in main.
- *
- * Test Method (Validation or Falsification):
- * -
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * -
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock
- * pthread_testcancel, pthread_cancel, pthread_join
- *
- * Pass Criteria:
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-
-/*
- * Create NUMTHREADS threads in addition to the Main thread.
- */
-enum {
- NUMTHREADS = 10
-};
-
-typedef struct bag_t_ bag_t;
-struct bag_t_ {
- int threadnum;
- int started;
- /* Add more per-thread state variables here */
- int count;
-};
-
-static bag_t threadbag[NUMTHREADS + 1];
-
-void *
-mythread(void * arg)
-{
- int result = ((int)PTHREAD_CANCELED + 1);
- bag_t * bag = (bag_t *) arg;
-
- assert(bag == &threadbag[bag->threadnum]);
- assert(bag->started == 0);
- bag->started = 1;
-
- /* Set to known state and type */
-
- assert(pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL) == 0);
-
- assert(pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL) == 0);
-
- /*
- * We wait up to 10 seconds, waking every 0.1 seconds,
- * for a cancelation to be applied to us.
- */
- for (bag->count = 0; bag->count < 100; bag->count++)
- Sleep(100);
-
- return (void *) result;
-}
-
-int
-main()
-{
- int failed = 0;
- int i;
- pthread_t t[NUMTHREADS + 1];
-
- for (i = 1; i <= NUMTHREADS; i++)
- {
- threadbag[i].started = 0;
- threadbag[i].threadnum = i;
- assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);
- }
-
- /*
- * Code to control or munipulate child threads should probably go here.
- */
- Sleep(500);
-
- for (i = 1; i <= NUMTHREADS; i++)
- {
- assert(pthread_cancel(t[i]) == 0);
- }
-
- /*
- * Give threads time to run.
- */
- Sleep(NUMTHREADS * 100);
-
- /*
- * Standard check that all threads started.
- */
- for (i = 1; i <= NUMTHREADS; i++)
- {
- if (!threadbag[i].started)
- {
- failed |= !threadbag[i].started;
- fprintf(stderr, "Thread %d: started %d\n", i, threadbag[i].started);
- }
- }
-
- assert(!failed);
-
- /*
- * Check any results here. Set "failed" and only print output on failure.
- */
- failed = 0;
- for (i = 1; i <= NUMTHREADS; i++)
- {
- int fail = 0;
- int result = 0;
-
- /*
- * The thread does not contain any cancelation points, so
- * a return value of PTHREAD_CANCELED confirms that async
- * cancelation succeeded.
- */
- assert(pthread_join(t[i], (void **) &result) == 0);
-
- fail = (result != (int) PTHREAD_CANCELED);
-
- if (fail)
- {
- fprintf(stderr, "Thread %d: started %d: count %d\n",
- i,
- threadbag[i].started,
- threadbag[i].count);
- }
- failed = (failed || fail);
- }
-
- assert(!failed);
-
- /*
- * Success.
- */
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/cancel6.c b/winsup/testsuite/winsup.api/pthread/cancel6.c
deleted file mode 100644
index 8f0bdd8..0000000
--- a/winsup/testsuite/winsup.api/pthread/cancel6.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * File: cancel6.c
- *
- * Test Synopsis: Test if pause is a cancellation point.
- *
- * Test Method (Validation or Falsification):
- * -
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * -
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * - have working pthread_create, pthread_cancel, pthread_setcancelstate
- * pthread_join
- *
- * Pass Criteria:
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-
-static void *Thread(void *punused)
-{
- pause ();
-
- return NULL;
-}
-
-int main (void)
-{
- void * result;
- pthread_t t;
-
- assert (pthread_create (&t, NULL, Thread, NULL) == 0);
- assert (pthread_cancel (t) == 0);
- assert (pthread_join (t, &result) == 0);
- assert (result == PTHREAD_CANCELED);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/cancel7.c b/winsup/testsuite/winsup.api/pthread/cancel7.c
deleted file mode 100644
index 7a631f6..0000000
--- a/winsup/testsuite/winsup.api/pthread/cancel7.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * File: cancel7.c
- *
- * Test Synopsis: Test if sleep is a cancellation point.
- *
- * Test Method (Validation or Falsification):
- * -
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * -
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * - have working pthread_create, pthread_cancel, pthread_setcancelstate
- * pthread_join
- *
- * Pass Criteria:
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-
-static int has5secsleeped = 0;
-
-static void *Thread(void *punused)
-{
- assert (pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, NULL) == 0);
- /* thread should sleep 5 seconds and not get canceled */
- sleep(5);
- has5secsleeped = 1;
- assert (pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, NULL) == 0);
- /* thread should cancel here */
- sleep (5);
-
- return NULL;
-}
-
-int main (void)
-{
- void * result;
- pthread_t t;
-
- assert (pthread_create (&t, NULL, Thread, NULL) == 0);
- assert (pthread_cancel (t) == 0);
- assert (pthread_join (t, &result) == 0);
- assert (has5secsleeped == 1);
- assert (result == PTHREAD_CANCELED);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/cancel8.c b/winsup/testsuite/winsup.api/pthread/cancel8.c
deleted file mode 100644
index fb30fd9..0000000
--- a/winsup/testsuite/winsup.api/pthread/cancel8.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * File: cancel8.c
- *
- * Test Synopsis: Test if usleep is a cancellation point.
- *
- * Test Method (Validation or Falsification):
- * -
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * -
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * - have working pthread_create, pthread_cancel, pthread_setcancelstate
- * pthread_join
- *
- * Pass Criteria:
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-
-static int has5secsleeped = 0;
-
-static void *Thread(void *punused)
-{
- assert (pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, NULL) == 0);
- /* thread should usleep 5 seconds and not get canceled */
- usleep(5000000);
- has5secsleeped = 1;
- assert (pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, NULL) == 0);
- /* thread should cancel here */
- usleep(5000000);
-
- return NULL;
-}
-
-int main (void)
-{
- void * result;
- pthread_t t;
-
- assert (pthread_create (&t, NULL, Thread, NULL) == 0);
- assert (pthread_cancel (t) == 0);
- assert (pthread_join (t, &result) == 0);
- assert (has5secsleeped == 1);
- assert (result == PTHREAD_CANCELED);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/cancel9.c b/winsup/testsuite/winsup.api/pthread/cancel9.c
deleted file mode 100644
index 1cbf62d..0000000
--- a/winsup/testsuite/winsup.api/pthread/cancel9.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * File: cancel9.c
- *
- * Test Synopsis: Test if waitpid is a cancellation point.
- *
- * Test Method (Validation or Falsification):
- * -
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * -
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * - have working pthread_create, pthread_cancel, pthread_setcancelstate
- * pthread_join
- *
- * Pass Criteria:
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-#include <assert.h>
-#include <sys/wait.h>
-
-static pid_t pid;
-
-static void *Thread(void *punused)
-{
- int res;
-
- pid = fork ();
- assert (pid != -1);
- switch (pid)
- {
- case 0:
- sleep (10);
- break;
- default:
- assert (waitpid (pid, &res, 0) != -1);
- }
-
- return NULL;
-}
-
-int main (void)
-{
- int res;
-
- void * result;
- pthread_t t;
-
- assert (pthread_create (&t, NULL, Thread, NULL) == 0);
- sleep (5);
- assert (pthread_cancel (t) == 0);
- assert (pthread_join (t, &result) == 0);
- assert (result == PTHREAD_CANCELED);
- assert (waitpid (pid, &res, 0) != -1);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/cleanup2.c b/winsup/testsuite/winsup.api/pthread/cleanup2.c
deleted file mode 100644
index bcbaad3..0000000
--- a/winsup/testsuite/winsup.api/pthread/cleanup2.c
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * File: cleanup2.c
- *
- * Test Synopsis: Test cleanup handler executes (when thread is not canceled).
- *
- * Test Method (Validation or Falsification):
- * -
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * -
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock
- * pthread_testcancel, pthread_cancel, pthread_join
- *
- * Pass Criteria:
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-
-/*
- * Create NUMTHREADS threads in addition to the Main thread.
- */
-enum {
- NUMTHREADS = 10
-};
-
-typedef struct bag_t_ bag_t;
-struct bag_t_ {
- int threadnum;
- int started;
- /* Add more per-thread state variables here */
- int count;
-};
-
-static bag_t threadbag[NUMTHREADS + 1];
-
-static int pop_count = 0;
-
-static void
-increment_pop_count(void * arg)
-{
- int * c = (int *) arg;
-
- (*c)++;
-}
-
-void *
-mythread(void * arg)
-{
- int result = 0;
- bag_t * bag = (bag_t *) arg;
-
- assert(bag == &threadbag[bag->threadnum]);
- assert(bag->started == 0);
- bag->started = 1;
-
- pthread_cleanup_push(increment_pop_count, (void *) &pop_count);
-
- sched_yield();
-
- pthread_cleanup_pop(1);
-
- return (void *) result;
-}
-
-int
-main()
-{
- int failed = 0;
- int i;
- pthread_t t[NUMTHREADS + 1];
-
- assert((t[0] = pthread_self()) != NULL);
-
- for (i = 1; i <= NUMTHREADS; i++)
- {
- threadbag[i].started = 0;
- threadbag[i].threadnum = i;
- assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);
- }
-
- /*
- * Code to control or munipulate child threads should probably go here.
- */
- Sleep(1000);
-
- /*
- * Standard check that all threads started.
- */
- for (i = 1; i <= NUMTHREADS; i++)
- {
- if (!threadbag[i].started)
- {
- failed |= !threadbag[i].started;
- fprintf(stderr, "Thread %d: started %d\n", i, threadbag[i].started);
- }
- }
-
- assert(!failed);
-
- /*
- * Check any results here. Set "failed" and only print output on failure.
- */
- failed = 0;
- for (i = 1; i <= NUMTHREADS; i++)
- {
- int fail = 0;
- int result = 0;
-
- assert(pthread_join(t[i], (void **) &result) == 0);
-
- fail = (result != 0);
-
- if (fail)
- {
- fprintf(stderr, "Thread %d: started %d: result: %d\n",
- i,
- threadbag[i].started,
- result);
- }
- failed = (failed || fail);
- }
-
- assert(!failed);
-
- assert(pop_count == NUMTHREADS);
-
- /*
- * Success.
- */
- return 0;
-}
-
diff --git a/winsup/testsuite/winsup.api/pthread/cleanup3.c b/winsup/testsuite/winsup.api/pthread/cleanup3.c
deleted file mode 100644
index f8201fa..0000000
--- a/winsup/testsuite/winsup.api/pthread/cleanup3.c
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * File: cleanup3.c
- *
- * Test Synopsis: Test cleanup handler does not execute (when thread is
- * not canceled).
- *
- * Test Method (Validation or Falsification):
- * -
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * -
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * - have working pthread_create, pthread_self, pthread_mutex_lock/unlock
- * pthread_testcancel, pthread_cancel, pthread_join
- *
- * Pass Criteria:
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-
-/*
- * Create NUMTHREADS threads in addition to the Main thread.
- */
-enum {
- NUMTHREADS = 10
-};
-
-typedef struct bag_t_ bag_t;
-struct bag_t_ {
- int threadnum;
- int started;
- /* Add more per-thread state variables here */
- int count;
-};
-
-static bag_t threadbag[NUMTHREADS + 1];
-
-static int pop_count = 0;
-
-static void
-increment_pop_count(void * arg)
-{
- int * c = (int *) arg;
-
- (*c)++;
-}
-
-void *
-mythread(void * arg)
-{
- int result = 0;
- bag_t * bag = (bag_t *) arg;
-
- assert(bag == &threadbag[bag->threadnum]);
- assert(bag->started == 0);
- bag->started = 1;
-
- pthread_cleanup_push(increment_pop_count, (void *) &pop_count);
-
- sched_yield();
-
- pop_count--;
-
- pthread_cleanup_pop(0);
-
- return (void *) result;
-}
-
-int
-main()
-{
- int failed = 0;
- int i;
- pthread_t t[NUMTHREADS + 1];
-
- assert((t[0] = pthread_self()) != NULL);
-
- for (i = 1; i <= NUMTHREADS; i++)
- {
- threadbag[i].started = 0;
- threadbag[i].threadnum = i;
- assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);
- }
-
- /*
- * Code to control or munipulate child threads should probably go here.
- */
- Sleep(1000);
-
- /*
- * Standard check that all threads started.
- */
- for (i = 1; i <= NUMTHREADS; i++)
- {
- if (!threadbag[i].started)
- {
- failed |= !threadbag[i].started;
- fprintf(stderr, "Thread %d: started %d\n", i, threadbag[i].started);
- }
- }
-
- assert(!failed);
-
- /*
- * Check any results here. Set "failed" and only print output on failure.
- */
- failed = 0;
- for (i = 1; i <= NUMTHREADS; i++)
- {
- int fail = 0;
- int result = 0;
-
- assert(pthread_join(t[i], (void **) &result) == 0);
-
- fail = (result != 0);
-
- if (fail)
- {
- fprintf(stderr, "Thread %d: started %d: result: %d\n",
- i,
- threadbag[i].started,
- result);
- }
- failed = (failed || fail);
- }
-
- assert(!failed);
-
- assert(pop_count == -(NUMTHREADS));
-
- /*
- * Success.
- */
- return 0;
-}
-
diff --git a/winsup/testsuite/winsup.api/pthread/condvar1.c b/winsup/testsuite/winsup.api/pthread/condvar1.c
deleted file mode 100644
index daa0f42..0000000
--- a/winsup/testsuite/winsup.api/pthread/condvar1.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * File: condvar1.c
- *
- * Test Synopsis:
- * - Test initialisation and destruction of a CV.
- *
- * Test Method (Validation or Falsification):
- * - Validation
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * - Creates and then imediately destroys a CV. Does not
- * test the CV.
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * -
- *
- * Pass Criteria:
- * - pthread_cond_init returns 0, and
- * - pthread_cond_destroy returns 0.
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - pthread_cond_init returns non-zero, or
- * - pthread_cond_destroy returns non-zero.
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-
-static pthread_cond_t cv = NULL;
-
-int
-main()
-{
- assert(cv == NULL);
-
- assert(pthread_cond_init(&cv, NULL) == 0);
-
- assert(cv != NULL);
-
- assert(pthread_cond_destroy(&cv) == 0);
-
- assert(cv == NULL);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/condvar2.c b/winsup/testsuite/winsup.api/pthread/condvar2.c
deleted file mode 100644
index 309f5df..0000000
--- a/winsup/testsuite/winsup.api/pthread/condvar2.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * File: condvar2.c
- *
- * Test Synopsis:
- * - Test timed wait on a CV.
- *
- * Test Method (Validation or Falsification):
- * - Validation
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * - Because the CV is never signaled, we expect the wait to time out.
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * -
- *
- * Pass Criteria:
- * - pthread_cond_timedwait returns ETIMEDOUT.
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - pthread_cond_timedwait does not return ETIMEDOUT.
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-#include <sys/timeb.h>
-
-pthread_cond_t cv;
-pthread_mutex_t mutex;
-
-int
-main()
-{
- struct timespec abstime = { 0, 0 };
- struct timeb currSysTime;
- const DWORD NANOSEC_PER_MILLISEC = 1000000;
- int result;
-
- assert(pthread_cond_init(&cv, NULL) == 0);
-
- assert(pthread_mutex_init(&mutex, NULL) == 0);
-
- assert(pthread_mutex_lock(&mutex) == 0);
-
- /* get current system time */
- ftime(&currSysTime);
-
- abstime.tv_sec = currSysTime.time;
- abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
-
- abstime.tv_sec += 5;
-
- assert(pthread_cond_timedwait(&cv, &mutex, &abstime) == ETIMEDOUT);
-
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- result = pthread_cond_destroy(&cv);
- assert(result == 0);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/condvar2_1.c b/winsup/testsuite/winsup.api/pthread/condvar2_1.c
deleted file mode 100644
index da34162..0000000
--- a/winsup/testsuite/winsup.api/pthread/condvar2_1.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * File: condvar2_1.c
- *
- * Test Synopsis:
- * - Test timeout of multiple waits on a CV with no signal/broadcast.
- *
- * Test Method (Validation or Falsification):
- * - Validation
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * - Because the CV is never signaled, we expect the waits to time out.
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * -
- *
- * Pass Criteria:
- * - pthread_cond_timedwait returns ETIMEDOUT.
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - pthread_cond_timedwait does not return ETIMEDOUT.
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-#include <sys/timeb.h>
-
-static pthread_cond_t cv;
-static pthread_mutex_t mutex;
-static struct timespec abstime = { 0, 0 };
-
-enum {
- NUMTHREADS = 60
-};
-
-void *
-mythread(void * arg)
-{
- assert(pthread_mutex_lock(&mutex) == 0);
-
- assert(pthread_cond_timedwait(&cv, &mutex, &abstime) == ETIMEDOUT);
-
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- return arg;
-}
-
-int
-main()
-{
- int i;
- pthread_t t[NUMTHREADS + 1];
- int result = 0;
- struct timeb currSysTime;
- const DWORD NANOSEC_PER_MILLISEC = 1000000;
-
- assert(pthread_cond_init(&cv, NULL) == 0);
-
- assert(pthread_mutex_init(&mutex, NULL) == 0);
-
- /* get current system time */
- ftime(&currSysTime);
-
- abstime.tv_sec = currSysTime.time;
- abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
-
- abstime.tv_sec += 5;
-
- assert(pthread_mutex_lock(&mutex) == 0);
-
- for (i = 1; i <= NUMTHREADS; i++)
- {
- assert(pthread_create(&t[i], NULL, mythread, (void *) i) == 0);
- }
-
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- for (i = 1; i <= NUMTHREADS; i++)
- {
- assert(pthread_join(t[i], (void **) &result) == 0);
- assert(result == i);
- }
-
- result = pthread_cond_destroy(&cv);
- assert(result == 0);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/condvar3.c b/winsup/testsuite/winsup.api/pthread/condvar3.c
deleted file mode 100644
index 249e260..0000000
--- a/winsup/testsuite/winsup.api/pthread/condvar3.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * File: condvar3.c
- *
- * Test Synopsis:
- * - Test basic function of a CV
- *
- * Test Method (Validation or Falsification):
- * - Validation
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * - The primary thread takes the lock before creating any threads.
- * The secondary thread blocks on the lock allowing the primary
- * thread to enter the cv wait state which releases the lock.
- * The secondary thread then takes the lock and signals the waiting
- * primary thread.
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * -
- *
- * Pass Criteria:
- * - pthread_cond_timedwait returns 0.
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - pthread_cond_timedwait returns ETIMEDOUT.
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-#include <sys/timeb.h>
-
-static pthread_cond_t cv;
-static pthread_mutex_t mutex;
-static int shared = 0;
-
-enum {
- NUMTHREADS = 2 /* Including the primary thread. */
-};
-
-void *
-mythread(void * arg)
-{
- int result = 0;
-
- assert(pthread_mutex_lock(&mutex) == 0);
-
- shared++;
-
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- if ((result = pthread_cond_signal(&cv)) != 0)
- {
- printf("Error = %s\n", error_string[result]);
- }
- assert(result == 0);
-
- return (void *) 0;
-}
-
-int
-main()
-{
- pthread_t t[NUMTHREADS];
- struct timespec abstime = { 0, 0 };
- struct timeb currSysTime;
- const DWORD NANOSEC_PER_MILLISEC = 1000000;
-
- assert((t[0] = pthread_self()) != NULL);
-
- assert(pthread_cond_init(&cv, NULL) == 0);
-
- assert(pthread_mutex_init(&mutex, NULL) == 0);
-
- assert(pthread_mutex_lock(&mutex) == 0);
-
- /* get current system time */
- ftime(&currSysTime);
-
- abstime.tv_sec = currSysTime.time;
- abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
-
- assert(pthread_create(&t[1], NULL, mythread, (void *) 1) == 0);
-
- abstime.tv_sec += 5;
-
- while (! (shared > 0))
- assert(pthread_cond_timedwait(&cv, &mutex, &abstime) == 0);
-
- assert(shared > 0);
-
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- assert(pthread_cond_destroy(&cv) == 0);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/condvar3_1.c b/winsup/testsuite/winsup.api/pthread/condvar3_1.c
deleted file mode 100644
index b08b048..0000000
--- a/winsup/testsuite/winsup.api/pthread/condvar3_1.c
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * File: condvar3_1.c
- *
- * Test Synopsis:
- * - Test timeout of multiple waits on a CV with some signaled.
- *
- * Test Method (Validation or Falsification):
- * - Validation
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * - Because some CVs are never signaled, we expect their waits to time out.
- * Some are signaled, the rest time out. Pthread_cond_destroy() will fail
- * unless all are accounted for, either signaled or timedout.
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * -
- *
- * Pass Criteria:
- * - pthread_cond_timedwait returns ETIMEDOUT.
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - pthread_cond_timedwait does not return ETIMEDOUT.
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-#include <sys/timeb.h>
-
-static pthread_cond_t cv;
-static pthread_cond_t cv1;
-static pthread_mutex_t mutex;
-static struct timespec abstime = { 0, 0 };
-static int timedout = 0;
-static int signaled = 0;
-static int awoken = 0;
-static int waiting = 0;
-
-enum {
- NUMTHREADS = 60
-};
-
-void *
-mythread(void * arg)
-{
- int result;
-
- assert(pthread_mutex_lock(&mutex) == 0);
-
- if ( ++waiting == NUMTHREADS)
- assert(pthread_cond_signal(&cv1) == 0);
-
- result = pthread_cond_timedwait(&cv, &mutex, &abstime);
- if (result == ETIMEDOUT)
- {
- timedout++;
- }
- else
- {
- awoken++;
- }
-
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- return arg;
-}
-
-int
-main()
-{
- int i;
- pthread_t t[NUMTHREADS + 1];
- int result = 0;
- struct timeb currSysTime;
- const DWORD NANOSEC_PER_MILLISEC = 1000000;
-
- assert(pthread_cond_init(&cv, NULL) == 0);
- assert(pthread_cond_init(&cv1, NULL) == 0);
-
- assert(pthread_mutex_init(&mutex, NULL) == 0);
-
- /* get current system time */
- ftime(&currSysTime);
-
- abstime.tv_sec = currSysTime.time;
- abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
-
- abstime.tv_sec += 5;
-
- assert(pthread_mutex_lock(&mutex) == 0);
-
- for (i = 1; i <= NUMTHREADS; i++)
- {
- assert(pthread_create(&t[i], NULL, mythread, (void *) i) == 0);
- }
-
- do {
- assert(pthread_cond_wait(&cv1,&mutex) == 0);
- } while ( NUMTHREADS != waiting );
-
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- for (i = NUMTHREADS/3; i <= 2*NUMTHREADS/3; i++)
- {
- assert(pthread_cond_signal(&cv) == 0);
- signaled++;
- }
-
- for (i = 1; i <= NUMTHREADS; i++)
- {
- assert(pthread_join(t[i], (void **) &result) == 0);
- assert(result == i);
- }
-
- printf("awk = %d\n", awoken);
- printf("sig = %d\n", signaled);
- printf("tot = %d\n", timedout);
-
- assert(signaled == awoken);
- assert(timedout == NUMTHREADS - signaled);
-
- result = pthread_cond_destroy(&cv);
- assert(result == 0);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/condvar3_2.c b/winsup/testsuite/winsup.api/pthread/condvar3_2.c
deleted file mode 100644
index 57e7eb4..0000000
--- a/winsup/testsuite/winsup.api/pthread/condvar3_2.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * File: condvar3_2.c
- *
- * Test Synopsis:
- * - Test timeout of multiple waits on a CV with remainder broadcast awoken.
- *
- * Test Method (Validation or Falsification):
- * - Validation
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * - Because some CVs are never signaled, we expect their waits to time out.
- * Some time out, the rest are broadcast signaled. Pthread_cond_destroy() will fail
- * unless all are accounted for, either signaled or timedout.
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * -
- *
- * Pass Criteria:
- * - pthread_cond_timedwait returns ETIMEDOUT.
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - pthread_cond_timedwait does not return ETIMEDOUT.
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-#include <sys/timeb.h>
-
-static pthread_cond_t cv;
-static pthread_mutex_t mutex;
-static struct timespec abstime = { 0, 0 };
-static struct timespec abstime2 = { 0, 0 };
-static int timedout = 0;
-static int awoken = 0;
-
-enum {
- NUMTHREADS = 60
-};
-
-void *
-mythread(void * arg)
-{
- int result;
-
- assert(pthread_mutex_lock(&mutex) == 0);
-
- abstime2.tv_sec = abstime.tv_sec;
-
- if ((int) arg % 3 == 0)
- {
- abstime2.tv_sec += 2;
- }
-
- result = pthread_cond_timedwait(&cv, &mutex, &abstime2);
- if (result == ETIMEDOUT)
- {
- timedout++;
- }
- else
- {
- awoken++;
- }
-
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- return arg;
-}
-
-int
-main()
-{
- int i;
- pthread_t t[NUMTHREADS + 1];
- int result = 0;
- struct timeb currSysTime;
- const DWORD NANOSEC_PER_MILLISEC = 1000000;
-
- assert(pthread_cond_init(&cv, NULL) == 0);
-
- assert(pthread_mutex_init(&mutex, NULL) == 0);
-
- /* get current system time */
- ftime(&currSysTime);
-
- abstime.tv_sec = abstime.tv_sec = currSysTime.time + 5;
- abstime.tv_nsec = abstime2.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
-
- assert(pthread_mutex_lock(&mutex) == 0);
-
- for (i = 1; i <= NUMTHREADS; i++)
- {
- assert(pthread_create(&t[i], NULL, mythread, (void *) i) == 0);
- }
-
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- for (i = 1; i <= NUMTHREADS; i++)
- {
- assert(pthread_join(t[i], (void **) &result) == 0);
- assert(result == i);
- /*
- * Approximately 2/3rds of the threads are expected to time out.
- * Signal the remainder after some threads have woken up and exited
- * and while some are still waking up after timeout.
- * Also tests that redundant broadcasts don't return errors.
- */
- if (awoken > NUMTHREADS/3)
- {
- assert(pthread_cond_broadcast(&cv) == 0);
- }
- }
-
- assert(awoken == NUMTHREADS - timedout);
-
- result = pthread_cond_destroy(&cv);
- assert(result == 0);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/condvar3_3.c b/winsup/testsuite/winsup.api/pthread/condvar3_3.c
deleted file mode 100644
index f6bcca9..0000000
--- a/winsup/testsuite/winsup.api/pthread/condvar3_3.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * File: condvar3_3.c
- *
- * Test Synopsis:
- * - Test timeouts and lost signals on a CV.
- *
- * Test Method (Validation or Falsification):
- * - Validation
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * -
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * -
- *
- * Pass Criteria:
- * - pthread_cond_timedwait returns ETIMEDOUT.
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - pthread_cond_timedwait does not return ETIMEDOUT.
- * - Process returns non-zero exit status.
- */
-
-/* Timur Aydin (taydin@snet.net) */
-
-#include "test.h"
-
-#include <sys/timeb.h>
-
-pthread_cond_t cnd;
-pthread_mutex_t mtx;
-
-int main()
-{
- int rc;
-
- struct timespec abstime = { 0, 0 };
- struct timeb currSysTime;
- const DWORD NANOSEC_PER_MILLISEC = 1000000;
-
- assert(pthread_cond_init(&cnd, 0) == 0);
- assert(pthread_mutex_init(&mtx, 0) == 0);
-
- /* get current system time */
- ftime(&currSysTime);
-
- abstime.tv_sec = currSysTime.time;
- abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
- abstime.tv_sec += 1;
-
- /* Here pthread_cond_timedwait should time out after one second. */
-
- assert(pthread_mutex_lock(&mtx) == 0);
-
- assert((rc = pthread_cond_timedwait(&cnd, &mtx, &abstime)) == ETIMEDOUT);
-
- assert(pthread_mutex_unlock(&mtx) == 0);
-
- /* Here, the condition variable is signaled, but there are no
- threads waiting on it. The signal should be lost and
- the next pthread_cond_timedwait should time out too. */
-
- assert(pthread_mutex_lock(&mtx) == 0);
-
- assert((rc = pthread_cond_signal(&cnd)) == 0);
-
- assert(pthread_mutex_unlock(&mtx) == 0);
-
- assert(pthread_mutex_lock(&mtx) == 0);
-
- abstime.tv_sec = currSysTime.time;
- abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
- abstime.tv_sec += 1;
-
- assert((rc = pthread_cond_timedwait(&cnd, &mtx, &abstime)) == ETIMEDOUT);
-
- assert(pthread_mutex_unlock(&mtx) == 0);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/condvar4.c b/winsup/testsuite/winsup.api/pthread/condvar4.c
deleted file mode 100644
index 7a2007a..0000000
--- a/winsup/testsuite/winsup.api/pthread/condvar4.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * File: condvar4.c
- *
- * Test Synopsis:
- * - Test PTHREAD_COND_INITIALIZER.
- *
- * Test Method (Validation or Falsification):
- * - Validation
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * - Test basic CV function but starting with a static initialised
- * CV.
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * -
- *
- * Pass Criteria:
- * - pthread_cond_timedwait returns 0.
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - pthread_cond_timedwait returns ETIMEDOUT.
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-#include <sys/timeb.h>
-
-typedef struct cvthing_t_ cvthing_t;
-
-struct cvthing_t_ {
- pthread_cond_t notbusy;
- pthread_mutex_t lock;
- int shared;
-};
-
-static cvthing_t cvthing = {
- PTHREAD_COND_INITIALIZER,
- PTHREAD_MUTEX_INITIALIZER,
- 0
-};
-
-enum {
- NUMTHREADS = 2
-};
-
-void *
-mythread(void * arg)
-{
- assert(pthread_mutex_lock(&cvthing.lock) == 0);
-
- cvthing.shared++;
-
- assert(pthread_mutex_unlock(&cvthing.lock) == 0);
-
- assert(pthread_cond_signal(&cvthing.notbusy) == 0);
-
- return (void *) 0;
-}
-
-int
-main()
-{
- pthread_t t[NUMTHREADS];
- struct timespec abstime = { 0, 0 };
- struct timeb currSysTime;
- const DWORD NANOSEC_PER_MILLISEC = 1000000;
-
- cvthing.shared = 0;
-
- assert((t[0] = pthread_self()) != NULL);
-
- assert(cvthing.notbusy == PTHREAD_COND_INITIALIZER);
-
- assert(cvthing.lock == PTHREAD_MUTEX_INITIALIZER);
-
- assert(pthread_mutex_lock(&cvthing.lock) == 0);
-
- assert(cvthing.lock != PTHREAD_MUTEX_INITIALIZER);
-
- /* get current system time */
- ftime(&currSysTime);
-
- abstime.tv_sec = currSysTime.time;
- abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
-
- abstime.tv_sec += 5;
-
- assert(pthread_cond_timedwait(&cvthing.notbusy, &cvthing.lock, &abstime) == ETIMEDOUT);
-
- assert(cvthing.notbusy != PTHREAD_COND_INITIALIZER);
-
- assert(pthread_create(&t[1], NULL, mythread, (void *) 1) == 0);
-
- ftime(&currSysTime);
-
- abstime.tv_sec = currSysTime.time;
- abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
-
- abstime.tv_sec += 5;
-
- while (! (cvthing.shared > 0))
- assert(pthread_cond_timedwait(&cvthing.notbusy, &cvthing.lock, &abstime) == 0);
-
- assert(cvthing.shared > 0);
-
- assert(pthread_mutex_unlock(&cvthing.lock) == 0);
-
- assert(pthread_mutex_destroy(&cvthing.lock) == 0);
-
- assert(cvthing.lock == NULL);
-
- assert(pthread_cond_destroy(&cvthing.notbusy) == 0);
-
- assert(cvthing.notbusy == NULL);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/condvar5.c b/winsup/testsuite/winsup.api/pthread/condvar5.c
deleted file mode 100644
index b493ab1..0000000
--- a/winsup/testsuite/winsup.api/pthread/condvar5.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * File: condvar5.c
- *
- * Test Synopsis:
- * - Test pthread_cond_broadcast.
- *
- * Test Method (Validation or Falsification):
- * - Validation
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * - Test broadcast with one waiting CV.
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * -
- *
- * Pass Criteria:
- * - pthread_cond_timedwait returns 0.
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - pthread_cond_timedwait returns ETIMEDOUT.
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-#include <sys/timeb.h>
-
-typedef struct cvthing_t_ cvthing_t;
-
-struct cvthing_t_ {
- pthread_cond_t notbusy;
- pthread_mutex_t lock;
- int shared;
-};
-
-static cvthing_t cvthing = {
- PTHREAD_COND_INITIALIZER,
- PTHREAD_MUTEX_INITIALIZER,
- 0
-};
-
-enum {
- NUMTHREADS = 2
-};
-
-void *
-mythread(void * arg)
-{
- assert(pthread_mutex_lock(&cvthing.lock) == 0);
-
- cvthing.shared++;
-
- assert(pthread_mutex_unlock(&cvthing.lock) == 0);
-
- assert(pthread_cond_broadcast(&cvthing.notbusy) == 0);
-
- return (void *) 0;
-}
-
-int
-main()
-{
- pthread_t t[NUMTHREADS];
- struct timespec abstime = { 0, 0 };
- struct timeb currSysTime;
- const DWORD NANOSEC_PER_MILLISEC = 1000000;
-
- cvthing.shared = 0;
-
- assert((t[0] = pthread_self()) != NULL);
-
- assert(cvthing.notbusy == PTHREAD_COND_INITIALIZER);
-
- assert(cvthing.lock == PTHREAD_MUTEX_INITIALIZER);
-
- assert(pthread_mutex_lock(&cvthing.lock) == 0);
-
- assert(cvthing.lock != PTHREAD_MUTEX_INITIALIZER);
-
- /* get current system time */
- ftime(&currSysTime);
-
- abstime.tv_sec = currSysTime.time;
- abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
-
- abstime.tv_sec += 5;
-
- assert(pthread_cond_timedwait(&cvthing.notbusy, &cvthing.lock, &abstime) == ETIMEDOUT);
-
- assert(cvthing.notbusy != PTHREAD_COND_INITIALIZER);
-
- assert(pthread_create(&t[1], NULL, mythread, (void *) 1) == 0);
-
- ftime(&currSysTime);
-
- abstime.tv_sec = currSysTime.time;
- abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
-
- abstime.tv_sec += 5;
-
- while (! (cvthing.shared > 0))
- assert(pthread_cond_timedwait(&cvthing.notbusy, &cvthing.lock, &abstime) == 0);
-
- assert(cvthing.shared > 0);
-
- assert(pthread_mutex_unlock(&cvthing.lock) == 0);
-
- assert(pthread_mutex_destroy(&cvthing.lock) == 0);
-
- assert(cvthing.lock == NULL);
-
- assert(pthread_cond_destroy(&cvthing.notbusy) == 0);
-
- assert(cvthing.notbusy == NULL);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/condvar6.c b/winsup/testsuite/winsup.api/pthread/condvar6.c
deleted file mode 100644
index f011bea..0000000
--- a/winsup/testsuite/winsup.api/pthread/condvar6.c
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * File:
- *
- * Test Synopsis:
- * - Test pthread_cond_broadcast.
- *
- * Test Method (Validation or Falsification):
- * - Validation
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * - Test broadcast with NUMTHREADS (=5) waiting CVs.
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * -
- *
- * Pass Criteria:
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-#include <sys/timeb.h>
-
-/*
- * Create NUMTHREADS threads in addition to the Main thread.
- */
-enum {
- NUMTHREADS = 5
-};
-
-typedef struct bag_t_ bag_t;
-struct bag_t_ {
- int threadnum;
- int started;
- /* Add more per-thread state variables here */
-};
-
-static bag_t threadbag[NUMTHREADS + 1];
-
-typedef struct cvthing_t_ cvthing_t;
-
-struct cvthing_t_ {
- pthread_cond_t notbusy;
- pthread_mutex_t lock;
- int shared;
-};
-
-static cvthing_t cvthing = {
- PTHREAD_COND_INITIALIZER,
- PTHREAD_MUTEX_INITIALIZER,
- 0
-};
-
-static pthread_mutex_t start_flag = PTHREAD_MUTEX_INITIALIZER;
-
-static struct timespec abstime = { 0, 0 };
-
-static int awoken;
-
-void *
-mythread(void * arg)
-{
- bag_t * bag = (bag_t *) arg;
-
- assert(bag == &threadbag[bag->threadnum]);
- assert(bag->started == 0);
- bag->started = 1;
-
- /* Wait for the start gun */
- assert(pthread_mutex_lock(&start_flag) == 0);
- assert(pthread_mutex_unlock(&start_flag) == 0);
-
- assert(pthread_mutex_lock(&cvthing.lock) == 0);
-
- while (! (cvthing.shared > 0))
- assert(pthread_cond_timedwait(&cvthing.notbusy, &cvthing.lock, &abstime) == 0);
-
- assert(cvthing.shared > 0);
-
- awoken++;
-
- assert(pthread_mutex_unlock(&cvthing.lock) == 0);
-
- return (void *) 0;
-}
-
-int
-main()
-{
- int failed = 0;
- int i;
- pthread_t t[NUMTHREADS + 1];
-
- struct timeb currSysTime;
- const DWORD NANOSEC_PER_MILLISEC = 1000000;
-
- cvthing.shared = 0;
-
- assert((t[0] = pthread_self()) != NULL);
-
- assert(cvthing.notbusy == PTHREAD_COND_INITIALIZER);
-
- assert(cvthing.lock == PTHREAD_MUTEX_INITIALIZER);
-
- assert(pthread_mutex_lock(&start_flag) == 0);
-
- ftime(&currSysTime);
-
- abstime.tv_sec = currSysTime.time;
- abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
-
- abstime.tv_sec += 5;
-
- assert((t[0] = pthread_self()) != NULL);
-
- awoken = 0;
-
- for (i = 1; i <= NUMTHREADS; i++)
- {
- threadbag[i].started = 0;
- threadbag[i].threadnum = i;
- assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);
- }
-
- /*
- * Code to control or munipulate child threads should probably go here.
- */
-
- assert(pthread_mutex_unlock(&start_flag) == 0);
-
- /*
- * Give threads time to start.
- */
- Sleep(2000);
-
- assert(pthread_mutex_lock(&cvthing.lock) == 0);
-
- cvthing.shared++;
-
- assert(pthread_mutex_unlock(&cvthing.lock) == 0);
-
- assert(pthread_cond_broadcast(&cvthing.notbusy) == 0);
-
- /*
- * Give threads time to complete.
- */
- Sleep(2000);
-
- /*
- * Cleanup the CV.
- */
-
- assert(pthread_mutex_destroy(&cvthing.lock) == 0);
-
- assert(cvthing.lock == NULL);
-
- assert(pthread_cond_destroy(&cvthing.notbusy) == 0);
-
- assert(cvthing.notbusy == NULL);
-
- /*
- * Standard check that all threads started.
- */
- for (i = 1; i <= NUMTHREADS; i++)
- {
- failed = !threadbag[i].started;
-
- if (failed)
- {
- fprintf(stderr, "Thread %d: started %d\n", i, threadbag[i].started);
- }
- }
-
- assert(!failed);
-
- /*
- * Check any results here.
- */
-
- assert(awoken == NUMTHREADS);
-
- /*
- * Success.
- */
- return 0;
-}
-
-
diff --git a/winsup/testsuite/winsup.api/pthread/condvar7.c b/winsup/testsuite/winsup.api/pthread/condvar7.c
deleted file mode 100644
index 8e9808f..0000000
--- a/winsup/testsuite/winsup.api/pthread/condvar7.c
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * File: condvar7.c
- *
- *
- * Test Synopsis:
- * - Test pthread_cond_broadcast with thread cancelation.
- *
- * Test Method (Validation or Falsification):
- * - Validation
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * - Test broadcast with NUMTHREADS (=5) waiting CVs, one is canceled while waiting.
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * -
- *
- * Pass Criteria:
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-#include <sys/timeb.h>
-
-/*
- * Create NUMTHREADS threads in addition to the Main thread.
- */
-enum {
- NUMTHREADS = 5
-};
-
-typedef struct bag_t_ bag_t;
-struct bag_t_ {
- int threadnum;
- int started;
- /* Add more per-thread state variables here */
-};
-
-static bag_t threadbag[NUMTHREADS + 1];
-
-typedef struct cvthing_t_ cvthing_t;
-
-struct cvthing_t_ {
- pthread_cond_t notbusy;
- pthread_mutex_t lock;
- int shared;
-};
-
-static cvthing_t cvthing = {
- PTHREAD_COND_INITIALIZER,
- PTHREAD_MUTEX_INITIALIZER,
- 0
-};
-
-static pthread_mutex_t start_flag = PTHREAD_MUTEX_INITIALIZER;
-
-static struct timespec abstime = { 0, 0 };
-
-static int awoken;
-
-void *
-mythread(void * arg)
-{
- bag_t * bag = (bag_t *) arg;
-
- assert(bag == &threadbag[bag->threadnum]);
- assert(bag->started == 0);
- bag->started = 1;
-
- /* Wait for the start gun */
- assert(pthread_mutex_lock(&start_flag) == 0);
- assert(pthread_mutex_unlock(&start_flag) == 0);
-
- assert(pthread_mutex_lock(&cvthing.lock) == 0);
-
-#ifdef _MSC_VER
-#pragma inline_depth(0)
-#endif
- pthread_cleanup_push((void *) pthread_mutex_unlock, (void *) &cvthing.lock);
-
- while (! (cvthing.shared > 0))
- assert(pthread_cond_timedwait(&cvthing.notbusy, &cvthing.lock, &abstime) == 0);
-
- pthread_cleanup_pop(0);
-#ifdef _MSC_VER
-#pragma inline_depth()
-#endif
-
- assert(cvthing.shared > 0);
-
- awoken++;
-
- assert(pthread_mutex_unlock(&cvthing.lock) == 0);
-
- return (void *) 0;
-}
-
-int
-main()
-{
- int failed = 0;
- int i;
- pthread_t t[NUMTHREADS + 1];
- struct timeb currSysTime;
- const DWORD NANOSEC_PER_MILLISEC = 1000000;
-
- cvthing.shared = 0;
-
- assert((t[0] = pthread_self()) != NULL);
-
- assert(cvthing.notbusy == PTHREAD_COND_INITIALIZER);
-
- assert(cvthing.lock == PTHREAD_MUTEX_INITIALIZER);
-
- assert(pthread_mutex_lock(&start_flag) == 0);
-
- /* get current system time */
- ftime(&currSysTime);
-
- abstime.tv_sec = currSysTime.time;
- abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
-
- abstime.tv_sec += 10;
-
- assert((t[0] = pthread_self()) != NULL);
-
- awoken = 0;
-
- for (i = 1; i <= NUMTHREADS; i++)
- {
- threadbag[i].started = 0;
- threadbag[i].threadnum = i;
- assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);
- }
-
- /*
- * Code to control or munipulate child threads should probably go here.
- */
-
- assert(pthread_mutex_unlock(&start_flag) == 0);
-
- /*
- * Give threads time to start.
- */
- Sleep(1000);
-
- assert(pthread_mutex_lock(&cvthing.lock) == 0);
-
- cvthing.shared++;
-
- assert(pthread_mutex_unlock(&cvthing.lock) == 0);
-
- /*
- * Cancel one of the threads.
- */
- assert(pthread_cancel(t[3]) == 0);
- Sleep(500);
-
- /*
- * Signal all remaining waiting threads.
- */
- assert(pthread_cond_broadcast(&cvthing.notbusy) == 0);
-
- /*
- * Give threads time to complete.
- */
- Sleep(2000);
-
- /*
- * Cleanup the CV.
- */
-
- assert(pthread_mutex_destroy(&cvthing.lock) == 0);
-
- assert(cvthing.lock == NULL);
-
- assert(pthread_cond_destroy(&cvthing.notbusy) == 0);
-
- assert(cvthing.notbusy == NULL);
-
- /*
- * Standard check that all threads started.
- */
- for (i = 1; i <= NUMTHREADS; i++)
- {
- failed = !threadbag[i].started;
-
- if (failed)
- {
- fprintf(stderr, "Thread %d: started %d\n", i, threadbag[i].started);
- }
- }
-
- assert(!failed);
-
- /*
- * Check any results here.
- */
-
- assert(awoken == (NUMTHREADS - 1));
-
- /*
- * Success.
- */
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/condvar8.c b/winsup/testsuite/winsup.api/pthread/condvar8.c
deleted file mode 100644
index 771d91c..0000000
--- a/winsup/testsuite/winsup.api/pthread/condvar8.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * File: condvar8.c
- *
- * Test Synopsis:
- * - Test multiple pthread_cond_broadcasts.
- *
- * Test Method (Validation or Falsification):
- * - Validation
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * - Make NUMTHREADS threads wait on CV, broadcast signal them, and then repeat.
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * -
- *
- * Pass Criteria:
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-#include <sys/timeb.h>
-
-/*
- * Create NUMTHREADS threads in addition to the Main thread.
- */
-enum {
- NUMTHREADS = 5
-};
-
-typedef struct bag_t_ bag_t;
-struct bag_t_ {
- int threadnum;
- int started;
- /* Add more per-thread state variables here */
-};
-
-static bag_t threadbag[NUMTHREADS + 1];
-
-typedef struct cvthing_t_ cvthing_t;
-
-struct cvthing_t_ {
- pthread_cond_t notbusy;
- pthread_mutex_t lock;
- int shared;
-};
-
-static cvthing_t cvthing = {
- PTHREAD_COND_INITIALIZER,
- PTHREAD_MUTEX_INITIALIZER,
- 0
-};
-
-static pthread_mutex_t start_flag = PTHREAD_MUTEX_INITIALIZER;
-
-static struct timespec abstime = { 0, 0 };
-
-static int awoken;
-
-static void *
-mythread(void * arg)
-{
- bag_t * bag = (bag_t *) arg;
-
- assert(bag == &threadbag[bag->threadnum]);
- assert(bag->started == 0);
- bag->started = 1;
-
- /* Wait for the start gun */
- assert(pthread_mutex_lock(&start_flag) == 0);
- assert(pthread_mutex_unlock(&start_flag) == 0);
-
- assert(pthread_mutex_lock(&cvthing.lock) == 0);
-
- pthread_cleanup_push((__cleanup_routine_type)pthread_mutex_unlock,
- (void *) &cvthing.lock);
-
- while (! (cvthing.shared > 0))
- assert(pthread_cond_timedwait(&cvthing.notbusy, &cvthing.lock, &abstime) == 0);
-
- pthread_cleanup_pop(0);
-
- assert(cvthing.shared > 0);
-
- awoken++;
-
- assert(pthread_mutex_unlock(&cvthing.lock) == 0);
-
- return (void *) 0;
-}
-
-int
-main()
-{
- int failed = 0;
- int i;
- int first, last;
- pthread_t t[NUMTHREADS + 1];
-
- struct timeb currSysTime;
- const DWORD NANOSEC_PER_MILLISEC = 1000000;
-
- assert((t[0] = pthread_self()) != NULL);
-
- assert(cvthing.notbusy == PTHREAD_COND_INITIALIZER);
-
- assert(cvthing.lock == PTHREAD_MUTEX_INITIALIZER);
-
- ftime(&currSysTime);
-
- abstime.tv_sec = currSysTime.time;
- abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
-
- abstime.tv_sec += 10;
-
- assert((t[0] = pthread_self()) != NULL);
-
- awoken = 0;
-
- for (first = 1, last = NUMTHREADS / 2;
- first < NUMTHREADS;
- first = last + 1, last = NUMTHREADS)
- {
- assert(pthread_mutex_lock(&start_flag) == 0);
-
- for (i = first; i <= last; i++)
- {
- threadbag[i].started = 0;
- threadbag[i].threadnum = i;
- assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);
- assert(pthread_detach(t[i]) == 0);
- }
-
- /*
- * Code to control or munipulate child threads should probably go here.
- */
- cvthing.shared = 0;
-
- assert(pthread_mutex_unlock(&start_flag) == 0);
-
- /*
- * Give threads time to start.
- */
- Sleep(1000);
-
- assert(pthread_mutex_lock(&cvthing.lock) == 0);
-
- cvthing.shared++;
-
- assert(pthread_mutex_unlock(&cvthing.lock) == 0);
-
- assert(pthread_cond_broadcast(&cvthing.notbusy) == 0);
-
- /*
- * Give threads time to complete.
- */
- Sleep(1000);
-
- assert(awoken == (i - 1));
- }
-
-
- /*
- * Standard check that all threads started.
- */
- for (i = 1; i <= NUMTHREADS; i++)
- {
- failed = !threadbag[i].started;
-
- if (failed)
- {
- fprintf(stderr, "Thread %d: started %d\n", i, threadbag[i].started);
- }
- }
-
- /*
- * Cleanup the CV.
- */
-
- assert(pthread_mutex_destroy(&cvthing.lock) == 0);
-
- assert(cvthing.lock == NULL);
-
- assert(pthread_cond_destroy(&cvthing.notbusy) == 0);
-
- assert(cvthing.notbusy == NULL);
-
- assert(!failed);
-
- /*
- * Check any results here.
- */
-
- assert(awoken == NUMTHREADS);
-
- /*
- * Success.
- */
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/condvar9.c b/winsup/testsuite/winsup.api/pthread/condvar9.c
deleted file mode 100644
index 2945562..0000000
--- a/winsup/testsuite/winsup.api/pthread/condvar9.c
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * File: condvar9.c
- *
- *
- * Test Synopsis:
- * - Test multiple pthread_cond_broadcasts with thread cancelation.
- *
- * Test Method (Validation or Falsification):
- * - Validation
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * - Make NUMTHREADS threads wait on CV, broadcast signal them, cancel them
- * and then repeat.
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * -
- *
- * Pass Criteria:
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-#include <sys/timeb.h>
-
-/*
- * Create NUMTHREADS threads in addition to the Main thread.
- */
-enum {
- NUMTHREADS = 9
-};
-
-typedef struct bag_t_ bag_t;
-struct bag_t_ {
- int threadnum;
- int started;
- /* Add more per-thread state variables here */
-};
-
-static bag_t threadbag[NUMTHREADS + 1];
-
-typedef struct cvthing_t_ cvthing_t;
-
-struct cvthing_t_ {
- pthread_cond_t notbusy;
- pthread_mutex_t lock;
- int shared;
-};
-
-static cvthing_t cvthing = {
- PTHREAD_COND_INITIALIZER,
- PTHREAD_MUTEX_INITIALIZER,
- 0
-};
-
-static pthread_mutex_t start_flag = PTHREAD_MUTEX_INITIALIZER;
-
-static struct timespec abstime = { 0, 0 };
-
-static int awoken;
-static int not_canceled;
-
-static void *
-mythread(void * arg)
-{
- bag_t * bag = (bag_t *) arg;
-
- assert(bag == &threadbag[bag->threadnum]);
- assert(bag->started == 0);
- bag->started = 1;
-
- /* Wait for the start gun */
- assert(pthread_mutex_lock(&start_flag) == 0);
- assert(pthread_mutex_unlock(&start_flag) == 0);
-
- assert(pthread_mutex_lock(&cvthing.lock) == 0);
-
- /*
- * pthread_cond_timedwait is a cancelation point and we
- * going to cancel one deliberately.
- */
-#ifdef _MSC_VER
-#pragma inline_depth(0)
-#endif
- pthread_cleanup_push((void *) pthread_mutex_unlock, (void *) &cvthing.lock);
-
- while (! (cvthing.shared > 0))
- assert(pthread_cond_timedwait(&cvthing.notbusy, &cvthing.lock, &abstime) == 0);
-
- assert(cvthing.shared > 0);
-
- awoken++;
-
- pthread_testcancel();
-
- pthread_cleanup_pop(0);
-#ifdef _MSC_VER
-#pragma inline_depth()
-#endif
-
- not_canceled++;
-
- assert(pthread_mutex_unlock(&cvthing.lock) == 0);
-
- return (void *) 0;
-}
-
-int
-main()
-{
- int failed = 0;
- int i;
- int first, last;
- pthread_t t[NUMTHREADS + 1];
- struct timeb currSysTime;
- const DWORD NANOSEC_PER_MILLISEC = 1000000;
-
- assert((t[0] = pthread_self()) != NULL);
-
- assert(cvthing.notbusy == PTHREAD_COND_INITIALIZER);
-
- assert(cvthing.lock == PTHREAD_MUTEX_INITIALIZER);
-
- /* get current system time */
- ftime(&currSysTime);
-
- abstime.tv_sec = currSysTime.time;
- abstime.tv_nsec = NANOSEC_PER_MILLISEC * currSysTime.millitm;
-
- abstime.tv_sec += 5;
-
- assert((t[0] = pthread_self()) != NULL);
-
- awoken = 0;
- not_canceled = 0;
-
- for (first = 1, last = NUMTHREADS / 2;
- first < NUMTHREADS;
- first = last + 1, last = NUMTHREADS)
- {
- assert(pthread_mutex_lock(&start_flag) == 0);
-
- for (i = first; i <= last; i++)
- {
- threadbag[i].started = 0;
- threadbag[i].threadnum = i;
- assert(pthread_create(&t[i], NULL, mythread, (void *) &threadbag[i]) == 0);
- assert(pthread_detach(t[i]) == 0);
- }
-
- /*
- * Code to control or munipulate child threads should probably go here.
- */
- cvthing.shared = 0;
-
- assert(pthread_mutex_unlock(&start_flag) == 0);
-
- /*
- * Give threads time to start.
- */
- Sleep(1000);
-
- assert(pthread_mutex_lock(&cvthing.lock) == 0);
-
- cvthing.shared++;
-
- assert(pthread_cond_broadcast(&cvthing.notbusy) == 0);
- for (i = first; i <= last; i++)
- assert(pthread_cancel(t[i]) == 0);
-
- assert(pthread_mutex_unlock(&cvthing.lock) == 0);
-
- /*
- * Give threads time to complete.
- */
- Sleep(1000);
- }
-
-
- /*
- * Standard check that all threads started.
- */
- for (i = 1; i <= NUMTHREADS; i++)
- {
- failed = !threadbag[i].started;
-
- if (failed)
- {
- fprintf(stderr, "Thread %d: started %d\n", i, threadbag[i].started);
- }
- }
-
- /*
- * Cleanup the CV.
- */
-
- assert(pthread_mutex_destroy(&cvthing.lock) == 0);
-
- assert(cvthing.lock == NULL);
-
- assert(pthread_cond_destroy(&cvthing.notbusy) == 0);
-
- assert(cvthing.notbusy == NULL);
-
- assert(!failed);
-
- /*
- * Check any results here.
- */
-
- assert(awoken == NUMTHREADS);
- assert(not_canceled == 0);
-
- /*
- * Success.
- */
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/count1.c b/winsup/testsuite/winsup.api/pthread/count1.c
deleted file mode 100644
index ae30ed0..0000000
--- a/winsup/testsuite/winsup.api/pthread/count1.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * count1.c
- *
- * Description:
- * Test some basic assertions about the number of threads at runtime.
- */
-
-#include "test.h"
-
-#if ! defined (__MINGW32__) || defined (__MSVCRT__)
-#define NUMTHREADS (60)
-#else
-#define NUMTHREADS (59)
-#endif
-
-static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
-static pthread_t threads[NUMTHREADS];
-static unsigned numThreads = 0;
-
-void *
-myfunc(void *arg)
-{
- pthread_mutex_lock(&lock);
- numThreads++;
- pthread_mutex_unlock(&lock);
-
- Sleep(1000);
- return 0;
-}
-int
-main()
-{
- int i;
- int maxThreads = sizeof(threads) / sizeof(pthread_t);
-
- /*
- * Spawn NUMTHREADS threads. Each thread should increment the
- * numThreads variable, sleep for one second.
- */
- for (i = 0; i < maxThreads; i++)
- {
- assert(pthread_create(&threads[i], NULL, myfunc, 0) == 0);
- }
-
- /*
- * Wait for all the threads to exit.
- */
- for (i = 0; i < maxThreads; i++)
- {
- assert(pthread_join(threads[i], NULL) == 0);
- }
-
- /*
- * Check the number of threads created.
- */
- assert((int) numThreads == maxThreads);
-
- /*
- * Success.
- */
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/create1.c b/winsup/testsuite/winsup.api/pthread/create1.c
deleted file mode 100644
index 192e52d..0000000
--- a/winsup/testsuite/winsup.api/pthread/create1.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * create1.c
- *
- * Description:
- * Create a thread and check that it ran.
- *
- * Depends on API functions: None.
- */
-
-#include "test.h"
-
-static int washere = 0;
-
-void * func(void * arg)
-{
- washere = 1;
- return 0;
-}
-
-int
-main()
-{
- pthread_t t;
-
- assert(pthread_create(&t, NULL, func, NULL) == 0);
-
- /* A dirty hack, but we cannot rely on pthread_join in this
- primitive test. */
- Sleep(2000);
-
- assert(washere == 1);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/create2.c b/winsup/testsuite/winsup.api/pthread/create2.c
deleted file mode 100644
index 40e637b..0000000
--- a/winsup/testsuite/winsup.api/pthread/create2.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * File: create2.c
- *
- * Test Synopsis:
- * - Test that threads have a Win32 handle when started.
- *
- * Test Method (Validation or Falsification):
- * - Statistical, not absolute (depends on sample size).
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * -
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * -
- *
- * Pass Criteria:
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-
-const int NUMTHREADS = 10000;
-
-static int washere = 0;
-
-void * func(void * arg)
-{
- washere = 1;
- return (void *) 0;
-}
-
-int
-main()
-{
- pthread_t t;
- pthread_attr_t attr;
- void * result = NULL;
- int i;
-
- pthread_attr_init(&attr);
- pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
-
- for (i = 0; i < NUMTHREADS; i++)
- {
- washere = 0;
- assert(pthread_create(&t, &attr, func, NULL) == 0);
- pthread_join(t, &result);
- assert(washere == 1);
- }
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/equal1.c b/winsup/testsuite/winsup.api/pthread/equal1.c
deleted file mode 100644
index 617a956..0000000
--- a/winsup/testsuite/winsup.api/pthread/equal1.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Test for pthread_equal.
- *
- * Depends on functions: pthread_create().
- */
-
-#include "test.h"
-
-void * func(void * arg)
-{
- Sleep(2000);
- return 0;
-}
-
-int
-main()
-{
- pthread_t t1, t2;
-
- assert(pthread_create(&t1, NULL, func, (void *) 1) == 0);
-
- assert(pthread_create(&t2, NULL, func, (void *) 2) == 0);
-
- assert(pthread_equal(t1, t2) == 0);
-
- assert(pthread_equal(t1,t1) != 0);
-
- /* This is a hack. We don't want to rely on pthread_join
- yet if we can help it. */
- Sleep(4000);
-
- /* Success. */
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/exit1.c b/winsup/testsuite/winsup.api/pthread/exit1.c
deleted file mode 100644
index 06b7692..0000000
--- a/winsup/testsuite/winsup.api/pthread/exit1.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Test for pthread_exit().
- *
- * Depends on API functions: None.
- */
-
-#include "test.h"
-
-int
-main(int argc, char * argv[])
-{
- /* A simple test first. */
- pthread_exit((void *) 0);
-
- /* Not reached */
- assert(0);
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/exit2.c b/winsup/testsuite/winsup.api/pthread/exit2.c
deleted file mode 100644
index 684305b..0000000
--- a/winsup/testsuite/winsup.api/pthread/exit2.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Test for pthread_exit().
- *
- * Depends on API functions:
- * pthread_create()
- * pthread_exit()
- */
-
-#include "test.h"
-
-void *
-func(void * arg)
-{
- pthread_exit(arg);
-
- /* Never reached. */
- assert(0);
-}
-
-int
-main(int argc, char * argv[])
-{
- pthread_t t;
-
- assert(pthread_create(&t, NULL, func, (void *) NULL) == 0);
-
- Sleep(1000);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/exit3.c b/winsup/testsuite/winsup.api/pthread/exit3.c
deleted file mode 100644
index 0b6ec31..0000000
--- a/winsup/testsuite/winsup.api/pthread/exit3.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Test for pthread_exit().
- *
- * Depends on API functions: pthread_create().
- */
-
-#include "test.h"
-
-void *
-func(void * arg)
-{
- pthread_exit(arg);
-
- /* Never reached. */
- assert(0);
-}
-
-int
-main(int argc, char * argv[])
-{
- pthread_t id[4];
- int i;
-
- /* Create a few threads and then exit. */
- for (i = 0; i < 4; i++)
- {
- assert(pthread_create(&id[i], NULL, func, (void *) i) == 0);
- }
-
- Sleep(1000);
-
- /* Success. */
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/inherit1.c b/winsup/testsuite/winsup.api/pthread/inherit1.c
deleted file mode 100644
index a909eb7..0000000
--- a/winsup/testsuite/winsup.api/pthread/inherit1.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * File: inherit1.c
- *
- * Test Synopsis:
- * - Test thread priority inheritance.
- *
- * Test Method (Validation or Falsification):
- * -
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * -
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * -
- *
- * Pass Criteria:
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-
-void * func(void * arg)
-{
- int policy;
- struct sched_param param;
-
- assert(pthread_getschedparam(pthread_self(), &policy, &param) == 0);
- return (void *) param.sched_priority;
-}
-
-int
-main()
-{
- pthread_t t;
- pthread_t mainThread = pthread_self();
- pthread_attr_t attr;
- void * result = NULL;
- struct sched_param param;
- struct sched_param mainParam;
- int maxPrio;
- int minPrio;
- int prio;
- int policy;
- int inheritsched = -1;
-
- assert((maxPrio = sched_get_priority_max(SCHED_OTHER)) != -1);
- assert((minPrio = sched_get_priority_min(SCHED_OTHER)) != -1);
-
- assert(pthread_attr_init(&attr) == 0);
- assert(pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED) == 0);
- assert(pthread_attr_getinheritsched(&attr, &inheritsched) == 0);
- assert(inheritsched == PTHREAD_INHERIT_SCHED);
-
- for (prio = minPrio; prio < maxPrio; prio++)
- {
- mainParam.sched_priority = prio;
-
- /* Change the main thread priority */
- assert(pthread_setschedparam(mainThread, SCHED_OTHER, &mainParam) == 0);
- assert(pthread_getschedparam(mainThread, &policy, &mainParam) == 0);
- assert(policy == SCHED_OTHER);
- assert(mainParam.sched_priority == prio);
-
- for (param.sched_priority = prio;
- param.sched_priority <= maxPrio;
- param.sched_priority++)
- {
- /* The new thread create should ignore this new priority */
- assert(pthread_attr_setschedparam(&attr, &param) == 0);
- assert(pthread_create(&t, &attr, func, NULL) == 0);
- pthread_join(t, &result);
- assert((int) result == mainParam.sched_priority);
- }
- }
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/join0.c b/winsup/testsuite/winsup.api/pthread/join0.c
deleted file mode 100644
index 54b0bee..0000000
--- a/winsup/testsuite/winsup.api/pthread/join0.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Test for pthread_join().
- *
- * Depends on API functions: pthread_create(), pthread_exit().
- */
-
-#include "test.h"
-
-void *
-func(void * arg)
-{
- Sleep(2000);
-
- pthread_exit(arg);
-
- /* Never reached. */
- exit(1);
-}
-
-int
-main(int argc, char * argv[])
-{
- pthread_t id;
- int result;
-
- /* Create a single thread and wait for it to exit. */
- assert(pthread_create(&id, NULL, func, (void *) 123) == 0);
-
- assert(pthread_join(id, (void **) &result) == 0);
-
-#if ! defined (__MINGW32__) || defined (__MSVCRT__)
- assert(result == 123);
-#else
-# warning pthread_join not fully supported in this configuration.
- assert(result == 0);
-#endif
-
- /* Success. */
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/join1.c b/winsup/testsuite/winsup.api/pthread/join1.c
deleted file mode 100644
index d74e0c4..0000000
--- a/winsup/testsuite/winsup.api/pthread/join1.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Test for pthread_join().
- *
- * Depends on API functions: pthread_create(), pthread_join(), pthread_exit().
- */
-
-#include "test.h"
-
-void *
-func(void * arg)
-{
- int i = (int) arg;
-
- Sleep(i * 500);
-
- pthread_exit(arg);
-
- /* Never reached. */
- exit(1);
-}
-
-int
-main(int argc, char * argv[])
-{
- pthread_t id[4];
- int i;
- int result;
-
- /* Create a few threads and then exit. */
- for (i = 0; i < 4; i++)
- {
- assert(pthread_create(&id[i], NULL, func, (void *) i) == 0);
- }
-
- /* Some threads will finish before they are joined, some after. */
- Sleep(1000);
-
- for (i = 0; i < 4; i++)
- {
- assert(pthread_join(id[i], (void **) &result) == 0);
-#if ! defined (__MINGW32__) || defined (__MSVCRT__)
- assert(result == i);
-#else
-# warning pthread_join not fully supported in this configuration.
- assert(result == 0);
-#endif
- }
-
- /* Success. */
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/join2.c b/winsup/testsuite/winsup.api/pthread/join2.c
deleted file mode 100644
index cdc8ca2..0000000
--- a/winsup/testsuite/winsup.api/pthread/join2.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Test for pthread_join() returning return value from threads.
- *
- * Depends on API functions: pthread_create().
- */
-
-#include "test.h"
-
-void *
-func(void * arg)
-{
- Sleep(1000);
- return arg;
-}
-
-int
-main(int argc, char * argv[])
-{
- pthread_t id[4];
- int i;
- int result;
-
- /* Create a few threads and then exit. */
- for (i = 0; i < 4; i++)
- {
- assert(pthread_create(&id[i], NULL, func, (void *) i) == 0);
- }
-
- for (i = 0; i < 4; i++)
- {
- assert(pthread_join(id[i], (void **) &result) == 0);
-#if ! defined (__MINGW32__) || defined (__MSVCRT__)
- /* CRTDLL _beginthread doesn't support return value, so
- the assertion is guaranteed to fail. */
- assert(result == i);
-#endif
- }
-
- /* Success. */
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/mainthreadexits.c b/winsup/testsuite/winsup.api/pthread/mainthreadexits.c
deleted file mode 100644
index b3a3653..0000000
--- a/winsup/testsuite/winsup.api/pthread/mainthreadexits.c
+++ /dev/null
@@ -1,48 +0,0 @@
-#include <stdio.h>
-#include <unistd.h>
-#include <pthread.h>
-#include <stdlib.h>
-
-static void * Thread (void *);
-
-static pthread_t main_thread;
-static pthread_t secondThread;
-static int result = 2;
-
-int main(void)
-{
- main_thread = pthread_self ();
-
- if (pthread_create (&secondThread, NULL, Thread, NULL))
- exit (1);
- sleep (5);
- pthread_exit (&result);
- /* If pthread_exit doesm't (which would be a bug) then we do */
- return 1;
-}
-
-static void * Thread (void *not_used)
-{
- void *myresult;
- /* We should be able to join this */
- if (pthread_join (main_thread, &myresult))
- exit (1);
-
- if (*(int *)myresult != 2)
- exit (1);
-
- exit (0);
-}
-/*
-This valid code doesn't work at all. The mainthread object in MTinterface
-is not properly initialized, the cancel_event is NULL and the win32_obj_id
-is NULL because myself->hProcess is NULL when MTinterface is initialized
-(and i don't think that a process handle can be used as thread handle).
-Even if the handles would be valid the pthread_join call would try to
-delete a thread object that is created static which would result in a
-corrupted heap.
-
-Concept test Contributed by Thomas Pfaff <tpfaff@gmx.net>
-Scriptable test by Robert Collins <rbtcollins@hotmail.com>
-
-*/
diff --git a/winsup/testsuite/winsup.api/pthread/mutex1.c b/winsup/testsuite/winsup.api/pthread/mutex1.c
deleted file mode 100644
index b7f6b6f..0000000
--- a/winsup/testsuite/winsup.api/pthread/mutex1.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * mutex1.c
- *
- * Create a simple mutex object, lock it, and then unlock it again.
- * This is the simplest test of the pthread mutex family that we can do.
- *
- * Depends on API functions:
- * pthread_mutex_init()
- * pthread_mutex_lock()
- * pthread_mutex_unlock()
- * pthread_mutex_destroy()
- */
-
-#include "test.h"
-
-pthread_mutex_t mutex = NULL;
-
-int
-main()
-{
- assert(mutex == NULL);
-
- assert(pthread_mutex_init(&mutex, NULL) == 0);
-
- assert(mutex != NULL);
-
- assert(pthread_mutex_lock(&mutex) == 0);
-
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- assert(pthread_mutex_destroy(&mutex) == 0);
-
- assert(mutex == NULL);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/mutex1d.c b/winsup/testsuite/winsup.api/pthread/mutex1d.c
deleted file mode 100644
index 354b106..0000000
--- a/winsup/testsuite/winsup.api/pthread/mutex1d.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * mutex1d.c
- *
- * As for mutex1.c but with type set to PTHREAD_MUTEX_DEFAULT.
- *
- * Create a simple mutex object, lock it, unlock it, then destroy it.
- * This is the simplest test of the pthread mutex family that we can do.
- *
- * Depends on API functions:
- * pthread_mutexattr_settype()
- * pthread_mutex_init()
- * pthread_mutex_destroy()
- */
-
-#include "test.h"
-
-pthread_mutex_t mutex = NULL;
-pthread_mutexattr_t mxAttr;
-
-int
-main()
-{
- assert(pthread_mutexattr_init(&mxAttr) == 0);
-
- assert(pthread_mutexattr_settype(&mxAttr, PTHREAD_MUTEX_DEFAULT) == 0);
-
- assert(mutex == NULL);
-
- assert(pthread_mutex_init(&mutex, &mxAttr) == 0);
-
- assert(mutex != NULL);
-
- assert(pthread_mutex_lock(&mutex) == 0);
-
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- assert(pthread_mutex_destroy(&mutex) == 0);
-
- assert(mutex == NULL);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/mutex1e.c b/winsup/testsuite/winsup.api/pthread/mutex1e.c
deleted file mode 100644
index 2feb16c..0000000
--- a/winsup/testsuite/winsup.api/pthread/mutex1e.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * mutex1e.c
- *
- * As for mutex1.c but with type set to PTHREAD_MUTEX_ERRORCHECK.
- *
- * Create a simple mutex object, lock it, unlock it, then destroy it.
- * This is the simplest test of the pthread mutex family that we can do.
- *
- * Depends on API functions:
- * pthread_mutexattr_settype()
- * pthread_mutex_init()
- * pthread_mutex_destroy()
- */
-
-#include "test.h"
-
-pthread_mutex_t mutex = NULL;
-pthread_mutexattr_t mxAttr;
-
-int
-main()
-{
- assert(pthread_mutexattr_init(&mxAttr) == 0);
-
- assert(pthread_mutexattr_settype(&mxAttr, PTHREAD_MUTEX_ERRORCHECK) == 0);
-
- assert(mutex == NULL);
-
- assert(pthread_mutex_init(&mutex, &mxAttr) == 0);
-
- assert(mutex != NULL);
-
- assert(pthread_mutex_lock(&mutex) == 0);
-
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- assert(pthread_mutex_destroy(&mutex) == 0);
-
- assert(mutex == NULL);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/mutex1n.c b/winsup/testsuite/winsup.api/pthread/mutex1n.c
deleted file mode 100644
index 9af3d5f..0000000
--- a/winsup/testsuite/winsup.api/pthread/mutex1n.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * mutex1n.c
- *
- * As for mutex1.c but with type set to PTHREAD_MUTEX_NORMAL.
- *
- * Create a simple mutex object, lock it, unlock it, then destroy it.
- * This is the simplest test of the pthread mutex family that we can do.
- *
- * Depends on API functions:
- * pthread_mutexattr_settype()
- * pthread_mutex_init()
- * pthread_mutex_destroy()
- */
-
-#include "test.h"
-
-pthread_mutex_t mutex = NULL;
-pthread_mutexattr_t mxAttr;
-
-int
-main()
-{
- assert(pthread_mutexattr_init(&mxAttr) == 0);
-
- assert(pthread_mutexattr_settype(&mxAttr, PTHREAD_MUTEX_NORMAL) == 0);
-
- assert(mutex == NULL);
-
- assert(pthread_mutex_init(&mutex, &mxAttr) == 0);
-
- assert(mutex != NULL);
-
- assert(pthread_mutex_lock(&mutex) == 0);
-
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- assert(pthread_mutex_destroy(&mutex) == 0);
-
- assert(mutex == NULL);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/mutex1r.c b/winsup/testsuite/winsup.api/pthread/mutex1r.c
deleted file mode 100644
index b5131bb..0000000
--- a/winsup/testsuite/winsup.api/pthread/mutex1r.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * mutex1r.c
- *
- * As for mutex1.c but with type set to PTHREAD_MUTEX_RECURSIVE.
- *
- * Create a simple mutex object, lock it, unlock it, then destroy it.
- * This is the simplest test of the pthread mutex family that we can do.
- *
- * Depends on API functions:
- * pthread_mutexattr_settype()
- * pthread_mutex_init()
- * pthread_mutex_destroy()
- */
-
-#include "test.h"
-
-pthread_mutex_t mutex = NULL;
-pthread_mutexattr_t mxAttr;
-
-int
-main()
-{
- assert(pthread_mutexattr_init(&mxAttr) == 0);
-
- assert(pthread_mutexattr_settype(&mxAttr, PTHREAD_MUTEX_RECURSIVE) == 0);
-
- assert(mutex == NULL);
-
- assert(pthread_mutex_init(&mutex, &mxAttr) == 0);
-
- assert(mutex != NULL);
-
- assert(pthread_mutex_lock(&mutex) == 0);
-
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- assert(pthread_mutex_destroy(&mutex) == 0);
-
- assert(mutex == NULL);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/mutex2.c b/winsup/testsuite/winsup.api/pthread/mutex2.c
deleted file mode 100644
index 731c47f..0000000
--- a/winsup/testsuite/winsup.api/pthread/mutex2.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * mutex2.c
- *
- * Declare a static mutex object, lock it,
- * and then unlock it again.
- *
- * Depends on API functions:
- * pthread_mutex_lock()
- * pthread_mutex_unlock()
- */
-
-#include "test.h"
-
-pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
-
-int
-main()
-{
- assert(mutex == PTHREAD_MUTEX_INITIALIZER);
-
- assert(pthread_mutex_lock(&mutex) == 0);
-
- assert(mutex != PTHREAD_MUTEX_INITIALIZER);
-
- assert(mutex != NULL);
-
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- assert(pthread_mutex_destroy(&mutex) == 0);
-
- assert(mutex == NULL);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/mutex3.c b/winsup/testsuite/winsup.api/pthread/mutex3.c
deleted file mode 100644
index 07e75b1..0000000
--- a/winsup/testsuite/winsup.api/pthread/mutex3.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * mutex3.c
- *
- * Declare a static mutex object, lock it, trylock it,
- * and then unlock it again.
- *
- * Depends on API functions:
- * pthread_mutex_lock()
- * pthread_mutex_trylock()
- * pthread_mutex_unlock()
- */
-
-#include "test.h"
-
-pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER;
-
-static int washere = 0;
-
-void * func(void * arg)
-{
- assert(pthread_mutex_trylock(&mutex1) == EBUSY);
-
- washere = 1;
-
- return 0;
-}
-
-int
-main()
-{
- pthread_t t;
-
- assert(pthread_mutex_lock(&mutex1) == 0);
-
- assert(pthread_create(&t, NULL, func, NULL) == 0);
- assert(pthread_join(t, NULL) == 0);
-
- assert(pthread_mutex_unlock(&mutex1) == 0);
-
- assert(washere == 1);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/mutex4.c b/winsup/testsuite/winsup.api/pthread/mutex4.c
deleted file mode 100644
index 8a983fe..0000000
--- a/winsup/testsuite/winsup.api/pthread/mutex4.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * mutex4.c
- *
- * Thread A locks mutex - thread B tries to unlock.
- *
- * Depends on API functions:
- * pthread_mutex_lock()
- * pthread_mutex_trylock()
- * pthread_mutex_unlock()
- */
-
-#include "test.h"
-
-static int wasHere = 0;
-
-static pthread_mutex_t mutex1;
-
-void * unlocker(void * arg)
-{
- int expectedResult = (int) arg;
-
- wasHere++;
- assert(pthread_mutex_unlock(&mutex1) == expectedResult);
- wasHere++;
- return NULL;
-}
-
-int
-main()
-{
- pthread_t t;
- pthread_mutexattr_t ma;
-
- assert(pthread_mutexattr_init(&ma) == 0);
-
- wasHere = 0;
- assert(pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_ERRORCHECK) == 0);
- assert(pthread_mutex_init(&mutex1, &ma) == 0);
- assert(pthread_mutex_lock(&mutex1) == 0);
- assert(pthread_create(&t, NULL, unlocker, (void *) EPERM) == 0);
- assert(pthread_join(t, NULL) == 0);
- assert(pthread_mutex_unlock(&mutex1) == 0);
- assert(pthread_mutex_destroy(&mutex1) == 0);
- assert(wasHere == 2);
-
- wasHere = 0;
- assert(pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_ERRORCHECK) == 0);
- assert(pthread_mutex_init(&mutex1, &ma) == 0);
- assert(pthread_mutex_lock(&mutex1) == 0);
- assert(pthread_create(&t, NULL, unlocker, (void *) EPERM) == 0);
- assert(pthread_join(t, NULL) == 0);
- assert(pthread_mutex_unlock(&mutex1) == 0);
- assert(pthread_mutex_destroy(&mutex1) == 0);
- assert(wasHere == 2);
-
- wasHere = 0;
- assert(pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_RECURSIVE) == 0);
- assert(pthread_mutex_init(&mutex1, &ma) == 0);
- assert(pthread_mutex_lock(&mutex1) == 0);
- assert(pthread_create(&t, NULL, unlocker, (void *) EPERM) == 0);
- assert(pthread_join(t, NULL) == 0);
- assert(pthread_mutex_unlock(&mutex1) == 0);
- assert(pthread_mutex_destroy(&mutex1) == 0);
- assert(wasHere == 2);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/mutex5.c b/winsup/testsuite/winsup.api/pthread/mutex5.c
deleted file mode 100644
index 7029da1..0000000
--- a/winsup/testsuite/winsup.api/pthread/mutex5.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * mutex5.c
- *
- * Confirm the equality/inequality of the various mutex types,
- * and the default not-set value.
- */
-
-#include "test.h"
-
-static pthread_mutexattr_t mxAttr;
-
-int
-main()
-{
- int mxType = -1;
- int success = 0; /* Use to quell GNU compiler warnings. */
-
- assert(success = PTHREAD_MUTEX_DEFAULT == PTHREAD_MUTEX_NORMAL);
- assert(success = PTHREAD_MUTEX_DEFAULT != PTHREAD_MUTEX_RECURSIVE);
- assert(success = PTHREAD_MUTEX_RECURSIVE != PTHREAD_MUTEX_ERRORCHECK);
-
- if (success == success)
- {
- assert(pthread_mutexattr_init(&mxAttr) == 0);
- assert(pthread_mutexattr_gettype(&mxAttr, &mxType) == 0);
- assert(mxType == PTHREAD_MUTEX_ERRORCHECK);
- }
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/mutex6d.c b/winsup/testsuite/winsup.api/pthread/mutex6d.c
deleted file mode 100644
index f39c1ac..0000000
--- a/winsup/testsuite/winsup.api/pthread/mutex6d.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * mutex6d.c
- *
- * Tests PTHREAD_MUTEX_DEFAULT mutex type.
- * Thread locks mutex twice (recursive lock).
- * The thread should deadlock.
- *
- * Depends on API functions:
- * pthread_create()
- * pthread_mutexattr_init()
- * pthread_mutexattr_settype()
- * pthread_mutexattr_gettype()
- * pthread_mutex_init()
- * pthread_mutex_lock()
- * pthread_mutex_unlock()
- */
-
-#include "test.h"
-
-static int lockCount = 0;
-
-static pthread_mutex_t mutex;
-static pthread_mutexattr_t mxAttr;
-
-void * locker(void * arg)
-{
- assert(pthread_mutex_lock(&mutex) == 0);
- lockCount++;
-
- /* Should wait here (deadlocked) */
- assert(pthread_mutex_lock(&mutex) == 0);
- lockCount++;
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- return (void *) 555;
-}
-
-int
-main()
-{
- pthread_t t;
- int mxType = -1;
-
- assert(pthread_mutexattr_init(&mxAttr) == 0);
- assert(pthread_mutexattr_settype(&mxAttr, PTHREAD_MUTEX_DEFAULT) == 0);
- assert(pthread_mutexattr_gettype(&mxAttr, &mxType) == 0);
- assert(mxType == PTHREAD_MUTEX_NORMAL);
-
- assert(pthread_mutex_init(&mutex, &mxAttr) == 0);
-
- assert(pthread_create(&t, NULL, locker, NULL) == 0);
-
- Sleep(1000);
-
- assert(lockCount == 1);
-
- /*
- * Should succeed even though we don't own the lock
- * because FAST mutexes don't check ownership.
- */
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- Sleep (1000);
-
- assert(lockCount == 2);
-
- exit(0);
-
- /* Never reached */
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/mutex6e.c b/winsup/testsuite/winsup.api/pthread/mutex6e.c
deleted file mode 100644
index e22550f..0000000
--- a/winsup/testsuite/winsup.api/pthread/mutex6e.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * mutex6e.c
- *
- * Tests PTHREAD_MUTEX_ERRORCHECK mutex type.
- * Thread locks mutex twice (recursive lock).
- * This should fail with an EDEADLK error.
- * The second unlock attempt should fail with an EPERM error.
- *
- * Depends on API functions:
- * pthread_create()
- * pthread_join()
- * pthread_mutexattr_init()
- * pthread_mutexattr_destroy()
- * pthread_mutexattr_settype()
- * pthread_mutexattr_gettype()
- * pthread_mutex_init()
- * pthread_mutex_destroy()
- * pthread_mutex_lock()
- * pthread_mutex_unlock()
- */
-
-#include "test.h"
-
-static int lockCount = 0;
-
-static pthread_mutex_t mutex;
-static pthread_mutexattr_t mxAttr;
-
-void * locker(void * arg)
-{
- assert(pthread_mutex_lock(&mutex) == 0);
- lockCount++;
- assert(pthread_mutex_lock(&mutex) == EDEADLK);
- lockCount++;
- assert(pthread_mutex_unlock(&mutex) == 0);
- assert(pthread_mutex_unlock(&mutex) == EPERM);
-
- return (void *) 555;
-}
-
-int
-main()
-{
- pthread_t t;
- int result = 0;
- int mxType = -1;
-
- assert(pthread_mutexattr_init(&mxAttr) == 0);
- assert(pthread_mutexattr_settype(&mxAttr, PTHREAD_MUTEX_ERRORCHECK) == 0);
- assert(pthread_mutexattr_gettype(&mxAttr, &mxType) == 0);
- assert(mxType == PTHREAD_MUTEX_ERRORCHECK);
-
- assert(pthread_mutex_init(&mutex, &mxAttr) == 0);
-
- assert(pthread_create(&t, NULL, locker, NULL) == 0);
-
- assert(pthread_join(t, (void **) &result) == 0);
- assert(result == 555);
-
- assert(lockCount == 2);
-
- assert(pthread_mutex_destroy(&mutex) == 0);
- assert(pthread_mutexattr_destroy(&mxAttr) == 0);
-
- exit(0);
-
- /* Never reached */
- return 0;
-}
-
diff --git a/winsup/testsuite/winsup.api/pthread/mutex6n.c b/winsup/testsuite/winsup.api/pthread/mutex6n.c
deleted file mode 100644
index 38cbba0..0000000
--- a/winsup/testsuite/winsup.api/pthread/mutex6n.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * mutex6n.c
- *
- * Tests PTHREAD_MUTEX_NORMAL mutex type.
- * Thread locks mutex twice (recursive lock).
- * The thread should deadlock.
- *
- * Depends on API functions:
- * pthread_create()
- * pthread_mutexattr_init()
- * pthread_mutexattr_settype()
- * pthread_mutexattr_gettype()
- * pthread_mutex_init()
- * pthread_mutex_lock()
- * pthread_mutex_unlock()
- */
-
-#include "test.h"
-
-static int lockCount = 0;
-
-static pthread_mutex_t mutex;
-static pthread_mutexattr_t mxAttr;
-
-void * locker(void * arg)
-{
- assert(pthread_mutex_lock(&mutex) == 0);
- lockCount++;
-
- /* Should wait here (deadlocked) */
- assert(pthread_mutex_lock(&mutex) == 0);
- lockCount++;
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- return (void *) 555;
-}
-
-int
-main()
-{
- pthread_t t;
- int mxType = -1;
-
- assert(pthread_mutexattr_init(&mxAttr) == 0);
- assert(pthread_mutexattr_settype(&mxAttr, PTHREAD_MUTEX_NORMAL) == 0);
- assert(pthread_mutexattr_gettype(&mxAttr, &mxType) == 0);
- assert(mxType == PTHREAD_MUTEX_NORMAL);
-
- assert(pthread_mutex_init(&mutex, &mxAttr) == 0);
-
- assert(pthread_create(&t, NULL, locker, NULL) == 0);
-
- Sleep(1000);
-
- assert(lockCount == 1);
-
- /*
- * Should succeed even though we don't own the lock
- * because FAST mutexes don't check ownership.
- */
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- Sleep (1000);
-
- assert(lockCount == 2);
-
- exit(0);
-
- /* Never reached */
- return 0;
-}
-
diff --git a/winsup/testsuite/winsup.api/pthread/mutex6r.c b/winsup/testsuite/winsup.api/pthread/mutex6r.c
deleted file mode 100644
index 586cc84..0000000
--- a/winsup/testsuite/winsup.api/pthread/mutex6r.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * mutex6r.c
- *
- * Tests PTHREAD_MUTEX_RECURSIVE mutex type.
- * Thread locks mutex twice (recursive lock).
- * Both locks and unlocks should succeed.
- *
- * Depends on API functions:
- * pthread_create()
- * pthread_join()
- * pthread_mutexattr_init()
- * pthread_mutexattr_destroy()
- * pthread_mutexattr_settype()
- * pthread_mutexattr_gettype()
- * pthread_mutex_init()
- * pthread_mutex_destroy()
- * pthread_mutex_lock()
- * pthread_mutex_unlock()
- */
-
-#include "test.h"
-
-static int lockCount = 0;
-
-static pthread_mutex_t mutex;
-static pthread_mutexattr_t mxAttr;
-
-void * locker(void * arg)
-{
- assert(pthread_mutex_lock(&mutex) == 0);
- lockCount++;
- assert(pthread_mutex_lock(&mutex) == 0);
- lockCount++;
- assert(pthread_mutex_unlock(&mutex) == 0);
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- return (void *) 555;
-}
-
-int
-main()
-{
- pthread_t t;
- int result = 0;
- int mxType = -1;
-
- assert(pthread_mutexattr_init(&mxAttr) == 0);
- assert(pthread_mutexattr_settype(&mxAttr, PTHREAD_MUTEX_RECURSIVE) == 0);
- assert(pthread_mutexattr_gettype(&mxAttr, &mxType) == 0);
- assert(mxType == PTHREAD_MUTEX_RECURSIVE);
-
- assert(pthread_mutex_init(&mutex, &mxAttr) == 0);
-
- assert(pthread_create(&t, NULL, locker, NULL) == 0);
-
- assert(pthread_join(t, (void **) &result) == 0);
- assert(result == 555);
-
- assert(lockCount == 2);
-
- assert(pthread_mutex_destroy(&mutex) == 0);
- assert(pthread_mutexattr_destroy(&mxAttr) == 0);
-
- exit(0);
-
- /* Never reached */
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/mutex7.c b/winsup/testsuite/winsup.api/pthread/mutex7.c
deleted file mode 100644
index d2c9f8b..0000000
--- a/winsup/testsuite/winsup.api/pthread/mutex7.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * mutex7.c
- *
- * Test the default (type not set) mutex type.
- * Should be the same as PTHREAD_MUTEX_ERRORCHECK.
- * Thread locks then trylocks mutex (attempted recursive lock).
- * The thread should lock first time and EBUSY second time.
- *
- * Depends on API functions:
- * pthread_mutex_lock()
- * pthread_mutex_trylock()
- * pthread_mutex_unlock()
- */
-
-#include "test.h"
-
-static int lockCount = 0;
-
-static pthread_mutex_t mutex;
-
-void * locker(void * arg)
-{
- assert(pthread_mutex_lock(&mutex) == 0);
- lockCount++;
- assert(pthread_mutex_trylock(&mutex) == EBUSY);
- lockCount++;
- assert(pthread_mutex_unlock(&mutex) == 0);
- assert(pthread_mutex_unlock(&mutex) == EPERM);
-
- return 0;
-}
-
-int
-main()
-{
- pthread_t t;
-
- assert(pthread_mutex_init(&mutex, NULL) == 0);
-
- assert(pthread_create(&t, NULL, locker, NULL) == 0);
-
- Sleep(1000);
-
- assert(lockCount == 2);
-
- exit(0);
-
- /* Never reached */
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/mutex7d.c b/winsup/testsuite/winsup.api/pthread/mutex7d.c
deleted file mode 100644
index 906d0f0..0000000
--- a/winsup/testsuite/winsup.api/pthread/mutex7d.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * mutex7d.c
- *
- * Test the default (type not set) mutex type.
- * Should be the same as PTHREAD_MUTEX_ERRORCHECK.
- * Thread locks then trylocks mutex (attempted recursive lock).
- * The thread should lock first time and EBUSY second time.
- *
- * Depends on API functions:
- * pthread_mutex_lock()
- * pthread_mutex_trylock()
- * pthread_mutex_unlock()
- */
-
-#include "test.h"
-
-static int lockCount = 0;
-
-static pthread_mutex_t mutex;
-
-void * locker(void * arg)
-{
- assert(pthread_mutex_lock(&mutex) == 0);
- lockCount++;
- assert(pthread_mutex_trylock(&mutex) == EBUSY);
- lockCount++;
- assert(pthread_mutex_unlock(&mutex) == 0);
- assert(pthread_mutex_unlock(&mutex) == EPERM);
-
- return 0;
-}
-
-int
-main()
-{
- int result = 0;
- pthread_t t;
-
- assert(pthread_mutex_init(&mutex, NULL) == 0);
-
- assert(pthread_create(&t, NULL, locker, NULL) == 0);
-
- assert(pthread_join(t, (void **) &result) == 0);
-
- assert(lockCount == 2);
-
- exit(0);
-
- /* Never reached */
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/mutex7e.c b/winsup/testsuite/winsup.api/pthread/mutex7e.c
deleted file mode 100644
index 0572251..0000000
--- a/winsup/testsuite/winsup.api/pthread/mutex7e.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * mutex7e.c
- *
- * Tests PTHREAD_MUTEX_ERRORCHECK mutex type.
- * Thread locks and then trylocks mutex (attempted recursive lock).
- * Trylock should fail with an EBUSY error.
- * The second unlock attempt should fail with an EPERM error.
- *
- * Depends on API functions:
- * pthread_create()
- * pthread_join()
- * pthread_mutexattr_init()
- * pthread_mutexattr_destroy()
- * pthread_mutexattr_settype()
- * pthread_mutexattr_gettype()
- * pthread_mutex_init()
- * pthread_mutex_destroy()
- * pthread_mutex_lock()
- * pthread_mutex_unlock()
- */
-
-#include "test.h"
-
-static int lockCount = 0;
-
-static pthread_mutex_t mutex;
-static pthread_mutexattr_t mxAttr;
-
-void * locker(void * arg)
-{
- assert(pthread_mutex_lock(&mutex) == 0);
- lockCount++;
- assert(pthread_mutex_trylock(&mutex) == EBUSY);
- lockCount++;
- assert(pthread_mutex_unlock(&mutex) == 0);
- assert(pthread_mutex_unlock(&mutex) == EPERM);
-
- return (void *) 555;
-}
-
-int
-main()
-{
- pthread_t t;
- int result = 0;
- int mxType = -1;
-
- assert(pthread_mutexattr_init(&mxAttr) == 0);
- assert(pthread_mutexattr_settype(&mxAttr, PTHREAD_MUTEX_ERRORCHECK) == 0);
- assert(pthread_mutexattr_gettype(&mxAttr, &mxType) == 0);
- assert(mxType == PTHREAD_MUTEX_ERRORCHECK);
-
- assert(pthread_mutex_init(&mutex, &mxAttr) == 0);
-
- assert(pthread_create(&t, NULL, locker, NULL) == 0);
-
- assert(pthread_join(t, (void **) &result) == 0);
- assert(result == 555);
-
- assert(lockCount == 2);
-
- assert(pthread_mutex_destroy(&mutex) == 0);
- assert(pthread_mutexattr_destroy(&mxAttr) == 0);
-
- exit(0);
-
- /* Never reached */
- return 0;
-}
-
diff --git a/winsup/testsuite/winsup.api/pthread/mutex7n.c b/winsup/testsuite/winsup.api/pthread/mutex7n.c
deleted file mode 100644
index e9a36fe..0000000
--- a/winsup/testsuite/winsup.api/pthread/mutex7n.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * mutex7n.c
- *
- * Tests PTHREAD_MUTEX_NORMAL mutex type.
- * Thread locks then trylocks mutex (attempted recursive lock).
- * The thread should lock first time and EBUSY second time.
- *
- * Depends on API functions:
- * pthread_create()
- * pthread_mutexattr_init()
- * pthread_mutexattr_settype()
- * pthread_mutexattr_gettype()
- * pthread_mutex_init()
- * pthread_mutex_lock()
- * pthread_mutex_unlock()
- */
-
-#include "test.h"
-
-static int lockCount = 0;
-
-static pthread_mutex_t mutex;
-static pthread_mutexattr_t mxAttr;
-
-void * locker(void * arg)
-{
- assert(pthread_mutex_lock(&mutex) == 0);
- lockCount++;
- assert(pthread_mutex_trylock(&mutex) == EBUSY);
- lockCount++;
- assert(pthread_mutex_unlock(&mutex) == 0);
- assert(pthread_mutex_unlock(&mutex) == EPERM);
-
- return (void *) 555;
-}
-
-int
-main()
-{
- pthread_t t;
- int mxType = -1;
-
- assert(pthread_mutexattr_init(&mxAttr) == 0);
- assert(pthread_mutexattr_settype(&mxAttr, PTHREAD_MUTEX_NORMAL) == 0);
- assert(pthread_mutexattr_gettype(&mxAttr, &mxType) == 0);
- assert(mxType == PTHREAD_MUTEX_NORMAL);
-
- assert(pthread_mutex_init(&mutex, &mxAttr) == 0);
-
- assert(pthread_create(&t, NULL, locker, NULL) == 0);
-
- Sleep(1000);
-
- assert(lockCount == 2);
-
- exit(0);
-
- /* Never reached */
- return 0;
-}
-
diff --git a/winsup/testsuite/winsup.api/pthread/mutex7r.c b/winsup/testsuite/winsup.api/pthread/mutex7r.c
deleted file mode 100644
index 6f9ed74..0000000
--- a/winsup/testsuite/winsup.api/pthread/mutex7r.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * mutex7r.c
- *
- * Tests PTHREAD_MUTEX_RECURSIVE mutex type.
- * Thread locks mutex then trylocks mutex (recursive lock twice).
- * Both locks and unlocks should succeed.
- *
- * Depends on API functions:
- * pthread_create()
- * pthread_join()
- * pthread_mutexattr_init()
- * pthread_mutexattr_destroy()
- * pthread_mutexattr_settype()
- * pthread_mutexattr_gettype()
- * pthread_mutex_init()
- * pthread_mutex_destroy()
- * pthread_mutex_lock()
- * pthread_mutex_unlock()
- */
-
-#include "test.h"
-
-static int lockCount = 0;
-
-static pthread_mutex_t mutex;
-static pthread_mutexattr_t mxAttr;
-
-void * locker(void * arg)
-{
- assert(pthread_mutex_lock(&mutex) == 0);
- lockCount++;
- assert(pthread_mutex_trylock(&mutex) == 0);
- lockCount++;
- assert(pthread_mutex_unlock(&mutex) == 0);
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- return (void *) 555;
-}
-
-int
-main()
-{
- pthread_t t;
- int result = 0;
- int mxType = -1;
-
- assert(pthread_mutexattr_init(&mxAttr) == 0);
- assert(pthread_mutexattr_settype(&mxAttr, PTHREAD_MUTEX_RECURSIVE) == 0);
- assert(pthread_mutexattr_gettype(&mxAttr, &mxType) == 0);
- assert(mxType == PTHREAD_MUTEX_RECURSIVE);
-
- assert(pthread_mutex_init(&mutex, &mxAttr) == 0);
-
- assert(pthread_create(&t, NULL, locker, NULL) == 0);
-
- assert(pthread_join(t, (void **) &result) == 0);
- assert(result == 555);
-
- assert(lockCount == 2);
-
- assert(pthread_mutex_destroy(&mutex) == 0);
- assert(pthread_mutexattr_destroy(&mxAttr) == 0);
-
- exit(0);
-
- /* Never reached */
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/mutex8e.c b/winsup/testsuite/winsup.api/pthread/mutex8e.c
deleted file mode 100644
index 7108b02..0000000
--- a/winsup/testsuite/winsup.api/pthread/mutex8e.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * mutex8e.c
- *
- * Tests PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP.
- *
- * Depends on API functions:
- * pthread_mutex_lock()
- * pthread_mutex_unlock()
- */
-
-#include "test.h"
-
-pthread_mutex_t mutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
-
-int
-main()
-{
- assert(mutex == PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP);
-
- assert(pthread_mutex_lock(&mutex) == 0);
-
- assert(mutex != PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP);
-
- assert(mutex != NULL);
-
- assert(pthread_mutex_lock(&mutex) == EDEADLK);
-
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- assert(pthread_mutex_destroy(&mutex) == 0);
-
- assert(mutex == NULL);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/mutex8n.c b/winsup/testsuite/winsup.api/pthread/mutex8n.c
deleted file mode 100644
index 46fc9c6..0000000
--- a/winsup/testsuite/winsup.api/pthread/mutex8n.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * mutex8n.c
- *
- * Tests PTHREAD_NORMAL_MUTEX_INITIALIZER_NP.
- * Thread locks mutex twice (recursive lock).
- * The thread should deadlock.
- *
- * Depends on API functions:
- * pthread_create()
- * pthread_mutex_init()
- * pthread_mutex_lock()
- * pthread_mutex_unlock()
- */
-
-#include "test.h"
-
-static int lockCount = 0;
-
-pthread_mutex_t mutex = PTHREAD_NORMAL_MUTEX_INITIALIZER_NP;
-
-void * locker(void * arg)
-{
- assert(pthread_mutex_lock(&mutex) == 0);
- lockCount++;
-
- /* Should wait here (deadlocked) */
- assert(pthread_mutex_lock(&mutex) == 0);
- lockCount++;
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- return (void *) 555;
-}
-
-int
-main()
-{
- pthread_t t;
-
- assert(pthread_create(&t, NULL, locker, NULL) == 0);
-
- Sleep(1000);
-
- assert(lockCount == 1);
-
- /*
- * Should succeed even though we don't own the lock
- * because FAST mutexes don't check ownership.
- */
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- Sleep (1000);
-
- assert(lockCount == 2);
-
- exit(0);
-
- /* Never reached */
- return 0;
-}
-
diff --git a/winsup/testsuite/winsup.api/pthread/mutex8r.c b/winsup/testsuite/winsup.api/pthread/mutex8r.c
deleted file mode 100644
index ecaccd3..0000000
--- a/winsup/testsuite/winsup.api/pthread/mutex8r.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * mutex8r.c
- *
- * Tests PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP.
- *
- * Depends on API functions:
- * pthread_mutex_lock()
- * pthread_mutex_unlock()
- */
-
-#include "test.h"
-
-pthread_mutex_t mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
-
-int
-main()
-{
- assert(mutex == PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP);
-
- assert(pthread_mutex_lock(&mutex) == 0);
-
- assert(mutex != PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP);
-
- assert(mutex != NULL);
-
- assert(pthread_mutex_lock(&mutex) == 0);
-
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- assert(pthread_mutex_unlock(&mutex) == 0);
-
- assert(pthread_mutex_destroy(&mutex) == 0);
-
- assert(mutex == NULL);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/once1.c b/winsup/testsuite/winsup.api/pthread/once1.c
deleted file mode 100644
index 91dc038..0000000
--- a/winsup/testsuite/winsup.api/pthread/once1.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * once1.c
- *
- * Create a static pthread_once and test that it calls myfunc once.
- *
- * Depends on API functions:
- * pthread_once()
- * pthread_create()
- */
-
-#include "test.h"
-
-pthread_once_t once = PTHREAD_ONCE_INIT;
-
-static int washere = 0;
-
-void
-myfunc(void)
-{
- washere++;
-}
-
-void *
-mythread(void * arg)
-{
- assert(pthread_once(&once, myfunc) == 0);
-
- return 0;
-}
-
-int
-main()
-{
- pthread_t t1, t2;
-
- assert(pthread_create(&t1, NULL, mythread, NULL) == 0);
-
- assert(pthread_create(&t2, NULL, mythread, NULL) == 0);
-
- Sleep(2000);
-
- assert(washere == 1);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/priority1.c b/winsup/testsuite/winsup.api/pthread/priority1.c
deleted file mode 100644
index a311028..0000000
--- a/winsup/testsuite/winsup.api/pthread/priority1.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * File: priority1.c
- *
- * Test Synopsis:
- * - Test thread priority explicit setting using thread attribute.
- *
- * Test Method (Validation or Falsification):
- * -
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * -
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * -
- *
- * Pass Criteria:
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-
-void * func(void * arg)
-{
- int policy;
- struct sched_param param;
-
- assert(pthread_getschedparam(pthread_self(), &policy, &param) == 0);
- assert(policy == SCHED_OTHER);
- return (void *) param.sched_priority;
-}
-
-int
-main()
-{
- pthread_t t;
- pthread_attr_t attr;
- void * result = NULL;
- struct sched_param param;
- int maxPrio = sched_get_priority_max(SCHED_OTHER);
- int minPrio = sched_get_priority_min(SCHED_OTHER);
-
- assert(pthread_attr_init(&attr) == 0);
- assert(pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED) == 0);
-
- for (param.sched_priority = minPrio;
- param.sched_priority <= maxPrio;
- param.sched_priority++)
- {
- assert(pthread_attr_setschedparam(&attr, &param) == 0);
- assert(pthread_create(&t, &attr, func, NULL) == 0);
- pthread_join(t, &result);
- assert((int) result == param.sched_priority);
- }
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/priority2.c b/winsup/testsuite/winsup.api/pthread/priority2.c
deleted file mode 100644
index 4dcf385..0000000
--- a/winsup/testsuite/winsup.api/pthread/priority2.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * File: priority2.c
- *
- * Test Synopsis:
- * - Test thread priority setting after creation.
- *
- * Test Method (Validation or Falsification):
- * -
- *
- * Requirements Tested:
- * -
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Description:
- * -
- *
- * Environment:
- * -
- *
- * Input:
- * - None.
- *
- * Output:
- * - File name, Line number, and failed expression on failure.
- * - No output on success.
- *
- * Assumptions:
- * -
- *
- * Pass Criteria:
- * - Process returns zero exit status.
- *
- * Fail Criteria:
- * - Process returns non-zero exit status.
- */
-
-#include "test.h"
-
-pthread_mutex_t startMx = PTHREAD_MUTEX_INITIALIZER;
-
-void * func(void * arg)
-{
- int policy;
- struct sched_param param;
-
- assert(pthread_mutex_lock(&startMx) == 0);
- assert(pthread_getschedparam(pthread_self(), &policy, &param) == 0);
- assert(pthread_mutex_unlock(&startMx) == 0);
- assert(policy == SCHED_OTHER);
- return (void *) param.sched_priority;
-}
-
-int
-main()
-{
- pthread_t t;
- void * result = NULL;
- struct sched_param param;
- int maxPrio = sched_get_priority_max(SCHED_OTHER);
- int minPrio = sched_get_priority_min(SCHED_OTHER);
-
- for (param.sched_priority = minPrio;
- param.sched_priority <= maxPrio;
- param.sched_priority++)
- {
- assert(pthread_mutex_lock(&startMx) == 0);
- assert(pthread_create(&t, NULL, func, NULL) == 0);
- assert(pthread_setschedparam(t, SCHED_OTHER, &param) == 0);
- assert(pthread_mutex_unlock(&startMx) == 0);
- pthread_join(t, &result);
- assert((int) result == param.sched_priority);
- }
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/rwlock1.c b/winsup/testsuite/winsup.api/pthread/rwlock1.c
deleted file mode 100644
index 25e29f6..0000000
--- a/winsup/testsuite/winsup.api/pthread/rwlock1.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * rwlock1.c
- *
- * Create a simple rwlock object and then destroy it.
- *
- * Depends on API functions:
- * pthread_rwlock_init()
- * pthread_rwlock_destroy()
- */
-
-#include "test.h"
-
-pthread_rwlock_t rwlock = NULL;
-
-int
-main()
-{
- assert(rwlock == NULL);
-
- assert(pthread_rwlock_init(&rwlock, NULL) == 0);
-
- assert(rwlock != NULL);
-
- assert(pthread_rwlock_destroy(&rwlock) == 0);
-
- assert(rwlock == NULL);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/rwlock2.c b/winsup/testsuite/winsup.api/pthread/rwlock2.c
deleted file mode 100644
index cfb3228..0000000
--- a/winsup/testsuite/winsup.api/pthread/rwlock2.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * rwlock2.c
- *
- * Declare a static rwlock object, lock it,
- * and then unlock it again.
- *
- * Depends on API functions:
- * pthread_rwlock_rdlock()
- * pthread_rwlock_unlock()
- */
-
-#include "test.h"
-
-pthread_rwlock_t rwlock = PTHREAD_RWLOCK_INITIALIZER;
-
-int
-main()
-{
- assert(rwlock == PTHREAD_RWLOCK_INITIALIZER);
-
- assert(pthread_rwlock_rdlock(&rwlock) == 0);
-
- assert(rwlock != PTHREAD_RWLOCK_INITIALIZER);
-
- assert(rwlock != NULL);
-
- assert(pthread_rwlock_unlock(&rwlock) == 0);
-
- assert(pthread_rwlock_destroy(&rwlock) == 0);
-
- assert(rwlock == NULL);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/rwlock3.c b/winsup/testsuite/winsup.api/pthread/rwlock3.c
deleted file mode 100644
index 0703c1a..0000000
--- a/winsup/testsuite/winsup.api/pthread/rwlock3.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * rwlock3.c
- *
- *
- * Declare a static rwlock object, wrlock it, trywrlock it,
- * and then unlock it again.
- *
- * Depends on API functions:
- * pthread_rwlock_wrlock()
- * pthread_rwlock_trywrlock()
- * pthread_rwlock_unlock()
- */
-
-#include "test.h"
-
-pthread_rwlock_t rwlock1 = PTHREAD_RWLOCK_INITIALIZER;
-
-static int washere = 0;
-
-void * func(void * arg)
-{
- assert(pthread_rwlock_trywrlock(&rwlock1) == EBUSY);
-
- washere = 1;
-
- return 0;
-}
-
-int
-main()
-{
- pthread_t t;
-
- assert(pthread_rwlock_wrlock(&rwlock1) == 0);
-
- assert(pthread_create(&t, NULL, func, NULL) == 0);
-
- Sleep(2000);
-
- assert(pthread_rwlock_unlock(&rwlock1) == 0);
-
- assert(washere == 1);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/rwlock4.c b/winsup/testsuite/winsup.api/pthread/rwlock4.c
deleted file mode 100644
index 8cae52e..0000000
--- a/winsup/testsuite/winsup.api/pthread/rwlock4.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * rwlock4.c
- *
- * Declare a static rwlock object, rdlock it, trywrlock it,
- * and then unlock it again.
- *
- * Depends on API functions:
- * pthread_rwlock_rdlock()
- * pthread_rwlock_trywrlock()
- * pthread_rwlock_unlock()
- */
-
-#include "test.h"
-
-pthread_rwlock_t rwlock1 = PTHREAD_RWLOCK_INITIALIZER;
-
-static int washere = 0;
-
-void * func(void * arg)
-{
- assert(pthread_rwlock_trywrlock(&rwlock1) == EBUSY);
-
- washere = 1;
-
- return 0;
-}
-
-int
-main()
-{
- pthread_t t;
-
- assert(pthread_rwlock_rdlock(&rwlock1) == 0);
-
- assert(pthread_create(&t, NULL, func, NULL) == 0);
-
- Sleep(2000);
-
- assert(pthread_rwlock_unlock(&rwlock1) == 0);
-
- assert(washere == 1);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/rwlock5.c b/winsup/testsuite/winsup.api/pthread/rwlock5.c
deleted file mode 100644
index 3ada946..0000000
--- a/winsup/testsuite/winsup.api/pthread/rwlock5.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * rwlock5.c
- *
- *
- * Declare a static rwlock object, rdlock it, tryrdlock it,
- * and then unlock it again.
- *
- * Depends on API functions:
- * pthread_rwlock_rdlock()
- * pthread_rwlock_tryrdlock()
- * pthread_rwlock_unlock()
- */
-
-#include "test.h"
-
-pthread_rwlock_t rwlock1 = PTHREAD_RWLOCK_INITIALIZER;
-
-static int washere = 0;
-
-void * func(void * arg)
-{
- assert(pthread_rwlock_tryrdlock(&rwlock1) == 0);
-
- assert(pthread_rwlock_unlock(&rwlock1) == 0);
-
- washere = 1;
-
- return 0;
-}
-
-int
-main()
-{
- pthread_t t;
-
- assert(pthread_rwlock_rdlock(&rwlock1) == 0);
-
- assert(pthread_create(&t, NULL, func, NULL) == 0);
-
- Sleep(2000);
-
- assert(pthread_rwlock_unlock(&rwlock1) == 0);
-
- assert(washere == 1);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/rwlock6.c b/winsup/testsuite/winsup.api/pthread/rwlock6.c
deleted file mode 100644
index d5f2320..0000000
--- a/winsup/testsuite/winsup.api/pthread/rwlock6.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * rwlock6.c
- *
- * Check writer and reader locking
- *
- * Depends on API functions:
- * pthread_rwlock_rdlock()
- * pthread_rwlock_wrlock()
- * pthread_rwlock_unlock()
- */
-
-#include "test.h"
-
-static pthread_rwlock_t rwlock1 = PTHREAD_RWLOCK_INITIALIZER;
-
-static int bankAccount = 0;
-
-void * wrfunc(void * arg)
-{
- int ba;
-
- assert(pthread_rwlock_wrlock(&rwlock1) == 0);
- Sleep(2000);
- bankAccount += 10;
- ba = bankAccount;
- assert(pthread_rwlock_unlock(&rwlock1) == 0);
-
- return ((void *) ba);
-}
-
-void * rdfunc(void * arg)
-{
- int ba;
-
- assert(pthread_rwlock_rdlock(&rwlock1) == 0);
- ba = bankAccount;
- assert(pthread_rwlock_unlock(&rwlock1) == 0);
-
- return ((void *) ba);
-}
-
-int
-main()
-{
- pthread_t wrt1;
- pthread_t wrt2;
- pthread_t rdt;
- int wr1Result = 0;
- int wr2Result = 0;
- int rdResult = 0;
-
- bankAccount = 0;
-
- assert(pthread_create(&wrt1, NULL, wrfunc, NULL) == 0);
- Sleep(500);
- assert(pthread_create(&rdt, NULL, rdfunc, NULL) == 0);
- Sleep(500);
- assert(pthread_create(&wrt2, NULL, wrfunc, NULL) == 0);
-
- assert(pthread_join(wrt1, (void **) &wr1Result) == 0);
- assert(pthread_join(rdt, (void **) &rdResult) == 0);
- assert(pthread_join(wrt2, (void **) &wr2Result) == 0);
-
- assert(wr1Result == 10);
- assert(rdResult == 20);
- assert(wr2Result == 20);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/rwlock7.c b/winsup/testsuite/winsup.api/pthread/rwlock7.c
deleted file mode 100644
index ded882d..0000000
--- a/winsup/testsuite/winsup.api/pthread/rwlock7.c
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * rwlock7.c
- *
- * Hammer on a bunch of rwlocks to test robustness and fairness.
- * Printed stats should be roughly even for each thread.
- */
-
-#include "test.h"
-#include <sys/time.h>
-#include <sys/timeb.h>
-
-#ifdef __GNUC__
-#include <stdlib.h>
-#endif
-
-#define THREADS 5
-#define DATASIZE 15
-#define ITERATIONS 1000000
-
-#define rand_r( _seed ) \
- ( _seed == _seed? rand() : rand() )
-
-/*
- * Keep statistics for each thread.
- */
-typedef struct thread_tag {
- int thread_num;
- pthread_t thread_id;
- int updates;
- int reads;
- int interval;
-} thread_t;
-
-/*
- * Read-write lock and shared data
- */
-typedef struct data_tag {
- pthread_rwlock_t lock;
- int data;
- int updates;
-} data_t;
-
-static thread_t threads[THREADS];
-static data_t data[DATASIZE];
-
-/*
- * Thread start routine that uses read-write locks
- */
-void *thread_routine (void *arg)
-{
- thread_t *self = (thread_t*)arg;
- int repeats = 0;
- int iteration;
- int element = 0;
-
- for (iteration = 0; iteration < ITERATIONS; iteration++)
- {
- if (iteration % (ITERATIONS / 10) == 0)
- {
- putchar('.');
- fflush(stdout);
- }
- /*
- * Each "self->interval" iterations, perform an
- * update operation (write lock instead of read
- * lock).
- */
- if ((iteration % self->interval) == 0)
- {
- assert(pthread_rwlock_wrlock (&data[element].lock) == 0);
- data[element].data = self->thread_num;
- data[element].updates++;
- self->updates++;
- assert(pthread_rwlock_unlock (&data[element].lock) == 0);
- } else {
- /*
- * Look at the current data element to see whether
- * the current thread last updated it. Count the
- * times, to report later.
- */
- assert(pthread_rwlock_rdlock (&data[element].lock) == 0);
-
- self->reads++;
-
- if (data[element].data == self->thread_num)
- {
- repeats++;
- }
-
- assert(pthread_rwlock_unlock (&data[element].lock) == 0);
- }
-
- element++;
-
- if (element >= DATASIZE)
- {
- element = 0;
- }
- }
-
- if (repeats > 0)
- {
- printf ("\nThread %d found unchanged elements %d times",
- self->thread_num, repeats);
- fflush(stdout);
- }
-
- return NULL;
-}
-
-int
-main (int argc, char *argv[])
-{
- int count;
- int data_count;
- int thread_updates = 0;
- int data_updates = 0;
- int seed = 1;
-
- struct timeb currSysTime1;
- struct timeb currSysTime2;
-
- /*
- * Initialize the shared data.
- */
- for (data_count = 0; data_count < DATASIZE; data_count++)
- {
- data[data_count].data = 0;
- data[data_count].updates = 0;
-
- assert(pthread_rwlock_init (&data[data_count].lock, NULL) == 0);
- }
-
- ftime(&currSysTime1);
-
- /*
- * Create THREADS threads to access shared data.
- */
- for (count = 0; count < THREADS; count++)
- {
- threads[count].thread_num = count;
- threads[count].updates = 0;
- threads[count].reads = 0;
- while (!(threads[count].interval = rand_r (&seed) % 71))
- continue;
-
- assert(pthread_create (&threads[count].thread_id,
- NULL, thread_routine, (void*)&threads[count]) == 0);
- }
-
- /*
- * Wait for all threads to complete, and collect
- * statistics.
- */
- for (count = 0; count < THREADS; count++)
- {
- assert(pthread_join (threads[count].thread_id, NULL) == 0);
- thread_updates += threads[count].updates;
- printf ("%02d: interval %d, updates %d, reads %d\n",
- count, threads[count].interval,
- threads[count].updates, threads[count].reads);
- }
-
- putchar('\n');
- fflush(stdout);
-
- /*
- * Collect statistics for the data.
- */
- for (data_count = 0; data_count < DATASIZE; data_count++)
- {
- data_updates += data[data_count].updates;
- printf ("data %02d: value %d, %d updates\n",
- data_count, data[data_count].data, data[data_count].updates);
- assert(pthread_rwlock_destroy (&data[data_count].lock) == 0);
- }
-
- printf ("%d thread updates, %d data updates\n",
- thread_updates, data_updates);
-
- ftime(&currSysTime2);
-
- printf( "\nstart: %ld/%d, stop: %ld/%d, duration:%ld\n",
- currSysTime1.time,currSysTime1.millitm,
- currSysTime2.time,currSysTime2.millitm,
- (currSysTime2.time*1000+currSysTime2.millitm) -
- (currSysTime1.time*1000+currSysTime1.millitm));
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/self1.c b/winsup/testsuite/winsup.api/pthread/self1.c
deleted file mode 100644
index d460818..0000000
--- a/winsup/testsuite/winsup.api/pthread/self1.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * self1.c
- *
- * Test for pthread_self().
- *
- * Depends on API functions:
- * pthread_self()
- *
- * Implicitly depends on:
- * pthread_getspecific()
- * pthread_setspecific()
- */
-
-#include "test.h"
-
-int
-main(int argc, char * argv[])
-{
- /*
- * This should always succeed unless the system has no
- * resources (memory) left.
- */
- assert(pthread_self() != NULL);
-
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/self2.c b/winsup/testsuite/winsup.api/pthread/self2.c
deleted file mode 100644
index 83339f1..0000000
--- a/winsup/testsuite/winsup.api/pthread/self2.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * self2.c
- *
- * Test for pthread_self().
- *
- * Depends on API functions:
- * pthread_create()
- * pthread_self()
- *
- * Implicitly depends on:
- * pthread_getspecific()
- * pthread_setspecific()
- */
-
-#include "test.h"
-#include <string.h>
-
-static pthread_t me;
-
-void *
-entry(void * arg)
-{
- me = pthread_self();
-
- return arg;
-}
-
-int
-main()
-{
- pthread_t t;
-
- assert(pthread_create(&t, NULL, entry, NULL) == 0);
-
- Sleep(2000);
-
- /*
- * Not much more we can do here but bytewise compare t with
- * what pthread_self returned.
- */
- assert(t == me);
- assert(memcmp((const void *) t, (const void *) me, sizeof t) == 0);
-
- /* Success. */
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/pthread/test.h b/winsup/testsuite/winsup.api/pthread/test.h
deleted file mode 100644
index 0e72464..0000000
--- a/winsup/testsuite/winsup.api/pthread/test.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * test.h
- *
- * Useful definitions and declarations for tests.
- */
-
-#ifndef _PTHREAD_TEST_H_
-#define _PTHREAD_TEST_H_
-
-#include <pthread.h>
-#include <sched.h>
-#include <semaphore.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <assert.h>
-#include <windows.h>
-
-/* #define assert(x) do { fprint (stderr, "assertion failed\n"); exit(1) } while (0) */
-
-const char * error_string[] = {
- "ZERO_or_EOK",
- "EPERM",
- "ENOFILE_or_ENOENT",
- "ESRCH",
- "EINTR",
- "EIO",
- "ENXIO",
- "E2BIG",
- "ENOEXEC",
- "EBADF",
- "ECHILD",
- "EAGAIN",
- "ENOMEM",
- "EACCES",
- "EFAULT",
- "UNKNOWN_15",
- "EBUSY",
- "EEXIST",
- "EXDEV",
- "ENODEV",
- "ENOTDIR",
- "EISDIR",
- "EINVAL",
- "ENFILE",
- "EMFILE",
- "ENOTTY",
- "UNKNOWN_26",
- "EFBIG",
- "ENOSPC",
- "ESPIPE",
- "EROFS",
- "EMLINK",
- "EPIPE",
- "EDOM",
- "ERANGE",
- "UNKNOWN_35",
- "EDEADLOCK_or_EDEADLK",
- "UNKNOWN_37",
- "ENAMETOOLONG",
- "ENOLCK",
- "ENOSYS",
- "ENOTEMPTY",
- "EILSEQ",
-};
-
-/*
- * The Mingw32 assert macro calls the CRTDLL _assert function
- * which pops up a dialog. We want to run in batch mode so
- * we define our own assert macro.
- */
-#ifdef assert
-# undef assert
-#endif
-
-#ifdef NDEBUG
-
-# define assert(e) ((void)0)
-
-#else /* NDEBUG */
-
-#ifndef ASSERT_TRACE
-# define ASSERT_TRACE 0
-#else
-# undef ASSERT_TRACE
-# define ASSERT_TRACE 1
-#endif
-
-# define assert(e) \
- ((e) ? ((ASSERT_TRACE) ? fprintf(stderr, \
- "Assertion succeeded: (%s), file %s, line %d\n", \
- #e, __FILE__, (int) __LINE__), \
- fflush(stderr) : \
- 0) : \
- (fprintf(stderr, "Assertion failed: (%s), file %s, line %d\n", \
- #e, __FILE__, (int) __LINE__), exit(1), 0))
-
-#endif /* NDEBUG */
-
-
-#endif
diff --git a/winsup/testsuite/winsup.api/pthread/threadidafterfork.c b/winsup/testsuite/winsup.api/pthread/threadidafterfork.c
deleted file mode 100644
index 473eaec..0000000
--- a/winsup/testsuite/winsup.api/pthread/threadidafterfork.c
+++ /dev/null
@@ -1,50 +0,0 @@
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/wait.h>
-#include <pthread.h>
-#include <stdlib.h>
-
-static void * TestThread ( void * );
-
-int main (void)
-{
- pthread_t t;
-
- pthread_create (&t, NULL, TestThread, NULL);
- pthread_join (t, NULL);
-
- return 0;
-}
-
-static void * TestThread ( void *not_used )
-{
- pthread_t iAm = pthread_self();
- int status;
- switch (fork ())
- {
- case -1:
- exit(1);
- case 0:
- if (iAm != pthread_self())
- exit (1);
- else
- exit (0);
- break;
- default:
- wait (&status);
- if (status != 0)
- exit (1);
- }
- exit(0);
-}
-
-/*
-The forked child will not get the same thread handle as its parent, it
-will get the thread handle from the main thread instead. The child will
-not terminate because the threadcount is still 2 after the fork (it is
-set to 1 in MTinterface::Init and then set back to 2 after the childs
-memory gets overwritten by the parent).
-
-concept test by Thomas Pfaff <tpfaff@gmx.net>
-scritable test by Robert Collins <rbtcollins@hotmail.com>
-*/
diff --git a/winsup/testsuite/winsup.api/pthread/tsd1.c b/winsup/testsuite/winsup.api/pthread/tsd1.c
deleted file mode 100644
index a65cf66..0000000
--- a/winsup/testsuite/winsup.api/pthread/tsd1.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * tsd1.c
- *
- * Test Thread Specific Data (TSD) key creation and destruction.
- *
- * Description:
- * -
- *
- * Test Method (validation or falsification):
- * - validation
- *
- * Requirements Tested:
- * - keys are created for each existing thread including the main thread
- * - keys are created for newly created threads
- * - keys are thread specific
- * - destroy routine is called on each thread exit including the main thread
- *
- * Features Tested:
- * -
- *
- * Cases Tested:
- * -
- *
- * Environment:
- * -
- *
- * Input:
- * - none
- *
- * Output:
- * - text to stdout
- *
- * Assumptions:
- * - already validated: pthread_create()
- * pthread_once()
- * - main thread also has a POSIX thread identity
- *
- * Pass Criteria:
- * - stdout matches file reference/tsd1.out
- *
- * Fail Criteria:
- * - fails to match file reference/tsd1.out
- * - output identifies failed component
- */
-
-#include <sched.h>
-#include "test.h"
-
-static pthread_key_t key = NULL;
-static int accesscount[10];
-static int thread_set[10];
-static int thread_destroyed[10];
-
-static void
-destroy_key(void * arg)
-{
- int * j = (int *) arg;
-
- (*j)++;
-
- assert(*j == 2);
-
- thread_destroyed[j - accesscount] = 1;
-}
-
-static void
-setkey(void * arg)
-{
- int * j = (int *) arg;
-
- thread_set[j - accesscount] = 1;
-
- assert(*j == 0);
-
- assert(pthread_getspecific(key) == NULL);
-
- assert(pthread_setspecific(key, arg) == 0);
-
- assert(pthread_getspecific(key) == arg);
-
- (*j)++;
-
- assert(*j == 1);
-}
-
-static void *
-mythread(void * arg)
-{
- while (key == NULL)
- {
- sched_yield();
- }
-
- setkey(arg);
-
- return 0;
-
- /* Exiting the thread will call the key destructor. */
-}
-
-int
-main()
-{
- int i;
- int fail = 0;
- pthread_t thread[10];
-
- for (i = 1; i < 5; i++)
- {
- accesscount[i] = thread_set[i] = thread_destroyed[i] = 0;
- assert(pthread_create(&thread[i], NULL, mythread, (void *)&accesscount[i]) == 0);
- }
-
- Sleep(2000);
-
- /*
- * Here we test that existing threads will get a key created
- * for them.
- */
- assert(pthread_key_create(&key, destroy_key) == 0);
-
- /*
- * Test main thread key.
- */
- accesscount[0] = 0;
- setkey((void *) &accesscount[0]);
-
- /*
- * Here we test that new threads will get a key created
- * for them.
- */
- for (i = 5; i < 10; i++)
- {
- accesscount[i] = thread_set[i] = thread_destroyed[i] = 0;
- assert(pthread_create(&thread[i], NULL, mythread, (void *)&accesscount[i]) == 0);
- }
-
- /*
- * Wait for all threads to complete.
- */
- for (i = 1; i < 10; i++)
- {
- int result = 0;
-
- assert(pthread_join(thread[i], (void **) &result) == 0);
- }
-
- assert(pthread_key_delete(key) == 0);
-
- for (i = 1; i < 10; i++)
- {
- /*
- * The counter is incremented once when the key is set to
- * a value, and again when the key is destroyed. If the key
- * doesn't get set for some reason then it will still be
- * NULL and the destroy function will not be called, and
- * hence accesscount will not equal 2.
- */
- if (accesscount[i] != 2)
- {
- fail++;
- fprintf(stderr, "Thread %d key, set = %d, destroyed = %d\n",
- i, thread_set[i], thread_destroyed[i]);
- }
- }
-
- fflush(stderr);
-
- return (fail);
-}
diff --git a/winsup/testsuite/winsup.api/resethand.c b/winsup/testsuite/winsup.api/resethand.c
deleted file mode 100644
index 7d58dcd..0000000
--- a/winsup/testsuite/winsup.api/resethand.c
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <stdio.h>
-#include <signal.h>
-#include <sys/wait.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-int doit = 0;
-void
-ouch (int sig)
-{
- if (doit++ > 0)
- kill (getpid (), SIGTERM);
-}
-
-int
-main (int argc, char **argv)
-{
- static struct sigaction act;
- if (argc == 1)
- act.sa_flags = SA_RESETHAND;
- act.sa_handler = ouch;
- sigaction (SIGSEGV, &act, NULL);
- int pid = fork ();
- int status;
- if (pid > 0)
- waitpid (pid, &status, 0);
- else
- {
- int *i = 0;
- *i = 9;
- exit (0x42);
- }
- status &= ~0x80; // remove core dump flag
- printf ("pid %d exited with status %p\n", pid, (void *) status);
- exit (argc == 1 ? !(status == SIGSEGV) : !(status == SIGTERM));
-}
diff --git a/winsup/testsuite/winsup.api/samples/sample-fail.c b/winsup/testsuite/winsup.api/samples/sample-fail.c
deleted file mode 100644
index d0d3e4a..0000000
--- a/winsup/testsuite/winsup.api/samples/sample-fail.c
+++ /dev/null
@@ -1,5 +0,0 @@
-int
-main()
-{
- return 1;
-}
diff --git a/winsup/testsuite/winsup.api/samples/sample-miscompile.c b/winsup/testsuite/winsup.api/samples/sample-miscompile.c
deleted file mode 100644
index bc0d21d..0000000
--- a/winsup/testsuite/winsup.api/samples/sample-miscompile.c
+++ /dev/null
@@ -1 +0,0 @@
-foo bar grill
diff --git a/winsup/testsuite/winsup.api/samples/sample-pass.c b/winsup/testsuite/winsup.api/samples/sample-pass.c
deleted file mode 100644
index 8e8f518..0000000
--- a/winsup/testsuite/winsup.api/samples/sample-pass.c
+++ /dev/null
@@ -1,5 +0,0 @@
-int
-main()
-{
- return 0;
-}
diff --git a/winsup/testsuite/winsup.api/semtest.c b/winsup/testsuite/winsup.api/semtest.c
deleted file mode 100644
index dfb8c08..0000000
--- a/winsup/testsuite/winsup.api/semtest.c
+++ /dev/null
@@ -1,348 +0,0 @@
-/*-
- * Copyright (c) 1999 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
- * NASA Ames Research Center.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * Obtained from: $NetBSD: semtest.c,v 1.4 2002/07/20 08:36:25 grant Exp $
- * $FreeBSD: /repoman/r/ncvs/src/tools/regression/sysvsem/semtest.c,v 1.1 2002/08/15 06:34:37 alfred Exp $
- */
-
-/*
- * Test the SVID-compatible Semaphore facility.
- */
-
-/*
- * CV, 2003-11-17: Add to Cygwin testsuite.
- */
-#include <sys/param.h>
-#include <sys/ipc.h>
-#include <sys/sem.h>
-#include <sys/wait.h>
-
-#include <err.h>
-#include <errno.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include "test.h"
-#include "usctest.h"
-
-const char *TCID = "semtest"; /* Test program identifier. */
-int TST_TOTAL = 54; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int main (int, char *[]);
-void print_semid_ds (struct semid_ds *, mode_t);
-void sigsys_handler (int);
-void sigchld_handler(int);
-void cleanup (void);
-void waiter (void);
-
-int sender_semid = -1;
-pid_t child_pid;
-int child_count;
-int signal_was_sigchld;
-
-key_t semkey;
-
-/*
- * This is the original semun union used by the sysvsem utility.
- * It is deliberately kept here under #if 0'ed condition for future
- * reference. PLEASE DO NOT REMOVE. The {SET,GET}ALL in FreeBSD
- * are signed values, so the default version in sys/sem.h suffices.
- */
-#if 1 /*0*/
-union semun {
- int val; /* value for SETVAL */
- struct semid_ds *buf; /* buffer for IPC_{STAT,SET} */
- u_short *array; /* array for GETALL & SETALL */
-};
-#endif
-
-int
-main(int argc, char *argv[])
-{
- struct sigaction sa;
- union semun sun;
- struct semid_ds s_ds;
- sigset_t sigmask;
- int i;
-
- Tst_count = 0;
-
- /*
- * Install a SIGSYS handler so that we can exit gracefully if
- * System V Semaphore support isn't in the kernel.
- */
- sa.sa_handler = sigsys_handler;
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = 0;
- if (sigaction(SIGSYS, &sa, NULL) == -1)
- tst_brkm (TBROK, cleanup, "sigaction SIGSYS");
-
- /*
- * Install and SIGCHLD handler to deal with all possible exit
- * conditions of the receiver.
- */
- sa.sa_handler = sigchld_handler;
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = 0;
- if (sigaction(SIGCHLD, &sa, NULL) == -1)
- tst_brkm (TBROK, cleanup, "sigaction SIGCHLD");
-
- semkey = ftok("/", 4160);
- tst_resm (semkey == (key_t)-1 ? TFAIL : TPASS,
- "ftok(\"/\") returns valid value");
-
- /*
- * Initialize child_pid to ourselves to that the cleanup function
- * works before we create the receiver.
- */
- child_pid = getpid();
-
- sender_semid = semget(semkey, 1, IPC_CREAT | 0640);
- tst_resm (sender_semid == -1 ? TFAIL : TPASS, "sender calls semget");
-
- sun.buf = &s_ds;
- tst_resm (semctl(sender_semid, 0, IPC_STAT, sun) == -1 ? TFAIL : TPASS,
- "semctl IPC_STAT");
-
- print_semid_ds(&s_ds, 0640);
-
- s_ds.sem_perm.mode = (s_ds.sem_perm.mode & ~0777) | 0600;
-
- sun.buf = &s_ds;
- tst_resm (semctl(sender_semid, 0, IPC_SET, sun) == -1 ? TFAIL : TPASS,
- "semctl IPC_SET");
-
- memset(&s_ds, 0, sizeof(s_ds));
-
- sun.buf = &s_ds;
- tst_resm (semctl(sender_semid, 0, IPC_STAT, sun) == -1 ? TFAIL : TPASS,
- "semctl IPC_STAT");
-
- tst_resm ((s_ds.sem_perm.mode & 0777) != 0600 ? TFAIL : TPASS,
- "IPC_SET of mode holds");
-
- print_semid_ds(&s_ds, 0600);
-
- for (child_count = 0; child_count < 5; child_count++) {
- switch ((child_pid = fork())) {
- case -1:
- tst_brkm (TBROK, cleanup, "fork");
- /* NOTREACHED */
-
- case 0:
- Tst_count += 22 + child_count * 4;
- tst_resm (TPASS, "fork");
- waiter();
- break;
-
- default:
- break;
- }
- }
-
- /*
- * Wait for all of the waiters to be attempting to acquire the
- * semaphore.
- */
- for (;;) {
- i = semctl(sender_semid, 0, GETNCNT);
- if (i == -1)
- tst_brkm (TBROK, cleanup, "semctl GETNCNT");
- if (i == 5)
- break;
- }
-
- /*
- * Now set the thundering herd in motion by initializing the
- * semaphore to the value 1.
- */
- sun.val = 1;
- tst_resm (semctl(sender_semid, 0, SETVAL, sun) == -1 ? TFAIL : TPASS,
- "sender: semctl SETVAL to 1");
-
- /*
- * Suspend forever; when we get SIGCHLD, the handler will exit.
- */
- sigemptyset(&sigmask);
- for (;;) {
- (void) sigsuspend(&sigmask);
- if (signal_was_sigchld)
- signal_was_sigchld = 0;
- else
- break;
- }
-
- /*
- * ...and any other signal is an unexpected error.
- */
-
- tst_brkm (TBROK, cleanup, "sender: received unexpected signal");
- exit (1);
-}
-
-void
-sigsys_handler(int signo)
-{
-
- tst_brkm (TBROK, cleanup,
- "System V Semaphore support is not present in the kernel");
-}
-
-void
-sigchld_handler(int signo)
-{
- union semun sun;
- struct semid_ds s_ds;
- int cstatus;
-
- /*
- * Reap the child; if it exited successfully, then we're on the
- * right track!
- */
- if (wait(&cstatus) == -1)
- tst_brkm (TBROK, cleanup, "wait");
-
- if (WIFEXITED(cstatus) == 0)
- tst_brkm (TBROK, cleanup, "receiver exited abnormally");
-
- if (WEXITSTATUS(cstatus) != 0)
- tst_brkm (TBROK, cleanup, "receiver exited with status %d",
- WEXITSTATUS(cstatus));
-
- /*
- * If we get here, the child has exited normally, and we should
- * decrement the child count. If the child_count reaches 0, we
- * should exit.
- */
-
- sun.buf = &s_ds;
- tst_resm (semctl(sender_semid, 0, IPC_STAT, sun) == -1 ? TFAIL : TPASS,
- "semctl IPC_STAT");
-
- print_semid_ds(&s_ds, 0600);
-
- if (--child_count != 0) {
- signal_was_sigchld = 1;
- return;
- }
-
- cleanup ();
-}
-
-void
-cleanup()
-{
-
- /*
- * If we're the sender, and it exists, remove the message queue.
- */
- if (child_pid != 0 && sender_semid != -1) {
- tst_resm (semctl(sender_semid, 0, IPC_RMID) == -1
- ? TFAIL : TPASS, "semctl IPC_RMID");
- }
- tst_exit ();
-}
-
-void
-print_semid_ds(struct semid_ds *sp, mode_t mode)
-{
- uid_t uid = geteuid();
- gid_t gid = getegid();
-
- printf("PERM: uid %d, gid %d, cuid %d, cgid %d, mode 0%o\n",
- (int)sp->sem_perm.uid, (int)sp->sem_perm.gid,
- (int)sp->sem_perm.cuid, (int)sp->sem_perm.cgid,
- sp->sem_perm.mode & 0777);
-
- printf("nsems %u\n", sp->sem_nsems);
-
- printf("otime: %s", ctime(&sp->sem_otime));
- printf("ctime: %s", ctime(&sp->sem_ctime));
-
- /*
- * Sanity check a few things.
- */
-
- tst_resm (sp->sem_perm.uid != uid || sp->sem_perm.cuid != uid
- ? TFAIL : TPASS, "uid matches");
-
- tst_resm (sp->sem_perm.gid != gid || sp->sem_perm.cgid != gid
- ? TFAIL : TPASS, "gid matches");
-
- tst_resm ((sp->sem_perm.mode & 0777) != mode
- ? TFAIL : TPASS, "mode matches");
-}
-
-void
-waiter()
-{
- struct sembuf s;
- int semid;
-
- tst_resm ((semid = semget(semkey, 1, 0)) == -1 ? TFAIL : TPASS,
- "waiter: semget");
-
- /*
- * Attempt to acquire the semaphore.
- */
- s.sem_num = 0;
- s.sem_op = -1;
- s.sem_flg = SEM_UNDO;
-
- tst_resm (semop(semid, &s, 1) == -1 ? TFAIL : TPASS,
- "waiter: semop -1");
-
- printf("WOO! GOT THE SEMAPHORE!\n");
- sleep(1);
-
- /*
- * Release the semaphore and exit.
- */
- s.sem_num = 0;
- s.sem_op = 1;
- s.sem_flg = SEM_UNDO;
-
- tst_resm (semop(semid, &s, 1) == -1 ? TFAIL : TPASS,
- "waiter: semop +1");
-
- /* Allow parent to receive message before getting SIGCHLD. */
- sleep (1);
- exit(0);
-}
diff --git a/winsup/testsuite/winsup.api/shmtest.c b/winsup/testsuite/winsup.api/shmtest.c
deleted file mode 100644
index 54a2493..0000000
--- a/winsup/testsuite/winsup.api/shmtest.c
+++ /dev/null
@@ -1,293 +0,0 @@
-/*-
- * Copyright (c) 1999 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
- * NASA Ames Research Center.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * Obtained from: $NetBSD: shmtest.c,v 1.3 2002/07/20 08:36:26 grant Exp $
- * $FreeBSD: /repoman/r/ncvs/src/tools/regression/sysvshm/shmtest.c,v 1.1 2002/08/15 06:34:37 alfred Exp $
- */
-
-/*
- * Test the SVID-compatible Shared Memory facility.
- */
-
-#include <sys/param.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <sys/wait.h>
-
-#include <err.h>
-#include <errno.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include "test.h"
-#include "usctest.h"
-
-const char *TCID = "shmtest"; /* Test program identifier. */
-int TST_TOTAL = 22; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-int main __P((int, char *[]));
-void print_shmid_ds __P((struct shmid_ds *, mode_t));
-void sigsys_handler __P((int));
-void sigchld_handler __P((int));
-void cleanup __P((void));
-void receiver __P((void));
-
-const char *m_str = "The quick brown fox jumped over the lazy dog.";
-
-int sender_shmid = -1;
-pid_t child_pid;
-
-key_t shmkey;
-
-size_t pgsize;
-
-int
-main(argc, argv)
- int argc;
- char *argv[];
-{
- struct sigaction sa;
- struct shmid_ds s_ds;
- sigset_t sigmask;
- char *shm_buf;
-
- Tst_count = 0;
-
- /*
- * Install a SIGSYS handler so that we can exit gracefully if
- * System V Shared Memory support isn't in the kernel.
- */
- sa.sa_handler = sigsys_handler;
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = 0;
- if (sigaction(SIGSYS, &sa, NULL) == -1)
- tst_brkm (TBROK, cleanup, "sigaction SIGSYS");
-
- /*
- * Install and SIGCHLD handler to deal with all possible exit
- * conditions of the receiver.
- */
- sa.sa_handler = sigchld_handler;
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = 0;
- if (sigaction(SIGCHLD, &sa, NULL) == -1)
- tst_brkm (TBROK, cleanup, "sigaction SIGCHLD");
-
- pgsize = sysconf(_SC_PAGESIZE);
-
- shmkey = ftok("/", 4160);
- tst_resm (shmkey == (key_t)-1 ? TFAIL : TPASS,
- "ftok(\"/\") returns valid value");
-
- /*
- * Initialize child_pid to ourselves to that the cleanup function
- * works before we create the receiver.
- */
- child_pid = getpid();
-
- sender_shmid = shmget(shmkey, pgsize, IPC_CREAT | 0640);
- tst_resm (sender_shmid == -1 ? TFAIL : TPASS, "sender calls shmget");
-
- tst_resm (shmctl(sender_shmid, IPC_STAT, &s_ds) == -1 ? TFAIL : TPASS,
- "shmctl IPC_STAT");
-
- print_shmid_ds(&s_ds, 0640);
-
- s_ds.shm_perm.mode = (s_ds.shm_perm.mode & ~0777) | 0600;
-
- tst_resm (shmctl(sender_shmid, IPC_SET, &s_ds) == -1 ? TFAIL : TPASS,
- "shmctl IPC_SET");
-
- memset(&s_ds, 0, sizeof(s_ds));
-
- tst_resm (shmctl(sender_shmid, IPC_STAT, &s_ds) == -1 ? TFAIL : TPASS,
- "shmctl IPC_STAT");
-
- tst_resm ((s_ds.shm_perm.mode & 0777) != 0600 ? TFAIL : TPASS,
- "IPC_SET of mode holds");
-
- print_shmid_ds(&s_ds, 0600);
-
- tst_resm ((shm_buf = shmat(sender_shmid, NULL, 0)) == (void *) -1
- ? TFAIL : TPASS, "sender: shmat");
-
- /*
- * Write the test pattern into the shared memory buffer.
- */
- strcpy(shm_buf, m_str);
-
- switch ((child_pid = fork())) {
- case -1:
- tst_brkm (TBROK, cleanup, "fork");
- /* NOTREACHED */
-
- case 0:
- tst_resm (TPASS, "fork");
- receiver();
- break;
-
- default:
- Tst_count += 4;
- break;
- }
-
- /*
- * Suspend forever; when we get SIGCHLD, the handler will exit.
- */
- sigemptyset(&sigmask);
- (void) sigsuspend(&sigmask);
-
- /*
- * ...and any other signal is an unexpected error.
- */
- tst_brkm (TBROK, cleanup, "sender: received unexpected signal");
- exit (1);
-}
-
-void
-sigsys_handler(signo)
- int signo;
-{
-
- tst_brkm (TBROK, cleanup,
- "System V Shared Memory support is not present in the kernel");
-}
-
-void
-sigchld_handler(signo)
- int signo;
-{
- struct shmid_ds s_ds;
- int cstatus;
-
- /*
- * Reap the child; if it exited successfully, then the test passed!
- */
- if (waitpid(child_pid, &cstatus, 0) != child_pid)
- tst_brkm (TBROK, cleanup, "waitpid");
-
- if (WIFEXITED(cstatus) == 0)
- tst_brkm (TBROK, cleanup, "receiver exited abnormally");
-
- if (WEXITSTATUS(cstatus) != 0)
- tst_brkm (TBROK, cleanup, "receiver exited with status %d",
- WEXITSTATUS(cstatus));
-
- /*
- * If we get here, the child has exited normally, and thus
- * we should exit normally too. First, tho, we print out
- * the final stats for the message queue.
- */
-
- tst_resm (shmctl(sender_shmid, IPC_STAT, &s_ds) == -1 ? TFAIL : TPASS,
- "shmctl IPC_STAT");
-
- print_shmid_ds(&s_ds, 0600);
-
- cleanup ();
-}
-
-void
-cleanup()
-{
-
- /*
- * If we're the sender, and it exists, remove the shared memory area.
- */
- if (child_pid != 0 && sender_shmid != -1) {
- tst_resm (shmctl(sender_shmid, IPC_RMID, NULL) == -1
- ? TFAIL : TPASS, "shmctl IPC_RMID");
- }
- tst_exit ();
-}
-
-void
-print_shmid_ds(sp, mode)
- struct shmid_ds *sp;
- mode_t mode;
-{
- uid_t uid = geteuid();
- gid_t gid = getegid();
-
- printf("PERM: uid %d, gid %d, cuid %d, cgid %d, mode 0%o\n",
- (int)sp->shm_perm.uid, (int)sp->shm_perm.gid,
- (int)sp->shm_perm.cuid, (int)sp->shm_perm.cgid,
- sp->shm_perm.mode & 0777);
-
- printf("segsz %lu, lpid %d, cpid %d, nattch %u\n",
- (u_long)sp->shm_segsz, sp->shm_lpid, sp->shm_cpid,
- sp->shm_nattch);
-
- printf("atime: %s", ctime(&sp->shm_atime));
- printf("dtime: %s", ctime(&sp->shm_dtime));
- printf("ctime: %s", ctime(&sp->shm_ctime));
-
- /*
- * Sanity check a few things.
- */
-
- tst_resm (sp->shm_perm.uid != uid || sp->shm_perm.cuid != uid
- ? TFAIL : TPASS, "uid matches");
-
- tst_resm (sp->shm_perm.gid != gid || sp->shm_perm.cgid != gid
- ? TFAIL : TPASS, "gid matches");
-
- tst_resm ((sp->shm_perm.mode & 0777) != mode ? TFAIL : TPASS,
- "mode matches");
-}
-
-void
-receiver()
-{
- int shmid;
- void *shm_buf;
-
- tst_resm ((shmid = shmget(shmkey, pgsize, 0)) == -1 ? TFAIL : TPASS,
- "receiver: shmget");
-
- tst_resm ((shm_buf = shmat(shmid, NULL, 0)) == (void *) -1
- ? TFAIL : TPASS, "receiver: shmat");
-
- printf("%s\n", (const char *)shm_buf);
- tst_resm (strcmp((const char *)shm_buf, m_str) != 0 ? TFAIL : TPASS,
- "receiver: data is correct");
-
- exit(0);
-}
diff --git a/winsup/testsuite/winsup.api/sigchld.c b/winsup/testsuite/winsup.api/sigchld.c
deleted file mode 100644
index b12876d..0000000
--- a/winsup/testsuite/winsup.api/sigchld.c
+++ /dev/null
@@ -1,22 +0,0 @@
-#include <sys/types.h>
-#include <unistd.h>
-#include <signal.h>
-#include <stdlib.h>
-
-int no_signal_caught = 1;
-
-void handler ( int signo )
-{
- no_signal_caught = 0;
-}
-
-int
-main()
-{
- pid_t pid;
- signal ( SIGCHLD, handler );
- pid = fork();
- if ( pid == 0 ) exit ( 0 );
- sleep ( 2 );
- exit ( no_signal_caught );
-}
diff --git a/winsup/testsuite/winsup.api/signal-into-win32-api.c b/winsup/testsuite/winsup.api/signal-into-win32-api.c
deleted file mode 100755
index 57ab8b5..0000000
--- a/winsup/testsuite/winsup.api/signal-into-win32-api.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Test if signal is delivered to the application which is
- * currently inside of native syscall
- */
-
-#include <errno.h>
-#include <signal.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <windows.h>
-
-int saw_sigchld = 0;
-int sleep_stage = -1;
-
-void
-handle_child (int signo)
-{
- printf ( "saw SIGCHLD, %d", sleep_stage);
- saw_sigchld = 1;
-}
-
-int
-main (int argc, char** argv)
-{
- pid_t pid;
- if (argc > 1)
- {
- Sleep (200);
- return 0;
- }
-
- signal (SIGCHLD, handle_child);
- pid = fork ();
- if (pid < 0)
- {
- perror ( "fork" );
- return 2;
- }
- else if (pid == 0)
- execl ( argv[0], argv[0], "child", NULL );
- else
- {
- sleep_stage = 0;
- Sleep (3000);
- sleep_stage = 1;
- sleep (10);
- sleep_stage = 2;
- if (!saw_sigchld)
- {
- printf ( "oops\n" );
- kill (pid, SIGTERM);
- return 1;
- }
- else
- return 0;
- }
- exit (0);
-}
diff --git a/winsup/testsuite/winsup.api/systemcall.c b/winsup/testsuite/winsup.api/systemcall.c
deleted file mode 100644
index 91dd748..0000000
--- a/winsup/testsuite/winsup.api/systemcall.c
+++ /dev/null
@@ -1,68 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/wait.h>
-
-int
-main (int argc, char **argv)
-{
- int fd, pid, n;
- int fds[2];
- static char buf[4096];
-
- close (0);
- if ((fd = open ("/dev/null", O_WRONLY)) != 0)
- {
- fprintf (stderr, "couldn't redirect stdin to /dev/null, fd %d - %s\n", fd, strerror (errno));
- exit (1);
- }
-
- close (1);
- if ((fd = open ("/dev/null", O_WRONLY)) != 1)
- {
- fprintf (stderr, "couldn't redirect stdout to /dev/null, fd %d - %s\n", fd, strerror (errno));
- exit (1);
- }
- if (pipe (fds))
- {
- fprintf (stderr, "pipe call failed - %s\n", strerror (errno));
- exit (1);
- }
- if ((pid = fork ()) == 0)
- {
- close (fds[0]);
- if (dup2 (fds[1], 2) != 2)
- {
- fprintf (stderr, "couldn't redirect stderr to pipe - %s\n", strerror (errno));
- exit (1);
- }
- exit (system ("ls"));
- }
- else if (pid < 0)
- {
- perror ("couldn't fork");
- exit (1);
- }
-
- close (fds[1]);
- if (read (fds[0], buf, 4096) != 0)
- {
- fprintf (stderr, "system() call failed?\n%s\n", buf);
- exit (1);
- }
-
- if (waitpid (pid, &n, 0) < 0)
- {
- perror ("waitpid failed");
- exit (1);
- }
- if (n != 0)
- {
- fprintf (stderr, "system() call returned %p\n", (void *) n);
- exit (1);
- }
- exit (0);
-}
diff --git a/winsup/testsuite/winsup.api/user_malloc.c b/winsup/testsuite/winsup.api/user_malloc.c
deleted file mode 100644
index 8685f86..0000000
--- a/winsup/testsuite/winsup.api/user_malloc.c
+++ /dev/null
@@ -1,216 +0,0 @@
-/* Test of external malloc, calloc, realloc and free capability */
-
-#if 1
-#include "test.h"
-#include "usctest.h"
-#else
-enum {TPASS, TFAIL, TBROK, TINFO};
-#define tst_resm(xxx, yyy...) printf(yyy), printf(" RES %d\n", xxx)
-#define tst_brkm(xxx, yyy, zzz...) printf(zzz), printf(" RES %d\n", xxx)
-#define tst_exit()
-int Tst_count;
-#endif
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <strings.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sys/wait.h>
-
-const char *TCID = "malloc"; /* Test program identifier. */
-int TST_TOTAL = 2; /* Total number of test cases. */
-extern int Tst_count; /* Test Case counter for tst_* routines */
-
-/* Main test.
- Verbose mode if argc > 0
- Note that malloc and friends are also called by Cygwin before main,
- and that malloc can call getenv. */
-
-int malloc_error = 0, realloc_error = 0, free_error = 0;
-int calloc_count = 0, malloc_count = 0, realloc_count = 0, free_count = 0;
-
-void
-cleanup (void)
-{
- tst_exit();
-}
-
-int
-syncwithchild (pid_t pid, int expected_exit_status)
-{
- int status;
-
- if (waitpid (pid, &status, 0) != pid)
- {
- tst_brkm (TBROK, cleanup, "Wait for child: %s", strerror (errno));
- return 1;
- }
- if (!WIFEXITED (status))
- {
- tst_brkm (TBROK, cleanup, "Child had abnormal exit");
- return 1;
- }
- if (WEXITSTATUS (status) != expected_exit_status)
- {
- tst_brkm (TFAIL, cleanup, "Child had exit status %d != %d",
- WEXITSTATUS (status), expected_exit_status);
- return 1;
- }
- return 0;
-}
-
-#if 0
-void * mallocX (size_t size);
-void * callocX (size_t nmemb, size_t size);
-void * reallocX (void * ptr, size_t size);
-void freeX(void *);
-
-#define malloc mallocX
-#define calloc callocX
-#define realloc reallocX
-#define free freeX
-#endif
-
-int main (int argc, char * argv[])
-{
- void * ptr;
- int error = 0;
- pid_t pid;
-
- Tst_count = 0;
-
- tst_resm(TINFO, "Testing if external malloc works. ppid %d", getppid());
-
- ptr = malloc (16);
- ptr = calloc (1, 16);
- ptr = realloc (ptr, 24);
- free (ptr);
-
- error = (malloc_count == 0 || calloc_count == 0 || realloc_count == 0 || free_count == 0);
-
- if (error || argc > 1)
- {
- printf ("malloc_count %d, calloc_count %d, realloc_count %d, free_count %d\n",
- malloc_count, calloc_count, realloc_count, free_count);
- printf ("malloc_error %d, realloc_error %d, free_error %d\n",
- malloc_error, realloc_error, free_error);
- }
- tst_resm (!error ? TPASS : TFAIL, "Running in pid %d", getpid());
-
- /* If run from Windows, run also from Cygwin */
- if (getppid() == 1)
- {
- tst_resm(TINFO, "Ready to test if malloc works from Cygwin");
-
- if ((pid = fork()) == 0)
- {
- tst_resm(TINFO, "Ready to exec with pid %d\n", getpid());
- error = execl(argv[0], argv[0], argc > 1? argv[1]:NULL, NULL);
- exit(error);
- }
- else if (pid < 0)
- tst_brkm (TBROK, cleanup, "Fork failed: %s", strerror (errno));
- else
- {
- error = syncwithchild (pid, 0);
- tst_resm (!error ? TPASS : TFAIL, "Running in pid %d", pid);
- }
- }
-
- tst_exit ();
-}
-
-/****************************************
-Actual malloc & friends implementation
-****************************************/
-
-typedef unsigned long long ull;
-
-#define SIZE (1024*1024ULL) /* long long */
-ull buffer[SIZE];
-ull * current = buffer;
-
-static int is_valid (void * ptr)
-{
- unsigned int iptr = (unsigned int) ptr;
- ull * ullptr = (ull *) ptr;
-
- iptr = (iptr / sizeof(ull)) * sizeof(ull);
- if (iptr != (int) ptr)
- return 0;
- if (--ullptr < buffer || ullptr[0] > SIZE || ullptr + ullptr[0] > current)
- return 0;
- return 1;
-}
-
-void * malloc (size_t size)
-{
- ull llsize = (size + 2 * sizeof (ull) - 1) / sizeof (ull);
- static char * envptr;
- void * ret;
-
- /* Make sure getenv works */
- if (!envptr)
- envptr = getenv ("PATH");
-
- malloc_count++;
- if (current + llsize >= buffer + SIZE)
- {
- malloc_error++;
- errno = ENOMEM;
- return NULL;
- }
- *current = llsize;
- ret = (void *) (current + 1);
- current += llsize;
-
- return ret;
-}
-
-void * calloc (size_t nmemb, size_t size)
-{
- calloc_count++;
- void * ptr = malloc (nmemb * size);
- malloc_count--;
- if (ptr)
- memset(ptr, 0, nmemb * size);
- return ptr;
-}
-
-void * realloc (void * ptr, size_t size)
-{
- const ull ullsize = (size + 2 * sizeof (ull) - 1) / sizeof (ull);
- ull * const ullptr = (ull *) ptr;
- void * newptr;
-
- realloc_count++;
-
- if (ptr)
- {
- if (!is_valid (ptr))
- {
- realloc_error++;
- errno = ENOMEM;
- return NULL;
- }
- if (ullptr[-1] >= ullsize)
- return ptr;
- }
-
- newptr = malloc (size);
- malloc_count--;
-
- if (ptr && newptr)
- memcpy (newptr, ptr, size);
-
- return newptr;
-}
-
-void free (void * x)
-{
- free_count++;
- if (x && ! is_valid (x))
- free_error++;
-}
-
diff --git a/winsup/testsuite/winsup.api/waitpid.c b/winsup/testsuite/winsup.api/waitpid.c
deleted file mode 100644
index ee2925c..0000000
--- a/winsup/testsuite/winsup.api/waitpid.c
+++ /dev/null
@@ -1,24 +0,0 @@
-#include <stdio.h>
-#include <sys/wait.h>
-#include <errno.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-int
-main (int argc, char **argv)
-{
- int pid, n;
- if ((pid = fork ()) == 0)
- exit (0);
- sleep (2);
- if ((n = waitpid (pid, NULL, 0)) != pid)
- {
- printf ("wait pid failed, pid %d, n %d, errno %d\n", pid, n, errno);
- exit(1);
- }
- else
- {
- printf ("wait pid succeeded, pid %d, n %d, errno %d\n", pid, n, errno);
- exit (0);
- }
-}
diff --git a/winsup/testsuite/winsup.api/winsup.exp b/winsup/testsuite/winsup.api/winsup.exp
deleted file mode 100644
index 6390962..0000000
--- a/winsup/testsuite/winsup.api/winsup.exp
+++ /dev/null
@@ -1,85 +0,0 @@
-source "site.exp"
-source "$srcdir/winsup.api/known_bugs.tcl"
-
-if { ! [isnative] } {
- verbose "skipping winsup.api because it's not native"
- return
-}
-
-set rv ""
-
-set ltp_includes "-I$ltp_includes"
-set ltp_libs "$rootme/libltp.a"
-
-set add_includes $ltp_includes
-set add_libs $ltp_libs
-
-set test_filter ""
-
-if { [info exists env(CYGWIN_TESTSUITE_TESTS)] } {
- set test_filter "$env(CYGWIN_TESTSUITE_TESTS)"
-}
-
-proc ws_spawn {cmd args} {
- global rv
- verbose "running $cmd\n"
- catch "exec $cmd" rv
- verbose send "catchCode = $rv\n"
-}
-
-verbose "Filter: $test_filter"
-
-foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c $srcdir/$subdir/*/*.{cc,c}]] {
- if { $test_filter != "" && ! [regexp $test_filter $src] } {
- verbose -log "Skipping $src"
- continue
- }
-
- regsub "^$srcdir/$subdir/" $src "" testcase
- regsub ".c$" $testcase "" base
- regsub ".*/" $base "" basename
- regsub "/" $base "-" base
-
- if { [lsearch -exact $xfail_list $basename] >= 0 } {
- set xfail_expected 1
- setup_xfail "*-*-*"
- } else {
- set xfail_expected 0
- clear_xfail
- }
-
- if [ file exists "$srcdir/$subdir/$basename.exp" ] then {
- source "$srcdir/$subdir/$basename.exp"
- } else {
- ws_spawn "$CC -nodefaultlibs -mwin32 $CFLAGS $src $add_includes $add_libs $runtime_root/binmode.o -lgcc $runtime_root/libcygwin0.a -lkernel32 -luser32 -o $base.exe"
- if { $rv != "" } {
- verbose -log "$rv"
- fail "$testcase (compile)"
- } else {
- if { $verbose } {
- set redirect_output "./$base.log"
- } else {
- set redirect_output /dev/null
- }
- ws_spawn "$rootme/cygrun ./$base.exe > $redirect_output"
- if { $rv != "" } {
- verbose -log "$testcase: $rv"
- fail "$testcase (execute)"
- if { $xfail_expected } {
- catch { file delete "$base.exe" } err
- if { $err != "" } {
- note "error deleting $base.exe: $err"
- }
- }
- } else {
- pass "$testcase"
- if { ! $xfail_expected } {
- catch { file delete "$base.exe" } err
- if { $err != "" } {
- note "error deleting $base.exe: $err"
- }
- }
- }
- }
- }
-}
diff --git a/winsup/utils/COPYING.dumper b/winsup/utils/COPYING.dumper
deleted file mode 100644
index 623b625..0000000
--- a/winsup/utils/COPYING.dumper
+++ /dev/null
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog
deleted file mode 100644
index 2968e3b..0000000
--- a/winsup/utils/ChangeLog
+++ /dev/null
@@ -1,2643 +0,0 @@
-2008-12-16 Corinna Vinschen <corinna@vinschen.de>
-
- * utils.sgml: Fix typo in passwd screen text.
-
-2008-12-15 Corinna Vinschen <corinna@vinschen.de>
-
- * passwd.c (main): Put how to delete the registry password on its own
- line in passwd -R output.
-
-2008-12-13 Christopher Faylor <me+cygwin@cgf.cx>
-
- * utils.sgml: Convert some backslashes to slashes.
-
-2008-11-26 Corinna Vinschen <corinna@vinschen.de>
-
- * passwd.c (longopts): Add --reg-store-pwd option.
- (opts): Add -R option.
- (usage): Add text for -R/--reg-store-pwd option.
- (main): Fix size of local user and password string arrays.
- Handle -R option.
- * utils.sgml: Add text for passwd -R/--reg-store-pwd option.
-
-2008-10-29 Christopher Faylor <me+cygwin@cgf.cx>
-
- * Makefile.in (ALL_LDFLAGS): Link libgcc statically for everything
- here.
-
-2008-10-12 Christopher Faylor <me+cygwin@cgf.cx>
-
- * mingw: Set sawcfile when -xc* is detected. Extend list of detected
- source files.
-
-2008-10-12 Christopher Faylor <me+cygwin@cgf.cx>
-
- * mingw: Add more checks to allow more varied use.
-
-2008-10-11 Christopher Faylor <me+cygwin@cgf.cx>
-
- * mingw: Use a better method to find where mingw directory lives.
-
-2008-10-11 Christopher Faylor <me+cygwin@cgf.cx>
-
- * mingw: New front-end script to control building of MinGW files
- without using the deprecated -mno-cygwin option.
- * Makefile.in: Use mingw front-end.
-
-2008-09-12 Christopher Faylor <me+cygwin@cgf.cx>
-
- * cygcheck.cc (pathlike::check_existence): Remove class name from
- declaration.
- (display_internet_error): Use proper format specifier for DWORD.
- (environ): Remove unneeded declaration.
- (main): Use brace around nested if to avoid an overly-helpful compiler
- warning.
- * dump_setup.cc (parse_filename): Reorganize nested if to avoid an
- overly-helpful compiler warning.
- * path.cc (GUID_shortcut): Use braces around part of initializer which
- needs them.
- (conv_fstab_spaces): Parenthesize assignment in while loop to avoid a
- compiler warning.
- (struct opt): Make static.
- * ps.cc (main): Reorganize nested if to avoid an overly-helpful
- compiler warning.
- * regtool.cc: Make some anonymous structs static to avoid a compiler
- warning.
- * ssp.c (lookup_thread_id): Initialize *tix to zero to avoid potential
- uninitialized use.
- * strace.cc (add_child): Use proper format specifier for DWORD.
- (remove_child): Ditto.
- (proc_child): Ditto.
-
-2008-08-27 Christopher Faylor <me+cygwin@cgf.cx>
-
- * cygcheck.cc (nuke): Use malloc rather than alloca for environment
- variables.
- (load_cygwin): Ditto.
- * dump_setup.cc (parse_filename): Cosmetic changes.
- (get_packages): Ditto.
-
-2008-08-25 Corinna Vinschen <corinna@vinschen.de>
-
- * mkgroup.c (enum_local_groups): Don't skip printing groups when
- print_current is set and group SID is not curr_pgrp.
- (enum_groups): Ditto.
- (main): Fix condition when SYSTEM group gets printed.
- * mkpasswd.c (enum_users): Don't skip printing users when print_current
- is set and user SID is not curr_user.
- (main): Allow printing standard accounts even when print_current is set.
-
-2008-08-18 Corinna Vinschen <corinna@vinschen.de>
-
- * mkgroup.c (enum_local_groups): Use NetLocalGroupGetInfo to find out
- if a group exists, rather than just allocating a buffer and going ahead.
-
-2008-08-18 Corinna Vinschen <corinna@vinschen.de>
-
- * mkgroup.c (enum_local_groups): Call print_win_error with GetLastError
- as argument when LookupAccountXXX failed.
- (enum_groups): Ditto.
-
-2008-08-18 Corinna Vinschen <corinna@vinschen.de>
-
- * mkgroup.c (enum_local_groups): Return failure if looking for a single
- group succeeded. Add comment.
-
-2008-08-18 Corinna Vinschen <corinna@vinschen.de>
-
- * mkgroup.c (main): Keep correctly track of optional arguments.
- * mkpasswd.c (main): Ditto.
-
-2008-08-18 Corinna Vinschen <corinna@vinschen.de>
-
- * mkgroup.c (main): Always unset environment variable POSIXLY_CORRECT.
- Keep track of optional argumnts and fix up optind afterwards.
- * mkpasswd.c (main): Ditto.
-
-2008-08-17 Christopher Faylor <me+cygwin@cgf.cx>
-
- * cygcheck.cc (print_version): Update copyright dates.
-
-2008-08-17 Christopher Faylor <me+cygwin@cgf.cx>
-
- * mkpasswd.c (main): Avoid printing system accounts when a single user
- name has been requested.
-
-2008-08-17 Christopher Faylor <me+cygwin@cgf.cx>
-
- * Makefile.in (ALL_LDFLAGS): Add --enable-auto-import option to quiet
- ld warnings.
- * mkgroup.c: Change all global variables and most functions to static.
- (enum_local_groups): Add a print_current parameter to control whether
- entries for everything should be printed or just the current user.
- (enum_groups): Ditto.
- (main): Move call fetch_current_pgrp_sid earlier to avoid a NULL
- deference when no command line arguments are specified. Accommodate
- argument changes to above functions. Avoid printing SYSTEM account
- when print_current is specified. Issue error when extra stuff is found
- on the command line.
- * mkpasswd.c: Change all global variables and most functions to static.
- (enum_users): Add a print_current parameter to control whether entries
- for everything should be printed or just the current user.
- (main): Move call fetch_current_user_sid earlier to avoid a NULL
- deference when no command line arguments are specified. Accommodate
- argument change to above function. Avoid printing standard accounts
- when print_current is specified. Issue error when extra stuff is found
- on the command line.
-
-2008-08-15 Corinna Vinschen <corinna@vinschen.de>
-
- * mkgroup.c (fetch_current_pgrp_sid): New function to fetch primary
- group SID from user token.
- (current_group): Move up in file. Move fetching primary group SID to
- fetch_current_pgrp_sid.
- (enum_local_groups): Check if current SID is the same as current user's
- primary group SID.
- (enum_groups): Ditto.
- (main): Call fetch_current_pgrp_sid before enumerating groups. Call
- current_group only if current group hasn't been enumerated already.
- * mkpasswd.c (fetch_current_user_sid): New function to fetch current
- user SID from user token.
- (current_user): Move fetching current user SID to
- fetch_current_user_sid.
- (enum_users): Check if current SID is the same as current user's SID.
- (main): Call fetch_current_user_sid before enumerating users. Call
- current_user only if current user hasn't been enumerated already.
-
-2008-08-13 Corinna Vinschen <corinna@vinschen.de>
-
- * mount.cc (NT_MAX_PATH): Define.
- (longopts): Rename mount-commands option to mount-entries.
- (opts): Remove removed options.
- (struct opt): Move up in file to allow using it in usage.
- (usage): Change text for --mount-entries option. Remove
- -X option. Add valid options output.
- (main): Remove handling -b option.
- (convert_spaces): New static function to convert spaces to "\040"
- string.
- (mount_entries): Renamed from mount_commands. Rewrite to emit
- /etc/fstab compatible output.
- (show_cygdrive_info): Print "nouser" rather than "system".
- * umount.cc (longopts): Remove remove-all-mounts,
- remove-cygdrive-prefix, remove-system-mounts, system and user options.
- (opts): Remove A, c, s, S, u options.
- (usage): Remove text for all removed options.
- (main): Remove handling for all removed options.
- (remove_all_mounts): Remove.
- (remove_all_system_mounts): Remove.
- (remove_cygdrive_prefix): Remove.
- * utils.sgml: Fix mount and umount documentation. Move description
- of (cyg,not)exec options to mount table section.
-
-2008-08-04 Christopher Faylor <me+cygwin@cgf.cx>
-
- * cygcheck.cc (load_cygwin): Duplicate argv list since it disappears
- when cygwin1.dll is unloaded.
-
-2008-07-30 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * Makefile.in: Link cygcheck with -lntdll even without mingw-zlib.
-
-2008-07-27 Christopher Faylor <me+cygwin@cgf.cx>
-
- * cygcheck.cc (load_cygwin): Free the cygwin dll after we're done with
- it.
-
-2008-07-25 Christopher Faylor <me+cygwin@cgf.cx>
-
- * mount.cc: Remove non-unix-like options (-x,-t,b) throughout.
- (oopts): Use boolean constants for slightly increased clarity.
-
- * configure.in: Remove apparently unneeded program_transfer_name code.
- * configure: Regenerate.
-
-2008-07-24 Corinna Vinschen <corinna@vinschen.de>
-
- * utils.sgml: Remove useless text.
-
-2008-07-23 Corinna Vinschen <corinna@vinschen.de>
-
- * mkgroup.c (main): Fix test for duplicate domain/machine request.
- * mkpasswd.c (main): Ditto.
-
-2008-07-23 Corinna Vinschen <corinna@vinschen.de>
-
- * mkgroup.c: Rework to allow per-domain/per-machine id_offset.
- Add -b option to skip builtin groups.
- (main): Simplify code.
- * mkpasswd.c: Rework to allow per-domain/per-machine id_offset.
- (main): Simplify code.
- * utils.sgml: Explain changed mkgroup/mkpasswd -d/-D/-l/-L options.
- Add mkgroup -b option.
-
-2008-07-23 Corinna Vinschen <corinna@vinschen.de>
-
- * mkgroup.c: Consolidate variable names.
- (enum_unix_groups): New function.
- (print_special): Use LookupAccountSidW instead of LookupAccountSidA.
- (current_group): Ditto.
- (usage): Add -U option.
- (longopts): Add --unix option.
- (opts): Add -U option.
- (main): Handle -U option. Call enum_unix_groups if set.
- * mkpasswd.c: Consolidate variable names.
- (current_user): Use LookupAccountSidW instead of LookupAccountSidA.
- (enum_unix_users): New function.
- (usage): Add -U option.
- (longopts): Add --unix option.
- (opts): Add -U option.
- (main): Handle -U option. Call enum_unix_groups if set.
- * utils.sgml: Add -U option text to mkgroup and mkpasswd description.
-
-2008-07-22 Corinna Vinschen <corinna@vinschen.de>
-
- * mkgroup.c (enum_groups): Create full qualified groupname using
- domain or servername, depending on printing domain or machine accounts.
- * mkpasswd.c (enum_users): Ditto for users.
-
-2008-07-22 Corinna Vinschen <corinna@vinschen.de>
-
- * mkgroup.c (main): Remove special root group code. Only print
- SYSTEM group in case of printing local machine or local domain groups.
-
-2008-07-22 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (cygcheck.exe): Link against ntdll.
- * bloda.cc: Use statically linked functions throughout.
- * cygpath.cc: Drop 9x considerations.
- * mkgroup.c: Revamp. Redefine -l and -d options to take optional
- machine and domain parameters. Redefine -c to work always, using
- token information. Add -L, -D, -C to create unique groupnames in
- domain\group syntax. Add -S option to define domain\group separator
- char. Ignore -u and -s options.
- * mkpasswd.c: Revamp. Redefine -l and -d options to take optional
- machine and domain parameters. Redefine -c to work always, using
- token information. Add -L, -D, -C to create unique usernames in
- domain\user syntax. Add -S option to define domain\user separator
- char. Ignore -g and -s options. Prefer to take homedir from $HOME
- over $HOMEDRIVE/$HOMEPATH.
- * path.cc (oopts): Add "acl", "noacl", "posix=0" and "posix=1" options.
- (getmntent): Accomodate throughout.
- * ps.cc: Fix copyright dates.
- * utils.sgml: Fix text for mkgroup and mkpasswd.
-
-2008-07-17 Corinna Vinschen <corinna@vinschen.de>
-
- * mount.cc (do_mount): Remove MOUNT_ENC code.
- (oopts): Remove "managed" option.
- (mount_commands): Drop "managed" handling.
- * path.cc (oopts): Remove "managed" option.
- (getmntent): Remove MOUNT_ENC code.
-
-2008-07-17 Corinna Vinschen <corinna@vinschen.de>
-
- * utils.sgml: Add id's to all examples.
-
-2008-07-09 Corinna Vinschen <corinna@vinschen.de>
-
- * mkgroup.c: Use statically linked functions throughout, except for
- DsGetDcNameW. Reformat. Convert to use WCHAR for names throughout.
- Use defines instead of constants throughout.
- (MAX_SID_LEN): Define.
- (load_netapi): Just load DsGetDcNameW pointer.
- (psx_dir): Remove.
- (uni2ansi): Remove.
- (enum_local_users): Take server name and use in Net... call.
- (DBGSID): Define datastructure.
- (MAX_BUILTIN_SIDS): Define.
- (builtin_sid_list): Define global sid list.
- (builtin_sid_cnt): Define counter for global sid list.
- (enum_local_groups): Take server name and use in Net... and Lookup...
- calls. Take offset argument. Use MAX_PREFERRED_LENGTH in call to
- NetLocalGroupEnum. Check for duplicate builtin groups.
- (enum_users): Take server name and use in Net... call.
- (usage): Change text slightly.
- (print_version): Fix copyright.
- (main): Call enum_local_groups for domains as well.
- * mkpasswd.c: Use statically linked functions throughout, except for
- DsGetDcNameW. Reformat. Convert to use WCHAR for names throughout.
- Use defines instead of constants throughout.
- (MAX_SID_LEN): Define.
- (load_netapi): Just load DsGetDcNameW pointer.
- (uni2ansi): Use wcstombs.
- (current_user): Replace "unused_by_nt/2000/xp" by
- just "unused".
- (enum_users): Ditto.
- (print_version): Fix copyright.
-
-2008-05-22 Corinna Vinschen <corinna@vinschen.de>
-
- * setfacl.c (setfacl): Change from void to int. Return 2 in case of
- error.
- (main): Return with error code from setfacl.
-
-2008-05-15 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (CYGWIN_BINS): Remove ipcrm and ipcs.
- * ipcrm.c: Remove.
- * ipcs.c: Remove.
-
-2008-03-23 Corinna Vinschen <corinna@vinschen.de>
-
- * mount.cc (usage): Mark -s and -u as ignored.
- (print_version): Simplify printing copyright dates.
- (main): Remove default_flag. Dont set flags on -s and -u options.
- (mount_commands): Drop handling -s and -u options.
-
-2008-03-22 Corinna Vinschen <corinna@vinschen.de>
-
- * cygcheck.cc (dump_sysinfo): Fix multiple Cygwin DLL test.
- * path.cc: Fetch mount points from fstab files instead of from
- registry. Use adapted functions copied from Cygwin DLL.
- (mnt_t): Drop issys member. Define as "mnt_t" instead of "struct mnt_t"
- subsequently.
- (max_mount_entry): New variable.
- (unconvert_slashes): Move to earlier location in file. Make inline.
- (find2): Remove.
- (get_cygdrive0): Remove.
- (get_cygdrive): Remove.
- (skip_ws): New function.
- (find_ws): Ditto.
- (conv_fstab_spaces): Ditto.
- (read_flags): Ditto.
- (from_fstab_line): Ditto.
- (get_user): Ditto.
- (from_fstab): Ditto.
- (mnt_sort): Ditto.
- (read_mounts): Drop old registry code. Fetch
- "Software\Cygwin\Setup\rootdir" value from HKCU or HKLM key. Use
- rootdir extracted from module path as fallback. Call from_fstab for
- nouser and user mount points.
- (setmntent): Check max_mount_entry to test if read_mounts must be
- called.
- (getmntent): Use MOUNT_SYSTEM flag instead of mnt_t's issys member.
-
-2008-03-16 Brian Dessent <brian@dessent.net>
-
- * path.cc: Include malloc.h for alloca.
- (is_symlink): Rewrite. Just read the whole file in memory rather
- than by parts. Account for an ITEMIDLIST if present, as well as
- the new style of Cygwin shortcut supporting targets > MAX_PATH.
-
-2008-03-12 Corinna Vinschen <corinna@vinschen.de>
-
- * cygpath.cc (do_sysfolders): Use cygwin_conv_path.
- (do_pathconv): Use cygwin_conv_path and cygwin_conv_path_list.
- * dumper.cc (main): Use cygwin_conv_path. Allocate target path
- dynamically.
- * mkpasswd.c (current_user): Use cygwin_conv_path.
- (enum_users): Ditto.
- * ps.cc (NT_MAX_PATH): Define.
- (main): Use cygwin_conv_path.
- * regtool.cc (find_key): Ditto. Allocate target path dynamically.
- (cmd_save): Ditto.
-
-2008-03-11 Brian Dessent <brian@dessent.net>
-
- * cygcheck.cc (find_app_on_path): Make buffer SYMLINK_MAX + 1
- chars.
-
-2008-03-11 Brian Dessent <brian@dessent.net>
-
- * cygcheck.cc (dirname): New static function.
- (find_app_on_path): Use SYMLINK_MAX. Resolve symlink relative
- to link's location. Adjust to the fact that cygpath already
- normalizes its return value.
- * path.cc (rel_vconcat): Add cwd parameter, and use it instead
- of calling GetCurrentDirectory() if possible. Rename throughout.
- (vcygpath): Rename from cygpath and accept cwd and va_list. Pass
- cwd on to rel_vconcat().
- (cygpath_rel): New front end for vcygpath.
- (cygpath): Ditto.
- * path.h (cygpath_rel): Declare.
- (SYMLINK_MAX): Define to 4095.
-
-2008-03-09 Brian Dessent <brian@dessent.net>
-
- * Makefile.in (install): Don't install the testsuite.
-
-2008-03-08 Brian Dessent <brian@dessent.net>
-
- * Makefile.in: Add a 'check' target that builds and runs
- testsuite.exe from path-testsuite.o and testsuite.o.
- * path.cc: Include testsuite.h.
- (struct mnt): Change to a mnt_t typedef and don't define
- mount_table when TESTSUITE is defined.
- (find2): Don't include when TESTSUITE is defined to avoid warning.
- (get_cygdrive0): Ditto.
- (get_cygdrive): Ditto.
- (read_mounts): Provide empty implementation when TESTSUITE is
- defined.
- (vconcat): Use the isslash macro.
- (unconvert_slashes): New helper to convert to backslashses.
- (rel_vconcat): Handle relative paths more gracefully.
- (cygpath): Skip a leading "./" sequence. Avoid double-slashes.
- Normalize final output to backslashes and remove redundant path
- sequences.
- * testsuite.cc: New file implementing testsuite driver.
- * testsuite.h: New header implementing harness mount table and
- series of tests.
-
-2008-03-08 Brian Dessent <brian@dessent.net>
-
- * Makefile.in: Reorganize considerably, using GNU make's
- static pattern rules and target-specific variables.
-
-2008-02-28 Corinna Vinschen <corinna@vinschen.de>
-
- * mkpasswd.c (main): Simplify generating SYSTEM entry. Add entries
- for LocalService and NetworkService accounts. Change comments.
-
-2008-01-13 Corinna Vinschen <corinna@vinschen.de>
-
- * cygcheck.cc (dump_sysinfo): Always try to get a OSVERSIONINFOEX
- first. Load kernel32.dll earlier. Make osname a buffer. Simplify
- Non-NT code. Use GetProductInfo in Vista/2008 case. Clean up
- non-Vista version info. Exit early if not on NT.
-
-2007-12-29 Dave Korn <dave.korn@artimi.com>
-
- * bloda.cc (enum bad_app): Add BYTEMOBILE.
- (dodgy_app_detects[]): Add FILENAME entry to detect bmnet.dll.
- (big_list_of_dodgy_apps[]): Add description for BYTEMOBILE.
-
-2007-12-20 Brian Dessent <brian@dessent.net>
-
- * Makefile.in (cygcheck.exe): Don't link to ntdll.
- * bloda.cc (pNtQuerySystemInformation): Add.
- (pRtlAnsiStringToUnicodeString): Add.
- (get_process_list): Use function pointers for NT functions.
- (dump_dodgy_apps): Skip dodgy app check on non-NT platforms.
- Use GetProcAddress for NT-specific functions.
-
-2007-12-07 Corinna Vinschen <corinna@vinschen.de>
-
- * regtool.cc (opts): Add missing 'W'.
-
-2007-12-06 Corinna Vinschen <corinna@vinschen.de>
-
- * ps.cc: Include limits.h.
- (main): Set file name buffer size to PATH_MAX. Use progname or
- progname_long member of struct external_pinfo dependent of the value of
- the struct's version member.
-
-2007-08-31 Dave Korn <dave.korn@artimi.com>
-
- * mkgroup.c (enum_groups): Use MAX_PREFERRED_LENGTH in netgroupenum
- call so that it will automatically size returned buffer sufficiently.
-
-2007-08-03 Dave Korn <dave.korn@artimi.com>
-
- * Makefile.in (cygcheck.exe): Add bloda.o as prerequisite, adjusting
- dependency-filtering $(wordlist ...) call appropriately. Link ntdll.
- (bloda.o): New rule to build bloda.o
- * cygcheck.cc (dump_sysinfo): Call bloda function dump_dodgy_apps().
- * bloda.cc: New file implements detection of applications from the
- Big List Of Dodgy Apps.
-
-2007-07-24 Corinna Vinschen <corinna@vinschen.de>
-
- * COPYING.dumper: New file.
- * dumper.cc: Change license to plain GPLv2 + later.
- * dumper.h: Ditto.
- * parse_pe.cc: Ditto.
-
-2007-07-23 Christopher Faylor <me+cygwin@cgf.cx>
-
- * strace.cc (create_child): Don't convert a path from cygwin format
- unless it has a slash.
-
-2007-07-09 Christopher Faylor <me+cygwin@cgf.cx>
-
- * strace.cc (usage): Add missing description for -q.
-
-2007-07-09 Christopher Faylor <me+cygwin@cgf.cx>
-
- * Makefile.in (kill.exe): Remove reliance on libiberty.
- * kill.cc (strsigno): New function patterned after libiberty but using
- newly exported cygwin array.
-
-2007-06-03 Christopher Faylor <me+cygwin@cgf.cx>
-
- * cygcheck.cc (pathlike): New class.
- (paths): Redefine as type pathlike.
- (display_error): Declare a few different ways to allow more flexible
- usage throughout.
- (display_error_fmt): New function for those cases where C++ just isn't
- enough.
- (add_path): Rewrite to allocate pathlike paths. Always tack on a
- trailing slash since that's what everyone who uses it wants. NULL
- terminate the path list. Register "it's a system path" field.
- (init_path): Call add_path with info regarding whether path is a system
- path or not.
- (pathlike::check_existence): Move into pathlike class. Accept file and
- extension arguments to build up path on the fly. Modify other
- arguments.
- (find_on_path): Constify return value and appropriate arguments.
- Eliminate short-circuit for fully-qualified paths. Simplify loop which
- iterates over path.
- (already_did): Constify argument.
- (track_down): Ditto. Regularize some error messages.
- (find_app_on_path): Ditto.
- (cygcheck): Constify argument. Use 20th century string handling
- functions.
- (dump_sysinfo): Remove odd inclusion of '\\bin' "Just in case".
- Accommodate change of paths to pathlike.
- * path.cc (isslash): Rename from SLASH_P and use throughout.
- (rel_vconcat): Front-end to vconcat which prepends cwd to path before
- passing along for conversion to native windows.
- (cygpath): Remove "./" test. Call rel_vconcat if filename appears to
- be relative.
-
-2007-05-29 Pedro Alves <pedro_alves@portugalmail.pt>
-
- * dumper.cc (dumper::prepare_core_dump): Record a phdr for each section.
-
-2007-05-29 Corinna Vinschen <corinna@vinschen.de>
-
- * cygpath.cc (do_options): Allow outputflag combined with other
- basic flags. Only check options_from_file_flag if reading options
- from command line.
- (main): Check for NULL argz vector. Don't free argz vector prematurely.
- Don't force flag combination in !options_from_file_flag case.
-
-2007-05-23 Corinna Vinschen <corinna@vinschen.de>
-
- * cygpath.cc: Include argz.h.
- (options_from_file_flag): Move from main to global static variable.
- (mode_flag): Ditto.
- (do_sysfolders): Rename from dowin and accommodate throughout.
- Don't exit from here.
- (do_pathconv): Rename from doit and accommodate throughout.
- (print_version): Change copyright.
- (do_options): New function, centralizing option processing.
- Rework checking options for correctness.
- (action): New function, centralizing calling worker functions.
- (main): Simplify. Move option processing to do_options. Move calling
- worker functions to action. Rework getting arguments from files.
-
-2007-03-30 Mark Mitchell <mark@codesourcery.com>
-
- * utils/cygpath.cc (get_long_path_name_w32impl): Close handles returned
- by FindFirstFile.
-
-2007-03-30 Christopher Faylor <me@cgf.cx>
-
- * mount.cc (main): Turn dos file warnings off since we know what we're
- doing.
-
-2007-02-22 Corinna Vinschen <corinna@vinschen.de>
-
- * ipcs.c (_POSIX2_LINE_MAX): Drop definition.
-
-2007-02-20 Corinna Vinschen <corinna@vinschen.de>
-
- * cygcheck.cc (dump_sysinfo): Add "not supported" to osname on 9x
- machines. Drop "not supported" for Vista. Drop "Longhorn" text
- for now.
-
-2007-01-09 Christian Franke <franke@computer.org>
-
- * cygpath.cc (usage): Add -O and -F, remove tabs.
- (get_special_folder): New function.
- (get_user_folder): New function.
- (dowin): Add -O and -F, better -D, -P error handling.
- (main): Add -O and -F.
- * utils.sgml (cygpath): Document -O and -F.
-
-2006-12-21 Corinna Vinschen <corinna@vinschen.de>
-
- * dumper.cc: Include ansidecl.h before including bfd.h to woraround
- a problem with the order in which system include files are included.
-
-2006-12-11 Christopher Faylor <me@cgf.cx>
-
- * dumper.cc: Add an include to accommodate new include/elf usage.
-
-2006-12-10 Christopher Faylor <me+cygwin@cgf.cx>
-
- * mount.cc (do_mount): Avoid unnecessary cygwin_conv_to_win32_path and
- pass POSIX path directly - this avoids a cygwin DLL warning.
-
-2006-10-21 Corinna Vinschen <corinna@vinschen.de>
-
- * regtool.cc (key_type): Drop.
- (REG_AUTO): Define.
- (value_type): Replace key_type. Use REG_xxx values directly.
- Accomodate change throughout.
- (longopts): Add --dword, --dword-le, --none, --qword and --hex options.
- (opts): Add -d, -D, -n, -Q and -x options.
- (types): Array to convert REG_xxx into strings.
- (hex): New variable to keep value of --hex option.
- (usage): Accomodate new options. Print only the necessary by default.
- Only be verbose in case of -h/--help option.
- (cmd_list): Use key separator from -K option when printing.
- Print value type when verbose option is given. Handle so far not
- handled REG_xxx types.
- (cmd_set): Avoid SEGV due to missing argument. Handle so far not
- handled REG_xxx types.
- (cmd_get): Handle --binary option type agnostic. Handle so far not
- handled REG_xxx types.
- (main): Handle new options.
-
-2006-10-19 Corinna Vinschen <corinna@vinschen.de>
-
- * regtool.cc (longopts): Add --wow32 option.
- (opts): Add -W option.
- (usage): Add text for --wow32/-W option.
- (main): Handle --wow32/-W option.
- * utils.sgml: Document the new -W option.
-
-2006-10-16 Corinna Vinschen <corinna@vinschen.de>
-
- * regtool.cc (KEY_WOW64_64KEY): Drop definition. Instead define
- WINVER to 0x0502 before including windows.h.
-
-2006-10-16 Corinna Vinschen <corinna@vinschen.de>
-
- * regtool.cc (KEY_WOW64_64KEY): Define.
- (longopts): Add --wow64 option.
- (opts): Add -w option.
- (wow64): New variable to control usage of KEY_WOW64_64KEY access flag.
- (usage): Add text for --wow64/-w option.
- (print_version): Fix copyright.
- (find_key): Use wow64 value in calls to RegOpenKeyEx and RegCreateKeyEx.
- (cmd_add): Use wow64 value in call to RegCreateKeyEx.
- (regDeleteKeyEx): New function pointer to load RegDeleteKeyEx function
- dynamically.
- (cmd_remove): Load and use regDeleteKeyEx when wow64 is set.
- (main): Handle --wow64/-w option.
- * utils.sgml: Document the new -w option.
-
-2006-10-05 Igor Peshansky <pechtcha@cs.nyu.edu>
-
- * cygcheck.cc (get_word, get_dword): Move to path.cc.
- (LINK_EXTENSION): New macro.
- (check_existence): New static function.
- (find_on_path): Check for symbolic links if asked.
- (dll_info): New error handling.
- (track_down): Only call dll_info() for executables, display
- an error for symlinks, and print magic number for others.
- (find_app_on_path): New static function.
- (cygcheck, dump_sysinfo): Call find_app_on_path() instead of
- find_on_path().
- * path.cc (cmp_shortcut_header): New static function.
- (get_word, get_dword): Moved from cygcheck.cc.
- (EXE_MAGIC, SHORTCUT_MAGIC, SYMLINK_COOKIE, SYMLINK_MAGIC): New
- macros.
- (is_exe, is_symlink, readlink): New functions.
- * path.h (is_exe, is_symlink, readlink): Declare.
- (get_word, get_dword): Ditto.
-
-2006-09-12 Christopher Faylor <cgf@timesys.com>
-
- * Makefile.in: Fix -ntdll typo.
-
-2006-09-11 Eric Blake <ebb9@byu.net>
-
- * cygcheck.cc (main): Restore POSIXLY_CORRECT before displaying user's
- environment.
-
-2006-08-03 Corinna Vinschen <corinna@vinschen.de>
-
- * path.cc (vconcat): Don't convert backslahes to slashes.
- (cygpath): Return native path with all backslashes.
-
-2006-08-02 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (cygpath.exe): Add rule to link cygpath against ntdll.dll.
- * cygpath.cc: Include DDK headers.
- (RtlAllocateUnicodeString): New static inline function.
- (get_device_name): New static function to evaluate DOS path from
- native NT path.
- (get_device_paths): New function to do the same for path lists.
- (doit): Call get_device_paths/get_device_name where appropriate.
-
-2006-07-30 Ilya Bobir <ilya@po4ta.com>
-
- * cygpath.cc (get_long_name): Fallback to get_long_path_name_w32impl.
-
-2006-07-27 Corinna Vinschen <corinna@vinschen.de>
-
- * cygpath.c (get_long_name): Cover the case that GetLongPathName
- doesn't return valid information for non-existant files. Just return
- incoming filename in that case.
-
-2006-07-03 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * Makefile.in: Build setmetamode.exe.
- * setmetamode.c: New file.
-
-2006-05-24 Christopher Faylor <cgf@timesys.com>
-
- * configure.in: Update to newer autoconf.
- (thanks to Steve Ellcey)
- * configure: Regenerate.
- * aclocal.m4: New file.
-
-2006-05-24 Christopher Faylor <cgf@timesys.com>
-
- * strace.cc (proc_child): Propagate return code from child process.
- (dostrace): Ditto.
- (main): Ditto.
-
-2006-03-03 Christian Franke <franke@computer.org>
-
- * regtool.cc (options): Add 'binary'.
- (usage): Document 'load|unload|save' and '-b'.
- (find_key): Add 'options' parameter, add load/unload.
- (cmd_set): Add KT_BINARY case.
- (cmd_get): Add hex output in KT_BINARY case.
- (cmd_load): New function.
- (cmd_unload): New function.
- (set_privilege): New function.
- (cmd_save): New function.
- (commands): Add load, unload and save.
- (main): Add '-b'
- * utils.sgml (regtool): Document it.
-
-2006-02-17 Corinna Vinschen <corinna@vinschen.de>
-
- * cygpath.cc (get_long_name): Load GetLongPathNameA instead of incorrect
- GetLongPathName.
- (doit): Create mixed filename after converting to short or long pathname
- respectively.
-
-2006-02-17 Jerry D. Hedden <jerry@hedden.us>
-
- * ps.cc (main): Set aflag if -p option is given.
-
-2006-02-16 Jerry D. Hedden <jerry@hedden.us>
-
- * ps.cc (longopts): Add --process option.
- (opts): Add -p option.
- (usage): Mention -p/--process option.
- (main): Handle -p option.
- * utils.sgml: Describe -p/--process option.
-
-2006-02-15 Igor Peshansky <pechtcha@cs.nyu.edu>
-
- * regtool.cc (usage): Clarify help for "-K".
-
-2006-02-08 Corinna Vinschen <corinna@vinschen.de>
-
- * cygcheck.cc (find_on_path): Update copyright text.
-
-2006-02-08 Corinna Vinschen <corinna@vinschen.de>
-
- * cygcheck.cc (find_on_path): Create copy of rv on successful access
- check, since rv can be reused in subsequent calls.
-
-2006-01-19 Christopher Faylor <cgf@timesys.com>
-
- * cygcheck.cc (common_paths): Add "patch".
-
-2006-01-19 Christopher Faylor <cgf@timesys.com>
-
- * cygcheck.cc (init_paths): Record first_nonsys_path.
- (find_on_path): Start on first nonsys path when !search_sysdirs.
-
-2006-01-18 Christopher Faylor <cgf@timesys.com>
-
- * Makefile.in (sysconfdir): Remove unneeded variable.
-
- * mkgroup.c: Replace ` with ' throughout.
- * mkpasswd.c: Ditto.
- * setfacl.c: Ditto.
- * ssp.c: Ditto.
-
-2006-01-18 Dave Korn <dave.korn@artimi.com>
-
- * cygpath.cc (dowin): Remove stray debugging printf statement.
-
-2006-01-17 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in: Replace etcdir with sysconfdir.
-
-2006-01-13 Brian Dessent <brian@dessent.net>
-
- * Makefile.in (cygcheck.exe): Do not link against libwininet.a.
- * cygcheck.cc (pInternetCloseHandle): Define global function pointer.
- (display_internet_error): Use it.
- (package_grep): Attempt to load wininet.dll at runtime. Call WinInet
- API through function pointers throughout.
-
-2006-01-13 Corinna Vinschen <corinna@vinschen.de>
-
- * cygcheck.cc (dump_sysinfo): Convert k32 to HMODULE.
-
-2006-01-13 Corinna Vinschen <corinna@vinschen.de>
-
- * cygcheck.cc (dump_sysinfo): Convert osname to const and remove casts
- in subsequent assignments. Recognize Longhorn/Vista and report as not
- yet supported. Recognize when running under WOW64 and report native
- CPU type. Slightly rearrange \n printing.
-
-2006-01-12 Christopher Faylor <cgf@timesys.com>
-
- * cygcheck.cc: Replace ` with ' throughout.
-
-2006-01-05 Christopher Faylor <cgf@timesys.com>
-
- * cygcheck.cc (dump_sysinfo): Report the failing drive to prevent
- having to guess.
-
-2005-12-29 Christopher Faylor <cgf@timesys.com>
-
- * strace.cc (nprocesses): Make static global.
- (quiet): New variable.
- (strace_active): Ditto.
- (add_child): Increment nprocesses here. Don't add a child if it is
- already added (windows bug?). Report on child if not quiet.
- (get_child): Just return NULL if child not found.
- (remove_child): Report on child if not quiet.
- (attach_process): Don't complain if given a windows process. Use
- windows pid in error.
- (handle_output_debug_string): Issue error if trying to manipulate a process that we don't know about.
- Handle _STRACE_CHILD_PID - attach to reported child when we get this.
- (proc_child): Move nprocesses to file scope.
- Report on exceptions.
- (longopts): Implement "--quiet".
- (opts): Implement "-q".
- (main): Manipulate quiet flag.
- * utils.sgml (strace): Add words describing '-q'.
-
-2005-12-29 Christopher Faylor <cgf@timesys.com>
-
- * cygcheck.cc (common_apps): Add crontab, vi, vim.
-
-2005-12-19 Igor Pechtchanski <pechtcha@cs.nyu.edu>
-
- * dump_setup.cc (package_find): Fix is_alias computation for "/usr/lib".
-
-2005-12-14 Christopher Faylor <cgf@timesys.com>
-
- * cygcheck.cc (common_apps): Add a few more binaries to look for.
-
-2005-12-05 Christopher Faylor <cgf@timesys.com>
-
- * strace.cc (show_usecs): Renamed from 'usecs'.
- (main): Use show_usecs rather than usecs. Toggle delta if '-u' is
- specified.
- (handle_output_debug_string): Avoid printing microsecond timestamp if
- show_usecs == 0.
- * utils.sgml (strace): Add words to describe '-u'.
-
-2005-11-22 Brian Dessent <brian@dessent.net>
-
- * Makefile.in: Link cygcheck with libwininet.a.
- * cygcheck.cc: Add includes.
- (grep_packages): New global variable.
- (display_internet_error): New function.
- (safe_chars): New global variable.
- (base_url): Ditto.
- (package_grep): New function.
- (usage): Reword --help output for clarity. Document new argument.
- (longopts): Add 'package-query' option.
- (opts): Add 'p' option, reorder to be consistent with 'longopts'.
- (main): Accommodate new option.
- * utils.sgml (cygcheck): Update --help output. Document new -p option.
-
-2005-09-22 Corinna Vinschen <corinna@vinschen.de>
-
- Align error message handling to mkpasswd's error messages throughout.
- * mkgroup.c (print_win_error): Create macro calling ...
- (_print_win_error): ... this function created from former
- print_win_error. Move up in source.
- (PDOMAIN_CONTROLLER_INFOW): Define return type of DsGetDcNameW.
- (dsgetdcname): New function pointer for DsGetDcNameW.
- (load_netapi): Get DsGetDcNameW address.
- (main): If DsGetDcNameW is available, use it.
- * mkpasswd.c (PDOMAIN_CONTROLLER_INFOW): Define return type of
- DsGetDcNameW.
- (dsgetdcname): New function pointer for DsGetDcNameW.
- (load_netapi): Get DsGetDcNameW address.
- (main): If DsGetDcNameW is available, use it. Rename local variable
- domain_name_specified to domain_specified as in mkgroup.c.
-
-2005-09-08 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
-
- * regtool.cc: Extend copyright-years.
- (print_version): Ditto.
- (cmd_list): Don't depend on terminating '\0' being present on
- string-values.
- (cmd_get): Don't attempt to read more than present, but keep
- extra space for terminating '\0'. Really output REG_BINARY.
- Don't leak memory.
- (cmd_set): Include trailing '\0' in string's length.
-
-2005-08-18 Corinna Vinschen <corinna@vinschen.de>
-
- * passwd.c (longopts): Add --logonserver option.
- (opts): Add -d option.
- (GetPW): Add server parameter which is given to Net functions.
- (ChangePW): Ditto.
- (PrintPW): Ditto.
- (SetModals): Ditto.
- (usage): Add description for -d/--logonserver option.
- (main): Add option handling for -d/--logonserver. Use LOGONSERVER
- environment variable content for server to contact, unless
- -d/--logonserver option is given. If both is missing, use NULL.
-
-2005-08-16 Brian Dessent <brian@dessent.net>
-
- * cygcheck.cc (dump_sysinfo_services): Properly null-terminate 'buf'.
- Avoid extraneous cygrunsrv invocation if 'verbose' is true.
-
-2005-08-03 Corinna Vinschen <corinna@vinschen.de>
-
- * mount.cc (longopts): Fix typo which disallows --options option.
-
-2005-07-19 Christopher Faylor <cgf@timesys.com>
- Eric Blake <ebb9@byu.net>
-
- * cygcheck.cc (find_on_path): Perform .exe magic on non-PATH search.
-
-2005-07-05 Eric Blake <ebb9@byu.net>
-
- * cygcheck.cc (track_down, cygcheck): Return true on success.
- (main): Reflect cygcheck failures in exit status.
-
-2005-06-14 Corinna Vinschen <corinna@vinschen.de>
-
- * parse_pe.c (exclusion::sort_and_check): Remove crude cast.
-
-2005-05-30 Corinna Vinschen <corinna@vinschen.de>
-
- * cygcheck.cc (dump_sysinfo): Recognize XP Media Center and Tablet PC
- Editions. Change .NET to 2003 throughout. Recognize 2003 Web Server
- and Datacenter Server. Report when running in terminal server session.
-
-2005-05-27 Christopher Faylor <cgf@timesys.com>
-
- * cygcheck.cc (load_cygwin): Make half-hearted attempt to work with
- older DLLs.
- * strace.cc (load_cygwin): Ditto.
-
-2005-05-22 Brian Dessent <brian@dessent.net>
-
- * cygcheck.cc (dump_sysinfo_services): Add new function that uses
- new cygrunsrv options to dump service info.
- (dump_sysinfo): Call dump_sysinfo_services if running under NT.
- Change 'Cygnus' to 'Cygwin' in output.
-
-2005-05-20 Christopher Faylor <cgf@timesys.com>
-
- * cygcheck.cc (load_cygwin): Remove debugging statement.
-
-2005-05-20 Christopher Faylor <cgf@timesys.com>
-
- * cygcheck.cc (dump_sysinfo): Don't attempt to use path if it is not
- set.
- (nuke): Fix off by one error in allocation of environment variable.
- (load_cygwin): Always set PATH even if cygwin environment is empty.
-
-2005-05-16 Christopher Faylor <cgf@timesys.com>
-
- * cygcheck.cc (cygwin_internal): Define as a "C" function.
- * strace.cc (cygwin_internal): Ditto.
-
- * cygpath.cc (print_version): Update copyright.
-
-2005-05-15 Christopher Faylor <cgf@timesys.com>
-
- * cygcheck.cc (load_cygwin): Avoid calling putenv with a NULL path.
-
-2005-05-15 Corinna Vinschen <corinna@vinschen.de>
-
- * cygcheck.cc (load_cygwin): Don't touch $PATH for now.
- (print_version): Fix copyright.
- * strace.cc (print_version): Ditto.
-
-2005-05-13 Christopher Faylor <cgf@timesys.com>
-
- * mount.cc (mount_commands): Display "-X" option when appropriate.
-
-2005-05-08 Christopher Faylor <cgf@timesys.com>
-
- * cygcheck.cc (nuke): New function.
- (load_cygwin): New function.
- (main): Use load_cygwin to load argv/envp from cygwin environment, if
- appropriate.
-
-2005-05-08 Christopher Faylor <cgf@timesys.com>
-
- * strace.cc (attach_process): Don't call load_cygwin(). Assume that
- it's already happened.
- (dotoggle): Ditto.
- (main): Set argv from cygwin environment, if it exists.
-
-2005-05-01 Christopher Faylor <cgf@timesys.com>
-
- * mount.cc (usage): Clarify action of -m option.
-
-2005-04-29 Dave Korn <dave.korn@artimi.com>
-
- * path.cc (getmntent): Add previously-omitted 'noexec' and 'managed'
- flags to mnt_opts string if present in mount flags.
-
-2005-04-20 Brian Dessent <brian@dessent.net>
-
- * utils.sgml (mount): Clarify setting cygdrive prefix for user
- and system-wide.
-
-2005-03-24 Brian Dessent <brian@dessent.net>
-
- * cygcheck.cc (init_paths): Use full path instead of "." for the
- current directory. Do not add "." if present in $PATH.
- (dump_sysinfo): Skip placeholder first value of paths[].
-
-2005-03-07 Christopher Faylor <cgf@timesys.com>
-
- * kill.cc (getsig): Rectify bug introduced by 2005-02-26 change. Don't
- pad signal name with spaces.
-
-2005-03-07 Corinna Vinschen <corinna@vinschen.de>
-
- * strace.cc (handle_output_debug_string): Fix compiler warning.
-
-2005-03-06 Christopher Faylor <cgf@timesys.com>
-
- * cygpath.cc (usage): Pass in one more copy of program_name to printf
- to avoid a SEGV.
-
-2005-02-27 Christopher Faylor <cgf@timesys.com>
-
- * regtool.cc (opts): The argument to 'K' is not optional.
- (main): Revert previous change. Just let getopt deal with missing
- argument.
-
-2005-02-27 Christopher Faylor <cgf@timesys.com>
-
- * regtool.cc (main): Avoid a SEGV when nothing follows -K.
-
-2005-02-26 Christopher Faylor <cgf@timesys.com>
-
- * kill.cc (getsig): Avoid buffer overflow when generating a signal name.
-
- * strace.cc (handle_output_debug_string): Make error a little more specific.
-
-2005-02-23 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * cygpath.cc (usage): Clarify help output to indicate acceptance
- of multiple file names as arguments.
-
-2005-01-16 Christopher Faylor <cgf@timesys.com>
-
- * ps.cc (main): Eliminate use of PID_ZOMBIE.
- * strace.cc (main): Recognize new option for displaying hex value of
- strace type.
- (handle_output_debug_string): Prepend output with hex value of strace
- message if -H is specified.
-
-2005-01-11 Pierre Humblet <pierre.humblet@ieee.org>
-
- * mkpasswd.c (print_win_error): Transform into macro.
- (_print_win_error): Upgrade former print_win_error by
- printing the line.
- (current_user): Call _print_win_error.
- (enum_users): Print name in case of lookup failure.
- (enum_local_groups): Ditto.
-
-2004-11-18 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
-
- * cygcheck.cc (eprintf): New function.
-
-2004-11-16 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
-
- * cygcheck.cc (find_on_path): Clear show_error and/or print_failed
- parameters to display_error.
- (rva_to_offset): Ditto.
- (dll_info): Ditto.
- (track_down): Ditto.
-
-2004-11-13 Pierre Humblet <pierre.humblet@ieee.org>
-
- * kill.cc (forcekill): Do not pass negative pids to
- cygwin_internal. Check if sig == 0. Improve error messages.
- (main): Make pid a long long and distinguish between pids, gpids
- (i.e. negative pids) and Win9x pids.
-
-2004-11-11 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
-
- * cygcheck.cc: Change "keyeprint" to "display_error" throughout.
-
-2004-11-11 Christopher Faylor <cgf@timesys.com>
-
- * cygcheck.cc (main): Allow a '-l' without an additional argument.
-
-2004-11-11 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
-
- * cygcheck.cc (keyeprint): New optional parameters: show_error and
- print_failed.
-
-2004-10-31 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
-
- * cygcheck.cc (get_dword): Fix errormessage.
- (cygwin_info): Ditto.
- (track_down): Ditto.
- (check_keys): Ditto.
-
-2004-10-27 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
-
- * cygcheck.cc (dump_sysinfo): Warn about missing or multiple cygwin1
- dlls.
-
-2004-10-25 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
-
- * cygcheck.cc (dump_sysinfo): Add leading newline before legend for
- drive-list.
-
-2004-10-22 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
-
- * cygcheck.cc (dump_sysinfo): In legend for drive-list: Add ``ram'' and
- ``unk''. Use single puts. Add leading newline. Line up equal-signs.
-
-2004-10-20 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
-
- * cygcheck.cc (dump_sysinfo): Allow for larger drives in drive-list.
- Change ``Used'' to ``Free'' in helptext-title for drive-list.
-
-2004-10-18 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
-
- * cygcheck.cc (pretty_id): Don't let i become negative. Fix
- printf-format.
-
-2004-10-17 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
-
- * cygcheck.cc (pretty_id): Allocate space for ')' in uid and guid.
-
-2004-10-17 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
- Christopher Faylor <cgf@timesys.com>
-
- * cygcheck.cc (pretty_id): Allocate space for trailing '\0' in uid and
- guid.
-
-2004-10-15 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
- Christopher Faylor <cgf@timesys.com>
-
- * cygcheck.cc (pretty_id): Don't exit on id error. Fix size
- calculations.
-
-2004-10-14 Christopher Faylor <cgf@timesys.com>
- Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
-
- * cygcheck.cc (pretty_id): Correct column calculations. Abort if id is
- acting funny.
-
-2004-10-10 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
-
- * cygcheck.cc (add_path): Don't leak memory when path is already in
- ``paths''.
-
-2004-10-10 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
-
- * cygcheck.cc (dump_sysinfo): Warn about trailing (back)slash on mount
- entries.
-
-2004-10-10 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
-
- * cygcheck.cc (dump_sysinfo): Don't warn about empty path components,
- just display ``.''.
-
-2004-10-06 Corinna Vinschen <corinna@vinschen.de>
-
- * strace.cc (_impure_ptr): Remove.
-
-2004-10-06 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
-
- * cygcheck.cc (dump_sysinfo): Warn about empty path components.
-
-2004-10-04 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
-
- * cygcheck.cc (pretty_id): Close pipe.
-
-2004-09-23 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
-
- * dump_setup.cc (dump_setup): Remove unneeded strlen when check_files
- is not set.
-
-2004-09-22 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
- Corinna Vinschen <corinna@vinschen.de>
-
- * dump_setup.cc (dump_setup): Avoid trailing spaces on package-list.
-
-2004-09-15 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
-
- * getfacl.c (main): Correct layout when nopt is set.
-
-2004-07-12 Igor Pechtchanski <pechtcha@cs.nyu.edu>
-
- * mkgroup.cc (netapibufferallocate,netgroupgetinfo): New function
- pointers.
- (load_netapi): Load NetApiBufferAllocate and NetGroupGetInfo.
- (enum_local_groups,enum_groups): Add disp_groupname parameter.
- Load info for disp_groupname if specified.
- (usage): Add description of "-g/--group" option.
- (longopts,opts): Add "-g/--group" option.
- (main): Process "-g/--group" option.
- * utils.sgml (mkgroup): Add description of "-g/--group" option
-
-2004-06-15 Alan Modra <amodra@bigpond.net.au>
-
- * dumper.cc (dumper::prepare_core_dump): Use bfd_get_section_size
- instead of _raw_size.
- (dumper::write_core_dump): Likewise.
- * parse_pe.cc (select_data_section): Likewise.
-
-2004-05-29 John Paul Wallington <jpw@gnu.org>
-
- * ssp.c (usage): Add missing linefeed.
-
-2004-05-27 Christopher Faylor <cgf@alum.bu.edu>
-
- * kill.cc (listsig): Fix "kill -l" segv. NSIG includes Signal 0, so we
- need to avoid calling strtosigno with NSIG - 1.
-
-2004-03-21 Christopher Faylor <cgf@redhat.com>
-
- * cygcheck.cc (dump_sysinfo): Remove "Win95/NT" from output.
-
-2004-03-15 Christopher Faylor <cgf@redhat.com>
-
- * cygpath.cc (usage): Don't issue helpful message if -i is used.
- (from Igor Pechtchanski)
-
-2004-03-13 Rob Siklos <rob2@siklos.ca>
-
- * kill.cc (get_debug_priv): New function.
- (forcekill): Call get_debug_priv before trying to kill process.
-
-2004-02-24 Christopher Faylor <cgf@redhat.com>
-
- * cygpath.cc (long_options): Add "mode" option.
- (options): Ditto.
- (usage): Report on new option.
- (report_mode): New function.
- (main): Implement -M option.
-
-2004-02-20 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (build_dumper): Detect missing iconv library.
-
- * cygpath.cc (dowin): Report on filename conversion errors.
- (doit): Ditto.
-
- * strace.cc (main): Use symbolic constant for _STRACE_ALL when setting
- mask.
-
-2004-02-14 Corinna Vinschen <corinna@vinschen.de>
-
- * ssp.c (opts): Add leading '+' to force posixly correct behaviour.
-
-2004-02-11 Corinna Vinschen <corinna@vinschen.de>
-
- * strace.cc (opts): Add leading '+' to force posixly correct
- behaviour.
- (main): Revert POSIXLY_CORRECT manipulations.
-
-2004-02-10 Christopher Faylor <cgf@redhat.com>
-
- * strace.cc (main): Guard against previous setting of POSIXLY_CORRECT.
-
-2004-02-10 Christopher Faylor <cgf@redhat.com>
-
- * strace.cc: Update copyrights.
- * cygcheck.cc: Update copyrights.
-
-2004-02-10 Christopher Faylor <cgf@redhat.com>
-
- * strace.cc (main): Ensure POSIXLY_CORRECT argument ordering.
- * cygcheck.cc (main): Ditto.
-
-2004-01-23 Christopher Faylor <cgf@redhat.com>
-
- * cygcheck.cc (pretty_id): Make more robust in absence of id.exe.
-
-2004-01-22 Corinna Vinschen <corinna@vinschen.de>
-
- * cygpath.cc (dowin): Revert accidental checkin from November.
-
-2003-11-26 Corinna Vinschen <corinna@vinschen.de>
-
- * mkgroup.c (main): Print "root" group with local admins group sid
- and gid 0.
-
-2003-11-19 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in: Add rules to build ipcrm and ipcs.
- * ipcrm.c: New file.
- * ipcs.c: New file.
-
-2003-11-14 Corinna Vinschen <corinna@vinschen.de>
-
- * mkgroup.c: Avoid compiler warnings throughout.
- * mkpasswd.c: Ditto.
- * passwd.c: Ditto.
-
-2003-11-07 Mark Blackburn <marklist@fangorn.ca>
-
- * cygpath.cc (main): Allow multiple pathnames on command line.
-
-2003-11-04 Corinna Vinschen <corinna@vinschen.de>
-
- * passwd.c (PrintPW): Turn around meaning printed for "Password not
- required" option to be in line with Windows meaning.
- (main): Use more appropriate 1008 option when calling
- NetUserSetInfo to change flag values.
-
-2003-11-04 Corinna Vinschen <corinna@vinschen.de>
-
- * passwd.c (UF_LOCKOUT): Remove (defined in lmaccess.h).
- (version): Bump version number to 1.5.
- (longopts): Add -c, -C, -e, -E, -p, -P options.
- (opts): Ditto.
- (PrintPW): Print values of UF_PASSWD_CANT_CHANGE and
- UF_DONT_EXPIRE_PASSWD flags. Slightly reformat output. Don't suppress
- correct system password settings just because the account has admin
- privileges.
- (usage): Define as "noreturn" function. Restructure and rephrase
- output. Accommodate new options.
- (print_version): Fix copyright dates.
- (main): Accommodate new options for setting UF_PASSWD_CANT_CHANGE,
- UF_DONT_EXPIRE_PASSWD and UF_PASSWD_NOTREQD settings.
-
-2003-10-17 Christopher Faylor <cgf@redhat.com>
-
- * cygcheck.cc (pretty_id): Don't exec if `id' program is not found.
-
-2003-09-20 Christopher Faylor <cgf@redhat.com>
-
- * kill.cc (main): Allow negative pids (indicates process groups).
-
-2003-09-17 Christopher Faylor <cgf@redhat.com>
-
- * parse_pe.cc (exclusion::sort_and_check): Make error message a little
- more explicit and ignore (hopefully) harmless region overlap.
-
-2003-09-13 Christopher Faylor <cgf@redhat.com>
-
- * kill.c (forcekill): Wait for process to terminate even if
- TerminateProcess says it failed.
-
-2003-09-11 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Tweak mingw libz.a detection to make it more reliably
- detect when libz.a is not available.
-
-2003-09-11 Igor Pechtchanski <pechtcha@cs.nyu.edu>
-
- * cygcheck.cc (dump_only): New global variable.
- (usage): Add "--dump-only" option, fix "--verbose" line.
- (longopts, opts): Add "--dump-only" option.
- (main): Process the "--dump-only" flag. Add new semantic check.
- Pass dump_only information to dump_setup().
-
-2003-09-11 Corinna Vinschen <corinna@vinschen.de>
-
- * getfacl (main): Remove extern declaration of optind.
- * setfacl (main): Remove extern declaration of optarg and optind.
-
-2003-09-10 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (cygcheck.o): Use MINGW_CXX for compilation.
- * cygcheck.cc: Just include <getopt.h> rather than cygwin version.
- (pretty_id): Avoid compiler warnings.
- * cygpath.cc (usage): Ditto.
-
-2003-09-10 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (MINGW_CXX): Define and use for mingw-compiled files.
- * path.cc: Include more path info in cygwin-specific includes since the
- cygwin directory is no longer included by default.
-
-2003-09-10 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: More fixups to adjust for the fact that mingw_getopt.o
- is no longer built.
-
-2003-09-10 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Remove references to getopt since it is now part of
- mingwex.
-
-2003-09-08 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Rename libz.h -> zlib.h.
-
-2003-09-07 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Detect existence of mingw zlib headers and libraries.
- Build cygcheck without package checking if they are unavailable.
- * dump_setup.cc: Generate dummy zlib macros when zlib is not available.
- (open_package_list): Use zlib functions to uncompress package lists.
- Return gzFile rather than FILE *.
- (check_package_files): Change fp to gzFile to accommodate zlib
- functions. Use gzgets to read from package file. Use gzclose to close
- the handle.
- (package_list): Ditto.
- (package_find): Ditto.
-
-2003-09-05 Igor Pechtchanski <pechtcha@cs.nyu.edu>
-
- * dump_setup.cc (check_package_files): Don't fail on empty package.
-
-2003-09-01 AJ Reins <reinsaj@yahoo.com>
-
- * mount.cc (mount_commands): Ensure user mode is actually user mode and
- not the default system mode.
-
-2003-08-31 Christopher Faylor <cgf@redhat.com>
-
- * kill.cc (forcekill): Silence some compiler warnings.
-
-2003-08-31 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Oops. Put the '...' in the right place.
-
-2003-08-31 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Display "..." when not-verbose.
-
- * kill.cc (forcekill): Default to entered pid when pinfo fails. Issue
- some warnings when things don't work.
-
-2003-08-17 David Rothenberger <daveroth@acm.org>
-
- * dump_setup.cc (check_package_files): Strip leading / and ./ from
- package file names.
-
-2003-08-16 David Rothenberger <daveroth@acm.org>
-
- * dump_setup.cc (package_find): Don't stop searching on missing
- file list.
- (package_list): Ditto.
-
-2003-08-16 Igor Pechtchanski <pechtcha@cs.nyu.edu>
-
- * dump_setup.cc: (package_list): Make output terse unless
- verbose requested. Fix formatting.
- (package_find): Ditto.
-
-2003-08-15 Corinna Vinschen <corinna@vinschen.de>
-
- * cygcheck.cc (main): Fix some formatting and help text printing.
-
-2003-08-15 Igor Pechtchanski <pechtcha@cs.nyu.edu>
-
- * cygcheck.cc (find_package,list_package): New global
- variables.
- (usage): Add "--find-package" and "--list-package" options,
- reformat output.
- (longopts, opts): Add "--find-package" and "--list-package"
- options.
- (main): Process the "--find-package" and "--list-package"
- flags. Add new semantic checks. Add calls to find_package()
- and list_package().
- * dump_setup.cc: Fix header comment.
- (match_argv): Change return type to int to distinguish
- between real matches and default ones.
- (open_package_list): New static function.
- (check_package_files): Factor out opening the package list
- file into open_package_list().
- (get_packages): New static function.
- (dump_setup): Factor out getting a list of packages into
- get_packages().
- (package_list, package_find): New global functions.
-
-2003-08-15 Corinna Vinschen <corinna@vinschen.de>
-
- * regtool.cc (usage): Add missing linefeed. Move example to --help
- text. Fix forward slash description.
-
-2003-08-13 Igor Pechtchanski <pechtcha@cs.nyu.edu>
-
- * dump_setup.cc (check_package_files): Fix extra '/' in filename.
- Resize command buffer. Fix buffer overflow bug.
-
-2003-08-09 Igor Pechtchanski <pechtcha@cs.nyu.edu>
- Christopher Faylor <cgf@redhat.com>
-
- * dump_setup.cc (dump_setup): Check for the existence of the package
- list file. Rework slightly to use static buffer for popen commands.
-
-2003-08-07 Igor Pechtchanski <pechtcha@cs.nyu.edu>
- Christopher Faylor <cgf@redhat.com>
-
- * dump_setup.cc (version_len): New static variable.
- (could_not_access,directory_exists): New static function.
- (file_exists): Ditto.
- (check_package_files): Ditto.
- (dump_setup): Check the contents of each package if check_files is true
- and output the result in the "Status" column. Flush output after each
- package.
-
-2003-08-07 Igor Pechtchanski <pechtcha@cs.nyu.edu>
- Christopher Faylor <cgf@redhat.com>
-
- * dump_setup.cc (dump_setup): Remove redundant null check. Add
- informative message if package info not found.
-
-2003-07-26 Christopher Faylor <cgf@redhat.com>
-
- * mount.cc (do_mount): Issue warning when using managed mount option on
- non-empty directory.
-
-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-03 Christopher Faylor <cgf@redhat.com>
-
- * mount.cc (struct opt): Remove posix option.
-
-2003-07-03 Christopher Faylor <cgf@redhat.com>
-
- * mount.cc (longopts): Add long "options" keyword.
- (opts): Add -o option.
- (usage): Display -o option.
- (struct opt): New.
- (concat3): New function.
- (main): Handle -o flag.
-
-2003-06-12 Christopher Faylor <cgf@redhat.com>
-
- * cygcheck.cc (pretty_id): Rework slightly to not rely on spaces.
-
-2003-06-12 Christopher Faylor <cgf@redhat.com>
-
- * cygpath.cc: Throughout, always return error when GetShortPathName
- returns 0.
-
-2003-04-26 Joshua Daniel Franklin <joshuadfranklin at yahoo dot com>
-
- * mkpasswd.c (usage) Remove extra newline from description output.
-
-2003-04-26 Joshua Daniel Franklin <joshuadfranklin at yahoo dot com>
-
- * cygcheck.cc (usage) Add description output.
- * cygpath.cc (usage) Add description output.
- * dumper.cc (usage) Add newline to description output.
- * kill.cc (usage) Add description output.
- * mkgroup.c (usage) Grammatical change to description output.
- * mkpasswd.c (usage) Grammatical change to description output.
- * mount.cc (usage) Add description output.
- * passwd.c (usage) Add description output.
- * ps.cc (usage) Add description output.
- * regtool.cc (usage) Add description output.
- * setfacl.c (usage) Remove extra newline from description output.
- * ssp.c (usage) Add description output.
- * strace.cc (usage) Add description output.
- * umount.cc (usage) Add description output.
-
-2003-04-10 Pierre Humblet <pierre.humblet@ieee.org>
-
- * mkpasswd.c (current_user): print uid and gid as unsigned.
- (enum_users): Ditto. Do not free servername.
- (usage): Update to allow several domains and improve -p.
- (main): On Win9x limit uids to 1000. Only print specials
- when -l is specified. Add a loop to allow several domains
- and free servername in the loop.
- * mkgroup.c (enum_groups): Do not free servername.
- (usage): Update to allow several domains. Change uid to gid.
- (main): Only print specials when -l is specified. Add a
- loop to allow several domains and free servername in the loop.
-
-2003-03-24 Christopher Faylor <cgf@redhat.com>
-
- * cygcheck.cc (dump_sysinfo): Ensure that CYGWIN environment variable
- is correctly set.
-
-2003-03-09 Corinna Vinschen <corinna@vinschen.de>
-
- * getfacl.c (username): Fix ambiguous printf calls.
- (groupname): Ditto.
- (main): Ditto.
-
-2003-03-04 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (strace.exe): Include mingw_getopt.o in link line.
- * cygcheck.cc (print_version): Update copyright.
- * strace.cc (print_version): Ditto.
- (main): Allow cygwin paths for -o option.
- (create_child): Allow cygwin path as argv[0].
- * path.cc (path.cc): Allow UNC paths.
-
-2003-03-01 Pierre Humblet <pierre.humblet@ieee.org>
-
- * mkpasswd.cc (main): On Win95, output both a default line and a
- line for the current user (if known) with a pseudorandom uid. If
- the -u switch is given, produce a line for the specified user.
- * mkgroup.cc (main): On Win95 change the group name from "unknown" to
- "all".
-
-2003-02-28 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (cygcheck.o): Fix so that actual mingw include files are
- used.
- * cygcheck.cc (find_on_path): Translate from cygwin path when qualified
- path name found.
- (pretty_id): New function. Dump output of id command.
- (dump_sysinfo): Call pretty_id for CYGWIN=ntsec and CYGWIN=nontsec cases.
-
-2003-02-12 Christopher Faylor <cgf@redhat.com>
-
- * cygpath.cc (doit): Allocate more space for non-path filename.
-
-2003-02-07 Christopher Faylor <cgf@redhat.com>
-
- * dump_setup.cc (compar): Use case insensitive comparisons.
- (dump_setup): Calculate package_len based on already used "len". Don't
- bother with version_len.
-
-2003-02-07 Igor Pechtchanski <pechtcha@cs.nyu.edu>
-
- * dump_setup.cc (dump_setup): Compute the longest package name
- and align columns properly.
-
-2003-02-06 Christopher Faylor <cgf@redhat.com>
-
- * cygcheck.cc (common_apps): Add some more apps.
- * path.cc (get_cygdrive): Correctly set system flag.
-
-2003-01-22 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (ALL_LDFLAGS): Remove newlib/libm from tools paths.
- (MINGW_LDFLAGS): Remove in favor of definition from Makefile.common.
-
-2003-01-15 Corinna Vinschen <corinna@vinschen.de>
-
- * mkgroup.c: Fix copyright date.
- * mkpasswd.c: Ditto.
- * setfacl.c: Ditto.
-
-2003-01-09 Pierre Humblet <pierre.humblet@ieee.org>
-
- * setfacl.c (usage): Remove double ":" for mask and other.
-
-2003-01-07 Pierre Humblet <pierre.humblet@ieee.org>
-
- * mkpasswd.c (current_user): Create.
- (usage): Reorganize to support Win95/98/ME.
- (main): Add option for -c. Reorganize to parse options for
- Win95/98/ME and to call current_user. Add username in gecos field
- on Win95/98/ME.
- * mkgroup.c (enum_groups): Print gid with %u.
- (print_win_error): Create from passwd.cc.
- (current_group): Create.
- (usage): Reorganize to support Win95/98/ME.
- (main): Add option for -c. Reorganize to parse options for
- Win95/98/ME and to call current_group.
-
-2002-12-14 Pierre Humblet <pierre.humblet@ieee.org>
-
- * setfacl.c (main): Place a single : after other and mask.
- * getfacl.c (getaclentry): Allow both : and :: for other and mask.
- (main): Remove extraneous break.
-
-2002-11-25 Corinna Vinschen <corinna@vinschen.de>
-
- * mkpasswd.c (main): Set pw_passwd field to '*' on 9x/Me.
-
-2002-11-24 Corinna Vinschen <corinna@vinschen.de>
-
- * setfacl.c (getperm): Set only `other' permission bits.
- (getaclentry): Set a_id to -1 by default.
-
-2002-11-24 Corinna Vinschen <corinna@vinschen.de>
-
- * getfacl.c (permstr): Use `other' permission bits for requesting
- ace permissions.
-
-2002-11-08 Corinna Vinschen <corinna@vinschen.de>
-
- * setfacl.c (usage): Add missing LF.
-
-2002-10-30 Christopher Faylor <cgf@redhat.com>
-
- * cygpath.cc (get_long_path_name_w32impl): Define similarly to
- GetLongPathName.
- (get_long_name): Correctly prototype GetLongPathName.
- (get_long_paths): Implement using get_long_name to cut down on code
- duplication.
- (doit): Do various things to make path output work predictably.
-
-2002-10-19 Christopher Faylor <cgf@redhat.com>
-
- * mount.cc (usage): Correctly report default mode.
- * strace.cc (main): Use strtoul as appropriate.
-
-2002-09-29 Christopher Faylor <cgf@redhat.com>
-
- * cygpath.cc (close_arg): Remove unused static.
- * mkgroup.c (enum_local_users): Avoid compiler warning.
- (enum_users): Ditto.
- * mkpasswd.c: Ditto throughout.
- * ssp.c: Ditto throughout.
-
-2002-09-18 Christopher Faylor <cgf@redhat.com>
-
- * cygcheck.cc: Include sys/time.h rather than time.h to avoid a
- compiler error.
-
-2002-09-17 Christopher Faylor <cgf@redhat.com>
-
- * cygcheck.cc: Reorder includes to avoid compiler error.
-
-2002-09-15 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * cygcheck.cc (print_version) Add final newline.
- * getfacl.c (print_version) Add final newline.
- * kill.cc (print_version) Add final newline.
- * mkgroup.c (print_version) Add final newline.
- * mkpasswd.c (print_version) Add final newline.
- * mount.cc (print_version) Add final newline.
- * passwd.c (print_version) Add final newline.
- * ps.cc (print_version) Add final newline.
- * regtool.cc (print_version) Add final newline.
- * setfacl.c (print_version) Add final newline.
- * ssp.c (print_version) Add final newline.
- * strace.cc (print_version) Add final newline.
- * umount.cc (print_version) Add final newline.
-
-2002-09-12 Igor Pechtchanski <pechtcha@cs.nyu.edu>
-
- * cygpath.cc (options) New global variable.
- (main) Make short options global for easier change.
- (print_version) Add a missing newline.
-
-2002-08-07 Igor Pechtchanski <pechtcha@cs.nyu.edu>
-
- * regtool.cc (find_key): Add support for custom key separator.
- (usage): Document it.
-
-2002-08-02 Corinna Vinschen <corinna@vinschen.de>
-
- * mkgroup.c (main): Don't print an entry for "Everyone".
- * mkpasswd.c (print_special): Set pw_gid to 544 for SYSTEM user.
- (main): Don't print an entry for "Everyone".
-
-2002-07-06 Christopher Faylor <cgf@redhat.com>
-
- * configure.in: Check for libiconv.a.
- * configure: Regenerate.
- * Makefile.in: Add libiconv.a to libraries required for dumper.exe.
-
-2002-07-06 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Use MINGW stuff from Makefile.common.
-
-2002-07-01 Corinna Vinschen <corinna@vinschen.de>
-
- * mkgroup.c: Add function pointers for functions from advapi32.dll.
- (load_netapi): Load used functions from advapi32.dll.
- (main): Use function pointers instead of statically linked functions
- from advapi32.dll.
-
-2002-07-01 Christopher Faylor <cgf@redhat.com>
-
- * mount.cc (main): Ensure that mount_already_exists() also gets default
- flag that is passed to do_mount.
-
-2002-06-22 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * cygpath.cc (long_options): Add "dos" and "mixed", correct "close",
- "file" and "type" to use NULL flag.
- (usage): Clean up usage output (more), accomodate new options.
- (main): Add --dos and --mixed options; accomodate all output forms in
- --type. Make UNIXy output default.
-
-2002-06-18 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * cygpath.cc (usage): Clean up usage output.
- (dowin): Correct output of -t mixed for -ADHPSW options.
-
-2002-06-14 Corinna Vinschen <corinna@vinschen.de>
-
- * passwd.c: Rearrange includes to avoid unnecessary warnings.
- (GetPW): Add parameter to (dis)allow printing of Windows username.
- Use defines instead of numerical constants where possible.
- Try avoiding impersonation problem. Rearrange to print Windows
- username only if it's different from Cygwin username.
- (ChangePW): Use defines instead of numerical constants where possible.
- (main): Call GetPW with additional parameter. Change error text.
-
-2002-06-14 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * passwd.c (GetPW): Handle case of user-edited /etc/passwd
- with cygwin_internal (CW_EXTRACT_DOMAIN_AND_USER, ...).
-
-2002-06-09 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (cygpath): Change MOUNT_AUTO to MOUNT_CYGDRIVE.
- (getmntent): Ditto.
-
-2002-06-09 Christopher Faylor <cgf@redhat.com>
-
- * mount.cc (main): Use default system/user flag for cygdrive stuff,
- too.
- (change_cygdrive_prefix): Change MOUNT_AUTO to MOUNT_CYGDRIVE.
- * umount.cc (remove_cygdrive_prefix): Ditto.
- (main): Use default system/user flag for cygdrive stuff, too.
-
-2002-06-08 Christopher Faylor <cgf@redhat.com>
-
- * mount.cc (opts): Remove '-i' option.
- (usage): Ditto.
- (main): Ditto.
- (longopts): Remove --import-old-mounts option.
-
-2002-06-07 David Peterson <chief@mail.idrive.com>
- Christopher Faylor <cgf@redhat.com>
-
- * cygpath.cc: Add option to output windows paths in different formats:
- "dos" and "mixed".
- (main): Process options.
- (doit): Check new options flags.
-
-2002-06-06 Egor Duda <deo@logos-m.ru>
-
- * regtool.cc (Fail): Be more verbose.
- (find_key): Add support for remote registry access.
- (usage): Document it.
- * utils.sgml: Document it.
-
-2002-06-06 Christopher Faylor <cgf@redhat.com>
-
- * strace.cc (main): Make toggle a local variable.
-
-2002-06-07 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * strace.cc (toggle): New global variable.
- (error): Use exit instead of ExitProcess so that stdio buffers get
- flushed.
- (create_child): Remove command line error checking.
- (dostrace): Ditto.
- (dotoggle): New function.
- (usage): Add entry for new option -T|--toggle. Alphabetize.
- (longopts): Add new option -T|--toggle.
- (opts): Ditto.
- (main): Handle new -T|--toggle option. Move all command line checking
- here from other functions.
- * utils.sgml: Update section for strace.
-
-2002-06-05 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * strace.cc (version): New global variable.
- (usage): Accommodate stdout output.
- (print_version): New function.
-
-2002-06-03 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * ssp.c (version): New global variable.
- (longopts): Ditto.
- (opts): Ditto.
- (run_program): Correct cmd_line typos to cmdline.
- (usage): New function. Standardize usage output. Add ssp.txt to
- --help output.
- (print_version): New function.
- (main): Accommodate getopt.
-
-2002-06-03 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * umount.cc (version): New global variable.
- (longopts): Accommodate new --version option.
- (opts): Ditto.
- (usage): Standardize usage output.
- (print_version): New function.
- (main): Accommodate --help, --version options.
-
-2002-06-02 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * regtool.cc (prog_name): New global variable.
- (longopts): Ditto.
- (opts): Ditto.
- (usage): Standardize usage output. Rearrange/add descriptions.
- (print_version): New function.
- (main): Accommodate longopts and new --help, --version options. Add
- check for (_argv[optind+1] == NULL).
-
-2002-06-02 Christopher Faylor <cgf@redhat.com>
-
- * strace.cc (forkdebug): Make true by default.
- (attach_process): Use window pid if cygwin pid isn't available (yet).
- (create_child): Use either DEBUG_ONLY_THIS_PROCESS or DEBUG_PROCESS,
- exclusively. (Suggested by Conrad.Scott@dsl.pipex.com)
-
-2002-05-30 Christopher Faylor <cgf@redhat.com>
-
- * mkpasswd.cc (main): Don't reset to binmode if stdout is a terminal.
-
-2002-05-29 Christopher Faylor <cgf@redhat.com>
-
- * mount.cc (main): Make -b the default.
-
-2002-05-29 Corinna Vinschen <corinna@vinschen.de>
-
- * ps.cc (main): Use uid or uid32 member of struct external_pinfo
- dependent of the value of the struct's version member.
-
-2002-05-29 Corinna Vinschen <corinna@vinschen.de>
-
- * ps.cc (main): Change print format for uid to unsigned. Use uid32
- member of struct external_pinfo instead of uid.
-
-2002-05-28 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * passwd.c (prog_name): New global variable.
- (longopts): Ditto.
- (opts): Ditto.
- (usage): Standardize output. Accommodate new options.
- (print_version): New function.
- (main): Accommodate longopts and new --help, --version options.
-
-2002-05-28 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * ps.cc (usage): Fix typo.
-
-2002-05-27 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * ps.cc (prog_name): New global variable.
- (longopts): Ditto.
- (opts): Ditto.
- (usage): New function.
- (print_version): New function.
- (main): Accommodate longopts and new --help, --version options.
-
-2002-05-26 Christopher Faylor <cgf@redhat.com>
-
- * strace.cc (attach_process): Don't tell process to start stracing
- here.
- (proc_child): Do it here, instead, after first debug event. This
- should work around inexplicable races with DebugActiveProcess.
- (dostrace): Pass any pid argument to proc_child.
-
-2002-05-23 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * getfacl.c (usage): Standardize usage output. Change return type to
- static void.
- (print_version): New function.
- (longopts): Added longopts for all options.
- (main): Accommodate new help and version options.
-
-2002-05-22 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * mount.cc (version): New global variable.
- (usage): Standardize usage output. Accommodate new version option.
- (print_version): New function.
- (longopts): Accommodate new version option.
- (opts): Ditto.
- (main): Ditto.
-
-2002-05-22 Corinna Vinschen <corinna@vinschen.de>
-
- * cygpath.cc (usage): Change usage output slightly.
-
-2002-05-20 Joerg Schaible <joerg.schaible@gmx.de>
-
- * cygpath.cc (main): Add option l to support conversion to
- Windows long file names. Refactured code for capital options.
- Support of options from file for capital options.
- (dowin): New function. Refactured from main.
- (doit): Call long path conversion.
- (get_long_name): New function.
- (get_long_paths): New function.
- (get_long_path_name_w32impl): New function. Reimplementation
- of Windows API function GetLongPathName (only 98/Me/2000/XP or
- higher).
- (get_short_name): Call GetShortPathName only once.
- (get_short_paths): Fix calculating buffer size.
- * utils.sgml: Update cygpath section for l option.
-
-2002-05-18 Christopher Faylor <cgf@redhat.com>
-
- * strace.cc (add_child): Use calloc since new requires working
- libstdc++.a.
- (remove_child): Ditto for delete/free.
-
-2002-05-15 Mark Blackburn <marklist@fangorn.ca>
-
- * cygpath.cc (get_short_paths): Fix more error checking.
- (get_short_name): Ditto.
-
-2002-05-14 Joerg Schaible <joerg.schaible@gmx.de>
-
- * cygpath.cc (main): Add option H to show the Windows' profiles
- directory. Support short names for options DPSW. Clean up
- copied code lines.
- * utils.sgml: Update cygpath section for H option and s support.
-
-2002-05-14 Mark Blackburn <marklist@fangorn.ca>
-
- * cygpath.cc (get_short_paths): Fix error checking.
-
-2002-05-13 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * kill.cc (prog_name): New global variable.
- (usage): Standardize usage output. Add descriptions.
- (print_version): New function.
- (longopts): Accommodate new version option.
- (opts): Ditto.
- (main): Ditto.
-
-2002-05-13 Christopher Faylor <cgf@redhat.com>
-
- * kill.cc (listsig): Display numeric id when given symbolic input.
-
-2002-05-13 Christopher Faylor <cgf@redhat.com>
-
- * kill.cc (usage): Show new options. Allow specification of output
- stream.
- (main): Implement 'h' option.
-
-2002-05-13 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (kill.exe): Add as a specific target.
- * kill.cc (longopts): New.
- (opts): Ditto.
- (get_sig): Accept const char * parameter. Return -1 on unknown signal.
- (test_for_unknown_sig): New function.
- (listsig): New function.
- (main): Use getopt_long for option parsing. Implement -l, and -s
- options. Use test_for_unknown_sig() to test for signal validity.
-
- * mount.cc (longopts): Make static.
- (opts): Ditto.
-
-2002-05-12 Christopher Faylor <cgf@redhat.com>
-
- * mount.cc (do_mount): Default to non-exec option for remote drives.
- Report warnings before attempting a mount.
- (longopts): Add no-executable option.
- (mount_commands): Ditto.
- (opts): Ditto.
- (usage): Ditto. Indicate that system mount is now the default.
- (main): Accommodate no-executable option. Make system mount the
- default.
- * umount.cc (usage): Indicate that system umount is now the default.
- (main): Make system umount the default.
-
-2002-05-07 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * dumper.cc (usage): Standardize usage output. Generalize to allow use
- for help.
- (longopts): New struct. Added longopts for all options.
- (print_version): New function.
- (main): Change getopt to getopt_long. Accommodate new help and version
- options.
-
-2002-03-29 Corinna Vinschen <corinna@vinschen.de>
-
- * mkgroup.c (main): Change call to exit() to a return statement.
- * mkpasswd.c (main): Ditto.
-
-2002-03-27 Joshua Daniel Franklin joshuadfranklin@yahoo.com
-
- * mkpasswd.c (usage): Simplify usage output. Generalize to allow use
- for help. Correct '?' typo to 'h'.
- (longopts): Add version option.
- (opts): Add 'v' version option.
- (print_version): New function.
- (main): Accommodate new version option. Accommodate usage parameter
- changes.
-
-2002-03-19 Christopher Faylor <cgf@redhat.com>
-
- * mkgroup.c (usage): Use one just fprintf + string concatenation for
- output message.
- (print_version): Add void to function type and update copyright.
-
-2002-03-16 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * mkgroup.c (usage): Simplify usage output. Generalize to allow use
- for help. Correct '?' typo to 'h'.
- (longopts): Add version option.
- (opts): Add 'v' version option.
- (print_version): New function.
- (main): Accommodate new version option. Accommodate usage parameter
- changes. Use usage to output help message.
-
-2002-03-15 Corinna Vinschen <corinna@vinschen.de>
-
- * mkgroup.c (main): When generating group 513, check for computer's
- primary domain instead of current user's domain.
-
-2002-03-14 Corinna Vinschen <corinna@vinschen.de>
-
- * mkgroup.c (main): When generating group 513, check for domain SID
- if computer name isn't mapped to a SID.
-
-2001-03-11 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * kill.cc (usage): Move to top of file.
- (getsig): Ditto.
- (forcekill): Ditto.
-
-2002-03-06 Christopher Faylor <cgf@redhat.com>
-
- * cygcheck.cc: Reformat.
-
-2002-03-06 Christopher Faylor <cgf@redhat.com>
-
- * cygcheck.cc (longopts): Use correct short option for --version.
-
-2002-03-06 Christopher Faylor <cgf@redhat.com>
-
- * cygpath.cc: Reformat.
-
-2002-02-27 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * cygpath.cc (print_version): New function.
- (main): Accommodate new version function. Initialize 'o' to prevent
- warning.
-
-2002-02-27 Christopher Faylor <cgf@redhat.com>
-
- * cygcheck.cc (main): Eliminate non-GNU formatting glitch.
-
-2002-02-27 Christopher Faylor <cgf@redhat.com>
-
- * ssp.c (help_desk): Fix compiler warning.
-
-2002-02-27 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
- Christopher Faylor <cgf@redhat.com>
-
- Change appropriate globals to statics throughout.
- * cygcheck.cc (usage): Simplify usage output. Generalize to allow use
- for help.
- (longopts): Add version option.
- (opts): Add 'V" version option.
- (print_version): New function.
- (main): Accommodate new version option. Accommodate usage parameter
- changes. Use usage to output help message.
-
-002-02-19 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (CXXFLAGS): Add override so that HAVE_DECL_GETOPT is
- defined.
- (libbfd): Use -B rather than -L so that bfd from build directory is
- correctly found.
- (libintl): Ditto.
-
-2002-02-15 Christopher Faylor <cgf@redhat.com>
-
- * mount.cc (usage): Fix typo in output.
-
-2002-02-14 Christopher Faylor <cgf@redhat.com>
-
- * strace.cc (attach_process): Change CW_STRACE_ON to CW_STRACE_TOGGLE.
-
-2002-01-31 Corinna Vinschen <corinna@vinschen.de>
-
- * mkpasswd.c (main): Set default home path for 9x/Me if --path-to-home
- isn't given.
-
-2002-01-30 Corinna Vinschen <corinna@vinschen.de>
-
- * passwd.cc (ChangePW): Add parameter to differ between called for
- checking old password and called for changing password. If called
- for checking old password, return non-zero only if password is surely
- incorrect.
- (main): Call ChangePW() with additional parameter.
-
-2002-01-29 Christopher Faylor <cgf@redhat.com>
-
- * dump_setup.cc (parse_filename): Don't consider '_' part of the
- version.
-
-2002-01-28 Christopher Faylor <cgf@redhat.com>
-
- * cygcheck.cc: Fix typo. Remove uid_t kludge. Rely on kludge in
- sys/cygwin.h instead.
- * getfacl.c: Add include to remove warning.
- * mkgroup.c (main): Assign variables outside of parameter passing.
- This seems to eliminate some compiler warnings.
-
-2002-01-28 Christopher Faylor <cgf@redhat.com>
-
- * cygcheck.cc: Use specific cygwin includes, as required.
-
-2002-01-28 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (MINGW_INCLUDES): Change cygwin include.
- * strace.cc: Use specific cygwin includes, as required.
- (load_cygwin): New function. Loads cygwin DLL, if necessary.
- (attach_process): Attaches strace to a running process.
- (dostrace): Accept pid argument. Attach to pid if supplied.
- (usage): Describe -p option. Correct system description.
- (longopts): Alphabetize.
- (opts): Ditto.
- (main): Ditto. Handle -p option.
-
-2002-01-21 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (CXXFLAGS): Ensure that important settings are preserved
- even when overriden by command line.
-
-2002-01-21 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Build intermediate cygcheck.o to force use of MINGW_CXXFLAGS.
- * cygcheck.cc (cygwin_info): Intitialize variable to quiet g++ warning.
- (dump_sysinfo): Make variables unsigned to quiet g++ warnings.
- * strace.cc (version_string): Rename from SCCSid.
- (add_child): Remove unused variable.
- (version): Use version_string. Avoid use of fprintf.
-
-2002-01-21 DJ Delorie <dj@redhat.com>
-
- * Makefile.in: Use CXX instead of CC to compile C++ sources.
-
-2002-01-17 DJ Delorie <dj@redhat.com>
-
- * cygcheck.cc (already_did): Avoid default constructors, which may
- require exception support.
-
-2001-01-16 Joshua Daniel Franklin <joshuadfranklin@yahoo.com>
-
- * cygpath.cc (main): Add options to show Desktop and Start
- Menu's Programs directory for current user or all users.
- Move bulk of DPWS options outside the getopt case statement.
- * utils.sgml: Update cygpath section for ADPWS options.
-
-2002-01-15 Joerg Schaible <joerg.schaible@gmx.de>
-
- * cygpath.cc (doit): Empty file ignored using option -i.
-
-2002-01-15 Mark Bradshaw <bradshaw@crosswalk.com>
-
- * mkpasswd.c (print_win_error): Add a new function.
- (enum_users): Use print_win_error.
- (enum_local_groups): Ditto.
- (main): Ditto.
-
-2001-12-26 Jonathan Kamens <jik@curl.com>
-
- * cygpath.cc (doit): Detect and warn about an empty path. Detect and
- warn about errors converting a path.
- (main): Set prog_name correctly -- don't leave an extra slash or
- backslash at the beginning of it.
-
-Fri Dec 14 14:04:37 2001 Jason Tishler <jason@tishler.net>
-
- * mkpasswd.c (enum_users): Change to unconditionally use
- the --path-to-home option, if supplied by the user. Use default
- --path-to-home option value, if appropriate.
- (usage): Change usage statement to reflect new semantics.
- (main): Remove defaulting of the --path-to-home option.
-
-Fri Dec 14 12:10:39 2001 Jason Tishler <jason@tishler.net>
-
- * mkpasswd.c (opts): Add indication that '-p' option requires an
- argument.
-
-2001-12-11 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Add define to CXXFLAGS.
-
-2001-12-03 Christopher Faylor <cgf@redhat.com>
-
- * cygcheck.cc (usage): Add -c description.
- * cygpath.cc (usage): Alphabetize options.
- * strace.cc (usage): Ditto.
-
-2001-11-21 Christopher Faylor <cgf@redhat.com>
-
- * path.cc (cygpath): Don't consider cygdrive stuff when trying to derive
- native paths.
-
-2001-11-20 Mark Bradshaw <bradshaw@staff.crosswalk.com>
-
- * mkpasswd.c: include lmerr.h
- (main): New -u option to allow specifying a
- specific user. If specified, groups aren't displayed and
- output is limited to only the specified user.
- (enum_users): If specific user is specified, via -u option,
- display only that user's record. With -u use NetUserGetInfo
- instead of NetUserEnum.
- (load_netapi): Added netusergetinfo.
-
-2001-11-15 Gary R. Van Sickle <g.r.vansickle@worldnet.att.net>
-
- * strace.cc (main): Change getopt() to getopt_long().
- Add support for help and version info.
- Use new parse_mask() function for -m/--mask option.
- (longopts): Add long options structure.
- (opts): Move options string from getopts call to static var.
- (usage): Print usage information.
- (SCCSid): Version info.
- (version): New function for displaying version info.
- (parse_mask): New function supporting parsing of mnemonics,
- hex, and basic expressions in masks.
- (mnemonic2ul): New mnemonic parsing function.
- (tag_mask_mnemonic): New type.
- (mnemonic_table): New table of mnemonics for mnemonic2ul() to
- search through.
-
-2001-11-12 Corinna Vinschen <corinna@vinschen.de>
-
- * cygcheck.cc (dump_sysinfo): Redefine output format slightly.
- Print correct build number on 9x/ME systems.
-
-2001-11-12 Christopher Faylor <cgf@redhat.com>
-
- * cygcheck.cc (main): Slight formatting tweak.
-
-2001-11-12 Corinna Vinschen <corinna@vinschen.de>
-
- * cygcheck.cc (dump_sysinfo): Add some more details.
-
-2001-11-12 Corinna Vinschen <corinna@vinschen.de>
-
- * cygcheck.cc (dump_sysinfo): Print more detailed OS information string
- using OSVERSIONINFOEX information.
-
-2001-11-11 Christopher Faylor <cgf@redhat.com>
-
- * path.h: New file.
-
-2001-11-11 Christopher Faylor <cgf@redhat.com>
-
- * cygcheck.cc (scan_registry): Open registry with read-only access.
- (main): Reflect argument change for dump_setup.
- * dump_setup.cc (dump_setup): Add preliminary extra argument for future
- use.
- * path.cc (read_mounts): Open registry with read-only access.
-
-2001-11-11 Christopher Faylor <cgf@redhat.com>
-
- * cygcheck.cc (main): Display package info when '-s' is specified.
- * dump_setup.cc (dump_setup): Change header. Remove typo. Always sort
- packages output.
-
-2001-11-11 Christopher Faylor <cgf@redhat.com>
-
- * dump_setup.cc: New file.
- * Makefile.in: Add info for dump_setup.o.
- * cygcheck.cc (main): Recognize '-c' option for checking setup
- installed base.
- * path.cc (cygpath): Read mount table if not loaded.
-
-2001-11-10 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (cygcheck.exe): Compile as -mno-cygwin executable.
- * path.cc: New file.
- * cygcheck.cc (init_paths): Use MS-DOS path syntax.
- (cygwin_info): Properly display cygwin version numbers. Prettify some
- output.
- (dump_sysinfo): Calculate max names of posix and ms-dos paths for
- prettier output.
-
-2001-11-09 Corinna Vinschen <corinna@vinschen.de>
-
- * cygcheck.cc (dump_sysinfo): Print more detailed OS information string.
-
-2001-11-04 Corinna Vinschen <corinna@vinschen.de>
-
- * getfacl.c (username): New function.
- (groupname): Ditto.
- (usage): Ditto. Add more user friendly help text.
- (main): Add -n and --help option. Print names instead of IDs
- unless -n option is given.
- * setfacl.c (getperm): Tolerate whitespace and comment chars in input.
- (getaclentry): Fix several input string misdetections.
- (getaclentries): Allow - as input file name to read from stdin.
- Tolerate whitespace and comment chars in input.
- (usage): Add more user friendly help text.
- (main): Add --help option.
-
-2001-11-04 Egor Duda <deo@logos-m.ru>
-
- * strace.cc (main): New option '-w'. Start traced process in separate
- window. New option '-S x'. Flush buffered output every x seconds.
- (create_child): Start child process in new window, when requested.
- When requested, periodically flush debugging output.
-
-2001-10-24 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Remove EXEEXT consideration. We always need .exe
- extensions.
-
-2001-10-20 Corinna Vinschen <corinna@vinschen.de>
-
- * mkgroup.c: Avoid compiler warnings.
- (print_special): New function.
- (main): Print special accounts by calling print_special().
- * mkpasswd.c: Avoid compiler warnings.
- (enum_users): Print additional U-domain\username info in gecos
- field when SIDs are printed.
- (print_special): New function.
- (main): Print special accounts by calling print_special().
-
-2001-10-15 Christopher Faylor <cgf@redhat.com>
-
- * mkpasswd.cc (enum_users): Shorten "unused" passwd field.
-
-2001-10-13 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Allow stdinc searching for dumper.
-
-Tue Oct 9 21:59:00 2001 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in (MINGW_INCLUDES): Accommodate changes in Makefile.common.
-
-Sun Oct 7 23:06:39 2001 Christopher Faylor <cgf@cygnus.com>
-
- * kill.cc (main): Set exit value to 1 on invalid pid. Perform minor
- cleanup.
-
-Fri Sep 21 20:40:30 2001 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in (mingw_getopt.o): Ensure that newlib include directories
- are not searched.
-
-Thu Sep 20 21:00:20 2001 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in (MINGW_INCLUDES): Still need cygwin/include directory.
-
-Wed Sep 19 12:22:08 2001 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Filter newlib includes from mingw compilation.
-
-2001-09-14 Egor Duda <deo@logos-m.ru>
-
- * dumper.cc (dumper::dumper): Print error code in case of error.
- (dumper::add_thread): Ditto.
- (dumper::collect_memory_sections): Ditto.
- (dumper::dump_memory_region): Ditto.
- (dumper::collect_process_information): Ditto.
- (print_section_name): Fix formatting.
-
-2001-09-13 Egor Duda <deo@logos-m.ru>
-
- * dumper.cc (main): Properly recognize negative pids (used by w9x).
-
-2001-09-09 Egor Duda <deo@logos-m.ru>
-
- * dumper.cc (main): Change command-line arguments format to be
- similar to gdb. Allow adding error_start=x:\path\to\dumper.exe to
- CYGWIN environment variable to perform core dumping in case of
- program crash.
- (usage): Ditto.
-
-Wed Sep 5 22:37:21 2001 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in (dumper): Change logic for libbfd and libintl so that
- they will be found either in the build tree or the installed directory.
- * mkpasswd.c (enum_users): Add a comment as a password for NT.
-
-2001-09-03 Michael A Chase <mchase@ix.netcom.com>
-
- * mount.cc (mount_commands): Don't write /cygdrive/u mount points.
-
-2001-09-03 Michael A Chase <mchase@ix.netcom.com>
-
- * mount.cc (longopts): Add mount-commands to options list.
- (usage): Add mount-commands option.
- (mount_commands): New function. Write commands to recreate current
- mounts.
-
-Sat Sep 1 15:58:11 2001 Christopher Faylor <cgf@cygnus.com>
-
- * mount.cc (main): Eliminate excess arguments in printf.
-
-2001-08-30 Egor Duda <deo@logos-m.ru>
-
- * dumper.h: Update copyright notice.
- * dumper.cc: Ditto.
- * dumper.cc: (dumper::print_core_section_list): New function.
- * dumper.h: (dumper::print_core_section_list): Declare it.
- * dumper.cc (print_section_name): New function.
- (dumper::collect_process_information): Augment debugging output.
- Stop debugee processing if it posts double exception.
- (usage): Fix typo in option name.
-
-Tue Aug 28 14:45:02 2001 Christopher Faylor <cgf@cygnus.com>
-
- * mount.cc (main): Issue correct warning for 'not enough arguments'.
-
-2001-08-14 Joerg Schaible <joerg.schaible@gmx.de>
-
- * cygpath.cc (main): Support -w for Windows (System) directories and
- return physical correct orthography for the Windows System dir.
-
-2001-07-14 Chris Genly <chgenly@alum.mit.edu>
-
- * regtool.cc (find_key): Handle keys with only one subkey.
-
-Wed Jun 27 22:46:10 2001 Christopher Faylor <cgf@cygnus.com>
-
- * regtool.cc (find_key): Revert previous change.
-
-Wed Jun 27 13:37:41 2001 Keith Starsmeare" <keith_starsmeare@yahoo.co.uk>
-
- * regtool.cc (find_key): Allow '/' as a synonym for '\\'.
-
-Fri Jun 15 00:49:21 2001 Christopher Faylor <cgf@cygnus.com>
-
- * mkpasswd.c (main): Output passwd file in binary mode so that there
- are no CRs in the file.
- * umount.cc (remove_all_user_mounts): Don't try to remove /cygdrive
- mounts.
-
-Tue May 1 10:50:48 2001 Christopher Faylor <cgf@cygnus.com>
-
- * mkpasswd.c (enum_users): Use /bin/bash as the default shell.
- (main): Ditto.
-
-Sat Apr 28 22:32:01 2001 Christopher Faylor <cgf@cygnus.com>
-
- * passwd.cc (ttymnam): New function.
- (main): Use ttynam() to report name of tty.
-
-2001-04-19 Egor Duda <deo@logos-m.ru>
-
- * dumper.cc (dumper::init_core_dump): Set architecture field in dump
- header.
-
-Mon Apr 16 15:08:00 2001 Corinna Vinschen <vinschen@redhat.com>
-
- * mkgroup.c: Add function pointers `netlocalgroupgetmembers' and
- `netgroupgetusers'.
- (load_netapi): Load function pointers `netlocalgroupgetmembers'
- and `netgroupgetusers'.
- (enum_local_users): New function.
- (enum_local_groups): Call `enum_local_users' for each group if
- `print_users' is set.
- (enum_users): New function.
- (enum_groups): Call `enum_users' for each group if `print_users' is set.
- (usage): Add usage text for `-u/--users'.
- (longopts): Add option `--users'.
- (opts): Add option character `u'.
- (main): Set `print_users' according to option `-u/--users'.
- Call `enum_local_groups' and `enum_groups' with additional parameter
- `print_users'.
-
-2001-04-15 Michael A Chase <mchase@ix.netcom.com>
-
- * mount.cc (longopts): Add help to options list.
- (opts): Add 'h' to options string.
- * umount.cc (longopts): Add help to options list.
- (opts): Add 'h' to options string and change 'R' to 'A'.
-
-2001-04-13 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * mkgroup.c (enum_groups): Use RID + offset specified an additional
- argument as ID.
- (usage): Add description of -o option.
- (longopts, opts): Add specifications of -o/--id-offset option.
- (main): Add -o option. Invoke enum_groups with specified offset.
- * mkpasswd.c (enum_users): Just like mkgroup.c.
- (usage, longopts, opts): Ditto.
- (main): Add -o option. Invoke enum_users with specified offset only
- against domain accounts.
-
-2001-04-11 Egor Duda <deo@logos-m.ru>
-
- * mkgroup.c (uni2ansi): Use native method to convert from Unicode
- to multi-byte strings.
- * mkpasswd.c (uni2ansi): Ditto.
- (enum_users): Pass buffer size when converting string.
- (enum_local_groups): Ditto.
- * mkgroup.c (enum_groups): Ditto.
- (enum_local_groups): Ditto.
-
-Mon Apr 2 22:41:33 2001 Christopher Faylor <cgf@cygnus.com>
-
- * mount.cc (main): Use getopt_long for parsing arguments.
- (usage): Reformat, show long and short options.
- * umount.cc (main): Ditto, all of the above.
-
-Mon Apr 2 10:58:26 2001 Christopher Faylor <cgf@cygnus.com>
-
- * mount.cc (show_mounts): Change format string to more closely resemble
- UNIX when displaying mount table.
-
-Sat Mar 17 21:46:06 2001 Christopher Faylor <cgf@cygnus.com>
-
- * kill.cc (forcekill): Use dwProcessId when opening a process, not the
- Cygwin pid.
-
-Mon Mar 5 18:50:00 2001 Corinna Vinschen <vinschen@redhat.com>
-
- * getfacl.c: Add copyright hint.
- * setfacl.c: Ditto.
- * strace.cc: Ditto.
-
-Tue Jan 09 10:26:23 2001 Tony Sideris <tonys1110@home.com>
-
- * regtool.cc (cmd_list): Add new registry display options.
- (cmd_list): Add code to implement -p, -k, and -l options.
-
- * regtool.cc (Fail): Add call to LocalFree to free memory allocated by
- FormatMessage.
-
-Wed Jan 10 09:16:57 2001 Christopher Faylor <cgf@cygnus.com>
-
- * regtool.cc (translate): Ensure that 'c' is initialized.
- (cmd_set): Ditto for rv.
diff --git a/winsup/utils/ChangeLog-2000 b/winsup/utils/ChangeLog-2000
deleted file mode 100644
index 7ea5ae1..0000000
--- a/winsup/utils/ChangeLog-2000
+++ /dev/null
@@ -1,347 +0,0 @@
-Fri Dec 15 23:41:48 2000 Christopher Faylor <cgf@cygnus.com>
-
- * cygcheck.cc (cygwin_info): Add some more bounds checking.
-
-Fri Dec 15 23:41:34 2000 Christopher Faylor <cgf@cygnus.com>
-
- From Matt Harget <matt@use.net>:
- * utils/cygcheck.cc (keyeprint): Move declaration before other
- functions so it could be used by all functions to report error
- messages. Add comment.
- (add_path): Check for NULL return from malloc.
- (find_on_path): Check initial uses of pointers for NULL.
- (rva_to_offset): Ditto.
- (init_paths): Add checking for return values of Win32 calls.
- (get_dword): Ditto.
- (get_word): Ditto.
- (dll_info): Ditto, also add NULL pointer checks.
- (scan_registry): Ditto.
- (check_keys): Ditto.
- (dump_sysinfo): Ditto. Add default case to switch. Add error
- reporting if GetVolumeInformation fails, except when it
- returns ERROR_NOT_READY.
- (track_down): Add checking for NULL pointers and
- return values of Win32 calls.
- (cygwin_info): Ditto. Correct small memory leak.
-
-Sun Dec 10 19:08:58 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Compile/link dumper.exe with c++.
-
-Tue Dec 7 11:15:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * mkpasswd.c: Slight formatting changes to the below patch.
- (longopts): Fix typo in `local-groups' option.
- (main): Initialize `passed_home_path' before first usage.
-
-Tue Dec 7 11:15:00 2000 Chris Abbey <cabbey@bresnanlink.net>
-
- * mkpasswd.c: make default home directory /home/$user if one
- can't be found in user registry. Allow user to override
- that with command line arg.
-
-Sun Dec 3 00:40:47 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Use CXX to build the DLL.
- * configure.in: Find correct c++ compiler.
- * configure: Regenerate.
-
-Sat Nov 18 23:53:59 2000 Christopher Faylor <cgf@cygnus.com>
-
- * utils.sgml: Document new options for ps and strace.
-
-Wed Nov 8 08:49:27 2000 Jason Tishler <jt@dothill.com>
-
- * mount.cc (main): Call show_cygdrive_info instead of
- show_cygdrive_prefixes.
- * mount.cc (show_cygdrive_prefixes): Remove function.
- * mount.cc (show_cygdrive_info): New function. Actually,
- show_cygdrive_info is really an enhanced version of
- show_cygdrive_prefixes renamed to show_cygdrive_info that also displays
- the user and system flags.
-
-Wed Nov 8 15:52:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * mkgroup.c (load_netapi): New function to load netapi32.dll functions
- dynamically so that mkgroup works on 9x/ME as well.
- Use corresponding function pointers throughout.
- (usage): Change to `int'. Change text to be conformant to mkpasswd.
- (main): Use `getlongopt' to process options.
- Special handling to create a group entry on 9x/ME.
- * mkpasswd.c (load_netapi): New function to load netapi32.dll functions
- dynamically so that mkpasswd works on 9x/ME as well.
- Use corresponding function pointers throughout.
- (usage): Change to `int'. Change text to be conformant to mkgroup.
- (main): Use `getlongopt' to process options.
- Special handling to create a passwd entry on 9x/ME.
- Change conditional to create an entry for the local administrators
- group when appropriate.
-
-Thu Nov 2 2:01:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * kill.cc (main): Return 1 in case of errors.
-
-Sat Oct 28 01:37:55 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Accomodate newer gcc's which require linking of c++
- programs with g++. Fixup output for some compilations.
- * cygcheck.cc: Respond to compiler warnings.
- * dumper.cc (main): Ditto.
- * parse_pe.cc (exclusion::sort_and_check): Ditto.
- * setfacl.cc (getaclentry): Ditto.
-
-Fri Oct 27 20:20:29 2000 Christopher Faylor <cgf@cygnus.com>
-
- * strace.cc (main): Add a '-b' option.
-
-2000-10-18 DJ Delorie <dj@redhat.com>
-
- * ssp.c: new
- * ssp.txt: new
- * Makefile.in: build ssp.exe
-
-Wed Oct 18 18:57:46 2000 Christopher Faylor <cgf@cygnus.com>
-
- * ps.cc (main): Add some extra space to Windows pid output for
- Windows 95.
-
-Tue Oct 17 23:49:04 2000 Christopher Faylor <cgf@cygnus.com>
-
- * ps.cc (main): Add some extra space to pid output for Windows 95.
-
-Tue Oct 17 1:09:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- Patch suggested by Brad Town <btown@ceddec.com>:
- * cygcheck.cc (main): Fix argument counting.
-
-Sat Oct 14 23:42:58 2000 Christopher Faylor <cgf@cygnus.com>
-
- * ps.cc (main): Accomodate new PID_ constant.
-
-Thu Oct 12 02:19:12 2000 Christopher Faylor <cgf@cygnus.com>
-
- * strace.cc (proc_child): Handle exceptions correctly.
-
-Sun Oct 8 23:11:17 2000 Christopher Faylor <cgf@cygnus.com>
-
- * ps.cc (main): Change order of reporting slightly so that windows pids
- are more obvious.
- * strace.cc (add_child): Just add child's pid directly.
- (remove_child): No need to close the child process pid since
- ContinueDebugEvent does that automatically.
- (proc_child): Ditto for child thread.
-
-Fri Sep 29 13:12:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * cygcheck.cc (keyeprint): New function.
- (check_keys): New function. Perform checking keycodes.
- (main): Add option `-k' for invoking check_keys.
- Change option processing to use long options and getopt_long.
- * cygkeycheck.cc: Removed. Functionality moved to `cygcheck.cc'.
- * Makefile.in: Remove cygkeycheck from the dependencies.
-
-Wed Sep 27 16:24:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * cygkeycheck.cc: New file. Utility to retrieve keycodes.
- * Makefile.in: Add cygkeycheck to the dependencies.
-
-2000-09-15 Joerg Schaible <joerg.schaible@gmx.de>
-
- * cygpath.cc: Add new options: -s and -i.
- * utils.sgml: Document the new options.
-
-Tue Sep 12 22:45:28 2000 Christopher Faylor <cgf@cygnus.com>
-
- * kill.cc (main): Change behavior of -f so that it will force the
- killing of a cygwin process after waiting 2 tenths of a second for it
- to terminate.
- (forcekill): Add an extra argument determining whether to wait for the
- process to exit.
-
-Sun Sep 10 12:50:02 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Refine dumper.exe message.
-
-Mon Aug 28 21:55:56 2000 Christopher Faylor <cgf@cygnus.com>
-
- * kill.c (main): Avoid skipping next argument when a signal number is
- specified.
- * Makefile.in: Always clean dumper.exe.
-
-Fri Aug 25 12:41:53 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Only build dumper.exe when all of its library and
- include dependencies are available.
-
-Fri Aug 25 11:44:29 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Make failure to build dumper.exe a non-error.
-
-Thu Aug 24 18:02:35 2000 Christopher Faylor <cgf@cygnus.com>
-
- * ps.cc (main): Always print a cygwin process using cygwin paths.
-
-2000-08-24 Egor Duda <deo@logos-m.ru>
-
- * Makefile.in: Add dumper.exe target and associated mechanisms for building it.
- * dumper.cc: New file.
- * dumper.h: New file.
- * module_info.cc: New file.
- * parse_pe.cc: New file.
-
-Mon Jul 31 15:12:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * passwd.c (main): Initialize oldpwd before beeing used.
-
-Sat Jul 29 00:44:46 2000 Christopher Faylor <cgf@cygnus.com>
-
- * kill.cc (main): Add '-f' option to force termination of a process.
- (forcekill): New function.
- * ps.cc (main): Add '-W' option to list Windows pids as well as Cygwin
- pids.
- (dummyprocessmodules): New function.
- (GetModuleFileNameEx95): New function.
- (init_win): New function.
- (to_time_t): New function.
-
-Thu Jul 27 22:54:28 2000 Jason Tishler <jt@dothill.com>
-
- * utils/mount.cc (main): Add --show-cygdrive-prefixes option.
- (show_cygdrive_prefixes): New function.
- * utils/umount.cc (main): Add --remove-cygdrive-prefix option.
- (error): Change signature from 'char *' to 'const char *'.
- (remove_cygdrive_prefix): New function.
-
-Thu Jul 13 22:24:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * mount.cc (mount_already_exists): Slightly rearrange.
- Change message texts.
-
-Thu Jul 13 13:02:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * mount.cc (mount_already_exists): Additional warning message
- if mount point exists with another mount type.
-
-Sat Jul 1 00:19:27 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Find getopt.c in cygwin/lib subdirectory.
-
-Sat Jun 24 23:16:33 2000 Christopher Faylor <cgf@cygnus.com>
-
- * cygcheck.cc (cygwin_info): New function. Scans DLL for Cygwin
- version info.
- (dll_info): Add path parameter for checking "cygwin1.dll".
- (track_down): Accomodate additional parameter for dll_info.
- (ls): Ditto.
- (dump_sys_info): Always print cygwin1.dll last.
-
-2000-06-07 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * mount.cc (error): New function to report an error and exit.
- * umount.cc (error): Ditto.
- (remove_all_automounts): Check return status of cygwin_umount.
- (remove_all_user_mounts): Ditto.
- (remove_all_system_mounts): Ditto.
-
-2000-06-05 DJ Delorie <dj@cygnus.com>
-
- * mount.cc: add stdlib.h for exit
- * umount.cc: ditto
- * strace.cc: add #define for alloca
-
-Fri May 20 0:01:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * regtool.cc (find_key): Add parameter `access'.
- Call `RegOpenKeyEx' with that desired access.
- (cmd_add, cmd_remove, cmd_set, cmd_unset): Call
- `find_key' with KEY_ALL_ACCESS access.
- (cmd_list, cmd_check, cmd_get): Call `find_key'
- with KEY_READ access.
-
-2000-05-19 DJ Delorie <dj@cygnus.com>
-
- * cygpath.cc: add --windir/--sysdir options
- * utils.sgml: and document them
-
-Thu May 18 14:38:26 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Eliminate WINSUP_DEPS.
- * cygpath.cc: Reorganize includes to accomodate sys/cygwin.h changes.
- * mkgroup.c: Ditto.
- * mkpasswd.c: Ditto.
- * mount.cc: Ditto. Eliminate use of cygwin source specific includes.
- * ps.cc: Ditto.
- * cygwin.cc: Eliminate obsolete file.
-
-Wed Apr 26 23:43:25 2000 Christopher Faylor <cgf@cygnus.com>
-
- * mount.cc (main): Add "-X" option to specify a "Cygwin executable".
-
-Sat Apr 15 23:34:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * mkpasswd.c (main): Use GetDCName instead of GetAnyDCName.
- Don't create extra passwd entry for administrators group
- if local_groups is set.
- (usage): Change usage text slightly.
- (enum_users): Loop while ERROR_MORE_DATA is returned.
- (enum_local_groups): Ditto.
- * mkgroup.c (enum_local_groups): Ditto.
- (enum_groups) Ditto.
- (usage): Change usage text slightly.
-
-Thu Apr 13 01:22:35 2000 Christopher Faylor <cgf@cygnus.com>
-
- * cygpath.cc (main): Add -a -o and -c options.
- (doit): Ditto.
-
-Mon Apr 10 22:56:07 2000 Christopher Faylor <cgf@cygnus.com>
-
- * cygpath.cc (main): Add -f option for processing a group of paths from
- a file.
- (doit): New function.
-
-Sat Mar 18 22:52:37 2000 Christopher Faylor <cgf@cygnus.com>
-
- Patch suggested by Mumit Khan <khan@xraylith.wisc.edu>:
- * strace.cc (_impure_ptr): New global variable to make strace build
- under Cygwin gcc.
-
-Sat Mar 18 12:45:10 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Make CXXFLAGS consistent with cygwin.
-
-Wed Mar 15 00:53:58 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Use MINGW_CXXFLAGS when compiling strace.
-
-Sun Mar 12 21:22:25 2000 Christopher Faylor <cgf@cygnus.com>
-
- * strace.cc: Throughout, track information like start_time, etc. on a
- per-process basis.
-
-Sun Feb 27 23:37:32 2000 Christopher Faylor <cgf@cygnus.com>
-
- * strace.cc (handle_output_debug_string): Parse strace output to allow
- various types of time output.
-
-Fri Jan 21 02:10:26 Corinna Vinschen <corinna@vinschen.de>
-
- * utils/regtool.cc (translate): Added unix like backslash
- processing.
-
-2000-01-20 Corinna Vinschen <corinna@vinschen.de>
-
- * regtool.cc: allow forward slashes as key separators
-
-2000-01-19 DJ Delorie <dj@redhat.com>
-
- * regtool.cc: New file.
- * Makefile.in: add regtool
- * utils.sgml: add regtool
-
-Sat Jan 8 17:13:51 2000 Christopher Faylor <cgf@cygnus.com>
-
- * getfacl.c: New file.
- * setfacl.c: New file.
- * Makefile.in: Add getfacl.exe and setfacl.exe to list of PROGS.
- Fix link flags in MINGW case.
diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in
deleted file mode 100644
index 9e3f8ef..0000000
--- a/winsup/utils/Makefile.in
+++ /dev/null
@@ -1,179 +0,0 @@
-# Makefile for Cygwin utilities
-# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008 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@
-program_transform_name:=@program_transform_name@
-
-override INSTALL:=@INSTALL@
-override INSTALL_PROGRAM:=@INSTALL_PROGRAM@
-override INSTALL_DATA:=@INSTALL_DATA@
-
-EXEEXT:=@EXEEXT@
-EXEEXT_FOR_BUILD:=@EXEEXT_FOR_BUILD@
-
-CC:=@CC@
-CC_FOR_TARGET:=$(CC)
-CXX:=@CXX@
-CXX_FOR_TARGET:=$(CXX)
-
-CFLAGS:=@CFLAGS@
-CXXFLAGS:=@CXXFLAGS@
-override CXXFLAGS+=-fno-exceptions -fno-rtti -DHAVE_DECL_GETOPT=0
-
-include $(srcdir)/../Makefile.common
-
-.SUFFIXES:
-.NOEXPORT:
-.PHONY: all install clean realclean warn_dumper warn_cygcheck_zlib
-
-ALL_LDLIBS := -lnetapi32 -ladvapi32
-ALL_LDFLAGS := -static-libgcc -Wl,--enable-auto-import -B$(newlib_build)/libc -B$(w32api_lib) $(LDFLAGS) $(ALL_LDLIBS)
-ALL_DEP_LDLIBS := $(cygwin_build)/libcygwin.a ${patsubst -l%,\
- $(w32api_lib)/lib%.a,$(ALL_LDLIBS) -lkernel32 -luser32}
-
-MINGW_LIB := $(mingw_build)/libmingw32.a
-MINGW_LDLIBS := $(ALL_LDLIBS) $(MINGW_LIB)
-MINGW_DEP_LDLIBS := $(ALL_DEP_LDLIBS) $(MINGW_LIB)
-MINGW_CXX := ${srcdir}/mingw ${CXX} -I${updir}
-
-# List all binaries to be linked in Cygwin mode. Each binary on this list
-# must have a corresponding .o of the same name.
-CYGWIN_BINS := ${addsuffix .exe,cygpath getfacl kill mkgroup \
- mkpasswd mount passwd ps regtool setfacl setmetamode ssp umount}
-
-# List all binaries to be linked in MinGW mode. Each binary on this list
-# must have a corresponding .o of the same name.
-MINGW_BINS := ${addsuffix .exe,strace cygcheck}
-
-# List all objects to be compiled in MinGW mode. Any object not on this
-# list will will be compiled in Cygwin mode implicitly, so there is no
-# need for a CYGWIN_OBJS.
-MINGW_OBJS := bloda.o cygcheck.o dump_setup.o path.o strace.o
-
-# If a binary should link in any objects besides the .o with the same
-# name as the binary, then list those here.
-strace.exe: path.o
-cygcheck.exe: bloda.o path.o dump_setup.o
-
-# Provide any necessary per-target variable overrides.
-cygcheck.exe: MINGW_LDFLAGS += -lntdll
-cygpath.exe: ALL_LDFLAGS += -lntdll
-
-# Check for dumper's requirements and enable it if found.
-LIBICONV := @libiconv@
-libbfd := ${shell $(CC) -B$(bupdir2)/bfd/ --print-file-name=libbfd.a}
-libintl := ${shell $(CC) -B$(bupdir2)/intl/ --print-file-name=libintl.a}
-build_dumper := ${shell test -r $(libbfd) -a -r $(libintl) -a -n "$(LIBICONV)" && echo 1}
-ifdef build_dumper
-CYGWIN_BINS += dumper.exe
-dumper.o module_info.o parse_pe.o: CXXFLAGS += -I$(bupdir2)/bfd -I$(updir1)/include
-dumper.o parse_pe.o: dumper.h
-dumper.exe: module_info.o parse_pe.o
-dumper.exe: ALL_LDFLAGS += ${libbfd} ${libintl} -L$(bupdir1)/libiberty $(LIBICONV) -liberty
-else
-all: warn_dumper
-endif
-
-# Check for availability of a MinGW libz and enable for cygcheck.
-libz:=${shell x=$$(${MINGW_CXX} --print-file-name=libz.a); cd $$(dirname $$x); dir=$$(pwd); case "$$dir" in *mingw*) echo $$dir/libz.a ;; esac}
-ifdef libz
-zlib_h := -include ${patsubst %/lib/mingw/libz.a,%/include/zlib.h,${patsubst %/lib/libz.a,%/include/zlib.h,$(libz)}}
-zconf_h := ${patsubst %/zlib.h,%/zconf.h,$(zlib_h)}
-dump_setup.o: MINGW_CXXFLAGS += $(zconf_h) $(zlib_h)
-cygcheck.exe: MINGW_LDFLAGS += $(libz)
-else
-all: warn_cygcheck_zlib
-endif
-
-all: Makefile $(CYGWIN_BINS) $(MINGW_BINS)
-
-# test harness support (note: the "MINGW_BINS +=" should come after the
-# "all:" above so that the testsuite is not run for "make" but only
-# "make check".)
-MINGW_BINS += testsuite.exe
-MINGW_OBJS += path-testsuite.o testsuite.o
-testsuite.exe: path-testsuite.o
-path-testsuite.cc: path.cc ; @test -L $@ || ln -sf ${filter %.cc,$^} $@
-path-testsuite.o: MINGW_CXXFLAGS += -DTESTSUITE
-# this is necessary because this .c lives in the build dir instead of src
-path-testsuite.o: MINGW_CXX := ${patsubst -I.,-I$(utils_source),$(MINGW_CXX)}
-path-testsuite.cc path.cc testsuite.cc: testsuite.h
-check: testsuite.exe ; $(<D)/$(<F)
-
-# the rest of this file contains generic rules
-
-# how to compile a MinGW object
-$(MINGW_OBJS): %.o: %.cc
-ifdef VERBOSE
- $(MINGW_CXX) $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) $<
-else
- @echo $(MINGW_CXX) $c $(MINGW_CXXFLAGS) ... $(*F).cc;\
- $(MINGW_CXX) $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) $<
-endif
-
-# how to link a MinGW binary
-$(MINGW_BINS): %.exe: %.o
-ifdef VERBOSE
- $(MINGW_CXX) $(MINGW_CXXFLAGS) -o $@ ${filter %.o,$^} -B$(mingw_build)/ $(MINGW_LDFLAGS)
-else
- @echo $(MINGW_CXX) -o $@ ${filter %.o,$^} ${filter-out -B%, $(MINGW_CXXFLAGS) $(MINGW_LDFLAGS)};\
- $(MINGW_CXX) $(MINGW_CXXFLAGS) -o $@ ${filter %.o,$^} -B$(mingw_build)/ $(MINGW_LDFLAGS)
-endif
-
-# how to link a Cygwin binary
-$(CYGWIN_BINS): %.exe: %.o
-ifdef VERBOSE
- $(CXX) -o $@ ${filter %.o,$^} -B$(cygwin_build)/ $(ALL_LDFLAGS)
-else
- @echo $(CXX) -o $@ ${filter %.o,$^} ... ${filter-out -B%, $(ALL_LDFLAGS)};\
- $(CXX) -o $@ ${filter %.o,$^} -B$(cygwin_build)/ $(ALL_LDFLAGS)
-endif
-
-# note: how to compile a Cygwin object is covered by the pattern rule in Makefile.common
-
-# these dependencies ensure that the required in-tree libs are built first
-$(MINGW_BINS): $(MINGW_DEP_LDLIBS)
-$(CYGWIN_BINS): $(ALL_DEP_LDLIBS)
-
-clean:
- rm -f *.o $(CYGWIN_BINS) $(MINGW_BINS) path-testsuite.cc testsuite.exe
-
-realclean: clean
- rm -f Makefile config.cache
-
-install: all
- $(SHELL) $(updir1)/mkinstalldirs $(bindir)
- for i in $(CYGWIN_BINS) ${filter-out testsuite.exe,$(MINGW_BINS)} ; do \
- n=`echo $$i | sed '$(program_transform_name)'`; \
- $(INSTALL_PROGRAM) $$i $(bindir)/$$n; \
- done
-
-$(cygwin_build)/libcygwin.a: $(cygwin_build)/Makefile
- @$(MAKE) -C $(@D) $(@F)
-
-$(MINGW_LIB): $(mingw_build)/Makefile
- @$(MAKE) -C $(@D) $(@F)
-
-warn_dumper:
- @echo '*** Not building dumper.exe since some required libraries are'
- @echo '*** missing: libbfd.a and libintl.a.'
- @echo '*** If you need this program, check out the naked-bfd and naked-intl'
- @echo '*** sources from sourceware.org. Then, configure and build these'
- @echo '*** libraries. Otherwise, you can safely ignore this warning.'
-
-warn_cygcheck_zlib:
- @echo '*** Building cygcheck without package content checking due to missing mingw libz.a.'
diff --git a/winsup/utils/aclocal.m4 b/winsup/utils/aclocal.m4
deleted file mode 100644
index ecef424..0000000
--- a/winsup/utils/aclocal.m4
+++ /dev/null
@@ -1,875 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-# lib-prefix.m4 serial 4 (gettext-0.14.2)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
-dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
-dnl require excessive bracketing.
-ifdef([AC_HELP_STRING],
-[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
-[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
-
-dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
-dnl to access previously installed libraries. The basic assumption is that
-dnl a user will want packages to use other packages he previously installed
-dnl with the same --prefix option.
-dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
-dnl libraries, but is otherwise very convenient.
-AC_DEFUN([AC_LIB_PREFIX],
-[
- AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib-prefix],
-[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
- --without-lib-prefix don't search for libraries in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
- fi
- fi
-])
- if test $use_additional = yes; then
- dnl Potentially add $additional_includedir to $CPPFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's already present in $CPPFLAGS,
- dnl 3. if it's /usr/local/include and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- for x in $CPPFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $CPPFLAGS.
- CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- dnl Potentially add $additional_libdir to $LDFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's already present in $LDFLAGS,
- dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
- haveit=
- for x in $LDFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_libdir" = "X/usr/local/lib"; then
- if test -n "$GCC"; then
- case $host_os in
- linux*) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LDFLAGS.
- LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- fi
-])
-
-dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
-dnl acl_final_exec_prefix, containing the values to which $prefix and
-dnl $exec_prefix will expand at the end of the configure script.
-AC_DEFUN([AC_LIB_PREPARE_PREFIX],
-[
- dnl Unfortunately, prefix and exec_prefix get only finally determined
- dnl at the end of configure.
- if test "X$prefix" = "XNONE"; then
- acl_final_prefix="$ac_default_prefix"
- else
- acl_final_prefix="$prefix"
- fi
- if test "X$exec_prefix" = "XNONE"; then
- acl_final_exec_prefix='${prefix}'
- else
- acl_final_exec_prefix="$exec_prefix"
- fi
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
- prefix="$acl_save_prefix"
-])
-
-dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
-dnl variables prefix and exec_prefix bound to the values they will have
-dnl at the end of the configure script.
-AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
-[
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- acl_save_exec_prefix="$exec_prefix"
- exec_prefix="$acl_final_exec_prefix"
- $1
- exec_prefix="$acl_save_exec_prefix"
- prefix="$acl_save_prefix"
-])
-
-# lib-link.m4 serial 6 (gettext-0.14.3)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_PREREQ(2.50)
-
-dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
-dnl augments the CPPFLAGS variable.
-AC_DEFUN([AC_LIB_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
- ac_cv_lib[]Name[]_libs="$LIB[]NAME"
- ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
- ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
- ])
- LIB[]NAME="$ac_cv_lib[]Name[]_libs"
- LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
- INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
- dnl results of this search when this library appears as a dependency.
- HAVE_LIB[]NAME=yes
- undefine([Name])
- undefine([NAME])
-])
-
-dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
-dnl searches for libname and the libraries corresponding to explicit and
-dnl implicit dependencies, together with the specified include files and
-dnl the ability to compile and link the specified testcode. If found, it
-dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
-dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
-dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
-dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
-AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-
- dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
- dnl accordingly.
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
-
- dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
- dnl because if the user has installed lib[]Name and not disabled its use
- dnl via --without-lib[]Name-prefix, he wants to use it.
- ac_save_CPPFLAGS="$CPPFLAGS"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-
- AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS $LIB[]NAME"
- AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
- LIBS="$ac_save_LIBS"
- ])
- if test "$ac_cv_lib[]Name" = yes; then
- HAVE_LIB[]NAME=yes
- AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
- AC_MSG_CHECKING([how to link with lib[]$1])
- AC_MSG_RESULT([$LIB[]NAME])
- else
- HAVE_LIB[]NAME=no
- dnl If $LIB[]NAME didn't lead to a usable library, we don't need
- dnl $INC[]NAME either.
- CPPFLAGS="$ac_save_CPPFLAGS"
- LIB[]NAME=
- LTLIB[]NAME=
- fi
- AC_SUBST([HAVE_LIB]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- undefine([Name])
- undefine([NAME])
-])
-
-dnl Determine the platform dependent parameters needed to use rpath:
-dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
-dnl hardcode_direct, hardcode_minus_L.
-AC_DEFUN([AC_LIB_RPATH],
-[
- dnl Tell automake >= 1.10 to complain if config.rpath is missing.
- m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
- AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
- AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
- AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
- AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
- CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
- ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
- . ./conftest.sh
- rm -f ./conftest.sh
- acl_cv_rpath=done
- ])
- wl="$acl_cv_wl"
- libext="$acl_cv_libext"
- shlibext="$acl_cv_shlibext"
- hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
- hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
- hardcode_direct="$acl_cv_hardcode_direct"
- hardcode_minus_L="$acl_cv_hardcode_minus_L"
- dnl Determine whether the user wants rpath handling at all.
- AC_ARG_ENABLE(rpath,
- [ --disable-rpath do not hardcode runtime library paths],
- :, enable_rpath=yes)
-])
-
-dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
-AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
-[
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib$1-prefix],
-[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
- --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
- fi
- fi
-])
- dnl Search the library and its dependencies in $additional_libdir and
- dnl $LDFLAGS. Using breadth-first-seach.
- LIB[]NAME=
- LTLIB[]NAME=
- INC[]NAME=
- rpathdirs=
- ltrpathdirs=
- names_already_handled=
- names_next_round='$1 $2'
- while test -n "$names_next_round"; do
- names_this_round="$names_next_round"
- names_next_round=
- for name in $names_this_round; do
- already_handled=
- for n in $names_already_handled; do
- if test "$n" = "$name"; then
- already_handled=yes
- break
- fi
- done
- if test -z "$already_handled"; then
- names_already_handled="$names_already_handled $name"
- dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
- dnl or AC_LIB_HAVE_LINKFLAGS call.
- uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
- eval value=\"\$HAVE_LIB$uppername\"
- if test -n "$value"; then
- if test "$value" = yes; then
- eval value=\"\$LIB$uppername\"
- test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
- eval value=\"\$LTLIB$uppername\"
- test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
- else
- dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
- dnl that this library doesn't exist. So just drop it.
- :
- fi
- else
- dnl Search the library lib$name in $additional_libdir and $LDFLAGS
- dnl and the already constructed $LIBNAME/$LTLIBNAME.
- found_dir=
- found_la=
- found_so=
- found_a=
- if test $use_additional = yes; then
- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
- found_dir="$additional_libdir"
- found_so="$additional_libdir/lib$name.$shlibext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- else
- if test -f "$additional_libdir/lib$name.$libext"; then
- found_dir="$additional_libdir"
- found_a="$additional_libdir/lib$name.$libext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- fi
- fi
- fi
- if test "X$found_dir" = "X"; then
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- case "$x" in
- -L*)
- dir=`echo "X$x" | sed -e 's/^X-L//'`
- if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
- found_dir="$dir"
- found_so="$dir/lib$name.$shlibext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- else
- if test -f "$dir/lib$name.$libext"; then
- found_dir="$dir"
- found_a="$dir/lib$name.$libext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- fi
- fi
- ;;
- esac
- if test "X$found_dir" != "X"; then
- break
- fi
- done
- fi
- if test "X$found_dir" != "X"; then
- dnl Found the library.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
- if test "X$found_so" != "X"; then
- dnl Linking with a shared library. We attempt to hardcode its
- dnl directory into the executable's runpath, unless it's the
- dnl standard /usr/lib.
- if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
- dnl No hardcoding is needed.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $found_dir"
- fi
- dnl The hardcoding into $LIBNAME is system dependent.
- if test "$hardcode_direct" = yes; then
- dnl Using DIR/libNAME.so during linking hardcodes DIR into the
- dnl resulting binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $found_dir"
- fi
- else
- dnl Rely on "-L$found_dir".
- dnl But don't add it if it's already contained in the LDFLAGS
- dnl or the already constructed $LIBNAME
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
- fi
- if test "$hardcode_minus_L" != no; then
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
- dnl here, because this doesn't fit in flags passed to the
- dnl compiler. So give up. No hardcoding. This affects only
- dnl very old systems.
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- fi
- else
- if test "X$found_a" != "X"; then
- dnl Linking with a static library.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
- else
- dnl We shouldn't come here, but anyway it's good to have a
- dnl fallback.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
- fi
- fi
- dnl Assume the include files are nearby.
- additional_includedir=
- case "$found_dir" in
- */lib | */lib/)
- basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
- additional_includedir="$basedir/include"
- ;;
- esac
- if test "X$additional_includedir" != "X"; then
- dnl Potentially add $additional_includedir to $INCNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's /usr/local/include and we are using GCC on Linux,
- dnl 3. if it's already present in $CPPFLAGS or the already
- dnl constructed $INCNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- for x in $CPPFLAGS $INC[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $INCNAME.
- INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- fi
- dnl Look for dependencies.
- if test -n "$found_la"; then
- dnl Read the .la file. It defines the variables
- dnl dlname, library_names, old_library, dependency_libs, current,
- dnl age, revision, installed, dlopen, dlpreopen, libdir.
- save_libdir="$libdir"
- case "$found_la" in
- */* | *\\*) . "$found_la" ;;
- *) . "./$found_la" ;;
- esac
- libdir="$save_libdir"
- dnl We use only dependency_libs.
- for dep in $dependency_libs; do
- case "$dep" in
- -L*)
- additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
- dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 3. if it's already present in $LDFLAGS or the already
- dnl constructed $LIBNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
- haveit=
- if test "X$additional_libdir" = "X/usr/local/lib"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LIBNAME.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- haveit=
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LTLIBNAME.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- ;;
- -R*)
- dir=`echo "X$dep" | sed -e 's/^X-R//'`
- if test "$enable_rpath" != no; then
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $dir"
- fi
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $dir"
- fi
- fi
- ;;
- -l*)
- dnl Handle this in the next round.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
- ;;
- *.la)
- dnl Handle this in the next round. Throw away the .la's
- dnl directory; it is already contained in a preceding -L
- dnl option.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
- ;;
- *)
- dnl Most likely an immediate library name.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
- ;;
- esac
- done
- fi
- else
- dnl Didn't find the library; assume it is in the system directories
- dnl known to the linker and runtime loader. (All the system
- dnl directories known to the linker should also be known to the
- dnl runtime loader, otherwise the system is severely misconfigured.)
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- done
- done
- if test "X$rpathdirs" != "X"; then
- if test -n "$hardcode_libdir_separator"; then
- dnl Weird platform: only the last -rpath option counts, the user must
- dnl pass all path elements in one option. We can arrange that for a
- dnl single library, but not when more than one $LIBNAMEs are used.
- alldirs=
- for found_dir in $rpathdirs; do
- alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
- done
- dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
- acl_save_libdir="$libdir"
- libdir="$alldirs"
- eval flag=\"$hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- else
- dnl The -rpath options are cumulative.
- for found_dir in $rpathdirs; do
- acl_save_libdir="$libdir"
- libdir="$found_dir"
- eval flag=\"$hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- done
- fi
- fi
- if test "X$ltrpathdirs" != "X"; then
- dnl When using libtool, the option that works for both libraries and
- dnl executables is -R. The -R options are cumulative.
- for found_dir in $ltrpathdirs; do
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
- done
- fi
-])
-
-dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
-dnl unless already present in VAR.
-dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
-dnl contains two or three consecutive elements that belong together.
-AC_DEFUN([AC_LIB_APPENDTOVAR],
-[
- for element in [$2]; do
- haveit=
- for x in $[$1]; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X$element"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- [$1]="${[$1]}${[$1]:+ }$element"
- fi
- done
-])
-
-# lib-ld.m4 serial 3 (gettext-0.13)
-dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
-
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
-AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- acl_cv_prog_gnu_ld=yes ;;
-*)
- acl_cv_prog_gnu_ld=no ;;
-esac])
-with_gnu_ld=$acl_cv_prog_gnu_ld
-])
-
-dnl From libtool-1.4. Sets the variable LD.
-AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- [re_direlt='/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(acl_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- acl_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break ;;
- *)
- test "$with_gnu_ld" != yes && break ;;
- esac
- fi
- done
- IFS="$ac_save_ifs"
-else
- acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$acl_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_LIB_PROG_LD_GNU
-])
-
-dnl This provides configure definitions used by all the winsup
-dnl configure.in files.
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN([LIB_AC_PROG_CC_GNU],
-[AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc,
-[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
-cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi])])
-
-AC_DEFUN([LIB_AC_PROG_CC],
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_TOOL(CC, gcc, gcc)
-: ${CC:=gcc}
-AC_PROG_CC
-test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-])
-
-AC_DEFUN([LIB_AC_PROG_CXX],
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_TOOL(CXX, g++, g++)
-if test -z "$CXX"; then
- AC_CHECK_TOOL(CXX, g++, c++, , , )
- : ${CXX:=g++}
- AC_PROG_CXX
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-CXXFLAGS='$(CFLAGS)'
-])
-
diff --git a/winsup/utils/bloda.cc b/winsup/utils/bloda.cc
deleted file mode 100644
index c644318..0000000
--- a/winsup/utils/bloda.cc
+++ /dev/null
@@ -1,409 +0,0 @@
-/* bloda.cc
-
- Copyright 2007 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 cygwin_internal cygwin_internal_dontuse
-#include <stdio.h>
-#include <assert.h>
-#include <windows.h>
-#include <ntdef.h>
-#include <ddk/ntstatus.h>
-#include <ddk/ntapi.h>
-#undef cygwin_internal
-
-#undef DEBUGGING
-#ifdef DEBUGGING
-#define dbg_printf(ARGS) printf ARGS ; fflush (NULL)
-#else /* !DEBUGGING */
-#define dbg_printf(ARGS) do { } while (0)
-#endif /* ?DEBUGGING */
-
-/* This module detects applications from the Big List of Dodgy Apps,
- a list of applications that have at some given time been shown to
- interfere with the operation of cygwin. It detects the presence of
- applications on the system by looking for any of four traces an
- installation might leave: 1) registry keys, 2) files on disk
- 3) running executables 4) loaded dlls or drivers.
-
- At the time of writing, the BLODA amounts to:-
-
- Sonic Solutions burning software containing DLA component
- Norton/MacAffee/Symantec antivirus or antispyware
- Logitech webcam software with "Logitech process monitor" service
- Kerio, Agnitum or ZoneAlarm Personal Firewall
- Iolo System Mechanic/AntiVirus/Firewall
- LanDesk
- Windows Defender
- Embassy Trust Suite fingerprint reader software containing wxvault.dll
- ByteMobile laptop optimization client
-
- A live version is now being maintained in the Cygwin FAQ, at
- http://cygwin.com/faq/faq.using.html#faq.using.bloda
-
-*/
-
-enum bad_app
-{
- SONIC, NORTON, MACAFFEE, SYMANTEC,
- LOGITECH, KERIO, AGNITUM, ZONEALARM,
- IOLO, LANDESK, WINDEFENDER, EMBASSYTS,
- BYTEMOBILE
-};
-
-struct bad_app_info
-{
- enum bad_app app_id;
- const char *details;
- char found_it;
-};
-
-enum bad_app_det_method
-{
- HKLMKEY, HKCUKEY, FILENAME, PROCESSNAME, HOOKDLLNAME
-};
-
-struct bad_app_det
-{
- enum bad_app_det_method type;
- const char *param;
- enum bad_app app;
-};
-
-static const struct bad_app_det dodgy_app_detects[] =
-{
- { PROCESSNAME, "dlactrlw.exe", SONIC },
- { HOOKDLLNAME, "wxvault.dll", EMBASSYTS },
- { HKLMKEY, "SYSTEM\\CurrentControlSet\\Services\\vsdatant", ZONEALARM },
- { FILENAME, "%windir%\\System32\\vsdatant.sys", ZONEALARM },
- { HKLMKEY, "SYSTEM\\CurrentControlSet\\Services\\lvprcsrv", LOGITECH },
- { PROCESSNAME, "LVPrcSrv.exe", LOGITECH },
- { FILENAME, "%programfiles%\\common files\\logitech\\lvmvfm\\LVPrcSrv.exe", LOGITECH },
- { FILENAME, "%windir%\\System32\\bmnet.dll", BYTEMOBILE },
-};
-
-static const size_t num_of_detects = sizeof (dodgy_app_detects) / sizeof (dodgy_app_detects[0]);
-
-static struct bad_app_info big_list_of_dodgy_apps[] =
-{
- { SONIC, "Sonic Solutions burning software containing DLA component" },
- { NORTON, "Norton antivirus or antispyware software" },
- { MACAFFEE, "Macaffee antivirus or antispyware software" },
- { SYMANTEC, "Symantec antivirus or antispyware software" },
- { LOGITECH, "Logitech Process Monitor service" },
- { KERIO, "Kerio Personal Firewall" },
- { AGNITUM, "Agnitum Personal Firewall" },
- { ZONEALARM, "ZoneAlarm Personal Firewall" },
- { IOLO, "Iolo System Mechanic/AntiVirus/Firewall software" },
- { LANDESK, "Landesk" },
- { WINDEFENDER, "Windows Defender" },
- { EMBASSYTS, "Embassy Trust Suite fingerprint reader software containing wxvault.dll" },
- { BYTEMOBILE, "ByteMobile laptop optimization client" },
-};
-
-static const size_t num_of_dodgy_apps = sizeof (big_list_of_dodgy_apps) / sizeof (big_list_of_dodgy_apps[0]);
-
-static PSYSTEM_PROCESSES
-get_process_list (void)
-{
- int n_procs = 0x100;
- PSYSTEM_PROCESSES pslist = (PSYSTEM_PROCESSES) malloc (n_procs * sizeof *pslist);
-
- while (NtQuerySystemInformation (SystemProcessesAndThreadsInformation,
- pslist, n_procs * sizeof *pslist, 0) == STATUS_INFO_LENGTH_MISMATCH)
- {
- n_procs *= 2;
- free (pslist);
- pslist = (PSYSTEM_PROCESSES) malloc (n_procs * sizeof *pslist);
- }
- return pslist;
-}
-
-static PSYSTEM_MODULE_INFORMATION
-get_module_list (void)
-{
- int modsize = 0x1000;
- PSYSTEM_MODULE_INFORMATION modlist = (PSYSTEM_MODULE_INFORMATION) malloc (modsize);
-
- while (NtQuerySystemInformation (SystemModuleInformation,
- modlist, modsize, NULL) == STATUS_INFO_LENGTH_MISMATCH)
- {
- modsize *= 2;
- free (modlist);
- modlist = (PSYSTEM_MODULE_INFORMATION) malloc (modsize);
- }
- return modlist;
-}
-
-static bool
-find_process_in_list (PSYSTEM_PROCESSES pslist, PUNICODE_STRING psname)
-{
- while (1)
- {
- if (pslist->ProcessName.Length && pslist->ProcessName.Buffer)
- {
- dbg_printf (("%S\n", pslist->ProcessName.Buffer));
- if (!_wcsicmp (pslist->ProcessName.Buffer, psname->Buffer))
- return true;
- }
- if (!pslist->NextEntryDelta)
- break;
- pslist = (PSYSTEM_PROCESSES)(pslist->NextEntryDelta + (char *)pslist);
- };
- return false;
-}
-
-static bool
-find_module_in_list (PSYSTEM_MODULE_INFORMATION modlist, const char * const modname)
-{
- PSYSTEM_MODULE_INFORMATION_ENTRY modptr = &modlist->Module[0];
- DWORD count = modlist->Count;
- while (count--)
- {
- dbg_printf (("name '%s' offset %d ", &modptr->ImageName[0], modptr->PathLength));
- dbg_printf (("= '%s'\n", &modptr->ImageName[modptr->PathLength]));
- if (!_stricmp (&modptr->ImageName[modptr->PathLength], modname))
- return true;
- modptr++;
- }
- return false;
-}
-
-static bool
-expand_path (const char *path, char *outbuf)
-{
- char *dst = outbuf;
- const char *end, *envval;
- char envvar[MAX_PATH];
- size_t len;
-
- while ((dst - outbuf) < MAX_PATH)
- {
- if (*path != '%')
- {
- if ((*dst++ = *path++) != 0)
- continue;
- break;
- }
- /* Expand an environ var. */
- end = path + 1;
- while (*end != '%')
- {
- /* Watch out for unterminated % */
- if (*end++ == 0)
- {
- end = NULL;
- break;
- }
- }
- /* If we didn't find the end, can't expand it. */
- if ((end == NULL) || (end == (path + 1)))
- {
- /* Unterminated % so copy verbatim. */
- *dst++ = *path++;
- continue;
- }
- /* Expand the environment var into the new path. */
- if ((end - (path + 1)) >= MAX_PATH)
- return -1;
- memcpy (envvar, path + 1, end - (path + 1));
- envvar[end - (path + 1)] = 0;
- envval = getenv (envvar);
- /* If not found, copy env var name verbatim. */
- if (envval == NULL)
- {
- *dst++ = *path++;
- continue;
- }
- /* Check enough room before copying. */
- len = strlen (envval);
- if ((dst + len - outbuf) >= MAX_PATH)
- return false;
- memcpy (dst, envval, len);
- dst += len;
- /* And carry on past the end of env var name. */
- path = end + 1;
- }
- return (dst - outbuf) < MAX_PATH;
-}
-
-static bool
-detect_dodgy_app (const struct bad_app_det *det, PSYSTEM_PROCESSES pslist, PSYSTEM_MODULE_INFORMATION modlist)
-{
- HANDLE fh;
- HKEY hk;
- UNICODE_STRING unicodename;
- ANSI_STRING ansiname;
- NTSTATUS rv;
- bool found;
- char expandedname[MAX_PATH];
-
- switch (det->type)
- {
- case HKLMKEY:
- dbg_printf (("Detect reg key hklm '%s'... ", det->param));
- if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, det->param, 0, STANDARD_RIGHTS_READ, &hk) == ERROR_SUCCESS)
- {
- RegCloseKey (hk);
- dbg_printf (("found!\n"));
- return true;
- }
- break;
-
- case HKCUKEY:
- dbg_printf (("Detect reg key hkcu '%s'... ", det->param));
- if (RegOpenKeyEx (HKEY_CURRENT_USER, det->param, 0, STANDARD_RIGHTS_READ, &hk) == ERROR_SUCCESS)
- {
- RegCloseKey (hk);
- dbg_printf (("found!\n"));
- return true;
- }
- break;
-
- case FILENAME:
- dbg_printf (("Detect filename '%s'... ", det->param));
- if (!expand_path (det->param, expandedname))
- {
- printf ("Expansion failure!\n");
- break;
- }
- dbg_printf (("('%s' after expansion)... ", expandedname));
- fh = CreateFile (expandedname, 0, FILE_SHARE_READ | FILE_SHARE_WRITE
- | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, 0, NULL);
- if (fh != INVALID_HANDLE_VALUE)
- {
- CloseHandle (fh);
- dbg_printf (("found!\n"));
- return true;
- }
- break;
-
- case PROCESSNAME:
- dbg_printf (("Detect proc name '%s'... ", det->param));
- /* Equivalent of RtlInitAnsiString. */
- ansiname.Length = ansiname.MaximumLength = strlen (det->param);
- ansiname.Buffer = (CHAR *) det->param;
- rv = RtlAnsiStringToUnicodeString (&unicodename, &ansiname, TRUE);
- if (rv != STATUS_SUCCESS)
- {
- printf ("Ansi to unicode conversion failure $%08x\n", (unsigned int) rv);
- break;
- }
- found = find_process_in_list (pslist, &unicodename);
- RtlFreeUnicodeString (&unicodename);
- if (found)
- {
- dbg_printf (("found!\n"));
- return true;
- }
- break;
-
- case HOOKDLLNAME:
- dbg_printf (("Detect hookdll '%s'... ", det->param));
- if (find_module_in_list (modlist, det->param))
- {
- dbg_printf (("found!\n"));
- return true;
- }
- break;
-
- }
- dbg_printf (("not found.\n"));
- return false;
-}
-
-static struct bad_app_info *
-find_dodgy_app_info (enum bad_app which_app)
-{
- size_t i;
- for (i = 0; i < num_of_dodgy_apps; i++)
- {
- if (big_list_of_dodgy_apps[i].app_id == which_app)
- return &big_list_of_dodgy_apps[i];
- }
- return NULL;
-}
-
-/* External entrypoint called from cygcheck.cc/dump_sysinfo. */
-void
-dump_dodgy_apps (int verbose)
-{
- size_t i, n_det = 0;
- PSYSTEM_PROCESSES pslist;
- PSYSTEM_MODULE_INFORMATION modlist;
-
- /* Read system info for detect testing. */
- pslist = get_process_list ();
- modlist = get_module_list ();
-
- /* Go with builtin list for now; later may enhance to
- read dodgy apps from a file or download from an URL. */
- for (i = 0; i < num_of_dodgy_apps; i++)
- {
- big_list_of_dodgy_apps[i].found_it = false;
- }
-
- for (i = 0; i < num_of_detects; i++)
- {
- const struct bad_app_det *det = &dodgy_app_detects[i];
- struct bad_app_info *found = find_dodgy_app_info (det->app);
- bool detected = detect_dodgy_app (det, pslist, modlist);
-
- /* Not found would mean we coded the lists bad. */
- assert (found);
- if (detected)
- {
- ++n_det;
- found->found_it |= (1 << det->type);
- }
- }
- if (n_det)
- {
- printf ("\nPotential app conflicts:\n\n");
- for (i = 0; i < num_of_dodgy_apps; i++)
- {
- if (big_list_of_dodgy_apps[i].found_it)
- {
- printf ("%s%s", big_list_of_dodgy_apps[i].details,
- verbose ? "\nDetected: " : ".\n");
- if (!verbose)
- continue;
- const char *sep = "";
- if (big_list_of_dodgy_apps[i].found_it & (1 << HKLMKEY))
- {
- printf ("HKLM Registry Key");
- sep = ", ";
- }
- if (big_list_of_dodgy_apps[i].found_it & (1 << HKCUKEY))
- {
- printf ("%sHKCU Registry Key", sep);
- sep = ", ";
- }
- if (big_list_of_dodgy_apps[i].found_it & (1 << FILENAME))
- {
- printf ("%sNamed file", sep);
- sep = ", ";
- }
- if (big_list_of_dodgy_apps[i].found_it & (1 << PROCESSNAME))
- {
- printf ("%sNamed process", sep);
- sep = ", ";
- }
- if (big_list_of_dodgy_apps[i].found_it & (1 << HOOKDLLNAME))
- {
- printf ("%sLoaded hook DLL", sep);
- }
- printf (".\n\n");
- }
- }
- }
- /* Tidy up allocations. */
- free (pslist);
- free (modlist);
-}
-
diff --git a/winsup/utils/configure b/winsup/utils/configure
deleted file mode 100755
index aac51fd..0000000
--- a/winsup/utils/configure
+++ /dev/null
@@ -1,4813 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.62.
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-if test "x$CONFIG_SHELL" = x; then
- if (eval ":") 2>/dev/null; then
- as_have_required=yes
-else
- as_have_required=no
-fi
-
- if test $as_have_required = yes && (eval ":
-(as_func_return () {
- (exit \$1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
- :
-else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0) || { (exit 1); exit 1; }
-
-(
- as_lineno_1=\$LINENO
- as_lineno_2=\$LINENO
- test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
- test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
-") 2> /dev/null; then
- :
-else
- as_candidate_shells=
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- case $as_dir in
- /*)
- for as_base in sh bash ksh sh5; do
- as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
- done;;
- esac
-done
-IFS=$as_save_IFS
-
-
- for as_shell in $as_candidate_shells $SHELL; do
- # Try only shells that exist, to save several forks.
- if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { ("$as_shell") 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-_ASEOF
-}; then
- CONFIG_SHELL=$as_shell
- as_have_required=yes
- if { "$as_shell" 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-(as_func_return () {
- (exit $1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = "$1" ); then
- :
-else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test $exitcode = 0) || { (exit 1); exit 1; }
-
-(
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
-
-_ASEOF
-}; then
- break
-fi
-
-fi
-
- done
-
- if test "x$CONFIG_SHELL" != x; then
- for as_var in BASH_ENV ENV
- do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- done
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
-
- if test $as_have_required = no; then
- echo This script requires a shell more modern than all the
- echo shells that I found on your system. Please install a
- echo modern shell, or manually run the script under such a
- echo shell if you do have one.
- { (exit 1); exit 1; }
-fi
-
-
-fi
-
-fi
-
-
-
-(eval "as_func_return () {
- (exit \$1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
- :
-else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0") || {
- echo No shell found that supports shell functions.
- echo Please tell bug-autoconf@gnu.org about your system,
- echo including any error possibly output before this message.
- echo This can help us improve future autoconf versions.
- echo Configuration will now proceed without shell functions.
-}
-
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line after each line using $LINENO; the second 'sed'
- # does the real work. The second script uses 'N' to pair each
- # line-number line with the line containing $LINENO, and appends
- # trailing '-' during substitution so that $LINENO is not a special
- # case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # scripts with optimization help from Paolo Bonzini. Blame Lee
- # E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
- case `echo 'x\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- *) ECHO_C='\c';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
- as_ln_s='cp -p'
- fi
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-exec 7<&0 </dev/null 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-
-ac_unique_file="mount.cc"
-ac_subst_vars='SHELL
-PATH_SEPARATOR
-PACKAGE_NAME
-PACKAGE_TARNAME
-PACKAGE_VERSION
-PACKAGE_STRING
-PACKAGE_BUGREPORT
-exec_prefix
-prefix
-program_transform_name
-bindir
-sbindir
-libexecdir
-datarootdir
-datadir
-sysconfdir
-sharedstatedir
-localstatedir
-includedir
-oldincludedir
-docdir
-infodir
-htmldir
-dvidir
-pdfdir
-psdir
-libdir
-localedir
-mandir
-DEFS
-ECHO_C
-ECHO_N
-ECHO_T
-LIBS
-build_alias
-host_alias
-target_alias
-build
-build_cpu
-build_vendor
-build_os
-host
-host_cpu
-host_vendor
-host_os
-target
-target_cpu
-target_vendor
-target_os
-CC
-CFLAGS
-LDFLAGS
-CPPFLAGS
-ac_ct_CC
-EXEEXT
-OBJEXT
-CXX
-CXXFLAGS
-ac_ct_CXX
-libiconv
-INSTALL_PROGRAM
-INSTALL_SCRIPT
-INSTALL_DATA
-LIBOBJS
-LTLIBOBJS'
-ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-'
- ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-CXX
-CXXFLAGS
-CCC'
-
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-ac_unrecognized_opts=
-ac_unrecognized_sep=
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval $ac_prev=\$ac_option
- ac_prev=
- continue
- fi
-
- case $ac_option in
- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *) ac_optarg=yes ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_dashdash$ac_option in
- --)
- ac_dashdash=yes ;;
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=*)
- datadir=$ac_optarg ;;
-
- -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
- | --dataroo | --dataro | --datar)
- ac_prev=datarootdir ;;
- -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
- | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
- datarootdir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
- { (exit 1); exit 1; }; }
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval enable_$ac_useropt=no ;;
-
- -docdir | --docdir | --docdi | --doc | --do)
- ac_prev=docdir ;;
- -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
- docdir=$ac_optarg ;;
-
- -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
- ac_prev=dvidir ;;
- -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
- dvidir=$ac_optarg ;;
-
- -enable-* | --enable-*)
- ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
- { (exit 1); exit 1; }; }
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"enable_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval enable_$ac_useropt=\$ac_optarg ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
- ac_prev=htmldir ;;
- -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
- | --ht=*)
- htmldir=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir=$ac_optarg ;;
-
- -localedir | --localedir | --localedi | --localed | --locale)
- ac_prev=localedir ;;
- -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
- localedir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst | --locals)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
- localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name=$ac_optarg ;;
-
- -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
- ac_prev=pdfdir ;;
- -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
- pdfdir=$ac_optarg ;;
-
- -psdir | --psdir | --psdi | --psd | --ps)
- ac_prev=psdir ;;
- -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
- psdir=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
- { (exit 1); exit 1; }; }
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval with_$ac_useropt=\$ac_optarg ;;
-
- -without-* | --without-*)
- ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
- { (exit 1); exit 1; }; }
- ac_useropt_orig=$ac_useropt
- ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
- case $ac_user_opts in
- *"
-"with_$ac_useropt"
-"*) ;;
- *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
- ac_unrecognized_sep=', ';;
- esac
- eval with_$ac_useropt=no ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries=$ac_optarg ;;
-
- -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- eval $ac_envvar=\$ac_optarg
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { $as_echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-if test -n "$ac_unrecognized_opts"; then
- case $enable_option_checking in
- no) ;;
- fatal) { $as_echo "$as_me: error: Unrecognized options: $ac_unrecognized_opts" >&2
- { (exit 1); exit 1; }; } ;;
- *) $as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2 ;;
- esac
-fi
-
-# Check all directory arguments for consistency.
-for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
- datadir sysconfdir sharedstatedir localstatedir includedir \
- oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
-do
- eval ac_val=\$$ac_var
- # Remove trailing slashes.
- case $ac_val in
- */ )
- ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
- eval $ac_var=\$ac_val;;
- esac
- # Be sure to have absolute directory names.
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) continue;;
- NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
- esac
- { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; }
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- { $as_echo "$as_me: error: Working directory cannot be determined" >&2
- { (exit 1); exit 1; }; }
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
- { (exit 1); exit 1; }; }
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then the parent directory.
- ac_confdir=`$as_dirname -- "$as_myself" ||
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_myself" : 'X\(//\)[^/]' \| \
- X"$as_myself" : 'X\(//\)$' \| \
- X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r "$srcdir/$ac_unique_file"; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
- test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
- { (exit 1); exit 1; }; }
- pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
- srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
- eval ac_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_env_${ac_var}_value=\$${ac_var}
- eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
- --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- --infodir=DIR info documentation [DATAROOTDIR/info]
- --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
- --mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
- --htmldir=DIR html documentation [DOCDIR]
- --dvidir=DIR dvi documentation [DOCDIR]
- --pdfdir=DIR pdf documentation [DOCDIR]
- --psdir=DIR ps documentation [DOCDIR]
-_ACEOF
-
- cat <<\_ACEOF
-
-Program names:
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM run sed PROGRAM on installed program names
-
-System types:
- --build=BUILD configure for building on BUILD [guessed]
- --host=HOST cross-compile to build programs to run on HOST [BUILD]
- --target=TARGET configure for building compilers for TARGET [HOST]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-
- cat <<\_ACEOF
-
-Some influential environment variables:
- CC C compiler command
- CFLAGS C compiler flags
- LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
- nonstandard directory <lib dir>
- LIBS libraries to pass to the linker, e.g. -l<library>
- CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
- you have headers in a nonstandard directory <include dir>
- CXX C++ compiler command
- CXXFLAGS C++ compiler flags
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d "$ac_dir" ||
- { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
- continue
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
- cd "$ac_dir" || { ac_status=$?; continue; }
- # Check for guested configure.
- if test -f "$ac_srcdir/configure.gnu"; then
- echo &&
- $SHELL "$ac_srcdir/configure.gnu" --help=recursive
- elif test -f "$ac_srcdir/configure"; then
- echo &&
- $SHELL "$ac_srcdir/configure" --help=recursive
- else
- $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi || ac_status=$?
- cd "$ac_pwd" || { ac_status=$?; break; }
- done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
- cat <<\_ACEOF
-configure
-generated by GNU Autoconf 2.62
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit
-fi
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by $as_me, which was
-generated by GNU Autoconf 2.62. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- $as_echo "PATH: $as_dir"
-done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *\'*)
- ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- ac_configure_args="$ac_configure_args '$ac_arg'"
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-(
- for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) $as_unset $ac_var ;;
- esac ;;
- esac
- done
- (set) 2>&1 |
- case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- sed -n \
- "s/'\''/'\''\\\\'\'''\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
- ;; #(
- *)
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-)
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------------- ##
-## File substitutions. ##
-## ------------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- $as_echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- cat confdefs.h
- echo
- fi
- test "$ac_signal" != 0 &&
- $as_echo "$as_me: caught signal $ac_signal"
- $as_echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core core.conftest.* &&
- rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
- ac_site_file1=$CONFIG_SITE
-elif test "x$prefix" != xNONE; then
- ac_site_file1=$prefix/share/config.site
- ac_site_file2=$prefix/etc/config.site
-else
- ac_site_file1=$ac_default_prefix/share/config.site
- ac_site_file2=$ac_default_prefix/etc/config.site
-fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
- test "x$ac_site_file" = xNONE && continue
- if test -r "$ac_site_file"; then
- { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . "$cache_file";;
- *) . "./$cache_file";;
- esac
- fi
-else
- { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val=\$ac_cv_env_${ac_var}_value
- eval ac_new_val=\$ac_env_${ac_var}_value
- case $ac_old_set,$ac_new_set in
- set,)
- { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- # differences in whitespace do not lead to failure.
- ac_old_val_w=`echo x $ac_old_val`
- ac_new_val_w=`echo x $ac_new_val`
- if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- ac_cache_corrupted=:
- else
- { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
- eval $ac_var=\$ac_old_val
- fi
- { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
-$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
- { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
-$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-ac_aux_dir=
-for ac_dir in ../.. "$srcdir"/../..; do
- if test -f "$ac_dir/install-sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f "$ac_dir/install.sh"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- elif test -f "$ac_dir/shtool"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ../.. \"$srcdir\"/../.." >&5
-$as_echo "$as_me: error: cannot find install-sh or install.sh in ../.. \"$srcdir\"/../.." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-
-
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
- { (exit 1); exit 1; }; }
-
-{ $as_echo "$as_me:$LINENO: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
- { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-$as_echo "$as_me: error: invalid value of canonical build" >&2;}
- { (exit 1); exit 1; }; };;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:$LINENO: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test "x$host_alias" = x; then
- ac_cv_host=$ac_cv_build
-else
- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-$as_echo "$as_me: error: invalid value of canonical host" >&2;}
- { (exit 1); exit 1; }; };;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:$LINENO: checking target system type" >&5
-$as_echo_n "checking target system type... " >&6; }
-if test "${ac_cv_target+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test "x$target_alias" = x; then
- ac_cv_target=$ac_cv_host
-else
- ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
- { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-$as_echo "$ac_cv_target" >&6; }
-case $ac_cv_target in
-*-*-*) ;;
-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
-$as_echo "$as_me: error: invalid value of canonical target" >&2;}
- { (exit 1); exit 1; }; };;
-esac
-target=$ac_cv_target
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_target
-shift
-target_cpu=$1
-target_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-target_os=$*
-IFS=$ac_save_IFS
-case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CC="gcc"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_CC" = x; then
- CC="gcc"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-else
- CC="$ac_cv_prog_CC"
-fi
-
-: ${CC:=gcc}
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CC="gcc"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-else
- CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- fi
-fi
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# != 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
- fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl.exe
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl.exe
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$ac_ct_CC" && break
-done
-
- if test "x$ac_ct_CC" = x; then
- CC=""
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-fi
-
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler --version >&5") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler -v >&5") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler -V >&5") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
-do
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
- * ) ac_rmfiles="$ac_rmfiles $ac_file";;
- esac
-done
-rm -f $ac_rmfiles
-
-if { (ac_try="$ac_link_default"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link_default") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile. We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
- ;;
- [ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* )
- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
- then :; else
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- fi
- # We set ac_cv_exeext here because the later test for it is not
- # safe: cross compilers may not add the suffix if given an `-o'
- # argument, so we may need to know it at that point already.
- # Even if this section looks crufty: it has the advantage of
- # actually working.
- break;;
- * )
- break;;
- esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-else
- ac_file=''
-fi
-
-{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-if test -z "$ac_file"; then
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
-fi
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
- test -f "$ac_file" || continue
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- break;;
- * ) break;;
- esac
-done
-else
- { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest$ac_cv_exeext
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- for ac_file in conftest.o conftest.obj conftest.*; do
- test -f "$ac_file" || continue;
- case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
- *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
- break;;
- esac
-done
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_compiler_gnu=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_compiler_gnu=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
- GCC=yes
-else
- GCC=
-fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_save_c_werror_flag=$ac_c_werror_flag
- ac_c_werror_flag=yes
- ac_cv_prog_cc_g=no
- CFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_cc_g=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- CFLAGS=""
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- :
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_c_werror_flag=$ac_save_c_werror_flag
- CFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_cc_g=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
- inside strings and character constants. */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
- -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_cc_c89=$ac_arg
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext
- test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
- x)
- { $as_echo "$as_me:$LINENO: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:$LINENO: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5
-$as_echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
- { (exit 1); exit 1; }; }
-
-if test -n "$ac_tool_prefix"; then
- # 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CXX="${ac_tool_prefix}g++"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
- { $as_echo "$as_me:$LINENO: result: $CXX" >&5
-$as_echo "$CXX" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CXX"; then
- ac_ct_CXX=$CXX
- # Extract the first word of "g++", so it can be a program name with args.
-set dummy g++; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CXX"; then
- ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CXX="g++"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-$as_echo "$ac_ct_CXX" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_CXX" = x; then
- CXX="g++"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- CXX=$ac_ct_CXX
- fi
-else
- CXX="$ac_cv_prog_CXX"
-fi
-
-if test -z "$CXX"; then
- if test -n "$ac_tool_prefix"; then
- # 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
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CXX="${ac_tool_prefix}g++"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
- { $as_echo "$as_me:$LINENO: result: $CXX" >&5
-$as_echo "$CXX" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CXX"; then
- ac_ct_CXX=$CXX
- # Extract the first word of "g++", so it can be a program name with args.
-set dummy g++; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CXX"; then
- ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CXX="g++"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-$as_echo "$ac_ct_CXX" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_CXX" = x; then
- CXX="c++"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- CXX=$ac_ct_CXX
- fi
-else
- CXX="$ac_cv_prog_CXX"
-fi
-
- : ${CXX:=g++}
- ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -z "$CXX"; then
- if test -n "$CCC"; then
- CXX=$CCC
- else
- if test -n "$ac_tool_prefix"; then
- for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CXX"; then
- ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
- { $as_echo "$as_me:$LINENO: result: $CXX" >&5
-$as_echo "$CXX" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$CXX" && break
- done
-fi
-if test -z "$CXX"; then
- ac_ct_CXX=$CXX
- for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CXX"; then
- ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CXX="$ac_prog"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
- { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-$as_echo "$ac_ct_CXX" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$ac_ct_CXX" && break
-done
-
- if test "x$ac_ct_CXX" = x; then
- CXX="g++"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
-ac_tool_warned=yes ;;
-esac
- CXX=$ac_ct_CXX
- fi
-fi
-
- fi
-fi
-# Provide some information about the compiler.
-$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler --version >&5") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler -v >&5") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compiler -V >&5") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-
-{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
-$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_compiler_gnu=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_compiler_gnu=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
-$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
- GXX=yes
-else
- GXX=
-fi
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
-$as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_save_cxx_werror_flag=$ac_cxx_werror_flag
- ac_cxx_werror_flag=yes
- ac_cv_prog_cxx_g=no
- CXXFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_cxx_g=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- CXXFLAGS=""
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- :
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
- CXXFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_prog_cxx_g=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
-$as_echo "$ac_cv_prog_cxx_g" >&6; }
-if test "$ac_test_CXXFLAGS" = set; then
- CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
- if test "$GXX" = yes; then
- CXXFLAGS="-g -O2"
- else
- CXXFLAGS="-g"
- fi
-else
- if test "$GXX" = yes; then
- CXXFLAGS="-O2"
- else
- CXXFLAGS=
- fi
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
- test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5
-$as_echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-CXXFLAGS='$(CFLAGS)'
-
-
-test "$program_prefix" != NONE &&
- program_transform_name="s&^&$program_prefix&;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.
-# By default was `s,x,x', remove it if useless.
-ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
-
-
-
-{ $as_echo "$as_me:$LINENO: checking for libiconv in -liconv" >&5
-$as_echo_n "checking for libiconv in -liconv... " >&6; }
-if test "${ac_cv_lib_iconv_libiconv+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-liconv $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char libiconv ();
-int
-main ()
-{
-return libiconv ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- ac_cv_lib_iconv_libiconv=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_lib_iconv_libiconv=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_iconv_libiconv" >&5
-$as_echo "$ac_cv_lib_iconv_libiconv" >&6; }
-if test $ac_cv_lib_iconv_libiconv = yes; then
- libiconv=-liconv
-fi
-
-
-
-INSTALL="/bin/sh "`cd $srcdir/../..; echo $(pwd)/install-sh -c`
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- rm -rf conftest.one conftest.two conftest.dir
- echo one > conftest.one
- echo two > conftest.two
- mkdir conftest.dir
- if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
- test -s conftest.one && test -s conftest.two &&
- test -s conftest.dir/conftest.one &&
- test -s conftest.dir/conftest.two
- then
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- fi
- done
- done
- ;;
-esac
-
-done
-IFS=$as_save_IFS
-
-rm -rf conftest.one conftest.two conftest.dir
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. Don't cache a
- # value for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the value is a relative name.
- INSTALL=$ac_install_sh
- fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-
-ac_config_files="$ac_config_files Makefile"
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
- for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
- *) $as_unset $ac_var ;;
- esac ;;
- esac
- done
-
- (set) 2>&1 |
- case $as_nl`(ac_space=' '; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;; #(
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-) |
- sed '
- /^ac_cv_env_/b end
- t clear
- :clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
- if test -w "$cache_file"; then
- test "x$cache_file" != "x/dev/null" &&
- { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
- cat confcache >$cache_file
- else
- { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then branch to the quote section. Otherwise,
-# look for a macro that doesn't take arguments.
-ac_script='
-:mline
-/\\$/{
- N
- s,\\\n,,
- b mline
-}
-t clear
-:clear
-s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
-t quote
-s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
-t quote
-b any
-:quote
-s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
-s/\[/\\&/g
-s/\]/\\&/g
-s/\$/$$/g
-H
-:any
-${
- g
- s/^\n//
- s/\n/ /g
- p
-}
-'
-DEFS=`sed -n "$ac_script" confdefs.h`
-
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
- # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
- # will be set to the directory where LIBOBJS objects are built.
- ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
-else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line after each line using $LINENO; the second 'sed'
- # does the real work. The second script uses 'N' to pair each
- # line-number line with the line containing $LINENO, and appends
- # trailing '-' during substitution so that $LINENO is not a special
- # case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # scripts with optimization help from Paolo Bonzini. Blame Lee
- # E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
- case `echo 'x\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- *) ECHO_C='\c';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
- as_ln_s='cp -p'
- fi
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-
-# Save the log message, to keep $[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.62. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number and configuration settings, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
-
-Configuration files:
-$config_files
-
-Report bugs to <bug-autoconf@gnu.org>."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.62,
- with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2008 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
-test -n "\$AWK" || AWK=awk
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=*)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- *)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- esac
-
- case $ac_option in
- # Handling of the options.
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
- --debug | --debu | --deb | --de | --d | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
- ac_need_defaults=false;;
- --he | --h | --help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { $as_echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1"
- ac_need_defaults=false ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
- shift
- \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
- CONFIG_SHELL='$SHELL'
- export CONFIG_SHELL
- exec "\$@"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
- $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
- case $ac_config_target in
- "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-
- *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
- tmp=
- trap 'exit_status=$?
- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./conf$$-$RANDOM
- (umask 077 && mkdir "$tmp")
-} ||
-{
- $as_echo "$as_me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=' '
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\\r'
-else
- ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
-_ACEOF
-
-
-{
- echo "cat >conf$$subs.awk <<_ACEOF" &&
- echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
- echo "_ACEOF"
-} >conf$$subs.sh ||
- { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
- . ./conf$$subs.sh ||
- { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
-
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` = $ac_delim_num; then
- break
- elif $ac_last_try; then
- { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
- else
- ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
- fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\).*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\).*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
- N
- s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
- for (key in S) S_is_set[key] = 1
- FS = ""
-
-}
-{
- line = $ 0
- nfields = split(line, field, "@")
- substed = 0
- len = length(field[1])
- for (i = 2; i < nfields; i++) {
- key = field[i]
- keylen = length(key)
- if (S_is_set[key]) {
- value = S[key]
- line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
- len += length(value) + length(field[++i])
- substed = 1
- } else
- len += 1 + keylen
- }
-
- print line
-}
-
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
- sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
- cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
- || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
-$as_echo "$as_me: error: could not setup config files machinery" >&2;}
- { (exit 1); exit 1; }; }
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[ ]*\):*/\1/
-s/:*$//
-s/^[^=]*=[ ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
-
-
-eval set X " :F $CONFIG_FILES "
-shift
-for ac_tag
-do
- case $ac_tag in
- :[FHLC]) ac_mode=$ac_tag; continue;;
- esac
- case $ac_mode$ac_tag in
- :[FHL]*:*);;
- :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
-$as_echo "$as_me: error: Invalid tag $ac_tag." >&2;}
- { (exit 1); exit 1; }; };;
- :[FH]-) ac_tag=-:-;;
- :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
- esac
- ac_save_IFS=$IFS
- IFS=:
- set x $ac_tag
- IFS=$ac_save_IFS
- shift
- ac_file=$1
- shift
-
- case $ac_mode in
- :L) ac_source=$1;;
- :[FH])
- ac_file_inputs=
- for ac_f
- do
- case $ac_f in
- -) ac_f="$tmp/stdin";;
- *) # Look for the file first in the build tree, then in the source tree
- # (if the path is not absolute). The absolute path cannot be DOS-style,
- # because $ac_f cannot contain `:'.
- test -f "$ac_f" ||
- case $ac_f in
- [\\/$]*) false;;
- *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
- esac ||
- { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
- { (exit 1); exit 1; }; };;
- esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
- ac_file_inputs="$ac_file_inputs '$ac_f'"
- done
-
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
- `' by configure.'
- if test x"$ac_file" != x-; then
- configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
- fi
- # Neutralize special characters interpreted by sed in replacement strings.
- case $configure_input in #(
- *\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
- sed 's/[\\\\&|]/\\\\&/g'`;; #(
- *) ac_sed_conf_input=$configure_input;;
- esac
-
- case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin" \
- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
- { (exit 1); exit 1; }; } ;;
- esac
- ;;
- esac
-
- ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- { as_dir="$ac_dir"
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
- { (exit 1); exit 1; }; }; }
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
- case $ac_mode in
- :F)
- #
- # CONFIG_FILE
- #
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
- esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-
-ac_sed_dataroot='
-/datarootdir/ {
- p
- q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p
-'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_datarootdir_hack='
- s&@datadir@&$datadir&g
- s&@docdir@&$docdir&g
- s&@infodir@&$infodir&g
- s&@localedir@&$localedir&g
- s&@mandir@&$mandir&g
- s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
- { (exit 1); exit 1; }; }
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&2;}
-
- rm -f "$tmp/stdin"
- case $ac_file in
- -) cat "$tmp/out" && rm -f "$tmp/out";;
- *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
- esac \
- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
- { (exit 1); exit 1; }; }
- ;;
-
-
-
- esac
-
-done # for ac_tag
-
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-test $ac_write_fail = 0 ||
- { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || { (exit 1); exit 1; }
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:$LINENO: WARNING: Unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
-
diff --git a/winsup/utils/configure.in b/winsup/utils/configure.in
deleted file mode 100644
index d38a4b1..0000000
--- a/winsup/utils/configure.in
+++ /dev/null
@@ -1,31 +0,0 @@
-dnl Autoconf configure script for Cygwin utilities.
-dnl Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
-dnl
-dnl This file is part of Cygwin.
-dnl
-dnl This software is a copyrighted work licensed under the terms of the
-dnl Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-dnl details.
-
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.59)
-AC_INIT(mount.cc)
-AC_CONFIG_AUX_DIR(../..)
-
-AC_CANONICAL_SYSTEM
-
-LIB_AC_PROG_CC
-LIB_AC_PROG_CXX
-
-AC_ARG_PROGRAM
-
-AC_CHECK_LIB(iconv, libiconv, libiconv=-liconv)
-AC_SUBST(libiconv)
-
-INSTALL="/bin/sh "`cd $srcdir/../..; echo $(pwd)/install-sh -c`
-
-AC_PROG_INSTALL
-
-AC_EXEEXT
-AC_OUTPUT(Makefile)
diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc
deleted file mode 100644
index 9a04cb4..0000000
--- a/winsup/utils/cygcheck.cc
+++ /dev/null
@@ -1,2182 +0,0 @@
-/* cygcheck.cc
-
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008 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 cygwin_internal cygwin_internal_dontuse
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <sys/time.h>
-#include <ctype.h>
-#include <io.h>
-#include <windows.h>
-#include <wininet.h>
-#include "path.h"
-#include <getopt.h>
-#include "cygwin/include/sys/cygwin.h"
-#include "cygwin/include/mntent.h"
-#undef cygwin_internal
-
-#define alloca __builtin_alloca
-
-int verbose = 0;
-int registry = 0;
-int sysinfo = 0;
-int givehelp = 0;
-int keycheck = 0;
-int check_setup = 0;
-int dump_only = 0;
-int find_package = 0;
-int list_package = 0;
-int grep_packages = 0;
-
-static char emptystr[] = "";
-
-/* This is global because it's used in both internet_display_error as well
- as package_grep. */
-BOOL (WINAPI *pInternetCloseHandle) (HINTERNET);
-
-#ifdef __GNUC__
-typedef long long longlong;
-#else
-typedef __int64 longlong;
-#endif
-
-/* In dump_setup.cc */
-void dump_setup (int, char **, bool);
-void package_find (int, char **);
-void package_list (int, char **);
-/* In bloda.cc */
-void dump_dodgy_apps (int verbose);
-
-
-static const char version[] = "$Revision$";
-
-static const char *known_env_vars[] = {
- "c_include_path",
- "compiler_path",
- "cxx_include_path",
- "cygwin",
- "cygwin32",
- "dejagnu",
- "expect",
- "gcc_default_options",
- "gcc_exec_prefix",
- "home",
- "ld_library_path",
- "library_path",
- "login",
- "lpath",
- "make_mode",
- "makeflags",
- "path",
- "pwd",
- "strace",
- "tcl_library",
- "user",
- 0
-};
-
-struct
-{
- const char *name;
- int missing_is_good;
-}
-static common_apps[] = {
- {"awk", 0},
- {"bash", 0},
- {"cat", 0},
- {"cp", 0},
- {"cpp", 1},
- {"crontab", 0},
- {"find", 0},
- {"gcc", 0},
- {"gdb", 0},
- {"grep", 0},
- {"kill", 0},
- {"ld", 0},
- {"ls", 0},
- {"make", 0},
- {"mv", 0},
- {"patch", 0},
- {"perl", 0},
- {"rm", 0},
- {"sed", 0},
- {"ssh", 0},
- {"sh", 0},
- {"tar", 0},
- {"test", 0},
- {"vi", 0},
- {"vim", 0},
- {0, 0}
-};
-
-static int num_paths, max_paths;
-struct pathlike
-{
- char *dir;
- bool issys;
- void check_existence (const char *fn, int showall, int verbose,
- char* first, const char *ext1 = "",
- const char *ext2 = "");
-};
-
-pathlike *paths;
-int first_nonsys_path;
-
-void
-eprintf (const char *format, ...)
-{
- va_list ap;
- va_start (ap, format);
- vfprintf (stderr, format, ap);
- va_end (ap);
-}
-
-/*
- * display_error() is used to report failure modes
- */
-static int
-display_error (const char *name, bool show_error, bool print_failed)
-{
- fprintf (stderr, "cygcheck: %s", name);
- if (show_error)
- fprintf (stderr, "%s: %lu\n",
- print_failed ? " failed" : "", GetLastError ());
- else
- fprintf (stderr, "%s\n",
- print_failed ? " failed" : "");
- return 1;
-}
-
-static int
-display_error (const char *name)
-{
- return display_error (name, true, true);
-}
-
-static int
-display_error (const char *fmt, const char *x)
-{
- char buf[4000];
- sprintf (buf, fmt, x);
- return display_error (buf, false, false);
-}
-
-static int
-display_error_fmt (const char *fmt, ...)
-{
- char buf[4000];
- va_list va;
-
- va_start (va, fmt);
- vsprintf (buf, fmt, va);
- return display_error (buf, false, false);
-}
-
-/* Display a WinInet error message, and close a variable number of handles.
- (Passed a list of handles terminated by NULL.) */
-static int
-display_internet_error (const char *message, ...)
-{
- DWORD err = GetLastError ();
- TCHAR err_buf[256];
- va_list hptr;
- HINTERNET h;
-
- /* in the case of a successful connection but 404 response, there is no
- win32 error message, but we still get passed a message to display. */
- if (err)
- {
- if (FormatMessage (FORMAT_MESSAGE_FROM_HMODULE,
- GetModuleHandle ("wininet.dll"), err, 0, err_buf,
- sizeof (err_buf), NULL) == 0)
- strcpy (err_buf, "(Unknown error)");
-
- fprintf (stderr, "cygcheck: %s: %s (win32 error %lu)\n", message,
- err_buf, err);
- }
- else
- fprintf (stderr, "cygcheck: %s\n", message);
-
- va_start (hptr, message);
- while ((h = va_arg (hptr, HINTERNET)) != 0)
- pInternetCloseHandle (h);
- va_end (hptr);
-
- return 1;
-}
-
-static void
-add_path (char *s, int maxlen, bool issys)
-{
- if (num_paths >= max_paths)
- {
- max_paths += 10;
- /* Extend path array */
- paths = (pathlike *) realloc (paths, (1 + max_paths) * sizeof (paths[0]));
- }
-
- pathlike *pth = paths + num_paths;
-
- /* Allocate space for directory in path list */
- char *dir = (char *) calloc (maxlen + 2, sizeof (char));
- if (dir == NULL)
- {
- display_error ("add_path: calloc() failed");
- return;
- }
-
- /* Copy input directory to path list */
- memcpy (dir, s, maxlen);
-
- /* Add a trailing slash by default */
- char *e = strchr (dir, '\0');
- if (e != dir && e[-1] != '\\')
- strcpy (e, "\\");
-
- /* Fill out this element */
- pth->dir = dir;
- pth->issys = issys;
- pth[1].dir = NULL;
- num_paths++;
-}
-
-static void
-init_paths ()
-{
- char tmp[4000], *sl;
- add_path ((char *) ".", 1, true); /* to be replaced later */
-
- if (GetCurrentDirectory (4000, tmp))
- add_path (tmp, strlen (tmp), true);
- else
- display_error ("init_paths: GetCurrentDirectory()");
-
- if (GetSystemDirectory (tmp, 4000))
- add_path (tmp, strlen (tmp), true);
- else
- display_error ("init_paths: GetSystemDirectory()");
- sl = strrchr (tmp, '\\');
- if (sl)
- {
- strcpy (sl, "\\SYSTEM");
- add_path (tmp, strlen (tmp), true);
- }
- GetWindowsDirectory (tmp, 4000);
- add_path (tmp, strlen (tmp), true);
-
- char *wpath = getenv ("PATH");
- if (!wpath)
- display_error ("WARNING: PATH is not set\n", "");
- else
- {
- char *b, *e;
- b = wpath;
- while (1)
- {
- for (e = b; *e && *e != ';'; e++)
- continue; /* loop terminates at first ';' or EOS */
- if (strncmp(b, ".\\", 2) != 0)
- add_path (b, e - b, false);
- if (!*e)
- break;
- b = e + 1;
- }
- }
-}
-
-#define LINK_EXTENSION ".lnk"
-
-void
-pathlike::check_existence (const char *fn, int showall, int verbose,
- char* first, const char *ext1, const char *ext2)
-{
- char file[4000];
- strcpy (file, dir);
- strcat (file, fn);
- strcat (file, ext1);
- strcat (file, ext2);
-
- if (GetFileAttributes (file) != (DWORD) - 1)
- {
- char *lastdot = strrchr (file, '.');
- bool is_link = lastdot && !strcmp (lastdot, LINK_EXTENSION);
- // If file is a link, fix up the extension before printing
- if (is_link)
- *lastdot = '\0';
- if (showall)
- printf ("Found: %s\n", file);
- if (verbose && *first != '\0' && strcasecmp (first, file) != 0)
- {
- char *flastdot = strrchr (first, '.');
- bool f_is_link = flastdot && !strcmp (flastdot, LINK_EXTENSION);
- // if first is a link, fix up the extension before printing
- if (f_is_link)
- *flastdot = '\0';
- printf ("Warning: %s hides %s\n", first, file);
- if (f_is_link)
- *flastdot = '.';
- }
- if (is_link)
- *lastdot = '.';
- if (!*first)
- strcpy (first, file);
- }
-}
-
-static const char *
-find_on_path (const char *in_file, const char *ext, bool showall = false,
- bool search_sys = false, bool checklinks = false)
-{
- static char rv[4000];
-
- /* Sort of a kludge but we've already tested this once, so don't try it again */
- if (in_file == rv)
- return in_file;
-
- static pathlike abspath[2] =
- {
- {emptystr, 0},
- {NULL, 0}
- };
-
- *rv = '\0';
- if (!in_file)
- {
- display_error ("internal error find_on_path: NULL pointer for file", false, false);
- return 0;
- }
-
- if (!ext)
- {
- display_error ("internal error find_on_path: NULL pointer for default_extension", false, false);
- return 0;
- }
-
- const char *file;
- pathlike *search_paths;
- if (!strpbrk (in_file, ":/\\"))
- {
- file = in_file;
- search_paths = paths;
- }
- else
- {
- file = cygpath (in_file, NULL);
- search_paths = abspath;
- showall = false;
- }
-
- if (!file)
- {
- display_error ("internal error find_on_path: cygpath conversion failed for %s\n", in_file);
- return 0;
- }
-
- char *hasext = strrchr (file, '.');
- if (hasext && !strpbrk (hasext, "/\\"))
- ext = "";
-
- for (pathlike *pth = search_paths; pth->dir; pth++)
- if (!pth->issys || search_sys)
- {
- pth->check_existence (file, showall, verbose, rv, ext);
-
- if (checklinks)
- pth->check_existence (file, showall, verbose, rv, ext, LINK_EXTENSION);
-
- if (!*ext)
- continue;
-
- pth->check_existence (file, showall, verbose, rv);
- if (checklinks)
- pth->check_existence (file, showall, verbose, rv, LINK_EXTENSION);
- }
-
- return *rv ? rv : NULL;
-}
-
-#define DID_NEW 1
-#define DID_ACTIVE 2
-#define DID_INACTIVE 3
-
-struct Did
-{
- Did *next;
- char *file;
- int state;
-};
-static Did *did = 0;
-
-static Did *
-already_did (const char *file)
-{
- Did *d;
- for (d = did; d; d = d->next)
- if (strcasecmp (d->file, file) == 0)
- return d;
- d = (Did *) malloc (sizeof (Did));
- d->file = strdup (file);
- d->next = did;
- d->state = DID_NEW;
- did = d;
- return d;
-}
-
-struct Section
-{
- char name[8];
- int virtual_size;
- int virtual_address;
- int size_of_raw_data;
- int pointer_to_raw_data;
-};
-
-static int
-rva_to_offset (int rva, char *sections, int nsections, int *sz)
-{
- int i;
-
- if (sections == NULL)
- {
- display_error ("rva_to_offset: NULL passed for sections", true, false);
- return 0;
- }
-
- for (i = 0; i < nsections; i++)
- {
- Section *s = (Section *) (sections + i * 40);
-#if 0
- printf ("%08x < %08x < %08x ? %08x\n",
- s->virtual_address, rva,
- s->virtual_address + s->virtual_size, s->pointer_to_raw_data);
-#endif
- if (rva >= s->virtual_address
- && rva < s->virtual_address + s->virtual_size)
- {
- if (sz)
- *sz = s->virtual_address + s->virtual_size - rva;
- return rva - s->virtual_address + s->pointer_to_raw_data;
- }
- }
- return 0; /* punt */
-}
-
-struct ExpDirectory
-{
- int flags;
- int timestamp;
- short major_ver;
- short minor_ver;
- int name_rva;
-};
-
-struct ImpDirectory
-{
- unsigned characteristics;
- unsigned timestamp;
- unsigned forwarder_chain;
- unsigned name_rva;
- unsigned iat_rva;
-};
-
-static bool track_down (const char *file, const char *suffix, int lvl);
-
-#define CYGPREFIX (sizeof ("%%% Cygwin ") - 1)
-static void
-cygwin_info (HANDLE h)
-{
- char *buf, *bufend, *buf_start = NULL;
- const char *hello = " Cygwin DLL version info:\n";
- DWORD size = GetFileSize (h, NULL);
- DWORD n;
-
- if (size == 0xffffffff)
- return;
-
- buf_start = buf = (char *) calloc (1, size + 1);
- if (buf == NULL)
- {
- display_error ("cygwin_info: calloc()");
- return;
- }
-
- (void) SetFilePointer (h, 0, NULL, FILE_BEGIN);
- if (!ReadFile (h, buf, size, &n, NULL))
- {
- free (buf_start);
- return;
- }
-
- static char dummy[] = "\0\0\0\0\0\0\0";
- char *dll_major = dummy;
- bufend = buf + size;
- while (buf < bufend)
- if ((buf = (char *) memchr (buf, '%', bufend - buf)) == NULL)
- break;
- else if (strncmp ("%%% Cygwin ", buf, CYGPREFIX) != 0)
- buf++;
- else
- {
- char *p = strchr (buf += CYGPREFIX, '\n');
- if (!p)
- break;
- if (strncasecmp (buf, "dll major:", 10) == 0)
- {
- dll_major = buf + 11;
- continue;
- }
- char *s, pbuf[80];
- int len;
- len = 1 + p - buf;
- if (strncasecmp (buf, "dll minor:", 10) != 0)
- s = buf;
- else
- {
- char c = dll_major[1];
- dll_major[1] = '\0';
- int maj = atoi (dll_major);
- dll_major[1] = c;
- int min = atoi (dll_major + 1);
- sprintf (pbuf, "DLL version: %d.%d.%.*s", maj, min, len - 11,
- buf + 11);
- len = strlen (s = pbuf);
- }
- if (strncmp (s, "dll", 3) == 0)
- memcpy (s, "DLL", 3);
- else if (strncmp (s, "api", 3) == 0)
- memcpy (s, "API", 3);
- else if (islower (*s))
- *s = toupper (*s);
- fprintf (stdout, "%s %.*s", hello, len, s);
- hello = "";
- }
-
- if (!*hello)
- puts ("");
-
- free (buf_start);
- return;
-}
-
-static void
-dll_info (const char *path, HANDLE fh, int lvl, int recurse)
-{
- DWORD junk;
- int i;
- int pe_header_offset = get_dword (fh, 0x3c);
- if (GetLastError () != NO_ERROR)
- display_error ("get_dword");
- int opthdr_ofs = pe_header_offset + 4 + 20;
- unsigned short v[6];
-
- if (path == NULL)
- {
- display_error ("dll_info: NULL passed for path", true, false);
- return;
- }
-
- if (SetFilePointer (fh, opthdr_ofs + 40, 0, FILE_BEGIN) ==
- INVALID_SET_FILE_POINTER && GetLastError () != NO_ERROR)
- display_error ("dll_info: SetFilePointer()");
-
- if (!ReadFile (fh, &v, sizeof (v), &junk, 0))
- display_error ("dll_info: Readfile()");
-
- if (verbose)
- printf (" - os=%d.%d img=%d.%d sys=%d.%d\n",
- v[0], v[1], v[2], v[3], v[4], v[5]);
- else
- printf ("\n");
-
- int num_entries = get_dword (fh, opthdr_ofs + 92);
- if (GetLastError () != NO_ERROR)
- display_error ("get_dword");
- int export_rva = get_dword (fh, opthdr_ofs + 96);
- if (GetLastError () != NO_ERROR)
- display_error ("get_dword");
- int export_size = get_dword (fh, opthdr_ofs + 100);
- if (GetLastError () != NO_ERROR)
- display_error ("get_dword");
- int import_rva = get_dword (fh, opthdr_ofs + 104);
- if (GetLastError () != NO_ERROR)
- display_error ("get_dword");
- int import_size = get_dword (fh, opthdr_ofs + 108);
- if (GetLastError () != NO_ERROR)
- display_error ("get_dword");
-
- int nsections = get_word (fh, pe_header_offset + 4 + 2);
- if (nsections == -1)
- display_error ("get_word");
- char *sections = (char *) malloc (nsections * 40);
-
- if (SetFilePointer (fh, pe_header_offset + 4 + 20 +
- get_word (fh, pe_header_offset + 4 + 16), 0,
- FILE_BEGIN) == INVALID_SET_FILE_POINTER
- && GetLastError () != NO_ERROR)
- display_error ("dll_info: SetFilePointer()");
-
- if (!ReadFile (fh, sections, nsections * 40, &junk, 0))
- display_error ("dll_info: Readfile()");
-
- if (verbose && num_entries >= 1 && export_size > 0)
- {
- int expsz;
- int expbase = rva_to_offset (export_rva, sections, nsections, &expsz);
-
- if (expbase)
- {
- if (SetFilePointer (fh, expbase, 0, FILE_BEGIN) ==
- INVALID_SET_FILE_POINTER && GetLastError () != NO_ERROR)
- display_error ("dll_info: SetFilePointer()");
-
- unsigned char *exp = (unsigned char *) malloc (expsz);
-
- if (!ReadFile (fh, exp, expsz, &junk, 0))
- display_error ("dll_info: Readfile()");
-
- ExpDirectory *ed = (ExpDirectory *) exp;
- int ofs = ed->name_rva - export_rva;
- struct tm *tm = localtime ((const time_t *) &(ed->timestamp));
- if (tm->tm_year < 60)
- tm->tm_year += 2000;
- if (tm->tm_year < 200)
- tm->tm_year += 1900;
- printf ("%*c", lvl + 2, ' ');
- printf ("\"%s\" v%d.%d ts=", exp + ofs,
- ed->major_ver, ed->minor_ver);
- printf ("%d/%d/%d %d:%02d\n",
- tm->tm_year, tm->tm_mon + 1, tm->tm_mday,
- tm->tm_hour, tm->tm_min);
- }
- }
-
- if (num_entries >= 2 && import_size > 0 && recurse)
- {
- int impsz;
- int impbase = rva_to_offset (import_rva, sections, nsections, &impsz);
- if (impbase)
- {
- if (SetFilePointer (fh, impbase, 0, FILE_BEGIN) ==
- INVALID_SET_FILE_POINTER && GetLastError () != NO_ERROR)
- display_error ("dll_info: SetFilePointer()");
-
- unsigned char *imp = (unsigned char *) malloc (impsz);
- if (imp == NULL)
- {
- display_error ("dll_info: malloc()");
- return;
- }
-
- if (!ReadFile (fh, imp, impsz, &junk, 0))
- display_error ("dll_info: Readfile()");
-
- ImpDirectory *id = (ImpDirectory *) imp;
- for (i = 0; id[i].name_rva; i++)
- {
- /* int ofs = id[i].name_rva - import_rva; */
- track_down ((char *) imp + id[i].name_rva - import_rva,
- (char *) ".dll", lvl + 2);
- }
- }
- }
- if (strstr (path, "\\cygwin1.dll"))
- cygwin_info (fh);
-}
-
-// Return true on success, false if error printed
-static bool
-track_down (const char *file, const char *suffix, int lvl)
-{
- if (file == NULL)
- {
- display_error ("track_down: NULL passed for file", true, false);
- return false;
- }
-
- if (suffix == NULL)
- {
- display_error ("track_down: NULL passed for suffix", false, false);
- return false;
- }
-
- const char *path = find_on_path (file, suffix, false, true);
- if (!path)
- {
- display_error ("track_down: could not find %s\n", file);
- return false;
- }
-
- Did *d = already_did (file);
- switch (d->state)
- {
- case DID_NEW:
- break;
- case DID_ACTIVE:
- if (verbose)
- {
- if (lvl)
- printf ("%*c", lvl, ' ');
- printf ("%s", path);
- printf (" (recursive)\n");
- }
- return true;
- case DID_INACTIVE:
- if (verbose)
- {
- if (lvl)
- printf ("%*c", lvl, ' ');
- printf ("%s", path);
- printf (" (already done)\n");
- }
- return true;
- default:
- break;
- }
-
- if (lvl)
- printf ("%*c", lvl, ' ');
-
- if (!path)
- {
- display_error ("file not found - '%s'\n", file);
- return false;
- }
-
- printf ("%s", path);
-
- HANDLE fh =
- CreateFile (path, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE,
- NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
- if (fh == INVALID_HANDLE_VALUE)
- {
- display_error ("cannot open - '%s'\n", path);
- return false;
- }
-
- d->state = DID_ACTIVE;
-
- if (is_exe (fh))
- dll_info (path, fh, lvl, 1);
- else if (is_symlink (fh))
- display_error ("%s is a symlink instead of a DLL\n", path);
- else
- {
- int magic = get_word (fh, 0x0);
- if (magic == -1)
- display_error ("get_word");
- magic &= 0x00FFFFFF;
- display_error_fmt ("%s is not a DLL: magic number %x (%d) '%s'\n",
- path, magic, magic, (char *)&magic);
- }
-
- d->state = DID_INACTIVE;
- if (!CloseHandle (fh))
- display_error ("track_down: CloseHandle()");
- return true;
-}
-
-static void
-ls (char *f)
-{
- HANDLE h = CreateFile (f, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE,
- 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
- BY_HANDLE_FILE_INFORMATION info;
-
- if (!GetFileInformationByHandle (h, &info))
- display_error ("ls: GetFileInformationByHandle()");
-
- SYSTEMTIME systime;
-
- if (!FileTimeToSystemTime (&info.ftLastWriteTime, &systime))
- display_error ("ls: FileTimeToSystemTime()");
- printf ("%5dk %04d/%02d/%02d %s",
- (((int) info.nFileSizeLow) + 512) / 1024,
- systime.wYear, systime.wMonth, systime.wDay, f);
- dll_info (f, h, 16, 0);
- if (!CloseHandle (h))
- display_error ("ls: CloseHandle()");
-}
-
-/* Remove filename from 's' and return directory name without trailing
- backslash, or NULL if 's' doesn't seem to have a dirname. */
-static char *
-dirname (const char *s)
-{
- static char buf[MAX_PATH];
-
- if (!s)
- return NULL;
-
- strncpy (buf, s, MAX_PATH);
- buf[MAX_PATH - 1] = '\0'; // in case strlen(s) > MAX_PATH
- char *lastsep = strrchr (buf, '\\');
- if (!lastsep)
- return NULL; // no backslash -> no dirname
- else if (lastsep - buf <= 2 && buf[1] == ':')
- lastsep[1] = '\0'; // can't remove backslash of "x:\"
- else
- *lastsep = '\0';
- return buf;
-}
-
-// Find a real application on the path (possibly following symlinks)
-static const char *
-find_app_on_path (const char *app, bool showall = false)
-{
- const char *papp = find_on_path (app, ".exe", showall, false, true);
-
- HANDLE fh =
- CreateFile (papp, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE,
- NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
- if (fh == INVALID_HANDLE_VALUE)
- return NULL;
-
- if (is_symlink (fh))
- {
- static char tmp[SYMLINK_MAX + 1];
- if (!readlink (fh, tmp, SYMLINK_MAX))
- display_error("readlink failed");
-
- /* Resolve the linkname relative to the directory of the link. */
- char *ptr = cygpath_rel (dirname (papp), tmp, NULL);
- printf (" -> %s\n", ptr);
- if (!strchr (ptr, '\\'))
- {
- char *lastsep;
- strncpy (tmp, cygpath (papp, NULL), SYMLINK_MAX);
- lastsep = strrchr (tmp, '\\');
- strncpy (lastsep+1, ptr, SYMLINK_MAX - (lastsep-tmp));
- ptr = tmp;
- }
- if (!CloseHandle (fh))
- display_error ("find_app_on_path: CloseHandle()");
- /* FIXME: We leak the ptr returned by cygpath() here which is a
- malloc()d string. */
- return find_app_on_path (ptr, showall);
- }
-
- if (!CloseHandle (fh))
- display_error ("find_app_on_path: CloseHandle()");
- return papp;
-}
-
-// Return true on success, false if error printed
-static bool
-cygcheck (const char *app)
-{
- const char *papp = find_app_on_path (app, 1);
- if (!papp)
- {
- display_error ("could not find '%s'\n", app);
- return false;
- }
-
- char *s;
- char *sep = strpbrk (papp, ":/\\");
- if (!sep)
- {
- static char dot[] = ".";
- s = dot;
- }
- else
- {
- int n = sep - papp;
- s = (char *) malloc (n + 2);
- memcpy ((char *) s, papp, n);
- strcpy (s + n, "\\");
- }
-
- paths[0].dir = s;
- did = NULL;
- return track_down (papp, ".exe", 0);
-}
-
-struct RegInfo
-{
- RegInfo *prev;
- char *name;
- HKEY key;
-};
-
-static void
-show_reg (RegInfo * ri, int nest)
-{
- if (!ri)
- return;
- show_reg (ri->prev, 1);
- if (nest)
- printf ("%s\\", ri->name);
- else
- printf ("%s\n", ri->name);
-}
-
-static void
-scan_registry (RegInfo * prev, HKEY hKey, char *name, int cygnus)
-{
- RegInfo ri;
- ri.prev = prev;
- ri.name = name;
- ri.key = hKey;
-
- char *cp;
- for (cp = name; *cp; cp++)
- if (strncasecmp (cp, "cygnus", 6) == 0)
- cygnus = 1;
-
- DWORD num_subkeys, max_subkey_len, num_values;
- DWORD max_value_len, max_valdata_len, i;
- if (RegQueryInfoKey (hKey, 0, 0, 0, &num_subkeys, &max_subkey_len, 0,
- &num_values, &max_value_len, &max_valdata_len, 0, 0)
- != ERROR_SUCCESS)
- {
-#if 0
- char tmp[400];
- FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM, 0, GetLastError (),
- MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), tmp, 400, 0);
- printf ("RegQueryInfoKey: %s\n", tmp);
-#endif
- return;
- }
-
- if (cygnus)
- {
- show_reg (&ri, 0);
-
- char *value_name = (char *) malloc (max_value_len + 1);
- if (value_name == NULL)
- {
- display_error ("scan_registry: malloc()");
- return;
- }
-
- char *value_data = (char *) malloc (max_valdata_len + 1);
- if (value_data == NULL)
- {
- display_error ("scan_registry: malloc()");
- return;
- }
-
- for (i = 0; i < num_values; i++)
- {
- DWORD dlen = max_valdata_len + 1;
- DWORD nlen = max_value_len + 1;
- DWORD type;
- RegEnumValue (hKey, i, value_name, &nlen, 0,
- &type, (BYTE *) value_data, &dlen);
- {
- printf (" %s = ", i ? value_name : "(default)");
- switch (type)
- {
- case REG_DWORD:
- printf ("0x%08x\n", *(unsigned *) value_data);
- break;
- case REG_EXPAND_SZ:
- case REG_SZ:
- printf ("'%s'\n", value_data);
- break;
- default:
- printf ("(unsupported type)\n");
- break;
- }
- }
- }
- free (value_name);
- free (value_data);
- }
-
- char *subkey_name = (char *) malloc (max_subkey_len + 1);
- for (i = 0; i < num_subkeys; i++)
- {
- if (RegEnumKey (hKey, i, subkey_name, max_subkey_len + 1) ==
- ERROR_SUCCESS)
- {
- HKEY sKey;
- if (RegOpenKeyEx (hKey, subkey_name, 0, KEY_READ, &sKey)
- == ERROR_SUCCESS)
- {
- scan_registry (&ri, sKey, subkey_name, cygnus);
- if (RegCloseKey (sKey) != ERROR_SUCCESS)
- display_error ("scan_registry: RegCloseKey()");
- }
- }
- }
- free (subkey_name);
-}
-
-void
-pretty_id (const char *s, char *cygwin, size_t cyglen)
-{
- char *groups[16384];
-
- strcpy (cygwin + cyglen++, " ");
- strcpy (cygwin + cyglen, s);
- putenv (cygwin);
-
- char *id = cygpath ("/bin/id.exe", NULL);
- for (char *p = id; (p = strchr (p, '/')); p++)
- *p = '\\';
-
- if (access (id, X_OK))
- {
- fprintf (stderr, "'id' program not found\n");
- return;
- }
-
- FILE *f = popen (id, "rt");
-
- char buf[16384];
- buf[0] = '\0';
- fgets (buf, sizeof (buf), f);
- pclose (f);
- char *uid = strtok (buf, ")");
- if (uid)
- uid += strlen ("uid=");
- else
- {
- fprintf (stderr, "garbled output from 'id' command - no uid= found\n");
- return;
- }
- char *gid = strtok (NULL, ")");
- if (gid)
- gid += strlen ("gid=") + 1;
- else
- {
- fprintf (stderr, "garbled output from 'id' command - no gid= found\n");
- return;
- }
-
- char **ng = groups - 1;
- size_t len_uid = strlen ("UID: )") + strlen (uid);
- size_t len_gid = strlen ("GID: )") + strlen (gid);
- *++ng = groups[0] = (char *) alloca (len_uid + 1);
- *++ng = groups[1] = (char *) alloca (len_gid + 1);
- sprintf (groups[0], "UID: %s)", uid);
- sprintf (groups[1], "GID: %s)", gid);
- size_t sz = max (len_uid, len_gid);
- while ((*++ng = strtok (NULL, ",")))
- {
- char *p = strchr (*ng, '\n');
- if (p)
- *p = '\0';
- if (ng == groups + 2)
- *ng += strlen (" groups=");
- size_t len = strlen (*ng);
- if (sz < len)
- sz = len;
- }
- ng--;
-
- printf ("\nOutput from %s (%s)\n", id, s);
- int n = 80 / (int) ++sz;
- int i = n > 2 ? n - 2 : 0;
- sz = -sz;
- for (char **g = groups; g <= ng; g++)
- if ((g != ng) && (++i < n))
- printf ("%*s", sz, *g);
- else
- {
- puts (*g);
- i = 0;
- }
-}
-
-/* This dumps information about each installed cygwin service, if cygrunsrv
- is available. */
-void
-dump_sysinfo_services ()
-{
- char buf[1024];
- char buf2[1024];
- FILE *f;
- bool no_services = false;
-
- if (givehelp)
- printf ("\nChecking for any Cygwin services... %s\n\n",
- verbose ? "" : "(use -v for more detail)");
- else
- fputc ('\n', stdout);
-
- /* find the location of cygrunsrv.exe */
- char *cygrunsrv = cygpath ("/bin/cygrunsrv.exe", NULL);
- for (char *p = cygrunsrv; (p = strchr (p, '/')); p++)
- *p = '\\';
-
- if (access (cygrunsrv, X_OK))
- {
- puts ("Can't find the cygrunsrv utility, skipping services check.\n");
- return;
- }
-
- /* check for a recent cygrunsrv */
- snprintf (buf, sizeof (buf), "%s --version", cygrunsrv);
- if ((f = popen (buf, "rt")) == NULL)
- {
- printf ("Failed to execute '%s', skipping services check.\n", buf);
- return;
- }
- int maj, min;
- int ret = fscanf (f, "cygrunsrv V%u.%u", &maj, &min);
- if (ferror (f) || feof (f) || ret == EOF || maj < 1 || min < 10)
- {
- puts ("The version of cygrunsrv installed is too old to dump service info.\n");
- return;
- }
- fclose (f);
-
- /* For verbose mode, just run cygrunsrv --list --verbose and copy output
- verbatim; otherwise run cygrunsrv --list and then cygrunsrv --query for
- each service. */
- snprintf (buf, sizeof (buf), (verbose ? "%s --list --verbose" : "%s --list"),
- cygrunsrv);
- if ((f = popen (buf, "rt")) == NULL)
- {
- printf ("Failed to execute '%s', skipping services check.\n", buf);
- return;
- }
-
- if (verbose)
- {
- /* copy output to stdout */
- size_t nchars = 0;
- while (!feof (f) && !ferror (f))
- nchars += fwrite ((void *) buf, 1,
- fread ((void *) buf, 1, sizeof (buf), f), stdout);
-
- /* cygrunsrv outputs nothing if there are no cygwin services found */
- if (nchars < 1)
- no_services = true;
- pclose (f);
- }
- else
- {
- /* read the output of --list, and then run --query for each service */
- size_t nchars = fread ((void *) buf, 1, sizeof (buf) - 1, f);
- buf[nchars] = 0;
- pclose (f);
-
- if (nchars > 0)
- for (char *srv = strtok (buf, "\n"); srv; srv = strtok (NULL, "\n"))
- {
- snprintf (buf2, sizeof (buf2), "%s --query %s", cygrunsrv, srv);
- if ((f = popen (buf2, "rt")) == NULL)
- {
- printf ("Failed to execute '%s', skipping services check.\n", buf2);
- return;
- }
-
- /* copy output to stdout */
- while (!feof (f) && !ferror (f))
- fwrite ((void *) buf2, 1,
- fread ((void *) buf2, 1, sizeof (buf2), f), stdout);
- pclose (f);
- }
- else
- no_services = true;
- }
-
- /* inform the user if nothing found */
- if (no_services)
- puts ("No Cygwin services found.\n");
-}
-
-static void
-dump_sysinfo ()
-{
- int i, j;
- char tmp[4000];
- time_t now;
- char *found_cygwin_dll;
- bool is_nt = false;
- bool more_info = true;
- char osname[80];
-
- printf ("\nCygwin Configuration Diagnostics\n");
- time (&now);
- printf ("Current System Time: %s\n", ctime (&now));
-
- OSVERSIONINFOEX osversion;
- osversion.dwOSVersionInfoSize = sizeof (OSVERSIONINFOEX);
- if (!GetVersionEx (reinterpret_cast<LPOSVERSIONINFO>(&osversion)))
- {
- more_info = false;
- osversion.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
- if (!GetVersionEx (reinterpret_cast<LPOSVERSIONINFO>(&osversion)))
- display_error ("dump_sysinfo: GetVersionEx()");
- }
-
- HMODULE k32 = LoadLibrary ("kernel32.dll");
-
- switch (osversion.dwPlatformId)
- {
- case VER_PLATFORM_WIN32s:
- strcpy (osname, "32s (not supported)");
- break;
- case VER_PLATFORM_WIN32_WINDOWS:
- strcpy (osname, "95/98/Me (not supported)");
- break;
- case VER_PLATFORM_WIN32_NT:
- is_nt = true;
- if (osversion.dwMajorVersion == 6)
- {
- BOOL (WINAPI *GetProductInfo) (DWORD, DWORD, DWORD, DWORD, PDWORD) =
- (BOOL (WINAPI *)(DWORD, DWORD, DWORD, DWORD, PDWORD))
- GetProcAddress (k32, "GetProductInfo");
- if (osversion.wProductType == VER_NT_WORKSTATION)
- strcpy (osname, "Vista");
- else
- strcpy (osname, "2008");
- DWORD prod;
- if (GetProductInfo (osversion.dwMajorVersion,
- osversion.dwMinorVersion,
- osversion.wServicePackMajor,
- osversion.wServicePackMinor,
- &prod))
- {
-#define PRODUCT_UNLICENSED 0xabcdabcd
-#define PRODUCT_SMALLBUSINESS_SERVER_PREMIUM 0x19
- const char *products[] =
- {
- "",
- " Ultimate Edition",
- " Home Basic Edition",
- " Home Premium Edition",
- " Enterprise Edition",
- " Home Basic N Edition",
- " Business Edition",
- " Server Standard Edition",
- " Server Datacenter Edition",
- " Small Business Server",
- " Server Enterprise Edition",
- " Starter Edition",
- " Server Datacenter Edition Core",
- " Server Standard Edition Core",
- " Server Enterprise Edition Core",
- " Server Enterprise Edition for Itanium-based Systems",
- " Business N Edition",
- " Web Server Edition",
- " Cluster Server Edition",
- " Home Server Edition",
- " Storage Server Express Edition",
- " Storage Server Standard Edition",
- " Storage Server Workgroup Edition",
- " Storage Server Enterprise Edition",
- " Server for Small Business Edition",
- " Small Business Server Premium Edition"
- };
- if (prod == PRODUCT_UNLICENSED)
- strcat (osname, "Unlicensed");
- else if (prod > PRODUCT_SMALLBUSINESS_SERVER_PREMIUM)
- strcat (osname, "");
- else
- strcat (osname, products[prod]);
- }
- else
- {
- }
- }
- else if (osversion.dwMajorVersion == 5)
- {
- if (osversion.dwMinorVersion == 0)
- {
- strcpy (osname, "2000");
- if (osversion.wProductType == VER_NT_WORKSTATION)
- strcat (osname, " Professional");
- else if (osversion.wSuiteMask & VER_SUITE_DATACENTER)
- strcat (osname, " Datacenter Server");
- else if (osversion.wSuiteMask & VER_SUITE_ENTERPRISE)
- strcat (osname, " Advanced Server");
- else
- strcat (osname, " Server");
- }
- else if (osversion.dwMinorVersion == 1)
- {
- strcpy (osname, "XP");
- if (GetSystemMetrics (SM_MEDIACENTER))
- strcat (osname, " Media Center Edition");
- else if (GetSystemMetrics (SM_TABLETPC))
- strcat (osname, " Tablet PC Edition");
- else if (GetSystemMetrics (SM_STARTER))
- strcat (osname, " Starter Edition");
- else if (osversion.wSuiteMask & VER_SUITE_PERSONAL)
- strcat (osname, " Home Edition");
- else
- strcat (osname, " Professional");
- }
- else if (osversion.dwMinorVersion == 2)
- {
- strcpy (osname, "2003 Server");
- if (GetSystemMetrics (SM_SERVERR2))
- strcat (osname, " R2");
- if (osversion.wSuiteMask & VER_SUITE_BLADE)
- strcat (osname, " Web Edition");
- else if (osversion.wSuiteMask & VER_SUITE_DATACENTER)
- strcat (osname, " Datacenter Edition");
- else if (osversion.wSuiteMask & VER_SUITE_ENTERPRISE)
- strcat (osname, " Enterprise Edition");
- else if (osversion.wSuiteMask & VER_SUITE_COMPUTE_SERVER)
- strcat (osname, " Compute Cluster Edition");
- }
- }
- else if (osversion.dwMajorVersion == 4)
- {
- strcpy (osname, "NT 4");
- if (more_info)
- {
- if (osversion.wProductType == VER_NT_WORKSTATION)
- strcat (osname, " Workstation");
- else
- {
- strcat (osname, " Server");
- if (osversion.wSuiteMask & VER_SUITE_ENTERPRISE)
- strcat (osname, " Enterprise Edition");
- }
- }
- }
- else
- strcpy (osname, "NT");
- break;
- default:
- strcpy (osname, "??");
- break;
- }
- printf ("Windows %s Ver %lu.%lu Build %lu %s\n", osname,
- osversion.dwMajorVersion, osversion.dwMinorVersion,
- osversion.dwPlatformId == VER_PLATFORM_WIN32_NT ?
- osversion.dwBuildNumber : (osversion.dwBuildNumber & 0xffff),
- osversion.dwPlatformId == VER_PLATFORM_WIN32_NT ?
- osversion.szCSDVersion : "");
-
- if (osversion.dwPlatformId == VER_PLATFORM_WIN32s
- || osversion.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
- exit (EXIT_FAILURE);
-
- BOOL (WINAPI *wow64_func) (HANDLE, PBOOL) = (BOOL (WINAPI *) (HANDLE, PBOOL))
- GetProcAddress (k32, "IsWow64Process");
- BOOL is_wow64 = FALSE;
- if (wow64_func && wow64_func (GetCurrentProcess (), &is_wow64) && is_wow64)
- {
- void (WINAPI *nativinfo) (LPSYSTEM_INFO) = (void (WINAPI *)
- (LPSYSTEM_INFO)) GetProcAddress (k32, "GetNativeSystemInfo");
- SYSTEM_INFO natinfo;
- nativinfo (&natinfo);
- fputs ("\nRunning under WOW64 on ", stdout);
- switch (natinfo.wProcessorArchitecture)
- {
- case PROCESSOR_ARCHITECTURE_IA64:
- puts ("IA64");
- break;
- case PROCESSOR_ARCHITECTURE_AMD64:
- puts ("AMD64");
- break;
- default:
- puts("??");
- break;
- }
- }
-
- if (GetSystemMetrics (SM_REMOTESESSION))
- printf ("\nRunning in Terminal Service session\n");
-
- printf ("\nPath:");
- char *s = getenv ("PATH"), *e;
- if (!s)
- puts ("");
- else
- {
- char sep = strchr (s, ';') ? ';' : ':';
- int count_path_items = 0;
- while (1)
- {
- for (e = s; *e && *e != sep; e++);
- if (e-s)
- printf ("\t%.*s\n", e - s, s);
- else
- puts ("\t.");
- count_path_items++;
- if (!*e)
- break;
- s = e + 1;
- }
- }
-
- fflush (stdout);
-
- char *cygwin = getenv ("CYGWIN");
- if (cygwin)
- cygwin -= strlen ("CYGWIN=");
- else
- cygwin = const_cast <char *> ("CYGWIN=");
- size_t cyglen = strlen (cygwin);
- cygwin = strcpy ((char *) malloc (cyglen + sizeof (" nontsec")), cygwin);
- pretty_id ("nontsec", cygwin, cyglen);
- pretty_id ("ntsec", cygwin, cyglen);
- cygwin[cyglen] = 0;
- putenv (cygwin);
-
- if (!GetSystemDirectory (tmp, 4000))
- display_error ("dump_sysinfo: GetSystemDirectory()");
- printf ("\nSysDir: %s\n", tmp);
-
- GetWindowsDirectory (tmp, 4000);
- printf ("WinDir: %s\n\n", tmp);
-
-
- if (givehelp)
- printf ("Here's some environment variables that may affect cygwin:\n");
- for (i = 0; environ[i]; i++)
- {
- char *eq = strchr (environ[i], '=');
- if (!eq)
- continue;
- /* int len = eq - environ[i]; */
- for (j = 0; known_env_vars[j]; j++)
- {
- *eq = 0;
- if (strcmp (environ[i], "PATH") == 0)
- continue; /* we handle this one specially */
- if (strcasecmp (environ[i], known_env_vars[j]) == 0)
- printf ("%s = '%s'\n", environ[i], eq + 1);
- *eq = '=';
- }
- }
- printf ("\n");
-
- if (verbose)
- {
- if (givehelp)
- printf ("Here's the rest of your environment variables:\n");
- for (i = 0; environ[i]; i++)
- {
- int found = 0;
- char *eq = strchr (environ[i], '=');
- if (!eq)
- continue;
- /* int len = eq - environ[i]; */
- for (j = 0; known_env_vars[j]; j++)
- {
- *eq = 0;
- if (strcasecmp (environ[i], known_env_vars[j]) == 0)
- found = 1;
- *eq = '=';
- }
- if (!found)
- {
- *eq = 0;
- printf ("%s = '%s'\n", environ[i], eq + 1);
- *eq = '=';
- }
- }
- printf ("\n");
- }
-
- if (registry)
- {
- if (givehelp)
- printf ("Scanning registry for keys with 'Cygnus' in them...\n");
-#if 0
- /* big and not generally useful */
- scan_registry (0, HKEY_CLASSES_ROOT, (char *) "HKEY_CLASSES_ROOT", 0);
-#endif
- scan_registry (0, HKEY_CURRENT_CONFIG,
- (char *) "HKEY_CURRENT_CONFIG", 0);
- scan_registry (0, HKEY_CURRENT_USER, (char *) "HKEY_CURRENT_USER", 0);
- scan_registry (0, HKEY_LOCAL_MACHINE, (char *) "HKEY_LOCAL_MACHINE", 0);
-#if 0
- /* the parts we need are duplicated in HKEY_CURRENT_USER anyway */
- scan_registry (0, HKEY_USERS, (char *) "HKEY_USERS", 0);
-#endif
- printf ("\n");
- }
- else
- printf ("Use '-r' to scan registry\n\n");
-
- if (givehelp)
- {
- printf ("Listing available drives...\n");
- printf ("Drv Type Size Used Flags Name\n");
- }
- int prev_mode =
- SetErrorMode (SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
- int drivemask = GetLogicalDrives ();
-
- BOOL (WINAPI * gdfse) (LPCSTR, long long *, long long *, long long *) =
- (BOOL (WINAPI *) (LPCSTR, long long *, long long *, long long *))
- GetProcAddress (k32, "GetDiskFreeSpaceExA");
-
- for (i = 0; i < 26; i++)
- {
- if (!(drivemask & (1 << i)))
- continue;
- char drive[4], name[200], fsname[200];
- DWORD serno = 0, maxnamelen = 0, flags = 0;
- name[0] = name[0] = fsname[0] = 0;
- sprintf (drive, "%c:\\", i + 'a');
- /* Report all errors, except if the Volume is ERROR_NOT_READY.
- ERROR_NOT_READY is returned when removeable media drives are empty
- (CD, floppy, etc.) */
- if (!GetVolumeInformation (drive, name, sizeof (name), &serno,
- &maxnamelen, &flags, fsname,
- sizeof (fsname))
- && GetLastError () != ERROR_NOT_READY)
- {
-# define FMT "dump_sysinfo: GetVolumeInformation() for drive %c:"
- char buf[sizeof (FMT)];
- sprintf (buf, FMT, 'A' + i);
- display_error (buf);
-# undef FMT
- }
-
- int dtype = GetDriveType (drive);
- char drive_type[4] = "unk";
- switch (dtype)
- {
- case DRIVE_REMOVABLE:
- strcpy (drive_type, "fd ");
- break;
- case DRIVE_FIXED:
- strcpy (drive_type, "hd ");
- break;
- case DRIVE_REMOTE:
- strcpy (drive_type, "net");
- break;
- case DRIVE_CDROM:
- strcpy (drive_type, "cd ");
- break;
- case DRIVE_RAMDISK:
- strcpy (drive_type, "ram");
- break;
- default:
- strcpy (drive_type, "unk");
- }
-
- long capacity_mb = -1;
- int percent_full = -1;
-
- long long free_me = 0ULL, free_bytes = 0ULL, total_bytes = 1ULL;
- if (gdfse != NULL && gdfse (drive, &free_me, &total_bytes, &free_bytes))
- {
- capacity_mb = total_bytes / (1024L * 1024L);
- percent_full = 100 - (int) ((100.0 * free_me) / total_bytes);
- }
- else
- {
- DWORD spc = 0, bps = 0, fc = 0, tc = 1;
- if (GetDiskFreeSpace (drive, &spc, &bps, &fc, &tc))
- {
- capacity_mb = (spc * bps * tc) / (1024 * 1024);
- percent_full = 100 - (int) ((100.0 * fc) / tc);
- }
- }
-
- printf ("%.2s %s %-6s ", drive, drive_type, fsname);
- if (capacity_mb >= 0)
- printf ("%7dMb %3d%% ", (int) capacity_mb, (int) percent_full);
- else
- printf (" N/A N/A ");
- printf ("%s %s %s %s %s %s %s\n",
- flags & FS_CASE_IS_PRESERVED ? "CP" : " ",
- flags & FS_CASE_SENSITIVE ? "CS" : " ",
- flags & FS_UNICODE_STORED_ON_DISK ? "UN" : " ",
- flags & FS_PERSISTENT_ACLS ? "PA" : " ",
- flags & FS_FILE_COMPRESSION ? "FC" : " ",
- flags & FS_VOL_IS_COMPRESSED ? "VC" : " ",
-#if 0
- flags & FILE_SUPPORTS_ENCRYPTION ? "EN" : " ",
- flags & FILE_SUPPORTS_OBJECT_IDS ? "OI" : " ",
- flags & FILE_SUPPORTS_REPARSE_POINTS ? "RP" : " ",
- flags & FILE_SUPPORTS_SPARSE_FILES ? "SP" : " ",
- flags & FILE_VOLUME_QUOTAS ? "QU" : " ",
-#endif
- name);
- }
-
- if (!FreeLibrary (k32))
- display_error ("dump_sysinfo: FreeLibrary()");
- SetErrorMode (prev_mode);
- if (givehelp)
- {
- puts ("\n"
- "fd = floppy, hd = hard drive, cd = CD-ROM\n"
- "net= Network Share, ram= RAM drive, unk= Unknown\n"
- "CP = Case Preserving, CS = Case Sensitive, UN = Unicode\n"
- "PA = Persistent ACLS, FC = File Compression, VC = Volume Compression");
- }
- printf ("\n");
-
- unsigned ml_fsname = 4, ml_dir = 7, ml_type = 6;
- bool ml_trailing = false;
-
- struct mntent *mnt;
- setmntent (0, 0);
- while ((mnt = getmntent (0)))
- {
- unsigned n = (int) strlen (mnt->mnt_fsname);
- ml_trailing |= (n > 1 && strchr ("\\/", mnt->mnt_fsname[n - 1]));
- if (ml_fsname < n)
- ml_fsname = n;
- n = (int) strlen (mnt->mnt_dir);
- ml_trailing |= (n > 1 && strchr ("\\/", mnt->mnt_dir[n - 1]));
- if (ml_dir < n)
- ml_dir = n;
- }
-
- if (ml_trailing)
- puts ("Warning: Mount entries should not have a trailing (back)slash\n");
-
- if (givehelp)
- {
- printf
- ("Mount entries: these map POSIX directories to your NT drives.\n");
- printf ("%-*s %-*s %-*s %s\n", ml_fsname, "-NT-", ml_dir, "-POSIX-",
- ml_type, "-Type-", "-Flags-");
- }
-
- setmntent (0, 0);
- while ((mnt = getmntent (0)))
- {
- printf ("%-*s %-*s %-*s %s\n",
- ml_fsname, mnt->mnt_fsname,
- ml_dir, mnt->mnt_dir, ml_type, mnt->mnt_type, mnt->mnt_opts);
- }
- printf ("\n");
-
- if (givehelp)
- printf
- ("Looking to see where common programs can be found, if at all...\n");
- for (i = 0; common_apps[i].name; i++)
- if (!find_app_on_path ((char *) common_apps[i].name, 1))
- {
- if (common_apps[i].missing_is_good)
- printf ("Not Found: %s (good!)\n", common_apps[i].name);
- else
- printf ("Not Found: %s\n", common_apps[i].name);
- }
- printf ("\n");
-
- if (givehelp)
- printf ("Looking for various Cygwin DLLs... (-v gives version info)\n");
- int cygwin_dll_count = 0;
- char cygdll_path[32768];
- for (pathlike *pth = paths; pth->dir; pth++)
- {
- WIN32_FIND_DATA ffinfo;
- sprintf (tmp, "%s*.*", pth->dir);
- HANDLE ff = FindFirstFile (tmp, &ffinfo);
- int found = (ff != INVALID_HANDLE_VALUE);
- found_cygwin_dll = NULL;
- while (found)
- {
- char *f = ffinfo.cFileName;
- if (strcasecmp (f + strlen (f) - 4, ".dll") == 0)
- {
- if (strncasecmp (f, "cyg", 3) == 0)
- {
- sprintf (tmp, "%s%s", pth->dir, f);
- if (strcasecmp (f, "cygwin1.dll") == 0)
- {
- if (!cygwin_dll_count)
- strcpy (cygdll_path, pth->dir);
- if (!cygwin_dll_count
- || strcasecmp (cygdll_path, pth->dir) != 0)
- cygwin_dll_count++;
- found_cygwin_dll = strdup (tmp);
- }
- else
- ls (tmp);
- }
- }
- found = FindNextFile (ff, &ffinfo);
- }
- if (found_cygwin_dll)
- {
- ls (found_cygwin_dll);
- free (found_cygwin_dll);
- }
-
- FindClose (ff);
- }
- if (cygwin_dll_count > 1)
- puts ("Warning: There are multiple cygwin1.dlls on your path");
- if (!cygwin_dll_count)
- puts ("Warning: cygwin1.dll not found on your path");
-
- dump_dodgy_apps (verbose);
-
- if (is_nt)
- dump_sysinfo_services ();
-}
-
-static int
-check_keys ()
-{
- HANDLE h = CreateFileA ("CONIN$", GENERIC_READ | GENERIC_WRITE,
- FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
- OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-
- if (h == INVALID_HANDLE_VALUE || h == NULL)
- return (display_error ("check_keys: Opening CONIN$"));
-
- DWORD mode;
-
- if (!GetConsoleMode (h, &mode))
- display_error ("check_keys: GetConsoleMode()");
- else
- {
- mode &= ~ENABLE_PROCESSED_INPUT;
- if (!SetConsoleMode (h, mode))
- display_error ("check_keys: SetConsoleMode()");
- }
-
- fputs ("\nThis key check works only in a console window,", stderr);
- fputs (" _NOT_ in a terminal session!\n", stderr);
- fputs ("Abort with Ctrl+C if in a terminal session.\n\n", stderr);
- fputs ("Press 'q' to exit.\n", stderr);
-
- INPUT_RECORD in, prev_in;
-
- // Drop first <RETURN> key
- ReadConsoleInput (h, &in, 1, &mode);
-
- memset (&in, 0, sizeof in);
-
- do
- {
- prev_in = in;
- if (!ReadConsoleInput (h, &in, 1, &mode))
- display_error ("check_keys: ReadConsoleInput()");
-
- if (!memcmp (&in, &prev_in, sizeof in))
- continue;
-
- switch (in.EventType)
- {
- case KEY_EVENT:
- printf ("%s %ux VK: 0x%02x VS: 0x%02x A: 0x%02x CTRL: ",
- in.Event.KeyEvent.bKeyDown ? "Pressed " : "Released",
- in.Event.KeyEvent.wRepeatCount,
- in.Event.KeyEvent.wVirtualKeyCode,
- in.Event.KeyEvent.wVirtualScanCode,
- (unsigned char) in.Event.KeyEvent.uChar.AsciiChar);
- fputs (in.Event.KeyEvent.dwControlKeyState & CAPSLOCK_ON ?
- "CL " : "-- ", stdout);
- fputs (in.Event.KeyEvent.dwControlKeyState & ENHANCED_KEY ?
- "EK " : "-- ", stdout);
- fputs (in.Event.KeyEvent.dwControlKeyState & LEFT_ALT_PRESSED ?
- "LA " : "-- ", stdout);
- fputs (in.Event.KeyEvent.dwControlKeyState & LEFT_CTRL_PRESSED ?
- "LC " : "-- ", stdout);
- fputs (in.Event.KeyEvent.dwControlKeyState & NUMLOCK_ON ?
- "NL " : "-- ", stdout);
- fputs (in.Event.KeyEvent.dwControlKeyState & RIGHT_ALT_PRESSED ?
- "RA " : "-- ", stdout);
- fputs (in.Event.KeyEvent.dwControlKeyState & RIGHT_CTRL_PRESSED ?
- "RC " : "-- ", stdout);
- fputs (in.Event.KeyEvent.dwControlKeyState & SCROLLLOCK_ON ?
- "SL " : "-- ", stdout);
- fputs (in.Event.KeyEvent.dwControlKeyState & SHIFT_PRESSED ?
- "SH " : "-- ", stdout);
- fputc ('\n', stdout);
- break;
-
- default:
- break;
- }
- }
- while (in.EventType != KEY_EVENT ||
- in.Event.KeyEvent.bKeyDown != FALSE ||
- in.Event.KeyEvent.uChar.AsciiChar != 'q');
-
- CloseHandle (h);
- return 0;
-}
-
-/* RFC1738 says that these do not need to be escaped. */
-static const char safe_chars[] = "$-_.+!*'(),";
-
-/* the URL to query. */
-static const char base_url[] =
- "http://cygwin.com/cgi-bin2/package-grep.cgi?text=1&grep=";
-
-/* Queries Cygwin web site for packages containing files matching a regexp.
- Return value is 1 if there was a problem, otherwise 0. */
-static int
-package_grep (char *search)
-{
- char buf[1024];
-
- /* Attempt to dynamically load the necessary WinInet API functions so that
- cygcheck can still function on older systems without IE. */
- HMODULE hWinInet;
- if (!(hWinInet = LoadLibrary ("wininet.dll")))
- {
- fputs ("Unable to locate WININET.DLL. This feature requires Microsoft "
- "Internet Explorer v3 or later to function.\n", stderr);
- return 1;
- }
-
- /* InternetCloseHandle is used outside this function so it is declared
- global. The rest of these functions are only used here, so declare them
- and call GetProcAddress for each of them with the following macro. */
-
- pInternetCloseHandle = (BOOL (WINAPI *) (HINTERNET))
- GetProcAddress (hWinInet, "InternetCloseHandle");
-#define make_func_pointer(name, ret, args) ret (WINAPI * p##name) args = \
- (ret (WINAPI *) args) GetProcAddress (hWinInet, #name);
- make_func_pointer (InternetAttemptConnect, DWORD, (DWORD));
- make_func_pointer (InternetOpenA, HINTERNET, (LPCSTR, DWORD, LPCSTR, LPCSTR,
- DWORD));
- make_func_pointer (InternetOpenUrlA, HINTERNET, (HINTERNET, LPCSTR, LPCSTR,
- DWORD, DWORD, DWORD));
- make_func_pointer (InternetReadFile, BOOL, (HINTERNET, PVOID, DWORD, PDWORD));
- make_func_pointer (HttpQueryInfoA, BOOL, (HINTERNET, DWORD, PVOID, PDWORD,
- PDWORD));
-#undef make_func_pointer
-
- if(!pInternetCloseHandle || !pInternetAttemptConnect || !pInternetOpenA
- || !pInternetOpenUrlA || !pInternetReadFile || !pHttpQueryInfoA)
- {
- fputs ("Unable to load one or more functions from WININET.DLL. This "
- "feature requires Microsoft Internet Explorer v3 or later to "
- "function.\n", stderr);
- return 1;
- }
-
- /* construct the actual URL by escaping */
- char *url = (char *) alloca (sizeof (base_url) + strlen (search) * 3);
- strcpy (url, base_url);
-
- char *dest;
- for (dest = &url[sizeof (base_url) - 1]; *search; search++)
- {
- if (isalnum (*search)
- || memchr (safe_chars, *search, sizeof (safe_chars) - 1))
- {
- *dest++ = *search;
- }
- else
- {
- *dest++ = '%';
- sprintf (dest, "%02x", (unsigned char) *search);
- dest += 2;
- }
- }
- *dest = 0;
-
- /* Connect to the net and open the URL. */
- if (pInternetAttemptConnect (0) != ERROR_SUCCESS)
- {
- fputs ("An internet connection is required for this function.\n", stderr);
- return 1;
- }
-
- /* Initialize WinInet and attempt to fetch our URL. */
- HINTERNET hi = NULL, hurl = NULL;
- if (!(hi = pInternetOpenA ("cygcheck", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0)))
- return display_internet_error ("InternetOpen() failed", NULL);
-
- if (!(hurl = pInternetOpenUrlA (hi, url, NULL, 0, 0, 0)))
- return display_internet_error ("unable to contact cygwin.com site, "
- "InternetOpenUrl() failed", hi, NULL);
-
- /* Check the HTTP response code. */
- DWORD rc = 0, rc_s = sizeof (DWORD);
- if (!pHttpQueryInfoA (hurl, HTTP_QUERY_STATUS_CODE | HTTP_QUERY_FLAG_NUMBER,
- (void *) &rc, &rc_s, NULL))
- return display_internet_error ("HttpQueryInfo() failed", hurl, hi, NULL);
-
- if (rc != HTTP_STATUS_OK)
- {
- sprintf (buf, "error retrieving results from cygwin.com site, "
- "HTTP status code %lu", rc);
- return display_internet_error (buf, hurl, hi, NULL);
- }
-
- /* Fetch result and print to stdout. */
- DWORD numread;
- do
- {
- if (!pInternetReadFile (hurl, (void *) buf, sizeof (buf), &numread))
- return display_internet_error ("InternetReadFile failed", hurl, hi, NULL);
- if (numread)
- fwrite ((void *) buf, (size_t) numread, 1, stdout);
- }
- while (numread);
-
- pInternetCloseHandle (hurl);
- pInternetCloseHandle (hi);
- return 0;
-}
-
-static void
-usage (FILE * stream, int status)
-{
- fprintf (stream, "\
-Usage: cygcheck PROGRAM [ -v ] [ -h ]\n\
- cygcheck -c [ PACKAGE ] [ -d ]\n\
- cygcheck -s [ -r ] [ -v ] [ -h ]\n\
- cygcheck -k\n\
- cygcheck -f FILE [ FILE ... ]\n\
- cygcheck -l [ PACKAGE ] [ PACKAGE ... ]\n\
- cygcheck -p REGEXP\n\
-List system information, check installed packages, or query package database.\n\
-\n\
-At least one command option or a PROGRAM is required, as shown above.\n\
-\n\
- PROGRAM list library (DLL) dependencies of PROGRAM\n\
- -c, --check-setup show installed version of PACKAGE and verify integrity\n\
- (or for all installed packages if none specified)\n\
- -d, --dump-only just list packages, do not verify (with -c)\n\
- -s, --sysinfo produce diagnostic system information (implies -c -d)\n\
- -r, --registry also scan registry for Cygwin settings (with -s)\n\
- -k, --keycheck perform a keyboard check session (must be run from a\n\
- plain console only, not from a pty/rxvt/xterm)\n\
- -f, --find-package find the package that FILE belongs to\n\
- -l, --list-package list contents of PACKAGE (or all packages if none given)\n\
- -p, --package-query search for REGEXP in the entire cygwin.com package\n\
- repository (requies internet connectivity)\n\
- -v, --verbose produce more verbose output\n\
- -h, --help annotate output with explanatory comments when given\n\
- with another command, otherwise print this help\n\
- -V, --version print the version of cygcheck and exit\n\
-\n\
-Note: -c, -f, and -l only report on packages that are currently installed. To\n\
- search all official Cygwin packages use -p instead. The -p REGEXP matches\n\
- package names, descriptions, and names of files/paths within all packages.\n\
-\n");
- exit (status);
-}
-
-struct option longopts[] = {
- {"check-setup", no_argument, NULL, 'c'},
- {"dump-only", no_argument, NULL, 'd'},
- {"sysinfo", no_argument, NULL, 's'},
- {"registry", no_argument, NULL, 'r'},
- {"verbose", no_argument, NULL, 'v'},
- {"keycheck", no_argument, NULL, 'k'},
- {"find-package", no_argument, NULL, 'f'},
- {"list-package", no_argument, NULL, 'l'},
- {"package-query", no_argument, NULL, 'p'},
- {"help", no_argument, NULL, 'h'},
- {"version", no_argument, 0, 'V'},
- {0, no_argument, NULL, 0}
-};
-
-static char opts[] = "cdsrvkflphV";
-
-static void
-print_version ()
-{
- const char *v = strchr (version, ':');
- int len;
- if (!v)
- {
- v = "?";
- len = 1;
- }
- else
- {
- v += 2;
- len = strchr (v, ' ') - v;
- }
- printf ("\
-cygcheck version %.*s\n\
-System Checker for Cygwin\n\
-Copyright (C) 1998 - 2008 Red Hat, Inc.\n\
-Compiled on %s\n\
-", len, v, __DATE__);
-}
-
-void
-nuke (char *ev)
-{
- int n = 1 + strchr (ev, '=') - ev;
- char *s = (char *) malloc (n + 1);
- memcpy (s, ev, n);
- s[n] = '\0';
- putenv (s);
-}
-
-extern "C" {
-unsigned long (*cygwin_internal) (int, ...);
-};
-
-static void
-load_cygwin (int& argc, char **&argv)
-{
- HMODULE h;
-
- if (!(h = LoadLibrary ("cygwin1.dll")))
- return;
- if ((cygwin_internal = (DWORD (*) (int, ...)) GetProcAddress (h, "cygwin_internal")))
- {
- char **av = (char **) cygwin_internal (CW_ARGV);
- if (av && ((DWORD) av != (DWORD) -1))
- {
- /* Copy cygwin's idea of the argument list into this Window application. */
- for (argc = 0; av[argc]; argc++)
- continue;
- argv = (char **) calloc (argc + 1, sizeof (char *));
- for (char **argvp = argv; *av; av++)
- *argvp++ = strdup (*av);
- }
-
-
- char **envp = (char **) cygwin_internal (CW_ENVP);
- if (envp && ((DWORD) envp != (DWORD) -1))
- {
- /* Store path and revert to this value, otherwise path gets overwritten
- by the POSIXy Cygwin variation, which breaks cygcheck.
- Another approach would be to use the Cygwin PATH and convert it to
- Win32 again. */
- char *path = NULL;
- char **env;
- while (*(env = _environ))
- {
- if (strncmp (*env, "PATH=", 5) == 0)
- path = strdup (*env);
- nuke (*env);
- }
- for (char **ev = envp; *ev; ev++)
- if (strncmp (*ev, "PATH=", 5) != 0)
- putenv (strdup (*ev));
- if (path)
- putenv (path);
- }
- }
- FreeLibrary (h);
-}
-
-int
-main (int argc, char **argv)
-{
- int i;
- bool ok = true;
- load_cygwin (argc, argv);
-
- /* Need POSIX sorting while parsing args, but don't forget the
- user's original environment. */
- char *posixly = getenv ("POSIXLY_CORRECT");
- if (posixly == NULL)
- (void) putenv("POSIXLY_CORRECT=1");
- while ((i = getopt_long (argc, argv, opts, longopts, NULL)) != EOF)
- switch (i)
- {
- case 's':
- sysinfo = 1;
- break;
- case 'c':
- check_setup = 1;
- break;
- case 'd':
- dump_only = 1;
- break;
- case 'r':
- registry = 1;
- break;
- case 'v':
- verbose = 1;
- break;
- case 'k':
- keycheck = 1;
- break;
- case 'f':
- find_package = 1;
- break;
- case 'l':
- list_package = 1;
- break;
- case 'p':
- grep_packages = 1;
- break;
- case 'h':
- givehelp = 1;
- break;
- case 'V':
- print_version ();
- exit (0);
- default:
- usage (stderr, 1);
- /*NOTREACHED*/}
- argc -= optind;
- argv += optind;
- if (posixly == NULL)
- putenv ("POSIXLY_CORRECT=");
-
- if ((argc == 0) && !sysinfo && !keycheck && !check_setup && !list_package)
- {
- if (givehelp)
- usage (stdout, 0);
- else
- usage (stderr, 1);
- }
-
- if ((check_setup || sysinfo || find_package || list_package || grep_packages)
- && keycheck)
- usage (stderr, 1);
-
- if ((find_package || list_package || grep_packages) && check_setup)
- usage (stderr, 1);
-
- if (dump_only && !check_setup)
- usage (stderr, 1);
-
- if (find_package + list_package + grep_packages > 1)
- usage (stderr, 1);
-
- if (keycheck)
- return check_keys ();
- if (grep_packages)
- return package_grep (*argv);
-
- init_paths ();
-
- /* FIXME: Add help for check_setup and {list,find}_package */
- if (argc >= 1 && givehelp && !check_setup && !find_package && !list_package)
- {
- printf("Here is where the OS will find your program%s, and which dlls\n",
- argc > 1 ? "s" : "");
- printf ("will be used for it. Use -v to see DLL version info\n");
-
- if (!sysinfo)
- printf ("\n");
- }
-
- if (check_setup)
- dump_setup (verbose, argv, !dump_only);
- else if (find_package)
- package_find (verbose, argv);
- else if (list_package)
- package_list (verbose, argv);
- else
- for (i = 0; i < argc; i++)
- {
- if (i)
- puts ("");
- ok &= cygcheck (argv[i]);
- }
-
- if (sysinfo)
- {
- dump_sysinfo ();
- if (!check_setup)
- {
- puts ("");
- dump_setup (verbose, NULL, false);
- }
-
- if (!givehelp)
- puts ("Use -h to see help about each section");
- }
-
- return ok ? EXIT_SUCCESS : EXIT_FAILURE;
-}
diff --git a/winsup/utils/cygpath.cc b/winsup/utils/cygpath.cc
deleted file mode 100644
index 6f8eb6b..0000000
--- a/winsup/utils/cygpath.cc
+++ /dev/null
@@ -1,1010 +0,0 @@
-/* cygpath.cc -- convert pathnames between Windows and Unix format
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#define NOCOMATTRIBUTE
-
-#include <shlobj.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <argz.h>
-#include <limits.h>
-#include <getopt.h>
-#include <windows.h>
-#include <io.h>
-#include <sys/fcntl.h>
-#include <sys/cygwin.h>
-#include <ctype.h>
-#include <errno.h>
-#include <ddk/ntddk.h>
-#include <ddk/winddk.h>
-#include <ddk/ntifs.h>
-
-static const char version[] = "$Revision$";
-
-static char *prog_name;
-static char *file_arg, *output_arg;
-static int path_flag, unix_flag, windows_flag, absolute_flag;
-static int shortname_flag, longname_flag;
-static int ignore_flag, allusers_flag, output_flag;
-static int mixed_flag, options_from_file_flag, mode_flag;
-
-static const char *format_type_arg;
-
-static struct option long_options[] = {
- {(char *) "absolute", no_argument, NULL, 'a'},
- {(char *) "close", required_argument, NULL, 'c'},
- {(char *) "dos", no_argument, NULL, 'd'},
- {(char *) "file", required_argument, NULL, 'f'},
- {(char *) "help", no_argument, NULL, 'h'},
- {(char *) "ignore", no_argument, NULL, 'i'},
- {(char *) "long-name", no_argument, NULL, 'l'},
- {(char *) "mixed", no_argument, NULL, 'm'},
- {(char *) "mode", no_argument, NULL, 'M'},
- {(char *) "option", no_argument, NULL, 'o'},
- {(char *) "path", no_argument, NULL, 'p'},
- {(char *) "short-name", no_argument, NULL, 's'},
- {(char *) "type", required_argument, NULL, 't'},
- {(char *) "unix", no_argument, NULL, 'u'},
- {(char *) "version", no_argument, NULL, 'v'},
- {(char *) "windows", no_argument, NULL, 'w'},
- {(char *) "allusers", no_argument, NULL, 'A'},
- {(char *) "desktop", no_argument, NULL, 'D'},
- {(char *) "homeroot", no_argument, NULL, 'H'},
- {(char *) "mydocs", no_argument, NULL, 'O'},
- {(char *) "smprograms", no_argument, NULL, 'P'},
- {(char *) "sysdir", no_argument, NULL, 'S'},
- {(char *) "windir", no_argument, NULL, 'W'},
- {(char *) "folder", required_argument, NULL, 'F'},
- {0, no_argument, 0, 0}
-};
-
-static char options[] = "ac:df:hilmMopst:uvwADHOPSWF:";
-
-static void
-usage (FILE * stream, int status)
-{
- if (!ignore_flag || !status)
- fprintf (stream, "\
-Usage: %s (-d|-m|-u|-w|-t TYPE) [-f FILE] [OPTION]... NAME...\n\
- %s [-c HANDLE] \n\
- %s [-ADHOPSW] \n\
- %s [-F ID] \n\
-Convert Unix and Windows format paths, or output system path information\n\
-\n\
-Output type options:\n\
- -d, --dos print DOS (short) form of NAMEs (C:\\PROGRA~1\\)\n\
- -m, --mixed like --windows, but with regular slashes (C:/WINNT)\n\
- -M, --mode report on mode of file (binmode or textmode)\n\
- -u, --unix (default) print Unix form of NAMEs (/cygdrive/c/winnt)\n\
- -w, --windows print Windows form of NAMEs (C:\\WINNT)\n\
- -t, --type TYPE print TYPE form: 'dos', 'mixed', 'unix', or 'windows'\n\
-Path conversion options:\n\
- -a, --absolute output absolute path\n\
- -l, --long-name print Windows long form of NAMEs (with -w, -m only)\n\
- -p, --path NAME is a PATH list (i.e., '/bin:/usr/bin')\n\
- -s, --short-name print DOS (short) form of NAMEs (with -w, -m only)\n\
-System information:\n\
- -A, --allusers use `All Users' instead of current user for -D, -O, -P\n\
- -D, --desktop output `Desktop' directory and exit\n\
- -H, --homeroot output `Profiles' directory (home root) and exit\n\
- -O, --mydocs output `My Documents' directory and exit\n\
- -P, --smprograms output Start Menu `Programs' directory and exit\n\
- -S, --sysdir output system directory and exit\n\
- -W, --windir output `Windows' directory and exit\n\
- -F, --folder ID output special folder with numeric ID and exit\n\
-", prog_name, prog_name, prog_name, prog_name);
- if (ignore_flag)
- /* nothing to do */;
- else if (stream != stdout)
- fprintf(stream, "Try `%s --help' for more information.\n", prog_name);
- else
- {
- fprintf (stream, "\
-Other options:\n\
- -f, --file FILE read FILE for input; use - to read from STDIN\n\
- -o, --option read options from FILE as well (for use with --file)\n\
- -c, --close HANDLE close HANDLE (for use in captured process)\n\
- -i, --ignore ignore missing argument\n\
- -h, --help output usage information and exit\n\
- -v, --version output version information and exit\n\
-");
- }
- exit (ignore_flag ? 0 : status);
-}
-
-static inline BOOLEAN
-RtlAllocateUnicodeString (PUNICODE_STRING uni, ULONG size)
-{
- uni->Length = 0;
- uni->MaximumLength = 512;
- uni->Buffer = (WCHAR *) malloc (size);
- return uni->Buffer != NULL;
-}
-
-static char *
-get_device_name (char *path)
-{
- UNICODE_STRING ntdev, tgtdev, ntdevdir;
- ANSI_STRING ans;
- OBJECT_ATTRIBUTES ntobj;
- NTSTATUS status;
- HANDLE lnk, dir;
- char *ret = strdup (path);
- PDIRECTORY_BASIC_INFORMATION odi = (PDIRECTORY_BASIC_INFORMATION)
- alloca (4096);
- BOOLEAN restart;
- ULONG cont;
-
- if (strncasecmp (path, "\\Device\\", 8))
- return ret;
-
- if (!RtlAllocateUnicodeString (&ntdev, MAX_PATH * 2))
- return ret;
- if (!RtlAllocateUnicodeString (&tgtdev, MAX_PATH * 2))
- return ret;
- RtlInitAnsiString (&ans, path);
- RtlAnsiStringToUnicodeString (&ntdev, &ans, FALSE);
-
- /* First check if the given device name is a symbolic link itself. If so,
- query it and use the new name as actual device name to search for in the
- DOS device name directory. If not, just use the incoming device name. */
- InitializeObjectAttributes (&ntobj, &ntdev, OBJ_CASE_INSENSITIVE, NULL, NULL);
- status = ZwOpenSymbolicLinkObject (&lnk, SYMBOLIC_LINK_QUERY, &ntobj);
- if (NT_SUCCESS (status))
- {
- status = ZwQuerySymbolicLinkObject (lnk, &tgtdev, NULL);
- ZwClose (lnk);
- if (!NT_SUCCESS (status))
- goto out;
- RtlCopyUnicodeString (&ntdev, &tgtdev);
- }
- else if (status != STATUS_OBJECT_TYPE_MISMATCH)
- goto out;
-
- for (int i = 0; i < 2; ++i)
- {
- /* There are two DOS device directories, the local and the global dir.
- Try both, local first. */
- RtlInitUnicodeString (&ntdevdir, i ? L"\\GLOBAL??" : L"\\??");
-
- /* Open the directory... */
- InitializeObjectAttributes (&ntobj, &ntdevdir, OBJ_CASE_INSENSITIVE,
- NULL, NULL);
- status = ZwOpenDirectoryObject (&dir, DIRECTORY_QUERY, &ntobj);
- if (!NT_SUCCESS (status))
- break;
-
- /* ...and scan it. */
- for (restart = TRUE, cont = 0;
- NT_SUCCESS (ZwQueryDirectoryObject (dir, odi, 4096, TRUE,
- restart, &cont, NULL));
- restart = FALSE)
- {
- /* For each entry check if it's a symbolic link. */
- InitializeObjectAttributes (&ntobj, &odi->ObjectName,
- OBJ_CASE_INSENSITIVE, dir, NULL);
- status = ZwOpenSymbolicLinkObject (&lnk, SYMBOLIC_LINK_QUERY, &ntobj);
- if (!NT_SUCCESS (status))
- continue;
- tgtdev.Length = 0;
- tgtdev.MaximumLength = 512;
- /* If so, query it and compare the target of the symlink with the
- incoming device name. */
- status = ZwQuerySymbolicLinkObject (lnk, &tgtdev, NULL);
- ZwClose (lnk);
- if (!NT_SUCCESS (status))
- continue;
- if (RtlEqualUnicodeString (&ntdev, &tgtdev, TRUE))
- {
- /* If the comparison succeeds, the name of the directory entry is
- a valid DOS device name, if prepended with "\\.\". Return that
- valid DOS path. */
- ULONG len = RtlUnicodeStringToAnsiSize (&odi->ObjectName);
- ret = (char *) malloc (len + 4);
- strcpy (ret, "\\\\.\\");
- ans.Length = 0;
- ans.MaximumLength = len;
- ans.Buffer = ret + 4;
- RtlUnicodeStringToAnsiString (&ans, &odi->ObjectName, FALSE);
- ZwClose (dir);
- goto out;
- }
- }
- ZwClose (dir);
- }
-
-out:
- free (tgtdev.Buffer);
- free (ntdev.Buffer);
- return ret;
-}
-
-static char *
-get_device_paths (char *path)
-{
- char *sbuf;
- char *ptr;
- int n = 1;
-
- ptr = path;
- while ((ptr = strchr (ptr, ';')))
- {
- ptr++;
- n++;
- }
-
- char *paths[n];
- DWORD acc = 0;
- int i;
- if (!n)
- return strdup ("");
-
- for (i = 0, ptr = path; ptr; i++)
- {
- char *next = ptr;
- ptr = strchr (ptr, ';');
- if (ptr)
- *ptr++ = 0;
- paths[i] = get_device_name (next);
- acc += strlen (paths[i]) + 1;
- }
-
- sbuf = (char *) malloc (acc + 1);
- if (sbuf == NULL)
- {
- fprintf (stderr, "%s: out of memory\n", prog_name);
- exit (1);
- }
-
- sbuf[0] = '\0';
- for (i = 0; i < n; i++)
- {
- strcat (strcat (sbuf, paths[i]), ";");
- free (paths[i]);
- }
-
- strchr (sbuf, '\0')[-1] = '\0';
- return sbuf;
-}
-
-static char *
-get_short_paths (char *path)
-{
- char *sbuf;
- char *sptr;
- char *next;
- char *ptr = path;
- char *end = strrchr (path, 0);
- DWORD acc = 0;
- DWORD len;
-
- while (ptr != NULL)
- {
- next = ptr;
- ptr = strchr (ptr, ';');
- if (ptr)
- *ptr++ = 0;
- len = GetShortPathName (next, NULL, 0);
- if (!len)
- {
- fprintf (stderr, "%s: cannot create short name of %s\n", prog_name,
- next);
- exit (2);
- }
- acc += len + 1;
- }
- sptr = sbuf = (char *) malloc (acc + 1);
- if (sbuf == NULL)
- {
- fprintf (stderr, "%s: out of memory\n", prog_name);
- exit (1);
- }
- ptr = path;
- for (;;)
- {
- len = GetShortPathName (ptr, sptr, acc);
- if (!len)
- {
- fprintf (stderr, "%s: cannot create short name of %s\n", prog_name,
- ptr);
- exit (2);
- }
-
- ptr = strrchr (ptr, 0);
- sptr = strrchr (sptr, 0);
- if (ptr == end)
- break;
- *sptr = ';';
- ++ptr, ++sptr;
- acc -= len + 1;
- }
- return sbuf;
-}
-
-static char *
-get_short_name (const char *filename)
-{
- char *sbuf, buf[MAX_PATH];
- DWORD len = GetShortPathName (filename, buf, MAX_PATH);
- if (!len)
- {
- fprintf (stderr, "%s: cannot create short name of %s\n", prog_name,
- filename);
- exit (2);
- }
- sbuf = (char *) malloc (++len);
- if (sbuf == NULL)
- {
- fprintf (stderr, "%s: out of memory\n", prog_name);
- exit (1);
- }
- return strcpy (sbuf, buf);
-}
-
-static DWORD WINAPI
-get_long_path_name_w32impl (LPCSTR src, LPSTR sbuf, DWORD)
-{
- char buf1[MAX_PATH], buf2[MAX_PATH], *ptr;
- const char *pelem, *next;
- WIN32_FIND_DATA w32_fd;
- int len;
-
- strcpy (buf1, src);
- *buf2 = 0;
- pelem = src;
- ptr = buf2;
- while (pelem)
- {
- next = pelem;
- if (*next == '\\')
- {
- strcat (ptr++, "\\");
- pelem++;
- if (!*pelem)
- break;
- continue;
- }
- pelem = strchr (next, '\\');
- len = pelem ? (pelem++ - next) : strlen (next);
- strncpy (ptr, next, len);
- ptr[len] = 0;
- if (next[1] != ':' && strcmp(next, ".") && strcmp(next, ".."))
- {
- HANDLE h;
- h = FindFirstFile (buf2, &w32_fd);
- if (h != INVALID_HANDLE_VALUE)
- {
- strcpy (ptr, w32_fd.cFileName);
- FindClose (h);
- }
- }
- ptr += strlen (ptr);
- if (pelem)
- {
- *ptr++ = '\\';
- *ptr = 0;
- }
- }
- if (sbuf)
- strcpy (sbuf, buf2);
- SetLastError (0);
- return strlen (buf2) + (sbuf ? 0 : 1);
-}
-
-static char *
-get_long_name (const char *filename, DWORD& len)
-{
- char *sbuf, buf[MAX_PATH];
- static HINSTANCE k32 = LoadLibrary ("kernel32.dll");
- static DWORD (WINAPI *GetLongPathName) (LPCSTR, LPSTR, DWORD) =
- (DWORD (WINAPI *) (LPCSTR, LPSTR, DWORD)) GetProcAddress (k32, "GetLongPathNameA");
- if (!GetLongPathName)
- GetLongPathName = get_long_path_name_w32impl;
-
- len = GetLongPathName (filename, buf, MAX_PATH);
- if (len == 0)
- {
- DWORD err = GetLastError ();
-
- if (err == ERROR_INVALID_PARAMETER)
- {
- fprintf (stderr, "%s: cannot create long name of %s\n", prog_name,
- filename);
- exit (2);
- }
- else if (err == ERROR_FILE_NOT_FOUND)
- len = get_long_path_name_w32impl (filename, buf, MAX_PATH);
- else
- {
- buf[0] = '\0';
- strncat (buf, filename, MAX_PATH - 1);
- len = strlen (buf);
- }
- }
- sbuf = (char *) malloc (len + 1);
- if (!sbuf)
- {
- fprintf (stderr, "%s: out of memory\n", prog_name);
- exit (1);
- }
- return strcpy (sbuf, buf);
-}
-
-static char *
-get_long_paths (char *path)
-{
- char *sbuf;
- char *ptr;
- int n = 1;
-
- ptr = path;
- while ((ptr = strchr (ptr, ';')))
- {
- ptr++;
- n++;
- }
-
- char *paths[n];
- DWORD acc = 0;
- int i;
- if (!n)
- return strdup ("");
-
- for (i = 0, ptr = path; ptr; i++)
- {
- DWORD len;
- char *next = ptr;
- ptr = strchr (ptr, ';');
- if (ptr)
- *ptr++ = 0;
- paths[i] = get_long_name (next, len);
- acc += len + 1;
- }
-
- sbuf = (char *) malloc (acc + 1);
- if (sbuf == NULL)
- {
- fprintf (stderr, "%s: out of memory\n", prog_name);
- exit (1);
- }
-
- sbuf[0] = '\0';
- for (i = 0; i < n; i++)
- {
- strcat (strcat (sbuf, paths[i]), ";");
- free (paths[i]);
- }
-
- strchr (sbuf, '\0')[-1] = '\0';
- return sbuf;
-}
-
-static void
-convert_slashes (char* name)
-{
- while ((name = strchr (name, '\\')) != NULL)
- {
- if (*name == '\\')
- *name = '/';
- name++;
- }
-}
-
-static char *
-get_mixed_name (const char* filename)
-{
- char* mixed_buf = strdup (filename);
-
- if (mixed_buf == NULL)
- {
- fprintf (stderr, "%s: out of memory\n", prog_name);
- exit (1);
- }
-
- convert_slashes (mixed_buf);
-
- return mixed_buf;
-}
-
-static bool
-get_special_folder (char* path, int id)
-{
- path[0] = 0;
- LPITEMIDLIST pidl = 0;
- if (SHGetSpecialFolderLocation (NULL, id, &pidl) != S_OK)
- return false;
- if (!SHGetPathFromIDList (pidl, path) || !path[0])
- return false;
- return true;
-}
-
-static void
-get_user_folder (char* path, int id, int allid)
-{
- get_special_folder (path, allusers_flag ? allid : id);
-}
-
-static void
-do_sysfolders (char option)
-{
- char *buf, buf1[MAX_PATH], buf2[MAX_PATH];
- DWORD len = MAX_PATH;
- WIN32_FIND_DATA w32_fd;
- HINSTANCE k32;
- BOOL (*GetProfilesDirectoryAPtr) (LPSTR, LPDWORD) = 0;
-
- buf = buf1;
- buf[0] = 0;
- switch (option)
- {
- case 'D':
- get_user_folder (buf, CSIDL_DESKTOPDIRECTORY,
- CSIDL_COMMON_DESKTOPDIRECTORY);
- break;
-
- case 'P':
- get_user_folder (buf, CSIDL_PROGRAMS, CSIDL_COMMON_PROGRAMS);
- break;
-
- case 'O':
- get_user_folder (buf, CSIDL_PERSONAL, CSIDL_COMMON_DOCUMENTS);
- break;
-
- case 'F':
- {
- int val = -1, len = -1;
- if (!(sscanf (output_arg, "%i%n", &val, &len) == 1
- && len == (int) strlen (output_arg) && val >= 0))
- {
- fprintf (stderr, "%s: syntax error in special folder ID %s\n",
- prog_name, output_arg);
- exit (1);
- }
- get_special_folder (buf, val);
- }
- break;
-
- case 'H':
- k32 = LoadLibrary ("userenv");
- if (k32)
- GetProfilesDirectoryAPtr = (BOOL (*) (LPSTR, LPDWORD))
- GetProcAddress (k32, "GetProfilesDirectoryA");
- if (GetProfilesDirectoryAPtr)
- (*GetProfilesDirectoryAPtr) (buf, &len);
- else
- {
- GetWindowsDirectory (buf, MAX_PATH);
- strcat (buf, "\\Profiles");
- }
- break;
-
- case 'S':
- GetSystemDirectory (buf, MAX_PATH);
- FindFirstFile (buf, &w32_fd);
- strcpy (strrchr (buf, '\\') + 1, w32_fd.cFileName);
- break;
-
- case 'W':
- GetWindowsDirectory (buf, MAX_PATH);
- break;
-
- default:
- usage (stderr, 1);
- }
-
- if (!buf[0])
- {
- fprintf (stderr, "%s: failed to retrieve special folder path\n", prog_name);
- }
- else if (!windows_flag)
- {
- if (cygwin_conv_path (CCP_WIN_A_TO_POSIX | CCP_RELATIVE, buf, buf2,
- MAX_PATH))
- fprintf (stderr, "%s: error converting \"%s\" - %s\n",
- prog_name, buf, strerror (errno));
- else
- buf = buf2;
- }
- else
- {
- if (shortname_flag)
- buf = get_short_name (buf);
- if (mixed_flag)
- buf = get_mixed_name (buf);
- }
- printf ("%s\n", buf);
-}
-
-static void
-report_mode (char *filename)
-{
- switch (cygwin_internal (CW_GET_BINMODE, filename))
- {
- case O_BINARY:
- printf ("%s: binary\n", filename);
- break;
- case O_TEXT:
- printf ("%s: text\n", filename);
- break;
- default:
- fprintf (stderr, "%s: file '%s' - %s\n", prog_name, filename,
- strerror (errno));
- break;
- }
-}
-
-static void
-do_pathconv (char *filename)
-{
- char *buf;
- DWORD len;
- ssize_t err;
- cygwin_conv_path_t conv_func =
- (unix_flag ? CCP_WIN_A_TO_POSIX : CCP_POSIX_TO_WIN_A)
- | (absolute_flag ? CCP_ABSOLUTE : CCP_RELATIVE);
-
- if (!path_flag)
- {
- len = strlen (filename);
- if (len)
- len += MAX_PATH + 1001;
- else if (ignore_flag)
- exit (0);
- else
- {
- fprintf (stderr, "%s: can't convert empty path\n", prog_name);
- exit (1);
- }
- }
- else
- len = cygwin_conv_path_list (conv_func, filename, NULL, 0);
-
- buf = (char *) malloc (len);
- if (buf == NULL)
- {
- fprintf (stderr, "%s: out of memory\n", prog_name);
- exit (1);
- }
-
- if (path_flag)
- {
- err = cygwin_conv_path_list (conv_func, filename, buf, len);
- if (!unix_flag)
- {
- if (err)
- /* oops */;
- buf = get_device_paths (buf);
- if (shortname_flag)
- buf = get_short_paths (buf);
- if (longname_flag)
- buf = get_long_paths (buf);
- if (mixed_flag)
- buf = get_mixed_name (buf);
- }
- if (err)
- {
- fprintf (stderr, "%s: error converting \"%s\" - %s\n",
- prog_name, filename, strerror (errno));
- exit (1);
- }
- }
- else
- {
- err = cygwin_conv_path (conv_func, filename, buf, len);
- if (err)
- {
- fprintf (stderr, "%s: error converting \"%s\" - %s\n",
- prog_name, filename, strerror (errno));
- exit (1);
- }
- if (!unix_flag)
- {
- buf = get_device_name (buf);
- if (shortname_flag)
- buf = get_short_name (buf);
- if (longname_flag)
- buf = get_long_name (buf, len);
- if (mixed_flag)
- buf = get_mixed_name (buf);
- }
- }
-
- puts (buf);
-}
-
-static void
-print_version ()
-{
- const char *v = strchr (version, ':');
- int len;
- if (!v)
- {
- v = "?";
- len = 1;
- }
- else
- {
- v += 2;
- len = strchr (v, ' ') - v;
- }
- printf ("\
-cygpath (cygwin) %.*s\n\
-Path Conversion Utility\n\
-Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, \n\
- 2007, 2008 Red Hat, Inc.\n\
-Compiled on %s\n\
-", len, v, __DATE__);
-}
-
-static int
-do_options (int argc, char **argv, int from_file)
-{
- int c, o = 0;
- path_flag = 0;
- unix_flag = 0;
- windows_flag = 0;
- shortname_flag = 0;
- longname_flag = 0;
- mixed_flag = 0;
- ignore_flag = 0;
- allusers_flag = 0;
- output_flag = 0;
- mode_flag = 0;
- if (!from_file)
- options_from_file_flag = 0;
- optind = 0;
- while ((c = getopt_long (argc, argv, options,
- long_options, (int *) NULL)) != EOF)
- {
- switch (c)
- {
- case 'a':
- absolute_flag = 1;
- break;
-
- case 'c':
- if (!optarg)
- usage (stderr, 1);
- CloseHandle ((HANDLE) strtoul (optarg, NULL, 16));
- break;
-
- case 'd':
- windows_flag = 1;
- shortname_flag = 1;
- break;
-
- case 'f':
- if (from_file || !optarg)
- usage (stderr, 1);
- file_arg = optarg;
- break;
-
- case 'M':
- mode_flag = 1;
- break;
-
- case 'o':
- if (from_file)
- usage (stderr, 1);
- options_from_file_flag = 1;
- break;
-
- case 'p':
- path_flag = 1;
- break;
-
- case 'u':
- unix_flag = 1;
- break;
-
- case 'w':
- windows_flag = 1;
- break;
-
- case 'm':
- windows_flag = 1;
- mixed_flag = 1;
- break;
-
- case 'l':
- longname_flag = 1;
- break;
-
- case 's':
- shortname_flag = 1;
- break;
-
- case 't':
- if (!optarg)
- usage (stderr, 1);
-
- format_type_arg = (*optarg == '=') ? (optarg + 1) : (optarg);
- if (strcasecmp (format_type_arg, "dos") == 0)
- {
- windows_flag = 1;
- shortname_flag = 1;
- }
- else if (!strcasecmp (format_type_arg, "mixed"))
- {
- windows_flag = 1;
- mixed_flag = 1;
- }
- else if (!strcasecmp (format_type_arg, "unix"))
- unix_flag = 1;
- else if (!strcasecmp (format_type_arg, "windows"))
- windows_flag = 1;
- else
- usage (stderr, 1);
- break;
-
- case 'A':
- allusers_flag = 1;
- break;
-
- case 'D':
- case 'H':
- case 'O':
- case 'P':
- case 'S':
- case 'W':
- ++output_flag;
- o = c;
- break;
-
- case 'F':
- if (!optarg)
- usage (stderr, 1);
- ++output_flag;
- output_arg = optarg;
- o = c;
- break;
-
- case 'i':
- ignore_flag = 1;
- break;
-
- case 'h':
- usage (stdout, 0);
- break;
-
- case 'v':
- print_version ();
- exit (0);
-
- default:
- usage (stderr, 1);
- break;
- }
- }
-
- /* If none of the "important" flags are set, -u is default. */
- if (!unix_flag && !windows_flag && !mode_flag
- && (!from_file ? !options_from_file_flag : 1))
- unix_flag = 1;
-
- /* Only one of ... */
- if (unix_flag + windows_flag + mode_flag > 1
- + (!from_file ? options_from_file_flag : 0))
- usage (stderr, 1);
-
- /* options_from_file_flag requires a file. */
- if (!from_file && options_from_file_flag && !file_arg)
- usage (stderr, 1);
-
- /* longname and shortname don't play well together. */
- if (longname_flag && shortname_flag)
- usage (stderr, 1);
-
- /* longname and shortname only make sense with Windows paths. */
- if ((longname_flag || shortname_flag) && !windows_flag)
- usage (stderr, 1);
-
- return o;
-}
-
-static void
-action (int argc, char **argv, int opt)
-{
- if (output_flag)
- {
- if (argv[optind])
- usage (stderr, 1);
-
- do_sysfolders (opt);
- }
- else
- {
- if (optind > argc - 1)
- usage (stderr, 1);
-
- for (int i = optind; argv[i]; i++)
- if (mode_flag)
- report_mode (argv[i]);
- else
- do_pathconv (argv[i]);
- }
-}
-
-int
-main (int argc, char **argv)
-{
- int o;
-
- prog_name = strrchr (argv[0], '/');
- if (!prog_name)
- prog_name = strrchr (argv[0], '\\');
- if (!prog_name)
- prog_name = argv[0];
- else
- prog_name++;
-
- o = do_options (argc, argv, 0);
-
- if (!file_arg)
- action (argc, argv, o);
- else
- {
- FILE *fp;
- char buf[PATH_MAX * 2 + 1];
-
- if (argv[optind])
- usage (stderr, 1);
-
- if (strcmp (file_arg, "-"))
- {
- if (!(fp = fopen (file_arg, "rt")))
- {
- perror ("cygpath");
- exit (1);
- }
- }
- else
- {
- fp = stdin;
- setmode (0, O_TEXT);
- }
- setbuf (stdout, NULL);
-
- while (fgets (buf, sizeof (buf), fp))
- {
- size_t azl = 0;
- int ac;
- char *az, **av;
- char *p = strchr (buf, '\n');
- if (p)
- *p = '\0';
- if (argz_create_sep (buf, ' ', &az, &azl))
- {
- perror ("cygpath");
- exit (1);
- }
- if (!az)
- continue;
- ac = argz_count (az, azl) + 1;
- av = (char **) malloc ((ac + 1) * sizeof (char *));
- if (!av)
- {
- perror ("cygpath");
- exit (1);
- }
- av[0] = prog_name;
- argz_extract (az, azl, av + 1);
- if (options_from_file_flag)
- o = do_options (ac, av, 1);
- else
- optind = 1;
- action (ac, av, o);
- free (az);
- free (av);
- }
- }
- exit (0);
-}
diff --git a/winsup/utils/dump_setup.cc b/winsup/utils/dump_setup.cc
deleted file mode 100644
index e3dacde..0000000
--- a/winsup/utils/dump_setup.cc
+++ /dev/null
@@ -1,510 +0,0 @@
-/* dump_setup.cc
-
- Copyright 2001 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <windows.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <io.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include "path.h"
-#if 0
-#include "zlib.h"
-#endif
-
-#ifndef ZLIB_VERSION
-typedef void * gzFile;
-#define gzgets(fp, buf, size) ({0;})
-#define gzclose(fp) ({0;})
-#endif
-
-static int package_len = 20;
-static unsigned int version_len = 10;
-
-
-typedef struct
-{
- char pkgtar[MAX_PATH + 1];
- char pkg[MAX_PATH + 1];
- char ver[MAX_PATH + 1];
- char tail[MAX_PATH + 1];
- char what[16];
-} fileparse;
-
-static int
-find_tar_ext (const char *path)
-{
- char *p = strchr (path, '\0') - 7;
- if (p <= path)
- return 0;
- if (*p == '.')
- {
- if (strcmp (p, ".tar.gz") != 0)
- return 0;
- }
- else if (--p <= path || strcmp (p, ".tar.bz2") != 0)
- return 0;
-
- return p - path;
-}
-
-static char *
-base (const char *s)
-{
- if (!s)
- return 0;
- const char *rv = s;
- while (*s)
- {
- if ((*s == '/' || *s == ':' || *s == '\\') && s[1])
- rv = s + 1;
- s++;
- }
- return (char *) rv;
-}
-
-/* Parse a filename into package, version, and extension components. */
-int
-parse_filename (const char *in_fn, fileparse& f)
-{
- char *p, *ver;
- char fn[strlen (in_fn) + 1];
-
- strcpy (fn, in_fn);
- int n = find_tar_ext (fn);
-
- if (!n)
- return 0;
-
- strcpy (f.tail, fn + n);
- fn[n] = '\0';
- f.pkg[0] = f.what[0] = '\0';
- p = base (fn);
- for (ver = p; *ver; ver++)
- if (*ver != '-')
- continue;
- else if (isdigit (ver[1]))
- {
- *ver++ = '\0';
- strcpy (f.pkg, p);
- break;
- }
- else if (strcasecmp (ver, "-src") == 0 ||
- strcasecmp (ver, "-patch") == 0)
- {
- *ver++ = '\0';
- strcpy (f.pkg, p);
- strcpy (f.what, strlwr (ver));
- strcpy (f.pkgtar, p);
- strcat (f.pkgtar, f.tail);
- ver = strchr (ver, '\0');
- break;
- }
-
- if (!f.pkg[0])
- strcpy (f.pkg, p);
-
- if (!f.what[0])
- {
- int n;
- p = strchr (ver, '\0');
- strcpy (f.pkgtar, in_fn);
- if ((p -= 4) >= ver && strcasecmp (p, "-src") == 0)
- n = 4;
- else if ((p -= 2) >= ver && strcasecmp (p, "-patch") == 0)
- n = 6;
- else
- n = 0;
- if (n)
- {
- strcpy (f.what, p + 1);
- *p = '\0';
- p = f.pkgtar + (p - fn) + n;
- memmove (p - 4, p, strlen (p));
- }
- }
-
- strcpy (f.ver, *ver ? ver : "0.0");
- return 1;
-}
-
-static bool
-dump_file (const char *msg, const char *fn)
-{
- char *path = cygpath ("/etc/setup/", fn, NULL);
- FILE *fp = fopen (path, "rt");
- bool printed;
- char buf[4096];
- if (!fp)
- printed = false;
- else if (!fgets (buf, 4096, fp))
- printed = false;
- {
- char *p = strchr (buf, '\0');
- printf ("%s%s%s", msg, buf, (p == buf) || p[-1] != '\n' ? "\n" : "");
- printed = true;
- }
- if (fp)
- fclose (fp);
- return printed;
-}
-
-struct pkgver
-{
- char *name;
- char *ver;
-};
-
-extern "C" {
-int
-compar (const void *a, const void *b)
-{
- const pkgver *pa = (const pkgver *) a;
- const pkgver *pb = (const pkgver *) b;
- return strcasecmp (pa->name, pb->name);
-}
-}
-
-int
-match_argv (char **argv, const char *name)
-{
- if (!argv || !*argv)
- return -1;
- for (char **a = argv; *a; a++)
- if (strcasecmp (*a, name) == 0)
- return a - argv + 1;
- return 0;
-}
-
-static bool
-could_not_access (int verbose, char *filename, char *package, const char *type)
-{
- switch (errno)
- {
- case ENOTDIR:
- break;
- case ENOENT:
- if (verbose)
- printf ("Missing %s: /%s from package %s\n",
- type, filename, package);
- return true;
- case EACCES:
- if (verbose)
- printf ("Unable to access %s /%s from package %s\n",
- type, filename, package);
- return true;
- }
- return false;
-}
-
-static bool
-directory_exists (int verbose, char *filename, char *package)
-{
- struct stat status;
- if (stat(cygpath("/", filename, ".", NULL), &status))
- {
- if (could_not_access (verbose, filename, package, "directory"))
- return false;
- }
- else if (!S_ISDIR(status.st_mode))
- {
- if (verbose)
- printf ("Directory/file mismatch: /%s from package %s\n", filename, package);
- return false;
- }
- return true;
-}
-
-static bool
-file_exists (int verbose, char *filename, const char *alt, char *package)
-{
- struct stat status;
- if (stat(cygpath("/", filename, NULL), &status) &&
- (!alt || stat(cygpath("/", filename, alt, NULL), &status)))
- {
- if (could_not_access (verbose, filename, package, "file"))
- return false;
- }
- else if (!S_ISREG(status.st_mode))
- {
- if (verbose)
- printf ("File type mismatch: /%s from package %s\n", filename, package);
- return false;
- }
- return true;
-}
-
-static gzFile
-open_package_list (char *package)
-{
- char filelist[MAX_PATH + 1] = "/etc/setup/";
- strcat (strcat (filelist, package), ".lst.gz");
- if (!file_exists (false, filelist + 1, NULL, NULL))
- return NULL;
-
- gzFile fp;
-#ifndef ZLIB_VERSION
- fp = NULL;
-#else
- char *fn = cygpath (filelist, NULL);
- fp = gzopen (fn, "rb9");
- free (fn);
-#endif
-
- return fp;
-}
-
-static bool
-check_package_files (int verbose, char *package)
-{
- gzFile fp = open_package_list (package);
- if (!fp)
- {
- if (verbose)
- printf ("Empty package %s\n", package);
- return true;
- }
-
- bool result = true;
- char buf[MAX_PATH + 1];
- while (gzgets (fp, buf, MAX_PATH))
- {
- char *filename = strtok(buf, "\n");
-
- if (*filename == '/')
- ++filename;
- else if (!strncmp (filename, "./", 2))
- filename += 2;
-
- if (filename[strlen (filename) - 1] == '/')
- {
- if (!directory_exists (verbose, filename, package))
- result = false;
- }
- else if (!strncmp (filename, "etc/postinstall/", 16))
- {
- if (!file_exists (verbose, filename, ".done", package))
- result = false;
- }
- else
- {
- if (!file_exists (verbose, filename, ".lnk", package))
- result = false;
- }
- }
-
- gzclose (fp);
- return result;
-}
-
-/**
- * Returns a calloc'd sorted list of packages or NULL if no info.
- * The last entry in the list is {NULL,NULL}.
- */
-static pkgver *
-get_packages (char **argv)
-{
- char *setup = cygpath ("/etc/setup/installed.db", NULL);
- FILE *fp = fopen (setup, "rt");
-
- if (fp == NULL)
- return NULL;
-
- int nlines;
- nlines = 0;
- char buf[4096];
- while (fgets (buf, 4096, fp))
- nlines += 2; /* potentially binary + source */
- if (!nlines)
- {
- fclose (fp);
- return NULL;
- }
- rewind (fp);
-
- pkgver *packages;
-
- packages = (pkgver *) calloc (nlines + 1, sizeof(packages[0]));
- int n;
- for (n = 0; fgets (buf, 4096, fp) && n < nlines;)
- {
- char *package = strtok (buf, " ");
- if (!package || !*package || !match_argv (argv, package))
- continue;
- for (int i = 0; i < 2; i++)
- {
- fileparse f;
- char *tar = strtok (NULL, " ");
- if (!tar || !*tar || !parse_filename (tar, f))
- break;
-
- int len = strlen (package);
- if (f.what[0])
- len += strlen (f.what) + 1;
- if (len > package_len)
- package_len = len;
- packages[n].name = (char *) malloc (len + 1);
- strcpy (packages[n].name, package);
- if (f.what[0])
- strcat (strcat (packages[n].name, "-"), f.what);
- packages[n].ver = strdup (f.ver);
- if (strlen(f.ver) > version_len)
- version_len = strlen(f.ver);
- n++;
- if (strtok (NULL, " ") == NULL)
- break;
- }
- }
-
- packages[n].name = packages[n].ver = NULL;
-
- qsort (packages, n, sizeof (packages[0]), compar);
-
- fclose (fp);
-
- return packages;
-}
-
-void
-dump_setup (int verbose, char **argv, bool check_files)
-{
- pkgver *packages = get_packages(argv);
-
- puts ("Cygwin Package Information");
- if (packages == NULL)
- {
- puts ("No setup information found");
- return;
- }
-
- if (verbose)
- {
- bool need_nl = dump_file ("Last downloaded files to: ", "last-cache");
- if (dump_file ("Last downloaded files from: ", "last-mirror") || need_nl)
- puts ("");
- }
-
- printf ("%-*s %-*s%s\n", package_len, "Package",
- check_files ? version_len : 7, "Version",
- check_files ? " Status" : "");
- for (int i = 0; packages[i].name; i++)
- {
- if (check_files)
- printf ("%-*s %-*s%s\n", package_len, packages[i].name,
- version_len, packages[i].ver,
- check_package_files (verbose, packages[i].name)
- ? " OK" : " Incomplete");
- else
- printf ("%-*s %s\n", package_len, packages[i].name, packages[i].ver);
- fflush(stdout);
- }
-
- free (packages);
-
- return;
-}
-
-void
-package_list (int verbose, char **argv)
-{
- pkgver *packages = get_packages(argv);
- if (packages == NULL)
- {
- puts ("No setup information found");
- return;
- }
-
- for (int i = 0; packages[i].name; i++)
- {
- gzFile fp = open_package_list (packages[i].name);
- if (!fp)
- {
- if (verbose)
- printf ("Can't open file list /etc/setup/%s.lst.gz for package %s\n",
- packages[i].name, packages[i].name);
- continue;
- }
-
- if (verbose)
- printf ("Package: %s-%s\n", packages[i].name, packages[i].ver);
-
- char buf[MAX_PATH + 1];
- while (gzgets (fp, buf, MAX_PATH))
- {
- char *lastchar = strchr(buf, '\n');
- if (lastchar[-1] != '/')
- printf ("%s/%s", (verbose?" ":""), buf);
- }
-
- gzclose (fp);
- }
-
- free (packages);
-
- return;
-}
-
-void
-package_find (int verbose, char **argv)
-{
- pkgver *packages = get_packages(NULL);
- if (packages == NULL)
- {
- puts ("No setup information found");
- return;
- }
-
- for (int i = 0; packages[i].name; i++)
- {
- gzFile fp = open_package_list (packages[i].name);
- if (!fp)
- continue;
-
- char buf[MAX_PATH + 2];
- buf[0] = '/';
- while (gzgets (fp, buf + 1, MAX_PATH))
- {
- char *filename = strtok(buf, "\n");
- int flen = strlen (filename);
- if (filename[flen - 1] != '/')
- {
- // FIXME: verify that /bin is mounted on /usr/bin; ditto for /lib
- bool is_alias = !strncmp(filename, "/usr/bin/", 9) ||
- !strncmp(filename, "/usr/lib/", 9);
- int a = match_argv (argv, filename);
- if (!a && is_alias)
- a = match_argv (argv, filename + 4);
- if (!a && !strcmp(filename + flen - 4, ".exe"))
- {
- filename[flen - 4] = '\0';
- a = match_argv (argv, filename);
- }
- if (!a && is_alias)
- a = match_argv (argv, filename + 4);
- if (a > 0)
- {
- if (verbose)
- printf ("%s: found in package ", filename);
- printf ("%s-%s\n", packages[i].name, packages[i].ver);
- }
- }
- }
-
- gzclose (fp);
- }
-
- free (packages);
-
- return;
-}
-
diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc
deleted file mode 100644
index 616c36b..0000000
--- a/winsup/utils/dumper.cc
+++ /dev/null
@@ -1,950 +0,0 @@
-/* dumper.cc
-
- Copyright 1999, 2001, 2002, 2004, 2006, 2007 Red Hat Inc.
-
- Written by Egor Duda <deo@logos-m.ru>
-
- This file is part of Cygwin.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License (file COPYING.dumper) for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#include <ansidecl.h>
-#include <bfd.h>
-#include <elf/common.h>
-#include <elf/external.h>
-#include <sys/procfs.h>
-#include <sys/cygwin.h>
-#include <getopt.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <windows.h>
-
-#include "dumper.h"
-
-#define NOTE_NAME_SIZE 16
-
-typedef struct _note_header
- {
- Elf_External_Note elf_note_header;
- char name[NOTE_NAME_SIZE - 1]; /* external note contains first byte of data */
- }
-#ifdef __GNUC__
-__attribute__ ((packed))
-#endif
- note_header;
-
-static const char version[] = "$Revision$";
-
-BOOL verbose = FALSE;
-
-int deb_printf (const char *format,...)
-{
- if (!verbose)
- return 0;
- va_list va;
- va_start (va, format);
- int ret_val = vprintf (format, va);
- va_end (va);
- return ret_val;
-}
-
-dumper::dumper (DWORD pid, DWORD tid, const char *file_name)
-{
- this->file_name = strdup (file_name);
-
- this->pid = pid;
- this->tid = tid;
- core_bfd = NULL;
- excl_list = new exclusion (20);
-
- list = last = NULL;
-
- status_section = NULL;
-
- memory_num = module_num = thread_num = 0;
-
- hProcess = OpenProcess (PROCESS_ALL_ACCESS,
- FALSE, /* no inheritance */
- pid);
- if (!hProcess)
- {
- fprintf (stderr, "Failed to open process #%lu, error %ld\n", pid, GetLastError ());
- return;
- }
-
- init_core_dump ();
-
- if (!sane ())
- dumper_abort ();
-}
-
-dumper::~dumper ()
-{
- close ();
- free (file_name);
-}
-
-void
-dumper::dumper_abort ()
-{
- close ();
- unlink (file_name);
-}
-
-void
-dumper::close ()
-{
- if (core_bfd)
- bfd_close (core_bfd);
- if (excl_list)
- delete excl_list;
- if (hProcess)
- CloseHandle (hProcess);
- core_bfd = NULL;
- hProcess = NULL;
- excl_list = NULL;
-}
-
-int
-dumper::sane ()
-{
- if (hProcess == NULL || core_bfd == NULL || excl_list == NULL)
- return 0;
- return 1;
-}
-
-void
-print_section_name (bfd* abfd, asection* sect, PTR obj)
-{
- deb_printf (" %s", bfd_get_section_name (abfd, sect));
-}
-
-void
-dumper::print_core_section_list ()
-{
- deb_printf ("current sections:");
- bfd_map_over_sections (core_bfd, &print_section_name, NULL);
- deb_printf ("\n");
-}
-
-process_entity *
-dumper::add_process_entity_to_list (process_entity_type type)
-{
- if (!sane ())
- return NULL;
-
- process_entity *new_entity = (process_entity *) malloc (sizeof (process_entity));
- if (new_entity == NULL)
- return NULL;
- new_entity->next = NULL;
- new_entity->section = NULL;
- if (last == NULL)
- list = new_entity;
- else
- last->next = new_entity;
- last = new_entity;
- return new_entity;
-}
-
-int
-dumper::add_thread (DWORD tid, HANDLE hThread)
-{
- if (!sane ())
- return 0;
-
- CONTEXT *pcontext;
-
- process_entity *new_entity = add_process_entity_to_list (pr_ent_thread);
- if (new_entity == NULL)
- return 0;
- new_entity->type = pr_ent_thread;
- thread_num++;
-
- new_entity->u.thread.tid = tid;
- new_entity->u.thread.hThread = hThread;
-
- pcontext = &(new_entity->u.thread.context);
- pcontext->ContextFlags = CONTEXT_FULL | CONTEXT_FLOATING_POINT;
- if (!GetThreadContext (hThread, pcontext))
- {
- deb_printf ("Failed to read thread context (tid=%x), error %ld\n", tid, GetLastError ());
- return 0;
- }
-
- deb_printf ("added thread %u\n", tid);
- return 1;
-}
-
-int
-dumper::add_mem_region (LPBYTE base, DWORD size)
-{
- if (!sane ())
- return 0;
-
- if (base == NULL || size == 0)
- return 1; // just ignore empty regions
-
- process_entity *new_entity = add_process_entity_to_list (pr_ent_memory);
- if (new_entity == NULL)
- return 0;
- new_entity->type = pr_ent_memory;
- memory_num++;
-
- new_entity->u.memory.base = base;
- new_entity->u.memory.size = size;
-
- deb_printf ("added memory region %08x-%08x\n", (DWORD) base, (DWORD) base + size);
- return 1;
-}
-
-/* split_add_mem_region scans list of regions to be excluded from dumping process
- (excl_list) and removes all "excluded" parts from given region. */
-int
-dumper::split_add_mem_region (LPBYTE base, DWORD size)
-{
- if (!sane ())
- return 0;
-
- if (base == NULL || size == 0)
- return 1; // just ignore empty regions
-
- LPBYTE last_base = base;
-
- for (process_mem_region * p = excl_list->region;
- p < excl_list->region + excl_list->last;
- p++)
- {
- if (p->base >= base + size || p->base + p->size <= base)
- continue;
-
- if (p->base <= base)
- {
- last_base = p->base + p->size;
- continue;
- }
-
- add_mem_region (last_base, p->base - last_base);
- last_base = p->base + p->size;
- }
-
- if (last_base < base + size)
- add_mem_region (last_base, base + size - last_base);
-
- return 1;
-}
-
-int
-dumper::add_module (LPVOID base_address)
-{
- if (!sane ())
- return 0;
-
- char *module_name = psapi_get_module_name (hProcess, (DWORD) base_address);
- if (module_name == NULL)
- return 1;
-
- process_entity *new_entity = add_process_entity_to_list (pr_ent_module);
- if (new_entity == NULL)
- return 0;
- new_entity->type = pr_ent_module;
- module_num++;
-
- new_entity->u.module.base_address = base_address;
- new_entity->u.module.name = module_name;
-
- parse_pe (module_name, excl_list);
-
- deb_printf ("added module %08x %s\n", base_address, module_name);
- return 1;
-}
-
-#define PAGE_BUFFER_SIZE 4096
-
-int
-dumper::collect_memory_sections ()
-{
- if (!sane ())
- return 0;
-
- LPBYTE current_page_address;
- LPBYTE last_base = (LPBYTE) 0xFFFFFFFF;
- DWORD last_size = 0;
- DWORD done;
-
- char mem_buf[PAGE_BUFFER_SIZE];
-
- MEMORY_BASIC_INFORMATION mbi;
-
- if (hProcess == NULL)
- return 0;
-
- for (current_page_address = 0; current_page_address < (LPBYTE) 0xFFFF0000;)
- {
- if (!VirtualQueryEx (hProcess, current_page_address, &mbi, sizeof (mbi)))
- break;
-
- int skip_region_p = 0;
-
- if (mbi.Protect & (PAGE_NOACCESS | PAGE_GUARD) ||
- mbi.State != MEM_COMMIT)
- skip_region_p = 1;
-
- if (!skip_region_p)
- {
- /* just to make sure that later we'll be able to read it.
- According to MS docs either region is all-readable or
- all-nonreadable */
- if (!ReadProcessMemory (hProcess, current_page_address, mem_buf, sizeof (mem_buf), &done))
- {
- DWORD err = GetLastError ();
- const char *pt[10];
- pt[0] = (mbi.Protect & PAGE_READONLY) ? "RO " : "";
- pt[1] = (mbi.Protect & PAGE_READWRITE) ? "RW " : "";
- pt[2] = (mbi.Protect & PAGE_WRITECOPY) ? "WC " : "";
- pt[3] = (mbi.Protect & PAGE_EXECUTE) ? "EX " : "";
- pt[4] = (mbi.Protect & PAGE_EXECUTE_READ) ? "EXRO " : "";
- pt[5] = (mbi.Protect & PAGE_EXECUTE_READWRITE) ? "EXRW " : "";
- pt[6] = (mbi.Protect & PAGE_EXECUTE_WRITECOPY) ? "EXWC " : "";
- pt[7] = (mbi.Protect & PAGE_GUARD) ? "GRD " : "";
- pt[8] = (mbi.Protect & PAGE_NOACCESS) ? "NA " : "";
- pt[9] = (mbi.Protect & PAGE_NOCACHE) ? "NC " : "";
- char buf[10 * 6];
- buf[0] = '\0';
- for (int i = 0; i < 10; i++)
- strcat (buf, pt[i]);
-
- deb_printf ("warning: failed to read memory at %08x-%08x (protect = %s), error %ld.\n",
- (DWORD) current_page_address,
- (DWORD) current_page_address + mbi.RegionSize,
- buf, err);
- skip_region_p = 1;
- }
- }
-
- if (!skip_region_p)
- {
- if (last_base + last_size == current_page_address)
- last_size += mbi.RegionSize;
- else
- {
- split_add_mem_region (last_base, last_size);
- last_base = (LPBYTE) mbi.BaseAddress;
- last_size = mbi.RegionSize;
- }
- }
- else
- {
- split_add_mem_region (last_base, last_size);
- last_base = NULL;
- last_size = 0;
- }
-
- current_page_address += mbi.RegionSize;
- }
-
- /* dump last sections, if any */
- split_add_mem_region (last_base, last_size);
- return 1;
-};
-
-int
-dumper::dump_memory_region (asection * to, process_mem_region * memory)
-{
- if (!sane ())
- return 0;
-
- DWORD size = memory->size;
- DWORD todo;
- DWORD done;
- LPBYTE pos = memory->base;
- DWORD sect_pos = 0;
-
- if (to == NULL || memory == NULL)
- return 0;
-
- char mem_buf[PAGE_BUFFER_SIZE];
-
- while (size > 0)
- {
- todo = min (size, PAGE_BUFFER_SIZE);
- if (!ReadProcessMemory (hProcess, pos, mem_buf, todo, &done))
- {
- deb_printf ("Failed to read process memory at %x(%x), error %ld\n", pos, todo, GetLastError ());
- return 0;
- }
- size -= done;
- pos += done;
- if (!bfd_set_section_contents (core_bfd, to, mem_buf, sect_pos, done))
- {
- bfd_perror ("writing memory region to bfd");
- dumper_abort ();
- return 0;
- };
- sect_pos += done;
- }
- return 1;
-}
-
-int
-dumper::dump_thread (asection * to, process_thread * thread)
-{
- if (!sane ())
- return 0;
-
- if (to == NULL || thread == NULL)
- return 0;
-
- win32_pstatus thread_pstatus;
-
- note_header header;
- bfd_putl32 (NOTE_NAME_SIZE, header.elf_note_header.namesz);
- bfd_putl32 (sizeof (thread_pstatus), header.elf_note_header.descsz);
- bfd_putl32 (NT_WIN32PSTATUS, header.elf_note_header.type);
- strncpy ((char *) &header.elf_note_header.name, "win32thread", NOTE_NAME_SIZE);
-
- thread_pstatus.data_type = NOTE_INFO_THREAD;
- thread_pstatus.data.thread_info.tid = thread->tid;
-
- if (tid == 0)
- {
- /* this is a special case. we don't know, which thread
- was active when exception occured, so let's blame
- the first one */
- thread_pstatus.data.thread_info.is_active_thread = TRUE;
- tid = (DWORD) - 1;
- }
- else if (tid > 0 && thread->tid == tid)
- thread_pstatus.data.thread_info.is_active_thread = TRUE;
- else
- thread_pstatus.data.thread_info.is_active_thread = FALSE;
-
- memcpy (&(thread_pstatus.data.thread_info.thread_context),
- &(thread->context),
- sizeof (thread->context));
-
- if (!bfd_set_section_contents (core_bfd, to, &header,
- 0,
- sizeof (header)) ||
- !bfd_set_section_contents (core_bfd, to, &thread_pstatus,
- sizeof (header),
- sizeof (thread_pstatus)))
- {
- bfd_perror ("writing thread info to bfd");
- dumper_abort ();
- return 0;
- };
- return 1;
-}
-
-int
-dumper::dump_module (asection * to, process_module * module)
-{
- if (!sane ())
- return 0;
-
- if (to == NULL || module == NULL)
- return 0;
-
- struct win32_pstatus *module_pstatus_ptr;
-
- int note_length = sizeof (struct win32_pstatus) + strlen (module->name);
-
- char *buf = (char *) malloc (note_length);
-
- if (!buf)
- {
- fprintf (stderr, "Error alloating memory. Dumping aborted.\n");
- goto out;
- };
-
- module_pstatus_ptr = (struct win32_pstatus *) buf;
-
- note_header header;
- bfd_putl32 (NOTE_NAME_SIZE, header.elf_note_header.namesz);
- bfd_putl32 (note_length, header.elf_note_header.descsz);
- bfd_putl32 (NT_WIN32PSTATUS, header.elf_note_header.type);
- strncpy ((char *) &header.elf_note_header.name, "win32module", NOTE_NAME_SIZE);
-
- module_pstatus_ptr->data_type = NOTE_INFO_MODULE;
- module_pstatus_ptr->data.module_info.base_address = module->base_address;
- module_pstatus_ptr->data.module_info.module_name_size = strlen (module->name) + 1;
- strcpy (module_pstatus_ptr->data.module_info.module_name, module->name);
-
- if (!bfd_set_section_contents (core_bfd, to, &header,
- 0,
- sizeof (header)) ||
- !bfd_set_section_contents (core_bfd, to, module_pstatus_ptr,
- sizeof (header),
- note_length))
- {
- bfd_perror ("writing module info to bfd");
- goto out;
- };
- return 1;
-
-out:
- if (buf)
- free (buf);
- dumper_abort ();
- return 0;
-
-}
-
-int
-dumper::collect_process_information ()
-{
- int exception_level = 0;
-
- if (!sane ())
- return 0;
-
- if (!DebugActiveProcess (pid))
- {
- fprintf (stderr, "Cannot attach to process #%lu, error %ld", pid, GetLastError ());
- return 0;
- }
-
- char event_name[sizeof ("cygwin_error_start_event") + 20];
- sprintf (event_name, "cygwin_error_start_event%16lx", pid);
- HANDLE sync_with_debugee = OpenEvent (EVENT_MODIFY_STATE, FALSE, event_name);
-
- DEBUG_EVENT current_event;
-
- while (1)
- {
- if (!WaitForDebugEvent (&current_event, 20000))
- return 0;
-
- deb_printf ("got debug event %d\n", current_event.dwDebugEventCode);
-
- switch (current_event.dwDebugEventCode)
- {
- case CREATE_THREAD_DEBUG_EVENT:
-
- if (!add_thread (current_event.dwThreadId,
- current_event.u.CreateThread.hThread))
- goto failed;
-
- break;
-
- case CREATE_PROCESS_DEBUG_EVENT:
-
- if (!add_module (current_event.u.CreateProcessInfo.lpBaseOfImage) ||
- !add_thread (current_event.dwThreadId,
- current_event.u.CreateProcessInfo.hThread))
- goto failed;
-
- break;
-
- case EXIT_PROCESS_DEBUG_EVENT:
-
- deb_printf ("debugee quits");
- ContinueDebugEvent (current_event.dwProcessId,
- current_event.dwThreadId,
- DBG_CONTINUE);
-
- return 1;
-
- break;
-
- case LOAD_DLL_DEBUG_EVENT:
-
- if (!add_module (current_event.u.LoadDll.lpBaseOfDll))
- goto failed;
-
- break;
-
- case EXCEPTION_DEBUG_EVENT:
-
- exception_level++;
- if (exception_level == 2)
- break;
- else if (exception_level > 2)
- return 0;
-
- collect_memory_sections ();
-
- /* got all info. time to dump */
-
- if (!prepare_core_dump ())
- {
- fprintf (stderr, "Failed to prepare core dump\n");
- goto failed;
- };
-
- if (!write_core_dump ())
- {
- fprintf (stderr, "Failed to write core dump\n");
- goto failed;
- };
-
- /* signal a debugee that we've finished */
- if (sync_with_debugee)
- SetEvent (sync_with_debugee);
-
- break;
-
- default:
-
- break;
-
- }
-
- ContinueDebugEvent (current_event.dwProcessId,
- current_event.dwThreadId,
- DBG_CONTINUE);
- }
-failed:
- /* set debugee free */
- if (sync_with_debugee)
- SetEvent (sync_with_debugee);
-
- return 0;
-}
-
-int
-dumper::init_core_dump ()
-{
- bfd_init ();
-
- core_bfd = bfd_openw (file_name, "elf32-i386");
- if (core_bfd == NULL)
- {
- bfd_perror ("opening bfd");
- goto failed;
- }
-
- if (!bfd_set_format (core_bfd, bfd_core))
- {
- bfd_perror ("setting bfd format");
- goto failed;
- }
-
- if (!bfd_set_arch_mach (core_bfd, bfd_arch_i386, 0))
- {
- bfd_perror ("setting bfd architecture");
- goto failed;
- }
-
- return 1;
-
-failed:
- dumper_abort ();
- return 0;
-
-}
-
-int
-dumper::prepare_core_dump ()
-{
- if (!sane ())
- return 0;
-
- int sect_no = 0;
- char sect_name[50];
-
- flagword sect_flags;
- DWORD sect_size;
- bfd_vma sect_vma;
-
- asection *new_section;
-
- for (process_entity * p = list; p != NULL; p = p->next)
- {
- sect_no++;
-
- unsigned long phdr_type = PT_LOAD;
-
- switch (p->type)
- {
- case pr_ent_memory:
- sprintf (sect_name, ".mem/%u", sect_no);
- sect_flags = SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD;
- sect_size = p->u.memory.size;
- sect_vma = (bfd_vma) (p->u.memory.base);
- phdr_type = PT_LOAD;
- break;
-
- case pr_ent_thread:
- sprintf (sect_name, ".note/%u", sect_no);
- sect_flags = SEC_HAS_CONTENTS | SEC_LOAD;
- sect_size = sizeof (note_header) + sizeof (struct win32_pstatus);
- sect_vma = 0;
- phdr_type = PT_NOTE;
- break;
-
- case pr_ent_module:
- sprintf (sect_name, ".note/%u", sect_no);
- sect_flags = SEC_HAS_CONTENTS | SEC_LOAD;
- sect_size = sizeof (note_header) + sizeof (struct win32_pstatus) +
- (bfd_size_type) (strlen (p->u.module.name));
- sect_vma = 0;
- phdr_type = PT_NOTE;
- break;
-
- default:
- continue;
- }
-
- if (p->type == pr_ent_module && status_section != NULL)
- {
- if (!bfd_set_section_size (core_bfd,
- status_section,
- (bfd_get_section_size (status_section)
- + sect_size)))
- {
- bfd_perror ("resizing status section");
- goto failed;
- };
- continue;
- }
-
- deb_printf ("creating section (type%u) %s(%u), flags=%08x\n",
- p->type, sect_name, sect_size, sect_flags);
-
- bfd_set_error (bfd_error_no_error);
- char *buf = strdup (sect_name);
- new_section = bfd_make_section (core_bfd, buf);
- if (new_section == NULL)
- {
- if (bfd_get_error () == bfd_error_no_error)
- fprintf (stderr, "error creating new section (%s), section already exists.\n", buf);
- else
- bfd_perror ("creating section");
- goto failed;
- }
-
- if (!bfd_set_section_flags (core_bfd, new_section, sect_flags) ||
- !bfd_set_section_size (core_bfd, new_section, sect_size))
- {
- bfd_perror ("setting section attributes");
- goto failed;
- };
-
- new_section->vma = sect_vma;
- new_section->lma = 0;
- new_section->output_section = new_section;
- new_section->output_offset = 0;
- p->section = new_section;
- int section_count = 1;
-
- bfd_boolean filehdr = 0;
- bfd_boolean phdrs = 0;
-
- bfd_vma at = 0;
- bfd_boolean valid_at = 0;
-
- flagword flags = 0;
- bfd_boolean valid_flags = 1;
-
- if (p->type == pr_ent_memory)
- {
- MEMORY_BASIC_INFORMATION mbi;
- if (!VirtualQueryEx (hProcess, (LPVOID)sect_vma, &mbi, sizeof (mbi)))
- {
- bfd_perror ("getting mem region flags");
- goto failed;
- }
-
- static const struct
- {
- DWORD protect;
- flagword flags;
- } mappings[] =
- {
- { PAGE_READONLY, PF_R },
- { PAGE_READWRITE, PF_R | PF_W },
- { PAGE_WRITECOPY, PF_W },
- { PAGE_EXECUTE, PF_X },
- { PAGE_EXECUTE_READ, PF_X | PF_R },
- { PAGE_EXECUTE_READWRITE, PF_X | PF_R | PF_W },
- { PAGE_EXECUTE_WRITECOPY, PF_X | PF_W }
- };
-
- for (size_t i = 0;
- i < sizeof (mappings) / sizeof (mappings[0]);
- i++)
- if ((mbi.Protect & mappings[i].protect) != 0)
- flags |= mappings[i].flags;
- }
-
- if (!bfd_record_phdr (core_bfd, phdr_type,
- valid_flags, flags,
- valid_at, at,
- filehdr, phdrs,
- section_count, &new_section))
- {
- bfd_perror ("recording program headers");
- goto failed;
- }
- }
- return 1;
-
-failed:
- dumper_abort ();
- return 0;
-}
-
-int
-dumper::write_core_dump ()
-{
- if (!sane ())
- return 0;
-
- for (process_entity * p = list; p != NULL; p = p->next)
- {
- if (p->section == NULL)
- continue;
-
- deb_printf ("writing section type=%u base=%08x size=%08x flags=%08x\n",
- p->type,
- p->section->vma,
- bfd_get_section_size (p->section),
- p->section->flags);
-
- switch (p->type)
- {
- case pr_ent_memory:
- dump_memory_region (p->section, &(p->u.memory));
- break;
-
- case pr_ent_thread:
- dump_thread (p->section, &(p->u.thread));
- break;
-
- case pr_ent_module:
- dump_module (p->section, &(p->u.module));
- break;
-
- default:
- continue;
-
- }
- }
- return 1;
-}
-
-static void
-usage (FILE *stream, int status)
-{
- fprintf (stream, "\
-Usage: dumper [OPTION] FILENAME WIN32PID\n\
-Dump core from WIN32PID to FILENAME.core\n\
-\n\
- -d, --verbose be verbose while dumping\n\
- -h, --help output help information and exit\n\
- -q, --quiet be quiet while dumping (default)\n\
- -v, --version output version information and exit\n\
-");
- exit (status);
-}
-
-struct option longopts[] = {
- {"verbose", no_argument, NULL, 'd'},
- {"help", no_argument, NULL, 'h'},
- {"quiet", no_argument, NULL, 'q'},
- {"version", no_argument, 0, 'v'},
- {0, no_argument, NULL, 0}
-};
-
-static void
-print_version ()
-{
- const char *v = strchr (version, ':');
- int len;
- if (!v)
- {
- v = "?";
- len = 1;
- }
- else
- {
- v += 2;
- len = strchr (v, ' ') - v;
- }
- printf ("\
-dumper (cygwin) %.*s\n\
-Core Dumper for Cygwin\n\
-Copyright 1999, 2001, 2002 Red Hat, Inc.\n", len, v);
-}
-
-int
-main (int argc, char **argv)
-{
- int opt;
- const char *p = "";
- DWORD pid;
-
- while ((opt = getopt_long (argc, argv, "dqhv", longopts, NULL) ) != EOF)
- switch (opt)
- {
- case 'd':
- verbose = TRUE;
- break;
- case 'q':
- verbose = FALSE;
- break;
- case 'h':
- usage (stdout, 0);
- case 'v':
- print_version ();
- exit (0);
- default:
- usage (stderr, 1);
- break;
- }
-
- if (argv && *(argv + optind) && *(argv + optind +1))
- {
- ssize_t len = cygwin_conv_path (CCP_POSIX_TO_WIN_A | CCP_RELATIVE,
- *(argv + optind), NULL, 0);
- char *win32_name = (char *) alloca (len);
- cygwin_conv_path (CCP_POSIX_TO_WIN_A | CCP_RELATIVE, *(argv + optind),
- win32_name, len);
- if ((p = strrchr (win32_name, '\\')))
- p++;
- else
- p = win32_name;
- pid = strtoul (*(argv + optind + 1), NULL, 10);
- }
- else
- {
- usage (stderr, 1);
- return -1;
- }
-
- char *core_file = (char *) malloc (strlen (p) + sizeof (".core"));
- if (!core_file)
- {
- fprintf (stderr, "error allocating memory\n");
- return -1;
- }
- sprintf (core_file, "%s.core", p);
-
- DWORD tid = 0;
-
- if (verbose)
- printf ("dumping process #%lu to %s\n", pid, core_file);
-
- dumper d (pid, tid, core_file);
- if (!d.sane ())
- return -1;
- d.collect_process_information ();
- free (core_file);
-
- return 0;
-};
diff --git a/winsup/utils/dumper.h b/winsup/utils/dumper.h
deleted file mode 100644
index 4b8d2bd..0000000
--- a/winsup/utils/dumper.h
+++ /dev/null
@@ -1,142 +0,0 @@
-/* dumper.h
-
- Copyright 1999,2001 Red Hat Inc.
-
- Written by Egor Duda <deo@logos-m.ru>
-
- This file is part of Cygwin.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License (file COPYING.dumper) for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _DUMPER_H_
-#define _DUMPER_H_
-
-#include <windows.h>
-
-typedef struct
-{
- LPBYTE base;
- DWORD size;
-} process_mem_region;
-
-typedef struct
-{
- DWORD tid;
- HANDLE hThread;
- CONTEXT context;
-} process_thread;
-
-typedef struct
-{
- LPVOID base_address;
- char* name;
-} process_module;
-
-enum process_entity_type
-{
- pr_ent_memory,
- pr_ent_thread,
- pr_ent_module
-};
-
-typedef struct _process_entity
-{
- process_entity_type type;
- union
- {
- process_thread thread;
- process_mem_region memory;
- process_module module;
- } u;
- asection* section;
- struct _process_entity* next;
-} process_entity;
-
-class exclusion
-{
-public:
- int last;
- int size;
- int step;
- process_mem_region* region;
-
- exclusion ( int step ) { last = size = 0;
- this->step = step;
- region = NULL; }
- ~exclusion () { free ( region ); }
- int add ( LPBYTE mem_base, DWORD mem_size );
- int sort_and_check ();
-};
-
-#define PAGE_BUFFER_SIZE 4096
-
-class dumper
-{
- DWORD pid;
- DWORD tid; /* thread id of active thread */
- HANDLE hProcess;
- process_entity* list;
- process_entity* last;
- exclusion* excl_list;
-
- char* file_name;
- bfd* core_bfd;
-
- asection* status_section;
-
- int memory_num;
- int module_num;
- int thread_num;
-
- void close ();
- void dumper_abort ();
-
- process_entity* add_process_entity_to_list ( process_entity_type type );
- int add_thread ( DWORD tid, HANDLE hThread );
- int add_mem_region ( LPBYTE base, DWORD size );
-
- /* break mem_region by excl_list and add add all subregions */
- int split_add_mem_region ( LPBYTE base, DWORD size );
-
- int add_module ( LPVOID base_address );
-
- int collect_memory_sections ();
- int dump_memory_region ( asection* to, process_mem_region* memory );
- int dump_thread ( asection* to, process_thread* thread );
- int dump_module ( asection* to, process_module* module );
-
-public:
- int sane ();
-
- int collect_process_information ();
- void print_core_section_list ();
-
- dumper ( DWORD pid, DWORD tid, const char* name );
- ~dumper ();
-
- int init_core_dump ();
- int prepare_core_dump ();
- int write_core_dump ();
-};
-
-extern int deb_printf ( const char* format, ... );
-
-extern char* psapi_get_module_name ( HANDLE hProcess, DWORD BaseAddress );
-
-extern int parse_pe ( const char* file_name, exclusion* excl_list );
-
-extern BOOL verbose;
-
-#endif
diff --git a/winsup/utils/getfacl.c b/winsup/utils/getfacl.c
deleted file mode 100644
index 0afcd69..0000000
--- a/winsup/utils/getfacl.c
+++ /dev/null
@@ -1,256 +0,0 @@
-/* getfacl.c
-
- Copyright 2000, 2001, 2002 Red Hat Inc.
-
- Written by Corinna Vinschen <vinschen@redhat.com>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <pwd.h>
-#include <grp.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/acl.h>
-#include <sys/stat.h>
-#include <string.h>
-
-static const char version[] = "$Revision$";
-static char *prog_name;
-
-char *
-permstr (mode_t perm)
-{
- static char pbuf[4];
-
- pbuf[0] = (perm & S_IROTH) ? 'r' : '-';
- pbuf[1] = (perm & S_IWOTH) ? 'w' : '-';
- pbuf[2] = (perm & S_IXOTH) ? 'x' : '-';
- pbuf[3] = '\0';
- return pbuf;
-}
-
-const char *
-username (uid_t uid)
-{
- static char ubuf[256];
- struct passwd *pw;
-
- if ((pw = getpwuid (uid)))
- strcpy (ubuf, pw->pw_name);
- else
- sprintf (ubuf, "%lu <unknown>", (unsigned long)uid);
- return ubuf;
-}
-
-const char *
-groupname (gid_t gid)
-{
- static char gbuf[256];
- struct group *gr;
-
- if ((gr = getgrgid (gid)))
- strcpy (gbuf, gr->gr_name);
- else
- sprintf (gbuf, "%lu <unknown>", (unsigned long)gid);
- return gbuf;
-}
-
-static void
-usage (FILE * stream)
-{
- fprintf (stream, "Usage: %s [-adn] FILE [FILE2...]\n"
- "Display file and directory access control lists (ACLs).\n"
- "\n"
- " -a, --all display the filename, the owner, the group, and\n"
- " the ACL of the file\n"
- " -d, --dir display the filename, the owner, the group, and\n"
- " the default ACL of the directory, if it exists\n"
- " -h, --help output usage information and exit\n"
- " -n, --noname display user and group IDs instead of names\n"
- " -v, --version output version information and exit\n"
- "\n"
- "When multiple files are specified on the command line, a blank\n"
- "line separates the ACLs for each file.\n", prog_name);
- if (stream == stdout)
- {
- fprintf (stream, ""
- "For each argument that is a regular file, special file or\n"
- "directory, getfacl displays the owner, the group, and the ACL.\n"
- "For directories getfacl displays additionally the default ACL.\n"
- "\n"
- "With no options specified, getfacl displays the filename, the\n"
- "owner, the group, and both the ACL and the default ACL, if it\n"
- "exists.\n"
- "\n"
- "The format for ACL output is as follows:\n"
- " # file: filename\n"
- " # owner: name or uid\n"
- " # group: name or uid\n"
- " user::perm\n"
- " user:name or uid:perm\n"
- " group::perm\n"
- " group:name or gid:perm\n"
- " mask:perm\n"
- " other:perm\n"
- " default:user::perm\n"
- " default:user:name or uid:perm\n"
- " default:group::perm\n"
- " default:group:name or gid:perm\n"
- " default:mask:perm\n"
- " default:other:perm\n"
- "\n");
- }
-}
-
-struct option longopts[] = {
- {"all", no_argument, NULL, 'a'},
- {"dir", no_argument, NULL, 'd'},
- {"help", no_argument, NULL, 'h'},
- {"noname", no_argument, NULL, 'n'},
- {"version", no_argument, NULL, 'v'},
- {0, no_argument, NULL, 0}
-};
-
-static void
-print_version ()
-{
- const char *v = strchr (version, ':');
- int len;
- if (!v)
- {
- v = "?";
- len = 1;
- }
- else
- {
- v += 2;
- len = strchr (v, ' ') - v;
- }
- printf ("\
-getfacl (cygwin) %.*s\n\
-ACL Utility\n\
-Copyright (c) 2000, 2001, 2002 Red Hat, Inc.\n\
-Compiled on %s\n\
-", len, v, __DATE__);
-}
-
-int
-main (int argc, char **argv)
-{
- int c, i;
- int aopt = 0;
- int dopt = 0;
- int nopt = 0;
- int first = 1;
- struct stat st;
- aclent_t acls[MAX_ACL_ENTRIES];
-
- prog_name = strrchr (argv[0], '/');
- if (prog_name == NULL)
- prog_name = strrchr (argv[0], '\\');
- if (prog_name == NULL)
- prog_name = argv[0];
- else
- prog_name++;
-
- while ((c = getopt_long (argc, argv, "adhnv", longopts, NULL)) != EOF)
- switch (c)
- {
- case 'a':
- aopt = 1;
- break;
- case 'd':
- dopt = 1;
- break;
- case 'h':
- usage (stdout);
- return 0;
- case 'n':
- nopt = 1;
- break;
- case 'v':
- print_version ();
- return 0;
- default:
- usage (stderr);
- return 1;
- }
- if (optind > argc - 1)
- {
- usage (stderr);
- return 1;
- }
- while ((c = optind++) < argc)
- {
- if (stat (argv[c], &st))
- {
- perror (argv[0]);
- continue;
- }
- if (!first)
- putchar ('\n');
- first = 0;
- printf ("# file: %s\n", argv[c]);
- if (nopt)
- {
- printf ("# owner: %lu\n", (unsigned long)st.st_uid);
- printf ("# group: %lu\n", (unsigned long)st.st_gid);
- }
- else
- {
- printf ("# owner: %s\n", username (st.st_uid));
- printf ("# group: %s\n", groupname (st.st_gid));
- }
- if ((c = acl (argv[c], GETACL, MAX_ACL_ENTRIES, acls)) < 0)
- {
- perror (argv[0]);
- continue;
- }
- for (i = 0; i < c; ++i)
- {
- if (acls[i].a_type & ACL_DEFAULT)
- {
- if (aopt)
- continue;
- printf ("default:");
- }
- else if (dopt)
- continue;
- switch (acls[i].a_type & ~ACL_DEFAULT)
- {
- case USER_OBJ:
- printf ("user::");
- break;
- case USER:
- if (nopt)
- printf ("user:%lu:", (unsigned long)acls[i].a_id);
- else
- printf ("user:%s:", username (acls[i].a_id));
- break;
- case GROUP_OBJ:
- printf ("group::");
- break;
- case GROUP:
- if (nopt)
- printf ("group:%lu:", (unsigned long)acls[i].a_id);
- else
- printf ("group:%s:", groupname (acls[i].a_id));
- break;
- case CLASS_OBJ:
- printf ("mask:");
- break;
- case OTHER_OBJ:
- printf ("other:");
- break;
- }
- printf ("%s\n", permstr (acls[i].a_perm));
- }
- }
- return 0;
-}
diff --git a/winsup/utils/kill.cc b/winsup/utils/kill.cc
deleted file mode 100644
index f43ef77..0000000
--- a/winsup/utils/kill.cc
+++ /dev/null
@@ -1,302 +0,0 @@
-/* kill.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <string.h>
-#include <time.h>
-#include <errno.h>
-#include <windows.h>
-#include <sys/cygwin.h>
-#include <getopt.h>
-#include <limits.h>
-
-static const char version[] = "$Revision$";
-static char *prog_name;
-
-static struct option longopts[] =
-{
- {"help", no_argument, NULL, 'h' },
- {"list", optional_argument, NULL, 'l'},
- {"force", no_argument, NULL, 'f'},
- {"signal", required_argument, NULL, 's'},
- {"version", no_argument, NULL, 'v'},
- {NULL, 0, NULL, 0}
-};
-
-static char opts[] = "hl::fs:v";
-
-static void
-usage (FILE *where = stderr)
-{
- fprintf (where , ""
- "Usage: %s [-f] [-signal] [-s signal] pid1 [pid2 ...]\n"
- " %s -l [signal]\n"
- "Send signals to processes\n"
- "\n"
- " -f, --force force, using win32 interface if necessary\n"
- " -l, --list print a list of signal names\n"
- " -s, --signal send signal (use %s --list for a list)\n"
- " -h, --help output usage information and exit\n"
- " -v, --version output version information and exit\n"
- "", prog_name, prog_name, prog_name);
- exit (where == stderr ? 1 : 0);
-}
-
-static void
-print_version ()
-{
- const char *v = strchr (version, ':');
- int len;
- if (!v)
- {
- v = "?";
- len = 1;
- }
- else
- {
- v += 2;
- len = strchr (v, ' ') - v;
- }
- printf ("\
-%s (cygwin) %.*s\n\
-Process Signaller\n\
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.\n\
-Compiled on %s\n\
-", prog_name, len, v, __DATE__);
-}
-
-static const char *
-strsigno (int signo)
-{
- if (signo >= 0 && signo < NSIG)
- return sys_sigabbrev[signo];
- static char buf[sizeof ("Unknown signal") + 32];
- sprintf (buf, "Unknown signal %d", signo);
- return buf;
-}
-
-static int
-getsig (const char *in_sig)
-{
- const char *sig;
- char buf[80];
- int intsig;
-
- if (strncmp (in_sig, "SIG", 3) == 0)
- sig = in_sig;
- else
- {
- sprintf (buf, "SIG%-.20s", in_sig);
- sig = buf;
- }
- intsig = strtosigno (sig) ?: atoi (in_sig);
- char *p;
- if (!intsig && (strcmp (buf, "SIG0") != 0 && (strtol (in_sig, &p, 10) != 0 || *p)))
- intsig = -1;
- return intsig;
-}
-
-static void
-test_for_unknown_sig (int sig, const char *sigstr)
-{
- if (sig < 0 || sig > NSIG)
- {
- fprintf (stderr, "%s: unknown signal: %s\n", prog_name, sigstr);
- usage ();
- exit (1);
- }
-}
-
-static void
-listsig (const char *in_sig)
-{
- int sig;
- if (!in_sig)
- for (sig = 1; sig < NSIG - 1; sig++)
- printf ("%s%c", strsigno (sig) + 3, (sig < NSIG - 1) ? ' ' : '\n');
- else
- {
- sig = getsig (in_sig);
- test_for_unknown_sig (sig, in_sig);
- if (atoi (in_sig) == sig)
- puts (strsigno (sig) + 3);
- else
- printf ("%d\n", sig);
- }
-}
-
-static void
-get_debug_priv (void)
-{
- HANDLE tok;
- LUID luid;
- TOKEN_PRIVILEGES tkp;
-
- if (!OpenProcessToken (GetCurrentProcess (),
- TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &tok))
- return;
-
- if (!LookupPrivilegeValue (NULL, SE_DEBUG_NAME, &luid))
- {
- CloseHandle (tok);
- return;
- }
-
- tkp.PrivilegeCount = 1;
- tkp.Privileges[0].Luid = luid;
- tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
-
- AdjustTokenPrivileges (tok, FALSE, &tkp, sizeof tkp, NULL, NULL);
-
- CloseHandle (tok);
-}
-
-static void __stdcall
-forcekill (int pid, int sig, int wait)
-{
- // try to acquire SeDebugPrivilege
- get_debug_priv();
-
- external_pinfo *p = NULL;
- /* cygwin_internal misinterprets negative pids (Win9x pids) */
- if (pid > 0)
- p = (external_pinfo *) cygwin_internal (CW_GETPINFO_FULL, pid);
- DWORD dwpid = p ? p->dwProcessId : (DWORD) pid;
- HANDLE h = OpenProcess (PROCESS_TERMINATE, FALSE, (DWORD) dwpid);
- if (!h)
- {
- if (!wait || GetLastError () != ERROR_INVALID_PARAMETER)
- fprintf (stderr, "%s: couldn't open pid %u\n",
- prog_name, (unsigned) dwpid);
- return;
- }
- if (!wait || WaitForSingleObject (h, 200) != WAIT_OBJECT_0)
- if (sig && !TerminateProcess (h, sig << 8)
- && WaitForSingleObject (h, 200) != WAIT_OBJECT_0)
- fprintf (stderr, "%s: couldn't kill pid %u, %lu\n",
- prog_name, (unsigned) dwpid, GetLastError ());
- CloseHandle (h);
-}
-
-int
-main (int argc, char **argv)
-{
- int sig = SIGTERM;
- int force = 0;
- int ret = 0;
- char *gotasig = NULL;
-
- prog_name = strrchr (argv[0], '/');
- if (prog_name == NULL)
- prog_name = strrchr (argv[0], '\\');
- if (prog_name == NULL)
- prog_name = argv[0];
- else
- prog_name++;
-
- if (argc == 1)
- usage ();
-
- opterr = 0;
-
- char *p;
- long long int pid = 0;
-
- for (;;)
- {
- int ch;
- char **av = argv + optind;
- if ((ch = getopt_long (argc, argv, opts, longopts, NULL)) == EOF)
- break;
- switch (ch)
- {
- case 's':
- gotasig = optarg;
- sig = getsig (gotasig);
- break;
- case 'l':
- if (!optarg)
- {
- optarg = argv[optind];
- if (optarg)
- {
- optind++;
- optreset = 1;
- }
- }
- if (argv[optind])
- usage ();
- listsig (optarg);
- break;
- case 'f':
- force = 1;
- break;
- case 'h':
- usage (stdout);
- break;
- case 'v':
- print_version ();
- break;
- case '?':
- if (gotasig)
- {
- pid = strtoll (argv[optind], &p, 10);
- if (pid < 0)
- goto out;
- usage ();
- }
- optreset = 1;
- optind = 1 + av - argv;
- gotasig = *av + 1;
- sig = getsig (gotasig);
- break;
- default:
- usage ();
- break;
- }
- }
-
-out:
- test_for_unknown_sig (sig, gotasig);
-
- argv += optind;
- while (*argv != NULL)
- {
- if (!pid)
- pid = strtoll (*argv, &p, 10);
- if (*p != '\0'
- || (!force && (pid < LONG_MIN || pid > LONG_MAX))
- || (force && (pid <= 0 || pid > ULONG_MAX)))
- {
- fprintf (stderr, "%s: illegal pid: %s\n", prog_name, *argv);
- ret = 1;
- }
- else if (pid <= LONG_MAX && kill ((pid_t) pid, sig) == 0)
- {
- if (force)
- forcekill ((pid_t) pid, sig, 1);
- }
- else if (force)
- forcekill ((pid_t) pid, sig, 0);
- else
- {
- char buf[1000];
- sprintf (buf, "%s: %lld", prog_name, pid);
- perror (buf);
- ret = 1;
- }
- argv++;
- pid = 0;
- }
- return ret;
-}
-
diff --git a/winsup/utils/mingw b/winsup/utils/mingw
deleted file mode 100755
index 63bfb02..0000000
--- a/winsup/utils/mingw
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/bin/sh
-# Front-end kludge to cause a Cygwin gcc to default to
-# an installed version of the MinGW components.
-
-#
-# Find the path to the compiler.
-#
-compiler=$1; shift
-dir=$(cd $(dirname $("$compiler" -print-prog-name=ld))/../..; pwd)
-
-#
-# The mingw32 directory should live somewhere close by to the
-# compiler. Search for it.
-#
-[ "$dir" = '/' ] && dir=''
-mingw_dir=''
-for d in "$dir"/*-mingw32 "$dir"/usr/*-mingw32 "$dir"/*-mingw* "$dir"/usr/*-mingw*; do
- case "$d" in
- *\**) continue ;;
- *) mingw_dir=$d; break;
- esac
-done
-
-if [ -z "$mingw_dir" ]; then
- echo "$0: couldn't find i686-pc-mingw32 directory" 1>&2
- exit 1
-fi
-
-#
-# Inspect each argument throwing away ones that seem to try to include the
-# Cygwin environment.
-#
-newargs=()
-sawcomp() { return 1; }
-sawcfile() { return 1; }
-sawofile() { return 1; }
-sawshared() { return 1; }
-sawnostdinc() { return 1; }
-sawnostdlib() { return 1; }
-eatnext() { return 1; }
-pushnext() { return 1; }
-for f do
- if eatnext; then
- eatnext() { return 1; }
- continue;
- fi
- if pushnext; then
- pushnext() { return 1; }
- else
- case "$f" in
- *cygwin/include*|*newlib|-mno-cygwin) continue ;;
- -c|-E) sawcomp() { return 0; } ;;
- -xc*) sawcfile() { return 0; } ;;
- -isystem) eatnext() { return 0; }; continue ;;
- -o) pushnext() { return 0; } ;;
- -nostdinc*) sawnostdinc() { return 0; } ;;
- -nostdlib) sawnostdlib() { return 0; } ;;
- -shared|-Wl,-shared) sawshared() { return 0; } ;;
- -*) ;;
- *.cc|*.c|*.s|*.S|*.i|*.ii) sawcfile() { return 0; } ;;
- *.o) sawofile() { return 0; };;
- esac
- fi
- newargs[${#newargs[*]}]="$f"
-done
-
-# Set up a new set of arguments + also search the installed mingw
-# directory.
-set -- -B"$mingw_dir"/lib/ "${newargs[@]}"
-
-# Add some default options depending on whether this looks like
-# an attempt to link, compile, or both.
-if sawcomp || sawcfile; then
- ccdir=$(dirname $($compiler -print-libgcc-file-name))
- sawnostdinc || set -- -isystem "$ccdir"/include -I"${mingw_dir}"/include "$@"
- set -- -D__MINGW32__ -D__MSVCRT__ -DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ -U__CYGWIN__ -Uunix -U__unix__ -U__unix -U __CYGWIN32__ "$@"
- if ! sawnostdinc; then
- case "$compiler" in
- *++*) set -- -nostdinc++ "$@" ;;
- *) set -- -nostdinc "$@" ;;
- esac
- fi
-fi
-
-if sawofile || ! sawcfile || ! sawcomp; then
- w32api=$($compiler -print-file-name=libc.a)
- w32api=$(cd $(dirname "$w32api")/w32api; pwd)
- set -- -Wl,-nostdlib -L"${w32api}" "$@"
- ! sawnostdlib && set -- -nostdlib "$@" -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -lmingw32 -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt
- ! sawnostdlib && ! sawshared && { sawofile || sawcfile; } && set -- "$mingw_dir"/lib/crt2.o "$@"
-fi
-
-# Execute the compiler with new mingw-specific options.
-exec $compiler "$@"
diff --git a/winsup/utils/mkgroup.c b/winsup/utils/mkgroup.c
deleted file mode 100644
index 3a3376f..0000000
--- a/winsup/utils/mkgroup.c
+++ /dev/null
@@ -1,907 +0,0 @@
-/* mkgroup.c:
-
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Red Hat, Inc.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#define _WIN32_WINNT 0x0600
-#include <ctype.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <wctype.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <getopt.h>
-#include <io.h>
-#include <sys/fcntl.h>
-#include <sys/cygwin.h>
-#include <windows.h>
-#include <lm.h>
-#include <wininet.h>
-#include <iptypes.h>
-#include <ntsecapi.h>
-#include <dsgetdc.h>
-#include <ntdef.h>
-
-#define print_win_error(x) _print_win_error(x, __LINE__)
-
-#define MAX_SID_LEN 40
-
-static const char version[] = "$Revision$";
-
-extern char *__progname;
-
-SID_IDENTIFIER_AUTHORITY sid_world_auth = {SECURITY_WORLD_SID_AUTHORITY};
-SID_IDENTIFIER_AUTHORITY sid_nt_auth = {SECURITY_NT_AUTHORITY};
-
-NET_API_STATUS WINAPI (*dsgetdcname)(LPWSTR,LPWSTR,GUID*,LPWSTR,ULONG,PDOMAIN_CONTROLLER_INFOW*);
-
-#ifndef min
-#define min(a,b) (((a)<(b))?(a):(b))
-#endif
-
-typedef struct
-{
- char *str;
- DWORD id_offset;
- BOOL domain;
- BOOL with_dom;
-} domlist_t;
-
-static void
-_print_win_error (DWORD code, int line)
-{
- char buf[4096];
-
- if (FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM
- | FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL,
- code,
- MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPTSTR) buf, sizeof (buf), NULL))
- fprintf (stderr, "mkgroup (%d): [%lu] %s", line, code, buf);
- else
- fprintf (stderr, "mkgroup (%d): error %lu", line, code);
-}
-
-static void
-load_dsgetdcname ()
-{
- HANDLE h = LoadLibrary ("netapi32.dll");
- if (h)
- dsgetdcname = (void *) GetProcAddress (h, "DsGetDcNameW");
-}
-
-static PWCHAR
-get_dcname (char *domain)
-{
- static WCHAR server[INTERNET_MAX_HOST_NAME_LENGTH + 1];
- DWORD rc;
- PWCHAR servername;
- WCHAR domain_name[MAX_DOMAIN_NAME_LEN + 1];
- PDOMAIN_CONTROLLER_INFOW pdci = NULL;
-
- if (dsgetdcname)
- {
- if (domain)
- {
- mbstowcs (domain_name, domain, strlen (domain) + 1);
- rc = dsgetdcname (NULL, domain_name, NULL, NULL, 0, &pdci);
- }
- else
- rc = dsgetdcname (NULL, NULL, NULL, NULL, 0, &pdci);
- if (rc != ERROR_SUCCESS)
- {
- print_win_error (rc);
- return (PWCHAR) -1;
- }
- wcscpy (server, pdci->DomainControllerName);
- NetApiBufferFree (pdci);
- }
- else
- {
- rc = NetGetDCName (NULL, NULL, (void *) &servername);
- if (rc == ERROR_SUCCESS && domain)
- {
- LPWSTR server = servername;
- mbstowcs (domain_name, domain, strlen (domain) + 1);
- rc = NetGetDCName (server, domain_name, (void *) &servername);
- NetApiBufferFree (server);
- }
- if (rc != ERROR_SUCCESS)
- {
- print_win_error(rc);
- return (PWCHAR) -1;
- }
- wcscpy (server, servername);
- NetApiBufferFree ((PVOID) servername);
- }
- return server;
-}
-
-static char *
-put_sid (PSID psid)
-{
- static char s[512];
- char t[32];
- DWORD i;
-
- strcpy (s, "S-1-");
- sprintf(t, "%u", GetSidIdentifierAuthority (psid)->Value[5]);
- strcat (s, t);
- for (i = 0; i < *GetSidSubAuthorityCount (psid); ++i)
- {
- sprintf(t, "-%lu", *GetSidSubAuthority (psid, i));
- strcat (s, t);
- }
- return s;
-}
-
-typedef struct {
- BYTE Revision;
- BYTE SubAuthorityCount;
- SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
- DWORD SubAuthority[8];
-} DBGSID, *PDBGSID;
-
-#define MAX_BUILTIN_SIDS 100 /* Should be enough for the forseable future. */
-DBGSID builtin_sid_list[MAX_BUILTIN_SIDS];
-DWORD builtin_sid_cnt;
-
-typedef struct {
- PSID psid;
- int buffer[10];
-} sidbuf;
-
-static sidbuf curr_pgrp;
-static BOOL got_curr_pgrp = FALSE;
-
-static void
-fetch_current_pgrp_sid ()
-{
- DWORD len;
- HANDLE ptok;
-
- if (!OpenProcessToken (GetCurrentProcess (), TOKEN_QUERY, &ptok)
- || !GetTokenInformation (ptok, TokenPrimaryGroup, &curr_pgrp,
- sizeof curr_pgrp, &len)
- || !CloseHandle (ptok))
- {
- print_win_error (GetLastError ());
- return;
- }
-}
-
-static void
-current_group (const char *sep, DWORD id_offset)
-{
- WCHAR grp[GNLEN + 1];
- WCHAR dom[MAX_DOMAIN_NAME_LEN + 1];
- DWORD glen = GNLEN + 1;
- DWORD dlen = MAX_DOMAIN_NAME_LEN + 1;
- int gid;
- SID_NAME_USE acc_type;
-
- if (!curr_pgrp.psid
- || !LookupAccountSidW (NULL, curr_pgrp.psid, grp, &glen, dom, &dlen,
- &acc_type))
- {
- print_win_error (GetLastError ());
- return;
- }
- gid = *GetSidSubAuthority (curr_pgrp.psid,
- *GetSidSubAuthorityCount(curr_pgrp.psid) - 1);
- printf ("%ls%s%ls:%s:%lu:\n",
- sep ? dom : L"",
- sep ?: "",
- grp,
- put_sid (curr_pgrp.psid),
- id_offset + gid);
-}
-
-static void
-enum_unix_groups (domlist_t *dom_or_machine, const char *sep, DWORD id_offset,
- char *unix_grp_list)
-{
- WCHAR machine[INTERNET_MAX_HOST_NAME_LENGTH + 1];
- PWCHAR servername = NULL;
- char *d_or_m = dom_or_machine ? dom_or_machine->str : NULL;
- BOOL with_dom = dom_or_machine ? dom_or_machine->with_dom : FALSE;
- SID_IDENTIFIER_AUTHORITY auth = { { 0, 0, 0, 0, 0, 22 } };
- char *gstr, *grp_list;
- WCHAR grp[GNLEN + sizeof ("Unix Group\\") + 1];
- WCHAR dom[MAX_DOMAIN_NAME_LEN + 1];
- DWORD glen, dlen, sidlen;
- PSID psid;
- char psid_buffer[MAX_SID_LEN];
- SID_NAME_USE acc_type;
-
- if (!d_or_m)
- return;
-
- int ret = mbstowcs (machine, d_or_m, INTERNET_MAX_HOST_NAME_LENGTH + 1);
- if (ret < 1 || ret >= INTERNET_MAX_HOST_NAME_LENGTH + 1)
- {
- fprintf (stderr, "%s: Invalid machine name '%s'. Skipping...\n",
- __progname, d_or_m);
- return;
- }
- servername = machine;
-
- if (!AllocateAndInitializeSid (&auth, 2, 2, 0, 0, 0, 0, 0, 0, 0, &psid))
- return;
-
- if (!(grp_list = strdup (unix_grp_list)))
- {
- FreeSid (psid);
- return;
- }
-
- for (gstr = strtok (grp_list, ","); gstr; gstr = strtok (NULL, ","))
- {
- if (!isdigit (gstr[0]) && gstr[0] != '-')
- {
- PWCHAR p = wcpcpy (grp, L"Unix Group\\");
- ret = mbstowcs (p, gstr, GNLEN + 1);
- if (ret < 1 || ret >= GNLEN + 1)
- fprintf (stderr, "%s: Invalid group name '%s'. Skipping...\n",
- __progname, gstr);
- else if (LookupAccountNameW (servername, grp,
- psid = (PSID) psid_buffer,
- (sidlen = MAX_SID_LEN, &sidlen),
- dom,
- (dlen = MAX_DOMAIN_NAME_LEN + 1, &dlen),
- &acc_type))
- printf ("%s%s%ls:%s:%lu:\n",
- with_dom ? "Unix Group" : "",
- with_dom ? sep : "",
- p,
- put_sid (psid),
- id_offset +
- *GetSidSubAuthority (psid,
- *GetSidSubAuthorityCount(psid) - 1));
- }
- else
- {
- DWORD start, stop;
- char *p = gstr;
- if (*p == '-')
- start = 0;
- else
- start = strtol (p, &p, 10);
- if (!*p)
- stop = start;
- else if (*p++ != '-' || !isdigit (*p)
- || (stop = strtol (p, &p, 10)) < start || *p)
- {
- fprintf (stderr, "%s: Malformed unix group list entry '%s'. "
- "Skipping...\n", __progname, gstr);
- continue;
- }
- for (; start <= stop; ++ start)
- {
- *GetSidSubAuthority (psid, *GetSidSubAuthorityCount(psid) - 1)
- = start;
- if (LookupAccountSidW (servername, psid,
- grp, (glen = GNLEN + 1, &glen),
- dom,
- (dlen = MAX_DOMAIN_NAME_LEN + 1, &dlen),
- &acc_type)
- && !iswdigit (grp[0]))
- printf ("%s%s%ls:%s:%lu:\n",
- with_dom ? "Unix Group" : "",
- with_dom ? sep : "",
- grp,
- put_sid (psid),
- id_offset + start);
- }
- }
- }
-
- free (grp_list);
- FreeSid (psid);
-}
-
-static int
-enum_local_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
- DWORD id_offset, char *disp_groupname, int print_builtin,
- int print_current)
-{
- WCHAR machine[INTERNET_MAX_HOST_NAME_LENGTH + 1];
- PWCHAR servername = NULL;
- char *d_or_m = dom_or_machine ? dom_or_machine->str : NULL;
- BOOL with_dom = dom_or_machine ? dom_or_machine->with_dom : FALSE;
- LOCALGROUP_INFO_0 *buffer;
- DWORD entriesread = 0;
- DWORD totalentries = 0;
- DWORD resume_handle = 0;
- WCHAR gname[GNLEN + 1];
- DWORD rc;
-
- if (domain)
- {
- servername = get_dcname (d_or_m);
- if (servername == (PWCHAR) -1)
- return 1;
- }
- else if (d_or_m)
- {
- int ret = mbstowcs (machine, d_or_m, INTERNET_MAX_HOST_NAME_LENGTH + 1);
- if (ret < 1 || ret >= INTERNET_MAX_HOST_NAME_LENGTH + 1)
- {
- fprintf (stderr, "%s: Invalid machine name '%s'. Skipping...\n",
- __progname, d_or_m);
- return 1;
- }
- servername = machine;
- }
-
- do
- {
- DWORD i;
-
- if (disp_groupname != NULL)
- {
- mbstowcs (gname, disp_groupname, GNLEN + 1);
- rc = NetLocalGroupGetInfo (servername, gname, 0, (void *) &buffer);
- if (rc == ERROR_SUCCESS)
- entriesread = 1;
- }
- else
- rc = NetLocalGroupEnum (servername, 0, (void *) &buffer,
- MAX_PREFERRED_LENGTH, &entriesread,
- &totalentries, &resume_handle);
- switch (rc)
- {
- case ERROR_ACCESS_DENIED:
- print_win_error (rc);
- return 1;
-
- case ERROR_MORE_DATA:
- case ERROR_SUCCESS:
- break;
-
- default:
- print_win_error (rc);
- return 1;
- }
-
- for (i = 0; i < entriesread; i++)
- {
- WCHAR domain_name[MAX_DOMAIN_NAME_LEN + 1];
- DWORD domname_len = MAX_DOMAIN_NAME_LEN + 1;
- char psid_buffer[MAX_SID_LEN];
- PSID psid = (PSID) psid_buffer;
- DWORD sid_length = MAX_SID_LEN;
- DWORD gid;
- SID_NAME_USE acc_type;
- PDBGSID pdsid;
- BOOL is_builtin = FALSE;
-
- if (!LookupAccountNameW (servername, buffer[i].lgrpi0_name, psid,
- &sid_length, domain_name, &domname_len,
- &acc_type))
- {
- print_win_error (GetLastError ());
- fprintf (stderr, " (%ls)\n", buffer[i].lgrpi0_name);
- continue;
- }
- else if (acc_type == SidTypeDomain)
- {
- WCHAR domname[MAX_DOMAIN_NAME_LEN + GNLEN + 2];
-
- wcscpy (domname, domain_name);
- wcscat (domname, L"\\");
- wcscat (domname, buffer[i].lgrpi0_name);
- sid_length = MAX_SID_LEN;
- domname_len = MAX_DOMAIN_NAME_LEN + 1;
- if (!LookupAccountNameW (servername, domname,
- psid, &sid_length,
- domain_name, &domname_len,
- &acc_type))
- {
- print_win_error (GetLastError ());
- fprintf(stderr, " (%ls)\n", domname);
- continue;
- }
- }
-
- /* Store all local SIDs with prefix "S-1-5-32-" and check if it
- has been printed already. This allows to get all builtin
- groups exactly once and not once per domain. */
- pdsid = (PDBGSID) psid;
- if (pdsid->IdentifierAuthority.Value[5] == sid_nt_auth.Value[5]
- && pdsid->SubAuthority[0] == SECURITY_BUILTIN_DOMAIN_RID)
- {
- int b;
-
- if (!print_builtin)
- goto skip_group;
- is_builtin = TRUE;
- if (builtin_sid_cnt)
- for (b = 0; b < builtin_sid_cnt; b++)
- if (EqualSid (&builtin_sid_list[b], psid))
- goto skip_group;
- if (builtin_sid_cnt < MAX_BUILTIN_SIDS)
- CopySid (sizeof (DBGSID), &builtin_sid_list[builtin_sid_cnt++],
- psid);
- }
- if (!print_current)
- /* fall through */;
- else if (EqualSid (curr_pgrp.psid, psid))
- got_curr_pgrp = TRUE;
-
- gid = *GetSidSubAuthority (psid, *GetSidSubAuthorityCount(psid) - 1);
- printf ("%ls%s%ls:%s:%ld:\n",
- with_dom && !is_builtin ? domain_name : L"",
- with_dom && !is_builtin ? sep : "",
- buffer[i].lgrpi0_name,
- put_sid (psid),
- gid + (is_builtin ? 0 : id_offset));
-skip_group:
- ;
- }
-
- NetApiBufferFree (buffer);
-
- }
- while (rc == ERROR_MORE_DATA);
-
- /* Return -1 if the single group we're looking for has been found here to
- avoid calling enum_groups for the same group, thus avoiding a spurious
- error message "group name could not be found" in enum_groups. */
- return disp_groupname && entriesread ? -1 : 0;
-}
-
-static void
-enum_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
- DWORD id_offset, char *disp_groupname, int print_current)
-{
- WCHAR machine[INTERNET_MAX_HOST_NAME_LENGTH + 1];
- PWCHAR servername = NULL;
- char *d_or_m = dom_or_machine ? dom_or_machine->str : NULL;
- BOOL with_dom = dom_or_machine ? dom_or_machine->with_dom : FALSE;
- GROUP_INFO_2 *buffer;
- DWORD entriesread = 0;
- DWORD totalentries = 0;
- DWORD resume_handle = 0;
- WCHAR gname[GNLEN + 1];
- DWORD rc;
-
- if (domain)
- {
- servername = get_dcname (d_or_m);
- if (servername == (PWCHAR) -1)
- return;
- }
- else if (d_or_m)
- {
- int ret = mbstowcs (machine, d_or_m, INTERNET_MAX_HOST_NAME_LENGTH + 1);
- if (ret < 1 || ret >= INTERNET_MAX_HOST_NAME_LENGTH + 1)
- {
- fprintf (stderr, "%s: Invalid machine name '%s'. Skipping...\n",
- __progname, d_or_m);
- return;
- }
- servername = machine;
- }
-
- do
- {
- DWORD i;
-
- if (disp_groupname != NULL)
- {
- mbstowcs (gname, disp_groupname, GNLEN + 1);
- rc = NetGroupGetInfo (servername, (LPWSTR) & gname, 2,
- (void *) &buffer);
- entriesread=1;
- }
- else
- rc = NetGroupEnum (servername, 2, (void *) & buffer,
- MAX_PREFERRED_LENGTH, &entriesread, &totalentries,
- &resume_handle);
- switch (rc)
- {
- case ERROR_ACCESS_DENIED:
- print_win_error (rc);
- return;
-
- case ERROR_MORE_DATA:
- case ERROR_SUCCESS:
- break;
-
- default:
- print_win_error (rc);
- return;
- }
-
- for (i = 0; i < entriesread; i++)
- {
- WCHAR domain_name[MAX_DOMAIN_NAME_LEN + 1];
- DWORD domname_len = MAX_DOMAIN_NAME_LEN + 1;
- char psid_buffer[MAX_SID_LEN];
- PSID psid = (PSID) psid_buffer;
- DWORD sid_length = MAX_SID_LEN;
- SID_NAME_USE acc_type;
-
- int gid = buffer[i].grpi2_group_id;
- if (!LookupAccountNameW (servername, buffer[i].grpi2_name,
- psid, &sid_length,
- domain_name, &domname_len,
- &acc_type))
- {
- print_win_error (GetLastError ());
- fprintf(stderr, " (%ls)\n", buffer[i].grpi2_name);
- continue;
- }
- else if (acc_type == SidTypeDomain)
- {
- WCHAR domname[MAX_DOMAIN_NAME_LEN + GNLEN + 2];
-
- wcscpy (domname, domain || !servername
- ? domain_name : servername);
- wcscat (domname, L"\\");
- wcscat (domname, buffer[i].grpi2_name);
- sid_length = MAX_SID_LEN;
- domname_len = MAX_DOMAIN_NAME_LEN + 1;
- if (!LookupAccountNameW (servername, domname,
- psid, &sid_length,
- domain_name, &domname_len,
- &acc_type))
- {
- print_win_error (GetLastError ());
- fprintf(stderr, " (%ls)\n", domname);
- continue;
- }
- }
- if (!print_current)
- /* fall through */;
- else if (EqualSid (curr_pgrp.psid, psid))
- got_curr_pgrp = TRUE;
-
- printf ("%ls%s%ls:%s:%lu:\n",
- with_dom ? domain_name : L"",
- with_dom ? sep : "",
- buffer[i].grpi2_name,
- put_sid (psid),
- id_offset + gid);
- }
-
- NetApiBufferFree (buffer);
-
- }
- while (rc == ERROR_MORE_DATA);
-}
-
-static void
-print_special (PSID_IDENTIFIER_AUTHORITY auth, BYTE cnt,
- DWORD sub1, DWORD sub2, DWORD sub3, DWORD sub4,
- DWORD sub5, DWORD sub6, DWORD sub7, DWORD sub8)
-{
- WCHAR grp[GNLEN + 1], dom[MAX_DOMAIN_NAME_LEN + 1];
- DWORD glen, dlen, rid;
- PSID psid;
- SID_NAME_USE acc_type;
-
- if (AllocateAndInitializeSid (auth, cnt, sub1, sub2, sub3, sub4,
- sub5, sub6, sub7, sub8, &psid))
- {
- if (LookupAccountSidW (NULL, psid,
- grp, (glen = GNLEN + 1, &glen),
- dom, (dlen = MAX_DOMAIN_NAME_LEN + 1, &dlen),
- &acc_type))
- {
- if (sub8)
- rid = sub8;
- else if (sub7)
- rid = sub7;
- else if (sub6)
- rid = sub6;
- else if (sub5)
- rid = sub5;
- else if (sub4)
- rid = sub4;
- else if (sub3)
- rid = sub3;
- else if (sub2)
- rid = sub2;
- else
- rid = sub1;
- printf ("%ls:%s:%lu:\n", grp, put_sid (psid), rid);
- }
- FreeSid (psid);
- }
-}
-
-static int
-usage (FILE * stream)
-{
- fprintf (stream,
-"Usage: mkgroup [OPTION]...\n"
-"Print /etc/group file to stdout\n"
-"\n"
-"Options:\n"
-" -l,--local [machine[,offset]]\n"
-" print local groups with gid offset offset\n"
-" (from local machine if no machine specified)\n"
-" -L,--Local [machine[,offset]]\n"
-" ditto, but generate groupname with machine prefix\n"
-" -d,--domain [domain[,offset]]\n"
-" print domain groups with gid offset offset\n"
-" (from current domain if no domain specified)\n"
-" -D,--Domain [domain[,offset]]\n"
-" ditto, but generate groupname with machine prefix\n"
-" -c,--current print current group\n"
-" -C,--Current ditto, but generate groupname with machine or\n"
-" domain prefix\n"
-" -S,--separator char for -L, -D, -C use character char as domain\\group\n"
-" separator in groupname instead of the default '\\'\n"
-" -o,--id-offset offset change the default offset (10000) added to gids\n"
-" in domain or foreign server accounts.\n"
-" -g,--group groupname only return information for the specified group\n"
-" one of -l, -L, -d, -D must be specified, too\n"
-" -b,--no-builtin don't print BUILTIN groups\n"
-" -U,--unix grouplist additionally print UNIX groups when using -l or -L\n"
-" on a UNIX Samba server\n"
-" grouplist is a comma-separated list of groupnames\n"
-" or gid ranges (root,-25,50-100).\n"
-" (enumerating large ranges can take a long time!)\n"
-" -s,--no-sids (ignored)\n"
-" -u,--users (ignored)\n"
-" -h,--help print this message\n"
-" -v,--version print version information and exit\n"
-"\n"
-"Default is to print local groups on stand-alone machines, plus domain\n"
-"groups on domain controllers and domain member machines.\n");
- return 1;
-}
-
-struct option longopts[] = {
- {"no-builtin", no_argument, NULL, 'b'},
- {"current", no_argument, NULL, 'c'},
- {"Current", no_argument, NULL, 'C'},
- {"domain", optional_argument, NULL, 'd'},
- {"Domain", optional_argument, NULL, 'D'},
- {"group", required_argument, NULL, 'g'},
- {"help", no_argument, NULL, 'h'},
- {"local", optional_argument, NULL, 'l'},
- {"Local", optional_argument, NULL, 'L'},
- {"id-offset", required_argument, NULL, 'o'},
- {"no-sids", no_argument, NULL, 's'},
- {"separator", required_argument, NULL, 'S'},
- {"users", no_argument, NULL, 'u'},
- {"unix", required_argument, NULL, 'U'},
- {"version", no_argument, NULL, 'v'},
- {0, no_argument, NULL, 0}
-};
-
-static char opts[] = "bcCd::D::g:hl::L::o:sS:uU:v";
-
-static void
-print_version ()
-{
- const char *v = strchr (version, ':');
- int len;
- if (!v)
- {
- v = "?";
- len = 1;
- }
- else
- {
- v += 2;
- len = strchr (v, ' ') - v;
- }
- printf ("\
-mkgroup (cygwin) %.*s\n\
-group File Generator\n\
-Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Red Hat, Inc.\n\
-Compiled on %s\n\
-", len, v, __DATE__);
-}
-
-static PPOLICY_PRIMARY_DOMAIN_INFO p_dom;
-
-static BOOL
-fetch_primary_domain ()
-{
- NTSTATUS status;
- LSA_OBJECT_ATTRIBUTES oa = { 0, 0, 0, 0, 0, 0 };
- LSA_HANDLE lsa;
-
- if (!p_dom)
- {
- status = LsaOpenPolicy (NULL, &oa, POLICY_EXECUTE, &lsa);
- if (!NT_SUCCESS (status))
- return FALSE;
- status = LsaQueryInformationPolicy (lsa, PolicyPrimaryDomainInformation,
- (PVOID *) ((void *) &p_dom));
- LsaClose (lsa);
- if (!NT_SUCCESS (status))
- return FALSE;
- }
- return !!p_dom->Sid;
-}
-
-int
-main (int argc, char **argv)
-{
- int print_domlist = 0;
- domlist_t domlist[32];
- char *opt, *p, *ep;
- int print_current = 0;
- int print_system = 0;
- int print_builtin = 1;
- char *print_unix = NULL;
- const char *sep_char = "\\";
- DWORD id_offset = 10000, off;
- int c, i;
- char *disp_groupname = NULL;
- BOOL in_domain;
- int optional_args = 0;
-
- if (!isatty (1))
- setmode (1, O_BINARY);
-
- load_dsgetdcname ();
- in_domain = fetch_primary_domain ();
- fetch_current_pgrp_sid ();
-
- if (argc == 1)
- {
- print_special (&sid_nt_auth, 1, SECURITY_LOCAL_SYSTEM_RID,
- 0, 0, 0, 0, 0, 0, 0);
- if (in_domain)
- {
- if (!enum_local_groups (TRUE, NULL, sep_char, id_offset,
- disp_groupname, print_builtin, 0))
- enum_groups (TRUE, NULL, sep_char, id_offset, disp_groupname, 0);
- }
- else if (!enum_local_groups (FALSE, NULL, sep_char, 0, disp_groupname,
- print_builtin, 0))
- enum_groups (FALSE, NULL, sep_char, 0, disp_groupname, 0);
- return 0;
- }
-
- unsetenv ("POSIXLY_CORRECT"); /* To get optional arg processing right. */
- while ((c = getopt_long (argc, argv, opts, longopts, NULL)) != EOF)
- switch (c)
- {
- case 'd':
- case 'D':
- case 'l':
- case 'L':
- if (print_domlist >= 32)
- {
- fprintf (stderr, "%s: Can not enumerate from more than 32 "
- "domains and machines.\n", __progname);
- return 1;
- }
- domlist[print_domlist].domain = (c == 'd' || c == 'D');
- opt = optarg ?:
- argv[optind] && argv[optind][0] != '-' ? argv[optind] : NULL;
- if (argv[optind] && opt == argv[optind])
- ++optional_args;
- for (i = 0; i < print_domlist; ++i)
- if (domlist[i].domain == domlist[print_domlist].domain
- && ((!domlist[i].str && !opt)
- || (domlist[i].str && opt
- && (off = strlen (domlist[i].str))
- && !strncmp (domlist[i].str, opt, off)
- && (!opt[off] || opt[off] == ','))))
- {
- fprintf (stderr, "%s: Duplicate %s '%s'. Skipping...\n",
- __progname, domlist[i].domain ? "domain" : "machine",
- domlist[i].str);
- goto skip;
- }
- if (!(domlist[print_domlist].str = opt))
- print_system = 1;
- domlist[print_domlist].id_offset = ULONG_MAX;
- if (opt && (p = strchr (opt, ',')))
- {
- if (p == opt
- || !isdigit (p[1])
- || (domlist[print_domlist].id_offset = strtol (p + 1, &ep, 10)
- , *ep))
- {
- fprintf (stderr, "%s: Malformed machine,offset string '%s'. "
- "Skipping...\n", __progname, opt);
- break;
- }
- *p = '\0';
- }
- domlist[print_domlist++].with_dom = (c == 'D' || c == 'L');
-skip:
- break;
- case 'S':
- sep_char = optarg;
- if (strlen (sep_char) > 1)
- {
- fprintf (stderr, "%s: Only one character allowed as domain\\user "
- "separator character.\n", __progname);
- return 1;
- }
- if (*sep_char == ':')
- {
- fprintf (stderr, "%s: Colon not allowed as domain\\user separator "
- "character.\n", __progname);
- return 1;
- }
- break;
- case 'U':
- print_unix = optarg;
- break;
- case 'c':
- sep_char = NULL;
- /*FALLTHRU*/
- case 'C':
- print_current = 1;
- break;
- case 'o':
- id_offset = strtol (optarg, NULL, 10);
- break;
- case 'b':
- print_builtin = 0;
- break;
- case 's':
- break;
- case 'u':
- break;
- case 'g':
- disp_groupname = optarg;
- break;
- case 'h':
- usage (stdout);
- return 0;
- case 'v':
- print_version ();
- return 0;
- default:
- fprintf (stderr, "Try '%s --help' for more information.\n", argv[0]);
- return 1;
- }
-
- optind += optional_args;
- if (argv[optind])
- {
- fprintf (stderr,
- "mkgroup: non-option command line argument `%s' is not allowed.\n"
- "Try `mkgroup --help' for more information.\n", argv[optind]);
- exit (1);
- }
-
- /* Get 'system' group */
- if (!disp_groupname && print_system && print_builtin && print_domlist)
- print_special (&sid_nt_auth, 1, SECURITY_LOCAL_SYSTEM_RID,
- 0, 0, 0, 0, 0, 0, 0);
-
- off = id_offset;
- for (i = 0; i < print_domlist; ++i)
- {
- DWORD my_off = (domlist[i].domain || domlist[i].str)
- ? domlist[i].id_offset != ULONG_MAX
- ? domlist[i].id_offset : off : 0;
- if (!enum_local_groups (domlist[i].domain, domlist + i, sep_char,
- my_off, disp_groupname, print_builtin, print_current))
- {
- if (!domlist[i].domain && domlist[i].str && print_unix)
- enum_unix_groups (domlist + i, sep_char, my_off, print_unix);
- enum_groups (domlist[i].domain, domlist + i, sep_char, my_off,
- disp_groupname, print_current);
- if (my_off)
- off += id_offset;
- }
- }
-
- if (print_current && !got_curr_pgrp)
- current_group (sep_char, off);
-
- return 0;
-}
diff --git a/winsup/utils/mkpasswd.c b/winsup/utils/mkpasswd.c
deleted file mode 100644
index b341b64..0000000
--- a/winsup/utils/mkpasswd.c
+++ /dev/null
@@ -1,887 +0,0 @@
-/* mkpasswd.c:
-
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006,
- 2008 Red Hat, Inc.
-
- This file is part of Cygwin.
-
- This software is a copyrighted work licensed under the terms of the
- Cygwin license. Please consult the file "CYGWIN_LICENSE" for
- details. */
-
-#define _WIN32_WINNT 0x0600
-#include <ctype.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <wctype.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <getopt.h>
-#include <io.h>
-#include <sys/fcntl.h>
-#include <sys/cygwin.h>
-#include <windows.h>
-#include <lm.h>
-#include <iptypes.h>
-#include <wininet.h>
-#include <ntsecapi.h>
-#include <dsgetdc.h>
-#include <ntdef.h>
-
-#define print_win_error(x) _print_win_error(x, __LINE__)
-
-#define MAX_SID_LEN 40
-
-static const char version[] = "$Revision$";
-
-extern char *__progname;
-
-SID_IDENTIFIER_AUTHORITY sid_world_auth = {SECURITY_WORLD_SID_AUTHORITY};
-SID_IDENTIFIER_AUTHORITY sid_nt_auth = {SECURITY_NT_AUTHORITY};
-
-NET_API_STATUS WINAPI (*dsgetdcname)(LPWSTR,LPWSTR,GUID*,LPWSTR,ULONG,PDOMAIN_CONTROLLER_INFOW*);
-
-#ifndef min
-#define min(a,b) (((a)<(b))?(a):(b))
-#endif
-
-typedef struct
-{
- char *str;
- DWORD id_offset;
- BOOL domain;
- BOOL with_dom;
-} domlist_t;
-
-static void
-_print_win_error(DWORD code, int line)
-{
- char buf[4096];
-
- if (FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM
- | FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL,
- code,
- MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPTSTR) buf, sizeof (buf), NULL))
- fprintf (stderr, "mkpasswd (%d): [%lu] %s", line, code, buf);
- else
- fprintf (stderr, "mkpasswd (%d): error %lu", line, code);
-}
-
-static void
-load_dsgetdcname ()
-{
- HANDLE h = LoadLibrary ("netapi32.dll");
-
- if (h)
- dsgetdcname = (void *) GetProcAddress (h, "DsGetDcNameW");
-}
-
-static PWCHAR
-get_dcname (char *domain)
-{
- static WCHAR server[INTERNET_MAX_HOST_NAME_LENGTH + 1];
- DWORD rc;
- PWCHAR servername;
- WCHAR domain_name[MAX_DOMAIN_NAME_LEN + 1];
- PDOMAIN_CONTROLLER_INFOW pdci = NULL;
-
- if (dsgetdcname)
- {
- if (domain)
- {
- mbstowcs (domain_name, domain, strlen (domain) + 1);
- rc = dsgetdcname (NULL, domain_name, NULL, NULL, 0, &pdci);
- }
- else
- rc = dsgetdcname (NULL, NULL, NULL, NULL, 0, &pdci);
- if (rc != ERROR_SUCCESS)
- {
- print_win_error(rc);
- return (PWCHAR) -1;
- }
- wcscpy (server, pdci->DomainControllerName);
- NetApiBufferFree (pdci);
- }
- else
- {
- rc = NetGetDCName (NULL, NULL, (void *) &servername);
- if (rc == ERROR_SUCCESS && domain)
- {
- LPWSTR server = servername;
- mbstowcs (domain_name, domain, strlen (domain) + 1);
- rc = NetGetDCName (server, domain_name, (void *) &servername);
- NetApiBufferFree (server);
- }
- if (rc != ERROR_SUCCESS)
- {
- print_win_error(rc);
- return (PWCHAR) -1;
- }
- wcscpy (server, servername);
- NetApiBufferFree ((PVOID) servername);
- }
- return server;
-}
-
-static char *
-put_sid (PSID sid)
-{
- static char s[512];
- char t[32];
- DWORD i;
-
- strcpy (s, "S-1-");
- sprintf(t, "%u", GetSidIdentifierAuthority (sid)->Value[5]);
- strcat (s, t);
- for (i = 0; i < *GetSidSubAuthorityCount (sid); ++i)
- {
- sprintf(t, "-%lu", *GetSidSubAuthority (sid, i));
- strcat (s, t);
- }
- return s;
-}
-
-static void
-psx_dir (char *in, char *out)
-{
- if (isalpha (in[0]) && in[1] == ':')
- {
- sprintf (out, "/cygdrive/%c", in[0]);
- in += 2;
- out += strlen (out);
- }
-
- while (*in)
- {
- if (*in == '\\')
- *out = '/';
- else
- *out = *in;
- in++;
- out++;
- }
-
- *out = '\0';
-}
-
-static void
-uni2ansi (LPWSTR wcs, char *mbs, int size)
-{
- if (wcs)
- wcstombs (mbs, wcs, size);
- else
- *mbs = '\0';
-}
-
-typedef struct {
- PSID psid;
- int buffer[10];
-} sidbuf;
-
-static sidbuf curr_user;
-static sidbuf curr_pgrp;
-static BOOL got_curr_user = FALSE;
-
-static void
-fetch_current_user_sid ()
-{
- DWORD len;
- HANDLE ptok;
-
- if (!OpenProcessToken (GetCurrentProcess (), TOKEN_QUERY, &ptok)
- || !GetTokenInformation (ptok, TokenUser, &curr_user, sizeof curr_user,
- &len)
- || !GetTokenInformation (ptok, TokenPrimaryGroup, &curr_pgrp,
- sizeof curr_pgrp, &len)
- || !CloseHandle (ptok))
- {
- print_win_error (GetLastError ());
- return;
- }
-}
-
-static void
-current_user (int print_cygpath, const char *sep, const char *passed_home_path,
- DWORD id_offset, const char *disp_username)
-{
- WCHAR user[UNLEN + 1];
- WCHAR dom[MAX_DOMAIN_NAME_LEN + 1];
- DWORD ulen = UNLEN + 1;
- DWORD dlen = MAX_DOMAIN_NAME_LEN + 1;
- SID_NAME_USE acc_type;
- int uid, gid;
- char homedir_psx[PATH_MAX] = {0}, homedir_w32[MAX_PATH] = {0};
-
- if (!curr_user.psid || !curr_pgrp.psid
- || !LookupAccountSidW (NULL, curr_user.psid, user, &ulen, dom, &dlen,
- &acc_type))
- {
- print_win_error (GetLastError ());
- return;
- }
-
- uid = *GetSidSubAuthority (curr_user.psid,
- *GetSidSubAuthorityCount(curr_user.psid) - 1);
- gid = *GetSidSubAuthority (curr_pgrp.psid,
- *GetSidSubAuthorityCount(curr_pgrp.psid) - 1);
- if (passed_home_path[0] == '\0')
- {
- char *envhome = getenv ("HOME");
- char *envhomedrive = getenv ("HOMEDRIVE");
- char *envhomepath = getenv ("HOMEPATH");
-
- if (envhome && envhome[0])
- {
- if (print_cygpath)
- cygwin_conv_path (CCP_WIN_A_TO_POSIX | CCP_ABSOLUTE, envhome,
- homedir_psx, PATH_MAX);
- else
- psx_dir (envhome, homedir_psx);
- }
- else if (envhomepath && envhomepath[0])
- {
- if (envhomedrive)
- strlcpy (homedir_w32, envhomedrive, sizeof (homedir_w32));
- if (envhomepath[0] != '\\')
- strlcat (homedir_w32, "\\", sizeof (homedir_w32));
- strlcat (homedir_w32, envhomepath, sizeof (homedir_w32));
- if (print_cygpath)
- cygwin_conv_path (CCP_WIN_A_TO_POSIX | CCP_ABSOLUTE, homedir_w32,
- homedir_psx, PATH_MAX);
- else
- psx_dir (homedir_w32, homedir_psx);
- }
- else
- {
- wcstombs (stpncpy (homedir_psx, "/home/", sizeof (homedir_psx)),
- user, sizeof (homedir_psx) - 6);
- homedir_psx[PATH_MAX - 1] = '\0';
- }
- }
- else
- {
- char *p = stpncpy (homedir_psx, passed_home_path, sizeof (homedir_psx));
- wcstombs (p, user, sizeof (homedir_psx) - (p - homedir_psx));
- homedir_psx[PATH_MAX - 1] = '\0';
- }
-
- printf ("%ls%s%ls:unused:%lu:%lu:U-%ls\\%ls,%s:%s:/bin/bash\n",
- sep ? dom : L"",
- sep ?: "",
- user,
- id_offset + uid,
- id_offset + gid,
- dom,
- user,
- put_sid (curr_user.psid),
- homedir_psx);
-}
-
-static void
-enum_unix_users (domlist_t *dom_or_machine, const char *sep, DWORD id_offset,
- char *unix_user_list)
-{
- WCHAR machine[INTERNET_MAX_HOST_NAME_LENGTH + 1];
- PWCHAR servername = NULL;
- char *d_or_m = dom_or_machine ? dom_or_machine->str : NULL;
- BOOL with_dom = dom_or_machine ? dom_or_machine->with_dom : FALSE;
- SID_IDENTIFIER_AUTHORITY auth = { { 0, 0, 0, 0, 0, 22 } };
- char *ustr, *user_list;
- WCHAR user[UNLEN + sizeof ("Unix User\\") + 1];
- WCHAR dom[MAX_DOMAIN_NAME_LEN + 1];
- DWORD ulen, dlen, sidlen;
- PSID psid;
- char psid_buffer[MAX_SID_LEN];
- SID_NAME_USE acc_type;
-
- if (!d_or_m)
- return;
-
- int ret = mbstowcs (machine, d_or_m, INTERNET_MAX_HOST_NAME_LENGTH + 1);
- if (ret < 1 || ret >= INTERNET_MAX_HOST_NAME_LENGTH + 1)
- {
- fprintf (stderr, "%s: Invalid machine name '%s'. Skipping...\n",
- __progname, d_or_m);
- return;
- }
- servername = machine;
-
- if (!AllocateAndInitializeSid (&auth, 2, 1, 0, 0, 0, 0, 0, 0, 0, &psid))
- return;
-
- if (!(user_list = strdup (unix_user_list)))
- {
- FreeSid (psid);
- return;
- }
-
- for (ustr = strtok (user_list, ","); ustr; ustr = strtok (NULL, ","))
- {
- if (!isdigit (ustr[0]) && ustr[0] != '-')
- {
- PWCHAR p = wcpcpy (user, L"Unix User\\");
- ret = mbstowcs (p, ustr, UNLEN + 1);
- if (ret < 1 || ret >= UNLEN + 1)
- fprintf (stderr, "%s: Invalid user name '%s'. Skipping...\n",
- __progname, ustr);
- else if (LookupAccountNameW (servername, user,
- psid = (PSID) psid_buffer,
- (sidlen = MAX_SID_LEN, &sidlen),
- dom,
- (dlen = MAX_DOMAIN_NAME_LEN + 1, &dlen),
- &acc_type))
- printf ("%s%s%ls:unused:%lu:99999:,%s::\n",
- with_dom ? "Unix User" : "",
- with_dom ? sep : "",
- user + 10,
- id_offset +
- *GetSidSubAuthority (psid,
- *GetSidSubAuthorityCount(psid) - 1),
- put_sid (psid));
- }
- else
- {
- DWORD start, stop;
- char *p = ustr;
- if (*p == '-')
- start = 0;
- else
- start = strtol (p, &p, 10);
- if (!*p)
- stop = start;
- else if (*p++ != '-' || !isdigit (*p)
- || (stop = strtol (p, &p, 10)) < start || *p)
- {
- fprintf (stderr, "%s: Malformed unix user list entry '%s'. "
- "Skipping...\n", __progname, ustr);
- continue;
- }
- for (; start <= stop; ++ start)
- {
- *GetSidSubAuthority (psid, *GetSidSubAuthorityCount(psid) - 1)
- = start;
- if (LookupAccountSidW (servername, psid,
- user, (ulen = GNLEN + 1, &ulen),
- dom,
- (dlen = MAX_DOMAIN_NAME_LEN + 1, &dlen),
- &acc_type)
- && !iswdigit (user[0]))
- printf ("%s%s%ls:unused:%lu:99999:,%s::\n",
- with_dom ? "Unix User" : "",
- with_dom ? sep : "",
- user,
- id_offset + start,
- put_sid (psid));
- }
- }
- }
-
- free (user_list);
- FreeSid (psid);
-}
-
-static int
-enum_users (BOOL domain, domlist_t *dom_or_machine, const char *sep,
- int print_cygpath, const char *passed_home_path, DWORD id_offset,
- char *disp_username, int print_current)
-{
- WCHAR machine[INTERNET_MAX_HOST_NAME_LENGTH + 1];
- PWCHAR servername = NULL;
- char *d_or_m = dom_or_machine ? dom_or_machine->str : NULL;
- BOOL with_dom = dom_or_machine ? dom_or_machine->with_dom : FALSE;
- USER_INFO_3 *buffer;
- DWORD entriesread = 0;
- DWORD totalentries = 0;
- DWORD resume_handle = 0;
- DWORD rc;
- WCHAR uni_name[UNLEN + 1];
- if (domain)
- {
- servername = get_dcname (d_or_m);
- if (servername == (PWCHAR) -1)
- return 1;
- }
- else if (d_or_m)
- {
- int ret = mbstowcs (machine, d_or_m, INTERNET_MAX_HOST_NAME_LENGTH + 1);
- if (ret < 1 || ret >= INTERNET_MAX_HOST_NAME_LENGTH + 1)
- {
- fprintf (stderr, "%s: Invalid machine name '%s'. Skipping...\n",
- __progname, d_or_m);
- return 1;
- }
- servername = machine;
- }
-
- do
- {
- DWORD i;
-
- if (disp_username != NULL)
- {
- mbstowcs (uni_name, disp_username, UNLEN + 1);
- rc = NetUserGetInfo (servername, (LPWSTR) &uni_name, 3,
- (void *) &buffer);
- entriesread = 1;
- }
- else
- rc = NetUserEnum (servername, 3, FILTER_NORMAL_ACCOUNT,
- (void *) &buffer, MAX_PREFERRED_LENGTH,
- &entriesread, &totalentries, &resume_handle);
- switch (rc)
- {
- case ERROR_ACCESS_DENIED:
- print_win_error(rc);
- return 1;
-
- case ERROR_MORE_DATA:
- case ERROR_SUCCESS:
- break;
-
- default:
- print_win_error(rc);
- return 1;
- }
-
- for (i = 0; i < entriesread; i++)
- {
- char homedir_psx[PATH_MAX];
- char homedir_w32[MAX_PATH];
- WCHAR domain_name[MAX_DOMAIN_NAME_LEN + 1];
- DWORD domname_len = MAX_DOMAIN_NAME_LEN + 1;
- char psid_buffer[MAX_SID_LEN];
- PSID psid = (PSID) psid_buffer;
- DWORD sid_length = MAX_SID_LEN;
- SID_NAME_USE acc_type;
-
- int uid = buffer[i].usri3_user_id;
- int gid = buffer[i].usri3_primary_group_id;
- homedir_w32[0] = homedir_psx[0] = '\0';
- if (passed_home_path[0] == '\0')
- {
- uni2ansi (buffer[i].usri3_home_dir, homedir_w32,
- sizeof (homedir_w32));
- if (homedir_w32[0] != '\0')
- {
- if (print_cygpath)
- cygwin_conv_path (CCP_WIN_A_TO_POSIX | CCP_ABSOLUTE,
- homedir_w32, homedir_psx, PATH_MAX);
- else
- psx_dir (homedir_w32, homedir_psx);
- }
- else
- uni2ansi (buffer[i].usri3_name,
- stpcpy (homedir_psx, "/home/"), PATH_MAX - 6);
- }
- else
- uni2ansi (buffer[i].usri3_name,
- stpcpy (homedir_psx, passed_home_path),
- PATH_MAX - strlen (passed_home_path));
-
- if (!LookupAccountNameW (servername, buffer[i].usri3_name,
- psid, &sid_length, domain_name,
- &domname_len, &acc_type))
- {
- print_win_error(GetLastError ());
- fprintf(stderr, " (%ls)\n", buffer[i].usri3_name);
- continue;
- }
- else if (acc_type == SidTypeDomain)
- {
- WCHAR domname[MAX_DOMAIN_NAME_LEN + UNLEN + 2];
-
- wcscpy (domname, domain || !servername
- ? domain_name : servername);
- wcscat (domname, L"\\");
- wcscat (domname, buffer[i].usri3_name);
- sid_length = MAX_SID_LEN;
- domname_len = sizeof (domname);
- if (!LookupAccountNameW (servername, domname, psid,
- &sid_length, domain_name,
- &domname_len, &acc_type))
- {
- print_win_error(GetLastError ());
- fprintf(stderr, " (%ls)\n", domname);
- continue;
- }
- }
- if (!print_current)
- /* fall through */;
- else if (EqualSid (curr_user.psid, psid))
- got_curr_user = TRUE;
-
- printf ("%ls%s%ls:unused:%lu:%lu:%ls%sU-%ls\\%ls,%s:%s:/bin/bash\n",
- with_dom ? domain_name : L"",
- with_dom ? sep : "",
- buffer[i].usri3_name,
- id_offset + uid,
- id_offset + gid,
- buffer[i].usri3_full_name ?: L"",
- buffer[i].usri3_full_name
- && buffer[i].usri3_full_name[0] ? "," : "",
- domain_name,
- buffer[i].usri3_name,
- put_sid (psid),
- homedir_psx);
- }
-
- NetApiBufferFree (buffer);
-
- }
- while (rc == ERROR_MORE_DATA);
-
- return 0;
-}
-
-static void
-print_special (PSID_IDENTIFIER_AUTHORITY auth, BYTE cnt,
- DWORD sub1, DWORD sub2, DWORD sub3, DWORD sub4,
- DWORD sub5, DWORD sub6, DWORD sub7, DWORD sub8)
-{
- WCHAR user[UNLEN + 1], dom[MAX_DOMAIN_NAME_LEN + 1];
- DWORD len, len2, rid;
- PSID sid;
- SID_NAME_USE acc_type;
-
- if (AllocateAndInitializeSid (auth, cnt, sub1, sub2, sub3, sub4,
- sub5, sub6, sub7, sub8, &sid))
- {
- if (LookupAccountSidW (NULL, sid,
- user, (len = UNLEN + 1, &len),
- dom, (len2 = MAX_DOMAIN_NAME_LEN + 1, &len),
- &acc_type))
- {
- if (sub8)
- rid = sub8;
- else if (sub7)
- rid = sub7;
- else if (sub6)
- rid = sub6;
- else if (sub5)
- rid = sub5;
- else if (sub4)
- rid = sub4;
- else if (sub3)
- rid = sub3;
- else if (sub2)
- rid = sub2;
- else
- rid = sub1;
- printf ("%ls:*:%lu:%lu:,%s::\n",
- user, rid, rid == 18 ? 544 : rid, /* SYSTEM hack */
- put_sid (sid));
- }
- FreeSid (sid);
- }
-}
-
-static int
-usage (FILE * stream)
-{
- fprintf (stream,
-"Usage: mkpasswd [OPTIONS]...\n"
-"Print /etc/passwd file to stdout\n"
-"\n"
-"Options:\n"
-" -l,--local [machine[,offset]]\n"
-" print local user accounts with uid offset offset\n"
-" (from local machine if no machine specified)\n"
-" -L,--Local [machine[,offset]]\n"
-" ditto, but generate username with machine prefix\n"
-" -d,--domain [domain[,offset]]\n"
-" print domain accounts with uid offset offset\n"
-" (from current domain if no domain specified)\n"
-" -D,--Domain [domain[,offset]]\n"
-" ditto, but generate username with domain prefix\n"
-" -c,--current print current user\n"
-" -C,--Current ditto, but generate username with machine or\n"
-" domain prefix\n"
-" -S,--separator char for -L, -D, -C use character char as domain\\user\n"
-" separator in username instead of the default '\\'\n"
-" -o,--id-offset offset change the default offset (10000) added to uids\n"
-" in domain or foreign server accounts.\n"
-" -u,--username username only return information for the specified user\n"
-" one of -l, -L, -d, -D must be specified, too\n"
-" -p,--path-to-home path use specified path instead of user account home dir\n"
-" or /home prefix\n"
-" -m,--no-mount don't use mount points for home dir\n"
-" -U,--unix userlist additionally print UNIX users when using -l or -L\n"
-" on a UNIX Samba server\n"
-" userlist is a comma-separated list of usernames\n"
-" or uid ranges (root,-25,50-100).\n"
-" (enumerating large ranges can take a long time!)\n"
-" -s,--no-sids (ignored)\n"
-" -g,--local-groups (ignored)\n"
-" -h,--help displays this message\n"
-" -v,--version version information and exit\n"
-"\n"
-"Default is to print local accounts on stand-alone machines, domain accounts\n"
-"on domain controllers and domain member machines.\n");
- return 1;
-}
-
-static struct option longopts[] = {
- {"current", no_argument, NULL, 'c'},
- {"Current", no_argument, NULL, 'C'},
- {"domain", optional_argument, NULL, 'd'},
- {"Domain", optional_argument, NULL, 'D'},
- {"local-groups", no_argument, NULL, 'g'},
- {"help", no_argument, NULL, 'h'},
- {"local", optional_argument, NULL, 'l'},
- {"Local", optional_argument, NULL, 'L'},
- {"no-mount", no_argument, NULL, 'm'},
- {"id-offset", required_argument, NULL, 'o'},
- {"path-to-home", required_argument, NULL, 'p'},
- {"no-sids", no_argument, NULL, 's'},
- {"separator", required_argument, NULL, 'S'},
- {"username", required_argument, NULL, 'u'},
- {"unix", required_argument, NULL, 'U'},
- {"version", no_argument, NULL, 'v'},
- {0, no_argument, NULL, 0}
-};
-
-static char opts[] = "cCd::D::ghl::L::mo:sS:p:u:U:v";
-
-static void
-print_version ()
-{
- const char *v = strchr (version, ':');
- int len;
- if (!v)
- {
- v = "?";
- len = 1;
- }
- else
- {
- v += 2;
- len = strchr (v, ' ') - v;
- }
- printf ("\
-mkpasswd (cygwin) %.*s\n\
-passwd File Generator\n\
-Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2008 Red Hat, Inc.\n\
-Compiled on %s\n\
-", len, v, __DATE__);
-}
-
-static void
-enum_std_accounts ()
-{
- /* Generate service starter account entries. */
- printf ("SYSTEM:*:18:544:,S-1-5-18::\n");
- printf ("LocalService:*:19:544:U-NT AUTHORITY\\LocalService,S-1-5-19::\n");
- printf ("NetworkService:*:20:544:U-NT AUTHORITY\\NetworkService,S-1-5-20::\n");
- /* Get 'administrators' group (has localized name). */
- print_special (&sid_nt_auth, 2, SECURITY_BUILTIN_DOMAIN_RID,
- DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0);
-}
-
-static PPOLICY_PRIMARY_DOMAIN_INFO p_dom;
-
-static BOOL
-fetch_primary_domain ()
-{
- NTSTATUS status;
- LSA_OBJECT_ATTRIBUTES oa = { 0, 0, 0, 0, 0, 0 };
- LSA_HANDLE lsa;
-
- if (!p_dom)
- {
- status = LsaOpenPolicy (NULL, &oa, POLICY_VIEW_LOCAL_INFORMATION, &lsa);
- if (!NT_SUCCESS (status))
- return FALSE;
- status = LsaQueryInformationPolicy (lsa, PolicyPrimaryDomainInformation,
- (PVOID *) ((void *) &p_dom));
- LsaClose (lsa);
- if (!NT_SUCCESS (status))
- return FALSE;
- }
- return !!p_dom->Sid;
-}
-
-int
-main (int argc, char **argv)
-{
- int print_domlist = 0;
- domlist_t domlist[32];
- char *opt, *p, *ep;
- int print_cygpath = 1;
- int print_current = 0;
- char *print_unix = NULL;
- const char *sep_char = "\\";
- DWORD id_offset = 10000, off;
- int c, i;
- char *disp_username = NULL;
- char passed_home_path[PATH_MAX];
- BOOL in_domain;
- int optional_args = 0;
-
- passed_home_path[0] = '\0';
- if (!isatty (1))
- setmode (1, O_BINARY);
-
- load_dsgetdcname ();
- in_domain = fetch_primary_domain ();
- fetch_current_user_sid ();
-
- if (argc == 1)
- {
- enum_std_accounts ();
- if (in_domain)
- enum_users (TRUE, NULL, sep_char, print_cygpath, passed_home_path,
- 10000, disp_username, 0);
- else
- enum_users (FALSE, NULL, sep_char, print_cygpath, passed_home_path, 0,
- disp_username, 0);
- return 0;
- }
-
- unsetenv ("POSIXLY_CORRECT"); /* To get optional arg processing right. */
- while ((c = getopt_long (argc, argv, opts, longopts, NULL)) != EOF)
- switch (c)
- {
- case 'd':
- case 'D':
- case 'l':
- case 'L':
- if (print_domlist >= 32)
- {
- fprintf (stderr, "%s: Can not enumerate from more than 32 "
- "domains and machines.\n", __progname);
- return 1;
- }
- domlist[print_domlist].domain = (c == 'd' || c == 'D');
- opt = optarg ?:
- argv[optind] && argv[optind][0] != '-' ? argv[optind] : NULL;
- if (argv[optind] && opt == argv[optind])
- ++optional_args;
- for (i = 0; i < print_domlist; ++i)
- if (domlist[i].domain == domlist[print_domlist].domain
- && ((!domlist[i].str && !opt)
- || (domlist[i].str && opt
- && (off = strlen (domlist[i].str))
- && !strncmp (domlist[i].str, opt, off)
- && (!opt[off] || opt[off] == ','))))
- {
- fprintf (stderr, "%s: Duplicate %s '%s'. Skipping...\n",
- __progname, domlist[i].domain ? "domain" : "machine",
- domlist[i].str);
- goto skip;
- }
- domlist[print_domlist].str = opt;
- domlist[print_domlist].id_offset = ULONG_MAX;
- if (opt && (p = strchr (opt, ',')))
- {
- if (p == opt
- || !isdigit (p[1])
- || (domlist[print_domlist].id_offset = strtol (p + 1, &ep, 10)
- , *ep))
- {
- fprintf (stderr, "%s: Malformed domain,offset string '%s'. "
- "Skipping...\n", __progname, opt);
- break;
- }
- *p = '\0';
- }
- domlist[print_domlist++].with_dom = (c == 'D' || c == 'L');
-skip:
- break;
- case 'S':
- sep_char = optarg;
- if (strlen (sep_char) > 1)
- {
- fprintf (stderr, "%s: Only one character allowed as domain\\user "
- "separator character.\n", __progname);
- return 1;
- }
- if (*sep_char == ':')
- {
- fprintf (stderr, "%s: Colon not allowed as domain\\user separator "
- "character.\n", __progname);
- return 1;
- }
- break;
- case 'U':
- print_unix = optarg;
- break;
- case 'c':
- sep_char = NULL;
- /*FALLTHRU*/
- case 'C':
- print_current = 1;
- break;
- case 'o':
- id_offset = strtoul (optarg, &ep, 10);
- if (*ep)
- {
- fprintf (stderr, "%s: Malformed offset '%s'. "
- "Skipping...\n", __progname, optarg);
- return 1;
- }
- break;
- case 'g':
- break;
- case 's':
- break;
- case 'm':
- print_cygpath = 0;
- break;
- case 'p':
- if (optarg[0] != '/')
- {
- fprintf (stderr, "%s: '%s' is not a fully qualified path.\n",
- __progname, optarg);
- return 1;
- }
- strcpy (passed_home_path, optarg);
- if (optarg[strlen (optarg)-1] != '/')
- strcat (passed_home_path, "/");
- break;
- case 'u':
- disp_username = optarg;
- break;
- case 'h':
- usage (stdout);
- return 0;
- case 'v':
- print_version ();
- return 0;
- default:
- fprintf (stderr, "Try '%s --help' for more information.\n", __progname);
- return 1;
- }
-
- optind += optional_args;
- if (argv[optind])
- {
- fprintf (stderr,
- "mkpasswd: non-option command line argument `%s' is not allowed.\n"
- "Try `mkpasswd --help' for more information.\n", argv[optind]);
- exit (1);
- }
-
- off = id_offset;
- for (i = 0; i < print_domlist; ++i)
- {
- DWORD my_off = (domlist[i].domain || domlist[i].str)
- ? domlist[i].id_offset != ULONG_MAX
- ? domlist[i].id_offset : off : 0;
- if (!domlist[i].domain && domlist[i].str && print_unix)
- enum_unix_users (domlist + i, sep_char, my_off, print_unix);
- if (!my_off && !disp_username)
- enum_std_accounts ();
- enum_users (domlist[i].domain, domlist + i, sep_char, print_cygpath,
- passed_home_path, my_off, disp_username, print_current);
- if (my_off)
- off += id_offset;
- }
-
- if (print_current && !got_curr_user)
- current_user (print_cygpath, sep_char, passed_home_path, off,
- disp_username);
-
- return 0;
-}
diff --git a/winsup/utils/module_info.cc b/winsup/utils/module_info.cc
deleted file mode 100644
index c0e7079..0000000
--- a/winsup/utils/module_info.cc
+++ /dev/null
@@ -1,114 +0,0 @@
-/* module_info.cc
-
- Copyright 1999,2000,2001 Red Hat, Inc.
-
- Written by Egor Duda <deo@logos-m.ru>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <stdlib.h>
-#include <windows.h>
-#include <psapi.h>
-
-static int psapi_loaded = 0;
-static HMODULE psapi_module_handle = NULL;
-
-typedef BOOL WINAPI (tf_EnumProcessModules) (HANDLE, HMODULE *, DWORD,
- LPDWORD);
-typedef BOOL WINAPI (tf_GetModuleInformation) (HANDLE, HMODULE, LPMODULEINFO,
- DWORD);
-typedef DWORD WINAPI (tf_GetModuleFileNameExA) (HANDLE, HMODULE, LPSTR,
- DWORD);
-
-static tf_EnumProcessModules *psapi_EnumProcessModules = NULL;
-static tf_GetModuleInformation *psapi_GetModuleInformation = NULL;
-static tf_GetModuleFileNameExA *psapi_GetModuleFileNameExA = NULL;
-
-/* Returns full name of Dll, which is loaded by hProcess at BaseAddress.
- Uses psapi.dll. */
-
-char *
-psapi_get_module_name (HANDLE hProcess, DWORD BaseAddress)
-{
- DWORD len;
- MODULEINFO mi;
- unsigned int i;
- HMODULE dh_buf[1];
- HMODULE *DllHandle = dh_buf;
- DWORD cbNeeded;
- BOOL ok;
-
- char name_buf[MAX_PATH + 1];
-
- if (!psapi_loaded ||
- psapi_EnumProcessModules == NULL ||
- psapi_GetModuleInformation == NULL ||
- psapi_GetModuleFileNameExA == NULL)
- {
- if (psapi_loaded)
- goto failed;
- psapi_loaded = 1;
- psapi_module_handle = LoadLibrary ("psapi.dll");
- if (!psapi_module_handle)
- goto failed;
- psapi_EnumProcessModules =
- (tf_EnumProcessModules *) GetProcAddress (psapi_module_handle,
- "EnumProcessModules");
- psapi_GetModuleInformation =
- (tf_GetModuleInformation *) GetProcAddress (psapi_module_handle,
- "GetModuleInformation");
- psapi_GetModuleFileNameExA =
- (tf_GetModuleFileNameExA *) GetProcAddress (psapi_module_handle,
- "GetModuleFileNameExA");
- if (psapi_EnumProcessModules == NULL
- || psapi_GetModuleInformation == NULL
- || psapi_GetModuleFileNameExA == NULL)
- goto failed;
- }
-
- ok = (*psapi_EnumProcessModules) (hProcess,
- DllHandle, sizeof (HMODULE), &cbNeeded);
-
- if (!ok || !cbNeeded)
- goto failed;
- DllHandle = (HMODULE *) malloc (cbNeeded);
- if (!DllHandle)
- goto failed;
- ok = (*psapi_EnumProcessModules) (hProcess, DllHandle, cbNeeded, &cbNeeded);
- if (!ok)
- {
- free (DllHandle);
- goto failed;
- }
-
- for (i = 0; i < cbNeeded / sizeof (HMODULE); i++)
- {
- if (!(*psapi_GetModuleInformation) (hProcess,
- DllHandle[i], &mi, sizeof (mi)))
- {
- free (DllHandle);
- goto failed;
- }
-
- len = (*psapi_GetModuleFileNameExA) (hProcess,
- DllHandle[i], name_buf, MAX_PATH);
- if (len == 0)
- {
- free (DllHandle);
- goto failed;
- }
-
- if ((DWORD) (mi.lpBaseOfDll) == BaseAddress)
- {
- free (DllHandle);
- return strdup (name_buf);
- }
- }
-
-failed:
- return NULL;
-}
diff --git a/winsup/utils/mount.cc b/winsup/utils/mount.cc
deleted file mode 100644
index 464240f..0000000
--- a/winsup/utils/mount.cc
+++ /dev/null
@@ -1,499 +0,0 @@
-/* mount.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005,
- 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <stdio.h>
-#include <sys/mount.h>
-#include <sys/stat.h>
-#include <mntent.h>
-#include <windows.h>
-#include <sys/cygwin.h>
-#include <stdlib.h>
-#include <getopt.h>
-#include <dirent.h>
-
-#ifdef errno
-#undef errno
-#endif
-#include <errno.h>
-
-#define NT_MAX_PATH 32768
-
-#define EXEC_FLAGS (MOUNT_EXEC | MOUNT_NOTEXEC | MOUNT_CYGWIN_EXEC)
-
-static void mount_entries (void);
-static void show_mounts (void);
-static void show_cygdrive_info (void);
-static void change_cygdrive_prefix (const char *new_prefix, int flags);
-static int mount_already_exists (const char *posix_path, int flags);
-
-// static short create_missing_dirs = FALSE;
-static short force = FALSE;
-
-static const char version[] = "$Revision$";
-static const char *progname;
-
-static void
-error (const char *path)
-{
- fprintf (stderr, "%s: %s: %s\n", progname, path,
- (errno == EMFILE) ? "Too many mount entries" : strerror (errno));
- exit (1);
-}
-
-/* FIXME: do_mount should also print a warning message if the dev arg
- is a non-existent Win32 path. */
-
-static void
-do_mount (const char *dev, const char *where, int flags)
-{
- struct stat statbuf;
- int statres;
-
- statres = stat (where, &statbuf);
-
-#if 0
- if (statres == -1)
- {
- /* FIXME: this'll fail if mount dir is missing any parent dirs */
- if (create_missing_dirs == TRUE)
- {
- if (mkdir (where, 0755) == -1)
- fprintf (stderr, "Warning: unable to create %s!\n", where);
- else
- statres = 0; /* Pretend stat succeeded if we could mkdir. */
- }
- }
-#endif
-
- if (statres == -1)
- {
- if (!force)
- fprintf (stderr, "%s: warning - %s does not exist.\n", progname, where);
- }
- else if (!(statbuf.st_mode & S_IFDIR))
- {
- if (!force)
- fprintf (stderr, "%s: warning: %s is not a directory.\n", progname, where);
- }
-
- if (!force && !(flags & EXEC_FLAGS) && strlen (dev))
- {
- char devtmp[1 + 2 * strlen (dev)];
- strcpy (devtmp, dev);
- char c = strchr (devtmp, '\0')[-1];
- if (c == '/' || c == '\\')
- strcat (devtmp, ".");
- /* Use a curious property of Windows which allows the use of \.. even
- on non-directory paths. */
- for (const char *p = dev; (p = strpbrk (p, "/\\")); p++)
- strcat (devtmp, "\\..");
- strcat (devtmp, "\\");
- if (GetDriveType (devtmp) == DRIVE_REMOTE)
- {
- fprintf (stderr, "%s: defaulting to '--no-executable' flag for speed since native path\n"
- "%*creferences a remote share. Use '-f' option to override.\n", progname,
- strlen(progname) + 2, ' ');
- flags |= MOUNT_NOTEXEC;
- }
- }
-
- if (mount (dev, where, flags))
- error (where);
-
- exit (0);
-}
-
-static struct option longopts[] =
-{
- {"change-cygdrive-prefix", no_argument, NULL, 'c'},
- {"force", no_argument, NULL, 'f'},
- {"help", no_argument, NULL, 'h' },
- {"mount-entries", no_argument, NULL, 'm'},
- {"options", required_argument, NULL, 'o'},
- {"show-cygdrive-prefix", no_argument, NULL, 'p'},
- {"version", no_argument, NULL, 'v'},
- {NULL, 0, NULL, 0}
-};
-
-static char opts[] = "cfhmpvo:";
-
-struct opt
-{
- const char *name;
- unsigned val;
- bool clear;
-} oopts[] =
-{
- {"binary", MOUNT_BINARY, false},
- {"text", MOUNT_BINARY, true},
- {"exec", MOUNT_EXEC, false},
- {"notexec", MOUNT_NOTEXEC, false},
- {"cygexec", MOUNT_CYGWIN_EXEC, false},
- {"nosuid", 0, 0},
- {"acl", MOUNT_NOACL, true},
- {"noacl", MOUNT_NOACL, false},
- {"posix=1", MOUNT_NOPOSIX, true},
- {"posix=0", MOUNT_NOPOSIX, false},
-};
-
-static void
-usage (FILE *where = stderr)
-{
- fprintf (where, "Usage: %s [OPTION] [<win32path> <posixpath>]\n\
-Display information about mounted filesystems, or mount a filesystem\n\
-\n\
- -c, --change-cygdrive-prefix change the cygdrive path prefix to <posixpath>\n\
- -f, --force force mount, don't warn about missing mount\n\
- point directories\n\
- -h, --help output usage information and exit\n\
- -m, --mount-entries write fstab entries to replicate mount points\n\
- and cygdrive prefixes\n\
- -o, --options X[,X...] specify mount options\n\
- -p, --show-cygdrive-prefix show user and/or system cygdrive path prefix\n\
- -v, --version output version information and exit\n\
-\n\
-Valid options are:\n\n ", progname);
- for (opt *o = oopts; o < (oopts + (sizeof (oopts) / sizeof (oopts[0]))); o++)
- fprintf (where, "%s%s", o == oopts ? "" : ",", o->name);
- fputs ("\n\n", where);
- exit (where == stderr ? 1 : 0);
-}
-
-static void
-print_version ()
-{
- const char *v = strchr (version, ':');
- int len;
- if (!v)
- {
- v = "?";
- len = 1;
- }
- else
- {
- v += 2;
- len = strchr (v, ' ') - v;
- }
- printf ("\
-%s (cygwin) %.*s\n\
-Filesystem Utility\n\
-Copyright 1996-2008 Red Hat, Inc.\n\
-Compiled on %s\n\
-", progname, len, v, __DATE__);
-}
-
-static char *
-concat3 (char *a, const char *b, const char *c)
-{
- size_t totlen = strlen (a) + strlen (b) + strlen (c) + 1;
- a = (char *) realloc (a, totlen);
- return strcat (strcat (a, b), c);
-}
-
-int
-main (int argc, char **argv)
-{
- int i;
- int flags = MOUNT_BINARY;
- char *options = strdup ("");
- enum do_what
- {
- nada,
- saw_change_cygdrive_prefix,
- saw_show_cygdrive_prefix,
- saw_mount_commands
- } do_what = nada;
-
- progname = strrchr (argv[0], '/');
- if (progname == NULL)
- progname = strrchr (argv[0], '\\');
- if (progname == NULL)
- progname = argv[0];
- else
- progname++;
-
- if (argc == 1)
- {
- show_mounts ();
- exit (0);
- }
-
- while ((i = getopt_long (argc, argv, opts, longopts, NULL)) != EOF)
- switch (i)
- {
- case 'c':
- if (do_what == nada)
- do_what = saw_change_cygdrive_prefix;
- else
- usage ();
- break;
- case 'f':
- force = TRUE;
- break;
- case 'h':
- usage (stdout);
- break;
- case 'm':
- if (do_what == nada)
- do_what = saw_mount_commands;
- else
- usage ();
- break;
- case 'o':
- if (*options)
- options = concat3 (options, ",", optarg);
- else
- options = strdup (optarg);
- break;
- case 'p':
- if (do_what == nada)
- do_what = saw_show_cygdrive_prefix;
- else
- usage ();
- break;
- case 'v':
- print_version ();
- return 0;
- break;
- default:
- usage ();
- }
-
- while (*options)
- {
- char *p = strchr (options, ',');
- if (p)
- *p++ = '\0';
- else
- p = strchr (options, '\0');
-
- for (opt *o = oopts; o < (oopts + (sizeof (oopts) / sizeof (oopts[0]))); o++)
- if (strcmp (options, o->name) == 0)
- {
- if (o->clear)
- flags &= ~o->val;
- else
- flags |= o->val;
- goto gotit;
- }
- fprintf (stderr, "%s: invalid option - '%s'\n", progname, options);
- exit (1);
-
- gotit:
- options = p;
- }
-
- if (flags & MOUNT_NOTEXEC && flags & (MOUNT_EXEC | MOUNT_CYGWIN_EXEC))
- {
- fprintf (stderr, "%s: invalid combination of executable options\n", progname);
- exit (1);
- }
-
- cygwin_internal (CW_SET_DOS_FILE_WARNING, false);
-
- argc--;
- switch (do_what)
- {
- case saw_change_cygdrive_prefix:
- if (optind != argc)
- usage ();
- change_cygdrive_prefix (argv[optind], flags);
- break;
- case saw_show_cygdrive_prefix:
- if (optind <= argc)
- usage ();
- show_cygdrive_info ();
- break;
- case saw_mount_commands:
- if (optind <= argc)
- usage ();
- mount_entries ();
- break;
- default:
- if (optind != (argc - 1))
- {
- if (optind >= argc)
- fprintf (stderr, "%s: not enough arguments\n", progname);
- else
- fprintf (stderr, "%s: too many arguments\n", progname);
- usage ();
- }
- if (force || !mount_already_exists (argv[optind + 1], flags))
- do_mount (argv[optind], argv[optind + 1], flags);
- else
- {
- errno = EBUSY;
- error (argv[optind + 1]);
- }
- }
-
- /* NOTREACHED */
- return 0;
-}
-
-static char *
-convert_spaces (char *tgt, const char *src)
-{
- char *tp, *spacep;
- const char *sp;
-
- tp = tgt;
- for (sp = src; (spacep = strchr (sp, ' ')); sp = spacep + 1)
- {
- tp = stpncpy (tp, sp, spacep - sp);
- tp = stpcpy (tp, "\\040");
- }
- stpcpy (tp, sp);
- return tgt;
-}
-
-static void
-mount_entries (void)
-{
- FILE *m = setmntent ("/-not-used-", "r");
- struct mntent *p;
- const char *format_mnt = "%s %s %s %s 0 0\n";
- const char *format_cyg = "none %s cygdrive %s 0 0\n";
-
- // write fstab entries for normal mount points
- while ((p = getmntent (m)) != NULL)
- // Only list non-cygdrives
- if (!strstr (p->mnt_opts, ",noumount"))
- {
- char fsname[NT_MAX_PATH], dirname[NT_MAX_PATH];
- printf (format_mnt, convert_spaces (fsname, p->mnt_fsname),
- convert_spaces (dirname, p->mnt_dir),
- p->mnt_type, p->mnt_opts);
- }
- endmntent (m);
-
- // write fstab entry for cygdrive prefix
- m = setmntent ("/-not-used-", "r");
- while ((p = getmntent (m)) != NULL)
- {
- char *noumount;
- if ((noumount = strstr (p->mnt_opts, ",noumount")))
- {
- char dirname[NT_MAX_PATH];
- char opts[strlen (p->mnt_opts) + 1];
-
- convert_spaces (dirname, p->mnt_dir);
- char *ls = strrchr (dirname, '/');
- if (ls && ls > dirname)
- *ls = '\0';
- *stpncpy (opts, p->mnt_opts, noumount - p->mnt_opts) = '\0';
- printf (format_cyg, dirname, opts);
- break;
- }
- }
- endmntent (m);
-
- exit(0);
-}
-
-static void
-show_mounts (void)
-{
- FILE *m = setmntent ("/-not-used-", "r");
- struct mntent *p;
- const char *format = "%s on %s type %s (%s)\n";
-
- // printf (format, "Device", "Directory", "Type", "Flags");
- while ((p = getmntent (m)) != NULL)
- printf (format, p->mnt_fsname, p->mnt_dir, p->mnt_type, p->mnt_opts);
- endmntent (m);
-}
-
-/* Return 1 if mountpoint from the same registry area is already in
- mount table. Otherwise return 0. */
-static int
-mount_already_exists (const char *posix_path, int flags)
-{
- int found_matching = 0;
-
- FILE *m = setmntent ("/-not-used-", "r");
- struct mntent *p;
-
- while ((p = getmntent (m)) != NULL)
- {
- /* if the paths match, and they're both the same type of mount. */
- if (strcmp (p->mnt_dir, posix_path) == 0)
- {
- if (p->mnt_type[0] == 'u')
- {
- if (!(flags & MOUNT_SYSTEM)) /* both current_user */
- found_matching = 1;
- else
- fprintf (stderr,
- "%s: warning: system mount point of '%s' "
- "will always be masked by user mount.\n",
- progname, posix_path);
- break;
- }
- else if (p->mnt_type[0] == 's')
- {
- if (flags & MOUNT_SYSTEM) /* both system */
- found_matching = 1;
- else
- fprintf (stderr,
- "%s: warning: user mount point of '%s' "
- "masks system mount.\n",
- progname, posix_path);
- break;
- }
- else
- {
- fprintf (stderr, "%s: warning: couldn't determine mount type.\n", progname);
- break;
- }
- }
- }
- endmntent (m);
-
- return found_matching;
-}
-
-/* change_cygdrive_prefix: Change the cygdrive prefix */
-static void
-change_cygdrive_prefix (const char *new_prefix, int flags)
-{
- flags |= MOUNT_CYGDRIVE;
-
- if (mount (NULL, new_prefix, flags))
- error (new_prefix);
-
- exit (0);
-}
-
-/* show_cygdrive_info: Show the user and/or cygdrive info, i.e., prefix and
- flags.*/
-static void
-show_cygdrive_info ()
-{
- /* Get the cygdrive info */
- char user[MAX_PATH];
- char system[MAX_PATH];
- char user_flags[MAX_PATH];
- char system_flags[MAX_PATH];
- cygwin_internal (CW_GET_CYGDRIVE_INFO, user, system, user_flags,
- system_flags);
-
- /* Display the user and system cygdrive path prefix, if necessary
- (ie, not empty) */
- const char *format = "%-18s %-11s %s\n";
- printf (format, "Prefix", "Type", "Flags");
- if (strlen (user) > 0)
- printf (format, user, "user", user_flags);
- if (strlen (system) > 0)
- printf (format, system, "nouser", system_flags);
-
- exit (0);
-}
diff --git a/winsup/utils/parse_pe.cc b/winsup/utils/parse_pe.cc
deleted file mode 100644
index 44b4068..0000000
--- a/winsup/utils/parse_pe.cc
+++ /dev/null
@@ -1,104 +0,0 @@
-/* parse_pe.cc
-
- Copyright 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
-
- Written by Egor Duda <deo@logos-m.ru>
-
- This file is part of Cygwin.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License (file COPYING.dumper) for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#include <bfd.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "dumper.h"
-
-int
-exclusion::add (LPBYTE mem_base, DWORD mem_size)
-{
- while (last >= size)
- size += step;
- region = (process_mem_region *) realloc (region, size * sizeof (process_mem_region));
- if (region == NULL)
- return 0;
- region[last].base = mem_base;
- region[last].size = mem_size;
- last++;
- return 1;
-};
-
-int
-cmp_regions (const void *r1, const void *r2)
-{
- if (((process_mem_region *) r1)->base < ((process_mem_region *) r2)->base)
- return -1;
- if (((process_mem_region *) r1)->base > ((process_mem_region *) r2)->base)
- return 1;
- return 0;
-}
-
-int
-exclusion::sort_and_check ()
-{
- qsort (region, last, sizeof (process_mem_region), &cmp_regions);
- for (process_mem_region * p = region; p < region + last - 1; p++)
- {
- process_mem_region *q = p + 1;
- if (q == p + 1)
- continue;
- if (p->base + size > q->base)
- {
- fprintf (stderr, "region error @ (%8p + %d) > %8p\n", p->base, size, q->base);
- return 0;
- }
- }
- return 1;
-}
-
-static void
-select_data_section (bfd * abfd, asection * sect, PTR obj)
-{
- exclusion *excl_list = (exclusion *) obj;
-
- if ((sect->flags & (SEC_CODE | SEC_DEBUGGING)) &&
- sect->vma && bfd_get_section_size (sect))
- {
- excl_list->add ((LPBYTE) sect->vma, (DWORD) bfd_get_section_size (sect));
- deb_printf ("excluding section: %20s %08lx\n", sect->name,
- bfd_get_section_size (sect));
- }
-}
-
-int
-parse_pe (const char *file_name, exclusion * excl_list)
-{
- if (file_name == NULL || excl_list == NULL)
- return 0;
-
- bfd *abfd = bfd_openr (file_name, "pei-i386");
- if (abfd == NULL)
- {
- bfd_perror ("failed to open file");
- return 0;
- }
-
- bfd_check_format (abfd, bfd_object);
- bfd_map_over_sections (abfd, &select_data_section, (PTR) excl_list);
- excl_list->sort_and_check ();
-
- bfd_close (abfd);
- return 1;
-}
diff --git a/winsup/utils/passwd.c b/winsup/utils/passwd.c
deleted file mode 100644
index 3ef4f92..0000000
--- a/winsup/utils/passwd.c
+++ /dev/null
@@ -1,609 +0,0 @@
-/* passwd.c: Changing passwords and managing account information
-
- Copyright 1999, 2000, 2001, 2002, 2003, 2008 Red Hat, Inc.
-
- Written by Corinna Vinschen <corinna.vinschen@cityweb.de>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <windows.h>
-#include <wininet.h>
-#include <lmaccess.h>
-#include <lmerr.h>
-#include <lmcons.h>
-#include <lmapibuf.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <getopt.h>
-#include <pwd.h>
-#include <sys/cygwin.h>
-#include <sys/types.h>
-#include <time.h>
-#include <errno.h>
-
-#define USER_PRIV_ADMIN 2
-
-static const char version[] = "$Revision$";
-static char *prog_name;
-
-static struct option longopts[] =
-{
- {"cannot-change", no_argument, NULL, 'c'},
- {"can-change", no_argument, NULL, 'C'},
- {"logonserver", required_argument, NULL, 'd'},
- {"never-expires", no_argument, NULL, 'e'},
- {"expires", no_argument, NULL, 'E'},
- {"help", no_argument, NULL, 'h' },
- {"inactive", required_argument, NULL, 'i'},
- {"lock", no_argument, NULL, 'l'},
- {"minage", required_argument, NULL, 'n'},
- {"pwd-not-required", no_argument, NULL, 'p'},
- {"pwd-required", no_argument, NULL, 'P'},
- {"unlock", no_argument, NULL, 'u'},
- {"version", no_argument, NULL, 'v'},
- {"maxage", required_argument, NULL, 'x'},
- {"length", required_argument, NULL, 'L'},
- {"status", no_argument, NULL, 'S'},
- { "reg-store-pwd", no_argument, NULL, 'R'},
- {NULL, 0, NULL, 0}
-};
-
-static char opts[] = "cCd:eEhi:ln:pPuvx:L:SR";
-
-int
-eprint (int with_name, const char *fmt, ...)
-{
- va_list ap;
-
- if (with_name)
- fprintf(stderr, "%s: ", prog_name);
- va_start (ap, fmt);
- vfprintf (stderr, fmt, ap);
- va_end (ap);
- fprintf(stderr, "\n");
- return 1;
-}
-
-int
-EvalRet (int ret, const char *user)
-{
- switch (ret)
- {
- case NERR_Success:
- return 0;
-
- case ERROR_ACCESS_DENIED:
- if (! user)
- eprint (0, "You may not change password expiry information.");
- else
- eprint (0, "You may not change the password for %s.", user);
- break;
-
- eprint (0, "Bad password: Invalid.");
- break;
-
- case NERR_PasswordTooShort:
- eprint (0, "Bad password: Too short.");
- break;
-
- case NERR_UserNotFound:
- eprint (1, "unknown user %s", user);
- break;
-
- case ERROR_INVALID_PASSWORD:
- case NERR_BadPassword:
- eprint (0, "Incorrect password for %s.", user);
- eprint (0, "The password for %s is unchanged.", user);
- break;
-
- default:
- eprint (1, "unrecoverable error %d", ret);
- break;
- }
- return 1;
-}
-
-PUSER_INFO_3
-GetPW (char *user, int print_win_name, LPCWSTR server)
-{
- char usr_buf[UNLEN + 1];
- WCHAR name[2 * (UNLEN + 1)];
- DWORD ret;
- PUSER_INFO_3 ui;
- struct passwd *pw;
- char *domain = (char *) alloca (INTERNET_MAX_HOST_NAME_LENGTH + 1);
-
- /* Try getting a Win32 username in case the user edited /etc/passwd */
- if ((pw = getpwnam (user)))
- {
- cygwin_internal (CW_EXTRACT_DOMAIN_AND_USER, pw, domain, usr_buf);
- if (strcasecmp (pw->pw_name, usr_buf))
- {
- /* Hack to avoid problem with LookupAccountSid after impersonation */
- if (strcasecmp (usr_buf, "SYSTEM"))
- {
- user = usr_buf;
- if (print_win_name)
- printf ("Windows username : %s\n", user);
- }
- }
- }
- MultiByteToWideChar (CP_ACP, 0, user, -1, name, 2 * (UNLEN + 1));
- ret = NetUserGetInfo (server, name, 3, (void *) &ui);
- return EvalRet (ret, user) ? NULL : ui;
-}
-
-int
-ChangePW (const char *user, const char *oldpwd, const char *pwd, int justcheck,
- LPCWSTR server)
-{
- WCHAR name[2 * (UNLEN + 1)], oldpass[512], pass[512];
- DWORD ret;
-
- MultiByteToWideChar (CP_ACP, 0, user, -1, name, 2 * (UNLEN + 1));
- MultiByteToWideChar (CP_ACP, 0, pwd, -1, pass, 512);
- if (! oldpwd)
- {
- USER_INFO_1003 ui;
-
- ui.usri1003_password = pass;
- ret = NetUserSetInfo (server, name, 1003, (LPBYTE) &ui, NULL);
- }
- else
- {
- MultiByteToWideChar (CP_ACP, 0, oldpwd, -1, oldpass, 512);
- ret = NetUserChangePassword (server, name, oldpass, pass);
- }
- if (justcheck && ret != ERROR_INVALID_PASSWORD)
- return 0;
- if (! EvalRet (ret, user) && ! justcheck)
- {
- eprint (0, "Password changed.");
- }
- return ret;
-}
-
-void
-PrintPW (PUSER_INFO_3 ui, LPCWSTR server)
-{
- time_t t = time (NULL) - ui->usri3_password_age;
- int ret;
- PUSER_MODALS_INFO_0 mi;
-
- printf ("Account disabled : %s",
- (ui->usri3_flags & UF_ACCOUNTDISABLE) ? "yes\n" : "no\n");
- printf ("Password not required : %s",
- (ui->usri3_flags & UF_PASSWD_NOTREQD) ? "yes\n" : "no\n");
- printf ("User can't change password : %s",
- (ui->usri3_flags & UF_PASSWD_CANT_CHANGE) ? "yes\n" : "no\n");
- printf ("Password never expires : %s",
- (ui->usri3_flags & UF_DONT_EXPIRE_PASSWD) ? "yes\n" : "no\n");
- printf ("Password expired : %s",
- (ui->usri3_password_expired) ? "yes\n" : "no\n");
- printf ("Latest password change : %s", ctime(&t));
- ret = NetUserModalsGet (server, 0, (void *) &mi);
- if (! ret)
- {
- if (mi->usrmod0_max_passwd_age == TIMEQ_FOREVER)
- mi->usrmod0_max_passwd_age = 0;
- if (mi->usrmod0_min_passwd_age == TIMEQ_FOREVER)
- mi->usrmod0_min_passwd_age = 0;
- if (mi->usrmod0_force_logoff == TIMEQ_FOREVER)
- mi->usrmod0_force_logoff = 0;
- if (ui->usri3_priv == USER_PRIV_ADMIN)
- mi->usrmod0_min_passwd_len = 0;
- printf ("\nSystem password settings:\n");
- printf ("Max. password age %ld days\n",
- mi->usrmod0_max_passwd_age / ONE_DAY);
- printf ("Min. password age %ld days\n",
- mi->usrmod0_min_passwd_age / ONE_DAY);
- printf ("Force logout after %ld days\n",
- mi->usrmod0_force_logoff / ONE_DAY);
- printf ("Min. password length: %ld\n",
- mi->usrmod0_min_passwd_len);
- }
-}
-
-int
-SetModals (int xarg, int narg, int iarg, int Larg, LPCWSTR server)
-{
- int ret;
- PUSER_MODALS_INFO_0 mi;
-
- ret = NetUserModalsGet (server, 0, (void *) &mi);
- if (! ret)
- {
- if (xarg == 0)
- mi->usrmod0_max_passwd_age = TIMEQ_FOREVER;
- else if (xarg > 0)
- mi->usrmod0_max_passwd_age = xarg * ONE_DAY;
-
- if (narg == 0)
- {
- mi->usrmod0_min_passwd_age = TIMEQ_FOREVER;
- mi->usrmod0_password_hist_len = 0;
- }
- else if (narg > 0)
- mi->usrmod0_min_passwd_age = narg * ONE_DAY;
-
- if (iarg == 0)
- mi->usrmod0_force_logoff = TIMEQ_FOREVER;
- else if (iarg > 0)
- mi->usrmod0_force_logoff = iarg * ONE_DAY;
-
- if (Larg >= 0)
- mi->usrmod0_min_passwd_len = Larg;
-
- ret = NetUserModalsSet (server, 0, (LPBYTE) mi, NULL);
- NetApiBufferFree (mi);
- }
- return EvalRet (ret, NULL);
-}
-
-static void usage (FILE * stream, int status) __attribute__ ((noreturn));
-static void
-usage (FILE * stream, int status)
-{
- fprintf (stream, ""
- "Usage: %s [OPTION] [USER]\n"
- "Change USER's password or password attributes.\n"
- "\n"
- "User operations:\n"
- " -l, --lock lock USER's account.\n"
- " -u, --unlock unlock USER's account.\n"
- " -c, --cannot-change USER can't change password.\n"
- " -C, --can-change USER can change password.\n"
- " -e, --never-expires USER's password never expires.\n"
- " -E, --expires USER's password expires according to system's\n"
- " password aging rule.\n"
- " -p, --pwd-not-required no password required for USER.\n"
- " -P, --pwd-required password is required for USER.\n"
- " -R, --reg-store-pwd enter password to store it in the registry for\n"
- " later usage by services to be able to switch\n"
- " to this user context with network credentials.\n"
- "\n"
- "System operations:\n"
- " -i, --inactive NUM set NUM of days before inactive accounts are disabled\n"
- " (inactive accounts are those with expired passwords).\n"
- " -n, --minage DAYS set system minimum password age to DAYS days.\n"
- " -x, --maxage DAYS set system maximum password age to DAYS days.\n"
- " -L, --length LEN set system minimum password length to LEN.\n"
- "\n"
- "Other options:\n"
- " -d, --logonserver SERVER connect to SERVER (e.g. domain controller).\n"
- " default server is the content of $LOGONSERVER.\n"
- " -S, --status display password status for USER (locked, expired,\n"
- " etc.) plus global system password settings.\n"
- " -h, --help output usage information and exit.\n"
- " -v, --version output version information and exit.\n"
- "\n"
- "If no option is given, change USER's password. If no user name is given,\n"
- "operate on current user. System operations must not be mixed with user\n"
- "operations. Don't specify a USER when triggering a system operation.\n"
- "\n"
- "Don't specify a user or any other option together with the -R option.\n"
- "Non-Admin users can only store their password if cygserver is running and\n"
- "the CYGWIN environment variable is set to contain the word 'server'.\n"
- "Note that storing even obfuscated passwords in the registry is not overly\n"
- "secure. Use this feature only if the machine is adequately locked down.\n"
- "Don't use this feature if you don't need network access within a remote\n"
- "session. You can delete your stored password by using `passwd -R' and\n"
- "specifying an empty password.\n"
- "\n"
- "Report bugs to <cygwin@cygwin.com>\n", prog_name);
- exit (status);
-}
-
-static void
-print_version ()
-{
- const char *v = strchr (version, ':');
- int len;
- if (!v)
- {
- v = "?";
- len = 1;
- }
- else
- {
- v += 2;
- len = strchr (v, ' ') - v;
- }
- printf ("\
-%s (cygwin) %.*s\n\
-Password Utility\n\
-Copyright 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.\n\
-Compiled on %s\n\
-", prog_name, len, v, __DATE__);
-}
-
-int
-main (int argc, char **argv)
-{
- char *c;
- char user[UNLEN + 1], oldpwd[_PASSWORD_LEN + 1], newpwd[_PASSWORD_LEN + 1];
- int ret = 0;
- int cnt = 0;
- int opt, len;
- int Larg = -1;
- int xarg = -1;
- int narg = -1;
- int iarg = -1;
- int lopt = 0;
- int uopt = 0;
- int copt = 0;
- int Copt = 0;
- int eopt = 0;
- int Eopt = 0;
- int popt = 0;
- int Popt = 0;
- int Sopt = 0;
- int Ropt = 0;
- PUSER_INFO_3 ui, li;
- LPWSTR server = NULL;
-
- prog_name = strrchr (argv[0], '/');
- if (prog_name == NULL)
- prog_name = strrchr (argv[0], '\\');
- if (prog_name == NULL)
- prog_name = argv[0];
- else
- prog_name++;
- c = strrchr (prog_name, '.');
- if (c)
- *c = '\0';
-
- while ((opt = getopt_long (argc, argv, opts, longopts, NULL)) != EOF)
- switch (opt)
- {
- case 'h':
- usage (stdout, 0);
- break;
-
- case 'i':
- if (lopt || uopt || copt || Copt || eopt || Eopt || popt || Popt || Sopt || Ropt)
- usage (stderr, 1);
- if ((iarg = atoi (optarg)) < 0 || iarg > 999)
- return eprint (1, "Force logout time must be between 0 and 999.");
- break;
-
- case 'l':
- if (xarg >= 0 || narg >= 0 || iarg >= 0 || Larg >= 0 || uopt || Sopt || Ropt)
- usage (stderr, 1);
- lopt = 1;
- break;
-
- case 'n':
- if (lopt || uopt || copt || Copt || eopt || Eopt || popt || Popt || Sopt || Ropt)
- usage (stderr, 1);
- if ((narg = atoi (optarg)) < 0 || narg > 999)
- return eprint (1, "Minimum password age must be between 0 and 999.");
- if (xarg >= 0 && narg > xarg)
- return eprint (1, "Minimum password age must be less than "
- "maximum password age.");
- break;
-
- case 'u':
- if (xarg >= 0 || narg >= 0 || iarg >= 0 || Larg >= 0 || lopt || Sopt || Ropt)
- usage (stderr, 1);
- uopt = 1;
- break;
-
- case 'c':
- if (xarg >= 0 || narg >= 0 || iarg >= 0 || Larg >= 0 || Sopt || Ropt)
- usage (stderr, 1);
- copt = 1;
- break;
-
- case 'C':
- if (xarg >= 0 || narg >= 0 || iarg >= 0 || Larg >= 0 || Sopt || Ropt)
- usage (stderr, 1);
- Copt = 1;
- break;
-
- case 'd':
- {
- if (Ropt)
- usage (stderr, 1);
- char *tmpbuf = alloca (strlen (optarg) + 3);
- tmpbuf[0] = '\0';
- if (*optarg != '\\')
- strcpy (tmpbuf, "\\\\");
- strcat (tmpbuf, optarg);
- server = alloca ((strlen (tmpbuf) + 1) * sizeof (WCHAR));
- if (MultiByteToWideChar (CP_ACP, 0, tmpbuf, -1, server,
- strlen (tmpbuf) + 1) <= 0)
- server = NULL;
- }
- break;
-
- case 'e':
- if (xarg >= 0 || narg >= 0 || iarg >= 0 || Larg >= 0 || Sopt || Ropt)
- usage (stderr, 1);
- eopt = 1;
- break;
-
- case 'E':
- if (xarg >= 0 || narg >= 0 || iarg >= 0 || Larg >= 0 || Sopt || Ropt)
- usage (stderr, 1);
- Eopt = 1;
- break;
-
- case 'p':
- if (xarg >= 0 || narg >= 0 || iarg >= 0 || Larg >= 0 || Sopt || Ropt)
- usage (stderr, 1);
- popt = 1;
- break;
-
- case 'P':
- if (xarg >= 0 || narg >= 0 || iarg >= 0 || Larg >= 0 || Sopt || Ropt)
- usage (stderr, 1);
- Popt = 1;
- break;
-
- case 'v':
- print_version ();
- exit (0);
- break;
-
- case 'x':
- if (lopt || uopt || copt || Copt || eopt || Eopt || popt || Popt || Sopt || Ropt)
- usage (stderr, 1);
- if ((xarg = atoi (optarg)) < 0 || xarg > 999)
- return eprint (1, "Maximum password age must be between 0 and 999.");
- if (narg >= 0 && xarg < narg)
- return eprint (1, "Maximum password age must be greater than "
- "minimum password age.");
- break;
-
- case 'L':
- if (lopt || uopt || copt || Copt || eopt || Eopt || popt || Popt || Sopt || Ropt)
- usage (stderr, 1);
- if ((Larg = atoi (optarg)) < 0 || Larg > LM20_PWLEN)
- return eprint (1, "Minimum password length must be between "
- "0 and %d.", LM20_PWLEN);
- break;
-
- case 'S':
- if (xarg >= 0 || narg >= 0 || iarg >= 0 || Larg >= 0 || lopt || uopt
- || copt || Copt || eopt || Eopt || popt || Popt || Ropt)
- usage (stderr, 1);
- Sopt = 1;
- break;
-
- case 'R':
- if (xarg >= 0 || narg >= 0 || iarg >= 0 || Larg >= 0 || lopt || uopt
- || copt || Copt || eopt || Eopt || popt || Popt || Sopt
- || server)
- usage (stderr, 1);
- Ropt = 1;
- break;
-
- default:
- usage (stderr, 1);
- }
-
- if (Ropt)
- {
- if (optind < argc)
- usage (stderr, 1);
- printf (
-"This functionality stores a password in the registry for usage by services\n"
-"which need to change the user context and require network access. Typical\n"
-"applications are interactive remote logons using sshd, cron task, etc.\n"
-"This password will always tried first when any privileged application is\n"
-"about to switch the user context.\n\n"
-"Note that storing even obfuscated passwords in the registry is not overly\n"
-"secure. Use this feature only if the machine is adequately locked down.\n"
-"Don't use this feature if you don't need network access within a remote\n"
-"session.\n\n"
-"You can delete your stored password by specifying an empty password.\n\n");
- strcpy (newpwd, getpass ("Enter your current password: "));
- if (strcmp (newpwd, getpass ("Re-enter your current password: ")))
- eprint (0, "Password is not identical.");
- else if (cygwin_internal (CW_SET_PRIV_KEY, newpwd))
- return eprint (0, "Storing password failed: %s", strerror (errno));
- return 0;
- }
-
- if (!server)
- {
- len = GetEnvironmentVariableW (L"LOGONSERVER", NULL, 0);
- if (len > 0)
- {
- server = alloca (len * sizeof (WCHAR));
- if (GetEnvironmentVariableW (L"LOGONSERVER", server, len) <= 0)
- server = NULL;
- }
- }
-
- if (Larg >= 0 || xarg >= 0 || narg >= 0 || iarg >= 0)
- {
- if (optind < argc)
- usage (stderr, 1);
- return SetModals (xarg, narg, iarg, Larg, server);
- }
-
- strcpy (user, optind >= argc ? getlogin () : argv[optind]);
-
- li = GetPW (getlogin (), 0, server);
- if (! li)
- return 1;
-
- ui = GetPW (user, 1, server);
- if (! ui)
- return 1;
-
- if (lopt || uopt || copt || Copt || eopt || Eopt || popt || Popt || Sopt)
- {
- USER_INFO_1008 uif;
-
- if (li->usri3_priv != USER_PRIV_ADMIN)
- return eprint (0, "You have no maintenance privileges.");
- uif.usri1008_flags = ui->usri3_flags;
- if (lopt)
- {
- if (ui->usri3_priv == USER_PRIV_ADMIN)
- return eprint (0, "Locking an admin account is disallowed.");
- uif.usri1008_flags |= UF_ACCOUNTDISABLE;
- }
- if (uopt)
- uif.usri1008_flags &= ~UF_ACCOUNTDISABLE;
- if (copt)
- uif.usri1008_flags |= UF_PASSWD_CANT_CHANGE;
- if (Copt)
- uif.usri1008_flags &= ~UF_PASSWD_CANT_CHANGE;
- if (eopt)
- uif.usri1008_flags |= UF_DONT_EXPIRE_PASSWD;
- if (Eopt)
- uif.usri1008_flags &= ~UF_DONT_EXPIRE_PASSWD;
- if (popt)
- uif.usri1008_flags |= UF_PASSWD_NOTREQD;
- if (Popt)
- uif.usri1008_flags &= ~UF_PASSWD_NOTREQD;
-
- if (lopt || uopt || copt || Copt || eopt || Eopt || popt || Popt)
- {
- ret = NetUserSetInfo (server, ui->usri3_name, 1008, (LPBYTE) &uif,
- NULL);
- return EvalRet (ret, NULL);
- }
- // Sopt
- PrintPW (ui, server);
- return 0;
- }
-
- if (li->usri3_priv != USER_PRIV_ADMIN && strcmp (getlogin (), user))
- return eprint (0, "You may not change the password for %s.", user);
-
- eprint (0, "Enter the new password (minimum of 5, maximum of 8 characters).");
- eprint (0, "Please use a combination of upper and lower case letters and numbers.");
-
- oldpwd[0] = '\0';
- if (li->usri3_priv != USER_PRIV_ADMIN)
- {
- strcpy (oldpwd, getpass ("Old password: "));
- if (ChangePW (user, oldpwd, oldpwd, 1, server))
- return 1;
- }
-
- do
- {
- strcpy (newpwd, getpass ("New password: "));
- if (strcmp (newpwd, getpass ("Re-enter new password: ")))
- eprint (0, "Password is not identical.");
- else if (! ChangePW (user, *oldpwd ? oldpwd : NULL, newpwd, 0, server))
- ret = 1;
- if (! ret && cnt < 2)
- eprint (0, "Try again.");
- }
- while (! ret && ++cnt < 3);
- return ! ret;
-}
diff --git a/winsup/utils/path.cc b/winsup/utils/path.cc
deleted file mode 100644
index 787467f..0000000
--- a/winsup/utils/path.cc
+++ /dev/null
@@ -1,859 +0,0 @@
-/* path.cc
-
- Copyright 2001, 2002, 2003, 2005, 2006, 2007, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-/* The purpose of this file is to hide all the details about accessing
- Cygwin's mount table, shortcuts, etc. If the format or location of
- the mount table, or the shortcut format changes, this is the file to
- change to match it. */
-
-#define str(a) #a
-#define scat(a,b) str(a##b)
-#include <windows.h>
-#include <lmcons.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <wchar.h>
-#include "path.h"
-#include "cygwin/include/cygwin/version.h"
-#include "cygwin/include/sys/mount.h"
-#include "cygwin/include/mntent.h"
-#include "testsuite.h"
-
-/* Used when treating / and \ as equivalent. */
-#define isslash(ch) \
- ({ \
- char __c = (ch); \
- ((__c) == '/' || (__c) == '\\'); \
- })
-
-
-static const GUID GUID_shortcut =
- {0x00021401L, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, 0x46}};
-
-enum {
- WSH_FLAG_IDLIST = 0x01, /* Contains an ITEMIDLIST. */
- WSH_FLAG_FILE = 0x02, /* Contains a file locator element. */
- WSH_FLAG_DESC = 0x04, /* Contains a description. */
- WSH_FLAG_RELPATH = 0x08, /* Contains a relative path. */
- WSH_FLAG_WD = 0x10, /* Contains a working dir. */
- WSH_FLAG_CMDLINE = 0x20, /* Contains command line args. */
- WSH_FLAG_ICON = 0x40 /* Contains a custom icon. */
-};
-
-struct win_shortcut_hdr
- {
- DWORD size; /* Header size in bytes. Must contain 0x4c. */
- GUID magic; /* GUID of shortcut files. */
- DWORD flags; /* Content flags. See above. */
-
- /* The next fields from attr to icon_no are always set to 0 in Cygwin
- and U/Win shortcuts. */
- DWORD attr; /* Target file attributes. */
- FILETIME ctime; /* These filetime items are never touched by the */
- FILETIME mtime; /* system, apparently. Values don't matter. */
- FILETIME atime;
- DWORD filesize; /* Target filesize. */
- DWORD icon_no; /* Icon number. */
-
- DWORD run; /* Values defined in winuser.h. Use SW_NORMAL. */
- DWORD hotkey; /* Hotkey value. Set to 0. */
- DWORD dummy[2]; /* Future extension probably. Always 0. */
- };
-
-static bool
-cmp_shortcut_header (win_shortcut_hdr *file_header)
-{
- /* A Cygwin or U/Win shortcut only contains a description and a relpath.
- Cygwin shortcuts also might contain an ITEMIDLIST. The run type is
- always set to SW_NORMAL. */
- return file_header->size == sizeof (win_shortcut_hdr)
- && !memcmp (&file_header->magic, &GUID_shortcut, sizeof GUID_shortcut)
- && (file_header->flags & ~WSH_FLAG_IDLIST)
- == (WSH_FLAG_DESC | WSH_FLAG_RELPATH)
- && file_header->run == SW_NORMAL;
-}
-
-int
-get_word (HANDLE fh, int offset)
-{
- unsigned short rv;
- unsigned r;
-
- SetLastError(NO_ERROR);
- if (SetFilePointer (fh, offset, 0, FILE_BEGIN) == INVALID_SET_FILE_POINTER
- && GetLastError () != NO_ERROR)
- return -1;
-
- if (!ReadFile (fh, &rv, 2, (DWORD *) &r, 0))
- return -1;
-
- return rv;
-}
-
-/*
- * Check the value of GetLastError() to find out whether there was an error.
- */
-int
-get_dword (HANDLE fh, int offset)
-{
- int rv;
- unsigned r;
-
- SetLastError(NO_ERROR);
- if (SetFilePointer (fh, offset, 0, FILE_BEGIN) == INVALID_SET_FILE_POINTER
- && GetLastError () != NO_ERROR)
- return -1;
-
- if (!ReadFile (fh, &rv, 4, (DWORD *) &r, 0))
- return -1;
-
- return rv;
-}
-
-#define EXE_MAGIC ((int)*(unsigned short *)"MZ")
-#define SHORTCUT_MAGIC ((int)*(unsigned short *)"L\0")
-#define SYMLINK_COOKIE "!<symlink>"
-#define SYMLINK_MAGIC ((int)*(unsigned short *)SYMLINK_COOKIE)
-
-bool
-is_exe (HANDLE fh)
-{
- int magic = get_word (fh, 0x0);
- return magic == EXE_MAGIC;
-}
-
-bool
-is_symlink (HANDLE fh)
-{
- int magic = get_word (fh, 0x0);
- if (magic != SHORTCUT_MAGIC && magic != SYMLINK_MAGIC)
- return false;
- DWORD got;
- BY_HANDLE_FILE_INFORMATION local;
- if (!GetFileInformationByHandle (fh, &local))
- return false;
- if (magic == SHORTCUT_MAGIC)
- {
- DWORD size;
- if (!local.dwFileAttributes & FILE_ATTRIBUTE_READONLY)
- return false; /* Not a Cygwin symlink. */
- if ((size = GetFileSize (fh, NULL)) > 8192)
- return false; /* Not a Cygwin symlink. */
- char buf[size];
- SetFilePointer (fh, 0, 0, FILE_BEGIN);
- if (!ReadFile (fh, buf, size, &got, 0))
- return false;
- if (got != size || !cmp_shortcut_header ((win_shortcut_hdr *) buf))
- return false; /* Not a Cygwin symlink. */
- /* TODO: check for invalid path contents
- (see symlink_info::check() in ../cygwin/path.cc) */
- }
- else /* magic == SYMLINK_MAGIC */
- {
- if (!local.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM)
- return false; /* Not a Cygwin symlink. */
- char buf[sizeof (SYMLINK_COOKIE) - 1];
- SetFilePointer (fh, 0, 0, FILE_BEGIN);
- if (!ReadFile (fh, buf, sizeof (buf), &got, 0))
- return false;
- if (got != sizeof (buf) ||
- memcmp (buf, SYMLINK_COOKIE, sizeof (buf)) != 0)
- return false; /* Not a Cygwin symlink. */
- }
- return true;
-}
-
-/* Assumes is_symlink(fh) is true */
-bool
-readlink (HANDLE fh, char *path, int maxlen)
-{
- DWORD rv;
- char *buf, *cp;
- unsigned short len;
- win_shortcut_hdr *file_header;
- BY_HANDLE_FILE_INFORMATION fi;
-
- if (!GetFileInformationByHandle (fh, &fi)
- || fi.nFileSizeHigh != 0
- || fi.nFileSizeLow > 8192)
- return false;
-
- buf = (char *) alloca (fi.nFileSizeLow + 1);
- file_header = (win_shortcut_hdr *) buf;
-
- if (SetFilePointer (fh, 0L, NULL, FILE_BEGIN) == INVALID_SET_FILE_POINTER
- || !ReadFile (fh, buf, fi.nFileSizeLow, &rv, NULL)
- || rv != fi.nFileSizeLow)
- return false;
-
- if (fi.nFileSizeLow > sizeof (file_header)
- && cmp_shortcut_header (file_header))
- {
- cp = buf + sizeof (win_shortcut_hdr);
- if (file_header->flags & WSH_FLAG_IDLIST) /* Skip ITEMIDLIST */
- cp += *(unsigned short *) cp + 2;
- if (!(len = *(unsigned short *) cp))
- return false;
- cp += 2;
- /* Has appended full path? If so, use it instead of description. */
- unsigned short relpath_len = *(unsigned short *) (cp + len);
- if (cp + len + 2 + relpath_len < buf + fi.nFileSizeLow)
- {
- cp += len + 2 + relpath_len;
- len = *(unsigned short *) cp;
- cp += 2;
- }
- if (len + 1 > maxlen)
- return false;
- memcpy (path, cp, len);
- path[len] = '\0';
- return true;
- }
- else if (strncmp (buf, SYMLINK_COOKIE, strlen (SYMLINK_COOKIE)) == 0
- && fi.nFileSizeLow - strlen (SYMLINK_COOKIE) <= (unsigned) maxlen
- && buf[fi.nFileSizeLow - 1] == '\0')
- {
- strcpy (path, &buf[strlen (SYMLINK_COOKIE)]);
- return true;
- }
- else
- return false;
-}
-
-struct mnt_t
-{
- char *native;
- char *posix;
- unsigned flags;
-};
-
-#ifndef TESTSUITE
-static mnt_t mount_table[255];
-static int max_mount_entry;
-#else
-# define TESTSUITE_MOUNT_TABLE
-# include "testsuite.h"
-# undef TESTSUITE_MOUNT_TABLE
-#endif
-
-mnt_t *root_here = NULL;
-
-inline void
-unconvert_slashes (char* name)
-{
- while ((name = strchr (name, '/')) != NULL)
- *name++ = '\\';
-}
-
-/* These functions aren't called when defined(TESTSUITE) which results
- in a compiler warning. */
-#ifndef TESTSUITE
-inline char *
-skip_ws (char *in)
-{
- while (*in == ' ' || *in == '\t')
- ++in;
- return in;
-}
-
-inline char *
-find_ws (char *in)
-{
- while (*in && *in != ' ' && *in != '\t')
- ++in;
- return in;
-}
-
-inline char *
-conv_fstab_spaces (char *field)
-{
- register char *sp = field;
- while ((sp = strstr (sp, "\\040")) != NULL)
- {
- *sp++ = ' ';
- memmove (sp, sp + 3, strlen (sp + 3) + 1);
- }
- return field;
-}
-
-static struct opt
-{
- const char *name;
- unsigned val;
- bool clear;
-} oopts[] =
-{
- {"user", MOUNT_SYSTEM, 1},
- {"nouser", MOUNT_SYSTEM, 0},
- {"binary", MOUNT_BINARY, 0},
- {"text", MOUNT_BINARY, 1},
- {"exec", MOUNT_EXEC, 0},
- {"notexec", MOUNT_NOTEXEC, 0},
- {"cygexec", MOUNT_CYGWIN_EXEC, 0},
- {"nosuid", 0, 0},
- {"acl", MOUNT_NOACL, 1},
- {"noacl", MOUNT_NOACL, 0},
- {"posix=1", MOUNT_NOPOSIX, 1},
- {"posix=0", MOUNT_NOPOSIX, 0}
-};
-
-static bool
-read_flags (char *options, unsigned &flags)
-{
- while (*options)
- {
- char *p = strchr (options, ',');
- if (p)
- *p++ = '\0';
- else
- p = strchr (options, '\0');
-
- for (opt *o = oopts;
- o < (oopts + (sizeof (oopts) / sizeof (oopts[0])));
- o++)
- if (strcmp (options, o->name) == 0)
- {
- if (o->clear)
- flags &= ~o->val;
- else
- flags |= o->val;
- goto gotit;
- }
- return false;
-
- gotit:
- options = p;
- }
- return true;
-}
-
-static bool
-from_fstab_line (mnt_t *m, char *line, bool user)
-{
- char *native_path, *posix_path, *fs_type;
-
- /* First field: Native path. */
- char *c = skip_ws (line);
- if (!*c || *c == '#')
- return false;
- char *cend = find_ws (c);
- *cend = '\0';
- native_path = conv_fstab_spaces (c);
- /* Second field: POSIX path. */
- c = skip_ws (cend + 1);
- if (!*c)
- return false;
- cend = find_ws (c);
- *cend = '\0';
- posix_path = conv_fstab_spaces (c);
- /* Third field: FS type. */
- c = skip_ws (cend + 1);
- if (!*c)
- return false;
- cend = find_ws (c);
- *cend = '\0';
- fs_type = c;
- /* Forth field: Flags. */
- c = skip_ws (cend + 1);
- if (!*c)
- return false;
- cend = find_ws (c);
- *cend = '\0';
- unsigned mount_flags = MOUNT_SYSTEM;
- if (!read_flags (c, mount_flags))
- return false;
- if (user)
- mount_flags &= ~MOUNT_SYSTEM;
- if (!strcmp (fs_type, "cygdrive"))
- {
- for (mnt_t *sm = mount_table; sm < m; ++sm)
- if (sm->flags & MOUNT_CYGDRIVE)
- {
- if ((mount_flags & MOUNT_SYSTEM) || !(sm->flags & MOUNT_SYSTEM))
- {
- if (sm->posix)
- free (sm->posix);
- sm->posix = strdup (posix_path);
- sm->flags = mount_flags | MOUNT_CYGDRIVE;
- }
- return false;
- }
- m->posix = strdup (posix_path);
- m->native = strdup (".");
- m->flags = mount_flags | MOUNT_CYGDRIVE;
- }
- else
- {
- for (mnt_t *sm = mount_table; sm < m; ++sm)
- if (!strcasecmp (sm->posix, posix_path))
- {
- if ((mount_flags & MOUNT_SYSTEM) || !(sm->flags & MOUNT_SYSTEM))
- {
- if (sm->native)
- free (sm->native);
- sm->native = strdup (native_path);
- sm->flags = mount_flags;
- }
- return false;
- }
- m->posix = strdup (posix_path);
- unconvert_slashes (native_path);
- m->native = strdup (native_path);
- m->flags = mount_flags;
- }
- return true;
-}
-
-#define BUFSIZE 65536
-
-static char *
-get_user ()
-{
- static char user[UNLEN + 1];
- char *userenv;
-
- user[0] = '\0';
- if ((userenv = getenv ("USER")) || (userenv = getenv ("USERNAME")))
- strncat (user, userenv, UNLEN);
- return user;
-}
-
-void
-from_fstab (bool user, PWCHAR path, PWCHAR path_end)
-{
- mnt_t *m = mount_table + max_mount_entry;
- char buf[BUFSIZE];
-
- if (!user)
- {
- /* Create a default root dir from path. */
- WideCharToMultiByte (GetACP (), 0, path, -1, buf, BUFSIZE,
- NULL, NULL);
- unconvert_slashes (buf);
- char *native_path = buf;
- if (!strncmp (native_path, "\\\\?\\", 4))
- native_path += 4;
- if (!strncmp (native_path, "UNC\\", 4))
- *(native_path += 2) = '\\';
- m->posix = strdup ("/");
- m->native = strdup (native_path);
- m->flags = MOUNT_SYSTEM | MOUNT_BINARY;
- ++m;
- /* Create a default cygdrive entry. Note that this is a user entry.
- This allows to override it with mount, unless the sysadmin created
- a cygdrive entry in /etc/fstab. */
- m->posix = strdup (CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX);
- m->native = strdup (".");
- m->flags = MOUNT_BINARY | MOUNT_CYGDRIVE;
- ++m;
- max_mount_entry = m - mount_table;
- }
-
- PWCHAR u = wcscpy (path_end, L"\\etc\\fstab") + 10;
- if (user)
- MultiByteToWideChar (GetACP (), 0, get_user (), -1,
- wcscpy (u, L".d\\") + 3, BUFSIZE - (u - path));
- HANDLE h = CreateFileW (path, GENERIC_READ, FILE_SHARE_READ, NULL,
- OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
- if (h == INVALID_HANDLE_VALUE)
- return;
- char *got = buf;
- DWORD len = 0;
- /* Using BUFSIZE-1 leaves space to append two \0. */
- while (ReadFile (h, got, BUFSIZE - 1 - (got - buf),
- &len, NULL))
- {
- char *end;
-
- /* Set end marker. */
- got[len] = got[len + 1] = '\0';
- /* Set len to the absolute len of bytes in buf. */
- len += got - buf;
- /* Reset got to start reading at the start of the buffer again. */
- got = buf;
- while (got < buf + len && (end = strchr (got, '\n')))
- {
- end[end[-1] == '\r' ? -1 : 0] = '\0';
- if (from_fstab_line (m, got, user))
- ++m;
- got = end + 1;
- }
- if (len < BUFSIZE - 1)
- break;
- /* We have to read once more. Move remaining bytes to the start of
- the buffer and reposition got so that it points to the end of
- the remaining bytes. */
- len = buf + len - got;
- memmove (buf, got, len);
- got = buf + len;
- buf[len] = buf[len + 1] = '\0';
- }
- if (got > buf && from_fstab_line (m, got, user))
- ++m;
- max_mount_entry = m - mount_table;
- CloseHandle (h);
-}
-#endif
-
-static int
-mnt_sort (const void *a, const void *b)
-{
- const mnt_t *ma = (const mnt_t *) a;
- const mnt_t *mb = (const mnt_t *) b;
- int ret;
-
- ret = (ma->flags & MOUNT_CYGDRIVE) - (mb->flags & MOUNT_CYGDRIVE);
- if (ret)
- return ret;
- ret = (ma->flags & MOUNT_SYSTEM) - (mb->flags & MOUNT_SYSTEM);
- if (ret)
- return ret;
- return strcmp (ma->posix, mb->posix);
-}
-
-static void
-read_mounts ()
-{
-/* If TESTSUITE is defined, bypass this whole function as a harness
- mount table will be provided. */
-#ifndef TESTSUITE
- HKEY setup_key;
- LONG ret;
- DWORD len;
- WCHAR path[32768];
- PWCHAR path_end;
-
- for (mnt_t *m1 = mount_table; m1->posix; m1++)
- {
- free (m1->posix);
- if (m1->native)
- free ((char *) m1->native);
- m1->posix = NULL;
- }
- max_mount_entry = 0;
-
- for (int i = 0; i < 2; ++i)
- if ((ret = RegOpenKeyExW (i ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER,
- L"Software\\Cygwin\\setup", 0,
- KEY_READ, &setup_key)) == ERROR_SUCCESS)
- {
- len = 32768 * sizeof (WCHAR);
- ret = RegQueryValueExW (setup_key, L"rootdir", NULL, NULL,
- (PBYTE) path, &len);
- RegCloseKey (setup_key);
- if (ret == ERROR_SUCCESS)
- break;
- }
- if (ret == ERROR_SUCCESS)
- path_end = wcschr (path, L'\0');
- else
- {
- if (!GetModuleFileNameW (NULL, path, 32768))
- return;
- path_end = wcsrchr (path, L'\\');
- if (path_end)
- {
- *path_end = L'\0';
- path_end = wcsrchr (path, L'\\');
- }
- }
- if (!path_end)
- return;
- *path_end = L'\0';
-
- from_fstab (false, path, path_end);
- from_fstab (true, path, path_end);
- qsort (mount_table, max_mount_entry, sizeof (mnt_t), mnt_sort);
-#endif /* !defined(TESTSUITE) */
-}
-
-/* Return non-zero if PATH1 is a prefix of PATH2.
- Both are assumed to be of the same path style and / vs \ usage.
- Neither may be "".
- LEN1 = strlen (PATH1). It's passed because often it's already known.
-
- Examples:
- /foo/ is a prefix of /foo <-- may seem odd, but desired
- /foo is a prefix of /foo/
- / is a prefix of /foo/bar
- / is not a prefix of foo/bar
- foo/ is a prefix foo/bar
- /foo is not a prefix of /foobar
-*/
-
-static int
-path_prefix_p (const char *path1, const char *path2, int len1)
-{
- /* Handle case where PATH1 has trailing '/' and when it doesn't. */
- if (len1 > 0 && isslash (path1[len1 - 1]))
- len1--;
-
- if (len1 == 0)
- return isslash (path2[0]) && !isslash (path2[1]);
-
- if (strncasecmp (path1, path2, len1) != 0)
- return 0;
-
- return isslash (path2[len1]) || path2[len1] == 0 || path1[len1 - 1] == ':';
-}
-
-static char *
-vconcat (const char *s, va_list v)
-{
- int len;
- char *rv, *arg;
- va_list save_v = v;
- int unc;
-
- if (!s)
- return 0;
-
- len = strlen (s);
-
- unc = isslash (*s) && isslash (s[1]);
-
- while (1)
- {
- arg = va_arg (v, char *);
- if (arg == 0)
- break;
- len += strlen (arg);
- }
- va_end (v);
-
- rv = (char *) malloc (len + 1);
- strcpy (rv, s);
- v = save_v;
- while (1)
- {
- arg = va_arg (v, char *);
- if (arg == 0)
- break;
- strcat (rv, arg);
- }
- va_end (v);
-
- char *d, *p;
-
- /* concat is only used for urls and files, so we can safely
- canonicalize the results */
- for (p = d = rv; *p; p++)
- {
- *d++ = *p;
- /* special case for URLs */
- if (*p == ':' && p[1] == '/' && p[2] == '/' && p > rv + 1)
- {
- *d++ = *++p;
- *d++ = *++p;
- }
- else if (isslash (*p))
- {
- if (p == rv && unc)
- *d++ = *p++;
- while (p[1] == '/')
- p++;
- }
- }
- *d = 0;
-
- return rv;
-}
-
-static char *
-concat (const char *s, ...)
-{
- va_list v;
-
- va_start (v, s);
-
- return vconcat (s, v);
-}
-
-/* This is a helper function for when vcygpath is passed what appears
- to be a relative POSIX path. We take a Win32 CWD (either as specified
- in 'cwd' or as retrieved with GetCurrentDirectory() if 'cwd' is NULL)
- and find the mount table entry with the longest match. We replace the
- matching portion with the corresponding POSIX prefix, and to that append
- 's' and anything in 'v'. The returned result is a mostly-POSIX
- absolute path -- 'mostly' because the portions of CWD that didn't
- match the mount prefix will still have '\\' separators. */
-static char *
-rel_vconcat (const char *cwd, const char *s, va_list v)
-{
- char pathbuf[MAX_PATH];
- if (!cwd || *cwd == '\0')
- {
- if (!GetCurrentDirectory (MAX_PATH, pathbuf))
- return NULL;
- cwd = pathbuf;
- }
-
- int max_len = -1;
- mnt_t *m, *match = NULL;
-
- for (m = mount_table; m->posix; m++)
- {
- if (m->flags & MOUNT_CYGDRIVE)
- continue;
-
- int n = strlen (m->native);
- if (n < max_len || !path_prefix_p (m->native, cwd, n))
- continue;
- max_len = n;
- match = m;
- }
-
- char *temppath;
- if (!match)
- // No prefix matched - best effort to return meaningful value.
- temppath = concat (cwd, "/", s, NULL);
- else if (strcmp (match->posix, "/") != 0)
- // Matched on non-root. Copy matching prefix + remaining 'path'.
- temppath = concat (match->posix, cwd + max_len, "/", s, NULL);
- else if (cwd[max_len] == '\0')
- // Matched on root and there's no remaining 'path'.
- temppath = concat ("/", s, NULL);
- else if (isslash (cwd[max_len]))
- // Matched on root but remaining 'path' starts with a slash anyway.
- temppath = concat (cwd + max_len, "/", s, NULL);
- else
- temppath = concat ("/", cwd + max_len, "/", s, NULL);
-
- char *res = vconcat (temppath, v);
- free (temppath);
- return res;
-}
-
-/* Convert a POSIX path in 's' to an absolute Win32 path, and append
- anything in 'v' to the end, returning the result. If 's' is a
- relative path then 'cwd' is used as the working directory to make
- it absolute. Pass NULL in 'cwd' to use GetCurrentDirectory. */
-static char *
-vcygpath (const char *cwd, const char *s, va_list v)
-{
- int max_len = -1;
- mnt_t *m, *match = NULL;
-
- if (!max_mount_entry)
- read_mounts ();
- char *path;
- if (s[0] == '.' && isslash (s[1]))
- s += 2;
-
- if (s[0] == '/' || s[1] == ':') /* FIXME: too crude? */
- path = vconcat (s, v);
- else
- path = rel_vconcat (cwd, s, v);
-
- if (!path)
- return NULL;
-
- if (strncmp (path, "/./", 3) == 0)
- memmove (path + 1, path + 3, strlen (path + 3) + 1);
-
- for (m = mount_table; m->posix; m++)
- {
- if (m->flags & MOUNT_CYGDRIVE)
- continue;
-
- int n = strlen (m->posix);
- if (n < max_len || !path_prefix_p (m->posix, path, n))
- continue;
- max_len = n;
- match = m;
- }
-
- char *native;
- if (match == NULL)
- native = strdup (path);
- else if (max_len == (int) strlen (path))
- native = strdup (match->native);
- else if (isslash (path[max_len]))
- native = concat (match->native, path + max_len, NULL);
- else
- native = concat (match->native, "\\", path + max_len, NULL);
- free (path);
-
- unconvert_slashes (native);
- for (char *s = strstr (native + 1, "\\.\\"); s && *s; s = strstr (s, "\\.\\"))
- memmove (s + 1, s + 3, strlen (s + 3) + 1);
- return native;
-}
-
-char *
-cygpath_rel (const char *cwd, const char *s, ...)
-{
- va_list v;
-
- va_start (v, s);
-
- return vcygpath (cwd, s, v);
-}
-
-char *
-cygpath (const char *s, ...)
-{
- va_list v;
-
- va_start (v, s);
-
- return vcygpath (NULL, s, v);
-}
-
-static mnt_t *m = NULL;
-
-extern "C" FILE *
-setmntent (const char *, const char *)
-{
- m = mount_table;
- if (!max_mount_entry)
- read_mounts ();
- return NULL;
-}
-
-extern "C" struct mntent *
-getmntent (FILE *)
-{
- static mntent mnt;
- if (!m->posix)
- return NULL;
-
- mnt.mnt_fsname = (char *) m->native;
- mnt.mnt_dir = (char *) m->posix;
- if (!mnt.mnt_type)
- mnt.mnt_type = (char *) malloc (1024);
- if (!mnt.mnt_opts)
- mnt.mnt_opts = (char *) malloc (1024);
- if (m->flags & MOUNT_SYSTEM)
- strcpy (mnt.mnt_type, (char *) "system");
- else
- strcpy (mnt.mnt_type, (char *) "user");
- if (!(m->flags & MOUNT_BINARY))
- strcpy (mnt.mnt_opts, (char *) "textmode");
- else
- strcpy (mnt.mnt_opts, (char *) "binmode");
- if (m->flags & MOUNT_CYGWIN_EXEC)
- strcat (mnt.mnt_opts, (char *) ",cygexec");
- else if (m->flags & MOUNT_EXEC)
- strcat (mnt.mnt_opts, (char *) ",exec");
- else if (m->flags & MOUNT_NOTEXEC)
- strcat (mnt.mnt_opts, (char *) ",noexec");
- if ((m->flags & MOUNT_CYGDRIVE)) /* cygdrive */
- strcat (mnt.mnt_opts, (char *) ",cygdrive");
- if ((m->flags & MOUNT_NOACL))
- strcat (mnt.mnt_opts, (char *) ",noacl");
- if ((m->flags & MOUNT_NOPOSIX))
- strcat (mnt.mnt_opts, (char *) ",posix=0");
- mnt.mnt_freq = 1;
- mnt.mnt_passno = 1;
- m++;
- return &mnt;
-}
diff --git a/winsup/utils/path.h b/winsup/utils/path.h
deleted file mode 100644
index 48739df..0000000
--- a/winsup/utils/path.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* path.h
-
- Copyright 2001, 2002, 2003 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-char *cygpath (const char *s, ...);
-char *cygpath_rel (const char *cwd, const char *s, ...);
-bool is_exe (HANDLE);
-bool is_symlink (HANDLE);
-bool readlink (HANDLE, char *, int);
-int get_word (HANDLE, int);
-int get_dword (HANDLE, int);
-
-#define SYMLINK_MAX 4095 /* PATH_MAX - 1 */
diff --git a/winsup/utils/ps.cc b/winsup/utils/ps.cc
deleted file mode 100644
index 2ad2a39..0000000
--- a/winsup/utils/ps.cc
+++ /dev/null
@@ -1,432 +0,0 @@
-/* ps.cc
-
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <stdio.h>
-#include <windows.h>
-#include <time.h>
-#include <getopt.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <pwd.h>
-#include <limits.h>
-#include <sys/cygwin.h>
-#include <tlhelp32.h>
-#include <psapi.h>
-
-/* Maximum possible path length under NT. There's no official define
- for that value. Note that PATH_MAX is only 4K. */
-#define NT_MAX_PATH 32768
-
-static const char version[] = "$Revision$";
-static char *prog_name;
-
-static struct option longopts[] =
-{
- {"all", no_argument, NULL, 'a' },
- {"everyone", no_argument, NULL, 'e' },
- {"full", no_argument, NULL, 'f' },
- {"help", no_argument, NULL, 'h' },
- {"long", no_argument, NULL, 'l' },
- {"process", required_argument, NULL, 'p'},
- {"summary", no_argument, NULL, 's' },
- {"user", required_argument, NULL, 'u'},
- {"version", no_argument, NULL, 'v'},
- {"windows", no_argument, NULL, 'W'},
- {NULL, 0, NULL, 0}
-};
-
-static char opts[] = "aefhlp:su:vW";
-
-typedef BOOL (WINAPI *ENUMPROCESSMODULES)(
- HANDLE hProcess, // handle to the process
- HMODULE * lphModule, // array to receive the module handles
- DWORD cb, // size of the array
- LPDWORD lpcbNeeded // receives the number of bytes returned
-);
-
-typedef DWORD (WINAPI *GETMODULEFILENAME)(
- HANDLE hProcess,
- HMODULE hModule,
- LPTSTR lpstrFileName,
- DWORD nSize
-);
-
-typedef HANDLE (WINAPI *CREATESNAPSHOT)(
- DWORD dwFlags,
- DWORD th32ProcessID
-);
-
-// Win95 functions
-typedef BOOL (WINAPI *PROCESSWALK)(
- HANDLE hSnapshot,
- LPPROCESSENTRY32 lppe
-);
-
-ENUMPROCESSMODULES myEnumProcessModules;
-GETMODULEFILENAME myGetModuleFileNameEx;
-CREATESNAPSHOT myCreateToolhelp32Snapshot;
-PROCESSWALK myProcess32First;
-PROCESSWALK myProcess32Next;
-
-static BOOL WINAPI dummyprocessmodules (
- HANDLE hProcess, // handle to the process
- HMODULE * lphModule, // array to receive the module handles
- DWORD cb, // size of the array
- LPDWORD lpcbNeeded // receives the number of bytes returned
-)
-{
- lphModule[0] = (HMODULE) *lpcbNeeded;
- *lpcbNeeded = 1;
- return 1;
-}
-
-static DWORD WINAPI GetModuleFileNameEx95 (
- HANDLE hProcess,
- HMODULE hModule,
- LPTSTR lpstrFileName,
- DWORD n
-)
-{
- HANDLE h;
- DWORD pid = (DWORD) hModule;
-
- h = myCreateToolhelp32Snapshot (TH32CS_SNAPPROCESS, 0);
- if (!h)
- return 0;
-
- PROCESSENTRY32 proc;
- proc.dwSize = sizeof (proc);
- if (myProcess32First(h, &proc))
- do
- if (proc.th32ProcessID == pid)
- {
- CloseHandle (h);
- strcpy (lpstrFileName, proc.szExeFile);
- return 1;
- }
- while (myProcess32Next (h, &proc));
- CloseHandle (h);
- return 0;
-}
-
-int
-init_win ()
-{
- OSVERSIONINFO os_version_info;
-
- memset (&os_version_info, 0, sizeof os_version_info);
- os_version_info.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
- GetVersionEx (&os_version_info);
-
- HMODULE h;
- if (os_version_info.dwPlatformId == VER_PLATFORM_WIN32_NT)
- {
- h = LoadLibrary ("psapi.dll");
- if (!h)
- return 0;
- myEnumProcessModules = (ENUMPROCESSMODULES) GetProcAddress (h, "EnumProcessModules");
- myGetModuleFileNameEx = (GETMODULEFILENAME) GetProcAddress (h, "GetModuleFileNameExA");
- if (!myEnumProcessModules || !myGetModuleFileNameEx)
- return 0;
- return 1;
- }
-
- h = GetModuleHandle("KERNEL32.DLL");
- myCreateToolhelp32Snapshot = (CREATESNAPSHOT)GetProcAddress (h, "CreateToolhelp32Snapshot");
- myProcess32First = (PROCESSWALK)GetProcAddress (h, "Process32First");
- myProcess32Next = (PROCESSWALK)GetProcAddress (h, "Process32Next");
- if (!myCreateToolhelp32Snapshot || !myProcess32First || !myProcess32Next)
- return 0;
-
- myEnumProcessModules = dummyprocessmodules;
- myGetModuleFileNameEx = GetModuleFileNameEx95;
- return 1;
-}
-
-static char *
-start_time (external_pinfo *child)
-{
- time_t st = child->start_time;
- time_t t = time (NULL);
- static char stime[40] = {'\0'};
- char now[40];
-
- strncpy (stime, ctime (&st) + 4, 15);
- strcpy (now, ctime (&t) + 4);
-
- if ((t - st) < (24 * 3600))
- return (stime + 7);
-
- stime[6] = '\0';
-
- return stime;
-}
-
-#define FACTOR (0x19db1ded53ea710LL)
-#define NSPERSEC 10000000LL
-
-/* Convert a Win32 time to "UNIX" format. */
-long __stdcall
-to_time_t (FILETIME *ptr)
-{
- /* A file time is the number of 100ns since jan 1 1601
- stuffed into two long words.
- A time_t is the number of seconds since jan 1 1970. */
-
- long rem;
- long long x = ((long long) ptr->dwHighDateTime << 32) + ((unsigned)ptr->dwLowDateTime);
- x -= FACTOR; /* number of 100ns between 1601 and 1970 */
- rem = x % ((long long)NSPERSEC);
- rem += (NSPERSEC / 2);
- x /= (long long) NSPERSEC; /* number of 100ns in a second */
- x += (long long) (rem / NSPERSEC);
- return x;
-}
-
-static const char *
-ttynam (int ntty)
-{
- static char buf[5];
- if (ntty < 0)
- return " ?";
- if (ntty == TTY_CONSOLE)
- return " con";
- sprintf (buf, "%4d", ntty);
- return buf;
-}
-
-static void
-usage (FILE * stream, int status)
-{
- fprintf (stream, "\
-Usage: %s [-aefls] [-u UID] [-p PID]\n\
-Report process status\n\
-\n\
- -a, --all show processes of all users\n\
- -e, --everyone show processes of all users\n\
- -f, --full show process uids, ppids\n\
- -h, --help output usage information and exit\n\
- -l, --long show process uids, ppids, pgids, winpids\n\
- -p, --process show information for specified PID\n\
- -s, --summary show process summary\n\
- -u, --user list processes owned by UID\n\
- -v, --version output version information and exit\n\
- -W, --windows show windows as well as cygwin processes\n\
-With no options, %s outputs the long format by default\n",
- prog_name, prog_name);
- exit (status);
-}
-
-static void
-print_version ()
-{
- const char *v = strchr (version, ':');
- int len;
- if (!v)
- {
- v = "?";
- len = 1;
- }
- else
- {
- v += 2;
- len = strchr (v, ' ') - v;
- }
- printf ("\
-%s (cygwin) %.*s\n\
-Process Statistics\n\
-Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.\n\
-Compiled on %s\n\
-", prog_name, len, v, __DATE__);
-}
-
-int
-main (int argc, char *argv[])
-{
- external_pinfo *p;
- int aflag, lflag, fflag, sflag, uid, proc_id;
- cygwin_getinfo_types query = CW_GETPINFO;
- const char *dtitle = " PID TTY STIME COMMAND\n";
- const char *dfmt = "%7d%4s%10s %s\n";
- const char *ftitle = " UID PID PPID TTY STIME COMMAND\n";
- const char *ffmt = "%8.8s%8d%8d%4s%10s %s\n";
- const char *ltitle = " PID PPID PGID WINPID TTY UID STIME COMMAND\n";
- const char *lfmt = "%c %7d %7d %7d %10u %4s %4u %8s %s\n";
- char ch;
-
- aflag = lflag = fflag = sflag = 0;
- uid = getuid ();
- proc_id = -1;
- lflag = 1;
-
- prog_name = strrchr (argv[0], '/');
- if (prog_name == NULL)
- prog_name = strrchr (argv[0], '\\');
- if (prog_name == NULL)
- prog_name = argv[0];
- else
- prog_name++;
-
- while ((ch = getopt_long (argc, argv, opts, longopts, NULL)) != EOF)
- switch (ch)
- {
- case 'a':
- case 'e':
- aflag = 1;
- break;
- case 'f':
- fflag = 1;
- break;
- case 'h':
- usage (stdout, 0);
- case 'l':
- lflag = 1;
- break;
- case 'p':
- proc_id = atoi (optarg);
- aflag = 1;
- break;
- case 's':
- sflag = 1;
- break;
- case 'u':
- uid = atoi (optarg);
- if (uid == 0)
- {
- struct passwd *pw;
-
- if ((pw = getpwnam (optarg)))
- uid = pw->pw_uid;
- else
- {
- fprintf (stderr, "%s: user %s unknown\n", prog_name, optarg);
- exit (1);
- }
- }
- break;
- case 'v':
- print_version ();
- exit (0);
- break;
- case 'W':
- query = CW_GETPINFO_FULL;
- aflag = 1;
- break;
-
- default:
- usage (stderr, 1);
- }
-
- if (sflag)
- printf (dtitle);
- else if (fflag)
- printf (ftitle);
- else if (lflag)
- printf (ltitle);
-
- (void) cygwin_internal (CW_LOCK_PINFO, 1000);
-
- if (query == CW_GETPINFO_FULL && !init_win ())
- query = CW_GETPINFO;
-
- for (int pid = 0;
- (p = (external_pinfo *) cygwin_internal (query, pid | CW_NEXTPID));
- pid = p->pid)
- {
- if ((proc_id > 0) && (p->pid != proc_id))
- continue;
-
- if (aflag)
- /* nothing to do */;
- else if (p->version >= EXTERNAL_PINFO_VERSION_32_BIT)
- {
- if (p->uid32 != (__uid32_t) uid)
- continue;
- }
- else if (p->uid != uid)
- continue;
- char status = ' ';
- if (p->process_state & PID_STOPPED)
- status = 'S';
- else if (p->process_state & PID_TTYIN)
- status = 'I';
- else if (p->process_state & PID_TTYOU)
- status = 'O';
-
- /* Maximum possible path length under NT. There's no official define
- for that value. */
- char pname[NT_MAX_PATH];
- if (p->process_state & PID_EXITED || (p->exitcode & ~0xffff))
- strcpy (pname, "<defunct>");
- else if (p->ppid)
- {
- char *s;
- pname[0] = '\0';
- if (p->version >= EXTERNAL_PINFO_VERSION_32_LP)
- cygwin_conv_path (CCP_WIN_A_TO_POSIX | CCP_ABSOLUTE,
- p->progname_long, pname, NT_MAX_PATH);
- else
- cygwin_conv_path (CCP_WIN_A_TO_POSIX | CCP_ABSOLUTE,
- p->progname, pname, NT_MAX_PATH);
- s = strchr (pname, '\0') - 4;
- if (s > pname && strcasecmp (s, ".exe") == 0)
- *s = '\0';
- }
- else if (query == CW_GETPINFO_FULL)
- {
- HANDLE h = OpenProcess (PROCESS_QUERY_INFORMATION | PROCESS_VM_READ,
- FALSE, p->dwProcessId);
- if (!h)
- continue;
- HMODULE hm[1000];
- DWORD n = p->dwProcessId;
- if (!myEnumProcessModules (h, hm, sizeof (hm), &n))
- n = 0;
- if (!n || !myGetModuleFileNameEx (h, hm[0], pname, PATH_MAX))
- strcpy (pname, "*** unknown ***");
- FILETIME ct, et, kt, ut;
- if (GetProcessTimes (h, &ct, &et, &kt, &ut))
- p->start_time = to_time_t (&ct);
- CloseHandle (h);
- }
-
- char uname[128];
-
- if (fflag)
- {
- struct passwd *pw;
-
- if ((pw = getpwuid (p->version >= EXTERNAL_PINFO_VERSION_32_BIT ?
- p->uid32 : p->uid)))
- strcpy (uname, pw->pw_name);
- else
- sprintf (uname, "%u", (unsigned)
- (p->version >= EXTERNAL_PINFO_VERSION_32_BIT ?
- p->uid32 : p->uid));
- }
-
- if (sflag)
- printf (dfmt, p->pid, ttynam (p->ctty), start_time (p), pname);
- else if (fflag)
- printf (ffmt, uname, p->pid, p->ppid, ttynam (p->ctty), start_time (p),
- pname);
- else if (lflag)
- printf (lfmt, status, p->pid, p->ppid, p->pgid,
- p->dwProcessId, ttynam (p->ctty),
- p->version >= EXTERNAL_PINFO_VERSION_32_BIT ? p->uid32 : p->uid,
- start_time (p), pname);
-
- }
- (void) cygwin_internal (CW_UNLOCK_PINFO);
-
- return 0;
-}
-
diff --git a/winsup/utils/regtool.cc b/winsup/utils/regtool.cc
deleted file mode 100644
index 7a853be..0000000
--- a/winsup/utils/regtool.cc
+++ /dev/null
@@ -1,980 +0,0 @@
-/* regtool.cc
-
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006 Red Hat Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <ctype.h>
-#include <getopt.h>
-#define WINVER 0x0502
-#include <windows.h>
-#include <sys/cygwin.h>
-
-#define DEFAULT_KEY_SEPARATOR '\\'
-
-#define REG_AUTO -1
-
-int value_type = REG_AUTO;
-
-char key_sep = DEFAULT_KEY_SEPARATOR;
-
-#define LIST_KEYS 0x01
-#define LIST_VALS 0x02
-#define LIST_ALL (LIST_KEYS | LIST_VALS)
-
-static const char version[] = "$Revision$";
-static char *prog_name;
-
-static struct option longopts[] =
-{
- {"binary", no_argument, NULL, 'b' },
- {"dword", no_argument, NULL, 'd' },
- {"dword-le", no_argument, NULL, 'D' },
- {"expand-string", no_argument, NULL, 'e' },
- {"help", no_argument, NULL, 'h' },
- {"integer", no_argument, NULL, 'i' },
- {"keys", no_argument, NULL, 'k'},
- {"list", no_argument, NULL, 'l'},
- {"multi-string", no_argument, NULL, 'm'},
- {"none", no_argument, NULL, 'n' },
- {"postfix", no_argument, NULL, 'p'},
- {"quiet", no_argument, NULL, 'q'},
- {"qword", no_argument, NULL, 'Q' },
- {"string", no_argument, NULL, 's'},
- {"verbose", no_argument, NULL, 'v'},
- {"version", no_argument, NULL, 'V'},
- {"wow64", no_argument, NULL, 'w'},
- {"wow32", no_argument, NULL, 'W'},
- {"hex", no_argument, NULL, 'x'},
- {"key-separator", required_argument, NULL, 'K'},
- {NULL, 0, NULL, 0}
-};
-
-static char opts[] = "bdDehiklmnpqQsvVwWxK:";
-
-const char *types[] =
-{
- "REG_NONE",
- "REG_SZ",
- "REG_EXPAND_SZ",
- "REG_BINARY",
- "REG_DWORD",
- "REG_DWORD_BIG_ENDIAN",
- "REG_LINK",
- "REG_MULTI_SZ",
- "REG_RESOURCE_LIST",
- "REG_FULL_RESOURCE_DESCRIPTOR",
- "REG_RESOURCE_REQUIREMENTS_LIST",
- "REG_QWORD",
-};
-
-int listwhat = 0;
-int postfix = 0;
-int verbose = 0;
-int quiet = 0;
-int hex = 0;
-DWORD wow64 = 0;
-char **argv;
-
-HKEY key;
-char *value;
-
-static void
-usage (FILE *where = stderr)
-{
- fprintf (where, ""
- "Usage: %s [OPTION] ACTION KEY [data...]\n"
- "View or edit the Win32 registry\n"
- "\n", prog_name);
- if (where == stdout)
- {
- fprintf (where, ""
- "Actions:\n"
- " add KEY\\SUBKEY add new SUBKEY\n"
- " check KEY exit 0 if KEY exists, 1 if not\n"
- " get KEY\\VALUE prints VALUE to stdout\n"
- " list KEY list SUBKEYs and VALUEs\n"
- " remove KEY remove KEY\n"
- " set KEY\\VALUE [data ...] set VALUE\n"
- " unset KEY\\VALUE removes VALUE from KEY\n"
- " load KEY\\SUBKEY PATH load hive from PATH into new SUBKEY\n"
- " unload KEY\\SUBKEY unload hive and remove SUBKEY\n"
- " save KEY\\SUBKEY PATH save SUBKEY into new hive PATH\n"
- "\n");
- fprintf (where, ""
- "Options for 'list' Action:\n"
- " -k, --keys print only KEYs\n"
- " -l, --list print only VALUEs\n"
- " -p, --postfix like ls -p, appends '\\' postfix to KEY names\n"
- "\n"
- "Options for 'get' Action:\n"
- " -b, --binary print data as printable hex bytes\n"
- " -n, --none print data as stream of bytes as stored in registry\n"
- " -x, --hex print numerical data as hex numbers\n"
- "\n"
- "Options for 'set' Action:\n"
- " -b, --binary set type to REG_BINARY (hex args or '-')\n"
- " -d, --dword set type to REG_DWORD\n"
- " -D, --dword-le set type to REG_DWORD_LITTLE_ENDIAN\n"
- " -e, --expand-string set type to REG_EXPAND_SZ\n"
- " -i, --integer set type to REG_DWORD\n"
- " -m, --multi-string set type to REG_MULTI_SZ\n"
- " -n, --none set type to REG_NONE\n"
- " -Q, --qword set type to REG_QWORD\n"
- " -s, --string set type to REG_SZ\n"
- "\n"
- "Options for 'set' and 'unset' Actions:\n"
- " -K<c>, --key-separator[=]<c> set key-value separator to <c> instead of '\\'\n"
- "\n"
- "Other Options:\n"
- " -h, --help output usage information and exit\n"
- " -q, --quiet no error output, just nonzero return if KEY/VALUE missing\n"
- " -v, --verbose verbose output, including VALUE contents when applicable\n"
- " -w, --wow64 access 64 bit registry view (ignored on 32 bit Windows)\n"
- " -W, --wow32 access 32 bit registry view (ignored on 32 bit Windows)\n"
- " -V, --version output version information and exit\n"
- "\n");
- fprintf (where, ""
- "KEY is in the format [host]\\prefix\\KEY\\KEY\\VALUE, where host is optional\n"
- "remote host in either \\\\hostname or hostname: format and prefix is any of:\n"
- " root HKCR HKEY_CLASSES_ROOT (local only)\n"
- " config HKCC HKEY_CURRENT_CONFIG (local only)\n"
- " user HKCU HKEY_CURRENT_USER (local only)\n"
- " machine HKLM HKEY_LOCAL_MACHINE\n"
- " users HKU HKEY_USERS\n"
- "\n"
- "If the keyname starts with a forward slash ('/'), the forward slash is used\n"
- "as separator and the backslash can be used as escape character.\n");
- fprintf (where, ""
- "Example:\n"
- "%s list '/machine/SOFTWARE/Classes/MIME/Database/Content Type/audio\\/wav'\n", prog_name);
- }
- if (where == stderr)
- fprintf (where,
- "ACTION is one of add, check, get, list, remove, set, unset, load, unload, save\n"
- "\n"
- "Try '%s --help' for more information.\n", prog_name);
- exit (where == stderr ? 1 : 0);
-}
-
-static void
-print_version ()
-{
- const char *v = strchr (version, ':');
- int len;
- if (!v)
- {
- v = "?";
- len = 1;
- }
- else
- {
- v += 2;
- len = strchr (v, ' ') - v;
- }
- printf ("\
-%s (cygwin) %.*s\n\
-Registry Tool\n\
-Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006 Red Hat, Inc.\n\
-Compiled on %s\n\
-", prog_name, len, v, __DATE__);
-}
-
-void
-Fail (DWORD rv)
-{
- char *buf;
- if (!quiet)
- {
- FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER
- | FORMAT_MESSAGE_FROM_SYSTEM,
- 0, rv, 0, (CHAR *) & buf, 0, 0);
- fprintf (stderr, "Error (%ld): %s\n", rv, buf);
- LocalFree (buf);
- }
- exit (1);
-}
-
-static struct
-{
- const char *string;
- HKEY key;
-} wkprefixes[] =
-{
- {"root", HKEY_CLASSES_ROOT},
- {"HKCR", HKEY_CLASSES_ROOT},
- {"HKEY_CLASSES_ROOT", HKEY_CLASSES_ROOT},
- {"config", HKEY_CURRENT_CONFIG},
- {"HKCC", HKEY_CURRENT_CONFIG},
- {"HKEY_CURRENT_CONFIG", HKEY_CURRENT_CONFIG},
- {"user", HKEY_CURRENT_USER},
- {"HKCU", HKEY_CURRENT_USER},
- {"HKEY_CURRENT_USER", HKEY_CURRENT_USER},
- {"machine", HKEY_LOCAL_MACHINE},
- {"HKLM", HKEY_LOCAL_MACHINE},
- {"HKEY_LOCAL_MACHINE", HKEY_LOCAL_MACHINE},
- {"users", HKEY_USERS},
- {"HKU", HKEY_USERS},
- {"HKEY_USERS", HKEY_USERS},
- {0, 0}
-};
-
-void
-translate (char *key)
-{
-#define isodigit(c) (strchr("01234567", c))
-#define tooct(c) ((c)-'0')
-#define tohex(c) (strchr(_hs,tolower(c))-_hs)
- static char _hs[] = "0123456789abcdef";
-
- char *d = key;
- char *s = key;
- char c;
-
- while (*s)
- {
- if (*s == '\\')
- switch (*++s)
- {
- case 'a':
- *d++ = '\007';
- break;
- case 'b':
- *d++ = '\b';
- break;
- case 'e':
- *d++ = '\033';
- break;
- case 'f':
- *d++ = '\f';
- break;
- case 'n':
- *d++ = '\n';
- break;
- case 'r':
- *d++ = '\r';
- break;
- case 't':
- *d++ = '\t';
- break;
- case 'v':
- *d++ = '\v';
- break;
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- c = tooct (*s);
- if (isodigit (s[1]))
- {
- c = (c << 3) | tooct (*++s);
- if (isodigit (s[1]))
- c = (c << 3) | tooct (*++s);
- }
- *d++ = c;
- break;
- case 'x':
- if (!isxdigit (s[1]))
- c = '0';
- else
- {
- c = tohex (*++s);
- if (isxdigit (s[1]))
- c = (c << 4) | tohex (*++s);
- }
- *d++ = c;
- break;
- default: /* before non-special char: just add the char */
- *d++ = *s;
- break;
- }
- else if (*s == '/')
- *d++ = '\\';
- else
- *d++ = *s;
- ++s;
- }
- *d = '\0';
-}
-
-void
-find_key (int howmanyparts, REGSAM access, int option = 0)
-{
- HKEY base;
- int rv;
- char *n = argv[0], *e, *h, c;
- char* host = NULL;
- int i;
- if (*n == '/')
- translate (n);
- if (*n != '\\')
- {
- /* expect host:/key/value format */
- host = (char*) malloc (strlen (n) + 1);
- host[0] = host [1] = '\\';
- for (e = n, h = host + 2; *e && *e != ':'; e++, h++)
- *h = *e;
- *h = 0;
- n = e + 1;
- if (*n == '/')
- translate (n);
- }
- else if (n[0] == '\\' && n[1] == '\\')
- {
- /* expect //host/key/value format */
- host = (char*) malloc (strlen (n) + 1);
- host[0] = host[1] = '\\';
- for (e = n + 2, h = host + 2; *e && *e != '\\'; e++, h++)
- *h = *e;
- *h = 0;
- n = e;
- }
- while (*n != '\\')
- n++;
- *n++ = 0;
- for (e = n; *e && *e != '\\'; e++);
- c = *e;
- *e = 0;
- for (i = 0; wkprefixes[i].string; i++)
- if (strcmp (wkprefixes[i].string, n) == 0)
- break;
- if (!wkprefixes[i].string)
- {
- fprintf (stderr, "Unknown key prefix. Valid prefixes are:\n");
- for (i = 0; wkprefixes[i].string; i++)
- fprintf (stderr, "\t%s\n", wkprefixes[i].string);
- exit (1);
- }
-
- n = e;
- *e = c;
- while (*n && *n == '\\')
- n++;
- e = n + strlen (n);
- if (howmanyparts > 1)
- {
- while (n < e && *e != key_sep)
- e--;
- if (*e != key_sep)
- {
- key = wkprefixes[i].key;
- value = n;
- return;
- }
- else
- {
- *e = 0;
- value = e + 1;
- }
- }
- if (host)
- {
- rv = RegConnectRegistry (host, wkprefixes[i].key, &base);
- if (rv != ERROR_SUCCESS)
- Fail (rv);
- free (host);
- }
- else
- base = wkprefixes[i].key;
-
- if (n[0] == 0)
- key = base;
- else
- {
- if (access)
- {
- rv = RegOpenKeyEx (base, n, 0, access | wow64, &key);
- if (option && (rv == ERROR_SUCCESS || rv == ERROR_ACCESS_DENIED))
- {
- /* reopen with desired option due to missing option support in RegOpenKeyE */
- /* FIXME: may create the key in rare cases (e.g. access denied in parent) */
- HKEY key2;
- if (RegCreateKeyEx (base, n, 0, NULL, option, access | wow64, NULL, &key2, NULL)
- == ERROR_SUCCESS)
- {
- if (rv == ERROR_SUCCESS)
- RegCloseKey (key);
- key = key2;
- rv = ERROR_SUCCESS;
- }
- }
- if (rv != ERROR_SUCCESS)
- Fail (rv);
- }
- else if (argv[1])
- {
- ssize_t len = cygwin_conv_path (CCP_POSIX_TO_WIN_A | CCP_RELATIVE,
- argv[1], NULL, 0);
- char win32_path[len];
- cygwin_conv_path (CCP_POSIX_TO_WIN_A | CCP_RELATIVE, argv[1],
- win32_path, len);
- rv = RegLoadKey (base, n, win32_path);
- if (rv != ERROR_SUCCESS)
- Fail (rv);
- if (verbose)
- printf ("key %s loaded from file %s\n", n, win32_path);
- }
- else
- {
- rv = RegUnLoadKey (base, n);
- if (rv != ERROR_SUCCESS)
- Fail (rv);
- if (verbose)
- printf ("key %s unloaded\n", n);
- }
- }
- //printf("key `%s' value `%s'\n", n, value);
-}
-
-
-int
-cmd_list ()
-{
- DWORD num_subkeys, maxsubkeylen, num_values, maxvalnamelen, maxvaluelen;
- DWORD maxclasslen;
- char *subkey_name, *value_name, *class_name;
- unsigned char *value_data, *vd;
- DWORD i, j, m, n, t;
- int v;
-
- find_key (1, KEY_READ);
- RegQueryInfoKey (key, 0, 0, 0, &num_subkeys, &maxsubkeylen, &maxclasslen,
- &num_values, &maxvalnamelen, &maxvaluelen, 0, 0);
-
- subkey_name = (char *) malloc (maxsubkeylen + 1);
- class_name = (char *) malloc (maxclasslen + 1);
- value_name = (char *) malloc (maxvalnamelen + 1);
- value_data = (unsigned char *) malloc (maxvaluelen + 1);
-
- if (!listwhat)
- listwhat = LIST_ALL;
-
- if (listwhat & LIST_KEYS)
- for (i = 0; i < num_subkeys; i++)
- {
- m = maxsubkeylen + 1;
- n = maxclasslen + 1;
- RegEnumKeyEx (key, i, subkey_name, &m, 0, class_name, &n, 0);
- fputs (subkey_name, stdout);
- if (postfix || verbose)
- fputc (key_sep, stdout);
-
- if (verbose)
- printf (" (%s)", class_name);
-
- puts ("");
- }
-
- if (listwhat & LIST_VALS)
- for (i = 0; i < num_values; i++)
- {
- m = maxvalnamelen + 1;
- n = maxvaluelen + 1;
- RegEnumValue (key, i, value_name, &m, 0, &t, (BYTE *) value_data, &n);
- value_data[n] = 0;
- if (!verbose)
- printf ("%s\n", value_name);
- else
- {
- printf ("%s (%s) = ", value_name, types[t]);
- switch (t)
- {
- case REG_NONE:
- case REG_LINK:
- case REG_BINARY:
- for (j = 0; j < 8 && j < n; j++)
- printf ("%02x ", value_data[j]);
- printf ("\n");
- break;
- case REG_DWORD:
- printf ("0x%08lx (%lu)\n", *(DWORD *) value_data,
- *(DWORD *) value_data);
- break;
- case REG_DWORD_BIG_ENDIAN:
- v = ((value_data[0] << 24)
- | (value_data[1] << 16)
- | (value_data[2] << 8)
- | (value_data[3]));
- printf ("0x%08x (%d)\n", v, v);
- break;
- case REG_QWORD:
- printf ("0x%016llx (%llu)\n",
- *(unsigned long long *) value_data,
- *(unsigned long long *) value_data);
- break;
- case REG_EXPAND_SZ:
- case REG_SZ:
- printf ("\"%s\"\n", value_data);
- break;
- case REG_MULTI_SZ:
- vd = value_data;
- while (vd && *vd)
- {
- printf ("\"%s\"", vd);
- vd = vd + strlen ((const char *) vd) + 1;
- if (*vd)
- printf (", ");
- }
- printf ("\n");
- break;
- default:
- printf ("?\n");
- break;
- }
- }
- }
- return 0;
-}
-
-int
-cmd_add ()
-{
- find_key (2, KEY_ALL_ACCESS);
- HKEY newkey;
- DWORD newtype;
- int rv = RegCreateKeyEx (key, value, 0, (char *) "", REG_OPTION_NON_VOLATILE,
- KEY_ALL_ACCESS | wow64, 0, &newkey, &newtype);
- if (rv != ERROR_SUCCESS)
- Fail (rv);
-
- if (verbose)
- {
- if (newtype == REG_OPENED_EXISTING_KEY)
- printf ("Key %s already exists\n", value);
- else
- printf ("Key %s created\n", value);
- }
- return 0;
-}
-
-extern "C" {
-WINADVAPI LONG WINAPI (*regDeleteKeyEx)(HKEY, LPCSTR, REGSAM, DWORD);
-}
-
-int
-cmd_remove ()
-{
- DWORD rv;
-
- find_key (2, KEY_ALL_ACCESS);
- if (wow64)
- {
- HMODULE mod = LoadLibrary ("advapi32.dll");
- if (mod)
- regDeleteKeyEx = (WINADVAPI LONG WINAPI (*)(HKEY, LPCSTR, REGSAM, DWORD)) GetProcAddress (mod, "RegDeleteKeyExA");
- }
- if (regDeleteKeyEx)
- rv = (*regDeleteKeyEx) (key, value, wow64, 0);
- else
- rv = RegDeleteKey (key, value);
- if (rv != ERROR_SUCCESS)
- Fail (rv);
- if (verbose)
- printf ("subkey %s deleted\n", value);
- return 0;
-}
-
-int
-cmd_check ()
-{
- find_key (1, KEY_READ);
- if (verbose)
- printf ("key %s exists\n", argv[0]);
- return 0;
-}
-
-int
-cmd_set ()
-{
- int i, n;
- DWORD v, rv;
- unsigned long long llval;
- char *a = argv[1], *data = 0;
- find_key (2, KEY_ALL_ACCESS);
-
- if (!a)
- usage ();
- if (value_type == REG_AUTO)
- {
- char *e;
- llval = strtoull (a, &e, 0);
- if (a[0] == '%')
- value_type = REG_EXPAND_SZ;
- else if (a[0] && !*e)
- value_type = llval > 0xffffffffULL ? REG_QWORD : REG_DWORD;
- else if (argv[2])
- value_type = REG_MULTI_SZ;
- else
- value_type = REG_SZ;
- }
-
- switch (value_type)
- {
- case REG_NONE:
- case REG_BINARY:
- for (n = 0; argv[n+1]; n++)
- ;
- if (n == 1 && strcmp (argv[1], "-") == 0)
- { /* read from stdin */
- i = n = 0;
- for (;;)
- {
- if (i <= n)
- {
- i = n + BUFSIZ;
- data = (char *) realloc (data, i);
- }
- int r = fread (data+n, 1, i-n, stdin);
- if (r <= 0)
- break;
- n += r;
- }
- }
- else if (n > 0)
- { /* parse hex from argv */
- data = (char *) malloc (n);
- for (i = 0; i < n; i++)
- {
- char *e;
- errno = 0;
- v = strtoul (argv[i+1], &e, 16);
- if (errno || v > 0xff || *e)
- {
- fprintf (stderr, "Invalid hex constant `%s'\n", argv[i+1]);
- exit (1);
- }
- data[i] = (char) v;
- }
- }
- rv = RegSetValueEx (key, value, 0, value_type, (const BYTE *) data, n);
- break;
- case REG_DWORD:
- v = strtoul (a, 0, 0);
- rv = RegSetValueEx (key, value, 0, REG_DWORD, (const BYTE *) &v,
- sizeof (v));
- break;
- case REG_DWORD_BIG_ENDIAN:
- v = strtoul (a, 0, 0);
- v = (((v & 0xff) << 24)
- | ((v & 0xff00) << 8)
- | ((v & 0xff0000) >> 8)
- | ((v & 0xff000000) >> 24));
- rv = RegSetValueEx (key, value, 0, REG_DWORD_BIG_ENDIAN,
- (const BYTE *) &v, sizeof (v));
- break;
- case REG_QWORD:
- llval = strtoul (a, 0, 0);
- rv = RegSetValueEx (key, value, 0, REG_QWORD, (const BYTE *) &llval,
- sizeof (llval));
- break;
- case REG_SZ:
- rv = RegSetValueEx (key, value, 0, REG_SZ, (const BYTE *) a, strlen (a) + 1);
- break;
- case REG_EXPAND_SZ:
- rv = RegSetValueEx (key, value, 0, REG_EXPAND_SZ, (const BYTE *) a,
- strlen (a) + 1);
- break;
- case REG_MULTI_SZ:
- for (i = 1, n = 1; argv[i]; i++)
- n += strlen (argv[i]) + 1;
- data = (char *) malloc (n);
- for (i = 1, n = 0; argv[i]; i++)
- {
- strcpy (data + n, argv[i]);
- n += strlen (argv[i]) + 1;
- }
- data[n] = 0;
- rv = RegSetValueEx (key, value, 0, REG_MULTI_SZ, (const BYTE *) data,
- n + 1);
- break;
- case REG_AUTO:
- rv = ERROR_SUCCESS;
- break;
- default:
- rv = ERROR_INVALID_CATEGORY;
- break;
- }
-
- if (data)
- free(data);
-
- if (rv != ERROR_SUCCESS)
- Fail (rv);
-
- return 0;
-}
-
-int
-cmd_unset ()
-{
- find_key (2, KEY_ALL_ACCESS);
- DWORD rv = RegDeleteValue (key, value);
- if (rv != ERROR_SUCCESS)
- Fail (rv);
- if (verbose)
- printf ("value %s deleted\n", value);
- return 0;
-}
-
-int
-cmd_get ()
-{
- find_key (2, KEY_READ);
- DWORD vtype, dsize, rv;
- char *data, *vd;
- rv = RegQueryValueEx (key, value, 0, &vtype, 0, &dsize);
- if (rv != ERROR_SUCCESS)
- Fail (rv);
- data = (char *) malloc (dsize + 1);
- rv = RegQueryValueEx (key, value, 0, &vtype, (BYTE *) data, &dsize);
- if (rv != ERROR_SUCCESS)
- Fail (rv);
- if (value_type == REG_BINARY)
- {
- for (unsigned i = 0; i < dsize; i++)
- printf ("%02x%c", (unsigned char)data[i],
- (i < dsize-1 ? ' ' : '\n'));
- }
- else if (value_type == REG_NONE)
- fwrite (data, dsize, 1, stdout);
- else
- switch (vtype)
- {
- case REG_NONE:
- case REG_BINARY:
- case REG_LINK:
- fwrite (data, dsize, 1, stdout);
- break;
- case REG_DWORD:
- printf (hex ? "0x%08lx\n" : "%lu\n", *(DWORD *) data);
- break;
- case REG_DWORD_BIG_ENDIAN:
- rv = ((data[0] << 24)
- | (data[1] << 16)
- | (data[2] << 8)
- | (data[3]));
- printf (hex ? "0x%08lx\n" : "%lu\n", rv);
- break;
- case REG_QWORD:
- printf (hex ? "0x%016llx\n" : "%llu\n", *(unsigned long long *) data);
- break;
- case REG_SZ:
- printf ("%s\n", data);
- break;
- case REG_EXPAND_SZ:
- if (value_type == REG_EXPAND_SZ) // hack
- {
- char *buf;
- DWORD bufsize;
- bufsize = ExpandEnvironmentStrings (data, 0, 0);
- buf = (char *) malloc (bufsize + 1);
- ExpandEnvironmentStrings (data, buf, bufsize + 1);
- free (data);
- data = buf;
- }
- printf ("%s\n", data);
- break;
- case REG_MULTI_SZ:
- vd = data;
- while (vd && *vd)
- {
- printf ("%s\n", vd);
- vd = vd + strlen ((const char *) vd) + 1;
- }
- break;
- }
- return 0;
-}
-
-int
-cmd_load ()
-{
- if (!argv[1])
- {
- usage ();
- return 1;
- }
- find_key (1, 0);
- return 0;
-}
-
-int
-cmd_unload ()
-{
- if (argv[1])
- {
- usage ();
- return 1;
- }
- find_key (1, 0);
- return 0;
-}
-
-DWORD
-set_privilege (const char * name)
-{
- TOKEN_PRIVILEGES tp;
- if (!LookupPrivilegeValue (NULL, name, &tp.Privileges[0].Luid))
- return GetLastError ();
- tp.PrivilegeCount = 1;
- tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
- HANDLE t;
- /* OpenProcessToken does not work here, because main thread has its own
- impersonation token */
- if (!OpenThreadToken (GetCurrentThread (), TOKEN_ADJUST_PRIVILEGES, FALSE, &t))
- return GetLastError ();
- AdjustTokenPrivileges (t, FALSE, &tp, 0, NULL, NULL);
- DWORD rv = GetLastError ();
- CloseHandle (t);
- return rv;
-}
-
-int
-cmd_save ()
-{
- if (!argv[1])
- {
- usage ();
- return 1;
- }
- /* try to set SeBackupPrivilege, let RegSaveKey report the error */
- set_privilege (SE_BACKUP_NAME);
- /* REG_OPTION_BACKUP_RESTORE is necessary to save /HKLM/SECURITY */
- find_key (1, KEY_QUERY_VALUE, REG_OPTION_BACKUP_RESTORE);
- ssize_t len = cygwin_conv_path (CCP_POSIX_TO_WIN_A | CCP_RELATIVE,
- argv[1], NULL, 0);
- char win32_path[len];
- cygwin_conv_path (CCP_POSIX_TO_WIN_A | CCP_RELATIVE, argv[1],
- win32_path, len);
- DWORD rv = RegSaveKey (key, win32_path, NULL);
- if (rv != ERROR_SUCCESS)
- Fail (rv);
- if (verbose)
- printf ("key saved to %s\n", win32_path);
- return 0;
-}
-
-static struct
-{
- const char *name;
- int (*func) ();
-} commands[] =
-{
- {"list", cmd_list},
- {"add", cmd_add},
- {"remove", cmd_remove},
- {"check", cmd_check},
- {"set", cmd_set},
- {"unset", cmd_unset},
- {"get", cmd_get},
- {"load", cmd_load},
- {"unload", cmd_unload},
- {"save", cmd_save},
- {0, 0}
-};
-
-int
-main (int argc, char **_argv)
-{
- int g;
-
- prog_name = strrchr (_argv[0], '/');
- if (prog_name == NULL)
- prog_name = strrchr (_argv[0], '\\');
- if (prog_name == NULL)
- prog_name = _argv[0];
- else
- prog_name++;
-
- while ((g = getopt_long (argc, _argv, opts, longopts, NULL)) != EOF)
- switch (g)
- {
- case 'b':
- value_type = REG_BINARY;
- break;
- case 'd':
- value_type = REG_DWORD;
- break;
- case 'D':
- value_type = REG_DWORD_BIG_ENDIAN;
- break;
- case 'e':
- value_type = REG_EXPAND_SZ;
- break;
- case 'k':
- listwhat |= LIST_KEYS;
- break;
- case 'h':
- usage (stdout);
- case 'i':
- value_type = REG_DWORD;
- break;
- case 'l':
- listwhat |= LIST_VALS;
- break;
- case 'm':
- value_type = REG_MULTI_SZ;
- break;
- case 'n':
- value_type = REG_NONE;
- break;
- case 'p':
- postfix++;
- break;
- case 'q':
- quiet++;
- break;
- case 'Q':
- value_type = REG_QWORD;
- break;
- case 's':
- value_type = REG_SZ;
- break;
- case 'v':
- verbose++;
- break;
- case 'V':
- print_version ();
- exit (0);
- case 'w':
- wow64 = KEY_WOW64_64KEY;
- break;
- case 'W':
- wow64 = KEY_WOW64_32KEY;
- break;
- case 'x':
- hex++;
- break;
- case 'K':
- key_sep = *optarg;
- break;
- default :
- usage ();
- }
-
- if ((_argv[optind] == NULL) || (_argv[optind+1] == NULL))
- usage ();
-
- argv = _argv + optind;
- int i;
- for (i = 0; commands[i].name; i++)
- if (strcmp (commands[i].name, argv[0]) == 0)
- {
- argv++;
- return commands[i].func ();
- }
- usage ();
-
- return 0;
-}
diff --git a/winsup/utils/setfacl.c b/winsup/utils/setfacl.c
deleted file mode 100644
index 8dcce4a..0000000
--- a/winsup/utils/setfacl.c
+++ /dev/null
@@ -1,573 +0,0 @@
-/* setfacl.c
-
- Copyright 2000, 2001, 2002, 2003 Red Hat Inc.
-
- Written by Corinna Vinschen <vinschen@redhat.com>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <getopt.h>
-#include <pwd.h>
-#include <grp.h>
-#include <sys/types.h>
-#include <sys/acl.h>
-
-#ifndef BOOL
-#define BOOL int
-#endif
-
-#ifndef TRUE
-#define TRUE (1)
-#endif
-
-#ifndef FALSE
-#define FALSE (0)
-#endif
-
-#ifndef ILLEGAL_MODE
-#define ILLEGAL_MODE ((mode_t)0xffffffff)
-#endif
-
-static const char version[] = "$Revision$";
-static char *prog_name;
-
-typedef enum {
- NoAction,
- Set,
- Modify,
- Delete,
- ModNDel,
- SetFromFile
-} action_t;
-
-mode_t getperm (char *in)
-{
- if (isdigit (*in) && !in[1])
- {
- int i = atoi (in);
- if (i < 0 || i > 7)
- return ILLEGAL_MODE;
- return i << 6 | i << 3 | i;
- }
- if (strlen (in) > 3 && strchr (" \t\n\r#", in[3]))
- in[3] = '\0';
- if (strlen (in) != 3)
- return ILLEGAL_MODE;
- if (!strchr ("r-", in[0])
- || !strchr ("w-", in[1])
- || !strchr ("x-", in[2]))
- return ILLEGAL_MODE;
- return (in[0] == 'r' ? S_IROTH : 0)
- | (in[1] == 'w' ? S_IWOTH : 0)
- | (in[2] == 'x' ? S_IXOTH : 0);
-}
-
-BOOL
-getaclentry (action_t action, char *c, aclent_t *ace)
-{
- char *c2;
-
- ace->a_type = 0;
- ace->a_id = -1;
- ace->a_perm = 0;
-
- if (!strncmp (c, "default:", 8)
- || !strncmp (c, "d:", 2))
- {
- ace->a_type = ACL_DEFAULT;
- c = strchr (c, ':') + 1;
- }
- if (!strncmp (c, "user:", 5)
- || !strncmp (c, "u:", 2))
- {
- ace->a_type |= USER_OBJ;
- c = strchr (c, ':') + 1;
- }
- else if (!strncmp (c, "group:", 6)
- || !strncmp (c, "g:", 2))
- {
- ace->a_type |= GROUP_OBJ;
- c = strchr (c, ':') + 1;
- }
- else if (!strncmp (c, "mask:", 5)
- || !strncmp (c, "m:", 2))
- {
- ace->a_type |= CLASS_OBJ;
- c = strchr (c, ':') + 1;
- }
- else if (!strncmp (c, "other:", 6)
- || !strncmp (c, "o:", 2))
- {
- ace->a_type |= OTHER_OBJ;
- c = strchr (c, ':') + 1;
- }
- else
- return FALSE;
- if (ace->a_type & (USER_OBJ | GROUP_OBJ))
- {
- if ((c2 = strchr (c, ':')))
- {
- if (action == Delete)
- return FALSE;
- *c2 = '\0';
- }
- else if (action != Delete)
- return FALSE;
- if (c2 == c)
- {
- if (action == Delete)
- return FALSE;
- }
- else if (isdigit (*c))
- {
- char *c3;
-
- ace->a_id = strtol (c, &c3, 10);
- if (*c3)
- return FALSE;
- }
- else if (ace->a_type & USER_OBJ)
- {
- struct passwd *pw = getpwnam (c);
- if (!pw)
- return FALSE;
- ace->a_id = pw->pw_uid;
- }
- else
- {
- struct group *gr = getgrnam (c);
- if (!gr)
- return FALSE;
- ace->a_id = gr->gr_gid;
- }
- if (c2 != c)
- {
- if (ace->a_type & USER_OBJ)
- {
- ace->a_type &= ~USER_OBJ;
- ace->a_type |= USER;
- }
- else
- {
- ace->a_type &= ~GROUP_OBJ;
- ace->a_type |= GROUP;
- }
- }
- if (c2)
- c = c2 + 1;
- }
- /* FIXME: currently allow both :: and : */
- else if (*c == ':')
- c++;
- if (action == Delete)
- {
- if ((ace->a_type & (CLASS_OBJ | OTHER_OBJ))
- && *c)
- return FALSE;
- ace->a_perm = ILLEGAL_MODE;
- return TRUE;
- }
- if ((ace->a_perm = getperm (c)) == ILLEGAL_MODE)
- return FALSE;
- return TRUE;
-}
-
-BOOL
-getaclentries (action_t action, char *buf, aclent_t *acls, int *idx)
-{
- char *c;
-
- if (action == SetFromFile)
- {
- FILE *fp;
- char fbuf[256], *fb;
-
- if (!strcmp (buf, "-"))
- fp = stdin;
- else if (! (fp = fopen (buf, "r")))
- return FALSE;
- while ((fb = fgets (fbuf, 256, fp)))
- {
- while (strchr (" \t", *fb))
- ++fb;
- if (strchr ("\n\r#", *fb))
- continue;
- if (!getaclentry (action, fb, acls + (*idx)++))
- {
- fclose (fp);
- return FALSE;
- }
- }
- if (fp != stdin)
- fclose (fp);
- }
- else
- for (c = strtok (buf, ","); c; c = strtok (NULL, ","))
- if (!getaclentry (action, c, acls + (*idx)++))
- return FALSE;
- return TRUE;
-}
-
-int
-searchace (aclent_t *aclp, int nentries, int type, int id)
-{
- int i;
-
- for (i = 0; i < nentries; ++i)
- if ((aclp[i].a_type == type && (id < 0 || aclp[i].a_id == id))
- || !aclp[i].a_type)
- return i;
- return -1;
-}
-
-int
-modacl (aclent_t *tgt, int tcnt, aclent_t *src, int scnt)
-{
- int t, s, i;
-
- for (s = 0; s < scnt; ++s)
- {
- t = searchace (tgt, MAX_ACL_ENTRIES, src[s].a_type,
- (src[s].a_type & (USER | GROUP)) ? src[s].a_id : -1);
- if (t < 0)
- return -1;
- if (src[s].a_perm == ILLEGAL_MODE)
- {
- if (t < tcnt)
- {
- for (i = t + 1; i < tcnt; ++i)
- tgt[i - 1] = tgt[i];
- --tcnt;
- }
- }
- else
- {
- tgt[t] = src[s];
- if (t >= tcnt)
- ++tcnt;
- }
- }
- return tcnt;
-}
-
-int
-setfacl (action_t action, char *path, aclent_t *acls, int cnt)
-{
- aclent_t lacl[MAX_ACL_ENTRIES];
- int lcnt;
-
- memset (lacl, 0, sizeof lacl);
- if (action == Set)
- {
- if (acl (path, SETACL, cnt, acls))
- {
- perror (prog_name);
- return 2;
- }
- }
- else if ((lcnt = acl (path, GETACL, MAX_ACL_ENTRIES, lacl)) < 0
- || (lcnt = modacl (lacl, lcnt, acls, cnt)) < 0
- || (lcnt = acl (path, SETACL, lcnt, lacl)) < 0)
- {
- perror (prog_name);
- return 2;
- }
- return 0;
-}
-
-static void
-usage (FILE * stream)
-{
- fprintf (stream, ""
- "Usage: %s [-r] (-f ACL_FILE | -s acl_entries) FILE...\n"
- " %s [-r] ([-d acl_entries] [-m acl_entries]) FILE...\n"
- "Modify file and directory access control lists (ACLs)\n"
- "\n"
- " -d, --delete delete one or more specified ACL entries\n"
- " -f, --file set ACL entries for FILE to ACL entries read\n"
- " from a ACL_FILE\n"
- " -m, --modify modify one or more specified ACL entries\n"
- " -r, --replace replace mask entry with maximum permissions\n"
- " needed for the file group class\n"
- " -s, --substitute substitute specified ACL entries for the\n"
- " ACL of FILE\n"
- " -h, --help output usage information and exit\n"
- " -v, --version output version information and exit\n"
- "\n"
- "At least one of (-d, -f, -m, -s) must be specified\n"
- "\n"
- "", prog_name, prog_name);
- if (stream == stdout)
- {
- printf(""
- " Acl_entries are one or more comma-separated ACL entries \n"
- " from the following list:\n"
- "\n"
- " u[ser]::perm\n"
- " u[ser]:uid:perm\n"
- " g[roup]::perm\n"
- " g[roup]:gid:perm\n"
- " m[ask]:perm\n"
- " o[ther]:perm\n"
- "\n"
- " Default entries are like the above with the additional\n"
- " default identifier. For example: \n"
- "\n"
- " d[efault]:u[ser]:uid:perm\n"
- "\n"
- " 'perm' is either a 3-char permissions string in the form\n"
- " \"rwx\" with the character - for no permission\n"
- " or it is the octal representation of the permissions, a\n"
- " value from 0 (equivalent to \"---\") to 7 (\"rwx\").\n"
- " 'uid' is a user name or a numerical uid.\n"
- " 'gid' is a group name or a numerical gid.\n"
- "\n"
- "\n"
- "For each file given as parameter, %s will either replace its\n"
- "complete ACL (-s, -f), or it will add, modify, or delete ACL\n"
- "entries.\n"
- "\n"
- "The following options are supported:\n"
- "\n"
- "-d Delete one or more specified entries from the file's ACL.\n"
- " The owner, group and others entries must not be deleted.\n"
- " Acl_entries to be deleted should be specified without\n"
- " permissions, as in the following list:\n"
- "\n"
- " u[ser]:uid\n"
- " g[roup]:gid\n"
- " d[efault]:u[ser]:uid\n"
- " d[efault]:g[roup]:gid\n"
- " d[efault]:m[ask]:\n"
- " d[efault]:o[ther]:\n"
- "\n"
- "-f Take the Acl_entries from ACL_FILE one per line. Whitespace\n"
- " characters are ignored, and the character \"#\" may be used\n"
- " to start a comment. The special filename \"-\" indicates\n"
- " reading from stdin.\n"
- " Required entries are\n"
- " - One user entry for the owner of the file.\n"
- " - One group entry for the group of the file.\n"
- " - One other entry.\n"
- " If additional user and group entries are given:\n"
- " - A mask entry for the file group class of the file.\n"
- " - No duplicate user or group entries with the same uid/gid.\n"
- " If it is a directory:\n"
- " - One default user entry for the owner of the file.\n"
- " - One default group entry for the group of the file.\n"
- " - One default mask entry for the file group class.\n"
- " - One default other entry.\n"
- "\n"
- "-m Add or modify one or more specified ACL entries.\n"
- " Acl_entries is a comma-separated list of entries from the \n"
- " same list as above.\n"
- "\n"
- "-r Causes the permissions specified in the mask entry to be\n"
- " ignored and replaced by the maximum permissions needed for\n"
- " the file group class.\n"
- "\n"
- "-s Like -f, but substitute the file's ACL with Acl_entries\n"
- " specified in a comma-separated list on the command line.\n"
- "\n"
- "While the -d and -m options may be used in the same command, the\n"
- "-f and -s options may be used only exclusively.\n"
- "\n"
- "Directories may contain default ACL entries. Files created\n"
- "in a directory that contains default ACL entries will have\n"
- "permissions according to the combination of the current umask,\n"
- "the explicit permissions requested and the default ACL entries\n"
- "Note: Under Cygwin, the default ACL entries are not taken into\n"
- "account currently.\n", prog_name);
- }
- else
- fprintf(stream, "Try '%s --help' for more information.\n", prog_name);
-}
-
-struct option longopts[] = {
- {"delete", required_argument, NULL, 'd'},
- {"file", required_argument, NULL, 'f'},
- {"modify", required_argument, NULL, 'm'},
- {"replace", no_argument, NULL, 'r'},
- {"substitute", required_argument, NULL, 's'},
- {"help", no_argument, NULL, 'h'},
- {"version", no_argument, NULL, 'v'},
- {0, no_argument, NULL, 0}
-};
-
-static void
-print_version ()
-{
- const char *v = strchr (version, ':');
- int len;
- if (!v)
- {
- v = "?";
- len = 1;
- }
- else
- {
- v += 2;
- len = strchr (v, ' ') - v;
- }
- printf ("\
-setfacl (cygwin) %.*s\n\
-ACL Modification Utility\n\
-Copyright 2000, 2001, 2002 Red Hat, Inc.\n\
-Compiled on %s\n\
-", len, v, __DATE__);
-}
-
-int
-main (int argc, char **argv)
-{
- int c;
- action_t action = NoAction;
- int ropt = 0;
- aclent_t acls[MAX_ACL_ENTRIES];
- int aclidx = 0;
- int ret = 0;
-
- prog_name = strrchr (argv[0], '/');
- if (prog_name == NULL)
- prog_name = strrchr (argv[0], '\\');
- if (prog_name == NULL)
- prog_name = argv[0];
- else
- prog_name++;
-
- memset (acls, 0, sizeof acls);
- while ((c = getopt_long (argc, argv, "d:f:hm:rs:v", longopts, NULL)) != EOF)
- switch (c)
- {
- case 'd':
- if (action == NoAction)
- action = Delete;
- else if (action == Modify)
- action = ModNDel;
- else
- {
- usage (stderr);
- return 1;
- }
- if (! getaclentries (Delete, optarg, acls, &aclidx))
- {
- fprintf (stderr, "%s: illegal acl entries\n", prog_name);
- return 2;
- }
- break;
- case 'f':
- if (action == NoAction)
- action = Set;
- else
- {
- usage (stderr);
- return 1;
- }
- if (! getaclentries (SetFromFile, optarg, acls, &aclidx))
- {
- fprintf (stderr, "%s: illegal acl entries\n", prog_name);
- return 2;
- }
- break;
- case 'h':
- usage (stdout);
- return 0;
- case 'm':
- if (action == NoAction)
- action = Modify;
- else if (action == Delete)
- action = ModNDel;
- else
- {
- usage (stderr);
- return 1;
- }
- if (! getaclentries (Modify, optarg, acls, &aclidx))
- {
- fprintf (stderr, "%s: illegal acl entries\n", prog_name);
- return 2;
- }
- break;
- case 'r':
- if (!ropt)
- ropt = 1;
- else
- {
- usage (stderr);
- return 1;
- }
- break;
- case 's':
- if (action == NoAction)
- action = Set;
- else
- {
- usage (stderr);
- return 1;
- }
- if (! getaclentries (Set, optarg, acls, &aclidx))
- {
- fprintf (stderr, "%s: illegal acl entries\n", prog_name);
- return 2;
- }
- break;
- case 'v':
- print_version ();
- return 0;
- default:
- usage (stderr);
- return 1;
- }
- if (action == NoAction)
- {
- usage (stderr);
- return 1;
- }
- if (optind > argc - 1)
- {
- usage (stderr);
- return 1;
- }
- if (action == Set)
- switch (aclcheck (acls, aclidx, NULL))
- {
- case GRP_ERROR:
- fprintf (stderr, "%s: more than one group entry.\n", prog_name);
- return 2;
- case USER_ERROR:
- fprintf (stderr, "%s: more than one user entry.\n", prog_name);
- return 2;
- case CLASS_ERROR:
- fprintf (stderr, "%s: more than one mask entry.\n", prog_name);
- return 2;
- case OTHER_ERROR:
- fprintf (stderr, "%s: more than one other entry.\n", prog_name);
- return 2;
- case DUPLICATE_ERROR:
- fprintf (stderr, "%s: duplicate additional user or group.\n", prog_name);
- return 2;
- case ENTRY_ERROR:
- fprintf (stderr, "%s: invalid entry type.\n", prog_name);
- return 2;
- case MISS_ERROR:
- fprintf (stderr, "%s: missing entries.\n", prog_name);
- return 2;
- case MEM_ERROR:
- fprintf (stderr, "%s: out of memory.\n", prog_name);
- return 2;
- default:
- break;
- }
- for (c = optind; c < argc; ++c)
- ret |= setfacl (action, argv[c], acls, aclidx);
- return ret;
-}
diff --git a/winsup/utils/setmetamode.c b/winsup/utils/setmetamode.c
deleted file mode 100644
index 65bd02b..0000000
--- a/winsup/utils/setmetamode.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/* setmetamode.c
-
- Copyright 2006 Red Hat Inc.
-
- Written by Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <stdio.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <cygwin/kd.h>
-
-static const char version[] = "$Revision$";
-static char *prog_name;
-
-static void
-usage (void)
-{
- fprintf (stderr, "Usage: %s [metabit|escprefix]\n"
- " Without argument, it shows the current meta key mode.\n"
- " metabit|meta|bit The meta key sets the top bit of the character.\n"
- " escprefix|esc|prefix The meta key sends an escape prefix.\n",
- prog_name);
-}
-
-static void
-error (void)
-{
- fprintf (stderr,
- "%s: The standard input isn't a console device.\n",
- prog_name);
-}
-
-int
-main (int ac, char *av[])
-{
- int param;
-
- prog_name = strrchr (av[0], '/');
- if (!prog_name)
- prog_name = strrchr (av[0], '\\');
- if (!prog_name)
- prog_name = av[0];
- else
- prog_name++;
-
- if (ac < 2)
- {
- if (ioctl (0, KDGKBMETA, &param) < 0)
- {
- error ();
- return 1;
- }
- if (param == 0x03)
- puts ("metabit");
- else
- puts ("escprefix");
- return 0;
- }
- if (!strcmp ("meta", av[1]) || !strcmp ("bit", av[1])
- || !strcmp ("metabit", av[1]))
- param = 0x03;
- else if (!strcmp ("esc", av[1]) || !strcmp ("prefix", av[1])
- || !strcmp ("escprefix", av[1]))
- param = 0x04;
- else
- {
- usage ();
- return 1;
- }
- if (ioctl (0, KDSKBMETA, param) < 0)
- {
- error ();
- return 1;
- }
- return 0;
-}
diff --git a/winsup/utils/ssp.c b/winsup/utils/ssp.c
deleted file mode 100644
index c7370d9..0000000
--- a/winsup/utils/ssp.c
+++ /dev/null
@@ -1,953 +0,0 @@
-/*
- * Copyright (c) 2000, 2001, 2002 Red Hat, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * A copy of the GNU General Public License can be found at
- * http://www.gnu.org/
- *
- * Written by DJ Delorie <dj@redhat.com>
- *
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <time.h>
-#include <ctype.h>
-#include <windows.h>
-#include <getopt.h>
-
-static const char version[] = "$Revision$";
-static char *prog_name;
-
-static struct option longopts[] =
-{
- {"console-trace", no_argument, NULL, 'c' },
- {"disable", no_argument, NULL, 'd' },
- {"enable", no_argument, NULL, 'e' },
- {"help", no_argument, NULL, 'h' },
- {"dll", no_argument, NULL, 'l' },
- {"sub-threads", no_argument, NULL, 's' },
- {"trace-eip", no_argument, NULL, 't' },
- {"verbose", no_argument, NULL, 'v' },
- {"version", no_argument, NULL, 'V' },
- {NULL, 0, NULL, 0}
-};
-
-static char opts[] = "+cdehlstvV";
-
-#define KERNEL_ADDR 0x77000000
-
-#define TRACE_SSP 0
-
-#define VERBOSE 1
-#define TIMES 1000
-
-/* from winsup/gmon.h */
-struct gmonhdr {
- unsigned long lpc; /* base pc address of sample buffer */
- unsigned long hpc; /* max pc address of sampled buffer */
- int ncnt; /* size of sample buffer (plus this header) */
- int version; /* version number */
- int profrate; /* profiling clock rate */
- int spare[3]; /* reserved */
-};
-#define GMONVERSION 0x00051879
-#define HISTCOUNTER unsigned short
-
-typedef struct {
- unsigned int base_address;
- int pcount;
- int scount;
- char *name;
-} DllInfo;
-
-typedef struct {
- unsigned int address;
- unsigned char real_byte;
-} PendingBreakpoints;
-
-unsigned low_pc=0, high_pc=0;
-unsigned last_pc=0, pc, last_sp=0, sp;
-int total_cycles, count;
-HANDLE hProcess;
-PROCESS_INFORMATION procinfo;
-STARTUPINFO startup;
-CONTEXT context;
-HISTCOUNTER *hits=0;
-struct gmonhdr hdr;
-int running = 1, profiling = 1;
-char dll_name[1024], *dll_ptr, *cp;
-int eip;
-unsigned opcode_count = 0;
-
-int stepping_enabled = 1;
-int tracing_enabled = 0;
-int trace_console = 0;
-int trace_all_threads = 0;
-int dll_counts = 0;
-int verbose = 0;
-
-#define MAXTHREADS 100
-DWORD active_thread_ids[MAXTHREADS];
-HANDLE active_threads[MAXTHREADS];
-DWORD thread_step_flags[MAXTHREADS];
-DWORD thread_return_address[MAXTHREADS];
-int num_active_threads = 0;
-int suspended_count=0;
-
-#define MAXDLLS 100
-DllInfo dll_info[MAXDLLS];
-int num_dlls=0;
-
-#define MAXPENDS 100
-PendingBreakpoints pending_breakpoints[MAXPENDS];
-int num_breakpoints=0;
-
-static void
-add_breakpoint (unsigned int address)
-{
- int i;
- DWORD rv;
- static char int3[] = { 0xcc };
- for (i=0; i<num_breakpoints; i++)
- {
- if (pending_breakpoints[i].address == address)
- return;
- if (pending_breakpoints[i].address == 0)
- break;
- }
- if (i == MAXPENDS)
- return;
- pending_breakpoints[i].address = address;
- ReadProcessMemory (hProcess,
- (void *)address,
- &(pending_breakpoints[i].real_byte),
- 1, &rv);
-
- WriteProcessMemory (hProcess,
- (void *)address,
- (LPVOID)int3, 1, &rv);
- if (i >= num_breakpoints)
- num_breakpoints = i+1;
-}
-
-static int
-remove_breakpoint (unsigned int address)
-{
- int i;
- DWORD rv;
- for (i=0; i<num_breakpoints; i++)
- {
- if (pending_breakpoints[i].address == address)
- {
- pending_breakpoints[i].address = 0;
- WriteProcessMemory (hProcess,
- (void *)address,
- &(pending_breakpoints[i].real_byte),
- 1, &rv);
- return 1;
- }
- }
- return 0;
-}
-
-static HANDLE
-lookup_thread_id (DWORD threadId, int *tix)
-{
- int i;
- *tix = 0;
- for (i=0; i<num_active_threads; i++)
- if (active_thread_ids[i] == threadId)
- {
- if (tix)
- *tix = i;
- return active_threads[i];
- }
- return 0;
-}
-
-static void
-set_step_threads (int threadId, int trace)
-{
- int rv, tix;
- HANDLE thread = lookup_thread_id (threadId, &tix);
-
- rv = GetThreadContext (thread, &context);
- if (rv != -1)
- {
- thread_step_flags[tix] = trace;
- if (trace)
- context.EFlags |= 0x100; /* TRAP (single step) flag */
- else
- context.EFlags &= ~0x100; /* TRAP (single step) flag */
- SetThreadContext (thread, &context);
- }
-}
-
-static void
-set_steps ()
-{
- int i, s;
- for (i=0; i<num_active_threads; i++)
- {
- GetThreadContext (active_threads[i], &context);
- s = context.EFlags & 0x0100;
- if (!s && thread_step_flags[i])
- {
- set_step_threads (active_thread_ids[i], 1);
- }
- }
-}
-
-static int
-dll_sort (const void *va, const void *vb)
-{
- DllInfo *a = (DllInfo *)va;
- DllInfo *b = (DllInfo *)vb;
- if (a->base_address < b->base_address)
- return -1;
- return 1;
-}
-
-static char *
-addr2dllname (unsigned int addr)
-{
- int i;
- for (i=num_dlls-1; i>=0; i--)
- {
- if (dll_info[i].base_address < addr)
- {
- return dll_info[i].name;
- }
- }
- return (char *)"";
-}
-
-static void
-dump_registers (HANDLE thread)
-{
- context.ContextFlags = CONTEXT_FULL;
- GetThreadContext (thread, &context);
- printf ("eax %08lx ebx %08lx ecx %08lx edx %08lx eip\n",
- context.Eax, context.Ebx, context.Ecx, context.Edx);
- printf ("esi %08lx edi %08lx ebp %08lx esp %08lx %08lx\n",
- context.Esi, context.Esi, context.Ebp, context.Esp, context.Eip);
-}
-
-typedef struct Edge {
- struct Edge *next;
- unsigned int from_pc;
- unsigned int to_pc;
- unsigned int count;
-} Edge;
-
-Edge *edges[4096];
-
-void
-store_call_edge (unsigned int from_pc, unsigned int to_pc)
-{
- Edge *e;
- unsigned int h = ((from_pc + to_pc)>>4) & 4095;
- for (e=edges[h]; e; e=e->next)
- if (e->from_pc == from_pc && e->to_pc == to_pc)
- break;
- if (!e)
- {
- e = (Edge *)malloc (sizeof (Edge));
- e->next = edges[h];
- edges[h] = e;
- e->from_pc = from_pc;
- e->to_pc = to_pc;
- e->count = 0;
- }
- e->count++;
-}
-
-void
-write_call_edges (FILE *f)
-{
- int h;
- Edge *e;
- for (h=0; h<4096; h++)
- for (e=edges[h]; e; e=e->next)
- fwrite (&(e->from_pc), 1, 3*sizeof (unsigned int), f);
-}
-
-char *
-wide_strdup (char *cp)
-{
- unsigned short *s = (unsigned short *)cp;
- int len;
- char *rv;
- for (len=0; s[len]; len++);
- rv = (char *)malloc (len+1);
- for (len=0; s[len]; len++)
- rv[len] = s[len];
- rv[len] = 0;
- return rv;
-}
-
-void
-run_program (char *cmdline)
-{
- FILE *tracefile = 0;
- int tix, i;
- HANDLE hThread;
- char *string;
-
- memset (&startup, 0, sizeof (startup));
- startup.cb = sizeof (startup);
-
- if (!CreateProcess (0, cmdline, 0, 0, 0,
- CREATE_NEW_PROCESS_GROUP
- | CREATE_SUSPENDED
- | DEBUG_PROCESS
- | DEBUG_ONLY_THIS_PROCESS,
- 0, 0, &startup, &procinfo))
- {
- fprintf (stderr, "Can't create process: error %ld\n", GetLastError ());
- exit (1);
- }
-
- hProcess = procinfo.hProcess;
-#if 0
- printf ("procinfo: %08x %08x %08x %08x\n",
- hProcess, procinfo.hThread, procinfo.dwProcessId, procinfo.dwThreadId);
-#endif
-
- active_threads[0] = procinfo.hThread;
- active_thread_ids[0] = procinfo.dwThreadId;
- thread_step_flags[0] = stepping_enabled;
- num_active_threads = 1;
-
- dll_info[0].base_address = 0;
- dll_info[0].pcount = 0;
- dll_info[0].scount = 0;
- dll_info[0].name = cmdline;
- num_dlls = 1;
-
- SetThreadPriority (procinfo.hThread, THREAD_PRIORITY_IDLE);
-
- context.ContextFlags = CONTEXT_FULL;
-
- ResumeThread (procinfo.hThread);
-
- total_cycles = 0;
-
- if (tracing_enabled)
- {
- tracefile = fopen ("trace.ssp", "w");
- if (!tracefile)
- {
- tracing_enabled = 0;
- perror ("trace.ssp");
- }
- }
-
- running = 1;
- while (running)
- {
- int src, dest;
- DWORD rv;
- DEBUG_EVENT event;
- int contv = DBG_CONTINUE;
-
- event.dwDebugEventCode = -1;
- if (!WaitForDebugEvent (&event, INFINITE))
- {
- printf ("idle...\n");
- }
-
- hThread = lookup_thread_id (event.dwThreadId, &tix);
-
-#if 0
- printf ("DE: %x/%d %d %d ",
- hThread, tix,
- event.dwDebugEventCode, num_active_threads);
- for (src=0; src<num_active_threads; src++)
- {
- int sc = SuspendThread (active_threads[src]);
- int rv = GetThreadContext (active_threads[src], &context);
- ResumeThread (active_threads[src]);
- printf (" [%x,%x,%x]",
- active_threads[src], context.Eip, active_thread_ids[src]);
- }
- printf ("\n");
-#endif
-
- switch (event.dwDebugEventCode)
- {
-
- case CREATE_PROCESS_DEBUG_EVENT:
- break;
-
- case CREATE_THREAD_DEBUG_EVENT:
- if (verbose)
- printf ("create thread %08lx at %08x %s\n",
- event.dwThreadId,
- (int)event.u.CreateThread.lpStartAddress,
- addr2dllname ((unsigned int)event.u.CreateThread.lpStartAddress));
-
- active_thread_ids[num_active_threads] = event.dwThreadId;
- active_threads[num_active_threads] = event.u.CreateThread.hThread;
- thread_return_address[num_active_threads] = 0;
- num_active_threads++;
-
- if (trace_all_threads && stepping_enabled)
- {
- thread_step_flags[num_active_threads-1] = stepping_enabled;
- add_breakpoint ((int)event.u.CreateThread.lpStartAddress);
- }
-
- break;
-
- case EXIT_THREAD_DEBUG_EVENT:
- if (verbose)
- printf ("exit thread %08lx, code=%ld\n",
- event.dwThreadId,
- event.u.ExitThread.dwExitCode);
-
- for (src=0, dest=0; src<num_active_threads; src++)
- if (active_thread_ids[src] != event.dwThreadId)
- {
- active_thread_ids[dest] = active_thread_ids[src];
- active_threads[dest] = active_threads[src];
- dest++;
- }
- num_active_threads = dest;
- break;
-
- case EXCEPTION_DEBUG_EVENT:
- rv = GetThreadContext (hThread, &context);
- switch (event.u.Exception.ExceptionRecord.ExceptionCode)
- {
- case STATUS_BREAKPOINT:
- if (remove_breakpoint ((int)event.u.Exception.ExceptionRecord.ExceptionAddress))
- {
- context.Eip --;
- if (!rv)
- SetThreadContext (hThread, &context);
- if (ReadProcessMemory (hProcess, (void *)context.Esp, &rv, 4, &rv))
- thread_return_address[tix] = rv;
- }
- set_step_threads (event.dwThreadId, stepping_enabled);
- case STATUS_SINGLE_STEP:
- opcode_count++;
- pc = (unsigned int)event.u.Exception.ExceptionRecord.ExceptionAddress;
- sp = (unsigned int)context.Esp;
- if (tracing_enabled)
- fprintf (tracefile, "%08x %08lx\n", pc, event.dwThreadId);
- if (trace_console)
- {
- printf ("%d %08x\n", tix, pc);
- fflush (stdout);
- }
-
- if (dll_counts)
- {
- int i;
- for (i=num_dlls-1; i>=0; i--)
- {
- if (dll_info[i].base_address < context.Eip)
- {
- if (hThread == procinfo.hThread)
- dll_info[i].pcount++;
- else
- dll_info[i].scount++;
- break;
- }
- }
- }
-
- if (pc < last_pc || pc > last_pc+10)
- {
- static int ncalls=0;
- static int qq=0;
- if (++qq % 100 == 0)
- fprintf (stderr, " %08x %d %d \r",
- pc, ncalls, opcode_count);
-
- if (sp == last_sp-4)
- {
- ncalls++;
- store_call_edge (last_pc, pc);
- if (last_pc < KERNEL_ADDR && pc > KERNEL_ADDR)
- {
- int retaddr;
- DWORD rv;
- ReadProcessMemory (hProcess,
- (void *)sp,
- (LPVOID)&(retaddr),
- 4, &rv);
-#if 0
- printf ("call last_pc = %08x pc = %08x rv = %08x\n",
- last_pc, pc, retaddr);
- /* experimental - try to skip kernel calls for speed */
- add_breakpoint (retaddr);
- set_step_threads (event.dwThreadId, 0);
-#endif
- }
- }
- }
-
- total_cycles++;
- last_sp = sp;
- last_pc = pc;
- if (pc >= low_pc && pc < high_pc)
- hits[(pc - low_pc)/2] ++;
- break;
- default:
- if (verbose)
- {
- printf ("exception %ld, ", event.u.Exception.dwFirstChance);
- printf ("code: %lx flags: %lx\n",
- event.u.Exception.ExceptionRecord.ExceptionCode,
- event.u.Exception.ExceptionRecord.ExceptionFlags);
- if (event.u.Exception.dwFirstChance == 1)
- dump_registers (hThread);
- }
- contv = DBG_EXCEPTION_NOT_HANDLED;
- running = 0;
- break;
- }
-
- if (!rv)
- {
- if (pc == thread_return_address[tix])
- {
- if (context.EFlags & 0x100)
- {
- context.EFlags &= ~0x100; /* TRAP (single step) flag */
- SetThreadContext (hThread, &context);
- }
- }
- else if (stepping_enabled)
- {
- if (!(context.EFlags & 0x100))
- {
- context.EFlags |= 0x100; /* TRAP (single step) flag */
- SetThreadContext (hThread, &context);
- }
- }
- }
- break;
-
- case OUTPUT_DEBUG_STRING_EVENT:
- string = (char *)malloc (event.u.DebugString.nDebugStringLength+1);
- i = ReadProcessMemory (hProcess,
- event.u.DebugString.lpDebugStringData,
- (LPVOID)string,
- event.u.DebugString.nDebugStringLength,
- &rv);
- if (!i)
- {
- printf ("error reading memory: %ld %ld\n", rv, GetLastError ());
- }
- if (verbose)
- printf ("ODS: %x/%d \"%s\"\n",
- (int)hThread, tix, string);
-
- if (strcmp (string, "ssp on") == 0)
- {
- stepping_enabled = 1;
- set_step_threads (event.dwThreadId, 1);
- }
-
- if (strcmp (string, "ssp off") == 0)
- {
- stepping_enabled = 0;
- set_step_threads (event.dwThreadId, 0);
- }
-
- break;
-
-
- case LOAD_DLL_DEBUG_EVENT:
- if (verbose)
- printf ("load dll %08x:",
- (int)event.u.LoadDll.lpBaseOfDll);
-
- dll_ptr = (char *)"( u n k n o w n ) \0\0";
- if (event.u.LoadDll.lpImageName)
- {
- ReadProcessMemory (hProcess,
- event.u.LoadDll.lpImageName,
- (LPVOID)&src,
- sizeof (src),
- &rv);
- if (src)
- {
- ReadProcessMemory (hProcess,
- (void *)src,
- (LPVOID)dll_name,
- sizeof (dll_name),
- &rv);
- dll_name[rv] = 0;
- dll_ptr = dll_name;
- for (cp=dll_name; *cp; cp++)
- {
- if (*cp == '\\' || *cp == '/')
- {
- dll_ptr = cp+1;
- }
- *cp = tolower (*cp);
- }
- }
- }
-
-
- dll_info[num_dlls].base_address
- = (unsigned int)event.u.LoadDll.lpBaseOfDll;
- dll_info[num_dlls].pcount = 0;
- dll_info[num_dlls].scount = 0;
- dll_info[num_dlls].name = wide_strdup (dll_ptr);
- if (verbose)
- printf (" %s\n", dll_info[num_dlls].name);
- num_dlls++;
- qsort (dll_info, num_dlls, sizeof (DllInfo), dll_sort);
-
- break;
-
- case UNLOAD_DLL_DEBUG_EVENT:
- if (verbose)
- printf ("unload dll\n");
- break;
-
- case EXIT_PROCESS_DEBUG_EVENT:
- if (verbose)
- printf ("process %08lx %08lx exit %ld\n",
- event.dwProcessId, event.dwThreadId,
- event.u.ExitProcess.dwExitCode);
-
- running = 0;
- break;
- }
-
- set_steps ();
- ContinueDebugEvent (event.dwProcessId, event.dwThreadId, contv);
- }
-
- count = 0;
- for (pc=low_pc; pc<high_pc; pc+=2)
- {
- count += hits[(pc - low_pc)/2];
- }
- printf ("total cycles: %d, counted cycles: %d\n", total_cycles, count);
-
- if (tracing_enabled)
- fclose (tracefile);
-
-}
-
-static void
-usage (FILE * stream)
-{
- fprintf (stream , ""
- "Usage: %s [options] low_pc high_pc command...\n"
- "Single-step profile COMMAND\n"
- "\n"
- " -c, --console-trace trace every EIP value to the console. *Lots* slower.\n"
- " -d, --disable disable single-stepping by default; use\n"
- " OutputDebugString (\"ssp on\") to enable stepping\n"
- " -e, --enable enable single-stepping by default; use\n"
- " OutputDebugString (\"ssp off\") to disable stepping\n"
- " -h, --help output usage information and exit\n"
- " -l, --dll enable dll profiling. A chart of relative DLL usage\n"
- " is produced after the run.\n"
- " -s, --sub-threads trace sub-threads too. Dangerous if you have\n"
- " race conditions.\n"
- " -t, --trace-eip trace every EIP value to a file TRACE.SSP. This\n"
- " gets big *fast*.\n"
- " -v, --verbose output verbose messages about debug events.\n"
- " -V, --version output version information and exit\n"
- "\n"
- "Example: %s 0x401000 0x403000 hello.exe\n"
- "\n"
- "", prog_name, prog_name);
- if (stream == stdout)
- fprintf (stream , ""
- "SSP - The Single Step Profiler\n"
- "\n"
- "Original Author: DJ Delorie <dj@redhat.com>\n"
- "\n"
- "The SSP is a program that uses the Win32 debug API to run a program\n"
- "one ASM instruction at a time. It records the location of each\n"
- "instruction used, how many times that instruction is used, and all\n"
- "function calls. The results are saved in a format that is usable by\n"
- "the profiling program \"gprof\", although gprof will claim the values\n"
- "are seconds, they really are instruction counts. More on that later.\n"
- "\n"
- "Because the SSP was originally designed to profile the cygwin DLL, it\n"
- "does not automatically select a block of code to report statistics on.\n"
- "You must specify the range of memory addresses to keep track of\n"
- "manually, but it's not hard to figure out what to specify. Use the\n"
- "\"objdump\" program to determine the bounds of the target's \".text\"\n"
- "section. Let's say we're profiling cygwin1.dll. Make sure you've\n"
- "built it with debug symbols (else gprof won't run) and run objdump\n"
- "like this:\n"
- "\n"
- " objdump -h cygwin1.dll\n"
- "\n"
- "It will print a report like this:\n"
- "\n"
- "cygwin1.dll: file format pei-i386\n"
- "\n"
- "Sections:\n"
- "Idx Name Size VMA LMA File off Algn\n"
- " 0 .text 0007ea00 61001000 61001000 00000400 2**2\n"
- " CONTENTS, ALLOC, LOAD, READONLY, CODE, DATA\n"
- " 1 .data 00008000 61080000 61080000 0007ee00 2**2\n"
- " CONTENTS, ALLOC, LOAD, DATA\n"
- " . . .\n"
- "\n"
- "The only information we're concerned with are the VMA of the .text\n"
- "section and the VMA of the section after it (sections are usually\n"
- "contiguous; you can also add the Size to the VMA to get the end\n"
- "address). In this case, the VMA is 0x61001000 and the ending address\n"
- "is either 0x61080000 (start of .data method) or 0x0x6107fa00 (VMA+Size\n"
- "method).\n"
- "\n"
- "There are two basic ways to use SSP - either profiling a whole\n"
- "program, or selectively profiling parts of the program.\n"
- "\n"
- "To profile a whole program, just run ssp without options. By default,\n"
- "it will step the whole program. Here's a simple example, using the\n"
- "numbers above:\n"
- "\n"
- " ssp 0x61001000 0x61080000 hello.exe\n"
- "\n"
- "This will step the whole program. It will take at least 8 minutes on\n"
- "a PII/300 (yes, really). When it's done, it will create a file called\n"
- "\"gmon.out\". You can turn this data file into a readable report with\n"
- "gprof:\n"
- "\n"
- " gprof -b cygwin1.dll\n"
- "\n"
- "The \"-b\" means 'skip the help pages'. You can omit this until you're\n"
- "familiar with the report layout. The gprof documentation explains\n"
- "a lot about this report, but ssp changes a few things. For example,\n"
- "the first part of the report reports the amount of time spent in each\n"
- "function, like this:\n"
- "\n"
- "Each sample counts as 0.01 seconds.\n"
- " %% cumulative self self total\n"
- " time seconds seconds calls ms/call ms/call name\n"
- " 10.02 231.22 72.43 46 1574.57 1574.57 strcspn\n"
- " 7.95 288.70 57.48 130 442.15 442.15 strncasematch\n"
- "\n"
- "The \"seconds\" columns are really CPU opcodes, 1/100 second per opcode.\n"
- "So, \"231.22\" above means 23,122 opcodes. The ms/call values are 10x\n"
- "too big; 1574.57 means 157.457 opcodes per call. Similar adjustments\n"
- "need to be made for the \"self\" and \"children\" columns in the second\n"
- "part of the report.\n"
- "\n"
- "OK, so now we've got a huge report that took a long time to generate,\n"
- "and we've identified a spot we want to work on optimizing. Let's say\n"
- "it's the time() function. We can use SSP to selectively profile this\n"
- "function by using OutputDebugString() to control SSP from within the\n"
- "program. Here's a sample program:\n"
- "\n"
- " #include <windows.h>\n"
- " main()\n"
- " {\n"
- " time_t t;\n"
- " OutputDebugString(\"ssp on\");\n"
- " time(&t);\n"
- " OutputDebugString(\"ssp off\");\n"
- " }\n"
- "\n"
- "Then, add the \"-d\" option to ssp to default to *disabling* profiling.\n"
- "The program will run at full speed until the first OutputDebugString,\n"
- "then step until the second.\n"
- "\n"
- " ssp -d 0x61001000 0x61080000 hello.exe\n"
- "\n"
- "You can then use gprof (as usual) to see the performance profile for\n"
- "just that portion of the program's execution.\n"
- "\n"
- "There are many options to ssp. Since step-profiling makes your\n"
- "program run about 1,000 times slower than normal, it's best to\n"
- "understand all the options so that you can narrow down the parts\n"
- "of your program you need to single-step.\n"
- "\n"
- "\"-v\" - verbose. This prints messages about threads starting and\n"
- "stopping, OutputDebugString calls, DLLs loading, etc.\n"
- "\n"
- "\"-t\" and \"-c\" - tracing. With -t, *every* step's address is written\n"
- "to the file \"trace.ssp\". This can be used to help debug functions,\n"
- "since it can trace multiple threads. Clever use of scripts can match\n"
- "addresses with disassembled opcodes if needed. Warning: creates\n"
- "*huge* files, very quickly. \"-c\" prints each address to the console,\n"
- "useful for debugging key chunks of assembler.\n"
- "Use \"addr2line -C -f -s -e foo.exe < trace.ssp > lines.ssp\" and then\n"
- "\"perl cvttrace\" to convert to symbolic traces.\n"
- "\n"
- "\"-s\" - subthreads. Usually, you only need to trace the main thread,\n"
- "but sometimes you need to trace all threads, so this enables that.\n"
- "It's also needed when you want to profile a function that only a\n"
- "subthread calls. However, using OutputDebugString automatically\n"
- "enables profiling on the thread that called it, not the main thread.\n"
- "\n"
- "\"-l\" - dll profiling. Generates a pretty table of how much time was\n"
- "spent in each dll the program used. No sense optimizing a function in\n"
- "your program if most of the time is spent in the DLL.\n"
- "\n"
- "I usually use the -v, -s, and -l options:\n"
- "\n"
- " ssp -v -s -l -d 0x61001000 0x61080000 hello.exe\n"
- "\n");
- if (stream == stderr)
- fprintf (stream, "Try '%s --help' for more information.\n", prog_name);
- exit (stream == stderr ? 1 : 0);
-}
-
-static void
-print_version ()
-{
- const char *v = strchr (version, ':');
- int len;
- if (!v)
- {
- v = "?";
- len = 1;
- }
- else
- {
- v += 2;
- len = strchr (v, ' ') - v;
- }
- printf ("\
-%s (cygwin) %.*s\n\
-Single-Step Profiler\n\
-Copyright 2000, 2001, 2002 Red Hat, Inc.\n\
-Compiled on %s\n\
-", prog_name, len, v, __DATE__);
-}
-
-int
-main (int argc, char **argv)
-{
- int c, i;
- int total_pcount = 0, total_scount = 0;
- FILE *gmon;
-
- setbuf (stdout, 0);
-
- prog_name = strrchr (argv[0], '/');
- if (prog_name == NULL)
- prog_name = strrchr (argv[0], '\\');
- if (prog_name == NULL)
- prog_name = argv[0];
- else
- prog_name++;
-
- while ((c = getopt_long (argc, argv, opts, longopts, NULL)) != EOF)
- switch (c)
- {
- case 'c':
- printf ("tracing *all* $eip to the console\n");
- trace_console = 1;
- break;
- case 'd':
- printf ("stepping disabled; enable via OutputDebugString (\"ssp on\")\n");
- stepping_enabled = 0;
- break;
- case 'e':
- printf ("stepping enabled; disable via OutputDebugString (\"ssp off\")\n");
- stepping_enabled = 1;
- break;
- case 'h':
- usage (stdout);
- break;
- case 'l':
- printf ("profiling dll usage\n");
- dll_counts = 1;
- break;
- case 's':
- printf ("tracing all sub-threads too, not just the main one\n");
- trace_all_threads = 1;
- break;
- case 't':
- printf ("tracing all $eip to trace.ssp\n");
- tracing_enabled = 1;
- break;
- case 'v':
- printf ("verbose messages enabled\n");
- verbose = 1;
- break;
- case 'V':
- print_version ();
- exit (0);
- default:
- usage (stderr);
- }
-
- if ( (argc - optind) < 3 )
- usage (stderr);
- sscanf (argv[optind++], "%i", &low_pc);
- sscanf (argv[optind++], "%i", &high_pc);
-
- if (low_pc > high_pc-8)
- {
- fprintf (stderr, "Hey, low_pc must be lower than high_pc\n");
- exit (1);
- }
-
- hits = (HISTCOUNTER *)malloc (high_pc-low_pc+4);
- memset (hits, 0, high_pc-low_pc+4);
-
- fprintf (stderr, "prun: [%08x,%08x] Running '%s'\n",
- low_pc, high_pc, argv[optind]);
-
- run_program (argv[optind]);
-
- hdr.lpc = low_pc;
- hdr.hpc = high_pc;
- hdr.ncnt = high_pc-low_pc + sizeof (hdr);
- hdr.version = GMONVERSION;
- hdr.profrate = 100;
-
- gmon = fopen ("gmon.out", "wb");
- fwrite (&hdr, 1, sizeof (hdr), gmon);
- fwrite (hits, 1, high_pc-low_pc, gmon);
- write_call_edges (gmon);
- fclose (gmon);
-
- if (dll_counts)
- {
- /* 1234567 123% 1234567 123% 12345678 xxxxxxxxxxx */
- printf (" Main-Thread Other-Thread BaseAddr DLL Name\n");
-
- total_pcount = 0;
- total_scount = 0;
- for (i=0; i<num_dlls; i++)
- {
- total_pcount += dll_info[i].pcount;
- total_scount += dll_info[i].scount;
- }
-
- if (total_pcount == 0) total_pcount++;
- if (total_scount == 0) total_scount++;
-
- for (i=0; i<num_dlls; i++)
- if (dll_info[i].pcount || dll_info[i].scount)
- {
- printf ("%7d %3d%% %7d %3d%% %08x %s\n",
- dll_info[i].pcount,
- (dll_info[i].pcount*100)/opcode_count,
- dll_info[i].scount,
- (dll_info[i].scount*100)/opcode_count,
- dll_info[i].base_address,
- dll_info[i].name);
- }
- }
-
- exit (0);
-}
-
diff --git a/winsup/utils/ssp.txt b/winsup/utils/ssp.txt
deleted file mode 100644
index e73880e..0000000
--- a/winsup/utils/ssp.txt
+++ /dev/null
@@ -1,125 +0,0 @@
-
-SSP - The Single Step Profiler
-
-Original Author: DJ Delorie <dj@redhat.com>
-
-The SSP is a program that uses the Win32 debug API to run a program
-one ASM instruction at a time. It records the location of each
-instruction used, how many times that instruction is used, and all
-function calls. The results are saved in a format that is usable by
-the profiling program "gprof", although gprof will claim the values
-are seconds, they really are instruction counts. More on that later.
-
-Because the SSP was originally designed to profile the cygwin DLL, it
-does not automatically select a block of code to report statistics on.
-You must specify the range of memory addresses to keep track of
-manually, but it's not hard to figure out what to specify. Use the
-"objdump" program to determine the bounds of the target's ".text"
-section. Let's say we're profiling cygwin1.dll. Make sure you've
-built it with debug symbols (else gprof won't run) and run objdump
-like this:
-
- objdump -h cygwin1.dll
-
-It will print a report like this:
-
-cygwin1.dll: file format pei-i386
-
-Sections:
-Idx Name Size VMA LMA File off Algn
- 0 .text 0007ea00 61001000 61001000 00000400 2**2
- CONTENTS, ALLOC, LOAD, READONLY, CODE, DATA
- 1 .data 00008000 61080000 61080000 0007ee00 2**2
- CONTENTS, ALLOC, LOAD, DATA
- . . .
-
-The only information we're concerned with are the VMA of the .text
-section and the VMA of the section after it (sections are usually
-contiguous; you can also add the Size to the VMA to get the end
-address). In this case, the VMA is 0x61001000 and the ending address
-is either 0x61080000 (start of .data method) or 0x0x6107fa00 (VMA+Size
-method).
-
-There are two basic ways to use SSP - either profiling a whole
-program, or selectively profiling parts of the program.
-
-To profile a whole program, just run ssp without options. By default,
-it will step the whole program. Here's a simple example, using the
-numbers above:
-
- ssp 0x61001000 0x61080000 hello.exe
-
-This will step the whole program. It will take at least 8 minutes on
-a PII/300 (yes, really). When it's done, it will create a file called
-"gmon.out". You can turn this data file into a readable report with
-gprof:
-
- gprof -b cygwin1.dll
-
-The "-b" means "skip the help pages". You can omit this until you're
-familiar with the report layout. The gprof documentation explains
-a lot about this report, but ssp changes a few things. For example,
-the first part of the report reports the amount of time spent in each
-function, like this:
-
-Each sample counts as 0.01 seconds.
- % cumulative self self total
- time seconds seconds calls ms/call ms/call name
- 10.02 231.22 72.43 46 1574.57 1574.57 strcspn
- 7.95 288.70 57.48 130 442.15 442.15 strncasematch
-
-The "seconds" columns are really CPU opcodes, 1/100 second per opcode.
-So, "231.22" above means 23,122 opcodes. The ms/call values are 10x
-too big; 1574.57 means 157.457 opcodes per call. Similar adjustments
-need to be made for the "self" and "children" columns in the second
-part of the report.
-
-OK, so now we've got a huge report that took a long time to generate,
-and we've identified a spot we want to work on optimizing. Let's say
-it's the time() function. We can use SSP to selectively profile this
-function by using OutputDebugString() to control SSP from within the
-program. Here's a sample program:
-
- #include <windows.h>
- main()
- {
- time_t t;
- OutputDebugString("ssp on");
- time(&t);
- OutputDebugString("ssp off");
- }
-
-Then, add the "-d" option to ssp to default to *disabling* profiling.
-The program will run at full speed until the first OutputDebugString,
-then step until the second.
-
- ssp -d 0x61001000 0x61080000 hello.exe
-
-You can then use gprof (as usual) to see the performance profile for
-just that portion of the program's execution.
-
-OK, now for the other ssp options, and when to use them:
-
-"-v" - verbose. This prints messages about threads starting and
-stopping, OutputDebugString calls, DLLs loading, etc.
-
-"-t" and "-tc" - tracing. With -t, *every* step's address is written
-to the file "trace.ssp". This can be used to help debug functions,
-since it can trace multiple threads. Clever use of scripts can match
-addresses with disassembled opcodes if needed. Warning: creates
-*huge* files, very quickly. "-tc" prints each address to the console,
-useful for debugging key chunks of assembler.
-
-"-s" - subthreads. Usually, you only need to trace the main thread,
-but sometimes you need to trace all threads, so this enables that.
-It's also needed when you want to profile a function that only a
-subthread calls. However, using OutputDebugString automatically
-enables profiling on the thread that called it, not the main thread.
-
-"-dll" - dll profiling. Generates a pretty table of how much time was
-spent in each dll the program used. No sense optimizing a function in
-your program if most of the time is spent in the DLL.
-
-I usually use the -v, -s, and -dll options:
-
- ssp -v -s -dll -d 0x61001000 0x61080000 hello.exe
diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc
deleted file mode 100644
index 19d15bd..0000000
--- a/winsup/utils/strace.cc
+++ /dev/null
@@ -1,1061 +0,0 @@
-/* strace.cc
-
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Red Hat Inc.
-
- Written by Chris Faylor <cgf@redhat.com>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#define cygwin_internal cygwin_internal_dontuse
-#include <stdio.h>
-#include <fcntl.h>
-#include <getopt.h>
-#include <stdarg.h>
-#include <string.h>
-#include <stdlib.h>
-#include <time.h>
-#include <windows.h>
-#include <signal.h>
-#include <errno.h>
-#include "cygwin/include/sys/strace.h"
-#include "cygwin/include/sys/cygwin.h"
-#include "path.h"
-#undef cygwin_internal
-
-/* we *know* we're being built with GCC */
-#define alloca __builtin_alloca
-
-// Version string.
-static const char version[] = "$Revision$";
-
-static const char *pgm;
-static int forkdebug = 1;
-static int numerror = 1;
-static int show_usecs = 1;
-static int delta = 1;
-static int hhmmss;
-static int bufsize;
-static int new_window;
-static long flush_period;
-static int include_hex;
-static int quiet = -1;
-
-static unsigned char strace_active = 1;
-static int processes;
-
-static BOOL close_handle (HANDLE h, DWORD ok);
-
-#define CloseHandle(h) close_handle(h, 0)
-
-struct child_list
-{
- DWORD id;
- HANDLE hproc;
- int saw_stars;
- char nfields;
- long long start_time;
- DWORD last_usecs;
- struct child_list *next;
- child_list ():id (0), hproc (NULL), saw_stars (0), nfields (0),
- start_time (0), last_usecs (0), next (NULL)
- {
- }
-};
-
-child_list children;
-
-static void
-warn (int geterrno, const char *fmt, ...)
-{
- va_list args;
- char buf[4096];
-
- va_start (args, fmt);
- sprintf (buf, "%s: ", pgm);
- vsprintf (strchr (buf, '\0'), fmt, args);
- if (geterrno)
- perror (buf);
- else
- {
- fputs (buf, stderr);
- fputs ("\n", stderr);
- }
-}
-
-static void __attribute__ ((noreturn))
-error (int geterrno, const char *fmt, ...)
-{
- va_list args;
- char buf[4096];
-
- va_start (args, fmt);
- sprintf (buf, "%s: ", pgm);
- vsprintf (strchr (buf, '\0'), fmt, args);
- if (geterrno)
- perror (buf);
- else
- {
- fputs (buf, stderr);
- fputs ("\n", stderr);
- }
- exit (1);
-}
-
-DWORD lastid = 0;
-HANDLE lasth;
-
-static child_list *
-get_child (DWORD id)
-{
- child_list *c;
- for (c = &children; (c = c->next) != NULL;)
- if (c->id == id)
- return c;
-
- return NULL;
-}
-
-static void
-add_child (DWORD id, HANDLE hproc)
-{
- if (!get_child (id))
- {
- child_list *c = children.next;
- children.next = (child_list *) calloc (1, sizeof (child_list));
- children.next->next = c;
- lastid = children.next->id = id;
- lasth = children.next->hproc = hproc;
- processes++;
- if (!quiet)
- fprintf (stderr, "Windows process %lu attached\n", id);
- }
-}
-
-static void
-remove_child (DWORD id)
-{
- child_list *c;
- if (id == lastid)
- lastid = 0;
- for (c = &children; c->next != NULL; c = c->next)
- if (c->next->id == id)
- {
- child_list *c1 = c->next;
- c->next = c1->next;
- free (c1);
- if (!quiet)
- fprintf (stderr, "Windows process %lu detached\n", id);
- processes--;
- return;
- }
-
- error (0, "no process id %d found", id);
-}
-
-#define LINE_BUF_CHUNK 128
-
-class linebuf
-{
- size_t alloc;
-public:
- size_t ix;
- char *buf;
- linebuf ()
- {
- ix = 0;
- alloc = 0;
- buf = NULL;
- }
- ~linebuf ()
- {
- if (buf)
- free (buf);
- }
- void add (const char *what, int len);
- void add (const char *what)
- {
- add (what, strlen (what));
- }
- void prepend (const char *what, int len);
-};
-
-void
-linebuf::add (const char *what, int len)
-{
- size_t newix;
- if ((newix = ix + len) >= alloc)
- {
- alloc += LINE_BUF_CHUNK + len;
- buf = (char *) realloc (buf, alloc + 1);
- }
- memcpy (buf + ix, what, len);
- ix = newix;
- buf[ix] = '\0';
-}
-
-void
-linebuf::prepend (const char *what, int len)
-{
- int buflen;
- size_t newix;
- if ((newix = ix + len) >= alloc)
- {
- alloc += LINE_BUF_CHUNK + len;
- buf = (char *) realloc (buf, alloc + 1);
- buf[ix] = '\0';
- }
- if ((buflen = strlen (buf)))
- memmove (buf + len, buf, buflen + 1);
- else
- buf[newix] = '\0';
- memcpy (buf, what, len);
- ix = newix;
-}
-
-static void
-make_command_line (linebuf & one_line, char **argv)
-{
- for (; *argv; argv++)
- {
- char *p = NULL;
- const char *a = *argv;
-
- int len = strlen (a);
- if (len != 0 && !(p = strpbrk (a, " \t\n\r\"")))
- one_line.add (a, len);
- else
- {
- one_line.add ("\"", 1);
- for (; p; a = p, p = strchr (p, '"'))
- {
- one_line.add (a, ++p - a);
- if (p[-1] == '"')
- one_line.add ("\"", 1);
- }
- if (*a)
- one_line.add (a);
- one_line.add ("\"", 1);
- }
- one_line.add (" ", 1);
- }
-
- if (one_line.ix)
- one_line.buf[one_line.ix - 1] = '\0';
- else
- one_line.add ("", 1);
-}
-
-static DWORD child_pid;
-
-static BOOL WINAPI
-ctrl_c (DWORD)
-{
- static int tic = 1;
- if ((tic ^= 1) && !GenerateConsoleCtrlEvent (CTRL_C_EVENT, 0))
- error (0, "couldn't send CTRL-C to child, win32 error %d\n",
- GetLastError ());
- return TRUE;
-}
-
-extern "C" {
-unsigned long (*cygwin_internal) (int, ...);
-};
-
-static int
-load_cygwin ()
-{
- static HMODULE h;
-
- if (cygwin_internal)
- return 1;
-
- if (h)
- return 0;
-
- if (!(h = LoadLibrary ("cygwin1.dll")))
- {
- errno = ENOENT;
- return 0;
- }
- if (!(cygwin_internal = (DWORD (*) (int, ...)) GetProcAddress (h, "cygwin_internal")))
- {
- errno = ENOSYS;
- return 0;
- }
- return 1;
-}
-
-static void
-attach_process (pid_t pid)
-{
- child_pid = (DWORD) cygwin_internal (CW_CYGWIN_PID_TO_WINPID, pid);
- if (!child_pid)
- child_pid = pid;
-
- if (!DebugActiveProcess (child_pid))
- error (0, "couldn't attach to pid %d for debugging", child_pid);
-
- return;
-}
-
-
-static void
-create_child (char **argv)
-{
- linebuf one_line;
-
- STARTUPINFO si;
- PROCESS_INFORMATION pi;
- BOOL ret;
- DWORD flags;
-
- if (strchr (*argv, '/'))
- *argv = cygpath (*argv, NULL);
- memset (&si, 0, sizeof (si));
- si.cb = sizeof (si);
-
- flags = CREATE_DEFAULT_ERROR_MODE
- | (forkdebug ? DEBUG_PROCESS : DEBUG_ONLY_THIS_PROCESS);
- if (new_window)
- flags |= CREATE_NEW_CONSOLE | CREATE_NEW_PROCESS_GROUP;
-
- make_command_line (one_line, argv);
-
- SetConsoleCtrlHandler (NULL, 0);
- ret = CreateProcess (0, one_line.buf, /* command line */
- NULL, /* Security */
- NULL, /* thread */
- TRUE, /* inherit handles */
- flags, /* start flags */
- NULL, NULL, /* current directory */
- &si, &pi);
- if (!ret)
- error (0, "error creating process %s, (error %d)", *argv,
- GetLastError ());
-
- CloseHandle (pi.hThread);
- CloseHandle (pi.hProcess);
- child_pid = pi.dwProcessId;
- SetConsoleCtrlHandler (ctrl_c, 1);
-}
-
-static int
-output_winerror (FILE *ofile, char *s)
-{
- char *winerr = strstr (s, "Win32 error ");
- if (!winerr)
- return 0;
-
- DWORD errnum = atoi (winerr + sizeof ("Win32 error ") - 1);
- if (!errnum)
- return 0;
-
- /*
- * NOTE: Currently there is no policy for how long the
- * the buffers are, and looks like 256 is a smallest one
- * (dlfcn.cc). Other than error 1395 (length 213) and
- * error 1015 (length 249), the rest are all under 188
- * characters, and so I'll use 189 as the buffer length.
- * For those longer error messages, FormatMessage will
- * return FALSE, and we'll get the old behaviour such as
- * ``Win32 error 1395'' etc.
- */
- char buf[4096];
- if (!FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM
- | FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL,
- errnum,
- MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPTSTR) buf, sizeof (buf), NULL))
- return 0;
-
- /* Get rid the trailing CR/NL pair. */
- char *p = strchr (buf, '\0');
- p[-2] = '\n';
- p[-1] = '\0';
-
- *winerr = '\0';
- fputs (s, ofile);
- fputs (buf, ofile);
- return 1;
-}
-
-static SYSTEMTIME *
-syst (long long t)
-{
- FILETIME n;
- static SYSTEMTIME st;
- long long now = t /*+ ((long long) usecs * 10)*/;
- n.dwHighDateTime = now >> 32;
- n.dwLowDateTime = now & 0xffffffff;
- FileTimeToSystemTime (&n, &st);
- return &st;
-}
-
-static void __stdcall
-handle_output_debug_string (DWORD id, LPVOID p, unsigned mask, FILE *ofile)
-{
- int len;
- int special;
- char alen[3 + 8 + 1];
- DWORD nbytes;
- child_list *child = get_child (id);
- if (!child)
- error (0, "no process id %d found", id);
- HANDLE hchild = child->hproc;
-#define INTROLEN (sizeof (alen) - 1)
-
- if (id == lastid && hchild != lasth)
- warn (0, "%p != %p", hchild, lasth);
-
- alen[INTROLEN] = '\0';
- if (!ReadProcessMemory (hchild, p, alen, INTROLEN, &nbytes))
-#ifndef DEBUGGING
- return;
-#else
- error (0,
- "couldn't get message length from subprocess %d<%p>, windows error %d",
- id, hchild, GetLastError ());
-#endif
-
- if (strncmp (alen, "cYg", 3))
- return;
- len = (int) strtoul (alen + 3, NULL, 16);
- if (!len)
- return;
-
- if (len > 0)
- special = 0;
- else
- {
- special = len;
- if (special == _STRACE_INTERFACE_ACTIVATE_ADDR || special == _STRACE_CHILD_PID)
- len = 17;
- }
-
- char *buf;
- buf = (char *) alloca (len + 85) + 20;
-
- if (!ReadProcessMemory (hchild, ((char *) p) + INTROLEN, buf, len, &nbytes))
- error (0, "couldn't get message from subprocess, windows error %d",
- GetLastError ());
-
- buf[len] = '\0';
- char *s = strtok (buf, " ");
-
- unsigned long n = strtoul (s, NULL, 16);
-
- s = strchr (s, '\0') + 1;
-
- if (special == _STRACE_CHILD_PID)
- {
- if (!DebugActiveProcess (n))
- error (0, "couldn't attach to subprocess %d for debugging, "
- "windows error %d", n, GetLastError ());
- return;
- }
-
- if (special == _STRACE_INTERFACE_ACTIVATE_ADDR)
- {
- if (!WriteProcessMemory (hchild, (LPVOID) n, &strace_active,
- sizeof (strace_active), &nbytes))
- error (0, "couldn't write strace flag to subprocess at %p, "
- "windows error %d", n, GetLastError ());
- return;
- }
-
- char *origs = s;
-
- if (mask & n)
- /* got it */ ;
- else if (!(mask & _STRACE_ALL) || (n & _STRACE_NOTALL))
- return; /* This should not be included in "all" output */
-
- DWORD dusecs, usecs;
- char *ptusec, *ptrest;
-
- dusecs = strtoul (s, &ptusec, 10);
- char *q = ptusec;
- while (*q == ' ')
- q++;
- if (*q != '[')
- {
- usecs = strtoul (q, &ptrest, 10);
- while (*ptrest == ' ')
- ptrest++;
- }
- else
- {
- ptrest = q;
- ptusec = show_usecs ? s : ptrest;
- usecs = dusecs;
- }
-
- if (child->saw_stars == 0)
- {
- FILETIME st;
- char *news;
-
- GetSystemTimeAsFileTime (&st);
- FileTimeToLocalFileTime (&st, &st);
- child->start_time = st.dwHighDateTime;
- child->start_time <<= 32;
- child->start_time |= st.dwLowDateTime;
- if (*(news = ptrest) != '[')
- child->saw_stars = 2;
- else
- {
- child->saw_stars++;
- while ((news = strchr (news, ' ')) != NULL && *++news != '*')
- child->nfields++;
- if (news == NULL)
- child->saw_stars++;
- else
- {
- s = news;
- child->nfields++;
- }
- }
- }
- else if (child->saw_stars < 2)
- {
- int i;
- char *news;
- if (*(news = ptrest) != '[')
- child->saw_stars = 2;
- else
- {
- for (i = 0; i < child->nfields; i++)
- if ((news = strchr (news, ' ')) == NULL)
- break; // Should never happen
- else
- news++;
-
- if (news == NULL)
- child->saw_stars = 2;
- else
- {
- s = news;
- if (*s == '*')
- {
- SYSTEMTIME *st = syst (child->start_time);
- fprintf (ofile,
- "Date/Time: %d-%02d-%02d %02d:%02d:%02d\n",
- st->wYear, st->wMonth, st->wDay, st->wHour,
- st->wMinute, st->wSecond);
- child->saw_stars++;
- }
- }
- }
- }
-
- long long d = usecs - child->last_usecs;
- char intbuf[40];
-
- if (child->saw_stars < 2 || s != origs)
- /* Nothing */ ;
- else if (hhmmss)
- {
- s = ptrest - 9;
- SYSTEMTIME *st = syst (child->start_time + (long long) usecs * 10);
- sprintf (s, "%02d:%02d:%02d", st->wHour, st->wMinute, st->wSecond);
- *strchr (s, '\0') = ' ';
- }
- else if (!delta)
- s = ptusec;
- else
- {
- s = ptusec;
- sprintf (intbuf, "%5d ", (int) d);
- int len = strlen (intbuf);
-
- memcpy ((s -= len), intbuf, len);
- }
-
- if (include_hex)
- {
- s -= 8;
- sprintf (s, "%p", (void *) n);
- strchr (s, '\0')[0] = ' ';
- }
- child->last_usecs = usecs;
- if (numerror || !output_winerror (ofile, s))
- fputs (s, ofile);
- if (!bufsize)
- fflush (ofile);
-}
-
-static DWORD
-proc_child (unsigned mask, FILE *ofile, pid_t pid)
-{
- DWORD res = 0;
- DEBUG_EVENT ev;
- time_t cur_time, last_time;
-
- SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_HIGHEST);
- last_time = time (NULL);
- while (1)
- {
- BOOL debug_event = WaitForDebugEvent (&ev, 1000);
- DWORD status = DBG_CONTINUE;
-
- if (bufsize && flush_period > 0 &&
- (cur_time = time (NULL)) >= last_time + flush_period)
- {
- last_time = cur_time;
- fflush (ofile);
- }
-
- if (!debug_event)
- continue;
-
- if (pid)
- {
- (void) cygwin_internal (CW_STRACE_TOGGLE, pid);
- pid = 0;
- }
-
- switch (ev.dwDebugEventCode)
- {
- case CREATE_PROCESS_DEBUG_EVENT:
- if (ev.u.CreateProcessInfo.hFile)
- CloseHandle (ev.u.CreateProcessInfo.hFile);
- add_child (ev.dwProcessId, ev.u.CreateProcessInfo.hProcess);
- break;
-
- case CREATE_THREAD_DEBUG_EVENT:
- break;
-
- case LOAD_DLL_DEBUG_EVENT:
- if (ev.u.LoadDll.hFile)
- CloseHandle (ev.u.LoadDll.hFile);
- break;
-
- case OUTPUT_DEBUG_STRING_EVENT:
- handle_output_debug_string (ev.dwProcessId,
- ev.u.DebugString.lpDebugStringData,
- mask, ofile);
- break;
-
- case EXIT_PROCESS_DEBUG_EVENT:
- res = ev.u.ExitProcess.dwExitCode >> 8;
- remove_child (ev.dwProcessId);
- break;
- case EXCEPTION_DEBUG_EVENT:
- if (ev.u.Exception.ExceptionRecord.ExceptionCode != STATUS_BREAKPOINT)
- {
- status = DBG_EXCEPTION_NOT_HANDLED;
- if (ev.u.Exception.dwFirstChance)
- fprintf (ofile, "--- Process %lu, exception %p at %p\n", ev.dwProcessId,
- ev.u.Exception.ExceptionRecord.ExceptionCode,
- ev.u.Exception.ExceptionRecord.ExceptionAddress);
- }
- break;
- }
- if (!ContinueDebugEvent (ev.dwProcessId, ev.dwThreadId, status))
- error (0, "couldn't continue debug event, windows error %d",
- GetLastError ());
- if (!processes)
- break;
- }
-
- return res;
-}
-
-static void
-dotoggle (pid_t pid)
-{
- child_pid = (DWORD) cygwin_internal (CW_CYGWIN_PID_TO_WINPID, pid);
- if (!child_pid)
- {
- warn (0, "no such cygwin pid - %d", pid);
- child_pid = pid;
- }
- if (cygwin_internal (CW_STRACE_TOGGLE, child_pid))
- error (0, "failed to toggle tracing for process %d<%d>", pid, child_pid);
-
- return;
-}
-
-static DWORD
-dostrace (unsigned mask, FILE *ofile, pid_t pid, char **argv)
-{
- if (!pid)
- create_child (argv);
- else
- attach_process (pid);
-
- return proc_child (mask, ofile, pid);
-}
-
-typedef struct tag_mask_mnemonic
-{
- unsigned long val;
- const char *text;
-}
-mask_mnemonic;
-
-static const mask_mnemonic mnemonic_table[] = {
- {_STRACE_ALL, "all"},
- {_STRACE_FLUSH, "flush"},
- {_STRACE_INHERIT, "inherit"},
- {_STRACE_UHOH, "uhoh"},
- {_STRACE_SYSCALL, "syscall"},
- {_STRACE_STARTUP, "startup"},
- {_STRACE_DEBUG, "debug"},
- {_STRACE_PARANOID, "paranoid"},
- {_STRACE_TERMIOS, "termios"},
- {_STRACE_SELECT, "select"},
- {_STRACE_WM, "wm"},
- {_STRACE_SIGP, "sigp"},
- {_STRACE_MINIMAL, "minimal"},
- {_STRACE_EXITDUMP, "exitdump"},
- {_STRACE_SYSTEM, "system"},
- {_STRACE_NOMUTEX, "nomutex"},
- {_STRACE_MALLOC, "malloc"},
- {_STRACE_THREAD, "thread"},
- {0, NULL}
-};
-
-static unsigned long
-mnemonic2ul (const char *nptr, char **endptr)
-{
- // Look up mnemonic in table, return value.
- // *endptr = ptr to char that breaks match.
- const mask_mnemonic *mnp = mnemonic_table;
-
- while (mnp->text != NULL)
- {
- if (strcmp (mnp->text, nptr) == 0)
- {
- // Found a match.
- if (endptr != NULL)
- {
- *endptr = ((char *) nptr) + strlen (mnp->text);
- }
- return mnp->val;
- }
- mnp++;
- }
-
- // Didn't find it.
- if (endptr != NULL)
- {
- *endptr = (char *) nptr;
- }
- return 0;
-}
-
-static unsigned long
-parse_mask (const char *ms, char **endptr)
-{
- const char *p = ms;
- char *newp;
- unsigned long retval = 0, thisval;
- const size_t bufsize = 16;
- char buffer[bufsize];
- size_t len;
-
- while (*p != '\0')
- {
- // First extract the term, terminate it, and lowercase it.
- strncpy (buffer, p, bufsize);
- buffer[bufsize - 1] = '\0';
- len = strcspn (buffer, "+,\0");
- buffer[len] = '\0';
- strlwr (buffer);
-
- // Check if this is a mnemonic. We have to do this first or strtoul()
- // will false-trigger on anything starting with "a" through "f".
- thisval = mnemonic2ul (buffer, &newp);
- if (buffer == newp)
- {
- // This term isn't mnemonic, check if it's hex.
- thisval = strtoul (buffer, &newp, 16);
- if (newp != buffer + len)
- {
- // Not hex either, syntax error.
- *endptr = (char *) p;
- return 0;
- }
- }
-
- p += len;
- retval += thisval;
-
- // Handle operators
- if (*p == '\0')
- break;
- if ((*p == '+') || (*p == ','))
- {
- // For now these both equate to addition/ORing. Until we get
- // fancy and add things like "all-<something>", all we need do is
- // continue the looping.
- p++;
- continue;
- }
- else
- {
- // Syntax error
- *endptr = (char *) p;
- return 0;
- }
- }
-
- *endptr = (char *) p;
- return retval;
-}
-
-static void
-usage (FILE *where = stderr)
-{
- fprintf (where, "\
-Usage: %s [OPTIONS] <command-line>\n\
-Usage: %s [OPTIONS] -p <pid>\n\
-Trace system calls and signals\n\
-\n\
- -b, --buffer-size=SIZE set size of output file buffer\n\
- -d, --no-delta don't display the delta-t microsecond timestamp\n\
- -f, --trace-children trace child processes (toggle - default true)\n\
- -h, --help output usage information and exit\n\
- -m, --mask=MASK set message filter mask\n\
- -n, --crack-error-numbers output descriptive text instead of error\n\
- numbers for Windows errors\n\
- -o, --output=FILENAME set output file to FILENAME\n\
- -p, --pid=n attach to executing program with cygwin pid n\n\
- -q, --quiet suppress messages about attaching, detaching, etc.\n\
- -S, --flush-period=PERIOD flush buffered strace output every PERIOD secs\n\
- -t, --timestamp use an absolute hh:mm:ss timestamp insted of \n\
- the default microsecond timestamp. Implies -d\n\
- -T, --toggle toggle tracing in a process already being\n\
- traced. Requires -p <pid>\n\
- -u, --usecs toggle printing of microseconds timestamp\n\
- -v, --version output version information and exit\n\
- -w, --new-window spawn program under test in a new window\n\
-\n", pgm, pgm);
- if ( where == stdout)
- fprintf (stdout, "\
- MASK can be any combination of the following mnemonics and/or hex values\n\
- (0x is optional). Combine masks with '+' or ',' like so:\n\
-\n\
- --mask=wm+system,malloc+0x00800\n\
-\n\
- Mnemonic Hex Corresponding Def Description\n\
- =========================================================================\n\
- all 0x00001 (_STRACE_ALL) All strace messages.\n\
- flush 0x00002 (_STRACE_FLUSH) Flush output buffer after each message.\n\
- inherit 0x00004 (_STRACE_INHERIT) Children inherit mask from parent.\n\
- uhoh 0x00008 (_STRACE_UHOH) Unusual or weird phenomenon.\n\
- syscall 0x00010 (_STRACE_SYSCALL) System calls.\n\
- startup 0x00020 (_STRACE_STARTUP) argc/envp printout at startup.\n\
- debug 0x00040 (_STRACE_DEBUG) Info to help debugging. \n\
- paranoid 0x00080 (_STRACE_PARANOID) Paranoid info.\n\
- termios 0x00100 (_STRACE_TERMIOS) Info for debugging termios stuff.\n\
- select 0x00200 (_STRACE_SELECT) Info on ugly select internals.\n\
- wm 0x00400 (_STRACE_WM) Trace Windows msgs (enable _strace_wm).\n\
- sigp 0x00800 (_STRACE_SIGP) Trace signal and process handling.\n\
- minimal 0x01000 (_STRACE_MINIMAL) Very minimal strace output.\n\
- exitdump 0x04000 (_STRACE_EXITDUMP) Dump strace cache on exit.\n\
- system 0x08000 (_STRACE_SYSTEM) Serious error; goes to console and log.\n\
- nomutex 0x10000 (_STRACE_NOMUTEX) Don't use mutex for synchronization.\n\
- malloc 0x20000 (_STRACE_MALLOC) Trace malloc calls.\n\
- thread 0x40000 (_STRACE_THREAD) Thread-locking calls.\n\
-");
- if (where == stderr)
- fprintf (stderr, "Try '%s --help' for more information.\n", pgm);
- exit (where == stderr ? 1 : 0 );
-}
-
-struct option longopts[] = {
- {"buffer-size", required_argument, NULL, 'b'},
- {"help", no_argument, NULL, 'h'},
- {"flush-period", required_argument, NULL, 'S'},
- {"hex", no_argument, NULL, 'H'},
- {"mask", required_argument, NULL, 'm'},
- {"new-window", no_argument, NULL, 'w'},
- {"output", required_argument, NULL, 'o'},
- {"no-delta", no_argument, NULL, 'd'},
- {"pid", required_argument, NULL, 'p'},
- {"quiet", no_argument, NULL, 'q'},
- {"timestamp", no_argument, NULL, 't'},
- {"toggle", no_argument, NULL, 'T'},
- {"trace-children", no_argument, NULL, 'f'},
- {"translate-error-numbers", no_argument, NULL, 'n'},
- {"usecs", no_argument, NULL, 'u'},
- {"version", no_argument, NULL, 'v'},
- {NULL, 0, NULL, 0}
-};
-
-static const char *const opts = "+b:dhHfm:no:p:qS:tTuvw";
-
-static void
-print_version ()
-{
- const char *v = strchr (version, ':');
- int len;
- if (!v)
- {
- v = "?";
- len = 1;
- }
- else
- {
- v += 2;
- len = strchr (v, ' ') - v;
- }
- printf ("\
-%s (cygwin) %.*s\n\
-System Trace\n\
-Copyright 2000, 2001, 2002, 2003, 2004, 2005 Red Hat, Inc.\n\
-Compiled on %s\n\
-", pgm, len, v, __DATE__);
-}
-
-int
-main (int argc, char **argv)
-{
- unsigned mask = 0;
- FILE *ofile = NULL;
- pid_t pid = 0;
- int opt;
- int toggle = 0;
- int sawquiet = -1;
-
- if (load_cygwin ())
- {
- char **av = (char **) cygwin_internal (CW_ARGV);
- if (av && (DWORD) av != (DWORD) -1)
- for (argc = 0, argv = av; *av; av++)
- argc++;
- }
-
- if (!(pgm = strrchr (*argv, '\\')) && !(pgm = strrchr (*argv, '/')))
- pgm = *argv;
- else
- pgm++;
-
- while ((opt = getopt_long (argc, argv, opts, longopts, NULL)) != EOF)
- switch (opt)
- {
- case 'b':
- bufsize = atoi (optarg);
- break;
- case 'd':
- delta ^= 1;
- break;
- case 'f':
- forkdebug ^= 1;
- break;
- case 'h':
- // Print help and exit
- usage (stdout);
- break;
- case 'H':
- include_hex ^= 1;
- break;
- case 'm':
- {
- char *endptr;
- mask = parse_mask (optarg, &endptr);
- if (*endptr != '\0')
- {
- // Bad mask expression.
- error (0, "syntax error in mask expression \"%s\" near \
-character #%d.\n", optarg, (int) (endptr - optarg), endptr);
- }
- break;
- }
- case 'n':
- numerror ^= 1;
- break;
- case 'o':
- if ((ofile = fopen (cygpath (optarg, NULL), "w")) == NULL)
- error (1, "can't open %s", optarg);
-#ifdef F_SETFD
- (void) fcntl (fileno (ofile), F_SETFD, 0);
-#endif
- break;
- case 'p':
- pid = strtoul (optarg, NULL, 10);
- strace_active |= 2;
- break;
- case 'q':
- if (sawquiet < 0)
- sawquiet = 1;
- else
- sawquiet ^= 1;
- break;
- case 'S':
- flush_period = strtoul (optarg, NULL, 10);
- break;
- case 't':
- hhmmss ^= 1;
- break;
- case 'T':
- toggle ^= 1;
- break;
- case 'u':
- // FIXME: currently unimplemented
- show_usecs ^= 1;
- delta ^= 1;
- break;
- case 'v':
- // Print version info and exit
- print_version ();
- return 0;
- case 'w':
- new_window ^= 1;
- break;
- case '?':
- fprintf (stderr, "Try '%s --help' for more information.\n", pgm);
- exit (1);
- }
-
- if (pid && argv[optind])
- error (0, "cannot provide both a command line and a process id");
-
- if (!pid && !argv[optind])
- error (0, "must provide either a command line or a process id");
-
- if (toggle && !pid)
- error (0, "must provide a process id to toggle tracing");
-
- if (!pid)
- quiet = sawquiet < 0 || !sawquiet;
- else if (sawquiet < 0)
- quiet = 0;
- else
- quiet = sawquiet;
-
- if (!mask)
- mask = _STRACE_ALL;
-
- if (bufsize)
- setvbuf (ofile, (char *) alloca (bufsize), _IOFBF, bufsize);
-
- if (!ofile)
- ofile = stdout;
-
- DWORD res = 0;
- if (toggle)
- dotoggle (pid);
- else
- res = dostrace (mask, ofile, pid, argv + optind);
- return res;
-}
-
-#undef CloseHandle
-
-static BOOL
-close_handle (HANDLE h, DWORD ok)
-{
- child_list *c;
- for (c = &children; (c = c->next) != NULL;)
- if (c->hproc == h && c->id != ok)
- error (0, "Closing child handle %p", h);
- return CloseHandle (h);
-}
diff --git a/winsup/utils/testsuite.cc b/winsup/utils/testsuite.cc
deleted file mode 100644
index b87f85c..0000000
--- a/winsup/utils/testsuite.cc
+++ /dev/null
@@ -1,89 +0,0 @@
-/* testsuite.cc
-
- Copyright 2008 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. */
-
-/* This file implements a driver for performing tests on the file/path
- translation code in path.cc. This file is meant to be generic, all
- test harness data is in testsuite.h. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#define TESTSUITE
-#include "testsuite.h"
-
-typedef struct
- {
- const char *cwd; /* in win32 form, as if by GetCurrentDirectory */
- const char *posix; /* input */
- const char *win32; /* expected output */
- } test_t;
-
-#define TESTSUITE_TESTS
-#include "testsuite.h"
-#undef TESTSUITE_TESTS
-
-static int curtest;
-
-/* A replacement for the w32api GetCurrentDirectory() that returns
- the cwd that the current test specifies. */
-DWORD
-testsuite_getcwd (DWORD nBufferLength, LPSTR lpBuffer)
-{
- unsigned len = strlen (testsuite_tests[curtest].cwd) + 1;
-
- /* If the test specified NO_CWD, then it means we should not have
- needed the CWD for that test as the test was for an absolute path,
- and so if we see that here return 0, simulating a
- GetCurrentDirectory() error. */
- if (strcmp (testsuite_tests[curtest].cwd, NO_CWD) == 0)
- return 0;
-
- if (nBufferLength >= len)
- {
- strcpy (lpBuffer, testsuite_tests[curtest].cwd);
- return len - 1;
- }
- return len;
-}
-
-extern char *cygpath (const char *s, ...);
-
-int
-main (int argc, char **argv)
-{
- int numpass = 0;
-
- for (test_t &t = testsuite_tests[curtest]; t.posix; t = testsuite_tests[++curtest])
- {
- char *result = cygpath (t.posix, NULL);
- bool pass = (strcmp (result, t.win32) == 0);
-
- if (pass)
- {
- numpass++;
- printf ("test %03d: PASS cwd=%-18s input=%-22s expected+actual=%s\n",
- curtest, t.cwd, t.posix, result);
- }
- else
- {
- printf ("test %03d: FAIL cwd=%-18s input=%-29s expected=%-25s actual=%s\n",
- curtest, t.cwd, t.posix, t.win32, result);
- }
- }
- printf ("\n"
- "total tests: %d\n"
- "pass : %d (%.1f%%)\n"
- "fail : %d (%.1f%%)\n",
- curtest, numpass, ((float)numpass)/curtest * 100.0F, curtest - numpass,
- ((float)curtest - numpass)/curtest * 100.0F);
- return (numpass < curtest ? 1 : 0);
-}
diff --git a/winsup/utils/testsuite.h b/winsup/utils/testsuite.h
deleted file mode 100644
index 3bc360a..0000000
--- a/winsup/utils/testsuite.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/* testsuite.h
-
- Copyright 2008 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. */
-
-/* This file implements a test harness for the MinGW implementation of
- POSIX path translation in utils/path.cc. This code is used by strace
- and cygcheck which cannot depend on the Cygwin DLL. The tests below
- are a basic set of sanity checks for translating relative and
- absolute paths from POSIX form to Win32 form based on the contents of
- a mount table. */
-
-/* Including this file should be a no-op if TESTSUITE is not defined. */
-#ifdef TESTSUITE
-
-/* These definitions are common to both the testsuite mount table
- as well as the testsuite definitions themselves, so define them
- here so that they are only defined in one location. */
-#define TESTSUITE_ROOT "X:\\xyzroot"
-#define TESTSUITE_CYGDRIVE "/testcygdrive"
-
-/* Define a mount table in the form that read_mounts() would populate.
- This is used in place of actually reading the host mount
- table from the registry for the duration of the testsuite. This
- table should match the battery of tests below. */
-
-#if defined(TESTSUITE_MOUNT_TABLE)
-static mnt_t mount_table[] = {
-/* native posix flags issys */
- { TESTSUITE_ROOT, (char*)"/", MOUNT_BINARY | MOUNT_SYSTEM, 1 },
- { "O:\\other", (char*)"/otherdir", MOUNT_BINARY | MOUNT_SYSTEM, 1 },
- { "S:\\some\\dir", (char*)"/somedir", MOUNT_BINARY | MOUNT_SYSTEM, 1 },
- { TESTSUITE_ROOT"\\bin", (char*)"/usr/bin", MOUNT_BINARY | MOUNT_SYSTEM, 1 },
- { TESTSUITE_ROOT"\\lib", (char*)"/usr/lib", MOUNT_BINARY | MOUNT_SYSTEM, 1 },
- { ".", (char*)TESTSUITE_CYGDRIVE, MOUNT_BINARY | MOUNT_SYSTEM | MOUNT_CYGDRIVE, 1 },
- { NULL, (char*)NULL, 0, 0 }
-};
-
-
-/* Define the main set of tests. This is defined here instead of in
- testsuite.cc so that all test harness data is in one place and not
- spread over several files. */
-
-#elif defined(TESTSUITE_TESTS)
-#define NO_CWD "N/A"
-static test_t testsuite_tests[] = {
- { NO_CWD, "/file.ext", TESTSUITE_ROOT"\\file.ext" },
- { NO_CWD, "/dir/file.ext", TESTSUITE_ROOT"\\dir\\file.ext" },
- { NO_CWD, "/foo/dir/file.ext", TESTSUITE_ROOT"\\foo\\dir\\file.ext" },
- { NO_CWD, "/bin/file.ext", TESTSUITE_ROOT"\\bin\\file.ext" },
- { NO_CWD, "/bin/dir/file.ext", TESTSUITE_ROOT"\\bin\\dir\\file.ext" },
- { NO_CWD, "/lib/file.ext", TESTSUITE_ROOT"\\lib\\file.ext" },
- { NO_CWD, "/lib/dir/file.ext", TESTSUITE_ROOT"\\lib\\dir\\file.ext" },
- { NO_CWD, "/usr/bin/file.ext", TESTSUITE_ROOT"\\bin\\file.ext" },
- { NO_CWD, "/usr/bin/dir/file.ext", TESTSUITE_ROOT"\\bin\\dir\\file.ext" },
- { NO_CWD, "/usr/lib/file.ext", TESTSUITE_ROOT"\\lib\\file.ext" },
- { NO_CWD, "/usr/lib/dir/file.ext", TESTSUITE_ROOT"\\lib\\dir\\file.ext" },
- { NO_CWD, "/home/file.ext", TESTSUITE_ROOT"\\home\\file.ext" },
- { NO_CWD, "/home/foo/file.ext", TESTSUITE_ROOT"\\home\\foo\\file.ext" },
- { NO_CWD, "/home/foo/dir/file.ext", TESTSUITE_ROOT"\\home\\foo\\dir\\file.ext" },
- { NO_CWD, "/usr/file.ext", TESTSUITE_ROOT"\\usr\\file.ext" },
- { NO_CWD, "/usr/share/file.ext", TESTSUITE_ROOT"\\usr\\share\\file.ext" },
- { TESTSUITE_ROOT, "foo", TESTSUITE_ROOT"\\foo" },
- { TESTSUITE_ROOT, "./foo", TESTSUITE_ROOT"\\foo" },
- { TESTSUITE_ROOT, "foo/bar", TESTSUITE_ROOT"\\foo\\bar" },
- { TESTSUITE_ROOT, "./foo/bar", TESTSUITE_ROOT"\\foo\\bar" },
- { TESTSUITE_ROOT, "foo/./bar", TESTSUITE_ROOT"\\foo\\bar" },
- { TESTSUITE_ROOT, "./foo/./bar", TESTSUITE_ROOT"\\foo\\bar" },
- { TESTSUITE_ROOT, "bin/file.ext", TESTSUITE_ROOT"\\bin\\file.ext" },
- { TESTSUITE_ROOT, "lib/file.ext", TESTSUITE_ROOT"\\lib\\file.ext" },
- { TESTSUITE_ROOT, "usr/bin/file.ext", TESTSUITE_ROOT"\\bin\\file.ext" },
- { TESTSUITE_ROOT, "usr/lib/file.ext", TESTSUITE_ROOT"\\lib\\file.ext" },
- { TESTSUITE_ROOT, "etc/file.ext", TESTSUITE_ROOT"\\etc\\file.ext" },
- { TESTSUITE_ROOT, "etc/foo/file.ext", TESTSUITE_ROOT"\\etc\\foo\\file.ext" },
- { TESTSUITE_ROOT"\\bin", "foo", TESTSUITE_ROOT"\\bin\\foo" },
- { TESTSUITE_ROOT"\\bin", "./foo", TESTSUITE_ROOT"\\bin\\foo" },
- { TESTSUITE_ROOT"\\bin", "foo/bar", TESTSUITE_ROOT"\\bin\\foo\\bar" },
- { TESTSUITE_ROOT"\\bin", "./foo/bar", TESTSUITE_ROOT"\\bin\\foo\\bar" },
- { TESTSUITE_ROOT"\\bin", "foo/./bar", TESTSUITE_ROOT"\\bin\\foo\\bar" },
- { TESTSUITE_ROOT"\\bin", "./foo/./bar", TESTSUITE_ROOT"\\bin\\foo\\bar" },
- { TESTSUITE_ROOT"\\bin\\foo", "bar", TESTSUITE_ROOT"\\bin\\foo\\bar" },
- { TESTSUITE_ROOT"\\bin\\foo", "./bar", TESTSUITE_ROOT"\\bin\\foo\\bar" },
- { TESTSUITE_ROOT"\\bin\\foo", "bar/baz", TESTSUITE_ROOT"\\bin\\foo\\bar\\baz" },
- { TESTSUITE_ROOT"\\bin\\foo", "./bar/baz", TESTSUITE_ROOT"\\bin\\foo\\bar\\baz" },
- { TESTSUITE_ROOT"\\bin\\foo", "bar/./baz", TESTSUITE_ROOT"\\bin\\foo\\bar\\baz" },
- { TESTSUITE_ROOT"\\bin\\foo", "./bar/./baz", TESTSUITE_ROOT"\\bin\\foo\\bar\\baz" },
- { TESTSUITE_ROOT"\\tmp", "foo", TESTSUITE_ROOT"\\tmp\\foo" },
- { TESTSUITE_ROOT"\\tmp", "./foo", TESTSUITE_ROOT"\\tmp\\foo" },
- { TESTSUITE_ROOT"\\tmp", "foo/bar", TESTSUITE_ROOT"\\tmp\\foo\\bar" },
- { TESTSUITE_ROOT"\\tmp", "./foo/bar", TESTSUITE_ROOT"\\tmp\\foo\\bar" },
- { NO_CWD, "/otherdir/file.ext", "O:\\other\\file.ext" },
- { NO_CWD, "/otherdir/./file.ext", "O:\\other\\file.ext" },
- { NO_CWD, "/otherdir/foo/file.ext", "O:\\other\\foo\\file.ext" },
- { "O:\\other", "file.ext", "O:\\other\\file.ext" },
- { "O:\\other", "./file.ext", "O:\\other\\file.ext" },
- { "O:\\other", "foo/file.ext", "O:\\other\\foo\\file.ext" },
- { "O:\\other\\foo", "file.ext", "O:\\other\\foo\\file.ext" },
- { "O:\\other\\foo", "./file.ext", "O:\\other\\foo\\file.ext" },
- { "O:\\other\\foo", "bar/file.ext", "O:\\other\\foo\\bar\\file.ext" },
- { NO_CWD, "/somedir/file.ext", "S:\\some\\dir\\file.ext" },
- { NO_CWD, "/somedir/./file.ext", "S:\\some\\dir\\file.ext" },
- { NO_CWD, "/somedir/foo/file.ext", "S:\\some\\dir\\foo\\file.ext" },
- { "S:\\some\\dir", "file.ext", "S:\\some\\dir\\file.ext" },
- { "S:\\some\\dir", "./file.ext", "S:\\some\\dir\\file.ext" },
- { "S:\\some\\dir", "foo/file.ext", "S:\\some\\dir\\foo\\file.ext" },
- { "S:\\some\\dir\\foo", "file.ext", "S:\\some\\dir\\foo\\file.ext" },
- { "S:\\some\\dir\\foo", "./file.ext", "S:\\some\\dir\\foo\\file.ext" },
- { "S:\\some\\dir\\foo", "bar/file.ext", "S:\\some\\dir\\foo\\bar\\file.ext" },
- { NO_CWD, "//server/share/foo/bar", "\\\\server\\share\\foo\\bar" },
- { NO_CWD, NULL, NULL }
-};
-
-#else
-
-/* Redirect calls to GetCurrentDirectory() to the testsuite instead. */
-#ifdef GetCurrentDirectory
-#undef GetCurrentDirectory
-#endif
-#define GetCurrentDirectory testsuite_getcwd
-
-DWORD testsuite_getcwd (DWORD, LPSTR);
-
-#endif
-
-#endif /* TESTSUITE */
-
diff --git a/winsup/utils/umount.cc b/winsup/utils/umount.cc
deleted file mode 100644
index 5be116b..0000000
--- a/winsup/utils/umount.cc
+++ /dev/null
@@ -1,158 +0,0 @@
-/* umount.cc
-
- Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2008 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <stdio.h>
-#include <string.h>
-#include <sys/mount.h>
-#include <mntent.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <getopt.h>
-
-static void remove_all_user_mounts ();
-
-static const char version[] = "$Revision$";
-static const char *progname;
-
-struct option longopts[] =
-{
- {"help", no_argument, NULL, 'h' },
- {"remove-user-mounts", no_argument, NULL, 'U'},
- {"version", no_argument, NULL, 'v'},
- {NULL, 0, NULL, 0}
-};
-
-char opts[] = "hUv";
-
-static void
-usage (FILE *where = stderr)
-{
- fprintf (where, "\
-Usage: %s [OPTION] [<posixpath>]\n\
-Unmount filesystems\n\
-\n\
- -h, --help output usage information and exit\n\
- -U, --remove-user-mounts remove all user mounts\n\
- -v, --version output version information and exit\n\
-", progname);
- exit (where == stderr ? 1 : 0);
-}
-
-static void
-error (const char *path)
-{
- fprintf (stderr, "%s: %s: %s\n", progname, path, strerror (errno));
- exit (1);
-}
-
-static void
-print_version ()
-{
- const char *v = strchr (version, ':');
- int len;
- if (!v)
- {
- v = "?";
- len = 1;
- }
- else
- {
- v += 2;
- len = strchr (v, ' ') - v;
- }
- printf ("\
-%s (cygwin) %.*s\n\
-Filesystem Utility\n\
-Copyright 1996, 1998, 1999, 2000, 2001, 2002\n\
-Compiled on %s\n\
-", progname, len, v, __DATE__);
-}
-
-int
-main (int argc, char **argv)
-{
- int i;
- int flags = 0;
- int default_flag = MOUNT_SYSTEM;
- enum do_what
- {
- nada,
- saw_remove_all_user_mounts
- } do_what = nada;
-
- progname = strrchr (argv[0], '/');
- if (progname == NULL)
- progname = strrchr (argv[0], '\\');
- if (progname == NULL)
- progname = argv[0];
- else
- progname++;
-
- if (argc == 1)
- usage ();
-
- while ((i = getopt_long (argc, argv, opts, longopts, NULL)) != EOF)
- switch (i)
- {
- case 'h':
- usage (stdout);
- case 'U':
- if (do_what != nada)
- usage ();
- do_what = saw_remove_all_user_mounts;
- break;
- case 'v':
- print_version ();
- exit (0);
- default:
- usage ();
- }
-
- switch (do_what)
- {
- case saw_remove_all_user_mounts:
- if (optind != argc)
- usage ();
- remove_all_user_mounts ();
- break;
- default:
- if (optind != argc - 1)
- usage ();
- if (cygwin_umount (argv[optind], flags | default_flag) != 0)
- error (argv[optind]);
- }
-
- return 0;
-}
-
-/* remove_all_user_mounts: Unmount all user mounts. */
-static void
-remove_all_user_mounts ()
-{
- FILE *m = setmntent ("/-not-used-", "r");
- struct mntent *p;
-
- while ((p = getmntent (m)) != NULL)
- {
- /* Remove the mount if it's a user mount. */
- if (strncmp (p->mnt_type, "user", 4) == 0 &&
- strstr (p->mnt_opts, "noumount") == NULL)
- {
- if (cygwin_umount (p->mnt_dir, 0))
- error (p->mnt_dir);
-
- /* We've modified the table so we need to start over. */
- endmntent (m);
- m = setmntent ("/-not-used-", "r");
- }
- }
-
- endmntent (m);
-}
diff --git a/winsup/utils/utils.sgml b/winsup/utils/utils.sgml
deleted file mode 100644
index e71de7d..0000000
--- a/winsup/utils/utils.sgml
+++ /dev/null
@@ -1,1673 +0,0 @@
-<sect1 id="using-utils"><title>Cygwin Utilities</title>
-
-<para>Cygwin comes with a number of command-line utilities that are
-used to manage the UNIX emulation portion of the Cygwin environment.
-While many of these reflect their UNIX counterparts, each was written
-specifically for Cygwin. You may use the long or short option names
-interchangeably; for example, <literal>--help</literal> and
-<literal>-h</literal> function identically. All of the Cygwin
-command-line utilities support the <literal>--help</literal> and
-<literal>--version</literal> options.
-</para>
-
-<sect2 id="cygcheck"><title>cygcheck</title>
-
-<screen>
-Usage: cygcheck PROGRAM [ -v ] [ -h ]
- cygcheck -c [ PACKAGE ... ] [ -d ]
- cygcheck -s [ -r ] [ -v ] [ -h ]
- cygcheck -k
- cygcheck -f FILE [ FILE ... ]
- cygcheck -l [ PACKAGE ... ]
- cygcheck -p REGEXP
-List system information, check installed packages, or query package database.
-
-At least one command option or a PROGRAM is required, as shown above.
-
- PROGRAM list library (DLL) dependencies of PROGRAM
- -c, --check-setup show installed version of PACKAGE and verify integrity
- (or for all installed packages if none specified)
- -d, --dump-only just list packages, do not verify (with -c)
- -s, --sysinfo produce diagnostic system information (implies -c -d)
- -r, --registry also scan registry for Cygwin settings (with -s)
- -k, --keycheck perform a keyboard check session (must be run from a
- plain console only, not from a pty/rxvt/xterm)
- -f, --find-package find the package that FILE belongs to
- -l, --list-package list contents of PACKAGE (or all packages if none given)
- -p, --package-query search for REGEXP in the entire cygwin.com package
- repository (requies internet connectivity)
- -v, --verbose produce more verbose output
- -h, --help annotate output with explanatory comments when given
- with another command, otherwise print this help
- -V, --version print the version of cygcheck and exit
-
-Note: -c, -f, and -l only report on packages that are currently installed. To
- search all official Cygwin packages use -p instead. The -p REGEXP matches
- package names, descriptions, and names of files/paths within all packages.
-</screen>
-
-<para>
-The <command>cygcheck</command> program is a diagnostic utility for
-dealing with Cygwin programs. If you are familiar with
-<command>dpkg</command> or <command>rpm</command>,
-<command>cygcheck</command> is similar in many ways. (The major difference
-is that <command>setup.exe</command> handles installing and uninstalling
-packages; see <xref linkend="internet-setup"></xref> for more information.)
-</para>
-<para>
-The <literal>-c</literal> option checks the version and status of
-installed Cygwin packages. If you specify one or more package names,
-<command>cygcheck</command> will limit its output to those packages,
-or with no arguments it lists all packages. A package will be marked
-<literal>Incomplete</literal> if files originally installed are no longer
-present. The best thing to do in that situation is reinstall the package
-with <command>setup.exe</command>. To see which files are missing, use the
-<literal>-v</literal> option. If you do not need to know the status
-of each package and want <command>cygcheck</command> to run faster, add the
-<literal>-d</literal> option and <command>cygcheck</command> will only
-output the name and version for each package.
-</para>
-<para>
-If you list one or more programs on the command line,
-<command>cygcheck</command> will diagnose the runtime environment of that
-program or programs, providing the names of DLL files on which the program
-depends. If you specify the <literal>-s</literal> option,
-<command>cygcheck</command> will give general system information. If you
-list one or more programs on the command line and specify
-<literal>-s</literal>, <command>cygcheck</command> will report on
-both.</para>
-<para>
-The <literal>-f</literal> option helps you to track down which package a
-file came from, and <literal>-l</literal> lists all files in a package.
-For example, to find out about <filename>/usr/bin/less</filename> and its
-package:
-<example id="utils-cygcheck-ex"><title>Example <command>cygcheck</command> usage</title>
-<screen>
-$ cygcheck -f /usr/bin/less
-less-381-1
-
-$ cygcheck -l less
-/usr/bin/less.exe
-/usr/bin/lessecho.exe
-/usr/bin/lesskey.exe
-/usr/man/man1/less.1
-/usr/man/man1/lesskey.1
-</screen>
-</example>
-</para>
-
-<para>The <literal>-h</literal> option prints additional helpful
-messages in the report, at the beginning of each section. It also
-adds table column headings. While this is useful information, it also
-adds some to the size of the report, so if you want a compact report
-or if you know what everything is already, just leave this out.</para>
-
-<para>The <literal>-v</literal> option causes the output to be more
-verbose. What this means is that additional information will be
-reported which is usually not interesting, such as the internal
-version numbers of DLLs, additional information about recursive DLL
-usage, and if a file in one directory in the PATH also occurs in other
-directories on the PATH. </para>
-
-<para>The <literal>-r</literal> option causes
-<command>cygcheck</command> to search your registry for information
-that is relevent to Cygwin programs. These registry entries are the
-ones that have "Cygwin" in the name. If you are paranoid about
-privacy, you may remove information from this report, but please keep
-in mind that doing so makes it harder to diagnose your problems.</para>
-
-<para>In contrast to the other options that search the packages that are
-installed on your local system, the <literal>-p</literal> option can be used
-to search the entire official Cygwin package repository. It takes as argument
-a Perl-compatible regular expression which is used to match package names,
-package descriptions, and path/filenames of the contents of packages. This
-feature requires an active internet connection, since it must query the
-<literal>cygwin.com</literal> web site. In fact, it is equalivant to the
-search that is available on the <ulink url="http://cygwin.com/packages/">Cygwin
-package listing</ulink> page.</para>
-
-<para>For example, perhaps you are getting an error because you are missing a
-certain DLL and you want to know which package includes that file:
-<example id="utils-search-ex"><title>Searching all packages for a file</title>
-<screen>
-$ cygcheck -p 'cygintl-2\.dll'
-Found 1 matches for 'cygintl-2\.dll'.
-
-libintl2-0.12.1-3 GNU Internationalization runtime library
-
-$ cygcheck -p 'libexpat.*\.a'
-Found 2 matches for 'libexpat.*\.a'.
-
-expat-1.95.7-1 XML parser library written in C
-expat-1.95.8-1 XML parser library written in C
-
-$ cygcheck -p '/ls\.exe'
-Found 2 matches for '/ls\.exe'.
-
-coreutils-5.2.1-5 GNU core utilities (includes fileutils, sh-utils and textutils)
-coreutils-5.3.0-6 GNU core utilities (includes fileutils, sh-utils and textutils)
-</screen>
-</example>
-</para>
-
-<para>Note that this option takes a regular expression, not a glob or wildcard.
-This means that you need to use <literal>.*</literal> if you want something
-similar to the wildcard <literal>*</literal> commonly used in filename globbing.
-Similarly, to match the period character you should use <literal>\.</literal>
-since the <literal>.</literal> character in a regexp is a metacharacter that
-will match any character. Also be aware that the characters such as
-<literal>\</literal> and <literal>*</literal> are shell metacharacters, so
-they must be either escaped or quoted, as in the example above.</para>
-
-<para>The third example above illustrates that if you want to match a whole
-filename, you should include the <literal>/</literal> path seperator. In the
-given example this ensures that filenames that happen to end in
-<literal>ls.exe</literal> such as <literal>ncftpls.exe</literal> are not shown.
-Note that this use does not mean "look for packages with <literal>ls</literal>
-in the root directory," since the <literal>/</literal> can match anywhere in the
-path. It's just there to anchor the match so that it matches a full
-filename.</para>
-
-<para>By default the matching is case-sensitive. To get a case insensitive
-match, begin your regexp with <literal>(?i)</literal> which is a PCRE-specific
-feature. For complete documentation on Perl-compatible regular expression
-syntax and options, read the <command>perlre</command> manpage, or one of many
-websites such as <literal>perldoc.com</literal> that document the Perl
-language.</para>
-
-<para>The <command>cygcheck</command> program should be used to send
-information about your system for troubleshooting when requested.
-When asked to run this command save the output so that you can email it,
-for example:</para>
-
-<screen>
-<prompt>C:\cygwin&gt;</prompt> <userinput>cygcheck -s -v -r -h &gt; cygcheck_output.txt</userinput>
-</screen>
-
-</sect2>
-
-<sect2 id="cygpath"><title>cygpath</title>
-
-<screen>
-Usage: cygpath (-d|-m|-u|-w|-t TYPE) [-f FILE] [OPTION]... NAME...
- cygpath [-c HANDLE]
- cygpath [-ADHOPSW]
- cygpath [-F ID]
-Convert Unix and Windows format paths, or output system path information
-
-Output type options:
- -d, --dos print DOS (short) form of NAMEs (C:\PROGRA~1\)
- -m, --mixed like --windows, but with regular slashes (C:/WINNT)
- -M, --mode report on mode of file (currently binmode or textmode)
- -u, --unix (default) print Unix form of NAMEs (/cygdrive/c/winnt)
- -w, --windows print Windows form of NAMEs (C:\WINNT)
- -t, --type TYPE print TYPE form: 'dos', 'mixed', 'unix', or 'windows'
-Path conversion options:
- -a, --absolute output absolute path
- -l, --long-name print Windows long form of NAMEs (with -w, -m only)
- -p, --path NAME is a PATH list (i.e., '/bin:/usr/bin')
- -s, --short-name print DOS (short) form of NAMEs (with -w, -m only)
-System information:
- -A, --allusers use `All Users' instead of current user for -D, -P
- -D, --desktop output `Desktop' directory and exit
- -H, --homeroot output `Profiles' directory (home root) and exit
- -O, --mydocs output `My Documents' directory and exit
- -P, --smprograms output Start Menu `Programs' directory and exit
- -S, --sysdir output system directory and exit
- -W, --windir output `Windows' directory and exit
- -F, --folder ID output special folder with numeric ID and exit
-Other options:
- -f, --file FILE read FILE for input; use - to read from STDIN
- -o, --option read options from FILE as well (for use with --file)
- -c, --close HANDLE close HANDLE (for use in captured process)
- -i, --ignore ignore missing argument
- -h, --help output usage information and exit
- -v, --version output version information and exit
-</screen>
-
-<para>The <command>cygpath</command> program is a utility that
-converts Windows native filenames to Cygwin POSIX-style pathnames and
-vice versa. It can be used when a Cygwin program needs to pass a file
-name to a native Windows program, or expects to get a file name from a
-native Windows program. Alternatively, <command>cygpath</command> can
-output information about the location of important system directories
-in either format.
-</para>
-
-<para>The <literal>-u</literal> and <literal>-w</literal> options
-indicate whether you want a conversion to UNIX (POSIX) format
-(<literal>-u</literal>) or to Windows format (<literal>-w</literal>).
-Use the <literal>-d</literal> to get DOS-style (8.3) file and path names.
-The <literal>-m</literal> option will output Windows-style format
-but with forward slashes instead of backslashes. This option is
-especially useful in shell scripts, which use backslashes as an escape
-character.</para>
-
-<para> In combination with the <literal>-w</literal> option, you can use
-the <literal>-l</literal> and <literal>-s</literal> options to use normal
-(long) or DOS-style (short) form. The <literal>-d</literal> option is
-identical to <literal>-w</literal> and <literal>-s</literal> together.
-</para>
-
-<para>The <literal>-p</literal> option means that you want to convert
-a path-style string rather than a single filename. For example, the
-PATH environment variable is semicolon-delimited in Windows, but
-colon-delimited in UNIX. By giving <literal>-p</literal> you are
-instructing <command>cygpath</command> to convert between these
-formats.</para>
-
-<para>The <literal>-i</literal> option supresses the print out of the
-usage message if no filename argument was given. It can be used in
-make file rules converting variables that may be omitted
-to a proper format. Note that <command>cygpath</command> output may
-contain spaces (C:\Program Files) so should be enclosed in quotes.
-</para>
-
-
-<example id="utils-cygpath-ex"><title>Example <command>cygpath</command> usage</title>
-<screen>
-<![CDATA[
-#!/bin/sh
-if [ "${1}" = "" ];
- then
- XPATH=".";
- else
- XPATH="$(cygpath -w "${1}")";
-fi
-explorer $XPATH &
-]]>
-</screen>
-</example>
-
-<para>The capital options
-<literal>-D</literal>, <literal>-H</literal>, <literal>-P</literal>,
-<literal>-S</literal>, and <literal>-W</literal> output directories used
-by Windows that are not the same on all systems, for example
-<literal>-S</literal> might output C:\WINNT\system32 or C:\Windows\System32.
-The <literal>-H</literal> shows the Windows profiles directory that can
-be used as root of home. The <literal>-A</literal> option forces use of
-the "All Users" directories instead of the current user for the
-<literal>-D</literal>, <literal>-O</literal> and <literal>-P</literal>
-options.
-The <literal>-F</literal> outputs other special folders specified by
-their internal numeric code (decimal or 0xhex). For valid codes and
-symbolic names, see the CSIDL_* definitions in the include file
-/usr/include/w32api/shlobj.h from package w32api. The current valid
-range of codes for folders is 0 (Desktop) to 59 (CDBurn area).
-By default the output is in UNIX (POSIX) format;
-use the <literal>-w</literal> or <literal>-d</literal> options to get
-other formats.</para>
-
-</sect2>
-
-<sect2 id="dumper"><title>dumper</title>
-
-<screen>
-Usage: dumper [OPTION] FILENAME WIN32PID
-Dump core from WIN32PID to FILENAME.core
-
--d, --verbose be verbose while dumping
--h, --help output help information and exit
--q, --quiet be quiet while dumping (default)
--v, --version output version information and exit
-</screen>
-
-<para>The <command>dumper</command> utility can be used to create a
-core dump of running Windows process. This core dump can be later loaded
-to <command>gdb</command> and analyzed. One common way to use
-<command>dumper</command> is to plug it into cygwin's Just-In-Time
-debugging facility by adding
-
-<screen>
-error_start=x:\path\to\dumper.exe
-</screen>
-
-to the <emphasis>CYGWIN</emphasis> environment variable. Please note that
-<literal>x:\path\to\dumper.exe</literal> is Windows-style and not cygwin
-path. If <literal>error_start</literal> is set this way, then dumper will
-be started whenever some program encounters a fatal error.
-</para>
-
-<para>
-<command>dumper</command> can be also be started from the command line to
-create a core dump of any running process. Unfortunately, because of a Windows
-API limitation, when a core dump is created and <command>dumper</command>
-exits, the target process is terminated too.
-</para>
-
-<para>
-To save space in the core dump, <command>dumper</command> doesn't write those
-portions of target process' memory space that are loaded from executable and
-dll files and are unchangeable, such as program code and debug info. Instead,
-<command>dumper</command> saves paths to files which contain that data. When a
-core dump is loaded into gdb, it uses these paths to load appropriate files.
-That means that if you create a core dump on one machine and try to debug it on
-another, you'll need to place identical copies of the executable and dlls in
-the same directories as on the machine where the core dump was created.
-</para>
-
-</sect2>
-
-<sect2 id="getfacl"><title>getfacl</title>
-
-<screen>
-Usage: getfacl [-adn] FILE [FILE2...]
-Display file and directory access control lists (ACLs).
-
- -a, --all display the filename, the owner, the group, and
- the ACL of the file
- -d, --dir display the filename, the owner, the group, and
- the default ACL of the directory, if it exists
- -h, --help output usage information and exit
- -n, --noname display user and group IDs instead of names
- -v, --version output version information and exit
-
-When multiple files are specified on the command line, a blank
-line separates the ACLs for each file.
-</screen>
-
-<para>
-For each argument that is a regular file, special file or
-directory, <command>getfacl</command> displays the owner, the group, and the
-ACL. For directories <command>getfacl</command> displays additionally the
-default ACL. With no options specified, <command>getfacl</command> displays
-the filename, the owner, the group, and both the ACL and the default ACL, if
-it exists. For more information on Cygwin and Windows ACLs, see
-see <xref linkend="ntsec"></xref> in the Cygwin User's Guide.
-The format for ACL output is as follows:
-<screen>
- # file: filename
- # owner: name or uid
- # group: name or uid
- user::perm
- user:name or uid:perm
- group::perm
- group:name or gid:perm
- mask:perm
- other:perm
- default:user::perm
- default:user:name or uid:perm
- default:group::perm
- default:group:name or gid:perm
- default:mask:perm
- default:other:perm
-</screen>
-</para>
-</sect2>
-
-<sect2 id="kill"><title>kill</title>
-
-<screen>
-Usage: kill [-f] [-signal] [-s signal] pid1 [pid2 ...]
- kill -l [signal]
-Send signals to processes
-
- -f, --force force, using win32 interface if necessary
- -l, --list print a list of signal names
- -s, --signal send signal (use kill --list for a list)
- -h, --help output usage information and exit
- -v, --version output version information and exit
-</screen>
-
-<para>The <command>kill</command> program allows you to send arbitrary
-signals to other Cygwin programs. The usual purpose is to end a
-running program from some other window when ^C won't work, but you can
-also send program-specified signals such as SIGUSR1 to trigger actions
-within the program, like enabling debugging or re-opening log files.
-Each program defines the signals they understand.</para>
-
-<para>You may need to specify the full path to use <command>kill</command>
-from within some shells, including <command>bash</command>, the default Cygwin
-shell. This is because <command>bash</command> defines a
-<command>kill</command> builtin function; see the <command>bash</command>
-man page under <emphasis>BUILTIN COMMANDS</emphasis> for more information.
-To make sure you are using the Cygwin version, try
-
-<screen>
-$ /bin/kill --version
-</screen>
-
-which should give the Cygwin <command>kill</command> version number and
-copyright information.
-</para>
-
-<para>Unless you specific the <literal>-f</literal> option, the "pid" values
-used by <command>kill</command> are the Cygwin pids, not the Windows pids.
-To get a list of running programs and their Cygwin pids, use the Cygwin
-<command>ps</command> program. <command>ps -W</command> will display
-<emphasis>all</emphasis> windows pids.</para>
-
-<para>The <command>kill -l</command> option prints the name of the
-given signal, or a list of all signal names if no signal is given.</para>
-
-<para>To send a specific signal, use the <literal>-signN</literal>
-option, either with a signal number or a signal name (minus the "SIG"
-part), like these examples:</para>
-
-<example id="utils-kill-ex"><title>Using the kill command</title>
-<screen>
-<prompt>$</prompt> <userinput>kill 123</userinput>
-<prompt>$</prompt> <userinput>kill -1 123</userinput>
-<prompt>$</prompt> <userinput>kill -HUP 123</userinput>
-<prompt>$</prompt> <userinput>kill -f 123</userinput>
-</screen>
-</example>
-
-<para>Here is a list of available signals, their numbers, and some
-commentary on them, from the file
-<literal>&lt;sys/signal.h&gt;</literal>, which should be considered
-the official source of this information.</para>
-
-<screen>
-SIGHUP 1 hangup
-SIGINT 2 interrupt
-SIGQUIT 3 quit
-SIGILL 4 illegal instruction (not reset when caught)
-SIGTRAP 5 trace trap (not reset when caught)
-SIGABRT 6 used by abort
-SIGEMT 7 EMT instruction
-SIGFPE 8 floating point exception
-SIGKILL 9 kill (cannot be caught or ignored)
-SIGBUS 10 bus error
-SIGSEGV 11 segmentation violation
-SIGSYS 12 bad argument to system call
-SIGPIPE 13 write on a pipe with no one to read it
-SIGALRM 14 alarm clock
-SIGTERM 15 software termination signal from kill
-SIGURG 16 urgent condition on IO channel
-SIGSTOP 17 sendable stop signal not from tty
-SIGTSTP 18 stop signal from tty
-SIGCONT 19 continue a stopped process
-SIGCHLD 20 to parent on child stop or exit
-SIGTTIN 21 to readers pgrp upon background tty read
-SIGTTOU 22 like TTIN for output if (tp-&gt;t_local&amp;LTOSTOP)
-SIGPOLL 23 System V name for SIGIO
-SIGXCPU 24 exceeded CPU time limit
-SIGXFSZ 25 exceeded file size limit
-SIGVTALRM 26 virtual time alarm
-SIGPROF 27 profiling time alarm
-SIGWINCH 28 window changed
-SIGLOST 29 resource lost (eg, record-lock lost)
-SIGUSR1 30 user defined signal 1
-SIGUSR2 31 user defined signal 2
-</screen>
-
-</sect2>
-
-<sect2 id="mkgroup"><title>mkgroup</title>
-
-<screen>
-Usage: mkgroup [OPTION]...
-Print /etc/group file to stdout
-
-Options:
- -l,--local [machine[,offset]]
- print local groups with gid offset offset
- (from local machine if no machine specified)
- -L,--Local [machine[,offset]]
- ditto, but generate groupname with machine prefix
- -d,--domain [domain[,offset]]
- print domain groups with gid offset offset
- (from current domain if no domain specified)
- -D,--Domain [domain[,offset]]
- ditto, but generate groupname with machine prefix
- -c,--current print current group
- -C,--Current ditto, but generate groupname with machine or
- domain prefix
- -S,--separator char for -L, -D, -C use character char as domain\group
- separator in groupname instead of the default '\'
- -o,--id-offset offset change the default offset (10000) added to gids
- in domain or foreign server accounts.
- -g,--group groupname only return information for the specified group
- one of -l, -L, -d, -D must be specified, too
- -b,--no-builtin don't print BUILTIN groups
- -U,--unix grouplist additionally print UNIX groups when using -l or -L
- on a UNIX Samba server
- grouplist is a comma-separated list of groupnames
- or gid ranges (root,-25,50-100).
- (enumerating large ranges can take a long time!)
- -s,--no-sids (ignored)
- -u,--users (ignored)
- -h,--help print this message
- -v,--version print version information and exit
-
-Default is to print local groups on stand-alone machines, plus domain
-groups on domain controllers and domain member machines.
-</screen>
-
-<para>The <command>mkgroup</command> program can be used to help
-configure Cygwin by creating a <filename>/etc/group</filename>
-file. Its use is essential to include Windows security information.</para>
-
-<para>The command is initially called by <command>setup.exe</command> to
-create a default <filename>/etc/group</filename>. This should be
-sufficient in most circumstances. However, especially when working
-in a multi-domain environment, you can use <command>mkgroup</command>
-manually to create a more complete <filename>/etc/group</filename> file for
-all domains. Especially when you have the same group name used on
-multiple machines or in multiple domains, you can use the <literal>-D</literal>,
-<literal>-L</literal> and <literal>-C</literal> options to create unique
-domain\group style groupnames.</para>
-
-<para>Note that this information is static. If you change the group
-information in your system, you'll need to regenerate the group file
-for it to have the new information.</para>
-
-<para>The <literal>-d/-D</literal> and <literal>-l/-L</literal> options
-allow you to specify where the information comes from, the
-local SAM of a machine or from the domain, or both.
-With the <literal>-d/-D</literal> options the program contacts a Domain
-Controller, which my be unreachable or have restricted access.
-Comma-separated from the machine or domain, you can specify an offset
-which is used as base added to the group's RID to compute the gid
-(offset + RID = gid). This allows to create the same gids every time you
-re-run <command>mkgroup</command>.
-For very simple needs, an entry for the current user's group can be
-created by using the option <literal>-c</literal> or <literal>-C</literal>.
-If you want to use one of the <literal>-D</literal>, <literal>-L</literal>
-or <literal>-C</literal> options, but you don't like the backslash as
-domain/group separator, you can specify another separator using the
-<literal>-S</literal> option, for instance</para>
-
-<example id="utils-mkgroup-ex"><title>Setting up group entry for current user with different domain/group separator</title>
-<screen>
-<prompt>$</prompt> <userinput>mkgroup -C -S+ &gt; /etc/group</userinput>
-<prompt>$</prompt> <userinput>cat /etc/group</userinput>
-DOMAIN+my_group:S-1-5-21-2913048732-1697188782-3448811101-1144:11144:
-</screen>
-</example>
-
-<para>The <literal>-o</literal> option allows for special cases
-(such as multiple domains) where the GIDs might match otherwise.
-The <literal>-g</literal> option only prints the information for one group.
-The <literal>-U</literal> option allows to enumerate the standard UNIX
-groups on a Samba machine. It's used together with
-<literal>-l samba-server</literal> or <literal>-L samba-server</literal>.
-The normal UNIX groups are usually not enumerated, but they can show
-up as group in <command>ls -l</command> output.
-</para>
-
-</sect2>
-
-<sect2 id="mkpasswd"><title>mkpasswd</title>
-
-<screen>
-Usage: mkpasswd [OPTIONS]...
-Print /etc/passwd file to stdout
-
-Options:
- -l,--local [machine[,offset]]
- print local user accounts with uid offset offset
- (from local machine if no machine specified)
- -L,--Local [machine[,offset]]
- ditto, but generate username with machine prefix
- -d,--domain [domain[,offset]]
- print domain accounts with uid offset offset
- (from current domain if no domain specified)
- -D,--Domain [domain[,offset]]
- ditto, but generate username with domain prefix
- -c,--current print current user
- -C,--Current ditto, but generate username with machine or
- domain prefix
- -S,--separator char for -L, -D, -C use character char as domain\user
- separator in username instead of the default '\'
- -o,--id-offset offset change the default offset (10000) added to uids
- in domain or foreign server accounts.
- -u,--username username only return information for the specified user
- one of -l, -L, -d, -D must be specified, too
- -p,--path-to-home path use specified path instead of user account home dir
- or /home prefix
- -m,--no-mount don't use mount points for home dir
- -U,--unix userlist additionally print UNIX users when using -l or -L\
- on a UNIX Samba server
- userlist is a comma-separated list of usernames
- or uid ranges (root,-25,50-100).
- (enumerating large ranges can take a long time!)
- -s,--no-sids (ignored)
- -g,--local-groups (ignored)
- -h,--help displays this message
- -v,--version version information and exit
-
-Default is to print local accounts on stand-alone machines, domain accounts
-on domain controllers and domain member machines.
-</screen>
-
-<para>The <command>mkpasswd</command> program can be used to help
-configure Cygwin by creating a <filename>/etc/passwd</filename> from
-your system information.
-Its use is essential to include Windows security information. However,
-the actual passwords are determined by Windows, not by the content of
-<filename>/etc/passwd</filename>.</para>
-
-<para>The command is initially called by <command>setup.exe</command> to
-create a default <filename>/etc/passwd</filename>. This should be
-sufficient in most circumstances. However, especially when working
-in a multi-domain environment, you can use <command>mkpasswd</command>
-manually to create a more complete <filename>/etc/passwd</filename> file for
-all domains. Especially when you have the same user name used on
-multiple machines or in multiple domains, you can use the <literal>-D</literal>,
-<literal>-L</literal> and <literal>-C</literal> options to create unique
-domain\user style usernames.</para>
-
-<para>Note that this information is static. If you change the user
-information in your system, you'll need to regenerate the passwd file
-for it to have the new information.</para>
-
-<para>The <literal>-d/-D</literal> and <literal>-l/-L</literal> options
-allow you to specify where the information comes from, the
-local machine or the domain (default or given), or both.
-With the <literal>-d/-D</literal> options the program contacts the Domain
-Controller, which may be unreachable or have restricted access.
-Comma-separated from the machine or domain, you can specify an offset
-which is used as base added to the user's RID to compute the uid
-(offset + RID = uid). This allows to create the same uids every time you
-re-run <command>mkpasswd</command>.
-An entry for the current user can be created by using the
-option <literal>-c</literal> or <literal>-C</literal>.
-If you want to use one of the <literal>-D</literal>, <literal>-L</literal>
-or <literal>-C</literal> options, but you don't like the backslash as
-domain/group separator, you can specify another separator using the
-<literal>-S</literal> option, simialar to the <command>mkgroup</command>.
-The <literal>-o</literal> option allows for special cases
-(such as multiple domains) where the UIDs might match otherwise.
-The <literal>-m</literal> option bypasses the current
-mount table so that, for example, two users who have a Windows home
-directory of H: could mount them differently. For more information on
-SIDs, see <xref linkend="ntsec"></xref> in the Cygwin User's Guide. The
-<literal>-p</literal> option causes <command>mkpasswd</command> to
-use the specified prefix instead of the account home dir or <literal>/home/
-</literal>. For example, this command:
-
-<example id="utils-althome-ex"><title>Using an alternate home root</title>
-<screen>
-<prompt>$</prompt> <userinput>mkpasswd -l -p "$(cygpath -H)" &gt; /etc/passwd</userinput>
-</screen>
-</example>
-
-would put local users' home directories in the Windows 'Profiles' directory.
-The <literal>-u</literal> option creates just an entry for
-the specified user.
-The <literal>-U</literal> option allows to enumerate the standard UNIX
-users on a Samba machine. It's used together with
-<literal>-l samba-server</literal> or <literal>-L samba-server</literal>.
-The normal UNIX users are usually not enumerated, but they can show
-up as file owners in <command>ls -l</command> output.
-</para>
-
-</sect2>
-
-<sect2 id="mount"><title>mount</title>
-
-<screen>
-Usage: mount [OPTION] [&lt;win32path&gt; &lt;posixpath&gt;]
-Display information about mounted filesystems, or mount a filesystem
-
- -c, --change-cygdrive-prefix change the cygdrive path prefix to &lt;posixpath&gt;
- -f, --force force mount, don't warn about missing mount
- point directories
- -h, --help output usage information and exit
- -m, --mount-entries write fstab entries to replicate mount points
- and cygdrive prefixes
- -o, --options X[,X...] specify mount options
- -p, --show-cygdrive-prefix show user and/or system cygdrive path prefix
- -v, --version output version information and exit
-</screen>
-
-<para>The <command>mount</command> program is used to map your drives
-and shares onto Cygwin's simulated POSIX directory tree, much like as is
-done by mount commands on typical UNIX systems. However, in contrast to
-mount points given in <filename>/etc/fstab</filename>, mount points
-created or changed with <command>mount</command> are not persistent. They
-disappear immediately after the last process of the current user exited.
-Please see <xref linkend="mount-table"></xref> for more information on the
-concepts behind the Cygwin POSIX file system and strategies for using
-mounts. To remove mounts temporarily, use <command>umount</command></para>
-
-<sect3 id="utils-mount"><title>Using mount</title>
-
-<para>If you just type <command>mount</command> with no parameters, it
-will display the current mount table for you.</para>
-
-<example id="utils-mount-ex">
-<title>Displaying the current set of mount points</title>
-<screen>
-<prompt>c:\cygwin\&gt;</prompt> <userinput>mount</userinput>
-c:\cygwin\bin on /usr/bin type ntfs (binary)
-c:\cygwin\lib on /usr/lib type ntfs (binary)
-c:\cygwin on / type ntfs (binary)
-c: on /c type ntfs (binary,user,noumount)
-d: on /d type fat (binary,user,noumount)
-</screen>
-</example>
-
-<para>In this example, c:\cygwin is the POSIX root and D drive is mapped to
-<filename>/d</filename>. Note that in this case, the root mount is a
-system-wide mount point that is visible to all users running Cygwin
-programs, whereas the <filename>/d</filename> mount is only visible
-to the current user.</para>
-
-<para>The <command>mount</command> utility is also the mechanism for
-adding new mounts to the mount table. The following example
-demonstrates how to mount the directory
-<filename>//pollux/home/joe/data</filename> to <filename>/data</filename>
-for the duration of the current session.
-</para>
-
-<example id="utils-mount-add-ex">
-<title>Adding mount points</title>
-<screen>
-<prompt>c:\cygwin\&gt;</prompt> <userinput>ls /data</userinput>
-ls: /data: No such file or directory
-<prompt>c:\cygwin\&gt;</prompt> <userinput>mount //pollux/home/joe/data /data</userinput>
-mount: warning - /data does not exist!
-<prompt>c:\cygwin\&gt;</prompt> <userinput>mount</userinput>
-//pollux/home/joe/data on /data type smbfs (binary)
-c:/cygwin/bin on /usr/bin type ntfs (binary)
-c:/cygwin/lib on /usr/lib type ntfs (binary)
-c:/cygwin on / type ntfs (binary)
-c: on /c type ntfs (binary,user,noumount)
-d: on /d type fat (binary,user,noumount)
-</screen>
-</example>
-
-<para>A given POSIX path may only exist once in the mount table. Attempts to
-replace the mount will fail with a busy error. The <literal>-f</literal>
-(force) option causes the old mount to be silently replaced with the new one,
-provided the old mount point was a user mount point. It's not valid to
-replace system-wide mount points. Additionally, the <literal>-f</literal>
-option will silence warnings about the non-existence of directories at the
-Win32 path location.</para>
-
-<para>
-The <literal>-o</literal> option is the method via which various options about
-the mount point may be recorded. The following options are available (note that
-most of the options are duplicates of other mount flags):</para>
-
-<screen>
- acl - Use the filesystem's access control lists (ACLs) to
- implement real POSIX permissions (default).
- noacl - Ignore ACLs and fake POSIX permissions.
- binary - Files default to binary mode (default).
- text - Files default to CRLF text mode line endings.
- exec - Treat all files below mount point as executable.
- notexec - Treat all files below mount point as not executable.
- cygexec - Treat all files below mount point as cygwin executables.
- nosuid - No suid files are allowed (currently unimplemented)
- posix=0 - Switch off case sensitivity for paths under this mount point.
- posix=1 - Switch on case sensitivity for paths under this mount point
- (default).
-</screen>
-
-<para>For a more complete description of the mount options and the
-<filename>/etc/fstab</filename> file, see
-<xref linkend="mount-table"></xref>.</para>
-
-<para>Note that all mount points added with <command>mount</command> are
-user mount points. System mount points can only be specified in
-the <filename>/etc/fstab</filename> file.</para>
-
-<para>
-The <literal>-m</literal> option causes the <command>mount</command> utility
-to output the current mount table in a series of fstab entries. This allows
-You can save this output as a backup when experimenting with the mount table.
-Copy the output to <filename>/etc/fstab</filename> to restore the old state.
-It also makes moving your settings to a different machine much easier.</para>
-
-</sect3>
-
-<sect3 id="utils-cygdrive"><title>Cygdrive mount points</title>
-
-<para>Whenever Cygwin cannot use any of the existing mounts to convert
-from a particular Win32 path to a POSIX one, Cygwin will, instead,
-convert to a POSIX path using a default mount point:
-<filename>/cygdrive</filename>. For example, if Cygwin accesses
-<filename>z:\foo</filename> and the z drive is not currently in the
-mount table, then <filename>z:\</filename> will be accessible as
-<filename>/cygdrive/z</filename>. The <command>mount</command> utility
-can be used to change this default automount prefix through the use of the
-"--change-cygdrive-prefix" option. In the following example, we will
-set the automount prefix to <filename>/</filename>:</para>
-
-<example id="utils-cygdrive-ex">
-<title>Changing the default prefix</title>
-<screen>
-<prompt>c:\cygwin\&gt;</prompt> <userinput>mount --change-cygdrive-prefix /</userinput>
-</screen>
-</example>
-
-<para>Note that the cygdrive prefix can be set both per-user and system-wide,
-and that as with all mounts, a user-specific mount takes precedence over the
-system-wide setting. The <command>mount</command> utility creates system-wide
-mounts by default if you do not specify a type. Use the <literal>-s</literal>
-or <literal>-u</literal> flag to indicate a system or user mount, respectively.
-You can always see the user and system cygdrive prefixes with the
-<literal>-p</literal> option. Using the <literal>-b</literal>
-flag with <literal>--change-cygdrive-prefix</literal> makes all new
-automounted filesystems default to binary mode file accesses.</para>
-
-</sect3>
-
-<sect3 id="utils-limitations"><title>Limitations</title>
-
-<para>Limitations: there is a hard-coded limit of 30 mount
-points. Also, although you can mount to pathnames that do not start
-with "/", there is no way to make use of such mount points.</para>
-
-<para>Normally the POSIX mount point in Cygwin is an existing empty
-directory, as in standard UNIX. If this is the case, or if there is a
-place-holder for the mount point (such as a file, a symbolic link
-pointing anywhere, or a non-empty directory), you will get the expected
-behavior. Files present in a mount point directory before the mount
-become invisible to Cygwin programs.
-</para>
-
-<para>It is sometimes desirable to mount to a non-existent directory,
-for example to avoid cluttering the root directory with names
-such as
-<filename>a</filename>, <filename>b</filename>, <filename>c</filename>
-pointing to disks.
-Although <command>mount</command> will give you a warning, most
-everything will work properly when you refer to the mount point
-explicitly. Some strange effects can occur however.
-For example if your current working directory is
-<filename>/dir</filename>,
-say, and <filename>/dir/mtpt</filename> is a mount point, then
-<filename>mtpt</filename> will not show up in an <command>ls</command>
-or
-<command>echo *</command> command and <command>find .</command> will
-not
-find <filename>mtpt</filename>.
-</para>
-
-</sect3>
-
-</sect2>
-
-<sect2 id="passwd"><title>passwd</title>
-
-<screen>
-Usage: passwd [OPTION] [USER]
-Change USER's password or password attributes.
-
-User operations:
- -l, --lock lock USER's account.
- -u, --unlock unlock USER's account.
- -c, --cannot-change USER can't change password.
- -C, --can-change USER can change password.
- -e, --never-expires USER's password never expires.
- -E, --expires USER's password expires according to system's
- password aging rule.
- -p, --pwd-not-required no password required for USER.
- -P, --pwd-required password is required for USER.
- -R, --reg-store-pwd enter password to store it in the registry for
- later usage by services to be able to switch
- to this user context with network credentials.
-
-System operations:
- -i, --inactive NUM set NUM of days before inactive accounts are disabled
- (inactive accounts are those with expired passwords).
- -n, --minage DAYS set system minimum password age to DAYS days.
- -x, --maxage DAYS set system maximum password age to DAYS days.
- -L, --length LEN set system minimum password length to LEN.
-
-Other options:
- -S, --status display password status for USER (locked, expired,
- etc.) plus global system password settings.
- -h, --help output usage information and exit.
- -v, --version output version information and exit.
-
-If no option is given, change USER's password. If no user name is given,
-operate on current user. System operations must not be mixed with user
-operations. Don't specify a USER when triggering a system operation.
-
-Don't specify a user or any other option together with the -R option.
-Non-Admin users can only store their password if cygserver is running and
-the CYGWIN environment variable is set to contain the word 'server'.
-Note that storing even obfuscated passwords in the registry is not overly
-secure. Use this feature only if the machine is adequately locked down.
-Don't use this feature if you don't need network access within a remote
-session. You can delete your stored password by using `passwd -R' and
-specifying an empty password.
-</screen>
-
-<para> <command>passwd</command> changes passwords for user accounts.
-A normal user may only change the password for their own account,
-but administrators may change passwords on any account.
-<command>passwd</command> also changes account information, such as
-password expiry dates and intervals.</para>
-
-<para>For password changes, the user is first prompted for their old
-password, if one is present. This password is then encrypted and
-compared against the stored password. The user has only one chance to
-enter the correct password. The administrators are permitted to
-bypass this step so that forgotten passwords may be changed.</para>
-
-<para>The user is then prompted for a replacement password.
-<command>passwd</command> will prompt twice for this replacement and
-compare the second entry against the first. Both entries are required to
-match in order for the password to be changed.</para>
-
-<para>After the password has been entered, password aging information
-is checked to see if the user is permitted to change their password
-at this time. If not, <command>passwd</command> refuses to change the
-password and exits.</para>
-
-<para>
-To get current password status information, use the
-<literal>-S</literal> option. Administrators can use
-<command>passwd</command> to perform several account maintenance
-functions (users may perform some of these functions on their own
-accounts). Accounts may be locked with the <literal>-l</literal> flag
-and unlocked with the <literal>-u</literal> flag. Similarly,
-<literal>-c</literal> disables a user's ability to change passwords, and
-<literal>-C</literal> allows a user to change passwords. For password
-expiry, the <literal>-e</literal> option disables expiration, while the
-<literal>-E</literal> option causes the password to expire according to
-the system's normal aging rules. Use <literal>-p</literal> to disable
-the password requirement for a user, or <literal>-P</literal> to require
-a password.
-</para>
-
-<para>Administrators can also use <command>passwd</command> to change
-system-wide password expiry and length requirements with the
-<literal>-i</literal>, <literal>-n</literal>, <literal>-x</literal>,
-and <literal>-L</literal> options. The <literal>-i</literal>
-option is used to disable an account after the password has been expired
-for a number of days. After a user account has had an expired password
-for <emphasis>NUM</emphasis> days, the user may no longer sign on to
-the account. The <literal>-n</literal> option is
-used to set the minimum number of days before a password may be changed.
-The user will not be permitted to change the password until
-<emphasis>MINDAYS</emphasis> days have elapsed. The
-<literal>-x</literal> option is used to set the maximum number of days
-a password remains valid. After <emphasis>MAXDAYS</emphasis> days, the
-password is required to be changed. Allowed values for the above options
-are 0 to 999. The <literal>-L</literal> option sets the minimum length of
-allowed passwords for users who don't belong to the administrators group
-to <emphasis>LEN</emphasis> characters. Allowed values for the minimum
-password length are 0 to 14. In any of the above cases, a value of 0
-means `no restrictions'.</para>
-
-<para>Users can use the <command>passwd -R</command> to enter
-a password which then gets stored in a special area of the registry,
-which is also used by Windows to store passwords of accounts running
-Windows services. When a privileged Cygwin application calls the
-<command>set{e}uid(user_id)</command> system call, Cygwin checks if a
-password for that user has been stored in this registry area. If so, it
-uses this password to switch to this user account using that password.
-This allows to logon through, for instance, <command>ssh</command> with
-public key authentication and to get a full qualified user token with
-all credentials for network access. However, the method has some
-drawbacks security-wise. This is explained in more detail in the
-<xref linkend="ntsec"></xref> section.</para>
-
-<para>Please note that storing password in that registry area is a
-privileged operation which only administrative accounts are allowed to
-do. If normal, non-admin users should be allowed to enter their
-passwords using <command>passwd -R</command>, it's required to run
-<command>cygserver</command> as a service under the LocalSystem account
-and the environment variable CYGWIN
-(see <xref linkend="using-cygwinenv"></xref>)
-must be set to contain the "server" setting before running
-<command>passwd -R</command>. This only affects storing passwords.
-Using passwords in privileged processes does not require
-<command>cygserver</command> to run.</para>
-
-<para>Limitations: Users may not be able to change their password on
-some systems.</para>
-
-</sect2>
-
-<sect2 id="ps"><title>ps</title>
-
-<screen>
-Usage: ps [-aefls] [-u UID]
-Report process status
-
- -a, --all show processes of all users
- -e, --everyone show processes of all users
- -f, --full show process uids, ppids
- -h, --help output usage information and exit
- -l, --long show process uids, ppids, pgids, winpids
- -p, --process show information for specified PID
- -s, --summary show process summary
- -u, --user list processes owned by UID
- -v, --version output version information and exit
- -W, --windows show windows as well as cygwin processes
-With no options, ps outputs the long format by default
-</screen>
-
-<para>The <command>ps</command> program gives the status of all the
-Cygwin processes running on the system (ps = "process status"). Due
-to the limitations of simulating a POSIX environment under Windows,
-there is little information to give.
-</para>
-
-<para>
-The PID column is the process ID you need to give to the
-<command>kill</command> command. The PPID is the parent process ID,
-and PGID is the process group ID. The WINPID column is the process
-ID displayed by NT's Task Manager program. The TTY column gives which
-pseudo-terminal a process is running on, or a <literal>'?'</literal>
-for services. The UID column shows which user owns each process.
-STIME is the time the process was started, and COMMAND gives the name
-of the program running. Listings may also have a status flag in
-column zero; <literal>S</literal> means stopped or suspended (in other
-words, in the background), <literal>I</literal> means waiting for
-input or interactive (foreground), and <literal>O</literal> means
-waiting to output.
-</para>
-
-<para>
-By default <command>ps</command> will only show processes owned by the
-current user. With either the <literal>-a</literal> or <literal>-e</literal>
-option, all user's processes (and system processes) are listed. There are
-historical UNIX reasons for the synonomous options, which are functionally
-identical. The <literal>-f</literal> option outputs a "full" listing with
-usernames for UIDs. The <literal>-l</literal> option is the default display
-mode, showing a "long" listing with all the above columns. The other display
-option is <literal>-s</literal>, which outputs a shorter listing of just
-PID, TTY, STIME, and COMMAND. The <literal>-u</literal> option allows you
-to show only processes owned by a specific user. The <literal>-p</literal>
-option allows you to show information for only the process with the
-specified PID. The <literal>-W</literal>
-option causes <command>ps</command> show non-Cygwin Windows processes as
-well as Cygwin processes. The WINPID is also the PID, and they can be killed
-with the Cygwin <command>kill</command> command's <literal>-f</literal>
-option.
-</para>
-
-</sect2>
-
-<sect2 id="regtool"><title>regtool</title>
-
-<screen>
-Usage: regtool [OPTION] (add|check|get|list|remove|unset|load|unload|save) KEY
-View or edit the Win32 registry
-
-Actions:
- add KEY\SUBKEY add new SUBKEY
- check KEY exit 0 if KEY exists, 1 if not
- get KEY\VALUE prints VALUE to stdout
- list KEY list SUBKEYs and VALUEs
- remove KEY remove KEY
- set KEY\VALUE [data ...] set VALUE
- unset KEY\VALUE removes VALUE from KEY
- load KEY\SUBKEY PATH load hive from PATH into new SUBKEY
- unload KEY\SUBKEY unload hive and remove SUBKEY
- save KEY\SUBKEY PATH save SUBKEY into new hive PATH
-
-Options for 'list' Action:
- -k, --keys print only KEYs
- -l, --list print only VALUEs
- -p, --postfix like ls -p, appends '\' postfix to KEY names
-
-Options for 'get' Action:
- -b, --binary print REG_BINARY data as hex bytes
-
-Options for 'set' Action:
- -b, --binary set type to REG_BINARY (hex args or '-')
- -e, --expand-string set type to REG_EXPAND_SZ
- -i, --integer set type to REG_DWORD
- -m, --multi-string set type to REG_MULTI_SZ
- -s, --string set type to REG_SZ
-
-Options for 'set' and 'unset' Actions:
- -K&lt;c&gt;, --key-separator[=]&lt;c&gt; set key separator to &lt;c&gt; instead of '\'
-
-Other Options:
- -h, --help output usage information and exit
- -q, --quiet no error output, just nonzero return if KEY/VALUE missing
- -v, --verbose verbose output, including VALUE contents when applicable
- -w, --wow64 access 64 bit registry view (ignored on 32 bit Windows)
- -W, --wow32 access 32 bit registry view (ignored on 32 bit Windows)
- -V, --version output version information and exit
-
-KEY is in the format [host]\prefix\KEY\KEY\VALUE, where host is optional
-remote host in either \\hostname or hostname: format and prefix is any of:
- root HKCR HKEY_CLASSES_ROOT (local only)
- config HKCC HKEY_CURRENT_CONFIG (local only)
- user HKCU HKEY_CURRENT_USER (local only)
- machine HKLM HKEY_LOCAL_MACHINE
- users HKU HKEY_USERS
-
-You can use forward slash ('/') as a separator instead of backslash, in
-that case backslash is treated as escape character
-Example: regtool.exe get '\user\software\Microsoft\Clock\iFormat'
-</screen>
-
-<para>The <command>regtool</command> program allows shell scripts
-to access and modify the Windows registry. Note that modifying the
-Windows registry is dangerous, and carelessness here can result
-in an unusable system. Be careful.</para>
-
-<para>The <literal>-v</literal> option means "verbose". For most
-commands, this causes additional or lengthier messages to be printed.
-Conversely, the <literal>-q</literal> option supresses error messages,
-so you can use the exit status of the program to detect if a key
-exists or not (for example).</para>
-
-<para>The <literal>-w</literal> option allows to access the 64 bit view
-on the registry. Several subkeys exist in a 32 bit and a 64 bit version
-when running on Windows 64. Since Cygwin is running in 32 bit mode, it
-has only access to the 32 bit view of these registry keys. When using
-the <literal>-w</literal> the 64 bit view is used and
-<command>regtool</command> can access the entire registry.
-This option is simply ignored when running on 32 bit Windows versions.
-</para>
-
-<para>The <literal>-W</literal> option allows to access the 32 bit view
-on the registry. The purpose of this option is mainly symmetry. It
-allows to create OS agnostic scripts which would also work in a hypothetic
-64 bit version of Cygwin.</para>
-
-<para>You must provide <command>regtool</command> with an
-<emphasis>action</emphasis> following options (if any). Currently,
-the action must be <literal>add</literal>, <literal>set</literal>,
-<literal>check</literal>, <literal>get</literal>, <literal>list</literal>,
-<literal>remove</literal>, <literal>set</literal>, or <literal>unset</literal>.
-</para>
-
-<para>The <literal>add</literal> action adds a new key. The
-<literal>check</literal> action checks to see if a key exists (the
-exit code of the program is zero if it does, nonzero if it does not).
-The <literal>get</literal> action gets the value of a value of a key,
-and prints it (and nothing else) to stdout. Note: if the value
-doesn't exist, an error message is printed and the program returns a
-non-zero exit code. If you give <literal>-q</literal>, it doesn't
-print the message but does return the non-zero exit code.</para>
-
-<para>
-The <literal>list</literal> action lists the subkeys and values
-belonging to the given key. With <literal>list</literal>, the
-<literal>-k</literal> option instructs <command>regtool</command>
-to print only KEYs, and the <literal>-l</literal> option to print
-only VALUEs. The <literal>-p</literal> option postfixes a
-<literal>'/'</literal> to each KEY, but leave VALUEs with no
-postfix. The <literal>remove</literal> action
-removes a key. Note that you may need to remove everything in the key
-before you may remove it, but don't rely on this stopping you from
-accidentally removing too much.
-</para>
-
-<para>The <literal>set</literal> action sets a value within a key.
-<literal>-b</literal> means it's binary data (REG_BINARY).
-The binary values are specified as hex bytes in the argument list.
-If the argument is <literal>'-'</literal>, binary data is read
-from stdin instead.
-<literal>-e</literal> means it's an expanding string (REG_EXPAND_SZ)
-that contains embedded environment variables.
-<literal>-i</literal> means the value is an integer (REG_DWORD).
-<literal>-m</literal> means it's a multi-string (REG_MULTI_SZ).
-<literal>-s</literal> means the value is a string (REG_SZ).
-If you don't specify one of these, <command>regtool</command> tries to
-guess the type based on the value you give. If it looks like a
-number, it's a DWORD. If it starts with a percent, it's an expanding
-string. If you give multiple values, it's a multi-string. Else, it's
-a regular string.
-The <literal>unset</literal> action removes a value from a key.
-</para>
-
-<para>The <literal>load</literal> action adds a new subkey and loads
-the contents of a registry hive into it.
-The parent key must be HKEY_LOCAL_MACHINE or HKEY_USERS.
-The <literal>unload</literal> action unloads the file and removes
-the subkey.
-</para>
-
-<para>The <literal>save</literal> action saves a subkey into a
-registry hive.
-</para>
-
-<para>
-By default, the last "\" or "/" is assumed to be the separator between the
-key and the value. You can use the <literal>-K</literal> option to provide
-an alternate key/value separator character.
-</para>
-
-</sect2>
-
-<sect2 id="setfacl"><title>setfacl</title>
-
-<screen>
-Usage: setfacl [-r] (-f ACL_FILE | -s acl_entries) FILE...
- setfacl [-r] ([-d acl_entries] [-m acl_entries]) FILE...
-Modify file and directory access control lists (ACLs)
-
- -d, --delete delete one or more specified ACL entries
- -f, --file set ACL entries for FILE to ACL entries read
- from a ACL_FILE
- -m, --modify modify one or more specified ACL entries
- -r, --replace replace mask entry with maximum permissions
- needed for the file group class
- -s, --substitute substitute specified ACL entries for the
- ACL of FILE
- -h, --help output usage information and exit
- -v, --version output version information and exit
-
-At least one of (-d, -f, -m, -s) must be specified
-</screen>
-
-<para>
-For each file given as parameter, <command>setfacl</command> will
-either replace its complete ACL (<literal>-s</literal>, <literal>-f</literal>),
-or it will add, modify, or delete ACL entries.
-For more information on Cygwin and Windows ACLs, see
-see <xref linkend="ntsec"></xref> in the Cygwin User's Guide.
-</para>
-
-<para>
-Acl_entries are one or more comma-separated ACL entries
-from the following list:
-<screen>
- u[ser]::perm
- u[ser]:uid:perm
- g[roup]::perm
- g[roup]:gid:perm
- m[ask]::perm
- o[ther]::perm
-</screen>
-Default entries are like the above with the additional
-default identifier. For example:
-<screen>
- d[efault]:u[ser]:uid:perm
-</screen>
-</para>
-
-<para>
-<emphasis>perm</emphasis> is either a 3-char permissions string in the form
-"rwx" with the character <literal>'-'</literal> for no permission
-or it is the octal representation of the permissions, a
-value from 0 (equivalent to "---") to 7 ("rwx").
-<emphasis>uid</emphasis> is a user name or a numerical uid.
-<emphasis>gid</emphasis> is a group name or a numerical gid.
-</para>
-
-<para>
-The following options are supported:
-</para>
-
-<para>
-<literal>-d</literal>
-Delete one or more specified entries from the file's ACL.
-The owner, group and others entries must not be deleted.
-Acl_entries to be deleted should be specified without
-permissions, as in the following list:
-<screen>
- u[ser]:uid
- g[roup]:gid
- d[efault]:u[ser]:uid
- d[efault]:g[roup]:gid
- d[efault]:m[ask]:
- d[efault]:o[ther]:
-</screen>
-</para>
-
-<para>
-<literal>-f</literal>
-Take the Acl_entries from ACL_FILE one per line. Whitespace
-characters are ignored, and the character "#" may be used
-to start a comment. The special filename "-" indicates
-reading from stdin. Note that you can use this with
-<command>getfacl</command> and <command>setfacl</command> to copy
-ACLs from one file to another:
-<screen>
-$ getfacl source_file | setfacl -f - target_file
-</screen>
-</para>
-
-<para>
-Required entries are:
-one user entry for the owner of the file,
-one group entry for the group of the file, and
-one other entry.
-</para>
-
-<para>
-If additional user and group entries are given:
-a mask entry for the file group class of the file, and
-no duplicate user or group entries with the same uid/gid.
-</para>
-
-<para>
-If it is a directory:
-one default user entry for the owner of the file,
-one default group entry for the group of the file,
-one default mask entry for the file group class, and
-one default other entry.
-</para>
-
-<para>
-<literal>-m</literal>
-Add or modify one or more specified ACL entries. Acl_entries is a
-comma-separated list of entries from the same list as above.
-</para>
-
-<para>
-<literal>-r</literal>
-Causes the permissions specified in the mask
-entry to be ignored and replaced by the maximum permissions needed for
-the file group class.
-</para>
-
-<para>
-<literal>-s</literal>
-Like <literal>-f</literal>, but substitute the
-file's ACL with Acl_entries specified in a comma-separated list on the
-command line.
-</para>
-
-<para>
-While the <literal>-d</literal> and <literal>-m</literal> options may be used
-in the same command, the <literal>-f</literal> and <literal>-s</literal>
-options may be used only exclusively.
-</para>
-
-<para>
-Directories may contain default ACL entries. Files created
-in a directory that contains default ACL entries will have
-permissions according to the combination of the current umask,
-the explicit permissions requested and the default ACL entries
-</para>
-
-<para>
-Limitations: Under Cygwin, the default ACL entries are not taken into
-account currently.
-</para>
-
-</sect2>
-
-<sect2 id="ssp"><title>ssp</title>
-
-<screen>
-Usage: ssp [options] low_pc high_pc command...
-Single-step profile COMMAND
-
- -c, --console-trace trace every EIP value to the console. *Lots* slower.
- -d, --disable disable single-stepping by default; use
- OutputDebugString ("ssp on") to enable stepping
- -e, --enable enable single-stepping by default; use
- OutputDebugString ("ssp off") to disable stepping
- -h, --help output usage information and exit
- -l, --dll enable dll profiling. A chart of relative DLL usage
- is produced after the run.
- -s, --sub-threads trace sub-threads too. Dangerous if you have
- race conditions.
- -t, --trace-eip trace every EIP value to a file TRACE.SSP. This
- gets big *fast*.
- -v, --verbose output verbose messages about debug events.
- -V, --version output version information and exit
-
-Example: ssp 0x401000 0x403000 hello.exe
-</screen>
-
-<para>
-SSP - The Single Step Profiler
-</para>
-
-<para>
-Original Author: DJ Delorie
-</para>
-
-<para>
-The SSP is a program that uses the Win32 debug API to run a program
-one ASM instruction at a time. It records the location of each
-instruction used, how many times that instruction is used, and all
-function calls. The results are saved in a format that is usable by
-the profiling program <command>gprof</command>, although
-<command>gprof</command> will claim the values
-are seconds, they really are instruction counts. More on that later.
-</para>
-
-<para>
-Because the SSP was originally designed to profile the cygwin DLL, it
-does not automatically select a block of code to report statistics on.
-You must specify the range of memory addresses to keep track of
-manually, but it's not hard to figure out what to specify. Use the
-"objdump" program to determine the bounds of the target's ".text"
-section. Let's say we're profiling cygwin1.dll. Make sure you've
-built it with debug symbols (else <command>gprof</command> won't run)
-and run objdump like this:
-
-<screen>
-$ objdump -h cygwin1.dll
-</screen>
-
-It will print a report like this:
-<screen>
-cygwin1.dll: file format pei-i386
-
-Sections:
-Idx Name Size VMA LMA File off Algn
- 0 .text 0007ea00 61001000 61001000 00000400 2**2
- CONTENTS, ALLOC, LOAD, READONLY, CODE, DATA
- 1 .data 00008000 61080000 61080000 0007ee00 2**2
- CONTENTS, ALLOC, LOAD, DATA
- . . .
-</screen>
-</para>
-
-<para>
-The only information we're concerned with are the VMA of
-the .text section and the VMA of the section after it
-(sections are usually contiguous; you can also add the
-Size to the VMA to get the end address). In this case,
-the VMA is 0x61001000 and the ending address is either
-0x61080000 (start of .data method) or 0x0x6107fa00 (VMA+Size
-method).
-</para>
-
-<para>
-There are two basic ways to use SSP - either profiling a whole
-program, or selectively profiling parts of the program.
-</para>
-
-<para>
-To profile a whole program, just run <command>ssp</command> without options.
-By default, it will step the whole program. Here's a simple example, using
-the numbers above:
-
-<screen>
-$ ssp 0x61001000 0x61080000 hello.exe
-</screen>
-
-This will step the whole program. It will take at least 8 minutes on
-a PII/300 (yes, really). When it's done, it will create a file called
-"gmon.out". You can turn this data file into a readable report with
-<command>gprof</command>:
-
-<screen>
-$ gprof -b cygwin1.dll
-</screen>
-
-The "-b" means 'skip the help pages'. You can omit this until you're
-familiar with the report layout. The <command>gprof</command> documentation
-explains a lot about this report, but <command>ssp</command> changes a few
-things. For example, the first part of the report reports the amount of time
-spent in each function, like this:
-
-<screen>
-Each sample counts as 0.01 seconds.
- % cumulative self self total
- time seconds seconds calls ms/call ms/call name
- 10.02 231.22 72.43 46 1574.57 1574.57 strcspn
- 7.95 288.70 57.48 130 442.15 442.15 strncasematch
-</screen>
-
-The "seconds" columns are really CPU opcodes, 1/100 second per opcode.
-So, "231.22" above means 23,122 opcodes. The ms/call values are 10x
-too big; 1574.57 means 157.457 opcodes per call. Similar adjustments
-need to be made for the "self" and "children" columns in the second
-part of the report.
-</para>
-
-<para>
-OK, so now we've got a huge report that took a long time to generate,
-and we've identified a spot we want to work on optimizing. Let's say
-it's the time() function. We can use SSP to selectively profile this
-function by using OutputDebugString() to control SSP from within the
-program. Here's a sample program:
-
-<screen>
- #include &lt;windows.h&gt;
- main()
- {
- time_t t;
- OutputDebugString("ssp on");
- time(&amp;t);
- OutputDebugString("ssp off");
- }
-</screen>
-</para>
-
-<para>
-Then, add the <literal>-d</literal> option to ssp to default to
-*disabling* profiling. The program will run at full speed until the first
-OutputDebugString, then step until the second.
-You can then use <command>gprof</command> (as usual) to see the performance
-profile for just that portion of the program's execution.
-</para>
-
-<para>
-There are many options to ssp. Since step-profiling makes your
-program run about 1,000 times slower than normal, it's best to
-understand all the options so that you can narrow down the parts
-of your program you need to single-step.
-</para>
-
-<para>
-<literal>-v</literal> - verbose. This prints messages about threads
-starting and stopping, OutputDebugString calls, DLLs loading, etc.
-</para>
-
-<para>
-<literal>-t</literal> and <literal>-c</literal> - tracing.
-With <literal>-t</literal>, *every* step's address is written
-to the file "trace.ssp". This can be used to help debug functions,
-since it can trace multiple threads. Clever use of scripts can match
-addresses with disassembled opcodes if needed. Warning: creates
-*huge* files, very quickly. <literal>-c</literal> prints each address to
-the console, useful for debugging key chunks of assembler. Use
-<literal>addr2line -C -f -s -e foo.exe &lt; trace.ssp &gt; lines.ssp</literal>
-and then <literal>perl cvttrace</literal> to convert to symbolic traces.
-</para>
-
-<para>
-<literal>-s</literal> - subthreads. Usually, you only need to trace the
-main thread, but sometimes you need to trace all threads, so this enables that.
-It's also needed when you want to profile a function that only a
-subthread calls. However, using OutputDebugString automatically
-enables profiling on the thread that called it, not the main thread.
-</para>
-
-<para>
-<literal>-l</literal> - dll profiling. Generates a pretty table of how much
-time was spent in each dll the program used. No sense optimizing a function in
-your program if most of the time is spent in the DLL.
-I usually use the <literal>-v</literal>, <literal>-s</literal>, and
-<literal>-l</literal> options:
-
-<screen>
-$ ssp <literal>-v</literal> <literal>-s</literal> <literal>-l</literal> <literal>-d</literal> 0x61001000 0x61080000 hello.exe
-</screen>
-</para>
-</sect2>
-
-<sect2 id="strace"><title>strace</title>
-
-<screen>
-Usage: strace.exe [OPTIONS] &lt;command-line&gt;
-Usage: strace.exe [OPTIONS] -p &lt;pid&gt;
-Trace system calls and signals
-
- -b, --buffer-size=SIZE set size of output file buffer
- -d, --no-delta don't display the delta-t microsecond timestamp
- -f, --trace-children trace child processes (toggle - default true)
- -h, --help output usage information and exit
- -m, --mask=MASK set message filter mask
- -n, --crack-error-numbers output descriptive text instead of error
- numbers for Windows errors
- -o, --output=FILENAME set output file to FILENAME
- -p, --pid=n attach to executing program with cygwin pid n
- -q, --quiet toggle "quiet" flag. Defaults to on if "-p",
- off otherwise.
- -S, --flush-period=PERIOD flush buffered strace output every PERIOD secs
- -t, --timestamp use an absolute hh:mm:ss timestamp insted of
- the default microsecond timestamp. Implies -d
- -T, --toggle toggle tracing in a process already being
- -u, --usecs toggle printing of microseconds timestamp
- traced. Requires -p &lt;pid&gt;
- -v, --version output version information and exit
- -w, --new-window spawn program under test in a new window
-
- MASK can be any combination of the following mnemonics and/or hex values
- (0x is optional). Combine masks with '+' or ',' like so:
-
- --mask=wm+system,malloc+0x00800
-
- Mnemonic Hex Corresponding Def Description
- =========================================================================
- all 0x00001 (_STRACE_ALL) All strace messages.
- flush 0x00002 (_STRACE_FLUSH) Flush output buffer after each message.
- inherit 0x00004 (_STRACE_INHERIT) Children inherit mask from parent.
- uhoh 0x00008 (_STRACE_UHOH) Unusual or weird phenomenon.
- syscall 0x00010 (_STRACE_SYSCALL) System calls.
- startup 0x00020 (_STRACE_STARTUP) argc/envp printout at startup.
- debug 0x00040 (_STRACE_DEBUG) Info to help debugging.
- paranoid 0x00080 (_STRACE_PARANOID) Paranoid info.
- termios 0x00100 (_STRACE_TERMIOS) Info for debugging termios stuff.
- select 0x00200 (_STRACE_SELECT) Info on ugly select internals.
- wm 0x00400 (_STRACE_WM) Trace Windows msgs (enable _strace_wm).
- sigp 0x00800 (_STRACE_SIGP) Trace signal and process handling.
- minimal 0x01000 (_STRACE_MINIMAL) Very minimal strace output.
- exitdump 0x04000 (_STRACE_EXITDUMP) Dump strace cache on exit.
- system 0x08000 (_STRACE_SYSTEM) Serious error; goes to console and log.
- nomutex 0x10000 (_STRACE_NOMUTEX) Don't use mutex for synchronization.
- malloc 0x20000 (_STRACE_MALLOC) Trace malloc calls.
- thread 0x40000 (_STRACE_THREAD) Thread-locking calls.
-</screen>
-
-<para>The <command>strace</command> program executes a program, and
-optionally the children of the program, reporting any Cygwin DLL output
-from the program(s) to stdout, or to a file with the <literal>-o</literal>
-option. With the <literal>-w</literal> option, you can start an strace
-session in a new window, for example:
-
-<screen>
-$ strace -o tracing_output -w sh -c 'while true; do echo "tracing..."; done' &amp;
-</screen>
-This is particularly useful for <command>strace</command> sessions that
-take a long time to complete.
-</para>
-
-<para>
-Note that <command>strace</command> is a standalone Windows program and so does
-not rely on the Cygwin DLL itself (you can verify this with
-<command>cygcheck</command>). As a result it does not understand symlinks.
-This program is mainly useful for debugging the Cygwin DLL itself.</para>
-
-</sect2>
-
-<sect2 id="umount"><title>umount</title>
-
-<screen>
-Usage: umount.exe [OPTION] [&lt;posixpath&gt;]
-Unmount filesystems
-
- -h, --help output usage information and exit
- -U, --remove-user-mounts remove all user mounts
- -v, --version output version information and exit
-</screen>
-
-<para>The <command>umount</command> program removes mounts from the
-mount table in the current session. If you specify a POSIX path that
-corresponds to a current mount point, <command>umount</command> will
-remove it from the current mount table. Note that you can only remove
-user mount points. The <literal>-U</literal> flag may be used to
-specify removing all user mount points from the current user session.</para>
-
-<para>See <xref linkend="mount-table"></xref> for more information on the mount
-table.</para>
-</sect2>
-
-</sect1>
diff --git a/winsup/w32api/CONTRIBUTIONS b/winsup/w32api/CONTRIBUTIONS
deleted file mode 100644
index 1c3df0e..0000000
--- a/winsup/w32api/CONTRIBUTIONS
+++ /dev/null
@@ -1,5 +0,0 @@
-2000-10-23 Danny R. Smith <danny_r_smith_2001@yahoo.co.nz>
- * include/basetsd.h
- * include/ras.h
- * include/raserror.h
- * include/rassapi.h
diff --git a/winsup/w32api/ChangeLog b/winsup/w32api/ChangeLog
deleted file mode 100644
index fa09a66..0000000
--- a/winsup/w32api/ChangeLog
+++ /dev/null
@@ -1,11138 +0,0 @@
-2008-12-05 Chris Sutcliffe <ir0nh34d@users.sf.net>
-
- * include/w32api.h: Increment version to 3.13.
- * Makefile.in: Ditto.
-
-2008-12-05 Chris Sutcliffe <ir0nh34d@users.sf.net>
-
- * lib/glut.def: remove.
- * lib/glut32.def: ditto.
-
-2008-11-11 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winbase.h (PROCESS_DEP_ENABLE,
- PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION): Define for >= Vista SP1.
- (enum _DEP_SYSTEM_POLICY_TYPE): Ditto.
- (GetProcessDEPPolicy, GetSystemDEPPolicy, SetProcessDEPPolicy): Ditto.
-
-2008-10-09 Chris Sutcliffe <ir0nh34d@users.sf.net>
-
- * include/mmsystem.h (sndAlias): Correct GCC4 warning.
-
-2008-10-04 Chris Sutcliffe <ir0nh34d@users.sf.net>
-
- * include/shellapi.h (NOTIFYICON_VERSION_4): Define.
-
-2008-09-25 Chris Sutcliffe <ir0nh34d@users.sf.net>
-
- * include/vfw.h (capSendMessage): Rename to __capSendMessage.
-
-2008-09-24 Chris Sutcliffe <ir0nh34d@users.sf.net>
-
- * include/vfw.h (WM_CAP_SET_CALLBACK_ERRORA, WM_CAP_SET_CALLBACK_ERRORW,
- WM_CAP_SET_CALLBACK_STATUS, WM_CAP_SET_CALLBACK_YIELD,
- WM_CAP_SET_CALLBACK_FRAMEA, WM_CAP_SET_CALLBACK_FRAMEW,
- WM_CAP_SET_CALLBACK_VIDEOSTREAM, WM_CAP_SET_CALLBACK_WAVESTREAM,
- WM_CAP_GET_USER_DATA, WM_CAP_SET_USER_DATA, WM_CAP_DRIVER_CONNECT,
- WM_CAP_DRIVER_DISCONNECT, WM_CAP_DRIVER_GET_NAMEA, WM_CAP_DRIVER_GET_NAMEW,
- WM_CAP_DRIVER_GET_VERSIONA, WM_CAP_DRIVER_GET_VERSIONW,
- WM_CAP_DRIVER_GET_CAPS, WM_CAP_FILE_SET_CAPTURE_FILEA,
- WM_CAP_FILE_SET_CAPTURE_FILEW, WM_CAP_FILE_GET_CAPTURE_FILEA,
- WM_CAP_FILE_GET_CAPTURE_FILEW, WM_CAP_FILE_ALLOCATE, WM_CAP_FILE_SAVEASA,
- WM_CAP_FILE_SAVEASW, WM_CAP_FILE_SET_INFOCHUNK, WM_CAP_FILE_SAVEDIBA,
- WM_CAP_FILE_SAVEDIBW, WM_CAP_EDIT_COPY, WM_CAP_SET_AUDIOFORMAT,
- WM_CAP_GET_AUDIOFORMAT, WM_CAP_DLG_VIDEOFORMAT, WM_CAP_DLG_VIDEOSOURCE,
- WM_CAP_DLG_VIDEODISPLAY, WM_CAP_GET_VIDEOFORMAT, WM_CAP_SET_VIDEOFORMAT,
- WM_CAP_DLG_VIDEOCOMPRESSION, WM_CAP_SET_PREVIEW, WM_CAP_SET_OVERLAY,
- WM_CAP_SET_PREVIEWRATE, WM_CAP_SET_SCALE, WM_CAP_GET_STATUS,
- WM_CAP_SET_SCROLL, WM_CAP_GRAB_FRAME, WM_CAP_GRAB_FRAME_NOSTOP,
- WM_CAP_SEQUENCE, WM_CAP_SEQUENCE_NOFILE, WM_CAP_SET_SEQUENCE_SETUP,
- WM_CAP_GET_SEQUENCE_SETUP, WM_CAP_SET_MCI_DEVICEA, WM_CAP_SET_MCI_DEVICEW,
- WM_CAP_GET_MCI_DEVICEA, WM_CAP_GET_MCI_DEVICEW, WM_CAP_STOP, WM_CAP_ABORT,
- WM_CAP_SINGLE_FRAME_OPEN, WM_CAP_SINGLE_FRAME_CLOSE, WM_CAP_SINGLE_FRAME,
- WM_CAP_PAL_OPENA, WM_CAP_PAL_OPENW, WM_CAP_PAL_SAVEA, WM_CAP_PAL_SAVEW,
- WM_CAP_PAL_PASTE, WM_CAP_PAL_AUTOCREATE, WM_CAP_PAL_MANUALCREATE,
- WM_CAP_SET_CALLBACK_CAPCONTROL): Define using WM_USER.
- (capSendMessage): Don't undef.
-
-2008-09-21 Chris Sutcliffe <ir0nh34d@users.sf.net>
-
- * incude/sspi.h: include subauth.h to fix issue of UNICODE_STRING being
- undefined.
-
-2008-09-13 mega-squall <mega-squall@users.sf.net>
-
- * include/winnt.h (SUBLANG_BENGALI_INDIA, SUBLANG_PUNJABI_INDIA,
- SUBLANG_ROMANIAN_ROMANIA): Correct definition.
- (SUBLANG_BENGALI_BANGLADESH, SUBLANG_PUNJABI_PAKISTAN,
- SUBLANG_ROMANIAN_MOLDOVA): Define.
-
-2008-09-11 Chris Sutcliffe <ir0nh34d@users.sf.net>
-
- * include/shlwapi.h (ASSOCSTR): Update enum.
-
-2008-09-07 Chris Sutcliffe <ir0nh34d@users.sf.net>
-
- * include/w32api.h: Increment version to 3.12.
- * Makefile.in: Ditto.
-
-2008-09-07 Michael Hentschel <mikeh42@users.sourceforge.net>
-
- * include/shlwapi.h (STIF_DEFAULT, STIF_SUPPORT_HEX): Define.
-
-2008-09-07 alsemm <alsemm@users.sourceforge.net>
-
- * include/mlang.h (IMLangFontLink2::MapFont): Fix definition.
-
-2008-09-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ws2tcpip.h (IPV6_MREQ): Fix typo.
- Thanks to Richard Hughes for report.
-
-2008-09-06 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * Makefile.in: Adjust to new naming standard for MinGW while maintaining old
- naming standard for Cygwin.
-
-2008-08-30 Bo Yang <techrazy@users.sourceforge.net>
-
- * include/sspi.h: Fix PSecurityFunctionTableW structure.
-
-2008-08-29 Andy Grover <andy.grover@oracle.com>
-
- * include/ddk/scsi.h: Define READ_TOC formats.
- * lib/ddk/scsiport.def (ScsiPortGetDeviceBase): Fix export.
-
-2008-08-29 Andy Grover <andy.grover@oracle.com>
-
- * include/ddk/ndis.h (NDIS_MINIPORT_MAJOR_VERSION, NDIS_MINIPORT_MINOR_VERSION,
- struct NDIS_TASK_OFFLOAD_HEADER, PROTOCOL_RESERVED_SIZE_IN_PACKET,
- NdisGetFirstBufferFromPacketSafe, NdisMIndicateReceivePacket,
- NdisSetPacketPoolProtocolId, NdisMInitializeTimer, NdisMSetPeriodicTimer,
- NdisMCancelTimer): Define.
- (enum NDIS_ENCAPSULATION, struct NDIS_ENCAPSULATION_FORMAT): move in file.
- (struct _NDIS_PACKET): Define using _ANONYMOUS_UNION and ANONYMOUS_STRUCT to
- eliminate warnings.
- (NdisReinitializePacket): Rename from NdisReinitializePacketCounts.
- * lib/ddk/ndis.def (NdisInitAnsiString, NdisInitUnicodeString, NdisMCancelTimer,
- NdisMInitializeTimer, NdisMSetPeriodicTimer, NdisSetPacketPoolProtocolId):
- Export.
-
-2008-08-29 Andy Grover <andy.grover@oracle.com>
-
- * include/ddk/winddk.h (RtlStringCbCopyA, RtlStringCbPrintfA,
- RtlStringCbVPrintfA): define in terms of POSIX string functions.
-
-2008-08-29 Andy Grover <andy.grover@oracle.com>
-
- * include/ddk/winddk.h (KeRaiseIrql): Define.
- (KfRaiseIrql, KfLowerIrql): remove incorrect definitions.
-
-2008-08-29 Andy Grover <andy.grover@oracle.com>
-
- * include/ddk/winddk.h (KeFlushQueuedDpcs, KeMemoryBarrier): Define.
- (KeGetCurrentProcessorNumber): Fix incorrect member reference.
- (InterlockedIncrement, InterlockedDecrement): fix warning.
- * lib/ddk/ntoskrnl.def (KeFlushQueuedDpcs, KeMemoryBarrier): Export.
- (KeNumberProcessors): Export.
-
-2008-08-22 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/shlwapi.h (ASSOCF_INIT_NOREMAPCLSID, ASSOCF_INIT_BYEXENAME,
- ASSOCF_OPEN_BYEXENAME, ASSOCF_INIT_DEFAULTTOSTAR,
- ASSOCF_INIT_DEFAULTTOFOLDER, ASSOCF_NOUSERSETTINGS, ASSOCF_NOTRUNCATE,
- ASSOCF_VERIFY, ASSOCF_REMAPRUNDLL, ASSOCF_NOFIXUPS, ASSOCF_IGNOREBASECLASS,
- ASSOCF_INIT_IGNOREUNKNOWN): Define.
-
-2008-08-22 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/commctrl.h (LVN_MARQUEEBEGIN): Define.
-
- Thanks to Tim Kosse <botg at users dot sf dot net>.
-
-2008-08-22 Bo Yang <techrazy@users.sourceforge.net>
-
- * include/winnt.h (OWNER_SECURITY_INFORMATION, GROUP_SECURITY_INFORMATION,
- DACL_SECURITY_INFORMATION, SACL_SECURITY_INFORMATION): Correct.
- * include/winnt.h (OWNER_SECURITY_INFORMATION, GROUP_SECURITY_INFORMATION,
- DACL_SECURITY_INFORMATION, SACL_SECURITY_INFORMATION,
- LABEL_SECURITY_INFORMATION, UNPROTECTED_SACL_SECURITY_INFORMATION,
- UNPROTECTED_DACL_SECURITY_INFORMATION, PROTECTED_SACL_SECURITY_INFORMATION,
- PROTECTED_DACL_SECURITY_INFORMATION): Define.
-
-2008-08-19 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/wtsapi32.h (_WTS_INFO_CLASS, _WTS_CONNECTSTATE_CLASS,
- WTSQuerySessionInformation, WTSFreeMemory): Define.
-
-2008-07-25 Bo Yang <techrazy@users.sourceforge.net>
-
- * lib/gdi32.def (SetLayout): Export.
-
-2008-07-25 Bo Yang <techrazy@users.sourceforge.net>
-
- * include/wincrypt.h (struct _CRYPT_KEY_PROV_PARAM,
- struct _CRYPT_KEY_PROV_INFO, CertGetCertificateContextProperty,
- CryptEnumKeyIdentifierProperties, CryptAcquireCertificatePrivateKey,
- CertCreateCertificateContext, CryptGetKeyIdentifierProperty,
- CertSetCertificateContextProperty, CertCompareCertificateName,
- CryptSetKeyIdentifierProperty, CertOIDToAlgId, CryptGetDefaultProviderA,
- CryptGetDefaultProviderW and many corresponding macroes): Define.
- * lib/crypt32.def (Export the above 11 functions): Export.
- * include/winerror.h (CRYPT_E_NOT_FOUND and other crypt related
- macroes): Define.
-
-
-2008-07-24 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/winuser.h (MENUGETOBJECTINFO, MNGO_NOINTERFACE, MNGO_NOERROR,
- MNGOF_TOPGAP, MNGOF_BOTTOMGAP): Define.
-
-2008-07-24 techrazy <techrazy@users.sourceforge.net>
-
- * include/wingdi.h (OUT_PS_ONLY_PRECIS): Define.
-
-2008-07-24 Corinna Vinschen <corinna@vinschen.de>
-
- * include/lmaccess.h (struct _USER_INFO_4): Define.
- (struct _USER_INFO_23): Define.
- (struct _GROUP_INFO_3): Define.
-
-2008-07-14 Corinna Vinschen <corinna@vinschen.de>
-
- * include/iphlpapi.h (GetExtendedTcpTable): Add prototype.
- * include/iprtrmib.h (TCP_TABLE_CLASS, MIB_TCPROW_OWNER_PID,
- MIB_TCPTABLE_OWNER_PID, MIB_TCP6ROW_OWNER_PID,
- MIB_TCP6TABLE_OWNER_PID): Define.
- * lib/iphlpapi.def (GetExtendedTcpTable): Export.
-
-2008-06-25 Brandon Sneed <nivenh@sourceware.org>
-
- * include/winbase.h (GetProcessHandleCount, GetSystemRegistryQuota,
- GetThreadIOPendingFlag): Modified to rely on _WIN32_WINNT 0x0501 instead
- of 0x0502.
- Bug reported by Thomas Denk.
-
-2008-06-25 Brandon Sneed <nivenh@sourceware.org>
-
- * include/winbase.h (InterlockedIncrement, InterlockedDecrement,
- InterlockedCompareExchange, InterlockedExchange,
- InterlockedCompareExchangePointer, InterlockedExchangeAdd,
- InterlockedExchangePointer): Modified from PLONG to LONG volatile *.
- Bug reported by Erik Blake.
-
-2008-06-20 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/ddk/hal.def (HalTranslateBusAddress): Correct suffix.
- * lib/ddk/ntoskrnl.def (MmAllocateContiguousMemory): Correct suffix.
- Bug reported by Brian Hawley.
-
-2008-06-17 Corinna Vinschen <corinna@vinschen.de>
-
- * include/dsgetdc.h (DS_FORCE_REDISCOVERY, DS_FORCE_REDISCOVERY,
- DS_DIRECTORY_SERVICE_REQUIRED, DS_DIRECTORY_SERVICE_PREFERRED,
- DS_GC_SERVER_REQUIRED, DS_PDC_REQUIRED, DS_BACKGROUND_ONLY,
- DS_IP_REQUIRED, DS_KDC_REQUIRED, DS_TIMESERV_REQUIRED,
- DS_WRITABLE_REQUIRED, DS_GOOD_TIMESERV_PREFERRED, DS_AVOID_SELF,
- DS_ONLY_LDAP_NEEDED, DS_IS_FLAT_NAME, DS_IS_DNS_NAME,
- DS_RETURN_DNS_NAME, DS_RETURN_FLAT_NAME): Define.
- (DsGetDcNameW, DsGetDcNameA): Declare.
- (DsGetDcName): Define.
- * lib/netapi32.def (DsGetDcNameA, DsGetDcNameW): Export.
-
-2008-05-28 Chris Sutcliffe <ir0nh34d@users.sf.net>
-
- * include/commctrl.h (NMLVODSTATECHANGE): Define.
-
- Thanks to Tim Kosse <botg at users dot sf dot net>.
-
-2008-05-28 Chris Sutcliffe <ir0nh34d@users.sf.net>
-
- * include/winnt.h (SUBLANG_TIBETAN_BHUTAN): Fix definition.
-
- Thanks to Nicola Di Nisio <nicoladinisio at users dot sf dot net>.
-
-2008-05-15 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winnt.h (FILE_SEQUENTIAL_WRITE_ONCE): Define.
- (FILE_SUPPORTS_TRANSACTIONS): Define.
-
-2008-05-01 Bart Oldeman <bartoldeman@users.sf.net>
-
- * include/winuser.h (DEVICE_NOTIFY_WINDOW_HANDLE,
- DEVICE_NOTIFY_SERVICE_HANDLE): remove duplicate definition.
-
-2008-05-02 Ramiro Polla <ramiro@lisha.ufsc.br>
-
- * include/vfw.h (WM_CAP_SET_CALLBACK_ERRORA, WM_CAP_SET_CALLBACK_ERRORW,
- WM_CAP_SET_CALLBACK_STATUS, WM_CAP_SET_CALLBACK_YIELD,
- WM_CAP_SET_CALLBACK_FRAMEA, WM_CAP_SET_CALLBACK_FRAMEW,
- WM_CAP_SET_CALLBACK_VIDEOSTREAM, WM_CAP_SET_CALLBACK_WAVESTREAM,
- WM_CAP_GET_USER_DATA, WM_CAP_SET_USER_DATA, WM_CAP_DRIVER_CONNECT,
- WM_CAP_DRIVER_DISCONNECT, WM_CAP_DRIVER_GET_NAMEA, WM_CAP_DRIVER_GET_NAMEW,
- WM_CAP_DRIVER_GET_VERSIONA, WM_CAP_DRIVER_GET_VERSIONW,
- WM_CAP_DRIVER_GET_CAPS, WM_CAP_FILE_SET_CAPTURE_FILEA,
- WM_CAP_FILE_SET_CAPTURE_FILEW, WM_CAP_FILE_GET_CAPTURE_FILEA,
- WM_CAP_FILE_GET_CAPTURE_FILEW, WM_CAP_FILE_ALLOCATE, WM_CAP_FILE_SAVEASA,
- WM_CAP_FILE_SAVEASW, WM_CAP_FILE_SET_INFOCHUNK, WM_CAP_FILE_SAVEDIBA,
- WM_CAP_FILE_SAVEDIBW, WM_CAP_EDIT_COPY, WM_CAP_SET_AUDIOFORMAT,
- WM_CAP_GET_AUDIOFORMAT, WM_CAP_DLG_VIDEOFORMAT, WM_CAP_DLG_VIDEOSOURCE,
- WM_CAP_DLG_VIDEODISPLAY, WM_CAP_GET_VIDEOFORMAT, WM_CAP_SET_VIDEOFORMAT,
- WM_CAP_DLG_VIDEOCOMPRESSION, WM_CAP_SET_PREVIEW, WM_CAP_SET_OVERLAY,
- WM_CAP_SET_PREVIEWRATE, WM_CAP_SET_SCALE, WM_CAP_GET_STATUS,
- WM_CAP_SET_SCROLL, WM_CAP_GRAB_FRAME, WM_CAP_GRAB_FRAME_NOSTOP,
- WM_CAP_SEQUENCE, WM_CAP_SEQUENCE_NOFILE, WM_CAP_SET_SEQUENCE_SETUP,
- WM_CAP_GET_SEQUENCE_SETUP, WM_CAP_SET_MCI_DEVICEA, WM_CAP_SET_MCI_DEVICEW,
- WM_CAP_GET_MCI_DEVICEA, WM_CAP_GET_MCI_DEVICEW, WM_CAP_STOP, WM_CAP_ABORT,
- WM_CAP_SINGLE_FRAME_OPEN, WM_CAP_SINGLE_FRAME_CLOSE, WM_CAP_SINGLE_FRAME,
- WM_CAP_PAL_OPENA, WM_CAP_PAL_OPENW, WM_CAP_PAL_SAVEA, WM_CAP_PAL_SAVEW,
- WM_CAP_PAL_PASTE, WM_CAP_PAL_AUTOCREATE, WM_CAP_PAL_MANUALCREATE,
- WM_CAP_SET_CALLBACK_CAPCONTROL, WM_CAP_SET_CALLBACK_ERROR,
- WM_CAP_SET_CALLBACK_FRAME, WM_CAP_DRIVER_GET_NAME,
- WM_CAP_DRIVER_GET_VERSION, WM_CAP_FILE_SET_CAPTURE_FILE,
- WM_CAP_FILE_GET_CAPTURE_FILE, WM_CAP_FILE_SAVEAS, WM_CAP_FILE_SAVEDIB,
- WM_CAP_SET_MCI_DEVICE, WM_CAP_GET_MCI_DEVICE, WM_CAP_PAL_OPEN,
- WM_CAP_PAL_SAVE, capSetCallbackOnError, capSetCallbackOnStatus,
- capSetCallbackOnYield, capSetCallbackOnFrame, capSetCallbackOnVideoStream,
- capSetCallbackOnWaveStream, capGetUserData, capSetUserData,
- capDriverConnect, capDriverDisconnect, capDriverGetName,
- capDriverGetVersion, capDriverGetCaps, capFileSetCaptureFile,
- capFileGetCaptureFile, capFileAlloc, capFileSaveAs, capFileSetInfoChunk,
- capFileSaveDIB, capEditCopy, capSetAudioFormat, capGetAudioFormat,
- capGetAudioFormatSize, capDlgVideoFormat, capDlgVideoSource,
- capDlgVideoDisplay, capGetVideoFormat, capGetVideoFormatSize,
- capSetVideoFormat, capDlgVideoCompression, capPreview, capOverlay,
- capPreviewRate, capPreviewScale, capGetStatus, capSetScrollPos,
- capGrabFrame, capGrabFrameNoStop, capCaptureSequence,
- capCaptureSequenceNoFile, capCaptureSetSetup, capCaptureGetSetup,
- capSetMCIDeviceName, capGetMCIDeviceName, capCaptureStop, capCaptureAbort,
- capCaptureSingleFrameOpen, capCaptureSingleFrameClose,
- capCaptureSingleFrame, capPaletteOpen, capPaletteSave, capPalettePaste,
- capPaletteAuto, capPaletteManual, capSetCallbackOnCapControl): Define.
- (CAPDRIVERCAPS, *LPCAPDRIVERCAPS, CAPINFOCHUNK, *LPCAPINFOCHUNK, CAPSTATUS,
- *LPCAPSTATUS, CAPTUREPARMS, *LPCAPTUREPARMS, VIDEOHDR, *LPVIDEOHDR): typedef.
-
-2008-04-26 Yuval <uvman@users.sourceforge.net>
-
- * include/ntsecpkg.h (SECPKG_STATE_ENCRYPTION_PERMITTED,
- SECPKG_STATE_STRONG_ENCRYPTION_PERMITTED, SECPKG_STATE_DOMAIN_CONTROLLER,
- SECPKG_STATE_WORKSTATION, SECPKG_STATE_STANDALONE,
- LSA_TOKEN_INFORMATION_TYPE, SECPKG_EXTENDED_INFORMATION_CLASS,
- SECPKG_NAME_TYPE, SECPKG_PRIMARY_CRED, SECPKG_SUPPLEMENTAL_CRED,
- SECPKG_SUPPLEMENTAL_CRED_ARRAY, SECPKG_PARAMETERS,
- SECPKG_EVENT_DOMAIN_CHANGE, SECPKG_CLIENT_INFO, SecurityUserData,
- SECPKG_GSS_INFO, SECPKG_CONTEXT_THUNKS, SECPKG_MUTUAL_AUTH_LEVEL,
- SECPKG_CALL_INFO, SECPKG_EXTENDED_INFORMATION, PLSA_CALLBACK_FUNCTION,
- *PLSA_CLIENT_REQUEST, LSA_SEC_HANDLE, SEC_THREAD_START, SEC_ATTRS,
- *PLSA_REGISTER_CALLBACK, *PLSA_CREATE_LOGON_SESSION,
- *PLSA_DELETE_LOGON_SESSION, *PLSA_ADD_CREDENTIAL, *PLSA_GET_CREDENTIALS,
- *PLSA_DELETE_CREDENTIAL, *PLSA_ALLOCATE_LSA_HEAP, *PLSA_FREE_LSA_HEAP,
- *PLSA_ALLOCATE_CLIENT_BUFFER, *PLSA_FREE_CLIENT_BUFFER,
- *PLSA_COPY_TO_CLIENT_BUFFER, *PLSA_COPY_FROM_CLIENT_BUFFER,
- *PLSA_IMPERSONATE_CLIENT, *PLSA_UNLOAD_PACKAGE, *PLSA_DUPLICATE_HANDLE,
- *PLSA_SAVE_SUPPLEMENTAL_CREDENTIALS, *PLSA_CREATE_THREAD,
- *PLSA_GET_CLIENT_INFO, *PLSA_REGISTER_NOTIFICATION,
- *PLSA_CANCEL_NOTIFICATION, *PLSA_MAP_BUFFER, *PLSA_CREATE_TOKEN,
- *PLSA_AUDIT_LOGON, *PLSA_CALL_PACKAGE, *PLSA_FREE_LSA_HEAP,
- *PLSA_GET_CALL_INFO, *PLSA_CALL_PACKAGEEX, *PLSA_CREATE_SHARED_MEMORY,
- *PLSA_ALLOCATE_SHARED_MEMORY, *PLSA_FREE_SHARED_MEMORY,
- *PLSA_DELETE_SHARED_MEMORY, *PLSA_OPEN_SAM_USER, *PLSA_GET_USER_CREDENTIALS,
- *PLSA_GET_USER_AUTH_DATA, *PLSA_CLOSE_SAM_USER,
- *PLSA_CONVERT_AUTH_DATA_TO_TOKEN, *PLSA_CLIENT_CALLBACK,
- *PLSA_UPDATE_PRIMARY_CREDENTIALS, *PLSA_GET_AUTH_DATA_FOR_USER,
- *PLSA_CRACK_SINGLE_NAME, *PLSA_AUDIT_ACCOUNT_LOGON,
- *PLSA_CALL_PACKAGE_PASSTHROUGH, SECPKG_DLL_FUNCTIONS, LSA_DISPATCH_TABLE,
- LSA_SECPKG_FUNCTION_TABLE, *PLSA_AP_INITIALIZE_PACKAGE, *PLSA_AP_LOGON_USER,
- *PLSA_AP_CALL_PACKAGE, *PLSA_AP_LOGON_TERMINATED,
- *PLSA_AP_CALL_PACKAGE_UNTRUSTED, *PLSA_AP_CALL_PACKAGE_PASSTHROUGH,
- *PLSA_AP_LOGON_USER_EX, *PLSA_AP_LOGON_USER_EX2, SpInitializeFn,
- SpShutDownFn, SpGetInfoFn, SpAcceptCredentialsFn,
- SpAcquireCredentialsHandleFn, SpQueryCredentialsAttributesFn,
- SpFreeCredentialsHandleFn, SpSaveCredentialsFn, SpGetCredentialsFn,
- SpDeleteCredentialsFn, SpInitLsaModeContextFn, SpAcceptLsaModeContextFn,
- SpDeleteContextFn, SpApplyControlTokenFn, SpGetUserInfoFn,
- SpGetExtendedInformationFn, SpQueryContextAttributesFn, SpAddCredentialsFn,
- SpSetExtendedInformationFn, SpInstanceInitFn, SpInitUserModeContextFn,
- SpMakeSignatureFn, SpVerifySignatureFn, SpSealMessageFn, SpUnsealMessageFn,
- SpGetContextTokenFn, SpCompleteAuthTokenFn, SpFormatCredentialsFn,
- SpMarshallSupplementalCredsFn, SpExportSecurityContextFn,
- SpImportSecurityContextFn, SECPKG_FUNCTION_TABLE,
- SECPKG_USER_FUNCTION_TABLE, *SpLsaModeInitializeFn,
- *SpUserModeInitializeFn): Define.
- * include/sspi.h (SECURITY_STRING): Define.
-
-2008-04-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/specstrings.h: Add more dummy defines.
-
-2008-04-22 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winnt.h (SECURITY_MANDATORY_LABEL_AUTHORITY): Define.
- (SECURITY_MANDATORY_UNTRUSTED_RID): Define.
- (SECURITY_MANDATORY_LOW_RID): Define.
- (SECURITY_MANDATORY_MEDIUM_RID): Define.
- (SECURITY_MANDATORY_HIGH_RID): Define.
- (SECURITY_MANDATORY_SYSTEM_RID): Define.
- (SECURITY_MANDATORY_PROTECTED_PROCESS_RID): Define.
- (SECURITY_MANDATORY_MAXIMUM_USER_RID): Define.
- (SE_GROUP_INTEGRITY): Define.
- (SE_GROUP_INTEGRITY_ENABLED): Define.
-
-2008-04-11 Corinna Vinschen <corinna@vinschen.de>
-
- * include/sddl.h (ConvertStringSidToSidA): Declare.
- (ConvertStringSidToSidW): Declare.
- (ConvertStringSidToSid): Define.
-
-2008-03-19 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/mprapi.h: Add guard for MprAdminAcceptReauthentication function
- and MPR_INTERFACE_3 structure since they are available only in Windows
- Server 2008
-
- Thanks to crackedmind <crackedmind at sf dot net>.
-
-2008-02-24 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/winnt.h: Update guard around KEY_WOW64_64KEY and KEY_WOW64_32KEY
- definitions.
- * include/winreg.h (KEY_WOW64_64KEY, KEY_WOW64_32KEY): Remove.
-
-2008-02-23 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/winnt.h (KEY_WOW64_64KEY, KEY_WOW64_32KEY): Define.
-
-2008-02-02 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/specstrings.h (IN, OUT, OPTIONAL): Remove.
- * include/windef.h (IN, OUT, OPTIONAL): Define.
-
-2008-02-02 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/specstrings.h: new file, move pseudo modifiers from windef.h.
- * include/windef.h (__in, __inout, __in_opt, __in_bcound, __in_ecount,
- __out, __out_ecount_part, __struct_bcount, __field_ecount_opt,
- __out_bcount_opt): Move to specstrings.h.
-
-2008-01-30 Brandon Sneed <nivenh@sourceware.org>
-
- * lib/bthprops.def: new file, bluetooth imports.
-
-2008-01-30 Brandon Sneed <nivenh@sourceware.org>
-
- * include/windef.h (__in, __inout, __in_opt, __in_bcound, __in_ecount,
- __out, __out_ecount_part, __struct_bcount, __field_ecount_opt,
- __out_bcount_opt): Defined additional pseudo-modifiers.
-
-2008-01-29 Brandon Sneed <nivenh@sourceware.org>
- * include/ras.h (RAS_MaxDnsSuffix): corrected typo, was RAX_MaxDnsSuffix.
- (RASENTRYA, RASENTRYW): Added members (dwfOptions2, dwfOptions3, szDnsSuffix,
- dwTcpWindowSize, szPrerequisitePbk, szPrerequisiteEntry, dwRedialCount,
- dwRedialPause.
-
-2008-01-29 Brandon Sneed <nivenh@sourceware.org>
-
- * include/winnt.h (SYSTEM_POWER_CONDITION): typedef.
- * include/winuser.h (PBT_POWERSETTINGCHANGE, DEVICE_NOTIFY_WINDOW_HANDLE,
- DEVICE_NOTIFY_SERVICE_HANDLE): define.
- * include/winuser.h (LPCGUID, HPOWERNOTIFY, POWERBROADCAST_SETTING): typedefs.
- * include/winuser.h (GUID_POWERSCHEME_PERSONALITY, GUID_MIN_POWER_SAVINGS,
- GUID_MAX_POWER_SAVINGS, GUID_TYPICAL_POWER_SAVINGS, GUID_ACDC_POWER_SOURCE,
- GUID_BATTERY_PERCENTAGE_REMAINING, GUID_IDLE_BACKGROUND_TASK,
- GUID_SYSTEM_AWAYMODE, GUID_MONITOR_POWER_ON): added externs for GUIDs.
- * include/winuser.h (RegisterPowerSettingNotification,
- UnregisterPowerSettingNotification): Add prototypes.
- * lib/user32.def: Added imports for the above prototypes.
- * lib/Makefile.in: Added build support for power-uuid.c.
- * lib/power-uuid.c: New file containing power GUID definitions.
-
-2008-01-29 Brandon Sneed <nivenh@sourceware.org>
-
- * include/ras.h (RAS_MaxDnsSuffix): define.
-
-2008-01-29 Brandon Sneed <nivenh@sourceware.org>
-
- * include/psapi.h (GetProcessImageFileNameA, GetProcessImageFileNameW):
- Add prototypes.
- * lib/psapi.def (GetProcessImageFileNameA@12, GetProcessImageFileNameW@12):
- Add exports.
-
-2007-12-27 Chris Sutcliffe <ir0nh34d@users.sf.net>
-
- * include/w32api.h: Increment version to 3.11.
- * Makefile.in: Ditto.
-
-2007-12-11 Dave Korn <dave.korn@artimi.com>
-
- * include/wincrypt.h (PCRYPT_DECODE_PARA): Add missing typedef.
- (CERT_POLICY_MAPPINGS_INFO): Move before CERT_POLICY_MAPPING.
-
-2007-12-03 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/wingdi.h: Change WINVER guard to _WIN32_WINNT.
-
-2007-12-03 techrazy <techrazy@users.sourceforge.net>
-
- * include/wingdi.h (NTM_NONNEGATIVE_AC, NTM_PS_OPENTYPE, NTM_TT_OPENTYPE,
- NTM_MULTIPLEMASTER, NTM_TYPE1, NTM_DSIG): define.
-
-2007-11-21 Kevin Conaway <kevin_conaway@users.sourceforge.net>
-
- * include/wincrypt.h (CryptProtectData, CryptUnprotectData): define.
-
-2007-11-21 elsapo <elsapo@users.sourceforge.net>
-
- * include/wincrypt.h (CERT_NAME_STR_COMMA_FLAG,
- CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG, CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG,
- CMC_ADD_ATTRIBUTES, CMC_ADD_EXTENSIONS, X509_CERT_PAIR,
- X509_CERTIFICATE_TEMPLATE, X509_CROSS_CERT_DIST_POINTS, CMC_DATA,
- X509_NAME_CONSTRAINTS, X509_POLICY_CONSTRAINTS, X509_POLICY_MAPPINGS,
- CMC_RESPONSE, CMC_STATUS, X509_ALGORITHM_IDENTIFIER, X509_ALTERNATE_NAME,
- PKCS_ATTRIBUTE, X509_AUTHORITY_INFO_ACCESS, X509_AUTHORITY_KEY_ID,
- X509_AUTHORITY_KEY_ID2, szOID_BASIC_CONSTRAINTS, X509_BASIC_CONSTRAINTS2,
- X509_BIOMETRIC_EXT, X509_BITS, X509_CERT, X509_CERT_CRL_TO_BE_SIGNED,
- X509_CERT_POLICIES, X509_CERT_REQUEST_TO_BE_SIGNED, X509_CERT_TO_BE_SIGNED,
- X509_CHOICE_OF_TIME, PKCS_CONTENT_INFO, PKCS_CONTENT_INFO_SEQUENCE_OF_ANY,
- X509_CRL_DIST_POINTS, RSA_CSP_PUBLICKEYBLOB, PKCS_CTL, X509_DSS_PARAMETERS,
- X509_DSS_SIGNATURE, X509_ECC_SIGNATURE, X509_ENHANCED_KEY_USAGE,
- X509_ENUMERATED, X509_EXTENSIONS, X509_INTEGER, X509_ISSUING_DIST_POINT,
- X509_KEY_ATTRIBUTES, X509_KEY_USAGE, X509_KEY_USAGE_RESTRICTION,
- X509_KEYGEN_REQUEST_TO_BE_SIGNED, X509_LOGOTYPE_EXT,
- X509_MULTI_BYTE_INTEGER, X509_MULTI_BYTE_UINT, X509_NAME, X509_NAME_VALUE,
- X509_OBJECT_IDENTIFIER, X509_OCTET_STRING, X509_PUBLIC_KEY_INFO,
- PKCS_RC2_CBC_PARAMETERS, CNG_RSA_PUBLIC_KEY_BLOB,
- PKCS_RSA_SSA_PSS_PARAMETERS, PKCS_RSAES_OAEP_PARAMETERS,
- ECC_CMS_SHARED_INFO, X509_SEQUENCE_OF_ANY, PKCS7_SIGNER_INFO,
- CMS_SIGNER_INFO, PKCS_SMIME_CAPABILITIES, PKCS_TIME_REQUEST,
- X509_UNICODE_NAME, X509_UNICODE_NAME_VALUE, PKCS_UTC_TIME,
- OCSP_SIGNED_REQUEST, OCSP_REQUEST, OCSP_RESPONSE,
- OCSP_BASIC_SIGNED_RESPONSE, OCSP_BASIC_RESPONSE, CRL_REASON_UNSPECIFIED,
- CRL_REASON_KEY_COMPROMISE, CRL_REASON_CA_COMPROMISE,
- CRL_REASON_AFFILIATION_CHANGED, CRL_REASON_SUPERSEDED,
- CRL_REASON_CESSATION_OF_OPERATION, CRL_REASON_CERTIFICATE_HOLD,
- CRL_REASON_REMOVE_FROM_CRL, CRYPT_ENCODE_ALLOC_FLAG,
- CRYPT_UNICODE_NAME_ENCODE_DISABLE_CHECK_TYPE_FLAG,
- CRYPT_UNICODE_NAME_ENCODE_ENABLE_T61_UNICODE_FLAG,
- CRYPT_UNICODE_NAME_ENCODE_ENABLE_UTF8_UNICODE_FLAG,
- CRYPT_UNICODE_NAME_ENCODE_FORCE_UTF8_UNICODE_FLAG,
- szOID_APPLICATION_CERT_POLICIES, szOID_APPLICATION_POLICY_CONSTRAINTS,
- szOID_APPLICATION_POLICY_MAPPINGS, szOID_AUTHORITY_INFO_ACCESS,
- szOID_AUTHORITY_KEY_IDENTIFIER, szOID_AUTHORITY_KEY_IDENTIFIER2,
- X509_BASIC_CONSTRAINTS, szOID_BIOMETRIC_EXT, szOID_CERT_EXTENSIONS,
- szOID_CERT_POLICIES, szOID_CERTIFICATE_TEMPLATE, szOID_CRL_NUMBER,
- szOID_CROSS_CERT_DIST_POINTS, szOID_DELTA_CRL_INDICATOR,
- szOID_ENROLLMENT_NAME_VALUE_PAIR, szOID_FRESHEST_CRL,
- szOID_ISSUING_DIST_POINT, szOID_NAME_CONSTRAINTS, szOID_CRL_DIST_POINTS,
- szOID_CRL_REASON_CODE, szOID_CRL_VIRTUAL_BASE, szOID_ECC_PUBLIC_KEY,
- szOID_ECDSA_SPECIFIED, szOID_ENHANCED_KEY_USAGE, szOID_ISSUER_ALT_NAME,
- szOID_ISSUER_ALT_NAME2, szOID_KEY_ATTRIBUTES, szOID_KEY_USAGE,
- szOID_KEY_USAGE_RESTRICTION, szOID_LOGOTYPE_EXT, szOID_POLICY_CONSTRAINTS,
- szOID_POLICY_MAPPINGS, szOID_RSA_SSA_PSS, szOID_RSAES_OAEP,
- szOID_SUBJECT_ALT_NAME, szOID_SUBJECT_ALT_NAME2,
- szOID_SUBJECT_KEY_IDENTIFIER, CMC_ADD_ATTRIBUTES_INFO,
- PCMC_ADD_ATTRIBUTES_INFO, CMC_ADD_EXTENSIONS_INFO, PCMC_ADD_EXTENSIONS_INFO,
- CERT_ALT_NAME_ENTRY, PCERT_ALT_NAME_ENTRY, CERT_ALT_NAME_INFO,
- PCERT_ALT_NAME_INFO, CERT_NAME_VALUE, PCERT_NAME_VALUE,
- CERT_POLICY_QUALIFIER_INFO, PCERT_POLICY_QUALIFIER_INFO,
- CERT_POLICY_CONSTRAINTS_INFO, PCERT_POLICY_CONSTRAINTS_INFO,
- CERT_POLICY_MAPPINGS_INFO, PCERT_POLICY_MAPPINGS_INFO, CERT_POLICY_MAPPING,
- PCERT_POLICY_MAPPING, CryptDecodeObjectEx, CryptEncodeObject,
- CryptEncodeObjectEx): define.
-
-2007-11-21 Brian Dessent <dessent@users.sourceforge.net>
-
- * include/winbase.h (CheckTokenMembership): define.
-
-2007-10-03 Jiri Malak <Jiri.Malak@iol.cz>
-
- * include/rpcndr.h: Missing NdrClientCall2 entry.
- * lib/rpcrt4.def: Ditto.
-
-2007-10-03 Frank Fesevur <ffes@users.sourceforge.net>
- * lib/scnsave.c: Multi-monitor support.
-
-2007-08-03 Chris Sutcliffe <ir0nh34d@users.sf.net>
-
- * include/w32api.h: Increment version to 3.10.
- * Makefile.in: Ditto.
-
-2007-08-02 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winbase.h (ReOpenFile): Add prototype.
- * lib/kernel32.def (ReOpenFile@16): Add export.
-
-2007-07-31 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/wtsapi32.h (WTS_CURRENT_SESSION, WTSDisconnectSession): Define.
-
-2007-7-30 Martijn Wargers <martijnw22@users.sourceforge.net>
-
- * include/wingdi.h (GetTextExtentExPointI): Add prototype.
- * lib/gdi32.def (GetTextExtentExPointI@28): Add export.
-
-2007-07-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wtypes.h (LPDECIMAL): Define.
- (DECIMAL_NEG, DECIMAL_SETZERO): Move definitions.
-
-2007-07-18 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winnt.h (SE_TRUSTED_CREDMAN_ACCESS_NAME): Define.
-
-2007-07-17 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winnt.h (FILE_READ_ONLY_VOLUME): Define.
- * include/ddk/ntifs.h (FILE_READ_ONLY_VOLUME): Define.
-
-2007-07-12 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/winuser.h (FE_FONTSMOOTHINGSTANDARD, FE_FONTSMOOTHINGCLEARTYPE):
- Define.
-
-2007-07-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/pbt.h (PBT_APMRESUMEAUTOMATIC) Define.
- * include/winuser.h: (PBT_APMQUERYSUSPEND, PBT_APMQUERYSTANDBY,
- PBT_APMQUERYSUSPENDFAILED, PBT_APMQUERYSTANDBYFAILED,
- PBT_APMSUSPEND, PBT_APMSTANDBY, PBT_APMRESUMECRITICAL,
- PBT_APMRESUMESUSPEND, PBT_APMRESUMESTANDBY, PBT_APMBATTERYLOW,
- PBT_APMPOWERSTATUSCHANGE, PBT_APMOEMEVENT, PBT_APMRESUMEAUTOMATIC):
- Sync with include/pbt.h.
-
-2007-07-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- [mingw-Bugs-1751518]
- * include/mshtml.h (IHTMLDocument2): Correct spelling of put_URL,
- get_URL.
-
- [mingw-Bugs-1751565]
- * include/basetyps.h (IID); Guard with __IID_DEFINED__.
-
- [mingw-Bugs-1751595]
- * include/exdisp.h (DWebBrowserEvents2): Remove undocumented STDDISP
- methods.
-
- Thanks to Yuji Kuwabara <yujikuwabara at sf dot net>.
-
-2007-07-10 Danny Smith <dannysmith@users.sourceforge.net>
-
- [mingw-Bugs-1750898]
- * include/mmsystem.h (MIXERCONTROL): Correct UNICODE mapping.
- Thanks to Yuji Kuwabara <yujikuwabara at sf dot net>.
-
-2007-07-09 Danny Smith <dannysmith@users.sourceforge.net>
-
- [mingw-Bugs-1749305]
- * lib/kernel32.def (GetConsoleProcessList@8): Add export.
-
-2007-07-02 Przemek Czerkas <pczerkas@gmail.com>
-
- * include/shlobj.h: Add CSIDL_MYMUSIC and CSIDL_MYVIDEO.
-
-2007-07-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/oaidl.h: Include windows.h and ole2.h,
- unless COM_NO_WINDOWS_H.
-
- [mingw-Bugs-1742130]
- * include/oaidl.h (struct tagVARIANT): Add union members
- LONGLONG * pllVal and ULONGLONG * pullVal.
-
-2007-07-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ws2tcpip.h (s6_addr32): Correct definition.
- Thanks to Alfred E. Heggestad <aeh at db dot org>
-
-2007-05-23 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * lib/secur32.def (InitSecurityInterfaceA, InitSecurityInterfaceW): Define.
-
- Thanks to Jim Marshall (jim dot marshall at wbemsolutions dot com) for
- supplying the information.
-
-2007-05-19 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/shellapi.h (NIN_POPUPOPEN, NIN_POPUPCLOSE): Define.
-
-2007-04-22 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/shellapi.h (NOTIFYICONDATAA, NOTIFYICONDATAW): Updated to support
- Vista.
-
-2007-04-20 Matthias Miller <matthiasmiller@users.sourceforge.net>
-
- * include/wincrypt.h (CRYPTPROTECT_PROMPTSTRUCT, CRYPTPROTECT_UI_FORBIDDEN,
- CRYPTPROTECT_LOCAL_MACHINE): Define.
-
-2007-04-15 Piotr Wyderski <piotr.wyderski@wp.pl>
-
- * include/winbase.h (SetInformationJobObject, QueryInformationJobObject):
- Define.
-
-2007-03-30 Brian Dessent <brian@dessent.net>
-
- * lib/kernel32.def (CreateMemoryResourceNotification@4): Define.
-
-2007-03-25 Chris Sutcliffe <ir0nh34d@users.sf.net>
-
- * include/w32api.h: Increment version to 3.9.
- * Makefile.in: Ditto.
-
-2007-03-23 Corinna Vinschen <corinna@vinschen.de>
-
- * include/psapi.h (GetMappedFileName): Fix messed up checkin.
-
-2007-03-23 Matthew Gregan <kinetik@flim.org>
-
- * include/psapi.h (GetMappedFileName): Rename from GetMappedFilenameEx.
-
-2007-03-06 Brandon Sneed <brandon@oqo.com>
-
- * include/setupapi.h: Added SetupConfigureWmiFromInfSectionA
- Added SetupConfigureWmiFromInfSectionW
- Added SetupConfigureWmiFromInfSection define to unicode and non-unicode sections
-
- * lib/setupapi.def: Added exports for SetupConfigureWmiFromInfSectionA and W
-
- * include/winuser.h: Added PBT_APMQUERYSUSPEND
- Added PBT_APMQUERYSTANDBY
- Added PBT_APMQUERYSUSPENDFAILED
- Added PBT_APMQUERYSTANDBYFAILED
- Added PBT_APMSUSPEND
- Added PBT_APMSTANDBY
- Added PBT_APMRESUMECRITICAL
- Added PBT_APMRESUMESUSPEND
- Added PBT_APMRESUMESTANDBY
- Added PBT_APMBATTERYLOW
- Added PBT_APMPOWERSTATUSCHANGE
- Added PBT_APMOEMEVENT
- Added PBT_APMRESUMEAUTOMATIC
-
- * include/wtsapi32.h: New file
-
- * include/wingdi.h: Added DM_DISPLAYORIENTATION define for use with DMDO_* defines
-
-2007-03-05 Jan Nijtmans <nijtmans@users.sourceforge.net>
-
- * include/ddeml.h (DdeCreateStringHandleA, DdeCreateStringHandleW): Switch
- argument to constant.
-
-2007-02-18 Jiri Malak <jiri.malak@iol.cz>
-
- * include/windef.h [WATCOM]: Fix !NONAMELESSUNION defines.
- * include/winnt.h [WATCOM] (GetCurrentFiber, GetFiberData):
- Add prototypes.
- [WATCOM] (NtCurrentTeb): Add protype and inline asm definition.
-
-2007-02-18 Vesa Jääskeläinen <chaac@users.sourceforge.net>
-
- * lib/user32.def (InternalGetWindowText): Add stub.
-
-2007-02-11 Daniel Atallah <datallah@users.sourceforge.net>
-
- * include/winnt.h (LANG_SERBIAN_NEUTRAL, LANG_BOSNIAN,
- LANG_BOSNIAN_NEUTRAL): Define.
-
-2007-02-11 Daniel Schlyder <thrug@users.sourceforge.net>
-
- * include/winuser.h: Add guards around TITLEBARINFO and
- GetTitleBarInfo().
-
-2007-01-11 Gisle Vanem <giva@users.sourceforge.net>
-
- * include/winbase.h (struct _OVERLAPPED): Change type of
- Internal, InternalHigh members to ULONG_PTR.
- (PAPCFUNC): Change DWORD parameter to ULONG_PTR.
- (CreateIoCompletionPort): Likewise.
- (PostQueuedCompletionStatus): Likewise.
- (QueueUserAPC): Likewise.
-
-2007-01-06 Pierre A. Humblet <Pierre.Humblet@ieee.org>
-
- * include/windns.h (DNS_TYPE_RP, DNS_TYPE_AFSDB, DNS_TYPE_X25,
- DNS_TYPE_ISDN, DNS_TYPE_RT, DNS_TYPE_NSAP, DNS_TYPE_NSAPPTR,
- DNS_TYPE_SIG, DNS_TYPE_KEY, DNS_TYPE_PX, DNS_TYPE_GPOS,
- DNS_TYPE_AAAA, DNS_TYPE_LOC, DNS_TYPE_NXT, DNS_TYPE_EID,
- DNS_TYPE_NIMLOC, DNS_TYPE_SRV, DNS_TYPE_ATMA, DNS_TYPE_NAPTR,
- DNS_TYPE_KX, DNS_TYPE_CERT, DNS_TYPE_A6, DNS_TYPE_DNAME,
- DNS_TYPE_SINK, DNS_TYPE_OPT, DNS_TYPE_UINFO, DNS_TYPE_UID,
- DNS_TYPE_GID, DNS_TYPE_UNSPEC, DNS_TYPE_ADDRS, DNS_TYPE_TKEY,
- DNS_TYPE_TSIG, DNS_TYPE_IXFR, DNS_TYPE_AXFR, DNS_TYPE_MAILB,
- DNS_TYPE_MAILA, DNS_TYPE_ALL, DNS_TYPE_ANY): Add enum values.
-
-2006-11-21 Danny Smith <dannysmith@users.sourceforge.net>
-
- * Makefile.in: Add aclocal.m4 to source release.
-
-2006-11-18 Chris Sutcliffe <ir0nh34d@users.sf.net>
-
- * include/w32api.h: Increment version to 3.8.
- * Makefile.in: Ditto.
-
-2006-11-13 Daniel Schlyder <thrug@users.sourceforge.net>
-
- * include/winnt.h (VER_SUITE_EMBEDDEDNT, VER_SUITE_SINGLEUSERTS,
- VER_SUITE_STORAGE_SERVER, VER_SUITE_COMPUTE_SERVER): Define.
-
- * include/winuser.h (SM_STARTER, SM_SERVERR2): Define.
-
-2006-11-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winuser.h (LR_DEFAULTSIZE): Remove duplicate.
-
- * include/winnt.h (GetCurrentFiber): Remove extern declaration. Make
- inline static.
- (GetFiberData): Likewise.
- * lib/kernel32.c: Remove.
- * lib/Makefile.in: Remove reference to kernel32.[co].
-
-2006-10-31 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winnt.h (SE_RELABEL_NAME): Define.
- (SE_INCREASE_WORKING_SET_NAME): Define.
- (SE_TIME_ZONE_NAME): Define.
- (SE_CREATE_SYMBOLIC_LINK_NAME): Define.
-
-2006-10-31 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winnt.h (IO_REPARSE_TAG_SYMLINK): Define.
- (struct _REPARSE_DATA_BUFFER): Add missing Flags field to
- SymbolicLinkReparseBuffer substructure.
-
-2006-10-29 Daniel Atallah <datallah@users.sourceforge.net>
-
- * lib/ws2_32.def (WSANSPIoctl): Add to lib.
-
-2006-10-26 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * lib/Makefile.in: Fix order for 'all' rule.
-
-2006-10-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winuser.h (LR_DEFAULTSIZE, LR_VGACOLOR): Define.
-
-2006-10-05 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winreg.h (RegDeleteKeyEx{A|W}): Add prototype and UNICODE
- mappings.
- (KEY_WOW64_32KEY, KEY_WOW64_64KEY): Define.
- * lib/advapi.def (RegDeleteKeyEx{A|W}): Export.
-
-2006-10-04 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/rpc.h: Add whitespace.
- * include/winnt.h (C_ASSERT): Define.
-
-2006-10-04 Danny Smith <dannysmith@users.sourceforge.net>
-
- [mingw-Bugs-1568067]
- * include/winuser.h: (DISP_CHANGE_BADDUALVIEW): Define.
- * include/wingdi.h: (DM_POSITION): Define.
-
-2006-10-03 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/rpcrt4.def: Remove "_imp__"-prefixed export symbols.
- * lib/user32.def: Likewise.
-
-2006-09-11 Chris Sutcliffe <ir0n3h4d@users.sourceforge.net>
-
- * lib/Makefile.in: fix typo.
- * lib/ddk/Makefile.in: fix typo.
- * lib/directx/Makefile.in: fix typo.
-
- Thanks to Keith Marshall (keithmarshall at users dot sourceforge dot net)
- for pointing it out.
-
-2006-09-10 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * Makefile.in: Remove files from lib directory with distclean target
-
-2006-09-10 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/winuser.h (CS_DROPSHADOW): Define.
-
-2006-09-08 Michael Gerdau <mgdde@users.sourceforge.net>
-
- * include/uxtheme.h: (TMT_GRADIENTCOLOR4, TMT_GRADIENTCOLOR5,
- TMT_SHADOWCOLOR, TMT_GLOWCOLOR, TMT_TEXTBORDERCOLOR,
- TMT_TEXTSHADOWCOLOR, TMT_GLYPHTEXTCOLOR, TMT_GLYPHTRANSPARENTCOLOR,
- TMT_FILLCOLORHINT, TMT_BORDERCOLORHINT, TMT_ACCENTCOLORHINT):
-
- Increase each constant by 1.
-
-2006-09-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- [mingw-Bugs-1553275]
- * include/wingdi.h (SetLayout): Add prototype.
- (GetLayout): Likewise.
-
-2006-09-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- [mingw-Bugs-1550139]
- * include/oleauto.h (GetRecordInfoFromTypeInfo): Add prototype.
- Tanks to: Samit Basu <samitbasu at sf dot net>
- (GetRecordInfoFromGuids): Add prototype.
-
-2006-09-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winbase.h: Add comment about 'missing' SEM flag.
-
-2006-08-30 Corinna Vinschen <corinna@vinschen.de>
-
- * configure.in: Substitute with_cross_host in depending files.
- * configure: Regenerate.
- * lib/Makefile.in: Add with_cross_host to allow more granular checks.
- Set installation directories accordingly.
- * lib/ddk/Makefile.in: Ditto.
- * lib/directx/Makefile.in: Ditto.
-
-2006-08-10 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/wtsapi32.def (WTSGetActiveConsoleSessionId). Move from here...
- * lib/kernel32.def (WTSGetActiveConsoleSessionId). ...to here.
- Bug reported by: <macleone at users dot sf dot net>
-
-2006-07-29 Danny Smith <dannysmith@users.sourceforge.net>
-
- Update some more IMAGE relocation type indicators
- to PECOFF v8 (May, 2006) specs.
-
- * include/winnt.h (IMAGE_REL_SH3_ABSOLUTE,
- IMAGE_REL_SH3_DIRECT16, IMAGE_REL_SH3_DIRECT32,
- IMAGE_REL_SH3_DIRECT8, IMAGE_REL_SH3_DIRECT8_WORD,
- IMAGE_REL_SH3_DIRECT8_LONG, IMAGE_REL_SH3_DIRECT4,
- IMAGE_REL_SH3_DIRECT4_WORD, IMAGE_REL_SH3_DIRECT4_LONG,
- IMAGE_REL_SH3_PCREL8_WORD, IMAGE_REL_SH3_PCREL8_LONG,
- IMAGE_REL_SH3_PCREL12_WORD, IMAGE_REL_SH3_STARTOF_SECTION,
- IMAGE_REL_SH3_SIZEOF_SECTION, IMAGE_REL_SH3_SECTION,
- IMAGE_REL_SH3_SECREL, IMAGE_REL_SH3_DIRECT32_NB,
- IMAGE_REL_SH3_GPREL4_LONG, IMAGE_REL_SH3_TOKEN,
- IMAGE_REL_SHM_PCRELPT, IMAGE_REL_SHM_REFLO,
- IMAGE_REL_SHM_REFHALF, IMAGE_REL_SHM_RELLO,
- IMAGE_REL_SHM_RELHALF, IMAGE_REL_SHM_PAIR,
- IMAGE_REL_SHM_NOMODE): Add defines.
-
- (IMAGE_REL_M32R_ABSOLUTE, IMAGE_REL_M32R_ADDR32,
- IMAGE_REL_M32R_ADDR32NB, IMAGE_REL_M32R_ADDR24,
- IMAGE_REL_M32R_GPREL16, IMAGE_REL_M32R_PCREL24,
- IMAGE_REL_M32R_PCREL16, IMAGE_REL_M32R_PCREL8,
- IMAGE_REL_M32R_REFHALF, IMAGE_REL_M32R_REFHI,
- IMAGE_REL_M32R_REFLO, IMAGE_REL_M32R_PAIR,
- IMAGE_REL_M32R_SECTION, IMAGE_REL_M32R_SECREL,
- IMAGE_REL_M32R_TOKEN): Add defines.
-
- (IMAGE_REL_MIPS_JMPADDR16): Add define.
-
-2006-07-27 Danny Smith <dannysmith@users.sourceforge.net>
-
- Update some IMAGE flags to PECOFF v8 (May, 2006) specs.
- * include/winnt.h (IMAGE_FILE_MACHINE_AM33,
- IMAGE_FILE_MACHINE_ARM, IMAGE_FILE_MACHINE_EBC,
- IMAGE_FILE_MACHINE_M32R, IMAGE_FILE_MACHINE_MIPS16,
- IMAGE_FILE_MACHINE_MIPSFPU, IMAGE_FILE_MACHINE_MIPSFPU16,
- IMAGE_FILE_MACHINE_POWERPCFP, IMAGE_FILE_MACHINE_R4000,
- IMAGE_FILE_MACHINE_SH3, IMAGE_FILE_MACHINE_SH3DSP,
- IMAGE_FILE_MACHINE_SH4, IMAGE_FILE_MACHINE_SH5,
- IMAGE_FILE_MACHINE_THUMB, IMAGE_FILE_MACHINE_WCEMIPSV2):
- Add defines.
-
- (IMAGE_SUBSYSTEM_EFI_APPLICATION,
- IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER,
- IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER, IMAGE_SUBSYSTEM_EFI_ROM):
- Add defines.
-
- (IMAGE_SYM_CLASS_CLR_TOKEN): Add define.
-
- (IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE,
- IMAGE_DLL_CHARACTERISTICS_FORCE_INTEGRITY,
- IMAGE_DLL_CHARACTERISTICS_NX_COMPAT,
- IMAGE_DLLCHARACTERISTICS_NO_ISOLATION, IMAGE_DLLCHARACTERISTICS_NO_SEH,
- IMAGE_DLLCHARACTERISTICS_NO_BIND,
- IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE): Add defines.
-
- (IMAGE_REL_I386_TOKEN, IMAGE_REL_I386_SECREL7): Add defines.
-
- (IMAGE_REL_AMD64_ABSOLUTE, IMAGE_REL_AMD64_ADDR64,
- IMAGE_REL_AMD64_ADDR32, IMAGE_REL_AMD64_ADDR32NB, IMAGE_REL_AMD64_REL32,
- IMAGE_REL_AMD64_REL32_1, IMAGE_REL_AMD64_REL32_2,
- IMAGE_REL_AMD64_REL32_3, IMAGE_REL_AMD64_REL32_4,
- IMAGE_REL_AMD64_REL32_5, IMAGE_REL_AMD64_SECTION,
- IMAGE_REL_AMD64_SECREL, IMAGE_REL_AMD64_SECREL7, IMAGE_REL_AMD64_TOKEN,
- IMAGE_REL_AMD64_SREL32, IMAGE_REL_AMD64_PAIR, IMAGE_REL_AMD64_SSPAN32):
- Add defines.
-
- (IMAGE_REL_IA64_ABSOLUTE, IMAGE_REL_IA64_IMM14, IMAGE_REL_IA64_IMM22,
- IMAGE_REL_IA64_IMM64, IMAGE_REL_IA64_DIR32, IMAGE_REL_IA64_DIR64,
- IMAGE_REL_IA64_PCREL21B, IMAGE_REL_IA64_PCREL21M,
- IMAGE_REL_IA64_PCREL21F, IMAGE_REL_IA64_GPREL22, IMAGE_REL_IA64_LTOFF22,
- IMAGE_REL_IA64_SECTION, IMAGE_REL_IA64_SECREL22,
- IMAGE_REL_IA64_SECREL64I, IMAGE_REL_IA64_SECREL32,
- IMAGE_REL_IA64_DIR32NB, IMAGE_REL_IA64_SREL14, IMAGE_REL_IA64_SREL22,
- IMAGE_REL_IA64_SREL32, IMAGE_REL_IA64_UREL32, IMAGE_REL_IA64_PCREL60X,
- IMAGE_REL_IA64_PCREL60B, IMAGE_REL_IA64_PCREL60F,
- IMAGE_REL_IA64_PCREL60I, IMAGE_REL_IA64_PCREL60M,
- IMAGE_REL_IA64_IMMGPREL64, IMAGE_REL_IA64_TOKEN, IMAGE_REL_IA64_GPREL32,
- IMAGE_REL_IA64_ADDEND): Add defines.
-
- (IMAGE_SCN_GPREL): Add define.
-
-2006-07-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/aclui.h: Replace __OBJC__ guard with _OBJC_NO_COM.
- * include/basetyps.h: Likewise.
- (_COM_interface): New define.
- (interface): Define to _COM_interface, conditional on !__OBJC__.
- Replace 'interface' with '_COM_interface', throughout.
- * include/comcat.h: Replace 'interface' with '_COM_interface', throughout.
- * include/commdlg.h: Replace __OBJC__ guard with _OBJC_NO_COM.
- * include/docobj.h: Replace 'interface' with '_COM_interface', throughout.
- * include/mshtml.h: Likewise.
- * include/oaidl.h: Likewise.
- * include/objfwd.h: Likewise.
- * include/objidl.h: Likewise.
- * include/ocidl.h: Likwise.
- * include/olectl.h: Likewise.
- * include/oleidl.h: Likewise.
- * include/shlobj.h: Likewise.
- * include/shlwapi.h: Replace __OBJC__ guard with _OBJC_NO_COM.
- * include/vfw.h: Likewise.
- * include/windows.h. Likewise. Add comment.
- * include/directx/d3d9.h: Replace 'interface' with '_COM_interface',
- throughout.
-
- * lib/test.c: Replace __OBJC__ guard with _OBJC_NO_COM.
- Add test for conflict with '@interface'
-
-2006-07-22 ipsoner <ipsoner@users.sourceforge.net>
-
- * include/wincrypt.h (szOID_RSA, szOID_PKCS, szOID_RSA_HASH,
- szOID_RSA_ENCRYPT, szOID_PKCS_1, szOID_PKCS_2, szOID_PKCS_3,
- szOID_PKCS_4, szOID_PKCS_5, szOID_PKCS_6, szOID_PKCS_7,
- szOID_PKCS_8, szOID_PKCS_9, szOID_PKCS_10, szOID_PKCS_12,
- szOID_RSA_MD2, szOID_RSA_MD4, szOID_RSA_MD5, szOID_RSA_RSA,
- szOID_RSA_MD2RSA, szOID_RSA_MD4RSA, szOID_RSA_MD5RSA,
- szOID_RSA_SHA1RSA, szOID_RSA_SETOAEP_RSA, szOID_RSA_DH,
- szOID_RSA_data, szOID_RSA_signedData, szOID_RSA_envelopedData,
- szOID_RSA_signEnvData, szOID_RSA_digestedData, szOID_RSA_hashedData,
- szOID_RSA_encryptedData, szOID_RSA_emailAddr, szOID_RSA_unstructName,
- szOID_RSA_contentType, szOID_RSA_messageDigest, szOID_RSA_signingTime,
- szOID_RSA_counterSign, szOID_RSA_challengePwd, szOID_RSA_unstructAddr,
- szOID_RSA_extCertAttrs, szOID_RSA_SMIMECapabilities,
- szOID_RSA_preferSignedData, szOID_RSA_RC2CBC, szOID_RSA_RC4,
- szOID_RSA_DES_EDE3_CBC, szOID_RSA_RC5_CBCPad, szOID_ANSI_x942,
- szOID_ANSI_x942_DH, szOID_X957, szOID_X957_DSA, szOID_DATA STRUCTURE,
- szOID_DS, szOID_DSALG, szOID_DSALG_CRPT, szOID_DSALG_HASH,
- szOID_DSALG_SIGN, szOID_DSALG_RSA, szOID_OIW, szOID_OIWSEC,
- szOID_OIWSEC_md4RSA, szOID_OIWSEC_md5RSA, szOID_OIWSEC_md4RSA2,
- szOID_OIWSEC_desECB, szOID_OIWSEC_desCBC, szOID_OIWSEC_desOFB,
- szOID_OIWSEC_desCFB, szOID_OIWSEC_desMAC, szOID_OIWSEC_rsaSign,
- szOID_OIWSEC_dsa, szOID_OIWSEC_shaDSA, szOID_OIWSEC_mdc2RSA,
- szOID_OIWSEC_shaRSA, szOID_OIWSEC_dhCommMod, szOID_OIWSEC_desEDE,
- szOID_OIWSEC_sha, szOID_OIWSEC_mdc2, szOID_OIWSEC_dsaComm,
- szOID_OIWSEC_dsaCommSHA, szOID_OIWSEC_rsaXchg, szOID_OIWSEC_keyHashSeal,
- szOID_OIWSEC_md2RSASign, szOID_OIWSEC_md5RSASign, szOID_OIWSEC_sha1,
- szOID_OIWSEC_dsaSHA1, szOID_OIWSEC_dsaCommSHA1, szOID_OIWSEC_sha1RSASign,
- szOID_OIWDIR, szOID_OIWDIR_CRPT, szOID_OIWDIR_HASH, szOID_OIWDIR_SIGN,
- szOID_OIWDIR_md2, szOID_OIWDIR_md2RSA, szOID_INFOSEC,
- szOID_INFOSEC_sdnsSignature, szOID_INFOSEC_mosaicSignature,
- szOID_INFOSEC_sdnsConfidentiality, szOID_INFOSEC_mosaicConfidentiality,
- szOID_INFOSEC_sdnsIntegrity, szOID_INFOSEC_mosaicIntegrity,
- szOID_INFOSEC_sdnsTokenProtection, szOID_INFOSEC_mosaicTokenProtection,
- szOID_INFOSEC_sdnsKeyManagement, szOID_INFOSEC_mosaicKeyManagement,
- szOID_INFOSEC_sdnsKMandSig, szOID_INFOSEC_mosaicKMandSig,
- szOID_INFOSEC_SuiteASignature, szOID_INFOSEC_SuiteAConfidentiality,
- szOID_INFOSEC_SuiteAIntegrity, szOID_INFOSEC_SuiteATokenProtection,
- szOID_INFOSEC_SuiteAKeyManagement, szOID_INFOSEC_SuiteAKMandSig,
- szOID_INFOSEC_mosaicUpdatedSig, szOID_INFOSEC_mosaicKMandUpdSig,
- szOID_INFOSEC_mosaicUpdatedInteg, szOID_PKIX_NO_SIGNATURE,
- szOID_COMMON_NAME, szOID_COUNTRY_NAME, szOID_DEVICE_SERIAL_NUMBER,
- szOID_DOMAIN_COMPONENT, szOID_RSA_emailAddr, szOID_GIVEN_NAME,
- szOID_INITIALS, szOID_LOCALITY_NAME, szOID_ORGANIZATION_NAME,
- szOID_ORGANIZATIONAL_UNIT_NAME, szOID_STATE_OR_PROVINCE_NAME,
- szOID_STREET_ADDRESS, szOID_SUR_NAME, szOID_TITLE, szOID_RSA_unstructAddr,
- szOID_RSA_unstructName, szOID_BASIC_CONSTRAINTS2,
- CERT_BASIC_CONSTRAINTS2_INFO, CRYPT_ENCODE_PARA,CertDuplicateStore,
- CertEnumCertificatesInStore, CertDuplicateCertificateContext,
- CertGetNameStringA, CertGetNameStringW, CertGetNameString, PFXIsPFXBlob,
- CertFindExtension, CryptDecodeObject, CertAddCertificateContextToStore,
- CertCompareCertificate, PFXVerifyPassword, PFXImportCertStore,
- CertDeleteCertificateFromStore): Define.
- * lib/crypt32.def (CertDuplicateStore, CertEnumCertificatesInStore,
- CertDuplicateCertificateContext, CertGetNameStringA, CertGetNameStringW,
- CertGetNameString, PFXIsPFXBlob, CertFindExtension, CryptDecodeObject,
- CertAddCertificateContextToStore, CertCompareCertificate,
- PFXVerifyPassword, PFXImportCertStore, CertDeleteCertificateFromStore):
- Define.
-
-2006-07-22 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * lib/uuid.c: Remove.
-
-2006-07-20 Elias Naur <elias_naur@users.sourceforge.net>
-
- * include/devguid.h: Add new file with missing GUID_DEVCLASS_*
- declarations. They were extracted from the registry with a script.
- * lib/devguid.c: Add new file with the implementation of the
- missing GUIDs.
- * lib/Makefile.in: Add devguid.c to UUID_SOURCES and UUID_OBJS.
-
-2006-07-19 Elias Naur <elias_naur@users.sourceforge.net>
-
- * include/winuser.h (WM_INPUT): Add missing Raw Input
- notification define.
- (RID_DEVICE_INFO_MOUSE, RID_DEVICE_INFO_KEYBOARD,
- RID_DEVICE_INFO_HID, RID_DEVICE_INFO): Define Raw Input structs
-
-2006-07-19 Danny Smith <dannysmith@users.sourceforge.net>
-
- [mingw-Bugs-1525021]
- * iptypes.h (IP_ADAPTER_ANYCAST_ADDRESS): Fix NONAMELESSUNION warnings.
- (IP_ADAPTER_MULTICAST_ADDRESS): Likewise.
- (IP_ADAPTER_UNICAST_ADDRESS): Likewise.
- (IP_ADAPTER_DNS_SERVER_ADDRESS): Likewise.
- (IP_ADAPTER_ADAPTER_PREFIX): Likewise.
- (IP_ADAPTER_ADDRESSES): Likewise.
-
-2006-06-13 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * lib/uuid.c (CLSID_FileProtocol, CLSID_FtpProtocol, CLSID_GopherProtocol,
- CLSID_HttpProtocol, CLSID_HttpSProtocol, CLSID_MkProtocol,
- CLSID_PSUrlMonProxy, CLSID_StdURLMoniker): Remove. Moved to
- extras-uuid.c.
- * lib/extras-uuid.c (CLSID_FileProtocol, CLSID_FtpProtocol, CLSID_GopherProtocol,
- CLSID_HttpProtocol, CLSID_HttpSProtocol, CLSID_MkProtocol,
- CLSID_PSUrlMonProxy, CLSID_StdURLMoniker): Added.
- * lib/hlguids-uuid.c: State source of CLSIDs.
-
-2006-06-13 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * lib/Makefile.in: Added extras-uuid as an object and source.
- * lib/uuid.c (IID_IClientSiteHandler, IID_IContinue, IID_IHttpNegotiate,
- IID_IPersistMoniker, IID_IServerHandler, IID_ITargetEmbedding,
- IID_ITargetFrame, IID_ITypeComp, IID_IUrlHistoryStg, IID_IWinInetHttpInfo,
- IID_IWinInetInfo, IID_IEnumSTATPROPSETSTG, IID_IEnumSTATPROPSTG,
- IID_IEnumSTATURL): Remove. Moved to extras-uuid.c.
- * lib/extras-uuid.c: New file.
- Thank you to Julien Lecomte (julienlecomte at users dot sourceforge dot
- net).
-
-2006-06-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- [mingw-Bugs-1424461]
- *include/imagehlp.h: Comment out IN, OUT and OPTIONAL,
- throughout.
- *include/rpcdce.h: Don't define IN, OUT or OPTIONAL if
- _NO_W32_PSEUDO_MODIFIERS.
- *include/rpcnsi.h: Comment out IN, OUT and OPTIONAL,
- throughout.
- *include/rpcnsip.h: Likewise.
- *include/windef.h: Don't define IN, OUT or OPTIONAL
- if _NO_W32_PSEUDO_MODIFIERS.
- *include/ddk/batclass.h: Comment out IN, OUT and OPTIONAL,
- throughout.
- *include/ddk/cfgmgr32.h: Likewise.
- *include/ddk/ddkmapi.h: Likewise.
- *include/ddk/hidclass.h: Likewise.
- *include/ddk/hidpi.h: Likewise.
- *include/ddk/kbdmou.h: Likewise.
- *include/ddk/mcd.h: Likewise.
- *include/ddk/miniport.h: Likewise.
- *include/ddk/minitape.h: Likewise.
- *include/ddk/ndis.h: Likewise.
- *include/ddk/ndistapi.h: Likewise.
- *include/ddk/ndiswan.h: Likewise.
- *include/ddk/ntapi.h: Likewise.
- *include/ddk/ntdd8042.h: Likewise.
- *include/ddk/ntddpcm.h: Likewise.
- *include/ddk/ntifs.h: Likewise.
- *include/ddk/ntpoapi.h: Likewise.
- *include/ddk/parallel.h: Likewise.
- *include/ddk/pfhook.h: Likewise.
- *include/ddk/scsiwmi.h: Likewise.
- *include/ddk/smbus.h: Likewise.
- *include/ddk/srb.h: Likewise.
- *include/ddk/storport.h: Likewise.
- *include/ddk/tdikrnl.h: Likewise.
- *include/ddk/upssvc.h: Likewise.
- *include/ddk/usbcamdi.h: Likewise.
- *include/ddk/usbscan.h: Likewise.
- *include/ddk/video.h: Likewise.
- *include/ddk/videoagp.h: Likewise.
- *include/ddk/win2k.h: Likewise.
- *include/ddk/winddi.h: Likewise.
- *include/ddk/winddk.h: Don't define IN, OUT or OPTIONAL
- if _NO_W32_PSEUDO_MODIFIERS.
- Comment out IN, OUT and OPTIONAL, throughout.
- *include/ddk/winnt4.h: Comment out IN, OUT and OPTIONAL,
- throughout.
- *include/ddk/ws2san.h: Likewise.
-
-2006-06-10 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * lib/Makefile.in: Added hlguids-uuid as source and object.
-
-2006-06-10 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * lib/uuid.c (CLSID_StaticDib, CLSID_StaticMetafile, CLSID_StdHlink,
- CLSID_StdHlinkBrowseContext): Remove. Moved to relevant files.
- * lib/cguid-uuid.c (CLSID_StaticDib, CLSID_StaticMetafile): Added.
- * lib/hlguids-uuid.c: New file.
- Thank you to Julien Lecomte (julienlecomte at users dot sourceforge dot
- net).
-
-2006-06-10 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * lib/Makefile.in: Added urlmon-uuid and hlink-uuid as sources and
- objects.
- * lib/uuid.c (IID_IAuthenticate, IID_IBindHost, IID_IBindProtocol,
- IID_IBindStatusCallback, IID_IBindStatusCallbackMsg, IID_IBinding,
- IID_IHlink, IID_IHlinkBrowseContext, IID_IHlinkFrame, IID_IHlinkSite,
- IID_IHlinkTarget): Remove. Moved to new files.
- * lib/urlmon-uuid.c: New file.
- * lib/hlink-uuid.c: New file.
-
-2006-06-10 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * lib/Makefile.in: Added ativscp-uuid as source and object.
- * lib/uuid.c (IID_IActiveScript, IID_IActiveScriptError,
- IID_IActiveScriptParse, IID_IActiveScriptSite,
- IID_IActiveScriptSiteWindow): Remove. Moved to ativscp-uuid.c.
- * lib/ativscp-uuid.c: New file.
-
-2006-06-09 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * lib/uuid.c (IID_IClientSecurity, IID_IMallocSpy, IID_IServerSecurity):
- Remove. Moved to objidl-uuid.c
- * lib/objidl-uuid.c (IID_IClientSecurity, IID_IMallocSpy,
- IID_IServerSecurity): Defined.
-
-2006-06-09 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * lib/Makefile.in: Add cguid-uuid and olectlid-uuid as sources and
- objects.
- * lib/uuid.c (CLSID_CColorPropPage, CLSID_CFontPropPage,
- CLSID_CPicturePropPage, CLSID_Picture_Dib, CLSID_Picture_Metafile,
- CLSID_StdFont, CLSID_StdPicture, GUID_NULL, IID_ICreateTypeInfo,
- IID_ICreateTypeInfo2, IID_ICreateTypeLib, IID_ICreateTypeLib2, IID_IDebug,
- IID_IDebugStream, IID_IDispatch, IID_IEnumFORMATETC,IID_IEnumMoniker,
- IID_IEnumOLEVERB, IID_IEnumSTATDATA, IID_IEnumSTATSTG, IID_IEnumString,
- IID_IEnumUnknown, IID_IEnumVARIANT, IID_IOleLink, IID_IPSFactory,
- IID_IRpcChannel, IID_IRpcProxy, IID_IRpcStub, IID_ITypeInfo,
- IID_ITypeInfo2, IID_ITypeLib, IID_ITypeLib2): Remove. Moved to relevant
- files.
- * lib/oaidl-uuid.c (IID_ICreateTypeInfo, IID_ICreateTypeInfo2,
- IID_ICreateTypeLib, IID_ICreateTypeLib2, IID_ITypeInfo, IID_ITypeInfo2,
- IID_ITypeLib, IID_ITypeLib2, IID_IEnumVARIANT): Define.
- * lib/cguid-uuid.c: New file.
- * lib/olectlid-uuid.c: New file.
-
-2006-06-08 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * lib/Makefile.in: Add objsafe-uuid oaidl-uuid docobj-uuid comcat-uuid
- exdisp-uuid mlang-uuid objidl-uuid as sources and objects.
- * lib/uuid.c (CATID_Control, CATID_DocObject, CATID_Insertable,
- CATID_PersistsToPropertyBag, CATID_PersistsToStorage, CATID_PersistsToStream,
- CATID_PersistsToStreamInit, CATID_Printable, CATID_Programmable,
- CLSID_CMultiLanguage, CLSID_StdComponentCategoriesMgr, CLSID_WebBrowser,
- DIID_DWebBrowserEvents, DIID_DWebBrowserEvents2, IID_IAdviseSink,
- IID_IAdviseSink2, IID_IBindCtx, IID_ICatInformation, IID_ICatRegister,
- IID_IClassActivator, IID_IContinueCallback, IID_ICreateErrorInfo,
- IID_IDataAdviseHolder, IID_IDataObject, IID_IEnumCATEGORYINFO,
- IID_IEnumGUID, IID_IEnumOleDocumentViews, IID_IErrorInfo,
- IID_IExternalConnection, IID_IFillLockBytes, IID_ILockBytes, IID_IMalloc,
- IID_IMarshal, IID_IMessageFilter, IID_IMoniker, IID_IObjectSafety,
- IID_IOleCommandTarget, IID_IOleDocument, IID_IOleDocumentSite,
- IID_IOleDocumentView, IID_IPSFactoryBuffer, IID_IPersist,
- IID_IPersistFile, IID_IPersistStorage, IID_IPersistStream, IID_IPrint,
- IID_IProgressNotify, IID_IPropertySetStorage, IID_IPropertyStorage,
- IID_IROTData, IID_IRootStorage, IID_IRpcChannelBuffer,
- IID_IRpcProxyBuffer, IID_IRpcStubBuffer, IID_IRunnableObject,
- IID_IRunningObjectTable, IID_ISequentialStream, IID_IStdMarshalInfo,
- IID_IStorage, IID_IStream, IID_ISupportErrorInfo, IID_IWebBrowser,
- IID_IWebBrowser2, IID_IWebBrowserApp): Remove. Moved to new files.
- * lib/comcat-uuid.c: New file.
- * lib/docobj-uuid.c: New File.
- * lib/exdisp-uuid.c: New file.
- * lib/mlang-uuid.c: New file.
- * lib/oaidl-uuid.c: New file.
- * lib/objidl-uuid.c: New file.
- * lib/objsafe-uuid.c: New file.
-
-2006-06-07 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * lib/Makefile.in: Add oleacc-uuid oleidl-uuid ocidl-uuid as sources and
- objects.
- * lib/uuid.c (IID_IOleCache, IID_IOleCache2, IID_IOleCacheControl, IID_IViewObject,
- IID_IViewObject2, IID_IDropSource, IID_IDropTarget, IID_IOleAdviseHolder,
- IID_IOleInPlaceUIWindow, IID_IOleInPlaceObject, IID_IOleInPlaceActiveObject,
- IID_IOleInPlaceFrame, IID_IOleInPlaceSite, IID_IOleContainer, IID_IOleItemContainer,
- IID_IOleClientSite, IID_IOleObject, IID_IOleWindow, IID_IParseDisplayName,
- IID_IAccessible, LIBID_Accessibility, IID_IQuickActivate, IID_IOleUndoManager,
- IID_IOleParentUndoUnit, IID_IOleUndoUnit, IID_IEnumOleUndoUnits, IID_IPointerInactive,
- IID_IAdviseSinkEx, IID_IOleInPlaceSiteEx, IID_IOleControl, IID_IOleControlSite,
- IID_IPersistPropertyBag, IID_IPersistPropertyBag2, IID_IPersistStreamInit,
- IID_IPersistMemory, IID_IPropertyBag, IID_IPropertyBag2, IID_IPropertyNotifySink,
- IID_IPropertyPage, IID_IPropertyPage2, IID_IPropertyPageSite, IID_IFont, IID_IFontDisp,
- IID_IPicture, IID_IPictureDisp, IID_IProvideClassInfo, IID_IProvideClassInfo2,
- IID_IEnumConnectionPoints, IID_IEnumConnections, IID_IConnectionPoint,
- IID_IConnectionPointContainer, IID_IClassFactory2, IID_IErrorLog,
- IID_IObjectWithSite, IID_IPerPropertyBrowsing, IID_ISimpleFrameSite,
- IID_ISpecifyPropertyPages): Remove. Moved to new files.
- * lib/oleidl-uuid.c: New file.
- * lib/oleacc-uuid.c: New file.
- * lib/ocidl-uuid.c: New file.
-
-2006-06-04 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * lib/Makefile.in: Add unknwn-uuid and servprov-uuid as sources and
- objects.
- * lib/uuid.c (IID_IUnknown, IID_IClassFactory, IID_IServiceProvider):
- Remove. Moved to unknwn-uuid and servprov-uuid.
- * lib/unknwn-uuid.c: New file.
- * lib/servprov-uuid.c: New file.
-
-2006-06-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/strmif.h (VMRDeinterlaceTech): Correct typedef for DeinterlaceTech_*
- enum.
-
-2006-06-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/strmif.h (enum tagAnalogVideoStandard): Add missing ','.
-
-2006-06-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winuser.h (DM_BITSPERPEL, DM_PELSWIDTH, DM_PELSHEIGHT,
- DM_DISPLAYFLAGS, DM_DISPLAYFREQUENCY): Remove. Duplicates of
- wingdi.h defines.
-
-2006-06-02 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h ((SPI_GETMOUSETRAILS,SPI_SETMOUSETRAILS): Remove
- duplicate defines.
-
- * include/winnt.h (SUBLANG_ARABIC_SAUDI_ARABIA): Revert accidental
- removal.
- (SUBLANG_MARATHI_INDIA): Remove duplicate define.
-
-2006-05-24 Christopher Faylor <cgf@timesys.com>
-
- * configure.in: Update to newer autoconf.
- (thanks to Steve Ellcey)
- * configure: Regenerate.
- * aclocal.m4: New file.
-
-2006-05-21 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/uuid.c (IID_IRpcProxyBuffer34): Remove definition.
-
-2006-05-12 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/rtutils.h (TraceDumpA,TraceDumpW,TracePutsA,TracePutsW)
- (TraceRegisterA,TraceRegisterW,TraceVprintfA,TraceVprintfW): Define
- as macros.
- Thanks to: Bruce M Simpson <bms_spc at sf dot net>
-
-2006-05-12 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/mprapi.h (MprAdminMIBBufferFree,MprAdminMIBEntryCreate)
- (MprAdminMIBEntryDelete,MprAdminMIBEntryGet,MprAdminMIBEntryGetFirst)
- (MprAdminMIBEntryGetNext,MprAdminMIBEntrySet,MprAdminMIBGetTrapInfo)
- (MprAdminMIBServerConnect,MprAdminMIBServerDisconnect)
- (MprAdminMIBSetTrapInfo): Declare functions.
- Note: MprAdminMIBSetTrapInfo is missing from mprapi.def.
- (MIB_SERVER_HANDLE): New typedef.
- (MprConfigTransportSetInfo): Declare function.
- * lib/mprapi.def (MprSetupIpInIpInterfaceFriendlyNameEnum)
- (MprSetupIpInIpInterfaceFriendlyNameFree): Fix size.
-
-2006-05-12 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * lib/rtutils.def: New file. Generated on Windows XP.
- (TracePrintf{AW},TracePrintfEx{AW}): Left out for now.
- * include/rtutils.h: New file.
- (TraceDump{AW},TracePuts{AW},TraceRegister{AW},TraceVprintf{AW}):
- Commented out, they're missing from rtutils.def.
-
-2006-05-12 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/mprapi.h (MprInfoBlockAdd,MprInfoBlockFind)
- (MprInfoBlockQuerySize,MprInfoBlockRemove,MprInfoBlockSet)
- (MprInfoCreate,MprInfoDelete,MprInfoDuplicate)
- (MprInfoRemoveAll): Declare functions.
-
-2006-05-12 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/mprapi.h (MprConfigBufferFree,MprConfigGetFriendlyName)
- (MprConfigGetGuidName,MprConfigInterfaceCreate)
- (MprConfigInterfaceDelete,MprConfigInterfaceEnum)
- (MprConfigInterfaceGetHandle,MprConfigInterfaceGetInfo)
- (MprConfigInterfaceSetInfo,MprConfigInterfaceTransportAdd)
- (MprConfigInterfaceTransportEnum,MprConfigInterfaceTransportGetHandle)
- (MprConfigInterfaceTransportGetInfo,MprConfigInterfaceTransportRemove)
- (MprConfigInterfaceTransportSetInfo,MprConfigServerBackup)
- (MprConfigServerConnect,MprConfigServerDisconnect)
- (MprConfigServerGetInfo,MprConfigServerInstall)
- (MprConfigServerRestore,MprConfigTransportCreate)
- (MprConfigTransportDelete,MprConfigTransportEnum)
- (MprConfigTransportGetHandle,MprConfigTransportGetInfo)
- (MprConfigTransportSetInfo): Declare functions.
-
-2006-05-12 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/mprapi.h (MprAdminBufferFree)
- (MprAdminDeregisterConnectionNotification,MprAdminGetErrorString)
- (MprAdminInterfaceConnect,MprAdminInterfaceCreate)
- (MprAdminInterfaceDelete,MprAdminInterfaceDeviceGetInfo)
- (MprAdminInterfaceDeviceSetInfo,MprAdminInterfaceDisconnect)
- (MprAdminInterfaceEnum,MprAdminInterfaceGetCredentials)
- (MprAdminInterfaceGetCredentialsEx,MprAdminInterfaceGetHandle)
- (MprAdminInterfaceGetInfo,MprAdminInterfaceQueryUpdateResult)
- (MprAdminInterfaceSetCredentials,MprAdminInterfaceSetCredentialsEx)
- (MprAdminInterfaceSetInfo,MprAdminInterfaceTransportAdd)
- (MprAdminInterfaceTransportGetInfo,MprAdminInterfaceTransportRemove)
- (MprAdminInterfaceTransportSetInfo)
- (MprAdminInterfaceUpdatePhonebookInfo,MprAdminInterfaceUpdateRoutes)
- (MprAdminIsServiceRunning,MprAdminRegisterConnectionNotification)
- (MprAdminServerConnect,MprAdminServerDisconnect)
- (MprAdminServerGetCredentials,MprAdminServerGetInfo)
- (MprAdminServerSetCredentials,MprAdminTransportCreate)
- (MprAdminTransportGetInfo,MprAdminTransportSetInfo): Declare functions.
-
-2006-05-12 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/ipxtfflt.h: New file.
-
-2006-05-12 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/mprapi.h: Fix header guard. Cleanup.
- (MprAdminAcceptNewConnection,MprAdminAcceptNewConnection2)
- (MprAdminAcceptNewLink,MprAdminAcceptReauthentication)
- (MprAdminConnectionHangupNotification)
- (MprAdminConnectionHangupNotification2)
- (MprAdminGetIpAddressForUser,MprAdminInitializeDll)
- (MprAdminTerminateDll,MprAdminLinkHangupNotification)
- (MprAdminReleaseIpAddress): Declare functions.
- * lib/mprapi.def: Regenerate on Windows XP.
-
-2006-05-12 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/ipifcons.h: Cleanup.
- * include/ipxconst.h: Fix header guard.
- * include/ipxrtdef.h: include <ipxconst.h>.
-
-2006-05-11 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/ipxrtdef.h: Cleanup.
- (IPX_INTERFACE_INFO_TYPE,IPX_STATIC_ROUTE_INFO_TYPE)
- (IPX_STATIC_SERVICE_INFO_TYPE,IPX_SERVICE_FILTER_INFO_TYPE)
- (IPX_ROUTE_FILTER_INFO_TYPE,IPX_IN_TRAFFIC_FILTER_INFO_TYPE)
- (IPX_ADAPTER_INFO_TYPE,IPXWAN_INTERFACE_INFO_TYPE,IPX_GLOBAL_INFO_TYPE)
- (IPX_STATIC_NETBIOS_NAME_INFO_TYPE)
- (IPX_IN_TRAFFIC_FILTER_GLOBAL_INFO_TYPE)
- (IPX_OUT_TRAFFIC_FILTER_INFO_TYPE)
- (IPX_OUT_TRAFFIC_FILTER_GLOBAL_INFO_TYPE): Define.
- * include/routprot.h: Cleanup.
- (PROTO_IP_OTHER,PROTO_IP_LOCAL,PROTO_IP_NETMGMT,PROTO_IP_ICMP)
- (PROTO_IP_EGP,PROTO_IP_GGP,PROTO_IP_HELLO,PROTO_IP_RIP,PROTO_IP_IS_IS)
- (PROTO_IP_ES_IS,PROTO_IP_CISCO,PROTO_IP_BBN,PROTO_IP_OSPF,PROTO_IP_BGP)
- (PROTO_IP_BOOTP,PROTO_IP_NT_AUTOSTATIC,PROTO_IP_NT_STATIC)
- (PROTO_IP_NT_STATIC_NON_DOD,IPRTRMGR_PID,IPX_PROTOCOL_BASE)
- (IPX_PROTOCOL_RIP,IPX_PROTOCOL_SAP,IPX_PROTOCOL_NLSP): Define.
- * include/fltdefs.h: New file.
- * include/ipinfoid.h: New file.
-
-2006-05-11 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/strmif.h (IAMAnalogVideoDecoder,IAMAudioInputMixer)
- (IAMAudioRendererStats,IAMBufferNegotiation,IAMCameraControl)
- (IAMCertifiedOutputProtection): Add interfaces.
- * include/adsprop.h: New file.
- * include/cmnquery.h: New file.
- * include/dsadmin.h: New file.
- * include/dsclient.h: New file.
- * include/dsgetdc.h: New file.
- * include/dsquery.h: New file.
- * include/dsrole.h: New file.
- * include/ntdsapi.h: New file.
- * include/ntdsbcli.h: New file.
- * include/objsel.h: New file.
-
-2006-05-10 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/qedit.h (DEXTER_PARAM,DEXTER_VALUE,SCompFmt0): Add structures.
- (DEXTERF_TRACK_SEARCH_FLAGS,TIMELINE_MAJOR_TYPE): Add enums.
- (CONNECTF_DYNAMIC_NONE,CONNECTF_DYNAMIC_SOURCES)
- (CONNECTF_DYNAMIC_EFFECTS,SFN_VALIDATEF_CHECK,SFN_VALIDATEF_POPUP)
- (SFN_VALIDATEF_TELLME,SFN_VALIDATEF_REPLACE,SFN_VALIDATEF_USELOCAL)
- (SFN_VALIDATEF_NOFIND,SFN_VALIDATEF_IGNOREMUTED,RESIZEF_STRETCH)
- (RESIZEF_CROP,RESIZEF_PRESERVEASPECTRATIO)
- (RESIZEF_PRESERVEASPECTRATIO_NOLETTERBOX): Define.
-
-2006-05-10 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/qedit.h: New file.
- * include/errors.h: Cleanup.
-
-2006-05-10 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/amvideo.h (BIT_MASKS_MATCH): Don't use memcmp to
- avoid dependency on <string.h>.
- There's no Win32 equivalent for memcmp:
- http://support.microsoft.com/default.aspx?scid=kb;EN-US;q99456
-
-2006-05-10 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/amvideo.h (RESET_MASKS,RESET_PALETTE): Use ZeroMemory
- instead of memset to avoid dependency on <string.h>.
- * include/dshow.h (AM_ASPECT_RATIO_MODE,AM_WST_DRAWBGMODE,AM_WST_LEVEL)
- (AMExtendedSeekingCapabilities,AM_WST_SERVICE,AM_WST_STATE)
- (AM_WST_STYLE): Add enums.
- (AM_WST_PAGE,AMVABeginFrameInfo,AMVACompBufferInfo,AMVAEndFrameInfo,
- AMVAInternalMemInfo,AMVAUncompBufferInfo,AMVAUncompDataInfo): New
- structures.
- * include/errors.h (VFW_E_DVD_CMD_CANCELLED)
- (VFW_E_DVD_STATE_WRONG_VERSION,VFW_E_DVD_STATE_CORRUPT)
- (VFW_E_DVD_STATE_WRONG_DISC,VFW_E_DVD_INCOMPATIBLE_REGION)
- (VFW_E_DVD_NO_ATTRIBUTES,VFW_E_DVD_NO_GOUP_PGC)
- (VFW_E_DVD_LOW_PARENTAL_LEVEL,VFW_E_DVD_NOT_IN_KARAOKE_MODE)
- (VFW_E_FRAME_STEP_UNSUPPORTED,VFW_E_DVD_STREAM_DISABLED)
- (VFW_E_DVD_TITLE_UNKNOWN,VFW_E_DVD_INVALID_DISC)
- (VFW_E_DVD_NO_RESUME_INFORMATION)
- (VFW_E_PIN_ALREADY_BLOCKED_ON_THIS_THREAD,VFW_E_PIN_ALREADY_BLOCKED)
- (VFW_E_CERTIFICATION_FAILURE,VFW_E_VMR_NOT_IN_MIXER_MODE)
- (VFW_E_VMR_NO_AP_SUPPLIED,VFW_E_VMR_NO_DEINTERLACE_HW)
- (VFW_E_VMR_NO_PROCAMP_HW,VFW_E_DVD_VMR9_INCOMPATIBLEDEC)
- (VFW_E_NO_COPP_HW,VFW_E_BAD_KEY): Define.
- * include/evcode.h (AM_WMT_EVENT_DATA): New structure.
- * include/mmsystem.h (WAVE_FORMAT_EXTENSIBLE): Define.
- * include/edevdefs.h (ED_FORMAT_SMPTE_30,ED_FORMAT_SMPTE_30DROP)
- (ED_FORMAT_SMPTE_25,ED_FORMAT_SMPTE_24): Move from here...
- * include/strmif.h: ... to here. New file.
- * include/aviriff.h: New file.
- * include/bdatypes.h: New file.
- * include/control.h: New file.
- * include/dvdmedia.h: New file.
- * include/il21dec.h: New file.
- * include/ks.h: New file.
- * include/ksmedia.h: New file.
- * include/mmreg.h: New file.
- * include/mpegtype.h: New file.
- * include/vidcap.h: New file.
- * include/vmr9.h: New file.
- * include/vptype.h: New file.
- * include/xprtdefs.h: New file.
-
-2006-05-10 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winnls.h [WINVER >= 0x0500] (LOCALE_IDEFAULTEBCDICCODEPAGE):
- Documented as defined on Windows 2000 or later.
- [WINVER >= 0x0600] (LOCALE_SDURATION,LOCALE_SIETFLANGUAGE)
- (LOCALE_SISO3166CTRYNAME2,LOCALE_SISO639LANGNAME2)
- (LOCALE_SKEYBOARDSTOINSTALL,LOCALE_SNAME,LOCALE_SNAN)
- (LOCALE_SNEGINFINITY,LOCALE_SPOSINFINITY,LOCALE_SSCRIPTS): Documented
- but values unknown, Windows Vista or later.
- (CAL_UMALQURA): Cleanup.
- (CAL_SSHORTESTDAYNAME_1,CAL_SSHORTESTDAYNAME_2,CAL_SSHORTESTDAYNAME_3)
- (CAL_SSHORTESTDAYNAME_4,CAL_SSHORTESTDAYNAME_5,CAL_SSHORTESTDAYNAME_6)
- (CAL_SSHORTESTDAYNAME7): Cleanup.
- [WINVER >= 0x0410] (CAL_SYEARMONTH,CAL_ITWODIGITYEARMAX)
- (CAL_NOUSEROVERRIDE,CAL_RETURN_NUMBER,CAL_USE_CP_ACP): Cleanup.
-
-2006-05-10 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/wingdi.h [WINVER >= 0x0500] (DC_PERSONALITY,DC_PRINTRATE)
- (DC_PRINTRATEUNIT,DC_PRINTERMEM,DC_MEDIAREADY,DC_STAPLE)
- (DC_PRINTRATEPPM,DC_COLORDEVICE,DC_NUP,DC_MEDIATYPENAMES)
- (DC_MEDIATYPES,DMPAPER_DBL_JAPANESE_POSTCARD,DMPAPER_A6)
- (DMPAPER_JENV_KAKU2,DMPAPER_JENV_KAKU3,DMPAPER_JENV_CHOU3)
- (DMPAPER_JENV_CHOU4,DMPAPER_LETTER_ROTATED)
- (DMPAPER_A3_ROTATED,DMPAPER_A4_ROTATED,DMPAPER_A5_ROTATED)
- (DMPAPER_B4_JIS_ROTATED,DMPAPER_B5_JIS_ROTATED)
- (DMPAPER_JAPANESE_POSTCARD_ROTATED)
- (DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED)
- (DMPAPER_A6_ROTATED,DMPAPER_JENV_KAKU2_ROTATED)
- (DMPAPER_JENV_KAKU3_ROTATED,DMPAPER_JENV_CHOU3_ROTATED)
- (DMPAPER_JENV_CHOU4_ROTATED,DMPAPER_B6_JIS)
- (DMPAPER_B6_JIS_ROTATED,DMPAPER_12X11,DMPAPER_JENV_YOU4)
- (DMPAPER_JENV_YOU4_ROTATED,DMPAPER_P16K,DMPAPER_P32K)
- (DMPAPER_P32KBIG,DMPAPER_PENV_1,DMPAPER_PENV_2)
- (DMPAPER_PENV_3,DMPAPER_PENV_4,DMPAPER_PENV_5)
- (DMPAPER_PENV_6,DMPAPER_PENV_7,DMPAPER_PENV_8)
- (DMPAPER_PENV_9,DMPAPER_PENV_10,DMPAPER_P16K_ROTATED)
- (DMPAPER_P32K_ROTATED,DMPAPER_P32KBIG_ROTATED)
- (DMPAPER_PENV_1_ROTATED,DMPAPER_PENV_2_ROTATED)
- (DMPAPER_PENV_3_ROTATED,DMPAPER_PENV_4_ROTATED)
- (DMPAPER_PENV_5_ROTATED,DMPAPER_PENV_6_ROTATED)
- (DMPAPER_PENV_7_ROTATED,DMPAPER_PENV_8_ROTATED)
- (DMPAPER_PENV_9_ROTATED,DMPAPER_PENV_10_ROTATED): Define.
- (DMPAPER_LAST): Value depends on DMPAPER_* variables actually defined.
- (DM_PANNINGWIDTH,DM_PANNINGHEIGHT,DM_DISPLAYFIXEDOUTPUT)
- (DMDO_DEFAULT,DMDO_90,DMDO_180,DMDO_270,DMDFO_DEFAULT,DMDFO_STRETCH)
- (DMDFO_CENTER): Define.
- (GetDCBrushColor,GetDCPenColor): Declare.
- * lib/msimg32.def (GetDCBrushColor,GetDCPenColor): Add stubs.
-
-2006-05-10 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winnt.h (LANG_PERSIAN,LANG_LOWER_SORBIAN,LANG_UPPER_SORBIAN)
- (LANG_TSWANA,LANG_XHOSA,LANG_ZULU,LANG_MALTESE,LANG_SAMI,LANG_IRISH)
- (LANG_TIBETAN,LANG_WELSH,LANG_KHMER,LANG_LAO,LANG_SINHALESE)
- (LANG_INUKTITUT,LANG_AMHARIC,LANG_TAMAZIGHT,LANG_FRISIAN)
- (LANG_PASHTO,LANG_FILIPINO,LANG_HAUSA,LANG_YORUBA,LANG_QUECHUA)
- (LANG_SOTHO,LANG_BASHKIR,LANG_LUXEMBOURGISH,LANG_GREENLANDIC)
- (LANG_IGBO,LANG_TIGRIGNA,LANG_YI,LANG_MAPUDUNGUN,LANG_MOHAWK)
- (LANG_BRETON,LANG_UIGHUR,LANG_MAORI,LANG_OCCITAN,LANG_CORSICAN)
- (LANG_ALSATIAN,LANG_YAKUT,LANG_KICHE,LANG_KINYARWANDA,LANG_WOLOF)
- (LANG_DARI,LANG_MALAGASY)
- (SUBLANG_CUSTOM_DEFAULT,SUBLANG_CUSTOM_UNSPECIFIED)
- (SUBLANG_UI_CUSTOM_DEFAULT,SUBLANG_AFRIKAANS_SOUTH_AFRICA)
- (SUBLANG_ALBANIAN_ALBANIA,SUBLANG_ALSATIAN_FRANCE)
- (SUBLANG_AMHARIC_ETHIOPIA,SUBLANG_ARMENIAN_ARMENIA)
- (SUBLANG_ASSAMESE_INDIA,SUBLANG_BASHKIR_RUSSIA,SUBLANG_BASQUE_BASQUE)
- (SUBLANG_BELARUSIAN_BELARUS,SUBLANG_BENGALI_INDIA)
- (SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN)
- (SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC)
- (SUBLANG_BRETON_FRANCE,SUBLANG_BULGARIAN_BULGARIA)
- (SUBLANG_CATALAN_CATALAN,SUBLANG_CORSICAN_FRANCE)
- (SUBLANG_CZECH_CZECH_REPUBLIC,SUBLANG_CROATIAN_CROATIA)
- (SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN,SUBLANG_DANISH_DENMARK)
- (SUBLANG_DIVEHI_MALDIVES,SUBLANG_ENGLISH_IRELAND)
- (SUBLANG_ENGLISH_INDIA,SUBLANG_ENGLISH_MALAYSIA)
- (SUBLANG_ENGLISH_SINGAPORE,SUBLANG_ESTONIAN_ESTONIA)
- (SUBLANG_FAEROESE_FAROE_ISLANDS,SUBLANG_FILIPINO_PHILIPPINES)
- (SUBLANG_FINNISH_FINLAND,SUBLANG_FRISIAN_NETHERLANDS)
- (SUBLANG_GALICIAN_GALICIAN,SUBLANG_GEORGIAN_GEORGIA)
- (SUBLANG_GREEK_GREECE,SUBLANG_GREENLANDIC_GREENLAND)
- (SUBLANG_GUJARATI_INDIA,SUBLANG_HAUSA_NIGERIA,SUBLANG_HEBREW_ISRAEL)
- (SUBLANG_HINDI_INDIA,SUBLANG_HUNGARIAN_HUNGARY)
- (SUBLANG_ICELANDIC_ICELAND,SUBLANG_IGBO_NIGERIA)
- (SUBLANG_INDONESIAN_INDONESIA,SUBLANG_INUKTITUT_CANADA)
- (SUBLANG_INUKTITUT_CANADA_LATIN,SUBLANG_IRISH_IRELAND)
- (SUBLANG_JAPANESE_JAPAN,SUBLANG_KAZAK_KAZAKHSTAN)
- (SUBLANG_KHMER_CAMBODIA,SUBLANG_KICHE_GUATEMALA)
- (SUBLANG_KINYARWANDA_RWANDA,SUBLANG_KONKANI_INDIA)
- (SUBLANG_KYRGYZ_KYRGYZSTAN,SUBLANG_LAO_LAO_PDR)
- (SUBLANG_LATVIAN_LATVIA,SUBLANG_LITHUANIAN_LITHUANIA)
- (SUBLANG_LOWER_SORBIAN_GERMANY,SUBLANG_LUXEMBOURGISH_LUXEMBOURG)
- (SUBLANG_MACEDONIAN_MACEDONIA,SUBLANG_MALAYALAM_INDIA)
- (SUBLANG_MALTESE_MALTA,SUBLANG_MAORI_NEW_ZEALAND)
- (SUBLANG_MAPUDUNGUN_CHILE,SUBLANG_MARATHI_INDIA,SUBLANG_MOHAWK_MOHAWK)
- (SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA,SUBLANG_MONGOLIAN_PRC)
- (SUBLANG_NEPALI_NEPAL,SUBLANG_OCCITAN_FRANCE,SUBLANG_ORIYA_INDIA)
- (SUBLANG_PASHTO_AFGHANISTAN,SUBLANG_PERSIAN_IRAN)
- (SUBLANG_POLISH_POLAND,SUBLANG_PORTUGUESE_PORTUGAL)
- (SUBLANG_PUNJABI_INDIA,SUBLANG_QUECHUA_BOLIVIA,SUBLANG_QUECHUA_ECUADOR)
- (SUBLANG_QUECHUA_PERU,SUBLANG_ROMANIAN_ROMANIA)
- (SUBLANG_ROMANSH_SWITZERLAND,SUBLANG_RUSSIAN_RUSSIA)
- (SUBLANG_SAMI_NORTHERN_NORWAY,SUBLANG_SAMI_NORTHERN_SWEDEN)
- (SUBLANG_SAMI_NORTHERN_FINLAND,SUBLANG_SAMI_LULE_NORWAY)
- (SUBLANG_SAMI_LULE_SWEDEN,SUBLANG_SAMI_SOUTHERN_NORWAY)
- (SUBLANG_SAMI_SOUTHERN_SWEDEN,SUBLANG_SAMI_SKOLT_FINLAND)
- (SUBLANG_SAMI_INARI_FINLAND,SUBLANG_SANSKRIT_INDIA)
- (SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN)
- (SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC)
- (SUBLANG_SINDHI_AFGHANISTAN,SUBLANG_SINHALESE_SRI_LANKA)
- (SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA,SUBLANG_SLOVAK_SLOVAKIA)
- (SUBLANG_SLOVENIAN_SLOVENIA,SUBLANG_SPANISH_US,SUBLANG_SWEDISH_SWEDEN)
- (SUBLANG_SYRIAC,SUBLANG_TAJIK_TAJIKISTAN)
- (SUBLANG_TAMAZIGHT_ALGERIA_LATIN,SUBLANG_TAMIL_INDIA)
- (SUBLANG_TATAR_RUSSIA,SUBLANG_TELUGU_INDIA,SUBLANG_THAI_THAILAND)
- (SUBLANG_TIBETAN_PRC,SUBLANG_TIBETAN_BHUTAN,SUBLANG_TIGRIGNA_ERITREA)
- (SUBLANG_TSWANA_SOUTH_AFRICA,SUBLANG_TURKISH_TURKEY)
- (SUBLANG_TURKMEN_TURKMENISTAN,SUBLANG_UIGHUR_PRC)
- (SUBLANG_UKRAINIAN_UKRAINE,SUBLANG_UPPER_SORBIAN_GERMANY)
- (SUBLANG_VIETNAMESE_VIETNAM,SUBLANG_WELSH_UNITED_KINGDOM)
- (SUBLANG_WOLOF_SENEGAL,SUBLANG_YORUBA_NIGERIA)
- (SUBLANG_XHOSA_SOUTH_AFRICA,SUBLANG_YAKUT_RUSSIA,SUBLANG_YI_PRC)
- (SUBLANG_ZULU_SOUTH_AFRICA): Define.
- (SUBLANG_ARABIC_SAUDI_ARABIA): Removed by error.
- (SUBLANG_MARATHI_INDIA): Defined twice by error.
-
-2006-05-05 Chris Sutcliffe <ir0nh34d@users.sf.net>
-
- * lib/directx/Makefile.in: Remove reference to libquartz.a since
- it was moved.
-
-2006-05-05 Earnie Boyd <earnie@users.sf.net>
-
- * lib/scrnsave.c: Correct misspelled SPI_SCREENSAVERUNNING to
- SPI_SETSCREENSAVERUNNING.
- * include winuser.h (SPI_SCREENSAVERRUNNING): Remove again.
-
-2006-05-04 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h (SPI_SCREENSAVERRUNNING): Define.
- It had been removed because it's no documented, but Cygwin needs it.
-
-2006-05-04 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/amvideo.h (IFullScreenVideo): Define.
- (BIT_MASKS_MATCH,PALETTISED,PALETTE_ENTRIES,RESET_MASKS,RESET_PALETTE,
- SIZE_EGA_PALETTE,SIZE_MASKS,SIZE_PALETTE): Added Macros.
-
-2006-05-04 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winnls.h (CAL_SYEARMONTH,CAL_ITWODIGITYEARMAX,
- CAL_NOUSEROVERRIDE,CAL_RETURN_NUMBER,CAL_USE_CP_ACP): Documented
- as available on Windows 98 and better.
- (CAL_SSHORTESTDAYNAME_1,CAL_SSHORTESTDAYNAME_2,CAL_SSHORTESTDAYNAME_3)
- (CAL_SSHORTESTDAYNAME_4,CAL_SSHORTESTDAYNAME_5,CAL_SSHORTESTDAYNAME_6)
- (CAL_SSHORTESTDAYNAME7,CAL_UMALQURA): Define, Windows Vista and better.
-
-2006-05-04 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/amvideo.h: New file.
- * include/dshow.h: Include <amvideo.h>.
-
-2006-05-04 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h (MOUSEEVENTF_XDOWN,MOUSEEVENTF_XUP): Define.
- (MOUSEEVENTF_MOVE,MOUSEEVENTF_LEFTDOWN,MOUSEEVENTF_LEFTUP)
- (MOUSEEVENTF_RIGHTDOWN,MOUSEEVENTF_RIGHTUP,MOUSEEVENTF_MIDDLEDOWN)
- (MOUSEEVENTF_MIDDLEUP,MOUSEEVENTF_ABSOLUTE,MOUSEEVENTF_WHEEL): Cleanup.
- (HWND_BROADCAST): Cleanup.
- (HWND_MESSAGE): Windows 2000 only.
- (SMTO_ABORTIFHUNG,SMTO_BLOCK,SMTO_NORMAL): Cleanup.
- (SMTO_NOTIMEOUTIFNOTHUNG): Define.
- (SIF_DISABLENOSCROLL,SIF_PAGE,SIF_POS,SIF_RANGE,SIF_TRACKPOS)
- (SIF_ALL): Cleanup.
- (SWP_DRAWFRAME,SWP_FRAMECHANGED,SWP_HIDEWINDOW,SWP_NOACTIVATE)
- (SWP_NOCOPYBITS,SWP_NOMOVE,SWP_NOSIZE,SWP_NOREDRAW,SWP_NOZORDER)
- (SWP_SHOWWINDOW,SWP_NOOWNERZORDER,SWP_NOREPOSITION,SWP_NOSENDCHANGING)
- (SWP_DEFERERASE,SWP_ASYNCWINDOWPOS): Cleanup.
- (HSHELL_ENDTASK,HSHELL_ACCESSIBILITYSTATE,HSHELL_APPCOMMAND): Define.
- (SPI_GETBLOCKSENDINPUTRESETS,SPI_GETCARETWIDTH,SPI_GETDROPSHADOW)
- (SPI_GETFILTERKEYS,SPI_GETFLATMENU,SPI_GETFOCUSBORDERHEIGHT)
- (SPI_GETFOCUSBORDERWIDTH,SPI_GETFONTSMOOTHINGCONTRAST)
- (SPI_GETFONTSMOOTHINGTYPE,SPI_GETFOREGROUNDFLASHCOUNT)
- (SPI_GETMENUSHOWDELAY,SPI_GETMOUSECLICKLOCK,SPI_GETMOUSECLICKLOCKTIME)
- (SPI_GETMOUSEHOVERHEIGHT,SPI_GETMOUSEHOVERTIME,SPI_GETMOUSEHOVERWIDTH)
- (SPI_GETMOUSESONAR,SPI_GETMOUSEVANISH,SPI_GETNONCLIENTMETRICS)
- (SPI_GETPOWEROFFACTIVE,SPI_GETPOWEROFFTIMEOUT,SPI_GETSCREENREADER)
- (SPI_GETSCREENSAVEACTIVE,SPI_GETSCREENSAVERRUNNING)
- (SPI_GETSCREENSAVETIMEOUT,SPI_GETMOUSEVANISH,SPI_GETNONCLIENTMETRICS)
- (SPI_GETPOWEROFFACTIVE,SPI_GETPOWEROFFTIMEOUT,SPI_GETSCREENREADER)
- (SPI_GETSCREENSAVEACTIVE,SPI_GETSCREENSAVERRUNNING)
- (SPI_GETSCREENSAVETIMEOUT,SPI_GETSNAPTODEFBUTTON,SPI_GETUIEFFECTS)
- (SPI_SETBLOCKSENDINPUTRESETS,SPI_SETCARETWIDTH,SPI_SETCURSORS)
- (SPI_SETDROPSHADOW,SPI_SETFILTERKEYS,SPI_SETFLATMENU)
- (SPI_SETFOCUSBORDERHEIGHT,SPI_SETFOCUSBORDERWIDTH)
- (SPI_SETFONTSMOOTHINGCONTRAST,SPI_SETFONTSMOOTHINGTYPE)
- (SPI_SETFOREGROUNDFLASHCOUNT,SPI_SETICONS,SPI_SETMENUSHOWDELAY)
- (SPI_SETMOUSECLICKLOCK,SPI_SETMOUSECLICKLOCKTIME)
- (SPI_SETMOUSEHOVERHEIGHT,SPI_SETMOUSEHOVERTIME)
- (SPI_SETMOUSEHOVERWIDTH,SPI_SETMOUSESONAR,SPI_SETMOUSEVANISH)
- (SPI_SETNONCLIENTMETRICS,SPI_SETPENWINDOWS,SPI_SETPOWEROFFACTIVE)
- (SPI_SETPOWEROFFTIMEOUT,SPI_SETSCREENREADER,SPI_SETSCREENSAVEACTIVE)
- (SPI_SETSCREENSAVERRUNNING,SPI_SETSCREENSAVETIMEOUT,SPI_SETSHOWIMEUI)
- (SPI_SETSNAPTODEFBUTTON,SPI_SETUIEFFECTS): Define.
- (SPI_GETACCESSTIMEOUT,SPI_GETANIMATION,SPI_GETBEEP)
- (SPI_GETDEFAULTINPUTLANG,SPI_GETDESKWALLPAPER,SPI_GETDRAGFULLWINDOWS)
- (SPI_GETFASTTASKSWITCH,SPI_GETFONTSMOOTHING,SPI_GETGRIDGRANULARITY)
- (SPI_GETHIGHCONTRAST,SPI_GETICONMETRICS,SPI_GETICONTITLELOGFONT)
- (SPI_GETICONTITLEWRAP,SPI_GETKEYBOARDDELAY,SPI_GETKEYBOARDPREF)
- (SPI_GETKEYBOARDSPEED,SPI_GETLOWPOWERACTIVE,SPI_GETLOWPOWERTIMEOUT)
- (SPI_GETMENUDROPALIGNMENT,SPI_GETMENUUNDERLINES,SPI_GETMINIMIZEDMETRICS)
- (SPI_GETMOUSE,SPI_GETMOUSEKEYS,SPI_GETMOUSESPEED,SPI_GETMOUSETRAILS)
- (SPI_GETSERIALKEYS,SPI_GETSHOWIMEUI,SPI_GETSHOWSOUNDS)
- (SPI_GETSOUNDSENTRY,SPI_GETSTICKYKEYS,SPI_GETTOGGLEKEYS)
- (SPI_GETWHEELSCROLLLINES,SPI_GETWINDOWSEXTENSION,SPI_GETWORKAREA)
- (SPI_ICONHORIZONTALSPACING,SPI_ICONVERTICALSPACING)
- (SPI_SETACCESSTIMEOUT,SPI_SETANIMATION,SPI_SETBEEP,SPI_SETBORDER)
- (SPI_SETDEFAULTINPUTLANG,SPI_SETDESKPATTERN,SPI_SETDESKWALLPAPER)
- (SPI_SETDOUBLECLICKTIME,SPI_SETDOUBLECLKHEIGHT,SPI_SETDOUBLECLKWIDTH)
- (SPI_SETDRAGFULLWINDOWS,SPI_SETDRAGHEIGHT,SPI_SETDRAGWIDTH)
- (SPI_SETFASTTASKSWITCH,SPI_SETFONTSMOOTHING,SPI_SETGRIDGRANULARITY)
- (SPI_SETHANDHELD,SPI_SETHIGHCONTRAST,SPI_SETICONMETRICS)
- (SPI_SETICONTITLELOGFONT,SPI_SETICONTITLEWRAP,SPI_SETKEYBOARDDELAY)
- (SPI_SETKEYBOARDPREF,SPI_SETKEYBOARDSPEED,SPI_SETLANGTOGGLE)
- (SPI_SETLOWPOWERACTIVE,SPI_SETLOWPOWERTIMEOUT,SPI_SETMENUDROPALIGNMENT)
- (SPI_SETMENUUNDERLINES,SPI_SETMINIMIZEDMETRICS,SPI_SETMOUSE)
- (SPI_SETMOUSEBUTTONSWAP,SPI_SETMOUSEKEYS,SPI_SETMOUSESPEED)
- (SPI_SETMOUSETRAILS,SPI_SETSERIALKEYS,SPI_SETSHOWSOUNDS)
- (SPI_SETSOUNDSENTRY,SPI_SETSTICKYKEYS,SPI_SETTOGGLEKEYS)
- (SPI_SETWHEELSCROLLLINES,SPI_SETWORKAREA): Cleanup.
- (SPI_GETMOUSETRAILS,SPI_SETMOUSETRAILS): Defined twice by error.
- (SPI_SCREENSAVERRUNNING): Removed.
- (SPIF_UPDATEINIFILE,SPIF_SENDCHANGE,SPIF_SENDWININICHANGE): Cleanup.
- * include/wingdi.h (ETO_NUMERICSLATIN,ETO_NUMERICSLOCAL)
- (ETO_IGNORELANGUAGE,ETO_PDY): Define.
- (ETO_CLIPPED,ETO_GLYPH_INDEX,ETO_OPAQUE,ETO_RTLREADING): Cleanup.
-
-2006-05-03 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/mprapi.h (MPR_SERVER_HANDLE): Add typedef.
- (MprAdminGetPDCServer): Add prototype.
- (MprAdminSendUserMessage): Add prototype.
- (MprAdminUserGetInfo): Add prototype.
- (MprAdminUserSetInfo): Add prototype.
- * lib/mprapi.def: Add stubs for above functions.
-
-2006-05-03 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * lib/directx/quartz.def: Move from here...
- * lib/quartz.def: ... to here.
-
-2006-05-03 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/amaudio.h: New file.
- * include/dshow.h: Include <amaudio.h>.
-
-2006-05-03 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/errors.h: New file.
- * include/dshow.h: Include <errors.h>.
-
-2006-05-03 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/dshow.h: New file.
- * include/evcode.h: New file.
- * include/audevcod.h: New file.
- * include/dvdevcod.h: New file.
-
-2006-05-02 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/mprapi.h (RAS_SERVER_HANDLE): Add typedef.
- (MprAdminConnectionClearStats): Add prototype.
- (MprAdminConnectionEnum): Add prototype.
- (MprAdminConnectionGetInfo): Add prototype.
- (MprAdminConnectionRemoveQuarantine): Add prototype.
- (MprAdminPortClearStats): Add prototype.
- (MprAdminPortDisconnect): Add prototype.
- (MprAdminPortEnum): Add prototype.
- (MprAdminPortGetInfo): Add prototype.
- (MprAdminPortReset): Add prototype.
- * lib/mprapi.def: New file.
-
-2006-05-02 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/mprapi.h: #include <lmcons.h>
- (MAX_DEVICETYPE_NAME): Add define.
- (MAX_PHONE_NUMBER_LEN): Add define.
- (ATADDRESSLEN): Add define.
- (IPADDRESSLEN): Add define.
- (IPXADDRESSLEN): Add define.
- (MPR_ENABLE_RAS_ON_DEVICE): Add define.
- (MPR_ENABLE_ROUTING_ON_DEVICE): Add define.
- (RAS_FLAGS_PPP_CONNECTION): Add define.
- (RAS_FLAGS_MESSENGER_PRESENT): Add define.
- (RAS_FLAGS_RAS_CONNECTION): Add define.
- (RAS_FLAGS_QUARANTINE_PRESENT): Add define.
- (RASCCPCA_STAC): Add define.
- (RASCCPCA_MPPC): Add define.
- (PPP_CCP_COMPRESSION): Add define.
- (PPP_CCP_ENCRYPTION40BITOLD): Add define.
- (PPP_CCP_ENCRYPTION40BIT): Add define.
- (PPP_CCP_ENCRYPTION128BIT): Add define.
- (PPP_CCP_ENCRYPTION56BIT): Add define.
- (PPP_CCP_HISTORYLESS): Add define.
- (RASPRIV_NoCallback): Add define.
- (RASPRIV_AdminSetCallback): Add define.
- (RASPRIV_CallerSetCallback): Add define.
- (RASPRIV_DialinPrivilege): Add define.
- (RASPRIV_CallbackType): Add define.
- (RASPRIV2_DialinPolicy): Add define.
- (PPP_LCP_PAP): Add define.
- (PPP_LCP_SPAP): Add define.
- (PPP_LCP_CHAP): Add define.
- (PPP_LCP_EAP): Add define.
- (PPP_LCP_CHAP_MD5): Add define.
- (PPP_LCP_CHAP_MS): Add define.
- (PPP_LCP_CHAP_MSV2): Add define.
- (PPP_LCP_MULTILINK_FRAMING): Add define.
- (enum _RAS_HARDWARE_CONDITION): Add.
- (enum _RAS_PORT_CONDITION): Add.
- (struct _PPP_ATCP_INFO): Add.
- (struct _PPP_ATCP_INFO): Add.
- (struct _PPP_IPCP_INFO): Add.
- (struct _PPP_IPCP_INFO2): Add.
- (struct _PPP_IPXCP_INFO): Add.
- (struct _PPP_LCP_INFO): Add.
- (struct _PPP_NBFCP_INFO): Add.
- (struct _PPP_INFO): Add.
- (struct _PPP_INFO_2): Add.
- (struct _RAS_CONNECTION_0): Add.
- (struct RAS_CONNECTION_1): Add.
- (struct _RAS_CONNECTION_2): Add.
- (struct RAS_PORT_0): Add.
- (struct _RAS_PORT_1): Add.
- (struct _RAS_USER_0): Add.
- (struct _RAS_USER_1): Add.
-
-2006-05-02 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/mprapi.h: New file.
- * include/routprot.h: New file.
- * include/ipxrtdef.h: New file.
- * include/ipxconst.h: New file.
- * include/stm.h: New file.
-
-2006-04-28 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/ddk/winddk.h (KAFFINITY): Fix typo.
- Thanks to: Oliver Stoeneberg <kidkat at sf dot net>
-
-2006-04-28 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winbase.h (ENUMRESLANGPROC,ENUMRESLANGPROCA,ENUMRESLANGPROCW)
- (ENUMRESNAMEPROC,ENUMRESNAMEPROCA,ENUMRESNAMEPROCW)
- (ENUMRESTYPEPROC,ENUMRESTYPEPROCA,ENUMRESTYPEPROCW): ANSI and Unicode
- versions.
- Thanks to: Oliver Stoeneberg <kidkat at sf dot net>
-
-2006-04-28 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/ntsecapi.h (POLICY_DNS_DOMAIN_INFO): Fix typo.
- Thanks to: Oliver Stoeneberg <kidkat at sf dot net>
-
-2006-04-28 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/wingdi.h (BITMAPV5HEADER): New structure definition.
-
-2006-04-28 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/basetyps.h (REFFMTID): Define properly.
-
-2006-04-28 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winnt.h (WT_SET_MAX_THREADPOOL_THREADS): Define.
- Thanks to: Bruce M Simpson <bms_spc at sf dot net>
-
-2006-04-28 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/ipifcons.h (MIN_IF_TYPE,IF_TYPE_OTHER,IF_TYPE_REGULAR_1822)
- (IF_TYPE_HDH_1822,IF_TYPE_DDN_X25,IF_TYPE_RFC877_X25)
- (IF_TYPE_ETHERNET_CSMACD,IF_TYPE_IS088023_CSMACD)
- (IF_TYPE_ISO88024_TOKENBUS,IF_TYPE_ISO88025_TOKENRING)
- (IF_TYPE_ISO88026_MAN,IF_TYPE_STARLAN,IF_TYPE_PROTEON_10MBIT)
- (IF_TYPE_PROTEON_80MBIT,IF_TYPE_HYPERCHANNEL,IF_TYPE_FDDI)
- (IF_TYPE_LAP_B,IF_TYPE_SDLC,IF_TYPE_DS1,IF_TYPE_E1,IF_TYPE_BASIC_ISDN)
- (IF_TYPE_PRIMARY_ISDN,IF_TYPE_PROP_POINT2POINT_SERIAL,IF_TYPE_PPP)
- (IF_TYPE_SOFTWARE_LOOPBACK,IF_TYPE_EON,IF_TYPE_ETHERNET_3MBIT)
- (IF_TYPE_NSIP,IF_TYPE_SLIP,IF_TYPE_ULTRA,IF_TYPE_DS3,IF_TYPE_SIP)
- (IF_TYPE_FRAMERELAY,IF_TYPE_RS232,IF_TYPE_PARA,IF_TYPE_ARCNET)
- (IF_TYPE_ARCNET_PLUS,IF_TYPE_ATM,IF_TYPE_MIO_X25,IF_TYPE_SONET)
- (IF_TYPE_X25_PLE,IF_TYPE_ISO88022_LLC,IF_TYPE_LOCALTALK)
- (IF_TYPE_SMDS_DXI,IF_TYPE_FRAMERELAY_SERVICE,IF_TYPE_V35,IF_TYPE_HSSI)
- (IF_TYPE_HIPPI,IF_TYPE_MODEM,IF_TYPE_AAL5,IF_TYPE_SONET_PATH)
- (IF_TYPE_SONET_VT,IF_TYPE_SMDS_ICIP,IF_TYPE_PROP_VIRTUAL)
- (IF_TYPE_PROP_MULTIPLEXOR,IF_TYPE_IEEE80212,IF_TYPE_FIBRECHANNEL)
- (IF_TYPE_HIPPIINTERFACE,IF_TYPE_FRAMERELAY_INTERCONNECT)
- (IF_TYPE_AFLANE_8023,IF_TYPE_AFLANE_8025,IF_TYPE_CCTEMUL)
- (IF_TYPE_FASTETHER,IF_TYPE_ISDN,IF_TYPE_V11,IF_TYPE_V36)
- (IF_TYPE_G703_64K,IF_TYPE_G703_2MB,IF_TYPE_QLLC,IF_TYPE_FASTETHER_FX)
- (IF_TYPE_CHANNEL,IF_TYPE_IEEE80211,,IF_TYPE_IBM370PARCHAN)
- (IF_TYPE_ESCON,IF_TYPE_DLSW,IF_TYPE_ISDN_S,IF_TYPE_ISDN_U)
- (IF_TYPE_LAP_D,IF_TYPE_IPSWITCH,IF_TYPE_RSRB,IF_TYPE_ATM_LOGICAL)
- (IF_TYPE_DS0,IF_TYPE_DS0_BUNDLE,IF_TYPE_BSC,IF_TYPE_ASYNC,IF_TYPE_CNR)
- (IF_TYPE_ISO88025R_DTR,IF_TYPE_EPLRS,IF_TYPE_ARAP,IF_TYPE_PROP_CNLS)
- (IF_TYPE_HOSTPAD,IF_TYPE_TERMPAD,IF_TYPE_FRAMERELAY_MPI,IF_TYPE_X213)
- (IF_TYPE_ADSL,IF_TYPE_RADSL,IF_TYPE_SDSL,IF_TYPE_VDSL)
- (IF_TYPE_ISO88025_CRFPRINT,IF_TYPE_MYRINET,IF_TYPE_VOICE_EM)
- (IF_TYPE_VOICE_FXO,IF_TYPE_VOICE_FXS,IF_TYPE_VOICE_ENCAP)
- (IF_TYPE_VOICE_OVERIP,IF_TYPE_ATM_DXI,IF_TYPE_ATM_FUNI,IF_TYPE_ATM_IMA)
- (IF_TYPE_PPPMULTILINKBUNDLE,IF_TYPE_IPOVER_CDLC,IF_TYPE_IPOVER_CLAW)
- (IF_TYPE_STACKTOSTACK,IF_TYPE_VIRTUALIPADDRESS,IF_TYPE_MPC
- (IF_TYPE_IPOVER_ATM,IF_TYPE_ISO88025_FIBER,IF_TYPE_TDLC
- (IF_TYPE_GIGABITETHERNET,IF_TYPE_HDLC,IF_TYPE_LAP_F,IF_TYPE_V37)
- (IF_TYPE_X25_MLP,IF_TYPE_X25_HUNTGROUP,IF_TYPE_TRANSPHDLC)
- (IF_TYPE_INTERLEAVE,IF_TYPE_FAST,IF_TYPE_IP,IF_TYPE_DOCSCABLE_MACLAYER)
- (IF_TYPE_DOCSCABLE_DOWNSTREAM,IF_TYPE_DOCSCABLE_UPSTREAM)
- (IF_TYPE_A12MPPSWITCH,IF_TYPE_TUNNEL,IF_TYPE_COFFEE,IF_TYPE_CES)
- (IF_TYPE_ATM_SUBINTERFACE,IF_TYPE_L2_VLAN,IF_TYPE_L3_IPVLAN)
- (IF_TYPE_L3_IPXVLAN,IF_TYPE_DIGITALPOWERLINE,IF_TYPE_MEDIAMAILOVERIP)
- (IF_TYPE_DTM,IF_TYPE_DCN,IF_TYPE_IPFORWARD,IF_TYPE_MSDSL)
- (IF_TYPE_IEEE1394,IF_TYPE_RECEIVE_ONLY,MAX_IF_TYPE,IF_ACCESS_LOOPBACK)
- (IF_ACCESS_BROADCAST,IF_ACCESS_POINTTOPOINT)
- (IF_ACCESS_POINTTOMULTIPOINT,IF_CHECK_NONE,IF_CHECK_MCAST)
- (IF_CHECK_SEND,IF_CONNECTION_DEDICATED,IF_CONNECTION_PASSIVE)
- (IF_CONNECTION_DEMAND,IF_ADMIN_STATUS_UP,IF_ADMIN_STATUS_DOWN)
- (IF_ADMIN_STATUS_TESTING,IF_OPER_STATUS_NON_OPERATIONAL)
- (IF_OPER_STATUS_UNREACHABLE,IF_OPER_STATUS_DISCONNECTED)
- (IF_OPER_STATUS_CONNECTING,IF_OPER_STATUS_CONNECTED)
- (IF_OPER_STATUS_OPERATIONAL): Define.
- * include/winbase.h (CancelWaitableTimer,UnregisterWait):
- Add function declaration.
- * include/mgm.h: New file.
- * lib/rtm.def: New file.
- Thanks to: Bruce M Simpson <bms_spc at sf dot net>
-
-2006-04-24 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/ws2tcpip.h (gai_strerror): Remove thread-safety comment.
- This function cannot be made thread-safe, the API would have to be
- changed for that, just like strerror() -> strerror_r() and similar
- ISO C or POSIX functions...
-
-2006-04-19 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/edevdefs.h: New file.
-
-2006-04-19 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/mmsystem.h (_LPCWAVEFORMATEX_DEFINED): Define.
- Use as guard for the WAVEFORMATEX structure instead of
- _WAVEFORMATEX_ to avoid clashes with DirectSound. Keep
- _WAVEFORMATEX_ for compatibility.
- Thanks to: Andrew Jones <guln at sf dot net>
-
-2006-04-19 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h (CharNextEx,CharNextExW,CharPrevEx,CharPrevExW):
- Delete. Only CharNextExA and CharPrevExA are documented in MSDN.
- Thanks to: David Golub <david_golub at sf dot net>
-
-2006-04-18 Eric House <ehouse@eehouse.org>
-
- PocketPC support.
- * include/aygshell.h: New file [_WIN32_WCE]. Declare most common
- functions for using aygshell on PocketPC:
- SHCreateMenuBar, SHFindMenuBar, SHCreateNewItem, SHFullScreen,
- SHSipInfo, SHHandleWMActivate, SHHandleWMSettingChange
-
- * include/commctrl.h [_WIN32_WCE] Add function prototypes for
- command bar API on PocketPC:
- CommandBar_Create, CommandBar_Show, CommandBar_AddBitmap,
- CommandBar_InsertComboBox, CommandBar_InsertMenubar,
- CommandBar_InsertMenubarEx, CommandBar_DrawMenuBar,
- CommandBar_GetMenu, CommandBar_AddAdornments, CommandBar_Height,
- CommandBar_InsertButton, CommandBar_Destroy.
-
- * include/winbase.h [_WIN32_WCE] (WIN32_FIND_DATA{A|W}): Remove
- fields not present on PocketPC.
- (GetCurrentThreadId): Conditionally declare as extern function
- without dllimport attribute on PocketPC.
- (ResetEvent): Likwise.
- (SetEvent): Likewise.
-
- * include/wingdi.h [_WIN32_WCE] (GetTextExtentPoint32{A|W}):
- Conditionally declare as extern function without dllimport
- attribute on PocketPC.
- * winuser.h [_WIN32_WCE] (DialogBoxParam{A|W}): Conditionally
- declare as extern function without dllimport attribute on PocketPC.
-
-2006-04-18 Thorsten Dahlheimer <dahlheim@users.sf.net>
-
- * lib/test.c: Include icm.h.
-
-2006-04-18 Thorsten Dahlheimer <dahlheim@users.sf.net>
-
- * include/wingdi.h (ColorCorrectPalette): Add declaration.
- (CreateColorSpace): Add UNICODE mappings.
- * lib/gdi32.def (ColorCorrectPalette): Add stub.
- * include/icm.h: New file.
- * lib/mscms.def: New file.
- * lib/icmui.def: New file.
-
-2006-04-18 Thorsten Dahlheimer <dahlheim@users.sf.net>
-
- * include/winnt.h (IMAGE_FILE_MACHINE_IA64): New define.
- (IMAGE_FILE_MACHINE_AMD64): New define.
- (IMAGE_NT_OPTIONAL_HDR32_MAGIC,IMAGE_NT_OPTIONAL_HDR64_MAGIC):
- New defines.
- (IMAGE_NT_OPTIONAL_HDR_MAGIC): Map to one of the above.
- (IMAGE_SUBSYSTEM_NATIVE_WINDOWS): New define.
- (IMAGE_SUBSYSTEM_WINDOWS_CE_GUI): New define.
- (IMAGE_DLLCHARACTERISTICS_WDM_DRIVER): New define.
- (IMAGE_DIRECTORY_ENTRY_ARCHITECTURE,IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT)
- (IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR): New defines.
- (IMAGE_SCN_TYPE_REG,IMAGE_SCN_TYPE_DSECT,IMAGE_SCN_TYPE_NOLOAD)
- (IMAGE_SCN_TYPE_GROUP,IMAGE_SCN_TYPE_COPY,IMAGE_SCN_TYPE_OVER):
- New defines.
- (IMAGE_SCN_ALIGN_128BYTES,IMAGE_SCN_ALIGN_256BYTES)
- (IMAGE_SCN_ALIGN_512BYTES,IMAGE_SCN_ALIGN_1024BYTES)
- (IMAGE_SCN_ALIGN_2048BYTES,IMAGE_SCN_ALIGN_4096BYTES)
- (IMAGE_SCN_ALIGN_8192BYTES): New defines.
- (IMAGE_DEBUG_TYPE_BORLAND): New define.
- (IMAGE_OPTIONAL_HEADER32,PIMAGE_OPTIONAL_HEADER32)
- (IMAGE_OPTIONAL_HEADER64,PIMAGE_OPTIONAL_HEADER64): New structure
- definitions and typedefs.
- (IMAGE_OPTIONAL_HEADER,PIMAGE_OPTIONAL_HEADER): Map to the above.
- (IMAGE_NT_HEADERS32,PIMAGE_NT_HEADERS32,IMAGE_NT_HEADERS64)
- (PIMAGE_NT_HEADERS64): New structure definitions and typedefs.
- (IMAGE_NT_HEADERS,PIMAGE_NT_HEADERS): Map to the above.
- (IMAGE_LOAD_CONFIG_DIRECTORY64,PIMAGE_LOAD_CONFIG_DIRECTORY64):
- New structure definition and typedefs.
- (IMAGE_CE_RUNTIME_FUNCTION_ENTRY,PIMAGE_CE_RUNTIME_FUNCTION_ENTRY):
- Likewise.
- (IMAGE_FUNCTION_ENTRY64,PIMAGE_FUNCTION_ENTRY64): Likewise.
-
-2006-04-18 Bart Oldeman <bartoldeman@users.sf.net>
-
- * lib/test.c: Fix typo in #inlcude.
- * include/aclui.h: INTERFACE should not remain
- defined at the end of the header.
- * include/servprov.h: Ditto.
-
-2006-04-16 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ws2tcpip.h (gai_strerror): Add thread-safety comment.
-
-2006-04-14 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/ws2tcpip.h (gai_strerrorA,gai_strerrorW): Implement inline.
-
-2006-04-14 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/wsahelp.h (system_header): Add pragma.
- * include/ws2spi.h (system_header): Add pragma.
- * include/rasdlg.h (system_header): Add pragma.
- * include/rasdlg.h (_RASDLG_H): Define.
- Define instead of _RASDLG_H_, this is the w32api standard.
- * include/mlang.h (_MLANG_H): Define.
- Define instead of _MLANG_H_, this is the w32api standard.
- * include/setupapi.h (_SETUPAPI_H): Define.
- Define instead of _SETUPAPI_H_, this is the w32api standard.
-
-2006-04-14 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/rpcndr.h (boolean): Add typedef.
- Thanks to: James du Russel <ephelon at users dot sf dot net>
- * include/rpcndr.h (_RPCNDR_H): Define.
- Define in addition to __RPCNDR_H__, this is the w32api standard.
-
-2006-04-14 Chris Sutcliffe <ir0nh34d@users.sf.net>
-
- * include/w32api.h: Increment version to 3.7.
- * Makefile.in: Ditto.
-
-2006-04-13 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/winbase.h (GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS,
- GET_MODULE_HANDLE_EX_FLAG_PIN,
- GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT): Define.
- Thanks to: Brandon Sneed <brandon at redf dot net>
-
-2006-04-08 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/secext.h: Enclose function declarations in extern "C"
- if __cplusplus.
-
-2006-04-11 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/comcat.h: INTERFACE should not remain defined
- at the end of the header.
- * include/docobj.h: Ditto.
- * include/exdisp.h: Ditto.
- * include/intshcut.h: Ditto.
- * include/mlang.h: Ditto.
- * include/mshtml.h: Ditto.
- * include/oaidl.h: Ditto.
- * include/objidl.h: Ditto.
- * include/objsafe.h: Ditto.
- * include/ocidl.h: Ditto.
- * include/oleacc.h: Ditto.
- * include/oledlg.h: Ditto.
- * include/oleidl.h: Ditto.
- * include/richole.h: Ditto.
- * include/shldisp.h: Ditto.
- * include/shlobj.h: Ditto.
- * include/unknwn.h: Ditto.
- * include/vfw.h: Ditto.
- Thanks to: Brandon Sneed <brandon at redf dot net>
-
-2006-04-11 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/commdlg.h [_WIN32_WINNT >= 0x0500] (PD_CURRENTPAGE)
- (PD_NOCURRENTPAGE,PD_EXCLUSIONFLAGS,PD_USELARGETEMPLATE): Define.
- Thanks to: Wolfgang Glas <softadm at users dot sf dot net>
-
-2006-04-08 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/iphlpapi.h (GetAdaptersAddresses): Check for winsock2
- here also.
-
-2006-04-07 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/wincrypt.h (PROV_MS_EXCHANGE): Define.
- We should probably remove PROV_MS_MAIL but I'm keeping it for
- now for compatibility reasons.
- Thanks to: Marcus Agehall <agehall at users dot sf dot net>
-
-2006-04-07 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/commdlg.h [_WIN32_WINNT >= 0x0500] (START_PAGE_GENERAL)
- (PD_RESULT_PRINT,PD_RESULT_APPLY): Define.
- Thanks to: Wolfgang Glas <softadm at users dot sf dot net>
-
-2006-04-07 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/wingdi.h [WINVER >= 0x0410]
- (AlphaBlend,GradientFill,TransparentBlt): Windows 98 and better.
- Thanks to: Alessandro Antonello <aleantonello at users dot sf dot net>
-
-2006-04-07 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/wingdi.h (CAPTUREBLT,NOMIRRORBITMAP): Define.
- * include/commctrl.h (WC_LINKA,WC_LINKW,LIF_ITEMINDEX,LIF_STATE)
- (LIF_ITEMID,LIF_URL,LIS_FOCUSED,LIS_ENABLED,LIS_VISITED,LM_HITTEST)
- (LM_GETIDEALHEIGHT,LM_SETITEM,LM_GETITEM,MAX_LINKID_TEXT)
- (L_MAX_URL_LENGTH): Define.
- (LITEM,LHITTESTINFO,NMLINK): Add structures.
- Thanks to: Brandon Sneed <brandon at redf dot net>
-
-2006-04-06 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/w32api.h (IE601,IE602,IE7): Define for recent versions of IE.
-
-2006-04-06 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/w32api.h (_W32API_H): Define.
- Define in addition to _W32API_H_, this is the w32api standard.
-
-2006-04-06 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/w32api.h (WindowsVista): Define.
-
-2006-04-06 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/iptypes.h (IP_ADAPTER_*): Define parts that depend
- on SOCKET_ADDRESS only if winsock2.h has already been included.
-
-2006-04-06 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h (WM_IME_*): Remove. Defined in imm.h.
-
-2006-04-05 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/iphlpapi.h (GAA_FLAG_*): Define.
- (GetAdaptersAddresses): Add function declaration.
- * lib/iphlpapi.def (GetAdaptersAddresses): Add function stub.
- Thanks to: ross <rossboulet at users dot sf dot net>
-
-2006-04-05 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/iptypes.h (IP_INTERFACE_NAME_INFO,
- IP_ADAPTER_ANYCAST_ADDRESS,IP_ADAPTER_MULTICAST_ADDRESS,
- IP_ADAPTER_UNICAST_ADDRESS,IP_ADAPTER_DNS_SERVER_ADDRESS,
- IP_ADAPTER_PREFIX,IP_ADAPTER_ADDRESSES): Add structures.
- (IF_OPER_STATUS,IP_DAD_STATE,IP_PREFIX_ORIGIN,IP_SUFFIX_ORIGIN,
- SCOPE_LEVEL): Add enums.
- (IP_ADAPTER_*): Define.
-
-2006-04-05 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h (GetWindowExtEx): Removed, belongs to wingdi.h.
- Thanks to: Sergey Philippov <phis at users dot sf dot net>
-
-2006-04-05 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/objidl.h (PIDSI_*): Define.
- (PRSPEC_*): Define.
- Thanks to: Oliver Stoeneberg <kidkat at users dot sf dot net>
-
-2006-04-05 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winbase.h (LOGON32_PROVIDER_WINNT40,
- LOGON32_PROVIDER_WINNT50, LOGON32_LOGON_NETWORK,
- LOGON32_LOGON_UNLOCK, LOGON32_LOGON_NETWORK_CLEARTEXT,
- LOGON32_LOGON_NEW_CREDENTIALS): Define.
- Thanks to: Oliver Stoeneberg <kidkat at users dot sf dot net>
-
-2006-04-05 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/mq.h: New file.
- * lib/mqrt.def (MQ*): Define a few missing functions.
-
-2006-04-05 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * lib/mqrt.def: New file.
- Needs the mq.h file to work properly, working on it.
- Thanks to: Pascal Obry <pobry at users dot sf dot net>
-
-2006-04-05 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winerror.h (STG_E_*): Define.
- Thanks to: Oliver Stoeneberg <kidkat at users dot sf dot net>
- * include/winerror.h (STG_S_*): Define.
- (CO_S_MACHINENAMENOTFOUND): Define.
- (RPC_E_*): Define.
- (NTE_*): Define.
-
-2006-04-03 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/commctrl.h (ListView_*): Define and correct.
- (LVM_*): Define.
-
-2006-04-03 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h (WM_IME_*): Define (DWORD type).
- (EM_*IMESTATUS): Define.
- (WM_*): Define.
- (XBUTTON*): Define.
- Thanks to: Steve Folly <spfolly at users dot sf dot net>
-
-2006-03-31 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnetwk.h (WNetGetResourceInformationW): Correct first param.
- Thanks to: Rene Rivera <grafik at users dot sf dot net>
-
-2006-03-29 Christopher Faylor <cgf@timesys.com>
-
- * include/winspool.h: Protect use of PRINTER_ENUM_VALUESW with proper
- version conditional.
-
-2006-03-29 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winspool.h (JOB_INFO_3): Add structure.
- (PROVIDOR_INFO_*{AW}): Add structure.
- * include/winspool.h [_WIN32_WINNT >= 0x0500]
- (PRINTER_ENUM_VALUES{AW}): Add structure.
- (PRINTPROCESSOR_CAPS): Add structure.
-
-2006-03-29 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winspool.h [_WIN32_WINNT >= 0x0500]
- (PRINTER_INFO_7A): Correct definition.
-
-2006-03-29 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winspool.h [_WIN32_WINNT >= 0x0500]
- (DRIVER_INFO_*{AW}): Add structure.
- (PRINTER_INFO_*{AW}): Add structure.
- Thanks to: Roland Schwingel <rolandschwingel at users dot sf dot net>
-
-2006-03-29 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winspool.h [_WIN32_WINNT >= 0x0500]
- (DRIVER_*MODE): Define (DWORD type).
- Thanks to: Roland Schwingel <rolandschwingel at users dot sf dot net>
-
-2006-03-27 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wincon.h (GetConsoleProcessList): Declare.
-
-2006-03-27 Hansres Engel <engel@node.ch>
-
- * include/mlang.h: New file.
-
-2006-03-26 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/winbase.h (SetProcessWorkingSetSize): Corrected define.
-
-2006-03-26 Hansres Engel <engel@node.ch>
-
- Add Uniscribe API for typography and for complex scripts.
- * include/usp10.h: New file.
- * lib/usp10.def: New file.
-
- * include/winver.h: Change first argument of GetFileVersionInfo[...] to const.
-
- * include/imm.h (IMECHARPOSITION): Add structure.
- (RECONVERTSTRING): Likwise.
-
- * include/commdlg.h (OPENFILENAME_SIZE_VERSION_400): Define.
-
- * lib/uuid.c (CMultiLanguage): Add UUID definition.
- (IMLangFontLink2): Likewise.
- (IMultiLanguage): Likewise.
-
-2006-03-18 Julien Lecomte <julienlecomte@users.sourceforge.net>
-
- * include/wincon.h (ENABLE_*): Add more defines.
-
-2006-03-18 Jan Nijtmans <nijtmans@users.sourceforge.net>
-
- * include/winnt.h (INHERITED_ACE): Define.
- (VALID_INHERIT_FLAGS): Correct definition.
-
-2006-03-18 Peter Åstrand <astrand@cendio.se>
-
- * lib/wtsapi32.def: New file.
-
-2006-03-15 Christopher Faylor <cgf@timesys.com>
-
- * include/winbase.h (STATUS_DLL_INIT_FAILED): New define.
- (STATUS_DLL_INIT_FAILED_LOGOFF): Ditto.
-
-2006-03-09 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winspool.h (DI_MEMORYMAP_WRITE): Define (DWORD type).
- (FORM_USER,FORM_PRINTER): Define (DWORD type).
- * include/winspool.h [_WIN32_WINNT >= 0x0500]
- (DSPRINT_*): Define (DWORD type).
- Thanks to: Roland Schwingel <rolandschwingel at users dot sf dot net>
-
-2006-03-09 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winspool.h (JOB_CONTROL_*,JOB_STATUS_*): Define.
- Thanks to: Roland Schwingel <rolandschwingel at users dot sf dot net>
-
-2006-03-07 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/shellapi.h [_WIN32_IE >= 0x0600]
- (SEE_MASK_NOZONECHECKS,SEE_MASK_FLAG_LOG_USAGE): Define on
- Windows XP SP1 and Windows XP respectively.
-
-2006-03-07 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/shellapi.h (NOTIFYICONDATA_V*_SIZE): Define.
- Thanks to: Daniel Atallah <datallah at users dot sf dot net>
- * include/shellapi.h [_WIN32_IE >= 0x0500]
- (NIS_*): Introduced in Version 5.0.
-
-2006-03-06 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wingdi.h (CS_*): Correct WINVER guard on
- Image Color Matching colour definitions.
-
-2006-03-06 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/shlobj.h (SFGAO_ISSLOW): Define.
- (SFGAO_DISPLAYATTRMASK): Define in terms of preceding display
- attribute constants.
-
-2006-03-06 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/wingdi.h [WINVER >= 0x0500]
- (GRADIENT_FILL_*,*_EMBEDED): Included in Windows 2000 and later.
- Thanks to: David A. Capello <dacap at users dot sf dot net>
-
-2006-03-05 Paul J. Lucas <pauljlucas@users.sourceforge.net>
-
- * include/wininet.h (INTERNET_CONNECTED_INFO): Define structure.
- (INTERNET_STATE_*): Define flags.
- (INTERNET_OPTION_CONNECTED_STATE): Define constant.
-
-2006-03-05 Chris Wilson <chris+mingw@qwirx.com>
-
- * include/sddl.h: New file.
-
-2006-02-21 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ddk/ntifs.h (FILE_ID_FULL_DIRECTORY_INFORMATION): Revert
- last change.
- Remove file level #pragma pack(push,4)/#pragma pop.
-
-2006-02-19 Corinna Vinschen <corinna@vinschen.de>
-
- * include/ddk/ntifs.h (FILE_ID_FULL_DIRECTORY_INFORMATION): Add filler
- value to force correct alignment.
-
-2006-02-19 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commctrl.h (LPNMLVCACHEHINT): Correct spelling.
- Thanks to: Sebastian Pipping <hartwork at users dot sf dot net>
- (PNM_CACHEHINT): Add backward compatibilty define.
- (LPNM_CACHEHINT): Likewise.
-
-2006-02-06 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/shlobj.h (PathResolve): Fix typo in _WIN32_WINNT guard.
-
-2006-02-06 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/shlobj.h (PRF_VERIFYEXISTS, PRF_TRYPROGRAMEXTENSIONS,
- PRF_FIRSTDIRDEF, PRF_DONTFINDLNK): Define.
- * lib/shell32.def (PathResolve): Define.
-
-2006-02-06 Christopher Faylor <cgf@timesys.com>
-
- * include/shlobj.h (PathResolve): Fix typo.
-
-2006-02-06 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/shlobj.h (PathResolve): Define.
- (PRF_VERIFYEXISTS, PRF_TRYPROGRAMEXTENSIONS, PRF_FIRSTDIRDEF,
- PRF_DONTFINDLNK): Ditto.
- * lib/shell32.def (PathResolve): Define.
-
-2006-02-04 Ron Lee <ronl@users.sourceforge.net>
-
- * include/winnls.h: Remove stray end ';' from preprocessor defines.
-
-2006-02-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/iphlpapi.def: (NotifyAddrChange@8): Define.
- Reported by: Daniel Atallah <datallah at users dot sf dot net>
- (NotifyRouteChange@8): Define.
-
-2006-01-29 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winsock2.h (WINSOCK_API_LINKAGE): Define. Add to
- prototypes.
-
-2006-01-29 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (FORCEINLINE): Define.
-
-2006-01-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (DECLSPEC_SELECTANY): Define.
-
-2006-01-26 Filip Navara <xnavara@volny.cz>
-
- * include/winnt.h (DECLSPEC_ALIGN): Define.
-
-2006-01-24 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commctrl.h: Correct spelling of 'compatibility' in
- comments.
- * include/setupapi.h: Likewise.
- * include/ws2tcpip.h: Likewise.
-
-2006-01-24 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ddk/winddk.h (KeGetCurrentKPCR): Support -masm=intel.
-
-2006-01-24 Jiri Malak <Jiri.Malak@iol.cz>
-
- WATCOM compatibility changes.
- * include/ddk/ntddk.h (DECL_IMPORT): Define using __declspec,
- rather than __attribute__.
- (DECL_EXPORT): Likewise.
- * include/ddk/winddk.h (DDKAPI): Avoid using __attribute__.
- (DDKFASTAPI): Likewise.
- (DDKCDECLAPI): Likwise.
- (KeGetCurrentKPCR): Provide __WATCOMC__ syntax for inline code.
-
-2006-01-23 Brandon Sneed <brandon@redf.net>
-
- * setupapi.def: Add all CM_* functions defined in ddk/cfgmgr32.h
- to exports.
-
-2006-01-17 Chris Sutcliffe <ir0nh34d@users.sf.net>
-
- * include/w32api.h: Increment version to 3.6.
- * Makefile.in: Ditto.
-
-2006-01-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wincrypt.h (WINADVAPI): Add to prototypes of
- advapi32.dll functions.
-
-2006-01-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winsock2.h (struct sockaddr_storage): Use RFC 2553
- names for padding size constants.
-
-2006-01-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/aclapi.h (WINADVAPI): Add to prototypes.
- * include/winreg.h (WINADVAPI): Likewise.
- * include/winsvc.h (WINADVAPI): Likewise.
-
-2006-01-05 Michael Gerdau <mgd@technosis.de>
-
- * include/winbase.h (WINADVAPI): Define.
-
-2006-01-03 Christopher Faylor <cgf@timesys.com>
-
- * include/winuser.h (CreateWindowStation): Correctly identify first
- argument as constant.
- (CreateWindowStation@): Ditto.
-
-2006-01-03 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/uxtheme.h [_WIN32_WINNT >= 0x0501]
- (TMT_*, BT_*): Add constants.
-
-2005-12-31 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winsock2.h: Don't define struct sockaddr_storage when
- building Cygwin.
-
-2005-12-22 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/ws2_32.c: New file, defining IPv6 constants.
- * lib/Makefile.in (SOURCES): Add ws2_32.c
- (EXTRA_OBJS): Add ws2_32.o.
-
-2005-12-21 Michael Jung <mjung@iss.tu-darmstadt.de>
-
- * lib/user32.def (PrivateExtractIconsA@32,
- PrivateExtractIconsW@32): Define.
- * lib/shell32.c (IID_IShellLinkDataList): Add GUID.
-
-2005-12-12 Christopher Faylor <cgf@timesys.com>
-
- * include/winuser.h (WINSTA_ALL_ACCESS): Define.
-
-2005-12-09 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/kernel32.def (CreateFiberEx): Correct suffix.
-
-2005-12-09 Huw Davies <hdavies@users.sourceforge.net>
- Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/msxml-uuid.c: New file to generate UUIDs for
- MSXML interfaces.
- * lib/Makefile.in (UUID_OBJS): Add msxml-uuid.o.
-
-2005-12-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winbase.h (GetDevicePowerState): Add prototype.
- * lib/kernel32.def (GetDevicePowerState): Correct suffix.
-
-2005-12-07 Brian Gunlogson <gmb300@users.sourceforge.net>
-
- * include/winuser.h (GetClassLongPtr{AW}): Guard prototypes with _WIN64.
- Define as macro if !_WIN64.
- (SetClassLongPtr{AW}): Likewise.
- (GCLP_*): Add GetClassLongPtr defines.
- * lib/user32.def (GetClassLongPtr{AW}): Remove stubs.
- (SetClassLongPtr{AW}): Likewise.
-
-2005-11-18 Brian Gunlogson <gmb300@users.sourceforge.net>
-
- * include/winuser.h (GetClassLongPtr{AW}): Add prototypes.
- (SetClassLongPtr{AW}): Likewise.
- (GCLP_*): Add GetClassLongPtr defines.
- * lib/user32.def (GetClassLongPtr{AW}): Add stubs.
- (SetClassLongPtr{AW}): Likewise.
-
-2005-11-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commdlg.h (OPENFILENAMEW): Add members for
- _WIN32_WINNT >= 0x0500.
- Thanks to Ricardo Dalcorsso Fodra.
- (OPENFILENAMEA): Modify whitespace. Ansify comment.
-
-2005-11-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wingdi.h (GetICMProfileA): Correct prototype.
- (GetICMProfileW): Likewise.
- Thanks to: Paul J Lucas
-
-2005-11-04 Michael Jung <mjung@iss.tu-darmstadt.de>
-
- * lib/shell32.c (CLSID_ShellFSFolder): Add GUID.
-
-2005-11-03 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/crypt32.def (CertOIDToAlgId, CertAlgIDToOID, CryptProtectData,
- CryptUnprotectData, CryptDecodeObjectEx, CryptEncodeObjectEx,
- CryptRegisterOIDFunction, CryptUnregisterOIDFunction): Add stubs.
- Thanks to: F Richter <res2002 at users dot sourceforge dot net>
-
-2005-10-29 Chris Sutcliffe <ir0nh34d@users.sf.net>
-
- * include/objbase.h: Fix typo.
- * include/w32api.h: Increment version to 3.5.
- * Makefile.in: Ditto.
-
-2005-10-27 Chris Sutcliffe <ir0nh34d@users.sf.net>
-
- * include/w32api.h: Increment version to 3.4.
- * Makefile.in: Ditto.
-
-2005-10-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winbase.h (GetProcessId): Remove duplicate declaration.
- Use _WIN32_WINNT >= 0x0501 guard.
-
-2005-10-11 Christopher Faylor <cgf@timesys.com>
-
- * include/winbase.h (GetProcessId): Declare.
-
-2005-09-23 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * lib/ddk/newdev.def: Added.
- Thanks to: Stephan Meyer <ste_meyer at users dot sourceforge dot net>
-
-2005-09-23 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/commdlg.h (OPENFILENAME): Added WINNT >= 0x0500
- component.
- Thanks to: Gennady Feldman <gena01 at users dot sourceforge dot net>
-
-2005-09-23 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * lib/shell32.def (SHILCreateFromPath): Add stub.
- Thanks to: Michael Jung <mjung at iss dot tu-darmstadt dot de>
-
-2005-09-21 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/winbase.h (RegisterWaitForSingleObject,
- RegisterWaitForSingleObjectEx): Define.
- * lib/kernel32.def (RegisterWaitForSingleObjectEx@20): Define.
- (RegisterWaitForSingleObject@16): Changed to
- RegisterWaitForSingleObject@24.
- Thanks to: Brandon Sneed <nivenh at users dot sourceforge dot net>
-
-2005-09-19 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winsock2.h (SO_EXCLUSIVEADDRUSE): Define.
- Thanks to: Gisle Vanem <giva at bgnett dot no>
-
-2005-09-08 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/reason.h [_WIN32_WINNT >= 0x0501]
- (SHTDN_REASON_*): New file.
- * include/objbase.h: Avoid double header guard.
-
-2005-08-17 Michael Jung <mjung@iss.tu-darmstadt.de>
-
- * lib/shell32.c (CLSID_RecycleBin, CLSID_ControlPanel,
- CLSID_MyComputer,CLSID_Internet, CLSID_NetworkPlaces,
- CLSID_MyDocuments, CLSID_FolderShortcut): Add GUIDs.
-
-005-08-17 Martin Fuchs <martin-fuchs@gmx.net>
-
- * include/shlobj.h (IContextMenu3): Define.
- * include/shlguid.h (IID_IContextMenu3): Declare.
- * lib/shell32.c (IID_IContextMenu3): Define.
-
-2005-08-17 Martin Fuchs <martin-fuchs@gmx.net>
-
- * include/shlobj.h (SHFormatDrive): Declaration of function
- and associated constants.
-
-2005-08-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ddk/hidsdi.h: New file.
- * lib/ddk/hid.def: Uncomment symbols and add stdcall suffix for
- functions declared in hidsdi.h.
- Thanks to: Alex J Lennon <ajlennon at organixconsulting dot com>
-
-2005-08-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/imm32.def (ImmDisableIME): Add stub.
- Thanks to: "kidmin" <kidmin at users dot sourceforge dot net>
-
-2005-08-10 Chris Sutcliffe <ir0nh34d@users.sf.net>
-
- * include/w32api.h: Increment version to 3.3.
- * Makefile.in: Ditto.
-
-2005-07-28 Earnie Boyd <earnie@users.sf.net>
-
- * include/winnt.h (SUBLANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN):
- Correct their values.
- Thanks to: Daniel K. O. <danielosmari at users dont sf dot net>
-
-2005-07-25 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/winuser.h (HSHELL_RUDEAPPACTIVATED): Define.
-
-2005-07-20 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wingdi.h (TT_PRIM_CSPLINE): Define.
- Thanks to: Bob Jamison <ishmal at users dot sourceforge dot net>
-
-2005-07-20 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/richedit.h (SETTEXTEX): Define structure and
- associated constants.
- (GT_SELECTION): Define GETTEXTEX flag constant.
-
-2005-07-19 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wingdi.h (SYSPAL_NOSTATIC256): Define.
-
-2005-07-19 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wingdi.h (WINGDIAPI): Define to DECLSPEC_DLLIMPORT
- if __W32API_USE_DLLIMPORT__. Use throughout to qualify
- prototypes.
-
-2005-07-19 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commctrl.h (RBBS_USECHEVRON): Define.
- (RBBS_*): Use hex notation, group together.
-
-2005-07-18 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/kernel32.def (GetUserGeoID): Correct suffix.
- Thanks to: "bernd23" <bernd23 at users dot sourceforge dot net>
-
-2005-07-18 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commctrl.h (TreeView_SetItemState): Initilise
- _tvi.hItem.
- Thanks to: Joseph Remes <jremes at users dot sourceforge dot net>
-
-2005-07-18 Mattia Barbon <mbarbon@users.sourceforge.net>
-
- * include/commctrl.h (NMLVFINDITEM): Add structure.
-
-2005-07-18 Michael Gerdau <mgdde@users.sourceforge.net>
-
- * include/wininet.h (WININET_API_FLAG_*): Add defines.
-
-2005-07-18 Daniel Atallah <datallah@users.sourceforge.net>
-
- * include/winnt.h (VER_SET_CONDITION): Define.
-
-2005-07-18 Michael Gerdau <mgdde@users.sourceforge.net>
-
- * include/wincon.h (AttachConsole): Correct _WIN32_WINNT guard.
- (ATTACH_PARENT_PROCESS): Define.
- (CONSOLE_WINDOWED_MODE): Correct definition to match MSDN
- documentation.
-
-2005-07-17 Benoit Blanchon <bblanchon@users.sourceforge.net>
-
- * include/winbase.h (QueueUserWorkItem): Add prototype.
-
-2005-07-13 Benoit Blanchon <bblanchon@users.sourceforge.net>
-
- * include/wingdi.h (SHADEBLENDCAPS, SB_NONE, SB_CONST_ALPHA,
- SB_PIXEL_ALPHA, SB_PREMULT_ALPHA, SB_GRAD_RECT, SB_GRAD_TRI,
- COLORMGMTCAPS, CM_NONE, CM_DEVICE_ICM, CM_GAMMA_RAMP,
- CM_CMYK_COLOR): Define.
-
-2005-06-19 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winldap.h (ldap_simple_bindW, ldap_simple_bind_sW,
- ldap_bindW, ldap_bind_sW): Change PCHAR arg to PWCHAR.
- Thanks to: Christian <chhd at users dot sf dot net>
-
-2005-06-18 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/richedit.h (GETTEXTEX): Correct name of lpUsedDefChar
- field.
- Thanks to: Saulius Menkevicius <bobas at users dot sf dot net>
-
-2005-06-18 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winbase.h (GlobalDiscard): Define as macro.
- Thanks to: David Golub <david_golub at users dot sf dot net>
-
-2005-05-13 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winnetwk.h (WNetGetResourceParentA): Add missing declaration.
- (WNetGetResourceParentW): Ditto.
- * include/ddk/ntifs.h (FILE_ID_FULL_DIRECTORY_INFORMATION): Define.
- (FILE_ID_BOTH_DIRECTORY_INFORMATION): Define.
-
-2005-04-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wininet.h (FtpGetFileSize): Add prototype.
- (FtpCommand[AW]): Correct prototypes.
- Reported by: <siger at users dot sf dot net>
-
-2005-04-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/vfw.h (capCreateCaptureWindow[AW]): Add prototypes.
- (capGetDriverDescription[AW]): Likewise.
-
-2005-04-03 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winnt.h (SE_UNDOCK_NAME TEXT): Define.
- (SE_MANAGE_VOLUME_NAME TEXT): Ditto.
- (SE_IMPERSONATE_NAME TEXT): Ditto.
- (SE_ENABLE_DELEGATION_NAME TEXT): Ditto.
- (SE_SYNC_AGENT_NAME TEXT): Ditto.
-
-2005-03-16 Christopher Faylor <cgf@timesys.com>
-
- * include/winnt.h (SYSTEM_LUID): Fix definitition invalidated by below
- change.
-
-2005-03-16 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (_LUID): Add structure. Correct LUID typedef.
- Thanks to:
- Paul-Christiaan Spruijtenburg <wakarimasu at users dot sf dot net>
-
-2005-03-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ws2tcpip.h (getaddrinfo, freeaddrinfo, getnameinfo):
- Guard with _WIN32_WINNT >= 0x0501. Add FIXME comment.
- (gai_strerror[AW]): Put into #if 0 block.
-
-2005-03-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/basetyps.h (__int16): Correct define.
-
-2005-02-10 Jiri Malak <Jiri.Malak@iol.cz>
- Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/directx/dinput_private.h (ATTRIBUTE_TEXT_SECTION): New
- define for Open Watcom portability.
- * lib/directx/(dinput_joy.c, dinput_joy2.c, dinput_kbd.c,
- dinput_mouse.c, dinput_mouse2.c): Use new macro in definition
- of local c_rgodfDI* objects. Replace .rdata section attribute
- with 'const' keyword in definition of global c_dfDI* objects.
-
-2005-02-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winioctl.h (IOCTL_VOLUME_BASE,
- IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS, IOCTL_VOLUME_IS_CLUSTERED):
- Copy defines from include/ddk/ntdddvol.h.
- Bug reported to Debian by Anand Kumria <wildfire@progsoc.org>
-
-2005-01-27 Oliver Stoeneberg <oliverst@online.de>
-
- * include/winbase.h (PWIN32_FIND_DATA): Add typedef.
-
-2005-01-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winuser.h (SW_SMOOTHSCROLL): Add define.
- Reported by: Christian Ehrlicher <chehrlic@users.sf.net>
-
-2005-01-21 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/commdlg.h (OFN_DONTADDTORECENT): Added definition.
-
-2005-01-18 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/user32.def (MonitorFromPoint): Correct suffix.
-
-2005-01-13 Benoit Blanchon <bblanchon@users.sourceforge.net>
-
- * include/wininet.h (InternetCheckConnectionA,
- InternetCheckConnectionW) Add prototypes.
- (INTERNET_RAS_INSTALLED, INTERNET_CONNECTION_OFFLINE,
- INTERNET_CONNECTION_CONFIGURED): Add defines.
-
-2005-01-07 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/commctrl.h (ComboBox_SetMinVisible,
- ComboBox_GetMinVisible): Added Macros.
- * include/winuser.h (CB_SETMINVISIBLE, CB_GETMINVISIBLE):
- Added definitions.
-
-2005-01-02 Jiri Malak <Jiri.Malak@geac.cz>
-
- * include/winnt.h (GetCurrentFiber, GetFiberData): Make inline
- assembly code conditional on _X86_.
-
-2005-01-02 Earnie Boyd <earnie@users.sf.net>
-
- * include/w32api.h: Increment version to 3.2.
- * Makefile.in: Ditto.
- * include/afxres.h: Remove the \r from the line ending.
- * include/errorrep.h: Ditto.
- * include/shldisp.h: Ditto.
- * include/tschema.h: Ditto.
- * lib/dhcpcsvc.def: Ditto.
- * lib/uxtheme.def: Ditto.
- * lib/wldap32.def: Ditto.
-
-2005-01-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winerror.h (ERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY):
- Correct typo.
- Thanks to: Aidan France <aidan1@users.sourceforge.net>
-
-2004-12-29 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- *include/winuser.h (MNS_*, WM_MENUCOMMAND,
- WM_MENUGETOBJECT, WM_MENUDRAG, WM_NCMOUSEHOVER,
- WM_NCMOUSELEAVE, WM_UNINITMENUPOPUP,
- SPI_GETFOREGROUNDLOCKTIMEOUT,
- SPI_SETFOREGROUNDLOCKTIMEOUT): Added definitions.
- *include/imm.h (WM_IME_REQUEST): Added definition.
- *include/shlobj.h (SLGP_RAWPATH,
- SLGP_UNCPRIORITY): Added definition.
-
-2004-12-28 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- *include/winuser.h (HSHELL_FLASH): Added definition.
-
-2004-12-23 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
-
- * include/shldisp.h (IAutoComplete): Added interface definiton.
- * include/shldisp.h (IAutoComplete2): Added interface definiton.
- * include/shldisp.h (ACO_AUTOSUGGEST): Added definition.
- * include/shlobj.h (IObjMgr): Added interface definiton.
- * lib/shell32.c (CLSID_AutoComplete, IID_AutoComplete,
- IID_AutoComplete2, CLSID_ACLMulti, IID_IObjMgr,
- CLSID_ACListISF, IID_IACList): Added GUIDs.
- * include/shlguid.h (CLSID_AutoComplete, IID_AutoComplete,
- IID_AutoComplete2, CLSID_ACLMulti, IID_IObjMgr,
- CLSID_ACListISF, IID_IACList): Added GUIDs.
-
-2004-12-23 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commctrl.h (CDRF_NOTIFYSUBITEMDRAW): Add define.
- Thanks to: Chris Sutcliffe <ironhead@walled.net>
- (CDRF_*): Use hex notation for constants.
-
-2004-12-08 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/sqlext.h (SQL_INTERVAL_*): Correct macros.
- Reported by Eric Sharkey <sharkey at netrics dot com>
-
-2004-12-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (TOKEN_INFORMATION_CLASS): Add
- TokenGroupsAndPrivileges, TokenSessionReference,
- TokenSandBoxInert, TokenAuditPolicy, TokenOrigin.
- Reformat.
- (SID_NAME_USE): Add SidTypeComputer. Reformat.
- Thanks to Gabriel Linder <mingwlinder@users.sourceforge.net>
-
-2004-12-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/comctl32.def (ImageList_Copy, ImageList_DrawIndirect,
- ImageList_Duplicate): Add stubs.
-
-2004-12-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/directx/strmiids.c (MEDIASUBTYPE_YV12): Correct GUID.
- Thanks to "Pete" <pross@xvid.org>
-
-2004-11-21 Benoit Blanchon <bblanchon@users.sourceforge.net>
-
- * include/wingdi.h (AC_SRC_ALPHA, AC_SRC_NO_ALPHA,
- AC_DST_NO_ALPHA, ...): Add defines.
- * include/winuser.h (ULW_COLORKEY,ULW_ALPHA,
- ULW_OPAQUE): Add defines.
-
-2004-11-21 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (VerSetConditionMask): Correct typo in _WIN32_WINNT
- guard.
- * lib/kernel32.def (VerSetConditionMask): Correct stdcall
- suffix.
- * lib/ddk/ntoskrnl.def (VerSetConditionMask): Likewise.
-
-2004-11-20 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winbase.h (PPROCESS_INFORMATION): Add typedef.
- (CreateProcessWithLogonW): Declare.
- (LOGON_WITH_PROFILE, LOGON_NETCREDENTIALS_ONLY): Add defines.
- Thanks to: "jkmaki" <jkmaki@users.sourceforge.net>
-
-2004-11-19 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/sspi.h (SecPkgContext_Sizes): Fix typo.
- Thanks to: David Leonard <leonard@users.sourceforge.net>
-
-2004-11-19 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/sspi.h (SecPkgCredentials_Names[AW]): Correct name.
- Thanks to: David Leonard <leonard@users.sourceforge.net>
-
-2004-11-19 Magnus Olsen <greatlord@users.sourceforge.net>
-
- * include/winuser.h (MSLLHOOKSTRUCT): Add structure.
-
-2004-11-19 Magnus Olsen <greatlord@users.sourceforge.net>
-
- * include/winuser.h (LLKHF_EXTENDED, LLKHF_INJECTED, LLKHF_UP):
- Add defines.
- (LLKHF_ALTDOWN): Define based on KF_ALTDOWN.
-
-2004-11-19 Benoit Blanchon <bblanchon@users.sourceforge.net>
-
- * include/shellapi.h (NIF_GUID): Add another define.
-
-2004-11-18 Earnie Boyd <earnie@users.sf.net>
-
- * include/wincon.h (AttachConsole): Correct the _WIN32_WINNT filter.
- Changed it twice due to inconsistent MSDN documentation.
- * include/w32api.h (Windows95, etc. and IE3, etc.): Add definitions.
-
-2004-11-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/shlobj.h (SHGFP_TYPE): Add enum.
-
-2004-11-12 Loïc Guilloux (glx@users.sourceforge.net>
-
- * include/winuser.h (WM_THEMECHANGED): Add define.
-
-2004-11-11 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ddk/winddk.h (ExAllocateFromPagedLookasideList,
- ExFreeToPagedLookasideList): Guard inline versions with
- (__USE_NTOSKRNL__) && (_WIN32_WINNT >= 0x0501). Declare as
- external functions for earlier _WIN32_WINNT.
-
-2004-11-11 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ras.h (RASCONN[AW]): Remove dwSessionId field.
-
-2004-11-09 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnls.h (WINBASEAPI): Define as DECLSPEC_IMPORT
- if undefined and __W32API_USE_DLLIMPORT__.
- Add WINBASEAPI token to prototypes, throughout.
-
-2004-11-08 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (GetCurrentFiber): Support -masm=intel.
- (GetFiberData): Likewise.
- (NtCurrentTeb): Likewise.
-
-2004-11-04 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/shellapi.h (NIF_INFO): Add define.
- (NIIF_*) Add defines..
- Thanks to: Benoit Blanchon <bblanchon@users.sourceforge.net>
- (NIF_*): Convert constants to hex.
-
-2004-11-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wingdi.h (GetFontUnicodeRanges,GetGlyphIndicesA,
- GetGlyphIndicesW): Declare.
- (GGI_MARK_NONEXISTING_GLYPHS): Define
- * lib/gdi32.def (GetFontUnicodeRanges,GetGlyphIndicesA,
- GetGlyphIndicesW): Add stubs.
-
-2004-10-24 Dan Aloni <da-x@colinux.org>
-
- * include/ddk/ntapi.h (NtQueryFullAttributesFile,
- ZwQueryFullAttributesFile): Declare.
- * include/ddk/ntapi.h (RtlDosPathNameToNtPathName_U):
- Declare.
- lib/ntoskrnl.def (ZwQueryDirectoryFile, ZwQueryFullAttributesFile.
- ZwQueryVolumeInformationFile): Add stubs.
-
-2004-10-18 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wsahelp.h (WINSOCK_MAPPING, WSHGetWinsockMapping,
- PWSH_GET_WINSOCK_MAPPING): Don't define if __OBJC__.
-
-2004-10-15 Robert Wruck <wruck@tweerlei.de>
- Danny Smith <dannysmith@users.sourceforge.net>
-
- = include/winbase.h (InitializeSListHead, Interlocked*):
- Guard with !__USE_NTOSKRNL__.
-
- * include/ddk/ntddk.h (__USE_NTOSKRNL__): Define.
- * include/ddk/winddk.h (InitializeSListHead, Interlocked*):
- Guard with __USE_NTOSKRNL__.
- (ExInterlockedPopEntrySList, ExInterlockedPushEntrySList):
- Add prototypes. Guard macro definition with __USE_NTOSKRNL__
- && _WIN32_WINNT >= 0x0501
- (ExAllocateFromNPagedLookasideList, ExAllocateFromPagedLookasideList,
- ExFreeToNPagedLookasideList, ExFreeToPagedLookasideList):
- Replace calts to InterlockedPopEntrySList, InterlockedPushEntrySList
- with ExInterlockedPopEntrySList, ExInterlockedPushEntrySList.
-
- * lib/ddk/ntosknl.def (ExInterlockedPopEntrySList,
- ExInterlockedPushEntrySList) Add stubs with fastcall decoration.
- (ExDesktopObjectType, ExEventObjectType, ExSemaphoreObjectType,
- ExWindowStationObjectType, IoAdapterObjectType,
- IoDeviceHandlerObjectSize, IoDeviceHandlerObjectType,
- IoDeviceObjectType, IoDriverObjectType, IoFileObjectType,
- LpcPortObjectType, MmSectionObjectType, SeTokenObjectType):
- Uncomment stubs.
-
-2004-10-11 Robert Wruck <wruck@tweerlei.de>
-
- * include/ddk/winddk.h (IoReleaseRemoveLockAndWait): Fix
- definition
- (IoReleaseRemoveLock): Add definition.
-
-2004-10-10 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ddk/winnt4.h (Exi386InterlockedDecrementLong,
- Exi386InterlockedExchangeUlong, Exi386InterlockedIncrementLong);
- Add prototypes.
- * include/winddk.h (ExInterlockedAddUlong,
- ExInterlockedInsertHeadList, ExInterlockedInsertTailList,
- ExInterlockedRemoveHeadList, ExInterlockedPopEntryList,
- ExInterlockedPushEntryList): Change calling convention to
- DDKAPI.
- (ExfInterlockedAddUlong,ExInterlockedInsertHeadList,
- ExInterlockedInsertTailList, ExInterlockedRemoveHeadList,
- ExInterlockedPopEntryList, ExInterlockedPushEntryList):
- Add prototypes for DDKFASTAPI versions.
- Thanks to Vadim Yegor0v <zg at bmg dot lv> for report.
- * lib/ntoskrnl.def (ExInterlockedAddUlong,
- ExInterlockedInsertHeadList, ExInterlockedInsertTailList,
- ExInterlockedRemoveHeadList, ExInterlockedPopEntryList,
- ExInterlockedPushEntryList): Remove lead '@' from stubs.
- (ExfInterlockedAddUlong,ExfInterlockedInsertHeadList,
- ExfInterlockedInsertTailList, ExfInterlockedRemoveHeadList,
- ExfInterlockedPopEntryList, ExfInterlockedPushEntryList):
- Add fastcall stubs.
- (Exi386InterlockedDecrementLong, Exi386InterlockedExchangeUlong,
- Exi386InterlockedIncrementLong); Add stdcall stubs.
-
-2004-09-30 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winbase.h (WINBASEAPI): Define as DECLSPEC_IMPORT only
- if __W32API_USE_DLLIMPORT__ is defined.
- * include/winuser.h (WINUSERAPI): Likewise.
-
-2004-09-29 Filip Navara <xnavara@volny.cz>
-
- * include/ddk/(atm.h, batclass.h, cfg.h, cfgmgr32.h, d4drvif.h,
- d4iface.h, ddkmapi.h, hidclass.h, hidpi.h, mcd.h, miniport.h,
- mountdev.h, mountmgr.h, ndis.h, ndistapi.h, ndiswan.h, netpnp.h,
- newdev.h, ntapi.h, ntdd8042.h, ntddbeep.h, ntddcdrm.h, ntddcdvd.h,
- ntddchgr.h, ntdddisk.h, ntddkbd.h, ntddmou.h, ntddpar.h, ntddpcm.h,
- ntddscsi.h, ntddser.h, ntddstor.h, ntddtape.h, ntddtdi.h,
- ntddvdeo.h, ntddvol.h, ntpoapi.h, parallel.h, pfhook.h, poclass.h,
- scsi.h, scsiscan.h, smbus.h, srb.h, storport.h, tdiinfo.h,
- tdikrnl.h, tvout.h, upssvc.h, usb.h, usb100.h, usbdi.h, usbioctl.h,
- usbiodef.h, usbscan.h, usbuser.h, videoagp.h, winddi.h, winddk.h,
- winnt4.h, ws2san.h): Fixed packing.
- * include/ddk/atm.h (ATM_TRAFFIC_DESCRIPTOR_IE): Fixed declaration.
- * include/ddk/hidclass.h (HID_INTERFACE_HIDPARSE,
- HID_INTERFACE_NOTIFY_PNP): Likewise.
- * include/ddk/ndis.h (NDIS_DMA_BLOCK, CO_FLOW_PARAMETERS): Likewise.
- (NdisQueryPacketLength): Added macro. Thanks to Art Yerkes
- <ayerkes@speakeasy.net>.
- * include/ddk/usb100.h (USB_CONFIGURATION_DESCRIPTOR): Fixed
- declaration.
- * include/ddk/winddi.h (PATHDATA, GLYPHPOS): Likewise.
- * include/ddk/winddk.h (PDRIVER_CONTROL, PDRIVER_LIST_CONTROL,
- PDRIVER_ADD_DEVICE, PIO_COMPLETION_ROUTINE, PDRIVER_CANCEL,
- PKDEFERRED_ROUTINE, PDRIVER_DISPATCH, PIO_DPC_ROUTINE,
- PMM_DLL_INITIALIZE, PMM_DLL_UNLOAD, PDRIVER_ENTRY,
- PDRIVER_INITIALIZE, PKSERVICE_ROUTINE, PIO_TIMER_ROUTINE,
- PDRIVER_REINITIALIZE, PDRIVER_STARTIO, PKSYNCHRONIZE_ROUTINE,
- PDRIVER_UNLOAD, DRIVER_OBJECT): Fixed callback declarations.
- (struct FILE_BASIC_INFORMATION): Renamed to _FILE_BASIC_INFORMATION.
- (SYNCH_LEVEL): Added definition.
- (KPCR, KPCR_TIB): Fixed declaration.
- (Interlocked[Push/Pop]EntrySList): Declare only if winbase.h isn't
- included and _WIN32_WINNT >= 0x0501.
- (RtlEqualLuid): Fixed macro definition.
- (KfLowerIrql, KfRaiseIrql): Declare and use instead of KeLowerIrql and
- KeRaiseIrql on i386 architectures.
-
-2004-09-06 Hosaka Yuji <hos@tamanegi.org>
-
- * include/mshtml.h (IHTMLDocument2): Correct get_selection
- declaration.
- (IHTMLSelectionObject): Correct get_type declaration.
- (IHTMLFramesCollection2, IHTMLWindow2, IHTMLFrameBase,
- IHTMLFrameBase2, IHTMLFrameBase3, IHTMLBodyElement,
- IHTMLBodyElement2): Add interfaces.
- (LPHTMLIMAGEELEMENTFACTORY, LPHTMLEVENTOBJ, LPHTMLSCREEN,
- LPHTMLOPTIONELEMENTFACTORY, LPOMHISTORY, LPOMNAVIGATOR): Add
- typedefs.
- * lib/mshtml-uuid.c (IID_IHTMLFrameBase2, IID_IHTMLFrameBase3):
- Add IIDs.
-
-2004-09-05 Earnie Boyd <earnie@users.sf.net>
-
- * include/w32api.h: Increment version to 3.1.
- * Makefile.in: Ditto.
-
-2004-09-05 Hosaka Yuji <hos@tamanegi.org>
-
- * include/winuser.h (MonitorFromPoint, MonitorFromRect,
- MonitorFromWindow): Add prototypes.
- * lib/user32.def (MonitorFromPoint, MonitorFromRect,
- MonitorFromWindowMonitorFromWindow): Add stubs.
- * include/shellapi.h (DuplicateIcon): Add prototype.
-
-2004-09-05 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winuser.h (WINUSERAPI): New define.
- Use it to mark user32.dll imports, throughout.
-
-2004-09-05 Hosaka Yuji <hos@tamanegi.org>
-
- * lib/ddk/hid.def (HidD_FlushQueue, HidD_FreePreparsedData,
- HidD_GetAttributes, HidD_GetConfiguration, HidD_GetFeature,
- HidD_GetHidGuid, HidD_GetIndexedString, HidD_GetInputReport,
- HidD_GetManufacturerString, HidD_GetMsGenreDescriptor,
- HidD_GetNumInputBuffers, HidD_GetPhysicalDescriptor,
- HidD_GetPreparsedData, HidD_GetProductString,
- HidD_GetSerialNumberString, HidD_SetConfiguration,
- HidD_SetFeature, HidD_SetNumInputBuffers, HidD_SetOutputReport,
- HidP_GetButtonCaps, HidP_GetValueCaps): Add exports.
-
-2004-08-25 Lars Rune Nøstdal <daysleper@users.sourceforge.net>
-
- * include/wincon.h (CONSOLE_FULLSCREEN_MODE, CONSOLE_WINDOWED_MODE):
- Add XP defines.
- (PCOORD): Add typedef.
- (GetConsoleDisplayMode, SetConsoleDisplayMode): Add prototypes.
-
-2004-08-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winldap.h: Don't check value of UNICODE.
- Thanks to: "Jean-Do" <spab@users.sourceforge.net>
-
-2004-08-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winbase.h (WINBASEAPI): Guard with __INSIDE_CYGWIN__.
-
-2004-08-24 Sam Robb <samrobb@users.sourceforge.net>
-
- * include/winbase.h (GetFileSizeEx): Add _WIN32_WINNT >= 0x0500
- guard.
-
-2004-08-24 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winbase.h: Add WINBASEAPI token to prototypes, throughout.
-
-2004-08-15 Ken Fitlike <kenfitlike@users.sourceforge.net>
-
- * include/commctrl.h (WC_TREEVIEWA): Remove parenthenses.
-
-2004-08-10 Sebastian Nowak <snowak1@users.sourceforge.net>
-
- * include/ws2spi.h (LPWSPSELECT): Correct typedef.
-
-2004-08-10 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wincrypt.h: Correct _WIN32_WINNT typo.
-
-2004-08-10 Ed Schaller <schallee@darkmist.net>
-
- * include/wincrypt.h (MS_ENH_RSA_AES_PROV_A, MS_ENH_RSA_AES_PROV_W)
- (ALG_SID_AES_128, ALG_SID_AES_192, ALG_SID_AES_256, ALG_SID_AES 17)
- (CALG_AES_128, CALG_AES_192, CALG_AES_256, CALG_AES,PROV_RSA_AES):
- Add defines.
- (CALG_SHA1): Add define.
- (HP_HMAC_INFO): Add define.
- (HMAC_INFO): Add struct.
- (BLOBHEADER): Add typedef.
-
-2004-07-26 Hartmut Honisch <hhonisch@users.sourceforge.net>
-
- * include/commctrl.h (TreeView_SetItemState): Define macro.
-
-2004-07-24 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wingdi.h (CMYK): Correct macro. Group CMYK/RGB
- macros together.
-
-2004-07-24 Brodie Thiesfield <brofield@users.sourceforge.net>
-
- * include/shlobj.h (FILEDESCRIPTOR): Unicode it.
- (FILEGROUPDESCRIPTOR): LIkewise.
-
-2004-07-06 Corinna Vinschen <corinna@vinschen.de>
-
- * winbase.h (IsWow64Process): Add missing WINAPI qualifier.
-
-2004-06-16 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (IMAGE_ORDINAL_FLAG): Map to ...
- (IMAGE_ORDINAL_FLAG{32,64}: New defines.
- (IMAGE_SNAP_BY_ORDINAL): Map to ...
- (IMAGE_SNAP_BY_ORDINAL{32,64}: New defines.
- (IMAGE_ORDINAL): Map to ...
- (IMAGE_ORDINAL{32,64}: New defines.
- (IMAGE_THUNK_DATA): Map to ...
- (IMAGE_THUNK_DATA{32,64}: New structures.
- (IMAGE_THUNK_DATA): Map to ...
- (IMAGE_THUNK_DATA{32,64}: New structures.
- (IMAGE_IMPORT_DESCRIPTOR): Map to ...
- (IMAGE_IMPORT_DESCRIPTOR{32,64}: New structures.
- (IMAGE_IMAGE_TLS_DIRECTORY) Map to ...
- (IMAGE_IMAGE_TLS_DIRECTORY{32,64}: New structures.
-
-2004-06-16 Bang Jun-Young <junyoung@NetBSD.org>
-
- * w32api/include/winnt.h (WAITORTIMERCALLBACKFUNC): Protect with
- _WIN32_WINNT >= 0x0500.
-
-2004-06-05 Luke Dunstan <infidel@users.sourceforge.net>
-
- * include/winbase.h (GetWriteWatch): Correct prototype.
- (WRITE_WATCH_FLAG_RESET): Define.
- Thanks to Sergey Philippov <phis@users.sourceforge.net>.
-
-2004-06-02 Rocher Laurent <lrocher@users.sourceforge.net>
-
- * include/commctrl.h (Animate_OpenEx): Define.
- (DateTime_GetSystemTime, DateTime_SetSystemTime): Correct names.
- (ListView_GetNumberOfWorkAreas): Correct macro.
- (ListView_SetUnicodeFormat, ListView_GetUnicodeFormat,
- ListView_SetItemCountEx, ListView_GetISearchString,
- TreeView_GetLastVisible, Header_CreateDragImage,
- Header_SetImageList, Header_GetImageList): Define.
- (LVM_SETUNICODEFORMAT, LVM_GETUNICODEFORMAT,
- MCM_GETUNICODEFORMAT, MCM_SETUNICODEFORMAT,
- TBSTATE_ELLIPSES): Define.
- (MonthCal_SetRange): Correct macro.
- (ImageList_Duplicate): Declare.
-
-2004-05-29 Filip Navara <xnavara@volny.cz>
-
- * include/winnt.h (IMAGE_EXPORT_DIRECTORY): Fixed declaration.
-
-2004-05-25 Al Slater <al.slater@scluk.com>
-
- * include/httpext.h (HSE_SEND_HEADER_EX_INFO,
- HSE_REQ_SEND_RESPONSE_HEADER_EX): Define.
-
-2004-05-15 Filip Navara <xnavara@volny.cz>
-
- * include/ddk/kbdmou.h: New file.
- * lib/ddk/videoprt.def (VideoPortMapBankedMemory,
- VideoPortMapDmaMemory, VideoPortMapMemory): Correct suffix.
- * lib/ddk/ntoskrnl.def (_snprintf, _snwprintf, _vsnprintf,
- _vsnwprintf, sprintf, swprintf): Export.
-
-2004-05-15 Filip Navara <xnavara@volny.cz>
-
- * include/ddk/ntddk.h: Don't set 4-byte alignment on included
- headers.
-
-2004-05-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wingdi.h: Correct non-unicode typedefs of
- ENUMLOGFONTEXDV, PENUMLOGFONTEXDV, LPENUMLOGFONTEXDV.
-
-2004-05-07 Pascal Obry <obry@act-europe.fr>
-
- * include/winsock.h (IN_CLASSA): Fix macro.
- * include/winsock2.h (IN_CLASSA): Fix macro.
-
-2004-04-29 Bart Oldeman <bartoldeman@users.sourceforge.net>
-
- * include/objbase.h (STGOPTIONS): Correct pwcsTemplateFile type.
- * include/aclui.h: Remove '\r', throughout.
- * include/msacm.h: Likewise.
- * lib/aclui.def: Likewise.
-
-2004-04-28 Luke Dunstan <infidel@users.sourceforge.net>
-
- * lib/comctl32.def (SetWindowSubclass): Add stub.
- Thanks to Eugene <egladysh@users.sourceforge.net>.
-
-2004-04-24 Luke Dunstan <infidel@users.sourceforge.net>
-
- * include/winbase.h (EXECUTION_STATE): Add typedef.
- (SetThreadExecutionState): Declare.
- * include/wingdi.h (_WINGDI_): Define.
- * include/objbase.h (_OBJBASE_H_): Define.
-
-2004-04-24 Luke Dunstan <infidel@users.sourceforge.net>
-
- * include/winuser.h (SM_IMMENABLED, SM_CXFOCUSBORDER,
- SM_CYFOCUSBORDER, SM_TABLETPC, SM_MEDIACENTER): Add defines.
- (SM_CMETRICS): Adjust value.
- * include/winnt.h (PROCESSOR_ARCHITECTURE_MSIL): Correct define.
- (PROCESSOR_ARCHITECTURE_AMD64, PROCESSOR_ARCHITECTURE_IA32_ON_WIN64):
- Add defines.
- Thanks to Benoit Blanchon <bblanchon@users.sourceforge.net>
-
-2004-04-24 Justin Forest <vhex@users.sourceforge.net>
-
- * include/winsock2.h (LUP_DEEP, LUP_CONTAINERS,
- LUP_NOCONTAINERS, LUP_NEAREST, LUP_RETURN_NAME,
- LUP_RETURN_TYPE, LUP_RETURN_VERSION, LUP_RETURN_COMMENT,
- LUP_RETURN_ADDR, LUP_RETURN_BLOB, LUP_RETURN_ALIASES,
- LUP_RETURN_QUERY_STRING, LUP_RETURN_ALL, LUP_RES_SERVICE,
- LUP_FLUSHCACHE, LUP_FLUSHPREVIOUS): Add defines.
-
-2004-04-24 Luke Dunstan <infidel@users.sourceforge.net>
-
- * include/windns.h (DNSREC_QUESTION, DNSREC_ANSWER, DNSREC_AUTHORITY,
- DNSREC_ADDITIONAL): Add defines.
-
-2004-04-23 Robert Wruck <wruck@tweerlei.de>
-
- * include/commctrl.h (LPNMLVDISPINFO): Add defines.
-
-2004-04-23 Robert Wruck <wruck@tweerlei.de>
-
- * include/aclui.h: New file.
- * lib/aclui.def: New file.
- * lib/test.c: Add aclui.h to includes.
-
-2004-04-21 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winuser.h (SPI_GETACTIVEWINDOWTRACKING,
- SPI_GETACTIVEWNDTRKZORDER, SPI_SETACTIVEWINDOWTRACKING,
- SPI_SETACTIVEWNDTRKZORDER): Remove duplicate defines.
-
-2004-04-20 Christopher Faylor <cgf@alum.bu.edu>
-
- * include/wingdi.h: Protect non-unicode case of below.
-
-2004-04-20 Christopher Faylor <cgf@alum.bu.edu>
-
- * include/wingdi.h: Protect use of ENUMLOGFONTEXDV, PENUMLOGFONTEXDV,
- LPENUMLOGFONTEXDV with appropriate version check.
-
-2004-04-18 Hans Leidekker <hans@it.vu.nl>
-
- * lib/directx/dxguid.c (CLSID_DirectSoundPrivate,
- DSPROPSETID_DirectSoundDevice): Add defines.
-
-2004-04-20 Adrian Sandor <aditsu@users.sourceforge.net>
-
- * include/msacm.h: New file.
-
-2004-01-09 Stuart Cunningham <stuart_hc@users.sourceforge.net>
-
- * include/objbase.h (STGFMT): Declare enum.
- (STGOPTIONS): Declare structure.
- (StgCreateStorageEx, StgOpenStorageEx): Declare.
- (STGOPTIONS_VERSION): Define.
- * lib/ole32.def (StgCreateStorageEx, StgOpenStorageEx): Add stubs.
-
-2004-04-13 Filip Navara <xnavara@volny.cz>
-
- * include/winuser.h (IS_INTRESOURCE, MB_CANCELTRYCONTINUE,
- WM_NCXBUTTONDOWN, WM_NCXBUTTONUP, WM_NCXBUTTONDBLCLK,
- WM_XBUTTONDOWN, WM_XBUTTONUP, WM_XBUTTONDBLCLK,
- DCX_INTERSECTUPDATE, MK_XBUTTON1, MK_XBUTTON2,
- HELP_SETWINPOS): Define.
- (WM_MOUSELAST): Different value for _WIN32_WINNT >= 0x0500.
- (SPI_*): Add new definitions for WINVER >= 0x500.
- (CallMsgFilter[AW], SetWindowsHookA): Correct prototype.
- (InternalGetWindowText, SetWindowsHookW): Declare.
- * include/winbase.h (InitializeSListHead): Avoid conflicting
- definition with DDK headers.
-
-2004-04-13 Gé van Geldorp <gvg@reactos.com>
-
- * include/winuser.h (GetLastError): Move from here...
- * include/winbase.h: ... to here.
-
-2004-04-13 Filip Navara <xnavara@volny.cz>
-
- * include/winspool.h (DocumentPropertiesW): Correct prototype.
-
-2004-04-13 Filip Navara <xnavara@volny.cz>
-
- * include/wingdi.h (ENHMETAHEADER): Add definitions for
- WINVER >= 0x400.
- (WCRANGE, GLYPHSET, LPPOLYTEXT[AW]): Declare.
- (ENUMLOGFONTEXW): Fix definition.
- (ENUMLOGFONTEXDV[AW]): Declare.
-
-2004-04-13 Filip Navara <xnavara@volny.cz>
-
- * include/wingdi.h: Declare the DirectDraw structures only if
- the DirectDraw kernel mode headers aren't included.
- (EMFINFO): Declare.
- (EngStretchBlt, EngTextOut, FONTOBJ_cGetGlyphs,
- STROBJ_bEnumPositionsOnly): Correct prototypes.
-
-2004-04-13 Filip Navara <xnavara@volny.cz>
-
- * include/objidl.h (PRPCOLEMESSAGE): Declare.
- * include/rpc.h (RPCRTAPI): Define.
- * include/rpcdce.h (RpcServerRegisterIf2): Declare.
- * include/rpcdcep.h (RPC_BLOCKING_FN, I_RpcSend): Declare.
- (RPC_BLOCKING_FUNCTION): Remove, replaced by RPC_BLOCKING_FN.
- (I_RpcBindingSetAsync): Correct prototype.
- * include/rpcndr.h (MIDL_STUB_MESSAGE): Rename 'Reserved' field
- to w2kReserved.
- (USER_MARSHAL_SIZING_ROUTINE, USER_MARSHAL_MARSHALLING_ROUTINE,
- USER_MARSHAL_UNMARSHALLING_ROUTINE, USER_MARSHAL_FREEING_ROUTINE,
- USER_MARSHAL_ROUTINE_QUADRUPLE, NDR_NOTIFY_ROUTINE, IDL_CS_CONVERT,
- CS_TYPE_NET_SIZE_ROUTINE, CS_TYPE_LOCAL_SIZE_ROUTINE,
- CS_TYPE_TO_NETCS_ROUTINE, CS_TYPE_FROM_NETCS_ROUTINE,
- CS_TAG_GETTING_ROUTINE, NDR_CS_SIZE_CONVERT_ROUTINES,
- NDR_CS_ROUTINES, NdrUserMarshalMarshall, NdrUserMarshalUnmarshall,
- NdrUserMarshalBufferSize, NdrUserMarshalMemorySize,
- NdrUserMarshalFree): Declare.
- (MIDL_STUB_DESC): Add new fields that were added in W2K.
- * include/rpcproxy.h (CStdStubBuffer): Ditto.
-
-2004-04-13 Filip Navara <xnavara@volny.cz>, David Welch <welch@cwcom.net>
-
- * include/ddk/ntapi.h (NtCurrentProcess, NtCurrentThread,
- LPC_MESSAGE_BASE_SIZE): Define.
- * include/ddk/ntifs.h: Move the pack pragma under header inclusion.
-
-2004-04-13 Filip Navara <xnavara@volny.cz>
-
- * include/commctrl.h (TB_MARKBUTTON, NMTBGETINFOTIP[AW]):
- Declare.
-
-2004-04-18 Allan Bazinet <bazineta@users.sourceforge.net>
-
- * include/winuser.h (MONITORINFOEX[AW]): Change to be derived from
- MONITORINFO when compiling as C++.
-
-2004-04-17 Luke Dunstan <infidel@users.sourceforge.net>
-
- * README.w32api: List separate copyright conditions for some headers.
- * include/(winsock2.h, wsipx.h): Minor change to copyright header.
-
-2004-04-15 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wingdi.h (RGB): Correct macro.
-
-2004-04-14 Robert Wruck <rwruck@users.sourceforge.net>
-
- * include/ddk/winddk.h (RtlEqualLuid): Correct macro.
-
-2004-04-06 Luke Dunstan <infidel@users.sourceforge.net>
-
- * include/ocidl.h (QACONTAINERFLAGS): Correct typedef.
-
-2004-03-29 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/Makefile.in: Add directx to .PHONY target.
- * lib/directx/dxerr.c: Remove dependence on mingw runtime.
- Don't include stdio.h or tchar.h.
- Replace _T() macro with TEXT() macro, throughout.
- Replace _stprintf with wsprintf, throughout.
-
-2004-03-27 Hosaka Yuji <hos@tamanegi.org>
-
- * include/dbt.h (DBT_DEVTYP_DEVICEINTERFACE, DBT_DEVTYP_HANDLE):
- Add define.
- (DEV_BROADCAST_DEVICEINTERFACE, DEV_BROADCAST_HANDLE): Add struct.
- * include/winuser.h (UnregisterDeviceNotification): Add prototype.
- * lib/user32.def (UnregisterDeviceNotification): Add export stub.
-
-2004-03-27 Filip Navara <xnavara@volny.cz>
-
- * include/directx: New subdir.
- * lib/directx: Ditto.
- * include/directx/(d3d9.h, d3d9caps.h, d3d9types.h, dxerr8.h,
- dxerr9.h): New files.
- * lib/directx/(Makefile.in, d3d8.def, d3d9.def, d3dim.def, d3drm.def,
- d3dx8d.def, d3dx9d.def, d3dxof.def, ddraw.def, dinput.def,
- dinput_joy.c, dinput_joy2.c, dinput_kbd.c, dinput_mouse.c,
- dinput_mouse2.c, dinput_private.h, dinput8.def, dmoguids.c, dplayx.def,
- dpnaddr.def, dpnet.def, dpnlobby.def, dpvoice.def, dsetup.def,
- dsound.def, dxerr.c, dxerr8.c, dxerr8w.c, dxerr9.c, dxerr9w.c,
- dxguid.c, ksproxy.def, ksuser.c, ksuser.def, msdmo.def, quartz.def,
- strmiids.c, test.c): Ditto.
- * lib/(d3dim.def, d3drm.def, d3dxof.def, ddraw.def, dinput.c,
- dinput.def, dplayx.def, dsetup.def, dsound.def, dxguid.c): Removed.
-
-2004-03-25 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/GL/glu.h (GLU_AUTO_LOAD_MATRIX, GLU_CULLING,
- GLU_SAMPLING_TOLERANCE, GLU_DISPLAY_MODE, GLU_PARAMETRIC_TOLERANCE,
- GLU_SAMPLING_METHOD, GLU_U_STEP, GLU_V_STEP): Define.
-
-2004-03-24 Filip Navara <xnavara@volny.cz>
-
- * include/commctrl.h (TB_GETSTRING[AW]): Add defines.
- (RBBS_HIDETITLE, RBBS_TOPALIGN): Ditto.
-
-2004-03-24 Filip Navara <xnavara@volny.cz>
-
- * include/ddk/srb.h (_PORT_CONFIGURATION_INFORMATION): Rename
- TaggedQueueing to TaggedQueuing.
- (_HW_INITIALIZATION_DATA): Likewise.
-
-2004-03-16 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/docobj.h (IOleDocumentView::GetDocument): Correct
- prototype.
- Thanks to Buster Copley <consequent@users.sourceforge.net>
-
-2004-03-16 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/ddk/ntoskrnl.def (MmAllocatePagesForMdl): Correct suffix.
- (MmMapIoSpace): Likewise.
- Thanks to Dan Aloni <da-x@colinux.org>
-
-2004-03-16 Martin Fuchs <martin-fuchs@gmx.net>
-
- * include/shellapi.h (NIM_* NIS_*): Define constants for
- notification icons with _WIN32_IE >= 0x0500.
- (NOTIFYICONDATA): Add new structure members for notification
- icons with _WIN32_IE >= 0x0500.
-
-2004-03-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- *include/wininet.h (CACHEGROUP_SEARCH_ALL, CACHEGROUP_SEARCH_BYURL):
- Add defines.
- (INTERNET_CACHE_GROUP_ADD, INTERNET_CACHE_GROUP_REMOVE): Add defines.
- (GROUPID) Add typedef.
- (INTERNET_CACHE_GROUP_INFO[AW]): Define structures.
- (CreateUrlCacheGroup): Add prototype.
- (DeleteUrlCacheGroup): Add prototype.
- (FindFirstUrlCacheGroup): Add prototype.
- (FindNextUrlCacheGroup): Add prototype.
- (GetUrlCacheGroupAttribute[AW]): Add prototypes.
- (SetUrlCacheGroupAttribute[AW]): Add prototypes.
-
-2004-03-10 Al Slater <al.slater@scluk.com>
-
- * include/winsock2.h: Add missing LPFN_ typdefs for
- function pointers.
- Clean up whitespace.
-
-2004-03-05 Filip Navara <xnavara@volny.cz>
-
- * include/ddk/scsi.h: Replace assert with ASSERT.
- * include/ddk/video.h: Ditto.
- * include/ddk/winddk.h: Ditto. Remove the assert macro.
- * include/ddk/tdi.h: Correct packing.
-
-2004-03-04 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wtypes.h (DECIMAL_SETZERO): Add definition for
- NONAMELESSUNION case.
-
-2004-03-03 Martin Fuchs <martin-fuchs@gmx.net>
-
- * include/oleauto.h (V_UNION, V_VT, V_DECIMAL): Use
- __VARIANT_NAME_ constants.
-
-2004-03-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/uxtheme.h: Include <commctrl.h>
-
-2004-03-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/basetyps.h (GUID_SECT): Define to nothing for GCC >= 2.95.
-
-2004-03-02 Martin Fuchs <martin-fuchs@gmx.net>
-
- * include/oleauto.h (VAR_VALIDDATE, VAR_FORMAT_NOSUBSTITUTE,
- VAR_FOURDIGITYEARS): Define new constants. Group VAR_* defines
- together.
- (V_UI2, V_UI4, V_UI4REF, V_UI, V_UI8REF): Define macros.
- (V_I8, V_I8REF): Correct macros.
- (V_DECIMAL): Correct macro definitions.
- (V_INT_PTR, V_UINT_PTR, V_INT_PTRREF, V_UINT_PTRREF): Define
- constants.
- (VTBIT_*): Define constants.
- (UDATE): Add structure definition.
- (VarDateFromUdate, VarDateFromUdateEx, VarUdateFromDate): Declare
- functions.
- (SafeArrayCreateVector): Correct parameter type from UINT to ULONG
- (SafeArrayCreateVectorEx): Declare function.
- (Var*): declare VARIANT manipulation functions.
- * include/ocidl.h (IPicture_*): Define IPicture COBJ macros.
- * include/oaidl.h (IRecordInfo_*): Define IRecordInfo COBJ
- macros.
-
-2004-03-01 Martin Fuchs <martin-fuchs@gmx.net>
-
- * include/oaidl.h (FADF_*): Define missing constants.
- (IDispatch_*): Define COBJ macros.
- (VARIANT): Add missing union members llVal and ullVal.
- (wireVARIANT): Likewise.
- (ITypeinfo_*): Define COBJ macros.
- * include/oleauto.h (Var*FromDisp): Correct parameter type from
- LPDISPATCH* to LPDISPATCH.
- (VARCMP_*, VAR_LOCALBOOL, LOCALE_USE_NLS, VARIANT_*,
- VAR_CALENDAR_*): Add missing constants.
- (SafeArray[Get/Set]*): Add prototypes.
- (Var*From*): Add missing prototypes.
- (NUMPRS_*): Add defines.
- (NUMPARSE): Define structure.
- (VarParseNumFromStr,VarNumFromParseNum): Add prototypes.
- * include/winerror.h (DISP_E_DIVBYZERO): Define constant.
- * include/winuser.h (COLOR_*): Define missing constants.
- * include/wtypes.h (enum VARENUM): Add VT_INT_PTR, VT_UINT_PTR.
- (VT_INT_PTR, VT_UINT_PTR): Remove macro definitions.
-
-2004-02-23 Filip Navara <xnavara@volny.cz>
-
- * include/ddk/video.h: Corrected packing.
-
-2004-02-19 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/GL/glu.h (GLU_ERROR): Define.
- Thanks to Philip Lamb <phil at rave dot co dot nz>
-
-2004-02-19 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/GL/glu.h: Include <stddef.h>.
- Thanks to Greg Couch <gregcouch@users.sourceforge.net>
-
-2004-02-15 Earnie Boyd <earnie@users.sf.net>
-
- * include/w32api.h: Increment version to 3.0.
- * Makefile.in: Ditto.
- * README.win32api: Modify license to Public Domain per agreement as
- found in the mingw-dvlpr list archive.
-
-2004-02-13 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/ddk/winddk.h (DIRECTORY_QUERY): Add define.
- (DIRECTORY_TRAVERSE): Ditto.
- (DIRECTORY_CREATE_OBJECT): Ditto.
- (DIRECTORY_CREATE_SUBDIRECTORY): Ditto.
- (DIRECTORY_ALL_ACCESS): Ditto.
- Thanks to Konstantin Stepaniuk <skostia@users.sourceforge.net>
-
-2004-02-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/basetypes.h (_REFIID_DEFINED): Correct typo.
-
- * include/winuser.h (NCCALCSIZE_PARAMS): Define structure.
- Thanks to Mike Nordell <tamlin at algonet dot se>.
-
-2004-02-11 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/dnsapi.def: New file.
- * lib/test.c: Include windns.h.
-
-2004-02-11 Pierre A. Humblet <Pierre.Humblet@ieee.org>
-
- * include/windns.h: New file.
-
-2004-02-11 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/sqlucode.h (SQLGetStmtAttr[AW]): Remove duplicate
- defines.
- (SQLSetStmtAttr[AW]): Move into ODBCVER >= 0x0300 block.
- (SQLSetDescFieldW): Correct prototype.
- (SQLSetDescFieldA): Add prototype.
- (SQLGetDescFieldW): Add prototype.
-
-2004-02-11 Pat Thoyts <patthoyts@users.sourceforge.net>
-
- * include/winuser.h (DFC_POPUPMENU): Add define.
-
-2004-02-07 Dan Aloni <da-x@gmx.net>
-
- * lib/ddk/ntoskrnl.def (KeSetTimer,KeSetTimerEx): Correct
- suffix.
-
-2004-02-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/oleacc.h (LIBID_Accessibility): Declare.
- * lib/uuid.c (LIBID_Accessibility): Define.
-
-2004-02-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winioctl.h (NTFS_VOLUME_DATA_BUFFER): Add structure.
- (FSCTL_GET_NTFS_VOLUME_DATA): Add macro.
-
-2004-02-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commctrl.h (ICC_STANDARD_CLASSES, ICC_LINK_CLASS): Add
- defines.
-
-2004-01-31 Jiri Malak <Jiri.Malak@geac.cz>
-
- * include/winuser.h (RT_MANIFEST): Make conditional on
- RC_INVOKED.
- (CREATEPROCESS_MANIFEST_RESOURCE_ID,
- ISOLATIONAWARE_MANIFEST_RESOURCE_ID,
- ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID): Add
- defines.
-
-2004-01-16 Martin Fuchs <martin-fuchs@gmx.net>
-
- * include/shlobj.h (SHGDN_INCLUDE_NONFILESYS): Add define.
-
-2004-01-15 Filip Navara <xnavara@volny.cz>
-
- * include/ddk/mcd.h: Don't care about value of DBG define.
- * include/ddk/srb.h: Ditto.
- * include/ddk/storport.h: Ditto.
- * include/ddk/video.h: Ditto.
- * include/nspapi.h (SetServiceW, GetAddressByNameA,
- GetAddressByNameW): Correct protoype.
- * include/ntsecapi.h (PCUNICODE_STRING): Define.
-
-2004-01-05 Filip Navara <xnavara@volny.cz>
-
- * include/prsht.h (LPCPROPSHEETPAGEW): Fix definition.
- * include/shlwapi.h (SHRegQueryInfoUSKey[AW]): Fix prototype.
- * include/cpl.h (CPL_STARTWPARMS[AW]): Correct.
- * include/shellapi.h (ABS_AUTOHIDE, ABS_ALWAYSONTOP,
- SEE_MASK_NO_CONSOLE, SEE_MASK_ASYNCOK, SEE_MASK_HMONITOR,
- FOF_NOCOPYSECURITYATTRIBS): Add defines.
- * include/shlobj.h (BFFM_SETOKTEXT, BFFM_SETEXPANDED,
- CSIDL_FLAG_DONT_VERIFY, CSIDL_FLAG_CREATE, CSIDL_FLAG_MASK,
- CFSTR_INETURL[AW], SHGDN_FOREDITING, SHGDN_FORADDRESSBAR,
- SSF_*): Add defines.
- (SHCNF_PATH[AW], SHCNF_PRINTER[AW], CFSTR_FILENAME[AW],
- CFSTR_FILENAMEMAP[AW], CFSTR_FILEDESCRIPTOR[AW], CFSTR_SHELLURL,
- CMDSTR_NEWFOLDER[AW], CMDSTR_VIEWLIST[AW], CMDSTR_VIEWDETAILS[AW]):
- Correct.
- (IEnumIDList): Add COBJMACROS.
- * include/winuser.h (MIM_*): Add define.
-
-2004-01-04 Filip Navara <xnavara@volny.cz>
-
- * include/shlguid.h (IID_IPersistFolder2, IID_IPersistFolder3,
- IID_IShellFolder2, IID_IFileSystemBindData): Add declarations.
- * include/shlobj.h (EXTRASEARCH, SHCOLSTATEF, SHELLDETAILS,
- PERSIST_FOLDER_TARGET_INFO): Define structures.
- (IEnumExtraSearch, IShellFolder2, IFileSystemBindData,
- IPersistFolder2, IPersistFolder3): Add COM interface
- definitions.
- (IExtractIcon[AW], IShellLink[AW], IPersistFolder, IShellView,
- ICommDlgBrowser, IShellFolder2, IPersistFolder2, IPersistFolder3):
- Add COBJMACROS.
- (SHCreateDirectoryEx[AW], SHBindToParent): Add prototypes.
- * lib/shell32.c (IID_IPersistFolder2, IID_IPersistFolder3,
- IID_IShellFolder2, IID_IFileSystemBindData): Add definitions.
-
-2004-01-03 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/mshtml.h (IHTMLDocument2): Correct write, writeln
- declarations.
- Thanks to: Rene Nyffenegger <renenyffenegger@users.sf.net>.
-
-2004-01-03 Filip Navara <xnavara@volny.cz>
-
- * include/cguid.h (CLSID_StdGlobalInterfaceTable): Declare IID.
- * include/oaidl.h (ITypeLib2, ITypeInfo2): Define interfaces,
- declare IID's.
- (IErrorInfo): Add COBJMACROS.
- * include/objbase.h (STGM_NOSNAPSHOT): Add define.
- (CoGetPSClsid): Add protototype,
- (CoRegisterPSClsid): Likewise.
- * include/objidl.h (IMarshal): Correct methods.
- (IMallocSpy): Likewise,
- (LPPSFACTORYBUFFER): Add typedef.
- (IGlobalInterfaceTable): Define interface and COBJMACROS. Declare
- IID.
- (IStorage_CreateStorage, IRpcStubBuffer_Invoke): Fix macros.
- * include/ocidl.h (PROPBAG2_TYPE): Define enum.
- (PROPBAG2, QACONTAINERFLAGS, QACONTAINER, QACONTROL): Define
- structures.
- (IPropertyBag2, IPersistPropertyBag2,IAdviseSinkEx, IPointerInactive,
- IOleUndoUnit, IOleParentUndoUnit, IEnumOleUndoUnits, IOleUndoManager,
- IQuickActivate): Define interfaces. Declare IID's.
- (IPersistPropertyBag2): Add COBJMACROS.
- (LPOLEUNDOMANAGER): Add typedef.
- (LPPROPERTYBAG2): Likewise.
- * include/oleidl.h (LPPARSEDISPLAYNAME): Fix definiton.
- (BINDSPEED): Add definition.
- (IParseDisplayName, IOleItemContainer, IOleObject, IDropSource,
- IDropTarget): Add COBJMACROS.
- * include/wtypes.h (MEMCTX, MSHCTX): Fix enum.
- * include/winerror.h (CO_S_NOTALLINTERFACES): Add define.
- * lib/uuid.c (IID_IGlobalInterfaceTable, IID_IOleUndoManager,
- IID_IPersistPropertyBag2, IID_IPropertyBag2, IID_IRpcProxyBuffer):
- Add IID definitions.
-
-2004-01-02 Filip Navara <xnavara@volny.cz>
-
- * include/ddk/winddk.h: Don't care about value of
- DBG define.
-
-2004-01-02 Danny Smith <dannysmith@users.sourceforge.net>
- Filip Navara <xnavara@volny.cz>
-
- * include/ddk/winddk.h (_DDK_DUMMYUNION_MEMBER,
- _DDK_DUMMYUNION_N_MEMBER): New macros.
- (ExAllocateFromPagedLookasideList,ExFreeToPagedLookasideList,
- ExAllocateFromNPagedLookasideList, ExFreeToNPagedLookasideList):
- Use them.
-
-2004-01-01 Filip Navara <xnavara@volny.cz>
-
- * include/objbase.h: Don't care about value of DBG define.
- * include/objidl.h: Add some COBJMACROS.
- * include/ocidl.h: Ditto.
- * include/oleidl.h: Ditto.
- * include/servprov.h: Ditto.
- * include/shlobj.h: Ditto.
- * include/shlobj.h (IContextMenu2): Correct parent in
- DECLARE_INTERFACE.
- * include/oleidl.h (IOleCache, IOleCache2, IOleCacheControl):
- Define interfaces.
- * include/setupapi.h (SetupGetLineTextA): Correct prototype.
- Add new constants for _SETUPAPI_VER >= 0x501.
-
-2004-01-01 Filip Navara <xnavara@volny.cz>
-
- * include/winnt.h (NtCurrentTeb): Add inline definition.
-
-2004-01-01 Martin Fuchs <martin-fuchs@gmx.net>
-
- * include/shlobj.h (SHCoCreateInstance): Add prototype.
- * lib/shell32.def (SHCoCreateInstance): Add export stub.
-
-2004-01-01 Igor Pechtchanski <pechtcha@cs.nyu.edu>
-
- * lib/setupapi.def (CM_Request_Device_Eject[AW]): Add export.
- (CM_Request_Device_Eject_Ex[AW]): Likwise.
- * include/ddk/cfg.h (DN_*): Add defines.
-
-2004-01-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/ddk/cfgmgr32.def: Remove duplicate symbol names.
-
-2004-01-01 Mattia Barbon <mbarbon@users.sourceforge.net>
-
- * include/commctrl.h (TVN_GETINFOTIP): Add UNICODE mappings.
- (NMTVGETINFOTIP): Add structure.
-
-2003-12-08 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winuser.h (DISPLAY_DEVICE_*): Remove defines.
- * include/wingdi.h (DISPLAY_DEVICE_REMOVABLE,
- DISPLAY_DEVICE_MODESPRUNED): Add defines.
-
-2003-12-08 Hartmut Honisch <hhonisch@users.sourceforge.net>
-
- * include/commctrl.h (ListView_Get_State, ListView_Check_State):
- Add macros.
- * include/wingdi.h (DISPLAY_DEVICE_*): Add multi-monitor
- constants.
- * include/shlobj.h (SHCOLUMNINIT): Add structure.
- (SHCOLUMNDAT): Likwise.
- (SHCOLUMNID): Likewise.
- (SHCOLUMNINFO): Likewise.
- (SHCOLSTATE): Add enum.
- (IColumnProvider): Add COM interface.
- (IQueryInfo): Likewise.
- (IShellIconOverlayIdentifier): Likewise.
- * include/shlguid.h (IID_IColumnProvider) Declare.
- (IID_IQueryInfo): Likweise.
- (IID_IShellIconOverlayIdentifier): Likwise.
- * lib/shell32.c (IID_IColumnProvider) Define.
- (IID_IQueryInfo): Likweise.
- (IID_IShellIconOverlayIdentifier): Likwise.
-
-2003-12-08 Roald Ribe <rrib@users.sourceforge.net>
-
- * include/winuser.h (RT_MANIFEST): Add define.
-
-2003-12-08 Pascal Buhler <pbuhler@users.sourceforge.net>
-
- * include/oleidl.h (IViewObject2): Inherit from IViewObject.
-
-2003-12-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (GetCurrentFiber): Remove duplicate prototype.
- (GetFiberData): Likewise.
- (GetCurrentFiber): Change volatile to __volatile__.
- (GetFiberData): Likewise.
-
-2003-11-27 Christopher Faylor <cgf@redhat.com>
-
- * lib/Makefile.in: Use make function to locate .mri file to allow
- building in directory other than source directory.
-
-2003-11-27 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/vfw32.def: Remove, replacing with ...
- * lib/msvfw32.def: New file.
- * lib/avicap32.def: New file.
- * lib/avifil32.def: New file.
- * lib/vfw32.mri: New file.
- * Makefile.in: (MRI_FILES, MIMPLIBS): New vars for
- import libs with multiple dll's.
- (LIBS): Add MIMPLIBS.
- (DISTFILES): Add MRI_FILES.
- (libvfw32.a): Build using mri script.
-
-2003-11-23 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (PAGE_*): Group defines together. Change
- constants to hex notation.
-
-2003-11-15 Manu B <manubee@users.sourceforge.net>
-
- * include/commctrl.h (TabCtrl_GetImageList): Add macro.
-
-2003-11-13 Martin Fuchs <martin-fuchs@gmx.net>
-
- * include/shlobj.h (ILAppendID, ILClone, ILCloneFirst, ILCombine,
- ILFindChild, ILFindLastID, ILFree, ILGetNext, ILGetSize, ILIsEqual,
- ILIsParent, ILLoadFromStream, ILRemoveLastID, ILSaveToStream):
- Add prototypes.
- * lib/shell32.def: Add stubs.
-
- * include/commctrl.h (ListView_FindItem): Add type cast to avoid
- compiler warnings.
-
-2003-11-13 Hans Leidekker <hans@it.vu.nl>
-
- * include/winbase.h (WIN32_STREAM_ID): Correct typedef.
-
-2003-10-13 Andre Auzi <aauzi@users.sourceforge.net>
-
- * include/windows.h (CopyCursor): Define as macro.
-
-2003-10-13 Steven Edwards <Steven_Ed4153@yahoo.com>
-
- * include/winnt.h (CONTAINING_RECORD): Add macro.
-
-2003-10-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h: (FILE_SUPERSEDED, FILE_OPENED, FILE_CREATED,
- FILE_OVERWRITTEN, FILE_EXISTS, FILE_DOES_NOT_EXIST): Remove
- defines.
-
-2003-10-13 Filip Navara <xnavara@volny.cz>
-
- * include/commctrl.h (DSA_*): Add prototypes, typedefs and
- defines for Dynamic Storage Arrays.
- (DPA_*): Likewise, for Dynamic Pointer Arrays.
- (FlatSB_*, InitializeFlatSB, InitializeFlatSB): Add prototypes
- and defines for Flat ScrollBars.
- (SetWindowSubclass, GetWindowSubclass, RemoveWindowSubclass,
- DefSubclassProc): Add prototypes for subclassing.
- (DrawShadowText): Add prototype.
- (COMCTL32_VERSION): Define.
-
-2003-10-13 Martin Fuchs <Martin-Fuchs@gmx.net>
-
- * include/shlobj.h (CFSTR_FILENAME, CFSTR_FILEDESCRIPTOR,
- CFSTR_FILENAMEMAP, CFSTR_SHELLURL): Correct UNICODE definitions.
-
-2003-10-13 Pierre Humblet <pierre.humblet@ieee.org>
-
- * include/winnt.h (SM_REMOTESESSION): Add define.
- * include/winuser.h (SE_CREATE_GLOBAL_NAME): Ditto.
-
-2003-10-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wincrypt (KP_IV, KP_SALT, KP_PADDING, KP_MODE,
- KP_MODE_BITS, KP_PERMISSIONS, KP_ALGID, KP_BLOCKLEN): Remove
- duplicate definitions.
- (KP_X, KP_Y): Correct typos.
-
-2003-10-11 Manu B <manubee@users.sourceforge.net>
-
- * include/afxres.h: New file.
-
- * include/richedit.h (ES_NOOLEDRAGDROP, ENM_DRAGDROPDONE,
- ENM_IMECHANGE, ENM_LANGCHANGE, ENM_OBJECTPOSITIONS,
- ENM_SCROLLEVENTS): Add constants.
-
- * include/richedit.h (ES_SELECTIONBAR, ENM_LINK): Sort constants.
-
-2003-10-09 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/errorep.h: New file.
-
- * lib/faultrep.def: New file.
-
-2003-10-09 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winbase.h (AddVectoredExceptionHandler): Define if
- _WIN32_WINNT >= 0x0500.
-
- * include/winnt.h (PVECTORED_EXCEPTION_HANDLER): Define if
- _WIN32_WINNT >= 0x0500.
-
-2003-10-08 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winbase.h (AddVectoredExceptionHandler): Only define if
- _WIN32_WINNT >= 0x0501.
-
-2003-10-07 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winbase.h [_WIN32_WINNT >= 0x0500] (SetComputerNameEx[AW],
- UnregisterWaitEx): Add functions.
-
- * include/winbase.h [_WIN32_WINNT >= 0x0500]
- (AddVectoredExceptionHandler, RemoveVectoredExceptionHandler): Add
- or guard function. The MSDN says it is available on Windows XP and
- better, and then it says it is declared for _WIN32_WINNT >= 0x0500.
- Huh?
-
- * include/winbase.h [_WIN32_WINNT >= 0x0501] (AddRefActCtx,
- CreateActCtx[AW], SetFileShortName[AW], SetFileValidData,
- ZombifyActCtx, QueryActCtxW): Add functions.
-
- * include/winbase.h [_WIN32_WINNT >= 0x0501]
- (QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX,
- QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE,
- QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS): Add constants.
-
- * include/winbase.h [_WIN32_WINNT >= 0x0502] (SetDllDirectory[AW],
- SetFirmwareEnvironmentVariable[AW]): Add functions.
-
- * include/winnt.h [_WIN32_WINNT >= 0x0500] (VER_BUILDNUMBER,
- VER_MAJORVERSION, VER_MINORVERSION, VER_PLATFORMID,
- VER_SERVICEPACKMAJOR, VER_SERVICEPACKMINOR, VER_SUITENAME,
- VER_PRODUCT_TYPE, VER_EQUAL, VER_GREATER, VER_GREATER_EQUAL,
- VER_LESS, VER_LESS_EQUAL, VER_AND, VER_OR): Add constants.
-
- * include/winnt.h [_WIN32_WINNT >= 0x0501]
- (PVECTORED_EXCEPTION_HANDLER): Add callback.
-
- * include/winnt.h [_WIN32_WINNT >= 0x0501]
- (ACTIVATION_CONTEXT_INFO_CLASS,
- ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION,
- ACTIVATION_CONTEXT_DETAILED_INFORMATION,
- ACTIVATION_CONTEXT_QUERY_INDEX, ASSEMBLY_FILE_DETAILED_INFORMATION):
- Add structures.
-
- * lib/user32.def (AddRefActCtx, AddVectoredExceptionHandler,
- CreateActCtx[AW], SetComputerNameEx[AW], SetDllDirectory[AW],
- SetFileShortName[AW], SetFileValidData,
- SetFirmwareEnvironmentVariable[AW], UnregisterWaitEx,
- VerSetConditionMask, ZombifyActCtx, QueryActCtxW): Add functions.
-
-2003-10-07 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winbase.h (GetWriteWatch, IsSystemResumeAutomatic,
- ResetWriteWatch): Add function.
-
- * include/winbase.h [_WIN32_WINNT >= 0x0500]
- (GetSystemWindowsDirectory[AW], ProcessIdToSessionId, ReplaceFile[AW]):
- Add functions.
-
- * include/winbase.h [_WIN32_WINNT >= 0x0501]
- (GetSystemWow64Directory[AW], HeapQueryInformation,
- HeapSetInformation, InitializeSListHead, InterlockedFlushSList,
- InterlockedPopEntrySList, InterlockedPushEntrySList, IsProcessInJob,
- IsWow64Process, QueryMemoryResourceNotification, ReleaseActCtx,
- RemoveVectoredExceptionHandler): Add functions.
-
- * include/winnt.h [_WIN32_WINNT >= 0x0501] (HEAP_INFORMATION_CLASS):
- Add enumeration.
-
- * include/winbase.h [_WIN32_WINNT >= 0x0502] (GetThreadIOPendingFlag):
- Add function.
-
- * include/winbase.h [_WIN32_WINNT >= 0x0510] (RestoreLastError):
- Add function. The MSDN Magazine of June 2003 reads:
- RestoreLastError is an enigma. It's code is identical to
- SetLastError. It's unclear to me why it was made into a
- separate API.
-
- * lib/user32.def (GetSystemWindowsDirectory[AW],
- GetSystemWow64Directory[AW], GetThreadIOPendingFlag,
- HeapQueryInformation, HeapSetInformation, InitializeSListHead,
- InterlockedFlushSList, InterlockedPopEntrySList,
- InterlockedPushEntrySList, IsSystemResumeAutomatic, IsWow64Process,
- ProcessIdToSessionId, QueryMemoryResourceNotification, ReleaseActCtx,
- RemoveVectoredExceptionHandler, ReplaceFile[AW], ResetWriteWatch,
- RestoreLastError): Add functions.
-
-2003-10-07 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winbase.h [_WIN32_WINNT >= 0x0500] (GetComputerNameEx[AW],
- GetProcessIoCounters): Add functions.
-
- * include/winbase.h [_WIN32_WINNT >= 0x0500] (COMPUTER_NAME_FORMAT):
- Move around, needed by GetComputerNameEx.
-
- * include/winbase.h [_WIN32_WINNT >= 0x0501] (FindActCtxSectionGuid,
- FindActCtxSectionString[AW], GetCurrentActCtx, GetNativeSystemInfo):
- Add functions.
-
- * include/winbase.h [_WIN32_WINNT >= 0x0501]
- (ACTCTX_SECTION_KEYED_DATA): Add structure.
-
- * include/winbase.h [_WIN32_WINNT >= 0x0502] (GetDllDirectory[AW],
- GetFirmwareEnvironmentVariable[AW], GetProcessHandleCount,
- GetProcessId, GetSystemRegistryQuota): Add functions, available on
- Windows XP SP1 and better.
-
- * include/winnt.h [_WIN32_WINNT >= 0x0501]
- (ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION,
- ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION,
- ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION,
- ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION,
- ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION,
- ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION,
- ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION,
- ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES): Add constants.
-
- * lib/user32.def (FindActCtxSectionGuid, FindActCtxSectionString[AW],
- GetComputerNameEx[AW], GetCurrentActCtx, GetDllDirectory[AW],
- GetFirmwareEnvironmentVariable[AW], GetModuleHandleEx[AW],
- GetNativeSystemInfo, GetProcessHandleCount, GetProcessIoCounters):
- Add functions.
-
-2003-10-07 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winbase.h [_WIN32_WINNT >= 0x0501]
- (CheckRemoteDebuggerPresent, DebugActiveProcessStop, DebugBreakProcess,
- DebugSetProcessKillOnExit): Add functions.
-
- * include/winbase.h [_WIN32_WINNT >= 0x0500] (DeleteTimerQueue,
- DeleteTimerQueueEx, DeleteTimerQueueTimer,
- DnsHostnameToComputerName[AW]): Add functions.
-
- * lib/user32.def (CheckRemoteDebuggerPresent, DebugActiveProcessStop,
- DebugBreakProcess, DebugSetProcessKillOnExit, DeleteTimerQueueEx,
- DeleteTimerQueueTimer, DnsHostnameToComputerName[AW]): Add functions.
-
-2003-10-07 Kobun Fujimori <kobun@users.sourceforge.net>
-
- * include/winbase.h (GetVolumePathNamesForVolumeName): Available
- on Windows XP and later.
-
-2003-10-07 Manu B <manubee@users.sourceforge.net>
-
- * include/commctrl.h (TreeView_Select): Returns BOOL.
-
-2003-10-06 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winbase.h (CancelDeviceWakeupRequest): Add function.
-
- * include/winbase.h [_WIN32_WINNT >= 0x0501]
- (CreateMemoryResourceNotification, DeactivateActCtx): Add functions.
-
- * include/winbase.h [_WIN32_WINNT >= 0x0500] (CreateTimerQueue,
- CreateTimerQueueTimer): Add function.
-
- * include/winbase.h [_WIN32_WINNT >= 0x0501]
- (MEMORY_RESOURCE_NOTIFICATION_TYPE): Add enumeration.
-
- * include/winbase.h [_WIN32_WINNT >= 0x0501]
- (DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION): Add constant.
-
- * include/winnt.h (WT_*): Add constants.
-
- * lib/user32.def (CancelDeviceWakeupRequest,
- CreateMemoryResourceNotification, CreateTimerQueueTimer,
- DeactivateActCtx): Add functions.
-
-2003-10-06 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winbase.h [_WIN32_WINNT >= 0x0400] (ConvertFiberToThread):
- Add function. Sometimes I don't understand MSDN. This function is
- available on Windows XP and Server 2003, but the SDK is supposed to
- make it available when _WIN32_WINNT >= 0x0400, or so says the MSDN.
- Mmmh...
-
- * include/winbase.h [_WIN32_WINNT >= 0x0400] (CreateFiberEx):
- Guard function. Same remark as above.
-
- * lib/user32.def (ConvertFiberToThread, CreateFiberEx):
- Add functions.
-
-2003-10-06 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winbase.h [_WIN32_WINNT >= 0x0501] (ACTCTX_FLAG_*):
- Add constants.
-
- * include/winbase.h [_WIN32_WINNT >= 0x0501] (ACTCTX[AW]): Add
- structures.
-
- * include/winbase.h [_WIN32_WINNT >= 0x0501] (ActivateActCtx): Add
- function. MSDN says the first argument is HACTCTX but I'm not sure
- where such a specialized handle is defined, so use HANDLE instead.
-
- * include/winbase.h [_WIN32_WINNT >= 0x0501] (AttachConsole,
- CheckNameLegalDOS8Dot3[AW]): Add functions.
-
- * lib/user32.def (ActivateActCtx, AttachConsole,
- CheckNameLegalDOS8Dot3[AW]): Add functions.
-
- * lib/user32.def (AddLocalAlternateComputerName[AW]): Add functions.
- Unfortunately I don't know which header to put the declarations in.
-
-2003-10-06 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winnls.h (CTRY_KYRGYZSTAN, CTRY_MALDIVES, CTRY_MONGOLIA):
- Add constants.
-
- * include/winnls.h (NLS_FUNCTION, SYSGEOCLASS, SYSGEOTYPE): Add
- constants for National Language Support.
-
- * include/winnls.h (NLSVERSIONINFO): Add structure for National
- Language Support.
-
- * include/winnls.h (GEO_ENUMPROC): Add callback for National
- Language Support.
-
- * include/winnls.h (EnumSystemGeoID, GetCalendarInfo[AW],
- GetGeoInfo[AW], GetUserGeoID, SetCalendarInfo[AW], SetUserGeoID):
- Add functions.
-
- * include/winnls.h (IsNLSDefinedString, GetNLSVersion): Add
- functions. Strange... I am unable to find which library contains
- these functions. Can't find anything with pexports. Any clue?
-
- * lib/user32.def (EnumSystemGeoID, GetGeoInfo[AW], GetUserGeoID,
- SetUserGeoID): Add functions.
-
-2003-10-06 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winnt.h (LANG_KYRGYZ, LANG_MONGOLIAN, LANG_GALICIAN,
- LANG_SYRIAC, LANG_INVARIANT, SUBLANG_KASHMIRI_SASIA): Add constants.
-
- * include/winnt.h (SUBLANG_AZERI_LATIN, SUBLANG_AZERI_CYRILLIC,
- SUBLANG_ENGLISH_ZIMBABWE, SUBLANG_ENGLISH_PHILIPPINES): Fix wrong
- value for constants.
-
-2003-10-03 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/wincrypt.h (SCHANNEL_MAC_KEY, SCHANNEL_ENC_KEY,
- INTERNATIONAL_USAGE, KP_SCHANNEL_ALG): Add constants. Specifying
- the algorithms.
-
-2003-10-03 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/wincrypt.h (CRYPT_FLAGS_*): Add constants. Protocol flags.
-
-2003-10-03 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/wincrypt.h (KP_*): Add constants. Needed by
- CryptSetKeyParam() and other functions.
-
-2003-10-03 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h [_WIN32_WINNT >= 0x0501] (EVENT_*, CONSOLE_*):
- Add constants, related to Console Accessibility.
-
-2003-10-03 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h [WINVER >= 0x0500] (EVENT_MAX): Ooops...
- wrong value for constant.
-
-2003-10-03 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h [WINVER >= 0x0500] (EVENT_*): Add constants.
-
- * include/uxtheme.h: Cleanup.
- * include/tmschema.h: Cleanup.
-
-2003-10-02 Luke Dunstan <infidel@users.sourceforge.net>
-
- * include/winspool.h (GetDefaultPrinter[AW]): Add functions.
- * lib/winspool.def (GetDefaultPrinter[AW]): Add stubs.
-
-2003-10-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (INVALID_FILE_ATTRIBUTES): Fix define.
-
-2003-09-30 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winuser.h (BSF_*, BSM_*): Sync constants defined in
- both winuser.h and dbt.h.
- * include/dbt.h (BSF_*, BSM_*): Likewise.
-
- * include/winuser.h (struct tagRAWINPUT): Remove
- _ANONYMOUS_UNION tag from named union.
- (struct tagRAWMOUSE): Add _ANONYMOUS_STRUCT to nameless struct.
-
-2003-09-30 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/dhcpcdsk.h: New file.
- Note that MSDN is confused about whether it should start constant
- and structure names with DHCPCAPI or DHCPAPI. It's using both but
- experience suggests it's DHCPCAPI with `C'.
-
- * lib/dhcpcsvc.def: New file.
-
-2003-09-30 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h [_WIN32_WINNT >= 0x0501] (RIM_INPUT,
- RIM_INPUTSINK): Add constants, for use by WM_INPUT notification.
-
- * include/winuser.h [_WIN32_WINNT >= 0x0501] (RIDEV_REMOVE,
- RIDEV_EXCLUDE, RIDEV_PAGEONLY, RIDEV_NOLEGACY, RIDEV_INPUTSINK,
- RIDEV_CAPTUREMOUSE, RIDEV_NOHOTKEYS, RIDEV_APPKEYS): Add constants,
- for use in RAWINPUTDEVICE.
-
- * include/winuser.h [_WIN32_WINNT >= 0x0501]
- (GetRawInputDeviceInfo[AW]): Ooops... there are
- ANSI/Unicode versions of this function.
-
- * lib/user32.def (GetRawInputDeviceInfo[AW]): Ooops... there
- are ANSI/Unicode versions of this function.
-
-2003-09-29 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h [_WIN32_WINNT >= 0x0501] (RIM_TYPEMOUSE,
- RIM_TYPEKEYBOARD, RIM_TYPEHID, MOUSE_MOVE_RELATIVE,
- MOUSE_MOVE_ABSOLUTE, MOUSE_VIRTUAL_DESKTOP,
- MOUSE_ATTRIBUTES_CHANGED, RI_MOUSE_LEFT_BUTTON_DOWN,
- RI_MOUSE_LEFT_BUTTON_UP, RI_MOUSE_RIGHT_BUTTON_DOWN,
- RI_MOUSE_RIGHT_BUTTON_UP, RI_MOUSE_MIDDLE_BUTTON_DOWN,
- RI_MOUSE_MIDDLE_BUTTON_UP, RI_MOUSE_BUTTON_1_DOWNT_BUTTON_DOWN,
- RI_MOUSE_BUTTON_1_UP, RI_MOUSE_BUTTON_2_DOWNHT_BUTTON_DOWN,
- RI_MOUSE_BUTTON_2_UP, RI_MOUSE_BUTTON_3_DOWNDLE_BUTTON_DOWN,
- RI_MOUSE_BUTTON_3_UP, RI_MOUSE_BUTTON_4_DOWN,
- RI_MOUSE_BUTTON_4_UP, RI_MOUSE_BUTTON_5_DOWN,
- RI_MOUSE_BUTTON_5_UP, RI_MOUSE_WHEEL, KEYBOARD_OVERRUN_MAKE_CODE,
- RI_KEY_MAKE, RI_KEY_BREAK, RI_KEY_E0, RI_KEY_E1,
- RI_KEY_TERMSRV_SET_LED, RI_KEY_TERMSRV_SHADOW, RID_INPUT,
- RID_HEADER, RIDI_PREPARSEDDATA, RIDI_DEVICENAME,
- RIDI_DEVICEINFO): Add constants.
-
- * include/winuser.h [_WIN32_WINNT >= 0x0501] (RAWINPUTHEADER,
- RAWMOUSE, RAWKEYBOARD, RAWHID, RAWINPUT, RAWINPUTDEVICE,
- RAWINPUTDEVICELIST): Add structures.
-
- * include/winuser.h [_WIN32_WINNT >= 0x0501] (DefRawInputProc,
- GetRawInputBuffer, GetRawInputData, GetRawInputDeviceInfo,
- GetRawInputDeviceList, GetRegisteredRawInputDevices): Add functions.
-
- * lib/user32.def (DefRawInputProc, GetRawInputBuffer,
- GetRawInputData, GetRawInputDeviceInfo, GetRawInputDeviceList,
- GetRegisteredRawInputDevices): Add functions.
-
-2003-09-26 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winable.h (BlockInput): Add function.
-
- * include/winable.h (WS_ACTIVECAPTION): Add constant.
- For use with WINDOWINFO structure.
-
- * include/winuser.h [_WIN32_WINNT >= 0x0500] (LockWorkStation):
- Add function.
-
- * include/winuser.h [_WIN32_WINNT >= 0x0501] (IsWinEventHookInstalled):
- Add function.
-
- * include/winuser.h [WINVER >= 0x0500] (UnhookWinEvent):
- Add function...
-
- * include/winable.h [WINVER < 0x0500] (UnhookWinEvent):
- ...and duplicate.
-
- * include/winuser.h [_WIN32_WINNT >= 0x0403] (SendInput):
- Guard function...
-
- * include/winable.h [_WIN32_WINNT < 0x0403] (SendInput):
- ...and duplicate.
-
- * include/winuser.h [WINVER >= 0x0500] (NotifyWinEvent):
- Guard function...
-
- * include/winable.h [WINVER < 0x0500] (NotifyWinEvent):
- ...and duplicate.
-
- * include/winuser.h [WINVER >= 0x0500] (MOUSEINPUT, KEYBDINPUT,
- HARDWAREINPUT, INPUT): Guard structures...
-
- * include/winable.h [WINVER < 0x0500] (MOUSEINPUT, KEYBDINPUT,
- HARDWAREINPUT, INPUT): ...and duplicate.
-
- * include/winuser.h [_WIN32_WINNT >= 0x0403] (INPUT_MOUSE,
- INPUT_KEYBOARD, INPUT_HARDWARE): Guard constants...
-
- * include/winable.h [_WIN32_WINNT < 0x0403] (INPUT_MOUSE,
- INPUT_KEYBOARD, INPUT_HARDWARE): ...and duplicate.
-
- * include/winuser.h: Move around some lines. Reformat according
- to recommended or dominant style. Remove FAR keyword.
-
- * include/winable.h: Move around some lines.
-
- * lib/user32.def (BlockInput, IsWinEventHookInstalled,
- LockWorkStation, UnhookWinEvent): Add functions.
-
-2003-09-26 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h [_WIN32_WINNT >= 0x0501] (PrintWindow,
- PW_CLIENTONLY): Add function and constant.
-
- * lib/user32.def (PrintWindow): Add function.
-
-2003-09-26 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h (RealGetWindowClassA[AW]): Add function.
-
- * lib/user32.def (RealGetWindowClassA[AW]): Add function.
-
-2003-09-26 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h [WINVER >= 0x0500] (RegisterDeviceNotification[AW],
- DEVICE_NOTIFY_WINDOW_HANDLE, DEVICE_NOTIFY_SERVICE_HANDLE,
- DEVICE_NOTIFY_ALL_INTERFACE_CLASSES): Add function and constants.
-
- * lib/user32.def (RegisterDeviceNotification[AW]): Add function.
-
-2003-09-26 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h [WINVER >= 0x0500] (SetWinEventHook, WINEVENTPROC,
- WINEVENT_OUTOFCONTEXT, WINEVENT_SKIPOWNTHREAD, WINEVENT_SKIPOWNPROCESS,
- WINEVENT_INCONTEXT): Add function, typedef, and constants.
-
- * include/winable.h [WINVER < 0x0500] (SetWinEventHook, WINEVENTPROC,
- WINEVENT_OUTOFCONTEXT, WINEVENT_SKIPOWNTHREAD, WINEVENT_SKIPOWNPROCESS,
- WINEVENT_INCONTEXT): Add function, typedef, and constants.
-
- * include/winuser.h [_WIN32_WINNT >= 0x0500] (UserHandleGrantAccess):
- Add function.
-
- * lib/user32.def (SetWinEventHook, UserHandleGrantAccess):
- Add functions.
-
-2003-09-26 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winnt.h (ACE_INHERITED_OBJECT_TYPE_PRESENT,
- ACE_OBJECT_TYPE_PRESENT): Add constants.
- For use with OBJECTS_AND_NAME structure.
-
-2003-09-26 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/aclapi.h [_WIN32_WINNT >= 0x0501] (GetInheritanceSource[AW]):
- Add functions. Don't know what PFN_OBJECT_MGR_FUNCTS is so use
- void* instead.
-
- * include/accctrl.h [_WIN32_WINNT >= 0x0501] (INHERITED_FROM[AW],
- PINHERITED_FROM[AW]): Add structures.
-
- * lib/user32.def (GetInheritanceSource[AW]): Add functions.
-
-2003-09-26 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winuser.h (FLASHWINFO, PFLASHWINFO): Define for 98/Me, too.
-
-2003-09-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/version.def (LIBRARY): Quote name.
-
-2003-09-25 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h (GetClipboardSequenceNumber): Add functions
- and constants.
-
- * include/winuser.h (GetGuiResources, GR_GDIOBJECTS,
- GR_USEROBJECTS): Add functions and constants.
-
- * include/winuser.h (GetMouseMovePointsEx, GMMP_USE_DISPLAY_POINTS,
- GMMP_USE_HIGH_RESOLUTION_POINTS): Add functions and constants.
-
- * include/winuser.h (InSendMessageEx, ISMEX_NOSEND, ISMEX_CALLBACK,
- ISMEX_NOTIFY, ISMEX_REPLIED, ISMEX_SEND): Add functions and
- constants.
-
- * lib/user32.def (GetClipboardSequenceNumber, GetGuiResources,
- GetMouseMovePointsEx, InSendMessageEx): Add functions.
-
-2003-09-25 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h (BroadcastSystemMessage, BroadcastSystemMessageA,
- BroadcastSystemMessageW, BroadcastSystemMessageEx,
- BroadcastSystemMessageExA, BroadcastSystemMessageExW,
- BSMINFO, BSF_ALLOWSFW, BSF_SENDNOTIFYMESSAGE, BSF_LUID,
- BSF_RETURNHDESK): Add functions and constants.
-
- * include/winuser.h (EnumDisplaySettingsEx, EnumDisplaySettingsExA,
- EnumDisplaySettingsExW, EDS_RAWMODE): Add functions and constant.
-
- * include/winuser.h (IsGUIThread, IsHungAppWindow, FlashWindowEx,
- GetProcessDefaultLayout, SetProcessDefaultLayout,
- RealChildWindowFromPoint, SetProcessDefaultLayout,
- SwitchToThisWindow): Add functions.
-
- * lib/user32.def (BroadcastSystemMessageA, BroadcastSystemMessageW,
- BroadcastSystemMessageExA, BroadcastSystemMessageExW,
- EnumDisplaySettingsExA, EnumDisplaySettingsExW, FlashWindowEx,
- GetProcessDefaultLayout, IsGUIThread, IsHungAppWindow,
- RealChildWindowFromPoint, SetProcessDefaultLayout,
- SwitchToThisWindow): Add function.
-
-2003-09-25 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h (DeregisterShellHookWindow): Add function.
-
- * include/winuser.h [_WIN32_WINNT >= 0x0500] (EndTask): Add function.
-
- * lib/user32.def (EndTask): Add function.
-
- * include/winuser.h (WINVER, _WIN32_WINNT): It's better (?) to
- use _WIN32_WINNT instead of WINVER to test for Windows 2000.
-
- * include/winable.h: Reorder target macros.
-
- * lib/*.def: Cleanup.
-
-2003-09-25 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h [WINVER >= 0x0500] (AnimateWindow): Add
- function.
-
- * lib/user32.def (AnimateWindow): Add function. By the way
- there are ~ 140 symbols missing from this file when comparing
- to user32.dll on Windows XP.
-
-2003-09-25 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h [WINVER >= 0x0500] (AW_SLIDE, AW_ACTIVATE,
- AW_BLEND, AW_HIDE, AW_CENTER, AW_HOR_POSITIVE, AW_HOR_NEGATIVE,
- AW_VER_POSITIVE, AW_VER_NEGATIVE): Add constants. For use by
- AnimateWindow().
-
-2003-09-25 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h [WINVER >= 0x0500] (GetGUIThreadInfo,
- LPGUITHREADINFO): Add function and associated typedef...
-
- * include/winable.h [WINVER < 0x0500] (GetGUIThreadInfo,
- LPGUITHREADINFO): ...and duplicate them in <winable.h> as
- seems to be required on older versions of Windows.
-
-2003-09-24 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/GL/glu.h (gluErrorUnicodeStringWIN): Add macro
- function. MSDN suggests using gluErrorUnicodeStringWIN
- instead of gluErrorString, as it allows both ANSI and Unicode
- error strings.
-
- * include/GL/glu.h (gluErrorUnicodeStringEXT): Make the
- returned pointer const for consistency reasons.
-
-2003-09-24 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/GL/glu.h (gluErrorUnicodeStringEXT): Add function.
- Function exists in glu32.def but is undocumented on MSDN.
- A Google search came up with this declaration.
-
-2003-09-24 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/GL/glu.h: Rewritten from scratch. Started from GLU 1.3
- headers from OpenGL Sample Implementation. Windows ships with
- GLU 1.2 so some constants and functions were removed. Then some
- typedef's and function declarations were reworked to look like
- the previous GL/glu.h.
-
-2003-09-24 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/uxtheme.h (PROPERTYORIGIN): the documentation of
- PROPERTYORIGIN suggests it's `PROPERTYORIGIN' but experimentation
- suggests it's actually `enum PROPERTYORIGIN'. Keep both.
-
- * include/uxtheme.h (THEME_SIZE, THEMESIZE): MSDN suggests
- it's either `THEME_SIZE' or `THEMESIZE' but experimentation
- suggests it's actually `enum THEMESIZE'. Keep `THEME_SIZE'
- and `enum THEMESIZE'.
-
-2003-09-24 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/uxtheme.h: New file.
- * include/tmschema.h: New file.
- * include/uxtheme.def: New file.
- * lib/test.c: Include uxtheme.h, tmschema.h.
-
-2003-09-23 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h (KEYEVENTF_UNICODE, KEYEVENTF_SCANCODE):
- Add defines.
-
-2003-09-23 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winable.h [_WIN32_WINNT < 0x0403] (INPUT_MOUSE,
- INPUT_KEYBOARD, INPUT_HARDWARE): Duplicate defines in
- <winable.h> as seems to be required on older versions of
- Windows.
-
-2003-09-23 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h [WINVER >= 0x0500] (CHILDID_SELF,
- GUI_CARETBLINKING, GUI_INMOVESIZE, GUI_INMENUMODE,
- GUI_SYSTEMMENUMODE, GUI_POPUPMENUMODE, GUI_16BITTASK):
- Add defines, the last one only on Windows XP...
-
- * include/winable.h [WINVER < 0x0500] (CHILDID_SELF,
- GUI_CARETBLINKING, GUI_INMOVESIZE, GUI_INMENUMODE,
- GUI_SYSTEMMENUMODE, GUI_POPUPMENUMODE): ...and duplicate
- them in <winable.h> as seems to be required on older
- versions of Windows.
-
-2003-09-23 Dimitri Papadopoulos <papadopo@users.sourceforge.net>
-
- * include/winuser.h [WINVER >= 0x0500] (GUITHREADINFO,
- OBJID_WINDOW, OBJID_SYSMENU, OBJID_TITLEBAR, OBJID_MENU,
- OBJID_CLIENT, OBJID_VSCROLL, OBJID_HSCROLL, OBJID_SIZEGRIP,
- OBJID_CARET, OBJID_CURSOR, OBJID_ALERT, OBJID_SOUND): Bring
- back into <winuser.h>...
-
- * include/winable.h [WINVER < 0x0500] (GUITHREADINFO,
- OBJID_WINDOW, OBJID_SYSMENU, OBJID_TITLEBAR, OBJID_MENU,
- OBJID_CLIENT, OBJID_VSCROLL, OBJID_HSCROLL, OBJID_SIZEGRIP,
- OBJID_CARET, OBJID_CURSOR, OBJID_ALERT, OBJID_SOUND): ...and
- comment out in <winable.h>. MSDN may say <winable.h> but this
- breaks many programs. It seems it used to be <winable.h> on
- older versions of Windows.
-
-2003-09-17 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winuser.h (UpdateLayeredWindow): Protect against NOGDI.
- Thanks to Will Levine <willll@users.sourceforge.net>
-
-2003-09-15 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ws2spi.h (LPWSPBIND): Change CONST LPSOCKADDR to
- const struct sockaddr*.
- (LPWSPCONNECT): Likewise.
- (LPWSPJOINLEAF): Likewise.
- (LPWSPSENDTO): Likewise.
- Tanks to Sebastian Nowak <snowak1@users.spourceforge.net>
-
-2003-09-15 Filip Navara <xnavara@volny.cz>
-
- * include/commctrl.h (TCIS_BUTTONPRESSED, TCIS_HIGHLIGHTED):
- Add definitions.
-
-2003-09-15 Sascha Brawer <brawer@dandelis.ch>
-
- * include/winuser.h (DISPLAY_DEVICE_ATTACHED_TO_DESKTOP,
- DISPLAY_DEVICE_PRIMARY_DEVICE, DISPLAY_DEVICE_MIRRORING_DRIVER,
- DISPLAY_DEVICE_VGA_COMPATIBLE, DISPLAY_DEVICE_REMOVABLE,
- DISPLAY_DEVICE_MODESPRUNED): Define constants.
- (ChangeDisplaySettingsEx[A,W]): Add prototype.
-
- * lib/user32.def (ChangeDisplaySettingsEx[A,W]): Add exports.
- (EnumDisplayDevices[A,W]): Likewise.
-
-2003-09-15 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include.commctrl.h (_WIN32_WINNT): Change _WXP to 0x0501,
- throughout.
-
-2003-09-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/olectl.h (TEXTMETRICOLE, LPERRORLOG, LPPROPERTYBAG,
- LPENUMCONNECTIONPOINTS, LPCONNECTIONPOINT, LPENUMCONNECTIONS,
- LPPROPERTYPAGESITE, LPFONT, LPFONTDISP, OLE_COLOR, HIMETRIC,
- OLE_YPOS_HIMETRIC, OLE_XSIZE_HIMETRIC, OLE_YSIZE_HIMETRIC,
- OLE_YSIZE_CONTAINER, OLE_HANDLE, POINTF,LPPOINTF, CONTROLINFO,
- LPCONTROLINFO, CONNECTDATA, LPCONNECTDATA, LICINFO, LPLICINFO,
- CAUUID, LPCAUUID, CALPOLESTR, LPCALPOLESTR, CADWORD, LPCADWORD,
- PROPPAGEINFO, LPPROPPAGEINFO): Remove from here ...
- * include/ocidl.h: (TEXTMETRICOLE, LPERRORLOG, LPPROPERTYBAG,
- LPENUMCONNECTIONPOINTS, LPCONNECTIONPOINT, LPENUMCONNECTIONS,
- LPPROPERTYPAGESITE, LPFONT, LPFONTDISP, OLE_COLOR, HIMETRIC,
- OLE_YPOS_HIMETRIC, OLE_XSIZE_HIMETRIC, OLE_YSIZE_HIMETRIC,
- OLE_YSIZE_CONTAINER, OLE_HANDLE, POINTF, LPPOINTF, CONTROLINFO,
- LPCONTROLINFO, CONNECTDATA, LPCONNECTDATA, LICINFO, LPLICINFO,
- CAUUID, LPCAUUID, CALPOLESTR, LPCALPOLESTR, CADWORD, LPCADWORD,
- PROPPAGEINFO, LPPROPPAGEINFO): ... to here, for consistency
- with documentation.
- * include/olectl.h: Do #include <ocidl.h>.
- * include/ocidl.h: Don't #include <olectl.h>.
-
-2003-09-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winuser.h (_WIN32_WINNT, _WIN32_WINDOWS, WINVER):
- Change guards to use numeric constants, throughout.
-
-2003-09-15 Earnie Boyd <earnie@users.sf.net>
-
- * include/w32api.h: Increment version to 2.5.
- * Makefile.in: Ditto.
-
-2003-09-08 Justin Forest <vhex@users.sourceforge.net>
-
- * include/winuser.h (PM_QS_INPUT, PM_QS_POSTMESSAGE,
- PM_QS_PAINT, PM_QS_SENDMESSAGE): Add defines.
-
-2003-09-08 Filip Navara <xnavara@volny.cz>
-
- * include/wingdi.h (GRADIENT_FILL_RECT_H, GRADIENT_FILL_RECT_V,
- GRADIENT_FILL_TRIANGLE, GRADIENT_FILL_OP_FLAG): Add defines.
-
-2003-09-05 Earnie Boyd <earnie@users.sf.net>
-
- * include/w32api.h (_NT5, etc): Reverse the changes of 2003-07-01.
- * include/winbase.h (_NT5, etc): Ditto.
-
-2003-09-02 Bart Oldeman <bartoldeman@users.sourceforge.net>
-
- * lib/snmpapi.def (LIBRARY) Add library name.
- Remove '\r', throughout.
- * lib/wsnmp32.def: Remove '\r', throughout.
- * lib/igmpagnt.def: Likewise.
-
-2003-08-29 Steve Cleary <scleary@jerviswebb.com>
-
- * include/winuser.h (QS_ALLPOSTMESSAGE, QS_RAWINPUT): Add defines.
- (QS_INPUT, QS_ALLINPUT, QS_ALLEVENTS): Adjust by OR'ing with
- QS_RAWINPUT for _WIN32_WINNT >= 0x0501.
- (MWMO_*): Add flags.
-
- * include/wincrypt.h (MS_ENHANCED_PROV[AW], MS_STRONG_PROV[AW],
- MS_DEF_RSA_SIG_PROV[AW], MS_DEF_RSA_SCHANNEL_PROV[AW],
- MS_DEF_DSS_PROV[AW], MS_DEF_DSS_DH_PROV[AW], MS_ENH_DSS_DH_PROV[AW],
- MS_DEF_DH_SCHANNEL_PROV[AW], MS_SCARD_PROV[AW]): Add definitions.
-
-2003-08-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/test.c: Add vfw.h to includes.
- * include/mmsystem.h: Add #ifndef guard to definition of
- mmioFOURCC macro.
- * include/vfw.h: Protect __OBJC__ from COM declarations.
-
-2003-08-26 Filip Navara <xnavara@volny.cz>
-
- * include/vfw.h: New file.
-
-2003-08-26 Filip Navara <xnavara@volny.cz>
-
- * include/ddk/winddk.h (RTL_REGISTRY_*): Add defines.
- (IoSetCompletionRoutine): Cast _CompletionRoutine arg to
- PIO_COMPLETION_ROUTINE.
-
-2003-08-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/test.c: Add snmp.h, winsnmp.h amd mgmtapi.h to
- includes.
-
-2003-08-26 Filip Navara <xnavara@volny.cz>
-
- * include/snmp.h: New file.
- * include/winsnmp.h: New file.
- * include/mgmtapi.h: New file.
- * lib/snmpapi.def: New file.
- * lib/wsnmp32.def: New file.
- * lib/igmpagnt.def: New file.
- * lib/mgmtapi.def (SnmpMgrCtl) Add stub.
- (SnmpMgrGetTrapEx): Ditto.
- (SnmpMgrMIB2Disk): Remove.
- (dbginit): Remove.
-
-2003-08-25 Steven Edwards <Steven_Ed4153@yahoo.com>
-
- * include/ddk/ntifs.h: Change all C++ style comments to C.
- * include/GL/gl.h: Ditto.
-
-2003-08-25 Martin Fuchs <Martin-Fuchs@gmx.net>
-
- * include/shlobj.h (SFGAO_GHOSTED): Correct.
- (SFGAO_HIDDEN): Add define.
-
-2003-08-25 Filip Navara <xnavara@volny.cz>
-
- * include/commctrl.h (ILCF_*): Add defines.
- (ILD_*): Ditto.
- (HDS_*): Ditto.
- (IPN_FIRST, IPN_LAST): Cast to UINT.
- (SBN_FIRST, SBN_LAST): Add defines.
- (PGN_*): Ditto.
- (HDF_JUSTIFYMASK): Fix typo.
- (HDM_*): Add defines.
- (HICF_*): Ditto.
- (I_INDENTCALLBACK,I_IMAGENONE): Ditto.
- (TBSTATE_MARKED): Add define.
- (TBSTYLE_EX_*): Add defines.
- (TBCDRF_*): Ditto.
- (IDB_HIST_SMALL_COLOR,IDB_HIST_LARGE_COLOR): Ditto.
- (TB_*): Ditto.
- (TBN_*): Ditto.
- (TBNRF_*): Ditto.
- (TTF_*): Ditto.
- (TBCD_*): Ditto.
- (TBDDRET_*): Ditto.
- (TBIMHT_*): Ditto.
- (TTM_*): Ditto.
- (UDM_*): Ditto.
- (TBIF_BYINDEX): Define as hex constant.
- (CDIS_*): Add defines.
- (CDDS_SUBITEM): Add define.
- (LVIF_*): Add defines.
- (LVM_*): Ditto.
- (LVGIT_UNFOLDED): Add define.
- (TVM_): Add defines.
- (TVE_EXPANDPARTIAL): Add define.
- (TVGN_LASTVISIBLE): Ditto.
- (TVN_*): Add defines.
- (TVNRET_*): Add defines.
- (TCIF_STATE): Add define.
- (NM_TOOLTIPSCREATED): Ditto.
- (CCM_*): Add defines.
- (INFOTIPSIZE): Add numeric value.
- (ODT_LISTVIEW): Ditto.
- (MCM_GETMAXTODAYWIDTH): Ditto.
- (MCHT_*): Add defines.
- (UDM_SETRANGE32,UDM_GETRANGE32): Define in terms of WM_USER.
- (PGF_*): Add defines.
- (PGM_*): Ditto.
- (TBINSERTMARK): Add structure.
- (LPIMAGEINFO) Add typedef.
- (LPHDHITTESTINFO): Ditto.
- (NMLVGETINFOTIP[AW]: Add structures.
- (NMTBCUSTOMDRAW): Add structure.
- (TTTOOLINFOA_V*_SIZE): Add macros.
- (TTTOOLINFOW_V1_SIZE): Ditto.
- (IMAGELISTDRAWPARAMS): Add new members for WXP.
- (LVITEM[AW]: Ditto.
- (TCITEM[AW]):Ditto.
- (CCSIZEOF_STRUCT): Correct macro definition.
- (ListView_*): Add new macros.
- (HIMAGELIST): Correct typedef.
- (HTREEITEM): Ditto.
-
-2003-08-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * commctrl.h (TC_HITTESTINFO): Remove. Add defines for
- TCHITTESTINFO for backward compatibility.
- (TC_ITEM[AW]): Rename to TCITEM[AW]. Add defines for backward
- compatibility.
-
-2003-08-24 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/objidl.h (COBJMACROS): Define macros only
- if using C interace.
- * include/unknwn.h: Ditto.
- * include/comcat.h: Ditto.
-
-2003-08-24 Filip Navara <xnavara@volny.cz>
-
- * include/prsht.h (PSH_WIZARDHASFINISH, PSH_WIZARD_LITE,
- PSH_NOCONTEXTHELP): Define.
- (PSH_WIZARD97): Fix definition for _WIN32_IE >= 0x500.
- * include/winuser.h (DFCS_TRANSPARENT, DFCS_HOT): Define.
- (LPDLGTEMPLATE[AW]): Add typedefs.
-
-2003-08-22 Filip Navara <xnavara@volny.cz>
-
- * include/aclapi.h (BuildImpersonateExplicitAccessWithName[AW]):
- Add prototypes.
- BuildImpersonateTrustee[AW]): Add prototypes.
- GetMultipleTrustee[AW]): Add prototypes.
- GetMultipleTrusteeOperation[AW]): Add prototypes.
-
-2003-08-22 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (IMAGE_SUBSYSTEM_XBOX): Add define.
-
-2003-08-22 Mihai Preda <mihai_preda@users.sourceforge.net>
-
- * include/shlobj.h (IPersistFolder::GetClassID):
- Correct declaration.
- (CMF_*) Add missing defines.
-
-2003-08-22 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winuser.h (DC_BUTTONS): Add define.
-
-2003-08-22 Andrew Greenwood <lists@silverblade.co.uk>
-
- * include/winuser.h (DC_GRADIENT): Add define.
-
-2003-08-22 Martin Fuchs <Martin-Fuchs@gmx.net>
-
- * include/commctrl.h (BTNS_*): Define BTNS_* as successors to the
- older TBSTYLE_* constants.
-
-2003-08-18 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commctrl.h (TB_*) Group defines together.
-
-2003-08-18 Martin Fuchs <Martin-Fuchs@gmx.net>
-
- * include/winuser.h (ICON_SMALL2): Define.
- * include/commctrl.h (TB_SETBUTTONWIDTH, TB_SETDRAWTEXTFLAGS):
- Define.
- * include/shlobj.h (SHDRAGIMAGE): Define structure.
- (IDragSourceHelper) Define interface.
- (IDropTargetHelper): Likewise.
- (IExtractIcon): Unicode it.
- (ICommDlgBrowser): Use IShellView type as param in OnDefaultCommand,
- OnStateChange and IncludeObject methods.
-
-2003-08-17 Martin Fuchs <Martin-Fuchs@gmx.net>
-
- * include/commctrl.h (TreeView_GetScrollTime,
- TreeView_SetScrollTime): Define macros.
- * include/winuser.h (GetShellWindow): Add prototype.
- * include/objidl.h (STGMEDIUM): Correct lpszFileName type.
-
-2003-08-15 Martin Fuchs <Martin-Fuchs@gmx.net>
-
- * include/shguid.h (CLSID_DragDropHelper, IID_IDropTargetHelper,
- IID_IDragSourceHelper): Declare.
- * lib/shell32.c (CLSID_DragDropHelper, IID_IDropTargetHelper,
- IID_IDragSourceHelper): Define.
-
-2003-08-15 Andrew Greenwood <lists@silverblade.co.uk>
-
- * include/wingdi.h (DEVMODE[AW]) Correct structure definition.
- * include/ddk/ntapi.h (LPC_TYPE): Add LPC_CONNECTION_REFUSED.
- * include/ddk/winddk.h (IRP_*): Add constants as anonymous enum.
-
-2003-08-10 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/uuid.c (CGID_Explorer, CGID_ShellDocView,
- CGID_ShellServiceObject): Remove definitions.
- * lib/shell32.c (CGID_ShellServiceObject): Add definition.
-
-2003-08-10 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/shlobj.h (SHELLSTATE): Add structure.
- (SHGetSetSettings): Add prototype.
- (SHGetSettings): Add prototype.
- * lib/shell32.def (SHGetSetSettings): Add stub.
-
-2003-08-10 Phil Krylov <likewolf@users.sourceforge.net>
-
- * include/commctrl.h (HDM_ORDERTOINDEX): Add define.
- (Header_OrderToIndex): Add macro.
- (Header_GetOrderArray): Add macro.
-
- * include/commdlg.h (FR_MATCHALEFHAMZA,
- FR_MATCHDIAC, FR_MATCHKASHIDA): Add defines.
-
-2003-08-10 Martin Fuchs <Martin-Fuchs@gmx.net>
-
- * include/commctrl.h (TVM_GETSCROLLTIME,
- TVM_SETSCROLLTIME): Add defines.
-
-2003-08-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/shlobj.h (SHELLFLAGSTATE): Add structure.
- (SHGetInstanceExplorer): Correct return type.
- (SHGetFolderPath[AW]): Likewise.
- Thanks to Magnus Olsen <greatlord@sourceforge.users.net>
- for report.
-
-2003-08-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/test.c: Include winldap.h, ntldap.h, winber.h.
-
-2003-08-01 Filip Navara <xnavara@volny.cz>
-
- * include/winldap.h: New file.
- * include/ntldap.h: New file.
- * include/winber.h: New file.
- * lib/winldap32.def: New file.
-
-2003-08-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ddk/atm.h: Remove stray '.';
-
-2003-08-01 Gisle Vanem <gvanem@broadpark.no>
-
- * include/ddk/winddk.h: Remove trailing ';' from macros,
- throughout. Add () around defines with cast returns, throughout.
-
-2003-07-31 Martin Fuchs <Martin-Fuchs@gmx.net>
-
- * include/shlobj.h (SFGAO_COMPRESSED): Add define.
- (SFGAOF, SHGDNF): Add typedef's.
- (SHCONTF): Extend enum.
-
-2003-07-31 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/shellapi.h: Include all structs within pshpack2.h/
- poppack.h block.
-
-2003-07-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winuser.h (ASFW_ANY, LSFW_LOCK, LSFW_UNLOCK,
- LWA_COLORKEY, LWA_ALPHA): Guard with _WIN32_WINNT,
- _WIN32_WINDOWS, not WINVER.
- (AllowSetForegroundWindow,LockSetForegroundWindow,
- SetLayeredWindowAttributes): Likewise.
- (GetLayeredWindowAttributes,UpdateLayeredWindow): Add prototypes.
- * lib/user32.def (GetLayeredWindowAttributes,UpdateLayeredWindow):
- Add stubs.
-
-2003-07-26 Eric R. Krause <ekrause_98@users.sourceforge.net>
-
- * include/objidl.h (IMalloc): Fix typo.
-
-2003-07-24 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/dkk/ntifs.h: Fix typo in guard for
- #pragma GCC system_header.
-
-2003-07-22 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/objidl.h (PropVariant): Add CHAR cVal field
- to union.
- (FMTID_SummaryInformation, FMTID_DocSummaryInformation,
- FMTID_UserDefinedProperties): Declare.
-
-2003-07-22 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winbase.h (GetModuleHandleEx[AW]): Add prototypes.
-
-2003-07-22 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winbase.h (DUPLICATE_CLOSE_SOURCE,
- DUPLICATE_SAME_ACCESS): Remove defines.
- (HANDLE_FLAG_INHERIT, HANDLE_FLAG_PROTECT_FROM_CLOSE): Sync with
- ddk/ntapi.h defines.
- (SEM_*) : Likewise.
- * include/winnt.h (COMPRESSION_*, ACCESS_*, SYSTEM_*): Sync with
- ddk/ntifs.h defines.
- (FILE_*): Likewise.
- (MEM_IMAGE, SEC_*): Likewise.
- (DUPLICATE_CLOSE_SOURCE, DUPLICATE_SAME_ACCESS,
- DUPLICATE_SAME_ATTRIBUTES): Sync with ddk/winddk.h defines.
- (TOKEN_*): Sync with ddk/ntifs.h defines.
- * include/ddk/ntapi.h: Add comments noting definitions in
- winbase.h.
- * include/ddk/ntifs.h: Add comments noting definitions in
- winnt.h.
- * include/ddk/winddk.h: Add comments noting definitions in
- winnt.h.
-
-2003-07-18 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (FILE_*): Sync with ddk/winddk.h.
- * include/winioctl.h (FILE_*): Sync with ddk/winddk.h.
-
-2003-07-17 Pierre Humblet <pierre.humblet@ieee.org>
-
- * include/mmsystem.h (TIME_KILL_SYNCHRONOUS): Add define.
-
-2003-07-17 Danny Smith <dannysmith@users.sourceforge.net>
-
- Clean up warnings in ddk.
-
- * include/ddk/atm.h (_ATM_AAL_OOB_INFO): Add _ANONYMOUS_UNION,
- conditional on __cplusplus.
- * include/ddk/scsi.h: Add _ANONYMOUS_UNION and _ANONYMOUS_STRUCT
- defines, throughout.
- (_CDB): Add _ANONYMOUS_UNION, conditional on __cplusplus.
- * include/ddk/cfg.h (_PNP_VETO_TYPE): Remove extra comma.
- * include/ddk/cfgmgr32.h: Change C++ comment style to ISO C.
- * include/ddk/ddkmapi.h (_DDLOCKOUT): Add _ANONYMOUS_UNION defines.
- * include/ddk/hidpi.h: Add _ANONYMOUS_UNION and _ANONYMOUS_STRUCT
- defines, throughout.
- * include/ddk/ndis.h: Add _ANONYMOUS_UNION and _ANONYMOUS_STRUCT
- defines, throughout. Remove trailing semicolon from *_S 'structure'
- macro expansion, throughout. Remove trailing semicolon from
- DECLARE_UNKNOWN_STRUCT macro expansion.
- * include/ddk/ndiswan.h (_NDIS_WAN_COMPRESS_INFO): Add
- _ANONYMOUS_UNION.
- * include/ddk/ntapi.h (_PROCESS_DEVICEMAP_INFORMATION,
- _PROCESS_SESSION_INFORMATION): Add _ANONYMOUS_UNION.
- * include/ddk/ntddcdrm.h (CDROM_TOC_CD_TEXT_DATA_BLOCK):
- Add _ANONYMOUS_UNION.
- * include/ddk/ntdddisk.h: Add _ANONYMOUS_UNION, throughout.
- * include/ddk/ntddmou.h: Add _ANONYMOUS_UNION, throughout.
- * include/ddk/ntifs.h: Add _ANONYMOUS_UNION, throughout.
- (ZwQueryObject): Change 2nd param to OBJECT_INFORMATION_CLASS, to
- match proto in ntapi.h.
- (ZwSetInformationObject): Likewise.
- * include/ddk/srb.h (SCSI_REQUEST_BLOCK): Add _ANONYMOUS_UNION.
- (SCSI_ADAPTER_CONTROL_TYPE): Add __extension__.
- * include/ddk/tdikrnl.h (TDI20_CLIENT_INTERFACE_INFO): Add
- _ANONYMOUS_UNION and _ANONYMOUS_STRUCT.
- * include/ddk/usb.h (USB): Add _ANONYMOUS_UNION.
- * include/ddk/usbcamdi.h (USBCAMD_CamControlFlags): Remove
- last comma.
- * include/ddk/video.h (STATUS_BLOCK): Add _ANONYMOUS_UNION.
- * include/ddk/winddk.h (DECLARE_INTERNAL_OBJECT): Remove
- trailing semicolon when expanding macro.
- (GENERAL_LOOKASIDE_S): Likewise.
- Add _ANONYMOUS_UNION and _ANONYMOUS_STRUCT, throughout.
- Change inline to __inline, throughout.
- * include/ddk/winnt4.h: Change inline to __inline, throughout.
-
-2003-07-13 Casper S. Hornstrup <chorns@users.sourceforge.net>
-
- * include/ddk/ntifs.h (KeInsertQueueApc): Make return type
- BOOLEAN. Name parameter 4 PriorityBoost and make it of type
- KPRIORITY.
- * include/ddk/winddk.h (_KPCR): Put IDT field on next line.
- * include/ddk/winddk.h (_IO_STATUS_BLOCK, _IRP, _OWNER_ENTRY,
- _ERESOURCE, _IMAGE_INFO, _CREATE_DISK, _DISK_SIGNATURE, _KPCR_TIB):
- Apply _ANONYMOUS_UNION to anonymous unions and _ANONYMOUS_STRUCT
- to anonymous structs.
-
-2003-07-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (PVOID): Move to before HANDLE typedef.
-
- * include/winuser.h (mouse_event): Correct type of fifth param,
- Thanks to: Andrew Jones <guln at users dot sourceforge dot net>
-
-2003-07-11 Earnie Boyd <earnie@users.sf.net>
-
- * include/winnt.h (HANDLE): Define based on STRICT filter.
- (THREAD_BASE_PRIORITY_MIN): Use parens around negative value.
- (THREAD_BASE_PRIOIRTY_IDLE): Ditto.
-
-2003-07-08 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commctrl.h (NMTVDISPINFO[AW]): Replace obsolete struct
- names _TV_DISPINFO[AW] and typedefs. Add defines for backward
- compatability. Thanks to Magnus Olsen <greatlord@users.sf.net>
- for report.
-
-2003-07-03 Earnie Boyd <earnie@users.sf.net>
-
- * config.guess, config.sub: Update with new versions from ftp.gnu.org.
-
-2003-07-03 Luke Dunstan <infidel@users.sf.net>
-
- * include/commdlg.h (CommDlg_OpenSave_*): Add parentheses around
- macro arguments. Thanks to Tom Bishop <tombishop@users.sf.net>.
- * include/winuser.h (MONITOR_DEFAULTTONULL, MONITOR_DEFAULTTOPRIMARY,
- MONITOR_DEFAULTTONEAREST, MONITORINFOF_PRIMARY): Add defines.
- (TPM_RECURSE): Add guard for Win98/Win2K.
- Thanks to Magnus Olsen <greatlord@users.sf.net>.
-
-2003-07-01 Earnie Boyd <earnie@users.sf.net>
-
- * include/basetyps.h (small, hyper): Change to __small and __hyper to
- avoid user namespace conflicts.
-
-2003-07-01 Earnie Boyd <earnie@users.sf.net>
-
- * include/w32api.h (_NT4, _W98, _WME, _NT5, _W2000, _WXP, _W2003,
- _IE3, _IE4, _IE5, _IE6): Add definitions.
- * include/winbase.h (GetLongPathName[AW]): Add guard for OS >= NT5 or
- >= Win98.
- Change existing guards to use the above macro names as appropriate.
- * include/basetyps.h (__int32, __int16, __int8, small, hyper): Define.
- Note: Also added to mingw/include/_mingw.h.
-
-2003-06-28 Steven Edwards <Steven_Ed4153@yahoo.com>
-
- * include/shlwapi.h (UrlGetLocationA, UrlGetLocationW,
- PathFindSuffixArrayA, PathFindSuffixArrayW,
- PathFindExtensionA, PathFindExtensionW, StrStrW
- StrStrA): Change unicode-macro'd LP[C]TSTR return values to
- explicit type.
-
-2003-06-26 Mattia Barbon <mbarbon@dsi.unive.it>
-
- * include/richedit.h (PARAFORMAT2): Add definition.
- * include/richedit.h (PFA_*, PFE_*, PFM_*): Add some
- missing constants.
-
-2003-06-17 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/shellapi.h (SHQUERYRBINFO): Add structure,
- (SHQueryRecycleBin[AW]. SHEmptyRecycleBin[AW]):Add prototypes.
- (SHERB_NOCONFIRMATION, SHERB_NOPROGRESSUI, SHERB_NOSOUND):
- Add defines. Thanks to Brett Hart <brett at ncubedtech dot com>
-
-2003-06-17 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winbase.h (GlobalCompact, GlobalFix, GlobalFlags,
- GlobalUnfix, GlobalUnWire, GlobalWire, LocalCompact,
- LocalFlags, LocalShrink, LockSegment, UnlockSegment): Add comment
- that these are obsolete no-ops.
-
-2003-06-17 Bang Jun-Young <junyoung@netbsd.org>
-
- * include/winbase.h (GetProcessWorkingSetSize,
- GlobalCompact, LocalAlloc, LocalCompact, LocalReAlloc,
- LocalShrink, SignalObjectAndWait, WriteProcessMemory):
- Correct prototypes.
-
-2003-06-18 Steven Edwards <Steven_Ed4153@yahoo.com>
-
- * include/winuser.h (TPM_RECURSE): Add define.
-
-2003-06-06 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/test.c: #include <powrprof.h>.
-
-2003-06-06 James E. Lucas <xelloss@sourceforge.net>
-
- * include/powerprof.h: New file.
- * lib/powerprof.def: New file.
-
-2003-06-06 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt (SLIST_HEADER): Add C90 anonymous struct
- protection.
-
-2003-06-05 Luke Dunstan <infidel@users.sourceforge.net>
-
- * include/winuser.h (WNDCLASS[AW], WNDCLASSEX[AW]): Change type of
- hInstance members to HINSTANCE.
- Thanks to: Brenden T. <brenden@rcsis.com>
-
-2003-06-05 Bart Oldeman <bartoldeman@users.sourceforge.net>
-
- * include/lmaccess.h (UF_MNS_LOGON_ACCOUNT): Add define.
- * include/wingdi.h (LPRGBTRIPLE, LPRGBQUAD): Add typedefs.
-
-2003-06-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ddk/ntpoapi.h (POWER_INFORMATION_LEVEL): Remove.
- * include/winnt.h (POWER_INFORMATION_LEVEL): Add.
- * include/ddk/winddk.h (SINGLE_LIST_ENTRY,SLIST_HEADER):
- Remove.
- * include/ddk/ndis.h (NdisAllocateSpinLock): Add missing '\'.
-
-2003-05-30 Mattia Barbon <mbarbon@dsi.unive.it>
-
- * lib/oleacc.def: New file.
- * include/winable.h: New file.
- * include/oleacc.h: Add extern "C" guard.
- (NAVDIR_*, ROLE_*, STATE_*): Add missing constants.
- (AccessibleChildren, AccessibleObjectFromEvent,
- AccessibleObjectFromPoint, AccessibleObjectFromWindow,
- CreateStdAccessibleProxy[AW], GetOleaccVersionInfo, GetRoleText[AW],
- GetStateText[AW], LresultFromObject, ObjectFromLresult,
- WindowFromAccessibleObject): Add prototypes and UNICODE mappings.
- * include/winuser.h (NotifyWinEvent): Add prototype.
- (OBJID_WINDOW, OBJID_SYSMENU, OBJID_TITLEBAR,
- OBJID_MENU, OBJID_CLIENT, OBJID_VSCROLL, OBJID_HSCROLL,
- OBJID_SIZEGRIP, OBJID_CARET, OBJID_CURSOR, OBJID_ALERT,
- OBJID_SOUND): Move from here to...
- * include/winable.h (OBJID_WINDOW, OBJID_SYSMENU, OBJID_TITLEBAR,
- OBJID_MENU, OBJID_CLIENT, OBJID_VSCROLL, OBJID_HSCROLL,
- OBJID_SIZEGRIP, OBJID_CARET, OBJID_CURSOR, OBJID_ALERT,
- OBJID_SOUND): Here, as per documentation.
- * lib/test.c: Include winable.h.
- * lib/user32.def (NotifyWinEvent): Add missing export.
-
-2003-05-30 Bang Jun-Young <junyoung@netbsd.org>
-
- * include/winbase.h (HeapCompact): Correct prototype.
- * include/winnt.h (SINGLE_LIST_ENTRY, SLIST_ENTRY,
- SLIST_HEADER): Add.
-
-2003-05-27 Andrew C. Stadt <acstadt@sympatico.ca>
-
- * include/winuser.h (LWA_COLORKEY, LWA_ALPHA): Add defines.
-
-2003-05-25 Bill C. Riemers <cygwin@docbill.net>
-
- * include/winuser.h (EnumDisplayDevicesW): Fix typo.
-
-2003-05-23 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winuser.h (EnumDisplayDevices[AW]): Add prototypes.
- * include/wingdi.h (DISPLAY_DEVICE): UNICODE it.
-
-2003-05-23 Andrew Dunbar <hippietrail@users.sourceforge.net>
-
- * include/wingdi.h (GCP_RESULTS[AW]) Correct type of
- lpGlyphs field to LPWSTR.
-
-2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wincrypt.h (PLAINTEXTKEYBLOB, OPAQUEKEYBLOB,
- PUBLICKEYBLOBEX, SYMMETRICWRAPKEYBLOB) Add defines.
- (PP_*): Add defines.
- (CryptContextAddRef): Add prototype.
- Thanks to: Shura Zam <debil_urod@users.sourceforge.net>
-
-2003-05-18 Manu B <manubee@users.sourceforge.net>
-
- * include/commctrl.h (TVSORTCB): Rename old TV_SORTCB structure.
-
-2003-05-18 Bang Jun-Young <junyoung@netbsd.org>
-
- * include/winbase.h (CREATE_DEFAULT_ERROR_MODE,
- DEBUG_PROCESS, DEBUG_ONLY_THIS_PROCESS, CREATE_SUSPENDED,
- DETACHED_PROCESS, CREATE_NEW_CONSOLE, NORMAL_PRIORITY_CLASS,
- IDLE_PRIORITY_CLASS, HIGH_PRIORITY_CLASS, REALTIME_PRIORITY_CLASS,
- CREATE_NEW_PROCESS_GROUP, CREATE_UNICODE_ENVIRONMENT,
- CREATE_SEPARATE_WOW_VDM, CREATE_SHARED_WOW_VDM, CREATE_FORCEDOS,
- CREATE_NO_WINDOW): Convert to hexadecimal form for better
- readability.
- (BELOW_NORMAL_PRIORITY_CLASS, ABOVE_NORMAL_PRIORITY_CLASS,
- CREATE_BREAKAWAY_FROM_JOB, CREATE_WITH_USERPROFILE): Add.
-
-2003-05-15 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ddk/ndis.h (NDIS30_MINIPORT_CHARACTERISTICS_S):
- Unname anonymous unions if NONAMELESSUNION not defined.
-
-2003-05-14 Bang Jun-Young <junyoung@netbsd.org>
-
- * include/winbase.h (GMEM_VALID_FLAGS): Add.
-
-2003-05-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/prsht.h (PROPSHEETHEADER[AW]: Mark
- anonymous unions as GCC extension.
-
-2003-05-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/oleidl.h (LPENUMOLEDOCUMENTVIEWS): Remove typedef.
- (IEnumOleDocumentViews): Remove commented out DECLARE_ENUMERATOR.
- * include/docobj.h (LPENUMOLEDOCUMENTVIEWS): Add typedef (previously
- commented out).
- (IEnumOleDocumentViews): Add definition using DECLARE_ENUMERATOR.
-
-2003-05-12 Earnie Boyd <earnie@users.sf.net>
-
- * include/commctrl.h: (MCSC_BACKGROUND, MCSC_TEXT, MCSC_TITLEBK,
- MCSC_TITLETEXT, MCSC_MONTHBK, MCSCTRAILTEXT): Define.
- Thanks to: Robert Wishlaw <rwishlaw @ shaw . ca>
-
-2003-05-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/olectl.h (IOleControl,IOleControlSite,ISimpleFrameSite,
- IErrorLog,IPropertyBag,IPersistPropertyBag,IPersistStreamInit,
- IPersistMemory,IPropertyNotifySink,IProvideClassInfo,
- IProvideClassInfo2,IConnectionPointContainer,
- IEnumConnectionPoints,IConnectionPoint,IEnumConnections,
- IClassFactory2,ISpecifyPropertyPages,IPerPropertyBrowsing,
- IPropertyPageSite,IPropertyPage,IPropertyPage2,IFont,IFontDisp,
- IPicture,IPictureDisp): Move from here to...
- * include/ocidl.h (IOleControl,IOleControlSite,ISimpleFrameSite,
- IErrorLog,IPropertyBag,IPersistPropertyBag,IPersistStreamInit,
- IPersistMemory,IPropertyNotifySink,IProvideClassInfo,
- IProvideClassInfo2,IConnectionPointContainer,
- IEnumConnectionPoints,IConnectionPoint,IEnumConnections,
- IClassFactory2,ISpecifyPropertyPages,IPerPropertyBrowsing,
- IPropertyPageSite,IPropertyPage,IPropertyPage2,IFont,IFontDisp,
- IPicture,IPictureDisp): Here, as per documentation.
-
-2003-05-12 Mattia Barbon <mbarbon@dsi.unive.it>
-
- * include/oleauto.h (VarR8FromDec, VarDecFromR8): Add prototypes.
- * include/winbase.h (TerminateJobObject,
- AssignProcessToJobObject): Likewise.
- * include/servprov.h: New header.
- * lib/test.c: Include servprov.h.
-
-2003-05-10 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/shlguid.h (CGID_ShellServiceObject): Declare.
- * lib/uuid.c (CGID_ShellServiceObject): Define guid.
- Thanks to Chris Sutcliffe <ir0nh34d#users.sourceforge.net>
- * include/winuser.h (SetLayeredWindowAttributes): Add prototype.
- * lib/user32.def (SetLayeredWindowAttributes): Add stub.
- * lib/uuid.c (CGID_Explorer, CGID_ShellDocView): Define guids.
-
-2003-05-05 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commctrl.h (STATUSCLASSNAME, TOOLBARCLASSNAME,
- TOOLTIPS_CLASS, TRACKBAR_CLASS, UPDOWN_CLASS, PROGRESS_CLASS,
- HOTKEY_CLASS): Remove dupicate defines for UNICODE case.
-
-2003-05-02 Steven Edwards <Steven_Ed4153@yahoo.com>
-
- * include/richedit.h (EM_FINDTEXTEXW, EM_FINDTEXTW,
- EM_GETAUTOURLDETECT, EM_GETBIDIOPTIONS, EM_GETEDITSTYLE,
- EM_GETIMECOLOR, EM_GETIMEOPTIONS, EM_GETPUNCTUATION,
- EM_GETWORDWRAPMODE, EM_RECONVERSION, EM_SETBIDIOPTIONS,
- EM_SETEDITSTYLE, EM_SETIMECOLOR, EM_SETIMEOPTIONS,
- EM_SETPALETTE, EM_SETPUNCTUATION, EM_SETTEXTEX,
- EM_SETWORDWRAPMODE, RICHEDIT_CLASS10A): Add defines.
-
-2003-05-02 Francois Ferrand <typz@sourceforge.users.net>
-
- * include/commctrl.h (TBM_*): Add missing trackbar defines.
-
-2003-05-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/cplext.h (CPLPAGE_MOUSE_WHEEL,
- CPLPAGE_DISPLAY_BACKGROUND): Add defines.
-
-2003-04-30 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wingdi.h (DC_PEN, DC_BRUSH): Add defines.
- (SetDCPenColor, SetDCBrushColor): Add prototypes.
- * lib/gdi32.def (SetDCPenColor, SetDCBrushColor): Add stubs.
-
-2003-04-26 Bang Jun-Young <junyoung@netbsd.org>
-
- * include/winioctl.h (DEVICE_TYPE_FROM_CTL_CODE): Add macro.
-
-2003-04-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/oaidl.h (ITypeMarshal): Add interface.
-
-2003-04-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winioctl.h: Clean up formatting.
- (RETRIEVAL_POINTERS_BUFFER): Add fields to Extents[1] struct.
- (CREATE_DISK): Add _ANONYMOUS_UNION macro.
- (DISK_CACHE_INFORMATION): Likewise.
- (DISK_DETECTION_INFO): Likewise.
- (DISK_PARTITION_INFO): Likewise.
- (PARTITION_INFORMATION_EX): Likewise.
- (DRIVE_LAYOUT_INFORMATION_EX): Likewise.
-
-2003-04-26 Casper S. Hornstrup <chorns@users.sourceforge.net>
-
- * include/winbase.h (DeleteVolumeMountPoint[AW],
- FindFirstVolumeMountPoint[AW], FindNextVolumeMountPoint[AW],
- FindVolumeMountPointClose, GetVolumeNameForVolumeMountPoint[AW],
- GetVolumePathName[AW], GetVolumePathNamesForVolumeName[AW],
- SetVolumeMountPoint[AW]): Add prototypes.
- * include/winioctl.h (IOCTL_DISK_GET_PARTITION_INFO_EX,
- IOCTL_DISK_SET_PARTITION_INFO_EX,
- IOCTL_DISK_GET_DRIVE_LAYOUT_EX,
- IOCTL_DISK_SET_DRIVE_LAYOUT_EX, IOCTL_DISK_CREATE_DISK,
- IOCTL_DISK_GET_LENGTH_INFO, IOCTL_DISK_PERFORMANCE_OFF,
- IOCTL_DISK_GET_DRIVE_GEOMETRY_EX, IOCTL_DISK_GROW_PARTITION,
- IOCTL_DISK_GET_CACHE_INFORMATION,
- IOCTL_DISK_SET_CACHE_INFORMATION,
- IOCTL_DISK_DELETE_DRIVE_LAYOUT, IOCTL_DISK_UPDATE_PROPERTIES,
- FSCTL_GET_VOLUME_BITMAP, FSCTL_GET_RETRIEVAL_POINTERS,
- FSCTL_MOVE_FILE): Define.
- (CREATE_DISK_GPT, CREATE_DISK_MBR, CREATE_DISK,
- DISK_CACHE_INFORMATION,
- DETECTION_TYPE, DISK_INT13_INFO, DISK_EX_INT13_INFO,
- DISK_DETECTION_INFO, DISK_GEOMETRY_EX, DISK_GROW_PARTITION,
- DISK_PARTITION_INFO, DISKQUOTA_USER_INFORMATION,
- GET_LENGTH_INFORMATION, DISK_EXTENT, VOLUME_DISK_EXTENTS,
- DRIVE_LAYOUT_INFORMATION_GPT, DRIVE_LAYOUT_INFORMATION_MBR,
- PARTITION_INFORMATION_MBR, PARTITION_INFORMATION_GPT,
- PARTITION_INFORMATION_EX, DRIVE_LAYOUT_INFORMATION_EX,
- MOVE_FILE_DATA,
- RETRIEVAL_POINTERS_BUFFER, STARTING_LCN_INPUT_BUFFER,
- STARTING_VCN_INPUT_BUFFER, VOLUME_BITMAP_BUFFER): Add structs.
- (PARTITION_STYLE, DISK_CACHE_RETENTION_PRIORITY): Add enums.
- (MEDIA_TYPE): Add F3_120M_512, F3_640_512, F5_640_512,
- F5_720_512, F3_1Pt2_512, F3_1Pt23_1024, F5_1Pt23_1024,
- F3_128Mb_512, F3_230Mb_512, F8_256_128, F3_200Mb_512,
- F3_240M_512, and F3_32M_512.
- * lib/kernel32.def (GetVolumePathNamesForVolumeName[AW]): Add
- stubs.
-
-2003-04-16 Earnie Boyd <earnie@users.sf.net>
-
- * include/wingdi.h (DM_SPECVERSION): Define.
- Thanks to Sinitsyn Valentime <valentine.sinitsyn@usu.ru>
- * include/rpcdce.h (UuidCreateSequential): Properly guard with
- appropriate _WIN32_WINNT values.
-
-2003-04-15 Chris January <chris@atomice.net>
-
- * include/rpcdce.h: Add declaration for UuidCreateSequential.
- * lib/rpcrt4.def: Add entry for UuidCreateSequential.
-
-2003-04-14 Phil Krylov <likewolf@users.sourceforge.net>
-
- * include/winuser.h (VK_*): Add missing defines.
-
-2003-04-14 Vincent Béron <papineau@users.sourceforge.net>
-
- * include/commctrl.h (NMUPDOWN, LPNMUPDOWN): Use currently
- documented typedefs for struct _NM_UPDOWN.
- Add defines for backward comapatibility.
- * include/commdlg.h (OFN_ENABLESIZING): Add define.
- * include/wininet.h (IRF_*): Add missing defines.
-
-2003-04-14 Bang Jun-Young <junyoung@netbsd.org>
-
- * lib/ntdll.def (Csr*, Dbg*, Ki*, Ldr*, Rtl*): Add W2K exports.
-
-2003-04-11 Earnie Boyd <earnie@users.sf.net>
-
- * include/sspi.h: Add comment for FreeCredentialsHandle.
-
-2003-04-07 Marcel Telka <telka@users.sourceforge.net>
-
- * include/ddk/winddk.h (KIRQL): Typedef as UCHAR, not ULONG.
-
-2003-03-30 Hans E. Molin <kvasi@users.sourceforge.net>
-
- * include/olectl.h (OleLoadPicturePath): Correct prototype.
-
-2003-03-30 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/uuid.c (IID_IHTML*): Move definitions to...
- * lib/mshtml-uuid.c: New file.
- * lib/Makefile.in: Add mshtml-uuid.o to libuuid.a
-
-2003-03-30 Michael Sazonov <traip@comset.net>
-
- * lib/uuid.c (IID_IHTML*): Add new GUID definitions.
- * include/mshtml.h (IHTMLElementCollection, IHTMLLinkElement,
- IHTMLImgElement): Add interface definitions.
-
-2003-03-29 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commctrl.h (ANIMATE_CLASS,HOTKEY_CLASS,PROGRESS_CLASS,
- STATUSCLASSNAME,TOOLBARCLASSNAME,TOOLTIPS_CLASS,TRACKBAR_CLASS,
- UPDOWN_CLASS,WC_COMBOBOXEX,WC_HEADER,WC_IPADDRESS,WC_LISTVIEW,
- WC_TABCONTROL,WC_TREEVIEW): Move UNICODE mappings out of
- RC_INVOKED guard.
- (WC_PAGESCROLLER,WC_NATIVEFONTCTL,WC_BUTTON,WC_STATIC,WC_EDIT,
- WC_LISTBOX,WC_COMBOBOX,WC_SCROLLBAR): Add defines.
-
-2003-03-28 Bang Jun-Young <junyoung@netbsd.org>
-
- * include/winnt.h (WAITORTIMERCALLBACKFUNC): Add typedef.
-
-2003-03-27 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/secext.h (GetComputerObjectName[AW],GetUserNameEx[AW],
- TranslateName[AW]): Add prototypes.
- * lib/sec32.def (GetComputerObjectName[AW],GetUserNameEx[AW],
- TranslateName[AW]): Add stubs.
- * lib/test.c: Include secext.h.
-
-2003-03-27 Vladimir Michl <michlv@users.sourceforge.net>
-
- * include/ddk/ndis.h (NdisAllocateSpinLock,NdisFreeSpinLock,
- NdisAcquireSpinLock,NdisReleaseSpinLock,NdisDprAcquireSpinLock,
- NdisDprReleaseSpinLock): Change macro argument from SpinLock to
- _SpinLock.
-
-2003-03-26 Earnie Boyd <earnie@users.sf.net>
-
- * include/w32api.h: Increment version to 2.4.
- * Makefile.in: Ditto.
-
-2003-03-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ddk/batclass.h (BATTERY_REPORTING_SCALE)
- Move structure from here...
- * include/winnt.h (BATTERY_REPORTING_SCALE): To here.
-
- * include/ddk/ntapi.h (JOBOBJECT_*):
- Remove structures and enums definitions.
- (JOB_OBJECT*): Move defines from here...
- * include/winnt.h (JOB_OBJECT* ): To here.
-
- * include/ddk/ntpoapi.h (LATENCY_TIME, POWER_ACTION_POLICY,
- SYSTEM_POWER_LEVEL, SYSTEM_POWER_POLICY,
- PROCESSOR_POWER_POLICY_INFO, PROCESSOR_POWER_POLICY,
- ADMINISTRATOR_POWER_POLICY, SYSTEM_POWER_INFORMATION,
- PROCESSOR_POWER_INFORMATION, SYSTEM_BATTERY_STATE,
- SYSTEM_POWER_CAPABILITIES): Move enums, structures
- and associated defines from here ...
- * include/winnt.h: (LATENCY_TIME, POWER_ACTION_POLICY,
- SYSTEM_POWER_LEVEL, SYSTEM_POWER_POLICY,
- PROCESSOR_POWER_POLICY_INFO, PROCESSOR_POWER_POLICY,
- ADMINISTRATOR_POWER_POLICY, SYSTEM_POWER_INFORMATION,
- PROCESSOR_POWER_INFORMATION, SYSTEM_BATTERY_STATE,
- SYSTEM_POWER_CAPABILITIES):To here.
-
- * include/ddk/winddk.h (DEVICE_POWER_STATE,
- SYSTEM_POWER_STATE, POWER_ACTION): Move enums
- from here...
- * include/winnt.h (DEVICE_POWER_STATE,
- SYSTEM_POWER_STATE, POWER_ACTION): To here.
-
-2003-03-19 Danny Smith <dannysmith@users.sourceforge.net>
-
- *lib/ndis.def (NdisAllocateMemory): Correct stdcall suffix.
- Thanks to: Vladimir Michl <michlv@users.sourceforge.net>
- (NdisUpdateSharedMemory): Likewise.
- (NdisMFreeSharedMemory: Likewise.
- (NdisMMapIoSpace: Likewise.
-
-2003-03-18 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/lmaccess.h (UF_LOCKOUT): Correct name from UF_LOCK.
- Thanks to: Fabricio D. Rossi <gurusoda@users.sourceforge.net>
- (UF_SETTABLE_BITS): Correct UF_LOCKOUT here too.
-
-2003-03-17 Bang Jun-Young <junyoung@netbsd.org>
-
- * include/winbase.h (EnumResourceLanguages[AW]): Correct prototypes.
- (EnumResourceNames[AW]): Ditto.
- (EnumResourceTypes[AW]): Ditto.
- * include/wincon.h (CONSOLE_FONT_INFO): Add struct.
-
-2003-03-16 Toby Malone <malone@users.sourceforge.net>
-
- * include/winuser.h (SendInput): Add prototype.
- * lib/user32.def (SendInput): Add stub.
-
-2003-03-16 Vadim Yegorov <zg@bmg.lv>
-
- * winioctl.h (FSCTL_SET_REPARSE_POINT: Correct macro.
- (FSCTL_DELETE_REPARSE_POINT): Likewise.
-
-2003-03-15 Bang Jun-Young <junyoung@netbsd.org>
-
- * winnt.h (JOBOBJECTINFOCLASS): Define enum.
- (JOBOBJECT_*): Define corresponding structures.
-
-2003-03-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ddk/winddk.h (PCUNICODE_STRING): Remove incorrect
- typedef.
-
-2003-03-13 Bang Jun-Young <junyoung@netbsd.org>
-
- * lib/kernel32.def (Module32{First,Next}{,W}): Add missing exports.
- (Process32{First,Next}{,W}): Ditto.
- (Thread32{First,Next}): Ditto.
- * include/ntdef.h (PCUNICODE_STRING): Add typedef.
-
-2003-03-12 Earnie Boyd <earnie@users.sf.net>
-
- * include/mswsock.h: Correct invalid filter for _WINSOCK2_H.
- Thanks to Jim Barton <jmbarton@users.sf.net>.
-
-2003-03-12 Ranjit Mathew <rmathew@hotmail.com>
-
- * include/winnt.h (_IMAGE_SEPARATE_DEBUG_HEADER): Expose
- member SectionAlignment.
-
-2003-03-11 Earnie Boyd <earnie@users.sf.net>
-
- * include/winsvc.h (SERVICE_NO_CHANGE): Use hex constant to avoid
- warnings.
- Thanks to Fabricio D. Rossi <gurusoda@users.sf.net>.
- * Makefile.in (bindist): Correct process.
- * lib/Makefile.in (install): Ditto.
- Thanks to Jeff Bonnggren <jbon@users.sf.net>.
-
-2003-03-10 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/rasdlg.h: New file.
- * lib/rasdlg.def: New file.
- * lib/test.c: Include rasdlg.h.
-
-2003-03-06 Christopher January <chris@atomice.net>
-
- * include/winbase.h (FindFirstVolume): Add declaration.
- (FindNextVolume): Add declaration.
- (FindVolumeClose): Add declaration.
- (GetSystemTimes): Add declaration.
- * include/winnt.h: Add define for PF_XMMI64_INSTRUCTIONS_AVAILABLE.
-
-2003-03-06 Danny Smith <dannysmith@users.sourceforge.net>
-
- *lib/kernel32.def (GetSystemTimes): Add stub.
-
-2003-03-04 Heiko Gerdau <hg@technosis.de>
-
- * oleidl.h (IOleObject): Correct GetUserType prototype.
- (IViewObject2): Correct GetExtent prototype.
- * olectl.h (DISPIP_): Add new defines
- * ocidl.h (IOleInPlaceSiteWindowless): Add new interface.
-
-2003-03-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/olectl.h (OleLoadPictureEx) Add prototype.
- (OleLoadPictureFile): Ditto.
- (OleLoadPictureFileEx): Ditto.
- (OleLoadPicturePath): Ditto.
- (OleSavePictureFile): Ditto.
-
-2003-03-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/objbase.h (CoAddRefServerProcess): Add prototype.
- (CoAddReleaseServerProcess): Ditto.
- (CoResumeClassObjects): Ditto.
- (CoSuspendClassObjects): Ditto.
- * include/oleauto.h (V_I1): Define.
- Thanks to: "Timofei" <mmttmm@users.sourceforge.net>
-
-2003-03-01 Heiko Gerdau <hg@technosis.de>
-
- * include/oleidl.h (USERCLASSTYPE): Add enum.
- * include/ocidl.h (IObjectWithSite): Add interface.
-
-2003-02-28 Roland Schwingel <roland.schwingel@onevision.de>
-
- Fixup UNICODE thinko in 2003-02-22 patch.
- * include/wingdi.h (AddFontMemResourceEx): Add.
- (RemoveFontMemResourceEx): Ditto.
- (AddFontMemResourceEx[AW]): Remove.
- (RemoveFontMemResourceEx[AW]): Ditto
- * lib/gdi32.def: (AddFontResourceEx): Add.
- (RemoveFontMemResourceEx): Ditto.
- (AddFontMemResourceEx[AW]): Remove.
- (RemoveFontResourceEx[AW]): Ditto.
-
-2003-02-23 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winbase.h (EVENTLOG_SUCCESS): Add define.
- Thanks to: Thomas Weber <thomasweber@sourceforge.net>
-
-2003-02-22 Roland Schwingel <roland.schwingel@onevision.de>
-
- * include/wingdi.h (AddFontMemResourceEx[AW]): Add.
- (RemoveFontMemResourceEx[AW]): Ditto
- * lib/gdi32.def (AddFontMemResourceEx[AW]): Add.
- (RemoveFontMemResourceEx[AW]): Ditto.
-
-2003-02-22 Bang Jun-Young <junyoung@netbsd.org>
-
- * lib/ntdll.def (NT*, RTL*, ZW*): Add missing exports.
- (NtCurrentTeb): Remove.
-
-2003-02-22 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wsahelp.h: Remove ';' after closing
- #ifdef __cplusplus brace.
- * include/ws2spi.h: Likewise.
-
-2003-02-22 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winbase.h (MEMORYSTATUSEX): Add structure.
- (GlobalMemoryStatusEx): Add prototype.
- * lib/kernel32.def (GlobalMemoryStatusEx): Add stub.
-
-2003-02-17 Vaclav Haisman <V.Haisman@sh.cvut.cz>
-
- * include/winioctl.h (FSCTL_SET_SPARSE): Define.
-
-2003-02-12 Roland Schwingel <roland.schwingel@onevision.de>
-
- * include/wingdi.h (AddFontResourceEx[AW]): Add.
- (RemoveFontResourceEx[AW]): Ditto
- (FR_PRIVATE): Define.
- (FR_NOT_ENUM): Define.
- * lib/gdi32.def (AddFontResourceEx[AW]): Add.
- (RemoveFontResourceEx[AW]): Ditto.
-
-2003-02-10 Earnie Boyd <earnie@users.sf.net>
-
- * include/w32api.h: Increment version to 2.3.
- * Makefile.in: Ditto.
-
-2003-02-09 Earnie Boyd <earnie@users.sf.net>
-
- * lib/ddk/ntoskrnl.def (Ke386IoSetAccessProcess): Activate export.
- (Ke386QueryToAccessMap): Ditto.
- (Ke386SetIoAccessMap): Ditto.
- Thanks to Marcel Telka <telka@users.sf.net>
- * include/secext.h: New file. Declare EXTENDED_NAME_FORMAT.
- * include/security.h: Include secext.h.
- * include/winbase.h: Declare COMPUTER_NAME_FORMAT.
- Thanks to Dimitri Papadopoulos <dimitri_at@users.sf.net>
- * include/GL/gl.h: Remove include of glext.h.
- Thanks to Greg Couch <gregcouch@users.sf.net>
-
-2003-02-05 Earnie Boyd <earnie@users.sf.net>
-
- * include/basetypes.h (_GUID_DEFINED): Add deprecation warning, start
- using GUID_DEFINED instead.
- * include/sqltypes.h: Ditto.
- * include/winnt.h: Ditto.
- * include/ddk/scsiwmi.h: Ditto.
-
-2003-02-04 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/shlwapi.h (PathRelativePathTo[AW]): Correct
- prototypes.
- Thanks to: John Dallaway <jld@ecoscentric.com>.
-
-2003-02-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commctrl.h (TCM_*): Add missing defines.
-
-2003-02-01 Jesus Alvarez <jesus_alvarez@users.sourceforge.net>
- Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/prsht.h (PSP_*, PSH_*): Add missing defines.
- (PROPSHEETPAGE[AW]): Add pszHeaderTitle, pszHeaderSubTitle
- for (_WIN32_IE >= 0x0400).
- (PROPSHEETHEADER[AW]): Add hplWatermark and anonymous union
- fields for (_WIN32_IE >= 0x0400).
-
-2003-01-31 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winbase.h (CreateFiber): Change first parameter
- to SIZE_T.
- (CreateJobObject[AW], CreateHardLink[AW]):Guard with
- if (_WIN32_WINNT >= 0x0500).
-
-2003-01-31 Bang Jun-Young <junyoung@netbsd.org>
-
- * include/winbase.h (PWIN32_FIND_DATAA, PWIN32_FIND_DATAW):
- Add missing typedefs.
- (CreateFiberEx, CreateJobObjectA,CreateJobObjectW): Add missing
- prototypes.
- (CreateHardLinkA, CreateHardLinkW): Return BOOL, not HANDLE.
-
-2003-01-27 Krzysztof Nikiel <kni@poczta.onet.pl>
-
- * include/mmsystem.h (MIXERCONTROL_CONTROLF_MULTIPLE): Correct
- define.
- * lib/largeint.c (LargeIntegerAdd): Add, don't multiply.
-
-2003-01-27 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/rpcnterr.h (RPC_X_INVALID_PIPE_OPERATION): Add
- define.
- * include/winbase.h (WAIT_TIMEOUT): Guard against prior
- definition.
- (WAIT_FAILED): Cast to DWORD.
- * include/winerror.h (WAIT_TIMEOUT): Guard against prior
- definition.
-
-2003-01-27 Bang Jun-Young <junyoung@netbsd.org>
-
- * include/winerror.h: Protect against multiple
- definition of WSA* error codes.
- * include/winsock.h: Likewise.
- * include/winsock2.h: Likewise.
-
-2003-01-27 Bang Dong-Heui
- Bang Jun-Young <junyoung@netbsd.org>
-
- * include/winerror.h (ERROR_*, SEC_E_*,RPC_S_*, FRS_ERR_*,
- DNS_*, WSA*, WAIT_TIMEOUT): Add missing error codes.
- (RPC_X_INVALID_PIPE_OPERATION): Remove define.
-
-
-2003-01-24 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ras.h (RASCONN[AW]): Add dwSessionId for
- (WINVER >= 0x501).
-
-2003-01-24 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ras.h (RASCONN[AW]): Guard szDeviceType,
- szDeviceName fields with (WINVER >= 0x400). Add dwFlags, luid
- fields for (WINVER >= 0x501).
-
-2003-01-23 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/ws2_32.def (getaddrinfo, freeaddrinfo and getnameinfo):
- Add stubs.
- * include/ws2tcpip.h (IPV6_*) Add IPPROTO_IPV6 level socket
- options.
-
-2003-01-11 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (IMAGE_FILE_AGGRESIVE_WS_TRIM
- IMAGE_FILE_LARGE_ADDRESS_AWARE): Add defines.
-
-2003-01-11 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/accctrl.h (enum _SE_OBJECT_TYPE): Add
- SE_REGISTRY_WOW64_32KEY.
- Reported by: Dimitri Papadopoulos <dimitri_at@sourceforge.users.net>
-
-2003-01-11 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commctrl.h (HDN_GETDISPINFO[AW]: Add defines.
- (tagNMHDDISPINFO[AW}: Add structures and typedefs.
- Reported by: Mat Nieuwenhoven <matnieuw@users.sourceforge.net>
-
-2003-01-10 Christopher Faylor <cgf@redhat.com>
-
- * include/winsock2.h: Remove gethostname from INSIDE_CYGWIN protection.
-
-2003-01-08 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/dxguid.c: Don't #include <objbase.h>.
- * include/unknwn.h: Partially revert change of 2002-12-26.
- Don't include <ole2.h>.
-
-2003-01-08 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/dinput.c: Don't #include <objbase.h>.
-
-2003-01-08 Bart Oldeman <bartoldeman@users.sourceforge.net>
-
- * include/windows.h (ole2.h):Do #include for
- __WATCOMC__.
-
-2003-01-05 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winuser.h (SPI_SETWHEELSCROLLLINES) Add define.
- * include/zmouse.h (WHEEL_DELTA): Guard against prior
- definition.
- (WHEEL_PAGESCROLL): Likewise.
- (SPI_SETWHEELSCROLLLINES): Define, if not already done.
-
-2003-01-04 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winuser.h (SPI_GETWHEELSCROLLLINES) Add define.
- (WHEEL_PAGESCROLL): Add define.
-
-2003-01-04 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commctrl.h (tagNMTOOLBAR[AW]): Replace obsolete struct
- names tagTBNOTIFY[AW] and typedefs. Add defines for backward
- compatability. Add RECT field. Add UNICODE mappings for new
- names.
- (tagNMREBARCHEVRON): Add struct and typedefs for
- _WIN32_IE >= 0x0500.
-
-2003-01-04 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commctrl.h (TOOLINFO[AW]): Update structures.
- (LVHITTESTINFO): Likewise.
-
- * include/wingdi.h (GRADIENT_TRIANGLE): Add structure.
- (GRADIENT_RECT): Likewise.
-
-2003-01-03 Bang Jun-Young <junyoung@netbsd.org>
-
- * include/winerror.h (ERROR_OPLOCK_NOT_GRANTED,
- ERROR_INVALID_OPLOCK_PROTOCOL, ERROR_SOURCE_ELEMENT_EMPTY,
- ERROR_DESTINATION_ELEMENT_FULL, ERROR_ILLEGAL_ELEMENT_ADDRESS,
- ERROR_MAGAZINE_NOT_PRESENT, ERROR_DEVICE_REINITIALIZATION_NEEDED,
- ERROR_DEVICE_REQUIRES_CLEANING, ERROR_DEVICE_DOOR_OPEN,
- ERROR_DEVICE_NOT_CONNECTED, ERROR_NOT_FOUND, ERROR_NO_MATCH,
- ERROR_SET_NOT_FOUND, ERROR_NO_TRACKING_SERVICE,
- ERROR_JOURNAL_DELETE_IN_PROGRESS, ERROR_JOURNAL_NOT_ACTIVE,
- ERROR_JOURNAL_ENTRY_DELETED, ERROR_ONLY_IF_CONNECTED,
- ERROR_NOT_SUPPORTED_ON_SBS, ERROR_SERVER_SHUTDOWN_IN_PROGRESS,
- ERROR_MUTUAL_AUTH_FAILED, ERROR_TIME_SKEW, ERROR_DEVICE_REMOVED,
- RPC_S_INVALID_ASYNC_HANDLE, RPC_S_INVALID_ASYNC_CALL,
- RPC_X_PIPE_CLOSED, RPC_X_PIPE_DISCIPLINE_ERROR, RPC_X_PIPE_EMPTY,
- ERROR_CANT_ACCESS_FILE, ERROR_CANT_RESOLVE_FILENAME,
- ERROR_WMI_GUID_NOT_FOUND, ERROR_WMI_INSTANCE_NOT_FOUND,
- ERROR_WMI_ITEMID_NOT_FOUND, ERROR_WMI_TRY_AGAIN, ERROR_WMI_READ_ONLY,
- ERROR_WMI_SET_FAILURE, ERROR_TRANSPORT_FULL, ERROR_FILE_OFFLINE,
- ERROR_REMOTE_STORAGE_NOT_ACTIVE, ERROR_REMOTE_STORAGE_MEDIA_ERROR,
- ERROR_NOT_A_REPARSE_POINT, ERROR_REPARSE_ATTRIBUTE_CONFLICT,
- ERROR_INVALID_REPARSE_DATA, ERROR_REPARSE_TAG_INVALID,
- ERROR_REPARSE_TAG_MISMATCH, ERROR_FILE_ENCRYPTED,
- ERROR_FILE_NOT_ENCRYPTED, ERROR_NOT_EXPORT_FORMAT,
- ERROR_CTX_WINSTATION_NAME_INVALID, ERROR_CTX_INVALID_PD,
- ERROR_CTX_PD_NOT_FOUND, ERROR_CTX_WD_NOT_FOUND,
- ERROR_CTX_CLOSE_PENDING, ERROR_CTX_NO_OUTBUF,
- ERROR_CTX_MODEM_INF_NOT_FOUND, ERROR_CTX_INVALID_MODEMNAME,
- ERROR_CTX_MODEM_RESPONSE_ERROR, ERROR_CTX_MODEM_RESPONSE_TIMEOUT,
- ERROR_CTX_MODEM_RESPONSE_NO_CARRIER,
- ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE, ERROR_CTX_MODEM_RESPONSE_BUSY,
- ERROR_CTX_MODEM_RESPONSE_VOICE, ERROR_CTX_TD_ERROR,
- ERROR_CTX_WINSTATION_NOT_FOUND, ERROR_CTX_WINSTATION_ALREADY_EXISTS,
- ERROR_CTX_WINSTATION_BUSY, ERROR_CTX_BAD_VIDEO_MODE,
- ERROR_CTX_GRAPHICS_INVALID, ERROR_CTX_NOT_CONSOLE,
- ERROR_CTX_CLIENT_QUERY_TIMEOUT, ERROR_CTX_CONSOLE_DISCONNECT,
- ERROR_CTX_CONSOLE_CONNECT, ERROR_CTX_SHADOW_DENIED,
- ERROR_CTX_WINSTATION_ACCESS_DENIED, ERROR_CTX_INVALID_WD,
- ERROR_CTX_SHADOW_INVALID, ERROR_CTX_SHADOW_DISABLED,
- ERROR_CTX_CLIENT_LICENSE_IN_USE, ERROR_CTX_CLIENT_LICENSE_NOT_SET,
- ERROR_CTX_LICENSE_NOT_AVAILABLE, ERROR_CTX_LICENSE_CLIENT_INVALID,
- ERROR_CTX_LICENSE_EXPIRED, ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY,
- ERROR_DS_NO_ATTRIBUTE_OR_VALUE, ERROR_DS_INVALID_ATTRIBUTE_SYNTAX,
- ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED, ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS,
- ERROR_DS_BUSY, ERROR_DS_UNAVAILABLE, ERROR_DS_NO_RIDS_ALLOCATED,
- ERROR_DS_NO_MORE_RIDS, ERROR_DS_INCORRECT_ROLE_OWNER,
- ERROR_DS_RIDMGR_INIT_ERROR, ERROR_DS_OBJ_CLASS_VIOLATION,
- ERROR_DS_CANT_ON_NON_LEAF, ERROR_DS_CANT_ON_RDN,
- ERROR_DS_CANT_MOD_OBJ_CLASS, ERROR_DS_CROSS_DOM_MOVE_ERROR,
- ERROR_DS_GC_NOT_AVAILABLE, ERROR_SHARED_POLICY,
- ERROR_POLICY_OBJECT_NOT_FOUND, ERROR_POLICY_ONLY_IN_DS,
- ERROR_DS_ADMIN_LIMIT_EXCEEDED, ERROR_DS_DS_REQUIRED,
- ERROR_DS_SAM_INIT_FAILURE, ERROR_DS_SENSITIVE_GROUP_VIOLATION,
- ERROR_DS_CANT_MOD_PRIMARYGROUPID, ERROR_DS_INVALID_GROUP_TYPE,
- ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN,
- ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN,
- ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER,
- ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER,
- ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER,
- ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER,
- ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER,
- ERROR_DS_HAVE_PRIMARY_MEMBERS, ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD,
- ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY, ERROR_DS_CANT_START,
- ERROR_DS_INIT_FAILURE, ERROR_SAM_INIT_FAILURE, ERROR_DS_GC_REQUIRED,
- ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY,
- ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS,
- ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED):
- Add missing error codes.
-
-2003-01-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/kernel32.c (GetCurrentFiber): Remove blank input field in
- asm code.
- (GetFiberData): Likewise.
-
-2003-01-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (GetCurrentFiber): Remove blank input field in
- asm code.
- (GetFiberData): Likewise.
-
-2003-01-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winerror.h (ERROR_DIFFERENT_SERVICE_ACCOUNT,
- ERROR_EXE_MACHINE_TYPE_MISMATCH, ERROR_HOOK_TYPE_NOT_ALLOWED,
- ERROR_INVALID_KEYBOARD_HANDLE, ERROR_INVALID_PRINT_MONITOR,
- ERROR_PRINT_MONITOR_IN_USE, ERROR_PRINTER_HAS_JOBS_QUEUED,
- ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION,
- ERROR_SUCCESS_REBOOT_REQUIRED, ERROR_SUCCESS_RESTART_REQUIRED,
- ERROR_TIMEOUT, OR_INVALID_OID, OR_INVALID_OXID,
- OR_INVALID_SET, RPC_X_INVALID_PIPE_OPERATION): Add missing
- error codes.
- Re-sort codes.
-
-2003-01-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winspool.h (PRINTER_INFO_6): Add.
- Reported by: Mat Nieuwenhoven <matnieuw@users.sourceforge.net>
-
-2002-12-30 Hartmut Honisch <hhonisch@users.sourceforge.net>
-
- * include/winbase.h (NMPWAIT_WAIT_FOREVER): Cast to DWORD.
-
- * lib/ntdll.def (NtConnectPort, NtOpenEvent,
- NtRequestWaitReplyPort, NtWaitForSingleObject,ZwConnectPort,
- ZwOpenEvent, ZwRequestWaitReplyPort, ZwWaitForSingleObject):
- Add stubs.
-
-2002-12-30 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wingdi.h (wglGetLayerPaletteEntries): Correct
- prototype. Thanks to: Joe Krahn <jkrahn at nc dot rr dot com>.
-
-2002-12-26 Dimitri Papadopoulos <dimitri_at@sourceforge.users.net>
-
- * include/wingdi.h (DOCINFOA): Replace LPCTSTR with LPCSTR.
-
-2002-12-26 Dimitri Papadopoulos <dimitri_at@sourceforge.users.net>
-
- * include/wingdi.h (BALTIC_CHARSET, JOHAB_CHARSET,
- VIETNAMESE_CHARSET): Remove duplicate defines.
- * lib/comctl32.def (ImageList_SetImageCount): Add stub.
-
-2002-12-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/dbt.h (DEV_BROADCAST_PORT): Add UNICODE version.
- Thanks to: Dimitri Papadopoulos <dimitri_at@sourceforge.users.net>
-
-2002-12-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/unknwn.h: Include windows.h and ole2.h before header
- guard to avoid circular inclusion of COM headers.
-
-2002-12-26 Dimitri Papadopoulos <dimitri_at@sourceforge.users.net>
-
- * include/dde.h (PackDDElParam, UnpackDDElParam,FreeDDElParam,
- ReuseDDElParam): Use __WIN64 compatible typedefs.
-
-2002-12-26 Dimitri Papadopoulos <dimitri_at@sourceforge.users.net>
-
- * include/accctrl.h (ACTRL_ACCESS_ENTRY[AW]): Make
- lpInheritProperty member const.
- (ACTRL_PROPERTY_ENTRY[AW]): Make lpProperty member
- const.
-
-2002-12-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commcat.h: Don't include windows.h or ole2.h ifdef
- COM_NO_WINDOWS_H.
- * include/unknwn.h: Ditto.
-
-2002-12-26 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/imm.h (ImmGetCompositionFont[AW],
- ImmSetCompositionFont[AW]): Add NOGDI guard.
-
-2002-12-19 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ddk/hidusage.h: Remove unneccessary #pragma pack's.
- * include/ddk/miniport.h (EMULATOR_PORT_ACCESS_TYPE): Define
- before using.
- (VIDEO_ACCESS_RANGE): Guard against prior definition.
- * include/ddk/minitape.h (INQUIRYDATA): Guard against prior
- definition.
- * include/ddk/ndis.h (DECLARE_UNKNOWN_PROTOTYPE): Correct macro.
- * include/ddk/ndisguid.h: Remove unneccessary #pragma pack's.
- * include/ddk/scsi.h (INQUIRYDATA): Guard against prior
- definition.
- * include/ddk/scsiwmi.h (GUID): Define if not already done.
- (LPCGUID): Likewise.
- * include/ddk/tdi.h: Close "Listen flags" comment.
- * include/ddk/tdistat.h: Remove unneccessary #pragma pack's.
- * include/ddk/video.h: Add #pragma pack(push,4) to balance.
- (VIDEO_ACCESS_RANGE): Guard against prior definition.
- * include/ddk/videoagp.h:Add #pragma pack(push,4) to balance.
- * include/ddk/win2k.h: Likewise.
- * include/ddk/winddi.h: Likewise.
- * include/ddk/winddk.h: Likewise.
- * include/ddk/winnt4.h: Likewise.
- * include/ddk/ws2san.h: Likewise.
- * include/ddk/xfilter.h: Remove unbalanced #pragma pack(pop).
- * include/ddk/video.h: Don't process rest of file ifdef
- __WINDDI_H.
- * include/ddk/winddi.h: Don't process rest of file ifdef
- __VIDEO_H.
- * include/ddk/usb.h: Don't process rest of file ifdef
- __USBDI_H.
- * include/ddk/usbdi.h: Don't process rest of file ifdef
- __USB_H.
- * include/ddk/usbcamdi.h: Don't process rest of file if
- !defined(__USB_H) && !defined(__USBDI_H)
-
-2002-12-18 James E. Lucas <xelloss@users.sourceforge.net>
-
- * include/winnetwk.h (WNetResourceInformation[AW]): Correct
- prototypes.
- * include/winuser.h (GetAncestor) Add prototype.
- (GA_PARENT, GA_ROOT, GA_ROOTOWNER): Add defines.
- (EWX_FORCEIFHUNG): Add define for _WIN32_WINNT >= 0x0500.
- (SPI_GETACTIVEWINDOWTRACKING, SPI_GETACTIVEWNDTRKZORDER,
- SPI_GETACTIVEWNDTRKTIMEOUT, SPI_SETACTIVEWINDOWTRACKING
- SPI_SETACTIVEWNDTRKZORDER, SPI_SETACTIVEWNDTRKTIMEOUT): Add
- defines.
- * lib/user32.def (GetAncestor@8): Add stub.
-
-2002-12-15 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/windows.h: Guard inclusion of wingdi.h,
- commdlg.h, winspool.h, ole2.h with NOGDI.
- * include/winuser.h (ICONMETRICS, NONCLIENTMETRICS,
- ChangeDisplaySettings, CreateDesktop, EnumDisplaySettings):
- Guard with NOGDI.
-
-2002-12-12 Dimitri Papadopoulos <dimitri_at@sourceforge.users.net>
-
- * include/oleacc.h (SELFLAG_*): Change to enum.
-
-2002-12-11 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/shlobj.h (IShellLinkW::GetPath): Correct prototype.
- Thanks to: Dimitri Papadopoulos <dimitri_at@sourceforge.users.net>
-
-2002-12-09 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/shellapi.h (ExtractIconEx[AW]): Correct return type
- to UINT.
- Thanks to: Dimitri Papadopoulos <dimitri_at@sourceforge.users.net>
-
-2002-12-07 Danny Smith <dannysmith@users.sourveforge.net>
-
- * include/winuser.h (AllowSetForegroundWindow,
- LockSetForegroundWindow): Add prototypes.
- (ASFW_ANY, LSFW_LOCK, LSFW_UNLOCK) Add defines.
- Thanks to: Pat Thoyts <patthoyts@users.sourceforge.net>
- * lib/winuser.def (AllowSetForegroundWindow,
- LockSetForegroundWindow): Add stubs.
-
-2002-12-06 Ken Fitlike <kenfitlike@users.sourceforge.net>
-
- * include/commctrl.h (TN_GETDISPINFO[AW]): Add defines and
- UNICODE mappings.
- (tagNMTTDISPINFO[AW]): Replace obsolete struct names
- tagTOOLTIPTEXT[AW] and typedefs. Add defines for backward
- compatability. Add lParam field. Add UNICODE mappings for new
- names.
-
-2002-12-02 Andrew Stadt <acstadt@sympatico.ca>
-
- * include/shellapi.h (_SHFILEOPSTRUCTA,_SHFILEOPSTRUCTW):
- Wrap with pshpack2.h/poppack.h to correct alignment.
-
-2002-12-02 Ken Fitlike <kenfitlike@users.sourceforge.net>
-
- * include/commctrl.h (LVBKIF_*): Add defines.
- (LVM_SETIMAGE[AW]): Add defines and UNICODE mappings.
- (LVM_GETIMAGE[AW]): Add defines and UNICODE mappings.
- (LVBKIMAGE[AW]): Add defines and UNICODE mappings.
- (LPLVBKIMAGE[AW]): Add defines and UNICODE mappings.
- (LVM_GETBKIMAGE[AW]): Add defines and UNICODE mappings.
- (LVM_SETBKIMAGE[AW]): Add defines and UNICODE mappings.
- (ListView_GetBkImage): Add define.
- (ListView_SetBkImage): Add define.
- (LVBKIMAGE): Add structures and typedefs.
-
-2002-11-25 Earnie Boyd <earnie@users.sf.net>
-
- * include/w32api.h: Increment to version 2.2
- * Makefile.in: Ditto.
-
-2002-11-25 Earnie Boyd <earnie@users.sf.net>
-
- * lib/Makefile.in (dist, install): Correct the install destinations.
- * lib/ddk/Makefile.in (dist, install): Ditto.
-
-2002-11-16 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/uuid.c (CATID_InternetAware,CLSID_HttpSProtocol,
- CLSID_PSUrlMonProxy,CLSID_StdURLMoniker,IID_IObjectWithSite,
- IID_IPersistMoniker,IID_IProgressNotify): Correct off-by-one bug
- in definitions.
- (CLSID_CFontPropPage00, GUID_FONTUNDERSCORE11,
- IID_IOleControlSite89): Remove.
-
-2002-11-15 Christopher Faylor <cgf@redhat.com>
-
- * lib/uuid.c (IID_IRunnableObject): Remove duplicate definition.
- (IID_IStdMarshalInfo): Ditto.
-
-2002-11-15 Christopher Faylor <cgf@redhat.com>
-
- * lib/uuid.c (IID_IOleInPlaceSite): Remove duplicate definition.
- (IID_IPersistStorage): Ditto.
-
-2002-11-15 Weiqi Gao <weiqigao@users.sourceforge.net>
-
- * lib/uuid.c (CLSID_PSClassObject, CLSID_PSEnumerators,
- IID_IClassActivator, IID_IClientSecurity, IID_ICreateTypeInfo,
- IID_ICreateTypeLib2, IID_IOleInPlaceSite, IID_IPersistStorage,
- IID_IRunnableObject, IID_IServerSecurity, IID_IStdMarshalInfo):
- Correct definitions.
-
-2002-11-15 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ddk/(atm.h, batclass.h, cfg.h, cfgmgr32.h, d4drvif.h,
- d4iface.h, ddkmapi.h, hidclass.h, hidpi.h, hidusage.h, mcd.h,
- miniport.h, minitape.h, mountdev.h, mountmgr.h, ndis.h,
- ndisquid.h, ndistapi.h, ndisvan.h, netevent.h, netpnp.h,
- netdev.h, ntapi.h, ntdd8042.h, ntddbeep.h, ntddcdrm.h,
- ntddcdvd.h, ntddchgr.h, ntdddisk.h, ntddk.h, ntddkbd.h,
- ntddmou.h, ntddndis.h, ntddpar.h, ntddpcm.h, ntddscsi.h,
- ntddser.h, ntddstor.h, ntddtape.h, ntddtdi.h, ntddvdeo.h,
- ntddvol.h, ntifs.h, ntpoapi.h, ntstatus.h, parallel.h, pfhook.h,
- poclass.h, scsi.h, scsiscan.h, scsiwmi.h, smbus.h, srb.h,
- storport.h, tdi.h, tdiinfo.h, tdikrnl.h, tdistat.h, tvout.h,
- upssvc.h, usb.h, usb100.h, usbcamdi.h, usbdi.h, usbioctl.h,
- usbiodef.h, usbscan.h, usbuser.h, video.h, videoagp.h, win2k.h,
- winddi.h, winddk.h, winnt4.h, winxp.h, ws2san.h,
- xfilter.h): Change comment to refer w32api package, not MinGW.
-
-2002-11-15 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ddk/ntddk.h: Include winnt.h as system header.
-
-2002-11-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ddk/(atm.h, batclass.h, cfg.h, cfgmgr32.h, d4drvif.h,
- d4iface.h, ddkmapi.h, hidclass.h, hidpi.h, hidusage.h, mcd.h,
- miniport.h, minitape.h, mountdev.h, mountmgr.h, ndis.h,
- ndisquid.h, ndistapi.h, ndisvan.h, netevent.h, netpnp.h,
- netdev.h, ntapi.h, ntdd8042.h, ntddbeep.h, ntddcdrm.h,
- ntddcdvd.h, ntddchgr.h, ntdddisk.h, ntddk.h, ntddkbd.h,
- ntddmou.h, ntddndis.h, ntddpar.h, ntddpcm.h, ntddscsi.h,
- ntddser.h, ntddstor.h, ntddtape.h, ntddtdi.h, ntddvdeo.h,
- ntddvol.h, ntifs.h, ntpoapi.h, ntstatus.h, parallel.h, pfhook.h,
- poclass.h, scsi.h, scsiscan.h, scsiwmi.h, smbus.h, srb.h,
- storport.h, tdi.h, tdiinfo.h, tdikrnl.h, tdistat.h, tvout.h,
- upssvc.h, usb.h, usb100.h, usbcamdi.h, usbdi.h, usbioctl.h,
- usbiodef.h, usbscan.h, usbuser.h, video.h, videoagp.h, win2k.h,
- winddi.h, winddk.h, winnt4.h, winxp.h, ws2san.h,
- xfilter.h): Fix typo in disclaimer comment.
-
-2002-11-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/exdisp.h: Include oaidl.h as system header.
-
-2002-11-12 Earnie Boyd <earnie@users.sf.net>
-
- * include/w32api.h (__W32API_VERSION): Fix.
-
-2002-11-09 Weiqi Gao <weiqigao@users.sourceforge.net>
-
- * lib/uuid.c (IID_ICatInformation): Correct definition.
-
-2002-11-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/oleauto.h (DeregisterTypeLib): Remove.
- (UnRegisterTypeLib): Add prototype.
-
-2002-11-07 Christopher January <chris@atomice.net>
-
- * include/winioctl.h: Add definition for IOCTL_DISK_UPDATE_DRIVE_SIZE.
-
-2002-11-04 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (VerSetConditionMask): Add prototype.
- * lib/kernel32.def (VerifyVersionInfo[AW]): Add stubs.
-
-2002-10-16 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winuser.h (MONITORINFOEX[AW]): Add structure
- definitions and ANSI/UNICODE mappings.
- Cleanup whitespace.
-
-2002-10-14 Earnie Boyd <earnie@users.sf.net>
-
- * Makefile.in: Add components for lib/ddk. Adjust for autoconf-2.53.
- * configure.in: Ditto.
- * lib/Makefile.in: Ditto.
- * lib/ddk/Makefile.in: Correct installation procedure. Adjust for
- autoconf-2.53.
- * configure: Regenerate.
-
-2002-10-14 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/windows.h: Don't include basetyps.h.
- * include/objfwd.h: Do include basetyps.h.
-
-2002-10-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/objbase.h: Include rpc.h and rpcndr.h
- before header guard.
-
-2002-10-11 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/olectl.h (PROPPAGEINFO): Change type of
- field cb to ULONG.
-
-2002-10-11 Steven Edwards <Steven_Ed4153@yahoo.com>
-
- * lib/ntdll.def (RtlAcquireResourceExclusive,
- RtlAcquireResourceShared, RtlDeleteResource,
- RtlInitializeResource, RtlReleaseResource,
- RtlTimeToSecondsSince1970) : Added missing exports.
-
-2002-10-08 Heiko Gerdau <hg@technosis.de>
-
- * include/oleacc.h: New file.
- * include/winuser.h (ENDSESSION_LOGOFF) Add define.
- (OBJID_*) Add defines.
- * lib/uuid.c: Add DEFINE_GUID for IID_IAccessible.
- * lib/test.c: Include oleacc.h.
-
-2002-10-06 Casper Hornstrup <chorns@it.dk>
-
- * include/ddk: New subdir.
- * lib/ddk: Ditto.
- * include/ddk/(atm.h, batclass.h, cfg.h, cfgmgr32.h, d4drvif.h,
- d4iface.h, ddkmapi.h, hidclass.h, hidpi.h, hidusage.h, mcd.h,
- miniport.h, minitape.h, mountdev.h, mountmgr.h, ndis.h,
- ndisquid.h, ndistapi.h, ndisvan.h, netevent.h, netpnp.h,
- netdev.h, ntapi.h, ntdd8042.h, ntddbeep.h, ntddcdrm.h,
- ntddcdvd.h, ntddchgr.h, ntdddisk.h, ntddk.h, ntddkbd.h,
- ntddmou.h, ntddndis.h, ntddpar.h, ntddpcm.h, ntddscsi.h,
- ntddser.h, ntddstor.h, ntddtape.h, ntddtdi.h, ntddvdeo.h,
- ntddvol.h, ntifs.h, ntpoapi.h, ntstatus.h, parallel.h, pfhook.h,
- poclass.h, scsi.h, scsiscan.h, scsiwmi.h, smbus.h, srb.h,
- storport.h, tdi.h, tdiinfo.h, tdikrnl.h, tdistat.h, tvout.h,
- upssvc.h, usb.h, usb100.h, usbcamdi.h, usbdi.h, usbioctl.h,
- usbiodef.h, usbscan.h, usbuser.h, video.h, videoagp.h, win2k.h,
- winddi.h, winddk.h, winnt4.h, winxp.h, ws2san.h,
- xfilter.h): New files.
- * lib/ddk/(Makefile.in, apcups.def, cfgmgr32.def, dxapi.def,
- hal.def, hid.def, hidparse.def, mcd.def, ndis.def, ntoskrnl.def,
- scsiport.def, tdi.def, usbcamd.def, usbcamd2.def, videoprt.def,
- win32k.def): Ditto.
-
-2002-10-04 Steven Edwards <Steven_Ed4153@yahoo.com>
-
- * lib/ntdll.def (NtAccessCheck, NtAdjustPrivilegesToken,
- NtCreateKey, NtDeleteKey, NtDeleteValueKey, NtEnumerateKey,
- NtEnumerateValueKey, NtOpenKey, NtOpenProcessToken,
- NtOpenThreadToken, NtQueryInformationToken, NtQueryKey,
- NtQueryValueKey, NtSetSecurityObject, NtSetValueKey,
- RtlAddAccessAllowedAce, RtlCreateAcl,
- RtlCreateSecurityDescriptor, RtlCreateUnicodeStringFromAsciiz,
- RtlGetAce, RtlGetControlSecurityDescriptor,
- RtlGetDaclSecurityDescriptor,RtlGetGroupSecurityDescriptor,
- RtlGetOwnerSecurityDescriptor,RtlGetSaclSecurityDescriptor,
- RtlImpersonateSelf, RtlIsTextUnicode, RtlLargeIntegerAdd,
- RtlLengthSecurityDescriptor, RtlMakeSelfRelativeSD,
- RtlMultiByteToUnicodeN RtlMultiByteToUnicodeSize,
- RtlOpenCurrentUser, RtlSetDaclSecurityDescriptor,
- RtlSetGroupSecurityDescriptor, RtlSetOwnerSecurityDescriptor,
- RtlSetSaclSecurityDescriptor, RtlValidSecurityDescriptor,
- ZwAccessCheck, ZwAdjustPrivilegesToken, ZwCreateKey,
- ZwDeleteValueKey, ZwEnumerateKey, ZwEnumerateValueKey,
- ZwOpenKey, ZwOpenProcessToken, ZwOpenThreadToken,
- ZwQueryInformationToken, ZwQueryKey, ZwQueryValueKey
- ZwSetSecurityObject, ZwSetValueKey): Added missing exports.
-
-2002-10-04 "KJK::Hyperion" <noog@libero.it>
-
- *include/windef.h (WPARAM): Update typedef.
- (LPARAM): Ditto.
- (LRESULT): Ditto.
-
-2002-10-04 "KJK::Hyperion" <noog@libero.it>
-
- * include/shlobj.h (CSIDL_*): Add defines.
-
-2002-09-24 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ws2tcpip.h: Throw error if winsock.h, not winsock2.h
- has been included first.
-
-2002-09-24 René Møller Fonseca <fonseca@users.sourceforge.net>
-
- * include/winbase.h (FindFirstFileEx): Fixed ANSI mode.
- * include/wingdi.h (PFD_SWAP_LAYER_BUFFERS):Added define.
- * include/winuser.h (AppendMenu[AW]): Fixed prototypes.
-
-2002-09-18 Eric R. Krause <ekrause_98@users.sourceforge.net>
-
- * include/winuser.h (DS_SHELLFONT): Define.
-
-2002-09-17 Daniel Schlyder <daniel@dascdev.net>
-
- * include/winnt.h (VER_SUITE_BLADE): Define.
-
-2002-09-17 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/shlobj.h (SHGetSpecialFolderPath[AW]):
- Add _WIN32_IE guard. Correct prototype for wide version.
- (SHGetFolderPath): Add comment on shfolder.dll.
- (SHGetFolderLocation): Add prototyope for WinME and W2K.
- (SHGetFolderPathAndSubDir[AW]): Add prototypes for XP.
-
-2002-09-16 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/shell32.def (SHGetFolderPath[AW]): Add comment.
- * lib/shfolder.def: New file.
-
-2002-09-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winsock.h (timeval): Guard struct and associated
- macros with _TIMEVAL_DEFINED.
- * include/winsock2.h (timeval): Likewise.
-
-2002-09-11 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/shell32.def (SHBindtoParent,SHCreateDirectoryEx[AW],
- SHCreateProcessAsUserW,SHCreateQueryCancelAutoPlayMoniker,
- SHCreateShellItem,SHEmptyRecycleBin[AW],
- SHEnumerateUnreadMailAccountsW,SHExtractIconsW,
- SHGetDataFromIDList[AW],SHGetDiskFreeSpace[AW],
- SHGetDiskFreeSpaceEx[AW],SHGetFolderLocation,
- SHGetFolderPathAndSubDir[AW],SHGetIconOverlayIndex[AW],
- SHGetNewLinkInfo[AW],SHGetSettings,SHGetUnreadMailCountW,
- SHInvokePrinterCommand[AW],SHIsFileAvailableOffline,
- SHLoadNonloadedIconOverlayIdentifiers,
- SHOpenFolderAndSelectItems,SHParseDisplayName,
- SHPathPrepareForWrite[AW],SHQueryRecycleBin[AW],
- SHSetLocalizedName,SHSetUnreadMailCountW,
- SHUpdateRecycleBinIcon: Add missing stubs.
-
-2002-09-07 Earnie Boyd <earnie@users.sf.net>
-
- * include/windef.h (WINVER): Add documentation.
- (_WIN32_WINNT): Ditto.
- Special thanks to Paul Schmidt <paul@tricattechnologies.com>
-
-2002-09-06 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/Makefile.in (TEST_OPTIONS): Define WINVER to 0x0666.
-
-2002-09-04 Kevin Chase <kevincha99@hotmail.com>
-
- * include/winbase.h (AllocateUserPhysicalPages,
- MapUserPhysicalPages, MapUserPhysicalPagesScatter,
- FreeUserPhysicalPages): Add prototypes.
- * lib/kernel32.def: Add function stubs for above.
-
-2002-09-03 René Møller Fonseca <fonseca@users.sourceforge.net>
-
- * include/winuser.h (IDTRYAGAIN,IDCONTINUE): Add defines.
- Add WINVER guards for dialog box command id defines.
-
-2002-09-03 Earnie Boyd <earnie@users.sf.net>
-
- * include/wincon.h (GetConsoleWindow): Add _WIN32_WINNT >= 0x0500 guard.
-
-2002-08-30 Christopher January <ccj00@doc.ic.ac.uk>
-
- * include/wincon.h: Define GetConsoleWindow(void).
-
-2002-08-28 Earnie Boyd <earnie@users.sf.net>
-
- * include/w32api.h: Increment version to 2.1.
- * Makefile.in: Ditto.
-
-2002-08-26 Bart Oldeman <bart.oldeman@btinternet.com>
-
- * include/winsock2.h (SOCKET_ADDRESS): Define if
- __CSADDR_T_DEFINED is not defined (copied from nspapi.h)
- (CSADDR_INFO): Ditto.
- (nspapi.h) : Don't include. Removed FIXME comment.
- * include/nspapi.h (SOCKET_ADDRESS) Only define if
- __CSADDR_T_DEFINED is not defined.
- (CSADDR_INFO): Ditto.
- (BLOB): Add structure and typedef if not already defined.
- (NS_*): Add defines.
- (SERVICE_*): Ditto.
- (SERVICE_ADDRESS): Add structure and typedefs.
- (SERVICE_ADDRESSES): Ditto.
- (SERVICE_INFO[AW]): Ditto, and add UNICODE mappings.
- (LPSERVICE_ASYNC_INFO): Add typedef.
- (SetService[AW], GetAddressByName[AW]): Add prototypes and UNICODE
- mappings.
- * include/wsipx.h: New file.
- * include/svcguid.h: New file.
- * lib/test.c: Include wspix.h and svcguid.h.
-
-2002-08-26 Casper S. Hornstrup <chorns@users.sourceforge.net>
-
- * include/wsahelp.h: New file.
- * lib/test.c: Include wsahelp.h.
-
-2002-08-21 Earnie Boyd <earnie@users.sf.net>
-
- * include/commctrl.h (NMCUSTOMDRAW): Fix lItemlParam.
- Thanks to: "Phil Dempster" <p_dempster@yahoo.co.uk>.
-
-2002-08-20 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ws2spi.h: Modify comment about being part of
- mingw32 package.
- (winsock2.h): Change "" to <>.
-
-2002-08-20 Casper S. Hornstrup <chorns@users.sourceforge.net>
-
- * include/ws2spi.h: New file.
- * lib/test.c: Include ws2spi.h.
-
-2002-08-20 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winsock2.h (WSAIsBlocking,WSAUnhookBlockingHook,
- WSASetBlockingHook,WSACancelBlockingCall): Expose deprecated
- functions.
-
-2002-08-17 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winuser.h (CURSOR_SHOWING) Add define.
- Thanks to: Jan Hlavatý <hlavac@users.sourceforge.net>
-
-2002-08-17 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winerror.h: Cast OLE error codes to HRESULT.
- Thanks to: Gunnar Degnbol <gdegnbol@users.sourceforge.net>
-
-2002-08-15 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wincrypt.h (ALG_*): Add defines.
- (CALG_*): Ditto.
- (CRYPT_*): Ditto.
- (PP_*): Ditto.
- (PROV_*): Ditto.
- (PRIVATEKEYBLOB): Add define.
-
-2002-08-14 Earnie Boyd <earnie@users.sf.net>
-
- * include/shlobj.h (SHGetFolderPath): Add define.
- * lib/shell32.def (SHGetSpecialFolderPath): Add export.
- (SHGetFolderPath): Ditto.
-
-2002-08-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commdlg.h: Don't include COM headers or use
- COM-dependent symbols if __OBJC__.
-
-2002-08-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wincrypt.h (CryptDuplicateHash, CryptDuplicateKey):
- Add prototypes.
-
-2002-08-12 Andriy Palamarchuk <apa3a@yahoo.com>
-
- * include/shellapi.h (FOF_NOERRORUI): Add define.
-
-2002-08-12 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/objidl.h (IEnumMoniker): Put 'interface' back.
-
-2002-08-11 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/objidl.h (IEnumMoniker): Correct declaration.
-
-2002-08-09 Mark Schreiber <mark7@users.sourceforge.net>
-
- * include/wincrypt.h (CRYPT_NOHASHOID): Add define.
-
-2002-08-09 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commctrl.h: Whitespace change.
-
-2002-08-09 Lars Munch <lars@segv.dk>
-
- * include/commctrl.h (tagTVHITTESTINFO): Replace obsolete
- struct name _TVHITTESTINFO and typedefs and add defines for
- backward compatability.
- (ListView_SetExtendedListViewStyleEx): Add macro.
-
-2002-08-05 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wingdi.h (AlphaBlend,GradientFill,TransparentBlt):
- Add prototypes.
- * lib/msimg32.def: New file, with stubs for above.
-
-2002-08-03 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winbase.h (AddAccessAllowedAceEx,AddAccessDeniedAceEx,
- GetFileSizeEx, SetFilePointerEx): Add prototypes.
- (EncryptFile[AW], FileEncryptionStatus[AW]): Add prototypes
- and UNICODE mappings.
-
-2002-08-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winbase.h (ReadFileScatter, WriteFileGather):
- Change second parameter to pointer.
-
-2002-07-31 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wininet.h (InternetReadFileEx[AW]). Add prototypes and
- UNICODE mappings.
- * lib/wininet.def: Regenerate.
-
-2002-07-30 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/windef.h (PVOID): Move typedef to...
- * include/winnt: ...here.
- (PVOID64): New typedef.
-
- * include/winnt,h (FILE_SEGMENT_ELEMENT): Define union.
- * include/winbase.h (ReadFileScatter, WriteFileGather):
- Add prototypes.
-
- * include/winnt,h (PROCESSOR_ARCHITECTURE_*): Add defines.
- (PROCESSOR_INTEL_IA64): Add define.
-
-2002-07-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/oleidl.h (MK_ALT): Define.
-
-2002-07-26 Mattia Barbon <mbarbon@dsi.unive.it>
-
- * include/exdisp.h: New file.
- * include/exdispid.h: New file.
- * include/mshtml.h: New file.
- * lib/test.c: #include exdisp.h and mshtml.h
- * lib/uuid.c (CLSID_WebBrowser, DIID_DWebBrowserEvents,
- DIID_DWebBrowserEvents2, IID_IHTMLDocument, IID_IHTMLDocument2,
- IID_IHTMLElement, IID_IHTMLSelectionObject, IID_IHTMLTxtRange,
- IID_IWebBrowser, IID_IWebBrowser2, IID_IWebBrowserApp):
- New GUIDs.
-
-2002-07-26 Mattia Barbon <mbarbon@dsi.unive.it>
-
- * include/docobj.h: New file.
- * include/idispids.h: New file.
- * include/objidl.h (IID_IMoniker): Declare.
- * include/ocidl.h (READYSTATE): New enum.
- (IOleInPlaceSiteEx): New interface.
- * include/olectlid.h (IID_IEnumSTATSTG): New interface
- identifier.
- * include/oleidl.h (IOleItemContainer, IOleInPlaceObject,
- IOleInPlaceSite): New interfaces.
- * lib/test.c: #include docobj.h,idispids.h,
-
-2002-07-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/shlobj.h (BFFM_VALIDATEFAILED[AW]): Add defines.
- (BFFM_SETSTATUSTEXT, BFFM_SETSELECTION): UNICODE them.
-
-2002-07-25 Mattia Barbon <mbarbon@dsi.unive.it>
-
- * include/commctrl.h: Avoid redefinition of CDN_FIRST/LAST.
- * include/commdlg.h: Likewise.
-
-2002-07-24 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/oleauto.h (V_UNION): Correct definition for case of
- NONAMELESSUNION:
- (V_VT): Likewise.
-
-2002-07-23 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/oleauto.h (V_BOOL): Define in terms of boolVal,
- not bool, for C as well as C++.
-
-2002-07-22 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/shlwapi.h: New file.
- Thanks to: Mattia Barbon <mbarbon@dsi.unive.it> and
- Victor Porton <porton@narod.ru> for contributions.
- * lib/shlwapi.def: New file.
- * lib/test.c: #include shlwapi.h.
-
-2002-07-21 Bart Oldeman <bart.oldeman@btinternet.com>
-
- * include/shlobj.h (FCIDM_MENU_FAVORITES): Remove bogus
- character.
- * include/winsock2.h (struct sockaddr): Use __int64 instead of
- long long.
- * lib/kernel32.c (GetCurrentFiber, GetFiberData): Watcom
- does not need external *Fiber library functions.
-
-2002-07-20 Casper S. Hornstrup <chorns@users.sourceforge.net>
-
- * include/winbase.h (GetEnvironmentStringsA): Remove duplicate
- definition.
- (Interlocked*): Wrap in #ifndef __INTERLOCKED_DECLARED to
- avoid compile error when already defined.
-
-2002-07-20 Steven Edwards <Steven_Ed4153@yahoo.com>
-
- * include/winuser.h (WM_MENURBUTTONUP): Add define.
-
-2002-07-17 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commdlg.h: Define CDN_* notification message constants
- as UINT.
-
-2002-07-17 Mattia Barbon <mbarbon@users.sourceforge.net>
-
- * include/commctrl.h: Define notification message constants for
- NMHDR.code as UINT.
-
-2002-07-17 Bart Oldeman <bart.oldeman@btinternet.com>
-
- * include/ddeml.h (MH_*) Add defines.
- (MONHSZSTRUCT): Add structure and typedefs.
- (MONLINKSTRUCT): Ditto.
- (MONCONVSTRUCT): Ditto.
- (MONCBSTRUCT): Ditto.
- (MONERRSTRUCT): Ditto.
- (MONMSGSTRUCT): Ditto.
- * include/windef.h: Don't define __cdecl or _cdecl for
- __WATCOM__.
- Don't define _export or __export for __WATCOM__.
- * include/windows.h (imm.h): #include.
- * include/winnt.h (LPEXCEPTION_RECORD): Add typedef.
-
-2002-07-17 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wtypes.h: Remove duplicate #includes of rpc.h and
- rpcndr.h.
-
-2002-07-05 Luke Dunstan <infidel@users.sourceforge.net>
-
- * include/winbase.h (OpenThread): Add prototype.
- * lib/kernel32.def (OpenThread): Add symbol.
-
-2002-07-04 Luke Dunstan <infidel@users.sourceforge.net>
-
- * include/wtypes.h (HMETAFILEPICT): Add typedef.
-
-2002-07-04 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/rpc.h: Conditionally include <windows.h> before
- header guard.
- * include/wtypes.h: Include <rpc.h> and <rpcndr.h> before
- header guard.
-
-2002-07-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commctrl.h (WC_*): Remove some duplicate defines.
-
-2002-07-02 Ken Fitlike <kenfitlike@hotmail.com>
-
- * include/commctrl.h (WC_IPADDRESS[AW]): Add defines and
- UNICODE mappings.
- (IPM*): Add defines.
- (IPN_*): Add defines.
- (NMIPADDRESS): Add structure and typedefs.
- (MAKEIPADDRESS): Add macro.
- (MAKEIPRANGE): Add macro.
- (FIRST_IPADDRESS): Add macro.
- (SECOND_IPADDRESS): Add macro.
- (THIRD_IPADDRESS): Add macro.
- (FOURTH_IPADDRESS): Add macro.
-
-2002-06-25 Conrad Scott <conrad.scott@dsl.pipex.com>
-
- * include/winbase.h (FILE_FLAG_FIRST_PIPE_INSTANCE): Add constant.
-
-2002-06-26 Casper S. Hornstrup <chorns@users.sourceforge.net>
-
- * include/winbase.h (WINBASEAPI): Don't define if prior
- definition.
-
- * include/winioctl.h (PARTITION_FAT32, PARTITION_FAT32_XINT13,
- PARTITION_XINT13, PARTITION_XINT13_EXTENDED, PARTITION_LDM,
- PARTITION_UNIX): Add defines.
- (PDRIVE_LAYOUT_INFORMATION): Add typedef.
- (IsRecognizedPartition): Also check for PARTITION_FAT32,
- PARTITION_FAT32_XINT13 and PARTITION_XINT13.
- (IsContainerPartition): Add macro.
-
-2002-06-25 Ken Fitlike <kenfitlike@hotmail.com>
-
- * include/commctrl.h: (CBEIF_*): Add defines.
- (CBEN_*): Add defines and UNICODE mappings
- (WC_COMBOBOXEX[AW]): Add defines and UNICODE mappings.
- (CBEMAXSTRLEN): Add define.
- (COMBOBOXEXITEM[AW]): Add structures and typedefs.
- (NMCOMBOBOXEX[AW]): Add structures and typedefs.
- (NMCBEDRAGBEGIN[AW]): Add structure and typedefs.
- (NMCBEENDEDIT[AW]): Add structure and typedefs.
-
-2002-06-24 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/objidl.h (struct tagPROPVARIANT): Kill obsolete
- union member _VARIANT_BOOL bool.
-
-2002-06-24 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winioctl.h (FILE_SPECIAL_ACCESS): Add define.
-
-2002-06-24 Casper S. Hornstrup <chorns@users.sourceforge.net>
-
- * include/winnt.h (PCCHAR, FCHAR, FSHORT, FLONG,
- PLUID_AND_ATTRIBUTES,PSECURITY_IMPERSONATION_LEVEL,
- PSID_AND_ATTRIBUTES, PTOKEN_TYPE, PTOKEN_STATISTICS):
- Add typedefs.
- (CCHAR): Correct typedef.
- (PROCESS_SET_SESSIONID, SECURITY_*,SECTION_MAP_EXECUTE):
- Add defines.
-
-2002-06-24 Casper S. Hornstrup <chorns@users.sourceforge.net>
-
- * README.w32api: Correct spelling error.
-
-2002-06-19 Casper S. Hornstrup <chorns@users.sourceforge.net>
-
- * include/winuser.h (FLASHW_*,INPUT_MOUSE,INPUT_KEYBOARD,
- INPUT_HARDWARE): Add defines.
- (HDEVNOTIFY): Add typedef.
- (FLASHWINFO,tagMOUSEMOVEPOINT,tagMOUSEINPUT,tagKEYBDINPUT,
- tagHARDWAREINPUT,tagINPUT,tagGUITHREADINFO): Define structs and
- typedefs.
- (CreateDesktop[AW],CreateMDIWindow[AW],GetClassInfo[AW],
- GetClassInfoEx[AW],GetKeyboardLayoutList,
- MessageBoxIndirect[AW],MsgWaitForMultipleObjects,
- MsgWaitForMultipleObjectsEx, RegisterClass[AW],
- RegisterClassEx[AW]): Correct prototypes.
-
-2002-06-19 Casper S. Hornstrup <chorns@users.sourceforge.net>
-
- * include/ddeml.h (DdeCreateStringHandle{AW]:Correct
- prototypes.
- * include/winsvc.h (StartServiceW): Correct prototype.
- * include/winbase.h (BackupRead,BackupSeek,BackupWrite,
- FileTimeToLocalFileTime, GetAce,GetPrivateProfileStruct[AW],
- GetTickCount,InterlockedExchangeAdd,
- WritePrivateProfileStruct[AW]: Correct prototypes.
- (GetEnvironmentStrings): Correct mapping to
- GetEnvironmentStringsA.
- * include/winver.h (VerQueryValueA,VerQueryValueW):
- Correct prototypes.
- * include/wincon.h (CreateConsoleScreenBuffer): Correct
- prototype.
- * include/winreg.h (RegQueryMultipleValues[AW],
- RegQueryValueEx[AW]):Correct prototypes.
- * include/wingdi.h (PXFORM, PLOGBRUSH, PLOGPEN, PPOLYTEXTA,
- PPOLYTEXTW): Add typedefs.
- (_DESIGNVECTOR,COLOR16, _TRIVERTEX, _DISPLAY_DEVICE): Add
- structures and typedefs.
- (MM_MAX_NUMAXES): Add define.
- (EnumFontsW,GetEnhMetaFilePixelFormat,
- wglGetLayerPaletteEntries): Correct prototypes.
- * include/winerror.h (RPC_X_INVALID_PIPE_OBJECT,
- RPC_X_WRONG_PIPE_ORDER,RPC_X_WRONG_PIPE_VERSION,
- RPC_S_SEND_INCOMPLETE): Add defines.
-
-2002-06-17 Casper S. Hornstrup <chorns@users.sourceforge.net>
-
- * include/windef.h (_fastcall, __fastcall, FASTCALL):
- Add defines.
-
-2002-06-16 Egor Duda <deo@logos-m.ru>
-
- * include/ntdll.h: New file.
- * lib/ntdll.def: Add NtShutdownSystem.
-
-2002-06-16 Steven Edwards <Steven_Ed4153@yahoo.com>
-
- * lib/dinput.def (DirectInputCreateEx): Add stub.
- * lib/ntdll.def: New file.
-
-2002-06-14 Earnie Boyd <earnie@users.sf.net>
-
- * include/w32api.h: Change to version 2.0 to reflect the change
- in the license.
- * README: Renamed.
- * README.w32api: Renamed from README. Modified license to remove
- the restriction of notifying the author based on the fact that the
- author is unreachable at the notified address.
- * Makefile.in (VERSION): Change to 2.0.
-
-2002-06-14 Earnie Boyd <earnie@users.sf.net>
-
- * include/wingdi.h (GetEnhMetaFileBits): Correct typo.
- * Makefile.in (bindist): Correct the MinGW distribution.
-
-2002-06-13 Earnie Boyd <earnie@users.sf.net>
-
- * include/winuser.h (MOUSEHOOKSTRUCT): Define structure.
- * include/wingdi.h (GetEnhMetaFileBits): Define prototype.
-
-2002-06-13 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/test.c: #include comcat.h.
-
-2002-06-13 John K. Hohm <jhohm@acm.org>
-
- * include/comcat.h: New file.
-
-2002-06-09 Gunnar Degnbol <gdegnbol@users.sourceforge.net>
-
- * include/richedit.h (EM_*, TM_*, GT_*): Add new defines.
- (GETTEXTEX): Add structure definition.
-
-2002-06-08 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/windows.h (ole2.h): #include if !__OBJC__ and
- __GNUC__ >=3 and !WIN32_LEAN_AND_MEAN.
-
-2002-06-07 Gunnar Degnbol <gdegnbol@users.sourceforge.net>
-
- * include/mapi.h: Change LPTSTR to LPSTR throughout.
-
-2002-06-05 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (PACE_HEADER, PACCESS_ALLOWED_ACE,
- PACCESS_DENIED_ACE): Add typedefs.
-
-2002-06-03 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/thunk32.def (LIBRARY): Change to KERNEL32.dll.
-
-2002-06-03 Steven Edwards <Steven_Ed4153@yahoo.com>
-
- * lib/kernel32.def (ConvertToGlobalHandle): Add stub.
-
-2002-06-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/windef.h: Fix typo in last change.
-
-2002-06-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/windef.h: Add no-op __try, __except, __finally
- defines from ...
- * include/excpt.h: Remove file.
- * include/windows.h: Don't include excpt.h.
-
-2002-05-30 Christopher January <chris@atomice.net>
-
- * include/ntdef.h (ANSI_STRING, PANSI_STRING, OEM_STRING, POEM_STRING):
- Add missing typedefs.
-
-2002-05-28 Earnie Boyd <earnie@users.sf.net>
-
- * include/w32api.h: Increment version to 1.5
- * Makefile.in: Ditto.
-
-
-2002-05-27 René Møller Fonseca <fonseca@users.sourceforge.net>
-
- * include/winreg.h: (RegConnectRegistry[AW]): Replace
- LP[W]STR with LPC[W]STR.
- (REG_QWORD, REG_QWORD_LITTLE_ENDIAN): Add defines.
- Clean up whitespace.
-
-2002-05-27 Rick Rankin <rick_rankin@yahoo.com>
-
- * include/winnls.h: Add #define for LOCALE_RETURN_NUMBER.
-
-2002-05-21 Earnie Boyd <earnie@users.sf.net>
-
- * Makefile.in: Increment VERSION to 1.4.
- (conf_prefix): New variable.
- (bindist): Modify target to use $(conf_prefix).
-
-2002-05-20 Philip Aston <philipa@mail.com>
-
- * include/pbt.h (PBT_APMRESUMESUSPEND): Correct value is 7.
-
-2002-05-20 René Møller Fonseca <fonseca@users.sourceforge.net>
-
- * include/lmaccess.h: (NetAccess*, NetGroup*,
- NetLocalGroup*, NetUser*, NetGet*, INetLogonControl[2],
- NetQueryDisplayInfotmationIndex): Replace LPWSTR with LPCWSTR.
-
-2002-05-08 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commctrl.h (ImageList_DragShowNolock): Remove
- conflicting redeclaration.
-
-2002-05-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/windows.h: Move ANONYMOUS_UNION, _ANONYMOUS_STRUCT,
- STRICT and related defines to ...
- * include/windef.h: Here.
-
-2002-05-03 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winsock2.h (int32): Remove typedef.
- (SERVICETYPE): Add typedef.
- (struct _flowspec):Revise struct definition, Comment
- on types used for members.
-
-2002-05-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (EVENT_*, SEMAPHORE_*,MUTEX_*): Remove
- more defines added in earlier change.
- * lib/Makefile.in (TEST_OPTIONS): Add -Wsystem-headers flag.
-
-2002-05-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (THREAD_PRIORITY_*): Remove defines
- added in last change.
-
-2002-05-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (THREAD_*, EVENT_*, MUTANT_*,
- SEMAPHORE_*, MUTEX_*, TIMER_*): Add new defines.
-
-2002-05-01 Manu B <contact.manu@wanadoo.fr>
-
- * include/commctrl.h (SNDMSG): Define and use throughout
- in other macros instead of SendMessage.
- * include/commdlg.h (SNDMSG): Ditto.
-
-2002-04-22 José Fonseca <jrfonseca@users.sf.net>
-
- * include/GL/gl.h: New file.
- * include/GL/glext.h: Ditto.
- * include/GL/glu.h: Ditto.
-
-2002-04-09 Earnie Boyd <earnie@users.sf.net>
-
- * include/w32api.h: Increment version.
- * Makefile.in: Ditto.
-
-2002-04-09 Earnie Boyd <earnie@users.sf.net>
-
- * Makefile.in (bindist): Use * instead of . for file list for tar
- command.
-
-2002-04-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wtypes.h (enum tagCLSCTX): Change formatting.
-
-2002-04-02 Pat Thoyts <patthoyts@users.sourceforge.net>
-
- * include/objidl.h (IRunningObjectTable.Register): Correct
- prototype.
- * include/wtypes.h (ROTFLAGS_REGISTRATIONKEEPSALIVE,
- ROTFLAGS_ALLOWANYCLIENT): Add defines.
-
-2002-03-31 Victor Porton <porton@narod.ru>
-
- * include/shellapi.h (SHGFI_ATTR_SPECIFIED): Add define.
-
-2002-03-29 David Robinow <drobinow@yahoo.com>
-
- * include/wingdi.h (SetPixelFormat): Correct prototype.
-
-2002-03-29 Phil Krylov <likewolf@users.sourceforge.net>
-
- * include/richedit.h (EM_SHOWSCROLLBAR): Add define.
-
-2002-03-26 Phil Krylov <likewolf@users.sourceforge.net>
-
- * include/richedit.h (EM_GETSCROLLPOS, EM_SETSCROLLPSPOS):
- Add defines.
-
-2002-03-14 Gunnar Degnbol <gdegnbol@users.sourceforge.net>
-
- * include/richedit.h (RICHEDIT_CLASS): UNICODE it.
- * include/shlobj.h (IContextMenu2): Put methods in right order.
- * include/basetyps.h (REFGUID, REFIID, REFCLSID): Check for
- CINTERFACE before defining.
-
-2002-03-09 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/accctrl.h: Add #pragma GCC system_header
- if __GNUC__ >= 3.
- * include/aclapi.h: Same.
- * include/basetsd.h: Same.
- * include/basetyps.h: Same.
- * include/cderr.h: Same.
- * include/cguid.h: Same.
- * include/commctrl.h: Same.
- * include/commdlg.h: Same.
- * include/cpl.h: Same.
- * include/cplext.h: Same.
- * include/custcntl.h: Same.
- * include/dbt.h: Same.
- * include/dde.h: Same.
- * include/ddeml.h: Same.
- * include/dlgs.h: Same.
- * include/excpt.h: Same.
- * include/httpext.h: Same.
- * include/imagehlp.h: Same.
- * include/imm.h: Same.
- * include/initguid.h: Same.
- * include/intshcut.h: Same.
- * include/ipexport.h: Same.
- * include/iphlpapi.h: Same.
- * include/ipifcons.h: Same.
- * include/iprtrmib.h: Same.
- * include/iptypes.h: Same.
- * include/isguids.h: Same.
- * include/largeint.h: Same.
- * include/lm.h: Same.
- * include/lmaccess.h: Same.
- * include/lmalert.h: Same.
- * include/lmapibuf.h: Same.
- * include/lmat.h: Same.
- * include/lmaudit.h: Same.
- * include/lmbrowsr.h: Same.
- * include/lmchdev.h: Same.
- * include/lmconfig.h: Same.
- * include/lmcons.h: Same.
- * include/lmerr.h: Same.
- * include/lmerrlog.h: Same.
- * include/lmmsg.h: Same.
- * include/lmremutl.h: Same.
- * include/lmrepl.h: Same.
- * include/lmserver.h: Same.
- * include/lmshare.h: Same.
- * include/lmsname.h: Same.
- * include/lmstats.h: Same.
- * include/lmsvc.h: Same.
- * include/lmuse.h: Same.
- * include/lmuseflg.h: Same.
- * include/lmwksta.h: Same.
- * include/lzexpand.h: Same.
- * include/mapi.h: Same.
- * include/mciavi.h: Same.
- * include/mcx.h: Same.
- * include/mmsystem.h: Same.
- * include/mswsock.h: Same.
- * include/nb30.h: Same.
- * include/nddeapi.h: Same.
- * include/nspapi.h: Same.
- * include/ntdef.h: Same.
- * include/ntsecapi.h: Same.
- * include/ntsecpkg.h: Same.
- * include/oaidl.h: Same.
- * include/objbase.h: Same.
- * include/objfwd.h: Same.
- * include/objidl.h: Same.
- * include/odbcinst.h: Same.
- * include/ole.h: Same.
- * include/ole2.h: Same.
- * include/ole2ver.h: Same.
- * include/oleauto.h: Same.
- * include/olectl.h: Same.
- * include/olectlid.h: Same.
- * include/oledlg.h: Same.
- * include/oleidl.h: Same.
- * include/pbt.h: Same.
- * include/prsht.h: Same.
- * include/psapi.h: Same.
- * include/rapi.h: Same.
- * include/ras.h: Same.
- * include/raserror.h: Same.
- * include/rassapi.h: Same.
- * include/regstr.h: Same.
- * include/richedit.h: Same.
- * include/richole.h: Same.
- * include/rpc.h: Same.
- * include/rpcdce.h: Same.
- * include/rpcdce2.h: Same.
- * include/rpcdcep.h: Same.
- * include/rpcndr.h: Same.
- * include/rpcnsi.h: Same.
- * include/rpcnsip.h: Same.
- * include/rpcnterr.h: Same.
- * include/rpcproxy.h: Same.
- * include/schannel.h: Same.
- * include/schnlsp.h: Same.
- * include/scrnsave.h: Same.
- * include/security.h: Same.
- * include/setupapi.h: Same.
- * include/shellapi.h: Same.
- * include/shlguid.h: Same.
- * include/shlobj.h: Same.
- * include/sql.h: Same.
- * include/sqlext.h: Same.
- * include/sqltypes.h: Same.
- * include/sqlucode.h: Same.
- * include/sspi.h: Same.
- * include/subauth.h: Same.
- * include/tlhelp32.h: Same.
- * include/unknwn.h: Same.
- * include/userenv.h: Same.
- * include/w32api.h: Same.
- * include/winbase.h: Same.
- * include/wincon.h: Same.
- * include/wincrypt.h: Same.
- * include/windef.h: Same.
- * include/windows.h: Same.
- * include/windowsx.h: Same.
- * include/winerror.h: Same
- * include/wingdi.h: Same.
- * include/wininet.h: Same.
- * include/winioctl.h: Same.
- * include/winnetwk.h: Same.
- * include/winnls.h: Same.
- * include/winnt.h: Same.
- * include/winperf.h: Same.
- * include/winreg.h: Same.
- * include/winresrc.h: Same.
- * include/winsock.h: Same.
- * include/winsock2.h: Same.
- * include/winspool.h: Same.
- * include/winsvc.h: Same.
- * include/winuser.h: Same.
- * include/winver.h: Same.
- * include/ws2tcpip.h: Same.
- * include/wsnetbs.h: Same.
- * include/wtypes.h: Same.
- * include/zmouse.h: Same.
- * include/mapi.h: Change header guard name to _MAPI_H for
- consistency.
-
-2002-03-08 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/accctrl.h (_ACCCTRL_H): Correct typo.
- Remove unnecessary inclusion of <wtypes.h>.
- * ChangeLog: Fix omission of name in recent entries.
-
-2002-03-08 Antony Blakey <antony.blakey@ihug.com.au>
-
- * include/initguid.h (DEFINE_GUID): Add GUID_EXT to define.
-
-2002-03-06 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/mswsock.h: Group winsock2 dependants
- together and protect with #ifdef _WINSOCK2_H.
- * lib/test.c: Only test ws2tcpip.h if winsock2.h
- has been included.
-
-2002-03-05 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/mswsock.h (TP_*): Add new defines.
- (TRANSMIT_PACKETS_ELEMENT): Define new structure.
- (WSAMSG): Likewise.
- (WSACMSGHDR): Likewise.
- (DisconnectEx): Add new prototype.
- (WSARecvMsg): Likewise.
- (WSA_CMSG_*) Add empty macros, guarded by #if 0.
-
-2002-03-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * ChangeLog: Fix typo in last entry.
- * include/winsock2.h (IPPROTO_*): Add IPv6 defines.
- * include/ws2tcpip.h: (IP_*): Add new defines.
- (INET_ADDRSTRLEN, INET6_ADDRSTRLEN): Add defines.
- (NI_*): Add getnameinfo constants and bitmasks.
- (AI_*): Add getaddrinfo flags.
- (EAI_*): Add getaddrinfo error codes.
- (ip_mreq_source): Add new structure.
- (ip_msfilter): Add new structure.
- (IP_MSFILTER_SIZE): Add new macro.
- (in_pktinfo): Add new structure.
- Add preliminary IPv6 support.
- (in6_addr): Add new structure and some defines.
- (sockaddr_in6): Add new structure.
- (in6addr_any, in6addr_loopback): Declare extern structures.
- (IN6ADDR_ANY_INIT,IN6ADDR_LOOPBACK_INIT): Add
- initialization macros for above.
- (IN6_ARE_ADDR_EQUAL): Define macro.
- (IN6_IS_ADDR_*): Define address testing macros.
- (socklen_t) Add new typedef.
- (ipv6_mreq): Add new structure.
- (in6_pktinfo): Same.
- (addrinfo): Same.
- (freeaddrinfo):Add new prototype.
- (getaddrinfo): Same.
- (gai_strerror[AW]): Same.
- (getnameinfo): Same.
- (sockaddr_in6_old): Add structure.
- (sockaddr_gen): Add union definition.
- (INTERFACE_INFO): Use sockaddr_gen as members.
- (INTERFACE_INFO_OLD): Add comment on workaround for problems
- with INTERFACE_INFO on NT4 prior to sp4.
-
-2002-02-28 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/windows.h: Remove test for __W32API_MAJOR_VERSION
- when selecting winsock interface.
- * include/winsock2.h (SOCKET_ADDRESS_LIST): Add structure
- and typedefs. Thanks to: 'Lorenzo' <conte0@infinito.it>.
- Expand FIXME comment.
- (WSACOMPLETIONTYPE): Add enum.
- (WSACOMPLETION): Add structure and typedefs.
- (WSANSPIoctl): Add function prototpe and callback typedef.
- (SIO_NSP_NOTIFY_CHANGE): Add define.
- (sockaddr_storage): Add structure and typedefs.
-
-2002-02-16 Andriy Palamarchuk <apa3a@yahoo.com>
-
- * include/winuser.h (OIC_*): Add resource constants.
-
-2002-02-14 Mattia Barbon <mbarbon@users.sourceforge.net>
-
- * include/ntsecpkg.h: New file.
- * include/schannel.h: New file.
- * include/schnlsp.h: New file.
- * include/security.h: New file.
- * include/sspi.h: New file.
- * include/ntsecapi.h (KERB_WRAP_NO_ENCRYPT,
- MICROSOFT_KERBEROS_NAME_[AW]): Add missing constants
- * include/wincrypt.h (CALG_*, X509_ASN_ENCODING.
- PKCS_7_ASN_ENCODING, CERT_*, USAGE_MATCH_TYPE_AND,
- USAGE_MATCH_TYPE_OR, szOID_*): Add missing constants
- (struct _CRYPTOAPI_BLOB): Add structure and typedefs.
- (SSL_EXTRA_CERT_CHAIN_POLICY_PARA,HTTPSPolicyCallbackData,
- CERT_CHAIN_POLICY_PARA,CERT_CHAIN_POLICY_STATUS,
- CRYPT_ALGORITHM_IDENTIFIER, CRYPT_BIT_BLOB,
- CERT_PUBLIC_KEY_INFO, CERT_EXTENSION, CERT_INFO, CERT_CONTEXT,
- CTL_USAGE, CERT_ENHKEY_USAGE, CERT_USAGE_MATCH,
- CERT_CHAIN_PARA, CERT_CHAIN_FIND_BY_ISSUER_PARA,
- CERT_TRUST_STATUS, CRL_ENTRY, CRL_INFO, CRL_CONTEXT,
- CERT_REVOCATION_CRL_INFO, CERT_REVOCATION_INFO,
- CERT_CHAIN_ELEMENT, CRYPT_ATTRIBUTE, CTL_ENTRY, CTL_INFO,
- CTL_CONTEXT, CERT_TRUST_LIST_INFO, CERT_SIMPLE_CHAIN,
- CERT_CHAIN_CONTEXT): Add missing structures.
- (CertCloseStore, CertGetCertificateChain,
- CertVerifyCertificateChainPolicy, CertFreeCertificateChain,
- CertNameToStr[AW], CertOpenSystemStore[AW], CertOpenStore,
- CertFindCertificateInStore, CertFreeCertificateContext,
- CertGetIssuerCertificateFromStore,
- CertFindChainInStore): Add missing functions.
- (CertNameToStr, CertOpenSystemStore, CERT_FIND_SUBJECT_STR,
- CERT_FIND_ISSUER_STR): Add Unicode mappings.
- * lib/crypt32.def: New file.
- * lib/secur32.def: Add mising stubs.
- * lib/test.c: Include new headers.
-
-2002-02-14 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/windef.h (PROC,FARPROC,NEARPROC): Remove void
- parameter.
-
-2002-01-30 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/test.c: Include mapi.h.
- * include/commctrl.h (TBSTYLE_*): Add missing defines.
- Thanks to: "Ron" <ron@debian.org>
-
-2002-01-30 John Fattaruso <fattaruso@ieee.org>
-
- * include/mapi.h: New file.
- * lib/mapi.def: Add missing function stubs.
-
-2002-01-28 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winuser.h (GetWindowLongPtr[AW],
- SetWindowLongPtr[AW]): Add prototypes for _WIN64.
-
-2002-01-28 Mattia Barbon <mbarbon@users.sourceforge.net>
-
- * include/winuser.h (GWLP_*,DWLP_*): Add missing constants.
- (GetWindowLongPtr[AW], SetWindowLongPtr[AW]): Map them to
- {Get Set}WindowLong[AW], as in Win32 they are equivalent.
- (GetWindowLongPtr, SetWindowLongPtr): Add Unicode mappings.
-
-2002-01-28 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/test.c: Include wsnetbs.h.
-
-2002-01-28 Kai Henningsen <kai-henningsen@users.sourceforge.net>
-
- * include/wsnetbs.h: New file.
-
-2002-01-25 Earnie Boyd <earnie@users.sf.net>
-
- * include/winnt.h: Remove merge conflict.
-
-2002-01-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (_TCHAR): Add typedefs.
-
-2002-01-25 Tim Hughes <tjh@delcam.com>
-
- * include/wininet.h (SECURITY_FLAG_IGNORE_*): Add missing
- defines.
-
-2002-01-25 Andriy Palamarchuk <apa3a@yahoo.com>
-
- * include/winsuser.h (ATF_AVAILABLE, SERKF_ACTIVE):
- Add defines.
- (LPACCESSTIMEOUT): Add typedef.
-
-2002-01-24 Phillip Susi <psusi@cfl.rr.com>
-
- * include/commctrl.h: Add missing HDM_*,HDN_*,LVSICF_* defines.
-
-2002-01-24 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commctrl.h (HDITEM[AW]): Rename _HD_ITEM[AW] to
- _HDITEM[AW], with parallel changes to typedefs. Use defines for
- backward compatability with old names. Update UNICODE mappings.
- (HDLAYOUT): Remove struct _HD_LAYOUT_XP. Use new typedefs
- for struct _HD_LAYOUT and add defines for backward
- compatability with old names.
- (NMLISTVIEW): Rename _NM_LISTVIEW to tagNMLISTVIEW, with
- parallel chages to typedefs. Add defines for backward
- compatability with old names.
- (TCHITTESTINFO, IMAGELISTDRAWPARAMS): Fix _WIN32_IE guard.
-
-2002-01-21 Robert Collins <rbtcollins@hotmail.com>
-
- * include/winnt.h: Add missing MEM_ defines, and convert existing to
- hex for readability.
-
-2002-01-17 Marcus Geelnard <marcus.geelnard@home.se>
-
- * include/winsuser.h (tagKBDLLHOOKSTRUCT): Define struct
- and typedefs.
- (SPI_SETSCREENSAVERRUNNING): Add define.
- (LLKHF_ALTDOWN): Add define.
- * include/wingdi.h (PFD_GENERIC_ACCELERATED,
- PFD_DEPTH_DONTCARE): Add defines.
-
-2002-01-17 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/objbase.h (CoGetObject): Add prototype.
-
-2002-01-14 Timothy J. Wood <tjw@omnigroup.com>
-
- * include/winuser.h (ENUM_CURRENT_SETTINGS,
- ENUM_REGISTRY_SETTINGS): Add defines.
-
-2002-01-14 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (FILE_ATTRIBUTE_ENCRYPTED): Correct constant.
- (FILE_ATTRIBUTE_DEVICE): Add define.
-
-2002-01-14 Corinna Vinschen <vinschen@redhat.com>
-
- * include/winnt.h: Add INVALID_FILE_ATTRIBUTES.
-
-2002-01-11 Danny Smith <dannysmith@users.sourceforge.net>
-
- * ChangeLog: correct date in last entry.
-
-2002-01-11 Timothy J. Wood <tjw@omnigroup.com>
-
- * include/winuser.h (MONITORENUMPROC): Add typedef.
- (EnumDisplayMonitors): Add prototype.
- * lib/user32.def (EnumDisplayMonitors): Add stub.
-
-2002-01-11 Ralf Habacker <Ralf.Habacker@freenet.de>
-
- * include/ntsecapi.h: Fixed missing void parameter type in some
- prototypes.
- * include/objbase.h: Ditto.
- * include/rapi.h: Ditto.
- * include/rpc.h: Ditto.
- * include/rpcdce.h: Ditto.
- * include/rpcdcep.h: Ditto.
- * include/rpcndr.h: Ditto.
- * include/rpcnsip.h: Ditto.
- * include/rpcproxy.h: Ditto.
- * include/windef.h: Ditto.
-
-2002-01-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/vfw32.def (LIBRARY): Change to MSVFW32.DLL.
-
-2002-01-04 TAMURA Kent <tkent@users.sourceforge.net>
-
- * include/wingdi.h (BI_JPEG, BI_PNG, GGO_BEZIER,GGO_UNHINTED,
- LAYOUT_RTL, LAYOUT_BITMAPORIENTATIONPRESERVED): Add defines.
- * include/winuser.h (HWND_MESSAGE, WS_EX_COMPOSITED,
- WS_EX_LAYERED, WS_EX_LAYOUTRTL, WS_EX_NOACTIVATE,
- WS_EX_NOINHERITLAYOUT): Add defines.
- * include/winnt.h (PF_RDTSC_INSTRUCTION_AVAILABLE,
- PF_PAE_ENABLED, MEM_PHYSICAL, MEM_RESET, MEM_TOP_DOWN,
- MEM_WRITE_WATCH): Add defines.
-
-
-2002-01-04 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winbase.h (InitializeCriticalSectionAndSpinCount):
- Add prototype.
- (SetCriticalSectionSpinCount): Likewise.
-
-2001-12-30 Guido Serassio <serassio@libero.it>
-
- * include/winsvc.h: Add EnumServiceStatusEx(),
- QueryServiceStatusEx()
- & RegisterServiceCtrlHandlerEx()
-
-2001-12-21 Robert Collins <rbtcollins@hotmail.com>
-
- * include/wingdi.h: Add GetRandomRgn and SYSRGN.
-
-2001-12-20 Christopher Faylor <cgf@redhat.com>
-
- * lib/Makefile.in: Revert inst_installdir definitions to working
- versions.
-
-2001-12-17 Guido Serassio <serassio@libero.it>
-
- * include/winsvc.h: Add ChangeServiceConfig2() &
- QueryServiceConfig2() definition
-
-2001-12-17 Robert Collins <rbtcollins@hotmail.com>
-
- * include/commctrl.h: New typedefs for HDLAYOUT and LPHDLAYOUT based
- on MSDN documentation for XP.
-
-2001-12-15 Andrew Begel <abegel@eecs.berkeley.edu>
-
- *include/winbase.h (CreateHardLink): Correct typo in UNICODE
- mappings.
-
-2001-12-11 Phillip Susi <psusi@cfl.rr.com>
-
- * include/commctrl.h (ACS_*): Add new defines.
- (PGS_*): Ditto.
- (CBES_*): Ditto.
- (TBSTYLE_*): Ditto.
- (TB_*): Ditto.
- (TTS_*): Ditto.
- (UDS_HOTTRACK): Add define.
- (SBT_TOOLTIPS): Ditto.
- (TBS_*): Add new defines.
- (HDS_*): Ditto.
- (LVS_EX_*) Ditto.
- (LVKF_*): Ditto.
- (TCM_GETEXTENDEDSTYLE): Add define.
- (TVS_NOHSCROLL): Ditto.
- (TVIF_INTEGRAL): Ditto.
- (DTS_SHORTDATECENTURYFORMAT): Ditto.
- (TCS_*): Add new defines.
- (CBEM_*): Add defines.
- (tagNMITEMACTIVATE): Add structure definition and typedefs.
- (tagTVITEMEX[AW]: Ditto.
- (tagTVINSERTSTRUCT[AW]: Add union member.
- * include/winbase.h (VirtualAllocEx): Add prototype.
- * include/winuser.h (SS_*): Add new defines.
-
-2001-12-07 Earnie Boyd <earnie@users.sf.net>
-
- * Makefile.in: Increment VERSION.
- * include/w32api.h: Ditto.
-
-2001-12-07 Earnie Boyd <earnie@users.sf.net>
-
- * Makefile.in: Increment VERSION.
- * include/w32api.h: Ditto.
-
-2001-12-07 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/setupi.h (SetupDiCreateDeviceInterfaceRegKey[AW],
- SetupDiCreateDevRegKey[AW],SetupDiDeleteDeviceInterfaceRegKey,
- SetupDiDeleteDevRegKey,SetupDiOpenClassRegKey,
- SetupDiOpenClassRegKeyEx[AW],SetupDiOpenDeviceInterfaceRegKey,
- SetupDiOpenDevRegKey): Correct function names.
-
-2001-12-04 Earnie Boyd <earnie@users.sf.net>
-
- * include/winuser.h (IDC_STATIC): Don't define.
-
-2001-12-04 Danny Smith <dannysmith@users.sourceforge.net>
-
- Cleanup merge between SourceForge and winsup CVS.
- * include/winbase.h (OSVERSIONINFO[AW], OSVERSIONINFOEX[AW]: Remove
- definitions.
- * include/winnt.h (VER_NT*): Remove duplicate defines.
- (VER_SUITE*): Group with VER_PLATFORM*, VER_NT* defines.
-
-2001-12-03 Earnie Boyd <earnie@users.sf.net>
-
- * include/accctrl.h: Change \r\n to \n.
-
-2001-11-30 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/ipexport.h (IP_UNIDIRECTIONAL_ADAPTER_ADDRESS):
- Add structure definition.
- * include/iptypes.h (IP_PER_ADAPTER_INFO): Ditto.
- * include/iphlpapi.h (AddIPAddress,CreateProxyArpEntry,
- DeleteIPAddress,DeleteProxyArpEntry,EnableRouter,
- FlushIpNetTable,GetAdapterIndex,GetPerAdapterInfo,
- GetUniDirectionalAdapterInfo,SendARP,SetAdapterIpAddress,
- UnenableRouter) Declare functions.
- * lib/iphlpapi.def: Add function names to import lib.
-
-2001-11-24 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (PACCESS_MASK): Add typedef.
- * include/aclapi.h: New file.
- * include/acctrl.h: New file.
- * lib/advapi32.def: Add missing symbols.
- * lib/test.c: Add #include <aclapi.h>.
-
-2001-11-23 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winbase.h (OSVERSIONINFO[AW],VER_PLATFORM_WIN32s,
- VER_PLATFORM_WIN32_WINDOWS,VER_PLATFORM_WIN32_NT): Move from
- here ...
- * include/winnt.h: ... to here.
- * include/winbase.h (VerifyVersionInfo[AW]): Add declaration.
- * include/winnt.h (OSVERSIONINFOEX[AW]): Add structure definitions
- and typedefs.
- (VER_NT_WORKSTATION,VER_NT_DOMAIN_CONTROLLER,VER_NT_SERVER):
- Add defines.
-
-2001-11-19 Pierre Muller <muller@ics.u-strasbg.fr>
-
- * w32api/include/winnt.h: prepare SSE register support.
- (CONTEXT_EXTENDED_REGISTERS): Add new define.
- (MAXIMUM_SUPPORTED_EXTENSION): New define.
- (struct CONTEXT): ExtendedRegisters field added.
-
-2001-11-16 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winuser.h (tagALTTABINFO, tagCOMBOBOXINFO,
- tagCURSORINFO, tagMENUBARINFO, tagMENUINFO, tagMONITORINFO
- tagSCROLLBARINFO, tagTITLEBARINFO. tagWINDOWINFO,
- tagLASTINPUTINFO ): Define new structures.
- (EndMenu, GetAltTabInfo[AW],GetComboBoxInfo,GetCursorInfo,
- GetLastInputInfo, GetListBoxInfo, GetMenuBarInfo,
- GetMonitorInfo[AW], GetScrollBarInfo, GetTitleBarInfo,
- GetWindowInfo, GetWindowModuleFileName[AW],GetMenuInfo
- SetMenuInfo): Add new prototypes.
- * lib/user32.def: Add import stubs for above functions.
-
- * include/winuser.h (IDC_STATIC): Protect against prior
- definition.
-
-2001-11-12 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winbase.h (OSVERSIONINFOEX): Add definition.
- * include/winnt.h: Add VER_NT_* and VER_SUITE_* defines.
-
-2001-11-10 Robert Collins <rbtcollins@hotmail.com>
-
- * include/winnt.h: Add Danny Smith's text comment about gcc compiler
- warnings with _AUTHORITY #defines.
-
-2001-11-09 Robert Collins <rbtcollins@hotmail.com>
-
- * include/winnt.h (GetCurrentFiber): Create a prototype before the
- implementation.
- (GetFiberData): Ditto.
-
-2001-11-09 Robert Collins <rbtcollins@hotmail.com>
-
- * include/winnt.h: Backout last change.
-
-2001-11-08 Robert Collins <rbtcollins@hotmail.com>
-
- * include/winnt.h: Define *_SID_AUTHORITY appropriately,
- GetCurrentFiber: Create a prototype before the implementation.
- GetFiberData: Ditto.
-
-2001-11-06 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winuser.h (IDC_STATIC): Add define.
- Thanks to: Benoit Laniel.
-
-2001-11-05 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commdlg.h: Include <unknwn.h> rather than local
- definition of LPUKNOWN.
- * include/rpcproxy.h: Don't include if ndef CINTERFACE.
- Emit warning.
-
-2001-11-05 Mattia Barbon <mbarbon@dsi.unive.it>
-
- * include/windef.h (DECLSPEC_NORTEURN): Add an empty version
- for Watcom.
- (DECLARE_STDCALL_P): Use it to add __stdcall decoration for
- functions of the form 'type * function(...)' in a way compatible
- with both Watcom and GCC.
- * include/rpcdcep.h (I_RpcAllocate): Use DECLARE_STDCALL_P.
- * include/rpcproxy.h (CInterfaceProxyVtbl): Do not declare
- zero-sized arrays for Watcom. Mark as __extension for __GNUC__.
- * include/windows.h: Watcom can use anonymous structs/unions.
- * include/winnt.h: Watcom can use 64 bit ints.
- (GetCurrentFiber): Add another inline definition using
- Watcom inline assembly syntax.
- (GetFiberData): Likewise.
- * include/winsock.h (inet_ntoa): Use DECLARE_STDCALL_P.
- (gethostbyname): Likewise.
- (gethostbyaddr}: Likewise.
- (getservbyport}: Likewise.
- (getservbyname}: Likewise.
- (getprotobynumber}: Likewise.
- (getprotobyname}: Likewise.
- * include/winsock2.h (inet_ntoa): Use DECLARE_STDCALL_P.
- (gethostbyname}: Likewise.
- (gethostbyaddr}: Likewise.
- (getservbyport}: Likewise.
- (getservbyname}: Likewise.
- (getprotobynumber}: Likewise.
- (getprotobyname}: Likewise.
- * lib/diinut.c: Correction for Watcom.
- * lib/kernel32.c (GetCurrentFiber): Add another definition
- using Watcom inline assembly syntax.
- (GetFiberData): Likewise.
- * lib/scrnsave.c (WinMain): Add break after default:
- clause.
-
-2001-11-04 "stefan" <stefan@lkcc.org>
-
- * include/winnt.h (GetCurrentFiber): Add prototype.
- (GetFiberData): Likewise.
-
-2001-11-04 Christopher Faylor <cgf@redhat.com>
-
- * lib/Makefile.in: Add .NOTPARALLEL target since dlltool cannot run in
- parallel invocations.
-
-2001-11-03 Christopher Faylor <cgf@redhat.com>
-
- * lib/scrnsave.c (WinMain): Trivial change to avoid a compiler warning.
-
-2001-11-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/basetyps.h (DECLARE_INTERFACE): Don't add
- __attribute__((com_interface)) for __GNUC__ >= 3.
-
-2001-11-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commdlg.h (PRINTPAGERANGE): Add structure
- definition.
- (PRINTDLGEX[AW]): Likewise.
- (PrintDlgEx[AW]): Add function declaration.
- * lib/comdlg32.def (PrintDlgEx[AW]): Add function stubs.
- * ChangeLog: Fix typo in last entry.
-
-2001-11-01 TAMURA Kent <tkent@users.sourceforge.net>
-
- * include/objbase.h (CoGetClassObject): Change third parameter
- to COSERVERINFO*.
-
-2001-10-30 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winuser.h (MOUSEEVENTF_WHEEL): Define.
- Thanks to: Kim Saunders.
- * include/oleauto.h: Define VARIANT* flags for VariantChangeType.
- Thanks to: Pat Thoyts.
- * include/winnt.h: Change C++ style comment to C style.
- * include/shlobj.h: Ditto.
- * include/objbase.h (enum tagCOINIT): Remove comma at end of
- list.
- * include/oledlg.h (enum tagOLEUIPASTEFLAG): Ditto.
- * include/oleidl.h (enum tagDROPEFFECT): Mark as __extension__
- (enum not limited to range of int).
- * include/oaidl.h (struct tagVARIANT): Mark as __extension__
- (struct with no named members), ifndef NONAMELESSUNION.
-
-2001-10-30 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winuser.h (CREATESTRUCT): UNICODE it.
- (CBT_CREATEWND): Likewise.
-
-2001-10-20 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winnetwk.h (WNetGetResourceInformationA): Add declaration.
- (WNetGetResourceInformationW): Ditto.
- (WNetGetResourceInformation): Add define.
-
-2001-10-12 Pedro A Aranda <paaguti@hotmail.com>
-
- * include/winuser.h (POINTSTOPOINT): Use explicit casts
- before extracting words.
-
-2001-10-04 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h: Add PF_* defines.
- Thanks to: "Wizord" <wizord@argoslabs.com>
-
-2001-09-18 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (_[U]LARGE_INTEGER): Mark nameless structure
- field as _ANONYMOUS_STRUCT.
- * include/setupapi.h (SP_DEVINSTALL_PARAMS): Add missing typedef
- for UNICODE.
- * include/ipexport.h (icmp_echo_reply): Remove extra ';'.
- * lib/makefile.in: Add -pedantic switch to TEST_OPTIONS for header
- test.
-
-2001-09-17 Mattia Barbon <mbarbon@dsi.unive.it>
-
- * include/commctrl.h: Add some ListView constants.
-
-2001-09-17 Earnie Boyd <earnie@sf.net>
-
- * lib/Makefile.in (inst_includedir): Add FIXME and remove the usr/
- portion of the directory from the install.
- (inst_libdir): Ditto.
- * Makefile.in (VERSION): Increment.
- * include/w32api.h: Increment version.
-
-2001-09-13 Earnie Boyd <earnie@SF.net>
-
- * lib/Makefile.in (inst_includedir): Change to always use w32api
- subdirectory for target == cygwin.
- (inst_libdir): Ditto.
-
-2001-09-13 Earnie Boyd <earnie@SF.net>
-
- * lib/Makefile.in (config_prefix): New variable.
- (inst_includedir): Manipulate special value only if target == cygwin
- and build == target and prefix != config_prefix.
- (inst_libdir): Ditto.
-
-2001-09-12 Earnie Boyd <earnie@SF.net>
-
- * Makefile.in (TARFLAGS): New variable.
- (TARFILEEXT): Ditto.
-
-2001-09-12 Earnie Boyd <earnie@SF.net>
-
- * Makefile.in: Increment version.
- * include/w32api.h: Ditto.
- * lib/Makefile.in: Add usr/ to install directory special for cygwin.
-
-2001-09-11 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (_[U]LARGE_INTEGER): Protect nameless struct with
- !defined(NONAMELESSUNION), rather than defined(_ANONYMOUS_STRUCT).
- (_REPARSE_DATA_BUFFER): Name union field DUMMYUNIONNAME.
-
-2001-09-05 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wininet.h (InternetAutodial): Add prototype.
- (InternetAutodialHangup): Ditto.
- (InternetDial): Ditto.
- (InternetGetConnectedState): Ditto.
- (InternetGoOnline): Ditto.
- (InternetHangUp): Ditto.
- (InternetSetDialState): Ditto.
- Add associated INTERNET_* auto dial flags.
- Guard typedefs and prototypes with #ifndef RC_INVOKED.
-
-2001-09-04 Earnie Boyd <earnie@SF.Net>
-
- * lib/Makefile.in: Move the setting of variable libdir to after the
- setting of exec_prefix since the value of libdir is dependant on it.
-
-Tue Sep 4 14:15:59 2001 Christopher Faylor <cgf@cygnus.com>
-
- * include/winbase.h: Add missing closing parentheses to
- InterlockedExchangePointer declaration.
-
-2001-09-01 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/shlobj.h (CFSTR_* ): Add new defines.
- Thanks to: "Ron" <ron@debian.org> .
- Unicode them.
-
-Sat Sep 1 10:40:37 2001 Christopher Faylor <cgf@cygnus.com>
-
- * include/winnt.h: Use defined(_ANONYMOUS_STRUCT) to determine if
- anonymous structs are available rather than just testing preprocessor
- variable directly.
-
-Fri Aug 31 21:46:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winnt.h: Change definition of `SYSTEM_LUID' to comply
- with new `LARGE_INTEGER' definition.
-
-Thu Aug 30 09:35:51 2001 Christopher Faylor <cgf@cygnus.com>
-
- * include/winsock2.h: Remove "extra token" after #endif.
-
-2001-08-31 Earnie Boyd <earnie@SF.Net>
-
- * config.guess: Remove the \r from the end of line.
- * config.sub: Ditto.
-
-2001-08-30 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h: Allow anonymous struct in [U]LARGE_INTEGER
- if __cplusplus as well as if _ANONYMOUS_STRUCT.
-
-2001-08-29 Earnie Boyd <earnie@SF.Net>
-
- * config.guess: Add the MSYS system.
- * config.sub: Ditto.
- * include/winsock.h: Add the __INSIDE_MSYS__ protections.
- * incldue/winsock2.h: Ditto.
-
-2001-08-29 Eric Kohl <ekohl@users.sourceforge.net>
-
- * include/winnt.h: Allow anonymous (Xxx.LowPart) or
- non-anonymous (Xxx.u.LowPart) access to HighPart and
- LowPart of a LARGE_INTEGER or ULARGE_INTEGER.
-
-2001-08-24 TAMURA Kent <tkent@users.sourceforge.net>
-
- * include/wingdi.h (HANGUL_CHARSET): Add define.
-
-2001-08-21 Earnie Boyd <earnie@SF.Net>
-
- * include/setupapi.h: Formatting.
-
-2001-08-21 Earnie Boyd <earnie@SF.Net>
-
- * include/shlobj.h: Remove \r from the line endings.
-
-2001-08-21 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/setupapi.h : New file.
- * lib/setupapi.def:New file.
- * lib/test.c: Include setupapi.h.
-
-2001-08-21 Danny Smith <dannysmith@users.sourceforge.net>
- * include/winioctl.h (_DISK_PERFORMANCE): Correct typo.
-
-2001-08-21 Mattia Barbon <mbarbon@dsi.unive.it>
-
- * include/richedit.h (ENLINK): Add structure definition.
- (EM_AUTOURLDETECT, EN_LINK, ENM_LINK): Add defines.
-
-2001-08-21 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/shlobj.h (CMIC_*): Remove duplicate defines.
- (CMDSTR_*): Remove duplicates; UNICODE string constants.
- (GCS_*): Make UNICODE.
- (CSIDL_*): Add more defines.
- * include/winioctl.h (_MEDIA_TYPE): Add pointer typedef.
- (_DISK_GEOMETRY): Ditto.
- (_DISK_PERFORMANCE): Ditto.
- * include/winbase.h (HasOverlappedIoCompleted): Add macro.
-
-2001-08-15 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h: Move CHAR, SHORT and LONG typedefs outside
- of block protected by #ifndef VOID.
- (This reverts 1998-12-01 Anders Norlander change.)
- * include/odbcinst.h: End file with newline.
- * include/raserror.h: Ditto.
-
-2001-08-15 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winsock2.h (#include <wtypes.h): Don't.
- (_BLOB): Define instead, if not already done.
- (__BLOB_T_DEFINED: New define for guarding _BLOB.
- * include/wtypes.h (_BLOB): Guard against prior definition.
-
-2001-08-15 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/oaidl.h (tagVARIANT): Mark anonymous structs and unions
- as __extension__.
- (tagTYPEDESC): Ditto.
- (_wireBRECORD): Add structure definition.
- (_wireSAFEARR_BRECORD): Ditto.
- (_wireSAFEARR_HAVEIID): Ditto.
- (_wireSAFEARRAY_UNION.u): Add fields SAFEARR_BRECORD RecordStr,
- SAFEARR_HAVEIID HaveIidStr.
- (tagVariant): Add fields _VARIANT_BOOL bool,*pbool.
- (_wireVARIANT): Change field parray to type wirePSAFEARRAY,
- pparray to wirePSAFEARRAY*.
- (_wireVARIANT): Add field wireBRECORD brecVal.
- (wireVARIANT): Change typedef to struct _wireVariant*.
- (IRecordInfo): Add interface definition.
- (LPRECORDINFO): Add typedef for IRecordInfo*.
- (IID_IRecordInfo): Add forward decalaration.
-
-2001-08-15 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/lmcons.h: Guard CNLEN and UNCLEN against prior definition.
- * include/nddeapi.h: Likewise.
-
-2001-08-10 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/test.c (Win32_Winsock): Replace with __USE_W32_SOCKETS.
- Add more includes of w32api headers.
-
-2001-08-10 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winnt.h (GetCurrentFiber): Change __inline to __inline__.
- Swap asm code with that of GetFiberData.
- (GetFiberData): Ditto.
- * lib/kernel32.c: New file, containing library versions of
- GetCurrentFiber and GetFiberData.
- * lib/makefile.in: Add kernel32.o as static object to libkernal32.a.
-
-2001-08-08 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winuser.h (GET_WHEEL_DELTA_WPARAM): Add macro.
- Thanks to: Harold Hunt <Harold@compasstechnologies.com>.
-
-2001-08-08 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/oleaut32.def: Regenerate.
-
-2001-08-04 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wtypes.h (DECIMAL_SETZERO): Correct typo.
-
-2001-08-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- Apply Dmitry Bely <dbely@mail.ru> patch 437834 (with additions).
- * include/oleidl.h (ISupportErrorInfo, ICreateInfo): Move from here
- * include/oaidl.h: ... to here.
- * include/oaidl.h ICreateErrorInfo): Add interface definition.
- (IErrorInfo::GetGUID): Change arg to GUID.
- (LPSUPPORTERRORINFO): Add typedef.
- (IID_ISupportErrorInfo): Change forward decl. of type to IID.
-
-2001-08-02 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winsock2.h (WSAGET* and WSAMAKE*): Remove duplicate
- defines.
-
-2001-07-30 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commctrl.h (TreeView_SetIndent): Correct typo.
-
-2001-07-30 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commctrl.h (TBSTYPE_FLAT): Remove define.
- Thanks to: Jason Craig <jacraig@softhome.net>
-
-2001-07-30 Mattia Barbon <mbarbon@dsi.unive.it>
-
- * include/commctrl.h (TBBUTTONINFO[AW]): Add struct definitions,
- and UNICODE mappings, if _WIN32_IE >= 0x400.
- (TBIF_* and TB_SETBUTTONINFO): Add defines, if _WIN32_IE >= 0x400.
- (CDIS_*,CDDS_*,CDRF_*) : Add defines.
- (tagNMCUSTOMDRAWINFO): Add struct definition and typedefs.
- (tagNMLVCUSTOMDRAW): Likewise.
- (tagNMTVCUSTOMDRAW): Likewise.
- (tagNMLVCACHEHINT): Likewise.
-
-2001-07-06 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/basetsd.h (#include <_mingw.h>): Remove.
- (__int64): Define.
-
-2001-06-28 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wingdi.h (AC_SRC_OVER): Add define.
- (struct _BLENDFUNCTION): Add.
-
-2001-06-28 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/shlobj.h: Add BIF_* defines.
-
-2001-06-27 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winerror.h (E_PENDING): Add error code define.
-
-2001-06-27 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/basetsd.h (#include <_mingw.h>): Add directive.
-
-2001-06-25 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winbase.h (InterlockedCompareExchange): Change args
- and return value from PVOID to LONG.
- (InterlockedExchange): Change first arg to LPLONG.
- (InterlockedCompareExchangePointer): New macro.
- (InterlockedExchangePointer): New macro.
-
-2001-06-19 Danny Smith <dannysmith@users.sourceforge.net>
-
- * lib/kernel32.def: Add LanguageGroup and UILanguage symbols.
- Thanks to Kevin Chase <kevincha99@hotmail.com>.
-
-2001.06.11 TAMURA Kent <tkent@users.sourceforge.net>
-
- * objidl.h (IMalloc::ReAlloc()): Correct declaration.
- (IMalloc::Free()): Ditto.
-
-2001-06-11 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/shlobj.h (REGSTR_PATH_EXPLORER): Unicode it.
- (REGSTR_PATH_SPECIAL_FOLDERS): Ditto.
- * include/regstr.h (REGSTR_PATH_EXPLORER): Add #ifndef guard.
-
-2001-06-11 Mattia Barbon <mbarbon@dsi.unive.it>
-
- * include/shlobj.h (struct _browseinfo): UNICODE it.
- (SHBrowseForFolder): Ditto.
- (SHGetPathFromIDList): Ditto.
-
-2001.06.11 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/basetsd.h: RC_INVOKED protection and realignment.
- Thanks to: Colin Peters <colinpeters@users.sourceforge.net>
-
-2001.06.06 Earnie Boyd <earnie@users.sourceforge.net>
-
- * Makefile.in (bindist): Reassign value of exec_prefix on make command
- line.
-
-Tue May 22 18:58:27 2001 Christopher Faylor <cgf@cygnus.com>
-
- * lib/mapi32.def: Add MAPISendMail.
-
-2001-05-22 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/w32api.h: Update version.
- * Makefile.in: Ditto.
-
-Thu May 17 23:12:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winnt.h: Define SE_GROUP_LOGON_ID as unsigned to avoid
- compiler warnings.
-
-Thu May 17 17:12:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * include/ntdef.h: Protect definition of OBJECT_ATTRIBUTES against
- previous definition in include/ntsecapi.h.
- * include/ntsecapi.h: Vice versa.
-
-Wed May 16 17:59:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winnt.h: Add defines for group attributes.
- Add define for SYSTEM_LUID.
- Add missing types `PTOKEN_DEFAULT_DACL', `PTOKEN_OWNER' and
- `PTOKEN_PRIMARY_GROUP'.
-
-Tue Apr 24 23:51:07 2001 Christopher Faylor <cgf@cygnus.com>
-
- * lib/Makefile.in: Install libraries in /usr/lib/w32api when building
- for cygwin.
-
-Tue Apr 24 16:18:42 2001 Christopher Faylor <cgf@cygnus.com>
-
- * include/winsock2.h: Protect one *more* newlib defines when compiling
- cygwin.
-
-Mon Apr 23 23:41:36 2001 Christopher Faylor <cgf@cygnus.com>
-
- * include/winsock2.h: Protect some more newlib defines when compiling
- cygwin.
-
-Mon Apr 23 13:17:32 2001 Christopher Faylor <cgf@cygnus.com>
-
- * include/winsock.h: Protect some more newlib defines when compiling
- cygwin.
-
-2001-04-17 Egor Duda <deo@logos-m.ru>
-
- * include/windows.h: Define _ANONYMOUS_STRUCT and _ANONYMOUS_UNION
- as __extenstion__ when appropriate.
- * include/mmsystem.h: Mark anonymous structs and unions as
- __extension__ to prevent compiler warning when invoked with
- -pedantic
- * include/oaidl.h: Ditto.
- * include/objidl.h: Ditto.
- * include/olectl.h: Ditto.
- * include/prsht.h: Ditto.
- * include/shlobj.h: Ditto.
- * include/winbase.h: Ditto.
- * include/winnt.h: Ditto.
- * include/wtypes.h: Ditto.
-
-2001-04-11 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/windows.h (#include <winsock.h>): Include <winsock2.h>
- instead if (_WIN32_WINNT >= 0x0400)&&(__W32API_MAJOR_VERSION > 0).
-
-2001-04-11 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
-
- * include/winuser.h (WM_IME_*): Remove defines (now in imm.h).
-
-2001-04-11 John Fortin <fortinj@attglobal.net>
-
- * include/windef.h (*PBOOL): Unprotect from XFree86Server.
- (*LPBOOL): Ditto.
-
-Sun Apr 8 20:48:01 2001 Christopher Faylor <cgf@cygnus.com>
-
- * include/winnt.h (GetCurrentFiber): Make "external __inline" or asm
- code will be included in every module which includes this header.
- (GetFiberData): Ditto.
-
-2001-04-08 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/winnt.h (GetCurrentFiber): Fix typo.
-
-2001-04-08 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/shellapi.h: (CommandLineToArgvW): Add WINAPI declaration.
- * include/winbase.h: (GetFileAttributesExW): Fix typo.
- * include/wingdi.h: (StartDocA): Change LPDOCINFOA to DOCINFOA*.
- (StartDocB): Chage LNPDOCINFOB to DOCINFOB*.
- Thanks To: Kent Tamura <tkent@users.sourceforge.net>
-
- * include/winnt.h: (GetFiberData): Add __inline assembler coding.
- (GetCurrentFiber): Ditto.
- Thanks to: Andy Younger <AndyY@redlemon.com>
-
- * include/windef.h: (HMONITOR_DECLARED): New definition to stop
- DirectX 8 from complaining.
- Thanks to: Sigbjørn Lund Olsen <mosikos@online.no>
-
-2001-04-08 Michael Soderstrom <ichaelsoderstro@hotmail.com>
-
- * include/commctrl.h Updated TreeView and ListView defines and macros.
-
-2001-04-08 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winuser.h (MB_SERVICE_NOTIFICATION): Correct value for NT4
- and above.
-
-2001-03-30 Earnie Boyd <earnie@users.sourceforge.net>
- * include/winuser.h (VK_KANA): New definition.
- Thanks to: "Harold Hunt" <huntharo@msu.edu>
-
-2001-03-29 Earnie Boyd <earnie@users.sourceforge.net
-
- * include/winuser.h (RT_CURSOR): Add protection for XFree86Server.
- (RT_FONT): Ditto.
- * include/basetsd.h (INT32): Ditto.
- * include/windef.h (ATOM): Ditto.
- (BOOL): Ditto.
- (BYTE): Ditto.
- * include/winbase.h (FreeResource): Ditto.
- Thanks to: "Harold Hunt" <huntharo@msu.edu>
-
-2001-03-20 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/winsock.h (_SYS_TYPES_H macro guard for int types): Remove;
- use only _BSDTYPES_DEFINED macro now defined in newlib sys/types.h.
- (SYS_TYPES_H macro guard for fd_set): Replace with_SYS_TYPES_FD_SET
- macro now defined in newlib sys/types.h. Emit warning if defined.
- * include/winsock2.h: Ditto.
- * include/windows.h (Win32_Winsock): Replace with new macros
- __USE_W32_SOCKETS and warn of deprecation.
-
-2001-03-13 Earnie Boyd <earnie@users.sourceforge.net
-
- * include/wingdi.h: (DOCINFO) Ansi version defined incorrectly.
- Thanks to: Mattia Barbon <mbarbon@dsi.unive.it>
-
-2001-03-12 Earnie Boyd <earnie@users.sourceforge.net
-
- * include/commctrl.h (TBSTYLE_FLAT): New definition.
- (TB_GETBUTTONSIZE): Ditto.
- (TCS_HOTTRACK): Ditto.
- Thanks to: Chris Hansen <popeofpop@softhome.net>
-
-2001-03-01 Earnie Boyd <earnie@users.sourceforge.net
-
- * Makefile.in: (snapshot): Add target.
- * lib/Makefile.in: (install-headers): Use installdir variable.
- (installdir): Set value based on target-alias.
-
-2001-02-21 Earnie Boyd <earnie@users.sourceforge.net
-
- * include/w32api.h: (_W32API_VERSION): Remove.
- (__W32API_VERSION): Add.
- (__W32API_MAJOR_VERSION): Ditto.
- (__W32API_MINOR_VERSION): Ditto.
-
-2001-02-21 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/wingdi.h (struct _DOCINFO[AW]): UNICODE it.
- (StartDoc[AW]): Use UNICODE'd LPDOCINFO[AW]
- * include/winuser.h (struct tagMOUSEKEYS): Define new structure.
- * include/winerror.h (NTE_*): Add CryptoAPI error codes.
-
-2001-02-21 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/mswsock.h: New file.
- * include/ws2tcpip.h: New file.
- * include/winsock.h (IPPROTO_IGMP): New define.
- (IPPROTO_GGP): Correct value.
- (SO_* macros): Remove mswsock defines.
- (TCP_BSDURGENT): Likewise.
- (IP_* macros): Add comment warning of WinSock2 incompatibility
- (WSARecvEx): Remove mswsock prototype.
- (TransmitFile): Likewise.
- (AcceptEx): Likewise.
- (GetAcceptExSockaddrs): Likewise.
- (struct _TRANSMIT_FILE_BUFFERS): Remove mswsock definition.
- (#include <mswsock.h>): Add directive and explanatory comment
- * include/winsock2.h (header guard): add guard for _WINSOCK_H
- (_WINSOCK_H): Define to prevent later inclusion of winsock.h
- (#include <winsock.h>): Replace directive with winsock.h file content
- The following changes apply to the merged file:
- (FD_SET): Keep winsock2.h definition, delete winsock.h definition
- (SOMAXCONN): Likewise
- (#include <nspapi.h>): Move - don't include until LPSOCKADDR defined
- (IP_* macros): Delete WinSock1 definitions (WinSock2 definitions now
- in ws2tcpip.h)
- (struct ip_mreq): Delete (now defined in ws2tcpip.h for WinSock2)
- (FD_*_BIT and FD_* defines): Place together and extend to
- FD_MAX_EVENTS 10
- (AF* defines): Extend to AF_MAX 10
- (WSAIsBlocking): #if 0 out prototype (N/A in WinSock2)
- (WSAUnhookBlockingHook): Likewise.
- (WSASetBlockingHook): Likewise.
- (WSACancelBlockingCall): Likewise.
- (WSAEINPROGRESS): Comment as not raised in WinSock2.
- (#include <mswsock.h>): Delete directive inherited from winsock.h
- (WSA_QOS* defines): Add QualityOfService error codes.
- (SIO_* defines): Add new macros
- * include/ipexport.h (IP_STATUS flags): Add definitions.
- (IP_FLAG_DF): Likewise.
- (IP_OPT_* ): Likewise.
- (struct ip_option_information): Likewise.
- (struct icmp_echo_reply): Likewise.
-
-2001-02-21 Danny Smith <dannysmith@users.sourceforge.net>
-
- * include/commctrl.h: Revert TEXT change.
- * include/lmalert.h: Ditto.
- * include/lmcons.h: Ditto.
- * include/lmsname.h: Ditto.
- * include/lmsvc.h: Ditto.
- * include/ntsecapi.h: Ditto.
- * include/oledlg.h: Ditto.
- * include/ras.h: Ditto.
- * include/regstr.h: Ditto.
- * include/richedit.h: Ditto.
- * include/wininet.h: Ditto.
- * include/winnt.h: Ditto.
-
-2001-02-15 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/commctrl.h: Use _TEXT() instead of TEXT() throughout.
- * include/lmalert.h: Ditto.
- * include/lmcons.h: Ditto.
- * include/lmsname.h: Ditto.
- * include/lmsvc.h: Ditto.
- * include/ntsecapi.h: Ditto.
- * include/oledlg.h: Ditto.
- * include/ras.h: Ditto.
- * include/regstr.h: Ditto.
- * include/richedit.h: Ditto.
- * include/wininet.h: Ditto.
- * include/w32api.h: New File.
-
-Tue Feb 13 22:38:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/shlobj.h: Add missing SLR_* flags.
-
-2001-02-12: Earnie Boyd <earnie@users.sourceforge.net>
-
- * lib/Makefile.in: (host_alias): Add variable.
- (host_build): Ditto:
- (xinstall): Removed
- (xinstall-libraries): Ditto.
- (xinstall-headers): Ditto.
- (xuninstall): Ditto.
- (xuninstall-libraries): Ditto.
- (xuninstall-headers): Ditto.
- * Makefile.in: (host_alias): Add variable.
- (build_alias): Ditto.
-
-Fri Feb 2 13:08:09 2001 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/winnt.h: (__TEXT): Add private macro.
- (_TEXT): Modify definition to use __TEXT.
- (_T): Ditto.
- This change allows the passing of a MACRO as an argument and have that
- MACRO resolved first.
- Thanks to: Eric PAIRE <eric.paire@ri.silicomp.com>
-
-Wed Jan 31 17:35:59 2001 Earnie Boyd <earnie@users.sourceforge.net>
-
- * Makefile.in: Increment VERSION to 0.5
- * include/winnt.h: Change TEXT to _TEXT throughout.
- (SID_RELEASE): Define.
- Thanks to: Eric PAIRE <eric.paire@ri.silicomp.com>
-
-Tue Jan 30 10:42:28 2001 Earnie Boyd <earnie@users.sourceforge.net>
-
- * Apply Phil Krylov patches.
- 2001-01-19 Phil Krylov <phil@mail.ru>
- * include/commctrl.h: (HDI_IMAGE) New definition.
- (HDI_DI_SETITEM) Ditto.
- (HDI_ORDER) Ditto.
- (HDI_FILTER) Ditto.
- (HDF_BITMAP_ON_RIGHT) Ditto.
- (HDF_IMAGE) Ditto.
- (HDM_SETORDERARRAY) Ditto.
- (Header_SetOrderArray) Ditto.
- (ICC_BAR_CLASSES) Ditto.
- (struct _HD_ITEMA) Change definition.
- (struct _HD_ITEMW) Ditto.
- (struct tagINITCOMMONCONTROLSEX) Enclose in _WIN32_IE braces.
- (InitCommonControlsEx()) Ditto.
- 2001-01-23 Phil Krylov <phil@mail.ru>
- * include/richedit.h: Many Richedit 2.0 definitions.
-
-Tue Jan 30 09:56:50 2001 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/winuser.h: (IDC_HAND) New resource identifier.
- Thanks to: Mark Jordon <mark_jordan@ieee.org>
-
-Tue Jan 30 09:35:30 2001 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/iptypes.h: Include <sys/types.h> for time_t declaration.
- Fix typo's.
-
-Tue Jan 30 08:30:33 2001 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/objidl.h: (GetClassID): Argument needs to be a pointer.
- (GetUnmarshalClass): CLSID argument needs to be a pointer.
- Thanks To: <bge@users.sourceforge.net>
-
-Tue Jan 30 07:52:54 2001 Earnie Boyd <earnie@users.sourceforge.net>
-
- * Apply Danny Smith patch 102386
- 2000-11-15 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
- * lib/rasapi32.def: add symbols available in NT4 and W2k
-
-Sun Jan 28 12:47:31 2001 Earnie Boyd <earnie@users.sourceforge.net>
-
- * Apply Danny Smith patch 102382
- 2000-11-15 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
- * lib/mswsock.def: remove leading underscores from symbol names
-
-Sun Jan 28 11:16:39 2001 Earnie Boyd <earnie@users.sourceforge.net>
-
- * Apply Danny Smith patch 102446
- 2000-11-20 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
- * include/sql.h (ODBCVER): change default to 0x0351.
- (SQLSetScrollOptions): non-core function, move prototype to sqlext.h.
- (SQLColAttributes): likewise.
- (SQLBindParam): add prototype for ODBC 3.x function.
- (SQLCloseCursor): likewise.
- (SQLColAttribute): likewise.
- (SQLCopyDesc):likewise.
- (SQLEndTran): likewise.
- (SQLFetchScroll): likewise.
- (SQLGetConnectAttr): likewise.
- (SQLGetDescField): likewise.
- (SQLGetDescRec): likewise.
- (SQLGetDiagField): likewise.
- (SQLGetDiagRec): likewise.
- (SQLGetEnvAttr): likewise.
- (SQLGetStmtAttr): likewise.
- (SQLSetConnectAttr): likewise.
- (SQLSetDescField):likewise.
- (SQLSetDescRec): likewise.
- (SQLSetEnvAttr): likewise.
- (SQLSetStmtAttr): likewise.
- (SQLINTENGER and SQLUINTEGER): replace with SQLLEN and SQLULEN for
- _WIN64 compatability;
- (SQL_ACCESS_MODE): Move define to sqlext.h (used in non-core functions).
- (SQL_ACTIVE_CONNECTIONS): likewise.
- (SQL_ACTIVE_STATEMENTS): likewise.
- (SQL_ALL_EXCEPT_LIKE): likewise.
- (SQL_API_ALL_FUNCTIONS): likewise.
- (SQL_API_LOADBYORDINAL): likewise.
- (SQL_API_SQLBINDPARAMETER): likewise.
- (SQL_API_SQLBROWSECONNECT): likewise.
- (SQL_API_SQLCOLATTRIBUTES): likewise.
- (SQL_API_SQLCOLUMNPRIVILEGES): likewise.
- (SQL_API_SQLDESCRIBEPARAM): likewise.
- (SQL_API_SQLDRIVERCONNECT): likewise.
- (SQL_API_SQLDRIVERS): likewise.
- (SQL_API_SQLEXTENDEDFETCH): likewise.
- (SQL_API_SQLFOREIGNKEYS): likewise.
- (SQL_API_SQLMORERESULTS): likewise.
- (SQL_API_SQLNATIVESQL): likewise.
- (SQL_API_SQLNUMPARAMS): likewise.
- (SQL_API_SQLPARAMOPTIONS): likewise.
- (SQL_API_SQLPRIMARYKEYS): likewise.
- (SQL_API_SQLPROCEDURECOLUMNS): likewise.
- (SQL_API_SQLPROCEDURES): likewise.
- (SQL_API_SQLSETPOS): likewise.
- (SQL_API_SQLSETSCROLLOPTIONS): likewise.
- (SQL_API_SQLTABLEPRIVILEGES): likewise.
- (SQL_ASYNC_ENABLE): likewise.
- (SQL_ASYNC_ENABLE_DEFAULT): likewise.
- (SQL_ASYNC_ENABLE_OFF): likewise.
- (SQL_ASYNC_ENABLE_ON): likewise.
- (SQL_ATTR_READONLY): likewise.
- (SQL_ATTR_READWRITE_UNKNOWN): likewise.
- (SQL_ATTR_WRITE): likewise.
- (SQL_AUTOCOMMIT): likewise.
- (SQL_AUTOCOMMIT_DEFAULT): likewise.
- (SQL_AUTOCOMMIT_OFF): likewise.
- (SQL_AUTOCOMMIT_ON): likewise.
- (SQL_BEST_ROWID): likewise.
- (SQL_BIGINT): likewise.
- (SQL_BINARY): likewise.
- (SQL_BIND_BY_COLUMN): likewise.
- (SQL_BIND_TYPE): likewise.
- (SQL_BIND_TYPE_DEFAULT): likewise.
- (SQL_BIT): likewise.
- (SQL_BOOKMARK_PERSISTENCE): likewise.
- (SQL_BP_CLOSE): likewise.
- (SQL_BP_DELETE): likewise.
- (SQL_BP_DROP): likewise.
- (SQL_BP_OTHER_HSTMT): likewise.
- (SQL_BP_SCROLL): likewise.
- (SQL_BP_TRANSACTION): likewise.
- (SQL_BP_UPDATE): likewise.
- (SQL_C_BINARY): likewise.
- (SQL_C_BIT): likewise.
- (SQL_C_BOOKMARK): likewise.
- (SQL_C_CHAR): likewise.
- (SQL_C_DATE): likewise.
- (SQL_C_DEFAULT): likewise.
- (SQL_C_DOUBLE): likewise.
- (SQL_C_FLOAT): likewise.
- (SQL_C_LONG): likewise.
- (SQL_C_SHORT): likewise.
- (SQL_C_SLONG): likewise.
- (SQL_C_SSHORT): likewise.
- (SQL_C_STINYINT): likewise.
- (SQL_C_TIME): likewise.
- (SQL_C_TIMESTAMP): likewise.
- (SQL_C_TINYINT): likewise.
- (SQL_C_ULONG): likewise.
- (SQL_C_USHORT): likewise.
- (SQL_C_UTINYINT): likewise.
- (SQL_CB_NON_NULL): likewise.
- (SQL_CB_NULL): likewise.
- (SQL_CC_CLOSE): likewise.
- (SQL_CC_DELETE): likewise.
- (SQL_CC_PRESERVE): likewise.
- (SQL_CN_ANY): likewise.
- (SQL_CN_DIFFERENT): likewise.
- (SQL_CN_NONE): likewise.
- (SQL_COLATT_OPT_MAX): likewise.
- (SQL_COLATT_OPT_MIN): likewise.
- (SQL_COLUMN_ALIAS): likewise.
- (SQL_COLUMN_AUTO_INCREMENT): likewise.
- (SQL_COLUMN_CASE_SENSITIVE): likewise.
- (SQL_COLUMN_COUNT): likewise.
- (SQL_COLUMN_DISPLAY_SIZE): likewise.
- (SQL_COLUMN_DRIVER_START): likewise.
- (SQL_COLUMN_LABEL): likewise.
- (SQL_COLUMN_LENGTH): likewise.
- (SQL_COLUMN_MONEY): likewise.
- (SQL_COLUMN_NAME): likewise.
- (SQL_COLUMN_NULLABLE): likewise.
- (SQL_COLUMN_OWNER_NAME): likewise.
- (SQL_COLUMN_PRECISION): likewise.
- (SQL_COLUMN_QUALIFIER_NAME): likewise.
- (SQL_COLUMN_SCALE): likewise.
- (SQL_COLUMN_SEARCHABLE): likewise.
- (SQL_COLUMN_TABLE_NAME): likewise.
- (SQL_COLUMN_TYPE): likewise.
- (SQL_COLUMN_TYPE_NAME): likewise.
- (SQL_COLUMN_UNSIGNED): likewise.
- (SQL_COLUMN_UPDATABLE): likewise.
- (SQL_CONCAT_NULL_BEHAVIOR): likewise.
- (SQL_CONCUR_DEFAULT): likewise.
- (SQL_CONCUR_LOCK): likewise.
- (SQL_CONCUR_READ_ONLY): likewise.
- (SQL_CONCUR_ROWVER): likewise.
- (SQL_CONCUR_TIMESTAMP): likewise.
- (SQL_CONCUR_VALUES): likewise.
- (SQL_CONCURRENCY): likewise.
- (SQL_CONN_OPT_MAX): likewise.
- (SQL_CONN_OPT_MIN): likewise.
- (SQL_CONNECT_OPT_DRVR_START): likewise.
- (SQL_CONVERT_BIGINT): likewise.
- (SQL_CONVERT_BINARY): likewise.
- (SQL_CONVERT_BIT): likewise.
- (SQL_CONVERT_CHAR): likewise.
- (SQL_CONVERT_DATE): likewise.
- (SQL_CONVERT_DECIMAL): likewise.
- (SQL_CONVERT_DOUBLE): likewise.
- (SQL_CONVERT_FLOAT): likewise.
- (SQL_CONVERT_FUNCTIONS): likewise.
- (SQL_CONVERT_INTEGER): likewise.
- (SQL_CONVERT_LONGVARBINARY): likewise.
- (SQL_CONVERT_LONGVARCHAR): likewise.
- (SQL_CONVERT_NUMERIC): likewise.
- (SQL_CONVERT_REAL): likewise.
- (SQL_CONVERT_SMALLINT): likewise.
- (SQL_CONVERT_TIME): likewise.
- (SQL_CONVERT_TIMESTAMP): likewise.
- (SQL_CONVERT_TINYINT): likewise.
- (SQL_CONVERT_VARBINARY): likewise.
- (SQL_CONVERT_VARCHAR): likewise.
- (SQL_CORRELATION_NAME): likewise.
- (SQL_CR_CLOSE): likewise.
- (SQL_CR_DELETE): likewise.
- (SQL_CR_PRESERVE): likewise.
- (SQL_CUR_DEFAULT): likewise.
- (SQL_CUR_USE_DRIVER): likewise.
- (SQL_CUR_USE_IF_NEEDED): likewise.
- (SQL_CUR_USE_ODBC): likewise.
- (SQL_CURRENT_QUALIFIER): likewise.
- (SQL_CURSOR_DYNAMIC): likewise.
- (SQL_CURSOR_FORWARD_ONLY): likewise.
- (SQL_CURSOR_KEYSET_DRIVEN): likewise.
- (SQL_CURSOR_ROLLBACK_BEHAVIOR): likewise.
- (SQL_CURSOR_STATIC): likewise.
- (SQL_CURSOR_TYPE): likewise.
- (SQL_CURSOR_TYPE_DEFAULT): likewise.
- (SQL_CVT_BIGINT): likewise.
- (SQL_CVT_BINARY): likewise.
- (SQL_CVT_BIT): likewise.
- (SQL_CVT_CHAR): likewise.
- (SQL_CVT_DATE): likewise.
- (SQL_CVT_DECIMAL): likewise.
- (SQL_CVT_DOUBLE): likewise.
- (SQL_CVT_FLOAT): likewise.
- (SQL_CVT_INTEGER): likewise.
- (SQL_CVT_LONGVARBINARY): likewise.
- (SQL_CVT_LONGVARCHAR): likewise.
- (SQL_CVT_NUMERIC): likewise.
- (SQL_CVT_REAL): likewise.
- (SQL_CVT_SMALLINT): likewise.
- (SQL_CVT_TIME): likewise.
- (SQL_CVT_TIMESTAMP): likewise.
- (SQL_CVT_TINYINT): likewise.
- (SQL_CVT_VARBINARY): likewise.
- (SQL_CVT_VARCHAR): likewise.
- (SQL_DATABASE_NAME): likewise.
- (SQL_DATE): likewise.
- (SQL_DRIVER_HDBC): likewise.
- (SQL_DRIVER_HENV): likewise.
- (SQL_DRIVER_HLIB): likewise.
- (SQL_DRIVER_HSTMT): likewise.
- (SQL_DRIVER_NAME): likewise.
- (SQL_DRIVER_ODBC_VER): likewise.
- (SQL_DRIVER_VER): likewise.
- (SQL_ENSURE): likewise.
- (SQL_EXPRESSIONS_IN_ORDERBY): likewise.
- (SQL_EXT_API_LAST): likewise.
- (SQL_EXT_API_START): likewise.
- (SQL_FD_FETCH_BOOKMARK): likewise.
- (SQL_FD_FETCH_PREV): likewise.
- (SQL_FD_FETCH_RESUME): likewise.
- (SQL_FETCH_PREV): likewise.
- (SQL_FETCH_RESUME): likewise.
- (SQL_FILE_NOT_SUPPORTED): likewise.
- (SQL_FILE_QUALIFIER): likewise.
- (SQL_FILE_TABLE): likewise.
- (SQL_FILE_USAGE): likewise.
- (SQL_FN_CVT_CONVERT): likewise.
- (SQL_FN_NUM_ABS): likewise.
- (SQL_FN_NUM_ACOS): likewise.
- (SQL_FN_NUM_ASIN): likewise.
- (SQL_FN_NUM_ATAN): likewise.
- (SQL_FN_NUM_ATAN2): likewise.
- (SQL_FN_NUM_CEILING): likewise.
- (SQL_FN_NUM_COS): likewise.
- (SQL_FN_NUM_COT): likewise.
- (SQL_FN_NUM_DEGREES): likewise.
- (SQL_FN_NUM_EXP): likewise.
- (SQL_FN_NUM_FLOOR): likewise.
- (SQL_FN_NUM_LOG): likewise.
- (SQL_FN_NUM_LOG10): likewise.
- (SQL_FN_NUM_MOD): likewise.
- (SQL_FN_NUM_PI): likewise.
- (SQL_FN_NUM_POWER): likewise.
- (SQL_FN_NUM_RADIANS): likewise.
- (SQL_FN_NUM_RAND): likewise.
- (SQL_FN_NUM_ROUND): likewise.
- (SQL_FN_NUM_SIGN): likewise.
- (SQL_FN_NUM_SIN): likewise.
- (SQL_FN_NUM_SQRT): likewise.
- (SQL_FN_NUM_TAN): likewise.
- (SQL_FN_NUM_TRUNCATE): likewise.
- (SQL_FN_STR_ASCII): likewise.
- (SQL_FN_STR_CHAR): likewise.
- (SQL_FN_STR_CONCAT): likewise.
- (SQL_FN_STR_DIFFERENCE): likewise.
- (SQL_FN_STR_INSERT): likewise.
- (SQL_FN_STR_LCASE): likewise.
- (SQL_FN_STR_LEFT): likewise.
- (SQL_FN_STR_LENGTH): likewise.
- (SQL_FN_STR_LOCATE): likewise.
- (SQL_FN_STR_LOCATE_2): likewise.
- (SQL_FN_STR_LTRIM): likewise.
- (SQL_FN_STR_REPEAT): likewise.
- (SQL_FN_STR_REPLACE): likewise.
- (SQL_FN_STR_RIGHT): likewise.
- (SQL_FN_STR_RTRIM): likewise.
- (SQL_FN_STR_SOUNDEX): likewise.
- (SQL_FN_STR_SPACE): likewise.
- (SQL_FN_STR_SUBSTRING): likewise.
- (SQL_FN_STR_UCASE): likewise.
- (SQL_FN_SYS_DBNAME): likewise.
- (SQL_FN_SYS_IFNULL): likewise.
- (SQL_FN_SYS_USERNAME): likewise.
- (SQL_FN_TD_CURDATE): likewise.
- (SQL_FN_TD_CURTIME): likewise.
- (SQL_FN_TD_DAYNAME): likewise.
- (SQL_FN_TD_DAYOFMONTH): likewise.
- (SQL_FN_TD_DAYOFWEEK): likewise.
- (SQL_FN_TD_DAYOFYEAR): likewise.
- (SQL_FN_TD_HOUR): likewise.
- (SQL_FN_TD_MINUTE): likewise.
- (SQL_FN_TD_MONTH): likewise.
- (SQL_FN_TD_MONTHNAME): likewise.
- (SQL_FN_TD_NOW): likewise.
- (SQL_FN_TD_QUARTER): likewise.
- (SQL_FN_TD_SECOND): likewise.
- (SQL_FN_TD_TIMESTAMPadd): likewise.
- (SQL_FN_TD_TIMESTAMPDIFF): likewise.
- (SQL_FN_TD_WEEK): likewise.
- (SQL_FN_TD_YEAR): likewise.
- (SQL_FN_TSI_DAY): likewise.
- (SQL_FN_TSI_FRAC_SECOND): likewise.
- (SQL_FN_TSI_HOUR): likewise.
- (SQL_FN_TSI_MINUTE): likewise.
- (SQL_FN_TSI_MONTH): likewise.
- (SQL_FN_TSI_QUARTER): likewise.
- (SQL_FN_TSI_SECOND): likewise.
- (SQL_FN_TSI_WEEK): likewise.
- (SQL_FN_TSI_YEAR): likewise.
- (SQL_GB_GROUP_BY_CONTAINS_SELECT): likewise.
- (SQL_GB_GROUP_BY_EQUALS_SELECT): likewise.
- (SQL_GB_NO_RELATION): likewise.
- (SQL_GB_NOT_SUPPORTED): likewise.
- (SQL_GD_BLOCK): likewise.
- (SQL_GD_BOUND): likewise.
- (SQL_GET_BOOKMARK): likewise.
- (SQL_GROUP_BY): likewise.
- (SQL_INFO_DRIVER_START): likewise.
- (SQL_INFO_FIRST): likewise.
- (SQL_INFO_LAST): likewise.
- (SQL_INTERVAL_DAY): likewise.
- (SQL_INTERVAL_DAY_TO_HOUR): likewise.
- (SQL_INTERVAL_DAY_TO_MINUTE): likewise.
- (SQL_INTERVAL_DAY_TO_SECOND): likewise.
- (SQL_INTERVAL_HOUR): likewise.
- (SQL_INTERVAL_HOUR_TO_MINUTE): likewise.
- (SQL_INTERVAL_HOUR_TO_SECOND): likewise.
- (SQL_INTERVAL_MINUTE): likewise.
- (SQL_INTERVAL_MINUTE_TO_SECOND): likewise.
- (SQL_INTERVAL_MONTH): likewise.
- (SQL_INTERVAL_SECOND): likewise.
- (SQL_INTERVAL_YEAR): likewise.
- (SQL_INTERVAL_YEAR_TO_MONTH): likewise.
- (SQL_KEYSET_SIZE): likewise.
- (SQL_KEYSET_SIZE_DEFAULT): likewise.
- (SQL_KEYWORDS): likewise.
- (SQL_LCK_EXCLUSIVE): likewise.
- (SQL_LCK_NO_CHANGE): likewise.
- (SQL_LCK_UNLOCK): likewise.
- (SQL_LIKE_ESCAPE_CLAUSE): likewise.
- (SQL_LIKE_ONLY): likewise.
- (SQL_LOCK_TYPES): likewise.
- (SQL_LOGIN_TIMEOUT): likewise.
- (SQL_LOGIN_TIMEOUT_DEFAULT): likewise.
- (SQL_LONGVARBINARY): likewise.
- (SQL_LONGVARCHAR): likewise.
- (SQL_MAX_BINARY_LITERAL_LEN): likewise.
- (SQL_MAX_CHAR_LITERAL_LEN): likewise.
- (SQL_MAX_DSN_LENGTH): likewise.
- (SQL_MAX_LENGTH): likewise.
- (SQL_MAX_LENGTH_DEFAULT): likewise.
- (SQL_MAX_OPTION_STRING_LENGTH): likewise.
- (SQL_MAX_OWNER_NAME_LEN): likewise.
- (SQL_MAX_PROCEDURE_NAME_LEN): likewise.
- (SQL_MAX_QUALIFIER_NAME_LEN): likewise.
- (SQL_MAX_ROW_SIZE_INCLUDES_LONG): likewise.
- (SQL_MAX_ROWS): likewise.
- (SQL_MAX_ROWS_DEFAULT): likewise.
- (SQL_MODE_DEFAULT): likewise.
- (SQL_MODE_READ_ONLY): likewise.
- (SQL_MODE_READ_WRITE): likewise.
- (SQL_MULT_RESULT_SETS): likewise.
- (SQL_MULTIPLE_ACTIVE_TXN): likewise.
- (SQL_NC_END): likewise.
- (SQL_NC_START): likewise.
- (SQL_NEED_LONG_DATA_LEN): likewise.
- (SQL_NNC_NON_NULL): likewise.
- (SQL_NNC_NULL): likewise.
- (SQL_NO_TOTAL): likewise.
- (SQL_NON_NULLABLE_COLUMNS): likewise.
- (SQL_NOSCAN): likewise.
- (SQL_NOSCAN_DEFAULT): likewise.
- (SQL_NOSCAN_OFF): likewise.
- (SQL_NOSCAN_ON): likewise.
- (SQL_NUM_EXTENSIONS): likewise.
- (SQL_NUM_FUNCTIONS): likewise.
- (SQL_NUMERIC_FUNCTIONS): likewise.
- (SQL_OAC_LEVEL1): likewise.
- (SQL_OAC_LEVEL2): likewise.
- (SQL_OAC_NONE): likewise.
- (SQL_ODBC_API_CONFORMANCE): likewise.
- (SQL_ODBC_CURSORS): likewise.
- (SQL_ODBC_KEYWORDS): likewise.
- (SQL_ODBC_SAG_CLI_CONFORMANCE): likewise.
- (SQL_ODBC_SQL_CONFORMANCE): likewise.
- (SQL_ODBC_SQL_OPT_IEF): likewise.
- (SQL_ODBC_VER): likewise.
- (SQL_OPT_TRACE): likewise.
- (SQL_OPT_TRACE_DEFAULT): likewise.
- (SQL_OPT_TRACE_FILE_DEFAULT): likewise.
- (SQL_OPT_TRACE_OFF): likewise.
- (SQL_OPT_TRACE_ON): likewise.
- (SQL_OPT_TRACEFILE): likewise.
- (SQL_OSC_CORE): likewise.
- (SQL_OSC_EXTENDED): likewise.
- (SQL_OSC_MINIMUM): likewise.
- (SQL_OSCC_COMPLIANT): likewise.
- (SQL_OSCC_NOT_COMPLIANT): likewise.
- (SQL_OU_DML_STATEMENTS): likewise.
- (SQL_OU_INDEX_DEFINITION): likewise.
- (SQL_OU_PRIVILEGE_DEFINITION): likewise.
- (SQL_OU_PROCEDURE_INVOCATION): likewise.
- (SQL_OU_TABLE_DEFINITION): likewise.
- (SQL_OUTER_JOINS): likewise.
- (SQL_OWNER_TERM): likewise.
- (SQL_OWNER_USAGE): likewise.
- (SQL_PACKET_SIZE): likewise.
- (SQL_PC_NOT_PSEUDO): likewise.
- (SQL_POS_add): likewise.
- (SQL_POS_DELETE): likewise.
- (SQL_POS_OPERATIONS): likewise.
- (SQL_POS_POSITION): likewise.
- (SQL_POS_REFRESH): likewise.
- (SQL_POS_UPDATE): likewise.
- (SQL_POSITIONED_STATEMENTS): likewise.
- (SQL_PROCEDURE_TERM): likewise.
- (SQL_PROCEDURES): likewise.
- (SQL_PS_POSITIONED_DELETE): likewise.
- (SQL_PS_POSITIONED_UPDATE): likewise.
- (SQL_PS_SELECT_FOR_UPDATE): likewise.
- (SQL_QL_END): likewise.
- (SQL_QL_START): likewise.
- (SQL_QU_DML_STATEMENTS): likewise.
- (SQL_QU_INDEX_DEFINITION): likewise.
- (SQL_QU_PRIVILEGE_DEFINITION): likewise.
- (SQL_QU_PROCEDURE_INVOCATION): likewise.
- (SQL_QU_TABLE_DEFINITION): likewise.
- (SQL_QUALIFIER_LOCATION): likewise.
- (SQL_QUALIFIER_NAME_SEPARATOR): likewise.
- (SQL_QUALIFIER_TERM): likewise.
- (SQL_QUALIFIER_USAGE): likewise.
- (SQL_QUERY_TIMEOUT): likewise.
- (SQL_QUERY_TIMEOUT_DEFAULT): likewise.
- (SQL_QUICK): likewise.
- (SQL_QUIET_MODE): likewise.
- (SQL_QUOTED_IDENTIFIER_CASE): likewise.
- (SQL_RD_DEFAULT): likewise.
- (SQL_RD_OFF): likewise.
- (SQL_RD_ON): likewise.
- (SQL_RETRIEVE_DATA): likewise.
- (SQL_ROW_NUMBER): likewise.
- (SQL_ROW_UPDATES): likewise.
- (SQL_ROWSET_SIZE): likewise.
- (SQL_ROWSET_SIZE_DEFAULT): likewise.
- (SQL_ROWVER): likewise.
- (SQL_SC_NON_UNIQUE): likewise.
- (SQL_SC_TRY_UNIQUE): likewise.
- (SQL_SC_UNIQUE): likewise.
- (SQL_SCCO_OPT_TIMESTAMP): likewise.
- (SQL_SCROLL_DYNAMIC): likewise.
- (SQL_SCROLL_FORWARD_ONLY): likewise.
- (SQL_SCROLL_KEYSET_DRIVEN): likewise.
- (SQL_SCROLL_OPTIONS): likewise.
- (SQL_SCROLL_STATIC): likewise.
- (SQL_SEARCHABLE): likewise.
- (SQL_SIGNED_OFFSET): likewise.
- (SQL_SIMULATE_CURSOR): likewise.
- (SQL_SO_DYNAMIC): likewise.
- (SQL_SO_FORWARD_ONLY): likewise.
- (SQL_SO_KEYSET_DRIVEN): likewise.
- (SQL_SO_MIXED): likewise.
- (SQL_SO_STATIC): likewise.
- (SQL_SPEC_MAJOR): likewise.
- (SQL_SPEC_MINOR): likewise.
- (SQL_SPEC_STRING): likewise.
- (SQL_SQ_COMPARISON): likewise.
- (SQL_SQ_CORRELATED_SUBQUERIES): likewise.
- (SQL_SQ_EXISTS): likewise.
- (SQL_SQ_IN): likewise.
- (SQL_SQ_QUANTIFIED): likewise.
- (SQL_SQLSTATE_SIZE): likewise.
- (SQL_SS_addITIONS): likewise.
- (SQL_SS_DELETIONS): likewise.
- (SQL_SS_UPDATES): likewise.
- (SQL_STATIC_SENSITIVITY): likewise.
- (SQL_STMT_OPT_MAX): likewise.
- (SQL_STMT_OPT_MIN): likewise.
- (SQL_STRING_FUNCTIONS): likewise.
- (SQL_SUBQUERIES): likewise.
- (SQL_SYSTEM_FUNCTIONS): likewise.
- (SQL_TABLE_STAT): likewise.
- (SQL_TABLE_TERM): likewise.
- (SQL_TIME): likewise.
- (SQL_TIMEDATE_add_INTERVALS): likewise.
- (SQL_TIMEDATE_DIFF_INTERVALS): likewise.
- (SQL_TIMEDATE_FUNCTIONS): likewise.
- (SQL_TIMESTAMP): likewise.
- (SQL_TINYINT): likewise.
- (SQL_TRANSLATE_DLL): likewise.
- (SQL_TRANSLATE_OPTION): likewise.
- (SQL_TXN_ISOLATION): likewise.
- (SQL_TXN_VERSIONING): likewise.
- (SQL_TYPE_DRIVER_END): likewise.
- (SQL_TYPE_DRIVER_START): likewise.
- (SQL_TYPE_MAX): likewise.
- (SQL_TYPE_MIN): likewise.
- (SQL_TYPE_NULL): likewise.
- (SQL_U_UNION): likewise.
- (SQL_U_UNION_ALL): likewise.
- (SQL_UB_DEFAULT): likewise.
- (SQL_UB_OFF): likewise.
- (SQL_UB_ON): likewise.
- (SQL_UNICODE): likewise.
- (SQL_UNICODE_CHAR): likewise.
- (SQL_UNICODE_LONGVARCHAR): likewise.
- (SQL_UNICODE_VARCHAR): likewise.
- (SQL_UNION): likewise.
- (SQL_UNSEARCHABLE): likewise.
- (SQL_UNSIGNED_OFFSET): likewise.
- (SQL_USE_BOOKMARKS): likewise.
- (SQL_VARBINARY): likewise.
- (SQL_TRUE): add define for ODBC3.x.
- (SQL_FALSE): likewise.
- (SQL_AM_CONNECTION): likewise.
- (SQL_AM_NONE): likewise.
- (SQL_AM_STATEMENT): likewise.
- (SQL_API_SQLALLOCHANDLE): likewise.
- (SQL_API_SQLBINDPARAM): likewise.
- (SQL_API_SQLCLOSECURSOR): likewise.
- (SQL_API_SQLCOLATTRIBUTE): likewise.
- (SQL_API_SQLCOPYDESC): likewise.
- (SQL_API_SQLENDTRAN): likewise.
- (SQL_API_SQLFETCHSCROLL): likewise.
- (SQL_API_SQLFREEHANDLE): likewise.
- (SQL_API_SQLGETCONNECTATTR): likewise.
- (SQL_API_SQLGETDESCFIELD): likewise.
- (SQL_API_SQLGETDESCREC): likewise.
- (SQL_API_SQLGETDIAGFIELD): likewise.
- (SQL_API_SQLGETDIAGREC): likewise.
- (SQL_API_SQLGETENVATTR): likewise.
- (SQL_API_SQLGETSTMTATTR): likewise.
- (SQL_API_SQLSETCONNECTATTR): likewise.
- (SQL_API_SQLSETDESCFIELD): likewise.
- (SQL_API_SQLSETDESCREC): likewise.
- (SQL_API_SQLSETENVATTR): likewise.
- (SQL_API_SQLSETSTMTATTR): likewise.
- (SQL_ARD_TYPE): likewise.
- (SQL_AT_add_CONSTRAINT): likewise.
- (SQL_ATTR_APP_PARAM_DESC): likewise.
- (SQL_ATTR_APP_ROW_DESC): likewise.
- (SQL_ATTR_AUTO_IPD): likewise.
- (SQL_ATTR_CURSOR_SCROLLABLE): likewise.
- (SQL_ATTR_CURSOR_SENSITIVITY): likewise.
- (SQL_ATTR_IMP_PARAM_DESC): likewise.
- (SQL_ATTR_IMP_ROW_DESC): likewise.
- (SQL_ATTR_METADATA_ID): likewise.
- (SQL_ATTR_OUTPUT_NTS): likewise.
- (SQL_CATALOG_NAME): likewise.
- (SQL_CODE_DATE): likewise.
- (SQL_CODE_TIME): likewise.
- (SQL_CODE_TIMESTAMP): likewise.
- (SQL_COLLATION_SEQ): likewise.
- (SQL_CURSOR_SENSITIVITY): likewise.
- (SQL_DATE_LEN): likewise.
- (SQL_DATETIME): likewise.
- (SQL_DEFAULT): likewise.
- (SQL_DESC_ALLOC_AUTO): likewise.
- (SQL_DESC_ALLOC_TYPE): likewise.
- (SQL_DESC_ALLOC_USER): likewise.
- (SQL_DESC_COUNT): likewise.
- (SQL_DESC_DATA_PTR): likewise.
- (SQL_DESC_DATETIME_INTERVAL_CODE): likewise.
- (SQL_DESC_INDICATOR_PTR): likewise.
- (SQL_DESC_LENGTH): likewise.
- (SQL_DESC_NAME): likewise.
- (SQL_DESC_NULLABLE): likewise.
- (SQL_DESC_OCTET_LENGTH): likewise.
- (SQL_DESC_OCTET_LENGTH_PTR): likewise.
- (SQL_DESC_PRECISION): likewise.
- (SQL_DESC_SCALE): likewise.
- (SQL_DESC_TYPE): likewise.
- (SQL_DESC_UNNAMED): likewise.
- (SQL_DESCRIBE_PARAMETER): likewise.
- (SQL_DIAG_ALTER_DOMAIN): likewise.
- (SQL_DIAG_ALTER_TABLE): likewise.
- (SQL_DIAG_CALL): likewise.
- (SQL_DIAG_CLASS_ORIGIN): likewise.
- (SQL_DIAG_CONNECTION_NAME): likewise.
- (SQL_DIAG_CREATE_ASSERTION): likewise.
- (SQL_DIAG_CREATE_CHARACTER_SET): likewise.
- (SQL_DIAG_CREATE_COLLATION): likewise.
- (SQL_DIAG_CREATE_DOMAIN): likewise.
- (SQL_DIAG_CREATE_INDEX): likewise.
- (SQL_DIAG_CREATE_SCHEMA): likewise.
- (SQL_DIAG_CREATE_TABLE): likewise.
- (SQL_DIAG_CREATE_TRANSLATION): likewise.
- (SQL_DIAG_CREATE_VIEW): likewise.
- (SQL_DIAG_DELETE_WHERE): likewise.
- (SQL_DIAG_DROP_ASSERTION): likewise.
- (SQL_DIAG_DROP_CHARACTER_SET): likewise.
- (SQL_DIAG_DROP_COLLATION): likewise.
- (SQL_DIAG_DROP_DOMAIN): likewise.
- (SQL_DIAG_DROP_INDEX): likewise.
- (SQL_DIAG_DROP_SCHEMA): likewise.
- (SQL_DIAG_DROP_TABLE): likewise.
- (SQL_DIAG_DROP_TRANSLATION): likewise.
- (SQL_DIAG_DROP_VIEW): likewise.
- (SQL_DIAG_DYNAMIC_DELETE_CURSOR): likewise.
- (SQL_DIAG_DYNAMIC_FUNCTION): likewise.
- (SQL_DIAG_DYNAMIC_FUNCTION_CODE): likewise.
- (SQL_DIAG_DYNAMIC_UPDATE_CURSOR): likewise.
- (SQL_DIAG_GRANT): likewise.
- (SQL_DIAG_INSERT): likewise.
- (SQL_DIAG_MESSAGE_TEXT): likewise.
- (SQL_DIAG_NATIVE): likewise.
- (SQL_DIAG_NUMBER): likewise.
- (SQL_DIAG_RETURNCODE): likewise.
- (SQL_DIAG_REVOKE): likewise.
- (SQL_DIAG_ROW_COUNT): likewise.
- (SQL_DIAG_SELECT_CURSOR): likewise.
- (SQL_DIAG_SERVER_NAME): likewise.
- (SQL_DIAG_SQLSTATE): likewise.
- (SQL_DIAG_SUBCLASS_ORIGIN): likewise.
- (SQL_DIAG_UNKNOWN_STATEMENT): likewise.
- (SQL_DIAG_UPDATE_WHERE): likewise.
- (SQL_FALSE): likewise.
- (SQL_FETCH_ABSOLUTE): likewise.
- (SQL_FETCH_LAST): likewise.
- (SQL_FETCH_PRIOR): likewise.
- (SQL_FETCH_RELATIVE): likewise.
- (SQL_HANDLE_DBC): likewise.
- (SQL_HANDLE_DESC): likewise.
- (SQL_HANDLE_ENV): likewise.
- (SQL_HANDLE_STMT): likewise.
- (SQL_INSENSITIVE): likewise.
- (SQL_INTEGRITY): likewise.
- (SQL_MAX_CATALOG_NAME_LEN): likewise.
- (SQL_MAX_CONCURRENT_ACTIVITIES): likewise.
- (SQL_MAX_DRIVER_CONNECTIONS): likewise.
- (SQL_MAX_IDENTIFIER_LEN): likewise.
- (SQL_MAX_SCHEMA_NAME_LEN): likewise.
- (SQL_MAXIMUM_CATALOG_NAME_LENGTH): likewise.
- (SQL_MAXIMUM_COLUMN_NAME_LENGTH): likewise.
- (SQL_MAXIMUM_COLUMNS_IN_GROUP_BY): likewise.
- (SQL_MAXIMUM_COLUMNS_IN_INDEX): likewise.
- (SQL_MAXIMUM_COLUMNS_IN_ORDER_BY): likewise.
- (SQL_MAXIMUM_COLUMNS_IN_SELECT): likewise.
- (SQL_MAXIMUM_CONCURRENT_ACTIVITIES): likewise.
- (SQL_MAXIMUM_CURSOR_NAME_LENGTH): likewise.
- (SQL_MAXIMUM_DRIVER_CONNECTIONS): likewise.
- (SQL_MAXIMUM_IDENTIFIER_LENGTH): likewise.
- (SQL_MAXIMUM_INDEX_SIZE): likewise.
- (SQL_MAXIMUM_ROW_SIZE): likewise.
- (SQL_MAXIMUM_SCHEMA_NAME_LENGTH): likewise.
- (SQL_MAXIMUM_STATEMENT_LENGTH): likewise.
- (SQL_MAXIMUM_TABLES_IN_SELECT): likewise.
- (SQL_MAXIMUM_USER_NAME_LENGTH): likewise.
- (SQL_NAMED): likewise.
- (SQL_NONSCROLLABLE): likewise.
- (SQL_NTSL): likewise.
- (SQL_NULL_HANDLE): likewise.
- (SQL_NULL_HDESC): likewise.
- (SQL_OUTER_JOIN_CAPABILITIES): likewise.
- (SQL_PRED_BASIC): likewise.
- (SQL_PRED_CHAR): likewise.
- (SQL_PRED_NONE): likewise.
- (SQL_ROW_IDENTIFIER): likewise.
- (SQL_SCROLLABLE): likewise.
- (SQL_SENSITIVE): likewise.
- (SQL_SUCCEEDED(rc)): likewise.
- (SQL_TIME_LEN): likewise.
- (SQL_TIMESTAMP_LEN): likewise.
- (SQL_TRANSACTION_CAPABLE): likewise.
- (SQL_TRANSACTION_ISOLATION_OPTION): likewise.
- (SQL_TRANSACTION_READ_COMMITTED): likewise.
- (SQL_TRANSACTION_READ_UNCOMMITTED): likewise.
- (SQL_TRANSACTION_REPEATABLE_READ): likewise.
- (SQL_TRANSACTION_SERIALIZABLE): likewise.
- (SQL_TYPE_DATE): likewise.
- (SQL_TYPE_TIME): likewise.
- (SQL_TYPE_TIMESTAMP): likewise.
- (SQL_UNKNOWN_TYPE): likewise.
- (SQL_UNNAMED): likewise.
- (SQL_UNSPECIFIED): likewise.
- (SQL_XOPEN_CLI_YEAR): likewise.
- (SQLAllocConnect): add comment marking as deperecated.
- (SQLAllocEnv): likewise.
- (SQLAllocStmt): likewise.
- (SQLFreeConnect): likewise.
- (SQLFreeEnv): likewise.
- (SQLGetConnectOption): likewise.
- (SQLGetStmtOption): likewise.
-
- * include/sqlext.h (#include <sqlucode.h>): add directive.
- (SQLSetScrollOptions): non-core function, move prototype from sql.h.
- (SQLColAttributes): likewise.
- (SQLBulkOperations): add function prototype.
- (SQLAllocHandleStd): likewise
- (TraceReturn): add Trace API prototype.
- (TraceVersion): likewise.
- (ODBCGetTryWaitValue):likewise.
- (ODBCSetTryWaitValue): likewise.
- (SQL_LOCK_RECORD): correct function macro.
- (SQL_REFRESH_RECORD): likewise.
- (SQLINTENGER and SQLUINTEGER): replace with SQLLEN and SQLULEN for
- _WIN64 compatability.
- move defines for non-core functions from sql.h to sqlext.h (refer
- changes for sql.h)
- (SQL_ACTIVE_ENVIRONMENTS): new ODBC3.x define
- (SQL_AD_ADD_CONSTRAINT_DEFERRABLE): likewise.
- (SQL_AD_ADD_CONSTRAINT_INITIALLY_DEFERRED): likewise.
- (SQL_AD_ADD_CONSTRAINT_INITIALLY_IMMEDIATE): likewise.
- (SQL_AD_ADD_CONSTRAINT_NON_DEFERRABLE): likewise.
- (SQL_AD_ADD_DOMAIN_CONSTRAINT): likewise.
- (SQL_AD_ADD_DOMAIN_DEFAULT): likewise.
- (SQL_AD_CONSTRAINT_NAME_DEFINITION): likewise.
- (SQL_AD_DROP_DOMAIN_CONSTRAINT): likewise.
- (SQL_AD_DROP_DOMAIN_DEFAULT): likewise.
- (SQL_AF_ALL): likewise.
- (SQL_AF_AVG): likewise.
- (SQL_AF_COUNT): likewise.
- (SQL_AF_DISTINCT): likewise.
- (SQL_AF_MAX): likewise.
- (SQL_AF_MIN): likewise.
- (SQL_AF_SUM): likewise.
- (SQL_AGGREGATE_FUNCTIONS): likewise.
- (SQL_ALL_CATALOGS): likewise.
- (SQL_ALL_SCHEMAS): likewise.
- (SQL_ALL_TABLE_TYPES): likewise.
- (SQL_ALTER_DOMAIN): likewise.
- (SQL_AM_CONNECTION): likewise.
- (SQL_AM_NONE): likewise.
- (SQL_AM_STATEMENT): likewise.
- (SQL_API_ODBC3_ALL_FUNCTIONS): likewise.
- (SQL_API_ODBC3_ALL_FUNCTIONS_SIZE): likewise.
- (SQL_API_SQLALLOCHANDLESTD): likewise.
- (SQL_API_SQLBULKOPERATIONS): likewise.
- (SQL_ASYNC_MODE): likewise.
- (SQL_AT_ADD_COLUMN_COLLATION): likewise.
- (SQL_AT_ADD_COLUMN_DEFAULT): likewise.
- (SQL_AT_ADD_COLUMN_SINGLE): likewise.
- (SQL_AT_ADD_TABLE_CONSTRAINT): likewise.
- (SQL_AT_CONSTRAINT_DEFERRABLE): likewise.
- (SQL_AT_CONSTRAINT_INITIALLY_DEFERRED): likewise.
- (SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE): likewise.
- (SQL_AT_CONSTRAINT_NAME_DEFINITION): likewise.
- (SQL_AT_CONSTRAINT_NON_DEFERRABLE): likewise.
- (SQL_AT_DROP_COLUMN_CASCADE): likewise.
- (SQL_AT_DROP_COLUMN_DEFAULT): likewise.
- (SQL_AT_DROP_COLUMN_RESTRICT): likewise.
- (SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE): likewise.
- (SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT): likewise.
- (SQL_AT_SET_COLUMN_DEFAULT): likewise.
- (SQL_ATTR_ACCESS_MODE): likewise.
- (SQL_ATTR_ASYNC_ENABLE): likewise.
- (SQL_ATTR_AUTOCOMMIT): likewise.
- (SQL_ATTR_CONCURRENCY): likewise.
- (SQL_ATTR_CONNECTION_POOLING): likewise.
- (SQL_ATTR_CONNECTION_TIMEOUT): likewise.
- (SQL_ATTR_CP_MATCH): likewise.
- (SQL_ATTR_CURRENT_CATALOG): likewise.
- (SQL_ATTR_CURSOR_TYPE): likewise.
- (SQL_ATTR_DISCONNECT_BEHAVIOR): likewise.
- (SQL_ATTR_ENABLE_AUTO_IPD): likewise.
- (SQL_ATTR_ENLIST_IN_DTC): likewise.
- (SQL_ATTR_ENLIST_IN_XA): likewise.
- (SQL_ATTR_FETCH_BOOKMARK_PTR): likewise.
- (SQL_ATTR_KEYSET_SIZE): likewise.
- (SQL_ATTR_LOGIN_TIMEOUT): likewise.
- (SQL_ATTR_MAX_LENGTH): likewise.
- (SQL_ATTR_MAX_ROWS): likewise.
- (SQL_ATTR_NOSCAN): likewise.
- (SQL_ATTR_ODBC_CURSORS): likewise.
- (SQL_ATTR_ODBC_VERSION): likewise.
- (SQL_ATTR_PACKET_SIZE): likewise.
- (SQL_ATTR_PARAM_BIND_OFFSET_PTR): likewise.
- (SQL_ATTR_PARAM_BIND_TYPE): likewise.
- (SQL_ATTR_PARAM_OPERATION_PTR): likewise.
- (SQL_ATTR_PARAM_STATUS_PTR): likewise.
- (SQL_ATTR_PARAMS_PROCESSED_PTR): likewise.
- (SQL_ATTR_PARAMSET_SIZE): likewise.
- (SQL_ATTR_QUERY_TIMEOUT): likewise.
- (SQL_ATTR_QUIET_MODE): likewise.
- (SQL_ATTR_RETRIEVE_DATA): likewise.
- (SQL_ATTR_ROW_ARRAY_SIZE): likewise.
- (SQL_ATTR_ROW_BIND_OFFSET_PTR): likewise.
- (SQL_ATTR_ROW_BIND_TYPE): likewise.
- (SQL_ATTR_ROW_NUMBER): likewise.
- (SQL_ATTR_ROW_OPERATION_PTR): likewise.
- (SQL_ATTR_ROW_STATUS_PTR): likewise.
- (SQL_ATTR_ROWS_FETCHED_PTR): likewise.
- (SQL_ATTR_SIMULATE_CURSOR): likewise.
- (SQL_ATTR_TRACE): likewise.
- (SQL_ATTR_TRACEFILE): likewise.
- (SQL_ATTR_TRANSLATE_LIB): likewise.
- (SQL_ATTR_TRANSLATE_OPTION): likewise.
- (SQL_ATTR_TXN_ISOLATION): likewise.
- (SQL_ATTR_USE_BOOKMARKS): likewise.
- (SQL_BATCH_ROW_COUNT): likewise.
- (SQL_BATCH_SUPPORT): likewise.
- (SQL_BRC_EXPLICIT): likewise.
- (SQL_BRC_PROCEDURES): likewise.
- (SQL_BRC_ROLLED_UP): likewise.
- (SQL_BS_ROW_COUNT_EXPLICIT): likewise.
- (SQL_BS_ROW_COUNT_PROC): likewise.
- (SQL_BS_SELECT_EXPLICIT): likewise.
- (SQL_BS_SELECT_PROC): likewise.
- (SQL_C_INTERVAL_DAY): likewise.
- (SQL_C_INTERVAL_DAY_TO_HOUR): likewise.
- (SQL_C_INTERVAL_DAY_TO_MINUTE): likewise.
- (SQL_C_INTERVAL_DAY_TO_SECOND): likewise.
- (SQL_C_INTERVAL_HOUR): likewise.
- (SQL_C_INTERVAL_HOUR_TO_MINUTE): likewise.
- (SQL_C_INTERVAL_HOUR_TO_SECOND): likewise.
- (SQL_C_INTERVAL_MINUTE): likewise.
- (SQL_C_INTERVAL_MINUTE_TO_SECOND): likewise.
- (SQL_C_INTERVAL_MONTH): likewise.
- (SQL_C_INTERVAL_SECOND): likewise.
- (SQL_C_INTERVAL_YEAR): likewise.
- (SQL_C_INTERVAL_YEAR_TO_MONTH): likewise.
- (SQL_C_NUMERIC): likewise.
- (SQL_C_SBIGINT): likewise.
- (SQL_C_TYPE_DATE): likewise.
- (SQL_C_TYPE_TIME): likewise.
- (SQL_C_TYPE_TIMESTAMP): likewise.
- (SQL_C_UBIGINT): likewise.
- (SQL_C_VARBOOKMARK): likewise.
- (SQL_CA_CONSTRAINT_DEFERRABLE): likewise.
- (SQL_CA_CONSTRAINT_INITIALLY_DEFERRED): likewise.
- (SQL_CA_CONSTRAINT_INITIALLY_IMMEDIATE): likewise.
- (SQL_CA_CONSTRAINT_NON_DEFERRABLE): likewise.
- (SQL_CA_CREATE_ASSERTION): likewise.
- (SQL_CA1_ABSOLUTE): likewise.
- (SQL_CA1_BOOKMARK): likewise.
- (SQL_CA1_BULK_ADD): likewise.
- (SQL_CA1_BULK_DELETE_BY_BOOKMARK): likewise.
- (SQL_CA1_BULK_FETCH_BY_BOOKMARK): likewise.
- (SQL_CA1_BULK_UPDATE_BY_BOOKMARK): likewise.
- (SQL_CA1_LOCK_EXCLUSIVE): likewise.
- (SQL_CA1_LOCK_NO_CHANGE): likewise.
- (SQL_CA1_LOCK_UNLOCK): likewise.
- (SQL_CA1_NEXT): likewise.
- (SQL_CA1_POS_DELETE): likewise.
- (SQL_CA1_POS_POSITION): likewise.
- (SQL_CA1_POS_REFRESH): likewise.
- (SQL_CA1_POS_UPDATE): likewise.
- (SQL_CA1_POSITIONED_DELETE): likewise.
- (SQL_CA1_POSITIONED_UPDATE): likewise.
- (SQL_CA1_RELATIVE): likewise.
- (SQL_CA1_SELECT_FOR_UPDATE): likewise.
- (SQL_CA2_CRC_APPROXIMATE): likewise.
- (SQL_CA2_CRC_EXACT): likewise.
- (SQL_CA2_LOCK_CONCURRENCY): likewise.
- (SQL_CA2_MAX_ROWS_AFFECTS_ALL): likewise.
- (SQL_CA2_MAX_ROWS_CATALOG): likewise.
- (SQL_CA2_MAX_ROWS_DELETE): likewise.
- (SQL_CA2_MAX_ROWS_INSERT): likewise.
- (SQL_CA2_MAX_ROWS_SELECT): likewise.
- (SQL_CA2_MAX_ROWS_UPDATE): likewise.
- (SQL_CA2_OPT_ROWVER_CONCURRENCY): likewise.
- (SQL_CA2_OPT_VALUES_CONCURRENCY): likewise.
- (SQL_CA2_READ_ONLY_CONCURRENCY): likewise.
- (SQL_CA2_SENSITIVITY_ADDITIONS): likewise.
- (SQL_CA2_SENSITIVITY_DELETIONS): likewise.
- (SQL_CA2_SENSITIVITY_UPDATES): likewise.
- (SQL_CA2_SIMULATE_NON_UNIQUE): likewise.
- (SQL_CA2_SIMULATE_TRY_UNIQUE): likewise.
- (SQL_CA2_SIMULATE_UNIQUE): likewise.
- (SQL_CATALOG_LOCATION): likewise.
- (SQL_CATALOG_NAME_SEPARATOR): likewise.
- (SQL_CATALOG_TERM): likewise.
- (SQL_CATALOG_USAGE): likewise.
- (SQL_CCOL_CREATE_COLLATION): likewise.
- (SQL_CCS_COLLATE_CLAUSE): likewise.
- (SQL_CCS_CREATE_CHARACTER_SET): likewise.
- (SQL_CCS_LIMITED_COLLATION): likewise.
- (SQL_CDO_COLLATION): likewise.
- (SQL_CDO_CONSTRAINT): likewise.
- (SQL_CDO_CONSTRAINT_DEFERRABLE): likewise.
- (SQL_CDO_CONSTRAINT_INITIALLY_DEFERRED): likewise.
- (SQL_CDO_CONSTRAINT_INITIALLY_IMMEDIATE): likewise.
- (SQL_CDO_CONSTRAINT_NAME_DEFINITION): likewise.
- (SQL_CDO_CONSTRAINT_NON_DEFERRABLE): likewise.
- (SQL_CDO_CREATE_DOMAIN): likewise.
- (SQL_CDO_DEFAULT): likewise.
- (SQL_CL_END): likewise.
- (SQL_CL_START): likewise.
- (SQL_COL_PRED_BASIC): likewise.
- (SQL_COL_PRED_CHAR): likewise.
- (SQL_COLUMN_DRIVER_START): likewise.
- (SQL_COLUMN_IGNORE): likewise.
- (SQL_COLUMN_NUMBER_UNKNOWN): likewise.
- (SQL_CONVERT_GUID): likewise.
- (SQL_CONVERT_INTERVAL_DAY_TIME): likewise.
- (SQL_CONVERT_INTERVAL_YEAR_MONTH): likewise.
- (SQL_CONVERT_WCHAR): likewise.
- (SQL_CONVERT_WLONGVARCHAR): likewise.
- (SQL_CONVERT_WVARCHAR): likewise.
- (SQL_CP_DEFAULT): likewise.
- (SQL_CP_MATCH_DEFAULT): likewise.
- (SQL_CP_OFF): likewise.
- (SQL_CP_ONE_PER_DRIVER): likewise.
- (SQL_CP_ONE_PER_HENV): likewise.
- (SQL_CP_RELAXED_MATCH): likewise.
- (SQL_CP_STRICT_MATCH): likewise.
- (SQL_CREATE_ASSERTION): likewise.
- (SQL_CREATE_CHARACTER_SET): likewise.
- (SQL_CREATE_COLLATION): likewise.
- (SQL_CREATE_DOMAIN): likewise.
- (SQL_CREATE_SCHEMA): likewise.
- (SQL_CREATE_TABLE): likewise.
- (SQL_CREATE_TRANSLATION): likewise.
- (SQL_CREATE_VIEW): likewise.
- (SQL_CS_AUTHORIZATION): likewise.
- (SQL_CS_CREATE_SCHEMA): likewise.
- (SQL_CS_DEFAULT_CHARACTER_SET): likewise.
- (SQL_CT_COLUMN_COLLATION): likewise.
- (SQL_CT_COLUMN_CONSTRAINT): likewise.
- (SQL_CT_COLUMN_DEFAULT): likewise.
- (SQL_CT_COMMIT_DELETE): likewise.
- (SQL_CT_COMMIT_PRESERVE): likewise.
- (SQL_CT_CONSTRAINT_DEFERRABLE): likewise.
- (SQL_CT_CONSTRAINT_INITIALLY_DEFERRED): likewise.
- (SQL_CT_CONSTRAINT_INITIALLY_IMMEDIATE): likewise.
- (SQL_CT_CONSTRAINT_NAME_DEFINITION): likewise.
- (SQL_CT_CONSTRAINT_NON_DEFERRABLE): likewise.
- (SQL_CT_CREATE_TABLE): likewise.
- (SQL_CT_GLOBAL_TEMPORARY): likewise.
- (SQL_CT_LOCAL_TEMPORARY): likewise.
- (SQL_CT_TABLE_CONSTRAINT): likewise.
- (SQL_CTR_CREATE_TRANSLATION): likewise.
- (SQL_CU_DML_STATEMENTS): likewise.
- (SQL_CU_INDEX_DEFINITION): likewise.
- (SQL_CU_PRIVILEGE_DEFINITION): likewise.
- (SQL_CU_PROCEDURE_INVOCATION): likewise.
- (SQL_CU_TABLE_DEFINITION): likewise.
- (SQL_CVT_GUID): likewise.
- (SQL_CVT_INTERVAL_DAY_TIME): likewise.
- (SQL_CVT_INTERVAL_YEAR_MONTH): likewise.
- (SQL_CVT_WCHAR): likewise.
- (SQL_CVT_WLONGVARCHAR): likewise.
- (SQL_CVT_WVARCHAR): likewise.
- (SQL_DA_DROP_ASSERTION): likewise.
- (SQL_DATETIME_LITERALS): likewise.
- (SQL_DB_DEFAULT): likewise.
- (SQL_DB_DISCONNECT): likewise.
- (SQL_DB_RETURN_TO_POOL): likewise.
- (SQL_DC_DROP_COLLATION): likewise.
- (SQL_DCS_DROP_CHARACTER_SET): likewise.
- (SQL_DD_CASCADE): likewise.
- (SQL_DD_DROP_DOMAIN): likewise.
- (SQL_DD_RESTRICT): likewise.
- (SQL_DDL_INDEX): likewise.
- (SQL_DELETE_BY_BOOKMARK): likewise.
- (SQL_DESC_ARRAY_SIZE): likewise.
- (SQL_DESC_ARRAY_STATUS_PTR): likewise.
- (SQL_DESC_AUTO_UNIQUE_VALUE): likewise.
- (SQL_DESC_BASE_COLUMN_NAME): likewise.
- (SQL_DESC_BASE_TABLE_NAME): likewise.
- (SQL_DESC_BIND_OFFSET_PTR): likewise.
- (SQL_DESC_BIND_TYPE): likewise.
- (SQL_DESC_CASE_SENSITIVE): likewise.
- (SQL_DESC_CATALOG_NAME): likewise.
- (SQL_DESC_CONCISE_TYPE): likewise.
- (SQL_DESC_DATETIME_INTERVAL_PRECISION): likewise.
- (SQL_DESC_DISPLAY_SIZE): likewise.
- (SQL_DESC_FIXED_PREC_SCALE): likewise.
- (SQL_DESC_LABEL): likewise.
- (SQL_DESC_LITERAL_PREFIX): likewise.
- (SQL_DESC_LITERAL_SUFFIX): likewise.
- (SQL_DESC_LOCAL_TYPE_NAME): likewise.
- (SQL_DESC_MAXIMUM_SCALE): likewise.
- (SQL_DESC_MINIMUM_SCALE): likewise.
- (SQL_DESC_NUM_PREC_RADIX): likewise.
- (SQL_DESC_PARAMETER_TYPE): likewise.
- (SQL_DESC_ROWS_PROCESSED_PTR): likewise.
- (SQL_DESC_SCHEMA_NAME): likewise.
- (SQL_DESC_SEARCHABLE): likewise.
- (SQL_DESC_TABLE_NAME): likewise.
- (SQL_DESC_TYPE_NAME): likewise.
- (SQL_DESC_UNSIGNED): likewise.
- (SQL_DESC_UPDATABLE): likewise.
- (SQL_DI_CREATE_INDEX): likewise.
- (SQL_DI_DROP_INDEX): likewise.
- (SQL_DIAG_COLUMN_NUMBER): likewise.
- (SQL_DIAG_CURSOR_ROW_COUNT): likewise.
- (SQL_DIAG_ROW_NUMBER): likewise.
- (SQL_DL_SQL92_DATE): likewise.
- (SQL_DL_SQL92_INTERVAL_DAY): likewise.
- (SQL_DL_SQL92_INTERVAL_DAY_TO_HOUR): likewise.
- (SQL_DL_SQL92_INTERVAL_DAY_TO_MINUTE): likewise.
- (SQL_DL_SQL92_INTERVAL_DAY_TO_SECOND): likewise.
- (SQL_DL_SQL92_INTERVAL_HOUR): likewise.
- (SQL_DL_SQL92_INTERVAL_HOUR_TO_MINUTE): likewise.
- (SQL_DL_SQL92_INTERVAL_HOUR_TO_SECOND): likewise.
- (SQL_DL_SQL92_INTERVAL_MINUTE): likewise.
- (SQL_DL_SQL92_INTERVAL_MINUTE_TO_SECOND): likewise.
- (SQL_DL_SQL92_INTERVAL_MONTH): likewise.
- (SQL_DL_SQL92_INTERVAL_SECOND): likewise.
- (SQL_DL_SQL92_INTERVAL_YEAR): likewise.
- (SQL_DL_SQL92_INTERVAL_YEAR_TO_MONTH): likewise.
- (SQL_DL_SQL92_TIME): likewise.
- (SQL_DL_SQL92_TIMESTAMP): likewise.
- (SQL_DM_VER): likewise.
- (SQL_DRIVER_HDESC): likewise.
- (SQL_DROP_ASSERTION): likewise.
- (SQL_DROP_CHARACTER_SET): likewise.
- (SQL_DROP_COLLATION): likewise.
- (SQL_DROP_DOMAIN): likewise.
- (SQL_DROP_SCHEMA): likewise.
- (SQL_DROP_TABLE): likewise.
- (SQL_DROP_TRANSLATION): likewise.
- (SQL_DROP_VIEW): likewise.
- (SQL_DS_CASCADE): likewise.
- (SQL_DS_DROP_SCHEMA): likewise.
- (SQL_DS_RESTRICT): likewise.
- (SQL_DT_CASCADE): likewise.
- (SQL_DT_DROP_TABLE): likewise.
- (SQL_DT_RESTRICT): likewise.
- (SQL_DTC_DONE): likewise.
- (SQL_DTR_DROP_TRANSLATION): likewise.
- (SQL_DV_CASCADE): likewise.
- (SQL_DV_DROP_VIEW): likewise.
- (SQL_DV_RESTRICT): likewise.
- (SQL_DYNAMIC_CURSOR_ATTRIBUTES1): likewise.
- (SQL_DYNAMIC_CURSOR_ATTRIBUTES2): likewise.
- (SQL_EXT_API_LAST): likewise.
- (SQL_EXT_API_START): likewise.
- (SQL_FETCH_BY_BOOKMARK): likewise.
- (SQL_FETCH_FIRST_SYSTEM): likewise.
- (SQL_FETCH_FIRST_USER): likewise.
- (SQL_FN_CVT_CAST): likewise.
- (SQL_FN_STR_BIT_LENGTH): likewise.
- (SQL_FN_STR_CHAR_LENGTH): likewise.
- (SQL_FN_STR_CHARACTER_LENGTH): likewise.
- (SQL_FN_STR_OCTET_LENGTH): likewise.
- (SQL_FN_STR_POSITION): likewise.
- (SQL_FN_TD_CURRENT_DATE): likewise.
- (SQL_FN_TD_CURRENT_TIME): likewise.
- (SQL_FN_TD_CURRENT_TIMESTAMP): likewise.
- (SQL_FN_TD_EXTRACT): likewise.
- (SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1): likewise.
- (SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2): likewise.
- (SQL_FUNC_EXISTS(exists,api)): likewise.
- (SQL_GB_COLLATE): likewise.
- (SQL_HANDLE_SENV): likewise.
- (SQL_IK_ALL): likewise.
- (SQL_IK_ASC): likewise.
- (SQL_IK_DESC): likewise.
- (SQL_IK_NONE): likewise.
- (SQL_INDEX_KEYWORDS): likewise.
- (SQL_INFO_DRIVER_START): likewise.
- (SQL_INFO_LAST): likewise.
- (SQL_INFO_SCHEMA_VIEWS): likewise.
- (SQL_INITIALLY_DEFERRED): likewise.
- (SQL_INITIALLY_IMMEDIATE): likewise.
- (SQL_INSERT_STATEMENT): likewise.
- (SQL_INTERVAL): likewise.
- (SQL_IS_INSERT_LITERALS): likewise.
- (SQL_IS_INSERT_SEARCHED): likewise.
- (SQL_IS_INTEGER): likewise.
- (SQL_IS_POINTER): likewise.
- (SQL_IS_SELECT_INTO): likewise.
- (SQL_IS_SMALLINT): likewise.
- (SQL_IS_UINTEGER): likewise.
- (SQL_IS_USMALLINT): likewise.
- (SQL_ISV_ASSERTIONS): likewise.
- (SQL_ISV_CHARACTER_SETS): likewise.
- (SQL_ISV_CHECK_CONSTRAINTS): likewise.
- (SQL_ISV_COLLATIONS): likewise.
- (SQL_ISV_COLUMN_DOMAIN_USAGE): likewise.
- (SQL_ISV_COLUMN_PRIVILEGES): likewise.
- (SQL_ISV_COLUMNS): likewise.
- (SQL_ISV_CONSTRAINT_COLUMN_USAGE): likewise.
- (SQL_ISV_CONSTRAINT_TABLE_USAGE): likewise.
- (SQL_ISV_DOMAIN_CONSTRAINTS): likewise.
- (SQL_ISV_DOMAINS): likewise.
- (SQL_ISV_KEY_COLUMN_USAGE): likewise.
- (SQL_ISV_REFERENTIAL_CONSTRAINTS): likewise.
- (SQL_ISV_SCHEMATA): likewise.
- (SQL_ISV_SQL_LANGUAGES): likewise.
- (SQL_ISV_TABLE_CONSTRAINTS): likewise.
- (SQL_ISV_TABLE_PRIVILEGES): likewise.
- (SQL_ISV_TABLES): likewise.
- (SQL_ISV_TRANSLATIONS): likewise.
- (SQL_ISV_USAGE_PRIVILEGES): likewise.
- (SQL_ISV_VIEW_COLUMN_USAGE): likewise.
- (SQL_ISV_VIEW_TABLE_USAGE): likewise.
- (SQL_ISV_VIEWS): likewise.
- (SQL_KEYSET_CURSOR_ATTRIBUTES1): likewise.
- (SQL_KEYSET_CURSOR_ATTRIBUTES2): likewise.
- (SQL_MAX_ASYNC_CONCURRENT_STATEMENTS): likewise.
- (SQL_NO_COLUMN_NUMBER): likewise.
- (SQL_NO_ROW_NUMBER): likewise.
- (SQL_NOT_DEFERRABLE): likewise.
- (SQL_NUM_EXTENSIONS): likewise.
- (SQL_NUM_FUNCTIONS): likewise.
- (SQL_ODBC_INTERFACE_CONFORMANCE): likewise.
- (SQL_OIC_CORE): likewise.
- (SQL_OIC_LEVEL1): likewise.
- (SQL_OIC_LEVEL2): likewise.
- (SQL_OV_ODBC2): likewise.
- (SQL_OV_ODBC3): likewise.
- (SQL_PARAM_ARRAY_ROW_COUNTS): likewise.
- (SQL_PARAM_ARRAY_SELECTS): likewise.
- (SQL_PARAM_BIND_BY_COLUMN): likewise.
- (SQL_PARAM_BIND_TYPE_DEFAULT): likewise.
- (SQL_PARAM_DIAG_UNAVAILABLE): likewise.
- (SQL_PARAM_ERROR): likewise.
- (SQL_PARAM_IGNORE): likewise.
- (SQL_PARAM_PROCEED): likewise.
- (SQL_PARAM_SUCCESS): likewise.
- (SQL_PARAM_SUCCESS_WITH_INFO): likewise.
- (SQL_PARAM_UNUSED): likewise.
- (SQL_PARC_BATCH): likewise.
- (SQL_PARC_NO_BATCH): likewise.
- (SQL_PAS_BATCH): likewise.
- (SQL_PAS_NO_BATCH): likewise.
- (SQL_PAS_NO_SELECT): likewise.
- (SQL_ROW_IGNORE): likewise.
- (SQL_ROW_NUMBER_UNKNOWN): likewise.
- (SQL_ROW_PROCEED): likewise.
- (SQL_ROW_SUCCESS_WITH_INFO): likewise.
- (SQL_SC_FIPS127_2_TRANSITIONAL): likewise.
- (SQL_SC_SQL92_ENTRY): likewise.
- (SQL_SC_SQL92_FULL): likewise.
- (SQL_SC_SQL92_INTERMEDIATE): likewise.
- (SQL_SCC_ISO92_CLI): likewise.
- (SQL_SCC_XOPEN_CLI_VERSION1): likewise.
- (SQL_SCHEMA_TERM): likewise.
- (SQL_SCHEMA_USAGE): likewise.
- (SQL_SDF_CURRENT_DATE): likewise.
- (SQL_SDF_CURRENT_TIME): likewise.
- (SQL_SDF_CURRENT_TIMESTAMP): likewise.
- (SQL_SFKD_CASCADE): likewise.
- (SQL_SFKD_NO_ACTION): likewise.
- (SQL_SFKD_SET_DEFAULT): likewise.
- (SQL_SFKD_SET_NULL): likewise.
- (SQL_SFKU_CASCADE): likewise.
- (SQL_SFKU_NO_ACTION): likewise.
- (SQL_SFKU_SET_DEFAULT): likewise.
- (SQL_SFKU_SET_NULL): likewise.
- (SQL_SG_DELETE_TABLE): likewise.
- (SQL_SG_INSERT_COLUMN): likewise.
- (SQL_SG_INSERT_TABLE): likewise.
- (SQL_SG_REFERENCES_COLUMN): likewise.
- (SQL_SG_REFERENCES_TABLE): likewise.
- (SQL_SG_SELECT_TABLE): likewise.
- (SQL_SG_UPDATE_COLUMN): likewise.
- (SQL_SG_UPDATE_TABLE): likewise.
- (SQL_SG_USAGE_ON_CHARACTER_SET): likewise.
- (SQL_SG_USAGE_ON_COLLATION): likewise.
- (SQL_SG_USAGE_ON_DOMAIN): likewise.
- (SQL_SG_USAGE_ON_TRANSLATION): likewise.
- (SQL_SG_WITH_GRANT_OPTION): likewise.
- (SQL_SNVF_BIT_LENGTH): likewise.
- (SQL_SNVF_CHAR_LENGTH): likewise.
- (SQL_SNVF_CHARACTER_LENGTH): likewise.
- (SQL_SNVF_EXTRACT): likewise.
- (SQL_SNVF_OCTET_LENGTH): likewise.
- (SQL_SNVF_POSITION): likewise.
- (SQL_SP_BETWEEN): likewise.
- (SQL_SP_COMPARISON): likewise.
- (SQL_SP_EXISTS): likewise.
- (SQL_SP_IN): likewise.
- (SQL_SP_ISNOTNULL): likewise.
- (SQL_SP_ISNULL): likewise.
- (SQL_SP_LIKE): likewise.
- (SQL_SP_MATCH_FULL): likewise.
- (SQL_SP_MATCH_PARTIAL): likewise.
- (SQL_SP_MATCH_UNIQUE_FULL): likewise.
- (SQL_SP_MATCH_UNIQUE_PARTIAL): likewise.
- (SQL_SP_OVERLAPS): likewise.
- (SQL_SP_QUANTIFIED_COMPARISON): likewise.
- (SQL_SP_UNIQUE): likewise.
- (SQL_SQL_CONFORMANCE): likewise.
- (SQL_SQL92_DATETIME_FUNCTIONS): likewise.
- (SQL_SQL92_FOREIGN_KEY_DELETE_RULE): likewise.
- (SQL_SQL92_FOREIGN_KEY_UPDATE_RULE): likewise.
- (SQL_SQL92_GRANT): likewise.
- (SQL_SQL92_NUMERIC_VALUE_FUNCTIONS): likewise.
- (SQL_SQL92_PREDICATES): likewise.
- (SQL_SQL92_RELATIONAL_JOIN_OPERATORS): likewise.
- (SQL_SQL92_REVOKE): likewise.
- (SQL_SQL92_ROW_VALUE_CONSTRUCTOR): likewise.
- (SQL_SQL92_STRING_FUNCTIONS): likewise.
- (SQL_SQL92_VALUE_EXPRESSIONS): likewise.
- (SQL_SR_CASCADE): likewise.
- (SQL_SR_DELETE_TABLE): likewise.
- (SQL_SR_GRANT_OPTION_FOR): likewise.
- (SQL_SR_INSERT_COLUMN): likewise.
- (SQL_SR_INSERT_TABLE): likewise.
- (SQL_SR_REFERENCES_COLUMN): likewise.
- (SQL_SR_REFERENCES_TABLE): likewise.
- (SQL_SR_RESTRICT): likewise.
- (SQL_SR_SELECT_TABLE): likewise.
- (SQL_SR_UPDATE_COLUMN): likewise.
- (SQL_SR_UPDATE_TABLE): likewise.
- (SQL_SR_USAGE_ON_CHARACTER_SET): likewise.
- (SQL_SR_USAGE_ON_COLLATION): likewise.
- (SQL_SR_USAGE_ON_DOMAIN): likewise.
- (SQL_SR_USAGE_ON_TRANSLATION): likewise.
- (SQL_SRJO_CORRESPONDING_CLAUSE): likewise.
- (SQL_SRJO_CROSS_JOIN): likewise.
- (SQL_SRJO_EXCEPT_JOIN): likewise.
- (SQL_SRJO_FULL_OUTER_JOIN): likewise.
- (SQL_SRJO_INNER_JOIN): likewise.
- (SQL_SRJO_INTERSECT_JOIN): likewise.
- (SQL_SRJO_LEFT_OUTER_JOIN): likewise.
- (SQL_SRJO_NATURAL_JOIN): likewise.
- (SQL_SRJO_RIGHT_OUTER_JOIN): likewise.
- (SQL_SRJO_UNION_JOIN): likewise.
- (SQL_SRVC_DEFAULT): likewise.
- (SQL_SRVC_NULL): likewise.
- (SQL_SRVC_ROW_SUBQUERY): likewise.
- (SQL_SRVC_VALUE_EXPRESSION): likewise.
- (SQL_SSF_CONVERT): likewise.
- (SQL_SSF_LOWER): likewise.
- (SQL_SSF_SUBSTRING): likewise.
- (SQL_SSF_TRANSLATE): likewise.
- (SQL_SSF_TRIM_BOTH): likewise.
- (SQL_SSF_TRIM_LEADING): likewise.
- (SQL_SSF_TRIM_TRAILING): likewise.
- (SQL_SSF_UPPER): likewise.
- (SQL_STANDARD_CLI_CONFORMANCE): likewise.
- (SQL_STATIC_CURSOR_ATTRIBUTES1): likewise.
- (SQL_STATIC_CURSOR_ATTRIBUTES2): likewise.
- (SQL_SU_DML_STATEMENTS): likewise.
- (SQL_SU_INDEX_DEFINITION): likewise.
- (SQL_SU_PRIVILEGE_DEFINITION): likewise.
- (SQL_SU_PROCEDURE_INVOCATION): likewise.
- (SQL_SU_TABLE_DEFINITION): likewise.
- (SQL_SVE_CASE): likewise.
- (SQL_SVE_CAST): likewise.
- (SQL_SVE_COALESCE): likewise.
- (SQL_SVE_NULLIF): likewise.
- (SQL_UB_FIXED): likewise.
- (SQL_UB_VARIABLE): likewise.
- (SQL_UNION_STATEMENT): likewise.
- (SQL_UPDATE_BY_BOOKMARK): likewise.
- (SQL_US_UNION): likewise.
- (SQL_US_UNION_ALL): likewise.
- (SQL_DESC_ROWVER): likewise.
- (SQL_GUID): likewise.
- (SQL_C_GUID): likewise.
- (ODBC_STD): likewise.
- (SQLAllocHandle): likewise.
- (SQLAllocEnv(p)): likewise.
- (SQL_YEAR): likewise.
- (SQL_MONTH): likewise.
- (SQL_DAY): likewise.
- (SQL_HOUR): likewise.
- (SQL_MINUTE): likewise.
- (SQL_SECOND): likewise.
- (SQL_YEAR_TO_MONTH): likewise.
- (SQL_DAY_TO_HOUR): likewise.
- (SQL_DAY_TO_MINUTE): likewise.
- (SQL_DAY_TO_SECOND): likewise.
- (SQL_HOUR_TO_MINUTE): likewise.
- (SQL_HOUR_TO_SECOND): likewise.
- (SQL_MINUTE_TO_SECOND): likewise.
- (SQL_ATTR_ANSI_APP): likewise.
- (SQL_AA_TRUE): likewise.
- (SQL_AA_FALSE): likewise.
-
- * include/sqltypes.h (#pragma pack(push,1), #pragma pack(pop)): remove.
- (struct tagSQL_YEAR_MONTH): add for ODBC3.x.
- (struct tagSQL_DAY_SECOND): likewise.
- (struct tagSQL_INTERVAL_STRUCT): likewise.
- (struct tagSQL_NUMERIC_STRUCT): likewise.
- (struct tagSQLGUID): add for 0DBC3.50.
- (enum SQLINTERVAL): add for ODBC3.x.
- (SQLWCHAR): add typedef.
- (SQLTCHAR): add typedef, conditional on UNICODE.
- (SQLLEN): add typedef for _WIN64, define for _WIN32.
- (SQLULEN): likewise.
- (SQLROWOFFSET): likewise.
- (SQLROWCOUNT): likewise.
- (SQLTRANSID): likewise.
- (SQLSETPOSIROW): likewise.
- (SQLHANDLE): add ODBC3.x typedef.
- (SQLHDESC): likewise.
- (SQLDATE): likewise.
- (SQLDECIMAL): likewise.
- (SQLDOUBLE): likewise.
- (SQLFLOAT): likewise.
- (SQLNUMERIC): likewise.
- (SQLREAL): likewise.
- (SQLTIME): likewise.
- (SQLTIMESTAMP): likewise.
- (SQLVARCHAR): likewise.
- (SQLBIGINT): likewise.
- (SQLUBIGINT): likewise.
- (SQL_DATE_STRUCT): likewise.
- (SQL_TIME_STRUCT): likewise.
- (SQL_TIMESTAMP_STRUCT): likewise.
- (ODBCINT64): add ODBC3.x define.
-
- * lib/odbc32.def : regenerate.
-
-Fri Jan 26 15:59:31 2001 Earnie Boyd <earnie@users.sourceforge.net
-
- * Apply Danny Smith patch 102275
- 2000-11-05 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
- * include/objbase.h: (COM_RIGHTS): Add definition.
- (tagSTDMSHLFLAGS): add enumeration.
- (CoInitializeEx): Add prototypes.
- (CoGetStdMarshalEx): ditto.
- (CoCreateInstanceEx): ditto.
- (CoInitializeSecurity): ditto.
- (CoGetCallContext): ditto.
- (CoQueryProxyBlanket): ditto.
- (CoSetProxyBlanket): ditto.
- (CoCopyProxy): ditto.
- (CoQueryClientBlanket): ditto.
- (CoImpersonateClient): ditto.
- (CoRevertToSelf): ditto.
- (CoQueryAuthenticationServices): ditto.
- (CoSwitchCallContext): ditto.
- (CoGetInstanceFromFile): ditto.
- (CoGetInstanceFromIStorage): ditto.
- * include/objidl.h: (SOLE_AUTHENTICATION_SERVICE): Add structure.
- (SOLE_AUTHENTICATION_INFO): ditto.
- (EOLE_AUTHENTICATION_CAPABILITIES): Add enumeration.
- (COLE_DEFAULT_PRINCIPAL): Add definition.
- (COLE_DEFAULT_AUTHINFO): Ditto.
- * include/rpcdce.h: (RPC_C_AUTHZ_DEFAULT): Add definition.
- (RPC_PROTSEQ_VECTOR) Fix typo.
- (RpcRaiseException): add DECLSPEC_NORETURN attribute.
- * include/winbase.h: (FreeLibraryAndExitThread): add DECLSPEC_NORETURN
- attribute.
-
-Fri Jan 26 13:34:55 2001 Earnie Boyde <earnie@users.sourceforge.net>
-
- * lib/msvcp60.def: Apply Danny Smith patch 103321.
- 2001-01-17 Danny Smith <danny_r_smith_2001@yahoo.co.nz>.
- New file.
-
-Fri Jan 26 11:34:04 2001 Christopher Faylor <cgf@cygnus.com>
-
- * include/winnt.h: Add PTOKEN_USER.
-
-Tue Jan 16 13:53:30 2001 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/sqlucode.h: Apply Danny Smith patch 102443
- 2000-11-20 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
- New file.
-
-Tue Jan 16 13:36:45 2001 Earnie Boyd <earnie@users.sourceforge.net>
-
- * lib/odbccp32.def: Apply Danny Smith patch 102442
- 2000-11-20 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
- New file.
-
-Tue Jan 16 12:45:20 2001 Earnie Boyd <earnie@users.sourceforge.net>
-
- * include/odbcinst.h: Apply Danny Smith patch 102441
- 2000-11-20 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
- New file.
-
-Mon Dec 25 12:22:19 2000 Christopher Faylor <cgf@cygnus.com>
-
- * lib/Makefile.in: Don't make "links" to include/w32api directory.
-
-Wed Dec 20 13:34:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winbase.h: Add prototype for SetSecurityDescriptorControl.
-
-Mon Dec 11 13:11:36 2000 Christopher Faylor <cgf@cygnus.com>
-
- * lib/Makefile.in: Install headers and libraries in tooldir.
-
-2000-12-04 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
-
- * include/winnls.h: NORM_IGNORE* remove duplicate defines.
- SORT_STRINGSORT: ditto.
- CMAP*: ditto.
- CTRY_*: add new defines.
- LGRPID_*: ditto.
- LCMAP*: change defines to hex notation.
- CALID: change from ULONG to DWORD.
- CALTYPE: ditto.
- _cpinfoex[AW]: add structure.
- FoldString: correct Unicode mappings.
- GetCPInfoEx[AW]: add prototypes.
- EnumCalendarInfoEx[AW]: ditto.
- EnumDateFormatsEx[AW]: ditto.
- EnumSystemLanguageGroups[AW]: ditto.
- EnumLanguageGroupLocales[AW]: ditto.
- EnumUILanguages[AW]: ditto.
- GetSystemDefaultUILanguage[AW]: ditto.
- GetUserDefaultUILanguage[AW]: ditto.
- IsValidLanguageGroup[AW]: ditto.
- CALINFO_ENUMPROCEX[AW]: add function pointer typedef
- LANGUAGEGROUP_ENUMPROC[AW]: ditto
- LANGGROUPLOCALE_ENUMPROC[AW]: ditto
- UILANGUAGE_ENUMPROC[AW]: ditto
- DATEFMT_ENUMPROCEX[AW]: ditto
- LPCURRENCYFMT[AW]: add structure pointer typedef
- LPNUMBERFMT[AW]: ditto
-
-Sun Dec 02 14:21:02 2000 Matt Hargett <matt@use.net>
-
- * include/winbase.h: Added a define for INVALID_SET_FILE_POINTER, a
- possible return code for the SetFilePointer() win32 API call.
-
-Mon Oct 9 11:49:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winnt.h: Add missing FILE_NAMED_STREAMS define.
-
-2000-11-06 Earnie Boyd <earnie_boyd@yahoo.com>
-
- * Makefile.in: increment VERSION.
- (dist:) Rename to srcdist. Create new dist target to call
- srcdist and bindist targets.
- (srcdist:) New target.
- (clean-top:) add call to mostlyclean-top and add rm of distribution
- tarballs.
- * lib/Makefile.in: (uninstall:) modify to remove files from the
- new w32api subdirectory and to remove w32api subdirectory.
- (xuninstall:) Ditto.
- TODO: Add a task to redo the clean targets of Makefile.in
-
-Fri Nov 3 21:50:47 2000 Christopher Faylor <cgf@cygnus.com>
-
- * lib/Makefile.in: Install header files in w32api subdirectory.
-
-2000-10-31 Earnie Boyd <earnie_boyd@yahoo.com>
-
- * CONTRIBUTIONS: New file.
- * README: Change the maintained by header.
- * TODO: Add a note about checking the TODO.
-
-2000-10-31 Earnie Boyd <earnie_boyd@yahoo.com>
-
- * Merge in accepted changes from
- 2000-10-23 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
- * include/basetyps.h: add comment for GUID_DEFINED
- * include/lm.h: add includes for lmerr.h and lmserver.h
- * include/lmcons.h: add W2K typedefs LMSTR, LMCSTR
- * include/lmerr.h: add error codes
- * include/lmserver.h: replace LPTSTR with LPWSTR,
- LPTCSTR with LPWCSTR in structures and prototypes
- * include/lmshare.h: ditto
- * include/lmuse.h: ditto
- * include/lmstats.h: ditto
- * include/oleauto.h: add function prototype SystemTimeToVariantTime
- * include/winbase.h: change first argument of CommConfigDialog to const
- * include/windowsx.h: add macros defining FAR versions of
- mem and string functions for porting from Win16 code
- * include/winioctl.h: added IOCTL_STORAGE defines
- * include/winnetwk.h: added WNNC_NET flags
- * include/winnt.h: add include of <basetsd.h>;
- add structs; add pointer typedefs for TOKEN structs
- * include/winsock.h: add guard around BSD-ish typedefs
- * include/wtypes.h: new VARENUM enums, new WIN32/WIN64 compat. macros
- * include/basetsd.h: new file
- * include/raserror.h: ditto
- * include/rassapi.h: ditto
- * include/ras.h: ditto
- comment from Earnie: replaced original ras.h contribution with Danny's
- contribution as it is more complete.
- * include/rpcndr.h: add default definition for __RPCNDR_H_VERSION__
-
-Mon Oct 19 13:55:00 2000 Earnie Boyd <earnie_boyd@yahoo.com>
-
- * Makefile.in: increment VERSION. Change tar file name for dist and
- bindist targets to be more standard.
- * config.guess: Update with the currently published file.
- * config.sub: ditto.
- * configure.in: Use value of build_alias instead of testing for
- directory names to set BUILDENV.
- * configure: ditto.
- * lib/Makefile.in: Change the name of the targets install,
- install-headers and install-libraries to xinstall, xinstall-headers
- and xinstall-libraries for system target specified installation.
- Recreate targets install, install-headers and install-libraries for
- exec-prefix specified installation. Ditto for the uninstall targets of
- the same name.
-
-Mon Oct 9 11:49:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/iprtrmib.h: Further layout changes according to standard.
- * include/iptypes.h: Ditto.
- * include/ntdef.h: Ditto.
- * include/ntsecapi.h: Ditto.
- * include/subauth.h: Ditto.
-
-Mon Oct 9 11:32:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/ntsecapi.h: Fix PLSA_UNICODE_STRING define.
-
-Sun Oct 8 18:26:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/ntsecapi.h: New file.
- * include/subauth.h: Ditto.
- * include/ipexport.h: Fix global header define not to contain
- trailing underscore. Change layout according to standard.
- * include/iphlpapi.h: Ditto.
- * include/ipifcons.h: Ditto.
- * include/iprtrmib.h: Ditto.
- * include/iptypes.h: Ditto.
- * include/ntdef.h: Ditto. Define conditional datatypes dependent
- of inclusion of ntsecapi.h and subauth.h.
- * lib/secur32.def: New stub for secur32.dll.
-
-Mon Oct 2 11:15:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/ras.h: New file.
- * lib/rasapi32.def: Add symbols for RasEnumDevicesA and
- RasEnumDevicesW.
-
-Mon Oct 2 10:56:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/ntdef.h: Add define for NTAPI.
-
-Sun Oct 1 23:55:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/ipexport.h: Add missing `extern "C"' directives.
- * include/iphlpapi.h: Ditto.
- * include/iprtrmib.h: Ditto.
- * include/iptypes.h: Ditto.
-
-Sun Oct 1 22:09:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/ipifcons.h: New header file.
- * include/iprtrmib.h: Move operational states to ipifcons.h.
- * include/iphlpapi.h: Add missing parameters to GetIfTable()
- declaration.
-
-Sun Oct 1 16:30:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/iprtrmib.h: Add missing MIB_IF_OPER_STATUS_xxx definitions.
-
-Sun Oct 1 16:13:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * lib/iphlpapi.def: New stub for iphlpapi.dll.
- * include/iptypes.h: New header file.
- * include/ipexport.h: Ditto.
- * include/iphlpapi.h: Ditto.
- * include/iprtrmib.h: Ditto.
-
-Sun Oct 1 2:54:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/ntdef.h: New file.
-
-Fri Aug 18 17:17:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winnt.h:Add enums for TokenRestrictedSids and TokenSessionId
- to TOKEN_INFORMATION_CLASS type.
- Add QUOTA_LIMITS type.
-
-Tue Aug 8 21:29:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/userenv.h: New header file.
- * lib/userenv.def: New stub for userenv.dll.
-
-Tue Aug 8 10:25:14 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/winuser.h: Correct PCWPSTRUCT typo.
- (discovered by Axel Riese)
-
-2000-07-27 DJ Delorie <dj@redhat.com>
-
- * include/windows.h: optimize non-inclusion of repeat headers
-
-Fri Jul 21 12:10:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winnt.h: Add missing typedefs for PTOKEN_SOURCE and
- LPTOKEN_SOURCE.
-
-2000-07-11 DJ Delorie <dj@cygnus.com>
-
- * include/shlobj.h: add CSIDL_COMMON_*
-
-Tue Jun 27 19:35:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winbase.h: Add stream ids BACKUP_OBJECT_ID,
- BACKUP_REPARSE_DATA and BACKUP_SPARSE_BLOCK.
- Add file open flags FILE_FLAG_OPEN_REPARSE_POINT and
- FILE_FLAG_OPEN_NO_RECALL.
- * winioctl.h: Add device io control codes FSCTL_GET_REPARSE_POINT,
- FSCTL_SET_REPARSE_POINT and FSCTL_DELETE_REPARSE_POINT.
- * winnt.h: Add typedef for GUID.
- Add file attributes FILE_ATTRIBUTE_ENCRYPTED,
- FILE_ATTRIBUTE_SPARSE_FILE, FILE_ATTRIBUTE_REPARSE_POINT and
- FILE_ATTRIBUTE_NOT_CONTENT_INDEXED.
- Add volume attributes FILE_VOLUME_QUOTAS, FILE_SUPPORTS_SPARSE_FILES,
- FILE_SUPPORTS_REPARSE_POINTS, FILE_SUPPORTS_REMOTE_STORAGE,
- FILE_SUPPORTS_OBJECT_IDS and FILE_SUPPORTS_ENCRYPTION.
- Add several reparse point defines and typedefs for REPARSE_DATA_BUFFER,
- REPARSE_GUID_DATA_BUFFER and REPARSE_POINT_INFORMATION.
- * lib/psapi.def: New file.
-
-Thu Jun 22 14:36:19 2000 Christopher Faylor <cgf@cygnus.com>
-
- * rpcdce.h: Protect OPTIONAL definition since it may be (legally)
- previously defined.
- * windef.h : Ditto.
-
-2000-06-14 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * include/winnt.h: Add some missing defines related to locale
- identifiers. Translate values of LANG_* and SUBLANG_* into hexadecimal.
-
-Thu May 27 15:57:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/wincrypt.h: Add missing CRYPT_MACHINE_KEYSET define.
-
-Thu May 18 11:37:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * include/winnt.h: Add some missing TAPE_DRIVE_* defines.
-
-Wed Apr 26 11:04:18 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/wininet.h: Add another "INTERNET_OPTIONS".
-
-2000-04-25 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/winspool.h: Add 2 more PRINTER_ATTRIBUTE_* macros.
-
-2000-04-25 Martin Kotulla <martin-k@softmaker.de>
-
- * include/ddeml.h (DdeCreateStringHandle{A,W}): Fix prototype.
- * include/shlobj.h (IShellLink{A,W}::GetPath): Fix prototype.
- * include/wingdi.h: Add LPFNDEVMODE and LPFNDEVCAPS callbacks.
- * include/winuser.h: Add WM_* macros. Add PCOPYDATASTRUCT typedef.
-
-Mon Apr 10 22:58:25 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/winbase.h: Change first argument of ENUMRES* types to
- coincide with Microsoft usage.
-
-Sat Apr 1 20:51:47 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/wininet.h: Add three more "INTERNET_OPTIONS".
-
-2000-03-30 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/winbase.h (CreateHardLink{A,W}): Add prototypes.
- * include/winerror.h (ERROR_TOO_MANY_LINKS): Add macro.
- * include/winnt.h (SEC_*): Add macros.
- * lib/th32.def: Use Kernel32.dll instead of TH32.DLL.
- * include/ole.h: Workaround for C++ parser bug.
- * include/rpcdcep.h: Likewise.
- * include/winsock.h: Likewise.
-
-Sun Mar 26 13:41:47 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/winnt.h: Eliminate duplicate PCONTEXT and LPCONTEXT typedefs.
-
-2000-02-28 Mumit Khan <khan@xraylith.wisc.edu>
-
- Patches from Jan Nijtmans <j.nijtmans@chello.nl>:
- * include/wtypes.h (PBLOB, LPBLOB): Define.
- * include/winsock2.h: Much more complete version.
- (FD_SET, SOMAXCONN): Protect common macros defined by winsock.h.
-
- Patches from Jan Nijtmans <j.nijtmans@chello.nl>:
- * include/winsock.h (FD_CLR): Add missing ')'.
- (timercmp): Fix macro to handle all 6 comparison operators.
- (AF_FIREFOX, AF_UNKNOWN1, AF_BAN, AF_ATM, AF_INET6): Define.
- (AF_MAX): Update.
- (PF_FIREFOX, PF_UNKNOWN1, PF_BAN, PF_ATM, PF_INET6): Define.
-
- * include/largeint.h: Rename HAVE_INT64 macro to _HAVE_INT64 to avoid
- namespace pollution.
- * include/rpcndr.h: Likewise.
- * include/winnt.h: Likewise.
- * include/shlobj.h (SHGetDataFromIDList{A,W}): Fix typo.
- (SHGetSpecialFolderPath{A,W}): Add prototypes.
- * lib/ole32.def: Add missing exports.
- * include/winbase.h (TLS_MINIMUM_AVAILABLE): Move macro from here
- * include/winnt.h (TLS_MINIMUM_AVAILABLE): to here.
- (NT_TIB): Define.
- * include/tlhelp32.h: New file.
-
-Mon Feb 28 17:08:03 2000 Christopher Faylor <cgf@cygnus.com>
-
- * include/rapi.h: New file.
- * lib/rapi.def: New file.
-
-2000-02-11 Axel Riese <ariese@andromeda.risc.uni-linz.ac.at>
-
- * oaidl.h (LPTYPECOMP): Remove multiple definition.
-
-2000-02-03 Mumit Khan <khan@xraylith.wisc.edu>
-
- * Snapshot 2000-02-03.
-
-2000-01-21 Chris Faylor <cgf@cygnus.com>
-
- * include/winnt.h: Add ARM support.
-
-2000-01-19 Mumit Khan <khan@xraylith.wisc.edu>
-
- From Greg Primes <gregory.l.priem@intel.com>:
- * include/oaidl.h (DESCKIND): Define macro.
- (ITypeComp): Define interface.
- (ITypeComp): Likewise.
- * rpcndr.h (DECLSPEC_UUID): Define macro.
- (MIDL_INTERFACE): Likewise.
-
- * include/psapi.h: New file.
- * include/imagehlp.h: New file.
- * lib/imagehlp.def: New file.
-
- * include/oaidl.h (tagVARIANT): Update fields.
-
- From Craig Lanning <CraigL@DyCon.com>:
- * include/commctrl.h: Add some TCS_* macros.
- * include/winnls.h (IsValidLocale): Add prototype.
-
-2000-01-18 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/oaidl.h: OLE Patches from "Fifer, Eric"
- <EFifer@sanwaint.com> needed to build Win32::OLE perl module.
- * include/objbase.h: Likewise.
- * include/objidl.h: Likewise.
- * include/ocidl.h: New file.
- * include/oleauto.h: Likewise.
- * include/wtypes.h: Likewise.
- * lib/oleaut32.def: Likewise.
-
- * include/lmserver.h (NetServerTransportAddEx): Fix prototype.
- Thanks to "Jon Leichter" <jon@symas.com>.
- * include/commctrl.h (LVM_FINDITEM): Fix typo in macro.
- * include/winbase.h: Add GetLongPathName{A,W} prototypes.
- * include/shellapi.h (SHGetFileInfo): Add macro. Thanks to
- "Axel Riese" <ariese@andromeda.risc.uni-linz.ac.at>.
- (CommandLineToArgvW): Fix prototype. Thanks to "Frans E. van
- Dorsselaer" <frans@bia-bv.demon.nl>.
- * include/httpext.h: New file. Thanks to Jan Nijtmans
- <j.nijtmans@chello.nl>.
- * include/mmsystem.h (WAVEFORMATEX): Guard definition to avoid
- redefinition of LPCWAVEFORMATEX in DirectX headers.
- (CALLBACK_NULL): Define to be 0. Thanks to Krzysztof Nikiel
- <krzych00@priv7.onet.pl>.
- * include/sqlext.h (SQLDriverConnnect): Fix prototype.
- * include/windef.h (HRESULT): Guard definition to avoid
- redefinition in DirectX headers.
- * include/winnt.h: Add target macros from windows.h.
- * include/windows.h: Update synch comment for target macros.
- (_ANONYMOUS_STRUCT): Define for GCC 2.95 and newer.
- (_ANONYMOUS_UNION): Likewise.
- * include/wingdi.h (AbortPrinter): Move from here ...
- * include/winspool.h (AbortPrinter): to here and fix linkage.
- (MONITOR_INFO_2{A,W}): Define.
- * include/winsock.h (htons): Fix argument.
- (htonl): Likewise.
- * include/winsock2.h (SO_*, MAX_*, WSA_*): Add macros.
- (GROUP): Define.
- (GUID): Define conditionally.
- (WSAPROTOCOLCHAIN, WSAPROTOCOL_INFO): Define.
- (WSASocket*): Declare.
- * include/basetyps.h (GUID): Guard REGUID and LPGUID as well.
-
- * lib/dsetup.def: Remove leading underscore.
- * lib/dsound.def: Likewise.
- * lib/ws2_32.def: Likewise.
-
-Wed Dec 22 02:53:22 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/windef.h (HMONITOR, HTERMINAL, HWINEVENTHOOK): Define
- handles.
-
- * lib/Makefile.in (EXTRA_OBJS): Add dinput.o.
- * lib/dinput.c: Include windows.h for GCC.
- * lib/dxguid.c: Likewise.
- (INITGUID): Define macro.
-
- * include/objidl.h (ISequentialStream): Define interface.
- (IStream): Derive from ISequentialStream.
-
- * include/objidl.h (IStream::{LockRegion, UnlockRegion, Stat,
- Clone}): Mark as PURE.
- (IDataObject::EnumDAdvise): Likewise.
- * include/oleidl.h (IDropSource::GiveFeedback): Likewise.
- (IViewObject::Unfreeze): Likewise.
- (IViewObject2::Unfreeze): Likewise.
-
- * include/objidl.h: Add various IID_ declarations.
- * include/olectl.h: Likewise.
- * include/oleidl.h: Likewise.
-
-Tue Dec 21 02:22:14 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * Snapshot 1999-12-21.
-
- * include/winbase.h (CancelIO): Rename to CancelIo.
- * include/winsvc.h (LPHANDLER_FUNCTION): Fix prototype.
- * include/winuser.h (PEVENTMSG, LPEVENTMSG): Declare.
-
- * Merge with winsup-19991218.
- * include/winnt.h: Add defines for W2K ACL control flags.
-
- * Merge with Anders Norlander's 19991130 snapshot.
-
- * include/windows.h: #include mmsystem.h ifndef WIN32_LEAN_AND_MEAN.
- * include/winbase.h (EXCEPTION_INVALID_HANDLE): Define.
-
- Patch from Harold Weissfield
- * include/shellapi.h: Added some ABN_* defines.
-
- * include/commctrl.h (_TrackMouseEvent): Add prototype.
- * lib/comctl32.def (_TrackMouseEvent): Import.
- * include/winuser.h: Misc. fixes from Sang Cho
- <sangcho@alpha94.chongju.ac.kr>.
- * include/winuser.h (SM_CMETRICS): Define to 76 or 83 depending on
- value of _WIN32_WINNT.
- * include/winuser.h: Reorganize SM_* defines in numerical order.
-
-Tue Dec 14 21:58:03 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/windef.h: Make RECTL a distinct type from RECT.
- * include/windows.h: Define upto 8 DUMMYUNIONNAMEs for DirectX.
- * include/winuser.h (CDS_): Update (Franco Bez <franco.bez@gmx.de>).
- (COMPAREITEMSTRUCT): Fix fields.
- (SERIALKEYSA): Likewise.
- (SERIALKEYSW): Likewise..
- * include/winbase.h (CRITICAL_SECTION_DEBUG): Likewise.
- (WIN32_FIND_DATAA): Likewise.
- (WIN32_FIND_DATAW): Likewise.
- * include/commdlg.h (SNDMSG): Define.
- * include/winsock.h (SO_UPDATE_ACCEPT_CONTEXT): Define.
- (SO_CONNECT_TIME): Likewise.
- (AcceptEx): Declare.
- (GetAcceptExSockaddrs): Likewise.
- * include/winsock2.h: Fix typo in #ifdef __cplusplus.
- * include/winspool.h: Add RC_INVOKED guard.
- * lib/wsock32.def (AcceptEx@32): Export.
- (GetAcceptExSockaddrs@32): Likewise.
-
-Thu Nov 18 00:12:43 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * Snapshot 1999-11-18.
-
- * include/oaidl.h (tagVARIANT): Rename pbool to pboolVal needed by
- Octopod C++ IDE (and MSVC compatibility).
- * include/oleauto.h (V_BOOLREF(X)): Likewise.
- * include/shellapi.h (ShellAbout*): Fix typo.
- * wingdi.h (FW_ULTRABOLD): Likewise.
- * include/winnt.h (_TAPE_ERASE, _TAPE_PREPARE, _TAPE_SET_POSITION,
- _TAPE_WRITE_MARKS): Add missing fields and fix existing ones.
- Add packing directives for various structures. All structure
- sizes now conform to MSVC.
-
-Sun Nov 7 02:50:09 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- Released 1999-11-07.
-
-Sat Nov 6 21:25:48 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/winsock2.h: New file. Mostly a stub for now.
- * include/winbase.h (DllMain): Delete prototype.
- * include/commctrl.h (Header_SetItem): Fix macro.
- * include/{isguids.h, lmerrlog.h, mcx.h, objfwd.h, olectl.h,
- regstr.h, richole.h, rpcdce.h, rpcdcep.h, rpcnsi.h, rpcproxy.h,
- shlguid.h, sqltypes.h, winperf.h}: Enclose in extern "C" if c++.
-
- Merge in changes from wxWindows.
- * include/basetyps.h (GUID_DEFINED, UUID_DEFINED): Add guards.
- * include/oaidl.h (DISPID_*): Add macros.
- (IID_ITypeLib, IID_ICreateTypeInfo, IID_ICreateTypeInfo2,
- IID_ICreateTypeLib, IID_ICreateTypeLib2, IID_ITypeInfo,
- IID_IErrorInfo, IID_IDispatch, IID_ICreateErrorInfo): Declare.
- * include/objidl.h (IDataObject): Fix EnumFormatEtc parameter.
-
- Merge in changes from Octopod C++ IDE group.
- * include/commctrl.h (NMHEADERA, NMHEADERW): Define.
- (Header_InsertItem): Fix macro.
- * include/oaidl.h (IID_IDispatch): Declare.
- (IID_ISupportErrorInfo): Likewise.
- (IDispatch): Rename Invoked to Invoke.
- * include/objidl.h (IPersist): Fix GetClassID.
- * include/oleauto.h (VectorFromBstr): Declare.
- (BstrFromVector): Likewise.
- * include/olectl.h (OLEMISC_*): Update.
- * include/olectlid.h (IID_IDispatch): Declare.
- * include/oleidl.h (IOleObject): Fix GetExtent and SetExtent.
- (IOleInPlaceFrame): Fix.
- (ISupportErrorInfo): Define.
- (IErrorInfo): Define.
- * include/winuser.h (SIF_TRACKPOS): Define.
-
-Wed Nov 3 19:34:12 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- Fix Merge errors:
- * include/winnt.h (PSID): Uncomment definition.
- (PISID): Rename from PSID.
- (struct _TAPE_GET_MEDIA_PARAMETER): Remove reserved field.
- (struct _SECURITY_ATTRIBUTES): Remove multiple definition.
-
- * include/lmalert.h, include/lmbrowsr.h, include/lmchdev.h,
- include/lmconfig.h, include/lmerrlog.h, include/lmmsg.h,
- include/lmremutl.h, include/lmrepl.h, include/lmserver.h,
- include/lmsvc.h, include/lmwksta.h, include/oaidl.h,
- include/shellapi.h, include/winbase.h, include/wingdi.h,
- include/winnt.h, include/winsock.h: Merged with winsup-19991026.
-
-Sun Oct 31 00:23:50 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/wingdi.h (PHYSICAL*, SCALINGFACTOR*): New. From
- Marius Kjeldahl <kjeldahl@hotmail.com>.
-
-Sun Aug 29 18:07:42 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/winnt.h (APPLICATION_ERROR_MASK): Add macros.
- (ERROR_SEVERITY_*): Likewise.
-
-Tue Aug 17 21:05:21 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/winbase.h (TLS_OUT_OF_INDEXES): Add macro.
- (DllMain): Fix prototype.
-
-Mon Aug 2 23:31:30 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/commdlg.h: Enclose within pack(push,1) and pack(pop).
- (cderr.h): Don't include.
- * include/winuser.h: Fix macro definitions.
-
-Mon Aug 02 14:31:37 1999 Anders Norlander <anorland@hem2.passagen.se>
-
- Merge with winsup 1999-07-29:
- * include/wincon.h (MOUSE_WHEELED): Define.
- * include/winnt.h (PSECURITY_ATTRIBUTES): Add type.
- (SECURITY_DESCRIPTOR): Add struct type.
- (PSECURITY_DESCRIPTOR): Pointer to above type. BEWARE: this type
- is equal to PVOID in the Platform SDK! So don't depend on accessing
- members through ->.
-
-Mon Aug 02 13:58:52 1999 Anders Norlander <anorland@hem2.passagen.se>
-
- * lib/Makefile.in (install-headers): Don't @ commands.
- (install-libraries): Ditto.
-
-Mon Aug 02 13:49:01 1999 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/sqlext.h: Use #include <sql.h> instead of "sql.h".
-
-Mon Aug 02 13:47:15 1999 Anders Norlander <anorland@hem2.passagen.se>
-
- Patch from Mumit Khan:
- * include/windows.h: Fix typo in winsock.h include guard and add
- _UWIN to the list.
- * include/winnt.h (__int64): Undefine first.
- (struct _SID): Declare.
-
-Mon Aug 02 13:40:28 1999 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/winnt.h: Add some REG_* defines reported by Boris Lantrewitz.
-
-Mon Aug 02 13:33:11 1999 Anders Norlander <anorland@hem2.passagen.se>
-
- Patch from Mumit Khan:
- * Makefile.in: Do the right thing when cross-compiling.
- * include/windef.h: Don't define _export and __export if already
- defined.
-
-Mon Aug 02 13:24:43 1999 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/basetyps.h (DECLARE_INTERFACE): Use com_interface attribute.
- (DECLARE_INTERFACE_): Ditto.
-
-Mon Aug 02 13:17:26 1999 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/mmsystem.h (HWAVEOUT): Fix missing ')'
-
- Reported by Brad Porter
- * include/wingdi.h (FW_ULTRALIGHT): Add.
- (FW_DEMIBOLD): Add.
- (FW_ULTRABOLD): Add.
- (FW_BLACK): Add.
- (JOHAB_CHARSET): Add.
- (VIETNAMESE_CHARSET): Add.
-
-
-1999-05-15 Anders Norlander <anorland@hem2.passagen.se>
-
- * lib/scrnsave.c (WinMain): Remove dependencies on C library.
- * lib/Makefile.in (Makefile): Regenerate.
- * include/pshpack[1248].h: New files, if a program would use any of
- them.
- * include/poppack.h: Ditto.
- * include/windef.h (_WIN32_WINNT): Define
- * include/windows.h: Remove DUMMYUNIONNAME[45].
- * include/windows.h: Correctly define _M_IX86 to reflect the target
- processor.
- * include/windows.h: Add preliminary support for other architectures.
- * include/winnt.h: Add CONTEXT structure for PPC and ALPHA.
- * include/winnt.h: Remove PACKED from U/LARGE_INTEGER
- * include/winnt.h (LUID_AND_ATTRIBUTES): Use pack(4) to solve alignment
- issue with LARGE_INTEGER.
- (ANSI_NULL): Define.
- (PSZ): Define.
- (ACL_REVISION[1234]): Define.
- (MIN/MAX_ACL_REVISION): Define.
- (PTCHAR): Define.
- (LANG_USER_DEFAULT): Define.
- (LANG_SYSTEM_DEFAULT): Define.
- (LOCALE_NEUTRAL): Define.
- (SORTVERSIONFROMLCID): Define.
- * include/windef.h (UNREFERENCED_PARAMETER): Define.
- (UNREFERENCED_LOCAL_VARIABLE): Define.
- (DBG_UNREFERENCED_PARAMETER): Define.
- (DBG_UNREFERENCED_LOCAL_VARIABLE): Define.
- * lib/mswsock.def: New file. Imports for mswsock.dll.
- * include/custcntl.h: New file. Necessary to compile some SDK
- samples.
- * include/winuser.h (SM_MOUSEWHEELPRESENT): Define.
- (WM_MOUSEWHEEL): Define.
- (WHEEL_DELTA): Define.
- (WM_MOUSELAST): Redefine to reflect WM_MOUSEWHEEL.
- (WM_NEXTMENU): Define.
- (CharNextA): Fix prototype.
- (CharNextW): Ditto.
-
-1999-05-14 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/winsock.h: Enclose in extern "C" if C++, huh?
- * include/winuser.h(WM_SYNCPAINT): Define. From fltk.
-
-1999-05-13 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/windef.h (NULL): Define only ifndef
- (TRUE): Ditto, was previously only defined ifndef FALSE
- (PASCAL): Define as _pascal
- (__pascal): Define
- (WINAPIV): Define
- (min,max): Define only ifndef NOMINMAX
-
-1999-05-10 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/commctrl.h: Support for Date/Calendar controls + IE controls.
- You must define _WIN32_IE if you want support for it.
- Modified patch from Nirmal Prasad <nprasad@truept.com>.
-
-1999-05-10 Ron Aaron <v-ronaar@Exchange.Microsoft.com>
-
- * include/wincon.h: Add some ButtonState flags and EventFlags.
-
-1999-05-10 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/basetyps.h: Don't support COM when __OBJC__ defined because
- interface define causes mayhem.
- (DEFINE_INTERFACE): Use comobject attribute only if HAVE_COMOBJECT is
- defined.
- * include/windows.h: Undefine BOOL if __OBJC__ defined
-
-1999-05-09 Chris Faylor <cgf@cygnus.com>
-
- * include/winnls.h: Define additional code pages.
-
-1999-05-09 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/winbase.h(RtlFillMemory): Parameters got passed in wrong
- order, corrected.
- (RtlZeroMemory): Use RtlFillMemory
-
-1999-05-04 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/winnt.h: Add PACKED to LARGE_INTEGER and ULARGE_INTEGER
- to get the correct size when used in some structs.
- (ULARGE_INTEGER): Ditto.
- * include/winnt.h (TAPE_CREATE_PARTITION): Add struct.
- * include/winnt.h: Add TAPE_* pointer types PTAPE_*
-
-1999-05-02 Nirmal Prasad <nprasad@truept.com>
-
- * include/wininet.h: Enclose in extern "C" if c++
- (INTERNET_BUFFERSA/W): Define struct
- * include/wininet.h: Add some HSR_* defines
-
-1999-05-02 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/winnt.h (IMAGE_FIRST_SECTION): Prepend missing paren
- * include/winnt.h (UNALIGNED): Define
- * include/windef.h (DECLSPEC_NORETURN): Define
-
- * include/wininet.h (INTERNET_MAX_NAME): Remove
- (INTERNET_MAX_SCHEME_LENGTH): Define
- (INTERNET_MAX_URL_LENGTH): Use INTERNET_MAX_SCHEME_LENGTH
- * include/wininet.def: Completely redone, it was losing badly.
-
-1999-05-01 Anders Norlander <anorland@hem2.passagen.se>
-
- * lib/dplayx.def: Remove '_' prefixes
- * lib/shell32.def: Remove imports for IID_ContextMenu
-
-1999-04-29 Anders Norlander <anorland@hem2.passagen.se>
-
- * Makefile.in (dist): Support dist target
- * lib/Makefile.in (dist): Likewise
- * lib/Makefile.in (uninstall-headers): Fix command
- * Makefile.in (bindist): Target to build a prebuilt dist
-
- * lib/ws2_32.def: Winsock2 implib
-
- * include/largeint.h: New header
- * include/largeint.c: Large integer support library
- * lib/Makefile.in(EXTRA_LIBS): Add liblargeint.a
- (EXTRA_OBJS): Add largeint.o
-
- * include/Makefile: Remove
- * lib/Makefile: Remove
- * Makefile: Remove
- * configure.in: New autoconf script
- * configure: generated configure script
- * Makefile.in: autoconf makefile template
- * lib/Makefile.in: Ditto
- * include/test.c: mv to lib/test.c
- * include/res.rc: mv to lib/res.rc
- * include/TODO: mv to .
- * include/Notes: mv to ./NOTES
-
-1999-04-28 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/zmouse.h (WHEEL_DELTA): Define
-
-Mon Apr 26 16:36:49 1999 Mumit Khan <khan@xraylith.wisc.edu>
-
- * include/ddeml.h (HSZPAIR): Declare.
- * include/zmouse.h: New file.
-
-1999-04-27 Daniel Guerrero Miralles <daniel.guerrero@upcnet.upc.es>
-
- * lib/d3dim.def: New implib
- * lib/d3drm.def: Ditto
- * lib/d3dxof.def: Ditto
- * lib/ddraw.def: Ditto
- * lib/dinput.def: Ditto
- * lib/dplayx.def: Ditto
- * lib/dsetup.def: Ditto
- * lib/dsound.def: Ditto
- * lib/dinput.c: Guid library for DirectInput
- * lib/dxguid.c: Guid library for DirectX
-
-1999-04-21 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/windowsx.h (GET_X_LPARAM): Missing macro added (reported
- by Ron Aaron).
- * include/windowsx.h (GET_Y_LPARAM): Also missing
- * include/winnls.h (IsValidCodePage): Missing prototype added (reported
- by Mumit Khan).
-
-1999-04-18 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/scrnsave.h: New header file for screen saver library
- * lib/scrnsave.c: New file: screen saver library
-
-1999-04-17 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/regstr.h: Enclosed all strings in TEXT() macros so it
- works well in when UNICODE is defined
-
-1999-04-17 Nirmal Prasad <nprasad@truept.com>
-
- * include/winuser.h(STYLESTRUCT): New struct
- * include/wingdi.h:(GOBJENUMPROC): This function type should
- return void.
-
-1999-04-17 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/basetyps.h (LPGUID): New typedef
- * lib/glut.def: Import library defintions for glut.dll
- * lib/glu32.def: Ditto for glut32.dll
- * include/winnt.h: Fixed handling of wchar_t typedef
- * include/sql.h(SQL_NO_DATA_FOUND): Replace with SQL_NO_DATA
- * include/sqlext.h(SQL_NO_DATA_FOUND): Define as SQL_NO_DATA
-
-1999-03-20 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/winbase.h(AbnormalTermination): Define as FALSE
- * include/commctrl.h: Support for new progress bar messages/styles
-
-1999-03-20 Geoffrey Noer <noer@cygnus.com>
-
- * include/commdlg.h(PageSetupDlg): New define
- * include/richedit.h: Missing SCF_* defines
- * include/winnt.h: Lots o' defines
- * include/winbase.h(AllocateAndInitializeSid): Corrected prototype
-
-1999-03-09 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/commdlg.h: Removed pack pragma
- * lib/comctl32.def(InitCommonControlsEx@4): Added import
-
-1999-03-08 Anders Norlander <anorland@hem2.passagen.se>
-
- * Makefile: Set version to 0.1.5
- * lib/Makefile (clean): Fix typo
-
- * include/commctrl.h: Removed pack pragma
- * include/cpl.h: Likewise
- * include/dbt.h: Likewise
- * include/dde.h: Likewise
- * include/nddeapi.h: Likewise
- * include/shellapi.h: Likewise
- * include/wincrypt.h: Likewise
- * include/lmaccess.h: Fixed USER_PRIV_ADMIN typo
-
- * include/winsock.h (netent): Define only ifndef __INSIDE_CYGWIN__
- (servent): Likewise
- (protoent): Likewise
-
- * include/windows.h: Prevent inclusion of winsock.h if we are
- using or compiling cygwin. Define Win32_Winsock to force inclusion.
-
-1999-01-08 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/winbase.h (CREATE_FORCEDOS): New define
-
-1999-01-07 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/wincon.h(KEY_EVENT_RECORD): Fixed packing problem on
- (COORD): Likewise
- * include/wingdi.h (BITMAPFILEHEADER): Fixed packing
- * include/windows.h: Added DUMMYUNIONNAME4 and 5
- * include/winnt.h (LUID_AND_ATTRIBUTES_ARRAY): New type
- (PLUID_AND_ATTRIBUTES_ARRAY): New type
-
- * include/ddeml.h: Removed unnecessary `#pragma pack'
- * include/imm.h: Likewise
- * include/nddeapi.h: Likewise
- * include/nspapi.h: Likewise
- * include/regstr.h: Likewise
- * include/wincon.h: Likewise
- * include/windef.h: Likewise
- * include/winioctl.h: Likewise
- * include/winnls.h: Likewise
- * include/winsvc.h: Likewise
- * include/winuser.h: Likewise
- * include/winver.h: Likewise
- * include/wtypes.h: Likewise
-
-1999-01-05 Anders Norlander <anorland@hem2.passagen.se>
-
- * Makefile (VERSION): Set to 0.1.4
- * include/basetyps.h: Check for NOCOMOBJECT
- * include/Makefile: Pass -DNOCOMOBJECT to g++ to avoid warnings
- on comobject attribute.
- * lib/kernel32.def: Added a few functions
- * include/windef.h (DWORD): Changed back to unsigned long
-
- * include/windows.h: Include only winresrc.h if RC_INVOKED is defined,
- winresrc.h in turn includes the necessary headers. This makes things
- much simpler, no need to protect blocks of code in headers that
- should not be seen by the resource compiler.
-
-1999-01-05 Geoffrey Noer <noer@cygnus.com>
-
- * include/winbase.h (STATUS_INVALID_HANDLE): Added define
- * include/wincon.h: Added console event type flags
- * include/winnt.h (FILE_SHARE_DELETE): Added
- (SECURITY_DESCRIPTOR): typedef as DWORD
-
- * include/winuser.h (WM_PENWINFIRST): Fixed typo
- * include/winsock.h: Protect some blocks with __INSIDE_CYGWIN_ and
- define u_* types only if _SYS_TYPES_H is not defined.
-
-1999-01-02 Anders Norlander <anorland@hem2.passagen.se>
-
- * COPYING.LIB: Deleted
- * README: Updated to reflect license changes
- * include/shlobj.h: Remove extra comma on some enums
- * include/windef.h: Changed DWORD typedef from unsigned long to
- unsigned int in order to avoid warnings on bit fields that
- use DWORD.
- * include/Makefile (test): Compile with all warnings
- * include/unknwn.h: Include objfwd.h
- * include/winsock.h: Added missing copyright notices.
-
-1999-01-01 Anders Norlander <anorland@hem2.passagen.se>
-
- * lib/winmm.def: Corrected LIBRARY statement
- * include/mmsystem.h: Define mmioSeek codes if not already defined
- * include/commctrl.h (CreateStatusWindowA): Corrected prototype
- (CreateStatusWindowW): Likewise
-
- * include/winresrc.h: Include only files necessary instead of windows.h
- * include/dde.h: Allow inclusion in resource scripts.
- * include/winnt.h: Likewise
- * include/commctrl.h: Likewise
- * include/prsht.h: Likewise
- * README: Updated
-
-1998-12-10 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/sqltypes.h (SQLHANDLE): Added this type
- (SQLHDESC): Likewise
- * include/sql.h (SQLFreeHandle): Added this prototype
- (SQLAllocHandle): Likewise
-
-1998-12-08 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/winsock.h: Define _GNU_H_WINDOWS32_SOCKETS to avoid
- conflicts with cygwin headers.
-
-1998-12-06 Anders Norlander <anorland@hem2.passagen.se>
-
- * Makefile: Changed VERSION to 0.1.3
- * Makefile (dist-lib): New target to make import library only
- distribution
- * Makefile (dist-hdr): New target to make headers only distribution
- * Makefile (dist): Now depends on dist-lib and dist-hdr instead of
- building one single distribution file.
- * dist.mak: Deleted
-
- * include/lm.h: New file
- * include/lmcons.h: New file
- * include/lmalert.h: New file
- * include/lmaudit.h: New file
- * include/lmconfig.h: New file
- * include/lmapibuf.h: New file
- * include/lmaccess.h: New file
- * include/lmchdev.h: New file
- * include/lmremutl.h: New file
- * include/lmrepl.h: New file
- * include/lmerrlog.h: New file
- * include/lmat.h: New file
- * include/lmuse.h: New file
- * include/lmuseflg.h: New file
- * include/lmserver.h: New file
- * include/lmerr.h: New file
- * include/lmsname.h: New file
- * include/lmstats.h: New file
- * include/lmsvc.h: New file
- * include/lmwksta.h: New file
- * include/lmbrowsr.h: New file
-
-1998-12-05 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/unknwn.h: Fixed IClassFactory declaration; INTERFACE was missing
- * include/unknwn.h: Added extern declaration for IID_IClassFactory
-
- * include/initguid.h: New file
-
- * include/rpcndr.h: Defined hyper and MIDL_hyper as double if 64 bit
- int not supported
-
- * include/winnt.h: Added USN
- * include/winnt.h: Changed handling of 64 bit int support
-
- * include/windows.h: Added support for BC,LCC and MSVC
-
- * include/windows.h: Changed handling machine architecture defines
-
- * include/olectl.h: New file
-
-1998-12-04 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/oleidl.h: Added IViewObject and IViewObject2
-
- * include/objidl: Corrected prototype for IStorage::DestroyElement and
- IStorage::MoveElement
-
- * include/oledlg.h: New file
-
- * include/winresrc.h: New file
-
- * include/wingdi.h: Added LPDOCINFO
-
- * include/commctrl.h: Added SBARS_SIZEGRIP and TVM_SETINDENT
- * include/commctrl.h: Added TCM_SETITEM to UNICODE/ANSI block
- * include/commctrl.h: Added ListView_GetSelectedCount, ListView_GetItemSpacing,
- TabCtrl_SetImageList and TabCtrl_GetItemCount
- * include/commctrl.h: Added TVM_FIRST, HDM_FIRST and TV_FIRST
-
- * include/windowsx.h: Added missing ListBox_xx ComboBox_xx etc. macros
-
- * include/wingdi.h: Added (L)PBITMAP,(L)PBITMAPCOREHEADER,
- PBITMAPINFOHEADER, (L)PBITMAPCOREINFO and (L)PBITMAPFILEHEADER.
-
- * include/commdlg.h: Added LPDEVNAMES
-
- * include/windows.h: Include excpt.h
-
- * include/excpt.h: New file. This file just contains some
- stubs for SEH that do nothing.
-
- * include/commctrl.h: Added general WM_NOTIFY codes
-
- * include/winuser.h: Added ICON_SMALL and ICON_BIG
- * include/winuser.h: Removed VK_0-VK_9 VK_A-VK_Z; they should obviously
- not be in the headers.
- * include/winuser.h: Added LPCBTACTIVATESTRUCT and LPCLIENTCREATESTRUCT
- * include/winuser.h: Added old WM_SIZE parameter names so
- wxWindows compiles.
- * include/winuser.h: Added IDC_SIZE and IDC_ICON
- * include/winuser.h: Added LPDLGITEMTEMPLATE
- * include/winuser.h: HTCAPTION was missing value
- * include/winuser.h: Added WM_ACTIVE flags
-
- * include/windowsx.h: Added _fmemcpy so V compiles; also added
- _fxx defines for memmove, memset and memcmp
-
- * include/windef.h: Changed _export and __export to empty defines
-
- * include/shellapi.h: Corrected prototypes for ExtractIcon functions.
- String parameters were not const and ExtractAssociatedIcon takes
- a WORD pointer not DWORD pointer as last parameter.
-
- * Makefile: Changed VERSION to 0.1.2
-
- * include/ole2ver.h: New file
-
- * Makefile: Removed all dependencies on GLUT
-
- * include/GL/glut.h: Removed file because of decision to remove
- files that are not part of the library.
- * lib/glut.def: Likewise
- * lib/glut32.def: Likewise
-
- * include/windows.h: Include winperf.h
-
- * include/winperf.h: New file
-
- * lib/gdi32.def: Added GetEnhMetaFilePixelFormat
-
- * include/winnls.h: Added calendar types
- * include/winnls.h: Added country codes
-
-1998-12-03 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/windef.h: Added PROC and NEARPROC
-
- * include/wingdi.h: Added ChoosePixelFormat, DescribePixelFormat
- * include/wingdi.h: Added OpenGL types and prototypes
- * include/wingdi.h: Added ENHMETA_STOCK_OBJECT
- * include/wingdi.h: Added DCTT_DOWNLOAD_OUTLINE
- * include/wingdi.h: Added POINTFX, TTPOLYCURVE and TTPOLYGONHEADER
- * include/wingdi.h: Added truetype character outline types
- * include/wingdi.h: Added DEVMODE initialization flags
- * include/wingdi.h: Added panose codes
- * include/wingdi.h: Added missing character sets
- * include/wingdi.h: Added ANTIALIASED_QUALITY and
- NONANTIALIASED_QUALITY
- * include/wingdi.h: Added ENUMLOGFONTA/W and ENUMLOGFONTEXA/W
- * include/wingdi.h: Added pointer types for EXTLOGPEN
- * include/wingdi.h: Added PATTERN type
- * include/wingdi.h: Added NEWTEXTMETRICA/W and NEWTEXTMETRICEXA/W
- * include/wingdi.h: Added new text metric flags
- * include/wingdi.h: Added pitch and family flags
- * include/wingdi.h: Moved BCHAR defintion from winnt.h here
- * include/wingdi.h: Added METAHEADER
- * include/wingdi.h: Fixed packing of RGBTRIPLE and BITMAPFILEHEADER
- * include/wingdi.h: Added TA_MASK
- * include/wingdi.h: Added MAXSTRETCHBLTMODE
- * include/wingdi.h: Added error codes
-
- * include/winuser.h: Added missing winhelp structures
- * include/winuser.h: Added dialog flags/styles/messages
- * include/winuser.h: Added EM_SETMARGIN codes
- * include/winuser.h: Made it possiblie to use IDI_XX values
- in resource files.
- * include/winuser.h: Added missing LoadImage load flags
- * include/winuser.h: Added missing message box flags
- * include/winuser.h: Added ScrollWindow codes
- * include/winuser.h: Added DT_WORD_ELLIPSIS
- * include/winuser.h: Added drag and drop support
- * include/winuser.h: Added WM_MENUCHAR return codes
- * include/winuser.h: Added DLGWINDOWEXTRA
- * include/winuser.h: Added missing SetWindowPos flags.
- * include/winuser.h: Added BSF_NOTIMEOUTIFNOTHUNG
- * include/winuser.h: Added IDHOT_xx defines
- * include/winuser.h: Added MOD_WIN
- * include/winuser.h: Added missing defines and structs for owner draw
- controls.
- * include/winuser.h: Added WPF_RESTORETOMAXIMIZED and
- WPF_SETMINPOSITION
- * include/winuser.h: Added DrawAnimatedRects flags
- * include/winuser.h: Added WM_PRINT codes
- * include/winuser.h: Added CS_IME class style
- * include/winuser.h: Added WM_SIZE codes
- * include/winuser.h: Added WM_MOUSEACTIVATE return codes
- * include/winuser.h: Added WM_NCHITTEST return codes
- * include/winuser.h: Added WM_SIZING parameters
- * include/winuser.h: Added WM_NEXTMENU and MDINEXTMENU
- * include/winuser.h: Added menu loop codes.
- * include/winuser.h: Added NFR_ANSI, NFR_UNICODE, NF_QUERY and
- NF_REQUERY
- * include/winuser.h: Added WM_POWER flags
- * include/winuser.h: Added KL_NAMELENGTH, WSF_VISIBLE
- * include/winuser.h: Added missing message filter codes
- * include/winuser.h: Added WM_KEYXX message flags
- * include/winuser.h: Added WM_SHOWMESSAGE flags
- * include/winuser.h: Added old ShowWindow commands
- * include/winuser.h: Fixed packing of DLGITEMTEMPLATE and DLGTEMPLATE
- structures.
-
- * include/mciavi.h: New file for the MCI AVI driver that for some
- reason is not in mmsystem.h.
-
- * include/winbase.h: Added PIPE_UNLIMITED_INSTANCES and INVALID_FILE_SIZE
- * include/winbase.h: Added SECURITY_xx for CreateFile
- * include/winbase.h: Added RTS and DTS control values
- * include/winbase.h: Fixed SYSTEM_INFO structure
- * include/winbase.h: Added CREATE_NO_WINDOW, CREATE_SHARED_WOW_VDM
- * include/winbase.h: Added FILE_TYPE_REMOTE
- * include/winbase.h: Added modem status flags
- * include/winbase.h: Added HINSTANCE_ERROR
- * include/winbase.h: Added DefineDosDevice defines
- * include/winbase.h: Added power management flags AC_xx BATTERY_xx
- * include/winbase.h: Added STARTF_XX flags
- * include/winbase.h: Fixed typo on _lcreat prototype.
- * include/winbase.h: Moved DBG_XX to winnt.h
- * include/winbase.h: Moved TOKEN_XX, DLL_PROCESS_XX and DLL_THREAD_XX to
- winnt.h
-
- * include/unknwn.h: Added extern declaration of IID_IUnknown
-
- * include/windowsx.h: Added hmemcpy.
-
- * include/winnt.h: Added dummy member to DECLARE_HANDLE struct
- * include/winnt.h: Added PACCESS_TOKEN
- * include/winnt.h: Added TAPE_XX defines and moved some from winbase.h
- * include/winnt.h: Added SE_IMPERSONATION_STATE and TOKEN_SOURCE_LENGTH
- * include/winnt.h: Added SE_PRIVILEGE_ENABLED_BY_DEFAULT, SE_PRIVILEGE_ENABLED,
- SE_PRIVILEGE_USED_FOR_ACCESS, PRIVILEGE_SET_ALL_NECESSARY,
- SECURITY_MAX_IMPERSONATION_LEVEL, DEFAULT_IMPERSONATION_LEVEL,
- SECURITY_DYNAMIC_TRACKING and SECURITY_STATIC_TRACKING.
-
- * include/winnt.h: Added SE_OWNER_DEFAULTED, SE_GROUP_DEFAULTED, SE_DACL_XX,
- SE_SACL_XX, SE_SELF_RELATIVE, SECURITY_DESCRIPTOR_MIN_LENGTH,
- SECURITY_DESCRIPTOR_REVISION and SECURITY_DESCRIPTOR_REVISION1.
-
- * include/winsvc.h: Removed conflicting defines which were supposed
- to be in winnt.h
-
- * include/winnt.h: Added SERVICE_NODE_TYPE, SERVICE_LOAD_TYPE
- and SERVICE_ERROR_TYPE.
-
- * include/winnt.h: Added SERVICE_XX defines.
- * include/winsvc.h: Added SERVICES_ACTIVE_DATABASEA/W,
- SERVICES_FAILED_DATABASEA/W and SC_GROUP_IDENTIFIERA/W.
-
- * include/winsvc.h: Added SERVICE_STATE_ALL, SERVICE_QUERY_CONFIG,
- SERVICE_CHANGE_CONFIG, SERVICE_QUERY_STATUS, SERVICE_ENUMERATE_DEPENDENTS,
- SERVICE_START, SERVICE_STOP, SERVICE_PAUSE_CONTINUE,
- SERVICE_USER_DEFINED_CONTROL and SERVICE_ALL_ACCESS
-
-1998-12-02 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/winbase.h: Corrected prototype for CreateProcessA
-
- * include/mmsystem.h: Added CAPS1 and C1_TRANSPARENT for display
- driver extensions.
-
- * include/shlobj.h: Corrected prototype for SHGetDesktopFolder, should
- be LPSHELLFOLDER* not LPSHELLFOLDER.
-
- * include/windows.h: Include commdlg.h
-
- * include/winuser.h: Added MDICREATESTRUCT
-
- * include/winuser.h: Added LB_ERR, LB_ERRSPACE, LB_OKAY, CB_ERR,
- CB_ERRSPACE, and CB_OKAY
-
- * include/wingdi.h: Added LPBITMAPINFOHEADER
-
- * include/rpcproxy.h: Removed IN, OUT and OPTIONAL since they
- are meaningless.
- * include/rpcdce2.h: Likewise.
-
- * lib/shell32.c: Moved GUID defintions from shlguid.h to this file.
-
- * include/richole.h: Replaced DEFINE_GUID with extern const GUID
- * include/olectlid.h: Likewise
- * include/shlguid.h: Likewise
-
- * include/coguid.h: Delete file since it was for 16 bit windows only.
-
- * lib/*.def: Appended .dll to library name where needed.
-
- * include/windef.h: Define _stdcall and __stdcall only if not
- previously defined instead of undefining first.
-
- * include/dlgs.h: Put RC_INVOKED around structure defs
-
- * include/intshcut.h: New file
- * include/isguids.h: New file
-
- * lib/uuid.c: Added all COM/OLE GUIDS I know and do not know about.
-
-1998-12-01 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/winnt.h: Added check if _T is defined before defining it
-
- * include/windows.h: Include dlgs.h if WIN32_LEAN_AND_MEAN not defined
-
- * include/dlgs.h: New file
-
- * include/winbase.h: Removed DllEntryPoint define
-
- * include/winbase.h: Added SetupComm prototype
-
- * include/rpc.h: SEH RPC functions no longer defined since they weren't
- supported anyway.
-
- * include/basetyps.h: Removed use of COMOBJECT define, instead
- DECLARE_INTERFACE directly uses comobject attribute when GCC
- is used.
-
- * include/wtypes.h: STGC enum was missing typedef
-
- * include/objidl.h: ADVC enum was missing typedef
-
- * include/winnt.h: Moved CHAR, SHORT and LONG definitions so
- they are nested within the VOID definition.
-
- * include/winbase.h: Added stream ids and attributes
-
- * include/winbase.h: Changed WIN32_STREAM_ID member cStreamName
- to an ANYSIZE_ARRAY array.
-
-1998-11-26 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/windef.h: defined _declspec as __declspec since
- some programs (like VWCL) use _declspec instead of __declspec
-
- * include/winnt.h: added COMPRESS_FORMAT defines
-
- * include/winbase.h: moved IS_TEXT_XXX defines to winnt.h
-
- * include/winnt.h: added HEAP_XXXX defines
-
- * include/winbase.h: moved HEAP_XXXX defines to winnt.h
-
- * include/winnt.h: added defintions for PE/COFF from the PE and COFF
- specification.
-
- * include/winnt.h: added NTAPI define
-
-1998-11-25 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/winnt.h: defined TBYTE,LPTSTR etc in terms of TCHAR
- instead of CHAR or WCHAR.
-
- * include/winnt.h: added _T define
-
- * include/winnt.h: added test for _TCHAR_DEFINED
-
- * include/winnt.h: included string.h for memory macros
-
- * include/prsht.h: added PSM_SETFINISHTEXT to UNICODE/ANSI test
-
- * include/prsht.h: moved PSM_SETTITLEA/W to UNICODE test at end of file
-
- * include/prsht.h: added PropSheet_XXX macros
-
-
-1998-11-24 Anders Norlander <anorland@hem2.passagen.se>
-
- * include/winspool.h: Changed DeletePrinterProcessor and
- DeletePrinterProvidor to DeletePrintXX.
-
- * include/wingdi.h: Changed EMRCREATECOLORSPACE lcs member type to
- LOGCOLORSPACEW.
-
- * include/wingdi.h: Changed prototype for CreateColorSpace to A and W
- variants
-
- * include/wingdi.h: Likewise for GetLogColorSpace
-
- * include/wingdi.h: Changed LOGCOLORSPACE to LOGCOLORSPACEA/W.
-
- * include/richedit.h: Added missing defines and structures
-
- * include/winuser.h: Moved EDITWORDBREAKPROCEX to include/richedit.h
-
- * include/winuser.h: Added HWND_DESKTOP
-
-1998-11-23 Anders Norlander <anorland@hem2.passagen.se>
-
- * Makefile: Include ChangeLog when building source
- distribution (srcdist)
-
- * include/oleauto.h: Changed WINOLEAUTAPI and WINOLEAUTAPI_ so they
- are always defined as STDAPI and STDAPI_
-
- * include/objbase.h: Changed WINOLEAPI and WINOLEAPI_ so they
- are always defined as STDAPI and STDAPI_
-
- * include/objidl.h: Removed extra ';' on IStorage SetClass method
-
- * include/rpcndr.h: Removed all IN and OUT from function prototypes
-
- * ChangeLog started
diff --git a/winsup/w32api/Makefile.in b/winsup/w32api/Makefile.in
deleted file mode 100644
index e97cdd3..0000000
--- a/winsup/w32api/Makefile.in
+++ /dev/null
@@ -1,171 +0,0 @@
-#
-# Makefile.in
-#
-# This file is part of a free library for the Win32 API.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# start config section
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-build_alias = @build@
-host_alias = @host@
-target_alias = @target@
-prefix = @prefix@
-conf_prefix = @prefix@
-# FIXME: this needs an appropriate AC_SUBST
-host_os = mingw32
-
-program_transform_name = @program_transform_name@
-exec_prefix = @exec_prefix@
-bindir = @bindir@
-libdir = @libdir@
-tooldir = $(exec_prefix)/$(target_alias)
-datadir = @datadir@
-infodir = @infodir@
-includedir = @includedir@
-
-CC = @CC@
-CC_FOR_TARGET = $(CC)
-CFLAGS = @CFLAGS@
-
-DLLTOOL = @DLLTOOL@
-AS = @AS@
-AS_FOR_TARGET = $(AS_FOR_TARGET)
-WINDRES = @WINDRES@
-
-RANLIB = @RANLIB@
-AR = @AR@
-LD = @LD@
-
-TAR = tar
-TARFLAGS = z
-TARFILEEXT = .tar.gz
-
-FLAGS_TO_PASS = \
- AS="$(AS)" \
- CC="$(CC)" \
- CPPFLAGS="$(CPPFLAGS)" \
- CFLAGS="$(CFLAGS)" \
- CXXFLAGS="$(CXXFLAGS)" \
- AR="$(AR)" \
- RANLIB="$(RANLIB)" \
- LD="$(LD)" \
- DLLTOOL="$(DLLTOOL)" \
- TAR="$(TAR)" \
- TARFLAGS="$(TARFLAGS)" \
- TARFILEEXT="$(TARFILEEXT)" \
- WINDRES="$(WINDRES)"
-
-# end config section
-
-SUBDIRS = lib
-
-PACKAGE = w32api
-VERSION = 3.13
-CYGRELEASE = 1
-
-DIST_FILES = Makefile.in configure.in configure config.guess config.sub \
-aclocal.m4 install-sh README.w32api ChangeLog TODO CONTRIBUTIONS
-
-all: lib
-
-%-subdirs:
- for i in $(SUBDIRS); do \
- $(MAKE) $(FLAGS_TO_PASS) -C $$i $*; \
- done
-
-lib:
- $(MAKE) $(FLAGS_TO_PASS) -C $@
-
-test:
- $(MAKE) -C lib test $(FLAGS_TO_PASS)
-
-install uninstall:
- for i in $(SUBDIRS); do \
- (cd $$i; $(MAKE) $@); \
- done
-
-ifdef SNAPDATE
- distdir = $(PACKAGE)-$(VERSION)-$(SNAPDATE)-$(host_os)
-else
- ifneq (,$(findstring cygwin, $(target_alias)))
- distdir=$(PACKAGE)-$(VERSION)-$(CYGRELEASE)
- else
- distdir=$(PACKAGE)-$(VERSION)-$(host_os)
- endif
-endif
-
-ifneq (,$(findstring mingw, $(target_alias)))
- dist_prefix=
-else
- dist_prefix=/$(conf_prefix)
-endif
-
-ifneq (,$(findstring cygwin, $(target_alias)))
- TARFLAGS = j
- TARFILEEXT = .tar.bz2
-endif
-
-dist: srcdist bindist
-
-srcdist:
- rm -rf $(distdir)
- mkdir $(distdir)
- chmod 755 $(distdir)
- for i in $(DIST_FILES); do \
- cp -p $(srcdir)/$$i $(distdir)/$$i ; \
- done
- for i in $(SUBDIRS); do \
- (cd $$i; $(MAKE) distdir=../$(distdir) dist); \
- done
- rm -f $(distdir)-src$(TARFILEEXT)
- $(TAR) $(TARFLAGS)cf $(distdir)-src$(TARFILEEXT) $(distdir)
-
-ifneq (,$(findstring cygwin, $(target_alias)))
-bindist:
- rm -rf $(distdir)
- mkdir $(distdir)
- chmod 755 $(distdir)
- $(MAKE) install prefix=`pwd`/$(distdir)$(dist_prefix) exec_prefix=`pwd`/$(distdir)$(dist_prefix)
- rm -f $(distdir)$(TARFILEEXT)
- cd $(distdir); $(TAR) $(TARFLAGS)cf ../$(distdir)$(TARFILEEXT) *
-else
-bindist:
- rm -rf $(distdir)
- mkdir $(distdir)
- chmod 755 $(distdir)
- $(MAKE) install prefix=`pwd`/$(distdir)$(dist_prefix) exec_prefix=`pwd`/$(distdir)$(dist_prefix)
- rm -f $(distdir)$(TARFILEEXT)
- cd $(distdir); $(TAR) $(TARFLAGS)cf ../$(distdir)-dev$(TARFILEEXT) *
-endif
-
-snapshot:
- make dist SNAPDATE=$(shell date '+%Y%m%d')
-
-Makefile: Makefile.in config.status configure
- $(SHELL) config.status
-
-mostlyclean-top:
- rm -f *~
-clean-top: mostlyclean-top
- rm -rf $(distdir)
- rm -f $(distdir)*$(TARFILEEXT)
-maintainer-clean-top:
-
-mostlyclean: mostlyclean-top mostlyclean-subdirs
-clean: mostlyclean-top clean-subdirs
-distclean: clean-top
- $(MAKE) -C lib/directx distclean
- $(MAKE) -C lib/ddk distclean
- $(MAKE) -C lib distclean
- rm -f Makefile config.status config.log config.cache TAGS *~
-maintainer-clean: maintainer-clean-subdirs
-
-.PHONY: lib test
diff --git a/winsup/w32api/README.w32api b/winsup/w32api/README.w32api
deleted file mode 100644
index f5b6950..0000000
--- a/winsup/w32api/README.w32api
+++ /dev/null
@@ -1,32 +0,0 @@
- Free headers and libraries for the Win32 API
-
- Originally written by Anders Norlander <anorland@telia.com>
-
- Now maintained by MinGW Developers
- Send bug reports and questions to MinGW-users@lists.sourceforge.net
- URL: http://www.mingw.org
- Individual contributors can be found in the ChangeLog file.
-
-Unless otherwise stated in individual source files,
-
- THIS SOFTWARE IS NOT COPYRIGHTED
-
- This source code is offered for use in the public domain. You may use,
- modify or distribute it freely.
-
- This source code is distributed in the hope that it will be useful but
- WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- DISCLAIMED. This includes but is not limited to warranties of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-Portions of winsock.h, winsock2.h and ws2tcpip.h are
-
- Copyright (c) 1980, 1983, 1988, 1993
- The Regents of the University of California. All rights reserved.
-
- Copyright (c) 1993 by Digital Equipment Corporation.
-
-gl.h is from the Mesa 3-D graphics library, Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
-
-glext.h and glu.h are Copyright (c) 1991-2000 Silicon Graphics, Inc. and are subject to the SGI Free Software License B, Version 1.1
-
diff --git a/winsup/w32api/TODO b/winsup/w32api/TODO
deleted file mode 100644
index 9acfbbe..0000000
--- a/winsup/w32api/TODO
+++ /dev/null
@@ -1,62 +0,0 @@
-Makefile.in: Need to redo the clean targets
-
-**Check to see if the rest of this is still valid?**
-
-winsock2.h - Possible to merge with winsock.h?
-listview control
-_WIN32_IE issue
-
-Missing functions/defines/structs
-=================================
-ATF_AVAILABLE
-SERKF_ACTIVE
-TIMER_ALL_ACCESS,TIMER_MODIFY_STATE (new style Win32 Access Control: accctrl)
-AbnormalTermination and other low-level exception handling macros/functions.
-GetExceptionCode
-GetExceptionInformation
-GetAuditedPermissionsFromAcl
-GetEffectiveRightsFromAcl
-GetExplicitEntriesFromAcl
-AcsLan
-BuildExplicitAccessWithName
-BuildImpersonateExplicitAccessWithName
-BuildImpersonateTrustee
-BuildSecurityDescriptor
-BuildTrusteeWithName
-BuildTrusteeWithSid
-GetMultipleTrustee
-GetMultipleTrusteeOperation
-GetNamedSecurityInfo
-GetSecurityInfo
-GetTrusteeForm
-GetTrusteeName
-GetTrusteeType
-PF_XXXX defines for IsProcessorFeaturePresent
-LookupSecurityDescriptorParts
-LSXXXX lsapi functions/types
-RASADFunc through RasValidateEntryName (RASAPI ras.h)
-SetEntriesInAcl
-SetNamedSecurityInfo
-SetSecurityInfo
-SetServiceBits
-SnmpExtensionInit through SnmpUtilVarBindListFree (mgmtapi.h/snmp.h
- Simple Network Management Protocol(SNMP))
-SOBailOut through SUUserSaveData, VwStreamCloseFunc through VwStreamTellFunc
- (File viewer/parser (quick view))
-WinSubmitCertificate (wintrust.h)
-WinTrustProviderClientInitialize through WinVerifyTrust
-EXPLICIT_ACCESS
-INotifyReplica (reconcil)
-
-OLE/COM:
-========
-oleidl.h
-oaidl.h
-ocidl.h
-Some GUIDs should be in libole32.a instead of libuuid.a
-
-Low priority
-============
-RASAPI
-MAPI
-directx (what about existing ports?)
diff --git a/winsup/w32api/aclocal.m4 b/winsup/w32api/aclocal.m4
deleted file mode 100644
index 177c013..0000000
--- a/winsup/w32api/aclocal.m4
+++ /dev/null
@@ -1,831 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-# lib-prefix.m4 serial 4 (gettext-0.14.2)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
-dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
-dnl require excessive bracketing.
-ifdef([AC_HELP_STRING],
-[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
-[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
-
-dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
-dnl to access previously installed libraries. The basic assumption is that
-dnl a user will want packages to use other packages he previously installed
-dnl with the same --prefix option.
-dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
-dnl libraries, but is otherwise very convenient.
-AC_DEFUN([AC_LIB_PREFIX],
-[
- AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib-prefix],
-[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
- --without-lib-prefix don't search for libraries in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
- fi
- fi
-])
- if test $use_additional = yes; then
- dnl Potentially add $additional_includedir to $CPPFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's already present in $CPPFLAGS,
- dnl 3. if it's /usr/local/include and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- for x in $CPPFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $CPPFLAGS.
- CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- dnl Potentially add $additional_libdir to $LDFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's already present in $LDFLAGS,
- dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
- haveit=
- for x in $LDFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_libdir" = "X/usr/local/lib"; then
- if test -n "$GCC"; then
- case $host_os in
- linux*) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LDFLAGS.
- LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- fi
-])
-
-dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
-dnl acl_final_exec_prefix, containing the values to which $prefix and
-dnl $exec_prefix will expand at the end of the configure script.
-AC_DEFUN([AC_LIB_PREPARE_PREFIX],
-[
- dnl Unfortunately, prefix and exec_prefix get only finally determined
- dnl at the end of configure.
- if test "X$prefix" = "XNONE"; then
- acl_final_prefix="$ac_default_prefix"
- else
- acl_final_prefix="$prefix"
- fi
- if test "X$exec_prefix" = "XNONE"; then
- acl_final_exec_prefix='${prefix}'
- else
- acl_final_exec_prefix="$exec_prefix"
- fi
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
- prefix="$acl_save_prefix"
-])
-
-dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
-dnl variables prefix and exec_prefix bound to the values they will have
-dnl at the end of the configure script.
-AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
-[
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- acl_save_exec_prefix="$exec_prefix"
- exec_prefix="$acl_final_exec_prefix"
- $1
- exec_prefix="$acl_save_exec_prefix"
- prefix="$acl_save_prefix"
-])
-
-# lib-link.m4 serial 6 (gettext-0.14.3)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_PREREQ(2.50)
-
-dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
-dnl augments the CPPFLAGS variable.
-AC_DEFUN([AC_LIB_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
- ac_cv_lib[]Name[]_libs="$LIB[]NAME"
- ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
- ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
- ])
- LIB[]NAME="$ac_cv_lib[]Name[]_libs"
- LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
- INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
- dnl results of this search when this library appears as a dependency.
- HAVE_LIB[]NAME=yes
- undefine([Name])
- undefine([NAME])
-])
-
-dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
-dnl searches for libname and the libraries corresponding to explicit and
-dnl implicit dependencies, together with the specified include files and
-dnl the ability to compile and link the specified testcode. If found, it
-dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
-dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
-dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
-dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
-AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-
- dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
- dnl accordingly.
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
-
- dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
- dnl because if the user has installed lib[]Name and not disabled its use
- dnl via --without-lib[]Name-prefix, he wants to use it.
- ac_save_CPPFLAGS="$CPPFLAGS"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-
- AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS $LIB[]NAME"
- AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
- LIBS="$ac_save_LIBS"
- ])
- if test "$ac_cv_lib[]Name" = yes; then
- HAVE_LIB[]NAME=yes
- AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
- AC_MSG_CHECKING([how to link with lib[]$1])
- AC_MSG_RESULT([$LIB[]NAME])
- else
- HAVE_LIB[]NAME=no
- dnl If $LIB[]NAME didn't lead to a usable library, we don't need
- dnl $INC[]NAME either.
- CPPFLAGS="$ac_save_CPPFLAGS"
- LIB[]NAME=
- LTLIB[]NAME=
- fi
- AC_SUBST([HAVE_LIB]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- undefine([Name])
- undefine([NAME])
-])
-
-dnl Determine the platform dependent parameters needed to use rpath:
-dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
-dnl hardcode_direct, hardcode_minus_L.
-AC_DEFUN([AC_LIB_RPATH],
-[
- dnl Tell automake >= 1.10 to complain if config.rpath is missing.
- m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
- AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
- AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
- AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
- AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
- CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
- ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
- . ./conftest.sh
- rm -f ./conftest.sh
- acl_cv_rpath=done
- ])
- wl="$acl_cv_wl"
- libext="$acl_cv_libext"
- shlibext="$acl_cv_shlibext"
- hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
- hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
- hardcode_direct="$acl_cv_hardcode_direct"
- hardcode_minus_L="$acl_cv_hardcode_minus_L"
- dnl Determine whether the user wants rpath handling at all.
- AC_ARG_ENABLE(rpath,
- [ --disable-rpath do not hardcode runtime library paths],
- :, enable_rpath=yes)
-])
-
-dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
-AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
-[
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib$1-prefix],
-[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
- --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
- fi
- fi
-])
- dnl Search the library and its dependencies in $additional_libdir and
- dnl $LDFLAGS. Using breadth-first-seach.
- LIB[]NAME=
- LTLIB[]NAME=
- INC[]NAME=
- rpathdirs=
- ltrpathdirs=
- names_already_handled=
- names_next_round='$1 $2'
- while test -n "$names_next_round"; do
- names_this_round="$names_next_round"
- names_next_round=
- for name in $names_this_round; do
- already_handled=
- for n in $names_already_handled; do
- if test "$n" = "$name"; then
- already_handled=yes
- break
- fi
- done
- if test -z "$already_handled"; then
- names_already_handled="$names_already_handled $name"
- dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
- dnl or AC_LIB_HAVE_LINKFLAGS call.
- uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
- eval value=\"\$HAVE_LIB$uppername\"
- if test -n "$value"; then
- if test "$value" = yes; then
- eval value=\"\$LIB$uppername\"
- test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
- eval value=\"\$LTLIB$uppername\"
- test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
- else
- dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
- dnl that this library doesn't exist. So just drop it.
- :
- fi
- else
- dnl Search the library lib$name in $additional_libdir and $LDFLAGS
- dnl and the already constructed $LIBNAME/$LTLIBNAME.
- found_dir=
- found_la=
- found_so=
- found_a=
- if test $use_additional = yes; then
- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
- found_dir="$additional_libdir"
- found_so="$additional_libdir/lib$name.$shlibext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- else
- if test -f "$additional_libdir/lib$name.$libext"; then
- found_dir="$additional_libdir"
- found_a="$additional_libdir/lib$name.$libext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- fi
- fi
- fi
- if test "X$found_dir" = "X"; then
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- case "$x" in
- -L*)
- dir=`echo "X$x" | sed -e 's/^X-L//'`
- if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
- found_dir="$dir"
- found_so="$dir/lib$name.$shlibext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- else
- if test -f "$dir/lib$name.$libext"; then
- found_dir="$dir"
- found_a="$dir/lib$name.$libext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- fi
- fi
- ;;
- esac
- if test "X$found_dir" != "X"; then
- break
- fi
- done
- fi
- if test "X$found_dir" != "X"; then
- dnl Found the library.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
- if test "X$found_so" != "X"; then
- dnl Linking with a shared library. We attempt to hardcode its
- dnl directory into the executable's runpath, unless it's the
- dnl standard /usr/lib.
- if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
- dnl No hardcoding is needed.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $found_dir"
- fi
- dnl The hardcoding into $LIBNAME is system dependent.
- if test "$hardcode_direct" = yes; then
- dnl Using DIR/libNAME.so during linking hardcodes DIR into the
- dnl resulting binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $found_dir"
- fi
- else
- dnl Rely on "-L$found_dir".
- dnl But don't add it if it's already contained in the LDFLAGS
- dnl or the already constructed $LIBNAME
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
- fi
- if test "$hardcode_minus_L" != no; then
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
- dnl here, because this doesn't fit in flags passed to the
- dnl compiler. So give up. No hardcoding. This affects only
- dnl very old systems.
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- fi
- else
- if test "X$found_a" != "X"; then
- dnl Linking with a static library.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
- else
- dnl We shouldn't come here, but anyway it's good to have a
- dnl fallback.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
- fi
- fi
- dnl Assume the include files are nearby.
- additional_includedir=
- case "$found_dir" in
- */lib | */lib/)
- basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
- additional_includedir="$basedir/include"
- ;;
- esac
- if test "X$additional_includedir" != "X"; then
- dnl Potentially add $additional_includedir to $INCNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's /usr/local/include and we are using GCC on Linux,
- dnl 3. if it's already present in $CPPFLAGS or the already
- dnl constructed $INCNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- for x in $CPPFLAGS $INC[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $INCNAME.
- INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- fi
- dnl Look for dependencies.
- if test -n "$found_la"; then
- dnl Read the .la file. It defines the variables
- dnl dlname, library_names, old_library, dependency_libs, current,
- dnl age, revision, installed, dlopen, dlpreopen, libdir.
- save_libdir="$libdir"
- case "$found_la" in
- */* | *\\*) . "$found_la" ;;
- *) . "./$found_la" ;;
- esac
- libdir="$save_libdir"
- dnl We use only dependency_libs.
- for dep in $dependency_libs; do
- case "$dep" in
- -L*)
- additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
- dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 3. if it's already present in $LDFLAGS or the already
- dnl constructed $LIBNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
- haveit=
- if test "X$additional_libdir" = "X/usr/local/lib"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LIBNAME.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- haveit=
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LTLIBNAME.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- ;;
- -R*)
- dir=`echo "X$dep" | sed -e 's/^X-R//'`
- if test "$enable_rpath" != no; then
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $dir"
- fi
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $dir"
- fi
- fi
- ;;
- -l*)
- dnl Handle this in the next round.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
- ;;
- *.la)
- dnl Handle this in the next round. Throw away the .la's
- dnl directory; it is already contained in a preceding -L
- dnl option.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
- ;;
- *)
- dnl Most likely an immediate library name.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
- ;;
- esac
- done
- fi
- else
- dnl Didn't find the library; assume it is in the system directories
- dnl known to the linker and runtime loader. (All the system
- dnl directories known to the linker should also be known to the
- dnl runtime loader, otherwise the system is severely misconfigured.)
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- done
- done
- if test "X$rpathdirs" != "X"; then
- if test -n "$hardcode_libdir_separator"; then
- dnl Weird platform: only the last -rpath option counts, the user must
- dnl pass all path elements in one option. We can arrange that for a
- dnl single library, but not when more than one $LIBNAMEs are used.
- alldirs=
- for found_dir in $rpathdirs; do
- alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
- done
- dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
- acl_save_libdir="$libdir"
- libdir="$alldirs"
- eval flag=\"$hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- else
- dnl The -rpath options are cumulative.
- for found_dir in $rpathdirs; do
- acl_save_libdir="$libdir"
- libdir="$found_dir"
- eval flag=\"$hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- done
- fi
- fi
- if test "X$ltrpathdirs" != "X"; then
- dnl When using libtool, the option that works for both libraries and
- dnl executables is -R. The -R options are cumulative.
- for found_dir in $ltrpathdirs; do
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
- done
- fi
-])
-
-dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
-dnl unless already present in VAR.
-dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
-dnl contains two or three consecutive elements that belong together.
-AC_DEFUN([AC_LIB_APPENDTOVAR],
-[
- for element in [$2]; do
- haveit=
- for x in $[$1]; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X$element"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- [$1]="${[$1]}${[$1]:+ }$element"
- fi
- done
-])
-
-# lib-ld.m4 serial 3 (gettext-0.13)
-dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
-
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
-AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- acl_cv_prog_gnu_ld=yes ;;
-*)
- acl_cv_prog_gnu_ld=no ;;
-esac])
-with_gnu_ld=$acl_cv_prog_gnu_ld
-])
-
-dnl From libtool-1.4. Sets the variable LD.
-AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- [re_direlt='/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(acl_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- acl_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break ;;
- *)
- test "$with_gnu_ld" != yes && break ;;
- esac
- fi
- done
- IFS="$ac_save_ifs"
-else
- acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$acl_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_LIB_PROG_LD_GNU
-])
-
diff --git a/winsup/w32api/config.guess b/winsup/w32api/config.guess
deleted file mode 100755
index 0e30d56..0000000
--- a/winsup/w32api/config.guess
+++ /dev/null
@@ -1,1407 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-
-timestamp='2003-07-02'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit 0 ;;
- --version | -v )
- echo "$version" ; exit 0 ;;
- --help | --h* | -h )
- echo "$usage"; exit 0 ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help" >&2
- exit 1 ;;
- * )
- break ;;
- esac
-done
-
-if test $# != 0; then
- echo "$me: too many arguments$help" >&2
- exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > $dummy.c ;
- for c in cc gcc c89 c99 ; do
- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
- CC_FOR_BUILD="$c"; break ;
- fi ;
- done ;
- if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found ;
- fi
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
- PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
- *:NetBSD:*:*)
- # NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
- # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
- # switched to ELF, *-*-netbsd* would select the old
- # object file format. This provides both forward
- # compatibility and a consistent mechanism for selecting the
- # object file format.
- #
- # Note: NetBSD doesn't particularly care about the vendor
- # portion of the name. We always set it to "unknown".
- sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
- case "${UNAME_MACHINE_ARCH}" in
- armeb) machine=armeb-unknown ;;
- arm*) machine=arm-unknown ;;
- sh3el) machine=shl-unknown ;;
- sh3eb) machine=sh-unknown ;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
- esac
- # The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
- case "${UNAME_MACHINE_ARCH}" in
- arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval $set_cc_for_build
- if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep __ELF__ >/dev/null
- then
- # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
- # Return netbsd for either. FIX?
- os=netbsd
- else
- os=netbsdelf
- fi
- ;;
- *)
- os=netbsd
- ;;
- esac
- # The OS release
- # Debian GNU/NetBSD machines have a different userland, and
- # thus, need a distinct triplet. However, they do not need
- # kernel version information, so it can be replaced with a
- # suitable tag, in the style of linux-gnu.
- case "${UNAME_VERSION}" in
- Debian*)
- release='-gnu'
- ;;
- *)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
- ;;
- esac
- # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
- # contains redundant information, the shorter form:
- # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
- exit 0 ;;
- amiga:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- arc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- hp300:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mac68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- macppc:OpenBSD:*:*)
- echo powerpc-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvme68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvme88k:OpenBSD:*:*)
- echo m88k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvmeppc:OpenBSD:*:*)
- echo powerpc-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- pmax:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- sgi:OpenBSD:*:*)
- echo mipseb-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- sun3:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- wgrisc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- *:OpenBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- alpha:OSF1:*:*)
- if test $UNAME_RELEASE = "V4.0"; then
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- fi
- # According to Compaq, /usr/sbin/psrinfo has been available on
- # OSF/1 and Tru64 systems produced since 1995. I hope that
- # covers most systems running today. This code pipes the CPU
- # types through head -n 1, so we only detect the type of CPU 0.
- ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
- case "$ALPHA_CPU_TYPE" in
- "EV4 (21064)")
- UNAME_MACHINE="alpha" ;;
- "EV4.5 (21064)")
- UNAME_MACHINE="alpha" ;;
- "LCA4 (21066/21068)")
- UNAME_MACHINE="alpha" ;;
- "EV5 (21164)")
- UNAME_MACHINE="alphaev5" ;;
- "EV5.6 (21164A)")
- UNAME_MACHINE="alphaev56" ;;
- "EV5.6 (21164PC)")
- UNAME_MACHINE="alphapca56" ;;
- "EV5.7 (21164PC)")
- UNAME_MACHINE="alphapca57" ;;
- "EV6 (21264)")
- UNAME_MACHINE="alphaev6" ;;
- "EV6.7 (21264A)")
- UNAME_MACHINE="alphaev67" ;;
- "EV6.8CB (21264C)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8AL (21264B)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8CX (21264D)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.9A (21264/EV69A)")
- UNAME_MACHINE="alphaev69" ;;
- "EV7 (21364)")
- UNAME_MACHINE="alphaev7" ;;
- "EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
- esac
- # A Vn.n version is a released version.
- # A Tn.n version is a released field test version.
- # A Xn.n version is an unreleased experimental baselevel.
- # 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- exit 0 ;;
- Alpha*:OpenVMS:*:*)
- echo alpha-hp-vms
- exit 0 ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit 0 ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit 0 ;;
- Amiga*:UNIX_System_V:4.0:*)
- echo m68k-unknown-sysv4
- exit 0;;
- *:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
- exit 0 ;;
- *:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-morphos
- exit 0 ;;
- *:OS/390:*:*)
- echo i370-ibm-openedition
- exit 0 ;;
- arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
- exit 0;;
- SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
- echo hppa1.1-hitachi-hiuxmpp
- exit 0;;
- Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
- # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
- if test "`(/bin/universe) 2>/dev/null`" = att ; then
- echo pyramid-pyramid-sysv3
- else
- echo pyramid-pyramid-bsd
- fi
- exit 0 ;;
- NILE*:*:*:dcosx)
- echo pyramid-pyramid-svr4
- exit 0 ;;
- DRS?6000:unix:4.0:6*)
- echo sparc-icl-nx6
- exit 0 ;;
- DRS?6000:UNIX_SV:4.2*:7*)
- case `/usr/bin/uname -p` in
- sparc) echo sparc-icl-nx7 && exit 0 ;;
- esac ;;
- sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
- sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
- i86pc:SunOS:5.*:*)
- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
- sun4*:SunOS:6*:*)
- # According to config.sub, this is the proper way to canonicalize
- # SunOS6. Hard to guess exactly what SunOS6 will be like, but
- # it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
- sun4*:SunOS:*:*)
- case "`/usr/bin/arch -k`" in
- Series*|S4*)
- UNAME_RELEASE=`uname -v`
- ;;
- esac
- # Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit 0 ;;
- sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
- exit 0 ;;
- sun*:*:4.2BSD:*)
- UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
- case "`/bin/arch`" in
- sun3)
- echo m68k-sun-sunos${UNAME_RELEASE}
- ;;
- sun4)
- echo sparc-sun-sunos${UNAME_RELEASE}
- ;;
- esac
- exit 0 ;;
- aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
- exit 0 ;;
- # The situation for MiNT is a little confusing. The machine name
- # can be virtually everything (everything which is not
- # "atarist" or "atariste" at least should have a processor
- # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
- # to the lowercase version "mint" (or "freemint"). Finally
- # the system name "TOS" denotes a system which is actually not
- # MiNT. But MiNT is downward compatible to TOS, so this should
- # be no problem.
- atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
- atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
- *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
- milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit 0 ;;
- hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit 0 ;;
- *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit 0 ;;
- powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
- exit 0 ;;
- RISC*:Mach:*:*)
- echo mips-dec-mach_bsd4.3
- exit 0 ;;
- RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix${UNAME_RELEASE}
- exit 0 ;;
- VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
- exit 0 ;;
- 2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix${UNAME_RELEASE}
- exit 0 ;;
- mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
- #if defined (host_mips) && defined (MIPSEB)
- #if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
- #endif
- #endif
- exit (-1);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c \
- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
- && exit 0
- echo mips-mips-riscos${UNAME_RELEASE}
- exit 0 ;;
- Motorola:PowerMAX_OS:*:*)
- echo powerpc-motorola-powermax
- exit 0 ;;
- Motorola:*:4.3:PL8-*)
- echo powerpc-harris-powermax
- exit 0 ;;
- Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
- echo powerpc-harris-powermax
- exit 0 ;;
- Night_Hawk:Power_UNIX:*:*)
- echo powerpc-harris-powerunix
- exit 0 ;;
- m88k:CX/UX:7*:*)
- echo m88k-harris-cxux7
- exit 0 ;;
- m88k:*:4*:R4*)
- echo m88k-motorola-sysv4
- exit 0 ;;
- m88k:*:3*:R3*)
- echo m88k-motorola-sysv3
- exit 0 ;;
- AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
- then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
- [ ${TARGET_BINARY_INTERFACE}x = x ]
- then
- echo m88k-dg-dgux${UNAME_RELEASE}
- else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
- fi
- else
- echo i586-dg-dgux${UNAME_RELEASE}
- fi
- exit 0 ;;
- M88*:DolphinOS:*:*) # DolphinOS (SVR3)
- echo m88k-dolphin-sysv3
- exit 0 ;;
- M88*:*:R3*:*)
- # Delta 88k system running SVR3
- echo m88k-motorola-sysv3
- exit 0 ;;
- XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
- echo m88k-tektronix-sysv3
- exit 0 ;;
- Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
- echo m68k-tektronix-bsd
- exit 0 ;;
- *:IRIX*:*:*)
- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit 0 ;;
- ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
- i*86:AIX:*:*)
- echo i386-ibm-aix
- exit 0 ;;
- ia64:AIX:*:*)
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit 0 ;;
- *:AIX:2:3)
- if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <sys/systemcfg.h>
-
- main()
- {
- if (!__power_pc())
- exit(1);
- puts("powerpc-ibm-aix3.2.5");
- exit(0);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
- echo rs6000-ibm-aix3.2.5
- elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
- echo rs6000-ibm-aix3.2.4
- else
- echo rs6000-ibm-aix3.2
- fi
- exit 0 ;;
- *:AIX:*:[45])
- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
- IBM_ARCH=rs6000
- else
- IBM_ARCH=powerpc
- fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit 0 ;;
- *:AIX:*:*)
- echo rs6000-ibm-aix
- exit 0 ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
- echo romp-ibm-bsd4.4
- exit 0 ;;
- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit 0 ;; # report: romp-ibm BSD 4.3
- *:BOSX:*:*)
- echo rs6000-bull-bosx
- exit 0 ;;
- DPX/2?00:B.O.S.:*:*)
- echo m68k-bull-sysv3
- exit 0 ;;
- 9000/[34]??:4.3bsd:1.*:*)
- echo m68k-hp-bsd
- exit 0 ;;
- hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
- echo m68k-hp-bsd4.4
- exit 0 ;;
- 9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
- 9000/[678][0-9][0-9])
- if [ -x /usr/bin/getconf ]; then
- sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
- esac ;;
- esac
- fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-
- #define _HPUX_SOURCE
- #include <stdlib.h>
- #include <unistd.h>
-
- int main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
-
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
-EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
- test -z "$HP_ARCH" && HP_ARCH=hppa
- fi ;;
- esac
- if [ ${HP_ARCH} = "hppa2.0w" ]
- then
- # avoid double evaluation of $set_cc_for_build
- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
- then
- HP_ARCH="hppa2.0w"
- else
- HP_ARCH="hppa64"
- fi
- fi
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit 0 ;;
- ia64:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
- exit 0 ;;
- 3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <unistd.h>
- int
- main ()
- {
- long cpu = sysconf (_SC_CPU_VERSION);
- /* The order matters, because CPU_IS_HP_MC68K erroneously returns
- true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
- results, however. */
- if (CPU_IS_PA_RISC (cpu))
- {
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
- default: puts ("hppa-hitachi-hiuxwe2"); break;
- }
- }
- else if (CPU_IS_HP_MC68K (cpu))
- puts ("m68k-hitachi-hiuxwe2");
- else puts ("unknown-hitachi-hiuxwe2");
- exit (0);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
- echo unknown-hitachi-hiuxwe2
- exit 0 ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
- echo hppa1.1-hp-bsd
- exit 0 ;;
- 9000/8??:4.3bsd:*:*)
- echo hppa1.0-hp-bsd
- exit 0 ;;
- *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
- echo hppa1.0-hp-mpeix
- exit 0 ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
- echo hppa1.1-hp-osf
- exit 0 ;;
- hp8??:OSF1:*:*)
- echo hppa1.0-hp-osf
- exit 0 ;;
- i*86:OSF1:*:*)
- if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-unknown-osf1mk
- else
- echo ${UNAME_MACHINE}-unknown-osf1
- fi
- exit 0 ;;
- parisc*:Lites*:*:*)
- echo hppa1.1-hp-lites
- exit 0 ;;
- C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
- echo c1-convex-bsd
- exit 0 ;;
- C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit 0 ;;
- C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
- echo c34-convex-bsd
- exit 0 ;;
- C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
- echo c38-convex-bsd
- exit 0 ;;
- C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
- echo c4-convex-bsd
- exit 0 ;;
- CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
- CRAY*[A-Z]90:*:*:*)
- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
- | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
- -e 's/\.[^.]*$/.X/'
- exit 0 ;;
- CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
- CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
- CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
- *:UNICOS/mp:*:*)
- echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
- F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit 0 ;;
- i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit 0 ;;
- sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit 0 ;;
- *:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit 0 ;;
- *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
- # Determine whether the default compiler uses glibc.
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #if __GLIBC__ >= 2
- LIBC=gnu
- #else
- LIBC=
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
- # GNU/FreeBSD systems have a "k" prefix to indicate we are using
- # FreeBSD's kernel, but not the complete OS.
- case ${LIBC} in gnu) kernel_only='k' ;; esac
- echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
- exit 0 ;;
- i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
- exit 0 ;;
- i*:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
- exit 0 ;;
- i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
- exit 0 ;;
- x86:Interix*:[34]*)
- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
- exit 0 ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
- exit 0 ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
- exit 0 ;;
- i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
- exit 0 ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
- exit 0 ;;
- prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
- *:GNU:*:*)
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit 0 ;;
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
- exit 0 ;;
- arm*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
- cris:Linux:*:*)
- echo cris-axis-linux-gnu
- exit 0 ;;
- ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
- m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
- mips:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips
- #undef mipsel
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mipsel
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips
- #else
- CPU=
- #endif
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
- ;;
- mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips64
- #undef mips64el
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mips64el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips64
- #else
- CPU=
- #endif
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
- ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit 0 ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- exit 0 ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit 0 ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
- esac
- exit 0 ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
- exit 0 ;;
- s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
- exit 0 ;;
- sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
- sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
- sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
- x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
- exit 0 ;;
- i*86:Linux:*:*)
- # The BFD linker knows what the default object file format is, so
- # first see if it will tell us. cd to the root directory to prevent
- # problems with other programs or directories called `ld' in the path.
- # Set LC_ALL=C to ensure ld outputs messages in English.
- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
- | sed -ne '/supported targets:/!d
- s/[ ][ ]*/ /g
- s/.*supported targets: *//
- s/ .*//
- p'`
- case "$ld_supported_targets" in
- elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
- ;;
- a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit 0 ;;
- coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit 0 ;;
- "")
- # Either a pre-BFD a.out linker (linux-gnuoldld) or
- # one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
- exit 0 ;;
- esac
- # Determine whether the default compiler is a.out or elf
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #ifdef __ELF__
- # ifdef __GLIBC__
- # if __GLIBC__ >= 2
- LIBC=gnu
- # else
- LIBC=gnulibc1
- # endif
- # else
- LIBC=gnulibc1
- # endif
- #else
- #ifdef __INTEL_COMPILER
- LIBC=gnu
- #else
- LIBC=gnuaout
- #endif
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
- ;;
- i*86:DYNIX/ptx:4*:*)
- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
- # earlier versions are messed up and put the nodename in both
- # sysname and nodename.
- echo i386-sequent-sysv4
- exit 0 ;;
- i*86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
- # I am not positive that other SVR4 systems won't match this,
- # I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit 0 ;;
- i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
- # is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
- exit 0 ;;
- i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
- exit 0 ;;
- i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
- exit 0 ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
- i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit 0 ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
- if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
- else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
- fi
- exit 0 ;;
- i*86:*:5:[78]*)
- case `/bin/uname -X | grep "^Machine"` in
- *486*) UNAME_MACHINE=i486 ;;
- *Pentium) UNAME_MACHINE=i586 ;;
- *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
- esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
- exit 0 ;;
- i*86:*:3.2:*)
- if test -f /usr/options/cb.name; then
- UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
- elif /bin/uname -X 2>/dev/null >/dev/null ; then
- UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
- (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
- (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
- && UNAME_MACHINE=i586
- (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
- && UNAME_MACHINE=i686
- (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
- && UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
- else
- echo ${UNAME_MACHINE}-pc-sysv32
- fi
- exit 0 ;;
- pc:*:*:*)
- # Left here for compatibility:
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i386.
- echo i386-pc-msdosdjgpp
- exit 0 ;;
- Intel:Mach:3*:*)
- echo i386-pc-mach3
- exit 0 ;;
- paragon:*:*:*)
- echo i860-intel-osf1
- exit 0 ;;
- i860:*:4.*:*) # i860-SVR4
- if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
- else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
- fi
- exit 0 ;;
- mini*:CTIX:SYS*5:*)
- # "miniframe"
- echo m68010-convergent-sysv
- exit 0 ;;
- mc68k:UNIX:SYSTEM5:3.51m)
- echo m68k-convergent-sysv
- exit 0 ;;
- M680?0:D-NIX:5.3:*)
- echo m68k-diab-dnix
- exit 0 ;;
- M68*:*:R3V[567]*:*)
- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
- OS_REL=''
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && echo i486-ncr-sysv4.3${OS_REL} && exit 0
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
- 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && echo i486-ncr-sysv4 && exit 0 ;;
- m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
- mc68030:UNIX_System_V:4.*:*)
- echo m68k-atari-sysv4
- exit 0 ;;
- TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
- rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
- SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
- exit 0 ;;
- RM*:ReliantUNIX-*:*:*)
- echo mips-sni-sysv4
- exit 0 ;;
- RM*:SINIX-*:*:*)
- echo mips-sni-sysv4
- exit 0 ;;
- *:SINIX-*:*:*)
- if uname -p 2>/dev/null >/dev/null ; then
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo ${UNAME_MACHINE}-sni-sysv4
- else
- echo ns32k-sni-sysv
- fi
- exit 0 ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says <Richard.M.Bartel@ccMail.Census.GOV>
- echo i586-unisys-sysv4
- exit 0 ;;
- *:UNIX_System_V:4*:FTX*)
- # From Gerald Hewes <hewes@openmarket.com>.
- # How about differentiating between stratus architectures? -djm
- echo hppa1.1-stratus-sysv4
- exit 0 ;;
- *:*:*:FTX*)
- # From seanf@swdc.stratus.com.
- echo i860-stratus-sysv4
- exit 0 ;;
- *:VOS:*:*)
- # From Paul.Green@stratus.com.
- echo hppa1.1-stratus-vos
- exit 0 ;;
- mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
- exit 0 ;;
- news*:NEWS-OS:6*:*)
- echo mips-sony-newsos6
- exit 0 ;;
- R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
- if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
- else
- echo mips-unknown-sysv${UNAME_RELEASE}
- fi
- exit 0 ;;
- BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
- echo powerpc-be-beos
- exit 0 ;;
- BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
- echo powerpc-apple-beos
- exit 0 ;;
- BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
- echo i586-pc-beos
- exit 0 ;;
- SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
- exit 0 ;;
- SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
- exit 0 ;;
- SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux${UNAME_RELEASE}
- exit 0 ;;
- Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit 0 ;;
- *:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit 0 ;;
- *:Darwin:*:*)
- case `uname -p` in
- *86) UNAME_PROCESSOR=i686 ;;
- powerpc) UNAME_PROCESSOR=powerpc ;;
- esac
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
- exit 0 ;;
- *:procnto*:*:* | *:QNX:[0123456789]*:*)
- UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
- UNAME_PROCESSOR=i386
- UNAME_MACHINE=pc
- fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
- exit 0 ;;
- *:QNX:*:4*)
- echo i386-pc-qnx
- exit 0 ;;
- NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
- exit 0 ;;
- *:NonStop-UX:*:*)
- echo mips-compaq-nonstopux
- exit 0 ;;
- BS2000:POSIX*:*:*)
- echo bs2000-siemens-sysv
- exit 0 ;;
- DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit 0 ;;
- *:Plan9:*:*)
- # "uname -m" is not consistent, so use $cputype instead. 386
- # is converted to i386 for consistency with other x86
- # operating systems.
- if test "$cputype" = "386"; then
- UNAME_MACHINE=i386
- else
- UNAME_MACHINE="$cputype"
- fi
- echo ${UNAME_MACHINE}-unknown-plan9
- exit 0 ;;
- *:TOPS-10:*:*)
- echo pdp10-unknown-tops10
- exit 0 ;;
- *:TENEX:*:*)
- echo pdp10-unknown-tenex
- exit 0 ;;
- KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
- echo pdp10-dec-tops20
- exit 0 ;;
- XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
- echo pdp10-xkl-tops20
- exit 0 ;;
- *:TOPS-20:*:*)
- echo pdp10-unknown-tops20
- exit 0 ;;
- *:ITS:*:*)
- echo pdp10-unknown-its
- exit 0 ;;
- SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
- exit 0 ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
- exit 0 ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit 0 ;;
- c34*)
- echo c34-convex-bsd
- exit 0 ;;
- c38*)
- echo c38-convex-bsd
- exit 0 ;;
- c4*)
- echo c4-convex-bsd
- exit 0 ;;
- esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
- ftp://ftp.gnu.org/pub/gnu/config/
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo = `(hostinfo) 2>/dev/null`
-/bin/universe = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/winsup/w32api/config.sub b/winsup/w32api/config.sub
deleted file mode 100755
index 0bdc334..0000000
--- a/winsup/w32api/config.sub
+++ /dev/null
@@ -1,1504 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-
-timestamp='2003-06-17'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine. It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support. The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
- $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit 0 ;;
- --version | -v )
- echo "$version" ; exit 0 ;;
- --help | --h* | -h )
- echo "$usage"; exit 0 ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help"
- exit 1 ;;
-
- *local*)
- # First pass through any local machine types.
- echo $1
- exit 0;;
-
- * )
- break ;;
- esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
- exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
- exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
- nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
- os=-$maybe_os
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
- ;;
- *)
- basic_machine=`echo $1 | sed 's/-[^-]*$//'`
- if [ $basic_machine != $1 ]
- then os=`echo $1 | sed 's/.*-/-/'`
- else os=; fi
- ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work. We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
- -sun*os*)
- # Prevent following clause from handling this invalid input.
- ;;
- -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
- -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
- -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
- -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis)
- os=
- basic_machine=$1
- ;;
- -sim | -cisco | -oki | -wec | -winbond)
- os=
- basic_machine=$1
- ;;
- -scout)
- ;;
- -wrs)
- os=-vxworks
- basic_machine=$1
- ;;
- -chorusos*)
- os=-chorusos
- basic_machine=$1
- ;;
- -chorusrdb)
- os=-chorusrdb
- basic_machine=$1
- ;;
- -hiux*)
- os=-hiuxwe2
- ;;
- -sco5)
- os=-sco3.2v5
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco4)
- os=-sco3.2v4
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2.[4-9]*)
- os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2v[4-9]*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco*)
- os=-sco3.2v2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -udk*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -isc)
- os=-isc2.2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -clix*)
- basic_machine=clipper-intergraph
- ;;
- -isc*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -lynx*)
- os=-lynxos
- ;;
- -ptx*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
- ;;
- -windowsnt*)
- os=`echo $os | sed -e 's/windowsnt/winnt/'`
- ;;
- -psos*)
- os=-psos
- ;;
- -mint | -mint[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
- # Recognize the basic CPU types without company name.
- # Some are omitted here because they have special meanings below.
- 1750a | 580 \
- | a29k \
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
- | c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
- | fr30 | frv \
- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
- | i370 | i860 | i960 | ia64 \
- | ip2k \
- | m32r | m68000 | m68k | m88k | mcore \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
- | mips64vr | mips64vrel \
- | mips64orion | mips64orionel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
- | msp430 \
- | ns16k | ns32k \
- | openrisc | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
- | pyramid \
- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
- | sh64 | sh64le \
- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
- | strongarm \
- | tahoe | thumb | tic4x | tic80 | tron \
- | v850 | v850e \
- | we32k \
- | x86 | xscale | xstormy16 | xtensa \
- | z8k)
- basic_machine=$basic_machine-unknown
- ;;
- m6811 | m68hc11 | m6812 | m68hc12)
- # Motorola 68HC11/12.
- basic_machine=$basic_machine-unknown
- os=-none
- ;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
- ;;
-
- # We use `pc' rather than `unknown'
- # because (1) that's what they normally are, and
- # (2) the word "unknown" tends to confuse beginning users.
- i*86 | x86_64)
- basic_machine=$basic_machine-pc
- ;;
- # Object if more than one company name word.
- *-*-*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
- # Recognize the basic CPU types with company name.
- 580-* \
- | a29k-* \
- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* \
- | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
- | clipper-* | cydra-* \
- | d10v-* | d30v-* | dlx-* \
- | elxsi-* \
- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
- | h8300-* | h8500-* \
- | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
- | i*86-* | i860-* | i960-* | ia64-* \
- | ip2k-* \
- | m32r-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | mcore-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
- | mips64vr-* | mips64vrel-* \
- | mips64orion-* | mips64orionel-* \
- | mips64vr4100-* | mips64vr4100el-* \
- | mips64vr4300-* | mips64vr4300el-* \
- | mips64vr5000-* | mips64vr5000el-* \
- | mipsisa32-* | mipsisa32el-* \
- | mipsisa32r2-* | mipsisa32r2el-* \
- | mipsisa64-* | mipsisa64el-* \
- | mipsisa64sb1-* | mipsisa64sb1el-* \
- | mipsisa64sr71k-* | mipsisa64sr71kel-* \
- | mipstx39-* | mipstx39el-* \
- | msp430-* \
- | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
- | orion-* \
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
- | pyramid-* \
- | romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
- | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
- | tahoe-* | thumb-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
- | tron-* \
- | v850-* | v850e-* | vax-* \
- | we32k-* \
- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
- | xtensa-* \
- | ymp-* \
- | z8k-*)
- ;;
- # Recognize the various machine names and aliases which stand
- # for a CPU type and a company and sometimes even an OS.
- 386bsd)
- basic_machine=i386-unknown
- os=-bsd
- ;;
- 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
- basic_machine=m68000-att
- ;;
- 3b*)
- basic_machine=we32k-att
- ;;
- a29khif)
- basic_machine=a29k-amd
- os=-udi
- ;;
- adobe68k)
- basic_machine=m68010-adobe
- os=-scout
- ;;
- alliant | fx80)
- basic_machine=fx80-alliant
- ;;
- altos | altos3068)
- basic_machine=m68k-altos
- ;;
- am29k)
- basic_machine=a29k-none
- os=-bsd
- ;;
- amd64)
- basic_machine=x86_64-pc
- ;;
- amdahl)
- basic_machine=580-amdahl
- os=-sysv
- ;;
- amiga | amiga-*)
- basic_machine=m68k-unknown
- ;;
- amigaos | amigados)
- basic_machine=m68k-unknown
- os=-amigaos
- ;;
- amigaunix | amix)
- basic_machine=m68k-unknown
- os=-sysv4
- ;;
- apollo68)
- basic_machine=m68k-apollo
- os=-sysv
- ;;
- apollo68bsd)
- basic_machine=m68k-apollo
- os=-bsd
- ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
- convex-c1)
- basic_machine=c1-convex
- os=-bsd
- ;;
- convex-c2)
- basic_machine=c2-convex
- os=-bsd
- ;;
- convex-c32)
- basic_machine=c32-convex
- os=-bsd
- ;;
- convex-c34)
- basic_machine=c34-convex
- os=-bsd
- ;;
- convex-c38)
- basic_machine=c38-convex
- os=-bsd
- ;;
- cray | j90)
- basic_machine=j90-cray
- os=-unicos
- ;;
- crds | unos)
- basic_machine=m68k-crds
- ;;
- cris | cris-* | etrax*)
- basic_machine=cris-axis
- ;;
- da30 | da30-*)
- basic_machine=m68k-da30
- ;;
- decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
- basic_machine=mips-dec
- ;;
- decsystem10* | dec10*)
- basic_machine=pdp10-dec
- os=-tops10
- ;;
- decsystem20* | dec20*)
- basic_machine=pdp10-dec
- os=-tops20
- ;;
- delta | 3300 | motorola-3300 | motorola-delta \
- | 3300-motorola | delta-motorola)
- basic_machine=m68k-motorola
- ;;
- delta88)
- basic_machine=m88k-motorola
- os=-sysv3
- ;;
- dpx20 | dpx20-*)
- basic_machine=rs6000-bull
- os=-bosx
- ;;
- dpx2* | dpx2*-bull)
- basic_machine=m68k-bull
- os=-sysv3
- ;;
- ebmon29k)
- basic_machine=a29k-amd
- os=-ebmon
- ;;
- elxsi)
- basic_machine=elxsi-elxsi
- os=-bsd
- ;;
- encore | umax | mmax)
- basic_machine=ns32k-encore
- ;;
- es1800 | OSE68k | ose68k | ose | OSE)
- basic_machine=m68k-ericsson
- os=-ose
- ;;
- fx2800)
- basic_machine=i860-alliant
- ;;
- genix)
- basic_machine=ns32k-ns
- ;;
- gmicro)
- basic_machine=tron-gmicro
- os=-sysv
- ;;
- go32)
- basic_machine=i386-pc
- os=-go32
- ;;
- h3050r* | hiux*)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- h8300hms)
- basic_machine=h8300-hitachi
- os=-hms
- ;;
- h8300xray)
- basic_machine=h8300-hitachi
- os=-xray
- ;;
- h8500hms)
- basic_machine=h8500-hitachi
- os=-hms
- ;;
- harris)
- basic_machine=m88k-harris
- os=-sysv3
- ;;
- hp300-*)
- basic_machine=m68k-hp
- ;;
- hp300bsd)
- basic_machine=m68k-hp
- os=-bsd
- ;;
- hp300hpux)
- basic_machine=m68k-hp
- os=-hpux
- ;;
- hp3k9[0-9][0-9] | hp9[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k2[0-9][0-9] | hp9k31[0-9])
- basic_machine=m68000-hp
- ;;
- hp9k3[2-9][0-9])
- basic_machine=m68k-hp
- ;;
- hp9k6[0-9][0-9] | hp6[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k7[0-79][0-9] | hp7[0-79][0-9])
- basic_machine=hppa1.1-hp
- ;;
- hp9k78[0-9] | hp78[0-9])
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][13679] | hp8[0-9][13679])
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][0-9] | hp8[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hppa-next)
- os=-nextstep3
- ;;
- hppaosf)
- basic_machine=hppa1.1-hp
- os=-osf
- ;;
- hppro)
- basic_machine=hppa1.1-hp
- os=-proelf
- ;;
- i370-ibm* | ibm*)
- basic_machine=i370-ibm
- ;;
-# I'm not sure what "Sysv32" means. Should this be sysv3.2?
- i*86v32)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv32
- ;;
- i*86v4*)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv4
- ;;
- i*86v)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv
- ;;
- i*86sol2)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-solaris2
- ;;
- i386mach)
- basic_machine=i386-mach
- os=-mach
- ;;
- i386-vsta | vsta)
- basic_machine=i386-unknown
- os=-vsta
- ;;
- iris | iris4d)
- basic_machine=mips-sgi
- case $os in
- -irix*)
- ;;
- *)
- os=-irix4
- ;;
- esac
- ;;
- isi68 | isi)
- basic_machine=m68k-isi
- os=-sysv
- ;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=-sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=-sysv
- ;;
- mingw32)
- basic_machine=i386-pc
- os=-mingw32
- ;;
- miniframe)
- basic_machine=m68000-convergent
- ;;
- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
- mips3*-*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
- ;;
- mips3*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
- ;;
- mmix*)
- basic_machine=mmix-knuth
- os=-mmixware
- ;;
- monitor)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- morphos)
- basic_machine=powerpc-unknown
- os=-morphos
- ;;
- msdos)
- basic_machine=i386-pc
- os=-msdos
- ;;
- mvs)
- basic_machine=i370-ibm
- os=-mvs
- ;;
- ncr3000)
- basic_machine=i486-ncr
- os=-sysv4
- ;;
- netbsd386)
- basic_machine=i386-unknown
- os=-netbsd
- ;;
- netwinder)
- basic_machine=armv4l-rebel
- os=-linux
- ;;
- news | news700 | news800 | news900)
- basic_machine=m68k-sony
- os=-newsos
- ;;
- news1000)
- basic_machine=m68030-sony
- os=-newsos
- ;;
- news-3600 | risc-news)
- basic_machine=mips-sony
- os=-newsos
- ;;
- necv70)
- basic_machine=v70-nec
- os=-sysv
- ;;
- next | m*-next )
- basic_machine=m68k-next
- case $os in
- -nextstep* )
- ;;
- -ns2*)
- os=-nextstep2
- ;;
- *)
- os=-nextstep3
- ;;
- esac
- ;;
- nh3000)
- basic_machine=m68k-harris
- os=-cxux
- ;;
- nh[45]000)
- basic_machine=m88k-harris
- os=-cxux
- ;;
- nindy960)
- basic_machine=i960-intel
- os=-nindy
- ;;
- mon960)
- basic_machine=i960-intel
- os=-mon960
- ;;
- nonstopux)
- basic_machine=mips-compaq
- os=-nonstopux
- ;;
- np1)
- basic_machine=np1-gould
- ;;
- nv1)
- basic_machine=nv1-cray
- os=-unicosmp
- ;;
- nsr-tandem)
- basic_machine=nsr-tandem
- ;;
- op50n-* | op60c-*)
- basic_machine=hppa1.1-oki
- os=-proelf
- ;;
- or32 | or32-*)
- basic_machine=or32-unknown
- os=-coff
- ;;
- OSE68000 | ose68000)
- basic_machine=m68000-ericsson
- os=-ose
- ;;
- os68k)
- basic_machine=m68k-none
- os=-os68k
- ;;
- pa-hitachi)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- paragon)
- basic_machine=i860-intel
- os=-osf
- ;;
- pbd)
- basic_machine=sparc-tti
- ;;
- pbb)
- basic_machine=m68k-tti
- ;;
- pc532 | pc532-*)
- basic_machine=ns32k-pc532
- ;;
- pentium | p5 | k5 | k6 | nexgen | viac3)
- basic_machine=i586-pc
- ;;
- pentiumpro | p6 | 6x86 | athlon | athlon_*)
- basic_machine=i686-pc
- ;;
- pentiumii | pentium2 | pentiumiii | pentium3)
- basic_machine=i686-pc
- ;;
- pentium4)
- basic_machine=i786-pc
- ;;
- pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium4-*)
- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pn)
- basic_machine=pn-gould
- ;;
- power) basic_machine=power-ibm
- ;;
- ppc) basic_machine=powerpc-unknown
- ;;
- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppcle | powerpclittle | ppc-le | powerpc-little)
- basic_machine=powerpcle-unknown
- ;;
- ppcle-* | powerpclittle-*)
- basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64) basic_machine=powerpc64-unknown
- ;;
- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
- basic_machine=powerpc64le-unknown
- ;;
- ppc64le-* | powerpc64little-*)
- basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ps2)
- basic_machine=i386-ibm
- ;;
- pw32)
- basic_machine=i586-unknown
- os=-pw32
- ;;
- rom68k)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- rm[46]00)
- basic_machine=mips-siemens
- ;;
- rtpc | rtpc-*)
- basic_machine=romp-ibm
- ;;
- s390 | s390-*)
- basic_machine=s390-ibm
- ;;
- s390x | s390x-*)
- basic_machine=s390x-ibm
- ;;
- sa29200)
- basic_machine=a29k-amd
- os=-udi
- ;;
- sb1)
- basic_machine=mipsisa64sb1-unknown
- ;;
- sb1el)
- basic_machine=mipsisa64sb1el-unknown
- ;;
- sei)
- basic_machine=mips-sei
- os=-seiux
- ;;
- sequent)
- basic_machine=i386-sequent
- ;;
- sh)
- basic_machine=sh-hitachi
- os=-hms
- ;;
- sh64)
- basic_machine=sh64-unknown
- ;;
- sparclite-wrs | simso-wrs)
- basic_machine=sparclite-wrs
- os=-vxworks
- ;;
- sps7)
- basic_machine=m68k-bull
- os=-sysv2
- ;;
- spur)
- basic_machine=spur-unknown
- ;;
- st2000)
- basic_machine=m68k-tandem
- ;;
- stratus)
- basic_machine=i860-stratus
- os=-sysv4
- ;;
- sun2)
- basic_machine=m68000-sun
- ;;
- sun2os3)
- basic_machine=m68000-sun
- os=-sunos3
- ;;
- sun2os4)
- basic_machine=m68000-sun
- os=-sunos4
- ;;
- sun3os3)
- basic_machine=m68k-sun
- os=-sunos3
- ;;
- sun3os4)
- basic_machine=m68k-sun
- os=-sunos4
- ;;
- sun4os3)
- basic_machine=sparc-sun
- os=-sunos3
- ;;
- sun4os4)
- basic_machine=sparc-sun
- os=-sunos4
- ;;
- sun4sol2)
- basic_machine=sparc-sun
- os=-solaris2
- ;;
- sun3 | sun3-*)
- basic_machine=m68k-sun
- ;;
- sun4)
- basic_machine=sparc-sun
- ;;
- sun386 | sun386i | roadrunner)
- basic_machine=i386-sun
- ;;
- sv1)
- basic_machine=sv1-cray
- os=-unicos
- ;;
- symmetry)
- basic_machine=i386-sequent
- os=-dynix
- ;;
- t3e)
- basic_machine=alphaev5-cray
- os=-unicos
- ;;
- t90)
- basic_machine=t90-cray
- os=-unicos
- ;;
- tic54x | c54x*)
- basic_machine=tic54x-unknown
- os=-coff
- ;;
- tic55x | c55x*)
- basic_machine=tic55x-unknown
- os=-coff
- ;;
- tic6x | c6x*)
- basic_machine=tic6x-unknown
- os=-coff
- ;;
- tx39)
- basic_machine=mipstx39-unknown
- ;;
- tx39el)
- basic_machine=mipstx39el-unknown
- ;;
- toad1)
- basic_machine=pdp10-xkl
- os=-tops20
- ;;
- tower | tower-32)
- basic_machine=m68k-ncr
- ;;
- udi29k)
- basic_machine=a29k-amd
- os=-udi
- ;;
- ultra3)
- basic_machine=a29k-nyu
- os=-sym1
- ;;
- v810 | necv810)
- basic_machine=v810-nec
- os=-none
- ;;
- vaxv)
- basic_machine=vax-dec
- os=-sysv
- ;;
- vms)
- basic_machine=vax-dec
- os=-vms
- ;;
- vpp*|vx|vx-*)
- basic_machine=f301-fujitsu
- ;;
- vxworks960)
- basic_machine=i960-wrs
- os=-vxworks
- ;;
- vxworks68)
- basic_machine=m68k-wrs
- os=-vxworks
- ;;
- vxworks29k)
- basic_machine=a29k-wrs
- os=-vxworks
- ;;
- w65*)
- basic_machine=w65-wdc
- os=-none
- ;;
- w89k-*)
- basic_machine=hppa1.1-winbond
- os=-proelf
- ;;
- xps | xps100)
- basic_machine=xps100-honeywell
- ;;
- ymp)
- basic_machine=ymp-cray
- os=-unicos
- ;;
- z8k-*-coff)
- basic_machine=z8k-unknown
- os=-sim
- ;;
- none)
- basic_machine=none-none
- os=-none
- ;;
-
-# Here we handle the default manufacturer of certain CPU types. It is in
-# some cases the only manufacturer, in others, it is the most popular.
- w89k)
- basic_machine=hppa1.1-winbond
- ;;
- op50n)
- basic_machine=hppa1.1-oki
- ;;
- op60c)
- basic_machine=hppa1.1-oki
- ;;
- romp)
- basic_machine=romp-ibm
- ;;
- rs6000)
- basic_machine=rs6000-ibm
- ;;
- vax)
- basic_machine=vax-dec
- ;;
- pdp10)
- # there are many clones, so DEC is not a safe bet
- basic_machine=pdp10-unknown
- ;;
- pdp11)
- basic_machine=pdp11-dec
- ;;
- we32k)
- basic_machine=we32k-att
- ;;
- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
- basic_machine=sh-unknown
- ;;
- sh64)
- basic_machine=sh64-unknown
- ;;
- sparc | sparcv9 | sparcv9b)
- basic_machine=sparc-sun
- ;;
- cydra)
- basic_machine=cydra-cydrome
- ;;
- orion)
- basic_machine=orion-highlevel
- ;;
- orion105)
- basic_machine=clipper-highlevel
- ;;
- mac | mpw | mac-mpw)
- basic_machine=m68k-apple
- ;;
- pmac | pmac-mpw)
- basic_machine=powerpc-apple
- ;;
- *-unknown)
- # Make sure to match an already-canonicalized machine name.
- ;;
- *)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
- *-digital*)
- basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
- ;;
- *-commodore*)
- basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
- ;;
- *)
- ;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
- # -solaris* is a basic system type, with this one exception.
- -solaris1 | -solaris1.*)
- os=`echo $os | sed -e 's|solaris1|sunos4|'`
- ;;
- -solaris)
- os=-solaris2
- ;;
- -svr4*)
- os=-sysv4
- ;;
- -unixware*)
- os=-sysv4.2uw
- ;;
- -gnu/linux*)
- os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
- ;;
- # First accept the basic system types.
- # The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
- # Remember, each alternative MUST END IN *, to match a version number.
- ;;
- -qnx*)
- case $basic_machine in
- x86-* | i*86-*)
- ;;
- *)
- os=-nto$os
- ;;
- esac
- ;;
- -nto-qnx*)
- ;;
- -nto*)
- os=`echo $os | sed -e 's|nto|nto-qnx|'`
- ;;
- -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
- | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
- ;;
- -mac*)
- os=`echo $os | sed -e 's|mac|macos|'`
- ;;
- -linux*)
- os=`echo $os | sed -e 's|linux|linux-gnu|'`
- ;;
- -sunos5*)
- os=`echo $os | sed -e 's|sunos5|solaris2|'`
- ;;
- -sunos6*)
- os=`echo $os | sed -e 's|sunos6|solaris3|'`
- ;;
- -opened*)
- os=-openedition
- ;;
- -wince*)
- os=-wince
- ;;
- -osfrose*)
- os=-osfrose
- ;;
- -osf*)
- os=-osf
- ;;
- -utek*)
- os=-bsd
- ;;
- -dynix*)
- os=-bsd
- ;;
- -acis*)
- os=-aos
- ;;
- -atheos*)
- os=-atheos
- ;;
- -386bsd)
- os=-bsd
- ;;
- -ctix* | -uts*)
- os=-sysv
- ;;
- -nova*)
- os=-rtmk-nova
- ;;
- -ns2 )
- os=-nextstep2
- ;;
- -nsk*)
- os=-nsk
- ;;
- # Preserve the version number of sinix5.
- -sinix5.*)
- os=`echo $os | sed -e 's|sinix|sysv|'`
- ;;
- -sinix*)
- os=-sysv4
- ;;
- -triton*)
- os=-sysv3
- ;;
- -oss*)
- os=-sysv3
- ;;
- -svr4)
- os=-sysv4
- ;;
- -svr3)
- os=-sysv3
- ;;
- -sysvr4)
- os=-sysv4
- ;;
- # This must come after -sysvr4.
- -sysv*)
- ;;
- -ose*)
- os=-ose
- ;;
- -es1800*)
- os=-ose
- ;;
- -xenix)
- os=-xenix
- ;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- os=-mint
- ;;
- -aros*)
- os=-aros
- ;;
- -kaos*)
- os=-kaos
- ;;
- -none)
- ;;
- *)
- # Get rid of the `-' at the beginning of $os.
- os=`echo $os | sed 's/[^-]*-//'`
- echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
- exit 1
- ;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system. Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
- *-acorn)
- os=-riscix1.2
- ;;
- arm*-rebel)
- os=-linux
- ;;
- arm*-semi)
- os=-aout
- ;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
- # This must come before the *-dec entry.
- pdp10-*)
- os=-tops20
- ;;
- pdp11-*)
- os=-none
- ;;
- *-dec | vax-*)
- os=-ultrix4.2
- ;;
- m68*-apollo)
- os=-domain
- ;;
- i386-sun)
- os=-sunos4.0.2
- ;;
- m68000-sun)
- os=-sunos3
- # This also exists in the configure program, but was not the
- # default.
- # os=-sunos4
- ;;
- m68*-cisco)
- os=-aout
- ;;
- mips*-cisco)
- os=-elf
- ;;
- mips*-*)
- os=-elf
- ;;
- or32-*)
- os=-coff
- ;;
- *-tti) # must be before sparc entry or we get the wrong os.
- os=-sysv3
- ;;
- sparc-* | *-sun)
- os=-sunos4.1.1
- ;;
- *-be)
- os=-beos
- ;;
- *-ibm)
- os=-aix
- ;;
- *-wec)
- os=-proelf
- ;;
- *-winbond)
- os=-proelf
- ;;
- *-oki)
- os=-proelf
- ;;
- *-hp)
- os=-hpux
- ;;
- *-hitachi)
- os=-hiux
- ;;
- i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
- os=-sysv
- ;;
- *-cbm)
- os=-amigaos
- ;;
- *-dg)
- os=-dgux
- ;;
- *-dolphin)
- os=-sysv3
- ;;
- m68k-ccur)
- os=-rtu
- ;;
- m88k-omron*)
- os=-luna
- ;;
- *-next )
- os=-nextstep
- ;;
- *-sequent)
- os=-ptx
- ;;
- *-crds)
- os=-unos
- ;;
- *-ns)
- os=-genix
- ;;
- i370-*)
- os=-mvs
- ;;
- *-next)
- os=-nextstep3
- ;;
- *-gould)
- os=-sysv
- ;;
- *-highlevel)
- os=-bsd
- ;;
- *-encore)
- os=-bsd
- ;;
- *-sgi)
- os=-irix
- ;;
- *-siemens)
- os=-sysv4
- ;;
- *-masscomp)
- os=-rtu
- ;;
- f30[01]-fujitsu | f700-fujitsu)
- os=-uxpv
- ;;
- *-rom68k)
- os=-coff
- ;;
- *-*bug)
- os=-coff
- ;;
- *-apple)
- os=-macos
- ;;
- *-atari*)
- os=-mint
- ;;
- *)
- os=-none
- ;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer. We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
- *-unknown)
- case $os in
- -riscix*)
- vendor=acorn
- ;;
- -sunos*)
- vendor=sun
- ;;
- -aix*)
- vendor=ibm
- ;;
- -beos*)
- vendor=be
- ;;
- -hpux*)
- vendor=hp
- ;;
- -mpeix*)
- vendor=hp
- ;;
- -hiux*)
- vendor=hitachi
- ;;
- -unos*)
- vendor=crds
- ;;
- -dgux*)
- vendor=dg
- ;;
- -luna*)
- vendor=omron
- ;;
- -genix*)
- vendor=ns
- ;;
- -mvs* | -opened*)
- vendor=ibm
- ;;
- -ptx*)
- vendor=sequent
- ;;
- -vxsim* | -vxworks* | -windiss*)
- vendor=wrs
- ;;
- -aux*)
- vendor=apple
- ;;
- -hms*)
- vendor=hitachi
- ;;
- -mpw* | -macos*)
- vendor=apple
- ;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- vendor=atari
- ;;
- -vos*)
- vendor=stratus
- ;;
- esac
- basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
- ;;
-esac
-
-echo $basic_machine$os
-exit 0
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/winsup/w32api/configure b/winsup/w32api/configure
deleted file mode 100755
index cffbf1a..0000000
--- a/winsup/w32api/configure
+++ /dev/null
@@ -1,2939 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59.
-#
-# Copyright (C) 2003 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-exec 6>&1
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_config_libobj_dir=.
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete. It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
-# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-
-ac_unique_file="lib/scrnsave.c"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC ac_ct_CC CFLAGS with_cross_host AR ac_ct_AR AS ac_ct_AS RANLIB ac_ct_RANLIB LD ac_ct_LD DLLTOOL ac_ct_DLLTOOL WINDRES ac_ct_WINDRES BUILDENV LIBOBJS LTLIBOBJS'
-ac_subst_files=''
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-ac_prev=
-for ac_option
-do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_option in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- eval "enable_$ac_feature=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_$ac_feature='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "with_$ac_package='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
- eval "with_$ac_package=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries=$ac_optarg ;;
-
- -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$ac_envvar='$ac_optarg'"
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$0" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
- fi
-fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
- { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-_ACEOF
-
- cat <<_ACEOF
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
-_ACEOF
-
- cat <<\_ACEOF
-
-System types:
- --build=BUILD configure for building on BUILD [guessed]
- --host=HOST cross-compile to build programs to run on HOST [BUILD]
- --target=TARGET configure for building compilers for TARGET [HOST]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-
- cat <<\_ACEOF
-
-_ACEOF
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- ac_popdir=`pwd`
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_srcdir/configure.gnu; then
- echo
- $SHELL $ac_srcdir/configure.gnu --help=recursive
- elif test -f $ac_srcdir/configure; then
- echo
- $SHELL $ac_srcdir/configure --help=recursive
- elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
- else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
- cd $ac_popdir
- done
-fi
-
-test -n "$ac_init_help" && exit 0
-if $ac_init_version; then
- cat <<\_ACEOF
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit 0
-fi
-exec 5>config.log
-cat >&5 <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- echo "PATH: $as_dir"
-done
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_sep=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-{
- (set) 2>&1 |
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- ;;
- *)
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-}
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- sed "/^$/d" confdefs.h | sort
- echo
- fi
- test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
- ' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
- esac
- fi
-else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val="\$ac_cv_env_${ac_var}_value"
- eval ac_new_val="\$ac_env_${ac_var}_value"
- case $ac_old_set,$ac_new_set in
- set,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-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
- elif test -f $ac_dir/shtool; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/shtool install -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
- { (exit 1); exit 1; }; }
-fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
-
-# Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
- { (exit 1); exit 1; }; }
-
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
-if test "${ac_cv_build+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
- ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
-build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
-if test "${ac_cv_host+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
- ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
-host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking target system type" >&5
-echo $ECHO_N "checking target system type... $ECHO_C" >&6
-if test "${ac_cv_target+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_target_alias=$target_alias
-test "x$ac_cv_target_alias" = "x" &&
- ac_cv_target_alias=$ac_cv_host_alias
-ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
- { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-echo "${ECHO_T}$ac_cv_target" >&6
-target=$ac_cv_target
-target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- done
- done
- ;;
-esac
-done
-
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL=$ac_install_sh
- fi
-fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-CFLAGS=${CFLAGS-"-O2 -g"}
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_CC" && ac_cv_prog_ac_ct_CC="gcc"
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
- echo "$as_me:$LINENO: result: $AR" >&5
-echo "${ECHO_T}$AR" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_AR"; then
- ac_ct_AR=$AR
- # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_AR"; then
- ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_AR="ar"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
- echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-echo "${ECHO_T}$ac_ct_AR" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- AR=$ac_ct_AR
-else
- AR="$ac_cv_prog_AR"
-fi
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AS+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-AS=$ac_cv_prog_AS
-if test -n "$AS"; then
- echo "$as_me:$LINENO: result: $AS" >&5
-echo "${ECHO_T}$AS" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_AS"; then
- ac_ct_AS=$AS
- # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_AS"; then
- ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_AS="as"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_AS" && ac_cv_prog_ac_ct_AS="as"
-fi
-fi
-ac_ct_AS=$ac_cv_prog_ac_ct_AS
-if test -n "$ac_ct_AS"; then
- echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
-echo "${ECHO_T}$ac_ct_AS" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- AS=$ac_ct_AS
-else
- AS="$ac_cv_prog_AS"
-fi
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="ranlib"
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- RANLIB=$ac_ct_RANLIB
-else
- RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-
-if test -n "$ac_tool_prefix"; then
- # 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 "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_LD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$LD"; then
- ac_cv_prog_LD="$LD" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_LD="${ac_tool_prefix}ld"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-LD=$ac_cv_prog_LD
-if test -n "$LD"; then
- echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_LD"; then
- ac_ct_LD=$LD
- # Extract the first word of "ld", so it can be a program name with args.
-set dummy ld; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_LD"; then
- ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_LD="ld"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
-fi
-fi
-ac_ct_LD=$ac_cv_prog_ac_ct_LD
-if test -n "$ac_ct_LD"; then
- echo "$as_me:$LINENO: result: $ac_ct_LD" >&5
-echo "${ECHO_T}$ac_ct_LD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- LD=$ac_ct_LD
-else
- LD="$ac_cv_prog_LD"
-fi
-
-
-if test -n "$ac_tool_prefix"; then
- # 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 "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_DLLTOOL+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-DLLTOOL=$ac_cv_prog_DLLTOOL
-if test -n "$DLLTOOL"; then
- echo "$as_me:$LINENO: result: $DLLTOOL" >&5
-echo "${ECHO_T}$DLLTOOL" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_DLLTOOL"; then
- ac_ct_DLLTOOL=$DLLTOOL
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_DLLTOOL"; then
- ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_DLLTOOL="dlltool"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_DLLTOOL" && ac_cv_prog_ac_ct_DLLTOOL="dlltool"
-fi
-fi
-ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
-if test -n "$ac_ct_DLLTOOL"; then
- echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
-echo "${ECHO_T}$ac_ct_DLLTOOL" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- DLLTOOL=$ac_ct_DLLTOOL
-else
- DLLTOOL="$ac_cv_prog_DLLTOOL"
-fi
-
-
-if test -n "$ac_tool_prefix"; then
- # 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 "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_WINDRES+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$WINDRES"; then
- ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-WINDRES=$ac_cv_prog_WINDRES
-if test -n "$WINDRES"; then
- echo "$as_me:$LINENO: result: $WINDRES" >&5
-echo "${ECHO_T}$WINDRES" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_WINDRES"; then
- ac_ct_WINDRES=$WINDRES
- # Extract the first word of "windres", so it can be a program name with args.
-set dummy windres; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_WINDRES"; then
- ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_WINDRES="windres"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_WINDRES" && ac_cv_prog_ac_ct_WINDRES="windres"
-fi
-fi
-ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
-if test -n "$ac_ct_WINDRES"; then
- echo "$as_me:$LINENO: result: $ac_ct_WINDRES" >&5
-echo "${ECHO_T}$ac_ct_WINDRES" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- WINDRES=$ac_ct_WINDRES
-else
- WINDRES="$ac_cv_prog_WINDRES"
-fi
-
-
-
-echo "$as_me:$LINENO: checking for build environment" >&5
-echo $ECHO_N "checking for build environment... $ECHO_C" >&6
-case "$build_alias" in
-*-mingw*) BUILDENV=mingw;;
-*-cygwin*) BUILDENV=cygwin;;
-esac
-if test -z "$BUILDENV"; then
- echo "$as_me:$LINENO: result: standard" >&5
-echo "${ECHO_T}standard" >&6
-else
- echo "$as_me:$LINENO: result: $BUILDENV" >&5
-echo "${ECHO_T}$BUILDENV" >&6
-fi
-
-
- ac_config_files="$ac_config_files Makefile lib/Makefile lib/ddk/Makefile lib/directx/Makefile"
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-{
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-} |
- sed '
- t clear
- : clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
- cat confcache >$cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[ ]*$//;
-}'
-fi
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then we branch to the quote section. Otherwise,
-# look for a macro that doesn't take arguments.
-cat >confdef2opt.sed <<\_ACEOF
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
-t quote
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
-t quote
-d
-: quote
-s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
-s,\[,\\&,g
-s,\],\\&,g
-s,\$,$$,g
-p
-_ACEOF
-# We use echo to avoid assuming a particular line-breaking character.
-# The extra dot is to prevent the shell from consuming trailing
-# line-breaks from the sub-command output. A line-break within
-# single-quotes doesn't work because, if this script is created in a
-# platform that uses two characters for line-breaks (e.g., DOS), tr
-# would break.
-ac_LF_and_DOT=`echo; echo .`
-DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f confdef2opt.sed
-
-
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
- # 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling. Logging --version etc. is OK.
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
-_ACEOF
-
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_headers"; then
- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_links"; then
- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
-
-Configuration files:
-$config_files
-
-Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.59,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-INSTALL="$INSTALL"
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=*)
- ac_option=`expr "x$1" : 'x\([^=]*\)='`
- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- -*)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- *) # This is not an option, so the user has probably given explicit
- # arguments.
- ac_option=$1
- ac_need_defaults=false;;
- esac
-
- case $ac_option in
- # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --vers* | -V )
- echo "$ac_cs_version"; exit 0 ;;
- --he | --h)
- # Conflict between --help and --header
- { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
- ac_need_defaults=false;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1" ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-if \$ac_cs_recheck; then
- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
-
-_ACEOF
-
-
-
-
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_config_target in $ac_config_targets
-do
- case "$ac_config_target" in
- # Handling of arguments.
- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
- "lib/ddk/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/ddk/Makefile" ;;
- "lib/directx/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/directx/Makefile" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./confstat$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
-{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-
-#
-# CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@build@,$build,;t t
-s,@build_cpu@,$build_cpu,;t t
-s,@build_vendor@,$build_vendor,;t t
-s,@build_os@,$build_os,;t t
-s,@host@,$host,;t t
-s,@host_cpu@,$host_cpu,;t t
-s,@host_vendor@,$host_vendor,;t t
-s,@host_os@,$host_os,;t t
-s,@target@,$target,;t t
-s,@target_cpu@,$target_cpu,;t t
-s,@target_vendor@,$target_vendor,;t t
-s,@target_os@,$target_os,;t t
-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@CC@,$CC,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@with_cross_host@,$with_cross_host,;t t
-s,@AR@,$AR,;t t
-s,@ac_ct_AR@,$ac_ct_AR,;t t
-s,@AS@,$AS,;t t
-s,@ac_ct_AS@,$ac_ct_AS,;t t
-s,@RANLIB@,$RANLIB,;t t
-s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s,@LD@,$LD,;t t
-s,@ac_ct_LD@,$ac_ct_LD,;t t
-s,@DLLTOOL@,$DLLTOOL,;t t
-s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t
-s,@WINDRES@,$WINDRES,;t t
-s,@ac_ct_WINDRES@,$ac_ct_WINDRES,;t t
-s,@BUILDENV@,$BUILDENV,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
-
-_ACEOF
-
- cat >>$CONFIG_STATUS <<\_ACEOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_lines=48
- ac_sed_frag=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_lines # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- else
- # The purpose of the label and of the branching condition is to
- # speed up the sed processing (if there are no `@' at all, there
- # is no need to browse any of the substitutions).
- # These are the two extra sed commands mentioned above.
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_lines`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
-fi # test -n "$CONFIG_FILES"
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
- case $INSTALL in
- [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
- esac
-
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- if test x"$ac_file" = x-; then
- configure_input=
- else
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;t t
-s,@srcdir@,$ac_srcdir,;t t
-s,@abs_srcdir@,$ac_abs_srcdir,;t t
-s,@top_srcdir@,$ac_top_srcdir,;t t
-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s,@builddir@,$ac_builddir,;t t
-s,@abs_builddir@,$ac_abs_builddir,;t t
-s,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-s,@INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- rm -f $tmp/stdin
- if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
- else
- cat $tmp/out
- rm -f $tmp/out
- fi
-
-done
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-{ (exit 0); exit 0; }
-_ACEOF
-chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded. So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status. When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
- ac_cs_success=:
- ac_config_status_args=
- test "$silent" = yes &&
- ac_config_status_args="$ac_config_status_args --quiet"
- exec 5>/dev/null
- $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
- exec 5>>config.log
- # Use ||, not &&, to avoid exiting from the if with $? = 1, which
- # would make configure fail if this is the last instruction.
- $ac_cs_success || { (exit 1); exit 1; }
-fi
-
diff --git a/winsup/w32api/configure.in b/winsup/w32api/configure.in
deleted file mode 100644
index d8b8c95..0000000
--- a/winsup/w32api/configure.in
+++ /dev/null
@@ -1,51 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-
-dnl This file is part of a free win32 library
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-
-AC_PREREQ(2.59)
-AC_INIT(lib/scrnsave.c)
-
-AC_CANONICAL_SYSTEM
-
-dnl Find install command
-AC_PROG_INSTALL
-
-dnl check for cc and CFLAGS
-CFLAGS=${CFLAGS-"-O2 -g"}
-AC_CHECK_TOOL(CC, gcc, gcc)
-AC_SUBST(CC)
-AC_SUBST(CFLAGS)
-AC_SUBST(with_cross_host)
-
-dnl check for various tools
-AC_CHECK_TOOL(AR, ar, ar)
-AC_SUBST(AR)
-AC_CHECK_TOOL(AS, as, as)
-AC_SUBST(AS)
-AC_CHECK_TOOL(RANLIB, ranlib, ranlib)
-AC_SUBST(RANLIB)
-AC_CHECK_TOOL(LD, ld, ld)
-AC_SUBST(LD)
-AC_CHECK_TOOL(DLLTOOL, dlltool, dlltool)
-AC_SUBST(DLLTOOL)
-AC_CHECK_TOOL(WINDRES, windres, windres)
-AC_SUBST(WINDRES)
-
-AC_MSG_CHECKING([for build environment])
-case "$build_alias" in
-*-mingw*) BUILDENV=mingw;;
-*-cygwin*) BUILDENV=cygwin;;
-esac
-if test -z "$BUILDENV"; then
- AC_MSG_RESULT(standard)
-else
- AC_MSG_RESULT($BUILDENV)
-fi
-AC_SUBST(BUILDENV)
-
-AC_OUTPUT(Makefile lib/Makefile lib/ddk/Makefile lib/directx/Makefile)
diff --git a/winsup/w32api/include/GL/gl.h b/winsup/w32api/include/GL/gl.h
deleted file mode 100644
index f35d26c..0000000
--- a/winsup/w32api/include/GL/gl.h
+++ /dev/null
@@ -1,1470 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 4.0
- *
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-/************************************************************************
- * 2002-Apr-22, José Fonseca:
- * Removed non Win32 system-specific stuff
- *
- * 2002-Apr-17, Marcus Geelnard:
- * For win32, OpenGL 1.2 & 1.3 definitions are not made in this file
- * anymore, since under Windows those are regarded as extensions, and
- * are better defined in glext.h (especially the function prototypes may
- * conflict with extension function pointers). A few "cosmetical"
- * changes were also made to this file.
- *
- * 2002-Apr-15, Marcus Geelnard:
- * Modified this file to better fit a wider range of compilers, removed
- * Mesa specific stuff, and removed extension definitions (this file now
- * relies on GL/glext.h). Hopefully this file should now function as a
- * generic OpenGL gl.h include file for most compilers and environments.
- * Changed GLAPIENTRY to APIENTRY (to be consistent with GL/glext.h).
- ************************************************************************/
-
-
-#ifndef __gl_h_
-#define __gl_h_
-
-
-
-/************************************************************************
- * Begin system-specific stuff.
- */
-/* __WIN32__ */
-#if !defined(__WIN32__) && (defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__))
-# define __WIN32__
-#endif
-
-/* GLAPI, part 1 (use WINGDIAPI, if defined) */
-#if defined(__WIN32__) && defined(WINGDIAPI)
-# define GLAPI WINGDIAPI
-#endif
-
-/* GLAPI, part 2 */
-#if !defined(GLAPI)
-# if defined(_MSC_VER) /* Microsoft Visual C++ */
-# define GLAPI __declspec(dllimport)
-# elif defined(__LCC__) && defined(__WIN32__) /* LCC-Win32 */
-# define GLAPI __stdcall
-# else /* Others (e.g. MinGW, Cygwin, non-win32) */
-# define GLAPI extern
-# endif
-#endif
-
-/* APIENTRY */
-#if !defined(APIENTRY)
-# if defined(__WIN32__)
-# define APIENTRY __stdcall
-# else
-# define APIENTRY
-# endif
-#endif
-/*
- * End system-specific stuff.
- ************************************************************************/
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-
-#define GL_VERSION_1_1 1
-
-#if !defined(__WIN32__)
-#define GL_VERSION_1_2 1
-#define GL_VERSION_1_3 1
-#define GL_ARB_imaging 1
-#endif
-
-
-/*
- *
- * Datatypes
- *
- */
-#ifdef CENTERLINE_CLPP
-#define signed
-#endif
-typedef unsigned int GLenum;
-typedef unsigned char GLboolean;
-typedef unsigned int GLbitfield;
-typedef void GLvoid;
-typedef signed char GLbyte; /* 1-byte signed */
-typedef short GLshort; /* 2-byte signed */
-typedef int GLint; /* 4-byte signed */
-typedef unsigned char GLubyte; /* 1-byte unsigned */
-typedef unsigned short GLushort; /* 2-byte unsigned */
-typedef unsigned int GLuint; /* 4-byte unsigned */
-typedef int GLsizei; /* 4-byte signed */
-typedef float GLfloat; /* single precision float */
-typedef float GLclampf; /* single precision float in [0,1] */
-typedef double GLdouble; /* double precision float */
-typedef double GLclampd; /* double precision float in [0,1] */
-
-
-
-/************************************************************************
- *
- * Constants
- *
- ************************************************************************/
-
-/* Boolean values */
-#define GL_FALSE 0x0
-#define GL_TRUE 0x1
-
-/* Data types */
-#define GL_BYTE 0x1400
-#define GL_UNSIGNED_BYTE 0x1401
-#define GL_SHORT 0x1402
-#define GL_UNSIGNED_SHORT 0x1403
-#define GL_INT 0x1404
-#define GL_UNSIGNED_INT 0x1405
-#define GL_FLOAT 0x1406
-#define GL_DOUBLE 0x140A
-#define GL_2_BYTES 0x1407
-#define GL_3_BYTES 0x1408
-#define GL_4_BYTES 0x1409
-
-/* Primitives */
-#define GL_POINTS 0x0000
-#define GL_LINES 0x0001
-#define GL_LINE_LOOP 0x0002
-#define GL_LINE_STRIP 0x0003
-#define GL_TRIANGLES 0x0004
-#define GL_TRIANGLE_STRIP 0x0005
-#define GL_TRIANGLE_FAN 0x0006
-#define GL_QUADS 0x0007
-#define GL_QUAD_STRIP 0x0008
-#define GL_POLYGON 0x0009
-
-/* Vertex Arrays */
-#define GL_VERTEX_ARRAY 0x8074
-#define GL_NORMAL_ARRAY 0x8075
-#define GL_COLOR_ARRAY 0x8076
-#define GL_INDEX_ARRAY 0x8077
-#define GL_TEXTURE_COORD_ARRAY 0x8078
-#define GL_EDGE_FLAG_ARRAY 0x8079
-#define GL_VERTEX_ARRAY_SIZE 0x807A
-#define GL_VERTEX_ARRAY_TYPE 0x807B
-#define GL_VERTEX_ARRAY_STRIDE 0x807C
-#define GL_NORMAL_ARRAY_TYPE 0x807E
-#define GL_NORMAL_ARRAY_STRIDE 0x807F
-#define GL_COLOR_ARRAY_SIZE 0x8081
-#define GL_COLOR_ARRAY_TYPE 0x8082
-#define GL_COLOR_ARRAY_STRIDE 0x8083
-#define GL_INDEX_ARRAY_TYPE 0x8085
-#define GL_INDEX_ARRAY_STRIDE 0x8086
-#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
-#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
-#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
-#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
-#define GL_VERTEX_ARRAY_POINTER 0x808E
-#define GL_NORMAL_ARRAY_POINTER 0x808F
-#define GL_COLOR_ARRAY_POINTER 0x8090
-#define GL_INDEX_ARRAY_POINTER 0x8091
-#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
-#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
-#define GL_V2F 0x2A20
-#define GL_V3F 0x2A21
-#define GL_C4UB_V2F 0x2A22
-#define GL_C4UB_V3F 0x2A23
-#define GL_C3F_V3F 0x2A24
-#define GL_N3F_V3F 0x2A25
-#define GL_C4F_N3F_V3F 0x2A26
-#define GL_T2F_V3F 0x2A27
-#define GL_T4F_V4F 0x2A28
-#define GL_T2F_C4UB_V3F 0x2A29
-#define GL_T2F_C3F_V3F 0x2A2A
-#define GL_T2F_N3F_V3F 0x2A2B
-#define GL_T2F_C4F_N3F_V3F 0x2A2C
-#define GL_T4F_C4F_N3F_V4F 0x2A2D
-
-/* Matrix Mode */
-#define GL_MATRIX_MODE 0x0BA0
-#define GL_MODELVIEW 0x1700
-#define GL_PROJECTION 0x1701
-#define GL_TEXTURE 0x1702
-
-/* Points */
-#define GL_POINT_SMOOTH 0x0B10
-#define GL_POINT_SIZE 0x0B11
-#define GL_POINT_SIZE_GRANULARITY 0x0B13
-#define GL_POINT_SIZE_RANGE 0x0B12
-
-/* Lines */
-#define GL_LINE_SMOOTH 0x0B20
-#define GL_LINE_STIPPLE 0x0B24
-#define GL_LINE_STIPPLE_PATTERN 0x0B25
-#define GL_LINE_STIPPLE_REPEAT 0x0B26
-#define GL_LINE_WIDTH 0x0B21
-#define GL_LINE_WIDTH_GRANULARITY 0x0B23
-#define GL_LINE_WIDTH_RANGE 0x0B22
-
-/* Polygons */
-#define GL_POINT 0x1B00
-#define GL_LINE 0x1B01
-#define GL_FILL 0x1B02
-#define GL_CW 0x0900
-#define GL_CCW 0x0901
-#define GL_FRONT 0x0404
-#define GL_BACK 0x0405
-#define GL_POLYGON_MODE 0x0B40
-#define GL_POLYGON_SMOOTH 0x0B41
-#define GL_POLYGON_STIPPLE 0x0B42
-#define GL_EDGE_FLAG 0x0B43
-#define GL_CULL_FACE 0x0B44
-#define GL_CULL_FACE_MODE 0x0B45
-#define GL_FRONT_FACE 0x0B46
-#define GL_POLYGON_OFFSET_FACTOR 0x8038
-#define GL_POLYGON_OFFSET_UNITS 0x2A00
-#define GL_POLYGON_OFFSET_POINT 0x2A01
-#define GL_POLYGON_OFFSET_LINE 0x2A02
-#define GL_POLYGON_OFFSET_FILL 0x8037
-
-/* Display Lists */
-#define GL_COMPILE 0x1300
-#define GL_COMPILE_AND_EXECUTE 0x1301
-#define GL_LIST_BASE 0x0B32
-#define GL_LIST_INDEX 0x0B33
-#define GL_LIST_MODE 0x0B30
-
-/* Depth buffer */
-#define GL_NEVER 0x0200
-#define GL_LESS 0x0201
-#define GL_EQUAL 0x0202
-#define GL_LEQUAL 0x0203
-#define GL_GREATER 0x0204
-#define GL_NOTEQUAL 0x0205
-#define GL_GEQUAL 0x0206
-#define GL_ALWAYS 0x0207
-#define GL_DEPTH_TEST 0x0B71
-#define GL_DEPTH_BITS 0x0D56
-#define GL_DEPTH_CLEAR_VALUE 0x0B73
-#define GL_DEPTH_FUNC 0x0B74
-#define GL_DEPTH_RANGE 0x0B70
-#define GL_DEPTH_WRITEMASK 0x0B72
-#define GL_DEPTH_COMPONENT 0x1902
-
-/* Lighting */
-#define GL_LIGHTING 0x0B50
-#define GL_LIGHT0 0x4000
-#define GL_LIGHT1 0x4001
-#define GL_LIGHT2 0x4002
-#define GL_LIGHT3 0x4003
-#define GL_LIGHT4 0x4004
-#define GL_LIGHT5 0x4005
-#define GL_LIGHT6 0x4006
-#define GL_LIGHT7 0x4007
-#define GL_SPOT_EXPONENT 0x1205
-#define GL_SPOT_CUTOFF 0x1206
-#define GL_CONSTANT_ATTENUATION 0x1207
-#define GL_LINEAR_ATTENUATION 0x1208
-#define GL_QUADRATIC_ATTENUATION 0x1209
-#define GL_AMBIENT 0x1200
-#define GL_DIFFUSE 0x1201
-#define GL_SPECULAR 0x1202
-#define GL_SHININESS 0x1601
-#define GL_EMISSION 0x1600
-#define GL_POSITION 0x1203
-#define GL_SPOT_DIRECTION 0x1204
-#define GL_AMBIENT_AND_DIFFUSE 0x1602
-#define GL_COLOR_INDEXES 0x1603
-#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
-#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
-#define GL_LIGHT_MODEL_AMBIENT 0x0B53
-#define GL_FRONT_AND_BACK 0x0408
-#define GL_SHADE_MODEL 0x0B54
-#define GL_FLAT 0x1D00
-#define GL_SMOOTH 0x1D01
-#define GL_COLOR_MATERIAL 0x0B57
-#define GL_COLOR_MATERIAL_FACE 0x0B55
-#define GL_COLOR_MATERIAL_PARAMETER 0x0B56
-#define GL_NORMALIZE 0x0BA1
-
-/* User clipping planes */
-#define GL_CLIP_PLANE0 0x3000
-#define GL_CLIP_PLANE1 0x3001
-#define GL_CLIP_PLANE2 0x3002
-#define GL_CLIP_PLANE3 0x3003
-#define GL_CLIP_PLANE4 0x3004
-#define GL_CLIP_PLANE5 0x3005
-
-/* Accumulation buffer */
-#define GL_ACCUM_RED_BITS 0x0D58
-#define GL_ACCUM_GREEN_BITS 0x0D59
-#define GL_ACCUM_BLUE_BITS 0x0D5A
-#define GL_ACCUM_ALPHA_BITS 0x0D5B
-#define GL_ACCUM_CLEAR_VALUE 0x0B80
-#define GL_ACCUM 0x0100
-#define GL_ADD 0x0104
-#define GL_LOAD 0x0101
-#define GL_MULT 0x0103
-#define GL_RETURN 0x0102
-
-/* Alpha testing */
-#define GL_ALPHA_TEST 0x0BC0
-#define GL_ALPHA_TEST_REF 0x0BC2
-#define GL_ALPHA_TEST_FUNC 0x0BC1
-
-/* Blending */
-#define GL_BLEND 0x0BE2
-#define GL_BLEND_SRC 0x0BE1
-#define GL_BLEND_DST 0x0BE0
-#define GL_ZERO 0x0
-#define GL_ONE 0x1
-#define GL_SRC_COLOR 0x0300
-#define GL_ONE_MINUS_SRC_COLOR 0x0301
-#define GL_SRC_ALPHA 0x0302
-#define GL_ONE_MINUS_SRC_ALPHA 0x0303
-#define GL_DST_ALPHA 0x0304
-#define GL_ONE_MINUS_DST_ALPHA 0x0305
-#define GL_DST_COLOR 0x0306
-#define GL_ONE_MINUS_DST_COLOR 0x0307
-#define GL_SRC_ALPHA_SATURATE 0x0308
-#define GL_CONSTANT_COLOR 0x8001
-#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
-#define GL_CONSTANT_ALPHA 0x8003
-#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
-
-/* Render Mode */
-#define GL_FEEDBACK 0x1C01
-#define GL_RENDER 0x1C00
-#define GL_SELECT 0x1C02
-
-/* Feedback */
-#define GL_2D 0x0600
-#define GL_3D 0x0601
-#define GL_3D_COLOR 0x0602
-#define GL_3D_COLOR_TEXTURE 0x0603
-#define GL_4D_COLOR_TEXTURE 0x0604
-#define GL_POINT_TOKEN 0x0701
-#define GL_LINE_TOKEN 0x0702
-#define GL_LINE_RESET_TOKEN 0x0707
-#define GL_POLYGON_TOKEN 0x0703
-#define GL_BITMAP_TOKEN 0x0704
-#define GL_DRAW_PIXEL_TOKEN 0x0705
-#define GL_COPY_PIXEL_TOKEN 0x0706
-#define GL_PASS_THROUGH_TOKEN 0x0700
-#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
-#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
-#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
-
-/* Selection */
-#define GL_SELECTION_BUFFER_POINTER 0x0DF3
-#define GL_SELECTION_BUFFER_SIZE 0x0DF4
-
-/* Fog */
-#define GL_FOG 0x0B60
-#define GL_FOG_MODE 0x0B65
-#define GL_FOG_DENSITY 0x0B62
-#define GL_FOG_COLOR 0x0B66
-#define GL_FOG_INDEX 0x0B61
-#define GL_FOG_START 0x0B63
-#define GL_FOG_END 0x0B64
-#define GL_LINEAR 0x2601
-#define GL_EXP 0x0800
-#define GL_EXP2 0x0801
-
-/* Logic Ops */
-#define GL_LOGIC_OP 0x0BF1
-#define GL_INDEX_LOGIC_OP 0x0BF1
-#define GL_COLOR_LOGIC_OP 0x0BF2
-#define GL_LOGIC_OP_MODE 0x0BF0
-#define GL_CLEAR 0x1500
-#define GL_SET 0x150F
-#define GL_COPY 0x1503
-#define GL_COPY_INVERTED 0x150C
-#define GL_NOOP 0x1505
-#define GL_INVERT 0x150A
-#define GL_AND 0x1501
-#define GL_NAND 0x150E
-#define GL_OR 0x1507
-#define GL_NOR 0x1508
-#define GL_XOR 0x1506
-#define GL_EQUIV 0x1509
-#define GL_AND_REVERSE 0x1502
-#define GL_AND_INVERTED 0x1504
-#define GL_OR_REVERSE 0x150B
-#define GL_OR_INVERTED 0x150D
-
-/* Stencil */
-#define GL_STENCIL_TEST 0x0B90
-#define GL_STENCIL_WRITEMASK 0x0B98
-#define GL_STENCIL_BITS 0x0D57
-#define GL_STENCIL_FUNC 0x0B92
-#define GL_STENCIL_VALUE_MASK 0x0B93
-#define GL_STENCIL_REF 0x0B97
-#define GL_STENCIL_FAIL 0x0B94
-#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
-#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
-#define GL_STENCIL_CLEAR_VALUE 0x0B91
-#define GL_STENCIL_INDEX 0x1901
-#define GL_KEEP 0x1E00
-#define GL_REPLACE 0x1E01
-#define GL_INCR 0x1E02
-#define GL_DECR 0x1E03
-
-/* Buffers, Pixel Drawing/Reading */
-#define GL_NONE 0x0
-#define GL_LEFT 0x0406
-#define GL_RIGHT 0x0407
-/*GL_FRONT 0x0404 */
-/*GL_BACK 0x0405 */
-/*GL_FRONT_AND_BACK 0x0408 */
-#define GL_FRONT_LEFT 0x0400
-#define GL_FRONT_RIGHT 0x0401
-#define GL_BACK_LEFT 0x0402
-#define GL_BACK_RIGHT 0x0403
-#define GL_AUX0 0x0409
-#define GL_AUX1 0x040A
-#define GL_AUX2 0x040B
-#define GL_AUX3 0x040C
-#define GL_COLOR_INDEX 0x1900
-#define GL_RED 0x1903
-#define GL_GREEN 0x1904
-#define GL_BLUE 0x1905
-#define GL_ALPHA 0x1906
-#define GL_LUMINANCE 0x1909
-#define GL_LUMINANCE_ALPHA 0x190A
-#define GL_ALPHA_BITS 0x0D55
-#define GL_RED_BITS 0x0D52
-#define GL_GREEN_BITS 0x0D53
-#define GL_BLUE_BITS 0x0D54
-#define GL_INDEX_BITS 0x0D51
-#define GL_SUBPIXEL_BITS 0x0D50
-#define GL_AUX_BUFFERS 0x0C00
-#define GL_READ_BUFFER 0x0C02
-#define GL_DRAW_BUFFER 0x0C01
-#define GL_DOUBLEBUFFER 0x0C32
-#define GL_STEREO 0x0C33
-#define GL_BITMAP 0x1A00
-#define GL_COLOR 0x1800
-#define GL_DEPTH 0x1801
-#define GL_STENCIL 0x1802
-#define GL_DITHER 0x0BD0
-#define GL_RGB 0x1907
-#define GL_RGBA 0x1908
-
-/* Implementation limits */
-#define GL_MAX_LIST_NESTING 0x0B31
-#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
-#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
-#define GL_MAX_NAME_STACK_DEPTH 0x0D37
-#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
-#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
-#define GL_MAX_EVAL_ORDER 0x0D30
-#define GL_MAX_LIGHTS 0x0D31
-#define GL_MAX_CLIP_PLANES 0x0D32
-#define GL_MAX_TEXTURE_SIZE 0x0D33
-#define GL_MAX_PIXEL_MAP_TABLE 0x0D34
-#define GL_MAX_VIEWPORT_DIMS 0x0D3A
-#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
-
-/* Gets */
-#define GL_ATTRIB_STACK_DEPTH 0x0BB0
-#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
-#define GL_COLOR_CLEAR_VALUE 0x0C22
-#define GL_COLOR_WRITEMASK 0x0C23
-#define GL_CURRENT_INDEX 0x0B01
-#define GL_CURRENT_COLOR 0x0B00
-#define GL_CURRENT_NORMAL 0x0B02
-#define GL_CURRENT_RASTER_COLOR 0x0B04
-#define GL_CURRENT_RASTER_DISTANCE 0x0B09
-#define GL_CURRENT_RASTER_INDEX 0x0B05
-#define GL_CURRENT_RASTER_POSITION 0x0B07
-#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
-#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
-#define GL_CURRENT_TEXTURE_COORDS 0x0B03
-#define GL_INDEX_CLEAR_VALUE 0x0C20
-#define GL_INDEX_MODE 0x0C30
-#define GL_INDEX_WRITEMASK 0x0C21
-#define GL_MODELVIEW_MATRIX 0x0BA6
-#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
-#define GL_NAME_STACK_DEPTH 0x0D70
-#define GL_PROJECTION_MATRIX 0x0BA7
-#define GL_PROJECTION_STACK_DEPTH 0x0BA4
-#define GL_RENDER_MODE 0x0C40
-#define GL_RGBA_MODE 0x0C31
-#define GL_TEXTURE_MATRIX 0x0BA8
-#define GL_TEXTURE_STACK_DEPTH 0x0BA5
-#define GL_VIEWPORT 0x0BA2
-
-/* Evaluators */
-#define GL_AUTO_NORMAL 0x0D80
-#define GL_MAP1_COLOR_4 0x0D90
-#define GL_MAP1_GRID_DOMAIN 0x0DD0
-#define GL_MAP1_GRID_SEGMENTS 0x0DD1
-#define GL_MAP1_INDEX 0x0D91
-#define GL_MAP1_NORMAL 0x0D92
-#define GL_MAP1_TEXTURE_COORD_1 0x0D93
-#define GL_MAP1_TEXTURE_COORD_2 0x0D94
-#define GL_MAP1_TEXTURE_COORD_3 0x0D95
-#define GL_MAP1_TEXTURE_COORD_4 0x0D96
-#define GL_MAP1_VERTEX_3 0x0D97
-#define GL_MAP1_VERTEX_4 0x0D98
-#define GL_MAP2_COLOR_4 0x0DB0
-#define GL_MAP2_GRID_DOMAIN 0x0DD2
-#define GL_MAP2_GRID_SEGMENTS 0x0DD3
-#define GL_MAP2_INDEX 0x0DB1
-#define GL_MAP2_NORMAL 0x0DB2
-#define GL_MAP2_TEXTURE_COORD_1 0x0DB3
-#define GL_MAP2_TEXTURE_COORD_2 0x0DB4
-#define GL_MAP2_TEXTURE_COORD_3 0x0DB5
-#define GL_MAP2_TEXTURE_COORD_4 0x0DB6
-#define GL_MAP2_VERTEX_3 0x0DB7
-#define GL_MAP2_VERTEX_4 0x0DB8
-#define GL_COEFF 0x0A00
-#define GL_DOMAIN 0x0A02
-#define GL_ORDER 0x0A01
-
-/* Hints */
-#define GL_FOG_HINT 0x0C54
-#define GL_LINE_SMOOTH_HINT 0x0C52
-#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
-#define GL_POINT_SMOOTH_HINT 0x0C51
-#define GL_POLYGON_SMOOTH_HINT 0x0C53
-#define GL_DONT_CARE 0x1100
-#define GL_FASTEST 0x1101
-#define GL_NICEST 0x1102
-
-/* Scissor box */
-#define GL_SCISSOR_TEST 0x0C11
-#define GL_SCISSOR_BOX 0x0C10
-
-/* Pixel Mode / Transfer */
-#define GL_MAP_COLOR 0x0D10
-#define GL_MAP_STENCIL 0x0D11
-#define GL_INDEX_SHIFT 0x0D12
-#define GL_INDEX_OFFSET 0x0D13
-#define GL_RED_SCALE 0x0D14
-#define GL_RED_BIAS 0x0D15
-#define GL_GREEN_SCALE 0x0D18
-#define GL_GREEN_BIAS 0x0D19
-#define GL_BLUE_SCALE 0x0D1A
-#define GL_BLUE_BIAS 0x0D1B
-#define GL_ALPHA_SCALE 0x0D1C
-#define GL_ALPHA_BIAS 0x0D1D
-#define GL_DEPTH_SCALE 0x0D1E
-#define GL_DEPTH_BIAS 0x0D1F
-#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
-#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
-#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
-#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
-#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
-#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
-#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
-#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
-#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
-#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
-#define GL_PIXEL_MAP_S_TO_S 0x0C71
-#define GL_PIXEL_MAP_I_TO_I 0x0C70
-#define GL_PIXEL_MAP_I_TO_R 0x0C72
-#define GL_PIXEL_MAP_I_TO_G 0x0C73
-#define GL_PIXEL_MAP_I_TO_B 0x0C74
-#define GL_PIXEL_MAP_I_TO_A 0x0C75
-#define GL_PIXEL_MAP_R_TO_R 0x0C76
-#define GL_PIXEL_MAP_G_TO_G 0x0C77
-#define GL_PIXEL_MAP_B_TO_B 0x0C78
-#define GL_PIXEL_MAP_A_TO_A 0x0C79
-#define GL_PACK_ALIGNMENT 0x0D05
-#define GL_PACK_LSB_FIRST 0x0D01
-#define GL_PACK_ROW_LENGTH 0x0D02
-#define GL_PACK_SKIP_PIXELS 0x0D04
-#define GL_PACK_SKIP_ROWS 0x0D03
-#define GL_PACK_SWAP_BYTES 0x0D00
-#define GL_UNPACK_ALIGNMENT 0x0CF5
-#define GL_UNPACK_LSB_FIRST 0x0CF1
-#define GL_UNPACK_ROW_LENGTH 0x0CF2
-#define GL_UNPACK_SKIP_PIXELS 0x0CF4
-#define GL_UNPACK_SKIP_ROWS 0x0CF3
-#define GL_UNPACK_SWAP_BYTES 0x0CF0
-#define GL_ZOOM_X 0x0D16
-#define GL_ZOOM_Y 0x0D17
-
-/* Texture mapping */
-#define GL_TEXTURE_ENV 0x2300
-#define GL_TEXTURE_ENV_MODE 0x2200
-#define GL_TEXTURE_1D 0x0DE0
-#define GL_TEXTURE_2D 0x0DE1
-#define GL_TEXTURE_WRAP_S 0x2802
-#define GL_TEXTURE_WRAP_T 0x2803
-#define GL_TEXTURE_MAG_FILTER 0x2800
-#define GL_TEXTURE_MIN_FILTER 0x2801
-#define GL_TEXTURE_ENV_COLOR 0x2201
-#define GL_TEXTURE_GEN_S 0x0C60
-#define GL_TEXTURE_GEN_T 0x0C61
-#define GL_TEXTURE_GEN_MODE 0x2500
-#define GL_TEXTURE_BORDER_COLOR 0x1004
-#define GL_TEXTURE_WIDTH 0x1000
-#define GL_TEXTURE_HEIGHT 0x1001
-#define GL_TEXTURE_BORDER 0x1005
-#define GL_TEXTURE_COMPONENTS 0x1003
-#define GL_TEXTURE_RED_SIZE 0x805C
-#define GL_TEXTURE_GREEN_SIZE 0x805D
-#define GL_TEXTURE_BLUE_SIZE 0x805E
-#define GL_TEXTURE_ALPHA_SIZE 0x805F
-#define GL_TEXTURE_LUMINANCE_SIZE 0x8060
-#define GL_TEXTURE_INTENSITY_SIZE 0x8061
-#define GL_NEAREST_MIPMAP_NEAREST 0x2700
-#define GL_NEAREST_MIPMAP_LINEAR 0x2702
-#define GL_LINEAR_MIPMAP_NEAREST 0x2701
-#define GL_LINEAR_MIPMAP_LINEAR 0x2703
-#define GL_OBJECT_LINEAR 0x2401
-#define GL_OBJECT_PLANE 0x2501
-#define GL_EYE_LINEAR 0x2400
-#define GL_EYE_PLANE 0x2502
-#define GL_SPHERE_MAP 0x2402
-#define GL_DECAL 0x2101
-#define GL_MODULATE 0x2100
-#define GL_NEAREST 0x2600
-#define GL_REPEAT 0x2901
-#define GL_CLAMP 0x2900
-#define GL_S 0x2000
-#define GL_T 0x2001
-#define GL_R 0x2002
-#define GL_Q 0x2003
-#define GL_TEXTURE_GEN_R 0x0C62
-#define GL_TEXTURE_GEN_Q 0x0C63
-
-/* Utility */
-#define GL_VENDOR 0x1F00
-#define GL_RENDERER 0x1F01
-#define GL_VERSION 0x1F02
-#define GL_EXTENSIONS 0x1F03
-
-/* Errors */
-#define GL_NO_ERROR 0x0
-#define GL_INVALID_VALUE 0x0501
-#define GL_INVALID_ENUM 0x0500
-#define GL_INVALID_OPERATION 0x0502
-#define GL_STACK_OVERFLOW 0x0503
-#define GL_STACK_UNDERFLOW 0x0504
-#define GL_OUT_OF_MEMORY 0x0505
-
-/* glPush/PopAttrib bits */
-#define GL_CURRENT_BIT 0x00000001
-#define GL_POINT_BIT 0x00000002
-#define GL_LINE_BIT 0x00000004
-#define GL_POLYGON_BIT 0x00000008
-#define GL_POLYGON_STIPPLE_BIT 0x00000010
-#define GL_PIXEL_MODE_BIT 0x00000020
-#define GL_LIGHTING_BIT 0x00000040
-#define GL_FOG_BIT 0x00000080
-#define GL_DEPTH_BUFFER_BIT 0x00000100
-#define GL_ACCUM_BUFFER_BIT 0x00000200
-#define GL_STENCIL_BUFFER_BIT 0x00000400
-#define GL_VIEWPORT_BIT 0x00000800
-#define GL_TRANSFORM_BIT 0x00001000
-#define GL_ENABLE_BIT 0x00002000
-#define GL_COLOR_BUFFER_BIT 0x00004000
-#define GL_HINT_BIT 0x00008000
-#define GL_EVAL_BIT 0x00010000
-#define GL_LIST_BIT 0x00020000
-#define GL_TEXTURE_BIT 0x00040000
-#define GL_SCISSOR_BIT 0x00080000
-#define GL_ALL_ATTRIB_BITS 0x000FFFFF
-
-
-/* OpenGL 1.1 */
-#define GL_PROXY_TEXTURE_1D 0x8063
-#define GL_PROXY_TEXTURE_2D 0x8064
-#define GL_TEXTURE_PRIORITY 0x8066
-#define GL_TEXTURE_RESIDENT 0x8067
-#define GL_TEXTURE_BINDING_1D 0x8068
-#define GL_TEXTURE_BINDING_2D 0x8069
-#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
-#define GL_ALPHA4 0x803B
-#define GL_ALPHA8 0x803C
-#define GL_ALPHA12 0x803D
-#define GL_ALPHA16 0x803E
-#define GL_LUMINANCE4 0x803F
-#define GL_LUMINANCE8 0x8040
-#define GL_LUMINANCE12 0x8041
-#define GL_LUMINANCE16 0x8042
-#define GL_LUMINANCE4_ALPHA4 0x8043
-#define GL_LUMINANCE6_ALPHA2 0x8044
-#define GL_LUMINANCE8_ALPHA8 0x8045
-#define GL_LUMINANCE12_ALPHA4 0x8046
-#define GL_LUMINANCE12_ALPHA12 0x8047
-#define GL_LUMINANCE16_ALPHA16 0x8048
-#define GL_INTENSITY 0x8049
-#define GL_INTENSITY4 0x804A
-#define GL_INTENSITY8 0x804B
-#define GL_INTENSITY12 0x804C
-#define GL_INTENSITY16 0x804D
-#define GL_R3_G3_B2 0x2A10
-#define GL_RGB4 0x804F
-#define GL_RGB5 0x8050
-#define GL_RGB8 0x8051
-#define GL_RGB10 0x8052
-#define GL_RGB12 0x8053
-#define GL_RGB16 0x8054
-#define GL_RGBA2 0x8055
-#define GL_RGBA4 0x8056
-#define GL_RGB5_A1 0x8057
-#define GL_RGBA8 0x8058
-#define GL_RGB10_A2 0x8059
-#define GL_RGBA12 0x805A
-#define GL_RGBA16 0x805B
-#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
-#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
-#define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF
-#define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF
-
-
-/* Under Windows, we do not define OpenGL 1.2 & 1.3 functionality, since
- it is treated as extensions (defined in glext.h) */
-#if !defined(__WIN32__)
-
-/* OpenGL 1.2 */
-#define GL_RESCALE_NORMAL 0x803A
-#define GL_CLAMP_TO_EDGE 0x812F
-#define GL_MAX_ELEMENTS_VERTICES 0x80E8
-#define GL_MAX_ELEMENTS_INDICES 0x80E9
-#define GL_BGR 0x80E0
-#define GL_BGRA 0x80E1
-#define GL_UNSIGNED_BYTE_3_3_2 0x8032
-#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
-#define GL_UNSIGNED_SHORT_5_6_5 0x8363
-#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
-#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
-#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
-#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
-#define GL_UNSIGNED_INT_8_8_8_8 0x8035
-#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
-#define GL_UNSIGNED_INT_10_10_10_2 0x8036
-#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
-#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
-#define GL_SINGLE_COLOR 0x81F9
-#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
-#define GL_TEXTURE_MIN_LOD 0x813A
-#define GL_TEXTURE_MAX_LOD 0x813B
-#define GL_TEXTURE_BASE_LEVEL 0x813C
-#define GL_TEXTURE_MAX_LEVEL 0x813D
-#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
-#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
-#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
-#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
-#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
-#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
-#define GL_PACK_SKIP_IMAGES 0x806B
-#define GL_PACK_IMAGE_HEIGHT 0x806C
-#define GL_UNPACK_SKIP_IMAGES 0x806D
-#define GL_UNPACK_IMAGE_HEIGHT 0x806E
-#define GL_TEXTURE_3D 0x806F
-#define GL_PROXY_TEXTURE_3D 0x8070
-#define GL_TEXTURE_DEPTH 0x8071
-#define GL_TEXTURE_WRAP_R 0x8072
-#define GL_MAX_3D_TEXTURE_SIZE 0x8073
-#define GL_TEXTURE_BINDING_3D 0x806A
-
-/* OpenGL 1.2 imaging subset */
-/* GL_EXT_color_table */
-#define GL_COLOR_TABLE 0x80D0
-#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
-#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
-#define GL_PROXY_COLOR_TABLE 0x80D3
-#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
-#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
-#define GL_COLOR_TABLE_SCALE 0x80D6
-#define GL_COLOR_TABLE_BIAS 0x80D7
-#define GL_COLOR_TABLE_FORMAT 0x80D8
-#define GL_COLOR_TABLE_WIDTH 0x80D9
-#define GL_COLOR_TABLE_RED_SIZE 0x80DA
-#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
-#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
-#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
-#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
-#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
-/* GL_EXT_convolution and GL_HP_convolution_border_modes */
-#define GL_CONVOLUTION_1D 0x8010
-#define GL_CONVOLUTION_2D 0x8011
-#define GL_SEPARABLE_2D 0x8012
-#define GL_CONVOLUTION_BORDER_MODE 0x8013
-#define GL_CONVOLUTION_FILTER_SCALE 0x8014
-#define GL_CONVOLUTION_FILTER_BIAS 0x8015
-#define GL_REDUCE 0x8016
-#define GL_CONVOLUTION_FORMAT 0x8017
-#define GL_CONVOLUTION_WIDTH 0x8018
-#define GL_CONVOLUTION_HEIGHT 0x8019
-#define GL_MAX_CONVOLUTION_WIDTH 0x801A
-#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
-#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
-#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
-#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
-#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
-#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
-#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
-#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
-#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
-#define GL_CONSTANT_BORDER 0x8151
-#define GL_REPLICATE_BORDER 0x8153
-#define GL_CONVOLUTION_BORDER_COLOR 0x8154
-/* GL_SGI_color_matrix */
-#define GL_COLOR_MATRIX 0x80B1
-#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
-#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
-#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
-#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
-#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
-#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
-#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
-#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
-#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
-#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB
-/* GL_EXT_histogram */
-#define GL_HISTOGRAM 0x8024
-#define GL_PROXY_HISTOGRAM 0x8025
-#define GL_HISTOGRAM_WIDTH 0x8026
-#define GL_HISTOGRAM_FORMAT 0x8027
-#define GL_HISTOGRAM_RED_SIZE 0x8028
-#define GL_HISTOGRAM_GREEN_SIZE 0x8029
-#define GL_HISTOGRAM_BLUE_SIZE 0x802A
-#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
-#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
-#define GL_HISTOGRAM_SINK 0x802D
-#define GL_MINMAX 0x802E
-#define GL_MINMAX_FORMAT 0x802F
-#define GL_MINMAX_SINK 0x8030
-#define GL_TABLE_TOO_LARGE 0x8031
-/* GL_EXT_blend_color, GL_EXT_blend_minmax */
-#define GL_BLEND_EQUATION 0x8009
-#define GL_MIN 0x8007
-#define GL_MAX 0x8008
-#define GL_FUNC_ADD 0x8006
-#define GL_FUNC_SUBTRACT 0x800A
-#define GL_FUNC_REVERSE_SUBTRACT 0x800B
-#define GL_BLEND_COLOR 0x8005
-
-
-/* OpenGL 1.3 */
-/* multitexture */
-#define GL_TEXTURE0 0x84C0
-#define GL_TEXTURE1 0x84C1
-#define GL_TEXTURE2 0x84C2
-#define GL_TEXTURE3 0x84C3
-#define GL_TEXTURE4 0x84C4
-#define GL_TEXTURE5 0x84C5
-#define GL_TEXTURE6 0x84C6
-#define GL_TEXTURE7 0x84C7
-#define GL_TEXTURE8 0x84C8
-#define GL_TEXTURE9 0x84C9
-#define GL_TEXTURE10 0x84CA
-#define GL_TEXTURE11 0x84CB
-#define GL_TEXTURE12 0x84CC
-#define GL_TEXTURE13 0x84CD
-#define GL_TEXTURE14 0x84CE
-#define GL_TEXTURE15 0x84CF
-#define GL_TEXTURE16 0x84D0
-#define GL_TEXTURE17 0x84D1
-#define GL_TEXTURE18 0x84D2
-#define GL_TEXTURE19 0x84D3
-#define GL_TEXTURE20 0x84D4
-#define GL_TEXTURE21 0x84D5
-#define GL_TEXTURE22 0x84D6
-#define GL_TEXTURE23 0x84D7
-#define GL_TEXTURE24 0x84D8
-#define GL_TEXTURE25 0x84D9
-#define GL_TEXTURE26 0x84DA
-#define GL_TEXTURE27 0x84DB
-#define GL_TEXTURE28 0x84DC
-#define GL_TEXTURE29 0x84DD
-#define GL_TEXTURE30 0x84DE
-#define GL_TEXTURE31 0x84DF
-#define GL_ACTIVE_TEXTURE 0x84E0
-#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
-#define GL_MAX_TEXTURE_UNITS 0x84E2
-/* texture_cube_map */
-#define GL_NORMAL_MAP 0x8511
-#define GL_REFLECTION_MAP 0x8512
-#define GL_TEXTURE_CUBE_MAP 0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
-#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
-/* texture_compression */
-#define GL_COMPRESSED_ALPHA 0x84E9
-#define GL_COMPRESSED_LUMINANCE 0x84EA
-#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
-#define GL_COMPRESSED_INTENSITY 0x84EC
-#define GL_COMPRESSED_RGB 0x84ED
-#define GL_COMPRESSED_RGBA 0x84EE
-#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
-#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
-#define GL_TEXTURE_COMPRESSED 0x86A1
-#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
-#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
-/* multisample */
-#define GL_MULTISAMPLE 0x809D
-#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
-#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
-#define GL_SAMPLE_COVERAGE 0x80A0
-#define GL_SAMPLE_BUFFERS 0x80A8
-#define GL_SAMPLES 0x80A9
-#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
-#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
-#define GL_MULTISAMPLE_BIT 0x20000000
-/* transpose_matrix */
-#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
-#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
-#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
-#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
-/* texture_env_combine */
-#define GL_COMBINE 0x8570
-#define GL_COMBINE_RGB 0x8571
-#define GL_COMBINE_ALPHA 0x8572
-#define GL_SOURCE0_RGB 0x8580
-#define GL_SOURCE1_RGB 0x8581
-#define GL_SOURCE2_RGB 0x8582
-#define GL_SOURCE0_ALPHA 0x8588
-#define GL_SOURCE1_ALPHA 0x8589
-#define GL_SOURCE2_ALPHA 0x858A
-#define GL_OPERAND0_RGB 0x8590
-#define GL_OPERAND1_RGB 0x8591
-#define GL_OPERAND2_RGB 0x8592
-#define GL_OPERAND0_ALPHA 0x8598
-#define GL_OPERAND1_ALPHA 0x8599
-#define GL_OPERAND2_ALPHA 0x859A
-#define GL_RGB_SCALE 0x8573
-#define GL_ADD_SIGNED 0x8574
-#define GL_INTERPOLATE 0x8575
-#define GL_SUBTRACT 0x84E7
-#define GL_CONSTANT 0x8576
-#define GL_PRIMARY_COLOR 0x8577
-#define GL_PREVIOUS 0x8578
-/* texture_env_dot3 */
-#define GL_DOT3_RGB 0x86AE
-#define GL_DOT3_RGBA 0x86AF
-/* texture_border_clamp */
-#define GL_CLAMP_TO_BORDER 0x812D
-
-#endif /* __WIN32__ */
-
-
-
-/************************************************************************
- *
- * Function prototypes
- *
- ************************************************************************/
-
-/* Miscellaneous */
-GLAPI void APIENTRY glClearIndex( GLfloat c );
-GLAPI void APIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
-GLAPI void APIENTRY glClear( GLbitfield mask );
-GLAPI void APIENTRY glIndexMask( GLuint mask );
-GLAPI void APIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
-GLAPI void APIENTRY glAlphaFunc( GLenum func, GLclampf ref );
-GLAPI void APIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor );
-GLAPI void APIENTRY glLogicOp( GLenum opcode );
-GLAPI void APIENTRY glCullFace( GLenum mode );
-GLAPI void APIENTRY glFrontFace( GLenum mode );
-GLAPI void APIENTRY glPointSize( GLfloat size );
-GLAPI void APIENTRY glLineWidth( GLfloat width );
-GLAPI void APIENTRY glLineStipple( GLint factor, GLushort pattern );
-GLAPI void APIENTRY glPolygonMode( GLenum face, GLenum mode );
-GLAPI void APIENTRY glPolygonOffset( GLfloat factor, GLfloat units );
-GLAPI void APIENTRY glPolygonStipple( const GLubyte *mask );
-GLAPI void APIENTRY glGetPolygonStipple( GLubyte *mask );
-GLAPI void APIENTRY glEdgeFlag( GLboolean flag );
-GLAPI void APIENTRY glEdgeFlagv( const GLboolean *flag );
-GLAPI void APIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height);
-GLAPI void APIENTRY glClipPlane( GLenum plane, const GLdouble *equation );
-GLAPI void APIENTRY glGetClipPlane( GLenum plane, GLdouble *equation );
-GLAPI void APIENTRY glDrawBuffer( GLenum mode );
-GLAPI void APIENTRY glReadBuffer( GLenum mode );
-GLAPI void APIENTRY glEnable( GLenum cap );
-GLAPI void APIENTRY glDisable( GLenum cap );
-GLAPI GLboolean APIENTRY glIsEnabled( GLenum cap );
-GLAPI void APIENTRY glEnableClientState( GLenum cap ); /* 1.1 */
-GLAPI void APIENTRY glDisableClientState( GLenum cap ); /* 1.1 */
-GLAPI void APIENTRY glGetBooleanv( GLenum pname, GLboolean *params );
-GLAPI void APIENTRY glGetDoublev( GLenum pname, GLdouble *params );
-GLAPI void APIENTRY glGetFloatv( GLenum pname, GLfloat *params );
-GLAPI void APIENTRY glGetIntegerv( GLenum pname, GLint *params );
-GLAPI void APIENTRY glPushAttrib( GLbitfield mask );
-GLAPI void APIENTRY glPopAttrib( void );
-GLAPI void APIENTRY glPushClientAttrib( GLbitfield mask ); /* 1.1 */
-GLAPI void APIENTRY glPopClientAttrib( void ); /* 1.1 */
-GLAPI GLint APIENTRY glRenderMode( GLenum mode );
-GLAPI GLenum APIENTRY glGetError( void );
-GLAPI const GLubyte* APIENTRY glGetString( GLenum name );
-GLAPI void APIENTRY glFinish( void );
-GLAPI void APIENTRY glFlush( void );
-GLAPI void APIENTRY glHint( GLenum target, GLenum mode );
-
-/* Depth Buffer */
-GLAPI void APIENTRY glClearDepth( GLclampd depth );
-GLAPI void APIENTRY glDepthFunc( GLenum func );
-GLAPI void APIENTRY glDepthMask( GLboolean flag );
-GLAPI void APIENTRY glDepthRange( GLclampd near_val, GLclampd far_val );
-
-/* Accumulation Buffer */
-GLAPI void APIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
-GLAPI void APIENTRY glAccum( GLenum op, GLfloat value );
-
-/* Transformation */
-GLAPI void APIENTRY glMatrixMode( GLenum mode );
-GLAPI void APIENTRY glOrtho( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val );
-GLAPI void APIENTRY glFrustum( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val );
-GLAPI void APIENTRY glViewport( GLint x, GLint y, GLsizei width, GLsizei height );
-GLAPI void APIENTRY glPushMatrix( void );
-GLAPI void APIENTRY glPopMatrix( void );
-GLAPI void APIENTRY glLoadIdentity( void );
-GLAPI void APIENTRY glLoadMatrixd( const GLdouble *m );
-GLAPI void APIENTRY glLoadMatrixf( const GLfloat *m );
-GLAPI void APIENTRY glMultMatrixd( const GLdouble *m );
-GLAPI void APIENTRY glMultMatrixf( const GLfloat *m );
-GLAPI void APIENTRY glRotated( GLdouble angle, GLdouble x, GLdouble y, GLdouble z );
-GLAPI void APIENTRY glRotatef( GLfloat angle, GLfloat x, GLfloat y, GLfloat z );
-GLAPI void APIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z );
-GLAPI void APIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z );
-GLAPI void APIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z );
-GLAPI void APIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z );
-
-/* Display Lists */
-GLAPI GLboolean APIENTRY glIsList( GLuint list );
-GLAPI void APIENTRY glDeleteLists( GLuint list, GLsizei range );
-GLAPI GLuint APIENTRY glGenLists( GLsizei range );
-GLAPI void APIENTRY glNewList( GLuint list, GLenum mode );
-GLAPI void APIENTRY glEndList( void );
-GLAPI void APIENTRY glCallList( GLuint list );
-GLAPI void APIENTRY glCallLists( GLsizei n, GLenum type, const GLvoid *lists );
-GLAPI void APIENTRY glListBase( GLuint base );
-
-/* Drawing Functions */
-GLAPI void APIENTRY glBegin( GLenum mode );
-GLAPI void APIENTRY glEnd( void );
-GLAPI void APIENTRY glVertex2d( GLdouble x, GLdouble y );
-GLAPI void APIENTRY glVertex2f( GLfloat x, GLfloat y );
-GLAPI void APIENTRY glVertex2i( GLint x, GLint y );
-GLAPI void APIENTRY glVertex2s( GLshort x, GLshort y );
-GLAPI void APIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z );
-GLAPI void APIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z );
-GLAPI void APIENTRY glVertex3i( GLint x, GLint y, GLint z );
-GLAPI void APIENTRY glVertex3s( GLshort x, GLshort y, GLshort z );
-GLAPI void APIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
-GLAPI void APIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
-GLAPI void APIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w );
-GLAPI void APIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w );
-GLAPI void APIENTRY glVertex2dv( const GLdouble *v );
-GLAPI void APIENTRY glVertex2fv( const GLfloat *v );
-GLAPI void APIENTRY glVertex2iv( const GLint *v );
-GLAPI void APIENTRY glVertex2sv( const GLshort *v );
-GLAPI void APIENTRY glVertex3dv( const GLdouble *v );
-GLAPI void APIENTRY glVertex3fv( const GLfloat *v );
-GLAPI void APIENTRY glVertex3iv( const GLint *v );
-GLAPI void APIENTRY glVertex3sv( const GLshort *v );
-GLAPI void APIENTRY glVertex4dv( const GLdouble *v );
-GLAPI void APIENTRY glVertex4fv( const GLfloat *v );
-GLAPI void APIENTRY glVertex4iv( const GLint *v );
-GLAPI void APIENTRY glVertex4sv( const GLshort *v );
-GLAPI void APIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz );
-GLAPI void APIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz );
-GLAPI void APIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz );
-GLAPI void APIENTRY glNormal3i( GLint nx, GLint ny, GLint nz );
-GLAPI void APIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz );
-GLAPI void APIENTRY glNormal3bv( const GLbyte *v );
-GLAPI void APIENTRY glNormal3dv( const GLdouble *v );
-GLAPI void APIENTRY glNormal3fv( const GLfloat *v );
-GLAPI void APIENTRY glNormal3iv( const GLint *v );
-GLAPI void APIENTRY glNormal3sv( const GLshort *v );
-GLAPI void APIENTRY glIndexd( GLdouble c );
-GLAPI void APIENTRY glIndexf( GLfloat c );
-GLAPI void APIENTRY glIndexi( GLint c );
-GLAPI void APIENTRY glIndexs( GLshort c );
-GLAPI void APIENTRY glIndexub( GLubyte c ); /* 1.1 */
-GLAPI void APIENTRY glIndexdv( const GLdouble *c );
-GLAPI void APIENTRY glIndexfv( const GLfloat *c );
-GLAPI void APIENTRY glIndexiv( const GLint *c );
-GLAPI void APIENTRY glIndexsv( const GLshort *c );
-GLAPI void APIENTRY glIndexubv( const GLubyte *c ); /* 1.1 */
-GLAPI void APIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue );
-GLAPI void APIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue );
-GLAPI void APIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue );
-GLAPI void APIENTRY glColor3i( GLint red, GLint green, GLint blue );
-GLAPI void APIENTRY glColor3s( GLshort red, GLshort green, GLshort blue );
-GLAPI void APIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue );
-GLAPI void APIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue );
-GLAPI void APIENTRY glColor3us( GLushort red, GLushort green, GLushort blue );
-GLAPI void APIENTRY glColor4b( GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha );
-GLAPI void APIENTRY glColor4d( GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha );
-GLAPI void APIENTRY glColor4f( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
-GLAPI void APIENTRY glColor4i( GLint red, GLint green, GLint blue, GLint alpha );
-GLAPI void APIENTRY glColor4s( GLshort red, GLshort green, GLshort blue, GLshort alpha );
-GLAPI void APIENTRY glColor4ub( GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha );
-GLAPI void APIENTRY glColor4ui( GLuint red, GLuint green, GLuint blue, GLuint alpha );
-GLAPI void APIENTRY glColor4us( GLushort red, GLushort green, GLushort blue, GLushort alpha );
-GLAPI void APIENTRY glColor3bv( const GLbyte *v );
-GLAPI void APIENTRY glColor3dv( const GLdouble *v );
-GLAPI void APIENTRY glColor3fv( const GLfloat *v );
-GLAPI void APIENTRY glColor3iv( const GLint *v );
-GLAPI void APIENTRY glColor3sv( const GLshort *v );
-GLAPI void APIENTRY glColor3ubv( const GLubyte *v );
-GLAPI void APIENTRY glColor3uiv( const GLuint *v );
-GLAPI void APIENTRY glColor3usv( const GLushort *v );
-GLAPI void APIENTRY glColor4bv( const GLbyte *v );
-GLAPI void APIENTRY glColor4dv( const GLdouble *v );
-GLAPI void APIENTRY glColor4fv( const GLfloat *v );
-GLAPI void APIENTRY glColor4iv( const GLint *v );
-GLAPI void APIENTRY glColor4sv( const GLshort *v );
-GLAPI void APIENTRY glColor4ubv( const GLubyte *v );
-GLAPI void APIENTRY glColor4uiv( const GLuint *v );
-GLAPI void APIENTRY glColor4usv( const GLushort *v );
-GLAPI void APIENTRY glTexCoord1d( GLdouble s );
-GLAPI void APIENTRY glTexCoord1f( GLfloat s );
-GLAPI void APIENTRY glTexCoord1i( GLint s );
-GLAPI void APIENTRY glTexCoord1s( GLshort s );
-GLAPI void APIENTRY glTexCoord2d( GLdouble s, GLdouble t );
-GLAPI void APIENTRY glTexCoord2f( GLfloat s, GLfloat t );
-GLAPI void APIENTRY glTexCoord2i( GLint s, GLint t );
-GLAPI void APIENTRY glTexCoord2s( GLshort s, GLshort t );
-GLAPI void APIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r );
-GLAPI void APIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r );
-GLAPI void APIENTRY glTexCoord3i( GLint s, GLint t, GLint r );
-GLAPI void APIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r );
-GLAPI void APIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q );
-GLAPI void APIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q );
-GLAPI void APIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q );
-GLAPI void APIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q );
-GLAPI void APIENTRY glTexCoord1dv( const GLdouble *v );
-GLAPI void APIENTRY glTexCoord1fv( const GLfloat *v );
-GLAPI void APIENTRY glTexCoord1iv( const GLint *v );
-GLAPI void APIENTRY glTexCoord1sv( const GLshort *v );
-GLAPI void APIENTRY glTexCoord2dv( const GLdouble *v );
-GLAPI void APIENTRY glTexCoord2fv( const GLfloat *v );
-GLAPI void APIENTRY glTexCoord2iv( const GLint *v );
-GLAPI void APIENTRY glTexCoord2sv( const GLshort *v );
-GLAPI void APIENTRY glTexCoord3dv( const GLdouble *v );
-GLAPI void APIENTRY glTexCoord3fv( const GLfloat *v );
-GLAPI void APIENTRY glTexCoord3iv( const GLint *v );
-GLAPI void APIENTRY glTexCoord3sv( const GLshort *v );
-GLAPI void APIENTRY glTexCoord4dv( const GLdouble *v );
-GLAPI void APIENTRY glTexCoord4fv( const GLfloat *v );
-GLAPI void APIENTRY glTexCoord4iv( const GLint *v );
-GLAPI void APIENTRY glTexCoord4sv( const GLshort *v );
-GLAPI void APIENTRY glRasterPos2d( GLdouble x, GLdouble y );
-GLAPI void APIENTRY glRasterPos2f( GLfloat x, GLfloat y );
-GLAPI void APIENTRY glRasterPos2i( GLint x, GLint y );
-GLAPI void APIENTRY glRasterPos2s( GLshort x, GLshort y );
-GLAPI void APIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z );
-GLAPI void APIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z );
-GLAPI void APIENTRY glRasterPos3i( GLint x, GLint y, GLint z );
-GLAPI void APIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z );
-GLAPI void APIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );
-GLAPI void APIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );
-GLAPI void APIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w );
-GLAPI void APIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w );
-GLAPI void APIENTRY glRasterPos2dv( const GLdouble *v );
-GLAPI void APIENTRY glRasterPos2fv( const GLfloat *v );
-GLAPI void APIENTRY glRasterPos2iv( const GLint *v );
-GLAPI void APIENTRY glRasterPos2sv( const GLshort *v );
-GLAPI void APIENTRY glRasterPos3dv( const GLdouble *v );
-GLAPI void APIENTRY glRasterPos3fv( const GLfloat *v );
-GLAPI void APIENTRY glRasterPos3iv( const GLint *v );
-GLAPI void APIENTRY glRasterPos3sv( const GLshort *v );
-GLAPI void APIENTRY glRasterPos4dv( const GLdouble *v );
-GLAPI void APIENTRY glRasterPos4fv( const GLfloat *v );
-GLAPI void APIENTRY glRasterPos4iv( const GLint *v );
-GLAPI void APIENTRY glRasterPos4sv( const GLshort *v );
-GLAPI void APIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );
-GLAPI void APIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
-GLAPI void APIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 );
-GLAPI void APIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );
-GLAPI void APIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 );
-GLAPI void APIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 );
-GLAPI void APIENTRY glRectiv( const GLint *v1, const GLint *v2 );
-GLAPI void APIENTRY glRectsv( const GLshort *v1, const GLshort *v2 );
-
-/* Lighting */
-GLAPI void APIENTRY glShadeModel( GLenum mode );
-GLAPI void APIENTRY glLightf( GLenum light, GLenum pname, GLfloat param );
-GLAPI void APIENTRY glLighti( GLenum light, GLenum pname, GLint param );
-GLAPI void APIENTRY glLightfv( GLenum light, GLenum pname, const GLfloat *params );
-GLAPI void APIENTRY glLightiv( GLenum light, GLenum pname, const GLint *params );
-GLAPI void APIENTRY glGetLightfv( GLenum light, GLenum pname, GLfloat *params );
-GLAPI void APIENTRY glGetLightiv( GLenum light, GLenum pname, GLint *params );
-GLAPI void APIENTRY glLightModelf( GLenum pname, GLfloat param );
-GLAPI void APIENTRY glLightModeli( GLenum pname, GLint param );
-GLAPI void APIENTRY glLightModelfv( GLenum pname, const GLfloat *params );
-GLAPI void APIENTRY glLightModeliv( GLenum pname, const GLint *params );
-GLAPI void APIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param );
-GLAPI void APIENTRY glMateriali( GLenum face, GLenum pname, GLint param );
-GLAPI void APIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params );
-GLAPI void APIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params );
-GLAPI void APIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params );
-GLAPI void APIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params );
-GLAPI void APIENTRY glColorMaterial( GLenum face, GLenum mode );
-
-/* Raster functions */
-GLAPI void APIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor );
-GLAPI void APIENTRY glPixelStoref( GLenum pname, GLfloat param );
-GLAPI void APIENTRY glPixelStorei( GLenum pname, GLint param );
-GLAPI void APIENTRY glPixelTransferf( GLenum pname, GLfloat param );
-GLAPI void APIENTRY glPixelTransferi( GLenum pname, GLint param );
-GLAPI void APIENTRY glPixelMapfv( GLenum map, GLint mapsize, const GLfloat *values );
-GLAPI void APIENTRY glPixelMapuiv( GLenum map, GLint mapsize, const GLuint *values );
-GLAPI void APIENTRY glPixelMapusv( GLenum map, GLint mapsize, const GLushort *values );
-GLAPI void APIENTRY glGetPixelMapfv( GLenum map, GLfloat *values );
-GLAPI void APIENTRY glGetPixelMapuiv( GLenum map, GLuint *values );
-GLAPI void APIENTRY glGetPixelMapusv( GLenum map, GLushort *values );
-GLAPI void APIENTRY glBitmap( GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap );
-GLAPI void APIENTRY glReadPixels( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels );
-GLAPI void APIENTRY glDrawPixels( GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels );
-GLAPI void APIENTRY glCopyPixels( GLint x, GLint y, GLsizei width, GLsizei height, GLenum type );
-
-/* Stenciling */
-GLAPI void APIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask );
-GLAPI void APIENTRY glStencilMask( GLuint mask );
-GLAPI void APIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass );
-GLAPI void APIENTRY glClearStencil( GLint s );
-
-/* Texture mapping */
-GLAPI void APIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param );
-GLAPI void APIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param );
-GLAPI void APIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param );
-GLAPI void APIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params );
-GLAPI void APIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
-GLAPI void APIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params );
-GLAPI void APIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params );
-GLAPI void APIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );
-GLAPI void APIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params );
-GLAPI void APIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param );
-GLAPI void APIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param );
-GLAPI void APIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params );
-GLAPI void APIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params );
-GLAPI void APIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params );
-GLAPI void APIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params );
-GLAPI void APIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param );
-GLAPI void APIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param );
-GLAPI void APIENTRY glTexParameterfv( GLenum target, GLenum pname, const GLfloat *params );
-GLAPI void APIENTRY glTexParameteriv( GLenum target, GLenum pname, const GLint *params );
-GLAPI void APIENTRY glGetTexParameterfv( GLenum target, GLenum pname, GLfloat *params);
-GLAPI void APIENTRY glGetTexParameteriv( GLenum target, GLenum pname, GLint *params );
-GLAPI void APIENTRY glGetTexLevelParameterfv( GLenum target, GLint level, GLenum pname, GLfloat *params );
-GLAPI void APIENTRY glGetTexLevelParameteriv( GLenum target, GLint level, GLenum pname, GLint *params );
-GLAPI void APIENTRY glTexImage1D( GLenum target, GLint level, GLint internalFormat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels );
-GLAPI void APIENTRY glTexImage2D( GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels );
-GLAPI void APIENTRY glGetTexImage( GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels );
-
-/* Evaluators */
-GLAPI void APIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points );
-GLAPI void APIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points );
-GLAPI void APIENTRY glMap2d( GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points );
-GLAPI void APIENTRY glMap2f( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points );
-GLAPI void APIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v );
-GLAPI void APIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v );
-GLAPI void APIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v );
-GLAPI void APIENTRY glEvalCoord1d( GLdouble u );
-GLAPI void APIENTRY glEvalCoord1f( GLfloat u );
-GLAPI void APIENTRY glEvalCoord1dv( const GLdouble *u );
-GLAPI void APIENTRY glEvalCoord1fv( const GLfloat *u );
-GLAPI void APIENTRY glEvalCoord2d( GLdouble u, GLdouble v );
-GLAPI void APIENTRY glEvalCoord2f( GLfloat u, GLfloat v );
-GLAPI void APIENTRY glEvalCoord2dv( const GLdouble *u );
-GLAPI void APIENTRY glEvalCoord2fv( const GLfloat *u );
-GLAPI void APIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 );
-GLAPI void APIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 );
-GLAPI void APIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2 );
-GLAPI void APIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2 );
-GLAPI void APIENTRY glEvalPoint1( GLint i );
-GLAPI void APIENTRY glEvalPoint2( GLint i, GLint j );
-GLAPI void APIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 );
-GLAPI void APIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );
-
-/* Fog */
-GLAPI void APIENTRY glFogf( GLenum pname, GLfloat param );
-GLAPI void APIENTRY glFogi( GLenum pname, GLint param );
-GLAPI void APIENTRY glFogfv( GLenum pname, const GLfloat *params );
-GLAPI void APIENTRY glFogiv( GLenum pname, const GLint *params );
-
-/* Selection and Feedback */
-GLAPI void APIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer );
-GLAPI void APIENTRY glPassThrough( GLfloat token );
-GLAPI void APIENTRY glSelectBuffer( GLsizei size, GLuint *buffer );
-GLAPI void APIENTRY glInitNames( void );
-GLAPI void APIENTRY glLoadName( GLuint name );
-GLAPI void APIENTRY glPushName( GLuint name );
-GLAPI void APIENTRY glPopName( void );
-
-
-/* 1.1 functions */
-/* texture objects */
-GLAPI void APIENTRY glGenTextures( GLsizei n, GLuint *textures );
-GLAPI void APIENTRY glDeleteTextures( GLsizei n, const GLuint *textures);
-GLAPI void APIENTRY glBindTexture( GLenum target, GLuint texture );
-GLAPI void APIENTRY glPrioritizeTextures( GLsizei n, const GLuint *textures, const GLclampf *priorities );
-GLAPI GLboolean APIENTRY glAreTexturesResident( GLsizei n, const GLuint *textures, GLboolean *residences );
-GLAPI GLboolean APIENTRY glIsTexture( GLuint texture );
-/* texture mapping */
-GLAPI void APIENTRY glTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels );
-GLAPI void APIENTRY glTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels );
-GLAPI void APIENTRY glCopyTexImage1D( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border );
-GLAPI void APIENTRY glCopyTexImage2D( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border );
-GLAPI void APIENTRY glCopyTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width );
-GLAPI void APIENTRY glCopyTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height );
-/* vertex arrays */
-GLAPI void APIENTRY glVertexPointer( GLint size, GLenum type, GLsizei stride, const GLvoid *ptr );
-GLAPI void APIENTRY glNormalPointer( GLenum type, GLsizei stride, const GLvoid *ptr );
-GLAPI void APIENTRY glColorPointer( GLint size, GLenum type, GLsizei stride, const GLvoid *ptr );
-GLAPI void APIENTRY glIndexPointer( GLenum type, GLsizei stride, const GLvoid *ptr );
-GLAPI void APIENTRY glTexCoordPointer( GLint size, GLenum type, GLsizei stride, const GLvoid *ptr );
-GLAPI void APIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr );
-GLAPI void APIENTRY glGetPointerv( GLenum pname, GLvoid **params );
-GLAPI void APIENTRY glArrayElement( GLint i );
-GLAPI void APIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count );
-GLAPI void APIENTRY glDrawElements( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices );
-GLAPI void APIENTRY glInterleavedArrays( GLenum format, GLsizei stride, const GLvoid *pointer );
-
-
-
-/* Under Windows, we do not define OpenGL 1.2 & 1.3 functionality, since
- it is treated as extensions (defined in glext.h) */
-#if !defined(__WIN32__)
-
-/* 1.2 functions */
-GLAPI void APIENTRY glDrawRangeElements( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices );
-GLAPI void APIENTRY glTexImage3D( GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels );
-GLAPI void APIENTRY glTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
-GLAPI void APIENTRY glCopyTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height );
-
-/* 1.2 imaging extension functions */
-GLAPI void APIENTRY glColorTable( GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table );
-GLAPI void APIENTRY glColorSubTable( GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data );
-GLAPI void APIENTRY glColorTableParameteriv(GLenum target, GLenum pname, const GLint *params);
-GLAPI void APIENTRY glColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params);
-GLAPI void APIENTRY glCopyColorSubTable( GLenum target, GLsizei start, GLint x, GLint y, GLsizei width );
-GLAPI void APIENTRY glCopyColorTable( GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width );
-GLAPI void APIENTRY glGetColorTable( GLenum target, GLenum format, GLenum type, GLvoid *table );
-GLAPI void APIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params );
-GLAPI void APIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname, GLint *params );
-GLAPI void APIENTRY glBlendEquation( GLenum mode );
-GLAPI void APIENTRY glBlendColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
-GLAPI void APIENTRY glHistogram( GLenum target, GLsizei width, GLenum internalformat, GLboolean sink );
-GLAPI void APIENTRY glResetHistogram( GLenum target );
-GLAPI void APIENTRY glGetHistogram( GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values );
-GLAPI void APIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname, GLfloat *params );
-GLAPI void APIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname, GLint *params );
-GLAPI void APIENTRY glMinmax( GLenum target, GLenum internalformat, GLboolean sink );
-GLAPI void APIENTRY glResetMinmax( GLenum target );
-GLAPI void APIENTRY glGetMinmax( GLenum target, GLboolean reset, GLenum format, GLenum types, GLvoid *values );
-GLAPI void APIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname, GLfloat *params );
-GLAPI void APIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname, GLint *params );
-GLAPI void APIENTRY glConvolutionFilter1D( GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image );
-GLAPI void APIENTRY glConvolutionFilter2D( GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image );
-GLAPI void APIENTRY glConvolutionParameterf( GLenum target, GLenum pname, GLfloat params );
-GLAPI void APIENTRY glConvolutionParameterfv( GLenum target, GLenum pname, const GLfloat *params );
-GLAPI void APIENTRY glConvolutionParameteri( GLenum target, GLenum pname, GLint params );
-GLAPI void APIENTRY glConvolutionParameteriv( GLenum target, GLenum pname, const GLint *params );
-GLAPI void APIENTRY glCopyConvolutionFilter1D( GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width );
-GLAPI void APIENTRY glCopyConvolutionFilter2D( GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
-GLAPI void APIENTRY glGetConvolutionFilter( GLenum target, GLenum format, GLenum type, GLvoid *image );
-GLAPI void APIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname, GLfloat *params );
-GLAPI void APIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname, GLint *params );
-GLAPI void APIENTRY glSeparableFilter2D( GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column );
-GLAPI void APIENTRY glGetSeparableFilter( GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span );
-
-/* 1.3 functions */
-GLAPI void APIENTRY glActiveTexture( GLenum texture );
-GLAPI void APIENTRY glClientActiveTexture( GLenum texture );
-GLAPI void APIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data );
-GLAPI void APIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data );
-GLAPI void APIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data );
-GLAPI void APIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data );
-GLAPI void APIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data );
-GLAPI void APIENTRY glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data );
-GLAPI void APIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img );
-GLAPI void APIENTRY glMultiTexCoord1d( GLenum target, GLdouble s );
-GLAPI void APIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v );
-GLAPI void APIENTRY glMultiTexCoord1f( GLenum target, GLfloat s );
-GLAPI void APIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v );
-GLAPI void APIENTRY glMultiTexCoord1i( GLenum target, GLint s );
-GLAPI void APIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v );
-GLAPI void APIENTRY glMultiTexCoord1s( GLenum target, GLshort s );
-GLAPI void APIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v );
-GLAPI void APIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t );
-GLAPI void APIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v );
-GLAPI void APIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t );
-GLAPI void APIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v );
-GLAPI void APIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t );
-GLAPI void APIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v );
-GLAPI void APIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t );
-GLAPI void APIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v );
-GLAPI void APIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r );
-GLAPI void APIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v );
-GLAPI void APIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r );
-GLAPI void APIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v );
-GLAPI void APIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r );
-GLAPI void APIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v );
-GLAPI void APIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r );
-GLAPI void APIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v );
-GLAPI void APIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q );
-GLAPI void APIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v );
-GLAPI void APIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q );
-GLAPI void APIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v );
-GLAPI void APIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q );
-GLAPI void APIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v );
-GLAPI void APIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q );
-GLAPI void APIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v );
-GLAPI void APIENTRY glLoadTransposeMatrixd( const GLdouble m[16] );
-GLAPI void APIENTRY glLoadTransposeMatrixf( const GLfloat m[16] );
-GLAPI void APIENTRY glMultTransposeMatrixd( const GLdouble m[16] );
-GLAPI void APIENTRY glMultTransposeMatrixf( const GLfloat m[16] );
-GLAPI void APIENTRY glSampleCoverage( GLclampf value, GLboolean invert );
-GLAPI void APIENTRY glSamplePass( GLenum pass );
-
-#endif /* __WIN32__ */
-
-
-/* Include external definitions of OpenGL extensions */
-/* Removed, see this bug report for reference:
- * http://sourceforge.net/tracker/index.php?func=detail&aid=610178&group_id=2435&atid=102435
- *
- * #include <GL/glext.h>
- */
-
-
-/************************************************************************
- * Begin system-specific stuff
- */
-/*
- * End system-specific stuff
- ************************************************************************/
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __gl_h_ */
diff --git a/winsup/w32api/include/GL/glext.h b/winsup/w32api/include/GL/glext.h
deleted file mode 100644
index c4b4baa..0000000
--- a/winsup/w32api/include/GL/glext.h
+++ /dev/null
@@ -1,4623 +0,0 @@
-#ifndef __glext_h_
-#define __glext_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
-** License Applicability. Except to the extent portions of this file are
-** made subject to an alternative license as permitted in the SGI Free
-** Software License B, Version 1.1 (the "License"), the contents of this
-** file are subject only to the provisions of the License. You may not use
-** this file except in compliance with the License. You may obtain a copy
-** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
-** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
-** http://oss.sgi.com/projects/FreeB
-**
-** Note that, as provided in the License, the Software is distributed on an
-** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
-** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
-** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
-** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
-** Original Code. The Original Code is: OpenGL Sample Implementation,
-** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
-** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
-** Copyright in any portions created by third parties is as indicated
-** elsewhere herein. All Rights Reserved.
-**
-** Additional Notice Provisions: This software was created using the
-** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
-** not been independently verified as being compliant with the OpenGL(R)
-** version 1.2.1 Specification.
-*/
-
-#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
-#define WIN32_LEAN_AND_MEAN 1
-#include <windows.h>
-#endif
-
-#ifndef APIENTRY
-#define APIENTRY
-#endif
-#ifndef GLAPI
-#define GLAPI extern
-#endif
-
-/*************************************************************/
-
-/* Header file version number, required by OpenGL ABI for Linux */
-/* glext.h last updated 2002/03/22 */
-/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
-#define GL_GLEXT_VERSION 11
-
-#ifndef GL_VERSION_1_2
-#define GL_CONSTANT_COLOR 0x8001
-#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
-#define GL_CONSTANT_ALPHA 0x8003
-#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
-#define GL_BLEND_COLOR 0x8005
-#define GL_FUNC_ADD 0x8006
-#define GL_MIN 0x8007
-#define GL_MAX 0x8008
-#define GL_BLEND_EQUATION 0x8009
-#define GL_FUNC_SUBTRACT 0x800A
-#define GL_FUNC_REVERSE_SUBTRACT 0x800B
-#define GL_CONVOLUTION_1D 0x8010
-#define GL_CONVOLUTION_2D 0x8011
-#define GL_SEPARABLE_2D 0x8012
-#define GL_CONVOLUTION_BORDER_MODE 0x8013
-#define GL_CONVOLUTION_FILTER_SCALE 0x8014
-#define GL_CONVOLUTION_FILTER_BIAS 0x8015
-#define GL_REDUCE 0x8016
-#define GL_CONVOLUTION_FORMAT 0x8017
-#define GL_CONVOLUTION_WIDTH 0x8018
-#define GL_CONVOLUTION_HEIGHT 0x8019
-#define GL_MAX_CONVOLUTION_WIDTH 0x801A
-#define GL_MAX_CONVOLUTION_HEIGHT 0x801B
-#define GL_POST_CONVOLUTION_RED_SCALE 0x801C
-#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D
-#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E
-#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F
-#define GL_POST_CONVOLUTION_RED_BIAS 0x8020
-#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021
-#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022
-#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023
-#define GL_HISTOGRAM 0x8024
-#define GL_PROXY_HISTOGRAM 0x8025
-#define GL_HISTOGRAM_WIDTH 0x8026
-#define GL_HISTOGRAM_FORMAT 0x8027
-#define GL_HISTOGRAM_RED_SIZE 0x8028
-#define GL_HISTOGRAM_GREEN_SIZE 0x8029
-#define GL_HISTOGRAM_BLUE_SIZE 0x802A
-#define GL_HISTOGRAM_ALPHA_SIZE 0x802B
-#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C
-#define GL_HISTOGRAM_SINK 0x802D
-#define GL_MINMAX 0x802E
-#define GL_MINMAX_FORMAT 0x802F
-#define GL_MINMAX_SINK 0x8030
-#define GL_TABLE_TOO_LARGE 0x8031
-#define GL_UNSIGNED_BYTE_3_3_2 0x8032
-#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
-#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
-#define GL_UNSIGNED_INT_8_8_8_8 0x8035
-#define GL_UNSIGNED_INT_10_10_10_2 0x8036
-#define GL_RESCALE_NORMAL 0x803A
-#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
-#define GL_UNSIGNED_SHORT_5_6_5 0x8363
-#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
-#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
-#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
-#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
-#define GL_COLOR_MATRIX 0x80B1
-#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2
-#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3
-#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4
-#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5
-#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6
-#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7
-#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8
-#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9
-#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA
-#define GL_COLOR_TABLE 0x80D0
-#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1
-#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2
-#define GL_PROXY_COLOR_TABLE 0x80D3
-#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4
-#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5
-#define GL_COLOR_TABLE_SCALE 0x80D6
-#define GL_COLOR_TABLE_BIAS 0x80D7
-#define GL_COLOR_TABLE_FORMAT 0x80D8
-#define GL_COLOR_TABLE_WIDTH 0x80D9
-#define GL_COLOR_TABLE_RED_SIZE 0x80DA
-#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB
-#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC
-#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD
-#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE
-#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF
-#define GL_BGR 0x80E0
-#define GL_BGRA 0x80E1
-#define GL_MAX_ELEMENTS_VERTICES 0x80E8
-#define GL_MAX_ELEMENTS_INDICES 0x80E9
-#define GL_CLAMP_TO_EDGE 0x812F
-#define GL_TEXTURE_MIN_LOD 0x813A
-#define GL_TEXTURE_MAX_LOD 0x813B
-#define GL_TEXTURE_BASE_LEVEL 0x813C
-#define GL_TEXTURE_MAX_LEVEL 0x813D
-#define GL_IGNORE_BORDER 0x8150
-#define GL_CONSTANT_BORDER 0x8151
-#define GL_WRAP_BORDER 0x8152
-#define GL_REPLICATE_BORDER 0x8153
-#define GL_CONVOLUTION_BORDER_COLOR 0x8154
-#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
-#define GL_SINGLE_COLOR 0x81F9
-#define GL_SEPARATE_SPECULAR_COLOR 0x81FA
-#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
-#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
-#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
-#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
-#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
-#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
-#endif
-
-#ifndef GL_VERSION_1_3
-#define GL_TEXTURE0 0x84C0
-#define GL_TEXTURE1 0x84C1
-#define GL_TEXTURE2 0x84C2
-#define GL_TEXTURE3 0x84C3
-#define GL_TEXTURE4 0x84C4
-#define GL_TEXTURE5 0x84C5
-#define GL_TEXTURE6 0x84C6
-#define GL_TEXTURE7 0x84C7
-#define GL_TEXTURE8 0x84C8
-#define GL_TEXTURE9 0x84C9
-#define GL_TEXTURE10 0x84CA
-#define GL_TEXTURE11 0x84CB
-#define GL_TEXTURE12 0x84CC
-#define GL_TEXTURE13 0x84CD
-#define GL_TEXTURE14 0x84CE
-#define GL_TEXTURE15 0x84CF
-#define GL_TEXTURE16 0x84D0
-#define GL_TEXTURE17 0x84D1
-#define GL_TEXTURE18 0x84D2
-#define GL_TEXTURE19 0x84D3
-#define GL_TEXTURE20 0x84D4
-#define GL_TEXTURE21 0x84D5
-#define GL_TEXTURE22 0x84D6
-#define GL_TEXTURE23 0x84D7
-#define GL_TEXTURE24 0x84D8
-#define GL_TEXTURE25 0x84D9
-#define GL_TEXTURE26 0x84DA
-#define GL_TEXTURE27 0x84DB
-#define GL_TEXTURE28 0x84DC
-#define GL_TEXTURE29 0x84DD
-#define GL_TEXTURE30 0x84DE
-#define GL_TEXTURE31 0x84DF
-#define GL_ACTIVE_TEXTURE 0x84E0
-#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1
-#define GL_MAX_TEXTURE_UNITS 0x84E2
-#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3
-#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4
-#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5
-#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6
-#define GL_MULTISAMPLE 0x809D
-#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
-#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
-#define GL_SAMPLE_COVERAGE 0x80A0
-#define GL_SAMPLE_BUFFERS 0x80A8
-#define GL_SAMPLES 0x80A9
-#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
-#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
-#define GL_MULTISAMPLE_BIT 0x20000000
-#define GL_NORMAL_MAP 0x8511
-#define GL_REFLECTION_MAP 0x8512
-#define GL_TEXTURE_CUBE_MAP 0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
-#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
-#define GL_COMPRESSED_ALPHA 0x84E9
-#define GL_COMPRESSED_LUMINANCE 0x84EA
-#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB
-#define GL_COMPRESSED_INTENSITY 0x84EC
-#define GL_COMPRESSED_RGB 0x84ED
-#define GL_COMPRESSED_RGBA 0x84EE
-#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
-#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
-#define GL_TEXTURE_COMPRESSED 0x86A1
-#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
-#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
-#define GL_CLAMP_TO_BORDER 0x812D
-#define GL_CLAMP_TO_BORDER_SGIS 0x812D
-#define GL_COMBINE 0x8570
-#define GL_COMBINE_RGB 0x8571
-#define GL_COMBINE_ALPHA 0x8572
-#define GL_SOURCE0_RGB 0x8580
-#define GL_SOURCE1_RGB 0x8581
-#define GL_SOURCE2_RGB 0x8582
-#define GL_SOURCE0_ALPHA 0x8588
-#define GL_SOURCE1_ALPHA 0x8589
-#define GL_SOURCE2_ALPHA 0x858A
-#define GL_OPERAND0_RGB 0x8590
-#define GL_OPERAND1_RGB 0x8591
-#define GL_OPERAND2_RGB 0x8592
-#define GL_OPERAND0_ALPHA 0x8598
-#define GL_OPERAND1_ALPHA 0x8599
-#define GL_OPERAND2_ALPHA 0x859A
-#define GL_RGB_SCALE 0x8573
-#define GL_ADD_SIGNED 0x8574
-#define GL_INTERPOLATE 0x8575
-#define GL_SUBTRACT 0x84E7
-#define GL_CONSTANT 0x8576
-#define GL_PRIMARY_COLOR 0x8577
-#define GL_PREVIOUS 0x8578
-#define GL_DOT3_RGB 0x86AE
-#define GL_DOT3_RGBA 0x86AF
-#endif
-
-#ifndef GL_ARB_multitexture
-#define GL_TEXTURE0_ARB 0x84C0
-#define GL_TEXTURE1_ARB 0x84C1
-#define GL_TEXTURE2_ARB 0x84C2
-#define GL_TEXTURE3_ARB 0x84C3
-#define GL_TEXTURE4_ARB 0x84C4
-#define GL_TEXTURE5_ARB 0x84C5
-#define GL_TEXTURE6_ARB 0x84C6
-#define GL_TEXTURE7_ARB 0x84C7
-#define GL_TEXTURE8_ARB 0x84C8
-#define GL_TEXTURE9_ARB 0x84C9
-#define GL_TEXTURE10_ARB 0x84CA
-#define GL_TEXTURE11_ARB 0x84CB
-#define GL_TEXTURE12_ARB 0x84CC
-#define GL_TEXTURE13_ARB 0x84CD
-#define GL_TEXTURE14_ARB 0x84CE
-#define GL_TEXTURE15_ARB 0x84CF
-#define GL_TEXTURE16_ARB 0x84D0
-#define GL_TEXTURE17_ARB 0x84D1
-#define GL_TEXTURE18_ARB 0x84D2
-#define GL_TEXTURE19_ARB 0x84D3
-#define GL_TEXTURE20_ARB 0x84D4
-#define GL_TEXTURE21_ARB 0x84D5
-#define GL_TEXTURE22_ARB 0x84D6
-#define GL_TEXTURE23_ARB 0x84D7
-#define GL_TEXTURE24_ARB 0x84D8
-#define GL_TEXTURE25_ARB 0x84D9
-#define GL_TEXTURE26_ARB 0x84DA
-#define GL_TEXTURE27_ARB 0x84DB
-#define GL_TEXTURE28_ARB 0x84DC
-#define GL_TEXTURE29_ARB 0x84DD
-#define GL_TEXTURE30_ARB 0x84DE
-#define GL_TEXTURE31_ARB 0x84DF
-#define GL_ACTIVE_TEXTURE_ARB 0x84E0
-#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
-#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
-#endif
-
-#ifndef GL_ARB_transpose_matrix
-#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3
-#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4
-#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5
-#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6
-#endif
-
-#ifndef GL_ARB_multisample
-#define GL_MULTISAMPLE_ARB 0x809D
-#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
-#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
-#define GL_SAMPLE_COVERAGE_ARB 0x80A0
-#define GL_SAMPLE_BUFFERS_ARB 0x80A8
-#define GL_SAMPLES_ARB 0x80A9
-#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
-#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
-#define GL_MULTISAMPLE_BIT_ARB 0x20000000
-#endif
-
-#ifndef GL_ARB_texture_env_add
-#endif
-
-#ifndef GL_ARB_texture_cube_map
-#define GL_NORMAL_MAP_ARB 0x8511
-#define GL_REFLECTION_MAP_ARB 0x8512
-#define GL_TEXTURE_CUBE_MAP_ARB 0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
-#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
-#endif
-
-#ifndef GL_ARB_texture_compression
-#define GL_COMPRESSED_ALPHA_ARB 0x84E9
-#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA
-#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
-#define GL_COMPRESSED_INTENSITY_ARB 0x84EC
-#define GL_COMPRESSED_RGB_ARB 0x84ED
-#define GL_COMPRESSED_RGBA_ARB 0x84EE
-#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
-#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
-#define GL_TEXTURE_COMPRESSED_ARB 0x86A1
-#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
-#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
-#endif
-
-#ifndef GL_ARB_texture_border_clamp
-#define GL_CLAMP_TO_BORDER_ARB 0x812D
-#endif
-
-#ifndef GL_ARB_point_parameters
-#define GL_POINT_SIZE_MIN_ARB 0x8126
-#define GL_POINT_SIZE_MIN_EXT 0x8126
-#define GL_POINT_SIZE_MIN_SGIS 0x8126
-#define GL_POINT_SIZE_MAX_ARB 0x8127
-#define GL_POINT_SIZE_MAX_EXT 0x8127
-#define GL_POINT_SIZE_MAX_SGIS 0x8127
-#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128
-#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128
-#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128
-#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
-#define GL_DISTANCE_ATTENUATION_EXT 0x8129
-#define GL_DISTANCE_ATTENUATION_SGIS 0x8129
-#endif
-
-#ifndef GL_ARB_vertex_blend
-#define GL_MAX_VERTEX_UNITS_ARB 0x86A4
-#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5
-#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6
-#define GL_VERTEX_BLEND_ARB 0x86A7
-#define GL_CURRENT_WEIGHT_ARB 0x86A8
-#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9
-#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA
-#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB
-#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC
-#define GL_WEIGHT_ARRAY_ARB 0x86AD
-#define GL_MODELVIEW0_ARB 0x1700
-#define GL_MODELVIEW1_ARB 0x850A
-#define GL_MODELVIEW2_ARB 0x8722
-#define GL_MODELVIEW3_ARB 0x8723
-#define GL_MODELVIEW4_ARB 0x8724
-#define GL_MODELVIEW5_ARB 0x8725
-#define GL_MODELVIEW6_ARB 0x8726
-#define GL_MODELVIEW7_ARB 0x8727
-#define GL_MODELVIEW8_ARB 0x8728
-#define GL_MODELVIEW9_ARB 0x8729
-#define GL_MODELVIEW10_ARB 0x872A
-#define GL_MODELVIEW11_ARB 0x872B
-#define GL_MODELVIEW12_ARB 0x872C
-#define GL_MODELVIEW13_ARB 0x872D
-#define GL_MODELVIEW14_ARB 0x872E
-#define GL_MODELVIEW15_ARB 0x872F
-#define GL_MODELVIEW16_ARB 0x8730
-#define GL_MODELVIEW17_ARB 0x8731
-#define GL_MODELVIEW18_ARB 0x8732
-#define GL_MODELVIEW19_ARB 0x8733
-#define GL_MODELVIEW20_ARB 0x8734
-#define GL_MODELVIEW21_ARB 0x8735
-#define GL_MODELVIEW22_ARB 0x8736
-#define GL_MODELVIEW23_ARB 0x8737
-#define GL_MODELVIEW24_ARB 0x8738
-#define GL_MODELVIEW25_ARB 0x8739
-#define GL_MODELVIEW26_ARB 0x873A
-#define GL_MODELVIEW27_ARB 0x873B
-#define GL_MODELVIEW28_ARB 0x873C
-#define GL_MODELVIEW29_ARB 0x873D
-#define GL_MODELVIEW30_ARB 0x873E
-#define GL_MODELVIEW31_ARB 0x873F
-#endif
-
-#ifndef GL_ARB_matrix_palette
-#define GL_MATRIX_PALETTE_ARB 0x8840
-#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841
-#define GL_MAX_PALETTE_MATRICES_ARB 0x8842
-#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843
-#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844
-#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845
-#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846
-#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847
-#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848
-#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
-#endif
-
-#ifndef GL_ARB_texture_env_combine
-#define GL_COMBINE_ARB 0x8570
-#define GL_COMBINE_RGB_ARB 0x8571
-#define GL_COMBINE_ALPHA_ARB 0x8572
-#define GL_SOURCE0_RGB_ARB 0x8580
-#define GL_SOURCE1_RGB_ARB 0x8581
-#define GL_SOURCE2_RGB_ARB 0x8582
-#define GL_SOURCE0_ALPHA_ARB 0x8588
-#define GL_SOURCE1_ALPHA_ARB 0x8589
-#define GL_SOURCE2_ALPHA_ARB 0x858A
-#define GL_OPERAND0_RGB_ARB 0x8590
-#define GL_OPERAND1_RGB_ARB 0x8591
-#define GL_OPERAND2_RGB_ARB 0x8592
-#define GL_OPERAND0_ALPHA_ARB 0x8598
-#define GL_OPERAND1_ALPHA_ARB 0x8599
-#define GL_OPERAND2_ALPHA_ARB 0x859A
-#define GL_RGB_SCALE_ARB 0x8573
-#define GL_ADD_SIGNED_ARB 0x8574
-#define GL_INTERPOLATE_ARB 0x8575
-#define GL_SUBTRACT_ARB 0x84E7
-#define GL_CONSTANT_ARB 0x8576
-#define GL_PRIMARY_COLOR_ARB 0x8577
-#define GL_PREVIOUS_ARB 0x8578
-#endif
-
-#ifndef GL_ARB_texture_env_crossbar
-#endif
-
-#ifndef GL_ARB_texture_env_dot3
-#define GL_DOT3_RGB_ARB 0x86AE
-#define GL_DOT3_RGB_EXT 0x86AE
-#define GL_DOT3_RGBA_ARB 0x86AF
-#define GL_DOT3_RGBA_EXT 0x86AF
-#endif
-
-#ifndef GL_ARB_texture_mirrored_repeat
-#define GL_MIRRORED_REPEAT_ARB 0x8370
-#endif
-
-#ifndef GL_ARB_depth_texture
-#define GL_DEPTH_COMPONENT16_ARB 0x81A5
-#define GL_DEPTH_COMPONENT24_ARB 0x81A6
-#define GL_DEPTH_COMPONENT32_ARB 0x81A7
-#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A
-#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B
-#endif
-
-#ifndef GL_ARB_shadow
-#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C
-#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D
-#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E
-#endif
-
-#ifndef GL_ARB_shadow_ambient
-#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF
-#endif
-
-#ifndef GL_ARB_window_pos
-#endif
-
-#ifndef GL_EXT_abgr
-#define GL_ABGR_EXT 0x8000
-#endif
-
-#ifndef GL_EXT_blend_color
-#define GL_CONSTANT_COLOR_EXT 0x8001
-#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002
-#define GL_CONSTANT_ALPHA_EXT 0x8003
-#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004
-#define GL_BLEND_COLOR_EXT 0x8005
-#endif
-
-#ifndef GL_EXT_polygon_offset
-#define GL_POLYGON_OFFSET_EXT 0x8037
-#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038
-#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039
-#endif
-
-#ifndef GL_EXT_texture
-#define GL_ALPHA4_EXT 0x803B
-#define GL_ALPHA8_EXT 0x803C
-#define GL_ALPHA12_EXT 0x803D
-#define GL_ALPHA16_EXT 0x803E
-#define GL_LUMINANCE4_EXT 0x803F
-#define GL_LUMINANCE8_EXT 0x8040
-#define GL_LUMINANCE12_EXT 0x8041
-#define GL_LUMINANCE16_EXT 0x8042
-#define GL_LUMINANCE4_ALPHA4_EXT 0x8043
-#define GL_LUMINANCE6_ALPHA2_EXT 0x8044
-#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
-#define GL_LUMINANCE12_ALPHA4_EXT 0x8046
-#define GL_LUMINANCE12_ALPHA12_EXT 0x8047
-#define GL_LUMINANCE16_ALPHA16_EXT 0x8048
-#define GL_INTENSITY_EXT 0x8049
-#define GL_INTENSITY4_EXT 0x804A
-#define GL_INTENSITY8_EXT 0x804B
-#define GL_INTENSITY12_EXT 0x804C
-#define GL_INTENSITY16_EXT 0x804D
-#define GL_RGB2_EXT 0x804E
-#define GL_RGB4_EXT 0x804F
-#define GL_RGB5_EXT 0x8050
-#define GL_RGB8_EXT 0x8051
-#define GL_RGB10_EXT 0x8052
-#define GL_RGB12_EXT 0x8053
-#define GL_RGB16_EXT 0x8054
-#define GL_RGBA2_EXT 0x8055
-#define GL_RGBA4_EXT 0x8056
-#define GL_RGB5_A1_EXT 0x8057
-#define GL_RGBA8_EXT 0x8058
-#define GL_RGB10_A2_EXT 0x8059
-#define GL_RGBA12_EXT 0x805A
-#define GL_RGBA16_EXT 0x805B
-#define GL_TEXTURE_RED_SIZE_EXT 0x805C
-#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D
-#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E
-#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F
-#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060
-#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061
-#define GL_REPLACE_EXT 0x8062
-#define GL_PROXY_TEXTURE_1D_EXT 0x8063
-#define GL_PROXY_TEXTURE_2D_EXT 0x8064
-#define GL_TEXTURE_TOO_LARGE_EXT 0x8065
-#endif
-
-#ifndef GL_EXT_texture3D
-#define GL_PACK_SKIP_IMAGES 0x806B
-#define GL_PACK_SKIP_IMAGES_EXT 0x806B
-#define GL_PACK_IMAGE_HEIGHT 0x806C
-#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C
-#define GL_UNPACK_SKIP_IMAGES 0x806D
-#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D
-#define GL_UNPACK_IMAGE_HEIGHT 0x806E
-#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E
-#define GL_TEXTURE_3D 0x806F
-#define GL_TEXTURE_3D_EXT 0x806F
-#define GL_PROXY_TEXTURE_3D 0x8070
-#define GL_PROXY_TEXTURE_3D_EXT 0x8070
-#define GL_TEXTURE_DEPTH 0x8071
-#define GL_TEXTURE_DEPTH_EXT 0x8071
-#define GL_TEXTURE_WRAP_R 0x8072
-#define GL_TEXTURE_WRAP_R_EXT 0x8072
-#define GL_MAX_3D_TEXTURE_SIZE 0x8073
-#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073
-#endif
-
-#ifndef GL_SGIS_texture_filter4
-#define GL_FILTER4_SGIS 0x8146
-#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147
-#endif
-
-#ifndef GL_EXT_subtexture
-#endif
-
-#ifndef GL_EXT_copy_texture
-#endif
-
-#ifndef GL_EXT_histogram
-#define GL_HISTOGRAM_EXT 0x8024
-#define GL_PROXY_HISTOGRAM_EXT 0x8025
-#define GL_HISTOGRAM_WIDTH_EXT 0x8026
-#define GL_HISTOGRAM_FORMAT_EXT 0x8027
-#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028
-#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029
-#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A
-#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B
-#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C
-#define GL_HISTOGRAM_SINK_EXT 0x802D
-#define GL_MINMAX_EXT 0x802E
-#define GL_MINMAX_FORMAT_EXT 0x802F
-#define GL_MINMAX_SINK_EXT 0x8030
-#define GL_TABLE_TOO_LARGE_EXT 0x8031
-#endif
-
-#ifndef GL_EXT_convolution
-#define GL_CONVOLUTION_1D_EXT 0x8010
-#define GL_CONVOLUTION_2D_EXT 0x8011
-#define GL_SEPARABLE_2D_EXT 0x8012
-#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013
-#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014
-#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015
-#define GL_REDUCE_EXT 0x8016
-#define GL_CONVOLUTION_FORMAT_EXT 0x8017
-#define GL_CONVOLUTION_WIDTH_EXT 0x8018
-#define GL_CONVOLUTION_HEIGHT_EXT 0x8019
-#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A
-#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B
-#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C
-#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D
-#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E
-#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F
-#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020
-#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021
-#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022
-#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023
-#endif
-
-#ifndef GL_SGI_color_matrix
-#define GL_COLOR_MATRIX_SGI 0x80B1
-#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2
-#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3
-#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4
-#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5
-#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6
-#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7
-#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8
-#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9
-#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA
-#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB
-#endif
-
-#ifndef GL_SGI_color_table
-#define GL_COLOR_TABLE_SGI 0x80D0
-#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1
-#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2
-#define GL_PROXY_COLOR_TABLE_SGI 0x80D3
-#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4
-#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5
-#define GL_COLOR_TABLE_SCALE_SGI 0x80D6
-#define GL_COLOR_TABLE_BIAS_SGI 0x80D7
-#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8
-#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9
-#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA
-#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB
-#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC
-#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD
-#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE
-#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF
-#endif
-
-#ifndef GL_SGIS_pixel_texture
-#define GL_PIXEL_TEXTURE_SGIS 0x8353
-#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354
-#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355
-#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356
-#endif
-
-#ifndef GL_SGIX_pixel_texture
-#define GL_PIXEL_TEX_GEN_SGIX 0x8139
-#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B
-#endif
-
-#ifndef GL_SGIS_texture4D
-#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130
-#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131
-#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132
-#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133
-#define GL_TEXTURE_4D_SGIS 0x8134
-#define GL_PROXY_TEXTURE_4D_SGIS 0x8135
-#define GL_TEXTURE_4DSIZE_SGIS 0x8136
-#define GL_TEXTURE_WRAP_Q_SGIS 0x8137
-#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138
-#define GL_TEXTURE_4D_BINDING_SGIS 0x814F
-#endif
-
-#ifndef GL_SGI_texture_color_table
-#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC
-#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD
-#endif
-
-#ifndef GL_EXT_cmyka
-#define GL_CMYK_EXT 0x800C
-#define GL_CMYKA_EXT 0x800D
-#define GL_PACK_CMYK_HINT_EXT 0x800E
-#define GL_UNPACK_CMYK_HINT_EXT 0x800F
-#endif
-
-#ifndef GL_EXT_texture_object
-#define GL_TEXTURE_PRIORITY_EXT 0x8066
-#define GL_TEXTURE_RESIDENT_EXT 0x8067
-#define GL_TEXTURE_1D_BINDING_EXT 0x8068
-#define GL_TEXTURE_2D_BINDING_EXT 0x8069
-#define GL_TEXTURE_3D_BINDING_EXT 0x806A
-#endif
-
-#ifndef GL_SGIS_detail_texture
-#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095
-#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096
-#define GL_LINEAR_DETAIL_SGIS 0x8097
-#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098
-#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099
-#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A
-#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B
-#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C
-#endif
-
-#ifndef GL_SGIS_sharpen_texture
-#define GL_LINEAR_SHARPEN_SGIS 0x80AD
-#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE
-#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF
-#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0
-#endif
-
-#ifndef GL_EXT_packed_pixels
-#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032
-#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033
-#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034
-#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035
-#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036
-#endif
-
-#ifndef GL_SGIS_texture_lod
-#define GL_TEXTURE_MIN_LOD_SGIS 0x813A
-#define GL_TEXTURE_MAX_LOD_SGIS 0x813B
-#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C
-#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D
-#endif
-
-#ifndef GL_SGIS_multisample
-#define GL_MULTISAMPLE_SGIS 0x809D
-#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E
-#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F
-#define GL_SAMPLE_MASK_SGIS 0x80A0
-#define GL_1PASS_SGIS 0x80A1
-#define GL_2PASS_0_SGIS 0x80A2
-#define GL_2PASS_1_SGIS 0x80A3
-#define GL_4PASS_0_SGIS 0x80A4
-#define GL_4PASS_1_SGIS 0x80A5
-#define GL_4PASS_2_SGIS 0x80A6
-#define GL_4PASS_3_SGIS 0x80A7
-#define GL_SAMPLE_BUFFERS_SGIS 0x80A8
-#define GL_SAMPLES_SGIS 0x80A9
-#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA
-#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB
-#define GL_SAMPLE_PATTERN_SGIS 0x80AC
-#endif
-
-#ifndef GL_EXT_rescale_normal
-#define GL_RESCALE_NORMAL_EXT 0x803A
-#endif
-
-#ifndef GL_EXT_vertex_array
-#define GL_VERTEX_ARRAY_EXT 0x8074
-#define GL_NORMAL_ARRAY_EXT 0x8075
-#define GL_COLOR_ARRAY_EXT 0x8076
-#define GL_INDEX_ARRAY_EXT 0x8077
-#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078
-#define GL_EDGE_FLAG_ARRAY_EXT 0x8079
-#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A
-#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B
-#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C
-#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D
-#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E
-#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F
-#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080
-#define GL_COLOR_ARRAY_SIZE_EXT 0x8081
-#define GL_COLOR_ARRAY_TYPE_EXT 0x8082
-#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083
-#define GL_COLOR_ARRAY_COUNT_EXT 0x8084
-#define GL_INDEX_ARRAY_TYPE_EXT 0x8085
-#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086
-#define GL_INDEX_ARRAY_COUNT_EXT 0x8087
-#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088
-#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089
-#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
-#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B
-#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C
-#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D
-#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E
-#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F
-#define GL_COLOR_ARRAY_POINTER_EXT 0x8090
-#define GL_INDEX_ARRAY_POINTER_EXT 0x8091
-#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
-#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093
-#endif
-
-#ifndef GL_EXT_misc_attribute
-#endif
-
-#ifndef GL_SGIS_generate_mipmap
-#define GL_GENERATE_MIPMAP_SGIS 0x8191
-#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192
-#endif
-
-#ifndef GL_SGIX_clipmap
-#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170
-#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171
-#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172
-#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173
-#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174
-#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175
-#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176
-#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177
-#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178
-#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D
-#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E
-#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F
-#endif
-
-#ifndef GL_SGIX_shadow
-#define GL_TEXTURE_COMPARE_SGIX 0x819A
-#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B
-#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C
-#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D
-#endif
-
-#ifndef GL_SGIS_texture_edge_clamp
-#define GL_CLAMP_TO_EDGE_SGIS 0x812F
-#endif
-
-#ifndef GL_EXT_blend_minmax
-#define GL_FUNC_ADD_EXT 0x8006
-#define GL_MIN_EXT 0x8007
-#define GL_MAX_EXT 0x8008
-#define GL_BLEND_EQUATION_EXT 0x8009
-#endif
-
-#ifndef GL_EXT_blend_subtract
-#define GL_FUNC_SUBTRACT_EXT 0x800A
-#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B
-#endif
-
-#ifndef GL_EXT_blend_logic_op
-#endif
-
-#ifndef GL_SGIX_interlace
-#define GL_INTERLACE_SGIX 0x8094
-#endif
-
-#ifndef GL_SGIX_pixel_tiles
-#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E
-#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F
-#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140
-#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141
-#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142
-#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143
-#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144
-#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145
-#endif
-
-#ifndef GL_SGIS_texture_select
-#define GL_DUAL_ALPHA4_SGIS 0x8110
-#define GL_DUAL_ALPHA8_SGIS 0x8111
-#define GL_DUAL_ALPHA12_SGIS 0x8112
-#define GL_DUAL_ALPHA16_SGIS 0x8113
-#define GL_DUAL_LUMINANCE4_SGIS 0x8114
-#define GL_DUAL_LUMINANCE8_SGIS 0x8115
-#define GL_DUAL_LUMINANCE12_SGIS 0x8116
-#define GL_DUAL_LUMINANCE16_SGIS 0x8117
-#define GL_DUAL_INTENSITY4_SGIS 0x8118
-#define GL_DUAL_INTENSITY8_SGIS 0x8119
-#define GL_DUAL_INTENSITY12_SGIS 0x811A
-#define GL_DUAL_INTENSITY16_SGIS 0x811B
-#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C
-#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D
-#define GL_QUAD_ALPHA4_SGIS 0x811E
-#define GL_QUAD_ALPHA8_SGIS 0x811F
-#define GL_QUAD_LUMINANCE4_SGIS 0x8120
-#define GL_QUAD_LUMINANCE8_SGIS 0x8121
-#define GL_QUAD_INTENSITY4_SGIS 0x8122
-#define GL_QUAD_INTENSITY8_SGIS 0x8123
-#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124
-#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125
-#endif
-
-#ifndef GL_SGIX_sprite
-#define GL_SPRITE_SGIX 0x8148
-#define GL_SPRITE_MODE_SGIX 0x8149
-#define GL_SPRITE_AXIS_SGIX 0x814A
-#define GL_SPRITE_TRANSLATION_SGIX 0x814B
-#define GL_SPRITE_AXIAL_SGIX 0x814C
-#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D
-#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E
-#endif
-
-#ifndef GL_SGIX_texture_multi_buffer
-#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E
-#endif
-
-#ifndef GL_SGIX_instruments
-#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180
-#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181
-#endif
-
-#ifndef GL_SGIX_texture_scale_bias
-#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179
-#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A
-#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B
-#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C
-#endif
-
-#ifndef GL_SGIX_framezoom
-#define GL_FRAMEZOOM_SGIX 0x818B
-#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C
-#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D
-#endif
-
-#ifndef GL_SGIX_tag_sample_buffer
-#endif
-
-#ifndef GL_FfdMaskSGIX
-#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001
-#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002
-#endif
-
-#ifndef GL_SGIX_polynomial_ffd
-#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194
-#define GL_TEXTURE_DEFORMATION_SGIX 0x8195
-#define GL_DEFORMATIONS_MASK_SGIX 0x8196
-#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197
-#endif
-
-#ifndef GL_SGIX_reference_plane
-#define GL_REFERENCE_PLANE_SGIX 0x817D
-#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E
-#endif
-
-#ifndef GL_SGIX_flush_raster
-#endif
-
-#ifndef GL_SGIX_depth_texture
-#define GL_DEPTH_COMPONENT16_SGIX 0x81A5
-#define GL_DEPTH_COMPONENT24_SGIX 0x81A6
-#define GL_DEPTH_COMPONENT32_SGIX 0x81A7
-#endif
-
-#ifndef GL_SGIS_fog_function
-#define GL_FOG_FUNC_SGIS 0x812A
-#define GL_FOG_FUNC_POINTS_SGIS 0x812B
-#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C
-#endif
-
-#ifndef GL_SGIX_fog_offset
-#define GL_FOG_OFFSET_SGIX 0x8198
-#define GL_FOG_OFFSET_VALUE_SGIX 0x8199
-#endif
-
-#ifndef GL_HP_image_transform
-#define GL_IMAGE_SCALE_X_HP 0x8155
-#define GL_IMAGE_SCALE_Y_HP 0x8156
-#define GL_IMAGE_TRANSLATE_X_HP 0x8157
-#define GL_IMAGE_TRANSLATE_Y_HP 0x8158
-#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159
-#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A
-#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B
-#define GL_IMAGE_MAG_FILTER_HP 0x815C
-#define GL_IMAGE_MIN_FILTER_HP 0x815D
-#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E
-#define GL_CUBIC_HP 0x815F
-#define GL_AVERAGE_HP 0x8160
-#define GL_IMAGE_TRANSFORM_2D_HP 0x8161
-#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162
-#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163
-#endif
-
-#ifndef GL_HP_convolution_border_modes
-#define GL_IGNORE_BORDER_HP 0x8150
-#define GL_CONSTANT_BORDER_HP 0x8151
-#define GL_REPLICATE_BORDER_HP 0x8153
-#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154
-#endif
-
-#ifndef GL_INGR_palette_buffer
-#endif
-
-#ifndef GL_SGIX_texture_add_env
-#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE
-#endif
-
-#ifndef GL_EXT_color_subtable
-#endif
-
-#ifndef GL_PGI_vertex_hints
-#define GL_VERTEX_DATA_HINT_PGI 0x1A22A
-#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B
-#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C
-#define GL_MAX_VERTEX_HINT_PGI 0x1A22D
-#define GL_COLOR3_BIT_PGI 0x00010000
-#define GL_COLOR4_BIT_PGI 0x00020000
-#define GL_EDGEFLAG_BIT_PGI 0x00040000
-#define GL_INDEX_BIT_PGI 0x00080000
-#define GL_MAT_AMBIENT_BIT_PGI 0x00100000
-#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000
-#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000
-#define GL_MAT_EMISSION_BIT_PGI 0x00800000
-#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000
-#define GL_MAT_SHININESS_BIT_PGI 0x02000000
-#define GL_MAT_SPECULAR_BIT_PGI 0x04000000
-#define GL_NORMAL_BIT_PGI 0x08000000
-#define GL_TEXCOORD1_BIT_PGI 0x10000000
-#define GL_TEXCOORD2_BIT_PGI 0x20000000
-#define GL_TEXCOORD3_BIT_PGI 0x40000000
-#define GL_TEXCOORD4_BIT_PGI 0x80000000
-#define GL_VERTEX23_BIT_PGI 0x00000004
-#define GL_VERTEX4_BIT_PGI 0x00000008
-#endif
-
-#ifndef GL_PGI_misc_hints
-#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8
-#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD
-#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE
-#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202
-#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203
-#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204
-#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C
-#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D
-#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E
-#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F
-#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210
-#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211
-#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216
-#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217
-#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218
-#define GL_FULL_STIPPLE_HINT_PGI 0x1A219
-#define GL_CLIP_NEAR_HINT_PGI 0x1A220
-#define GL_CLIP_FAR_HINT_PGI 0x1A221
-#define GL_WIDE_LINE_HINT_PGI 0x1A222
-#define GL_BACK_NORMALS_HINT_PGI 0x1A223
-#endif
-
-#ifndef GL_EXT_paletted_texture
-#define GL_COLOR_INDEX1_EXT 0x80E2
-#define GL_COLOR_INDEX2_EXT 0x80E3
-#define GL_COLOR_INDEX4_EXT 0x80E4
-#define GL_COLOR_INDEX8_EXT 0x80E5
-#define GL_COLOR_INDEX12_EXT 0x80E6
-#define GL_COLOR_INDEX16_EXT 0x80E7
-#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
-#endif
-
-#ifndef GL_EXT_clip_volume_hint
-#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0
-#endif
-
-#ifndef GL_SGIX_list_priority
-#define GL_LIST_PRIORITY_SGIX 0x8182
-#endif
-
-#ifndef GL_SGIX_ir_instrument1
-#define GL_IR_INSTRUMENT1_SGIX 0x817F
-#endif
-
-#ifndef GL_SGIX_calligraphic_fragment
-#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183
-#endif
-
-#ifndef GL_SGIX_texture_lod_bias
-#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E
-#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F
-#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190
-#endif
-
-#ifndef GL_SGIX_shadow_ambient
-#define GL_SHADOW_AMBIENT_SGIX 0x80BF
-#endif
-
-#ifndef GL_EXT_index_texture
-#endif
-
-#ifndef GL_EXT_index_material
-#define GL_INDEX_MATERIAL_EXT 0x81B8
-#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9
-#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA
-#endif
-
-#ifndef GL_EXT_index_func
-#define GL_INDEX_TEST_EXT 0x81B5
-#define GL_INDEX_TEST_FUNC_EXT 0x81B6
-#define GL_INDEX_TEST_REF_EXT 0x81B7
-#endif
-
-#ifndef GL_EXT_index_array_formats
-#define GL_IUI_V2F_EXT 0x81AD
-#define GL_IUI_V3F_EXT 0x81AE
-#define GL_IUI_N3F_V2F_EXT 0x81AF
-#define GL_IUI_N3F_V3F_EXT 0x81B0
-#define GL_T2F_IUI_V2F_EXT 0x81B1
-#define GL_T2F_IUI_V3F_EXT 0x81B2
-#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3
-#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4
-#endif
-
-#ifndef GL_EXT_compiled_vertex_array
-#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8
-#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9
-#endif
-
-#ifndef GL_EXT_cull_vertex
-#define GL_CULL_VERTEX_EXT 0x81AA
-#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB
-#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC
-#endif
-
-#ifndef GL_SGIX_ycrcb
-#define GL_YCRCB_422_SGIX 0x81BB
-#define GL_YCRCB_444_SGIX 0x81BC
-#endif
-
-#ifndef GL_SGIX_fragment_lighting
-#define GL_FRAGMENT_LIGHTING_SGIX 0x8400
-#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401
-#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402
-#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403
-#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404
-#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405
-#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406
-#define GL_LIGHT_ENV_MODE_SGIX 0x8407
-#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408
-#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409
-#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A
-#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B
-#define GL_FRAGMENT_LIGHT0_SGIX 0x840C
-#define GL_FRAGMENT_LIGHT1_SGIX 0x840D
-#define GL_FRAGMENT_LIGHT2_SGIX 0x840E
-#define GL_FRAGMENT_LIGHT3_SGIX 0x840F
-#define GL_FRAGMENT_LIGHT4_SGIX 0x8410
-#define GL_FRAGMENT_LIGHT5_SGIX 0x8411
-#define GL_FRAGMENT_LIGHT6_SGIX 0x8412
-#define GL_FRAGMENT_LIGHT7_SGIX 0x8413
-#endif
-
-#ifndef GL_IBM_rasterpos_clip
-#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262
-#endif
-
-#ifndef GL_HP_texture_lighting
-#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167
-#define GL_TEXTURE_POST_SPECULAR_HP 0x8168
-#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169
-#endif
-
-#ifndef GL_EXT_draw_range_elements
-#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8
-#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9
-#endif
-
-#ifndef GL_WIN_phong_shading
-#define GL_PHONG_WIN 0x80EA
-#define GL_PHONG_HINT_WIN 0x80EB
-#endif
-
-#ifndef GL_WIN_specular_fog
-#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC
-#endif
-
-#ifndef GL_EXT_light_texture
-#define GL_FRAGMENT_MATERIAL_EXT 0x8349
-#define GL_FRAGMENT_NORMAL_EXT 0x834A
-#define GL_FRAGMENT_COLOR_EXT 0x834C
-#define GL_ATTENUATION_EXT 0x834D
-#define GL_SHADOW_ATTENUATION_EXT 0x834E
-#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F
-#define GL_TEXTURE_LIGHT_EXT 0x8350
-#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351
-#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352
-/* reuse GL_FRAGMENT_DEPTH_EXT */
-#endif
-
-#ifndef GL_SGIX_blend_alpha_minmax
-#define GL_ALPHA_MIN_SGIX 0x8320
-#define GL_ALPHA_MAX_SGIX 0x8321
-#endif
-
-#ifndef GL_SGIX_impact_pixel_texture
-#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184
-#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185
-#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186
-#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187
-#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188
-#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189
-#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A
-#endif
-
-#ifndef GL_EXT_bgra
-#define GL_BGR_EXT 0x80E0
-#define GL_BGRA_EXT 0x80E1
-#endif
-
-#ifndef GL_SGIX_async
-#define GL_ASYNC_MARKER_SGIX 0x8329
-#endif
-
-#ifndef GL_SGIX_async_pixel
-#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C
-#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D
-#define GL_ASYNC_READ_PIXELS_SGIX 0x835E
-#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F
-#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360
-#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361
-#endif
-
-#ifndef GL_SGIX_async_histogram
-#define GL_ASYNC_HISTOGRAM_SGIX 0x832C
-#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D
-#endif
-
-#ifndef GL_INTEL_texture_scissor
-#endif
-
-#ifndef GL_INTEL_parallel_arrays
-#define GL_PARALLEL_ARRAYS_INTEL 0x83F4
-#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5
-#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6
-#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7
-#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8
-#endif
-
-#ifndef GL_HP_occlusion_test
-#define GL_OCCLUSION_TEST_HP 0x8165
-#define GL_OCCLUSION_TEST_RESULT_HP 0x8166
-#endif
-
-#ifndef GL_EXT_pixel_transform
-#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330
-#define GL_PIXEL_MAG_FILTER_EXT 0x8331
-#define GL_PIXEL_MIN_FILTER_EXT 0x8332
-#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333
-#define GL_CUBIC_EXT 0x8334
-#define GL_AVERAGE_EXT 0x8335
-#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336
-#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337
-#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338
-#endif
-
-#ifndef GL_EXT_pixel_transform_color_table
-#endif
-
-#ifndef GL_EXT_shared_texture_palette
-#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB
-#endif
-
-#ifndef GL_EXT_separate_specular_color
-#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8
-#define GL_SINGLE_COLOR_EXT 0x81F9
-#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA
-#endif
-
-#ifndef GL_EXT_secondary_color
-#define GL_COLOR_SUM_EXT 0x8458
-#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459
-#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
-#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
-#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
-#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
-#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E
-#endif
-
-#ifndef GL_EXT_texture_perturb_normal
-#define GL_PERTURB_EXT 0x85AE
-#define GL_TEXTURE_NORMAL_EXT 0x85AF
-#endif
-
-#ifndef GL_EXT_multi_draw_arrays
-#endif
-
-#ifndef GL_EXT_fog_coord
-#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450
-#define GL_FOG_COORDINATE_EXT 0x8451
-#define GL_FRAGMENT_DEPTH_EXT 0x8452
-#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453
-#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454
-#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455
-#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456
-#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457
-#endif
-
-#ifndef GL_REND_screen_coordinates
-#define GL_SCREEN_COORDINATES_REND 0x8490
-#define GL_INVERTED_SCREEN_W_REND 0x8491
-#endif
-
-#ifndef GL_EXT_coordinate_frame
-#define GL_TANGENT_ARRAY_EXT 0x8439
-#define GL_BINORMAL_ARRAY_EXT 0x843A
-#define GL_CURRENT_TANGENT_EXT 0x843B
-#define GL_CURRENT_BINORMAL_EXT 0x843C
-#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E
-#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F
-#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440
-#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441
-#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442
-#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443
-#define GL_MAP1_TANGENT_EXT 0x8444
-#define GL_MAP2_TANGENT_EXT 0x8445
-#define GL_MAP1_BINORMAL_EXT 0x8446
-#define GL_MAP2_BINORMAL_EXT 0x8447
-#endif
-
-#ifndef GL_EXT_texture_env_combine
-#define GL_COMBINE_EXT 0x8570
-#define GL_COMBINE_RGB_EXT 0x8571
-#define GL_COMBINE_ALPHA_EXT 0x8572
-#define GL_RGB_SCALE_EXT 0x8573
-#define GL_ADD_SIGNED_EXT 0x8574
-#define GL_INTERPOLATE_EXT 0x8575
-#define GL_CONSTANT_EXT 0x8576
-#define GL_PRIMARY_COLOR_EXT 0x8577
-#define GL_PREVIOUS_EXT 0x8578
-#define GL_SOURCE0_RGB_EXT 0x8580
-#define GL_SOURCE1_RGB_EXT 0x8581
-#define GL_SOURCE2_RGB_EXT 0x8582
-#define GL_SOURCE0_ALPHA_EXT 0x8588
-#define GL_SOURCE1_ALPHA_EXT 0x8589
-#define GL_SOURCE2_ALPHA_EXT 0x858A
-#define GL_OPERAND0_RGB_EXT 0x8590
-#define GL_OPERAND1_RGB_EXT 0x8591
-#define GL_OPERAND2_RGB_EXT 0x8592
-#define GL_OPERAND0_ALPHA_EXT 0x8598
-#define GL_OPERAND1_ALPHA_EXT 0x8599
-#define GL_OPERAND2_ALPHA_EXT 0x859A
-#endif
-
-#ifndef GL_APPLE_specular_vector
-#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0
-#endif
-
-#ifndef GL_APPLE_transform_hint
-#define GL_TRANSFORM_HINT_APPLE 0x85B1
-#endif
-
-#ifndef GL_SGIX_fog_scale
-#define GL_FOG_SCALE_SGIX 0x81FC
-#define GL_FOG_SCALE_VALUE_SGIX 0x81FD
-#endif
-
-#ifndef GL_SUNX_constant_data
-#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5
-#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6
-#endif
-
-#ifndef GL_SUN_global_alpha
-#define GL_GLOBAL_ALPHA_SUN 0x81D9
-#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA
-#endif
-
-#ifndef GL_SUN_triangle_list
-#define GL_RESTART_SUN 0x0001
-#define GL_REPLACE_MIDDLE_SUN 0x0002
-#define GL_REPLACE_OLDEST_SUN 0x0003
-#define GL_TRIANGLE_LIST_SUN 0x81D7
-#define GL_REPLACEMENT_CODE_SUN 0x81D8
-#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0
-#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1
-#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2
-#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3
-#define GL_R1UI_V3F_SUN 0x85C4
-#define GL_R1UI_C4UB_V3F_SUN 0x85C5
-#define GL_R1UI_C3F_V3F_SUN 0x85C6
-#define GL_R1UI_N3F_V3F_SUN 0x85C7
-#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8
-#define GL_R1UI_T2F_V3F_SUN 0x85C9
-#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA
-#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB
-#endif
-
-#ifndef GL_SUN_vertex
-#endif
-
-#ifndef GL_EXT_blend_func_separate
-#define GL_BLEND_DST_RGB_EXT 0x80C8
-#define GL_BLEND_SRC_RGB_EXT 0x80C9
-#define GL_BLEND_DST_ALPHA_EXT 0x80CA
-#define GL_BLEND_SRC_ALPHA_EXT 0x80CB
-#endif
-
-#ifndef GL_INGR_color_clamp
-#define GL_RED_MIN_CLAMP_INGR 0x8560
-#define GL_GREEN_MIN_CLAMP_INGR 0x8561
-#define GL_BLUE_MIN_CLAMP_INGR 0x8562
-#define GL_ALPHA_MIN_CLAMP_INGR 0x8563
-#define GL_RED_MAX_CLAMP_INGR 0x8564
-#define GL_GREEN_MAX_CLAMP_INGR 0x8565
-#define GL_BLUE_MAX_CLAMP_INGR 0x8566
-#define GL_ALPHA_MAX_CLAMP_INGR 0x8567
-#endif
-
-#ifndef GL_INGR_interlace_read
-#define GL_INTERLACE_READ_INGR 0x8568
-#endif
-
-#ifndef GL_EXT_stencil_wrap
-#define GL_INCR_WRAP_EXT 0x8507
-#define GL_DECR_WRAP_EXT 0x8508
-#endif
-
-#ifndef GL_EXT_422_pixels
-#define GL_422_EXT 0x80CC
-#define GL_422_REV_EXT 0x80CD
-#define GL_422_AVERAGE_EXT 0x80CE
-#define GL_422_REV_AVERAGE_EXT 0x80CF
-#endif
-
-#ifndef GL_NV_texgen_reflection
-#define GL_NORMAL_MAP_NV 0x8511
-#define GL_REFLECTION_MAP_NV 0x8512
-#endif
-
-#ifndef GL_EXT_texture_cube_map
-#define GL_NORMAL_MAP_EXT 0x8511
-#define GL_REFLECTION_MAP_EXT 0x8512
-#define GL_TEXTURE_CUBE_MAP_EXT 0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
-#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C
-#endif
-
-#ifndef GL_SUN_convolution_border_modes
-#define GL_WRAP_BORDER_SUN 0x81D4
-#endif
-
-#ifndef GL_EXT_texture_env_add
-#endif
-
-#ifndef GL_EXT_texture_lod_bias
-#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
-#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
-#define GL_TEXTURE_LOD_BIAS_EXT 0x8501
-#endif
-
-#ifndef GL_EXT_texture_filter_anisotropic
-#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
-#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
-#endif
-
-#ifndef GL_EXT_vertex_weighting
-#define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH
-#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502
-#define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX
-#define GL_MODELVIEW1_MATRIX_EXT 0x8506
-#define GL_VERTEX_WEIGHTING_EXT 0x8509
-#define GL_MODELVIEW0_EXT GL_MODELVIEW
-#define GL_MODELVIEW1_EXT 0x850A
-#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B
-#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C
-#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D
-#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E
-#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F
-#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510
-#endif
-
-#ifndef GL_NV_light_max_exponent
-#define GL_MAX_SHININESS_NV 0x8504
-#define GL_MAX_SPOT_EXPONENT_NV 0x8505
-#endif
-
-#ifndef GL_NV_vertex_array_range
-#define GL_VERTEX_ARRAY_RANGE_NV 0x851D
-#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E
-#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F
-#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520
-#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521
-#endif
-
-#ifndef GL_NV_register_combiners
-#define GL_REGISTER_COMBINERS_NV 0x8522
-#define GL_VARIABLE_A_NV 0x8523
-#define GL_VARIABLE_B_NV 0x8524
-#define GL_VARIABLE_C_NV 0x8525
-#define GL_VARIABLE_D_NV 0x8526
-#define GL_VARIABLE_E_NV 0x8527
-#define GL_VARIABLE_F_NV 0x8528
-#define GL_VARIABLE_G_NV 0x8529
-#define GL_CONSTANT_COLOR0_NV 0x852A
-#define GL_CONSTANT_COLOR1_NV 0x852B
-#define GL_PRIMARY_COLOR_NV 0x852C
-#define GL_SECONDARY_COLOR_NV 0x852D
-#define GL_SPARE0_NV 0x852E
-#define GL_SPARE1_NV 0x852F
-#define GL_DISCARD_NV 0x8530
-#define GL_E_TIMES_F_NV 0x8531
-#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
-#define GL_UNSIGNED_IDENTITY_NV 0x8536
-#define GL_UNSIGNED_INVERT_NV 0x8537
-#define GL_EXPAND_NORMAL_NV 0x8538
-#define GL_EXPAND_NEGATE_NV 0x8539
-#define GL_HALF_BIAS_NORMAL_NV 0x853A
-#define GL_HALF_BIAS_NEGATE_NV 0x853B
-#define GL_SIGNED_IDENTITY_NV 0x853C
-#define GL_SIGNED_NEGATE_NV 0x853D
-#define GL_SCALE_BY_TWO_NV 0x853E
-#define GL_SCALE_BY_FOUR_NV 0x853F
-#define GL_SCALE_BY_ONE_HALF_NV 0x8540
-#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541
-#define GL_COMBINER_INPUT_NV 0x8542
-#define GL_COMBINER_MAPPING_NV 0x8543
-#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544
-#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545
-#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546
-#define GL_COMBINER_MUX_SUM_NV 0x8547
-#define GL_COMBINER_SCALE_NV 0x8548
-#define GL_COMBINER_BIAS_NV 0x8549
-#define GL_COMBINER_AB_OUTPUT_NV 0x854A
-#define GL_COMBINER_CD_OUTPUT_NV 0x854B
-#define GL_COMBINER_SUM_OUTPUT_NV 0x854C
-#define GL_MAX_GENERAL_COMBINERS_NV 0x854D
-#define GL_NUM_GENERAL_COMBINERS_NV 0x854E
-#define GL_COLOR_SUM_CLAMP_NV 0x854F
-#define GL_COMBINER0_NV 0x8550
-#define GL_COMBINER1_NV 0x8551
-#define GL_COMBINER2_NV 0x8552
-#define GL_COMBINER3_NV 0x8553
-#define GL_COMBINER4_NV 0x8554
-#define GL_COMBINER5_NV 0x8555
-#define GL_COMBINER6_NV 0x8556
-#define GL_COMBINER7_NV 0x8557
-/* reuse GL_TEXTURE0_ARB */
-/* reuse GL_TEXTURE1_ARB */
-/* reuse GL_ZERO */
-/* reuse GL_NONE */
-/* reuse GL_FOG */
-#endif
-
-#ifndef GL_NV_fog_distance
-#define GL_FOG_DISTANCE_MODE_NV 0x855A
-#define GL_EYE_RADIAL_NV 0x855B
-#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C
-/* reuse GL_EYE_PLANE */
-#endif
-
-#ifndef GL_NV_texgen_emboss
-#define GL_EMBOSS_LIGHT_NV 0x855D
-#define GL_EMBOSS_CONSTANT_NV 0x855E
-#define GL_EMBOSS_MAP_NV 0x855F
-#endif
-
-#ifndef GL_NV_blend_square
-#endif
-
-#ifndef GL_NV_texture_env_combine4
-#define GL_COMBINE4_NV 0x8503
-#define GL_SOURCE3_RGB_NV 0x8583
-#define GL_SOURCE3_ALPHA_NV 0x858B
-#define GL_OPERAND3_RGB_NV 0x8593
-#define GL_OPERAND3_ALPHA_NV 0x859B
-#endif
-
-#ifndef GL_MESA_resize_buffers
-#endif
-
-#ifndef GL_MESA_window_pos
-#endif
-
-#ifndef GL_EXT_texture_compression_s3tc
-#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
-#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
-#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
-#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
-#endif
-
-#ifndef GL_IBM_cull_vertex
-#define GL_CULL_VERTEX_IBM 103050
-#endif
-
-#ifndef GL_IBM_multimode_draw_arrays
-#endif
-
-#ifndef GL_IBM_vertex_array_lists
-#define GL_VERTEX_ARRAY_LIST_IBM 103070
-#define GL_NORMAL_ARRAY_LIST_IBM 103071
-#define GL_COLOR_ARRAY_LIST_IBM 103072
-#define GL_INDEX_ARRAY_LIST_IBM 103073
-#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074
-#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075
-#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076
-#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077
-#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080
-#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081
-#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082
-#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083
-#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084
-#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085
-#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086
-#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087
-#endif
-
-#ifndef GL_SGIX_subsample
-#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0
-#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1
-#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2
-#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3
-#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4
-#endif
-
-#ifndef GL_SGIX_ycrcb_subsample
-#endif
-
-#ifndef GL_SGIX_ycrcba
-#define GL_YCRCB_SGIX 0x8318
-#define GL_YCRCBA_SGIX 0x8319
-#endif
-
-#ifndef GL_SGI_depth_pass_instrument
-#define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310
-#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311
-#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312
-#endif
-
-#ifndef GL_3DFX_texture_compression_FXT1
-#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0
-#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1
-#endif
-
-#ifndef GL_3DFX_multisample
-#define GL_MULTISAMPLE_3DFX 0x86B2
-#define GL_SAMPLE_BUFFERS_3DFX 0x86B3
-#define GL_SAMPLES_3DFX 0x86B4
-#define GL_MULTISAMPLE_BIT_3DFX 0x20000000
-#endif
-
-#ifndef GL_3DFX_tbuffer
-#endif
-
-#ifndef GL_EXT_multisample
-#define GL_MULTISAMPLE_EXT 0x809D
-#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E
-#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F
-#define GL_SAMPLE_MASK_EXT 0x80A0
-#define GL_1PASS_EXT 0x80A1
-#define GL_2PASS_0_EXT 0x80A2
-#define GL_2PASS_1_EXT 0x80A3
-#define GL_4PASS_0_EXT 0x80A4
-#define GL_4PASS_1_EXT 0x80A5
-#define GL_4PASS_2_EXT 0x80A6
-#define GL_4PASS_3_EXT 0x80A7
-#define GL_SAMPLE_BUFFERS_EXT 0x80A8
-#define GL_SAMPLES_EXT 0x80A9
-#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA
-#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB
-#define GL_SAMPLE_PATTERN_EXT 0x80AC
-#define GL_MULTISAMPLE_BIT_EXT 0x20000000
-#endif
-
-#ifndef GL_SGIX_vertex_preclip
-#define GL_VERTEX_PRECLIP_SGIX 0x83EE
-#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF
-#endif
-
-#ifndef GL_SGIX_convolution_accuracy
-#define GL_CONVOLUTION_HINT_SGIX 0x8316
-#endif
-
-#ifndef GL_SGIX_resample
-#define GL_PACK_RESAMPLE_SGIX 0x842C
-#define GL_UNPACK_RESAMPLE_SGIX 0x842D
-#define GL_RESAMPLE_REPLICATE_SGIX 0x842E
-#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F
-#define GL_RESAMPLE_DECIMATE_SGIX 0x8430
-#endif
-
-#ifndef GL_SGIS_point_line_texgen
-#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0
-#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1
-#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2
-#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3
-#define GL_EYE_POINT_SGIS 0x81F4
-#define GL_OBJECT_POINT_SGIS 0x81F5
-#define GL_EYE_LINE_SGIS 0x81F6
-#define GL_OBJECT_LINE_SGIS 0x81F7
-#endif
-
-#ifndef GL_SGIS_texture_color_mask
-#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF
-#endif
-
-#ifndef GL_NV_fence
-#define GL_ALL_COMPLETED_NV 0x84F2
-#define GL_FENCE_STATUS_NV 0x84F3
-#define GL_FENCE_CONDITION_NV 0x84F4
-#endif
-
-#ifndef GL_IBM_texture_mirrored_repeat
-#define GL_MIRRORED_REPEAT_IBM 0x8370
-#endif
-
-#ifndef GL_NV_evaluators
-#define GL_EVAL_2D_NV 0x86C0
-#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1
-#define GL_MAP_TESSELLATION_NV 0x86C2
-#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3
-#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4
-#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5
-#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6
-#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7
-#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8
-#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9
-#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA
-#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB
-#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC
-#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD
-#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE
-#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF
-#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0
-#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1
-#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2
-#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3
-#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4
-#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5
-#define GL_MAX_MAP_TESSELLATION_NV 0x86D6
-#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7
-#endif
-
-#ifndef GL_NV_packed_depth_stencil
-#define GL_DEPTH_STENCIL_NV 0x84F9
-#define GL_UNSIGNED_INT_24_8_NV 0x84FA
-#endif
-
-#ifndef GL_NV_register_combiners2
-#define GL_PER_STAGE_CONSTANTS_NV 0x8535
-#endif
-
-#ifndef GL_NV_texture_compression_vtc
-#endif
-
-#ifndef GL_NV_texture_rectangle
-#define GL_TEXTURE_RECTANGLE_NV 0x84F5
-#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6
-#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7
-#define GL_MAX_TEXTURE_RECTANGLE_SIZE_NV 0x84F8
-#endif
-
-#ifndef GL_NV_texture_shader
-#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C
-#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
-#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
-#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
-#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA
-#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB
-#define GL_DSDT_MAG_INTENSITY_NV 0x86DC
-#define GL_SHADER_CONSISTENT_NV 0x86DD
-#define GL_TEXTURE_SHADER_NV 0x86DE
-#define GL_SHADER_OPERATION_NV 0x86DF
-#define GL_CULL_MODES_NV 0x86E0
-#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1
-#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2
-#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3
-#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV
-#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV
-#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV
-#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4
-#define GL_CONST_EYE_NV 0x86E5
-#define GL_PASS_THROUGH_NV 0x86E6
-#define GL_CULL_FRAGMENT_NV 0x86E7
-#define GL_OFFSET_TEXTURE_2D_NV 0x86E8
-#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9
-#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA
-#define GL_DOT_PRODUCT_NV 0x86EC
-#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED
-#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE
-#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
-#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
-#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
-#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
-#define GL_HILO_NV 0x86F4
-#define GL_DSDT_NV 0x86F5
-#define GL_DSDT_MAG_NV 0x86F6
-#define GL_DSDT_MAG_VIB_NV 0x86F7
-#define GL_HILO16_NV 0x86F8
-#define GL_SIGNED_HILO_NV 0x86F9
-#define GL_SIGNED_HILO16_NV 0x86FA
-#define GL_SIGNED_RGBA_NV 0x86FB
-#define GL_SIGNED_RGBA8_NV 0x86FC
-#define GL_SIGNED_RGB_NV 0x86FE
-#define GL_SIGNED_RGB8_NV 0x86FF
-#define GL_SIGNED_LUMINANCE_NV 0x8701
-#define GL_SIGNED_LUMINANCE8_NV 0x8702
-#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703
-#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704
-#define GL_SIGNED_ALPHA_NV 0x8705
-#define GL_SIGNED_ALPHA8_NV 0x8706
-#define GL_SIGNED_INTENSITY_NV 0x8707
-#define GL_SIGNED_INTENSITY8_NV 0x8708
-#define GL_DSDT8_NV 0x8709
-#define GL_DSDT8_MAG8_NV 0x870A
-#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B
-#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C
-#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
-#define GL_HI_SCALE_NV 0x870E
-#define GL_LO_SCALE_NV 0x870F
-#define GL_DS_SCALE_NV 0x8710
-#define GL_DT_SCALE_NV 0x8711
-#define GL_MAGNITUDE_SCALE_NV 0x8712
-#define GL_VIBRANCE_SCALE_NV 0x8713
-#define GL_HI_BIAS_NV 0x8714
-#define GL_LO_BIAS_NV 0x8715
-#define GL_DS_BIAS_NV 0x8716
-#define GL_DT_BIAS_NV 0x8717
-#define GL_MAGNITUDE_BIAS_NV 0x8718
-#define GL_VIBRANCE_BIAS_NV 0x8719
-#define GL_TEXTURE_BORDER_VALUES_NV 0x871A
-#define GL_TEXTURE_HI_SIZE_NV 0x871B
-#define GL_TEXTURE_LO_SIZE_NV 0x871C
-#define GL_TEXTURE_DS_SIZE_NV 0x871D
-#define GL_TEXTURE_DT_SIZE_NV 0x871E
-#define GL_TEXTURE_MAG_SIZE_NV 0x871F
-#endif
-
-#ifndef GL_NV_texture_shader2
-#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF
-#endif
-
-#ifndef GL_NV_vertex_array_range2
-#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533
-#endif
-
-#ifndef GL_NV_vertex_program
-#define GL_VERTEX_PROGRAM_NV 0x8620
-#define GL_VERTEX_STATE_PROGRAM_NV 0x8621
-#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623
-#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624
-#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625
-#define GL_CURRENT_ATTRIB_NV 0x8626
-#define GL_PROGRAM_LENGTH_NV 0x8627
-#define GL_PROGRAM_STRING_NV 0x8628
-#define GL_MODELVIEW_PROJECTION_NV 0x8629
-#define GL_IDENTITY_NV 0x862A
-#define GL_INVERSE_NV 0x862B
-#define GL_TRANSPOSE_NV 0x862C
-#define GL_INVERSE_TRANSPOSE_NV 0x862D
-#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E
-#define GL_MAX_TRACK_MATRICES_NV 0x862F
-#define GL_MATRIX0_NV 0x8630
-#define GL_MATRIX1_NV 0x8631
-#define GL_MATRIX2_NV 0x8632
-#define GL_MATRIX3_NV 0x8633
-#define GL_MATRIX4_NV 0x8634
-#define GL_MATRIX5_NV 0x8635
-#define GL_MATRIX6_NV 0x8636
-#define GL_MATRIX7_NV 0x8637
-#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640
-#define GL_CURRENT_MATRIX_NV 0x8641
-#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642
-#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643
-#define GL_PROGRAM_PARAMETER_NV 0x8644
-#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645
-#define GL_PROGRAM_TARGET_NV 0x8646
-#define GL_PROGRAM_RESIDENT_NV 0x8647
-#define GL_TRACK_MATRIX_NV 0x8648
-#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649
-#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A
-#define GL_PROGRAM_ERROR_POSITION_NV 0x864B
-#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650
-#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651
-#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652
-#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653
-#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654
-#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655
-#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656
-#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657
-#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658
-#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659
-#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A
-#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B
-#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C
-#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D
-#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E
-#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F
-#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660
-#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661
-#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662
-#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663
-#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664
-#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665
-#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666
-#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667
-#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668
-#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669
-#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A
-#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B
-#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C
-#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D
-#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E
-#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F
-#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670
-#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671
-#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672
-#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673
-#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674
-#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675
-#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676
-#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677
-#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678
-#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679
-#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A
-#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B
-#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C
-#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D
-#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E
-#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F
-#endif
-
-#ifndef GL_SGIX_texture_coordinate_clamp
-#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369
-#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A
-#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B
-#endif
-
-#ifndef GL_SGIX_scalebias_hint
-#define GL_SCALEBIAS_HINT_SGIX 0x8322
-#endif
-
-#ifndef GL_OML_interlace
-#define GL_INTERLACE_OML 0x8980
-#define GL_INTERLACE_READ_OML 0x8981
-#endif
-
-#ifndef GL_OML_subsample
-#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982
-#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983
-#endif
-
-#ifndef GL_OML_resample
-#define GL_PACK_RESAMPLE_OML 0x8984
-#define GL_UNPACK_RESAMPLE_OML 0x8985
-#define GL_RESAMPLE_REPLICATE_OML 0x8986
-#define GL_RESAMPLE_ZERO_FILL_OML 0x8987
-#define GL_RESAMPLE_AVERAGE_OML 0x8988
-#define GL_RESAMPLE_DECIMATE_OML 0x8989
-#endif
-
-#ifndef GL_NV_copy_depth_to_color
-#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E
-#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F
-#endif
-
-#ifndef GL_ATI_envmap_bumpmap
-#define GL_BUMP_ROT_MATRIX_ATI 0x8775
-#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776
-#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777
-#define GL_BUMP_TEX_UNITS_ATI 0x8778
-#define GL_DUDV_ATI 0x8779
-#define GL_DU8DV8_ATI 0x877A
-#define GL_BUMP_ENVMAP_ATI 0x877B
-#define GL_BUMP_TARGET_ATI 0x877C
-#endif
-
-#ifndef GL_ATI_fragment_shader
-#define GL_FRAGMENT_SHADER_ATI 0x8920
-#define GL_REG_0_ATI 0x8921
-#define GL_REG_1_ATI 0x8922
-#define GL_REG_2_ATI 0x8923
-#define GL_REG_3_ATI 0x8924
-#define GL_REG_4_ATI 0x8925
-#define GL_REG_5_ATI 0x8926
-#define GL_REG_6_ATI 0x8927
-#define GL_REG_7_ATI 0x8928
-#define GL_REG_8_ATI 0x8929
-#define GL_REG_9_ATI 0x892A
-#define GL_REG_10_ATI 0x892B
-#define GL_REG_11_ATI 0x892C
-#define GL_REG_12_ATI 0x892D
-#define GL_REG_13_ATI 0x892E
-#define GL_REG_14_ATI 0x892F
-#define GL_REG_15_ATI 0x8930
-#define GL_REG_16_ATI 0x8931
-#define GL_REG_17_ATI 0x8932
-#define GL_REG_18_ATI 0x8933
-#define GL_REG_19_ATI 0x8934
-#define GL_REG_20_ATI 0x8935
-#define GL_REG_21_ATI 0x8936
-#define GL_REG_22_ATI 0x8937
-#define GL_REG_23_ATI 0x8938
-#define GL_REG_24_ATI 0x8939
-#define GL_REG_25_ATI 0x893A
-#define GL_REG_26_ATI 0x893B
-#define GL_REG_27_ATI 0x893C
-#define GL_REG_28_ATI 0x893D
-#define GL_REG_29_ATI 0x893E
-#define GL_REG_30_ATI 0x893F
-#define GL_REG_31_ATI 0x8940
-#define GL_CON_0_ATI 0x8941
-#define GL_CON_1_ATI 0x8942
-#define GL_CON_2_ATI 0x8943
-#define GL_CON_3_ATI 0x8944
-#define GL_CON_4_ATI 0x8945
-#define GL_CON_5_ATI 0x8946
-#define GL_CON_6_ATI 0x8947
-#define GL_CON_7_ATI 0x8948
-#define GL_CON_8_ATI 0x8949
-#define GL_CON_9_ATI 0x894A
-#define GL_CON_10_ATI 0x894B
-#define GL_CON_11_ATI 0x894C
-#define GL_CON_12_ATI 0x894D
-#define GL_CON_13_ATI 0x894E
-#define GL_CON_14_ATI 0x894F
-#define GL_CON_15_ATI 0x8950
-#define GL_CON_16_ATI 0x8951
-#define GL_CON_17_ATI 0x8952
-#define GL_CON_18_ATI 0x8953
-#define GL_CON_19_ATI 0x8954
-#define GL_CON_20_ATI 0x8955
-#define GL_CON_21_ATI 0x8956
-#define GL_CON_22_ATI 0x8957
-#define GL_CON_23_ATI 0x8958
-#define GL_CON_24_ATI 0x8959
-#define GL_CON_25_ATI 0x895A
-#define GL_CON_26_ATI 0x895B
-#define GL_CON_27_ATI 0x895C
-#define GL_CON_28_ATI 0x895D
-#define GL_CON_29_ATI 0x895E
-#define GL_CON_30_ATI 0x895F
-#define GL_CON_31_ATI 0x8960
-#define GL_MOV_ATI 0x8961
-#define GL_ADD_ATI 0x8963
-#define GL_MUL_ATI 0x8964
-#define GL_SUB_ATI 0x8965
-#define GL_DOT3_ATI 0x8966
-#define GL_DOT4_ATI 0x8967
-#define GL_MAD_ATI 0x8968
-#define GL_LERP_ATI 0x8969
-#define GL_CND_ATI 0x896A
-#define GL_CND0_ATI 0x896B
-#define GL_DOT2_ADD_ATI 0x896C
-#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D
-#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
-#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F
-#define GL_NUM_PASSES_ATI 0x8970
-#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971
-#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972
-#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
-#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974
-#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975
-#define GL_SWIZZLE_STR_ATI 0x8976
-#define GL_SWIZZLE_STQ_ATI 0x8977
-#define GL_SWIZZLE_STR_DR_ATI 0x8978
-#define GL_SWIZZLE_STQ_DQ_ATI 0x8979
-#define GL_SWIZZLE_STRQ_ATI 0x897A
-#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B
-#define GL_RED_BIT_ATI 0x00000001
-#define GL_GREEN_BIT_ATI 0x00000002
-#define GL_BLUE_BIT_ATI 0x00000004
-#define GL_2X_BIT_ATI 0x00000001
-#define GL_4X_BIT_ATI 0x00000002
-#define GL_8X_BIT_ATI 0x00000004
-#define GL_HALF_BIT_ATI 0x00000008
-#define GL_QUARTER_BIT_ATI 0x00000010
-#define GL_EIGHTH_BIT_ATI 0x00000020
-#define GL_SATURATE_BIT_ATI 0x00000040
-#define GL_COMP_BIT_ATI 0x00000002
-#define GL_NEGATE_BIT_ATI 0x00000004
-#define GL_BIAS_BIT_ATI 0x00000008
-#endif
-
-#ifndef GL_ATI_pn_triangles
-#define GL_PN_TRIANGLES_ATI 0x87F0
-#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1
-#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2
-#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3
-#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4
-#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5
-#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6
-#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7
-#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8
-#endif
-
-#ifndef GL_ATI_vertex_array_object
-#define GL_STATIC_ATI 0x8760
-#define GL_DYNAMIC_ATI 0x8761
-#define GL_PRESERVE_ATI 0x8762
-#define GL_DISCARD_ATI 0x8763
-#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764
-#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765
-#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766
-#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767
-#endif
-
-#ifndef GL_EXT_vertex_shader
-#define GL_VERTEX_SHADER_EXT 0x8780
-#define GL_VERTEX_SHADER_BINDING_EXT 0x8781
-#define GL_OP_INDEX_EXT 0x8782
-#define GL_OP_NEGATE_EXT 0x8783
-#define GL_OP_DOT3_EXT 0x8784
-#define GL_OP_DOT4_EXT 0x8785
-#define GL_OP_MUL_EXT 0x8786
-#define GL_OP_ADD_EXT 0x8787
-#define GL_OP_MADD_EXT 0x8788
-#define GL_OP_FRAC_EXT 0x8789
-#define GL_OP_MAX_EXT 0x878A
-#define GL_OP_MIN_EXT 0x878B
-#define GL_OP_SET_GE_EXT 0x878C
-#define GL_OP_SET_LT_EXT 0x878D
-#define GL_OP_CLAMP_EXT 0x878E
-#define GL_OP_FLOOR_EXT 0x878F
-#define GL_OP_ROUND_EXT 0x8790
-#define GL_OP_EXP_BASE_2_EXT 0x8791
-#define GL_OP_LOG_BASE_2_EXT 0x8792
-#define GL_OP_POWER_EXT 0x8793
-#define GL_OP_RECIP_EXT 0x8794
-#define GL_OP_RECIP_SQRT_EXT 0x8795
-#define GL_OP_SUB_EXT 0x8796
-#define GL_OP_CROSS_PRODUCT_EXT 0x8797
-#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798
-#define GL_OP_MOV_EXT 0x8799
-#define GL_OUTPUT_VERTEX_EXT 0x879A
-#define GL_OUTPUT_COLOR0_EXT 0x879B
-#define GL_OUTPUT_COLOR1_EXT 0x879C
-#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D
-#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E
-#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F
-#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0
-#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1
-#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2
-#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3
-#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4
-#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5
-#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6
-#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7
-#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8
-#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9
-#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA
-#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB
-#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC
-#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD
-#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE
-#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF
-#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0
-#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1
-#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2
-#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3
-#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4
-#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5
-#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6
-#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7
-#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8
-#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9
-#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA
-#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB
-#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC
-#define GL_OUTPUT_FOG_EXT 0x87BD
-#define GL_SCALAR_EXT 0x87BE
-#define GL_VECTOR_EXT 0x87BF
-#define GL_MATRIX_EXT 0x87C0
-#define GL_VARIANT_EXT 0x87C1
-#define GL_INVARIANT_EXT 0x87C2
-#define GL_LOCAL_CONSTANT_EXT 0x87C3
-#define GL_LOCAL_EXT 0x87C4
-#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5
-#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6
-#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7
-#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8
-#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9
-#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA
-#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB
-#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC
-#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INARIANTS_EXT 0x87CD
-#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE
-#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF
-#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0
-#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1
-#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2
-#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3
-#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4
-#define GL_X_EXT 0x87D5
-#define GL_Y_EXT 0x87D6
-#define GL_Z_EXT 0x87D7
-#define GL_W_EXT 0x87D8
-#define GL_NEGATIVE_X_EXT 0x87D9
-#define GL_NEGATIVE_Y_EXT 0x87DA
-#define GL_NEGATIVE_Z_EXT 0x87DB
-#define GL_NEGATIVE_W_EXT 0x87DC
-#define GL_ZERO_EXT 0x87DD
-#define GL_ONE_EXT 0x87DE
-#define GL_NEGATIVE_ONE_EXT 0x87DF
-#define GL_NORMALIZED_RANGE_EXT 0x87E0
-#define GL_FULL_RANGE_EXT 0x87E1
-#define GL_CURRENT_VERTEX_EXT 0x87E2
-#define GL_MVP_MATRIX_EXT 0x87E3
-#define GL_VARIANT_VALUE_EXT 0x87E4
-#define GL_VARIANT_DATATYPE_EXT 0x87E5
-#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6
-#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7
-#define GL_VARIANT_ARRAY_EXT 0x87E8
-#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9
-#define GL_INVARIANT_VALUE_EXT 0x87EA
-#define GL_INVARIANT_DATATYPE_EXT 0x87EB
-#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC
-#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED
-#endif
-
-#ifndef GL_ATI_vertex_streams
-#define GL_MAX_VERTEX_STREAMS_ATI 0x876B
-#define GL_VERTEX_STREAM0_ATI 0x876C
-#define GL_VERTEX_STREAM1_ATI 0x876D
-#define GL_VERTEX_STREAM2_ATI 0x876E
-#define GL_VERTEX_STREAM3_ATI 0x876F
-#define GL_VERTEX_STREAM4_ATI 0x8770
-#define GL_VERTEX_STREAM5_ATI 0x8771
-#define GL_VERTEX_STREAM6_ATI 0x8772
-#define GL_VERTEX_STREAM7_ATI 0x8773
-#define GL_VERTEX_SOURCE_ATI 0x8774
-#endif
-
-#ifndef GL_ATI_element_array
-#define GL_ELEMENT_ARRAY_ATI 0x8768
-#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769
-#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A
-#endif
-
-#ifndef GL_SUN_mesh_array
-#define GL_QUAD_MESH_SUN 0x8614
-#define GL_TRIANGLE_MESH_SUN 0x8615
-#endif
-
-#ifndef GL_SUN_slice_accum
-#define GL_SLICE_ACCUM_SUN 0x85CC
-#endif
-
-#ifndef GL_NV_multisample_filter_hint
-#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534
-#endif
-
-#ifndef GL_NV_depth_clamp
-#define GL_DEPTH_CLAMP_NV 0x864F
-#endif
-
-#ifndef GL_NV_occlusion_query
-#define GL_PIXEL_COUNTER_BITS_NV 0x8864
-#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865
-#define GL_PIXEL_COUNT_NV 0x8866
-#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867
-#endif
-
-#ifndef GL_NV_point_sprite
-#define GL_POINT_SPRITE_NV 0x8861
-#define GL_COORD_REPLACE_NV 0x8862
-#define GL_POINT_SPRITE_R_MODE_NV 0x8863
-#endif
-
-#ifndef GL_NV_texture_shader3
-#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
-#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
-#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
-#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
-#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854
-#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
-#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
-#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
-#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858
-#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859
-#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
-#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B
-#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C
-#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
-#define GL_HILO8_NV 0x885E
-#define GL_SIGNED_HILO8_NV 0x885F
-#define GL_FORCE_BLUE_TO_ONE_NV 0x8860
-#endif
-
-#ifndef GL_NV_vertex_program1_1
-#endif
-
-
-/*************************************************************/
-
-#ifndef GL_VERSION_1_2
-#define GL_VERSION_1_2 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBlendColor (GLclampf, GLclampf, GLclampf, GLclampf);
-GLAPI void APIENTRY glBlendEquation (GLenum);
-GLAPI void APIENTRY glDrawRangeElements (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
-GLAPI void APIENTRY glColorTable (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glColorTableParameterfv (GLenum, GLenum, const GLfloat *);
-GLAPI void APIENTRY glColorTableParameteriv (GLenum, GLenum, const GLint *);
-GLAPI void APIENTRY glCopyColorTable (GLenum, GLenum, GLint, GLint, GLsizei);
-GLAPI void APIENTRY glGetColorTable (GLenum, GLenum, GLenum, GLvoid *);
-GLAPI void APIENTRY glGetColorTableParameterfv (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetColorTableParameteriv (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glColorSubTable (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glCopyColorSubTable (GLenum, GLsizei, GLint, GLint, GLsizei);
-GLAPI void APIENTRY glConvolutionFilter1D (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glConvolutionFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glConvolutionParameterf (GLenum, GLenum, GLfloat);
-GLAPI void APIENTRY glConvolutionParameterfv (GLenum, GLenum, const GLfloat *);
-GLAPI void APIENTRY glConvolutionParameteri (GLenum, GLenum, GLint);
-GLAPI void APIENTRY glConvolutionParameteriv (GLenum, GLenum, const GLint *);
-GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum, GLenum, GLint, GLint, GLsizei);
-GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
-GLAPI void APIENTRY glGetConvolutionFilter (GLenum, GLenum, GLenum, GLvoid *);
-GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glGetSeparableFilter (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
-GLAPI void APIENTRY glSeparableFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
-GLAPI void APIENTRY glGetHistogram (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
-GLAPI void APIENTRY glGetHistogramParameterfv (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetHistogramParameteriv (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glGetMinmax (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
-GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glHistogram (GLenum, GLsizei, GLenum, GLboolean);
-GLAPI void APIENTRY glMinmax (GLenum, GLenum, GLboolean);
-GLAPI void APIENTRY glResetHistogram (GLenum);
-GLAPI void APIENTRY glResetMinmax (GLenum);
-GLAPI void APIENTRY glTexImage3D (GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glCopyTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-typedef void (APIENTRY * PFNGLBLENDEQUATIONPROC) (GLenum mode);
-typedef void (APIENTRY * PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
-typedef void (APIENTRY * PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
-typedef void (APIENTRY * PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-typedef void (APIENTRY * PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
-typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
-typedef void (APIENTRY * PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
-typedef void (APIENTRY * PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
-typedef void (APIENTRY * PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
-typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);
-typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);
-typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-typedef void (APIENTRY * PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (APIENTRY * PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
-typedef void (APIENTRY * PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
-typedef void (APIENTRY * PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
-typedef void (APIENTRY * PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
-typedef void (APIENTRY * PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
-typedef void (APIENTRY * PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
-typedef void (APIENTRY * PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);
-typedef void (APIENTRY * PFNGLRESETHISTOGRAMPROC) (GLenum target);
-typedef void (APIENTRY * PFNGLRESETMINMAXPROC) (GLenum target);
-typedef void (APIENTRY * PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
-typedef void (APIENTRY * PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
-typedef void (APIENTRY * PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-#endif
-
-#ifndef GL_VERSION_1_3
-#define GL_VERSION_1_3 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glActiveTexture (GLenum);
-GLAPI void APIENTRY glClientActiveTexture (GLenum);
-GLAPI void APIENTRY glMultiTexCoord1d (GLenum, GLdouble);
-GLAPI void APIENTRY glMultiTexCoord1dv (GLenum, const GLdouble *);
-GLAPI void APIENTRY glMultiTexCoord1f (GLenum, GLfloat);
-GLAPI void APIENTRY glMultiTexCoord1fv (GLenum, const GLfloat *);
-GLAPI void APIENTRY glMultiTexCoord1i (GLenum, GLint);
-GLAPI void APIENTRY glMultiTexCoord1iv (GLenum, const GLint *);
-GLAPI void APIENTRY glMultiTexCoord1s (GLenum, GLshort);
-GLAPI void APIENTRY glMultiTexCoord1sv (GLenum, const GLshort *);
-GLAPI void APIENTRY glMultiTexCoord2d (GLenum, GLdouble, GLdouble);
-GLAPI void APIENTRY glMultiTexCoord2dv (GLenum, const GLdouble *);
-GLAPI void APIENTRY glMultiTexCoord2f (GLenum, GLfloat, GLfloat);
-GLAPI void APIENTRY glMultiTexCoord2fv (GLenum, const GLfloat *);
-GLAPI void APIENTRY glMultiTexCoord2i (GLenum, GLint, GLint);
-GLAPI void APIENTRY glMultiTexCoord2iv (GLenum, const GLint *);
-GLAPI void APIENTRY glMultiTexCoord2s (GLenum, GLshort, GLshort);
-GLAPI void APIENTRY glMultiTexCoord2sv (GLenum, const GLshort *);
-GLAPI void APIENTRY glMultiTexCoord3d (GLenum, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glMultiTexCoord3dv (GLenum, const GLdouble *);
-GLAPI void APIENTRY glMultiTexCoord3f (GLenum, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glMultiTexCoord3fv (GLenum, const GLfloat *);
-GLAPI void APIENTRY glMultiTexCoord3i (GLenum, GLint, GLint, GLint);
-GLAPI void APIENTRY glMultiTexCoord3iv (GLenum, const GLint *);
-GLAPI void APIENTRY glMultiTexCoord3s (GLenum, GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glMultiTexCoord3sv (GLenum, const GLshort *);
-GLAPI void APIENTRY glMultiTexCoord4d (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glMultiTexCoord4dv (GLenum, const GLdouble *);
-GLAPI void APIENTRY glMultiTexCoord4f (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glMultiTexCoord4fv (GLenum, const GLfloat *);
-GLAPI void APIENTRY glMultiTexCoord4i (GLenum, GLint, GLint, GLint, GLint);
-GLAPI void APIENTRY glMultiTexCoord4iv (GLenum, const GLint *);
-GLAPI void APIENTRY glMultiTexCoord4s (GLenum, GLshort, GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glMultiTexCoord4sv (GLenum, const GLshort *);
-GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *);
-GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *);
-GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *);
-GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *);
-GLAPI void APIENTRY glSampleCoverage (GLclampf, GLboolean);
-GLAPI void APIENTRY glCompressedTexImage3D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glCompressedTexImage2D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glCompressedTexImage1D (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glGetCompressedTexImage (GLenum, GLint, void *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLACTIVETEXTUREPROC) (GLenum texture);
-typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);
-typedef void (APIENTRY * PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);
-typedef void (APIENTRY * PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);
-typedef void (APIENTRY * PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);
-typedef void (APIENTRY * PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);
-typedef void (APIENTRY * PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRY * PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);
-#endif
-
-#ifndef GL_ARB_multitexture
-#define GL_ARB_multitexture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glActiveTextureARB (GLenum);
-GLAPI void APIENTRY glClientActiveTextureARB (GLenum);
-GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum, GLdouble);
-GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum, const GLdouble *);
-GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum, GLfloat);
-GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum, const GLfloat *);
-GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum, GLint);
-GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum, const GLint *);
-GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum, GLshort);
-GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum, const GLshort *);
-GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum, GLdouble, GLdouble);
-GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum, const GLdouble *);
-GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum, GLfloat, GLfloat);
-GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum, const GLfloat *);
-GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum, GLint, GLint);
-GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum, const GLint *);
-GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum, GLshort, GLshort);
-GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum, const GLshort *);
-GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum, const GLdouble *);
-GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum, const GLfloat *);
-GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum, GLint, GLint, GLint);
-GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum, const GLint *);
-GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum, GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum, const GLshort *);
-GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum, const GLdouble *);
-GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum, const GLfloat *);
-GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum, GLint, GLint, GLint, GLint);
-GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum, const GLint *);
-GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum, GLshort, GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum, const GLshort *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
-typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
-typedef void (APIENTRY * PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
-#endif
-
-#ifndef GL_ARB_transpose_matrix
-#define GL_ARB_transpose_matrix 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *);
-GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *);
-GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *);
-GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
-typedef void (APIENTRY * PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
-typedef void (APIENTRY * PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);
-typedef void (APIENTRY * PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);
-#endif
-
-#ifndef GL_ARB_multisample
-#define GL_ARB_multisample 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glSampleCoverageARB (GLclampf, GLboolean);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert);
-#endif
-
-#ifndef GL_ARB_texture_env_add
-#define GL_ARB_texture_env_add 1
-#endif
-
-#ifndef GL_ARB_texture_cube_map
-#define GL_ARB_texture_cube_map 1
-#endif
-
-#ifndef GL_ARB_texture_compression
-#define GL_ARB_texture_compression 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum, GLint, void *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
-typedef void (APIENTRY * PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, void *img);
-#endif
-
-#ifndef GL_ARB_texture_border_clamp
-#define GL_ARB_texture_border_clamp 1
-#endif
-
-#ifndef GL_ARB_point_parameters
-#define GL_ARB_point_parameters 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPointParameterfARB (GLenum, GLfloat);
-GLAPI void APIENTRY glPointParameterfvARB (GLenum, const GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);
-#endif
-
-#ifndef GL_ARB_vertex_blend
-#define GL_ARB_vertex_blend 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glWeightbvARB (GLint, const GLbyte *);
-GLAPI void APIENTRY glWeightsvARB (GLint, const GLshort *);
-GLAPI void APIENTRY glWeightivARB (GLint, const GLint *);
-GLAPI void APIENTRY glWeightfvARB (GLint, const GLfloat *);
-GLAPI void APIENTRY glWeightdvARB (GLint, const GLdouble *);
-GLAPI void APIENTRY glWeightubvARB (GLint, const GLubyte *);
-GLAPI void APIENTRY glWeightusvARB (GLint, const GLushort *);
-GLAPI void APIENTRY glWeightuivARB (GLint, const GLuint *);
-GLAPI void APIENTRY glWeightPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glVertexBlendARB (GLint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights);
-typedef void (APIENTRY * PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights);
-typedef void (APIENTRY * PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights);
-typedef void (APIENTRY * PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);
-typedef void (APIENTRY * PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights);
-typedef void (APIENTRY * PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights);
-typedef void (APIENTRY * PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights);
-typedef void (APIENTRY * PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights);
-typedef void (APIENTRY * PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-typedef void (APIENTRY * PFNGLVERTEXBLENDARBPROC) (GLint count);
-#endif
-
-#ifndef GL_ARB_matrix_palette
-#define GL_ARB_matrix_palette 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint);
-GLAPI void APIENTRY glMatrixIndexubvARB (GLint, const GLubyte *);
-GLAPI void APIENTRY glMatrixIndexusvARB (GLint, const GLushort *);
-GLAPI void APIENTRY glMatrixIndexuivARB (GLint, const GLuint *);
-GLAPI void APIENTRY glMatrixIndexPointerARB (GLint, GLenum, GLsizei, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);
-typedef void (APIENTRY * PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices);
-typedef void (APIENTRY * PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices);
-typedef void (APIENTRY * PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices);
-typedef void (APIENTRY * PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-#endif
-
-#ifndef GL_ARB_texture_env_combine
-#define GL_ARB_texture_env_combine 1
-#endif
-
-#ifndef GL_ARB_texture_env_crossbar
-#define GL_ARB_texture_env_crossbar 1
-#endif
-
-#ifndef GL_ARB_texture_env_dot3
-#define GL_ARB_texture_env_dot3 1
-#endif
-
-#ifndef GL_ARB_texture_mirror_repeat
-#define GL_ARB_texture_mirror_repeat 1
-#endif
-
-#ifndef GL_ARB_depth_texture
-#define GL_ARB_depth_texture 1
-#endif
-
-#ifndef GL_ARB_shadow
-#define GL_ARB_shadow 1
-#endif
-
-#ifndef GL_ARB_shadow_ambient
-#define GL_ARB_shadow_ambient 1
-#endif
-
-#ifndef GL_ARB_window_pos
-#define GL_ARB_window_pos 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glWindowPos2dARB (GLdouble, GLdouble);
-GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *);
-GLAPI void APIENTRY glWindowPos2fARB (GLfloat, GLfloat);
-GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *);
-GLAPI void APIENTRY glWindowPos2iARB (GLint, GLint);
-GLAPI void APIENTRY glWindowPos2ivARB (const GLint *);
-GLAPI void APIENTRY glWindowPos2sARB (GLshort, GLshort);
-GLAPI void APIENTRY glWindowPos2svARB (const GLshort *);
-GLAPI void APIENTRY glWindowPos3dARB (GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *);
-GLAPI void APIENTRY glWindowPos3fARB (GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *);
-GLAPI void APIENTRY glWindowPos3iARB (GLint, GLint, GLint);
-GLAPI void APIENTRY glWindowPos3ivARB (const GLint *);
-GLAPI void APIENTRY glWindowPos3sARB (GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glWindowPos3svARB (const GLshort *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);
-typedef void (APIENTRY * PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);
-typedef void (APIENTRY * PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);
-typedef void (APIENTRY * PFNGLWINDOWPOS2IVARBPROC) (const GLint *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);
-typedef void (APIENTRY * PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);
-typedef void (APIENTRY * PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);
-typedef void (APIENTRY * PFNGLWINDOWPOS3IVARBPROC) (const GLint *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);
-typedef void (APIENTRY * PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v);
-#endif
-
-#ifndef GL_EXT_abgr
-#define GL_EXT_abgr 1
-#endif
-
-#ifndef GL_EXT_blend_color
-#define GL_EXT_blend_color 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBlendColorEXT (GLclampf, GLclampf, GLclampf, GLclampf);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
-#endif
-
-#ifndef GL_EXT_polygon_offset
-#define GL_EXT_polygon_offset 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat, GLfloat);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);
-#endif
-
-#ifndef GL_EXT_texture
-#define GL_EXT_texture 1
-#endif
-
-#ifndef GL_EXT_texture3D
-#define GL_EXT_texture3D 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTexImage3DEXT (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
-typedef void (APIENTRY * PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
-#endif
-
-#ifndef GL_SGIS_texture_filter4
-#define GL_SGIS_texture_filter4 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum, GLenum, GLsizei, const GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights);
-typedef void (APIENTRY * PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);
-#endif
-
-#ifndef GL_EXT_subtexture
-#define GL_EXT_subtexture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTexSubImage1DEXT (GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
-typedef void (APIENTRY * PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
-#endif
-
-#ifndef GL_EXT_copy_texture
-#define GL_EXT_copy_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint);
-GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
-GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei);
-GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
-GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
-typedef void (APIENTRY * PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
-typedef void (APIENTRY * PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
-typedef void (APIENTRY * PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (APIENTRY * PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-#endif
-
-#ifndef GL_EXT_histogram
-#define GL_EXT_histogram 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glGetHistogramEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
-GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glGetMinmaxEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *);
-GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glHistogramEXT (GLenum, GLsizei, GLenum, GLboolean);
-GLAPI void APIENTRY glMinmaxEXT (GLenum, GLenum, GLboolean);
-GLAPI void APIENTRY glResetHistogramEXT (GLenum);
-GLAPI void APIENTRY glResetMinmaxEXT (GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
-typedef void (APIENTRY * PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
-typedef void (APIENTRY * PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
-typedef void (APIENTRY * PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);
-typedef void (APIENTRY * PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);
-typedef void (APIENTRY * PFNGLRESETMINMAXEXTPROC) (GLenum target);
-#endif
-
-#ifndef GL_EXT_convolution
-#define GL_EXT_convolution 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum, GLenum, GLfloat);
-GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum, GLenum, const GLfloat *);
-GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum, GLenum, GLint);
-GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum, GLenum, const GLint *);
-GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum, GLenum, GLint, GLint, GLsizei);
-GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
-GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum, GLenum, GLenum, GLvoid *);
-GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
-GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image);
-typedef void (APIENTRY * PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image);
-typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params);
-typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params);
-typedef void (APIENTRY * PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-typedef void (APIENTRY * PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (APIENTRY * PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image);
-typedef void (APIENTRY * PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span);
-typedef void (APIENTRY * PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
-#endif
-
-#ifndef GL_EXT_color_matrix
-#define GL_EXT_color_matrix 1
-#endif
-
-#ifndef GL_SGI_color_table
-#define GL_SGI_color_table 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glColorTableSGI (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum, GLenum, const GLfloat *);
-GLAPI void APIENTRY glColorTableParameterivSGI (GLenum, GLenum, const GLint *);
-GLAPI void APIENTRY glCopyColorTableSGI (GLenum, GLenum, GLint, GLint, GLsizei);
-GLAPI void APIENTRY glGetColorTableSGI (GLenum, GLenum, GLenum, GLvoid *);
-GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum, GLenum, GLint *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
-typedef void (APIENTRY * PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
-typedef void (APIENTRY * PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
-typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params);
-#endif
-
-#ifndef GL_SGIX_pixel_texture
-#define GL_SGIX_pixel_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPixelTexGenSGIX (GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);
-#endif
-
-#ifndef GL_SGIS_pixel_texture
-#define GL_SGIS_pixel_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum, GLint);
-GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum, const GLint *);
-GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum, GLfloat);
-GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum, const GLfloat *);
-GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum, GLint *);
-GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum, GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params);
-#endif
-
-#ifndef GL_SGIS_texture4D
-#define GL_SGIS_texture4D 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTexImage4DSGIS (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
-typedef void (APIENTRY * PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels);
-#endif
-
-#ifndef GL_SGI_texture_color_table
-#define GL_SGI_texture_color_table 1
-#endif
-
-#ifndef GL_EXT_cmyka
-#define GL_EXT_cmyka 1
-#endif
-
-#ifndef GL_EXT_texture_object
-#define GL_EXT_texture_object 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei, const GLuint *, GLboolean *);
-GLAPI void APIENTRY glBindTextureEXT (GLenum, GLuint);
-GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei, const GLuint *);
-GLAPI void APIENTRY glGenTexturesEXT (GLsizei, GLuint *);
-GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint);
-GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei, const GLuint *, const GLclampf *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef GLboolean (APIENTRY * PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences);
-typedef void (APIENTRY * PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);
-typedef void (APIENTRY * PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures);
-typedef void (APIENTRY * PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures);
-typedef GLboolean (APIENTRY * PFNGLISTEXTUREEXTPROC) (GLuint texture);
-typedef void (APIENTRY * PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities);
-#endif
-
-#ifndef GL_SGIS_detail_texture
-#define GL_SGIS_detail_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
-GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum, GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
-typedef void (APIENTRY * PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
-#endif
-
-#ifndef GL_SGIS_sharpen_texture
-#define GL_SGIS_sharpen_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum, GLsizei, const GLfloat *);
-GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum, GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);
-typedef void (APIENTRY * PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points);
-#endif
-
-#ifndef GL_EXT_packed_pixels
-#define GL_EXT_packed_pixels 1
-#endif
-
-#ifndef GL_SGIS_texture_lod
-#define GL_SGIS_texture_lod 1
-#endif
-
-#ifndef GL_SGIS_multisample
-#define GL_SGIS_multisample 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glSampleMaskSGIS (GLclampf, GLboolean);
-GLAPI void APIENTRY glSamplePatternSGIS (GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);
-typedef void (APIENTRY * PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);
-#endif
-
-#ifndef GL_EXT_rescale_normal
-#define GL_EXT_rescale_normal 1
-#endif
-
-#ifndef GL_EXT_vertex_array
-#define GL_EXT_vertex_array 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glArrayElementEXT (GLint);
-GLAPI void APIENTRY glColorPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glDrawArraysEXT (GLenum, GLint, GLsizei);
-GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei, GLsizei, const GLboolean *);
-GLAPI void APIENTRY glGetPointervEXT (GLenum, GLvoid* *);
-GLAPI void APIENTRY glIndexPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glNormalPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glTexCoordPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glVertexPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLARRAYELEMENTEXTPROC) (GLint i);
-typedef void (APIENTRY * PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
-typedef void (APIENTRY * PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
-typedef void (APIENTRY * PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);
-typedef void (APIENTRY * PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params);
-typedef void (APIENTRY * PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
-typedef void (APIENTRY * PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
-typedef void (APIENTRY * PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
-typedef void (APIENTRY * PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
-#endif
-
-#ifndef GL_EXT_misc_attribute
-#define GL_EXT_misc_attribute 1
-#endif
-
-#ifndef GL_SGIS_generate_mipmap
-#define GL_SGIS_generate_mipmap 1
-#endif
-
-#ifndef GL_SGIX_clipmap
-#define GL_SGIX_clipmap 1
-#endif
-
-#ifndef GL_SGIX_shadow
-#define GL_SGIX_shadow 1
-#endif
-
-#ifndef GL_SGIS_texture_edge_clamp
-#define GL_SGIS_texture_edge_clamp 1
-#endif
-
-#ifndef GL_SGIS_texture_border_clamp
-#define GL_SGIS_texture_border_clamp 1
-#endif
-
-#ifndef GL_EXT_blend_minmax
-#define GL_EXT_blend_minmax 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBlendEquationEXT (GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);
-#endif
-
-#ifndef GL_EXT_blend_subtract
-#define GL_EXT_blend_subtract 1
-#endif
-
-#ifndef GL_EXT_blend_logic_op
-#define GL_EXT_blend_logic_op 1
-#endif
-
-#ifndef GL_SGIX_interlace
-#define GL_SGIX_interlace 1
-#endif
-
-#ifndef GL_SGIX_pixel_tiles
-#define GL_SGIX_pixel_tiles 1
-#endif
-
-#ifndef GL_SGIX_texture_select
-#define GL_SGIX_texture_select 1
-#endif
-
-#ifndef GL_SGIX_sprite
-#define GL_SGIX_sprite 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum, GLfloat);
-GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum, const GLfloat *);
-GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum, GLint);
-GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum, const GLint *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params);
-#endif
-
-#ifndef GL_SGIX_texture_multi_buffer
-#define GL_SGIX_texture_multi_buffer 1
-#endif
-
-#ifndef GL_EXT_point_parameters
-#define GL_EXT_point_parameters 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPointParameterfEXT (GLenum, GLfloat);
-GLAPI void APIENTRY glPointParameterfvEXT (GLenum, const GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
-#endif
-
-#ifndef GL_SGIS_point_parameters
-#define GL_SGIS_point_parameters 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPointParameterfSGIS (GLenum, GLfloat);
-GLAPI void APIENTRY glPointParameterfvSGIS (GLenum, const GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
-#endif
-
-#ifndef GL_SGIX_instruments
-#define GL_SGIX_instruments 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLint APIENTRY glGetInstrumentsSGIX (void);
-GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei, GLint *);
-GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *);
-GLAPI void APIENTRY glReadInstrumentsSGIX (GLint);
-GLAPI void APIENTRY glStartInstrumentsSGIX (void);
-GLAPI void APIENTRY glStopInstrumentsSGIX (GLint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef GLint (APIENTRY * PFNGLGETINSTRUMENTSSGIXPROC) (void);
-typedef void (APIENTRY * PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer);
-typedef GLint (APIENTRY * PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p);
-typedef void (APIENTRY * PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker);
-typedef void (APIENTRY * PFNGLSTARTINSTRUMENTSSGIXPROC) (void);
-typedef void (APIENTRY * PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker);
-#endif
-
-#ifndef GL_SGIX_texture_scale_bias
-#define GL_SGIX_texture_scale_bias 1
-#endif
-
-#ifndef GL_SGIX_framezoom
-#define GL_SGIX_framezoom 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glFrameZoomSGIX (GLint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLFRAMEZOOMSGIXPROC) (GLint factor);
-#endif
-
-#ifndef GL_SGIX_tag_sample_buffer
-#define GL_SGIX_tag_sample_buffer 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTagSampleBufferSGIX (void);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
-#endif
-
-#ifndef GL_SGIX_polynomial_ffd
-#define GL_SGIX_polynomial_ffd 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *);
-GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *);
-GLAPI void APIENTRY glDeformSGIX (GLbitfield);
-GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);
-typedef void (APIENTRY * PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);
-typedef void (APIENTRY * PFNGLDEFORMSGIXPROC) (GLbitfield mask);
-typedef void (APIENTRY * PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);
-#endif
-
-#ifndef GL_SGIX_reference_plane
-#define GL_SGIX_reference_plane 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation);
-#endif
-
-#ifndef GL_SGIX_flush_raster
-#define GL_SGIX_flush_raster 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glFlushRasterSGIX (void);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLFLUSHRASTERSGIXPROC) (void);
-#endif
-
-#ifndef GL_SGIX_depth_texture
-#define GL_SGIX_depth_texture 1
-#endif
-
-#ifndef GL_SGIS_fog_function
-#define GL_SGIS_fog_function 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glFogFuncSGIS (GLsizei, const GLfloat *);
-GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points);
-typedef void (APIENTRY * PFNGLGETFOGFUNCSGISPROC) (GLfloat *points);
-#endif
-
-#ifndef GL_SGIX_fog_offset
-#define GL_SGIX_fog_offset 1
-#endif
-
-#ifndef GL_HP_image_transform
-#define GL_HP_image_transform 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glImageTransformParameteriHP (GLenum, GLenum, GLint);
-GLAPI void APIENTRY glImageTransformParameterfHP (GLenum, GLenum, GLfloat);
-GLAPI void APIENTRY glImageTransformParameterivHP (GLenum, GLenum, const GLint *);
-GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum, GLenum, const GLfloat *);
-GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum, GLenum, GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params);
-#endif
-
-#ifndef GL_HP_convolution_border_modes
-#define GL_HP_convolution_border_modes 1
-#endif
-
-#ifndef GL_SGIX_texture_add_env
-#define GL_SGIX_texture_add_env 1
-#endif
-
-#ifndef GL_EXT_color_subtable
-#define GL_EXT_color_subtable 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glColorSubTableEXT (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum, GLsizei, GLint, GLint, GLsizei);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
-typedef void (APIENTRY * PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
-#endif
-
-#ifndef GL_PGI_vertex_hints
-#define GL_PGI_vertex_hints 1
-#endif
-
-#ifndef GL_PGI_misc_hints
-#define GL_PGI_misc_hints 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glHintPGI (GLenum, GLint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLHINTPGIPROC) (GLenum target, GLint mode);
-#endif
-
-#ifndef GL_EXT_paletted_texture
-#define GL_EXT_paletted_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glColorTableEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glGetColorTableEXT (GLenum, GLenum, GLenum, GLvoid *);
-GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum, GLenum, GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
-typedef void (APIENTRY * PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data);
-typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
-#endif
-
-#ifndef GL_EXT_clip_volume_hint
-#define GL_EXT_clip_volume_hint 1
-#endif
-
-#ifndef GL_SGIX_list_priority
-#define GL_SGIX_list_priority 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetListParameterivSGIX (GLuint, GLenum, GLint *);
-GLAPI void APIENTRY glListParameterfSGIX (GLuint, GLenum, GLfloat);
-GLAPI void APIENTRY glListParameterfvSGIX (GLuint, GLenum, const GLfloat *);
-GLAPI void APIENTRY glListParameteriSGIX (GLuint, GLenum, GLint);
-GLAPI void APIENTRY glListParameterivSGIX (GLuint, GLenum, const GLint *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params);
-#endif
-
-#ifndef GL_SGIX_ir_instrument1
-#define GL_SGIX_ir_instrument1 1
-#endif
-
-#ifndef GL_SGIX_calligraphic_fragment
-#define GL_SGIX_calligraphic_fragment 1
-#endif
-
-#ifndef GL_SGIX_texture_lod_bias
-#define GL_SGIX_texture_lod_bias 1
-#endif
-
-#ifndef GL_SGIX_shadow_ambient
-#define GL_SGIX_shadow_ambient 1
-#endif
-
-#ifndef GL_EXT_index_texture
-#define GL_EXT_index_texture 1
-#endif
-
-#ifndef GL_EXT_index_material
-#define GL_EXT_index_material 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glIndexMaterialEXT (GLenum, GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);
-#endif
-
-#ifndef GL_EXT_index_func
-#define GL_EXT_index_func 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glIndexFuncEXT (GLenum, GLclampf);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref);
-#endif
-
-#ifndef GL_EXT_index_array_formats
-#define GL_EXT_index_array_formats 1
-#endif
-
-#ifndef GL_EXT_compiled_vertex_array
-#define GL_EXT_compiled_vertex_array 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glLockArraysEXT (GLint, GLsizei);
-GLAPI void APIENTRY glUnlockArraysEXT (void);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);
-typedef void (APIENTRY * PFNGLUNLOCKARRAYSEXTPROC) (void);
-#endif
-
-#ifndef GL_EXT_cull_vertex
-#define GL_EXT_cull_vertex 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glCullParameterdvEXT (GLenum, GLdouble *);
-GLAPI void APIENTRY glCullParameterfvEXT (GLenum, GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params);
-typedef void (APIENTRY * PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params);
-#endif
-
-#ifndef GL_SGIX_ycrcb
-#define GL_SGIX_ycrcb 1
-#endif
-
-#ifndef GL_SGIX_fragment_lighting
-#define GL_SGIX_fragment_lighting 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum, GLenum);
-GLAPI void APIENTRY glFragmentLightfSGIX (GLenum, GLenum, GLfloat);
-GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum, GLenum, const GLfloat *);
-GLAPI void APIENTRY glFragmentLightiSGIX (GLenum, GLenum, GLint);
-GLAPI void APIENTRY glFragmentLightivSGIX (GLenum, GLenum, const GLint *);
-GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum, GLfloat);
-GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum, const GLfloat *);
-GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum, GLint);
-GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum, const GLint *);
-GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum, GLenum, GLfloat);
-GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum, GLenum, const GLfloat *);
-GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum, GLenum, GLint);
-GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum, GLenum, const GLint *);
-GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glLightEnviSGIX (GLenum, GLint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);
-typedef void (APIENTRY * PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);
-#endif
-
-#ifndef GL_IBM_rasterpos_clip
-#define GL_IBM_rasterpos_clip 1
-#endif
-
-#ifndef GL_HP_texture_lighting
-#define GL_HP_texture_lighting 1
-#endif
-
-#ifndef GL_EXT_draw_range_elements
-#define GL_EXT_draw_range_elements 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
-#endif
-
-#ifndef GL_WIN_phong_shading
-#define GL_WIN_phong_shading 1
-#endif
-
-#ifndef GL_WIN_specular_fog
-#define GL_WIN_specular_fog 1
-#endif
-
-#ifndef GL_EXT_light_texture
-#define GL_EXT_light_texture 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glApplyTextureEXT (GLenum);
-GLAPI void APIENTRY glTextureLightEXT (GLenum);
-GLAPI void APIENTRY glTextureMaterialEXT (GLenum, GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);
-typedef void (APIENTRY * PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);
-typedef void (APIENTRY * PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);
-#endif
-
-#ifndef GL_SGIX_blend_alpha_minmax
-#define GL_SGIX_blend_alpha_minmax 1
-#endif
-
-#ifndef GL_EXT_bgra
-#define GL_EXT_bgra 1
-#endif
-
-#ifndef GL_SGIX_async
-#define GL_SGIX_async 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint);
-GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *);
-GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *);
-GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei);
-GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint, GLsizei);
-GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
-typedef GLint (APIENTRY * PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);
-typedef GLint (APIENTRY * PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);
-typedef GLuint (APIENTRY * PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
-typedef void (APIENTRY * PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
-typedef GLboolean (APIENTRY * PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
-#endif
-
-#ifndef GL_SGIX_async_pixel
-#define GL_SGIX_async_pixel 1
-#endif
-
-#ifndef GL_SGIX_async_histogram
-#define GL_SGIX_async_histogram 1
-#endif
-
-#ifndef GL_INTEL_parallel_arrays
-#define GL_INTEL_parallel_arrays 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glVertexPointervINTEL (GLint, GLenum, const GLvoid* *);
-GLAPI void APIENTRY glNormalPointervINTEL (GLenum, const GLvoid* *);
-GLAPI void APIENTRY glColorPointervINTEL (GLint, GLenum, const GLvoid* *);
-GLAPI void APIENTRY glTexCoordPointervINTEL (GLint, GLenum, const GLvoid* *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
-typedef void (APIENTRY * PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer);
-typedef void (APIENTRY * PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
-typedef void (APIENTRY * PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer);
-#endif
-
-#ifndef GL_HP_occlusion_test
-#define GL_HP_occlusion_test 1
-#endif
-
-#ifndef GL_EXT_pixel_transform
-#define GL_EXT_pixel_transform 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum, GLenum, GLint);
-GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum, GLenum, GLfloat);
-GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum, GLenum, const GLint *);
-GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum, GLenum, const GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);
-#endif
-
-#ifndef GL_EXT_pixel_transform_color_table
-#define GL_EXT_pixel_transform_color_table 1
-#endif
-
-#ifndef GL_EXT_shared_texture_palette
-#define GL_EXT_shared_texture_palette 1
-#endif
-
-#ifndef GL_EXT_separate_specular_color
-#define GL_EXT_separate_specular_color 1
-#endif
-
-#ifndef GL_EXT_secondary_color
-#define GL_EXT_secondary_color 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte, GLbyte, GLbyte);
-GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *);
-GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *);
-GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *);
-GLAPI void APIENTRY glSecondaryColor3iEXT (GLint, GLint, GLint);
-GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *);
-GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *);
-GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte, GLubyte, GLubyte);
-GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *);
-GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint, GLuint, GLuint);
-GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *);
-GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort, GLushort, GLushort);
-GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *);
-GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint, GLenum, GLsizei, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);
-typedef void (APIENTRY * PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);
-typedef void (APIENTRY * PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
-#endif
-
-#ifndef GL_EXT_texture_perturb_normal
-#define GL_EXT_texture_perturb_normal 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTextureNormalEXT (GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLTEXTURENORMALEXTPROC) (GLenum mode);
-#endif
-
-#ifndef GL_EXT_multi_draw_arrays
-#define GL_EXT_multi_draw_arrays 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
-GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
-typedef void (APIENTRY * PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
-#endif
-
-#ifndef GL_EXT_fog_coord
-#define GL_EXT_fog_coord 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glFogCoordfEXT (GLfloat);
-GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *);
-GLAPI void APIENTRY glFogCoorddEXT (GLdouble);
-GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *);
-GLAPI void APIENTRY glFogCoordPointerEXT (GLenum, GLsizei, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLFOGCOORDFEXTPROC) (GLfloat coord);
-typedef void (APIENTRY * PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);
-typedef void (APIENTRY * PFNGLFOGCOORDDEXTPROC) (GLdouble coord);
-typedef void (APIENTRY * PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);
-typedef void (APIENTRY * PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
-#endif
-
-#ifndef GL_REND_screen_coordinates
-#define GL_REND_screen_coordinates 1
-#endif
-
-#ifndef GL_EXT_coordinate_frame
-#define GL_EXT_coordinate_frame 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTangent3bEXT (GLbyte, GLbyte, GLbyte);
-GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *);
-GLAPI void APIENTRY glTangent3dEXT (GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *);
-GLAPI void APIENTRY glTangent3fEXT (GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *);
-GLAPI void APIENTRY glTangent3iEXT (GLint, GLint, GLint);
-GLAPI void APIENTRY glTangent3ivEXT (const GLint *);
-GLAPI void APIENTRY glTangent3sEXT (GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glTangent3svEXT (const GLshort *);
-GLAPI void APIENTRY glBinormal3bEXT (GLbyte, GLbyte, GLbyte);
-GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *);
-GLAPI void APIENTRY glBinormal3dEXT (GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *);
-GLAPI void APIENTRY glBinormal3fEXT (GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *);
-GLAPI void APIENTRY glBinormal3iEXT (GLint, GLint, GLint);
-GLAPI void APIENTRY glBinormal3ivEXT (const GLint *);
-GLAPI void APIENTRY glBinormal3sEXT (GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glBinormal3svEXT (const GLshort *);
-GLAPI void APIENTRY glTangentPointerEXT (GLenum, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glBinormalPointerEXT (GLenum, GLsizei, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz);
-typedef void (APIENTRY * PFNGLTANGENT3BVEXTPROC) (const GLbyte *v);
-typedef void (APIENTRY * PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz);
-typedef void (APIENTRY * PFNGLTANGENT3DVEXTPROC) (const GLdouble *v);
-typedef void (APIENTRY * PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz);
-typedef void (APIENTRY * PFNGLTANGENT3FVEXTPROC) (const GLfloat *v);
-typedef void (APIENTRY * PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz);
-typedef void (APIENTRY * PFNGLTANGENT3IVEXTPROC) (const GLint *v);
-typedef void (APIENTRY * PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz);
-typedef void (APIENTRY * PFNGLTANGENT3SVEXTPROC) (const GLshort *v);
-typedef void (APIENTRY * PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz);
-typedef void (APIENTRY * PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v);
-typedef void (APIENTRY * PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz);
-typedef void (APIENTRY * PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v);
-typedef void (APIENTRY * PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz);
-typedef void (APIENTRY * PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v);
-typedef void (APIENTRY * PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz);
-typedef void (APIENTRY * PFNGLBINORMAL3IVEXTPROC) (const GLint *v);
-typedef void (APIENTRY * PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz);
-typedef void (APIENTRY * PFNGLBINORMAL3SVEXTPROC) (const GLshort *v);
-typedef void (APIENTRY * PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
-typedef void (APIENTRY * PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer);
-#endif
-
-#ifndef GL_EXT_texture_env_combine
-#define GL_EXT_texture_env_combine 1
-#endif
-
-#ifndef GL_APPLE_specular_vector
-#define GL_APPLE_specular_vector 1
-#endif
-
-#ifndef GL_APPLE_transform_hint
-#define GL_APPLE_transform_hint 1
-#endif
-
-#ifndef GL_SGIX_fog_scale
-#define GL_SGIX_fog_scale 1
-#endif
-
-#ifndef GL_SUNX_constant_data
-#define GL_SUNX_constant_data 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glFinishTextureSUNX (void);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLFINISHTEXTURESUNXPROC) (void);
-#endif
-
-#ifndef GL_SUN_global_alpha
-#define GL_SUN_global_alpha 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte);
-GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort);
-GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint);
-GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat);
-GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble);
-GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte);
-GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort);
-GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);
-typedef void (APIENTRY * PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);
-typedef void (APIENTRY * PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);
-typedef void (APIENTRY * PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);
-typedef void (APIENTRY * PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);
-typedef void (APIENTRY * PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);
-typedef void (APIENTRY * PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);
-typedef void (APIENTRY * PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);
-#endif
-
-#ifndef GL_SUN_triangle_list
-#define GL_SUN_triangle_list 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint);
-GLAPI void APIENTRY glReplacementCodeusSUN (GLushort);
-GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte);
-GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *);
-GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *);
-GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *);
-GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum, GLsizei, const GLvoid* *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer);
-#endif
-
-#ifndef GL_SUN_vertex
-#define GL_SUN_vertex 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat);
-GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *, const GLfloat *);
-GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *, const GLfloat *);
-GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat, GLfloat, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *, const GLubyte *, const GLfloat *);
-GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLenum, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLenum *, const GLfloat *);
-GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLenum, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLenum *, const GLubyte *, const GLfloat *);
-GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLenum, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLenum *, const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLenum, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLenum *, const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLenum, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLenum *, const GLfloat *, const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLenum, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLenum *, const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLenum, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLenum *, const GLfloat *, const GLfloat *, const GLfloat *);
-GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLenum, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLenum *, const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);
-typedef void (APIENTRY * PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v);
-typedef void (APIENTRY * PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v);
-typedef void (APIENTRY * PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v);
-typedef void (APIENTRY * PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v);
-typedef void (APIENTRY * PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v);
-typedef void (APIENTRY * PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
-typedef void (APIENTRY * PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRY * PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v);
-typedef void (APIENTRY * PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v);
-typedef void (APIENTRY * PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v);
-typedef void (APIENTRY * PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v);
-typedef void (APIENTRY * PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
-typedef void (APIENTRY * PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRY * PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLenum rc, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLenum *rc, const GLfloat *v);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLenum rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLenum *rc, const GLubyte *c, const GLfloat *v);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLenum rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLenum *rc, const GLfloat *c, const GLfloat *v);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLenum rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLenum *rc, const GLfloat *n, const GLfloat *v);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLenum rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLenum *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLenum rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLenum *rc, const GLfloat *tc, const GLfloat *v);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLenum rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLenum *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLenum rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLenum *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);
-#endif
-
-#ifndef GL_EXT_blend_func_separate
-#define GL_EXT_blend_func_separate 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum, GLenum, GLenum, GLenum);
-GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum, GLenum, GLenum, GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-typedef void (APIENTRY * PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
-#endif
-
-#ifndef GL_INGR_color_clamp
-#define GL_INGR_color_clamp 1
-#endif
-
-#ifndef GL_INGR_interlace_read
-#define GL_INGR_interlace_read 1
-#endif
-
-#ifndef GL_EXT_stencil_wrap
-#define GL_EXT_stencil_wrap 1
-#endif
-
-#ifndef GL_EXT_422_pixels
-#define GL_EXT_422_pixels 1
-#endif
-
-#ifndef GL_NV_texgen_reflection
-#define GL_NV_texgen_reflection 1
-#endif
-
-#ifndef GL_SUN_convolution_border_modes
-#define GL_SUN_convolution_border_modes 1
-#endif
-
-#ifndef GL_EXT_texture_env_add
-#define GL_EXT_texture_env_add 1
-#endif
-
-#ifndef GL_EXT_texture_lod_bias
-#define GL_EXT_texture_lod_bias 1
-#endif
-
-#ifndef GL_EXT_texture_filter_anisotropic
-#define GL_EXT_texture_filter_anisotropic 1
-#endif
-
-#ifndef GL_EXT_vertex_weighting
-#define GL_EXT_vertex_weighting 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glVertexWeightfEXT (GLfloat);
-GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *);
-GLAPI void APIENTRY glVertexWeightPointerEXT (GLsizei, GLenum, GLsizei, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);
-typedef void (APIENTRY * PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);
-typedef void (APIENTRY * PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer);
-#endif
-
-#ifndef GL_NV_light_max_exponent
-#define GL_NV_light_max_exponent 1
-#endif
-
-#ifndef GL_NV_vertex_array_range
-#define GL_NV_vertex_array_range 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glFlushVertexArrayRangeNV (void);
-GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);
-typedef void (APIENTRY * PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer);
-#endif
-
-#ifndef GL_NV_register_combiners
-#define GL_NV_register_combiners 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glCombinerParameterfvNV (GLenum, const GLfloat *);
-GLAPI void APIENTRY glCombinerParameterfNV (GLenum, GLfloat);
-GLAPI void APIENTRY glCombinerParameterivNV (GLenum, const GLint *);
-GLAPI void APIENTRY glCombinerParameteriNV (GLenum, GLint);
-GLAPI void APIENTRY glCombinerInputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum);
-GLAPI void APIENTRY glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean);
-GLAPI void APIENTRY glFinalCombinerInputNV (GLenum, GLenum, GLenum, GLenum);
-GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum, GLenum, GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum, GLenum, GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum, GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum, GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum, GLenum, GLint *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
-typedef void (APIENTRY * PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
-typedef void (APIENTRY * PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
-typedef void (APIENTRY * PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
-typedef void (APIENTRY * PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);
-#endif
-
-#ifndef GL_NV_fog_distance
-#define GL_NV_fog_distance 1
-#endif
-
-#ifndef GL_NV_texgen_emboss
-#define GL_NV_texgen_emboss 1
-#endif
-
-#ifndef GL_NV_blend_square
-#define GL_NV_blend_square 1
-#endif
-
-#ifndef GL_NV_texture_env_combine4
-#define GL_NV_texture_env_combine4 1
-#endif
-
-#ifndef GL_MESA_resize_buffers
-#define GL_MESA_resize_buffers 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glResizeBuffersMESA (void);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLRESIZEBUFFERSMESAPROC) (void);
-#endif
-
-#ifndef GL_MESA_window_pos
-#define GL_MESA_window_pos 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glWindowPos2dMESA (GLdouble, GLdouble);
-GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *);
-GLAPI void APIENTRY glWindowPos2fMESA (GLfloat, GLfloat);
-GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *);
-GLAPI void APIENTRY glWindowPos2iMESA (GLint, GLint);
-GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *);
-GLAPI void APIENTRY glWindowPos2sMESA (GLshort, GLshort);
-GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *);
-GLAPI void APIENTRY glWindowPos3dMESA (GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *);
-GLAPI void APIENTRY glWindowPos3fMESA (GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *);
-GLAPI void APIENTRY glWindowPos3iMESA (GLint, GLint, GLint);
-GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *);
-GLAPI void APIENTRY glWindowPos3sMESA (GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *);
-GLAPI void APIENTRY glWindowPos4dMESA (GLdouble, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *);
-GLAPI void APIENTRY glWindowPos4fMESA (GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *);
-GLAPI void APIENTRY glWindowPos4iMESA (GLint, GLint, GLint, GLint);
-GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *);
-GLAPI void APIENTRY glWindowPos4sMESA (GLshort, GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);
-typedef void (APIENTRY * PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);
-typedef void (APIENTRY * PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);
-typedef void (APIENTRY * PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);
-typedef void (APIENTRY * PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);
-typedef void (APIENTRY * PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);
-typedef void (APIENTRY * PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);
-typedef void (APIENTRY * PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRY * PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRY * PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);
-typedef void (APIENTRY * PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v);
-typedef void (APIENTRY * PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);
-typedef void (APIENTRY * PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v);
-#endif
-
-#ifndef GL_IBM_cull_vertex
-#define GL_IBM_cull_vertex 1
-#endif
-
-#ifndef GL_IBM_multimode_draw_arrays
-#define GL_IBM_multimode_draw_arrays 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glMultiModeDrawArraysIBM (GLenum, const GLint *, const GLsizei *, GLsizei, GLint);
-GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *, const GLsizei *, GLenum, const GLvoid* *, GLsizei, GLint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLMULTIMODEDRAWARRAYSIBMPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);
-typedef void (APIENTRY * PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount, GLint modestride);
-#endif
-
-#ifndef GL_IBM_vertex_array_lists
-#define GL_IBM_vertex_array_lists 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
-GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
-GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint, const GLboolean* *, GLint);
-GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
-GLAPI void APIENTRY glIndexPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
-GLAPI void APIENTRY glNormalPointerListIBM (GLenum, GLint, const GLvoid* *, GLint);
-GLAPI void APIENTRY glTexCoordPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
-GLAPI void APIENTRY glVertexPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
-typedef void (APIENTRY * PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
-typedef void (APIENTRY * PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride);
-typedef void (APIENTRY * PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
-typedef void (APIENTRY * PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
-typedef void (APIENTRY * PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
-typedef void (APIENTRY * PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
-typedef void (APIENTRY * PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride);
-#endif
-
-#ifndef GL_SGIX_subsample
-#define GL_SGIX_subsample 1
-#endif
-
-#ifndef GL_SGIX_ycrcba
-#define GL_SGIX_ycrcba 1
-#endif
-
-#ifndef GL_SGIX_ycrcb_subsample
-#define GL_SGIX_ycrcb_subsample 1
-#endif
-
-#ifndef GL_SGIX_depth_pass_instrument
-#define GL_SGIX_depth_pass_instrument 1
-#endif
-
-#ifndef GL_3DFX_texture_compression_FXT1
-#define GL_3DFX_texture_compression_FXT1 1
-#endif
-
-#ifndef GL_3DFX_multisample
-#define GL_3DFX_multisample 1
-#endif
-
-#ifndef GL_3DFX_tbuffer
-#define GL_3DFX_tbuffer 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTbufferMask3DFX (GLuint);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);
-#endif
-
-#ifndef GL_EXT_multisample
-#define GL_EXT_multisample 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glSampleMaskEXT (GLclampf, GLboolean);
-GLAPI void APIENTRY glSamplePatternEXT (GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);
-typedef void (APIENTRY * PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);
-#endif
-
-#ifndef GL_SGIX_vertex_preclip
-#define GL_SGIX_vertex_preclip 1
-#endif
-
-#ifndef GL_SGIX_convolution_accuracy
-#define GL_SGIX_convolution_accuracy 1
-#endif
-
-#ifndef GL_SGIX_resample
-#define GL_SGIX_resample 1
-#endif
-
-#ifndef GL_SGIS_point_line_texgen
-#define GL_SGIS_point_line_texgen 1
-#endif
-
-#ifndef GL_SGIS_texture_color_mask
-#define GL_SGIS_texture_color_mask 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean, GLboolean, GLboolean, GLboolean);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
-#endif
-
-#ifndef GL_SGIX_igloo_interface
-#define GL_SGIX_igloo_interface 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum, const GLvoid *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params);
-#endif
-
-#ifndef GL_NV_fence
-#define GL_NV_fence 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
-GLAPI void APIENTRY glGenFencesNV (GLsizei, GLuint *);
-GLAPI GLboolean APIENTRY glIsFenceNV (GLuint);
-GLAPI GLboolean APIENTRY glTestFenceNV (GLuint);
-GLAPI void APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
-GLAPI void APIENTRY glFinishFenceNV (GLuint);
-GLAPI void APIENTRY glSetFenceNV (GLuint, GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
-typedef void (APIENTRY * PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
-typedef GLboolean (APIENTRY * PFNGLISFENCENVPROC) (GLuint fence);
-typedef GLboolean (APIENTRY * PFNGLTESTFENCENVPROC) (GLuint fence);
-typedef void (APIENTRY * PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLFINISHFENCENVPROC) (GLuint fence);
-typedef void (APIENTRY * PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
-#endif
-
-#ifndef GL_NV_evaluators
-#define GL_NV_evaluators 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLint, GLint, GLboolean, const GLvoid *);
-GLAPI void APIENTRY glMapParameterivNV (GLenum, GLenum, const GLint *);
-GLAPI void APIENTRY glMapParameterfvNV (GLenum, GLenum, const GLfloat *);
-GLAPI void APIENTRY glGetMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLboolean, GLvoid *);
-GLAPI void APIENTRY glGetMapParameterivNV (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glGetMapParameterfvNV (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum, GLuint, GLenum, GLint *);
-GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
-GLAPI void APIENTRY glEvalMapsNV (GLenum, GLenum);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points);
-typedef void (APIENTRY * PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params);
-typedef void (APIENTRY * PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points);
-typedef void (APIENTRY * PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);
-#endif
-
-#ifndef GL_NV_packed_depth_stencil
-#define GL_NV_packed_depth_stencil 1
-#endif
-
-#ifndef GL_NV_register_combiners2
-#define GL_NV_register_combiners2 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum, GLenum, const GLfloat *);
-GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum, GLenum, GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);
-typedef void (APIENTRY * PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);
-#endif
-
-#ifndef GL_NV_texture_compression_vtc
-#define GL_NV_texture_compression_vtc 1
-#endif
-
-#ifndef GL_NV_texture_rectangle
-#define GL_NV_texture_rectangle 1
-#endif
-
-#ifndef GL_NV_texture_shader
-#define GL_NV_texture_shader 1
-#endif
-
-#ifndef GL_NV_texture_shader2
-#define GL_NV_texture_shader2 1
-#endif
-
-#ifndef GL_NV_vertex_array_range2
-#define GL_NV_vertex_array_range2 1
-#endif
-
-#ifndef GL_NV_vertex_program
-#define GL_NV_vertex_program 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei, const GLuint *, GLboolean *);
-GLAPI void APIENTRY glBindProgramNV (GLenum, GLuint);
-GLAPI void APIENTRY glDeleteProgramsNV (GLsizei, const GLuint *);
-GLAPI void APIENTRY glExecuteProgramNV (GLenum, GLuint, const GLfloat *);
-GLAPI void APIENTRY glGenProgramsNV (GLsizei, GLuint *);
-GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum, GLuint, GLenum, GLdouble *);
-GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum, GLuint, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetProgramivNV (GLuint, GLenum, GLint *);
-GLAPI void APIENTRY glGetProgramStringNV (GLuint, GLenum, GLubyte *);
-GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum, GLuint, GLenum, GLint *);
-GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint, GLenum, GLdouble *);
-GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetVertexAttribivNV (GLuint, GLenum, GLint *);
-GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint, GLenum, GLvoid* *);
-GLAPI GLboolean APIENTRY glIsProgramNV (GLuint);
-GLAPI void APIENTRY glLoadProgramNV (GLenum, GLuint, GLsizei, const GLubyte *);
-GLAPI void APIENTRY glProgramParameter4dNV (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glProgramParameter4dvNV (GLenum, GLuint, const GLdouble *);
-GLAPI void APIENTRY glProgramParameter4fNV (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glProgramParameter4fvNV (GLenum, GLuint, const GLfloat *);
-GLAPI void APIENTRY glProgramParameters4dvNV (GLenum, GLuint, GLuint, const GLdouble *);
-GLAPI void APIENTRY glProgramParameters4fvNV (GLenum, GLuint, GLuint, const GLfloat *);
-GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei, const GLuint *);
-GLAPI void APIENTRY glTrackMatrixNV (GLenum, GLuint, GLenum, GLenum);
-GLAPI void APIENTRY glVertexAttribPointerNV (GLuint, GLint, GLenum, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glVertexAttrib1dNV (GLuint, GLdouble);
-GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint, const GLdouble *);
-GLAPI void APIENTRY glVertexAttrib1fNV (GLuint, GLfloat);
-GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint, const GLfloat *);
-GLAPI void APIENTRY glVertexAttrib1sNV (GLuint, GLshort);
-GLAPI void APIENTRY glVertexAttrib1svNV (GLuint, const GLshort *);
-GLAPI void APIENTRY glVertexAttrib2dNV (GLuint, GLdouble, GLdouble);
-GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint, const GLdouble *);
-GLAPI void APIENTRY glVertexAttrib2fNV (GLuint, GLfloat, GLfloat);
-GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint, const GLfloat *);
-GLAPI void APIENTRY glVertexAttrib2sNV (GLuint, GLshort, GLshort);
-GLAPI void APIENTRY glVertexAttrib2svNV (GLuint, const GLshort *);
-GLAPI void APIENTRY glVertexAttrib3dNV (GLuint, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint, const GLdouble *);
-GLAPI void APIENTRY glVertexAttrib3fNV (GLuint, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint, const GLfloat *);
-GLAPI void APIENTRY glVertexAttrib3sNV (GLuint, GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glVertexAttrib3svNV (GLuint, const GLshort *);
-GLAPI void APIENTRY glVertexAttrib4dNV (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint, const GLdouble *);
-GLAPI void APIENTRY glVertexAttrib4fNV (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint, const GLfloat *);
-GLAPI void APIENTRY glVertexAttrib4sNV (GLuint, GLshort, GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glVertexAttrib4svNV (GLuint, const GLshort *);
-GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
-GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint, const GLubyte *);
-GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint, GLsizei, const GLdouble *);
-GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint, GLsizei, const GLfloat *);
-GLAPI void APIENTRY glVertexAttribs1svNV (GLuint, GLsizei, const GLshort *);
-GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint, GLsizei, const GLdouble *);
-GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint, GLsizei, const GLfloat *);
-GLAPI void APIENTRY glVertexAttribs2svNV (GLuint, GLsizei, const GLshort *);
-GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint, GLsizei, const GLdouble *);
-GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint, GLsizei, const GLfloat *);
-GLAPI void APIENTRY glVertexAttribs3svNV (GLuint, GLsizei, const GLshort *);
-GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint, GLsizei, const GLdouble *);
-GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint, GLsizei, const GLfloat *);
-GLAPI void APIENTRY glVertexAttribs4svNV (GLuint, GLsizei, const GLshort *);
-GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint, GLsizei, const GLubyte *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef GLboolean (APIENTRY * PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);
-typedef void (APIENTRY * PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);
-typedef void (APIENTRY * PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
-typedef void (APIENTRY * PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);
-typedef void (APIENTRY * PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);
-typedef void (APIENTRY * PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);
-typedef void (APIENTRY * PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);
-typedef void (APIENTRY * PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);
-typedef void (APIENTRY * PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
-typedef GLboolean (APIENTRY * PFNGLISPROGRAMNVPROC) (GLuint id);
-typedef void (APIENTRY * PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);
-typedef void (APIENTRY * PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRY * PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);
-typedef void (APIENTRY * PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRY * PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);
-typedef void (APIENTRY * PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble *v);
-typedef void (APIENTRY * PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat *v);
-typedef void (APIENTRY * PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);
-typedef void (APIENTRY * PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
-typedef void (APIENTRY * PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);
-typedef void (APIENTRY * PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);
-#endif
-
-#ifndef GL_SGIX_texture_coordinate_clamp
-#define GL_SGIX_texture_coordinate_clamp 1
-#endif
-
-#ifndef GL_SGIX_scalebias_hint
-#define GL_SGIX_scalebias_hint 1
-#endif
-
-#ifndef GL_OML_interlace
-#define GL_OML_interlace 1
-#endif
-
-#ifndef GL_OML_subsample
-#define GL_OML_subsample 1
-#endif
-
-#ifndef GL_OML_resample
-#define GL_OML_resample 1
-#endif
-
-#ifndef GL_NV_copy_depth_to_color
-#define GL_NV_copy_depth_to_color 1
-#endif
-
-#ifndef GL_ATI_envmap_bumpmap
-#define GL_ATI_envmap_bumpmap 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glTexBumpParameterivATI (GLenum, const GLint *);
-GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum, const GLfloat *);
-GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum, GLint *);
-GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum, GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param);
-typedef void (APIENTRY * PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param);
-typedef void (APIENTRY * PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);
-typedef void (APIENTRY * PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);
-#endif
-
-#ifndef GL_ATI_fragment_shader
-#define GL_ATI_fragment_shader 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint);
-GLAPI void APIENTRY glBindFragmentShaderATI (GLuint);
-GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint);
-GLAPI void APIENTRY glBeginFragmentShaderATI (void);
-GLAPI void APIENTRY glEndFragmentShaderATI (void);
-GLAPI void APIENTRY glPassTexCoordATI (GLuint, GLuint, GLenum);
-GLAPI void APIENTRY glSampleMapATI (GLuint, GLuint, GLenum);
-GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
-GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
-GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
-GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint);
-GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
-GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint);
-GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint, const GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef GLuint (APIENTRY * PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);
-typedef void (APIENTRY * PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);
-typedef void (APIENTRY * PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);
-typedef void (APIENTRY * PFNGLBEGINFRAGMENTSHADERATIPROC) (void);
-typedef void (APIENTRY * PFNGLENDFRAGMENTSHADERATIPROC) (void);
-typedef void (APIENTRY * PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);
-typedef void (APIENTRY * PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);
-typedef void (APIENTRY * PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
-typedef void (APIENTRY * PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
-typedef void (APIENTRY * PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
-typedef void (APIENTRY * PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);
-typedef void (APIENTRY * PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);
-typedef void (APIENTRY * PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);
-typedef void (APIENTRY * PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value);
-#endif
-
-#ifndef GL_ATI_pn_triangles
-#define GL_ATI_pn_triangles 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPNTrianglesiATI (GLenum, GLint);
-GLAPI void APIENTRY glPNTrianglesfATI (GLenum, GLfloat);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);
-#endif
-
-#ifndef GL_ATI_vertex_array_object
-#define GL_ATI_vertex_array_object 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei, const GLvoid *, GLenum);
-GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint);
-GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint, GLuint, GLsizei, const GLvoid *, GLenum);
-GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetObjectBufferivATI (GLuint, GLenum, GLint *);
-GLAPI void APIENTRY glDeleteObjectBufferATI (GLuint);
-GLAPI void APIENTRY glArrayObjectATI (GLenum, GLint, GLenum, GLsizei, GLuint, GLuint);
-GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetArrayObjectivATI (GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glVariantArrayObjectATI (GLuint, GLenum, GLsizei, GLuint, GLuint);
-GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint, GLenum, GLint *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef GLuint (APIENTRY * PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage);
-typedef GLboolean (APIENTRY * PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);
-typedef void (APIENTRY * PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve);
-typedef void (APIENTRY * PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLDELETEOBJECTBUFFERATIPROC) (GLuint buffer);
-typedef void (APIENTRY * PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
-typedef void (APIENTRY * PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);
-typedef void (APIENTRY * PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);
-typedef void (APIENTRY * PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);
-#endif
-
-#ifndef GL_EXT_vertex_shader
-#define GL_EXT_vertex_shader 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glBeginVertexShaderEXT (void);
-GLAPI void APIENTRY glEndVertexShaderEXT (void);
-GLAPI void APIENTRY glBindVertexShaderEXT (GLuint);
-GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint);
-GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint);
-GLAPI void APIENTRY glShaderOp1EXT (GLenum, GLuint, GLuint);
-GLAPI void APIENTRY glShaderOp2EXT (GLenum, GLuint, GLuint, GLuint);
-GLAPI void APIENTRY glShaderOp3EXT (GLenum, GLuint, GLuint, GLuint, GLuint);
-GLAPI void APIENTRY glSwizzleEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
-GLAPI void APIENTRY glWriteMaskEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum);
-GLAPI void APIENTRY glInsertComponentEXT (GLuint, GLuint, GLuint);
-GLAPI void APIENTRY glExtractComponentEXT (GLuint, GLuint, GLuint);
-GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum, GLenum, GLenum, GLuint);
-GLAPI void APIENTRY glSetInvariantEXT (GLuint, GLenum, const void *);
-GLAPI void APIENTRY glSetLocalConstantEXT (GLuint, GLenum, const void *);
-GLAPI void APIENTRY glVariantbvEXT (GLuint, const GLbyte *);
-GLAPI void APIENTRY glVariantsvEXT (GLuint, const GLshort *);
-GLAPI void APIENTRY glVariantivEXT (GLuint, const GLint *);
-GLAPI void APIENTRY glVariantfvEXT (GLuint, const GLfloat *);
-GLAPI void APIENTRY glVariantdvEXT (GLuint, const GLdouble *);
-GLAPI void APIENTRY glVariantubvEXT (GLuint, const GLubyte *);
-GLAPI void APIENTRY glVariantusvEXT (GLuint, const GLushort *);
-GLAPI void APIENTRY glVariantuivEXT (GLuint, const GLuint *);
-GLAPI void APIENTRY glVariantPointerEXT (GLuint, GLenum, GLuint, const void *);
-GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint);
-GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint);
-GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum, GLenum);
-GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum, GLenum);
-GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum, GLenum, GLenum);
-GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum, GLenum);
-GLAPI GLuint APIENTRY glBindParameterEXT (GLenum);
-GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint, GLenum);
-GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint, GLenum, GLboolean *);
-GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint, GLenum, GLint *);
-GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetVariantPointervEXT (GLuint, GLenum, GLvoid* *);
-GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint, GLenum, GLboolean *);
-GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint, GLenum, GLint *);
-GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint, GLenum, GLboolean *);
-GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint, GLenum, GLint *);
-GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint, GLenum, GLfloat *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLBEGINVERTEXSHADEREXTPROC) (void);
-typedef void (APIENTRY * PFNGLENDVERTEXSHADEREXTPROC) (void);
-typedef void (APIENTRY * PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);
-typedef GLuint (APIENTRY * PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);
-typedef void (APIENTRY * PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);
-typedef void (APIENTRY * PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);
-typedef void (APIENTRY * PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);
-typedef void (APIENTRY * PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);
-typedef void (APIENTRY * PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
-typedef void (APIENTRY * PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);
-typedef void (APIENTRY * PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
-typedef void (APIENTRY * PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);
-typedef GLuint (APIENTRY * PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);
-typedef void (APIENTRY * PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const void *addr);
-typedef void (APIENTRY * PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const void *addr);
-typedef void (APIENTRY * PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr);
-typedef void (APIENTRY * PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr);
-typedef void (APIENTRY * PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr);
-typedef void (APIENTRY * PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr);
-typedef void (APIENTRY * PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr);
-typedef void (APIENTRY * PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr);
-typedef void (APIENTRY * PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr);
-typedef void (APIENTRY * PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr);
-typedef void (APIENTRY * PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const void *addr);
-typedef void (APIENTRY * PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
-typedef void (APIENTRY * PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);
-typedef GLuint (APIENTRY * PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);
-typedef GLuint (APIENTRY * PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);
-typedef GLuint (APIENTRY * PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);
-typedef GLuint (APIENTRY * PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);
-typedef GLuint (APIENTRY * PFNGLBINDPARAMETEREXTPROC) (GLenum value);
-typedef GLboolean (APIENTRY * PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);
-typedef void (APIENTRY * PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
-typedef void (APIENTRY * PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
-typedef void (APIENTRY * PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
-typedef void (APIENTRY * PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data);
-typedef void (APIENTRY * PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
-typedef void (APIENTRY * PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
-typedef void (APIENTRY * PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
-typedef void (APIENTRY * PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);
-typedef void (APIENTRY * PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);
-typedef void (APIENTRY * PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);
-#endif
-
-#ifndef GL_ATI_vertex_streams
-#define GL_ATI_vertex_streams 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glVertexStream1sATI (GLenum, GLshort);
-GLAPI void APIENTRY glVertexStream1svATI (GLenum, const GLshort *);
-GLAPI void APIENTRY glVertexStream1iATI (GLenum, GLint);
-GLAPI void APIENTRY glVertexStream1ivATI (GLenum, const GLint *);
-GLAPI void APIENTRY glVertexStream1fATI (GLenum, GLfloat);
-GLAPI void APIENTRY glVertexStream1fvATI (GLenum, const GLfloat *);
-GLAPI void APIENTRY glVertexStream1dATI (GLenum, GLdouble);
-GLAPI void APIENTRY glVertexStream1dvATI (GLenum, const GLdouble *);
-GLAPI void APIENTRY glVertexStream2sATI (GLenum, GLshort, GLshort);
-GLAPI void APIENTRY glVertexStream2svATI (GLenum, const GLshort *);
-GLAPI void APIENTRY glVertexStream2iATI (GLenum, GLint, GLint);
-GLAPI void APIENTRY glVertexStream2ivATI (GLenum, const GLint *);
-GLAPI void APIENTRY glVertexStream2fATI (GLenum, GLfloat, GLfloat);
-GLAPI void APIENTRY glVertexStream2fvATI (GLenum, const GLfloat *);
-GLAPI void APIENTRY glVertexStream2dATI (GLenum, GLdouble, GLdouble);
-GLAPI void APIENTRY glVertexStream2dvATI (GLenum, const GLdouble *);
-GLAPI void APIENTRY glVertexStream3sATI (GLenum, GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glVertexStream3svATI (GLenum, const GLshort *);
-GLAPI void APIENTRY glVertexStream3iATI (GLenum, GLint, GLint, GLint);
-GLAPI void APIENTRY glVertexStream3ivATI (GLenum, const GLint *);
-GLAPI void APIENTRY glVertexStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glVertexStream3fvATI (GLenum, const GLfloat *);
-GLAPI void APIENTRY glVertexStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glVertexStream3dvATI (GLenum, const GLdouble *);
-GLAPI void APIENTRY glVertexStream4sATI (GLenum, GLshort, GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glVertexStream4svATI (GLenum, const GLshort *);
-GLAPI void APIENTRY glVertexStream4iATI (GLenum, GLint, GLint, GLint, GLint);
-GLAPI void APIENTRY glVertexStream4ivATI (GLenum, const GLint *);
-GLAPI void APIENTRY glVertexStream4fATI (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glVertexStream4fvATI (GLenum, const GLfloat *);
-GLAPI void APIENTRY glVertexStream4dATI (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glVertexStream4dvATI (GLenum, const GLdouble *);
-GLAPI void APIENTRY glNormalStream3bATI (GLenum, GLbyte, GLbyte, GLbyte);
-GLAPI void APIENTRY glNormalStream3bvATI (GLenum, const GLbyte *);
-GLAPI void APIENTRY glNormalStream3sATI (GLenum, GLshort, GLshort, GLshort);
-GLAPI void APIENTRY glNormalStream3svATI (GLenum, const GLshort *);
-GLAPI void APIENTRY glNormalStream3iATI (GLenum, GLint, GLint, GLint);
-GLAPI void APIENTRY glNormalStream3ivATI (GLenum, const GLint *);
-GLAPI void APIENTRY glNormalStream3fATI (GLenum, GLfloat, GLfloat, GLfloat);
-GLAPI void APIENTRY glNormalStream3fvATI (GLenum, const GLfloat *);
-GLAPI void APIENTRY glNormalStream3dATI (GLenum, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glNormalStream3dvATI (GLenum, const GLdouble *);
-GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum);
-GLAPI void APIENTRY glVertexBlendEnviATI (GLenum, GLint);
-GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum, GLfloat);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-typedef void (APIENTRY * PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);
-typedef void (APIENTRY * PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);
-typedef void (APIENTRY * PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);
-typedef void (APIENTRY * PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz);
-typedef void (APIENTRY * PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);
-typedef void (APIENTRY * PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz);
-typedef void (APIENTRY * PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);
-typedef void (APIENTRY * PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);
-typedef void (APIENTRY * PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);
-typedef void (APIENTRY * PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);
-typedef void (APIENTRY * PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);
-typedef void (APIENTRY * PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);
-typedef void (APIENTRY * PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);
-#endif
-
-#ifndef GL_ATI_element_array
-#define GL_ATI_element_array 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glElementPointerATI (GLenum, const GLvoid *);
-GLAPI void APIENTRY glDrawElementArrayATI (GLenum, GLsizei);
-GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum, GLuint, GLuint, GLsizei);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer);
-typedef void (APIENTRY * PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);
-typedef void (APIENTRY * PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);
-#endif
-
-#ifndef GL_SUN_mesh_array
-#define GL_SUN_mesh_array 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum, GLint, GLsizei, GLsizei);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width);
-#endif
-
-#ifndef GL_SUN_slice_accum
-#define GL_SUN_slice_accum 1
-#endif
-
-#ifndef GL_NV_multisample_filter_hint
-#define GL_NV_multisample_filter_hint 1
-#endif
-
-#ifndef GL_NV_depth_clamp
-#define GL_NV_depth_clamp 1
-#endif
-
-#ifndef GL_NV_occlusion_query
-#define GL_NV_occlusion_query 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei, GLuint *);
-GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei, const GLuint *);
-GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint);
-GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint);
-GLAPI void APIENTRY glEndOcclusionQueryNV (void);
-GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint, GLenum, GLint *);
-GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint, GLenum, GLuint *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);
-typedef void (APIENTRY * PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);
-typedef GLboolean (APIENTRY * PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);
-typedef void (APIENTRY * PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);
-typedef void (APIENTRY * PFNGLENDOCCLUSIONQUERYNVPROC) (void);
-typedef void (APIENTRY * PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);
-typedef void (APIENTRY * PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);
-#endif
-
-#ifndef GL_NV_point_sprite
-#define GL_NV_point_sprite 1
-#ifdef GL_GLEXT_PROTOTYPES
-GLAPI void APIENTRY glPointParameteriNV (GLenum, GLint);
-GLAPI void APIENTRY glPointParameterivNV (GLenum, const GLint *);
-#endif /* GL_GLEXT_PROTOTYPES */
-typedef void (APIENTRY * PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);
-typedef void (APIENTRY * PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
-#endif
-
-#ifndef GL_NV_texture_shader3
-#define GL_NV_texture_shader3 1
-#endif
-
-#ifndef GL_NV_vertex_program1_1
-#define GL_NV_vertex_program1_1 1
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/winsup/w32api/include/GL/glu.h b/winsup/w32api/include/GL/glu.h
deleted file mode 100644
index d6e9e37..0000000
--- a/winsup/w32api/include/GL/glu.h
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
-** License Applicability. Except to the extent portions of this file are
-** made subject to an alternative license as permitted in the SGI Free
-** Software License B, Version 1.1 (the "License"), the contents of this
-** file are subject only to the provisions of the License. You may not use
-** this file except in compliance with the License. You may obtain a copy
-** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
-** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
-** http://oss.sgi.com/projects/FreeB
-**
-** Note that, as provided in the License, the Software is distributed on an
-** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
-** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
-** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
-** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
-** Original Code. The Original Code is: OpenGL Sample Implementation,
-** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
-** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
-** Copyright in any portions created by third parties is as indicated
-** elsewhere herein. All Rights Reserved.
-**
-** Additional Notice Provisions: This software was created using the
-** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
-** not been independently verified as being compliant with the OpenGL(R)
-** version 1.2.1 Specification.
-*/
-
-#ifndef __glu_h__
-#define __glu_h__
-#define _GLU_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#include <stddef.h> /* for wchar_t */
-#include <GL/gl.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*************************************************************/
-
-/* Boolean */
-#define GLU_FALSE 0
-#define GLU_TRUE 1
-
-/* Version */
-#define GLU_VERSION_1_1 1
-#define GLU_VERSION_1_2 1
-
-/* StringName */
-#define GLU_VERSION 100800
-#define GLU_EXTENSIONS 100801
-
-/* ErrorCode */
-#define GLU_INVALID_ENUM 100900
-#define GLU_INVALID_VALUE 100901
-#define GLU_OUT_OF_MEMORY 100902
-#define GLU_INVALID_OPERATION 100904
-
-/* NurbsDisplay */
-/* GLU_FILL */
-#define GLU_OUTLINE_POLYGON 100240
-#define GLU_OUTLINE_PATCH 100241
-
-/* NurbsError */
-#define GLU_NURBS_ERROR1 100251
-#define GLU_NURBS_ERROR2 100252
-#define GLU_NURBS_ERROR3 100253
-#define GLU_NURBS_ERROR4 100254
-#define GLU_NURBS_ERROR5 100255
-#define GLU_NURBS_ERROR6 100256
-#define GLU_NURBS_ERROR7 100257
-#define GLU_NURBS_ERROR8 100258
-#define GLU_NURBS_ERROR9 100259
-#define GLU_NURBS_ERROR10 100260
-#define GLU_NURBS_ERROR11 100261
-#define GLU_NURBS_ERROR12 100262
-#define GLU_NURBS_ERROR13 100263
-#define GLU_NURBS_ERROR14 100264
-#define GLU_NURBS_ERROR15 100265
-#define GLU_NURBS_ERROR16 100266
-#define GLU_NURBS_ERROR17 100267
-#define GLU_NURBS_ERROR18 100268
-#define GLU_NURBS_ERROR19 100269
-#define GLU_NURBS_ERROR20 100270
-#define GLU_NURBS_ERROR21 100271
-#define GLU_NURBS_ERROR22 100272
-#define GLU_NURBS_ERROR23 100273
-#define GLU_NURBS_ERROR24 100274
-#define GLU_NURBS_ERROR25 100275
-#define GLU_NURBS_ERROR26 100276
-#define GLU_NURBS_ERROR27 100277
-#define GLU_NURBS_ERROR28 100278
-#define GLU_NURBS_ERROR29 100279
-#define GLU_NURBS_ERROR30 100280
-#define GLU_NURBS_ERROR31 100281
-#define GLU_NURBS_ERROR32 100282
-#define GLU_NURBS_ERROR33 100283
-#define GLU_NURBS_ERROR34 100284
-#define GLU_NURBS_ERROR35 100285
-#define GLU_NURBS_ERROR36 100286
-#define GLU_NURBS_ERROR37 100287
-
-/* NurbsProperty */
-#define GLU_AUTO_LOAD_MATRIX 100200
-#define GLU_CULLING 100201
-#define GLU_SAMPLING_TOLERANCE 100203
-#define GLU_DISPLAY_MODE 100204
-#define GLU_PARAMETRIC_TOLERANCE 100202
-#define GLU_SAMPLING_METHOD 100205
-#define GLU_U_STEP 100206
-#define GLU_V_STEP 100207
-
-/* NurbsSampling */
-#define GLU_PATH_LENGTH 100215
-#define GLU_PARAMETRIC_ERROR 100216
-#define GLU_DOMAIN_DISTANCE 100217
-
-/* NurbsTrim */
-#define GLU_MAP1_TRIM_2 100210
-#define GLU_MAP1_TRIM_3 100211
-
-/* QuadricDrawStyle */
-#define GLU_POINT 100010
-#define GLU_LINE 100011
-#define GLU_FILL 100012
-#define GLU_SILHOUETTE 100013
-
-/* QuadricCallback */
-#define GLU_ERROR 100103
-
-/* QuadricNormal */
-#define GLU_SMOOTH 100000
-#define GLU_FLAT 100001
-#define GLU_NONE 100002
-
-/* QuadricOrientation */
-#define GLU_OUTSIDE 100020
-#define GLU_INSIDE 100021
-
-/* TessCallback */
-#define GLU_TESS_BEGIN 100100
-#define GLU_BEGIN 100100
-#define GLU_TESS_VERTEX 100101
-#define GLU_VERTEX 100101
-#define GLU_TESS_END 100102
-#define GLU_END 100102
-#define GLU_TESS_ERROR 100103
-#define GLU_TESS_EDGE_FLAG 100104
-#define GLU_EDGE_FLAG 100104
-#define GLU_TESS_COMBINE 100105
-#define GLU_TESS_BEGIN_DATA 100106
-#define GLU_TESS_VERTEX_DATA 100107
-#define GLU_TESS_END_DATA 100108
-#define GLU_TESS_ERROR_DATA 100109
-#define GLU_TESS_EDGE_FLAG_DATA 100110
-#define GLU_TESS_COMBINE_DATA 100111
-
-/* TessContour */
-#define GLU_CW 100120
-#define GLU_CCW 100121
-#define GLU_INTERIOR 100122
-#define GLU_EXTERIOR 100123
-#define GLU_UNKNOWN 100124
-
-/* TessProperty */
-#define GLU_TESS_WINDING_RULE 100140
-#define GLU_TESS_BOUNDARY_ONLY 100141
-#define GLU_TESS_TOLERANCE 100142
-
-/* TessError */
-#define GLU_TESS_ERROR1 100151
-#define GLU_TESS_ERROR2 100152
-#define GLU_TESS_ERROR3 100153
-#define GLU_TESS_ERROR4 100154
-#define GLU_TESS_ERROR5 100155
-#define GLU_TESS_ERROR6 100156
-#define GLU_TESS_ERROR7 100157
-#define GLU_TESS_ERROR8 100158
-#define GLU_TESS_MISSING_BEGIN_POLYGON 100151
-#define GLU_TESS_MISSING_BEGIN_CONTOUR 100152
-#define GLU_TESS_MISSING_END_POLYGON 100153
-#define GLU_TESS_MISSING_END_CONTOUR 100154
-#define GLU_TESS_COORD_TOO_LARGE 100155
-#define GLU_TESS_NEED_COMBINE_CALLBACK 100156
-
-/* TessWinding */
-#define GLU_TESS_WINDING_ODD 100130
-#define GLU_TESS_WINDING_NONZERO 100131
-#define GLU_TESS_WINDING_POSITIVE 100132
-#define GLU_TESS_WINDING_NEGATIVE 100133
-#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134
-
-/* Obsolete. For compatibility with previous Sun OpenGL versions */
-#define GLU_INCOMPATIBLE_GL_VERSION 100903
-
-
-/*************************************************************/
-
-
-#ifdef __cplusplus
-class GLUnurbs;
-class GLUquadric;
-class GLUtesselator;
-#else
-typedef struct GLUnurbs GLUnurbs;
-typedef struct GLUquadric GLUquadric;
-typedef struct GLUtesselator GLUtesselator;
-#endif
-
-typedef GLUnurbs GLUnurbsObj;
-typedef GLUquadric GLUquadricObj;
-typedef GLUtesselator GLUtesselatorObj;
-typedef GLUtesselator GLUtriangulatorObj;
-
-#define GLU_TESS_MAX_COORD 1.0e150
-
-/* Internal convenience typedefs */
-typedef void (APIENTRY *_GLUfuncptr)();
-
-GLAPI void APIENTRY gluBeginCurve (GLUnurbs* nurb);
-GLAPI void APIENTRY gluBeginPolygon (GLUtesselator* tess);
-GLAPI void APIENTRY gluBeginSurface (GLUnurbs* nurb);
-GLAPI void APIENTRY gluBeginTrim (GLUnurbs* nurb);
-GLAPI GLint APIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
-GLAPI GLint APIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
-GLAPI void APIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
-GLAPI void APIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
-GLAPI void APIENTRY gluDeleteQuadric (GLUquadric* quad);
-GLAPI void APIENTRY gluDeleteTess (GLUtesselator* tess);
-GLAPI void APIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
-GLAPI void APIENTRY gluEndCurve (GLUnurbs* nurb);
-GLAPI void APIENTRY gluEndPolygon (GLUtesselator* tess);
-GLAPI void APIENTRY gluEndSurface (GLUnurbs* nurb);
-GLAPI void APIENTRY gluEndTrim (GLUnurbs* nurb);
-GLAPI const GLubyte * APIENTRY gluErrorString (GLenum error);
-GLAPI const wchar_t * APIENTRY gluErrorUnicodeStringEXT (GLenum error);
-GLAPI void APIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
-GLAPI const GLubyte * APIENTRY gluGetString (GLenum name);
-GLAPI void APIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
-GLAPI void APIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
-GLAPI void APIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
-GLAPI GLUnurbs* APIENTRY gluNewNurbsRenderer (void);
-GLAPI GLUquadric* APIENTRY gluNewQuadric (void);
-GLAPI GLUtesselator* APIENTRY gluNewTess (void);
-GLAPI void APIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
-GLAPI void APIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
-GLAPI void APIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
-GLAPI void APIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
-GLAPI void APIENTRY gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type);
-GLAPI void APIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
-GLAPI void APIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
-GLAPI void APIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
-GLAPI void APIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
-GLAPI GLint APIENTRY gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ);
-GLAPI void APIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
-GLAPI void APIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
-GLAPI void APIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
-GLAPI void APIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
-GLAPI void APIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
-GLAPI void APIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
-GLAPI GLint APIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
-GLAPI void APIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
-GLAPI void APIENTRY gluTessBeginContour (GLUtesselator* tess);
-GLAPI void APIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
-GLAPI void APIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
-GLAPI void APIENTRY gluTessEndContour (GLUtesselator* tess);
-GLAPI void APIENTRY gluTessEndPolygon (GLUtesselator* tess);
-GLAPI void APIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
-GLAPI void APIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
-GLAPI void APIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
-GLAPI GLint APIENTRY gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ);
-GLAPI GLint APIENTRY gluUnProject4 (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW);
-
-#ifdef UNICODE
-#define gluErrorStringWIN gluErrorUnicodeStringEXT
-#else
-#define gluErrorStringWIN gluErrorString
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __glu_h__ */
diff --git a/winsup/w32api/include/accctrl.h b/winsup/w32api/include/accctrl.h
deleted file mode 100644
index 6f96904..0000000
--- a/winsup/w32api/include/accctrl.h
+++ /dev/null
@@ -1,329 +0,0 @@
-#ifndef _ACCCTRL_H
-#define _ACCCTRL_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define AccFree LocalFree
-#define ACTRL_RESERVED 0x00000000
-#define ACTRL_ACCESS_PROTECTED 0x00000001
-#define ACTRL_ACCESS_ALLOWED 0x00000001
-#define ACTRL_ACCESS_DENIED 0x00000002
-#define ACTRL_AUDIT_SUCCESS 0x00000004
-#define ACTRL_AUDIT_FAILURE 0x00000008
-#define ACTRL_SYSTEM_ACCESS 0x04000000
-#define ACTRL_DELETE 0x08000000
-#define ACTRL_READ_CONTROL 0x10000000
-#define ACTRL_CHANGE_ACCESS 0x20000000
-#define ACTRL_CHANGE_OWNER 0x40000000
-#define ACTRL_SYNCHRONIZE 0x80000000
-#define ACTRL_STD_RIGHTS_ALL 0xf8000000
-
-#define ACTRL_FILE_READ 0x00000001
-#define ACTRL_FILE_WRITE 0x00000002
-#define ACTRL_FILE_APPEND 0x00000004
-#define ACTRL_FILE_READ_PROP 0x00000008
-#define ACTRL_FILE_WRITE_PROP 0x00000010
-#define ACTRL_FILE_EXECUTE 0x00000020
-#define ACTRL_FILE_READ_ATTRIB 0x00000080
-#define ACTRL_FILE_WRITE_ATTRIB 0x00000100
-#define ACTRL_FILE_CREATE_PIPE 0x00000200
-#define ACTRL_DIR_LIST 0x00000001
-#define ACTRL_DIR_CREATE_OBJECT 0x00000002
-#define ACTRL_DIR_CREATE_CHILD 0x00000004
-#define ACTRL_DIR_DELETE_CHILD 0x00000040
-#define ACTRL_DIR_TRAVERSE 0x00000020
-#define ACTRL_KERNEL_TERMINATE 0x00000001
-#define ACTRL_KERNEL_THREAD 0x00000002
-#define ACTRL_KERNEL_VM 0x00000004
-#define ACTRL_KERNEL_VM_READ 0x00000008
-#define ACTRL_KERNEL_VM_WRITE 0x00000010
-#define ACTRL_KERNEL_DUP_HANDLE 0x00000020
-#define ACTRL_KERNEL_PROCESS 0x00000040
-#define ACTRL_KERNEL_SET_INFO 0x00000080
-#define ACTRL_KERNEL_GET_INFO 0x00000100
-#define ACTRL_KERNEL_CONTROL 0x00000200
-#define ACTRL_KERNEL_ALERT 0x00000400
-#define ACTRL_KERNEL_GET_CONTEXT 0x00000800
-#define ACTRL_KERNEL_SET_CONTEXT 0x00001000
-#define ACTRL_KERNEL_TOKEN 0x00002000
-#define ACTRL_KERNEL_IMPERSONATE 0x00004000
-#define ACTRL_KERNEL_DIMPERSONATE 0x00008000
-#define ACTRL_PRINT_SADMIN 0x00000001
-#define ACTRL_PRINT_SLIST 0x00000002
-#define ACTRL_PRINT_PADMIN 0x00000004
-#define ACTRL_PRINT_PUSE 0x00000008
-#define ACTRL_PRINT_JADMIN 0x00000010
-#define ACTRL_SVC_GET_INFO 0x00000001
-#define ACTRL_SVC_SET_INFO 0x00000002
-#define ACTRL_SVC_STATUS 0x00000004
-#define ACTRL_SVC_LIST 0x00000008
-#define ACTRL_SVC_START 0x00000010
-#define ACTRL_SVC_STOP 0x00000020
-#define ACTRL_SVC_PAUSE 0x00000040
-#define ACTRL_SVC_INTERROGATE 0x00000080
-#define ACTRL_SVC_UCONTROL 0x00000100
-#define ACTRL_REG_QUERY 0x00000001
-#define ACTRL_REG_SET 0x00000002
-#define ACTRL_REG_CREATE_CHILD 0x00000004
-#define ACTRL_REG_LIST 0x00000008
-#define ACTRL_REG_NOTIFY 0x00000010
-#define ACTRL_REG_LINK 0x00000020
-#define ACTRL_WIN_CLIPBRD 0x00000001
-#define ACTRL_WIN_GLOBAL_ATOMS 0x00000002
-#define ACTRL_WIN_CREATE 0x00000004
-#define ACTRL_WIN_LIST_DESK 0x00000008
-#define ACTRL_WIN_LIST 0x00000010
-#define ACTRL_WIN_READ_ATTRIBS 0x00000020
-#define ACTRL_WIN_WRITE_ATTRIBS 0x00000040
-#define ACTRL_WIN_SCREEN 0x00000080
-#define ACTRL_WIN_EXIT 0x00000100
-#define ACTRL_ACCESS_NO_OPTIONS 0x00000000
-#define ACTRL_ACCESS_SUPPORTS_OBJECT_ENTRIES 0x00000001
-#define ACCCTRL_DEFAULT_PROVIDERA "Windows NT Access Provider"
-#define ACCCTRL_DEFAULT_PROVIDERW L"Windows NT Access Provider"
-#define TRUSTEE_ACCESS_ALLOWED 0x00000001L
-#define TRUSTEE_ACCESS_READ 0x00000002L
-#define TRUSTEE_ACCESS_WRITE 0x00000004L
-#define TRUSTEE_ACCESS_EXPLICIT 0x00000001L
-#define TRUSTEE_ACCESS_READ_WRITE (TRUSTEE_ACCESS_READ | TRUSTEE_ACCESS_WRITE)
-#define TRUSTEE_ACCESS_ALL 0xFFFFFFFFL
-#define NO_INHERITANCE 0x0
-#define SUB_OBJECTS_ONLY_INHERIT 0x1
-#define SUB_CONTAINERS_ONLY_INHERIT 0x2
-#define SUB_CONTAINERS_AND_OBJECTS_INHERIT 0x3
-#define INHERIT_NO_PROPAGATE 0x4
-#define INHERIT_ONLY 0x8
-#define INHERITED_ACCESS_ENTRY 0x10
-#define INHERITED_PARENT 0x10000000
-#define INHERITED_GRANDPARENT 0x20000000
-
-typedef ULONG INHERIT_FLAGS, *PINHERIT_FLAGS;
-typedef ULONG ACCESS_RIGHTS, *PACCESS_RIGHTS;
-
-typedef enum _ACCESS_MODE {
- NOT_USED_ACCESS = 0,
- GRANT_ACCESS,
- SET_ACCESS,
- DENY_ACCESS,
- REVOKE_ACCESS,
- SET_AUDIT_SUCCESS,
- SET_AUDIT_FAILURE
-} ACCESS_MODE;
-typedef enum _SE_OBJECT_TYPE {
- SE_UNKNOWN_OBJECT_TYPE = 0,
- SE_FILE_OBJECT,
- SE_SERVICE,
- SE_PRINTER,
- SE_REGISTRY_KEY,
- SE_LMSHARE,
- SE_KERNEL_OBJECT,
- SE_WINDOW_OBJECT,
- SE_DS_OBJECT,
- SE_DS_OBJECT_ALL,
- SE_PROVIDER_DEFINED_OBJECT,
- SE_WMIGUID_OBJECT,
- SE_REGISTRY_WOW64_32KEY
-} SE_OBJECT_TYPE;
-typedef enum _TRUSTEE_TYPE {
- TRUSTEE_IS_UNKNOWN,
- TRUSTEE_IS_USER,
- TRUSTEE_IS_GROUP,
- TRUSTEE_IS_DOMAIN,
- TRUSTEE_IS_ALIAS,
- TRUSTEE_IS_WELL_KNOWN_GROUP,
- TRUSTEE_IS_DELETED,
- TRUSTEE_IS_INVALID,
- TRUSTEE_IS_COMPUTER
-} TRUSTEE_TYPE;
-typedef enum _TRUSTEE_FORM {
- TRUSTEE_IS_SID,
- TRUSTEE_IS_NAME,
- TRUSTEE_BAD_FORM,
- TRUSTEE_IS_OBJECTS_AND_SID,
- TRUSTEE_IS_OBJECTS_AND_NAME
-} TRUSTEE_FORM;
-typedef enum _MULTIPLE_TRUSTEE_OPERATION {
- NO_MULTIPLE_TRUSTEE,
- TRUSTEE_IS_IMPERSONATE
-} MULTIPLE_TRUSTEE_OPERATION;
-typedef struct _TRUSTEE_A {
- struct _TRUSTEE_A *pMultipleTrustee;
- MULTIPLE_TRUSTEE_OPERATION MultipleTrusteeOperation;
- TRUSTEE_FORM TrusteeForm;
- TRUSTEE_TYPE TrusteeType;
- LPSTR ptstrName;
-} TRUSTEE_A, *PTRUSTEE_A, TRUSTEEA, *PTRUSTEEA;
-typedef struct _TRUSTEE_W {
- struct _TRUSTEE_W *pMultipleTrustee;
- MULTIPLE_TRUSTEE_OPERATION MultipleTrusteeOperation;
- TRUSTEE_FORM TrusteeForm;
- TRUSTEE_TYPE TrusteeType;
- LPWSTR ptstrName;
-} TRUSTEE_W, *PTRUSTEE_W, TRUSTEEW, *PTRUSTEEW;
-typedef struct _ACTRL_ACCESS_ENTRYA {
- TRUSTEE_A Trustee;
- ULONG fAccessFlags;
- ACCESS_RIGHTS Access;
- ACCESS_RIGHTS ProvSpecificAccess;
- INHERIT_FLAGS Inheritance;
- LPCSTR lpInheritProperty;
-} ACTRL_ACCESS_ENTRYA, *PACTRL_ACCESS_ENTRYA;
-typedef struct _ACTRL_ACCESS_ENTRYW {
- TRUSTEE_W Trustee;
- ULONG fAccessFlags;
- ACCESS_RIGHTS Access;
- ACCESS_RIGHTS ProvSpecificAccess;
- INHERIT_FLAGS Inheritance;
- LPCWSTR lpInheritProperty;
-} ACTRL_ACCESS_ENTRYW, *PACTRL_ACCESS_ENTRYW;
-typedef struct _ACTRL_ACCESS_ENTRY_LISTA {
- ULONG cEntries;
- ACTRL_ACCESS_ENTRYA *pAccessList;
-} ACTRL_ACCESS_ENTRY_LISTA, *PACTRL_ACCESS_ENTRY_LISTA;
-typedef struct _ACTRL_ACCESS_ENTRY_LISTW {
- ULONG cEntries;
- ACTRL_ACCESS_ENTRYW *pAccessList;
-} ACTRL_ACCESS_ENTRY_LISTW, *PACTRL_ACCESS_ENTRY_LISTW;
-typedef struct _ACTRL_PROPERTY_ENTRYA {
- LPCSTR lpProperty;
- PACTRL_ACCESS_ENTRY_LISTA pAccessEntryList;
- ULONG fListFlags;
-} ACTRL_PROPERTY_ENTRYA, *PACTRL_PROPERTY_ENTRYA;
-typedef struct _ACTRL_PROPERTY_ENTRYW {
- LPCWSTR lpProperty;
- PACTRL_ACCESS_ENTRY_LISTW pAccessEntryList;
- ULONG fListFlags;
-} ACTRL_PROPERTY_ENTRYW, *PACTRL_PROPERTY_ENTRYW;
-typedef struct _ACTRL_ALISTA {
- ULONG cEntries;
- PACTRL_PROPERTY_ENTRYA pPropertyAccessList;
-} ACTRL_ACCESSA, *PACTRL_ACCESSA, ACTRL_AUDITA, *PACTRL_AUDITA;
-typedef struct _ACTRL_ALISTW {
- ULONG cEntries;
- PACTRL_PROPERTY_ENTRYW pPropertyAccessList;
-} ACTRL_ACCESSW, *PACTRL_ACCESSW, ACTRL_AUDITW, *PACTRL_AUDITW;
-typedef struct _TRUSTEE_ACCESSA {
- LPSTR lpProperty;
- ACCESS_RIGHTS Access;
- ULONG fAccessFlags;
- ULONG fReturnedAccess;
-} TRUSTEE_ACCESSA, *PTRUSTEE_ACCESSA;
-typedef struct _TRUSTEE_ACCESSW {
- LPWSTR lpProperty;
- ACCESS_RIGHTS Access;
- ULONG fAccessFlags;
- ULONG fReturnedAccess;
-} TRUSTEE_ACCESSW, *PTRUSTEE_ACCESSW;
-typedef struct _ACTRL_OVERLAPPED {
- _ANONYMOUS_UNION
- union {
- PVOID Provider;
- ULONG Reserved1;
- } DUMMYUNIONNAME;
- ULONG Reserved2;
- HANDLE hEvent;
-} ACTRL_OVERLAPPED, *PACTRL_OVERLAPPED;
-typedef struct _ACTRL_ACCESS_INFOA {
- ULONG fAccessPermission;
- LPSTR lpAccessPermissionName;
-} ACTRL_ACCESS_INFOA, *PACTRL_ACCESS_INFOA;
-typedef struct _ACTRL_ACCESS_INFOW {
- ULONG fAccessPermission;
- LPWSTR lpAccessPermissionName;
-} ACTRL_ACCESS_INFOW, *PACTRL_ACCESS_INFOW;
-typedef struct _ACTRL_CONTROL_INFOA {
- LPSTR lpControlId;
- LPSTR lpControlName;
-} ACTRL_CONTROL_INFOA, *PACTRL_CONTROL_INFOA;
-typedef struct _ACTRL_CONTROL_INFOW {
- LPWSTR lpControlId;
- LPWSTR lpControlName;
-} ACTRL_CONTROL_INFOW, *PACTRL_CONTROL_INFOW;
-typedef struct _EXPLICIT_ACCESS_A {
- DWORD grfAccessPermissions;
- ACCESS_MODE grfAccessMode;
- DWORD grfInheritance;
- TRUSTEE_A Trustee;
-} EXPLICIT_ACCESS_A, *PEXPLICIT_ACCESS_A, EXPLICIT_ACCESSA, *PEXPLICIT_ACCESSA;
-typedef struct _EXPLICIT_ACCESS_W {
- DWORD grfAccessPermissions;
- ACCESS_MODE grfAccessMode;
- DWORD grfInheritance;
- TRUSTEE_W Trustee;
-} EXPLICIT_ACCESS_W, *PEXPLICIT_ACCESS_W, EXPLICIT_ACCESSW, *PEXPLICIT_ACCESSW;
-typedef struct _OBJECTS_AND_SID {
- DWORD ObjectsPresent;
- GUID ObjectTypeGuid;
- GUID InheritedObjectTypeGuid;
- SID * pSid;
-} OBJECTS_AND_SID, *POBJECTS_AND_SID;
-typedef struct _OBJECTS_AND_NAME_A {
- DWORD ObjectsPresent;
- SE_OBJECT_TYPE ObjectType;
- LPSTR ObjectTypeName;
- LPSTR InheritedObjectTypeName;
- LPSTR ptstrName;
-} OBJECTS_AND_NAME_A, *POBJECTS_AND_NAME_A;
-typedef struct _OBJECTS_AND_NAME_W {
- DWORD ObjectsPresent;
- SE_OBJECT_TYPE ObjectType;
- LPWSTR ObjectTypeName;
- LPWSTR InheritedObjectTypeName;
- LPWSTR ptstrName;
-} OBJECTS_AND_NAME_W, *POBJECTS_AND_NAME_W;
-#if (_WIN32_WINNT >= 0x0501)
-typedef struct {
- LONG GenerationGap;
- LPSTR AncestorName;
-} INHERITED_FROMA, *PINHERITED_FROMA;
-typedef struct {
- LONG GenerationGap;
- LPWSTR AncestorName;
-} INHERITED_FROMW, *PINHERITED_FROMW;
-#endif /* (_WIN32_WINNT >= 0x0501) */
-
-#ifdef UNICODE
-#define ACCCTRL_DEFAULT_PROVIDER ACCCTRL_DEFAULT_PROVIDERW
-typedef TRUSTEE_W TRUSTEE_, *PTRUSTEE_;
-typedef TRUSTEEW TRUSTEE, *PTRUSTEE;
-typedef ACTRL_ACCESSW ACTRL_ACCESS, *PACTRL_ACCESS;
-typedef ACTRL_ACCESS_ENTRY_LISTW ACTRL_ACCESS_ENTRY_LIST, *PACTRL_ACCESS_ENTRY_LIST;
-typedef ACTRL_ACCESS_INFOW ACTRL_ACCESS_INFO, *PACTRL_ACCESS_INFO;
-typedef ACTRL_ACCESS_ENTRYW ACTRL_ACCESS_ENTRY, *PACTRL_ACCESS_ENTRY;
-typedef ACTRL_AUDITW ACTRL_AUDIT, *PACTRL_AUDIT;
-typedef ACTRL_CONTROL_INFOW ACTRL_CONTROL_INFO, *PACTRL_CONTROL_INFO;
-typedef EXPLICIT_ACCESS_W EXPLICIT_ACCESS_, *PEXPLICIT_ACCESS_;
-typedef EXPLICIT_ACCESSW EXPLICIT_ACCESS, *PEXPLICIT_ACCESS;
-typedef TRUSTEE_ACCESSW TRUSTEE_ACCESS, *PTRUSTEE_ACCESS;
-typedef OBJECTS_AND_NAME_W OBJECTS_AND_NAME_, *POBJECTS_AND_NAME_;
-#if (_WIN32_WINNT >= 0x0501)
-typedef INHERITED_FROMW INHERITED_FROM, *PINHERITED_FROM;
-#endif
-#else
-#define ACCCTRL_DEFAULT_PROVIDER ACCCTRL_DEFAULT_PROVIDERA
-typedef TRUSTEE_A TRUSTEE_, *PTRUSTEE_;
-typedef TRUSTEEA TRUSTEE, *PTRUSTEE;
-typedef ACTRL_ACCESSA ACTRL_ACCESS, *PACTRL_ACCESS;
-typedef ACTRL_ACCESS_ENTRY_LISTA ACTRL_ACCESS_ENTRY_LIST, *PACTRL_ACCESS_ENTRY_LIST;
-typedef ACTRL_ACCESS_INFOA ACTRL_ACCESS_INFO, *PACTRL_ACCESS_INFO;
-typedef ACTRL_ACCESS_ENTRYA ACTRL_ACCESS_ENTRY, *PACTRL_ACCESS_ENTRY;
-typedef ACTRL_AUDITA ACTRL_AUDIT, *PACTRL_AUDIT;
-typedef ACTRL_CONTROL_INFOA ACTRL_CONTROL_INFO, *PACTRL_CONTROL_INFO;
-typedef EXPLICIT_ACCESS_A EXPLICIT_ACCESS_, *PEXPLICIT_ACCESS_;
-typedef EXPLICIT_ACCESSA EXPLICIT_ACCESS, *PEXPLICIT_ACCESS;
-typedef TRUSTEE_ACCESSA TRUSTEE_ACCESS, *PTRUSTEE_ACCESS;
-typedef OBJECTS_AND_NAME_A OBJECTS_AND_NAME_, *POBJECTS_AND_NAME_;
-#if (_WIN32_WINNT >= 0x0501)
-typedef INHERITED_FROMA INHERITED_FROM, *PINHERITED_FROM;
-#endif
-#endif /* UNICODE */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/aclapi.h b/winsup/w32api/include/aclapi.h
deleted file mode 100644
index abd26a2..0000000
--- a/winsup/w32api/include/aclapi.h
+++ /dev/null
@@ -1,117 +0,0 @@
-#ifndef _ACLAPI_H
-#define _ACLAPI_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#include <windows.h>
-#include <accctrl.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-WINADVAPI VOID WINAPI BuildExplicitAccessWithNameA(PEXPLICIT_ACCESS_A,LPSTR,DWORD,ACCESS_MODE,DWORD);
-WINADVAPI VOID WINAPI BuildExplicitAccessWithNameW(PEXPLICIT_ACCESS_W,LPWSTR,DWORD,ACCESS_MODE,DWORD);
-WINADVAPI DWORD WINAPI BuildSecurityDescriptorA(PTRUSTEE_A,PTRUSTEE_A ,ULONG,PEXPLICIT_ACCESS_A,
- ULONG,PEXPLICIT_ACCESS_A,PSECURITY_DESCRIPTOR,PULONG,PSECURITY_DESCRIPTOR*);
-WINADVAPI DWORD WINAPI BuildSecurityDescriptorW(PTRUSTEE_W,PTRUSTEE_W ,ULONG,PEXPLICIT_ACCESS_W,
- ULONG,PEXPLICIT_ACCESS_W,PSECURITY_DESCRIPTOR,PULONG,PSECURITY_DESCRIPTOR*);
-WINADVAPI VOID WINAPI BuildTrusteeWithNameA(PTRUSTEE_A,LPSTR);
-WINADVAPI VOID WINAPI BuildTrusteeWithNameW(PTRUSTEE_W,LPWSTR);
-WINADVAPI VOID WINAPI BuildTrusteeWithObjectsAndNameA(PTRUSTEE_A,POBJECTS_AND_NAME_A,SE_OBJECT_TYPE,
- LPSTR,LPSTR,LPSTR);
-WINADVAPI VOID WINAPI BuildTrusteeWithObjectsAndNameW(PTRUSTEE_W,POBJECTS_AND_NAME_W,SE_OBJECT_TYPE,
- LPWSTR,LPWSTR,LPWSTR);
-WINADVAPI VOID WINAPI BuildTrusteeWithObjectsAndSidA(PTRUSTEE_A,POBJECTS_AND_SID,GUID*,GUID*,PSID);
-WINADVAPI VOID WINAPI BuildTrusteeWithObjectsAndSidW(PTRUSTEE_W,POBJECTS_AND_SID,GUID*,GUID*,PSID);
-WINADVAPI VOID WINAPI BuildTrusteeWithSidA(PTRUSTEE_A,PSID);
-WINADVAPI VOID WINAPI BuildTrusteeWithSidW(PTRUSTEE_W,PSID);
-WINADVAPI DWORD WINAPI GetAuditedPermissionsFromAclA(PACL,PTRUSTEE_A,PACCESS_MASK,PACCESS_MASK);
-WINADVAPI DWORD WINAPI GetAuditedPermissionsFromAclW(PACL,PTRUSTEE_W,PACCESS_MASK,PACCESS_MASK);
-WINADVAPI DWORD WINAPI GetEffectiveRightsFromAclA(PACL,PTRUSTEE_A,PACCESS_MASK);
-WINADVAPI DWORD WINAPI GetEffectiveRightsFromAclW(PACL,PTRUSTEE_W,PACCESS_MASK);
-WINADVAPI DWORD WINAPI GetExplicitEntriesFromAclA(PACL,PULONG,PEXPLICIT_ACCESS_A*);
-WINADVAPI DWORD WINAPI GetExplicitEntriesFromAclW(PACL,PULONG,PEXPLICIT_ACCESS_W*);
-#if (_WIN32_WINNT >= 0x0501)
-WINADVAPI DWORD WINAPI GetInheritanceSourceA(LPSTR,SE_OBJECT_TYPE,SECURITY_INFORMATION,BOOL,GUID**,DWORD,PACL,void*,PGENERIC_MAPPING,PINHERITED_FROMA);
-WINADVAPI DWORD WINAPI GetInheritanceSourceW(LPWSTR,SE_OBJECT_TYPE,SECURITY_INFORMATION,BOOL,GUID**,DWORD,PACL,void*,PGENERIC_MAPPING,PINHERITED_FROMW);
-#endif
-WINADVAPI DWORD WINAPI GetNamedSecurityInfoA(LPSTR,SE_OBJECT_TYPE,SECURITY_INFORMATION,
- PSID*,PSID*,PACL*,PACL*,PSECURITY_DESCRIPTOR*);
-WINADVAPI DWORD WINAPI GetNamedSecurityInfoW(LPWSTR,SE_OBJECT_TYPE,SECURITY_INFORMATION,
- PSID*,PSID*,PACL*,PACL*,PSECURITY_DESCRIPTOR*);
-WINADVAPI DWORD WINAPI GetSecurityInfo(HANDLE,SE_OBJECT_TYPE,SECURITY_INFORMATION,
- PSID*,PSID*,PACL*,PACL*,PSECURITY_DESCRIPTOR*);
-WINADVAPI TRUSTEE_FORM WINAPI GetTrusteeFormA(PTRUSTEE_A);
-WINADVAPI TRUSTEE_FORM WINAPI GetTrusteeFormW(PTRUSTEE_W);
-WINADVAPI LPSTR WINAPI GetTrusteeNameA(PTRUSTEE_A);
-WINADVAPI LPWSTR WINAPI GetTrusteeNameW(PTRUSTEE_W);
-WINADVAPI TRUSTEE_TYPE WINAPI GetTrusteeTypeA(PTRUSTEE_A);
-WINADVAPI TRUSTEE_TYPE WINAPI GetTrusteeTypeW(PTRUSTEE_W);
-WINADVAPI DWORD WINAPI LookupSecurityDescriptorPartsA(PTRUSTEE_A*,PTRUSTEE_A*,PULONG,PEXPLICIT_ACCESS_A*,
- PULONG,PEXPLICIT_ACCESS_A*,PSECURITY_DESCRIPTOR);
-WINADVAPI DWORD WINAPI LookupSecurityDescriptorPartsW(PTRUSTEE_W*,PTRUSTEE_W*,PULONG,PEXPLICIT_ACCESS_W*,
- PULONG,PEXPLICIT_ACCESS_W*,PSECURITY_DESCRIPTOR);
-WINADVAPI DWORD WINAPI SetEntriesInAclA(ULONG,PEXPLICIT_ACCESS_A,PACL,PACL*);
-WINADVAPI DWORD WINAPI SetEntriesInAclW(ULONG,PEXPLICIT_ACCESS_W,PACL,PACL*);
-WINADVAPI DWORD WINAPI SetNamedSecurityInfoA(LPSTR,SE_OBJECT_TYPE,SECURITY_INFORMATION,PSID,PSID,PACL,PACL);
-WINADVAPI DWORD WINAPI SetNamedSecurityInfoW(LPWSTR,SE_OBJECT_TYPE,SECURITY_INFORMATION,PSID,PSID,PACL,PACL);
-WINADVAPI DWORD WINAPI SetSecurityInfo(HANDLE,SE_OBJECT_TYPE,SECURITY_INFORMATION,PSID,PSID,PACL,PACL);
-WINADVAPI VOID WINAPI BuildImpersonateExplicitAccessWithNameA(PEXPLICIT_ACCESS_A,LPSTR,PTRUSTEE_A,DWORD,ACCESS_MODE,DWORD);
-WINADVAPI VOID WINAPI BuildImpersonateExplicitAccessWithNameW(PEXPLICIT_ACCESS_W,LPWSTR,PTRUSTEE_W,DWORD,ACCESS_MODE,DWORD);
-WINADVAPI VOID WINAPI BuildImpersonateTrusteeA(PTRUSTEE_A,PTRUSTEE_A);
-WINADVAPI VOID WINAPI BuildImpersonateTrusteeW(PTRUSTEE_W,PTRUSTEE_W);
-WINADVAPI PTRUSTEE_A WINAPI GetMultipleTrusteeA(PTRUSTEE_A);
-WINADVAPI PTRUSTEE_W WINAPI GetMultipleTrusteeW(PTRUSTEE_W);
-WINADVAPI MULTIPLE_TRUSTEE_OPERATION WINAPI GetMultipleTrusteeOperationA(PTRUSTEE_A);
-WINADVAPI MULTIPLE_TRUSTEE_OPERATION WINAPI GetMultipleTrusteeOperationW(PTRUSTEE_W);
-
-#ifdef UNICODE
-#define BuildExplicitAccessWithName BuildExplicitAccessWithNameW
-#define BuildSecurityDescriptor BuildSecurityDescriptorW
-#define BuildTrusteeWithName BuildTrusteeWithNameW
-#define BuildTrusteeWithObjectsAndName BuildTrusteeWithObjectsAndNameW
-#define BuildTrusteeWithObjectsAndSid BuildTrusteeWithObjectsAndSidW
-#define BuildTrusteeWithSid BuildTrusteeWithSidW
-#define GetAuditedPermissionsFromAcl GetAuditedPermissionsFromAclW
-#define GetEffectiveRightsFromAcl GetEffectiveRightsFromAclW
-#define GetExplicitEntriesFromAcl GetExplicitEntriesFromAclW
-#define GetNamedSecurityInfo GetNamedSecurityInfoW
-#define GetTrusteeForm GetTrusteeFormW
-#define GetTrusteeName GetTrusteeNameW
-#define GetTrusteeType GetTrusteeTypeW
-#define LookupSecurityDescriptorParts LookupSecurityDescriptorPartsW
-#define SetEntriesInAcl SetEntriesInAclW
-#define SetNamedSecurityInfo SetNamedSecurityInfoW
-#define BuildImpersonateExplicitAccessWithName BuildImpersonateExplicitAccessWithNameW
-#define BuildImpersonateTrustee BuildImpersonateTrusteeW
-#define GetMultipleTrustee GetMultipleTrusteeW
-#define GetMultipleTrusteeOperation GetMultipleTrusteeOperationW
-#else
-#define BuildExplicitAccessWithName BuildExplicitAccessWithNameA
-#define BuildSecurityDescriptor BuildSecurityDescriptorA
-#define BuildTrusteeWithName BuildTrusteeWithNameA
-#define BuildTrusteeWithObjectsAndName BuildTrusteeWithObjectsAndNameA
-#define BuildTrusteeWithObjectsAndSid BuildTrusteeWithObjectsAndSidA
-#define BuildTrusteeWithSid BuildTrusteeWithSidA
-#define GetAuditedPermissionsFromAcl GetAuditedPermissionsFromAclA
-#define GetEffectiveRightsFromAcl GetEffectiveRightsFromAclA
-#define GetExplicitEntriesFromAcl GetExplicitEntriesFromAclA
-#define GetNamedSecurityInfo GetNamedSecurityInfoA
-#define GetTrusteeForm GetTrusteeFormA
-#define GetTrusteeName GetTrusteeNameA
-#define GetTrusteeType GetTrusteeTypeA
-#define LookupSecurityDescriptorParts LookupSecurityDescriptorPartsA
-#define SetEntriesInAcl SetEntriesInAclA
-#define SetNamedSecurityInfo SetNamedSecurityInfoA
-#define BuildImpersonateExplicitAccessWithName BuildImpersonateExplicitAccessWithNameA
-#define BuildImpersonateTrustee BuildImpersonateTrusteeA
-#define GetMultipleTrustee GetMultipleTrusteeA
-#define GetMultipleTrusteeOperation GetMultipleTrusteeOperationA
-#endif /* UNICODE */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/aclui.h b/winsup/w32api/include/aclui.h
deleted file mode 100644
index 144711f..0000000
--- a/winsup/w32api/include/aclui.h
+++ /dev/null
@@ -1,134 +0,0 @@
-#ifndef _ACLUI_H
-#define _ACLUI_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifndef _OBJC_NO_COM
-#include <objbase.h>
-#include <commctrl.h>
-#include <accctrl.h>
-#endif
-
-#if !defined(_ACLUI_)
-#define ACLUIAPI DECLSPEC_IMPORT WINAPI
-#else
-#define ACLUIAPI WINAPI
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct _SI_OBJECT_INFO
-{
- DWORD dwFlags;
- HINSTANCE hInstance;
- LPWSTR pszServerName;
- LPWSTR pszObjectName;
- LPWSTR pszPageTitle;
- GUID guidObjectType;
-} SI_OBJECT_INFO, *PSI_OBJECT_INFO;
-
-/* values for SI_OBJECT_INFO.dwFlags */
-#define SI_EDIT_PERMS 0x00000000L
-#define SI_EDIT_OWNER 0x00000001L
-#define SI_EDIT_AUDITS 0x00000002L
-#define SI_CONTAINER 0x00000004L
-#define SI_READONLY 0x00000008L
-#define SI_ADVANCED 0x00000010L
-#define SI_RESET 0x00000020L
-#define SI_OWNER_READONLY 0x00000040L
-#define SI_EDIT_PROPERTIES 0x00000080L
-#define SI_OWNER_RECURSE 0x00000100L
-#define SI_NO_ACL_PROTECT 0x00000200L
-#define SI_NO_TREE_APPLY 0x00000400L
-#define SI_PAGE_TITLE 0x00000800L
-#define SI_SERVER_IS_DC 0x00001000L
-#define SI_RESET_DACL_TREE 0x00004000L
-#define SI_RESET_SACL_TREE 0x00008000L
-#define SI_OBJECT_GUID 0x00010000L
-#define SI_EDIT_EFFECTIVE 0x00020000L
-#define SI_RESET_DACL 0x00040000L
-#define SI_RESET_SACL 0x00080000L
-#define SI_RESET_OWNER 0x00100000L
-#define SI_NO_ADDITIONAL_PERMISSION 0x00200000L
-#define SI_MAY_WRITE 0x10000000L
-
-#define SI_EDIT_ALL (SI_EDIT_PERMS | SI_EDIT_OWNER | SI_EDIT_AUDITS)
-
-
-typedef struct _SI_ACCESS
-{
- const GUID* pguid;
- ACCESS_MASK mask;
- LPCWSTR pszName;
- DWORD dwFlags;
-} SI_ACCESS, *PSI_ACCESS;
-
-/* values for SI_ACCESS.dwFlags */
-#define SI_ACCESS_SPECIFIC 0x00010000L
-#define SI_ACCESS_GENERAL 0x00020000L
-#define SI_ACCESS_CONTAINER 0x00040000L
-#define SI_ACCESS_PROPERTY 0x00080000L
-
-
-typedef struct _SI_INHERIT_TYPE
-{
- const GUID* pguid;
- ULONG dwFlags;
- LPCWSTR pszName;
-} SI_INHERIT_TYPE, *PSI_INHERIT_TYPE;
-
-/* values for SI_INHERIT_TYPE.dwFlags
- INHERIT_ONLY_ACE, CONTAINER_INHERIT_ACE, OBJECT_INHERIT_ACE
- defined elsewhere */
-
-
-typedef enum _SI_PAGE_TYPE
-{
- SI_PAGE_PERM = 0,
- SI_PAGE_ADVPERM,
- SI_PAGE_AUDIT,
- SI_PAGE_OWNER
-} SI_PAGE_TYPE;
-
-
-#define PSPCB_SI_INITDIALOG (WM_USER + 1)
-
-#ifndef __ISecurityInformation_INTERFACE_DEFINED__
-#define __ISecurityInformation_INTERFACE_DEFINED__
-#define INTERFACE ISecurityInformation
-DECLARE_INTERFACE_(ISecurityInformation, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
-
- STDMETHOD(GetObjectInformation)(THIS_ PSI_OBJECT_INFO) PURE;
- STDMETHOD(GetSecurity)(THIS_ SECURITY_INFORMATION,PSECURITY_DESCRIPTOR*,BOOL) PURE;
- STDMETHOD(SetSecurity)(THIS_ SECURITY_INFORMATION,PSECURITY_DESCRIPTOR) PURE;
- STDMETHOD(GetAccessRights)(THIS_ const GUID*,DWORD,PSI_ACCESS*,ULONG*,ULONG*) PURE;
- STDMETHOD(MapGeneric)(THIS_ const GUID*,UCHAR*,ACCESS_MASK*) PURE;
- STDMETHOD(GetInheritTypes)(THIS_ PSI_INHERIT_TYPE*,ULONG*) PURE;
- STDMETHOD(PropertySheetPageCallback)(THIS_ HWND,UINT,SI_PAGE_TYPE) PURE;
-};
-#undef INTERFACE
-typedef ISecurityInformation *LPSECURITYINFO;
-#endif
-
-/*
- * TODO: ISecurityInformation2, IEffectivePermission, ISecurityObjectTypeInfo
- */
-
-extern DECLSPEC_IMPORT const IID IID_ISecurityInformation;
-
-
-HPROPSHEETPAGE ACLUIAPI CreateSecurityPage(LPSECURITYINFO psi);
-BOOL ACLUIAPI EditSecurity(HWND hwndOwner, LPSECURITYINFO psi);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/winsup/w32api/include/adsprop.h b/winsup/w32api/include/adsprop.h
deleted file mode 100644
index 8036b76..0000000
--- a/winsup/w32api/include/adsprop.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * adsprop.h - Active Directory
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may use,
- * modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-#ifndef _ADSPROP_H
-#define _ADSPROP_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- Active Directory Reference - Active Directory Messages */
-#define WM_ADSPROP_NOTIFY_APPLY (WM_USER+1104)
-#define WM_ADSPROP_NOTIFY_CHANGE (WM_USER+1103)
-#define WM_ADSPROP_NOTIFY_ERROR (WM_USER+1110)
-#define WM_ADSPROP_NOTIFY_EXIT (WM_USER+1107)
-#define WM_ADSPROP_NOTIFY_FOREGROUND (WM_USER+1106)
-#define WM_ADSPROP_NOTIFY_PAGEHWND (WM_USER+1102)
-#define WM_ADSPROP_NOTIFY_PAGEINIT (WM_USER+1101)
-#define WM_ADSPROP_NOTIFY_SETFOCUS (WM_USER+1105)
-/*--- Active Directory Reference - Active Directory Structures - Active Directory MMC Property Page Structures */
-#if (_WIN32_WINNT >= 0x0501)
-typedef struct {
- HWND hwndPage;
- PWSTR pszPageTitle;
- PWSTR pszObjPath;
- PWSTR pszObjClass;
- HRESULT hr;
- PWSTR pszError;
-} ADSPROPERROR,*PADSPROPERROR;
-#endif /* (_WIN32_WINNT >= 0x0501) */
-#if (_WIN32_WINNT >= 0x0500)
-typedef struct {
- DWORD dwSize;
- DWORD dwFlags;
- HRESULT hr;
- IDirectoryObject *pDsObj;
- LPWSTR pwzCN;
- PADS_ATTR_INFO pWritableAttrs;
-} ADSPROPINITPARAMS,*PADSPROPINITPARAMS;
-#endif /* (_WIN32_WINNT >= 0x0500) */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/afxres.h b/winsup/w32api/include/afxres.h
deleted file mode 100644
index 91e7f49..0000000
--- a/winsup/w32api/include/afxres.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef _AFXRES_H
-#define _AFXRES_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _WINDOWS_H
-#include <windows.h>
-#endif
-
-/* IDC_STATIC is documented in winuser.h, but not defined. */
-#ifndef IDC_STATIC
-#define IDC_STATIC (-1)
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/amaudio.h b/winsup/w32api/include/amaudio.h
deleted file mode 100644
index 94e23ac..0000000
--- a/winsup/w32api/include/amaudio.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef _AMAUDIO_H
-#define _AMAUDIO_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#include <dsound.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define INTERFACE IAMDirectSound
-DECLARE_INTERFACE_(IAMDirectSound, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetDirectSoundInterface)(THIS_ LPDIRECTSOUND*) PURE;
- STDMETHOD(GetPrimaryBufferInterface)(THIS_ LPDIRECTSOUNDBUFFER*) PURE;
- STDMETHOD(GetSecondaryBufferInterface)(THIS_ LPDIRECTSOUNDBUFFER*) PURE;
- STDMETHOD(GetFocusWindow)(THIS_ HWND*,BOOL*) PURE ;
- STDMETHOD(ReleaseDirectSoundInterface)(THIS_ LPDIRECTSOUND) PURE;
- STDMETHOD(ReleasePrimaryBufferInterface)(THIS_ LPDIRECTSOUNDBUFFER) PURE;
- STDMETHOD(ReleaseSecondaryBufferInterface)(THIS_ LPDIRECTSOUNDBUFFER) PURE;
- STDMETHOD(SetFocusWindow)(THIS_ HWND,BOOL) PURE ;
-};
-#undef INTERFACE
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/amvideo.h b/winsup/w32api/include/amvideo.h
deleted file mode 100644
index 10e8e60..0000000
--- a/winsup/w32api/include/amvideo.h
+++ /dev/null
@@ -1,179 +0,0 @@
-#ifndef _AMVIDEO_H
-#define _AMVIDEO_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#include <ddraw.h>
-#include <strmif.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define AMDDS_NONE 0x0000
-#define AMDDS_DCIPS 0x0001
-#define AMDDS_PS 0x0002
-#define AMDDS_RGBOVR 0x0004
-#define AMDDS_YUVOVR 0x0008
-#define AMDDS_RGBOFF 0x0010
-#define AMDDS_YUVOFF 0x0020
-#define AMDDS_RGBFLP 0x0040
-#define AMDDS_YUVFLP 0x0080
-#define AMDDS_ ALL 0x00FF
-#define AMDDS_DEFAULT 0x00FF
-#define AMDDS_YUV (AMDDS_YUVOFF|AMDDS_YUVOVR|AMDDS_YUVFLP)
-#define AMDDS_RGB (AMDDS_RGBOFF|AMDDS_RGBOVR|AMDDS_RGBFLP)
-#define AMDDS_PRIMARY (AMDDS_DCIPS|AMDDS_PS)
-#define BIT_MASKS_MATCH(pbmi1,pbmi2) ((pbmi1)->dwBitMasks[0] == (pbmi2)->dwBitMasks[0] && (pbmi1)->dwBitMasks[1] == (pbmi2)->dwBitMasks[1] && (pbmi1)->dwBitMasks[2] == (pbmi2)->dwBitMasks[2])
-#define PALETTISED(pbmi) ((pbmi)->bmiHeader.biBitCount <= 8)
-#define PALETTE_ENTRIES(pbmi) (1 << (pbmi)->bmiHeader.biBitCount)
-#define RESET_MASKS(pbmi) (ZeroMemory((PVOID)(pbmi)->dwBitFields,3*sizeof(DWORD)))
-#define RESET_PALETTE(pbmi) (ZeroMemory((PVOID)(pbmi)->bmiColors,256*sizeof(RGBQUAD)));
-#define SIZE_EGA_PALETTE (16*sizeof(RGBQUAD))
-#define SIZE_MASKS (3*sizeof(DWORD))
-#define SIZE_PALETTE (256*sizeof(RGBQUAD))
-typedef enum {
- AM_PROPERTY_FRAMESTEP_STEP = 1,
- AM_PROPERTY_FRAMESTEP_CANCEL = 2,
- AM_PROPERTY_FRAMESTEP_CANSTEP = 3,
- AM_PROPERTY_FRAMESTEP_CANSTEPMULTIPLE = 4
-} AM_PROPERTY_FRAMESTEP;
-typedef struct tag_TRUECOLORINFO {
- DWORD dwBitMasks[3];
- RGBQUAD bmiColors[256];
-} TRUECOLORINFO;
-typedef struct tagVIDEOINFOHEADER {
- RECT rcSource;
- RECT rcTarget;
- DWORD dwBitRate;
- DWORD dwBitErrorRate;
- REFERENCE_TIME AvgTimePerFrame;
- BITMAPINFOHEADER bmiHeader;
-} VIDEOINFOHEADER;
-typedef struct tagVIDEOINFO {
- RECT rcSource,
- RECT rcTarget,
- DWORD dwBitRate,
- DWORD dwBitErrorRate,
- REFERENCE_TIME AvgTimePerFrame;
- BITMAPINFOHEADER bmiHeader;
- union {
- RGBQUAD bmiColors[256];
- DWORD dwBitMasks[3];
- TRUECOLORINFO TrueColorInfo;
- };
-} VIDEOINFO;
-typedef struct tagMPEG1VIDEOINFO {
- VIDEOINFOHEADER hdr;
- DWORD dwStartTimeCode;
- DWORD cbSequenceHeader;
- BYTE bSequenceHeader[1];
-} MPEG1VIDEOINFO;
-typedef struct tagAnalogVideoInfo {
- RECT rcSource;
- RECT rcTarget;
- DWORD dwActiveWidth;
- DWORD dwActiveHeight;
- REFERENCE_TIME AvgTimePerFrame;
-} ANALOGVIDEOINFO;
-typedef struct _AM_FRAMESTEP_STEP {
- DWORD dwFramesToStep;
-} AM_FRAMESTEP_STEP;
-#define INTERFACE IDirectDrawVideo
-DECLARE_INTERFACE_(IDirectDrawVideo, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(CanUseOverlayStretch)(THIS_ long*) PURE;
- STDMETHOD(CanUseScanLine)(THIS_ long*) PURE;
- STDMETHOD(GetCaps)(THIS_ DDCAPS*) PURE;
- STDMETHOD(GetDirectDraw)(THIS_ LPDIRECTDRAW*) PURE;
- STDMETHOD(GetEmulatedCaps)(THIS_ DDCAPS*) PURE;
- STDMETHOD(GetFourCCCodes)(THIS_ DWORD*,DWORD*) PURE;
- STDMETHOD(GetSurfaceDesc)(THIS_ DDSURFACEDESC*) PURE;
- STDMETHOD(GetSurfaceType)(THIS_ DWORD*) PURE;
- STDMETHOD(GetSwitches)(THIS_ DWORD*) PURE;
- STDMETHOD(SetDefault)(THIS) PURE;
- STDMETHOD(SetDirectDraw)(THIS_ LPDIRECTDRAW) PURE;
- STDMETHOD(SetSwitches)(THIS_ DWORD) PURE;
- STDMETHOD(UseOverlayStretch)(THIS_ long) PURE;
- STDMETHOD(UseScanLine)(THIS_ long) PURE;
- STDMETHOD(UseWhenFullScreen)(THIS_ long) PURE;
- STDMETHOD(WillUseFullScreen)(THIS_ long*) PURE;
-};
-#undef INTERFACE
-#define INTERFACE IQualProp
-DECLARE_INTERFACE_(IQualProp, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(get_AvgFrameRate)(THIS_ int*) PURE;
- STDMETHOD(get_AvgSyncOffset)(THIS_ int*) PURE;
- STDMETHOD(get_DevSyncOffset)(THIS_ int*) PURE;
- STDMETHOD(get_FramesDrawn)(THIS_ int*) PURE;
- STDMETHOD(get_FramesDroppedInRenderer)(THIS_ int*) PURE;
- STDMETHOD(get_Jitter)(THIS_ int*) PURE;
-};
-#undef INTERFACE
-#define INTERFACE IFullScreenVideo
-DECLARE_INTERFACE_(IFullScreenVideo, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(CountModes)(THIS_ long*) PURE;
- STDMETHOD(GetCaption)(THIS_ BSTR*) PURE;
- STDMETHOD(GetClipFactor)(THIS_ long*) PURE;
- STDMETHOD(GetCurrentMode)(THIS_ long*) PURE;
- STDMETHOD(GetMessageDrain)(THIS_ HWND*) PURE;
- STDMETHOD(GetModeInfo)(THIS_ long,long*,long*,long*) PURE;
- STDMETHOD(GetMonitor)(THIS_ long*) PURE;
- STDMETHOD(HideOnDeactivate)(THIS_ long) PURE;
- STDMETHOD(IsHideOnDeactivate)(THIS) PURE;
- STDMETHOD(IsModeAvailable)(THIS_ long) PURE;
- STDMETHOD(IsModeEnabled)(THIS_ long) PURE;
- STDMETHOD(SetCaption)(THIS_ BSTR) PURE;
- STDMETHOD(SetClipFactor)(THIS_ long) PURE;
- STDMETHOD(SetDefault)(THIS) PURE;
- STDMETHOD(SetEnabled)(THIS_ long,long) PURE;
- STDMETHOD(SetMessageDrain)(THIS_ HWND) PURE;
- STDMETHOD(SetMonitor)(THIS_ long) PURE;
-};
-#undef INTERFACE
-#define INTERFACE IFullScreenVideoEx
-DECLARE_INTERFACE_(IFullScreenVideoEx, IFullScreenVideo)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID, LPVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(CountModes)(THIS_ long*) PURE;
- STDMETHOD(GetAcceleratorTable)(THIS_ HWND*,HACCEL*) PURE;
- STDMETHOD(GetCaption)(THIS_ BSTR*) PURE;
- STDMETHOD(GetClipFactor)(THIS_ long*) PURE;
- STDMETHOD(GetCurrentMode)(THIS_ long*) PURE;
- STDMETHOD(GetMessageDrain)(THIS_ HWND*) PURE;
- STDMETHOD(GetModeInfo)(THIS_ long,long*,long*,long*) PURE;
- STDMETHOD(GetMonitor)(THIS_ long*) PURE;
- STDMETHOD(HideOnDeactivate)(THIS_ long) PURE;
- STDMETHOD(IsHideOnDeactivate)(THIS) PURE;
- STDMETHOD(IsKeepPixelAspectRatio)(THIS_ long*) PURE;
- STDMETHOD(IsModeAvailable)(THIS_ long) PURE;
- STDMETHOD(IsModeEnabled)(THIS_ long) PURE;
- STDMETHOD(KeepPixelAspectRatio)(THIS_ long) PURE;
- STDMETHOD(SetAcceleratorTable)(THIS_ HWND,HACCEL) PURE;
- STDMETHOD(SetCaption)(THIS_ BSTR) PURE;
- STDMETHOD(SetClipFactor)(THIS_ long) PURE;
- STDMETHOD(SetDefault)(THIS) PURE;
- STDMETHOD(SetEnabled)(THIS_ long,long) PURE;
- STDMETHOD(SetMessageDrain)(THIS_ HWND) PURE;
- STDMETHOD(SetMonitor)(THIS_ long) PURE;
-};
-#undef INTERFACE
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/audevcod.h b/winsup/w32api/include/audevcod.h
deleted file mode 100644
index 8d741e0..0000000
--- a/winsup/w32api/include/audevcod.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifndef _AUDEVCOD_H
-#define _AUDEVCOD_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum _tagSND_DEVICE_ERROR {
- SNDDEV_ERROR_Open = 1,
- SNDDEV_ERROR_Close = 2,
- SNDDEV_ERROR_GetCaps = 3,
- SNDDEV_ERROR_PrepareHeader = 4,
- SNDDEV_ERROR_UnprepareHeader = 5,
- SNDDEV_ERROR_Reset = 6,
- SNDDEV_ERROR_Restart = 7,
- SNDDEV_ERROR_GetPosition = 8,
- SNDDEV_ERROR_Write = 9,
- SNDDEV_ERROR_Pause = 10,
- SNDDEV_ERROR_Stop = 11,
- SNDDEV_ERROR_Start = 12,
- SNDDEV_ERROR_AddBuffer = 13,
- SNDDEV_ERROR_Query = 14
-} SNDDEV_ERR;
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/aviriff.h b/winsup/w32api/include/aviriff.h
deleted file mode 100644
index 306aa05..0000000
--- a/winsup/w32api/include/aviriff.h
+++ /dev/null
@@ -1,87 +0,0 @@
-#ifndef _AVIRIFF_H
-#define _AVIRIFF_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifndef _MMSYSTEM_H
-#include <mmsystem.h>
-#endif
-#ifndef _WINGDI_H
-#include <wingdi.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- DirectShow Reference - DirectShow Structures */
-typedef struct _avimainheader {
- FOURCC fcc;
- DWORD cb;
- DWORD dwMicroSecPerFrame;
- DWORD dwMaxBytesPerSec;
- DWORD dwPaddingGranularity;
- DWORD dwFlags;
- DWORD dwTotalFrames;
- DWORD dwInitialFrames;
- DWORD dwStreams;
- DWORD dwSuggestedBufferSize;
- DWORD dwWidth;
- DWORD dwHeight;
- DWORD dwReserved[4];
-} AVIMAINHEADER;
-#define AVIF_COPYRIGHTED 0x00020000
-#define AVIF_HASINDEX 0x00000010
-#define AVIF_ISINTERLEAVED 0x00000100
-#define AVIF_MUSTUSEINDEX 0x00000020
-#define AVIF_WASCAPTUREFILE 0x00010000
-typedef struct _avioldindex {
- FOURCC fcc;
- DWORD cb;
- struct _avioldindex_entry {
- DWORD dwChunkId;
- DWORD dwFlags;
- DWORD dwOffset;
- DWORD dwSize;
- } aIndex[];
-} AVIOLDINDEX;
-#define AVIIF_LIST 0x00000001
-#define AVIIF_KEYFRAME 0x00000010
-#define AVIIF_NO_TIME 0x00000100
-typedef struct {
- BYTE bFirstEntry;
- BYTE bNumEntries;
- WORD wFlags;
- PALETTEENTRY peNew[];
-} AVIPALCHANGE;
-typedef struct _avistreamheader {
- FOURCC fcc;
- DWORD cb;
- FOURCC fccType;
- FOURCC fccHandler;
- DWORD dwFlags;
- WORD wPriority;
- WORD wLanguage;
- DWORD dwInitialFrames;
- DWORD dwScale;
- DWORD dwRate;
- DWORD dwStart;
- DWORD dwLength;
- DWORD dwSuggestedBufferSize;
- DWORD dwQuality;
- DWORD dwSampleSize;
- struct {
- short int left;
- short int top;
- short int right;
- short int bottom;
- } rcFrame;
-} AVISTREAMHEADER;
-#define AVISF_DISABLED 0x00000001
-#define AVISF_VIDEO_PALCHANGES 0x00010000
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/aygshell.h b/winsup/w32api/include/aygshell.h
deleted file mode 100755
index 624ad29..0000000
--- a/winsup/w32api/include/aygshell.h
+++ /dev/null
@@ -1,49 +0,0 @@
-#ifndef _AYGSHELL_H
-#define _AYGSHELL_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#if _WIN32_WCE >= 400
-
-#include <windef.h> /* shellapi needs this */
-#include <basetyps.h>
-#include <shellapi.h> /* for WINSHELLAPI */
-
-typedef struct tagSHMENUBARINFO {
- DWORD cbSize;
- HWND hwndParent;
- DWORD dwFlags;
- UINT nToolBarId;
- HINSTANCE hInstRes;
- int nBmpId;
- int cBmpImages;
- HWND hwndMB;
- COLORREF clrBk;
-} SHMENUBARINFO, *PSHMENUBARINFO;
-
-typedef struct tagSHACTIVATEINFO {
- DWORD cbSize;
- HWND hwndLastFocus;
- UINT fSipUp :1;
- UINT fSipOnDeactivation :1;
- UINT fActive :1;
- UINT fReserved :29;
-} SHACTIVATEINFO, *PSHACTIVATEINFO;
-
-WINSHELLAPI BOOL WINAPI SHCreateMenuBar(SHMENUBARINFO*);
-WINSHELLAPI HWND WINAPI SHFindMenuBar(HWND);
-WINSHELLAPI HRESULT WINAPI SHCreateNewItem(HWND,REFCLSID);
-WINSHELLAPI BOOL WINAPI SHFullScreen(HWND,DWORD);
-WINSHELLAPI BOOL WINAPI SHSipInfo(UINT,UINT,PVOID,UINT);
-/* next exported by ordinal only: @84 */
-WINSHELLAPI BOOL WINAPI SHHandleWMActivate(HWND,WPARAM,LPARAM,SHACTIVATEINFO*,DWORD);
-/* next exported by ordinal only: @83 */
-WINSHELLAPI BOOL WINAPI SHHandleWMSettingChange(HWND,WPARAM,LPARAM,SHACTIVATEINFO*);
-
-/* The following are not in device ROMs. */
-extern BOOL SHInvokeContextMenuCommand(HWND,UINT,HANDLE);
-
-#endif /* _WIN32_WCE >= 400 */
-
-#endif
diff --git a/winsup/w32api/include/basetsd.h b/winsup/w32api/include/basetsd.h
deleted file mode 100644
index d9c375d..0000000
--- a/winsup/w32api/include/basetsd.h
+++ /dev/null
@@ -1,119 +0,0 @@
-#ifndef _BASETSD_H
-#define _BASETSD_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __GNUC__
-#ifndef __int64
-#define __int64 long long
-#endif
-#endif
-
-#if defined(_WIN64)
-#define __int3264 __int64
-#define ADDRESS_TAG_BIT 0x40000000000UI64
-#else /* !_WIN64 */
-#define __int3264 __int32
-#define ADDRESS_TAG_BIT 0x80000000UL
-#define HandleToUlong( h ) ((ULONG)(ULONG_PTR)(h) )
-#define HandleToLong( h ) ((LONG)(LONG_PTR) (h) )
-#define LongToHandle( h) ((HANDLE)(LONG_PTR) (h))
-#define PtrToUlong( p ) ((ULONG)(ULONG_PTR) (p) )
-#define PtrToLong( p ) ((LONG)(LONG_PTR) (p) )
-#define PtrToUint( p ) ((UINT)(UINT_PTR) (p) )
-#define PtrToInt( p ) ((INT)(INT_PTR) (p) )
-#define PtrToUshort( p ) ((unsigned short)(ULONG_PTR)(p) )
-#define PtrToShort( p ) ((short)(LONG_PTR)(p) )
-#define IntToPtr( i ) ((VOID*)(INT_PTR)((int)i))
-#define UIntToPtr( ui ) ((VOID*)(UINT_PTR)((unsigned int)ui))
-#define LongToPtr( l ) ((VOID*)(LONG_PTR)((long)l))
-#define ULongToPtr( ul ) ((VOID*)(ULONG_PTR)((unsigned long)ul))
-#endif /* !_WIN64 */
-
-#define UlongToPtr(ul) ULongToPtr(ul)
-#define UintToPtr(ui) UIntToPtr(ui)
-#define MAXUINT_PTR (~((UINT_PTR)0))
-#define MAXINT_PTR ((INT_PTR)(MAXUINT_PTR >> 1))
-#define MININT_PTR (~MAXINT_PTR)
-#define MAXULONG_PTR (~((ULONG_PTR)0))
-#define MAXLONG_PTR ((LONG_PTR)(MAXULONG_PTR >> 1))
-#define MINLONG_PTR (~MAXLONG_PTR)
-#define MAXUHALF_PTR ((UHALF_PTR)~0)
-#define MAXHALF_PTR ((HALF_PTR)(MAXUHALF_PTR >> 1))
-#define MINHALF_PTR (~MAXHALF_PTR)
-
-#ifndef RC_INVOKED
-#ifdef __cplusplus
-extern "C" {
-#endif
-typedef int LONG32, *PLONG32;
-#ifndef XFree86Server
-typedef int INT32, *PINT32;
-#endif /* ndef XFree86Server */
-typedef unsigned int ULONG32, *PULONG32;
-typedef unsigned int DWORD32, *PDWORD32;
-typedef unsigned int UINT32, *PUINT32;
-
-#if defined(_WIN64)
-typedef __int64 INT_PTR, *PINT_PTR;
-typedef unsigned __int64 UINT_PTR, *PUINT_PTR;
-typedef __int64 LONG_PTR, *PLONG_PTR;
-typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
-typedef unsigned __int64 HANDLE_PTR;
-typedef unsigned int UHALF_PTR, *PUHALF_PTR;
-typedef int HALF_PTR, *PHALF_PTR;
-
-#if 0 /* TODO when WIN64 is here */
-inline unsigned long HandleToUlong(const void* h )
- { return((unsigned long) h ); }
-inline long HandleToLong( const void* h )
- { return((long) h ); }
-inline void* LongToHandle( const long h )
- { return((void*) (INT_PTR) h ); }
-inline unsigned long PtrToUlong( const void* p)
- { return((unsigned long) p ); }
-inline unsigned int PtrToUint( const void* p )
- { return((unsigned int) p ); }
-inline unsigned short PtrToUshort( const void* p )
- { return((unsigned short) p ); }
-inline long PtrToLong( const void* p )
- { return((long) p ); }
-inline int PtrToInt( const void* p )
- { return((int) p ); }
-inline short PtrToShort( const void* p )
- { return((short) p ); }
-inline void* IntToPtr( const int i )
- { return( (void*)(INT_PTR)i ); }
-inline void* UIntToPtr(const unsigned int ui)
- { return( (void*)(UINT_PTR)ui ); }
-inline void* LongToPtr( const long l )
- { return( (void*)(LONG_PTR)l ); }
-inline void* ULongToPtr( const unsigned long ul )
- { return( (void*)(ULONG_PTR)ul ); }
-#endif /* 0_ */
-
-#else /* !_WIN64 */
-typedef int INT_PTR, *PINT_PTR;
-typedef unsigned int UINT_PTR, *PUINT_PTR;
-typedef long LONG_PTR, *PLONG_PTR;
-typedef unsigned long ULONG_PTR, *PULONG_PTR;
-typedef unsigned short UHALF_PTR, *PUHALF_PTR;
-typedef short HALF_PTR, *PHALF_PTR;
-typedef unsigned long HANDLE_PTR;
-#endif /* !_WIN64 */
-
-typedef ULONG_PTR SIZE_T, *PSIZE_T;
-typedef LONG_PTR SSIZE_T, *PSSIZE_T;
-typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
-typedef __int64 LONG64, *PLONG64;
-typedef __int64 INT64, *PINT64;
-typedef unsigned __int64 ULONG64, *PULONG64;
-typedef unsigned __int64 DWORD64, *PDWORD64;
-typedef unsigned __int64 UINT64, *PUINT64;
-#ifdef __cplusplus
-}
-#endif
-#endif /* !RC_INVOKED */
-
-#endif /* _BASETSD_H */
diff --git a/winsup/w32api/include/basetyps.h b/winsup/w32api/include/basetyps.h
deleted file mode 100644
index b644bdf..0000000
--- a/winsup/w32api/include/basetyps.h
+++ /dev/null
@@ -1,182 +0,0 @@
-#ifndef _BASETYPS_H
-#define _BASETYPS_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifndef _OBJC_NO_COM_
-# ifdef __cplusplus
-# define EXTERN_C extern "C"
-# else
-# define EXTERN_C extern
-# endif /* __cplusplus */
-# ifndef __int64
-# define __int64 long long
-# endif
-# ifndef __int32
-# define __int32 long
-# endif
-# ifndef __int16
-# define __int16 short
-# endif
-# ifndef __int8
-# define __int8 char
-# endif
-# ifndef __small
-# define __small char
-# endif
-# ifndef __hyper
-# define __hyper long long
-# endif
-# define STDMETHODCALLTYPE __stdcall
-# define STDMETHODVCALLTYPE __cdecl
-# define STDAPICALLTYPE __stdcall
-# define STDAPIVCALLTYPE __cdecl
-# define STDAPI EXTERN_C HRESULT STDAPICALLTYPE
-# define STDAPI_(t) EXTERN_C t STDAPICALLTYPE
-# define STDMETHODIMP HRESULT STDMETHODCALLTYPE
-# define STDMETHODIMP_(t) t STDMETHODCALLTYPE
-# define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE
-# define STDAPIV_(t) EXTERN_C t STDAPIVCALLTYPE
-# define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE
-# define STDMETHODIMPV_(t) t STDMETHODVCALLTYPE
-/* Newer MS compilers support the __interface keyword, but
- that has a specific meaning that is enforced by the compiler.
- For now, just get 'interface' out of the global namespace
- for __OBJC__ */
-# define _COM_interface struct
-# ifndef __OBJC__
-# define interface _COM_interface
-# endif
-# if defined(__cplusplus) && !defined(CINTERFACE)
-# define STDMETHOD(m) virtual HRESULT STDMETHODCALLTYPE m
-# define STDMETHOD_(t,m) virtual t STDMETHODCALLTYPE m
-# define PURE =0
-# define THIS_
-# define THIS void
-/*
- __attribute__((com_interface)) is obsolete in __GNUC__ >= 3
- g++ vtables are now COM-compatible by default
-*/
-# if defined(__GNUC__) && __GNUC__ < 3 && !defined(NOCOMATTRIBUTE)
-# define DECLARE_INTERFACE(i) _COM_interface __attribute__((com_interface)) i
-# define DECLARE_INTERFACE_(i,b) _COM_interface __attribute__((com_interface)) i : public b
-# else
-# define DECLARE_INTERFACE(i) _COM_interface i
-# define DECLARE_INTERFACE_(i,b) _COM_interface i : public b
-# endif
-# else
-# define STDMETHOD(m) HRESULT(STDMETHODCALLTYPE *m)
-# define STDMETHOD_(t,m) t(STDMETHODCALLTYPE *m)
-# define PURE
-# define THIS_ INTERFACE *,
-# define THIS INTERFACE *
-# ifndef CONST_VTABLE
-# define CONST_VTABLE
-# endif
-# define DECLARE_INTERFACE(i) \
- typedef _COM_interface i { CONST_VTABLE struct i##Vtbl *lpVtbl; } i; \
- typedef CONST_VTABLE struct i##Vtbl i##Vtbl; \
- CONST_VTABLE struct i##Vtbl
-# define DECLARE_INTERFACE_(i,b) DECLARE_INTERFACE(i)
-# endif
-# define BEGIN_INTERFACE
-# define END_INTERFACE
-
-# define FWD_DECL(i) typedef _COM_interface i i
-# if defined(__cplusplus) && !defined(CINTERFACE)
-# define IENUM_THIS(T)
-# define IENUM_THIS_(T)
-# else
-# define IENUM_THIS(T) T*
-# define IENUM_THIS_(T) T*,
-# endif
-# define DECLARE_ENUMERATOR_(I,T) \
- DECLARE_INTERFACE_(I,IUnknown) \
- { \
- STDMETHOD(QueryInterface)(IENUM_THIS_(I) REFIID,PVOID*) PURE; \
- STDMETHOD_(ULONG,AddRef)(IENUM_THIS(I)) PURE; \
- STDMETHOD_(ULONG,Release)(IENUM_THIS(I)) PURE; \
- STDMETHOD(Next)(IENUM_THIS_(I) ULONG,T*,ULONG*) PURE; \
- STDMETHOD(Skip)(IENUM_THIS_(I) ULONG) PURE; \
- STDMETHOD(Reset)(IENUM_THIS(I)) PURE; \
- STDMETHOD(Clone)(IENUM_THIS_(I) I**) PURE; \
- }
-# define DECLARE_ENUMERATOR(T) DECLARE_ENUMERATOR_(IEnum##T,T)
-
-#endif /* _OBJC_NO_COM_ */
-
-#ifdef _GUID_DEFINED
-# warning _GUID_DEFINED is deprecated, use GUID_DEFINED instead
-#endif
-
-#if ! (defined _GUID_DEFINED || defined GUID_DEFINED) /* also defined in winnt.h */
-#define GUID_DEFINED
-typedef struct _GUID
-{
- unsigned long Data1;
- unsigned short Data2;
- unsigned short Data3;
- unsigned char Data4[8];
-} GUID,*REFGUID,*LPGUID;
-#endif /* GUID_DEFINED */
-#ifndef UUID_DEFINED
-#define UUID_DEFINED
-typedef GUID UUID;
-#endif /* UUID_DEFINED */
-#ifndef __IID_DEFINED__
-#define __IID_DEFINED__
-typedef GUID IID;
-#endif /* __IID_DEFINED__ */
-typedef GUID CLSID;
-typedef CLSID *LPCLSID;
-typedef IID *LPIID;
-typedef IID *REFIID;
-typedef CLSID *REFCLSID;
-typedef GUID FMTID;
-typedef FMTID *REFFMTID;
-typedef unsigned long error_status_t;
-#define uuid_t UUID
-typedef unsigned long PROPID;
-
-#ifndef _REFGUID_DEFINED
-#if defined (__cplusplus) && !defined (CINTERFACE)
-#define REFGUID const GUID&
-#define REFIID const IID&
-#define REFCLSID const CLSID&
-#define REFFMTID const FMTID&
-#else
-#define REFGUID const GUID* const
-#define REFIID const IID* const
-#define REFCLSID const CLSID* const
-#define REFFMTID const FMTID* const
-#endif
-#define _REFGUID_DEFINED
-#define _REFIID_DEFINED
-#define _REFCLSID_DEFINED
-#define _REFFMTID_DEFINED
-#endif
-#ifndef GUID_SECTION
-#define GUID_SECTION ".text"
-#endif
-/* Explicit naming of .text section for readonly data is only
- needed for older GGC (pre-2.95).
- More recent (3.4) GCC puts readonly data in .rdata. */
-#if defined (__GNUC__) && (__GNUC__ <= 2 && __GNUC_MINOR__ < 95)
-#define GUID_SECT __attribute__ ((section (GUID_SECTION)))
-#else
-#define GUID_SECT
-#endif
-#if !defined(INITGUID) || (defined(INITGUID) && defined(__cplusplus))
-#define GUID_EXT EXTERN_C
-#else
-#define GUID_EXT
-#endif
-#ifdef INITGUID
-#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) GUID_EXT const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
-#define DEFINE_OLEGUID(n,l,w1,w2) DEFINE_GUID(n,l,w1,w2,0xC0,0,0,0,0,0,0,0x46)
-#else
-#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) GUID_EXT const GUID n
-#define DEFINE_OLEGUID(n,l,w1,w2) DEFINE_GUID(n,l,w1,w2,0xC0,0,0,0,0,0,0,0x46)
-#endif
-#endif
diff --git a/winsup/w32api/include/bdatypes.h b/winsup/w32api/include/bdatypes.h
deleted file mode 100644
index 5456ff6..0000000
--- a/winsup/w32api/include/bdatypes.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef _BDATYPES_H
-#define _BDATYPES_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- DirectShow Reference - DirectShow Enumerated Types */
-typedef enum {
- MEDIA_TRANSPORT_PACKET,
- MEDIA_ELEMENTARY_STREAM,
- MEDIA_MPEG2_PSI,
- MEDIA_TRANSPORT_PAYLOAD
-} MEDIA_SAMPLE_CONTENT;
-/*--- DirectShow Reference - DirectShow Structures */
-typedef struct {
- DWORD dwOffset
- DWORD dwPacketLength
- DWORD dwStride
-} MPEG2_TRANSPORT_STRIDE;
-typedef struct {
- ULONG ulPID;
- MEDIA_SAMPLE_CONTENT MediaSampleContent ;
-} PID_MAP;
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/cderr.h b/winsup/w32api/include/cderr.h
deleted file mode 100644
index e9a5b05..0000000
--- a/winsup/w32api/include/cderr.h
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef _CDERR_H
-#define _CDERR_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#define CDERR_DIALOGFAILURE 0xFFFF
-#define CDERR_GENERALCODES 0x0000
-#define CDERR_STRUCTSIZE 0x0001
-#define CDERR_INITIALIZATION 0x0002
-#define CDERR_NOTEMPLATE 0x0003
-#define CDERR_NOHINSTANCE 0x0004
-#define CDERR_LOADSTRFAILURE 0x0005
-#define CDERR_FINDRESFAILURE 0x0006
-#define CDERR_LOADRESFAILURE 0x0007
-#define CDERR_LOCKRESFAILURE 0x0008
-#define CDERR_MEMALLOCFAILURE 0x0009
-#define CDERR_MEMLOCKFAILURE 0x000A
-#define CDERR_NOHOOK 0x000B
-#define CDERR_REGISTERMSGFAIL 0x000C
-#define PDERR_PRINTERCODES 0x1000
-#define PDERR_SETUPFAILURE 0x1001
-#define PDERR_PARSEFAILURE 0x1002
-#define PDERR_RETDEFFAILURE 0x1003
-#define PDERR_LOADDRVFAILURE 0x1004
-#define PDERR_GETDEVMODEFAIL 0x1005
-#define PDERR_INITFAILURE 0x1006
-#define PDERR_NODEVICES 0x1007
-#define PDERR_NODEFAULTPRN 0x1008
-#define PDERR_DNDMMISMATCH 0x1009
-#define PDERR_CREATEICFAILURE 0x100A
-#define PDERR_PRINTERNOTFOUND 0x100B
-#define PDERR_DEFAULTDIFFERENT 0x100C
-#define CFERR_CHOOSEFONTCODES 0x2000
-#define CFERR_NOFONTS 0x2001
-#define CFERR_MAXLESSTHANMIN 0x2002
-#define FNERR_FILENAMECODES 0x3000
-#define FNERR_SUBCLASSFAILURE 0x3001
-#define FNERR_INVALIDFILENAME 0x3002
-#define FNERR_BUFFERTOOSMALL 0x3003
-#define FRERR_FINDREPLACECODES 0x4000
-#define FRERR_BUFFERLENGTHZERO 0x4001
-#define CCERR_CHOOSECOLORCODES 0x5000
-#endif
diff --git a/winsup/w32api/include/cguid.h b/winsup/w32api/include/cguid.h
deleted file mode 100644
index ca64c5e..0000000
--- a/winsup/w32api/include/cguid.h
+++ /dev/null
@@ -1,83 +0,0 @@
-#ifndef _CGUID_H
-#define _CGUID_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern const IID GUID_NULL;
-extern const IID IID_IRpcChannel;
-extern const IID IID_IRpcStub;
-extern const IID IID_IStubManager;
-extern const IID IID_IRpcProxy;
-extern const IID IID_IProxyManager;
-extern const IID IID_IPSFactory;
-extern const IID IID_IInternalMoniker;
-extern const IID IID_IDfReserved1;
-extern const IID IID_IDfReserved2;
-extern const IID IID_IDfReserved3;
-extern const CLSID CLSID_StdMarshal;
-extern const IID IID_IStub;
-extern const IID IID_IProxy;
-extern const IID IID_IEnumGeneric;
-extern const IID IID_IEnumHolder;
-extern const IID IID_IEnumCallback;
-extern const IID IID_IOleManager;
-extern const IID IID_IOlePresObj;
-extern const IID IID_IDebug;
-extern const IID IID_IDebugStream;
-extern const CLSID CLSID_PSGenObject;
-extern const CLSID CLSID_PSClientSite;
-extern const CLSID CLSID_PSClassObject;
-extern const CLSID CLSID_PSInPlaceActive;
-extern const CLSID CLSID_PSInPlaceFrame;
-extern const CLSID CLSID_PSDragDrop;
-extern const CLSID CLSID_PSBindCtx;
-extern const CLSID CLSID_PSEnumerators;
-extern const CLSID CLSID_StaticMetafile;
-extern const CLSID CLSID_StaticDib;
-extern const CLSID CID_CDfsVolume;
-extern const CLSID CLSID_CCDFormKrnl;
-extern const CLSID CLSID_CCDPropertyPage;
-extern const CLSID CLSID_CCDFormDialog;
-extern const CLSID CLSID_CCDCommandButton;
-extern const CLSID CLSID_CCDComboBox;
-extern const CLSID CLSID_CCDTextBox;
-extern const CLSID CLSID_CCDCheckBox;
-extern const CLSID CLSID_CCDLabel;
-extern const CLSID CLSID_CCDOptionButton;
-extern const CLSID CLSID_CCDListBox;
-extern const CLSID CLSID_CCDScrollBar;
-extern const CLSID CLSID_CCDGroupBox;
-extern const CLSID CLSID_CCDGeneralPropertyPage;
-extern const CLSID CLSID_CCDGenericPropertyPage;
-extern const CLSID CLSID_CCDFontPropertyPage;
-extern const CLSID CLSID_CCDColorPropertyPage;
-extern const CLSID CLSID_CCDLabelPropertyPage;
-extern const CLSID CLSID_CCDCheckBoxPropertyPage;
-extern const CLSID CLSID_CCDTextBoxPropertyPage;
-extern const CLSID CLSID_CCDOptionButtonPropertyPage;
-extern const CLSID CLSID_CCDListBoxPropertyPage;
-extern const CLSID CLSID_CCDCommandButtonPropertyPage;
-extern const CLSID CLSID_CCDComboBoxPropertyPage;
-extern const CLSID CLSID_CCDScrollBarPropertyPage;
-extern const CLSID CLSID_CCDGroupBoxPropertyPage;
-extern const CLSID CLSID_CCDXObjectPropertyPage;
-extern const CLSID CLSID_CStdPropertyFrame;
-extern const CLSID CLSID_CFormPropertyPage;
-extern const CLSID CLSID_CGridPropertyPage;
-extern const CLSID CLSID_CWSJArticlePage;
-extern const CLSID CLSID_CSystemPage;
-extern const CLSID CLSID_IdentityUnmarshal;
-extern const CLSID CLSID_InProcFreeMarshaler;
-extern const CLSID CLSID_Picture_Metafile;
-extern const CLSID CLSID_Picture_EnhMetafile;
-extern const CLSID CLSID_Picture_Dib;
-extern const CLSID CLSID_StdGlobalInterfaceTable;
-extern const GUID GUID_TRISTATE;
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/cmnquery.h b/winsup/w32api/include/cmnquery.h
deleted file mode 100644
index e846a08..0000000
--- a/winsup/w32api/include/cmnquery.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * cmnquery.h - Active Directory
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may use,
- * modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-#ifndef _CMNQUERY_H
-#define _CMNQUERY_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- Active Directory Reference - Active Directory Structures - Active Directory Display Structures */
-#if (_WIN32_WINNT >= 0x0500)
-typedef struct {
- DWORD cbStruct;
- DWORD dwFlags;
- CLSID clsid;
- HICON hIcon;
- LPWSTR pszTitle;
-} CQFORM,*LPCQFORM;
-#define CQFF_NOGLOBALPAGES 0x00000001
-#define CQFF_ISOPTIONAL 0x00000002
-typedef struct {
- DWORD cbStruct;
- DWORD dwFlags;
- LPCQPAGEPROC pPageProc;
- HINSTANCE hInstance;
- INT idPageName;
- INT idPageTemplate;
- DLGPROC pDlgProc;
- LPARAM lParam;
-} CQPAGE,*LPCQPAGE;
-/*********
-typedef struct {
- DWORD cbStruct;
- DWORD dwFlags;
- CLSID clsidHandler;
- LPVOID pHandlerParameters;
- CLSID clsidDefaultForm;
- IPersistQuery* pPersistQuery;
- union {
- void* pFormParameters;
- IPropertyBag* ppbFormParameters;
- };
-} OPENQUERYWINDOW,*LPOPENQUERYWINDOW;
-*********/
-#define OQWF_OKCANCEL 0x00000001
-#define OQWF_DEFAULTFORM 0x00000002
-#define OQWF_SINGLESELECT 0x00000004
-#define OQWF_LOADQUERY 0x00000008
-#define OQWF_REMOVESCOPES 0x00000010
-#define OQWF_REMOVEFORMS 0x00000020
-#define OQWF_ISSUEONOPEN 0x00000040
-#define OQWF_SHOWOPTIONAL 0x00000080
-#define OQWF_SAVEQUERYONOK 0x00000200
-#define OQWF_HIDEMENUS 0x00000400
-#define OQWF_HIDESEARCHUI 0x00000800
-#define OQWF_PARAMISPROPERTYBAG 0x80000000
-/*--- Active Directory Reference - Active Directory Functions - Active Directory Display Functions */
-typedef HRESULT (CALLBACK* CQAddFormsProc)(LPARAM,LPCQFORM);
-typedef HRESULT (CALLBACK* CQAddPagesProc)(LPARAM,REFCLSID,LPCQPAGE);
-typedef HRESULT (CALLBACK* CQPageProc)(LPCQPAGE,HWND,UINT,WPARAM,LPARAM);
-#endif /* (_WIN32_WINNT >= 0x0500) */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/comcat.h b/winsup/w32api/include/comcat.h
deleted file mode 100644
index b5d982b..0000000
--- a/winsup/w32api/include/comcat.h
+++ /dev/null
@@ -1,175 +0,0 @@
-#ifndef _COMCAT_H
-#define _COMCAT_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifndef COM_NO_WINDOWS_H
-#include <windows.h>
-#include <ole2.h>
-#endif
-
-#ifndef _RC_INVOKED
-
-#ifdef __cplusplus
-extern "C"{
-#endif
-
-EXTERN_C const IID IID_IEnumGUID;
-typedef _COM_interface IEnumGUID *LPENUMGUID;
-
-#define INTERFACE IEnumGUID
-DECLARE_INTERFACE_(IEnumGUID,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Next)(THIS_ ULONG,GUID*,ULONG*) PURE;
- STDMETHOD(Skip)(THIS_ ULONG) PURE;
- STDMETHOD(Reset)(THIS) PURE;
- STDMETHOD(Clone)(THIS_ LPENUMGUID*) PURE;
-};
-#undef INTERFACE
-#if (!defined (__cplusplus) || defined (CINTERFACE)) \
- && defined (COBJMACROS)
-#define IEnumGUID_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IEnumGUID_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IEnumGUID_Release(p) (p)->lpVtbl->Release(p)
-#define IEnumGUID_Next(p,a,b,c) (p)->lpVtbl->Next(p,a,b,c)
-#define IEnumGUID_Skip(p,a) (p)->lpVtbl->Skip(p,a)
-#define IEnumGUID_Reset(p) (p)->lpVtbl->Reset(p)
-#define IEnumGUID_Clone(p,a) (p)->lpVtbl->Clone(p,a)
-#endif
-
-typedef GUID CATID;
-typedef REFGUID REFCATID;
-#define CATID_NULL GUID_NULL
-#define IsEqualCATID(a, b) IsEqualGUID(a, b)
-
-typedef struct tagCATEGORYINFO {
- CATID catid; /* category identifier for component */
- LCID lcid; /* locale identifier */
- OLECHAR szDescription[128]; /* description of the category */
-} CATEGORYINFO, *LPCATEGORYINFO;
-
-EXTERN_C const CATID CATID_Insertable;
-EXTERN_C const CATID CATID_Control;
-EXTERN_C const CATID CATID_Programmable;
-EXTERN_C const CATID CATID_IsShortcut;
-EXTERN_C const CATID CATID_NeverShowExt;
-EXTERN_C const CATID CATID_DocObject;
-EXTERN_C const CATID CATID_Printable;
-EXTERN_C const CATID CATID_RequiresDataPathHost;
-EXTERN_C const CATID CATID_PersistsToMoniker;
-EXTERN_C const CATID CATID_PersistsToStorage;
-EXTERN_C const CATID CATID_PersistsToStreamInit;
-EXTERN_C const CATID CATID_PersistsToStream;
-EXTERN_C const CATID CATID_PersistsToMemory;
-EXTERN_C const CATID CATID_PersistsToFile;
-EXTERN_C const CATID CATID_PersistsToPropertyBag;
-EXTERN_C const CATID CATID_InternetAware;
-EXTERN_C const CATID CATID_DesignTimeUIActivatableControl;
-
-#define IEnumCATID IEnumGUID
-#define LPENUMCATID LPENUMGUID
-#define IID_IEnumCATID IID_IEnumGUID
-
-#define IEnumCLSID IEnumGUID
-#define LPENUMCLSID LPENUMGUID
-#define IID_IEnumCLSID IID_IEnumGUID
-
-EXTERN_C const IID IID_ICatInformation;
-typedef _COM_interface ICatInformation *LPCATINFORMATION;
-
-EXTERN_C const IID IID_ICatRegister;
-typedef _COM_interface ICatRegister *LPCATREGISTER;
-
-EXTERN_C const IID IID_IEnumCATEGORYINFO;
-typedef _COM_interface IEnumCATEGORYINFO *LPENUMCATEGORYINFO;
-
-EXTERN_C const CLSID CLSID_StdComponentCategoriesMgr;
-
-#define INTERFACE ICatInformation
-DECLARE_INTERFACE_(ICatInformation,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(EnumCategories)(THIS_ LCID,LPENUMCATEGORYINFO*) PURE;
- STDMETHOD(GetCategoryDesc)(THIS_ REFCATID,LCID,PWCHAR*) PURE;
- STDMETHOD(EnumClassesOfCategories)(THIS_ ULONG,CATID*,ULONG,CATID*,LPENUMCLSID*) PURE;
- STDMETHOD(IsClassOfCategories)(THIS_ REFCLSID,ULONG,CATID*,ULONG,CATID*) PURE;
- STDMETHOD(EnumImplCategoriesOfClass)(THIS_ REFCLSID,LPENUMCATID*) PURE;
- STDMETHOD(EnumReqCategoriesOfClass)(THIS_ REFCLSID,LPENUMCATID*) PURE;
-};
-#undef INTERFACE
-#if (!defined (__cplusplus) || defined (CINTERFACE)) \
- && defined (COBJMACROS)
-#define ICatInformation_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define ICatInformation_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define ICatInformation_Release(p) (p)->lpVtbl->Release(p)
-#define ICatInformation_EnumCategories(p,a,b) (p)->lpVtbl->EnumCategories(p,a,b)
-#define ICatInformation_GetCategoryDesc(p,a,b,c) (p)->lpVtbl->GetCategoryDesc(p,a,b,c)
-#define ICatInformation_EnumClassesOfCategories(p,a,b,c,d,e) (p)->lpVtbl->EnumClassesOfCategories(p,a,b,c,d,e)
-#define ICatInformation_IsClassOfCategories(p,a,b,c,d,e) (p)->lpVtbl->IsClassOfCategories(p,a,b,c,d,e)
-#define ICatInformation_EnumImplCategoriesOfClass(p,a,b) (p)->lpVtbl->EnumImplCategoriesOfClass(p,a,b)
-#define ICatInformation_EnumReqCategoriesOfClass(p,a,b) (p)->lpVtbl->EnumReqCategoriesOfClass(p,a,b)
-#endif
-
-#define INTERFACE ICatRegister
-DECLARE_INTERFACE_(ICatRegister,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(RegisterCategories)(THIS_ ULONG,CATEGORYINFO*) PURE;
- STDMETHOD(UnRegisterCategories)(THIS_ ULONG,CATID*) PURE;
- STDMETHOD(RegisterClassImplCategories)(THIS_ REFCLSID,ULONG,CATID*) PURE;
- STDMETHOD(UnRegisterClassImplCategories)(THIS_ REFCLSID,ULONG,CATID*) PURE;
- STDMETHOD(RegisterClassReqCategories)(THIS_ REFCLSID,ULONG,CATID*) PURE;
- STDMETHOD(UnRegisterClassReqCategories)(THIS_ REFCLSID,ULONG,CATID*) PURE;
-};
-#undef INTERFACE
-#if (!defined (__cplusplus) || defined (CINTERFACE)) \
- && defined (COBJMACROS)
-#define ICatRegister_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define ICatRegister_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define ICatRegister_Release(p) (p)->lpVtbl->Release(p)
-#define ICatRegister_RegisterCategories(p,a,b) (p)->lpVtbl->RegisterCategories(p,a,b)
-#define ICatRegister_UnRegisterCategories(p,a,b) (p)->lpVtbl->UnRegisterCategories(p,a,b)
-#define ICatRegister_RegisterClassImplCategories(p,a,b,c) (p)->lpVtbl->RegisterClassImplCategories(p,a,b,c)
-#define ICatRegister_UnRegisterClassImplCategories(p,a,b,c) (p)->lpVtbl->UnRegisterClassImplCategories(p,a,b,c)
-#define ICatRegister_RegisterClassReqCategories(p,a,b,c) (p)->lpVtbl->RegisterClassReqCategories(p,a,b,c)
-#define ICatRegister_UnRegisterClassReqCategories(p,a,b,c) (p)->lpVtbl->UnRegisterClassReqCategories(p,a,b,c)
-#endif
-
-EXTERN_C const IID IID_IEnumCATEGORYINFO;
-#define INTERFACE IEnumCATEGORYINFO
-DECLARE_INTERFACE_(IEnumCATEGORYINFO,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Next)(THIS_ ULONG,CATEGORYINFO*,ULONG*) PURE;
- STDMETHOD(Skip)(THIS_ ULONG) PURE;
- STDMETHOD(Reset)(THIS) PURE;
- STDMETHOD(Clone)(THIS_ LPENUMCATEGORYINFO*) PURE;
-};
-#undef INTERFACE
-#if (!defined (__cplusplus) || defined (CINTERFACE)) \
- && defined (COBJMACROS)
-#define IEnumCATEGORYINFO_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IEnumCATEGORYINFO_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IEnumCATEGORYINFO_Release(p) (p)->lpVtbl->Release(p)
-#define IEnumCATEGORYINFO_Next(p,a,b,c) (p)->lpVtbl->Next(p,a,b,c)
-#define IEnumCATEGORYINFO_Skip(p,a) (p)->lpVtbl->Skip(p,a)
-#define IEnumCATEGORYINFO_Reset(p) (p)->lpVtbl->Reset(p)
-#define IEnumCATEGORYINFO_Clone(p,a) (p)->lpVtbl->Clone(p,a)
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _RC_INVOKED */
-#endif
diff --git a/winsup/w32api/include/commctrl.h b/winsup/w32api/include/commctrl.h
deleted file mode 100644
index 46c5ff5..0000000
--- a/winsup/w32api/include/commctrl.h
+++ /dev/null
@@ -1,3750 +0,0 @@
-#ifndef _COMMCTRL_H
-#define _COMMCTRL_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#include <prsht.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifndef _WIN32_IE
-/* define _WIN32_IE if you really want it */
-#if 0
-#define _WIN32_IE 0x0300
-#endif
-#endif
-
-#ifndef COMMCTRLAPI
-#ifdef __W32API_USE_DLLIMPORT__
-#define COMMCTRLAPI DECLSPEC_IMPORT
-#else
-#define COMMCTRLAPI
-#endif
-#endif
-
-
-#ifndef SNDMSG
-#ifdef __cplusplus
-#define SNDMSG ::SendMessage
-#else
-#define SNDMSG SendMessage
-#endif
-#endif /* ifndef SNDMSG */
-
-#define DRAGLISTMSGSTRING TEXT("commctrl_DragListMsg")
-#define HOTKEY_CLASSA "msctls_hotkey32"
-#define HOTKEY_CLASSW L"msctls_hotkey32"
-#define PROGRESS_CLASSA "msctls_progress32"
-#define PROGRESS_CLASSW L"msctls_progress32"
-#define STATUSCLASSNAMEA "msctls_statusbar32"
-#define STATUSCLASSNAMEW L"msctls_statusbar32"
-#define TOOLBARCLASSNAMEA "ToolbarWindow32"
-#define TOOLBARCLASSNAMEW L"ToolbarWindow32"
-#define TOOLTIPS_CLASSA "tooltips_class32"
-#define TOOLTIPS_CLASSW L"tooltips_class32"
-#define TRACKBAR_CLASSA "msctls_trackbar32"
-#define TRACKBAR_CLASSW L"msctls_trackbar32"
-#define UPDOWN_CLASSA "msctls_updown32"
-#define UPDOWN_CLASSW L"msctls_updown32"
-#define ANIMATE_CLASSA "SysAnimate32"
-#define ANIMATE_CLASSW L"SysAnimate32"
-#define DATETIMEPICK_CLASSW L"SysDateTimePick32"
-#define DATETIMEPICK_CLASSA "SysDateTimePick32"
-#define MONTHCAL_CLASSW L"SysMonthCal32"
-#define MONTHCAL_CLASSA "SysMonthCal32"
-#define REBARCLASSNAMEW L"ReBarWindow32"
-#define REBARCLASSNAMEA "ReBarWindow32"
-#define WC_COMBOBOXEXW L"ComboBoxEx32"
-#define WC_COMBOBOXEXA "ComboBoxEx32"
-#define WC_IPADDRESSW L"SysIPAddress32"
-#define WC_IPADDRESSA "SysIPAddress32"
-#define WC_LISTVIEWA "SysListView32"
-#define WC_LISTVIEWW L"SysListView32"
-#define WC_TABCONTROLA "SysTabControl32"
-#define WC_TABCONTROLW L"SysTabControl32"
-#define WC_TREEVIEWA "SysTreeView32"
-#define WC_TREEVIEWW L"SysTreeView32"
-#define WC_HEADERA "SysHeader32"
-#define WC_HEADERW L"SysHeader32"
-#define WC_PAGESCROLLERW L"SysPager"
-#define WC_PAGESCROLLERA "SysPager"
-#define WC_NATIVEFONTCTLW L"NativeFontCtl"
-#define WC_NATIVEFONTCTLA "NativeFontCtl"
-#define WC_BUTTONA "Button"
-#define WC_BUTTONW L"Button"
-#define WC_STATICA "Static"
-#define WC_STATICW L"Static"
-#define WC_EDITA "Edit"
-#define WC_EDITW L"Edit"
-#define WC_LISTBOXA "ListBox"
-#define WC_LISTBOXW L"ListBox"
-#define WC_COMBOBOXA "ComboBox"
-#define WC_COMBOBOXW L"ComboBox"
-#define WC_SCROLLBARA "ScrollBar"
-#define WC_SCROLLBARW L"ScrollBar"
-#define WC_LINKA "SysLink"
-#define WC_LINKW L"SysLink"
-
-#ifdef UNICODE
-#define HOTKEY_CLASS HOTKEY_CLASSW
-#define PROGRESS_CLASS PROGRESS_CLASSW
-#define STATUSCLASSNAME STATUSCLASSNAMEW
-#define TOOLBARCLASSNAME TOOLBARCLASSNAMEW
-#define TOOLTIPS_CLASS TOOLTIPS_CLASSW
-#define TRACKBAR_CLASS TRACKBAR_CLASSW
-#define UPDOWN_CLASS UPDOWN_CLASSW
-#define ANIMATE_CLASS ANIMATE_CLASSW
-#define DATETIMEPICK_CLASS DATETIMEPICK_CLASSW
-#define MONTHCAL_CLASS MONTHCAL_CLASSW
-#define REBARCLASSNAME REBARCLASSNAMEW
-#define WC_COMBOBOXEX WC_COMBOBOXEXW
-#define WC_HEADER WC_HEADERW
-#define WC_IPADDRESS WC_IPADDRESSW
-#define WC_LISTVIEW WC_LISTVIEWW
-#define WC_TABCONTROL WC_TABCONTROLW
-#define WC_TREEVIEW WC_TREEVIEWW
-#define WC_PAGESCROLLER WC_PAGESCROLLERW
-#define WC_NATIVEFONTCTL WC_NATIVEFONTCTLW
-#define WC_BUTTON WC_BUTTONW
-#define WC_STATIC WC_STATICW
-#define WC_EDIT WC_EDITW
-#define WC_LISTBOX WC_LISTBOXW
-#define WC_COMBOBOX WC_COMBOBOXW
-#define WC_SCROLLBAR WC_SCROLLBARW
-#define WC_LINK WC_LINKW
-#else
-#define ANIMATE_CLASS ANIMATE_CLASSA
-#define HOTKEY_CLASS HOTKEY_CLASSA
-#define PROGRESS_CLASS PROGRESS_CLASSA
-#define STATUSCLASSNAME STATUSCLASSNAMEA
-#define TOOLBARCLASSNAME TOOLBARCLASSNAMEA
-#define TOOLTIPS_CLASS TOOLTIPS_CLASSA
-#define TRACKBAR_CLASS TRACKBAR_CLASSA
-#define UPDOWN_CLASS UPDOWN_CLASSA
-#define DATETIMEPICK_CLASS DATETIMEPICK_CLASSA
-#define MONTHCAL_CLASS MONTHCAL_CLASSA
-#define REBARCLASSNAME REBARCLASSNAMEA
-#define WC_COMBOBOXEX WC_COMBOBOXEXA
-#define WC_HEADER WC_HEADERA
-#define WC_IPADDRESS WC_IPADDRESSA
-#define WC_LISTVIEW WC_LISTVIEWA
-#define WC_TABCONTROL WC_TABCONTROLA
-#define WC_TREEVIEW WC_TREEVIEWA
-#define WC_PAGESCROLLER WC_PAGESCROLLERA
-#define WC_NATIVEFONTCTL WC_NATIVEFONTCTLA
-#define WC_BUTTON WC_BUTTONA
-#define WC_STATIC WC_STATICA
-#define WC_EDIT WC_EDITA
-#define WC_LISTBOX WC_LISTBOXA
-#define WC_COMBOBOX WC_COMBOBOXA
-#define WC_SCROLLBAR WC_SCROLLBARA
-#define WC_LINK WC_LINKA
-#endif
-
-#if (_WIN32_IE >= 0x0500)
-#if (_WIN32_WINNT >= 0x0501)
-#define COMCTL32_VERSION 6
-#else
-#define COMCTL32_VERSION 5
-#endif
-#endif
-
-#define LVM_FIRST 0x1000
-#define TV_FIRST 0x1100
-#define HDM_FIRST 0x1200
-#define ACM_OPENA (WM_USER+100)
-#define ACM_PLAY (WM_USER+101)
-#define ACM_STOP (WM_USER+102)
-#define ACM_OPENW (WM_USER+103)
-#define ACN_START 1
-#define ACN_STOP 2
-#define CBEIF_TEXT 0x00000001
-#define CBEIF_IMAGE 0x00000002
-#define CBEIF_SELECTEDIMAGE 0x00000004
-#define CBEIF_OVERLAY 0x00000008
-#define CBEIF_INDENT 0x00000010
-#define CBEIF_LPARAM 0x00000020
-#define CBEIF_DI_SETITEM 0x10000000
-#define CBEN_INSERTITEM (CBEN_FIRST - 1)
-#define CBEN_DELETEITEM (CBEN_FIRST - 2)
-#define CBEN_BEGINEDIT (CBEN_FIRST - 4)
-#define CBEN_ENDEDITA (CBEN_FIRST - 5)
-#define CBEN_ENDEDITW (CBEN_FIRST - 6)
-#define CBENF_KILLFOCUS 1
-#define CBENF_RETURN 2
-#define CBENF_ESCAPE 3
-#define CBENF_DROPDOWN 4
-#define CBEMAXSTRLEN 260
-#define DL_BEGINDRAG 1157
-#define DL_CANCELDRAG 1160
-#define DL_DRAGGING 1158
-#define DL_DROPPED 1159
-#define DL_CURSORSET 0
-#define DL_STOPCURSOR 1
-#define DL_COPYCURSOR 2
-#define DL_MOVECURSOR 3
-#define CCS_TOP 1
-#define CCS_NOMOVEY 2
-#define CCS_BOTTOM 3
-#define CCS_NORESIZE 4
-#define CCS_NOPARENTALIGN 8
-#define CCS_ADJUSTABLE 32
-#define CCS_NODIVIDER 64
-#if (_WIN32_IE >= 0x0300)
-#define CCS_VERT 128
-#define CCS_LEFT 129
-#define CCS_NOMOVEX 130
-#define CCS_RIGHT 131
-#endif
-#define ACS_CENTER 0x0001
-#define ACS_TRANSPARENT 0x0002
-#define ACS_AUTOPLAY 0x0004
-#define ACS_TIMER 0x0008
-#define PGS_VERT 0x00000000
-#define PGS_HORZ 0x00000001
-#define PGS_AUTOSCROLL 0x00000002
-#define PGS_DRAGNDROP 0x00000004
-#define CMB_MASKED 2
-#define MINSYSCOMMAND SC_SIZE
-#define SBT_OWNERDRAW 0x1000
-#define SBT_NOBORDERS 256
-#define SBT_POPOUT 512
-#define SBT_RTLREADING 1024
-#define SB_SETTEXTA (WM_USER+1)
-#define SB_SETTEXTW (WM_USER+11)
-#define SB_GETTEXTA (WM_USER+2)
-#define SB_GETTEXTW (WM_USER+13)
-#define SB_GETTEXTLENGTHA (WM_USER+3)
-#define SB_GETTEXTLENGTHW (WM_USER+12)
-#define SB_SETPARTS (WM_USER+4)
-#define SB_GETPARTS (WM_USER+6)
-#define SB_GETBORDERS (WM_USER+7)
-#define SB_SETMINHEIGHT (WM_USER+8)
-#define SB_SIMPLE (WM_USER+9)
-#define SB_GETRECT (WM_USER+10)
-#define MSGF_COMMCTRL_BEGINDRAG 0x4200
-#define MSGF_COMMCTRL_SIZEHEADER 0x4201
-#define MSGF_COMMCTRL_DRAGSELECT 0x4202
-#define MSGF_COMMCTRL_TOOLBARCUST 0x4203
-#define ILC_COLOR 0
-#define ILC_COLOR4 4
-#define ILC_COLOR8 8
-#define ILC_COLOR16 16
-#define ILC_COLOR24 24
-#define ILC_COLOR32 32
-#define ILC_COLORDDB 254
-#define ILC_MASK 1
-#define ILC_PALETTE 2048
-#define ILCF_MOVE 0
-#define ILCF_SWAP 1
-#define ILS_NORMAL 0
-#define ILS_GLOW 1
-#define ILS_SHADOW 2
-#define ILS_SATURATE 4
-#define ILS_ALPHA 8
-#define ILD_BLEND25 2
-#define ILD_BLEND50 4
-#define ILD_SELECTED 4
-#define ILD_BLEND 4
-#define ILD_FOCUS 2
-#define ILD_MASK 16
-#define ILD_NORMAL 0
-#define ILD_TRANSPARENT 1
-#define ILD_IMAGE 0x0020
-#define ILD_ROP 0x0040
-#define ILD_OVERLAYMASK 0x0F00
-#define ILD_PRESERVEALPHA 0x1000
-#define ILD_SCALE 0x2000
-#define ILD_DPISCALE 0x4000
-#define HDS_HORZ 0
-#define HDS_BUTTONS 2
-#define HDS_HIDDEN 8
-#if (_WIN32_IE > 0x0300)
-#define HDS_HOTTRACK 4
-#define HDS_DRAGDROP 0x0040
-#define HDS_FULLDRAG 0x0080
-#endif /* _WIN32_IE > 0x0300 */
-#if (_WIN32_IE >= 0x0500)
-#define HDS_FILTERBAR 0x0100
-#endif /* _WIN32_IE >= 0x0500 */
-#define NM_FIRST 0
-#define NM_LAST ((UINT)-99)
-#define LVN_FIRST ((UINT)-100)
-#define LVN_LAST ((UINT)-199)
-#define HDN_FIRST ((UINT)-300)
-#define HDN_LAST ((UINT)-399)
-#define TVN_FIRST ((UINT)-400)
-#define TVN_LAST ((UINT)-499)
-#define TTN_FIRST ((UINT)-520)
-#define TTN_LAST ((UINT)-549)
-#define TCN_FIRST ((UINT)-550)
-#define TCN_LAST ((UINT)-580)
-#ifndef CDN_FIRST
-#define CDN_FIRST ((UINT)-601) /* also in commdlg.h */
-#define CDN_LAST ((UINT)-699)
-#endif
-#define TBN_FIRST ((UINT)-700)
-#define TBN_LAST ((UINT)-720)
-#define UDN_FIRST ((UINT)-721)
-#define UDN_LAST ((UINT)-740)
-#if (_WIN32_IE >= 0x0300)
-#define RBN_FIRST ((UINT)-831)
-#define RBN_LAST ((UINT)-859)
-#define MCN_FIRST ((UINT)-750)
-#define MCN_LAST ((UINT)-759)
-#define DTN_FIRST ((UINT)-760)
-#define DTN_LAST ((UINT)-799)
-#define CBEN_FIRST ((UINT)-800)
-#define CBEN_LAST ((UINT)-830)
-#endif /* _WIN32_IE */
-#if (_WIN32_IE >= 0x0400)
-#define IPN_FIRST ((UINT)-860)
-#define IPN_LAST ((UINT)-879)
-#define IPN_FIELDCHANGED (IPN_FIRST-0)
-#define SBN_FIRST ((UINT)-880U)
-#define SBN_LAST ((UINT)-899U)
-#define PGN_FIRST ((UINT)-900U)
-#define PGN_LAST ((UINT)-950U)
-#define PGN_SCROLL (PGN_FIRST-1)
-#define PGN_CALCSIZE (PGN_FIRST-2)
-#endif /* _WIN32_IE >= 0x0400 */
-#define HDI_WIDTH 1
-#define HDI_HEIGHT 1
-#define HDI_TEXT 2
-#define HDI_FORMAT 4
-#define HDI_LPARAM 8
-#define HDI_BITMAP 16
-#if (_WIN32_IE >= 0x0300)
-#define HDI_IMAGE 32
-#define HDI_DI_SETITEM 64
-#define HDI_ORDER 128
-#endif
-#define CBES_EX_NOEDITIMAGE 0x00000001
-#define CBES_EX_NOEDITIMAGEINDENT 0x00000002
-#define CBES_EX_PATHWORDBREAKPROC 0x00000004
-#if (_WIN32_IE >= 0x0400)
-#define CBES_EX_NOSIZELIMIT 0x00000008
-#define CBES_EX_CASESENSITIVE 0x00000010
-#define CBEN_GETDISPINFOA (CBEN_FIRST - 0)
-#define CBEN_GETDISPINFOW (CBEN_FIRST - 7)
-#define CBEN_DRAGBEGINA (CBEN_FIRST - 8)
-#define CBEN_DRAGBEGINW (CBEN_FIRST - 9)
-#endif /* _WIN32_IE >= 0x0400 */
-#if (_WIN32_IE >= 0x0500)
-#define HDI_FILTER 256
-#endif
-#define HDF_LEFT 0
-#define HDF_RIGHT 1
-#define HDF_CENTER 2
-#define HDF_JUSTIFYMASK 3
-#define HDF_RTLREADING 4
-#define HDF_OWNERDRAW 0x8000
-#define HDF_STRING 0x4000
-#define HDF_BITMAP 0x2000
-#if (_WIN32_IE >= 0x0300)
-#define HDF_BITMAP_ON_RIGHT 0x1000
-#define HDF_IMAGE 0x0800
-#endif
-#define HDM_GETITEMCOUNT HDM_FIRST
-#define HDM_INSERTITEMA (HDM_FIRST+1)
-#define HDM_INSERTITEMW (HDM_FIRST+10)
-#define HDM_DELETEITEM (HDM_FIRST+2)
-#define HDM_GETITEMA (HDM_FIRST+3)
-#define HDM_GETITEMW (HDM_FIRST+11)
-#define HDM_SETITEMA (HDM_FIRST+4)
-#define HDM_SETITEMW (HDM_FIRST+12)
-#define HDM_LAYOUT (HDM_FIRST+5)
-#if (_WIN32_IE >= 0x0300)
-#define HDM_GETITEMRECT (HDM_FIRST+7)
-#define HDM_SETIMAGELIST (HDM_FIRST+8)
-#define HDM_GETIMAGELIST (HDM_FIRST+9)
-#define HDM_ORDERTOINDEX (HDM_FIRST+15)
-#define HDM_CREATEDRAGIMAGE (HDM_FIRST+16)
-#define HDM_GETORDERARRAY (HDM_FIRST+17)
-#define HDM_SETORDERARRAY (HDM_FIRST+18)
-#define HDM_SETHOTDIVIDER (HDM_FIRST+19)
-#endif
-#if (_WIN32_IE >= 0x0400)
-#define HDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
-#define HDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
-#endif
-#define HHT_NOWHERE 1
-#define HHT_ONHEADER 2
-#define HHT_ONDIVIDER 4
-#define HHT_ONDIVOPEN 8
-#define HHT_ABOVE 256
-#define HHT_BELOW 512
-#define HHT_TORIGHT 1024
-#define HHT_TOLEFT 2048
-#define HDM_HITTEST (HDM_FIRST+6)
-#define HDN_ITEMCHANGINGA (HDN_FIRST-0)
-#define HDN_ITEMCHANGINGW (HDN_FIRST-20)
-#define HDN_ITEMCHANGEDA (HDN_FIRST-1)
-#define HDN_ITEMCHANGEDW (HDN_FIRST-21)
-#define HDN_ITEMCLICKA (HDN_FIRST-2)
-#define HDN_ITEMCLICKW (HDN_FIRST-22)
-#define HDN_ITEMDBLCLICKA (HDN_FIRST-3)
-#define HDN_ITEMDBLCLICKW (HDN_FIRST-23)
-#define HDN_DIVIDERDBLCLICKA (HDN_FIRST-5)
-#define HDN_DIVIDERDBLCLICKW (HDN_FIRST-25)
-#define HDN_BEGINTRACKA (HDN_FIRST-6)
-#define HDN_BEGINTRACKW (HDN_FIRST-26)
-#define HDN_ENDTRACKA (HDN_FIRST-7)
-#define HDN_ENDTRACKW (HDN_FIRST-27)
-#define HDN_TRACKA (HDN_FIRST-8)
-#define HDN_TRACKW (HDN_FIRST-28)
-#if _WIN32_IE >= 0x0300
-#define HDN_ENDDRAG (HDN_FIRST-11)
-#define HDN_BEGINDRAG (HDN_FIRST-10)
-#define HDN_GETDISPINFOA (HDN_FIRST-9)
-#define HDN_GETDISPINFOW (HDN_FIRST-29)
-#endif
-#if (_WIN32_IE >= 0x0400)
-#define HICF_OTHER 0x00
-#define HICF_MOUSE 0x01
-#define HICF_ARROWKEYS 0x02
-#define HICF_ACCELERATOR 0x04
-#define HICF_DUPACCEL 0x08
-#define HICF_ENTERING 0x10
-#define HICF_LEAVING 0x20
-#define HICF_RESELECT 0x40
-#define HICF_LMOUSE 0x80
-#define HICF_TOGGLEDROPDOWN 0x100
-#endif /* _WIN32_IE >= 0x0400 */
-#define IPM_CLEARADDRESS (WM_USER+100)
-#define IPM_SETADDRESS (WM_USER+101)
-#define IPM_GETADDRESS (WM_USER+102)
-#define IPM_SETRANGE (WM_USER+103)
-#define IPM_SETFOCUS (WM_USER+104)
-#define IPM_ISBLANK (WM_USER+105)
-#if (_WIN32_IE >= 0x0500)
-#define I_INDENTCALLBACK (-1)
-#define I_IMAGENONE (-2)
-#endif
-#define CMB_MASKED 2
-#define TBSTATE_CHECKED 1
-#define TBSTATE_PRESSED 2
-#define TBSTATE_ENABLED 4
-#define TBSTATE_HIDDEN 8
-#define TBSTATE_INDETERMINATE 16
-#define TBSTATE_WRAP 32
-#if (_WIN32_IE >= 0x0300)
-#define TBSTATE_ELLIPSES 0x40
-#endif
-#if (_WIN32_IE >= 0x0400)
-#define TBSTATE_MARKED 0x0080
-#endif
-#define TBSTYLE_BUTTON 0
-#define TBSTYLE_SEP 1
-#define TBSTYLE_CHECK 2
-#define TBSTYLE_GROUP 4
-#define TBSTYLE_CHECKGROUP (TBSTYLE_GROUP|TBSTYLE_CHECK)
-#if (_WIN32_IE >= 0x0300)
-#define TBSTYLE_DROPDOWN 8
-#endif
-#if (_WIN32_IE >= 0x0400)
-#define TBSTYLE_AUTOSIZE 16
-#define TBSTYLE_NOPREFIX 32
-#endif
-#define TBSTYLE_TOOLTIPS 256
-#define TBSTYLE_WRAPABLE 512
-#define TBSTYLE_ALTDRAG 1024
-#if (_WIN32_IE >= 0x0300)
-#define TBSTYLE_FLAT 2048
-#define TBSTYLE_LIST 4096
-#define TBSTYLE_CUSTOMERASE 8192
-#endif
-#if (_WIN32_IE >= 0x0400)
-#define TBSTYLE_REGISTERDROP 0x4000
-#define TBSTYLE_TRANSPARENT 0x8000
-#define TBSTYLE_EX_DRAWDDARROWS 0x00000001
-#endif /* _WIN32_IE >= 0x0400 */
-#if (_WIN32_IE >= 0x0501)
-#define TBSTYLE_EX_MIXEDBUTTONS 8
-#define TBSTYLE_EX_HIDECLIPPEDBUTTONS 16
-#endif /* _WIN32_IE >= 0x0501 */
-#if (_WIN32_WINNT >= 0x0501)
-#define TBSTYLE_EX_DOUBLEBUFFER 0x80
-#endif /* _WIN32_WINNT >= 0x0501 */
-#if (_WIN32_IE >= 0x0500)
-#define BTNS_BUTTON TBSTYLE_BUTTON
-#define BTNS_SEP TBSTYLE_SEP
-#define BTNS_CHECK TBSTYLE_CHECK
-#define BTNS_GROUP TBSTYLE_GROUP
-#define BTNS_CHECKGROUP TBSTYLE_CHECKGROUP
-#define BTNS_DROPDOWN TBSTYLE_DROPDOWN
-#define BTNS_AUTOSIZE TBSTYLE_AUTOSIZE
-#define BTNS_NOPREFIX TBSTYLE_NOPREFIX
-#define BTNS_WHOLEDROPDOWN 0x0080
-#endif /* _WIN32_IE >= 0x0500 */
-#if _WIN32_IE >= 0x0501
-#define BTNS_SHOWTEXT 0x0040
-#endif
-#if (_WIN32_IE >= 0x0400)
-#define TBCDRF_NOEDGES 0x10000
-#define TBCDRF_HILITEHOTTRACK 0x20000
-#define TBCDRF_NOOFFSET 0x40000
-#define TBCDRF_NOMARK 0x80000
-#define TBCDRF_NOETCHEDEFFECT 0x100000
-#endif /* _WIN32_IE >= 0x0400 */
-#define HINST_COMMCTRL ((HINSTANCE)-1)
-#define IDB_STD_SMALL_COLOR 0
-#define IDB_STD_LARGE_COLOR 1
-#define IDB_VIEW_SMALL_COLOR 4
-#define IDB_VIEW_LARGE_COLOR 5
-#if (_WIN32_IE >= 0x0300)
-#define IDB_HIST_SMALL_COLOR 8
-#define IDB_HIST_LARGE_COLOR 9
-#endif
-#define STD_CUT 0
-#define STD_COPY 1
-#define STD_PASTE 2
-#define STD_UNDO 3
-#define STD_REDOW 4
-#define STD_DELETE 5
-#define STD_FILENEW 6
-#define STD_FILEOPEN 7
-#define STD_FILESAVE 8
-#define STD_PRINTPRE 9
-#define STD_PROPERTIES 10
-#define STD_HELP 11
-#define STD_FIND 12
-#define STD_REPLACE 13
-#define STD_PRINT 14
-#define VIEW_LARGEICONS 0
-#define VIEW_SMALLICONS 1
-#define VIEW_LIST 2
-#define VIEW_DETAILS 3
-#define VIEW_SORTNAME 4
-#define VIEW_SORTSIZE 5
-#define VIEW_SORTDATE 6
-#define VIEW_SORTTYPE 7
-#define VIEW_PARENTFOLDER 8
-#define VIEW_NETCONNECT 9
-#define VIEW_NETDISCONNECT 10
-#define VIEW_NEWFOLDER 11
-#define TB_ENABLEBUTTON (WM_USER+1)
-#define TB_CHECKBUTTON (WM_USER+2)
-#define TB_PRESSBUTTON (WM_USER+3)
-#define TB_HIDEBUTTON (WM_USER+4)
-#define TB_INDETERMINATE (WM_USER+5)
-#if (_WIN32_IE >= 0x0400)
-#define TB_MARKBUTTON (WM_USER+6)
-#endif
-#define TB_ISBUTTONENABLED (WM_USER+9)
-#define TB_ISBUTTONCHECKED (WM_USER+10)
-#define TB_ISBUTTONPRESSED (WM_USER+11)
-#define TB_ISBUTTONHIDDEN (WM_USER+12)
-#define TB_ISBUTTONINDETERMINATE (WM_USER+13)
-#if (_WIN32_IE >= 0x0400)
-#define TB_ISBUTTONHIGHLIGHTED (WM_USER+14)
-#endif
-#define TB_SETSTATE (WM_USER+17)
-#define TB_GETSTATE (WM_USER+18)
-#define TB_ADDBITMAP (WM_USER+19)
-#if (_WIN32_IE >= 0x0400)
-#define TB_ADDBUTTONSA (WM_USER+20)
-#define TB_INSERTBUTTONA (WM_USER+21)
-#else
-#define TB_ADDBUTTONS (WM_USER+20)
-#define TB_INSERTBUTTON (WM_USER+21)
-#endif
-#define TB_DELETEBUTTON (WM_USER+22)
-#define TB_GETBUTTON (WM_USER+23)
-#define TB_BUTTONCOUNT (WM_USER+24)
-#define TB_COMMANDTOINDEX (WM_USER+25)
-#define TB_SAVERESTOREA (WM_USER+26)
-#define TB_SAVERESTOREW (WM_USER+76)
-#define TB_CUSTOMIZE (WM_USER+27)
-#define TB_ADDSTRINGA (WM_USER+28)
-#define TB_ADDSTRINGW (WM_USER+77)
-#define TB_GETITEMRECT (WM_USER+29)
-#define TB_BUTTONSTRUCTSIZE (WM_USER+30)
-#define TB_SETBUTTONSIZE (WM_USER+31)
-#define TB_SETBITMAPSIZE (WM_USER+32)
-#define TB_AUTOSIZE (WM_USER+33)
-#define TB_GETTOOLTIPS (WM_USER+35)
-#define TB_SETTOOLTIPS (WM_USER+36)
-#define TB_SETPARENT (WM_USER+37)
-#define TB_SETROWS (WM_USER+39)
-#define TB_GETROWS (WM_USER+40)
-#define TB_GETBITMAPFLAGS (WM_USER+41)
-#define TB_SETCMDID (WM_USER+42)
-#define TB_CHANGEBITMAP (WM_USER+43)
-#define TB_GETBITMAP (WM_USER+44)
-#define TB_GETBUTTONTEXTA (WM_USER+45)
-#define TB_GETBUTTONTEXTW (WM_USER+75)
-#define TB_REPLACEBITMAP (WM_USER+46)
-#define TB_GETBUTTONSIZE (WM_USER+58)
-#define TB_SETBUTTONWIDTH (WM_USER+59)
-#if (_WIN32_IE >= 0x0300)
-#define TB_SETINDENT (WM_USER+47)
-#define TB_SETIMAGELIST (WM_USER+48)
-#define TB_GETIMAGELIST (WM_USER+49)
-#define TB_LOADIMAGES (WM_USER+50)
-#define TB_GETRECT (WM_USER+51)
-#define TB_SETHOTIMAGELIST (WM_USER+52)
-#define TB_GETHOTIMAGELIST (WM_USER+53)
-#define TB_SETDISABLEDIMAGELIST (WM_USER+54)
-#define TB_GETDISABLEDIMAGELIST (WM_USER+55)
-#define TB_SETSTYLE (WM_USER+56)
-#define TB_GETSTYLE (WM_USER+57)
-#define TB_GETBUTTONSIZE (WM_USER+58)
-#define TB_SETBUTTONWIDTH (WM_USER+59)
-#define TB_SETMAXTEXTROWS (WM_USER+60)
-#define TB_GETTEXTROWS (WM_USER+61)
-#endif
-#if _WIN32_IE >= 0x400
-#define TB_GETOBJECT (WM_USER+62)
-#define TB_GETBUTTONINFOW (WM_USER+63)
-#define TB_SETBUTTONINFOW (WM_USER+64)
-#define TB_GETBUTTONINFOA (WM_USER+65)
-#define TB_SETBUTTONINFOA (WM_USER+66)
-#define TB_INSERTBUTTONW (WM_USER+67)
-#define TB_ADDBUTTONSW (WM_USER+68)
-#define TB_HITTEST (WM_USER+69)
-#define TB_SETEXTENDEDSTYLE (WM_USER+84)
-#define TB_GETEXTENDEDSTYLE (WM_USER+85)
-#define TB_SETDRAWTEXTFLAGS (WM_USER+70)
-#define TB_GETHOTITEM (WM_USER+71)
-#define TB_SETHOTITEM (WM_USER+72)
-#define TB_SETANCHORHIGHLIGHT (WM_USER+73)
-#define TB_GETANCHORHIGHLIGHT (WM_USER+74)
-#define TB_MAPACCELERATORA (WM_USER+78)
-#define TB_GETINSERTMARK (WM_USER+79)
-#define TB_SETINSERTMARK (WM_USER+80)
-#define TB_INSERTMARKHITTEST (WM_USER+81)
-#define TB_MOVEBUTTON (WM_USER+82)
-#define TB_GETMAXSIZE (WM_USER+83)
-#define TB_SETEXTENDEDSTYLE (WM_USER+84)
-#define TB_GETEXTENDEDSTYLE (WM_USER+85)
-#define TB_GETPADDING (WM_USER+86)
-#define TB_SETPADDING (WM_USER+87)
-#define TB_SETINSERTMARKCOLOR (WM_USER+88)
-#define TB_GETINSERTMARKCOLOR (WM_USER+89)
-#define TB_MAPACCELERATORW (WM_USER+90)
-#define TB_GETSTRINGW (WM_USER+91)
-#define TB_GETSTRINGA (WM_USER+92)
-#define TB_SETCOLORSCHEME CCM_SETCOLORSCHEME
-#define TB_GETCOLORSCHEME CCM_GETCOLORSCHEME
-#define TB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
-#define TB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
-#endif
-#define TBBF_LARGE 1
-#define TBN_GETBUTTONINFOA (TBN_FIRST-0)
-#define TBN_BEGINDRAG (TBN_FIRST-1)
-#define TBN_ENDDRAG (TBN_FIRST-2)
-#define TBN_BEGINADJUST (TBN_FIRST-3)
-#define TBN_ENDADJUST (TBN_FIRST-4)
-#define TBN_RESET (TBN_FIRST-5)
-#define TBN_QUERYINSERT (TBN_FIRST-6)
-#define TBN_QUERYDELETE (TBN_FIRST-7)
-#define TBN_TOOLBARCHANGE (TBN_FIRST-8)
-#define TBN_CUSTHELP (TBN_FIRST-9)
-#if (_WIN32_IE >= 0x0300)
-#define TBN_DROPDOWN (TBN_FIRST-10)
-#endif
-#if (_WIN32_IE >= 0x0400)
-#define TBN_HOTITEMCHANGE (TBN_FIRST-13)
-#define TBN_DRAGOUT (TBN_FIRST-14)
-#define TBN_DELETINGBUTTON (TBN_FIRST-15)
-#define TBN_GETDISPINFOA (TBN_FIRST-16)
-#define TBN_GETDISPINFOW (TBN_FIRST-17)
-#define TBN_GETINFOTIPA (TBN_FIRST-18)
-#define TBN_GETINFOTIPW (TBN_FIRST-19)
-#define TBN_GETBUTTONINFOW (TBN_FIRST-20)
-#endif
-#if (_WIN32_IE >= 0x0500)
-#define TBN_RESTORE (TBN_FIRST-21)
-#define TBN_SAVE (TBN_FIRST-22)
-#define TBN_INITCUSTOMIZE (TBN_FIRST-23)
-#define TBNRF_HIDEHELP 1
-#define TBNRF_ENDCUSTOMIZE 2
-#define TBNF_IMAGE 1
-#define TBNF_TEXT 2
-#define TBNF_DI_SETITEM 0x10000000
-#endif /* _WIN32_IE >= 0x0500 */
-#define TTS_ALWAYSTIP 1
-#define TTS_NOPREFIX 2
-#if( _WIN32_IE >= 0x0500 )
-#define TTS_NOANIMATE 0x10
-#define TTS_NOFADE 0x20
-#define TTS_BALLOON 0x40
-#define TTS_CLOSE 0x80
-#endif /* _WIN32_IE >= 0x0500 */
-#define TTF_IDISHWND 1
-#define TTF_CENTERTIP 2
-#define TTF_RTLREADING 4
-#define TTF_SUBCLASS 16
-#if (_WIN32_IE >= 0x0300)
-#define TTF_TRACK 0x0020
-#define TTF_ABSOLUTE 0x0080
-#define TTF_TRANSPARENT 0x0100
-#if (_WIN32_IE >= 0x0501)
-#define TTF_PARSELINKS 0x1000
-#endif
-#define TTF_DI_SETITEM 0x8000
-#define TBCD_TICS 1
-#define TBCD_THUMB 2
-#define TBCD_CHANNEL 3
-#endif /* _WIN32_IE >= 0x0300 */
-#if (_WIN32_IE >= 0x0400)
-#define TBDDRET_DEFAULT 0
-#define TBDDRET_NODEFAULT 1
-#define TBDDRET_TREATPRESSED 2
-#define TBIMHT_AFTER 1
-#define TBIMHT_BACKGROUND 2
-#endif
-#define TTDT_AUTOMATIC 0
-#define TTDT_RESHOW 1
-#define TTDT_AUTOPOP 2
-#define TTDT_INITIAL 3
-#define TTM_ACTIVATE (WM_USER+1)
-#define TTM_SETDELAYTIME (WM_USER+3)
-#define TTM_ADDTOOLA (WM_USER+4)
-#define TTM_ADDTOOLW (WM_USER+50)
-#define TTM_DELTOOLA (WM_USER+5)
-#define TTM_DELTOOLW (WM_USER+51)
-#define TTM_NEWTOOLRECTA (WM_USER+6)
-#define TTM_NEWTOOLRECTW (WM_USER+52)
-#define TTM_RELAYEVENT (WM_USER+7)
-#define TTM_GETTOOLINFOA (WM_USER+8)
-#define TTM_GETTOOLINFOW (WM_USER+53)
-#define TTM_SETTOOLINFOA (WM_USER+9)
-#define TTM_SETTOOLINFOW (WM_USER+54)
-#define TTM_HITTESTA (WM_USER+10)
-#define TTM_HITTESTW (WM_USER+55)
-#define TTM_GETTEXTA (WM_USER+11)
-#define TTM_GETTEXTW (WM_USER+56)
-#define TTM_UPDATETIPTEXTA (WM_USER+12)
-#define TTM_UPDATETIPTEXTW (WM_USER+57)
-#define TTM_GETTOOLCOUNT (WM_USER+13)
-#define TTM_ENUMTOOLSA (WM_USER+14)
-#define TTM_ENUMTOOLSW (WM_USER+58)
-#define TTM_GETCURRENTTOOLA (WM_USER+15)
-#define TTM_GETCURRENTTOOLW (WM_USER+59)
-#define TTM_WINDOWFROMPOINT (WM_USER+16)
-#if (_WIN32_IE >= 0x0300)
-#define TTM_TRACKACTIVATE (WM_USER+17)
-#define TTM_TRACKPOSITION (WM_USER+18)
-#define TTM_SETTIPBKCOLOR (WM_USER+19)
-#define TTM_SETTIPTEXTCOLOR (WM_USER+20)
-#define TTM_GETDELAYTIME (WM_USER+21)
-#define TTM_GETTIPBKCOLOR (WM_USER+22)
-#define TTM_GETTIPTEXTCOLOR (WM_USER+23)
-#define TTM_SETMAXTIPWIDTH (WM_USER+24)
-#define TTM_GETMAXTIPWIDTH (WM_USER+25)
-#define TTM_SETMARGIN (WM_USER+26)
-#define TTM_GETMARGIN (WM_USER+27)
-#define TTM_POP (WM_USER+28)
-#endif /* _WIN32_IE */
-#if (_WIN32_IE >= 0x0400) /* IE4.0 ??? */
-#define TTM_UPDATE (WM_USER+29)
-#define TTM_GETBUBBLESIZE (WM_USER+30)
-#define TTM_ADJUSTRECT (WM_USER+31)
-#define TTM_SETTITLEA (WM_USER+32)
-#define TTM_SETTITLEW (WM_USER+33)
-#endif
-#define TTN_GETDISPINFOA (TTN_FIRST - 0)
-#define TTN_GETDISPINFOW (TTN_FIRST - 10)
-#define TTN_NEEDTEXTA TTN_GETDISPINFOA
-#define TTN_NEEDTEXTW TTN_GETDISPINFOW
-#define TTN_SHOW (TTN_FIRST-1)
-#define TTN_POP (TTN_FIRST-2)
-#define UD_MAXVAL 0x7fff
-#define UD_MINVAL (-UD_MAXVAL)
-#define UDN_DELTAPOS (UDN_FIRST-1)
-#define UDS_WRAP 1
-#define UDS_SETBUDDYINT 2
-#define UDS_ALIGNRIGHT 4
-#define UDS_ALIGNLEFT 8
-#define UDS_AUTOBUDDY 16
-#define UDS_ARROWKEYS 32
-#define UDS_HORZ 64
-#define UDS_NOTHOUSANDS 128
-#if ( _WIN32_IE >= 0x0300 )
-#define UDS_HOTTRACK 0x0100
-#endif /* _WIN32_IE >= 0x0300 */
-#define UDM_SETRANGE (WM_USER+101)
-#define UDM_GETRANGE (WM_USER+102)
-#define UDM_SETPOS (WM_USER+103)
-#define UDM_GETPOS (WM_USER+104)
-#define UDM_SETBUDDY (WM_USER+105)
-#define UDM_GETBUDDY (WM_USER+106)
-#define UDM_SETACCEL (WM_USER+107)
-#define UDM_GETACCEL (WM_USER+108)
-#define UDM_SETBASE (WM_USER+109)
-#define UDM_GETBASE (WM_USER+110)
-#if (_WIN32_IE >= 0x0400)
-#define UDM_SETRANGE32 (WM_USER+111)
-#define UDM_GETRANGE32 (WM_USER+112)
-#define UDM_SETPOS32 (WM_USER+113)
-#define UDM_GETPOS32 (WM_USER+114)
-#endif
-#if (_WIN32_IE >= 0x0500)
-#define UDM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
-#define UDM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
-#endif
-#define SB_SETTEXTA (WM_USER+1)
-#define SB_SETTEXTW (WM_USER+11)
-#define SB_GETTEXTA (WM_USER+2)
-#define SB_GETTEXTW (WM_USER+13)
-#define SB_GETTEXTLENGTHA (WM_USER+3)
-#define SB_GETTEXTLENGTHW (WM_USER+12)
-#define SB_SETPARTS (WM_USER+4)
-#define SB_GETPARTS (WM_USER+6)
-#define SB_GETBORDERS (WM_USER+7)
-#define SB_SETMINHEIGHT (WM_USER+8)
-#define SB_SIMPLE (WM_USER+9)
-#define SB_GETRECT (WM_USER+10)
-#define SBT_OWNERDRAW 0x1000
-#define SBT_NOBORDERS 256
-#define SBT_POPOUT 512
-#define SBT_RTLREADING 1024
-#if( _WIN32_IE >= 0x0400 )
-#define SBT_TOOLTIPS 0x0800
-#define SBN_SIMPLEMODECHANGE (SBN_FIRST)
-#endif /* _WIN32_IE >= 0x0400 */
-#define TBS_AUTOTICKS 1
-#define TBS_VERT 2
-#define TBS_HORZ 0
-#define TBS_TOP 4
-#define TBS_BOTTOM 0
-#define TBS_LEFT 4
-#define TBS_RIGHT 0
-#define TBS_BOTH 8
-#define TBS_NOTICKS 16
-#define TBS_ENABLESELRANGE 32
-#define TBS_FIXEDLENGTH 64
-#define TBS_NOTHUMB 128
-#if (_WIN32_IE >= 0x0300)
-#define TBS_TOOLTIPS 0x0100
-#define TBTS_TOP 0
-#define TBTS_LEFT 1
-#define TBTS_BOTTOM 2
-#define TBTS_RIGHT 3
-#endif
-#if (_WIN32_IE >= 0x0500)
-#define TBS_REVERSED 0x0200
-#endif
-#if (_WIN32_IE >= 0x0501)
-#define TBS_DOWNISLEFT 0x0400
-#endif
-#if _WIN32_IE >= 0x400
-#define TBIF_BYINDEX 0x80000000
-#define TBIF_COMMAND 32
-#define TBIF_IMAGE 1
-#define TBIF_LPARAM 16
-#define TBIF_SIZE 64
-#define TBIF_STATE 4
-#define TBIF_STYLE 8
-#define TBIF_TEXT 2
-#endif
-#define TBM_GETPOS (WM_USER)
-#define TBM_GETRANGEMIN (WM_USER+1)
-#define TBM_GETRANGEMAX (WM_USER+2)
-#define TBM_GETTIC (WM_USER+3)
-#define TBM_SETTIC (WM_USER+4)
-#define TBM_SETPOS (WM_USER+5)
-#define TBM_SETRANGE (WM_USER+6)
-#define TBM_SETRANGEMIN (WM_USER+7)
-#define TBM_SETRANGEMAX (WM_USER+8)
-#define TBM_CLEARTICS (WM_USER+9)
-#define TBM_SETSEL (WM_USER+10)
-#define TBM_SETSELSTART (WM_USER+11)
-#define TBM_SETSELEND (WM_USER+12)
-#define TBM_GETPTICS (WM_USER+14)
-#define TBM_GETTICPOS (WM_USER+15)
-#define TBM_GETNUMTICS (WM_USER+16)
-#define TBM_GETSELSTART (WM_USER+17)
-#define TBM_GETSELEND (WM_USER+18)
-#define TBM_CLEARSEL (WM_USER+19)
-#define TBM_SETTICFREQ (WM_USER+20)
-#define TBM_SETPAGESIZE (WM_USER+21)
-#define TBM_GETPAGESIZE (WM_USER+22)
-#define TBM_SETLINESIZE (WM_USER+23)
-#define TBM_GETLINESIZE (WM_USER+24)
-#define TBM_GETTHUMBRECT (WM_USER+25)
-#define TBM_GETCHANNELRECT (WM_USER+26)
-#define TBM_SETTHUMBLENGTH (WM_USER+27)
-#define TBM_GETTHUMBLENGTH (WM_USER+28)
-#define TBM_SETTOOLTIPS (WM_USER+29)
-#define TBM_GETTOOLTIPS (WM_USER+30)
-#define TBM_SETTIPSIDE (WM_USER+31)
-#define TBM_SETBUDDY (WM_USER+32)
-#define TBM_GETBUDDY (WM_USER+33)
-#define TBM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
-#define TBM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
-#define TB_LINEUP 0
-#define TB_LINEDOWN 1
-#define TB_PAGEUP 2
-#define TB_PAGEDOWN 3
-#define TB_THUMBPOSITION 4
-#define TB_THUMBTRACK 5
-#define TB_TOP 6
-#define TB_BOTTOM 7
-#define TB_ENDTRACK 8
-#define HOTKEYF_SHIFT 1
-#define HOTKEYF_CONTROL 2
-#define HOTKEYF_ALT 4
-#define HOTKEYF_EXT 8
-#define HKCOMB_NONE 1
-#define HKCOMB_S 2
-#define HKCOMB_C 4
-#define HKCOMB_A 8
-#define HKCOMB_SC 16
-#define HKCOMB_SA 32
-#define HKCOMB_CA 64
-#define HKCOMB_SCA 128
-#define HKM_SETHOTKEY (WM_USER+1)
-#define HKM_GETHOTKEY (WM_USER+2)
-#define HKM_SETRULES (WM_USER+3)
-#define PBM_SETRANGE (WM_USER+1)
-#define PBM_SETPOS (WM_USER+2)
-#define PBM_DELTAPOS (WM_USER+3)
-#define PBM_SETSTEP (WM_USER+4)
-#define PBM_STEPIT (WM_USER+5)
-#define PBM_SETRANGE32 1030
-#define PBM_GETRANGE 1031
-#define PBM_GETPOS 1032
-#define PBM_SETBARCOLOR 1033
-#define PBM_SETBKCOLOR CCM_SETBKCOLOR
-#define PBS_SMOOTH 1
-#define PBS_VERTICAL 4
-#define LVS_ICON 0
-#define LVS_REPORT 1
-#define LVS_SMALLICON 2
-#define LVS_LIST 3
-#define LVS_TYPEMASK 3
-#define LVS_SINGLESEL 4
-#define LVS_SHOWSELALWAYS 8
-#define LVS_SORTASCENDING 16
-#define LVS_SORTDESCENDING 32
-#define LVS_SHAREIMAGELISTS 64
-#define LVS_NOLABELWRAP 128
-#define LVS_AUTOARRANGE 256
-#define LVS_EDITLABELS 512
-#define LVS_NOSCROLL 0x2000
-#define LVS_TYPESTYLEMASK 0xfc00
-#define LVS_ALIGNTOP 0
-#define LVS_ALIGNLEFT 0x800
-#define LVS_ALIGNMASK 0xc00
-#define LVS_OWNERDRAWFIXED 0x400
-#define LVS_NOCOLUMNHEADER 0x4000
-#define LVS_NOSORTHEADER 0x8000
-#if (_WIN32_IE >= 0x0300)
-#define CDIS_CHECKED 8
-#define CDIS_DEFAULT 32
-#define CDIS_DISABLED 4
-#define CDIS_FOCUS 16
-#define CDIS_GRAYED 2
-#define CDIS_HOT 64
-#define CDIS_SELECTED 1
-#define CDIS_MARKED 128
-#define CDIS_INDETERMINATE 256
-#if (_WIN32_WINNT >= 0x0501)
-#define CDIS_SHOWKEYBOARDCUES 512
-#endif
-#define CDDS_POSTERASE 4
-#define CDDS_POSTPAINT 2
-#define CDDS_PREERASE 3
-#define CDDS_PREPAINT 1
-#define CDDS_ITEM 65536
-#define CDDS_ITEMPOSTERASE 65540
-#define CDDS_ITEMPOSTPAINT 65538
-#define CDDS_ITEMPREERASE 65539
-#define CDDS_ITEMPREPAINT 65537
-#if (_WIN32_IE >= 0x0400)
-#define CDDS_SUBITEM 0x20000
-#endif
-#define CDRF_DODEFAULT 0x00
-#define CDRF_NOTIFYITEMDRAW 0x20
-#define CDRF_NOTIFYSUBITEMDRAW 0x20
-#define CDRF_NOTIFYITEMERASE 0x80
-#define CDRF_NOTIFYPOSTERASE 0x40
-#define CDRF_NOTIFYPOSTPAINT 0x10
-#define CDRF_NEWFONT 0x02
-#define CDRF_SKIPDEFAULT 0x04
-#if (_WIN32_IE >= 0x0400)
-#define LVBKIF_SOURCE_NONE 0x00000000
-#define LVBKIF_SOURCE_HBITMAP 0x00000001
-#define LVBKIF_SOURCE_URL 0x00000002
-#define LVBKIF_SOURCE_MASK 0x00000003
-#define LVBKIF_STYLE_NORMAL 0x00000000
-#define LVBKIF_STYLE_TILE 0x00000010
-#define LVBKIF_STYLE_MASK 0x00000010
-#endif /* _WIN32_IE >=0x0400 */
-#if (_WIN32_WINNT >= 0x501)
-#define LVBKIF_FLAG_TILEOFFSET 0x00000100
-#define LVBKIF_TYPE_WATERMARK 0x10000000
-#endif /* _WIN32_WINNT >= 0x501 */
-#define LVS_OWNERDATA 4096
-#define LVS_EX_CHECKBOXES 4
-#define LVS_EX_FULLROWSELECT 32
-#define LVS_EX_GRIDLINES 1
-#define LVS_EX_HEADERDRAGDROP 16
-#define LVS_EX_ONECLICKACTIVATE 64
-#define LVS_EX_SUBITEMIMAGES 2
-#define LVS_EX_TRACKSELECT 8
-#define LVS_EX_TWOCLICKACTIVATE 128
-#define LVSICF_NOINVALIDATEALL 0x00000001
-#define LVSICF_NOSCROLL 0x00000002
-#if( _WIN32_IE >= 0x0400 )
-#define LVS_EX_FLATSB 0x00000100
-#define LVS_EX_REGIONAL 0x00000200
-#define LVS_EX_INFOTIP 0x00000400
-#define LVS_EX_UNDERLINEHOT 0x00000800
-#define LVS_EX_UNDERLINECOLD 0x00001000
-#define LVS_EX_MULTIWORKAREAS 0x00002000
-#endif /* _WIN32_IE >=0x0400 */
-#if( _WIN32_IE >= 0x0500 )
-#define LVS_EX_LABELTIP 0x00004000
-#define LVS_EX_BORDERSELECT 0x00008000
-#endif /* _WIN32_IE >= 0x0500 */
-#endif /* _WIN32_IE >= 0x0300 */
-#define LVSIL_NORMAL 0
-#define LVSIL_SMALL 1
-#define LVSIL_STATE 2
-#define LVM_GETBKCOLOR LVM_FIRST
-#define LVM_SETBKCOLOR (LVM_FIRST+1)
-#define LVM_GETIMAGELIST (LVM_FIRST+2)
-#define LVM_SETIMAGELIST (LVM_FIRST+3)
-#define LVM_GETITEMCOUNT (LVM_FIRST+4)
-#define LVM_SORTITEMSEX (LVM_FIRST+81)
-#if (_WIN32_WINNT >= 0x501)
-#define LVM_SETSELECTEDCOLUMN (LVM_FIRST+140)
-#endif
-#define LVM_SETVIEW (LVM_FIRST+142)
-#define LVM_GETVIEW (LVM_FIRST+143)
-#define LVM_INSERTGROUP (LVM_FIRST+145)
-#define LVM_SETGROUPINFO (LVM_FIRST+147)
-#define LVM_GETGROUPINFO (LVM_FIRST+149)
-#define LVM_REMOVEGROUP (LVM_FIRST+150)
-#define LVM_MOVEGROUP (LVM_FIRST+151)
-#define LVM_SETGROUPMETRICS (LVM_FIRST+155)
-#define LVM_GETGROUPMETRICS (LVM_FIRST+156)
-#define LVM_ENABLEGROUPVIEW (LVM_FIRST+157)
-#define LVM_SORTGROUPS (LVM_FIRST+158)
-#define LVM_INSERTGROUPSORTED (LVM_FIRST+159)
-#define LVM_REMOVEALLGROUPS (LVM_FIRST+160)
-#define LVM_HASGROUP (LVM_FIRST+161)
-#define LVM_SETTILEVIEWINFO (LVM_FIRST+162)
-#define LVM_GETTILEVIEWINFO (LVM_FIRST+163)
-#define LVM_SETTILEINFO (LVM_FIRST+164)
-#define LVM_GETTILEINFO (LVM_FIRST+165)
-#define LVM_SETINSERTMARK (LVM_FIRST+166)
-#define LVM_GETINSERTMARK (LVM_FIRST+167)
-#define LVM_INSERTMARKHITTEST (LVM_FIRST+168)
-#define LVM_GETINSERTMARKRECT (LVM_FIRST+169)
-#define LVM_SETINSERTMARKCOLOR (LVM_FIRST+170)
-#define LVM_GETINSERTMARKCOLOR (LVM_FIRST+171)
-#define LVM_SETINFOTIP (LVM_FIRST+173)
-#define LVM_GETSELECTEDCOLUMN (LVM_FIRST+174)
-#define LVM_ISGROUPVIEWENABLED (LVM_FIRST+175)
-#define LVM_GETOUTLINECOLOR (LVM_FIRST+176)
-#define LVM_SETOUTLINECOLOR (LVM_FIRST+177)
-#define LVM_CANCELEDITLABEL (LVM_FIRST+179)
-#define LVM_MAPIDTOINDEX (LVM_FIRST+181)
-#define LVIF_TEXT 1
-#define LVIF_IMAGE 2
-#define LVIF_PARAM 4
-#define LVIF_STATE 8
-#if (_WIN32_IE >= 0x0300)
-#define LVIF_INDENT 16
-#define LVIF_NORECOMPUTE 2048
-#endif
-#if (_WIN32_WINNT >= 0x0501)
-#define LVIF_GROUPID 128
-#define LVIF_COLUMNS 256
-#endif
-#define LVIS_FOCUSED 1
-#define LVIS_SELECTED 2
-#define LVIS_CUT 4
-#define LVIS_DROPHILITED 8
-#define LVIS_OVERLAYMASK 0xF00
-#define LVIS_STATEIMAGEMASK 0xF000
-#define LPSTR_TEXTCALLBACKW ((LPWSTR)-1)
-#define LPSTR_TEXTCALLBACKA ((LPSTR)-1)
-#define I_IMAGECALLBACK (-1)
-#define LVM_GETITEMA (LVM_FIRST+5)
-#define LVM_GETITEMW (LVM_FIRST+75)
-#define LVM_SETITEMA (LVM_FIRST+6)
-#define LVM_SETITEMW (LVM_FIRST+76)
-#define LVM_INSERTITEMA (LVM_FIRST+7)
-#define LVM_INSERTITEMW (LVM_FIRST+77)
-#define LVM_DELETEITEM (LVM_FIRST+8)
-#define LVM_DELETEALLITEMS (LVM_FIRST+9)
-#define LVM_GETCALLBACKMASK (LVM_FIRST+10)
-#define LVM_SETCALLBACKMASK (LVM_FIRST+11)
-#if( _WIN32_IE >= 0x0400 )
-#define LVM_SETBKIMAGEA (LVM_FIRST + 68)
-#define LVM_SETBKIMAGEW (LVM_FIRST + 138)
-#define LVM_GETBKIMAGEA (LVM_FIRST + 69)
-#define LVM_GETBKIMAGEW (LVM_FIRST + 139)
-#define LV_MAX_WORKAREAS 16
-#define LVM_SETWORKAREAS (LVM_FIRST+65)
-#define LVM_GETWORKAREAS (LVM_FIRST+70)
-#define LVM_GETNUMBEROFWORKAREAS (LVM_FIRST+73)
-#define LVM_GETSELECTIONMARK (LVM_FIRST+66)
-#define LVM_SETSELECTIONMARK (LVM_FIRST+67)
-#define LVM_SETHOVERTIME (LVM_FIRST+71)
-#define LVM_GETHOVERTIME (LVM_FIRST+72)
-#define LVM_SETTOOLTIPS (LVM_FIRST+74)
-#define LVM_GETTOOLTIPS (LVM_FIRST+78)
-#define LVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
-#define LVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
-#endif /* _WIN32_IE >= 0x0400 */
-#define LVNI_ALL 0
-#define LVNI_FOCUSED 1
-#define LVNI_SELECTED 2
-#define LVNI_CUT 4
-#define LVNI_DROPHILITED 8
-#define LVNI_ABOVE 256
-#define LVNI_BELOW 512
-#define LVNI_TOLEFT 1024
-#define LVNI_TORIGHT 2048
-#define LVM_GETNEXTITEM (LVM_FIRST+12)
-#define LVFI_PARAM 1
-#define LVFI_STRING 2
-#define LVFI_PARTIAL 8
-#define LVFI_WRAP 32
-#define LVFI_NEARESTXY 64
-#define LVIF_DI_SETITEM 0x1000
-#define LVM_FINDITEMA (LVM_FIRST+13)
-#define LVM_FINDITEMW (LVM_FIRST+83)
-#define LVIR_BOUNDS 0
-#define LVIR_ICON 1
-#define LVIR_LABEL 2
-#define LVIR_SELECTBOUNDS 3
-#define LVM_GETITEMRECT (LVM_FIRST+14)
-#define LVM_SETITEMPOSITION (LVM_FIRST+15)
-#define LVM_GETITEMPOSITION (LVM_FIRST+16)
-#define LVM_GETSTRINGWIDTHA (LVM_FIRST+17)
-#define LVM_GETSTRINGWIDTHW (LVM_FIRST+87)
-#define LVHT_NOWHERE 1
-#define LVHT_ONITEMICON 2
-#define LVHT_ONITEMLABEL 4
-#define LVHT_ONITEMSTATEICON 8
-#define LVHT_ONITEM (LVHT_ONITEMICON|LVHT_ONITEMLABEL|LVHT_ONITEMSTATEICON)
-#define LVHT_ABOVE 8
-#define LVHT_BELOW 16
-#define LVHT_TORIGHT 32
-#define LVHT_TOLEFT 64
-#define LVM_HITTEST (LVM_FIRST+18)
-#define LVM_ENSUREVISIBLE (LVM_FIRST+19)
-#define LVM_SCROLL (LVM_FIRST+20)
-#define LVM_REDRAWITEMS (LVM_FIRST+21)
-#define LVA_DEFAULT 0
-#define LVA_ALIGNLEFT 1
-#define LVA_ALIGNTOP 2
-#define LVA_SNAPTOGRID 5
-#define LVM_ARRANGE (LVM_FIRST+22)
-#define LVM_EDITLABELA (LVM_FIRST+23)
-#define LVM_EDITLABELW (LVM_FIRST+118)
-#define LVM_GETEDITCONTROL (LVM_FIRST+24)
-#define LVCF_FMT 1
-#define LVCF_WIDTH 2
-#define LVCF_TEXT 4
-#define LVCF_SUBITEM 8
-#if (_WIN32_IE >= 0x0300)
-#define LVCF_IMAGE 16
-#define LVCF_ORDER 32
-#endif
-#define LVCFMT_LEFT 0
-#define LVCFMT_RIGHT 1
-#define LVCFMT_CENTER 2
-#define LVCFMT_JUSTIFYMASK 3
-#if (_WIN32_IE >= 0x0300)
-#define LVCFMT_BITMAP_ON_RIGHT 4096
-#define LVCFMT_COL_HAS_IMAGES 32768
-#define LVCFMT_IMAGE 2048
-#endif
-#define LVM_GETCOLUMNA (LVM_FIRST+25)
-#define LVM_GETCOLUMNW (LVM_FIRST+95)
-#define LVM_SETCOLUMNA (LVM_FIRST+26)
-#define LVM_SETCOLUMNW (LVM_FIRST+96)
-#define LVM_INSERTCOLUMNA (LVM_FIRST+27)
-#define LVM_INSERTCOLUMNW (LVM_FIRST+97)
-#define LVM_DELETECOLUMN (LVM_FIRST+28)
-#define LVM_GETCOLUMNWIDTH (LVM_FIRST+29)
-#define LVSCW_AUTOSIZE (-1)
-#define LVSCW_AUTOSIZE_USEHEADER (-2)
-#define LVM_SETCOLUMNWIDTH (LVM_FIRST+30)
-#define LVM_CREATEDRAGIMAGE (LVM_FIRST+33)
-#define LVM_GETVIEWRECT (LVM_FIRST+34)
-#define LVM_GETTEXTCOLOR (LVM_FIRST+35)
-#define LVM_SETTEXTCOLOR (LVM_FIRST+36)
-#define LVM_GETTEXTBKCOLOR (LVM_FIRST+37)
-#define LVM_SETTEXTBKCOLOR (LVM_FIRST+38)
-#define LVM_GETTOPINDEX (LVM_FIRST+39)
-#define LVM_GETCOUNTPERPAGE (LVM_FIRST+40)
-#define LVM_GETORIGIN (LVM_FIRST+41)
-#define LVM_GETORIGIN (LVM_FIRST+41)
-#define LVM_UPDATE (LVM_FIRST+42)
-#define LVM_SETITEMSTATE (LVM_FIRST+43)
-#define LVM_GETITEMSTATE (LVM_FIRST+44)
-#define LVM_GETITEMTEXTA (LVM_FIRST+45)
-#define LVM_GETITEMTEXTW (LVM_FIRST+115)
-#define LVM_SETITEMTEXTA (LVM_FIRST+46)
-#define LVM_SETITEMTEXTW (LVM_FIRST+116)
-#define LVM_SETITEMCOUNT (LVM_FIRST+47)
-#define LVM_SORTITEMS (LVM_FIRST+48)
-#define LVM_SETITEMPOSITION32 (LVM_FIRST+49)
-#define LVM_GETSELECTEDCOUNT (LVM_FIRST+50)
-#define LVM_GETITEMSPACING (LVM_FIRST+51)
-#define LVM_GETISEARCHSTRINGA (LVM_FIRST+52)
-#define LVM_GETISEARCHSTRINGW (LVM_FIRST+117)
-#if (_WIN32_IE >= 0x0300)
-#define LVM_APPROXIMATEVIEWRECT (LVM_FIRST+64)
-#define LVM_SETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+54)
-#define LVM_GETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+55)
-#define LVM_SETCOLUMNORDERARRAY (LVM_FIRST+58)
-#define LVM_GETCOLUMNORDERARRAY (LVM_FIRST+59)
-#define LVM_GETHEADER (LVM_FIRST+31)
-#define LVM_GETHOTCURSOR (LVM_FIRST+63)
-#define LVM_GETHOTITEM (LVM_FIRST+61)
-#define LVM_GETSUBITEMRECT (LVM_FIRST+56)
-#define LVM_SETHOTCURSOR (LVM_FIRST+62)
-#define LVM_SETHOTITEM (LVM_FIRST+60)
-#define LVM_SETICONSPACING (LVM_FIRST+53)
-#define LVM_SUBITEMHITTEST (LVM_FIRST+57)
-#endif
-#define LVN_ITEMCHANGING LVN_FIRST
-#define LVN_ITEMCHANGED (LVN_FIRST-1)
-#define LVN_INSERTITEM (LVN_FIRST-2)
-#define LVN_DELETEITEM (LVN_FIRST-3)
-#define LVN_DELETEALLITEMS (LVN_FIRST-4)
-#define LVN_BEGINLABELEDITA (LVN_FIRST-5)
-#define LVN_BEGINLABELEDITW (LVN_FIRST-75)
-#define LVN_ENDLABELEDITA (LVN_FIRST-6)
-#define LVN_ENDLABELEDITW (LVN_FIRST-76)
-#define LVN_COLUMNCLICK (LVN_FIRST-8)
-#define LVN_BEGINDRAG (LVN_FIRST-9)
-#define LVN_BEGINRDRAG (LVN_FIRST-11)
-#define LVN_GETDISPINFOA (LVN_FIRST-50)
-#define LVN_GETDISPINFOW (LVN_FIRST-77)
-#define LVN_SETDISPINFOA (LVN_FIRST-51)
-#define LVN_SETDISPINFOW (LVN_FIRST-78)
-#define LVN_KEYDOWN (LVN_FIRST-55)
-#if (_WIN32_IE >= 0x0400)
-#define LVN_MARQUEEBEGIN (LVN_FIRST-56)
-#define LVN_GETINFOTIPA (LVN_FIRST-57)
-#define LVN_GETINFOTIPW (LVN_FIRST-58)
-#define LVKF_ALT 0x0001
-#define LVKF_CONTROL 0x0002
-#define LVKF_SHIFT 0x0004
-#define LVGIT_UNFOLDED 1
-#endif
-#define TVS_HASBUTTONS 1
-#define TVS_HASLINES 2
-#define TVS_LINESATROOT 4
-#define TVS_EDITLABELS 8
-#define TVS_DISABLEDRAGDROP 16
-#define TVS_SHOWSELALWAYS 32
-#if (_WIN32_IE >= 0x0300)
-#define TVS_CHECKBOXES 256
-#define TVS_NOTOOLTIPS 128
-#define TVS_RTLREADING 64
-#define TVS_TRACKSELECT 512
-#endif
-#if (_WIN32_IE >= 0x0400)
-#define TVS_FULLROWSELECT 4096
-#define TVS_INFOTIP 2048
-#define TVS_NONEVENHEIGHT 16384
-#define TVS_NOSCROLL 8192
-#define TVS_SINGLEEXPAND 1024
-#endif
-#if( _WIN32_IE >= 0x0500 )
-#define TVS_NOHSCROLL 0x8000
-#endif /* _WIN32_IE >= 0x0500 */
-#define TVIF_TEXT 1
-#define TVIF_IMAGE 2
-#define TVIF_PARAM 4
-#define TVIF_STATE 8
-#define TVIF_HANDLE 16
-#define TVIF_SELECTEDIMAGE 32
-#define TVIF_CHILDREN 64
-#if (_WIN32_IE >= 0x0400)
-#define TVIF_INTEGRAL 0x0080
-#endif /* _WIN32_IE >= 0x0400 */
-#define TVIS_FOCUSED 1
-#define TVIS_SELECTED 2
-#define TVIS_CUT 4
-#define TVIS_DROPHILITED 8
-#define TVIS_BOLD 16
-#define TVIS_EXPANDED 32
-#define TVIS_EXPANDEDONCE 64
-#define TVIS_OVERLAYMASK 0xF00
-#define TVIS_STATEIMAGEMASK 0xF000
-#define TVIS_USERMASK 0xF000
-#define I_CHILDRENCALLBACK (-1)
-#define TVI_ROOT ((HTREEITEM)0xFFFF0000)
-#define TVI_FIRST ((HTREEITEM)0xFFFF0001)
-#define TVI_LAST ((HTREEITEM)0xFFFF0002)
-#define TVI_SORT ((HTREEITEM)0xFFFF0003)
-#define TVSIL_NORMAL 0
-#define TVSIL_STATE 2
-#define TVM_INSERTITEMA TV_FIRST
-#define TVM_INSERTITEMW (TV_FIRST+50)
-#define TVM_DELETEITEM (TV_FIRST+1)
-#define TVM_EXPAND (TV_FIRST+2)
-#define TVM_GETITEMRECT (TV_FIRST+4)
-#define TVM_GETCOUNT (TV_FIRST+5)
-#define TVM_GETINDENT (TV_FIRST+6)
-#define TVM_SETINDENT (TV_FIRST+7)
-#define TVM_GETIMAGELIST (TV_FIRST+8)
-#define TVM_SETIMAGELIST (TV_FIRST+9)
-#define TVM_GETNEXTITEM (TV_FIRST+10)
-#define TVM_SELECTITEM (TV_FIRST+11)
-#define TVM_GETITEMA (TV_FIRST+12)
-#define TVM_GETITEMW (TV_FIRST+62)
-#define TVM_SETITEMA (TV_FIRST+13)
-#define TVM_SETITEMW (TV_FIRST+63)
-#define TVM_EDITLABELA (TV_FIRST+14)
-#define TVM_EDITLABELW (TV_FIRST+65)
-#define TVM_GETEDITCONTROL (TV_FIRST+15)
-#define TVM_GETVISIBLECOUNT (TV_FIRST+16)
-#define TVM_HITTEST (TV_FIRST+17)
-#define TVM_CREATEDRAGIMAGE (TV_FIRST+18)
-#define TVM_SORTCHILDREN (TV_FIRST+19)
-#define TVM_ENSUREVISIBLE (TV_FIRST+20)
-#define TVM_SORTCHILDRENCB (TV_FIRST+21)
-#define TVM_ENDEDITLABELNOW (TV_FIRST+22)
-#define TVM_GETISEARCHSTRINGA (TV_FIRST+23)
-#define TVM_GETISEARCHSTRINGW (TV_FIRST+64)
-#if (_WIN32_IE >= 0x0300)
-#define TVM_GETTOOLTIPS (TV_FIRST+25)
-#define TVM_SETTOOLTIPS (TV_FIRST+24)
-#endif
-#if (_WIN32_IE >= 0x0400)
-#define TVM_GETBKCOLOR (TV_FIRST+31)
-#define TVM_GETINSERTMARKCOLOR (TV_FIRST+38)
-#define TVM_GETITEMHEIGHT (TV_FIRST+28)
-#define TVM_GETSCROLLTIME (TV_FIRST+34)
-#define TVM_GETTEXTCOLOR (TV_FIRST+32)
-#define TVM_SETBKCOLOR (TV_FIRST+29)
-#define TVM_SETINSERTMARK (TV_FIRST+26)
-#define TVM_SETINSERTMARKCOLOR (TV_FIRST+37)
-#define TVM_SETITEMHEIGHT (TV_FIRST+27)
-#define TVM_SETSCROLLTIME (TV_FIRST+33)
-#define TVM_SETTEXTCOLOR (TV_FIRST+30)
-#define TVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
-#define TVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
-#endif
-#if (_WIN32_IE >= 0x0500)
-#define TVM_GETITEMSTATE (TV_FIRST+39)
-#define TVM_SETLINECOLOR (TV_FIRST+40)
-#define TVM_GETLINECOLOR (TV_FIRST+41)
-#endif
-#define TVE_COLLAPSE 1
-#define TVE_EXPAND 2
-#define TVE_TOGGLE 3
-#define TVE_COLLAPSERESET 0x8000
-#if (_WIN32_IE >= 0x0300)
-#define TVE_EXPANDPARTIAL 0x4000
-#endif
-#define TVC_UNKNOWN 0
-#define TVC_BYMOUSE 1
-#define TVC_BYKEYBOARD 2
-#define TVGN_ROOT 0
-#define TVGN_NEXT 1
-#define TVGN_PREVIOUS 2
-#define TVGN_PARENT 3
-#define TVGN_CHILD 4
-#define TVGN_FIRSTVISIBLE 5
-#define TVGN_NEXTVISIBLE 6
-#define TVGN_PREVIOUSVISIBLE 7
-#define TVGN_DROPHILITE 8
-#define TVGN_CARET 9
-#if (_WIN32_IE >= 0x0400)
-#define TVGN_LASTVISIBLE 10
-#endif
-#define TVN_SELCHANGINGA (TVN_FIRST-1)
-#define TVN_SELCHANGINGW (TVN_FIRST-50)
-#define TVN_SELCHANGEDA (TVN_FIRST-2)
-#define TVN_SELCHANGEDW (TVN_FIRST-51)
-#define TVN_GETDISPINFOA (TVN_FIRST-3)
-#define TVN_GETDISPINFOW (TVN_FIRST-52)
-#define TVN_SETDISPINFOA (TVN_FIRST-4)
-#define TVN_SETDISPINFOW (TVN_FIRST-53)
-#define TVN_ITEMEXPANDINGA (TVN_FIRST-5)
-#define TVN_ITEMEXPANDINGW (TVN_FIRST-54)
-#define TVN_ITEMEXPANDEDA (TVN_FIRST-6)
-#define TVN_ITEMEXPANDEDW (TVN_FIRST-55)
-#define TVN_BEGINDRAGA (TVN_FIRST-7)
-#define TVN_BEGINDRAGW (TVN_FIRST-56)
-#define TVN_BEGINRDRAGA (TVN_FIRST-8)
-#define TVN_BEGINRDRAGW (TVN_FIRST-57)
-#define TVN_DELETEITEMA (TVN_FIRST-9)
-#define TVN_DELETEITEMW (TVN_FIRST-58)
-#define TVN_BEGINLABELEDITA (TVN_FIRST-10)
-#define TVN_BEGINLABELEDITW (TVN_FIRST-59)
-#define TVN_ENDLABELEDITA (TVN_FIRST-11)
-#define TVN_ENDLABELEDITW (TVN_FIRST-60)
-#define TVN_KEYDOWN (TVN_FIRST-12)
-#if (_WIN32_IE >= 0x0400)
-#define TVN_GETINFOTIPA (TVN_FIRST-13)
-#define TVN_GETINFOTIPW (TVN_FIRST-14)
-#define TVN_SINGLEEXPAND (TVN_FIRST-15)
-#define TVNRET_DEFAULT 0
-#define TVNRET_SKIPOLD 1
-#define TVNRET_SKIPNEW 2
-#endif /* _WIN32_IE >= 0x0400 */
-#define TVIF_DI_SETITEM 0x1000
-#define TVHT_NOWHERE 1
-#define TVHT_ONITEMICON 2
-#define TVHT_ONITEMLABEL 4
-#define TVHT_ONITEM (TVHT_ONITEMICON|TVHT_ONITEMLABEL|TVHT_ONITEMSTATEICON)
-#define TVHT_ONITEMINDENT 8
-#define TVHT_ONITEMBUTTON 16
-#define TVHT_ONITEMRIGHT 32
-#define TVHT_ONITEMSTATEICON 64
-#define TVHT_ABOVE 256
-#define TVHT_BELOW 512
-#define TVHT_TORIGHT 1024
-#define TVHT_TOLEFT 2048
-#define TCHT_NOWHERE 1
-#define TCHT_ONITEMICON 2
-#define TCHT_ONITEMLABEL 4
-#define TCHT_ONITEM (TCHT_ONITEMICON|TCHT_ONITEMLABEL)
-#define TCS_FORCEICONLEFT 16
-#define TCS_FORCELABELLEFT 32
-#define TCS_TABS 0
-#define TCS_BUTTONS 256
-#define TCS_SINGLELINE 0
-#define TCS_MULTILINE 512
-#define TCS_RIGHTJUSTIFY 0
-#define TCS_FIXEDWIDTH 1024
-#define TCS_RAGGEDRIGHT 2048
-#define TCS_FOCUSONBUTTONDOWN 0x1000
-#define TCS_OWNERDRAWFIXED 0x2000
-#define TCS_TOOLTIPS 0x4000
-#define TCS_FOCUSNEVER 0x8000
-#if (_WIN32_IE >= 0x0300)
-#define TCS_BOTTOM 2
-#define TCS_RIGHT 2
-#define TCS_VERTICAL 128
-#define TCS_SCROLLOPPOSITE 0x0001
-#define TCS_HOTTRACK 0x0040
-#define TCS_MULTISELECT 0x0004
-#endif
-#if( _WIN32_IE >= 0x0400 )
-#define TCS_FLATBUTTONS 0x0008
-#define TCS_EX_FLATSEPARATORS 0x00000001
-#define TCS_EX_REGISTERDROP 0x00000002
-#endif /* _WIN32_IE >= 0x0400 */
-#define TCIF_TEXT 1
-#define TCIF_IMAGE 2
-#define TCIF_RTLREADING 4
-#define TCIF_PARAM 8
-#if (_WIN32_IE >= 0x0400)
-#define TCIF_STATE 16
-#endif
-#define TCIS_BUTTONPRESSED 1
-#if (_WIN32_IE >= 0x0400)
-#define TCIS_HIGHLIGHTED 2
-#endif
-#define TCM_FIRST 0x1300
-#define TCM_GETIMAGELIST (TCM_FIRST+2)
-#define TCM_SETIMAGELIST (TCM_FIRST+3)
-#define TCM_GETITEMCOUNT (TCM_FIRST+4)
-#define TCM_GETITEMA (TCM_FIRST+5)
-#define TCM_GETITEMW (TCM_FIRST+60)
-#define TCM_SETITEMA (TCM_FIRST+6)
-#define TCM_SETITEMW (TCM_FIRST+61)
-#define TCM_INSERTITEMA (TCM_FIRST+7)
-#define TCM_INSERTITEMW (TCM_FIRST+62)
-#define TCM_DELETEITEM (TCM_FIRST+8)
-#define TCM_DELETEALLITEMS (TCM_FIRST+9)
-#define TCM_GETITEMRECT (TCM_FIRST+10)
-#define TCM_GETCURSEL (TCM_FIRST+11)
-#define TCM_SETCURSEL (TCM_FIRST+12)
-#define TCM_HITTEST (TCM_FIRST+13)
-#define TCM_SETITEMEXTRA (TCM_FIRST+14)
-
-#define TCM_ADJUSTRECT (TCM_FIRST+40)
-#define TCM_SETITEMSIZE (TCM_FIRST+41)
-#define TCM_REMOVEIMAGE (TCM_FIRST+42)
-#define TCM_SETPADDING (TCM_FIRST+43)
-#define TCM_GETROWCOUNT (TCM_FIRST+44)
-#define TCM_GETTOOLTIPS (TCM_FIRST+45)
-#define TCM_SETTOOLTIPS (TCM_FIRST+46)
-#define TCM_GETCURFOCUS (TCM_FIRST+47)
-#define TCM_SETCURFOCUS (TCM_FIRST+48)
-#define TCM_SETMINTABWIDTH (TCM_FIRST + 49)
-#define TCM_DESELECTALL (TCM_FIRST + 50)
-#if (_WIN32_IE >=0x0400)
-#define TCM_HIGHLIGHTITEM (TCM_FIRST + 51)
-#define TCM_SETEXTENDEDSTYLE (TCM_FIRST + 52)
-#define TCM_GETEXTENDEDSTYLE (TCM_FIRST + 53)
-#define TCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
-#define TCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
-#endif /* _WIN32_IE >=0x0400 */
-#define TCN_KEYDOWN TCN_FIRST
-#define TCN_SELCHANGE (TCN_FIRST-1)
-#define TCN_SELCHANGING (TCN_FIRST-2)
-#define NM_OUTOFMEMORY (NM_FIRST-1)
-#define NM_CLICK (NM_FIRST-2)
-#define NM_DBLCLK (NM_FIRST-3)
-#define NM_RETURN (NM_FIRST-4)
-#define NM_RCLICK (NM_FIRST-5)
-#define NM_RDBLCLK (NM_FIRST-6)
-#define NM_SETFOCUS (NM_FIRST-7)
-#define NM_KILLFOCUS (NM_FIRST-8)
-#define NM_CUSTOMDRAW (NM_FIRST-12)
-#define NM_HOVER (NM_FIRST-13)
-#define NM_NCHITTEST (NM_FIRST-14)
-#define NM_KEYDOWN (NM_FIRST-15)
-#define NM_RELEASEDCAPTURE (NM_FIRST-16)
-#define NM_SETCURSOR (NM_FIRST-17)
-#define NM_CHAR (NM_FIRST-18)
-#define NM_TOOLTIPSCREATED (NM_FIRST-19)
-#define SBARS_SIZEGRIP 256
-#define CCM_FIRST 0x2000
-#define CCM_LAST (CCM_FIRST+0x200)
-#define CCM_SETBKCOLOR 8193
-#define CCM_SETCOLORSCHEME 8194
-#define CCM_GETCOLORSCHEME 8195
-#define CCM_GETDROPTARGET 8196
-#define CCM_SETUNICODEFORMAT 8197
-#define CCM_GETUNICODEFORMAT 8198
-#define CCM_SETVERSION 0x2007
-#define CCM_GETVERSION 0x2008
-#define CCM_SETNOTIFYWINDOW 0x2009
-#if (_WIN32_WINNT >= 0x0501)
-#define CCM_SETWINDOWTHEME 0x200b
-#define CCM_DPISCALE 0x200c
-#endif
-#define ICC_LISTVIEW_CLASSES 1
-#define ICC_TREEVIEW_CLASSES 2
-#define ICC_BAR_CLASSES 4
-#define ICC_TAB_CLASSES 8
-#define ICC_UPDOWN_CLASS 16
-#define ICC_PROGRESS_CLASS 32
-#define ICC_HOTKEY_CLASS 64
-#define ICC_ANIMATE_CLASS 128
-#define ICC_WIN95_CLASSES 255
-#define ICC_DATE_CLASSES 256
-#define ICC_USEREX_CLASSES 512
-#define ICC_COOL_CLASSES 1024
-#if (_WIN32_IE >= 0x0400)
-#define ICC_INTERNET_CLASSES 2048
-#define ICC_PAGESCROLLER_CLASS 4096
-#define ICC_NATIVEFNTCTL_CLASS 8192
-#define INFOTIPSIZE 1024
-#endif /* _WIN32_IE */
-#if (_WIN32_WINNT >= 0x501)
-#define ICC_STANDARD_CLASSES 0x00004000
-#define ICC_LINK_CLASS 0x00008000
-#endif
-#define GDTR_MIN 1
-#define GDTR_MAX 2
-#define GMR_VISIBLE 0
-#define GMR_DAYSTATE 1
-#define GDT_ERROR -1
-#define GDT_VALID 0
-#define GDT_NONE 1
-#define DTS_UPDOWN 1
-#define DTS_SHOWNONE 2
-#define DTS_SHORTDATEFORMAT 0
-#define DTS_LONGDATEFORMAT 4
-#define DTS_TIMEFORMAT 9
-#define DTS_APPCANPARSE 16
-#define DTS_RIGHTALIGN 32
-#if ( _WIN32_IE >= 0x500 )
-#define DTS_SHORTDATECENTURYFORMAT 0x000C
-#endif /* _WIN32_IE >= 0x500 */
-#define MCS_DAYSTATE 1
-#define MCS_MULTISELECT 2
-#define MCS_WEEKNUMBERS 4
-#if (_WIN32_IE >= 0x0400)
-#define MCS_NOTODAYCIRCLE 0x0008
-#define MCS_NOTODAY 0x0010
-#else /* _WIN32_IE >= 0x0400 */
-#define MCS_NOTODAY 0x0008
-#endif /* _WIN32_IE >= 0x0400 */
-#define DTM_GETSYSTEMTIME 0x1001
-#define DTM_SETSYSTEMTIME 0x1002
-#define DTM_GETRANGE 0x1003
-#define DTM_SETRANGE 0x1004
-#define DTM_SETFORMATA 0x1005
-#define DTM_SETFORMATW 0x1050
-#define DTM_SETMCCOLOR 0x1006
-#define DTM_GETMCCOLOR 0x1007
-#define DTM_GETMONTHCAL 0x1008
-#define DTM_SETMCFONT 0x1009
-#define DTM_GETMCFONT 0x100a
-#define DTN_USERSTRINGA ((UINT)-758)
-#define DTN_USERSTRINGW ((UINT)-745)
-#define DTN_WMKEYDOWNA ((UINT)-757)
-#define DTN_WMKEYDOWNW ((UINT)-744)
-#define DTN_FORMATA ((UINT)-756)
-#define DTN_FORMATW ((UINT)-743)
-#define DTN_FORMATQUERYA ((UINT)-755)
-#define DTN_FORMATQUERYW ((UINT)-742)
-#define DTN_DROPDOWN ((UINT)-754)
-#define DTN_CLOSEUP ((UINT)-753)
-#define DTN_DATETIMECHANGE ((UINT)-759)
-#define MCM_GETCURSEL 0x1001
-#define MCM_SETCURSEL 0x1002
-#define MCM_GETMAXSELCOUNT 0x1003
-#define MCM_SETMAXSELCOUNT 0x1004
-#define MCM_GETSELRANGE 0x1005
-#define MCM_SETSELRANGE 0x1006
-#define MCM_GETMONTHRANGE 0x1007
-#define MCM_SETDAYSTATE 0x1008
-#define MCM_GETMINREQRECT 0x1009
-#define MCM_SETCOLOR 0x100a
-#define MCM_GETCOLOR 0x100b
-#define MCM_SETTODAY 0x100c
-#define MCM_GETTODAY 0x100d
-#define MCM_HITTEST 0x100e
-#define MCM_SETFIRSTDAYOFWEEK 0x100f
-#define MCM_GETFIRSTDAYOFWEEK 0x1010
-#define MCM_GETRANGE 0x1011
-#define MCM_SETRANGE 0x1012
-#define MCM_GETMONTHDELTA 0x1013
-#define MCM_SETMONTHDELTA 0x1014
-#define MCM_GETMAXTODAYWIDTH 0x1015
-#define MCM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
-#define MCM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
-#define MCN_SELCHANGE ((UINT)-749)
-#define MCN_GETDAYSTATE ((UINT)-747)
-#define MCN_SELECT ((UINT)-746)
-#define ODT_HEADER 100
-#define ODT_TAB 101
-#define ODT_LISTVIEW 102
-#define SB_SETBKCOLOR 0x2001
-#if (_WIN32_IE >= 0x0300)
-#define SB_ISSIMPLE 1038
-#define MCSC_BACKGROUND 0
-#define MCSC_TEXT 1
-#define MCSC_TITLEBK 2
-#define MCSC_TITLETEXT 3
-#define MCSC_MONTHBK 4
-#define MCSC_TRAILINGTEXT 5
-#endif
-#if (_WIN32_IE >= 0x0400)
-#define MCHT_TITLE 0x10000
-#define MCHT_CALENDAR 0x20000
-#define MCHT_TODAYLINK 0x30000
-#define MCHT_NEXT 0x1000000
-#define MCHT_PREV 0x2000000
-#define MCHT_NOWHERE 0x00
-#define MCHT_TITLEBK (MCHT_TITLE)
-#define MCHT_TITLEMONTH (MCHT_TITLE | 0x0001)
-#define MCHT_TITLEYEAR (MCHT_TITLE | 0x0002)
-#define MCHT_TITLEBTNNEXT (MCHT_TITLE | MCHT_NEXT | 0x0003)
-#define MCHT_TITLEBTNPREV (MCHT_TITLE | MCHT_PREV | 0x0003)
-#define MCHT_CALENDARBK (MCHT_CALENDAR)
-#define MCHT_CALENDARDATE (MCHT_CALENDAR | 0x0001)
-#define MCHT_CALENDARDATENEXT (MCHT_CALENDARDATE | MCHT_NEXT)
-#define MCHT_CALENDARDATEPREV (MCHT_CALENDARDATE | MCHT_PREV)
-#define MCHT_CALENDARDAY (MCHT_CALENDAR | 0x0002)
-#define MCHT_CALENDARWEEKNUM (MCHT_CALENDAR | 0x0003)
-#endif /* _WIN32_IE >= 0x0400 */
-#define RBS_TOOLTIPS 256
-#define RBS_VARHEIGHT 512
-#define RBS_BANDBORDERS 1024
-#define RBS_FIXEDORDER 2048
-#define RBIM_IMAGELIST 1
-#define RB_SETCOLORSCHEME CCM_SETCOLORSCHEME
-#define RB_GETCOLORSCHEME CCM_GETCOLORSCHEME
-#define RBBS_BREAK 0x0001
-#define RBBS_FIXEDSIZE 0x0002
-#define RBBS_CHILDEDGE 0x0004
-#define RBBS_HIDDEN 0x0008
-#define RBBS_NOVERT 0x0010
-#define RBBS_FIXEDBMP 0x0020
-#define RBBS_VARIABLEHEIGHT 0x0040
-#define RBBS_GRIPPERALWAYS 0x0080
-#define RBBS_NOGRIPPER 0x0100
-#if (_WIN32_IE >= 0x0500)
-#define RBBS_USECHEVRON 0x0200
-#if (_WIN32_IE >= 0x0501)
-#define RBBS_HIDETITLE 0x0400
-#define RBBS_TOPALIGN 0x0800
-#endif /* _WIN32_IE >= 0x0501 */
-#endif /* _WIN32_IE >= 0x0500 */
-#define RBBIM_STYLE 1
-#define RBBIM_COLORS 2
-#define RBBIM_TEXT 4
-#define RBBIM_IMAGE 8
-#define RBBIM_CHILD 16
-#define RBBIM_CHILDSIZE 32
-#define RBBIM_SIZE 64
-#define RBBIM_BACKGROUND 128
-#define RBBIM_ID 256
-#define RB_INSERTBANDA (WM_USER+1)
-#define RB_INSERTBANDW (WM_USER+10)
-#define RB_DELETEBAND (WM_USER+2)
-#define RB_GETBARINFO (WM_USER+3)
-#define RB_SETBARINFO (WM_USER+4)
-#define RB_GETBANDCOUNT (WM_USER+12)
-#define RB_GETROWCOUNT (WM_USER+13)
-#define RB_GETROWHEIGHT (WM_USER+14)
-#define RB_SETBANDINFOA (WM_USER+6)
-#define RB_SETBANDINFOW (WM_USER+11)
-#define RB_SETPARENT (WM_USER+7)
-#define RBN_HEIGHTCHANGE RBN_FIRST
-#if (_WIN32_IE >= 0x0300)
-#define LVN_ODCACHEHINT (LVN_FIRST-13)
-#define LVN_ODFINDITEMA (LVN_FIRST-52)
-#define LVN_ODFINDITEMW (LVN_FIRST-79)
-#define LVN_ITEMACTIVATE (LVN_FIRST-14)
-#define LVN_ODSTATECHANGED (LVN_FIRST-15)
-#ifdef UNICODE
-#define LVN_ODFINDITEM LVN_ODFINDITEMW
-#else
-#define LVN_ODFINDITEM LVN_ODFINDITEMA
-#endif
-#endif /* _WIN32_IE */
-#if (_WIN32_IE >= 0x0400)
-#define SB_SETICON 1039
-#define SB_SETTIPTEXTA 1040
-#define SB_SETTIPTEXTW 1041
-#define SB_GETTIPTEXTA 1042
-#define SB_GETTIPTEXTW 1043
-#define SB_GETICON 1044
-#define SB_SETUNICODEFORMAT 0x2005
-#define SB_GETUNICODEFORMAT 0x2006
-#define PGF_INVISIBLE 0
-#define PGF_NORMAL 1
-#define PGF_GRAYED 2
-#define PGF_DEPRESSED 4
-#define PGF_HOT 8
-#define PGB_TOPORLEFT 0
-#define PGB_BOTTOMORRIGHT 1
-#define PGF_SCROLLUP 1
-#define PGF_SCROLLDOWN 2
-#define PGF_SCROLLLEFT 4
-#define PGF_SCROLLRIGHT 8
-#define PGK_SHIFT 1
-#define PGK_CONTROL 2
-#define PGK_MENU 4
-#define PGF_CALCWIDTH 1
-#define PGF_CALCHEIGHT 2
-#define PGM_FIRST 0x1400
-#define PGM_SETCHILD (PGM_FIRST+1)
-#define PGM_RECALCSIZE (PGM_FIRST+2)
-#define PGM_FORWARDMOUSE (PGM_FIRST+3)
-#define PGM_SETBKCOLOR (PGM_FIRST+4)
-#define PGM_GETBKCOLOR (PGM_FIRST+5)
-#define PGM_SETBORDER (PGM_FIRST+6)
-#define PGM_GETBORDER (PGM_FIRST+7)
-#define PGM_SETPOS (PGM_FIRST+8)
-#define PGM_GETPOS (PGM_FIRST+9)
-#define PGM_SETBUTTONSIZE (PGM_FIRST+10)
-#define PGM_GETBUTTONSIZE (PGM_FIRST+11)
-#define PGM_GETBUTTONSTATE (PGM_FIRST+12)
-#define PGM_GETDROPTARGET CCM_GETDROPTARGET
-#define RBS_REGISTERDROP 4096
-#define RBS_AUTOSIZE 8192
-#define RBS_VERTICALGRIPPER 16384
-#define RBS_DBLCLKTOGGLE 32768
-#define RBBIM_IDEALSIZE 512
-#define RBBIM_LPARAM 1024
-#define RBBIM_HEADERSIZE 2048
-#define RB_HITTEST (WM_USER+8)
-#define RB_GETRECT (WM_USER+9)
-#define RB_IDTOINDEX (WM_USER+16)
-#define RB_GETTOOLTIPS (WM_USER+17)
-#define RB_SETTOOLTIPS (WM_USER+18)
-#define RB_SETBKCOLOR (WM_USER+19)
-#define RB_GETBKCOLOR (WM_USER+20)
-#define RB_SETTEXTCOLOR (WM_USER+21)
-#define RB_GETTEXTCOLOR (WM_USER+22)
-#define RB_SIZETORECT (WM_USER+23)
-#define RB_BEGINDRAG (WM_USER+24)
-#define RB_ENDDRAG (WM_USER+25)
-#define RB_DRAGMOVE (WM_USER+26)
-#define RB_GETBARHEIGHT (WM_USER+27)
-#define RB_GETBANDINFOW (WM_USER+28)
-#define RB_GETBANDINFOA (WM_USER+29)
-#define RB_MINIMIZEBAND (WM_USER+30)
-#define RB_MAXIMIZEBAND (WM_USER+31)
-#define RB_GETDROPTARGET CCM_GETDROPTARGET
-#define RB_GETBANDBORDERS (WM_USER+34)
-#define RB_SHOWBAND (WM_USER+35)
-#define RB_SETPALETTE (WM_USER+37)
-#define RB_GETPALETTE (WM_USER+38)
-#define RB_MOVEBAND (WM_USER+39)
-#define RB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
-#define RB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
-#define RBN_GETOBJECT (RBN_FIRST-1)
-#define RBN_LAYOUTCHANGED (RBN_FIRST-2)
-#define RBN_AUTOSIZE (RBN_FIRST-3)
-#define RBN_BEGINDRAG (RBN_FIRST-4)
-#define RBN_ENDDRAG (RBN_FIRST-5)
-#define RBN_DELETINGBAND (RBN_FIRST-6)
-#define RBN_DELETEDBAND (RBN_FIRST-7)
-#define RBN_CHILDSIZE (RBN_FIRST-8)
-#define RBNM_ID 1
-#define RBNM_STYLE 2
-#define RBNM_LPARAM 4
-#define RBHT_NOWHERE 1
-#define RBHT_CAPTION 2
-#define RBHT_CLIENT 3
-#define RBHT_GRABBER 4
-#ifdef UNICODE
-#define SB_SETTIPTEXT SB_SETTIPTEXTW
-#define SB_GETTIPTEXT SB_GETTIPTEXTW
-#define RB_GETBANDINFO RB_GETBANDINFOW
-#else
-#define SB_SETTIPTEXT SB_SETTIPTEXTA
-#define SB_GETTIPTEXT SB_GETTIPTEXTA
-#define RB_GETBANDINFO RB_GETBANDINFOA
-#endif
-#else
-#define RB_GETBANDINFO (WM_USER+5)
-#endif /* _WIN32_IE >= 0x0400 */
-#define CBEM_INSERTITEMA (WM_USER + 1)
-#define CBEM_SETIMAGELIST (WM_USER + 2)
-#define CBEM_GETIMAGELIST (WM_USER + 3)
-#define CBEM_GETITEMA (WM_USER + 4)
-#define CBEM_SETITEMA (WM_USER + 5)
-#define CBEM_DELETEITEM CB_DELETESTRING
-#define CBEM_GETCOMBOCONTROL (WM_USER + 6)
-#define CBEM_GETEDITCONTROL (WM_USER + 7)
-#define CBEM_SETEXSTYLE (WM_USER + 8)
-#define CBEM_GETEXSTYLE (WM_USER + 9)
-#if (_WIN32_IE >= 0x0400)
-#define CBEM_SETEXTENDEDSTYLE (WM_USER + 14)
-#define CBEM_GETEXTENDEDSTYLE (WM_USER + 9)
-#define CBEM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
-#define CBEM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
-#endif /* _WIN32_IE >= 0x0400 */
-#define CBEM_HASEDITCHANGED (WM_USER + 10)
-#define CBEM_INSERTITEMW (WM_USER + 11)
-#define CBEM_SETITEMW (WM_USER + 12)
-#define CBEM_GETITEMW (WM_USER + 13)
-#define DA_LAST 0x7fffffff
-#define DPA_APPEND 0x7fffffff
-#define DPA_ERR -1
-#define DSA_APPEND 0x7fffffff
-#define DSA_ERR -1
-#define DPAS_SORTED 1
-#define DPAS_INSERTBEFORE 2
-#define DPAS_INSERTAFTER 4
-#if (_WIN32_IE >= 0x400)
-#define WSB_PROP_CYVSCROLL 1
-#define WSB_PROP_CXHSCROLL 2
-#define WSB_PROP_CYHSCROLL 4
-#define WSB_PROP_CXVSCROLL 8
-#define WSB_PROP_CXHTHUMB 16
-#define WSB_PROP_CYVTHUMB 32
-#define WSB_PROP_VBKGCOLOR 64
-#define WSB_PROP_HBKGCOLOR 128
-#define WSB_PROP_VSTYLE 256
-#define WSB_PROP_HSTYLE 512
-#define WSB_PROP_WINSTYLE 1024
-#define WSB_PROP_PALETTE 2048
-#define WSB_PROP_MASK 0xfff
-#define FSB_FLAT_MODE 2
-#define FSB_ENCARTA_MODE 1
-#define FSB_REGULAR_MODE 0
-#endif /* _WIN32_IE >= 0x400 */
-#if (_WIN32_WINNT >= 0x0501)
-#define LIF_ITEMINDEX 0x00000001
-#define LIF_STATE 0x00000002
-#define LIF_ITEMID 0x00000004
-#define LIF_URL 0x00000008
-#define LIS_FOCUSED 0x00000001
-#define LIS_ENABLED 0x00000002
-#define LIS_VISITED 0x00000004
-#define LM_HITTEST (WM_USER + 768)
-#define LM_GETIDEALHEIGHT (WM_USER + 769)
-#define LM_SETITEM (WM_USER + 770)
-#define LM_GETITEM (WM_USER + 771)
-#define MAX_LINKID_TEXT 48
-#define L_MAX_URL_LENGTH 2084
-#endif
-
-#ifndef RC_INVOKED
-typedef struct tagCOMBOBOXEXITEMA{
- UINT mask;
- int iItem;
- LPSTR pszText;
- int cchTextMax;
- int iImage;
- int iSelectedImage;
- int iOverlay;
- int iIndent;
- LPARAM lParam;
-} COMBOBOXEXITEMA, *PCOMBOBOXEXITEMA;
-typedef COMBOBOXEXITEMA CONST *PCCOMBOEXITEMA;
-typedef struct tagCOMBOBOXEXITEMW{
- UINT mask;
- int iItem;
- LPWSTR pszText;
- int cchTextMax;
- int iImage;
- int iSelectedImage;
- int iOverlay;
- int iIndent;
- LPARAM lParam;
-} COMBOBOXEXITEMW, *PCOMBOBOXEXITEMW;
-typedef COMBOBOXEXITEMW CONST *PCCOMBOEXITEMW;
-#if (_WIN32_IE >= 0x0400)
-typedef struct {
- NMHDR hdr;
- COMBOBOXEXITEMA ceItem;
-} NMCOMBOBOXEXA, *PNMCOMBOBOXEXA;
-typedef struct {
- NMHDR hdr;
- COMBOBOXEXITEMW ceItem;
-} NMCOMBOBOXEXW, *PNMCOMBOBOXEXW;
-typedef struct {
- NMHDR hdr;
- int iItemid;
- WCHAR szText[CBEMAXSTRLEN];
-}NMCBEDRAGBEGINW, *LPNMCBEDRAGBEGINW, *PNMCBEDRAGBEGINW;
-typedef struct {
- NMHDR hdr;
- int iItemid;
- char szText[CBEMAXSTRLEN];
-}NMCBEDRAGBEGINA, *LPNMCBEDRAGBEGINA, *PNMCBEDRAGBEGINA;
-typedef struct tagNMIPADDRESS{
- NMHDR hdr;
- int iField;
- int iValue;
-} NMIPADDRESS, *LPNMIPADDRESS;
-typedef struct tagLVKEYDOWN {
- NMHDR hdr;
- WORD wVKey;
- UINT flags;
-} NMLVKEYDOWN, *LPNMLVKEYDOWN;
-typedef struct {
- NMHDR hdr;
- DWORD dwFlag;
- int iWidth;
- int iHeight;
-} NMPGCALCSIZE, *LPNMPGCALCSIZE;
-typedef struct {
- NMHDR hdr;
- BOOL fwKeys;
- RECT rcParent;
- int iDir;
- int iXpos;
- int iYpos;
- int iScroll;
-} NMPGSCROLL, *LPNMPGSCROLL;
-typedef struct tagNMSELCHANGE {
- NMHDR nmhdr;
- SYSTEMTIME stSelStart;
- SYSTEMTIME stSelEnd;
-} NMSELCHANGE, *LPNMSELCHANGE;
-typedef struct tagNMTBHOTITEM {
- NMHDR hdr;
- int idOld;
- int idNew;
- DWORD dwFlags;
-} NMTBHOTITEM, *LPNMTBHOTITEM;
-typedef struct {
- NMHDR hdr;
- DWORD dwMask;
- int idCommand;
- DWORD_PTR lParam;
- int iImage;
- LPSTR pszText;
- int cchText;
-} NMTBDISPINFOA, *LPNMTBDISPINFOA;
-typedef struct {
- NMHDR hdr;
- DWORD dwMask;
- int idCommand;
- DWORD_PTR lParam;
- int iImage;
- LPWSTR pszText;
- int cchText;
-} NMTBDISPINFOW, *LPNMTBDISPINFOW;
-typedef struct tagNMTBGETINFOTIPA
-{
- NMHDR hdr;
- LPSTR pszText;
- int cchTextMax;
- int iItem;
- LPARAM lParam;
-} NMTBGETINFOTIPA, *LPNMTBGETINFOTIPA;
-typedef struct tagNMTBGETINFOTIPW
-{
- NMHDR hdr;
- LPWSTR pszText;
- int cchTextMax;
- int iItem;
- LPARAM lParam;
-} NMTBGETINFOTIPW, *LPNMTBGETINFOTIPW;
-typedef struct tagNMMOUSE {
- NMHDR hdr;
- DWORD_PTR dwItemSpec;
- DWORD_PTR dwItemData;
- POINT pt;
- LPARAM dwHitInfo;
-} NMMOUSE, *LPNMMOUSE;
-#endif /*_WIN32_IE >= 0x0400 */
-#if (_WIN32_IE >= 0x0401)
-typedef struct tagNMTOOLTIPSCREATED
-{
- NMHDR hdr;
- HWND hwndToolTips;
-} NMTOOLTIPSCREATED, *LPNMTOOLTIPSCREATED;
-#endif
-typedef struct tagNMDATETIMECHANGE
-{
- NMHDR nmhdr;
- DWORD dwFlags;
- SYSTEMTIME st;
-} NMDATETIMECHANGE, *LPNMDATETIMECHANGE;
-typedef struct {
- NMHDR hdr;
- BOOL fChanged;
- int iNewSelection;
- WCHAR szText[CBEMAXSTRLEN];
- int iWhy;
-} NMCBEENDEDITW, *LPNMCBEENDEDITW, *PNMCBEENDEDITW;
-typedef struct {
- NMHDR hdr;
- BOOL fChanged;
- int iNewSelection;
- char szText[CBEMAXSTRLEN];
- int iWhy;
-} NMCBEENDEDITA, *LPNMCBEENDEDITA,*PNMCBEENDEDITA;
-typedef struct _COLORMAP {
- COLORREF from;
- COLORREF to;
-} COLORMAP,*LPCOLORMAP;
-typedef struct {
- UINT uNotification;
- HWND hWnd;
- POINT ptCursor;
-} DRAGLISTINFO,*LPDRAGLISTINFO;
-typedef struct _TBBUTTON {
- int iBitmap;
- int idCommand;
- BYTE fsState;
- BYTE fsStyle;
- BYTE bReserved[2];
- DWORD dwData;
- int iString;
-} TBBUTTON,*PTBBUTTON,*LPTBBUTTON;
-typedef const TBBUTTON *LPCTBBUTTON;
-#if _WIN32_IE >= 0x400
-typedef struct {
- UINT cbSize;
- DWORD dwMask;
- int idCommand;
- int iImage;
- BYTE fsState;
- BYTE fsStyle;
- WORD cx;
- DWORD lParam;
- LPSTR pszText;
- int cchText;
-} TBBUTTONINFOA, *LPTBBUTTONINFOA;
-typedef struct {
- UINT cbSize;
- DWORD dwMask;
- int idCommand;
- int iImage;
- BYTE fsState;
- BYTE fsStyle;
- WORD cx;
- DWORD lParam;
- LPWSTR pszText;
- int cchText;
-} TBBUTTONINFOW, *LPTBBUTTONINFOW;
-typedef struct {
- int iButton;
- DWORD dwFlags;
-} TBINSERTMARK, *LPTBINSERTMARK;
-typedef struct tagLVBKIMAGEA {
- ULONG ulFlags;
- HBITMAP hbm;
- LPSTR pszImage;
- UINT cchImageMax;
- int xOffsetPercent;
- int yOffsetPercent;
-} LVBKIMAGEA, *LPLVBKIMAGEA;
-typedef struct tagLVBKIMAGEW {
- ULONG ulFlags;
- HBITMAP hbm;
- LPWSTR pszImage;
- UINT cchImageMax;
- int xOffsetPercent;
- int yOffsetPercent;
-} LVBKIMAGEW, *LPLVBKIMAGEW;
-#endif /* _WIN32_IE >= 0x400 */
-typedef struct {
- NMHDR hdr;
- int iItem;
- TBBUTTON tbButton;
- int cchText;
- LPTSTR pszText;
-} TBNOTIFY,*LPTBNOTIFY;
-typedef struct {
- HKEY hkr;
- LPCTSTR pszSubKey;
- LPCTSTR pszValueName;
-} TBSAVEPARAMS;
-typedef struct _IMAGEINFO {
- HBITMAP hbmImage;
- HBITMAP hbmMask;
- int Unused1;
- int Unused2;
- RECT rcImage;
-} IMAGEINFO, *LPIMAGEINFO;
-typedef struct _IMAGELIST *HIMAGELIST;
-typedef struct _HDITEMA {
- UINT mask;
- int cxy;
- LPSTR pszText;
- HBITMAP hbm;
- int cchTextMax;
- int fmt;
- LPARAM lParam;
-#if (_WIN32_IE >= 0x0300)
- int iImage;
- int iOrder;
-#endif
-#if (_WIN32_IE >= 0x0500)
- UINT type;
- LPVOID pvFilter;
-#endif
-} HDITEMA, * LPHDITEMA;
-typedef struct _HDITEMW {
- UINT mask;
- int cxy;
- LPWSTR pszText;
- HBITMAP hbm;
- int cchTextMax;
- int fmt;
- LPARAM lParam;
-#if (_WIN32_IE >= 0x0300)
- int iImage;
- int iOrder;
-#endif
-#if (_WIN32_IE >= 0x0500)
- UINT type;
- LPVOID pvFilter;
-#endif
-} HDITEMW, * LPHDITEMW;
-/* for backward compatibility */
-#define HD_ITEMA HDITEMA
-#define HD_ITEMW HDITEMW
-#define HD_ITEM HDITEM
-typedef struct _HD_LAYOUT {
- RECT *prc;
- WINDOWPOS *pwpos;
-} HDLAYOUT, *LPHDLAYOUT;
-#define HD_LAYOUT HDLAYOUT /* backward compatibility */
-typedef struct _HD_HITTESTINFO {
- POINT pt;
- UINT flags;
- int iItem;
-} HD_HITTESTINFO, *LPHDHITTESTINFO;
-typedef struct _HD_NOTIFYA {
- NMHDR hdr;
- int iItem;
- int iButton;
- HD_ITEMA *pitem;
-} HD_NOTIFYA;
-typedef struct _HD_NOTIFYW {
- NMHDR hdr;
- int iItem;
- int iButton;
- HD_ITEMW *pitem;
-} HD_NOTIFYW;
-/* FIXME: NMHEADER structure (base for all events of the comctl controls)
- is the same as HD_NOTIFY depending on the value of _WIN32_IE macro.
- I'm defining both for now. */
-typedef struct _NMHEADERA {
- NMHDR hdr;
- int iItem;
- int iButton;
- HD_ITEMA* pitem;
-} NMHEADERA, *LPNMHEADERA;
-
-typedef struct _NMHEADERW {
- NMHDR hdr;
- int iItem;
- int iButton;
- HD_ITEMW* pitem;
-} NMHEADERW, *LPNMHEADERW;
-#ifdef UNICODE
-#define NMHEADER NMHEADERW
-#define LPNMHEADER LPNMHEADERW
-#else
-#define NMHEADER NMHEADERA
-#define LPNMHEADER LPNMHEADERA
-#endif
-/* End FIXME. */
-typedef struct tagNMHDDISPINFOA {
- NMHDR hdr;
- int iItem;
- UINT mask;
- LPSTR pszText;
- int cchTextMax;
- int iImage;
- LPARAM lParam;
-} NMHDDISPINFOA, *LPNMHDDISPINFOA;
-typedef struct tagNMHDDISPINFOW {
- NMHDR hdr;
- int iItem;
- UINT mask;
- LPWSTR pszText;
- int cchTextMax;
- int iImage;
- LPARAM lParam;
-} NMHDDISPINFOW, *LPNMHDDISPINFOW;
-typedef struct tagNMCUSTOMDRAWINFO {
- NMHDR hdr;
- DWORD dwDrawStage;
- HDC hdc;
- RECT rc;
- DWORD dwItemSpec;
- UINT uItemState;
- LPARAM lItemlParam;
-} NMCUSTOMDRAW, *LPNMCUSTOMDRAW;
-typedef struct tagNMLVCUSTOMDRAW {
- NMCUSTOMDRAW nmcd;
- COLORREF clrText;
- COLORREF clrTextBk;
-#if _WIN32_IE >= 0x0400
- int iSubItem;
-#endif
-} NMLVCUSTOMDRAW, *LPNMLVCUSTOMDRAW;
-#if (_WIN32_IE >= 0x0400)
-typedef struct tagNMLVGETINFOTIPA
-{
- NMHDR hdr;
- DWORD dwFlags;
- LPSTR pszText;
- int cchTextMax;
- int iItem;
- int iSubItem;
- LPARAM lParam;
-} NMLVGETINFOTIPA, *LPNMLVGETINFOTIPA;
-typedef struct tagNMLVGETINFOTIPW
-{
- NMHDR hdr;
- DWORD dwFlags;
- LPWSTR pszText;
- int cchTextMax;
- int iItem;
- int iSubItem;
- LPARAM lParam;
-} NMLVGETINFOTIPW, *LPNMLVGETINFOTIPW;
-#endif /* _WIN32_IE >= 0x0400 */
-typedef struct tagNMTVCUSTOMDRAW {
- NMCUSTOMDRAW nmcd;
- COLORREF clrText;
- COLORREF clrTextBk;
-#if _WIN32_IE >= 0x0400
- int iLevel;
-#endif
-} NMTVCUSTOMDRAW, *LPNMTVCUSTOMDRAW;
-#if (_WIN32_IE >= 0x400)
-typedef struct _NMTBCUSTOMDRAW {
- NMCUSTOMDRAW nmcd;
- HBRUSH hbrMonoDither;
- HBRUSH hbrLines;
- HPEN hpenLines;
- COLORREF clrText;
- COLORREF clrMark;
- COLORREF clrTextHighlight;
- COLORREF clrBtnFace;
- COLORREF clrBtnHighlight;
- COLORREF clrHighlightHotTrack;
- RECT rcText;
- int nStringBkMode;
- int nHLStringBkMode;
-#if (_WIN32_WINNT >= 0x0501)
- int iListGap;
-#endif
-} NMTBCUSTOMDRAW, * LPNMTBCUSTOMDRAW;
-typedef struct tagNMITEMACTIVATE {
- NMHDR hdr;
- int iItem;
- int iSubItem;
- UINT uNewState;
- UINT uOldState;
- UINT uChanged;
- POINT ptAction;
- LPARAM lParam;
- UINT uKeyFlags;
-} NMITEMACTIVATE, *LPNMITEMACTIVATE;
-#endif /* _WIN32_IE >= 0x0400 */
-typedef struct tagTBADDBITMAP {
- HINSTANCE hInst;
- UINT nID;
-} TBADDBITMAP,*LPTBADDBITMAP;
-typedef struct tagTBSAVEPARAMSA {
- HKEY hkr;
- LPCSTR pszSubKey;
- LPCSTR pszValueName;
-} TBSAVEPARAMSA;
-typedef struct tagTBSAVEPARAMSW {
- HKEY hkr;
- LPCWSTR pszSubKey;
- LPCWSTR pszValueName;
-} TBSAVEPARAMSW;
-typedef struct {
- HINSTANCE hInstOld;
- UINT nIDOld;
- HINSTANCE hInstNew;
- UINT nIDNew;
- int nButtons;
-} TBREPLACEBITMAP,*LPTBREPLACEBITMAP;
-typedef struct tagNMTOOLBARA {
- NMHDR hdr;
- int iItem;
- TBBUTTON tbButton;
- int cchText;
- LPSTR pszText;
-#if (_WIN32_IE >= 0x500)
- RECT rcButton;
-#endif
-} NMTOOLBARA, *LPNMTOOLBARA;
-#define TBNOTIFYA NMTOOLBARA
-#define LPTBNOTIFYA LPNMTOOLBARA
-typedef struct tagNMTOOLBARW {
- NMHDR hdr;
- int iItem;
- TBBUTTON tbButton;
- int cchText;
- LPWSTR pszText;
-#if (_WIN32_IE >= 0x500)
- RECT rcButton;
-#endif
-} NMTOOLBARW, *LPNMTOOLBARW;
-#define TBNOTIFYW NMTOOLBARW
-#define LPTBNOTIFYW LPNMTOOLBARW
-typedef struct tagTOOLINFOA {
- UINT cbSize;
- UINT uFlags;
- HWND hwnd;
- UINT uId;
- RECT rect;
- HINSTANCE hinst;
- LPSTR lpszText;
-#if (_WIN32_IE >= 0x0300)
- LPARAM lParam;
-#endif
-} TTTOOLINFOA,*LPTTTOOLINFOA,*PTOOLINFOA;
-#define TOOLINFOA TTTOOLINFOA
-#define LPTOOLINFOA LPTTTOOLINFOA
-#define TTTOOLINFOA_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lpszText)
-#define TTTOOLINFOA_V2_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lParam)
-#define TTTOOLINFOA_V3_SIZE CCSIZEOF_STRUCT(TTTOOLINFOA, lpReserved)
-typedef struct tagTOOLINFOW {
- UINT cbSize;
- UINT uFlags;
- HWND hwnd;
- UINT uId;
- RECT rect;
- HINSTANCE hinst;
- LPWSTR lpszText;
-#if (_WIN32_IE >= 0x0300)
- LPARAM lParam;
-#endif
-} TTTOOLINFOW,*LPTTTOOLINFOW,*PTOOLINFOW;
-#define TOOLINFOW TTTOOLINFOW
-#define LPTOOLINFOW LPTTTOOLINFOW
-#define TTTOOLINFOW_V1_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lpszText)
-#define TTTOOLINFOW_V2_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lParam)
-#define TTTOOLINFOW_V3_SIZE CCSIZEOF_STRUCT(TTTOOLINFOW, lpReserved)
-typedef struct _TT_HITTESTINFOA {
- HWND hwnd;
- POINT pt;
- TOOLINFOA ti;
-} TTHITTESTINFOA,*LPTTHITTESTINFOA;
-#define LPHITTESTINFOA LPTTHITTESTINFOA
-typedef struct _TT_HITTESTINFOW {
- HWND hwnd;
- POINT pt;
- TOOLINFOW ti;
-} TTHITTESTINFOW,*LPTTHITTESTINFOW;
-#define LPHITTESTINFOW LPTTHITTESTINFOW
-typedef struct tagNMTTDISPINFOA {
- NMHDR hdr;
- LPSTR lpszText;
- char szText[80];
- HINSTANCE hinst;
- UINT uFlags;
-#if (_WIN32_IE >= 0x0300)
- LPARAM lParam;
-#endif
-} NMTTDISPINFOA, *LPNMTTDISPINFOA;
-#define TOOLTIPTEXTA NMTTDISPINFOA
-#define LPTOOLTIPTEXTA LPNMTTDISPINFOA
-typedef struct tagNMTTDISPINFOW {
- NMHDR hdr;
- LPWSTR lpszText;
- WCHAR szText[80];
- HINSTANCE hinst;
- UINT uFlags;
-#if (_WIN32_IE >= 0x0300)
- LPARAM lParam;
-#endif
-} NMTTDISPINFOW, *LPNMTTDISPINFOW;
-#define TOOLTIPTEXTW NMTTDISPINFOW
-#define LPTOOLTIPTEXTW LPNMTTDISPINFOW
-typedef struct _UDACCEL {
- UINT nSec;
- UINT nInc;
-} UDACCEL,*LPUDACCEL;
-typedef struct _NM_UPDOWN {
- NMHDR hdr;
- int iPos;
- int iDelta;
-} NMUPDOWN,*LPNMUPDOWN;
-/* for backward compatibility */
-#define NM_UPDOWN NMUPDOWN
-#define LPNM_UPDOWN LPNMUPDOWN
-typedef struct _LVITEMA {
- UINT mask;
- int iItem;
- int iSubItem;
- UINT state;
- UINT stateMask;
- LPSTR pszText;
- int cchTextMax;
- int iImage;
- LPARAM lParam;
-#if (_WIN32_IE >= 0x0300)
- int iIndent;
-#endif
-#if (_WIN32_WINNT >= 0x0501)
- int iGroupId;
- UINT cColumns;
- PUINT puColumns;
-#endif
-} LVITEMA, FAR *LPLVITEMA;
-#define _LV_ITEMA _LVITEMA
-#define LV_ITEMA LVITEMA
-typedef struct _LVITEMW {
- UINT mask;
- int iItem;
- int iSubItem;
- UINT state;
- UINT stateMask;
- LPWSTR pszText;
- int cchTextMax;
- int iImage;
- LPARAM lParam;
-#if (_WIN32_IE >= 0x0300)
- int iIndent;
-#endif
-#if (_WIN32_WINNT >= 0x0501)
- int iGroupId;
- UINT cColumns;
- PUINT puColumns;
-#endif
-} LVITEMW, FAR *LPLVITEMW;
-#define _LV_ITEMW _LVITEMW
-#define LV_ITEMW LVITEMW
-typedef struct tagLVFINDINFOA {
- UINT flags;
- LPCSTR psz;
- LPARAM lParam;
- POINT pt;
- UINT vkDirection;
-} LVFINDINFOA, FAR* LPFINDINFOA;
-#define _LV_FINDINFOA tagLVFINDINFOA
-#define LV_FINDINFOA LVFINDINFOA
-typedef struct tagLVFINDINFOW {
- UINT flags;
- LPCWSTR psz;
- LPARAM lParam;
- POINT pt;
- UINT vkDirection;
-} LVFINDINFOW, FAR* LPFINDINFOW;
-#define _LV_FINDINFOW tagLVFINDINFOW
-#define LV_FINDINFOW LVFINDINFOW
-typedef struct tagNMLVFINDITEMA {
- NMHDR hdr;
- int iStart;
- LVFINDINFOA lvfi;
-} NMLVFINDITEMA, *PNMLVFINDITEMA, FAR *LPNMLVFINDITEMA;
-#define _NMLVFINDITEMA tagNMLVFINDITEMA
-typedef struct tagNMLVFINDITEMW {
- NMHDR hdr;
- int iStart;
- LVFINDINFOW lvfi;
-} NMLVFINDITEMW, *PNMLVFINDITEMW, FAR *LPNMLVFINDITEMW;
-#define _NMLVFINDITEMW tagNMLVFINDITEMW
-typedef struct _LVHITTESTINFO {
- POINT pt;
- UINT flags;
- int iItem;
-#if (_WIN32_IE >= 0x0300)
- int iSubItem;
-#endif
-} LVHITTESTINFO, FAR *LPLVHITTESTINFO;
-#define _LV_HITTESTINFO _LVHITTESTINFO
-#define LV_HITTESTINFO LVHITTESTINFO
-typedef struct _LVCOLUMNA {
- UINT mask;
- int fmt;
- int cx;
- LPSTR pszText;
- int cchTextMax;
- int iSubItem;
-#if (_WIN32_IE >= 0x0300)
- int iImage;
- int iOrder;
-#endif
-} LVCOLUMNA, FAR *LPLVCOLUMNA;
-#define _LV_COLUMNA _LVCOLUMNA
-#define LV_COLUMNA LVCOLUMNA
-typedef struct _LVCOLUMNW {
- UINT mask;
- int fmt;
- int cx;
- LPWSTR pszText;
- int cchTextMax;
- int iSubItem;
-#if (_WIN32_IE >= 0x0300)
- int iImage;
- int iOrder;
-#endif
-} LVCOLUMNW, FAR *LPLVCOLUMNW;
-#define _LV_COLUMNW _LVCOLUMNW
-#define LV_COLUMNW LVCOLUMNW
-typedef int(CALLBACK *PFNLVCOMPARE)(LPARAM,LPARAM,LPARAM);
-typedef struct tagNMLISTVIEW {
- NMHDR hdr;
- int iItem;
- int iSubItem;
- UINT uNewState;
- UINT uOldState;
- UINT uChanged;
- POINT ptAction;
- LPARAM lParam;
-} NMLISTVIEW, *LPNMLISTVIEW;
-/* for backward compatibility */
-#define _NM_LISTVIEW tagNMLISTVIEW
-#define NM_LISTVIEW NMLISTVIEW
-#define LPNM_LISTVIEW LPNMLISTVIEW
-typedef struct tagNMLVDISPINFOA {
- NMHDR hdr;
- LV_ITEMA item;
-} NMLVDISPINFOA, FAR *LPNMLVDISPINFOA;
-#define _LV_DISPINFOA tagNMLVDISPINFOA
-#define LV_DISPINFOA NMLVDISPINFOA
-typedef struct tagNMLVDISPINFOW {
- NMHDR hdr;
- LV_ITEMW item;
-} NMLVDISPINFOW, FAR *LPNMLVDISPINFOW;
-#define _LV_DISPINFOW tagNMLVDISPINFOW
-#define LV_DISPINFOW NMLVDISPINFOW
-typedef struct _LV_KEYDOWN {
- NMHDR hdr;
- WORD wVKey;
- UINT flags;
-} LV_KEYDOWN;
-typedef struct tagNMLVCACHEHINT {
- NMHDR hdr;
- int iFrom;
- int iTo;
-} NMLVCACHEHINT, *LPNMLVCACHEHINT;
-#define NM_CACHEHINT NMLVCACHEHINT
-#define PNM_CACHEHINT LPNMLVCACHEHINT
-#define LPNM_CACHEHINT LPNMLVCACHEHINT
-
-typedef struct _TREEITEM *HTREEITEM;
-typedef struct tagTVITEMA {
- UINT mask;
- HTREEITEM hItem;
- UINT state;
- UINT stateMask;
- LPSTR pszText;
- int cchTextMax;
- int iImage;
- int iSelectedImage;
- int cChildren;
- LPARAM lParam;
-} TVITEMA,*LPTVITEMA;
-#define _TV_ITEMA tagTVITEMA
-#define TV_ITEMA TVITEMA
-#define LPTV_ITEMA LPTVITEMA
-typedef struct tagTVITEMW {
- UINT mask;
- HTREEITEM hItem;
- UINT state;
- UINT stateMask;
- LPWSTR pszText;
- int cchTextMax;
- int iImage;
- int iSelectedImage;
- int cChildren;
- LPARAM lParam;
-} TVITEMW,*LPTVITEMW;
-#define _TV_ITEMW tagTVITEMW
-#define TV_ITEMW TVITEMW
-#define LPTV_ITEMW LPTVITEMW
-#if (_WIN32_IE >= 0x0400)
-typedef struct tagTVITEMEXA {
- UINT mask;
- HTREEITEM hItem;
- UINT state;
- UINT stateMask;
- LPSTR pszText;
- int cchTextMax;
- int iImage;
- int iSelectedImage;
- int cChildren;
- LPARAM lParam;
- int iIntegral;
-} TVITEMEXA, *LPTVITEMEXA;
-typedef struct tagTVITEMEXW {
- UINT mask;
- HTREEITEM hItem;
- UINT state;
- UINT stateMask;
- LPWSTR pszText;
- int cchTextMax;
- int iImage;
- int iSelectedImage;
- int cChildren;
- LPARAM lParam;
- int iIntegral;
-} TVITEMEXW, *LPTVITEMEXW;
-#endif /* _WIN32_IE >= 0x0400 */
-typedef struct tagTVINSERTSTRUCTA {
- HTREEITEM hParent;
- HTREEITEM hInsertAfter;
-#if (_WIN32_IE >= 0x0400)
- _ANONYMOUS_UNION union {
- TVITEMEXA itemex;
- TV_ITEMA item;
- } DUMMYUNIONNAME;
-#else
- TV_ITEMA item;
-#endif
-} TVINSERTSTRUCTA,*LPTVINSERTSTRUCTA;
-#define _TV_INSERTSTRUCTA tagTVINSERTSTRUCTA
-#define TV_INSERTSTRUCTA TVINSERTSTRUCTA
-#define LPTV_INSERTSTRUCTA LPTVINSERTSTRUCTA
-typedef struct tagTVINSERTSTRUCTW {
- HTREEITEM hParent;
- HTREEITEM hInsertAfter;
-#if (_WIN32_IE >= 0x0400)
- _ANONYMOUS_UNION union {
- TVITEMEXW itemex;
- TV_ITEMW item;
- } DUMMYUNIONNAME;
-#else
- TV_ITEMW item;
-#endif
-} TVINSERTSTRUCTW,*LPTVINSERTSTRUCTW;
-#define _TV_INSERTSTRUCTW tagTVINSERTSTRUCTW
-#define TV_INSERTSTRUCTW TVINSERTSTRUCTW
-#define LPTV_INSERTSTRUCTW LPTVINSERTSTRUCTW
-typedef struct tagTVHITTESTINFO {
- POINT pt;
- UINT flags;
- HTREEITEM hItem;
-} TVHITTESTINFO, *LPTVHITTESTINFO;
-#define _TV_HITTESTINFO tagTVHITTESTINFO
-#define TV_HITTESTINFO TVHITTESTINFO
-#define LPTV_HITTESTINFO LPTVHITTESTINFO
-typedef int(CALLBACK *PFNTVCOMPARE)(LPARAM,LPARAM,LPARAM);
-typedef struct tagTVSORTCB {
- HTREEITEM hParent;
- PFNTVCOMPARE lpfnCompare;
- LPARAM lParam;
-} TVSORTCB,*LPTVSORTCB;
-#define _TV_SORTCB tagTVSORTCB
-#define TV_SORTCB TVSORTCB
-#define LPTV_SORTCB LPTVSORTCB
-typedef struct tagNMTREEVIEWA {
- NMHDR hdr;
- UINT action;
- TV_ITEMA itemOld;
- TV_ITEMA itemNew;
- POINT ptDrag;
-} NMTREEVIEWA,*LPNMTREEVIEWA;
-#define _NM_TREEVIEWA tagNMTREEVIEWA
-#define NM_TREEVIEWA NMTREEVIEWA
-#define LPNM_TREEVIEWA LPNMTREEVIEWA
-typedef struct tagNMTREEVIEWW {
- NMHDR hdr;
- UINT action;
- TV_ITEMW itemOld;
- TV_ITEMW itemNew;
- POINT ptDrag;
-} NMTREEVIEWW,*LPNMTREEVIEWW;
-#define _NM_TREEVIEWW tagNMTREEVIEWW
-#define NM_TREEVIEWW NMTREEVIEWW
-#define LPNM_TREEVIEWW LPNMTREEVIEWW
-typedef struct tagNMTVDISPINFOA {
- NMHDR hdr;
- TVITEMA item;
-} NMTVDISPINFOA, *LPNMTVDISPINFOA;
-#define _TV_DISPINFOA tagNMTVDISPINFOA
-#define TV_DISPINFOA NMTVDISPINFOA
-typedef struct tagNMTVDISPINFOW {
- NMHDR hdr;
- TVITEMW item;
-} NMTVDISPINFOW, *LPNMTVDISPINFOW;
-#define _TV_DISPINFOW tagNMTVDISPINFOW
-#define TV_DISPINFOW NMTVDISPINFOW
-#if (_WIN32_IE >= 0x0400)
-typedef struct tagNMTVGETINFOTIPA {
- NMHDR hdr;
- LPSTR pszText;
- int cchTextMax;
- HTREEITEM hItem;
- LPARAM lParam;
-} NMTVGETINFOTIPA, *LPNMTVGETINFOTIPA;
-typedef struct tagNMTVGETINFOTIPW {
- NMHDR hdr;
- LPWSTR pszText;
- int cchTextMax;
- HTREEITEM hItem;
- LPARAM lParam;
-} NMTVGETINFOTIPW, *LPNMTVGETINFOTIPW;
-#endif
-typedef struct _TV_KEYDOWN {
- NMHDR hdr;
- WORD wVKey;
- UINT flags;
-} TV_KEYDOWN;
-typedef struct _TC_ITEMHEADERA {
- UINT mask;
- UINT lpReserved1;
- UINT lpReserved2;
- LPSTR pszText;
- int cchTextMax;
- int iImage;
-} TC_ITEMHEADERA;
-typedef struct _TC_ITEMHEADERW {
- UINT mask;
- UINT lpReserved1;
- UINT lpReserved2;
- LPWSTR pszText;
- int cchTextMax;
- int iImage;
-} TC_ITEMHEADERW;
-typedef struct tagTCITEMA {
- UINT mask;
-#if (_WIN32_IE >= 0x0300)
- DWORD dwState;
- DWORD dwStateMask;
-#else
- UINT lpReserved1;
- UINT lpReserved2;
-#endif
- LPSTR pszText;
- int cchTextMax;
- int iImage;
- LPARAM lParam;
-} TCITEMA, *LPTCITEMA;
-#define TC_ITEMA TCITEMA
-typedef struct tagTCITEMW {
- UINT mask;
-#if (_WIN32_IE >= 0x0300)
- DWORD dwState;
- DWORD dwStateMask;
-#else
- UINT lpReserved1;
- UINT lpReserved2;
-#endif
- LPWSTR pszText;
- int cchTextMax;
- int iImage;
- LPARAM lParam;
-} TCITEMW, *LPTCITEMW;
-#define TC_ITEMW TCITEMW
-typedef struct tagTCHITTESTINFO {
- POINT pt;
- UINT flags;
-} TCHITTESTINFO, *LPTCHITTESTINFO;
-#define TC_HITTESTINFO TCHITTESTINFO
-#define LPTC_HITTESTINFO LPTCHITTESTINFO
-typedef struct _TC_KEYDOWN {
- NMHDR hdr;
- WORD wVKey;
- UINT flags;
-} TC_KEYDOWN;
-#if (_WIN32_IE >= 0x0300)
-typedef struct tagINITCOMMONCONTROLSEX {
- DWORD dwSize;
- DWORD dwICC;
-} INITCOMMONCONTROLSEX,*LPINITCOMMONCONTROLSEX;
-#endif
-typedef struct tagPBRANGE {
- int iLow;
- int iHigh;
-} PBRANGE,*PPBRANGE;
-typedef struct tagCOLORSCHEME {
- DWORD dwSize;
- COLORREF clrBtnHighlight;
- COLORREF clrBtnShadow;
-} COLORSCHEME,*LPCOLORSCHEME;
-typedef struct tagMCHITTESTINFO {
- UINT cbSize;
- POINT pt;
- UINT uHit;
- SYSTEMTIME st;
-}MCHITTESTINFO, *PMCHITTESTINFO;
-typedef DWORD MONTHDAYSTATE;
-typedef MONTHDAYSTATE *LPMONTHDAYSTATE;
-typedef struct tagNMDAYSTATE {
- NMHDR nmhdr;
- SYSTEMTIME stStart;
- int cDayState;
- LPMONTHDAYSTATE prgDayState;
-}NMDAYSTATE,*LPNMDAYSTATE;
-typedef struct tagREBARINFO {
- UINT cbSize;
- UINT fMask;
- HIMAGELIST himl;
-} REBARINFO,*LPREBARINFO;
-typedef struct tagREBARBANDINFOA {
- UINT cbSize;
- UINT fMask;
- UINT fStyle;
- COLORREF clrFore;
- COLORREF clrBack;
- LPSTR lpText;
- UINT cch;
- int iImage;
- HWND hwndChild;
- UINT cxMinChild;
- UINT cyMinChild;
- UINT cx;
- HBITMAP hbmBack;
- UINT wID;
-#if (_WIN32_IE >= 0x0400)
- UINT cyChild;
- UINT cyMaxChild;
- UINT cyIntegral;
- UINT cxIdeal;
- LPARAM lParam;
- UINT cxHeader;
-#endif
-} REBARBANDINFOA,*LPREBARBANDINFOA;
-typedef struct tagREBARBANDINFOW {
- UINT cbSize;
- UINT fMask;
- UINT fStyle;
- COLORREF clrFore;
- COLORREF clrBack;
- LPWSTR lpText;
- UINT cch;
- int iImage;
- HWND hwndChild;
- UINT cxMinChild;
- UINT cyMinChild;
- UINT cx;
- HBITMAP hbmBack;
- UINT wID;
-#if (_WIN32_IE >= 0x0400)
- UINT cyChild;
- UINT cyMaxChild;
- UINT cyIntegral;
- UINT cxIdeal;
- LPARAM lParam;
- UINT cxHeader;
-#endif
-} REBARBANDINFOW,*LPREBARBANDINFOW;
-typedef REBARBANDINFOA const *LPCREBARBANDINFOA;
-typedef REBARBANDINFOW const *LPCREBARBANDINFOW;
-#define REBARBANDINFOA_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOA,wID)
-#define REBARBANDINFOW_V3_SIZE CCSIZEOF_STRUCT(REBARBANDINFOW, wID)
-#if (_WIN32_IE >= 0x0300)
-typedef struct tagNMLVODSTATECHANGE {
- NMHDR hdr;
- int iFrom;
- int iTo;
- UINT uNewState;
- UINT uOldState;
-} NMLVODSTATECHANGE, *LPNMLVODSTATECHANGE;
-typedef struct tagIMAGELISTDRAWPARAMS {
- DWORD cbSize;
- HIMAGELIST himl;
- int i;
- HDC hdcDst;
- int x;
- int y;
- int cx;
- int cy;
- int xBitmap;
- int yBitmap;
- COLORREF rgbBk;
- COLORREF rgbFg;
- UINT fStyle;
- DWORD dwRop;
-#if (_WIN32_WINNT >= 0x0501)
- DWORD fState;
- DWORD Frame;
- COLORREF crEffect;
-#endif
-} IMAGELISTDRAWPARAMS,*LPIMAGELISTDRAWPARAMS;
-#endif /* (_WIN32_IE >= 0x0300) */
-#if (_WIN32_IE >= 0x0400)
-typedef struct tagNMREBARCHILDSIZE {
- NMHDR hdr;
- UINT uBand;
- UINT wID;
- RECT rcChild;
- RECT rcBand;
-} NMREBARCHILDSIZE,*LPNMREBARCHILDSIZE;
-typedef struct tagNMREBAR {
- NMHDR hdr;
- DWORD dwMask;
- UINT uBand;
- UINT fStyle;
- UINT wID;
- LPARAM lParam;
-} NMREBAR,*LPNMREBAR;
-typedef struct tagNMRBAUTOSIZE {
- NMHDR hdr;
- BOOL fChanged;
- RECT rcTarget;
- RECT rcActual;
-} NMRBAUTOSIZE,*LPNMRBAUTOSIZE;
-#if (_WIN32_IE >= 0x0500)
-typedef struct tagNMREBARCHEVRON {
- NMHDR hdr;
- UINT uBand;
- UINT wID;
- LPARAM lParam;
- RECT rc;
- LPARAM lParamNM;
-} NMREBARCHEVRON, *LPNMREBARCHEVRON;
-#endif
-typedef struct _RB_HITTESTINFO {
- POINT pt;
- UINT flags;
- int iBand;
-} RBHITTESTINFO,*LPRBHITTESTINFO;
-#endif
-typedef struct _DSA *HDSA;
-typedef struct _DPA *HDPA;
-typedef INT (CALLBACK *PFNDPAENUMCALLBACK)(PVOID,PVOID);
-typedef INT (CALLBACK *PFNDSAENUMCALLBACK)(PVOID,PVOID);
-typedef INT (CALLBACK *PFNDPACOMPARE)(PVOID,PVOID,LPARAM);
-#if (_WIN32_WINNT >= 0x0501)
-typedef LRESULT (CALLBACK *SUBCLASSPROC)(HWND,UINT,WPARAM,LPARAM,UINT_PTR,DWORD_PTR);
-typedef struct tagLITEM {
- UINT mask;
- int iLink;
- UINT state;
- UINT stateMask;
- WCHAR szID[MAX_LINKID_TEXT];
- WCHAR szUrl[L_MAX_URL_LENGTH];
-} LITEM,*PLITEM;
-typedef struct tagLHITTESTINFO {
- POINT pt;
- LITEM item;
-} LHITTESTINFO,*PLHITTESTINFO;
-typedef struct tagNMLINK {
- NMHDR hdr;
- LITEM item;
-} NMLINK,*PNMLINK;
-#endif /* _WIN32_WINNT >= 0x0501 */
-
-#define INDEXTOOVERLAYMASK(i) ((i)<<8)
-#define INDEXTOSTATEIMAGEMASK(i) ((i)<<12)
-#define HANDLE_WM_NOTIFY(h,w,l,f) (f)((h),(int)(w),(NMHDR*)(l))
-#define FORWARD_WM_NOTIFY(h,i,p,f) (LRESULT)(f)((h),WM_NOTIFY,(WPARAM)(int)(i),(LPARAM)(NMHDR*)(p))
-#define CCSIZEOF_STRUCT(s,m) (((int)((PBYTE)(&((s*)0)->m)-((PBYTE)((s*)0))))+sizeof(((s*)0)->m))
-#define MAKEIPADDRESS(b1,b2,b3,b4) ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<<16)+((DWORD)(b3)<<8)+((DWORD)(b4))))
-#define MAKEIPRANGE(low,high) ((LPARAM)(WORD)(((BYTE)(high)<<8)+(BYTE)(low)))
-#define FIRST_IPADDRESS(a) ((a>>24) & 0xff)
-#define SECOND_IPADDRESS(a) ((a>>16) & 0xff)
-#define THIRD_IPADDRESS(a) ((a>>8) & 0xff)
-#define FOURTH_IPADDRESS(a) (a & 0xff)
-#define Animate_Create(w,i,s,hI) CreateWindow(ANIMATE_CLASS,NULL,s,0,0,0,0,w,(HMENU)(i),hI,NULL)
-#define Animate_Open(w,f) (BOOL)SNDMSG(w,ACM_OPEN,0,(LPARAM)f)
-#define Animate_OpenEx(w,h,s) (BOOL)SNDMSG(w,ACM_OPEN,(WPARAM)h,(LPARAM)(LPTSTR)(s))
-#define Animate_Play(w,f,t,r) (BOOL)SNDMSG(w,ACM_PLAY,(r),(LPARAM)MAKELONG(f,t))
-#define Animate_Stop(w) (BOOL)SNDMSG(w,ACM_STOP,0,0)
-#define Animate_Close(w) Animate_Open(w,NULL)
-#define Animate_Seek(w,f) Animate_Play(w,f,f,1)
-HBITMAP WINAPI CreateMappedBitmap(HINSTANCE,int,UINT,LPCOLORMAP,int);
-HWND WINAPI CreateStatusWindowA(LONG,LPCSTR,HWND,UINT);
-HWND WINAPI CreateStatusWindowW(LONG,LPCWSTR,HWND,UINT);
-HWND WINAPI CreateToolbarEx(HWND,DWORD,UINT,int,HINSTANCE,UINT,LPCTBBUTTON,int,int,int,int,int,UINT);
-HWND WINAPI CreateUpDownControl(DWORD,int,int,int,int,HWND,int,HINSTANCE,HWND,int,int,int);
-#define DateTime_GetMonthCal(hwnd) SNDMSG(hwnd, DTM_GETMONTHCAL, 0, 0)
-#define DateTime_GetMonthCalColor(hwnd, icolor) SNDMSG(hwnd, DTM_GETMONTHCAL, (WPARAM)icolor,0)
-#define DateTime_GetMonthCalFont(hwnd) SNDMSG(hwnd,DTM_GETMCFONT,0,0)
-#define DateTime_GetRange(hwnd,lpsystimearray) SNDMSG(hwnd,DTM_GETRANGE,0,(LPARAM)lpsystimearray)
-#define DateTime_GetSystemtime(hwnd,lpsystime) SNDMSG(hwnd,DTM_GETSYSTEMTIME,0,(LPARAM)lpsystime)
-#define DateTime_SetFormat(hwnd,lpszformat) SNDMSG(hwnd,DTM_SETFORMAT,0,(LPARAM)lpszformat)
-#define DateTime_SetMonthCalColor(hwnd,icolor,clr) SNDMSG(hwnd,DTM_SETMCCOLOR,(WPARAM)icolor,(LPARAM)clr)
-#define DateTime_SetMonthCalFont(hwnd,hfont,lparam) SNDMSG(hwnd,DTM_SETMCFONT,(WPARAM)hfont,(LPARAM)lparam)
-#define DateTime_SetRange(hwnd,flags,lpsystimearray) SNDMSG(hwnd,DTM_SETRANGE,(WPARAM)flags,(LPARAM)lpsystimearray)
-#define DateTime_SetSystemtime(hwnd,flag,lpsystime) SNDMSG(hwnd,DTM_SETSYSTEMTIME,(WPARAM)flag,(LPARAM)lpsystime)
-void WINAPI DrawInsert(HWND,HWND,int);
-void WINAPI DrawStatusTextA(HDC,LPRECT,LPCSTR,UINT);
-void WINAPI DrawStatusTextW(HDC,LPRECT,LPCWSTR,UINT);
-void WINAPI GetEffectiveClientRect(HWND,LPRECT,LPINT);
-#define Header_GetItemCount(w) (int)SNDMSG((w),HDM_GETITEMCOUNT,0,0)
-#define Header_InsertItem(w,i,phdi) (int)SNDMSG((w),HDM_INSERTITEM,(WPARAM)(int)(i),(LPARAM)(const HD_ITEM*)(phdi))
-#define Header_DeleteItem(w,i) (BOOL)SNDMSG((w),HDM_DELETEITEM,(WPARAM)(int)(i),0)
-#define Header_GetItem(w,i,phdi) (BOOL)SNDMSG((w),HDM_GETITEM,(WPARAM)(int)(i),(LPARAM)(HD_ITEM*)(phdi))
-#define Header_SetItem(w,i,phdi) (BOOL)SNDMSG((w),HDM_SETITEM,(WPARAM)(int)(i),(LPARAM)(const HD_ITEM*)(phdi))
-#define Header_Layout(w,l) (BOOL)SNDMSG((w),HDM_LAYOUT,0,(LPARAM)(HD_LAYOUT*)(l))
-#if (_WIN32_IE >= 0x0300)
-#define Header_OrderToIndex(w,o) (int)SNDMSG((w),HDM_ORDERTOINDEX,(WPARAM)(o),0)
-#define Header_GetItemRect(w,i,r) (BOOL)SNDMSG((w),HDM_GETITEMRECT,(WPARAM)(i),(LPARAM)(r))
-#define Header_GetOrderArray(w,l,a) (BOOL)SNDMSG((w),HDM_GETORDERARRAY,(WPARAM)(l),(LPARAM)(a))
-#define Header_SetOrderArray(w,l,a) (BOOL)SNDMSG((w),HDM_SETORDERARRAY,(WPARAM)(l),(LPARAM)(a))
-#define Header_CreateDragImage(w, i) (HIMAGELIST)SNDMSG((w), HDM_CREATEDRAGIMAGE, (WPARAM)i, 0)
-#define Header_SetImageList(w,l) (HIMAGELIST)SNDMSG((w), HDM_SETIMAGELIST, 0, (LPARAM)l)
-#define Header_GetImageList(w) (HIMAGELIST)SNDMSG((w),HDM_GETIMAGELIST,0,0)
-#endif
-#if (_WIN32_IE >= 0x0400)
-#define Header_GetUnicodeFormat(w) (BOOL)SNDMSG((w),HDM_GETUNICODEFORMAT,0,0)
-#define Header_SetUnicodeFormat(w,f) (BOOL)SNDMSG((w),HDM_SETUNICODEFORMAT,(WPARAM)(f),0)
-#endif
-HDSA WINAPI DSA_Create(INT,INT);
-BOOL WINAPI DSA_Destroy(HDSA);
-VOID WINAPI DSA_DestroyCallback(HDSA,PFNDSAENUMCALLBACK,PVOID);
-PVOID WINAPI DSA_GetItemPtr(HDSA,INT);
-INT WINAPI DSA_InsertItem(HDSA,INT,PVOID);
-HDPA WINAPI DPA_Create(INT);
-BOOL WINAPI DPA_Destroy(HDPA);
-PVOID WINAPI DPA_DeletePtr(HDPA,INT);
-BOOL WINAPI DPA_DeleteAllPtrs(HDPA);
-VOID WINAPI DPA_EnumCallback(HDPA,PFNDPAENUMCALLBACK,PVOID);
-VOID WINAPI DPA_DestroyCallback(HDPA,PFNDPAENUMCALLBACK,PVOID);
-BOOL WINAPI DPA_SetPtr(HDPA,INT,PVOID);
-INT WINAPI DPA_InsertPtr(HDPA,INT,PVOID);
-PVOID WINAPI DPA_GetPtr(HDPA,INT_PTR);
-BOOL WINAPI DPA_Sort(HDPA,PFNDPACOMPARE,LPARAM);
-INT WINAPI DPA_Search(HDPA,PVOID,INT,PFNDPACOMPARE,LPARAM,UINT);
-BOOL WINAPI Str_SetPtrW(LPWSTR*,LPCWSTR);
-#if (_WIN32_IE >= 0x0400)
-BOOL WINAPI FlatSB_EnableScrollBar(HWND,INT,UINT);
-BOOL WINAPI FlatSB_ShowScrollBar(HWND,INT,BOOL);
-BOOL WINAPI FlatSB_GetScrollRange(HWND,INT,LPINT,LPINT);
-BOOL WINAPI FlatSB_GetScrollInfo(HWND,INT,LPSCROLLINFO);
-INT WINAPI FlatSB_GetScrollPos(HWND,INT);
-BOOL WINAPI FlatSB_GetScrollProp(HWND,INT,LPINT);
-#ifdef _WIN64
-BOOL WINAPI FlatSB_GetScrollPropPtr(HWND,INT,PINT_PTR);
-#else
-#define FlatSB_GetScrollPropPtr FlatSB_GetScrollProp
-#endif
-INT WINAPI FlatSB_SetScrollPos(HWND,INT,INT,BOOL);
-INT WINAPI FlatSB_SetScrollInfo(HWND,INT,LPSCROLLINFO,BOOL);
-INT WINAPI FlatSB_SetScrollRange(HWND,INT,INT,INT,BOOL);
-BOOL WINAPI FlatSB_SetScrollProp(HWND,UINT,INT_PTR,BOOL);
-#define FlatSB_SetScrollPropPtr FlatSB_SetScrollProp
-BOOL WINAPI InitializeFlatSB(HWND);
-HRESULT WINAPI UninitializeFlatSB(HWND);
-#endif /* _WIN32_IE >= 0x0400 */
-#if (_WIN32_WINNT >= 0x0501)
-BOOL WINAPI SetWindowSubclass(HWND,SUBCLASSPROC,UINT_PTR,DWORD_PTR);
-BOOL WINAPI GetWindowSubclass(HWND,SUBCLASSPROC,UINT_PTR,DWORD_PTR*);
-BOOL WINAPI RemoveWindowSubclass(HWND,SUBCLASSPROC,UINT_PTR);
-LRESULT WINAPI DefSubclassProc(HWND,UINT,WPARAM,LPARAM);
-INT WINAPI DrawShadowText(HDC,LPCWSTR,UINT,RECT*,DWORD,COLORREF,COLORREF,INT,INT);
-#endif /* _WIN32_WINNT >= 0x0501 */
-int WINAPI ImageList_Add(HIMAGELIST,HBITMAP,HBITMAP);
-#define ImageList_AddIcon(l,i) ImageList_ReplaceIcon(l,-1,i)
-int WINAPI ImageList_AddMasked(HIMAGELIST,HBITMAP,COLORREF);
-BOOL WINAPI ImageList_BeginDrag(HIMAGELIST,int,int,int);
-HIMAGELIST WINAPI ImageList_Create(int,int,UINT,int,int);
-BOOL WINAPI ImageList_Destroy(HIMAGELIST);
-BOOL WINAPI ImageList_DragEnter(HWND,int,int);
-BOOL WINAPI ImageList_DragLeave(HWND);
-BOOL WINAPI ImageList_DragMove(int,int);
-BOOL WINAPI ImageList_DragShowNolock(BOOL);
-BOOL WINAPI ImageList_Draw(HIMAGELIST,int,HDC,int,int,UINT);
-BOOL WINAPI ImageList_DrawEx(HIMAGELIST,int,HDC,int,int,int,int,COLORREF,COLORREF,UINT);
-void WINAPI ImageList_EndDrag(VOID);
-#define ImageList_ExtractIcon(h,l,i) ImageList_GetIcon(l,i,0)
-COLORREF WINAPI ImageList_GetBkColor(HIMAGELIST);
-HIMAGELIST WINAPI ImageList_GetDragImage(LPPOINT,LPPOINT);
-HICON WINAPI ImageList_GetIcon(HIMAGELIST,int,UINT);
-BOOL WINAPI ImageList_GetIconSize(HIMAGELIST,int*,int*);
-int WINAPI ImageList_GetImageCount(HIMAGELIST);
-BOOL WINAPI ImageList_GetImageInfo(HIMAGELIST,int,IMAGEINFO*);
-#define ImageList_LoadBitmap(h,l,x,G,M) ImageList_LoadImage(h,l,x,G,M,IMAGE_BITMAP,0)
-HIMAGELIST WINAPI ImageList_LoadImageA(HINSTANCE,LPCSTR,int,int,COLORREF,UINT,UINT);
-HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE,LPCWSTR,int,int,COLORREF,UINT,UINT);
-HIMAGELIST WINAPI ImageList_Merge(HIMAGELIST,int,HIMAGELIST,int,int,int);
-BOOL WINAPI ImageList_Remove(HIMAGELIST,int);
-#define ImageList_RemoveAll(l) ImageList_Remove(l,-1)
-BOOL WINAPI ImageList_Replace(HIMAGELIST,int,HBITMAP,HBITMAP);
-int WINAPI ImageList_ReplaceIcon(HIMAGELIST,int,HICON);
-COLORREF WINAPI ImageList_SetBkColor(HIMAGELIST,COLORREF);
-BOOL WINAPI ImageList_SetDragCursorImage(HIMAGELIST,int,int,int);
-BOOL WINAPI ImageList_SetIconSize(HIMAGELIST,int,int);
-BOOL WINAPI ImageList_SetOverlayImage(HIMAGELIST,int,int);
-#ifdef _OBJIDL_H
-HIMAGELIST WINAPI ImageList_Read(LPSTREAM);
-BOOL WINAPI ImageList_Write(HIMAGELIST,LPSTREAM);
-#endif
-#if (_WIN32_IE >= 0x0400)
-HIMAGELIST WINAPI ImageList_Duplicate(HIMAGELIST himl);
-#endif
-void WINAPI InitCommonControls(void);
-#if (_WIN32_IE >= 0x0300)
-BOOL WINAPI InitCommonControlsEx(LPINITCOMMONCONTROLSEX);
-#endif
-int WINAPI LBItemFromPt(HWND,POINT,BOOL);
-#define ListView_GetBkColor(w) (COLORREF)SNDMSG((w),LVM_GETBKCOLOR,0,0)
-#define ListView_GetImageList(w,i) (HIMAGELIST)SNDMSG((w),LVM_GETIMAGELIST,(i),0)
-#define ListView_GetItemCount(w) (int)SNDMSG((w),LVM_GETITEMCOUNT,0,0)
-#define ListView_GetItem(w,i) (BOOL)SNDMSG((w),LVM_GETITEM,0,(LPARAM)(i))
-#define ListView_SetBkColor(w,c) (BOOL)SNDMSG((w),LVM_SETBKCOLOR,0,(LPARAM)c)
-#define ListView_SetImageList(w,h,i) (HIMAGELIST)(UINT)SNDMSG((w),LVM_SETIMAGELIST,(i),(LPARAM)(h))
-#define ListView_SetItem(w,i) (BOOL)SNDMSG((w),LVM_SETITEM,0,(LPARAM)(const LV_ITEM*)(i))
-#define ListView_InsertItem(w,i) (int)SNDMSG((w),LVM_INSERTITEM,0,(LPARAM)(const LV_ITEM*)(i))
-#define ListView_DeleteItem(w,i) (BOOL)SNDMSG((w),LVM_DELETEITEM,i,0)
-#define ListView_DeleteAllItems(w) (BOOL)SNDMSG((w),LVM_DELETEALLITEMS,0,0)
-#define ListView_GetCallbackMask(w) (UINT)SNDMSG((w),LVM_GETCALLBACKMASK,0,0)
-#define ListView_SetCallbackMask(w,m) (BOOL)SNDMSG((w),LVM_SETCALLBACKMASK,m,0)
-#define ListView_GetNextItem(w,i,f) (int)SNDMSG((w),LVM_GETNEXTITEM,i,MAKELPARAM((f),0))
-#define ListView_FindItem(w,i,p) (int)SNDMSG((w), LVM_FINDITEM,(WPARAM)i,(LPARAM)(const LV_FINDINFO*)(p))
-#define ListView_GetItemRect(w,i,p,c) (BOOL)SNDMSG((w),LVM_GETITEMRECT,i,((p)?(((LPRECT)(p))->left=(c),(LPARAM)(LPRECT)(p)):0))
-#define ListView_SetItemPosition(w,i,x,y) (BOOL)SNDMSG((w),LVM_SETITEMPOSITION,i,MAKELPARAM(x,y))
-#define ListView_GetItemPosition(w,i,p) (BOOL)SNDMSG((w),LVM_GETITEMPOSITION,i,(LPARAM)p)
-#define ListView_GetItemSpacing(w,f) (DWORD)SNDMSG((w),LVM_GETITEMSPACING,f,0)
-#define ListView_GetStringWidth(w,s) (int)SNDMSG((w),LVM_GETSTRINGWIDTH,0,(LPARAM)s)
-#define ListView_HitTest(w,p) (int)SNDMSG((w),LVM_HITTEST,0,(LPARAM)(LV_HITTESTINFO*)(p))
-#define ListView_EnsureVisible(w,i,f) (BOOL)SNDMSG((w),LVM_ENSUREVISIBLE,i,MAKELPARAM((f),0))
-#define ListView_Scroll(w,x,y) (BOOL)SNDMSG((w),LVM_SCROLL,x,y)
-#define ListView_RedrawItems(w,f,l) (BOOL)SNDMSG((w),LVM_REDRAWITEMS,f,l)
-#define ListView_Arrange(w,c) (BOOL)SNDMSG((w),LVM_ARRANGE,c,0)
-#define ListView_EditLabel(w,i) (HWND)SNDMSG((w),LVM_EDITLABEL,i,0)
-#define ListView_GetEditControl(w) (HWND)SNDMSG((w),LVM_GETEDITCONTROL,0,0)
-#define ListView_GetColumn(w,i,p) (BOOL)SNDMSG((w),LVM_GETCOLUMN,i,(LPARAM)(LV_COLUMN*)(p))
-#define ListView_SetColumn(w,i,p) (BOOL)SNDMSG((w),LVM_SETCOLUMN,i,(LPARAM)(const LV_COLUMN*)(p))
-#define ListView_InsertColumn(w,i,p) (int)SNDMSG((w),LVM_INSERTCOLUMN,i,(LPARAM)(const LV_COLUMN*)(p))
-#define ListView_DeleteColumn(w,i) (BOOL)SNDMSG((w),LVM_DELETECOLUMN,i,0)
-#define ListView_GetColumnWidth(w,i) (int)SNDMSG((w),LVM_GETCOLUMNWIDTH,i,0)
-#define ListView_SetColumnWidth(w,i,x) (BOOL)SNDMSG((w),LVM_SETCOLUMNWIDTH,i,MAKELPARAM((x),0))
-#define ListView_CreateDragImage(w,i,p) (HIMAGELIST)SNDMSG((w),LVM_CREATEDRAGIMAGE,i,(LPARAM)(LPPOINT)(p))
-#define ListView_GetViewRect(w,p) (BOOL)SNDMSG((w),LVM_GETVIEWRECT,0,(LPARAM)(LPRECT)(p))
-#define ListView_GetTextColor(w) (COLORREF)SNDMSG((w),LVM_GETTEXTCOLOR,0,0)
-#define ListView_SetTextColor(w,c) (BOOL)SNDMSG((w),LVM_SETTEXTCOLOR,0,(LPARAM)(COLORREF)(c))
-#define ListView_GetTextBkColor(w) (COLORREF)SNDMSG((w),LVM_GETTEXTBKCOLOR,0,0)
-#define ListView_SetTextBkColor(w,c) (BOOL)SNDMSG((w),LVM_SETTEXTBKCOLOR,0,(LPARAM)(COLORREF)(c))
-#define ListView_GetTopIndex(w) (int)SNDMSG((w),LVM_GETTOPINDEX,0,0)
-#define ListView_GetCountPerPage(w) (int)SNDMSG((w),LVM_GETCOUNTPERPAGE,0,0)
-#define ListView_GetOrigin(w,p) (BOOL)SNDMSG((w),LVM_GETORIGIN,0,(LPARAM)(POINT*)(p))
-#define ListView_GetOrigin(w,p) (BOOL)SNDMSG((w),LVM_GETORIGIN,0,(LPARAM)(POINT*)(p))
-#define ListView_Update(w,i) (BOOL)SNDMSG((w),LVM_UPDATE,(WPARAM)(i),0)
-#define ListView_SetItemState(w,i,d,m) \
-{ \
- LV_ITEM _lvi;\
- _lvi.stateMask=m;\
- _lvi.state=d;\
- SNDMSG((w),LVM_SETITEMSTATE,i,(LPARAM)(LV_ITEM*)&_lvi);\
-}
-#define ListView_GetItemState(w,i,m) (UINT)SNDMSG((w),LVM_GETITEMSTATE,i,m)
-#define ListView_GetItemText(w,i,iS,s,n) \
-{ \
- LV_ITEM _lvi;\
- _lvi.iSubItem=iS;\
- _lvi.cchTextMax=n;\
- _lvi.pszText=s;\
- SNDMSG((w),LVM_GETITEMTEXT,i,(LPARAM)(LV_ITEM*)&_lvi);\
-}
-#define ListView_SetItemText(w,i,iS,s) \
-{ \
- LV_ITEM _lvi;\
- _lvi.iSubItem=iS;\
- _lvi.pszText=s;\
- SNDMSG((w),LVM_SETITEMTEXT,i,(LPARAM)(LV_ITEM*)&_lvi);\
-}
-#define ListView_SetItemCount(w,n) (void)SNDMSG((w),LVM_SETITEMCOUNT,n,0)
-#define ListView_SortItems(w,f,l) (BOOL)SNDMSG((w),LVM_SORTITEMS,l,(LPARAM)f)
-#define ListView_SetItemPosition32(w,i,x,y) \
-{ \
- POINT p={x,y}; \
- SNDMSG((w),LVM_SETITEMPOSITION32,i,(LPARAM)&p);\
-}
-#define ListView_GetSelectedCount(w) (UINT)SNDMSG((w),LVM_GETSELECTEDCOUNT,0,0)
-#define ListView_GetCheckState(w,i) ((((UINT)(SNDMSG((w),LVM_GETITEMSTATE,(WPARAM)(i),LVIS_STATEIMAGEMASK)))>>12)-1)
-#define ListView_SetCheckState(w,i,f) ListView_SetItemState(w,i,INDEXTOSTATEIMAGEMASK((f)+1),LVIS_STATEIMAGEMASK)
-#define ListView_GetISearchString(w,lpsz) (BOOL)SNDMSG((w),LVM_GETISEARCHSTRING,0,(LPARAM)(LPTSTR)(lpsz))
-#define ListView_CancelEditLabel(w) (VOID)SNDMSG((w),LVM_CANCELEDITLABEL,0,0)
-#define ListView_EnableGroupView(w,i) (int)SNDMSG((w),LVM_ENABLEGROUPVIEW,(WPARAM)(i),0)
-#define ListView_GetGroupInfo(w,i,p) (int)SNDMSG((w),LVM_GETGROUPINFO,(WPARAM)(i),(LPARAM)(p))
-#define ListView_GetGroupMetrics(w,p) SNDMSG((w),LVM_GETGROUPMETRICS,0,(LPARAM)(p))
-#define ListView_GetInsertMark(w,p) (BOOL)SNDMSG((w),LVM_GETINSERTMARK,0,(LPARAM)(p))
-#define ListView_GetInsertMarkColor(w) (COLORREF)SNDMSG((w),LVM_GETINSERTMARKCOLOR,0,0)
-#define ListView_GetInsertMarkRect(w,p) (int)SNDMSG((w),LVM_GETINSERTMARKRECT,0,(LPARAM)(p))
-#define ListView_GetOutlineColor(w) (COLORREF)SNDMSG((w),LVM_GETOUTLINECOLOR,0,0)
-#define ListView_GetSelectedColumn(w) (UINT)SNDMSG((w),LVM_GETSELECTEDCOLUMN,0,0)
-#define ListView_GetTileInfo(w,p) SNDMSG((w),LVM_GETTILEINFO,0,(LPARAM)(p))
-#define ListView_GetTileViewInfo(w,p) SNDMSG((w),LVM_GETTILEVIEWINFO,0,(LPARAM)(p))
-#define ListView_GetView(w) (DWORD)SNDMSG((w),LVM_GETVIEW,0,0)
-#define ListView_HasGroup(w,i) (BOOL)SNDMSG((w),LVM_HASGROUP,(WPARAM)(i),0)
-#define ListView_InsertGroup(w,i,p) (int)SNDMSG((w),LVM_INSERTGROUP,(WPARAM)(i),(LPARAM)(p))
-#define ListView_InsertGroupSorted(w,p) SNDMSG((w),LVM_INSERTGROUPSORTED,(WPARAM)(p),0)
-#define ListView_InsertMarkHitTest(w,p,t) (BOOL)SNDMSG((w),LVM_INSERTMARKHITTEST,(WPARAM)(p),(LPARAM)(t))
-#define ListView_IsGroupViewEnabled(w) (BOOL)SNDMSG((w),LVM_ISGROUPVIEWENABLED,0,0)
-#define ListView_MapIDToIndex(w,i) (UINT)SNDMSG((w),LVM_MAPIDTOINDEX,(WPARAM)(i),0)
-#define ListView_MoveGroup(w,i,t) SNDMSG((w),LVM_MOVEGROUP,(WPARAM)(i),(LPARAM)(t))
-#define ListView_RemoveAllGroups(w) SNDMSG((w),LVM_REMOVEALLGROUPS,0,0)
-#define ListView_RemoveGroup(w,i) (int)SNDMSG((w),LVM_REMOVEGROUP,(WPARAM)(i),0)
-#define ListView_SetGroupInfo(w,i,p) (int)SNDMSG((w),LVM_SETGROUPINFO,(WPARAM)(i),(LPARAM)(p))
-#define ListView_SetGroupMetrics(w,p) SNDMSG((w),LVM_SETGROUPMETRICS,0,(LPARAM)(p))
-#define ListView_SetInfoTip(w,p) (BOOL)SNDMSG((w),LVM_SETINFOTIP,0,(LPARAM)(p))
-#define ListView_SetInsertMark(w,p) (BOOL)SNDMSG((w),LVM_SETINSERTMARK,0,(LPARAM)(p))
-#define ListView_SetInsertMarkColor(w,c) (COLORREF)SNDMSG((w),LVM_SETINSERTMARKCOLOR,0,(LPARAM)(c))
-#define ListView_SetOutlineColor(w,c) (COLORREF)SNDMSG((w),LVM_SETOUTLINECOLOR,0,(LPARAM)(c))
-#if (_WIN32_WINNT >= 0x0501)
-#define ListView_SetSelectedColumn(w,i) SNDMSG((w),LVM_SETSELECTEDCOLUMN,(WPARAM)i,0)
-#endif
-#define ListView_SetTileInfo(w,p) (BOOL)SNDMSG((w),LVM_SETTILEINFO,0,(LPARAM)(p))
-#define ListView_SetTileViewInfo(w,p) (BOOL)SNDMSG((w),LVM_SETTILEVIEWINFO,0,(LPARAM)(p))
-#define ListView_SetView(w,i) (int)SNDMSG((w),LVM_SETVIEW,(WPARAM)(i),0)
-#define ListView_SortGroups(w,c,p) (int)SNDMSG((w),LVM_SORTGROUPS,(WPARAM)(c),(LPARAM)(p))
-#define ListView_SortItemsEx(w,c,p) (BOOL)SNDMSG((w),LVM_SORTITEMSEX,(WPARAM)(p),(LPARAM)(c))
-
-#if (_WIN32_WINNT >= 0x0501)
-#define ComboBox_SetMinVisible(w,i) (BOOL)SNDMSG((w), CB_SETMINVISIBLE,(WPARAM)(i),0);
-#define ComboBox_GetMinVisible(w) (INT)SNDMSG((w),CB_GETMINVISIBLE,0,0);
-#endif
-
-BOOL WINAPI MakeDragList(HWND);
-void WINAPI MenuHelp(UINT,WPARAM,LPARAM,HMENU,HINSTANCE,HWND,PUINT);
-#define MonthCal_GetColor(hwnd,icolor) SNDMSG(hwnd,MCM_GETCOLOR,(WPARAM)icolor,(LPARAM)0)
-#define MonthCal_GetCurSel(hwnd,lpsystime) SNDMSG(hwnd,MCM_GETCURSEL,0,(LPARAM)lpsystime)
-#define MonthCal_GetFirstDayOfWeek(hwnd) SNDMSG(hwnd,MCM_GETFIRSTDAYOFWEEK,0,0)
-#define MonthCal_GetMaxSelCount(hwnd) SNDMSG(hwnd,MCM_GETMAXSELCOUNT,0,0)
-#define MonthCal_GetMaxTodayWidth(hwnd) SNDMSG(hwnd,MCM_GETMAXTODAYWIDTH,0,0)
-#define MonthCal_GetMinReqRect(hwnd,lpRectInfo) SNDMSG(hwnd,MCM_GETMINREQRECT,0,(LPARAM)lpRectInfo)
-#define MonthCal_GetMonthDelta(hwnd) SNDMSG(hwnd,MCM_GETMONTHDELTA,0,0)
-#define MonthCal_GetMonthRange(hwnd,flag,systimearray) SNDMSG(hwnd,MCM_GETMONTHRANGE,(WPARAM)flag,(LPARAM)systimearray)
-#define MonthCal_GetRange(hwnd,systimearray) SNDMSG(hwnd,MCM_GETRANGE,0,(LPARAM)systimearray)
-#define MonthCal_GetSelRange(hwnd,systimearray) SNDMSG(hwnd,MCM_GETSELRANGE,0,(LPARAM)systimearray)
-#define MonthCal_GetToday(hwnd,systime) SNDMSG(hwnd,MCM_GETTODAY,0,(LPARAM)systime)
-#define MonthCal_GetUnicodeFormat(hwnd) SNDMSG(hwnd,MCM_GETUNICODEFORMAT,0,0)
-#define MonthCal_HitTest(hwnd,pmchittest) SNDMSG(hwnd,MCM_HITTEST,0,(LPARAM)pmchittest)
-#define MonthCal_SetColor(hwnd,icolor,clr) SNDMSG(hwnd,MCM_SETCOLOR,(WPARAM)icolor,(LPARAM)clr)
-#define MonthCal_SetCurSel(hwnd,lpsystime) SNDMSG(hwnd,MCM_SETCURSEL,0,(LPARAM)lpsystime)
-#define MonthCal_SetDayState(hwnd,imonths,lpdatestatearray) SNDMSG(hwnd,MCM_SETDAYSTATE,(WPARAM)imonths,(LPARAM)lpdatestatearray)
-#define MonthCal_SetFirstDayOfWeek(hwnd,iday) SNDMSG(hwnd,MCM_SETFIRSTDAYOFWEEK,0,(LPARAM)iday)
-#define MonthCal_SetMaxSelCount(hwnd,imax) SNDMSG(hwnd,MCM_SETMAXSELCOUNT,(WPARAM)imax,0)
-#define MonthCal_SetMonthDelta(hwnd,idelta) SNDMSG(hwnd,MCM_SETMONTHDELTA,(WPARAM)idelta,0)
-#define MonthCal_SetSelRange(hwnd,systimearray) SNDMSG(hwnd,MCM_SETSELRANGE,0,(LPARAM)systimearray)
-#define MonthCal_SetToday(hwnd,systime) SNDMSG(hwnd,MCM_SETTODAY,0,(LPARAM)systime)
-#define MonthCal_SetUnicodeFormat(hwnd,unicode) SNDMSG(hwnd,MCM_SETUNICODEFORMAT,(WPARAM)unicode,0)
-#define MonthCal_SetRange(w,f,st) (BOOL)SNDMSG((w),MCM_SETRANGE,(WPARAM)(f),(LPARAM)(st))
-BOOL WINAPI ShowHideMenuCtl(HWND,UINT,PINT);
-#define TabCtrl_GetItem(w,i,p) (BOOL)SNDMSG((w),TCM_GETITEM,i,(LPARAM)(TC_ITEM*)(p))
-#define TabCtrl_SetItem(w,i,p) (BOOL)SNDMSG((w),TCM_SETITEM,i,(LPARAM)(TC_ITEM*)(p))
-#define TabCtrl_InsertItem(w,i,p) (int)SNDMSG((w),TCM_INSERTITEM,i,(LPARAM)(const TC_ITEM*)(p))
-#define TabCtrl_DeleteItem(w,i) (BOOL)SNDMSG((w),TCM_DELETEITEM,i,0)
-#define TabCtrl_DeleteAllItems(w) (BOOL)SNDMSG((w),TCM_DELETEALLITEMS,0,0)
-#define TabCtrl_GetItemRect(w,i,p) (BOOL)SNDMSG((w),TCM_GETITEMRECT,i,(LPARAM)(LPRECT)(p))
-#define TabCtrl_GetCurSel(w) (int)SNDMSG((w),TCM_GETCURSEL,0,0)
-#define TabCtrl_SetCurSel(w,i) (int)SNDMSG((w),TCM_SETCURSEL,i,0)
-#define TabCtrl_HitTest(w,p) (int)SNDMSG((w),TCM_HITTEST,0,(LPARAM)(TC_HITTESTINFO*)(p))
-#define TabCtrl_SetItemExtra(w,c) (BOOL)SNDMSG((w),TCM_SETITEMEXTRA,c,0)
-#define TabCtrl_AdjustRect(w,b,p) (int)SNDMSG((w),TCM_ADJUSTRECT,b,(LPARAM)(LPRECT)p)
-#define TabCtrl_SetItemSize(w,x,y) (DWORD)SNDMSG((w),TCM_SETITEMSIZE,0,MAKELPARAM(x,y))
-#define TabCtrl_RemoveImage(w,i) (void)SNDMSG((w),TCM_REMOVEIMAGE,i,0)
-#define TabCtrl_SetPadding(w,x,y) (void)SNDMSG((w),TCM_SETPADDING,0,MAKELPARAM(x,y))
-#define TabCtrl_GetRowCount(w) (int)SNDMSG((w),TCM_GETROWCOUNT,0,0)
-#define TabCtrl_GetToolTips(w) (HWND)SNDMSG((w),TCM_GETTOOLTIPS,0,0)
-#define TabCtrl_SetToolTips(w,t) (void)SNDMSG((w),TCM_SETTOOLTIPS,(WPARAM)t,0)
-#define TabCtrl_GetCurFocus(w) (int)SNDMSG((w),TCM_GETCURFOCUS,0,0)
-#define TabCtrl_SetCurFocus(w,i) (void)SNDMSG((w),TCM_SETCURFOCUS,i,0)
-#define TabCtrl_GetImageList(w) (HIMAGELIST)SNDMSG((w),TCM_GETIMAGELIST,0,0)
-#define TabCtrl_SetImageList(w,h) (HIMAGELIST)SNDMSG((w),TCM_SETIMAGELIST,0,(LPARAM)(UINT)(h))
-#define TabCtrl_GetItemCount(w) (int)SNDMSG((w),TCM_GETITEMCOUNT,0,0)
-BOOL WINAPI _TrackMouseEvent(LPTRACKMOUSEEVENT);
-#define TreeView_InsertItem(w,i) (HTREEITEM)SNDMSG((w),TVM_INSERTITEM,0,(LPARAM)(LPTV_INSERTSTRUCT)(i))
-#define TreeView_DeleteItem(w,i) (BOOL)SNDMSG((w),TVM_DELETEITEM,0,(LPARAM)(HTREEITEM)(i))
-#define TreeView_DeleteAllItems(w) (BOOL)SNDMSG((w),TVM_DELETEITEM,0,(LPARAM)TVI_ROOT)
-#define TreeView_Expand(w,i,c) (BOOL)SNDMSG((w),TVM_EXPAND,c,(LPARAM)(HTREEITEM)(i))
-#define TreeView_GetItemRect(w,i,p,c) (*(HTREEITEM*)p=(i),(BOOL)SNDMSG((w),TVM_GETITEMRECT,c,(LPARAM)(LPRECT)(p)))
-#define TreeView_GetCount(w) (UINT)SNDMSG((w),TVM_GETCOUNT,0,0)
-#define TreeView_GetIndent(w) (UINT)SNDMSG((w),TVM_GETINDENT,0,0)
-#define TreeView_SetIndent(w,i) (BOOL)SNDMSG((w),TVM_SETINDENT,i,0)
-#define TreeView_GetImageList(w,i) (HIMAGELIST)SNDMSG((w),TVM_GETIMAGELIST,i,0)
-#define TreeView_SetImageList(w,h,i) (HIMAGELIST)SNDMSG((w),TVM_SETIMAGELIST,i,(LPARAM)(HIMAGELIST)(h))
-#define TreeView_GetNextItem(w,i,c) (HTREEITEM)SNDMSG((w),TVM_GETNEXTITEM,c,(LPARAM)(HTREEITEM)(i))
-#define TreeView_GetChild(w,i) TreeView_GetNextItem(w,i,TVGN_CHILD)
-#define TreeView_GetNextSibling(w,i) TreeView_GetNextItem(w,i,TVGN_NEXT)
-#define TreeView_GetPrevSibling(w,i) TreeView_GetNextItem(w,i,TVGN_PREVIOUS)
-#define TreeView_GetParent(w,i) TreeView_GetNextItem(w,i,TVGN_PARENT)
-#define TreeView_GetFirstVisible(w) TreeView_GetNextItem(w,NULL,TVGN_FIRSTVISIBLE)
-#define TreeView_GetNextVisible(w,i) TreeView_GetNextItem(w,i,TVGN_NEXTVISIBLE)
-#define TreeView_GetPrevVisible(w,i) TreeView_GetNextItem(w,i,TVGN_PREVIOUSVISIBLE)
-#define TreeView_GetSelection(w) TreeView_GetNextItem(w,NULL,TVGN_CARET)
-#define TreeView_GetDropHilight(w) TreeView_GetNextItem(w,NULL,TVGN_DROPHILITE)
-#define TreeView_GetRoot(w) TreeView_GetNextItem(w,NULL,TVGN_ROOT)
-#define TreeView_Select(w,i,c) (BOOL)SNDMSG((w),TVM_SELECTITEM,c,(LPARAM)(HTREEITEM)(i))
-#define TreeView_SelectItem(w,i) TreeView_Select(w,i,TVGN_CARET)
-#define TreeView_SelectDropTarget(w,i) TreeView_Select(w,i,TVGN_DROPHILITE)
-#define TreeView_SelectSetFirstVisible(w,i) TreeView_Select(w,i,TVGN_FIRSTVISIBLE)
-#define TreeView_GetItem(w,i) (BOOL)SNDMSG((w),TVM_GETITEM,0,(LPARAM)(TV_ITEM*)(i))
-#define TreeView_SetItem(w,i) (BOOL)SNDMSG((w),TVM_SETITEM,0,(LPARAM)(const TV_ITEM*)(i))
-#define TreeView_EditLabel(w,i) (HWND)SNDMSG((w),TVM_EDITLABEL,0,(LPARAM)(HTREEITEM)(i))
-#define TreeView_GetEditControl(w) (HWND)SNDMSG((w),TVM_GETEDITCONTROL,0,0)
-#define TreeView_GetVisibleCount(w) (UINT)SNDMSG((w),TVM_GETVISIBLECOUNT,0,0)
-#define TreeView_HitTest(w,p) (HTREEITEM)SNDMSG((w),TVM_HITTEST,0,(LPARAM)(LPTV_HITTESTINFO)(p))
-#define TreeView_CreateDragImage(w,i) (HIMAGELIST)SNDMSG((w),TVM_CREATEDRAGIMAGE,0,(LPARAM)(HTREEITEM)(i))
-#define TreeView_SortChildren(w,i,r) (BOOL)SNDMSG((w),TVM_SORTCHILDREN,r,(LPARAM)(HTREEITEM)(i))
-#define TreeView_EnsureVisible(w,i) (BOOL)SNDMSG((w),TVM_ENSUREVISIBLE,0,(LPARAM)(HTREEITEM)(i))
-#define TreeView_SortChildrenCB(w,s,r) (BOOL)SNDMSG((w),TVM_SORTCHILDRENCB,r,(LPARAM)(LPTVSORTCB)(s))
-#define TreeView_EndEditLabelNow(w,f) (BOOL)SNDMSG((w),TVM_ENDEDITLABELNOW,f,0)
-#define TreeView_GetISearchString(w,s) (BOOL)SNDMSG((w),TVM_GETISEARCHSTRING,0,(LPARAM)s)
-#if (_WIN32_IE >= 0x0300)
-#define ListView_ApproximateViewRect(w,iw,ih,i) (DWORD)SNDMSG((w),LVM_APPROXIMATEVIEWRECT,(i),MAKELPARAM((iw),(ih)))
-#define ListView_SetExtendedListViewStyle(w,s) (DWORD)SNDMSG((w),LVM_SETEXTENDEDLISTVIEWSTYLE,0,(s))
-#define ListView_GetExtendedListViewStyle(w) (DWORD)SNDMSG((w),LVM_GETEXTENDEDLISTVIEWSTYLE,0,0)
-#define ListView_SetColumnOrderArray(w,i,a) (BOOL)SNDMSG((w),LVM_SETCOLUMNORDERARRAY,(WPARAM)(i),(LPARAM)(LPINT)(a))
-#define ListView_GetColumnOrderArray(w,i,a) (BOOL)SNDMSG((w),LVM_GETCOLUMNORDERARRAY,(WPARAM)(i),(LPARAM)(LPINT)(a))
-#define ListView_GetHeader(w) (HWND)SNDMSG((w),LVM_GETHEADER,0,0)
-#define ListView_GetHotCursor(w) (HCURSOR)SNDMSG((w),LVM_GETHOTCURSOR,0,0)
-#define ListView_GetHotItem(w) (INT)SNDMSG((w),LVM_GETHOTITEM,0,0)
-#define ListView_GetSubItemRect(w,i,is,c,p) (BOOL)SNDMSG((w),LVM_GETSUBITEMRECT,(WPARAM)(int)(i),((p)?(((LPRECT)(p))->left=(c),(((LPRECT)(p))->top=(is)),(LPARAM)(LPRECT)(p)):0))
-#define ListView_SetHotCursor(w,c) (HCURSOR)SNDMSG((w),LVM_SETHOTCURSOR,0,(LPARAM)(c))
-#define ListView_SetHotItem(w,i) (int)SNDMSG((w),LVM_SETHOTITEM,(WPARAM)(i),0)
-#define ListView_SetIconSpacing(w,x,y) (DWORD)SNDMSG((w),LVM_SETICONSPACING,0,MAKELONG(x,y))
-#define ListView_SubItemHitTest(w,p) (INT)SNDMSG((w),LVM_SUBITEMHITTEST,0,(LPARAM)(LPLVHITTESTINFO)(p))
-#define ListView_SetItemCountEx(w,i,f) (void)SNDMSG((w),LVM_SETITEMCOUNT,(WPARAM)(i),(LPARAM)(f))
-WINBOOL WINAPI ImageList_SetImageCount(HIMAGELIST,UINT);
-WINBOOL WINAPI ImageList_Copy(HIMAGELIST,int,HIMAGELIST,int,UINT);
-WINBOOL WINAPI ImageList_DrawIndirect(IMAGELISTDRAWPARAMS*);
-#define TabCtrl_SetMinTabWidth(hwnd,x) SNDMSG((hwnd),TCM_SETMINTABWIDTH,0,x)
-#define TabCtrl_DeselectAll(hwnd,fExcludeFocus) SNDMSG((hwnd),TCM_DESELECTALL,fExcludeFocus,0)
-#define TreeView_GetToolTips(w) (HWND)SNDMSG((w),TVM_GETTOOLTIPS,0,0)
-#define TreeView_SetToolTips(w,wt) (HWND)SNDMSG((w),TVM_SETTOOLTIPS,(WPARAM)(wt),0)
-#endif
-#if (_WIN32_IE >= 0x0400)
-#define ListView_GetBkImage(h,plvbki) (BOOL)SNDMSG((h),LVM_GETBKIMAGE,0,(LPARAM)(plvbki))
-#define ListView_SetBkImage(h,plvbki) (BOOL)SNDMSG((h),LVM_SETBKIMAGE,0,(LPARAM)(plvbki))
-#define ListView_SetExtendedListViewStyleEx(w,m,s) (DWORD)SNDMSG((w),LVM_SETEXTENDEDLISTVIEWSTYLE,(m),(s))
-#define ListView_SetWorkAreas(w,n,r) (BOOL)SNDMSG((w),LVM_SETWORKAREAS,(WPARAM)(n),(LPARAM)(RECT *)(r))
-#define ListView_GetWorkAreas(w,n,r) (BOOL)SNDMSG((w),LVM_GETWORKAREAS,(WPARAM)(n),(LPARAM)(RECT *)(r))
-#define ListView_GetNumberOfWorkAreas(w,n) (BOOL)SNDMSG((w),LVM_GETNUMBEROFWORKAREAS,0,(LPARAM)(UINT *)(n))
-#define ListView_SetHoverTime(w,t) (DWORD)SNDMSG((w),LVM_SETHOVERTIME,0,(LPARAM)(t))
-#define ListView_GetHoverTime(w) (DWORD)SNDMSG((w),LVM_GETHOVERTIME,0,0)
-#define ListView_GetSelectionMark(w) (INT)SNDMSG((w),LVM_GETSELECTIONMARK,0,0)
-#define ListView_SetSelectionMark(w,i) (INT)SNDMSG((w),LVM_SETSELECTIONMARK,0,(LPARAM)(i))
-#define ListView_SetToolTips(w,n) (HWND)SNDMSG((w),LVM_SETTOOLTIPS,(WPARAM)(n),0)
-#define ListView_GetToolTips(w) (HWND)SNDMSG((w),LVM_GETTOOLTIPS,0,0)
-#define ListView_SetUnicodeFormat(w,f) (BOOL)SNDMSG((w),LVM_SETUNICODEFORMAT,(WPARAM)(f),0)
-#define ListView_GetUnicodeFormat(w) (BOOL)SNDMSG((w),LVM_GETUNICODEFORMAT,0,0)
-#define TabCtrl_HighlightItem(w,i,fHighlight) SNDMSG((w),TCM_HIGHLIGHTITEM,(WPARAM)i,(LPARAM)MAKELONG(fHighlight,0))
-#define TabCtrl_SetExtendedStyle(w,dw) SNDMSG((w),TCM_SETEXTENDEDSTYLE,0,dw)
-#define TabCtrl_GetExtendedStyle(w) SNDMSG((w),TCM_GETEXTENDEDSTYLE,0,0)
-#define TabCtrl_SetUnicodeFormat(w,u) SNDMSG((w),TCM_SETUNICODEFORMAT,(WPARAM)(u),0)
-#define TabCtrl_GetUnicodeFormat(w) SNDMSG((w),TCM_GETUNICODEFORMAT,0,0)
-#define TreeView_GetBkColor(w) (COLORREF)SNDMSG((w),TVM_GETBKCOLOR,0,0)
-#define TreeView_GetInsertMarkColor(w) (COLORREF)SNDMSG((w),TVM_GETINSERTMARKCOLOR,0,0)
-#define TreeView_GetItemHeight(w) (int)SNDMSG((w),TVM_GETITEMHEIGHT,0,0)
-#define TreeView_GetScrollTime(w) (UINT)SNDMSG((w),TVM_GETSCROLLTIME,0,0)
-#define TreeView_GetTextColor(w) (COLORREF)SNDMSG((w),TVM_GETTEXTCOLOR,0,0)
-#define TreeView_SetBkColor(w,c) (COLORREF)SNDMSG((w),TVM_SETBKCOLOR,0,(LPARAM)(c))
-#define TreeView_SetInsertMarkColor(w,c) (COLORREF)SNDMSG((w),TVM_SETINSERTMARKCOLOR,0,(LPARAM)(c))
-#define TreeView_SetItemHeight(w,h) (int)SNDMSG((w),TVM_SETITEMHEIGHT,(WPARAM)(h),0)
-#define TreeView_SetScrollTime(w,t) (UINT)SNDMSG((w),TVM_SETSCROLLTIME,(WPARAM)(UINT)(t),0)
-#define TreeView_SetTextColor(w,c) (COLORREF)SNDMSG((w),TVM_SETTEXTCOLOR,0,(LPARAM)(c))
-#define TreeView_SetInsertMark(w,i,a) (BOOL)SNDMSG((w),TVM_SETINSERTMARK,(WPARAM)(a),(LPARAM)(i))
-#define TreeView_SetUnicodeFormat(w,u) (BOOL)SNDMSG((w),TVM_SETUNICODEFORMAT,(WPARAM)(u),0)
-#define TreeView_GetUnicodeFormat(w) (BOOL)SNDMSG((w),TVM_GETUNICODEFORMAT,0,0)
-#define TreeView_GetLastVisible(w) TreeView_GetNextItem(w,NULL,TVGN_LASTVISIBLE)
-#endif
-#if (_WIN32_IE >= 0x0500)
-#define TreeView_GetItemState(w,i,m) (UINT)SNDMSG((w),TVM_GETITEMSTATE,(WPARAM)(i),(LPARAM)(m))
-#define TreeView_SetItemState(w,i,d,m) \
-{ \
- TVITEM _tvi;\
- _tvi.mask=TVIF_STATE;\
- _tvi.hItem=i; \
- _tvi.stateMask=m;\
- _tvi.state=d;\
- SNDMSG((w),TVM_SETITEM,0,(LPARAM)(TVITEM*)&_tvi);\
-}
-#endif
-
-#ifdef UNICODE
-typedef HDITEMW HDITEM;
-typedef TOOLINFOW TOOLINFO,*PTOOLINFO,*LPTOOLINFO;
-typedef TTHITTESTINFOW TTHITTESTINFO,*LPHITTESTINFO,*LPTTHITTESTINFO;
-typedef TOOLTIPTEXTW TOOLTIPTEXT,*LPTOOLTIPTEXT;
-typedef NMTTDISPINFOW NMTTDISPINFO, *LPNMTTDISPINFO;
-typedef TV_ITEMW TV_ITEM,*LPTV_ITEM;
-typedef TVITEMW TVITEM,*LPTVITEM;
-#if (_WIN32_IE >= 0x0400)
-typedef TVITEMEXW TVITEMEX,*LPTVITEMEX;
-#endif
-typedef TV_INSERTSTRUCTW TV_INSERTSTRUCT,*LPTV_INSERTSTRUCT;
-typedef TVINSERTSTRUCTW TVINSERTSTRUCT,*LPTVINSERTSTRUCT;
-typedef NM_TREEVIEWW NM_TREEVIEW,*LPNM_TREEVIEW;
-typedef NMTREEVIEWW NMTREEVIEW,*LPNMTREEVIEW;
-typedef NMHDDISPINFOW NMHDDISPINFO, *LPNMHDDISPINFO;
-#define ACM_OPEN ACM_OPENW
-#define COMBOBOXEXITEM COMBOBOXEXITEMW
-#define PCOMBOBOXEXITEM PCOMBOBOXEXITEMW
-#define PCCOMBOBOXEXITEM PCCOMBOBOXEXITEMW
-#define CBEM_INSERTITEM CBEM_INSERTITEMW
-#define CBEM_SETITEM CBEM_SETITEMW
-#define CBEM_GETITEM CBEM_GETITEMW
-#define CBEN_ENDEDIT CBEN_ENDEDITW
-#define NMCBEENDEDIT NMCBEENDEDITW
-#define LPNMCBEENDEDIT LPNMCBEENDEDITW
-#define PNMCBEENDEDIT PNMCBEENDEDITW
-#if _WIN32_IE >= 0x0400
-#define NMCOMBOBOXEX NMCOMBOBOXEXW
-#define PNMCOMBOBOXEX PNMCOMBOBOXEXW
-#define CBEN_GETDISPINFO CBEN_GETDISPINFOW
-#define CBEN_DRAGBEGIN CBEN_DRAGBEGINW
-#define NMCBEDRAGBEGIN NMCBEDRAGBEGINW
-#define LPNMCBEDRAGBEGIN LPNMCBEDRAGBEGINW
-#define PNMCBEDRAGBEGIN PNMCBEDRAGBEGINW
-#endif /* _WIN32_IE >= 0x0400 */
-#define SB_GETTEXT SB_GETTEXTW
-#define SB_SETTEXT SB_SETTEXTW
-#define SB_GETTEXTLENGTH SB_GETTEXTLENGTHW
-#define HDM_INSERTITEM HDM_INSERTITEMW
-#define HDM_GETITEM HDM_GETITEMW
-#define HDM_SETITEM HDM_SETITEMW
-#define HDN_ITEMCHANGING HDN_ITEMCHANGINGW
-#define HDN_ITEMCHANGED HDN_ITEMCHANGEDW
-#define HDN_ITEMCLICK HDN_ITEMCLICKW
-#define HDN_ITEMDBLCLICK HDN_ITEMDBLCLICKW
-#define HDN_DIVIDERDBLCLICK HDN_DIVIDERDBLCLICKW
-#define HDN_BEGINTRACK HDN_BEGINTRACKW
-#define HDN_ENDTRACK HDN_ENDTRACKW
-#define HDN_TRACK HDN_TRACKW
-#if (_WIN32_IE >= 0x0300)
-#define HDN_GETDISPINFO HDN_GETDISPINFOW
-#endif
-#define HD_NOTIFY HD_NOTIFYW
-#define TBSAVEPARAMS TBSAVEPARAMSW
-#define TB_GETBUTTONTEXT TB_GETBUTTONTEXTW
-#define TB_SAVERESTORE TB_SAVERESTOREW
-#define TB_ADDSTRING TB_ADDSTRINGW
-#define TBN_GETBUTTONINFO TBN_GETBUTTONINFOW
-#if _WIN32_IE >= 0x400
-#define TB_GETBUTTONINFO TB_GETBUTTONINFOW
-#define TB_SETBUTTONINFO TB_SETBUTTONINFOW
-#define TB_INSERTBUTTON TB_INSERTBUTTONW
-#define TB_ADDBUTTONS TB_ADDBUTTONSW
-#define TB_MAPACCELERATOR TB_MAPACCELERATORW
-#define TB_GETSTRING TB_GETSTRINGW
-#define TBBUTTONINFO TBBUTTONINFOW
-#define LPTBBUTTONINFO LPTBBUTTONINFOW
-#define TBN_GETDISPINFO TBN_GETDISPINFOW
-#define NMTBDISPINFO NMTBDISPINFOW
-#define LPNMTBDISPINFO LPNMTBDISPINFOW
-#define NMTBGETINFOTIP NMTBGETINFOTIPW
-#define LPNMTBGETINFOTIP LPNMTBGETINFOTIPW
-#endif
-#define TBNOTIFY TBNOTIFYW
-#define LPTBNOTIFY LPTBNOTIFYW
-#define NMTOOLBAR NMTOOLBARW
-#define LPNMTOOLBAR LPNMTOOLBARW
-#define TTM_ADDTOOL TTM_ADDTOOLW
-#define TTM_DELTOOL TTM_DELTOOLW
-#define TTM_NEWTOOLRECT TTM_NEWTOOLRECTW
-#define TTM_GETTOOLINFO TTM_GETTOOLINFOW
-#define TTM_SETTOOLINFO TTM_SETTOOLINFOW
-#define TTM_HITTEST TTM_HITTESTW
-#define TTM_GETTEXT TTM_GETTEXTW
-#define TTM_UPDATETIPTEXT TTM_UPDATETIPTEXTW
-#define TTM_ENUMTOOLS TTM_ENUMTOOLSW
-#define TTM_GETCURRENTTOOL TTM_GETCURRENTTOOLW
-#define TTN_NEEDTEXT TTN_NEEDTEXTW
-#define TTN_GETDISPINFO TTN_GETDISPINFOW
-#define SB_GETTEXT SB_GETTEXTW
-#define SB_SETTEXT SB_SETTEXTW
-#define SB_GETTEXTLENGTH SB_GETTEXTLENGTHW
-#define LV_ITEM LV_ITEMW
-#define LVITEM LVITEMW
-#define LPSTR_TEXTCALLBACK LPSTR_TEXTCALLBACKW
-#if _WIN32_IE >= 0x0400
-#define LVBKIMAGE LVBKIMAGEW
-#define LPLVBKIMAGE LPLVBKIMAGEW
-#define LVM_SETBKIMAGE LVM_SETBKIMAGEW
-#define LVM_GETBKIMAGE LVM_GETBKIMAGEW
-#endif /* _WIN32_IE >= 0x400 */
-#define LVM_GETITEM LVM_GETITEMW
-#define LVM_SETITEM LVM_SETITEMW
-#define LVM_INSERTITEM LVM_INSERTITEMW
-#define LV_FINDINFO LV_FINDINFOW
-#define LVFINDINFO LVFINDINFOW
-#define LPFINDINFO LPFINDINFOW
-#define NMLVFINDITEM NMLVFINDITEMW
-#define PNMLVFINDITEM PNMLVFINDITEMW
-#define LPNMLVFINDITEM LPNMLVFINDITEMW
-#define LVM_FINDITEM LVM_FINDITEMW
-#define LVM_GETSTRINGWIDTH LVM_GETSTRINGWIDTHW
-#define LVM_EDITLABEL LVM_EDITLABELW
-#define LV_COLUMN LV_COLUMNW
-#define LVCOLUMN LVCOLUMNW
-#define LVM_GETCOLUMN LVM_GETCOLUMNW
-#define LVM_SETCOLUMN LVM_SETCOLUMNW
-#define LVM_INSERTCOLUMN LVM_INSERTCOLUMNW
-#define LVM_GETITEMTEXT LVM_GETITEMTEXTW
-#define LVM_SETITEMTEXT LVM_SETITEMTEXTW
-#define LVM_GETISEARCHSTRING LVM_GETISEARCHSTRINGW
-#define LVN_BEGINLABELEDIT LVN_BEGINLABELEDITW
-#define LVN_ENDLABELEDIT LVN_ENDLABELEDITW
-#define LVN_GETDISPINFO LVN_GETDISPINFOW
-#define LVN_SETDISPINFO LVN_SETDISPINFOW
-#define LVN_GETINFOTIP LVN_GETINFOTIPW
-#define NMLVGETINFOTIP NMLVGETINFOTIPW
-#define LPNMLVGETINFOTIP LPNMLVGETINFOTIPW
-#define LV_DISPINFO LV_DISPINFOW
-#define NMLVDISPINFO NMLVDISPINFOW
-#define LPNMLVDISPINFO LPNMLVDISPINFOW
-#define TVM_INSERTITEM TVM_INSERTITEMW
-#define TVM_GETITEM TVM_GETITEMW
-#define TVM_SETITEM TVM_SETITEMW
-#define TVM_EDITLABEL TVM_EDITLABELW
-#define TVM_GETISEARCHSTRING TVM_GETISEARCHSTRINGW
-#define TV_DISPINFO NMTVDISPINFOW
-#define NMTVDISPINFO NMTVDISPINFOW
-#define LPNMTVDISPINFO LPNMTVDISPINFOW
-#if (_WIN32_IE >= 0x0400)
-#define NMTVGETINFOTIP NMTVGETINFOTIPW
-#define LPNMTVGETINFOTIP LPNMTVGETINFOTIPW
-#define TVN_GETINFOTIP TVN_GETINFOTIPW
-#endif
-#define TVN_SELCHANGING TVN_SELCHANGINGW
-#define TVN_SELCHANGED TVN_SELCHANGEDW
-#define TVN_GETDISPINFO TVN_GETDISPINFOW
-#define TVN_SETDISPINFO TVN_SETDISPINFOW
-#define TVN_ITEMEXPANDING TVN_ITEMEXPANDINGW
-#define TVN_ITEMEXPANDED TVN_ITEMEXPANDEDW
-#define TVN_BEGINDRAG TVN_BEGINDRAGW
-#define TVN_BEGINRDRAG TVN_BEGINRDRAGW
-#define TVN_DELETEITEM TVN_DELETEITEMW
-#define TVN_BEGINLABELEDIT TVN_BEGINLABELEDITW
-#define TVN_ENDLABELEDIT TVN_ENDLABELEDITW
-#define TC_ITEMHEADER TC_ITEMHEADERW
-#define TC_ITEM TC_ITEMW
-#define TCITEM TCITEMW
-#define LPTCITEM LPTCITEMW
-#define TCM_GETITEM TCM_GETITEMW
-#define TCM_SETITEM TCM_SETITEMW
-#define TCM_INSERTITEM TCM_INSERTITEMW
-#define CreateStatusWindow CreateStatusWindowW
-#define DrawStatusText DrawStatusTextW
-#define ImageList_LoadImage ImageList_LoadImageW
-#define DTM_SETFORMAT DTM_SETFORMATW
-#define DTN_USERSTRING DTN_USERSTRINGW
-#define DTN_WMKEYDOWN DTN_WMKEYDOWNW
-#define DTN_FORMAT DTN_FORMATW
-#define DTN_FORMATQUERY DTN_FORMATQUERYW
-typedef REBARBANDINFOW REBARBANDINFO,*LPREBARBANDINFO;
-#define LPCREBARBANDINFO LPCREBARBANDINFOW
-#define REBARBANDINFO_V3_SIZE REBARBANDINFOW_V3_SIZE
-#define RB_INSERTBAND RB_INSERTBANDW
-#define RB_SETBANDINFO RB_SETBANDINFOW
-#else /* UNICODE */
-typedef HDITEMA HDITEM;
-typedef TOOLINFOA TOOLINFO,*PTOOLINFO,*LPTOOLINFO;
-typedef TTHITTESTINFOA TTHITTESTINFO,*LPHITTESTINFO,*LPTTHITTESTINFO;
-typedef TOOLTIPTEXTA TOOLTIPTEXT,*LPTOOLTIPTEXT;
-typedef NMTTDISPINFOA NMTTDISPINFO, *LPNMTTDISPINFO;
-typedef TV_ITEMA TV_ITEM,*LPTV_ITEM;
-typedef TVITEMA TVITEM,*LPTVITEM;
-#if (_WIN32_IE >= 0x0400)
-typedef TVITEMEXA TVITEMEX,*LPTVITEMEX;
-#endif
-typedef TV_INSERTSTRUCTA TV_INSERTSTRUCT,*LPTV_INSERTSTRUCT;
-typedef TVINSERTSTRUCTA TVINSERTSTRUCT,*LPTVINSERTSTRUCT;
-typedef NM_TREEVIEWA NM_TREEVIEW,*LPNM_TREEVIEW;
-typedef NMTREEVIEWA NMTREEVIEW,*LPNMTREEVIEW;
-typedef NMHDDISPINFOW NMHDDISPINFO, *LPNMHDDISPINFO;
-#define ACM_OPEN ACM_OPENA
-#define COMBOBOXEXITEM COMBOBOXEXITEMA
-#define PCOMBOBOXEXITEM PCOMBOBOXEXITEMA
-#define PCCOMBOBOXEXITEM PCCOMBOBOXEXITEMA
-#define CBEM_INSERTITEM CBEM_INSERTITEMA
-#define CBEM_SETITEM CBEM_SETITEMA
-#define CBEM_GETITEM CBEM_GETITEMA
-#define CBEN_ENDEDIT CBEN_ENDEDITA
-#define NMCBEENDEDIT NMCBEENDEDITA
-#define LPNMCBEENDEDIT LPNMCBEENDEDITA
-#define PNMCBEENDEDIT PNMCBEENDEDITA
-#if _WIN32_IE >= 0x0400
-#define TB_GETBUTTONINFO TB_GETBUTTONINFOA
-#define TB_SETBUTTONINFO TB_SETBUTTONINFOA
-#define TB_INSERTBUTTON TB_INSERTBUTTONA
-#define TB_ADDBUTTONS TB_ADDBUTTONSA
-#define TB_MAPACCELERATOR TB_MAPACCELERATORA
-#define TB_GETSTRING TB_GETSTRINGA
-#define NMCOMBOBOXEX NMCOMBOBOXEXA
-#define PNMCOMBOBOXEX PNMCOMBOBOXEXA
-#define CBEN_DRAGBEGIN CBEN_DRAGBEGINA
-#define CBEN_GETDISPINFO CBEN_GETDISPINFOA
-#define NMCBEDRAGBEGIN NMCBEDRAGBEGINA
-#define LPNMCBEDRAGBEGIN LPNMCBEDRAGBEGINA
-#define PNMCBEDRAGBEGIN PNMCBEDRAGBEGINA
-#define TBN_GETDISPINFO TBN_GETDISPINFOA
-#define NMTBDISPINFO NMTBDISPINFOA
-#define LPNMTBDISPINFO LPNMTBDISPINFOA
-#define NMTBGETINFOTIP NMTBGETINFOTIPA
-#define LPNMTBGETINFOTIP LPNMTBGETINFOTIPA
-#endif /* _WIN32_IE >= 0x0400 */
-#define SB_GETTEXT SB_GETTEXTA
-#define SB_SETTEXT SB_SETTEXTA
-#define SB_GETTEXTLENGTH SB_GETTEXTLENGTHA
-#define HDM_INSERTITEM HDM_INSERTITEMA
-#define HDM_GETITEM HDM_GETITEMA
-#define HDM_SETITEM HDM_SETITEMA
-#define HDN_ITEMCHANGING HDN_ITEMCHANGINGA
-#define HDN_ITEMCHANGED HDN_ITEMCHANGEDA
-#define HDN_ITEMCLICK HDN_ITEMCLICKA
-#define HDN_ITEMDBLCLICK HDN_ITEMDBLCLICKA
-#define HDN_DIVIDERDBLCLICK HDN_DIVIDERDBLCLICKA
-#define HDN_BEGINTRACK HDN_BEGINTRACKA
-#define HDN_ENDTRACK HDN_ENDTRACKA
-#define HDN_TRACK HDN_TRACKA
-#if (_WIN32_IE >= 0x0300)
-#define HDN_GETDISPINFO HDN_GETDISPINFOA
-#endif
-#define HD_NOTIFY HD_NOTIFYA
-#define TBSAVEPARAMS TBSAVEPARAMSA
-#define TB_GETBUTTONTEXT TB_GETBUTTONTEXTA
-#define TB_SAVERESTORE TB_SAVERESTOREA
-#define TB_ADDSTRING TB_ADDSTRINGA
-#define TBN_GETBUTTONINFO TBN_GETBUTTONINFOA
-#if _WIN32_IE >= 0x400
-#define TBBUTTONINFO TBBUTTONINFOA
-#define LPTBBUTTONINFO LPTBBUTTONINFOA
-#endif
-#define TBNOTIFY TBNOTIFYA
-#define LPTBNOTIFY LPTBNOTIFYA
-#define NMTOOLBAR NMTOOLBARA
-#define LPNMTOOLBAR LPNMTOOLBARA
-#define TTM_ADDTOOL TTM_ADDTOOLA
-#define TTM_DELTOOL TTM_DELTOOLA
-#define TTM_NEWTOOLRECT TTM_NEWTOOLRECTA
-#define TTM_GETTOOLINFO TTM_GETTOOLINFOA
-#define TTM_SETTOOLINFO TTM_SETTOOLINFOA
-#define TTM_HITTEST TTM_HITTESTA
-#define TTM_GETTEXT TTM_GETTEXTA
-#define TTM_UPDATETIPTEXT TTM_UPDATETIPTEXTA
-#define TTM_ENUMTOOLS TTM_ENUMTOOLSA
-#define TTM_GETCURRENTTOOL TTM_GETCURRENTTOOLA
-#define TTN_NEEDTEXT TTN_NEEDTEXTA
-#define TTN_GETDISPINFO TTN_GETDISPINFOA
-#define SB_GETTEXT SB_GETTEXTA
-#define SB_SETTEXT SB_SETTEXTA
-#define SB_GETTEXTLENGTH SB_GETTEXTLENGTHA
-#define LV_ITEM LV_ITEMA
-#define LVITEM LVITEMA
-#define LPSTR_TEXTCALLBACK LPSTR_TEXTCALLBACKA
-#if _WIN32_IE >= 0x0400
-#define LVBKIMAGE LVBKIMAGEA
-#define LPLVBKIMAGE LPLVBKIMAGEA
-#define LVM_SETBKIMAGE LVM_SETBKIMAGEA
-#define LVM_GETBKIMAGE LVM_GETBKIMAGEA
-#endif /* _WIN32_IE >= 0x0400 */
-#define LVM_GETITEM LVM_GETITEMA
-#define LVM_SETITEM LVM_SETITEMA
-#define LVM_INSERTITEM LVM_INSERTITEMA
-#define LV_FINDINFO LV_FINDINFOA
-#define LVFINDINFO LVFINDINFOA
-#define LPFINDINFO LPFINDINFOA
-#define NMLVFINDITEM NMLVFINDITEMA
-#define PNMLVFINDITEM PNMLVFINDITEMA
-#define LPNMLVFINDITEM LPNMLVFINDITEMA
-#define LVM_FINDITEM LVM_FINDITEMA
-#define LVM_GETSTRINGWIDTH LVM_GETSTRINGWIDTHA
-#define LVM_EDITLABEL LVM_EDITLABELA
-#define LV_COLUMN LV_COLUMNA
-#define LVCOLUMN LVCOLUMNA
-#define LVM_GETCOLUMN LVM_GETCOLUMNA
-#define LVM_SETCOLUMN LVM_SETCOLUMNA
-#define LVM_INSERTCOLUMN LVM_INSERTCOLUMNA
-#define LVM_GETITEMTEXT LVM_GETITEMTEXTA
-#define LVM_SETITEMTEXT LVM_SETITEMTEXTA
-#define LVM_GETISEARCHSTRING LVM_GETISEARCHSTRINGA
-#define LVN_BEGINLABELEDIT LVN_BEGINLABELEDITA
-#define LVN_ENDLABELEDIT LVN_ENDLABELEDITA
-#define LVN_GETDISPINFO LVN_GETDISPINFOA
-#define LVN_SETDISPINFO LVN_SETDISPINFOA
-#define LVN_GETINFOTIP LVN_GETINFOTIPA
-#define NMLVGETINFOTIP NMLVGETINFOTIPA
-#define LPNMLVGETINFOTIP LPNMLVGETINFOTIPA
-#define LV_DISPINFO LV_DISPINFOA
-#define NMLVDISPINFO NMLVDISPINFOA
-#define LPNMLVDISPINFO LPNMLVDISPINFOA
-#define TVM_INSERTITEM TVM_INSERTITEMA
-#define TVM_GETITEM TVM_GETITEMA
-#define TVM_SETITEM TVM_SETITEMA
-#define TVM_EDITLABEL TVM_EDITLABELA
-#define TVM_GETISEARCHSTRING TVM_GETISEARCHSTRINGA
-#define TV_DISPINFO NMTVDISPINFOA
-#define NMTVDISPINFO NMTVDISPINFOA
-#define LPNMTVDISPINFO LPNMTVDISPINFOA
-#if (_WIN32_IE >= 0x0400)
-#define NMTVGETINFOTIP NMTVGETINFOTIPA
-#define LPNMTVGETINFOTIP LPNMTVGETINFOTIPA
-#define TVN_GETINFOTIP TVN_GETINFOTIPA
-#endif
-#define TVN_SELCHANGING TVN_SELCHANGINGA
-#define TVN_SELCHANGED TVN_SELCHANGEDA
-#define TVN_GETDISPINFO TVN_GETDISPINFOA
-#define TVN_SETDISPINFO TVN_SETDISPINFOA
-#define TVN_ITEMEXPANDING TVN_ITEMEXPANDINGA
-#define TVN_ITEMEXPANDED TVN_ITEMEXPANDEDA
-#define TVN_BEGINDRAG TVN_BEGINDRAGA
-#define TVN_BEGINRDRAG TVN_BEGINRDRAGA
-#define TVN_DELETEITEM TVN_DELETEITEMA
-#define TVN_BEGINLABELEDIT TVN_BEGINLABELEDITA
-#define TVN_ENDLABELEDIT TVN_ENDLABELEDITA
-#define TC_ITEMHEADER TC_ITEMHEADERA
-#define TC_ITEM TC_ITEMA
-#define TCITEM TCITEMA
-#define LPTCITEM LPTCITEMA
-#define TCM_GETITEM TCM_GETITEMA
-#define TCM_SETITEM TCM_SETITEMA
-#define TCM_INSERTITEM TCM_INSERTITEMA
-#define CreateStatusWindow CreateStatusWindowA
-#define DrawStatusText DrawStatusTextA
-#define ImageList_LoadImage ImageList_LoadImageA
-#define DTM_SETFORMAT DTM_SETFORMATA
-#define DTN_USERSTRING DTN_USERSTRINGA
-#define DTN_WMKEYDOWN DTN_WMKEYDOWNA
-#define DTN_FORMAT DTN_FORMATA
-#define DTN_FORMATQUERY DTN_FORMATQUERYA
-typedef REBARBANDINFOA REBARBANDINFO,*LPREBARBANDINFO;
-#define LPCREBARBANDINFO LPCREBARBANDINFOA
-#define REBARBANDINFO_V3_SIZE REBARBANDINFOA_V3_SIZE
-#define RB_INSERTBAND RB_INSERTBANDA
-#define RB_SETBANDINFO RB_SETBANDINFOA
-#endif
-#endif /* RC_INVOKED */
-
-#ifdef _WIN32_WCE /* these are PPC only */
-
-COMMCTRLAPI HWND WINAPI CommandBar_Create(HINSTANCE, HWND, int);
-COMMCTRLAPI BOOL WINAPI CommandBar_Show(HWND, BOOL);
-COMMCTRLAPI int WINAPI CommandBar_AddBitmap(HWND, HINSTANCE, int, int, int, int);
-COMMCTRLAPI HWND WINAPI CommandBar_InsertComboBox(HWND, HINSTANCE, int, UINT, WORD, WORD);
-COMMCTRLAPI BOOL WINAPI CommandBar_InsertMenubar(HWND, HINSTANCE, WORD, WORD );
-COMMCTRLAPI BOOL WINAPI CommandBar_InsertMenubarEx(HWND, HINSTANCE, LPTSTR, WORD);
-COMMCTRLAPI BOOL WINAPI CommandBar_DrawMenuBar(HWND, WORD);
-COMMCTRLAPI HMENU WINAPI CommandBar_GetMenu(HWND, WORD);
-COMMCTRLAPI BOOL WINAPI CommandBar_AddAdornments(HWND, DWORD, DWORD);
-COMMCTRLAPI int WINAPI CommandBar_Height(HWND hwndCB);
-
-/* These two are not in the DLL */
-#define CommandBar_InsertButton(hwnd,i,lptbbutton) \
- SendMessage((hwnd),TB_INSERTBUTTON,(i),(lptbbutton))
-#define CommandBar_Destroy(hwnd) \
- DestroyWindow(hwnd)
-
-
-#endif /* _WIN32_WCE */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/commdlg.h b/winsup/w32api/include/commdlg.h
deleted file mode 100644
index 4c38774..0000000
--- a/winsup/w32api/include/commdlg.h
+++ /dev/null
@@ -1,609 +0,0 @@
-#ifndef _COMMDLG_H
-#define _COMMDLG_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#pragma pack(push,1)
-
-#define LBSELCHSTRINGA "commdlg_LBSelChangedNotify"
-#define SHAREVISTRINGA "commdlg_ShareViolation"
-#define FILEOKSTRINGA "commdlg_FileNameOK"
-#define COLOROKSTRINGA "commdlg_ColorOK"
-#define SETRGBSTRINGA "commdlg_SetRGBColor"
-#define HELPMSGSTRINGA "commdlg_help"
-#define FINDMSGSTRINGA "commdlg_FindReplace"
-#define LBSELCHSTRINGW L"commdlg_LBSelChangedNotify"
-#define SHAREVISTRINGW L"commdlg_ShareViolation"
-#define FILEOKSTRINGW L"commdlg_FileNameOK"
-#define COLOROKSTRINGW L"commdlg_ColorOK"
-#define SETRGBSTRINGW L"commdlg_SetRGBColor"
-#define HELPMSGSTRINGW L"commdlg_help"
-#define FINDMSGSTRINGW L"commdlg_FindReplace"
-#ifndef CDN_FIRST
-#define CDN_FIRST ((UINT)-601) /* also in commctrl.h */
-#define CDN_LAST ((UINT)-699)
-#endif
-#define CDN_INITDONE CDN_FIRST
-#define CDN_SELCHANGE (CDN_FIRST-1U)
-#define CDN_FOLDERCHANGE (CDN_FIRST-2U)
-#define CDN_SHAREVIOLATION (CDN_FIRST-3U)
-#define CDN_HELP (CDN_FIRST-4U)
-#define CDN_FILEOK (CDN_FIRST-5U)
-#define CDN_TYPECHANGE (CDN_FIRST-6U)
-#define CDM_FIRST (WM_USER+100)
-#define CDM_LAST (WM_USER+200)
-#define CDM_GETSPEC CDM_FIRST
-#define CDM_GETFILEPATH (CDM_FIRST+1)
-#define CDM_GETFOLDERPATH (CDM_FIRST+2)
-#define CDM_GETFOLDERIDLIST (CDM_FIRST+3)
-#define CDM_SETCONTROLTEXT (CDM_FIRST+4)
-#define CDM_HIDECONTROL (CDM_FIRST+5)
-#define CDM_SETDEFEXT (CDM_FIRST+6)
-#define CC_RGBINIT 1
-#define CC_FULLOPEN 2
-#define CC_PREVENTFULLOPEN 4
-#define CC_SHOWHELP 8
-#define CC_ENABLEHOOK 16
-#define CC_ENABLETEMPLATE 32
-#define CC_ENABLETEMPLATEHANDLE 64
-#define CC_SOLIDCOLOR 128
-#define CC_ANYCOLOR 256
-#define CF_SCREENFONTS 1
-#define CF_PRINTERFONTS 2
-#define CF_BOTH 3
-#define CF_SHOWHELP 4
-#define CF_ENABLEHOOK 8
-#define CF_ENABLETEMPLATE 16
-#define CF_ENABLETEMPLATEHANDLE 32
-#define CF_INITTOLOGFONTSTRUCT 64
-#define CF_USESTYLE 128
-#define CF_EFFECTS 256
-#define CF_APPLY 512
-#define CF_ANSIONLY 1024
-#define CF_SCRIPTSONLY CF_ANSIONLY
-#define CF_NOVECTORFONTS 2048
-#define CF_NOOEMFONTS 2048
-#define CF_NOSIMULATIONS 4096
-#define CF_LIMITSIZE 8192
-#define CF_FIXEDPITCHONLY 16384
-#define CF_WYSIWYG 32768
-#define CF_FORCEFONTEXIST 65536
-#define CF_SCALABLEONLY 131072
-#define CF_TTONLY 262144
-#define CF_NOFACESEL 524288
-#define CF_NOSTYLESEL 1048576
-#define CF_NOSIZESEL 2097152
-#define CF_SELECTSCRIPT 4194304
-#define CF_NOSCRIPTSEL 8388608
-#define CF_NOVERTFONTS 0x1000000
-#define SIMULATED_FONTTYPE 0x8000
-#define PRINTER_FONTTYPE 0x4000
-#define SCREEN_FONTTYPE 0x2000
-#define BOLD_FONTTYPE 0x100
-#define ITALIC_FONTTYPE 0x0200
-#define REGULAR_FONTTYPE 0x0400
-#define WM_CHOOSEFONT_GETLOGFONT (WM_USER+1)
-#define WM_CHOOSEFONT_SETLOGFONT (WM_USER+101)
-#define WM_CHOOSEFONT_SETFLAGS (WM_USER+102)
-#define OFN_ALLOWMULTISELECT 512
-#define OFN_CREATEPROMPT 0x2000
-#define OFN_ENABLEHOOK 32
-#define OFN_ENABLESIZING 0x800000
-#define OFN_ENABLETEMPLATE 64
-#define OFN_ENABLETEMPLATEHANDLE 128
-#define OFN_EXPLORER 0x80000
-#define OFN_EXTENSIONDIFFERENT 0x400
-#define OFN_FILEMUSTEXIST 0x1000
-#define OFN_HIDEREADONLY 4
-#define OFN_LONGNAMES 0x200000
-#define OFN_NOCHANGEDIR 8
-#define OFN_NODEREFERENCELINKS 0x100000
-#define OFN_NOLONGNAMES 0x40000
-#define OFN_NONETWORKBUTTON 0x20000
-#define OFN_NOREADONLYRETURN 0x8000
-#define OFN_NOTESTFILECREATE 0x10000
-#define OFN_NOVALIDATE 256
-#define OFN_OVERWRITEPROMPT 2
-#define OFN_PATHMUSTEXIST 0x800
-#define OFN_READONLY 1
-#define OFN_SHAREAWARE 0x4000
-#define OFN_SHOWHELP 16
-#define OFN_SHAREFALLTHROUGH 2
-#define OFN_SHARENOWARN 1
-#define OFN_SHAREWARN 0
-#define OFN_NODEREFERENCELINKS 0x100000
-#if (_WIN32_WINNT >= 0x0500)
-#define OFN_DONTADDTORECENT 0x02000000
-#endif
-#define FR_DIALOGTERM 64
-#define FR_DOWN 1
-#define FR_ENABLEHOOK 256
-#define FR_ENABLETEMPLATE 512
-#define FR_ENABLETEMPLATEHANDLE 0x2000
-#define FR_FINDNEXT 8
-#define FR_HIDEUPDOWN 0x4000
-#define FR_HIDEMATCHCASE 0x8000
-#define FR_HIDEWHOLEWORD 0x10000
-#define FR_MATCHALEFHAMZA 0x80000000
-#define FR_MATCHCASE 4
-#define FR_MATCHDIAC 0x20000000
-#define FR_MATCHKASHIDA 0x40000000
-#define FR_NOMATCHCASE 0x800
-#define FR_NOUPDOWN 0x400
-#define FR_NOWHOLEWORD 4096
-#define FR_REPLACE 16
-#define FR_REPLACEALL 32
-#define FR_SHOWHELP 128
-#define FR_WHOLEWORD 2
-#define PD_ALLPAGES 0x00000000
-#define PD_SELECTION 0x00000001
-#define PD_PAGENUMS 0x00000002
-#define PD_NOSELECTION 0x00000004
-#define PD_NOPAGENUMS 0x00000008
-#define PD_COLLATE 0x00000010
-#define PD_PRINTTOFILE 0x00000020
-#define PD_PRINTSETUP 0x00000040
-#define PD_NOWARNING 0x00000080
-#define PD_RETURNDC 0x00000100
-#define PD_RETURNIC 0x00000200
-#define PD_RETURNDEFAULT 0x00000400
-#define PD_SHOWHELP 0x00000800
-#define PD_ENABLEPRINTHOOK 0x00001000
-#define PD_ENABLESETUPHOOK 0x00002000
-#define PD_ENABLEPRINTTEMPLATE 0x00004000
-#define PD_ENABLESETUPTEMPLATE 0x00008000
-#define PD_ENABLEPRINTTEMPLATEHANDLE 0x00010000
-#define PD_ENABLESETUPTEMPLATEHANDLE 0x00020000
-#define PD_USEDEVMODECOPIES 0x00040000
-#define PD_USEDEVMODECOPIESANDCOLLATE 0x00040000
-#define PD_DISABLEPRINTTOFILE 0x00080000
-#define PD_HIDEPRINTTOFILE 0x00100000
-#define PD_NONETWORKBUTTON 0x00200000
-#if (_WIN32_WINNT >= 0x0500)
-#define PD_CURRENTPAGE 0x00400000
-#define PD_NOCURRENTPAGE 0x00800000
-#define PD_EXCLUSIONFLAGS 0x01000000
-#define PD_USELARGETEMPLATE 0x10000000
-#define PD_RESULT_CANCEL 0
-#define PD_RESULT_PRINT 1
-#define PD_RESULT_APPLY 2
-#define START_PAGE_GENERAL 0XFFFFFFFF
-#endif
-#define PSD_DEFAULTMINMARGINS 0
-#define PSD_INWININIINTLMEASURE 0
-#define PSD_MINMARGINS 1
-#define PSD_MARGINS 2
-#define PSD_INTHOUSANDTHSOFINCHES 4
-#define PSD_INHUNDREDTHSOFMILLIMETERS 8
-#define PSD_DISABLEMARGINS 16
-#define PSD_DISABLEPRINTER 32
-#define PSD_NOWARNING 128
-#define PSD_DISABLEORIENTATION 256
-#define PSD_DISABLEPAPER 512
-#define PSD_RETURNDEFAULT 1024
-#define PSD_SHOWHELP 2048
-#define PSD_ENABLEPAGESETUPHOOK 8192
-#define PSD_ENABLEPAGESETUPTEMPLATE 0x8000
-#define PSD_ENABLEPAGESETUPTEMPLATEHANDLE 0x20000
-#define PSD_ENABLEPAGEPAINTHOOK 0x40000
-#define PSD_DISABLEPAGEPAINTING 0x80000
-#define WM_PSD_PAGESETUPDLG WM_USER
-#define WM_PSD_FULLPAGERECT (WM_USER+1)
-#define WM_PSD_MINMARGINRECT (WM_USER+2)
-#define WM_PSD_MARGINRECT (WM_USER+3)
-#define WM_PSD_GREEKTEXTRECT (WM_USER+4)
-#define WM_PSD_ENVSTAMPRECT (WM_USER+5)
-#define WM_PSD_YAFULLPAGERECT (WM_USER+6)
-#define CD_LBSELNOITEMS (-1)
-#define CD_LBSELCHANGE 0
-#define CD_LBSELSUB 1
-#define CD_LBSELADD 2
-#define DN_DEFAULTPRN 1
-#if (_WIN32_WINNT >= 0x0500)
-#define OPENFILENAME_SIZE_VERSION_400 76
-#endif
-
-#ifndef SNDMSG
-#ifdef __cplusplus
-#define SNDMSG ::SendMessage
-#else
-#define SNDMSG SendMessage
-#endif
-#endif /* ifndef SNDMSG */
-
-#define CommDlg_OpenSave_GetSpec(d,s,m) ((int)SNDMSG((d),CDM_GETSPEC,(m),(LPARAM)(s)))
-#define CommDlg_OpenSave_GetSpecA CommDlg_OpenSave_GetSpec
-#define CommDlg_OpenSave_GetSpecW CommDlg_OpenSave_GetSpec
-#define CommDlg_OpenSave_GetFilePath(d,s,m) ((int)SNDMSG((d),CDM_GETFILEPATH,(m),(LPARAM)(s)))
-#define CommDlg_OpenSave_GetFilePathA CommDlg_OpenSave_GetFilePath
-#define CommDlg_OpenSave_GetFilePathW CommDlg_OpenSave_GetFilePath
-#define CommDlg_OpenSave_GetFolderPath(d,s,m) ((int)SNDMSG((d),CDM_GETFOLDERPATH,(m),(LPARAM)(LPSTR)(s)))
-#define CommDlg_OpenSave_GetFolderPathA CommDlg_OpenSave_GetFolderPath
-#define CommDlg_OpenSave_GetFolderPathW CommDlg_OpenSave_GetFolderPath
-#define CommDlg_OpenSave_GetFolderIDList(d,i,m) ((int)SNDMSG((d),CDM_GETFOLDERIDLIST,(m),(LPARAM)(i)))
-#define CommDlg_OpenSave_SetControlText(d,i,t) ((void)SNDMSG((d),CDM_SETCONTROLTEXT,(i),(LPARAM)(t)))
-#define CommDlg_OpenSave_HideControl(d,i) ((void)SNDMSG((d),CDM_HIDECONTROL,(i),0))
-#define CommDlg_OpenSave_SetDefExt(d,e) ((void)SNDMSG((d),CDM_SETDEFEXT,0,(LPARAM)(e)))
-
-typedef UINT (APIENTRY *__CDHOOKPROC)(HWND,UINT,WPARAM,LPARAM);
-typedef __CDHOOKPROC LPCCHOOKPROC;
-typedef __CDHOOKPROC LPCFHOOKPROC;
-typedef __CDHOOKPROC LPFRHOOKPROC;
-typedef __CDHOOKPROC LPOFNHOOKPROC;
-typedef __CDHOOKPROC LPPAGEPAINTHOOK;
-typedef __CDHOOKPROC LPPAGESETUPHOOK;
-typedef __CDHOOKPROC LPSETUPHOOKPROC;
-typedef __CDHOOKPROC LPPRINTHOOKPROC;
-typedef struct tagCHOOSECOLORA {
- DWORD lStructSize;
- HWND hwndOwner;
- HWND hInstance;
- COLORREF rgbResult;
- COLORREF* lpCustColors;
- DWORD Flags;
- LPARAM lCustData;
- LPCCHOOKPROC lpfnHook;
- LPCSTR lpTemplateName;
-} CHOOSECOLORA,*LPCHOOSECOLORA;
-typedef struct tagCHOOSECOLORW {
- DWORD lStructSize;
- HWND hwndOwner;
- HWND hInstance;
- COLORREF rgbResult;
- COLORREF* lpCustColors;
- DWORD Flags;
- LPARAM lCustData;
- LPCCHOOKPROC lpfnHook;
- LPCWSTR lpTemplateName;
-} CHOOSECOLORW,*LPCHOOSECOLORW;
-typedef struct tagCHOOSEFONTA {
- DWORD lStructSize;
- HWND hwndOwner;
- HDC hDC;
- LPLOGFONTA lpLogFont;
- INT iPointSize;
- DWORD Flags;
- DWORD rgbColors;
- LPARAM lCustData;
- LPCFHOOKPROC lpfnHook;
- LPCSTR lpTemplateName;
- HINSTANCE hInstance;
- LPSTR lpszStyle;
- WORD nFontType;
- WORD ___MISSING_ALIGNMENT__;
- INT nSizeMin;
- INT nSizeMax;
-} CHOOSEFONTA,*LPCHOOSEFONTA;
-typedef struct tagCHOOSEFONTW {
- DWORD lStructSize;
- HWND hwndOwner;
- HDC hDC;
- LPLOGFONTW lpLogFont;
- INT iPointSize;
- DWORD Flags;
- DWORD rgbColors;
- LPARAM lCustData;
- LPCFHOOKPROC lpfnHook;
- LPCWSTR lpTemplateName;
- HINSTANCE hInstance;
- LPWSTR lpszStyle;
- WORD nFontType;
- WORD ___MISSING_ALIGNMENT__;
- INT nSizeMin;
- INT nSizeMax;
-} CHOOSEFONTW,*LPCHOOSEFONTW;
-typedef struct tagDEVNAMES {
- WORD wDriverOffset;
- WORD wDeviceOffset;
- WORD wOutputOffset;
- WORD wDefault;
-} DEVNAMES,*LPDEVNAMES;
-typedef struct {
- DWORD lStructSize;
- HWND hwndOwner;
- HINSTANCE hInstance;
- DWORD Flags;
- LPSTR lpstrFindWhat;
- LPSTR lpstrReplaceWith;
- WORD wFindWhatLen;
- WORD wReplaceWithLen;
- LPARAM lCustData;
- LPFRHOOKPROC lpfnHook;
- LPCSTR lpTemplateName;
-} FINDREPLACEA,*LPFINDREPLACEA;
-typedef struct {
- DWORD lStructSize;
- HWND hwndOwner;
- HINSTANCE hInstance;
- DWORD Flags;
- LPWSTR lpstrFindWhat;
- LPWSTR lpstrReplaceWith;
- WORD wFindWhatLen;
- WORD wReplaceWithLen;
- LPARAM lCustData;
- LPFRHOOKPROC lpfnHook;
- LPCWSTR lpTemplateName;
-} FINDREPLACEW,*LPFINDREPLACEW;
-typedef struct tagOFNA {
- DWORD lStructSize;
- HWND hwndOwner;
- HINSTANCE hInstance;
- LPCSTR lpstrFilter;
- LPSTR lpstrCustomFilter;
- DWORD nMaxCustFilter;
- DWORD nFilterIndex;
- LPSTR lpstrFile;
- DWORD nMaxFile;
- LPSTR lpstrFileTitle;
- DWORD nMaxFileTitle;
- LPCSTR lpstrInitialDir;
- LPCSTR lpstrTitle;
- DWORD Flags;
- WORD nFileOffset;
- WORD nFileExtension;
- LPCSTR lpstrDefExt;
- DWORD lCustData;
- LPOFNHOOKPROC lpfnHook;
- LPCSTR lpTemplateName;
-#if (_WIN32_WINNT >= 0x0500)
- void * pvReserved;
- DWORD dwReserved;
- DWORD FlagsEx;
-#endif /* (_WIN32_WINNT >= 0x0500) */
-} OPENFILENAMEA,*LPOPENFILENAMEA;
-typedef struct tagOFNW {
- DWORD lStructSize;
- HWND hwndOwner;
- HINSTANCE hInstance;
- LPCWSTR lpstrFilter;
- LPWSTR lpstrCustomFilter;
- DWORD nMaxCustFilter;
- DWORD nFilterIndex;
- LPWSTR lpstrFile;
- DWORD nMaxFile;
- LPWSTR lpstrFileTitle;
- DWORD nMaxFileTitle;
- LPCWSTR lpstrInitialDir;
- LPCWSTR lpstrTitle;
- DWORD Flags;
- WORD nFileOffset;
- WORD nFileExtension;
- LPCWSTR lpstrDefExt;
- DWORD lCustData;
- LPOFNHOOKPROC lpfnHook;
- LPCWSTR lpTemplateName;
-#if (_WIN32_WINNT >= 0x0500)
- void * pvReserved;
- DWORD dwReserved;
- DWORD FlagsEx;
-#endif /* (_WIN32_WINNT >= 0x0500) */
-} OPENFILENAMEW,*LPOPENFILENAMEW;
-typedef struct _OFNOTIFYA {
- NMHDR hdr;
- LPOPENFILENAMEA lpOFN;
- LPSTR pszFile;
-} OFNOTIFYA,*LPOFNOTIFYA;
-typedef struct _OFNOTIFYW {
- NMHDR hdr;
- LPOPENFILENAMEW lpOFN;
- LPWSTR pszFile;
-} OFNOTIFYW,*LPOFNOTIFYW;
-typedef struct tagPSDA {
- DWORD lStructSize;
- HWND hwndOwner;
- HGLOBAL hDevMode;
- HGLOBAL hDevNames;
- DWORD Flags;
- POINT ptPaperSize;
- RECT rtMinMargin;
- RECT rtMargin;
- HINSTANCE hInstance;
- LPARAM lCustData;
- LPPAGESETUPHOOK lpfnPageSetupHook;
- LPPAGEPAINTHOOK lpfnPagePaintHook;
- LPCSTR lpPageSetupTemplateName;
- HGLOBAL hPageSetupTemplate;
-} PAGESETUPDLGA,*LPPAGESETUPDLGA;
-typedef struct tagPSDW {
- DWORD lStructSize;
- HWND hwndOwner;
- HGLOBAL hDevMode;
- HGLOBAL hDevNames;
- DWORD Flags;
- POINT ptPaperSize;
- RECT rtMinMargin;
- RECT rtMargin;
- HINSTANCE hInstance;
- LPARAM lCustData;
- LPPAGESETUPHOOK lpfnPageSetupHook;
- LPPAGEPAINTHOOK lpfnPagePaintHook;
- LPCWSTR lpPageSetupTemplateName;
- HGLOBAL hPageSetupTemplate;
-} PAGESETUPDLGW,*LPPAGESETUPDLGW;
-typedef struct tagPDA {
- DWORD lStructSize;
- HWND hwndOwner;
- HANDLE hDevMode;
- HANDLE hDevNames;
- HDC hDC;
- DWORD Flags;
- WORD nFromPage;
- WORD nToPage;
- WORD nMinPage;
- WORD nMaxPage;
- WORD nCopies;
- HINSTANCE hInstance;
- DWORD lCustData;
- LPPRINTHOOKPROC lpfnPrintHook;
- LPSETUPHOOKPROC lpfnSetupHook;
- LPCSTR lpPrintTemplateName;
- LPCSTR lpSetupTemplateName;
- HANDLE hPrintTemplate;
- HANDLE hSetupTemplate;
-} PRINTDLGA,*LPPRINTDLGA;
-typedef struct tagPDW {
- DWORD lStructSize;
- HWND hwndOwner;
- HANDLE hDevMode;
- HANDLE hDevNames;
- HDC hDC;
- DWORD Flags;
- WORD nFromPage;
- WORD nToPage;
- WORD nMinPage;
- WORD nMaxPage;
- WORD nCopies;
- HINSTANCE hInstance;
- DWORD lCustData;
- LPPRINTHOOKPROC lpfnPrintHook;
- LPSETUPHOOKPROC lpfnSetupHook;
- LPCWSTR lpPrintTemplateName;
- LPCWSTR lpSetupTemplateName;
- HANDLE hPrintTemplate;
- HANDLE hSetupTemplate;
-} PRINTDLGW,*LPPRINTDLGW;
-#if (WINVER >= 0x0500) && !defined (_OBJC_NO_COM)
-#include <unknwn.h> /* for LPUNKNOWN */
-#include <prsht.h> /* for HPROPSHEETPAGE */
-typedef struct tagPRINTPAGERANGE {
- DWORD nFromPage;
- DWORD nToPage;
-} PRINTPAGERANGE, *LPPRINTPAGERANGE;
-typedef struct tagPDEXA {
- DWORD lStructSize;
- HWND hwndOwner;
- HGLOBAL hDevMode;
- HGLOBAL hDevNames;
- HDC hDC;
- DWORD Flags;
- DWORD Flags2;
- DWORD ExclusionFlags;
- DWORD nPageRanges;
- DWORD nMaxPageRanges;
- LPPRINTPAGERANGE lpPageRanges;
- DWORD nMinPage;
- DWORD nMaxPage;
- DWORD nCopies;
- HINSTANCE hInstance;
- LPCSTR lpPrintTemplateName;
- LPUNKNOWN lpCallback;
- DWORD nPropertyPages;
- HPROPSHEETPAGE *lphPropertyPages;
- DWORD nStartPage;
- DWORD dwResultAction;
-} PRINTDLGEXA, *LPPRINTDLGEXA;
-typedef struct tagPDEXW {
- DWORD lStructSize;
- HWND hwndOwner;
- HGLOBAL hDevMode;
- HGLOBAL hDevNames;
- HDC hDC;
- DWORD Flags;
- DWORD Flags2;
- DWORD ExclusionFlags;
- DWORD nPageRanges;
- DWORD nMaxPageRanges;
- LPPRINTPAGERANGE lpPageRanges;
- DWORD nMinPage;
- DWORD nMaxPage;
- DWORD nCopies;
- HINSTANCE hInstance;
- LPCWSTR lpPrintTemplateName;
- LPUNKNOWN lpCallback;
- DWORD nPropertyPages;
- HPROPSHEETPAGE *lphPropertyPages;
- DWORD nStartPage;
- DWORD dwResultAction;
-} PRINTDLGEXW, *LPPRINTDLGEXW;
-#endif /* WINVER >= 0x0500 */
-
-BOOL WINAPI ChooseColorA(LPCHOOSECOLORA);
-BOOL WINAPI ChooseColorW(LPCHOOSECOLORW);
-BOOL WINAPI ChooseFontA(LPCHOOSEFONTA);
-BOOL WINAPI ChooseFontW(LPCHOOSEFONTW);
-DWORD WINAPI CommDlgExtendedError(void);
-HWND WINAPI FindTextA(LPFINDREPLACEA);
-HWND WINAPI FindTextW(LPFINDREPLACEW);
-short WINAPI GetFileTitleA(LPCSTR,LPSTR,WORD);
-short WINAPI GetFileTitleW(LPCWSTR,LPWSTR,WORD);
-BOOL WINAPI GetOpenFileNameA(LPOPENFILENAMEA);
-BOOL WINAPI GetOpenFileNameW(LPOPENFILENAMEW);
-BOOL WINAPI GetSaveFileNameA(LPOPENFILENAMEA);
-BOOL WINAPI GetSaveFileNameW(LPOPENFILENAMEW);
-BOOL WINAPI PageSetupDlgA(LPPAGESETUPDLGA);
-BOOL WINAPI PageSetupDlgW(LPPAGESETUPDLGW);
-BOOL WINAPI PrintDlgA(LPPRINTDLGA);
-BOOL WINAPI PrintDlgW(LPPRINTDLGW);
-HWND WINAPI ReplaceTextA(LPFINDREPLACEA);
-HWND WINAPI ReplaceTextW(LPFINDREPLACEW);
-#if (WINVER >= 0x0500) && !defined (_OBJC_NO_COM)
-HRESULT WINAPI PrintDlgExA(LPPRINTDLGEXA);
-HRESULT WINAPI PrintDlgExW(LPPRINTDLGEXW);
-#endif /* WINVER >= 0x0500 */
-
-#ifdef UNICODE
-#define LBSELCHSTRING LBSELCHSTRINGW
-#define SHAREVISTRING SHAREVISTRINGW
-#define FILEOKSTRING FILEOKSTRINGW
-#define COLOROKSTRING COLOROKSTRINGW
-#define SETRGBSTRING SETRGBSTRINGW
-#define HELPMSGSTRING HELPMSGSTRINGW
-#define FINDMSGSTRING FINDMSGSTRINGW
-typedef CHOOSECOLORW CHOOSECOLOR,*LPCHOOSECOLOR;
-typedef CHOOSEFONTW CHOOSEFONT,*LPCHOOSEFONT;
-typedef FINDREPLACEW FINDREPLACE,*LPFINDREPLACE;
-typedef OPENFILENAMEW OPENFILENAME,*LPOPENFILENAME;
-typedef OFNOTIFYW OFNOTIFY,*LPOFNOTIFY;
-typedef PAGESETUPDLGW PAGESETUPDLG,*LPPAGESETUPDLG;
-typedef PRINTDLGW PRINTDLG,*LPPRINTDLG;
-#define ChooseColor ChooseColorW
-#define ChooseFont ChooseFontW
-#define FindText FindTextW
-#define GetFileTitle GetFileTitleW
-#define GetOpenFileName GetOpenFileNameW
-#define GetSaveFileName GetSaveFileNameW
-#define PageSetupDlg PageSetupDlgW
-#define PrintDlg PrintDlgW
-#define ReplaceText ReplaceTextW
-#if (WINVER >= 0x0500) && !defined (_OBJC_NO_COM)
-typedef PRINTDLGEXW PRINTDLGEX, *LPPRINTDLGEX;
-#define PrintDlgEx PrintDlgExW
-#endif /* WINVER >= 0x0500 */
-#else /* UNICODE */
-#define LBSELCHSTRING LBSELCHSTRINGA
-#define SHAREVISTRING SHAREVISTRINGA
-#define FILEOKSTRING FILEOKSTRINGA
-#define COLOROKSTRING COLOROKSTRINGA
-#define SETRGBSTRING SETRGBSTRINGA
-#define HELPMSGSTRING HELPMSGSTRINGA
-#define FINDMSGSTRING FINDMSGSTRINGA
-typedef CHOOSECOLORA CHOOSECOLOR,*LPCHOOSECOLOR;
-typedef CHOOSEFONTA CHOOSEFONT,*LPCHOOSEFONT;
-typedef FINDREPLACEA FINDREPLACE,*LPFINDREPLACE;
-typedef OPENFILENAMEA OPENFILENAME,*LPOPENFILENAME;
-typedef OFNOTIFYA OFNOTIFY,*LPOFNOTIFY;
-typedef PAGESETUPDLGA PAGESETUPDLG,*LPPAGESETUPDLG;
-typedef PRINTDLGA PRINTDLG,*LPPRINTDLG;
-#define ChooseColor ChooseColorA
-#define ChooseFont ChooseFontA
-#define FindText FindTextA
-#define GetFileTitle GetFileTitleA
-#define GetOpenFileName GetOpenFileNameA
-#define GetSaveFileName GetSaveFileNameA
-#define PageSetupDlg PageSetupDlgA
-#define PrintDlg PrintDlgA
-#define ReplaceText ReplaceTextA
-#if (WINVER >= 0x0500) && !defined (_OBJC_NO_COM)
-typedef PRINTDLGEXA PRINTDLGEX, *LPPRINTDLGEX;
-#define PrintDlgEx PrintDlgExA
-#endif /* WINVER >= 0x0500 */
-#endif /* UNICODE */
-#pragma pack(pop)
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/control.h b/winsup/w32api/include/control.h
deleted file mode 100644
index 9f9f7cf..0000000
--- a/winsup/w32api/include/control.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef _CONTROL_H
-#define _CONTROL_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- DirectShow Reference - DirectShow Data Types */
-typedef LONG_PTR OAEVENT;
-typedef LONG_PTR OAHWND;
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/cpl.h b/winsup/w32api/include/cpl.h
deleted file mode 100644
index aaec597..0000000
--- a/winsup/w32api/include/cpl.h
+++ /dev/null
@@ -1,61 +0,0 @@
-#ifndef _CPL_H
-#define _CPL_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define WM_CPL_LAUNCH (WM_USER+1000)
-#define WM_CPL_LAUNCHED (WM_USER+1001)
-#define CPL_DYNAMIC_RES 0
-#define CPL_INIT 1
-#define CPL_GETCOUNT 2
-#define CPL_INQUIRE 3
-#define CPL_SELECT 4
-#define CPL_DBLCLK 5
-#define CPL_STOP 6
-#define CPL_EXIT 7
-#define CPL_NEWINQUIRE 8
-#define CPL_STARTWPARMSA 9
-#define CPL_STARTWPARMSW 10
-#define CPL_SETUP 200
-typedef LONG(APIENTRY *APPLET_PROC)(HWND,UINT,LONG,LONG);
-typedef struct tagCPLINFO {
- int idIcon;
- int idName;
- int idInfo;
- LONG lData;
-} CPLINFO,*LPCPLINFO;
-typedef struct tagNEWCPLINFOA {
- DWORD dwSize;
- DWORD dwFlags;
- DWORD dwHelpContext;
- LONG lData;
- HICON hIcon;
- CHAR szName[32];
- CHAR szInfo[64];
- CHAR szHelpFile[128];
-} NEWCPLINFOA,*LPNEWCPLINFOA;
-typedef struct tagNEWCPLINFOW {
- DWORD dwSize;
- DWORD dwFlags;
- DWORD dwHelpContext;
- LONG lData;
- HICON hIcon;
- WCHAR szName[32];
- WCHAR szInfo[64];
- WCHAR szHelpFile[128];
-} NEWCPLINFOW,*LPNEWCPLINFOW;
-#ifdef UNICODE
-#define CPL_STARTWPARMS CPL_STARTWPARMSW
-typedef NEWCPLINFOW NEWCPLINFO,*LPNEWCPLINFO;
-#else
-#define CPL_STARTWPARMS CPL_STARTWPARMSA
-typedef NEWCPLINFOA NEWCPLINFO,*LPNEWCPLINFO;
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/cplext.h b/winsup/w32api/include/cplext.h
deleted file mode 100644
index 34333b5..0000000
--- a/winsup/w32api/include/cplext.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _CPLEXT_H
-#define _CPLEXT_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#define CPLPAGE_MOUSE_BUTTONS 1
-#define CPLPAGE_MOUSE_PTRMOTION 2
-#define CPLPAGE_MOUSE_WHEEL 3
-#define CPLPAGE_KEYBOARD_SPEED 1
-#define CPLPAGE_DISPLAY_BACKGROUND 1
-#endif
diff --git a/winsup/w32api/include/custcntl.h b/winsup/w32api/include/custcntl.h
deleted file mode 100644
index 8a9d5ff..0000000
--- a/winsup/w32api/include/custcntl.h
+++ /dev/null
@@ -1,102 +0,0 @@
-#ifndef _CUSTCNTL_H
-#define _CUSTCNTL_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define CCF_NOTEXT 1
-#define CCHCCCLASS 32
-#define CCHCCDESC 32
-#define CCHCCTEXT 256
-
-typedef struct tagCCSTYLEA {
- DWORD flStyle;
- DWORD flExtStyle;
- CHAR szText[CCHCCTEXT];
- LANGID lgid;
- WORD wReserved1;
-} CCSTYLEA,*LPCCSTYLEA;
-typedef struct tagCCSTYLEW {
- DWORD flStyle;
- DWORD flExtStyle;
- WCHAR szText[CCHCCTEXT];
- LANGID lgid;
- WORD wReserved1;
-} CCSTYLEW,*LPCCSTYLEW;
-typedef struct tagCCSTYLEFLAGA {
- DWORD flStyle;
- DWORD flStyleMask;
- LPSTR pszStyle;
-} CCSTYLEFLAGA,*LPCCSTYLEFLAGA;
-typedef struct tagCCSTYLEFLAGW {
- DWORD flStyle;
- DWORD flStyleMask;
- LPWSTR pszStyle;
-} CCSTYLEFLAGW,*LPCCSTYLEFLAGW;
-typedef BOOL(CALLBACK* LPFNCCSTYLEA)(HWND,LPCCSTYLEA);
-typedef INT(CALLBACK* LPFNCCSIZETOTEXTA)(DWORD,DWORD,HFONT,LPSTR);
-typedef struct tagCCINFOA {
- CHAR szClass[CCHCCCLASS];
- DWORD flOptions;
- CHAR szDesc[CCHCCDESC];
- UINT cxDefault;
- UINT cyDefault;
- DWORD flStyleDefault;
- DWORD flExtStyleDefault;
- DWORD flCtrlTypeMask;
- CHAR szTextDefault[CCHCCTEXT];
- INT cStyleFlags;
- LPCCSTYLEFLAGA aStyleFlags;
- LPFNCCSTYLEA lpfnStyle;
- LPFNCCSIZETOTEXTA lpfnSizeToText;
- DWORD dwReserved1;
- DWORD dwReserved2;
-} CCINFOA,*LPCCINFOA;
-typedef UINT(CALLBACK* LPFNCCINFOA)(LPCCINFOA);
-typedef BOOL(CALLBACK* LPFNCCSTYLEW)(HWND,LPCCSTYLEW);
-typedef INT (CALLBACK* LPFNCCSIZETOTEXTW)(DWORD,DWORD,HFONT,LPWSTR);
-typedef struct tagCCINFOW {
- WCHAR szClass[CCHCCCLASS];
- DWORD flOptions;
- WCHAR szDesc[CCHCCDESC];
- UINT cxDefault;
- UINT cyDefault;
- DWORD flStyleDefault;
- DWORD flExtStyleDefault;
- DWORD flCtrlTypeMask;
- WCHAR szTextDefault[CCHCCTEXT];
- INT cStyleFlags;
- LPCCSTYLEFLAGW aStyleFlags;
- LPFNCCSTYLEW lpfnStyle;
- LPFNCCSIZETOTEXTW lpfnSizeToText;
- DWORD dwReserved1;
- DWORD dwReserved2;
-} CCINFOW,*LPCCINFOW;
-typedef UINT(CALLBACK* LPFNCCINFOW)(LPCCINFOW);
-
-UINT CALLBACK CustomControlInfoA(LPCCINFOA acci);
-UINT CALLBACK CustomControlInfoW(LPCCINFOW acci);
-
-#ifdef UNICODE
-typedef CCSTYLEW CCSTYLE,*LPCCSTYLE;
-typedef CCSTYLEFLAGW CCSTYLEFLAG,*LPCCSTYLEFLAG;
-typedef CCINFOW CCINFO,*LPCCINFO;
-#define LPFNCCSTYLE LPFNCCSTYLEW
-#define LPFNCCSIZETOTEXT LPFNCCSIZETOTEXTW
-#define LPFNCCINFO LPFNCCINFOW
-#else
-typedef CCSTYLEA CCSTYLE,*LPCCSTYLE;
-typedef CCSTYLEFLAGA CCSTYLEFLAG,*LPCCSTYLEFLAG;
-typedef CCINFOA CCINFO,*LPCCINFO;
-#define LPFNCCSTYLE LPFNCCSTYLEA
-#define LPFNCCSIZETOTEXT LPFNCCSIZETOTEXTA
-#define LPFNCCINFO LPFNCCINFOA
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/dbt.h b/winsup/w32api/include/dbt.h
deleted file mode 100644
index 69c15af..0000000
--- a/winsup/w32api/include/dbt.h
+++ /dev/null
@@ -1,154 +0,0 @@
-#ifndef _DBT_H
-#define _DBT_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define DBT_NO_DISK_SPACE 0x47
-#define DBT_CONFIGMGPRIVATE 0x7FFF
-#define DBT_DEVICEARRIVAL 0x8000
-#define DBT_DEVICEQUERYREMOVE 0x8001
-#define DBT_DEVICEQUERYREMOVEFAILED 0x8002
-#define DBT_DEVICEREMOVEPENDING 0x8003
-#define DBT_DEVICEREMOVECOMPLETE 0x8004
-#define DBT_DEVICETYPESPECIFIC 0x8005
-#define DBT_DEVTYP_OEM 0
-#define DBT_DEVTYP_DEVNODE 1
-#define DBT_DEVTYP_VOLUME 2
-#define DBT_DEVTYP_PORT 3
-#define DBT_DEVTYP_NET 4
-#if (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= 0x0500)
-#define DBT_DEVTYP_DEVICEINTERFACE 5
-#define DBT_DEVTYP_HANDLE 6
-#endif /* (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= 0x0500) */
-#define DBT_APPYBEGIN 0
-#define DBT_APPYEND 1
-#define DBT_DEVNODES_CHANGED 7
-#define DBT_QUERYCHANGECONFIG 0x17
-#define DBT_CONFIGCHANGED 0x18
-#define DBT_CONFIGCHANGECANCELED 0x19
-#define DBT_MONITORCHANGE 0x1B
-#define DBT_SHELLLOGGEDON 32
-#define DBT_CONFIGMGAPI32 34
-#define DBT_VXDINITCOMPLETE 35
-#define DBT_VOLLOCKQUERYLOCK 0x8041
-#define DBT_VOLLOCKLOCKTAKEN 0x8042
-#define DBT_VOLLOCKLOCKFAILED 0x8043
-#define DBT_VOLLOCKQUERYUNLOCK 0x8044
-#define DBT_VOLLOCKLOCKRELEASED 0x8045
-#define DBT_VOLLOCKUNLOCKFAILED 0x8046
-#define DBT_USERDEFINED 0xFFFF
-#define DBTF_MEDIA 1
-#define DBTF_NET 2
-
-/* Also defined in winuser.h */
-#define BSM_ALLCOMPONENTS 0
-#define BSM_APPLICATIONS 8
-#define BSM_ALLDESKTOPS 16
-#define BSM_INSTALLABLEDRIVERS 4
-#define BSM_NETDRIVER 2
-#define BSM_VXDS 1
-#define BSF_FLUSHDISK 0x00000004
-#define BSF_FORCEIFHUNG 0x00000020
-#define BSF_IGNORECURRENTTASK 0x00000002
-#define BSF_NOHANG 0x00000008
-#define BSF_NOTIMEOUTIFNOTHUNG 0x00000040
-#define BSF_POSTMESSAGE 0x00000010
-#define BSF_QUERY 0x00000001
-#if (_WIN32_WINNT >= 0x0500)
-#define BSF_ALLOWSFW 0x00000080
-#define BSF_SENDNOTIFYMESSAGE 0x00000100
-#endif /* (_WIN32_WINNT >= 0x0500) */
-#if (_WIN32_WINNT >= 0x0501)
-#define BSF_LUID 0x00000400
-#define BSF_RETURNHDESK 0x00000200
-#endif /* (_WIN32_WINNT >= 0x0501) */
-
-#define BSF_MSGSRV32ISOK_BIT 31
-#define BSF_MSGSRV32ISOK 0x80000000
-
-typedef struct _DEV_BROADCAST_HDR {
- DWORD dbch_size;
- DWORD dbch_devicetype;
- DWORD dbch_reserved;
-} DEV_BROADCAST_HDR,*PDEV_BROADCAST_HDR;
-typedef struct _DEV_BROADCAST_OEM {
- DWORD dbco_size;
- DWORD dbco_devicetype;
- DWORD dbco_reserved;
- DWORD dbco_identifier;
- DWORD dbco_suppfunc;
-} DEV_BROADCAST_OEM,*PDEV_BROADCAST_OEM;
-typedef struct _DEV_BROADCAST_PORT_A {
- DWORD dbcp_size;
- DWORD dbcp_devicetype;
- DWORD dbcp_reserved;
- char dbcp_name[1];
-} DEV_BROADCAST_PORT_A, *PDEV_BROADCAST_PORT_A;
-typedef struct _DEV_BROADCAST_PORT_W {
- DWORD dbcp_size;
- DWORD dbcp_devicetype;
- DWORD dbcp_reserved;
- wchar_t dbcp_name[1];
-} DEV_BROADCAST_PORT_W, *PDEV_BROADCAST_PORT_W;
-typedef struct _DEV_BROADCAST_USERDEFINED {
- struct _DEV_BROADCAST_HDR dbud_dbh;
- char dbud_szName[1];
-} DEV_BROADCAST_USERDEFINED;
-typedef struct _DEV_BROADCAST_VOLUME {
- DWORD dbcv_size;
- DWORD dbcv_devicetype;
- DWORD dbcv_reserved;
- DWORD dbcv_unitmask;
- WORD dbcv_flags;
-} DEV_BROADCAST_VOLUME,*PDEV_BROADCAST_VOLUME;
-
-#ifdef UNICODE
-typedef DEV_BROADCAST_PORT_W DEV_BROADCAST_PORT, *PDEV_BROADCAST_PORT;
-#else
-typedef DEV_BROADCAST_PORT_A DEV_BROADCAST_PORT, *PDEV_BROADCAST_PORT;
-#endif
-
-#if (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= 0x0500)
-typedef struct _DEV_BROADCAST_DEVICEINTERFACE_A {
- DWORD dbcc_size;
- DWORD dbcc_devicetype;
- DWORD dbcc_reserved;
- GUID dbcc_classguid;
- char dbcc_name[1];
-} DEV_BROADCAST_DEVICEINTERFACE_A, *PDEV_BROADCAST_DEVICEINTERFACE_A;
-typedef struct _DEV_BROADCAST_DEVICEINTERFACE_W {
- DWORD dbcc_size;
- DWORD dbcc_devicetype;
- DWORD dbcc_reserved;
- GUID dbcc_classguid;
- wchar_t dbcc_name[1];
-} DEV_BROADCAST_DEVICEINTERFACE_W, *PDEV_BROADCAST_DEVICEINTERFACE_W;
-
-#ifdef UNICODE
-typedef DEV_BROADCAST_DEVICEINTERFACE_W DEV_BROADCAST_DEVICEINTERFACE;
-typedef PDEV_BROADCAST_DEVICEINTERFACE_W PDEV_BROADCAST_DEVICEINTERFACE;
-#else
-typedef DEV_BROADCAST_DEVICEINTERFACE_A DEV_BROADCAST_DEVICEINTERFACE;
-typedef PDEV_BROADCAST_DEVICEINTERFACE_A PDEV_BROADCAST_DEVICEINTERFACE;
-#endif
-
-typedef struct _DEV_BROADCAST_HANDLE {
- DWORD dbch_size;
- DWORD dbch_devicetype;
- DWORD dbch_reserved;
- HANDLE dbch_handle;
- DWORD dbch_hdevnotify;
- GUID dbch_eventguid;
- LONG dbch_nameoffset;
- BYTE dbch_data[1];
-} DEV_BROADCAST_HANDLE, *PDEV_BROADCAST_HANDLE;
-#endif /* (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= 0x0500) */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/dde.h b/winsup/w32api/include/dde.h
deleted file mode 100644
index b13e9ce..0000000
--- a/winsup/w32api/include/dde.h
+++ /dev/null
@@ -1,64 +0,0 @@
-#ifndef _DDE_H
-#define _DDE_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define WM_DDE_FIRST 0x03E0
-#define WM_DDE_INITIATE (WM_DDE_FIRST)
-#define WM_DDE_TERMINATE (WM_DDE_FIRST+1)
-#define WM_DDE_ADVISE (WM_DDE_FIRST+2)
-#define WM_DDE_UNADVISE (WM_DDE_FIRST+3)
-#define WM_DDE_ACK (WM_DDE_FIRST+4)
-#define WM_DDE_DATA (WM_DDE_FIRST+5)
-#define WM_DDE_REQUEST (WM_DDE_FIRST+6)
-#define WM_DDE_POKE (WM_DDE_FIRST+7)
-#define WM_DDE_EXECUTE (WM_DDE_FIRST+8)
-#define WM_DDE_LAST (WM_DDE_FIRST+8)
-
-#ifndef RC_INVOKED
-typedef struct {
- unsigned short bAppReturnCode:8,reserved:6,fBusy:1,fAck:1;
-} DDEACK;
-typedef struct {
- unsigned short reserved:14,fDeferUpd:1,fAckReq:1;
- short cfFormat;
-} DDEADVISE;
-typedef struct {
- unsigned short unused:12,fResponse:1,fRelease:1,reserved:1,fAckReq:1;
- short cfFormat;
- BYTE Value[1];
-} DDEDATA;
-typedef struct {
- unsigned short unused:13,fRelease:1,fReserved:2;
- short cfFormat;
- BYTE Value[1];
-} DDEPOKE;
-typedef struct {
- unsigned short unused:13,
- fRelease:1,
- fDeferUpd:1,
- fAckReq:1;
- short cfFormat;
-} DDELN;
-
-typedef struct {
- unsigned short unused:12,fAck:1,fRelease:1,fReserved:1,fAckReq:1;
- short cfFormat;
- BYTE rgb[1];
-} DDEUP;
-BOOL WINAPI DdeSetQualityOfService(HWND,const SECURITY_QUALITY_OF_SERVICE*,PSECURITY_QUALITY_OF_SERVICE);
-BOOL WINAPI ImpersonateDdeClientWindow(HWND,HWND);
-LPARAM WINAPI PackDDElParam(UINT,UINT_PTR,UINT_PTR);
-BOOL WINAPI UnpackDDElParam(UINT,LPARAM,PUINT_PTR,PUINT_PTR);
-BOOL WINAPI FreeDDElParam(UINT,LPARAM);
-LPARAM WINAPI ReuseDDElParam(LPARAM,UINT,UINT,UINT_PTR,UINT_PTR);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/ddeml.h b/winsup/w32api/include/ddeml.h
deleted file mode 100644
index 67b4199..0000000
--- a/winsup/w32api/include/ddeml.h
+++ /dev/null
@@ -1,314 +0,0 @@
-#ifndef _DDEML_H
-#define _DDEML_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define EXPENTRY CALLBACK
-#define CP_WINANSI 1004
-#define CP_WINUNICODE 1200
-#define XTYPF_NOBLOCK 2
-#define XTYPF_NODATA 4
-#define XTYPF_ACKREQ 8
-#define XCLASS_MASK 0xFC00
-#define XCLASS_BOOL 0x1000
-#define XCLASS_DATA 0x2000
-#define XCLASS_FLAGS 0x4000
-#define XCLASS_NOTIFICATION 0x8000
-#define XST_NULL 0
-#define XST_INCOMPLETE 1
-#define XST_CONNECTED 2
-#define XST_INIT1 3
-#define XST_INIT2 4
-#define XST_REQSENT 5
-#define XST_DATARCVD 6
-#define XST_POKESENT 7
-#define XST_POKEACKRCVD 8
-#define XST_EXECSENT 9
-#define XST_EXECACKRCVD 10
-#define XST_ADVSENT 11
-#define XST_UNADVSENT 12
-#define XST_ADVACKRCVD 13
-#define XST_UNADVACKRCVD 14
-#define XST_ADVDATASENT 15
-#define XST_ADVDATAACKRCVD 16
-#define XTYP_ERROR (XCLASS_NOTIFICATION|XTYPF_NOBLOCK)
-#define XTYP_ADVDATA (16|XCLASS_FLAGS)
-#define XTYP_ADVREQ (32|XCLASS_DATA|XTYPF_NOBLOCK)
-#define XTYP_ADVSTART (0x30|XCLASS_BOOL)
-#define XTYP_ADVSTOP (0x0040|XCLASS_NOTIFICATION)
-#define XTYP_EXECUTE (0x0050|XCLASS_FLAGS)
-#define XTYP_CONNECT (0x0060|XCLASS_BOOL|XTYPF_NOBLOCK)
-#define XTYP_CONNECT_CONFIRM (0x0070|XCLASS_NOTIFICATION|XTYPF_NOBLOCK)
-#define XTYP_XACT_COMPLETE (0x0080|XCLASS_NOTIFICATION)
-#define XTYP_POKE (0x0090|XCLASS_FLAGS)
-#define XTYP_REGISTER (0x00A0|XCLASS_NOTIFICATION|XTYPF_NOBLOCK)
-#define XTYP_REQUEST (0x00B0|XCLASS_DATA)
-#define XTYP_DISCONNECT (0x00C0|XCLASS_NOTIFICATION|XTYPF_NOBLOCK)
-#define XTYP_UNREGISTER (0x00D0|XCLASS_NOTIFICATION|XTYPF_NOBLOCK)
-#define XTYP_WILDCONNECT (0x00E0|XCLASS_DATA|XTYPF_NOBLOCK)
-#define XTYP_MASK 0xF0
-#define XTYP_SHIFT 4
-#define TIMEOUT_ASYNC 0xFFFFFFFF
-#define QID_SYNC 0xFFFFFFFF
-#define ST_CONNECTED 1
-#define ST_ADVISE 2
-#define ST_ISLOCAL 4
-#define ST_BLOCKED 8
-#define ST_CLIENT 16
-#define ST_TERMINATED 32
-#define ST_INLIST 64
-#define ST_BLOCKNEXT 128
-#define ST_ISSELF 256
-#define CADV_LATEACK 0xFFFF
-#define DMLERR_NO_ERROR 0
-#define DMLERR_FIRST 0x4000
-#define DMLERR_ADVACKTIMEOUT 0x4000
-#define DMLERR_BUSY 0x4001
-#define DMLERR_DATAACKTIMEOUT 0x4002
-#define DMLERR_DLL_NOT_INITIALIZED 0x4003
-#define DMLERR_DLL_USAGE 0x4004
-#define DMLERR_EXECACKTIMEOUT 0x4005
-#define DMLERR_INVALIDPARAMETER 0x4006
-#define DMLERR_LOW_MEMORY 0x4007
-#define DMLERR_MEMORY_ERROR 0x4008
-#define DMLERR_NOTPROCESSED 0x4009
-#define DMLERR_NO_CONV_ESTABLISHED 0x400a
-#define DMLERR_POKEACKTIMEOUT 0x400b
-#define DMLERR_POSTMSG_FAILED 0x400c
-#define DMLERR_REENTRANCY 0x400d
-#define DMLERR_SERVER_DIED 0x400e
-#define DMLERR_SYS_ERROR 0x400f
-#define DMLERR_UNADVACKTIMEOUT 0x4010
-#define DMLERR_UNFOUND_QUEUE_ID 0x4011
-#define DMLERR_LAST 0x4011
-#define DDE_FACK 0x8000
-#define DDE_FBUSY 0x4000
-#define DDE_FDEFERUPD 0x4000
-#define DDE_FACKREQ 0x8000
-#define DDE_FRELEASE 0x2000
-#define DDE_FREQUESTED 0x1000
-#define DDE_FAPPSTATUS 0x00ff
-#define DDE_FNOTPROCESSED 0
-#define DDE_FACKRESERVED (~(DDE_FACK|DDE_FBUSY|DDE_FAPPSTATUS))
-#define DDE_FADVRESERVED (~(DDE_FACKREQ|DDE_FDEFERUPD))
-#define DDE_FDATRESERVED (~(DDE_FACKREQ|DDE_FRELEASE|DDE_FREQUESTED))
-#define DDE_FPOKRESERVED (~DDE_FRELEASE)
-#define MSGF_DDEMGR 0x8001
-#define CBR_BLOCK ((HDDEDATA)0xffffffff)
-#define CBF_FAIL_SELFCONNECTIONS 0x1000
-#define CBF_FAIL_CONNECTIONS 0x2000
-#define CBF_FAIL_ADVISES 0x4000
-#define CBF_FAIL_EXECUTES 0x8000
-#define CBF_FAIL_POKES 0x10000
-#define CBF_FAIL_REQUESTS 0x20000
-#define CBF_FAIL_ALLSVRXACTIONS 0x3f000
-#define CBF_SKIP_CONNECT_CONFIRMS 0x40000
-#define CBF_SKIP_REGISTRATIONS 0x80000
-#define CBF_SKIP_UNREGISTRATIONS 0x100000
-#define CBF_SKIP_DISCONNECTS 0x200000
-#define CBF_SKIP_ALLNOTIFICATIONS 0x3c0000
-#define APPCMD_CLIENTONLY 0x10L
-#define APPCMD_FILTERINITS 0x20L
-#define APPCMD_MASK 0xFF0L
-#define APPCLASS_STANDARD 0
-#define APPCLASS_MASK 0xFL
-#define EC_ENABLEALL 0
-#define EC_ENABLEONE ST_BLOCKNEXT
-#define EC_DISABLE ST_BLOCKED
-#define EC_QUERYWAITING 2
-#define DNS_REGISTER 1
-#define DNS_UNREGISTER 2
-#define DNS_FILTERON 4
-#define DNS_FILTEROFF 8
-#define HDATA_APPOWNED 1
-#define MAX_MONITORS 4
-#define APPCLASS_MONITOR 1L
-#define XTYP_MONITOR (XCLASS_NOTIFICATION|XTYPF_NOBLOCK|0xF0)
-#define MF_HSZ_INFO 0x1000000
-#define MF_SENDMSGS 0x2000000
-#define MF_POSTMSGS 0x4000000
-#define MF_CALLBACKS 0x8000000
-#define MF_ERRORS 0x10000000
-#define MF_LINKS 0x20000000
-#define MF_CONV 0x40000000
-#define MF_MASK 0xFF000000
-#define MH_CREATE 1
-#define MH_KEEP 2
-#define MH_DELETE 3
-#define MH_CLEANUP 4
-
-DECLARE_HANDLE(HCONVLIST);
-DECLARE_HANDLE(HCONV);
-DECLARE_HANDLE(HSZ);
-DECLARE_HANDLE(HDDEDATA);
-typedef HDDEDATA CALLBACK FNCALLBACK(UINT,UINT,HCONV,HSZ,HSZ,HDDEDATA,DWORD,DWORD);
-typedef HDDEDATA(CALLBACK *PFNCALLBACK)(UINT,UINT,HCONV,HSZ,HSZ,HDDEDATA,DWORD,DWORD);
-typedef struct tagHSZPAIR {
- HSZ hszSvc;
- HSZ hszTopic;
-} HSZPAIR, *PHSZPAIR;
-typedef struct tagCONVCONTEXT {
- UINT cb;
- UINT wFlags;
- UINT wCountryID;
- int iCodePage;
- DWORD dwLangID;
- DWORD dwSecurity;
- SECURITY_QUALITY_OF_SERVICE qos;
-} CONVCONTEXT,*PCONVCONTEXT;
-typedef struct tagCONVINFO {
- DWORD cb;
- DWORD hUser;
- HCONV hConvPartner;
- HSZ hszSvcPartner;
- HSZ hszServiceReq;
- HSZ hszTopic;
- HSZ hszItem;
- UINT wFmt;
- UINT wType;
- UINT wStatus;
- UINT wConvst;
- UINT wLastError;
- HCONVLIST hConvList;
- CONVCONTEXT ConvCtxt;
- HWND hwnd;
- HWND hwndPartner;
-} CONVINFO,*PCONVINFO;
-typedef struct tagDDEML_MSG_HOOK_DATA {
- UINT uiLo;
- UINT uiHi;
- DWORD cbData;
- DWORD Data[8];
-} DDEML_MSG_HOOK_DATA;
-typedef struct tagMONHSZSTRUCT {
- UINT cb;
- BOOL fsAction;
- DWORD dwTime;
- HSZ hsz;
- HANDLE hTask;
- TCHAR str[1];
-} MONHSZSTRUCT, *PMONHSZSTRUCT;
-typedef struct tagMONLINKSTRUCT {
- UINT cb;
- DWORD dwTime;
- HANDLE hTask;
- BOOL fEstablished;
- BOOL fNoData;
- HSZ hszSvc;
- HSZ hszTopic;
- HSZ hszItem;
- UINT wFmt;
- BOOL fServer;
- HCONV hConvServer;
- HCONV hConvClient;
-} MONLINKSTRUCT, *PMONLINKSTRUCT;
-typedef struct tagMONCONVSTRUCT {
- UINT cb;
- BOOL fConnect;
- DWORD dwTime;
- HANDLE hTask;
- HSZ hszSvc;
- HSZ hszTopic;
- HCONV hConvClient;
- HCONV hConvServer;
-} MONCONVSTRUCT, *PMONCONVSTRUCT;
-typedef struct tagMONCBSTRUCT {
- UINT cb;
- DWORD dwTime;
- HANDLE hTask;
- DWORD dwRet;
- UINT wType;
- UINT wFmt;
- HCONV hConv;
- HSZ hsz1;
- HSZ hsz2;
- HDDEDATA hData;
- ULONG_PTR dwData1;
- ULONG_PTR dwData2;
- CONVCONTEXT cc;
- DWORD cbData;
- DWORD Data[8];
-} MONCBSTRUCT, *PMONCBSTRUCT;
-typedef struct tagMONERRSTRUCT {
- UINT cb;
- UINT wLastError;
- DWORD dwTime;
- HANDLE hTask;
-} MONERRSTRUCT, *PMONERRSTRUCT;
-typedef struct tagMONMSGSTRUCT {
- UINT cb;
- HWND hwndTo;
- DWORD dwTime;
- HANDLE hTask;
- UINT wMsg;
- WPARAM wParam;
- LPARAM lParam;
- DDEML_MSG_HOOK_DATA dmhd;
-} MONMSGSTRUCT, *PMONMSGSTRUCT;
-
-BOOL WINAPI DdeAbandonTransaction(DWORD,HCONV,DWORD);
-PBYTE WINAPI DdeAccessData(HDDEDATA,PDWORD);
-HDDEDATA WINAPI DdeAddData(HDDEDATA,PBYTE,DWORD,DWORD);
-HDDEDATA WINAPI DdeClientTransaction(PBYTE,DWORD,HCONV,HSZ,UINT,UINT,DWORD,PDWORD);
-int WINAPI DdeCmpStringHandles(HSZ,HSZ);
-HCONV WINAPI DdeConnect(DWORD,HSZ,HSZ,PCONVCONTEXT);
-HCONVLIST WINAPI DdeConnectList(DWORD,HSZ,HSZ,HCONVLIST,PCONVCONTEXT);
-HDDEDATA WINAPI DdeCreateDataHandle(DWORD,PBYTE,DWORD,DWORD,HSZ,UINT,UINT);
-HSZ WINAPI DdeCreateStringHandleA(DWORD,LPCSTR,int);
-HSZ WINAPI DdeCreateStringHandleW(DWORD,LPCWSTR,int);
-BOOL WINAPI DdeDisconnect(HCONV);
-BOOL WINAPI DdeDisconnectList(HCONVLIST);
-BOOL WINAPI DdeEnableCallback(DWORD,HCONV,UINT);
-BOOL WINAPI DdeFreeDataHandle(HDDEDATA);
-BOOL WINAPI DdeFreeStringHandle(DWORD,HSZ);
-DWORD WINAPI DdeGetData(HDDEDATA,PBYTE,DWORD,DWORD);
-UINT WINAPI DdeGetLastError(DWORD);
-BOOL WINAPI DdeImpersonateClient(HCONV);
-UINT WINAPI DdeInitializeA(PDWORD,PFNCALLBACK,DWORD,DWORD);
-UINT WINAPI DdeInitializeW(PDWORD,PFNCALLBACK,DWORD,DWORD);
-BOOL WINAPI DdeKeepStringHandle(DWORD,HSZ);
-HDDEDATA WINAPI DdeNameService(DWORD,HSZ,HSZ,UINT);
-BOOL WINAPI DdePostAdvise(DWORD,HSZ,HSZ);
-UINT WINAPI DdeQueryConvInfo(HCONV,DWORD,PCONVINFO);
-HCONV WINAPI DdeQueryNextServer(HCONVLIST,HCONV);
-DWORD WINAPI DdeQueryStringA(DWORD,HSZ,LPSTR,DWORD,int);
-DWORD WINAPI DdeQueryStringW(DWORD,HSZ,LPWSTR,DWORD,int);
-HCONV WINAPI DdeReconnect(HCONV);
-BOOL WINAPI DdeSetUserHandle(HCONV,DWORD,DWORD);
-BOOL WINAPI DdeUnaccessData(HDDEDATA);
-BOOL WINAPI DdeUninitialize(DWORD);
-
-#ifdef UNICODE
-#define SZDDESYS_TOPIC L"System"
-#define SZDDESYS_ITEM_TOPICS L"Topics"
-#define SZDDESYS_ITEM_SYSITEMS L"SysItems"
-#define SZDDESYS_ITEM_RTNMSG L"ReturnMessage"
-#define SZDDESYS_ITEM_STATUS L"Status"
-#define SZDDESYS_ITEM_FORMATS L"Formats"
-#define SZDDESYS_ITEM_HELP L"Help"
-#define SZDDE_ITEM_ITEMLIST L"TopicItemList"
-#define DdeCreateStringHandle DdeCreateStringHandleW
-#define DdeInitialize DdeInitializeW
-#define DdeQueryString DdeQueryStringW
-#else
-#define SZDDESYS_TOPIC "System"
-#define SZDDESYS_ITEM_TOPICS "Topics"
-#define SZDDESYS_ITEM_SYSITEMS "SysItems"
-#define SZDDESYS_ITEM_RTNMSG "ReturnMessage"
-#define SZDDESYS_ITEM_STATUS "Status"
-#define SZDDESYS_ITEM_FORMATS "Formats"
-#define SZDDESYS_ITEM_HELP "Help"
-#define SZDDE_ITEM_ITEMLIST "TopicItemList"
-#define DdeCreateStringHandle DdeCreateStringHandleA
-#define DdeInitialize DdeInitializeA
-#define DdeQueryString DdeQueryStringA
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif /* _DDEML_H */
diff --git a/winsup/w32api/include/ddk/atm.h b/winsup/w32api/include/ddk/atm.h
deleted file mode 100644
index d302293..0000000
--- a/winsup/w32api/include/ddk/atm.h
+++ /dev/null
@@ -1,507 +0,0 @@
-/*
- * atm.h
- *
- * ATM support
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __ATM_H
-#define __ATM_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef ULONG ATM_ADDRESSTYPE;
-
-#define SAP_TYPE_NSAP 1
-#define SAP_TYPE_E164 2
-
-#define ATM_MEDIA_SPECIFIC 1
-
-#define CALLMGR_SPECIFIC_Q2931 1
-
-#define ATM_NSAP 0
-#define ATM_E164 1
-
-#define ATM_MAC_ADDRESS_LENGTH 6
-#define ATM_ADDRESS_LENGTH 20
-
-typedef ULONG ATM_AAL_TYPE, *PATM_AAL_TYPE;
-
-#define AAL_TYPE_AAL0 1
-#define AAL_TYPE_AAL1 2
-#define AAL_TYPE_AAL34 4
-#define AAL_TYPE_AAL5 8
-
-#define ATM_ADDR_BLANK_CHAR L' '
-#define ATM_ADDR_E164_START_CHAR L'+'
-#define ATM_ADDR_PUNCTUATION_CHAR L'.'
-
-typedef enum {
- IE_AALParameters,
- IE_TrafficDescriptor,
- IE_BroadbandBearerCapability,
- IE_BHLI,
- IE_BLLI,
- IE_CalledPartyNumber,
- IE_CalledPartySubaddress,
- IE_CallingPartyNumber,
- IE_CallingPartySubaddress,
- IE_Cause,
- IE_QOSClass,
- IE_TransitNetworkSelection,
- IE_BroadbandSendingComplete,
- IE_LIJCallId,
- IE_Raw
-} Q2931_IE_TYPE;
-
-typedef struct _Q2931_IE {
- Q2931_IE_TYPE IEType;
- ULONG IELength;
- UCHAR IE[1];
-} Q2931_IE, *PQ2931_IE;
-
-typedef struct _AAL1_PARAMETERS {
- UCHAR Subtype;
- UCHAR CBRRate;
- USHORT Multiplier;
- UCHAR SourceClockRecoveryMethod;
- UCHAR ErrorCorrectionMethod;
- USHORT StructuredDataTransferBlocksize;
- UCHAR PartiallyFilledCellsMethod;
-} AAL1_PARAMETERS, *PAAL1_PARAMETERS;
-
-typedef struct _AAL34_PARAMETERS {
- USHORT ForwardMaxCPCSSDUSize;
- USHORT BackwardMaxCPCSSDUSize;
- USHORT LowestMID;
- USHORT HighestMID;
- UCHAR SSCSType;
-} AAL34_PARAMETERS, *PAAL34_PARAMETERS;
-
-/* AAL5_PARAMETERS.Mode constants */
-#define AAL5_MODE_MESSAGE 0x01
-#define AAL5_MODE_STREAMING 0x02
-
-/* AAL5_PARAMETERS.SSCSType constants */
-#define AAL5_SSCS_NULL 0x00
-#define AAL5_SSCS_SSCOP_ASSURED 0x01
-#define AAL5_SSCS_SSCOP_NON_ASSURED 0x02
-#define AAL5_SSCS_FRAME_RELAY 0x04
-
-typedef struct _AAL5_PARAMETERS {
- ULONG ForwardMaxCPCSSDUSize;
- ULONG BackwardMaxCPCSSDUSize;
- UCHAR Mode;
- UCHAR SSCSType;
-} AAL5_PARAMETERS, *PAAL5_PARAMETERS;
-
-typedef struct _AALUSER_PARAMETERS {
- ULONG UserDefined;
-} AALUSER_PARAMETERS, *PAALUSER_PARAMETERS;
-
-typedef struct _AAL_PARAMETERS_IE {
- ATM_AAL_TYPE AALType;
- union {
- AAL1_PARAMETERS AAL1Parameters;
- AAL34_PARAMETERS AAL34Parameters;
- AAL5_PARAMETERS AAL5Parameters;
- AALUSER_PARAMETERS AALUserParameters;
- } AALSpecificParameters;
-} AAL_PARAMETERS_IE, *PAAL_PARAMETERS_IE;
-
-
-/* FIXME: Should the union be anonymous in C++ too? If so,
- can't define named types _ATM_AAL5_INFO and _ATM_AAL0_INFO
- within anonymous union for C++. */
-typedef struct _ATM_AAL_OOB_INFO
-{
- ATM_AAL_TYPE AalType;
-#ifndef __cplusplus
- _ANONYMOUS_UNION
-#endif
- union {
- struct _ATM_AAL5_INFO {
- BOOLEAN CellLossPriority;
- UCHAR UserToUserIndication;
- UCHAR CommonPartIndicator;
- } ATM_AAL5_INFO;
-
- struct _ATM_AAL0_INFO {
- BOOLEAN CellLossPriority;
- UCHAR PayLoadTypeIdentifier;
- } ATM_AAL0_INFO;
-#ifndef __cplusplus
- } DUMMYUNIONNAME;
-#else
- } u;
-#endif
-} ATM_AAL_OOB_INFO, *PATM_AAL_OOB_INFO;
-
-typedef struct _ATM_ADDRESS {
- ATM_ADDRESSTYPE AddressType;
- ULONG NumberOfDigits;
- UCHAR Address[ATM_ADDRESS_LENGTH];
-} ATM_ADDRESS, *PATM_ADDRESS;
-
-/* ATM_BHLI_IE.HighLayerInfoType constants */
-#define BHLI_ISO 0x00
-#define BHLI_UserSpecific 0x01
-#define BHLI_HighLayerProfile 0x02
-#define BHLI_VendorSpecificAppId 0x03
-
-typedef struct _ATM_BHLI_IE {
- ULONG HighLayerInfoType;
- ULONG HighLayerInfoLength;
- UCHAR HighLayerInfo[8];
-} ATM_BHLI_IE, *PATM_BHLI_IE;
-
-/* ATM_BLLI_IE.Layer2Protocol constants */
-#define BLLI_L2_ISO_1745 0x01
-#define BLLI_L2_Q921 0x02
-#define BLLI_L2_X25L 0x06
-#define BLLI_L2_X25M 0x07
-#define BLLI_L2_ELAPB 0x08
-#define BLLI_L2_HDLC_ARM 0x09
-#define BLLI_L2_HDLC_NRM 0x0A
-#define BLLI_L2_HDLC_ABM 0x0B
-#define BLLI_L2_LLC 0x0C
-#define BLLI_L2_X75 0x0D
-#define BLLI_L2_Q922 0x0E
-#define BLLI_L2_USER_SPECIFIED 0x10
-#define BLLI_L2_ISO_7776 0x11
-
-/* ATM_BLLI_IE.Layer3Protocol constants */
-#define BLLI_L3_X25 0x06
-#define BLLI_L3_ISO_8208 0x07
-#define BLLI_L3_X223 0x08
-#define BLLI_L3_SIO_8473 0x09
-#define BLLI_L3_T70 0x0A
-#define BLLI_L3_ISO_TR9577 0x0B
-#define BLLI_L3_USER_SPECIFIED 0x10
-
-/* ATM_BLLI_IE.Layer3IPI constants */
-#define BLLI_L3_IPI_SNAP 0x80
-#define BLLI_L3_IPI_IP 0xCC
-
-typedef struct _ATM_BLLI_IE {
- ULONG Layer2Protocol;
- UCHAR Layer2Mode;
- UCHAR Layer2WindowSize;
- ULONG Layer2UserSpecifiedProtocol;
- ULONG Layer3Protocol;
- UCHAR Layer3Mode;
- UCHAR Layer3DefaultPacketSize;
- UCHAR Layer3PacketWindowSize;
- ULONG Layer3UserSpecifiedProtocol;
- ULONG Layer3IPI;
- UCHAR SnapId[5];
-} ATM_BLLI_IE, *PATM_BLLI_IE;
-
-/* ATM_BROADBAND_BEARER_CAPABILITY_IE.BearerClass constants */
-#define BCOB_A 0x00
-#define BCOB_C 0x01
-#define BCOB_X 0x02
-
-/* ATM_BROADBAND_BEARER_CAPABILITY_IE.TrafficType constants */
-#define TT_NOIND 0x00
-#define TT_CBR 0x04
-#define TT_VBR 0x08
-
-/* ATM_BROADBAND_BEARER_CAPABILITY_IE.TimingRequirements constants */
-#define TR_NOIND 0x00
-#define TR_END_TO_END 0x01
-#define TR_NO_END_TO_END 0x02
-
-/* ATM_BROADBAND_BEARER_CAPABILITY_IE.ClippingSusceptability constants */
-#define CLIP_NOT 0x00
-#define CLIP_SUS 0x20
-
-/* ATM_BROADBAND_BEARER_CAPABILITY_IE.UserPlaneConnectionConfig constants */
-#define UP_P2P 0x00
-#define UP_P2MP 0x01
-
-typedef struct _ATM_BROADBAND_BEARER_CAPABILITY_IE {
- UCHAR BearerClass;
- UCHAR TrafficType;
- UCHAR TimingRequirements;
- UCHAR ClippingSusceptability;
- UCHAR UserPlaneConnectionConfig;
-} ATM_BROADBAND_BEARER_CAPABILITY_IE, *PATM_BROADBAND_BEARER_CAPABILITY_IE;
-
-typedef struct _ATM_BROADBAND_SENDING_COMPLETE_IE {
- UCHAR SendingComplete;
-} ATM_BROADBAND_SENDING_COMPLETE_IE, *PATM_BROADBAND_SENDING_COMPLETE_IE;
-
-typedef struct _ATM_CALLING_PARTY_NUMBER_IE {
- ATM_ADDRESS Number;
- UCHAR PresentationIndication;
- UCHAR ScreeningIndicator;
-} ATM_CALLING_PARTY_NUMBER_IE, *PATM_CALLING_PARTY_NUMBER_IE;
-
-/* ATM_CAUSE_IE.Location constants */
-#define ATM_CAUSE_LOC_USER 0x00
-#define ATM_CAUSE_LOC_PRIVATE_LOCAL 0x01
-#define ATM_CAUSE_LOC_PUBLIC_LOCAL 0x02
-#define ATM_CAUSE_LOC_TRANSIT_NETWORK 0x03
-#define ATM_CAUSE_LOC_PUBLIC_REMOTE 0x04
-#define ATM_CAUSE_LOC_PRIVATE_REMOTE 0x05
-#define ATM_CAUSE_LOC_INTERNATIONAL_NETWORK 0x07
-#define ATM_CAUSE_LOC_BEYOND_INTERWORKING 0x0A
-
-/* ATM_CAUSE_IE.Cause constants */
-#define ATM_CAUSE_UNALLOCATED_NUMBER 0x01
-#define ATM_CAUSE_NO_ROUTE_TO_TRANSIT_NETWORK 0x02
-#define ATM_CAUSE_NO_ROUTE_TO_DESTINATION 0x03
-#define ATM_CAUSE_VPI_VCI_UNACCEPTABLE 0x0A
-#define ATM_CAUSE_NORMAL_CALL_CLEARING 0x10
-#define ATM_CAUSE_USER_BUSY 0x11
-#define ATM_CAUSE_NO_USER_RESPONDING 0x12
-#define ATM_CAUSE_CALL_REJECTED 0x15
-#define ATM_CAUSE_NUMBER_CHANGED 0x16
-#define ATM_CAUSE_USER_REJECTS_CLIR 0x17
-#define ATM_CAUSE_DESTINATION_OUT_OF_ORDER 0x1B
-#define ATM_CAUSE_INVALID_NUMBER_FORMAT 0x1C
-#define ATM_CAUSE_STATUS_ENQUIRY_RESPONSE 0x1E
-#define ATM_CAUSE_NORMAL_UNSPECIFIED 0x1F
-#define ATM_CAUSE_VPI_VCI_UNAVAILABLE 0x23
-#define ATM_CAUSE_NETWORK_OUT_OF_ORDER 0x26
-#define ATM_CAUSE_TEMPORARY_FAILURE 0x29
-#define ATM_CAUSE_ACCESS_INFORMAION_DISCARDED 0x2B
-#define ATM_CAUSE_NO_VPI_VCI_AVAILABLE 0x2D
-#define ATM_CAUSE_RESOURCE_UNAVAILABLE 0x2F
-#define ATM_CAUSE_QOS_UNAVAILABLE 0x31
-#define ATM_CAUSE_USER_CELL_RATE_UNAVAILABLE 0x33
-#define ATM_CAUSE_BEARER_CAPABILITY_UNAUTHORIZED 0x39
-#define ATM_CAUSE_BEARER_CAPABILITY_UNAVAILABLE 0x3A
-#define ATM_CAUSE_OPTION_UNAVAILABLE 0x3F
-#define ATM_CAUSE_BEARER_CAPABILITY_UNIMPLEMENTED 0x41
-#define ATM_CAUSE_UNSUPPORTED_TRAFFIC_PARAMETERS 0x49
-#define ATM_CAUSE_INVALID_CALL_REFERENCE 0x51
-#define ATM_CAUSE_CHANNEL_NONEXISTENT 0x52
-#define ATM_CAUSE_INCOMPATIBLE_DESTINATION 0x58
-#define ATM_CAUSE_INVALID_ENDPOINT_REFERENCE 0x59
-#define ATM_CAUSE_INVALID_TRANSIT_NETWORK_SELECTION 0x5B
-#define ATM_CAUSE_TOO_MANY_PENDING_ADD_PARTY 0x5C
-#define ATM_CAUSE_AAL_PARAMETERS_UNSUPPORTED 0x5D
-#define ATM_CAUSE_MANDATORY_IE_MISSING 0x60
-#define ATM_CAUSE_UNIMPLEMENTED_MESSAGE_TYPE 0x61
-#define ATM_CAUSE_UNIMPLEMENTED_IE 0x63
-#define ATM_CAUSE_INVALID_IE_CONTENTS 0x64
-#define ATM_CAUSE_INVALID_STATE_FOR_MESSAGE 0x65
-#define ATM_CAUSE_RECOVERY_ON_TIMEOUT 0x66
-#define ATM_CAUSE_INCORRECT_MESSAGE_LENGTH 0x68
-#define ATM_CAUSE_PROTOCOL_ERROR 0x6F
-
-/* ATM_CAUSE_IE.Diagnostics constants */
-#define ATM_CAUSE_COND_UNKNOWN 0x00
-#define ATM_CAUSE_COND_PERMANENT 0x01
-#define ATM_CAUSE_COND_TRANSIENT 0x02
-#define ATM_CAUSE_REASON_USER 0x00
-#define ATM_CAUSE_REASON_IE_MISSING 0x04
-#define ATM_CAUSE_REASON_IE_INSUFFICIENT 0x08
-#define ATM_CAUSE_PU_PROVIDER 0x00
-#define ATM_CAUSE_PU_USER 0x08
-#define ATM_CAUSE_NA_NORMAL 0x00
-#define ATM_CAUSE_NA_ABNORMAL 0x04
-
-typedef struct _ATM_CAUSE_IE {
- UCHAR Location;
- UCHAR Cause;
- UCHAR DiagnosticsLength;
- UCHAR Diagnostics[4];
-} ATM_CAUSE_IE, *PATM_CAUSE_IE;
-
-
-typedef ULONG ATM_SERVICE_CATEGORY, *PATM_SERVICE_CATEGORY;
-
-/* ATM_FLOW_PARAMETERS.ServiceCategory constants */
-#define ATM_SERVICE_CATEGORY_CBR 1
-#define ATM_SERVICE_CATEGORY_VBR 2
-#define ATM_SERVICE_CATEGORY_UBR 4
-#define ATM_SERVICE_CATEGORY_ABR 8
-
-/* ATM_FLOW_PARAMETERS.Reserved1 constants */
-#define ATM_FLOW_PARAMS_RSVD1_MPP 0x01
-
-typedef struct _ATM_FLOW_PARAMETERS {
- ATM_SERVICE_CATEGORY ServiceCategory;
- ULONG AverageCellRate;
- ULONG PeakCellRate;
- ULONG MinimumCellRate;
- ULONG InitialCellRate;
- ULONG BurstLengthCells;
- ULONG MaxSduSize;
- ULONG TransientBufferExposure;
- ULONG CumulativeRMFixedRTT;
- UCHAR RateIncreaseFactor;
- UCHAR RateDecreaseFactor;
- USHORT ACRDecreaseTimeFactor;
- UCHAR MaximumCellsPerForwardRMCell;
- UCHAR MaximumForwardRMCellInterval;
- UCHAR CutoffDecreaseFactor;
- UCHAR Reserved1;
- ULONG MissingRMCellCount;
- ULONG Reserved2;
- ULONG Reserved3;
-} ATM_FLOW_PARAMETERS, *PATM_FLOW_PARAMETERS;
-
-typedef struct _ATM_VPIVCI {
- ULONG Vpi;
- ULONG Vci;
-} ATM_VPIVCI, *PATM_VPIVCI;
-
-typedef struct _ATM_MEDIA_PARAMETERS {
- ATM_VPIVCI ConnectionId;
- ATM_AAL_TYPE AALType;
- ULONG CellDelayVariationCLP0;
- ULONG CellDelayVariationCLP1;
- ULONG CellLossRatioCLP0;
- ULONG CellLossRatioCLP1;
- ULONG CellTransferDelayCLP0;
- ULONG CellTransferDelayCLP1;
- ULONG DefaultCLP;
- ATM_FLOW_PARAMETERS Transmit;
- ATM_FLOW_PARAMETERS Receive;
-} ATM_MEDIA_PARAMETERS, *PATM_MEDIA_PARAMETERS;
-
-typedef struct _ATM_PVC_SAP {
- ATM_BLLI_IE Blli;
- ATM_BHLI_IE Bhli;
-} ATM_PVC_SAP, *PATM_PVC_SAP;
-
-/* ATM_QOS_CLASS_IE constants */
-#define QOS_CLASS0 0x00
-#define QOS_CLASS1 0x01
-#define QOS_CLASS2 0x02
-#define QOS_CLASS3 0x03
-#define QOS_CLASS4 0x04
-
-typedef struct _ATM_QOS_CLASS_IE {
- UCHAR QOSClassForward;
- UCHAR QOSClassBackward;
-} ATM_QOS_CLASS_IE, *PATM_QOS_CLASS_IE;
-
-typedef struct _ATM_RAW_IE {
- ULONG RawIELength;
- ULONG RawIEType;
- UCHAR RawIEValue[1];
-} ATM_RAW_IE, *PATM_RAW_IE;
-
-typedef struct _ATM_SAP {
- ATM_BLLI_IE Blli;
- ATM_BHLI_IE Bhli;
- ULONG NumberOfAddresses;
- UCHAR Addresses[1];
-} ATM_SAP, *PATM_SAP;
-
-typedef struct _ATM_TRAFFIC_DESCRIPTOR {
- ULONG PeakCellRateCLP0;
- ULONG PeakCellRateCLP01;
- ULONG SustainableCellRateCLP0;
- ULONG SustainableCellRateCLP01;
- ULONG MaximumBurstSizeCLP0;
- ULONG MaximumBurstSizeCLP01;
- BOOLEAN BestEffort;
- BOOLEAN Tagging;
-} ATM_TRAFFIC_DESCRIPTOR, *PATM_TRAFFIC_DESCRIPTOR;
-
-typedef struct _ATM_TRAFFIC_DESCRIPTOR_IE {
- ATM_TRAFFIC_DESCRIPTOR ForwardTD;
- ATM_TRAFFIC_DESCRIPTOR BackwardTD;
- BOOLEAN BestEffort;
-} ATM_TRAFFIC_DESCRIPTOR_IE, *PATM_TRAFFIC_DESCRIPTOR_IE;
-
-/* ATM_TRANSIT_NETWORK_SELECTION_IE.TypeOfNetworkId constants */
-#define TNS_TYPE_NATIONAL 0x40
-
-/* ATM_TRANSIT_NETWORK_SELECTION_IE.NetworkIdPlan constants */
-#define TNS_PLAN_CARRIER_ID_CODE 0x01
-
-typedef struct _ATM_TRANSIT_NETWORK_SELECTION_IE {
- UCHAR TypeOfNetworkId;
- UCHAR NetworkIdPlan;
- UCHAR NetworkIdLength;
- UCHAR NetworkId[1];
-} ATM_TRANSIT_NETWORK_SELECTION_IE, *PATM_TRANSIT_NETWORK_SELECTION_IE;
-
-typedef struct _ATM_LIJ_CALLID_IE {
- ULONG Identifier;
-} ATM_LIJ_CALLID_IE, *PATM_LIJ_CALLID_IE;
-
-/* Q2931_ADD_PVC.Flags constants */
-#define CO_FLAG_SIGNALING_VC 0x00000001
-#define CO_FLAG_NO_DEST_SAP 0x00000002
-
-typedef struct _Q2931_ADD_PVC {
- ATM_ADDRESS CalledParty;
- ATM_ADDRESS CallingParty;
- ATM_VPIVCI ConnectionId;
- ATM_AAL_TYPE AALType;
- ATM_FLOW_PARAMETERS ForwardFP;
- ATM_FLOW_PARAMETERS BackwardFP;
- ULONG Flags;
- ATM_PVC_SAP LocalSap;
- ATM_PVC_SAP DestinationSap;
- BOOLEAN LIJIdPresent;
- ATM_LIJ_CALLID_IE LIJId;
-} Q2931_ADD_PVC, *PQ2931_ADD_PVC;
-
-typedef struct _Q2931_DELETE_PVC {
- ATM_VPIVCI ConnectionId;
-} Q2931_DELETE_PVC, *PQ2931_DELETE_PVC;
-
-typedef ATM_ADDRESS ATM_CALLED_PARTY_NUMBER_IE;
-typedef ATM_ADDRESS ATM_CALLED_PARTY_SUBADDRESS_IE;
-typedef ATM_ADDRESS ATM_CALLING_PARTY_SUBADDRESS_IE;
-
-typedef struct _Q2931_CALLMGR_PARAMETERS {
- ATM_ADDRESS CalledParty;
- ATM_ADDRESS CallingParty;
- ULONG InfoElementCount;
- UCHAR InfoElements[1];
-} Q2931_CALLMGR_PARAMETERS, *PQ2931_CALLMGR_PARAMETERS;
-
-typedef struct _ATM_VC_RATES_SUPPORTED {
- ULONG MinCellRate;
- ULONG MaxCellRate;
-} ATM_VC_RATES_SUPPORTED, *PATM_VC_RATES_SUPPORTED;
-
-typedef ULONG ATM_SERVICE_REGISTRY_TYPE;
-
-/* ATM_SERVICE_ADDRESS_LIST.ServiceRegistryType constants */
-#define ATM_SERVICE_REGISTRY_LECS 1
-#define ATM_SERVICE_REGISTRY_ANS 2
-
-typedef struct _ATM_SERVICE_ADDRESS_LIST {
- ATM_SERVICE_REGISTRY_TYPE ServiceRegistryType;
- ULONG NumberOfAddressesAvailable;
- ULONG NumberOfAddressesReturned;
- ATM_ADDRESS Address[1];
-} ATM_SERVICE_ADDRESS_LIST, *PATM_SERVICE_ADDRESS_LIST;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __ATM_H */
diff --git a/winsup/w32api/include/ddk/batclass.h b/winsup/w32api/include/ddk/batclass.h
deleted file mode 100644
index d92a9ed..0000000
--- a/winsup/w32api/include/ddk/batclass.h
+++ /dev/null
@@ -1,298 +0,0 @@
-/*
- * batclass.h
- *
- * Battery class driver interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __BATCLASS_H
-#define __BATCLASS_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-#if defined(_BATTERYCLASS_)
- #define BCLASSAPI DECLSPEC_EXPORT
-#else
- #define BCLASSAPI DECLSPEC_IMPORT
-#endif
-
-
-/* Battery device GUIDs */
-
-DEFINE_GUID(GUID_DEVICE_BATTERY,
- 0x72631e54L, 0x78A4, 0x11d0, 0xbc, 0xf7, 0x00, 0xaa, 0x00, 0xb7, 0xb3, 0x2a);
-
-DEFINE_GUID(BATTERY_STATUS_WMI_GUID,
- 0xfc4670d1, 0xebbf, 0x416e, 0x87, 0xce, 0x37, 0x4a, 0x4e, 0xbc, 0x11, 0x1a);
-
-DEFINE_GUID(BATTERY_RUNTIME_WMI_GUID,
- 0x535a3767, 0x1ac2, 0x49bc, 0xa0, 0x77, 0x3f, 0x7a, 0x02, 0xe4, 0x0a, 0xec);
-
-DEFINE_GUID(BATTERY_TEMPERATURE_WMI_GUID,
- 0x1a52a14d, 0xadce, 0x4a44, 0x9a, 0x3e, 0xc8, 0xd8, 0xf1, 0x5f, 0xf2, 0xc2);
-
-DEFINE_GUID(BATTERY_FULL_CHARGED_CAPACITY_WMI_GUID,
- 0x40b40565, 0x96f7, 0x4435, 0x86, 0x94, 0x97, 0xe0, 0xe4, 0x39, 0x59, 0x05);
-
-DEFINE_GUID(BATTERY_CYCLE_COUNT_WMI_GUID,
- 0xef98db24, 0x0014, 0x4c25, 0xa5, 0x0b, 0xc7, 0x24, 0xae, 0x5c, 0xd3, 0x71);
-
-DEFINE_GUID(BATTERY_STATIC_DATA_WMI_GUID,
- 0x05e1e463, 0xe4e2, 0x4ea9, 0x80, 0xcb, 0x9b, 0xd4, 0xb3, 0xca, 0x06, 0x55);
-
-DEFINE_GUID(BATTERY_STATUS_CHANGE_WMI_GUID,
- 0xcddfa0c3, 0x7c5b, 0x4e43, 0xa0, 0x34, 0x05, 0x9f, 0xa5, 0xb8, 0x43, 0x64);
-
-DEFINE_GUID(BATTERY_TAG_CHANGE_WMI_GUID,
- 0x5e1f6e19, 0x8786, 0x4d23, 0x94, 0xfc, 0x9e, 0x74, 0x6b, 0xd5, 0xd8, 0x88);
-
-
-/* BATTERY_INFORMATION.Capabilities constants */
-#define BATTERY_SET_CHARGE_SUPPORTED 0x00000001
-#define BATTERY_SET_DISCHARGE_SUPPORTED 0x00000002
-#define BATTERY_SET_RESUME_SUPPORTED 0x00000004
-#define BATTERY_IS_SHORT_TERM 0x20000000
-#define BATTERY_CAPACITY_RELATIVE 0x40000000
-#define BATTERY_SYSTEM_BATTERY 0x80000000
-
-typedef struct _BATTERY_INFORMATION {
- ULONG Capabilities;
- UCHAR Technology;
- UCHAR Reserved[3];
- UCHAR Chemistry[4];
- ULONG DesignedCapacity;
- ULONG FullChargedCapacity;
- ULONG DefaultAlert1;
- ULONG DefaultAlert2;
- ULONG CriticalBias;
- ULONG CycleCount;
-} BATTERY_INFORMATION, *PBATTERY_INFORMATION;
-
-typedef struct _BATTERY_MANUFACTURE_DATE {
- UCHAR Day;
- UCHAR Month;
- USHORT Year;
-} BATTERY_MANUFACTURE_DATE, *PBATTERY_MANUFACTURE_DATE;
-
-typedef struct _BATTERY_NOTIFY {
- ULONG PowerState;
- ULONG LowCapacity;
- ULONG HighCapacity;
-} BATTERY_NOTIFY, *PBATTERY_NOTIFY;
-
-/* BATTERY_STATUS.PowerState flags */
-#define BATTERY_POWER_ON_LINE 0x00000001
-#define BATTERY_DISCHARGING 0x00000002
-#define BATTERY_CHARGING 0x00000004
-#define BATTERY_CRITICAL 0x00000008
-
-/* BATTERY_STATUS.Voltage constant */
-#define BATTERY_UNKNOWN_VOLTAGE 0xFFFFFFFF
-
-/* BATTERY_STATUS.Rate constant */
-#define BATTERY_UNKNOWN_RATE 0x80000000
-
-typedef struct _BATTERY_STATUS {
- ULONG PowerState;
- ULONG Capacity;
- ULONG Voltage;
- LONG Rate;
-} BATTERY_STATUS, *PBATTERY_STATUS;
-
-/* BATTERY_INFORMATION.Capacity constants */
-#define BATTERY_UNKNOWN_CAPACITY 0xFFFFFFFF
-
-typedef enum _BATTERY_QUERY_INFORMATION_LEVEL {
- BatteryInformation = 0,
- BatteryGranularityInformation,
- BatteryTemperature,
- BatteryEstimatedTime,
- BatteryDeviceName,
- BatteryManufactureDate,
- BatteryManufactureName,
- BatteryUniqueID,
- BatterySerialNumber
-} BATTERY_QUERY_INFORMATION_LEVEL;
-
-/* BatteryEstimatedTime constant */
-#define BATTERY_UNKNOWN_TIME 0x80000000
-
-/* NTSTATUS possibly returned by BCLASS_QUERY_STATUS */
-#define BATTERY_TAG_INVALID 0
-
-typedef struct _BATTERY_QUERY_INFORMATION {
- ULONG BatteryTag;
- BATTERY_QUERY_INFORMATION_LEVEL InformationLevel;
- LONG AtRate;
-} BATTERY_QUERY_INFORMATION, *PBATTERY_QUERY_INFORMATION;
-
-typedef enum _BATTERY_SET_INFORMATION_LEVEL {
- BatteryCriticalBias = 0,
- BatteryCharge,
- BatteryDischarge
-} BATTERY_SET_INFORMATION_LEVEL;
-
-#define MAX_BATTERY_STRING_SIZE 128
-
-typedef struct _BATTERY_SET_INFORMATION {
- ULONG BatteryTag;
- BATTERY_SET_INFORMATION_LEVEL InformationLevel;
- UCHAR Buffer[1];
-} BATTERY_SET_INFORMATION, *PBATTERY_SET_INFORMATION;
-
-typedef struct _BATTERY_WAIT_STATUS {
- ULONG BatteryTag;
- ULONG Timeout;
- ULONG PowerState;
- ULONG LowCapacity;
- ULONG HighCapacity;
-} BATTERY_WAIT_STATUS, *PBATTERY_WAIT_STATUS;
-
-
-#define IOCTL_BATTERY_QUERY_TAG \
- CTL_CODE(FILE_DEVICE_BATTERY, 0x10, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_BATTERY_QUERY_INFORMATION \
- CTL_CODE(FILE_DEVICE_BATTERY, 0x11, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_BATTERY_SET_INFORMATION \
- CTL_CODE(FILE_DEVICE_BATTERY, 0x12, METHOD_BUFFERED, FILE_WRITE_ACCESS)
-
-#define IOCTL_BATTERY_QUERY_STATUS \
- CTL_CODE(FILE_DEVICE_BATTERY, 0x13, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-
-typedef NTSTATUS DDKAPI
-(*BCLASS_DISABLE_STATUS_NOTIFY)(
- /*IN*/ PVOID Context);
-
-typedef NTSTATUS DDKAPI
-(*BCLASS_QUERY_INFORMATION)(
- /*IN*/ PVOID Context,
- /*IN*/ ULONG BatteryTag,
- /*IN*/ BATTERY_QUERY_INFORMATION_LEVEL Level,
- /*IN*/ LONG AtRate /*OPTIONAL*/,
- /*OUT*/ PVOID Buffer,
- /*IN*/ ULONG BufferLength,
- /*OUT*/ PULONG ReturnedLength);
-
-typedef NTSTATUS DDKAPI
-(*BCLASS_QUERY_STATUS)(
- /*IN*/ PVOID Context,
- /*IN*/ ULONG BatteryTag,
- /*OUT*/ PBATTERY_STATUS BatteryStatus);
-
-typedef NTSTATUS DDKAPI
-(*BCLASS_QUERY_TAG)(
- /*IN*/ PVOID Context,
- /*OUT*/ PULONG BatteryTag);
-
-typedef NTSTATUS DDKAPI
-(*BCLASS_SET_INFORMATION)(
- /*IN*/ PVOID Context,
- /*IN*/ ULONG BatteryTag,
- /*IN*/ BATTERY_SET_INFORMATION_LEVEL Level,
- /*IN*/ PVOID Buffer /*OPTIONAL*/);
-
-typedef NTSTATUS DDKAPI
-(*BCLASS_SET_STATUS_NOTIFY)(
- /*IN*/ PVOID Context,
- /*IN*/ ULONG BatteryTag,
- /*IN*/ PBATTERY_NOTIFY BatteryNotify);
-
-
-typedef struct _BATTERY_MINIPORT_INFO {
- USHORT MajorVersion;
- USHORT MinorVersion;
- PVOID Context;
- BCLASS_QUERY_TAG QueryTag;
- BCLASS_QUERY_INFORMATION QueryInformation;
- BCLASS_SET_INFORMATION SetInformation;
- BCLASS_QUERY_STATUS QueryStatus;
- BCLASS_SET_STATUS_NOTIFY SetStatusNotify;
- BCLASS_DISABLE_STATUS_NOTIFY DisableStatusNotify;
- PDEVICE_OBJECT Pdo;
- PUNICODE_STRING DeviceName;
-} BATTERY_MINIPORT_INFO, *PBATTERY_MINIPORT_INFO;
-
-/* BATTERY_MINIPORT_INFO.XxxVersion */
-#define BATTERY_CLASS_MAJOR_VERSION 0x0001
-#define BATTERY_CLASS_MINOR_VERSION 0x0000
-
-
-BCLASSAPI
-NTSTATUS
-DDKAPI
-BatteryClassInitializeDevice(
- /*IN*/ PBATTERY_MINIPORT_INFO MiniportInfo,
- /*IN*/ PVOID *ClassData);
-
-BCLASSAPI
-NTSTATUS
-DDKAPI
-BatteryClassIoctl(
- /*IN*/ PVOID ClassData,
- /*IN*/ PIRP Irp);
-
-BCLASSAPI
-NTSTATUS
-DDKAPI
-BatteryClassQueryWmiDataBlock(
- /*IN*/ PVOID ClassData,
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ PIRP Irp,
- /*IN*/ ULONG GuidIndex,
- /*IN OUT*/ PULONG InstanceLengthArray,
- /*IN*/ ULONG OutBufferSize,
- /*OUT*/ PUCHAR Buffer);
-
-BCLASSAPI
-NTSTATUS
-DDKAPI
-BatteryClassStatusNotify(
- /*IN*/ PVOID ClassData);
-
-BCLASSAPI
-NTSTATUS
-DDKAPI
-BatteryClassSystemControl(
- /*IN*/ PVOID ClassData,
- /*IN*/ PWMILIB_CONTEXT WmiLibContext,
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ PIRP Irp,
- /*OUT*/ PSYSCTL_IRP_DISPOSITION Disposition);
-
-BCLASSAPI
-NTSTATUS
-DDKAPI
-BatteryClassUnload(
- /*IN*/ PVOID ClassData);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __BATCLASS_H */
diff --git a/winsup/w32api/include/ddk/cfg.h b/winsup/w32api/include/ddk/cfg.h
deleted file mode 100644
index 107bd4a..0000000
--- a/winsup/w32api/include/ddk/cfg.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * cfg.h
- *
- * PnP Configuration Manager shared definitions between user mode and kernel mode code
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __CFG_H
-#define __CFG_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define CM_PROB_NOT_CONFIGURED 0x00000001
-#define CM_PROB_DEVLOADER_FAILED 0x00000002
-#define CM_PROB_OUT_OF_MEMORY 0x00000003
-#define CM_PROB_ENTRY_IS_WRONG_TYPE 0x00000004
-#define CM_PROB_LACKED_ARBITRATOR 0x00000005
-#define CM_PROB_BOOT_CONFIG_CONFLICT 0x00000006
-#define CM_PROB_FAILED_FILTER 0x00000007
-#define CM_PROB_DEVLOADER_NOT_FOUND 0x00000008
-#define CM_PROB_INVALID_DATA 0x00000009
-#define CM_PROB_FAILED_START 0x0000000A
-#define CM_PROB_LIAR 0x0000000B
-#define CM_PROB_NORMAL_CONFLICT 0x0000000C
-#define CM_PROB_NOT_VERIFIED 0x0000000D
-#define CM_PROB_NEED_RESTART 0x0000000E
-#define CM_PROB_REENUMERATION 0x0000000F
-#define CM_PROB_PARTIAL_LOG_CONF 0x00000010
-#define CM_PROB_UNKNOWN_RESOURCE 0x00000011
-#define CM_PROB_REINSTALL 0x00000012
-#define CM_PROB_REGISTRY 0x00000013
-#define CM_PROB_VXDLDR 0x00000014
-#define CM_PROB_WILL_BE_REMOVED 0x00000015
-#define CM_PROB_DISABLED 0x00000016
-#define CM_PROB_DEVLOADER_NOT_READY 0x00000017
-#define CM_PROB_DEVICE_NOT_THERE 0x00000018
-#define CM_PROB_MOVED 0x00000019
-#define CM_PROB_TOO_EARLY 0x0000001A
-#define CM_PROB_NO_VALID_LOG_CONF 0x0000001B
-#define CM_PROB_FAILED_INSTALL 0x0000001C
-#define CM_PROB_HARDWARE_DISABLED 0x0000001D
-#define CM_PROB_CANT_SHARE_IRQ 0x0000001E
-#define CM_PROB_FAILED_ADD 0x0000001F
-#define CM_PROB_DISABLED_SERVICE 0x00000020
-#define CM_PROB_TRANSLATION_FAILED 0x00000021
-#define CM_PROB_NO_SOFTCONFIG 0x00000022
-#define CM_PROB_BIOS_TABLE 0x00000023
-#define CM_PROB_IRQ_TRANSLATION_FAILED 0x00000024
-#define CM_PROB_FAILED_DRIVER_ENTRY 0x00000025
-#define CM_PROB_DRIVER_FAILED_PRIOR_UNLOAD 0x00000026
-#define CM_PROB_DRIVER_FAILED_LOAD 0x00000027
-#define CM_PROB_DRIVER_SERVICE_KEY_INVALID 0x00000028
-#define CM_PROB_LEGACY_SERVICE_NO_DEVICES 0x00000029
-#define CM_PROB_DUPLICATE_DEVICE 0x0000002A
-#define CM_PROB_FAILED_POST_START 0x0000002B
-#define CM_PROB_HALTED 0x0000002C
-#define CM_PROB_PHANTOM 0x0000002D
-#define CM_PROB_SYSTEM_SHUTDOWN 0x0000002E
-#define CM_PROB_HELD_FOR_EJECT 0x0000002F
-#define CM_PROB_DRIVER_BLOCKED 0x00000030
-#define CM_PROB_REGISTRY_TOO_LARGE 0x00000031
-
-#define LCPRI_FORCECONFIG 0x00000000
-#define LCPRI_BOOTCONFIG 0x00000001
-#define LCPRI_DESIRED 0x00002000
-#define LCPRI_NORMAL 0x00003000
-#define LCPRI_LASTBESTCONFIG 0x00003FFF
-#define LCPRI_SUBOPTIMAL 0x00005000
-#define LCPRI_LASTSOFTCONFIG 0x00007FFF
-#define LCPRI_RESTART 0x00008000
-#define LCPRI_REBOOT 0x00009000
-#define LCPRI_POWEROFF 0x0000A000
-#define LCPRI_HARDRECONFIG 0x0000C000
-#define LCPRI_HARDWIRED 0x0000E000
-#define LCPRI_IMPOSSIBLE 0x0000F000
-#define LCPRI_DISABLED 0x0000FFFF
-#define MAX_LCPRI 0x0000FFFF
-
-#define DN_ROOT_ENUMERATED 0x00000001 /* Was enumerated by ROOT */
-#define DN_DRIVER_LOADED 0x00000002 /* Has Register_Device_Driver */
-#define DN_ENUM_LOADED 0x00000004 /* Has Register_Enumerator */
-#define DN_STARTED 0x00000008 /* Is currently configured */
-#define DN_MANUAL 0x00000010 /* Manually installed */
-#define DN_NEED_TO_ENUM 0x00000020 /* May need reenumeration */
-#define DN_NOT_FIRST_TIME 0x00000040 /* Has received a config */
-#define DN_HARDWARE_ENUM 0x00000080 /* Enum generates hardware ID */
-#define DN_LIAR 0x00000100 /* Lied about can reconfig once */
-#define DN_HAS_MARK 0x00000200 /* Not CM_Create_DevNode lately */
-#define DN_HAS_PROBLEM 0x00000400 /* Need device installer */
-#define DN_FILTERED 0x00000800 /* Is filtered */
-#define DN_MOVED 0x00001000 /* Has been moved */
-#define DN_DISABLEABLE 0x00002000 /* Can be rebalanced */
-#define DN_REMOVABLE 0x00004000 /* Can be removed */
-#define DN_PRIVATE_PROBLEM 0x00008000 /* Has a private problem */
-#define DN_MF_PARENT 0x00010000 /* Multi function parent */
-#define DN_MF_CHILD 0x00020000 /* Multi function child */
-#define DN_WILL_BE_REMOVED 0x00040000 /* Devnode is being removed */
-
-typedef enum _PNP_VETO_TYPE {
- PNP_VetoTypeUnknown,
- PNP_VetoLegacyDevice,
- PNP_VetoPendingClose,
- PNP_VetoWindowsApp,
- PNP_VetoWindowsService,
- PNP_VetoOutstandingOpen,
- PNP_VetoDevice,
- PNP_VetoDriver,
- PNP_VetoIllegalDeviceRequest,
- PNP_VetoInsufficientPower,
- PNP_VetoNonDisableable,
- PNP_VetoLegacyDriver
-} PNP_VETO_TYPE, *PPNP_VETO_TYPE;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __CFG_H */
diff --git a/winsup/w32api/include/ddk/cfgmgr32.h b/winsup/w32api/include/ddk/cfgmgr32.h
deleted file mode 100644
index 4595ce7..0000000
--- a/winsup/w32api/include/ddk/cfgmgr32.h
+++ /dev/null
@@ -1,1533 +0,0 @@
-/*
- * cfgmgr32.h
- *
- * PnP configuration manager
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __CFGMGR32_H
-#define __CFGMGR32_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-#if defined(_CFGMGR32_)
-#define CMAPI DECLSPEC_EXPORT
-#else
-#define CMAPI DECLSPEC_IMPORT
-#endif
-
-#include "cfg.h"
-
-#include <pshpack1.h>
-
-#define CR_SUCCESS 0x00000000
-#define CR_DEFAULT 0x00000001
-#define CR_OUT_OF_MEMORY 0x00000002
-#define CR_INVALID_POINTER 0x00000003
-#define CR_INVALID_FLAG 0x00000004
-#define CR_INVALID_DEVNODE 0x00000005
-#define CR_INVALID_DEVINST CR_INVALID_DEVNODE
-#define CR_INVALID_RES_DES 0x00000006
-#define CR_INVALID_LOG_CONF 0x00000007
-#define CR_INVALID_ARBITRATOR 0x00000008
-#define CR_INVALID_NODELIST 0x00000009
-#define CR_DEVNODE_HAS_REQS 0x0000000A
-#define CR_DEVINST_HAS_REQS CR_DEVNODE_HAS_REQS
-#define CR_INVALID_RESOURCEID 0x0000000B
-#define CR_DLVXD_NOT_FOUND 0x0000000C
-#define CR_NO_SUCH_DEVNODE 0x0000000D
-#define CR_NO_SUCH_DEVINST CR_NO_SUCH_DEVNODE
-#define CR_NO_MORE_LOG_CONF 0x0000000E
-#define CR_NO_MORE_RES_DES 0x0000000F
-#define CR_ALREADY_SUCH_DEVNODE 0x00000010
-#define CR_ALREADY_SUCH_DEVINST CR_ALREADY_SUCH_DEVNODE
-#define CR_INVALID_RANGE_LIST 0x00000011
-#define CR_INVALID_RANGE 0x00000012
-#define CR_FAILURE 0x00000013
-#define CR_NO_SUCH_LOGICAL_DEV 0x00000014
-#define CR_CREATE_BLOCKED 0x00000015
-#define CR_NOT_SYSTEM_VM 0x00000016
-#define CR_REMOVE_VETOED 0x00000017
-#define CR_APM_VETOED 0x00000018
-#define CR_INVALID_LOAD_TYPE 0x00000019
-#define CR_BUFFER_SMALL 0x0000001A
-#define CR_NO_ARBITRATOR 0x0000001B
-#define CR_NO_REGISTRY_HANDLE 0x0000001C
-#define CR_REGISTRY_ERROR 0x0000001D
-#define CR_INVALID_DEVICE_ID 0x0000001E
-#define CR_INVALID_DATA 0x0000001F
-#define CR_INVALID_API 0x00000020
-#define CR_DEVLOADER_NOT_READY 0x00000021
-#define CR_NEED_RESTART 0x00000022
-#define CR_NO_MORE_HW_PROFILES 0x00000023
-#define CR_DEVICE_NOT_THERE 0x00000024
-#define CR_NO_SUCH_VALUE 0x00000025
-#define CR_WRONG_TYPE 0x00000026
-#define CR_INVALID_PRIORITY 0x00000027
-#define CR_NOT_DISABLEABLE 0x00000028
-#define CR_FREE_RESOURCES 0x00000029
-#define CR_QUERY_VETOED 0x0000002A
-#define CR_CANT_SHARE_IRQ 0x0000002B
-#define CR_NO_DEPENDENT 0x0000002C
-#define CR_SAME_RESOURCES 0x0000002D
-#define CR_NO_SUCH_REGISTRY_KEY 0x0000002E
-#define CR_INVALID_MACHINENAME 0x0000002F
-#define CR_REMOTE_COMM_FAILURE 0x00000030
-#define CR_MACHINE_UNAVAILABLE 0x00000031
-#define CR_NO_CM_SERVICES 0x00000032
-#define CR_ACCESS_DENIED 0x00000033
-#define CR_CALL_NOT_IMPLEMENTED 0x00000034
-#define CR_INVALID_PROPERTY 0x00000035
-#define CR_DEVICE_INTERFACE_ACTIVE 0x00000036
-#define CR_NO_SUCH_DEVICE_INTERFACE 0x00000037
-#define CR_INVALID_REFERENCE_STRING 0x00000038
-#define CR_INVALID_CONFLICT_LIST 0x00000039
-#define CR_INVALID_INDEX 0x0000003A
-#define CR_INVALID_STRUCTURE_SIZE 0x0000003B
-
-
-typedef DWORD RETURN_TYPE;
-typedef RETURN_TYPE CONFIGRET;
-
-typedef HANDLE HMACHINE;
-typedef HMACHINE *PHMACHINE;
-
-typedef DWORD_PTR RES_DES;
-typedef RES_DES *PRES_DES;
-
-typedef DWORD_PTR RANGE_ELEMENT;
-typedef RANGE_ELEMENT *PRANGE_ELEMENT;
-
-typedef ULONG_PTR CONFLICT_LIST;
-typedef CONFLICT_LIST *PCONFLICT_LIST;
-
-typedef DWORD_PTR LOG_CONF;
-typedef LOG_CONF *PLOG_CONF;
-
-typedef ULONG PRIORITY;
-typedef PRIORITY *PPRIORITY;
-
-typedef DWORD_PTR RANGE_LIST;
-typedef RANGE_LIST *PRANGE_LIST;
-
-typedef DWORD DEVNODE, DEVINST;
-typedef DEVNODE *PDEVNODE, *PDEVINST;
-
-typedef CHAR *DEVNODEID_A, *DEVINSTID_A;
-typedef WCHAR *DEVNODEID_W, *DEVINSTID_W;
-
-#ifdef UNICODE
-typedef DEVNODEID_W DEVNODEID;
-typedef DEVINSTID_W DEVINSTID;
-#else
-typedef DEVNODEID_A DEVNODEID;
-typedef DEVINSTID_A DEVINSTID;
-#endif
-
-typedef ULONG REGDISPOSITION;
-
-typedef ULONG RESOURCEID;
-typedef RESOURCEID *PRESOURCEID;
-
-#define CM_RESDES_WIDTH_DEFAULT 0x00000000
-#define CM_RESDES_WIDTH_32 0x00000001
-#define CM_RESDES_WIDTH_64 0x00000002
-#define CM_RESDES_WIDTH_BITS 0x00000003
-
-
-#define MAX_CONFIG_VALUE 9999
-#define MAX_INSTANCE_VALUE 9999
-
-#define MAX_DEVICE_ID_LEN 200
-#define MAX_DEVNODE_ID_LEN MAX_DEVICE_ID_LEN
-
-#define MAX_CLASS_NAME_LEN 32
-#define MAX_GUID_STRING_LEN 39
-#define MAX_PROFILE_LEN 80
-
-
-#define ResType_All 0x00000000
-#define ResType_None 0x00000000
-#define ResType_Mem 0x00000001
-#define ResType_IO 0x00000002
-#define ResType_DMA 0x00000003
-#define ResType_IRQ 0x00000004
-#define ResType_DoNotUse 0x00000005
-#define ResType_BusNumber 0x00000006
-#define ResType_MAX 0x00000006
-#define ResType_Ignored_Bit 0x00008000
-#define ResType_ClassSpecific 0x0000FFFF
-#define ResType_Reserved 0x00008000
-#define ResType_DevicePrivate 0x00008001
-#define ResType_PcCardConfig 0x00008002
-#define ResType_MfCardConfig 0x00008003
-
-#define CM_GETIDLIST_FILTER_NONE 0x00000000
-#define CM_GETIDLIST_FILTER_ENUMERATOR 0x00000001
-#define CM_GETIDLIST_FILTER_SERVICE 0x00000002
-#define CM_GETIDLIST_FILTER_EJECTRELATIONS 0x00000004
-#define CM_GETIDLIST_FILTER_REMOVALRELATIONS 0x00000008
-#define CM_GETIDLIST_FILTER_POWERRELATIONS 0x00000010
-#define CM_GETIDLIST_FILTER_BUSRELATIONS 0x00000020
-#define CM_GETIDLIST_DONOTGENERATE 0x10000040
-#define CM_GETIDLIST_FILTER_BITS 0x1000007F
-
-#define CM_GET_DEVICE_INTERFACE_LIST_PRESENT 0x00000000
-#define CM_GET_DEVICE_INTERFACE_LIST_ALL_DEVICES 0x00000001
-#define CM_GET_DEVICE_INTERFACE_LIST_BITS 0x00000001
-
-
-typedef struct BusNumber_Des_s {
- DWORD BUSD_Count;
- DWORD BUSD_Type;
- DWORD BUSD_Flags;
- ULONG BUSD_Alloc_Base;
- ULONG BUSD_Alloc_End;
-} BUSNUMBER_DES, *PBUSNUMBER_DES;
-
-typedef struct BusNumber_Range_s {
- ULONG BUSR_Min;
- ULONG BUSR_Max;
- ULONG BUSR_nBusNumbers;
- ULONG BUSR_Flags;
-} BUSNUMBER_RANGE, *PBUSNUMBER_RANGE;
-
-#define BusNumberType_Range sizeof(BUSNUMBER_RANGE)
-
-typedef struct BusNumber_Resource_s {
- BUSNUMBER_DES BusNumber_Header;
- BUSNUMBER_RANGE BusNumber_Data[ANYSIZE_ARRAY];
-} BUSNUMBER_RESOURCE, *PBUSNUMBER_RESOURCE;
-
-typedef struct CS_Des_s {
- DWORD CSD_SignatureLength;
- DWORD CSD_LegacyDataOffset;
- DWORD CSD_LegacyDataSize;
- DWORD CSD_Flags;
- GUID CSD_ClassGuid;
- BYTE CSD_Signature[ANYSIZE_ARRAY];
-} CS_DES, *PCS_DES;
-
-typedef struct CS_Resource_s {
- CS_DES CS_Header;
-} CS_RESOURCE, *PCS_RESOURCE;
-
-typedef struct DevPrivate_Des_s {
- DWORD PD_Count;
- DWORD PD_Type;
- DWORD PD_Data1;
- DWORD PD_Data2;
- DWORD PD_Data3;
- DWORD PD_Flags;
-} DEVPRIVATE_DES, *PDEVPRIVATE_DES;
-
-typedef struct DevPrivate_Range_s {
- DWORD PR_Data1;
- DWORD PR_Data2;
- DWORD PR_Data3;
-} DEVPRIVATE_RANGE, *PDEVPRIVATE_RANGE;
-
-#define PType_Range sizeof(DEVPRIVATE_RANGE)
-
-typedef struct DevPrivate_Resource_s {
- DEVPRIVATE_DES PRV_Header;
- DEVPRIVATE_RANGE PRV_Data[ANYSIZE_ARRAY];
-} DEVPRIVATE_RESOURCE, *PDEVPRIVATE_RESOURCE;
-
-/* DMA_DES.DD_Flags constants and masks */
-#define mDD_Width 0x3
-#define fDD_BYTE 0x0
-#define fDD_WORD 0x1
-#define fDD_DWORD 0x2
-#define fDD_BYTE_AND_WORD 0x3
-
-#define mDD_BusMaster 0x4
-#define fDD_NoBusMaster 0x0
-#define fDD_BusMaster 0x4
-
-#define mDD_Type 0x18
-#define fDD_TypeStandard 0x00
-#define fDD_TypeA 0x08
-#define fDD_TypeB 0x10
-#define fDD_TypeF 0x18
-
-typedef struct DMA_Des_s {
- DWORD DD_Count;
- DWORD DD_Type;
- DWORD DD_Flags;
- ULONG DD_Alloc_Chan;
-} DMA_DES, *PDMA_DES;
-
-typedef struct DMA_Range_s {
- ULONG DR_Min;
- ULONG DR_Max;
- ULONG DR_Flags;
-} DMA_RANGE, *PDMA_RANGE;
-
-#define DType_Range sizeof(DMA_RANGE)
-
-typedef struct DMA_Resource_s {
- DMA_DES DMA_Header;
- DMA_RANGE DMA_Data[ANYSIZE_ARRAY];
-} DMA_RESOURCE, *PDMA_RESOURCE;
-
-/* IO_DES.Type constants and masks */
-#define fIOD_PortType 0x1
-#define fIOD_Memory 0x0
-#define fIOD_IO 0x1
-#define fIOD_DECODE 0x00fc
-#define fIOD_10_BIT_DECODE 0x0004
-#define fIOD_12_BIT_DECODE 0x0008
-#define fIOD_16_BIT_DECODE 0x0010
-#define fIOD_POSITIVE_DECODE 0x0020
-#define fIOD_PASSIVE_DECODE 0x0040
-#define fIOD_WINDOW_DECODE 0x0080
-
-typedef struct IO_Des_s {
- DWORD IOD_Count;
- DWORD IOD_Type;
- DWORDLONG IOD_Alloc_Base;
- DWORDLONG IOD_Alloc_End;
- DWORD IOD_DesFlags;
-} IO_DES, *PIO_DES;
-
-/* IO_RANGE.IOR_Alias constants */
-#define IO_ALIAS_10_BIT_DECODE 0x00000004
-#define IO_ALIAS_12_BIT_DECODE 0x00000010
-#define IO_ALIAS_16_BIT_DECODE 0x00000000
-#define IO_ALIAS_POSITIVE_DECODE 0x000000FF
-
-typedef struct IO_Range_s {
- DWORDLONG IOR_Align;
- DWORD IOR_nPorts;
- DWORDLONG IOR_Min;
- DWORDLONG IOR_Max;
- DWORD IOR_RangeFlags;
- DWORDLONG IOR_Alias;
-} IO_RANGE, *PIO_RANGE;
-
-#define IOType_Range sizeof(IO_RANGE)
-
-typedef struct IO_Resource_s {
- IO_DES IO_Header;
- IO_RANGE IO_Data[ANYSIZE_ARRAY];
-} IO_RESOURCE, *PIO_RESOURCE;
-
-/* IRQ_DES.IRQD_flags constants */
-#define mIRQD_Share 0x1
-#define fIRQD_Exclusive 0x0
-#define fIRQD_Share 0x1
-
-#define fIRQD_Share_Bit 0
-#define fIRQD_Level_Bit 1
-
-#define mIRQD_Edge_Level 0x2
-#define fIRQD_Level 0x0
-#define fIRQD_Edge 0x2
-
-typedef struct IRQ_Des_32_s {
- DWORD IRQD_Count;
- DWORD IRQD_Type;
- DWORD IRQD_Flags;
- ULONG IRQD_Alloc_Num;
- ULONG32 IRQD_Affinity;
-} IRQ_DES_32, *PIRQ_DES_32;
-
-typedef struct IRQ_Des_64_s {
- DWORD IRQD_Count;
- DWORD IRQD_Type;
- DWORD IRQD_Flags;
- ULONG IRQD_Alloc_Num;
- ULONG64 IRQD_Affinity;
-} IRQ_DES_64, *PIRQ_DES_64;
-
-#ifdef _WIN64
-typedef IRQ_DES_64 IRQ_DES;
-typedef PIRQ_DES_64 PIRQ_DES;
-#else
-typedef IRQ_DES_32 IRQ_DES;
-typedef PIRQ_DES_32 PIRQ_DES;
-#endif
-
-typedef struct IRQ_Range_s {
- ULONG IRQR_Min;
- ULONG IRQR_Max;
- ULONG IRQR_Flags;
-} IRQ_RANGE, *PIRQ_RANGE;
-
-#define IRQType_Range sizeof(IRQ_RANGE)
-
-typedef struct IRQ_Resource_s {
- IRQ_DES IRQ_Header;
- IRQ_RANGE IRQ_Data[ANYSIZE_ARRAY];
-} IRQ_RESOURCE, *PIRQ_RESOURCE;
-
-/* MEM_DES.MD_Flags constants */
-#define mMD_MemoryType 0x1
-#define fMD_MemoryType mMD_MemoryType
-#define fMD_ROM 0x0
-#define fMD_RAM 0x1
-
-#define mMD_32_24 0x2
-#define fMD_32_24 mMD_32_24
-#define fMD_24 0x0
-#define fMD_32 0x2
-
-#define mMD_Prefetchable 0x4
-#define fMD_Prefetchable mMD_Prefetchable
-#define fMD_Pref mMD_Prefetchable
-#define fMD_PrefetchDisallowed 0x0
-#define fMD_PrefetchAllowed 0x4
-
-#define mMD_Readable 0x8
-#define fMD_Readable mMD_Readable
-#define fMD_ReadAllowed 0x0
-#define fMD_ReadDisallowed 0x8
-
-#define mMD_CombinedWrite 0x10
-#define fMD_CombinedWrite mMD_CombinedWrite
-#define fMD_CombinedWriteDisallowed 0x0
-#define fMD_CombinedWriteAllowed 0x10
-
-#define mMD_Cacheable 0x20
-#define fMD_NonCacheable 0x0
-#define fMD_Cacheable 0x20
-
-typedef struct Mem_Des_s {
- DWORD MD_Count;
- DWORD MD_Type;
- DWORDLONG MD_Alloc_Base;
- DWORDLONG MD_Alloc_End;
- DWORD MD_Flags;
- DWORD MD_Reserved;
-} MEM_DES, *PMEM_DES;
-
-typedef struct Mem_Range_s {
- DWORDLONG MR_Align;
- ULONG MR_nBytes;
- DWORDLONG MR_Min;
- DWORDLONG MR_Max;
- DWORD MR_Flags;
- DWORD MR_Reserved;
-} MEM_RANGE, *PMEM_RANGE;
-
-#define MType_Range sizeof(MEM_RANGE)
-
-typedef struct Mem_Resource_s {
- MEM_DES MEM_Header;
- MEM_RANGE MEM_Data[ANYSIZE_ARRAY];
-} MEM_RESOURCE, *PMEM_RESOURCE;
-
-/* MFCARD_DES.PMF_Flags constants */
-#define fPMF_AUDIO_ENABLE 0x8
-#define mPMF_AUDIO_ENABLE fPMF_AUDIO_ENABLE
-
-typedef struct MfCard_Des_s {
- DWORD PMF_Count;
- DWORD PMF_Type;
- DWORD PMF_Flags;
- BYTE PMF_ConfigOptions;
- BYTE PMF_IoResourceIndex;
- BYTE PMF_Reserved[2];
- DWORD PMF_ConfigRegisterBase;
-} MFCARD_DES, *PMFCARD_DES;
-
-typedef struct MfCard_Resource_s {
- MFCARD_DES MfCard_Header;
-} MFCARD_RESOURCE, *PMFCARD_RESOURCE;
-
-/* PCCARD_DES.PCD_Flags constants */
-
-typedef struct PcCard_Des_s {
- DWORD PCD_Count;
- DWORD PCD_Type;
- DWORD PCD_Flags;
- BYTE PCD_ConfigIndex;
- BYTE PCD_Reserved[3];
- DWORD PCD_MemoryCardBase1;
- DWORD PCD_MemoryCardBase2;
-} PCCARD_DES, *PPCCARD_DES;
-
-#define mPCD_IO_8_16 0x1
-#define fPCD_IO_8 0x0
-#define fPCD_IO_16 0x1
-#define mPCD_MEM_8_16 0x2
-#define fPCD_MEM_8 0x0
-#define fPCD_MEM_16 0x2
-#define mPCD_MEM_A_C 0xC
-#define fPCD_MEM1_A 0x4
-#define fPCD_MEM2_A 0x8
-#define fPCD_IO_ZW_8 0x10
-#define fPCD_IO_SRC_16 0x20
-#define fPCD_IO_WS_16 0x40
-#define mPCD_MEM_WS 0x300
-#define fPCD_MEM_WS_ONE 0x100
-#define fPCD_MEM_WS_TWO 0x200
-#define fPCD_MEM_WS_THREE 0x300
-
-#define fPCD_MEM_A 0x4
-
-#define fPCD_ATTRIBUTES_PER_WINDOW 0x8000
-
-#define fPCD_IO1_16 0x00010000
-#define fPCD_IO1_ZW_8 0x00020000
-#define fPCD_IO1_SRC_16 0x00040000
-#define fPCD_IO1_WS_16 0x00080000
-
-#define fPCD_IO2_16 0x00100000
-#define fPCD_IO2_ZW_8 0x00200000
-#define fPCD_IO2_SRC_16 0x00400000
-#define fPCD_IO2_WS_16 0x00800000
-
-#define mPCD_MEM1_WS 0x03000000
-#define fPCD_MEM1_WS_ONE 0x01000000
-#define fPCD_MEM1_WS_TWO 0x02000000
-#define fPCD_MEM1_WS_THREE 0x03000000
-#define fPCD_MEM1_16 0x04000000
-
-#define mPCD_MEM2_WS 0x30000000
-#define fPCD_MEM2_WS_ONE 0x10000000
-#define fPCD_MEM2_WS_TWO 0x20000000
-#define fPCD_MEM2_WS_THREE 0x30000000
-#define fPCD_MEM2_16 0x40000000
-
-#define PCD_MAX_MEMORY 2
-#define PCD_MAX_IO 2
-
-typedef struct PcCard_Resource_s {
- PCCARD_DES PcCard_Header;
-} PCCARD_RESOURCE, *PPCCARD_RESOURCE;
-
-
-/* CONFLICT_DETAILS.CD.ulMask constants */
-#define CM_CDMASK_DEVINST 0x00000001
-#define CM_CDMASK_RESDES 0x00000002
-#define CM_CDMASK_FLAGS 0x00000004
-#define CM_CDMASK_DESCRIPTION 0x00000008
-#define CM_CDMASK_VALID 0x0000000F
-
-/* CONFLICT_DETAILS.CD.ulFlags constants */
-#define CM_CDFLAGS_DRIVER 0x00000001
-#define CM_CDFLAGS_ROOT_OWNED 0x00000002
-#define CM_CDFLAGS_RESERVED 0x00000004
-
-typedef struct _CONFLICT_DETAILS_A {
- ULONG CD_ulSize;
- ULONG CD_ulMask;
- DEVINST CD_dnDevInst;
- RES_DES CD_rdResDes;
- ULONG CD_ulFlags;
- CHAR CD_szDescription[MAX_PATH];
-} CONFLICT_DETAILS_A , *PCONFLICT_DETAILS_A;
-
-typedef struct _CONFLICT_DETAILS_W {
- ULONG CD_ulSize;
- ULONG CD_ulMask;
- DEVINST CD_dnDevInst;
- RES_DES CD_rdResDes;
- ULONG CD_ulFlags;
- WCHAR CD_szDescription[MAX_PATH];
-} CONFLICT_DETAILS_W , *PCONFLICT_DETAILS_W;
-
-#ifdef UNICODE
-typedef CONFLICT_DETAILS_W CONFLICT_DETAILS;
-typedef PCONFLICT_DETAILS_W PCONFLICT_DETAILS;
-#else
-typedef CONFLICT_DETAILS_A CONFLICT_DETAILS;
-typedef PCONFLICT_DETAILS_A PCONFLICT_DETAILS;
-#endif
-
-
-
-/* CM_Add_Empty_Log_Conf.ulFlags constants */
-#define PRIORITY_EQUAL_FIRST 0x00000008
-#define PRIORITY_EQUAL_LAST 0x00000000
-#define PRIORITY_BIT 0x00000008
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Add_Empty_Log_Conf(
- /*OUT*/ PLOG_CONF plcLogConf,
- /*IN*/ DEVINST dnDevInst,
- /*IN*/ PRIORITY Priority,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Add_Empty_Log_Conf_Ex(
- /*OUT*/ PLOG_CONF plcLogConf,
- /*IN*/ DEVINST dnDevInst,
- /*IN*/ PRIORITY Priority,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-/* CM_Add_ID.ulFlags constants */
-#define CM_ADD_ID_HARDWARE 0x00000000
-#define CM_ADD_ID_COMPATIBLE 0x00000001
-#define CM_ADD_ID_BITS 0x00000001
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Add_IDA(
- /*IN*/ DEVINST dnDevInst,
- /*IN*/ PSTR pszID,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Add_ID_ExA(
- /*IN*/ DEVINST dnDevInst,
- /*IN*/ PSTR pszID,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Add_ID_ExW(
- /*IN*/ DEVINST dnDevInst,
- /*IN*/ PWSTR pszID,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Add_IDW(
- /*IN*/ DEVINST dnDevInst,
- /*IN*/ PWSTR pszID,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-#ifdef UNICODE
-#define CM_Add_ID CM_Add_IDW
-#define CM_Add_ID_Ex CM_Add_ID_ExW
-#else
-#define CM_Add_ID CM_Add_IDA
-#define CM_Add_ID_Ex CM_Add_ID_ExA
-#endif /* UNICODE */
-
-/* FIXME: Obsolete CM_Add_Range */
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Add_Res_Des(
- /*OUT*/ PRES_DES prdResDes,
- /*IN*/ LOG_CONF lcLogConf,
- /*IN*/ RESOURCEID ResourceID,
- /*IN*/ PCVOID ResourceData,
- /*IN*/ ULONG ResourceLen,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Add_Res_Des_Ex(
- /*OUT*/ PRES_DES prdResDes,
- /*IN*/ LOG_CONF lcLogConf,
- /*IN*/ RESOURCEID ResourceID,
- /*IN*/ PCVOID ResourceData,
- /*IN*/ ULONG ResourceLen,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Connect_MachineA(
- /*IN*/ PCSTR UNCServerName,
- /*OUT*/ PHMACHINE phMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Connect_MachineW(
- /*IN*/ PCWSTR UNCServerName,
- /*OUT*/ PHMACHINE phMachine);
-
-#ifdef UNICODE
-#define CM_Connect_Machine CM_Connect_MachineW
-#else
-#define CM_Connect_Machine CM_Connect_MachineA
-#endif /* UNICODE */
-
-/* FIXME: Obsolete CM_Create_DevNode */
-/* FIXME: Obsolete CM_Create_DevNodeEx */
-/* FIXME: Obsolete CM_Create_Range_List */
-/* FIXME: Obsolete CM_Delete_Class_Key */
-/* FIXME: Obsolete CM_Delete_Class_Key_Ex */
-/* FIXME: Obsolete CM_Delete_DevNode_Key */
-/* FIXME: Obsolete CM_Delete_DevNode_Key_Ex */
-/* FIXME: Obsolete CM_Delete_Range */
-/* FIXME: Obsolete CM_Detected_Resource_Conflict */
-/* FIXME: Obsolete CM_Detected_Resource_Conflict_Ex */
-/* FIXME: Obsolete CM_Disable_DevNode */
-/* FIXME: Obsolete CM_Disable_DevNodeEx */
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Disconnect_Machine(
- /*IN*/ HMACHINE hMachine);
-
-/* FIXME: Obsolete CM_Enable_DevNode */
-/* FIXME: Obsolete CM_Enable_DevNodeEx */
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Enumerate_Classes(
- /*IN*/ ULONG ulClassIndex,
- /*OUT*/ LPGUID ClassGuid,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Enumerate_Classes_Ex(
- /*IN*/ ULONG ulClassIndex,
- /*OUT*/ LPGUID ClassGuid,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Enumerate_EnumeratorsA(
- /*IN*/ ULONG ulEnumIndex,
- /*OUT*/ PCHAR Buffer,
- /*IN OUT*/ PULONG pulLength,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Enumerate_Enumerators_ExA(
- /*IN*/ ULONG ulEnumIndex,
- /*OUT*/ PCHAR Buffer,
- /*IN OUT*/ PULONG pulLength,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Enumerate_Enumerators_ExW(
- /*IN*/ ULONG ulEnumIndex,
- /*OUT*/ PWCHAR Buffer,
- /*IN OUT*/ PULONG pulLength,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Enumerate_EnumeratorsW(
- /*IN*/ ULONG ulEnumIndex,
- /*OUT*/ PWCHAR Buffer,
- /*IN OUT*/ PULONG pulLength,
- /*IN*/ ULONG ulFlags);
-
-#ifdef UNICODE
-#define CM_Enumerate_Enumerators CM_Enumerate_EnumeratorsW
-#define CM_Enumerate_Enumerators_Ex CM_Enumerate_Enumerators_ExW
-#else
-#define CM_Enumerate_Enumerators CM_Enumerate_EnumeratorsA
-#define CM_Enumerate_Enumerators_Ex CM_Enumerate_Enumerators_ExW
-#endif /* UNICODE */
-
-/* FIXME: Obsolete CM_Find_Range */
-/* FIXME: Obsolete CM_First_Range */
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Free_Log_Conf(
- /*IN*/ LOG_CONF lcLogConfToBeFreed,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Free_Log_Conf_Ex(
- /*IN*/ LOG_CONF lcLogConfToBeFreed,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Free_Log_Conf_Handle(
- /*IN*/ LOG_CONF lcLogConf);
-
-/* FIXME: Obsolete CM_Free_Range_List */
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Free_Res_Des(
- /*OUT*/ PRES_DES prdResDes,
- /*IN*/ RES_DES rdResDes,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Free_Res_Des_Ex(
- /*OUT*/ PRES_DES prdResDes,
- /*IN*/ RES_DES rdResDes,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Free_Res_Des_Handle(
- /*IN*/ RES_DES rdResDes);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Free_Resource_Conflict_Handle(
- /*IN*/ CONFLICT_LIST clConflictList);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Child(
- /*OUT*/ PDEVINST pdnDevInst,
- /*IN*/ DEVINST dnDevInst,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Child_Ex(
- /*OUT*/ PDEVINST pdnDevInst,
- /*IN*/ DEVINST dnDevInst,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-/* FIXME: Obsolete CM_Get_Class_Name */
-/* FIXME: Obsolete CM_Get_Class_Name_Ex */
-/* FIXME: Obsolete CM_Get_Class_Key_Name */
-/* FIXME: Obsolete CM_Get_Class_Key_Name_Ex */
-/* FIXME: Obsolete CM_Get_Class_Registry_Property */
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Depth(
- /*OUT*/ PULONG pulDepth,
- /*IN*/ DEVINST dnDevInst,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Depth_Ex(
- /*OUT*/ PULONG pulDepth,
- /*IN*/ DEVINST dnDevInst,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Device_IDA(
- /*IN*/ DEVINST dnDevInst,
- /*OUT*/ PCHAR Buffer,
- /*IN*/ ULONG BufferLen,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Device_ID_ExA(
- /*IN*/ DEVINST dnDevInst,
- /*OUT*/ PCHAR Buffer,
- /*IN*/ ULONG BufferLen,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Device_ID_ExW(
- /*IN*/ DEVINST dnDevInst,
- /*OUT*/ PWCHAR Buffer,
- /*IN*/ ULONG BufferLen,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Device_IDW(
- /*IN*/ DEVINST dnDevInst,
- /*OUT*/ PWCHAR Buffer,
- /*IN*/ ULONG BufferLen,
- /*IN*/ ULONG ulFlags);
-
-#ifdef UNICODE
-#define CM_Get_Device_ID CM_Get_Device_IDW
-#define CM_Get_Device_ID_Ex CM_Get_Device_ID_ExW
-#else
-#define CM_Get_Device_ID CM_Get_Device_IDA
-#define CM_Get_Device_ID_Ex CM_Get_Device_ID_ExW
-#endif /* UNICODE */
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Device_ID_ListA(
- /*IN*/ PCSTR pszFilter, /*OPTIONAL*/
- /*OUT*/ PCHAR Buffer,
- /*IN*/ ULONG BufferLen,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Device_ID_List_ExA(
- /*IN*/ PCSTR pszFilter, /*OPTIONAL*/
- /*OUT*/ PCHAR Buffer,
- /*IN*/ ULONG BufferLen,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Device_ID_List_ExW(
- /*IN*/ PCWSTR pszFilter, /*OPTIONAL*/
- /*OUT*/ PWCHAR Buffer,
- /*IN*/ ULONG BufferLen,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Device_ID_ListW(
- /*IN*/ PCWSTR pszFilter, /*OPTIONAL*/
- /*OUT*/ PWCHAR Buffer,
- /*IN*/ ULONG BufferLen,
- /*IN*/ ULONG ulFlags);
-
-#ifdef UNICODE
-#define CM_Get_Device_ID_List CM_Get_Device_ID_ListW
-#define CM_Get_Device_ID_List_Ex CM_Get_Device_ID_List_ExW
-#else
-#define CM_Get_Device_ID_List CM_Get_Device_ID_ListA
-#define CM_Get_Device_ID_List_Ex CM_Get_Device_ID_List_ExA
-#endif /* UNICODE */
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Device_ID_List_SizeA(
- /*OUT*/ PULONG pulLen,
- /*IN*/ PCSTR pszFilter, /*OPTIONAL*/
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Device_ID_List_Size_ExA(
- /*OUT*/ PULONG pulLen,
- /*IN*/ PCSTR pszFilter, /*OPTIONAL*/
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Device_ID_List_Size_ExW(
- /*OUT*/ PULONG pulLen,
- /*IN*/ PCWSTR pszFilter, /*OPTIONAL*/
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Device_ID_List_SizeW(
- /*OUT*/ PULONG pulLen,
- /*IN*/ PCWSTR pszFilter, /*OPTIONAL*/
- /*IN*/ ULONG ulFlags);
-
-#ifdef UNICODE
-#define CM_Get_Device_ID_List_Size CM_Get_Device_ID_List_SizeW
-#define CM_Get_Device_ID_List_Size_Ex CM_Get_Device_ID_List_Size_ExW
-#else
-#define CM_Get_Device_ID_List_Size CM_Get_Device_ID_List_SizeA
-#define CM_Get_Device_ID_List_Size_Ex CM_Get_Device_ID_List_Size_ExA
-#endif /* UNICODE */
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Device_ID_Size(
- /*OUT*/ PULONG pulLen,
- /*IN*/ DEVINST dnDevInst,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Device_ID_Size_Ex(
- /*OUT*/ PULONG pulLen,
- /*IN*/ DEVINST dnDevInst,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-/* FIXME: Obsolete CM_Get_Device_Interface_Alias */
-/* FIXME: Obsolete CM_Get_Device_Interface_Alias_Ex */
-/* FIXME: Obsolete CM_Get_Device_Interface_List */
-/* FIXME: Obsolete CM_Get_Device_Interface_List_Ex */
-/* FIXME: Obsolete CM_Get_Device_Interface_List_Size */
-/* FIXME: Obsolete CM_Get_Device_Interface_List_Size_Ex */
-/* FIXME: Obsolete CM_Get_DevNode_Custom_Property */
-/* FIXME: Obsolete CM_Get_DevNode_Custom_Property_Ex */
-/* FIXME: Obsolete CM_Get_DevNode_Registry_Property */
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_DevNode_Status(
- /*OUT*/ PULONG pulStatus,
- /*OUT*/ PULONG pulProblemNumber,
- /*IN*/ DEVINST dnDevInst,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_DevNode_Status_Ex(
- /*OUT*/ PULONG pulStatus,
- /*OUT*/ PULONG pulProblemNumber,
- /*IN*/ DEVINST dnDevInst,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-#define CM_Get_DevInst_Status CM_Get_DevNode_Status
-#define CM_Get_DevInst_Status_Ex CM_Get_DevNode_Status_Ex
-
-/* CM_Get_First_Log_Conf.ulFlags constants */
-#define BASIC_LOG_CONF 0x00000000 /* Specifies the req list. */
-#define FILTERED_LOG_CONF 0x00000001 /* Specifies the filtered req list. */
-#define ALLOC_LOG_CONF 0x00000002 /* Specifies the Alloc Element. */
-#define BOOT_LOG_CONF 0x00000003 /* Specifies the RM Alloc Element. */
-#define FORCED_LOG_CONF 0x00000004 /* Specifies the Forced Log Conf */
-#define OVERRIDE_LOG_CONF 0x00000005 /* Specifies the Override req list. */
-#define NUM_LOG_CONF 0x00000006 /* Number of Log Conf type */
-#define LOG_CONF_BITS 0x00000007 /* The bits of the log conf type. */
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_First_Log_Conf(
- /*OUT*/ PLOG_CONF plcLogConf, /*OPTIONAL*/
- /*IN*/ DEVINST dnDevInst,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_First_Log_Conf_Ex(
- /*OUT*/ PLOG_CONF plcLogConf, /*OPTIONAL*/
- /*IN*/ DEVINST dnDevInst,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-/* FIXME: Obsolete CM_Get_Global_State */
-/* FIXME: Obsolete CM_Get_Global_State_Ex */
-/* FIXME: Obsolete CM_Get_Hardware_Profile_Info */
-/* FIXME: Obsolete CM_Get_Hardware_Profile_Info_Ex */
-/* FIXME: Obsolete CM_Get_HW_Prof_Flags */
-/* FIXME: Obsolete CM_Get_HW_Prof_Flags_Ex */
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Log_Conf_Priority(
- /*IN*/ LOG_CONF lcLogConf,
- /*OUT*/ PPRIORITY pPriority,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Log_Conf_Priority_Ex(
- /*IN*/ LOG_CONF lcLogConf,
- /*OUT*/ PPRIORITY pPriority,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Next_Log_Conf(
- /*OUT*/ PLOG_CONF plcLogConf, /*OPTIONAL*/
- /*IN*/ LOG_CONF lcLogConf,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Next_Log_Conf_Ex(
- /*OUT*/ PLOG_CONF plcLogConf, /*OPTIONAL*/
- /*IN*/ LOG_CONF lcLogConf,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Next_Res_Des(
- /*OUT*/ PRES_DES prdResDes,
- /*IN*/ RES_DES rdResDes,
- /*IN*/ RESOURCEID ForResource,
- /*OUT*/ PRESOURCEID pResourceID,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Next_Res_Des_Ex(
- /*OUT*/ PRES_DES prdResDes,
- /*IN*/ RES_DES rdResDes,
- /*IN*/ RESOURCEID ForResource,
- /*OUT*/ PRESOURCEID pResourceID,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Parent(
- /*OUT*/ PDEVINST pdnDevInst,
- /*IN*/ DEVINST dnDevInst,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Parent_Ex(
- /*OUT*/ PDEVINST pdnDevInst,
- /*IN*/ DEVINST dnDevInst,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Res_Des_Data(
- /*IN*/ RES_DES rdResDes,
- /*OUT*/ PVOID Buffer,
- /*IN*/ ULONG BufferLen,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Res_Des_Data_Ex(
- /*IN*/ RES_DES rdResDes,
- /*OUT*/ PVOID Buffer,
- /*IN*/ ULONG BufferLen,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Res_Des_Data_Size(
- /*OUT*/ PULONG pulSize,
- /*IN*/ RES_DES rdResDes,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Res_Des_Data_Size_Ex(
- /*OUT*/ PULONG pulSize,
- /*IN*/ RES_DES rdResDes,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Resource_Conflict_Count(
- /*IN*/ CONFLICT_LIST clConflictList,
- /*OUT*/ PULONG pulCount);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Resource_Conflict_DetailsA(
- /*IN*/ CONFLICT_LIST clConflictList,
- /*IN*/ ULONG ulIndex,
- /*IN OUT*/ PCONFLICT_DETAILS_A pConflictDetails);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Resource_Conflict_DetailsW(
- /*IN*/ CONFLICT_LIST clConflictList,
- /*IN*/ ULONG ulIndex,
- /*IN OUT*/ PCONFLICT_DETAILS_W pConflictDetails);
-
-#ifdef UNICODE
-#define CM_Get_Resource_Conflict_Details CM_Get_Resource_Conflict_DetailsW
-#else
-#define CM_Get_Resource_Conflict_Details CM_Get_Resource_Conflict_DetailsA
-#endif /* UNICODE */
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Sibling(
- /*OUT*/ PDEVINST pdnDevInst,
- /*IN*/ DEVINST DevInst,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Get_Sibling_Ex(
- /*OUT*/ PDEVINST pdnDevInst,
- /*IN*/ DEVINST DevInst,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-WORD
-WINAPI
-CM_Get_Version(
- VOID);
-
-CMAPI
-WORD
-WINAPI
-CM_Get_Version_Ex(
- /*IN*/ HMACHINE hMachine);
-
-/* FIXME: Obsolete CM_Intersect_Range_List */
-/* FIXME: Obsolete CM_Invert_Range_List */
-/* FIXME: Obsolete CM_Is_Dock_Station_Present */
-/* FIXME: Obsolete CM_Is_Dock_Station_Present_Ex */
-
-/* CM_Locate_DevNode.ulFlags constants */
-#define CM_LOCATE_DEVNODE_NORMAL 0x00000000
-#define CM_LOCATE_DEVNODE_PHANTOM 0x00000001
-#define CM_LOCATE_DEVNODE_CANCELREMOVE 0x00000002
-#define CM_LOCATE_DEVNODE_NOVALIDATION 0x00000004
-#define CM_LOCATE_DEVNODE_BITS 0x00000007
-
-#define CM_LOCATE_DEVINST_NORMAL CM_LOCATE_DEVNODE_NORMAL
-#define CM_LOCATE_DEVINST_PHANTOM CM_LOCATE_DEVNODE_PHANTOM
-#define CM_LOCATE_DEVINST_CANCELREMOVE CM_LOCATE_DEVNODE_CANCELREMOVE
-#define CM_LOCATE_DEVINST_NOVALIDATION CM_LOCATE_DEVNODE_NOVALIDATION
-#define CM_LOCATE_DEVINST_BITS CM_LOCATE_DEVNODE_BITS
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Locate_DevNodeA(
- /*OUT*/ PDEVINST pdnDevInst,
- /*IN*/ DEVINSTID_A pDeviceID, /*OPTIONAL*/
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Locate_DevNode_ExA(
- /*OUT*/ PDEVINST pdnDevInst,
- /*IN*/ DEVINSTID_A pDeviceID, /*OPTIONAL*/
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Locate_DevNode_ExW(
- /*OUT*/ PDEVINST pdnDevInst,
- /*IN*/ DEVINSTID_W pDeviceID, /*OPTIONAL*/
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Locate_DevNodeW(
- /*OUT*/ PDEVINST pdnDevInst,
- /*IN*/ DEVINSTID_W pDeviceID, /*OPTIONAL*/
- /*IN*/ ULONG ulFlags);
-
-#define CM_Locate_DevInstA CM_Locate_DevNodeA
-#define CM_Locate_DevInstW CM_Locate_DevNodeW
-#define CM_Locate_DevInst_ExA CM_Locate_DevNode_ExA
-#define CM_Locate_DevInst_ExW CM_Locate_DevNode_ExW
-
-#ifdef UNICODE
-#define CM_Locate_DevNode CM_Locate_DevNodeW
-#define CM_Locate_DevInst CM_Locate_DevNodeW
-#define CM_Locate_DevNode_Ex CM_Locate_DevNode_ExW
-#define CM_Locate_DevInst_Ex CM_Locate_DevNode_ExW
-#else
-#define CM_Locate_DevNode CM_Locate_DevNodeA
-#define CM_Locate_DevInst CM_Locate_DevNodeA
-#define CM_Locate_DevNode_Ex CM_Locate_DevNode_ExA
-#define CM_Locate_DevInst_Ex CM_Locate_DevNode_ExA
-#endif /* UNICODE */
-
-/* FIXME: Obsolete CM_Merge_Range_List */
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Modify_Res_Des(
- /*OUT*/ PRES_DES prdResDes,
- /*IN*/ RES_DES rdResDes,
- /*IN*/ RESOURCEID ResourceID,
- /*IN*/ PCVOID ResourceData,
- /*IN*/ ULONG ResourceLen,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Modify_Res_Des_Ex(
- /*OUT*/ PRES_DES prdResDes,
- /*IN*/ RES_DES rdResDes,
- /*IN*/ RESOURCEID ResourceID,
- /*IN*/ PCVOID ResourceData,
- /*IN*/ ULONG ResourceLen,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-/* FIXME: Obsolete CM_Move_DevNode */
-/* FIXME: Obsolete CM_Move_DevNode_Ex */
-/* FIXME: Obsolete CM_Next_Range */
-/* FIXME: Obsolete CM_Open_Class_Key */
-/* FIXME: Obsolete CM_Open_Class_Key_Ex */
-/* FIXME: Obsolete CM_Open_DevNode_Key */
-/* FIXME: Obsolete CM_Open_DevNode_Key_Ex */
-
-/* CM_Query_And_Remove_SubTree.ulFlags constants */
-#define CM_REMOVE_UI_OK 0x00000000
-#define CM_REMOVE_UI_NOT_OK 0x00000001
-#define CM_REMOVE_NO_RESTART 0x00000002
-#define CM_REMOVE_BITS 0x00000003
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Query_And_Remove_SubTreeA(
- /*IN*/ DEVINST dnAncestor,
- /*OUT*/ PPNP_VETO_TYPE pVetoType,
- /*OUT*/ LPSTR pszVetoName,
- /*IN*/ ULONG ulNameLength,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Query_And_Remove_SubTreeW(
- /*IN*/ DEVINST dnAncestor,
- /*OUT*/ PPNP_VETO_TYPE pVetoType,
- /*OUT*/ LPWSTR pszVetoName,
- /*IN*/ ULONG ulNameLength,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Query_And_Remove_SubTree_ExA(
- /*IN*/ DEVINST dnAncestor,
- /*OUT*/ PPNP_VETO_TYPE pVetoType,
- /*OUT*/ LPSTR pszVetoName,
- /*IN*/ ULONG ulNameLength,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Query_And_Remove_SubTree_ExW(
- /*IN*/ DEVINST dnAncestor,
- /*OUT*/ PPNP_VETO_TYPE pVetoType,
- /*OUT*/ LPWSTR pszVetoName,
- /*IN*/ ULONG ulNameLength,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-/* FIXME: Obsolete CM_Query_Arbitrator_Free_Data */
-/* FIXME: Obsolete CM_Query_Arbitrator_Free_Data_Ex */
-/* FIXME: Obsolete CM_Query_Arbitrator_Free_Size */
-/* FIXME: Obsolete CM_Query_Arbitrator_Free_Size_Ex */
-/* FIXME: Obsolete CM_Query_Arbitrator_Free_Size_Ex */
-/* FIXME: Obsolete CM_Query_Remove_SubTree */
-/* FIXME: Obsolete CM_Query_Remove_SubTree_Ex */
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Query_Resource_Conflict_List(
- /*OUT*/ PCONFLICT_LIST pclConflictList,
- /*IN*/ DEVINST dnDevInst,
- /*IN*/ RESOURCEID ResourceID,
- /*IN*/ PCVOID ResourceData,
- /*IN*/ ULONG ResourceLen,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-/* CM_Reenumerate_DevNode.ulFlags constants */
-#define CM_REENUMERATE_NORMAL 0x00000000
-#define CM_REENUMERATE_SYNCHRONOUS 0x00000001
-#define CM_REENUMERATE_RETRY_INSTALLATION 0x00000002
-#define CM_REENUMERATE_ASYNCHRONOUS 0x00000004
-#define CM_REENUMERATE_BITS 0x00000007
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Reenumerate_DevNode(
- /*IN*/ DEVINST dnDevInst,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Reenumerate_DevNode_Ex(
- /*IN*/ DEVINST dnDevInst,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-#define CM_Reenumerate_DevInst CM_Reenumerate_DevNode
-#define CM_Reenumerate_DevInst_Ex CM_Reenumerate_DevNode_Ex
-
-/* FIXME: Obsolete CM_Register_Device_Driver */
-/* FIXME: Obsolete CM_Register_Device_Driver_Ex */
-/* FIXME: Obsolete CM_Register_Device_Interface */
-/* FIXME: Obsolete CM_Register_Device_Interface_Ex */
-/* FIXME: Obsolete CM_Remove_SubTree */
-/* FIXME: Obsolete CM_Remove_SubTree_Ex */
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Request_Device_EjectA(
- /*IN*/ DEVINST dnDevInst,
- /*OUT*/ PPNP_VETO_TYPE pVetoType,
- /*OUT*/ LPSTR pszVetoName,
- /*IN*/ ULONG ulNameLength,
- /*IN*/ ULONG ulFlags);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Request_Device_Eject_ExW(
- /*IN*/ DEVINST dnDevInst,
- /*OUT*/ PPNP_VETO_TYPE pVetoType,
- /*OUT*/ LPWSTR pszVetoName,
- /*IN*/ ULONG ulNameLength,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Request_Device_Eject_ExA(
- /*IN*/ DEVINST dnDevInst,
- /*OUT*/ PPNP_VETO_TYPE pVetoType,
- /*OUT*/ LPSTR pszVetoName,
- /*IN*/ ULONG ulNameLength,
- /*IN*/ ULONG ulFlags,
- /*IN*/ HMACHINE hMachine);
-
-CMAPI
-CONFIGRET
-WINAPI
-CM_Request_Device_EjectW(
- /*IN*/ DEVINST dnDevInst,
- /*OUT*/ PPNP_VETO_TYPE pVetoType,
- /*OUT*/ LPWSTR pszVetoName,
- /*IN*/ ULONG ulNameLength,
- /*IN*/ ULONG ulFlags);
-
-#ifdef UNICODE
-#define CM_Request_Device_Eject CM_Request_Device_EjectW
-#define CM_Request_Device_Eject_Ex CM_Request_Device_Eject_ExW
-#else
-#define CM_Request_Device_Eject CM_Request_Device_EjectA
-#define CM_Request_Device_Eject_Ex CM_Request_Device_Eject_ExA
-#endif /* UNICODE */
-
-/* FIXME: Obsolete CM_Request_Eject_PC */
-/* FIXME: Obsolete CM_Request_Eject_PC_Ex */
-/* FIXME: Obsolete CM_Run_Detection */
-/* FIXME: Obsolete CM_Run_Detection_Ex */
-/* FIXME: Obsolete CM_Set_Class_Registry_Property */
-/* FIXME: Obsolete CM_Set_DevNode_Problem */
-/* FIXME: Obsolete CM_Set_DevNode_Problem_Ex */
-/* FIXME: Obsolete CM_Set_DevNode_Registry_Property */
-/* FIXME: Obsolete CM_Set_DevNode_Registry_Property_Ex */
-/* FIXME: Obsolete CM_Set_HW_Prof */
-/* FIXME: Obsolete CM_Set_HW_Prof_Ex */
-/* FIXME: Obsolete CM_Set_HW_Prof_Flags */
-/* FIXME: Obsolete CM_Set_HW_Prof_Flags_Ex */
-/* FIXME: Obsolete CM_Setup_DevNode */
-/* FIXME: Obsolete CM_Setup_DevNode_Ex */
-/* FIXME: Obsolete CM_Test_Range_Available */
-/* FIXME: Obsolete CM_Uninstall_DevNode */
-/* FIXME: Obsolete CM_Uninstall_DevNode_Ex */
-/* FIXME: Obsolete CM_Unregister_Device_Interface */
-/* FIXME: Obsolete CM_Unregister_Device_Interface_Ex */
-
-#define CM_WaitNoPendingInstallEvents CMP_WaitNoPendingInstallEvents
-
-CMAPI
-DWORD
-WINAPI
-CMP_WaitNoPendingInstallEvents(
- /*IN*/ DWORD dwTimeout);
-
-#include <poppack.h>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __CFGMGR32_H */
diff --git a/winsup/w32api/include/ddk/d4drvif.h b/winsup/w32api/include/ddk/d4drvif.h
deleted file mode 100644
index c10e781..0000000
--- a/winsup/w32api/include/ddk/d4drvif.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * d4drvif.h
- *
- * DOT4 driver IOCTL interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __D4DRVIF_H
-#define __D4DRVIF_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include "d4iface.h"
-
-#define FILE_DEVICE_DOT4 0x3a
-#define IOCTL_DOT4_USER_BASE 2049
-
-#define IOCTL_DOT4_ADD_ACTIVITY_BROADCAST \
- CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_DOT4_CLOSE_CHANNEL \
- CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_DOT4_CREATE_SOCKET \
- CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 7, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
-
-#define IOCTL_DOT4_DESTROY_SOCKET \
- CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 9, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
-
-#define IOCTL_DOT4_OPEN_CHANNEL \
- CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 0, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
-
-#define IOCTL_DOT4_READ \
- CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 2, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
-
-#define IOCTL_DOT4_REMOVE_ACTIVITY_BROADCAST \
- CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_DOT4_WAIT_ACTIVITY_BROADCAST \
- CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 6, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
-
-#define IOCTL_DOT4_WAIT_FOR_CHANNEL \
- CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 8, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
-
-#define IOCTL_DOT4_WRITE \
- CTL_CODE(FILE_DEVICE_DOT4, IOCTL_DOT4_USER_BASE + 3, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
-
-
-#define MAX_SERVICE_LENGTH 40
-
-typedef struct _DOT4_DC_CREATE_DATA {
- unsigned char bPsid;
- CHAR pServiceName[MAX_SERVICE_LENGTH + 1];
- unsigned char bType;
- ULONG ulBufferSize;
- USHORT usMaxHtoPPacketSize;
- USHORT usMaxPtoHPacketSize;
- unsigned char bHsid;
-} DOT4_DC_CREATE_DATA, *PDOT4_DC_CREATE_DATA;
-
-typedef struct _DOT4_DC_DESTROY_DATA {
- unsigned char bHsid;
-} DOT4_DC_DESTROY_DATA, *PDOT4_DC_DESTROY_DATA;
-
-typedef struct _DOT4_DC_OPEN_DATA {
- unsigned char bHsid;
- unsigned char fAddActivity;
- CHANNEL_HANDLE hChannelHandle;
-} DOT4_DC_OPEN_DATA, *PDOT4_DC_OPEN_DATA;
-
-typedef struct _DOT4_DRIVER_CMD {
- CHANNEL_HANDLE hChannelHandle;
- ULONG ulSize;
- ULONG ulOffset;
- ULONG ulTimeout;
-} DOT4_DRIVER_CMD, *PDOT4_DRIVER_CMD;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __D4DRVIF_H */
diff --git a/winsup/w32api/include/ddk/d4iface.h b/winsup/w32api/include/ddk/d4iface.h
deleted file mode 100644
index 245bc4c..0000000
--- a/winsup/w32api/include/ddk/d4iface.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * d4iface.h
- *
- * DOT4 interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __D4IFACE_H
-#define __D4IFACE_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-#define DOT4_MAX_CHANNELS 128
-#define NO_TIMEOUT 0
-
-#define DOT4_CHANNEL 0
-#define HP_MESSAGE_PROCESSOR 1
-#define PRINTER_CHANNEL 2
-#define SCANNER_CHANNEL 4
-#define MIO_COMMAND_PROCESSOR 5
-#define ECHO_CHANNEL 6
-#define FAX_SEND_CHANNEL 7
-#define FAX_RECV_CHANNEL 8
-#define DIAGNOSTIC_CHANNEL 9
-#define HP_RESERVED 10
-#define IMAGE_DOWNLOAD 11
-#define HOST_DATASTORE_UPLOAD 12
-#define HOST_DATASTORE_DOWNLOAD 13
-#define CONFIG_UPLOAD 14
-#define CONFIG_DOWNLOAD 15
-
-#define STREAM_TYPE_CHANNEL 1
-#define PACKET_TYPE_CHANNEL 2
-
-/* DOT4_ACTIVITY.ulMessage flags */
-#define DOT4_STREAM_RECEIVED 0x100
-#define DOT4_STREAM_CREDITS 0x101
-#define DOT4_MESSAGE_RECEIVED 0x102
-#define DOT4_DISCONNECT 0x103
-#define DOT4_CHANNEL_CLOSED 0x105
-
-typedef unsigned long CHANNEL_HANDLE, *PCHANNEL_HANDLE;
-
-typedef struct _DOT4_ACTIVITY {
- ULONG ulMessage;
- ULONG ulByteCount;
- CHANNEL_HANDLE hChannel;
-} DOT4_ACTIVITY, *PDOT4_ACTIVITY;
-
-typedef struct _DOT4_WMI_XFER_INFO {
- ULONG ulStreamBytesWritten;
- ULONG ulStreamBytesRead;
- ULONG ulPacketBytesWritten;
- ULONG ulPacketBytesRead;
-} DOT4_WMI_XFER_INFO, *PDOT4_WMI_XFER_INFO;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __D4IFACE_H */
diff --git a/winsup/w32api/include/ddk/ddkmapi.h b/winsup/w32api/include/ddk/ddkmapi.h
deleted file mode 100644
index 7772b34..0000000
--- a/winsup/w32api/include/ddk/ddkmapi.h
+++ /dev/null
@@ -1,334 +0,0 @@
-/*
- * ddkmapi.h
- *
- * DirectDraw support for DxApi function
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __DDKMAPI_H
-#define __DDKMAPI_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-#if defined(_DXAPI_)
- #define DXAPI DECLSPEC_EXPORT
-#else
- #define DXAPI DECLSPEC_IMPORT
-#endif
-
-DXAPI
-DWORD
-FAR PASCAL
-DxApi(
- /*IN*/ DWORD dwFunctionNum,
- /*IN*/ LPVOID lpvInBuffer,
- /*IN*/ DWORD cbInBuffer,
- /*OUT*/ LPVOID lpvOutBuffer,
- /*OUT*/ DWORD cbOutBuffer);
-
-typedef DWORD (FAR PASCAL *LPDXAPI)(
- DWORD dwFunctionNum,
- LPVOID lpvInBuffer,
- DWORD cbInBuffer,
- LPVOID lpvOutBuffer,
- DWORD cbOutBuffer);
-
-
-#define DXAPI_MAJORVERSION 1
-#define DXAPI_MINORVERSION 0
-
-#define DD_FIRST_DXAPI 0x500
-
-#define DD_DXAPI_GETVERSIONNUMBER (DD_FIRST_DXAPI)
-#define DD_DXAPI_CLOSEHANDLE (DD_FIRST_DXAPI+1)
-#define DD_DXAPI_OPENDIRECTDRAW (DD_FIRST_DXAPI+2)
-#define DD_DXAPI_OPENSURFACE (DD_FIRST_DXAPI+3)
-#define DD_DXAPI_OPENVIDEOPORT (DD_FIRST_DXAPI+4)
-#define DD_DXAPI_GETKERNELCAPS (DD_FIRST_DXAPI+5)
-#define DD_DXAPI_GET_VP_FIELD_NUMBER (DD_FIRST_DXAPI+6)
-#define DD_DXAPI_SET_VP_FIELD_NUMBER (DD_FIRST_DXAPI+7)
-#define DD_DXAPI_SET_VP_SKIP_FIELD (DD_FIRST_DXAPI+8)
-#define DD_DXAPI_GET_SURFACE_STATE (DD_FIRST_DXAPI+9)
-#define DD_DXAPI_SET_SURFACE_STATE (DD_FIRST_DXAPI+10)
-#define DD_DXAPI_LOCK (DD_FIRST_DXAPI+11)
-#define DD_DXAPI_FLIP_OVERLAY (DD_FIRST_DXAPI+12)
-#define DD_DXAPI_FLIP_VP (DD_FIRST_DXAPI+13)
-#define DD_DXAPI_GET_CURRENT_VP_AUTOFLIP_SURFACE (DD_FIRST_DXAPI+14)
-#define DD_DXAPI_GET_LAST_VP_AUTOFLIP_SURFACE (DD_FIRST_DXAPI+15)
-#define DD_DXAPI_REGISTER_CALLBACK (DD_FIRST_DXAPI+16)
-#define DD_DXAPI_UNREGISTER_CALLBACK (DD_FIRST_DXAPI+17)
-#define DD_DXAPI_GET_POLARITY (DD_FIRST_DXAPI+18)
-#define DD_DXAPI_OPENVPCAPTUREDEVICE (DD_FIRST_DXAPI+19)
-#define DD_DXAPI_ADDVPCAPTUREBUFFER (DD_FIRST_DXAPI+20)
-#define DD_DXAPI_FLUSHVPCAPTUREBUFFERS (DD_FIRST_DXAPI+21)
-
-
-typedef struct _DDCAPBUFFINFO {
- DWORD dwFieldNumber;
- DWORD bPolarity;
- LARGE_INTEGER liTimeStamp;
- DWORD ddRVal;
-} DDCAPBUFFINFO, FAR * LPDDCAPBUFFINFO;
-
-/* DDADDVPCAPTUREBUFF.dwFlags constants */
-#define DDADDBUFF_SYSTEMMEMORY 0x0001
-#define DDADDBUFF_NONLOCALVIDMEM 0x0002
-#define DDADDBUFF_INVERT 0x0004
-
-typedef struct _DDADDVPCAPTUREBUFF {
- HANDLE hCapture;
- DWORD dwFlags;
- PMDL pMDL;
- PKEVENT pKEvent;
- LPDDCAPBUFFINFO lpBuffInfo;
-} DDADDVPCAPTUREBUFF, FAR * LPDDADDVPCAPTUREBUFF;
-
-typedef struct _DDCLOSEHANDLE {
- HANDLE hHandle;
-} DDCLOSEHANDLE, FAR *LPDDCLOSEHANDLE;
-
-typedef struct _DDFLIPOVERLAY {
- HANDLE hDirectDraw;
- HANDLE hCurrentSurface;
- HANDLE hTargetSurface;
- DWORD dwFlags;
-} DDFLIPOVERLAY, FAR *LPDDFLIPOVERLAY;
-
-typedef struct _DDFLIPVIDEOPORT {
- HANDLE hDirectDraw;
- HANDLE hVideoPort;
- HANDLE hCurrentSurface;
- HANDLE hTargetSurface;
- DWORD dwFlags;
-} DDFLIPVIDEOPORT, FAR *LPDDFLIPVIDEOPORT;
-
-typedef struct _DDGETAUTOFLIPIN {
- HANDLE hDirectDraw;
- HANDLE hVideoPort;
-} DDGETAUTOFLIPIN, FAR *LPDDGETAUTOFLIPIN;
-
-typedef struct _DDGETAUTOFLIPOUT {
- DWORD ddRVal;
- HANDLE hVideoSurface;
- HANDLE hVBISurface;
- BOOL bPolarity;
-} DDGETAUTOFLIPOUT, FAR *LPDDGETAUTOFLIPOUT;
-
-typedef struct _DDGETPOLARITYIN {
- HANDLE hDirectDraw;
- HANDLE hVideoPort;
-} DDGETPOLARITYIN, FAR *LPDDGETPOLARITYIN;
-
-typedef struct _DDGETPOLARITYOUT {
- DWORD ddRVal;
- BOOL bPolarity;
-} DDGETPOLARITYOUT, FAR *LPDDGETPOLARITYOUT;
-
-typedef struct _DDGETSURFACESTATEIN {
- HANDLE hDirectDraw;
- HANDLE hSurface;
-} DDGETSURFACESTATEIN, FAR *LPDDGETSURFACESTATEIN;
-
-/* DDGETSURFACESTATEOUT.dwStateCaps/dwStateStatus constants */
-#define DDSTATE_BOB 0x0001
-#define DDSTATE_WEAVE 0x0002
-#define DDSTATE_EXPLICITLY_SET 0x0004
-#define DDSTATE_SOFTWARE_AUTOFLIP 0x0008
-#define DDSTATE_SKIPEVENFIELDS 0x0010
-
-typedef struct _DDGETSURFACESTATEOUT {
- DWORD ddRVal;
- DWORD dwStateCaps;
- DWORD dwStateStatus;
-} DDGETSURFACESTATEOUT, FAR *LPDDGETSURFACESTATEOUT;
-
-typedef struct _DDGETFIELDNUMIN {
- HANDLE hDirectDraw;
- HANDLE hVideoPort;
-} DDGETFIELDNUMIN, FAR *LPDDGETFIELDNUMIN;
-
-typedef struct _DDGETFIELDNUMOUT {
- DWORD ddRVal;
- DWORD dwFieldNum;
-} DDGETFIELDNUMOUT, FAR *LPDDGETFIELDNUMOUT;
-
-typedef struct _DDGETKERNELCAPSOUT {
- DWORD ddRVal;
- DWORD dwCaps;
- DWORD dwIRQCaps;
-} DDGETKERNELCAPSOUT, FAR *LPDDGETKERNELCAPSOUT;
-
-typedef struct _DDGETVERSIONNUMBER {
- DWORD ddRVal;
- DWORD dwMajorVersion;
- DWORD dwMinorVersion;
-} DDGETVERSIONNUMBER, FAR *LPDDGETVERSIONNUMBER;
-
-typedef struct _DDLOCKIN {
- HANDLE hDirectDraw;
- HANDLE hSurface;
-} DDLOCKIN, FAR *LPDDLOCKIN;
-
-typedef struct _DDLOCKOUT {
- DWORD ddRVal;
- DWORD dwSurfHeight;
- DWORD dwSurfWidth;
- LONG lSurfPitch;
- PVOID lpSurface;
- DWORD SurfaceCaps;
- DWORD dwFormatFlags;
- DWORD dwFormatFourCC;
- DWORD dwFormatBitCount;
- _ANONYMOUS_UNION union {
- DWORD dwRBitMask;
- DWORD dwYBitMask;
- } DUMMYUNIONNAME;
- _ANONYMOUS_UNION union {
- DWORD dwGBitMask;
- DWORD dwUBitMask;
- } DUMMYUNIONNAME2;
- _ANONYMOUS_UNION union {
- DWORD dwBBitMask;
- DWORD dwVBitMask;
- } DUMMYUNIONNAME3;
-} DDLOCKOUT, FAR *LPDDLOCKOUT;
-
-/* LPDD_NOTIFYCALLBACK.dwFlags constants */
-#define DDNOTIFY_DISPLAY_VSYNC 0x0001
-#define DDNOTIFY_VP_VSYNC 0x0002
-#define DDNOTIFY_VP_LINE 0x0004
-#define DDNOTIFY_PRERESCHANGE 0x0008
-#define DDNOTIFY_POSTRESCHANGE 0x0010
-#define DDNOTIFY_PREDOSBOX 0x0020
-#define DDNOTIFY_POSTDOSBOX 0x0040
-#define DDNOTIFY_CLOSEDIRECTDRAW 0x0080
-#define DDNOTIFY_CLOSESURFACE 0x0100
-#define DDNOTIFY_CLOSEVIDEOPORT 0x0200
-#define DDNOTIFY_CLOSECAPTURE 0x0400
-
-typedef ULONG (FAR PASCAL *LPDD_NOTIFYCALLBACK)(
- DWORD dwFlags,
- PVOID pContext,
- DWORD dwParam1,
- DWORD dwParam2);
-
-typedef struct _DDOPENDIRECTDRAWIN {
- ULONG_PTR dwDirectDrawHandle;
- LPDD_NOTIFYCALLBACK pfnDirectDrawClose;
- PVOID pContext;
-} DDOPENDIRECTDRAWIN, FAR *LPDDOPENDIRECTDRAWIN;
-
-typedef struct _DDOPENDIRECTDRAWOUT {
- DWORD ddRVal;
- HANDLE hDirectDraw;
-} DDOPENDIRECTDRAWOUT, FAR *LPDDOPENDIRECTDRAWOUT;
-
-typedef struct _DDOPENSURFACEIN {
- HANDLE hDirectDraw;
- ULONG_PTR dwSurfaceHandle;
- LPDD_NOTIFYCALLBACK pfnSurfaceClose;
- PVOID pContext;
-} DDOPENSURFACEIN, FAR *LPDDOPENSURFACEIN;
-
-typedef struct _DDOPENSURFACEOUT {
- DWORD ddRVal;
- HANDLE hSurface;
-} DDOPENSURFACEOUT, FAR *LPDDOPENSURFACEOUT;
-
-typedef struct _DDOPENVIDEOPORTIN {
- HANDLE hDirectDraw;
- ULONG dwVideoPortHandle;
- LPDD_NOTIFYCALLBACK pfnVideoPortClose;
- PVOID pContext;
-} DDOPENVIDEOPORTIN, FAR *LPDDOPENVIDEOPORTIN;
-
-typedef struct _DDOPENVIDEOPORTOUT {
- DWORD ddRVal;
- HANDLE hVideoPort;
-} DDOPENVIDEOPORTOUT, FAR *LPDDOPENVIDEOPORTOUT;
-
-/* DDOPENVPCAPTUREDEVICEIN.dwFlags constants */
-#define DDOPENCAPTURE_VIDEO 0x0001
-#define DDOPENCAPTURE_VBI 0x0002
-
-typedef struct _DDOPENVPCAPTUREDEVICEIN {
- HANDLE hDirectDraw;
- HANDLE hVideoPort;
- DWORD dwStartLine;
- DWORD dwEndLine;
- DWORD dwCaptureEveryNFields;
- LPDD_NOTIFYCALLBACK pfnCaptureClose;
- PVOID pContext;
- DWORD dwFlags;
-} DDOPENVPCAPTUREDEVICEIN, FAR * LPDDOPENVPCAPTUREDEVICEIN;
-
-typedef struct _DDOPENVPCAPTUREDEVICEOUT {
- DWORD ddRVal;
- HANDLE hCapture;
-} DDOPENVPCAPTUREDEVICEOUT, FAR * LPDDOPENVPCAPTUREDEVICEOUT;
-
-/* DDREGISTERCALLBACK.dwEvents constants */
-#define DDEVENT_DISPLAY_VSYNC 0x0001
-#define DDEVENT_VP_VSYNC 0x0002
-#define DDEVENT_VP_LINE 0x0004
-#define DDEVENT_PRERESCHANGE 0x0008
-#define DDEVENT_POSTRESCHANGE 0x0010
-#define DDEVENT_PREDOSBOX 0x0020
-#define DDEVENT_POSTDOSBOX 0x0040
-
-typedef struct _DDREGISTERCALLBACK {
- HANDLE hDirectDraw;
- ULONG dwEvents;
- LPDD_NOTIFYCALLBACK pfnCallback;
- ULONG_PTR dwParam1;
- ULONG_PTR dwParam2;
- PVOID pContext;
-} DDREGISTERCALLBACK, FAR *LPDDREGISTERCALLBACK;
-
-typedef struct _DDSETSURFACETATE {
- HANDLE hDirectDraw;
- HANDLE hSurface;
- DWORD dwState;
- DWORD dwStartField;
-} DDSETSURFACESTATE, FAR *LPDDSETSURFACESTATE;
-
-typedef struct _DDSETFIELDNUM {
- HANDLE hDirectDraw;
- HANDLE hVideoPort;
- DWORD dwFieldNum;
-} DDSETFIELDNUM, FAR *LPDDSETFIELDNUM;
-
-typedef struct _DDSETSKIPFIELD {
- HANDLE hDirectDraw;
- HANDLE hVideoPort;
- DWORD dwStartField;
-} DDSETSKIPFIELD, FAR *LPDDSETSKIPFIELD;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __DDKMAPI_H */
diff --git a/winsup/w32api/include/ddk/hidclass.h b/winsup/w32api/include/ddk/hidclass.h
deleted file mode 100644
index 4cbc6fc..0000000
--- a/winsup/w32api/include/ddk/hidclass.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * hidclass.h
- *
- * HID class driver interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __HIDCLASS_H
-#define __HIDCLASS_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include "hidpi.h"
-
-#define HID_REVISION 0x00000001
-
-DEFINE_GUID (GUID_DEVINTERFACE_HID, \
- 0x4D1E55B2L, 0xF16F, 0x11CF, 0x88, 0xCB, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30);
-DEFINE_GUID (GUID_HID_INTERFACE_NOTIFY, \
- 0x2c4e2e88L, 0x25e6, 0x4c33, 0x88, 0x2f, 0x3d, 0x82, 0xe6, 0x07, 0x36, 0x81);
-DEFINE_GUID (GUID_HID_INTERFACE_HIDPARSE, \
- 0xf5c315a5, 0x69ac, 0x4bc2, 0x92, 0x79, 0xd0, 0xb6, 0x45, 0x76, 0xf4, 0x4b);
-
-#define GUID_CLASS_INPUT GUID_DEVINTERFACE_HID
-
-#define GUID_CLASS_INPUT_STR "4D1E55B2-F16F-11CF-88CB-001111000030"
-
-
-#define HID_CTL_CODE(id) \
- CTL_CODE (FILE_DEVICE_KEYBOARD, (id), METHOD_NEITHER, FILE_ANY_ACCESS)
-#define HID_BUFFER_CTL_CODE(id) \
- CTL_CODE (FILE_DEVICE_KEYBOARD, (id), METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define HID_IN_CTL_CODE(id) \
- CTL_CODE (FILE_DEVICE_KEYBOARD, (id), METHOD_IN_DIRECT, FILE_ANY_ACCESS)
-#define HID_OUT_CTL_CODE(id) \
- CTL_CODE (FILE_DEVICE_KEYBOARD, (id), METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
-
-
-#define IOCTL_GET_PHYSICAL_DESCRIPTOR HID_OUT_CTL_CODE(102)
-#define IOCTL_HID_FLUSH_QUEUE HID_CTL_CODE(101)
-#define IOCTL_HID_GET_COLLECTION_DESCRIPTOR HID_CTL_CODE(100)
-#define IOCTL_HID_GET_COLLECTION_INFORMATION HID_BUFFER_CTL_CODE(106)
-#define IOCTL_HID_GET_FEATURE HID_OUT_CTL_CODE(100)
-#define IOCTL_HID_GET_HARDWARE_ID HID_OUT_CTL_CODE(103)
-#define IOCTL_HID_GET_INDEXED_STRING HID_OUT_CTL_CODE(120)
-#define IOCTL_HID_GET_INPUT_REPORT HID_OUT_CTL_CODE(104)
-#define IOCTL_HID_GET_MANUFACTURER_STRING HID_OUT_CTL_CODE(110)
-#define IOCTL_GET_NUM_DEVICE_INPUT_BUFFERS HID_BUFFER_CTL_CODE(104)
-#define IOCTL_HID_GET_POLL_FREQUENCY_MSEC HID_BUFFER_CTL_CODE(102)
-#define IOCTL_HID_GET_PRODUCT_STRING HID_OUT_CTL_CODE(111)
-#define IOCTL_HID_GET_SERIALNUMBER_STRING HID_OUT_CTL_CODE(112)
-#define IOCTL_HID_SET_FEATURE HID_IN_CTL_CODE(100)
-#define IOCTL_SET_NUM_DEVICE_INPUT_BUFFERS HID_BUFFER_CTL_CODE(105)
-#define IOCTL_HID_SET_OUTPUT_REPORT HID_IN_CTL_CODE(101)
-#define IOCTL_HID_SET_POLL_FREQUENCY_MSEC HID_BUFFER_CTL_CODE(103)
-
-#define IOCTL_HID_GET_DRIVER_CONFIG HID_BUFFER_CTL_CODE(100)
-#define IOCTL_HID_SET_DRIVER_CONFIG HID_BUFFER_CTL_CODE(101)
-#define IOCTL_HID_GET_MS_GENRE_DESCRIPTOR HID_OUT_CTL_CODE(121)
-
-
-enum DeviceObjectState {
- DeviceObjectStarted = 0,
- DeviceObjectStopped,
- DeviceObjectRemoved
-};
-
-typedef VOID DDKAPI (*PHID_STATUS_CHANGE)(
- PVOID Context,
- enum DeviceObjectState State);
-
-typedef NTSTATUS DDKAPI (*PHIDP_GETCAPS)(
- /*IN*/ PHIDP_PREPARSED_DATA PreparsedData,
- /*OUT*/ PHIDP_CAPS Capabilities);
-
-typedef struct _HID_COLLECTION_INFORMATION {
- ULONG DescriptorSize;
- BOOLEAN Polled;
- UCHAR Reserved1[1];
- USHORT VendorID;
- USHORT ProductID;
- USHORT VersionNumber;
-} HID_COLLECTION_INFORMATION, *PHID_COLLECTION_INFORMATION;
-
-typedef struct _HID_DRIVER_CONFIG {
- ULONG Size;
- ULONG RingBufferSize;
-} HID_DRIVER_CONFIG, *PHID_DRIVER_CONFIG;
-
-typedef struct _HID_INTERFACE_HIDPARSE {
-#ifdef __cplusplus
- INTERFACE i;
-#else
- /* GCC doesn't support including unnamed structs, so INTERFACE is
- expanded here */
- USHORT Size;
- USHORT Version;
- PVOID Context;
- PINTERFACE_REFERENCE InterfaceReference;
- PINTERFACE_DEREFERENCE InterfaceDereference;
-#endif
- PHIDP_GETCAPS HidpGetCaps;
-} HID_INTERFACE_HIDPARSE, *PHID_INTERFACE_HIDPARSE;
-
-typedef struct _HID_INTERFACE_NOTIFY_PNP {
-#ifdef __cplusplus
- INTERFACE i;
-#else
- /* GCC doesn't support including unnamed structs, so INTERFACE is
- expanded here */
- USHORT Size;
- USHORT Version;
- PVOID Context;
- PINTERFACE_REFERENCE InterfaceReference;
- PINTERFACE_DEREFERENCE InterfaceDereference;
-#endif
- PHID_STATUS_CHANGE StatusChangeFn;
- PVOID CallbackContext;
-} HID_INTERFACE_NOTIFY_PNP, *PHID_INTERFACE_NOTIFY_PNP;
-
-typedef struct _HID_XFER_PACKET {
- PUCHAR reportBuffer;
- ULONG reportBufferLen;
- UCHAR reportId;
-} HID_XFER_PACKET, *PHID_XFER_PACKET;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __HIDCLASS_H */
diff --git a/winsup/w32api/include/ddk/hidpi.h b/winsup/w32api/include/ddk/hidpi.h
deleted file mode 100644
index 10ea48c..0000000
--- a/winsup/w32api/include/ddk/hidpi.h
+++ /dev/null
@@ -1,604 +0,0 @@
-/*
- * hidpi.h
- *
- * Public Interface for HID parsing library.
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __HIDPI_H
-#define __HIDPI_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include "hidusage.h"
-
-#if defined(_HIDPI_)
- #define HIDAPI DECLSPEC_EXPORT
-#else
- #define HIDAPI DECLSPEC_IMPORT
-#endif
-
-typedef PUCHAR PHIDP_REPORT_DESCRIPTOR;
-typedef struct _HIDP_PREPARSED_DATA * PHIDP_PREPARSED_DATA;
-
-typedef struct _HIDP_UNKNOWN_TOKEN {
- UCHAR Token;
- UCHAR Reserved[3];
- ULONG BitField;
-} HIDP_UNKNOWN_TOKEN, *PHIDP_UNKNOWN_TOKEN;
-
-typedef enum _HIDP_KEYBOARD_DIRECTION {
- HidP_Keyboard_Break,
- HidP_Keyboard_Make
-} HIDP_KEYBOARD_DIRECTION;
-
-typedef struct _HIDP_KEYBOARD_MODIFIER_STATE {
- _ANONYMOUS_UNION union {
- _ANONYMOUS_STRUCT struct {
- ULONG LeftControl : 1;
- ULONG LeftShift : 1;
- ULONG LeftAlt : 1;
- ULONG LeftGUI : 1;
- ULONG RightControl : 1;
- ULONG RightShift : 1;
- ULONG RightAlt : 1;
- ULONG RigthGUI : 1;
- ULONG CapsLock : 1;
- ULONG ScollLock : 1;
- ULONG NumLock : 1;
- ULONG Reserved : 21;
- } DUMMYSTRUCTNAME;
- ULONG ul;
- } DUMMYUNIONNAME;
-} HIDP_KEYBOARD_MODIFIER_STATE, *PHIDP_KEYBOARD_MODIFIER_STATE;
-
-typedef BOOLEAN (DDKAPI *PHIDP_INSERT_SCANCODES)(
- /*IN*/ PVOID Context,
- /*IN*/ PCHAR NewScanCodes,
- /*IN*/ ULONG Length);
-
-typedef struct _USAGE_AND_PAGE {
- USAGE Usage;
- USAGE UsagePage;
-} USAGE_AND_PAGE, *PUSAGE_AND_PAGE;
-
-HIDAPI
-NTSTATUS
-DDKAPI
-HidP_TranslateUsageAndPagesToI8042ScanCodes(
- /*IN*/ PUSAGE_AND_PAGE ChangedUsageList,
- /*IN*/ ULONG UsageListLength,
- /*IN*/ HIDP_KEYBOARD_DIRECTION KeyAction,
- /*IN OUT*/ PHIDP_KEYBOARD_MODIFIER_STATE ModifierState,
- /*IN*/ PHIDP_INSERT_SCANCODES InsertCodesProcedure,
- /*IN*/ PVOID InsertCodesContext);
-
-HIDAPI
-NTSTATUS
-DDKAPI
-HidP_TranslateUsagesToI8042ScanCodes(
- /*IN*/ PUSAGE ChangedUsageList,
- /*IN*/ ULONG UsageListLength,
- /*IN*/ HIDP_KEYBOARD_DIRECTION KeyAction,
- /*IN OUT*/ PHIDP_KEYBOARD_MODIFIER_STATE ModifierState,
- /*IN*/ PHIDP_INSERT_SCANCODES InsertCodesProcedure,
- /*IN*/ PVOID InsertCodesContext);
-
-typedef struct _HIDP_BUTTON_CAPS {
- USAGE UsagePage;
- UCHAR ReportID;
- BOOLEAN IsAlias;
- USHORT BitField;
- USHORT LinkCollection;
- USAGE LinkUsage;
- USAGE LinkUsagePage;
- BOOLEAN IsRange;
- BOOLEAN IsStringRange;
- BOOLEAN IsDesignatorRange;
- BOOLEAN IsAbsolute;
- ULONG Reserved[10];
- _ANONYMOUS_UNION union {
- struct {
- USAGE UsageMin, UsageMax;
- USHORT StringMin, StringMax;
- USHORT DesignatorMin, DesignatorMax;
- USHORT DataIndexMin, DataIndexMax;
- } Range;
- struct {
- USAGE Usage, Reserved1;
- USHORT StringIndex, Reserved2;
- USHORT DesignatorIndex, Reserved3;
- USHORT DataIndex, Reserved4;
- } NotRange;
- } DUMMYUNIONNAME;
-} HIDP_BUTTON_CAPS, *PHIDP_BUTTON_CAPS;
-
-typedef struct _HIDP_CAPS {
- USAGE Usage;
- USAGE UsagePage;
- USHORT InputReportByteLength;
- USHORT OutputReportByteLength;
- USHORT FeatureReportByteLength;
- USHORT Reserved[17];
- USHORT NumberLinkCollectionNodes;
- USHORT NumberInputButtonCaps;
- USHORT NumberInputValueCaps;
- USHORT NumberInputDataIndices;
- USHORT NumberOutputButtonCaps;
- USHORT NumberOutputValueCaps;
- USHORT NumberOutputDataIndices;
- USHORT NumberFeatureButtonCaps;
- USHORT NumberFeatureValueCaps;
- USHORT NumberFeatureDataIndices;
-} HIDP_CAPS, *PHIDP_CAPS;
-
-typedef struct _HIDP_DATA {
- USHORT DataIndex;
- USHORT Reserved;
- _ANONYMOUS_UNION union {
- ULONG RawValue;
- BOOLEAN On;
- } DUMMYUNIONNAME;
-} HIDP_DATA, *PHIDP_DATA;
-
-typedef struct _HIDP_EXTENDED_ATTRIBUTES {
- UCHAR NumGlobalUnknowns;
- UCHAR Reserved[3];
- PHIDP_UNKNOWN_TOKEN GlobalUnknowns;
- ULONG Data[1];
-} HIDP_EXTENDED_ATTRIBUTES, *PHIDP_EXTENDED_ATTRIBUTES;
-
-#define HIDP_LINK_COLLECTION_ROOT ((USHORT) -1)
-#define HIDP_LINK_COLLECTION_UNSPECIFIED ((USHORT) 0)
-
-typedef struct _HIDP_LINK_COLLECTION_NODE {
- USAGE LinkUsage;
- USAGE LinkUsagePage;
- USHORT Parent;
- USHORT NumberOfChildren;
- USHORT NextSibling;
- USHORT FirstChild;
- ULONG CollectionType: 8;
- ULONG IsAlias: 1;
- ULONG Reserved: 23;
- PVOID UserContext;
-} HIDP_LINK_COLLECTION_NODE, *PHIDP_LINK_COLLECTION_NODE;
-
-typedef struct _HIDP_VALUE_CAPS {
- USAGE UsagePage;
- UCHAR ReportID;
- BOOLEAN IsAlias;
- USHORT BitField;
- USHORT LinkCollection;
- USAGE LinkUsage;
- USAGE LinkUsagePage;
- BOOLEAN IsRange;
- BOOLEAN IsStringRange;
- BOOLEAN IsDesignatorRange;
- BOOLEAN IsAbsolute;
- BOOLEAN HasNull;
- UCHAR Reserved;
- USHORT BitSize;
- USHORT ReportCount;
- USHORT Reserved2[5];
- ULONG UnitsExp;
- ULONG Units;
- LONG LogicalMin, LogicalMax;
- LONG PhysicalMin, PhysicalMax;
- _ANONYMOUS_UNION union {
- struct {
- USAGE UsageMin, UsageMax;
- USHORT StringMin, StringMax;
- USHORT DesignatorMin, DesignatorMax;
- USHORT DataIndexMin, DataIndexMax;
- } Range;
- struct {
- USAGE Usage, Reserved1;
- USHORT StringIndex, Reserved2;
- USHORT DesignatorIndex, Reserved3;
- USHORT DataIndex, Reserved4;
- } NotRange;
- } DUMMYUNIONNAME;
-} HIDP_VALUE_CAPS, *PHIDP_VALUE_CAPS;
-
-typedef enum _HIDP_REPORT_TYPE {
- HidP_Input,
- HidP_Output,
- HidP_Feature
-} HIDP_REPORT_TYPE;
-
-#define FACILITY_HID_ERROR_CODE 0x11
-
-#define HIDP_ERROR_CODES(SEV, CODE) \
- ((NTSTATUS) (((SEV) << 28) | (FACILITY_HID_ERROR_CODE << 16) | (CODE)))
-
-#define HIDP_STATUS_SUCCESS (HIDP_ERROR_CODES(0x0, 0))
-#define HIDP_STATUS_NULL (HIDP_ERROR_CODES(0x8, 1))
-#define HIDP_STATUS_INVALID_PREPARSED_DATA (HIDP_ERROR_CODES(0xC, 1))
-#define HIDP_STATUS_INVALID_REPORT_TYPE (HIDP_ERROR_CODES(0xC, 2))
-#define HIDP_STATUS_INVALID_REPORT_LENGTH (HIDP_ERROR_CODES(0xC, 3))
-#define HIDP_STATUS_USAGE_NOT_FOUND (HIDP_ERROR_CODES(0xC, 4))
-#define HIDP_STATUS_VALUE_OUT_OF_RANGE (HIDP_ERROR_CODES(0xC, 5))
-#define HIDP_STATUS_BAD_LOG_PHY_VALUES (HIDP_ERROR_CODES(0xC, 6))
-#define HIDP_STATUS_BUFFER_TOO_SMALL (HIDP_ERROR_CODES(0xC, 7))
-#define HIDP_STATUS_INTERNAL_ERROR (HIDP_ERROR_CODES(0xC, 8))
-#define HIDP_STATUS_I8042_TRANS_UNKNOWN (HIDP_ERROR_CODES(0xC, 9))
-#define HIDP_STATUS_INCOMPATIBLE_REPORT_ID (HIDP_ERROR_CODES(0xC, 0xA))
-#define HIDP_STATUS_NOT_VALUE_ARRAY (HIDP_ERROR_CODES(0xC, 0xB))
-#define HIDP_STATUS_IS_VALUE_ARRAY (HIDP_ERROR_CODES(0xC, 0xC))
-#define HIDP_STATUS_DATA_INDEX_NOT_FOUND (HIDP_ERROR_CODES(0xC, 0xD))
-#define HIDP_STATUS_DATA_INDEX_OUT_OF_RANGE (HIDP_ERROR_CODES(0xC, 0xE))
-#define HIDP_STATUS_BUTTON_NOT_PRESSED (HIDP_ERROR_CODES(0xC, 0xF))
-#define HIDP_STATUS_REPORT_DOES_NOT_EXIST (HIDP_ERROR_CODES(0xC, 0x10))
-#define HIDP_STATUS_NOT_IMPLEMENTED (HIDP_ERROR_CODES(0xC, 0x20))
-#define HIDP_STATUS_I8242_TRANS_UNKNOWN HIDP_STATUS_I8042_TRANS_UNKNOWN
-
-
-
-/*
- * NTSTATUS
- * HidP_GetButtonCaps(
- * IN HIDP_REPORT_TYPE ReportType,
- * OUT PHIDP_BUTTON_CAPS ButtonCaps,
- * IN OUT PULONG ButtonCapsLength,
- * IN PHIDP_PREPARSED_DATA PreparsedData);
- */
-#define HidP_GetButtonCaps(_Type_, _Caps_, _Len_, _Data_) \
- HidP_GetSpecificButtonCaps(_Type_, 0, 0, 0, _Caps_, _Len_, _Data_)
-
-/*
- * NTSTATUS
- * HidP_GetButtons(
- * IN HIDP_REPORT_TYPE ReportType,
- * IN USAGE UsagePage,
- * IN USHORT LinkCollection,
- * OUT USAGE *UsageList,
- * IN OUT ULONG *UsageLength,
- * IN PHIDP_PREPARSED_DATA PreparsedData,
- * IN PCHAR Report,
- * IN ULONG ReportLength);
- */
-#define HidP_GetButtons(Rty, UPa, LCo, ULi, ULe, Ppd, Rep, RLe) \
- HidP_GetUsages(Rty, UPa, LCo, ULi, ULe, Ppd, Rep, RLe)
-
-#define HidP_GetButtonListLength(RTy, UPa, Ppd) \
- HidP_GetUsageListLength(Rty, UPa, Ppd)
-
-
-/*
- * NTSTATUS
- * HidP_GetButtonsEx(
- * IN HIDP_REPORT_TYPE ReportType,
- * IN USHORT LinkCollection,
- * OUT PUSAGE_AND_PAGE ButtonList,
- * IN OUT ULONG *UsageLength,
- * IN PHIDP_PREPARSED_DATA PreparsedData,
- * IN PCHAR Report,
- * IN ULONG ReportLength);
- */
-#define HidP_GetButtonsEx(RT, LC, BL, UL, PD, R, RL) \
- HidP_GetUsagesEx(RT, LC, BL, UL, PD, R, RL)
-
-HIDAPI
-NTSTATUS
-DDKAPI
-HidP_GetCaps(
- /*IN*/ PHIDP_PREPARSED_DATA PreparsedData,
- /*OUT*/ PHIDP_CAPS Capabilities);
-
-HIDAPI
-NTSTATUS
-DDKAPI
-HidP_GetData(
- /*IN*/ HIDP_REPORT_TYPE ReportType,
- /*OUT*/ PHIDP_DATA DataList,
- /*IN OUT*/ PULONG DataLength,
- /*IN*/ PHIDP_PREPARSED_DATA PreparsedData,
- /*IN*/ PCHAR Report,
- /*IN*/ ULONG ReportLength);
-
-HIDAPI
-NTSTATUS
-DDKAPI
-HidP_GetExtendedAttributes(
- /*IN*/ HIDP_REPORT_TYPE ReportType,
- /*IN*/ USHORT DataIndex,
- /*IN*/ PHIDP_PREPARSED_DATA PreparsedData,
- /*OUT*/ PHIDP_EXTENDED_ATTRIBUTES Attributes,
- /*IN OUT*/ PULONG LengthAttributes);
-
-HIDAPI
-NTSTATUS
-DDKAPI
-HidP_GetLinkCollectionNodes(
- /*OUT*/ PHIDP_LINK_COLLECTION_NODE LinkCollectionNodes,
- /*IN OUT*/ PULONG LinkCollectionNodesLength,
- /*IN*/ PHIDP_PREPARSED_DATA PreparsedData);
-
-HIDAPI
-NTSTATUS
-DDKAPI
-HidP_GetScaledUsageValue(
- /*IN*/ HIDP_REPORT_TYPE ReportType,
- /*IN*/ USAGE UsagePage,
- /*IN*/ USHORT LinkCollection /*OPTIONAL*/,
- /*IN*/ USAGE Usage,
- /*OUT*/ PLONG UsageValue,
- /*IN*/ PHIDP_PREPARSED_DATA PreparsedData,
- /*IN*/ PCHAR Report,
- /*IN*/ ULONG ReportLength);
-
-HIDAPI
-NTSTATUS
-DDKAPI
-HidP_GetSpecificButtonCaps(
- /*IN*/ HIDP_REPORT_TYPE ReportType,
- /*IN*/ USAGE UsagePage,
- /*IN*/ USHORT LinkCollection,
- /*IN*/ USAGE Usage,
- /*OUT*/ PHIDP_BUTTON_CAPS ButtonCaps,
- /*IN OUT*/ PULONG ButtonCapsLength,
- /*IN*/ PHIDP_PREPARSED_DATA PreparsedData);
-
-HIDAPI
-NTSTATUS
-DDKAPI
-HidP_GetSpecificValueCaps(
- /*IN*/ HIDP_REPORT_TYPE ReportType,
- /*IN*/ USAGE UsagePage,
- /*IN*/ USHORT LinkCollection,
- /*IN*/ USAGE Usage,
- /*OUT*/ PHIDP_VALUE_CAPS ValueCaps,
- /*IN OUT*/ PULONG ValueCapsLength,
- /*IN*/ PHIDP_PREPARSED_DATA PreparsedData);
-
-HIDAPI
-NTSTATUS
-DDKAPI
-HidP_GetUsages(
- /*IN*/ HIDP_REPORT_TYPE ReportType,
- /*IN*/ USAGE UsagePage,
- /*IN*/ USHORT LinkCollection /*OPTIONAL*/,
- /*OUT*/ USAGE *UsageList,
- /*IN OUT*/ ULONG *UsageLength,
- /*IN*/ PHIDP_PREPARSED_DATA PreparsedData,
- /*IN*/ PCHAR Report,
- /*IN*/ ULONG ReportLength);
-
-HIDAPI
-NTSTATUS
-DDKAPI
-HidP_GetUsagesEx(
- /*IN*/ HIDP_REPORT_TYPE ReportType,
- /*IN*/ USHORT LinkCollection,
- /*OUT*/ PUSAGE_AND_PAGE ButtonList,
- /*IN OUT*/ ULONG *UsageLength,
- /*IN*/ PHIDP_PREPARSED_DATA PreparsedData,
- /*IN*/ PCHAR Report,
- /*IN*/ ULONG ReportLength);
-
-HIDAPI
-NTSTATUS
-DDKAPI
-HidP_GetUsageValue(
- /*IN*/ HIDP_REPORT_TYPE ReportType,
- /*IN*/ USAGE UsagePage,
- /*IN*/ USHORT LinkCollection,
- /*IN*/ USAGE Usage,
- /*OUT*/ PULONG UsageValue,
- /*IN*/ PHIDP_PREPARSED_DATA PreparsedData,
- /*IN*/ PCHAR Report,
- /*IN*/ ULONG ReportLength);
-
-HIDAPI
-NTSTATUS
-DDKAPI
-HidP_GetUsageValueArray(
- /*IN*/ HIDP_REPORT_TYPE ReportType,
- /*IN*/ USAGE UsagePage,
- /*IN*/ USHORT LinkCollection /*OPTIONAL*/,
- /*IN*/ USAGE Usage,
- /*OUT*/ PCHAR UsageValue,
- /*IN*/ USHORT UsageValueByteLength,
- /*IN*/ PHIDP_PREPARSED_DATA PreparsedData,
- /*IN*/ PCHAR Report,
- /*IN*/ ULONG ReportLength);
-
-/*
- * NTSTATUS
- * HidP_GetValueCaps(
- * IN HIDP_REPORT_TYPE ReportType,
- * OUT PHIDP_VALUE_CAPS ValueCaps,
- * IN OUT PULONG ValueCapsLength,
- * IN PHIDP_PREPARSED_DATA PreparsedData);
- */
-#define HidP_GetValueCaps(_Type_, _Caps_, _Len_, _Data_) \
- HidP_GetSpecificValueCaps (_Type_, 0, 0, 0, _Caps_, _Len_, _Data_)
-
-HIDAPI
-NTSTATUS
-DDKAPI
-HidP_InitializeReportForID(
- /*IN*/ HIDP_REPORT_TYPE ReportType,
- /*IN*/ UCHAR ReportID,
- /*IN*/ PHIDP_PREPARSED_DATA PreparsedData,
- /*IN OUT*/ PCHAR Report,
- /*IN*/ ULONG ReportLength);
-
-/*
- * BOOLEAN
- * HidP_IsSameUsageAndPage(
- * USAGE_AND_PAGE u1,
- * USAGE_AND_PAGE u2);
- */
-#define HidP_IsSameUsageAndPage(u1, u2) ((* (PULONG) &u1) == (* (PULONG) &u2))
-
-HIDAPI
-ULONG
-DDKAPI
-HidP_MaxDataListLength(
- /*IN*/ HIDP_REPORT_TYPE ReportType,
- /*IN*/ PHIDP_PREPARSED_DATA PreparsedData);
-
-HIDAPI
-ULONG
-DDKAPI
-HidP_MaxUsageListLength(
- /*IN*/ HIDP_REPORT_TYPE ReportType,
- /*IN*/ USAGE UsagePage /*OPTIONAL*/,
- /*IN*/ PHIDP_PREPARSED_DATA PreparsedData);
-
-/*
- * NTSTATUS
- * HidP_SetButtons(
- * IN HIDP_REPORT_TYPE ReportType,
- * IN USAGE UsagePage,
- * IN USHORT LinkCollection,
- * IN PUSAGE UsageList,
- * IN OUT PULONG UsageLength,
- * IN PHIDP_PREPARSED_DATA PreparsedData,
- * IN OUT PCHAR Report,
- * IN ULONG ReportLength);
- */
-#define HidP_SetButtons(RT, UP, LC, UL1, UL2, PD, R, RL) \
- HidP_SetUsages(RT, UP, LC, UL1, UL2, PD, R, RL)
-
-HIDAPI
-NTSTATUS
-DDKAPI
-HidP_SetData(
- /*IN*/ HIDP_REPORT_TYPE ReportType,
- /*IN*/ PHIDP_DATA DataList,
- /*IN OUT*/ PULONG DataLength,
- /*IN*/ PHIDP_PREPARSED_DATA PreparsedData,
- /*IN OUT*/ PCHAR Report,
- /*IN*/ ULONG ReportLength);
-
-HIDAPI
-NTSTATUS
-DDKAPI
-HidP_SetScaledUsageValue(
- /*IN*/ HIDP_REPORT_TYPE ReportType,
- /*IN*/ USAGE UsagePage,
- /*IN*/ USHORT LinkCollection /*OPTIONAL*/,
- /*IN*/ USAGE Usage,
- /*IN*/ LONG UsageValue,
- /*IN*/ PHIDP_PREPARSED_DATA PreparsedData,
- /*IN OUT*/ PCHAR Report,
- /*IN*/ ULONG ReportLength);
-
-HIDAPI
-NTSTATUS
-DDKAPI
-HidP_SetUsages(
- /*IN*/ HIDP_REPORT_TYPE ReportType,
- /*IN*/ USAGE UsagePage,
- /*IN*/ USHORT LinkCollection /*OPTIONAL*/,
- /*IN*/ PUSAGE UsageList,
- /*IN OUT*/ PULONG UsageLength,
- /*IN*/ PHIDP_PREPARSED_DATA PreparsedData,
- /*IN OUT*/ PCHAR Report,
- /*IN*/ ULONG ReportLength);
-
-HIDAPI
-NTSTATUS
-DDKAPI
-HidP_SetUsageValue(
- /*IN*/ HIDP_REPORT_TYPE ReportType,
- /*IN*/ USAGE UsagePage,
- /*IN*/ USHORT LinkCollection,
- /*IN*/ USAGE Usage,
- /*IN*/ ULONG UsageValue,
- /*IN*/ PHIDP_PREPARSED_DATA PreparsedData,
- /*IN OUT*/ PCHAR Report,
- /*IN*/ ULONG ReportLength);
-
-HIDAPI
-NTSTATUS
-DDKAPI
-HidP_SetUsageValueArray(
- /*IN*/ HIDP_REPORT_TYPE ReportType,
- /*IN*/ USAGE UsagePage,
- /*IN*/ USHORT LinkCollection /*OPTIONAL*/,
- /*IN*/ USAGE Usage,
- /*IN*/ PCHAR UsageValue,
- /*IN*/ USHORT UsageValueByteLength,
- /*IN*/ PHIDP_PREPARSED_DATA PreparsedData,
- /*OUT*/ PCHAR Report,
- /*IN*/ ULONG ReportLength);
-
-/*
- * NTSTATUS
- * HidP_UnsetButtons(
- * IN HIDP_REPORT_TYPE ReportType,
- * IN USAGE UsagePage,
- * IN USHORT LinkCollection,
- * IN PUSAGE UsageList,
- * IN OUT PULONG UsageLength,
- * IN PHIDP_PREPARSED_DATA PreparsedData,
- * IN OUT PCHAR Report,
- * IN ULONG ReportLength);
- */
-#define HidP_UnsetButtons(RT, UP, LC, UL1, UL2, PD, R, RL) \
- HidP_UnsetUsages(RT, UP, LC, UL1, UL2, PD, R, RL)
-
-HIDAPI
-NTSTATUS
-DDKAPI
-HidP_UnsetUsages(
- /*IN*/ HIDP_REPORT_TYPE ReportType,
- /*IN*/ USAGE UsagePage,
- /*IN*/ USHORT LinkCollection,
- /*IN*/ PUSAGE UsageList,
- /*IN OUT*/ PULONG UsageLength,
- /*IN*/ PHIDP_PREPARSED_DATA PreparsedData,
- /*IN OUT*/ PCHAR Report,
- /*IN*/ ULONG ReportLength);
-
-HIDAPI
-NTSTATUS
-DDKAPI
-HidP_UsageAndPageListDifference(
- /*IN*/ PUSAGE_AND_PAGE PreviousUsageList,
- /*IN*/ PUSAGE_AND_PAGE CurrentUsageList,
- /*OUT*/ PUSAGE_AND_PAGE BreakUsageList,
- /*OUT*/ PUSAGE_AND_PAGE MakeUsageList,
- /*IN*/ ULONG UsageListLength);
-
-HIDAPI
-NTSTATUS
-DDKAPI
-HidP_UsageListDifference(
- /*IN*/ PUSAGE PreviousUsageList,
- /*IN*/ PUSAGE CurrentUsageList,
- /*OUT*/ PUSAGE BreakUsageList,
- /*OUT*/ PUSAGE MakeUsageList,
- /*IN*/ ULONG UsageListLength);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __HIDPI_H */
diff --git a/winsup/w32api/include/ddk/hidsdi.h b/winsup/w32api/include/ddk/hidsdi.h
deleted file mode 100755
index eee6a96..0000000
--- a/winsup/w32api/include/ddk/hidsdi.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * hidsdi.h
- *
- * This file is part of the w32api package.
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef _HIDSDI_H
-#define _HIDSDI_H
-
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <ddk/hidusage.h>
-#include <ddk/hidpi.h>
-
-#ifndef WINHIDSDI
-#define WINHIDSDI DECLSPEC_IMPORT
-#endif
-
-#include <pshpack4.h>
-
-typedef struct _HIDD_CONFIGURATION {
- PVOID cookie;
- ULONG size;
- ULONG RingBufferSize;
-} HIDD_CONFIGURATION, *PHIDD_CONFIGURATION;
-
-typedef struct _HIDD_ATTRIBUTES {
- ULONG Size;
- USHORT VendorID;
- USHORT ProductID;
- USHORT VersionNumber;
-} HIDD_ATTRIBUTES, *PHIDD_ATTRIBUTES;
-
-WINHIDSDI BOOL WINAPI HidD_GetAttributes (HANDLE, PHIDD_ATTRIBUTES);
-WINHIDSDI VOID WINAPI HidD_GetHidGuid (LPGUID);
-WINHIDSDI BOOL WINAPI HidD_GetPreparsedData(HANDLE, PHIDP_PREPARSED_DATA *);
-WINHIDSDI BOOL WINAPI HidD_FreePreparsedData(PHIDP_PREPARSED_DATA);
-WINHIDSDI BOOL WINAPI HidD_FlushQueue (HANDLE);
-WINHIDSDI BOOL WINAPI HidD_GetConfiguration (HANDLE, PHIDD_CONFIGURATION, ULONG);
-WINHIDSDI BOOL WINAPI HidD_SetConfiguration (HANDLE, PHIDD_CONFIGURATION, ULONG);
-WINHIDSDI BOOL WINAPI HidD_GetFeature (HANDLE, PVOID, ULONG);
-WINHIDSDI BOOL WINAPI HidD_SetFeature (HANDLE, PVOID, ULONG);
-WINHIDSDI BOOL WINAPI HidD_GetNumInputBuffers (HANDLE, PULONG);
-WINHIDSDI BOOL WINAPI HidD_SetNumInputBuffers (HANDLE HidDeviceObject, ULONG);
-WINHIDSDI BOOL WINAPI HidD_GetPhysicalDescriptor (HANDLE, PVOID, ULONG);
-WINHIDSDI BOOL WINAPI HidD_GetManufacturerString (HANDLE, PVOID, ULONG);
-WINHIDSDI BOOL WINAPI HidD_GetProductString ( HANDLE, PVOID, ULONG);
-WINHIDSDI BOOL WINAPI HidD_GetIndexedString ( HANDLE, ULONG, PVOID, ULONG);
-WINHIDSDI BOOL WINAPI HidD_GetSerialNumberString (HANDLE, PVOID, ULONG);
-
-#include <poppack.h>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _HIDSDI_H */
diff --git a/winsup/w32api/include/ddk/hidusage.h b/winsup/w32api/include/ddk/hidusage.h
deleted file mode 100644
index 1f82af9..0000000
--- a/winsup/w32api/include/ddk/hidusage.h
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * hidusage.h
- *
- * HID usages
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __HIDUSAGE_H
-#define __HIDUSAGE_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef USHORT USAGE, *PUSAGE;
-
-#define HID_USAGE_GENERIC_POINTER ((USAGE) 0x01)
-#define HID_USAGE_GENERIC_MOUSE ((USAGE) 0x02)
-#define HID_USAGE_GENERIC_JOYSTICK ((USAGE) 0x04)
-#define HID_USAGE_GENERIC_GAMEPAD ((USAGE) 0x05)
-#define HID_USAGE_GENERIC_KEYBOARD ((USAGE) 0x06)
-#define HID_USAGE_GENERIC_KEYPAD ((USAGE) 0x07)
-#define HID_USAGE_GENERIC_SYSTEM_CTL ((USAGE) 0x80)
-#define HID_USAGE_GENERIC_X ((USAGE) 0x30)
-#define HID_USAGE_GENERIC_Y ((USAGE) 0x31)
-#define HID_USAGE_GENERIC_Z ((USAGE) 0x32)
-#define HID_USAGE_GENERIC_RX ((USAGE) 0x33)
-#define HID_USAGE_GENERIC_RY ((USAGE) 0x34)
-#define HID_USAGE_GENERIC_RZ ((USAGE) 0x35)
-#define HID_USAGE_GENERIC_SLIDER ((USAGE) 0x36)
-#define HID_USAGE_GENERIC_DIAL ((USAGE) 0x37)
-#define HID_USAGE_GENERIC_WHEEL ((USAGE) 0x38)
-#define HID_USAGE_GENERIC_HATSWITCH ((USAGE) 0x39)
-#define HID_USAGE_GENERIC_COUNTED_BUFFER ((USAGE) 0x3A)
-#define HID_USAGE_GENERIC_BYTE_COUNT ((USAGE) 0x3B)
-#define HID_USAGE_GENERIC_MOTION_WAKEUP ((USAGE) 0x3C)
-#define HID_USAGE_GENERIC_VX ((USAGE) 0x40)
-#define HID_USAGE_GENERIC_VY ((USAGE) 0x41)
-#define HID_USAGE_GENERIC_VZ ((USAGE) 0x42)
-#define HID_USAGE_GENERIC_VBRX ((USAGE) 0x43)
-#define HID_USAGE_GENERIC_VBRY ((USAGE) 0x44)
-#define HID_USAGE_GENERIC_VBRZ ((USAGE) 0x45)
-#define HID_USAGE_GENERIC_VNO ((USAGE) 0x46)
-#define HID_USAGE_GENERIC_SYSCTL_POWER ((USAGE) 0x81)
-#define HID_USAGE_GENERIC_SYSCTL_SLEEP ((USAGE) 0x82)
-#define HID_USAGE_GENERIC_SYSCTL_WAKE ((USAGE) 0x83)
-#define HID_USAGE_GENERIC_SYSCTL_CONTEXT_MENU ((USAGE) 0x84)
-#define HID_USAGE_GENERIC_SYSCTL_MAIN_MENU ((USAGE) 0x85)
-#define HID_USAGE_GENERIC_SYSCTL_APP_MENU ((USAGE) 0x86)
-#define HID_USAGE_GENERIC_SYSCTL_HELP_MENU ((USAGE) 0x87)
-#define HID_USAGE_GENERIC_SYSCTL_MENU_EXIT ((USAGE) 0x88)
-#define HID_USAGE_GENERIC_SYSCTL_MENU_SELECT ((USAGE) 0x89)
-#define HID_USAGE_GENERIC_SYSCTL_MENU_RIGHT ((USAGE) 0x8A)
-#define HID_USAGE_GENERIC_SYSCTL_MENU_LEFT ((USAGE) 0x8B)
-#define HID_USAGE_GENERIC_SYSCTL_MENU_UP ((USAGE) 0x8C)
-#define HID_USAGE_GENERIC_SYSCTL_MENU_DOWN ((USAGE) 0x8D)
-
-#define HID_USAGE_KEYBOARD_NOEVENT ((USAGE) 0x00)
-#define HID_USAGE_KEYBOARD_ROLLOVER ((USAGE) 0x01)
-#define HID_USAGE_KEYBOARD_POSTFAIL ((USAGE) 0x02)
-#define HID_USAGE_KEYBOARD_UNDEFINED ((USAGE) 0x03)
-#define HID_USAGE_KEYBOARD_aA ((USAGE) 0x04)
-#define HID_USAGE_KEYBOARD_zZ ((USAGE) 0x1D)
-#define HID_USAGE_KEYBOARD_ONE ((USAGE) 0x1E)
-#define HID_USAGE_KEYBOARD_ZERO ((USAGE) 0x27)
-#define HID_USAGE_KEYBOARD_LCTRL ((USAGE) 0xE0)
-#define HID_USAGE_KEYBOARD_LSHFT ((USAGE) 0xE1)
-#define HID_USAGE_KEYBOARD_LALT ((USAGE) 0xE2)
-#define HID_USAGE_KEYBOARD_LGUI ((USAGE) 0xE3)
-#define HID_USAGE_KEYBOARD_RCTRL ((USAGE) 0xE4)
-#define HID_USAGE_KEYBOARD_RSHFT ((USAGE) 0xE5)
-#define HID_USAGE_KEYBOARD_RALT ((USAGE) 0xE6)
-#define HID_USAGE_KEYBOARD_RGUI ((USAGE) 0xE7)
-#define HID_USAGE_KEYBOARD_SCROLL_LOCK ((USAGE) 0x47)
-#define HID_USAGE_KEYBOARD_NUM_LOCK ((USAGE) 0x53)
-#define HID_USAGE_KEYBOARD_CAPS_LOCK ((USAGE) 0x39)
-#define HID_USAGE_KEYBOARD_F1 ((USAGE) 0x3A)
-#define HID_USAGE_KEYBOARD_F12 ((USAGE) 0x45)
-#define HID_USAGE_KEYBOARD_RETURN ((USAGE) 0x28)
-#define HID_USAGE_KEYBOARD_ESCAPE ((USAGE) 0x29)
-#define HID_USAGE_KEYBOARD_DELETE ((USAGE) 0x2A)
-#define HID_USAGE_KEYBOARD_PRINT_SCREEN ((USAGE) 0x46)
-
-#define HID_USAGE_LED_NUM_LOCK ((USAGE) 0x01)
-#define HID_USAGE_LED_CAPS_LOCK ((USAGE) 0x02)
-#define HID_USAGE_LED_SCROLL_LOCK ((USAGE) 0x03)
-#define HID_USAGE_LED_COMPOSE ((USAGE) 0x04)
-#define HID_USAGE_LED_KANA ((USAGE) 0x05)
-#define HID_USAGE_LED_POWER ((USAGE) 0x06)
-#define HID_USAGE_LED_SHIFT ((USAGE) 0x07)
-#define HID_USAGE_LED_DO_NOT_DISTURB ((USAGE) 0x08)
-#define HID_USAGE_LED_MUTE ((USAGE) 0x09)
-#define HID_USAGE_LED_TONE_ENABLE ((USAGE) 0x0A)
-#define HID_USAGE_LED_HIGH_CUT_FILTER ((USAGE) 0x0B)
-#define HID_USAGE_LED_LOW_CUT_FILTER ((USAGE) 0x0C)
-#define HID_USAGE_LED_EQUALIZER_ENABLE ((USAGE) 0x0D)
-#define HID_USAGE_LED_SOUND_FIELD_ON ((USAGE) 0x0E)
-#define HID_USAGE_LED_SURROUND_FIELD_ON ((USAGE) 0x0F)
-#define HID_USAGE_LED_REPEAT ((USAGE) 0x10)
-#define HID_USAGE_LED_STEREO ((USAGE) 0x11)
-#define HID_USAGE_LED_SAMPLING_RATE_DETECT ((USAGE) 0x12)
-#define HID_USAGE_LED_SPINNING ((USAGE) 0x13)
-#define HID_USAGE_LED_CAV ((USAGE) 0x14)
-#define HID_USAGE_LED_CLV ((USAGE) 0x15)
-#define HID_USAGE_LED_RECORDING_FORMAT_DET ((USAGE) 0x16)
-#define HID_USAGE_LED_OFF_HOOK ((USAGE) 0x17)
-#define HID_USAGE_LED_RING ((USAGE) 0x18)
-#define HID_USAGE_LED_MESSAGE_WAITING ((USAGE) 0x19)
-#define HID_USAGE_LED_DATA_MODE ((USAGE) 0x1A)
-#define HID_USAGE_LED_BATTERY_OPERATION ((USAGE) 0x1B)
-#define HID_USAGE_LED_BATTERY_OK ((USAGE) 0x1C)
-#define HID_USAGE_LED_BATTERY_LOW ((USAGE) 0x1D)
-#define HID_USAGE_LED_SPEAKER ((USAGE) 0x1E)
-#define HID_USAGE_LED_HEAD_SET ((USAGE) 0x1F)
-#define HID_USAGE_LED_HOLD ((USAGE) 0x20)
-#define HID_USAGE_LED_MICROPHONE ((USAGE) 0x21)
-#define HID_USAGE_LED_COVERAGE ((USAGE) 0x22)
-#define HID_USAGE_LED_NIGHT_MODE ((USAGE) 0x23)
-#define HID_USAGE_LED_SEND_CALLS ((USAGE) 0x24)
-#define HID_USAGE_LED_CALL_PICKUP ((USAGE) 0x25)
-#define HID_USAGE_LED_CONFERENCE ((USAGE) 0x26)
-#define HID_USAGE_LED_STAND_BY ((USAGE) 0x27)
-#define HID_USAGE_LED_CAMERA_ON ((USAGE) 0x28)
-#define HID_USAGE_LED_CAMERA_OFF ((USAGE) 0x29)
-#define HID_USAGE_LED_ON_LINE ((USAGE) 0x2A)
-#define HID_USAGE_LED_OFF_LINE ((USAGE) 0x2B)
-#define HID_USAGE_LED_BUSY ((USAGE) 0x2C)
-#define HID_USAGE_LED_READY ((USAGE) 0x2D)
-#define HID_USAGE_LED_PAPER_OUT ((USAGE) 0x2E)
-#define HID_USAGE_LED_PAPER_JAM ((USAGE) 0x2F)
-#define HID_USAGE_LED_REMOTE ((USAGE) 0x30)
-#define HID_USAGE_LED_FORWARD ((USAGE) 0x31)
-#define HID_USAGE_LED_REVERSE ((USAGE) 0x32)
-#define HID_USAGE_LED_STOP ((USAGE) 0x33)
-#define HID_USAGE_LED_REWIND ((USAGE) 0x34)
-#define HID_USAGE_LED_FAST_FORWARD ((USAGE) 0x35)
-#define HID_USAGE_LED_PLAY ((USAGE) 0x36)
-#define HID_USAGE_LED_PAUSE ((USAGE) 0x37)
-#define HID_USAGE_LED_RECORD ((USAGE) 0x38)
-#define HID_USAGE_LED_ERROR ((USAGE) 0x39)
-#define HID_USAGE_LED_SELECTED_INDICATOR ((USAGE) 0x3A)
-#define HID_USAGE_LED_IN_USE_INDICATOR ((USAGE) 0x3B)
-#define HID_USAGE_LED_MULTI_MODE_INDICATOR ((USAGE) 0x3C)
-#define HID_USAGE_LED_INDICATOR_ON ((USAGE) 0x3D)
-#define HID_USAGE_LED_INDICATOR_FLASH ((USAGE) 0x3E)
-#define HID_USAGE_LED_INDICATOR_SLOW_BLINK ((USAGE) 0x3F)
-#define HID_USAGE_LED_INDICATOR_FAST_BLINK ((USAGE) 0x40)
-#define HID_USAGE_LED_INDICATOR_OFF ((USAGE) 0x41)
-#define HID_USAGE_LED_FLASH_ON_TIME ((USAGE) 0x42)
-#define HID_USAGE_LED_SLOW_BLINK_ON_TIME ((USAGE) 0x43)
-#define HID_USAGE_LED_SLOW_BLINK_OFF_TIME ((USAGE) 0x44)
-#define HID_USAGE_LED_FAST_BLINK_ON_TIME ((USAGE) 0x45)
-#define HID_USAGE_LED_FAST_BLINK_OFF_TIME ((USAGE) 0x46)
-#define HID_USAGE_LED_INDICATOR_COLOR ((USAGE) 0x47)
-#define HID_USAGE_LED_RED ((USAGE) 0x48)
-#define HID_USAGE_LED_GREEN ((USAGE) 0x49)
-#define HID_USAGE_LED_AMBER ((USAGE) 0x4A)
-#define HID_USAGE_LED_GENERIC_INDICATOR ((USAGE) 0x3B)
-
-#define HID_USAGE_PAGE_UNDEFINED ((USAGE) 0x00)
-#define HID_USAGE_PAGE_GENERIC ((USAGE) 0x01)
-#define HID_USAGE_PAGE_SIMULATION ((USAGE) 0x02)
-#define HID_USAGE_PAGE_VR ((USAGE) 0x03)
-#define HID_USAGE_PAGE_SPORT ((USAGE) 0x04)
-#define HID_USAGE_PAGE_GAME ((USAGE) 0x05)
-#define HID_USAGE_PAGE_KEYBOARD ((USAGE) 0x07)
-#define HID_USAGE_PAGE_LED ((USAGE) 0x08)
-#define HID_USAGE_PAGE_BUTTON ((USAGE) 0x09)
-#define HID_USAGE_PAGE_ORDINAL ((USAGE) 0x0A)
-#define HID_USAGE_PAGE_TELEPHONY ((USAGE) 0x0B)
-#define HID_USAGE_PAGE_CONSUMER ((USAGE) 0x0C)
-#define HID_USAGE_PAGE_DIGITIZER ((USAGE) 0x0D)
-#define HID_USAGE_PAGE_UNICODE ((USAGE) 0x10)
-#define HID_USAGE_PAGE_ALPHANUMERIC ((USAGE) 0x14)
-
-#define HID_USAGE_TELEPHONY_PHONE ((USAGE) 0x01)
-#define HID_USAGE_TELEPHONY_ANSWERING_MACHINE ((USAGE) 0x02)
-#define HID_USAGE_TELEPHONY_MESSAGE_CONTROLS ((USAGE) 0x03)
-#define HID_USAGE_TELEPHONY_HANDSET ((USAGE) 0x04)
-#define HID_USAGE_TELEPHONY_HEADSET ((USAGE) 0x05)
-#define HID_USAGE_TELEPHONY_KEYPAD ((USAGE) 0x06)
-#define HID_USAGE_TELEPHONY_PROGRAMMABLE_BUTTON ((USAGE) 0x07)
-
-#define HID_USAGE_SIMULATION_RUDDER ((USAGE) 0xBA)
-#define HID_USAGE_SIMULATION_THROTTLE ((USAGE) 0xBB)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __HIDUSAGE_H */
diff --git a/winsup/w32api/include/ddk/kbdmou.h b/winsup/w32api/include/ddk/kbdmou.h
deleted file mode 100644
index 400eac6..0000000
--- a/winsup/w32api/include/ddk/kbdmou.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * kbdmou.h
- *
- * Structures and definitions for Keyboard/Mouse class and port drivers.
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Filip Navara <xnavara@volny.cz>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __KBDMOU_H
-#define __KBDMOU_H
-
-#include <ddk/ntddkbd.h>
-#include <ddk/ntddmou.h>
-
-#define DD_KEYBOARD_PORT_DEVICE_NAME "\\Device\\KeyboardPort"
-#define DD_KEYBOARD_PORT_DEVICE_NAME_U L"\\Device\\KeyboardPort"
-#define DD_KEYBOARD_PORT_BASE_NAME_U L"KeyboardPort"
-#define DD_POINTER_PORT_DEVICE_NAME "\\Device\\PointerPort"
-#define DD_POINTER_PORT_DEVICE_NAME_U L"\\Device\\PointerPort"
-#define DD_POINTER_PORT_BASE_NAME_U L"PointerPort"
-
-#define DD_KEYBOARD_CLASS_BASE_NAME_U L"KeyboardClass"
-#define DD_POINTER_CLASS_BASE_NAME_U L"PointerClass"
-
-#define DD_KEYBOARD_RESOURCE_CLASS_NAME_U L"Keyboard"
-#define DD_POINTER_RESOURCE_CLASS_NAME_U L"Pointer"
-#define DD_KEYBOARD_MOUSE_COMBO_RESOURCE_CLASS_NAME_U L"Keyboard/Pointer"
-
-#define POINTER_PORTS_MAXIMUM 8
-#define KEYBOARD_PORTS_MAXIMUM 8
-
-#define KBDMOU_COULD_NOT_SEND_COMMAND 0x0000
-#define KBDMOU_COULD_NOT_SEND_PARAM 0x0001
-#define KBDMOU_NO_RESPONSE 0x0002
-#define KBDMOU_INCORRECT_RESPONSE 0x0004
-
-#define I8042_ERROR_VALUE_BASE 1000
-#define INPORT_ERROR_VALUE_BASE 2000
-#define SERIAL_MOUSE_ERROR_VALUE_BASE 3000
-
-#define IOCTL_INTERNAL_KEYBOARD_CONNECT \
- CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0080, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_KEYBOARD_DISCONNECT \
- CTL_CODE(FILE_DEVICE_KEYBOARD,0x0100, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_KEYBOARD_ENABLE \
- CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0200, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_KEYBOARD_DISABLE \
- CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0400, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_MOUSE_CONNECT \
- CTL_CODE(FILE_DEVICE_MOUSE, 0x0080, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_MOUSE_DISCONNECT \
- CTL_CODE(FILE_DEVICE_MOUSE, 0x0100, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_MOUSE_ENABLE \
- CTL_CODE(FILE_DEVICE_MOUSE, 0x0200, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_MOUSE_DISABLE \
- CTL_CODE(FILE_DEVICE_MOUSE, 0x0400, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-typedef struct _CONNECT_DATA {
- PDEVICE_OBJECT ClassDeviceObject;
- PVOID ClassService;
-} CONNECT_DATA, *PCONNECT_DATA;
-
-typedef VOID
-(STDAPICALLTYPE *PSERVICE_CALLBACK_ROUTINE)(
- /*IN*/ PVOID NormalContext,
- /*IN*/ PVOID SystemArgument1,
- /*IN*/ PVOID SystemArgument2,
- /*IN OUT*/ PVOID SystemArgument3);
-
-#endif /* __KBDMOU_H */
diff --git a/winsup/w32api/include/ddk/mcd.h b/winsup/w32api/include/ddk/mcd.h
deleted file mode 100644
index dcf13d6..0000000
--- a/winsup/w32api/include/ddk/mcd.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * mcd.h
- *
- * Media changer driver interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __MCD_H
-#define __MCD_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include "srb.h"
-#include "scsi.h"
-#include "ntddchgr.h"
-
-#if defined(_MCD_)
- #define CHANGERAPI DECLSPEC_EXPORT
-#else
- #define CHANGERAPI DECLSPEC_IMPORT
-#endif
-
-#ifdef DebugPrint
-#undef DebugPrint
-#endif
-
-#ifdef DBG
-#define DebugPrint(x) ChangerClassDebugPrint x
-#else
-#define DebugPrint(x)
-#endif
-
-#define MAXIMUM_CHANGER_INQUIRY_DATA 252
-
-CHANGERAPI
-PVOID
-DDKAPI
-ChangerClassAllocatePool(
- /*IN*/ POOL_TYPE PoolType,
- /*IN*/ ULONG NumberOfBytes);
-
-VOID
-ChangerClassDebugPrint(
- ULONG DebugPrintLevel,
- PCCHAR DebugMessage,
- ...);
-
-CHANGERAPI
-PVOID
-DDKAPI
-ChangerClassFreePool(
- /*IN*/ PVOID PoolToFree);
-
-CHANGERAPI
-NTSTATUS
-DDKAPI
-ChangerClassSendSrbSynchronous(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ PSCSI_REQUEST_BLOCK Srb,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG BufferSize,
- /*IN*/ BOOLEAN WriteToDevice);
-
-
-typedef NTSTATUS DDKAPI
-(*CHANGER_INITIALIZE)(
- /*IN*/ PDEVICE_OBJECT DeviceObject);
-
-typedef ULONG DDKAPI
-(*CHANGER_EXTENSION_SIZE)(
- VOID);
-
-typedef VOID DDKAPI
-(*CHANGER_ERROR_ROUTINE)(
- PDEVICE_OBJECT DeviceObject,
- PSCSI_REQUEST_BLOCK Srb,
- NTSTATUS *Status,
- BOOLEAN *Retry);
-
-typedef NTSTATUS DDKAPI
-(*CHANGER_COMMAND_ROUTINE)(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ PIRP Irp);
-
-typedef NTSTATUS DDKAPI
-(*CHANGER_PERFORM_DIAGNOSTICS)(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*OUT*/ PWMI_CHANGER_PROBLEM_DEVICE_ERROR ChangerDeviceError);
-
-typedef struct _MCD_INIT_DATA {
- ULONG InitDataSize;
- CHANGER_EXTENSION_SIZE ChangerAdditionalExtensionSize;
- CHANGER_INITIALIZE ChangerInitialize;
- CHANGER_ERROR_ROUTINE ChangerError;
- CHANGER_PERFORM_DIAGNOSTICS ChangerPerformDiagnostics;
- CHANGER_COMMAND_ROUTINE ChangerGetParameters;
- CHANGER_COMMAND_ROUTINE ChangerGetStatus;
- CHANGER_COMMAND_ROUTINE ChangerGetProductData;
- CHANGER_COMMAND_ROUTINE ChangerSetAccess;
- CHANGER_COMMAND_ROUTINE ChangerGetElementStatus;
- CHANGER_COMMAND_ROUTINE ChangerInitializeElementStatus;
- CHANGER_COMMAND_ROUTINE ChangerSetPosition;
- CHANGER_COMMAND_ROUTINE ChangerExchangeMedium;
- CHANGER_COMMAND_ROUTINE ChangerMoveMedium;
- CHANGER_COMMAND_ROUTINE ChangerReinitializeUnit;
- CHANGER_COMMAND_ROUTINE ChangerQueryVolumeTags;
-} MCD_INIT_DATA, *PMCD_INIT_DATA;
-
-CHANGERAPI
-NTSTATUS
-DDKAPI
-ChangerClassInitialize(
- /*IN*/ PDRIVER_OBJECT DriverObject,
- /*IN*/ PUNICODE_STRING RegistryPath,
- /*IN*/ PMCD_INIT_DATA MCDInitData);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MCD_H */
diff --git a/winsup/w32api/include/ddk/miniport.h b/winsup/w32api/include/ddk/miniport.h
deleted file mode 100644
index d5a7017..0000000
--- a/winsup/w32api/include/ddk/miniport.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * miniport.h
- *
- * Type definitions for miniport drivers
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __MINIPORT_H
-#define __MINIPORT_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-#define EMULATOR_READ_ACCESS 0x01
-#define EMULATOR_WRITE_ACCESS 0x02
-
-typedef enum _EMULATOR_PORT_ACCESS_TYPE {
- Uchar,
- Ushort,
- Ulong
-} EMULATOR_PORT_ACCESS_TYPE, *PEMULATOR_PORT_ACCESS_TYPE;
-
-
-typedef struct _EMULATOR_ACCESS_ENTRY {
- ULONG BasePort;
- ULONG NumConsecutivePorts;
- EMULATOR_PORT_ACCESS_TYPE AccessType;
- UCHAR AccessMode;
- UCHAR StringSupport;
- PVOID Routine;
-} EMULATOR_ACCESS_ENTRY, *PEMULATOR_ACCESS_ENTRY;
-
-#ifndef VIDEO_ACCESS_RANGE_DEFINED /* also in video.h */
-#define VIDEO_ACCESS_RANGE_DEFINED
-typedef struct _VIDEO_ACCESS_RANGE {
- PHYSICAL_ADDRESS RangeStart;
- ULONG RangeLength;
- UCHAR RangeInIoSpace;
- UCHAR RangeVisible;
- UCHAR RangeShareable;
- UCHAR RangePassive;
-} VIDEO_ACCESS_RANGE, *PVIDEO_ACCESS_RANGE;
-#endif
-
-typedef VOID DDKAPI
-(*PBANKED_SECTION_ROUTINE)(
- /*IN*/ ULONG ReadBank,
- /*IN*/ ULONG WriteBank,
- /*IN*/ PVOID Context);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MINIPORT_H */
diff --git a/winsup/w32api/include/ddk/minitape.h b/winsup/w32api/include/ddk/minitape.h
deleted file mode 100644
index fef88a0..0000000
--- a/winsup/w32api/include/ddk/minitape.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * minitape.h
- *
- * Minitape driver interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-#ifndef __MINITAPE_H
-#define __MINITAPE_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#pragma pack(push,4)
-
-#include "ntddk.h"
-
-#define MEDIA_ERASEABLE 0x00000001
-#define MEDIA_WRITE_ONCE 0x00000002
-#define MEDIA_READ_ONLY 0x00000004
-#define MEDIA_READ_WRITE 0x00000008
-#define MEDIA_WRITE_PROTECTED 0x00000100
-#define MEDIA_CURRENTLY_MOUNTED 0x80000000
-
-typedef enum _TAPE_STATUS {
- TAPE_STATUS_SEND_SRB_AND_CALLBACK,
- TAPE_STATUS_CALLBACK,
- TAPE_STATUS_CHECK_TEST_UNIT_READY,
- TAPE_STATUS_SUCCESS,
- TAPE_STATUS_INSUFFICIENT_RESOURCES,
- TAPE_STATUS_NOT_IMPLEMENTED,
- TAPE_STATUS_INVALID_DEVICE_REQUEST,
- TAPE_STATUS_INVALID_PARAMETER,
- TAPE_STATUS_MEDIA_CHANGED,
- TAPE_STATUS_BUS_RESET,
- TAPE_STATUS_SETMARK_DETECTED,
- TAPE_STATUS_FILEMARK_DETECTED,
- TAPE_STATUS_BEGINNING_OF_MEDIA,
- TAPE_STATUS_END_OF_MEDIA,
- TAPE_STATUS_BUFFER_OVERFLOW,
- TAPE_STATUS_NO_DATA_DETECTED,
- TAPE_STATUS_EOM_OVERFLOW,
- TAPE_STATUS_NO_MEDIA,
- TAPE_STATUS_IO_DEVICE_ERROR,
- TAPE_STATUS_UNRECOGNIZED_MEDIA,
- TAPE_STATUS_DEVICE_NOT_READY,
- TAPE_STATUS_MEDIA_WRITE_PROTECTED,
- TAPE_STATUS_DEVICE_DATA_ERROR,
- TAPE_STATUS_NO_SUCH_DEVICE,
- TAPE_STATUS_INVALID_BLOCK_LENGTH,
- TAPE_STATUS_IO_TIMEOUT,
- TAPE_STATUS_DEVICE_NOT_CONNECTED,
- TAPE_STATUS_DATA_OVERRUN,
- TAPE_STATUS_DEVICE_BUSY,
- TAPE_STATUS_REQUIRES_CLEANING,
- TAPE_STATUS_CLEANER_CARTRIDGE_INSTALLED
-} TAPE_STATUS, *PTAPE_STATUS;
-
-#define INQUIRYDATABUFFERSIZE 36
-#ifndef _INQUIRYDATA_DEFINED /* also in scsi.h */
-#define _INQUIRYDATA_DEFINED
-typedef struct _INQUIRYDATA {
- UCHAR DeviceType : 5;
- UCHAR DeviceTypeQualifier : 3;
- UCHAR DeviceTypeModifier : 7;
- UCHAR RemovableMedia : 1;
- union {
- UCHAR Versions;
- struct {
- UCHAR ANSIVersion : 3;
- UCHAR ECMAVersion : 3;
- UCHAR ISOVersion : 2;
- };
- };
- UCHAR ResponseDataFormat : 4;
- UCHAR HiSupport : 1;
- UCHAR NormACA : 1;
- UCHAR TerminateTask : 1;
- UCHAR AERC : 1;
- UCHAR AdditionalLength;
- UCHAR Reserved;
- UCHAR Addr16 : 1;
- UCHAR Addr32 : 1;
- UCHAR AckReqQ: 1;
- UCHAR MediumChanger : 1;
- UCHAR MultiPort : 1;
- UCHAR ReservedBit2 : 1;
- UCHAR EnclosureServices : 1;
- UCHAR ReservedBit3 : 1;
- UCHAR SoftReset : 1;
- UCHAR CommandQueue : 1;
- UCHAR TransferDisable : 1;
- UCHAR LinkedCommands : 1;
- UCHAR Synchronous : 1;
- UCHAR Wide16Bit : 1;
- UCHAR Wide32Bit : 1;
- UCHAR RelativeAddressing : 1;
- UCHAR VendorId[8];
- UCHAR ProductId[16];
- UCHAR ProductRevisionLevel[4];
- UCHAR VendorSpecific[20];
- UCHAR Reserved3[40];
-} INQUIRYDATA, *PINQUIRYDATA;
-#endif
-
-typedef struct _MODE_CAPABILITIES_PAGE {
- UCHAR PageCode : 6;
- UCHAR Reserved1 : 2;
- UCHAR PageLength;
- UCHAR Reserved2[2];
- UCHAR RO : 1;
- UCHAR Reserved3 : 4;
- UCHAR SPREV : 1;
- UCHAR Reserved4 : 2;
- UCHAR Reserved5 : 3;
- UCHAR EFMT : 1;
- UCHAR Reserved6 : 1;
- UCHAR QFA : 1;
- UCHAR Reserved7 : 2;
- UCHAR LOCK : 1;
- UCHAR LOCKED : 1;
- UCHAR PREVENT : 1;
- UCHAR UNLOAD : 1;
- UCHAR Reserved8 : 2;
- UCHAR ECC : 1;
- UCHAR CMPRS : 1;
- UCHAR Reserved9 : 1;
- UCHAR BLK512 : 1;
- UCHAR BLK1024 : 1;
- UCHAR Reserved10 : 4;
- UCHAR SLOWB : 1;
- UCHAR MaximumSpeedSupported[2];
- UCHAR MaximumStoredDefectedListEntries[2];
- UCHAR ContinuousTransferLimit[2];
- UCHAR CurrentSpeedSelected[2];
- UCHAR BufferSize[2];
- UCHAR Reserved11[2];
-} MODE_CAPABILITIES_PAGE, *PMODE_CAPABILITIES_PAGE;
-
-typedef BOOLEAN DDKAPI
-(*TAPE_VERIFY_INQUIRY_ROUTINE)(
- /*IN*/ PINQUIRYDATA InquiryData,
- /*IN*/ PMODE_CAPABILITIES_PAGE ModeCapabilitiesPage);
-
-typedef VOID DDKAPI
-(*TAPE_EXTENSION_INIT_ROUTINE)(
- /*IN*/ PVOID MinitapeExtension,
- /*IN*/ PINQUIRYDATA InquiryData,
- /*IN*/ PMODE_CAPABILITIES_PAGE ModeCapabilitiesPage);
-
-typedef VOID DDKAPI
-(*TAPE_ERROR_ROUTINE)(
- /*IN*/ PVOID MinitapeExtension,
- /*IN*/ PSCSI_REQUEST_BLOCK Srb,
- /*IN OUT*/ PTAPE_STATUS TapeStatus);
-
-typedef TAPE_STATUS DDKAPI
-(*TAPE_PROCESS_COMMAND_ROUTINE)(
- /*IN OUT*/ PVOID MinitapeExtension,
- /*IN OUT*/ PVOID CommandExtension,
- /*IN OUT*/ PVOID CommandParameters,
- /*IN OUT*/ PSCSI_REQUEST_BLOCK Srb,
- /*IN*/ ULONG CallNumber,
- /*IN*/ TAPE_STATUS StatusOfLastCommand,
- /*IN OUT*/ PULONG RetryFlags);
-
-#define TAPE_RETRY_MASK 0x0000FFFF
-#define IGNORE_ERRORS 0x00010000
-#define RETURN_ERRORS 0x00020000
-
-typedef struct _TAPE_INIT_DATA {
- TAPE_VERIFY_INQUIRY_ROUTINE VerifyInquiry;
- BOOLEAN QueryModeCapabilitiesPage;
- ULONG MinitapeExtensionSize;
- TAPE_EXTENSION_INIT_ROUTINE ExtensionInit;
- ULONG DefaultTimeOutValue;
- TAPE_ERROR_ROUTINE TapeError;
- ULONG CommandExtensionSize;
- TAPE_PROCESS_COMMAND_ROUTINE CreatePartition;
- TAPE_PROCESS_COMMAND_ROUTINE Erase;
- TAPE_PROCESS_COMMAND_ROUTINE GetDriveParameters;
- TAPE_PROCESS_COMMAND_ROUTINE GetMediaParameters;
- TAPE_PROCESS_COMMAND_ROUTINE GetPosition;
- TAPE_PROCESS_COMMAND_ROUTINE GetStatus;
- TAPE_PROCESS_COMMAND_ROUTINE Prepare;
- TAPE_PROCESS_COMMAND_ROUTINE SetDriveParameters;
- TAPE_PROCESS_COMMAND_ROUTINE SetMediaParameters;
- TAPE_PROCESS_COMMAND_ROUTINE SetPosition;
- TAPE_PROCESS_COMMAND_ROUTINE WriteMarks;
- TAPE_PROCESS_COMMAND_ROUTINE PreProcessReadWrite /* OPTIONAL */;
-} TAPE_INIT_DATA, *PTAPE_INIT_DATA;
-
-typedef struct _TAPE_PHYS_POSITION {
- ULONG SeekBlockAddress;
- ULONG SpaceBlockCount;
-} TAPE_PHYS_POSITION, PTAPE_PHYS_POSITION;
-
-#pragma pack(pop)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MINITAPE_H */
diff --git a/winsup/w32api/include/ddk/mountdev.h b/winsup/w32api/include/ddk/mountdev.h
deleted file mode 100644
index 1bfed03..0000000
--- a/winsup/w32api/include/ddk/mountdev.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * mountdev.h
- *
- * Mount point manager/mounted devices interface.
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __MOUNTDEV_H
-#define __MOUNTDEV_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include "mountmgr.h"
-
-#define IOCTL_MOUNTDEV_QUERY_DEVICE_NAME \
- CTL_CODE(MOUNTDEVCONTROLTYPE, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_MOUNTDEV_QUERY_UNIQUE_ID \
- CTL_CODE(MOUNTDEVCONTROLTYPE, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_MOUNTDEV_UNIQUE_ID_CHANGE_NOTIFY \
- CTL_CODE(MOUNTDEVCONTROLTYPE, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_MOUNTDEV_QUERY_SUGGESTED_LINK_NAME \
- CTL_CODE(MOUNTDEVCONTROLTYPE, 3, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_MOUNTDEV_LINK_CREATED \
- CTL_CODE(MOUNTDEVCONTROLTYPE, 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_MOUNTDEV_LINK_DELETED \
- CTL_CODE(MOUNTDEVCONTROLTYPE, 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-
-typedef struct _MOUNTDEV_SUGGESTED_LINK_NAME {
- BOOLEAN UseOnlyIfThereAreNoOtherLinks;
- USHORT NameLength;
- WCHAR Name[1];
-} MOUNTDEV_SUGGESTED_LINK_NAME, *PMOUNTDEV_SUGGESTED_LINK_NAME;
-
-typedef struct _MOUNTDEV_UNIQUE_ID {
- USHORT UniqueIdLength;
- UCHAR UniqueId[1];
-} MOUNTDEV_UNIQUE_ID, *PMOUNTDEV_UNIQUE_ID;
-
-typedef struct _MOUNTDEV_UNIQUE_ID_CHANGE_NOTIFY_OUTPUT {
- ULONG Size;
- USHORT OldUniqueIdOffset;
- USHORT OldUniqueIdLength;
- USHORT NewUniqueIdOffset;
- USHORT NewUniqueIdLength;
-} MOUNTDEV_UNIQUE_ID_CHANGE_NOTIFY_OUTPUT;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MOUNTDEV_H */
diff --git a/winsup/w32api/include/ddk/mountmgr.h b/winsup/w32api/include/ddk/mountmgr.h
deleted file mode 100644
index 6a56db8..0000000
--- a/winsup/w32api/include/ddk/mountmgr.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * mountmgr.h
- *
- * Mount point manager interface.
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __MOUNTMGR_H
-#define __MOUNTMGR_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-DEFINE_GUID(MOUNTDEV_MOUNTED_DEVICE_GUID,
- 0x53f5630d, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
-
-#define MOUNTMGRCONTROLTYPE ((ULONG)'m')
-#define MOUNTDEVCONTROLTYPE ((ULONG)'M')
-
-#define MOUNTMGR_DEVICE_NAME L"\\Device\\MountPointManager"
-#define MOUNTMGR_DOS_DEVICE_NAME L"\\\\.\\MountPointManager"
-
-#define IOCTL_MOUNTMGR_CREATE_POINT \
- CTL_CODE(MOUNTMGRCONTROLTYPE, 0, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_MOUNTMGR_QUERY_POINTS \
- CTL_CODE(MOUNTMGRCONTROLTYPE, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_MOUNTMGR_DELETE_POINTS \
- CTL_CODE(MOUNTMGRCONTROLTYPE, 1, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_MOUNTMGR_DELETE_POINTS_DBONLY \
- CTL_CODE(MOUNTMGRCONTROLTYPE, 3, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_MOUNTMGR_NEXT_DRIVE_LETTER \
- CTL_CODE(MOUNTMGRCONTROLTYPE, 4, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_MOUNTMGR_AUTO_DL_ASSIGNMENTS \
- CTL_CODE(MOUNTMGRCONTROLTYPE, 5, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_MOUNTMGR_VOLUME_MOUNT_POINT_CREATED \
- CTL_CODE(MOUNTMGRCONTROLTYPE, 6, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_MOUNTMGR_VOLUME_MOUNT_POINT_DELETED \
- CTL_CODE(MOUNTMGRCONTROLTYPE, 7, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_MOUNTMGR_CHANGE_NOTIFY \
- CTL_CODE(MOUNTMGRCONTROLTYPE, 8, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_MOUNTMGR_KEEP_LINKS_WHEN_OFFLINE \
- CTL_CODE(MOUNTMGRCONTROLTYPE, 9, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_MOUNTMGR_CHECK_UNPROCESSED_VOLUMES \
- CTL_CODE(MOUNTMGRCONTROLTYPE, 10, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_MOUNTMGR_VOLUME_ARRIVAL_NOTIFICATION \
- CTL_CODE(MOUNTMGRCONTROLTYPE, 11, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-
-typedef struct _MOUNTDEV_NAME {
- USHORT NameLength;
- WCHAR Name[1];
-} MOUNTDEV_NAME, *PMOUNTDEV_NAME;
-
-typedef struct _MOUNTMGR_CHANGE_NOTIFY_INFO {
- ULONG EpicNumber;
-} MOUNTMGR_CHANGE_NOTIFY_INFO, *PMOUNTMGR_CHANGE_NOTIFY_INFO;
-
-typedef struct _MOUNTMGR_CREATE_POINT_INPUT {
- USHORT SymbolicLinkNameOffset;
- USHORT SymbolicLinkNameLength;
- USHORT DeviceNameOffset;
- USHORT DeviceNameLength;
-} MOUNTMGR_CREATE_POINT_INPUT, *PMOUNTMGR_CREATE_POINT_INPUT;
-
-typedef struct _MOUNTMGR_DRIVE_LETTER_INFORMATION {
- BOOLEAN DriveLetterWasAssigned;
- UCHAR CurrentDriveLetter;
-} MOUNTMGR_DRIVE_LETTER_INFORMATION, *PMOUNTMGR_DRIVE_LETTER_INFORMATION;
-
-typedef struct _MOUNTMGR_DRIVE_LETTER_TARGET {
- USHORT DeviceNameLength;
- WCHAR DeviceName[1];
-} MOUNTMGR_DRIVE_LETTER_TARGET, *PMOUNTMGR_DRIVE_LETTER_TARGET;
-
-typedef struct _MOUNTMGR_MOUNT_POINT {
- ULONG SymbolicLinkNameOffset;
- USHORT SymbolicLinkNameLength;
- ULONG UniqueIdOffset;
- USHORT UniqueIdLength;
- ULONG DeviceNameOffset;
- USHORT DeviceNameLength;
-} MOUNTMGR_MOUNT_POINT, *PMOUNTMGR_MOUNT_POINT;
-
-typedef struct _MOUNTMGR_MOUNT_POINTS {
- ULONG Size;
- ULONG NumberOfMountPoints;
- MOUNTMGR_MOUNT_POINT MountPoints[1];
-} MOUNTMGR_MOUNT_POINTS, *PMOUNTMGR_MOUNT_POINTS;
-
-typedef struct _MOUNTMGR_TARGET_NAME {
- USHORT DeviceNameLength;
- WCHAR DeviceName[1];
-} MOUNTMGR_TARGET_NAME, *PMOUNTMGR_TARGET_NAME;
-
-typedef struct _MOUNTMGR_VOLUME_MOUNT_POINT {
- USHORT SourceVolumeNameOffset;
- USHORT SourceVolumeNameLength;
- USHORT TargetVolumeNameOffset;
- USHORT TargetVolumeNameLength;
-} MOUNTMGR_VOLUME_MOUNT_POINT, *PMOUNTMGR_VOLUME_MOUNT_POINT;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MOUNTMGR_H */
diff --git a/winsup/w32api/include/ddk/ndis.h b/winsup/w32api/include/ddk/ndis.h
deleted file mode 100644
index 2e61bea..0000000
--- a/winsup/w32api/include/ddk/ndis.h
+++ /dev/null
@@ -1,5317 +0,0 @@
-/*
- * ndis.h
- *
- * Network Device Interface Specification definitions
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * DEFINES: i386 - Target platform is i386
- * _NDIS_ - Define only for NDIS library
- * NDIS_MINIPORT_DRIVER - Define only for NDIS miniport drivers
- * NDIS40 - Use NDIS 4.0 structures by default
- * NDIS50 - Use NDIS 5.0 structures by default
- * NDIS50_MINIPORT - Building NDIS 5.0 miniport driver
- * NDIS51_MINIPORT - Building NDIS 5.1 miniport driver
- */
-#ifndef __NDIS_H
-#define __NDIS_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include "ntddndis.h"
-#include "netpnp.h"
-#include "netevent.h"
-#include <winsock2.h>
-
-#if defined(_NDIS_)
- #define NDISAPI DECLSPEC_EXPORT
-#else
- #define NDISAPI DECLSPEC_IMPORT
-#endif
-
-#if defined(NDIS50_MINIPORT)
-#ifndef NDIS50
-#define NDIS50
-#define NDIS_MINIPORT_MAJOR_VERSION 5
-#define NDIS_MINIPORT_MINOR_VERSION 0
-#endif
-#endif /* NDIS50_MINIPORT */
-
-#if defined(NDIS51_MINIPORT)
-#ifndef NDIS51
-#define NDIS51
-#define NDIS_MINIPORT_MAJOR_VERSION 5
-#define NDIS_MINIPORT_MINOR_VERSION 1
-#endif
-#endif /* NDIS51_MINIPORT */
-
-/* NDIS 3.0 is default */
-#if !defined(NDIS30) || !defined(NDIS40) || !defined(NDIS50) || !defined(NDIS51)
-#define NDIS30
-#endif /* !NDIS30 || !NDIS40 || !NDIS50 || !NDIS51 */
-
-#if 1
-/* FIXME: */
-typedef PVOID QUEUED_CLOSE;
-#endif
-
-typedef ULONG NDIS_OID, *PNDIS_OID;
-
-typedef struct _X_FILTER FDDI_FILTER, *PFDDI_FILTER;
-typedef struct _X_FILTER TR_FILTER, *PTR_FILTER;
-typedef struct _X_FILTER NULL_FILTER, *PNULL_FILTER;
-
-typedef struct _REFERENCE {
- KSPIN_LOCK SpinLock;
- USHORT ReferenceCount;
- BOOLEAN Closing;
-} REFERENCE, * PREFERENCE;
-
-
-/* NDIS base types */
-
-typedef struct _NDIS_SPIN_LOCK {
- KSPIN_LOCK SpinLock;
- KIRQL OldIrql;
-} NDIS_SPIN_LOCK, * PNDIS_SPIN_LOCK;
-
-typedef struct _NDIS_EVENT {
- KEVENT Event;
-} NDIS_EVENT, *PNDIS_EVENT;
-
-typedef PVOID NDIS_HANDLE, *PNDIS_HANDLE;
-typedef int NDIS_STATUS, *PNDIS_STATUS;
-
-typedef ANSI_STRING NDIS_ANSI_STRING, *PNDIS_ANSI_STRING;
-typedef UNICODE_STRING NDIS_STRING, *PNDIS_STRING;
-
-typedef MDL NDIS_BUFFER, *PNDIS_BUFFER;
-typedef ULONG NDIS_ERROR_CODE, *PNDIS_ERROR_CODE;
-
-
-/* NDIS_STATUS constants */
-#define NDIS_STATUS_SUCCESS ((NDIS_STATUS)STATUS_SUCCESS)
-#define NDIS_STATUS_PENDING ((NDIS_STATUS)STATUS_PENDING)
-#define NDIS_STATUS_NOT_RECOGNIZED ((NDIS_STATUS)0x00010001L)
-#define NDIS_STATUS_NOT_COPIED ((NDIS_STATUS)0x00010002L)
-#define NDIS_STATUS_NOT_ACCEPTED ((NDIS_STATUS)0x00010003L)
-#define NDIS_STATUS_CALL_ACTIVE ((NDIS_STATUS)0x00010007L)
-#define NDIS_STATUS_ONLINE ((NDIS_STATUS)0x40010003L)
-#define NDIS_STATUS_RESET_START ((NDIS_STATUS)0x40010004L)
-#define NDIS_STATUS_RESET_END ((NDIS_STATUS)0x40010005L)
-#define NDIS_STATUS_RING_STATUS ((NDIS_STATUS)0x40010006L)
-#define NDIS_STATUS_CLOSED ((NDIS_STATUS)0x40010007L)
-#define NDIS_STATUS_WAN_LINE_UP ((NDIS_STATUS)0x40010008L)
-#define NDIS_STATUS_WAN_LINE_DOWN ((NDIS_STATUS)0x40010009L)
-#define NDIS_STATUS_WAN_FRAGMENT ((NDIS_STATUS)0x4001000AL)
-#define NDIS_STATUS_MEDIA_CONNECT ((NDIS_STATUS)0x4001000BL)
-#define NDIS_STATUS_MEDIA_DISCONNECT ((NDIS_STATUS)0x4001000CL)
-#define NDIS_STATUS_HARDWARE_LINE_UP ((NDIS_STATUS)0x4001000DL)
-#define NDIS_STATUS_HARDWARE_LINE_DOWN ((NDIS_STATUS)0x4001000EL)
-#define NDIS_STATUS_INTERFACE_UP ((NDIS_STATUS)0x4001000FL)
-#define NDIS_STATUS_INTERFACE_DOWN ((NDIS_STATUS)0x40010010L)
-#define NDIS_STATUS_MEDIA_BUSY ((NDIS_STATUS)0x40010011L)
-#define NDIS_STATUS_MEDIA_SPECIFIC_INDICATION ((NDIS_STATUS)0x40010012L)
-#define NDIS_STATUS_WW_INDICATION NDIS_STATUS_MEDIA_SPECIFIC_INDICATION
-#define NDIS_STATUS_LINK_SPEED_CHANGE ((NDIS_STATUS)0x40010013L)
-#define NDIS_STATUS_WAN_GET_STATS ((NDIS_STATUS)0x40010014L)
-#define NDIS_STATUS_WAN_CO_FRAGMENT ((NDIS_STATUS)0x40010015L)
-#define NDIS_STATUS_WAN_CO_LINKPARAMS ((NDIS_STATUS)0x40010016L)
-
-#define NDIS_STATUS_NOT_RESETTABLE ((NDIS_STATUS)0x80010001L)
-#define NDIS_STATUS_SOFT_ERRORS ((NDIS_STATUS)0x80010003L)
-#define NDIS_STATUS_HARD_ERRORS ((NDIS_STATUS)0x80010004L)
-#define NDIS_STATUS_BUFFER_OVERFLOW ((NDIS_STATUS)STATUS_BUFFER_OVERFLOW)
-
-#define NDIS_STATUS_FAILURE ((NDIS_STATUS)STATUS_UNSUCCESSFUL)
-#define NDIS_STATUS_RESOURCES ((NDIS_STATUS)STATUS_INSUFFICIENT_RESOURCES)
-#define NDIS_STATUS_CLOSING ((NDIS_STATUS)0xC0010002L)
-#define NDIS_STATUS_BAD_VERSION ((NDIS_STATUS)0xC0010004L)
-#define NDIS_STATUS_BAD_CHARACTERISTICS ((NDIS_STATUS)0xC0010005L)
-#define NDIS_STATUS_ADAPTER_NOT_FOUND ((NDIS_STATUS)0xC0010006L)
-#define NDIS_STATUS_OPEN_FAILED ((NDIS_STATUS)0xC0010007L)
-#define NDIS_STATUS_DEVICE_FAILED ((NDIS_STATUS)0xC0010008L)
-#define NDIS_STATUS_MULTICAST_FULL ((NDIS_STATUS)0xC0010009L)
-#define NDIS_STATUS_MULTICAST_EXISTS ((NDIS_STATUS)0xC001000AL)
-#define NDIS_STATUS_MULTICAST_NOT_FOUND ((NDIS_STATUS)0xC001000BL)
-#define NDIS_STATUS_REQUEST_ABORTED ((NDIS_STATUS)0xC001000CL)
-#define NDIS_STATUS_RESET_IN_PROGRESS ((NDIS_STATUS)0xC001000DL)
-#define NDIS_STATUS_CLOSING_INDICATING ((NDIS_STATUS)0xC001000EL)
-#define NDIS_STATUS_NOT_SUPPORTED ((NDIS_STATUS)STATUS_NOT_SUPPORTED)
-#define NDIS_STATUS_INVALID_PACKET ((NDIS_STATUS)0xC001000FL)
-#define NDIS_STATUS_OPEN_LIST_FULL ((NDIS_STATUS)0xC0010010L)
-#define NDIS_STATUS_ADAPTER_NOT_READY ((NDIS_STATUS)0xC0010011L)
-#define NDIS_STATUS_ADAPTER_NOT_OPEN ((NDIS_STATUS)0xC0010012L)
-#define NDIS_STATUS_NOT_INDICATING ((NDIS_STATUS)0xC0010013L)
-#define NDIS_STATUS_INVALID_LENGTH ((NDIS_STATUS)0xC0010014L)
-#define NDIS_STATUS_INVALID_DATA ((NDIS_STATUS)0xC0010015L)
-#define NDIS_STATUS_BUFFER_TOO_SHORT ((NDIS_STATUS)0xC0010016L)
-#define NDIS_STATUS_INVALID_OID ((NDIS_STATUS)0xC0010017L)
-#define NDIS_STATUS_ADAPTER_REMOVED ((NDIS_STATUS)0xC0010018L)
-#define NDIS_STATUS_UNSUPPORTED_MEDIA ((NDIS_STATUS)0xC0010019L)
-#define NDIS_STATUS_GROUP_ADDRESS_IN_USE ((NDIS_STATUS)0xC001001AL)
-#define NDIS_STATUS_FILE_NOT_FOUND ((NDIS_STATUS)0xC001001BL)
-#define NDIS_STATUS_ERROR_READING_FILE ((NDIS_STATUS)0xC001001CL)
-#define NDIS_STATUS_ALREADY_MAPPED ((NDIS_STATUS)0xC001001DL)
-#define NDIS_STATUS_RESOURCE_CONFLICT ((NDIS_STATUS)0xC001001EL)
-#define NDIS_STATUS_NO_CABLE ((NDIS_STATUS)0xC001001FL)
-
-#define NDIS_STATUS_INVALID_SAP ((NDIS_STATUS)0xC0010020L)
-#define NDIS_STATUS_SAP_IN_USE ((NDIS_STATUS)0xC0010021L)
-#define NDIS_STATUS_INVALID_ADDRESS ((NDIS_STATUS)0xC0010022L)
-#define NDIS_STATUS_VC_NOT_ACTIVATED ((NDIS_STATUS)0xC0010023L)
-#define NDIS_STATUS_DEST_OUT_OF_ORDER ((NDIS_STATUS)0xC0010024L)
-#define NDIS_STATUS_VC_NOT_AVAILABLE ((NDIS_STATUS)0xC0010025L)
-#define NDIS_STATUS_CELLRATE_NOT_AVAILABLE ((NDIS_STATUS)0xC0010026L)
-#define NDIS_STATUS_INCOMPATABLE_QOS ((NDIS_STATUS)0xC0010027L)
-#define NDIS_STATUS_AAL_PARAMS_UNSUPPORTED ((NDIS_STATUS)0xC0010028L)
-#define NDIS_STATUS_NO_ROUTE_TO_DESTINATION ((NDIS_STATUS)0xC0010029L)
-
-#define NDIS_STATUS_TOKEN_RING_OPEN_ERROR ((NDIS_STATUS)0xC0011000L)
-#define NDIS_STATUS_INVALID_DEVICE_REQUEST ((NDIS_STATUS)STATUS_INVALID_DEVICE_REQUEST)
-#define NDIS_STATUS_NETWORK_UNREACHABLE ((NDIS_STATUS)STATUS_NETWORK_UNREACHABLE)
-
-
-/* NDIS error codes for error logging */
-
-#define NDIS_ERROR_CODE_RESOURCE_CONFLICT EVENT_NDIS_RESOURCE_CONFLICT
-#define NDIS_ERROR_CODE_OUT_OF_RESOURCES EVENT_NDIS_OUT_OF_RESOURCE
-#define NDIS_ERROR_CODE_HARDWARE_FAILURE EVENT_NDIS_HARDWARE_FAILURE
-#define NDIS_ERROR_CODE_ADAPTER_NOT_FOUND EVENT_NDIS_ADAPTER_NOT_FOUND
-#define NDIS_ERROR_CODE_INTERRUPT_CONNECT EVENT_NDIS_INTERRUPT_CONNECT
-#define NDIS_ERROR_CODE_DRIVER_FAILURE EVENT_NDIS_DRIVER_FAILURE
-#define NDIS_ERROR_CODE_BAD_VERSION EVENT_NDIS_BAD_VERSION
-#define NDIS_ERROR_CODE_TIMEOUT EVENT_NDIS_TIMEOUT
-#define NDIS_ERROR_CODE_NETWORK_ADDRESS EVENT_NDIS_NETWORK_ADDRESS
-#define NDIS_ERROR_CODE_UNSUPPORTED_CONFIGURATION EVENT_NDIS_UNSUPPORTED_CONFIGURATION
-#define NDIS_ERROR_CODE_INVALID_VALUE_FROM_ADAPTER EVENT_NDIS_INVALID_VALUE_FROM_ADAPTER
-#define NDIS_ERROR_CODE_MISSING_CONFIGURATION_PARAMETER EVENT_NDIS_MISSING_CONFIGURATION_PARAMETER
-#define NDIS_ERROR_CODE_BAD_IO_BASE_ADDRESS EVENT_NDIS_BAD_IO_BASE_ADDRESS
-#define NDIS_ERROR_CODE_RECEIVE_SPACE_SMALL EVENT_NDIS_RECEIVE_SPACE_SMALL
-#define NDIS_ERROR_CODE_ADAPTER_DISABLED EVENT_NDIS_ADAPTER_DISABLED
-
-
-/* Memory allocation flags. Used by Ndis[Allocate|Free]Memory */
-#define NDIS_MEMORY_CONTIGUOUS 0x00000001
-#define NDIS_MEMORY_NONCACHED 0x00000002
-
-/* NIC attribute flags. Used by NdisMSetAttributes(Ex) */
-#define NDIS_ATTRIBUTE_IGNORE_PACKET_TIMEOUT 0x00000001
-#define NDIS_ATTRIBUTE_IGNORE_REQUEST_TIMEOUT 0x00000002
-#define NDIS_ATTRIBUTE_IGNORE_TOKEN_RING_ERRORS 0x00000004
-#define NDIS_ATTRIBUTE_BUS_MASTER 0x00000008
-#define NDIS_ATTRIBUTE_INTERMEDIATE_DRIVER 0x00000010
-#define NDIS_ATTRIBUTE_DESERIALIZE 0x00000020
-#define NDIS_ATTRIBUTE_NO_HALT_ON_SUSPEND 0x00000040
-#define NDIS_ATTRIBUTE_SURPRISE_REMOVE_OK 0x00000080
-#define NDIS_ATTRIBUTE_NOT_CO_NDIS 0x00000100
-#define NDIS_ATTRIBUTE_USES_SAFE_BUFFER_APIS 0x00000200
-
-
-/* Lock */
-
-typedef union _NDIS_RW_LOCK_REFCOUNT {
- UINT RefCount;
- UCHAR cacheLine[16];
-} NDIS_RW_LOCK_REFCOUNT;
-
-typedef struct _NDIS_RW_LOCK {
- union {
- struct {
- KSPIN_LOCK SpinLock;
- PVOID Context;
- } s;
- UCHAR Reserved[16];
- } u;
-
- NDIS_RW_LOCK_REFCOUNT RefCount[MAXIMUM_PROCESSORS];
-} NDIS_RW_LOCK, *PNDIS_RW_LOCK;
-
-typedef struct _LOCK_STATE {
- USHORT LockState;
- KIRQL OldIrql;
-} LOCK_STATE, *PLOCK_STATE;
-
-
-
-/* Timer */
-
-typedef VOID DDKAPI
-(*PNDIS_TIMER_FUNCTION)(
- /*IN*/ PVOID SystemSpecific1,
- /*IN*/ PVOID FunctionContext,
- /*IN*/ PVOID SystemSpecific2,
- /*IN*/ PVOID SystemSpecific3);
-
-typedef struct _NDIS_TIMER {
- KTIMER Timer;
- KDPC Dpc;
-} NDIS_TIMER, *PNDIS_TIMER;
-
-
-
-/* Hardware */
-
-typedef CM_MCA_POS_DATA NDIS_MCA_POS_DATA, *PNDIS_MCA_POS_DATA;
-typedef CM_EISA_SLOT_INFORMATION NDIS_EISA_SLOT_INFORMATION, *PNDIS_EISA_SLOT_INFORMATION;
-typedef CM_EISA_FUNCTION_INFORMATION NDIS_EISA_FUNCTION_INFORMATION, *PNDIS_EISA_FUNCTION_INFORMATION;
-typedef CM_PARTIAL_RESOURCE_LIST NDIS_RESOURCE_LIST, *PNDIS_RESOURCE_LIST;
-
-/* Hardware status codes (OID_GEN_HARDWARE_STATUS) */
-typedef enum _NDIS_HARDWARE_STATUS {
- NdisHardwareStatusReady,
- NdisHardwareStatusInitializing,
- NdisHardwareStatusReset,
- NdisHardwareStatusClosing,
- NdisHardwareStatusNotReady
-} NDIS_HARDWARE_STATUS, *PNDIS_HARDWARE_STATUS;
-
-/* OID_GEN_GET_TIME_CAPS */
-typedef struct _GEN_GET_TIME_CAPS {
- ULONG Flags;
- ULONG ClockPrecision;
-} GEN_GET_TIME_CAPS, *PGEN_GET_TIME_CAPS;
-
-/* Flag bits */
-#define READABLE_LOCAL_CLOCK 0x00000001
-#define CLOCK_NETWORK_DERIVED 0x00000002
-#define CLOCK_PRECISION 0x00000004
-#define RECEIVE_TIME_INDICATION_CAPABLE 0x00000008
-#define TIMED_SEND_CAPABLE 0x00000010
-#define TIME_STAMP_CAPABLE 0x00000020
-
-/* OID_GEN_GET_NETCARD_TIME */
-typedef struct _GEN_GET_NETCARD_TIME {
- ULONGLONG ReadTime;
-} GEN_GET_NETCARD_TIME, *PGEN_GET_NETCARD_TIME;
-
-/* NDIS driver medium (OID_GEN_MEDIA_SUPPORTED / OID_GEN_MEDIA_IN_USE) */
-typedef enum _NDIS_MEDIUM {
- NdisMedium802_3,
- NdisMedium802_5,
- NdisMediumFddi,
- NdisMediumWan,
- NdisMediumLocalTalk,
- NdisMediumDix,
- NdisMediumArcnetRaw,
- NdisMediumArcnet878_2,
- NdisMediumAtm,
- NdisMediumWirelessWan,
- NdisMediumIrda,
- NdisMediumBpc,
- NdisMediumCoWan,
- NdisMedium1394,
- NdisMediumMax
-} NDIS_MEDIUM, *PNDIS_MEDIUM;
-
-/* NDIS packet filter bits (OID_GEN_CURRENT_PACKET_FILTER) */
-#define NDIS_PACKET_TYPE_DIRECTED 0x00000001
-#define NDIS_PACKET_TYPE_MULTICAST 0x00000002
-#define NDIS_PACKET_TYPE_ALL_MULTICAST 0x00000004
-#define NDIS_PACKET_TYPE_BROADCAST 0x00000008
-#define NDIS_PACKET_TYPE_SOURCE_ROUTING 0x00000010
-#define NDIS_PACKET_TYPE_PROMISCUOUS 0x00000020
-#define NDIS_PACKET_TYPE_SMT 0x00000040
-#define NDIS_PACKET_TYPE_ALL_LOCAL 0x00000080
-#define NDIS_PACKET_TYPE_GROUP 0x00001000
-#define NDIS_PACKET_TYPE_ALL_FUNCTIONAL 0x00002000
-#define NDIS_PACKET_TYPE_FUNCTIONAL 0x00004000
-#define NDIS_PACKET_TYPE_MAC_FRAME 0x00008000
-
-/* NDIS protocol option bits (OID_GEN_PROTOCOL_OPTIONS) */
-#define NDIS_PROT_OPTION_ESTIMATED_LENGTH 0x00000001
-#define NDIS_PROT_OPTION_NO_LOOPBACK 0x00000002
-#define NDIS_PROT_OPTION_NO_RSVD_ON_RCVPKT 0x00000004
-
-/* NDIS MAC option bits (OID_GEN_MAC_OPTIONS) */
-#define NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA 0x00000001
-#define NDIS_MAC_OPTION_RECEIVE_SERIALIZED 0x00000002
-#define NDIS_MAC_OPTION_TRANSFERS_NOT_PEND 0x00000004
-#define NDIS_MAC_OPTION_NO_LOOPBACK 0x00000008
-#define NDIS_MAC_OPTION_FULL_DUPLEX 0x00000010
-#define NDIS_MAC_OPTION_EOTX_INDICATION 0x00000020
-#define NDIS_MAC_OPTION_8021P_PRIORITY 0x00000040
-#define NDIS_MAC_OPTION_RESERVED 0x80000000
-
-/* State of the LAN media (OID_GEN_MEDIA_CONNECT_STATUS) */
-typedef enum _NDIS_MEDIA_STATE {
- NdisMediaStateConnected,
- NdisMediaStateDisconnected
-} NDIS_MEDIA_STATE, *PNDIS_MEDIA_STATE;
-
-/* OID_GEN_SUPPORTED_GUIDS */
-typedef struct _NDIS_GUID {
- GUID Guid;
- union {
- NDIS_OID Oid;
- NDIS_STATUS Status;
- } u;
- ULONG Size;
- ULONG Flags;
-} NDIS_GUID, *PNDIS_GUID;
-
-#define NDIS_GUID_TO_OID 0x00000001
-#define NDIS_GUID_TO_STATUS 0x00000002
-#define NDIS_GUID_ANSI_STRING 0x00000004
-#define NDIS_GUID_UNICODE_STRING 0x00000008
-#define NDIS_GUID_ARRAY 0x00000010
-
-
-typedef struct _NDIS_PACKET_POOL {
- NDIS_SPIN_LOCK SpinLock;
- struct _NDIS_PACKET *FreeList;
- UINT PacketLength;
- UCHAR Buffer[1];
-} NDIS_PACKET_POOL, * PNDIS_PACKET_POOL;
-
-/* NDIS_PACKET_PRIVATE.Flags constants */
-#define fPACKET_CONTAINS_MEDIA_SPECIFIC_INFO 0x40
-#define fPACKET_ALLOCATED_BY_NDIS 0x80
-
-typedef struct _NDIS_PACKET_PRIVATE {
- UINT PhysicalCount;
- UINT TotalLength;
- PNDIS_BUFFER Head;
- PNDIS_BUFFER Tail;
- PNDIS_PACKET_POOL Pool;
- UINT Count;
- ULONG Flags;
- BOOLEAN ValidCounts;
- UCHAR NdisPacketFlags;
- USHORT NdisPacketOobOffset;
-} NDIS_PACKET_PRIVATE, * PNDIS_PACKET_PRIVATE;
-
-typedef struct _NDIS_PACKET {
- NDIS_PACKET_PRIVATE Private;
- _ANONYMOUS_UNION union {
- _ANONYMOUS_STRUCT struct {
- UCHAR MiniportReserved[2 * sizeof(PVOID)];
- UCHAR WrapperReserved[2 * sizeof(PVOID)];
- } DUMMYSTRUCTNAME;
- _ANONYMOUS_STRUCT struct {
- UCHAR MiniportReservedEx[3 * sizeof(PVOID)];
- UCHAR WrapperReservedEx[sizeof(PVOID)];
- } DUMMYSTRUCTNAME;
- _ANONYMOUS_STRUCT struct {
- UCHAR MacReserved[4 * sizeof(PVOID)];
- } DUMMYSTRUCTNAME;
- } DUMMYUNIONNAME;
- ULONG_PTR Reserved[2];
- UCHAR ProtocolReserved[1];
-} NDIS_PACKET, *PNDIS_PACKET, **PPNDIS_PACKET;
-
-typedef enum _NDIS_CLASS_ID {
- NdisClass802_3Priority,
- NdisClassWirelessWanMbxMailbox,
- NdisClassIrdaPacketInfo,
- NdisClassAtmAALInfo
-} NDIS_CLASS_ID;
-
-typedef struct MediaSpecificInformation {
- UINT NextEntryOffset;
- NDIS_CLASS_ID ClassId;
- UINT Size;
- UCHAR ClassInformation[1];
-} MEDIA_SPECIFIC_INFORMATION;
-
-typedef struct _NDIS_PACKET_OOB_DATA {
- _ANONYMOUS_UNION union {
- ULONGLONG TimeToSend;
- ULONGLONG TimeSent;
- } DUMMYUNIONNAME;
- ULONGLONG TimeReceived;
- UINT HeaderSize;
- UINT SizeMediaSpecificInfo;
- PVOID MediaSpecificInformation;
- NDIS_STATUS Status;
-} NDIS_PACKET_OOB_DATA, *PNDIS_PACKET_OOB_DATA;
-
-typedef struct _NDIS_PM_PACKET_PATTERN {
- ULONG Priority;
- ULONG Reserved;
- ULONG MaskSize;
- ULONG PatternOffset;
- ULONG PatternSize;
- ULONG PatternFlags;
-} NDIS_PM_PACKET_PATTERN, *PNDIS_PM_PACKET_PATTERN;
-
-
-/* Request types used by NdisRequest */
-typedef enum _NDIS_REQUEST_TYPE {
- NdisRequestQueryInformation,
- NdisRequestSetInformation,
- NdisRequestQueryStatistics,
- NdisRequestOpen,
- NdisRequestClose,
- NdisRequestSend,
- NdisRequestTransferData,
- NdisRequestReset,
- NdisRequestGeneric1,
- NdisRequestGeneric2,
- NdisRequestGeneric3,
- NdisRequestGeneric4
-} NDIS_REQUEST_TYPE, *PNDIS_REQUEST_TYPE;
-
-typedef struct _NDIS_REQUEST {
- UCHAR MacReserved[4 * sizeof(PVOID)];
- NDIS_REQUEST_TYPE RequestType;
- union _DATA {
- struct QUERY_INFORMATION {
- NDIS_OID Oid;
- PVOID InformationBuffer;
- UINT InformationBufferLength;
- UINT BytesWritten;
- UINT BytesNeeded;
- } QUERY_INFORMATION;
- struct SET_INFORMATION {
- NDIS_OID Oid;
- PVOID InformationBuffer;
- UINT InformationBufferLength;
- UINT BytesRead;
- UINT BytesNeeded;
- } SET_INFORMATION;
- } DATA;
-#if (defined(NDIS50) || defined(NDIS51))
- UCHAR NdisReserved[9 * sizeof(PVOID)];
- union {
- UCHAR CallMgrReserved[2 * sizeof(PVOID)];
- UCHAR ProtocolReserved[2 * sizeof(PVOID)];
- };
- UCHAR MiniportReserved[2 * sizeof(PVOID)];
-#endif
-} NDIS_REQUEST, *PNDIS_REQUEST;
-
-
-
-/* Wide Area Networks definitions */
-
-typedef struct _NDIS_WAN_PACKET {
- LIST_ENTRY WanPacketQueue;
- PUCHAR CurrentBuffer;
- ULONG CurrentLength;
- PUCHAR StartBuffer;
- PUCHAR EndBuffer;
- PVOID ProtocolReserved1;
- PVOID ProtocolReserved2;
- PVOID ProtocolReserved3;
- PVOID ProtocolReserved4;
- PVOID MacReserved1;
- PVOID MacReserved2;
- PVOID MacReserved3;
- PVOID MacReserved4;
-} NDIS_WAN_PACKET, *PNDIS_WAN_PACKET;
-
-
-
-/* DMA channel information */
-
-typedef struct _NDIS_DMA_DESCRIPTION {
- BOOLEAN DemandMode;
- BOOLEAN AutoInitialize;
- BOOLEAN DmaChannelSpecified;
- DMA_WIDTH DmaWidth;
- DMA_SPEED DmaSpeed;
- ULONG DmaPort;
- ULONG DmaChannel;
-} NDIS_DMA_DESCRIPTION, *PNDIS_DMA_DESCRIPTION;
-
-typedef struct _NDIS_DMA_BLOCK {
- PVOID MapRegisterBase;
- KEVENT AllocationEvent;
- PADAPTER_OBJECT SystemAdapterObject;
- PVOID Miniport;
- BOOLEAN InProgress;
-} NDIS_DMA_BLOCK, *PNDIS_DMA_BLOCK;
-
-
-/* Possible hardware architecture */
-typedef enum _NDIS_INTERFACE_TYPE {
- NdisInterfaceInternal = Internal,
- NdisInterfaceIsa = Isa,
- NdisInterfaceEisa = Eisa,
- NdisInterfaceMca = MicroChannel,
- NdisInterfaceTurboChannel = TurboChannel,
- NdisInterfacePci = PCIBus,
- NdisInterfacePcMcia = PCMCIABus,
- NdisInterfaceCBus = CBus,
- NdisInterfaceMPIBus = MPIBus,
- NdisInterfaceMPSABus = MPSABus,
- NdisInterfaceProcessorInternal = ProcessorInternal,
- NdisInterfaceInternalPowerBus = InternalPowerBus,
- NdisInterfacePNPISABus = PNPISABus,
- NdisInterfacePNPBus = PNPBus,
- NdisMaximumInterfaceType
-} NDIS_INTERFACE_TYPE, *PNDIS_INTERFACE_TYPE;
-
-#define NdisInterruptLevelSensitive LevelSensitive
-#define NdisInterruptLatched Latched
-typedef KINTERRUPT_MODE NDIS_INTERRUPT_MODE, *PNDIS_INTERRUPT_MODE;
-
-
-typedef enum _NDIS_PARAMETER_TYPE {
- NdisParameterInteger,
- NdisParameterHexInteger,
- NdisParameterString,
- NdisParameterMultiString,
- NdisParameterBinary
-} NDIS_PARAMETER_TYPE, *PNDIS_PARAMETER_TYPE;
-
-typedef struct {
- USHORT Length;
- PVOID Buffer;
-} BINARY_DATA;
-
-typedef struct _NDIS_CONFIGURATION_PARAMETER {
- NDIS_PARAMETER_TYPE ParameterType;
- union {
- ULONG IntegerData;
- NDIS_STRING StringData;
- BINARY_DATA BinaryData;
- } ParameterData;
-} NDIS_CONFIGURATION_PARAMETER, *PNDIS_CONFIGURATION_PARAMETER;
-
-
-typedef PHYSICAL_ADDRESS NDIS_PHYSICAL_ADDRESS, *PNDIS_PHYSICAL_ADDRESS;
-
-typedef struct _NDIS_PHYSICAL_ADDRESS_UNIT {
- NDIS_PHYSICAL_ADDRESS PhysicalAddress;
- UINT Length;
-} NDIS_PHYSICAL_ADDRESS_UNIT, *PNDIS_PHYSICAL_ADDRESS_UNIT;
-
-typedef struct _NDIS_WAN_LINE_DOWN {
- UCHAR RemoteAddress[6];
- UCHAR LocalAddress[6];
-} NDIS_WAN_LINE_DOWN, *PNDIS_WAN_LINE_DOWN;
-
-typedef struct _NDIS_WAN_LINE_UP {
- ULONG LinkSpeed;
- ULONG MaximumTotalSize;
- NDIS_WAN_QUALITY Quality;
- USHORT SendWindow;
- UCHAR RemoteAddress[6];
- /*OUT*/ UCHAR LocalAddress[6];
- ULONG ProtocolBufferLength;
- PUCHAR ProtocolBuffer;
- USHORT ProtocolType;
- NDIS_STRING DeviceName;
-} NDIS_WAN_LINE_UP, *PNDIS_WAN_LINE_UP;
-
-
-typedef VOID DDKAPI
-(*ADAPTER_SHUTDOWN_HANDLER)(
- /*IN*/ PVOID ShutdownContext);
-
-
-typedef struct _OID_LIST OID_LIST, *POID_LIST;
-
-/* PnP state */
-
-typedef enum _NDIS_PNP_DEVICE_STATE {
- NdisPnPDeviceAdded,
- NdisPnPDeviceStarted,
- NdisPnPDeviceQueryStopped,
- NdisPnPDeviceStopped,
- NdisPnPDeviceQueryRemoved,
- NdisPnPDeviceRemoved,
- NdisPnPDeviceSurpriseRemoved
-} NDIS_PNP_DEVICE_STATE;
-
-#define NDIS_DEVICE_NOT_STOPPABLE 0x00000001
-#define NDIS_DEVICE_NOT_REMOVEABLE 0x00000002
-#define NDIS_DEVICE_NOT_SUSPENDABLE 0x00000004
-#define NDIS_DEVICE_DISABLE_PM 0x00000008
-#define NDIS_DEVICE_DISABLE_WAKE_UP 0x00000010
-#define NDIS_DEVICE_DISABLE_WAKE_ON_RECONNECT 0x00000020
-#define NDIS_DEVICE_RESERVED 0x00000040
-#define NDIS_DEVICE_DISABLE_WAKE_ON_MAGIC_PACKET 0x00000080
-#define NDIS_DEVICE_DISABLE_WAKE_ON_PATTERN_MATCH 0x00000100
-
-
-/* OID_GEN_NETWORK_LAYER_ADDRESSES */
-typedef struct _NETWORK_ADDRESS {
- USHORT AddressLength;
- USHORT AddressType;
- UCHAR Address[1];
-} NETWORK_ADDRESS, *PNETWORK_ADDRESS;
-
-typedef struct _NETWORK_ADDRESS_LIST {
- LONG AddressCount;
- USHORT AddressType;
- NETWORK_ADDRESS Address[1];
-} NETWORK_ADDRESS_LIST, *PNETWORK_ADDRESS_LIST;
-
-/* Protocol types supported by NDIS */
-#define NDIS_PROTOCOL_ID_DEFAULT 0x00
-#define NDIS_PROTOCOL_ID_TCP_IP 0x02
-#define NDIS_PROTOCOL_ID_IPX 0x06
-#define NDIS_PROTOCOL_ID_NBF 0x07
-#define NDIS_PROTOCOL_ID_MAX 0x0F
-#define NDIS_PROTOCOL_ID_MASK 0x0F
-
-
-/* OID_GEN_TRANSPORT_HEADER_OFFSET */
-typedef struct _TRANSPORT_HEADER_OFFSET {
- USHORT ProtocolType;
- USHORT HeaderOffset;
-} TRANSPORT_HEADER_OFFSET, *PTRANSPORT_HEADER_OFFSET;
-
-
-/* OID_GEN_CO_LINK_SPEED / OID_GEN_CO_MINIMUM_LINK_SPEED */
-typedef struct _NDIS_CO_LINK_SPEED {
- ULONG Outbound;
- ULONG Inbound;
-} NDIS_CO_LINK_SPEED, *PNDIS_CO_LINK_SPEED;
-
-typedef ULONG NDIS_AF, *PNDIS_AF;
-#define CO_ADDRESS_FAMILY_Q2931 ((NDIS_AF)0x1)
-#define CO_ADDRESS_FAMILY_PSCHED ((NDIS_AF)0x2)
-#define CO_ADDRESS_FAMILY_L2TP ((NDIS_AF)0x3)
-#define CO_ADDRESS_FAMILY_IRDA ((NDIS_AF)0x4)
-#define CO_ADDRESS_FAMILY_1394 ((NDIS_AF)0x5)
-#define CO_ADDRESS_FAMILY_PPP ((NDIS_AF)0x6)
-#define CO_ADDRESS_FAMILY_TAPI ((NDIS_AF)0x800)
-#define CO_ADDRESS_FAMILY_TAPI_PROXY ((NDIS_AF)0x801)
-
-#define CO_ADDRESS_FAMILY_PROXY 0x80000000
-
-typedef struct {
- NDIS_AF AddressFamily;
- ULONG MajorVersion;
- ULONG MinorVersion;
-} CO_ADDRESS_FAMILY, *PCO_ADDRESS_FAMILY;
-
-typedef struct _CO_FLOW_PARAMETERS {
- ULONG TokenRate;
- ULONG TokenBucketSize;
- ULONG PeakBandwidth;
- ULONG Latency;
- ULONG DelayVariation;
- SERVICETYPE ServiceType;
- ULONG MaxSduSize;
- ULONG MinimumPolicedSize;
-} CO_FLOW_PARAMETERS, *PCO_FLOW_PARAMETERS;
-
-typedef struct _CO_SPECIFIC_PARAMETERS {
- ULONG ParamType;
- ULONG Length;
- UCHAR Parameters[1];
-} CO_SPECIFIC_PARAMETERS, *PCO_SPECIFIC_PARAMETERS;
-
-typedef struct _CO_CALL_MANAGER_PARAMETERS {
- CO_FLOW_PARAMETERS Transmit;
- CO_FLOW_PARAMETERS Receive;
- CO_SPECIFIC_PARAMETERS CallMgrSpecific;
-} CO_CALL_MANAGER_PARAMETERS, *PCO_CALL_MANAGER_PARAMETERS;
-
-/* CO_MEDIA_PARAMETERS.Flags constants */
-#define RECEIVE_TIME_INDICATION 0x00000001
-#define USE_TIME_STAMPS 0x00000002
-#define TRANSMIT_VC 0x00000004
-#define RECEIVE_VC 0x00000008
-#define INDICATE_ERRED_PACKETS 0x00000010
-#define INDICATE_END_OF_TX 0x00000020
-#define RESERVE_RESOURCES_VC 0x00000040
-#define ROUND_DOWN_FLOW 0x00000080
-#define ROUND_UP_FLOW 0x00000100
-
-typedef struct _CO_MEDIA_PARAMETERS {
- ULONG Flags;
- ULONG ReceivePriority;
- ULONG ReceiveSizeHint;
- CO_SPECIFIC_PARAMETERS MediaSpecific;
-} CO_MEDIA_PARAMETERS, *PCO_MEDIA_PARAMETERS;
-
-/* CO_CALL_PARAMETERS.Flags constants */
-#define PERMANENT_VC 0x00000001
-#define CALL_PARAMETERS_CHANGED 0x00000002
-#define QUERY_CALL_PARAMETERS 0x00000004
-#define BROADCAST_VC 0x00000008
-#define MULTIPOINT_VC 0x00000010
-
-typedef struct _CO_CALL_PARAMETERS {
- ULONG Flags;
- PCO_CALL_MANAGER_PARAMETERS CallMgrParameters;
- PCO_MEDIA_PARAMETERS MediaParameters;
-} CO_CALL_PARAMETERS, *PCO_CALL_PARAMETERS;
-
-typedef struct _CO_SAP {
- ULONG SapType;
- ULONG SapLength;
- UCHAR Sap[1];
-} CO_SAP, *PCO_SAP;
-
-typedef struct _NDIS_IPSEC_PACKET_INFO {
- _ANONYMOUS_UNION union {
- struct {
- NDIS_HANDLE OffloadHandle;
- NDIS_HANDLE NextOffloadHandle;
- } Transmit;
- struct {
- ULONG SA_DELETE_REQ : 1;
- ULONG CRYPTO_DONE : 1;
- ULONG NEXT_CRYPTO_DONE : 1;
- ULONG CryptoStatus;
- } Receive;
- } DUMMYUNIONNAME;
-} NDIS_IPSEC_PACKET_INFO, *PNDIS_IPSEC_PACKET_INFO;
-
-/* NDIS_MAC_FRAGMENT.Errors constants */
-#define WAN_ERROR_CRC 0x00000001
-#define WAN_ERROR_FRAMING 0x00000002
-#define WAN_ERROR_HARDWAREOVERRUN 0x00000004
-#define WAN_ERROR_BUFFEROVERRUN 0x00000008
-#define WAN_ERROR_TIMEOUT 0x00000010
-#define WAN_ERROR_ALIGNMENT 0x00000020
-
-typedef struct _NDIS_MAC_FRAGMENT {
- NDIS_HANDLE NdisLinkContext;
- ULONG Errors;
-} NDIS_MAC_FRAGMENT, *PNDIS_MAC_FRAGMENT;
-
-typedef struct _NDIS_MAC_LINE_DOWN {
- NDIS_HANDLE NdisLinkContext;
-} NDIS_MAC_LINE_DOWN, *PNDIS_MAC_LINE_DOWN;
-
-typedef struct _NDIS_MAC_LINE_UP {
- ULONG LinkSpeed;
- NDIS_WAN_QUALITY Quality;
- USHORT SendWindow;
- NDIS_HANDLE ConnectionWrapperID;
- NDIS_HANDLE NdisLinkHandle;
- NDIS_HANDLE NdisLinkContext;
-} NDIS_MAC_LINE_UP, *PNDIS_MAC_LINE_UP;
-
-typedef struct _NDIS_PACKET_8021Q_INFO {
- _ANONYMOUS_UNION union {
- struct {
- UINT32 UserPriority : 3;
- UINT32 CanonicalFormatId : 1;
- UINT32 VlanId : 12;
- UINT32 Reserved : 16;
- } TagHeader;
- PVOID Value;
- } DUMMYUNIONNAME;
-} NDIS_PACKET_8021Q_INFO, *PNDIS_PACKET_8021Q_INFO;
-
-typedef enum _NDIS_PER_PACKET_INFO {
- TcpIpChecksumPacketInfo,
- IpSecPacketInfo,
- TcpLargeSendPacketInfo,
- ClassificationHandlePacketInfo,
- NdisReserved,
- ScatterGatherListPacketInfo,
- Ieee8021QInfo,
- OriginalPacketInfo,
- PacketCancelId,
- MaxPerPacketInfo
-} NDIS_PER_PACKET_INFO, *PNDIS_PER_PACKET_INFO;
-
-typedef struct _NDIS_PACKET_EXTENSION {
- PVOID NdisPacketInfo[MaxPerPacketInfo];
-} NDIS_PACKET_EXTENSION, *PNDIS_PACKET_EXTENSION;
-
-/*
- * PNDIS_PACKET
- * NDIS_GET_ORIGINAL_PACKET(
- * IN PNDIS_PACKET Packet);
- */
-#define NDIS_GET_ORIGINAL_PACKET(Packet) \
- NDIS_PER_PACKET_INFO_FROM_PACKET(Packet, OriginalPacketInfo)
-
-/*
- * PVOID
- * NDIS_GET_PACKET_CANCEL_ID(
- * IN PNDIS_PACKET Packet);
- */
-#define NDIS_GET_PACKET_CANCEL_ID(Packet) \
- NDIS_PER_PACKET_INFO_FROM_PACKET(Packet, PacketCancelId)
-
-/*
- * PNDIS_PACKET_EXTENSION
- * NDIS_PACKET_EXTENSION_FROM_PACKET(
- * IN PNDIS_PACKET Packet);
- */
-#define NDIS_PACKET_EXTENSION_FROM_PACKET(Packet) \
- ((PNDIS_PACKET_EXTENSION)((PUCHAR)(Packet) \
- + (Packet)->Private.NdisPacketOobOffset + sizeof(NDIS_PACKET_OOB_DATA)))
-
-/*
- * PVOID
- * NDIS_PER_PACKET_INFO_FROM_PACKET(
- * IN OUT PNDIS_PACKET Packet,
- * IN NDIS_PER_PACKET_INFO InfoType);
- */
-#define NDIS_PER_PACKET_INFO_FROM_PACKET(Packet, InfoType) \
- ((PNDIS_PACKET_EXTENSION)((PUCHAR)(Packet) + (Packet)->Private.NdisPacketOobOffset \
- + sizeof(NDIS_PACKET_OOB_DATA)))->NdisPacketInfo[(InfoType)]
-
-/*
- * VOID
- * NDIS_SET_ORIGINAL_PACKET(
- * IN OUT PNDIS_PACKET Packet,
- * IN PNDIS_PACKET OriginalPacket);
- */
-#define NDIS_SET_ORIGINAL_PACKET(Packet, OriginalPacket) \
- NDIS_PER_PACKET_INFO_FROM_PACKET(Packet, OriginalPacketInfo) = (OriginalPacket)
-
-/*
- * VOID
- * NDIS_SET_PACKET_CANCEL_ID(
- * IN PNDIS_PACKET Packet
- * IN ULONG_PTR CancelId);
- */
-#define NDIS_SET_PACKET_CANCEL_ID(Packet, CancelId) \
- NDIS_PER_PACKET_INFO_FROM_PACKET(Packet, PacketCancelId) = (CancelId)
-
-typedef enum _NDIS_TASK {
- TcpIpChecksumNdisTask,
- IpSecNdisTask,
- TcpLargeSendNdisTask,
- MaxNdisTask
-} NDIS_TASK, *PNDIS_TASK;
-
-typedef struct _NDIS_TASK_IPSEC {
- struct {
- ULONG AH_ESP_COMBINED;
- ULONG TRANSPORT_TUNNEL_COMBINED;
- ULONG V4_OPTIONS;
- ULONG RESERVED;
- } Supported;
-
- struct {
- ULONG MD5 : 1;
- ULONG SHA_1 : 1;
- ULONG Transport : 1;
- ULONG Tunnel : 1;
- ULONG Send : 1;
- ULONG Receive : 1;
- } V4AH;
-
- struct {
- ULONG DES : 1;
- ULONG RESERVED : 1;
- ULONG TRIPLE_DES : 1;
- ULONG NULL_ESP : 1;
- ULONG Transport : 1;
- ULONG Tunnel : 1;
- ULONG Send : 1;
- ULONG Receive : 1;
- } V4ESP;
-} NDIS_TASK_IPSEC, *PNDIS_TASK_IPSEC;
-
-typedef enum _NDIS_ENCAPSULATION {
- UNSPECIFIED_Encapsulation,
- NULL_Encapsulation,
- IEEE_802_3_Encapsulation,
- IEEE_802_5_Encapsulation,
- LLC_SNAP_ROUTED_Encapsulation,
- LLC_SNAP_BRIDGED_Encapsulation
-} NDIS_ENCAPSULATION;
-
-typedef struct _NDIS_ENCAPSULATION_FORMAT {
- NDIS_ENCAPSULATION Encapsulation;
- struct {
- ULONG FixedHeaderSize : 1;
- ULONG Reserved : 31;
- } Flags;
- ULONG EncapsulationHeaderSize;
-} NDIS_ENCAPSULATION_FORMAT, *PNDIS_ENCAPSULATION_FORMAT;
-
-typedef struct _NDIS_TASK_OFFLOAD_HEADER
-{
- ULONG Version;
- ULONG Size;
- ULONG Reserved;
- UCHAR OffsetFirstTask;
- NDIS_ENCAPSULATION_FORMAT EncapsulationFormat;
-} NDIS_TASK_OFFLOAD_HEADER, *PNDIS_TASK_OFFLOAD_HEADER;
-
-typedef struct _NDIS_TASK_OFFLOAD {
- ULONG Version;
- ULONG Size;
- NDIS_TASK Task;
- ULONG OffsetNextTask;
- ULONG TaskBufferLength;
- UCHAR TaskBuffer[1];
-} NDIS_TASK_OFFLOAD, *PNDIS_TASK_OFFLOAD;
-
-/* NDIS_TASK_OFFLOAD_HEADER.Version constants */
-#define NDIS_TASK_OFFLOAD_VERSION 1
-
-typedef struct _NDIS_TASK_TCP_IP_CHECKSUM {
- struct {
- ULONG IpOptionsSupported:1;
- ULONG TcpOptionsSupported:1;
- ULONG TcpChecksum:1;
- ULONG UdpChecksum:1;
- ULONG IpChecksum:1;
- } V4Transmit;
-
- struct {
- ULONG IpOptionsSupported : 1;
- ULONG TcpOptionsSupported : 1;
- ULONG TcpChecksum : 1;
- ULONG UdpChecksum : 1;
- ULONG IpChecksum : 1;
- } V4Receive;
-
- struct {
- ULONG IpOptionsSupported : 1;
- ULONG TcpOptionsSupported : 1;
- ULONG TcpChecksum : 1;
- ULONG UdpChecksum : 1;
- } V6Transmit;
-
- struct {
- ULONG IpOptionsSupported : 1;
- ULONG TcpOptionsSupported : 1;
- ULONG TcpChecksum : 1;
- ULONG UdpChecksum : 1;
- } V6Receive;
-} NDIS_TASK_TCP_IP_CHECKSUM, *PNDIS_TASK_TCP_IP_CHECKSUM;
-
-typedef struct _NDIS_TASK_TCP_LARGE_SEND {
- ULONG Version;
- ULONG MaxOffLoadSize;
- ULONG MinSegmentCount;
- BOOLEAN TcpOptions;
- BOOLEAN IpOptions;
-} NDIS_TASK_TCP_LARGE_SEND, *PNDIS_TASK_TCP_LARGE_SEND;
-
-typedef struct _NDIS_TCP_IP_CHECKSUM_PACKET_INFO {
- _ANONYMOUS_UNION union {
- struct {
- ULONG NdisPacketChecksumV4 : 1;
- ULONG NdisPacketChecksumV6 : 1;
- ULONG NdisPacketTcpChecksum : 1;
- ULONG NdisPacketUdpChecksum : 1;
- ULONG NdisPacketIpChecksum : 1;
- } Transmit;
-
- struct {
- ULONG NdisPacketTcpChecksumFailed : 1;
- ULONG NdisPacketUdpChecksumFailed : 1;
- ULONG NdisPacketIpChecksumFailed : 1;
- ULONG NdisPacketTcpChecksumSucceeded : 1;
- ULONG NdisPacketUdpChecksumSucceeded : 1;
- ULONG NdisPacketIpChecksumSucceeded : 1;
- ULONG NdisPacketLoopback : 1;
- } Receive;
- ULONG Value;
- } DUMMYUNIONNAME;
-} NDIS_TCP_IP_CHECKSUM_PACKET_INFO, *PNDIS_TCP_IP_CHECKSUM_PACKET_INFO;
-
-typedef struct _NDIS_WAN_CO_FRAGMENT {
- ULONG Errors;
-} NDIS_WAN_CO_FRAGMENT, *PNDIS_WAN_CO_FRAGMENT;
-
-typedef struct _NDIS_WAN_FRAGMENT {
- UCHAR RemoteAddress[6];
- UCHAR LocalAddress[6];
-} NDIS_WAN_FRAGMENT, *PNDIS_WAN_FRAGMENT;
-
-typedef struct _WAN_CO_LINKPARAMS {
- ULONG TransmitSpeed;
- ULONG ReceiveSpeed;
- ULONG SendWindow;
-} WAN_CO_LINKPARAMS, *PWAN_CO_LINKPARAMS;
-
-
-/* Call Manager */
-
-typedef VOID DDKAPI
-(*CM_ACTIVATE_VC_COMPLETE_HANDLER)(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE CallMgrVcContext,
- /*IN*/ PCO_CALL_PARAMETERS CallParameters);
-
-typedef NDIS_STATUS DDKAPI
-(*CM_ADD_PARTY_HANDLER)(
- /*IN*/ NDIS_HANDLE CallMgrVcContext,
- /*IN OUT*/ PCO_CALL_PARAMETERS CallParameters,
- /*IN*/ NDIS_HANDLE NdisPartyHandle,
- /*OUT*/ PNDIS_HANDLE CallMgrPartyContext);
-
-typedef NDIS_STATUS DDKAPI
-(*CM_CLOSE_AF_HANDLER)(
- /*IN*/ NDIS_HANDLE CallMgrAfContext);
-
-typedef NDIS_STATUS DDKAPI
-(*CM_CLOSE_CALL_HANDLER)(
- /*IN*/ NDIS_HANDLE CallMgrVcContext,
- /*IN*/ NDIS_HANDLE CallMgrPartyContext /*OPTIONAL*/,
- /*IN*/ PVOID CloseData /*OPTIONAL*/,
- /*IN*/ UINT Size /*OPTIONAL*/);
-
-typedef NDIS_STATUS DDKAPI
-(*CM_DEREG_SAP_HANDLER)(
- /*IN*/ NDIS_HANDLE CallMgrSapContext);
-
-typedef VOID DDKAPI
-(*CM_DEACTIVATE_VC_COMPLETE_HANDLER)(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE CallMgrVcContext);
-
-typedef NDIS_STATUS DDKAPI
-(*CM_DROP_PARTY_HANDLER)(
- /*IN*/ NDIS_HANDLE CallMgrPartyContext,
- /*IN*/ PVOID CloseData /*OPTIONAL*/,
- /*IN*/ UINT Size /*OPTIONAL*/);
-
-typedef VOID DDKAPI
-(*CM_INCOMING_CALL_COMPLETE_HANDLER)(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE CallMgrVcContext,
- /*IN*/ PCO_CALL_PARAMETERS CallParameters);
-
-typedef NDIS_STATUS DDKAPI
-(*CM_MAKE_CALL_HANDLER)(
- /*IN*/ NDIS_HANDLE CallMgrVcContext,
- /*IN OUT*/ PCO_CALL_PARAMETERS CallParameters,
- /*IN*/ NDIS_HANDLE NdisPartyHandle /*OPTIONAL*/,
- /*OUT*/ PNDIS_HANDLE CallMgrPartyContext /*OPTIONAL*/);
-
-typedef NDIS_STATUS DDKAPI
-(*CM_MODIFY_CALL_QOS_HANDLER)(
- /*IN*/ NDIS_HANDLE CallMgrVcContext,
- /*IN*/ PCO_CALL_PARAMETERS CallParameters);
-
-typedef NDIS_STATUS DDKAPI
-(*CM_OPEN_AF_HANDLER)(
- /*IN*/ NDIS_HANDLE CallMgrBindingContext,
- /*IN*/ PCO_ADDRESS_FAMILY AddressFamily,
- /*IN*/ NDIS_HANDLE NdisAfHandle,
- /*OUT*/ PNDIS_HANDLE CallMgrAfContext);
-
-typedef NDIS_STATUS DDKAPI
-(*CM_REG_SAP_HANDLER)(
- /*IN*/ NDIS_HANDLE CallMgrAfContext,
- /*IN*/ PCO_SAP Sap,
- /*IN*/ NDIS_HANDLE NdisSapHandle,
- /*OUT*/ PNDIS_HANDLE CallMgrSapContext);
-
-typedef NDIS_STATUS DDKAPI
-(*CO_CREATE_VC_HANDLER)(
- /*IN*/ NDIS_HANDLE ProtocolAfContext,
- /*IN*/ NDIS_HANDLE NdisVcHandle,
- /*OUT*/ PNDIS_HANDLE ProtocolVcContext);
-
-typedef NDIS_STATUS DDKAPI
-(*CO_DELETE_VC_HANDLER)(
- /*IN*/ NDIS_HANDLE ProtocolVcContext);
-
-typedef VOID DDKAPI
-(*CO_REQUEST_COMPLETE_HANDLER)(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE ProtocolAfContext /*OPTIONAL*/,
- /*IN*/ NDIS_HANDLE ProtocolVcContext /*OPTIONAL*/,
- /*IN*/ NDIS_HANDLE ProtocolPartyContext /*OPTIONAL*/,
- /*IN*/ PNDIS_REQUEST NdisRequest);
-
-typedef NDIS_STATUS DDKAPI
-(*CO_REQUEST_HANDLER)(
- /*IN*/ NDIS_HANDLE ProtocolAfContext,
- /*IN*/ NDIS_HANDLE ProtocolVcContext /*OPTIONAL*/,
- /*IN*/ NDIS_HANDLE ProtocolPartyContext /*OPTIONAL*/,
- /*IN OUT*/ PNDIS_REQUEST NdisRequest);
-
-typedef struct _NDIS_CALL_MANAGER_CHARACTERISTICS {
- UCHAR MajorVersion;
- UCHAR MinorVersion;
- USHORT Filler;
- UINT Reserved;
- CO_CREATE_VC_HANDLER CmCreateVcHandler;
- CO_DELETE_VC_HANDLER CmDeleteVcHandler;
- CM_OPEN_AF_HANDLER CmOpenAfHandler;
- CM_CLOSE_AF_HANDLER CmCloseAfHandler;
- CM_REG_SAP_HANDLER CmRegisterSapHandler;
- CM_DEREG_SAP_HANDLER CmDeregisterSapHandler;
- CM_MAKE_CALL_HANDLER CmMakeCallHandler;
- CM_CLOSE_CALL_HANDLER CmCloseCallHandler;
- CM_INCOMING_CALL_COMPLETE_HANDLER CmIncomingCallCompleteHandler;
- CM_ADD_PARTY_HANDLER CmAddPartyHandler;
- CM_DROP_PARTY_HANDLER CmDropPartyHandler;
- CM_ACTIVATE_VC_COMPLETE_HANDLER CmActivateVcCompleteHandler;
- CM_DEACTIVATE_VC_COMPLETE_HANDLER CmDeactivateVcCompleteHandler;
- CM_MODIFY_CALL_QOS_HANDLER CmModifyCallQoSHandler;
- CO_REQUEST_HANDLER CmRequestHandler;
- CO_REQUEST_COMPLETE_HANDLER CmRequestCompleteHandler;
-} NDIS_CALL_MANAGER_CHARACTERISTICS, *PNDIS_CALL_MANAGER_CHARACTERISTICS;
-
-
-
-/* Call Manager clients */
-
-typedef VOID (*CL_OPEN_AF_COMPLETE_HANDLER)(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE ProtocolAfContext,
- /*IN*/ NDIS_HANDLE NdisAfHandle);
-
-typedef VOID DDKAPI
-(*CL_CLOSE_AF_COMPLETE_HANDLER)(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE ProtocolAfContext);
-
-typedef VOID DDKAPI
-(*CL_REG_SAP_COMPLETE_HANDLER)(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE ProtocolSapContext,
- /*IN*/ PCO_SAP Sap,
- /*IN*/ NDIS_HANDLE NdisSapHandle);
-
-typedef VOID DDKAPI
-(*CL_DEREG_SAP_COMPLETE_HANDLER)(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE ProtocolSapContext);
-
-typedef VOID DDKAPI
-(*CL_MAKE_CALL_COMPLETE_HANDLER)(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE ProtocolVcContext,
- /*IN*/ NDIS_HANDLE NdisPartyHandle /*OPTIONAL*/,
- /*IN*/ PCO_CALL_PARAMETERS CallParameters);
-
-typedef VOID DDKAPI
-(*CL_MODIFY_CALL_QOS_COMPLETE_HANDLER)(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE ProtocolVcContext,
- /*IN*/ PCO_CALL_PARAMETERS CallParameters);
-
-typedef VOID DDKAPI
-(*CL_CLOSE_CALL_COMPLETE_HANDLER)(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE ProtocolVcContext,
- /*IN*/ NDIS_HANDLE ProtocolPartyContext /*OPTIONAL*/);
-
-typedef VOID DDKAPI
-(*CL_ADD_PARTY_COMPLETE_HANDLER)(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE ProtocolPartyContext,
- /*IN*/ NDIS_HANDLE NdisPartyHandle,
- /*IN*/ PCO_CALL_PARAMETERS CallParameters);
-
-typedef VOID DDKAPI
-(*CL_DROP_PARTY_COMPLETE_HANDLER)(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE ProtocolPartyContext);
-
-typedef NDIS_STATUS DDKAPI
-(*CL_INCOMING_CALL_HANDLER)(
- /*IN*/ NDIS_HANDLE ProtocolSapContext,
- /*IN*/ NDIS_HANDLE ProtocolVcContext,
- /*IN OUT*/ PCO_CALL_PARAMETERS CallParameters);
-
-typedef VOID DDKAPI
-(*CL_INCOMING_CALL_QOS_CHANGE_HANDLER)(
- /*IN*/ NDIS_HANDLE ProtocolVcContext,
- /*IN*/ PCO_CALL_PARAMETERS CallParameters);
-
-typedef VOID DDKAPI
-(*CL_INCOMING_CLOSE_CALL_HANDLER)(
- /*IN*/ NDIS_STATUS CloseStatus,
- /*IN*/ NDIS_HANDLE ProtocolVcContext,
- /*IN*/ PVOID CloseData /*OPTIONAL*/,
- /*IN*/ UINT Size /*OPTIONAL*/);
-
-typedef VOID DDKAPI
-(*CL_INCOMING_DROP_PARTY_HANDLER)(
- /*IN*/ NDIS_STATUS DropStatus,
- /*IN*/ NDIS_HANDLE ProtocolPartyContext,
- /*IN*/ PVOID CloseData /*OPTIONAL*/,
- /*IN*/ UINT Size /*OPTIONAL*/);
-
-typedef VOID DDKAPI
-(*CL_CALL_CONNECTED_HANDLER)(
- /*IN*/ NDIS_HANDLE ProtocolVcContext);
-
-
-typedef struct _NDIS_CLIENT_CHARACTERISTICS {
- UCHAR MajorVersion;
- UCHAR MinorVersion;
- USHORT Filler;
- UINT Reserved;
- CO_CREATE_VC_HANDLER ClCreateVcHandler;
- CO_DELETE_VC_HANDLER ClDeleteVcHandler;
- CO_REQUEST_HANDLER ClRequestHandler;
- CO_REQUEST_COMPLETE_HANDLER ClRequestCompleteHandler;
- CL_OPEN_AF_COMPLETE_HANDLER ClOpenAfCompleteHandler;
- CL_CLOSE_AF_COMPLETE_HANDLER ClCloseAfCompleteHandler;
- CL_REG_SAP_COMPLETE_HANDLER ClRegisterSapCompleteHandler;
- CL_DEREG_SAP_COMPLETE_HANDLER ClDeregisterSapCompleteHandler;
- CL_MAKE_CALL_COMPLETE_HANDLER ClMakeCallCompleteHandler;
- CL_MODIFY_CALL_QOS_COMPLETE_HANDLER ClModifyCallQoSCompleteHandler;
- CL_CLOSE_CALL_COMPLETE_HANDLER ClCloseCallCompleteHandler;
- CL_ADD_PARTY_COMPLETE_HANDLER ClAddPartyCompleteHandler;
- CL_DROP_PARTY_COMPLETE_HANDLER ClDropPartyCompleteHandler;
- CL_INCOMING_CALL_HANDLER ClIncomingCallHandler;
- CL_INCOMING_CALL_QOS_CHANGE_HANDLER ClIncomingCallQoSChangeHandler;
- CL_INCOMING_CLOSE_CALL_HANDLER ClIncomingCloseCallHandler;
- CL_INCOMING_DROP_PARTY_HANDLER ClIncomingDropPartyHandler;
- CL_CALL_CONNECTED_HANDLER ClCallConnectedHandler;
-} NDIS_CLIENT_CHARACTERISTICS, *PNDIS_CLIENT_CHARACTERISTICS;
-
-
-/* NDIS protocol structures */
-
-/* Prototypes for NDIS 3.0 protocol characteristics */
-
-typedef VOID DDKAPI
-(*OPEN_ADAPTER_COMPLETE_HANDLER)(
- /*IN*/ NDIS_HANDLE ProtocolBindingContext,
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_STATUS OpenErrorStatus);
-
-typedef VOID DDKAPI
-(*CLOSE_ADAPTER_COMPLETE_HANDLER)(
- /*IN*/ NDIS_HANDLE ProtocolBindingContext,
- /*IN*/ NDIS_STATUS Status);
-
-typedef VOID DDKAPI
-(*RESET_COMPLETE_HANDLER)(
- /*IN*/ NDIS_HANDLE ProtocolBindingContext,
- /*IN*/ NDIS_STATUS Status);
-
-typedef VOID DDKAPI
-(*REQUEST_COMPLETE_HANDLER)(
- /*IN*/ NDIS_HANDLE ProtocolBindingContext,
- /*IN*/ PNDIS_REQUEST NdisRequest,
- /*IN*/ NDIS_STATUS Status);
-
-typedef VOID DDKAPI
-(*STATUS_HANDLER)(
- /*IN*/ NDIS_HANDLE ProtocolBindingContext,
- /*IN*/ NDIS_STATUS GeneralStatus,
- /*IN*/ PVOID StatusBuffer,
- /*IN*/ UINT StatusBufferSize);
-
-typedef VOID DDKAPI
-(*STATUS_COMPLETE_HANDLER)(
- /*IN*/ NDIS_HANDLE ProtocolBindingContext);
-
-typedef VOID DDKAPI
-(*SEND_COMPLETE_HANDLER)(
- /*IN*/ NDIS_HANDLE ProtocolBindingContext,
- /*IN*/ PNDIS_PACKET Packet,
- /*IN*/ NDIS_STATUS Status);
-
-typedef VOID DDKAPI
-(*WAN_SEND_COMPLETE_HANDLER)(
- /*IN*/ NDIS_HANDLE ProtocolBindingContext,
- /*IN*/ PNDIS_WAN_PACKET Packet,
- /*IN*/ NDIS_STATUS Status);
-
-typedef VOID DDKAPI
-(*TRANSFER_DATA_COMPLETE_HANDLER)(
- /*IN*/ NDIS_HANDLE ProtocolBindingContext,
- /*IN*/ PNDIS_PACKET Packet,
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ UINT BytesTransferred);
-
-typedef VOID DDKAPI
-(*WAN_TRANSFER_DATA_COMPLETE_HANDLER)(
- VOID);
-
-
-typedef NDIS_STATUS DDKAPI
-(*RECEIVE_HANDLER)(
- /*IN*/ NDIS_HANDLE ProtocolBindingContext,
- /*IN*/ NDIS_HANDLE MacReceiveContext,
- /*IN*/ PVOID HeaderBuffer,
- /*IN*/ UINT HeaderBufferSize,
- /*IN*/ PVOID LookAheadBuffer,
- /*IN*/ UINT LookaheadBufferSize,
- /*IN*/ UINT PacketSize);
-
-typedef NDIS_STATUS DDKAPI
-(*WAN_RECEIVE_HANDLER)(
- /*IN*/ NDIS_HANDLE NdisLinkHandle,
- /*IN*/ PUCHAR Packet,
- /*IN*/ ULONG PacketSize);
-
-typedef VOID DDKAPI
-(*RECEIVE_COMPLETE_HANDLER)(
- /*IN*/ NDIS_HANDLE ProtocolBindingContext);
-
-
-/* Protocol characteristics for NDIS 3.0 protocols */
-
-#define NDIS30_PROTOCOL_CHARACTERISTICS_S \
- UCHAR MajorNdisVersion; \
- UCHAR MinorNdisVersion; \
- _ANONYMOUS_UNION union { \
- UINT Reserved; \
- UINT Flags; \
- } DUMMYUNIONNAME; \
- OPEN_ADAPTER_COMPLETE_HANDLER OpenAdapterCompleteHandler; \
- CLOSE_ADAPTER_COMPLETE_HANDLER CloseAdapterCompleteHandler; \
- _ANONYMOUS_UNION union { \
- SEND_COMPLETE_HANDLER SendCompleteHandler; \
- WAN_SEND_COMPLETE_HANDLER WanSendCompleteHandler; \
- } DUMMYUNIONNAME2; \
- _ANONYMOUS_UNION union { \
- TRANSFER_DATA_COMPLETE_HANDLER TransferDataCompleteHandler; \
- WAN_TRANSFER_DATA_COMPLETE_HANDLER WanTransferDataCompleteHandler; \
- } DUMMYUNIONNAME3; \
- RESET_COMPLETE_HANDLER ResetCompleteHandler; \
- REQUEST_COMPLETE_HANDLER RequestCompleteHandler; \
- _ANONYMOUS_UNION union { \
- RECEIVE_HANDLER ReceiveHandler; \
- WAN_RECEIVE_HANDLER WanReceiveHandler; \
- } DUMMYUNIONNAME4; \
- RECEIVE_COMPLETE_HANDLER ReceiveCompleteHandler; \
- STATUS_HANDLER StatusHandler; \
- STATUS_COMPLETE_HANDLER StatusCompleteHandler; \
- NDIS_STRING Name;
-
-typedef struct _NDIS30_PROTOCOL_CHARACTERISTICS {
- NDIS30_PROTOCOL_CHARACTERISTICS_S
-} NDIS30_PROTOCOL_CHARACTERISTICS, *PNDIS30_PROTOCOL_CHARACTERISTICS;
-
-
-/* Prototypes for NDIS 4.0 protocol characteristics */
-
-typedef INT DDKAPI
-(*RECEIVE_PACKET_HANDLER)(
- /*IN*/ NDIS_HANDLE ProtocolBindingContext,
- /*IN*/ PNDIS_PACKET Packet);
-
-typedef VOID DDKAPI
-(*BIND_HANDLER)(
- /*OUT*/ PNDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE BindContext,
- /*IN*/ PNDIS_STRING DeviceName,
- /*IN*/ PVOID SystemSpecific1,
- /*IN*/ PVOID SystemSpecific2);
-
-typedef VOID DDKAPI
-(*UNBIND_HANDLER)(
- /*OUT*/ PNDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE ProtocolBindingContext,
- /*IN*/ NDIS_HANDLE UnbindContext);
-
-typedef NDIS_STATUS DDKAPI
-(*PNP_EVENT_HANDLER)(
- /*IN*/ NDIS_HANDLE ProtocolBindingContext,
- /*IN*/ PNET_PNP_EVENT NetPnPEvent);
-
-typedef VOID DDKAPI
-(*UNLOAD_PROTOCOL_HANDLER)(
- VOID);
-
-
-/* Protocol characteristics for NDIS 4.0 protocols */
-
-#ifdef __cplusplus
-
-#define NDIS40_PROTOCOL_CHARACTERISTICS_S \
- NDIS30_PROTOCOL_CHARACTERISTICS Ndis30Chars; \
- RECEIVE_PACKET_HANDLER ReceivePacketHandler; \
- BIND_HANDLER BindAdapterHandler; \
- UNBIND_HANDLER UnbindAdapterHandler; \
- PNP_EVENT_HANDLER PnPEventHandler; \
- UNLOAD_PROTOCOL_HANDLER UnloadHandler;
-
-#else /* !__cplusplus */
-
-#define NDIS40_PROTOCOL_CHARACTERISTICS_S \
- NDIS30_PROTOCOL_CHARACTERISTICS_S \
- RECEIVE_PACKET_HANDLER ReceivePacketHandler; \
- BIND_HANDLER BindAdapterHandler; \
- UNBIND_HANDLER UnbindAdapterHandler; \
- PNP_EVENT_HANDLER PnPEventHandler; \
- UNLOAD_PROTOCOL_HANDLER UnloadHandler;
-
-#endif /* __cplusplus */
-
-typedef struct _NDIS40_PROTOCOL_CHARACTERISTICS {
- NDIS40_PROTOCOL_CHARACTERISTICS_S
-} NDIS40_PROTOCOL_CHARACTERISTICS, *PNDIS40_PROTOCOL_CHARACTERISTICS;
-
-/* Prototypes for NDIS 5.0 protocol characteristics */
-
-typedef VOID DDKAPI
-(*CO_SEND_COMPLETE_HANDLER)(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE ProtocolVcContext,
- /*IN*/ PNDIS_PACKET Packet);
-
-typedef VOID DDKAPI
-(*CO_STATUS_HANDLER)(
- /*IN*/ NDIS_HANDLE ProtocolBindingContext,
- /*IN*/ NDIS_HANDLE ProtocolVcContext /*OPTIONAL*/,
- /*IN*/ NDIS_STATUS GeneralStatus,
- /*IN*/ PVOID StatusBuffer,
- /*IN*/ UINT StatusBufferSize);
-
-typedef UINT DDKAPI
-(*CO_RECEIVE_PACKET_HANDLER)(
- /*IN*/ NDIS_HANDLE ProtocolBindingContext,
- /*IN*/ NDIS_HANDLE ProtocolVcContext,
- /*IN*/ PNDIS_PACKET Packet);
-
-typedef VOID DDKAPI
-(*CO_AF_REGISTER_NOTIFY_HANDLER)(
- /*IN*/ NDIS_HANDLE ProtocolBindingContext,
- /*IN*/ PCO_ADDRESS_FAMILY AddressFamily);
-
-#ifdef __cplusplus \
-
-#define NDIS50_PROTOCOL_CHARACTERISTICS_S \
- NDIS40_PROTOCOL_CHARACTERISTICS Ndis40Chars; \
- PVOID ReservedHandlers[4]; \
- CO_SEND_COMPLETE_HANDLER CoSendCompleteHandler; \
- CO_STATUS_HANDLER CoStatusHandler; \
- CO_RECEIVE_PACKET_HANDLER CoReceivePacketHandler; \
- CO_AF_REGISTER_NOTIFY_HANDLER CoAfRegisterNotifyHandler;
-
-#else /* !__cplusplus */
-
-#define NDIS50_PROTOCOL_CHARACTERISTICS_S \
- NDIS40_PROTOCOL_CHARACTERISTICS_S \
- PVOID ReservedHandlers[4]; \
- CO_SEND_COMPLETE_HANDLER CoSendCompleteHandler; \
- CO_STATUS_HANDLER CoStatusHandler; \
- CO_RECEIVE_PACKET_HANDLER CoReceivePacketHandler; \
- CO_AF_REGISTER_NOTIFY_HANDLER CoAfRegisterNotifyHandler;
-
-#endif /* !__cplusplus */
-
-typedef struct _NDIS50_PROTOCOL_CHARACTERISTICS {
- NDIS50_PROTOCOL_CHARACTERISTICS_S
-} NDIS50_PROTOCOL_CHARACTERISTICS, *PNDIS50_PROTOCOL_CHARACTERISTICS;
-
-#if defined(NDIS50) || defined(NDIS51)
-typedef struct _NDIS_PROTOCOL_CHARACTERISTICS {
- NDIS50_PROTOCOL_CHARACTERISTICS_S;
-} NDIS_PROTOCOL_CHARACTERISTICS, *PNDIS_PROTOCOL_CHARACTERISTICS;
-#elif defined(NDIS40)
-typedef struct _NDIS_PROTOCOL_CHARACTERISTICS {
- NDIS40_PROTOCOL_CHARACTERISTICS_S;
-} NDIS_PROTOCOL_CHARACTERISTICS, *PNDIS_PROTOCOL_CHARACTERISTICS;
-#elif defined(NDIS30)
-typedef struct _NDIS_PROTOCOL_CHARACTERISTICS {
- NDIS30_PROTOCOL_CHARACTERISTICS_S
-} NDIS_PROTOCOL_CHARACTERISTICS, *PNDIS_PROTOCOL_CHARACTERISTICS;
-#else
-#error Define an NDIS version
-#endif /* NDIS30 */
-
-
-
-/* Buffer management routines */
-
-NDISAPI
-VOID
-DDKAPI
-NdisAllocateBuffer(
- /*OUT*/ PNDIS_STATUS Status,
- /*OUT*/ PNDIS_BUFFER *Buffer,
- /*IN*/ NDIS_HANDLE PoolHandle,
- /*IN*/ PVOID VirtualAddress,
- /*IN*/ UINT Length);
-
-
-NDISAPI
-VOID
-DDKAPI
-NdisAllocateBufferPool(
- /*OUT*/ PNDIS_STATUS Status,
- /*OUT*/ PNDIS_HANDLE PoolHandle,
- /*IN*/ UINT NumberOfDescriptors);
-
-NDISAPI
-VOID
-DDKAPI
-NdisAllocatePacket(
- /*OUT*/ PNDIS_STATUS Status,
- /*OUT*/ PNDIS_PACKET *Packet,
- /*IN*/ NDIS_HANDLE PoolHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisAllocatePacketPool(
- /*OUT*/ PNDIS_STATUS Status,
- /*OUT*/ PNDIS_HANDLE PoolHandle,
- /*IN*/ UINT NumberOfDescriptors,
- /*IN*/ UINT ProtocolReservedLength);
-
-#define PROTOCOL_RESERVED_SIZE_IN_PACKET (4 * sizeof(PVOID))
-
-NDISAPI
-VOID
-DDKAPI
-NdisCopyBuffer(
- /*OUT*/ PNDIS_STATUS Status,
- /*OUT*/ PNDIS_BUFFER *Buffer,
- /*IN*/ NDIS_HANDLE PoolHandle,
- /*IN*/ PVOID MemoryDescriptor,
- /*IN*/ UINT Offset,
- /*IN*/ UINT Length);
-
-NDISAPI
-VOID
-DDKAPI
-NdisCopyFromPacketToPacket(
- /*IN*/ PNDIS_PACKET Destination,
- /*IN*/ UINT DestinationOffset,
- /*IN*/ UINT BytesToCopy,
- /*IN*/ PNDIS_PACKET Source,
- /*IN*/ UINT SourceOffset,
- /*OUT*/ PUINT BytesCopied);
-
-NDISAPI
-VOID
-DDKAPI
-NdisDprAllocatePacket(
- /*OUT*/ PNDIS_STATUS Status,
- /*OUT*/ PNDIS_PACKET *Packet,
- /*IN*/ NDIS_HANDLE PoolHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisDprAllocatePacketNonInterlocked(
- /*OUT*/ PNDIS_STATUS Status,
- /*OUT*/ PNDIS_PACKET *Packet,
- /*IN*/ NDIS_HANDLE PoolHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisDprFreePacket(
- /*IN*/ PNDIS_PACKET Packet);
-
-NDISAPI
-VOID
-DDKAPI
-NdisDprFreePacketNonInterlocked(
- /*IN*/ PNDIS_PACKET Packet);
-
-NDISAPI
-VOID
-DDKAPI
-NdisFreeBufferPool(
- /*IN*/ NDIS_HANDLE PoolHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisFreePacket(
- /*IN*/ PNDIS_PACKET Packet);
-
-NDISAPI
-VOID
-DDKAPI
-NdisFreePacketPool(
- /*IN*/ NDIS_HANDLE PoolHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisReturnPackets(
- /*IN*/ PNDIS_PACKET *PacketsToReturn,
- /*IN*/ UINT NumberOfPackets);
-
-NDISAPI
-VOID
-DDKAPI
-NdisUnchainBufferAtBack(
- /*IN OUT*/ PNDIS_PACKET Packet,
- /*OUT*/ PNDIS_BUFFER *Buffer);
-
-NDISAPI
-VOID
-DDKAPI
-NdisUnchainBufferAtFront(
- /*IN OUT*/ PNDIS_PACKET Packet,
- /*OUT*/ PNDIS_BUFFER *Buffer);
-
-NDISAPI
-VOID
-DDKAPI
-NdisAdjustBufferLength(
- /*IN*/ PNDIS_BUFFER Buffer,
- /*IN*/ UINT Length);
-
-NDISAPI
-ULONG
-DDKAPI
-NdisBufferLength(
- /*IN*/ PNDIS_BUFFER Buffer);
-
-NDISAPI
-PVOID
-DDKAPI
-NdisBufferVirtualAddress(
- /*IN*/ PNDIS_BUFFER Buffer);
-
-NDISAPI
-ULONG
-DDKAPI
-NDIS_BUFFER_TO_SPAN_PAGES(
- /*IN*/ PNDIS_BUFFER Buffer);
-
-NDISAPI
-VOID
-DDKAPI
-NdisFreeBuffer(
- /*IN*/ PNDIS_BUFFER Buffer);
-
-NDISAPI
-VOID
-DDKAPI
-NdisGetBufferPhysicalArraySize(
- /*IN*/ PNDIS_BUFFER Buffer,
- /*OUT*/ PUINT ArraySize);
-
-NDISAPI
-VOID
-DDKAPI
-NdisGetFirstBufferFromPacket(
- /*IN*/ PNDIS_PACKET _Packet,
- /*OUT*/ PNDIS_BUFFER *_FirstBuffer,
- /*OUT*/ PVOID *_FirstBufferVA,
- /*OUT*/ PUINT _FirstBufferLength,
- /*OUT*/ PUINT _TotalBufferLength);
-
-NDISAPI
-VOID
-DDKAPI
-NdisQueryBuffer(
- /*IN*/ PNDIS_BUFFER Buffer,
- /*OUT*/ PVOID *VirtualAddress /*OPTIONAL*/,
- /*OUT*/ PUINT Length);
-
-NDISAPI
-VOID
-DDKAPI
-NdisQueryBufferOffset(
- /*IN*/ PNDIS_BUFFER Buffer,
- /*OUT*/ PUINT Offset,
- /*OUT*/ PUINT Length);
-
-NDISAPI
-VOID
-DDKAPI
-NdisFreeBuffer(
- /*IN*/ PNDIS_BUFFER Buffer);
-
-
-/*
- * VOID
- * NdisGetBufferPhysicalArraySize(
- * IN PNDIS_BUFFER Buffer,
- * OUT PUINT ArraySize);
- */
-#define NdisGetBufferPhysicalArraySize(Buffer, \
- ArraySize) \
-{ \
- (*(ArraySize) = NDIS_BUFFER_TO_SPAN_PAGES(Buffer)) \
-}
-
-
-/*
- * VOID
- * NdisGetFirstBufferFromPacket(
- * IN PNDIS_PACKET _Packet,
- * OUT PNDIS_BUFFER * _FirstBuffer,
- * OUT PVOID * _FirstBufferVA,
- * OUT PUINT _FirstBufferLength,
- * OUT PUINT _TotalBufferLength)
- */
-#define NdisGetFirstBufferFromPacket(_Packet, \
- _FirstBuffer, \
- _FirstBufferVA, \
- _FirstBufferLength, \
- _TotalBufferLength) \
-{ \
- PNDIS_BUFFER _Buffer; \
- \
- _Buffer = (_Packet)->Private.Head; \
- *(_FirstBuffer) = _Buffer; \
- if (_Buffer != NULL) \
- { \
- *(_FirstBufferVA) = MmGetSystemAddressForMdl(_Buffer); \
- *(_FirstBufferLength) = MmGetMdlByteCount(_Buffer); \
- _Buffer = _Buffer->Next; \
- *(_TotalBufferLength) = *(_FirstBufferLength); \
- while (_Buffer != NULL) { \
- *(_TotalBufferLength) += MmGetMdlByteCount(_Buffer); \
- _Buffer = _Buffer->Next; \
- } \
- } \
- else \
- { \
- *(_FirstBufferVA) = 0; \
- *(_FirstBufferLength) = 0; \
- *(_TotalBufferLength) = 0; \
- } \
-}
-
-/*
- * VOID
- * NdisGetFirstBufferFromPacketSafe(
- * IN PNDIS_PACKET _Packet,
- * OUT PNDIS_BUFFER * _FirstBuffer,
- * OUT PVOID * _FirstBufferVA,
- * OUT PUINT _FirstBufferLength,
- * OUT PUINT _TotalBufferLength),
- * IN MM_PAGE_PRIORITY _Priority)
- */
-#define NdisGetFirstBufferFromPacketSafe(_Packet, \
- _FirstBuffer, \
- _FirstBufferVA, \
- _FirstBufferLength, \
- _TotalBufferLength, \
- _Priority) \
-{ \
- PNDIS_BUFFER _Buffer; \
- \
- _Buffer = (_Packet)->Private.Head; \
- *(_FirstBuffer) = _Buffer; \
- if (_Buffer != NULL) \
- { \
- *(_FirstBufferVA) = MmGetSystemAddressForMdlSafe(_Buffer, _Priority); \
- *(_FirstBufferLength) = MmGetMdlByteCount(_Buffer); \
- _Buffer = _Buffer->Next; \
- *(_TotalBufferLength) = *(_FirstBufferLength); \
- while (_Buffer != NULL) { \
- *(_TotalBufferLength) += MmGetMdlByteCount(_Buffer); \
- _Buffer = _Buffer->Next; \
- } \
- } \
- else \
- { \
- *(_FirstBufferVA) = 0; \
- *(_FirstBufferLength) = 0; \
- *(_TotalBufferLength) = 0; \
- } \
-}
-
-/*
- * VOID
- * NdisQueryBuffer(
- * IN PNDIS_BUFFER Buffer,
- * OUT PVOID *VirtualAddress OPTIONAL,
- * OUT PUINT Length)
- */
-#define NdisQueryBuffer(Buffer, \
- VirtualAddress, \
- Length) \
-{ \
- if (VirtualAddress) \
- *((PVOID*)VirtualAddress) = MmGetSystemAddressForMdl(Buffer); \
- \
- *((PUINT)Length) = MmGetMdlByteCount(Buffer); \
-}
-
-
-/*
- * VOID
- * NdisQueryBufferOffset(
- * IN PNDIS_BUFFER Buffer,
- * OUT PUINT Offset,
- * OUT PUINT Length);
- */
-#define NdisQueryBufferOffset(Buffer, \
- Offset, \
- Length) \
-{ \
- *((PUINT)Offset) = MmGetMdlByteOffset(Buffer); \
- *((PUINT)Length) = MmGetMdlByteCount(Buffer); \
-}
-
-
-/*
- * PVOID
- * NDIS_BUFFER_LINKAGE(
- * IN PNDIS_BUFFER Buffer);
- */
-#define NDIS_BUFFER_LINKAGE(Buffer)(Buffer)->Next;
-
-
-/*
- * VOID
- * NdisChainBufferAtBack(
- * IN OUT PNDIS_PACKET Packet,
- * IN OUT PNDIS_BUFFER Buffer)
- */
-#define NdisChainBufferAtBack(Packet, \
- Buffer) \
-{ \
- PNDIS_BUFFER NdisBuffer = (Buffer); \
- \
- while (NdisBuffer->Next != NULL) \
- NdisBuffer = NdisBuffer->Next; \
- \
- NdisBuffer->Next = NULL; \
- \
- if ((Packet)->Private.Head != NULL) \
- (Packet)->Private.Tail->Next = (Buffer); \
- else \
- (Packet)->Private.Head = (Buffer); \
- \
- (Packet)->Private.Tail = NdisBuffer; \
- (Packet)->Private.ValidCounts = FALSE; \
-}
-
-
-/*
- * VOID
- * NdisChainBufferAtFront(
- * IN OUT PNDIS_PACKET Packet,
- * IN OUT PNDIS_BUFFER Buffer)
- */
-#define NdisChainBufferAtFront(Packet, \
- Buffer) \
-{ \
- PNDIS_BUFFER _NdisBuffer = (Buffer); \
- \
- while (_NdisBuffer->Next != NULL) \
- _NdisBuffer = _NdisBuffer->Next; \
- \
- if ((Packet)->Private.Head == NULL) \
- (Packet)->Private.Tail = _NdisBuffer; \
- \
- _NdisBuffer->Next = (Packet)->Private.Head; \
- (Packet)->Private.Head = (Buffer); \
- (Packet)->Private.ValidCounts = FALSE; \
-}
-
-
-/*
- * VOID
- * NdisGetNextBuffer(
- * IN PNDIS_BUFFER CurrentBuffer,
- * OUT PNDIS_BUFFER * NextBuffer)
- */
-#define NdisGetNextBuffer(CurrentBuffer, \
- NextBuffer) \
-{ \
- *(NextBuffer) = (CurrentBuffer)->Next; \
-}
-
-
-/*
- * UINT
- * NdisGetPacketFlags(
- * IN PNDIS_PACKET Packet);
- */
-#define NdisGetPacketFlags(Packet)(Packet)->Private.Flags;
-
-
-/*
- * VOID
- * NdisClearPacketFlags(
- * IN PNDIS_PACKET Packet,
- * IN UINT Flags);
- */
-#define NdisClearPacketFlags(Packet, Flags) \
- (Packet)->Private.Flags &= ~(Flags)
-
-
-/*
- * VOID
- * NDIS_GET_PACKET_MEDIA_SPECIFIC_INFO(
- * IN PNDIS_PACKET Packet,
- * IN PPVOID pMediaSpecificInfo,
- * IN PUINT pSizeMediaSpecificInfo);
- */
-#define NDIS_GET_PACKET_MEDIA_SPECIFIC_INFO(_Packet, \
- _pMediaSpecificInfo, \
- _pSizeMediaSpecificInfo) \
-{ \
- if (!((_Packet)->Private.NdisPacketFlags & fPACKET_ALLOCATED_BY_NDIS) || \
- !((_Packet)->Private.NdisPacketFlags & fPACKET_CONTAINS_MEDIA_SPECIFIC_INFO)) \
- { \
- *(_pMediaSpecificInfo) = NULL; \
- *(_pSizeMediaSpecificInfo) = 0; \
- } \
- else \
- { \
- *(_pMediaSpecificInfo) = ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
- (_Packet)->Private.NdisPacketOobOffset))->MediaSpecificInformation; \
- *(_pSizeMediaSpecificInfo) = ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
- (_Packet)->Private.NdisPacketOobOffset))->SizeMediaSpecificInfo; \
- } \
-}
-
-
-/*
- * ULONG
- * NDIS_GET_PACKET_PROTOCOL_TYPE(
- * IN PNDIS_PACKET Packet);
- */
-#define NDIS_GET_PACKET_PROTOCOL_TYPE(_Packet) \
- ((_Packet)->Private.Flags & NDIS_PROTOCOL_ID_MASK)
-
-/*
- * ULONG
- * NDIS_GET_PACKET_HEADER_SIZE(
- * IN PNDIS_PACKET Packet);
- */
-#define NDIS_GET_PACKET_HEADER_SIZE(_Packet) \
- ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
- (_Packet)->Private.NdisPacketOobOffset))->HeaderSize
-
-
-/*
- * NDIS_STATUS
- * NDIS_GET_PACKET_STATUS(
- * IN PNDIS_PACKET Packet);
- */
-#define NDIS_GET_PACKET_STATUS(_Packet) \
- ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
- (_Packet)->Private.NdisPacketOobOffset))->Status
-
-
-/*
- * ULONGLONG
- * NDIS_GET_PACKET_TIME_RECEIVED(
- * IN PNDIS_PACKET Packet);
- */
-#define NDIS_GET_PACKET_TIME_RECEIVED(_Packet) \
- ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
- (_Packet)->Private.NdisPacketOobOffset))->TimeReceived
-
-
-/*
- * ULONGLONG
- * NDIS_GET_PACKET_TIME_SENT(
- * IN PNDIS_PACKET Packet);
- */
-#define NDIS_GET_PACKET_TIME_SENT(_Packet) \
- ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
- (_Packet)->Private.NdisPacketOobOffset))->TimeSent
-
-
-/*
- * ULONGLONG
- * NDIS_GET_PACKET_TIME_TO_SEND(
- * IN PNDIS_PACKET Packet);
- */
-#define NDIS_GET_PACKET_TIME_TO_SEND(_Packet) \
- ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
- (_Packet)->Private.NdisPacketOobOffset))->TimeToSend
-
-
-/*
- * PNDIS_PACKET_OOB_DATA
- * NDIS_OOB_DATA_FROM_PACKET(
- * IN PNDIS_PACKET Packet);
- */
-#define NDIS_OOB_DATA_FROM_PACKET(_Packet) \
- (PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
- (_Packet)->Private.NdisPacketOobOffset)
-
-
-/*
- * VOID
- * NdisQueryPacket(
- * IN PNDIS_PACKET Packet,
- * OUT PUINT PhysicalBufferCount OPTIONAL,
- * OUT PUINT BufferCount OPTIONAL,
- * OUT PNDIS_BUFFER *FirstBuffer OPTIONAL,
- * OUT PUINT TotalPacketLength OPTIONAL);
- */
-#define NdisQueryPacket(Packet, \
- PhysicalBufferCount, \
- BufferCount, \
- FirstBuffer, \
- TotalPacketLength) \
-{ \
- if (FirstBuffer) \
- *((PNDIS_BUFFER*)FirstBuffer) = (Packet)->Private.Head; \
- if ((TotalPacketLength) || (BufferCount) || (PhysicalBufferCount)) \
- { \
- if (!(Packet)->Private.ValidCounts) { \
- UINT _Offset; \
- UINT _PacketLength; \
- PNDIS_BUFFER _NdisBuffer; \
- UINT _PhysicalBufferCount = 0; \
- UINT _TotalPacketLength = 0; \
- UINT _Count = 0; \
- \
- for (_NdisBuffer = (Packet)->Private.Head; \
- _NdisBuffer != (PNDIS_BUFFER)NULL; \
- _NdisBuffer = _NdisBuffer->Next) \
- { \
- _PhysicalBufferCount += NDIS_BUFFER_TO_SPAN_PAGES(_NdisBuffer); \
- NdisQueryBufferOffset(_NdisBuffer, &_Offset, &_PacketLength); \
- _TotalPacketLength += _PacketLength; \
- _Count++; \
- } \
- (Packet)->Private.PhysicalCount = _PhysicalBufferCount; \
- (Packet)->Private.TotalLength = _TotalPacketLength; \
- (Packet)->Private.Count = _Count; \
- (Packet)->Private.ValidCounts = TRUE; \
- } \
- \
- if (PhysicalBufferCount) \
- *((PUINT)PhysicalBufferCount) = (Packet)->Private.PhysicalCount; \
- \
- if (BufferCount) \
- *((PUINT)BufferCount) = (Packet)->Private.Count; \
- \
- if (TotalPacketLength) \
- *((PUINT)TotalPacketLength) = (Packet)->Private.TotalLength; \
- } \
-}
-
-/*
- * VOID
- * NdisQueryPacketLength(
- * IN PNDIS_PACKET Packet,
- * OUT PUINT PhysicalBufferCount OPTIONAL,
- * OUT PUINT BufferCount OPTIONAL,
- * OUT PNDIS_BUFFER *FirstBuffer OPTIONAL,
- * OUT PUINT TotalPacketLength OPTIONAL);
- */
-#define NdisQueryPacketLength(Packet, \
- TotalPacketLength) \
-{ \
- if ((TotalPacketLength)) \
- { \
- if (!(Packet)->Private.ValidCounts) { \
- UINT _Offset; \
- UINT _PacketLength; \
- PNDIS_BUFFER _NdisBuffer; \
- UINT _PhysicalBufferCount = 0; \
- UINT _TotalPacketLength = 0; \
- UINT _Count = 0; \
- \
- for (_NdisBuffer = (Packet)->Private.Head; \
- _NdisBuffer != (PNDIS_BUFFER)NULL; \
- _NdisBuffer = _NdisBuffer->Next) \
- { \
- _PhysicalBufferCount += NDIS_BUFFER_TO_SPAN_PAGES(_NdisBuffer); \
- NdisQueryBufferOffset(_NdisBuffer, &_Offset, &_PacketLength); \
- _TotalPacketLength += _PacketLength; \
- _Count++; \
- } \
- (Packet)->Private.PhysicalCount = _PhysicalBufferCount; \
- (Packet)->Private.TotalLength = _TotalPacketLength; \
- (Packet)->Private.Count = _Count; \
- (Packet)->Private.ValidCounts = TRUE; \
- } \
- \
- if (TotalPacketLength) \
- *((PUINT)TotalPacketLength) = (Packet)->Private.TotalLength; \
- } \
-}
-
-
-/*
- * VOID
- * NdisRecalculatePacketCounts(
- * IN OUT PNDIS_PACKET Packet);
- */
-#define NdisRecalculatePacketCounts(Packet) \
-{ \
- PNDIS_BUFFER _Buffer = (Packet)->Private.Head; \
- if (_Buffer != NULL) \
- { \
- while (_Buffer->Next != NULL) \
- { \
- ´_Buffer = _Buffer->Next; \
- } \
- (Packet)->Private.Tail = _Buffer; \
- } \
- (Packet)->Private.ValidCounts = FALSE; \
-}
-
-
-/*
- * VOID
- * NdisReinitializePacket(
- * IN OUT PNDIS_PACKET Packet);
- */
-#define NdisReinitializePacket(Packet) \
-{ \
- (Packet)->Private.Head = (PNDIS_BUFFER)NULL; \
- (Packet)->Private.ValidCounts = FALSE; \
-}
-
-
-/*
- * VOID
- * NdisSetPacketFlags(
- * IN PNDIS_PACKET Packet,
- * IN UINT Flags);
- */
-#define NdisSetPacketFlags(Packet, Flags) \
- (Packet)->Private.Flags |= (Flags);
-
-
-/*
- * VOID
- * NDIS_SET_PACKET_HEADER_SIZE(
- * IN PNDIS_PACKET Packet,
- * IN UINT HdrSize);
- */
-#define NDIS_SET_PACKET_HEADER_SIZE(_Packet, _HdrSize) \
- ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
- (_Packet)->Private.NdisPacketOobOffset))->HeaderSize = (_HdrSize)
-
-
-/*
- * VOID
- * NDIS_SET_PACKET_MEDIA_SPECIFIC_INFO(
- * IN PNDIS_PACKET Packet,
- * IN PVOID MediaSpecificInfo,
- * IN UINT SizeMediaSpecificInfo);
- */
-#define NDIS_SET_PACKET_MEDIA_SPECIFIC_INFO(_Packet, \
- _MediaSpecificInfo, \
- _SizeMediaSpecificInfo) \
-{ \
- if ((_Packet)->Private.NdisPacketFlags & fPACKET_ALLOCATED_BY_NDIS) \
- { \
- (_Packet)->Private.NdisPacketFlags |= fPACKET_CONTAINS_MEDIA_SPECIFIC_INFO; \
- ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
- (_Packet)->Private.NdisPacketOobOffset))->MediaSpecificInformation = \
- (_MediaSpecificInfo); \
- ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
- (_Packet)->Private.NdisPacketOobOffset))->SizeMediaSpecificInfo = \
- (_SizeMediaSpecificInfo); \
- } \
-}
-
-
-/*
- * VOID
- * NDIS_SET_PACKET_STATUS(
- * IN PNDIS_PACKET Packet,
- * IN NDIS_STATUS Status);
- */
-#define NDIS_SET_PACKET_STATUS(_Packet, _Status) \
- ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
- (_Packet)->Private.NdisPacketOobOffset))->Status = (_Status)
-
-
-/*
- * VOID
- * NDIS_SET_PACKET_TIME_RECEIVED(
- * IN PNDIS_PACKET Packet,
- * IN ULONGLONG TimeReceived);
- */
-#define NDIS_SET_PACKET_TIME_RECEIVED(_Packet, _TimeReceived) \
- ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
- (_Packet)->Private.NdisPacketOobOffset))->TimeReceived = (_TimeReceived)
-
-
-/*
- * VOID
- * NDIS_SET_PACKET_TIME_SENT(
- * IN PNDIS_PACKET Packet,
- * IN ULONGLONG TimeSent);
- */
-#define NDIS_SET_PACKET_TIME_SENT(_Packet, _TimeSent) \
- ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
- (_Packet)->Private.NdisPacketOobOffset))->TimeSent = (_TimeSent)
-
-
-/*
- * VOID
- * NDIS_SET_PACKET_TIME_TO_SEND(
- * IN PNDIS_PACKET Packet,
- * IN ULONGLONG TimeToSend);
- */
-#define NDIS_SET_PACKET_TIME_TO_SEND(_Packet, _TimeToSend) \
- ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
- (_Packet)->Private.NdisPacketOobOffset))->TimeToSend = (_TimeToSend)
-
-
-/*
- * VOID
- * NdisSetSendFlags(
- * IN PNDIS_PACKET Packet,
- * IN UINT Flags);
- */
-#define NdisSetSendFlags(_Packet,_Flags)(_Packet)->Private.Flags = (_Flags)
-
-
-
-/* Memory management routines */
-
-/*
- * VOID
- * NdisCreateLookaheadBufferFromSharedMemory(
- * IN PVOID pSharedMemory,
- * IN UINT LookaheadLength,
- * OUT PVOID *pLookaheadBuffer)
- */
-#define NdisCreateLookaheadBufferFromSharedMemory(_pSharedMemory, \
- _LookaheadLength, \
- _pLookaheadBuffer) \
- ((*(_pLookaheadBuffer)) = (_pSharedMemory))
-
-/*
- * VOID
- * NdisDestroyLookaheadBufferFromSharedMemory(
- * IN PVOID pLookaheadBuffer)
- */
-#define NdisDestroyLookaheadBufferFromSharedMemory(_pLookaheadBuffer)
-
-#if defined(i386)
-
-/*
- * VOID
- * NdisMoveFromMappedMemory(
- * OUT PVOID Destination,
- * IN PVOID Source,
- * IN ULONG Length);
- */
-#define NdisMoveFromMappedMemory(Destination, Source, Length) \
- NdisMoveMappedMemory(Destination, Source, Length)
-
-/*
- * VOID
- * NdisMoveMappedMemory(
- * OUT PVOID Destination,
- * IN PVOID Source,
- * IN ULONG Length);
- */
-#define NdisMoveMappedMemory(Destination, Source, Length) \
- RtlCopyMemory(Destination, Source, Length)
-
-/*
- * VOID
- * NdisMoveToMappedMemory(
- * OUT PVOID Destination,
- * IN PVOID Source,
- * IN ULONG Length);
- */
-#define NdisMoveToMappedMemory(Destination, Source, Length) \
- NdisMoveMappedMemory(Destination, Source, Length)
-
-#endif /* i386 */
-
-/*
- * VOID
- * NdisMUpdateSharedMemory(
- * IN NDIS_HANDLE MiniportAdapterHandle,
- * IN ULONG Length,
- * IN PVOID VirtualAddress,
- * IN NDIS_PHYSICAL_ADDRESS PhysicalAddress);
- */
-#define NdisMUpdateSharedMemory(_H, _L, _V, _P) \
- NdisUpdateSharedMemory(_H, _L, _V, _P)
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisAllocateMemory(
- /*OUT*/ PVOID *VirtualAddress,
- /*IN*/ UINT Length,
- /*IN*/ UINT MemoryFlags,
- /*IN*/ NDIS_PHYSICAL_ADDRESS HighestAcceptableAddress);
-
-NDISAPI
-VOID
-DDKAPI
-NdisFreeMemory(
- /*IN*/ PVOID VirtualAddress,
- /*IN*/ UINT Length,
- /*IN*/ UINT MemoryFlags);
-
-NDISAPI
-VOID
-DDKAPI
-NdisImmediateReadSharedMemory(
- /*IN*/ NDIS_HANDLE WrapperConfigurationContext,
- /*IN*/ ULONG SharedMemoryAddress,
- /*OUT*/ PUCHAR Buffer,
- /*IN*/ ULONG Length);
-
-NDISAPI
-VOID
-DDKAPI
-NdisImmediateWriteSharedMemory(
- /*IN*/ NDIS_HANDLE WrapperConfigurationContext,
- /*IN*/ ULONG SharedMemoryAddress,
- /*IN*/ PUCHAR Buffer,
- /*IN*/ ULONG Length);
-
-NDISAPI
-VOID
-DDKAPI
-NdisMAllocateSharedMemory(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ ULONG Length,
- /*IN*/ BOOLEAN Cached,
- /*OUT*/ PVOID *VirtualAddress,
- /*OUT*/ PNDIS_PHYSICAL_ADDRESS PhysicalAddress);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisMAllocateSharedMemoryAsync(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ ULONG Length,
- /*IN*/ BOOLEAN Cached,
- /*IN*/ PVOID Context);
-
-#if defined(NDIS50)
-
-#define NdisUpdateSharedMemory(NdisAdapterHandle, \
- Length, \
- VirtualAddress, \
- PhysicalAddress)
-
-#else
-
-NDISAPI
-VOID
-DDKAPI
-NdisUpdateSharedMemory(
- /*IN*/ NDIS_HANDLE NdisAdapterHandle,
- /*IN*/ ULONG Length,
- /*IN*/ PVOID VirtualAddress,
- /*IN*/ NDIS_PHYSICAL_ADDRESS PhysicalAddress);
-
-#endif /* defined(NDIS50) */
-
-/*
- * ULONG
- * NdisGetPhysicalAddressHigh(
- * IN NDIS_PHYSICAL_ADDRESS PhysicalAddress);
- */
-#define NdisGetPhysicalAddressHigh(PhysicalAddress) \
- ((PhysicalAddress).HighPart)
-
-/*
- * VOID
- * NdisSetPhysicalAddressHigh(
- * IN NDIS_PHYSICAL_ADDRESS PhysicalAddress,
- * IN ULONG Value);
- */
-#define NdisSetPhysicalAddressHigh(PhysicalAddress, Value) \
- ((PhysicalAddress).HighPart) = (Value)
-
-/*
- * ULONG
- * NdisGetPhysicalAddressLow(
- * IN NDIS_PHYSICAL_ADDRESS PhysicalAddress);
- */
-#define NdisGetPhysicalAddressLow(PhysicalAddress) \
- ((PhysicalAddress).LowPart)
-
-
-/*
- * VOID
- * NdisSetPhysicalAddressLow(
- * IN NDIS_PHYSICAL_ADDRESS PhysicalAddress,
- * IN ULONG Value);
- */
-#define NdisSetPhysicalAddressLow(PhysicalAddress, Value) \
- ((PhysicalAddress).LowPart) = (Value)
-
-/*
- * VOID
- * NDIS_PHYSICAL_ADDRESS_CONST(
- * IN ULONG Low,
- * IN LONG High);
- */
-#define NDIS_PHYSICAL_ADDRESS_CONST(Low, High) \
- { {(ULONG)(Low), (LONG)(High)} }
-
-/*
- * ULONG
- * NdisEqualMemory(
- * IN CONST VOID *Source1,
- * IN CONST VOID *Source2,
- * IN ULONG Length);
- */
-#define NdisEqualMemory(Source1, Source2, Length) \
- RtlEqualMemory(Source1, Source2, Length)
-
-/*
- * VOID
- * NdisFillMemory(
- * IN PVOID Destination,
- * IN ULONG Length,
- * IN UCHAR Fill);
- */
-#define NdisFillMemory(Destination, Length, Fill) \
- RtlFillMemory(Destination, Length, Fill)
-
-/*
- * VOID
- * NdisZeroMappedMemory(
- * IN PVOID Destination,
- * IN ULONG Length);
- */
-#define NdisZeroMappedMemory(Destination, Length) \
- RtlZeroMemory(Destination, Length)
-
-/*
- * VOID
- * NdisMoveMemory(
- * OUT PVOID Destination,
- * IN PVOID Source,
- * IN ULONG Length);
- */
-#define NdisMoveMemory(Destination, Source, Length) \
- RtlCopyMemory(Destination, Source, Length)
-
-
-/*
- * VOID
- * NdisRetrieveUlong(
- * IN PULONG DestinationAddress,
- * IN PULONG SourceAddress);
- */
-#define NdisRetrieveUlong(DestinationAddress, SourceAddress) \
- RtlRetrieveUlong(DestinationAddress, SourceAddress)
-
-
-/*
- * VOID
- * NdisStoreUlong(
- * IN PULONG DestinationAddress,
- * IN ULONG Value);
- */
-#define NdisStoreUlong(DestinationAddress, Value) \
- RtlStoreUlong(DestinationAddress, Value)
-
-
-/*
- * VOID
- * NdisZeroMemory(
- * IN PVOID Destination,
- * IN ULONG Length)
- */
-#define NdisZeroMemory(Destination, Length) \
- RtlZeroMemory(Destination, Length)
-
-
-
-/* Configuration routines */
-
-NDISAPI
-VOID
-DDKAPI
-NdisOpenConfiguration(
- /*OUT*/ PNDIS_STATUS Status,
- /*OUT*/ PNDIS_HANDLE ConfigurationHandle,
- /*IN*/ NDIS_HANDLE WrapperConfigurationContext);
-
-NDISAPI
-VOID
-DDKAPI
-NdisReadNetworkAddress(
- /*OUT*/ PNDIS_STATUS Status,
- /*OUT*/ PVOID *NetworkAddress,
- /*OUT*/ PUINT NetworkAddressLength,
- /*IN*/ NDIS_HANDLE ConfigurationHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisReadEisaSlotInformation(
- /*OUT*/ PNDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE WrapperConfigurationContext,
- /*OUT*/ PUINT SlotNumber,
- /*OUT*/ PNDIS_EISA_FUNCTION_INFORMATION EisaData);
-
-NDISAPI
-VOID
-DDKAPI
-NdisReadEisaSlotInformationEx(
- /*OUT*/ PNDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE WrapperConfigurationContext,
- /*OUT*/ PUINT SlotNumber,
- /*OUT*/ PNDIS_EISA_FUNCTION_INFORMATION *EisaData,
- /*OUT*/ PUINT NumberOfFunctions);
-
-NDISAPI
-ULONG
-DDKAPI
-NdisReadPciSlotInformation(
- /*IN*/ NDIS_HANDLE NdisAdapterHandle,
- /*IN*/ ULONG SlotNumber,
- /*IN*/ ULONG Offset,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG Length);
-
-NDISAPI
-ULONG
-DDKAPI
-NdisWritePciSlotInformation(
- /*IN*/ NDIS_HANDLE NdisAdapterHandle,
- /*IN*/ ULONG SlotNumber,
- /*IN*/ ULONG Offset,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG Length);
-
-
-
-/* String management routines */
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisAnsiStringToUnicodeString(
- /*IN OUT*/ PNDIS_STRING DestinationString,
- /*IN*/ PNDIS_ANSI_STRING SourceString);
-
-/*
- * BOOLEAN
- * NdisEqualString(
- * IN PNDIS_STRING String1,
- * IN PNDIS_STRING String2,
- * IN BOOLEAN CaseInsensitive);
- */
-#define NdisEqualString(_String1, _String2, _CaseInsensitive) \
- RtlEqualUnicodeString(_String1, _String2, _CaseInsensitive)
-
-NDISAPI
-VOID
-DDKAPI
-NdisInitAnsiString(
- /*IN OUT*/ PNDIS_ANSI_STRING DestinationString,
- /*IN*/ PCSTR SourceString);
-
-NDISAPI
-VOID
-DDKAPI
-NdisInitUnicodeString(
- /*IN OUT*/ PNDIS_STRING DestinationString,
- /*IN*/ PCWSTR SourceString);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisUnicodeStringToAnsiString(
- /*IN OUT*/ PNDIS_ANSI_STRING DestinationString,
- /*IN*/ PNDIS_STRING SourceString);
-
-#define NdisFreeString(_s) NdisFreeMemory((_s).Buffer, (_s).MaximumLength, 0)
-#define NdisPrintString(_s) DbgPrint("%ls", (_s).Buffer)
-
-
-/* Spin lock reoutines */
-
-/*
- * VOID
- * NdisAllocateSpinLock(
- * IN PNDIS_SPIN_LOCK SpinLock);
- */
-#define NdisAllocateSpinLock(_SpinLock) \
- KeInitializeSpinLock(&(_SpinLock)->SpinLock)
-
-/*
- * VOID
- * NdisFreeSpinLock(
- * IN PNDIS_SPIN_LOCK SpinLock);
- */
-#define NdisFreeSpinLock(_SpinLock)
-
-/*
- * VOID
- * NdisAcquireSpinLock(
- * IN PNDIS_SPIN_LOCK SpinLock);
- */
-#define NdisAcquireSpinLock(_SpinLock) \
- KeAcquireSpinLock(&(_SpinLock)->SpinLock, &(_SpinLock)->OldIrql)
-
-/*
- * VOID
- * NdisReleaseSpinLock(
- * IN PNDIS_SPIN_LOCK SpinLock);
- */
-#define NdisReleaseSpinLock(_SpinLock) \
- KeReleaseSpinLock(&(_SpinLock)->SpinLock, (_SpinLock)->OldIrql)
-
-/*
- * VOID
- * NdisDprAcquireSpinLock(
- * IN PNDIS_SPIN_LOCK SpinLock);
- */
-#define NdisDprAcquireSpinLock(_SpinLock) \
-{ \
- KeAcquireSpinLockAtDpcLevel(&(_SpinLock)->SpinLock); \
- (_SpinLock)->OldIrql = DISPATCH_LEVEL; \
-}
-
-/*
- * VOID
- * NdisDprReleaseSpinLock(
- * IN PNDIS_SPIN_LOCK SpinLock);
- */
-#define NdisDprReleaseSpinLock(_SpinLock) \
- KeReleaseSpinLockFromDpcLevel(&(_SpinLock)->SpinLock)
-
-
-
-/* I/O routines */
-
-/*
- * VOID
- * NdisRawReadPortBufferUchar(
- * IN ULONG Port,
- * OUT PUCHAR Buffer,
- * IN ULONG Length);
- */
-#define NdisRawReadPortBufferUchar(Port, Buffer, Length) \
- READ_PORT_BUFFER_UCHAR((PUCHAR)(Port), (PUCHAR)(Buffer), (Length))
-
-/*
- * VOID
- * NdisRawReadPortBufferUlong(
- * IN ULONG Port,
- * OUT PULONG Buffer,
- * IN ULONG Length);
- */
-#define NdisRawReadPortBufferUlong(Port, Buffer, Length) \
- READ_PORT_BUFFER_ULONG((PULONG)(Port), (PULONG)(Buffer), (Length))
-
-/*
- * VOID
- * NdisRawReadPortBufferUshort(
- * IN ULONG Port,
- * OUT PUSHORT Buffer,
- * IN ULONG Length);
- */
-#define NdisRawReadPortBufferUshort(Port, Buffer, Length) \
- READ_PORT_BUFFER_USHORT((PUSHORT)(Port), (PUSHORT)(Buffer), (Length))
-
-
-/*
- * VOID
- * NdisRawReadPortUchar(
- * IN ULONG Port,
- * OUT PUCHAR Data);
- */
-#define NdisRawReadPortUchar(Port, Data) \
- *(Data) = READ_PORT_UCHAR((PUCHAR)(Port))
-
-/*
- * VOID
- * NdisRawReadPortUlong(
- * IN ULONG Port,
- * OUT PULONG Data);
- */
-#define NdisRawReadPortUlong(Port, Data) \
- *(Data) = READ_PORT_ULONG((PULONG)(Port))
-
-/*
- * VOID
- * NdisRawReadPortUshort(
- * IN ULONG Port,
- * OUT PUSHORT Data);
- */
-#define NdisRawReadPortUshort(Port, Data) \
- *(Data) = READ_PORT_USHORT((PUSHORT)(Port))
-
-
-/*
- * VOID
- * NdisRawWritePortBufferUchar(
- * IN ULONG Port,
- * IN PUCHAR Buffer,
- * IN ULONG Length);
- */
-#define NdisRawWritePortBufferUchar(Port, Buffer, Length) \
- WRITE_PORT_BUFFER_UCHAR((PUCHAR)(Port), (PUCHAR)(Buffer), (Length))
-
-/*
- * VOID
- * NdisRawWritePortBufferUlong(
- * IN ULONG Port,
- * IN PULONG Buffer,
- * IN ULONG Length);
- */
-#define NdisRawWritePortBufferUlong(Port, Buffer, Length) \
- WRITE_PORT_BUFFER_ULONG((PULONG)(Port), (PULONG)(Buffer), (Length))
-
-/*
- * VOID
- * NdisRawWritePortBufferUshort(
- * IN ULONG Port,
- * IN PUSHORT Buffer,
- * IN ULONG Length);
- */
-#define NdisRawWritePortBufferUshort(Port, Buffer, Length) \
- WRITE_PORT_BUFFER_USHORT((PUSHORT)(Port), (PUSHORT)(Buffer), (Length))
-
-
-/*
- * VOID
- * NdisRawWritePortUchar(
- * IN ULONG Port,
- * IN UCHAR Data);
- */
-#define NdisRawWritePortUchar(Port, Data) \
- WRITE_PORT_UCHAR((PUCHAR)(Port), (UCHAR)(Data))
-
-/*
- * VOID
- * NdisRawWritePortUlong(
- * IN ULONG Port,
- * IN ULONG Data);
- */
-#define NdisRawWritePortUlong(Port, Data) \
- WRITE_PORT_ULONG((PULONG)(Port), (ULONG)(Data))
-
-/*
- * VOID
- * NdisRawWritePortUshort(
- * IN ULONG Port,
- * IN USHORT Data);
- */
-#define NdisRawWritePortUshort(Port, Data) \
- WRITE_PORT_USHORT((PUSHORT)(Port), (USHORT)(Data))
-
-
-/*
- * VOID
- * NdisReadRegisterUchar(
- * IN PUCHAR Register,
- * OUT PUCHAR Data);
- */
-#define NdisReadRegisterUchar(Register, Data) \
- *(Data) = *(Register)
-
-/*
- * VOID
- * NdisReadRegisterUlong(
- * IN PULONG Register,
- * OUT PULONG Data);
- */
-#define NdisReadRegisterUlong(Register, Data) \
- *(Data) = *(Register)
-
-/*
- * VOID
- * NdisReadRegisterUshort(
- * IN PUSHORT Register,
- * OUT PUSHORT Data);
- */
-#define NdisReadRegisterUshort(Register, Data) \
- *(Data) = *(Register)
-
-/*
- * VOID
- * NdisReadRegisterUchar(
- * IN PUCHAR Register,
- * IN UCHAR Data);
- */
-#define NdisWriteRegisterUchar(Register, Data) \
- WRITE_REGISTER_UCHAR((Register), (Data))
-
-/*
- * VOID
- * NdisReadRegisterUlong(
- * IN PULONG Register,
- * IN ULONG Data);
- */
-#define NdisWriteRegisterUlong(Register, Data) \
- WRITE_REGISTER_ULONG((Register), (Data))
-
-/*
- * VOID
- * NdisReadRegisterUshort(
- * IN PUSHORT Register,
- * IN USHORT Data);
- */
-#define NdisWriteRegisterUshort(Register, Data) \
- WRITE_REGISTER_USHORT((Register), (Data))
-
-
-/* Linked lists */
-
-/*
- * VOID
- * NdisInitializeListHead(
- * IN PLIST_ENTRY ListHead);
- */
-#define NdisInitializeListHead(_ListHead) \
- InitializeListHead(_ListHead)
-
-/*
- * PLIST_ENTRY
- * NdisInterlockedInsertHeadList(
- * IN PLIST_ENTRY ListHead,
- * IN PLIST_ENTRY ListEntry,
- * IN PNDIS_SPIN_LOCK SpinLock);
- */
-#define NdisInterlockedInsertHeadList(_ListHead, _ListEntry, _SpinLock) \
- ExInterlockedInsertHeadList(_ListHead, _ListEntry, &(_SpinLock)->SpinLock)
-
-/*
- * PLIST_ENTRY
- * NdisInterlockedInsertTailList(
- * IN PLIST_ENTRY ListHead,
- * IN PLIST_ENTRY ListEntry,
- * IN PNDIS_SPIN_LOCK SpinLock);
- */
-#define NdisInterlockedInsertTailList(_ListHead, _ListEntry, _SpinLock) \
- ExInterlockedInsertTailList(_ListHead, _ListEntry, &(_SpinLock)->SpinLock)
-
-/*
- * PLIST_ENTRY
- * NdisInterlockedRemoveHeadList(
- * IN PLIST_ENTRY ListHead,
- * IN PNDIS_SPIN_LOCK SpinLock);
-*/
-#define NdisInterlockedRemoveHeadList(_ListHead, _SpinLock) \
- ExInterlockedRemoveHeadList(_ListHead, &(_SpinLock)->SpinLock)
-
-/*
- * VOID
- * NdisInitializeSListHead(
- * IN PSLIST_HEADER SListHead);
- */
-#define NdisInitializeSListHead(SListHead) ExInitializeSListHead(SListHead)
-
-/*
- * USHORT NdisQueryDepthSList(
- * IN PSLIST_HEADER SListHead);
- */
-#define NdisQueryDepthSList(SListHead) ExQueryDepthSList(SListHead)
-
-
-
-/* Interlocked routines */
-
-/*
- * LONG
- * NdisInterlockedDecrement(
- * IN PLONG Addend);
- */
-#define NdisInterlockedDecrement(Addend) InterlockedDecrement(Addend)
-
-/*
- * LONG
- * NdisInterlockedIncrement(
- * IN PLONG Addend);
- */
-#define NdisInterlockedIncrement(Addend) InterlockedIncrement(Addend)
-
-/*
- * VOID
- * NdisInterlockedAddUlong(
- * IN PULONG Addend,
- * IN ULONG Increment,
- * IN PNDIS_SPIN_LOCK SpinLock);
- */
-#define NdisInterlockedAddUlong(_Addend, _Increment, _SpinLock) \
- ExInterlockedAddUlong(_Addend, _Increment, &(_SpinLock)->SpinLock)
-
-
-
-/* Miscellaneous routines */
-
-NDISAPI
-VOID
-DDKAPI
-NdisCloseConfiguration(
- /*IN*/ NDIS_HANDLE ConfigurationHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisReadConfiguration(
- /*OUT*/ PNDIS_STATUS Status,
- /*OUT*/ PNDIS_CONFIGURATION_PARAMETER *ParameterValue,
- /*IN*/ NDIS_HANDLE ConfigurationHandle,
- /*IN*/ PNDIS_STRING Keyword,
- /*IN*/ NDIS_PARAMETER_TYPE ParameterType);
-
-NDISAPI
-VOID
-DDKAPI
-NdisWriteConfiguration(
- /*OUT*/ PNDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE WrapperConfigurationContext,
- /*IN*/ PNDIS_STRING Keyword,
- /*IN*/ PNDIS_CONFIGURATION_PARAMETER *ParameterValue);
-
-NDISAPI
-VOID
-DDKCDECLAPI
-NdisWriteErrorLogEntry(
- /*IN*/ NDIS_HANDLE NdisAdapterHandle,
- /*IN*/ NDIS_ERROR_CODE ErrorCode,
- /*IN*/ ULONG NumberOfErrorValues,
- /*IN*/ ...);
-
-/*
- * VOID
- * NdisStallExecution(
- * IN UINT MicrosecondsToStall)
- */
-#define NdisStallExecution KeStallExecutionProcessor
-
-/*
- * VOID
- * NdisGetCurrentSystemTime(
- * IN PLARGE_INTEGER pSystemTime);
- */
-#define NdisGetCurrentSystemTime KeQuerySystemTime
-
-NDISAPI
-VOID
-DDKAPI
-NdisGetCurrentProcessorCpuUsage(
- /*OUT*/ PULONG pCpuUsage);
-
-
-
-/* NDIS helper macros */
-
-/*
- * VOID
- * NDIS_INIT_FUNCTION(FunctionName)
- */
-#define NDIS_INIT_FUNCTION(FunctionName) \
- alloc_text(init, FunctionName)
-
-/*
- * VOID
- * NDIS_PAGABLE_FUNCTION(FunctionName)
- */
-#define NDIS_PAGEABLE_FUNCTION(FunctionName) \
- alloc_text(page, FunctionName)
-
-#define NDIS_PAGABLE_FUNCTION NDIS_PAGEABLE_FUNCTION
-
-
-/* NDIS 4.0 extensions */
-
-NDISAPI
-VOID
-DDKAPI
-NdisMFreeSharedMemory(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ ULONG Length,
- /*IN*/ BOOLEAN Cached,
- /*IN*/ PVOID VirtualAddress,
- /*IN*/ NDIS_PHYSICAL_ADDRESS PhysicalAddress);
-
-NDISAPI
-VOID
-DDKAPI
-NdisMWanIndicateReceive(
- /*OUT*/ PNDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ NDIS_HANDLE NdisLinkContext,
- /*IN*/ PUCHAR PacketBuffer,
- /*IN*/ UINT PacketSize);
-
-#define NdisMIndicateReceivePacket(_handle, _packets, _number) \
-{ \
- (*((PNDIS_MINIPORT_BLOCK)(_handle))->PacketIndicateHandler)(_handle, _packets, _number); \
-}
-
-NDISAPI
-VOID
-DDKAPI
-NdisMWanIndicateReceiveComplete(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisMWanSendComplete(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ PNDIS_WAN_PACKET Packet,
- /*IN*/ NDIS_STATUS Status);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisPciAssignResources(
- /*IN*/ NDIS_HANDLE NdisMacHandle,
- /*IN*/ NDIS_HANDLE NdisWrapperHandle,
- /*IN*/ NDIS_HANDLE WrapperConfigurationContext,
- /*IN*/ ULONG SlotNumber,
- /*OUT*/ PNDIS_RESOURCE_LIST *AssignedResources);
-
-
-/* NDIS 5.0 extensions */
-
-NDISAPI
-VOID
-DDKAPI
-NdisAcquireReadWriteLock(
- /*IN*/ PNDIS_RW_LOCK Lock,
- /*IN*/ BOOLEAN fWrite,
- /*IN*/ PLOCK_STATE LockState);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisAllocateMemoryWithTag(
- /*OUT*/ PVOID *VirtualAddress,
- /*IN*/ UINT Length,
- /*IN*/ ULONG Tag);
-
-NDISAPI
-VOID
-DDKAPI
-NdisAllocatePacketPoolEx(
- /*OUT*/ PNDIS_STATUS Status,
- /*OUT*/ PNDIS_HANDLE PoolHandle,
- /*IN*/ UINT NumberOfDescriptors,
- /*IN*/ UINT NumberOfOverflowDescriptors,
- /*IN*/ UINT ProtocolReservedLength);
-
-NDISAPI
-VOID
-DDKAPI
-NdisCompletePnPEvent(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE NdisBindingHandle,
- /*IN*/ PNET_PNP_EVENT NetPnPEvent);
-
-NDISAPI
-VOID
-DDKAPI
-NdisGetCurrentProcessorCounts(
- /*OUT*/ PULONG pIdleCount,
- /*OUT*/ PULONG pKernelAndUser,
- /*OUT*/ PULONG pIndex);
-
-NDISAPI
-VOID
-DDKAPI
-NdisGetDriverHandle(
- /*IN*/ PNDIS_HANDLE NdisBindingHandle,
- /*OUT*/ PNDIS_HANDLE NdisDriverHandle);
-
-NDISAPI
-PNDIS_PACKET
-DDKAPI
-NdisGetReceivedPacket(
- /*IN*/ PNDIS_HANDLE NdisBindingHandle,
- /*IN*/ PNDIS_HANDLE MacContext);
-
-NDISAPI
-VOID
-DDKAPI
-NdisGetSystemUptime(
- /*OUT*/ PULONG pSystemUpTime);
-
-NDISAPI
-VOID
-DDKAPI
-NdisInitializeReadWriteLock(
- /*IN*/ PNDIS_RW_LOCK Lock);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisMDeregisterDevice(
- /*IN*/ NDIS_HANDLE NdisDeviceHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisMGetDeviceProperty(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN OUT*/ PDEVICE_OBJECT *PhysicalDeviceObject /*OPTIONAL*/,
- /*IN OUT*/ PDEVICE_OBJECT *FunctionalDeviceObject /*OPTIONAL*/,
- /*IN OUT*/ PDEVICE_OBJECT *NextDeviceObject /*OPTIONAL*/,
- /*IN OUT*/ PCM_RESOURCE_LIST *AllocatedResources /*OPTIONAL*/,
- /*IN OUT*/ PCM_RESOURCE_LIST *AllocatedResourcesTranslated /*OPTIONAL*/);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisMInitializeScatterGatherDma(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ BOOLEAN Dma64BitAddresses,
- /*IN*/ ULONG MaximumPhysicalMapping);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisMPromoteMiniport(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisMQueryAdapterInstanceName(
- /*OUT*/ PNDIS_STRING AdapterInstanceName,
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisMRegisterDevice(
- /*IN*/ NDIS_HANDLE NdisWrapperHandle,
- /*IN*/ PNDIS_STRING DeviceName,
- /*IN*/ PNDIS_STRING SymbolicName,
- /*IN*/ PDRIVER_DISPATCH MajorFunctions[],
- /*OUT*/ PDEVICE_OBJECT *pDeviceObject,
- /*OUT*/ NDIS_HANDLE *NdisDeviceHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisMRegisterUnloadHandler(
- /*IN*/ NDIS_HANDLE NdisWrapperHandle,
- /*IN*/ PDRIVER_UNLOAD UnloadHandler);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisMRemoveMiniport(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisMSetMiniportSecondary(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ NDIS_HANDLE PrimaryMiniportAdapterHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisOpenConfigurationKeyByIndex(
- /*OUT*/ PNDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE ConfigurationHandle,
- /*IN*/ ULONG Index,
- /*OUT*/ PNDIS_STRING KeyName,
- /*OUT*/ PNDIS_HANDLE KeyHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisOpenConfigurationKeyByName(
- /*OUT*/ PNDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE ConfigurationHandle,
- /*IN*/ PNDIS_STRING SubKeyName,
- /*OUT*/ PNDIS_HANDLE SubKeyHandle);
-
-NDISAPI
-UINT
-DDKAPI
-NdisPacketPoolUsage(
- /*IN*/ NDIS_HANDLE PoolHandle);
-
-NTOSAPI
-VOID
-DDKAPI
-NdisSetPacketPoolProtocolId(
- /*IN*/ NDIS_HANDLE PacketPoolHandle,
- /*IN*/ UINT ProtocolId);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisQueryAdapterInstanceName(
- /*OUT*/ PNDIS_STRING AdapterInstanceName,
- /*IN*/ NDIS_HANDLE NdisBindingHandle);
-
-NDISAPI
-ULONG
-DDKAPI
-NdisReadPcmciaAttributeMemory(
- /*IN*/ NDIS_HANDLE NdisAdapterHandle,
- /*IN*/ ULONG Offset,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG Length);
-
-NDISAPI
-VOID
-DDKAPI
-NdisReleaseReadWriteLock(
- /*IN*/ PNDIS_RW_LOCK Lock,
- /*IN*/ PLOCK_STATE LockState);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisWriteEventLogEntry(
- /*IN*/ PVOID LogHandle,
- /*IN*/ NDIS_STATUS EventCode,
- /*IN*/ ULONG UniqueEventValue,
- /*IN*/ USHORT NumStrings,
- /*IN*/ PVOID StringsList /*OPTIONAL*/,
- /*IN*/ ULONG DataSize,
- /*IN*/ PVOID Data /*OPTIONAL*/);
-
-NDISAPI
-ULONG
-DDKAPI
-NdisWritePcmciaAttributeMemory(
- /*IN*/ NDIS_HANDLE NdisAdapterHandle,
- /*IN*/ ULONG Offset,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG Length);
-
-
-/* Connectionless services */
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisClAddParty(
- /*IN*/ NDIS_HANDLE NdisVcHandle,
- /*IN*/ NDIS_HANDLE ProtocolPartyContext,
- /*IN OUT*/ PCO_CALL_PARAMETERS CallParameters,
- /*OUT*/ PNDIS_HANDLE NdisPartyHandle);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisClCloseAddressFamily(
- /*IN*/ NDIS_HANDLE NdisAfHandle);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisClCloseCall(
- /*IN*/ NDIS_HANDLE NdisVcHandle,
- /*IN*/ NDIS_HANDLE NdisPartyHandle /*OPTIONAL*/,
- /*IN*/ PVOID Buffer /*OPTIONAL*/,
- /*IN*/ UINT Size);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisClDeregisterSap(
- /*IN*/ NDIS_HANDLE NdisSapHandle);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisClDropParty(
- /*IN*/ NDIS_HANDLE NdisPartyHandle,
- /*IN*/ PVOID Buffer /*OPTIONAL*/,
- /*IN*/ UINT Size);
-
-NDISAPI
-VOID
-DDKAPI
-NdisClIncomingCallComplete(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE NdisVcHandle,
- /*IN*/ PCO_CALL_PARAMETERS CallParameters);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisClMakeCall(
- /*IN*/ NDIS_HANDLE NdisVcHandle,
- /*IN OUT*/ PCO_CALL_PARAMETERS CallParameters,
- /*IN*/ NDIS_HANDLE ProtocolPartyContext /*OPTIONAL*/,
- /*OUT*/ PNDIS_HANDLE NdisPartyHandle /*OPTIONAL*/);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisClModifyCallQoS(
- /*IN*/ NDIS_HANDLE NdisVcHandle,
- /*IN*/ PCO_CALL_PARAMETERS CallParameters);
-
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisClOpenAddressFamily(
- /*IN*/ NDIS_HANDLE NdisBindingHandle,
- /*IN*/ PCO_ADDRESS_FAMILY AddressFamily,
- /*IN*/ NDIS_HANDLE ProtocolAfContext,
- /*IN*/ PNDIS_CLIENT_CHARACTERISTICS ClCharacteristics,
- /*IN*/ UINT SizeOfClCharacteristics,
- /*OUT*/ PNDIS_HANDLE NdisAfHandle);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisClRegisterSap(
- /*IN*/ NDIS_HANDLE NdisAfHandle,
- /*IN*/ NDIS_HANDLE ProtocolSapContext,
- /*IN*/ PCO_SAP Sap,
- /*OUT*/ PNDIS_HANDLE NdisSapHandle);
-
-
-/* Call Manager services */
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisCmActivateVc(
- /*IN*/ NDIS_HANDLE NdisVcHandle,
- /*IN OUT*/ PCO_CALL_PARAMETERS CallParameters);
-
-NDISAPI
-VOID
-DDKAPI
-NdisCmAddPartyComplete(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE NdisPartyHandle,
- /*IN*/ NDIS_HANDLE CallMgrPartyContext /*OPTIONAL*/,
- /*IN*/ PCO_CALL_PARAMETERS CallParameters);
-
-NDISAPI
-VOID
-DDKAPI
-NdisCmCloseAddressFamilyComplete(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE NdisAfHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisCmCloseCallComplete(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE NdisVcHandle,
- /*IN*/ NDIS_HANDLE NdisPartyHandle /*OPTIONAL*/);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisCmDeactivateVc(
- /*IN*/ NDIS_HANDLE NdisVcHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisCmDeregisterSapComplete(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE NdisSapHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisCmDispatchCallConnected(
- /*IN*/ NDIS_HANDLE NdisVcHandle);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisCmDispatchIncomingCall(
- /*IN*/ NDIS_HANDLE NdisSapHandle,
- /*IN*/ NDIS_HANDLE NdisVcHandle,
- /*IN*/ PCO_CALL_PARAMETERS CallParameters);
-
-NDISAPI
-VOID
-DDKAPI
-NdisCmDispatchIncomingCallQoSChange(
- /*IN*/ NDIS_HANDLE NdisVcHandle,
- /*IN*/ PCO_CALL_PARAMETERS CallParameters);
-
-NDISAPI
-VOID
-DDKAPI
-NdisCmDispatchIncomingCloseCall(
- /*IN*/ NDIS_STATUS CloseStatus,
- /*IN*/ NDIS_HANDLE NdisVcHandle,
- /*IN*/ PVOID Buffer /*OPTIONAL*/,
- /*IN*/ UINT Size);
-
-NDISAPI
-VOID
-DDKAPI
-NdisCmDispatchIncomingDropParty(
- /*IN*/ NDIS_STATUS DropStatus,
- /*IN*/ NDIS_HANDLE NdisPartyHandle,
- /*IN*/ PVOID Buffer /*OPTIONAL*/,
- /*IN*/ UINT Size);
-
-NDISAPI
-VOID
-DDKAPI
-NdisCmDropPartyComplete(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE NdisPartyHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisCmMakeCallComplete(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE NdisVcHandle,
- /*IN*/ NDIS_HANDLE NdisPartyHandle /*OPTIONAL*/,
- /*IN*/ NDIS_HANDLE CallMgrPartyContext /*OPTIONAL*/,
- /*IN*/ PCO_CALL_PARAMETERS CallParameters);
-
-NDISAPI
-VOID
-DDKAPI
-NdisCmModifyCallQoSComplete(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE NdisVcHandle,
- /*IN*/ PCO_CALL_PARAMETERS CallParameters);
-
-NDISAPI
-VOID
-DDKAPI
-NdisCmOpenAddressFamilyComplete(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE NdisAfHandle,
- /*IN*/ NDIS_HANDLE CallMgrAfContext);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisCmRegisterAddressFamily(
- /*IN*/ NDIS_HANDLE NdisBindingHandle,
- /*IN*/ PCO_ADDRESS_FAMILY AddressFamily,
- /*IN*/ PNDIS_CALL_MANAGER_CHARACTERISTICS CmCharacteristics,
- /*IN*/ UINT SizeOfCmCharacteristics);
-
-NDISAPI
-VOID
-DDKAPI
-NdisCmRegisterSapComplete(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE NdisSapHandle,
- /*IN*/ NDIS_HANDLE CallMgrSapContext);
-
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisMCmActivateVc(
- /*IN*/ NDIS_HANDLE NdisVcHandle,
- /*IN*/ PCO_CALL_PARAMETERS CallParameters);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisMCmCreateVc(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ NDIS_HANDLE NdisAfHandle,
- /*IN*/ NDIS_HANDLE MiniportVcContext,
- /*OUT*/ PNDIS_HANDLE NdisVcHandle);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisMCmDeactivateVc(
- /*IN*/ NDIS_HANDLE NdisVcHandle);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisMCmDeleteVc(
- /*IN*/ NDIS_HANDLE NdisVcHandle);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisMCmRegisterAddressFamily(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ PCO_ADDRESS_FAMILY AddressFamily,
- /*IN*/ PNDIS_CALL_MANAGER_CHARACTERISTICS CmCharacteristics,
- /*IN*/ UINT SizeOfCmCharacteristics);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisMCmRequest(
- /*IN*/ NDIS_HANDLE NdisAfHandle,
- /*IN*/ NDIS_HANDLE NdisVcHandle /*OPTIONAL*/,
- /*IN*/ NDIS_HANDLE NdisPartyHandle /*OPTIONAL*/,
- /*IN OUT*/ PNDIS_REQUEST NdisRequest);
-
-
-/* Connection-oriented services */
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisCoCreateVc(
- /*IN*/ NDIS_HANDLE NdisBindingHandle,
- /*IN*/ NDIS_HANDLE NdisAfHandle /*OPTIONAL*/,
- /*IN*/ NDIS_HANDLE ProtocolVcContext,
- /*IN OUT*/ PNDIS_HANDLE NdisVcHandle);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisCoDeleteVc(
- /*IN*/ NDIS_HANDLE NdisVcHandle);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisCoRequest(
- /*IN*/ NDIS_HANDLE NdisBindingHandle,
- /*IN*/ NDIS_HANDLE NdisAfHandle /*OPTIONAL*/,
- /*IN*/ NDIS_HANDLE NdisVcHandle /*OPTIONAL*/,
- /*IN*/ NDIS_HANDLE NdisPartyHandle /*OPTIONAL*/,
- /*IN OUT*/ PNDIS_REQUEST NdisRequest);
-
-NDISAPI
-VOID
-DDKAPI
-NdisCoRequestComplete(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE NdisAfHandle,
- /*IN*/ NDIS_HANDLE NdisVcHandle /*OPTIONAL*/,
- /*IN*/ NDIS_HANDLE NdisPartyHandle /*OPTIONAL*/,
- /*IN*/ PNDIS_REQUEST NdisRequest);
-
-NDISAPI
-VOID
-DDKAPI
-NdisCoSendPackets(
- /*IN*/ NDIS_HANDLE NdisVcHandle,
- /*IN*/ PPNDIS_PACKET PacketArray,
- /*IN*/ UINT NumberOfPackets);
-
-NDISAPI
-VOID
-DDKAPI
-NdisMCoActivateVcComplete(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE NdisVcHandle,
- /*IN*/ PCO_CALL_PARAMETERS CallParameters);
-
-NDISAPI
-VOID
-DDKAPI
-NdisMCoDeactivateVcComplete(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE NdisVcHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisMCoIndicateReceivePacket(
- /*IN*/ NDIS_HANDLE NdisVcHandle,
- /*IN*/ PPNDIS_PACKET PacketArray,
- /*IN*/ UINT NumberOfPackets);
-
-NDISAPI
-VOID
-DDKAPI
-NdisMCoIndicateStatus(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ NDIS_HANDLE NdisVcHandle /*OPTIONAL*/,
- /*IN*/ NDIS_STATUS GeneralStatus,
- /*IN*/ PVOID StatusBuffer /*OPTIONAL*/,
- /*IN*/ ULONG StatusBufferSize);
-
-NDISAPI
-VOID
-DDKAPI
-NdisMCoReceiveComplete(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisMCoRequestComplete(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ PNDIS_REQUEST Request);
-
-NDISAPI
-VOID
-DDKAPI
-NdisMCoSendComplete(
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE NdisVcHandle,
- /*IN*/ PNDIS_PACKET Packet);
-
-
-/* NDIS 5.0 extensions for intermediate drivers */
-
-NDISAPI
-VOID
-DDKAPI
-NdisIMAssociateMiniport(
- /*IN*/ NDIS_HANDLE DriverHandle,
- /*IN*/ NDIS_HANDLE ProtocolHandle);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisIMCancelInitializeDeviceInstance(
- /*IN*/ NDIS_HANDLE DriverHandle,
- /*IN*/ PNDIS_STRING DeviceInstance);
-
-NDISAPI
-VOID
-DDKAPI
-NdisIMCopySendCompletePerPacketInfo(
- /*IN*/ PNDIS_PACKET DstPacket,
- /*IN*/ PNDIS_PACKET SrcPacket);
-
-NDISAPI
-VOID
-DDKAPI
-NdisIMCopySendPerPacketInfo(
- /*IN*/ PNDIS_PACKET DstPacket,
- /*IN*/ PNDIS_PACKET SrcPacket);
-
-NDISAPI
-VOID
-DDKAPI
-NdisIMDeregisterLayeredMiniport(
- /*IN*/ NDIS_HANDLE DriverHandle);
-
-NDISAPI
-NDIS_HANDLE
-DDKAPI
-NdisIMGetBindingContext(
- /*IN*/ NDIS_HANDLE NdisBindingHandle);
-
-NDISAPI
-NDIS_HANDLE
-DDKAPI
-NdisIMGetDeviceContext(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisIMInitializeDeviceInstanceEx(
- /*IN*/ NDIS_HANDLE DriverHandle,
- /*IN*/ PNDIS_STRING DriverInstance,
- /*IN*/ NDIS_HANDLE DeviceContext /*OPTIONAL*/);
-
-NDISAPI
-PSINGLE_LIST_ENTRY
-DDKAPI
-NdisInterlockedPopEntrySList(
- /*IN*/ PSLIST_HEADER ListHead,
- /*IN*/ PKSPIN_LOCK Lock);
-
-NDISAPI
-PSINGLE_LIST_ENTRY
-DDKAPI
-NdisInterlockedPushEntrySList(
- /*IN*/ PSLIST_HEADER ListHead,
- /*IN*/ PSINGLE_LIST_ENTRY ListEntry,
- /*IN*/ PKSPIN_LOCK Lock);
-
-NDISAPI
-VOID
-DDKAPI
-NdisQueryBufferSafe(
- /*IN*/ PNDIS_BUFFER Buffer,
- /*OUT*/ PVOID *VirtualAddress /*OPTIONAL*/,
- /*OUT*/ PUINT Length,
- /*IN*/ UINT Priority);
-
-
-/* Prototypes for NDIS_MINIPORT_CHARACTERISTICS */
-
-typedef BOOLEAN DDKAPI
-(*W_CHECK_FOR_HANG_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportAdapterContext);
-
-typedef VOID DDKAPI
-(*W_DISABLE_INTERRUPT_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportAdapterContext);
-
-typedef VOID DDKAPI
-(*W_ENABLE_INTERRUPT_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportAdapterContext);
-
-typedef VOID DDKAPI
-(*W_HALT_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportAdapterContext);
-
-typedef VOID DDKAPI
-(*W_HANDLE_INTERRUPT_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportAdapterContext);
-
-typedef NDIS_STATUS DDKAPI
-(*W_INITIALIZE_HANDLER)(
- /*OUT*/ PNDIS_STATUS OpenErrorStatus,
- /*OUT*/ PUINT SelectedMediumIndex,
- /*IN*/ PNDIS_MEDIUM MediumArray,
- /*IN*/ UINT MediumArraySize,
- /*IN*/ NDIS_HANDLE MiniportAdapterContext,
- /*IN*/ NDIS_HANDLE WrapperConfigurationContext);
-
-typedef VOID DDKAPI
-(*W_ISR_HANDLER)(
- /*OUT*/ PBOOLEAN InterruptRecognized,
- /*OUT*/ PBOOLEAN QueueMiniportHandleInterrupt,
- /*IN*/ NDIS_HANDLE MiniportAdapterContext);
-
-typedef NDIS_STATUS DDKAPI
-(*W_QUERY_INFORMATION_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportAdapterContext,
- /*IN*/ NDIS_OID Oid,
- /*IN*/ PVOID InformationBuffer,
- /*IN*/ ULONG InformationBufferLength,
- /*OUT*/ PULONG BytesWritten,
- /*OUT*/ PULONG BytesNeeded);
-
-typedef NDIS_STATUS DDKAPI
-(*W_RECONFIGURE_HANDLER)(
- /*OUT*/ PNDIS_STATUS OpenErrorStatus,
- /*IN*/ NDIS_HANDLE MiniportAdapterContext,
- /*IN*/ NDIS_HANDLE WrapperConfigurationContext);
-
-typedef NDIS_STATUS DDKAPI
-(*W_RESET_HANDLER)(
- /*OUT*/ PBOOLEAN AddressingReset,
- /*IN*/ NDIS_HANDLE MiniportAdapterContext);
-
-typedef NDIS_STATUS DDKAPI
-(*W_SEND_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportAdapterContext,
- /*IN*/ PNDIS_PACKET Packet,
- /*IN*/ UINT Flags);
-
-typedef NDIS_STATUS DDKAPI
-(*WM_SEND_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportAdapterContext,
- /*IN*/ NDIS_HANDLE NdisLinkHandle,
- /*IN*/ PNDIS_WAN_PACKET Packet);
-
-typedef NDIS_STATUS DDKAPI
-(*W_SET_INFORMATION_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportAdapterContext,
- /*IN*/ NDIS_OID Oid,
- /*IN*/ PVOID InformationBuffer,
- /*IN*/ ULONG InformationBufferLength,
- /*OUT*/ PULONG BytesRead,
- /*OUT*/ PULONG BytesNeeded);
-
-typedef NDIS_STATUS DDKAPI
-(*W_TRANSFER_DATA_HANDLER)(
- /*OUT*/ PNDIS_PACKET Packet,
- /*OUT*/ PUINT BytesTransferred,
- /*IN*/ NDIS_HANDLE MiniportAdapterContext,
- /*IN*/ NDIS_HANDLE MiniportReceiveContext,
- /*IN*/ UINT ByteOffset,
- /*IN*/ UINT BytesToTransfer);
-
-typedef NDIS_STATUS DDKAPI
-(*WM_TRANSFER_DATA_HANDLER)(
- VOID);
-
-
-/* NDIS structures available only to miniport drivers */
-
-#define NDIS30_MINIPORT_CHARACTERISTICS_S \
- UCHAR MajorNdisVersion; \
- UCHAR MinorNdisVersion; \
- UINT Reserved; \
- W_CHECK_FOR_HANG_HANDLER CheckForHangHandler; \
- W_DISABLE_INTERRUPT_HANDLER DisableInterruptHandler; \
- W_ENABLE_INTERRUPT_HANDLER EnableInterruptHandler; \
- W_HALT_HANDLER HaltHandler; \
- W_HANDLE_INTERRUPT_HANDLER HandleInterruptHandler; \
- W_INITIALIZE_HANDLER InitializeHandler; \
- W_ISR_HANDLER ISRHandler; \
- W_QUERY_INFORMATION_HANDLER QueryInformationHandler; \
- W_RECONFIGURE_HANDLER ReconfigureHandler; \
- W_RESET_HANDLER ResetHandler; \
- _ANONYMOUS_UNION union { \
- W_SEND_HANDLER SendHandler; \
- WM_SEND_HANDLER WanSendHandler; \
- } _UNION_NAME(u1); \
- W_SET_INFORMATION_HANDLER SetInformationHandler; \
- _ANONYMOUS_UNION union { \
- W_TRANSFER_DATA_HANDLER TransferDataHandler; \
- WM_TRANSFER_DATA_HANDLER WanTransferDataHandler; \
- } _UNION_NAME(u2);
-
-typedef struct _NDIS30_MINIPORT_CHARACTERISTICS {
- NDIS30_MINIPORT_CHARACTERISTICS_S
-} NDIS30_MINIPORT_CHARACTERISTICS, *PSNDIS30_MINIPORT_CHARACTERISTICS;
-
-
-/* Extensions for NDIS 4.0 miniports */
-
-typedef VOID DDKAPI
-(*W_SEND_PACKETS_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportAdapterContext,
- /*IN*/ PPNDIS_PACKET PacketArray,
- /*IN*/ UINT NumberOfPackets);
-
-typedef VOID DDKAPI
-(*W_RETURN_PACKET_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportAdapterContext,
- /*IN*/ PNDIS_PACKET Packet);
-
-typedef VOID DDKAPI
-(*W_ALLOCATE_COMPLETE_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportAdapterContext,
- /*IN*/ PVOID VirtualAddress,
- /*IN*/ PNDIS_PHYSICAL_ADDRESS PhysicalAddress,
- /*IN*/ ULONG Length,
- /*IN*/ PVOID Context);
-
-#ifdef __cplusplus
-
-#define NDIS40_MINIPORT_CHARACTERISTICS_S \
- NDIS30_MINIPORT_CHARACTERISTICS Ndis30Chars; \
- W_RETURN_PACKET_HANDLER ReturnPacketHandler; \
- W_SEND_PACKETS_HANDLER SendPacketsHandler; \
- W_ALLOCATE_COMPLETE_HANDLER AllocateCompleteHandler;
-
-#else /* !__cplusplus */
-
-#define NDIS40_MINIPORT_CHARACTERISTICS_S \
- NDIS30_MINIPORT_CHARACTERISTICS_S \
- W_RETURN_PACKET_HANDLER ReturnPacketHandler; \
- W_SEND_PACKETS_HANDLER SendPacketsHandler; \
- W_ALLOCATE_COMPLETE_HANDLER AllocateCompleteHandler;
-
-#endif /* !__cplusplus */
-
-typedef struct _NDIS40_MINIPORT_CHARACTERISTICS {
- NDIS40_MINIPORT_CHARACTERISTICS_S
-} NDIS40_MINIPORT_CHARACTERISTICS, *PNDIS40_MINIPORT_CHARACTERISTICS;
-
-
-/* Extensions for NDIS 5.0 miniports */
-
-typedef NDIS_STATUS DDKAPI
-(*W_CO_CREATE_VC_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportAdapterContext,
- /*IN*/ NDIS_HANDLE NdisVcHandle,
- /*OUT*/ PNDIS_HANDLE MiniportVcContext);
-
-typedef NDIS_STATUS DDKAPI
-(*W_CO_DELETE_VC_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportVcContext);
-
-typedef NDIS_STATUS DDKAPI
-(*W_CO_ACTIVATE_VC_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportVcContext,
- /*IN OUT*/ PCO_CALL_PARAMETERS CallParameters);
-
-typedef NDIS_STATUS DDKAPI
-(*W_CO_DEACTIVATE_VC_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportVcContext);
-
-typedef VOID DDKAPI
-(*W_CO_SEND_PACKETS_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportVcContext,
- /*IN*/ PPNDIS_PACKET PacketArray,
- /*IN*/ UINT NumberOfPackets);
-
-typedef NDIS_STATUS DDKAPI
-(*W_CO_REQUEST_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportAdapterContext,
- /*IN*/ NDIS_HANDLE MiniportVcContext /*OPTIONAL*/,
- /*IN OUT*/ PNDIS_REQUEST NdisRequest);
-
-#ifdef __cplusplus
-
-#define NDIS50_MINIPORT_CHARACTERISTICS_S \
- NDIS40_MINIPORT_CHARACTERISTICS Ndis40Chars; \
- W_CO_CREATE_VC_HANDLER CoCreateVcHandler; \
- W_CO_DELETE_VC_HANDLER CoDeleteVcHandler; \
- W_CO_ACTIVATE_VC_HANDLER CoActivateVcHandler; \
- W_CO_DEACTIVATE_VC_HANDLER CoDeactivateVcHandler; \
- W_CO_SEND_PACKETS_HANDLER CoSendPacketsHandler; \
- W_CO_REQUEST_HANDLER CoRequestHandler;
-
-#else /* !__cplusplus */
-
-#define NDIS50_MINIPORT_CHARACTERISTICS_S \
- NDIS40_MINIPORT_CHARACTERISTICS_S \
- W_CO_CREATE_VC_HANDLER CoCreateVcHandler; \
- W_CO_DELETE_VC_HANDLER CoDeleteVcHandler; \
- W_CO_ACTIVATE_VC_HANDLER CoActivateVcHandler; \
- W_CO_DEACTIVATE_VC_HANDLER CoDeactivateVcHandler; \
- W_CO_SEND_PACKETS_HANDLER CoSendPacketsHandler; \
- W_CO_REQUEST_HANDLER CoRequestHandler;
-
-#endif /* !__cplusplus */
-
-typedef struct _NDIS50_MINIPORT_CHARACTERISTICS {
- NDIS50_MINIPORT_CHARACTERISTICS_S
-} NDIS50_MINIPORT_CHARACTERISTICS, *PSNDIS50_MINIPORT_CHARACTERISTICS;
-
-
-/* Extensions for NDIS 5.1 miniports */
-
-typedef VOID DDKAPI
-(*W_CANCEL_SEND_PACKETS_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportAdapterContext,
- /*IN*/ PVOID CancelId);
-
-
-#if defined(NDIS51)
-typedef struct _NDIS_MINIPORT_CHARACTERISTICS {
- NDIS50_MINIPORT_CHARACTERISTICS_S
-} NDIS_MINIPORT_CHARACTERISTICS, *PNDIS_MINIPORT_CHARACTERISTICS;
-#elif defined(NDIS50)
-typedef struct _NDIS_MINIPORT_CHARACTERISTICS {
- NDIS50_MINIPORT_CHARACTERISTICS_S
-} NDIS_MINIPORT_CHARACTERISTICS, *PNDIS_MINIPORT_CHARACTERISTICS;
-#elif defined(NDIS40)
-typedef struct _NDIS_MINIPORT_CHARACTERISTICS {
- NDIS40_MINIPORT_CHARACTERISTICS_S
-} NDIS_MINIPORT_CHARACTERISTICS, *PNDIS_MINIPORT_CHARACTERISTICS;
-#elif defined(NDIS30)
-typedef struct _NDIS_MINIPORT_CHARACTERISTICS {
- NDIS30_MINIPORT_CHARACTERISTICS_S
-} NDIS_MINIPORT_CHARACTERISTICS, *PNDIS_MINIPORT_CHARACTERISTICS;
-#endif /* NDIS30 */
-
-
-typedef NDIS_STATUS DDKAPI
-(*SEND_HANDLER)(
- /*IN*/ NDIS_HANDLE MacBindingHandle,
- /*IN*/ PNDIS_PACKET Packet);
-
-typedef NDIS_STATUS DDKAPI
-(*TRANSFER_DATA_HANDLER)(
- /*IN*/ NDIS_HANDLE MacBindingHandle,
- /*IN*/ NDIS_HANDLE MacReceiveContext,
- /*IN*/ UINT ByteOffset,
- /*IN*/ UINT BytesToTransfer,
- /*OUT*/ PNDIS_PACKET Packet,
- /*OUT*/ PUINT BytesTransferred);
-
-typedef NDIS_STATUS DDKAPI
-(*RESET_HANDLER)(
- /*IN*/ NDIS_HANDLE MacBindingHandle);
-
-typedef NDIS_STATUS DDKAPI
-(*REQUEST_HANDLER)(
- /*IN*/ NDIS_HANDLE MacBindingHandle,
- /*IN*/ PNDIS_REQUEST NdisRequest);
-
-
-
-/* Structures available only to full MAC drivers */
-
-typedef BOOLEAN DDKAPI
-(*PNDIS_INTERRUPT_SERVICE)(
- /*IN*/ PVOID InterruptContext);
-
-typedef VOID DDKAPI
-(*PNDIS_DEFERRED_PROCESSING)(
- /*IN*/ PVOID SystemSpecific1,
- /*IN*/ PVOID InterruptContext,
- /*IN*/ PVOID SystemSpecific2,
- /*IN*/ PVOID SystemSpecific3);
-
-
-
-typedef struct _NDIS_MINIPORT_BLOCK NDIS_MINIPORT_BLOCK, *PNDIS_MINIPORT_BLOCK;
-typedef struct _NDIS_PROTOCOL_BLOCK NDIS_PROTOCOL_BLOCK, *PNDIS_PROTOCOL_BLOCK;
-typedef struct _NDIS_OPEN_BLOCK NDIS_OPEN_BLOCK, *PNDIS_OPEN_BLOCK;
-typedef struct _NDIS_M_DRIVER_BLOCK NDIS_M_DRIVER_BLOCK, *PNDIS_M_DRIVER_BLOCK;
-typedef struct _NDIS_AF_LIST NDIS_AF_LIST, *PNDIS_AF_LIST;
-
-
-typedef struct _NDIS_MINIPORT_INTERRUPT {
- PKINTERRUPT InterruptObject;
- KSPIN_LOCK DpcCountLock;
- PVOID MiniportIdField;
- W_ISR_HANDLER MiniportIsr;
- W_HANDLE_INTERRUPT_HANDLER MiniportDpc;
- KDPC InterruptDpc;
- PNDIS_MINIPORT_BLOCK Miniport;
- UCHAR DpcCount;
- BOOLEAN Filler1;
- KEVENT DpcsCompletedEvent;
- BOOLEAN SharedInterrupt;
- BOOLEAN IsrRequested;
-} NDIS_MINIPORT_INTERRUPT, *PNDIS_MINIPORT_INTERRUPT;
-
-typedef struct _NDIS_MINIPORT_TIMER {
- KTIMER Timer;
- KDPC Dpc;
- PNDIS_TIMER_FUNCTION MiniportTimerFunction;
- PVOID MiniportTimerContext;
- PNDIS_MINIPORT_BLOCK Miniport;
- struct _NDIS_MINIPORT_TIMER *NextDeferredTimer;
-} NDIS_MINIPORT_TIMER, *PNDIS_MINIPORT_TIMER;
-
-typedef struct _NDIS_INTERRUPT {
- PKINTERRUPT InterruptObject;
- KSPIN_LOCK DpcCountLock;
- PNDIS_INTERRUPT_SERVICE MacIsr;
- PNDIS_DEFERRED_PROCESSING MacDpc;
- KDPC InterruptDpc;
- PVOID InterruptContext;
- UCHAR DpcCount;
- BOOLEAN Removing;
- KEVENT DpcsCompletedEvent;
-} NDIS_INTERRUPT, *PNDIS_INTERRUPT;
-
-
-typedef struct _MAP_REGISTER_ENTRY {
- PVOID MapRegister;
- BOOLEAN WriteToDevice;
-} MAP_REGISTER_ENTRY, *PMAP_REGISTER_ENTRY;
-
-
-typedef enum _NDIS_WORK_ITEM_TYPE {
- NdisWorkItemRequest,
- NdisWorkItemSend,
- NdisWorkItemReturnPackets,
- NdisWorkItemResetRequested,
- NdisWorkItemResetInProgress,
- NdisWorkItemHalt,
- NdisWorkItemSendLoopback,
- NdisWorkItemMiniportCallback,
- NdisMaxWorkItems
-} NDIS_WORK_ITEM_TYPE, *PNDIS_WORK_ITEM_TYPE;
-
-#define NUMBER_OF_WORK_ITEM_TYPES NdisMaxWorkItems
-#define NUMBER_OF_SINGLE_WORK_ITEMS 6
-
-typedef struct _NDIS_MINIPORT_WORK_ITEM {
- SINGLE_LIST_ENTRY Link;
- NDIS_WORK_ITEM_TYPE WorkItemType;
- PVOID WorkItemContext;
-} NDIS_MINIPORT_WORK_ITEM, *PNDIS_MINIPORT_WORK_ITEM;
-
-
-typedef struct _NDIS_BIND_PATHS {
- UINT Number;
- NDIS_STRING Paths[1];
-} NDIS_BIND_PATHS, *PNDIS_BIND_PATHS;
-
-#define DECLARE_UNKNOWN_STRUCT(BaseName) \
- typedef struct _##BaseName BaseName, *P##BaseName;
-
-#define DECLARE_UNKNOWN_PROTOTYPE(Name) \
- typedef VOID (*(Name))(VOID);
-
-#define ETH_LENGTH_OF_ADDRESS 6
-
-DECLARE_UNKNOWN_STRUCT(ETH_BINDING_INFO)
-
-DECLARE_UNKNOWN_PROTOTYPE(ETH_ADDRESS_CHANGE)
-DECLARE_UNKNOWN_PROTOTYPE(ETH_FILTER_CHANGE)
-DECLARE_UNKNOWN_PROTOTYPE(ETH_DEFERRED_CLOSE)
-
-typedef struct _ETH_FILTER {
- PNDIS_SPIN_LOCK Lock;
- CHAR (*MCastAddressBuf)[ETH_LENGTH_OF_ADDRESS];
- struct _NDIS_MINIPORT_BLOCK *Miniport;
- UINT CombinedPacketFilter;
- PETH_BINDING_INFO OpenList;
- ETH_ADDRESS_CHANGE AddressChangeAction;
- ETH_FILTER_CHANGE FilterChangeAction;
- ETH_DEFERRED_CLOSE CloseAction;
- UINT MaxMulticastAddresses;
- UINT NumAddresses;
- UCHAR AdapterAddress[ETH_LENGTH_OF_ADDRESS];
- UINT OldCombinedPacketFilter;
- CHAR (*OldMCastAddressBuf)[ETH_LENGTH_OF_ADDRESS];
- UINT OldNumAddresses;
- PETH_BINDING_INFO DirectedList;
- PETH_BINDING_INFO BMList;
- PETH_BINDING_INFO MCastSet;
-#if defined(_NDIS_)
- UINT NumOpens;
- PVOID BindListLock;
-#endif
-} ETH_FILTER, *PETH_FILTER;
-
-typedef VOID DDKAPI
-(*ETH_RCV_COMPLETE_HANDLER)(
- /*IN*/ PETH_FILTER Filter);
-
-typedef VOID DDKAPI
-(*ETH_RCV_INDICATE_HANDLER)(
- /*IN*/ PETH_FILTER Filter,
- /*IN*/ NDIS_HANDLE MacReceiveContext,
- /*IN*/ PCHAR Address,
- /*IN*/ PVOID HeaderBuffer,
- /*IN*/ UINT HeaderBufferSize,
- /*IN*/ PVOID LookaheadBuffer,
- /*IN*/ UINT LookaheadBufferSize,
- /*IN*/ UINT PacketSize);
-
-typedef VOID DDKAPI
-(*FDDI_RCV_COMPLETE_HANDLER)(
- /*IN*/ PFDDI_FILTER Filter);
-
-typedef VOID DDKAPI
-(*FDDI_RCV_INDICATE_HANDLER)(
- /*IN*/ PFDDI_FILTER Filter,
- /*IN*/ NDIS_HANDLE MacReceiveContext,
- /*IN*/ PCHAR Address,
- /*IN*/ UINT AddressLength,
- /*IN*/ PVOID HeaderBuffer,
- /*IN*/ UINT HeaderBufferSize,
- /*IN*/ PVOID LookaheadBuffer,
- /*IN*/ UINT LookaheadBufferSize,
- /*IN*/ UINT PacketSize);
-
-typedef VOID DDKAPI
-(*FILTER_PACKET_INDICATION_HANDLER)(
- /*IN*/ NDIS_HANDLE Miniport,
- /*IN*/ PPNDIS_PACKET PacketArray,
- /*IN*/ UINT NumberOfPackets);
-
-typedef VOID DDKAPI
-(*TR_RCV_COMPLETE_HANDLER)(
- /*IN*/ PTR_FILTER Filter);
-
-typedef VOID DDKAPI
-(*TR_RCV_INDICATE_HANDLER)(
- /*IN*/ PTR_FILTER Filter,
- /*IN*/ NDIS_HANDLE MacReceiveContext,
- /*IN*/ PVOID HeaderBuffer,
- /*IN*/ UINT HeaderBufferSize,
- /*IN*/ PVOID LookaheadBuffer,
- /*IN*/ UINT LookaheadBufferSize,
- /*IN*/ UINT PacketSize);
-
-typedef VOID DDKAPI
-(*WAN_RCV_COMPLETE_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ NDIS_HANDLE NdisLinkContext);
-
-typedef VOID DDKAPI
-(*WAN_RCV_HANDLER)(
- /*OUT*/ PNDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ NDIS_HANDLE NdisLinkContext,
- /*IN*/ PUCHAR Packet,
- /*IN*/ ULONG PacketSize);
-
-typedef VOID DDKFASTAPI
-(*NDIS_M_DEQUEUE_WORK_ITEM)(
- /*IN*/ PNDIS_MINIPORT_BLOCK Miniport,
- /*IN*/ NDIS_WORK_ITEM_TYPE WorkItemType,
- /*OUT*/ PVOID *WorkItemContext);
-
-typedef NDIS_STATUS DDKFASTAPI
-(*NDIS_M_QUEUE_NEW_WORK_ITEM)(
- /*IN*/ PNDIS_MINIPORT_BLOCK Miniport,
- /*IN*/ NDIS_WORK_ITEM_TYPE WorkItemType,
- /*IN*/ PVOID WorkItemContext);
-
-typedef NDIS_STATUS DDKFASTAPI
-(*NDIS_M_QUEUE_WORK_ITEM)(
- /*IN*/ PNDIS_MINIPORT_BLOCK Miniport,
- /*IN*/ NDIS_WORK_ITEM_TYPE WorkItemType,
- /*IN*/ PVOID WorkItemContext);
-
-typedef VOID DDKAPI
-(*NDIS_M_REQ_COMPLETE_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ NDIS_STATUS Status);
-
-typedef VOID DDKAPI
-(*NDIS_M_RESET_COMPLETE_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ BOOLEAN AddressingReset);
-
-typedef VOID DDKAPI
-(*NDIS_M_SEND_COMPLETE_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ PNDIS_PACKET Packet,
- /*IN*/ NDIS_STATUS Status);
-
-typedef VOID DDKAPI
-(*NDIS_M_SEND_RESOURCES_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle);
-
-typedef BOOLEAN DDKFASTAPI
-(*NDIS_M_START_SENDS)(
- /*IN*/ PNDIS_MINIPORT_BLOCK Miniport);
-
-typedef VOID DDKAPI
-(*NDIS_M_STATUS_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportHandle,
- /*IN*/ NDIS_STATUS GeneralStatus,
- /*IN*/ PVOID StatusBuffer,
- /*IN*/ UINT StatusBufferSize);
-
-typedef VOID DDKAPI
-(*NDIS_M_STS_COMPLETE_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle);
-
-typedef VOID DDKAPI
-(*NDIS_M_TD_COMPLETE_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ PNDIS_PACKET Packet,
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ UINT BytesTransferred);
-
-typedef VOID (DDKAPI *NDIS_WM_SEND_COMPLETE_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ PVOID Packet,
- /*IN*/ NDIS_STATUS Status);
-
-
-#if ARCNET
-
-#define ARC_SEND_BUFFERS 8
-#define ARC_HEADER_SIZE 4
-
-typedef struct _NDIS_ARC_BUF {
- NDIS_HANDLE ArcnetBufferPool;
- PUCHAR ArcnetLookaheadBuffer;
- UINT NumFree;
- ARC_BUFFER_LIST ArcnetBuffers[ARC_SEND_BUFFERS];
-} NDIS_ARC_BUF, *PNDIS_ARC_BUF;
-
-#endif /* ARCNET */
-
-#define NDIS_MINIPORT_WORK_QUEUE_SIZE 10
-
-typedef struct _NDIS_LOG {
- PNDIS_MINIPORT_BLOCK Miniport;
- KSPIN_LOCK LogLock;
- PIRP Irp;
- UINT TotalSize;
- UINT CurrentSize;
- UINT InPtr;
- UINT OutPtr;
- UCHAR LogBuf[1];
-} NDIS_LOG, *PNDIS_LOG;
-
-typedef struct _FILTERDBS {
- _ANONYMOUS_UNION union {
- PETH_FILTER EthDB;
- PNULL_FILTER NullDB;
- } DUMMYUNIONNAME;
- PTR_FILTER TrDB;
- PFDDI_FILTER FddiDB;
-#if ARCNET
- PARC_FILTER ArcDB;
-#else /* !ARCNET */
- PVOID XXXDB;
-#endif /* !ARCNET */
-} FILTERDBS, *PFILTERDBS;
-
-
-struct _NDIS_MINIPORT_BLOCK {
- PVOID Signature;
- PNDIS_MINIPORT_BLOCK NextMiniport;
- PNDIS_M_DRIVER_BLOCK DriverHandle;
- NDIS_HANDLE MiniportAdapterContext;
- UNICODE_STRING MiniportName;
- PNDIS_BIND_PATHS BindPaths;
- NDIS_HANDLE OpenQueue;
- REFERENCE Ref;
- NDIS_HANDLE DeviceContext;
- UCHAR Padding1;
- UCHAR LockAcquired;
- UCHAR PmodeOpens;
- UCHAR AssignedProcessor;
- KSPIN_LOCK Lock;
- PNDIS_REQUEST MediaRequest;
- PNDIS_MINIPORT_INTERRUPT Interrupt;
- ULONG Flags;
- ULONG PnPFlags;
- LIST_ENTRY PacketList;
- PNDIS_PACKET FirstPendingPacket;
- PNDIS_PACKET ReturnPacketsQueue;
- ULONG RequestBuffer;
- PVOID SetMCastBuffer;
- PNDIS_MINIPORT_BLOCK PrimaryMiniport;
- PVOID WrapperContext;
- PVOID BusDataContext;
- ULONG PnPCapabilities;
- PCM_RESOURCE_LIST Resources;
- NDIS_TIMER WakeUpDpcTimer;
- UNICODE_STRING BaseName;
- UNICODE_STRING SymbolicLinkName;
- ULONG CheckForHangSeconds;
- USHORT CFHangTicks;
- USHORT CFHangCurrentTick;
- NDIS_STATUS ResetStatus;
- NDIS_HANDLE ResetOpen;
- FILTERDBS FilterDbs;
- FILTER_PACKET_INDICATION_HANDLER PacketIndicateHandler;
- NDIS_M_SEND_COMPLETE_HANDLER SendCompleteHandler;
- NDIS_M_SEND_RESOURCES_HANDLER SendResourcesHandler;
- NDIS_M_RESET_COMPLETE_HANDLER ResetCompleteHandler;
- NDIS_MEDIUM MediaType;
- ULONG BusNumber;
- NDIS_INTERFACE_TYPE BusType;
- NDIS_INTERFACE_TYPE AdapterType;
- PDEVICE_OBJECT DeviceObject;
- PDEVICE_OBJECT PhysicalDeviceObject;
- PDEVICE_OBJECT NextDeviceObject;
- PMAP_REGISTER_ENTRY MapRegisters;
- PNDIS_AF_LIST CallMgrAfList;
- PVOID MiniportThread;
- PVOID SetInfoBuf;
- USHORT SetInfoBufLen;
- USHORT MaxSendPackets;
- NDIS_STATUS FakeStatus;
- PVOID LockHandler;
- PUNICODE_STRING pAdapterInstanceName;
- PNDIS_MINIPORT_TIMER TimerQueue;
- UINT MacOptions;
- PNDIS_REQUEST PendingRequest;
- UINT MaximumLongAddresses;
- UINT MaximumShortAddresses;
- UINT CurrentLookahead;
- UINT MaximumLookahead;
- W_HANDLE_INTERRUPT_HANDLER HandleInterruptHandler;
- W_DISABLE_INTERRUPT_HANDLER DisableInterruptHandler;
- W_ENABLE_INTERRUPT_HANDLER EnableInterruptHandler;
- W_SEND_PACKETS_HANDLER SendPacketsHandler;
- NDIS_M_START_SENDS DeferredSendHandler;
- ETH_RCV_INDICATE_HANDLER EthRxIndicateHandler;
- TR_RCV_INDICATE_HANDLER TrRxIndicateHandler;
- FDDI_RCV_INDICATE_HANDLER FddiRxIndicateHandler;
- ETH_RCV_COMPLETE_HANDLER EthRxCompleteHandler;
- TR_RCV_COMPLETE_HANDLER TrRxCompleteHandler;
- FDDI_RCV_COMPLETE_HANDLER FddiRxCompleteHandler;
- NDIS_M_STATUS_HANDLER StatusHandler;
- NDIS_M_STS_COMPLETE_HANDLER StatusCompleteHandler;
- NDIS_M_TD_COMPLETE_HANDLER TDCompleteHandler;
- NDIS_M_REQ_COMPLETE_HANDLER QueryCompleteHandler;
- NDIS_M_REQ_COMPLETE_HANDLER SetCompleteHandler;
- NDIS_WM_SEND_COMPLETE_HANDLER WanSendCompleteHandler;
- WAN_RCV_HANDLER WanRcvHandler;
- WAN_RCV_COMPLETE_HANDLER WanRcvCompleteHandler;
-#if defined(_NDIS_)
- PNDIS_MINIPORT_BLOCK NextGlobalMiniport;
- SINGLE_LIST_ENTRY WorkQueue[NUMBER_OF_WORK_ITEM_TYPES];
- SINGLE_LIST_ENTRY SingleWorkItems[NUMBER_OF_SINGLE_WORK_ITEMS];
- UCHAR SendFlags;
- UCHAR TrResetRing;
- UCHAR ArcnetAddress;
- UCHAR XState;
- _ANONYMOUS_UNION union {
-#if ARCNET
- PNDIS_ARC_BUF ArcBuf;
-#endif
- PVOID BusInterface;
- } DUMMYUNIONNAME;
- PNDIS_LOG Log;
- ULONG SlotNumber;
- PCM_RESOURCE_LIST AllocatedResources;
- PCM_RESOURCE_LIST AllocatedResourcesTranslated;
- SINGLE_LIST_ENTRY PatternList;
- NDIS_PNP_CAPABILITIES PMCapabilities;
- DEVICE_CAPABILITIES DeviceCaps;
- ULONG WakeUpEnable;
- DEVICE_POWER_STATE CurrentDevicePowerState;
- PIRP pIrpWaitWake;
- SYSTEM_POWER_STATE WaitWakeSystemState;
- LARGE_INTEGER VcIndex;
- KSPIN_LOCK VcCountLock;
- LIST_ENTRY WmiEnabledVcs;
- PNDIS_GUID pNdisGuidMap;
- PNDIS_GUID pCustomGuidMap;
- USHORT VcCount;
- USHORT cNdisGuidMap;
- USHORT cCustomGuidMap;
- USHORT CurrentMapRegister;
- PKEVENT AllocationEvent;
- USHORT BaseMapRegistersNeeded;
- USHORT SGMapRegistersNeeded;
- ULONG MaximumPhysicalMapping;
- NDIS_TIMER MediaDisconnectTimer;
- USHORT MediaDisconnectTimeOut;
- USHORT InstanceNumber;
- NDIS_EVENT OpenReadyEvent;
- NDIS_PNP_DEVICE_STATE PnPDeviceState;
- NDIS_PNP_DEVICE_STATE OldPnPDeviceState;
- PGET_SET_DEVICE_DATA SetBusData;
- PGET_SET_DEVICE_DATA GetBusData;
- KDPC DeferredDpc;
-#if 0
- /* FIXME: */
- NDIS_STATS NdisStats;
-#else
- ULONG NdisStats;
-#endif
- PNDIS_PACKET IndicatedPacket[MAXIMUM_PROCESSORS];
- PKEVENT RemoveReadyEvent;
- PKEVENT AllOpensClosedEvent;
- PKEVENT AllRequestsCompletedEvent;
- ULONG InitTimeMs;
- NDIS_MINIPORT_WORK_ITEM WorkItemBuffer[NUMBER_OF_SINGLE_WORK_ITEMS];
- PDMA_ADAPTER SystemAdapterObject;
- ULONG DriverVerifyFlags;
- POID_LIST OidList;
- USHORT InternalResetCount;
- USHORT MiniportResetCount;
- USHORT MediaSenseConnectCount;
- USHORT MediaSenseDisconnectCount;
- PNDIS_PACKET *xPackets;
- ULONG UserModeOpenReferences;
- _ANONYMOUS_UNION union {
- PVOID SavedSendHandler;
- PVOID SavedWanSendHandler;
- } DUMMYUNIONNAME2;
- PVOID SavedSendPacketsHandler;
- PVOID SavedCancelSendPacketsHandler;
- W_SEND_PACKETS_HANDLER WSendPacketsHandler;
- ULONG MiniportAttributes;
- PDMA_ADAPTER SavedSystemAdapterObject;
- USHORT NumOpens;
- USHORT CFHangXTicks;
- ULONG RequestCount;
- ULONG IndicatedPacketsCount;
- ULONG PhysicalMediumType;
- PNDIS_REQUEST LastRequest;
- LONG DmaAdapterRefCount;
- PVOID FakeMac;
- ULONG LockDbg;
- ULONG LockDbgX;
- PVOID LockThread;
- ULONG InfoFlags;
- KSPIN_LOCK TimerQueueLock;
- PKEVENT ResetCompletedEvent;
- PKEVENT QueuedBindingCompletedEvent;
- PKEVENT DmaResourcesReleasedEvent;
- FILTER_PACKET_INDICATION_HANDLER SavedPacketIndicateHandler;
- ULONG RegisteredInterrupts;
- PNPAGED_LOOKASIDE_LIST SGListLookasideList;
- ULONG ScatterGatherListSize;
-#endif /* _NDIS_ */
-};
-
-
-/* Handler prototypes for NDIS_OPEN_BLOCK */
-
-typedef NDIS_STATUS (DDKAPI *WAN_SEND_HANDLER)(
- /*IN*/ NDIS_HANDLE MacBindingHandle,
- /*IN*/ NDIS_HANDLE LinkHandle,
- /*IN*/ PVOID Packet);
-
-/* NDIS 4.0 extension */
-
-typedef VOID (DDKAPI *SEND_PACKETS_HANDLER)(
- /*IN*/ NDIS_HANDLE MiniportAdapterContext,
- /*IN*/ PPNDIS_PACKET PacketArray,
- /*IN*/ UINT NumberOfPackets);
-
-
-typedef struct _NDIS_COMMON_OPEN_BLOCK {
- PVOID MacHandle;
- NDIS_HANDLE BindingHandle;
- PNDIS_MINIPORT_BLOCK MiniportHandle;
- PNDIS_PROTOCOL_BLOCK ProtocolHandle;
- NDIS_HANDLE ProtocolBindingContext;
- PNDIS_OPEN_BLOCK MiniportNextOpen;
- PNDIS_OPEN_BLOCK ProtocolNextOpen;
- NDIS_HANDLE MiniportAdapterContext;
- BOOLEAN Reserved1;
- BOOLEAN Reserved2;
- BOOLEAN Reserved3;
- BOOLEAN Reserved4;
- PNDIS_STRING BindDeviceName;
- KSPIN_LOCK Reserved5;
- PNDIS_STRING RootDeviceName;
- _ANONYMOUS_UNION union {
- SEND_HANDLER SendHandler;
- WAN_SEND_HANDLER WanSendHandler;
- } DUMMYUNIONNAME;
- TRANSFER_DATA_HANDLER TransferDataHandler;
- SEND_COMPLETE_HANDLER SendCompleteHandler;
- TRANSFER_DATA_COMPLETE_HANDLER TransferDataCompleteHandler;
- RECEIVE_HANDLER ReceiveHandler;
- RECEIVE_COMPLETE_HANDLER ReceiveCompleteHandler;
- WAN_RECEIVE_HANDLER WanReceiveHandler;
- REQUEST_COMPLETE_HANDLER RequestCompleteHandler;
- RECEIVE_PACKET_HANDLER ReceivePacketHandler;
- SEND_PACKETS_HANDLER SendPacketsHandler;
- RESET_HANDLER ResetHandler;
- REQUEST_HANDLER RequestHandler;
- RESET_COMPLETE_HANDLER ResetCompleteHandler;
- STATUS_HANDLER StatusHandler;
- STATUS_COMPLETE_HANDLER StatusCompleteHandler;
-#if defined(_NDIS_)
- ULONG Flags;
- ULONG References;
- KSPIN_LOCK SpinLock;
- NDIS_HANDLE FilterHandle;
- ULONG ProtocolOptions;
- USHORT CurrentLookahead;
- USHORT ConnectDampTicks;
- USHORT DisconnectDampTicks;
- W_SEND_HANDLER WSendHandler;
- W_TRANSFER_DATA_HANDLER WTransferDataHandler;
- W_SEND_PACKETS_HANDLER WSendPacketsHandler;
- W_CANCEL_SEND_PACKETS_HANDLER CancelSendPacketsHandler;
- ULONG WakeUpEnable;
- PKEVENT CloseCompleteEvent;
- QUEUED_CLOSE QC;
- ULONG AfReferences;
- PNDIS_OPEN_BLOCK NextGlobalOpen;
-#endif /* _NDIS_ */
-} NDIS_COMMON_OPEN_BLOCK;
-
-struct _NDIS_OPEN_BLOCK
-{
- NDIS_COMMON_OPEN_BLOCK NdisCommonOpenBlock;
-#if defined(_NDIS_)
- struct _NDIS_OPEN_CO
- {
- struct _NDIS_CO_AF_BLOCK * NextAf;
- W_CO_CREATE_VC_HANDLER MiniportCoCreateVcHandler;
- W_CO_REQUEST_HANDLER MiniportCoRequestHandler;
- CO_CREATE_VC_HANDLER CoCreateVcHandler;
- CO_DELETE_VC_HANDLER CoDeleteVcHandler;
- PVOID CmActivateVcCompleteHandler;
- PVOID CmDeactivateVcCompleteHandler;
- PVOID CoRequestCompleteHandler;
- LIST_ENTRY ActiveVcHead;
- LIST_ENTRY InactiveVcHead;
- LONG PendingAfNotifications;
- PKEVENT AfNotifyCompleteEvent;
- };
-#endif /* _NDIS_ */
-};
-
-
-
-/* Routines for NDIS miniport drivers */
-
-NTOSAPI
-VOID
-DDKAPI
-NdisMInitializeTimer(
- /*IN*/ /*OUT*/ PNDIS_MINIPORT_TIMER Timer,
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ PNDIS_TIMER_FUNCTION TimerFunction,
- /*IN*/ PVOID FunctionContext);
-
-NTOSAPI
-VOID
-DDKAPI
-NdisMSetPeriodicTimer(
- /*IN*/ PNDIS_MINIPORT_TIMER Timer,
- /*IN*/ UINT MillisecondsPeriod);
-
-NTOSAPI
-VOID
-DDKAPI
-NdisMCancelTimer(
- /*IN*/ PNDIS_MINIPORT_TIMER Timer,
- /*OUT*/ PBOOLEAN TimerCancelled);
-
-NDISAPI
-VOID
-DDKAPI
-NdisInitializeWrapper(
- /*OUT*/ PNDIS_HANDLE NdisWrapperHandle,
- /*IN*/ PVOID SystemSpecific1,
- /*IN*/ PVOID SystemSpecific2,
- /*IN*/ PVOID SystemSpecific3);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisMAllocateMapRegisters(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ UINT DmaChannel,
- /*IN*/ BOOLEAN Dma32BitAddresses,
- /*IN*/ ULONG PhysicalMapRegistersNeeded,
- /*IN*/ ULONG MaximumPhysicalMapping);
-
-/*
- * VOID
- * NdisMArcIndicateReceive(
- * IN NDIS_HANDLE MiniportAdapterHandle,
- * IN PUCHAR HeaderBuffer,
- * IN PUCHAR DataBuffer,
- * IN UINT Length);
- */
-#define NdisMArcIndicateReceive(MiniportAdapterHandle, \
- HeaderBuffer, \
- DataBuffer, \
- Length) \
-{ \
- ArcFilterDprIndicateReceive( \
- (((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->FilterDbs.ArcDB), \
- (HeaderBuffer), \
- (DataBuffer), \
- (Length)); \
-}
-
-/*
- * VOID
- * NdisMArcIndicateReceiveComplete(
- * IN NDIS_HANDLE MiniportAdapterHandle);
- */
-#define NdisMArcIndicateReceiveComplete(MiniportAdapterHandle) \
-{ \
- if (((PNDIS_MINIPORT_BLOCK)MiniportAdapterHandle)->EthDB) \
- { \
- NdisMEthIndicateReceiveComplete(_H); \
- } \
- \
- ArcFilterDprIndicateReceiveComplete( \
- ((PNDIS_MINIPORT_BLOCK)MiniportAdapterHandle)->ArcDB); \
-}
-
-NDISAPI
-VOID
-DDKAPI
-NdisMCloseLog(
- /*IN*/ NDIS_HANDLE LogHandle);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisMCreateLog(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ UINT Size,
- /*OUT*/ PNDIS_HANDLE LogHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisMDeregisterAdapterShutdownHandler(
- /*IN*/ NDIS_HANDLE MiniportHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisMDeregisterInterrupt(
- /*IN*/ PNDIS_MINIPORT_INTERRUPT Interrupt);
-
-NDISAPI
-VOID
-DDKAPI
-NdisMDeregisterIoPortRange(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ UINT InitialPort,
- /*IN*/ UINT NumberOfPorts,
- /*IN*/ PVOID PortOffset);
-
-/*
- * VOID
- * NdisMEthIndicateReceive(
- * IN NDIS_HANDLE MiniportAdapterHandle,
- * IN NDIS_HANDLE MiniportReceiveContext,
- * IN PVOID HeaderBuffer,
- * IN UINT HeaderBufferSize,
- * IN PVOID LookaheadBuffer,
- * IN UINT LookaheadBufferSize,
- * IN UINT PacketSize);
- */
-#define NdisMEthIndicateReceive(MiniportAdapterHandle, \
- MiniportReceiveContext, \
- HeaderBuffer, \
- HeaderBufferSize, \
- LookaheadBuffer, \
- LookaheadBufferSize, \
- PacketSize) \
-{ \
- (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->EthRxIndicateHandler)( \
- (((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->FilterDbs.EthDB), \
- (MiniportReceiveContext), \
- (HeaderBuffer), \
- (HeaderBuffer), \
- (HeaderBufferSize), \
- (LookaheadBuffer), \
- (LookaheadBufferSize), \
- (PacketSize)); \
-}
-
-/*
- * VOID
- * NdisMEthIndicateReceiveComplete(
- * IN NDIS_HANDLE MiniportAdapterHandle);
- */
-#define NdisMEthIndicateReceiveComplete(MiniportAdapterHandle) \
-{ \
- (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->EthRxCompleteHandler)( \
- ((PNDIS_MINIPORT_BLOCK)MiniportAdapterHandle)->FilterDbs.EthDB); \
-}
-
-/*
- * VOID
- * NdisMFddiIndicateReceive(
- * IN NDIS_HANDLE MiniportAdapterHandle,
- * IN NDIS_HANDLE MiniportReceiveContext,
- * IN PVOID HeaderBuffer,
- * IN UINT HeaderBufferSize,
- * IN PVOID LookaheadBuffer,
- * IN UINT LookaheadBufferSize,
- * IN UINT PacketSize);
- */
-#define NdisMFddiIndicateReceive(MiniportAdapterHandle, \
- MiniportReceiveContext, \
- HeaderBuffer, \
- HeaderBufferSize, \
- LookaheadBuffer, \
- LookaheadBufferSize, \
- PacketSize) \
-{ \
- (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->FddiRxIndicateHandler)( \
- (((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->FilterDbs.FddiDB), \
- (MiniportReceiveContext), \
- (PUCHAR)(HeaderBuffer) + 1, \
- (((*(PUCHAR*)(HeaderBuffer)) & 0x40) ? \
- FDDI_LENGTH_OF_LONG_ADDRESS : \
- FDDI_LENGTH_OF_SHORT_ADDRESS), \
- (HeaderBuffer), \
- (HeaderBufferSize), \
- (LookaheadBuffer), \
- (LookaheadBufferSize), \
- (PacketSize)); \
-}
-
-
-
-/*
- * VOID
- * NdisMFddiIndicateReceiveComplete(
- * IN NDIS_HANDLE MiniportAdapterHandle);
- */
-#define NdisMFddiIndicateReceiveComplete(MiniportAdapterHandle) \
-{ \
- (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->FddiRxCompleteHandler)( \
- ((PNDIS_MINIPORT_BLOCK)MiniportAdapterHandle)->FilterDbs.FddiDB); \
-}
-
-NDISAPI
-VOID
-DDKAPI
-NdisMFlushLog(
- /*IN*/ NDIS_HANDLE LogHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisMFreeMapRegisters(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle);
-
-/*
- * VOID
- * NdisMIndicateStatus(
- * IN NDIS_HANDLE MiniportAdapterHandle,
- * IN NDIS_STATUS GeneralStatus,
- * IN PVOID StatusBuffer,
- * IN UINT StatusBufferSize);
- */
-
-#define NdisMIndicateStatus(MiniportAdapterHandle, \
- GeneralStatus, StatusBuffer, StatusBufferSize) \
- (*((PNDIS_MINIPORT_BLOCK)(_M))->StatusHandler)( \
- MiniportAdapterHandle, GeneralStatus, StatusBuffer, StatusBufferSize)
-
-/*
- * VOID
- * NdisMIndicateStatusComplete(
- * IN NDIS_HANDLE MiniportAdapterHandle);
- */
-#define NdisMIndicateStatusComplete(MiniportAdapterHandle) \
- (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->StatusCompleteHandler)( \
- MiniportAdapterHandle)
-
-/*
- * VOID
- * NdisMInitializeWrapper(
- * OUT PNDIS_HANDLE NdisWrapperHandle,
- * IN PVOID SystemSpecific1,
- * IN PVOID SystemSpecific2,
- * IN PVOID SystemSpecific3);
- */
-#define NdisMInitializeWrapper(NdisWrapperHandle, \
- SystemSpecific1, \
- SystemSpecific2, \
- SystemSpecific3) \
- NdisInitializeWrapper((NdisWrapperHandle), \
- (SystemSpecific1), \
- (SystemSpecific2), \
- (SystemSpecific3))
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisMMapIoSpace(
- /*OUT*/ PVOID *VirtualAddress,
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ NDIS_PHYSICAL_ADDRESS PhysicalAddress,
- /*IN*/ UINT Length);
-
-/*
- * VOID
- * NdisMQueryInformationComplete(
- * IN NDIS_HANDLE MiniportAdapterHandle,
- * IN NDIS_STATUS Status);
- */
-#define NdisMQueryInformationComplete(MiniportAdapterHandle, Status) \
- (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->QueryCompleteHandler)(MiniportAdapterHandle, Status)
-
-NDISAPI
-VOID
-DDKAPI
-NdisMRegisterAdapterShutdownHandler(
- /*IN*/ NDIS_HANDLE MiniportHandle,
- /*IN*/ PVOID ShutdownContext,
- /*IN*/ ADAPTER_SHUTDOWN_HANDLER ShutdownHandler);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisMRegisterInterrupt(
- /*OUT*/ PNDIS_MINIPORT_INTERRUPT Interrupt,
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ UINT InterruptVector,
- /*IN*/ UINT InterruptLevel,
- /*IN*/ BOOLEAN RequestIsr,
- /*IN*/ BOOLEAN SharedInterrupt,
- /*IN*/ NDIS_INTERRUPT_MODE InterruptMode);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisMRegisterIoPortRange(
- /*OUT*/ PVOID *PortOffset,
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ UINT InitialPort,
- /*IN*/ UINT NumberOfPorts);
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisMRegisterMiniport(
- /*IN*/ NDIS_HANDLE NdisWrapperHandle,
- /*IN*/ PNDIS_MINIPORT_CHARACTERISTICS MiniportCharacteristics,
- /*IN*/ UINT CharacteristicsLength);
-
-
-#if !defined(_NDIS_)
-
-/*
- * VOID
- * NdisMResetComplete(
- * IN NDIS_HANDLE MiniportAdapterHandle,
- * IN NDIS_STATUS Status,
- * IN BOOLEAN AddressingReset);
- */
-#define NdisMResetComplete(MiniportAdapterHandle, \
- Status, \
- AddressingReset) \
-{ \
- (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->ResetCompleteHandler)( \
- MiniportAdapterHandle, Status, AddressingReset); \
-}
-
-/*
- * VOID
- * NdisMSendComplete(
- * IN NDIS_HANDLE MiniportAdapterHandle,
- * IN PNDIS_PACKET Packet,
- * IN NDIS_STATUS Status);
- */
-#define NdisMSendComplete(MiniportAdapterHandle, \
- Packet, \
- Status) \
-{ \
- (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->SendCompleteHandler)( \
- MiniportAdapterHandle, Packet, Status); \
-}
-
-/*
- * VOID
- * NdisMSendResourcesAvailable(
- * IN NDIS_HANDLE MiniportAdapterHandle);
- */
-#define NdisMSendResourcesAvailable(MiniportAdapterHandle) \
-{ \
- (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->SendResourcesHandler)( \
- MiniportAdapterHandle); \
-}
-
-/*
- * VOID
- * NdisMTransferDataComplete(
- * IN NDIS_HANDLE MiniportAdapterHandle,
- * IN PNDIS_PACKET Packet,
- * IN NDIS_STATUS Status,
- * IN UINT BytesTransferred);
- */
-#define NdisMTransferDataComplete(MiniportAdapterHandle, \
- Packet, \
- Status, \
- BytesTransferred) \
-{ \
- (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->TDCompleteHandler)( \
- MiniportAdapterHandle, Packet, Status, BytesTransferred) \
-}
-
-#endif /* !_NDIS_ */
-
-
-/*
- * VOID
- * NdisMSetAttributes(
- * IN NDIS_HANDLE MiniportAdapterHandle,
- * IN NDIS_HANDLE MiniportAdapterContext,
- * IN BOOLEAN BusMaster,
- * IN NDIS_INTERFACE_TYPE AdapterType);
- */
-#define NdisMSetAttributes(MiniportAdapterHandle, \
- MiniportAdapterContext, \
- BusMaster, \
- AdapterType) \
- NdisMSetAttributesEx(MiniportAdapterHandle, \
- MiniportAdapterContext, \
- 0, \
- (BusMaster) ? NDIS_ATTRIBUTE_BUS_MASTER : 0, \
- AdapterType)
-
-NDISAPI
-VOID
-DDKAPI
-NdisMSetAttributesEx(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ NDIS_HANDLE MiniportAdapterContext,
- /*IN*/ UINT CheckForHangTimeInSeconds /*OPTIONAL*/,
- /*IN*/ ULONG AttributeFlags,
- /*IN*/ NDIS_INTERFACE_TYPE AdapterType);
-
-/*
- * VOID
- * NdisMSetInformationComplete(
- * IN NDIS_HANDLE MiniportAdapterHandle,
- * IN NDIS_STATUS Status);
- */
-#define NdisMSetInformationComplete(MiniportAdapterHandle, \
- Status) \
- (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->SetCompleteHandler)( \
- MiniportAdapterHandle, Status)
-
-NDISAPI
-VOID
-DDKAPI
-NdisMSleep(
- /*IN*/ ULONG MicrosecondsToSleep);
-
-NDISAPI
-BOOLEAN
-DDKAPI
-NdisMSynchronizeWithInterrupt(
- /*IN*/ PNDIS_MINIPORT_INTERRUPT Interrupt,
- /*IN*/ PVOID SynchronizeFunction,
- /*IN*/ PVOID SynchronizeContext);
-
-/*
- * VOID
- * NdisMTrIndicateReceive(
- * IN NDIS_HANDLE MiniportAdapterHandle,
- * IN NDIS_HANDLE MiniportReceiveContext,
- * IN PVOID HeaderBuffer,
- * IN UINT HeaderBufferSize,
- * IN PVOID LookaheadBuffer,
- * IN UINT LookaheadBufferSize,
- * IN UINT PacketSize);
- */
-#define NdisMTrIndicateReceive(MiniportAdapterHandle, \
- MiniportReceiveContext, \
- HeaderBuffer, \
- HeaderBufferSize, \
- LookaheadBuffer, \
- LookaheadBufferSize, \
- PacketSize) \
-{ \
- (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->TrRxIndicateHandler)( \
- (((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->FilterDbs.TrDB), \
- (MiniportReceiveContext), \
- (HeaderBuffer), \
- (HeaderBuffer), \
- (HeaderBufferSize), \
- (LookaheadBuffer), \
- (LookaheadBufferSize), \
- (PacketSize)); \
-}
-
-/*
- * VOID
- * NdisMTrIndicateReceiveComplete(
- * IN NDIS_HANDLE MiniportAdapterHandle);
- */
-#define NdisMTrIndicateReceiveComplete(MiniportAdapterHandle) \
-{ \
- (*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->TrRxCompleteHandler)( \
- ((PNDIS_MINIPORT_BLOCK)MiniportAdapterHandle)->FilterDbs.TrDB); \
-}
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisMWriteLogData(
- /*IN*/ NDIS_HANDLE LogHandle,
- /*IN*/ PVOID LogBuffer,
- /*IN*/ UINT LogBufferSize);
-
-NDISAPI
-VOID
-DDKAPI
-NdisMQueryAdapterResources(
- /*OUT*/ PNDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE WrapperConfigurationContext,
- /*OUT*/ PNDIS_RESOURCE_LIST ResourceList,
- /*IN OUT*/ PUINT BufferSize);
-
-NDISAPI
-VOID
-DDKAPI
-NdisTerminateWrapper(
- /*IN*/ NDIS_HANDLE NdisWrapperHandle,
- /*IN*/ PVOID SystemSpecific);
-
-NDISAPI
-VOID
-DDKAPI
-NdisMUnmapIoSpace(
- /*IN*/ NDIS_HANDLE MiniportAdapterHandle,
- /*IN*/ PVOID VirtualAddress,
- /*IN*/ UINT Length);
-
-
-
-/* NDIS intermediate miniport structures */
-
-typedef VOID (DDKAPI *W_MINIPORT_CALLBACK)(
- /*IN*/ NDIS_HANDLE MiniportAdapterContext,
- /*IN*/ PVOID CallbackContext);
-
-
-
-/* Routines for intermediate miniport drivers */
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisIMDeInitializeDeviceInstance(
- /*IN*/ NDIS_HANDLE NdisMiniportHandle);
-
-/*
- * NDIS_STATUS
- * NdisIMInitializeDeviceInstance(
- * IN NDIS_HANDLE DriverHandle,
- * IN PNDIS_STRING DeviceInstance);
- */
-#define NdisIMInitializeDeviceInstance(DriverHandle, DeviceInstance) \
- NdisIMInitializeDeviceInstanceEx(DriverHandle, DeviceInstance, NULL)
-
-NDISAPI
-NDIS_STATUS
-DDKAPI
-NdisIMRegisterLayeredMiniport(
- /*IN*/ NDIS_HANDLE NdisWrapperHandle,
- /*IN*/ PNDIS_MINIPORT_CHARACTERISTICS MiniportCharacteristics,
- /*IN*/ UINT CharacteristicsLength,
- /*OUT*/ PNDIS_HANDLE DriverHandle);
-
-
-/* Functions obsoleted by NDIS 5.0 */
-
-NDISAPI
-VOID
-DDKAPI
-NdisFreeDmaChannel(
- /*IN*/ PNDIS_HANDLE NdisDmaHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisSetupDmaTransfer(
- /*OUT*/ PNDIS_STATUS Status,
- /*IN*/ PNDIS_HANDLE NdisDmaHandle,
- /*IN*/ PNDIS_BUFFER Buffer,
- /*IN*/ ULONG Offset,
- /*IN*/ ULONG Length,
- /*IN*/ BOOLEAN WriteToDevice);
-
-NDISAPI
-NTSTATUS
-DDKAPI
-NdisUpcaseUnicodeString(
- /*OUT*/ PUNICODE_STRING DestinationString,
- /*IN*/ PUNICODE_STRING SourceString);
-
-
-/* Routines for NDIS protocol drivers */
-
-NDISAPI
-VOID
-DDKAPI
-NdisRequest(
- /*OUT*/ PNDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE NdisBindingHandle,
- /*IN*/ PNDIS_REQUEST NdisRequest);
-
-NDISAPI
-VOID
-DDKAPI
-NdisReset(
- /*OUT*/ PNDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE NdisBindingHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisSend(
- /*OUT*/ PNDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE NdisBindingHandle,
- /*IN*/ PNDIS_PACKET Packet);
-
-NDISAPI
-VOID
-DDKAPI
-NdisSendPackets(
- /*IN*/ NDIS_HANDLE NdisBindingHandle,
- /*IN*/ PPNDIS_PACKET PacketArray,
- /*IN*/ UINT NumberOfPackets);
-
-NDISAPI
-VOID
-DDKAPI
-NdisTransferData(
- /*OUT*/ PNDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE NdisBindingHandle,
- /*IN*/ NDIS_HANDLE MacReceiveContext,
- /*IN*/ UINT ByteOffset,
- /*IN*/ UINT BytesToTransfer,
- /*IN OUT*/ PNDIS_PACKET Packet,
- /*OUT*/ PUINT BytesTransferred);
-
-NDISAPI
-VOID
-DDKAPI
-NdisCloseAdapter(
- /*OUT*/ PNDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE NdisBindingHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisCompleteBindAdapter(
- /*IN*/ NDIS_HANDLE BindAdapterContext,
- /*IN*/ NDIS_STATUS Status,
- /*IN*/ NDIS_STATUS OpenStatus);
-
-NDISAPI
-VOID
-DDKAPI
-NdisCompleteUnbindAdapter(
- /*IN*/ NDIS_HANDLE UnbindAdapterContext,
- /*IN*/ NDIS_STATUS Status);
-
-NDISAPI
-VOID
-DDKAPI
-NdisDeregisterProtocol(
- /*OUT*/ PNDIS_STATUS Status,
- /*IN*/ NDIS_HANDLE NdisProtocolHandle);
-
-NDISAPI
-VOID
-DDKAPI
-NdisOpenAdapter(
- /*OUT*/ PNDIS_STATUS Status,
- /*OUT*/ PNDIS_STATUS OpenErrorStatus,
- /*OUT*/ PNDIS_HANDLE NdisBindingHandle,
- /*OUT*/ PUINT SelectedMediumIndex,
- /*IN*/ PNDIS_MEDIUM MediumArray,
- /*IN*/ UINT MediumArraySize,
- /*IN*/ NDIS_HANDLE NdisProtocolHandle,
- /*IN*/ NDIS_HANDLE ProtocolBindingContext,
- /*IN*/ PNDIS_STRING AdapterName,
- /*IN*/ UINT OpenOptions,
- /*IN*/ PSTRING AddressingInformation);
-
-NDISAPI
-VOID
-DDKAPI
-NdisOpenProtocolConfiguration(
- /*OUT*/ PNDIS_STATUS Status,
- /*OUT*/ PNDIS_HANDLE ConfigurationHandle,
- /*IN*/ PNDIS_STRING ProtocolSection);
-
-NDISAPI
-VOID
-DDKAPI
-NdisRegisterProtocol(
- /*OUT*/ PNDIS_STATUS Status,
- /*OUT*/ PNDIS_HANDLE NdisProtocolHandle,
- /*IN*/ PNDIS_PROTOCOL_CHARACTERISTICS ProtocolCharacteristics,
- /*IN*/ UINT CharacteristicsLength);
-
-/* Obsoleted in Windows XP */
-
-/* Prototypes for NDIS_MAC_CHARACTERISTICS */
-
-typedef NDIS_STATUS (*OPEN_ADAPTER_HANDLER)(
- /*OUT*/ PNDIS_STATUS OpenErrorStatus,
- /*OUT*/ NDIS_HANDLE *MacBindingHandle,
- /*OUT*/ PUINT SelectedMediumIndex,
- /*IN*/ PNDIS_MEDIUM MediumArray,
- /*IN*/ UINT MediumArraySize,
- /*IN*/ NDIS_HANDLE NdisBindingContext,
- /*IN*/ NDIS_HANDLE MacAdapterContext,
- /*IN*/ UINT OpenOptions,
- /*IN*/ PSTRING AddressingInformation /*OPTIONAL*/);
-
-typedef NDIS_STATUS (DDKAPI *CLOSE_ADAPTER_HANDLER)(
- /*IN*/ NDIS_HANDLE MacBindingHandle);
-
-typedef NDIS_STATUS (DDKAPI *WAN_TRANSFER_DATA_HANDLER)(
- VOID);
-
-typedef NDIS_STATUS (DDKAPI *QUERY_GLOBAL_STATISTICS_HANDLER)(
- /*IN*/ NDIS_HANDLE MacAdapterContext,
- /*IN*/ PNDIS_REQUEST NdisRequest);
-
-typedef VOID (DDKAPI *UNLOAD_MAC_HANDLER)(
- /*IN*/ NDIS_HANDLE MacMacContext);
-
-typedef NDIS_STATUS (DDKAPI *ADD_ADAPTER_HANDLER)(
- /*IN*/ NDIS_HANDLE MacMacContext,
- /*IN*/ NDIS_HANDLE WrapperConfigurationContext,
- /*IN*/ PNDIS_STRING AdapterName);
-
-typedef VOID (*REMOVE_ADAPTER_HANDLER)(
- /*IN*/ NDIS_HANDLE MacAdapterContext);
-
-typedef struct _NDIS_MAC_CHARACTERISTICS {
- UCHAR MajorNdisVersion;
- UCHAR MinorNdisVersion;
- UINT Reserved;
- OPEN_ADAPTER_HANDLER OpenAdapterHandler;
- CLOSE_ADAPTER_HANDLER CloseAdapterHandler;
- SEND_HANDLER SendHandler;
- TRANSFER_DATA_HANDLER TransferDataHandler;
- RESET_HANDLER ResetHandler;
- REQUEST_HANDLER RequestHandler;
- QUERY_GLOBAL_STATISTICS_HANDLER QueryGlobalStatisticsHandler;
- UNLOAD_MAC_HANDLER UnloadMacHandler;
- ADD_ADAPTER_HANDLER AddAdapterHandler;
- REMOVE_ADAPTER_HANDLER RemoveAdapterHandler;
- NDIS_STRING Name;
-} NDIS_MAC_CHARACTERISTICS, *PNDIS_MAC_CHARACTERISTICS;
-
-typedef NDIS_MAC_CHARACTERISTICS NDIS_WAN_MAC_CHARACTERISTICS;
-typedef NDIS_WAN_MAC_CHARACTERISTICS *PNDIS_WAN_MAC_CHARACTERISTICS;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NDIS_H */
-
-/* EOF */
diff --git a/winsup/w32api/include/ddk/ndisguid.h b/winsup/w32api/include/ddk/ndisguid.h
deleted file mode 100644
index 27b8777..0000000
--- a/winsup/w32api/include/ddk/ndisguid.h
+++ /dev/null
@@ -1,439 +0,0 @@
-/*
- * ndisguid.h
- *
- * GUIDs for NDIS drivers
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NDISGUID_H
-#define __NDISGUID_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-DEFINE_GUID(GUID_NDIS_LAN_CLASS,
- 0xad498944, 0x762f, 0x11d0, 0x8d, 0xcb, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_ENUMERATE_ADAPTER,
- 0x981f2d7f, 0xb1f3, 0x11d0, 0x8d, 0xd7, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_ENUMERATE_VC,
- 0x981f2d82, 0xb1f3, 0x11d0, 0x8d, 0xd7, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_NOTIFY_ADAPTER_ARRIVAL,
- 0x981f2d81, 0xb1f3, 0x11d0, 0x8d, 0xd7, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_NOTIFY_ADAPTER_REMOVAL,
- 0x981f2d80, 0xb1f3, 0x11d0, 0x8d, 0xd7, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_NOTIFY_VC_ARRIVAL,
- 0x182f9e0c, 0xb1f3, 0x11d0, 0x8d, 0xd7, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_NOTIFY_VC_REMOVAL,
- 0x981f2d79, 0xb1f3, 0x11d0, 0x8d, 0xd7, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_NOTIFY_BIND,
- 0x5413531c, 0xb1f3, 0x11d0, 0x8d, 0xd7, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_NOTIFY_UNBIND,
- 0x6e3ce1ec, 0xb1f3, 0x11d0, 0x8d, 0xd7, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_WAKE_ON_MAGIC_PACKET_ONLY,
- 0xa14f1c97, 0x8839, 0x4f8a, 0x99, 0x96, 0xa2, 0x89, 0x96, 0xeb, 0xbf, 0x1d);
-
-
-DEFINE_GUID(GUID_NDIS_802_3_CURRENT_ADDRESS,
- 0x44795700, 0xa61b, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_802_3_MAC_OPTIONS,
- 0x44795703, 0xa61b, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_802_3_MAXIMUM_LIST_SIZE,
- 0x44795702, 0xa61b, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_802_3_MULTICAST_LIST,
- 0x44795701, 0xa61b, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_802_3_PERMANENT_ADDRESS,
- 0x447956ff, 0xa61b, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_802_3_RCV_ERROR_ALIGNMENT,
- 0x44795704, 0xa61b, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_802_3_XMIT_MORE_COLLISIONS,
- 0x44795706, 0xa61b, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_802_3_XMIT_ONE_COLLISION,
- 0x44795705, 0xa61b, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_802_5_CURRENT_ADDRESS,
- 0x44795708, 0xa61b, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_802_5_CURRENT_FUNCTIONAL,
- 0x44795709, 0xa61b, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_802_5_CURRENT_GROUP,
- 0x4479570a, 0xa61b, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_802_5_CURRENT_RING_STATE,
- 0xacf14032, 0xa61c, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_802_5_CURRENT_RING_STATUS,
- 0x890a36ec, 0xa61c, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_802_5_LAST_OPEN_STATUS,
- 0x4479570b, 0xa61b, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_802_5_PERMANENT_ADDRESS,
- 0x44795707, 0xa61b, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_802_5_LINE_ERRORS,
- 0xacf14033, 0xa61c, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_802_5_LOST_FRAMES,
- 0xacf14034, 0xa61c, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-
-DEFINE_GUID(GUID_NDIS_802_11_ADD_WEP,
- 0x4307bff0, 0x2129, 0x11d4, 0x97, 0xeb, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-DEFINE_GUID(GUID_NDIS_802_11_AUTHENTICATION_MODE,
- 0x43920a24, 0x2129, 0x11d4, 0x97, 0xeb, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-DEFINE_GUID(GUID_NDIS_802_11_BSSID,
- 0x2504b6c2, 0x1fa5, 0x11d4, 0x97, 0xeb, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-DEFINE_GUID(GUID_NDIS_802_11_BSSID_LIST,
- 0x69526f9a, 0x2062, 0x11d4, 0x97, 0xeb, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-DEFINE_GUID(GUID_NDIS_802_11_BASIC_RATES,
- 0x4a198516, 0x2068, 0x11d4, 0x97, 0xeb, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-DEFINE_GUID(GUID_NDIS_802_11_CONFIGURATION,
- 0x4a4df982, 0x2068, 0x11d4, 0x97, 0xeb, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-DEFINE_GUID(GUID_NDIS_802_11_DESIRED_RATES,
- 0x452ee08e, 0x2536, 0x11d4, 0x97, 0xeb, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-DEFINE_GUID(GUID_NDIS_802_11_DISASSOCIATE,
- 0x43671f40, 0x2129, 0x11d4, 0x97, 0xeb, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-DEFINE_GUID(GUID_NDIS_802_11_FRAGMENTATION_THRESHOLD,
- 0x69aaa7c4, 0x2062, 0x11d4, 0x97, 0xeb, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-DEFINE_GUID(GUID_NDIS_802_11_INFRASTRUCTURE_MODE,
- 0x697d5a7e, 0x2062, 0x11d4, 0x97, 0xeb, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-DEFINE_GUID(GUID_NDIS_802_11_NETWORK_TYPES_SUPPORTED,
- 0x8531d6e6, 0x2041, 0x11d4, 0x97, 0xeb, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-DEFINE_GUID(GUID_NDIS_802_11_NETWORK_TYPE_IN_USE,
- 0x857e2326, 0x2041, 0x11d4, 0x97, 0xeb, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-DEFINE_GUID(GUID_NDIS_802_11_NUMBER_OF_ANTENNAS,
- 0x01779336, 0x2064, 0x11d4, 0x97, 0xeb, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-DEFINE_GUID(GUID_NDIS_802_11_POWER_MODE,
- 0x85be837c, 0x2041, 0x11d4, 0x97, 0xeb, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-DEFINE_GUID(GUID_NDIS_802_11_RATES_SUPPORTED,
- 0x49db8722, 0x2068, 0x11d4, 0x97, 0xeb, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-DEFINE_GUID(GUID_NDIS_802_11_REMOVE_WEP,
- 0x433c345c, 0x2129, 0x11d4, 0x97, 0xeb, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-DEFINE_GUID(GUID_NDIS_802_11_PRIVACY_FILTER,
- 0x6733c4e9, 0x4792, 0x11d4, 0x97, 0xf1, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-DEFINE_GUID(GUID_NDIS_802_11_RSSI,
- 0x1507db16, 0x2053, 0x11d4, 0x97, 0xeb, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-DEFINE_GUID(GUID_NDIS_802_11_RSSI_TRIGGER,
- 0x155689b8, 0x2053, 0x11d4, 0x97, 0xeb, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-DEFINE_GUID(GUID_NDIS_802_11_RTS_THRESHOLD,
- 0x0134d07e, 0x2064, 0x11d4, 0x97, 0xeb, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-DEFINE_GUID(GUID_NDIS_802_11_RX_ANTENNA_SELECTED,
- 0x01ac07a2, 0x2064, 0x11d4, 0x97, 0xeb, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-DEFINE_GUID(GUID_NDIS_802_11_SSID,
- 0x7d2a90ea, 0x2041, 0x11d4, 0x97, 0xeb, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-DEFINE_GUID(GUID_NDIS_802_11_STATISTICS,
- 0x42bb73b0, 0x2129, 0x11d4, 0x97, 0xeb, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-DEFINE_GUID(GUID_NDIS_802_11_TX_POWER_LEVEL,
- 0x11e6ba76, 0x2053, 0x11d4, 0x97, 0xeb, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-DEFINE_GUID(GUID_NDIS_802_11_TX_ANTENNA_SELECTED,
- 0x01dbb74a, 0x2064, 0x11d4, 0x97, 0xeb, 0x00, 0xc0, 0x4f, 0x79, 0xc4, 0x03);
-
-
-DEFINE_GUID(GUID_NDIS_ATM_HW_CURRENT_ADDRESS,
- 0x791ad1a1, 0xe35c, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_ATM_MAX_AAL0_PACKET_SIZE,
- 0x791ad1a5, 0xe35c, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_ATM_MAX_AAL1_PACKET_SIZE,
- 0x791ad1a6, 0xe35c, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_ATM_MAX_AAL34_PACKET_SIZE,
- 0x791ad1a7, 0xe35c, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_ATM_MAX_AAL5_PACKET_SIZE,
- 0x791ad191, 0xe35c, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_ATM_MAX_ACTIVE_VCI_BITS,
- 0x791ad1a3, 0xe35c, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_ATM_MAX_ACTIVE_VCS,
- 0x791ad1a2, 0xe35c, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_ATM_MAX_ACTIVE_VPI_BITS,
- 0x791ad1a4, 0xe35c, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_ATM_SUPPORTED_AAL_TYPES,
- 0x791ad1a0, 0xe35c, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_ATM_SUPPORTED_SERVICE_CATEGORY,
- 0x791ad19f, 0xe35c, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_ATM_SUPPORTED_VC_RATES,
- 0x791ad19e, 0xe35c, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-
-DEFINE_GUID(GUID_NDIS_ATM_RCV_CELLS_DROPPED,
- 0x0a21480c, 0xe35f, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_ATM_RCV_CELLS_OK,
- 0x0a21480a, 0xe35f, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_ATM_XMIT_CELLS_OK,
- 0x0a21480b, 0xe35f, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-
-DEFINE_GUID(GUID_NDIS_FDDI_LONG_CURRENT_ADDR,
- 0xacf14036, 0xa61c, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_FDDI_LONG_MAX_LIST_SIZE,
- 0xacf14038, 0xa61c, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_FDDI_LONG_MULTICAST_LIST,
- 0xacf14037, 0xa61c, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_FDDI_LONG_PERMANENT_ADDR,
- 0xacf14035, 0xa61c, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_FDDI_SHORT_CURRENT_ADDR,
- 0xacf1403a, 0xa61c, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_FDDI_SHORT_MAX_LIST_SIZE,
- 0xacf1403c, 0xa61c, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_FDDI_SHORT_MULTICAST_LIST,
- 0xacf1403b, 0xa61c, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_FDDI_SHORT_PERMANENT_ADDR,
- 0xacf14039, 0xa61c, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-
-DEFINE_GUID(GUID_NDIS_FDDI_ATTACHMENT_TYPE,
- 0xacf1403d, 0xa61c, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_FDDI_DOWNSTREAM_NODE_LONG,
- 0xacf1403f, 0xa61c, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_FDDI_FRAME_ERRORS,
- 0xacf14040, 0xa61c, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_FDDI_FRAMES_LOST,
- 0xacf14041, 0xa61c, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_FDDI_LCT_FAILURES,
- 0xacf14043, 0xa61c, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_FDDI_LCONNECTION_STATE,
- 0xacf14045, 0xa61c, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_FDDI_LEM_REJECTS,
- 0xacf14044, 0xa61c, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_FDDI_RING_MGT_STATE,
- 0xacf14042, 0xa61c, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_FDDI_UPSTREAM_NODE_LONG,
- 0xacf1403e, 0xa61c, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-
-DEFINE_GUID(GUID_NDIS_GEN_CURRENT_LOOKAHEAD,
- 0x5ec10361, 0xa61a, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_CURRENT_PACKET_FILTER,
- 0x5ec10360, 0xa61a, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_DRIVER_VERSION,
- 0x5ec10362, 0xa61a, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_HARDWARE_STATUS,
- 0x5ec10354, 0xa61a, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_MEDIA_IN_USE,
- 0x5ec10356, 0xa61a, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_MEDIA_SUPPORTED,
- 0x5ec10355, 0xa61a, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_LINK_SPEED,
- 0x5ec10359, 0xa61a, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_MAC_OPTIONS,
- 0x5ec10365, 0xa61a, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_MAXIMUM_LOOKAHEAD,
- 0x5ec10357, 0xa61a, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_MAXIMUM_FRAME_SIZE,
- 0x5ec10358, 0xa61a, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_MAXIMUM_SEND_PACKETS,
- 0x5ec10367, 0xa61a, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_MAXIMUM_TOTAL_SIZE,
- 0x5ec10363, 0xa61a, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_MEDIA_CONNECT_STATUS,
- 0x5ec10366, 0xa61a, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_RECEIVE_BLOCK_SIZE,
- 0x5ec1035d, 0xa61a, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_RECEIVE_BUFFER_SPACE,
- 0x5ec1035b, 0xa61a, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_TRANSMIT_BUFFER_SPACE,
- 0x5ec1035a, 0xa61a, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_TRANSMIT_BLOCK_SIZE,
- 0x5ec1035c, 0xa61a, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_VENDOR_DESCRIPTION,
- 0x5ec1035f, 0xa61a, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_VENDOR_DRIVER_VERSION,
- 0x447956f9, 0xa61b, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_VENDOR_ID,
- 0x5ec1035e, 0xa61a, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-
-DEFINE_GUID(GUID_NDIS_GEN_RCV_ERROR,
- 0x447956fd, 0xa61b, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_RCV_NO_BUFFER,
- 0x447956fe, 0xa61b, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_RCV_OK,
- 0x447956fb, 0xa61b, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_XMIT_ERROR,
- 0x447956fc, 0xa61b, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_XMIT_OK,
- 0x447956fa, 0xa61b, 0x11d0, 0x8d, 0xd4, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-
-DEFINE_GUID(GUID_NDIS_GEN_CO_DRIVER_VERSION,
- 0x791ad198, 0xe35c, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_CO_HARDWARE_STATUS,
- 0x791ad192, 0xe35c, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_CO_LINK_SPEED,
- 0x791ad195, 0xe35c, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_CO_MAC_OPTIONS,
- 0x791ad19a, 0xe35c, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_CO_MEDIA_SUPPORTED,
- 0x791ad193, 0xe35c, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_CO_MEDIA_IN_USE,
- 0x791ad194, 0xe35c, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_CO_MEDIA_CONNECT_STATUS,
- 0x791ad19b, 0xe35c, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_CO_MINIMUM_LINK_SPEED,
- 0x791ad19d, 0xe35c, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_CO_VENDOR_DESCRIPTION,
- 0x791ad197, 0xe35c, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_CO_VENDOR_DRIVER_VERSION,
- 0x791ad19c, 0xe35c, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_CO_VENDOR_ID,
- 0x791ad196, 0xe35c, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-
-DEFINE_GUID(GUID_NDIS_GEN_CO_RCV_PDUS_ERROR,
- 0x0a214808, 0xe35f, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_CO_RCV_PDUS_OK,
- 0x0a214806, 0xe35f, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_CO_RCV_PDUS_NO_BUFFER,
- 0x0a214809, 0xe35f, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_CO_XMIT_PDUS_ERROR,
- 0x0a214807, 0xe35f, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_GEN_CO_XMIT_PDUS_OK,
- 0x0a214805, 0xe35f, 0x11d0, 0x96, 0x92, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-
-DEFINE_GUID(GUID_NDIS_STATUS_LINK_SPEED_CHANGE,
- 0x981f2d85, 0xb1f3, 0x11d0, 0x8d, 0xd7, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_STATUS_MEDIA_CONNECT,
- 0x981f2d7d, 0xb1f3, 0x11d0, 0x8d, 0xd7, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_STATUS_MEDIA_DISCONNECT,
- 0x981f2d7e, 0xb1f3, 0x11d0, 0x8d, 0xd7, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_STATUS_MEDIA_SPECIFIC_INDICATION,
- 0x981f2d84, 0xb1f3, 0x11d0, 0x8d, 0xd7, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_STATUS_RESET_END,
- 0x981f2d77, 0xb1f3, 0x11d0, 0x8d, 0xd7, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-DEFINE_GUID(GUID_NDIS_STATUS_RESET_START,
- 0x981f2d76, 0xb1f3, 0x11d0, 0x8d, 0xd7, 0x00, 0xc0, 0x4f, 0xc3, 0x35, 0x8c);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NDISGUID_H */
diff --git a/winsup/w32api/include/ddk/ndistapi.h b/winsup/w32api/include/ddk/ndistapi.h
deleted file mode 100644
index 1a8029e..0000000
--- a/winsup/w32api/include/ddk/ndistapi.h
+++ /dev/null
@@ -1,1308 +0,0 @@
-/*
- * ndistapi.h
- *
- * NDIS Telephony API
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NDISTAPI_H
-#define __NDISTAPI_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ndis.h"
-
-#ifndef NDIS_TAPI_CURRENT_VERSION
-#define NDIS_TAPI_CURRENT_VERSION 0x00010003
-#endif
-
-typedef ULONG_PTR HTAPI_LINE;
-typedef ULONG_PTR HDRV_LINE;
-typedef ULONG_PTR HTAPI_CALL;
-typedef ULONG_PTR HDRV_CALL;
-
-#define NDIS_STATUS_TAPI_ADDRESSBLOCKED ((NDIS_STATUS)0xC0012000L)
-#define NDIS_STATUS_TAPI_BEARERMODEUNAVAIL ((NDIS_STATUS)0xC0012001L)
-#define NDIS_STATUS_TAPI_CALLUNAVAIL ((NDIS_STATUS)0xC0012002L)
-#define NDIS_STATUS_TAPI_DIALBILLING ((NDIS_STATUS)0xC0012003L)
-#define NDIS_STATUS_TAPI_DIALDIALTONE ((NDIS_STATUS)0xC0012004L)
-#define NDIS_STATUS_TAPI_DIALPROMPT ((NDIS_STATUS)0xC0012005L)
-#define NDIS_STATUS_TAPI_DIALQUIET ((NDIS_STATUS)0xC0012006L)
-#define NDIS_STATUS_TAPI_INCOMPATIBLEEXTVERSION ((NDIS_STATUS)0xC0012007L)
-#define NDIS_STATUS_TAPI_INUSE ((NDIS_STATUS)0xC0012008L)
-#define NDIS_STATUS_TAPI_INVALADDRESS ((NDIS_STATUS)0xC0012009L)
-#define NDIS_STATUS_TAPI_INVALADDRESSID ((NDIS_STATUS)0xC001200AL)
-#define NDIS_STATUS_TAPI_INVALADDRESSMODE ((NDIS_STATUS)0xC001200BL)
-#define NDIS_STATUS_TAPI_INVALBEARERMODE ((NDIS_STATUS)0xC001200CL)
-#define NDIS_STATUS_TAPI_INVALCALLHANDLE ((NDIS_STATUS)0xC001200DL)
-#define NDIS_STATUS_TAPI_INVALCALLPARAMS ((NDIS_STATUS)0xC001200EL)
-#define NDIS_STATUS_TAPI_INVALCALLSTATE ((NDIS_STATUS)0xC001200FL)
-#define NDIS_STATUS_TAPI_INVALDEVICECLASS ((NDIS_STATUS)0xC0012010L)
-#define NDIS_STATUS_TAPI_INVALLINEHANDLE ((NDIS_STATUS)0xC0012011L)
-#define NDIS_STATUS_TAPI_INVALLINESTATE ((NDIS_STATUS)0xC0012012L)
-#define NDIS_STATUS_TAPI_INVALMEDIAMODE ((NDIS_STATUS)0xC0012013L)
-#define NDIS_STATUS_TAPI_INVALRATE ((NDIS_STATUS)0xC0012014L)
-#define NDIS_STATUS_TAPI_NODRIVER ((NDIS_STATUS)0xC0012015L)
-#define NDIS_STATUS_TAPI_OPERATIONUNAVAIL ((NDIS_STATUS)0xC0012016L)
-#define NDIS_STATUS_TAPI_RATEUNAVAIL ((NDIS_STATUS)0xC0012017L)
-#define NDIS_STATUS_TAPI_RESOURCEUNAVAIL ((NDIS_STATUS)0xC0012018L)
-#define NDIS_STATUS_TAPI_STRUCTURETOOSMALL ((NDIS_STATUS)0xC0012019L)
-#define NDIS_STATUS_TAPI_USERUSERINFOTOOBIG ((NDIS_STATUS)0xC001201AL)
-#define NDIS_STATUS_TAPI_ALLOCATED ((NDIS_STATUS)0xC001201BL)
-#define NDIS_STATUS_TAPI_INVALADDRESSSTATE ((NDIS_STATUS)0xC001201CL)
-#define NDIS_STATUS_TAPI_INVALPARAM ((NDIS_STATUS)0xC001201DL)
-#define NDIS_STATUS_TAPI_NODEVICE ((NDIS_STATUS)0xC001201EL)
-#define NDIS_STATUS_TAPI_DISCONNECTMODE_NORMAL ((NDIS_STATUS)0xC0012020L)
-#define NDIS_STATUS_TAPI_DISCONNECTMODE_UNKNOWN ((NDIS_STATUS)0xC0012021L)
-#define NDIS_STATUS_TAPI_DISCONNECTMODE_REJECT ((NDIS_STATUS)0xC0012022L)
-#define NDIS_STATUS_TAPI_DISCONNECTMODE_PICKUP ((NDIS_STATUS)0xC0012023L)
-#define NDIS_STATUS_TAPI_DISCONNECTMODE_FORWARDED ((NDIS_STATUS)0xC0012024L)
-#define NDIS_STATUS_TAPI_DISCONNECTMODE_BUSY ((NDIS_STATUS)0xC0012025L)
-#define NDIS_STATUS_TAPI_DISCONNECTMODE_NOANSWER ((NDIS_STATUS)0xC0012026L)
-#define NDIS_STATUS_TAPI_DISCONNECTMODE_BADADDRESS ((NDIS_STATUS)0xC0012027L)
-#define NDIS_STATUS_TAPI_DISCONNECTMODE_UNREACHABLE ((NDIS_STATUS)0xC0012028L)
-#define NDIS_STATUS_TAPI_DISCONNECTMODE_CONGESTION ((NDIS_STATUS)0xC0012029L)
-#define NDIS_STATUS_TAPI_DISCONNECTMODE_INCOMPATIBLE ((NDIS_STATUS)0xC001202AL)
-#define NDIS_STATUS_TAPI_DISCONNECTMODE_UNAVAIL ((NDIS_STATUS)0xC001202BL)
-#define NDIS_STATUS_TAPI_RECV_DIGIT ((NDIS_STATUS)0x40010020L)
-
-#define LINE_ADDRESSSTATE 0L
-#define LINE_CALLINFO 1L
-#define LINE_CALLSTATE 2L
-#define LINE_CLOSE 3L
-#define LINE_DEVSPECIFIC 4L
-#define LINE_DEVSPECIFICFEATURE 5L
-#define LINE_GATHERDIGITS 6L
-#define LINE_GENERATE 7L
-#define LINE_LINEDEVSTATE 8L
-#define LINE_MONITORDIGITS 9L
-#define LINE_MONITORMEDIA 10L
-#define LINE_MONITORTONE 11L
-#define LINE_REPLY 12L
-#define LINE_REQUEST 13L
-#define LINE_CREATE 19L
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00020000)
-#define LINE_AGENTSPECIFIC 21L
-#define LINE_AGENTSTATUS 22L
-#define LINE_APPNEWCALL 23L
-#define LINE_PROXYREQUEST 24L
-#define LINE_REMOVE 25L
-#endif
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00020002)
-#define LINE_AGENTSESSIONSTATUS 27L
-#define LINE_QUEUESTATUS 28L
-#define LINE_AGENTSTATUSEX 29L
-#define LINE_GROUPSTATUS 30L
-#define LINE_PROXYSTATUS 31L
-#endif
-#if (TAPI_CURRENT_VERSION >= 0x00030000)
-#define LINE_APPNEWCALLHUB 32L
-#define LINE_CALLHUBCLOSE 33L
-#define LINE_DEVSPECIFICEX 34L
-#endif
-
-#define TSPI_MESSAGE_BASE 500L
-#define LINE_NEWCALL TSPI_MESSAGE_BASE
-#define LINE_CALLDEVSPECIFIC (TSPI_MESSAGE_BASE + 1L)
-#define STRINGFORMAT_ASCII 0x00000001
-#define STRINGFORMAT_DBCS 0x00000002
-#define STRINGFORMAT_UNICODE 0x00000003
-#define STRINGFORMAT_BINARY 0x00000004
-
-#define LINEADDRCAPFLAGS_FWDNUMRINGS 0x00000001
-#define LINEADDRCAPFLAGS_PICKUPGROUPID 0x00000002
-#define LINEADDRCAPFLAGS_SECURE 0x00000004
-#define LINEADDRCAPFLAGS_BLOCKIDDEFAULT 0x00000008
-#define LINEADDRCAPFLAGS_BLOCKIDOVERRIDE 0x00000010
-#define LINEADDRCAPFLAGS_DIALED 0x00000020
-#define LINEADDRCAPFLAGS_ORIGOFFHOOK 0x00000040
-#define LINEADDRCAPFLAGS_DESTOFFHOOK 0x00000080
-#define LINEADDRCAPFLAGS_FWDCONSULT 0x00000100
-#define LINEADDRCAPFLAGS_SETUPCONFNULL 0x00000200
-#define LINEADDRCAPFLAGS_AUTORECONNECT 0x00000400
-#define LINEADDRCAPFLAGS_COMPLETIONID 0x00000800
-#define LINEADDRCAPFLAGS_TRANSFERHELD 0x00001000
-#define LINEADDRCAPFLAGS_TRANSFERMAKE 0x00002000
-#define LINEADDRCAPFLAGS_CONFERENCEHELD 0x00004000
-#define LINEADDRCAPFLAGS_CONFERENCEMAKE 0x00008000
-#define LINEADDRCAPFLAGS_PARTIALDIAL 0x00010000
-#define LINEADDRCAPFLAGS_FWDSTATUSVALID 0x00020000
-#define LINEADDRCAPFLAGS_FWDINTEXTADDR 0x00040000
-#define LINEADDRCAPFLAGS_FWDBUSYNAADDR 0x00080000
-#define LINEADDRCAPFLAGS_ACCEPTTOALERT 0x00100000
-#define LINEADDRCAPFLAGS_CONFDROP 0x00200000
-#define LINEADDRCAPFLAGS_PICKUPCALLWAIT 0x00400000
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00020000)
-#define LINEADDRCAPFLAGS_PREDICTIVEDIALER 0x00800000
-#define LINEADDRCAPFLAGS_QUEUE 0x01000000
-#define LINEADDRCAPFLAGS_ROUTEPOINT 0x02000000
-#define LINEADDRCAPFLAGS_HOLDMAKESNEW 0x04000000
-#define LINEADDRCAPFLAGS_NOINTERNALCALLS 0x08000000
-#define LINEADDRCAPFLAGS_NOEXTERNALCALLS 0x10000000
-#define LINEADDRCAPFLAGS_SETCALLINGID 0x20000000
-#endif
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00030000)
-#define LINEADDRCAPFLAGS_ACDGROUP 0x40000000
-#define LINEADDRCAPFLAGS_NOPSTNADDRESSTRANSLATION \
- 0x80000000
-#endif
-
-#define LINEADDRESSMODE_ADDRESSID 0x00000001
-#define LINEADDRESSMODE_DIALABLEADDR 0x00000002
-#define LINEADDRESSSHARING_PRIVATE 0x00000001
-#define LINEADDRESSSHARING_BRIDGEDEXCL 0x00000002
-#define LINEADDRESSSHARING_BRIDGEDNEW 0x00000004
-#define LINEADDRESSSHARING_BRIDGEDSHARED 0x00000008
-#define LINEADDRESSSHARING_MONITORED 0x00000010
-#define LINEADDRESSSTATE_OTHER 0x00000001
-#define LINEADDRESSSTATE_DEVSPECIFIC 0x00000002
-#define LINEADDRESSSTATE_INUSEZERO 0x00000004
-#define LINEADDRESSSTATE_INUSEONE 0x00000008
-#define LINEADDRESSSTATE_INUSEMANY 0x00000010
-#define LINEADDRESSSTATE_NUMCALLS 0x00000020
-#define LINEADDRESSSTATE_FORWARD 0x00000040
-#define LINEADDRESSSTATE_TERMINALS 0x00000080
-
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00030000)
-#define LINEADDRESSTYPE_PHONENUMBER 0x00000001
-#define LINEADDRESSTYPE_SDP 0x00000002
-#define LINEADDRESSTYPE_EMAILNAME 0x00000004
-#define LINEADDRESSTYPE_DOMAINNAME 0x00000008
-#define LINEADDRESSTYPE_IPADDRESS 0x00000010
-#endif
-
-#define LINEADDRFEATURE_FORWARD 0x00000001
-#define LINEADDRFEATURE_MAKECALL 0x00000002
-#define LINEADDRFEATURE_PICKUP 0x00000004
-#define LINEADDRFEATURE_SETMEDIACONTROL 0x00000008
-#define LINEADDRFEATURE_SETTERMINAL 0x00000010
-#define LINEADDRFEATURE_SETUPCONF 0x00000020
-#define LINEADDRFEATURE_UNCOMPLETECALL 0x00000040
-#define LINEADDRFEATURE_UNPARK 0x00000080
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00020000)
-#define LINEADDRFEATURE_PICKUPHELD 0x00000100
-#define LINEADDRFEATURE_PICKUPGROUP 0x00000200
-#define LINEADDRFEATURE_PICKUPDIRECT 0x00000400
-#define LINEADDRFEATURE_PICKUPWAITING 0x00000800
-#define LINEADDRFEATURE_FORWARDFWD 0x00001000
-#define LINEADDRFEATURE_FORWARDDND 0x00002000
-#endif
-
-#define LINEANSWERMODE_NONE 0x00000001
-#define LINEANSWERMODE_DROP 0x00000002
-#define LINEANSWERMODE_HOLD 0x00000004
-
-#define LINEBEARERMODE_VOICE 0x00000001
-#define LINEBEARERMODE_SPEECH 0x00000002
-#define LINEBEARERMODE_MULTIUSE 0x00000004
-#define LINEBEARERMODE_DATA 0x00000008
-#define LINEBEARERMODE_ALTSPEECHDATA 0x00000010
-#define LINEBEARERMODE_NONCALLSIGNALING 0x00000020
-#define LINEBEARERMODE_PASSTHROUGH 0x00000040
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00020000)
-#define LINEBEARERMODE_RESTRICTEDDATA 0x00000080
-#endif
-
-#define LINEBUSYMODE_STATION 0x00000001
-#define LINEBUSYMODE_TRUNK 0x00000002
-#define LINEBUSYMODE_UNKNOWN 0x00000004
-#define LINEBUSYMODE_UNAVAIL 0x00000008
-
-#define LINECALLCOMPLCOND_BUSY 0x00000001
-#define LINECALLCOMPLCOND_NOANSWER 0x00000002
-
-#define LINECALLCOMPLMODE_CAMPON 0x00000001
-#define LINECALLCOMPLMODE_CALLBACK 0x00000002
-#define LINECALLCOMPLMODE_INTRUDE 0x00000004
-#define LINECALLCOMPLMODE_MESSAGE 0x00000008
-
-#define LINECALLFEATURE_ACCEPT 0x00000001
-#define LINECALLFEATURE_ADDTOCONF 0x00000002
-#define LINECALLFEATURE_ANSWER 0x00000004
-#define LINECALLFEATURE_BLINDTRANSFER 0x00000008
-#define LINECALLFEATURE_COMPLETECALL 0x00000010
-#define LINECALLFEATURE_COMPLETETRANSF 0x00000020
-#define LINECALLFEATURE_DIAL 0x00000040
-#define LINECALLFEATURE_DROP 0x00000080
-#define LINECALLFEATURE_GATHERDIGITS 0x00000100
-#define LINECALLFEATURE_GENERATEDIGITS 0x00000200
-#define LINECALLFEATURE_GENERATETONE 0x00000400
-#define LINECALLFEATURE_HOLD 0x00000800
-#define LINECALLFEATURE_MONITORDIGITS 0x00001000
-#define LINECALLFEATURE_MONITORMEDIA 0x00002000
-#define LINECALLFEATURE_MONITORTONES 0x00004000
-#define LINECALLFEATURE_PARK 0x00008000
-#define LINECALLFEATURE_PREPAREADDCONF 0x00010000
-#define LINECALLFEATURE_REDIRECT 0x00020000
-#define LINECALLFEATURE_REMOVEFROMCONF 0x00040000
-#define LINECALLFEATURE_SECURECALL 0x00080000
-#define LINECALLFEATURE_SENDUSERUSER 0x00100000
-#define LINECALLFEATURE_SETCALLPARAMS 0x00200000
-#define LINECALLFEATURE_SETMEDIACONTROL 0x00400000
-#define LINECALLFEATURE_SETTERMINAL 0x00800000
-#define LINECALLFEATURE_SETUPCONF 0x01000000
-#define LINECALLFEATURE_SETUPTRANSFER 0x02000000
-#define LINECALLFEATURE_SWAPHOLD 0x04000000
-#define LINECALLFEATURE_UNHOLD 0x08000000
-#define LINECALLFEATURE_RELEASEUSERUSERINFO \
- 0x10000000
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00020000)
-#define LINECALLFEATURE_SETTREATMENT 0x20000000
-#define LINECALLFEATURE_SETQOS 0x40000000
-#define LINECALLFEATURE_SETCALLDATA 0x80000000
-#endif
-
-#define LINECALLINFOSTATE_OTHER 0x00000001
-#define LINECALLINFOSTATE_DEVSPECIFIC 0x00000002
-#define LINECALLINFOSTATE_BEARERMODE 0x00000004
-#define LINECALLINFOSTATE_RATE 0x00000008
-#define LINECALLINFOSTATE_MEDIAMODE 0x00000010
-#define LINECALLINFOSTATE_APPSPECIFIC 0x00000020
-#define LINECALLINFOSTATE_CALLID 0x00000040
-#define LINECALLINFOSTATE_RELATEDCALLID 0x00000080
-#define LINECALLINFOSTATE_ORIGIN 0x00000100
-#define LINECALLINFOSTATE_REASON 0x00000200
-#define LINECALLINFOSTATE_COMPLETIONID 0x00000400
-#define LINECALLINFOSTATE_NUMOWNERINCR 0x00000800
-#define LINECALLINFOSTATE_NUMOWNERDECR 0x00001000
-#define LINECALLINFOSTATE_NUMMONITORS 0x00002000
-#define LINECALLINFOSTATE_TRUNK 0x00004000
-#define LINECALLINFOSTATE_CALLERID 0x00008000
-#define LINECALLINFOSTATE_CALLEDID 0x00010000
-#define LINECALLINFOSTATE_CONNECTEDID 0x00020000
-#define LINECALLINFOSTATE_REDIRECTIONID 0x00040000
-#define LINECALLINFOSTATE_REDIRECTINGID 0x00080000
-#define LINECALLINFOSTATE_DISPLAY 0x00100000
-#define LINECALLINFOSTATE_USERUSERINFO 0x00200000
-#define LINECALLINFOSTATE_HIGHLEVELCOMP 0x00400000
-#define LINECALLINFOSTATE_LOWLEVELCOMP 0x00800000
-#define LINECALLINFOSTATE_CHARGINGINFO 0x01000000
-#define LINECALLINFOSTATE_TERMINAL 0x02000000
-#define LINECALLINFOSTATE_DIALPARAMS 0x04000000
-#define LINECALLINFOSTATE_MONITORMODES 0x08000000
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00020000)
-#define LINECALLINFOSTATE_TREATMENT 0x10000000
-#define LINECALLINFOSTATE_QOS 0x20000000
-#define LINECALLINFOSTATE_CALLDATA 0x40000000
-#endif
-
-#define LINECALLORIGIN_OUTBOUND 0x00000001
-#define LINECALLORIGIN_INTERNAL 0x00000002
-#define LINECALLORIGIN_EXTERNAL 0x00000004
-#define LINECALLORIGIN_UNKNOWN 0x00000010
-#define LINECALLORIGIN_UNAVAIL 0x00000020
-#define LINECALLORIGIN_CONFERENCE 0x00000040
-#define LINECALLORIGIN_INBOUND 0x00000080
-
-#define LINECALLPARAMFLAGS_SECURE 0x00000001
-#define LINECALLPARAMFLAGS_IDLE 0x00000002
-#define LINECALLPARAMFLAGS_BLOCKID 0x00000004
-#define LINECALLPARAMFLAGS_ORIGOFFHOOK 0x00000008
-#define LINECALLPARAMFLAGS_DESTOFFHOOK 0x00000010
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00020000)
-#define LINECALLPARAMFLAGS_NOHOLDCONFERENCE \
- 0x00000020
-#define LINECALLPARAMFLAGS_PREDICTIVEDIAL 0x00000040
-#define LINECALLPARAMFLAGS_ONESTEPTRANSFER \
- 0x00000080
-#endif
-
-#define LINECALLPARTYID_BLOCKED 0x00000001
-#define LINECALLPARTYID_OUTOFAREA 0x00000002
-#define LINECALLPARTYID_NAME 0x00000004
-#define LINECALLPARTYID_ADDRESS 0x00000008
-#define LINECALLPARTYID_PARTIAL 0x00000010
-#define LINECALLPARTYID_UNKNOWN 0x00000020
-#define LINECALLPARTYID_UNAVAIL 0x00000040
-
-#define LINECALLPRIVILEGE_NONE 0x00000001
-#define LINECALLPRIVILEGE_MONITOR 0x00000002
-#define LINECALLPRIVILEGE_OWNER 0x00000004
-
-#define LINECALLREASON_DIRECT 0x00000001
-#define LINECALLREASON_FWDBUSY 0x00000002
-#define LINECALLREASON_FWDNOANSWER 0x00000004
-#define LINECALLREASON_FWDUNCOND 0x00000008
-#define LINECALLREASON_PICKUP 0x00000010
-#define LINECALLREASON_UNPARK 0x00000020
-#define LINECALLREASON_REDIRECT 0x00000040
-#define LINECALLREASON_CALLCOMPLETION 0x00000080
-#define LINECALLREASON_TRANSFER 0x00000100
-#define LINECALLREASON_REMINDER 0x00000200
-#define LINECALLREASON_UNKNOWN 0x00000400
-#define LINECALLREASON_UNAVAIL 0x00000800
-#define LINECALLREASON_INTRUDE 0x00001000
-#define LINECALLREASON_PARKED 0x00002000
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00020000)
-#define LINECALLREASON_CAMPEDON 0x00004000
-#define LINECALLREASON_ROUTEREQUEST 0x00008000
-#endif
-
-#define LINECALLSELECT_LINE 0x00000001
-#define LINECALLSELECT_ADDRESS 0x00000002
-#define LINECALLSELECT_CALL 0x00000004
-#if (NDIS_TAPI_CURRENT_VERSION > 0x00020000)
-#define LINECALLSELECT_DEVICEID 0x00000008
-#endif
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00030000)
-#define LINECALLSELECT_CALLID 0x00000010
-#endif
-
-#define LINECALLSTATE_IDLE 0x00000001
-#define LINECALLSTATE_OFFERING 0x00000002
-#define LINECALLSTATE_ACCEPTED 0x00000004
-#define LINECALLSTATE_DIALTONE 0x00000008
-#define LINECALLSTATE_DIALING 0x00000010
-#define LINECALLSTATE_RINGBACK 0x00000020
-#define LINECALLSTATE_BUSY 0x00000040
-#define LINECALLSTATE_SPECIALINFO 0x00000080
-#define LINECALLSTATE_CONNECTED 0x00000100
-#define LINECALLSTATE_PROCEEDING 0x00000200
-#define LINECALLSTATE_ONHOLD 0x00000400
-#define LINECALLSTATE_CONFERENCED 0x00000800
-#define LINECALLSTATE_ONHOLDPENDCONF 0x00001000
-#define LINECALLSTATE_ONHOLDPENDTRANSFER 0x00002000
-#define LINECALLSTATE_DISCONNECTED 0x00004000
-#define LINECALLSTATE_UNKNOWN 0x00008000
-
-#define LINEDEVCAPFLAGS_CROSSADDRCONF 0x00000001
-#define LINEDEVCAPFLAGS_HIGHLEVCOMP 0x00000002
-#define LINEDEVCAPFLAGS_LOWLEVCOMP 0x00000004
-#define LINEDEVCAPFLAGS_MEDIACONTROL 0x00000008
-#define LINEDEVCAPFLAGS_MULTIPLEADDR 0x00000010
-#define LINEDEVCAPFLAGS_CLOSEDROP 0x00000020
-#define LINEDEVCAPFLAGS_DIALBILLING 0x00000040
-#define LINEDEVCAPFLAGS_DIALQUIET 0x00000080
-#define LINEDEVCAPFLAGS_DIALDIALTONE 0x00000100
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00030000)
-#define LINEDEVCAPFLAGS_MSP 0x00000200
-#define LINEDEVCAPFLAGS_CALLHUB 0x00000400
-#define LINEDEVCAPFLAGS_CALLHUBTRACKING 0x00000800
-#define LINEDEVCAPFLAGS_PRIVATEOBJECTS 0x00001000
-#endif
-
-#define LINEDEVSTATE_OTHER 0x00000001
-#define LINEDEVSTATE_RINGING 0x00000002
-#define LINEDEVSTATE_CONNECTED 0x00000004
-#define LINEDEVSTATE_DISCONNECTED 0x00000008
-#define LINEDEVSTATE_MSGWAITON 0x00000010
-#define LINEDEVSTATE_MSGWAITOFF 0x00000020
-#define LINEDEVSTATE_INSERVICE 0x00000040
-#define LINEDEVSTATE_OUTOFSERVICE 0x00000080
-#define LINEDEVSTATE_MAINTENANCE 0x00000100
-#define LINEDEVSTATE_OPEN 0x00000200
-#define LINEDEVSTATE_CLOSE 0x00000400
-#define LINEDEVSTATE_NUMCALLS 0x00000800
-#define LINEDEVSTATE_NUMCOMPLETIONS 0x00001000
-#define LINEDEVSTATE_TERMINALS 0x00002000
-#define LINEDEVSTATE_ROAMMODE 0x00004000
-#define LINEDEVSTATE_BATTERY 0x00008000
-#define LINEDEVSTATE_SIGNAL 0x00010000
-#define LINEDEVSTATE_DEVSPECIFIC 0x00020000
-#define LINEDEVSTATE_REINIT 0x00040000
-#define LINEDEVSTATE_LOCK 0x00080000
-
-#define LINEDEVSTATUSFLAGS_CONNECTED 0x00000001
-#define LINEDEVSTATUSFLAGS_MSGWAIT 0x00000002
-#define LINEDEVSTATUSFLAGS_INSERVICE 0x00000004
-#define LINEDEVSTATUSFLAGS_LOCKED 0x00000008
-
-#define LINEDIALTONEMODE_NORMAL 0x00000001
-#define LINEDIALTONEMODE_SPECIAL 0x00000002
-#define LINEDIALTONEMODE_INTERNAL 0x00000004
-#define LINEDIALTONEMODE_EXTERNAL 0x00000008
-#define LINEDIALTONEMODE_UNKNOWN 0x00000010
-#define LINEDIALTONEMODE_UNAVAIL 0x00000020
-
-#define LINEDIGITMODE_PULSE 0x00000001
-#define LINEDIGITMODE_DTMF 0x00000002
-#define LINEDIGITMODE_DTMFEND 0x00000004
-
-#define LINEDISCONNECTMODE_NORMAL 0x00000001
-#define LINEDISCONNECTMODE_UNKNOWN 0x00000002
-#define LINEDISCONNECTMODE_REJECT 0x00000004
-#define LINEDISCONNECTMODE_PICKUP 0x00000008
-#define LINEDISCONNECTMODE_FORWARDED 0x00000010
-#define LINEDISCONNECTMODE_BUSY 0x00000020
-#define LINEDISCONNECTMODE_NOANSWER 0x00000040
-#define LINEDISCONNECTMODE_BADADDRESS 0x00000080
-#define LINEDISCONNECTMODE_UNREACHABLE 0x00000100
-#define LINEDISCONNECTMODE_CONGESTION 0x00000200
-#define LINEDISCONNECTMODE_INCOMPATIBLE 0x00000400
-#define LINEDISCONNECTMODE_UNAVAIL 0x00000800
-#define LINEDISCONNECTMODE_NODIALTONE 0x00001000
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00020000)
-#define LINEDISCONNECTMODE_NUMBERCHANGED 0x00002000
-#define LINEDISCONNECTMODE_OUTOFORDER 0x00004000
-#define LINEDISCONNECTMODE_TEMPFAILURE 0x00008000
-#define LINEDISCONNECTMODE_QOSUNAVAIL 0x00010000
-#define LINEDISCONNECTMODE_BLOCKED 0x00020000
-#define LINEDISCONNECTMODE_DONOTDISTURB 0x00040000
-#define LINEDISCONNECTMODE_CANCELLED 0x00080000
-#endif
-
-#define LINEFEATURE_DEVSPECIFIC 0x00000001
-#define LINEFEATURE_DEVSPECIFICFEAT 0x00000002
-#define LINEFEATURE_FORWARD 0x00000004
-#define LINEFEATURE_MAKECALL 0x00000008
-#define LINEFEATURE_SETMEDIACONTROL 0x00000010
-#define LINEFEATURE_SETTERMINAL 0x00000020
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00020000)
-#define LINEFEATURE_SETDEVSTATUS 0x00000040
-#define LINEFEATURE_FORWARDFWD 0x00000080
-#define LINEFEATURE_FORWARDDND 0x00000100
-#endif
-
-#define LINEFORWARDMODE_UNCOND 0x00000001
-#define LINEFORWARDMODE_UNCONDINTERNAL 0x00000002
-#define LINEFORWARDMODE_UNCONDEXTERNAL 0x00000004
-#define LINEFORWARDMODE_UNCONDSPECIFIC 0x00000008
-#define LINEFORWARDMODE_BUSY 0x00000010
-#define LINEFORWARDMODE_BUSYINTERNAL 0x00000020
-#define LINEFORWARDMODE_BUSYEXTERNAL 0x00000040
-#define LINEFORWARDMODE_BUSYSPECIFIC 0x00000080
-#define LINEFORWARDMODE_NOANSW 0x00000100
-#define LINEFORWARDMODE_NOANSWINTERNAL 0x00000200
-#define LINEFORWARDMODE_NOANSWEXTERNAL 0x00000400
-#define LINEFORWARDMODE_NOANSWSPECIFIC 0x00000800
-#define LINEFORWARDMODE_BUSYNA 0x00001000
-#define LINEFORWARDMODE_BUSYNAINTERNAL 0x00002000
-#define LINEFORWARDMODE_BUSYNAEXTERNAL 0x00004000
-#define LINEFORWARDMODE_BUSYNASPECIFIC 0x00008000
-
-#define LINEGATHERTERM_BUFFERFULL 0x00000001
-#define LINEGATHERTERM_TERMDIGIT 0x00000002
-#define LINEGATHERTERM_FIRSTTIMEOUT 0x00000004
-#define LINEGATHERTERM_INTERTIMEOUT 0x00000008
-#define LINEGATHERTERM_CANCEL 0x00000010
-
-#define LINEGENERATETERM_DONE 0x00000001
-#define LINEGENERATETERM_CANCEL 0x00000002
-
-#define LINEMEDIACONTROL_NONE 0x00000001
-#define LINEMEDIACONTROL_START 0x00000002
-#define LINEMEDIACONTROL_RESET 0x00000004
-#define LINEMEDIACONTROL_PAUSE 0x00000008
-#define LINEMEDIACONTROL_RESUME 0x00000010
-#define LINEMEDIACONTROL_RATEUP 0x00000020
-#define LINEMEDIACONTROL_RATEDOWN 0x00000040
-#define LINEMEDIACONTROL_RATENORMAL 0x00000080
-#define LINEMEDIACONTROL_VOLUMEUP 0x00000100
-#define LINEMEDIACONTROL_VOLUMEDOWN 0x00000200
-#define LINEMEDIACONTROL_VOLUMENORMAL 0x00000400
-
-#define LINEMEDIAMODE_UNKNOWN 0x00000002
-#define LINEMEDIAMODE_INTERACTIVEVOICE 0x00000004
-#define LINEMEDIAMODE_AUTOMATEDVOICE 0x00000008
-#define LINEMEDIAMODE_DATAMODEM 0x00000010
-#define LINEMEDIAMODE_G3FAX 0x00000020
-#define LINEMEDIAMODE_TDD 0x00000040
-#define LINEMEDIAMODE_G4FAX 0x00000080
-#define LINEMEDIAMODE_DIGITALDATA 0x00000100
-#define LINEMEDIAMODE_TELETEX 0x00000200
-#define LINEMEDIAMODE_VIDEOTEX 0x00000400
-#define LINEMEDIAMODE_TELEX 0x00000800
-#define LINEMEDIAMODE_MIXED 0x00001000
-#define LINEMEDIAMODE_ADSI 0x00002000
-
-#define LINEMEDIAMODE_VOICEVIEW 0x00004000
-#define LAST_LINEMEDIAMODE 0x00004000
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00020001)
-#define LINEMEDIAMODE_VIDEO 0x00008000
-#define LAST_LINEMEDIAMODE 0x00008000
-#endif
-
-#define LINEPARKMODE_DIRECTED 0x00000001
-#define LINEPARKMODE_NONDIRECTED 0x00000002
-
-#define LINEREMOVEFROMCONF_NONE 0x00000001
-#define LINEREMOVEFROMCONF_LAST 0x00000002
-#define LINEREMOVEFROMCONF_ANY 0x00000003
-
-#define LINEREQUESTMODE_MAKECALL 0x00000001
-#define LINEREQUESTMODE_MEDIACALL 0x00000002
-#define LINEREQUESTMODE_DROP 0x00000004
-
-#define LAST_LINEREQUESTMODE LINEREQUESTMODE_MEDIACALL
-
-#define LINEROAMMODE_UNKNOWN 0x00000001
-#define LINEROAMMODE_UNAVAIL 0x00000002
-#define LINEROAMMODE_HOME 0x00000004
-#define LINEROAMMODE_ROAMA 0x00000008
-#define LINEROAMMODE_ROAMB 0x00000010
-
-#define LINESPECIALINFO_NOCIRCUIT 0x00000001
-#define LINESPECIALINFO_CUSTIRREG 0x00000002
-#define LINESPECIALINFO_REORDER 0x00000004
-#define LINESPECIALINFO_UNKNOWN 0x00000008
-#define LINESPECIALINFO_UNAVAIL 0x00000010
-
-#define LINETERMDEV_PHONE 0x00000001
-#define LINETERMDEV_HEADSET 0x00000002
-#define LINETERMDEV_SPEAKER 0x00000004
-
-#define LINETERMMODE_BUTTONS 0x00000001
-#define LINETERMMODE_LAMPS 0x00000002
-#define LINETERMMODE_DISPLAY 0x00000004
-#define LINETERMMODE_RINGER 0x00000008
-#define LINETERMMODE_HOOKSWITCH 0x00000010
-#define LINETERMMODE_MEDIATOLINE 0x00000020
-#define LINETERMMODE_MEDIAFROMLINE 0x00000040
-#define LINETERMMODE_MEDIABIDIRECT 0x00000080
-
-#define LINETERMSHARING_PRIVATE 0x00000001
-#define LINETERMSHARING_SHAREDEXCL 0x00000002
-#define LINETERMSHARING_SHAREDCONF 0x00000004
-
-#define LINETONEMODE_CUSTOM 0x00000001
-#define LINETONEMODE_RINGBACK 0x00000002
-#define LINETONEMODE_BUSY 0x00000004
-#define LINETONEMODE_BEEP 0x00000008
-#define LINETONEMODE_BILLING 0x00000010
-
-#define LINETRANSFERMODE_TRANSFER 0x00000001
-#define LINETRANSFERMODE_CONFERENCE 0x00000002
-
-#define LINETOLLLISTOPTION_ADD 0x00000001
-#define LINETOLLLISTOPTION_REMOVE 0x00000002
-
-#define LINETRANSLATEOPTION_CARDOVERRIDE 0x00000001
-
-#define LINETRANSLATERESULT_CANONICAL 0x00000001
-#define LINETRANSLATERESULT_INTERNATIONAL 0x00000002
-#define LINETRANSLATERESULT_LONGDISTANCE 0x00000004
-#define LINETRANSLATERESULT_LOCAL 0x00000008
-#define LINETRANSLATERESULT_INTOLLLIST 0x00000010
-#define LINETRANSLATERESULT_NOTINTOLLLIST 0x00000020
-#define LINETRANSLATERESULT_DIALBILLING 0x00000040
-#define LINETRANSLATERESULT_DIALQUIET 0x00000080
-#define LINETRANSLATERESULT_DIALDIALTONE 0x00000100
-#define LINETRANSLATERESULT_DIALPROMPT 0x00000200
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00020000)
-#define LINETRANSLATERESULT_VOICEDETECT 0x00000400
-#endif
-
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00030000)
-#define LINETRANSLATERESULT_NOTRANSLATION 0x00000800
-#endif
-
-
-typedef struct _NDIS_VAR_DATA_DESC {
- USHORT Length;
- USHORT MaximumLength;
- LONG Offset;
-} NDIS_VAR_DATA_DESC, *PNDIS_VAR_DATA_DESC;
-
-typedef struct _LINE_DIAL_PARAMS {
- ULONG ulDialPause;
- ULONG ulDialSpeed;
- ULONG ulDigitDuration;
- ULONG ulWaitForDialtone;
-} LINE_DIAL_PARAMS, *PLINE_DIAL_PARAMS;
-
-typedef struct _LINE_ADDRESS_CAPS {
- ULONG ulTotalSize;
- ULONG ulNeededSize;
- ULONG ulUsedSize;
- ULONG ulLineDeviceID;
- ULONG ulAddressSize;
- ULONG ulAddressOffset;
- ULONG ulDevSpecificSize;
- ULONG ulDevSpecificOffset;
- ULONG ulAddressSharing;
- ULONG ulAddressStates;
- ULONG ulCallInfoStates;
- ULONG ulCallerIDFlags;
- ULONG ulCalledIDFlags;
- ULONG ulConnectedIDFlags;
- ULONG ulRedirectionIDFlags;
- ULONG ulRedirectingIDFlags;
- ULONG ulCallStates;
- ULONG ulDialToneModes;
- ULONG ulBusyModes;
- ULONG ulSpecialInfo;
- ULONG ulDisconnectModes;
- ULONG ulMaxNumActiveCalls;
- ULONG ulMaxNumOnHoldCalls;
- ULONG ulMaxNumOnHoldPendingCalls;
- ULONG ulMaxNumConference;
- ULONG ulMaxNumTransConf;
- ULONG ulAddrCapFlags;
- ULONG ulCallFeatures;
- ULONG ulRemoveFromConfCaps;
- ULONG ulRemoveFromConfState;
- ULONG ulTransferModes;
- ULONG ulParkModes;
- ULONG ulForwardModes;
- ULONG ulMaxForwardEntries;
- ULONG ulMaxSpecificEntries;
- ULONG ulMinFwdNumRings;
- ULONG ulMaxFwdNumRings;
- ULONG ulMaxCallCompletions;
- ULONG ulCallCompletionConds;
- ULONG ulCallCompletionModes;
- ULONG ulNumCompletionMessages;
- ULONG ulCompletionMsgTextEntrySize;
- ULONG ulCompletionMsgTextSize;
- ULONG ulCompletionMsgTextOffset;
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00010004)
- ULONG ulAddressFeatures;
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00020000)
- ULONG ulPredictiveAutoTransferStates;
- ULONG ulNumCallTreatments;
- ULONG ulCallTreatmentListSize;
- ULONG ulCallTreatmentListOffset;
- ULONG ulDeviceClassesSize;
- ULONG ulDeviceClassesOffset;
- ULONG ulMaxCallDataSize;
- ULONG ulCallFeatures2;
- ULONG ulMaxNoAnswerTimeout;
- ULONG ulConnectedModes;
- ULONG ulOfferingModes;
- ULONG ulAvailableMediaModes;
-#endif
-#endif
-} LINE_ADDRESS_CAPS, *PLINE_ADDRESS_CAPS;
-
-typedef struct _LINE_ADDRESS_STATUS {
- ULONG ulTotalSize;
- ULONG ulNeededSize;
- ULONG ulUsedSize;
- ULONG ulNumInUse;
- ULONG ulNumActiveCalls;
- ULONG ulNumOnHoldCalls;
- ULONG ulNumOnHoldPendCalls;
- ULONG ulAddressFeatures;
- ULONG ulNumRingsNoAnswer;
- ULONG ulForwardNumEntries;
- ULONG ulForwardSize;
- ULONG ulForwardOffset;
- ULONG ulTerminalModesSize;
- ULONG ulTerminalModesOffset;
- ULONG ulDevSpecificSize;
- ULONG ulDevSpecificOffset;
-} LINE_ADDRESS_STATUS, *PLINE_ADDRESS_STATUS;
-
-typedef struct _LINE_CALL_INFO {
- ULONG ulTotalSize;
- ULONG ulNeededSize;
- ULONG ulUsedSize;
- ULONG hLine;
- ULONG ulLineDeviceID;
- ULONG ulAddressID;
- ULONG ulBearerMode;
- ULONG ulRate;
- ULONG ulMediaMode;
- ULONG ulAppSpecific;
- ULONG ulCallID;
- ULONG ulRelatedCallID;
- ULONG ulCallParamFlags;
- ULONG ulCallStates;
- ULONG ulMonitorDigitModes;
- ULONG ulMonitorMediaModes;
- LINE_DIAL_PARAMS DialParams;
- ULONG ulOrigin;
- ULONG ulReason;
- ULONG ulCompletionID;
- ULONG ulNumOwners;
- ULONG ulNumMonitors;
- ULONG ulCountryCode;
- ULONG ulTrunk;
- ULONG ulCallerIDFlags;
- ULONG ulCallerIDSize;
- ULONG ulCallerIDOffset;
- ULONG ulCallerIDNameSize;
- ULONG ulCallerIDNameOffset;
- ULONG ulCalledIDFlags;
- ULONG ulCalledIDSize;
- ULONG ulCalledIDOffset;
- ULONG ulCalledIDNameSize;
- ULONG ulCalledIDNameOffset;
- ULONG ulConnectedIDFlags;
- ULONG ulConnectedIDSize;
- ULONG ulConnectedIDOffset;
- ULONG ulConnectedIDNameSize;
- ULONG ulConnectedIDNameOffset;
- ULONG ulRedirectionIDFlags;
- ULONG ulRedirectionIDSize;
- ULONG ulRedirectionIDOffset;
- ULONG ulRedirectionIDNameSize;
- ULONG ulRedirectionIDNameOffset;
- ULONG ulRedirectingIDFlags;
- ULONG ulRedirectingIDSize;
- ULONG ulRedirectingIDOffset;
- ULONG ulRedirectingIDNameSize;
- ULONG ulRedirectingIDNameOffset;
- ULONG ulAppNameSize;
- ULONG ulAppNameOffset;
- ULONG ulDisplayableAddressSize;
- ULONG ulDisplayableAddressOffset;
- ULONG ulCalledPartySize;
- ULONG ulCalledPartyOffset;
- ULONG ulCommentSize;
- ULONG ulCommentOffset;
- ULONG ulDisplaySize;
- ULONG ulDisplayOffset;
- ULONG ulUserUserInfoSize;
- ULONG ulUserUserInfoOffset;
- ULONG ulHighLevelCompSize;
- ULONG ulHighLevelCompOffset;
- ULONG ulLowLevelCompSize;
- ULONG ulLowLevelCompOffset;
- ULONG ulChargingInfoSize;
- ULONG ulChargingInfoOffset;
- ULONG ulTerminalModesSize;
- ULONG ulTerminalModesOffset;
- ULONG ulDevSpecificSize;
- ULONG ulDevSpecificOffset;
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00020000)
- ULONG ulCallTreatment;
- ULONG ulCallDataSize;
- ULONG ulCallDataOffset;
- ULONG ulSendingFlowspecSize;
- ULONG ulSendingFlowspecOffset;
- ULONG ulReceivingFlowspecSize;
- ULONG ulReceivingFlowspecOffset;
-#endif
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00030000)
- ULONG ulCallerIDAddressType;
- ULONG ulCalledIDAddressType;
- ULONG ulConnectedIDAddressType;
- ULONG ulRedirectionIDAddressType;
- ULONG ulRedirectingIDAddressType;
-#endif
-} LINE_CALL_INFO, *PLINE_CALL_INFO;
-
-typedef struct _LINE_CALL_PARAMS {
- ULONG ulTotalSize;
- ULONG ulBearerMode;
- ULONG ulMinRate;
- ULONG ulMaxRate;
- ULONG ulMediaMode;
- ULONG ulCallParamFlags;
- ULONG ulAddressMode;
- ULONG ulAddressID;
- LINE_DIAL_PARAMS DialParams;
- ULONG ulOrigAddressSize;
- ULONG ulOrigAddressOffset;
- ULONG ulDisplayableAddressSize;
- ULONG ulDisplayableAddressOffset;
- ULONG ulCalledPartySize;
- ULONG ulCalledPartyOffset;
- ULONG ulCommentSize;
- ULONG ulCommentOffset;
- ULONG ulUserUserInfoSize;
- ULONG ulUserUserInfoOffset;
- ULONG ulHighLevelCompSize;
- ULONG ulHighLevelCompOffset;
- ULONG ulLowLevelCompSize;
- ULONG ulLowLevelCompOffset;
- ULONG ulDevSpecificSize;
- ULONG ulDevSpecificOffset;
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00020000)
- ULONG ulPredictiveAutoTransferStates;
- ULONG ulTargetAddressSize;
- ULONG ulTargetAddressOffset;
- ULONG ulSendingFlowspecSize;
- ULONG ulSendingFlowspecOffset;
- ULONG ulReceivingFlowspecSize;
- ULONG ulReceivingFlowspecOffset;
- ULONG ulDeviceClassSize;
- ULONG ulDeviceClassOffset;
- ULONG ulDeviceConfigSize;
- ULONG ulDeviceConfigOffset;
- ULONG ulCallDataSize;
- ULONG ulCallDataOffset;
- ULONG ulNoAnswerTimeout;
- ULONG ulCallingPartyIDSize;
- ULONG ulCallingPartyIDOffset;
-#endif
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00030000)
- ULONG ulAddressType;
-#endif
-} LINE_CALL_PARAMS, *PLINE_CALL_PARAMS;
-
-typedef struct _LINE_CALL_STATUS {
- ULONG ulTotalSize;
- ULONG ulNeededSize;
- ULONG ulUsedSize;
- ULONG ulCallState;
- ULONG ulCallStateMode;
- ULONG ulCallPrivilege;
- ULONG ulCallFeatures;
- ULONG ulDevSpecificSize;
- ULONG ulDevSpecificOffset;
-} LINE_CALL_STATUS, *PLINE_CALL_STATUS;
-
-typedef struct _LINE_DEV_CAPS {
- ULONG ulTotalSize;
- ULONG ulNeededSize;
- ULONG ulUsedSize;
- ULONG ulProviderInfoSize;
- ULONG ulProviderInfoOffset;
- ULONG ulSwitchInfoSize;
- ULONG ulSwitchInfoOffset;
- ULONG ulPermanentLineID;
- ULONG ulLineNameSize;
- ULONG ulLineNameOffset;
- ULONG ulStringFormat;
- ULONG ulAddressModes;
- ULONG ulNumAddresses;
- ULONG ulBearerModes;
- ULONG ulMaxRate;
- ULONG ulMediaModes;
- ULONG ulGenerateToneModes;
- ULONG ulGenerateToneMaxNumFreq;
- ULONG ulGenerateDigitModes;
- ULONG ulMonitorToneMaxNumFreq;
- ULONG ulMonitorToneMaxNumEntries;
- ULONG ulMonitorDigitModes;
- ULONG ulGatherDigitsMinTimeout;
- ULONG ulGatherDigitsMaxTimeout;
- ULONG ulMedCtlDigitMaxListSize;
- ULONG ulMedCtlMediaMaxListSize;
- ULONG ulMedCtlToneMaxListSize;
- ULONG ulMedCtlCallStateMaxListSize;
- ULONG ulDevCapFlags;
- ULONG ulMaxNumActiveCalls;
- ULONG ulAnswerMode;
- ULONG ulRingModes;
- ULONG ulLineStates;
- ULONG ulUUIAcceptSize;
- ULONG ulUUIAnswerSize;
- ULONG ulUUIMakeCallSize;
- ULONG ulUUIDropSize;
- ULONG ulUUISendUserUserInfoSize;
- ULONG ulUUICallInfoSize;
- LINE_DIAL_PARAMS MinDialParams;
- LINE_DIAL_PARAMS MaxDialParams;
- LINE_DIAL_PARAMS DefaultDialParams;
- ULONG ulNumTerminals;
- ULONG ulTerminalCapsSize;
- ULONG ulTerminalCapsOffset;
- ULONG ulTerminalTextEntrySize;
- ULONG ulTerminalTextSize;
- ULONG ulTerminalTextOffset;
- ULONG ulDevSpecificSize;
- ULONG ulDevSpecificOffset;
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00010004)
- ULONG ulLineFeatures;
-#endif
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00020000)
- ULONG ulSettableDevStatus;
- ULONG ulDeviceClassesSize;
- ULONG ulDeviceClassesOffset;
-#endif
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00020002)
- GUID PermanentLineGuid;
-#endif
-#if (NDIS_TAPI_CURRENT_VERSION >= 0x00030000)
- ULONG ulAddressTypes;
- GUID ProtocolGuid;
- ULONG ulAvailableTracking;
-#endif
-} LINE_DEV_CAPS, *PLINE_DEV_CAPS;
-
-typedef struct _LINE_DEV_STATUS {
- ULONG ulTotalSize;
- ULONG ulNeededSize;
- ULONG ulUsedSize;
- ULONG ulNumOpens;
- ULONG ulOpenMediaModes;
- ULONG ulNumActiveCalls;
- ULONG ulNumOnHoldCalls;
- ULONG ulNumOnHoldPendCalls;
- ULONG ulLineFeatures;
- ULONG ulNumCallCompletions;
- ULONG ulRingMode;
- ULONG ulSignalLevel;
- ULONG ulBatteryLevel;
- ULONG ulRoamMode;
- ULONG ulDevStatusFlags;
- ULONG ulTerminalModesSize;
- ULONG ulTerminalModesOffset;
- ULONG ulDevSpecificSize;
- ULONG ulDevSpecificOffset;
-} LINE_DEV_STATUS, *PLINE_DEV_STATUS;
-
-typedef struct _LINE_EXTENSION_ID {
- ULONG ulExtensionID0;
- ULONG ulExtensionID1;
- ULONG ulExtensionID2;
- ULONG ulExtensionID3;
-} LINE_EXTENSION_ID, *PLINE_EXTENSION_ID;
-
-typedef struct _VAR_STRING {
- ULONG ulTotalSize;
- ULONG ulNeededSize;
- ULONG ulUsedSize;
- ULONG ulStringFormat;
- ULONG ulStringSize;
- ULONG ulStringOffset;
-} VAR_STRING, *PVAR_STRING;
-
-typedef struct _NDIS_TAPI_ANSWER {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ HDRV_CALL hdCall;
- /*IN*/ ULONG ulUserUserInfoSize;
- /*IN*/ UCHAR UserUserInfo[1];
-} NDIS_TAPI_ANSWER, *PNDIS_TAPI_ANSWER;
-
-typedef struct _NDIS_TAPI_CLOSE {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ HDRV_LINE hdLine;
-} NDIS_TAPI_CLOSE, *PNDIS_TAPI_CLOSE;
-
-typedef struct _NDIS_TAPI_CLOSE_CALL {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ HDRV_CALL hdCall;
-} NDIS_TAPI_CLOSE_CALL, *PNDIS_TAPI_CLOSE_CALL;
-
-typedef struct _NDIS_TAPI_CONDITIONAL_MEDIA_DETECTION {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ HDRV_LINE hdLine;
- /*IN*/ ULONG ulMediaModes;
- /*IN*/ LINE_CALL_PARAMS LineCallParams;
-} NDIS_TAPI_CONDITIONAL_MEDIA_DETECTION, *PNDIS_TAPI_CONDITIONAL_MEDIA_DETECTION;
-
-typedef struct _NDIS_TAPI_DROP {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ HDRV_CALL hdCall;
- /*IN*/ ULONG ulUserUserInfoSize;
- /*IN*/ UCHAR UserUserInfo[1];
-} NDIS_TAPI_DROP, *PNDIS_TAPI_DROP;
-
-typedef struct _NDIS_TAPI_PROVIDER_SHUTDOWN {
- /*IN*/ ULONG ulRequestID;
-} NDIS_TAPI_PROVIDER_SHUTDOWN, *PNDIS_TAPI_PROVIDER_SHUTDOWN;
-
-typedef struct _NDIS_TAPI_SET_APP_SPECIFIC {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ HDRV_CALL hdCall;
- /*IN*/ ULONG ulAppSpecific;
-} NDIS_TAPI_SET_APP_SPECIFIC, *PNDIS_TAPI_SET_APP_SPECIFIC;
-
-typedef struct _NDIS_TAPI_SET_CALL_PARAMS {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ HDRV_CALL hdCall;
- /*IN*/ ULONG ulBearerMode;
- /*IN*/ ULONG ulMinRate;
- /*IN*/ ULONG ulMaxRate;
- /*IN*/ BOOLEAN bSetLineDialParams;
- /*IN*/ LINE_DIAL_PARAMS LineDialParams;
-} NDIS_TAPI_SET_CALL_PARAMS, *PNDIS_TAPI_SET_CALL_PARAMS;
-
-typedef struct _NDIS_TAPI_SET_DEFAULT_MEDIA_DETECTION {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ HDRV_LINE hdLine;
- /*IN*/ ULONG ulMediaModes;
-} NDIS_TAPI_SET_DEFAULT_MEDIA_DETECTION, *PNDIS_TAPI_SET_DEFAULT_MEDIA_DETECTION;
-
-typedef struct _NDIS_TAPI_SET_DEV_CONFIG {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ ULONG ulDeviceID;
- /*IN*/ ULONG ulDeviceClassSize;
- /*IN*/ ULONG ulDeviceClassOffset;
- /*IN*/ ULONG ulDeviceConfigSize;
- /*IN*/ UCHAR DeviceConfig[1];
-} NDIS_TAPI_SET_DEV_CONFIG, *PNDIS_TAPI_SET_DEV_CONFIG;
-
-typedef struct _NDIS_TAPI_SET_MEDIA_MODE {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ HDRV_CALL hdCall;
- /*IN*/ ULONG ulMediaMode;
-} NDIS_TAPI_SET_MEDIA_MODE, *PNDIS_TAPI_SET_MEDIA_MODE;
-
-typedef struct _NDIS_TAPI_SET_STATUS_MESSAGES {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ HDRV_LINE hdLine;
- /*IN*/ ULONG ulLineStates;
- /*IN*/ ULONG ulAddressStates;
-} NDIS_TAPI_SET_STATUS_MESSAGES, *PNDIS_TAPI_SET_STATUS_MESSAGES;
-
-typedef struct _NDIS_TAPI_ACCEPT {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ HDRV_CALL hdCall;
- /*IN*/ ULONG ulUserUserInfoSize;
- /*IN*/ UCHAR UserUserInfo[1];
-} NDIS_TAPI_ACCEPT, *PNDIS_TAPI_ACCEPT;
-
-typedef struct _NDIS_TAPI_DIAL {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ HDRV_CALL hdCall;
- /*IN*/ ULONG ulDestAddressSize;
- /*IN*/ CHAR szDestAddress[1];
-} NDIS_TAPI_DIAL, *PNDIS_TAPI_DIAL;
-
-typedef struct _NDIS_TAPI_EVENT {
- /*IN*/ HTAPI_LINE htLine;
- /*IN*/ HTAPI_CALL htCall;
- /*IN*/ ULONG ulMsg;
- /*IN*/ ULONG ulParam1;
- /*IN*/ ULONG ulParam2;
- /*IN*/ ULONG ulParam3;
-} NDIS_TAPI_EVENT, *PNDIS_TAPI_EVENT;
-
-typedef struct _NDIS_TAPI_OPEN {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ ULONG ulDeviceID;
- /*IN*/ HTAPI_LINE htLine;
- /*OUT*/ HDRV_LINE hdLine;
-} NDIS_TAPI_OPEN, *PNDIS_TAPI_OPEN;
-
-typedef struct _NDIS_TAPI_SECURE_CALL {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ HDRV_CALL hdCall;
-} NDIS_TAPI_SECURE_CALL, *PNDIS_TAPI_SECURE_CALL;
-
-typedef struct _NDIS_TAPI_SELECT_EXT_VERSION {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ HDRV_LINE hdLine;
- /*IN*/ ULONG ulExtVersion;
-} NDIS_TAPI_SELECT_EXT_VERSION, *PNDIS_TAPI_SELECT_EXT_VERSION;
-
-typedef struct _NDIS_TAPI_SEND_USER_USER_INFO {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ HDRV_CALL hdCall;
- /*IN*/ ULONG ulUserUserInfoSize;
- /*IN*/ UCHAR UserUserInfo[1];
-} NDIS_TAPI_SEND_USER_USER_INFO, *PNDIS_TAPI_SEND_USER_USER_INFO;
-
-
-typedef struct _NDIS_TAPI_CONFIG_DIALOG {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ ULONG ulDeviceID;
- /*IN*/ ULONG ulDeviceClassSize;
- /*IN*/ ULONG ulDeviceClassOffset;
- /*IN*/ ULONG ulLibraryNameTotalSize;
- /*OUT*/ ULONG ulLibraryNameNeededSize;
- /*OUT*/ CHAR szLibraryName[1];
-} NDIS_TAPI_CONFIG_DIALOG, *PNDIS_TAPI_CONFIG_DIALOG;
-
-typedef struct _NDIS_TAPI_DEV_SPECIFIC {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ HDRV_LINE hdLine;
- /*IN*/ ULONG ulAddressID;
- /*IN*/ HDRV_CALL hdCall;
- /*IN OUT*/ ULONG ulParamsSize;
- /*IN OUT*/ UCHAR Params[1];
-} NDIS_TAPI_DEV_SPECIFIC, *PNDIS_TAPI_DEV_SPECIFIC;
-
-typedef struct _NDIS_TAPI_GET_ADDRESS_CAPS {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ ULONG ulDeviceID;
- /*IN*/ ULONG ulAddressID;
- /*IN*/ ULONG ulExtVersion;
- /*OUT*/ LINE_ADDRESS_CAPS LineAddressCaps;
-} NDIS_TAPI_GET_ADDRESS_CAPS, *PNDIS_TAPI_GET_ADDRESS_CAPS;
-
-typedef struct _NDIS_TAPI_GET_ADDRESS_ID {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ HDRV_LINE hdLine;
- /*OUT*/ ULONG ulAddressID;
- /*IN*/ ULONG ulAddressMode;
- /*IN*/ ULONG ulAddressSize;
- /*IN*/ CHAR szAddress[1];
-} NDIS_TAPI_GET_ADDRESS_ID, *PNDIS_TAPI_GET_ADDRESS_ID;
-
-typedef struct _NDIS_TAPI_GET_ADDRESS_STATUS {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ HDRV_LINE hdLine;
- /*IN*/ ULONG ulAddressID;
- /*OUT*/ LINE_ADDRESS_STATUS LineAddressStatus;
-} NDIS_TAPI_GET_ADDRESS_STATUS, *PNDIS_TAPI_GET_ADDRESS_STATUS;
-
-typedef struct _NDIS_TAPI_GET_CALL_ADDRESS_ID {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ HDRV_CALL hdCall;
- /*OUT*/ ULONG ulAddressID;
-} NDIS_TAPI_GET_CALL_ADDRESS_ID, *PNDIS_TAPI_GET_CALL_ADDRESS_ID;
-
-typedef struct _NDIS_TAPI_GET_CALL_INFO {
- ULONG ulRequestID;
- /*IN*/ HDRV_CALL hdCall;
- /*OUT*/ LINE_CALL_INFO LineCallInfo;
-} NDIS_TAPI_GET_CALL_INFO, *PNDIS_TAPI_GET_CALL_INFO;
-
-typedef struct _NDIS_TAPI_GET_CALL_STATUS {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ HDRV_CALL hdCall;
- /*OUT*/ LINE_CALL_STATUS LineCallStatus;
-} NDIS_TAPI_GET_CALL_STATUS, *PNDIS_TAPI_GET_CALL_STATUS;
-
-typedef struct _NDIS_TAPI_GET_DEV_CAPS {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ ULONG ulDeviceID;
- /*IN*/ ULONG ulExtVersion;
- /*OUT*/ LINE_DEV_CAPS LineDevCaps;
-} NDIS_TAPI_GET_DEV_CAPS, *PNDIS_TAPI_GET_DEV_CAPS;
-
-typedef struct _NDIS_TAPI_GET_DEV_CONFIG {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ ULONG ulDeviceID;
- /*IN*/ ULONG ulDeviceClassSize;
- /*IN*/ ULONG ulDeviceClassOffset;
- /*OUT*/ VAR_STRING DeviceConfig;
-} NDIS_TAPI_GET_DEV_CONFIG, *PNDIS_TAPI_GET_DEV_CONFIG;
-
-typedef struct _NDIS_TAPI_GET_EXTENSION_ID {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ ULONG ulDeviceID;
- /*OUT*/ LINE_EXTENSION_ID LineExtensionID;
-} NDIS_TAPI_GET_EXTENSION_ID, *PNDIS_TAPI_GET_EXTENSION_ID;
-
-typedef struct _NDIS_TAPI_GET_ID {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ HDRV_LINE hdLine;
- /*IN*/ ULONG ulAddressID;
- /*IN*/ HDRV_CALL hdCall;
- /*IN*/ ULONG ulSelect;
- /*IN*/ ULONG ulDeviceClassSize;
- /*IN*/ ULONG ulDeviceClassOffset;
- /*OUT*/ VAR_STRING DeviceID;
-} NDIS_TAPI_GET_ID, *PNDIS_TAPI_GET_ID;
-
-typedef struct _NDIS_TAPI_GET_LINE_DEV_STATUS {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ HDRV_LINE hdLine;
- /*OUT*/ LINE_DEV_STATUS LineDevStatus;
-} NDIS_TAPI_GET_LINE_DEV_STATUS, *PNDIS_TAPI_GET_LINE_DEV_STATUS;
-
-typedef struct _NDIS_TAPI_MAKE_CALL {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ HDRV_LINE hdLine;
- /*IN*/ HTAPI_CALL htCall;
- /*OUT*/ HDRV_CALL hdCall;
- /*IN*/ ULONG ulDestAddressSize;
- /*IN*/ ULONG ulDestAddressOffset;
- /*IN*/ BOOLEAN bUseDefaultLineCallParams;
- /*IN*/ LINE_CALL_PARAMS LineCallParams;
-} NDIS_TAPI_MAKE_CALL, *PNDIS_TAPI_MAKE_CALL;
-
-typedef struct _NDIS_TAPI_NEGOTIATE_EXT_VERSION {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ ULONG ulDeviceID;
- /*IN*/ ULONG ulLowVersion;
- /*IN*/ ULONG ulHighVersion;
- /*OUT*/ ULONG ulExtVersion;
-} NDIS_TAPI_NEGOTIATE_EXT_VERSION, *PNDIS_TAPI_NEGOTIATE_EXT_VERSION;
-
-typedef struct _NDIS_TAPI_PROVIDER_INITIALIZE {
- /*IN*/ ULONG ulRequestID;
- /*IN*/ ULONG ulDeviceIDBase;
- /*OUT*/ ULONG ulNumLineDevs;
- /*OUT*/ ULONG ulProviderID;
-} NDIS_TAPI_PROVIDER_INITIALIZE, *PNDIS_TAPI_PROVIDER_INITIALIZE;
-
-
-#define CO_TAPI_VERSION NDIS_TAPI_CURRENT_VERSION
-
-#define CO_TAPI_FLAG_OUTGOING_CALL 0x00000001
-#define CO_TAPI_FLAG_INCOMING_CALL 0x00000002
-#define CO_TAPI_FLAG_USE_DEFAULT_CALLPARAMS 0x00000004
-
-#define AF_TAPI_SAP_TYPE 0x00008000
-
-typedef struct _CO_TAPI_ADDRESS_CAPS {
- /*IN*/ ULONG ulLineID;
- /*IN*/ ULONG ulAddressID;
- /*OUT*/ ULONG ulFlags;
- /*OUT*/ LINE_ADDRESS_CAPS LineAddressCaps;
-} CO_TAPI_ADDRESS_CAPS, *PCO_TAPI_ADDRESS_CAPS;
-
-/* CO_TAPI_CM_CAPS.ulFlags constants */
-#define CO_TAPI_FLAG_PER_LINE_CAPS 0x00000001
-
-typedef struct _CO_TAPI_CM_CAPS {
- /*OUT*/ ULONG ulCoTapiVersion;
- /*OUT*/ ULONG ulNumLines;
- /*OUT*/ ULONG ulFlags;
-} CO_TAPI_CM_CAPS, *PCO_TAPI_CM_CAPS;
-
-typedef struct _CO_TAPI_CALL_DIAGNOSTICS {
- /*OUT*/ ULONG ulOrigin;
- /*OUT*/ ULONG ulReason;
- /*OUT*/ NDIS_VAR_DATA_DESC DiagInfo;
-} CO_TAPI_CALL_DIAGNOSTICS, *PCO_TAPI_CALL_DIAGNOSTICS;
-
-
-/* CO_TAPI_LINE_CAPS.ulFlags constants */
-#define CO_TAPI_FLAG_PER_ADDRESS_CAPS 0x00000001
-
-typedef struct _CO_TAPI_LINE_CAPS {
- /*IN*/ ULONG ulLineID;
- /*OUT*/ ULONG ulFlags;
- /*OUT*/ LINE_DEV_CAPS LineDevCaps;
-} CO_TAPI_LINE_CAPS, *PCO_TAPI_LINE_CAPS;
-
-typedef struct _CO_TAPI_TRANSLATE_NDIS_CALLPARAMS {
- /*IN*/ ULONG ulFlags;
- /*IN*/ NDIS_VAR_DATA_DESC NdisCallParams;
- /*OUT*/ NDIS_VAR_DATA_DESC LineCallInfo;
-} CO_TAPI_TRANSLATE_NDIS_CALLPARAMS, *PCO_TAPI_TRANSLATE_NDIS_CALLPARAMS;
-
-typedef struct _CO_TAPI_TRANSLATE_TAPI_CALLPARAMS {
- /*IN*/ ULONG ulLineID;
- /*IN*/ ULONG ulAddressID;
- /*IN*/ ULONG ulFlags;
- /*IN*/ NDIS_VAR_DATA_DESC DestAddress;
- /*IN*/ NDIS_VAR_DATA_DESC LineCallParams;
- /*OUT*/ NDIS_VAR_DATA_DESC NdisCallParams;
-} CO_TAPI_TRANSLATE_TAPI_CALLPARAMS, *PCO_TAPI_TRANSLATE_TAPI_CALLPARAMS;
-
-/* CO_TAPI_TRANSLATE_SAP.ulLineID constants */
-#define CO_TAPI_LINE_ID_UNSPECIFIED 0xFFFFFFFF
-
-/* CO_TAPI_TRANSLATE_SAP.ulAddressID constants */
-#define CO_TAPI_ADDRESS_ID_UNSPECIFIED 0xFFFFFFFF
-
-typedef struct _CO_TAPI_TRANSLATE_SAP {
- /*IN*/ ULONG ulLineID;
- /*IN*/ ULONG ulAddressID;
- /*IN*/ ULONG ulMediaModes;
- /*IN*/ ULONG Reserved;
- /*OUT*/ ULONG NumberOfSaps;
- /*OUT*/ NDIS_VAR_DATA_DESC NdisSapParams[1];
-} CO_AF_TAPI_SAP, *PCO_AF_TAPI_SAP;
-
-typedef struct _CO_AF_TAPI_INCOMING_CALL_PARAMETERS {
- /*IN*/ ULONG ulLineID;
- /*IN*/ ULONG ulAddressID;
- /*IN*/ ULONG ulFlags;
- /*IN*/ NDIS_VAR_DATA_DESC LineCallInfo;
-} CO_AF_TAPI_INCOMING_CALL_PARAMETERS, *PCO_AF_TAPI_INCOMING_CALL_PARAMETERS;
-
-typedef struct _CO_AF_TAPI_MAKE_CALL_PARAMETERS {
- /*IN*/ ULONG ulLineID;
- /*IN*/ ULONG ulAddressID;
- /*IN*/ ULONG ulFlags;
- /*IN*/ NDIS_VAR_DATA_DESC DestAddress;
- /*IN*/ NDIS_VAR_DATA_DESC LineCallParams;
-} CO_AF_TAPI_MAKE_CALL_PARAMETERS, *PCO_AF_TAPI_MAKE_CALL_PARAMETERS;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NDISTAPI_H */
diff --git a/winsup/w32api/include/ddk/ndiswan.h b/winsup/w32api/include/ddk/ndiswan.h
deleted file mode 100644
index 22ea978..0000000
--- a/winsup/w32api/include/ddk/ndiswan.h
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- * ndiswan.h
- *
- * Definitions for NDIS WAN miniport drivers
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NDISWAN_H
-#define __NDISWAN_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ndis.h"
-
-#define NDIS_USE_WAN_WRAPPER 0x00000001
-
-#define NDIS_STATUS_TAPI_INDICATION ((NDIS_STATUS)0x40010080L)
-
-/* NDIS_WAN_INFO.FramingBits constants */
-#define RAS_FRAMING 0x00000001
-#define RAS_COMPRESSION 0x00000002
-
-#define ARAP_V1_FRAMING 0x00000004
-#define ARAP_V2_FRAMING 0x00000008
-#define ARAP_FRAMING (ARAP_V1_FRAMING | ARAP_V2_FRAMING)
-
-#define PPP_MULTILINK_FRAMING 0x00000010
-#define PPP_SHORT_SEQUENCE_HDR_FORMAT 0x00000020
-#define PPP_MC_MULTILINK_FRAMING 0x00000040
-
-#define PPP_FRAMING 0x00000100
-#define PPP_COMPRESS_ADDRESS_CONTROL 0x00000200
-#define PPP_COMPRESS_PROTOCOL_FIELD 0x00000400
-#define PPP_ACCM_SUPPORTED 0x00000800
-
-#define SLIP_FRAMING 0x00001000
-#define SLIP_VJ_COMPRESSION 0x00002000
-#define SLIP_VJ_AUTODETECT 0x00004000
-
-#define MEDIA_NRZ_ENCODING 0x00010000
-#define MEDIA_NRZI_ENCODING 0x00020000
-#define MEDIA_NLPID 0x00040000
-
-#define RFC_1356_FRAMING 0x00100000
-#define RFC_1483_FRAMING 0x00200000
-#define RFC_1490_FRAMING 0x00400000
-#define LLC_ENCAPSULATION 0x00800000
-
-#define SHIVA_FRAMING 0x01000000
-#define NBF_PRESERVE_MAC_ADDRESS 0x01000000
-
-#define PASS_THROUGH_MODE 0x10000000
-#define RAW_PASS_THROUGH_MODE 0x20000000
-
-#define TAPI_PROVIDER 0x80000000
-
-typedef struct _NDIS_WAN_INFO {
- /*OUT*/ ULONG MaxFrameSize;
- /*OUT*/ ULONG MaxTransmit;
- /*OUT*/ ULONG HeaderPadding;
- /*OUT*/ ULONG TailPadding;
- /*OUT*/ ULONG Endpoints;
- /*OUT*/ UINT MemoryFlags;
- /*OUT*/ NDIS_PHYSICAL_ADDRESS HighestAcceptableAddress;
- /*OUT*/ ULONG FramingBits;
- /*OUT*/ ULONG DesiredACCM;
-} NDIS_WAN_INFO, *PNDIS_WAN_INFO;
-
-typedef struct _NDIS_WAN_GET_LINK_INFO {
- /*IN*/ NDIS_HANDLE NdisLinkHandle;
- /*OUT*/ ULONG MaxSendFrameSize;
- /*OUT*/ ULONG MaxRecvFrameSize;
- /*OUT*/ ULONG HeaderPadding;
- /*OUT*/ ULONG TailPadding;
- /*OUT*/ ULONG SendFramingBits;
- /*OUT*/ ULONG RecvFramingBits;
- /*OUT*/ ULONG SendCompressionBits;
- /*OUT*/ ULONG RecvCompressionBits;
- /*OUT*/ ULONG SendACCM;
- /*OUT*/ ULONG RecvACCM;
-} NDIS_WAN_GET_LINK_INFO, *PNDIS_WAN_GET_LINK_INFO;
-
-typedef struct _NDIS_WAN_SET_LINK_INFO {
- /*IN*/ NDIS_HANDLE NdisLinkHandle;
- /*IN*/ ULONG MaxSendFrameSize;
- /*IN*/ ULONG MaxRecvFrameSize;
- /*IN*/ ULONG HeaderPadding;
- /*IN*/ ULONG TailPadding;
- /*IN*/ ULONG SendFramingBits;
- /*IN*/ ULONG RecvFramingBits;
- /*IN*/ ULONG SendCompressionBits;
- /*IN*/ ULONG RecvCompressionBits;
- /*IN*/ ULONG SendACCM;
- /*IN*/ ULONG RecvACCM;
-} NDIS_WAN_SET_LINK_INFO, *PNDIS_WAN_SET_LINK_INFO;
-
-/* NDIS_WAN_COMPRESS_INFO.MSCompType constants */
-#define NDISWAN_COMPRESSION 0x00000001
-#define NDISWAN_ENCRYPTION 0x00000010
-#define NDISWAN_40_ENCRYPTION 0x00000020
-#define NDISWAN_128_ENCRYPTION 0x00000040
-#define NDISWAN_56_ENCRYPTION 0x00000080
-#define NDISWAN_HISTORY_LESS 0x01000000
-
-/* NDIS_WAN_COMPRESS_INFO.CompType constants */
-#define COMPTYPE_OUI 0
-#define COMPTYPE_NT31RAS 254
-#define COMPTYPE_NONE 255
-
-typedef struct _NDIS_WAN_COMPRESS_INFO {
- UCHAR SessionKey[8];
- ULONG MSCompType;
- UCHAR CompType;
- USHORT CompLength;
- _ANONYMOUS_UNION union {
- struct {
- UCHAR CompOUI[3];
- UCHAR CompSubType;
- UCHAR CompValues[32];
- } Proprietary;
- struct {
- UCHAR CompValues[32];
- } Public;
- } DUMMYUNIONNAME;
-} NDIS_WAN_COMPRESS_INFO;
-
-typedef NDIS_WAN_COMPRESS_INFO *PNDIS_WAN_COMPRESS_INFO;
-
-typedef struct _NDIS_WAN_GET_COMP_INFO {
- /*IN*/ NDIS_HANDLE NdisLinkHandle;
- /*OUT*/ NDIS_WAN_COMPRESS_INFO SendCapabilities;
- /*OUT*/ NDIS_WAN_COMPRESS_INFO RecvCapabilities;
-} NDIS_WAN_GET_COMP_INFO, *PNDIS_WAN_GET_COMP_INFO;
-
-typedef struct _NDIS_WAN_SET_COMP_INFO {
- /*IN*/ NDIS_HANDLE NdisLinkHandle;
- /*IN*/ NDIS_WAN_COMPRESS_INFO SendCapabilities;
- /*IN*/ NDIS_WAN_COMPRESS_INFO RecvCapabilities;
-} NDIS_WAN_SET_COMP_INFO, *PNDIS_WAN_SET_COMP_INFO;
-
-typedef struct _NDIS_WAN_GET_STATS_INFO {
- /*IN*/ NDIS_HANDLE NdisLinkHandle;
- /*OUT*/ ULONG BytesSent;
- /*OUT*/ ULONG BytesRcvd;
- /*OUT*/ ULONG FramesSent;
- /*OUT*/ ULONG FramesRcvd;
- /*OUT*/ ULONG CRCErrors;
- /*OUT*/ ULONG TimeoutErrors;
- /*OUT*/ ULONG AlignmentErrors;
- /*OUT*/ ULONG SerialOverrunErrors;
- /*OUT*/ ULONG FramingErrors;
- /*OUT*/ ULONG BufferOverrunErrors;
- /*OUT*/ ULONG BytesTransmittedUncompressed;
- /*OUT*/ ULONG BytesReceivedUncompressed;
- /*OUT*/ ULONG BytesTransmittedCompressed;
- /*OUT*/ ULONG BytesReceivedCompressed;
-} NDIS_WAN_GET_STATS_INFO, *PNDIS_WAN_GET_STATS_INFO;
-
-#define NdisMWanInitializeWrapper(NdisWrapperHandle, \
- SystemSpecific1, \
- SystemSpecific2, \
- SystemSpecific3) \
-{ \
- NdisMInitializeWrapper(NdisWrapperHandle, \
- SystemSpecific1, \
- SystemSpecific2, \
- SystemSpecific3); \
-}
-
-typedef struct _NDIS_WAN_CO_INFO {
- /*OUT*/ ULONG MaxFrameSize;
- /*OUT*/ ULONG MaxSendWindow;
- /*OUT*/ ULONG FramingBits;
- /*OUT*/ ULONG DesiredACCM;
-} NDIS_WAN_CO_INFO, *PNDIS_WAN_CO_INFO;
-
-typedef struct _NDIS_WAN_CO_GET_LINK_INFO {
- /*OUT*/ ULONG MaxSendFrameSize;
- /*OUT*/ ULONG MaxRecvFrameSize;
- /*OUT*/ ULONG SendFramingBits;
- /*OUT*/ ULONG RecvFramingBits;
- /*OUT*/ ULONG SendCompressionBits;
- /*OUT*/ ULONG RecvCompressionBits;
- /*OUT*/ ULONG SendACCM;
- /*OUT*/ ULONG RecvACCM;
-} NDIS_WAN_CO_GET_LINK_INFO, *PNDIS_WAN_CO_GET_LINK_INFO;
-
-typedef struct _NDIS_WAN_CO_SET_LINK_INFO {
- /*IN*/ ULONG MaxSendFrameSize;
- /*IN*/ ULONG MaxRecvFrameSize;
- /*IN*/ ULONG SendFramingBits;
- /*IN*/ ULONG RecvFramingBits;
- /*IN*/ ULONG SendCompressionBits;
- /*IN*/ ULONG RecvCompressionBits;
- /*IN*/ ULONG SendACCM;
- /*IN*/ ULONG RecvACCM;
-} NDIS_WAN_CO_SET_LINK_INFO, *PNDIS_WAN_CO_SET_LINK_INFO;
-
-typedef struct _NDIS_WAN_CO_GET_COMP_INFO {
- /*OUT*/ NDIS_WAN_COMPRESS_INFO SendCapabilities;
- /*OUT*/ NDIS_WAN_COMPRESS_INFO RecvCapabilities;
-} NDIS_WAN_CO_GET_COMP_INFO, *PNDIS_WAN_CO_GET_COMP_INFO;
-
-typedef struct _NDIS_WAN_CO_SET_COMP_INFO {
- /*IN*/ NDIS_WAN_COMPRESS_INFO SendCapabilities;
- /*IN*/ NDIS_WAN_COMPRESS_INFO RecvCapabilities;
-} NDIS_WAN_CO_SET_COMP_INFO, *PNDIS_WAN_CO_SET_COMP_INFO;
-
-typedef struct _NDIS_WAN_CO_GET_STATS_INFO {
- /*OUT*/ ULONG BytesSent;
- /*OUT*/ ULONG BytesRcvd;
- /*OUT*/ ULONG FramesSent;
- /*OUT*/ ULONG FramesRcvd;
- /*OUT*/ ULONG CRCErrors;
- /*OUT*/ ULONG TimeoutErrors;
- /*OUT*/ ULONG AlignmentErrors;
- /*OUT*/ ULONG SerialOverrunErrors;
- /*OUT*/ ULONG FramingErrors;
- /*OUT*/ ULONG BufferOverrunErrors;
- /*OUT*/ ULONG BytesTransmittedUncompressed;
- /*OUT*/ ULONG BytesReceivedUncompressed;
- /*OUT*/ ULONG BytesTransmittedCompressed;
- /*OUT*/ ULONG BytesReceivedCompressed;
-} NDIS_WAN_CO_GET_STATS_INFO, *PNDIS_WAN_CO_GET_STATS_INFO;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NDISWAN_H */
diff --git a/winsup/w32api/include/ddk/netevent.h b/winsup/w32api/include/ddk/netevent.h
deleted file mode 100644
index 0cf66e0..0000000
--- a/winsup/w32api/include/ddk/netevent.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * netevent.h
- *
- * Network events
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NETEVENT_H
-#define __NETEVENT_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#define EVENT_TRANSPORT_REGISTER_FAILED 0xC000232CL
-
-#define EVENT_TRANSPORT_ADAPTER_NOT_FOUND 0xC000232EL
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NETEVENT_H */
diff --git a/winsup/w32api/include/ddk/netpnp.h b/winsup/w32api/include/ddk/netpnp.h
deleted file mode 100644
index 09ea55e..0000000
--- a/winsup/w32api/include/ddk/netpnp.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * netpnp.h
- *
- * Network Plug and Play event support
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NETPNP_H
-#define __NETPNP_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum _NET_PNP_EVENT_CODE {
- NetEventSetPower,
- NetEventQueryPower,
- NetEventQueryRemoveDevice,
- NetEventCancelRemoveDevice,
- NetEventReconfigure,
- NetEventBindList,
- NetEventBindsComplete,
- NetEventPnPCapabilities,
- NetEventMaximum
-} NET_PNP_EVENT_CODE, *PNET_PNP_EVENT_CODE;
-
-typedef struct _NET_PNP_EVENT {
- NET_PNP_EVENT_CODE NetEvent;
- PVOID Buffer;
- ULONG BufferLength;
- ULONG_PTR NdisReserved[4];
- ULONG_PTR TransportReserved[4];
- ULONG_PTR TdiReserved[4];
- ULONG_PTR TdiClientReserved[4];
-} NET_PNP_EVENT, *PNET_PNP_EVENT;
-
-typedef enum _NET_DEVICE_POWER_STATE {
- NetDeviceStateUnspecified,
- NetDeviceStateD0,
- NetDeviceStateD1,
- NetDeviceStateD2,
- NetDeviceStateD3,
- NetDeviceStateMaximum
-} NET_DEVICE_POWER_STATE, *PNET_DEVICE_POWER_STATE;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NETPNP_H */
diff --git a/winsup/w32api/include/ddk/newdev.h b/winsup/w32api/include/ddk/newdev.h
deleted file mode 100644
index 9b4b6d1..0000000
--- a/winsup/w32api/include/ddk/newdev.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * newdev.h
- *
- * Driver installation DLL interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NEWDEV_H
-#define __NEWDEV_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* UpdateDriverForPlugAndPlayDevices.InstallFlags constants */
-#define INSTALLFLAG_FORCE 0x00000001
-#define INSTALLFLAG_READONLY 0x00000002
-#define INSTALLFLAG_NONINTERACTIVE 0x00000004
-#define INSTALLFLAG_BITS 0x00000007
-
-BOOL WINAPI
-UpdateDriverForPlugAndPlayDevicesA(
- HWND hwndParent,
- LPCSTR HardwareId,
- LPCSTR FullInfPath,
- DWORD InstallFlags,
- PBOOL bRebootRequired /*OPTIONAL*/);
-
-BOOL WINAPI
-UpdateDriverForPlugAndPlayDevicesW(
- HWND hwndParent,
- LPCWSTR HardwareId,
- LPCWSTR FullInfPath,
- DWORD InstallFlags,
- PBOOL bRebootRequired /*OPTIONAL*/);
-
-#ifdef UNICODE
-#define UpdateDriverForPlugAndPlayDevices UpdateDriverForPlugAndPlayDevicesW
-#else
-#define UpdateDriverForPlugAndPlayDevices UpdateDriverForPlugAndPlayDevicesA
-#endif /* UNICODE */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NEWDEV_H */
diff --git a/winsup/w32api/include/ddk/ntapi.h b/winsup/w32api/include/ddk/ntapi.h
deleted file mode 100644
index 8623772..0000000
--- a/winsup/w32api/include/ddk/ntapi.h
+++ /dev/null
@@ -1,2906 +0,0 @@
-/*
- * ntapi.h
- *
- * Windows NT Native API
- *
- * Most structures in this file is obtained from Windows NT/2000 Native API
- * Reference by Gary Nebbett, ISBN 1578701996.
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NTAPI_H
-#define __NTAPI_H
-
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdarg.h>
-#include <winbase.h>
-#include "ntddk.h"
-#include "ntpoapi.h"
-
-#pragma pack(push,4)
-
-typedef struct _PEB *PPEB;
-
-/* FIXME: Unknown definitions */
-typedef PVOID POBJECT_TYPE_LIST;
-typedef PVOID PEXECUTION_STATE;
-typedef PVOID PLANGID;
-
-#ifndef NtCurrentProcess
-#define NtCurrentProcess() ((HANDLE)0xFFFFFFFF)
-#endif /* NtCurrentProcess */
-#ifndef NtCurrentThread
-#define NtCurrentThread() ((HANDLE)0xFFFFFFFE)
-#endif /* NtCurrentThread */
-
-/* System information and control */
-
-typedef enum _SYSTEM_INFORMATION_CLASS {
- SystemInformationClassMin = 0,
- SystemBasicInformation = 0,
- SystemProcessorInformation = 1,
- SystemPerformanceInformation = 2,
- SystemTimeOfDayInformation = 3,
- SystemPathInformation = 4,
- SystemNotImplemented1 = 4,
- SystemProcessInformation = 5,
- SystemProcessesAndThreadsInformation = 5,
- SystemCallCountInfoInformation = 6,
- SystemCallCounts = 6,
- SystemDeviceInformation = 7,
- SystemConfigurationInformation = 7,
- SystemProcessorPerformanceInformation = 8,
- SystemProcessorTimes = 8,
- SystemFlagsInformation = 9,
- SystemGlobalFlag = 9,
- SystemCallTimeInformation = 10,
- SystemNotImplemented2 = 10,
- SystemModuleInformation = 11,
- SystemLocksInformation = 12,
- SystemLockInformation = 12,
- SystemStackTraceInformation = 13,
- SystemNotImplemented3 = 13,
- SystemPagedPoolInformation = 14,
- SystemNotImplemented4 = 14,
- SystemNonPagedPoolInformation = 15,
- SystemNotImplemented5 = 15,
- SystemHandleInformation = 16,
- SystemObjectInformation = 17,
- SystemPageFileInformation = 18,
- SystemPagefileInformation = 18,
- SystemVdmInstemulInformation = 19,
- SystemInstructionEmulationCounts = 19,
- SystemVdmBopInformation = 20,
- SystemInvalidInfoClass1 = 20,
- SystemFileCacheInformation = 21,
- SystemCacheInformation = 21,
- SystemPoolTagInformation = 22,
- SystemInterruptInformation = 23,
- SystemProcessorStatistics = 23,
- SystemDpcBehaviourInformation = 24,
- SystemDpcInformation = 24,
- SystemFullMemoryInformation = 25,
- SystemNotImplemented6 = 25,
- SystemLoadImage = 26,
- SystemUnloadImage = 27,
- SystemTimeAdjustmentInformation = 28,
- SystemTimeAdjustment = 28,
- SystemSummaryMemoryInformation = 29,
- SystemNotImplemented7 = 29,
- SystemNextEventIdInformation = 30,
- SystemNotImplemented8 = 30,
- SystemEventIdsInformation = 31,
- SystemNotImplemented9 = 31,
- SystemCrashDumpInformation = 32,
- SystemExceptionInformation = 33,
- SystemCrashDumpStateInformation = 34,
- SystemKernelDebuggerInformation = 35,
- SystemContextSwitchInformation = 36,
- SystemRegistryQuotaInformation = 37,
- SystemLoadAndCallImage = 38,
- SystemPrioritySeparation = 39,
- SystemPlugPlayBusInformation = 40,
- SystemNotImplemented10 = 40,
- SystemDockInformation = 41,
- SystemNotImplemented11 = 41,
- /* SystemPowerInformation = 42, Conflicts with POWER_INFORMATION_LEVEL 1 */
- SystemInvalidInfoClass2 = 42,
- SystemProcessorSpeedInformation = 43,
- SystemInvalidInfoClass3 = 43,
- SystemCurrentTimeZoneInformation = 44,
- SystemTimeZoneInformation = 44,
- SystemLookasideInformation = 45,
- SystemSetTimeSlipEvent = 46,
- SystemCreateSession = 47,
- SystemDeleteSession = 48,
- SystemInvalidInfoClass4 = 49,
- SystemRangeStartInformation = 50,
- SystemVerifierInformation = 51,
- SystemAddVerifier = 52,
- SystemSessionProcessesInformation = 53,
- SystemInformationClassMax
-} SYSTEM_INFORMATION_CLASS;
-
-typedef struct _SYSTEM_BASIC_INFORMATION {
- ULONG Unknown;
- ULONG MaximumIncrement;
- ULONG PhysicalPageSize;
- ULONG NumberOfPhysicalPages;
- ULONG LowestPhysicalPage;
- ULONG HighestPhysicalPage;
- ULONG AllocationGranularity;
- ULONG LowestUserAddress;
- ULONG HighestUserAddress;
- ULONG ActiveProcessors;
- UCHAR NumberProcessors;
-} SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
-
-typedef struct _SYSTEM_PROCESSOR_INFORMATION {
- USHORT ProcessorArchitecture;
- USHORT ProcessorLevel;
- USHORT ProcessorRevision;
- USHORT Unknown;
- ULONG FeatureBits;
-} SYSTEM_PROCESSOR_INFORMATION, *PSYSTEM_PROCESSOR_INFORMATION;
-
-typedef struct _SYSTEM_PERFORMANCE_INFORMATION {
- LARGE_INTEGER IdleTime;
- LARGE_INTEGER ReadTransferCount;
- LARGE_INTEGER WriteTransferCount;
- LARGE_INTEGER OtherTransferCount;
- ULONG ReadOperationCount;
- ULONG WriteOperationCount;
- ULONG OtherOperationCount;
- ULONG AvailablePages;
- ULONG TotalCommittedPages;
- ULONG TotalCommitLimit;
- ULONG PeakCommitment;
- ULONG PageFaults;
- ULONG WriteCopyFaults;
- ULONG TransitionFaults;
- ULONG CacheTransitionFaults;
- ULONG DemandZeroFaults;
- ULONG PagesRead;
- ULONG PageReadIos;
- ULONG CacheReads;
- ULONG CacheIos;
- ULONG PagefilePagesWritten;
- ULONG PagefilePageWriteIos;
- ULONG MappedFilePagesWritten;
- ULONG MappedFilePageWriteIos;
- ULONG PagedPoolUsage;
- ULONG NonPagedPoolUsage;
- ULONG PagedPoolAllocs;
- ULONG PagedPoolFrees;
- ULONG NonPagedPoolAllocs;
- ULONG NonPagedPoolFrees;
- ULONG TotalFreeSystemPtes;
- ULONG SystemCodePage;
- ULONG TotalSystemDriverPages;
- ULONG TotalSystemCodePages;
- ULONG SmallNonPagedLookasideListAllocateHits;
- ULONG SmallPagedLookasideListAllocateHits;
- ULONG Reserved3;
- ULONG MmSystemCachePage;
- ULONG PagedPoolPage;
- ULONG SystemDriverPage;
- ULONG FastReadNoWait;
- ULONG FastReadWait;
- ULONG FastReadResourceMiss;
- ULONG FastReadNotPossible;
- ULONG FastMdlReadNoWait;
- ULONG FastMdlReadWait;
- ULONG FastMdlReadResourceMiss;
- ULONG FastMdlReadNotPossible;
- ULONG MapDataNoWait;
- ULONG MapDataWait;
- ULONG MapDataNoWaitMiss;
- ULONG MapDataWaitMiss;
- ULONG PinMappedDataCount;
- ULONG PinReadNoWait;
- ULONG PinReadWait;
- ULONG PinReadNoWaitMiss;
- ULONG PinReadWaitMiss;
- ULONG CopyReadNoWait;
- ULONG CopyReadWait;
- ULONG CopyReadNoWaitMiss;
- ULONG CopyReadWaitMiss;
- ULONG MdlReadNoWait;
- ULONG MdlReadWait;
- ULONG MdlReadNoWaitMiss;
- ULONG MdlReadWaitMiss;
- ULONG ReadAheadIos;
- ULONG LazyWriteIos;
- ULONG LazyWritePages;
- ULONG DataFlushes;
- ULONG DataPages;
- ULONG ContextSwitches;
- ULONG FirstLevelTbFills;
- ULONG SecondLevelTbFills;
- ULONG SystemCalls;
-} SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION;
-
-typedef struct _SYSTEM_TIME_OF_DAY_INFORMATION {
- LARGE_INTEGER BootTime;
- LARGE_INTEGER CurrentTime;
- LARGE_INTEGER TimeZoneBias;
- ULONG CurrentTimeZoneId;
-} SYSTEM_TIME_OF_DAY_INFORMATION, *PSYSTEM_TIME_OF_DAY_INFORMATION;
-
-typedef struct _VM_COUNTERS {
- ULONG PeakVirtualSize;
- ULONG VirtualSize;
- ULONG PageFaultCount;
- ULONG PeakWorkingSetSize;
- ULONG WorkingSetSize;
- ULONG QuotaPeakPagedPoolUsage;
- ULONG QuotaPagedPoolUsage;
- ULONG QuotaPeakNonPagedPoolUsage;
- ULONG QuotaNonPagedPoolUsage;
- ULONG PagefileUsage;
- ULONG PeakPagefileUsage;
-} VM_COUNTERS;
-
-typedef enum _THREAD_STATE {
- StateInitialized,
- StateReady,
- StateRunning,
- StateStandby,
- StateTerminated,
- StateWait,
- StateTransition,
- StateUnknown
-} THREAD_STATE;
-
-typedef struct _SYSTEM_THREADS {
- LARGE_INTEGER KernelTime;
- LARGE_INTEGER UserTime;
- LARGE_INTEGER CreateTime;
- ULONG WaitTime;
- PVOID StartAddress;
- CLIENT_ID ClientId;
- KPRIORITY Priority;
- KPRIORITY BasePriority;
- ULONG ContextSwitchCount;
- THREAD_STATE State;
- KWAIT_REASON WaitReason;
-} SYSTEM_THREADS, *PSYSTEM_THREADS;
-
-typedef struct _SYSTEM_PROCESSES {
- ULONG NextEntryDelta;
- ULONG ThreadCount;
- ULONG Reserved1[6];
- LARGE_INTEGER CreateTime;
- LARGE_INTEGER UserTime;
- LARGE_INTEGER KernelTime;
- UNICODE_STRING ProcessName;
- KPRIORITY BasePriority;
- ULONG ProcessId;
- ULONG InheritedFromProcessId;
- ULONG HandleCount;
- ULONG Reserved2[2];
- VM_COUNTERS VmCounters;
- IO_COUNTERS IoCounters;
- SYSTEM_THREADS Threads[1];
-} SYSTEM_PROCESSES, *PSYSTEM_PROCESSES;
-
-typedef struct _SYSTEM_CALLS_INFORMATION {
- ULONG Size;
- ULONG NumberOfDescriptorTables;
- ULONG NumberOfRoutinesInTable[1];
- ULONG CallCounts[ANYSIZE_ARRAY];
-} SYSTEM_CALLS_INFORMATION, *PSYSTEM_CALLS_INFORMATION;
-
-typedef struct _SYSTEM_CONFIGURATION_INFORMATION {
- ULONG DiskCount;
- ULONG FloppyCount;
- ULONG CdRomCount;
- ULONG TapeCount;
- ULONG SerialCount;
- ULONG ParallelCount;
-} SYSTEM_CONFIGURATION_INFORMATION, *PSYSTEM_CONFIGURATION_INFORMATION;
-
-typedef struct _SYSTEM_PROCESSOR_TIMES {
- LARGE_INTEGER IdleTime;
- LARGE_INTEGER KernelTime;
- LARGE_INTEGER UserTime;
- LARGE_INTEGER DpcTime;
- LARGE_INTEGER InterruptTime;
- ULONG InterruptCount;
-} SYSTEM_PROCESSOR_TIMES, *PSYSTEM_PROCESSOR_TIMES;
-
-/* SYSTEM_GLOBAL_FLAG.GlobalFlag constants */
-#define FLG_STOP_ON_EXCEPTION 0x00000001
-#define FLG_SHOW_LDR_SNAPS 0x00000002
-#define FLG_DEBUG_INITIAL_COMMAND 0x00000004
-#define FLG_STOP_ON_HUNG_GUI 0x00000008
-#define FLG_HEAP_ENABLE_TAIL_CHECK 0x00000010
-#define FLG_HEAP_ENABLE_FREE_CHECK 0x00000020
-#define FLG_HEAP_VALIDATE_PARAMETERS 0x00000040
-#define FLG_HEAP_VALIDATE_ALL 0x00000080
-#define FLG_POOL_ENABLE_TAIL_CHECK 0x00000100
-#define FLG_POOL_ENABLE_FREE_CHECK 0x00000200
-#define FLG_POOL_ENABLE_TAGGING 0x00000400
-#define FLG_HEAP_ENABLE_TAGGING 0x00000800
-#define FLG_USER_STACK_TRACE_DB 0x00001000
-#define FLG_KERNEL_STACK_TRACE_DB 0x00002000
-#define FLG_MAINTAIN_OBJECT_TYPELIST 0x00004000
-#define FLG_HEAP_ENABLE_TAG_BY_DLL 0x00008000
-#define FLG_IGNORE_DEBUG_PRIV 0x00010000
-#define FLG_ENABLE_CSRDEBUG 0x00020000
-#define FLG_ENABLE_KDEBUG_SYMBOL_LOAD 0x00040000
-#define FLG_DISABLE_PAGE_KERNEL_STACKS 0x00080000
-#define FLG_HEAP_ENABLE_CALL_TRACING 0x00100000
-#define FLG_HEAP_DISABLE_COALESCING 0x00200000
-#define FLG_ENABLE_CLOSE_EXCEPTIONS 0x00400000
-#define FLG_ENABLE_EXCEPTION_LOGGING 0x00800000
-#define FLG_ENABLE_DBGPRINT_BUFFERING 0x08000000
-
-typedef struct _SYSTEM_GLOBAL_FLAG {
- ULONG GlobalFlag;
-} SYSTEM_GLOBAL_FLAG, *PSYSTEM_GLOBAL_FLAG;
-
-typedef struct _SYSTEM_MODULE_INFORMATION_ENTRY {
- ULONG Unknown1;
- ULONG Unknown2;
- PVOID Base;
- ULONG Size;
- ULONG Flags;
- USHORT Index;
- /* Length of module name not including the path, this
- field contains valid value only for NTOSKRNL module */
- USHORT NameLength;
- USHORT LoadCount;
- USHORT PathLength;
- CHAR ImageName[256];
-} SYSTEM_MODULE_INFORMATION_ENTRY, *PSYSTEM_MODULE_INFORMATION_ENTRY;
-
-typedef struct _SYSTEM_MODULE_INFORMATION {
- ULONG Count;
- SYSTEM_MODULE_INFORMATION_ENTRY Module[1];
-} SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION;
-
-typedef struct _SYSTEM_LOCK_INFORMATION {
- PVOID Address;
- USHORT Type;
- USHORT Reserved1;
- ULONG ExclusiveOwnerThreadId;
- ULONG ActiveCount;
- ULONG ContentionCount;
- ULONG Reserved2[2];
- ULONG NumberOfSharedWaiters;
- ULONG NumberOfExclusiveWaiters;
-} SYSTEM_LOCK_INFORMATION, *PSYSTEM_LOCK_INFORMATION;
-
-/*SYSTEM_HANDLE_INFORMATION.Flags cosntants */
-#define PROTECT_FROM_CLOSE 0x01
-#define INHERIT 0x02
-
-typedef struct _SYSTEM_HANDLE_INFORMATION {
- ULONG ProcessId;
- UCHAR ObjectTypeNumber;
- UCHAR Flags;
- USHORT Handle;
- PVOID Object;
- ACCESS_MASK GrantedAccess;
-} SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION;
-
-typedef struct _SYSTEM_OBJECT_TYPE_INFORMATION {
- ULONG NextEntryOffset;
- ULONG ObjectCount;
- ULONG HandleCount;
- ULONG TypeNumber;
- ULONG InvalidAttributes;
- GENERIC_MAPPING GenericMapping;
- ACCESS_MASK ValidAccessMask;
- POOL_TYPE PoolType;
- UCHAR Unknown;
- UNICODE_STRING Name;
-} SYSTEM_OBJECT_TYPE_INFORMATION, *PSYSTEM_OBJECT_TYPE_INFORMATION;
-
-/* SYSTEM_OBJECT_INFORMATION.Flags constants */
-#define FLG_SYSOBJINFO_SINGLE_HANDLE_ENTRY 0x40
-#define FLG_SYSOBJINFO_DEFAULT_SECURITY_QUOTA 0x20
-#define FLG_SYSOBJINFO_PERMANENT 0x10
-#define FLG_SYSOBJINFO_EXCLUSIVE 0x08
-#define FLG_SYSOBJINFO_CREATOR_INFO 0x04
-#define FLG_SYSOBJINFO_KERNEL_MODE 0x02
-
-typedef struct _SYSTEM_OBJECT_INFORMATION {
- ULONG NextEntryOffset;
- PVOID Object;
- ULONG CreatorProcessId;
- USHORT Unknown;
- USHORT Flags;
- ULONG PointerCount;
- ULONG HandleCount;
- ULONG PagedPoolUsage;
- ULONG NonPagedPoolUsage;
- ULONG ExclusiveProcessId;
- PSECURITY_DESCRIPTOR SecurityDescriptor;
- UNICODE_STRING Name;
-} SYSTEM_OBJECT_INFORMATION, *PSYSTEM_OBJECT_INFORMATION;
-
-typedef struct _SYSTEM_PAGEFILE_INFORMATION {
- ULONG NextEntryOffset;
- ULONG CurrentSize;
- ULONG TotalUsed;
- ULONG PeakUsed;
- UNICODE_STRING FileName;
-} SYSTEM_PAGEFILE_INFORMATION, *PSYSTEM_PAGEFILE_INFORMATION;
-
-typedef struct _SYSTEM_INSTRUCTION_EMULATION_INFORMATION {
- ULONG SegmentNotPresent;
- ULONG TwoByteOpcode;
- ULONG ESprefix;
- ULONG CSprefix;
- ULONG SSprefix;
- ULONG DSprefix;
- ULONG FSPrefix;
- ULONG GSprefix;
- ULONG OPER32prefix;
- ULONG ADDR32prefix;
- ULONG INSB;
- ULONG INSW;
- ULONG OUTSB;
- ULONG OUTSW;
- ULONG PUSHFD;
- ULONG POPFD;
- ULONG INTnn;
- ULONG INTO;
- ULONG IRETD;
- ULONG INBimm;
- ULONG INWimm;
- ULONG OUTBimm;
- ULONG OUTWimm;
- ULONG INB;
- ULONG INW;
- ULONG OUTB;
- ULONG OUTW;
- ULONG LOCKprefix;
- ULONG REPNEprefix;
- ULONG REPprefix;
- ULONG HLT;
- ULONG CLI;
- ULONG STI;
- ULONG GenericInvalidOpcode;
-} SYSTEM_INSTRUCTION_EMULATION_INFORMATION, *PSYSTEM_INSTRUCTION_EMULATION_INFORMATION;
-
-typedef struct _SYSTEM_POOL_TAG_INFORMATION {
- CHAR Tag[4];
- ULONG PagedPoolAllocs;
- ULONG PagedPoolFrees;
- ULONG PagedPoolUsage;
- ULONG NonPagedPoolAllocs;
- ULONG NonPagedPoolFrees;
- ULONG NonPagedPoolUsage;
-} SYSTEM_POOL_TAG_INFORMATION, *PSYSTEM_POOL_TAG_INFORMATION;
-
-typedef struct _SYSTEM_PROCESSOR_STATISTICS {
- ULONG ContextSwitches;
- ULONG DpcCount;
- ULONG DpcRequestRate;
- ULONG TimeIncrement;
- ULONG DpcBypassCount;
- ULONG ApcBypassCount;
-} SYSTEM_PROCESSOR_STATISTICS, *PSYSTEM_PROCESSOR_STATISTICS;
-
-typedef struct _SYSTEM_DPC_INFORMATION {
- ULONG Reserved;
- ULONG MaximumDpcQueueDepth;
- ULONG MinimumDpcRate;
- ULONG AdjustDpcThreshold;
- ULONG IdealDpcRate;
-} SYSTEM_DPC_INFORMATION, *PSYSTEM_DPC_INFORMATION;
-
-typedef struct _SYSTEM_LOAD_IMAGE {
- UNICODE_STRING ModuleName;
- PVOID ModuleBase;
- PVOID SectionPointer;
- PVOID EntryPoint;
- PVOID ExportDirectory;
-} SYSTEM_LOAD_IMAGE, *PSYSTEM_LOAD_IMAGE;
-
-typedef struct _SYSTEM_UNLOAD_IMAGE {
- PVOID ModuleBase;
-} SYSTEM_UNLOAD_IMAGE, *PSYSTEM_UNLOAD_IMAGE;
-
-typedef struct _SYSTEM_QUERY_TIME_ADJUSTMENT {
- ULONG TimeAdjustment;
- ULONG MaximumIncrement;
- BOOLEAN TimeSynchronization;
-} SYSTEM_QUERY_TIME_ADJUSTMENT, *PSYSTEM_QUERY_TIME_ADJUSTMENT;
-
-typedef struct _SYSTEM_SET_TIME_ADJUSTMENT {
- ULONG TimeAdjustment;
- BOOLEAN TimeSynchronization;
-} SYSTEM_SET_TIME_ADJUSTMENT, *PSYSTEM_SET_TIME_ADJUSTMENT;
-
-typedef struct _SYSTEM_CRASH_DUMP_INFORMATION {
- HANDLE CrashDumpSectionHandle;
- HANDLE Unknown;
-} SYSTEM_CRASH_DUMP_INFORMATION, *PSYSTEM_CRASH_DUMP_INFORMATION;
-
-typedef struct _SYSTEM_EXCEPTION_INFORMATION {
- ULONG AlignmentFixupCount;
- ULONG ExceptionDispatchCount;
- ULONG FloatingEmulationCount;
- ULONG Reserved;
-} SYSTEM_EXCEPTION_INFORMATION, *PSYSTEM_EXCEPTION_INFORMATION;
-
-typedef struct _SYSTEM_CRASH_DUMP_STATE_INFORMATION {
- ULONG CrashDumpSectionExists;
- ULONG Unknown;
-} SYSTEM_CRASH_DUMP_STATE_INFORMATION, *PSYSTEM_CRASH_DUMP_STATE_INFORMATION;
-
-typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION {
- BOOLEAN DebuggerEnabled;
- BOOLEAN DebuggerNotPresent;
-} SYSTEM_KERNEL_DEBUGGER_INFORMATION, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION;
-
-typedef struct _SYSTEM_CONTEXT_SWITCH_INFORMATION {
- ULONG ContextSwitches;
- ULONG ContextSwitchCounters[11];
-} SYSTEM_CONTEXT_SWITCH_INFORMATION, *PSYSTEM_CONTEXT_SWITCH_INFORMATION;
-
-typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION {
- ULONG RegistryQuota;
- ULONG RegistryQuotaInUse;
- ULONG PagedPoolSize;
-} SYSTEM_REGISTRY_QUOTA_INFORMATION, *PSYSTEM_REGISTRY_QUOTA_INFORMATION;
-
-typedef struct _SYSTEM_LOAD_AND_CALL_IMAGE {
- UNICODE_STRING ModuleName;
-} SYSTEM_LOAD_AND_CALL_IMAGE, *PSYSTEM_LOAD_AND_CALL_IMAGE;
-
-typedef struct _SYSTEM_PRIORITY_SEPARATION {
- ULONG PrioritySeparation;
-} SYSTEM_PRIORITY_SEPARATION, *PSYSTEM_PRIORITY_SEPARATION;
-
-typedef struct _SYSTEM_TIME_ZONE_INFORMATION {
- LONG Bias;
- WCHAR StandardName[32];
- LARGE_INTEGER StandardDate;
- LONG StandardBias;
- WCHAR DaylightName[32];
- LARGE_INTEGER DaylightDate;
- LONG DaylightBias;
-} SYSTEM_TIME_ZONE_INFORMATION, *PSYSTEM_TIME_ZONE_INFORMATION;
-
-typedef struct _SYSTEM_LOOKASIDE_INFORMATION {
- USHORT Depth;
- USHORT MaximumDepth;
- ULONG TotalAllocates;
- ULONG AllocateMisses;
- ULONG TotalFrees;
- ULONG FreeMisses;
- POOL_TYPE Type;
- ULONG Tag;
- ULONG Size;
-} SYSTEM_LOOKASIDE_INFORMATION, *PSYSTEM_LOOKASIDE_INFORMATION;
-
-typedef struct _SYSTEM_SET_TIME_SLIP_EVENT {
- HANDLE TimeSlipEvent;
-} SYSTEM_SET_TIME_SLIP_EVENT, *PSYSTEM_SET_TIME_SLIP_EVENT;
-
-typedef struct _SYSTEM_CREATE_SESSION {
- ULONG SessionId;
-} SYSTEM_CREATE_SESSION, *PSYSTEM_CREATE_SESSION;
-
-typedef struct _SYSTEM_DELETE_SESSION {
- ULONG SessionId;
-} SYSTEM_DELETE_SESSION, *PSYSTEM_DELETE_SESSION;
-
-typedef struct _SYSTEM_RANGE_START_INFORMATION {
- PVOID SystemRangeStart;
-} SYSTEM_RANGE_START_INFORMATION, *PSYSTEM_RANGE_START_INFORMATION;
-
-typedef struct _SYSTEM_SESSION_PROCESSES_INFORMATION {
- ULONG SessionId;
- ULONG BufferSize;
- PVOID Buffer;
-} SYSTEM_SESSION_PROCESSES_INFORMATION, *PSYSTEM_SESSION_PROCESSES_INFORMATION;
-
-typedef struct _SYSTEM_POOL_BLOCK {
- BOOLEAN Allocated;
- USHORT Unknown;
- ULONG Size;
- CHAR Tag[4];
-} SYSTEM_POOL_BLOCK, *PSYSTEM_POOL_BLOCK;
-
-typedef struct _SYSTEM_POOL_BLOCKS_INFORMATION {
- ULONG PoolSize;
- PVOID PoolBase;
- USHORT Unknown;
- ULONG NumberOfBlocks;
- SYSTEM_POOL_BLOCK PoolBlocks[1];
-} SYSTEM_POOL_BLOCKS_INFORMATION, *PSYSTEM_POOL_BLOCKS_INFORMATION;
-
-typedef struct _SYSTEM_MEMORY_USAGE {
- PVOID Name;
- USHORT Valid;
- USHORT Standby;
- USHORT Modified;
- USHORT PageTables;
-} SYSTEM_MEMORY_USAGE, *PSYSTEM_MEMORY_USAGE;
-
-typedef struct _SYSTEM_MEMORY_USAGE_INFORMATION {
- ULONG Reserved;
- PVOID EndOfData;
- SYSTEM_MEMORY_USAGE MemoryUsage[1];
-} SYSTEM_MEMORY_USAGE_INFORMATION, *PSYSTEM_MEMORY_USAGE_INFORMATION;
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtQuerySystemInformation(
- /*IN*/ SYSTEM_INFORMATION_CLASS SystemInformationClass,
- /*IN OUT*/ PVOID SystemInformation,
- /*IN*/ ULONG SystemInformationLength,
- /*OUT*/ PULONG ReturnLength /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQuerySystemInformation(
- /*IN*/ SYSTEM_INFORMATION_CLASS SystemInformationClass,
- /*IN OUT*/ PVOID SystemInformation,
- /*IN*/ ULONG SystemInformationLength,
- /*OUT*/ PULONG ReturnLength /*OPTIONAL*/);
-
-NTOSAPI
-NTAPI
-NTSTATUS
-NtQueryFullAttributesFile(
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*OUT*/ PFILE_NETWORK_OPEN_INFORMATION FileInformation);
-
-NTOSAPI
-NTAPI
-NTSTATUS
-ZwQueryFullAttributesFile(
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*OUT*/ PFILE_NETWORK_OPEN_INFORMATION FileInformation);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSetSystemInformation(
- /*IN*/ SYSTEM_INFORMATION_CLASS SystemInformationClass,
- /*IN OUT*/ PVOID SystemInformation,
- /*IN*/ ULONG SystemInformationLength);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQuerySystemEnvironmentValue(
- /*IN*/ PUNICODE_STRING Name,
- /*OUT*/ PVOID Value,
- /*IN*/ ULONG ValueLength,
- /*OUT*/ PULONG ReturnLength /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSetSystemEnvironmentValue(
- /*IN*/ PUNICODE_STRING Name,
- /*IN*/ PUNICODE_STRING Value);
-
-typedef enum _SHUTDOWN_ACTION {
- ShutdownNoReboot,
- ShutdownReboot,
- ShutdownPowerOff
-} SHUTDOWN_ACTION;
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtShutdownSystem(
- /*IN*/ SHUTDOWN_ACTION Action);
-
-typedef enum _DEBUG_CONTROL_CODE {
- DebugGetTraceInformation = 1,
- DebugSetInternalBreakpoint,
- DebugSetSpecialCall,
- DebugClearSpecialCalls,
- DebugQuerySpecialCalls,
- DebugDbgBreakPoint,
- DebugMaximum
-} DEBUG_CONTROL_CODE;
-
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSystemDebugControl(
- /*IN*/ DEBUG_CONTROL_CODE ControlCode,
- /*IN*/ PVOID InputBuffer /*OPTIONAL*/,
- /*IN*/ ULONG InputBufferLength,
- /*OUT*/ PVOID OutputBuffer /*OPTIONAL*/,
- /*IN*/ ULONG OutputBufferLength,
- /*OUT*/ PULONG ReturnLength /*OPTIONAL*/);
-
-
-
-/* Objects, Object directories, and symbolic links */
-
-typedef enum _OBJECT_INFORMATION_CLASS {
- ObjectBasicInformation,
- ObjectNameInformation,
- ObjectTypeInformation,
- ObjectAllTypesInformation,
- ObjectHandleInformation
-} OBJECT_INFORMATION_CLASS;
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQueryObject(
- /*IN*/ HANDLE ObjectHandle,
- /*IN*/ OBJECT_INFORMATION_CLASS ObjectInformationClass,
- /*OUT*/ PVOID ObjectInformation,
- /*IN*/ ULONG ObjectInformationLength,
- /*OUT*/ PULONG ReturnLength /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSetInformationObject(
- /*IN*/ HANDLE ObjectHandle,
- /*IN*/ OBJECT_INFORMATION_CLASS ObjectInformationClass,
- /*IN*/ PVOID ObjectInformation,
- /*IN*/ ULONG ObjectInformationLength);
-
-/* OBJECT_BASIC_INFORMATION.Attributes constants */
-/* also in winbase.h */
-#define HANDLE_FLAG_INHERIT 0x01
-#define HANDLE_FLAG_PROTECT_FROM_CLOSE 0x02
-/* end winbase.h */
-#define PERMANENT 0x10
-#define EXCLUSIVE 0x20
-
-typedef struct _OBJECT_BASIC_INFORMATION {
- ULONG Attributes;
- ACCESS_MASK GrantedAccess;
- ULONG HandleCount;
- ULONG PointerCount;
- ULONG PagedPoolUsage;
- ULONG NonPagedPoolUsage;
- ULONG Reserved[3];
- ULONG NameInformationLength;
- ULONG TypeInformationLength;
- ULONG SecurityDescriptorLength;
- LARGE_INTEGER CreateTime;
-} OBJECT_BASIC_INFORMATION, *POBJECT_BASIC_INFORMATION;
-#if 0
-/* FIXME: Enable later */
-typedef struct _OBJECT_TYPE_INFORMATION {
- UNICODE_STRING Name;
- ULONG ObjectCount;
- ULONG HandleCount;
- ULONG Reserved1[4];
- ULONG PeakObjectCount;
- ULONG PeakHandleCount;
- ULONG Reserved2[4];
- ULONG InvalidAttributes;
- GENERIC_MAPPING GenericMapping;
- ULONG ValidAccess;
- UCHAR Unknown;
- BOOLEAN MaintainHandleDatabase;
- POOL_TYPE PoolType;
- ULONG PagedPoolUsage;
- ULONG NonPagedPoolUsage;
-} OBJECT_TYPE_INFORMATION, *POBJECT_TYPE_INFORMATION;
-
-typedef struct _OBJECT_ALL_TYPES_INFORMATION {
- ULONG NumberOfTypes;
- OBJECT_TYPE_INFORMATION TypeInformation;
-} OBJECT_ALL_TYPES_INFORMATION, *POBJECT_ALL_TYPES_INFORMATION;
-#endif
-typedef struct _OBJECT_HANDLE_ATTRIBUTE_INFORMATION {
- BOOLEAN Inherit;
- BOOLEAN ProtectFromClose;
-} OBJECT_HANDLE_ATTRIBUTE_INFORMATION, *POBJECT_HANDLE_ATTRIBUTE_INFORMATION;
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtDuplicateObject(
- /*IN*/ HANDLE SourceProcessHandle,
- /*IN*/ HANDLE SourceHandle,
- /*IN*/ HANDLE TargetProcessHandle,
- /*OUT*/ PHANDLE TargetHandle /*OPTIONAL*/,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ ULONG Attributes,
- /*IN*/ ULONG Options);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwDuplicateObject(
- /*IN*/ HANDLE SourceProcessHandle,
- /*IN*/ HANDLE SourceHandle,
- /*IN*/ HANDLE TargetProcessHandle,
- /*OUT*/ PHANDLE TargetHandle /*OPTIONAL*/,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ ULONG Attributes,
- /*IN*/ ULONG Options);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtQuerySecurityObject(
- /*IN*/ HANDLE Handle,
- /*IN*/ SECURITY_INFORMATION SecurityInformation,
- /*OUT*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN*/ ULONG SecurityDescriptorLength,
- /*OUT*/ PULONG ReturnLength);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQuerySecurityObject(
- /*IN*/ HANDLE Handle,
- /*IN*/ SECURITY_INFORMATION SecurityInformation,
- /*OUT*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN*/ ULONG SecurityDescriptorLength,
- /*OUT*/ PULONG ReturnLength);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtSetSecurityObject(
- /*IN*/ HANDLE Handle,
- /*IN*/ SECURITY_INFORMATION SecurityInformation,
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSetSecurityObject(
- /*IN*/ HANDLE Handle,
- /*IN*/ SECURITY_INFORMATION SecurityInformation,
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwOpenDirectoryObject(
- /*OUT*/ PHANDLE DirectoryHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQueryDirectoryObject(
- /*IN*/ HANDLE DirectoryHandle,
- /*OUT*/ PVOID Buffer,
- /*IN*/ ULONG BufferLength,
- /*IN*/ BOOLEAN ReturnSingleEntry,
- /*IN*/ BOOLEAN RestartScan,
- /*IN OUT*/ PULONG Context,
- /*OUT*/ PULONG ReturnLength /*OPTIONAL*/);
-
-typedef struct _DIRECTORY_BASIC_INFORMATION {
- UNICODE_STRING ObjectName;
- UNICODE_STRING ObjectTypeName;
-} DIRECTORY_BASIC_INFORMATION, *PDIRECTORY_BASIC_INFORMATION;
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwCreateSymbolicLinkObject(
- /*OUT*/ PHANDLE SymbolicLinkHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*IN*/ PUNICODE_STRING TargetName);
-
-
-
-
-/* Virtual memory */
-
-typedef enum _MEMORY_INFORMATION_CLASS {
-MemoryBasicInformation,
-MemoryWorkingSetList,
-MemorySectionName,
-MemoryBasicVlmInformation
-} MEMORY_INFORMATION_CLASS;
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtAllocateVirtualMemory(
- /*IN*/ HANDLE ProcessHandle,
- /*IN OUT*/ PVOID *BaseAddress,
- /*IN*/ ULONG ZeroBits,
- /*IN OUT*/ PULONG AllocationSize,
- /*IN*/ ULONG AllocationType,
- /*IN*/ ULONG Protect);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwAllocateVirtualMemory(
- /*IN*/ HANDLE ProcessHandle,
- /*IN OUT*/ PVOID *BaseAddress,
- /*IN*/ ULONG ZeroBits,
- /*IN OUT*/ PULONG AllocationSize,
- /*IN*/ ULONG AllocationType,
- /*IN*/ ULONG Protect);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtFreeVirtualMemory(
- /*IN*/ HANDLE ProcessHandle,
- /*IN OUT*/ PVOID *BaseAddress,
- /*IN OUT*/ PULONG FreeSize,
- /*IN*/ ULONG FreeType);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwFreeVirtualMemory(
- /*IN*/ HANDLE ProcessHandle,
- /*IN OUT*/ PVOID *BaseAddress,
- /*IN OUT*/ PULONG FreeSize,
- /*IN*/ ULONG FreeType);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQueryVirtualMemory(
- /*IN*/ HANDLE ProcessHandle,
- /*IN*/ PVOID BaseAddress,
- /*IN*/ MEMORY_INFORMATION_CLASS MemoryInformationClass,
- /*OUT*/ PVOID MemoryInformation,
- /*IN*/ ULONG MemoryInformationLength,
- /*OUT*/ PULONG ReturnLength /*OPTIONAL*/);
-
-/* MEMORY_WORKING_SET_LIST.WorkingSetList constants */
-#define WSLE_PAGE_READONLY 0x001
-#define WSLE_PAGE_EXECUTE 0x002
-#define WSLE_PAGE_READWRITE 0x004
-#define WSLE_PAGE_EXECUTE_READ 0x003
-#define WSLE_PAGE_WRITECOPY 0x005
-#define WSLE_PAGE_EXECUTE_READWRITE 0x006
-#define WSLE_PAGE_EXECUTE_WRITECOPY 0x007
-#define WSLE_PAGE_SHARE_COUNT_MASK 0x0E0
-#define WSLE_PAGE_SHAREABLE 0x100
-
-typedef struct _MEMORY_WORKING_SET_LIST {
- ULONG NumberOfPages;
- ULONG WorkingSetList[1];
-} MEMORY_WORKING_SET_LIST, *PMEMORY_WORKING_SET_LIST;
-
-typedef struct _MEMORY_SECTION_NAME {
- UNICODE_STRING SectionFileName;
-} MEMORY_SECTION_NAME, *PMEMORY_SECTION_NAME;
-
-/* Zw[Lock|Unlock]VirtualMemory.LockType constants */
-#define LOCK_VM_IN_WSL 0x01
-#define LOCK_VM_IN_RAM 0x02
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwLockVirtualMemory(
- /*IN*/ HANDLE ProcessHandle,
- /*IN OUT*/ PVOID *BaseAddress,
- /*IN OUT*/ PULONG LockSize,
- /*IN*/ ULONG LockType);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwUnlockVirtualMemory(
- /*IN*/ HANDLE ProcessHandle,
- /*IN OUT*/ PVOID *BaseAddress,
- /*IN OUT*/ PULONG LockSize,
- /*IN*/ ULONG LockType);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwReadVirtualMemory(
- /*IN*/ HANDLE ProcessHandle,
- /*IN*/ PVOID BaseAddress,
- /*OUT*/ PVOID Buffer,
- /*IN*/ ULONG BufferLength,
- /*OUT*/ PULONG ReturnLength /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwWriteVirtualMemory(
- /*IN*/ HANDLE ProcessHandle,
- /*IN*/ PVOID BaseAddress,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG BufferLength,
- /*OUT*/ PULONG ReturnLength /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwProtectVirtualMemory(
- /*IN*/ HANDLE ProcessHandle,
- /*IN OUT*/ PVOID *BaseAddress,
- /*IN OUT*/ PULONG ProtectSize,
- /*IN*/ ULONG NewProtect,
- /*OUT*/ PULONG OldProtect);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwFlushVirtualMemory(
- /*IN*/ HANDLE ProcessHandle,
- /*IN OUT*/ PVOID *BaseAddress,
- /*IN OUT*/ PULONG FlushSize,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwAllocateUserPhysicalPages(
- /*IN*/ HANDLE ProcessHandle,
- /*IN*/ PULONG NumberOfPages,
- /*OUT*/ PULONG PageFrameNumbers);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwFreeUserPhysicalPages(
- /*IN*/ HANDLE ProcessHandle,
- /*IN OUT*/ PULONG NumberOfPages,
- /*IN*/ PULONG PageFrameNumbers);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwMapUserPhysicalPages(
- /*IN*/ PVOID BaseAddress,
- /*IN*/ PULONG NumberOfPages,
- /*IN*/ PULONG PageFrameNumbers);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwMapUserPhysicalPagesScatter(
- /*IN*/ PVOID *BaseAddresses,
- /*IN*/ PULONG NumberOfPages,
- /*IN*/ PULONG PageFrameNumbers);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwGetWriteWatch(
- /*IN*/ HANDLE ProcessHandle,
- /*IN*/ ULONG Flags,
- /*IN*/ PVOID BaseAddress,
- /*IN*/ ULONG RegionSize,
- /*OUT*/ PULONG Buffer,
- /*IN OUT*/ PULONG BufferEntries,
- /*OUT*/ PULONG Granularity);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwResetWriteWatch(
- /*IN*/ HANDLE ProcessHandle,
- /*IN*/ PVOID BaseAddress,
- /*IN*/ ULONG RegionSize);
-
-
-
-
-/* Sections */
-
-typedef enum _SECTION_INFORMATION_CLASS {
- SectionBasicInformation,
- SectionImageInformation
-} SECTION_INFORMATION_CLASS;
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtCreateSection(
- /*OUT*/ PHANDLE SectionHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*IN*/ PLARGE_INTEGER SectionSize /*OPTIONAL*/,
- /*IN*/ ULONG Protect,
- /*IN*/ ULONG Attributes,
- /*IN*/ HANDLE FileHandle);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwCreateSection(
- /*OUT*/ PHANDLE SectionHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*IN*/ PLARGE_INTEGER SectionSize /*OPTIONAL*/,
- /*IN*/ ULONG Protect,
- /*IN*/ ULONG Attributes,
- /*IN*/ HANDLE FileHandle);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQuerySection(
- /*IN*/ HANDLE SectionHandle,
- /*IN*/ SECTION_INFORMATION_CLASS SectionInformationClass,
- /*OUT*/ PVOID SectionInformation,
- /*IN*/ ULONG SectionInformationLength,
- /*OUT*/ PULONG ResultLength /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwExtendSection(
- /*IN*/ HANDLE SectionHandle,
- /*IN*/ PLARGE_INTEGER SectionSize);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwAreMappedFilesTheSame(
- /*IN*/ PVOID Address1,
- /*IN*/ PVOID Address2);
-
-
-
-
-/* Threads */
-
-typedef struct _USER_STACK {
- PVOID FixedStackBase;
- PVOID FixedStackLimit;
- PVOID ExpandableStackBase;
- PVOID ExpandableStackLimit;
- PVOID ExpandableStackBottom;
-} USER_STACK, *PUSER_STACK;
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwCreateThread(
- /*OUT*/ PHANDLE ThreadHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*IN*/ HANDLE ProcessHandle,
- /*OUT*/ PCLIENT_ID ClientId,
- /*IN*/ PCONTEXT ThreadContext,
- /*IN*/ PUSER_STACK UserStack,
- /*IN*/ BOOLEAN CreateSuspended);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtOpenThread(
- /*OUT*/ PHANDLE ThreadHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*IN*/ PCLIENT_ID ClientId);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwOpenThread(
- /*OUT*/ PHANDLE ThreadHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*IN*/ PCLIENT_ID ClientId);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwTerminateThread(
- /*IN*/ HANDLE ThreadHandle /*OPTIONAL*/,
- /*IN*/ NTSTATUS ExitStatus);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtQueryInformationThread(
- /*IN*/ HANDLE ThreadHandle,
- /*IN*/ THREADINFOCLASS ThreadInformationClass,
- /*OUT*/ PVOID ThreadInformation,
- /*IN*/ ULONG ThreadInformationLength,
- /*OUT*/ PULONG ReturnLength /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQueryInformationThread(
- /*IN*/ HANDLE ThreadHandle,
- /*IN*/ THREADINFOCLASS ThreadInformationClass,
- /*OUT*/ PVOID ThreadInformation,
- /*IN*/ ULONG ThreadInformationLength,
- /*OUT*/ PULONG ReturnLength /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtSetInformationThread(
- /*IN*/ HANDLE ThreadHandle,
- /*IN*/ THREADINFOCLASS ThreadInformationClass,
- /*IN*/ PVOID ThreadInformation,
- /*IN*/ ULONG ThreadInformationLength);
-
-typedef struct _THREAD_BASIC_INFORMATION {
- NTSTATUS ExitStatus;
- PNT_TIB TebBaseAddress;
- CLIENT_ID ClientId;
- KAFFINITY AffinityMask;
- KPRIORITY Priority;
- KPRIORITY BasePriority;
-} THREAD_BASIC_INFORMATION, *PTHREAD_BASIC_INFORMATION;
-
-typedef struct _KERNEL_USER_TIMES {
- LARGE_INTEGER CreateTime;
- LARGE_INTEGER ExitTime;
- LARGE_INTEGER KernelTime;
- LARGE_INTEGER UserTime;
-} KERNEL_USER_TIMES, *PKERNEL_USER_TIMES;
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSuspendThread(
- /*IN*/ HANDLE ThreadHandle,
- /*OUT*/ PULONG PreviousSuspendCount /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwResumeThread(
- /*IN*/ HANDLE ThreadHandle,
- /*OUT*/ PULONG PreviousSuspendCount /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwGetContextThread(
- /*IN*/ HANDLE ThreadHandle,
- /*OUT*/ PCONTEXT Context);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSetContextThread(
- /*IN*/ HANDLE ThreadHandle,
- /*IN*/ PCONTEXT Context);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQueueApcThread(
- /*IN*/ HANDLE ThreadHandle,
- /*IN*/ PKNORMAL_ROUTINE ApcRoutine,
- /*IN*/ PVOID ApcContext /*OPTIONAL*/,
- /*IN*/ PVOID Argument1 /*OPTIONAL*/,
- /*IN*/ PVOID Argument2 /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwTestAlert(
- VOID);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwAlertThread(
- /*IN*/ HANDLE ThreadHandle);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwAlertResumeThread(
- /*IN*/ HANDLE ThreadHandle,
- /*OUT*/ PULONG PreviousSuspendCount /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwRegisterThreadTerminatePort(
- /*IN*/ HANDLE PortHandle);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwImpersonateThread(
- /*IN*/ HANDLE ThreadHandle,
- /*IN*/ HANDLE TargetThreadHandle,
- /*IN*/ PSECURITY_QUALITY_OF_SERVICE SecurityQos);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwImpersonateAnonymousToken(
- /*IN*/ HANDLE ThreadHandle);
-
-
-
-
-/* Processes */
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwCreateProcess(
- /*OUT*/ PHANDLE ProcessHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*IN*/ HANDLE InheritFromProcessHandle,
- /*IN*/ BOOLEAN InheritHandles,
- /*IN*/ HANDLE SectionHandle /*OPTIONAL*/,
- /*IN*/ HANDLE DebugPort /*OPTIONAL*/,
- /*IN*/ HANDLE ExceptionPort /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwCreateProcess(
- /*OUT*/ PHANDLE ProcessHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*IN*/ HANDLE InheritFromProcessHandle,
- /*IN*/ BOOLEAN InheritHandles,
- /*IN*/ HANDLE SectionHandle /*OPTIONAL*/,
- /*IN*/ HANDLE DebugPort /*OPTIONAL*/,
- /*IN*/ HANDLE ExceptionPort /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwTerminateProcess(
- /*IN*/ HANDLE ProcessHandle /*OPTIONAL*/,
- /*IN*/ NTSTATUS ExitStatus);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQueryInformationProcess(
- /*IN*/ HANDLE ProcessHandle,
- /*IN*/ PROCESSINFOCLASS ProcessInformationClass,
- /*OUT*/ PVOID ProcessInformation,
- /*IN*/ ULONG ProcessInformationLength,
- /*OUT*/ PULONG ReturnLength /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtSetInformationProcess(
- /*IN*/ HANDLE ProcessHandle,
- /*IN*/ PROCESSINFOCLASS ProcessInformationClass,
- /*IN*/ PVOID ProcessInformation,
- /*IN*/ ULONG ProcessInformationLength);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSetInformationProcess(
- /*IN*/ HANDLE ProcessHandle,
- /*IN*/ PROCESSINFOCLASS ProcessInformationClass,
- /*IN*/ PVOID ProcessInformation,
- /*IN*/ ULONG ProcessInformationLength);
-
-typedef struct _PROCESS_BASIC_INFORMATION {
- NTSTATUS ExitStatus;
- PPEB PebBaseAddress;
- KAFFINITY AffinityMask;
- KPRIORITY BasePriority;
- ULONG UniqueProcessId;
- ULONG InheritedFromUniqueProcessId;
-} PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION;
-
-typedef struct _PROCESS_ACCESS_TOKEN {
- HANDLE Token;
- HANDLE Thread;
-} PROCESS_ACCESS_TOKEN, *PPROCESS_ACCESS_TOKEN;
-
-/* DefaultHardErrorMode constants */
-/* also in winbase.h */
-#define SEM_FAILCRITICALERRORS 0x0001
-#define SEM_NOGPFAULTERRORBOX 0x0002
-#define SEM_NOALIGNMENTFAULTEXCEPT 0x0004
-#define SEM_NOOPENFILEERRORBOX 0x8000
-/* end winbase.h */
-typedef struct _POOLED_USAGE_AND_LIMITS {
- ULONG PeakPagedPoolUsage;
- ULONG PagedPoolUsage;
- ULONG PagedPoolLimit;
- ULONG PeakNonPagedPoolUsage;
- ULONG NonPagedPoolUsage;
- ULONG NonPagedPoolLimit;
- ULONG PeakPagefileUsage;
- ULONG PagefileUsage;
- ULONG PagefileLimit;
-} POOLED_USAGE_AND_LIMITS, *PPOOLED_USAGE_AND_LIMITS;
-
-typedef struct _PROCESS_WS_WATCH_INFORMATION {
- PVOID FaultingPc;
- PVOID FaultingVa;
-} PROCESS_WS_WATCH_INFORMATION, *PPROCESS_WS_WATCH_INFORMATION;
-
-/* PROCESS_PRIORITY_CLASS.PriorityClass constants */
-#define PC_IDLE 1
-#define PC_NORMAL 2
-#define PC_HIGH 3
-#define PC_REALTIME 4
-#define PC_BELOW_NORMAL 5
-#define PC_ABOVE_NORMAL 6
-
-typedef struct _PROCESS_PRIORITY_CLASS {
- BOOLEAN Foreground;
- UCHAR PriorityClass;
-} PROCESS_PRIORITY_CLASS, *PPROCESS_PRIORITY_CLASS;
-
-/* PROCESS_DEVICEMAP_INFORMATION.DriveType constants */
-#define DRIVE_UNKNOWN 0
-#define DRIVE_NO_ROOT_DIR 1
-#define DRIVE_REMOVABLE 2
-#define DRIVE_FIXED 3
-#define DRIVE_REMOTE 4
-#define DRIVE_CDROM 5
-#define DRIVE_RAMDISK 6
-
-typedef struct _PROCESS_DEVICEMAP_INFORMATION {
- _ANONYMOUS_UNION union {
- struct {
- HANDLE DirectoryHandle;
- } Set;
- struct {
- ULONG DriveMap;
- UCHAR DriveType[32];
- } Query;
- } DUMMYUNIONNAME;
-} PROCESS_DEVICEMAP_INFORMATION, *PPROCESS_DEVICEMAP_INFORMATION;
-
-typedef struct _PROCESS_SESSION_INFORMATION {
- ULONG SessionId;
-} PROCESS_SESSION_INFORMATION, *PPROCESS_SESSION_INFORMATION;
-
-typedef struct _RTL_USER_PROCESS_PARAMETERS {
- ULONG AllocationSize;
- ULONG Size;
- ULONG Flags;
- ULONG DebugFlags;
- HANDLE hConsole;
- ULONG ProcessGroup;
- HANDLE hStdInput;
- HANDLE hStdOutput;
- HANDLE hStdError;
- UNICODE_STRING CurrentDirectoryName;
- HANDLE CurrentDirectoryHandle;
- UNICODE_STRING DllPath;
- UNICODE_STRING ImagePathName;
- UNICODE_STRING CommandLine;
- PWSTR Environment;
- ULONG dwX;
- ULONG dwY;
- ULONG dwXSize;
- ULONG dwYSize;
- ULONG dwXCountChars;
- ULONG dwYCountChars;
- ULONG dwFillAttribute;
- ULONG dwFlags;
- ULONG wShowWindow;
- UNICODE_STRING WindowTitle;
- UNICODE_STRING DesktopInfo;
- UNICODE_STRING ShellInfo;
- UNICODE_STRING RuntimeInfo;
-} RTL_USER_PROCESS_PARAMETERS, *PRTL_USER_PROCESS_PARAMETERS;
-
-NTSTATUS
-NTAPI
-RtlCreateProcessParameters(
- /*OUT*/ PRTL_USER_PROCESS_PARAMETERS *ProcessParameters,
- /*IN*/ PUNICODE_STRING ImageFile,
- /*IN*/ PUNICODE_STRING DllPath /*OPTIONAL*/,
- /*IN*/ PUNICODE_STRING CurrentDirectory /*OPTIONAL*/,
- /*IN*/ PUNICODE_STRING CommandLine /*OPTIONAL*/,
- /*IN*/ PWSTR Environment /*OPTIONAL*/,
- /*IN*/ PUNICODE_STRING WindowTitle /*OPTIONAL*/,
- /*IN*/ PUNICODE_STRING DesktopInfo /*OPTIONAL*/,
- /*IN*/ PUNICODE_STRING ShellInfo /*OPTIONAL*/,
- /*IN*/ PUNICODE_STRING RuntimeInfo /*OPTIONAL*/);
-
-NTSTATUS
-NTAPI
-RtlDestroyProcessParameters(
- /*IN*/ PRTL_USER_PROCESS_PARAMETERS ProcessParameters);
-
-typedef struct _DEBUG_BUFFER {
- HANDLE SectionHandle;
- PVOID SectionBase;
- PVOID RemoteSectionBase;
- ULONG SectionBaseDelta;
- HANDLE EventPairHandle;
- ULONG Unknown[2];
- HANDLE RemoteThreadHandle;
- ULONG InfoClassMask;
- ULONG SizeOfInfo;
- ULONG AllocatedSize;
- ULONG SectionSize;
- PVOID ModuleInformation;
- PVOID BackTraceInformation;
- PVOID HeapInformation;
- PVOID LockInformation;
- PVOID Reserved[8];
-} DEBUG_BUFFER, *PDEBUG_BUFFER;
-
-PDEBUG_BUFFER
-NTAPI
-RtlCreateQueryDebugBuffer(
- /*IN*/ ULONG Size,
- /*IN*/ BOOLEAN EventPair);
-
-/* RtlQueryProcessDebugInformation.DebugInfoClassMask constants */
-#define PDI_MODULES 0x01
-#define PDI_BACKTRACE 0x02
-#define PDI_HEAPS 0x04
-#define PDI_HEAP_TAGS 0x08
-#define PDI_HEAP_BLOCKS 0x10
-#define PDI_LOCKS 0x20
-
-NTSTATUS
-NTAPI
-RtlQueryProcessDebugInformation(
- /*IN*/ ULONG ProcessId,
- /*IN*/ ULONG DebugInfoClassMask,
- /*IN OUT*/ PDEBUG_BUFFER DebugBuffer);
-
-NTSTATUS
-NTAPI
-RtlDestroyQueryDebugBuffer(
- /*IN*/ PDEBUG_BUFFER DebugBuffer);
-
-/* DEBUG_MODULE_INFORMATION.Flags constants */
-#define LDRP_STATIC_LINK 0x00000002
-#define LDRP_IMAGE_DLL 0x00000004
-#define LDRP_LOAD_IN_PROGRESS 0x00001000
-#define LDRP_UNLOAD_IN_PROGRESS 0x00002000
-#define LDRP_ENTRY_PROCESSED 0x00004000
-#define LDRP_ENTRY_INSERTED 0x00008000
-#define LDRP_CURRENT_LOAD 0x00010000
-#define LDRP_FAILED_BUILTIN_LOAD 0x00020000
-#define LDRP_DONT_CALL_FOR_THREADS 0x00040000
-#define LDRP_PROCESS_ATTACH_CALLED 0x00080000
-#define LDRP_DEBUG_SYMBOLS_LOADED 0x00100000
-#define LDRP_IMAGE_NOT_AT_BASE 0x00200000
-#define LDRP_WX86_IGNORE_MACHINETYPE 0x00400000
-
-typedef struct _DEBUG_MODULE_INFORMATION {
- ULONG Reserved[2];
- ULONG Base;
- ULONG Size;
- ULONG Flags;
- USHORT Index;
- USHORT Unknown;
- USHORT LoadCount;
- USHORT ModuleNameOffset;
- CHAR ImageName[256];
-} DEBUG_MODULE_INFORMATION, *PDEBUG_MODULE_INFORMATION;
-
-typedef struct _DEBUG_HEAP_INFORMATION {
- ULONG Base;
- ULONG Flags;
- USHORT Granularity;
- USHORT Unknown;
- ULONG Allocated;
- ULONG Committed;
- ULONG TagCount;
- ULONG BlockCount;
- ULONG Reserved[7];
- PVOID Tags;
- PVOID Blocks;
-} DEBUG_HEAP_INFORMATION, *PDEBUG_HEAP_INFORMATION;
-
-typedef struct _DEBUG_LOCK_INFORMATION {
- PVOID Address;
- USHORT Type;
- USHORT CreatorBackTraceIndex;
- ULONG OwnerThreadId;
- ULONG ActiveCount;
- ULONG ContentionCount;
- ULONG EntryCount;
- ULONG RecursionCount;
- ULONG NumberOfSharedWaiters;
- ULONG NumberOfExclusiveWaiters;
-} DEBUG_LOCK_INFORMATION, *PDEBUG_LOCK_INFORMATION;
-
-
-
-/* Jobs */
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwCreateJobObject(
- /*OUT*/ PHANDLE JobHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwOpenJobObject(
- /*OUT*/ PHANDLE JobHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwTerminateJobObject(
- /*IN*/ HANDLE JobHandle,
- /*IN*/ NTSTATUS ExitStatus);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwAssignProcessToJobObject(
- /*IN*/ HANDLE JobHandle,
- /*IN*/ HANDLE ProcessHandle);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQueryInformationJobObject(
- /*IN*/ HANDLE JobHandle,
- /*IN*/ JOBOBJECTINFOCLASS JobInformationClass,
- /*OUT*/ PVOID JobInformation,
- /*IN*/ ULONG JobInformationLength,
- /*OUT*/ PULONG ReturnLength /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSetInformationJobObject(
- /*IN*/ HANDLE JobHandle,
- /*IN*/ JOBOBJECTINFOCLASS JobInformationClass,
- /*IN*/ PVOID JobInformation,
- /*IN*/ ULONG JobInformationLength);
-
-
-/* Tokens */
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwCreateToken(
- /*OUT*/ PHANDLE TokenHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*IN*/ TOKEN_TYPE Type,
- /*IN*/ PLUID AuthenticationId,
- /*IN*/ PLARGE_INTEGER ExpirationTime,
- /*IN*/ PTOKEN_USER User,
- /*IN*/ PTOKEN_GROUPS Groups,
- /*IN*/ PTOKEN_PRIVILEGES Privileges,
- /*IN*/ PTOKEN_OWNER Owner,
- /*IN*/ PTOKEN_PRIMARY_GROUP PrimaryGroup,
- /*IN*/ PTOKEN_DEFAULT_DACL DefaultDacl,
- /*IN*/ PTOKEN_SOURCE Source
-);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtOpenProcessToken(
- /*IN*/ HANDLE ProcessHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*OUT*/ PHANDLE TokenHandle);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwOpenProcessToken(
- /*IN*/ HANDLE ProcessHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*OUT*/ PHANDLE TokenHandle);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtOpenThreadToken(
- /*IN*/ HANDLE ThreadHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ BOOLEAN OpenAsSelf,
- /*OUT*/ PHANDLE TokenHandle);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwOpenThreadToken(
- /*IN*/ HANDLE ThreadHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ BOOLEAN OpenAsSelf,
- /*OUT*/ PHANDLE TokenHandle);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtDuplicateToken(
- /*IN*/ HANDLE ExistingTokenHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*IN*/ BOOLEAN EffectiveOnly,
- /*IN*/ TOKEN_TYPE TokenType,
- /*OUT*/ PHANDLE NewTokenHandle);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwDuplicateToken(
- /*IN*/ HANDLE ExistingTokenHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*IN*/ BOOLEAN EffectiveOnly,
- /*IN*/ TOKEN_TYPE TokenType,
- /*OUT*/ PHANDLE NewTokenHandle);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwFilterToken(
- /*IN*/ HANDLE ExistingTokenHandle,
- /*IN*/ ULONG Flags,
- /*IN*/ PTOKEN_GROUPS SidsToDisable,
- /*IN*/ PTOKEN_PRIVILEGES PrivilegesToDelete,
- /*IN*/ PTOKEN_GROUPS SidsToRestricted,
- /*OUT*/ PHANDLE NewTokenHandle);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtAdjustPrivilegesToken(
- /*IN*/ HANDLE TokenHandle,
- /*IN*/ BOOLEAN DisableAllPrivileges,
- /*IN*/ PTOKEN_PRIVILEGES NewState,
- /*IN*/ ULONG BufferLength,
- /*OUT*/ PTOKEN_PRIVILEGES PreviousState /*OPTIONAL*/,
- /*OUT*/ PULONG ReturnLength);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwAdjustPrivilegesToken(
- /*IN*/ HANDLE TokenHandle,
- /*IN*/ BOOLEAN DisableAllPrivileges,
- /*IN*/ PTOKEN_PRIVILEGES NewState,
- /*IN*/ ULONG BufferLength,
- /*OUT*/ PTOKEN_PRIVILEGES PreviousState /*OPTIONAL*/,
- /*OUT*/ PULONG ReturnLength);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwAdjustGroupsToken(
- /*IN*/ HANDLE TokenHandle,
- /*IN*/ BOOLEAN ResetToDefault,
- /*IN*/ PTOKEN_GROUPS NewState,
- /*IN*/ ULONG BufferLength,
- /*OUT*/ PTOKEN_GROUPS PreviousState /*OPTIONAL*/,
- /*OUT*/ PULONG ReturnLength);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtQueryInformationToken(
- /*IN*/ HANDLE TokenHandle,
- /*IN*/ TOKEN_INFORMATION_CLASS TokenInformationClass,
- /*OUT*/ PVOID TokenInformation,
- /*IN*/ ULONG TokenInformationLength,
- /*OUT*/ PULONG ReturnLength);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQueryInformationToken(
- /*IN*/ HANDLE TokenHandle,
- /*IN*/ TOKEN_INFORMATION_CLASS TokenInformationClass,
- /*OUT*/ PVOID TokenInformation,
- /*IN*/ ULONG TokenInformationLength,
- /*OUT*/ PULONG ReturnLength);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSetInformationToken(
- /*IN*/ HANDLE TokenHandle,
- /*IN*/ TOKEN_INFORMATION_CLASS TokenInformationClass,
- /*IN*/ PVOID TokenInformation,
- /*IN*/ ULONG TokenInformationLength);
-
-
-
-
-/* Time */
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQuerySystemTime(
- /*OUT*/ PLARGE_INTEGER CurrentTime);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSetSystemTime(
- /*IN*/ PLARGE_INTEGER NewTime,
- /*OUT*/ PLARGE_INTEGER OldTime /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQueryPerformanceCounter(
- /*OUT*/ PLARGE_INTEGER PerformanceCount,
- /*OUT*/ PLARGE_INTEGER PerformanceFrequency /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQueryPerformanceCounter(
- /*OUT*/ PLARGE_INTEGER PerformanceCount,
- /*OUT*/ PLARGE_INTEGER PerformanceFrequency /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQueryTimerResolution(
- /*OUT*/ PULONG CoarsestResolution,
- /*OUT*/ PULONG FinestResolution,
- /*OUT*/ PULONG ActualResolution);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwDelayExecution(
- /*IN*/ BOOLEAN Alertable,
- /*IN*/ PLARGE_INTEGER Interval);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwYieldExecution(
- VOID);
-
-NTOSAPI
-ULONG
-NTAPI
-ZwGetTickCount(
- VOID);
-
-
-
-
-/* Execution profiling */
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwCreateProfile(
- /*OUT*/ PHANDLE ProfileHandle,
- /*IN*/ HANDLE ProcessHandle,
- /*IN*/ PVOID Base,
- /*IN*/ ULONG Size,
- /*IN*/ ULONG BucketShift,
- /*IN*/ PULONG Buffer,
- /*IN*/ ULONG BufferLength,
- /*IN*/ KPROFILE_SOURCE Source,
- /*IN*/ ULONG ProcessorMask);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSetIntervalProfile(
- /*IN*/ ULONG Interval,
- /*IN*/ KPROFILE_SOURCE Source);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQueryIntervalProfile(
- /*IN*/ KPROFILE_SOURCE Source,
- /*OUT*/ PULONG Interval);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwStartProfile(
- /*IN*/ HANDLE ProfileHandle);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwStopProfile(
- /*IN*/ HANDLE ProfileHandle);
-
-/* Local Procedure Call (LPC) */
-
-typedef struct _LPC_MESSAGE {
- USHORT DataSize;
- USHORT MessageSize;
- USHORT MessageType;
- USHORT VirtualRangesOffset;
- CLIENT_ID ClientId;
- ULONG MessageId;
- ULONG SectionSize;
- UCHAR Data[ANYSIZE_ARRAY];
-} LPC_MESSAGE, *PLPC_MESSAGE;
-
-#define LPC_MESSAGE_BASE_SIZE 24
-
-typedef enum _LPC_TYPE {
- LPC_NEW_MESSAGE,
- LPC_REQUEST,
- LPC_REPLY,
- LPC_DATAGRAM,
- LPC_LOST_REPLY,
- LPC_PORT_CLOSED,
- LPC_CLIENT_DIED,
- LPC_EXCEPTION,
- LPC_DEBUG_EVENT,
- LPC_ERROR_EVENT,
- LPC_CONNECTION_REQUEST,
- LPC_CONNECTION_REFUSED,
- LPC_MAXIMUM
-} LPC_TYPE;
-
-typedef struct _LPC_SECTION_WRITE {
- ULONG Length;
- HANDLE SectionHandle;
- ULONG SectionOffset;
- ULONG ViewSize;
- PVOID ViewBase;
- PVOID TargetViewBase;
-} LPC_SECTION_WRITE, *PLPC_SECTION_WRITE;
-
-typedef struct _LPC_SECTION_READ {
- ULONG Length;
- ULONG ViewSize;
- PVOID ViewBase;
-} LPC_SECTION_READ, *PLPC_SECTION_READ;
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwCreatePort(
- /*OUT*/ PHANDLE PortHandle,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*IN*/ ULONG MaxDataSize,
- /*IN*/ ULONG MaxMessageSize,
- /*IN*/ ULONG Reserved);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwCreateWaitablePort(
- /*OUT*/ PHANDLE PortHandle,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*IN*/ ULONG MaxDataSize,
- /*IN*/ ULONG MaxMessageSize,
- /*IN*/ ULONG Reserved);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtConnectPort(
- /*OUT*/ PHANDLE PortHandle,
- /*IN*/ PUNICODE_STRING PortName,
- /*IN*/ PSECURITY_QUALITY_OF_SERVICE SecurityQos,
- /*IN OUT*/ PLPC_SECTION_WRITE WriteSection /*OPTIONAL*/,
- /*IN OUT*/ PLPC_SECTION_READ ReadSection /*OPTIONAL*/,
- /*OUT*/ PULONG MaxMessageSize /*OPTIONAL*/,
- /*IN OUT*/ PVOID ConnectData /*OPTIONAL*/,
- /*IN OUT*/ PULONG ConnectDataLength /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwConnectPort(
- /*OUT*/ PHANDLE PortHandle,
- /*IN*/ PUNICODE_STRING PortName,
- /*IN*/ PSECURITY_QUALITY_OF_SERVICE SecurityQos,
- /*IN OUT*/ PLPC_SECTION_WRITE WriteSection /*OPTIONAL*/,
- /*IN OUT*/ PLPC_SECTION_READ ReadSection /*OPTIONAL*/,
- /*OUT*/ PULONG MaxMessageSize /*OPTIONAL*/,
- /*IN OUT*/ PVOID ConnectData /*OPTIONAL*/,
- /*IN OUT*/ PULONG ConnectDataLength /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwConnectPort(
- /*OUT*/ PHANDLE PortHandle,
- /*IN*/ PUNICODE_STRING PortName,
- /*IN*/ PSECURITY_QUALITY_OF_SERVICE SecurityQos,
- /*IN OUT*/ PLPC_SECTION_WRITE WriteSection /*OPTIONAL*/,
- /*IN OUT*/ PLPC_SECTION_READ ReadSection /*OPTIONAL*/,
- /*OUT*/ PULONG MaxMessageSize /*OPTIONAL*/,
- /*IN OUT*/ PVOID ConnectData /*OPTIONAL*/,
- /*IN OUT*/ PULONG ConnectDataLength /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwListenPort(
- /*IN*/ HANDLE PortHandle,
- /*OUT*/ PLPC_MESSAGE Message);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwAcceptConnectPort(
- /*OUT*/ PHANDLE PortHandle,
- /*IN*/ ULONG PortIdentifier,
- /*IN*/ PLPC_MESSAGE Message,
- /*IN*/ BOOLEAN Accept,
- /*IN OUT*/ PLPC_SECTION_WRITE WriteSection /*OPTIONAL*/,
- /*IN OUT*/ PLPC_SECTION_READ ReadSection /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwCompleteConnectPort(
- /*IN*/ HANDLE PortHandle);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtRequestPort(
- /*IN*/ HANDLE PortHandle,
- /*IN*/ PLPC_MESSAGE RequestMessage);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtRequestWaitReplyPort(
- /*IN*/ HANDLE PortHandle,
- /*IN*/ PLPC_MESSAGE RequestMessage,
- /*OUT*/ PLPC_MESSAGE ReplyMessage);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwRequestWaitReplyPort(
- /*IN*/ HANDLE PortHandle,
- /*IN*/ PLPC_MESSAGE RequestMessage,
- /*OUT*/ PLPC_MESSAGE ReplyMessage);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwReplyPort(
- /*IN*/ HANDLE PortHandle,
- /*IN*/ PLPC_MESSAGE ReplyMessage);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwReplyWaitReplyPort(
- /*IN*/ HANDLE PortHandle,
- /*IN OUT*/ PLPC_MESSAGE ReplyMessage);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwReplyWaitReceivePort(
- /*IN*/ HANDLE PortHandle,
- /*OUT*/ PULONG PortIdentifier /*OPTIONAL*/,
- /*IN*/ PLPC_MESSAGE ReplyMessage /*OPTIONAL*/,
- /*OUT*/ PLPC_MESSAGE Message);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwReplyWaitReceivePortEx(
- /*IN*/ HANDLE PortHandle,
- /*OUT*/ PULONG PortIdentifier /*OPTIONAL*/,
- /*IN*/ PLPC_MESSAGE ReplyMessage /*OPTIONAL*/,
- /*OUT*/ PLPC_MESSAGE Message,
- /*IN*/ PLARGE_INTEGER Timeout);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwReadRequestData(
- /*IN*/ HANDLE PortHandle,
- /*IN*/ PLPC_MESSAGE Message,
- /*IN*/ ULONG Index,
- /*OUT*/ PVOID Buffer,
- /*IN*/ ULONG BufferLength,
- /*OUT*/ PULONG ReturnLength /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwWriteRequestData(
- /*IN*/ HANDLE PortHandle,
- /*IN*/ PLPC_MESSAGE Message,
- /*IN*/ ULONG Index,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG BufferLength,
- /*OUT*/ PULONG ReturnLength /*OPTIONAL*/);
-
-typedef enum _PORT_INFORMATION_CLASS {
- PortBasicInformation
-} PORT_INFORMATION_CLASS;
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQueryInformationPort(
- /*IN*/ HANDLE PortHandle,
- /*IN*/ PORT_INFORMATION_CLASS PortInformationClass,
- /*OUT*/ PVOID PortInformation,
- /*IN*/ ULONG PortInformationLength,
- /*OUT*/ PULONG ReturnLength /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwImpersonateClientOfPort(
- /*IN*/ HANDLE PortHandle,
- /*IN*/ PLPC_MESSAGE Message);
-
-
-
-
-/* Files */
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtDeleteFile(
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwDeleteFile(
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwFlushBuffersFile(
- /*IN*/ HANDLE FileHandle,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwCancelIoFile(
- /*IN*/ HANDLE FileHandle,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwReadFileScatter(
- /*IN*/ HANDLE FileHandle,
- /*IN*/ HANDLE Event /*OPTIONAL*/,
- /*IN*/ PIO_APC_ROUTINE ApcRoutine /*OPTIONAL*/,
- /*IN*/ PVOID ApcContext /*OPTIONAL*/,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*IN*/ PFILE_SEGMENT_ELEMENT Buffer,
- /*IN*/ ULONG Length,
- /*IN*/ PLARGE_INTEGER ByteOffset /*OPTIONAL*/,
- /*IN*/ PULONG Key /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwWriteFileGather(
- /*IN*/ HANDLE FileHandle,
- /*IN*/ HANDLE Event /*OPTIONAL*/,
- /*IN*/ PIO_APC_ROUTINE ApcRoutine /*OPTIONAL*/,
- /*IN*/ PVOID ApcContext /*OPTIONAL*/,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*IN*/ PFILE_SEGMENT_ELEMENT Buffer,
- /*IN*/ ULONG Length,
- /*IN*/ PLARGE_INTEGER ByteOffset /*OPTIONAL*/,
- /*IN*/ PULONG Key /*OPTIONAL*/);
-
-
-
-
-/* Registry keys */
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSaveKey(
- /*IN*/ HANDLE KeyHandle,
- /*IN*/ HANDLE FileHandle);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSaveMergedKeys(
- /*IN*/ HANDLE KeyHandle1,
- /*IN*/ HANDLE KeyHandle2,
- /*IN*/ HANDLE FileHandle);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwRestoreKey(
- /*IN*/ HANDLE KeyHandle,
- /*IN*/ HANDLE FileHandle,
- /*IN*/ ULONG Flags);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwLoadKey(
- /*IN*/ POBJECT_ATTRIBUTES KeyObjectAttributes,
- /*IN*/ POBJECT_ATTRIBUTES FileObjectAttributes);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwLoadKey2(
- /*IN*/ POBJECT_ATTRIBUTES KeyObjectAttributes,
- /*IN*/ POBJECT_ATTRIBUTES FileObjectAttributes,
- /*IN*/ ULONG Flags);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwUnloadKey(
- /*IN*/ POBJECT_ATTRIBUTES KeyObjectAttributes);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQueryOpenSubKeys(
- /*IN*/ POBJECT_ATTRIBUTES KeyObjectAttributes,
- /*OUT*/ PULONG NumberOfKeys);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwReplaceKey(
- /*IN*/ POBJECT_ATTRIBUTES NewFileObjectAttributes,
- /*IN*/ HANDLE KeyHandle,
- /*IN*/ POBJECT_ATTRIBUTES OldFileObjectAttributes);
-
-typedef enum _KEY_SET_INFORMATION_CLASS {
- KeyLastWriteTimeInformation
-} KEY_SET_INFORMATION_CLASS;
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSetInformationKey(
- /*IN*/ HANDLE KeyHandle,
- /*IN*/ KEY_SET_INFORMATION_CLASS KeyInformationClass,
- /*IN*/ PVOID KeyInformation,
- /*IN*/ ULONG KeyInformationLength);
-
-typedef struct _KEY_LAST_WRITE_TIME_INFORMATION {
- LARGE_INTEGER LastWriteTime;
-} KEY_LAST_WRITE_TIME_INFORMATION, *PKEY_LAST_WRITE_TIME_INFORMATION;
-
-typedef struct _KEY_NAME_INFORMATION {
- ULONG NameLength;
- WCHAR Name[1];
-} KEY_NAME_INFORMATION, *PKEY_NAME_INFORMATION;
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwNotifyChangeKey(
- /*IN*/ HANDLE KeyHandle,
- /*IN*/ HANDLE EventHandle /*OPTIONAL*/,
- /*IN*/ PIO_APC_ROUTINE ApcRoutine /*OPTIONAL*/,
- /*IN*/ PVOID ApcContext /*OPTIONAL*/,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*IN*/ ULONG NotifyFilter,
- /*IN*/ BOOLEAN WatchSubtree,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG BufferLength,
- /*IN*/ BOOLEAN Asynchronous);
-
-/* ZwNotifyChangeMultipleKeys.Flags constants */
-#define REG_MONITOR_SINGLE_KEY 0x00
-#define REG_MONITOR_SECOND_KEY 0x01
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwNotifyChangeMultipleKeys(
- /*IN*/ HANDLE KeyHandle,
- /*IN*/ ULONG Flags,
- /*IN*/ POBJECT_ATTRIBUTES KeyObjectAttributes,
- /*IN*/ HANDLE EventHandle /*OPTIONAL*/,
- /*IN*/ PIO_APC_ROUTINE ApcRoutine /*OPTIONAL*/,
- /*IN*/ PVOID ApcContext /*OPTIONAL*/,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*IN*/ ULONG NotifyFilter,
- /*IN*/ BOOLEAN WatchSubtree,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG BufferLength,
- /*IN*/ BOOLEAN Asynchronous);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQueryMultipleValueKey(
- /*IN*/ HANDLE KeyHandle,
- /*IN OUT*/ PKEY_VALUE_ENTRY ValueList,
- /*IN*/ ULONG NumberOfValues,
- /*OUT*/ PVOID Buffer,
- /*IN OUT*/ PULONG Length,
- /*OUT*/ PULONG ReturnLength);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwInitializeRegistry(
- /*IN*/ BOOLEAN Setup);
-
-
-
-
-/* Security and auditing */
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwPrivilegeCheck(
- /*IN*/ HANDLE TokenHandle,
- /*IN*/ PPRIVILEGE_SET RequiredPrivileges,
- /*OUT*/ PBOOLEAN Result);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwPrivilegeObjectAuditAlarm(
- /*IN*/ PUNICODE_STRING SubsystemName,
- /*IN*/ PVOID HandleId,
- /*IN*/ HANDLE TokenHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ PPRIVILEGE_SET Privileges,
- /*IN*/ BOOLEAN AccessGranted);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwPrivilegeObjectAuditAlarm(
- /*IN*/ PUNICODE_STRING SubsystemName,
- /*IN*/ PVOID HandleId,
- /*IN*/ HANDLE TokenHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ PPRIVILEGE_SET Privileges,
- /*IN*/ BOOLEAN AccessGranted);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwAccessCheck(
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN*/ HANDLE TokenHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ PGENERIC_MAPPING GenericMapping,
- /*IN*/ PPRIVILEGE_SET PrivilegeSet,
- /*IN*/ PULONG PrivilegeSetLength,
- /*OUT*/ PACCESS_MASK GrantedAccess,
- /*OUT*/ PBOOLEAN AccessStatus);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwAccessCheckAndAuditAlarm(
- /*IN*/ PUNICODE_STRING SubsystemName,
- /*IN*/ PVOID HandleId,
- /*IN*/ PUNICODE_STRING ObjectTypeName,
- /*IN*/ PUNICODE_STRING ObjectName,
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ PGENERIC_MAPPING GenericMapping,
- /*IN*/ BOOLEAN ObjectCreation,
- /*OUT*/ PACCESS_MASK GrantedAccess,
- /*OUT*/ PBOOLEAN AccessStatus,
- /*OUT*/ PBOOLEAN GenerateOnClose);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwAccessCheckByType(
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN*/ PSID PrincipalSelfSid,
- /*IN*/ HANDLE TokenHandle,
- /*IN*/ ULONG DesiredAccess,
- /*IN*/ POBJECT_TYPE_LIST ObjectTypeList,
- /*IN*/ ULONG ObjectTypeListLength,
- /*IN*/ PGENERIC_MAPPING GenericMapping,
- /*IN*/ PPRIVILEGE_SET PrivilegeSet,
- /*IN*/ PULONG PrivilegeSetLength,
- /*OUT*/ PACCESS_MASK GrantedAccess,
- /*OUT*/ PULONG AccessStatus);
-
-typedef enum _AUDIT_EVENT_TYPE {
- AuditEventObjectAccess,
- AuditEventDirectoryServiceAccess
-} AUDIT_EVENT_TYPE, *PAUDIT_EVENT_TYPE;
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwAccessCheckByTypeAndAuditAlarm(
- /*IN*/ PUNICODE_STRING SubsystemName,
- /*IN*/ PVOID HandleId,
- /*IN*/ PUNICODE_STRING ObjectTypeName,
- /*IN*/ PUNICODE_STRING ObjectName,
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN*/ PSID PrincipalSelfSid,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ AUDIT_EVENT_TYPE AuditType,
- /*IN*/ ULONG Flags,
- /*IN*/ POBJECT_TYPE_LIST ObjectTypeList,
- /*IN*/ ULONG ObjectTypeListLength,
- /*IN*/ PGENERIC_MAPPING GenericMapping,
- /*IN*/ BOOLEAN ObjectCreation,
- /*OUT*/ PACCESS_MASK GrantedAccess,
- /*OUT*/ PULONG AccessStatus,
- /*OUT*/ PBOOLEAN GenerateOnClose);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwAccessCheckByTypeResultList(
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN*/ PSID PrincipalSelfSid,
- /*IN*/ HANDLE TokenHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_TYPE_LIST ObjectTypeList,
- /*IN*/ ULONG ObjectTypeListLength,
- /*IN*/ PGENERIC_MAPPING GenericMapping,
- /*IN*/ PPRIVILEGE_SET PrivilegeSet,
- /*IN*/ PULONG PrivilegeSetLength,
- /*OUT*/ PACCESS_MASK GrantedAccessList,
- /*OUT*/ PULONG AccessStatusList);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwAccessCheckByTypeResultListAndAuditAlarm(
- /*IN*/ PUNICODE_STRING SubsystemName,
- /*IN*/ PVOID HandleId,
- /*IN*/ PUNICODE_STRING ObjectTypeName,
- /*IN*/ PUNICODE_STRING ObjectName,
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN*/ PSID PrincipalSelfSid,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ AUDIT_EVENT_TYPE AuditType,
- /*IN*/ ULONG Flags,
- /*IN*/ POBJECT_TYPE_LIST ObjectTypeList,
- /*IN*/ ULONG ObjectTypeListLength,
- /*IN*/ PGENERIC_MAPPING GenericMapping,
- /*IN*/ BOOLEAN ObjectCreation,
- /*OUT*/ PACCESS_MASK GrantedAccessList,
- /*OUT*/ PULONG AccessStatusList,
- /*OUT*/ PULONG GenerateOnClose);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwAccessCheckByTypeResultListAndAuditAlarmByHandle(
- /*IN*/ PUNICODE_STRING SubsystemName,
- /*IN*/ PVOID HandleId,
- /*IN*/ HANDLE TokenHandle,
- /*IN*/ PUNICODE_STRING ObjectTypeName,
- /*IN*/ PUNICODE_STRING ObjectName,
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN*/ PSID PrincipalSelfSid,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ AUDIT_EVENT_TYPE AuditType,
- /*IN*/ ULONG Flags,
- /*IN*/ POBJECT_TYPE_LIST ObjectTypeList,
- /*IN*/ ULONG ObjectTypeListLength,
- /*IN*/ PGENERIC_MAPPING GenericMapping,
- /*IN*/ BOOLEAN ObjectCreation,
- /*OUT*/ PACCESS_MASK GrantedAccessList,
- /*OUT*/ PULONG AccessStatusList,
- /*OUT*/ PULONG GenerateOnClose);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwOpenObjectAuditAlarm(
- /*IN*/ PUNICODE_STRING SubsystemName,
- /*IN*/ PVOID *HandleId,
- /*IN*/ PUNICODE_STRING ObjectTypeName,
- /*IN*/ PUNICODE_STRING ObjectName,
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN*/ HANDLE TokenHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ ACCESS_MASK GrantedAccess,
- /*IN*/ PPRIVILEGE_SET Privileges /*OPTIONAL*/,
- /*IN*/ BOOLEAN ObjectCreation,
- /*IN*/ BOOLEAN AccessGranted,
- /*OUT*/ PBOOLEAN GenerateOnClose);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwCloseObjectAuditAlarm(
- /*IN*/ PUNICODE_STRING SubsystemName,
- /*IN*/ PVOID HandleId,
- /*IN*/ BOOLEAN GenerateOnClose);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwDeleteObjectAuditAlarm(
- /*IN*/ PUNICODE_STRING SubsystemName,
- /*IN*/ PVOID HandleId,
- /*IN*/ BOOLEAN GenerateOnClose);
-
-
-
-
-/* Plug and play and power management */
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwRequestWakeupLatency(
- /*IN*/ LATENCY_TIME Latency);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwRequestDeviceWakeup(
- /*IN*/ HANDLE DeviceHandle);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwCancelDeviceWakeupRequest(
- /*IN*/ HANDLE DeviceHandle);
-
-NTOSAPI
-BOOLEAN
-NTAPI
-ZwIsSystemResumeAutomatic(
- VOID);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSetThreadExecutionState(
- /*IN*/ EXECUTION_STATE ExecutionState,
- /*OUT*/ PEXECUTION_STATE PreviousExecutionState);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwGetDevicePowerState(
- /*IN*/ HANDLE DeviceHandle,
- /*OUT*/ PDEVICE_POWER_STATE DevicePowerState);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSetSystemPowerState(
- /*IN*/ POWER_ACTION SystemAction,
- /*IN*/ SYSTEM_POWER_STATE MinSystemState,
- /*IN*/ ULONG Flags);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwInitiatePowerAction(
- /*IN*/ POWER_ACTION SystemAction,
- /*IN*/ SYSTEM_POWER_STATE MinSystemState,
- /*IN*/ ULONG Flags,
- /*IN*/ BOOLEAN Asynchronous);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwPowerInformation(
- /*IN*/ POWER_INFORMATION_LEVEL PowerInformationLevel,
- /*IN*/ PVOID InputBuffer /*OPTIONAL*/,
- /*IN*/ ULONG InputBufferLength,
- /*OUT*/ PVOID OutputBuffer /*OPTIONAL*/,
- /*IN*/ ULONG OutputBufferLength);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwPlugPlayControl(
- /*IN*/ ULONG ControlCode,
- /*IN OUT*/ PVOID Buffer,
- /*IN*/ ULONG BufferLength);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwGetPlugPlayEvent(
- /*IN*/ ULONG Reserved1,
- /*IN*/ ULONG Reserved2,
- /*OUT*/ PVOID Buffer,
- /*IN*/ ULONG BufferLength);
-
-
-
-
-/* Miscellany */
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwRaiseException(
- /*IN*/ PEXCEPTION_RECORD ExceptionRecord,
- /*IN*/ PCONTEXT Context,
- /*IN*/ BOOLEAN SearchFrames);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwContinue(
- /*IN*/ PCONTEXT Context,
- /*IN*/ BOOLEAN TestAlert);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwW32Call(
- /*IN*/ ULONG RoutineIndex,
- /*IN*/ PVOID Argument,
- /*IN*/ ULONG ArgumentLength,
- /*OUT*/ PVOID *Result /*OPTIONAL*/,
- /*OUT*/ PULONG ResultLength /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSetLowWaitHighThread(
- VOID);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSetHighWaitLowThread(
- VOID);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwLoadDriver(
- /*IN*/ PUNICODE_STRING DriverServiceName);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwUnloadDriver(
- /*IN*/ PUNICODE_STRING DriverServiceName);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwFlushInstructionCache(
- /*IN*/ HANDLE ProcessHandle,
- /*IN*/ PVOID BaseAddress /*OPTIONAL*/,
- /*IN*/ ULONG FlushSize);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwFlushWriteBuffer(
- VOID);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQueryDefaultLocale(
- /*IN*/ BOOLEAN ThreadOrSystem,
- /*OUT*/ PLCID Locale);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSetDefaultLocale(
- /*IN*/ BOOLEAN ThreadOrSystem,
- /*IN*/ LCID Locale);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQueryDefaultUILanguage(
- /*OUT*/ PLANGID LanguageId);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSetDefaultUILanguage(
- /*IN*/ LANGID LanguageId);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwQueryInstallUILanguage(
- /*OUT*/ PLANGID LanguageId);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtAllocateLocallyUniqueId(
- /*OUT*/ PLUID Luid);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtAllocateUuids(
- /*OUT*/ PLARGE_INTEGER UuidLastTimeAllocated,
- /*OUT*/ PULONG UuidDeltaTime,
- /*OUT*/ PULONG UuidSequenceNumber,
- /*OUT*/ PUCHAR UuidSeed);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSetUuidSeed(
- /*IN*/ PUCHAR UuidSeed);
-
-typedef enum _HARDERROR_RESPONSE_OPTION {
- OptionAbortRetryIgnore,
- OptionOk,
- OptionOkCancel,
- OptionRetryCancel,
- OptionYesNo,
- OptionYesNoCancel,
- OptionShutdownSystem
-} HARDERROR_RESPONSE_OPTION, *PHARDERROR_RESPONSE_OPTION;
-
-typedef enum _HARDERROR_RESPONSE {
- ResponseReturnToCaller,
- ResponseNotHandled,
- ResponseAbort,
- ResponseCancel,
- ResponseIgnore,
- ResponseNo,
- ResponseOk,
- ResponseRetry,
- ResponseYes
-} HARDERROR_RESPONSE, *PHARDERROR_RESPONSE;
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwRaiseHardError(
- /*IN*/ NTSTATUS Status,
- /*IN*/ ULONG NumberOfArguments,
- /*IN*/ ULONG StringArgumentsMask,
- /*IN*/ PULONG Arguments,
- /*IN*/ HARDERROR_RESPONSE_OPTION ResponseOption,
- /*OUT*/ PHARDERROR_RESPONSE Response);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSetDefaultHardErrorPort(
- /*IN*/ HANDLE PortHandle);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwDisplayString(
- /*IN*/ PUNICODE_STRING String);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwCreatePagingFile(
- /*IN*/ PUNICODE_STRING FileName,
- /*IN*/ PULARGE_INTEGER InitialSize,
- /*IN*/ PULARGE_INTEGER MaximumSize,
- /*IN*/ ULONG Reserved);
-
-typedef USHORT RTL_ATOM, *PRTL_ATOM;
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtAddAtom(
- /*IN*/ PWSTR AtomName,
- /*IN*/ ULONG AtomNameLength,
- /*OUT*/ PRTL_ATOM Atom);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtFindAtom(
- /*IN*/ PWSTR AtomName,
- /*IN*/ ULONG AtomNameLength,
- /*OUT*/ PRTL_ATOM Atom);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtDeleteAtom(
- /*IN*/ RTL_ATOM Atom);
-
-typedef enum _ATOM_INFORMATION_CLASS {
- AtomBasicInformation,
- AtomListInformation
-} ATOM_INFORMATION_CLASS;
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtQueryInformationAtom(
- /*IN*/ RTL_ATOM Atom,
- /*IN*/ ATOM_INFORMATION_CLASS AtomInformationClass,
- /*OUT*/ PVOID AtomInformation,
- /*IN*/ ULONG AtomInformationLength,
- /*OUT*/ PULONG ReturnLength /*OPTIONAL*/);
-
-typedef struct _ATOM_BASIC_INFORMATION {
- USHORT ReferenceCount;
- USHORT Pinned;
- USHORT NameLength;
- WCHAR Name[1];
-} ATOM_BASIC_INFORMATION, *PATOM_BASIC_INFORMATION;
-
-typedef struct _ATOM_LIST_INFORMATION {
- ULONG NumberOfAtoms;
- ATOM Atoms[1];
-} ATOM_LIST_INFORMATION, *PATOM_LIST_INFORMATION;
-
-NTOSAPI
-NTSTATUS
-NTAPI
-ZwSetLdtEntries(
- /*IN*/ ULONG Selector1,
- /*IN*/ LDT_ENTRY LdtEntry1,
- /*IN*/ ULONG Selector2,
- /*IN*/ LDT_ENTRY LdtEntry2);
-
-NTOSAPI
-NTSTATUS
-NTAPI
-NtVdmControl(
- /*IN*/ ULONG ControlCode,
- /*IN*/ PVOID ControlData);
-
-#pragma pack(pop)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NTAPI_H */
diff --git a/winsup/w32api/include/ddk/ntdd8042.h b/winsup/w32api/include/ddk/ntdd8042.h
deleted file mode 100644
index 9701792..0000000
--- a/winsup/w32api/include/ddk/ntdd8042.h
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * ntdd8042.h
- *
- * i8042 IOCTL interface.
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NTDD8042_H
-#define __NTDD8042_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include "ntddkbd.h"
-#include "ntddmou.h"
-
-#define IOCTL_INTERNAL_I8042_CONTROLLER_WRITE_BUFFER \
- CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0FF2, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_I8042_HOOK_KEYBOARD \
- CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0FF0, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_I8042_KEYBOARD_START_INFORMATION \
- CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0FF3, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_I8042_KEYBOARD_WRITE_BUFFER \
- CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0FF1, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_I8042_HOOK_MOUSE \
- CTL_CODE(FILE_DEVICE_MOUSE, 0x0FF0, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_I8042_MOUSE_START_INFORMATION \
- CTL_CODE(FILE_DEVICE_MOUSE, 0x0FF3, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_I8042_MOUSE_WRITE_BUFFER \
- CTL_CODE(FILE_DEVICE_MOUSE, 0x0FF1, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define I8042_POWER_SYS_BUTTON 0x0001
-#define I8042_SLEEP_SYS_BUTTON 0x0002
-#define I8042_WAKE_SYS_BUTTON 0x0004
-#define I8042_SYS_BUTTONS (I8042_POWER_SYS_BUTTON | \
- I8042_SLEEP_SYS_BUTTON | \
- I8042_WAKE_SYS_BUTTON)
-
-typedef enum _TRANSMIT_STATE {
- Idle = 0,
- SendingBytes
-} TRANSMIT_STATE;
-
-typedef struct _OUTPUT_PACKET {
- PUCHAR Bytes;
- ULONG CurrentByte;
- ULONG ByteCount;
- TRANSMIT_STATE State;
-} OUTPUT_PACKET, *POUTPUT_PACKET;
-
-typedef enum _KEYBOARD_SCAN_STATE {
- Normal,
- GotE0,
- GotE1
-} KEYBOARD_SCAN_STATE, *PKEYBOARD_SCAN_STATE;
-
-typedef enum _MOUSE_STATE {
- MouseIdle,
- XMovement,
- YMovement,
- ZMovement,
- MouseExpectingACK,
- MouseResetting
-} MOUSE_STATE, *PMOUSE_STATE;
-
-typedef enum _MOUSE_RESET_SUBSTATE {
- ExpectingReset,
- ExpectingResetId,
- ExpectingGetDeviceIdACK,
- ExpectingGetDeviceIdValue,
- ExpectingSetResolutionDefaultACK,
- ExpectingSetResolutionDefaultValueACK,
- ExpectingSetResolutionACK,
- ExpectingSetResolutionValueACK,
- ExpectingSetScaling1to1ACK,
- ExpectingSetScaling1to1ACK2,
- ExpectingSetScaling1to1ACK3,
- ExpectingReadMouseStatusACK,
- ExpectingReadMouseStatusByte1,
- ExpectingReadMouseStatusByte2,
- ExpectingReadMouseStatusByte3,
- StartPnPIdDetection,
- ExpectingLoopSetSamplingRateACK,
- ExpectingLoopSetSamplingRateValueACK,
- ExpectingPnpIdByte1,
- ExpectingPnpIdByte2,
- ExpectingPnpIdByte3,
- ExpectingPnpIdByte4,
- ExpectingPnpIdByte5,
- ExpectingPnpIdByte6,
- ExpectingPnpIdByte7,
- EnableWheel,
- Enable5Buttons,
- ExpectingGetDeviceId2ACK,
- ExpectingGetDeviceId2Value,
- ExpectingSetSamplingRateACK,
- ExpectingSetSamplingRateValueACK,
- ExpectingEnableACK,
- ExpectingFinalResolutionACK,
- ExpectingFinalResolutionValueACK,
- ExpectingGetDeviceIdDetectACK,
- ExpectingGetDeviceIdDetectValue,
- CustomHookStateMinimum = 100,
- CustomHookStateMaximum = 999,
- I8042ReservedMinimum = 1000
-} MOUSE_RESET_SUBSTATE, *PMOUSE_RESET_SUBSTATE;
-
-typedef struct _INTERNAL_I8042_START_INFORMATION {
- ULONG Size;
- PKINTERRUPT InterruptObject;
- ULONG Reserved[8];
-} INTERNAL_I8042_START_INFORMATION, *PINTERNAL_I8042_START_INFORMATION;
-
-typedef VOID DDKAPI
-(*PI8042_ISR_WRITE_PORT)(
- /*IN*/ PVOID Context,
- /*IN*/ UCHAR Value);
-
-typedef VOID DDKAPI
-(*PI8042_QUEUE_PACKET)(
- /*IN*/ PVOID Context);
-
-typedef NTSTATUS DDKAPI
-(*PI8042_SYNCH_READ_PORT) (
- /*IN*/ PVOID Context,
- /*OUT*/ PUCHAR Value,
- /*IN*/ BOOLEAN WaitForACK);
-
-typedef NTSTATUS DDKAPI
-(*PI8042_SYNCH_WRITE_PORT)(
- /*IN*/ PVOID Context,
- /*IN*/ UCHAR Value,
- /*IN*/ BOOLEAN WaitForACK);
-
-
-typedef NTSTATUS DDKAPI
-(*PI8042_KEYBOARD_INITIALIZATION_ROUTINE)(
- /*IN*/ PVOID InitializationContext,
- /*IN*/ PVOID SynchFuncContext,
- /*IN*/ PI8042_SYNCH_READ_PORT ReadPort,
- /*IN*/ PI8042_SYNCH_WRITE_PORT WritePort,
- /*OUT*/ PBOOLEAN TurnTranslationOn);
-
-typedef BOOLEAN DDKAPI
-(*PI8042_KEYBOARD_ISR)(
- PVOID IsrContext,
- PKEYBOARD_INPUT_DATA CurrentInput,
- POUTPUT_PACKET CurrentOutput,
- UCHAR StatusByte,
- PUCHAR Byte,
- PBOOLEAN ContinueProcessing,
- PKEYBOARD_SCAN_STATE ScanState);
-
-typedef struct _INTERNAL_I8042_HOOK_KEYBOARD {
- /*OUT*/ PVOID Context;
- /*OUT*/ PI8042_KEYBOARD_INITIALIZATION_ROUTINE InitializationRoutine;
- /*OUT*/ PI8042_KEYBOARD_ISR IsrRoutine;
- /*IN*/ PI8042_ISR_WRITE_PORT IsrWritePort;
- /*IN*/ PI8042_QUEUE_PACKET QueueKeyboardPacket;
- /*IN*/ PVOID CallContext;
-} INTERNAL_I8042_HOOK_KEYBOARD, *PINTERNAL_I8042_HOOK_KEYBOARD;
-
-typedef BOOLEAN DDKAPI
-(*PI8042_MOUSE_ISR)(
- PVOID IsrContext,
- PMOUSE_INPUT_DATA CurrentInput,
- POUTPUT_PACKET CurrentOutput,
- UCHAR StatusByte,
- PUCHAR Byte,
- PBOOLEAN ContinueProcessing,
- PMOUSE_STATE MouseState,
- PMOUSE_RESET_SUBSTATE ResetSubState);
-
-typedef struct _INTERNAL_I8042_HOOK_MOUSE {
- /*OUT*/ PVOID Context;
- /*OUT*/ PI8042_MOUSE_ISR IsrRoutine;
- /*IN*/ PI8042_ISR_WRITE_PORT IsrWritePort;
- /*IN*/ PI8042_QUEUE_PACKET QueueMousePacket;
- /*IN*/ PVOID CallContext;
-} INTERNAL_I8042_HOOK_MOUSE, *PINTERNAL_I8042_HOOK_MOUSE;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NTDD8042_H */
diff --git a/winsup/w32api/include/ddk/ntddbeep.h b/winsup/w32api/include/ddk/ntddbeep.h
deleted file mode 100644
index 6052a09..0000000
--- a/winsup/w32api/include/ddk/ntddbeep.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * ntddbeep.h
- *
- * Beep device IOCTL interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NTDDBEEP_H
-#define __NTDDBEEP_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-#define DD_BEEP_DEVICE_NAME "\\Device\\Beep"
-#define DD_BEEP_DEVICE_NAME_U L"\\Device\\Beep"
-
-#define IOCTL_BEEP_SET \
- CTL_CODE(FILE_DEVICE_BEEP, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-typedef struct _BEEP_SET_PARAMETERS {
- ULONG Frequency;
- ULONG Duration;
-} BEEP_SET_PARAMETERS, *PBEEP_SET_PARAMETERS;
-
-#define BEEP_FREQUENCY_MINIMUM 0x25
-#define BEEP_FREQUENCY_MAXIMUM 0x7FFF
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NTDDBEEP_H */
diff --git a/winsup/w32api/include/ddk/ntddcdrm.h b/winsup/w32api/include/ddk/ntddcdrm.h
deleted file mode 100644
index 49cf29d..0000000
--- a/winsup/w32api/include/ddk/ntddcdrm.h
+++ /dev/null
@@ -1,347 +0,0 @@
-/*
- * ntddcdrm.h
- *
- * CDROM IOCTL interface.
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NTDDCDRM_H
-#define __NTDDCDRM_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include "ntddstor.h"
-
-#define IOCTL_CDROM_BASE FILE_DEVICE_CD_ROM
-
-#define IOCTL_CDROM_CHECK_VERIFY \
- CTL_CODE(IOCTL_CDROM_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_CDROM_FIND_NEW_DEVICES \
- CTL_CODE(IOCTL_CDROM_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_CDROM_GET_CONTROL \
- CTL_CODE(IOCTL_CDROM_BASE, 0x000D, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_CDROM_GET_DRIVE_GEOMETRY \
- CTL_CODE(IOCTL_CDROM_BASE, 0x0013, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_CDROM_GET_LAST_SESSION \
- CTL_CODE(IOCTL_CDROM_BASE, 0x000E, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_CDROM_GET_VOLUME \
- CTL_CODE(IOCTL_CDROM_BASE, 0x0005, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_CDROM_PAUSE_AUDIO \
- CTL_CODE(IOCTL_CDROM_BASE, 0x0003, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_CDROM_PLAY_AUDIO_MSF \
- CTL_CODE(IOCTL_CDROM_BASE, 0x0006, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_CDROM_RAW_READ \
- CTL_CODE(IOCTL_CDROM_BASE, 0x000F, METHOD_OUT_DIRECT, FILE_READ_ACCESS)
-
-#define IOCTL_CDROM_READ_Q_CHANNEL \
- CTL_CODE(IOCTL_CDROM_BASE, 0x000B, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_CDROM_READ_TOC \
- CTL_CODE(IOCTL_CDROM_BASE, 0x0000, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_CDROM_READ_TOC_EX \
- CTL_CODE(IOCTL_CDROM_BASE, 0x0015, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_CDROM_RESUME_AUDIO \
- CTL_CODE(IOCTL_CDROM_BASE, 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_CDROM_SEEK_AUDIO_MSF \
- CTL_CODE(IOCTL_CDROM_BASE, 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_CDROM_SET_VOLUME \
- CTL_CODE(IOCTL_CDROM_BASE, 0x000A, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_CDROM_SIMBAD \
- CTL_CODE(IOCTL_CDROM_BASE, 0x1003, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_CDROM_STOP_AUDIO \
- CTL_CODE(IOCTL_CDROM_BASE, 0x0002, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-
-#define MAXIMUM_NUMBER_TRACKS 100
-#define MAXIMUM_CDROM_SIZE 804
-#define MINIMUM_CDROM_READ_TOC_EX_SIZE 2
-
-typedef struct _TRACK_DATA {
- UCHAR Reserved;
- UCHAR Control : 4;
- UCHAR Adr : 4;
- UCHAR TrackNumber;
- UCHAR Reserved1;
- UCHAR Address[4];
-} TRACK_DATA, *PTRACK_DATA;
-
-/* CDROM_DISK_DATA.DiskData flags */
-#define CDROM_DISK_AUDIO_TRACK 0x00000001
-#define CDROM_DISK_DATA_TRACK 0x00000002
-
-typedef struct _CDROM_DISK_DATA {
- ULONG DiskData;
-} CDROM_DISK_DATA, *PCDROM_DISK_DATA;
-
-typedef struct _CDROM_PLAY_AUDIO_MSF {
- UCHAR StartingM;
- UCHAR StartingS;
- UCHAR StartingF;
- UCHAR EndingM;
- UCHAR EndingS;
- UCHAR EndingF;
-} CDROM_PLAY_AUDIO_MSF, *PCDROM_PLAY_AUDIO_MSF;
-
-/* CDROM_READ_TOC_EX.Format constants */
-#define CDROM_READ_TOC_EX_FORMAT_TOC 0x00
-#define CDROM_READ_TOC_EX_FORMAT_SESSION 0x01
-#define CDROM_READ_TOC_EX_FORMAT_FULL_TOC 0x02
-#define CDROM_READ_TOC_EX_FORMAT_PMA 0x03
-#define CDROM_READ_TOC_EX_FORMAT_ATIP 0x04
-#define CDROM_READ_TOC_EX_FORMAT_CDTEXT 0x05
-
-typedef struct _CDROM_READ_TOC_EX {
- UCHAR Format : 4;
- UCHAR Reserved1 : 3;
- UCHAR Msf : 1;
- UCHAR SessionTrack;
- UCHAR Reserved2;
- UCHAR Reserved3;
-} CDROM_READ_TOC_EX, *PCDROM_READ_TOC_EX;
-
-typedef struct _CDROM_SEEK_AUDIO_MSF {
- UCHAR M;
- UCHAR S;
- UCHAR F;
-} CDROM_SEEK_AUDIO_MSF, *PCDROM_SEEK_AUDIO_MSF;
-
-/* CDROM_SUB_Q_DATA_FORMAT.Format constants */
-#define IOCTL_CDROM_SUB_Q_CHANNEL 0x00
-#define IOCTL_CDROM_CURRENT_POSITION 0x01
-#define IOCTL_CDROM_MEDIA_CATALOG 0x02
-#define IOCTL_CDROM_TRACK_ISRC 0x03
-
-typedef struct _CDROM_SUB_Q_DATA_FORMAT {
- UCHAR Format;
- UCHAR Track;
-} CDROM_SUB_Q_DATA_FORMAT, *PCDROM_SUB_Q_DATA_FORMAT;
-
-typedef struct _CDROM_TOC {
- UCHAR Length[2];
- UCHAR FirstTrack;
- UCHAR LastTrack;
- TRACK_DATA TrackData[MAXIMUM_NUMBER_TRACKS];
-} CDROM_TOC, *PCDROM_TOC;
-
-#define CDROM_TOC_SIZE sizeof(CDROM_TOC)
-
-typedef struct _CDROM_TOC_ATIP_DATA_BLOCK {
- UCHAR CdrwReferenceSpeed : 3;
- UCHAR Reserved3 : 1;
- UCHAR WritePower : 3;
- UCHAR True1 : 1;
- UCHAR Reserved4 : 6;
- UCHAR UnrestrictedUse : 1;
- UCHAR Reserved5 : 1;
- UCHAR A3Valid : 1;
- UCHAR A2Valid : 1;
- UCHAR A1Valid : 1;
- UCHAR Reserved6 : 3;
- UCHAR IsCdrw : 1;
- UCHAR True2 : 1;
- UCHAR Reserved7;
- UCHAR LeadInMsf[3];
- UCHAR Reserved8;
- UCHAR LeadOutMsf[3];
- UCHAR Reserved9;
- UCHAR A1Values[3];
- UCHAR Reserved10;
- UCHAR A2Values[3];
- UCHAR Reserved11;
- UCHAR A3Values[3];
- UCHAR Reserved12;
-} CDROM_TOC_ATIP_DATA_BLOCK, *PCDROM_TOC_ATIP_DATA_BLOCK;
-
-typedef struct _CDROM_TOC_ATIP_DATA {
- UCHAR Length[2];
- UCHAR Reserved1;
- UCHAR Reserved2;
- CDROM_TOC_ATIP_DATA_BLOCK Descriptors[0];
-} CDROM_TOC_ATIP_DATA, *PCDROM_TOC_ATIP_DATA;
-
-/* CDROM_TOC_CD_TEXT_DATA_BLOCK.PackType constants */
-#define CDROM_CD_TEXT_PACK_ALBUM_NAME 0x80
-#define CDROM_CD_TEXT_PACK_PERFORMER 0x81
-#define CDROM_CD_TEXT_PACK_SONGWRITER 0x82
-#define CDROM_CD_TEXT_PACK_COMPOSER 0x83
-#define CDROM_CD_TEXT_PACK_ARRANGER 0x84
-#define CDROM_CD_TEXT_PACK_MESSAGES 0x85
-#define CDROM_CD_TEXT_PACK_DISC_ID 0x86
-#define CDROM_CD_TEXT_PACK_GENRE 0x87
-#define CDROM_CD_TEXT_PACK_TOC_INFO 0x88
-#define CDROM_CD_TEXT_PACK_TOC_INFO2 0x89
-#define CDROM_CD_TEXT_PACK_UPC_EAN 0x8e
-#define CDROM_CD_TEXT_PACK_SIZE_INFO 0x8f
-
-typedef struct _CDROM_TOC_CD_TEXT_DATA_BLOCK {
- UCHAR PackType;
- UCHAR TrackNumber : 7;
- UCHAR ExtensionFlag : 1;
- UCHAR SequenceNumber;
- UCHAR CharacterPosition : 4;
- UCHAR BlockNumber : 3;
- UCHAR Unicode : 1;
- _ANONYMOUS_UNION union {
- UCHAR Text[12];
- WCHAR WText[6];
- } DUMMYUNIONNAME;
- UCHAR CRC[2];
-} CDROM_TOC_CD_TEXT_DATA_BLOCK, *PCDROM_TOC_CD_TEXT_DATA_BLOCK;
-
-typedef struct _CDROM_TOC_CD_TEXT_DATA {
- UCHAR Length[2];
- UCHAR Reserved1;
- UCHAR Reserved2;
- CDROM_TOC_CD_TEXT_DATA_BLOCK Descriptors[0];
-} CDROM_TOC_CD_TEXT_DATA, *PCDROM_TOC_CD_TEXT_DATA;
-
-/* CDROM_TOC_FULL_TOC_DATA_BLOCK.Adr constants */
-#define ADR_NO_MODE_INFORMATION 0x0
-#define ADR_ENCODES_CURRENT_POSITION 0x1
-#define ADR_ENCODES_MEDIA_CATALOG 0x2
-#define ADR_ENCODES_ISRC 0x3
-
-typedef struct _CDROM_TOC_FULL_TOC_DATA_BLOCK {
- UCHAR SessionNumber;
- UCHAR Control : 4;
- UCHAR Adr : 4;
- UCHAR Reserved1;
- UCHAR Point;
- UCHAR MsfExtra[3];
- UCHAR Zero;
- UCHAR Msf[3];
-} CDROM_TOC_FULL_TOC_DATA_BLOCK, *PCDROM_TOC_FULL_TOC_DATA_BLOCK;
-
-typedef struct _CDROM_TOC_FULL_TOC_DATA {
- UCHAR Length[2];
- UCHAR FirstCompleteSession;
- UCHAR LastCompleteSession;
- CDROM_TOC_FULL_TOC_DATA_BLOCK Descriptors[0];
-} CDROM_TOC_FULL_TOC_DATA, *PCDROM_TOC_FULL_TOC_DATA;
-
-typedef struct _CDROM_TOC_PMA_DATA {
- UCHAR Length[2];
- UCHAR Reserved1;
- UCHAR Reserved2;
- CDROM_TOC_FULL_TOC_DATA_BLOCK Descriptors[0];
-} CDROM_TOC_PMA_DATA, *PCDROM_TOC_PMA_DATA;
-
-/* SUB_Q_HEADER.AudioStatus constants */
-#define AUDIO_STATUS_NOT_SUPPORTED 0x00
-#define AUDIO_STATUS_IN_PROGRESS 0x11
-#define AUDIO_STATUS_PAUSED 0x12
-#define AUDIO_STATUS_PLAY_COMPLETE 0x13
-#define AUDIO_STATUS_PLAY_ERROR 0x14
-#define AUDIO_STATUS_NO_STATUS 0x15
-
-typedef struct _SUB_Q_HEADER {
- UCHAR Reserved;
- UCHAR AudioStatus;
- UCHAR DataLength[2];
-} SUB_Q_HEADER, *PSUB_Q_HEADER;
-
-typedef struct _SUB_Q_MEDIA_CATALOG_NUMBER {
- SUB_Q_HEADER Header;
- UCHAR FormatCode;
- UCHAR Reserved[3];
- UCHAR Reserved1 : 7;
- UCHAR Mcval :1;
- UCHAR MediaCatalog[15];
-} SUB_Q_MEDIA_CATALOG_NUMBER, *PSUB_Q_MEDIA_CATALOG_NUMBER;
-
-typedef struct _SUB_Q_TRACK_ISRC {
- SUB_Q_HEADER Header;
- UCHAR FormatCode;
- UCHAR Reserved0;
- UCHAR Track;
- UCHAR Reserved1;
- UCHAR Reserved2 : 7;
- UCHAR Tcval : 1;
- UCHAR TrackIsrc[15];
-} SUB_Q_TRACK_ISRC, *PSUB_Q_TRACK_ISRC;
-
-typedef struct _SUB_Q_CURRENT_POSITION {
- SUB_Q_HEADER Header;
- UCHAR FormatCode;
- UCHAR Control : 4;
- UCHAR ADR : 4;
- UCHAR TrackNumber;
- UCHAR IndexNumber;
- UCHAR AbsoluteAddress[4];
- UCHAR TrackRelativeAddress[4];
-} SUB_Q_CURRENT_POSITION, *PSUB_Q_CURRENT_POSITION;
-
-typedef union _SUB_Q_CHANNEL_DATA {
- SUB_Q_CURRENT_POSITION CurrentPosition;
- SUB_Q_MEDIA_CATALOG_NUMBER MediaCatalog;
- SUB_Q_TRACK_ISRC TrackIsrc;
-} SUB_Q_CHANNEL_DATA, *PSUB_Q_CHANNEL_DATA;
-
-/* CDROM_AUDIO_CONTROL.LbaFormat constants */
-#define AUDIO_WITH_PREEMPHASIS 0x1
-#define DIGITAL_COPY_PERMITTED 0x2
-#define AUDIO_DATA_TRACK 0x4
-#define TWO_FOUR_CHANNEL_AUDIO 0x8
-
-typedef struct _CDROM_AUDIO_CONTROL {
- UCHAR LbaFormat;
- USHORT LogicalBlocksPerSecond;
-} CDROM_AUDIO_CONTROL, *PCDROM_AUDIO_CONTROL;
-
-typedef struct _VOLUME_CONTROL {
- UCHAR PortVolume[4];
-} VOLUME_CONTROL, *PVOLUME_CONTROL;
-
-typedef enum _TRACK_MODE_TYPE {
- YellowMode2,
- XAForm2,
- CDDA
-} TRACK_MODE_TYPE, *PTRACK_MODE_TYPE;
-
-typedef struct __RAW_READ_INFO {
- LARGE_INTEGER DiskOffset;
- ULONG SectorCount;
- TRACK_MODE_TYPE TrackMode;
-} RAW_READ_INFO, *PRAW_READ_INFO;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NTDDCDRM_H */
diff --git a/winsup/w32api/include/ddk/ntddcdvd.h b/winsup/w32api/include/ddk/ntddcdvd.h
deleted file mode 100644
index 82c2a60..0000000
--- a/winsup/w32api/include/ddk/ntddcdvd.h
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * ntddcdvd.h
- *
- * DVD IOCTL interface.
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NTDDCDVD_H
-#define __NTDDCDVD_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include "ntddstor.h"
-
-#define IOCTL_DVD_BASE FILE_DEVICE_DVD
-
-#define IOCTL_DVD_END_SESSION \
- CTL_CODE(IOCTL_DVD_BASE, 0x0403, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_DVD_GET_REGION \
- CTL_CODE(IOCTL_DVD_BASE, 0x0405, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_DVD_READ_KEY \
- CTL_CODE(IOCTL_DVD_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_DVD_READ_STRUCTURE \
- CTL_CODE(IOCTL_DVD_BASE, 0x0450, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_DVD_SEND_KEY \
- CTL_CODE(IOCTL_DVD_BASE, 0x0402, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_DVD_START_SESSION \
- CTL_CODE(IOCTL_DVD_BASE, 0x0400, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_DVD_SET_READ_AHEAD \
- CTL_CODE(IOCTL_DVD_BASE, 0x0404, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-
-typedef ULONG DVD_SESSION_ID, *PDVD_SESSION_ID;
-
-typedef struct _STORAGE_SET_READ_AHEAD {
- LARGE_INTEGER TriggerAddress;
- LARGE_INTEGER TargetAddress;
-} STORAGE_SET_READ_AHEAD, *PSTORAGE_SET_READ_AHEAD;
-
-typedef enum DVD_STRUCTURE_FORMAT {
- DvdPhysicalDescriptor,
- DvdCopyrightDescriptor,
- DvdDiskKeyDescriptor,
- DvdBCADescriptor,
- DvdManufacturerDescriptor,
- DvdMaxDescriptor
-} DVD_STRUCTURE_FORMAT, *PDVD_STRUCTURE_FORMAT;
-
-#include <pshpack1.h>
-typedef struct DVD_READ_STRUCTURE {
- LARGE_INTEGER BlockByteOffset;
- DVD_STRUCTURE_FORMAT Format;
- DVD_SESSION_ID SessionId;
- UCHAR LayerNumber;
-} DVD_READ_STRUCTURE, *PDVD_READ_STRUCTURE;
-#include <poppack.h>
-
-typedef struct _DVD_DESCRIPTOR_HEADER {
- USHORT Length;
- UCHAR Reserved[2];
- UCHAR Data[0];
-} DVD_DESCRIPTOR_HEADER, *PDVD_DESCRIPTOR_HEADER;
-
-#include <pshpack1.h>
-typedef struct _DVD_LAYER_DESCRIPTOR {
- UCHAR BookVersion : 4;
- UCHAR BookType : 4;
- UCHAR MinimumRate : 4;
- UCHAR DiskSize : 4;
- UCHAR LayerType : 4;
- UCHAR TrackPath : 1;
- UCHAR NumberOfLayers : 2;
- UCHAR Reserved1 : 1;
- UCHAR TrackDensity : 4;
- UCHAR LinearDensity : 4;
- ULONG StartingDataSector;
- ULONG EndDataSector;
- ULONG EndLayerZeroSector;
- UCHAR Reserved5 : 7;
- UCHAR BCAFlag : 1;
- UCHAR Reserved6;
-} DVD_LAYER_DESCRIPTOR, *PDVD_LAYER_DESCRIPTOR;
-#include <poppack.h>
-
-typedef struct _DVD_COPYRIGHT_DESCRIPTOR {
- UCHAR CopyrightProtectionType;
- UCHAR RegionManagementInformation;
- USHORT Reserved;
-} DVD_COPYRIGHT_DESCRIPTOR, *PDVD_COPYRIGHT_DESCRIPTOR;
-
-typedef struct _DVD_DISK_KEY_DESCRIPTOR {
- UCHAR DiskKeyData[2048];
-} DVD_DISK_KEY_DESCRIPTOR, *PDVD_DISK_KEY_DESCRIPTOR;
-
-typedef enum _DVD_KEY_TYPE {
- DvdChallengeKey = 0x01,
- DvdBusKey1,
- DvdBusKey2,
- DvdTitleKey,
- DvdAsf,
- DvdSetRpcKey = 0x6,
- DvdGetRpcKey = 0x8,
- DvdDiskKey = 0x80,
- DvdInvalidateAGID = 0x3f
-} DVD_KEY_TYPE;
-
-typedef struct _DVD_COPY_PROTECT_KEY {
- ULONG KeyLength;
- DVD_SESSION_ID SessionId;
- DVD_KEY_TYPE KeyType;
- ULONG KeyFlags;
- union {
- HANDLE FileHandle;
- LARGE_INTEGER TitleOffset;
- } Parameters;
- UCHAR KeyData[0];
-} DVD_COPY_PROTECT_KEY, *PDVD_COPY_PROTECT_KEY;
-
-#define DVD_CHALLENGE_KEY_LENGTH (12 + sizeof(DVD_COPY_PROTECT_KEY))
-#define DVD_BUS_KEY_LENGTH (8 + sizeof(DVD_COPY_PROTECT_KEY))
-#define DVD_TITLE_KEY_LENGTH (8 + sizeof(DVD_COPY_PROTECT_KEY))
-#define DVD_DISK_KEY_LENGTH (2048 + sizeof(DVD_COPY_PROTECT_KEY))
-#define DVD_RPC_KEY_LENGTH (sizeof(DVD_RPC_KEY) + sizeof(DVD_COPY_PROTECT_KEY))
-#define DVD_SET_RPC_KEY_LENGTH (sizeof(DVD_SET_RPC_KEY) + sizeof(DVD_COPY_PROTECT_KEY))
-#define DVD_ASF_LENGTH (sizeof(DVD_ASF) + sizeof(DVD_COPY_PROTECT_KEY))
-
-#define DVD_END_ALL_SESSIONS ((DVD_SESSION_ID) 0xffffffff)
-
-
-#define DVD_CGMS_RESERVED_MASK 0x00000078
-
-#define DVD_CGMS_COPY_PROTECT_MASK 0x00000018
-#define DVD_CGMS_COPY_PERMITTED 0x00000000
-#define DVD_CGMS_COPY_ONCE 0x00000010
-#define DVD_CGMS_NO_COPY 0x00000018
-
-#define DVD_COPYRIGHT_MASK 0x00000040
-#define DVD_NOT_COPYRIGHTED 0x00000000
-#define DVD_COPYRIGHTED 0x00000040
-
-#define DVD_SECTOR_PROTECT_MASK 0x00000020
-#define DVD_SECTOR_NOT_PROTECTED 0x00000000
-#define DVD_SECTOR_PROTECTED 0x00000020
-
-
-typedef struct _DVD_BCA_DESCRIPTOR {
- UCHAR BCAInformation[0];
-} DVD_BCA_DESCRIPTOR, *PDVD_BCA_DESCRIPTOR;
-
-typedef struct _DVD_MANUFACTURER_DESCRIPTOR {
- UCHAR ManufacturingInformation[2048];
-} DVD_MANUFACTURER_DESCRIPTOR, *PDVD_MANUFACTURER_DESCRIPTOR;
-
-typedef struct _DVD_RPC_KEY {
- UCHAR UserResetsAvailable : 3;
- UCHAR ManufacturerResetsAvailable : 3;
- UCHAR TypeCode : 2;
- UCHAR RegionMask;
- UCHAR RpcScheme;
- UCHAR Reserved2[1];
-} DVD_RPC_KEY, *PDVD_RPC_KEY;
-
-typedef struct _DVD_SET_RPC_KEY {
- UCHAR PreferredDriveRegionCode;
- UCHAR Reserved[3];
-} DVD_SET_RPC_KEY, *PDVD_SET_RPC_KEY;
-
-typedef struct _DVD_ASF {
- UCHAR Reserved0[3];
- UCHAR SuccessFlag : 1;
- UCHAR Reserved1 : 7;
-} DVD_ASF, *PDVD_ASF;
-
-typedef struct _DVD_REGION {
- UCHAR CopySystem;
- UCHAR RegionData;
- UCHAR SystemRegion;
- UCHAR ResetCount;
-} DVD_REGION, *PDVD_REGION;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NTDDCDVD_H */
diff --git a/winsup/w32api/include/ddk/ntddchgr.h b/winsup/w32api/include/ddk/ntddchgr.h
deleted file mode 100644
index 8c9e81e..0000000
--- a/winsup/w32api/include/ddk/ntddchgr.h
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
- * ntddchgr.h
- *
- * Media changer IOCTL interface.
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NTDDCHGR_H
-#define __NTDDCHGR_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include "ntddstor.h"
-
-#define DD_CHANGER_DEVICE_NAME "\\Device\\Changer"
-#define DD_CHANGER_DEVICE_NAME_U L"\\Device\\Changer"
-
-#define IOCTL_CHANGER_BASE FILE_DEVICE_CHANGER
-
-#define IOCTL_CHANGER_EXCHANGE_MEDIUM \
- CTL_CODE(IOCTL_CHANGER_BASE, 0x0008, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_CHANGER_GET_ELEMENT_STATUS \
- CTL_CODE(IOCTL_CHANGER_BASE, 0x0005, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_CHANGER_GET_PARAMETERS \
- CTL_CODE(IOCTL_CHANGER_BASE, 0x0000, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_CHANGER_GET_PRODUCT_DATA \
- CTL_CODE(IOCTL_CHANGER_BASE, 0x0002, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_CHANGER_GET_STATUS \
- CTL_CODE(IOCTL_CHANGER_BASE, 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_CHANGER_INITIALIZE_ELEMENT_STATUS \
- CTL_CODE(IOCTL_CHANGER_BASE, 0x0006, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_CHANGER_MOVE_MEDIUM \
- CTL_CODE(IOCTL_CHANGER_BASE, 0x0009, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_CHANGER_QUERY_VOLUME_TAGS \
- CTL_CODE(IOCTL_CHANGER_BASE, 0x000B, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_CHANGER_REINITIALIZE_TRANSPORT \
- CTL_CODE(IOCTL_CHANGER_BASE, 0x000A, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_CHANGER_SET_ACCESS \
- CTL_CODE(IOCTL_CHANGER_BASE, 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_CHANGER_SET_POSITION \
- CTL_CODE(IOCTL_CHANGER_BASE, 0x0007, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-
-#define MAX_VOLUME_ID_SIZE 36
-#define MAX_VOLUME_TEMPLATE_SIZE 40
-
-typedef enum _ELEMENT_TYPE {
- AllElements,
- ChangerTransport,
- ChangerSlot,
- ChangerIEPort,
- ChangerDrive,
- ChangerDoor,
- ChangerKeypad,
- ChangerMaxElement
-} ELEMENT_TYPE, *PELEMENT_TYPE;
-
-typedef struct _CHANGER_ELEMENT {
- ELEMENT_TYPE ElementType;
- ULONG ElementAddress;
-} CHANGER_ELEMENT, *PCHANGER_ELEMENT;
-
-typedef struct _CHANGER_ELEMENT_LIST {
- CHANGER_ELEMENT Element;
- ULONG NumberOfElements;
-} CHANGER_ELEMENT_LIST, *PCHANGER_ELEMENT_LIST;
-
-typedef struct _CHANGER_INITIALIZE_ELEMENT_STATUS {
- CHANGER_ELEMENT_LIST ElementList;
- BOOLEAN BarCodeScan;
-} CHANGER_INITIALIZE_ELEMENT_STATUS, *PCHANGER_INITIALIZE_ELEMENT_STATUS;
-
-typedef struct _CHANGER_READ_ELEMENT_STATUS {
- CHANGER_ELEMENT_LIST ElementList;
- BOOLEAN VolumeTagInfo;
-} CHANGER_READ_ELEMENT_STATUS, *PCHANGER_READ_ELEMENT_STATUS;
-
-
-typedef struct _CHANGER_SET_POSITION {
- CHANGER_ELEMENT Transport;
- CHANGER_ELEMENT Destination;
- BOOLEAN Flip;
-} CHANGER_SET_POSITION, *PCHANGER_SET_POSITION;
-
-typedef struct _CHANGER_EXCHANGE_MEDIUM {
- CHANGER_ELEMENT Transport;
- CHANGER_ELEMENT Source;
- CHANGER_ELEMENT Destination1;
- CHANGER_ELEMENT Destination2;
- BOOLEAN Flip1;
- BOOLEAN Flip2;
-} CHANGER_EXCHANGE_MEDIUM, *PCHANGER_EXCHANGE_MEDIUM;
-
-typedef struct _CHANGER_MOVE_MEDIUM {
- CHANGER_ELEMENT Transport;
- CHANGER_ELEMENT Source;
- CHANGER_ELEMENT Destination;
- BOOLEAN Flip;
-} CHANGER_MOVE_MEDIUM, *PCHANGER_MOVE_MEDIUM;
-
-#define VENDOR_ID_LENGTH 8
-#define PRODUCT_ID_LENGTH 16
-#define REVISION_LENGTH 4
-#define SERIAL_NUMBER_LENGTH 32
-
-typedef struct _CHANGER_PRODUCT_DATA {
- UCHAR VendorId[VENDOR_ID_LENGTH];
- UCHAR ProductId[PRODUCT_ID_LENGTH];
- UCHAR Revision[REVISION_LENGTH];
- UCHAR SerialNumber[SERIAL_NUMBER_LENGTH];
- UCHAR DeviceType;
-} CHANGER_PRODUCT_DATA, *PCHANGER_PRODUCT_DATA;
-
-/* CHANGER_SET_ACCESS.Control constants */
-#define LOCK_ELEMENT 0
-#define UNLOCK_ELEMENT 1
-#define EXTEND_IEPORT 2
-#define RETRACT_IEPORT 3
-
-typedef struct _CHANGER_SET_ACCESS {
- CHANGER_ELEMENT Element;
- ULONG Control;
-} CHANGER_SET_ACCESS, *PCHANGER_SET_ACCESS;
-
-
-typedef enum _CHANGER_DEVICE_PROBLEM_TYPE {
- DeviceProblemNone,
- DeviceProblemHardware,
- DeviceProblemCHMError,
- DeviceProblemDoorOpen,
- DeviceProblemCalibrationError,
- DeviceProblemTargetFailure,
- DeviceProblemCHMMoveError,
- DeviceProblemCHMZeroError,
- DeviceProblemCartridgeInsertError,
- DeviceProblemPositionError,
- DeviceProblemSensorError,
- DeviceProblemCartridgeEjectError,
- DeviceProblemGripperError,
- DeviceProblemDriveError
-} CHANGER_DEVICE_PROBLEM_TYPE, *PCHANGER_DEVICE_PROBLEM_TYPE;
-
-/* CHANGER_ELEMENT_STATUS(_EX).Flags constants */
-#define ELEMENT_STATUS_FULL 0x00000001
-#define ELEMENT_STATUS_IMPEXP 0x00000002
-#define ELEMENT_STATUS_EXCEPT 0x00000004
-#define ELEMENT_STATUS_ACCESS 0x00000008
-#define ELEMENT_STATUS_EXENAB 0x00000010
-#define ELEMENT_STATUS_INENAB 0x00000020
-#define ELEMENT_STATUS_PRODUCT_DATA 0x00000040
-#define ELEMENT_STATUS_LUN_VALID 0x00001000
-#define ELEMENT_STATUS_ID_VALID 0x00002000
-#define ELEMENT_STATUS_NOT_BUS 0x00008000
-#define ELEMENT_STATUS_INVERT 0x00400000
-#define ELEMENT_STATUS_SVALID 0x00800000
-#define ELEMENT_STATUS_PVOLTAG 0x10000000
-#define ELEMENT_STATUS_AVOLTAG 0x20000000
-
-/* CHANGER_ELEMENT_STATUS(_EX).ExceptionCode constants */
-#define ERROR_LABEL_UNREADABLE 0x00000001
-#define ERROR_LABEL_QUESTIONABLE 0x00000002
-#define ERROR_SLOT_NOT_PRESENT 0x00000004
-#define ERROR_DRIVE_NOT_INSTALLED 0x00000008
-#define ERROR_TRAY_MALFUNCTION 0x00000010
-#define ERROR_INIT_STATUS_NEEDED 0x00000011
-#define ERROR_UNHANDLED_ERROR 0xFFFFFFFF
-
-typedef struct _CHANGER_ELEMENT_STATUS {
- CHANGER_ELEMENT Element;
- CHANGER_ELEMENT SrcElementAddress;
- ULONG Flags;
- ULONG ExceptionCode;
- UCHAR TargetId;
- UCHAR Lun;
- USHORT Reserved;
- UCHAR PrimaryVolumeID[MAX_VOLUME_ID_SIZE];
- UCHAR AlternateVolumeID[MAX_VOLUME_ID_SIZE];
-} CHANGER_ELEMENT_STATUS, *PCHANGER_ELEMENT_STATUS;
-
-typedef struct _CHANGER_ELEMENT_STATUS_EX {
- CHANGER_ELEMENT Element;
- CHANGER_ELEMENT SrcElementAddress;
- ULONG Flags;
- ULONG ExceptionCode;
- UCHAR TargetId;
- UCHAR Lun;
- USHORT Reserved;
- UCHAR PrimaryVolumeID[MAX_VOLUME_ID_SIZE];
- UCHAR AlternateVolumeID[MAX_VOLUME_ID_SIZE];
- UCHAR VendorIdentification[VENDOR_ID_LENGTH];
- UCHAR ProductIdentification[PRODUCT_ID_LENGTH];
- UCHAR SerialNumber[SERIAL_NUMBER_LENGTH];
-} CHANGER_ELEMENT_STATUS_EX, *PCHANGER_ELEMENT_STATUS_EX;
-
-/* CHANGER_SEND_VOLUME_TAG_INFORMATION.ActionCode constants */
-#define SEARCH_ALL 0x0
-#define SEARCH_PRIMARY 0x1
-#define SEARCH_ALTERNATE 0x2
-#define SEARCH_ALL_NO_SEQ 0x4
-#define SEARCH_PRI_NO_SEQ 0x5
-#define SEARCH_ALT_NO_SEQ 0x6
-#define ASSERT_PRIMARY 0x8
-#define ASSERT_ALTERNATE 0x9
-#define REPLACE_PRIMARY 0xA
-#define REPLACE_ALTERNATE 0xB
-#define UNDEFINE_PRIMARY 0xC
-#define UNDEFINE_ALTERNATE 0xD
-
-typedef struct _CHANGER_SEND_VOLUME_TAG_INFORMATION {
- CHANGER_ELEMENT StartingElement;
- ULONG ActionCode;
- UCHAR VolumeIDTemplate[MAX_VOLUME_TEMPLATE_SIZE];
-} CHANGER_SEND_VOLUME_TAG_INFORMATION, *PCHANGER_SEND_VOLUME_TAG_INFORMATION;
-
-/* GET_CHANGER_PARAMETERS.Features0 constants */
-#define CHANGER_BAR_CODE_SCANNER_INSTALLED 0x00000001
-#define CHANGER_INIT_ELEM_STAT_WITH_RANGE 0x00000002
-#define CHANGER_CLOSE_IEPORT 0x00000004
-#define CHANGER_OPEN_IEPORT 0x00000008
-#define CHANGER_STATUS_NON_VOLATILE 0x00000010
-#define CHANGER_EXCHANGE_MEDIA 0x00000020
-#define CHANGER_CLEANER_SLOT 0x00000040
-#define CHANGER_LOCK_UNLOCK 0x00000080
-#define CHANGER_CARTRIDGE_MAGAZINE 0x00000100
-#define CHANGER_MEDIUM_FLIP 0x00000200
-#define CHANGER_POSITION_TO_ELEMENT 0x00000400
-#define CHANGER_REPORT_IEPORT_STATE 0x00000800
-#define CHANGER_STORAGE_DRIVE 0x00001000
-#define CHANGER_STORAGE_IEPORT 0x00002000
-#define CHANGER_STORAGE_SLOT 0x00004000
-#define CHANGER_STORAGE_TRANSPORT 0x00008000
-#define CHANGER_DRIVE_CLEANING_REQUIRED 0x00010000
-#define CHANGER_PREDISMOUNT_EJECT_REQUIRED 0x00020000
-#define CHANGER_CLEANER_ACCESS_NOT_VALID 0x00040000
-#define CHANGER_PREMOUNT_EJECT_REQUIRED 0x00080000
-#define CHANGER_VOLUME_IDENTIFICATION 0x00100000
-#define CHANGER_VOLUME_SEARCH 0x00200000
-#define CHANGER_VOLUME_ASSERT 0x00400000
-#define CHANGER_VOLUME_REPLACE 0x00800000
-#define CHANGER_VOLUME_UNDEFINE 0x01000000
-#define CHANGER_SERIAL_NUMBER_VALID 0x04000000
-#define CHANGER_DEVICE_REINITIALIZE_CAPABLE 0x08000000
-#define CHANGER_KEYPAD_ENABLE_DISABLE 0x10000000
-#define CHANGER_DRIVE_EMPTY_ON_DOOR_ACCESS 0x20000000
-#define CHANGER_RESERVED_BIT 0x80000000
-
-/* GET_CHANGER_PARAMETERS.Features1 constants */
-#define CHANGER_PREDISMOUNT_ALIGN_TO_SLOT 0x80000001
-#define CHANGER_PREDISMOUNT_ALIGN_TO_DRIVE 0x80000002
-#define CHANGER_CLEANER_AUTODISMOUNT 0x80000004
-#define CHANGER_TRUE_EXCHANGE_CAPABLE 0x80000008
-#define CHANGER_SLOTS_USE_TRAYS 0x80000010
-#define CHANGER_RTN_MEDIA_TO_ORIGINAL_ADDR 0x80000020
-#define CHANGER_CLEANER_OPS_NOT_SUPPORTED 0x80000040
-#define CHANGER_IEPORT_USER_CONTROL_OPEN 0x80000080
-#define CHANGER_IEPORT_USER_CONTROL_CLOSE 0x80000100
-#define CHANGER_MOVE_EXTENDS_IEPORT 0x80000200
-#define CHANGER_MOVE_RETRACTS_IEPORT 0x80000400
-
-/* GET_CHANGER_PARAMETERS.MoveFrom,ExchangeFrom,PositionCapabilities constants */
-#define CHANGER_TO_TRANSPORT 0x01
-#define CHANGER_TO_SLOT 0x02
-#define CHANGER_TO_IEPORT 0x04
-#define CHANGER_TO_DRIVE 0x08
-
-/* GET_CHANGER_PARAMETERS.LockUnlockCapabilities constants */
-#define LOCK_UNLOCK_IEPORT 0x01
-#define LOCK_UNLOCK_DOOR 0x02
-#define LOCK_UNLOCK_KEYPAD 0x04
-
-typedef struct _GET_CHANGER_PARAMETERS {
- ULONG Size;
- USHORT NumberTransportElements;
- USHORT NumberStorageElements;
- USHORT NumberCleanerSlots;
- USHORT NumberIEElements;
- USHORT NumberDataTransferElements;
- USHORT NumberOfDoors;
- USHORT FirstSlotNumber;
- USHORT FirstDriveNumber;
- USHORT FirstTransportNumber;
- USHORT FirstIEPortNumber;
- USHORT FirstCleanerSlotAddress;
- USHORT MagazineSize;
- ULONG DriveCleanTimeout;
- ULONG Features0;
- ULONG Features1;
- UCHAR MoveFromTransport;
- UCHAR MoveFromSlot;
- UCHAR MoveFromIePort;
- UCHAR MoveFromDrive;
- UCHAR ExchangeFromTransport;
- UCHAR ExchangeFromSlot;
- UCHAR ExchangeFromIePort;
- UCHAR ExchangeFromDrive;
- UCHAR LockUnlockCapabilities;
- UCHAR PositionCapabilities;
- UCHAR Reserved1[2];
- ULONG Reserved2[2];
-} GET_CHANGER_PARAMETERS, * PGET_CHANGER_PARAMETERS;
-
-typedef struct READ_ELEMENT_ADDRESS_INFO {
- ULONG NumberOfElements;
- CHANGER_ELEMENT_STATUS ElementStatus[1];
-} READ_ELEMENT_ADDRESS_INFO, *PREAD_ELEMENT_ADDRESS_INFO;
-
-typedef struct _TAPE_WMI_OPERATIONS {
- ULONG Method;
- ULONG DataBufferSize;
- PVOID DataBuffer;
-} TAPE_WMI_OPERATIONS, *PTAPE_WMI_OPERATIONS;
-
-typedef struct _WMI_CHANGER_PROBLEM_DEVICE_ERROR {
- ULONG ChangerProblemType;
-} WMI_CHANGER_PROBLEM_DEVICE_ERROR, *PWMI_CHANGER_PROBLEM_DEVICE_ERROR;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NTDDCHGR_H */
diff --git a/winsup/w32api/include/ddk/ntdddisk.h b/winsup/w32api/include/ddk/ntdddisk.h
deleted file mode 100644
index daf75c0..0000000
--- a/winsup/w32api/include/ddk/ntdddisk.h
+++ /dev/null
@@ -1,521 +0,0 @@
-/*
- * ntdddisk.h
- *
- * Disk IOCTL interface.
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NTDDDISK_H
-#define __NTDDDISK_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include "ntddstor.h"
-
-#define DD_DISK_DEVICE_NAME "\\Device\\UNKNOWN"
-#define DD_DISK_DEVICE_NAME_U L"\\Device\\UNKNOWN"
-
-#define IOCTL_DISK_BASE FILE_DEVICE_DISK
-
-#define IOCTL_DISK_CHECK_VERIFY \
- CTL_CODE(IOCTL_DISK_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_DISK_CONTROLLER_NUMBER \
- CTL_CODE(IOCTL_DISK_BASE, 0x0011, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_DISK_CREATE_DISK \
- CTL_CODE(IOCTL_DISK_BASE, 0x0016, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_DISK_DELETE_DRIVE_LAYOUT \
- CTL_CODE(IOCTL_DISK_BASE, 0x0040, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_DISK_FIND_NEW_DEVICES \
- CTL_CODE(IOCTL_DISK_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_DISK_FORMAT_TRACKS \
- CTL_CODE(IOCTL_DISK_BASE, 0x0006, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_DISK_FORMAT_TRACKS_EX \
- CTL_CODE(IOCTL_DISK_BASE, 0x000b, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_DISK_GET_CACHE_INFORMATION \
- CTL_CODE(IOCTL_DISK_BASE, 0x0035, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_DISK_GET_DRIVE_GEOMETRY \
- CTL_CODE(IOCTL_DISK_BASE, 0x0000, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_DISK_GET_DRIVE_GEOMETRY_EX \
- CTL_CODE(IOCTL_DISK_BASE, 0x0028, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_DISK_GET_DRIVE_LAYOUT \
- CTL_CODE(IOCTL_DISK_BASE, 0x0003, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_DISK_GET_DRIVE_LAYOUT_EX \
- CTL_CODE(IOCTL_DISK_BASE, 0x0014, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_DISK_GET_MEDIA_TYPES \
- CTL_CODE(IOCTL_DISK_BASE, 0x0300, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_DISK_GET_LENGTH_INFO \
- CTL_CODE(IOCTL_DISK_BASE, 0x0017, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_DISK_GET_PARTITION_INFO \
- CTL_CODE(IOCTL_DISK_BASE, 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_DISK_GET_PARTITION_INFO_EX \
- CTL_CODE(IOCTL_DISK_BASE, 0x0012, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_DISK_GROW_PARTITION \
- CTL_CODE(IOCTL_DISK_BASE, 0x0034, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_DISK_INTERNAL_CLEAR_VERIFY \
- CTL_CODE(IOCTL_DISK_BASE, 0x0101, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_DISK_INTERNAL_SET_VERIFY \
- CTL_CODE(IOCTL_DISK_BASE, 0x0100, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_DISK_IS_WRITABLE \
- CTL_CODE(IOCTL_DISK_BASE, 0x0009, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_DISK_PERFORMANCE \
- CTL_CODE(IOCTL_DISK_BASE, 0x0008, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_DISK_PERFORMANCE_OFF \
- CTL_CODE(IOCTL_DISK_BASE, 0x0018, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_DISK_REASSIGN_BLOCKS \
- CTL_CODE(IOCTL_DISK_BASE, 0x0007, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_DISK_RESERVE \
- CTL_CODE(IOCTL_DISK_BASE, 0x0204, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_DISK_SET_CACHE_INFORMATION \
- CTL_CODE(IOCTL_DISK_BASE, 0x0036, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_DISK_SET_DRIVE_LAYOUT \
- CTL_CODE(IOCTL_DISK_BASE, 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_DISK_SET_DRIVE_LAYOUT_EX \
- CTL_CODE(IOCTL_DISK_BASE, 0x0015, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_DISK_SET_PARTITION_INFO \
- CTL_CODE(IOCTL_DISK_BASE, 0x0002, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_DISK_SET_PARTITION_INFO_EX \
- CTL_CODE(IOCTL_DISK_BASE, 0x0013, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_DISK_UPDATE_DRIVE_SIZE \
- CTL_CODE(IOCTL_DISK_BASE, 0x0032, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_DISK_VERIFY \
- CTL_CODE(IOCTL_DISK_BASE, 0x0005, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define SMART_GET_VERSION \
- CTL_CODE(IOCTL_DISK_BASE, 0x0020, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define SMART_RCV_DRIVE_DATA \
- CTL_CODE(IOCTL_DISK_BASE, 0x0022, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define SMART_SEND_DRIVE_COMMAND \
- CTL_CODE(IOCTL_DISK_BASE, 0x0021, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-
-#define PARTITION_ENTRY_UNUSED 0x00
-#define PARTITION_FAT_12 0x01
-#define PARTITION_XENIX_1 0x02
-#define PARTITION_XENIX_2 0x03
-#define PARTITION_FAT_16 0x04
-#define PARTITION_EXTENDED 0x05
-#define PARTITION_HUGE 0x06
-#define PARTITION_IFS 0x07
-#define PARTITION_OS2BOOTMGR 0x0A
-#define PARTITION_FAT32 0x0B
-#define PARTITION_FAT32_XINT13 0x0C
-#define PARTITION_XINT13 0x0E
-#define PARTITION_XINT13_EXTENDED 0x0F
-#define PARTITION_PREP 0x41
-#define PARTITION_LDM 0x42
-#define PARTITION_UNIX 0x63
-#define VALID_NTFT 0xC0
-#define PARTITION_NTFT 0x80
-
-#define IsFTPartition( PartitionType ) \
- (((PartitionType) & PARTITION_NTFT) && \
- IsRecognizedPartition(PartitionType))
-
-#define IsContainerPartition(PartitionType) \
- (((PartitionType) == PARTITION_EXTENDED) || \
- ((PartitionType) == PARTITION_XINT13_EXTENDED))
-
-#define IsRecognizedPartition(PartitionType) ( \
- (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT_12)) || \
- (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_HUGE)) || \
- (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_IFS)) || \
- (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT32)) || \
- (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT32_XINT13)) || \
- (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_XINT13)) || \
- ((PartitionType) == PARTITION_FAT_12) || \
- ((PartitionType) == PARTITION_FAT_16) || \
- ((PartitionType) == PARTITION_HUGE) || \
- ((PartitionType) == PARTITION_IFS) || \
- ((PartitionType) == PARTITION_FAT32) || \
- ((PartitionType) == PARTITION_FAT32_XINT13) || \
- ((PartitionType) == PARTITION_XINT13))
-
-#define WMI_DISK_GEOMETRY_GUID \
- {0x25007f51, 0x57c2, 0x11d1, {0xa5, 0x28, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0x10}}
-
-typedef USHORT BAD_TRACK_NUMBER;
-typedef USHORT *PBAD_TRACK_NUMBER;
-
-typedef enum _MEDIA_TYPE {
- Unknown,
- F5_1Pt2_512,
- F3_1Pt44_512,
- F3_2Pt88_512,
- F3_20Pt8_512,
- F3_720_512,
- F5_360_512,
- F5_320_512,
- F5_320_1024,
- F5_180_512,
- F5_160_512,
- RemovableMedia,
- FixedMedia,
- F3_120M_512,
- F3_640_512,
- F5_640_512,
- F5_720_512,
- F3_1Pt2_512,
- F3_1Pt23_1024,
- F5_1Pt23_1024,
- F3_128Mb_512,
- F3_230Mb_512,
- F8_256_128
-} MEDIA_TYPE, *PMEDIA_TYPE;
-
-typedef enum _DETECTION_TYPE {
- DetectNone,
- DetectInt13,
- DetectExInt13
-} DETECTION_TYPE;
-
-typedef struct _DISK_CONTROLLER_NUMBER {
- ULONG ControllerNumber;
- ULONG DiskNumber;
-} DISK_CONTROLLER_NUMBER, *PDISK_CONTROLLER_NUMBER;
-
-typedef struct _DISK_INT13_INFO {
- USHORT DriveSelect;
- ULONG MaxCylinders;
- USHORT SectorsPerTrack;
- USHORT MaxHeads;
- USHORT NumberDrives;
-} DISK_INT13_INFO, *PDISK_INT13_INFO;
-
-typedef struct _DISK_EX_INT13_INFO {
- USHORT ExBufferSize;
- USHORT ExFlags;
- ULONG ExCylinders;
- ULONG ExHeads;
- ULONG ExSectorsPerTrack;
- ULONG64 ExSectorsPerDrive;
- USHORT ExSectorSize;
- USHORT ExReserved;
-} DISK_EX_INT13_INFO, *PDISK_EX_INT13_INFO;
-
-typedef struct _DISK_DETECTION_INFO {
- ULONG SizeOfDetectInfo;
- DETECTION_TYPE DetectionType;
- _ANONYMOUS_UNION union {
- _ANONYMOUS_STRUCT struct {
- DISK_INT13_INFO Int13;
- DISK_EX_INT13_INFO ExInt13;
- } DUMMYSTRUCTNAME;
- } DUMMYUNIONNAME;
-} DISK_DETECTION_INFO, *PDISK_DETECTION_INFO;
-
-typedef struct _DISK_GEOMETRY {
- LARGE_INTEGER Cylinders;
- MEDIA_TYPE MediaType;
- ULONG TracksPerCylinder;
- ULONG SectorsPerTrack;
- ULONG BytesPerSector;
-} DISK_GEOMETRY, *PDISK_GEOMETRY;
-
-typedef struct _DISK_GEOMETRY_EX {
- DISK_GEOMETRY Geometry;
- LARGE_INTEGER DiskSize;
- UCHAR Data[1];
-} DISK_GEOMETRY_EX, *PDISK_GEOMETRY_EX;
-
-#define DiskGeometryGetPartition(Geometry) \
- ((PDISK_PARTITION_INFO)((Geometry) + 1))
-
-#define DiskGeometryGetDetect(Geometry)\
- ((PDISK_DETECTION_INFO)(((PBYTE)DiskGeometryGetPartition(Geometry) + \
- DiskGeometryGetPartition(Geometry)->SizeOfPartitionInfo)))
-
-typedef struct _PARTITION_INFORMATION {
- LARGE_INTEGER StartingOffset;
- LARGE_INTEGER PartitionLength;
- DWORD HiddenSectors;
- DWORD PartitionNumber;
- BYTE PartitionType;
- BOOLEAN BootIndicator;
- BOOLEAN RecognizedPartition;
- BOOLEAN RewritePartition;
-} PARTITION_INFORMATION, *PPARTITION_INFORMATION;
-
-typedef struct _PARTITION_INFORMATION_GPT {
- GUID PartitionType;
- GUID PartitionId;
- ULONG64 Attributes;
- WCHAR Name [36];
-} PARTITION_INFORMATION_GPT, *PPARTITION_INFORMATION_GPT;
-
-typedef struct _DISK_PARTITION_INFO {
- ULONG SizeOfPartitionInfo;
- PARTITION_STYLE PartitionStyle;
- _ANONYMOUS_UNION union {
- struct {
- ULONG Signature;
- ULONG CheckSum;
- } Mbr;
- struct {
- GUID DiskId;
- } Gpt;
- } DUMMYUNIONNAME;
-} DISK_PARTITION_INFO, *PDISK_PARTITION_INFO;
-
-typedef struct _DISK_PERFORMANCE {
- LARGE_INTEGER BytesRead;
- LARGE_INTEGER BytesWritten;
- LARGE_INTEGER ReadTime;
- LARGE_INTEGER WriteTime;
- LARGE_INTEGER IdleTime;
- ULONG ReadCount;
- ULONG WriteCount;
- ULONG QueueDepth;
- ULONG SplitCount;
- LARGE_INTEGER QueryTime;
- ULONG StorageDeviceNumber;
- WCHAR StorageManagerName[8];
-} DISK_PERFORMANCE, *PDISK_PERFORMANCE;
-
-typedef struct _PARTITION_INFORMATION_EX {
- PARTITION_STYLE PartitionStyle;
- LARGE_INTEGER StartingOffset;
- LARGE_INTEGER PartitionLength;
- ULONG PartitionNumber;
- BOOLEAN RewritePartition;
- _ANONYMOUS_UNION union {
- PARTITION_INFORMATION_MBR Mbr;
- PARTITION_INFORMATION_GPT Gpt;
- } DUMMYUNIONNAME;
-} PARTITION_INFORMATION_EX, *PPARTITION_INFORMATION_EX;
-
-typedef struct _FORMAT_EX_PARAMETERS {
- MEDIA_TYPE MediaType;
- ULONG StartCylinderNumber;
- ULONG EndCylinderNumber;
- ULONG StartHeadNumber;
- ULONG EndHeadNumber;
- USHORT FormatGapLength;
- USHORT SectorsPerTrack;
- USHORT SectorNumber[1];
-} FORMAT_EX_PARAMETERS, *PFORMAT_EX_PARAMETERS;
-
-typedef struct _FORMAT_PARAMETERS {
- MEDIA_TYPE MediaType;
- ULONG StartCylinderNumber;
- ULONG EndCylinderNumber;
- ULONG StartHeadNumber;
- ULONG EndHeadNumber;
-} FORMAT_PARAMETERS, *PFORMAT_PARAMETERS;
-
-typedef struct _GET_LENGTH_INFORMATION {
- LARGE_INTEGER Length;
-} GET_LENGTH_INFORMATION, *PGET_LENGTH_INFORMATION;
-
-typedef struct _REASSIGN_BLOCKS {
- WORD Reserved;
- WORD Count;
- DWORD BlockNumber[1];
-} REASSIGN_BLOCKS, *PREASSIGN_BLOCKS;
-
-typedef struct _SET_PARTITION_INFORMATION {
- UCHAR PartitionType;
-} SET_PARTITION_INFORMATION, *PSET_PARTITION_INFORMATION;
-
-typedef SET_PARTITION_INFORMATION SET_PARTITION_INFORMATION_MBR;
-typedef PARTITION_INFORMATION_GPT SET_PARTITION_INFORMATION_GPT;
-
-typedef struct _SET_PARTITION_INFORMATION_EX {
- PARTITION_STYLE PartitionStyle;
- _ANONYMOUS_UNION union {
- SET_PARTITION_INFORMATION_MBR Mbr;
- SET_PARTITION_INFORMATION_GPT Gpt;
- } DUMMYUNIONNAME;
-} SET_PARTITION_INFORMATION_EX, *PSET_PARTITION_INFORMATION_EX;
-
-typedef struct _VERIFY_INFORMATION {
- LARGE_INTEGER StartingOffset;
- DWORD Length;
-} VERIFY_INFORMATION, *PVERIFY_INFORMATION;
-
-typedef enum {
- EqualPriority,
- KeepPrefetchedData,
- KeepReadData
-} DISK_CACHE_RETENTION_PRIORITY;
-
-typedef struct _DISK_CACHE_INFORMATION {
- BOOLEAN ParametersSavable;
- BOOLEAN ReadCacheEnabled;
- BOOLEAN WriteCacheEnabled;
- DISK_CACHE_RETENTION_PRIORITY ReadRetentionPriority;
- DISK_CACHE_RETENTION_PRIORITY WriteRetentionPriority;
- USHORT DisablePrefetchTransferLength;
- BOOLEAN PrefetchScalar;
- _ANONYMOUS_UNION union {
- struct {
- USHORT Minimum;
- USHORT Maximum;
- USHORT MaximumBlocks;
- } ScalarPrefetch;
- struct {
- USHORT Minimum;
- USHORT Maximum;
- } BlockPrefetch;
- } DUMMYUNIONNAME;
-} DISK_CACHE_INFORMATION, *PDISK_CACHE_INFORMATION;
-
-typedef struct _DISK_GROW_PARTITION {
- ULONG PartitionNumber;
- LARGE_INTEGER BytesToGrow;
-} DISK_GROW_PARTITION, *PDISK_GROW_PARTITION;
-
-/* GETVERSIONINPARAMS.fCapabilities constants */
-#define CAP_ATA_ID_CMD 1
-#define CAP_ATAPI_ID_CMD 2
-#define CAP_SMART_CMD 4
-
-typedef struct _GETVERSIONINPARAMS {
- UCHAR bVersion;
- UCHAR bRevision;
- UCHAR bReserved;
- UCHAR bIDEDeviceMap;
- ULONG fCapabilities;
- ULONG dwReserved[4];
-} GETVERSIONINPARAMS, *PGETVERSIONINPARAMS, *LPGETVERSIONINPARAMS;
-
-/* IDEREGS.bCommandReg constants */
-#define ATAPI_ID_CMD 0xA1
-#define ID_CMD 0xEC
-#define SMART_CMD 0xB0
-
-#define SMART_CYL_LOW 0x4F
-#define SMART_CYL_HI 0xC2
-
-typedef struct _IDEREGS {
- UCHAR bFeaturesReg;
- UCHAR bSectorCountReg;
- UCHAR bSectorNumberReg;
- UCHAR bCylLowReg;
- UCHAR bCylHighReg;
- UCHAR bDriveHeadReg;
- UCHAR bCommandReg;
- UCHAR bReserved;
-} IDEREGS, *PIDEREGS, *LPIDEREGS;
-
-#include <pshpack1.h>
-typedef struct _SENDCMDINPARAMS {
- ULONG cBufferSize;
- IDEREGS irDriveRegs;
- UCHAR bDriveNumber;
- UCHAR bReserved[3];
- ULONG dwReserved[4];
- UCHAR bBuffer[1];
-} SENDCMDINPARAMS, *PSENDCMDINPARAMS, *LPSENDCMDINPARAMS;
-#include <poppack.h>
-
-/* DRIVERSTATUS.bDriverError constants */
-#define SMART_NO_ERROR 0
-#define SMART_IDE_ERROR 1
-#define SMART_INVALID_FLAG 2
-#define SMART_INVALID_COMMAND 3
-#define SMART_INVALID_BUFFER 4
-#define SMART_INVALID_DRIVE 5
-#define SMART_INVALID_IOCTL 6
-#define SMART_ERROR_NO_MEM 7
-#define SMART_INVALID_REGISTER 8
-#define SMART_NOT_SUPPORTED 9
-#define SMART_NO_IDE_DEVICE 10
-
-#define SMART_OFFLINE_ROUTINE_OFFLINE 0
-#define SMART_SHORT_SELFTEST_OFFLINE 1
-#define SMART_EXTENDED_SELFTEST_OFFLINE 2
-#define SMART_ABORT_OFFLINE_SELFTEST 127
-#define SMART_SHORT_SELFTEST_CAPTIVE 129
-#define SMART_EXTENDED_SELFTEST_CAPTIVE 130
-
-typedef struct _DRIVERSTATUS {
- UCHAR bDriverError;
- UCHAR bIDEError;
- UCHAR bReserved[2];
- ULONG dwReserved[2];
-} DRIVERSTATUS, *PDRIVERSTATUS, *LPDRIVERSTATUS;
-
-#define READ_ATTRIBUTE_BUFFER_SIZE 512
-#define IDENTIFY_BUFFER_SIZE 512
-#define READ_THRESHOLD_BUFFER_SIZE 512
-#define SMART_LOG_SECTOR_SIZE 512
-
-#include <pshpack1.h>
-typedef struct _SENDCMDOUTPARAMS {
- ULONG cBufferSize;
- DRIVERSTATUS DriverStatus;
- UCHAR bBuffer[1];
-} SENDCMDOUTPARAMS, *PSENDCMDOUTPARAMS, *LPSENDCMDOUTPARAMS;
-#include <poppack.h>
-
-#define READ_ATTRIBUTES 0xD0
-#define READ_THRESHOLDS 0xD1
-#define ENABLE_DISABLE_AUTOSAVE 0xD2
-#define SAVE_ATTRIBUTE_VALUES 0xD3
-#define EXECUTE_OFFLINE_DIAGS 0xD4
-#define SMART_READ_LOG 0xD5
-#define SMART_WRITE_LOG 0xd6
-#define ENABLE_SMART 0xD8
-#define DISABLE_SMART 0xD9
-#define RETURN_SMART_STATUS 0xDA
-#define ENABLE_DISABLE_AUTO_OFFLINE 0xDB
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NTDDDISK_H */
diff --git a/winsup/w32api/include/ddk/ntddk.h b/winsup/w32api/include/ddk/ntddk.h
deleted file mode 100644
index 60a99ef..0000000
--- a/winsup/w32api/include/ddk/ntddk.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * ntddk.h
- *
- * Windows Device Driver Kit
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * DEFINES:
- * DBG - Debugging enabled/disabled (0/1)
- * POOL_TAGGING - Enable pool tagging
- * _X86_ - X86 environment
- * __USE_NTOSKRNL__ - Use ntoskrnl.exe exports instead of kernel32.dll
- */
-
-#ifndef __NTDDK_H
-#define __NTDDK_H
-
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifndef __USE_NTOSKRNL__
-#define __USE_NTOSKRNL__ 1
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdarg.h>
-#include <windef.h>
-#include <ntdef.h>
-#include <basetyps.h>
-
-/* Base types, structures and definitions */
-typedef short CSHORT;
-typedef CONST int CINT;
-typedef CONST char *PCSZ;
-
-#ifndef STATIC
-#define STATIC static
-#endif
-
-#ifndef CALLBACK
-#define CALLBACK
-#endif
-
-#ifndef DECL_IMPORT
-#define DECL_IMPORT __declspec(dllimport)
-#endif
-
-#ifndef DECL_EXPORT
-#define DECL_EXPORT __declspec(dllexport)
-#endif
-
-/* Windows NT status codes */
-#include "ntstatus.h"
-
-/* Windows NT definitions exported to user mode */
-#include <winnt.h>
-
-/* Windows Device Driver Kit */
-#include "winddk.h"
-
-/* Definitions only in Windows XP */
-#include "winxp.h"
-
-/* Definitions only in Windows 2000 */
-#include "win2k.h"
-
-/* Definitions only in Windows NT 4 */
-#include "winnt4.h"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NTDDK_H */
diff --git a/winsup/w32api/include/ddk/ntddkbd.h b/winsup/w32api/include/ddk/ntddkbd.h
deleted file mode 100644
index 93bc690..0000000
--- a/winsup/w32api/include/ddk/ntddkbd.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * ntddkbd.h
- *
- * Keyboard IOCTL interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NTDDKBD_H
-#define __NTDDKBD_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-#define DD_KEYBOARD_DEVICE_NAME "\\Device\\KeyboardClass"
-#define DD_KEYBOARD_DEVICE_NAME_U L"\\Device\\KeyboardClass"
-
-#define IOCTL_KEYBOARD_QUERY_ATTRIBUTES \
- CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0000, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_KEYBOARD_QUERY_INDICATORS \
- CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0010, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_KEYBOARD_QUERY_INDICATOR_TRANSLATION \
- CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0020, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_KEYBOARD_QUERY_TYPEMATIC \
- CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0008, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_KEYBOARD_SET_TYPEMATIC \
- CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0001, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_KEYBOARD_SET_INDICATORS \
- CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0002, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-
-DEFINE_GUID(GUID_DEVINTERFACE_KEYBOARD, \
- 0x884b96c3, 0x56ef, 0x11d1, 0xbc, 0x8c, 0x00, 0xa0, 0xc9, 0x14, 0x05, 0xdd);
-
-#define KEYBOARD_ERROR_VALUE_BASE 10000
-
-/* KEYBOARD_INPUT_DATA.MakeCode constants */
-#define KEYBOARD_OVERRUN_MAKE_CODE 0xFF
-
-/* KEYBOARD_INPUT_DATA.Flags constants */
-#define KEY_MAKE 0
-#define KEY_BREAK 1
-#define KEY_E0 2
-#define KEY_E1 4
-
-typedef struct _KEYBOARD_INPUT_DATA {
- USHORT UnitId;
- USHORT MakeCode;
- USHORT Flags;
- USHORT Reserved;
- ULONG ExtraInformation;
-} KEYBOARD_INPUT_DATA, *PKEYBOARD_INPUT_DATA;
-
-
-typedef struct _KEYBOARD_TYPEMATIC_PARAMETERS {
- USHORT UnitId;
- USHORT Rate;
- USHORT Delay;
-} KEYBOARD_TYPEMATIC_PARAMETERS, *PKEYBOARD_TYPEMATIC_PARAMETERS;
-
-typedef struct _KEYBOARD_ID {
- UCHAR Type;
- UCHAR Subtype;
-} KEYBOARD_ID, *PKEYBOARD_ID;
-
-#define ENHANCED_KEYBOARD(Id) ((Id).Type == 2 || (Id).Type == 4 || FAREAST_KEYBOARD(Id))
-#define FAREAST_KEYBOARD(Id) ((Id).Type == 7 || (Id).Type == 8)
-
-typedef struct _KEYBOARD_INDICATOR_PARAMETERS {
- USHORT UnitId;
- USHORT LedFlags;
-} KEYBOARD_INDICATOR_PARAMETERS, *PKEYBOARD_INDICATOR_PARAMETERS;
-
-typedef struct _INDICATOR_LIST {
- USHORT MakeCode;
- USHORT IndicatorFlags;
-} INDICATOR_LIST, *PINDICATOR_LIST;
-
-typedef struct _KEYBOARD_INDICATOR_TRANSLATION {
- USHORT NumberOfIndicatorKeys;
- INDICATOR_LIST IndicatorList[1];
-} KEYBOARD_INDICATOR_TRANSLATION, *PKEYBOARD_INDICATOR_TRANSLATION;
-
-typedef struct _KEYBOARD_ATTRIBUTES {
- KEYBOARD_ID KeyboardIdentifier;
- USHORT KeyboardMode;
- USHORT NumberOfFunctionKeys;
- USHORT NumberOfIndicators;
- USHORT NumberOfKeysTotal;
- ULONG InputDataQueueLength;
- KEYBOARD_TYPEMATIC_PARAMETERS KeyRepeatMinimum;
- KEYBOARD_TYPEMATIC_PARAMETERS KeyRepeatMaximum;
-} KEYBOARD_ATTRIBUTES, *PKEYBOARD_ATTRIBUTES;
-
-typedef struct _KEYBOARD_UNIT_ID_PARAMETER {
- USHORT UnitId;
-} KEYBOARD_UNIT_ID_PARAMETER, *PKEYBOARD_UNIT_ID_PARAMETER;
-
-typedef struct _KEYBOARD_IME_STATUS {
- USHORT UnitId;
- ULONG ImeOpen;
- ULONG ImeConvMode;
-} KEYBOARD_IME_STATUS, *PKEYBOARD_IME_STATUS;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NTDDKBD_H */
diff --git a/winsup/w32api/include/ddk/ntddmou.h b/winsup/w32api/include/ddk/ntddmou.h
deleted file mode 100644
index fcf9445..0000000
--- a/winsup/w32api/include/ddk/ntddmou.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * ntddmou.h
- *
- * Mouse device IOCTL interface.
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NTDDMOU_H
-#define __NTDDMOU_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-#define DD_MOUSE_DEVICE_NAME "\\Device\\PointerClass"
-#define DD_MOUSE_DEVICE_NAME_U L"\\Device\\PointerClass"
-
-#define IOCTL_MOUSE_QUERY_ATTRIBUTES \
- CTL_CODE(FILE_DEVICE_MOUSE, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-DEFINE_GUID(GUID_DEVINTERFACE_MOUSE, \
- 0x378de44c, 0x56ef, 0x11d1, 0xbc, 0x8c, 0x00, 0xa0, 0xc9, 0x14, 0x05, 0xdd);
-
-#define MOUSE_ERROR_VALUE_BASE 20000
-
-/* MOUSE_INPUT_DATA.ButtonFlags constants */
-#define MOUSE_LEFT_BUTTON_DOWN 0x0001
-#define MOUSE_LEFT_BUTTON_UP 0x0002
-#define MOUSE_RIGHT_BUTTON_DOWN 0x0004
-#define MOUSE_RIGHT_BUTTON_UP 0x0008
-#define MOUSE_MIDDLE_BUTTON_DOWN 0x0010
-#define MOUSE_MIDDLE_BUTTON_UP 0x0020
-#define MOUSE_BUTTON_4_DOWN 0x0040
-#define MOUSE_BUTTON_4_UP 0x0080
-#define MOUSE_BUTTON_5_DOWN 0x0100
-#define MOUSE_BUTTON_5_UP 0x0200
-#define MOUSE_WHEEL 0x0400
-
-#define MOUSE_BUTTON_1_DOWN MOUSE_LEFT_BUTTON_DOWN
-#define MOUSE_BUTTON_1_UP MOUSE_LEFT_BUTTON_UP
-#define MOUSE_BUTTON_2_DOWN MOUSE_RIGHT_BUTTON_DOWN
-#define MOUSE_BUTTON_2_UP MOUSE_RIGHT_BUTTON_UP
-#define MOUSE_BUTTON_3_DOWN MOUSE_MIDDLE_BUTTON_DOWN
-#define MOUSE_BUTTON_3_UP MOUSE_MIDDLE_BUTTON_UP
-
-/* MOUSE_INPUT_DATA.Flags constants */
-#define MOUSE_MOVE_RELATIVE 0
-#define MOUSE_MOVE_ABSOLUTE 1
-#define MOUSE_VIRTUAL_DESKTOP 0x02
-#define MOUSE_ATTRIBUTES_CHANGED 0x04
-
-typedef struct _MOUSE_INPUT_DATA {
- USHORT UnitId;
- USHORT Flags;
- _ANONYMOUS_UNION union {
- ULONG Buttons;
- _ANONYMOUS_STRUCT struct {
- USHORT ButtonFlags;
- USHORT ButtonData;
- } DUMMYSTRUCTNAME;
- } DUMMYUNIONNAME;
- ULONG RawButtons;
- LONG LastX;
- LONG LastY;
- ULONG ExtraInformation;
-} MOUSE_INPUT_DATA, *PMOUSE_INPUT_DATA;
-
-typedef struct _MOUSE_UNIT_ID_PARAMETER {
- USHORT UnitId;
-} MOUSE_UNIT_ID_PARAMETER, *PMOUSE_UNIT_ID_PARAMETER;
-
-/* MOUSE_ATTRIBUTES.MouseIdentifier constants */
-#define MOUSE_INPORT_HARDWARE 0x0001
-#define MOUSE_I8042_HARDWARE 0x0002
-#define MOUSE_SERIAL_HARDWARE 0x0004
-#define BALLPOINT_I8042_HARDWARE 0x0008
-#define BALLPOINT_SERIAL_HARDWARE 0x0010
-#define WHEELMOUSE_I8042_HARDWARE 0x0020
-#define WHEELMOUSE_SERIAL_HARDWARE 0x0040
-#define MOUSE_HID_HARDWARE 0x0080
-#define WHEELMOUSE_HID_HARDWARE 0x0100
-
-typedef struct _MOUSE_ATTRIBUTES {
- USHORT MouseIdentifier;
- USHORT NumberOfButtons;
- USHORT SampleRate;
- ULONG InputDataQueueLength;
-} MOUSE_ATTRIBUTES, *PMOUSE_ATTRIBUTES;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NTDDMOU_H */
diff --git a/winsup/w32api/include/ddk/ntddndis.h b/winsup/w32api/include/ddk/ntddndis.h
deleted file mode 100644
index 06b2cd0..0000000
--- a/winsup/w32api/include/ddk/ntddndis.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * ntddndis.h
- *
- * NDIS device driver interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NTDDNDIS_H
-#define __NTDDNDIS_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#pragma pack(push,4)
-
-#include "ntddk.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum _NDIS_WAN_QUALITY {
- NdisWanRaw,
- NdisWanErrorControl,
- NdisWanReliable
-} NDIS_WAN_QUALITY, *PNDIS_WAN_QUALITY;
-
-typedef enum _NDIS_DEVICE_POWER_STATE {
- NdisDeviceStateUnspecified = 0,
- NdisDeviceStateD0,
- NdisDeviceStateD1,
- NdisDeviceStateD2,
- NdisDeviceStateD3,
- NdisDeviceStateMaximum
-} NDIS_DEVICE_POWER_STATE, *PNDIS_DEVICE_POWER_STATE;
-
-typedef struct _NDIS_PM_WAKE_UP_CAPABILITIES {
- NDIS_DEVICE_POWER_STATE MinMagicPacketWakeUp;
- NDIS_DEVICE_POWER_STATE MinPatternWakeUp;
- NDIS_DEVICE_POWER_STATE MinLinkChangeWakeUp;
-} NDIS_PM_WAKE_UP_CAPABILITIES, *PNDIS_PM_WAKE_UP_CAPABILITIES;
-
-/* NDIS_PNP_CAPABILITIES.Flags constants */
-#define NDIS_DEVICE_WAKE_UP_ENABLE 0x00000001
-#define NDIS_DEVICE_WAKE_ON_PATTERN_MATCH_ENABLE 0x00000002
-#define NDIS_DEVICE_WAKE_ON_MAGIC_PACKET_ENABLE 0x00000004
-
-typedef struct _NDIS_PNP_CAPABILITIES {
- ULONG Flags;
- NDIS_PM_WAKE_UP_CAPABILITIES WakeUpCapabilities;
-} NDIS_PNP_CAPABILITIES, *PNDIS_PNP_CAPABILITIES;
-
-/* Required Object IDs (OIDs) */
-#define OID_GEN_SUPPORTED_LIST 0x00010101
-#define OID_GEN_HARDWARE_STATUS 0x00010102
-#define OID_GEN_MEDIA_SUPPORTED 0x00010103
-#define OID_GEN_MEDIA_IN_USE 0x00010104
-#define OID_GEN_MAXIMUM_LOOKAHEAD 0x00010105
-#define OID_GEN_MAXIMUM_FRAME_SIZE 0x00010106
-#define OID_GEN_LINK_SPEED 0x00010107
-#define OID_GEN_TRANSMIT_BUFFER_SPACE 0x00010108
-#define OID_GEN_RECEIVE_BUFFER_SPACE 0x00010109
-#define OID_GEN_TRANSMIT_BLOCK_SIZE 0x0001010A
-#define OID_GEN_RECEIVE_BLOCK_SIZE 0x0001010B
-#define OID_GEN_VENDOR_ID 0x0001010C
-#define OID_GEN_VENDOR_DESCRIPTION 0x0001010D
-#define OID_GEN_CURRENT_PACKET_FILTER 0x0001010E
-#define OID_GEN_CURRENT_LOOKAHEAD 0x0001010F
-#define OID_GEN_DRIVER_VERSION 0x00010110
-#define OID_GEN_MAXIMUM_TOTAL_SIZE 0x00010111
-#define OID_GEN_PROTOCOL_OPTIONS 0x00010112
-#define OID_GEN_MAC_OPTIONS 0x00010113
-#define OID_GEN_MEDIA_CONNECT_STATUS 0x00010114
-#define OID_GEN_MAXIMUM_SEND_PACKETS 0x00010115
-#define OID_GEN_VENDOR_DRIVER_VERSION 0x00010116
-#define OID_GEN_SUPPORTED_GUIDS 0x00010117
-#define OID_GEN_NETWORK_LAYER_ADDRESSES 0x00010118
-#define OID_GEN_TRANSPORT_HEADER_OFFSET 0x00010119
-#define OID_GEN_MACHINE_NAME 0x0001021A
-#define OID_GEN_RNDIS_CONFIG_PARAMETER 0x0001021B
-#define OID_GEN_VLAN_ID 0x0001021C
-
-/* Optional OIDs */
-#define OID_GEN_MEDIA_CAPABILITIES 0x00010201
-#define OID_GEN_PHYSICAL_MEDIUM 0x00010202
-
-/* Required statistics OIDs */
-#define OID_GEN_XMIT_OK 0x00020101
-#define OID_GEN_RCV_OK 0x00020102
-#define OID_GEN_XMIT_ERROR 0x00020103
-#define OID_GEN_RCV_ERROR 0x00020104
-#define OID_GEN_RCV_NO_BUFFER 0x00020105
-
-/* Optional statistics OIDs */
-#define OID_GEN_DIRECTED_BYTES_XMIT 0x00020201
-#define OID_GEN_DIRECTED_FRAMES_XMIT 0x00020202
-#define OID_GEN_MULTICAST_BYTES_XMIT 0x00020203
-#define OID_GEN_MULTICAST_FRAMES_XMIT 0x00020204
-#define OID_GEN_BROADCAST_BYTES_XMIT 0x00020205
-#define OID_GEN_BROADCAST_FRAMES_XMIT 0x00020206
-#define OID_GEN_DIRECTED_BYTES_RCV 0x00020207
-#define OID_GEN_DIRECTED_FRAMES_RCV 0x00020208
-#define OID_GEN_MULTICAST_BYTES_RCV 0x00020209
-#define OID_GEN_MULTICAST_FRAMES_RCV 0x0002020A
-#define OID_GEN_BROADCAST_BYTES_RCV 0x0002020B
-#define OID_GEN_BROADCAST_FRAMES_RCV 0x0002020C
-#define OID_GEN_RCV_CRC_ERROR 0x0002020D
-#define OID_GEN_TRANSMIT_QUEUE_LENGTH 0x0002020E
-#define OID_GEN_GET_TIME_CAPS 0x0002020F
-#define OID_GEN_GET_NETCARD_TIME 0x00020210
-#define OID_GEN_NETCARD_LOAD 0x00020211
-#define OID_GEN_DEVICE_PROFILE 0x00020212
-#define OID_GEN_INIT_TIME_MS 0x00020213
-#define OID_GEN_RESET_COUNTS 0x00020214
-#define OID_GEN_MEDIA_SENSE_COUNTS 0x00020215
-#define OID_GEN_FRIENDLY_NAME 0x00020216
-#define OID_GEN_MINIPORT_INFO 0x00020217
-#define OID_GEN_RESET_VERIFY_PARAMETERS 0x00020218
-
-/* IEEE 802.3 (Ethernet) OIDs */
-#define NDIS_802_3_MAC_OPTION_PRIORITY 0x00000001
-
-#define OID_802_3_PERMANENT_ADDRESS 0x01010101
-#define OID_802_3_CURRENT_ADDRESS 0x01010102
-#define OID_802_3_MULTICAST_LIST 0x01010103
-#define OID_802_3_MAXIMUM_LIST_SIZE 0x01010104
-#define OID_802_3_MAC_OPTIONS 0x01010105
-#define OID_802_3_RCV_ERROR_ALIGNMENT 0x01020101
-#define OID_802_3_XMIT_ONE_COLLISION 0x01020102
-#define OID_802_3_XMIT_MORE_COLLISIONS 0x01020103
-#define OID_802_3_XMIT_DEFERRED 0x01020201
-#define OID_802_3_XMIT_MAX_COLLISIONS 0x01020202
-#define OID_802_3_RCV_OVERRUN 0x01020203
-#define OID_802_3_XMIT_UNDERRUN 0x01020204
-#define OID_802_3_XMIT_HEARTBEAT_FAILURE 0x01020205
-#define OID_802_3_XMIT_TIMES_CRS_LOST 0x01020206
-#define OID_802_3_XMIT_LATE_COLLISIONS 0x01020207
-
-/* OID_GEN_MINIPORT_INFO constants */
-#define NDIS_MINIPORT_BUS_MASTER 0x00000001
-#define NDIS_MINIPORT_WDM_DRIVER 0x00000002
-#define NDIS_MINIPORT_SG_LIST 0x00000004
-#define NDIS_MINIPORT_SUPPORTS_MEDIA_QUERY 0x00000008
-#define NDIS_MINIPORT_INDICATES_PACKETS 0x00000010
-#define NDIS_MINIPORT_IGNORE_PACKET_QUEUE 0x00000020
-#define NDIS_MINIPORT_IGNORE_REQUEST_QUEUE 0x00000040
-#define NDIS_MINIPORT_IGNORE_TOKEN_RING_ERRORS 0x00000080
-#define NDIS_MINIPORT_INTERMEDIATE_DRIVER 0x00000100
-#define NDIS_MINIPORT_IS_NDIS_5 0x00000200
-#define NDIS_MINIPORT_IS_CO 0x00000400
-#define NDIS_MINIPORT_DESERIALIZE 0x00000800
-#define NDIS_MINIPORT_REQUIRES_MEDIA_POLLING 0x00001000
-#define NDIS_MINIPORT_SUPPORTS_MEDIA_SENSE 0x00002000
-#define NDIS_MINIPORT_NETBOOT_CARD 0x00004000
-#define NDIS_MINIPORT_PM_SUPPORTED 0x00008000
-#define NDIS_MINIPORT_SUPPORTS_MAC_ADDRESS_OVERWRITE 0x00010000
-#define NDIS_MINIPORT_USES_SAFE_BUFFER_APIS 0x00020000
-#define NDIS_MINIPORT_HIDDEN 0x00040000
-#define NDIS_MINIPORT_SWENUM 0x00080000
-#define NDIS_MINIPORT_SURPRISE_REMOVE_OK 0x00100000
-#define NDIS_MINIPORT_NO_HALT_ON_SUSPEND 0x00200000
-#define NDIS_MINIPORT_HARDWARE_DEVICE 0x00400000
-#define NDIS_MINIPORT_SUPPORTS_CANCEL_SEND_PACKETS 0x00800000
-#define NDIS_MINIPORT_64BITS_DMA 0x01000000
-
-#pragma pack(pop)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NTDDNDIS_H */
diff --git a/winsup/w32api/include/ddk/ntddpar.h b/winsup/w32api/include/ddk/ntddpar.h
deleted file mode 100644
index 1b42365..0000000
--- a/winsup/w32api/include/ddk/ntddpar.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * ntddpar.h
- *
- * Parallel port driver interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NTDDPAR_H
-#define __NTDDPAR_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-/* Parallel port device GUIDs */
-
-DEFINE_GUID (GUID_DEVINTERFACE_PARALLEL,
- 0x97F76EF0, 0xF883, 0x11D0, 0xAF, 0x1F, 0x00, 0x00, 0xF8, 0x00, 0x84, 0x5C);
-DEFINE_GUID (GUID_DEVINTERFACE_PARCLASS,
- 0x811FC6A5, 0xF728, 0x11D0, 0xA5, 0x37, 0x00, 0x00, 0xF8, 0x75, 0x3E, 0xD1);
-
-#define GUID_PARALLEL_DEVICE GUID_DEVINTERFACE_PARALLEL
-#define GUID_PARCLASS_DEVICE GUID_DEVINTERFACE_PARCLASS
-
-
-#define IOCTL_IEEE1284_GET_MODE \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_IEEE1284_NEGOTIATE \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_PAR_GET_DEFAULT_MODES \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 10, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_PAR_GET_DEVICE_CAPS \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 9, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_PAR_IS_PORT_FREE \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 21, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_PAR_QUERY_DEVICE_ID \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 3, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_PAR_QUERY_DEVICE_ID_SIZE \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_PAR_QUERY_INFORMATION \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_PAR_QUERY_LOCATION \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 22, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_PAR_QUERY_RAW_DEVICE_ID \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 12, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_PAR_SET_INFORMATION \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_PAR_SET_READ_ADDRESS \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_PAR_SET_WRITE_ADDRESS \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-typedef struct _PAR_DEVICE_ID_SIZE_INFORMATION {
- ULONG DeviceIdSize;
-} PAR_DEVICE_ID_SIZE_INFORMATION, *PPAR_DEVICE_ID_SIZE_INFORMATION;
-
-#define PARALLEL_INIT 0x01
-#define PARALLEL_AUTOFEED 0x02
-#define PARALLEL_PAPER_EMPTY 0x04
-#define PARALLEL_OFF_LINE 0x08
-#define PARALLEL_POWER_OFF 0x10
-#define PARALLEL_NOT_CONNECTED 0x20
-#define PARALLEL_BUSY 0x40
-#define PARALLEL_SELECTED 0x80
-
-typedef struct _PAR_QUERY_INFORMATION {
- UCHAR Status;
-} PAR_QUERY_INFORMATION, *PPAR_QUERY_INFORMATION;
-
-typedef struct _PAR_SET_INFORMATION {
- UCHAR Init;
-} PAR_SET_INFORMATION, *PPAR_SET_INFORMATION;
-
-typedef struct _PARCLASS_NEGOTIATION_MASK {
- USHORT usReadMask;
- USHORT usWriteMask;
-} PARCLASS_NEGOTIATION_MASK, *PPARCLASS_NEGOTIATION_MASK;
-
-#define NONE 0x0000
-#define CENTRONICS 0x0001
-#define IEEE_COMPATIBILITY 0x0002
-#define NIBBLE 0x0004
-#define CHANNEL_NIBBLE 0x0008
-#define BYTE_BIDIR 0x0010
-#define EPP_HW 0x0020
-#define EPP_SW 0x0040
-#define EPP_ANY 0x0060
-#define BOUNDED_ECP 0x0080
-#define ECP_HW_NOIRQ 0x0100
-#define ECP_HW_IRQ 0x0200
-#define ECP_SW 0x0400
-#define ECP_ANY 0x0780
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NTDDPAR_H */
diff --git a/winsup/w32api/include/ddk/ntddpcm.h b/winsup/w32api/include/ddk/ntddpcm.h
deleted file mode 100644
index fc65075..0000000
--- a/winsup/w32api/include/ddk/ntddpcm.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * ntddpcm.h
- *
- * PCMCIA IOCTL interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NTDDPCM_H
-#define __NTDDPCM_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-#define IOCTL_PCMCIA_BASE FILE_DEVICE_CONTROLLER
-
-#define DD_PCMCIA_DEVICE_NAME "\\\\.\\Pcmcia"
-#define DD_PCMCIA_DEVICE_NAME_U L"\\\\.\\Pcmcia"
-
-#define IOCTL_GET_TUPLE_DATA \
- CTL_CODE(IOCTL_PCMCIA_BASE, 3000, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_SOCKET_INFORMATION \
- CTL_CODE(IOCTL_PCMCIA_BASE, 3004, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define DEVICE_IDENTIFIER_LENGTH 64
-#define DRIVER_NAME_LENGTH 32
-#define MANUFACTURER_NAME_LENGTH 64
-
-#define PcmciaInvalidControllerType 0xffffffff
-
-typedef struct _TUPLE_REQUEST {
- USHORT Socket;
-} TUPLE_REQUEST, *PTUPLE_REQUEST;
-
-typedef enum _PCMCIA_CONTROLLER_CLASS {
- PcmciaInvalidControllerClass = -1,
- PcmciaIntelCompatible,
- PcmciaCardBusCompatible,
- PcmciaElcController,
- PcmciaDatabook,
- PcmciaPciPcmciaBridge,
- PcmciaCirrusLogic,
- PcmciaTI,
- PcmciaTopic,
- PcmciaRicoh,
- PcmciaDatabookCB,
- PcmciaOpti,
- PcmciaTrid,
- PcmciaO2Micro,
- PcmciaNEC,
- PcmciaNEC_98
-} PCMCIA_CONTROLLER_CLASS, *PPCMCIA_CONTROLLER_CLASS;
-
-typedef struct _PCMCIA_SOCKET_INFORMATION {
- USHORT Socket;
- USHORT TupleCrc;
- UCHAR Manufacturer[MANUFACTURER_NAME_LENGTH];
- UCHAR Identifier[DEVICE_IDENTIFIER_LENGTH];
- UCHAR DriverName[DRIVER_NAME_LENGTH];
- UCHAR DeviceFunctionId;
- UCHAR Reserved;
- UCHAR CardInSocket;
- UCHAR CardEnabled;
- ULONG ControllerType;
-} PCMCIA_SOCKET_INFORMATION, *PPCMCIA_SOCKET_INFORMATION;
-
-#define PcmciaClassFromControllerType(type) ((PCMCIA_CONTROLLER_CLASS)((type) & 0xff))
-#define PcmciaModelFromControllerType(type) (((type) >> 8) & 0x3ffff)
-#define PcmciaRevisionFromControllerType(type) ((type) >> 26)
-
-
-DEFINE_GUID(GUID_PCMCIA_INTERFACE_STANDARD, \
- 0xbed5dadfL, 0x38fb, 0x11d1, 0x94, 0x62, 0x00, 0xc0, 0x4f, 0xb9, 0x60, 0xee);
-
-typedef ULONG MEMORY_SPACE;
-
-typedef ULONG STDCALL
-(*PPCMCIA_READ_WRITE_CONFIG)(
- /*IN*/ PVOID Context,
- /*IN*/ ULONG WhichSpace,
- /*IN*/ PUCHAR Buffer,
- /*IN*/ ULONG Offset,
- /*IN*/ ULONG Length);
-
-#define PCCARD_PCI_CONFIGURATION_SPACE 0
-#define PCCARD_ATTRIBUTE_MEMORY 1
-#define PCCARD_COMMON_MEMORY 2
-#define PCCARD_ATTRIBUTE_MEMORY_INDIRECT 3
-#define PCCARD_COMMON_MEMORY_INDIRECT 4
-
-typedef struct _PCMCIA_BUS_INTERFACE_STANDARD {
- USHORT Size;
- USHORT Version;
- PVOID Context;
- PINTERFACE_REFERENCE InterfaceReference;
- PINTERFACE_DEREFERENCE InterfaceDereference;
- PPCMCIA_READ_WRITE_CONFIG ReadConfig;
- PPCMCIA_READ_WRITE_CONFIG WriteConfig;
-} PCMCIA_BUS_INTERFACE_STANDARD, *PPCMCIA_BUS_INTERFACE_STANDARD;
-
-#define PCMCIA_MEMORY_8BIT_ACCESS 0
-#define PCMCIA_MEMORY_16BIT_ACCESS 1
-
-typedef BOOLEAN STDCALL
-(*PPCMCIA_MODIFY_MEMORY_WINDOW)(
- /*IN*/ PVOID Context,
- /*IN*/ ULONGLONG HostBase,
- /*IN*/ ULONGLONG CardBase,
- /*IN*/ BOOLEAN Enable,
- /*IN*/ ULONG WindowSize /*OPTIONAL*/,
- /*IN*/ UCHAR AccessSpeed /*OPTIONAL*/,
- /*IN*/ UCHAR BusWidth /*OPTIONAL*/,
- /*IN*/ BOOLEAN IsAttributeMemory /*OPTIONAL*/);
-
-#define PCMCIA_VPP_0V 0
-#define PCMCIA_VPP_12V 1
-#define PCMCIA_VPP_IS_VCC 2
-
-typedef BOOLEAN STDCALL
-(*PPCMCIA_SET_VPP)(
- /*IN*/ PVOID Context,
- /*IN*/ UCHAR VppLevel);
-
-typedef BOOLEAN STDCALL
-(*PPCMCIA_IS_WRITE_PROTECTED)(
- /*IN*/ PVOID Context);
-
-typedef struct _PCMCIA_INTERFACE_STANDARD {
- USHORT Size;
- USHORT Version;
- PINTERFACE_REFERENCE InterfaceReference;
- PINTERFACE_DEREFERENCE InterfaceDereference;
- PVOID Context;
- PPCMCIA_MODIFY_MEMORY_WINDOW ModifyMemoryWindow;
- PPCMCIA_SET_VPP SetVpp;
- PPCMCIA_IS_WRITE_PROTECTED IsWriteProtected;
-} PCMCIA_INTERFACE_STANDARD, *PPCMCIA_INTERFACE_STANDARD;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NTDDPCM_H */
diff --git a/winsup/w32api/include/ddk/ntddscsi.h b/winsup/w32api/include/ddk/ntddscsi.h
deleted file mode 100644
index 11629cb..0000000
--- a/winsup/w32api/include/ddk/ntddscsi.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * ntddscsi.h
- *
- * SCSI port IOCTL interface.
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NTDDSCSI_H
-#define __NTDDSCSI_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-#define DD_SCSI_DEVICE_NAME "\\Device\\ScsiPort"
-#define DD_SCSI_DEVICE_NAME_U L"\\Device\\ScsiPort"
-
-#define IOCTL_SCSI_BASE FILE_DEVICE_CONTROLLER
-
-#define IOCTL_SCSI_GET_INQUIRY_DATA \
- CTL_CODE(IOCTL_SCSI_BASE, 0x0403, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_SCSI_GET_CAPABILITIES \
- CTL_CODE(IOCTL_SCSI_BASE, 0x0404, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_SCSI_GET_ADDRESS \
- CTL_CODE(IOCTL_SCSI_BASE, 0x0406, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_SCSI_MINIPORT \
- CTL_CODE(IOCTL_SCSI_BASE, 0x0402, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_SCSI_PASS_THROUGH \
- CTL_CODE(IOCTL_SCSI_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_SCSI_PASS_THROUGH_DIRECT \
- CTL_CODE(IOCTL_SCSI_BASE, 0x0405, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_SCSI_RESCAN_BUS \
- CTL_CODE(IOCTL_SCSI_BASE, 0x0407, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-
-DEFINE_GUID(ScsiRawInterfaceGuid, \
- 0x53f56309L, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
-
-DEFINE_GUID(WmiScsiAddressGuid, \
- 0x53f5630fL, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
-
-typedef struct _SCSI_PASS_THROUGH {
- USHORT Length;
- UCHAR ScsiStatus;
- UCHAR PathId;
- UCHAR TargetId;
- UCHAR Lun;
- UCHAR CdbLength;
- UCHAR SenseInfoLength;
- UCHAR DataIn;
- ULONG DataTransferLength;
- ULONG TimeOutValue;
- ULONG_PTR DataBufferOffset;
- ULONG SenseInfoOffset;
- UCHAR Cdb[16];
-} SCSI_PASS_THROUGH, *PSCSI_PASS_THROUGH;
-
-typedef struct _SCSI_PASS_THROUGH_DIRECT {
- USHORT Length;
- UCHAR ScsiStatus;
- UCHAR PathId;
- UCHAR TargetId;
- UCHAR Lun;
- UCHAR CdbLength;
- UCHAR SenseInfoLength;
- UCHAR DataIn;
- ULONG DataTransferLength;
- ULONG TimeOutValue;
- PVOID DataBuffer;
- ULONG SenseInfoOffset;
- UCHAR Cdb[16];
-} SCSI_PASS_THROUGH_DIRECT, *PSCSI_PASS_THROUGH_DIRECT;
-
-typedef struct _SRB_IO_CONTROL {
- ULONG HeaderLength;
- UCHAR Signature[8];
- ULONG Timeout;
- ULONG ControlCode;
- ULONG ReturnCode;
- ULONG Length;
-} SRB_IO_CONTROL, *PSRB_IO_CONTROL;
-
-typedef struct _SCSI_ADDRESS {
- ULONG Length;
- UCHAR PortNumber;
- UCHAR PathId;
- UCHAR TargetId;
- UCHAR Lun;
-} SCSI_ADDRESS, *PSCSI_ADDRESS;
-
-typedef struct _SCSI_BUS_DATA {
- UCHAR NumberOfLogicalUnits;
- UCHAR InitiatorBusId;
- ULONG InquiryDataOffset;
-}SCSI_BUS_DATA, *PSCSI_BUS_DATA;
-
-typedef struct _SCSI_ADAPTER_BUS_INFO {
- UCHAR NumberOfBuses;
- SCSI_BUS_DATA BusData[1];
-} SCSI_ADAPTER_BUS_INFO, *PSCSI_ADAPTER_BUS_INFO;
-
-typedef struct _IO_SCSI_CAPABILITIES {
- ULONG Length;
- ULONG MaximumTransferLength;
- ULONG MaximumPhysicalPages;
- ULONG SupportedAsynchronousEvents;
- ULONG AlignmentMask;
- BOOLEAN TaggedQueuing;
- BOOLEAN AdapterScansDown;
- BOOLEAN AdapterUsesPio;
-} IO_SCSI_CAPABILITIES, *PIO_SCSI_CAPABILITIES;
-
-typedef struct _SCSI_INQUIRY_DATA {
- UCHAR PathId;
- UCHAR TargetId;
- UCHAR Lun;
- BOOLEAN DeviceClaimed;
- ULONG InquiryDataLength;
- ULONG NextInquiryDataOffset;
- UCHAR InquiryData[1];
-} SCSI_INQUIRY_DATA, *PSCSI_INQUIRY_DATA;
-
-#define SCSI_IOCTL_DATA_OUT 0
-#define SCSI_IOCTL_DATA_IN 1
-#define SCSI_IOCTL_DATA_UNSPECIFIED 2
-
-typedef struct _DUMP_POINTERS {
- PADAPTER_OBJECT AdapterObject;
- PVOID MappedRegisterBase;
- PVOID DumpData;
- PVOID CommonBufferVa;
- LARGE_INTEGER CommonBufferPa;
- ULONG CommonBufferSize;
- BOOLEAN AllocateCommonBuffers;
- BOOLEAN UseDiskDump;
- UCHAR Spare1[2];
- PVOID DeviceObject;
-} DUMP_POINTERS, *PDUMP_POINTERS;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NTDDSCSI_H */
diff --git a/winsup/w32api/include/ddk/ntddser.h b/winsup/w32api/include/ddk/ntddser.h
deleted file mode 100644
index cc0bd2a..0000000
--- a/winsup/w32api/include/ddk/ntddser.h
+++ /dev/null
@@ -1,449 +0,0 @@
-/*
- * ntddser.h
- *
- * Serial port driver interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NTDDSER_H
-#define __NTDDSER_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-/* GUIDs */
-
-DEFINE_GUID(GUID_DEVINTERFACE_COMPORT,
- 0x86e0d1e0L, 0x8089, 0x11d0, 0x9c, 0xe4, 0x08, 0x00, 0x3e, 0x30, 0x1f, 0x73);
-
-DEFINE_GUID(GUID_DEVINTERFACE_SERENUM_BUS_ENUMERATOR,
- 0x4D36E978L, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-
-#define IOCTL_SERIAL_CLEAR_STATS \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 36, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_CLR_DTR \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 10, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_CLR_RTS \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 13, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_CONFIG_SIZE \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 32, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_GET_BAUD_RATE \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 20, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_GET_CHARS \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 22, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_GET_COMMSTATUS \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 27, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_GET_DTRRTS \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 30, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_GET_HANDFLOW \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 24, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_GET_LINE_CONTROL \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 21, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_GET_MODEM_CONTROL \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 37, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_GET_MODEMSTATUS \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 26, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_GET_PROPERTIES \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 29, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_GET_STATS \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 35, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_GET_TIMEOUTS \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_GET_WAIT_MASK \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 16, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_IMMEDIATE_CHAR \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_LSRMST_INSERT \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 31, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_PURGE \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 19, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_RESET_DEVICE \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 11, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_SET_BAUD_RATE \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_SET_BREAK_ON \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_SET_BREAK_OFF \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_SET_CHARS \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 23, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_SET_DTR \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 9, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_SET_FIFO_CONTROL \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 39, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_SET_HANDFLOW \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 25, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_SET_LINE_CONTROL \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 3, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_SET_MODEM_CONTROL \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 38, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_SET_QUEUE_SIZE \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_SET_RTS \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 12, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_SET_TIMEOUTS \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_SET_WAIT_MASK \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 17, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_SET_XOFF \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 14, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_SET_XON \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 15, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_WAIT_ON_MASK \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 18, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_XOFF_COUNTER \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 28, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_SERIAL_INTERNAL_BASIC_SETTINGS \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 3, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_INTERNAL_CANCEL_WAIT_WAKE \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_INTERNAL_DO_WAIT_WAKE \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERIAL_INTERNAL_RESTORE_SETTINGS \
- CTL_CODE (FILE_DEVICE_SERIAL_PORT, 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_SERENUM_PORT_DESC \
- CTL_CODE (FILE_DEVICE_SERENUM, 130, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_SERENUM_GET_PORT_NAME \
- CTL_CODE (FILE_DEVICE_SERENUM, 131, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_SERENUM_REMOVE_SELF \
- CTL_CODE (FILE_DEVICE_SERENUM, 129, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-
-typedef struct _SERIAL_BAUD_RATE {
- ULONG BaudRate;
-} SERIAL_BAUD_RATE, *PSERIAL_BAUD_RATE;
-
-/* SERIAL_BAUD_RATE.BaudRate constants */
-#define SERIAL_BAUD_075 0x00000001
-#define SERIAL_BAUD_110 0x00000002
-#define SERIAL_BAUD_134_5 0x00000004
-#define SERIAL_BAUD_150 0x00000008
-#define SERIAL_BAUD_300 0x00000010
-#define SERIAL_BAUD_600 0x00000020
-#define SERIAL_BAUD_1200 0x00000040
-#define SERIAL_BAUD_1800 0x00000080
-#define SERIAL_BAUD_2400 0x00000100
-#define SERIAL_BAUD_4800 0x00000200
-#define SERIAL_BAUD_7200 0x00000400
-#define SERIAL_BAUD_9600 0x00000800
-#define SERIAL_BAUD_14400 0x00001000
-#define SERIAL_BAUD_19200 0x00002000
-#define SERIAL_BAUD_38400 0x00004000
-#define SERIAL_BAUD_56K 0x00008000
-#define SERIAL_BAUD_128K 0x00010000
-#define SERIAL_BAUD_115200 0x00020000
-#define SERIAL_BAUD_57600 0x00040000
-#define SERIAL_BAUD_USER 0x10000000
-
-typedef struct _SERIAL_CHARS {
- UCHAR EofChar;
- UCHAR ErrorChar;
- UCHAR BreakChar;
- UCHAR EventChar;
- UCHAR XonChar;
- UCHAR XoffChar;
-} SERIAL_CHARS, *PSERIAL_CHARS;
-
-typedef struct _SERIAL_STATUS {
- ULONG Errors;
- ULONG HoldReasons;
- ULONG AmountInInQueue;
- ULONG AmountInOutQueue;
- BOOLEAN EofReceived;
- BOOLEAN WaitForImmediate;
-} SERIAL_STATUS, *PSERIAL_STATUS;
-
-typedef struct _SERIAL_HANDFLOW {
- ULONG ControlHandShake;
- ULONG FlowReplace;
- LONG XonLimit;
- LONG XoffLimit;
-} SERIAL_HANDFLOW, *PSERIAL_HANDFLOW;
-
-#define SERIAL_DTR_MASK 0x00000003
-#define SERIAL_DTR_CONTROL 0x00000001
-#define SERIAL_DTR_HANDSHAKE 0x00000002
-#define SERIAL_CTS_HANDSHAKE 0x00000008
-#define SERIAL_DSR_HANDSHAKE 0x00000010
-#define SERIAL_DCD_HANDSHAKE 0x00000020
-#define SERIAL_OUT_HANDSHAKEMASK 0x00000038
-#define SERIAL_DSR_SENSITIVITY 0x00000040
-#define SERIAL_ERROR_ABORT 0x80000000
-#define SERIAL_CONTROL_INVALID 0x7fffff84
-#define SERIAL_AUTO_TRANSMIT 0x00000001
-#define SERIAL_AUTO_RECEIVE 0x00000002
-#define SERIAL_ERROR_CHAR 0x00000004
-#define SERIAL_NULL_STRIPPING 0x00000008
-#define SERIAL_BREAK_CHAR 0x00000010
-#define SERIAL_RTS_MASK 0x000000c0
-#define SERIAL_RTS_CONTROL 0x00000040
-#define SERIAL_RTS_HANDSHAKE 0x00000080
-#define SERIAL_TRANSMIT_TOGGLE 0x000000c0
-#define SERIAL_XOFF_CONTINUE 0x80000000
-#define SERIAL_FLOW_INVALID 0x7fffff20
-
-typedef struct _SERIAL_LINE_CONTROL {
- UCHAR StopBits;
- UCHAR Parity;
- UCHAR WordLength;
-} SERIAL_LINE_CONTROL, *PSERIAL_LINE_CONTROL;
-
-/* SERIAL_LINE_CONTROL.StopBits constants */
-#define STOP_BIT_1 0x00
-#define STOP_BITS_1_5 0x01
-#define STOP_BITS_2 0x02
-
-/* SERIAL_LINE_CONTROL.Parity constants */
-#define NO_PARITY 0x00
-#define ODD_PARITY 0x01
-#define EVEN_PARITY 0x02
-#define MARK_PARITY 0x03
-#define SPACE_PARITY 0x04
-
-/* IOCTL_SERIAL_(GET_MODEM_CONTROL, SET_MODEM_CONTROL) flags */
-#define SERIAL_IOC_MCR_DTR 0x00000001
-#define SERIAL_IOC_MCR_RTS 0x00000002
-#define SERIAL_IOC_MCR_OUT1 0x00000004
-#define SERIAL_IOC_MCR_OUT2 0x00000008
-#define SERIAL_IOC_MCR_LOOP 0x00000010
-
-typedef struct _SERIAL_COMMPROP {
- USHORT PacketLength;
- USHORT PacketVersion;
- ULONG ServiceMask;
- ULONG Reserved1;
- ULONG MaxTxQueue;
- ULONG MaxRxQueue;
- ULONG MaxBaud;
- ULONG ProvSubType;
- ULONG ProvCapabilities;
- ULONG SettableParams;
- ULONG SettableBaud;
- USHORT SettableData;
- USHORT SettableStopParity;
- ULONG CurrentTxQueue;
- ULONG CurrentRxQueue;
- ULONG ProvSpec1;
- ULONG ProvSpec2;
- WCHAR ProvChar[1];
-} SERIAL_COMMPROP, *PSERIAL_COMMPROP;
-
-/* SERIAL_COMMPROP.SettableParams flags */
-#define SERIAL_SP_PARITY 0x0001
-#define SERIAL_SP_BAUD 0x0002
-#define SERIAL_SP_DATABITS 0x0004
-#define SERIAL_SP_STOPBITS 0x0008
-#define SERIAL_SP_HANDSHAKING 0x0010
-#define SERIAL_SP_PARITY_CHECK 0x0020
-#define SERIAL_SP_CARRIER_DETECT 0x0040
-
-/* SERIAL_COMMPROP.ProvCapabilities flags */
-#define SERIAL_PCF_DTRDSR 0x00000001
-#define SERIAL_PCF_RTSCTS 0x00000002
-#define SERIAL_PCF_CD 0x00000004
-#define SERIAL_PCF_PARITY_CHECK 0x00000008
-#define SERIAL_PCF_XONXOFF 0x00000010
-#define SERIAL_PCF_SETXCHAR 0x00000020
-#define SERIAL_PCF_TOTALTIMEOUTS 0x00000040
-#define SERIAL_PCF_INTTIMEOUTS 0x00000080
-#define SERIAL_PCF_SPECIALCHARS 0x00000100
-#define SERIAL_PCF_16BITMODE 0x00000200
-
-/* SERIAL_COMMPROP.SettableData flags */
-#define SERIAL_DATABITS_5 0x0001
-#define SERIAL_DATABITS_6 0x0002
-#define SERIAL_DATABITS_7 0x0004
-#define SERIAL_DATABITS_8 0x0008
-#define SERIAL_DATABITS_16 0x0010
-#define SERIAL_DATABITS_16X 0x0020
-
-/* SERIAL_COMMPROP.SettableStopParity flags */
-#define SERIAL_STOPBITS_10 0x0001
-#define SERIAL_STOPBITS_15 0x0002
-#define SERIAL_STOPBITS_20 0x0004
-#define SERIAL_PARITY_NONE 0x0100
-#define SERIAL_PARITY_ODD 0x0200
-#define SERIAL_PARITY_EVEN 0x0400
-#define SERIAL_PARITY_MARK 0x0800
-#define SERIAL_PARITY_SPACE 0x1000
-
-typedef struct _SERIALPERF_STATS {
- ULONG ReceivedCount;
- ULONG TransmittedCount;
- ULONG FrameErrorCount;
- ULONG SerialOverrunErrorCount;
- ULONG BufferOverrunErrorCount;
- ULONG ParityErrorCount;
-} SERIALPERF_STATS, *PSERIALPERF_STATS;
-
-typedef struct _SERIAL_TIMEOUTS {
- ULONG ReadIntervalTimeout;
- ULONG ReadTotalTimeoutMultiplier;
- ULONG ReadTotalTimeoutConstant;
- ULONG WriteTotalTimeoutMultiplier;
- ULONG WriteTotalTimeoutConstant;
-} SERIAL_TIMEOUTS, *PSERIAL_TIMEOUTS;
-
-/* IOCTL_SERIAL_(GET_WAIT_MASK, SET_WAIT_MASK, WAIT_ON_MASK) flags */
-#define SERIAL_EV_RXCHAR 0x0001
-#define SERIAL_EV_RXFLAG 0x0002
-#define SERIAL_EV_TXEMPTY 0x0004
-#define SERIAL_EV_CTS 0x0008
-#define SERIAL_EV_DSR 0x0010
-#define SERIAL_EV_RLSD 0x0020
-#define SERIAL_EV_BREAK 0x0040
-#define SERIAL_EV_ERR 0x0080
-#define SERIAL_EV_RING 0x0100
-#define SERIAL_EV_PERR 0x0200
-#define SERIAL_EV_RX80FULL 0x0400
-#define SERIAL_EV_EVENT1 0x0800
-#define SERIAL_EV_EVENT2 0x1000
-
-/* IOCTL_SERIAL_LSRMST_INSERT constants */
-#define SERIAL_LSRMST_LSR_DATA 0x01
-#define SERIAL_LSRMST_LSR_NODATA 0x02
-#define SERIAL_LSRMST_MST 0x03
-#define SERIAL_LSRMST_ESCAPE 0x00
-
-/* IOCTL_SERIAL_PURGE constants */
-#define SERIAL_PURGE_TXABORT 0x00000001
-#define SERIAL_PURGE_RXABORT 0x00000002
-#define SERIAL_PURGE_TXCLEAR 0x00000004
-#define SERIAL_PURGE_RXCLEAR 0x00000008
-
-/* IOCTL_SERIAL_SET_FIFO_CONTROL constants */
-#define SERIAL_IOC_FCR_FIFO_ENABLE 0x00000001
-#define SERIAL_IOC_FCR_RCVR_RESET 0x00000002
-#define SERIAL_IOC_FCR_XMIT_RESET 0x00000004
-#define SERIAL_IOC_FCR_DMA_MODE 0x00000008
-#define SERIAL_IOC_FCR_RES1 0x00000010
-#define SERIAL_IOC_FCR_RES2 0x00000020
-#define SERIAL_IOC_FCR_RCVR_TRIGGER_LSB 0x00000040
-#define SERIAL_IOC_FCR_RCVR_TRIGGER_MSB 0x00000080
-
-typedef struct _SERIAL_QUEUE_SIZE {
- ULONG InSize;
- ULONG OutSize;
-} SERIAL_QUEUE_SIZE, *PSERIAL_QUEUE_SIZE;
-
-typedef struct _SERIAL_XOFF_COUNTER {
- ULONG Timeout;
- LONG Counter;
- UCHAR XoffChar;
-} SERIAL_XOFF_COUNTER, *PSERIAL_XOFF_COUNTER;
-
-typedef struct _SERIAL_BASIC_SETTINGS {
- SERIAL_TIMEOUTS Timeouts;
- SERIAL_HANDFLOW HandFlow;
- ULONG RxFifo;
- ULONG TxFifo;
-} SERIAL_BASIC_SETTINGS, *PSERIAL_BASIC_SETTINGS;
-
-typedef struct _SERENUM_PORT_DESC {
- ULONG Size;
- PVOID PortHandle;
- PHYSICAL_ADDRESS PortAddress;
- USHORT Reserved[1];
-} SERENUM_PORT_DESC, *PSERENUM_PORT_DESC;
-
-typedef UCHAR STDCALL
-(*PSERENUM_READPORT)(
- PVOID SerPortAddress);
-
-typedef VOID STDCALL
-(*PSERENUM_WRITEPORT)(
- PVOID SerPortAddress,
- UCHAR Value);
-
-typedef enum _SERENUM_PORTION {
- SerenumFirstHalf,
- SerenumSecondHalf,
- SerenumWhole
-} SERENUM_PORTION;
-
-typedef struct _SERENUM_PORT_PARAMETERS {
- ULONG Size;
- PSERENUM_READPORT ReadAccessor;
- PSERENUM_WRITEPORT WriteAccessor;
- PVOID SerPortAddress;
- PVOID HardwareHandle;
- SERENUM_PORTION Portion;
- USHORT NumberAxis;
- USHORT Reserved[3];
-} SERENUM_PORT_PARAMETERS, *PSERENUM_PORT_PARAMETERS;
-
-#define SERIAL_ERROR_BREAK 0x00000001
-#define SERIAL_ERROR_FRAMING 0x00000002
-#define SERIAL_ERROR_OVERRUN 0x00000004
-#define SERIAL_ERROR_QUEUEOVERRUN 0x00000008
-#define SERIAL_ERROR_PARITY 0x00000010
-
-#define SERIAL_SP_UNSPECIFIED 0x00000000
-#define SERIAL_SP_RS232 0x00000001
-#define SERIAL_SP_PARALLEL 0x00000002
-#define SERIAL_SP_RS422 0x00000003
-#define SERIAL_SP_RS423 0x00000004
-#define SERIAL_SP_RS449 0x00000005
-#define SERIAL_SP_MODEM 0X00000006
-#define SERIAL_SP_FAX 0x00000021
-#define SERIAL_SP_SCANNER 0x00000022
-#define SERIAL_SP_BRIDGE 0x00000100
-#define SERIAL_SP_LAT 0x00000101
-#define SERIAL_SP_TELNET 0x00000102
-#define SERIAL_SP_X25 0x00000103
-#define SERIAL_SP_SERIALCOMM 0x00000001
-
-#define SERIAL_TX_WAITING_FOR_CTS 0x00000001
-#define SERIAL_TX_WAITING_FOR_DSR 0x00000002
-#define SERIAL_TX_WAITING_FOR_DCD 0x00000004
-#define SERIAL_TX_WAITING_FOR_XON 0x00000008
-#define SERIAL_TX_WAITING_XOFF_SENT 0x00000010
-#define SERIAL_TX_WAITING_ON_BREAK 0x00000020
-#define SERIAL_RX_WAITING_FOR_DSR 0x00000040
-
-#define SERIAL_DTR_STATE 0x00000001
-#define SERIAL_RTS_STATE 0x00000002
-#define SERIAL_CTS_STATE 0x00000010
-#define SERIAL_DSR_STATE 0x00000020
-#define SERIAL_RI_STATE 0x00000040
-#define SERIAL_DCD_STATE 0x00000080
-
-typedef struct _SERIALCONFIG {
- ULONG Size;
- USHORT Version;
- ULONG SubType;
- ULONG ProvOffset;
- ULONG ProviderSize;
- WCHAR ProviderData[1];
-} SERIALCONFIG,*PSERIALCONFIG;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NTDDSER_H */
diff --git a/winsup/w32api/include/ddk/ntddstor.h b/winsup/w32api/include/ddk/ntddstor.h
deleted file mode 100644
index 232834a..0000000
--- a/winsup/w32api/include/ddk/ntddstor.h
+++ /dev/null
@@ -1,333 +0,0 @@
-/*
- * ntddstor.h
- *
- * Storage class IOCTL interface.
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NTDDSTOR_H
-#define __NTDDSTOR_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-#define IOCTL_STORAGE_BASE FILE_DEVICE_MASS_STORAGE
-
-#define IOCTL_STORAGE_CHECK_VERIFY \
- CTL_CODE(IOCTL_STORAGE_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_STORAGE_CHECK_VERIFY2 \
- CTL_CODE(IOCTL_STORAGE_BASE, 0x0200, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_STORAGE_EJECT_MEDIA \
- CTL_CODE(IOCTL_STORAGE_BASE, 0x0202, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_STORAGE_EJECTION_CONTROL \
- CTL_CODE(IOCTL_STORAGE_BASE, 0x0250, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_STORAGE_FIND_NEW_DEVICES \
- CTL_CODE(IOCTL_STORAGE_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_STORAGE_GET_DEVICE_NUMBER \
- CTL_CODE(IOCTL_STORAGE_BASE, 0x0420, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER \
- CTL_CODE(IOCTL_STORAGE_BASE, 0x0304, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_STORAGE_GET_MEDIA_TYPES \
- CTL_CODE(IOCTL_STORAGE_BASE, 0x0300, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_STORAGE_GET_MEDIA_TYPES_EX \
- CTL_CODE(IOCTL_STORAGE_BASE, 0x0301, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_STORAGE_LOAD_MEDIA \
- CTL_CODE(IOCTL_STORAGE_BASE, 0x0203, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_STORAGE_LOAD_MEDIA2 \
- CTL_CODE(IOCTL_STORAGE_BASE, 0x0203, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_STORAGE_MCN_CONTROL \
- CTL_CODE(IOCTL_STORAGE_BASE, 0x0251, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_STORAGE_MEDIA_REMOVAL \
- CTL_CODE(IOCTL_STORAGE_BASE, 0x0201, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_STORAGE_PREDICT_FAILURE \
- CTL_CODE(IOCTL_STORAGE_BASE, 0x0440, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_STORAGE_QUERY_PROPERTY \
- CTL_CODE(IOCTL_STORAGE_BASE, 0x0500, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_STORAGE_RELEASE \
- CTL_CODE(IOCTL_STORAGE_BASE, 0x0205, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_STORAGE_RESERVE \
- CTL_CODE(IOCTL_STORAGE_BASE, 0x0204, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_STORAGE_RESET_BUS \
- CTL_CODE(IOCTL_STORAGE_BASE, 0x0400, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_STORAGE_RESET_DEVICE \
- CTL_CODE(IOCTL_STORAGE_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-
-DEFINE_GUID(GUID_DEVINTERFACE_DISK,
- 0x53f56307L, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
-
-DEFINE_GUID(GUID_DEVINTERFACE_CDROM,
- 0x53f56308L, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
-
-DEFINE_GUID(GUID_DEVINTERFACE_PARTITION,
- 0x53f5630aL, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
-
-DEFINE_GUID(GUID_DEVINTERFACE_TAPE,
- 0x53f5630bL, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
-
-DEFINE_GUID(GUID_DEVINTERFACE_WRITEONCEDISK,
- 0x53f5630cL, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
-
-DEFINE_GUID(GUID_DEVINTERFACE_VOLUME,
- 0x53f5630dL, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
-
-DEFINE_GUID(GUID_DEVINTERFACE_MEDIUMCHANGER,
- 0x53f56310L, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
-
-DEFINE_GUID(GUID_DEVINTERFACE_FLOPPY,
- 0x53f56311L, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
-
-DEFINE_GUID(GUID_DEVINTERFACE_CDCHANGER,
- 0x53f56312L, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
-
-DEFINE_GUID(GUID_DEVINTERFACE_STORAGEPORT,
- 0x2accfe60L, 0xc130, 0x11d2, 0xb0, 0x82, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
-
-
-typedef enum _STORAGE_MEDIA_TYPE {
- DDS_4mm = 0x20,
- MiniQic,
- Travan,
- QIC,
- MP_8mm,
- AME_8mm,
- AIT1_8mm,
- DLT,
- NCTP,
- IBM_3480,
- IBM_3490E,
- IBM_Magstar_3590,
- IBM_Magstar_MP,
- STK_DATA_D3,
- SONY_DTF,
- DV_6mm,
- DMI,
- SONY_D2,
- CLEANER_CARTRIDGE,
- CD_ROM,
- CD_R,
- CD_RW,
- DVD_ROM,
- DVD_R,
- DVD_RW,
- MO_3_RW,
- MO_5_WO,
- MO_5_RW,
- MO_5_LIMDOW,
- PC_5_WO,
- PC_5_RW,
- PD_5_RW,
- ABL_5_WO,
- PINNACLE_APEX_5_RW,
- SONY_12_WO,
- PHILIPS_12_WO,
- HITACHI_12_WO,
- CYGNET_12_WO,
- KODAK_14_WO,
- MO_NFR_525,
- NIKON_12_RW,
- IOMEGA_ZIP,
- IOMEGA_JAZ,
- SYQUEST_EZ135,
- SYQUEST_EZFLYER,
- SYQUEST_SYJET,
- AVATAR_F2,
- MP2_8mm,
- DST_S,
- DST_M,
- DST_L,
- VXATape_1,
- VXATape_2,
- STK_9840,
- LTO_Ultrium,
- LTO_Accelis,
- DVD_RAM,
- AIT_8mm,
- ADR_1,
- ADR_2
-} STORAGE_MEDIA_TYPE, *PSTORAGE_MEDIA_TYPE;
-
-typedef enum _STORAGE_BUS_TYPE {
- BusTypeUnknown = 0x00,
- BusTypeScsi,
- BusTypeAtapi,
- BusTypeAta,
- BusType1394,
- BusTypeSsa,
- BusTypeFibre,
- BusTypeUsb,
- BusTypeRAID,
- BusTypeMaxReserved = 0x7F
-} STORAGE_BUS_TYPE, *PSTORAGE_BUS_TYPE;
-
-/* DEVICE_MEDIA_INFO.DeviceSpecific.DiskInfo.MediaCharacteristics constants */
-#define MEDIA_ERASEABLE 0x00000001
-#define MEDIA_WRITE_ONCE 0x00000002
-#define MEDIA_READ_ONLY 0x00000004
-#define MEDIA_READ_WRITE 0x00000008
-#define MEDIA_WRITE_PROTECTED 0x00000100
-#define MEDIA_CURRENTLY_MOUNTED 0x80000000
-
-typedef struct _DEVICE_MEDIA_INFO {
- union {
- struct {
- LARGE_INTEGER Cylinders;
- STORAGE_MEDIA_TYPE MediaType;
- ULONG TracksPerCylinder;
- ULONG SectorsPerTrack;
- ULONG BytesPerSector;
- ULONG NumberMediaSides;
- ULONG MediaCharacteristics;
- } DiskInfo;
- struct {
- LARGE_INTEGER Cylinders;
- STORAGE_MEDIA_TYPE MediaType;
- ULONG TracksPerCylinder;
- ULONG SectorsPerTrack;
- ULONG BytesPerSector;
- ULONG NumberMediaSides;
- ULONG MediaCharacteristics;
- } RemovableDiskInfo;
- struct {
- STORAGE_MEDIA_TYPE MediaType;
- ULONG MediaCharacteristics;
- ULONG CurrentBlockSize;
- STORAGE_BUS_TYPE BusType;
- union {
- struct {
- UCHAR MediumType;
- UCHAR DensityCode;
- } ScsiInformation;
- } BusSpecificData;
- } TapeInfo;
- } DeviceSpecific;
-} DEVICE_MEDIA_INFO, *PDEVICE_MEDIA_INFO;
-
-typedef struct _GET_MEDIA_TYPES {
- ULONG DeviceType;
- ULONG MediaInfoCount;
- DEVICE_MEDIA_INFO MediaInfo[1];
-} GET_MEDIA_TYPES, *PGET_MEDIA_TYPES;
-
-typedef struct _STORAGE_ADAPTER_DESCRIPTOR {
- ULONG Version;
- ULONG Size;
- ULONG MaximumTransferLength;
- ULONG MaximumPhysicalPages;
- ULONG AlignmentMask;
- BOOLEAN AdapterUsesPio;
- BOOLEAN AdapterScansDown;
- BOOLEAN CommandQueueing;
- BOOLEAN AcceleratedTransfer;
- STORAGE_BUS_TYPE BusType;
- USHORT BusMajorVersion;
- USHORT BusMinorVersion;
-} STORAGE_ADAPTER_DESCRIPTOR, *PSTORAGE_ADAPTER_DESCRIPTOR;
-
-typedef struct _STORAGE_BUS_RESET_REQUEST {
- UCHAR PathId;
-} STORAGE_BUS_RESET_REQUEST, *PSTORAGE_BUS_RESET_REQUEST;
-
-typedef struct _STORAGE_DESCRIPTOR_HEADER {
- ULONG Version;
- ULONG Size;
-} STORAGE_DESCRIPTOR_HEADER, *PSTORAGE_DESCRIPTOR_HEADER;
-
-typedef struct _STORAGE_DEVICE_DESCRIPTOR {
- ULONG Version;
- ULONG Size;
- UCHAR DeviceType;
- UCHAR DeviceTypeModifier;
- BOOLEAN RemovableMedia;
- BOOLEAN CommandQueueing;
- ULONG VendorIdOffset;
- ULONG ProductIdOffset;
- ULONG ProductRevisionOffset;
- ULONG SerialNumberOffset;
- STORAGE_BUS_TYPE BusType;
- ULONG RawPropertiesLength;
- UCHAR RawDeviceProperties[1];
-} STORAGE_DEVICE_DESCRIPTOR, *PSTORAGE_DEVICE_DESCRIPTOR;
-
-typedef struct _STORAGE_DEVICE_ID_DESCRIPTOR {
- ULONG Version;
- ULONG Size;
- ULONG NumberOfIdentifiers;
- UCHAR Identifiers[1];
-} STORAGE_DEVICE_ID_DESCRIPTOR, *PSTORAGE_DEVICE_ID_DESCRIPTOR;
-
-typedef struct _STORAGE_DEVICE_NUMBER {
- DEVICE_TYPE DeviceType;
- ULONG DeviceNumber;
- ULONG PartitionNumber;
-} STORAGE_DEVICE_NUMBER, *PSTORAGE_DEVICE_NUMBER;
-
-typedef struct _STORAGE_PREDICT_FAILURE {
- ULONG PredictFailure;
- UCHAR VendorSpecific[512];
-} STORAGE_PREDICT_FAILURE, *PSTORAGE_PREDICT_FAILURE;
-
-typedef enum _STORAGE_PROPERTY_ID {
- StorageDeviceProperty = 0,
- StorageAdapterProperty,
- StorageDeviceIdProperty
-} STORAGE_PROPERTY_ID, *PSTORAGE_PROPERTY_ID;
-
-typedef enum _STORAGE_QUERY_TYPE {
- PropertyStandardQuery = 0,
- PropertyExistsQuery,
- PropertyMaskQuery,
- PropertyQueryMaxDefined
-} STORAGE_QUERY_TYPE, *PSTORAGE_QUERY_TYPE;
-
-typedef struct _STORAGE_PROPERTY_QUERY {
- STORAGE_PROPERTY_ID PropertyId;
- STORAGE_QUERY_TYPE QueryType;
- UCHAR AdditionalParameters[1];
-} STORAGE_PROPERTY_QUERY, *PSTORAGE_PROPERTY_QUERY;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NTDDSTOR_H */
diff --git a/winsup/w32api/include/ddk/ntddtape.h b/winsup/w32api/include/ddk/ntddtape.h
deleted file mode 100644
index 1b3b049..0000000
--- a/winsup/w32api/include/ddk/ntddtape.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * ntddtape.h
- *
- * Tape device IOCTL interface.
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NTDDTAPE_H
-#define __NTDDTAPE_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include "ntddstor.h"
-
-#define DD_TAPE_DEVICE_NAME "\\Device\\Tape"
-#define DD_TAPE_DEVICE_NAME_U L"\\Device\\Tape"
-
-#define IOCTL_TAPE_BASE FILE_DEVICE_TAPE
-
-#define IOCTL_TAPE_CHECK_VERIFY CTL_CODE(IOCTL_TAPE_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_TAPE_CREATE_PARTITION CTL_CODE(IOCTL_TAPE_BASE, 0x000a, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-#define IOCTL_TAPE_ERASE CTL_CODE(IOCTL_TAPE_BASE, 0x0000, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-#define IOCTL_TAPE_FIND_NEW_DEVICES CTL_CODE(IOCTL_DISK_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_TAPE_GET_DRIVE_PARAMS CTL_CODE(IOCTL_TAPE_BASE, 0x0005, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_TAPE_GET_MEDIA_PARAMS CTL_CODE(IOCTL_TAPE_BASE, 0x0007, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_TAPE_GET_POSITION CTL_CODE(IOCTL_TAPE_BASE, 0x0003, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_TAPE_GET_STATUS CTL_CODE(IOCTL_TAPE_BASE, 0x0009, METHOD_BUFFERED, FILE_READ_ACCESS )
-
-#define IOCTL_TAPE_PREPARE CTL_CODE(IOCTL_TAPE_BASE, 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_TAPE_SET_DRIVE_PARAMS CTL_CODE(IOCTL_TAPE_BASE, 0x0006, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-#define IOCTL_TAPE_SET_MEDIA_PARAMS CTL_CODE(IOCTL_TAPE_BASE, 0x0008, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_TAPE_SET_POSITION CTL_CODE(IOCTL_TAPE_BASE, 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_TAPE_WRITE_MARKS CTL_CODE(IOCTL_TAPE_BASE, 0x0002, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-
-typedef enum _TAPE_DRIVE_PROBLEM_TYPE {
- TapeDriveProblemNone,
- TapeDriveReadWriteWarning,
- TapeDriveReadWriteError,
- TapeDriveReadWarning,
- TapeDriveWriteWarning,
- TapeDriveReadError,
- TapeDriveWriteError,
- TapeDriveHardwareError,
- TapeDriveUnsupportedMedia,
- TapeDriveScsiConnectionError,
- TapeDriveTimetoClean,
- TapeDriveCleanDriveNow,
- TapeDriveMediaLifeExpired,
- TapeDriveSnappedTape
-} TAPE_DRIVE_PROBLEM_TYPE;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NTDDTAPE_H */
diff --git a/winsup/w32api/include/ddk/ntddtdi.h b/winsup/w32api/include/ddk/ntddtdi.h
deleted file mode 100644
index e907670..0000000
--- a/winsup/w32api/include/ddk/ntddtdi.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * ntddtdi.h
- *
- * TDI IOCTL interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NTDDTDI_H
-#define __NTDDTDI_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-#define DD_TDI_DEVICE_NAME "\\Device\\UNKNOWN"
-#define DD_TDI_DEVICE_NAME_U L"\\Device\\UNKNOWN"
-
-#define _TDI_CONTROL_CODE(Request, Method) \
- CTL_CODE(FILE_DEVICE_TRANSPORT, Request, Method, FILE_ANY_ACCESS)
-
-#define IOCTL_TDI_ACCEPT _TDI_CONTROL_CODE(0, METHOD_BUFFERED)
-#define IOCTL_TDI_CONNECT _TDI_CONTROL_CODE(1, METHOD_BUFFERED)
-#define IOCTL_TDI_DISCONNECT _TDI_CONTROL_CODE(2, METHOD_BUFFERED)
-#define IOCTL_TDI_LISTEN _TDI_CONTROL_CODE(3, METHOD_BUFFERED)
-#define IOCTL_TDI_QUERY_INFORMATION _TDI_CONTROL_CODE(4, METHOD_OUT_DIRECT)
-#define IOCTL_TDI_RECEIVE _TDI_CONTROL_CODE(5, METHOD_OUT_DIRECT)
-#define IOCTL_TDI_RECEIVE_DATAGRAM _TDI_CONTROL_CODE(6, METHOD_OUT_DIRECT)
-#define IOCTL_TDI_SEND _TDI_CONTROL_CODE(7, METHOD_IN_DIRECT)
-#define IOCTL_TDI_SEND_DATAGRAM _TDI_CONTROL_CODE(8, METHOD_IN_DIRECT)
-#define IOCTL_TDI_SET_EVENT_HANDLER _TDI_CONTROL_CODE(9, METHOD_BUFFERED)
-#define IOCTL_TDI_SET_INFORMATION _TDI_CONTROL_CODE(10, METHOD_IN_DIRECT)
-#define IOCTL_TDI_ASSOCIATE_ADDRESS _TDI_CONTROL_CODE(11, METHOD_BUFFERED)
-#define IOCTL_TDI_DISASSOCIATE_ADDRESS _TDI_CONTROL_CODE(12, METHOD_BUFFERED)
-#define IOCTL_TDI_ACTION _TDI_CONTROL_CODE(13, METHOD_OUT_DIRECT)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NTDDTDI_H */
diff --git a/winsup/w32api/include/ddk/ntddvdeo.h b/winsup/w32api/include/ddk/ntddvdeo.h
deleted file mode 100644
index 2027de0..0000000
--- a/winsup/w32api/include/ddk/ntddvdeo.h
+++ /dev/null
@@ -1,440 +0,0 @@
-/*
- * ntddvdeo.h
- *
- * Definitions for video devices
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NTDDVDEO_H
-#define __NTDDVDEO_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-
-#define VIDEO_DEVICE_NAME "DISPLAY%d"
-#define WVIDEO_DEVICE_NAME L"DISPLAY%d"
-
-#define DD_FULLSCREEN_VIDEO_DEVICE_NAME L"\\Device\\FSVideo"
-
-DEFINE_GUID(GUID_DEVINTERFACE_DISPLAY_ADAPTER, \
- 0x5b45201d, 0xf2f2, 0x4f3b, 0x85, 0xbb, 0x30, 0xff, 0x1f, 0x95, 0x35, 0x99);
-
-
-#define IOCTL_VIDEO_DISABLE_CURSOR \
- CTL_CODE (FILE_DEVICE_VIDEO, 0x109, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_DISABLE_POINTER \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x10f, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_ENABLE_CURSOR \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x108, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_ENABLE_POINTER \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x10e, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_FREE_PUBLIC_ACCESS_RANGES \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x119, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_GET_BANK_SELECT_CODE \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x115, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_GET_CHILD_STATE \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x120, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_GET_POWER_MANAGEMENT \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x11c, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_HANDLE_VIDEOPARAMETERS \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x08, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_LOAD_AND_SET_FONT \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x105, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_MAP_VIDEO_MEMORY \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x116, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_QUERY_AVAIL_MODES \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x100, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_QUERY_COLOR_CAPABILITIES \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x11a, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_QUERY_CURRENT_MODE \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x102, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_QUERY_CURSOR_ATTR \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x10b, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_QUERY_CURSOR_POSITION \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x10d, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x101, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_QUERY_POINTER_ATTR \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x111, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_QUERY_POINTER_CAPABILITIES \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x114, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_QUERY_POINTER_POSITION \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x113, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_QUERY_PUBLIC_ACCESS_RANGES \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x118, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_RESET_DEVICE \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x104, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_RESTORE_HARDWARE_STATE \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x81, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_SAVE_HARDWARE_STATE \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x80, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_SET_CHILD_STATE_CONFIGURATION \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x122, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_SET_COLOR_REGISTERS \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x107, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_SET_CURRENT_MODE \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x103, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_SET_CURSOR_ATTR \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x10a, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_SET_CURSOR_POSITION \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x10c, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_SET_PALETTE_REGISTERS \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x106, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_SET_POINTER_ATTR \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x110, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_SET_POINTER_POSITION \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x112, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_SET_POWER_MANAGEMENT \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x11b, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_SHARE_VIDEO_MEMORY \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x11d, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_SWITCH_DUALVIEW \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x123, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_UNMAP_VIDEO_MEMORY \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x117, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_UNSHARE_VIDEO_MEMORY \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x11e, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VIDEO_VALIDATE_CHILD_STATE_CONFIGURATION \
- CTL_CODE(FILE_DEVICE_VIDEO, 0x121, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-
-
-typedef struct _VIDEO_MEMORY {
- PVOID RequestedVirtualAddress;
-} VIDEO_MEMORY, *PVIDEO_MEMORY;
-
-typedef struct _VIDEO_MEMORY_INFORMATION {
- PVOID VideoRamBase;
- ULONG VideoRamLength;
- PVOID FrameBufferBase;
- ULONG FrameBufferLength;
-} VIDEO_MEMORY_INFORMATION, *PVIDEO_MEMORY_INFORMATION;
-
-/* VIDEO_MODE.RequestedMode */
-#define VIDEO_MODE_MAP_MEM_LINEAR 0x40000000
-#define VIDEO_MODE_NO_ZERO_MEMORY 0x80000000
-
-typedef struct _VIDEO_MODE {
- ULONG RequestedMode;
-} VIDEO_MODE, *PVIDEO_MODE;
-
-/* VIDEO_MODE_INFORMATION.AttributeFlags */
-#define VIDEO_MODE_COLOR 0x0001
-#define VIDEO_MODE_GRAPHICS 0x0002
-#define VIDEO_MODE_PALETTE_DRIVEN 0x0004
-#define VIDEO_MODE_MANAGED_PALETTE 0x0008
-#define VIDEO_MODE_INTERLACED 0x0010
-#define VIDEO_MODE_NO_OFF_SCREEN 0x0020
-#define VIDEO_MODE_NO_64_BIT_ACCESS 0x0040
-#define VIDEO_MODE_BANKED 0x0080
-#define VIDEO_MODE_LINEAR 0x0100
-
-typedef struct _VIDEO_MODE_INFORMATION {
- ULONG Length;
- ULONG ModeIndex;
- ULONG VisScreenWidth;
- ULONG VisScreenHeight;
- ULONG ScreenStride;
- ULONG NumberOfPlanes;
- ULONG BitsPerPlane;
- ULONG Frequency;
- ULONG XMillimeter;
- ULONG YMillimeter;
- ULONG NumberRedBits;
- ULONG NumberGreenBits;
- ULONG NumberBlueBits;
- ULONG RedMask;
- ULONG GreenMask;
- ULONG BlueMask;
- ULONG AttributeFlags;
- ULONG VideoMemoryBitmapWidth;
- ULONG VideoMemoryBitmapHeight;
- ULONG DriverSpecificAttributeFlags;
-} VIDEO_MODE_INFORMATION, *PVIDEO_MODE_INFORMATION;
-
-typedef struct _VIDEO_NUM_MODES {
- ULONG NumModes;
- ULONG ModeInformationLength;
-} VIDEO_NUM_MODES, *PVIDEO_NUM_MODES;
-
-typedef enum _VIDEO_POWER_STATE {
- VideoPowerUnspecified = 0,
- VideoPowerOn = 1,
- VideoPowerStandBy,
- VideoPowerSuspend,
- VideoPowerOff,
- VideoPowerHibernate,
- VideoPowerShutdown,
- VideoPowerMaximum
-} VIDEO_POWER_STATE, *PVIDEO_POWER_STATE;
-
-typedef struct _VIDEO_POWER_MANAGEMENT {
- ULONG Length;
- ULONG DPMSVersion;
- ULONG PowerState;
-} VIDEO_POWER_MANAGEMENT, *PVIDEO_POWER_MANAGEMENT;
-
-typedef struct _VIDEO_PUBLIC_ACCESS_RANGES {
- ULONG InIoSpace;
- ULONG MappedInIoSpace;
- PVOID VirtualAddress;
-} VIDEO_PUBLIC_ACCESS_RANGES, *PVIDEO_PUBLIC_ACCESS_RANGES;
-
-typedef struct _VIDEO_SHARE_MEMORY {
- HANDLE ProcessHandle;
- ULONG ViewOffset;
- ULONG ViewSize;
- PVOID RequestedVirtualAddress;
-} VIDEO_SHARE_MEMORY, *PVIDEO_SHARE_MEMORY;
-
-typedef struct _VIDEO_SHARE_MEMORY_INFORMATION {
- ULONG SharedViewOffset;
- ULONG SharedViewSize;
- PVOID VirtualAddress;
-} VIDEO_SHARE_MEMORY_INFORMATION, *PVIDEO_SHARE_MEMORY_INFORMATION;
-
-/* VIDEO_BANK_SELECT.BankingFlags constants */
-#define PLANAR_HC 0x00000001
-
-/* VIDEO_BANK_SELECT.BankingType and PlanarHCBankingType constants */
-typedef enum _VIDEO_BANK_TYPE {
- VideoNotBanked = 0,
- VideoBanked1RW,
- VideoBanked1R1W,
- VideoBanked2RW,
- NumVideoBankTypes
-} VIDEO_BANK_TYPE, *PVIDEO_BANK_TYPE;
-
-typedef struct _VIDEO_BANK_SELECT {
- ULONG Length;
- ULONG Size;
- ULONG BankingFlags;
- ULONG BankingType;
- ULONG PlanarHCBankingType;
- ULONG BitmapWidthInBytes;
- ULONG BitmapSize;
- ULONG Granularity;
- ULONG PlanarHCGranularity;
- ULONG CodeOffset;
- ULONG PlanarHCBankCodeOffset;
- ULONG PlanarHCEnableCodeOffset;
- ULONG PlanarHCDisableCodeOffset;
-} VIDEO_BANK_SELECT, *PVIDEO_BANK_SELECT;
-
-typedef struct _VIDEO_LOAD_FONT_INFORMATION {
- USHORT WidthInPixels;
- USHORT HeightInPixels;
- ULONG FontSize;
- UCHAR Font[1];
-} VIDEO_LOAD_FONT_INFORMATION, *PVIDEO_LOAD_FONT_INFORMATION;
-
-/* VIDEO_COLOR_CAPABILITIES.AttributeFlags constants */
-#define VIDEO_DEVICE_COLOR 0x00000001
-#define VIDEO_OPTIONAL_GAMMET_TABLE 0x00000002
-
-typedef struct _VIDEO_COLOR_CAPABILITIES {
- ULONG Length;
- ULONG AttributeFlags;
- LONG RedPhosphoreDecay;
- LONG GreenPhosphoreDecay;
- LONG BluePhosphoreDecay;
- LONG WhiteChromaticity_x;
- LONG WhiteChromaticity_y;
- LONG WhiteChromaticity_Y;
- LONG RedChromaticity_x;
- LONG RedChromaticity_y;
- LONG GreenChromaticity_x;
- LONG GreenChromaticity_y;
- LONG BlueChromaticity_x;
- LONG BlueChromaticity_y;
- LONG WhiteGamma;
- LONG RedGamma;
- LONG GreenGamma;
- LONG BlueGamma;
-} VIDEO_COLOR_CAPABILITIES, *PVIDEO_COLOR_CAPABILITIES;
-
-typedef struct _VIDEO_CURSOR_ATTRIBUTES {
- USHORT Width;
- USHORT Height;
- SHORT Column;
- SHORT Row;
- UCHAR Rate;
- UCHAR Enable;
-} VIDEO_CURSOR_ATTRIBUTES, *PVIDEO_CURSOR_ATTRIBUTES;
-
-typedef struct _VIDEO_CURSOR_POSITION {
- SHORT Column;
- SHORT Row;
-} VIDEO_CURSOR_POSITION, *PVIDEO_CURSOR_POSITION;
-
-typedef struct _VIDEO_POINTER_ATTRIBUTES {
- ULONG Flags;
- ULONG Width;
- ULONG Height;
- ULONG WidthInBytes;
- ULONG Enable;
- SHORT Column;
- SHORT Row;
- UCHAR Pixels[1];
-} VIDEO_POINTER_ATTRIBUTES, *PVIDEO_POINTER_ATTRIBUTES;
-
-/* VIDEO_POINTER_CAPABILITIES.Flags */
-#define VIDEO_MODE_ASYNC_POINTER 0x01
-#define VIDEO_MODE_MONO_POINTER 0x02
-#define VIDEO_MODE_COLOR_POINTER 0x04
-#define VIDEO_MODE_ANIMATE_START 0x08
-#define VIDEO_MODE_ANIMATE_UPDATE 0x10
-
-typedef struct _VIDEO_POINTER_CAPABILITIES {
- ULONG Flags;
- ULONG MaxWidth;
- ULONG MaxHeight;
- ULONG HWPtrBitmapStart;
- ULONG HWPtrBitmapEnd;
-} VIDEO_POINTER_CAPABILITIES, *PVIDEO_POINTER_CAPABILITIES;
-
-typedef struct _VIDEO_POINTER_POSITION {
- SHORT Column;
- SHORT Row;
-} VIDEO_POINTER_POSITION, *PVIDEO_POINTER_POSITION;
-
-
-/* VIDEO_HARDWARE_STATE_HEADER.VGAStateFlags constants */
-#define VIDEO_STATE_NON_STANDARD_VGA 0x00000001
-#define VIDEO_STATE_UNEMULATED_VGA_STATE 0x00000002
-#define VIDEO_STATE_PACKED_CHAIN4_MODE 0x00000004
-
-typedef struct _VIDEO_HARDWARE_STATE_HEADER {
- ULONG Length;
- UCHAR PortValue[0x30];
- ULONG AttribIndexDataState;
- ULONG BasicSequencerOffset;
- ULONG BasicCrtContOffset;
- ULONG BasicGraphContOffset;
- ULONG BasicAttribContOffset;
- ULONG BasicDacOffset;
- ULONG BasicLatchesOffset;
- ULONG ExtendedSequencerOffset;
- ULONG ExtendedCrtContOffset;
- ULONG ExtendedGraphContOffset;
- ULONG ExtendedAttribContOffset;
- ULONG ExtendedDacOffset;
- ULONG ExtendedValidatorStateOffset;
- ULONG ExtendedMiscDataOffset;
- ULONG PlaneLength;
- ULONG Plane1Offset;
- ULONG Plane2Offset;
- ULONG Plane3Offset;
- ULONG Plane4Offset;
- ULONG VGAStateFlags;
- ULONG DIBOffset;
- ULONG DIBBitsPerPixel;
- ULONG DIBXResolution;
- ULONG DIBYResolution;
- ULONG DIBXlatOffset;
- ULONG DIBXlatLength;
- ULONG VesaInfoOffset;
- PVOID FrameBufferData;
-} VIDEO_HARDWARE_STATE_HEADER, *PVIDEO_HARDWARE_STATE_HEADER;
-
-typedef struct _VIDEO_CLUTDATA {
- UCHAR Red;
- UCHAR Green;
- UCHAR Blue;
- UCHAR Unused;
-} VIDEO_CLUTDATA, *PVIDEO_CLUTDATA;
-
-typedef struct {
- USHORT NumEntries;
- USHORT FirstEntry;
- union {
- VIDEO_CLUTDATA RgbArray;
- ULONG RgbLong;
- } LookupTable[1];
-} VIDEO_CLUT, *PVIDEO_CLUT;
-
-typedef struct _VIDEO_PALETTE_DATA {
- USHORT NumEntries;
- USHORT FirstEntry;
- USHORT Colors[1];
-} VIDEO_PALETTE_DATA, *PVIDEO_PALETTE_DATA;
-
-typedef struct _VIDEO_HARDWARE_STATE {
- PVIDEO_HARDWARE_STATE_HEADER StateHeader;
- ULONG StateLength;
-} VIDEO_HARDWARE_STATE, *PVIDEO_HARDWARE_STATE;
-
-#define VIDEO_CHILD_ACTIVE 0x00000001
-#define VIDEO_CHILD_DETACHED 0x00000002
-#define VIDEO_CHILD_NOPRUNE_FREQ 0x80000000
-#define VIDEO_CHILD_NOPRUNE_RESOLUTION 0x40000000
-
-#define VIDEO_DUALVIEW_REMOVABLE 0x00000001
-#define VIDEO_DUALVIEW_PRIMARY 0x80000000
-#define VIDEO_DUALVIEW_SECONDARY 0x40000000
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NTDDVDEO_H */
diff --git a/winsup/w32api/include/ddk/ntddvol.h b/winsup/w32api/include/ddk/ntddvol.h
deleted file mode 100644
index bc0932a..0000000
--- a/winsup/w32api/include/ddk/ntddvol.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * ntddvol.h
- *
- * Volume IOCTL interface.
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NTDDVOL_H
-#define __NTDDVOL_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-#define IOCTL_VOLUME_BASE ((ULONG) 'V')
-
-#define IOCTL_VOLUME_LOGICAL_TO_PHYSICAL \
- CTL_CODE(IOCTL_VOLUME_BASE, 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VOLUME_PHYSICAL_TO_LOGICAL \
- CTL_CODE(IOCTL_VOLUME_BASE, 9, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VOLUME_READ_PLEX \
- CTL_CODE(IOCTL_VOLUME_BASE, 11, METHOD_OUT_DIRECT, FILE_READ_ACCESS)
-
-#define IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS \
- CTL_CODE(IOCTL_VOLUME_BASE, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VOLUME_IS_CLUSTERED \
- CTL_CODE(IOCTL_VOLUME_BASE, 12, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VOLUME_QUERY_VOLUME_NUMBER \
- CTL_CODE(IOCTL_VOLUME_BASE, 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VOLUME_IS_PARTITION \
- CTL_CODE(IOCTL_VOLUME_BASE, 10, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VOLUME_SET_GPT_ATTRIBUTES \
- CTL_CODE(IOCTL_VOLUME_BASE, 13, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VOLUME_GET_GPT_ATTRIBUTES \
- CTL_CODE(IOCTL_VOLUME_BASE, 14, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VOLUME_SUPPORTS_ONLINE_OFFLINE \
- CTL_CODE(IOCTL_VOLUME_BASE, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VOLUME_ONLINE \
- CTL_CODE(IOCTL_VOLUME_BASE, 2, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_VOLUME_OFFLINE \
- CTL_CODE(IOCTL_VOLUME_BASE, 3, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define IOCTL_VOLUME_IS_OFFLINE \
- CTL_CODE(IOCTL_VOLUME_BASE, 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VOLUME_IS_IO_CAPABLE \
- CTL_CODE(IOCTL_VOLUME_BASE, 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_VOLUME_QUERY_FAILOVER_SET \
- CTL_CODE(IOCTL_VOLUME_BASE, 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-
-typedef struct _VOLUME_LOGICAL_OFFSET {
- LONGLONG LogicalOffset;
-} VOLUME_LOGICAL_OFFSET, *PVOLUME_LOGICAL_OFFSET;
-
-typedef struct _VOLUME_PHYSICAL_OFFSET {
- ULONG DiskNumber;
- LONGLONG Offset;
-} VOLUME_PHYSICAL_OFFSET, *PVOLUME_PHYSICAL_OFFSET;
-
-typedef struct _VOLUME_PHYSICAL_OFFSETS {
- ULONG NumberOfPhysicalOffsets;
- VOLUME_PHYSICAL_OFFSET PhysicalOffset[1];
-} VOLUME_PHYSICAL_OFFSETS, *PVOLUME_PHYSICAL_OFFSETS;
-
-typedef struct _VOLUME_READ_PLEX_INPUT {
- LARGE_INTEGER ByteOffset;
- ULONG Length;
- ULONG PlexNumber;
-} VOLUME_READ_PLEX_INPUT, *PVOLUME_READ_PLEX_INPUT;
-
-typedef struct _VOLUME_GET_GPT_ATTRIBUTES_INFORMATION {
- ULONGLONG GptAttributes;
-} VOLUME_GET_GPT_ATTRIBUTES_INFORMATION, *PVOLUME_GET_GPT_ATTRIBUTES_INFORMATION;
-
-typedef struct _VOLUME_SET_GPT_ATTRIBUTES_INFORMATION {
- ULONGLONG GptAttributes;
- BOOLEAN RevertOnClose;
- BOOLEAN ApplyToAllConnectedVolumes;
- USHORT Reserved1;
- ULONG Reserved2;
-} VOLUME_SET_GPT_ATTRIBUTES_INFORMATION, *PVOLUME_SET_GPT_ATTRIBUTES_INFORMATION;
-
-typedef struct _DISK_EXTENT {
- ULONG DiskNumber;
- LARGE_INTEGER StartingOffset;
- LARGE_INTEGER ExtentLength;
-} DISK_EXTENT, *PDISK_EXTENT;
-
-typedef struct _VOLUME_DISK_EXTENTS {
- ULONG NumberOfDiskExtents;
- DISK_EXTENT Extents[1];
-} VOLUME_DISK_EXTENTS, *PVOLUME_DISK_EXTENTS;
-
-typedef struct _VOLUME_NUMBER {
- ULONG VolumeNumber;
- WCHAR VolumeManagerName[8];
-} VOLUME_NUMBER, *PVOLUME_NUMBER;
-
-typedef struct _VOLUME_FAILOVER_SET {
- ULONG NumberOfDisks;
- ULONG DiskNumbers[1];
-} VOLUME_FAILOVER_SET, *PVOLUME_FAILOVER_SET;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NTDDVOL_H */
diff --git a/winsup/w32api/include/ddk/ntifs.h b/winsup/w32api/include/ddk/ntifs.h
deleted file mode 100644
index 2524e27..0000000
--- a/winsup/w32api/include/ddk/ntifs.h
+++ /dev/null
@@ -1,4726 +0,0 @@
-/*
- * ntifs.h
- *
- * Windows NT Filesystem Driver Developer Kit
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Bo Brantén <bosse@acc.umu.se>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef _NTIFS_
-#define _NTIFS_
-#define _GNU_NTIFS_
-
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include "ntapi.h"
-
-#define VER_PRODUCTBUILD 10000
-
-#ifndef NTSYSAPI
-#define NTSYSAPI
-#endif
-
-#ifndef NTKERNELAPI
-#define NTKERNELAPI STDCALL
-#endif
-
-typedef struct _SE_EXPORTS *PSE_EXPORTS;
-
-extern PUCHAR *FsRtlLegalAnsiCharacterArray;
-extern PSE_EXPORTS SeExports;
-extern PACL SePublicDefaultDacl;
-extern PACL SeSystemDefaultDacl;
-
-#define ANSI_DOS_STAR ('<')
-#define ANSI_DOS_QM ('>')
-#define ANSI_DOS_DOT ('"')
-
-#define DOS_STAR (L'<')
-#define DOS_QM (L'>')
-#define DOS_DOT (L'"')
-
-/* also in winnt.h */
-#define ACCESS_ALLOWED_ACE_TYPE (0x0)
-#define ACCESS_DENIED_ACE_TYPE (0x1)
-#define SYSTEM_AUDIT_ACE_TYPE (0x2)
-#define SYSTEM_ALARM_ACE_TYPE (0x3)
-
-#define COMPRESSION_FORMAT_NONE (0x0000)
-#define COMPRESSION_FORMAT_DEFAULT (0x0001)
-#define COMPRESSION_FORMAT_LZNT1 (0x0002)
-#define COMPRESSION_ENGINE_STANDARD (0x0000)
-#define COMPRESSION_ENGINE_MAXIMUM (0x0100)
-#define COMPRESSION_ENGINE_HIBER (0x0200)
-
-#define FILE_ACTION_ADDED 0x00000001
-#define FILE_ACTION_REMOVED 0x00000002
-#define FILE_ACTION_MODIFIED 0x00000003
-#define FILE_ACTION_RENAMED_OLD_NAME 0x00000004
-#define FILE_ACTION_RENAMED_NEW_NAME 0x00000005
-#define FILE_ACTION_ADDED_STREAM 0x00000006
-#define FILE_ACTION_REMOVED_STREAM 0x00000007
-#define FILE_ACTION_MODIFIED_STREAM 0x00000008
-#define FILE_ACTION_REMOVED_BY_DELETE 0x00000009
-#define FILE_ACTION_ID_NOT_TUNNELLED 0x0000000A
-#define FILE_ACTION_TUNNELLED_ID_COLLISION 0x0000000B
-/* end winnt.h */
-
-#define FILE_EA_TYPE_BINARY 0xfffe
-#define FILE_EA_TYPE_ASCII 0xfffd
-#define FILE_EA_TYPE_BITMAP 0xfffb
-#define FILE_EA_TYPE_METAFILE 0xfffa
-#define FILE_EA_TYPE_ICON 0xfff9
-#define FILE_EA_TYPE_EA 0xffee
-#define FILE_EA_TYPE_MVMT 0xffdf
-#define FILE_EA_TYPE_MVST 0xffde
-#define FILE_EA_TYPE_ASN1 0xffdd
-#define FILE_EA_TYPE_FAMILY_IDS 0xff01
-
-#define FILE_NEED_EA 0x00000080
-
-/* also in winnt.h */
-#define FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001
-#define FILE_NOTIFY_CHANGE_DIR_NAME 0x00000002
-#define FILE_NOTIFY_CHANGE_NAME 0x00000003
-#define FILE_NOTIFY_CHANGE_ATTRIBUTES 0x00000004
-#define FILE_NOTIFY_CHANGE_SIZE 0x00000008
-#define FILE_NOTIFY_CHANGE_LAST_WRITE 0x00000010
-#define FILE_NOTIFY_CHANGE_LAST_ACCESS 0x00000020
-#define FILE_NOTIFY_CHANGE_CREATION 0x00000040
-#define FILE_NOTIFY_CHANGE_EA 0x00000080
-#define FILE_NOTIFY_CHANGE_SECURITY 0x00000100
-#define FILE_NOTIFY_CHANGE_STREAM_NAME 0x00000200
-#define FILE_NOTIFY_CHANGE_STREAM_SIZE 0x00000400
-#define FILE_NOTIFY_CHANGE_STREAM_WRITE 0x00000800
-#define FILE_NOTIFY_VALID_MASK 0x00000fff
-/* end winnt.h */
-
-#define FILE_OPLOCK_BROKEN_TO_LEVEL_2 0x00000007
-#define FILE_OPLOCK_BROKEN_TO_NONE 0x00000008
-
-#define FILE_OPBATCH_BREAK_UNDERWAY 0x00000009
-
-#define FILE_CASE_SENSITIVE_SEARCH 0x00000001
-#define FILE_CASE_PRESERVED_NAMES 0x00000002
-#define FILE_UNICODE_ON_DISK 0x00000004
-#define FILE_PERSISTENT_ACLS 0x00000008
-#define FILE_FILE_COMPRESSION 0x00000010
-#define FILE_VOLUME_QUOTAS 0x00000020
-#define FILE_SUPPORTS_SPARSE_FILES 0x00000040
-#define FILE_SUPPORTS_REPARSE_POINTS 0x00000080
-#define FILE_SUPPORTS_REMOTE_STORAGE 0x00000100
-#define FS_LFN_APIS 0x00004000
-#define FILE_VOLUME_IS_COMPRESSED 0x00008000
-#define FILE_SUPPORTS_OBJECT_IDS 0x00010000
-#define FILE_SUPPORTS_ENCRYPTION 0x00020000
-#define FILE_NAMED_STREAMS 0x00040000
-#define FILE_READ_ONLY_VOLUME 0x00080000
-
-#define FILE_PIPE_BYTE_STREAM_TYPE 0x00000000
-#define FILE_PIPE_MESSAGE_TYPE 0x00000001
-
-#define FILE_PIPE_BYTE_STREAM_MODE 0x00000000
-#define FILE_PIPE_MESSAGE_MODE 0x00000001
-
-#define FILE_PIPE_QUEUE_OPERATION 0x00000000
-#define FILE_PIPE_COMPLETE_OPERATION 0x00000001
-
-#define FILE_PIPE_INBOUND 0x00000000
-#define FILE_PIPE_OUTBOUND 0x00000001
-#define FILE_PIPE_FULL_DUPLEX 0x00000002
-
-#define FILE_PIPE_DISCONNECTED_STATE 0x00000001
-#define FILE_PIPE_LISTENING_STATE 0x00000002
-#define FILE_PIPE_CONNECTED_STATE 0x00000003
-#define FILE_PIPE_CLOSING_STATE 0x00000004
-
-#define FILE_PIPE_CLIENT_END 0x00000000
-#define FILE_PIPE_SERVER_END 0x00000001
-
-#define FILE_PIPE_READ_DATA 0x00000000
-#define FILE_PIPE_WRITE_SPACE 0x00000001
-
-#define FILE_STORAGE_TYPE_SPECIFIED 0x00000041 /* FILE_DIRECTORY_FILE | FILE_NON_DIRECTORY_FILE */
-#define FILE_STORAGE_TYPE_DEFAULT (StorageTypeDefault << FILE_STORAGE_TYPE_SHIFT)
-#define FILE_STORAGE_TYPE_DIRECTORY (StorageTypeDirectory << FILE_STORAGE_TYPE_SHIFT)
-#define FILE_STORAGE_TYPE_FILE (StorageTypeFile << FILE_STORAGE_TYPE_SHIFT)
-#define FILE_STORAGE_TYPE_DOCFILE (StorageTypeDocfile << FILE_STORAGE_TYPE_SHIFT)
-#define FILE_STORAGE_TYPE_JUNCTION_POINT (StorageTypeJunctionPoint << FILE_STORAGE_TYPE_SHIFT)
-#define FILE_STORAGE_TYPE_CATALOG (StorageTypeCatalog << FILE_STORAGE_TYPE_SHIFT)
-#define FILE_STORAGE_TYPE_STRUCTURED_STORAGE (StorageTypeStructuredStorage << FILE_STORAGE_TYPE_SHIFT)
-#define FILE_STORAGE_TYPE_EMBEDDING (StorageTypeEmbedding << FILE_STORAGE_TYPE_SHIFT)
-#define FILE_STORAGE_TYPE_STREAM (StorageTypeStream << FILE_STORAGE_TYPE_SHIFT)
-#define FILE_MINIMUM_STORAGE_TYPE FILE_STORAGE_TYPE_DEFAULT
-#define FILE_MAXIMUM_STORAGE_TYPE FILE_STORAGE_TYPE_STREAM
-#define FILE_STORAGE_TYPE_MASK 0x000f0000
-#define FILE_STORAGE_TYPE_SHIFT 16
-
-#define FILE_VC_QUOTA_NONE 0x00000000
-#define FILE_VC_QUOTA_TRACK 0x00000001
-#define FILE_VC_QUOTA_ENFORCE 0x00000002
-#define FILE_VC_QUOTA_MASK 0x00000003
-
-#define FILE_VC_QUOTAS_LOG_VIOLATIONS 0x00000004
-#define FILE_VC_CONTENT_INDEX_DISABLED 0x00000008
-
-#define FILE_VC_LOG_QUOTA_THRESHOLD 0x00000010
-#define FILE_VC_LOG_QUOTA_LIMIT 0x00000020
-#define FILE_VC_LOG_VOLUME_THRESHOLD 0x00000040
-#define FILE_VC_LOG_VOLUME_LIMIT 0x00000080
-
-#define FILE_VC_QUOTAS_INCOMPLETE 0x00000100
-#define FILE_VC_QUOTAS_REBUILDING 0x00000200
-
-#define FILE_VC_VALID_MASK 0x000003ff
-
-#define FSRTL_FLAG_FILE_MODIFIED (0x01)
-#define FSRTL_FLAG_FILE_LENGTH_CHANGED (0x02)
-#define FSRTL_FLAG_LIMIT_MODIFIED_PAGES (0x04)
-#define FSRTL_FLAG_ACQUIRE_MAIN_RSRC_EX (0x08)
-#define FSRTL_FLAG_ACQUIRE_MAIN_RSRC_SH (0x10)
-#define FSRTL_FLAG_USER_MAPPED_FILE (0x20)
-#define FSRTL_FLAG_EOF_ADVANCE_ACTIVE (0x80)
-
-#define FSRTL_FLAG2_DO_MODIFIED_WRITE (0x01)
-
-#define FSRTL_FSP_TOP_LEVEL_IRP (0x01)
-#define FSRTL_CACHE_TOP_LEVEL_IRP (0x02)
-#define FSRTL_MOD_WRITE_TOP_LEVEL_IRP (0x03)
-#define FSRTL_FAST_IO_TOP_LEVEL_IRP (0x04)
-#define FSRTL_MAX_TOP_LEVEL_IRP_FLAG (0x04)
-
-#define FSRTL_VOLUME_DISMOUNT 1
-#define FSRTL_VOLUME_DISMOUNT_FAILED 2
-#define FSRTL_VOLUME_LOCK 3
-#define FSRTL_VOLUME_LOCK_FAILED 4
-#define FSRTL_VOLUME_UNLOCK 5
-#define FSRTL_VOLUME_MOUNT 6
-
-#define FSRTL_WILD_CHARACTER 0x08
-
-#ifdef _X86_
-#define HARDWARE_PTE HARDWARE_PTE_X86
-#define PHARDWARE_PTE PHARDWARE_PTE_X86
-#else
-#define HARDWARE_PTE ULONG
-#define PHARDWARE_PTE PULONG
-#endif
-
-#define IO_CHECK_CREATE_PARAMETERS 0x0200
-#define IO_ATTACH_DEVICE 0x0400
-
-#define IO_ATTACH_DEVICE_API 0x80000000
-/* also in winnt.h */
-#define IO_COMPLETION_QUERY_STATE 0x0001
-#define IO_COMPLETION_MODIFY_STATE 0x0002
-#define IO_COMPLETION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
-/* end winnt.h */
-#define IO_FILE_OBJECT_NON_PAGED_POOL_CHARGE 64
-#define IO_FILE_OBJECT_PAGED_POOL_CHARGE 1024
-
-#define IO_TYPE_APC 18
-#define IO_TYPE_DPC 19
-#define IO_TYPE_DEVICE_QUEUE 20
-#define IO_TYPE_EVENT_PAIR 21
-#define IO_TYPE_INTERRUPT 22
-#define IO_TYPE_PROFILE 23
-
-#define IRP_BEING_VERIFIED 0x10
-
-#define MAILSLOT_CLASS_FIRSTCLASS 1
-#define MAILSLOT_CLASS_SECONDCLASS 2
-
-#define MAILSLOT_SIZE_AUTO 0
-
-#define MAP_PROCESS 1L
-#define MAP_SYSTEM 2L
-#define MEM_DOS_LIM 0x40000000
-/* also in winnt.h */
-#define MEM_IMAGE SEC_IMAGE
-/* end winnt.h */
-#define OB_TYPE_TYPE 1
-#define OB_TYPE_DIRECTORY 2
-#define OB_TYPE_SYMBOLIC_LINK 3
-#define OB_TYPE_TOKEN 4
-#define OB_TYPE_PROCESS 5
-#define OB_TYPE_THREAD 6
-#define OB_TYPE_EVENT 7
-#define OB_TYPE_EVENT_PAIR 8
-#define OB_TYPE_MUTANT 9
-#define OB_TYPE_SEMAPHORE 10
-#define OB_TYPE_TIMER 11
-#define OB_TYPE_PROFILE 12
-#define OB_TYPE_WINDOW_STATION 13
-#define OB_TYPE_DESKTOP 14
-#define OB_TYPE_SECTION 15
-#define OB_TYPE_KEY 16
-#define OB_TYPE_PORT 17
-#define OB_TYPE_ADAPTER 18
-#define OB_TYPE_CONTROLLER 19
-#define OB_TYPE_DEVICE 20
-#define OB_TYPE_DRIVER 21
-#define OB_TYPE_IO_COMPLETION 22
-#define OB_TYPE_FILE 23
-
-#define PIN_WAIT (1)
-#define PIN_EXCLUSIVE (2)
-#define PIN_NO_READ (4)
-#define PIN_IF_BCB (8)
-
-#define PORT_CONNECT 0x0001
-#define PORT_ALL_ACCESS (STANDARD_RIGHTS_ALL |\
- PORT_CONNECT)
-/* also in winnt.h */
-#define SEC_BASED 0x00200000
-#define SEC_NO_CHANGE 0x00400000
-#define SEC_FILE 0x00800000
-#define SEC_IMAGE 0x01000000
-#define SEC_VLM 0x02000000
-#define SEC_RESERVE 0x04000000
-#define SEC_COMMIT 0x08000000
-#define SEC_NOCACHE 0x10000000
-
-#define SECURITY_WORLD_SID_AUTHORITY {0,0,0,0,0,1}
-#define SECURITY_WORLD_RID (0x00000000L)
-
-#define SID_REVISION 1
-
-#define TOKEN_ASSIGN_PRIMARY (0x0001)
-#define TOKEN_DUPLICATE (0x0002)
-#define TOKEN_IMPERSONATE (0x0004)
-#define TOKEN_QUERY (0x0008)
-#define TOKEN_QUERY_SOURCE (0x0010)
-#define TOKEN_ADJUST_PRIVILEGES (0x0020)
-#define TOKEN_ADJUST_GROUPS (0x0040)
-#define TOKEN_ADJUST_DEFAULT (0x0080)
-
-#define TOKEN_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED |\
- TOKEN_ASSIGN_PRIMARY |\
- TOKEN_DUPLICATE |\
- TOKEN_IMPERSONATE |\
- TOKEN_QUERY |\
- TOKEN_QUERY_SOURCE |\
- TOKEN_ADJUST_PRIVILEGES |\
- TOKEN_ADJUST_GROUPS |\
- TOKEN_ADJUST_DEFAULT)
-
-#define TOKEN_READ (STANDARD_RIGHTS_READ |\
- TOKEN_QUERY)
-
-#define TOKEN_WRITE (STANDARD_RIGHTS_WRITE |\
- TOKEN_ADJUST_PRIVILEGES |\
- TOKEN_ADJUST_GROUPS |\
- TOKEN_ADJUST_DEFAULT)
-
-#define TOKEN_EXECUTE (STANDARD_RIGHTS_EXECUTE)
-
-#define TOKEN_SOURCE_LENGTH 8
-/* end winnt.h */
-
-#define TOKEN_HAS_TRAVERSE_PRIVILEGE 0x01
-#define TOKEN_HAS_BACKUP_PRIVILEGE 0x02
-#define TOKEN_HAS_RESTORE_PRIVILEGE 0x04
-#define TOKEN_HAS_ADMIN_GROUP 0x08
-#define TOKEN_IS_RESTRICTED 0x10
-
-#define VACB_MAPPING_GRANULARITY (0x40000)
-#define VACB_OFFSET_SHIFT (18)
-
-#define FSCTL_REQUEST_OPLOCK_LEVEL_1 CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_REQUEST_OPLOCK_LEVEL_2 CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_REQUEST_BATCH_OPLOCK CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_OPLOCK_BREAK_ACKNOWLEDGE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 3, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_OPBATCH_ACK_CLOSE_PENDING CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_OPLOCK_BREAK_NOTIFY CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_LOCK_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_UNLOCK_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_DISMOUNT_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define FSCTL_IS_VOLUME_MOUNTED CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 10, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_IS_PATHNAME_VALID CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 11, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_MARK_VOLUME_DIRTY CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 12, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define FSCTL_QUERY_RETRIEVAL_POINTERS CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 14, METHOD_NEITHER, FILE_ANY_ACCESS)
-#define FSCTL_GET_COMPRESSION CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 15, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_SET_COMPRESSION CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 16, METHOD_BUFFERED, FILE_READ_DATA | FILE_WRITE_DATA)
-
-
-#define FSCTL_MARK_AS_SYSTEM_HIVE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 19, METHOD_NEITHER, FILE_ANY_ACCESS)
-#define FSCTL_OPLOCK_BREAK_ACK_NO_2 CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 20, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_INVALIDATE_VOLUMES CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 21, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_QUERY_FAT_BPB CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 22, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_REQUEST_FILTER_OPLOCK CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 23, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_FILESYSTEM_GET_STATISTICS CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 24, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#if (VER_PRODUCTBUILD >= 1381)
-
-#define FSCTL_GET_NTFS_VOLUME_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 25, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_GET_NTFS_FILE_RECORD CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 26, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_GET_VOLUME_BITMAP CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 27, METHOD_NEITHER, FILE_ANY_ACCESS)
-#define FSCTL_GET_RETRIEVAL_POINTERS CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 28, METHOD_NEITHER, FILE_ANY_ACCESS)
-#define FSCTL_MOVE_FILE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 29, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_IS_VOLUME_DIRTY CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 30, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_GET_HFS_INFORMATION CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 31, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_ALLOW_EXTENDED_DASD_IO CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 32, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#endif /* (VER_PRODUCTBUILD >= 1381) */
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-#define FSCTL_READ_PROPERTY_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 33, METHOD_NEITHER, FILE_ANY_ACCESS)
-#define FSCTL_WRITE_PROPERTY_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 34, METHOD_NEITHER, FILE_ANY_ACCESS)
-#define FSCTL_FIND_FILES_BY_SID CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 35, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define FSCTL_DUMP_PROPERTY_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 37, METHOD_NEITHER, FILE_ANY_ACCESS)
-#define FSCTL_SET_OBJECT_ID CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 38, METHOD_BUFFERED, FILE_WRITE_DATA)
-#define FSCTL_GET_OBJECT_ID CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 39, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_DELETE_OBJECT_ID CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 40, METHOD_BUFFERED, FILE_WRITE_DATA)
-#define FSCTL_SET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 41, METHOD_BUFFERED, FILE_WRITE_DATA)
-#define FSCTL_GET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 42, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_DELETE_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 43, METHOD_BUFFERED, FILE_WRITE_DATA)
-#define FSCTL_ENUM_USN_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 44, METHOD_NEITHER, FILE_READ_DATA)
-#define FSCTL_SECURITY_ID_CHECK CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 45, METHOD_NEITHER, FILE_READ_DATA)
-#define FSCTL_READ_USN_JOURNAL CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 46, METHOD_NEITHER, FILE_READ_DATA)
-#define FSCTL_SET_OBJECT_ID_EXTENDED CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 47, METHOD_BUFFERED, FILE_WRITE_DATA)
-#define FSCTL_CREATE_OR_GET_OBJECT_ID CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 48, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_SET_SPARSE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 49, METHOD_BUFFERED, FILE_WRITE_DATA)
-#define FSCTL_SET_ZERO_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 50, METHOD_BUFFERED, FILE_WRITE_DATA)
-#define FSCTL_QUERY_ALLOCATED_RANGES CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 51, METHOD_NEITHER, FILE_READ_DATA)
-#define FSCTL_ENABLE_UPGRADE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 52, METHOD_BUFFERED, FILE_WRITE_DATA)
-#define FSCTL_SET_ENCRYPTION CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 53, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_ENCRYPTION_FSCTL_IO CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 54, METHOD_NEITHER, FILE_ANY_ACCESS)
-#define FSCTL_WRITE_RAW_ENCRYPTED CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 55, METHOD_NEITHER, FILE_ANY_ACCESS)
-#define FSCTL_READ_RAW_ENCRYPTED CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 56, METHOD_NEITHER, FILE_ANY_ACCESS)
-#define FSCTL_CREATE_USN_JOURNAL CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 57, METHOD_NEITHER, FILE_READ_DATA)
-#define FSCTL_READ_FILE_USN_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 58, METHOD_NEITHER, FILE_READ_DATA)
-#define FSCTL_WRITE_USN_CLOSE_RECORD CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 59, METHOD_NEITHER, FILE_READ_DATA)
-#define FSCTL_EXTEND_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 60, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_QUERY_USN_JOURNAL CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 61, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_DELETE_USN_JOURNAL CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 62, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_MARK_HANDLE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 63, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_SIS_COPYFILE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 64, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_SIS_LINK_FILES CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 65, METHOD_BUFFERED, FILE_READ_DATA | FILE_WRITE_DATA)
-#define FSCTL_HSM_MSG CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 66, METHOD_BUFFERED, FILE_READ_DATA | FILE_WRITE_DATA)
-#define FSCTL_NSS_CONTROL CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 67, METHOD_BUFFERED, FILE_WRITE_DATA)
-#define FSCTL_HSM_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 68, METHOD_NEITHER, FILE_READ_DATA | FILE_WRITE_DATA)
-#define FSCTL_RECALL_FILE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 69, METHOD_NEITHER, FILE_ANY_ACCESS)
-#define FSCTL_NSS_RCONTROL CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 70, METHOD_BUFFERED, FILE_READ_DATA)
-#define FSCTL_READ_FROM_PLEX CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 71, METHOD_OUT_DIRECT, FILE_READ_DATA)
-#define FSCTL_FILE_PREFETCH CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 72, METHOD_BUFFERED, FILE_SPECIAL_ACCESS)
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-#define FSCTL_MAILSLOT_PEEK CTL_CODE(FILE_DEVICE_MAILSLOT, 0, METHOD_NEITHER, FILE_READ_DATA)
-
-#define FSCTL_NETWORK_SET_CONFIGURATION_INFO CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 102, METHOD_IN_DIRECT, FILE_ANY_ACCESS)
-#define FSCTL_NETWORK_GET_CONFIGURATION_INFO CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 103, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
-#define FSCTL_NETWORK_GET_CONNECTION_INFO CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 104, METHOD_NEITHER, FILE_ANY_ACCESS)
-#define FSCTL_NETWORK_ENUMERATE_CONNECTIONS CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 105, METHOD_NEITHER, FILE_ANY_ACCESS)
-#define FSCTL_NETWORK_DELETE_CONNECTION CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 107, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_NETWORK_GET_STATISTICS CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 116, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_NETWORK_SET_DOMAIN_NAME CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 120, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_NETWORK_REMOTE_BOOT_INIT_SCRT CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 250, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define FSCTL_PIPE_ASSIGN_EVENT CTL_CODE(FILE_DEVICE_NAMED_PIPE, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_PIPE_DISCONNECT CTL_CODE(FILE_DEVICE_NAMED_PIPE, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_PIPE_LISTEN CTL_CODE(FILE_DEVICE_NAMED_PIPE, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_PIPE_PEEK CTL_CODE(FILE_DEVICE_NAMED_PIPE, 3, METHOD_BUFFERED, FILE_READ_DATA)
-#define FSCTL_PIPE_QUERY_EVENT CTL_CODE(FILE_DEVICE_NAMED_PIPE, 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_PIPE_TRANSCEIVE CTL_CODE(FILE_DEVICE_NAMED_PIPE, 5, METHOD_NEITHER, FILE_READ_DATA | FILE_WRITE_DATA)
-#define FSCTL_PIPE_WAIT CTL_CODE(FILE_DEVICE_NAMED_PIPE, 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_PIPE_IMPERSONATE CTL_CODE(FILE_DEVICE_NAMED_PIPE, 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_PIPE_SET_CLIENT_PROCESS CTL_CODE(FILE_DEVICE_NAMED_PIPE, 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_PIPE_QUERY_CLIENT_PROCESS CTL_CODE(FILE_DEVICE_NAMED_PIPE, 9, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_PIPE_INTERNAL_READ CTL_CODE(FILE_DEVICE_NAMED_PIPE, 2045, METHOD_BUFFERED, FILE_READ_DATA)
-#define FSCTL_PIPE_INTERNAL_WRITE CTL_CODE(FILE_DEVICE_NAMED_PIPE, 2046, METHOD_BUFFERED, FILE_WRITE_DATA)
-#define FSCTL_PIPE_INTERNAL_TRANSCEIVE CTL_CODE(FILE_DEVICE_NAMED_PIPE, 2047, METHOD_NEITHER, FILE_READ_DATA | FILE_WRITE_DATA)
-#define FSCTL_PIPE_INTERNAL_READ_OVFLOW CTL_CODE(FILE_DEVICE_NAMED_PIPE, 2048, METHOD_BUFFERED, FILE_READ_DATA)
-
-#define IOCTL_REDIR_QUERY_PATH CTL_CODE(FILE_DEVICE_NETWORK_FILE_SYSTEM, 99, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-typedef PVOID PEJOB;
-typedef PVOID OPLOCK, *POPLOCK;
-typedef PVOID PWOW64_PROCESS;
-
-typedef struct _CACHE_MANAGER_CALLBACKS *PCACHE_MANAGER_CALLBACKS;
-typedef struct _EPROCESS_QUOTA_BLOCK *PEPROCESS_QUOTA_BLOCK;
-typedef struct _FILE_GET_QUOTA_INFORMATION *PFILE_GET_QUOTA_INFORMATION;
-typedef struct _HANDLE_TABLE *PHANDLE_TABLE;
-typedef struct _KEVENT_PAIR *PKEVENT_PAIR;
-typedef struct _KPROCESS *PKPROCESS;
-typedef struct _KQUEUE *PKQUEUE;
-typedef struct _KTRAP_FRAME *PKTRAP_FRAME;
-typedef struct _MAILSLOT_CREATE_PARAMETERS *PMAILSLOT_CREATE_PARAMETERS;
-typedef struct _MMWSL *PMMWSL;
-typedef struct _NAMED_PIPE_CREATE_PARAMETERS *PNAMED_PIPE_CREATE_PARAMETERS;
-typedef struct _OBJECT_DIRECTORY *POBJECT_DIRECTORY;
-typedef struct _PAGEFAULT_HISTORY *PPAGEFAULT_HISTORY;
-typedef struct _PS_IMPERSONATION_INFORMATION *PPS_IMPERSONATION_INFORMATION;
-typedef struct _SECTION_OBJECT *PSECTION_OBJECT;
-typedef struct _SHARED_CACHE_MAP *PSHARED_CACHE_MAP;
-typedef struct _TERMINATION_PORT *PTERMINATION_PORT;
-typedef struct _VACB *PVACB;
-typedef struct _VAD_HEADER *PVAD_HEADER;
-
-typedef struct _NOTIFY_SYNC
-{
- ULONG Unknown0;
- ULONG Unknown1;
- ULONG Unknown2;
- USHORT Unknown3;
- USHORT Unknown4;
- ULONG Unknown5;
- ULONG Unknown6;
- ULONG Unknown7;
- ULONG Unknown8;
- ULONG Unknown9;
- ULONG Unknown10;
-} NOTIFY_SYNC, * PNOTIFY_SYNC;
-
-typedef enum _FAST_IO_POSSIBLE {
- FastIoIsNotPossible,
- FastIoIsPossible,
- FastIoIsQuestionable
-} FAST_IO_POSSIBLE;
-
-typedef enum _FILE_STORAGE_TYPE {
- StorageTypeDefault = 1,
- StorageTypeDirectory,
- StorageTypeFile,
- StorageTypeJunctionPoint,
- StorageTypeCatalog,
- StorageTypeStructuredStorage,
- StorageTypeEmbedding,
- StorageTypeStream
-} FILE_STORAGE_TYPE;
-
-typedef enum _IO_COMPLETION_INFORMATION_CLASS {
- IoCompletionBasicInformation
-} IO_COMPLETION_INFORMATION_CLASS;
-
-typedef enum _OBJECT_INFO_CLASS {
- ObjectBasicInfo,
- ObjectNameInfo,
- ObjectTypeInfo,
- ObjectAllTypesInfo,
- ObjectProtectionInfo
-} OBJECT_INFO_CLASS;
-
-typedef struct _HARDWARE_PTE_X86 {
- ULONG Valid : 1;
- ULONG Write : 1;
- ULONG Owner : 1;
- ULONG WriteThrough : 1;
- ULONG CacheDisable : 1;
- ULONG Accessed : 1;
- ULONG Dirty : 1;
- ULONG LargePage : 1;
- ULONG Global : 1;
- ULONG CopyOnWrite : 1;
- ULONG Prototype : 1;
- ULONG reserved : 1;
- ULONG PageFrameNumber : 20;
-} HARDWARE_PTE_X86, *PHARDWARE_PTE_X86;
-
-typedef struct _KAPC_STATE {
- LIST_ENTRY ApcListHead[2];
- PKPROCESS Process;
- BOOLEAN KernelApcInProgress;
- BOOLEAN KernelApcPending;
- BOOLEAN UserApcPending;
-} KAPC_STATE, *PKAPC_STATE;
-
-typedef struct _KGDTENTRY {
- USHORT LimitLow;
- USHORT BaseLow;
- union {
- struct {
- UCHAR BaseMid;
- UCHAR Flags1;
- UCHAR Flags2;
- UCHAR BaseHi;
- } Bytes;
- struct {
- ULONG BaseMid : 8;
- ULONG Type : 5;
- ULONG Dpl : 2;
- ULONG Pres : 1;
- ULONG LimitHi : 4;
- ULONG Sys : 1;
- ULONG Reserved_0 : 1;
- ULONG Default_Big : 1;
- ULONG Granularity : 1;
- ULONG BaseHi : 8;
- } Bits;
- } HighWord;
-} KGDTENTRY, *PKGDTENTRY;
-
-typedef struct _KIDTENTRY {
- USHORT Offset;
- USHORT Selector;
- USHORT Access;
- USHORT ExtendedOffset;
-} KIDTENTRY, *PKIDTENTRY;
-
-#if (VER_PRODUCTBUILD >= 2600)
-
-typedef struct _MMSUPPORT_FLAGS {
- ULONG SessionSpace : 1;
- ULONG BeingTrimmed : 1;
- ULONG SessionLeader : 1;
- ULONG TrimHard : 1;
- ULONG WorkingSetHard : 1;
- ULONG AddressSpaceBeingDeleted : 1;
- ULONG Available : 10;
- ULONG AllowWorkingSetAdjustment : 8;
- ULONG MemoryPriority : 8;
-} MMSUPPORT_FLAGS, *PMMSUPPORT_FLAGS;
-
-#else
-
-typedef struct _MMSUPPORT_FLAGS {
- ULONG SessionSpace : 1;
- ULONG BeingTrimmed : 1;
- ULONG ProcessInSession : 1;
- ULONG SessionLeader : 1;
- ULONG TrimHard : 1;
- ULONG WorkingSetHard : 1;
- ULONG WriteWatch : 1;
- ULONG Filler : 25;
-} MMSUPPORT_FLAGS, *PMMSUPPORT_FLAGS;
-
-#endif
-
-#if (VER_PRODUCTBUILD >= 2600)
-
-typedef struct _MMSUPPORT {
- LARGE_INTEGER LastTrimTime;
- MMSUPPORT_FLAGS Flags;
- ULONG PageFaultCount;
- ULONG PeakWorkingSetSize;
- ULONG WorkingSetSize;
- ULONG MinimumWorkingSetSize;
- ULONG MaximumWorkingSetSize;
- PMMWSL VmWorkingSetList;
- LIST_ENTRY WorkingSetExpansionLinks;
- ULONG Claim;
- ULONG NextEstimationSlot;
- ULONG NextAgingSlot;
- ULONG EstimatedAvailable;
- ULONG GrowthSinceLastEstimate;
-} MMSUPPORT, *PMMSUPPORT;
-
-#else
-
-typedef struct _MMSUPPORT {
- LARGE_INTEGER LastTrimTime;
- ULONG LastTrimFaultCount;
- ULONG PageFaultCount;
- ULONG PeakWorkingSetSize;
- ULONG WorkingSetSize;
- ULONG MinimumWorkingSetSize;
- ULONG MaximumWorkingSetSize;
- PMMWSL VmWorkingSetList;
- LIST_ENTRY WorkingSetExpansionLinks;
- BOOLEAN AllowWorkingSetAdjustment;
- BOOLEAN AddressSpaceBeingDeleted;
- UCHAR ForegroundSwitchCount;
- UCHAR MemoryPriority;
-#if (VER_PRODUCTBUILD >= 2195)
- union {
- ULONG LongFlags;
- MMSUPPORT_FLAGS Flags;
- } u;
- ULONG Claim;
- ULONG NextEstimationSlot;
- ULONG NextAgingSlot;
- ULONG EstimatedAvailable;
- ULONG GrowthSinceLastEstimate;
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-} MMSUPPORT, *PMMSUPPORT;
-
-#endif
-
-typedef struct _SE_AUDIT_PROCESS_CREATION_INFO {
- POBJECT_NAME_INFORMATION ImageFileName;
-} SE_AUDIT_PROCESS_CREATION_INFO, *PSE_AUDIT_PROCESS_CREATION_INFO;
-
-typedef struct _BITMAP_RANGE {
- LIST_ENTRY Links;
- LARGE_INTEGER BasePage;
- ULONG FirstDirtyPage;
- ULONG LastDirtyPage;
- ULONG DirtyPages;
- PULONG Bitmap;
-} BITMAP_RANGE, *PBITMAP_RANGE;
-
-typedef struct _CACHE_UNINITIALIZE_EVENT {
- struct _CACHE_UNINITIALIZE_EVENT *Next;
- KEVENT Event;
-} CACHE_UNINITIALIZE_EVENT, *PCACHE_UNINITIALIZE_EVENT;
-
-typedef struct _CC_FILE_SIZES {
- LARGE_INTEGER AllocationSize;
- LARGE_INTEGER FileSize;
- LARGE_INTEGER ValidDataLength;
-} CC_FILE_SIZES, *PCC_FILE_SIZES;
-
-typedef struct _COMPRESSED_DATA_INFO {
- USHORT CompressionFormatAndEngine;
- UCHAR CompressionUnitShift;
- UCHAR ChunkShift;
- UCHAR ClusterShift;
- UCHAR Reserved;
- USHORT NumberOfChunks;
- ULONG CompressedChunkSizes[ANYSIZE_ARRAY];
-} COMPRESSED_DATA_INFO, *PCOMPRESSED_DATA_INFO;
-
-typedef struct _DEVICE_MAP {
- POBJECT_DIRECTORY DosDevicesDirectory;
- POBJECT_DIRECTORY GlobalDosDevicesDirectory;
- ULONG ReferenceCount;
- ULONG DriveMap;
- UCHAR DriveType[32];
-} DEVICE_MAP, *PDEVICE_MAP;
-
-#if (VER_PRODUCTBUILD >= 2600)
-
-typedef struct _EX_FAST_REF {
- _ANONYMOUS_UNION union {
- PVOID Object;
- ULONG RefCnt : 3;
- ULONG Value;
- } DUMMYUNIONNAME;
-} EX_FAST_REF, *PEX_FAST_REF;
-
-typedef struct _EX_PUSH_LOCK {
- _ANONYMOUS_UNION union {
- _ANONYMOUS_STRUCT struct {
- ULONG Waiting : 1;
- ULONG Exclusive : 1;
- ULONG Shared : 30;
- } DUMMYSTRUCTNAME;
- ULONG Value;
- PVOID Ptr;
- } DUMMYUNIONNAME;
-} EX_PUSH_LOCK, *PEX_PUSH_LOCK;
-
-typedef struct _EX_RUNDOWN_REF {
- _ANONYMOUS_UNION union {
- ULONG Count;
- PVOID Ptr;
- } DUMMYUNIONNAME;
-} EX_RUNDOWN_REF, *PEX_RUNDOWN_REF;
-
-#endif
-
-typedef struct _EPROCESS_QUOTA_ENTRY {
- ULONG Usage;
- ULONG Limit;
- ULONG Peak;
- ULONG Return;
-} EPROCESS_QUOTA_ENTRY, *PEPROCESS_QUOTA_ENTRY;
-
-typedef struct _EPROCESS_QUOTA_BLOCK {
- EPROCESS_QUOTA_ENTRY QuotaEntry[3];
- LIST_ENTRY QuotaList;
- ULONG ReferenceCount;
- ULONG ProcessCount;
-} EPROCESS_QUOTA_BLOCK, *PEPROCESS_QUOTA_BLOCK;
-
-/*
- * When needing these parameters cast your PIO_STACK_LOCATION to
- * PEXTENDED_IO_STACK_LOCATION
- */
-#if !defined(_ALPHA_)
-#include <pshpack4.h>
-#endif
-typedef struct _EXTENDED_IO_STACK_LOCATION {
-
- /* Included for padding */
- UCHAR MajorFunction;
- UCHAR MinorFunction;
- UCHAR Flags;
- UCHAR Control;
-
- union {
-
- struct {
- PIO_SECURITY_CONTEXT SecurityContext;
- ULONG Options;
- USHORT Reserved;
- USHORT ShareAccess;
- PMAILSLOT_CREATE_PARAMETERS Parameters;
- } CreateMailslot;
-
- struct {
- PIO_SECURITY_CONTEXT SecurityContext;
- ULONG Options;
- USHORT Reserved;
- USHORT ShareAccess;
- PNAMED_PIPE_CREATE_PARAMETERS Parameters;
- } CreatePipe;
-
- struct {
- ULONG OutputBufferLength;
- ULONG InputBufferLength;
- ULONG FsControlCode;
- PVOID Type3InputBuffer;
- } FileSystemControl;
-
- struct {
- PLARGE_INTEGER Length;
- ULONG Key;
- LARGE_INTEGER ByteOffset;
- } LockControl;
-
- struct {
- ULONG Length;
- ULONG CompletionFilter;
- } NotifyDirectory;
-
- struct {
- ULONG Length;
- PUNICODE_STRING FileName;
- FILE_INFORMATION_CLASS FileInformationClass;
- ULONG FileIndex;
- } QueryDirectory;
-
- struct {
- ULONG Length;
- PVOID EaList;
- ULONG EaListLength;
- ULONG EaIndex;
- } QueryEa;
-
- struct {
- ULONG Length;
- PSID StartSid;
- PFILE_GET_QUOTA_INFORMATION SidList;
- ULONG SidListLength;
- } QueryQuota;
-
- struct {
- ULONG Length;
- } SetEa;
-
- struct {
- ULONG Length;
- } SetQuota;
-
- struct {
- ULONG Length;
- FS_INFORMATION_CLASS FsInformationClass;
- } SetVolume;
-
- } Parameters;
- PDEVICE_OBJECT DeviceObject;
- PFILE_OBJECT FileObject;
- PIO_COMPLETION_ROUTINE CompletionRoutine;
- PVOID Context;
-
-} EXTENDED_IO_STACK_LOCATION, *PEXTENDED_IO_STACK_LOCATION;
-#if !defined(_ALPHA_)
-#include <poppack.h>
-#endif
-
-typedef struct _FILE_ACCESS_INFORMATION {
- ACCESS_MASK AccessFlags;
-} FILE_ACCESS_INFORMATION, *PFILE_ACCESS_INFORMATION;
-
-typedef struct _FILE_ALLOCATION_INFORMATION {
- LARGE_INTEGER AllocationSize;
-} FILE_ALLOCATION_INFORMATION, *PFILE_ALLOCATION_INFORMATION;
-
-typedef struct _FILE_BOTH_DIR_INFORMATION {
- ULONG NextEntryOffset;
- ULONG FileIndex;
- LARGE_INTEGER CreationTime;
- LARGE_INTEGER LastAccessTime;
- LARGE_INTEGER LastWriteTime;
- LARGE_INTEGER ChangeTime;
- LARGE_INTEGER EndOfFile;
- LARGE_INTEGER AllocationSize;
- ULONG FileAttributes;
- ULONG FileNameLength;
- ULONG EaSize;
- CCHAR ShortNameLength;
- WCHAR ShortName[12];
- WCHAR FileName[1];
-} FILE_BOTH_DIR_INFORMATION, *PFILE_BOTH_DIR_INFORMATION;
-
-typedef struct _FILE_COMPLETION_INFORMATION {
- HANDLE Port;
- ULONG Key;
-} FILE_COMPLETION_INFORMATION, *PFILE_COMPLETION_INFORMATION;
-
-typedef struct _FILE_COMPRESSION_INFORMATION {
- LARGE_INTEGER CompressedFileSize;
- USHORT CompressionFormat;
- UCHAR CompressionUnitShift;
- UCHAR ChunkShift;
- UCHAR ClusterShift;
- UCHAR Reserved[3];
-} FILE_COMPRESSION_INFORMATION, *PFILE_COMPRESSION_INFORMATION;
-
-typedef struct _FILE_COPY_ON_WRITE_INFORMATION {
- BOOLEAN ReplaceIfExists;
- HANDLE RootDirectory;
- ULONG FileNameLength;
- WCHAR FileName[1];
-} FILE_COPY_ON_WRITE_INFORMATION, *PFILE_COPY_ON_WRITE_INFORMATION;
-
-typedef struct _FILE_DIRECTORY_INFORMATION {
- ULONG NextEntryOffset;
- ULONG FileIndex;
- LARGE_INTEGER CreationTime;
- LARGE_INTEGER LastAccessTime;
- LARGE_INTEGER LastWriteTime;
- LARGE_INTEGER ChangeTime;
- LARGE_INTEGER EndOfFile;
- LARGE_INTEGER AllocationSize;
- ULONG FileAttributes;
- ULONG FileNameLength;
- WCHAR FileName[1];
-} FILE_DIRECTORY_INFORMATION, *PFILE_DIRECTORY_INFORMATION;
-
-typedef struct _FILE_FULL_DIRECTORY_INFORMATION {
- ULONG NextEntryOffset;
- ULONG FileIndex;
- LARGE_INTEGER CreationTime;
- LARGE_INTEGER LastAccessTime;
- LARGE_INTEGER LastWriteTime;
- LARGE_INTEGER ChangeTime;
- LARGE_INTEGER EndOfFile;
- LARGE_INTEGER AllocationSize;
- ULONG FileAttributes;
- ULONG FileNameLength;
- ULONG EaSize;
- WCHAR FileName[0];
-} FILE_FULL_DIRECTORY_INFORMATION, *PFILE_FULL_DIRECTORY_INFORMATION;
-
-typedef struct _FILE_BOTH_DIRECTORY_INFORMATION {
- ULONG NextEntryOffset;
- ULONG FileIndex;
- LARGE_INTEGER CreationTime;
- LARGE_INTEGER LastAccessTime;
- LARGE_INTEGER LastWriteTime;
- LARGE_INTEGER ChangeTime;
- LARGE_INTEGER EndOfFile;
- LARGE_INTEGER AllocationSize;
- ULONG FileAttributes;
- ULONG FileNameLength;
- ULONG EaSize;
- CHAR ShortNameLength;
- WCHAR ShortName[12];
- WCHAR FileName[0];
-} FILE_BOTH_DIRECTORY_INFORMATION, *PFILE_BOTH_DIRECTORY_INFORMATION;
-
-#if (VER_PRODUCTBUILD >= 2600)
-
-typedef struct _FILE_ID_FULL_DIRECTORY_INFORMATION {
- ULONG NextEntryOffset;
- ULONG FileIndex;
- LARGE_INTEGER CreationTime;
- LARGE_INTEGER LastAccessTime;
- LARGE_INTEGER LastWriteTime;
- LARGE_INTEGER ChangeTime;
- LARGE_INTEGER EndOfFile;
- LARGE_INTEGER AllocationSize;
- ULONG FileAttributes;
- ULONG FileNameLength;
- ULONG EaSize;
- LARGE_INTEGER FileId;
- WCHAR FileName[0];
-} FILE_ID_FULL_DIRECTORY_INFORMATION, *PFILE_ID_FULL_DIRECTORY_INFORMATION;
-
-typedef struct _FILE_ID_BOTH_DIRECTORY_INFORMATION {
- ULONG NextEntryOffset;
- ULONG FileIndex;
- LARGE_INTEGER CreationTime;
- LARGE_INTEGER LastAccessTime;
- LARGE_INTEGER LastWriteTime;
- LARGE_INTEGER ChangeTime;
- LARGE_INTEGER EndOfFile;
- LARGE_INTEGER AllocationSize;
- ULONG FileAttributes;
- ULONG FileNameLength;
- ULONG EaSize;
- CHAR ShortNameLength;
- WCHAR ShortName[12];
- LARGE_INTEGER FileId;
- WCHAR FileName[0];
-} FILE_ID_BOTH_DIRECTORY_INFORMATION, *PFILE_ID_BOTH_DIRECTORY_INFORMATION;
-
-#endif
-
-typedef struct _FILE_EA_INFORMATION {
- ULONG EaSize;
-} FILE_EA_INFORMATION, *PFILE_EA_INFORMATION;
-
-typedef struct _FILE_FS_ATTRIBUTE_INFORMATION {
- ULONG FileSystemAttributes;
- ULONG MaximumComponentNameLength;
- ULONG FileSystemNameLength;
- WCHAR FileSystemName[1];
-} FILE_FS_ATTRIBUTE_INFORMATION, *PFILE_FS_ATTRIBUTE_INFORMATION;
-
-typedef struct _FILE_FS_CONTROL_INFORMATION {
- LARGE_INTEGER FreeSpaceStartFiltering;
- LARGE_INTEGER FreeSpaceThreshold;
- LARGE_INTEGER FreeSpaceStopFiltering;
- LARGE_INTEGER DefaultQuotaThreshold;
- LARGE_INTEGER DefaultQuotaLimit;
- ULONG FileSystemControlFlags;
-} FILE_FS_CONTROL_INFORMATION, *PFILE_FS_CONTROL_INFORMATION;
-
-typedef struct _FILE_FS_FULL_SIZE_INFORMATION {
- LARGE_INTEGER TotalAllocationUnits;
- LARGE_INTEGER CallerAvailableAllocationUnits;
- LARGE_INTEGER ActualAvailableAllocationUnits;
- ULONG SectorsPerAllocationUnit;
- ULONG BytesPerSector;
-} FILE_FS_FULL_SIZE_INFORMATION, *PFILE_FS_FULL_SIZE_INFORMATION;
-
-typedef struct _FILE_FS_LABEL_INFORMATION {
- ULONG VolumeLabelLength;
- WCHAR VolumeLabel[1];
-} FILE_FS_LABEL_INFORMATION, *PFILE_FS_LABEL_INFORMATION;
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-typedef struct _FILE_FS_OBJECT_ID_INFORMATION {
- UCHAR ObjectId[16];
- UCHAR ExtendedInfo[48];
-} FILE_FS_OBJECT_ID_INFORMATION, *PFILE_FS_OBJECT_ID_INFORMATION;
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-typedef struct _FILE_FS_SIZE_INFORMATION {
- LARGE_INTEGER TotalAllocationUnits;
- LARGE_INTEGER AvailableAllocationUnits;
- ULONG SectorsPerAllocationUnit;
- ULONG BytesPerSector;
-} FILE_FS_SIZE_INFORMATION, *PFILE_FS_SIZE_INFORMATION;
-
-typedef struct _FILE_FS_VOLUME_INFORMATION {
- LARGE_INTEGER VolumeCreationTime;
- ULONG VolumeSerialNumber;
- ULONG VolumeLabelLength;
- BOOLEAN SupportsObjects;
- WCHAR VolumeLabel[1];
-} FILE_FS_VOLUME_INFORMATION, *PFILE_FS_VOLUME_INFORMATION;
-
-typedef struct _FILE_FULL_DIR_INFORMATION {
- ULONG NextEntryOffset;
- ULONG FileIndex;
- LARGE_INTEGER CreationTime;
- LARGE_INTEGER LastAccessTime;
- LARGE_INTEGER LastWriteTime;
- LARGE_INTEGER ChangeTime;
- LARGE_INTEGER EndOfFile;
- LARGE_INTEGER AllocationSize;
- ULONG FileAttributes;
- ULONG FileNameLength;
- ULONG EaSize;
- WCHAR FileName[1];
-} FILE_FULL_DIR_INFORMATION, *PFILE_FULL_DIR_INFORMATION;
-
-typedef struct _FILE_GET_EA_INFORMATION {
- ULONG NextEntryOffset;
- UCHAR EaNameLength;
- CHAR EaName[1];
-} FILE_GET_EA_INFORMATION, *PFILE_GET_EA_INFORMATION;
-
-typedef struct _FILE_GET_QUOTA_INFORMATION {
- ULONG NextEntryOffset;
- ULONG SidLength;
- SID Sid;
-} FILE_GET_QUOTA_INFORMATION, *PFILE_GET_QUOTA_INFORMATION;
-
-typedef struct _FILE_INTERNAL_INFORMATION {
- LARGE_INTEGER IndexNumber;
-} FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION;
-
-typedef struct _FILE_LINK_INFORMATION {
- BOOLEAN ReplaceIfExists;
- HANDLE RootDirectory;
- ULONG FileNameLength;
- WCHAR FileName[1];
-} FILE_LINK_INFORMATION, *PFILE_LINK_INFORMATION;
-
-typedef struct _FILE_LOCK_INFO {
- LARGE_INTEGER StartingByte;
- LARGE_INTEGER Length;
- BOOLEAN ExclusiveLock;
- ULONG Key;
- PFILE_OBJECT FileObject;
- PEPROCESS Process;
- LARGE_INTEGER EndingByte;
-} FILE_LOCK_INFO, *PFILE_LOCK_INFO;
-
-/* raw internal file lock struct returned from FsRtlGetNextFileLock */
-typedef struct _FILE_SHARED_LOCK_ENTRY {
- PVOID Unknown1;
- PVOID Unknown2;
- FILE_LOCK_INFO FileLock;
-} FILE_SHARED_LOCK_ENTRY, *PFILE_SHARED_LOCK_ENTRY;
-
-/* raw internal file lock struct returned from FsRtlGetNextFileLock */
-typedef struct _FILE_EXCLUSIVE_LOCK_ENTRY {
- LIST_ENTRY ListEntry;
- PVOID Unknown1;
- PVOID Unknown2;
- FILE_LOCK_INFO FileLock;
-} FILE_EXCLUSIVE_LOCK_ENTRY, *PFILE_EXCLUSIVE_LOCK_ENTRY;
-
-typedef NTSTATUS (*PCOMPLETE_LOCK_IRP_ROUTINE) (
- /*IN*/ PVOID Context,
- /*IN*/ PIRP Irp
-);
-
-typedef VOID (NTAPI *PUNLOCK_ROUTINE) (
- /*IN*/ PVOID Context,
- /*IN*/ PFILE_LOCK_INFO FileLockInfo
-);
-
-typedef struct _FILE_LOCK {
- PCOMPLETE_LOCK_IRP_ROUTINE CompleteLockIrpRoutine;
- PUNLOCK_ROUTINE UnlockRoutine;
- BOOLEAN FastIoIsQuestionable;
- BOOLEAN Pad[3];
- PVOID LockInformation;
- FILE_LOCK_INFO LastReturnedLockInfo;
- PVOID LastReturnedLock;
-} FILE_LOCK, *PFILE_LOCK;
-
-typedef struct _FILE_MAILSLOT_PEEK_BUFFER {
- ULONG ReadDataAvailable;
- ULONG NumberOfMessages;
- ULONG MessageLength;
-} FILE_MAILSLOT_PEEK_BUFFER, *PFILE_MAILSLOT_PEEK_BUFFER;
-
-typedef struct _FILE_MAILSLOT_QUERY_INFORMATION {
- ULONG MaximumMessageSize;
- ULONG MailslotQuota;
- ULONG NextMessageSize;
- ULONG MessagesAvailable;
- LARGE_INTEGER ReadTimeout;
-} FILE_MAILSLOT_QUERY_INFORMATION, *PFILE_MAILSLOT_QUERY_INFORMATION;
-
-typedef struct _FILE_MAILSLOT_SET_INFORMATION {
- LARGE_INTEGER ReadTimeout;
-} FILE_MAILSLOT_SET_INFORMATION, *PFILE_MAILSLOT_SET_INFORMATION;
-
-typedef struct _FILE_MODE_INFORMATION {
- ULONG Mode;
-} FILE_MODE_INFORMATION, *PFILE_MODE_INFORMATION;
-
-typedef struct _FILE_ALL_INFORMATION {
- FILE_BASIC_INFORMATION BasicInformation;
- FILE_STANDARD_INFORMATION StandardInformation;
- FILE_INTERNAL_INFORMATION InternalInformation;
- FILE_EA_INFORMATION EaInformation;
- FILE_ACCESS_INFORMATION AccessInformation;
- FILE_POSITION_INFORMATION PositionInformation;
- FILE_MODE_INFORMATION ModeInformation;
- FILE_ALIGNMENT_INFORMATION AlignmentInformation;
- FILE_NAME_INFORMATION NameInformation;
-} FILE_ALL_INFORMATION, *PFILE_ALL_INFORMATION;
-
-typedef struct _FILE_NAMES_INFORMATION {
- ULONG NextEntryOffset;
- ULONG FileIndex;
- ULONG FileNameLength;
- WCHAR FileName[1];
-} FILE_NAMES_INFORMATION, *PFILE_NAMES_INFORMATION;
-
-typedef struct _FILE_OBJECTID_INFORMATION {
- LONGLONG FileReference;
- UCHAR ObjectId[16];
- _ANONYMOUS_UNION union {
- struct {
- UCHAR BirthVolumeId[16];
- UCHAR BirthObjectId[16];
- UCHAR DomainId[16];
- } ;
- UCHAR ExtendedInfo[48];
- } DUMMYUNIONNAME;
-} FILE_OBJECTID_INFORMATION, *PFILE_OBJECTID_INFORMATION;
-
-typedef struct _FILE_OLE_CLASSID_INFORMATION {
- GUID ClassId;
-} FILE_OLE_CLASSID_INFORMATION, *PFILE_OLE_CLASSID_INFORMATION;
-
-typedef struct _FILE_OLE_ALL_INFORMATION {
- FILE_BASIC_INFORMATION BasicInformation;
- FILE_STANDARD_INFORMATION StandardInformation;
- FILE_INTERNAL_INFORMATION InternalInformation;
- FILE_EA_INFORMATION EaInformation;
- FILE_ACCESS_INFORMATION AccessInformation;
- FILE_POSITION_INFORMATION PositionInformation;
- FILE_MODE_INFORMATION ModeInformation;
- FILE_ALIGNMENT_INFORMATION AlignmentInformation;
- USN LastChangeUsn;
- USN ReplicationUsn;
- LARGE_INTEGER SecurityChangeTime;
- FILE_OLE_CLASSID_INFORMATION OleClassIdInformation;
- FILE_OBJECTID_INFORMATION ObjectIdInformation;
- FILE_STORAGE_TYPE StorageType;
- ULONG OleStateBits;
- ULONG OleId;
- ULONG NumberOfStreamReferences;
- ULONG StreamIndex;
- ULONG SecurityId;
- BOOLEAN ContentIndexDisable;
- BOOLEAN InheritContentIndexDisable;
- FILE_NAME_INFORMATION NameInformation;
-} FILE_OLE_ALL_INFORMATION, *PFILE_OLE_ALL_INFORMATION;
-
-typedef struct _FILE_OLE_DIR_INFORMATION {
- ULONG NextEntryOffset;
- ULONG FileIndex;
- LARGE_INTEGER CreationTime;
- LARGE_INTEGER LastAccessTime;
- LARGE_INTEGER LastWriteTime;
- LARGE_INTEGER ChangeTime;
- LARGE_INTEGER EndOfFile;
- LARGE_INTEGER AllocationSize;
- ULONG FileAttributes;
- ULONG FileNameLength;
- FILE_STORAGE_TYPE StorageType;
- GUID OleClassId;
- ULONG OleStateBits;
- BOOLEAN ContentIndexDisable;
- BOOLEAN InheritContentIndexDisable;
- WCHAR FileName[1];
-} FILE_OLE_DIR_INFORMATION, *PFILE_OLE_DIR_INFORMATION;
-
-typedef struct _FILE_OLE_INFORMATION {
- LARGE_INTEGER SecurityChangeTime;
- FILE_OLE_CLASSID_INFORMATION OleClassIdInformation;
- FILE_OBJECTID_INFORMATION ObjectIdInformation;
- FILE_STORAGE_TYPE StorageType;
- ULONG OleStateBits;
- BOOLEAN ContentIndexDisable;
- BOOLEAN InheritContentIndexDisable;
-} FILE_OLE_INFORMATION, *PFILE_OLE_INFORMATION;
-
-typedef struct _FILE_OLE_STATE_BITS_INFORMATION {
- ULONG StateBits;
- ULONG StateBitsMask;
-} FILE_OLE_STATE_BITS_INFORMATION, *PFILE_OLE_STATE_BITS_INFORMATION;
-
-typedef struct _FILE_PIPE_ASSIGN_EVENT_BUFFER {
- HANDLE EventHandle;
- ULONG KeyValue;
-} FILE_PIPE_ASSIGN_EVENT_BUFFER, *PFILE_PIPE_ASSIGN_EVENT_BUFFER;
-
-typedef struct _FILE_PIPE_CLIENT_PROCESS_BUFFER {
- PVOID ClientSession;
- PVOID ClientProcess;
-} FILE_PIPE_CLIENT_PROCESS_BUFFER, *PFILE_PIPE_CLIENT_PROCESS_BUFFER;
-
-typedef struct _FILE_PIPE_EVENT_BUFFER {
- ULONG NamedPipeState;
- ULONG EntryType;
- ULONG ByteCount;
- ULONG KeyValue;
- ULONG NumberRequests;
-} FILE_PIPE_EVENT_BUFFER, *PFILE_PIPE_EVENT_BUFFER;
-
-typedef struct _FILE_PIPE_INFORMATION {
- ULONG ReadMode;
- ULONG CompletionMode;
-} FILE_PIPE_INFORMATION, *PFILE_PIPE_INFORMATION;
-
-typedef struct _FILE_PIPE_LOCAL_INFORMATION {
- ULONG NamedPipeType;
- ULONG NamedPipeConfiguration;
- ULONG MaximumInstances;
- ULONG CurrentInstances;
- ULONG InboundQuota;
- ULONG ReadDataAvailable;
- ULONG OutboundQuota;
- ULONG WriteQuotaAvailable;
- ULONG NamedPipeState;
- ULONG NamedPipeEnd;
-} FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION;
-
-typedef struct _FILE_PIPE_REMOTE_INFORMATION {
- LARGE_INTEGER CollectDataTime;
- ULONG MaximumCollectionCount;
-} FILE_PIPE_REMOTE_INFORMATION, *PFILE_PIPE_REMOTE_INFORMATION;
-
-typedef struct _FILE_PIPE_WAIT_FOR_BUFFER {
- LARGE_INTEGER Timeout;
- ULONG NameLength;
- BOOLEAN TimeoutSpecified;
- WCHAR Name[1];
-} FILE_PIPE_WAIT_FOR_BUFFER, *PFILE_PIPE_WAIT_FOR_BUFFER;
-
-typedef struct _FILE_QUOTA_INFORMATION {
- ULONG NextEntryOffset;
- ULONG SidLength;
- LARGE_INTEGER ChangeTime;
- LARGE_INTEGER QuotaUsed;
- LARGE_INTEGER QuotaThreshold;
- LARGE_INTEGER QuotaLimit;
- SID Sid;
-} FILE_QUOTA_INFORMATION, *PFILE_QUOTA_INFORMATION;
-
-typedef struct _FILE_RENAME_INFORMATION {
- BOOLEAN ReplaceIfExists;
- HANDLE RootDirectory;
- ULONG FileNameLength;
- WCHAR FileName[1];
-} FILE_RENAME_INFORMATION, *PFILE_RENAME_INFORMATION;
-
-typedef struct _FILE_STREAM_INFORMATION {
- ULONG NextEntryOffset;
- ULONG StreamNameLength;
- LARGE_INTEGER StreamSize;
- LARGE_INTEGER StreamAllocationSize;
- WCHAR StreamName[1];
-} FILE_STREAM_INFORMATION, *PFILE_STREAM_INFORMATION;
-
-typedef struct _FILE_TRACKING_INFORMATION {
- HANDLE DestinationFile;
- ULONG ObjectInformationLength;
- CHAR ObjectInformation[1];
-} FILE_TRACKING_INFORMATION, *PFILE_TRACKING_INFORMATION;
-
-typedef struct _FSRTL_COMMON_FCB_HEADER {
- CSHORT NodeTypeCode;
- CSHORT NodeByteSize;
- UCHAR Flags;
- UCHAR IsFastIoPossible;
-#if (VER_PRODUCTBUILD >= 1381)
- UCHAR Flags2;
- UCHAR Reserved;
-#endif /* (VER_PRODUCTBUILD >= 1381) */
- PERESOURCE Resource;
- PERESOURCE PagingIoResource;
- LARGE_INTEGER AllocationSize;
- LARGE_INTEGER FileSize;
- LARGE_INTEGER ValidDataLength;
-} FSRTL_COMMON_FCB_HEADER, *PFSRTL_COMMON_FCB_HEADER;
-
-typedef struct _GENERATE_NAME_CONTEXT {
- USHORT Checksum;
- BOOLEAN CheckSumInserted;
- UCHAR NameLength;
- WCHAR NameBuffer[8];
- ULONG ExtensionLength;
- WCHAR ExtensionBuffer[4];
- ULONG LastIndexValue;
-} GENERATE_NAME_CONTEXT, *PGENERATE_NAME_CONTEXT;
-
-typedef struct _HANDLE_TABLE_ENTRY {
- PVOID Object;
- ULONG ObjectAttributes;
- ULONG GrantedAccess;
- USHORT GrantedAccessIndex;
- USHORT CreatorBackTraceIndex;
- ULONG NextFreeTableEntry;
-} HANDLE_TABLE_ENTRY, *PHANDLE_TABLE_ENTRY;
-
-typedef struct _MAPPING_PAIR {
- ULONGLONG Vcn;
- ULONGLONG Lcn;
-} MAPPING_PAIR, *PMAPPING_PAIR;
-
-typedef struct _GET_RETRIEVAL_DESCRIPTOR {
- ULONG NumberOfPairs;
- ULONGLONG StartVcn;
- MAPPING_PAIR Pair[1];
-} GET_RETRIEVAL_DESCRIPTOR, *PGET_RETRIEVAL_DESCRIPTOR;
-
-typedef struct _IO_CLIENT_EXTENSION {
- struct _IO_CLIENT_EXTENSION *NextExtension;
- PVOID ClientIdentificationAddress;
-} IO_CLIENT_EXTENSION, *PIO_CLIENT_EXTENSION;
-
-typedef struct _IO_COMPLETION_BASIC_INFORMATION {
- LONG Depth;
-} IO_COMPLETION_BASIC_INFORMATION, *PIO_COMPLETION_BASIC_INFORMATION;
-
-typedef struct _KEVENT_PAIR {
- USHORT Type;
- USHORT Size;
- KEVENT Event1;
- KEVENT Event2;
-} KEVENT_PAIR, *PKEVENT_PAIR;
-
-typedef struct _KQUEUE {
- DISPATCHER_HEADER Header;
- LIST_ENTRY EntryListHead;
- ULONG CurrentCount;
- ULONG MaximumCount;
- LIST_ENTRY ThreadListHead;
-} KQUEUE, *PKQUEUE, *RESTRICTED_POINTER PRKQUEUE;
-
-typedef struct _MAILSLOT_CREATE_PARAMETERS {
- ULONG MailslotQuota;
- ULONG MaximumMessageSize;
- LARGE_INTEGER ReadTimeout;
- BOOLEAN TimeoutSpecified;
-} MAILSLOT_CREATE_PARAMETERS, *PMAILSLOT_CREATE_PARAMETERS;
-
-typedef struct _MBCB {
- CSHORT NodeTypeCode;
- CSHORT NodeIsInZone;
- ULONG PagesToWrite;
- ULONG DirtyPages;
- ULONG Reserved;
- LIST_ENTRY BitmapRanges;
- LONGLONG ResumeWritePage;
- BITMAP_RANGE BitmapRange1;
- BITMAP_RANGE BitmapRange2;
- BITMAP_RANGE BitmapRange3;
-} MBCB, *PMBCB;
-
-typedef struct _MOVEFILE_DESCRIPTOR {
- HANDLE FileHandle;
- ULONG Reserved;
- LARGE_INTEGER StartVcn;
- LARGE_INTEGER TargetLcn;
- ULONG NumVcns;
- ULONG Reserved1;
-} MOVEFILE_DESCRIPTOR, *PMOVEFILE_DESCRIPTOR;
-
-typedef struct _NAMED_PIPE_CREATE_PARAMETERS {
- ULONG NamedPipeType;
- ULONG ReadMode;
- ULONG CompletionMode;
- ULONG MaximumInstances;
- ULONG InboundQuota;
- ULONG OutboundQuota;
- LARGE_INTEGER DefaultTimeout;
- BOOLEAN TimeoutSpecified;
-} NAMED_PIPE_CREATE_PARAMETERS, *PNAMED_PIPE_CREATE_PARAMETERS;
-
-typedef struct _OBJECT_BASIC_INFO {
- ULONG Attributes;
- ACCESS_MASK GrantedAccess;
- ULONG HandleCount;
- ULONG ReferenceCount;
- ULONG PagedPoolUsage;
- ULONG NonPagedPoolUsage;
- ULONG Reserved[3];
- ULONG NameInformationLength;
- ULONG TypeInformationLength;
- ULONG SecurityDescriptorLength;
- LARGE_INTEGER CreateTime;
-} OBJECT_BASIC_INFO, *POBJECT_BASIC_INFO;
-
-typedef struct _OBJECT_HANDLE_ATTRIBUTE_INFO {
- BOOLEAN Inherit;
- BOOLEAN ProtectFromClose;
-} OBJECT_HANDLE_ATTRIBUTE_INFO, *POBJECT_HANDLE_ATTRIBUTE_INFO;
-
-typedef struct _OBJECT_NAME_INFO {
- UNICODE_STRING ObjectName;
- WCHAR ObjectNameBuffer[1];
-} OBJECT_NAME_INFO, *POBJECT_NAME_INFO;
-
-typedef struct _OBJECT_PROTECTION_INFO {
- BOOLEAN Inherit;
- BOOLEAN ProtectHandle;
-} OBJECT_PROTECTION_INFO, *POBJECT_PROTECTION_INFO;
-
-typedef struct _OBJECT_TYPE_INFO {
- UNICODE_STRING ObjectTypeName;
- UCHAR Unknown[0x58];
- WCHAR ObjectTypeNameBuffer[1];
-} OBJECT_TYPE_INFO, *POBJECT_TYPE_INFO;
-
-typedef struct _OBJECT_ALL_TYPES_INFO {
- ULONG NumberOfObjectTypes;
- OBJECT_TYPE_INFO ObjectsTypeInfo[1];
-} OBJECT_ALL_TYPES_INFO, *POBJECT_ALL_TYPES_INFO;
-
-typedef struct _PAGEFAULT_HISTORY {
- ULONG CurrentIndex;
- ULONG MaxIndex;
- KSPIN_LOCK SpinLock;
- PVOID Reserved;
- PROCESS_WS_WATCH_INFORMATION WatchInfo[1];
-} PAGEFAULT_HISTORY, *PPAGEFAULT_HISTORY;
-
-typedef struct _PATHNAME_BUFFER {
- ULONG PathNameLength;
- WCHAR Name[1];
-} PATHNAME_BUFFER, *PPATHNAME_BUFFER;
-
-#if (VER_PRODUCTBUILD >= 2600)
-
-typedef struct _PRIVATE_CACHE_MAP_FLAGS {
- ULONG DontUse : 16;
- ULONG ReadAheadActive : 1;
- ULONG ReadAheadEnabled : 1;
- ULONG Available : 14;
-} PRIVATE_CACHE_MAP_FLAGS, *PPRIVATE_CACHE_MAP_FLAGS;
-
-typedef struct _PRIVATE_CACHE_MAP {
- _ANONYMOUS_UNION union {
- CSHORT NodeTypeCode;
- PRIVATE_CACHE_MAP_FLAGS Flags;
- ULONG UlongFlags;
- } DUMMYUNIONNAME;
- ULONG ReadAheadMask;
- PFILE_OBJECT FileObject;
- LARGE_INTEGER FileOffset1;
- LARGE_INTEGER BeyondLastByte1;
- LARGE_INTEGER FileOffset2;
- LARGE_INTEGER BeyondLastByte2;
- LARGE_INTEGER ReadAheadOffset[2];
- ULONG ReadAheadLength[2];
- KSPIN_LOCK ReadAheadSpinLock;
- LIST_ENTRY PrivateLinks;
-} PRIVATE_CACHE_MAP, *PPRIVATE_CACHE_MAP;
-
-#endif
-
-typedef struct _PS_IMPERSONATION_INFORMATION {
- PACCESS_TOKEN Token;
- BOOLEAN CopyOnOpen;
- BOOLEAN EffectiveOnly;
- SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
-} PS_IMPERSONATION_INFORMATION, *PPS_IMPERSONATION_INFORMATION;
-
-typedef struct _PUBLIC_BCB {
- CSHORT NodeTypeCode;
- CSHORT NodeByteSize;
- ULONG MappedLength;
- LARGE_INTEGER MappedFileOffset;
-} PUBLIC_BCB, *PPUBLIC_BCB;
-
-typedef struct _QUERY_PATH_REQUEST {
- ULONG PathNameLength;
- PIO_SECURITY_CONTEXT SecurityContext;
- WCHAR FilePathName[1];
-} QUERY_PATH_REQUEST, *PQUERY_PATH_REQUEST;
-
-typedef struct _QUERY_PATH_RESPONSE {
- ULONG LengthAccepted;
-} QUERY_PATH_RESPONSE, *PQUERY_PATH_RESPONSE;
-
-typedef struct _RETRIEVAL_POINTERS_BUFFER {
- ULONG ExtentCount;
- LARGE_INTEGER StartingVcn;
- struct {
- LARGE_INTEGER NextVcn;
- LARGE_INTEGER Lcn;
- } Extents[1];
-} RETRIEVAL_POINTERS_BUFFER, *PRETRIEVAL_POINTERS_BUFFER;
-
-typedef struct _RTL_SPLAY_LINKS {
- struct _RTL_SPLAY_LINKS *Parent;
- struct _RTL_SPLAY_LINKS *LeftChild;
- struct _RTL_SPLAY_LINKS *RightChild;
-} RTL_SPLAY_LINKS, *PRTL_SPLAY_LINKS;
-
-typedef struct _SE_EXPORTS {
-
- LUID SeCreateTokenPrivilege;
- LUID SeAssignPrimaryTokenPrivilege;
- LUID SeLockMemoryPrivilege;
- LUID SeIncreaseQuotaPrivilege;
- LUID SeUnsolicitedInputPrivilege;
- LUID SeTcbPrivilege;
- LUID SeSecurityPrivilege;
- LUID SeTakeOwnershipPrivilege;
- LUID SeLoadDriverPrivilege;
- LUID SeCreatePagefilePrivilege;
- LUID SeIncreaseBasePriorityPrivilege;
- LUID SeSystemProfilePrivilege;
- LUID SeSystemtimePrivilege;
- LUID SeProfileSingleProcessPrivilege;
- LUID SeCreatePermanentPrivilege;
- LUID SeBackupPrivilege;
- LUID SeRestorePrivilege;
- LUID SeShutdownPrivilege;
- LUID SeDebugPrivilege;
- LUID SeAuditPrivilege;
- LUID SeSystemEnvironmentPrivilege;
- LUID SeChangeNotifyPrivilege;
- LUID SeRemoteShutdownPrivilege;
-
- PSID SeNullSid;
- PSID SeWorldSid;
- PSID SeLocalSid;
- PSID SeCreatorOwnerSid;
- PSID SeCreatorGroupSid;
-
- PSID SeNtAuthoritySid;
- PSID SeDialupSid;
- PSID SeNetworkSid;
- PSID SeBatchSid;
- PSID SeInteractiveSid;
- PSID SeLocalSystemSid;
- PSID SeAliasAdminsSid;
- PSID SeAliasUsersSid;
- PSID SeAliasGuestsSid;
- PSID SeAliasPowerUsersSid;
- PSID SeAliasAccountOpsSid;
- PSID SeAliasSystemOpsSid;
- PSID SeAliasPrintOpsSid;
- PSID SeAliasBackupOpsSid;
-
- PSID SeAuthenticatedUsersSid;
-
- PSID SeRestrictedSid;
- PSID SeAnonymousLogonSid;
-
- LUID SeUndockPrivilege;
- LUID SeSyncAgentPrivilege;
- LUID SeEnableDelegationPrivilege;
-
-} SE_EXPORTS, *PSE_EXPORTS;
-
-typedef struct _SECTION_BASIC_INFORMATION {
- PVOID BaseAddress;
- ULONG Attributes;
- LARGE_INTEGER Size;
-} SECTION_BASIC_INFORMATION, *PSECTION_BASIC_INFORMATION;
-
-typedef struct _SECTION_IMAGE_INFORMATION {
- PVOID EntryPoint;
- ULONG Unknown1;
- ULONG StackReserve;
- ULONG StackCommit;
- ULONG Subsystem;
- USHORT MinorSubsystemVersion;
- USHORT MajorSubsystemVersion;
- ULONG Unknown2;
- ULONG Characteristics;
- USHORT ImageNumber;
- BOOLEAN Executable;
- UCHAR Unknown3;
- ULONG Unknown4[3];
-} SECTION_IMAGE_INFORMATION, *PSECTION_IMAGE_INFORMATION;
-
-#if (VER_PRODUCTBUILD >= 2600)
-
-typedef struct _SHARED_CACHE_MAP {
- CSHORT NodeTypeCode;
- CSHORT NodeByteSize;
- ULONG OpenCount;
- LARGE_INTEGER FileSize;
- LIST_ENTRY BcbList;
- LARGE_INTEGER SectionSize;
- LARGE_INTEGER ValidDataLength;
- LARGE_INTEGER ValidDataGoal;
- PVACB InitialVacbs[4];
- PVACB *Vacbs;
- PFILE_OBJECT FileObject;
- PVACB ActiveVacb;
- PVOID NeedToZero;
- ULONG ActivePage;
- ULONG NeedToZeroPage;
- KSPIN_LOCK ActiveVacbSpinLock;
- ULONG VacbActiveCount;
- ULONG DirtyPages;
- LIST_ENTRY SharedCacheMapLinks;
- ULONG Flags;
- NTSTATUS Status;
- PMBCB Mbcb;
- PVOID Section;
- PKEVENT CreateEvent;
- PKEVENT WaitOnActiveCount;
- ULONG PagesToWrite;
- LONGLONG BeyondLastFlush;
- PCACHE_MANAGER_CALLBACKS Callbacks;
- PVOID LazyWriteContext;
- LIST_ENTRY PrivateList;
- PVOID LogHandle;
- PVOID FlushToLsnRoutine;
- ULONG DirtyPageThreshold;
- ULONG LazyWritePassCount;
- PCACHE_UNINITIALIZE_EVENT UninitializeEvent;
- PVACB NeedToZeroVacb;
- KSPIN_LOCK BcbSpinLock;
- PVOID Reserved;
- KEVENT Event;
- EX_PUSH_LOCK VacbPushLock;
- PRIVATE_CACHE_MAP PrivateCacheMap;
-} SHARED_CACHE_MAP, *PSHARED_CACHE_MAP;
-
-#endif
-
-typedef struct _STARTING_VCN_INPUT_BUFFER {
- LARGE_INTEGER StartingVcn;
-} STARTING_VCN_INPUT_BUFFER, *PSTARTING_VCN_INPUT_BUFFER;
-
-typedef struct _SYSTEM_CACHE_INFORMATION {
- ULONG CurrentSize;
- ULONG PeakSize;
- ULONG PageFaultCount;
- ULONG MinimumWorkingSet;
- ULONG MaximumWorkingSet;
- ULONG Unused[4];
-} SYSTEM_CACHE_INFORMATION, *PSYSTEM_CACHE_INFORMATION;
-
-typedef struct _TERMINATION_PORT {
- struct _TERMINATION_PORT* Next;
- PVOID Port;
-} TERMINATION_PORT, *PTERMINATION_PORT;
-
-typedef struct _SECURITY_CLIENT_CONTEXT {
- SECURITY_QUALITY_OF_SERVICE SecurityQos;
- PACCESS_TOKEN ClientToken;
- BOOLEAN DirectlyAccessClientToken;
- BOOLEAN DirectAccessEffectiveOnly;
- BOOLEAN ServerIsRemote;
- TOKEN_CONTROL ClientTokenControl;
-} SECURITY_CLIENT_CONTEXT, *PSECURITY_CLIENT_CONTEXT;
-
-typedef struct _TUNNEL {
- FAST_MUTEX Mutex;
- PRTL_SPLAY_LINKS Cache;
- LIST_ENTRY TimerQueue;
- USHORT NumEntries;
-} TUNNEL, *PTUNNEL;
-
-typedef struct _VACB {
- PVOID BaseAddress;
- PSHARED_CACHE_MAP SharedCacheMap;
- union {
- LARGE_INTEGER FileOffset;
- USHORT ActiveCount;
- } Overlay;
- LIST_ENTRY LruList;
-} VACB, *PVACB;
-
-typedef struct _VAD_HEADER {
- PVOID StartVPN;
- PVOID EndVPN;
- PVAD_HEADER ParentLink;
- PVAD_HEADER LeftLink;
- PVAD_HEADER RightLink;
- ULONG Flags; /* LSB = CommitCharge */
- PVOID ControlArea;
- PVOID FirstProtoPte;
- PVOID LastPTE;
- ULONG Unknown;
- LIST_ENTRY Secured;
-} VAD_HEADER, *PVAD_HEADER;
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-CcCanIWrite (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ ULONG BytesToWrite,
- /*IN*/ BOOLEAN Wait,
- /*IN*/ BOOLEAN Retrying
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-CcCopyRead (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ ULONG Length,
- /*IN*/ BOOLEAN Wait,
- /*OUT*/ PVOID Buffer,
- /*OUT*/ PIO_STATUS_BLOCK IoStatus
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-CcCopyWrite (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ ULONG Length,
- /*IN*/ BOOLEAN Wait,
- /*IN*/ PVOID Buffer
-);
-
-#define CcCopyWriteWontFlush(FO, FOFF, LEN) ((LEN) <= 0x10000)
-
-typedef VOID (NTAPI *PCC_POST_DEFERRED_WRITE) (
- /*IN*/ PVOID Context1,
- /*IN*/ PVOID Context2
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-CcDeferWrite (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PCC_POST_DEFERRED_WRITE PostRoutine,
- /*IN*/ PVOID Context1,
- /*IN*/ PVOID Context2,
- /*IN*/ ULONG BytesToWrite,
- /*IN*/ BOOLEAN Retrying
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-CcFastCopyRead (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ ULONG FileOffset,
- /*IN*/ ULONG Length,
- /*IN*/ ULONG PageCount,
- /*OUT*/ PVOID Buffer,
- /*OUT*/ PIO_STATUS_BLOCK IoStatus
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-CcFastCopyWrite (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ ULONG FileOffset,
- /*IN*/ ULONG Length,
- /*IN*/ PVOID Buffer
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-CcFlushCache (
- /*IN*/ PSECTION_OBJECT_POINTERS SectionObjectPointer,
- /*IN*/ PLARGE_INTEGER FileOffset /*OPTIONAL*/,
- /*IN*/ ULONG Length,
- /*OUT*/ PIO_STATUS_BLOCK IoStatus /*OPTIONAL*/
-);
-
-typedef VOID (*PDIRTY_PAGE_ROUTINE) (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ ULONG Length,
- /*IN*/ PLARGE_INTEGER OldestLsn,
- /*IN*/ PLARGE_INTEGER NewestLsn,
- /*IN*/ PVOID Context1,
- /*IN*/ PVOID Context2
-);
-
-NTKERNELAPI
-LARGE_INTEGER
-NTAPI
-CcGetDirtyPages (
- /*IN*/ PVOID LogHandle,
- /*IN*/ PDIRTY_PAGE_ROUTINE DirtyPageRoutine,
- /*IN*/ PVOID Context1,
- /*IN*/ PVOID Context2
-);
-
-NTKERNELAPI
-PFILE_OBJECT
-NTAPI
-CcGetFileObjectFromBcb (
- /*IN*/ PVOID Bcb
-);
-
-NTKERNELAPI
-PFILE_OBJECT
-NTAPI
-CcGetFileObjectFromSectionPtrs (
- /*IN*/ PSECTION_OBJECT_POINTERS SectionObjectPointer
-);
-
-#define CcGetFileSizePointer(FO) ( \
- ((PLARGE_INTEGER)((FO)->SectionObjectPointer->SharedCacheMap) + 1) \
-)
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTKERNELAPI
-LARGE_INTEGER
-NTAPI
-CcGetFlushedValidData (
- /*IN*/ PSECTION_OBJECT_POINTERS SectionObjectPointer,
- /*IN*/ BOOLEAN BcbListHeld
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTKERNELAPI
-LARGE_INTEGER
-CcGetLsnForFileObject (
- /*IN*/ PFILE_OBJECT FileObject,
- /*OUT*/ PLARGE_INTEGER OldestLsn /*OPTIONAL*/
-);
-
-typedef BOOLEAN (NTAPI *PACQUIRE_FOR_LAZY_WRITE) (
- /*IN*/ PVOID Context,
- /*IN*/ BOOLEAN Wait
-);
-
-typedef VOID (NTAPI *PRELEASE_FROM_LAZY_WRITE) (
- /*IN*/ PVOID Context
-);
-
-typedef BOOLEAN (NTAPI *PACQUIRE_FOR_READ_AHEAD) (
- /*IN*/ PVOID Context,
- /*IN*/ BOOLEAN Wait
-);
-
-typedef VOID (NTAPI *PRELEASE_FROM_READ_AHEAD) (
- /*IN*/ PVOID Context
-);
-
-typedef struct _CACHE_MANAGER_CALLBACKS {
- PACQUIRE_FOR_LAZY_WRITE AcquireForLazyWrite;
- PRELEASE_FROM_LAZY_WRITE ReleaseFromLazyWrite;
- PACQUIRE_FOR_READ_AHEAD AcquireForReadAhead;
- PRELEASE_FROM_READ_AHEAD ReleaseFromReadAhead;
-} CACHE_MANAGER_CALLBACKS, *PCACHE_MANAGER_CALLBACKS;
-
-NTKERNELAPI
-VOID
-NTAPI
-CcInitializeCacheMap (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PCC_FILE_SIZES FileSizes,
- /*IN*/ BOOLEAN PinAccess,
- /*IN*/ PCACHE_MANAGER_CALLBACKS Callbacks,
- /*IN*/ PVOID LazyWriteContext
-);
-
-#define CcIsFileCached(FO) ( \
- ((FO)->SectionObjectPointer != NULL) && \
- (((PSECTION_OBJECT_POINTERS)(FO)->SectionObjectPointer)->SharedCacheMap != NULL) \
-)
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-CcIsThereDirtyData (
- /*IN*/ PVPB Vpb
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-CcMapData (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ ULONG Length,
- /*IN*/ BOOLEAN Wait,
- /*OUT*/ PVOID *Bcb,
- /*OUT*/ PVOID *Buffer
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-CcMdlRead (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ ULONG Length,
- /*OUT*/ PMDL *MdlChain,
- /*OUT*/ PIO_STATUS_BLOCK IoStatus
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-CcMdlReadComplete (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PMDL MdlChain
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-CcMdlWriteComplete (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ PMDL MdlChain
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-CcPinMappedData (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ ULONG Length,
-#if (VER_PRODUCTBUILD >= 2195)
- /*IN*/ ULONG Flags,
-#else
- /*IN*/ BOOLEAN Wait,
-#endif
- /*IN OUT*/ PVOID *Bcb
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-CcPinRead (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ ULONG Length,
-#if (VER_PRODUCTBUILD >= 2195)
- /*IN*/ ULONG Flags,
-#else
- /*IN*/ BOOLEAN Wait,
-#endif
- /*OUT*/ PVOID *Bcb,
- /*OUT*/ PVOID *Buffer
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-CcPrepareMdlWrite (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ ULONG Length,
- /*OUT*/ PMDL *MdlChain,
- /*OUT*/ PIO_STATUS_BLOCK IoStatus
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-CcPreparePinWrite (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ ULONG Length,
- /*IN*/ BOOLEAN Zero,
-#if (VER_PRODUCTBUILD >= 2195)
- /*IN*/ ULONG Flags,
-#else
- /*IN*/ BOOLEAN Wait,
-#endif
- /*OUT*/ PVOID *Bcb,
- /*OUT*/ PVOID *Buffer
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-CcPurgeCacheSection (
- /*IN*/ PSECTION_OBJECT_POINTERS SectionObjectPointer,
- /*IN*/ PLARGE_INTEGER FileOffset /*OPTIONAL*/,
- /*IN*/ ULONG Length,
- /*IN*/ BOOLEAN UninitializeCacheMaps
-);
-
-#define CcReadAhead(FO, FOFF, LEN) ( \
- if ((LEN) >= 256) { \
- CcScheduleReadAhead((FO), (FOFF), (LEN)); \
- } \
-)
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTKERNELAPI
-PVOID
-NTAPI
-CcRemapBcb (
- /*IN*/ PVOID Bcb
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTKERNELAPI
-VOID
-NTAPI
-CcRepinBcb (
- /*IN*/ PVOID Bcb
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-CcScheduleReadAhead (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ ULONG Length
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-CcSetAdditionalCacheAttributes (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ BOOLEAN DisableReadAhead,
- /*IN*/ BOOLEAN DisableWriteBehind
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-CcSetBcbOwnerPointer (
- /*IN*/ PVOID Bcb,
- /*IN*/ PVOID OwnerPointer
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-CcSetDirtyPageThreshold (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ ULONG DirtyPageThreshold
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-CcSetDirtyPinnedData (
- /*IN*/ PVOID BcbVoid,
- /*IN*/ PLARGE_INTEGER Lsn /*OPTIONAL*/
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-CcSetFileSizes (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PCC_FILE_SIZES FileSizes
-);
-
-typedef VOID (NTAPI *PFLUSH_TO_LSN) (
- /*IN*/ PVOID LogHandle,
- /*IN*/ PLARGE_INTEGER Lsn
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-CcSetLogHandleForFile (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PVOID LogHandle,
- /*IN*/ PFLUSH_TO_LSN FlushToLsnRoutine
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-CcSetReadAheadGranularity (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ ULONG Granularity /* default: PAGE_SIZE */
- /* allowed: 2^n * PAGE_SIZE */
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-CcUninitializeCacheMap (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PLARGE_INTEGER TruncateSize /*OPTIONAL*/,
- /*IN*/ PCACHE_UNINITIALIZE_EVENT UninitializeCompleteEvent /*OPTIONAL*/
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-CcUnpinData (
- /*IN*/ PVOID Bcb
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-CcUnpinDataForThread (
- /*IN*/ PVOID Bcb,
- /*IN*/ ERESOURCE_THREAD ResourceThreadId
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-CcUnpinRepinnedBcb (
- /*IN*/ PVOID Bcb,
- /*IN*/ BOOLEAN WriteThrough,
- /*OUT*/ PIO_STATUS_BLOCK IoStatus
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-CcWaitForCurrentLazyWriterActivity (
- VOID
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-CcZeroData (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PLARGE_INTEGER StartOffset,
- /*IN*/ PLARGE_INTEGER EndOffset,
- /*IN*/ BOOLEAN Wait
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-ExDisableResourceBoostLite (
- /*IN*/ PERESOURCE Resource
-);
-
-NTKERNELAPI
-ULONG
-NTAPI
-ExQueryPoolBlockSize (
- /*IN*/ PVOID PoolBlock,
- /*OUT*/ PBOOLEAN QuotaCharged
-);
-
-#define FlagOn(x, f) ((x) & (f))
-
-NTKERNELAPI
-VOID
-NTAPI
-FsRtlAddToTunnelCache (
- /*IN*/ PTUNNEL Cache,
- /*IN*/ ULONGLONG DirectoryKey,
- /*IN*/ PUNICODE_STRING ShortName,
- /*IN*/ PUNICODE_STRING LongName,
- /*IN*/ BOOLEAN KeyByShortName,
- /*IN*/ ULONG DataLength,
- /*IN*/ PVOID Data
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-PFILE_LOCK
-NTAPI
-FsRtlAllocateFileLock (
- /*IN*/ PCOMPLETE_LOCK_IRP_ROUTINE CompleteLockIrpRoutine /*OPTIONAL*/,
- /*IN*/ PUNLOCK_ROUTINE UnlockRoutine /*OPTIONAL*/
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTKERNELAPI
-PVOID
-NTAPI
-FsRtlAllocatePool (
- /*IN*/ POOL_TYPE PoolType,
- /*IN*/ ULONG NumberOfBytes
-);
-
-NTKERNELAPI
-PVOID
-NTAPI
-FsRtlAllocatePoolWithQuota (
- /*IN*/ POOL_TYPE PoolType,
- /*IN*/ ULONG NumberOfBytes
-);
-
-NTKERNELAPI
-PVOID
-NTAPI
-FsRtlAllocatePoolWithQuotaTag (
- /*IN*/ POOL_TYPE PoolType,
- /*IN*/ ULONG NumberOfBytes,
- /*IN*/ ULONG Tag
-);
-
-NTKERNELAPI
-PVOID
-NTAPI
-FsRtlAllocatePoolWithTag (
- /*IN*/ POOL_TYPE PoolType,
- /*IN*/ ULONG NumberOfBytes,
- /*IN*/ ULONG Tag
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-FsRtlAreNamesEqual (
- /*IN*/ PUNICODE_STRING Name1,
- /*IN*/ PUNICODE_STRING Name2,
- /*IN*/ BOOLEAN IgnoreCase,
- /*IN*/ PWCHAR UpcaseTable /*OPTIONAL*/
-);
-
-#define FsRtlAreThereCurrentFileLocks(FL) ( \
- ((FL)->FastIoIsQuestionable) \
-)
-
-/*
- FsRtlCheckLockForReadAccess:
-
- All this really does is pick out the lock parameters from the irp (io stack
- location?), get IoGetRequestorProcess, and pass values on to
- FsRtlFastCheckLockForRead.
-*/
-NTKERNELAPI
-BOOLEAN
-NTAPI
-FsRtlCheckLockForReadAccess (
- /*IN*/ PFILE_LOCK FileLock,
- /*IN*/ PIRP Irp
-);
-
-/*
- FsRtlCheckLockForWriteAccess:
-
- All this really does is pick out the lock parameters from the irp (io stack
- location?), get IoGetRequestorProcess, and pass values on to
- FsRtlFastCheckLockForWrite.
-*/
-NTKERNELAPI
-BOOLEAN
-NTAPI
-FsRtlCheckLockForWriteAccess (
- /*IN*/ PFILE_LOCK FileLock,
- /*IN*/ PIRP Irp
-);
-
-typedef
-VOID NTAPI
-(*POPLOCK_WAIT_COMPLETE_ROUTINE) (
- /*IN*/ PVOID Context,
- /*IN*/ PIRP Irp
-);
-
-typedef
-VOID NTAPI
-(*POPLOCK_FS_PREPOST_IRP) (
- /*IN*/ PVOID Context,
- /*IN*/ PIRP Irp
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-FsRtlCheckOplock (
- /*IN*/ POPLOCK Oplock,
- /*IN*/ PIRP Irp,
- /*IN*/ PVOID Context,
- /*IN*/ POPLOCK_WAIT_COMPLETE_ROUTINE CompletionRoutine /*OPTIONAL*/,
- /*IN*/ POPLOCK_FS_PREPOST_IRP PostIrpRoutine /*OPTIONAL*/
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-FsRtlCopyRead (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ ULONG Length,
- /*IN*/ BOOLEAN Wait,
- /*IN*/ ULONG LockKey,
- /*OUT*/ PVOID Buffer,
- /*OUT*/ PIO_STATUS_BLOCK IoStatus,
- /*IN*/ PDEVICE_OBJECT DeviceObject
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-FsRtlCopyWrite (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ ULONG Length,
- /*IN*/ BOOLEAN Wait,
- /*IN*/ ULONG LockKey,
- /*IN*/ PVOID Buffer,
- /*OUT*/ PIO_STATUS_BLOCK IoStatus,
- /*IN*/ PDEVICE_OBJECT DeviceObject
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-FsRtlCurrentBatchOplock (
- /*IN*/ POPLOCK Oplock
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-FsRtlDeleteKeyFromTunnelCache (
- /*IN*/ PTUNNEL Cache,
- /*IN*/ ULONGLONG DirectoryKey
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-FsRtlDeleteTunnelCache (
- /*IN*/ PTUNNEL Cache
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-FsRtlDeregisterUncProvider (
- /*IN*/ HANDLE Handle
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-FsRtlDoesNameContainWildCards (
- /*IN*/ PUNICODE_STRING Name
-);
-
-#define FsRtlEnterFileSystem KeEnterCriticalRegion
-
-#define FsRtlExitFileSystem KeLeaveCriticalRegion
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-FsRtlFastCheckLockForRead (
- /*IN*/ PFILE_LOCK FileLock,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ PLARGE_INTEGER Length,
- /*IN*/ ULONG Key,
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PEPROCESS Process
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-FsRtlFastCheckLockForWrite (
- /*IN*/ PFILE_LOCK FileLock,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ PLARGE_INTEGER Length,
- /*IN*/ ULONG Key,
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PEPROCESS Process
-);
-
-#define FsRtlFastLock(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) ( \
- FsRtlPrivateLock(A1, A2, A3, A4, A5, A6, A7, A8, A9, NULL, A10, A11) \
-)
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-FsRtlFastUnlockAll (
- /*IN*/ PFILE_LOCK FileLock,
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PEPROCESS Process,
- /*IN*/ PVOID Context /*OPTIONAL*/
-);
-/* ret: STATUS_RANGE_NOT_LOCKED */
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-FsRtlFastUnlockAllByKey (
- /*IN*/ PFILE_LOCK FileLock,
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PEPROCESS Process,
- /*IN*/ ULONG Key,
- /*IN*/ PVOID Context /*OPTIONAL*/
-);
-/* ret: STATUS_RANGE_NOT_LOCKED */
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-FsRtlFastUnlockSingle (
- /*IN*/ PFILE_LOCK FileLock,
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ PLARGE_INTEGER Length,
- /*IN*/ PEPROCESS Process,
- /*IN*/ ULONG Key,
- /*IN*/ PVOID Context /*OPTIONAL*/,
- /*IN*/ BOOLEAN AlreadySynchronized
-);
-/* ret: STATUS_RANGE_NOT_LOCKED */
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-FsRtlFindInTunnelCache (
- /*IN*/ PTUNNEL Cache,
- /*IN*/ ULONGLONG DirectoryKey,
- /*IN*/ PUNICODE_STRING Name,
- /*OUT*/ PUNICODE_STRING ShortName,
- /*OUT*/ PUNICODE_STRING LongName,
- /*IN OUT*/ PULONG DataLength,
- /*OUT*/ PVOID Data
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTKERNELAPI
-VOID
-NTAPI
-FsRtlFreeFileLock (
- /*IN*/ PFILE_LOCK FileLock
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-FsRtlGetFileSize (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN OUT*/ PLARGE_INTEGER FileSize
-);
-
-/*
- FsRtlGetNextFileLock:
-
- ret: NULL if no more locks
-
- Internals:
- FsRtlGetNextFileLock uses FileLock->LastReturnedLockInfo and
- FileLock->LastReturnedLock as storage.
- LastReturnedLock is a pointer to the 'raw' lock inkl. double linked
- list, and FsRtlGetNextFileLock needs this to get next lock on subsequent
- calls with Restart = FALSE.
-*/
-NTKERNELAPI
-PFILE_LOCK_INFO
-NTAPI
-FsRtlGetNextFileLock (
- /*IN*/ PFILE_LOCK FileLock,
- /*IN*/ BOOLEAN Restart
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-FsRtlInitializeFileLock (
- /*IN*/ PFILE_LOCK FileLock,
- /*IN*/ PCOMPLETE_LOCK_IRP_ROUTINE CompleteLockIrpRoutine /*OPTIONAL*/,
- /*IN*/ PUNLOCK_ROUTINE UnlockRoutine /*OPTIONAL*/
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-FsRtlInitializeOplock (
- /*IN OUT*/ POPLOCK Oplock
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-FsRtlInitializeTunnelCache (
- /*IN*/ PTUNNEL Cache
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-FsRtlIsNameInExpression (
- /*IN*/ PUNICODE_STRING Expression,
- /*IN*/ PUNICODE_STRING Name,
- /*IN*/ BOOLEAN IgnoreCase,
- /*IN*/ PWCHAR UpcaseTable /*OPTIONAL*/
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-FsRtlIsNtstatusExpected (
- /*IN*/ NTSTATUS Ntstatus
-);
-
-#define FsRtlIsUnicodeCharacterWild(C) ( \
- (((C) >= 0x40) ? \
- FALSE : \
- FlagOn((*FsRtlLegalAnsiCharacterArray)[(C)], FSRTL_WILD_CHARACTER )) \
-)
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-FsRtlMdlReadComplete (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PMDL MdlChain
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-FsRtlMdlReadCompleteDev (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PMDL MdlChain,
- /*IN*/ PDEVICE_OBJECT DeviceObject
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-FsRtlMdlWriteComplete (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ PMDL MdlChain
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-FsRtlMdlWriteCompleteDev (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ PMDL MdlChain,
- /*IN*/ PDEVICE_OBJECT DeviceObject
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-FsRtlNormalizeNtstatus (
- /*IN*/ NTSTATUS Exception,
- /*IN*/ NTSTATUS GenericException
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-FsRtlNotifyChangeDirectory (
- /*IN*/ PNOTIFY_SYNC NotifySync,
- /*IN*/ PVOID FsContext,
- /*IN*/ PSTRING FullDirectoryName,
- /*IN*/ PLIST_ENTRY NotifyList,
- /*IN*/ BOOLEAN WatchTree,
- /*IN*/ ULONG CompletionFilter,
- /*IN*/ PIRP NotifyIrp
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-FsRtlNotifyCleanup (
- /*IN*/ PNOTIFY_SYNC NotifySync,
- /*IN*/ PLIST_ENTRY NotifyList,
- /*IN*/ PVOID FsContext
-);
-
-typedef BOOLEAN (*PCHECK_FOR_TRAVERSE_ACCESS) (
- /*IN*/ PVOID NotifyContext,
- /*IN*/ PVOID TargetContext,
- /*IN*/ PSECURITY_SUBJECT_CONTEXT SubjectContext
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-FsRtlNotifyFullChangeDirectory (
- /*IN*/ PNOTIFY_SYNC NotifySync,
- /*IN*/ PLIST_ENTRY NotifyList,
- /*IN*/ PVOID FsContext,
- /*IN*/ PSTRING FullDirectoryName,
- /*IN*/ BOOLEAN WatchTree,
- /*IN*/ BOOLEAN IgnoreBuffer,
- /*IN*/ ULONG CompletionFilter,
- /*IN*/ PIRP NotifyIrp,
- /*IN*/ PCHECK_FOR_TRAVERSE_ACCESS TraverseCallback /*OPTIONAL*/,
- /*IN*/ PSECURITY_SUBJECT_CONTEXT SubjectContext /*OPTIONAL*/
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-FsRtlNotifyFullReportChange (
- /*IN*/ PNOTIFY_SYNC NotifySync,
- /*IN*/ PLIST_ENTRY NotifyList,
- /*IN*/ PSTRING FullTargetName,
- /*IN*/ USHORT TargetNameOffset,
- /*IN*/ PSTRING StreamName /*OPTIONAL*/,
- /*IN*/ PSTRING NormalizedParentName /*OPTIONAL*/,
- /*IN*/ ULONG FilterMatch,
- /*IN*/ ULONG Action,
- /*IN*/ PVOID TargetContext
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-FsRtlNotifyInitializeSync (
- /*IN*/ PNOTIFY_SYNC NotifySync
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-FsRtlNotifyReportChange (
- /*IN*/ PNOTIFY_SYNC NotifySync,
- /*IN*/ PLIST_ENTRY NotifyList,
- /*IN*/ PSTRING FullTargetName,
- /*IN*/ PUSHORT FileNamePartLength,
- /*IN*/ ULONG FilterMatch
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-FsRtlNotifyUninitializeSync (
- /*IN*/ PNOTIFY_SYNC NotifySync
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-FsRtlNotifyVolumeEvent (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ ULONG EventCode
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-FsRtlOplockFsctrl (
- /*IN*/ POPLOCK Oplock,
- /*IN*/ PIRP Irp,
- /*IN*/ ULONG OpenCount
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-FsRtlOplockIsFastIoPossible (
- /*IN*/ POPLOCK Oplock
-);
-
-/*
- FsRtlPrivateLock:
-
- ret: IoStatus->Status: STATUS_PENDING, STATUS_LOCK_NOT_GRANTED
-
- Internals:
- -Calls IoCompleteRequest if Irp
- -Uses exception handling / ExRaiseStatus with STATUS_INSUFFICIENT_RESOURCES
-*/
-NTKERNELAPI
-BOOLEAN
-NTAPI
-FsRtlPrivateLock (
- /*IN*/ PFILE_LOCK FileLock,
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ PLARGE_INTEGER Length,
- /*IN*/ PEPROCESS Process,
- /*IN*/ ULONG Key,
- /*IN*/ BOOLEAN FailImmediately,
- /*IN*/ BOOLEAN ExclusiveLock,
- /*OUT*/ PIO_STATUS_BLOCK IoStatus,
- /*IN*/ PIRP Irp /*OPTIONAL*/,
- /*IN*/ PVOID Context,
- /*IN*/ BOOLEAN AlreadySynchronized
-);
-
-/*
- FsRtlProcessFileLock:
-
- ret:
- -STATUS_INVALID_DEVICE_REQUEST
- -STATUS_RANGE_NOT_LOCKED from unlock routines.
- -STATUS_PENDING, STATUS_LOCK_NOT_GRANTED from FsRtlPrivateLock
- (redirected IoStatus->Status).
-
- Internals:
- -switch ( Irp->CurrentStackLocation->MinorFunction )
- lock: return FsRtlPrivateLock;
- unlocksingle: return FsRtlFastUnlockSingle;
- unlockall: return FsRtlFastUnlockAll;
- unlockallbykey: return FsRtlFastUnlockAllByKey;
- default: IofCompleteRequest with STATUS_INVALID_DEVICE_REQUEST;
- return STATUS_INVALID_DEVICE_REQUEST;
-
- -'AllwaysZero' is passed thru as 'AllwaysZero' to lock / unlock routines.
- -'Irp' is passet thru as 'Irp' to FsRtlPrivateLock.
-*/
-NTKERNELAPI
-NTSTATUS
-NTAPI
-FsRtlProcessFileLock (
- /*IN*/ PFILE_LOCK FileLock,
- /*IN*/ PIRP Irp,
- /*IN*/ PVOID Context /*OPTIONAL*/
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-FsRtlRegisterUncProvider (
- /*IN OUT*/ PHANDLE MupHandle,
- /*IN*/ PUNICODE_STRING RedirectorDeviceName,
- /*IN*/ BOOLEAN MailslotsSupported
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-FsRtlUninitializeFileLock (
- /*IN*/ PFILE_LOCK FileLock
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-FsRtlUninitializeOplock (
- /*IN OUT*/ POPLOCK Oplock
-);
-
-NTSYSAPI
-VOID
-NTAPI
-HalDisplayString (
- /*IN*/ PCHAR String
-);
-
-NTSYSAPI
-VOID
-NTAPI
-HalQueryRealTimeClock (
- /*IN OUT*/ PTIME_FIELDS TimeFields
-);
-
-NTSYSAPI
-VOID
-NTAPI
-HalSetRealTimeClock (
- /*IN*/ PTIME_FIELDS TimeFields
-);
-
-#define InitializeMessageHeader(m, l, t) { \
- (m)->Length = (USHORT)(l); \
- (m)->DataLength = (USHORT)(l - sizeof( LPC_MESSAGE )); \
- (m)->MessageType = (USHORT)(t); \
- (m)->DataInfoOffset = 0; \
-}
-
-NTKERNELAPI
-VOID
-NTAPI
-IoAcquireVpbSpinLock (
- /*OUT*/ PKIRQL Irql
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoCheckDesiredAccess (
- /*IN OUT*/ PACCESS_MASK DesiredAccess,
- /*IN*/ ACCESS_MASK GrantedAccess
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoCheckEaBufferValidity (
- /*IN*/ PFILE_FULL_EA_INFORMATION EaBuffer,
- /*IN*/ ULONG EaLength,
- /*OUT*/ PULONG ErrorOffset
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoCheckFunctionAccess (
- /*IN*/ ACCESS_MASK GrantedAccess,
- /*IN*/ UCHAR MajorFunction,
- /*IN*/ UCHAR MinorFunction,
- /*IN*/ ULONG IoControlCode,
- /*IN*/ PFILE_INFORMATION_CLASS FileInformationClass /*OPTIONAL*/,
- /*IN*/ PFS_INFORMATION_CLASS FsInformationClass /*OPTIONAL*/
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoCheckQuotaBufferValidity (
- /*IN*/ PFILE_QUOTA_INFORMATION QuotaBuffer,
- /*IN*/ ULONG QuotaLength,
- /*OUT*/ PULONG ErrorOffset
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTKERNELAPI
-PFILE_OBJECT
-NTAPI
-IoCreateStreamFileObject (
- /*IN*/ PFILE_OBJECT FileObject /*OPTIONAL*/,
- /*IN*/ PDEVICE_OBJECT DeviceObject /*OPTIONAL*/
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTKERNELAPI
-PFILE_OBJECT
-NTAPI
-IoCreateStreamFileObjectLite (
- /*IN*/ PFILE_OBJECT FileObject /*OPTIONAL*/,
- /*IN*/ PDEVICE_OBJECT DeviceObject /*OPTIONAL*/
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-IoFastQueryNetworkAttributes (
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ ULONG OpenOptions,
- /*OUT*/ PIO_STATUS_BLOCK IoStatus,
- /*OUT*/ PFILE_NETWORK_OPEN_INFORMATION Buffer
-);
-
-NTKERNELAPI
-PDEVICE_OBJECT
-NTAPI
-IoGetAttachedDevice (
- /*IN*/ PDEVICE_OBJECT DeviceObject
-);
-
-NTKERNELAPI
-PDEVICE_OBJECT
-NTAPI
-IoGetBaseFileSystemDeviceObject (
- /*IN*/ PFILE_OBJECT FileObject
-);
-
-NTKERNELAPI
-PEPROCESS
-NTAPI
-IoGetRequestorProcess (
- /*IN*/ PIRP Irp
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTKERNELAPI
-ULONG
-NTAPI
-IoGetRequestorProcessId (
- /*IN*/ PIRP Irp
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTKERNELAPI
-PIRP
-NTAPI
-IoGetTopLevelIrp (
- VOID
-);
-
-#define IoIsFileOpenedExclusively(FileObject) ( \
- (BOOLEAN) !( \
- (FileObject)->SharedRead || \
- (FileObject)->SharedWrite || \
- (FileObject)->SharedDelete \
- ) \
-)
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-IoIsOperationSynchronous (
- /*IN*/ PIRP Irp
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-IoIsSystemThread (
- /*IN*/ PETHREAD Thread
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-IoIsValidNameGraftingBuffer (
- /*IN*/ PIRP Irp,
- /*IN*/ PREPARSE_DATA_BUFFER ReparseBuffer
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoPageRead (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PMDL Mdl,
- /*IN*/ PLARGE_INTEGER Offset,
- /*IN*/ PKEVENT Event,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoQueryFileInformation (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ FILE_INFORMATION_CLASS FileInformationClass,
- /*IN*/ ULONG Length,
- /*OUT*/ PVOID FileInformation,
- /*OUT*/ PULONG ReturnedLength
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoQueryVolumeInformation (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ FS_INFORMATION_CLASS FsInformationClass,
- /*IN*/ ULONG Length,
- /*OUT*/ PVOID FsInformation,
- /*OUT*/ PULONG ReturnedLength
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-IoRegisterFileSystem (
- /*IN OUT*/ PDEVICE_OBJECT DeviceObject
-);
-
-#if (VER_PRODUCTBUILD >= 1381)
-
-typedef VOID (NTAPI *PDRIVER_FS_NOTIFICATION) (
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ BOOLEAN DriverActive
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoRegisterFsRegistrationChange (
- /*IN*/ PDRIVER_OBJECT DriverObject,
- /*IN*/ PDRIVER_FS_NOTIFICATION DriverNotificationRoutine
-);
-
-#endif /* (VER_PRODUCTBUILD >= 1381) */
-
-NTKERNELAPI
-VOID
-NTAPI
-IoReleaseVpbSpinLock (
- /*IN*/ KIRQL Irql
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-IoSetDeviceToVerify (
- /*IN*/ PETHREAD Thread,
- /*IN*/ PDEVICE_OBJECT DeviceObject
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoSetInformation (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ FILE_INFORMATION_CLASS FileInformationClass,
- /*IN*/ ULONG Length,
- /*IN*/ PVOID FileInformation
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-IoSetTopLevelIrp (
- /*IN*/ PIRP Irp
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoSynchronousPageWrite (
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN*/ PMDL Mdl,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ PKEVENT Event,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock
-);
-
-NTKERNELAPI
-PEPROCESS
-NTAPI
-IoThreadToProcess (
- /*IN*/ PETHREAD Thread
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-IoUnregisterFileSystem (
- /*IN OUT*/ PDEVICE_OBJECT DeviceObject
-);
-
-#if (VER_PRODUCTBUILD >= 1381)
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoUnregisterFsRegistrationChange (
- /*IN*/ PDRIVER_OBJECT DriverObject,
- /*IN*/ PDRIVER_FS_NOTIFICATION DriverNotificationRoutine
-);
-
-#endif /* (VER_PRODUCTBUILD >= 1381) */
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoVerifyVolume (
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ BOOLEAN AllowRawMount
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-KeAttachProcess (
- /*IN*/ PEPROCESS Process
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-KeDetachProcess (
- VOID
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-KeInitializeQueue (
- /*IN*/ PRKQUEUE Queue,
- /*IN*/ ULONG Count /*OPTIONAL*/
-);
-
-NTKERNELAPI
-LONG
-NTAPI
-KeInsertHeadQueue (
- /*IN*/ PRKQUEUE Queue,
- /*IN*/ PLIST_ENTRY Entry
-);
-
-NTKERNELAPI
-LONG
-NTAPI
-KeInsertQueue (
- /*IN*/ PRKQUEUE Queue,
- /*IN*/ PLIST_ENTRY Entry
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-KeInsertQueueApc (
- /*IN*/ PKAPC Apc,
- /*IN*/ PVOID SystemArgument1,
- /*IN*/ PVOID SystemArgument2,
- /*IN*/ KPRIORITY PriorityBoost
-);
-
-NTKERNELAPI
-LONG
-NTAPI
-KeReadStateQueue (
- /*IN*/ PRKQUEUE Queue
-);
-
-NTKERNELAPI
-PLIST_ENTRY
-NTAPI
-KeRemoveQueue (
- /*IN*/ PRKQUEUE Queue,
- /*IN*/ KPROCESSOR_MODE WaitMode,
- /*IN*/ PLARGE_INTEGER Timeout /*OPTIONAL*/
-);
-
-NTKERNELAPI
-PLIST_ENTRY
-NTAPI
-KeRundownQueue (
- /*IN*/ PRKQUEUE Queue
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTKERNELAPI
-VOID
-NTAPI
-KeStackAttachProcess (
- /*IN*/ PKPROCESS Process,
- /*OUT*/ PKAPC_STATE ApcState
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-KeUnstackDetachProcess (
- /*IN*/ PKAPC_STATE ApcState
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-MmCanFileBeTruncated (
- /*IN*/ PSECTION_OBJECT_POINTERS SectionObjectPointer,
- /*IN*/ PLARGE_INTEGER NewFileSize
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-MmFlushImageSection (
- /*IN*/ PSECTION_OBJECT_POINTERS SectionObjectPointer,
- /*IN*/ MMFLUSH_TYPE FlushType
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-MmForceSectionClosed (
- /*IN*/ PSECTION_OBJECT_POINTERS SectionObjectPointer,
- /*IN*/ BOOLEAN DelayClose
-);
-
-#if (VER_PRODUCTBUILD >= 1381)
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-MmIsRecursiveIoFault (
- VOID
-);
-
-#else
-
-#define MmIsRecursiveIoFault() ( \
- (PsGetCurrentThread()->DisablePageFaultClustering) | \
- (PsGetCurrentThread()->ForwardClusterOnly) \
-)
-
-#endif
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-MmMapViewOfSection (
- /*IN*/ PVOID SectionObject,
- /*IN*/ PEPROCESS Process,
- /*IN OUT*/ PVOID *BaseAddress,
- /*IN*/ ULONG ZeroBits,
- /*IN*/ ULONG CommitSize,
- /*IN OUT*/ PLARGE_INTEGER SectionOffset /*OPTIONAL*/,
- /*IN OUT*/ PULONG ViewSize,
- /*IN*/ SECTION_INHERIT InheritDisposition,
- /*IN*/ ULONG AllocationType,
- /*IN*/ ULONG Protect
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-MmSetAddressRangeModified (
- /*IN*/ PVOID Address,
- /*IN*/ ULONG Length
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-ObCreateObject (
- /*IN*/ KPROCESSOR_MODE ObjectAttributesAccessMode /*OPTIONAL*/,
- /*IN*/ POBJECT_TYPE ObjectType,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes /*OPTIONAL*/,
- /*IN*/ KPROCESSOR_MODE AccessMode,
- /*IN OUT*/ PVOID ParseContext /*OPTIONAL*/,
- /*IN*/ ULONG ObjectSize,
- /*IN*/ ULONG PagedPoolCharge /*OPTIONAL*/,
- /*IN*/ ULONG NonPagedPoolCharge /*OPTIONAL*/,
- /*OUT*/ PVOID *Object
-);
-
-NTKERNELAPI
-ULONG
-NTAPI
-ObGetObjectPointerCount (
- /*IN*/ PVOID Object
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-ObInsertObject (
- /*IN*/ PVOID Object,
- /*IN*/ PACCESS_STATE PassedAccessState /*OPTIONAL*/,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ ULONG AdditionalReferences,
- /*OUT*/ PVOID *ReferencedObject /*OPTIONAL*/,
- /*OUT*/ PHANDLE Handle
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-ObMakeTemporaryObject (
- /*IN*/ PVOID Object
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-ObOpenObjectByPointer (
- /*IN*/ PVOID Object,
- /*IN*/ ULONG HandleAttributes,
- /*IN*/ PACCESS_STATE PassedAccessState /*OPTIONAL*/,
- /*IN*/ ACCESS_MASK DesiredAccess /*OPTIONAL*/,
- /*IN*/ POBJECT_TYPE ObjectType /*OPTIONAL*/,
- /*IN*/ KPROCESSOR_MODE AccessMode,
- /*OUT*/ PHANDLE Handle
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-ObQueryNameString (
- /*IN*/ PVOID Object,
- /*OUT*/ POBJECT_NAME_INFORMATION ObjectNameInfo,
- /*IN*/ ULONG Length,
- /*OUT*/ PULONG ReturnLength
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-ObQueryObjectAuditingByHandle (
- /*IN*/ HANDLE Handle,
- /*OUT*/ PBOOLEAN GenerateOnClose
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-ObReferenceObjectByName (
- /*IN*/ PUNICODE_STRING ObjectName,
- /*IN*/ ULONG Attributes,
- /*IN*/ PACCESS_STATE PassedAccessState /*OPTIONAL*/,
- /*IN*/ ACCESS_MASK DesiredAccess /*OPTIONAL*/,
- /*IN*/ POBJECT_TYPE ObjectType,
- /*IN*/ KPROCESSOR_MODE AccessMode,
- /*IN OUT*/ PVOID ParseContext /*OPTIONAL*/,
- /*OUT*/ PVOID *Object
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-PsChargePoolQuota (
- /*IN*/ PEPROCESS Process,
- /*IN*/ POOL_TYPE PoolType,
- /*IN*/ ULONG Amount
-);
-
-#define PsDereferenceImpersonationToken(T) \
- {if (ARGUMENT_PRESENT(T)) { \
- (ObDereferenceObject((T))); \
- } else { \
- ; \
- } \
-}
-
-#define PsDereferencePrimaryToken(T) (ObDereferenceObject((T)))
-
-NTKERNELAPI
-ULONGLONG
-NTAPI
-PsGetProcessExitTime (
- VOID
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-PsIsThreadTerminating (
- /*IN*/ PETHREAD Thread
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-PsLookupProcessByProcessId (
- /*IN*/ PVOID ProcessId,
- /*OUT*/ PEPROCESS *Process
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-PsLookupProcessThreadByCid (
- /*IN*/ PCLIENT_ID Cid,
- /*OUT*/ PEPROCESS *Process /*OPTIONAL*/,
- /*OUT*/ PETHREAD *Thread
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-PsLookupThreadByThreadId (
- /*IN*/ PVOID UniqueThreadId,
- /*OUT*/ PETHREAD *Thread
-);
-
-NTKERNELAPI
-PACCESS_TOKEN
-NTAPI
-PsReferenceImpersonationToken (
- /*IN*/ PETHREAD Thread,
- /*OUT*/ PBOOLEAN CopyOnUse,
- /*OUT*/ PBOOLEAN EffectiveOnly,
- /*OUT*/ PSECURITY_IMPERSONATION_LEVEL Level
-);
-
-NTKERNELAPI
-HANDLE
-NTAPI
-PsReferencePrimaryToken (
- /*IN*/ PEPROCESS Process
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-PsReturnPoolQuota (
- /*IN*/ PEPROCESS Process,
- /*IN*/ POOL_TYPE PoolType,
- /*IN*/ ULONG Amount
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-PsRevertToSelf (
- VOID
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlAbsoluteToSelfRelativeSD (
- /*IN*/ PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor,
- /*IN OUT*/ PSECURITY_DESCRIPTOR SelfRelativeSecurityDescriptor,
- /*IN*/ PULONG BufferLength
-);
-
-NTSYSAPI
-PVOID
-NTAPI
-RtlAllocateHeap (
- /*IN*/ HANDLE HeapHandle,
- /*IN*/ ULONG Flags,
- /*IN*/ ULONG Size
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlCompressBuffer (
- /*IN*/ USHORT CompressionFormatAndEngine,
- /*IN*/ PUCHAR UncompressedBuffer,
- /*IN*/ ULONG UncompressedBufferSize,
- /*OUT*/ PUCHAR CompressedBuffer,
- /*IN*/ ULONG CompressedBufferSize,
- /*IN*/ ULONG UncompressedChunkSize,
- /*OUT*/ PULONG FinalCompressedSize,
- /*IN*/ PVOID WorkSpace
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlCompressChunks (
- /*IN*/ PUCHAR UncompressedBuffer,
- /*IN*/ ULONG UncompressedBufferSize,
- /*OUT*/ PUCHAR CompressedBuffer,
- /*IN*/ ULONG CompressedBufferSize,
- /*IN OUT*/ PCOMPRESSED_DATA_INFO CompressedDataInfo,
- /*IN*/ ULONG CompressedDataInfoLength,
- /*IN*/ PVOID WorkSpace
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlConvertSidToUnicodeString (
- /*OUT*/ PUNICODE_STRING DestinationString,
- /*IN*/ PSID Sid,
- /*IN*/ BOOLEAN AllocateDestinationString
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlCopySid (
- /*IN*/ ULONG Length,
- /*IN*/ PSID Destination,
- /*IN*/ PSID Source
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlDecompressBuffer (
- /*IN*/ USHORT CompressionFormat,
- /*OUT*/ PUCHAR UncompressedBuffer,
- /*IN*/ ULONG UncompressedBufferSize,
- /*IN*/ PUCHAR CompressedBuffer,
- /*IN*/ ULONG CompressedBufferSize,
- /*OUT*/ PULONG FinalUncompressedSize
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlDecompressChunks (
- /*OUT*/ PUCHAR UncompressedBuffer,
- /*IN*/ ULONG UncompressedBufferSize,
- /*IN*/ PUCHAR CompressedBuffer,
- /*IN*/ ULONG CompressedBufferSize,
- /*IN*/ PUCHAR CompressedTail,
- /*IN*/ ULONG CompressedTailSize,
- /*IN*/ PCOMPRESSED_DATA_INFO CompressedDataInfo
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlDecompressFragment (
- /*IN*/ USHORT CompressionFormat,
- /*OUT*/ PUCHAR UncompressedFragment,
- /*IN*/ ULONG UncompressedFragmentSize,
- /*IN*/ PUCHAR CompressedBuffer,
- /*IN*/ ULONG CompressedBufferSize,
- /*IN*/ ULONG FragmentOffset,
- /*OUT*/ PULONG FinalUncompressedSize,
- /*IN*/ PVOID WorkSpace
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlDescribeChunk (
- /*IN*/ USHORT CompressionFormat,
- /*IN OUT*/ PUCHAR *CompressedBuffer,
- /*IN*/ PUCHAR EndOfCompressedBufferPlus1,
- /*OUT*/ PUCHAR *ChunkBuffer,
- /*OUT*/ PULONG ChunkSize
-);
-
-NTSYSAPI
-BOOLEAN
-NTAPI
-RtlEqualSid (
- /*IN*/ PSID Sid1,
- /*IN*/ PSID Sid2
-);
-
-NTSYSAPI
-VOID
-NTAPI
-RtlFillMemoryUlong (
- /*IN*/ PVOID Destination,
- /*IN*/ ULONG Length,
- /*IN*/ ULONG Fill
-);
-
-NTSYSAPI
-BOOLEAN
-NTAPI
-RtlFreeHeap (
- /*IN*/ HANDLE HeapHandle,
- /*IN*/ ULONG Flags,
- /*IN*/ PVOID P
-);
-
-NTSYSAPI
-VOID
-NTAPI
-RtlGenerate8dot3Name (
- /*IN*/ PUNICODE_STRING Name,
- /*IN*/ BOOLEAN AllowExtendedCharacters,
- /*IN OUT*/ PGENERATE_NAME_CONTEXT Context,
- /*OUT*/ PUNICODE_STRING Name8dot3
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlGetCompressionWorkSpaceSize (
- /*IN*/ USHORT CompressionFormatAndEngine,
- /*OUT*/ PULONG CompressBufferWorkSpaceSize,
- /*OUT*/ PULONG CompressFragmentWorkSpaceSize
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlGetDaclSecurityDescriptor (
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*OUT*/ PBOOLEAN DaclPresent,
- /*OUT*/ PACL *Dacl,
- /*OUT*/ PBOOLEAN DaclDefaulted
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlGetGroupSecurityDescriptor (
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*OUT*/ PSID *Group,
- /*OUT*/ PBOOLEAN GroupDefaulted
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlGetOwnerSecurityDescriptor (
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*OUT*/ PSID *Owner,
- /*OUT*/ PBOOLEAN OwnerDefaulted
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlInitializeSid (
- /*IN OUT*/ PSID Sid,
- /*IN*/ PSID_IDENTIFIER_AUTHORITY IdentifierAuthority,
- /*IN*/ UCHAR SubAuthorityCount
-);
-
-NTSYSAPI
-BOOLEAN
-NTAPI
-RtlIsNameLegalDOS8Dot3 (
- /*IN*/ PUNICODE_STRING UnicodeName,
- /*IN*/ PANSI_STRING AnsiName,
- PBOOLEAN Unknown
-);
-
-NTSYSAPI
-ULONG
-NTAPI
-RtlLengthRequiredSid (
- /*IN*/ UCHAR SubAuthorityCount
-);
-
-NTSYSAPI
-ULONG
-NTAPI
-RtlLengthSid (
- /*IN*/ PSID Sid
-);
-
-NTSYSAPI
-ULONG
-NTAPI
-RtlNtStatusToDosError (
- /*IN*/ NTSTATUS Status
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlReserveChunk (
- /*IN*/ USHORT CompressionFormat,
- /*IN OUT*/ PUCHAR *CompressedBuffer,
- /*IN*/ PUCHAR EndOfCompressedBufferPlus1,
- /*OUT*/ PUCHAR *ChunkBuffer,
- /*IN*/ ULONG ChunkSize
-);
-
-NTSYSAPI
-VOID
-NTAPI
-RtlSecondsSince1970ToTime (
- /*IN*/ ULONG SecondsSince1970,
- /*OUT*/ PLARGE_INTEGER Time
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlSelfRelativeToAbsoluteSD (
- /*IN*/ PSECURITY_DESCRIPTOR SelfRelativeSD,
- /*OUT*/ PSECURITY_DESCRIPTOR AbsoluteSD,
- /*IN*/ PULONG AbsoluteSDSize,
- /*IN*/ PACL Dacl,
- /*IN*/ PULONG DaclSize,
- /*IN*/ PACL Sacl,
- /*IN*/ PULONG SaclSize,
- /*IN*/ PSID Owner,
- /*IN*/ PULONG OwnerSize,
- /*IN*/ PSID PrimaryGroup,
- /*IN*/ PULONG PrimaryGroupSize
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlSetGroupSecurityDescriptor (
- /*IN OUT*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN*/ PSID Group,
- /*IN*/ BOOLEAN GroupDefaulted
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlSetOwnerSecurityDescriptor (
- /*IN OUT*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN*/ PSID Owner,
- /*IN*/ BOOLEAN OwnerDefaulted
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-RtlSetSaclSecurityDescriptor (
- /*IN OUT*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN*/ BOOLEAN SaclPresent,
- /*IN*/ PACL Sacl,
- /*IN*/ BOOLEAN SaclDefaulted
-);
-
-NTSYSAPI
-PUCHAR
-NTAPI
-RtlSubAuthorityCountSid (
- /*IN*/ PSID Sid
-);
-
-NTSYSAPI
-PULONG
-NTAPI
-RtlSubAuthoritySid (
- /*IN*/ PSID Sid,
- /*IN*/ ULONG SubAuthority
-);
-
-NTSYSAPI
-BOOLEAN
-NTAPI
-RtlValidSid (
- /*IN*/ PSID Sid
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-SeAppendPrivileges (
- PACCESS_STATE AccessState,
- PPRIVILEGE_SET Privileges
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-SeAuditingFileEvents (
- /*IN*/ BOOLEAN AccessGranted,
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-SeAuditingFileOrGlobalEvents (
- /*IN*/ BOOLEAN AccessGranted,
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN*/ PSECURITY_SUBJECT_CONTEXT SubjectContext
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-SeCaptureSubjectContext (
- /*OUT*/ PSECURITY_SUBJECT_CONTEXT SubjectContext
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-SeCreateAccessState (
- /*OUT*/ PACCESS_STATE AccessState,
- /*IN*/ PVOID AuxData,
- /*IN*/ ACCESS_MASK AccessMask,
- /*IN*/ PGENERIC_MAPPING Mapping
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-SeCreateClientSecurity (
- /*IN*/ PETHREAD Thread,
- /*IN*/ PSECURITY_QUALITY_OF_SERVICE QualityOfService,
- /*IN*/ BOOLEAN RemoteClient,
- /*OUT*/ PSECURITY_CLIENT_CONTEXT ClientContext
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-SeCreateClientSecurityFromSubjectContext (
- /*IN*/ PSECURITY_SUBJECT_CONTEXT SubjectContext,
- /*IN*/ PSECURITY_QUALITY_OF_SERVICE QualityOfService,
- /*IN*/ BOOLEAN ServerIsRemote,
- /*OUT*/ PSECURITY_CLIENT_CONTEXT ClientContext
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-#define SeDeleteClientSecurity(C) { \
- if (SeTokenType((C)->ClientToken) == TokenPrimary) { \
- PsDereferencePrimaryToken( (C)->ClientToken ); \
- } else { \
- PsDereferenceImpersonationToken( (C)->ClientToken ); \
- } \
-}
-
-NTKERNELAPI
-VOID
-NTAPI
-SeDeleteObjectAuditAlarm (
- /*IN*/ PVOID Object,
- /*IN*/ HANDLE Handle
-);
-
-#define SeEnableAccessToExports() SeExports = *(PSE_EXPORTS *)SeExports;
-
-NTKERNELAPI
-VOID
-NTAPI
-SeFreePrivileges (
- /*IN*/ PPRIVILEGE_SET Privileges
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-SeImpersonateClient (
- /*IN*/ PSECURITY_CLIENT_CONTEXT ClientContext,
- /*IN*/ PETHREAD ServerThread /*OPTIONAL*/
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-SeImpersonateClientEx (
- /*IN*/ PSECURITY_CLIENT_CONTEXT ClientContext,
- /*IN*/ PETHREAD ServerThread /*OPTIONAL*/
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTKERNELAPI
-VOID
-NTAPI
-SeLockSubjectContext (
- /*IN*/ PSECURITY_SUBJECT_CONTEXT SubjectContext
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-SeMarkLogonSessionForTerminationNotification (
- /*IN*/ PLUID LogonId
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-SeOpenObjectAuditAlarm (
- /*IN*/ PUNICODE_STRING ObjectTypeName,
- /*IN*/ PVOID Object /*OPTIONAL*/,
- /*IN*/ PUNICODE_STRING AbsoluteObjectName /*OPTIONAL*/,
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN*/ PACCESS_STATE AccessState,
- /*IN*/ BOOLEAN ObjectCreated,
- /*IN*/ BOOLEAN AccessGranted,
- /*IN*/ KPROCESSOR_MODE AccessMode,
- /*OUT*/ PBOOLEAN GenerateOnClose
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-SeOpenObjectForDeleteAuditAlarm (
- /*IN*/ PUNICODE_STRING ObjectTypeName,
- /*IN*/ PVOID Object /*OPTIONAL*/,
- /*IN*/ PUNICODE_STRING AbsoluteObjectName /*OPTIONAL*/,
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN*/ PACCESS_STATE AccessState,
- /*IN*/ BOOLEAN ObjectCreated,
- /*IN*/ BOOLEAN AccessGranted,
- /*IN*/ KPROCESSOR_MODE AccessMode,
- /*OUT*/ PBOOLEAN GenerateOnClose
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-SePrivilegeCheck (
- /*IN OUT*/ PPRIVILEGE_SET RequiredPrivileges,
- /*IN*/ PSECURITY_SUBJECT_CONTEXT SubjectContext,
- /*IN*/ KPROCESSOR_MODE AccessMode
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-SeQueryAuthenticationIdToken (
- /*IN*/ PACCESS_TOKEN Token,
- /*OUT*/ PLUID LogonId
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-SeQueryInformationToken (
- /*IN*/ PACCESS_TOKEN Token,
- /*IN*/ TOKEN_INFORMATION_CLASS TokenInformationClass,
- /*OUT*/ PVOID *TokenInformation
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-SeQuerySecurityDescriptorInfo (
- /*IN*/ PSECURITY_INFORMATION SecurityInformation,
- /*OUT*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN OUT*/ PULONG Length,
- /*IN*/ PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-SeQuerySessionIdToken (
- /*IN*/ PACCESS_TOKEN Token,
- /*IN*/ PULONG SessionId
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-#define SeQuerySubjectContextToken( SubjectContext ) \
- ( ARGUMENT_PRESENT( \
- ((PSECURITY_SUBJECT_CONTEXT) SubjectContext)->ClientToken \
- ) ? \
- ((PSECURITY_SUBJECT_CONTEXT) SubjectContext)->ClientToken : \
- ((PSECURITY_SUBJECT_CONTEXT) SubjectContext)->PrimaryToken )
-
-typedef NTSTATUS (*PSE_LOGON_SESSION_TERMINATED_ROUTINE) (
- /*IN*/ PLUID LogonId
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-SeRegisterLogonSessionTerminatedRoutine (
- /*IN*/ PSE_LOGON_SESSION_TERMINATED_ROUTINE CallbackRoutine
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-SeReleaseSubjectContext (
- /*IN*/ PSECURITY_SUBJECT_CONTEXT SubjectContext
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-SeSetAccessStateGenericMapping (
- PACCESS_STATE AccessState,
- PGENERIC_MAPPING GenericMapping
-);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-SeSetSecurityDescriptorInfo (
- /*IN*/ PVOID Object /*OPTIONAL*/,
- /*IN*/ PSECURITY_INFORMATION SecurityInformation,
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN OUT*/ PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor,
- /*IN*/ POOL_TYPE PoolType,
- /*IN*/ PGENERIC_MAPPING GenericMapping
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-SeSetSecurityDescriptorInfoEx (
- /*IN*/ PVOID Object /*OPTIONAL*/,
- /*IN*/ PSECURITY_INFORMATION SecurityInformation,
- /*IN*/ PSECURITY_DESCRIPTOR ModificationDescriptor,
- /*IN OUT*/ PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor,
- /*IN*/ ULONG AutoInheritFlags,
- /*IN*/ POOL_TYPE PoolType,
- /*IN*/ PGENERIC_MAPPING GenericMapping
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-SeTokenIsAdmin (
- /*IN*/ PACCESS_TOKEN Token
-);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-SeTokenIsRestricted (
- /*IN*/ PACCESS_TOKEN Token
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTKERNELAPI
-TOKEN_TYPE
-NTAPI
-SeTokenType (
- /*IN*/ PACCESS_TOKEN Token
-);
-
-NTKERNELAPI
-VOID
-NTAPI
-SeUnlockSubjectContext (
- /*IN*/ PSECURITY_SUBJECT_CONTEXT SubjectContext
-);
-
-NTKERNELAPI
-NTSTATUS
-SeUnregisterLogonSessionTerminatedRoutine (
- /*IN*/ PSE_LOGON_SESSION_TERMINATED_ROUTINE CallbackRoutine
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwAdjustPrivilegesToken (
- /*IN*/ HANDLE TokenHandle,
- /*IN*/ BOOLEAN DisableAllPrivileges,
- /*IN*/ PTOKEN_PRIVILEGES NewState,
- /*IN*/ ULONG BufferLength,
- /*OUT*/ PTOKEN_PRIVILEGES PreviousState /*OPTIONAL*/,
- /*OUT*/ PULONG ReturnLength
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwAlertThread (
- /*IN*/ HANDLE ThreadHandle
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwAllocateVirtualMemory (
- /*IN*/ HANDLE ProcessHandle,
- /*IN OUT*/ PVOID *BaseAddress,
- /*IN*/ ULONG ZeroBits,
- /*IN OUT*/ PULONG RegionSize,
- /*IN*/ ULONG AllocationType,
- /*IN*/ ULONG Protect
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwAccessCheckAndAuditAlarm (
- /*IN*/ PUNICODE_STRING SubsystemName,
- /*IN*/ PVOID HandleId,
- /*IN*/ PUNICODE_STRING ObjectTypeName,
- /*IN*/ PUNICODE_STRING ObjectName,
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ PGENERIC_MAPPING GenericMapping,
- /*IN*/ BOOLEAN ObjectCreation,
- /*OUT*/ PACCESS_MASK GrantedAccess,
- /*OUT*/ PBOOLEAN AccessStatus,
- /*OUT*/ PBOOLEAN GenerateOnClose
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwCancelIoFile (
- /*IN*/ HANDLE FileHandle,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwClearEvent (
- /*IN*/ HANDLE EventHandle
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwCloseObjectAuditAlarm (
- /*IN*/ PUNICODE_STRING SubsystemName,
- /*IN*/ PVOID HandleId,
- /*IN*/ BOOLEAN GenerateOnClose
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwCreateSection (
- /*OUT*/ PHANDLE SectionHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes /*OPTIONAL*/,
- /*IN*/ PLARGE_INTEGER MaximumSize /*OPTIONAL*/,
- /*IN*/ ULONG SectionPageProtection,
- /*IN*/ ULONG AllocationAttributes,
- /*IN*/ HANDLE FileHandle /*OPTIONAL*/
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwCreateSymbolicLinkObject (
- /*OUT*/ PHANDLE SymbolicLinkHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*IN*/ PUNICODE_STRING TargetName
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwDeleteFile (
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwDeleteValueKey (
- /*IN*/ HANDLE Handle,
- /*IN*/ PUNICODE_STRING Name
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwDeviceIoControlFile (
- /*IN*/ HANDLE FileHandle,
- /*IN*/ HANDLE Event /*OPTIONAL*/,
- /*IN*/ PIO_APC_ROUTINE ApcRoutine /*OPTIONAL*/,
- /*IN*/ PVOID ApcContext /*OPTIONAL*/,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*IN*/ ULONG IoControlCode,
- /*IN*/ PVOID InputBuffer /*OPTIONAL*/,
- /*IN*/ ULONG InputBufferLength,
- /*OUT*/ PVOID OutputBuffer /*OPTIONAL*/,
- /*IN*/ ULONG OutputBufferLength
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwDisplayString (
- /*IN*/ PUNICODE_STRING String
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwDuplicateObject (
- /*IN*/ HANDLE SourceProcessHandle,
- /*IN*/ HANDLE SourceHandle,
- /*IN*/ HANDLE TargetProcessHandle /*OPTIONAL*/,
- /*OUT*/ PHANDLE TargetHandle /*OPTIONAL*/,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ ULONG HandleAttributes,
- /*IN*/ ULONG Options
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwDuplicateToken (
- /*IN*/ HANDLE ExistingTokenHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*IN*/ BOOLEAN EffectiveOnly,
- /*IN*/ TOKEN_TYPE TokenType,
- /*OUT*/ PHANDLE NewTokenHandle
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwFlushInstructionCache (
- /*IN*/ HANDLE ProcessHandle,
- /*IN*/ PVOID BaseAddress /*OPTIONAL*/,
- /*IN*/ ULONG FlushSize
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwFlushVirtualMemory (
- /*IN*/ HANDLE ProcessHandle,
- /*IN OUT*/ PVOID *BaseAddress,
- /*IN OUT*/ PULONG FlushSize,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwFreeVirtualMemory (
- /*IN*/ HANDLE ProcessHandle,
- /*IN OUT*/ PVOID *BaseAddress,
- /*IN OUT*/ PULONG RegionSize,
- /*IN*/ ULONG FreeType
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwFsControlFile (
- /*IN*/ HANDLE FileHandle,
- /*IN*/ HANDLE Event /*OPTIONAL*/,
- /*IN*/ PIO_APC_ROUTINE ApcRoutine /*OPTIONAL*/,
- /*IN*/ PVOID ApcContext /*OPTIONAL*/,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*IN*/ ULONG FsControlCode,
- /*IN*/ PVOID InputBuffer /*OPTIONAL*/,
- /*IN*/ ULONG InputBufferLength,
- /*OUT*/ PVOID OutputBuffer /*OPTIONAL*/,
- /*IN*/ ULONG OutputBufferLength
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwInitiatePowerAction (
- /*IN*/ POWER_ACTION SystemAction,
- /*IN*/ SYSTEM_POWER_STATE MinSystemState,
- /*IN*/ ULONG Flags,
- /*IN*/ BOOLEAN Asynchronous
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwLoadDriver (
- /* "\\Registry\\Machine\\System\\CurrentControlSet\\Services\\<DriverName>" */
- /*IN*/ PUNICODE_STRING RegistryPath
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwLoadKey (
- /*IN*/ POBJECT_ATTRIBUTES KeyObjectAttributes,
- /*IN*/ POBJECT_ATTRIBUTES FileObjectAttributes
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwNotifyChangeKey (
- /*IN*/ HANDLE KeyHandle,
- /*IN*/ HANDLE EventHandle /*OPTIONAL*/,
- /*IN*/ PIO_APC_ROUTINE ApcRoutine /*OPTIONAL*/,
- /*IN*/ PVOID ApcContext /*OPTIONAL*/,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*IN*/ ULONG NotifyFilter,
- /*IN*/ BOOLEAN WatchSubtree,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG BufferLength,
- /*IN*/ BOOLEAN Asynchronous
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwOpenDirectoryObject (
- /*OUT*/ PHANDLE DirectoryHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwOpenEvent (
- /*OUT*/ PHANDLE EventHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwOpenProcess (
- /*OUT*/ PHANDLE ProcessHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*IN*/ PCLIENT_ID ClientId /*OPTIONAL*/
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwOpenProcessToken (
- /*IN*/ HANDLE ProcessHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*OUT*/ PHANDLE TokenHandle
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwOpenThread (
- /*OUT*/ PHANDLE ThreadHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*IN*/ PCLIENT_ID ClientId
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwOpenThreadToken (
- /*IN*/ HANDLE ThreadHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ BOOLEAN OpenAsSelf,
- /*OUT*/ PHANDLE TokenHandle
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwPowerInformation (
- /*IN*/ POWER_INFORMATION_LEVEL PowerInformationLevel,
- /*IN*/ PVOID InputBuffer /*OPTIONAL*/,
- /*IN*/ ULONG InputBufferLength,
- /*OUT*/ PVOID OutputBuffer /*OPTIONAL*/,
- /*IN*/ ULONG OutputBufferLength
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwPulseEvent (
- /*IN*/ HANDLE EventHandle,
- /*OUT*/ PULONG PreviousState /*OPTIONAL*/
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwQueryDefaultLocale (
- /*IN*/ BOOLEAN ThreadOrSystem,
- /*OUT*/ PLCID Locale
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwQueryDirectoryFile (
- /*IN*/ HANDLE FileHandle,
- /*IN*/ HANDLE Event /*OPTIONAL*/,
- /*IN*/ PIO_APC_ROUTINE ApcRoutine /*OPTIONAL*/,
- /*IN*/ PVOID ApcContext /*OPTIONAL*/,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*OUT*/ PVOID FileInformation,
- /*IN*/ ULONG Length,
- /*IN*/ FILE_INFORMATION_CLASS FileInformationClass,
- /*IN*/ BOOLEAN ReturnSingleEntry,
- /*IN*/ PUNICODE_STRING FileName /*OPTIONAL*/,
- /*IN*/ BOOLEAN RestartScan
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwQueryDirectoryObject (
- /*IN*/ HANDLE DirectoryHandle,
- /*OUT*/ PVOID Buffer,
- /*IN*/ ULONG Length,
- /*IN*/ BOOLEAN ReturnSingleEntry,
- /*IN*/ BOOLEAN RestartScan,
- /*IN OUT*/ PULONG Context,
- /*OUT*/ PULONG ReturnLength /*OPTIONAL*/
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwQueryEaFile (
- /*IN*/ HANDLE FileHandle,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*OUT*/ PVOID Buffer,
- /*IN*/ ULONG Length,
- /*IN*/ BOOLEAN ReturnSingleEntry,
- /*IN*/ PVOID EaList /*OPTIONAL*/,
- /*IN*/ ULONG EaListLength,
- /*IN*/ PULONG EaIndex /*OPTIONAL*/,
- /*IN*/ BOOLEAN RestartScan
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwQueryInformationProcess (
- /*IN*/ HANDLE ProcessHandle,
- /*IN*/ PROCESSINFOCLASS ProcessInformationClass,
- /*OUT*/ PVOID ProcessInformation,
- /*IN*/ ULONG ProcessInformationLength,
- /*OUT*/ PULONG ReturnLength /*OPTIONAL*/
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwQueryInformationToken (
- /*IN*/ HANDLE TokenHandle,
- /*IN*/ TOKEN_INFORMATION_CLASS TokenInformationClass,
- /*OUT*/ PVOID TokenInformation,
- /*IN*/ ULONG Length,
- /*OUT*/ PULONG ResultLength
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwQueryObject (
- /*IN*/ HANDLE ObjectHandle,
- /*IN*/ OBJECT_INFORMATION_CLASS ObjectInformationClass,
- /*OUT*/ PVOID ObjectInformation,
- /*IN*/ ULONG Length,
- /*OUT*/ PULONG ResultLength
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwQuerySection (
- /*IN*/ HANDLE SectionHandle,
- /*IN*/ SECTION_INFORMATION_CLASS SectionInformationClass,
- /*OUT*/ PVOID SectionInformation,
- /*IN*/ ULONG SectionInformationLength,
- /*OUT*/ PULONG ResultLength /*OPTIONAL*/
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwQuerySecurityObject (
- /*IN*/ HANDLE FileHandle,
- /*IN*/ SECURITY_INFORMATION SecurityInformation,
- /*OUT*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN*/ ULONG Length,
- /*OUT*/ PULONG ResultLength
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwQuerySystemInformation (
- /*IN*/ SYSTEM_INFORMATION_CLASS SystemInformationClass,
- /*OUT*/ PVOID SystemInformation,
- /*IN*/ ULONG Length,
- /*OUT*/ PULONG ReturnLength
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwQueryVolumeInformationFile (
- /*IN*/ HANDLE FileHandle,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*OUT*/ PVOID FsInformation,
- /*IN*/ ULONG Length,
- /*IN*/ FS_INFORMATION_CLASS FsInformationClass
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwReplaceKey (
- /*IN*/ POBJECT_ATTRIBUTES NewFileObjectAttributes,
- /*IN*/ HANDLE KeyHandle,
- /*IN*/ POBJECT_ATTRIBUTES OldFileObjectAttributes
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwResetEvent (
- /*IN*/ HANDLE EventHandle,
- /*OUT*/ PULONG PreviousState /*OPTIONAL*/
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwRestoreKey (
- /*IN*/ HANDLE KeyHandle,
- /*IN*/ HANDLE FileHandle,
- /*IN*/ ULONG Flags
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwSaveKey (
- /*IN*/ HANDLE KeyHandle,
- /*IN*/ HANDLE FileHandle
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwSetDefaultLocale (
- /*IN*/ BOOLEAN ThreadOrSystem,
- /*IN*/ LCID Locale
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwSetDefaultUILanguage (
- /*IN*/ LANGID LanguageId
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwSetEaFile (
- /*IN*/ HANDLE FileHandle,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*OUT*/ PVOID Buffer,
- /*IN*/ ULONG Length
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwSetEvent (
- /*IN*/ HANDLE EventHandle,
- /*OUT*/ PULONG PreviousState /*OPTIONAL*/
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwSetInformationObject (
- /*IN*/ HANDLE ObjectHandle,
- /*IN*/ OBJECT_INFORMATION_CLASS ObjectInformationClass,
- /*IN*/ PVOID ObjectInformation,
- /*IN*/ ULONG ObjectInformationLength
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwSetInformationProcess (
- /*IN*/ HANDLE ProcessHandle,
- /*IN*/ PROCESSINFOCLASS ProcessInformationClass,
- /*IN*/ PVOID ProcessInformation,
- /*IN*/ ULONG ProcessInformationLength
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwSetSecurityObject (
- /*IN*/ HANDLE Handle,
- /*IN*/ SECURITY_INFORMATION SecurityInformation,
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwSetSystemInformation (
- /*IN*/ SYSTEM_INFORMATION_CLASS SystemInformationClass,
- /*IN*/ PVOID SystemInformation,
- /*IN*/ ULONG Length
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwSetSystemTime (
- /*IN*/ PLARGE_INTEGER NewTime,
- /*OUT*/ PLARGE_INTEGER OldTime /*OPTIONAL*/
-);
-
-#if (VER_PRODUCTBUILD >= 2195)
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwSetVolumeInformationFile (
- /*IN*/ HANDLE FileHandle,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*IN*/ PVOID FsInformation,
- /*IN*/ ULONG Length,
- /*IN*/ FS_INFORMATION_CLASS FsInformationClass
-);
-
-#endif /* (VER_PRODUCTBUILD >= 2195) */
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwTerminateProcess (
- /*IN*/ HANDLE ProcessHandle /*OPTIONAL*/,
- /*IN*/ NTSTATUS ExitStatus
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwUnloadDriver (
- /* "\\Registry\\Machine\\System\\CurrentControlSet\\Services\\<DriverName>" */
- /*IN*/ PUNICODE_STRING RegistryPath
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwUnloadKey (
- /*IN*/ POBJECT_ATTRIBUTES KeyObjectAttributes
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwWaitForSingleObject (
- /*IN*/ HANDLE Handle,
- /*IN*/ BOOLEAN Alertable,
- /*IN*/ PLARGE_INTEGER Timeout /*OPTIONAL*/
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwWaitForMultipleObjects (
- /*IN*/ ULONG HandleCount,
- /*IN*/ PHANDLE Handles,
- /*IN*/ WAIT_TYPE WaitType,
- /*IN*/ BOOLEAN Alertable,
- /*IN*/ PLARGE_INTEGER Timeout /*OPTIONAL*/
-);
-
-NTSYSAPI
-NTSTATUS
-NTAPI
-ZwYieldExecution (
- VOID
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _NTIFS_ */
diff --git a/winsup/w32api/include/ddk/ntpoapi.h b/winsup/w32api/include/ddk/ntpoapi.h
deleted file mode 100644
index 5173c65..0000000
--- a/winsup/w32api/include/ddk/ntpoapi.h
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * ntpoapi.h
- *
- * APIs for power management.
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __NTPOAPI_H
-#define __NTPOAPI_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include "batclass.h"
-
-#define POWER_PERF_SCALE 100
-#define PERF_LEVEL_TO_PERCENT(x) (((x) * 1000) / (POWER_PERF_SCALE * 10))
-#define PERCENT_TO_PERF_LEVEL(x) (((x) * POWER_PERF_SCALE * 10) / 1000)
-
-typedef struct _PROCESSOR_IDLE_TIMES {
- ULONGLONG StartTime;
- ULONGLONG EndTime;
- ULONG IdleHandlerReserved[4];
-} PROCESSOR_IDLE_TIMES, *PPROCESSOR_IDLE_TIMES;
-
-typedef BOOLEAN DDKFASTAPI
-(*PPROCESSOR_IDLE_HANDLER)(
- /*IN OUT*/ PPROCESSOR_IDLE_TIMES IdleTimes);
-
-typedef struct _PROCESSOR_IDLE_HANDLER_INFO {
- ULONG HardwareLatency;
- PPROCESSOR_IDLE_HANDLER Handler;
-} PROCESSOR_IDLE_HANDLER_INFO, *PPROCESSOR_IDLE_HANDLER_INFO;
-
-typedef VOID DDKFASTAPI
-(*PSET_PROCESSOR_THROTTLE)(
- /*IN*/ UCHAR Throttle);
-
-typedef NTSTATUS DDKFASTAPI
-(*PSET_PROCESSOR_THROTTLE2)(
- /*IN*/ UCHAR Throttle);
-
-#define MAX_IDLE_HANDLERS 3
-
-typedef struct _PROCESSOR_STATE_HANDLER {
- UCHAR ThrottleScale;
- BOOLEAN ThrottleOnIdle;
- PSET_PROCESSOR_THROTTLE SetThrottle;
- ULONG NumIdleHandlers;
- PROCESSOR_IDLE_HANDLER_INFO IdleHandler[MAX_IDLE_HANDLERS];
-} PROCESSOR_STATE_HANDLER, *PPROCESSOR_STATE_HANDLER;
-
-typedef enum _POWER_STATE_HANDLER_TYPE {
- PowerStateSleeping1,
- PowerStateSleeping2,
- PowerStateSleeping3,
- PowerStateSleeping4,
- PowerStateSleeping4Firmware,
- PowerStateShutdownReset,
- PowerStateShutdownOff,
- PowerStateMaximum
-} POWER_STATE_HANDLER_TYPE, *PPOWER_STATE_HANDLER_TYPE;
-
-typedef NTSTATUS DDKAPI
-(*PENTER_STATE_SYSTEM_HANDLER)(
- /*IN*/ PVOID SystemContext);
-
-typedef NTSTATUS DDKAPI
-(*PENTER_STATE_HANDLER)(
- /*IN*/ PVOID Context,
- /*IN*/ PENTER_STATE_SYSTEM_HANDLER SystemHandler /*OPTIONAL*/,
- /*IN*/ PVOID SystemContext,
- /*IN*/ LONG NumberProcessors,
- /*IN*/ VOLATILE PLONG Number);
-
-typedef struct _POWER_STATE_HANDLER {
- POWER_STATE_HANDLER_TYPE Type;
- BOOLEAN RtcWake;
- UCHAR Spare[3];
- PENTER_STATE_HANDLER Handler;
- PVOID Context;
-} POWER_STATE_HANDLER, *PPOWER_STATE_HANDLER;
-
-typedef NTSTATUS STDCALL
-(*PENTER_STATE_NOTIFY_HANDLER)(
- /*IN*/ POWER_STATE_HANDLER_TYPE State,
- /*IN*/ PVOID Context,
- /*IN*/ BOOLEAN Entering);
-
-typedef struct _POWER_STATE_NOTIFY_HANDLER {
- PENTER_STATE_NOTIFY_HANDLER Handler;
- PVOID Context;
-} POWER_STATE_NOTIFY_HANDLER, *PPOWER_STATE_NOTIFY_HANDLER;
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-NtPowerInformation(
- /*IN*/ POWER_INFORMATION_LEVEL InformationLevel,
- /*IN*/ PVOID InputBuffer /*OPTIONAL*/,
- /*IN*/ ULONG InputBufferLength,
- /*OUT*/ PVOID OutputBuffer /*OPTIONAL*/,
- /*IN*/ ULONG OutputBufferLength);
-
-#define PROCESSOR_STATE_TYPE_PERFORMANCE 1
-#define PROCESSOR_STATE_TYPE_THROTTLE 2
-
-typedef struct _PROCESSOR_PERF_LEVEL {
- UCHAR PercentFrequency;
- UCHAR Reserved;
- USHORT Flags;
-} PROCESSOR_PERF_LEVEL, *PPROCESSOR_PERF_LEVEL;
-
-typedef struct _PROCESSOR_PERF_STATE {
- UCHAR PercentFrequency;
- UCHAR MinCapacity;
- USHORT Power;
- UCHAR IncreaseLevel;
- UCHAR DecreaseLevel;
- USHORT Flags;
- ULONG IncreaseTime;
- ULONG DecreaseTime;
- ULONG IncreaseCount;
- ULONG DecreaseCount;
- ULONGLONG PerformanceTime;
-} PROCESSOR_PERF_STATE, *PPROCESSOR_PERF_STATE;
-
-typedef struct _PROCESSOR_STATE_HANDLER2 {
- ULONG NumIdleHandlers;
- PROCESSOR_IDLE_HANDLER_INFO IdleHandler[MAX_IDLE_HANDLERS];
- PSET_PROCESSOR_THROTTLE2 SetPerfLevel;
- ULONG HardwareLatency;
- UCHAR NumPerfStates;
- PROCESSOR_PERF_LEVEL PerfLevel[1];
-} PROCESSOR_STATE_HANDLER2, *PPROCESSOR_STATE_HANDLER2;
-
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-NtSetThreadExecutionState(
- /*IN*/ EXECUTION_STATE esFlags,
- /*OUT*/ EXECUTION_STATE *PreviousFlags);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-NtRequestWakeupLatency(
- /*IN*/ LATENCY_TIME latency);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-NtInitiatePowerAction(
- /*IN*/ POWER_ACTION SystemAction,
- /*IN*/ SYSTEM_POWER_STATE MinSystemState,
- /*IN*/ ULONG Flags,
- /*IN*/ BOOLEAN Asynchronous);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-NtSetSystemPowerState(
- /*IN*/ POWER_ACTION SystemAction,
- /*IN*/ SYSTEM_POWER_STATE MinSystemState,
- /*IN*/ ULONG Flags);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-NtGetDevicePowerState(
- /*IN*/ HANDLE Device,
- /*OUT*/ DEVICE_POWER_STATE *State);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-NtCancelDeviceWakeupRequest(
- /*IN*/ HANDLE Device);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-NtIsSystemResumeAutomatic(
- VOID);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-NtRequestDeviceWakeup(
- /*IN*/ HANDLE Device);
-
-#define WINLOGON_LOCK_ON_SLEEP 0x00000001
-
-typedef struct _PROCESSOR_POWER_INFORMATION {
- ULONG Number;
- ULONG MaxMhz;
- ULONG CurrentMhz;
- ULONG MhzLimit;
- ULONG MaxIdleState;
- ULONG CurrentIdleState;
-} PROCESSOR_POWER_INFORMATION, *PPROCESSOR_POWER_INFORMATION;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NTPOAPI_H */
diff --git a/winsup/w32api/include/ddk/ntstatus.h b/winsup/w32api/include/ddk/ntstatus.h
deleted file mode 100644
index d325d9f..0000000
--- a/winsup/w32api/include/ddk/ntstatus.h
+++ /dev/null
@@ -1,1105 +0,0 @@
-/*
- * ntstatus.h
- *
- * Windows NT status codes
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef _NTSTATUS_H
-#define _NTSTATUS_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(STATUS_SUCCESS)
-#define STATUS_SUCCESS ((NTSTATUS)0x00000000L)
-#endif /* !STATUS_SUCCESS */
-#define FACILITY_DEBUGGER 0x1
-#define FACILITY_RPC_RUNTIME 0x2
-#define FACILITY_RPC_STUBS 0x3
-#define FACILITY_IO_ERROR_CODE 0x4
-#define FACILITY_TERMINAL_SERVER 0xA
-#define FACILITY_USB_ERROR_CODE 0x10
-#define FACILITY_HID_ERROR_CODE 0x11
-#define FACILITY_FIREWIRE_ERROR_CODE 0x12
-#define FACILITY_CLUSTER_ERROR_CODE 0x13
-#define FACILITY_ACPI_ERROR_CODE 0x14
-#define FACILITY_SXS_ERROR_CODE 0x15
-#define STATUS_SEVERITY_SUCCESS 0x0
-#define STATUS_SEVERITY_INFORMATIONAL 0x1
-#define STATUS_SEVERITY_WARNING 0x2
-#define STATUS_SEVERITY_ERROR 0x3
-#define STATUS_WAIT_0 ((NTSTATUS)0x00000000L)
-#define STATUS_WAIT_1 ((NTSTATUS)0x00000001L)
-#define STATUS_WAIT_2 ((NTSTATUS)0x00000002L)
-#define STATUS_WAIT_3 ((NTSTATUS)0x00000003L)
-#define STATUS_WAIT_63 ((NTSTATUS)0x0000003FL)
-#define STATUS_ABANDONED ((NTSTATUS)0x00000080L)
-#define STATUS_ABANDONED_WAIT_0 ((NTSTATUS)0x00000080L)
-#define STATUS_ABANDONED_WAIT_63 ((NTSTATUS)0x000000BFL)
-#define STATUS_USER_APC ((NTSTATUS)0x000000C0L)
-#define STATUS_KERNEL_APC ((NTSTATUS)0x00000100L)
-#define STATUS_ALERTED ((NTSTATUS)0x00000101L)
-#define STATUS_TIMEOUT ((NTSTATUS)0x00000102L)
-#define STATUS_PENDING ((NTSTATUS)0x00000103L)
-#define STATUS_REPARSE ((NTSTATUS)0x00000104L)
-#define STATUS_MORE_ENTRIES ((NTSTATUS)0x00000105L)
-#define STATUS_NOT_ALL_ASSIGNED ((NTSTATUS)0x00000106L)
-#define STATUS_SOME_NOT_MAPPED ((NTSTATUS)0x00000107L)
-#define STATUS_OPLOCK_BREAK_IN_PROGRESS ((NTSTATUS)0x00000108L)
-#define STATUS_VOLUME_MOUNTED ((NTSTATUS)0x00000109L)
-#define STATUS_RXACT_COMMITTED ((NTSTATUS)0x0000010AL)
-#define STATUS_NOTIFY_CLEANUP ((NTSTATUS)0x0000010BL)
-#define STATUS_NOTIFY_ENUM_DIR ((NTSTATUS)0x0000010CL)
-#define STATUS_NO_QUOTAS_FOR_ACCOUNT ((NTSTATUS)0x0000010DL)
-#define STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED ((NTSTATUS)0x0000010EL)
-#define STATUS_PAGE_FAULT_TRANSITION ((NTSTATUS)0x00000110L)
-#define STATUS_PAGE_FAULT_DEMAND_ZERO ((NTSTATUS)0x00000111L)
-#define STATUS_PAGE_FAULT_COPY_ON_WRITE ((NTSTATUS)0x00000112L)
-#define STATUS_PAGE_FAULT_GUARD_PAGE ((NTSTATUS)0x00000113L)
-#define STATUS_PAGE_FAULT_PAGING_FILE ((NTSTATUS)0x00000114L)
-#define STATUS_CACHE_PAGE_LOCKED ((NTSTATUS)0x00000115L)
-#define STATUS_CRASH_DUMP ((NTSTATUS)0x00000116L)
-#define STATUS_BUFFER_ALL_ZEROS ((NTSTATUS)0x00000117L)
-#define STATUS_REPARSE_OBJECT ((NTSTATUS)0x00000118L)
-#define STATUS_RESOURCE_REQUIREMENTS_CHANGED ((NTSTATUS)0x00000119L)
-#define STATUS_TRANSLATION_COMPLETE ((NTSTATUS)0x00000120L)
-#define STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY ((NTSTATUS)0x00000121L)
-#define STATUS_NOTHING_TO_TERMINATE ((NTSTATUS)0x00000122L)
-#define STATUS_PROCESS_NOT_IN_JOB ((NTSTATUS)0x00000123L)
-#define STATUS_PROCESS_IN_JOB ((NTSTATUS)0x00000124L)
-#define STATUS_OBJECT_NAME_EXISTS ((NTSTATUS)0x40000000L)
-#define STATUS_THREAD_WAS_SUSPENDED ((NTSTATUS)0x40000001L)
-#define STATUS_WORKING_SET_LIMIT_RANGE ((NTSTATUS)0x40000002L)
-#define STATUS_IMAGE_NOT_AT_BASE ((NTSTATUS)0x40000003L)
-#define STATUS_RXACT_STATE_CREATED ((NTSTATUS)0x40000004L)
-#define STATUS_SEGMENT_NOTIFICATION ((NTSTATUS)0x40000005L)
-#define STATUS_LOCAL_USER_SESSION_KEY ((NTSTATUS)0x40000006L)
-#define STATUS_BAD_CURRENT_DIRECTORY ((NTSTATUS)0x40000007L)
-#define STATUS_SERIAL_MORE_WRITES ((NTSTATUS)0x40000008L)
-#define STATUS_REGISTRY_RECOVERED ((NTSTATUS)0x40000009L)
-#define STATUS_FT_READ_RECOVERY_FROM_BACKUP ((NTSTATUS)0x4000000AL)
-#define STATUS_FT_WRITE_RECOVERY ((NTSTATUS)0x4000000BL)
-#define STATUS_SERIAL_COUNTER_TIMEOUT ((NTSTATUS)0x4000000CL)
-#define STATUS_NULL_LM_PASSWORD ((NTSTATUS)0x4000000DL)
-#define STATUS_IMAGE_MACHINE_TYPE_MISMATCH ((NTSTATUS)0x4000000EL)
-#define STATUS_RECEIVE_PARTIAL ((NTSTATUS)0x4000000FL)
-#define STATUS_RECEIVE_EXPEDITED ((NTSTATUS)0x40000010L)
-#define STATUS_RECEIVE_PARTIAL_EXPEDITED ((NTSTATUS)0x40000011L)
-#define STATUS_EVENT_DONE ((NTSTATUS)0x40000012L)
-#define STATUS_EVENT_PENDING ((NTSTATUS)0x40000013L)
-#define STATUS_CHECKING_FILE_SYSTEM ((NTSTATUS)0x40000014L)
-#define STATUS_FATAL_APP_EXIT ((NTSTATUS)0x40000015L)
-#define STATUS_PREDEFINED_HANDLE ((NTSTATUS)0x40000016L)
-#define STATUS_WAS_UNLOCKED ((NTSTATUS)0x40000017L)
-#define STATUS_SERVICE_NOTIFICATION ((NTSTATUS)0x40000018L)
-#define STATUS_WAS_LOCKED ((NTSTATUS)0x40000019L)
-#define STATUS_LOG_HARD_ERROR ((NTSTATUS)0x4000001AL)
-#define STATUS_ALREADY_WIN32 ((NTSTATUS)0x4000001BL)
-#define STATUS_WX86_UNSIMULATE ((NTSTATUS)0x4000001CL)
-#define STATUS_WX86_CONTINUE ((NTSTATUS)0x4000001DL)
-#define STATUS_WX86_SINGLE_STEP ((NTSTATUS)0x4000001EL)
-#define STATUS_WX86_BREAKPOINT ((NTSTATUS)0x4000001FL)
-#define STATUS_WX86_EXCEPTION_CONTINUE ((NTSTATUS)0x40000020L)
-#define STATUS_WX86_EXCEPTION_LASTCHANCE ((NTSTATUS)0x40000021L)
-#define STATUS_WX86_EXCEPTION_CHAIN ((NTSTATUS)0x40000022L)
-#define STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE ((NTSTATUS)0x40000023L)
-#define STATUS_NO_YIELD_PERFORMED ((NTSTATUS)0x40000024L)
-#define STATUS_TIMER_RESUME_IGNORED ((NTSTATUS)0x40000025L)
-#define STATUS_ARBITRATION_UNHANDLED ((NTSTATUS)0x40000026L)
-#define STATUS_CARDBUS_NOT_SUPPORTED ((NTSTATUS)0x40000027L)
-#define STATUS_WX86_CREATEWX86TIB ((NTSTATUS)0x40000028L)
-#define STATUS_MP_PROCESSOR_MISMATCH ((NTSTATUS)0x40000029L)
-#define STATUS_HIBERNATED ((NTSTATUS)0x4000002AL)
-#define STATUS_RESUME_HIBERNATION ((NTSTATUS)0x4000002BL)
-#define STATUS_GUARD_PAGE_VIOLATION ((NTSTATUS)0x80000001L)
-#define STATUS_DATATYPE_MISALIGNMENT ((NTSTATUS)0x80000002L)
-#define STATUS_BREAKPOINT ((NTSTATUS)0x80000003L)
-#define STATUS_SINGLE_STEP ((NTSTATUS)0x80000004L)
-#define STATUS_BUFFER_OVERFLOW ((NTSTATUS)0x80000005L)
-#define STATUS_NO_MORE_FILES ((NTSTATUS)0x80000006L)
-#define STATUS_WAKE_SYSTEM_DEBUGGER ((NTSTATUS)0x80000007L)
-#define STATUS_HANDLES_CLOSED ((NTSTATUS)0x8000000AL)
-#define STATUS_NO_INHERITANCE ((NTSTATUS)0x8000000BL)
-#define STATUS_GUID_SUBSTITUTION_MADE ((NTSTATUS)0x8000000CL)
-#define STATUS_PARTIAL_COPY ((NTSTATUS)0x8000000DL)
-#define STATUS_DEVICE_PAPER_EMPTY ((NTSTATUS)0x8000000EL)
-#define STATUS_DEVICE_POWERED_OFF ((NTSTATUS)0x8000000FL)
-#define STATUS_DEVICE_OFF_LINE ((NTSTATUS)0x80000010L)
-#define STATUS_DEVICE_BUSY ((NTSTATUS)0x80000011L)
-#define STATUS_NO_MORE_EAS ((NTSTATUS)0x80000012L)
-#define STATUS_INVALID_EA_NAME ((NTSTATUS)0x80000013L)
-#define STATUS_EA_LIST_INCONSISTENT ((NTSTATUS)0x80000014L)
-#define STATUS_INVALID_EA_FLAG ((NTSTATUS)0x80000015L)
-#define STATUS_VERIFY_REQUIRED ((NTSTATUS)0x80000016L)
-#define STATUS_EXTRANEOUS_INFORMATION ((NTSTATUS)0x80000017L)
-#define STATUS_RXACT_COMMIT_NECESSARY ((NTSTATUS)0x80000018L)
-#define STATUS_NO_MORE_ENTRIES ((NTSTATUS)0x8000001AL)
-#define STATUS_FILEMARK_DETECTED ((NTSTATUS)0x8000001BL)
-#define STATUS_MEDIA_CHANGED ((NTSTATUS)0x8000001CL)
-#define STATUS_BUS_RESET ((NTSTATUS)0x8000001DL)
-#define STATUS_END_OF_MEDIA ((NTSTATUS)0x8000001EL)
-#define STATUS_BEGINNING_OF_MEDIA ((NTSTATUS)0x8000001FL)
-#define STATUS_MEDIA_CHECK ((NTSTATUS)0x80000020L)
-#define STATUS_SETMARK_DETECTED ((NTSTATUS)0x80000021L)
-#define STATUS_NO_DATA_DETECTED ((NTSTATUS)0x80000022L)
-#define STATUS_REDIRECTOR_HAS_OPEN_HANDLES ((NTSTATUS)0x80000023L)
-#define STATUS_SERVER_HAS_OPEN_HANDLES ((NTSTATUS)0x80000024L)
-#define STATUS_ALREADY_DISCONNECTED ((NTSTATUS)0x80000025L)
-#define STATUS_LONGJUMP ((NTSTATUS)0x80000026L)
-#define STATUS_CLEANER_CARTRIDGE_INSTALLED ((NTSTATUS)0x80000027L)
-#define STATUS_PLUGPLAY_QUERY_VETOED ((NTSTATUS)0x80000028L)
-#define STATUS_UNWIND_CONSOLIDATE ((NTSTATUS)0x80000029L)
-#define STATUS_CLUSTER_NODE_ALREADY_UP ((NTSTATUS)0x80130001L)
-#define STATUS_CLUSTER_NODE_ALREADY_DOWN ((NTSTATUS)0x80130002L)
-#define STATUS_CLUSTER_NETWORK_ALREADY_ONLINE ((NTSTATUS)0x80130003L)
-#define STATUS_CLUSTER_NETWORK_ALREADY_OFFLINE ((NTSTATUS)0x80130004L)
-#define STATUS_CLUSTER_NODE_ALREADY_MEMBER ((NTSTATUS)0x80130005L)
-#define STATUS_UNSUCCESSFUL ((NTSTATUS)0xC0000001L)
-#define STATUS_NOT_IMPLEMENTED ((NTSTATUS)0xC0000002L)
-#define STATUS_INVALID_INFO_CLASS ((NTSTATUS)0xC0000003L)
-#define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS)0xC0000004L)
-#define STATUS_ACCESS_VIOLATION ((NTSTATUS)0xC0000005L)
-#define STATUS_IN_PAGE_ERROR ((NTSTATUS)0xC0000006L)
-#define STATUS_PAGEFILE_QUOTA ((NTSTATUS)0xC0000007L)
-#define STATUS_INVALID_HANDLE ((NTSTATUS)0xC0000008L)
-#define STATUS_BAD_INITIAL_STACK ((NTSTATUS)0xC0000009L)
-#define STATUS_BAD_INITIAL_PC ((NTSTATUS)0xC000000AL)
-#define STATUS_INVALID_CID ((NTSTATUS)0xC000000BL)
-#define STATUS_TIMER_NOT_CANCELED ((NTSTATUS)0xC000000CL)
-#define STATUS_INVALID_PARAMETER ((NTSTATUS)0xC000000DL)
-#define STATUS_NO_SUCH_DEVICE ((NTSTATUS)0xC000000EL)
-#define STATUS_NO_SUCH_FILE ((NTSTATUS)0xC000000FL)
-#define STATUS_INVALID_DEVICE_REQUEST ((NTSTATUS)0xC0000010L)
-#define STATUS_END_OF_FILE ((NTSTATUS)0xC0000011L)
-#define STATUS_WRONG_VOLUME ((NTSTATUS)0xC0000012L)
-#define STATUS_NO_MEDIA_IN_DEVICE ((NTSTATUS)0xC0000013L)
-#define STATUS_UNRECOGNIZED_MEDIA ((NTSTATUS)0xC0000014L)
-#define STATUS_NONEXISTENT_SECTOR ((NTSTATUS)0xC0000015L)
-#define STATUS_MORE_PROCESSING_REQUIRED ((NTSTATUS)0xC0000016L)
-#define STATUS_NO_MEMORY ((NTSTATUS)0xC0000017L)
-#define STATUS_CONFLICTING_ADDRESSES ((NTSTATUS)0xC0000018L)
-#define STATUS_NOT_MAPPED_VIEW ((NTSTATUS)0xC0000019L)
-#define STATUS_UNABLE_TO_FREE_VM ((NTSTATUS)0xC000001AL)
-#define STATUS_UNABLE_TO_DELETE_SECTION ((NTSTATUS)0xC000001BL)
-#define STATUS_INVALID_SYSTEM_SERVICE ((NTSTATUS)0xC000001CL)
-#define STATUS_ILLEGAL_INSTRUCTION ((NTSTATUS)0xC000001DL)
-#define STATUS_INVALID_LOCK_SEQUENCE ((NTSTATUS)0xC000001EL)
-#define STATUS_INVALID_VIEW_SIZE ((NTSTATUS)0xC000001FL)
-#define STATUS_INVALID_FILE_FOR_SECTION ((NTSTATUS)0xC0000020L)
-#define STATUS_ALREADY_COMMITTED ((NTSTATUS)0xC0000021L)
-#define STATUS_ACCESS_DENIED ((NTSTATUS)0xC0000022L)
-#define STATUS_BUFFER_TOO_SMALL ((NTSTATUS)0xC0000023L)
-#define STATUS_OBJECT_TYPE_MISMATCH ((NTSTATUS)0xC0000024L)
-#define STATUS_NONCONTINUABLE_EXCEPTION ((NTSTATUS)0xC0000025L)
-#define STATUS_INVALID_DISPOSITION ((NTSTATUS)0xC0000026L)
-#define STATUS_UNWIND ((NTSTATUS)0xC0000027L)
-#define STATUS_BAD_STACK ((NTSTATUS)0xC0000028L)
-#define STATUS_INVALID_UNWIND_TARGET ((NTSTATUS)0xC0000029L)
-#define STATUS_NOT_LOCKED ((NTSTATUS)0xC000002AL)
-#define STATUS_PARITY_ERROR ((NTSTATUS)0xC000002BL)
-#define STATUS_UNABLE_TO_DECOMMIT_VM ((NTSTATUS)0xC000002CL)
-#define STATUS_NOT_COMMITTED ((NTSTATUS)0xC000002DL)
-#define STATUS_INVALID_PORT_ATTRIBUTES ((NTSTATUS)0xC000002EL)
-#define STATUS_PORT_MESSAGE_TOO_LONG ((NTSTATUS)0xC000002FL)
-#define STATUS_INVALID_PARAMETER_MIX ((NTSTATUS)0xC0000030L)
-#define STATUS_INVALID_QUOTA_LOWER ((NTSTATUS)0xC0000031L)
-#define STATUS_DISK_CORRUPT_ERROR ((NTSTATUS)0xC0000032L)
-#define STATUS_OBJECT_NAME_INVALID ((NTSTATUS)0xC0000033L)
-#define STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS)0xC0000034L)
-#define STATUS_OBJECT_NAME_COLLISION ((NTSTATUS)0xC0000035L)
-#define STATUS_PORT_DISCONNECTED ((NTSTATUS)0xC0000037L)
-#define STATUS_DEVICE_ALREADY_ATTACHED ((NTSTATUS)0xC0000038L)
-#define STATUS_OBJECT_PATH_INVALID ((NTSTATUS)0xC0000039L)
-#define STATUS_OBJECT_PATH_NOT_FOUND ((NTSTATUS)0xC000003AL)
-#define STATUS_OBJECT_PATH_SYNTAX_BAD ((NTSTATUS)0xC000003BL)
-#define STATUS_DATA_OVERRUN ((NTSTATUS)0xC000003CL)
-#define STATUS_DATA_LATE_ERROR ((NTSTATUS)0xC000003DL)
-#define STATUS_DATA_ERROR ((NTSTATUS)0xC000003EL)
-#define STATUS_CRC_ERROR ((NTSTATUS)0xC000003FL)
-#define STATUS_SECTION_TOO_BIG ((NTSTATUS)0xC0000040L)
-#define STATUS_PORT_CONNECTION_REFUSED ((NTSTATUS)0xC0000041L)
-#define STATUS_INVALID_PORT_HANDLE ((NTSTATUS)0xC0000042L)
-#define STATUS_SHARING_VIOLATION ((NTSTATUS)0xC0000043L)
-#define STATUS_QUOTA_EXCEEDED ((NTSTATUS)0xC0000044L)
-#define STATUS_INVALID_PAGE_PROTECTION ((NTSTATUS)0xC0000045L)
-#define STATUS_MUTANT_NOT_OWNED ((NTSTATUS)0xC0000046L)
-#define STATUS_SEMAPHORE_LIMIT_EXCEEDED ((NTSTATUS)0xC0000047L)
-#define STATUS_PORT_ALREADY_SET ((NTSTATUS)0xC0000048L)
-#define STATUS_SECTION_NOT_IMAGE ((NTSTATUS)0xC0000049L)
-#define STATUS_SUSPEND_COUNT_EXCEEDED ((NTSTATUS)0xC000004AL)
-#define STATUS_THREAD_IS_TERMINATING ((NTSTATUS)0xC000004BL)
-#define STATUS_BAD_WORKING_SET_LIMIT ((NTSTATUS)0xC000004CL)
-#define STATUS_INCOMPATIBLE_FILE_MAP ((NTSTATUS)0xC000004DL)
-#define STATUS_SECTION_PROTECTION ((NTSTATUS)0xC000004EL)
-#define STATUS_EAS_NOT_SUPPORTED ((NTSTATUS)0xC000004FL)
-#define STATUS_EA_TOO_LARGE ((NTSTATUS)0xC0000050L)
-#define STATUS_NONEXISTENT_EA_ENTRY ((NTSTATUS)0xC0000051L)
-#define STATUS_NO_EAS_ON_FILE ((NTSTATUS)0xC0000052L)
-#define STATUS_EA_CORRUPT_ERROR ((NTSTATUS)0xC0000053L)
-#define STATUS_FILE_LOCK_CONFLICT ((NTSTATUS)0xC0000054L)
-#define STATUS_LOCK_NOT_GRANTED ((NTSTATUS)0xC0000055L)
-#define STATUS_DELETE_PENDING ((NTSTATUS)0xC0000056L)
-#define STATUS_CTL_FILE_NOT_SUPPORTED ((NTSTATUS)0xC0000057L)
-#define STATUS_UNKNOWN_REVISION ((NTSTATUS)0xC0000058L)
-#define STATUS_REVISION_MISMATCH ((NTSTATUS)0xC0000059L)
-#define STATUS_INVALID_OWNER ((NTSTATUS)0xC000005AL)
-#define STATUS_INVALID_PRIMARY_GROUP ((NTSTATUS)0xC000005BL)
-#define STATUS_NO_IMPERSONATION_TOKEN ((NTSTATUS)0xC000005CL)
-#define STATUS_CANT_DISABLE_MANDATORY ((NTSTATUS)0xC000005DL)
-#define STATUS_NO_LOGON_SERVERS ((NTSTATUS)0xC000005EL)
-#define STATUS_NO_SUCH_LOGON_SESSION ((NTSTATUS)0xC000005FL)
-#define STATUS_NO_SUCH_PRIVILEGE ((NTSTATUS)0xC0000060L)
-#define STATUS_PRIVILEGE_NOT_HELD ((NTSTATUS)0xC0000061L)
-#define STATUS_INVALID_ACCOUNT_NAME ((NTSTATUS)0xC0000062L)
-#define STATUS_USER_EXISTS ((NTSTATUS)0xC0000063L)
-#define STATUS_NO_SUCH_USER ((NTSTATUS)0xC0000064L)
-#define STATUS_GROUP_EXISTS ((NTSTATUS)0xC0000065L)
-#define STATUS_NO_SUCH_GROUP ((NTSTATUS)0xC0000066L)
-#define STATUS_MEMBER_IN_GROUP ((NTSTATUS)0xC0000067L)
-#define STATUS_MEMBER_NOT_IN_GROUP ((NTSTATUS)0xC0000068L)
-#define STATUS_LAST_ADMIN ((NTSTATUS)0xC0000069L)
-#define STATUS_WRONG_PASSWORD ((NTSTATUS)0xC000006AL)
-#define STATUS_ILL_FORMED_PASSWORD ((NTSTATUS)0xC000006BL)
-#define STATUS_PASSWORD_RESTRICTION ((NTSTATUS)0xC000006CL)
-#define STATUS_LOGON_FAILURE ((NTSTATUS)0xC000006DL)
-#define STATUS_ACCOUNT_RESTRICTION ((NTSTATUS)0xC000006EL)
-#define STATUS_INVALID_LOGON_HOURS ((NTSTATUS)0xC000006FL)
-#define STATUS_INVALID_WORKSTATION ((NTSTATUS)0xC0000070L)
-#define STATUS_PASSWORD_EXPIRED ((NTSTATUS)0xC0000071L)
-#define STATUS_ACCOUNT_DISABLED ((NTSTATUS)0xC0000072L)
-#define STATUS_NONE_MAPPED ((NTSTATUS)0xC0000073L)
-#define STATUS_TOO_MANY_LUIDS_REQUESTED ((NTSTATUS)0xC0000074L)
-#define STATUS_LUIDS_EXHAUSTED ((NTSTATUS)0xC0000075L)
-#define STATUS_INVALID_SUB_AUTHORITY ((NTSTATUS)0xC0000076L)
-#define STATUS_INVALID_ACL ((NTSTATUS)0xC0000077L)
-#define STATUS_INVALID_SID ((NTSTATUS)0xC0000078L)
-#define STATUS_INVALID_SECURITY_DESCR ((NTSTATUS)0xC0000079L)
-#define STATUS_PROCEDURE_NOT_FOUND ((NTSTATUS)0xC000007AL)
-#define STATUS_INVALID_IMAGE_FORMAT ((NTSTATUS)0xC000007BL)
-#define STATUS_NO_TOKEN ((NTSTATUS)0xC000007CL)
-#define STATUS_BAD_INHERITANCE_ACL ((NTSTATUS)0xC000007DL)
-#define STATUS_RANGE_NOT_LOCKED ((NTSTATUS)0xC000007EL)
-#define STATUS_DISK_FULL ((NTSTATUS)0xC000007FL)
-#define STATUS_SERVER_DISABLED ((NTSTATUS)0xC0000080L)
-#define STATUS_SERVER_NOT_DISABLED ((NTSTATUS)0xC0000081L)
-#define STATUS_TOO_MANY_GUIDS_REQUESTED ((NTSTATUS)0xC0000082L)
-#define STATUS_GUIDS_EXHAUSTED ((NTSTATUS)0xC0000083L)
-#define STATUS_INVALID_ID_AUTHORITY ((NTSTATUS)0xC0000084L)
-#define STATUS_AGENTS_EXHAUSTED ((NTSTATUS)0xC0000085L)
-#define STATUS_INVALID_VOLUME_LABEL ((NTSTATUS)0xC0000086L)
-#define STATUS_SECTION_NOT_EXTENDED ((NTSTATUS)0xC0000087L)
-#define STATUS_NOT_MAPPED_DATA ((NTSTATUS)0xC0000088L)
-#define STATUS_RESOURCE_DATA_NOT_FOUND ((NTSTATUS)0xC0000089L)
-#define STATUS_RESOURCE_TYPE_NOT_FOUND ((NTSTATUS)0xC000008AL)
-#define STATUS_RESOURCE_NAME_NOT_FOUND ((NTSTATUS)0xC000008BL)
-#define STATUS_ARRAY_BOUNDS_EXCEEDED ((NTSTATUS)0xC000008CL)
-#define STATUS_FLOAT_DENORMAL_OPERAND ((NTSTATUS)0xC000008DL)
-#define STATUS_FLOAT_DIVIDE_BY_ZERO ((NTSTATUS)0xC000008EL)
-#define STATUS_FLOAT_INEXACT_RESULT ((NTSTATUS)0xC000008FL)
-#define STATUS_FLOAT_INVALID_OPERATION ((NTSTATUS)0xC0000090L)
-#define STATUS_FLOAT_OVERFLOW ((NTSTATUS)0xC0000091L)
-#define STATUS_FLOAT_STACK_CHECK ((NTSTATUS)0xC0000092L)
-#define STATUS_FLOAT_UNDERFLOW ((NTSTATUS)0xC0000093L)
-#define STATUS_INTEGER_DIVIDE_BY_ZERO ((NTSTATUS)0xC0000094L)
-#define STATUS_INTEGER_OVERFLOW ((NTSTATUS)0xC0000095L)
-#define STATUS_PRIVILEGED_INSTRUCTION ((NTSTATUS)0xC0000096L)
-#define STATUS_TOO_MANY_PAGING_FILES ((NTSTATUS)0xC0000097L)
-#define STATUS_FILE_INVALID ((NTSTATUS)0xC0000098L)
-#define STATUS_ALLOTTED_SPACE_EXCEEDED ((NTSTATUS)0xC0000099L)
-#define STATUS_INSUFFICIENT_RESOURCES ((NTSTATUS)0xC000009AL)
-#define STATUS_DFS_EXIT_PATH_FOUND ((NTSTATUS)0xC000009BL)
-#define STATUS_DEVICE_DATA_ERROR ((NTSTATUS)0xC000009CL)
-#define STATUS_DEVICE_NOT_CONNECTED ((NTSTATUS)0xC000009DL)
-#define STATUS_DEVICE_POWER_FAILURE ((NTSTATUS)0xC000009EL)
-#define STATUS_FREE_VM_NOT_AT_BASE ((NTSTATUS)0xC000009FL)
-#define STATUS_MEMORY_NOT_ALLOCATED ((NTSTATUS)0xC00000A0L)
-#define STATUS_WORKING_SET_QUOTA ((NTSTATUS)0xC00000A1L)
-#define STATUS_MEDIA_WRITE_PROTECTED ((NTSTATUS)0xC00000A2L)
-#define STATUS_DEVICE_NOT_READY ((NTSTATUS)0xC00000A3L)
-#define STATUS_INVALID_GROUP_ATTRIBUTES ((NTSTATUS)0xC00000A4L)
-#define STATUS_BAD_IMPERSONATION_LEVEL ((NTSTATUS)0xC00000A5L)
-#define STATUS_CANT_OPEN_ANONYMOUS ((NTSTATUS)0xC00000A6L)
-#define STATUS_BAD_VALIDATION_CLASS ((NTSTATUS)0xC00000A7L)
-#define STATUS_BAD_TOKEN_TYPE ((NTSTATUS)0xC00000A8L)
-#define STATUS_BAD_MASTER_BOOT_RECORD ((NTSTATUS)0xC00000A9L)
-#define STATUS_INSTRUCTION_MISALIGNMENT ((NTSTATUS)0xC00000AAL)
-#define STATUS_INSTANCE_NOT_AVAILABLE ((NTSTATUS)0xC00000ABL)
-#define STATUS_PIPE_NOT_AVAILABLE ((NTSTATUS)0xC00000ACL)
-#define STATUS_INVALID_PIPE_STATE ((NTSTATUS)0xC00000ADL)
-#define STATUS_PIPE_BUSY ((NTSTATUS)0xC00000AEL)
-#define STATUS_ILLEGAL_FUNCTION ((NTSTATUS)0xC00000AFL)
-#define STATUS_PIPE_DISCONNECTED ((NTSTATUS)0xC00000B0L)
-#define STATUS_PIPE_CLOSING ((NTSTATUS)0xC00000B1L)
-#define STATUS_PIPE_CONNECTED ((NTSTATUS)0xC00000B2L)
-#define STATUS_PIPE_LISTENING ((NTSTATUS)0xC00000B3L)
-#define STATUS_INVALID_READ_MODE ((NTSTATUS)0xC00000B4L)
-#define STATUS_IO_TIMEOUT ((NTSTATUS)0xC00000B5L)
-#define STATUS_FILE_FORCED_CLOSED ((NTSTATUS)0xC00000B6L)
-#define STATUS_PROFILING_NOT_STARTED ((NTSTATUS)0xC00000B7L)
-#define STATUS_PROFILING_NOT_STOPPED ((NTSTATUS)0xC00000B8L)
-#define STATUS_COULD_NOT_INTERPRET ((NTSTATUS)0xC00000B9L)
-#define STATUS_FILE_IS_A_DIRECTORY ((NTSTATUS)0xC00000BAL)
-#define STATUS_NOT_SUPPORTED ((NTSTATUS)0xC00000BBL)
-#define STATUS_REMOTE_NOT_LISTENING ((NTSTATUS)0xC00000BCL)
-#define STATUS_DUPLICATE_NAME ((NTSTATUS)0xC00000BDL)
-#define STATUS_BAD_NETWORK_PATH ((NTSTATUS)0xC00000BEL)
-#define STATUS_NETWORK_BUSY ((NTSTATUS)0xC00000BFL)
-#define STATUS_DEVICE_DOES_NOT_EXIST ((NTSTATUS)0xC00000C0L)
-#define STATUS_TOO_MANY_COMMANDS ((NTSTATUS)0xC00000C1L)
-#define STATUS_ADAPTER_HARDWARE_ERROR ((NTSTATUS)0xC00000C2L)
-#define STATUS_INVALID_NETWORK_RESPONSE ((NTSTATUS)0xC00000C3L)
-#define STATUS_UNEXPECTED_NETWORK_ERROR ((NTSTATUS)0xC00000C4L)
-#define STATUS_BAD_REMOTE_ADAPTER ((NTSTATUS)0xC00000C5L)
-#define STATUS_PRINT_QUEUE_FULL ((NTSTATUS)0xC00000C6L)
-#define STATUS_NO_SPOOL_SPACE ((NTSTATUS)0xC00000C7L)
-#define STATUS_PRINT_CANCELLED ((NTSTATUS)0xC00000C8L)
-#define STATUS_NETWORK_NAME_DELETED ((NTSTATUS)0xC00000C9L)
-#define STATUS_NETWORK_ACCESS_DENIED ((NTSTATUS)0xC00000CAL)
-#define STATUS_BAD_DEVICE_TYPE ((NTSTATUS)0xC00000CBL)
-#define STATUS_BAD_NETWORK_NAME ((NTSTATUS)0xC00000CCL)
-#define STATUS_TOO_MANY_NAMES ((NTSTATUS)0xC00000CDL)
-#define STATUS_TOO_MANY_SESSIONS ((NTSTATUS)0xC00000CEL)
-#define STATUS_SHARING_PAUSED ((NTSTATUS)0xC00000CFL)
-#define STATUS_REQUEST_NOT_ACCEPTED ((NTSTATUS)0xC00000D0L)
-#define STATUS_REDIRECTOR_PAUSED ((NTSTATUS)0xC00000D1L)
-#define STATUS_NET_WRITE_FAULT ((NTSTATUS)0xC00000D2L)
-#define STATUS_PROFILING_AT_LIMIT ((NTSTATUS)0xC00000D3L)
-#define STATUS_NOT_SAME_DEVICE ((NTSTATUS)0xC00000D4L)
-#define STATUS_FILE_RENAMED ((NTSTATUS)0xC00000D5L)
-#define STATUS_VIRTUAL_CIRCUIT_CLOSED ((NTSTATUS)0xC00000D6L)
-#define STATUS_NO_SECURITY_ON_OBJECT ((NTSTATUS)0xC00000D7L)
-#define STATUS_CANT_WAIT ((NTSTATUS)0xC00000D8L)
-#define STATUS_PIPE_EMPTY ((NTSTATUS)0xC00000D9L)
-#define STATUS_CANT_ACCESS_DOMAIN_INFO ((NTSTATUS)0xC00000DAL)
-#define STATUS_CANT_TERMINATE_SELF ((NTSTATUS)0xC00000DBL)
-#define STATUS_INVALID_SERVER_STATE ((NTSTATUS)0xC00000DCL)
-#define STATUS_INVALID_DOMAIN_STATE ((NTSTATUS)0xC00000DDL)
-#define STATUS_INVALID_DOMAIN_ROLE ((NTSTATUS)0xC00000DEL)
-#define STATUS_NO_SUCH_DOMAIN ((NTSTATUS)0xC00000DFL)
-#define STATUS_DOMAIN_EXISTS ((NTSTATUS)0xC00000E0L)
-#define STATUS_DOMAIN_LIMIT_EXCEEDED ((NTSTATUS)0xC00000E1L)
-#define STATUS_OPLOCK_NOT_GRANTED ((NTSTATUS)0xC00000E2L)
-#define STATUS_INVALID_OPLOCK_PROTOCOL ((NTSTATUS)0xC00000E3L)
-#define STATUS_INTERNAL_DB_CORRUPTION ((NTSTATUS)0xC00000E4L)
-#define STATUS_INTERNAL_ERROR ((NTSTATUS)0xC00000E5L)
-#define STATUS_GENERIC_NOT_MAPPED ((NTSTATUS)0xC00000E6L)
-#define STATUS_BAD_DESCRIPTOR_FORMAT ((NTSTATUS)0xC00000E7L)
-#define STATUS_INVALID_USER_BUFFER ((NTSTATUS)0xC00000E8L)
-#define STATUS_UNEXPECTED_IO_ERROR ((NTSTATUS)0xC00000E9L)
-#define STATUS_UNEXPECTED_MM_CREATE_ERR ((NTSTATUS)0xC00000EAL)
-#define STATUS_UNEXPECTED_MM_MAP_ERROR ((NTSTATUS)0xC00000EBL)
-#define STATUS_UNEXPECTED_MM_EXTEND_ERR ((NTSTATUS)0xC00000ECL)
-#define STATUS_NOT_LOGON_PROCESS ((NTSTATUS)0xC00000EDL)
-#define STATUS_LOGON_SESSION_EXISTS ((NTSTATUS)0xC00000EEL)
-#define STATUS_INVALID_PARAMETER_1 ((NTSTATUS)0xC00000EFL)
-#define STATUS_INVALID_PARAMETER_2 ((NTSTATUS)0xC00000F0L)
-#define STATUS_INVALID_PARAMETER_3 ((NTSTATUS)0xC00000F1L)
-#define STATUS_INVALID_PARAMETER_4 ((NTSTATUS)0xC00000F2L)
-#define STATUS_INVALID_PARAMETER_5 ((NTSTATUS)0xC00000F3L)
-#define STATUS_INVALID_PARAMETER_6 ((NTSTATUS)0xC00000F4L)
-#define STATUS_INVALID_PARAMETER_7 ((NTSTATUS)0xC00000F5L)
-#define STATUS_INVALID_PARAMETER_8 ((NTSTATUS)0xC00000F6L)
-#define STATUS_INVALID_PARAMETER_9 ((NTSTATUS)0xC00000F7L)
-#define STATUS_INVALID_PARAMETER_10 ((NTSTATUS)0xC00000F8L)
-#define STATUS_INVALID_PARAMETER_11 ((NTSTATUS)0xC00000F9L)
-#define STATUS_INVALID_PARAMETER_12 ((NTSTATUS)0xC00000FAL)
-#define STATUS_REDIRECTOR_NOT_STARTED ((NTSTATUS)0xC00000FBL)
-#define STATUS_REDIRECTOR_STARTED ((NTSTATUS)0xC00000FCL)
-#define STATUS_STACK_OVERFLOW ((NTSTATUS)0xC00000FDL)
-#define STATUS_NO_SUCH_PACKAGE ((NTSTATUS)0xC00000FEL)
-#define STATUS_BAD_FUNCTION_TABLE ((NTSTATUS)0xC00000FFL)
-#define STATUS_VARIABLE_NOT_FOUND ((NTSTATUS)0xC0000100L)
-#define STATUS_DIRECTORY_NOT_EMPTY ((NTSTATUS)0xC0000101L)
-#define STATUS_FILE_CORRUPT_ERROR ((NTSTATUS)0xC0000102L)
-#define STATUS_NOT_A_DIRECTORY ((NTSTATUS)0xC0000103L)
-#define STATUS_BAD_LOGON_SESSION_STATE ((NTSTATUS)0xC0000104L)
-#define STATUS_LOGON_SESSION_COLLISION ((NTSTATUS)0xC0000105L)
-#define STATUS_NAME_TOO_LONG ((NTSTATUS)0xC0000106L)
-#define STATUS_FILES_OPEN ((NTSTATUS)0xC0000107L)
-#define STATUS_CONNECTION_IN_USE ((NTSTATUS)0xC0000108L)
-#define STATUS_MESSAGE_NOT_FOUND ((NTSTATUS)0xC0000109L)
-#define STATUS_PROCESS_IS_TERMINATING ((NTSTATUS)0xC000010AL)
-#define STATUS_INVALID_LOGON_TYPE ((NTSTATUS)0xC000010BL)
-#define STATUS_NO_GUID_TRANSLATION ((NTSTATUS)0xC000010CL)
-#define STATUS_CANNOT_IMPERSONATE ((NTSTATUS)0xC000010DL)
-#define STATUS_IMAGE_ALREADY_LOADED ((NTSTATUS)0xC000010EL)
-#define STATUS_ABIOS_NOT_PRESENT ((NTSTATUS)0xC000010FL)
-#define STATUS_ABIOS_LID_NOT_EXIST ((NTSTATUS)0xC0000110L)
-#define STATUS_ABIOS_LID_ALREADY_OWNED ((NTSTATUS)0xC0000111L)
-#define STATUS_ABIOS_NOT_LID_OWNER ((NTSTATUS)0xC0000112L)
-#define STATUS_ABIOS_INVALID_COMMAND ((NTSTATUS)0xC0000113L)
-#define STATUS_ABIOS_INVALID_LID ((NTSTATUS)0xC0000114L)
-#define STATUS_ABIOS_SELECTOR_NOT_AVAILABLE ((NTSTATUS)0xC0000115L)
-#define STATUS_ABIOS_INVALID_SELECTOR ((NTSTATUS)0xC0000116L)
-#define STATUS_NO_LDT ((NTSTATUS)0xC0000117L)
-#define STATUS_INVALID_LDT_SIZE ((NTSTATUS)0xC0000118L)
-#define STATUS_INVALID_LDT_OFFSET ((NTSTATUS)0xC0000119L)
-#define STATUS_INVALID_LDT_DESCRIPTOR ((NTSTATUS)0xC000011AL)
-#define STATUS_INVALID_IMAGE_NE_FORMAT ((NTSTATUS)0xC000011BL)
-#define STATUS_RXACT_INVALID_STATE ((NTSTATUS)0xC000011CL)
-#define STATUS_RXACT_COMMIT_FAILURE ((NTSTATUS)0xC000011DL)
-#define STATUS_MAPPED_FILE_SIZE_ZERO ((NTSTATUS)0xC000011EL)
-#define STATUS_TOO_MANY_OPENED_FILES ((NTSTATUS)0xC000011FL)
-#define STATUS_CANCELLED ((NTSTATUS)0xC0000120L)
-#define STATUS_CANNOT_DELETE ((NTSTATUS)0xC0000121L)
-#define STATUS_INVALID_COMPUTER_NAME ((NTSTATUS)0xC0000122L)
-#define STATUS_FILE_DELETED ((NTSTATUS)0xC0000123L)
-#define STATUS_SPECIAL_ACCOUNT ((NTSTATUS)0xC0000124L)
-#define STATUS_SPECIAL_GROUP ((NTSTATUS)0xC0000125L)
-#define STATUS_SPECIAL_USER ((NTSTATUS)0xC0000126L)
-#define STATUS_MEMBERS_PRIMARY_GROUP ((NTSTATUS)0xC0000127L)
-#define STATUS_FILE_CLOSED ((NTSTATUS)0xC0000128L)
-#define STATUS_TOO_MANY_THREADS ((NTSTATUS)0xC0000129L)
-#define STATUS_THREAD_NOT_IN_PROCESS ((NTSTATUS)0xC000012AL)
-#define STATUS_TOKEN_ALREADY_IN_USE ((NTSTATUS)0xC000012BL)
-#define STATUS_PAGEFILE_QUOTA_EXCEEDED ((NTSTATUS)0xC000012CL)
-#define STATUS_COMMITMENT_LIMIT ((NTSTATUS)0xC000012DL)
-#define STATUS_INVALID_IMAGE_LE_FORMAT ((NTSTATUS)0xC000012EL)
-#define STATUS_INVALID_IMAGE_NOT_MZ ((NTSTATUS)0xC000012FL)
-#define STATUS_INVALID_IMAGE_PROTECT ((NTSTATUS)0xC0000130L)
-#define STATUS_INVALID_IMAGE_WIN_16 ((NTSTATUS)0xC0000131L)
-#define STATUS_LOGON_SERVER_CONFLICT ((NTSTATUS)0xC0000132L)
-#define STATUS_TIME_DIFFERENCE_AT_DC ((NTSTATUS)0xC0000133L)
-#define STATUS_SYNCHRONIZATION_REQUIRED ((NTSTATUS)0xC0000134L)
-#define STATUS_DLL_NOT_FOUND ((NTSTATUS)0xC0000135L)
-#define STATUS_OPEN_FAILED ((NTSTATUS)0xC0000136L)
-#define STATUS_IO_PRIVILEGE_FAILED ((NTSTATUS)0xC0000137L)
-#define STATUS_ORDINAL_NOT_FOUND ((NTSTATUS)0xC0000138L)
-#define STATUS_ENTRYPOINT_NOT_FOUND ((NTSTATUS)0xC0000139L)
-#define STATUS_CONTROL_C_EXIT ((NTSTATUS)0xC000013AL)
-#define STATUS_LOCAL_DISCONNECT ((NTSTATUS)0xC000013BL)
-#define STATUS_REMOTE_DISCONNECT ((NTSTATUS)0xC000013CL)
-#define STATUS_REMOTE_RESOURCES ((NTSTATUS)0xC000013DL)
-#define STATUS_LINK_FAILED ((NTSTATUS)0xC000013EL)
-#define STATUS_LINK_TIMEOUT ((NTSTATUS)0xC000013FL)
-#define STATUS_INVALID_CONNECTION ((NTSTATUS)0xC0000140L)
-#define STATUS_INVALID_ADDRESS ((NTSTATUS)0xC0000141L)
-#define STATUS_DLL_INIT_FAILED ((NTSTATUS)0xC0000142L)
-#define STATUS_MISSING_SYSTEMFILE ((NTSTATUS)0xC0000143L)
-#define STATUS_UNHANDLED_EXCEPTION ((NTSTATUS)0xC0000144L)
-#define STATUS_APP_INIT_FAILURE ((NTSTATUS)0xC0000145L)
-#define STATUS_PAGEFILE_CREATE_FAILED ((NTSTATUS)0xC0000146L)
-#define STATUS_NO_PAGEFILE ((NTSTATUS)0xC0000147L)
-#define STATUS_INVALID_LEVEL ((NTSTATUS)0xC0000148L)
-#define STATUS_WRONG_PASSWORD_CORE ((NTSTATUS)0xC0000149L)
-#define STATUS_ILLEGAL_FLOAT_CONTEXT ((NTSTATUS)0xC000014AL)
-#define STATUS_PIPE_BROKEN ((NTSTATUS)0xC000014BL)
-#define STATUS_REGISTRY_CORRUPT ((NTSTATUS)0xC000014CL)
-#define STATUS_REGISTRY_IO_FAILED ((NTSTATUS)0xC000014DL)
-#define STATUS_NO_EVENT_PAIR ((NTSTATUS)0xC000014EL)
-#define STATUS_UNRECOGNIZED_VOLUME ((NTSTATUS)0xC000014FL)
-#define STATUS_SERIAL_NO_DEVICE_INITED ((NTSTATUS)0xC0000150L)
-#define STATUS_NO_SUCH_ALIAS ((NTSTATUS)0xC0000151L)
-#define STATUS_MEMBER_NOT_IN_ALIAS ((NTSTATUS)0xC0000152L)
-#define STATUS_MEMBER_IN_ALIAS ((NTSTATUS)0xC0000153L)
-#define STATUS_ALIAS_EXISTS ((NTSTATUS)0xC0000154L)
-#define STATUS_LOGON_NOT_GRANTED ((NTSTATUS)0xC0000155L)
-#define STATUS_TOO_MANY_SECRETS ((NTSTATUS)0xC0000156L)
-#define STATUS_SECRET_TOO_LONG ((NTSTATUS)0xC0000157L)
-#define STATUS_INTERNAL_DB_ERROR ((NTSTATUS)0xC0000158L)
-#define STATUS_FULLSCREEN_MODE ((NTSTATUS)0xC0000159L)
-#define STATUS_TOO_MANY_CONTEXT_IDS ((NTSTATUS)0xC000015AL)
-#define STATUS_LOGON_TYPE_NOT_GRANTED ((NTSTATUS)0xC000015BL)
-#define STATUS_NOT_REGISTRY_FILE ((NTSTATUS)0xC000015CL)
-#define STATUS_NT_CROSS_ENCRYPTION_REQUIRED ((NTSTATUS)0xC000015DL)
-#define STATUS_DOMAIN_CTRLR_CONFIG_ERROR ((NTSTATUS)0xC000015EL)
-#define STATUS_FT_MISSING_MEMBER ((NTSTATUS)0xC000015FL)
-#define STATUS_ILL_FORMED_SERVICE_ENTRY ((NTSTATUS)0xC0000160L)
-#define STATUS_ILLEGAL_CHARACTER ((NTSTATUS)0xC0000161L)
-#define STATUS_UNMAPPABLE_CHARACTER ((NTSTATUS)0xC0000162L)
-#define STATUS_UNDEFINED_CHARACTER ((NTSTATUS)0xC0000163L)
-#define STATUS_FLOPPY_VOLUME ((NTSTATUS)0xC0000164L)
-#define STATUS_FLOPPY_ID_MARK_NOT_FOUND ((NTSTATUS)0xC0000165L)
-#define STATUS_FLOPPY_WRONG_CYLINDER ((NTSTATUS)0xC0000166L)
-#define STATUS_FLOPPY_UNKNOWN_ERROR ((NTSTATUS)0xC0000167L)
-#define STATUS_FLOPPY_BAD_REGISTERS ((NTSTATUS)0xC0000168L)
-#define STATUS_DISK_RECALIBRATE_FAILED ((NTSTATUS)0xC0000169L)
-#define STATUS_DISK_OPERATION_FAILED ((NTSTATUS)0xC000016AL)
-#define STATUS_DISK_RESET_FAILED ((NTSTATUS)0xC000016BL)
-#define STATUS_SHARED_IRQ_BUSY ((NTSTATUS)0xC000016CL)
-#define STATUS_FT_ORPHANING ((NTSTATUS)0xC000016DL)
-#define STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT ((NTSTATUS)0xC000016EL)
-#define STATUS_PARTITION_FAILURE ((NTSTATUS)0xC0000172L)
-#define STATUS_INVALID_BLOCK_LENGTH ((NTSTATUS)0xC0000173L)
-#define STATUS_DEVICE_NOT_PARTITIONED ((NTSTATUS)0xC0000174L)
-#define STATUS_UNABLE_TO_LOCK_MEDIA ((NTSTATUS)0xC0000175L)
-#define STATUS_UNABLE_TO_UNLOAD_MEDIA ((NTSTATUS)0xC0000176L)
-#define STATUS_EOM_OVERFLOW ((NTSTATUS)0xC0000177L)
-#define STATUS_NO_MEDIA ((NTSTATUS)0xC0000178L)
-#define STATUS_NO_SUCH_MEMBER ((NTSTATUS)0xC000017AL)
-#define STATUS_INVALID_MEMBER ((NTSTATUS)0xC000017BL)
-#define STATUS_KEY_DELETED ((NTSTATUS)0xC000017CL)
-#define STATUS_NO_LOG_SPACE ((NTSTATUS)0xC000017DL)
-#define STATUS_TOO_MANY_SIDS ((NTSTATUS)0xC000017EL)
-#define STATUS_LM_CROSS_ENCRYPTION_REQUIRED ((NTSTATUS)0xC000017FL)
-#define STATUS_KEY_HAS_CHILDREN ((NTSTATUS)0xC0000180L)
-#define STATUS_CHILD_MUST_BE_VOLATILE ((NTSTATUS)0xC0000181L)
-#define STATUS_DEVICE_CONFIGURATION_ERROR ((NTSTATUS)0xC0000182L)
-#define STATUS_DRIVER_INTERNAL_ERROR ((NTSTATUS)0xC0000183L)
-#define STATUS_INVALID_DEVICE_STATE ((NTSTATUS)0xC0000184L)
-#define STATUS_IO_DEVICE_ERROR ((NTSTATUS)0xC0000185L)
-#define STATUS_DEVICE_PROTOCOL_ERROR ((NTSTATUS)0xC0000186L)
-#define STATUS_BACKUP_CONTROLLER ((NTSTATUS)0xC0000187L)
-#define STATUS_LOG_FILE_FULL ((NTSTATUS)0xC0000188L)
-#define STATUS_TOO_LATE ((NTSTATUS)0xC0000189L)
-#define STATUS_NO_TRUST_LSA_SECRET ((NTSTATUS)0xC000018AL)
-#define STATUS_NO_TRUST_SAM_ACCOUNT ((NTSTATUS)0xC000018BL)
-#define STATUS_TRUSTED_DOMAIN_FAILURE ((NTSTATUS)0xC000018CL)
-#define STATUS_TRUSTED_RELATIONSHIP_FAILURE ((NTSTATUS)0xC000018DL)
-#define STATUS_EVENTLOG_FILE_CORRUPT ((NTSTATUS)0xC000018EL)
-#define STATUS_EVENTLOG_CANT_START ((NTSTATUS)0xC000018FL)
-#define STATUS_TRUST_FAILURE ((NTSTATUS)0xC0000190L)
-#define STATUS_MUTANT_LIMIT_EXCEEDED ((NTSTATUS)0xC0000191L)
-#define STATUS_NETLOGON_NOT_STARTED ((NTSTATUS)0xC0000192L)
-#define STATUS_ACCOUNT_EXPIRED ((NTSTATUS)0xC0000193L)
-#define STATUS_POSSIBLE_DEADLOCK ((NTSTATUS)0xC0000194L)
-#define STATUS_NETWORK_CREDENTIAL_CONFLICT ((NTSTATUS)0xC0000195L)
-#define STATUS_REMOTE_SESSION_LIMIT ((NTSTATUS)0xC0000196L)
-#define STATUS_EVENTLOG_FILE_CHANGED ((NTSTATUS)0xC0000197L)
-#define STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT ((NTSTATUS)0xC0000198L)
-#define STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT ((NTSTATUS)0xC0000199L)
-#define STATUS_NOLOGON_SERVER_TRUST_ACCOUNT ((NTSTATUS)0xC000019AL)
-#define STATUS_DOMAIN_TRUST_INCONSISTENT ((NTSTATUS)0xC000019BL)
-#define STATUS_FS_DRIVER_REQUIRED ((NTSTATUS)0xC000019CL)
-#define STATUS_NO_USER_SESSION_KEY ((NTSTATUS)0xC0000202L)
-#define STATUS_USER_SESSION_DELETED ((NTSTATUS)0xC0000203L)
-#define STATUS_RESOURCE_LANG_NOT_FOUND ((NTSTATUS)0xC0000204L)
-#define STATUS_INSUFF_SERVER_RESOURCES ((NTSTATUS)0xC0000205L)
-#define STATUS_INVALID_BUFFER_SIZE ((NTSTATUS)0xC0000206L)
-#define STATUS_INVALID_ADDRESS_COMPONENT ((NTSTATUS)0xC0000207L)
-#define STATUS_INVALID_ADDRESS_WILDCARD ((NTSTATUS)0xC0000208L)
-#define STATUS_TOO_MANY_ADDRESSES ((NTSTATUS)0xC0000209L)
-#define STATUS_ADDRESS_ALREADY_EXISTS ((NTSTATUS)0xC000020AL)
-#define STATUS_ADDRESS_CLOSED ((NTSTATUS)0xC000020BL)
-#define STATUS_CONNECTION_DISCONNECTED ((NTSTATUS)0xC000020CL)
-#define STATUS_CONNECTION_RESET ((NTSTATUS)0xC000020DL)
-#define STATUS_TOO_MANY_NODES ((NTSTATUS)0xC000020EL)
-#define STATUS_TRANSACTION_ABORTED ((NTSTATUS)0xC000020FL)
-#define STATUS_TRANSACTION_TIMED_OUT ((NTSTATUS)0xC0000210L)
-#define STATUS_TRANSACTION_NO_RELEASE ((NTSTATUS)0xC0000211L)
-#define STATUS_TRANSACTION_NO_MATCH ((NTSTATUS)0xC0000212L)
-#define STATUS_TRANSACTION_RESPONDED ((NTSTATUS)0xC0000213L)
-#define STATUS_TRANSACTION_INVALID_ID ((NTSTATUS)0xC0000214L)
-#define STATUS_TRANSACTION_INVALID_TYPE ((NTSTATUS)0xC0000215L)
-#define STATUS_NOT_SERVER_SESSION ((NTSTATUS)0xC0000216L)
-#define STATUS_NOT_CLIENT_SESSION ((NTSTATUS)0xC0000217L)
-#define STATUS_CANNOT_LOAD_REGISTRY_FILE ((NTSTATUS)0xC0000218L)
-#define STATUS_DEBUG_ATTACH_FAILED ((NTSTATUS)0xC0000219L)
-#define STATUS_SYSTEM_PROCESS_TERMINATED ((NTSTATUS)0xC000021AL)
-#define STATUS_DATA_NOT_ACCEPTED ((NTSTATUS)0xC000021BL)
-#define STATUS_NO_BROWSER_SERVERS_FOUND ((NTSTATUS)0xC000021CL)
-#define STATUS_VDM_HARD_ERROR ((NTSTATUS)0xC000021DL)
-#define STATUS_DRIVER_CANCEL_TIMEOUT ((NTSTATUS)0xC000021EL)
-#define STATUS_REPLY_MESSAGE_MISMATCH ((NTSTATUS)0xC000021FL)
-#define STATUS_MAPPED_ALIGNMENT ((NTSTATUS)0xC0000220L)
-#define STATUS_IMAGE_CHECKSUM_MISMATCH ((NTSTATUS)0xC0000221L)
-#define STATUS_LOST_WRITEBEHIND_DATA ((NTSTATUS)0xC0000222L)
-#define STATUS_CLIENT_SERVER_PARAMETERS_INVALID ((NTSTATUS)0xC0000223L)
-#define STATUS_PASSWORD_MUST_CHANGE ((NTSTATUS)0xC0000224L)
-#define STATUS_NOT_FOUND ((NTSTATUS)0xC0000225L)
-#define STATUS_NOT_TINY_STREAM ((NTSTATUS)0xC0000226L)
-#define STATUS_RECOVERY_FAILURE ((NTSTATUS)0xC0000227L)
-#define STATUS_STACK_OVERFLOW_READ ((NTSTATUS)0xC0000228L)
-#define STATUS_FAIL_CHECK ((NTSTATUS)0xC0000229L)
-#define STATUS_DUPLICATE_OBJECTID ((NTSTATUS)0xC000022AL)
-#define STATUS_OBJECTID_EXISTS ((NTSTATUS)0xC000022BL)
-#define STATUS_CONVERT_TO_LARGE ((NTSTATUS)0xC000022CL)
-#define STATUS_RETRY ((NTSTATUS)0xC000022DL)
-#define STATUS_FOUND_OUT_OF_SCOPE ((NTSTATUS)0xC000022EL)
-#define STATUS_ALLOCATE_BUCKET ((NTSTATUS)0xC000022FL)
-#define STATUS_PROPSET_NOT_FOUND ((NTSTATUS)0xC0000230L)
-#define STATUS_MARSHALL_OVERFLOW ((NTSTATUS)0xC0000231L)
-#define STATUS_INVALID_VARIANT ((NTSTATUS)0xC0000232L)
-#define STATUS_DOMAIN_CONTROLLER_NOT_FOUND ((NTSTATUS)0xC0000233L)
-#define STATUS_ACCOUNT_LOCKED_OUT ((NTSTATUS)0xC0000234L)
-#define STATUS_HANDLE_NOT_CLOSABLE ((NTSTATUS)0xC0000235L)
-#define STATUS_CONNECTION_REFUSED ((NTSTATUS)0xC0000236L)
-#define STATUS_GRACEFUL_DISCONNECT ((NTSTATUS)0xC0000237L)
-#define STATUS_ADDRESS_ALREADY_ASSOCIATED ((NTSTATUS)0xC0000238L)
-#define STATUS_ADDRESS_NOT_ASSOCIATED ((NTSTATUS)0xC0000239L)
-#define STATUS_CONNECTION_INVALID ((NTSTATUS)0xC000023AL)
-#define STATUS_CONNECTION_ACTIVE ((NTSTATUS)0xC000023BL)
-#define STATUS_NETWORK_UNREACHABLE ((NTSTATUS)0xC000023CL)
-#define STATUS_HOST_UNREACHABLE ((NTSTATUS)0xC000023DL)
-#define STATUS_PROTOCOL_UNREACHABLE ((NTSTATUS)0xC000023EL)
-#define STATUS_PORT_UNREACHABLE ((NTSTATUS)0xC000023FL)
-#define STATUS_REQUEST_ABORTED ((NTSTATUS)0xC0000240L)
-#define STATUS_CONNECTION_ABORTED ((NTSTATUS)0xC0000241L)
-#define STATUS_BAD_COMPRESSION_BUFFER ((NTSTATUS)0xC0000242L)
-#define STATUS_USER_MAPPED_FILE ((NTSTATUS)0xC0000243L)
-#define STATUS_AUDIT_FAILED ((NTSTATUS)0xC0000244L)
-#define STATUS_TIMER_RESOLUTION_NOT_SET ((NTSTATUS)0xC0000245L)
-#define STATUS_CONNECTION_COUNT_LIMIT ((NTSTATUS)0xC0000246L)
-#define STATUS_LOGIN_TIME_RESTRICTION ((NTSTATUS)0xC0000247L)
-#define STATUS_LOGIN_WKSTA_RESTRICTION ((NTSTATUS)0xC0000248L)
-#define STATUS_IMAGE_MP_UP_MISMATCH ((NTSTATUS)0xC0000249L)
-#define STATUS_INSUFFICIENT_LOGON_INFO ((NTSTATUS)0xC0000250L)
-#define STATUS_BAD_DLL_ENTRYPOINT ((NTSTATUS)0xC0000251L)
-#define STATUS_BAD_SERVICE_ENTRYPOINT ((NTSTATUS)0xC0000252L)
-#define STATUS_LPC_REPLY_LOST ((NTSTATUS)0xC0000253L)
-#define STATUS_IP_ADDRESS_CONFLICT1 ((NTSTATUS)0xC0000254L)
-#define STATUS_IP_ADDRESS_CONFLICT2 ((NTSTATUS)0xC0000255L)
-#define STATUS_REGISTRY_QUOTA_LIMIT ((NTSTATUS)0xC0000256L)
-#define STATUS_PATH_NOT_COVERED ((NTSTATUS)0xC0000257L)
-#define STATUS_NO_CALLBACK_ACTIVE ((NTSTATUS)0xC0000258L)
-#define STATUS_LICENSE_QUOTA_EXCEEDED ((NTSTATUS)0xC0000259L)
-#define STATUS_PWD_TOO_SHORT ((NTSTATUS)0xC000025AL)
-#define STATUS_PWD_TOO_RECENT ((NTSTATUS)0xC000025BL)
-#define STATUS_PWD_HISTORY_CONFLICT ((NTSTATUS)0xC000025CL)
-#define STATUS_PLUGPLAY_NO_DEVICE ((NTSTATUS)0xC000025EL)
-#define STATUS_UNSUPPORTED_COMPRESSION ((NTSTATUS)0xC000025FL)
-#define STATUS_INVALID_HW_PROFILE ((NTSTATUS)0xC0000260L)
-#define STATUS_INVALID_PLUGPLAY_DEVICE_PATH ((NTSTATUS)0xC0000261L)
-#define STATUS_DRIVER_ORDINAL_NOT_FOUND ((NTSTATUS)0xC0000262L)
-#define STATUS_DRIVER_ENTRYPOINT_NOT_FOUND ((NTSTATUS)0xC0000263L)
-#define STATUS_RESOURCE_NOT_OWNED ((NTSTATUS)0xC0000264L)
-#define STATUS_TOO_MANY_LINKS ((NTSTATUS)0xC0000265L)
-#define STATUS_QUOTA_LIST_INCONSISTENT ((NTSTATUS)0xC0000266L)
-#define STATUS_FILE_IS_OFFLINE ((NTSTATUS)0xC0000267L)
-#define STATUS_EVALUATION_EXPIRATION ((NTSTATUS)0xC0000268L)
-#define STATUS_ILLEGAL_DLL_RELOCATION ((NTSTATUS)0xC0000269L)
-#define STATUS_LICENSE_VIOLATION ((NTSTATUS)0xC000026AL)
-#define STATUS_DLL_INIT_FAILED_LOGOFF ((NTSTATUS)0xC000026BL)
-#define STATUS_DRIVER_UNABLE_TO_LOAD ((NTSTATUS)0xC000026CL)
-#define STATUS_DFS_UNAVAILABLE ((NTSTATUS)0xC000026DL)
-#define STATUS_VOLUME_DISMOUNTED ((NTSTATUS)0xC000026EL)
-#define STATUS_WX86_INTERNAL_ERROR ((NTSTATUS)0xC000026FL)
-#define STATUS_WX86_FLOAT_STACK_CHECK ((NTSTATUS)0xC0000270L)
-#define STATUS_VALIDATE_CONTINUE ((NTSTATUS)0xC0000271L)
-#define STATUS_NO_MATCH ((NTSTATUS)0xC0000272L)
-#define STATUS_NO_MORE_MATCHES ((NTSTATUS)0xC0000273L)
-#define STATUS_NOT_A_REPARSE_POINT ((NTSTATUS)0xC0000275L)
-#define STATUS_IO_REPARSE_TAG_INVALID ((NTSTATUS)0xC0000276L)
-#define STATUS_IO_REPARSE_TAG_MISMATCH ((NTSTATUS)0xC0000277L)
-#define STATUS_IO_REPARSE_DATA_INVALID ((NTSTATUS)0xC0000278L)
-#define STATUS_IO_REPARSE_TAG_NOT_HANDLED ((NTSTATUS)0xC0000279L)
-#define STATUS_REPARSE_POINT_NOT_RESOLVED ((NTSTATUS)0xC0000280L)
-#define STATUS_DIRECTORY_IS_A_REPARSE_POINT ((NTSTATUS)0xC0000281L)
-#define STATUS_RANGE_LIST_CONFLICT ((NTSTATUS)0xC0000282L)
-#define STATUS_SOURCE_ELEMENT_EMPTY ((NTSTATUS)0xC0000283L)
-#define STATUS_DESTINATION_ELEMENT_FULL ((NTSTATUS)0xC0000284L)
-#define STATUS_ILLEGAL_ELEMENT_ADDRESS ((NTSTATUS)0xC0000285L)
-#define STATUS_MAGAZINE_NOT_PRESENT ((NTSTATUS)0xC0000286L)
-#define STATUS_REINITIALIZATION_NEEDED ((NTSTATUS)0xC0000287L)
-#define STATUS_DEVICE_REQUIRES_CLEANING ((NTSTATUS)0x80000288L)
-#define STATUS_DEVICE_DOOR_OPEN ((NTSTATUS)0x80000289L)
-#define STATUS_ENCRYPTION_FAILED ((NTSTATUS)0xC000028AL)
-#define STATUS_DECRYPTION_FAILED ((NTSTATUS)0xC000028BL)
-#define STATUS_RANGE_NOT_FOUND ((NTSTATUS)0xC000028CL)
-#define STATUS_NO_RECOVERY_POLICY ((NTSTATUS)0xC000028DL)
-#define STATUS_NO_EFS ((NTSTATUS)0xC000028EL)
-#define STATUS_WRONG_EFS ((NTSTATUS)0xC000028FL)
-#define STATUS_NO_USER_KEYS ((NTSTATUS)0xC0000290L)
-#define STATUS_FILE_NOT_ENCRYPTED ((NTSTATUS)0xC0000291L)
-#define STATUS_NOT_EXPORT_FORMAT ((NTSTATUS)0xC0000292L)
-#define STATUS_FILE_ENCRYPTED ((NTSTATUS)0xC0000293L)
-#define STATUS_WAKE_SYSTEM ((NTSTATUS)0x40000294L)
-#define STATUS_WMI_GUID_NOT_FOUND ((NTSTATUS)0xC0000295L)
-#define STATUS_WMI_INSTANCE_NOT_FOUND ((NTSTATUS)0xC0000296L)
-#define STATUS_WMI_ITEMID_NOT_FOUND ((NTSTATUS)0xC0000297L)
-#define STATUS_WMI_TRY_AGAIN ((NTSTATUS)0xC0000298L)
-#define STATUS_SHARED_POLICY ((NTSTATUS)0xC0000299L)
-#define STATUS_POLICY_OBJECT_NOT_FOUND ((NTSTATUS)0xC000029AL)
-#define STATUS_POLICY_ONLY_IN_DS ((NTSTATUS)0xC000029BL)
-#define STATUS_VOLUME_NOT_UPGRADED ((NTSTATUS)0xC000029CL)
-#define STATUS_REMOTE_STORAGE_NOT_ACTIVE ((NTSTATUS)0xC000029DL)
-#define STATUS_REMOTE_STORAGE_MEDIA_ERROR ((NTSTATUS)0xC000029EL)
-#define STATUS_NO_TRACKING_SERVICE ((NTSTATUS)0xC000029FL)
-#define STATUS_SERVER_SID_MISMATCH ((NTSTATUS)0xC00002A0L)
-#define STATUS_DS_NO_ATTRIBUTE_OR_VALUE ((NTSTATUS)0xC00002A1L)
-#define STATUS_DS_INVALID_ATTRIBUTE_SYNTAX ((NTSTATUS)0xC00002A2L)
-#define STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED ((NTSTATUS)0xC00002A3L)
-#define STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS ((NTSTATUS)0xC00002A4L)
-#define STATUS_DS_BUSY ((NTSTATUS)0xC00002A5L)
-#define STATUS_DS_UNAVAILABLE ((NTSTATUS)0xC00002A6L)
-#define STATUS_DS_NO_RIDS_ALLOCATED ((NTSTATUS)0xC00002A7L)
-#define STATUS_DS_NO_MORE_RIDS ((NTSTATUS)0xC00002A8L)
-#define STATUS_DS_INCORRECT_ROLE_OWNER ((NTSTATUS)0xC00002A9L)
-#define STATUS_DS_RIDMGR_INIT_ERROR ((NTSTATUS)0xC00002AAL)
-#define STATUS_DS_OBJ_CLASS_VIOLATION ((NTSTATUS)0xC00002ABL)
-#define STATUS_DS_CANT_ON_NON_LEAF ((NTSTATUS)0xC00002ACL)
-#define STATUS_DS_CANT_ON_RDN ((NTSTATUS)0xC00002ADL)
-#define STATUS_DS_CANT_MOD_OBJ_CLASS ((NTSTATUS)0xC00002AEL)
-#define STATUS_DS_CROSS_DOM_MOVE_FAILED ((NTSTATUS)0xC00002AFL)
-#define STATUS_DS_GC_NOT_AVAILABLE ((NTSTATUS)0xC00002B0L)
-#define STATUS_DIRECTORY_SERVICE_REQUIRED ((NTSTATUS)0xC00002B1L)
-#define STATUS_REPARSE_ATTRIBUTE_CONFLICT ((NTSTATUS)0xC00002B2L)
-#define STATUS_CANT_ENABLE_DENY_ONLY ((NTSTATUS)0xC00002B3L)
-#define STATUS_FLOAT_MULTIPLE_FAULTS ((NTSTATUS)0xC00002B4L)
-#define STATUS_FLOAT_MULTIPLE_TRAPS ((NTSTATUS)0xC00002B5L)
-#define STATUS_DEVICE_REMOVED ((NTSTATUS)0xC00002B6L)
-#define STATUS_JOURNAL_DELETE_IN_PROGRESS ((NTSTATUS)0xC00002B7L)
-#define STATUS_JOURNAL_NOT_ACTIVE ((NTSTATUS)0xC00002B8L)
-#define STATUS_NOINTERFACE ((NTSTATUS)0xC00002B9L)
-#define STATUS_DS_ADMIN_LIMIT_EXCEEDED ((NTSTATUS)0xC00002C1L)
-#define STATUS_DRIVER_FAILED_SLEEP ((NTSTATUS)0xC00002C2L)
-#define STATUS_MUTUAL_AUTHENTICATION_FAILED ((NTSTATUS)0xC00002C3L)
-#define STATUS_CORRUPT_SYSTEM_FILE ((NTSTATUS)0xC00002C4L)
-#define STATUS_DATATYPE_MISALIGNMENT_ERROR ((NTSTATUS)0xC00002C5L)
-#define STATUS_WMI_READ_ONLY ((NTSTATUS)0xC00002C6L)
-#define STATUS_WMI_SET_FAILURE ((NTSTATUS)0xC00002C7L)
-#define STATUS_COMMITMENT_MINIMUM ((NTSTATUS)0xC00002C8L)
-#define STATUS_REG_NAT_CONSUMPTION ((NTSTATUS)0xC00002C9L)
-#define STATUS_TRANSPORT_FULL ((NTSTATUS)0xC00002CAL)
-#define STATUS_DS_SAM_INIT_FAILURE ((NTSTATUS)0xC00002CBL)
-#define STATUS_ONLY_IF_CONNECTED ((NTSTATUS)0xC00002CCL)
-#define STATUS_DS_SENSITIVE_GROUP_VIOLATION ((NTSTATUS)0xC00002CDL)
-#define STATUS_PNP_RESTART_ENUMERATION ((NTSTATUS)0xC00002CEL)
-#define STATUS_JOURNAL_ENTRY_DELETED ((NTSTATUS)0xC00002CFL)
-#define STATUS_DS_CANT_MOD_PRIMARYGROUPID ((NTSTATUS)0xC00002D0L)
-#define STATUS_SYSTEM_IMAGE_BAD_SIGNATURE ((NTSTATUS)0xC00002D1L)
-#define STATUS_PNP_REBOOT_REQUIRED ((NTSTATUS)0xC00002D2L)
-#define STATUS_POWER_STATE_INVALID ((NTSTATUS)0xC00002D3L)
-#define STATUS_DS_INVALID_GROUP_TYPE ((NTSTATUS)0xC00002D4L)
-#define STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN ((NTSTATUS)0xC00002D5L)
-#define STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN ((NTSTATUS)0xC00002D6L)
-#define STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER ((NTSTATUS)0xC00002D7L)
-#define STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER ((NTSTATUS)0xC00002D8L)
-#define STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER ((NTSTATUS)0xC00002D9L)
-#define STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER ((NTSTATUS)0xC00002DAL)
-#define STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER ((NTSTATUS)0xC00002DBL)
-#define STATUS_DS_HAVE_PRIMARY_MEMBERS ((NTSTATUS)0xC00002DCL)
-#define STATUS_WMI_NOT_SUPPORTED ((NTSTATUS)0xC00002DDL)
-#define STATUS_INSUFFICIENT_POWER ((NTSTATUS)0xC00002DEL)
-#define STATUS_SAM_NEED_BOOTKEY_PASSWORD ((NTSTATUS)0xC00002DFL)
-#define STATUS_SAM_NEED_BOOTKEY_FLOPPY ((NTSTATUS)0xC00002E0L)
-#define STATUS_DS_CANT_START ((NTSTATUS)0xC00002E1L)
-#define STATUS_DS_INIT_FAILURE ((NTSTATUS)0xC00002E2L)
-#define STATUS_SAM_INIT_FAILURE ((NTSTATUS)0xC00002E3L)
-#define STATUS_DS_GC_REQUIRED ((NTSTATUS)0xC00002E4L)
-#define STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY ((NTSTATUS)0xC00002E5L)
-#define STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS ((NTSTATUS)0xC00002E6L)
-#define STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED ((NTSTATUS)0xC00002E7L)
-#define STATUS_MULTIPLE_FAULT_VIOLATION ((NTSTATUS)0xC00002E8L)
-#define STATUS_CURRENT_DOMAIN_NOT_ALLOWED ((NTSTATUS)0xC00002E9L)
-#define STATUS_CANNOT_MAKE ((NTSTATUS)0xC00002EAL)
-#define STATUS_SYSTEM_SHUTDOWN ((NTSTATUS)0xC00002EBL)
-#define STATUS_DS_INIT_FAILURE_CONSOLE ((NTSTATUS)0xC00002ECL)
-#define STATUS_DS_SAM_INIT_FAILURE_CONSOLE ((NTSTATUS)0xC00002EDL)
-#define STATUS_UNFINISHED_CONTEXT_DELETED ((NTSTATUS)0xC00002EEL)
-#define STATUS_NO_TGT_REPLY ((NTSTATUS)0xC00002EFL)
-#define STATUS_OBJECTID_NOT_FOUND ((NTSTATUS)0xC00002F0L)
-#define STATUS_NO_IP_ADDRESSES ((NTSTATUS)0xC00002F1L)
-#define STATUS_WRONG_CREDENTIAL_HANDLE ((NTSTATUS)0xC00002F2L)
-#define STATUS_CRYPTO_SYSTEM_INVALID ((NTSTATUS)0xC00002F3L)
-#define STATUS_MAX_REFERRALS_EXCEEDED ((NTSTATUS)0xC00002F4L)
-#define STATUS_MUST_BE_KDC ((NTSTATUS)0xC00002F5L)
-#define STATUS_STRONG_CRYPTO_NOT_SUPPORTED ((NTSTATUS)0xC00002F6L)
-#define STATUS_TOO_MANY_PRINCIPALS ((NTSTATUS)0xC00002F7L)
-#define STATUS_NO_PA_DATA ((NTSTATUS)0xC00002F8L)
-#define STATUS_PKINIT_NAME_MISMATCH ((NTSTATUS)0xC00002F9L)
-#define STATUS_SMARTCARD_LOGON_REQUIRED ((NTSTATUS)0xC00002FAL)
-#define STATUS_KDC_INVALID_REQUEST ((NTSTATUS)0xC00002FBL)
-#define STATUS_KDC_UNABLE_TO_REFER ((NTSTATUS)0xC00002FCL)
-#define STATUS_KDC_UNKNOWN_ETYPE ((NTSTATUS)0xC00002FDL)
-#define STATUS_SHUTDOWN_IN_PROGRESS ((NTSTATUS)0xC00002FEL)
-#define STATUS_SERVER_SHUTDOWN_IN_PROGRESS ((NTSTATUS)0xC00002FFL)
-#define STATUS_NOT_SUPPORTED_ON_SBS ((NTSTATUS)0xC0000300L)
-#define STATUS_WMI_GUID_DISCONNECTED ((NTSTATUS)0xC0000301L)
-#define STATUS_WMI_ALREADY_DISABLED ((NTSTATUS)0xC0000302L)
-#define STATUS_WMI_ALREADY_ENABLED ((NTSTATUS)0xC0000303L)
-#define STATUS_MFT_TOO_FRAGMENTED ((NTSTATUS)0xC0000304L)
-#define STATUS_COPY_PROTECTION_FAILURE ((NTSTATUS)0xC0000305L)
-#define STATUS_CSS_AUTHENTICATION_FAILURE ((NTSTATUS)0xC0000306L)
-#define STATUS_CSS_KEY_NOT_PRESENT ((NTSTATUS)0xC0000307L)
-#define STATUS_CSS_KEY_NOT_ESTABLISHED ((NTSTATUS)0xC0000308L)
-#define STATUS_CSS_SCRAMBLED_SECTOR ((NTSTATUS)0xC0000309L)
-#define STATUS_CSS_REGION_MISMATCH ((NTSTATUS)0xC000030AL)
-#define STATUS_CSS_RESETS_EXHAUSTED ((NTSTATUS)0xC000030BL)
-#define STATUS_PKINIT_FAILURE ((NTSTATUS)0xC0000320L)
-#define STATUS_SMARTCARD_SUBSYSTEM_FAILURE ((NTSTATUS)0xC0000321L)
-#define STATUS_NO_KERB_KEY ((NTSTATUS)0xC0000322L)
-#define STATUS_HOST_DOWN ((NTSTATUS)0xC0000350L)
-#define STATUS_UNSUPPORTED_PREAUTH ((NTSTATUS)0xC0000351L)
-#define STATUS_EFS_ALG_BLOB_TOO_BIG ((NTSTATUS)0xC0000352L)
-#define STATUS_PORT_NOT_SET ((NTSTATUS)0xC0000353L)
-#define STATUS_DEBUGGER_INACTIVE ((NTSTATUS)0xC0000354L)
-#define STATUS_DS_VERSION_CHECK_FAILURE ((NTSTATUS)0xC0000355L)
-#define STATUS_AUDITING_DISABLED ((NTSTATUS)0xC0000356L)
-#define STATUS_PRENT4_MACHINE_ACCOUNT ((NTSTATUS)0xC0000357L)
-#define STATUS_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER ((NTSTATUS)0xC0000358L)
-#define STATUS_INVALID_IMAGE_WIN_32 ((NTSTATUS)0xC0000359L)
-#define STATUS_INVALID_IMAGE_WIN_64 ((NTSTATUS)0xC000035AL)
-#define STATUS_BAD_BINDINGS ((NTSTATUS)0xC000035BL)
-#define STATUS_NETWORK_SESSION_EXPIRED ((NTSTATUS)0xC000035CL)
-#define STATUS_APPHELP_BLOCK ((NTSTATUS)0xC000035DL)
-#define STATUS_ALL_SIDS_FILTERED ((NTSTATUS)0xC000035EL)
-#define STATUS_NOT_SAFE_MODE_DRIVER ((NTSTATUS)0xC000035FL)
-#define STATUS_ACCESS_DISABLED_BY_POLICY_DEFAULT ((NTSTATUS)0xC0000361L)
-#define STATUS_ACCESS_DISABLED_BY_POLICY_PATH ((NTSTATUS)0xC0000362L)
-#define STATUS_ACCESS_DISABLED_BY_POLICY_PUBLISHER ((NTSTATUS)0xC0000363L)
-#define STATUS_ACCESS_DISABLED_BY_POLICY_OTHER ((NTSTATUS)0xC0000364L)
-#define STATUS_FAILED_DRIVER_ENTRY ((NTSTATUS)0xC0000365L)
-#define STATUS_DEVICE_ENUMERATION_ERROR ((NTSTATUS)0xC0000366L)
-#define STATUS_WAIT_FOR_OPLOCK ((NTSTATUS)0x00000367L)
-#define STATUS_MOUNT_POINT_NOT_RESOLVED ((NTSTATUS)0xC0000368L)
-#define STATUS_INVALID_DEVICE_OBJECT_PARAMETER ((NTSTATUS)0xC0000369L)
-#define STATUS_MCA_OCCURED ((NTSTATUS)0xC000036AL)
-#define STATUS_DRIVER_BLOCKED_CRITICAL ((NTSTATUS)0xC000036BL)
-#define STATUS_DRIVER_BLOCKED ((NTSTATUS)0xC000036CL)
-#define STATUS_DRIVER_DATABASE_ERROR ((NTSTATUS)0xC000036DL)
-#define STATUS_SYSTEM_HIVE_TOO_LARGE ((NTSTATUS)0xC000036EL)
-#define STATUS_INVALID_IMPORT_OF_NON_DLL ((NTSTATUS)0xC000036FL)
-#define STATUS_DS_SHUTTING_DOWN ((NTSTATUS)0x40000370L)
-#define STATUS_SMARTCARD_WRONG_PIN ((NTSTATUS)0xC0000380L)
-#define STATUS_SMARTCARD_CARD_BLOCKED ((NTSTATUS)0xC0000381L)
-#define STATUS_SMARTCARD_CARD_NOT_AUTHENTICATED ((NTSTATUS)0xC0000382L)
-#define STATUS_SMARTCARD_NO_CARD ((NTSTATUS)0xC0000383L)
-#define STATUS_SMARTCARD_NO_KEY_CONTAINER ((NTSTATUS)0xC0000384L)
-#define STATUS_SMARTCARD_NO_CERTIFICATE ((NTSTATUS)0xC0000385L)
-#define STATUS_SMARTCARD_NO_KEYSET ((NTSTATUS)0xC0000386L)
-#define STATUS_SMARTCARD_IO_ERROR ((NTSTATUS)0xC0000387L)
-#define STATUS_DOWNGRADE_DETECTED ((NTSTATUS)0xC0000388L)
-#define STATUS_SMARTCARD_CERT_REVOKED ((NTSTATUS)0xC0000389L)
-#define STATUS_ISSUING_CA_UNTRUSTED ((NTSTATUS)0xC000038AL)
-#define STATUS_REVOCATION_OFFLINE_C ((NTSTATUS)0xC000038BL)
-#define STATUS_PKINIT_CLIENT_FAILURE ((NTSTATUS)0xC000038CL)
-#define STATUS_SMARTCARD_CERT_EXPIRED ((NTSTATUS)0xC000038DL)
-#define STATUS_DRIVER_FAILED_PRIOR_UNLOAD ((NTSTATUS)0xC000038EL)
-#define STATUS_WOW_ASSERTION ((NTSTATUS)0xC0009898L)
-#define RPC_NT_INVALID_STRING_BINDING ((NTSTATUS)0xC0020001L)
-#define RPC_NT_WRONG_KIND_OF_BINDING ((NTSTATUS)0xC0020002L)
-#define RPC_NT_INVALID_BINDING ((NTSTATUS)0xC0020003L)
-#define RPC_NT_PROTSEQ_NOT_SUPPORTED ((NTSTATUS)0xC0020004L)
-#define RPC_NT_INVALID_RPC_PROTSEQ ((NTSTATUS)0xC0020005L)
-#define RPC_NT_INVALID_STRING_UUID ((NTSTATUS)0xC0020006L)
-#define RPC_NT_INVALID_ENDPOINT_FORMAT ((NTSTATUS)0xC0020007L)
-#define RPC_NT_INVALID_NET_ADDR ((NTSTATUS)0xC0020008L)
-#define RPC_NT_NO_ENDPOINT_FOUND ((NTSTATUS)0xC0020009L)
-#define RPC_NT_INVALID_TIMEOUT ((NTSTATUS)0xC002000AL)
-#define RPC_NT_OBJECT_NOT_FOUND ((NTSTATUS)0xC002000BL)
-#define RPC_NT_ALREADY_REGISTERED ((NTSTATUS)0xC002000CL)
-#define RPC_NT_TYPE_ALREADY_REGISTERED ((NTSTATUS)0xC002000DL)
-#define RPC_NT_ALREADY_LISTENING ((NTSTATUS)0xC002000EL)
-#define RPC_NT_NO_PROTSEQS_REGISTERED ((NTSTATUS)0xC002000FL)
-#define RPC_NT_NOT_LISTENING ((NTSTATUS)0xC0020010L)
-#define RPC_NT_UNKNOWN_MGR_TYPE ((NTSTATUS)0xC0020011L)
-#define RPC_NT_UNKNOWN_IF ((NTSTATUS)0xC0020012L)
-#define RPC_NT_NO_BINDINGS ((NTSTATUS)0xC0020013L)
-#define RPC_NT_NO_PROTSEQS ((NTSTATUS)0xC0020014L)
-#define RPC_NT_CANT_CREATE_ENDPOINT ((NTSTATUS)0xC0020015L)
-#define RPC_NT_OUT_OF_RESOURCES ((NTSTATUS)0xC0020016L)
-#define RPC_NT_SERVER_UNAVAILABLE ((NTSTATUS)0xC0020017L)
-#define RPC_NT_SERVER_TOO_BUSY ((NTSTATUS)0xC0020018L)
-#define RPC_NT_INVALID_NETWORK_OPTIONS ((NTSTATUS)0xC0020019L)
-#define RPC_NT_NO_CALL_ACTIVE ((NTSTATUS)0xC002001AL)
-#define RPC_NT_CALL_FAILED ((NTSTATUS)0xC002001BL)
-#define RPC_NT_CALL_FAILED_DNE ((NTSTATUS)0xC002001CL)
-#define RPC_NT_PROTOCOL_ERROR ((NTSTATUS)0xC002001DL)
-#define RPC_NT_UNSUPPORTED_TRANS_SYN ((NTSTATUS)0xC002001FL)
-#define RPC_NT_UNSUPPORTED_TYPE ((NTSTATUS)0xC0020021L)
-#define RPC_NT_INVALID_TAG ((NTSTATUS)0xC0020022L)
-#define RPC_NT_INVALID_BOUND ((NTSTATUS)0xC0020023L)
-#define RPC_NT_NO_ENTRY_NAME ((NTSTATUS)0xC0020024L)
-#define RPC_NT_INVALID_NAME_SYNTAX ((NTSTATUS)0xC0020025L)
-#define RPC_NT_UNSUPPORTED_NAME_SYNTAX ((NTSTATUS)0xC0020026L)
-#define RPC_NT_UUID_NO_ADDRESS ((NTSTATUS)0xC0020028L)
-#define RPC_NT_DUPLICATE_ENDPOINT ((NTSTATUS)0xC0020029L)
-#define RPC_NT_UNKNOWN_AUTHN_TYPE ((NTSTATUS)0xC002002AL)
-#define RPC_NT_MAX_CALLS_TOO_SMALL ((NTSTATUS)0xC002002BL)
-#define RPC_NT_STRING_TOO_LONG ((NTSTATUS)0xC002002CL)
-#define RPC_NT_PROTSEQ_NOT_FOUND ((NTSTATUS)0xC002002DL)
-#define RPC_NT_PROCNUM_OUT_OF_RANGE ((NTSTATUS)0xC002002EL)
-#define RPC_NT_BINDING_HAS_NO_AUTH ((NTSTATUS)0xC002002FL)
-#define RPC_NT_UNKNOWN_AUTHN_SERVICE ((NTSTATUS)0xC0020030L)
-#define RPC_NT_UNKNOWN_AUTHN_LEVEL ((NTSTATUS)0xC0020031L)
-#define RPC_NT_INVALID_AUTH_IDENTITY ((NTSTATUS)0xC0020032L)
-#define RPC_NT_UNKNOWN_AUTHZ_SERVICE ((NTSTATUS)0xC0020033L)
-#define EPT_NT_INVALID_ENTRY ((NTSTATUS)0xC0020034L)
-#define EPT_NT_CANT_PERFORM_OP ((NTSTATUS)0xC0020035L)
-#define EPT_NT_NOT_REGISTERED ((NTSTATUS)0xC0020036L)
-#define RPC_NT_NOTHING_TO_EXPORT ((NTSTATUS)0xC0020037L)
-#define RPC_NT_INCOMPLETE_NAME ((NTSTATUS)0xC0020038L)
-#define RPC_NT_INVALID_VERS_OPTION ((NTSTATUS)0xC0020039L)
-#define RPC_NT_NO_MORE_MEMBERS ((NTSTATUS)0xC002003AL)
-#define RPC_NT_NOT_ALL_OBJS_UNEXPORTED ((NTSTATUS)0xC002003BL)
-#define RPC_NT_INTERFACE_NOT_FOUND ((NTSTATUS)0xC002003CL)
-#define RPC_NT_ENTRY_ALREADY_EXISTS ((NTSTATUS)0xC002003DL)
-#define RPC_NT_ENTRY_NOT_FOUND ((NTSTATUS)0xC002003EL)
-#define RPC_NT_NAME_SERVICE_UNAVAILABLE ((NTSTATUS)0xC002003FL)
-#define RPC_NT_INVALID_NAF_ID ((NTSTATUS)0xC0020040L)
-#define RPC_NT_CANNOT_SUPPORT ((NTSTATUS)0xC0020041L)
-#define RPC_NT_NO_CONTEXT_AVAILABLE ((NTSTATUS)0xC0020042L)
-#define RPC_NT_INTERNAL_ERROR ((NTSTATUS)0xC0020043L)
-#define RPC_NT_ZERO_DIVIDE ((NTSTATUS)0xC0020044L)
-#define RPC_NT_ADDRESS_ERROR ((NTSTATUS)0xC0020045L)
-#define RPC_NT_FP_DIV_ZERO ((NTSTATUS)0xC0020046L)
-#define RPC_NT_FP_UNDERFLOW ((NTSTATUS)0xC0020047L)
-#define RPC_NT_FP_OVERFLOW ((NTSTATUS)0xC0020048L)
-#define RPC_NT_NO_MORE_ENTRIES ((NTSTATUS)0xC0030001L)
-#define RPC_NT_SS_CHAR_TRANS_OPEN_FAIL ((NTSTATUS)0xC0030002L)
-#define RPC_NT_SS_CHAR_TRANS_SHORT_FILE ((NTSTATUS)0xC0030003L)
-#define RPC_NT_SS_IN_NULL_CONTEXT ((NTSTATUS)0xC0030004L)
-#define RPC_NT_SS_CONTEXT_MISMATCH ((NTSTATUS)0xC0030005L)
-#define RPC_NT_SS_CONTEXT_DAMAGED ((NTSTATUS)0xC0030006L)
-#define RPC_NT_SS_HANDLES_MISMATCH ((NTSTATUS)0xC0030007L)
-#define RPC_NT_SS_CANNOT_GET_CALL_HANDLE ((NTSTATUS)0xC0030008L)
-#define RPC_NT_NULL_REF_POINTER ((NTSTATUS)0xC0030009L)
-#define RPC_NT_ENUM_VALUE_OUT_OF_RANGE ((NTSTATUS)0xC003000AL)
-#define RPC_NT_BYTE_COUNT_TOO_SMALL ((NTSTATUS)0xC003000BL)
-#define RPC_NT_BAD_STUB_DATA ((NTSTATUS)0xC003000CL)
-#define RPC_NT_CALL_IN_PROGRESS ((NTSTATUS)0xC0020049L)
-#define RPC_NT_NO_MORE_BINDINGS ((NTSTATUS)0xC002004AL)
-#define RPC_NT_GROUP_MEMBER_NOT_FOUND ((NTSTATUS)0xC002004BL)
-#define EPT_NT_CANT_CREATE ((NTSTATUS)0xC002004CL)
-#define RPC_NT_INVALID_OBJECT ((NTSTATUS)0xC002004DL)
-#define RPC_NT_NO_INTERFACES ((NTSTATUS)0xC002004FL)
-#define RPC_NT_CALL_CANCELLED ((NTSTATUS)0xC0020050L)
-#define RPC_NT_BINDING_INCOMPLETE ((NTSTATUS)0xC0020051L)
-#define RPC_NT_COMM_FAILURE ((NTSTATUS)0xC0020052L)
-#define RPC_NT_UNSUPPORTED_AUTHN_LEVEL ((NTSTATUS)0xC0020053L)
-#define RPC_NT_NO_PRINC_NAME ((NTSTATUS)0xC0020054L)
-#define RPC_NT_NOT_RPC_ERROR ((NTSTATUS)0xC0020055L)
-#define RPC_NT_UUID_LOCAL_ONLY ((NTSTATUS)0x40020056L)
-#define RPC_NT_SEC_PKG_ERROR ((NTSTATUS)0xC0020057L)
-#define RPC_NT_NOT_CANCELLED ((NTSTATUS)0xC0020058L)
-#define RPC_NT_INVALID_ES_ACTION ((NTSTATUS)0xC0030059L)
-#define RPC_NT_WRONG_ES_VERSION ((NTSTATUS)0xC003005AL)
-#define RPC_NT_WRONG_STUB_VERSION ((NTSTATUS)0xC003005BL)
-#define RPC_NT_INVALID_PIPE_OBJECT ((NTSTATUS)0xC003005CL)
-#define RPC_NT_INVALID_PIPE_OPERATION ((NTSTATUS)0xC003005DL)
-#define RPC_NT_WRONG_PIPE_VERSION ((NTSTATUS)0xC003005EL)
-#define RPC_NT_PIPE_CLOSED ((NTSTATUS)0xC003005FL)
-#define RPC_NT_PIPE_DISCIPLINE_ERROR ((NTSTATUS)0xC0030060L)
-#define RPC_NT_PIPE_EMPTY ((NTSTATUS)0xC0030061L)
-#define RPC_NT_INVALID_ASYNC_HANDLE ((NTSTATUS)0xC0020062L)
-#define RPC_NT_INVALID_ASYNC_CALL ((NTSTATUS)0xC0020063L)
-#define RPC_NT_SEND_INCOMPLETE ((NTSTATUS)0x400200AFL)
-#define STATUS_ACPI_INVALID_OPCODE ((NTSTATUS)0xC0140001L)
-#define STATUS_ACPI_STACK_OVERFLOW ((NTSTATUS)0xC0140002L)
-#define STATUS_ACPI_ASSERT_FAILED ((NTSTATUS)0xC0140003L)
-#define STATUS_ACPI_INVALID_INDEX ((NTSTATUS)0xC0140004L)
-#define STATUS_ACPI_INVALID_ARGUMENT ((NTSTATUS)0xC0140005L)
-#define STATUS_ACPI_FATAL ((NTSTATUS)0xC0140006L)
-#define STATUS_ACPI_INVALID_SUPERNAME ((NTSTATUS)0xC0140007L)
-#define STATUS_ACPI_INVALID_ARGTYPE ((NTSTATUS)0xC0140008L)
-#define STATUS_ACPI_INVALID_OBJTYPE ((NTSTATUS)0xC0140009L)
-#define STATUS_ACPI_INVALID_TARGETTYPE ((NTSTATUS)0xC014000AL)
-#define STATUS_ACPI_INCORRECT_ARGUMENT_COUNT ((NTSTATUS)0xC014000BL)
-#define STATUS_ACPI_ADDRESS_NOT_MAPPED ((NTSTATUS)0xC014000CL)
-#define STATUS_ACPI_INVALID_EVENTTYPE ((NTSTATUS)0xC014000DL)
-#define STATUS_ACPI_HANDLER_COLLISION ((NTSTATUS)0xC014000EL)
-#define STATUS_ACPI_INVALID_DATA ((NTSTATUS)0xC014000FL)
-#define STATUS_ACPI_INVALID_REGION ((NTSTATUS)0xC0140010L)
-#define STATUS_ACPI_INVALID_ACCESS_SIZE ((NTSTATUS)0xC0140011L)
-#define STATUS_ACPI_ACQUIRE_GLOBAL_LOCK ((NTSTATUS)0xC0140012L)
-#define STATUS_ACPI_ALREADY_INITIALIZED ((NTSTATUS)0xC0140013L)
-#define STATUS_ACPI_NOT_INITIALIZED ((NTSTATUS)0xC0140014L)
-#define STATUS_ACPI_INVALID_MUTEX_LEVEL ((NTSTATUS)0xC0140015L)
-#define STATUS_ACPI_MUTEX_NOT_OWNED ((NTSTATUS)0xC0140016L)
-#define STATUS_ACPI_MUTEX_NOT_OWNER ((NTSTATUS)0xC0140017L)
-#define STATUS_ACPI_RS_ACCESS ((NTSTATUS)0xC0140018L)
-#define STATUS_ACPI_INVALID_TABLE ((NTSTATUS)0xC0140019L)
-#define STATUS_ACPI_REG_HANDLER_FAILED ((NTSTATUS)0xC0140020L)
-#define STATUS_ACPI_POWER_REQUEST_FAILED ((NTSTATUS)0xC0140021L)
-#define STATUS_CTX_WINSTATION_NAME_INVALID ((NTSTATUS)0xC00A0001L)
-#define STATUS_CTX_INVALID_PD ((NTSTATUS)0xC00A0002L)
-#define STATUS_CTX_PD_NOT_FOUND ((NTSTATUS)0xC00A0003L)
-#define STATUS_CTX_CDM_CONNECT ((NTSTATUS)0x400A0004L)
-#define STATUS_CTX_CDM_DISCONNECT ((NTSTATUS)0x400A0005L)
-#define STATUS_CTX_CLOSE_PENDING ((NTSTATUS)0xC00A0006L)
-#define STATUS_CTX_NO_OUTBUF ((NTSTATUS)0xC00A0007L)
-#define STATUS_CTX_MODEM_INF_NOT_FOUND ((NTSTATUS)0xC00A0008L)
-#define STATUS_CTX_INVALID_MODEMNAME ((NTSTATUS)0xC00A0009L)
-#define STATUS_CTX_RESPONSE_ERROR ((NTSTATUS)0xC00A000AL)
-#define STATUS_CTX_MODEM_RESPONSE_TIMEOUT ((NTSTATUS)0xC00A000BL)
-#define STATUS_CTX_MODEM_RESPONSE_NO_CARRIER ((NTSTATUS)0xC00A000CL)
-#define STATUS_CTX_MODEM_RESPONSE_NO_DIALTONE ((NTSTATUS)0xC00A000DL)
-#define STATUS_CTX_MODEM_RESPONSE_BUSY ((NTSTATUS)0xC00A000EL)
-#define STATUS_CTX_MODEM_RESPONSE_VOICE ((NTSTATUS)0xC00A000FL)
-#define STATUS_CTX_TD_ERROR ((NTSTATUS)0xC00A0010L)
-#define STATUS_CTX_LICENSE_CLIENT_INVALID ((NTSTATUS)0xC00A0012L)
-#define STATUS_CTX_LICENSE_NOT_AVAILABLE ((NTSTATUS)0xC00A0013L)
-#define STATUS_CTX_LICENSE_EXPIRED ((NTSTATUS)0xC00A0014L)
-#define STATUS_CTX_WINSTATION_NOT_FOUND ((NTSTATUS)0xC00A0015L)
-#define STATUS_CTX_WINSTATION_NAME_COLLISION ((NTSTATUS)0xC00A0016L)
-#define STATUS_CTX_WINSTATION_BUSY ((NTSTATUS)0xC00A0017L)
-#define STATUS_CTX_BAD_VIDEO_MODE ((NTSTATUS)0xC00A0018L)
-#define STATUS_CTX_GRAPHICS_INVALID ((NTSTATUS)0xC00A0022L)
-#define STATUS_CTX_NOT_CONSOLE ((NTSTATUS)0xC00A0024L)
-#define STATUS_CTX_CLIENT_QUERY_TIMEOUT ((NTSTATUS)0xC00A0026L)
-#define STATUS_CTX_CONSOLE_DISCONNECT ((NTSTATUS)0xC00A0027L)
-#define STATUS_CTX_CONSOLE_CONNECT ((NTSTATUS)0xC00A0028L)
-#define STATUS_CTX_SHADOW_DENIED ((NTSTATUS)0xC00A002AL)
-#define STATUS_CTX_WINSTATION_ACCESS_DENIED ((NTSTATUS)0xC00A002BL)
-#define STATUS_CTX_INVALID_WD ((NTSTATUS)0xC00A002EL)
-#define STATUS_CTX_WD_NOT_FOUND ((NTSTATUS)0xC00A002FL)
-#define STATUS_CTX_SHADOW_INVALID ((NTSTATUS)0xC00A0030L)
-#define STATUS_CTX_SHADOW_DISABLED ((NTSTATUS)0xC00A0031L)
-#define STATUS_RDP_PROTOCOL_ERROR ((NTSTATUS)0xC00A0032L)
-#define STATUS_CTX_CLIENT_LICENSE_NOT_SET ((NTSTATUS)0xC00A0033L)
-#define STATUS_CTX_CLIENT_LICENSE_IN_USE ((NTSTATUS)0xC00A0034L)
-#define STATUS_CTX_SHADOW_ENDED_BY_MODE_CHANGE ((NTSTATUS)0xC00A0035L)
-#define STATUS_CTX_SHADOW_NOT_RUNNING ((NTSTATUS)0xC00A0036L)
-#define STATUS_PNP_BAD_MPS_TABLE ((NTSTATUS)0xC0040035L)
-#define STATUS_PNP_TRANSLATION_FAILED ((NTSTATUS)0xC0040036L)
-#define STATUS_PNP_IRQ_TRANSLATION_FAILED ((NTSTATUS)0xC0040037L)
-#define STATUS_SXS_SECTION_NOT_FOUND ((NTSTATUS)0xC0150001L)
-#define STATUS_SXS_CANT_GEN_ACTCTX ((NTSTATUS)0xC0150002L)
-#define STATUS_SXS_INVALID_ACTCTXDATA_FORMAT ((NTSTATUS)0xC0150003L)
-#define STATUS_SXS_ASSEMBLY_NOT_FOUND ((NTSTATUS)0xC0150004L)
-#define STATUS_SXS_MANIFEST_FORMAT_ERROR ((NTSTATUS)0xC0150005L)
-#define STATUS_SXS_MANIFEST_PARSE_ERROR ((NTSTATUS)0xC0150006L)
-#define STATUS_SXS_ACTIVATION_CONTEXT_DISABLED ((NTSTATUS)0xC0150007L)
-#define STATUS_SXS_KEY_NOT_FOUND ((NTSTATUS)0xC0150008L)
-#define STATUS_SXS_VERSION_CONFLICT ((NTSTATUS)0xC0150009L)
-#define STATUS_SXS_WRONG_SECTION_TYPE ((NTSTATUS)0xC015000AL)
-#define STATUS_SXS_THREAD_QUERIES_DISABLED ((NTSTATUS)0xC015000BL)
-#define STATUS_SXS_ASSEMBLY_MISSING ((NTSTATUS)0xC015000CL)
-#define STATUS_SXS_RELEASE_ACTIVATION_CONTEXT ((NTSTATUS)0x4015000DL)
-#define STATUS_SXS_PROCESS_DEFAULT_ALREADY_SET ((NTSTATUS)0xC015000EL)
-#define STATUS_SXS_EARLY_DEACTIVATION ((NTSTATUS)0xC015000FL)
-#define STATUS_SXS_INVALID_DEACTIVATION ((NTSTATUS)0xC0150010L)
-#define STATUS_SXS_MULTIPLE_DEACTIVATION ((NTSTATUS)0xC0150011L)
-#define STATUS_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY ((NTSTATUS)0xC0150012L)
-#define STATUS_SXS_PROCESS_TERMINATION_REQUESTED ((NTSTATUS)0xC0150013L)
-#define STATUS_CLUSTER_INVALID_NODE ((NTSTATUS)0xC0130001L)
-#define STATUS_CLUSTER_NODE_EXISTS ((NTSTATUS)0xC0130002L)
-#define STATUS_CLUSTER_JOIN_IN_PROGRESS ((NTSTATUS)0xC0130003L)
-#define STATUS_CLUSTER_NODE_NOT_FOUND ((NTSTATUS)0xC0130004L)
-#define STATUS_CLUSTER_LOCAL_NODE_NOT_FOUND ((NTSTATUS)0xC0130005L)
-#define STATUS_CLUSTER_NETWORK_EXISTS ((NTSTATUS)0xC0130006L)
-#define STATUS_CLUSTER_NETWORK_NOT_FOUND ((NTSTATUS)0xC0130007L)
-#define STATUS_CLUSTER_NETINTERFACE_EXISTS ((NTSTATUS)0xC0130008L)
-#define STATUS_CLUSTER_NETINTERFACE_NOT_FOUND ((NTSTATUS)0xC0130009L)
-#define STATUS_CLUSTER_INVALID_REQUEST ((NTSTATUS)0xC013000AL)
-#define STATUS_CLUSTER_INVALID_NETWORK_PROVIDER ((NTSTATUS)0xC013000BL)
-#define STATUS_CLUSTER_NODE_DOWN ((NTSTATUS)0xC013000CL)
-#define STATUS_CLUSTER_NODE_UNREACHABLE ((NTSTATUS)0xC013000DL)
-#define STATUS_CLUSTER_NODE_NOT_MEMBER ((NTSTATUS)0xC013000EL)
-#define STATUS_CLUSTER_JOIN_NOT_IN_PROGRESS ((NTSTATUS)0xC013000FL)
-#define STATUS_CLUSTER_INVALID_NETWORK ((NTSTATUS)0xC0130010L)
-#define STATUS_CLUSTER_NO_NET_ADAPTERS ((NTSTATUS)0xC0130011L)
-#define STATUS_CLUSTER_NODE_UP ((NTSTATUS)0xC0130012L)
-#define STATUS_CLUSTER_NODE_PAUSED ((NTSTATUS)0xC0130013L)
-#define STATUS_CLUSTER_NODE_NOT_PAUSED ((NTSTATUS)0xC0130014L)
-#define STATUS_CLUSTER_NO_SECURITY_CONTEXT ((NTSTATUS)0xC0130015L)
-#define STATUS_CLUSTER_NETWORK_NOT_INTERNAL ((NTSTATUS)0xC0130016L)
-#define STATUS_CLUSTER_POISONED ((NTSTATUS)0xC0130017L)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/winsup/w32api/include/ddk/parallel.h b/winsup/w32api/include/ddk/parallel.h
deleted file mode 100644
index 06230b8..0000000
--- a/winsup/w32api/include/ddk/parallel.h
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
- * parallel.h
- *
- * ParPort driver interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __PARALLEL_H
-#define __PARALLEL_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include "ntddpar.h"
-
-#define DD_PARALLEL_PORT_BASE_NAME "ParallelPort"
-#define DD_PARALLEL_PORT_BASE_NAME_U L"ParallelPort"
-
-#define IOCTL_INTERNAL_DESELECT_DEVICE \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 24, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_INTERNAL_GET_MORE_PARALLEL_PORT_INFO \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 17, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_INTERNAL_GET_PARALLEL_PNP_INFO \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 21, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_INTERNAL_GET_PARALLEL_PORT_INFO \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 12, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_INTERNAL_INIT_1284_3_BUS \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 22, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_INTERNAL_PARALLEL_CLEAR_CHIP_MODE \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 20, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_INTERNAL_PARALLEL_CONNECT_INTERRUPT \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 13, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_INTERNAL_PARALLEL_DISCONNECT_INTERRUPT \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 14, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_INTERNAL_PARALLEL_PORT_ALLOCATE \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 11, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_INTERNAL_PARALLEL_PORT_FREE \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 40, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_INTERNAL_PARALLEL_SET_CHIP_MODE \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 19, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_INTERNAL_RELEASE_PARALLEL_PORT_INFO \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 15, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_INTERNAL_SELECT_DEVICE \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 23, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-
-typedef struct _PARALLEL_1284_COMMAND {
- UCHAR ID;
- UCHAR Port;
- ULONG CommandFlags;
-} PARALLEL_1284_COMMAND, *PPARALLEL_1284_COMMAND;
-
-/* PARALLEL_1284_COMMAND.CommandFlags */
-#define PAR_END_OF_CHAIN_DEVICE 0x00000001
-#define PAR_HAVE_PORT_KEEP_PORT 0x00000002
-
-typedef struct _MORE_PARALLEL_PORT_INFORMATION {
- INTERFACE_TYPE InterfaceType;
- ULONG BusNumber;
- ULONG InterruptLevel;
- ULONG InterruptVector;
- KAFFINITY InterruptAffinity;
- KINTERRUPT_MODE InterruptMode;
-} MORE_PARALLEL_PORT_INFORMATION, *PMORE_PARALLEL_PORT_INFORMATION;
-
-typedef NTSTATUS DDKAPI
-(*PPARALLEL_SET_CHIP_MODE)(
- /*IN*/ PVOID SetChipContext,
- /*IN*/ UCHAR ChipMode);
-
-typedef NTSTATUS DDKAPI
-(*PPARALLEL_CLEAR_CHIP_MODE)(
- /*IN*/ PVOID ClearChipContext,
- /*IN*/ UCHAR ChipMode);
-
-typedef NTSTATUS DDKAPI
-(*PPARCHIP_CLEAR_CHIP_MODE)(
- /*IN*/ PVOID ClearChipContext,
- /*IN*/ UCHAR ChipMode);
-
-typedef NTSTATUS DDKAPI
-(*PPARALLEL_TRY_SELECT_ROUTINE)(
- /*IN*/ PVOID TrySelectContext,
- /*IN*/ PVOID TrySelectCommand);
-
-typedef NTSTATUS DDKAPI
-(*PPARALLEL_DESELECT_ROUTINE)(
- /*IN*/ PVOID DeselectContext,
- /*IN*/ PVOID DeselectCommand);
-
-/* PARALLEL_PNP_INFORMATION.HardwareCapabilities */
-#define PPT_NO_HARDWARE_PRESENT 0x00000000
-#define PPT_ECP_PRESENT 0x00000001
-#define PPT_EPP_PRESENT 0x00000002
-#define PPT_EPP_32_PRESENT 0x00000004
-#define PPT_BYTE_PRESENT 0x00000008
-#define PPT_BIDI_PRESENT 0x00000008
-#define PPT_1284_3_PRESENT 0x00000010
-
-typedef struct _PARALLEL_PNP_INFORMATION {
- PHYSICAL_ADDRESS OriginalEcpController;
- PUCHAR EcpController;
- ULONG SpanOfEcpController;
- ULONG PortNumber;
- ULONG HardwareCapabilities;
- PPARALLEL_SET_CHIP_MODE TrySetChipMode;
- PPARALLEL_CLEAR_CHIP_MODE ClearChipMode;
- ULONG FifoDepth;
- ULONG FifoWidth;
- PHYSICAL_ADDRESS EppControllerPhysicalAddress;
- ULONG SpanOfEppController;
- ULONG Ieee1284_3DeviceCount;
- PPARALLEL_TRY_SELECT_ROUTINE TrySelectDevice;
- PPARALLEL_DESELECT_ROUTINE DeselectDevice;
- PVOID Context;
- ULONG CurrentMode;
- PWSTR PortName;
-} PARALLEL_PNP_INFORMATION, *PPARALLEL_PNP_INFORMATION;
-
-typedef BOOLEAN DDKAPI
-(*PPARALLEL_TRY_ALLOCATE_ROUTINE)(
- /*IN*/ PVOID TryAllocateContext);
-
-typedef VOID DDKAPI
-(*PPARALLEL_FREE_ROUTINE)(
- /*IN*/ PVOID FreeContext);
-
-typedef ULONG DDKAPI
-(*PPARALLEL_QUERY_WAITERS_ROUTINE)(
- /*IN*/ PVOID QueryAllocsContext);
-
-typedef struct _PARALLEL_PORT_INFORMATION {
- PHYSICAL_ADDRESS OriginalController;
- PUCHAR Controller;
- ULONG SpanOfController;
- PPARALLEL_TRY_ALLOCATE_ROUTINE TryAllocatePort;
- PPARALLEL_FREE_ROUTINE FreePort;
- PPARALLEL_QUERY_WAITERS_ROUTINE QueryNumWaiters;
- PVOID Context;
-} PARALLEL_PORT_INFORMATION, *PPARALLEL_PORT_INFORMATION;
-
-/* PARALLEL_CHIP_MODE.ModeFlags */
-#define INITIAL_MODE 0x00
-#define PARCHIP_ECR_ARBITRATOR 0x01
-
-typedef struct _PARALLEL_CHIP_MODE {
- UCHAR ModeFlags;
- BOOLEAN success;
-} PARALLEL_CHIP_MODE, *PPARALLEL_CHIP_MODE;
-
-typedef VOID DDKAPI
-(*PPARALLEL_DEFERRED_ROUTINE)(
- /*IN*/ PVOID DeferredContext);
-
-typedef struct _PARALLEL_INTERRUPT_SERVICE_ROUTINE {
- PKSERVICE_ROUTINE InterruptServiceRoutine;
- PVOID InterruptServiceContext;
- PPARALLEL_DEFERRED_ROUTINE DeferredPortCheckRoutine;
- PVOID DeferredPortCheckContext;
-} PARALLEL_INTERRUPT_SERVICE_ROUTINE, *PPARALLEL_INTERRUPT_SERVICE_ROUTINE;
-
-
-#define IOCTL_INTERNAL_DISCONNECT_IDLE \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 32, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_INTERNAL_LOCK_PORT \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 37, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_INTERNAL_LOCK_PORT_NO_SELECT \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 52, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_INTERNAL_PARCLASS_CONNECT \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 30, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_INTERNAL_PARCLASS_DISCONNECT \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 31, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_INTERNAL_UNLOCK_PORT \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 38, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_INTERNAL_UNLOCK_PORT_NO_DESELECT \
- CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 53, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-typedef USHORT DDKAPI
-(*PDETERMINE_IEEE_MODES)(
- /*IN*/ PVOID Context);
-
-typedef enum _PARALLEL_SAFETY {
- SAFE_MODE,
- UNSAFE_MODE
-} PARALLEL_SAFETY;
-
-typedef NTSTATUS DDKAPI
-(*PNEGOTIATE_IEEE_MODE)(
- /*IN*/ PVOID Context,
- /*IN*/ USHORT ModeMaskFwd,
- /*IN*/ USHORT ModeMaskRev,
- /*IN*/ PARALLEL_SAFETY ModeSafety,
- /*IN*/ BOOLEAN IsForward);
-
-typedef NTSTATUS DDKAPI
-(*PTERMINATE_IEEE_MODE)(
- /*IN*/ PVOID Context);
-
-typedef NTSTATUS DDKAPI
-(*PPARALLEL_IEEE_FWD_TO_REV)(
- /*IN*/ PVOID Context);
-
-typedef NTSTATUS DDKAPI
-(*PPARALLEL_IEEE_REV_TO_FWD)(
- /*IN*/ PVOID Context);
-
-typedef NTSTATUS DDKAPI
-(*PPARALLEL_READ)(
- /*IN*/ PVOID Context,
- /*OUT*/ PVOID Buffer,
- /*IN*/ ULONG NumBytesToRead,
- /*OUT*/ PULONG NumBytesRead,
- /*IN*/ UCHAR Channel);
-
-typedef NTSTATUS DDKAPI
-(*PPARALLEL_WRITE)(
- /*IN*/ PVOID Context,
- /*OUT*/ PVOID Buffer,
- /*IN*/ ULONG NumBytesToWrite,
- /*OUT*/ PULONG NumBytesWritten,
- /*IN*/ UCHAR Channel);
-
-typedef NTSTATUS DDKAPI
-(*PPARALLEL_TRYSELECT_DEVICE)(
- /*IN*/ PVOID Context,
- /*IN*/ PARALLEL_1284_COMMAND Command);
-
-typedef NTSTATUS DDKAPI
-(*PPARALLEL_DESELECT_DEVICE)(
- /*IN*/ PVOID Context,
- /*IN*/ PARALLEL_1284_COMMAND Command);
-
-typedef struct _PARCLASS_INFORMATION {
- PUCHAR Controller;
- PUCHAR EcrController;
- ULONG SpanOfController;
- PDETERMINE_IEEE_MODES DetermineIeeeModes;
- PNEGOTIATE_IEEE_MODE NegotiateIeeeMode;
- PTERMINATE_IEEE_MODE TerminateIeeeMode;
- PPARALLEL_IEEE_FWD_TO_REV IeeeFwdToRevMode;
- PPARALLEL_IEEE_REV_TO_FWD IeeeRevToFwdMode;
- PPARALLEL_READ ParallelRead;
- PPARALLEL_WRITE ParallelWrite;
- PVOID ParclassContext;
- ULONG HardwareCapabilities;
- ULONG FifoDepth;
- ULONG FifoWidth;
- PPARALLEL_TRYSELECT_DEVICE ParallelTryselect;
- PPARALLEL_DESELECT_DEVICE ParallelDeSelect;
-} PARCLASS_INFORMATION, *PPARCLASS_INFORMATION;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __PARALLEL_H */
diff --git a/winsup/w32api/include/ddk/pfhook.h b/winsup/w32api/include/ddk/pfhook.h
deleted file mode 100644
index 1b42bfa..0000000
--- a/winsup/w32api/include/ddk/pfhook.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * pfhook.h
- *
- * Packet filter API
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __PFHOOK_H
-#define __PFHOOK_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-#define DD_IPFLTRDRVR_DEVICE_NAME L"\\Device\\IPFILTERDRIVER"
-
-#define INVALID_PF_IF_INDEX 0xffffffff
-#define ZERO_PF_IP_ADDR 0
-
-typedef ULONG IPAddr;
-
-typedef enum _PF_FORWARD_ACTION {
- PF_FORWARD = 0,
- PF_DROP = 1,
- PF_PASS = 2,
- PF_ICMP_ON_DROP = 3
-} PF_FORWARD_ACTION;
-
-typedef PF_FORWARD_ACTION STDCALL
-(*PacketFilterExtensionPtr)(
- /*IN*/ unsigned char *PacketHeader,
- /*IN*/ unsigned char *Packet,
- /*IN*/ unsigned int PacketLength,
- /*IN*/ unsigned int RecvInterfaceIndex,
- /*IN*/ unsigned int SendInterfaceIndex,
- /*IN*/ IPAddr RecvLinkNextHop,
- /*IN*/ IPAddr SendLinkNextHop);
-
-typedef struct _PF_SET_EXTENSION_HOOK_INFO {
- PacketFilterExtensionPtr ExtensionPointer;
-} PF_SET_EXTENSION_HOOK_INFO, *PPF_SET_EXTENSION_HOOK_INFO;
-
-#define FSCTL_IPFLTRDRVR_BASE FILE_DEVICE_NETWORK
-
-#define _IPFLTRDRVR_CTL_CODE(function, method, access) \
- CTL_CODE(FSCTL_IPFLTRDRVR_BASE, function, method, access)
-
-#define IOCTL_PF_SET_EXTENSION_POINTER \
- _IPFLTRDRVR_CTL_CODE(22, METHOD_BUFFERED, FILE_WRITE_ACCESS)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __PFHOOK_H */
diff --git a/winsup/w32api/include/ddk/poclass.h b/winsup/w32api/include/ddk/poclass.h
deleted file mode 100644
index 2a45ad2..0000000
--- a/winsup/w32api/include/ddk/poclass.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * poclass.h
- *
- * Power policy driver interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __POCLASS_H
-#define __POCLASS_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include "batclass.h"
-
-DEFINE_GUID(GUID_CLASS_INPUT,
- 0x4D1E55B2L, 0xF16F, 0x11CF, 0x88, 0xCB, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30);
-
-DEFINE_GUID(GUID_DEVICE_LID,
- 0x4AFA3D52L, 0x74A7, 0x11d0, 0xbe, 0x5e, 0x00, 0xA0, 0xC9, 0x06, 0x28, 0x57);
-
-DEFINE_GUID(GUID_DEVICE_MEMORY,
- 0x3fd0f03dL, 0x92e0, 0x45fb, 0xb7, 0x5c, 0x5e, 0xd8, 0xff, 0xb0, 0x10, 0x21);
-
-DEFINE_GUID(GUID_DEVICE_MESSAGE_INDICATOR,
- 0XCD48A365L, 0xfa94, 0x4ce2, 0xa2, 0x32, 0xa1, 0xb7, 0x64, 0xe5, 0xd8, 0xb4);
-
-DEFINE_GUID(GUID_DEVICE_PROCESSOR,
- 0x97fadb10L, 0x4e33, 0x40ae, 0x35, 0x9c, 0x8b, 0xef, 0x02, 0x9d, 0xbd, 0xd0);
-
-DEFINE_GUID(GUID_DEVICE_SYS_BUTTON,
- 0x4AFA3D53L, 0x74A7, 0x11d0, 0xbe, 0x5e, 0x00, 0xA0, 0xC9, 0x06, 0x28, 0x57);
-
-DEFINE_GUID(GUID_DEVICE_THERMAL_ZONE,
- 0x4AFA3D51L, 0x74A7, 0x11d0, 0xbe, 0x5e, 0x00, 0xA0, 0xC9, 0x06, 0x28, 0x57);
-
-
-#define IOCTL_GET_PROCESSOR_OBJ_INFO \
- CTL_CODE(FILE_DEVICE_BATTERY, 0x60, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_GET_SYS_BUTTON_CAPS \
- CTL_CODE(FILE_DEVICE_BATTERY, 0x50, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_GET_SYS_BUTTON_EVENT \
- CTL_CODE(FILE_DEVICE_BATTERY, 0x51, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_SET_SYS_MESSAGE_INDICATOR \
- CTL_CODE(FILE_DEVICE_BATTERY, 0x70, METHOD_BUFFERED, FILE_WRITE_ACCESS)
-
-#define IOCTL_NOTIFY_SWITCH_EVENT \
- CTL_CODE(FILE_DEVICE_BATTERY, 0x40, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_THERMAL_QUERY_INFORMATION \
- CTL_CODE(FILE_DEVICE_BATTERY, 0x20, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_THERMAL_SET_COOLING_POLICY \
- CTL_CODE(FILE_DEVICE_BATTERY, 0x21, METHOD_BUFFERED, FILE_WRITE_ACCESS)
-
-#define IOCTL_QUERY_LID \
- CTL_CODE(FILE_DEVICE_BATTERY, 0x30, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_RUN_ACTIVE_COOLING_METHOD \
- CTL_CODE(FILE_DEVICE_BATTERY, 0x22, METHOD_BUFFERED, FILE_WRITE_ACCESS)
-
-#define SYS_BUTTON_POWER 0x00000001
-#define SYS_BUTTON_SLEEP 0x00000002
-#define SYS_BUTTON_LID 0x00000004
-#define SYS_BUTTON_WAKE 0x80000000
-
-#define MAX_ACTIVE_COOLING_LEVELS 10
-#define ACTIVE_COOLING 0
-#define PASSIVE_COOLING 1
-
-typedef struct _THERMAL_INFORMATION {
- ULONG ThermalStamp;
- ULONG ThermalConstant1;
- ULONG ThermalConstant2;
- KAFFINITY Processors;
- ULONG SamplingPeriod;
- ULONG CurrentTemperature;
- ULONG PassiveTripPoint;
- ULONG CriticalTripPoint;
- UCHAR ActiveTripPointCount;
- ULONG ActiveTripPoint[MAX_ACTIVE_COOLING_LEVELS];
-} THERMAL_INFORMATION, *PTHERMAL_INFORMATION;
-
-typedef struct _PROCESSOR_OBJECT_INFO {
- ULONG PhysicalID;
- ULONG PBlkAddress;
- UCHAR PBlkLength;
-} PROCESSOR_OBJECT_INFO, *PPROCESSOR_OBJECT_INFO;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __POCLASS_H */
diff --git a/winsup/w32api/include/ddk/scsi.h b/winsup/w32api/include/ddk/scsi.h
deleted file mode 100644
index 885db66..0000000
--- a/winsup/w32api/include/ddk/scsi.h
+++ /dev/null
@@ -1,1701 +0,0 @@
-/*
- * scsi.h
- *
- * SCSI port and class interface.
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __SCSI_H
-#define __SCSI_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-typedef union _CDB {
- struct _CDB6GENERIC {
- UCHAR OperationCode;
- UCHAR Immediate : 1;
- UCHAR CommandUniqueBits : 4;
- UCHAR LogicalUnitNumber : 3;
- UCHAR CommandUniqueBytes[3];
- UCHAR Link : 1;
- UCHAR Flag : 1;
- UCHAR Reserved : 4;
- UCHAR VendorUnique : 2;
- } CDB6GENERIC, *PCDB6GENERIC;
-
- struct _CDB6READWRITE {
- UCHAR OperationCode;
- UCHAR LogicalBlockMsb1 : 5;
- UCHAR LogicalUnitNumber : 3;
- UCHAR LogicalBlockMsb0;
- UCHAR LogicalBlockLsb;
- UCHAR TransferBlocks;
- UCHAR Control;
- } CDB6READWRITE, *PCDB6READWRITE;
-
- struct _CDB6INQUIRY {
- UCHAR OperationCode;
- UCHAR Reserved1 : 5;
- UCHAR LogicalUnitNumber : 3;
- UCHAR PageCode;
- UCHAR IReserved;
- UCHAR AllocationLength;
- UCHAR Control;
- } CDB6INQUIRY, *PCDB6INQUIRY;
-
- struct _CDB6INQUIRY3 {
- UCHAR OperationCode;
- UCHAR EnableVitalProductData : 1;
- UCHAR CommandSupportData : 1;
- UCHAR Reserved1 : 6;
- UCHAR PageCode;
- UCHAR Reserved2;
- UCHAR AllocationLength;
- UCHAR Control;
- } CDB6INQUIRY3, *PCDB6INQUIRY3;
-
- struct _CDB6VERIFY {
- UCHAR OperationCode;
- UCHAR Fixed : 1;
- UCHAR ByteCompare : 1;
- UCHAR Immediate : 1;
- UCHAR Reserved : 2;
- UCHAR LogicalUnitNumber : 3;
- UCHAR VerificationLength[3];
- UCHAR Control;
- } CDB6VERIFY, *PCDB6VERIFY;
-
- struct _CDB6FORMAT {
- UCHAR OperationCode;
- UCHAR FormatControl : 5;
- UCHAR LogicalUnitNumber : 3;
- UCHAR FReserved1;
- UCHAR InterleaveMsb;
- UCHAR InterleaveLsb;
- UCHAR FReserved2;
- } CDB6FORMAT, *PCDB6FORMAT;
-
- struct _CDB10 {
- UCHAR OperationCode;
- UCHAR RelativeAddress : 1;
- UCHAR Reserved1 : 2;
- UCHAR ForceUnitAccess : 1;
- UCHAR DisablePageOut : 1;
- UCHAR LogicalUnitNumber : 3;
- UCHAR LogicalBlockByte0;
- UCHAR LogicalBlockByte1;
- UCHAR LogicalBlockByte2;
- UCHAR LogicalBlockByte3;
- UCHAR Reserved2;
- UCHAR TransferBlocksMsb;
- UCHAR TransferBlocksLsb;
- UCHAR Control;
- } CDB10, *PCDB10;
-
- struct _CDB12 {
- UCHAR OperationCode;
- UCHAR RelativeAddress : 1;
- UCHAR Reserved1 : 2;
- UCHAR ForceUnitAccess : 1;
- UCHAR DisablePageOut : 1;
- UCHAR LogicalUnitNumber : 3;
- UCHAR LogicalBlock[4];
- UCHAR TransferLength[4];
- UCHAR Reserved2;
- UCHAR Control;
- } CDB12, *PCDB12;
-
- struct _PAUSE_RESUME {
- UCHAR OperationCode;
- UCHAR Reserved1 : 5;
- UCHAR LogicalUnitNumber : 3;
- UCHAR Reserved2[6];
- UCHAR Action;
- UCHAR Control;
- } PAUSE_RESUME, *PPAUSE_RESUME;
-
- struct _READ_TOC {
- UCHAR OperationCode;
- UCHAR Reserved0 : 1;
- UCHAR Msf : 1;
- UCHAR Reserved1 : 3;
- UCHAR LogicalUnitNumber : 3;
- UCHAR Format2 : 4;
- UCHAR Reserved2 : 4;
- UCHAR Reserved3[3];
- UCHAR StartingTrack;
- UCHAR AllocationLength[2];
- UCHAR Control : 6;
- UCHAR Format : 2;
- } READ_TOC, *PREAD_TOC;
-
- struct _READ_DISK_INFORMATION {
- UCHAR OperationCode;
- UCHAR Reserved1 : 5;
- UCHAR Lun : 3;
- UCHAR Reserved2[5];
- UCHAR AllocationLength[2];
- UCHAR Control;
- } READ_DISK_INFORMATION, *PREAD_DISK_INFORMATION;
-
- struct _READ_TRACK_INFORMATION {
- UCHAR OperationCode;
- UCHAR Track : 1;
- UCHAR Reserved1 : 3;
- UCHAR Reserved2 : 1;
- UCHAR Lun : 3;
- UCHAR BlockAddress[4];
- UCHAR Reserved3;
- UCHAR AllocationLength[2];
- UCHAR Control;
- } READ_TRACK_INFORMATION, *PREAD_TRACK_INFORMATION;
-
- struct _RESERVE_TRACK_RZONE {
- UCHAR OperationCode;
- UCHAR Reserved1[4];
- UCHAR ReservationSize[4];
- UCHAR Control;
- } RESERVE_TRACK_RZONE, *PRESERVE_TRACK_RZONE;
-
- struct _SEND_OPC_INFORMATION {
- UCHAR OperationCode;
- UCHAR DoOpc : 1;
- UCHAR Reserved : 7;
- UCHAR Reserved1[5];
- UCHAR ParameterListLength[2];
- UCHAR Reserved2;
- } SEND_OPC_INFORMATION, *PSEND_OPC_INFORMATION;
-
- struct _CLOSE_TRACK {
- UCHAR OperationCode;
- UCHAR Immediate : 1;
- UCHAR Reserved1 : 7;
- UCHAR Track : 1;
- UCHAR Session : 1;
- UCHAR Reserved2 : 6;
- UCHAR Reserved3;
- UCHAR TrackNumber[2];
- UCHAR Reserved4[3];
- UCHAR Control;
- } CLOSE_TRACK, *PCLOSE_TRACK;
-
- struct _SEND_CUE_SHEET {
- UCHAR OperationCode;
- UCHAR Reserved[5];
- UCHAR CueSheetSize[3];
- UCHAR Control;
- } SEND_CUE_SHEET, *PSEND_CUE_SHEET;
-
- struct _READ_HEADER {
- UCHAR OperationCode;
- UCHAR Reserved1 : 1;
- UCHAR Msf : 1;
- UCHAR Reserved2 : 3;
- UCHAR Lun : 3;
- UCHAR LogicalBlockAddress[4];
- UCHAR Reserved3;
- UCHAR AllocationLength[2];
- UCHAR Control;
- } READ_HEADER, *PREAD_HEADER;
-
- struct _PLAY_AUDIO {
- UCHAR OperationCode;
- UCHAR Reserved1 : 5;
- UCHAR LogicalUnitNumber : 3;
- UCHAR StartingBlockAddress[4];
- UCHAR Reserved2;
- UCHAR PlayLength[2];
- UCHAR Control;
- } PLAY_AUDIO, *PPLAY_AUDIO;
-
- struct _PLAY_AUDIO_MSF {
- UCHAR OperationCode;
- UCHAR Reserved1 : 5;
- UCHAR LogicalUnitNumber : 3;
- UCHAR Reserved2;
- UCHAR StartingM;
- UCHAR StartingS;
- UCHAR StartingF;
- UCHAR EndingM;
- UCHAR EndingS;
- UCHAR EndingF;
- UCHAR Control;
- } PLAY_AUDIO_MSF, *PPLAY_AUDIO_MSF;
-
-/* FIXME: Should the union be anonymous in C++ too? If so,
- can't define named types _LBA and _MSF within anonymous union
- for C++. */
- struct _PLAY_CD {
- UCHAR OperationCode;
- UCHAR Reserved1 : 1;
- UCHAR CMSF : 1;
- UCHAR ExpectedSectorType : 3;
- UCHAR Lun : 3;
-#ifndef __cplusplus
- _ANONYMOUS_UNION
-#endif
- union {
- struct _LBA {
- UCHAR StartingBlockAddress[4];
- UCHAR PlayLength[4];
- } LBA;
-
- struct _MSF {
- UCHAR Reserved1;
- UCHAR StartingM;
- UCHAR StartingS;
- UCHAR StartingF;
- UCHAR EndingM;
- UCHAR EndingS;
- UCHAR EndingF;
- UCHAR Reserved2;
- } MSF;
- #ifndef __cplusplus
- }DUMMYUNIONNAME;
- #else
- }u;
- #endif
-
- UCHAR Audio : 1;
- UCHAR Composite : 1;
- UCHAR Port1 : 1;
- UCHAR Port2 : 1;
- UCHAR Reserved2 : 3;
- UCHAR Speed : 1;
- UCHAR Control;
- } PLAY_CD, *PPLAY_CD;
-
- struct _SCAN_CD {
- UCHAR OperationCode;
- UCHAR RelativeAddress : 1;
- UCHAR Reserved1 : 3;
- UCHAR Direct : 1;
- UCHAR Lun : 3;
- UCHAR StartingAddress[4];
- UCHAR Reserved2[3];
- UCHAR Reserved3 : 6;
- UCHAR Type : 2;
- UCHAR Reserved4;
- UCHAR Control;
- } SCAN_CD, *PSCAN_CD;
-
- struct _STOP_PLAY_SCAN {
- UCHAR OperationCode;
- UCHAR Reserved1 : 5;
- UCHAR Lun : 3;
- UCHAR Reserved2[7];
- UCHAR Control;
- } STOP_PLAY_SCAN, *PSTOP_PLAY_SCAN;
-
- struct _SUBCHANNEL {
- UCHAR OperationCode;
- UCHAR Reserved0 : 1;
- UCHAR Msf : 1;
- UCHAR Reserved1 : 3;
- UCHAR LogicalUnitNumber : 3;
- UCHAR Reserved2 : 6;
- UCHAR SubQ : 1;
- UCHAR Reserved3 : 1;
- UCHAR Format;
- UCHAR Reserved4[2];
- UCHAR TrackNumber;
- UCHAR AllocationLength[2];
- UCHAR Control;
- } SUBCHANNEL, *PSUBCHANNEL;
-
- struct _READ_CD {
- UCHAR OperationCode;
- UCHAR RelativeAddress : 1;
- UCHAR Reserved0 : 1;
- UCHAR ExpectedSectorType : 3;
- UCHAR Lun : 3;
- UCHAR StartingLBA[4];
- UCHAR TransferBlocks[3];
- UCHAR Reserved2 : 1;
- UCHAR ErrorFlags : 2;
- UCHAR IncludeEDC : 1;
- UCHAR IncludeUserData : 1;
- UCHAR HeaderCode : 2;
- UCHAR IncludeSyncData : 1;
- UCHAR SubChannelSelection : 3;
- UCHAR Reserved3 : 5;
- UCHAR Control;
- } READ_CD, *PREAD_CD;
-
- struct _READ_CD_MSF {
- UCHAR OperationCode;
- UCHAR RelativeAddress : 1;
- UCHAR Reserved1 : 1;
- UCHAR ExpectedSectorType : 3;
- UCHAR Lun : 3;
- UCHAR Reserved2;
- UCHAR StartingM;
- UCHAR StartingS;
- UCHAR StartingF;
- UCHAR EndingM;
- UCHAR EndingS;
- UCHAR EndingF;
- UCHAR Reserved3;
- UCHAR Reserved4 : 1;
- UCHAR ErrorFlags : 2;
- UCHAR IncludeEDC : 1;
- UCHAR IncludeUserData : 1;
- UCHAR HeaderCode : 2;
- UCHAR IncludeSyncData : 1;
- UCHAR SubChannelSelection : 3;
- UCHAR Reserved5 : 5;
- UCHAR Control;
- } READ_CD_MSF, *PREAD_CD_MSF;
-
- struct _PLXTR_READ_CDDA {
- UCHAR OperationCode;
- UCHAR Reserved0 : 5;
- UCHAR LogicalUnitNumber : 3;
- UCHAR LogicalBlockByte0;
- UCHAR LogicalBlockByte1;
- UCHAR LogicalBlockByte2;
- UCHAR LogicalBlockByte3;
- UCHAR TransferBlockByte0;
- UCHAR TransferBlockByte1;
- UCHAR TransferBlockByte2;
- UCHAR TransferBlockByte3;
- UCHAR SubCode;
- UCHAR Control;
- } PLXTR_READ_CDDA, *PPLXTR_READ_CDDA;
-
- struct _NEC_READ_CDDA {
- UCHAR OperationCode;
- UCHAR Reserved0;
- UCHAR LogicalBlockByte0;
- UCHAR LogicalBlockByte1;
- UCHAR LogicalBlockByte2;
- UCHAR LogicalBlockByte3;
- UCHAR Reserved1;
- UCHAR TransferBlockByte0;
- UCHAR TransferBlockByte1;
- UCHAR Control;
- } NEC_READ_CDDA, *PNEC_READ_CDDA;
-
- struct _MODE_SENSE {
- UCHAR OperationCode;
- UCHAR Reserved1 : 3;
- UCHAR Dbd : 1;
- UCHAR Reserved2 : 1;
- UCHAR LogicalUnitNumber : 3;
- UCHAR PageCode : 6;
- UCHAR Pc : 2;
- UCHAR Reserved3;
- UCHAR AllocationLength;
- UCHAR Control;
- } MODE_SENSE, *PMODE_SENSE;
-
- struct _MODE_SENSE10 {
- UCHAR OperationCode;
- UCHAR Reserved1 : 3;
- UCHAR Dbd : 1;
- UCHAR Reserved2 : 1;
- UCHAR LogicalUnitNumber : 3;
- UCHAR PageCode : 6;
- UCHAR Pc : 2;
- UCHAR Reserved3[4];
- UCHAR AllocationLength[2];
- UCHAR Control;
- } MODE_SENSE10, *PMODE_SENSE10;
-
- struct _MODE_SELECT {
- UCHAR OperationCode;
- UCHAR SPBit : 1;
- UCHAR Reserved1 : 3;
- UCHAR PFBit : 1;
- UCHAR LogicalUnitNumber : 3;
- UCHAR Reserved2[2];
- UCHAR ParameterListLength;
- UCHAR Control;
- } MODE_SELECT, *PMODE_SELECT;
-
- struct _MODE_SELECT10 {
- UCHAR OperationCode;
- UCHAR SPBit : 1;
- UCHAR Reserved1 : 3;
- UCHAR PFBit : 1;
- UCHAR LogicalUnitNumber : 3;
- UCHAR Reserved2[5];
- UCHAR ParameterListLength[2];
- UCHAR Control;
- } MODE_SELECT10, *PMODE_SELECT10;
-
- struct _LOCATE {
- UCHAR OperationCode;
- UCHAR Immediate : 1;
- UCHAR CPBit : 1;
- UCHAR BTBit : 1;
- UCHAR Reserved1 : 2;
- UCHAR LogicalUnitNumber : 3;
- UCHAR Reserved3;
- UCHAR LogicalBlockAddress[4];
- UCHAR Reserved4;
- UCHAR Partition;
- UCHAR Control;
- } LOCATE, *PLOCATE;
-
- struct _LOGSENSE {
- UCHAR OperationCode;
- UCHAR SPBit : 1;
- UCHAR PPCBit : 1;
- UCHAR Reserved1 : 3;
- UCHAR LogicalUnitNumber : 3;
- UCHAR PageCode : 6;
- UCHAR PCBit : 2;
- UCHAR Reserved2;
- UCHAR Reserved3;
- UCHAR ParameterPointer[2];
- UCHAR AllocationLength[2];
- UCHAR Control;
- } LOGSENSE, *PLOGSENSE;
-
- struct _LOGSELECT {
- UCHAR OperationCode;
- UCHAR SPBit : 1;
- UCHAR PCRBit : 1;
- UCHAR Reserved1 : 3;
- UCHAR LogicalUnitNumber : 3;
- UCHAR Reserved : 6;
- UCHAR PCBit : 2;
- UCHAR Reserved2[4];
- UCHAR ParameterListLength[2];
- UCHAR Control;
- } LOGSELECT, *PLOGSELECT;
-
- struct _PRINT {
- UCHAR OperationCode;
- UCHAR Reserved : 5;
- UCHAR LogicalUnitNumber : 3;
- UCHAR TransferLength[3];
- UCHAR Control;
- } PRINT, *PPRINT;
-
- struct _SEEK {
- UCHAR OperationCode;
- UCHAR Reserved1 : 5;
- UCHAR LogicalUnitNumber : 3;
- UCHAR LogicalBlockAddress[4];
- UCHAR Reserved2[3];
- UCHAR Control;
- } SEEK, *PSEEK;
-
- struct _ERASE {
- UCHAR OperationCode;
- UCHAR Long : 1;
- UCHAR Immediate : 1;
- UCHAR Reserved1 : 3;
- UCHAR LogicalUnitNumber : 3;
- UCHAR Reserved2[3];
- UCHAR Control;
- } ERASE, *PERASE;
-
- struct _START_STOP {
- UCHAR OperationCode;
- UCHAR Immediate: 1;
- UCHAR Reserved1 : 4;
- UCHAR LogicalUnitNumber : 3;
- UCHAR Reserved2[2];
- UCHAR Start : 1;
- UCHAR LoadEject : 1;
- UCHAR Reserved3 : 6;
- UCHAR Control;
- } START_STOP, *PSTART_STOP;
-
- struct _MEDIA_REMOVAL {
- UCHAR OperationCode;
- UCHAR Reserved1 : 5;
- UCHAR LogicalUnitNumber : 3;
- UCHAR Reserved2[2];
-
- UCHAR Prevent : 1;
- UCHAR Persistant : 1;
- UCHAR Reserved3 : 6;
-
- UCHAR Control;
- } MEDIA_REMOVAL, *PMEDIA_REMOVAL;
-
- struct _SEEK_BLOCK {
- UCHAR OperationCode;
- UCHAR Immediate : 1;
- UCHAR Reserved1 : 7;
- UCHAR BlockAddress[3];
- UCHAR Link : 1;
- UCHAR Flag : 1;
- UCHAR Reserved2 : 4;
- UCHAR VendorUnique : 2;
- } SEEK_BLOCK, *PSEEK_BLOCK;
-
- struct _REQUEST_BLOCK_ADDRESS {
- UCHAR OperationCode;
- UCHAR Reserved1[3];
- UCHAR AllocationLength;
- UCHAR Link : 1;
- UCHAR Flag : 1;
- UCHAR Reserved2 : 4;
- UCHAR VendorUnique : 2;
- } REQUEST_BLOCK_ADDRESS, *PREQUEST_BLOCK_ADDRESS;
-
- struct _PARTITION {
- UCHAR OperationCode;
- UCHAR Immediate : 1;
- UCHAR Sel: 1;
- UCHAR PartitionSelect : 6;
- UCHAR Reserved1[3];
- UCHAR Control;
- } PARTITION, *PPARTITION;
-
- struct _WRITE_TAPE_MARKS {
- UCHAR OperationCode;
- UCHAR Immediate : 1;
- UCHAR WriteSetMarks: 1;
- UCHAR Reserved : 3;
- UCHAR LogicalUnitNumber : 3;
- UCHAR TransferLength[3];
- UCHAR Control;
- } WRITE_TAPE_MARKS, *PWRITE_TAPE_MARKS;
-
- struct _SPACE_TAPE_MARKS {
- UCHAR OperationCode;
- UCHAR Code : 3;
- UCHAR Reserved : 2;
- UCHAR LogicalUnitNumber : 3;
- UCHAR NumMarksMSB ;
- UCHAR NumMarks;
- UCHAR NumMarksLSB;
- union {
- UCHAR value;
- struct {
- UCHAR Link : 1;
- UCHAR Flag : 1;
- UCHAR Reserved : 4;
- UCHAR VendorUnique : 2;
- } Fields;
- } Byte6;
- } SPACE_TAPE_MARKS, *PSPACE_TAPE_MARKS;
-
- struct _READ_POSITION {
- UCHAR Operation;
- UCHAR BlockType : 1;
- UCHAR Reserved1 : 4;
- UCHAR Lun : 3;
- UCHAR Reserved2[7];
- UCHAR Control;
- } READ_POSITION, *PREAD_POSITION;
-
- struct _CDB6READWRITETAPE {
- UCHAR OperationCode;
- UCHAR VendorSpecific : 5;
- UCHAR Reserved : 3;
- UCHAR TransferLenMSB;
- UCHAR TransferLen;
- UCHAR TransferLenLSB;
- UCHAR Link : 1;
- UCHAR Flag : 1;
- UCHAR Reserved1 : 4;
- UCHAR VendorUnique : 2;
- } CDB6READWRITETAPE, *PCDB6READWRITETAPE;
-
- struct _INIT_ELEMENT_STATUS {
- UCHAR OperationCode;
- UCHAR Reserved1 : 5;
- UCHAR LogicalUnitNubmer : 3;
- UCHAR Reserved2[3];
- UCHAR Reserved3 : 7;
- UCHAR NoBarCode : 1;
- } INIT_ELEMENT_STATUS, *PINIT_ELEMENT_STATUS;
-
- struct _INITIALIZE_ELEMENT_RANGE {
- UCHAR OperationCode;
- UCHAR Range : 1;
- UCHAR Reserved1 : 4;
- UCHAR LogicalUnitNubmer : 3;
- UCHAR FirstElementAddress[2];
- UCHAR Reserved2[2];
- UCHAR NumberOfElements[2];
- UCHAR Reserved3;
- UCHAR Reserved4 : 7;
- UCHAR NoBarCode : 1;
- } INITIALIZE_ELEMENT_RANGE, *PINITIALIZE_ELEMENT_RANGE;
-
- struct _POSITION_TO_ELEMENT {
- UCHAR OperationCode;
- UCHAR Reserved1 : 5;
- UCHAR LogicalUnitNumber : 3;
- UCHAR TransportElementAddress[2];
- UCHAR DestinationElementAddress[2];
- UCHAR Reserved2[2];
- UCHAR Flip : 1;
- UCHAR Reserved3 : 7;
- UCHAR Control;
- } POSITION_TO_ELEMENT, *PPOSITION_TO_ELEMENT;
-
- struct _MOVE_MEDIUM {
- UCHAR OperationCode;
- UCHAR Reserved1 : 5;
- UCHAR LogicalUnitNumber : 3;
- UCHAR TransportElementAddress[2];
- UCHAR SourceElementAddress[2];
- UCHAR DestinationElementAddress[2];
- UCHAR Reserved2[2];
- UCHAR Flip : 1;
- UCHAR Reserved3 : 7;
- UCHAR Control;
- } MOVE_MEDIUM, *PMOVE_MEDIUM;
-
- struct _EXCHANGE_MEDIUM {
- UCHAR OperationCode;
- UCHAR Reserved1 : 5;
- UCHAR LogicalUnitNumber : 3;
- UCHAR TransportElementAddress[2];
- UCHAR SourceElementAddress[2];
- UCHAR Destination1ElementAddress[2];
- UCHAR Destination2ElementAddress[2];
- UCHAR Flip1 : 1;
- UCHAR Flip2 : 1;
- UCHAR Reserved3 : 6;
- UCHAR Control;
- } EXCHANGE_MEDIUM, *PEXCHANGE_MEDIUM;
-
- struct _READ_ELEMENT_STATUS {
- UCHAR OperationCode;
- UCHAR ElementType : 4;
- UCHAR VolTag : 1;
- UCHAR LogicalUnitNumber : 3;
- UCHAR StartingElementAddress[2];
- UCHAR NumberOfElements[2];
- UCHAR Reserved1;
- UCHAR AllocationLength[3];
- UCHAR Reserved2;
- UCHAR Control;
- } READ_ELEMENT_STATUS, *PREAD_ELEMENT_STATUS;
-
- struct _SEND_VOLUME_TAG {
- UCHAR OperationCode;
- UCHAR ElementType : 4;
- UCHAR Reserved1 : 1;
- UCHAR LogicalUnitNumber : 3;
- UCHAR StartingElementAddress[2];
- UCHAR Reserved2;
- UCHAR ActionCode : 5;
- UCHAR Reserved3 : 3;
- UCHAR Reserved4[2];
- UCHAR ParameterListLength[2];
- UCHAR Reserved5;
- UCHAR Control;
- } SEND_VOLUME_TAG, *PSEND_VOLUME_TAG;
-
- struct _REQUEST_VOLUME_ELEMENT_ADDRESS {
- UCHAR OperationCode;
- UCHAR ElementType : 4;
- UCHAR VolTag : 1;
- UCHAR LogicalUnitNumber : 3;
- UCHAR StartingElementAddress[2];
- UCHAR NumberElements[2];
- UCHAR Reserved1;
- UCHAR AllocationLength[3];
- UCHAR Reserved2;
- UCHAR Control;
- } REQUEST_VOLUME_ELEMENT_ADDRESS, *PREQUEST_VOLUME_ELEMENT_ADDRESS;
-
- struct _LOAD_UNLOAD {
- UCHAR OperationCode;
- UCHAR Immediate : 1;
- UCHAR Reserved1 : 4;
- UCHAR Lun : 3;
- UCHAR Reserved2[2];
- UCHAR Start : 1;
- UCHAR LoadEject : 1;
- UCHAR Reserved3: 6;
- UCHAR Reserved4[3];
- UCHAR Slot;
- UCHAR Reserved5[3];
- } LOAD_UNLOAD, *PLOAD_UNLOAD;
-
- struct _MECH_STATUS {
- UCHAR OperationCode;
- UCHAR Reserved : 5;
- UCHAR Lun : 3;
- UCHAR Reserved1[6];
- UCHAR AllocationLength[2];
- UCHAR Reserved2[1];
- UCHAR Control;
- } MECH_STATUS, *PMECH_STATUS;
-
- struct _SYNCHRONIZE_CACHE10 {
-
- UCHAR OperationCode;
-
- UCHAR RelAddr : 1;
- UCHAR Immediate : 1;
- UCHAR Reserved : 3;
- UCHAR Lun : 3;
-
- UCHAR LogicalBlockAddress[4];
- UCHAR Reserved2;
- UCHAR BlockCount[2];
- UCHAR Control;
- } SYNCHRONIZE_CACHE10, *PSYNCHRONIZE_CACHE10;
-
- struct _GET_EVENT_STATUS_NOTIFICATION {
- UCHAR OperationCode;
-
- UCHAR Immediate : 1;
- UCHAR Reserved : 4;
- UCHAR Lun : 3;
-
- UCHAR Reserved2[2];
- UCHAR NotificationClassRequest;
- UCHAR Reserved3[2];
- UCHAR EventListLength[2];
-
- UCHAR Control;
- } GET_EVENT_STATUS_NOTIFICATION, *PGET_EVENT_STATUS_NOTIFICATION;
-
- struct _READ_DVD_STRUCTURE {
- UCHAR OperationCode;
- UCHAR Reserved1 : 5;
- UCHAR Lun : 3;
- UCHAR RMDBlockNumber[4];
- UCHAR LayerNumber;
- UCHAR Format;
- UCHAR AllocationLength[2];
- UCHAR Reserved3 : 6;
- UCHAR AGID : 2;
- UCHAR Control;
- } READ_DVD_STRUCTURE, *PREAD_DVD_STRUCTURE;
-
- struct _SEND_DVD_STRUCTURE {
- UCHAR OperationCode;
- UCHAR Reserved1 : 5;
- UCHAR Lun : 3;
- UCHAR Reserved2[5];
- UCHAR Format;
- UCHAR ParameterListLength[2];
- UCHAR Reserved3;
- UCHAR Control;
- } SEND_DVD_STRUCTURE, *PSEND_DVD_STRUCTURE;
-
- struct _SEND_KEY {
- UCHAR OperationCode;
- UCHAR Reserved1 : 5;
- UCHAR Lun : 3;
- UCHAR Reserved2[6];
- UCHAR ParameterListLength[2];
- UCHAR KeyFormat : 6;
- UCHAR AGID : 2;
- UCHAR Control;
- } SEND_KEY, *PSEND_KEY;
-
- struct _REPORT_KEY {
- UCHAR OperationCode;
- UCHAR Reserved1 : 5;
- UCHAR Lun : 3;
- UCHAR LogicalBlockAddress[4];
- UCHAR Reserved2[2];
- UCHAR AllocationLength[2];
- UCHAR KeyFormat : 6;
- UCHAR AGID : 2;
- UCHAR Control;
- } REPORT_KEY, *PREPORT_KEY;
-
- struct _SET_READ_AHEAD {
- UCHAR OperationCode;
- UCHAR Reserved1 : 5;
- UCHAR Lun : 3;
- UCHAR TriggerLBA[4];
- UCHAR ReadAheadLBA[4];
- UCHAR Reserved2;
- UCHAR Control;
- } SET_READ_AHEAD, *PSET_READ_AHEAD;
-
- struct _READ_FORMATTED_CAPACITIES {
- UCHAR OperationCode;
- UCHAR Reserved1 : 5;
- UCHAR Lun : 3;
- UCHAR Reserved2[5];
- UCHAR AllocationLength[2];
- UCHAR Control;
- } READ_FORMATTED_CAPACITIES, *PREAD_FORMATTED_CAPACITIES;
-
- struct _REPORT_LUNS {
- UCHAR OperationCode;
- UCHAR Reserved1[5];
- UCHAR AllocationLength[4];
- UCHAR Reserved2[1];
- UCHAR Control;
- } REPORT_LUNS, *PREPORT_LUNS;
-
- struct _PERSISTENT_RESERVE_IN {
- UCHAR OperationCode;
- UCHAR ServiceAction : 5;
- UCHAR Reserved1 : 3;
- UCHAR Reserved2[5];
- UCHAR AllocationLength[2];
- UCHAR Control;
- } PERSISTENT_RESERVE_IN, *PPERSISTENT_RESERVE_IN;
-
- struct _PERSISTENT_RESERVE_OUT {
- UCHAR OperationCode;
- UCHAR ServiceAction : 5;
- UCHAR Reserved1 : 3;
- UCHAR Type : 4;
- UCHAR Scope : 4;
- UCHAR Reserved2[4];
- UCHAR ParameterListLength[2];
- UCHAR Control;
- } PERSISTENT_RESERVE_OUT, *PPERSISTENT_RESERVE_OUT;
-
- struct _GET_CONFIGURATION {
- UCHAR OperationCode;
- UCHAR RequestType : 1;
- UCHAR Reserved1 : 7;
- UCHAR StartingFeature[2];
- UCHAR Reserved2[3];
- UCHAR AllocationLength[2];
- UCHAR Control;
- } GET_CONFIGURATION, *PGET_CONFIGURATION;
-
- struct _SET_CD_SPEED {
- UCHAR OperationCode;
- UCHAR Reserved1;
- UCHAR ReadSpeed[2];
- UCHAR WriteSpeed[2];
- UCHAR Reserved2[5];
- UCHAR Control;
- } SET_CD_SPEED, *PSET_CD_SPEED;
-
- ULONG AsUlong[4];
- UCHAR AsByte[16];
-} CDB, *PCDB;
-
-#ifndef _INQUIRYDATA_DEFINED /* also in minitape.h */
-#define _INQUIRYDATA_DEFINED
-
-#define INQUIRYDATABUFFERSIZE 36
-
-typedef struct _INQUIRYDATA {
- UCHAR DeviceType : 5;
- UCHAR DeviceTypeQualifier : 3;
- UCHAR DeviceTypeModifier : 7;
- UCHAR RemovableMedia : 1;
- _ANONYMOUS_UNION union {
- UCHAR Versions;
- _ANONYMOUS_STRUCT struct {
- UCHAR ANSIVersion : 3;
- UCHAR ECMAVersion : 3;
- UCHAR ISOVersion : 2;
- } DUMMYSTRUCTNAME;
- } DUMMYUNIONNAME;
- UCHAR ResponseDataFormat : 4;
- UCHAR HiSupport : 1;
- UCHAR NormACA : 1;
- UCHAR TerminateTask : 1;
- UCHAR AERC : 1;
- UCHAR AdditionalLength;
- UCHAR Reserved;
- UCHAR Addr16 : 1;
- UCHAR Addr32 : 1;
- UCHAR AckReqQ: 1;
- UCHAR MediumChanger : 1;
- UCHAR MultiPort : 1;
- UCHAR ReservedBit2 : 1;
- UCHAR EnclosureServices : 1;
- UCHAR ReservedBit3 : 1;
- UCHAR SoftReset : 1;
- UCHAR CommandQueue : 1;
- UCHAR TransferDisable : 1;
- UCHAR LinkedCommands : 1;
- UCHAR Synchronous : 1;
- UCHAR Wide16Bit : 1;
- UCHAR Wide32Bit : 1;
- UCHAR RelativeAddressing : 1;
- UCHAR VendorId[8];
- UCHAR ProductId[16];
- UCHAR ProductRevisionLevel[4];
- UCHAR VendorSpecific[20];
- UCHAR Reserved3[40];
-} INQUIRYDATA, *PINQUIRYDATA;
-#endif
-
-/* INQUIRYDATA.DeviceType constants */
-#define DIRECT_ACCESS_DEVICE 0x00
-#define SEQUENTIAL_ACCESS_DEVICE 0x01
-#define PRINTER_DEVICE 0x02
-#define PROCESSOR_DEVICE 0x03
-#define WRITE_ONCE_READ_MULTIPLE_DEVICE 0x04
-#define READ_ONLY_DIRECT_ACCESS_DEVICE 0x05
-#define SCANNER_DEVICE 0x06
-#define OPTICAL_DEVICE 0x07
-#define MEDIUM_CHANGER 0x08
-#define COMMUNICATION_DEVICE 0x09
-#define LOGICAL_UNIT_NOT_PRESENT_DEVICE 0x7F
-#define DEVICE_QUALIFIER_NOT_SUPPORTED 0x03
-
-/* INQUIRYDATA.DeviceTypeQualifier constants */
-#define DEVICE_CONNECTED 0x00
-
-#define SCSISTAT_GOOD 0x00
-#define SCSISTAT_CHECK_CONDITION 0x02
-#define SCSISTAT_CONDITION_MET 0x04
-#define SCSISTAT_BUSY 0x08
-#define SCSISTAT_INTERMEDIATE 0x10
-#define SCSISTAT_INTERMEDIATE_COND_MET 0x14
-#define SCSISTAT_RESERVATION_CONFLICT 0x18
-#define SCSISTAT_COMMAND_TERMINATED 0x22
-#define SCSISTAT_QUEUE_FULL 0x28
-
-/* Mode Sense/Select page constants */
-#define MODE_PAGE_ERROR_RECOVERY 0x01
-#define MODE_PAGE_DISCONNECT 0x02
-#define MODE_PAGE_FORMAT_DEVICE 0x03
-#define MODE_PAGE_RIGID_GEOMETRY 0x04
-#define MODE_PAGE_FLEXIBILE 0x05
-#define MODE_PAGE_WRITE_PARAMETERS 0x05
-#define MODE_PAGE_VERIFY_ERROR 0x07
-#define MODE_PAGE_CACHING 0x08
-#define MODE_PAGE_PERIPHERAL 0x09
-#define MODE_PAGE_CONTROL 0x0A
-#define MODE_PAGE_MEDIUM_TYPES 0x0B
-#define MODE_PAGE_NOTCH_PARTITION 0x0C
-#define MODE_PAGE_CD_AUDIO_CONTROL 0x0E
-#define MODE_PAGE_DATA_COMPRESS 0x0F
-#define MODE_PAGE_DEVICE_CONFIG 0x10
-#define MODE_PAGE_MEDIUM_PARTITION 0x11
-#define MODE_PAGE_CDVD_FEATURE_SET 0x18
-#define MODE_PAGE_POWER_CONDITION 0x1A
-#define MODE_PAGE_FAULT_REPORTING 0x1C
-#define MODE_PAGE_CDVD_INACTIVITY 0x1D
-#define MODE_PAGE_ELEMENT_ADDRESS 0x1D
-#define MODE_PAGE_TRANSPORT_GEOMETRY 0x1E
-#define MODE_PAGE_DEVICE_CAPABILITIES 0x1F
-#define MODE_PAGE_CAPABILITIES 0x2A
-#define MODE_SENSE_RETURN_ALL 0x3f
-#define MODE_SENSE_CURRENT_VALUES 0x00
-#define MODE_SENSE_CHANGEABLE_VALUES 0x40
-#define MODE_SENSE_DEFAULT_VAULES 0x80
-#define MODE_SENSE_SAVED_VALUES 0xc0
-
-/* SCSI CDB operation codes */
-#define SCSIOP_TEST_UNIT_READY 0x00
-#define SCSIOP_REZERO_UNIT 0x01
-#define SCSIOP_REWIND 0x01
-#define SCSIOP_REQUEST_BLOCK_ADDR 0x02
-#define SCSIOP_REQUEST_SENSE 0x03
-#define SCSIOP_FORMAT_UNIT 0x04
-#define SCSIOP_READ_BLOCK_LIMITS 0x05
-#define SCSIOP_REASSIGN_BLOCKS 0x07
-#define SCSIOP_INIT_ELEMENT_STATUS 0x07
-#define SCSIOP_READ6 0x08
-#define SCSIOP_RECEIVE 0x08
-#define SCSIOP_WRITE6 0x0A
-#define SCSIOP_PRINT 0x0A
-#define SCSIOP_SEND 0x0A
-#define SCSIOP_SEEK6 0x0B
-#define SCSIOP_TRACK_SELECT 0x0B
-#define SCSIOP_SLEW_PRINT 0x0B
-#define SCSIOP_SEEK_BLOCK 0x0C
-#define SCSIOP_PARTITION 0x0D
-#define SCSIOP_READ_REVERSE 0x0F
-#define SCSIOP_WRITE_FILEMARKS 0x10
-#define SCSIOP_FLUSH_BUFFER 0x10
-#define SCSIOP_SPACE 0x11
-#define SCSIOP_INQUIRY 0x12
-#define SCSIOP_VERIFY6 0x13
-#define SCSIOP_RECOVER_BUF_DATA 0x14
-#define SCSIOP_MODE_SELECT 0x15
-#define SCSIOP_RESERVE_UNIT 0x16
-#define SCSIOP_RELEASE_UNIT 0x17
-#define SCSIOP_COPY 0x18
-#define SCSIOP_ERASE 0x19
-#define SCSIOP_MODE_SENSE 0x1A
-#define SCSIOP_START_STOP_UNIT 0x1B
-#define SCSIOP_STOP_PRINT 0x1B
-#define SCSIOP_LOAD_UNLOAD 0x1B
-#define SCSIOP_RECEIVE_DIAGNOSTIC 0x1C
-#define SCSIOP_SEND_DIAGNOSTIC 0x1D
-#define SCSIOP_MEDIUM_REMOVAL 0x1E
-
-#define SCSIOP_READ_FORMATTED_CAPACITY 0x23
-#define SCSIOP_READ_CAPACITY 0x25
-#define SCSIOP_READ 0x28
-#define SCSIOP_WRITE 0x2A
-#define SCSIOP_SEEK 0x2B
-#define SCSIOP_LOCATE 0x2B
-#define SCSIOP_POSITION_TO_ELEMENT 0x2B
-#define SCSIOP_WRITE_VERIFY 0x2E
-#define SCSIOP_VERIFY 0x2F
-#define SCSIOP_SEARCH_DATA_HIGH 0x30
-#define SCSIOP_SEARCH_DATA_EQUAL 0x31
-#define SCSIOP_SEARCH_DATA_LOW 0x32
-#define SCSIOP_SET_LIMITS 0x33
-#define SCSIOP_READ_POSITION 0x34
-#define SCSIOP_SYNCHRONIZE_CACHE 0x35
-#define SCSIOP_COMPARE 0x39
-#define SCSIOP_COPY_COMPARE 0x3A
-#define SCSIOP_WRITE_DATA_BUFF 0x3B
-#define SCSIOP_READ_DATA_BUFF 0x3C
-#define SCSIOP_CHANGE_DEFINITION 0x40
-#define SCSIOP_READ_SUB_CHANNEL 0x42
-#define SCSIOP_READ_TOC 0x43
-#define SCSIOP_READ_HEADER 0x44
-#define SCSIOP_PLAY_AUDIO 0x45
-#define SCSIOP_GET_CONFIGURATION 0x46
-#define SCSIOP_PLAY_AUDIO_MSF 0x47
-#define SCSIOP_PLAY_TRACK_INDEX 0x48
-#define SCSIOP_PLAY_TRACK_RELATIVE 0x49
-#define SCSIOP_GET_EVENT_STATUS 0x4A
-#define SCSIOP_PAUSE_RESUME 0x4B
-#define SCSIOP_LOG_SELECT 0x4C
-#define SCSIOP_LOG_SENSE 0x4D
-#define SCSIOP_STOP_PLAY_SCAN 0x4E
-#define SCSIOP_READ_DISK_INFORMATION 0x51
-#define SCSIOP_READ_TRACK_INFORMATION 0x52
-#define SCSIOP_RESERVE_TRACK_RZONE 0x53
-#define SCSIOP_SEND_OPC_INFORMATION 0x54
-#define SCSIOP_MODE_SELECT10 0x55
-#define SCSIOP_MODE_SENSE10 0x5A
-#define SCSIOP_CLOSE_TRACK_SESSION 0x5B
-#define SCSIOP_READ_BUFFER_CAPACITY 0x5C
-#define SCSIOP_SEND_CUE_SHEET 0x5D
-#define SCSIOP_PERSISTENT_RESERVE_IN 0x5E
-#define SCSIOP_PERSISTENT_RESERVE_OUT 0x5F
-
-#define SCSIOP_REPORT_LUNS 0xA0
-#define SCSIOP_BLANK 0xA1
-#define SCSIOP_SEND_KEY 0xA3
-#define SCSIOP_REPORT_KEY 0xA4
-#define SCSIOP_MOVE_MEDIUM 0xA5
-#define SCSIOP_LOAD_UNLOAD_SLOT 0xA6
-#define SCSIOP_EXCHANGE_MEDIUM 0xA6
-#define SCSIOP_SET_READ_AHEAD 0xA7
-#define SCSIOP_READ_DVD_STRUCTURE 0xAD
-#define SCSIOP_REQUEST_VOL_ELEMENT 0xB5
-#define SCSIOP_SEND_VOLUME_TAG 0xB6
-#define SCSIOP_READ_ELEMENT_STATUS 0xB8
-#define SCSIOP_READ_CD_MSF 0xB9
-#define SCSIOP_SCAN_CD 0xBA
-#define SCSIOP_SET_CD_SPEED 0xBB
-#define SCSIOP_PLAY_CD 0xBC
-#define SCSIOP_MECHANISM_STATUS 0xBD
-#define SCSIOP_READ_CD 0xBE
-#define SCSIOP_SEND_DVD_STRUCTURE 0xBF
-#define SCSIOP_INIT_ELEMENT_RANGE 0xE7
-
-#define SCSIOP_DENON_EJECT_DISC 0xE6
-#define SCSIOP_DENON_STOP_AUDIO 0xE7
-#define SCSIOP_DENON_PLAY_AUDIO 0xE8
-#define SCSIOP_DENON_READ_TOC 0xE9
-#define SCSIOP_DENON_READ_SUBCODE 0xEB
-
-#define SCSIMESS_MODIFY_DATA_POINTER 0x00
-#define SCSIMESS_SYNCHRONOUS_DATA_REQ 0x01
-#define SCSIMESS_WIDE_DATA_REQUEST 0x03
-
-#define SCSIMESS_MODIFY_DATA_LENGTH 5
-#define SCSIMESS_SYNCH_DATA_LENGTH 3
-#define SCSIMESS_WIDE_DATA_LENGTH 2
-
-#define SCSIMESS_ABORT 0x06
-#define SCSIMESS_ABORT_WITH_TAG 0x0D
-#define SCSIMESS_BUS_DEVICE_RESET 0x0C
-#define SCSIMESS_CLEAR_QUEUE 0x0E
-#define SCSIMESS_COMMAND_COMPLETE 0x00
-#define SCSIMESS_DISCONNECT 0x04
-#define SCSIMESS_EXTENDED_MESSAGE 0x01
-#define SCSIMESS_IDENTIFY 0x80
-#define SCSIMESS_IDENTIFY_WITH_DISCON 0xC0
-#define SCSIMESS_IGNORE_WIDE_RESIDUE 0x23
-#define SCSIMESS_INITIATE_RECOVERY 0x0F
-#define SCSIMESS_INIT_DETECTED_ERROR 0x05
-#define SCSIMESS_LINK_CMD_COMP 0x0A
-#define SCSIMESS_LINK_CMD_COMP_W_FLAG 0x0B
-#define SCSIMESS_MESS_PARITY_ERROR 0x09
-#define SCSIMESS_MESSAGE_REJECT 0x07
-#define SCSIMESS_NO_OPERATION 0x08
-#define SCSIMESS_HEAD_OF_QUEUE_TAG 0x21
-#define SCSIMESS_ORDERED_QUEUE_TAG 0x22
-#define SCSIMESS_SIMPLE_QUEUE_TAG 0x20
-#define SCSIMESS_RELEASE_RECOVERY 0x10
-#define SCSIMESS_RESTORE_POINTERS 0x03
-#define SCSIMESS_SAVE_DATA_POINTER 0x02
-#define SCSIMESS_TERMINATE_IO_PROCESS 0x11
-
-#define CDB_FORCE_MEDIA_ACCESS 0x08
-
-#define CDB_RETURN_ON_COMPLETION 0
-#define CDB_RETURN_IMMEDIATE 1
-
-#define CDB_INQUIRY_EVPD 0x01
-
-#define LUN0_FORMAT_SAVING_DEFECT_LIST 0
-#define USE_DEFAULTMSB 0
-#define USE_DEFAULTLSB 0
-
-#define START_UNIT_CODE 0x01
-#define STOP_UNIT_CODE 0x00
-
-typedef struct _SENSE_DATA {
- UCHAR ErrorCode : 7;
- UCHAR Valid : 1;
- UCHAR SegmentNumber;
- UCHAR SenseKey : 4;
- UCHAR Reserved : 1;
- UCHAR IncorrectLength : 1;
- UCHAR EndOfMedia : 1;
- UCHAR FileMark : 1;
- UCHAR Information[4];
- UCHAR AdditionalSenseLength;
- UCHAR CommandSpecificInformation[4];
- UCHAR AdditionalSenseCode;
- UCHAR AdditionalSenseCodeQualifier;
- UCHAR FieldReplaceableUnitCode;
- UCHAR SenseKeySpecific[3];
-} SENSE_DATA, *PSENSE_DATA;
-
-#define SENSE_BUFFER_SIZE 18
-
-/* Sense codes */
-#define SCSI_SENSE_NO_SENSE 0x00
-#define SCSI_SENSE_RECOVERED_ERROR 0x01
-#define SCSI_SENSE_NOT_READY 0x02
-#define SCSI_SENSE_MEDIUM_ERROR 0x03
-#define SCSI_SENSE_HARDWARE_ERROR 0x04
-#define SCSI_SENSE_ILLEGAL_REQUEST 0x05
-#define SCSI_SENSE_UNIT_ATTENTION 0x06
-#define SCSI_SENSE_DATA_PROTECT 0x07
-#define SCSI_SENSE_BLANK_CHECK 0x08
-#define SCSI_SENSE_UNIQUE 0x09
-#define SCSI_SENSE_COPY_ABORTED 0x0A
-#define SCSI_SENSE_ABORTED_COMMAND 0x0B
-#define SCSI_SENSE_EQUAL 0x0C
-#define SCSI_SENSE_VOL_OVERFLOW 0x0D
-#define SCSI_SENSE_MISCOMPARE 0x0E
-#define SCSI_SENSE_RESERVED 0x0F
-
-/* Additional tape bit */
-#define SCSI_ILLEGAL_LENGTH 0x20
-#define SCSI_EOM 0x40
-#define SCSI_FILE_MARK 0x80
-
-/* Additional Sense codes */
-#define SCSI_ADSENSE_NO_SENSE 0x00
-#define SCSI_ADSENSE_NO_SEEK_COMPLETE 0x02
-#define SCSI_ADSENSE_LUN_NOT_READY 0x04
-#define SCSI_ADSENSE_WRITE_ERROR 0x0C
-#define SCSI_ADSENSE_TRACK_ERROR 0x14
-#define SCSI_ADSENSE_SEEK_ERROR 0x15
-#define SCSI_ADSENSE_REC_DATA_NOECC 0x17
-#define SCSI_ADSENSE_REC_DATA_ECC 0x18
-#define SCSI_ADSENSE_ILLEGAL_COMMAND 0x20
-#define SCSI_ADSENSE_ILLEGAL_BLOCK 0x21
-#define SCSI_ADSENSE_INVALID_CDB 0x24
-#define SCSI_ADSENSE_INVALID_LUN 0x25
-#define SCSI_ADSENSE_WRITE_PROTECT 0x27
-#define SCSI_ADSENSE_MEDIUM_CHANGED 0x28
-#define SCSI_ADSENSE_BUS_RESET 0x29
-#define SCSI_ADSENSE_INSUFFICIENT_TIME_FOR_OPERATION 0x2E
-#define SCSI_ADSENSE_INVALID_MEDIA 0x30
-#define SCSI_ADSENSE_NO_MEDIA_IN_DEVICE 0x3a
-#define SCSI_ADSENSE_POSITION_ERROR 0x3b
-#define SCSI_ADSENSE_OPERATOR_REQUEST 0x5a
-#define SCSI_ADSENSE_FAILURE_PREDICTION_THRESHOLD_EXCEEDED 0x5d
-#define SCSI_ADSENSE_ILLEGAL_MODE_FOR_THIS_TRACK 0x64
-#define SCSI_ADSENSE_COPY_PROTECTION_FAILURE 0x6f
-#define SCSI_ADSENSE_POWER_CALIBRATION_ERROR 0x73
-#define SCSI_ADSENSE_VENDOR_UNIQUE 0x80
-#define SCSI_ADSENSE_MUSIC_AREA 0xA0
-#define SCSI_ADSENSE_DATA_AREA 0xA1
-#define SCSI_ADSENSE_VOLUME_OVERFLOW 0xA7
-
-#define SCSI_SENSEQ_CAUSE_NOT_REPORTABLE 0x00
-#define SCSI_SENSEQ_BECOMING_READY 0x01
-#define SCSI_SENSEQ_INIT_COMMAND_REQUIRED 0x02
-#define SCSI_SENSEQ_MANUAL_INTERVENTION_REQUIRED 0x03
-#define SCSI_SENSEQ_FORMAT_IN_PROGRESS 0x04
-#define SCSI_SENSEQ_REBUILD_IN_PROGRESS 0x05
-#define SCSI_SENSEQ_RECALCULATION_IN_PROGRESS 0x06
-#define SCSI_SENSEQ_OPERATION_IN_PROGRESS 0x07
-#define SCSI_SENSEQ_LONG_WRITE_IN_PROGRESS 0x08
-#define SCSI_SENSEQ_LOSS_OF_STREAMING 0x09
-#define SCSI_SENSEQ_PADDING_BLOCKS_ADDED 0x0A
-
-
-#define FILE_DEVICE_SCSI 0x0000001b
-
-#define IOCTL_SCSI_EXECUTE_IN ((FILE_DEVICE_SCSI << 16) + 0x0011)
-#define IOCTL_SCSI_EXECUTE_OUT ((FILE_DEVICE_SCSI << 16) + 0x0012)
-#define IOCTL_SCSI_EXECUTE_NONE ((FILE_DEVICE_SCSI << 16) + 0x0013)
-
-/* SMART support in ATAPI */
-#define IOCTL_SCSI_MINIPORT_SMART_VERSION ((FILE_DEVICE_SCSI << 16) + 0x0500)
-#define IOCTL_SCSI_MINIPORT_IDENTIFY ((FILE_DEVICE_SCSI << 16) + 0x0501)
-#define IOCTL_SCSI_MINIPORT_READ_SMART_ATTRIBS ((FILE_DEVICE_SCSI << 16) + 0x0502)
-#define IOCTL_SCSI_MINIPORT_READ_SMART_THRESHOLDS ((FILE_DEVICE_SCSI << 16) + 0x0503)
-#define IOCTL_SCSI_MINIPORT_ENABLE_SMART ((FILE_DEVICE_SCSI << 16) + 0x0504)
-#define IOCTL_SCSI_MINIPORT_DISABLE_SMART ((FILE_DEVICE_SCSI << 16) + 0x0505)
-#define IOCTL_SCSI_MINIPORT_RETURN_STATUS ((FILE_DEVICE_SCSI << 16) + 0x0506)
-#define IOCTL_SCSI_MINIPORT_ENABLE_DISABLE_AUTOSAVE ((FILE_DEVICE_SCSI << 16) + 0x0507)
-#define IOCTL_SCSI_MINIPORT_SAVE_ATTRIBUTE_VALUES ((FILE_DEVICE_SCSI << 16) + 0x0508)
-#define IOCTL_SCSI_MINIPORT_EXECUTE_OFFLINE_DIAGS ((FILE_DEVICE_SCSI << 16) + 0x0509)
-#define IOCTL_SCSI_MINIPORT_ENABLE_DISABLE_AUTO_OFFLINE ((FILE_DEVICE_SCSI << 16) + 0x050a)
-#define IOCTL_SCSI_MINIPORT_READ_SMART_LOG ((FILE_DEVICE_SCSI << 16) + 0x050b)
-#define IOCTL_SCSI_MINIPORT_WRITE_SMART_LOG ((FILE_DEVICE_SCSI << 16) + 0x050c)
-
-/* CLUSTER support */
-#define IOCTL_SCSI_MINIPORT_NOT_QUORUM_CAPABLE ((FILE_DEVICE_SCSI << 16) + 0x0520)
-#define IOCTL_SCSI_MINIPORT_NOT_CLUSTER_CAPABLE ((FILE_DEVICE_SCSI << 16) + 0x0521)
-
-/* READ_TOC formats */
-#define READ_TOC_FORMAT_TOC 0x00
-#define READ_TOC_FORMAT_SESSION 0x01
-#define READ_TOC_FORMAT_FULL_TOC 0x02
-#define READ_TOC_FORMAT_PMA 0x03
-#define READ_TOC_FORMAT_ATIP 0x04
-
-/* Read Capacity Data. Returned in Big Endian format */
-typedef struct _READ_CAPACITY_DATA {
- ULONG LogicalBlockAddress;
- ULONG BytesPerBlock;
-} READ_CAPACITY_DATA, *PREAD_CAPACITY_DATA;
-
-/* Read Block Limits Data. Returned in Big Endian format */
-typedef struct _READ_BLOCK_LIMITS {
- UCHAR Reserved;
- UCHAR BlockMaximumSize[3];
- UCHAR BlockMinimumSize[2];
-} READ_BLOCK_LIMITS_DATA, *PREAD_BLOCK_LIMITS_DATA;
-
-
-typedef struct _MODE_PARAMETER_HEADER {
- UCHAR ModeDataLength;
- UCHAR MediumType;
- UCHAR DeviceSpecificParameter;
- UCHAR BlockDescriptorLength;
-}MODE_PARAMETER_HEADER, *PMODE_PARAMETER_HEADER;
-
-typedef struct _MODE_PARAMETER_HEADER10 {
- UCHAR ModeDataLength[2];
- UCHAR MediumType;
- UCHAR DeviceSpecificParameter;
- UCHAR Reserved[2];
- UCHAR BlockDescriptorLength[2];
-} MODE_PARAMETER_HEADER10, *PMODE_PARAMETER_HEADER10;
-
-#define MODE_FD_SINGLE_SIDE 0x01
-#define MODE_FD_DOUBLE_SIDE 0x02
-#define MODE_FD_MAXIMUM_TYPE 0x1E
-#define MODE_DSP_FUA_SUPPORTED 0x10
-#define MODE_DSP_WRITE_PROTECT 0x80
-
-typedef struct _MODE_PARAMETER_BLOCK {
- UCHAR DensityCode;
- UCHAR NumberOfBlocks[3];
- UCHAR Reserved;
- UCHAR BlockLength[3];
-} MODE_PARAMETER_BLOCK, *PMODE_PARAMETER_BLOCK;
-
-typedef struct _MODE_DISCONNECT_PAGE {
- UCHAR PageCode : 6;
- UCHAR Reserved : 1;
- UCHAR PageSavable : 1;
- UCHAR PageLength;
- UCHAR BufferFullRatio;
- UCHAR BufferEmptyRatio;
- UCHAR BusInactivityLimit[2];
- UCHAR BusDisconnectTime[2];
- UCHAR BusConnectTime[2];
- UCHAR MaximumBurstSize[2];
- UCHAR DataTransferDisconnect : 2;
- UCHAR Reserved2[3];
-}MODE_DISCONNECT_PAGE, *PMODE_DISCONNECT_PAGE;
-
-typedef struct _MODE_CACHING_PAGE {
- UCHAR PageCode : 6;
- UCHAR Reserved : 1;
- UCHAR PageSavable : 1;
- UCHAR PageLength;
- UCHAR ReadDisableCache : 1;
- UCHAR MultiplicationFactor : 1;
- UCHAR WriteCacheEnable : 1;
- UCHAR Reserved2 : 5;
- UCHAR WriteRetensionPriority : 4;
- UCHAR ReadRetensionPriority : 4;
- UCHAR DisablePrefetchTransfer[2];
- UCHAR MinimumPrefetch[2];
- UCHAR MaximumPrefetch[2];
- UCHAR MaximumPrefetchCeiling[2];
-}MODE_CACHING_PAGE, *PMODE_CACHING_PAGE;
-
-typedef struct _MODE_CDROM_WRITE_PARAMETERS_PAGE {
- UCHAR PageLength;
- UCHAR WriteType : 4;
- UCHAR TestWrite : 1;
- UCHAR LinkSizeValid : 1;
- UCHAR BufferUnderrunFreeEnabled : 1;
- UCHAR Reserved2 : 1;
- UCHAR TrackMode : 4;
- UCHAR Copy : 1;
- UCHAR FixedPacket : 1;
- UCHAR MultiSession : 2;
- UCHAR DataBlockType : 4;
- UCHAR Reserved3 : 4;
- UCHAR LinkSize;
- UCHAR Reserved4;
- UCHAR HostApplicationCode : 6;
- UCHAR Reserved5 : 2;
- UCHAR SessionFormat;
- UCHAR Reserved6;
- UCHAR PacketSize[4];
- UCHAR AudioPauseLength[2];
- UCHAR Reserved7 : 7;
- UCHAR MediaCatalogNumberValid : 1;
- UCHAR MediaCatalogNumber[13];
- UCHAR MediaCatalogNumberZero;
- UCHAR MediaCatalogNumberAFrame;
- UCHAR Reserved8 : 7;
- UCHAR ISRCValid : 1;
- UCHAR ISRCCountry[2];
- UCHAR ISRCOwner[3];
- UCHAR ISRCRecordingYear[2];
- UCHAR ISRCSerialNumber[5];
- UCHAR ISRCZero;
- UCHAR ISRCAFrame;
- UCHAR ISRCReserved;
- UCHAR SubHeaderData[4];
-} MODE_CDROM_WRITE_PARAMETERS_PAGE, *PMODE_CDROM_WRITE_PARAMETERS_PAGE;
-
-typedef struct _MODE_FLEXIBLE_DISK_PAGE {
- UCHAR PageCode : 6;
- UCHAR Reserved : 1;
- UCHAR PageSavable : 1;
- UCHAR PageLength;
- UCHAR TransferRate[2];
- UCHAR NumberOfHeads;
- UCHAR SectorsPerTrack;
- UCHAR BytesPerSector[2];
- UCHAR NumberOfCylinders[2];
- UCHAR StartWritePrecom[2];
- UCHAR StartReducedCurrent[2];
- UCHAR StepRate[2];
- UCHAR StepPluseWidth;
- UCHAR HeadSettleDelay[2];
- UCHAR MotorOnDelay;
- UCHAR MotorOffDelay;
- UCHAR Reserved2 : 5;
- UCHAR MotorOnAsserted : 1;
- UCHAR StartSectorNumber : 1;
- UCHAR TrueReadySignal : 1;
- UCHAR StepPlusePerCyclynder : 4;
- UCHAR Reserved3 : 4;
- UCHAR WriteCompenstation;
- UCHAR HeadLoadDelay;
- UCHAR HeadUnloadDelay;
- UCHAR Pin2Usage : 4;
- UCHAR Pin34Usage : 4;
- UCHAR Pin1Usage : 4;
- UCHAR Pin4Usage : 4;
- UCHAR MediumRotationRate[2];
- UCHAR Reserved4[2];
-} MODE_FLEXIBLE_DISK_PAGE, *PMODE_FLEXIBLE_DISK_PAGE;
-
-typedef struct _MODE_FORMAT_PAGE {
- UCHAR PageCode : 6;
- UCHAR Reserved : 1;
- UCHAR PageSavable : 1;
- UCHAR PageLength;
- UCHAR TracksPerZone[2];
- UCHAR AlternateSectorsPerZone[2];
- UCHAR AlternateTracksPerZone[2];
- UCHAR AlternateTracksPerLogicalUnit[2];
- UCHAR SectorsPerTrack[2];
- UCHAR BytesPerPhysicalSector[2];
- UCHAR Interleave[2];
- UCHAR TrackSkewFactor[2];
- UCHAR CylinderSkewFactor[2];
- UCHAR Reserved2 : 4;
- UCHAR SurfaceFirst : 1;
- UCHAR RemovableMedia : 1;
- UCHAR HardSectorFormating : 1;
- UCHAR SoftSectorFormating : 1;
- UCHAR Reserved3[3];
-} MODE_FORMAT_PAGE, *PMODE_FORMAT_PAGE;
-
-typedef struct _MODE_RIGID_GEOMETRY_PAGE {
- UCHAR PageCode : 6;
- UCHAR Reserved : 1;
- UCHAR PageSavable : 1;
- UCHAR PageLength;
- UCHAR NumberOfCylinders[3];
- UCHAR NumberOfHeads;
- UCHAR StartWritePrecom[3];
- UCHAR StartReducedCurrent[3];
- UCHAR DriveStepRate[2];
- UCHAR LandZoneCyclinder[3];
- UCHAR RotationalPositionLock : 2;
- UCHAR Reserved2 : 6;
- UCHAR RotationOffset;
- UCHAR Reserved3;
- UCHAR RoataionRate[2];
- UCHAR Reserved4[2];
-} MODE_RIGID_GEOMETRY_PAGE, *PMODE_RIGID_GEOMETRY_PAGE;
-
-typedef struct _MODE_READ_WRITE_RECOVERY_PAGE {
- UCHAR PageCode : 6;
- UCHAR Reserved1 : 1;
- UCHAR PSBit : 1;
- UCHAR PageLength;
- UCHAR DCRBit : 1;
- UCHAR DTEBit : 1;
- UCHAR PERBit : 1;
- UCHAR EERBit : 1;
- UCHAR RCBit : 1;
- UCHAR TBBit : 1;
- UCHAR ARRE : 1;
- UCHAR AWRE : 1;
- UCHAR ReadRetryCount;
- UCHAR Reserved4[4];
- UCHAR WriteRetryCount;
- UCHAR Reserved5[3];
-} MODE_READ_WRITE_RECOVERY_PAGE, *PMODE_READ_WRITE_RECOVERY_PAGE;
-
-typedef struct _MODE_READ_RECOVERY_PAGE {
- UCHAR PageCode : 6;
- UCHAR Reserved1 : 1;
- UCHAR PSBit : 1;
- UCHAR PageLength;
- UCHAR DCRBit : 1;
- UCHAR DTEBit : 1;
- UCHAR PERBit : 1;
- UCHAR Reserved2 : 1;
- UCHAR RCBit : 1;
- UCHAR TBBit : 1;
- UCHAR Reserved3 : 2;
- UCHAR ReadRetryCount;
- UCHAR Reserved4[4];
-} MODE_READ_RECOVERY_PAGE, *PMODE_READ_RECOVERY_PAGE;
-
-typedef struct _MODE_INFO_EXCEPTIONS {
- UCHAR PageCode : 6;
- UCHAR Reserved1 : 1;
- UCHAR PSBit : 1;
- UCHAR PageLength;
- _ANONYMOUS_UNION union {
- UCHAR Flags;
- _ANONYMOUS_STRUCT struct {
- UCHAR LogErr : 1;
- UCHAR Reserved2 : 1;
- UCHAR Test : 1;
- UCHAR Dexcpt : 1;
- UCHAR Reserved3 : 3;
- UCHAR Perf : 1;
- } DUMMYSTRUCTNAME;
- } DUMMYUNIONNAME;
- UCHAR ReportMethod : 4;
- UCHAR Reserved4 : 4;
- UCHAR IntervalTimer[4];
- UCHAR ReportCount[4];
-} MODE_INFO_EXCEPTIONS, *PMODE_INFO_EXCEPTIONS;
-
-/* CDROM audio control */
-#define CDB_AUDIO_PAUSE 0x00
-#define CDB_AUDIO_RESUME 0x01
-#define CDB_DEVICE_START 0x11
-#define CDB_DEVICE_STOP 0x10
-#define CDB_EJECT_MEDIA 0x10
-#define CDB_LOAD_MEDIA 0x01
-#define CDB_SUBCHANNEL_HEADER 0x00
-#define CDB_SUBCHANNEL_BLOCK 0x01
-
-#define CDROM_AUDIO_CONTROL_PAGE 0x0E
-#define MODE_SELECT_IMMEDIATE 0x04
-#define MODE_SELECT_PFBIT 0x10
-
-#define CDB_USE_MSF 0x01
-
-typedef struct _PORT_OUTPUT {
- UCHAR ChannelSelection;
- UCHAR Volume;
-} PORT_OUTPUT, *PPORT_OUTPUT;
-
-typedef struct _AUDIO_OUTPUT {
- UCHAR CodePage;
- UCHAR ParameterLength;
- UCHAR Immediate;
- UCHAR Reserved[2];
- UCHAR LbaFormat;
- UCHAR LogicalBlocksPerSecond[2];
- PORT_OUTPUT PortOutput[4];
-} AUDIO_OUTPUT, *PAUDIO_OUTPUT;
-
-/* Multisession CDROMs */
-#define GET_LAST_SESSION 0x01
-#define GET_SESSION_DATA 0x02;
-
-/* Atapi 2.5 changers */
-typedef struct _MECHANICAL_STATUS_INFORMATION_HEADER {
- UCHAR CurrentSlot : 5;
- UCHAR ChangerState : 2;
- UCHAR Fault : 1;
- UCHAR Reserved : 5;
- UCHAR MechanismState : 3;
- UCHAR CurrentLogicalBlockAddress[3];
- UCHAR NumberAvailableSlots;
- UCHAR SlotTableLength[2];
-} MECHANICAL_STATUS_INFORMATION_HEADER, *PMECHANICAL_STATUS_INFORMATION_HEADER;
-
-typedef struct _SLOT_TABLE_INFORMATION {
- UCHAR DiscChanged : 1;
- UCHAR Reserved : 6;
- UCHAR DiscPresent : 1;
- UCHAR Reserved2[3];
-} SLOT_TABLE_INFORMATION, *PSLOT_TABLE_INFORMATION;
-
-typedef struct _MECHANICAL_STATUS {
- MECHANICAL_STATUS_INFORMATION_HEADER MechanicalStatusHeader;
- SLOT_TABLE_INFORMATION SlotTableInfo[1];
-} MECHANICAL_STATUS, *PMECHANICAL_STATUS;
-
-
-/* Tape definitions */
-typedef struct _TAPE_POSITION_DATA {
- UCHAR Reserved1 : 2;
- UCHAR BlockPositionUnsupported : 1;
- UCHAR Reserved2 : 3;
- UCHAR EndOfPartition : 1;
- UCHAR BeginningOfPartition : 1;
- UCHAR PartitionNumber;
- USHORT Reserved3;
- UCHAR FirstBlock[4];
- UCHAR LastBlock[4];
- UCHAR Reserved4;
- UCHAR NumberOfBlocks[3];
- UCHAR NumberOfBytes[4];
-} TAPE_POSITION_DATA, *PTAPE_POSITION_DATA;
-
-/* This structure is used to convert little endian ULONGs
- to SCSI CDB big endians values. */
-typedef union _EIGHT_BYTE {
- _ANONYMOUS_STRUCT struct {
- UCHAR Byte0;
- UCHAR Byte1;
- UCHAR Byte2;
- UCHAR Byte3;
- UCHAR Byte4;
- UCHAR Byte5;
- UCHAR Byte6;
- UCHAR Byte7;
- } DUMMYSTRUCTNAME;
- ULONGLONG AsULongLong;
-} EIGHT_BYTE, *PEIGHT_BYTE;
-
-typedef union _FOUR_BYTE {
- _ANONYMOUS_STRUCT struct {
- UCHAR Byte0;
- UCHAR Byte1;
- UCHAR Byte2;
- UCHAR Byte3;
- } DUMMYSTRUCTNAME;
- ULONG AsULong;
-} FOUR_BYTE, *PFOUR_BYTE;
-
-typedef union _TWO_BYTE {
- _ANONYMOUS_STRUCT struct {
- UCHAR Byte0;
- UCHAR Byte1;
- } DUMMYSTRUCTNAME;
- USHORT AsUShort;
-} TWO_BYTE, *PTWO_BYTE;
-
-/* Byte reversing macro for converting between
- big- and little-endian formats */
-#define REVERSE_BYTES_QUAD(Destination, Source) { \
- PEIGHT_BYTE _val1 = (PEIGHT_BYTE)(Destination); \
- PEIGHT_BYTE _val2 = (PEIGHT_BYTE)(Source); \
- _val1->Byte7 = _val2->Byte0; \
- _val1->Byte6 = _val2->Byte1; \
- _val1->Byte5 = _val2->Byte2; \
- _val1->Byte4 = _val2->Byte3; \
- _val1->Byte3 = _val2->Byte4; \
- _val1->Byte2 = _val2->Byte5; \
- _val1->Byte1 = _val2->Byte6; \
- _val1->Byte0 = _val2->Byte7; \
-}
-
-#define REVERSE_BYTES(Destination, Source) { \
- PFOUR_BYTE _val1 = (PFOUR_BYTE)(Destination); \
- PFOUR_BYTE _val2 = (PFOUR_BYTE)(Source); \
- _val1->Byte3 = _val2->Byte0; \
- _val1->Byte2 = _val2->Byte1; \
- _val1->Byte1 = _val2->Byte2; \
- _val1->Byte0 = _val2->Byte3; \
-}
-
-#define REVERSE_BYTES_SHORT(Destination, Source) { \
- PTWO_BYTE _val1 = (PTWO_BYTE)(Destination); \
- PTWO_BYTE _val2 = (PTWO_BYTE)(Source); \
- _val1->Byte1 = _val2->Byte0; \
- _val1->Byte0 = _val2->Byte1; \
-}
-
-#define REVERSE_SHORT(Short) { \
- UCHAR _val; \
- PTWO_BYTE _val2 = (PTWO_BYTE)(Short); \
- _val = _val2->Byte0; \
- _val2->Byte0 = _val2->Byte1; \
- _val2->Byte1 = _val; \
-}
-
-#define REVERSE_LONG(Long) { \
- UCHAR _val; \
- PFOUR_BYTE _val2 = (PFOUR_BYTE)(Long); \
- _val = _val2->Byte3; \
- _val2->Byte3 = _val2->Byte0; \
- _val2->Byte0 = _val; \
- _val = _val2->Byte2; \
- _val2->Byte2 = _val2->Byte1; \
- _val2->Byte1 = _val; \
-}
-
-#define WHICH_BIT(Data, Bit) { \
- UCHAR _val; \
- for (_val = 0; _val < 32; _val++) { \
- if (((Data) >> _val) == 1) { \
- break; \
- } \
- } \
- ASSERT(_val != 32); \
- (Bit) = _val; \
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __SCSI_H */
diff --git a/winsup/w32api/include/ddk/scsiscan.h b/winsup/w32api/include/ddk/scsiscan.h
deleted file mode 100644
index 5468328..0000000
--- a/winsup/w32api/include/ddk/scsiscan.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * scsiscan.h
- *
- * SCSI scanner driver interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __SCSISCAN_H
-#define __SCSISCAN_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-#define IOCTL_SCSISCAN_CMD \
- CTL_CODE(FILE_DEVICE_SCANNER, SCSISCAN_CMD_CODE, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
-
-#define IOCTL_SCSISCAN_LOCKDEVICE \
- CTL_CODE(FILE_DEVICE_SCANNER, SCSISCAN_LOCKDEVICE, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
-
-#define IOCTL_SCSISCAN_SET_TIMEOUT \
- CTL_CODE(FILE_DEVICE_SCANNER, SCSISCAN_SET_TIMEOUT, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_SCSISCAN_GET_INFO \
- CTL_CODE(FILE_DEVICE_SCANNER, SCSISCAN_GET_INFO, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
-
-#define IOCTL_SCSISCAN_UNLOCKDEVICE \
- CTL_CODE(FILE_DEVICE_SCANNER, SCSISCAN_UNLOCKDEVICE, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
-
-
-/* SCSISCAN_CMD.SrbFlags constants */
-#define SRB_FLAGS_DISABLE_SYNCH_TRANSFER 0x00000008
-#define SRB_FLAGS_DISABLE_AUTOSENSE 0x00000020
-#define SRB_FLAGS_DATA_IN 0x00000040
-#define SRB_FLAGS_DATA_OUT 0x00000080
-#define SRB_FLAGS_NO_DATA_TRANSFER 0x00000000
-
-/* SCSISCAN_CMD.pSrbStatus constants */
-#define SRB_STATUS_PENDING 0x00
-#define SRB_STATUS_SUCCESS 0x01
-#define SRB_STATUS_ABORTED 0x02
-#define SRB_STATUS_ABORT_FAILED 0x03
-#define SRB_STATUS_ERROR 0x04
-#define SRB_STATUS_BUSY 0x05
-#define SRB_STATUS_INVALID_REQUEST 0x06
-#define SRB_STATUS_INVALID_PATH_ID 0x07
-#define SRB_STATUS_NO_DEVICE 0x08
-#define SRB_STATUS_TIMEOUT 0x09
-#define SRB_STATUS_SELECTION_TIMEOUT 0x0A
-#define SRB_STATUS_COMMAND_TIMEOUT 0x0B
-#define SRB_STATUS_MESSAGE_REJECTED 0x0D
-#define SRB_STATUS_BUS_RESET 0x0E
-#define SRB_STATUS_PARITY_ERROR 0x0F
-#define SRB_STATUS_REQUEST_SENSE_FAILED 0x10
-#define SRB_STATUS_NO_HBA 0x11
-#define SRB_STATUS_DATA_OVERRUN 0x12
-#define SRB_STATUS_UNEXPECTED_BUS_FREE 0x13
-#define SRB_STATUS_PHASE_SEQUENCE_FAILURE 0x14
-#define SRB_STATUS_BAD_SRB_BLOCK_LENGTH 0x15
-#define SRB_STATUS_REQUEST_FLUSHED 0x16
-#define SRB_STATUS_INVALID_LUN 0x20
-#define SRB_STATUS_INVALID_TARGET_ID 0x21
-#define SRB_STATUS_BAD_FUNCTION 0x22
-#define SRB_STATUS_ERROR_RECOVERY 0x23
-#define SRB_STATUS_QUEUE_FROZEN 0x40
-#define SRB_STATUS_AUTOSENSE_VALID 0x80
-
-#define SRB_STATUS(Status) (Status & ~(SRB_STATUS_AUTOSENSE_VALID | SRB_STATUS_QUEUE_FROZEN))
-
-typedef struct _SCSISCAN_CMD {
- ULONG Reserved1;
- ULONG Size;
- ULONG SrbFlags;
- UCHAR CdbLength;
- UCHAR SenseLength;
- UCHAR Reserved2;
- UCHAR Reserved3;
- ULONG TransferLength;
- UCHAR Cdb[16];
- PUCHAR pSrbStatus;
- PUCHAR pSenseBuffer;
-} SCSISCAN_CMD, *PSCSISCAN_CMD;
-
-#define MAX_STRING 128
-
-/* SCSISCAN_INFO.Flags constants */
-#define SCSISCAN_RESERVED 0x000
-#define SCSISCAN_CMD_CODE 0x004
-#define SCSISCAN_LOCKDEVICE 0x005
-#define SCSISCAN_UNLOCKDEVICE 0x006
-#define SCSISCAN_SET_TIMEOUT 0x007
-#define SCSISCAN_GET_INFO 0x008
-
-typedef struct _SCSISCAN_INFO {
- ULONG Size;
- ULONG Flags;
- UCHAR PortNumber;
- UCHAR PathId;
- UCHAR TargetId;
- UCHAR Lun;
- UCHAR AdapterName[MAX_STRING];
- ULONG Reserved;
-} SCSISCAN_INFO, *PSCSISCAN_INFO;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __SCSISCAN_H */
diff --git a/winsup/w32api/include/ddk/scsiwmi.h b/winsup/w32api/include/ddk/scsiwmi.h
deleted file mode 100644
index 7aae2a8..0000000
--- a/winsup/w32api/include/ddk/scsiwmi.h
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * scsiwmi.h
- *
- * SCSI WMILIB interface.
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __SCSIWMI_H
-#define __SCSIWMI_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#pragma pack(push,4)
-
-#include "ntddk.h"
-#include "srb.h"
-
-
-typedef struct _SCSIWMI_REQUEST_CONTEXT {
- PVOID UserContext;
- ULONG BufferSize;
- PUCHAR Buffer;
- UCHAR MinorFunction;
- UCHAR ReturnStatus;
- ULONG ReturnSize;
-} SCSIWMI_REQUEST_CONTEXT, *PSCSIWMI_REQUEST_CONTEXT;
-
-#ifdef _GUID_DEFINED
-# warning _GUID_DEFINED is deprecated, use GUID_DEFINED instead
-#endif
-
-#if ! (defined _GUID_DEFINED || defined GUID_DEFINED)
-#define GUID_DEFINED
-typedef struct _GUID {
- unsigned long Data1;
- unsigned short Data2;
- unsigned short Data3;
- unsigned char Data4[ 8 ];
-} GUID;
-#endif
-
-#ifndef _LPCGUID_DEFINED
-#define _LPCGUID_DEFINED
-typedef const GUID *LPCGUID;
-#endif
-
-typedef struct _SCSIWMIGUIDREGINFO {
- LPCGUID Guid;
- ULONG InstanceCount;
- ULONG Flags;
-} SCSIWMIGUIDREGINFO, *PSCSIWMIGUIDREGINFO;
-
-typedef UCHAR DDKAPI
-(*PSCSIWMI_QUERY_REGINFO)(
- /*IN*/ PVOID DeviceContext,
- /*IN*/ PSCSIWMI_REQUEST_CONTEXT RequestContext,
- /*OUT*/ PWCHAR *MofResourceName);
-
-typedef BOOLEAN DDKAPI
-(*PSCSIWMI_QUERY_DATABLOCK)(
- /*IN*/ PVOID Context,
- /*IN*/ PSCSIWMI_REQUEST_CONTEXT DispatchContext,
- /*IN*/ ULONG GuidIndex,
- /*IN*/ ULONG InstanceIndex,
- /*IN*/ ULONG InstanceCount,
- /*IN OUT*/ PULONG InstanceLengthArray,
- /*IN*/ ULONG BufferAvail,
- /*OUT*/ PUCHAR Buffer);
-
-typedef BOOLEAN DDKAPI
-(*PSCSIWMI_SET_DATABLOCK)(
- /*IN*/ PVOID DeviceContext,
- /*IN*/ PSCSIWMI_REQUEST_CONTEXT RequestContext,
- /*IN*/ ULONG GuidIndex,
- /*IN*/ ULONG InstanceIndex,
- /*IN*/ ULONG BufferSize,
- /*IN*/ PUCHAR Buffer);
-
-typedef BOOLEAN DDKAPI
-(*PSCSIWMI_SET_DATAITEM)(
- /*IN*/ PVOID DeviceContext,
- /*IN*/ PSCSIWMI_REQUEST_CONTEXT RequestContext,
- /*IN*/ ULONG GuidIndex,
- /*IN*/ ULONG InstanceIndex,
- /*IN*/ ULONG DataItemId,
- /*IN*/ ULONG BufferSize,
- /*IN*/ PUCHAR Buffer);
-
-typedef BOOLEAN DDKAPI
-(*PSCSIWMI_EXECUTE_METHOD)(
- /*IN*/ PVOID DeviceContext,
- /*IN*/ PSCSIWMI_REQUEST_CONTEXT RequestContext,
- /*IN*/ ULONG GuidIndex,
- /*IN*/ ULONG InstanceIndex,
- /*IN*/ ULONG MethodId,
- /*IN*/ ULONG InBufferSize,
- /*IN*/ ULONG OutBufferSize,
- /*IN OUT*/ PUCHAR Buffer);
-
-typedef enum _SCSIWMI_ENABLE_DISABLE_CONTROL {
- ScsiWmiEventControl,
- ScsiWmiDataBlockControl
-} SCSIWMI_ENABLE_DISABLE_CONTROL;
-
-typedef BOOLEAN DDKAPI
-(*PSCSIWMI_FUNCTION_CONTROL)(
- /*IN*/ PVOID DeviceContext,
- /*IN*/ PSCSIWMI_REQUEST_CONTEXT RequestContext,
- /*IN*/ ULONG GuidIndex,
- /*IN*/ SCSIWMI_ENABLE_DISABLE_CONTROL Function,
- /*IN*/ BOOLEAN Enable);
-
-typedef struct _SCSIWMILIB_CONTEXT {
- ULONG GuidCount;
- PSCSIWMIGUIDREGINFO GuidList;
- PSCSIWMI_QUERY_REGINFO QueryWmiRegInfo;
- PSCSIWMI_QUERY_DATABLOCK QueryWmiDataBlock;
- PSCSIWMI_SET_DATABLOCK SetWmiDataBlock;
- PSCSIWMI_SET_DATAITEM SetWmiDataItem;
- PSCSIWMI_EXECUTE_METHOD ExecuteWmiMethod;
- PSCSIWMI_FUNCTION_CONTROL WmiFunctionControl;
-} SCSI_WMILIB_CONTEXT, *PSCSI_WMILIB_CONTEXT;
-
-SCSIPORTAPI
-BOOLEAN
-DDKAPI
-ScsiPortWmiDispatchFunction(
- /*IN*/ PSCSI_WMILIB_CONTEXT WmiLibInfo,
- /*IN*/ UCHAR MinorFunction,
- /*IN*/ PVOID DeviceContext,
- /*IN*/ PSCSIWMI_REQUEST_CONTEXT RequestContext,
- /*IN*/ PVOID DataPath,
- /*IN*/ ULONG BufferSize,
- /*IN*/ PVOID Buffer);
-
-#define ScsiPortWmiFireAdapterEvent( \
- HwDeviceExtension, \
- Guid, \
- InstanceIndex, \
- EventDataSize, \
- EventData) \
- ScsiPortWmiFireLogicalUnitEvent( \
- HwDeviceExtension, \
- 0xff, \
- 0, \
- 0, \
- Guid, \
- InstanceIndex, \
- EventDataSize, \
- EventData)
-
-/*
- * ULONG
- * ScsiPortWmiGetReturnSize(
- * PSCSIWMI_REQUEST_CONTEXT RequestContext);
- */
-#define ScsiPortWmiGetReturnSize(RequestContext) \
- ((RequestContext)->ReturnSize)
-
-/* UCHAR
- * ScsiPortWmiGetReturnStatus(
- * PSCSIWMI_REQUEST_CONTEXT RequestContext);
- */
-#define ScsiPortWmiGetReturnStatus(RequestContext) \
- ((RequestContext)->ReturnStatus)
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortWmiPostProcess(
- /*IN*/ PSCSIWMI_REQUEST_CONTEXT RequestContext,
- /*IN*/ UCHAR SrbStatus,
- /*IN*/ ULONG BufferUsed);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortWmiFireLogicalUnitEvent(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ UCHAR PathId,
- /*IN*/ UCHAR TargetId,
- /*IN*/ UCHAR Lun,
- /*IN*/ LPGUID Guid,
- /*IN*/ ULONG InstanceIndex,
- /*IN*/ ULONG EventDataSize,
- /*IN*/ PVOID EventData);
-
-#pragma pack(pop)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __SCSIWMI_H */
diff --git a/winsup/w32api/include/ddk/smbus.h b/winsup/w32api/include/ddk/smbus.h
deleted file mode 100644
index a88d397..0000000
--- a/winsup/w32api/include/ddk/smbus.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * smbus.h
- *
- * System Management Bus driver interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __SMBUS_H
-#define __SMBUS_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(SMBCLASS)
- #define SMBCLASSAPI DECLSPEC_IMPORT
-#else
- #define SMBCLASSAPI DECLSPEC_EXPORT
-#endif
-
-#define SMB_BUS_REQUEST \
- CTL_CODE(FILE_DEVICE_UNKNOWN, 0, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define SMB_DEREGISTER_ALARM_NOTIFY \
- CTL_CODE(FILE_DEVICE_UNKNOWN, 2, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define SMB_REGISTER_ALARM_NOTIFY \
- CTL_CODE(FILE_DEVICE_UNKNOWN, 1, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-
-struct _SMB_CLASS;
-
-#define SMB_MAX_DATA_SIZE 32
-
-/* SMB_REQUEST.Status constants */
-#define SMB_STATUS_OK 0x00
-#define SMB_UNKNOWN_FAILURE 0x07
-#define SMB_ADDRESS_NOT_ACKNOWLEDGED 0x10
-#define SMB_DEVICE_ERROR 0x11
-#define SMB_COMMAND_ACCESS_DENIED 0x12
-#define SMB_UNKNOWN_ERROR 0x13
-#define SMB_DEVICE_ACCESS_DENIED 0x17
-#define SMB_TIMEOUT 0x18
-#define SMB_UNSUPPORTED_PROTOCOL 0x19
-#define SMB_BUS_BUSY 0x1A
-
-/* SMB_REQUEST.Protocol constants */
-#define SMB_WRITE_QUICK 0x00
-#define SMB_READ_QUICK 0x01
-#define SMB_SEND_BYTE 0x02
-#define SMB_RECEIVE_BYTE 0x03
-#define SMB_WRITE_BYTE 0x04
-#define SMB_READ_BYTE 0x05
-#define SMB_WRITE_WORD 0x06
-#define SMB_READ_WORD 0x07
-#define SMB_WRITE_BLOCK 0x08
-#define SMB_READ_BLOCK 0x09
-#define SMB_PROCESS_CALL 0x0A
-#define SMB_MAXIMUM_PROTOCOL 0x0A
-
-typedef struct _SMB_REQUEST {
- UCHAR Status;
- UCHAR Protocol;
- UCHAR Address;
- UCHAR Command;
- UCHAR BlockLength;
- UCHAR Data[SMB_MAX_DATA_SIZE];
-} SMB_REQUEST, *PSMB_REQUEST;
-
-typedef VOID STDCALL
-(*SMB_ALARM_NOTIFY)(
- PVOID Context,
- UCHAR Address,
- USHORT Data);
-
-typedef struct _SMB_REGISTER_ALARM {
- UCHAR MinAddress;
- UCHAR MaxAddress;
- SMB_ALARM_NOTIFY NotifyFunction;
- PVOID NotifyContext;
-} SMB_REGISTER_ALARM, *PSMB_REGISTER_ALARM;
-
-/* SMB_CLASS.XxxVersion constants */
-#define SMB_CLASS_MAJOR_VERSION 0x0001
-#define SMB_CLASS_MINOR_VERSION 0x0000
-
-typedef NTSTATUS DDKAPI
-(*SMB_RESET_DEVICE)(
- /*IN*/ struct _SMB_CLASS *SmbClass,
- /*IN*/ PVOID SmbMiniport);
-
-typedef VOID DDKAPI
-(*SMB_START_IO)(
- /*IN*/ struct _SMB_CLASS *SmbClass,
- /*IN*/ PVOID SmbMiniport);
-
-typedef NTSTATUS DDKAPI
-(*SMB_STOP_DEVICE)(
- /*IN*/ struct _SMB_CLASS *SmbClass,
- /*IN*/ PVOID SmbMiniport);
-
-typedef struct _SMB_CLASS {
- USHORT MajorVersion;
- USHORT MinorVersion;
- PVOID Miniport;
- PDEVICE_OBJECT DeviceObject;
- PDEVICE_OBJECT PDO;
- PDEVICE_OBJECT LowerDeviceObject;
- PIRP CurrentIrp;
- PSMB_REQUEST CurrentSmb;
- SMB_RESET_DEVICE ResetDevice;
- SMB_START_IO StartIo;
- SMB_STOP_DEVICE StopDevice;
-} SMB_CLASS, *PSMB_CLASS;
-
-SMBCLASSAPI
-VOID
-DDKAPI
-SmbClassAlarm(
- /*IN*/ PSMB_CLASS SmbClass,
- /*IN*/ UCHAR Address,
- /*IN*/ USHORT Data);
-
-SMBCLASSAPI
-VOID
-DDKAPI
-SmbClassCompleteRequest(
- /*IN*/ PSMB_CLASS SmbClass);
-
-typedef NTSTATUS DDKAPI
-(*PSMB_INITIALIZE_MINIPORT)(
- /*IN*/ PSMB_CLASS SmbClass,
- /*IN*/ PVOID MiniportExtension,
- /*IN*/ PVOID MiniportContext);
-
-SMBCLASSAPI
-NTSTATUS
-DDKAPI
-SmbClassCreateFdo(
- /*IN*/ PDRIVER_OBJECT DriverObject,
- /*IN*/ PDEVICE_OBJECT PDO,
- /*IN*/ ULONG MiniportExtensionSize,
- /*IN*/ PSMB_INITIALIZE_MINIPORT MiniportInitialize,
- /*IN*/ PVOID MiniportContext,
- /*OUT*/ PDEVICE_OBJECT *FDO);
-
-SMBCLASSAPI
-NTSTATUS
-DDKAPI
-SmbClassInitializeDevice(
- /*IN*/ ULONG MajorVersion,
- /*IN*/ ULONG MinorVersion,
- /*IN*/ PDRIVER_OBJECT DriverObject);
-
-SMBCLASSAPI
-VOID
-DDKAPI
-SmbClassLockDevice(
- /*IN*/ PSMB_CLASS SmbClass);
-
-SMBCLASSAPI
-VOID
-DDKAPI
-SmbClassUnlockDevice(
- /*IN*/ PSMB_CLASS SmbClass);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __SMBUS_H */
diff --git a/winsup/w32api/include/ddk/srb.h b/winsup/w32api/include/ddk/srb.h
deleted file mode 100644
index a93854c..0000000
--- a/winsup/w32api/include/ddk/srb.h
+++ /dev/null
@@ -1,753 +0,0 @@
-/*
- * scsi.h
- *
- * Interface between SCSI miniport drivers and the SCSI port driver.
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __SRB_H
-#define __SRB_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-#if defined(_SCSIPORT_)
- #define SCSIPORTAPI DECLSPEC_EXPORT
-#else
- #define SCSIPORTAPI DECLSPEC_IMPORT
-#endif
-
-#ifdef DBG
-#define DebugPrint(x) ScsiDebugPrint x
-#else
-#define DebugPrint(x)
-#endif
-
-typedef PHYSICAL_ADDRESS SCSI_PHYSICAL_ADDRESS, *PSCSI_PHYSICAL_ADDRESS;
-
-#define SP_UNINITIALIZED_VALUE ((ULONG) ~0)
-#define SP_UNTAGGED ((UCHAR) ~0)
-
-#define SRB_SIMPLE_TAG_REQUEST 0x20
-#define SRB_HEAD_OF_QUEUE_TAG_REQUEST 0x21
-#define SRB_ORDERED_QUEUE_TAG_REQUEST 0x22
-
-#define SRB_STATUS_QUEUE_FROZEN 0x40
-#define SRB_STATUS_AUTOSENSE_VALID 0x80
-
-#define SRB_STATUS(Status) \
- (Status & ~(SRB_STATUS_AUTOSENSE_VALID | SRB_STATUS_QUEUE_FROZEN))
-
-#define MAXIMUM_CDB_SIZE 12
-
-#ifdef DBG
-#define SCSI_PORT_SIGNATURE 0x54524f50
-#endif
-
-
-#define SCSI_MAXIMUM_LOGICAL_UNITS 8
-#define SCSI_MAXIMUM_TARGETS_PER_BUS 128
-#define SCSI_MAXIMUM_LUNS_PER_TARGET 255
-#define SCSI_MAXIMUM_BUSES 8
-#define SCSI_MINIMUM_PHYSICAL_BREAKS 16
-#define SCSI_MAXIMUM_PHYSICAL_BREAKS 255
-#define SCSI_MAXIMUM_TARGETS 8
-
-#define SRB_FUNCTION_WMI 0x17
-
-#define SRB_WMI_FLAGS_ADAPTER_REQUEST 0x0001
-
-#define SP_BUS_PARITY_ERROR 0x0001
-#define SP_UNEXPECTED_DISCONNECT 0x0002
-#define SP_INVALID_RESELECTION 0x0003
-#define SP_BUS_TIME_OUT 0x0004
-#define SP_PROTOCOL_ERROR 0x0005
-#define SP_INTERNAL_ADAPTER_ERROR 0x0006
-#define SP_REQUEST_TIMEOUT 0x0007
-#define SP_IRQ_NOT_RESPONDING 0x0008
-#define SP_BAD_FW_WARNING 0x0009
-#define SP_BAD_FW_ERROR 0x000a
-#define SP_LOST_WMI_MINIPORT_REQUEST 0x000b
-
-/* SCSI_REQUEST_BLOCK.Function constants */
-#define SRB_FUNCTION_EXECUTE_SCSI 0x00
-#define SRB_FUNCTION_CLAIM_DEVICE 0x01
-#define SRB_FUNCTION_IO_CONTROL 0x02
-#define SRB_FUNCTION_RECEIVE_EVENT 0x03
-#define SRB_FUNCTION_RELEASE_QUEUE 0x04
-#define SRB_FUNCTION_ATTACH_DEVICE 0x05
-#define SRB_FUNCTION_RELEASE_DEVICE 0x06
-#define SRB_FUNCTION_SHUTDOWN 0x07
-#define SRB_FUNCTION_FLUSH 0x08
-#define SRB_FUNCTION_ABORT_COMMAND 0x10
-#define SRB_FUNCTION_RELEASE_RECOVERY 0x11
-#define SRB_FUNCTION_RESET_BUS 0x12
-#define SRB_FUNCTION_RESET_DEVICE 0x13
-#define SRB_FUNCTION_TERMINATE_IO 0x14
-#define SRB_FUNCTION_FLUSH_QUEUE 0x15
-#define SRB_FUNCTION_REMOVE_DEVICE 0x16
-#define SRB_FUNCTION_WMI 0x17
-#define SRB_FUNCTION_LOCK_QUEUE 0x18
-#define SRB_FUNCTION_UNLOCK_QUEUE 0x19
-#define SRB_FUNCTION_RESET_LOGICAL_UNIT 0x20
-
-/* SCSI_REQUEST_BLOCK.SrbStatus constants */
-#define SRB_STATUS_PENDING 0x00
-#define SRB_STATUS_SUCCESS 0x01
-#define SRB_STATUS_ABORTED 0x02
-#define SRB_STATUS_ABORT_FAILED 0x03
-#define SRB_STATUS_ERROR 0x04
-#define SRB_STATUS_BUSY 0x05
-#define SRB_STATUS_INVALID_REQUEST 0x06
-#define SRB_STATUS_INVALID_PATH_ID 0x07
-#define SRB_STATUS_NO_DEVICE 0x08
-#define SRB_STATUS_TIMEOUT 0x09
-#define SRB_STATUS_SELECTION_TIMEOUT 0x0A
-#define SRB_STATUS_COMMAND_TIMEOUT 0x0B
-#define SRB_STATUS_MESSAGE_REJECTED 0x0D
-#define SRB_STATUS_BUS_RESET 0x0E
-#define SRB_STATUS_PARITY_ERROR 0x0F
-#define SRB_STATUS_REQUEST_SENSE_FAILED 0x10
-#define SRB_STATUS_NO_HBA 0x11
-#define SRB_STATUS_DATA_OVERRUN 0x12
-#define SRB_STATUS_UNEXPECTED_BUS_FREE 0x13
-#define SRB_STATUS_PHASE_SEQUENCE_FAILURE 0x14
-#define SRB_STATUS_BAD_SRB_BLOCK_LENGTH 0x15
-#define SRB_STATUS_REQUEST_FLUSHED 0x16
-#define SRB_STATUS_INVALID_LUN 0x20
-#define SRB_STATUS_INVALID_TARGET_ID 0x21
-#define SRB_STATUS_BAD_FUNCTION 0x22
-#define SRB_STATUS_ERROR_RECOVERY 0x23
-#define SRB_STATUS_NOT_POWERED 0x24
-#define SRB_STATUS_INTERNAL_ERROR 0x30
-
-/* SCSI_REQUEST_BLOCK.SrbFlags constants */
-#define SRB_FLAGS_QUEUE_ACTION_ENABLE 0x00000002
-#define SRB_FLAGS_DISABLE_DISCONNECT 0x00000004
-#define SRB_FLAGS_DISABLE_SYNCH_TRANSFER 0x00000008
-#define SRB_FLAGS_BYPASS_FROZEN_QUEUE 0x00000010
-#define SRB_FLAGS_DISABLE_AUTOSENSE 0x00000020
-#define SRB_FLAGS_DATA_IN 0x00000040
-#define SRB_FLAGS_DATA_OUT 0x00000080
-#define SRB_FLAGS_NO_DATA_TRANSFER 0x00000000
-#define SRB_FLAGS_UNSPECIFIED_DIRECTION (SRB_FLAGS_DATA_IN | SRB_FLAGS_DATA_OUT)
-#define SRB_FLAGS_NO_QUEUE_FREEZE 0x00000100
-#define SRB_FLAGS_ADAPTER_CACHE_ENABLE 0x00000200
-#define SRB_FLAGS_FREE_SENSE_BUFFER 0x00000400
-#define SRB_FLAGS_IS_ACTIVE 0x00010000
-#define SRB_FLAGS_ALLOCATED_FROM_ZONE 0x00020000
-#define SRB_FLAGS_SGLIST_FROM_POOL 0x00040000
-#define SRB_FLAGS_BYPASS_LOCKED_QUEUE 0x00080000
-#define SRB_FLAGS_NO_KEEP_AWAKE 0x00100000
-#define SRB_FLAGS_PORT_DRIVER_ALLOCSENSE 0x00200000
-#define SRB_FLAGS_PORT_DRIVER_SENSEHASPORT 0x00400000
-#define SRB_FLAGS_DONT_START_NEXT_PACKET 0x00800000
-#define SRB_FLAGS_PORT_DRIVER_RESERVED 0x0F000000
-#define SRB_FLAGS_CLASS_DRIVER_RESERVED 0xF0000000
-
-typedef struct _SCSI_REQUEST_BLOCK {
- USHORT Length;
- UCHAR Function;
- UCHAR SrbStatus;
- UCHAR ScsiStatus;
- UCHAR PathId;
- UCHAR TargetId;
- UCHAR Lun;
- UCHAR QueueTag;
- UCHAR QueueAction;
- UCHAR CdbLength;
- UCHAR SenseInfoBufferLength;
- ULONG SrbFlags;
- ULONG DataTransferLength;
- ULONG TimeOutValue;
- PVOID DataBuffer;
- PVOID SenseInfoBuffer;
- struct _SCSI_REQUEST_BLOCK *NextSrb;
- PVOID OriginalRequest;
- PVOID SrbExtension;
- _ANONYMOUS_UNION union {
- ULONG InternalStatus;
- ULONG QueueSortKey;
- } DUMMYUNIONNAME;
-#if defined(_WIN64)
- ULONG Reserved;
-#endif
- UCHAR Cdb[16];
-} SCSI_REQUEST_BLOCK, *PSCSI_REQUEST_BLOCK;
-
-#define SCSI_REQUEST_BLOCK_SIZE sizeof(SCSI_REQUEST_BLOCK)
-
-typedef struct _ACCESS_RANGE {
- SCSI_PHYSICAL_ADDRESS RangeStart;
- ULONG RangeLength;
- BOOLEAN RangeInMemory;
-} ACCESS_RANGE, *PACCESS_RANGE;
-
-/* PORT_CONFIGURATION_INFORMATION.Dma64BitAddresses constants */
-#define SCSI_DMA64_MINIPORT_SUPPORTED 0x01
-#define SCSI_DMA64_SYSTEM_SUPPORTED 0x80
-
-typedef struct _PORT_CONFIGURATION_INFORMATION {
- ULONG Length;
- ULONG SystemIoBusNumber;
- INTERFACE_TYPE AdapterInterfaceType;
- ULONG BusInterruptLevel;
- ULONG BusInterruptVector;
- KINTERRUPT_MODE InterruptMode;
- ULONG MaximumTransferLength;
- ULONG NumberOfPhysicalBreaks;
- ULONG DmaChannel;
- ULONG DmaPort;
- DMA_WIDTH DmaWidth;
- DMA_SPEED DmaSpeed;
- ULONG AlignmentMask;
- ULONG NumberOfAccessRanges;
- ACCESS_RANGE (*AccessRanges)[];
- PVOID Reserved;
- UCHAR NumberOfBuses;
- UCHAR InitiatorBusId[8];
- BOOLEAN ScatterGather;
- BOOLEAN Master;
- BOOLEAN CachesData;
- BOOLEAN AdapterScansDown;
- BOOLEAN AtdiskPrimaryClaimed;
- BOOLEAN AtdiskSecondaryClaimed;
- BOOLEAN Dma32BitAddresses;
- BOOLEAN DemandMode;
- BOOLEAN MapBuffers;
- BOOLEAN NeedPhysicalAddresses;
- BOOLEAN TaggedQueuing;
- BOOLEAN AutoRequestSense;
- BOOLEAN MultipleRequestPerLu;
- BOOLEAN ReceiveEvent;
- BOOLEAN RealModeInitialized;
- BOOLEAN BufferAccessScsiPortControlled;
- UCHAR MaximumNumberOfTargets;
- UCHAR ReservedUchars[2];
- ULONG SlotNumber;
- ULONG BusInterruptLevel2;
- ULONG BusInterruptVector2;
- KINTERRUPT_MODE InterruptMode2;
- ULONG DmaChannel2;
- ULONG DmaPort2;
- DMA_WIDTH DmaWidth2;
- DMA_SPEED DmaSpeed2;
- ULONG DeviceExtensionSize;
- ULONG SpecificLuExtensionSize;
- ULONG SrbExtensionSize;
- UCHAR Dma64BitAddresses;
- BOOLEAN ResetTargetSupported;
- UCHAR MaximumNumberOfLogicalUnits;
- BOOLEAN WmiDataProvider;
-} PORT_CONFIGURATION_INFORMATION, *PPORT_CONFIGURATION_INFORMATION;
-
-#define CONFIG_INFO_VERSION_2 sizeof(PORT_CONFIGURATION_INFORMATION)
-
-typedef enum _SCSI_NOTIFICATION_TYPE {
- RequestComplete,
- NextRequest,
- NextLuRequest,
- ResetDetected,
- CallDisableInterrupts,
- CallEnableInterrupts,
- RequestTimerCall,
- BusChangeDetected,
- WMIEvent,
- WMIReregister
-} SCSI_NOTIFICATION_TYPE, *PSCSI_NOTIFICATION_TYPE;
-
-#ifdef __GNUC__
-__extension__ /* enums limited to range of integer */
-#endif
-typedef enum _SCSI_ADAPTER_CONTROL_TYPE {
- ScsiQuerySupportedControlTypes = 0,
- ScsiStopAdapter,
- ScsiRestartAdapter,
- ScsiSetBootConfig,
- ScsiSetRunningConfig,
- ScsiAdapterControlMax,
- MakeAdapterControlTypeSizeOfUlong = 0xffffffff
-} SCSI_ADAPTER_CONTROL_TYPE, *PSCSI_ADAPTER_CONTROL_TYPE;
-
-typedef enum _SCSI_ADAPTER_CONTROL_STATUS {
- ScsiAdapterControlSuccess = 0,
- ScsiAdapterControlUnsuccessful
-} SCSI_ADAPTER_CONTROL_STATUS, *PSCSI_ADAPTER_CONTROL_STATUS;
-
-typedef struct _SCSI_SUPPORTED_CONTROL_TYPE_LIST {
- ULONG MaxControlType;
- BOOLEAN SupportedTypeList[0];
-} SCSI_SUPPORTED_CONTROL_TYPE_LIST, *PSCSI_SUPPORTED_CONTROL_TYPE_LIST;
-
-typedef SCSI_ADAPTER_CONTROL_STATUS DDKAPI
-(*PHW_ADAPTER_CONTROL)(
- /*IN*/ PVOID DeviceExtension,
- /*IN*/ SCSI_ADAPTER_CONTROL_TYPE ControlType,
- /*IN*/ PVOID Parameters);
-
-typedef BOOLEAN DDKAPI
-(*PHW_ADAPTER_STATE)(
- /*IN*/ PVOID DeviceExtension,
- /*IN*/ PVOID Context,
- /*IN*/ BOOLEAN SaveState);
-
-#define SP_RETURN_NOT_FOUND 0
-#define SP_RETURN_FOUND 1
-#define SP_RETURN_ERROR 2
-#define SP_RETURN_BAD_CONFIG 3
-
-typedef ULONG DDKAPI
-(*PHW_FIND_ADAPTER)(
- /*IN*/ PVOID DeviceExtension,
- /*IN*/ PVOID HwContext,
- /*IN*/ PVOID BusInformation,
- /*IN*/ PCHAR ArgumentString,
- /*IN OUT*/ PPORT_CONFIGURATION_INFORMATION ConfigInfo,
- /*OUT*/ PBOOLEAN Again);
-
-typedef BOOLEAN DDKAPI
-(*PHW_INITIALIZE)(
- /*IN*/ PVOID DeviceExtension);
-
-typedef BOOLEAN DDKAPI
-(*PHW_INTERRUPT)(
- /*IN*/ PVOID DeviceExtension);
-
-typedef BOOLEAN DDKAPI
-(*PHW_RESET_BUS)(
- /*IN*/ PVOID DeviceExtension,
- /*IN*/ ULONG PathId);
-
-typedef VOID DDKAPI
-(*PHW_DMA_STARTED)(
- /*IN*/ PVOID DeviceExtension);
-
-typedef BOOLEAN DDKAPI
-(*PHW_STARTIO)(
- /*IN*/ PVOID DeviceExtension,
- /*IN*/ PSCSI_REQUEST_BLOCK Srb);
-
-typedef VOID DDKAPI
-(*PHW_TIMER)(
- /*IN*/ PVOID DeviceExtension);
-
-typedef struct _HW_INITIALIZATION_DATA {
- ULONG HwInitializationDataSize;
- INTERFACE_TYPE AdapterInterfaceType;
- PHW_INITIALIZE HwInitialize;
- PHW_STARTIO HwStartIo;
- PHW_INTERRUPT HwInterrupt;
- PHW_FIND_ADAPTER HwFindAdapter;
- PHW_RESET_BUS HwResetBus;
- PHW_DMA_STARTED HwDmaStarted;
- PHW_ADAPTER_STATE HwAdapterState;
- ULONG DeviceExtensionSize;
- ULONG SpecificLuExtensionSize;
- ULONG SrbExtensionSize;
- ULONG NumberOfAccessRanges;
- PVOID Reserved;
- BOOLEAN MapBuffers;
- BOOLEAN NeedPhysicalAddresses;
- BOOLEAN TaggedQueuing;
- BOOLEAN AutoRequestSense;
- BOOLEAN MultipleRequestPerLu;
- BOOLEAN ReceiveEvent;
- USHORT VendorIdLength;
- PVOID VendorId;
- USHORT ReservedUshort;
- USHORT DeviceIdLength;
- PVOID DeviceId;
- PHW_ADAPTER_CONTROL HwAdapterControl;
-} HW_INITIALIZATION_DATA, *PHW_INITIALIZATION_DATA;
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortCompleteRequest(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ UCHAR PathId,
- /*IN*/ UCHAR TargetId,
- /*IN*/ UCHAR Lun,
- /*IN*/ UCHAR SrbStatus);
-
-/*
- * ULONG
- * ScsiPortConvertPhysicalAddressToUlong(
- * IN SCSI_PHYSICAL_ADDRESS Address);
- */
-#define ScsiPortConvertPhysicalAddressToUlong(Address) ((Address).LowPart)
-
-SCSIPORTAPI
-SCSI_PHYSICAL_ADDRESS
-DDKAPI
-ScsiPortConvertUlongToPhysicalAddress(
- /*IN*/ ULONG UlongAddress);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortFlushDma(
- /*IN*/ PVOID DeviceExtension);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortFreeDeviceBase(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVOID MappedAddress);
-
-SCSIPORTAPI
-ULONG
-DDKAPI
-ScsiPortGetBusData(
- /*IN*/ PVOID DeviceExtension,
- /*IN*/ ULONG BusDataType,
- /*IN*/ ULONG SystemIoBusNumber,
- /*IN*/ ULONG SlotNumber,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG Length);
-
-SCSIPORTAPI
-PVOID
-DDKAPI
-ScsiPortGetDeviceBase(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ INTERFACE_TYPE BusType,
- /*IN*/ ULONG SystemIoBusNumber,
- /*IN*/ SCSI_PHYSICAL_ADDRESS IoAddress,
- /*IN*/ ULONG NumberOfBytes,
- /*IN*/ BOOLEAN InIoSpace);
-
-SCSIPORTAPI
-PVOID
-DDKAPI
-ScsiPortGetLogicalUnit(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ UCHAR PathId,
- /*IN*/ UCHAR TargetId,
- /*IN*/ UCHAR Lun);
-
-SCSIPORTAPI
-SCSI_PHYSICAL_ADDRESS
-DDKAPI
-ScsiPortGetPhysicalAddress(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PSCSI_REQUEST_BLOCK Srb /*OPTIONAL*/,
- /*IN*/ PVOID VirtualAddress,
- /*OUT*/ ULONG *Length);
-
-SCSIPORTAPI
-PSCSI_REQUEST_BLOCK
-DDKAPI
-ScsiPortGetSrb(
- /*IN*/ PVOID DeviceExtension,
- /*IN*/ UCHAR PathId,
- /*IN*/ UCHAR TargetId,
- /*IN*/ UCHAR Lun,
- /*IN*/ LONG QueueTag);
-
-SCSIPORTAPI
-PVOID
-DDKAPI
-ScsiPortGetUncachedExtension(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PPORT_CONFIGURATION_INFORMATION ConfigInfo,
- /*IN*/ ULONG NumberOfBytes);
-
-SCSIPORTAPI
-PVOID
-DDKAPI
-ScsiPortGetVirtualAddress(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ SCSI_PHYSICAL_ADDRESS PhysicalAddress);
-
-SCSIPORTAPI
-ULONG
-DDKAPI
-ScsiPortInitialize(
- /*IN*/ PVOID Argument1,
- /*IN*/ PVOID Argument2,
- /*IN*/ struct _HW_INITIALIZATION_DATA *HwInitializationData,
- /*IN*/ PVOID HwContext /*OPTIONAL*/);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortIoMapTransfer(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PSCSI_REQUEST_BLOCK Srb,
- /*IN*/ ULONG LogicalAddress,
- /*IN*/ ULONG Length);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortLogError(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PSCSI_REQUEST_BLOCK Srb /*OPTIONAL*/,
- /*IN*/ UCHAR PathId,
- /*IN*/ UCHAR TargetId,
- /*IN*/ UCHAR Lun,
- /*IN*/ ULONG ErrorCode,
- /*IN*/ ULONG UniqueId);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortMoveMemory(
- /*IN*/ PVOID WriteBuffer,
- /*IN*/ PVOID ReadBuffer,
- /*IN*/ ULONG Length);
-
-SCSIPORTAPI
-VOID
-DDKCDECLAPI
-ScsiPortNotification(
- /*IN*/ SCSI_NOTIFICATION_TYPE NotificationType,
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ ...);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortQuerySystemTime(
- /*OUT*/ PLARGE_INTEGER CurrentTime);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortReadPortBufferUchar(
- /*IN*/ PUCHAR Port,
- /*IN*/ PUCHAR Buffer,
- /*IN*/ ULONG Count);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortReadPortBufferUlong(
- /*IN*/ PULONG Port,
- /*IN*/ PULONG Buffer,
- /*IN*/ ULONG Count);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortReadPortBufferUshort(
- /*IN*/ PUSHORT Port,
- /*IN*/ PUSHORT Buffer,
- /*IN*/ ULONG Count);
-
-SCSIPORTAPI
-UCHAR
-DDKAPI
-ScsiPortReadPortUchar(
- /*IN*/ PUCHAR Port);
-
-SCSIPORTAPI
-ULONG
-DDKAPI
-ScsiPortReadPortUlong(
- /*IN*/ PULONG Port);
-
-SCSIPORTAPI
-USHORT
-DDKAPI
-ScsiPortReadPortUshort(
- /*IN*/ PUSHORT Port);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortReadRegisterBufferUchar(
- /*IN*/ PUCHAR Register,
- /*IN*/ PUCHAR Buffer,
- /*IN*/ ULONG Count);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortReadRegisterBufferUlong(
- /*IN*/ PULONG Register,
- /*IN*/ PULONG Buffer,
- /*IN*/ ULONG Count);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortReadRegisterBufferUshort(
- /*IN*/ PUSHORT Register,
- /*IN*/ PUSHORT Buffer,
- /*IN*/ ULONG Count);
-
-SCSIPORTAPI
-UCHAR
-DDKAPI
-ScsiPortReadRegisterUchar(
- /*IN*/ PUCHAR Register);
-
-SCSIPORTAPI
-ULONG
-DDKAPI
-ScsiPortReadRegisterUlong(
- /*IN*/ PULONG Register);
-
-SCSIPORTAPI
-USHORT
-DDKAPI
-ScsiPortReadRegisterUshort(
- /*IN*/ PUSHORT Register);
-
-SCSIPORTAPI
-ULONG
-DDKAPI
-ScsiPortSetBusDataByOffset(
- /*IN*/ PVOID DeviceExtension,
- /*IN*/ ULONG BusDataType,
- /*IN*/ ULONG SystemIoBusNumber,
- /*IN*/ ULONG SlotNumber,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG Offset,
- /*IN*/ ULONG Length);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortStallExecution(
- /*IN*/ ULONG Delay);
-
-SCSIPORTAPI
-BOOLEAN
-DDKAPI
-ScsiPortValidateRange(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ INTERFACE_TYPE BusType,
- /*IN*/ ULONG SystemIoBusNumber,
- /*IN*/ SCSI_PHYSICAL_ADDRESS IoAddress,
- /*IN*/ ULONG NumberOfBytes,
- /*IN*/ BOOLEAN InIoSpace);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortWritePortBufferUchar(
- /*IN*/ PUCHAR Port,
- /*IN*/ PUCHAR Buffer,
- /*IN*/ ULONG Count);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortWritePortBufferUlong(
- /*IN*/ PULONG Port,
- /*IN*/ PULONG Buffer,
- /*IN*/ ULONG Count);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortWritePortBufferUshort(
- /*IN*/ PUSHORT Port,
- /*IN*/ PUSHORT Buffer,
- /*IN*/ ULONG Count);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortWritePortUchar(
- /*IN*/ PUCHAR Port,
- /*IN*/ UCHAR Value);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortWritePortUlong(
- /*IN*/ PULONG Port,
- /*IN*/ ULONG Value);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortWritePortUshort(
- /*IN*/ PUSHORT Port,
- /*IN*/ USHORT Value);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortWriteRegisterBufferUchar(
- /*IN*/ PUCHAR Register,
- /*IN*/ PUCHAR Buffer,
- /*IN*/ ULONG Count);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortWriteRegisterBufferUlong(
- /*IN*/ PULONG Register,
- /*IN*/ PULONG Buffer,
- /*IN*/ ULONG Count);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortWriteRegisterBufferUshort(
- /*IN*/ PUSHORT Register,
- /*IN*/ PUSHORT Buffer,
- /*IN*/ ULONG Count);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortWriteRegisterUchar(
- /*IN*/ PUCHAR Register,
- /*IN*/ ULONG Value);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortWriteRegisterUlong(
- /*IN*/ PULONG Register,
- /*IN*/ ULONG Value);
-
-SCSIPORTAPI
-VOID
-DDKAPI
-ScsiPortWriteRegisterUshort(
- /*IN*/ PUSHORT Register,
- /*IN*/ USHORT Value);
-
-SCSIPORTAPI
-VOID
-DDKCDECLAPI
-ScsiDebugPrint(
- /*IN*/ ULONG DebugPrintLevel,
- /*IN*/ PCCHAR DebugMessage,
- /*IN*/ ...);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __SRB_H */
diff --git a/winsup/w32api/include/ddk/storport.h b/winsup/w32api/include/ddk/storport.h
deleted file mode 100644
index a7df9a1..0000000
--- a/winsup/w32api/include/ddk/storport.h
+++ /dev/null
@@ -1,422 +0,0 @@
-/*
- * storport.h
- *
- * StorPort interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __STORPORT_H
-#define __STORPORT_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include "srb.h"
-
-#if defined(_STORPORT_)
- #define STORPORTAPI DECLSPEC_EXPORT
-#else
- #define STORPORTAPI DECLSPEC_IMPORT
-#endif
-
-
-typedef PHYSICAL_ADDRESS STOR_PHYSICAL_ADDRESS;
-
-typedef struct _STOR_SCATTER_GATHER_ELEMENT {
- STOR_PHYSICAL_ADDRESS PhysicalAddress;
- ULONG Length;
- ULONG_PTR Reserved;
-} STOR_SCATTER_GATHER_ELEMENT, *PSTOR_SCATTER_GATHER_ELEMENT;
-
-typedef struct _STOR_SCATTER_GATHER_LIST {
- ULONG NumberOfElements;
- ULONG_PTR Reserved;
- STOR_SCATTER_GATHER_ELEMENT List[0];
-} STOR_SCATTER_GATHER_LIST, *PSTOR_SCATTER_GATHER_LIST;
-
-typedef struct _SCSI_WMI_REQUEST_BLOCK {
- USHORT Length;
- UCHAR Function;
- UCHAR SrbStatus;
- UCHAR WMISubFunction;
- UCHAR PathId;
- UCHAR TargetId;
- UCHAR Lun;
- UCHAR Reserved1;
- UCHAR WMIFlags;
- UCHAR Reserved2[2];
- ULONG SrbFlags;
- ULONG DataTransferLength;
- ULONG TimeOutValue;
- PVOID DataBuffer;
- PVOID DataPath;
- PVOID Reserved3;
- PVOID OriginalRequest;
- PVOID SrbExtension;
- ULONG Reserved4;
- UCHAR Reserved5[16];
-} SCSI_WMI_REQUEST_BLOCK, *PSCSI_WMI_REQUEST_BLOCK;
-
-
-STORPORTAPI
-ULONG
-DDKAPI
-StorPortInitialize(
- /*IN*/ PVOID Argument1,
- /*IN*/ PVOID Argument2,
- /*IN*/ PHW_INITIALIZATION_DATA HwInitializationData,
- /*IN*/ PVOID Unused);
-
-STORPORTAPI
-VOID
-DDKAPI
-StorPortFreeDeviceBase(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVOID MappedAddress);
-
-STORPORTAPI
-ULONG
-DDKAPI
-StorPortGetBusData(
- /*IN*/ PVOID DeviceExtension,
- /*IN*/ ULONG BusDataType,
- /*IN*/ ULONG SystemIoBusNumber,
- /*IN*/ ULONG SlotNumber,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG Length);
-
-STORPORTAPI
-ULONG
-DDKAPI
-StorPortSetBusDataByOffset(
- /*IN*/ PVOID DeviceExtension,
- /*IN*/ ULONG BusDataType,
- /*IN*/ ULONG SystemIoBusNumber,
- /*IN*/ ULONG SlotNumber,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG Offset,
- /*IN*/ ULONG Length);
-
-STORPORTAPI
-PVOID
-DDKAPI
-StorPortGetDeviceBase(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ INTERFACE_TYPE BusType,
- /*IN*/ ULONG SystemIoBusNumber,
- /*IN*/ SCSI_PHYSICAL_ADDRESS IoAddress,
- /*IN*/ ULONG NumberOfBytes,
- /*IN*/ BOOLEAN InIoSpace);
-
-STORPORTAPI
-PVOID
-DDKAPI
-StorPortGetLogicalUnit(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ UCHAR PathId,
- /*IN*/ UCHAR TargetId,
- /*IN*/ UCHAR Lun);
-
-STORPORTAPI
-PSCSI_REQUEST_BLOCK
-DDKAPI
-StorPortGetSrb(
- /*IN*/ PVOID DeviceExtension,
- /*IN*/ UCHAR PathId,
- /*IN*/ UCHAR TargetId,
- /*IN*/ UCHAR Lun,
- /*IN*/ LONG QueueTag);
-
-STORPORTAPI
-STOR_PHYSICAL_ADDRESS
-DDKAPI
-StorPortGetPhysicalAddress(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PSCSI_REQUEST_BLOCK Srb,
- /*IN*/ PVOID VirtualAddress,
- /*OUT*/ ULONG *Length);
-
-STORPORTAPI
-PVOID
-DDKAPI
-StorPortGetVirtualAddress(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ STOR_PHYSICAL_ADDRESS PhysicalAddress);
-
-STORPORTAPI
-PVOID
-DDKAPI
-StorPortGetUncachedExtension(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PPORT_CONFIGURATION_INFORMATION ConfigInfo,
- /*IN*/ ULONG NumberOfBytes);
-
-STORPORTAPI
-VOID
-DDKCDECLAPI
-StorPortNotification(
- /*IN*/ SCSI_NOTIFICATION_TYPE NotificationType,
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ ...);
-
-STORPORTAPI
-VOID
-DDKAPI
-StorPortLogError(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PSCSI_REQUEST_BLOCK Srb /*OPTIONAL*/,
- /*IN*/ UCHAR PathId,
- /*IN*/ UCHAR TargetId,
- /*IN*/ UCHAR Lun,
- /*IN*/ ULONG ErrorCode,
- /*IN*/ ULONG UniqueId);
-
-STORPORTAPI
-VOID
-DDKAPI
-StorPortCompleteRequest(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ UCHAR PathId,
- /*IN*/ UCHAR TargetId,
- /*IN*/ UCHAR Lun,
- /*IN*/ UCHAR SrbStatus);
-
-STORPORTAPI
-VOID
-DDKAPI
-StorPortMoveMemory(
- /*IN*/ PVOID WriteBuffer,
- /*IN*/ PVOID ReadBuffer,
- /*IN*/ ULONG Length);
-
-STORPORTAPI
-VOID
-DDKAPI
-StorPortStallExecution(
- /*IN*/ ULONG Delay);
-
-STORPORTAPI
-STOR_PHYSICAL_ADDRESS
-DDKAPI
-StorPortConvertUlong64ToPhysicalAddress(
- /*IN*/ ULONG64 UlongAddress);
-
-STORPORTAPI
-ULONG64
-DDKAPI
-StorPortConvertPhysicalAddressToUlong64(
- /*IN*/ STOR_PHYSICAL_ADDRESS Address);
-
-STORPORTAPI
-BOOLEAN
-DDKAPI
-StorPortValidateRange(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ INTERFACE_TYPE BusType,
- /*IN*/ ULONG SystemIoBusNumber,
- /*IN*/ STOR_PHYSICAL_ADDRESS IoAddress,
- /*IN*/ ULONG NumberOfBytes,
- /*IN*/ BOOLEAN InIoSpace);
-
-STORPORTAPI
-VOID
-DDKCDECLAPI
-StorPortDebugPrint(
- /*IN*/ ULONG DebugPrintLevel,
- /*IN*/ PCCHAR DebugMessage,
- /*IN*/ ...);
-
-STORPORTAPI
-UCHAR
-DDKAPI
-StorPortReadPortUchar(
- /*IN*/ PUCHAR Port);
-
-STORPORTAPI
-ULONG
-DDKAPI
-StorPortReadPortUlong(
- /*IN*/ PULONG Port);
-
-STORPORTAPI
-USHORT
-DDKAPI
-StorPortReadPortUshort(
- /*IN*/ PUSHORT Port);
-
-STORPORTAPI
-UCHAR
-DDKAPI
-StorPortReadRegisterUchar(
- /*IN*/ PUCHAR Register);
-
-STORPORTAPI
-ULONG
-DDKAPI
-StorPortReadRegisterUlong(
- /*IN*/ PULONG Register);
-
-STORPORTAPI
-USHORT
-DDKAPI
-StorPortReadRegisterUshort(
- /*IN*/ PUSHORT Register);
-
-STORPORTAPI
-VOID
-DDKAPI
-StorPortWritePortUchar(
- /*IN*/ PUCHAR Port,
- /*IN*/ UCHAR Value);
-
-STORPORTAPI
-VOID
-DDKAPI
-StorPortWritePortUlong(
- /*IN*/ PULONG Port,
- /*IN*/ ULONG Value);
-
-STORPORTAPI
-VOID
-DDKAPI
-StorPortWritePortUshort(
- /*IN*/ PUSHORT Port,
- /*IN*/ USHORT Value);
-
-STORPORTAPI
-VOID
-DDKAPI
-StorPortWriteRegisterUchar(
- /*IN*/ PUCHAR Port,
- /*IN*/ UCHAR Value);
-
-STORPORTAPI
-VOID
-DDKAPI
-StorPortWriteRegisterUlong(
- /*IN*/ PULONG Port,
- /*IN*/ ULONG Value);
-
-STORPORTAPI
-VOID
-DDKAPI
-StorPortWriteRegisterUshort(
- /*IN*/ PUSHORT Port,
- /*IN*/ USHORT Value);
-
-STORPORTAPI
-BOOLEAN
-DDKAPI
-StorPortPauseDevice(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ UCHAR PathId,
- /*IN*/ UCHAR TargetId,
- /*IN*/ UCHAR Lun,
- /*IN*/ ULONG TimeOut);
-
-STORPORTAPI
-BOOLEAN
-DDKAPI
-StorPortResumeDevice(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ UCHAR PathId,
- /*IN*/ UCHAR TargetId,
- /*IN*/ UCHAR Lun);
-
-STORPORTAPI
-BOOLEAN
-DDKAPI
-StorPortPause(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ ULONG TimeOut);
-
-STORPORTAPI
-BOOLEAN
-DDKAPI
-StorPortResume(
- /*IN*/ PVOID HwDeviceExtension);
-
-STORPORTAPI
-BOOLEAN
-DDKAPI
-StorPortDeviceBusy(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ UCHAR PathId,
- /*IN*/ UCHAR TargetId,
- /*IN*/ UCHAR Lun,
- /*IN*/ ULONG RequestsToComplete);
-
-STORPORTAPI
-BOOLEAN
-DDKAPI
-StorPortDeviceReady(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ UCHAR PathId,
- /*IN*/ UCHAR TargetId,
- /*IN*/ UCHAR Lun);
-
-STORPORTAPI
-BOOLEAN
-DDKAPI
-StorPortBusy(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ ULONG RequestsToComplete);
-
-STORPORTAPI
-BOOLEAN
-DDKAPI
-StorPortReady(
- /*IN*/ PVOID HwDeviceExtension);
-
-STORPORTAPI
-PSTOR_SCATTER_GATHER_LIST
-DDKAPI
-StorPortGetScatterGatherList(
- /*IN*/ PVOID DeviceExtension,
- /*IN*/ PSCSI_REQUEST_BLOCK Srb);
-
-typedef BOOLEAN DDKAPI
-(*PSTOR_SYNCHRONIZED_ACCESS)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVOID Context);
-
-STORPORTAPI
-VOID
-DDKAPI
-StorPortSynchronizeAccess(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PSTOR_SYNCHRONIZED_ACCESS SynchronizedAccessRoutine,
- /*IN*/ PVOID Context);
-
-#ifdef DBG
-#define DebugPrint(x) StorPortDebugPrint x
-#else
-#define DebugPrint(x)
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STORPORT_H */
diff --git a/winsup/w32api/include/ddk/tdi.h b/winsup/w32api/include/ddk/tdi.h
deleted file mode 100644
index 0a48b41..0000000
--- a/winsup/w32api/include/ddk/tdi.h
+++ /dev/null
@@ -1,593 +0,0 @@
-/*
- * tdi.h
- *
- * TDI user mode definitions
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __TDI_H
-#define __TDI_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include "ntddtdi.h"
-#include "tdistat.h"
-#include "netpnp.h"
-
-/* Basic types */
-
-typedef LONG TDI_STATUS;
-typedef PVOID CONNECTION_CONTEXT;
-
-typedef struct _TDI_CONNECTION_INFORMATION {
- LONG UserDataLength;
- PVOID UserData;
- LONG OptionsLength;
- PVOID Options;
- LONG RemoteAddressLength;
- PVOID RemoteAddress;
-} TDI_CONNECTION_INFORMATION, *PTDI_CONNECTION_INFORMATION;
-
-typedef struct _TDI_REQUEST {
- union {
- HANDLE AddressHandle;
- CONNECTION_CONTEXT ConnectionContext;
- HANDLE ControlChannel;
- } Handle;
- PVOID RequestNotifyObject;
- PVOID RequestContext;
- TDI_STATUS TdiStatus;
-} TDI_REQUEST, *PTDI_REQUEST;
-
-typedef struct _TDI_REQUEST_STATUS {
- TDI_STATUS Status;
- PVOID RequestContext;
- ULONG BytesTransferred;
-} TDI_REQUEST_STATUS, *PTDI_REQUEST_STATUS;
-
-typedef struct _TDI_CONNECT_REQUEST {
- TDI_REQUEST Request;
- PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
- PTDI_CONNECTION_INFORMATION ReturnConnectionInformation;
- LARGE_INTEGER Timeout;
-} TDI_REQUEST_CONNECT, *PTDI_REQUEST_CONNECT;
-
-typedef struct _TDI_REQUEST_ACCEPT {
- TDI_REQUEST Request;
- PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
- PTDI_CONNECTION_INFORMATION ReturnConnectionInformation;
-} TDI_REQUEST_ACCEPT, *PTDI_REQUEST_ACCEPT;
-
-typedef struct _TDI_REQUEST_LISTEN {
- TDI_REQUEST Request;
- PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
- PTDI_CONNECTION_INFORMATION ReturnConnectionInformation;
- USHORT ListenFlags;
-} TDI_REQUEST_LISTEN, *PTDI_REQUEST_LISTEN;
-
-typedef struct _TDI_DISCONNECT_REQUEST {
- TDI_REQUEST Request;
- LARGE_INTEGER Timeout;
-} TDI_REQUEST_DISCONNECT, *PTDI_REQUEST_DISCONNECT;
-
-typedef struct _TDI_REQUEST_SEND {
- TDI_REQUEST Request;
- USHORT SendFlags;
-} TDI_REQUEST_SEND, *PTDI_REQUEST_SEND;
-
-typedef struct _TDI_REQUEST_RECEIVE {
- TDI_REQUEST Request;
- USHORT ReceiveFlags;
-} TDI_REQUEST_RECEIVE, *PTDI_REQUEST_RECEIVE;
-
-typedef struct _TDI_REQUEST_SEND_DATAGRAM {
- TDI_REQUEST Request;
- PTDI_CONNECTION_INFORMATION SendDatagramInformation;
-} TDI_REQUEST_SEND_DATAGRAM, *PTDI_REQUEST_SEND_DATAGRAM;
-
-typedef struct _TDI_REQUEST_RECEIVE_DATAGRAM {
- TDI_REQUEST Request;
- PTDI_CONNECTION_INFORMATION ReceiveDatagramInformation;
- PTDI_CONNECTION_INFORMATION ReturnInformation;
- USHORT ReceiveFlags;
-} TDI_REQUEST_RECEIVE_DATAGRAM, *PTDI_REQUEST_RECEIVE_DATAGRAM;
-
-typedef struct _TDI_REQUEST_SET_EVENT {
- TDI_REQUEST Request;
- LONG EventType;
- PVOID EventHandler;
- PVOID EventContext;
-} TDI_REQUEST_SET_EVENT_HANDLER, *PTDI_REQUEST_SET_EVENT_HANDLER;
-
-#define TDI_RECEIVE_BROADCAST 0x00000004
-#define TDI_RECEIVE_MULTICAST 0x00000008
-#define TDI_RECEIVE_PARTIAL 0x00000010
-#define TDI_RECEIVE_NORMAL 0x00000020
-#define TDI_RECEIVE_EXPEDITED 0x00000040
-#define TDI_RECEIVE_PEEK 0x00000080
-#define TDI_RECEIVE_NO_RESPONSE_EXP 0x00000100
-#define TDI_RECEIVE_COPY_LOOKAHEAD 0x00000200
-#define TDI_RECEIVE_ENTIRE_MESSAGE 0x00000400
-#define TDI_RECEIVE_AT_DISPATCH_LEVEL 0x00000800
-#define TDI_RECEIVE_CONTROL_INFO 0x00001000
-
-/* Listen flags */
-#define TDI_QUERY_ACCEPT 0x00000001
-
-/* Options used for both SendOptions and ReceiveIndicators */
-#define TDI_SEND_EXPEDITED 0x0020
-#define TDI_SEND_PARTIAL 0x0040
-#define TDI_SEND_NO_RESPONSE_EXPECTED 0x0080
-#define TDI_SEND_NON_BLOCKING 0x0100
-#define TDI_SEND_AND_DISCONNECT 0x0200
-
-/* Disconnect Flags */
-#define TDI_DISCONNECT_WAIT 0x0001
-#define TDI_DISCONNECT_ABORT 0x0002
-#define TDI_DISCONNECT_RELEASE 0x0004
-
-/* TdiRequest structure for TdiQueryInformation request */
-typedef struct _TDI_REQUEST_QUERY_INFORMATION {
- TDI_REQUEST Request;
- ULONG QueryType;
- PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
-} TDI_REQUEST_QUERY_INFORMATION, *PTDI_REQUEST_QUERY_INFORMATION;
-
-/* TdiRequest structure for TdiSetInformation request */
-typedef struct _TDI_REQUEST_SET_INFORMATION {
- TDI_REQUEST Request;
- ULONG SetType;
- PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
-} TDI_REQUEST_SET_INFORMATION, *PTDI_REQUEST_SET_INFORMATION;
-
-typedef TDI_REQUEST_SET_INFORMATION TDI_REQ_SET_INFORMATION, *PTDI_REQ_SET_INFORMATION;
-
-typedef union _TDI_REQUEST_TYPE {
- TDI_REQUEST_ACCEPT TdiAccept;
- TDI_REQUEST_CONNECT TdiConnect;
- TDI_REQUEST_DISCONNECT TdiDisconnect;
- TDI_REQUEST_LISTEN TdiListen;
- TDI_REQUEST_QUERY_INFORMATION TdiQueryInformation;
- TDI_REQUEST_RECEIVE TdiReceive;
- TDI_REQUEST_RECEIVE_DATAGRAM TdiReceiveDatagram;
- TDI_REQUEST_SEND TdiSend;
- TDI_REQUEST_SEND_DATAGRAM TdiSendDatagram;
- TDI_REQUEST_SET_EVENT_HANDLER TdiSetEventHandler;
- TDI_REQUEST_SET_INFORMATION TdiSetInformation;
-} TDI_REQUEST_TYPE, *PTDI_REQUEST_TYPE;
-
-/* Query information types */
-
-/* Generic query info types that must be supported by all transports */
-#define TDI_QUERY_BROADCAST_ADDRESS 0x00000001
-#define TDI_QUERY_PROVIDER_INFO 0x00000002
-#define TDI_QUERY_ADDRESS_INFO 0x00000003
-#define TDI_QUERY_CONNECTION_INFO 0x00000004
-#define TDI_QUERY_PROVIDER_STATISTICS 0x00000005
-#define TDI_QUERY_DATAGRAM_INFO 0x00000006
-#define TDI_QUERY_DATA_LINK_ADDRESS 0x00000007
-#define TDI_QUERY_NETWORK_ADDRESS 0x00000008
-#define TDI_QUERY_MAX_DATAGRAM_INFO 0x00000009
-
-/* Netbios specific query information types */
-#define TDI_QUERY_ADAPTER_STATUS 0x00000100
-#define TDI_QUERY_SESSION_STATUS 0x00000200
-#define TDI_QUERY_FIND_NAME 0x00000300
-
-/* Structures used for TdiQueryInformation and TdiSetInformation */
-
-typedef struct _TDI_ENDPOINT_INFO {
- ULONG State;
- ULONG Event;
- ULONG TransmittedTsdus;
- ULONG ReceivedTsdus;
- ULONG TransmissionErrors;
- ULONG ReceiveErrors;
- ULONG MinimumLookaheadData;
- ULONG MaximumLookaheadData;
- ULONG PriorityLevel;
- ULONG SecurityLevel;
- ULONG SecurityCompartment;
-} TDI_ENDPOINT_INFO, *PTDI_ENDPOINT_INFO;
-
-typedef struct _TDI_CONNECTION_INFO {
- ULONG State;
- ULONG Event;
- ULONG TransmittedTsdus;
- ULONG ReceivedTsdus;
- ULONG TransmissionErrors;
- ULONG ReceiveErrors;
- LARGE_INTEGER Throughput;
- LARGE_INTEGER Delay;
- ULONG SendBufferSize;
- ULONG ReceiveBufferSize;
- BOOLEAN Unreliable;
-} TDI_CONNECTION_INFO, *PTDI_CONNECTION_INFO;
-
-typedef struct _TDI_DATAGRAM_INFO {
- ULONG MaximumDatagramBytes;
- ULONG MaximumDatagramCount;
-} TDI_DATAGRAM_INFO, *PTDI_DATAGRAM_INFO;
-
-typedef struct _TDI_MAX_DATAGRAM_INFO {
- ULONG MaxDatagramSize;
-} TDI_MAX_DATAGRAM_INFO, *PTDI_MAX_DATAGRAM_INFO;
-
-typedef struct _TDI_PROVIDER_INFO {
- ULONG Version;
- ULONG MaxSendSize;
- ULONG MaxConnectionUserData;
- ULONG MaxDatagramSize;
- ULONG ServiceFlags;
- ULONG MinimumLookaheadData;
- ULONG MaximumLookaheadData;
- ULONG NumberOfResources;
- LARGE_INTEGER StartTime;
-} TDI_PROVIDER_INFO, *PTDI_PROVIDER_INFO;
-
-#define TDI_SERVICE_CONNECTION_MODE 0x00000001
-#define TDI_SERVICE_ORDERLY_RELEASE 0x00000002
-#define TDI_SERVICE_CONNECTIONLESS_MODE 0x00000004
-#define TDI_SERVICE_ERROR_FREE_DELIVERY 0x00000008
-#define TDI_SERVICE_SECURITY_LEVEL 0x00000010
-#define TDI_SERVICE_BROADCAST_SUPPORTED 0x00000020
-#define TDI_SERVICE_MULTICAST_SUPPORTED 0x00000040
-#define TDI_SERVICE_DELAYED_ACCEPTANCE 0x00000080
-#define TDI_SERVICE_EXPEDITED_DATA 0x00000100
-#define TDI_SERVICE_INTERNAL_BUFFERING 0x00000200
-#define TDI_SERVICE_ROUTE_DIRECTED 0x00000400
-#define TDI_SERVICE_NO_ZERO_LENGTH 0x00000800
-#define TDI_SERVICE_POINT_TO_POINT 0x00001000
-#define TDI_SERVICE_MESSAGE_MODE 0x00002000
-#define TDI_SERVICE_HALF_DUPLEX 0x00004000
-#define TDI_SERVICE_DGRAM_CONNECTION 0x00008000
-#define TDI_SERVICE_FORCE_ACCESS_CHECK 0x00010000
-#define TDI_SERVICE_SEND_AND_DISCONNECT 0x00020000
-#define TDI_SERVICE_DIRECT_ACCEPT 0x00040000
-#define TDI_SERVICE_ACCEPT_LOCAL_ADDR 0x00080000
-
-typedef struct _TDI_PROVIDER_RESOURCE_STATS {
- ULONG ResourceId;
- ULONG MaximumResourceUsed;
- ULONG AverageResourceUsed;
- ULONG ResourceExhausted;
-} TDI_PROVIDER_RESOURCE_STATS, *PTDI_PROVIDER_RESOURCE_STATS;
-
-typedef struct _TDI_PROVIDER_STATISTICS {
- ULONG Version;
- ULONG OpenConnections;
- ULONG ConnectionsAfterNoRetry;
- ULONG ConnectionsAfterRetry;
- ULONG LocalDisconnects;
- ULONG RemoteDisconnects;
- ULONG LinkFailures;
- ULONG AdapterFailures;
- ULONG SessionTimeouts;
- ULONG CancelledConnections;
- ULONG RemoteResourceFailures;
- ULONG LocalResourceFailures;
- ULONG NotFoundFailures;
- ULONG NoListenFailures;
- ULONG DatagramsSent;
- LARGE_INTEGER DatagramBytesSent;
- ULONG DatagramsReceived;
- LARGE_INTEGER DatagramBytesReceived;
- ULONG PacketsSent;
- ULONG PacketsReceived;
- ULONG DataFramesSent;
- LARGE_INTEGER DataFrameBytesSent;
- ULONG DataFramesReceived;
- LARGE_INTEGER DataFrameBytesReceived;
- ULONG DataFramesResent;
- LARGE_INTEGER DataFrameBytesResent;
- ULONG DataFramesRejected;
- LARGE_INTEGER DataFrameBytesRejected;
- ULONG ResponseTimerExpirations;
- ULONG AckTimerExpirations;
- ULONG MaximumSendWindow;
- ULONG AverageSendWindow;
- ULONG PiggybackAckQueued;
- ULONG PiggybackAckTimeouts;
- LARGE_INTEGER WastedPacketSpace;
- ULONG WastedSpacePackets;
- ULONG NumberOfResources;
- TDI_PROVIDER_RESOURCE_STATS ResourceStats[1];
-} TDI_PROVIDER_STATISTICS, *PTDI_PROVIDER_STATISTICS;
-
-#define TDI_EVENT_CONNECT 0
-#define TDI_EVENT_DISCONNECT 1
-#define TDI_EVENT_ERROR 2
-#define TDI_EVENT_RECEIVE 3
-#define TDI_EVENT_RECEIVE_DATAGRAM 4
-#define TDI_EVENT_RECEIVE_EXPEDITED 5
-#define TDI_EVENT_SEND_POSSIBLE 6
-
-typedef struct _TDI_REQUEST_ASSOCIATE {
- TDI_REQUEST Request;
- HANDLE AddressHandle;
-} TDI_REQUEST_ASSOCIATE_ADDRESS, *PTDI_REQUEST_ASSOCIATE_ADDRESS;
-
-#define NDIS_PACKET_POOL_TAG_FOR_NWLNKIPX 'iPDN'
-#define NDIS_PACKET_POOL_TAG_FOR_NWLNKSPX 'sPDN'
-#define NDIS_PACKET_POOL_TAG_FOR_NWLNKNB 'nPDN'
-#define NDIS_PACKET_POOL_TAG_FOR_TCPIP 'tPDN'
-#define NDIS_PACKET_POOL_TAG_FOR_NBF 'bPDN'
-#define NDIS_PACKET_POOL_TAG_FOR_APPLETALK 'aPDN'
-
-typedef struct _TA_ADDRESS {
- USHORT AddressLength;
- USHORT AddressType;
- UCHAR Address[1];
-} TA_ADDRESS, *PTA_ADDRESS;
-
-#define TDI_ADDRESS_TYPE_UNSPEC 0
-#define TDI_ADDRESS_TYPE_UNIX 1
-#define TDI_ADDRESS_TYPE_IP 2
-#define TDI_ADDRESS_TYPE_IMPLINK 3
-#define TDI_ADDRESS_TYPE_PUP 4
-#define TDI_ADDRESS_TYPE_CHAOS 5
-#define TDI_ADDRESS_TYPE_NS 6
-#define TDI_ADDRESS_TYPE_IPX 6
-#define TDI_ADDRESS_TYPE_NBS 7
-#define TDI_ADDRESS_TYPE_ECMA 8
-#define TDI_ADDRESS_TYPE_DATAKIT 9
-#define TDI_ADDRESS_TYPE_CCITT 10
-#define TDI_ADDRESS_TYPE_SNA 11
-#define TDI_ADDRESS_TYPE_DECnet 12
-#define TDI_ADDRESS_TYPE_DLI 13
-#define TDI_ADDRESS_TYPE_LAT 14
-#define TDI_ADDRESS_TYPE_HYLINK 15
-#define TDI_ADDRESS_TYPE_APPLETALK 16
-#define TDI_ADDRESS_TYPE_NETBIOS 17
-#define TDI_ADDRESS_TYPE_8022 18
-#define TDI_ADDRESS_TYPE_OSI_TSAP 19
-#define TDI_ADDRESS_TYPE_NETONE 20
-#define TDI_ADDRESS_TYPE_VNS 21
-#define TDI_ADDRESS_TYPE_NETBIOS_EX 22
-#define TDI_ADDRESS_TYPE_IP6 23
-#define TDI_ADDRESS_TYPE_NETBIOS_UNICODE_EX 24
-
-#define TdiTransportAddress "TransportAddress"
-#define TdiConnectionContext "ConnectionContext"
-#define TDI_TRANSPORT_ADDRESS_LENGTH (sizeof(TdiTransportAddress) - 1)
-#define TDI_CONNECTION_CONTEXT_LENGTH (sizeof(TdiConnectionContext) - 1)
-
-typedef struct _TRANSPORT_ADDRESS {
- LONG TAAddressCount;
- TA_ADDRESS Address[1];
-} TRANSPORT_ADDRESS, *PTRANSPORT_ADDRESS;
-
-typedef struct _TDI_ACTION_HEADER {
- ULONG TransportId;
- USHORT ActionCode;
- USHORT Reserved;
-} TDI_ACTION_HEADER, *PTDI_ACTION_HEADER;
-
-typedef struct _TDI_ADDRESS_INFO {
- ULONG ActivityCount;
- TRANSPORT_ADDRESS Address;
-} TDI_ADDRESS_INFO, *PTDI_ADDRESS_INFO;
-
-#include "pshpack1.h"
-
-typedef struct _TDI_ADDRESS_8022 {
- UCHAR MACAddress[6];
-} TDI_ADDRESS_8022, *PTDI_ADDRESS_8022;
-
-#define TDI_ADDRESS_LENGTH_8022 sizeof(TDI_ADDRESS_8022);
-
-typedef struct _TDI_ADDRESS_APPLETALK {
- USHORT Network;
- UCHAR Node;
- UCHAR Socket;
-} TDI_ADDRESS_APPLETALK, *PTDI_ADDRESS_APPLETALK;
-
-#define TDI_ADDRESS_LENGTH_APPLETALK sizeof(TDI_ADDRESS_APPLETALK)
-
-typedef struct _TDI_ADDRESS_IP {
- USHORT sin_port;
- ULONG in_addr;
- UCHAR sin_zero[8];
-} TDI_ADDRESS_IP, *PTDI_ADDRESS_IP;
-
-#define TDI_ADDRESS_LENGTH_IP sizeof(TDI_ADDRESS_IP)
-
-typedef struct _TDI_ADDRESS_IPX {
- ULONG NetworkAddress;
- UCHAR NodeAddress[6];
- USHORT Socket;
-} TDI_ADDRESS_IPX, *PTDI_ADDRESS_IPX;
-
-#define TDI_ADDRESS_LENGTH_IPX sizeof(TDI_ADDRESS_IPX)
-
-/* TDI_ADDRESS_NETBIOS.NetbiosNameType constants */
-#define TDI_ADDRESS_NETBIOS_TYPE_UNIQUE 0x0000
-#define TDI_ADDRESS_NETBIOS_TYPE_GROUP 0x0001
-#define TDI_ADDRESS_NETBIOS_TYPE_QUICK_UNIQUE 0x0002
-#define TDI_ADDRESS_NETBIOS_TYPE_QUICK_GROUP 0x0003
-
-typedef struct _TDI_ADDRESS_NETBIOS {
- USHORT NetbiosNameType;
- UCHAR NetbiosName[16];
-} TDI_ADDRESS_NETBIOS, *PTDI_ADDRESS_NETBIOS;
-
-#define TDI_ADDRESS_LENGTH_NETBIOS sizeof(TDI_ADDRESS_NETBIOS)
-
-typedef struct _TDI_ADDRESS_NETBIOS_EX {
- UCHAR EndpointName[16];
- TDI_ADDRESS_NETBIOS NetbiosAddress;
-} TDI_ADDRESS_NETBIOS_EX, *PTDI_ADDRESS_NETBIOS_EX;
-
-#define TDI_ADDRESS_LENGTH_NETBIOS_EX sizeof(TDI_ADDRESS_NETBIOS_EX)
-
-/* TDI_ADDRESS_NETONE.NetoneNameType constants */
-#define TDI_ADDRESS_NETONE_TYPE_UNIQUE 0x0000
-#define TDI_ADDRESS_NETONE_TYPE_ROTORED 0x0001
-
-typedef struct _TDI_ADDRESS_NETONE {
- USHORT NetoneNameType;
- UCHAR NetoneName[20];
-} TDI_ADDRESS_NETONE, *PTDI_ADDRESS_NETONE;
-
-#define TDI_ADDRESS_LENGTH_NETONE sizeof(TDI_ADDRESS_NETONE)
-
-typedef struct _TDI_ADDRESS_NS
-{
- ULONG NetworkAddress;
- UCHAR NodeAddress[6];
- USHORT Socket;
-} TDI_ADDRESS_NS, *PTDI_ADDRESS_NS;
-
-#define TDI_ADDRESS_LENGTH_NS sizeof(TDI_ADDRESS_NS)
-
-#define ISO_MAX_ADDR_LENGTH 64
-
-/* TDI_ADDRESS_OSI_TSAP.tp_addr_type constants */
-#define ISO_HIERARCHICAL 0
-#define ISO_NON_HIERARCHICAL 1
-
-typedef struct _TDI_ADDRESS_OSI_TSAP {
- USHORT tp_addr_type;
- USHORT tp_taddr_len;
- USHORT tp_tsel_len;
- UCHAR tp_addr[ISO_MAX_ADDR_LENGTH];
-} TDI_ADDRESS_OSI_TSAP, *PTDI_ADDRESS_OSI_TSAP;
-
-#define TDI_ADDRESS_LENGTH_OSI_TSAP sizeof(TDI_ADDRESS_OSI_TSAP)
-
-typedef struct _TDI_ADDRESS_VNS {
- UCHAR net_address[4];
- UCHAR subnet_addr[2];
- UCHAR port[2];
- UCHAR hops;
- UCHAR filler[5];
-} TDI_ADDRESS_VNS, *PTDI_ADDRESS_VNS;
-
-#define TDI_ADDRESS_LENGTH_VNS sizeof(TDI_ADDRESS_VNS)
-
-typedef struct _TDI_ADDRESS_IP6 {
- USHORT sin6_port;
- ULONG sin6_flowinfo;
- USHORT sin6_addr[8];
- ULONG sin6_scope_id;
-} TDI_ADDRESS_IP6, *PTDI_ADDRESS_IP6;
-
-#define TDI_ADDRESS_LENGTH_IP6 sizeof(TDI_ADDRESS_IP6)
-
-enum eNameBufferType {
- NBT_READONLY = 0,
- NBT_WRITEONLY,
- NBT_READWRITE,
- NBT_WRITTEN
-};
-
-typedef struct _TDI_ADDRESS_NETBIOS_UNICODE_EX {
- USHORT NetbiosNameType;
- enum eNameBufferType NameBufferType;
- UNICODE_STRING EndpointName;
- UNICODE_STRING RemoteName;
- WCHAR EndpointBuffer[17];
- WCHAR RemoteNameBuffer[1];
-} TDI_ADDRESS_NETBIOS_UNICODE_EX, *PTDI_ADDRESS_NETBIOS_UNICODE_EX;
-
-typedef struct _TA_APPLETALK_ADDR {
- LONG TAAddressCount;
- struct _AddrAtalk {
- USHORT AddressLength;
- USHORT AddressType;
- TDI_ADDRESS_APPLETALK Address[1];
- } Address[1];
-} TA_APPLETALK_ADDRESS, *PTA_APPLETALK_ADDRESS;
-
-typedef struct _TA_ADDRESS_IP {
- LONG TAAddressCount;
- struct _AddrIp {
- USHORT AddressLength;
- USHORT AddressType;
- TDI_ADDRESS_IP Address[1];
- } Address[1];
-} TA_IP_ADDRESS, *PTA_IP_ADDRESS;
-
-typedef struct _TA_ADDRESS_IPX {
- LONG TAAddressCount;
- struct _AddrIpx {
- USHORT AddressLength;
- USHORT AddressType;
- TDI_ADDRESS_IPX Address[1];
- } Address[1];
-} TA_IPX_ADDRESS, *PTA_IPX_ADDRESS;
-
-typedef struct _TA_NETBIOS_ADDRESS {
- LONG TAAddressCount;
- struct _Addr{
- USHORT AddressLength;
- USHORT AddressType;
- TDI_ADDRESS_NETBIOS Address[1];
- } Address[1];
-} TA_NETBIOS_ADDRESS, *PTA_NETBIOS_ADDRESS;
-
-typedef struct _TA_ADDRESS_NS {
- LONG TAAddressCount;
- struct _AddrNs {
- USHORT AddressLength;
- USHORT AddressType;
- TDI_ADDRESS_NS Address[1];
- } Address[1];
-} TA_NS_ADDRESS, *PTA_NS_ADDRESS;
-
-typedef struct _TA_ADDRESS_VNS {
- LONG TAAddressCount;
- struct _AddrVns {
- USHORT AddressLength;
- USHORT AddressType;
- TDI_ADDRESS_VNS Address[1];
- } Address[1];
-} TA_VNS_ADDRESS, *PTA_VNS_ADDRESS;
-
-typedef struct _TA_ADDRESS_IP6 {
- LONG TAAddressCount;
- struct _AddrIp6 {
- USHORT AddressLength;
- USHORT AddressType;
- TDI_ADDRESS_IP6 Address[1];
- } Address [1];
-} TA_IP6_ADDRESS, *PTA_IP6_ADDRESS;
-
-typedef struct _TA_ADDRESS_NETBIOS_UNICODE_EX {
- LONG TAAddressCount;
- struct _AddrNetbiosWCharEx {
- USHORT AddressLength;
- USHORT AddressType;
- TDI_ADDRESS_NETBIOS_UNICODE_EX Address[1];
- } Address [1];
-} TA_NETBIOS_UNICODE_EX_ADDRESS, *PTA_NETBIOS_UNICODE_EX_ADDRESS;
-
-#include "poppack.h"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TDI_H */
diff --git a/winsup/w32api/include/ddk/tdiinfo.h b/winsup/w32api/include/ddk/tdiinfo.h
deleted file mode 100644
index ba7e1e7..0000000
--- a/winsup/w32api/include/ddk/tdiinfo.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * tdiinfo.h
- *
- * TDI set and query information interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __TDIINFO_H
-#define __TDIINFO_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-typedef struct TDIEntityID {
- ULONG tei_entity;
- ULONG tei_instance;
-} TDIEntityID;
-
-#define MAX_TDI_ENTITIES 4096
-#define INVALID_ENTITY_INSTANCE -1
-#define GENERIC_ENTITY 0
-#define ENTITY_LIST_ID 0
-#define ENTITY_TYPE_ID 1
-
-#define AT_ENTITY 0x280
-#define CL_NL_ENTITY 0x301
-#define CL_TL_ENTITY 0x401
-#define CO_NL_ENTITY 0x300
-#define CO_TL_ENTITY 0x400
-#define ER_ENTITY 0x380
-#define IF_ENTITY 0x200
-
-#define AT_ARP 0x280
-#define AT_NULL 0x282
-#define CL_TL_NBF 0x401
-#define CL_TL_UDP 0x403
-#define CL_NL_IPX 0x301
-#define CL_NL_IP 0x303
-#define CO_TL_NBF 0x400
-#define CO_TL_SPX 0x402
-#define CO_TL_TCP 0x404
-#define CO_TL_SPP 0x406
-#define ER_ICMP 0x380
-#define IF_GENERIC 0x200
-#define IF_MIB 0x202
-
-/* TDIObjectID.toi_class constants */
-#define INFO_CLASS_GENERIC 0x100
-#define INFO_CLASS_PROTOCOL 0x200
-#define INFO_CLASS_IMPLEMENTATION 0x300
-
-/* TDIObjectID.toi_type constants */
-#define INFO_TYPE_PROVIDER 0x100
-#define INFO_TYPE_ADDRESS_OBJECT 0x200
-#define INFO_TYPE_CONNECTION 0x300
-
-typedef struct _TDIObjectID {
- TDIEntityID toi_entity;
- ULONG toi_class;
- ULONG toi_type;
- ULONG toi_id;
-} TDIObjectID;
-
-#define CONTEXT_SIZE 16
-
-typedef struct _TCP_REQUEST_QUERY_INFORMATION_EX {
- TDIObjectID ID;
- ULONG_PTR Context[CONTEXT_SIZE / sizeof(ULONG_PTR)];
-} TCP_REQUEST_QUERY_INFORMATION_EX, *PTCP_REQUEST_QUERY_INFORMATION_EX;
-
-#if defined(_WIN64)
-typedef struct _TCP_REQUEST_QUERY_INFORMATION_EX32 {
- TDIObjectID ID;
- ULONG32 Context[CONTEXT_SIZE / sizeof(ULONG32)];
-} TCP_REQUEST_QUERY_INFORMATION_EX32, *PTCP_REQUEST_QUERY_INFORMATION_EX32;
-#endif /* _WIN64 */
-
-typedef struct _TCP_REQUEST_SET_INFORMATION_EX {
- TDIObjectID ID;
- UINT BufferSize;
- UCHAR Buffer[1];
-} TCP_REQUEST_SET_INFORMATION_EX, *PTCP_REQUEST_SET_INFORMATION_EX;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TDIINFO_H */
diff --git a/winsup/w32api/include/ddk/tdikrnl.h b/winsup/w32api/include/ddk/tdikrnl.h
deleted file mode 100644
index 1223c26..0000000
--- a/winsup/w32api/include/ddk/tdikrnl.h
+++ /dev/null
@@ -1,1162 +0,0 @@
-/*
- * tdikrnl.h
- *
- * TDI kernel mode definitions
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __TDIKRNL_H
-#define __TDIKRNL_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include "tdi.h"
-
-#if defined(_TDI_)
- #define TDIKRNLAPI DECLSPEC_EXPORT
-#else
- #define TDIKRNLAPI DECLSPEC_IMPORT
-#endif
-
-
-typedef struct _TDI_REQUEST_KERNEL {
- ULONG RequestFlags;
- PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
- PTDI_CONNECTION_INFORMATION ReturnConnectionInformation;
- PVOID RequestSpecific;
-} TDI_REQUEST_KERNEL, *PTDI_REQUEST_KERNEL;
-
-/* Request codes */
-#define TDI_ASSOCIATE_ADDRESS 0x01
-#define TDI_DISASSOCIATE_ADDRESS 0x02
-#define TDI_CONNECT 0x03
-#define TDI_LISTEN 0x04
-#define TDI_ACCEPT 0x05
-#define TDI_DISCONNECT 0x06
-#define TDI_SEND 0x07
-#define TDI_RECEIVE 0x08
-#define TDI_SEND_DATAGRAM 0x09
-#define TDI_RECEIVE_DATAGRAM 0x0A
-#define TDI_SET_EVENT_HANDLER 0x0B
-#define TDI_QUERY_INFORMATION 0x0C
-#define TDI_SET_INFORMATION 0x0D
-#define TDI_ACTION 0x0E
-
-#define TDI_DIRECT_SEND 0x27
-#define TDI_DIRECT_SEND_DATAGRAM 0x29
-
-#define TDI_TRANSPORT_ADDRESS_FILE 1
-#define TDI_CONNECTION_FILE 2
-#define TDI_CONTROL_CHANNEL_FILE 3
-
-/* Internal TDI IOCTLS */
-#define IOCTL_TDI_QUERY_DIRECT_SEND_HANDLER _TDI_CONTROL_CODE(0x80, METHOD_NEITHER)
-#define IOCTL_TDI_QUERY_DIRECT_SENDDG_HANDLER _TDI_CONTROL_CODE(0x81, METHOD_NEITHER)
-
-/* TdiAssociateAddress */
-typedef struct _TDI_REQUEST_KERNEL_ASSOCIATE {
- HANDLE AddressHandle;
-} TDI_REQUEST_KERNEL_ASSOCIATE, *PTDI_REQUEST_KERNEL_ASSOCIATE;
-
-/* TdiDisassociateAddress */
-typedef TDI_REQUEST_KERNEL TDI_REQUEST_KERNEL_DISASSOCIATE,
- *PTDI_REQUEST_KERNEL_DISASSOCIATE;
-
-/* TdiAccept */
-typedef struct _TDI_REQUEST_KERNEL_ACCEPT {
- PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
- PTDI_CONNECTION_INFORMATION ReturnConnectionInformation;
-} TDI_REQUEST_KERNEL_ACCEPT, *PTDI_REQUEST_KERNEL_ACCEPT;
-
-/* TdiConnect */
-typedef TDI_REQUEST_KERNEL TDI_REQUEST_KERNEL_CONNECT,
- *PTDI_REQUEST_KERNEL_CONNECT;
-
-/* TdiDisconnect */
-typedef TDI_REQUEST_KERNEL TDI_REQUEST_KERNEL_DISCONNECT,
- *PTDI_REQUEST_KERNEL_DISCONNECT;
-
-/* TdiListen */
-typedef TDI_REQUEST_KERNEL TDI_REQUEST_KERNEL_LISTEN,
- *PTDI_REQUEST_KERNEL_LISTEN;
-
-/* TdiReceive */
-typedef struct _TDI_REQUEST_KERNEL_RECEIVE {
- ULONG ReceiveLength;
- ULONG ReceiveFlags;
-} TDI_REQUEST_KERNEL_RECEIVE, *PTDI_REQUEST_KERNEL_RECEIVE;
-
-/* TdiReceiveDatagram */
-typedef struct _TDI_REQUEST_KERNEL_RECEIVEDG {
- ULONG ReceiveLength;
- PTDI_CONNECTION_INFORMATION ReceiveDatagramInformation;
- PTDI_CONNECTION_INFORMATION ReturnDatagramInformation;
- ULONG ReceiveFlags;
-} TDI_REQUEST_KERNEL_RECEIVEDG, *PTDI_REQUEST_KERNEL_RECEIVEDG;
-
-/* TdiSend */
-typedef struct _TDI_REQUEST_KERNEL_SEND {
- ULONG SendLength;
- ULONG SendFlags;
-} TDI_REQUEST_KERNEL_SEND, *PTDI_REQUEST_KERNEL_SEND;
-
-/* TdiSendDatagram */
-typedef struct _TDI_REQUEST_KERNEL_SENDDG {
- ULONG SendLength;
- PTDI_CONNECTION_INFORMATION SendDatagramInformation;
-} TDI_REQUEST_KERNEL_SENDDG, *PTDI_REQUEST_KERNEL_SENDDG;
-
-/* TdiSetEventHandler */
-typedef struct _TDI_REQUEST_KERNEL_SET_EVENT {
- LONG EventType;
- PVOID EventHandler;
- PVOID EventContext;
-} TDI_REQUEST_KERNEL_SET_EVENT, *PTDI_REQUEST_KERNEL_SET_EVENT;
-
-/* TdiQueryInformation */
-typedef struct _TDI_REQUEST_KERNEL_QUERY_INFO {
- LONG QueryType;
- PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
-} TDI_REQUEST_KERNEL_QUERY_INFORMATION, *PTDI_REQUEST_KERNEL_QUERY_INFORMATION;
-
-/* TdiSetInformation */
-typedef struct _TDI_REQUEST_KERNEL_SET_INFO {
- LONG SetType;
- PTDI_CONNECTION_INFORMATION RequestConnectionInformation;
-} TDI_REQUEST_KERNEL_SET_INFORMATION, *PTDI_REQUEST_KERNEL_SET_INFORMATION;
-
-
-/* Event types */
-#define TDI_EVENT_CONNECT 0
-#define TDI_EVENT_DISCONNECT 1
-#define TDI_EVENT_ERROR 2
-#define TDI_EVENT_RECEIVE 3
-#define TDI_EVENT_RECEIVE_DATAGRAM 4
-#define TDI_EVENT_RECEIVE_EXPEDITED 5
-#define TDI_EVENT_SEND_POSSIBLE 6
-#define TDI_EVENT_CHAINED_RECEIVE 7
-#define TDI_EVENT_CHAINED_RECEIVE_DATAGRAM 8
-#define TDI_EVENT_CHAINED_RECEIVE_EXPEDITED 9
-#define TDI_EVENT_ERROR_EX 10
-
-typedef NTSTATUS DDKAPI
-(*PTDI_IND_CONNECT)(
- /*IN*/ PVOID TdiEventContext,
- /*IN*/ LONG RemoteAddressLength,
- /*IN*/ PVOID RemoteAddress,
- /*IN*/ LONG UserDataLength,
- /*IN*/ PVOID UserData,
- /*IN*/ LONG OptionsLength,
- /*IN*/ PVOID Options,
- /*OUT*/ CONNECTION_CONTEXT *ConnectionContext,
- /*OUT*/ PIRP *AcceptIrp);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiDefaultConnectHandler(
- /*IN*/ PVOID TdiEventContext,
- /*IN*/ LONG RemoteAddressLength,
- /*IN*/ PVOID RemoteAddress,
- /*IN*/ LONG UserDataLength,
- /*IN*/ PVOID UserData,
- /*IN*/ LONG OptionsLength,
- /*IN*/ PVOID Options,
- /*OUT*/ CONNECTION_CONTEXT *ConnectionContext,
- /*OUT*/ PIRP *AcceptIrp);
-
-typedef NTSTATUS DDKAPI
-(*PTDI_IND_DISCONNECT)(
- /*IN*/ PVOID TdiEventContext,
- /*IN*/ CONNECTION_CONTEXT ConnectionContext,
- /*IN*/ LONG DisconnectDataLength,
- /*IN*/ PVOID DisconnectData,
- /*IN*/ LONG DisconnectInformationLength,
- /*IN*/ PVOID DisconnectInformation,
- /*IN*/ ULONG DisconnectFlags);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiDefaultDisconnectHandler(
- /*IN*/ PVOID TdiEventContext,
- /*IN*/ CONNECTION_CONTEXT ConnectionContext,
- /*IN*/ LONG DisconnectDataLength,
- /*IN*/ PVOID DisconnectData,
- /*IN*/ LONG DisconnectInformationLength,
- /*IN*/ PVOID DisconnectInformation,
- /*IN*/ ULONG DisconnectFlags);
-
-typedef NTSTATUS DDKAPI
-(*PTDI_IND_ERROR)(
- /*IN*/ PVOID TdiEventContext,
- /*IN*/ NTSTATUS Status);
-
-typedef NTSTATUS DDKAPI
-(*PTDI_IND_ERROR_EX)(
- /*IN*/ PVOID TdiEventContext,
- /*IN*/ NTSTATUS Status,
- /*IN*/ PVOID Buffer);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiDefaultErrorHandler(
- /*IN*/ PVOID TdiEventContext,
- /*IN*/ NTSTATUS Status);
-
-typedef NTSTATUS DDKAPI
-(*PTDI_IND_RECEIVE)(
- /*IN*/ PVOID TdiEventContext,
- /*IN*/ CONNECTION_CONTEXT ConnectionContext,
- /*IN*/ ULONG ReceiveFlags,
- /*IN*/ ULONG BytesIndicated,
- /*IN*/ ULONG BytesAvailable,
- /*OUT*/ ULONG *BytesTaken,
- /*IN*/ PVOID Tsdu,
- /*OUT*/ PIRP *IoRequestPacket);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiDefaultReceiveHandler(
- /*IN*/ PVOID TdiEventContext,
- /*IN*/ CONNECTION_CONTEXT ConnectionContext,
- /*IN*/ ULONG ReceiveFlags,
- /*IN*/ ULONG BytesIndicated,
- /*IN*/ ULONG BytesAvailable,
- /*OUT*/ ULONG *BytesTaken,
- /*IN*/ PVOID Tsdu,
- /*OUT*/ PIRP *IoRequestPacket);
-
-typedef NTSTATUS DDKAPI
-(*PTDI_IND_RECEIVE_DATAGRAM)(
- /*IN*/ PVOID TdiEventContext,
- /*IN*/ LONG SourceAddressLength,
- /*IN*/ PVOID SourceAddress,
- /*IN*/ LONG OptionsLength,
- /*IN*/ PVOID Options,
- /*IN*/ ULONG ReceiveDatagramFlags,
- /*IN*/ ULONG BytesIndicated,
- /*IN*/ ULONG BytesAvailable,
- /*OUT*/ ULONG *BytesTaken,
- /*IN*/ PVOID Tsdu,
- /*OUT*/ PIRP *IoRequestPacket);
-
-TDIKRNLAPI
-NTSTATUS DDKAPI
-TdiDefaultRcvDatagramHandler(
- /*IN*/ PVOID TdiEventContext,
- /*IN*/ LONG SourceAddressLength,
- /*IN*/ PVOID SourceAddress,
- /*IN*/ LONG OptionsLength,
- /*IN*/ PVOID Options,
- /*IN*/ ULONG ReceiveDatagramFlags,
- /*IN*/ ULONG BytesIndicated,
- /*IN*/ ULONG BytesAvailable,
- /*OUT*/ ULONG *BytesTaken,
- /*IN*/ PVOID Tsdu,
- /*OUT*/ PIRP *IoRequestPacket);
-
-typedef NTSTATUS DDKAPI
-(*PTDI_IND_RECEIVE_EXPEDITED)(
- /*IN*/ PVOID TdiEventContext,
- /*IN*/ CONNECTION_CONTEXT ConnectionContext,
- /*IN*/ ULONG ReceiveFlags,
- /*IN*/ ULONG BytesIndicated,
- /*IN*/ ULONG BytesAvailable,
- /*OUT*/ ULONG *BytesTaken,
- /*IN*/ PVOID Tsdu,
- /*OUT*/ PIRP *IoRequestPacket);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiDefaultRcvExpeditedHandler(
- /*IN*/ PVOID TdiEventContext,
- /*IN*/ CONNECTION_CONTEXT ConnectionContext,
- /*IN*/ ULONG ReceiveFlags,
- /*IN*/ ULONG BytesIndicated,
- /*IN*/ ULONG BytesAvailable,
- /*OUT*/ ULONG *BytesTaken,
- /*IN*/ PVOID Tsdu,
- /*OUT*/ PIRP *IoRequestPacket);
-
-typedef NTSTATUS DDKAPI
-(*PTDI_IND_CHAINED_RECEIVE)(
- /*IN*/ PVOID TdiEventContext,
- /*IN*/ CONNECTION_CONTEXT ConnectionContext,
- /*IN*/ ULONG ReceiveFlags,
- /*IN*/ ULONG ReceiveLength,
- /*IN*/ ULONG StartingOffset,
- /*IN*/ PMDL Tsdu,
- /*IN*/ PVOID TsduDescriptor);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiDefaultChainedReceiveHandler(
- /*IN*/ PVOID TdiEventContext,
- /*IN*/ CONNECTION_CONTEXT ConnectionContext,
- /*IN*/ ULONG ReceiveFlags,
- /*IN*/ ULONG ReceiveLength,
- /*IN*/ ULONG StartingOffset,
- /*IN*/ PMDL Tsdu,
- /*IN*/ PVOID TsduDescriptor);
-
-typedef NTSTATUS DDKAPI
-(*PTDI_IND_CHAINED_RECEIVE_DATAGRAM)(
- /*IN*/ PVOID TdiEventContext,
- /*IN*/ LONG SourceAddressLength,
- /*IN*/ PVOID SourceAddress,
- /*IN*/ LONG OptionsLength,
- /*IN*/ PVOID Options,
- /*IN*/ ULONG ReceiveDatagramFlags,
- /*IN*/ ULONG ReceiveDatagramLength,
- /*IN*/ ULONG StartingOffset,
- /*IN*/ PMDL Tsdu,
- /*IN*/ PVOID TsduDescriptor);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiDefaultChainedRcvDatagramHandler(
- /*IN*/ PVOID TdiEventContext,
- /*IN*/ LONG SourceAddressLength,
- /*IN*/ PVOID SourceAddress,
- /*IN*/ LONG OptionsLength,
- /*IN*/ PVOID Options,
- /*IN*/ ULONG ReceiveDatagramFlags,
- /*IN*/ ULONG ReceiveDatagramLength,
- /*IN*/ ULONG StartingOffset,
- /*IN*/ PMDL Tsdu,
- /*IN*/ PVOID TsduDescriptor);
-
-typedef NTSTATUS DDKAPI
-(*PTDI_IND_CHAINED_RECEIVE_EXPEDITED)(
- /*IN*/ PVOID TdiEventContext,
- /*IN*/ CONNECTION_CONTEXT ConnectionContext,
- /*IN*/ ULONG ReceiveFlags,
- /*IN*/ ULONG ReceiveLength,
- /*IN*/ ULONG StartingOffset,
- /*IN*/ PMDL Tsdu,
- /*IN*/ PVOID TsduDescriptor);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiDefaultChainedRcvExpeditedHandler(
- /*IN*/ PVOID TdiEventContext,
- /*IN*/ CONNECTION_CONTEXT ConnectionContext,
- /*IN*/ ULONG ReceiveFlags,
- /*IN*/ ULONG ReceiveLength,
- /*IN*/ ULONG StartingOffset,
- /*IN*/ PMDL Tsdu,
- /*IN*/ PVOID TsduDescriptor);
-
-typedef NTSTATUS DDKAPI
-(*PTDI_IND_SEND_POSSIBLE)(
- /*IN*/ PVOID TdiEventContext,
- /*IN*/ PVOID ConnectionContext,
- /*IN*/ ULONG BytesAvailable);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiDefaultSendPossibleHandler(
- /*IN*/ PVOID TdiEventContext,
- /*IN*/ PVOID ConnectionContext,
- /*IN*/ ULONG BytesAvailable);
-
-
-
- /* Macros and functions to build IRPs */
-
-#define TdiBuildBaseIrp( \
- bIrp, bDevObj, bFileObj, bCompRoutine, bContxt, bIrpSp, bMinor) \
-{ \
- bIrpSp->MajorFunction = IRP_MJ_INTERNAL_DEVICE_CONTROL; \
- bIrpSp->MinorFunction = (bMinor); \
- bIrpSp->DeviceObject = (bDevObj); \
- bIrpSp->FileObject = (bFileObj); \
- if (bCompRoutine) \
- IoSetCompletionRoutine(bIrp, bCompRoutine, bContxt, TRUE, TRUE, TRUE) \
- else \
- IoSetCompletionRoutine(bIrp, NULL, NULL, FALSE, FALSE, FALSE); \
-}
-
- /*
- * VOID
- * TdiBuildAccept(
- * IN PIRP Irp,
- * IN PDEVICE_OBJECT DevObj,
- * IN PFILE_OBJECT FileObj,
- * IN PVOID CompRoutine,
- * IN PVOID Contxt,
- * IN PTDI_CONNECTION_INFORMATION RequestConnectionInfo,
- * OUT PTDI_CONNECTION_INFORMATION ReturnConnectionInfo);
- */
-#define TdiBuildAccept( \
- Irp, DevObj, FileObj, CompRoutine, Contxt, \
- RequestConnectionInfo, ReturnConnectionInfo) \
-{ \
- PTDI_REQUEST_KERNEL_ACCEPT _Request; \
- PIO_STACK_LOCATION _IrpSp; \
- \
- _IrpSp = IoGetNextIrpStackLocation(Irp); \
- \
- TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
- Contxt, _IrpSp, TDI_ACCEPT); \
- \
- _Request = (PTDI_REQUEST_KERNEL_ACCEPT)&_IrpSp->Parameters; \
- _Request->RequestConnectionInformation = (RequestConnectionInfo); \
- _Request->ReturnConnectionInformation = (ReturnConnectionInfo); \
-}
-
- /*
- * VOID
- * TdiBuildAction(
- * IN PIRP Irp,
- * IN PDEVICE_OBJECT DevObj,
- * IN PFILE_OBJECT FileObj,
- * IN PVOID CompRoutine,
- * IN PVOID Contxt,
- * IN PMDL MdlAddr);
- */
-#define TdiBuildAction( \
- Irp, DevObj, FileObj, CompRoutine, Contxt, MdlAddr) \
-{ \
- PIO_STACK_LOCATION _IrpSp; \
- \
- _IrpSp = IoGetNextIrpStackLocation(Irp); \
- \
- TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
- Contxt, _IrpSp, TDI_ACTION); \
- \
- (Irp)->MdlAddress = (MdlAddr); \
-}
-
- /*
- * VOID
- * TdiBuildAssociateAddress(
- * IN PIRP Irp,
- * IN PDEVICE_OBJECT DevObj,
- * IN PFILE_OBJECT FileObj,
- * IN PVOID CompRoutine,
- * IN PVOID Contxt,
- * IN HANDLE AddrHandle);
- */
-#define TdiBuildAssociateAddress( \
- Irp, DevObj, FileObj, CompRoutine, Contxt, AddrHandle) \
-{ \
- PTDI_REQUEST_KERNEL_ASSOCIATE _Request; \
- PIO_STACK_LOCATION _IrpSp; \
- \
- _IrpSp = IoGetNextIrpStackLocation(Irp); \
- \
- TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
- Contxt, _IrpSp, TDI_ASSOCIATE_ADDRESS); \
- \
- _Request = (PTDI_REQUEST_KERNEL_ASSOCIATE)&_IrpSp->Parameters; \
- _Request->AddressHandle = (HANDLE)(AddrHandle); \
-}
-
- /*
- * VOID
- * TdiBuildConnect(
- * IN PIRP Irp,
- * IN PDEVICE_OBJECT DevObj,
- * IN PFILE_OBJECT FileObj,
- * IN PVOID CompRoutine,
- * IN PVOID Contxt,
- * IN PLARGE_INTEGER Time,
- * IN PTDI_CONNECTION_INFORMATION RequestConnectionInfo,
- * OUT PTDI_CONNECTION_INFORMATION ReturnConnectionInfo);
- */
-#define TdiBuildConnect( \
- Irp, DevObj, FileObj, CompRoutine, Contxt, \
- Time, RequestConnectionInfo, ReturnConnectionInfo) \
-{ \
- PTDI_REQUEST_KERNEL _Request; \
- PIO_STACK_LOCATION _IrpSp; \
- \
- _IrpSp = IoGetNextIrpStackLocation(Irp); \
- \
- TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
- Contxt, _IrpSp, TDI_CONNECT); \
- \
- _Request = (PTDI_REQUEST_KERNEL)&_IrpSp->Parameters; \
- _Request->RequestConnectionInformation = (RequestConnectionInfo); \
- _Request->ReturnConnectionInformation = (ReturnConnectionInfo); \
- _Request->RequestSpecific = (PVOID)(Time); \
-}
-
- /*
- * VOID
- * TdiBuildDisassociateAddress(
- * IN PIRP Irp,
- * IN PDEVICE_OBJECT DevObj,
- * IN PFILE_OBJECT FileObj,
- * IN PVOID CompRoutine,
- * IN PVOID Contxt);
- */
-#define TdiBuildDisassociateAddress( \
- Irp, DevObj, FileObj, CompRoutine, Contxt) \
-{ \
- PIO_STACK_LOCATION _IrpSp; \
- \
- _IrpSp = IoGetNextIrpStackLocation(Irp); \
- \
- TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
- Contxt, _IrpSp, TDI_DISASSOCIATE_ADDRESS); \
-}
-
- /*
- * VOID
- * TdiBuildDisconnect(
- * IN PIRP Irp,
- * IN PDEVICE_OBJECT DevObj,
- * IN PFILE_OBJECT FileObj,
- * IN PVOID CompRoutine,
- * IN PVOID Contxt,
- * IN PLARGE_INTEGER Time,
- * IN PULONG Flags,
- * IN PTDI_CONNECTION_INFORMATION RequestConnectionInfo,
- * OUT PTDI_CONNECTION_INFORMATION ReturnConnectionInfo);
- */
-#define TdiBuildDisconnect( \
- Irp, DevObj, FileObj, CompRoutine, Contxt, Time, \
- Flags, RequestConnectionInfo, ReturnConnectionInfo) \
-{ \
- PTDI_REQUEST_KERNEL _Request; \
- PIO_STACK_LOCATION _IrpSp; \
- \
- _IrpSp = IoGetNextIrpStackLocation(Irp); \
- \
- TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
- Contxt, _IrpSp, TDI_DISCONNECT); \
- \
- _Request = (PTDI_REQUEST_KERNEL)&_IrpSp->Parameters; \
- _Request->RequestConnectionInformation = (RequestConnectionInfo); \
- _Request->ReturnConnectionInformation = (ReturnConnectionInfo); \
- _Request->RequestSpecific = (PVOID)(Time); \
- _Request->RequestFlags = (Flags); \
-}
-
- /*
- * PIRP
- * TdiBuildInternalDeviceControlIrp(
- * IN CCHAR IrpSubFunction,
- * IN PDEVICE_OBJECT DeviceObject,
- * IN PFILE_OBJECT FileObject,
- * IN PKEVENT Event,
- * IN PIO_STATUS_BLOCK IoStatusBlock);
- */
-#define TdiBuildInternalDeviceControlIrp( \
- IrpSubFunction, DeviceObject, \
- FileObject, Event, IoStatusBlock) \
- IoBuildDeviceIoControlRequest( \
- 0x00000003, DeviceObject, \
- NULL, 0, NULL, 0, \
- TRUE, Event, IoStatusBlock)
-
- /*
- * VOID
- * TdiBuildListen(
- * IN PIRP Irp,
- * IN PDEVICE_OBJECT DevObj,
- * IN PFILE_OBJECT FileObj,
- * IN PVOID CompRoutine,
- * IN PVOID Contxt,
- * IN ULONG Flags,
- * IN PTDI_CONNECTION_INFORMATION RequestConnectionInfo,
- * OUT PTDI_CONNECTION_INFORMATION ReturnConnectionInfo);
- */
-#define TdiBuildListen( \
- Irp, DevObj, FileObj, CompRoutine, Contxt, \
- Flags, RequestConnectionInfo, ReturnConnectionInfo) \
-{ \
- PTDI_REQUEST_KERNEL _Request; \
- PIO_STACK_LOCATION _IrpSp; \
- \
- _IrpSp = IoGetNextIrpStackLocation(Irp); \
- \
- TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
- Contxt, _IrpSp, TDI_LISTEN); \
- \
- _Request = (PTDI_REQUEST_KERNEL)&_IrpSp->Parameters; \
- _Request->RequestConnectionInformation = (RequestConnectionInfo); \
- _Request->ReturnConnectionInformation = (ReturnConnectionInfo); \
- _Request->RequestFlags = (Flags); \
-}
-
-TDIKRNLAPI
-VOID
-DDKAPI
-TdiBuildNetbiosAddress(
- /*IN*/ PUCHAR NetbiosName,
- /*IN*/ BOOLEAN IsGroupName,
- /*IN OUT*/ PTA_NETBIOS_ADDRESS NetworkName);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiBuildNetbiosAddressEa(
- /*IN*/ PUCHAR Buffer,
- /*IN*/ BOOLEAN IsGroupName,
- /*IN*/ PUCHAR NetbiosName);
-
- /*
- * VOID
- * TdiBuildQueryInformation(
- * IN PIRP Irp,
- * IN PDEVICE_OBJECT DevObj,
- * IN PFILE_OBJECT FileObj,
- * IN PVOID CompRoutine,
- * IN PVOID Contxt,
- * IN UINT QType,
- * IN PMDL MdlAddr);
- */
-#define TdiBuildQueryInformation( \
- Irp, DevObj, FileObj, CompRoutine, Contxt, QType, MdlAddr) \
-{ \
- PTDI_REQUEST_KERNEL_QUERY_INFORMATION _Request; \
- PIO_STACK_LOCATION _IrpSp; \
- \
- _IrpSp = IoGetNextIrpStackLocation(Irp); \
- \
- TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
- Contxt, _IrpSp, TDI_QUERY_INFORMATION); \
- \
- _Request = (PTDI_REQUEST_KERNEL_QUERY_INFORMATION)&_IrpSp->Parameters; \
- _Request->RequestConnectionInformation = NULL; \
- _Request->QueryType = (ULONG)(QType); \
- (Irp)->MdlAddress = (MdlAddr); \
-}
-
- /*
- * VOID
- * TdiBuildReceive(
- * IN PIRP Irp,
- * IN PDEVICE_OBJECT DevObj,
- * IN PFILE_OBJECT FileObj,
- * IN PVOID CompRoutine,
- * IN PVOID Contxt,
- * IN PMDL MdlAddr,
- * IN ULONG InFlags,
- * IN ULONG ReceiveLen);
- */
-#define TdiBuildReceive( \
- Irp, DevObj, FileObj, CompRoutine, Contxt, \
- MdlAddr, InFlags, ReceiveLen) \
-{ \
- PTDI_REQUEST_KERNEL_RECEIVE _Request; \
- PIO_STACK_LOCATION _IrpSp; \
- \
- _IrpSp = IoGetNextIrpStackLocation(Irp); \
- \
- TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
- Contxt, _IrpSp, TDI_RECEIVE); \
- \
- _Request = (PTDI_REQUEST_KERNEL_RECEIVE)&_IrpSp->Parameters; \
- _Request->ReceiveFlags = (InFlags); \
- _Request->ReceiveLength = (ReceiveLen); \
- (Irp)->MdlAddress = (MdlAddr); \
-}
-
- /*
- * VOID
- * TdiBuildReceiveDatagram(
- * IN PIRP Irp,
- * IN PDEVICE_OBJECT DevObj,
- * IN PFILE_OBJECT FileObj,
- * IN PVOID CompRoutine,
- * IN PVOID Contxt,
- * IN PMDL MdlAddr,
- * IN ULONG ReceiveLen,
- * IN PTDI_CONNECTION_INFORMATION ReceiveDatagramInfo,
- * OUT PTDI_CONNECTION_INFORMATION ReturnInfo,
- * ULONG InFlags);
- */
-#define TdiBuildReceiveDatagram( \
- Irp, DevObj, FileObj, CompRoutine, Contxt, MdlAddr, \
- ReceiveLen, ReceiveDatagramInfo, ReturnInfo, InFlags) \
-{ \
- PTDI_REQUEST_KERNEL_RECEIVEDG _Request; \
- PIO_STACK_LOCATION _IrpSp; \
- \
- _IrpSp = IoGetNextIrpStackLocation(Irp); \
- \
- TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
- Contxt, _IrpSp, TDI_RECEIVE_DATAGRAM); \
- \
- _Request = (PTDI_REQUEST_KERNEL_RECEIVEDG)&_IrpSp->Parameters; \
- _Request->ReceiveDatagramInformation = (ReceiveDatagramInfo); \
- _Request->ReturnDatagramInformation = (ReturnInfo); \
- _Request->ReceiveLength = (ReceiveLen); \
- _Request->ReceiveFlags = (InFlags); \
- (Irp)->MdlAddress = (MdlAddr); \
-}
-
- /*
- * VOID
- * TdiBuildSend(
- * IN PIRP Irp,
- * IN PDEVICE_OBJECT DevObj,
- * IN PFILE_OBJECT FileObj,
- * IN PVOID CompRoutine,
- * IN PVOID Contxt,
- * IN PMDL MdlAddr,
- * IN ULONG InFlags,
- * IN ULONG SendLen);
- */
-#define TdiBuildSend( \
- Irp, DevObj, FileObj, CompRoutine, Contxt, \
- MdlAddr, InFlags, SendLen) \
-{ \
- PTDI_REQUEST_KERNEL_SEND _Request; \
- PIO_STACK_LOCATION _IrpSp; \
- \
- _IrpSp = IoGetNextIrpStackLocation(Irp); \
- \
- TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
- Contxt, _IrpSp, TDI_SEND); \
- \
- _Request = (PTDI_REQUEST_KERNEL_SEND)&_IrpSp->Parameters; \
- _Request->SendFlags = (InFlags); \
- _Request->SendLength = (SendLen); \
- (Irp)->MdlAddress = (MdlAddr); \
-}
-
- /*
- * VOID
- * TdiBuildSendDatagram(
- * IN PIRP Irp,
- * IN PDEVICE_OBJECT DevObj,
- * IN PFILE_OBJECT FileObj,
- * IN PVOID CompRoutine,
- * IN PVOID Contxt,
- * IN PMDL MdlAddr,
- * IN ULONG SendLen,
- * IN PTDI_CONNECTION_INFORMATION SendDatagramInfo);
- */
-#define TdiBuildSendDatagram( \
- Irp, DevObj, FileObj, CompRoutine, Contxt, \
- MdlAddr, SendLen, SendDatagramInfo) \
-{ \
- PTDI_REQUEST_KERNEL_SENDDG _Request; \
- PIO_STACK_LOCATION _IrpSp; \
- \
- _IrpSp = IoGetNextIrpStackLocation(Irp); \
- \
- TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
- Contxt, _IrpSp, TDI_SEND_DATAGRAM); \
- \
- _Request = (PTDI_REQUEST_KERNEL_SENDDG)&_IrpSp->Parameters; \
- _Request->SendDatagramInformation = (SendDatagramInfo); \
- _Request->SendLength = (SendLen); \
- (Irp)->MdlAddress = (MdlAddr); \
-}
-
- /*
- * VOID
- * TdiBuildSetEventHandler(
- * IN PIRP Irp,
- * IN PDEVICE_OBJECT DevObj,
- * IN PFILE_OBJECT FileObj,
- * IN PVOID CompRoutine,
- * IN PVOID Contxt,
- * IN INT InEventType,
- * IN PVOID InEventHandler,
- * IN PVOID InEventContext);
- */
-#define TdiBuildSetEventHandler( \
- Irp, DevObj, FileObj, CompRoutine, Contxt, \
- InEventType, InEventHandler, InEventContext) \
-{ \
- PTDI_REQUEST_KERNEL_SET_EVENT _Request; \
- PIO_STACK_LOCATION _IrpSp; \
- \
- _IrpSp = IoGetNextIrpStackLocation(Irp); \
- \
- TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
- Contxt, _IrpSp, TDI_SET_EVENT_HANDLER); \
- \
- _Request = (PTDI_REQUEST_KERNEL_SET_EVENT)&_IrpSp->Parameters; \
- _Request->EventType = (InEventType); \
- _Request->EventHandler = (PVOID)(InEventHandler); \
- _Request->EventContext = (PVOID)(InEventContext); \
-}
-
- /*
- * VOID
- * TdiBuildSetInformation(
- * IN PIRP Irp,
- * IN PDEVICE_OBJECT DevObj,
- * IN PFILE_OBJECT FileObj,
- * IN PVOID CompRoutine,
- * IN PVOID Contxt,
- * IN UINT SType,
- * IN PMDL MdlAddr);
- */
-#define TdiBuildSetInformation( \
- Irp, DevObj, FileObj, CompRoutine, Contxt, SType, MdlAddr) \
-{ \
- PTDI_REQUEST_KERNEL_SET_INFORMATION _Request; \
- PIO_STACK_LOCATION _IrpSp; \
- \
- _IrpSp = IoGetNextIrpStackLocation(Irp); \
- \
- TdiBuildBaseIrp(Irp, DevObj, FileObj, CompRoutine, \
- Contxt, _IrpSp, TDI_SET_INFORMATION); \
- \
- _Request = (PTDI_REQUEST_KERNEL_SET_INFORMATION)&_IrpSp->Parameters; \
- _Request->RequestConnectionInformation = NULL; \
- _Request->SetType = (ULONG)(SType); \
- (Irp)->MdlAddress = (MdlAddr); \
-}
-
- /* TDI20_CLIENT_INTERFACE_INFO.TdiVersion constants */
-#define TDI_CURRENT_MAJOR_VERSION 2
-#define TDI_CURRENT_MINOR_VERSION 0
-
-#define TDI_CURRENT_VERSION ((TDI_CURRENT_MINOR_VERSION) << 8 \
- | (TDI_CURRENT_MAJOR_VERSION))
-
-#define TDI_VERSION_ONE 0x0001
-
-typedef enum _TDI_PNP_OPCODE {
- TDI_PNP_OP_MIN,
- TDI_PNP_OP_ADD,
- TDI_PNP_OP_DEL,
- TDI_PNP_OP_UPDATE,
- TDI_PNP_OP_PROVIDERREADY,
- TDI_PNP_OP_NETREADY,
- TDI_PNP_OP_ADD_IGNORE_BINDING,
- TDI_PNP_OP_DELETE_IGNORE_BINDING,
- TDI_PNP_OP_MAX
-} TDI_PNP_OPCODE;
-
- /* TDI_PNP_CONTEXT.ContextType */
-#define TDI_PNP_CONTEXT_TYPE_IF_NAME 0x1
-#define TDI_PNP_CONTEXT_TYPE_IF_ADDR 0x2
-#define TDI_PNP_CONTEXT_TYPE_PDO 0x3
-#define TDI_PNP_CONTEXT_TYPE_FIRST_OR_LAST_IF 0x4
-
-typedef struct _TDI_PNP_CONTEXT {
- USHORT ContextSize;
- USHORT ContextType;
- UCHAR ContextData[1];
-} TDI_PNP_CONTEXT, *PTDI_PNP_CONTEXT;
-
-typedef VOID DDKAPI
-(*TDI_ADD_ADDRESS_HANDLER)(
- /*IN*/ PTA_ADDRESS Address);
-
-typedef VOID DDKAPI
-(*TDI_ADD_ADDRESS_HANDLER_V2)(
- /*IN*/ PTA_ADDRESS Address,
- /*IN*/ PUNICODE_STRING DeviceName,
- /*IN*/ PTDI_PNP_CONTEXT Context);
-
-typedef VOID DDKAPI
-(*TDI_BINDING_HANDLER)(
- /*IN*/ TDI_PNP_OPCODE PnPOpcode,
- /*IN*/ PUNICODE_STRING DeviceName,
- /*IN*/ PWSTR MultiSZBindList);
-
-typedef VOID DDKAPI
-(*TDI_BIND_HANDLER)(
- /*IN*/ PUNICODE_STRING DeviceName);
-
-typedef VOID DDKAPI
-(*TDI_DEL_ADDRESS_HANDLER)(
- /*IN*/ PTA_ADDRESS Address);
-
-typedef VOID DDKAPI
-(*TDI_DEL_ADDRESS_HANDLER_V2)(
- /*IN*/ PTA_ADDRESS Address,
- /*IN*/ PUNICODE_STRING DeviceName,
- /*IN*/ PTDI_PNP_CONTEXT Context);
-
-typedef NTSTATUS DDKAPI
-(*TDI_PNP_POWER_HANDLER)(
- /*IN*/ PUNICODE_STRING DeviceName,
- /*IN*/ PNET_PNP_EVENT PowerEvent,
- /*IN*/ PTDI_PNP_CONTEXT Context1,
- /*IN*/ PTDI_PNP_CONTEXT Context2);
-
-typedef VOID DDKAPI
-(*TDI_UNBIND_HANDLER)(
- /*IN*/ PUNICODE_STRING DeviceName);
-
-typedef VOID DDKAPI
-(*ProviderPnPPowerComplete)(
- /*IN*/ PNET_PNP_EVENT NetEvent,
- /*IN*/ NTSTATUS ProviderStatus);
-
-typedef struct _TDI20_CLIENT_INTERFACE_INFO {
- _ANONYMOUS_UNION union {
- _ANONYMOUS_STRUCT struct {
- UCHAR MajorTdiVersion;
- UCHAR MinorTdiVersion;
- } DUMMYSTRUCTNAME;
- USHORT TdiVersion;
- } DUMMYUNIONNAME;
- USHORT Unused;
- PUNICODE_STRING ClientName;
- TDI_PNP_POWER_HANDLER PnPPowerHandler;
- _ANONYMOUS_UNION union {
- TDI_BINDING_HANDLER BindingHandler;
- _ANONYMOUS_STRUCT struct {
- TDI_BIND_HANDLER BindHandler;
- TDI_UNBIND_HANDLER UnBindHandler;
- } DUMMYSTRUCTNAME;
- }DUMMYUNIONNAME2;
- _ANONYMOUS_UNION union {
- _ANONYMOUS_STRUCT struct {
- TDI_ADD_ADDRESS_HANDLER_V2 AddAddressHandlerV2;
- TDI_DEL_ADDRESS_HANDLER_V2 DelAddressHandlerV2;
- } DUMMYSTRUCTNAME;
- _ANONYMOUS_STRUCT struct {
- TDI_ADD_ADDRESS_HANDLER AddAddressHandler;
- TDI_DEL_ADDRESS_HANDLER DelAddressHandler;
- } DUMMYSTRUCTNAME2;
- } DUMMYUNIONNAME3;
-} TDI20_CLIENT_INTERFACE_INFO, *PTDI20_CLIENT_INTERFACE_INFO;
-
-typedef TDI20_CLIENT_INTERFACE_INFO TDI_CLIENT_INTERFACE_INFO;
-typedef TDI_CLIENT_INTERFACE_INFO *PTDI_CLIENT_INTERFACE_INFO;
-
-
- /* TDI functions */
-
- /*
- * VOID
- * TdiCompleteRequest(
- * IN PIRP Irp,
- * IN NTSTATUS Status);
- */
-#define TdiCompleteRequest(Irp, Status) \
-{ \
- (Irp)->IoStatus.Status = (Status); \
- IoCompleteRequest((Irp), IO_NETWORK_INCREMENT); \
-}
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiCopyBufferToMdl(
- /*IN*/ PVOID SourceBuffer,
- /*IN*/ ULONG SourceOffset,
- /*IN*/ ULONG SourceBytesToCopy,
- /*IN*/ PMDL DestinationMdlChain,
- /*IN*/ ULONG DestinationOffset,
- /*IN*/ PULONG BytesCopied);
-
- /*
- * VOID
- * TdiCopyLookaheadData(
- * IN PVOID Destination,
- * IN PVOID Source,
- * IN ULONG Length,
- * IN ULONG ReceiveFlags);
- */
-#define TdiCopyLookaheadData(Destination, Source, Length, ReceiveFlags) \
- RtlCopyMemory(Destination, Source, Length)
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiCopyMdlChainToMdlChain (
- /*IN*/ PMDL SourceMdlChain,
- /*IN*/ ULONG SourceOffset,
- /*IN*/ PMDL DestinationMdlChain,
- /*IN*/ ULONG DestinationOffset,
- /*OUT*/ PULONG BytesCopied);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiCopyMdlToBuffer(
- /*IN*/ PMDL SourceMdlChain,
- /*IN*/ ULONG SourceOffset,
- /*IN*/ PVOID DestinationBuffer,
- /*IN*/ ULONG DestinationOffset,
- /*IN*/ ULONG DestinationBufferSize,
- /*OUT*/ PULONG BytesCopied);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiDeregisterAddressChangeHandler(
- /*IN*/ HANDLE BindingHandle);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiDeregisterDeviceObject(
- /*IN*/ HANDLE DevRegistrationHandle);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiDeregisterNetAddress(
- /*IN*/ HANDLE AddrRegistrationHandle);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiDeregisterPnPHandlers(
- /*IN*/ HANDLE BindingHandle);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiDeregisterProvider(
- /*IN*/ HANDLE ProviderHandle);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiEnumerateAddresses(
- /*IN*/ HANDLE BindingHandle);
-
-TDIKRNLAPI
-VOID
-DDKAPI
-TdiInitialize(
- VOID);
-
-TDIKRNLAPI
-VOID
-DDKAPI
-TdiMapBuffer(
- /*IN*/ PMDL MdlChain);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiMapUserRequest(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ PIRP Irp,
- /*IN*/ PIO_STACK_LOCATION IrpSp);
-
-TDIKRNLAPI
-BOOLEAN
-DDKAPI
-TdiMatchPdoWithChainedReceiveContext(
- /*IN*/ PVOID TsduDescriptor,
- /*IN*/ PVOID PDO);
-
-TDIKRNLAPI
-VOID
-DDKAPI
-TdiPnPPowerComplete(
- /*IN*/ HANDLE BindingHandle,
- /*IN*/ PNET_PNP_EVENT PowerEvent,
- /*IN*/ NTSTATUS Status);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiPnPPowerRequest(
- /*IN*/ PUNICODE_STRING DeviceName,
- /*IN*/ PNET_PNP_EVENT PowerEvent,
- /*IN*/ PTDI_PNP_CONTEXT Context1,
- /*IN*/ PTDI_PNP_CONTEXT Context2,
- /*IN*/ ProviderPnPPowerComplete ProtocolCompletionHandler);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiProviderReady(
- /*IN*/ HANDLE ProviderHandle);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiRegisterAddressChangeHandler(
- /*IN*/ TDI_ADD_ADDRESS_HANDLER AddHandler,
- /*IN*/ TDI_DEL_ADDRESS_HANDLER DeleteHandler,
- /*OUT*/ HANDLE *BindingHandle);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiRegisterDeviceObject(
- /*IN*/ PUNICODE_STRING DeviceName,
- /*OUT*/ HANDLE *DevRegistrationHandle);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiRegisterNetAddress(
- /*IN*/ PTA_ADDRESS Address,
- /*IN*/ PUNICODE_STRING DeviceName,
- /*IN*/ PTDI_PNP_CONTEXT Context,
- /*OUT*/ HANDLE *AddrRegistrationHandle);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiRegisterNotificationHandler(
- /*IN*/ TDI_BIND_HANDLER BindHandler,
- /*IN*/ TDI_UNBIND_HANDLER UnbindHandler,
- /*OUT*/ HANDLE *BindingHandle);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiRegisterPnPHandlers(
- /*IN*/ PTDI_CLIENT_INTERFACE_INFO ClientInterfaceInfo,
- /*IN*/ ULONG InterfaceInfoSize,
- /*OUT*/ HANDLE *BindingHandle);
-
-TDIKRNLAPI
-NTSTATUS
-DDKAPI
-TdiRegisterProvider(
- /*IN*/ PUNICODE_STRING ProviderName,
- /*OUT*/ HANDLE *ProviderHandle);
-
-TDIKRNLAPI
-VOID
-DDKAPI
-TdiReturnChainedReceives(
- /*IN*/ PVOID *TsduDescriptors,
- /*IN*/ ULONG NumberOfTsdus);
-
-TDIKRNLAPI
-VOID
-DDKAPI
-TdiUnmapBuffer(
- /*IN*/ PMDL MdlChain);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TDIKRNL_H */
diff --git a/winsup/w32api/include/ddk/tdistat.h b/winsup/w32api/include/ddk/tdistat.h
deleted file mode 100644
index f0588d2..0000000
--- a/winsup/w32api/include/ddk/tdistat.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * tdistat.h
- *
- * TDI status codes
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __TDISTAT_H
-#define __TDISTAT_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define TDI_SUCCESS STATUS_SUCCESS
-#define TDI_NO_RESOURCES STATUS_INSUFFICIENT_RESOURCES
-#define TDI_ADDR_IN_USE STATUS_ADDRESS_ALREADY_EXISTS
-#define TDI_BAD_ADDR STATUS_INVALID_ADDRESS_COMPONENT
-#define TDI_NO_FREE_ADDR STATUS_TOO_MANY_ADDRESSES
-#define TDI_ADDR_INVALID STATUS_INVALID_ADDRESS
-#define TDI_ADDR_DELETED STATUS_ADDRESS_CLOSED
-#define TDI_BUFFER_OVERFLOW STATUS_BUFFER_OVERFLOW
-#define TDI_BAD_EVENT_TYPE STATUS_INVALID_PARAMETER
-#define TDI_BAD_OPTION STATUS_INVALID_PARAMETER
-#define TDI_CONN_REFUSED STATUS_CONNECTION_REFUSED
-#define TDI_INVALID_CONNECTION STATUS_CONNECTION_INVALID
-#define TDI_ALREADY_ASSOCIATED STATUS_ADDRESS_ALREADY_ASSOCIATED
-#define TDI_NOT_ASSOCIATED STATUS_ADDRESS_NOT_ASSOCIATED
-#define TDI_CONNECTION_ACTIVE STATUS_CONNECTION_ACTIVE
-#define TDI_CONNECTION_ABORTED STATUS_CONNECTION_ABORTED
-#define TDI_CONNECTION_RESET STATUS_CONNECTION_RESET
-#define TDI_TIMED_OUT STATUS_IO_TIMEOUT
-#define TDI_GRACEFUL_DISC STATUS_GRACEFUL_DISCONNECT
-#define TDI_NOT_ACCEPTED STATUS_DATA_NOT_ACCEPTED
-#define TDI_MORE_PROCESSING STATUS_MORE_PROCESSING_REQUIRED
-#define TDI_INVALID_STATE STATUS_INVALID_DEVICE_STATE
-#define TDI_INVALID_PARAMETER STATUS_INVALID_PARAMETER
-#define TDI_DEST_NET_UNREACH STATUS_NETWORK_UNREACHABLE
-#define TDI_DEST_HOST_UNREACH STATUS_HOST_UNREACHABLE
-#define TDI_DEST_UNREACHABLE TDI_DEST_HOST_UNREACH
-#define TDI_DEST_PROT_UNREACH STATUS_PROTOCOL_UNREACHABLE
-#define TDI_DEST_PORT_UNREACH STATUS_PORT_UNREACHABLE
-#define TDI_INVALID_QUERY STATUS_INVALID_DEVICE_REQUEST
-#define TDI_REQ_ABORTED STATUS_REQUEST_ABORTED
-#define TDI_BUFFER_TOO_SMALL STATUS_BUFFER_TOO_SMALL
-#define TDI_CANCELLED STATUS_CANCELLED
-#define TDI_BUFFER_TOO_BIG STATUS_INVALID_BUFFER_SIZE
-#define TDI_INVALID_REQUEST STATUS_INVALID_DEVICE_REQUEST
-#define TDI_PENDING STATUS_PENDING
-#define TDI_ITEM_NOT_FOUND STATUS_OBJECT_NAME_NOT_FOUND
-
-#define TDI_STATUS_BAD_VERSION 0xC0010004L
-#define TDI_STATUS_BAD_CHARACTERISTICS 0xC0010005L
-
-#define TDI_OPTION_EOL 0
-
-#define TDI_ADDRESS_OPTION_REUSE 1
-#define TDI_ADDRESS_OPTION_DHCP 2
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TDISTAT_H */
diff --git a/winsup/w32api/include/ddk/tvout.h b/winsup/w32api/include/ddk/tvout.h
deleted file mode 100644
index 0310ae4..0000000
--- a/winsup/w32api/include/ddk/tvout.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * tvout.h
- *
- * Definitions for TV-out support
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __TVOUT_H
-#define __TVOUT_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-/* VIDEOPARAMETERS.dwCommand constants */
-#define VP_COMMAND_GET 0x00000001
-#define VP_COMMAND_SET 0x00000002
-
-/* VIDEOPARAMETERS.dwFlags constants */
-#define VP_FLAGS_TV_MODE 0x00000001
-#define VP_FLAGS_TV_STANDARD 0x00000002
-#define VP_FLAGS_FLICKER 0x00000004
-#define VP_FLAGS_OVERSCAN 0x00000008
-#define VP_FLAGS_MAX_UNSCALED 0x00000010
-#define VP_FLAGS_POSITION 0x00000020
-#define VP_FLAGS_BRIGHTNESS 0x00000040
-#define VP_FLAGS_CONTRAST 0x00000080
-#define VP_FLAGS_COPYPROTECT 0x00000100
-
-/* VIDEOPARAMETERS.dwMode constants */
-#define VP_MODE_WIN_GRAPHICS 0x00000001
-#define VP_MODE_TV_PLAYBACK 0x00000002
-
-/* VIDEOPARAMETERS.dwTVStandard/dwAvailableTVStandard constants */
-#define VP_TV_STANDARD_NTSC_M 0x00000001
-#define VP_TV_STANDARD_NTSC_M_J 0x00000002
-#define VP_TV_STANDARD_PAL_B 0x00000004
-#define VP_TV_STANDARD_PAL_D 0x00000008
-#define VP_TV_STANDARD_PAL_H 0x00000010
-#define VP_TV_STANDARD_PAL_I 0x00000020
-#define VP_TV_STANDARD_PAL_M 0x00000040
-#define VP_TV_STANDARD_PAL_N 0x00000080
-#define VP_TV_STANDARD_SECAM_B 0x00000100
-#define VP_TV_STANDARD_SECAM_D 0x00000200
-#define VP_TV_STANDARD_SECAM_G 0x00000400
-#define VP_TV_STANDARD_SECAM_H 0x00000800
-#define VP_TV_STANDARD_SECAM_K 0x00001000
-#define VP_TV_STANDARD_SECAM_K1 0x00002000
-#define VP_TV_STANDARD_SECAM_L 0x00004000
-#define VP_TV_STANDARD_WIN_VGA 0x00008000
-#define VP_TV_STANDARD_NTSC_433 0x00010000
-#define VP_TV_STANDARD_PAL_G 0x00020000
-#define VP_TV_STANDARD_PAL_60 0x00040000
-#define VP_TV_STANDARD_SECAM_L1 0x00080000
-
-/* VIDEOPARAMETERS.dwMode constants */
-#define VP_CP_TYPE_APS_TRIGGER 0x00000001
-#define VP_CP_TYPE_MACROVISION 0x00000002
-
-/* VIDEOPARAMETERS.dwCPCommand constants */
-#define VP_CP_CMD_ACTIVATE 0x00000001
-#define VP_CP_CMD_DEACTIVATE 0x00000002
-#define VP_CP_CMD_CHANGE 0x00000004
-
-typedef struct _VIDEOPARAMETERS {
- GUID Guid;
- DWORD dwOffset;
- DWORD dwCommand;
- DWORD dwFlags;
- DWORD dwMode;
- DWORD dwTVStandard;
- DWORD dwAvailableModes;
- DWORD dwAvailableTVStandard;
- DWORD dwFlickerFilter;
- DWORD dwOverScanX;
- DWORD dwOverScanY;
- DWORD dwMaxUnscaledX;
- DWORD dwMaxUnscaledY;
- DWORD dwPositionX;
- DWORD dwPositionY;
- DWORD dwBrightness;
- DWORD dwContrast;
- DWORD dwCPType;
- DWORD dwCPCommand;
- DWORD dwCPStandard;
- DWORD dwCPKey;
- BYTE bCP_APSTriggerBits;
- BYTE bOEMCopyProtection[256];
-} VIDEOPARAMETERS, *PVIDEOPARAMETERS, FAR *LPVIDEOPARAMETERS;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __TVOUT_H */
diff --git a/winsup/w32api/include/ddk/upssvc.h b/winsup/w32api/include/ddk/upssvc.h
deleted file mode 100644
index 561a163..0000000
--- a/winsup/w32api/include/ddk/upssvc.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * upssvc.h
- *
- * UPS service interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __UPSSVC_H
-#define __UPSSVC_H
-
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-#if defined(_APCUPS_)
- #define UPSAPI DECLSPEC_EXPORT
-#else
- #define UPSAPI DECLSPEC_IMPORT
-#endif
-
-
-#define UPS_ONLINE 1
-#define UPS_ONBATTERY 2
-#define UPS_LOWBATTERY 4
-#define UPS_NOCOMM 8
-#define UPS_CRITICAL 16
-
-UPSAPI
-VOID
-DDKAPI
-UPSCancelWait(VOID);
-
-UPSAPI
-DWORD
-DDKAPI
-UPSGetState(VOID);
-
-#define UPS_INITUNKNOWNERROR 0
-#define UPS_INITOK 1
-#define UPS_INITNOSUCHDRIVER 2
-#define UPS_INITBADINTERFACE 3
-#define UPS_INITREGISTRYERROR 4
-#define UPS_INITCOMMOPENERROR 5
-#define UPS_INITCOMMSETUPERROR 6
-
-UPSAPI
-DWORD
-DDKAPI
-UPSInit(VOID);
-
-UPSAPI
-VOID
-DDKAPI
-UPSStop(VOID);
-
-UPSAPI
-VOID
-DDKAPI
-UPSTurnOff(
- /*IN*/ DWORD aTurnOffDelay);
-
-UPSAPI
-VOID
-DDKAPI
-UPSWaitForStateChange(
- /*IN*/ DWORD aCurrentState,
- /*IN*/ DWORD anInterval);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __UPSSVC_H */
diff --git a/winsup/w32api/include/ddk/usb.h b/winsup/w32api/include/ddk/usb.h
deleted file mode 100644
index 18dac4c..0000000
--- a/winsup/w32api/include/ddk/usb.h
+++ /dev/null
@@ -1,471 +0,0 @@
-/*
- * usb.h
- *
- * USB support.
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __USB_H
-#define __USB_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __USBDI_H
-#error usbdi.h cannot be included with usb.h
-#else
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include "usb100.h"
-
-typedef LONG USBD_STATUS;
-typedef PVOID USBD_PIPE_HANDLE;
-typedef PVOID USBD_CONFIGURATION_HANDLE;
-typedef PVOID USBD_INTERFACE_HANDLE;
-
-#define USBD_STATUS_SUCCESS ((USBD_STATUS)0x00000000L)
-#define USBD_STATUS_PENDING ((USBD_STATUS)0x40000000L)
-#define USBD_STATUS_CRC ((USBD_STATUS)0xC0000001L)
-#define USBD_STATUS_BTSTUFF ((USBD_STATUS)0xC0000002L)
-#define USBD_STATUS_DATA_TOGGLE_MISMATCH ((USBD_STATUS)0xC0000003L)
-#define USBD_STATUS_STALL_PID ((USBD_STATUS)0xC0000004L)
-#define USBD_STATUS_DEV_NOT_RESPONDING ((USBD_STATUS)0xC0000005L)
-#define USBD_STATUS_PID_CHECK_FAILURE ((USBD_STATUS)0xC0000006L)
-#define USBD_STATUS_UNEXPECTED_PID ((USBD_STATUS)0xC0000007L)
-#define USBD_STATUS_DATA_OVERRUN ((USBD_STATUS)0xC0000008L)
-#define USBD_STATUS_DATA_UNDERRUN ((USBD_STATUS)0xC0000009L)
-#define USBD_STATUS_RESERVED1 ((USBD_STATUS)0xC000000AL)
-#define USBD_STATUS_RESERVED2 ((USBD_STATUS)0xC000000BL)
-#define USBD_STATUS_BUFFER_OVERRUN ((USBD_STATUS)0xC000000CL)
-#define USBD_STATUS_BUFFER_UNDERRUN ((USBD_STATUS)0xC000000DL)
-#define USBD_STATUS_NOT_ACCESSED ((USBD_STATUS)0xC000000FL)
-#define USBD_STATUS_FIFO ((USBD_STATUS)0xC0000010L)
-#define USBD_STATUS_XACT_ERROR ((USBD_STATUS)0xC0000011L)
-#define USBD_STATUS_BABBLE_DETECTED ((USBD_STATUS)0xC0000012L)
-#define USBD_STATUS_DATA_BUFFER_ERROR ((USBD_STATUS)0xC0000013L)
-#define USBD_STATUS_ENDPOINT_HALTED ((USBD_STATUS)0xC0000030L)
-#define USBD_STATUS_INVALID_URB_FUNCTION ((USBD_STATUS)0x80000200L)
-#define USBD_STATUS_INVALID_PARAMETER ((USBD_STATUS)0x80000300L)
-#define USBD_STATUS_ERROR_BUSY ((USBD_STATUS)0x80000400L)
-#define USBD_STATUS_INVALID_PIPE_HANDLE ((USBD_STATUS)0x80000600L)
-#define USBD_STATUS_NO_BANDWIDTH ((USBD_STATUS)0x80000700L)
-#define USBD_STATUS_INTERNAL_HC_ERROR ((USBD_STATUS)0x80000800L)
-#define USBD_STATUS_ERROR_SHORT_TRANSFER ((USBD_STATUS)0x80000900L)
-#define USBD_STATUS_BAD_START_FRAME ((USBD_STATUS)0xC0000A00L)
-#define USBD_STATUS_ISOCH_REQUEST_FAILED ((USBD_STATUS)0xC0000B00L)
-#define USBD_STATUS_FRAME_CONTROL_OWNED ((USBD_STATUS)0xC0000C00L)
-#define USBD_STATUS_FRAME_CONTROL_NOT_OWNED \
- ((USBD_STATUS)0xC0000D00L)
-#define USBD_STATUS_NOT_SUPPORTED ((USBD_STATUS)0xC0000E00L)
-#define USBD_STATUS_INAVLID_CONFIGURATION_DESCRIPTOR \
- ((USBD_STATUS)0xC0000F00L)
-#define USBD_STATUS_INSUFFICIENT_RESOURCES \
- ((USBD_STATUS)0xC0001000L)
-#define USBD_STATUS_SET_CONFIG_FAILED ((USBD_STATUS)0xC0002000L)
-#define USBD_STATUS_BUFFER_TOO_SMALL ((USBD_STATUS)0xC0003000L)
-#define USBD_STATUS_INTERFACE_NOT_FOUND ((USBD_STATUS)0xC0004000L)
-#define USBD_STATUS_INAVLID_PIPE_FLAGS ((USBD_STATUS)0xC0005000L)
-#define USBD_STATUS_TIMEOUT ((USBD_STATUS)0xC0006000L)
-#define USBD_STATUS_DEVICE_GONE ((USBD_STATUS)0xC0007000L)
-#define USBD_STATUS_STATUS_NOT_MAPPED ((USBD_STATUS)0xC0008000L)
-#define USBD_STATUS_CANCELED ((USBD_STATUS)0xC0010000L)
-#define USBD_STATUS_ISO_NOT_ACCESSED_BY_HW \
- ((USBD_STATUS)0xC0020000L)
-#define USBD_STATUS_ISO_TD_ERROR ((USBD_STATUS)0xC0030000L)
-#define USBD_STATUS_ISO_NA_LATE_USBPORT ((USBD_STATUS)0xC0040000L)
-#define USBD_STATUS_ISO_NOT_ACCESSED_LATE ((USBD_STATUS)0xC0050000L)
-
-#define USBD_SUCCESS(Status) ((USBD_STATUS)(Status) >= 0)
-#define USBD_PENDING(Status) ((ULONG)(Status) >> 30 == 1)
-#define USBD_ERROR(Status) ((USBD_STATUS)(Status) < 0)
-
-/* URB TransferFlags constants */
-#define USBD_TRANSFER_DIRECTION(x) ((x) & USBD_TRANSFER_DIRECTION_IN)
-#define USBD_TRANSFER_DIRECTION_OUT 0
-#define USBD_TRANSFER_DIRECTION_BIT 0
-#define USBD_TRANSFER_DIRECTION_IN (1 << USBD_TRANSFER_DIRECTION_BIT)
-#define USBD_SHORT_TRANSFER_OK_BIT 1
-#define USBD_SHORT_TRANSFER_OK (1 << USBD_SHORT_TRANSFER_OK_BIT)
-#define USBD_START_ISO_TRANSFER_ASAP_BIT 2
-#define USBD_START_ISO_TRANSFER_ASAP (1 << USBD_START_ISO_TRANSFER_ASAP_BIT)
-#define USBD_DEFAULT_PIPE_TRANSFER_BIT 3
-#define USBD_DEFAULT_PIPE_TRANSFER (1 << USBD_DEFAULT_PIPE_TRANSFER_BIT)
-
-#define USBD_TRANSFER_DIRECTION_FLAG(flags) ((flags) & USBD_TRANSFER_DIRECTION)
-
-#define VALID_TRANSFER_FLAGS_MASK \
- (USBD_SHORT_TRANSFER_OK | \
- USBD_TRANSFER_DIRECTION | \
- USBD_START_ISO_TRANSFER_ASAP | \
- USBD_DEFAULT_PIPE_TRANSFER)
-
-#define USB_DEFAULT_DEVICE_ADDRESS 0
-#define USB_DEFAULT_ENDPOINT_ADDRESS 0
-#define USB_DEFAULT_MAX_PACKET 64
-#define USBD_ISO_START_FRAME_RANGE 1024
-#define USBD_DEFAULT_MAXIMUM_TRANSFER_SIZE 0xFFFFFFFF
-
-typedef enum _USB_CONTROLLER_FLAVOR {
- USB_HcGeneric = 0,
- OHCI_Generic = 100,
- OHCI_Hydra,
- OHCI_NEC,
- UHCI_Generic = 200,
- UHCI_Piix4,
- UHCI_Piix3,
- UHCI_Ich2_1,
- UHCI_Ich2_2,
- UHCI_Ich1,
- UHCI_VIA = 250,
- EHCI_Generic = 1000,
- EHCI_NEC = 2000,
- EHCI_Lucent = 3000
-} USB_CONTROLLER_FLAVOR;
-
-struct _URB_HEADER {
- USHORT Length;
- USHORT Function;
- USBD_STATUS Status;
- PVOID UsbdDeviceHandle;
- ULONG UsbdFlags;
-};
-
-typedef struct _USBD_VERSION_INFORMATION {
- ULONG USBDI_Version;
- ULONG Supported_USB_Version;
-} USBD_VERSION_INFORMATION, *PUSBD_VERSION_INFORMATION;
-
-struct _URB_HCD_AREA {
- PVOID Reserved8[8];
-};
-
-struct _URB_BULK_OR_INTERRUPT_TRANSFER {
- struct _URB_HEADER Hdr;
- USBD_PIPE_HANDLE PipeHandle;
- ULONG TransferFlags;
- ULONG TransferBufferLength;
- PVOID TransferBuffer;
- PMDL TransferBufferMDL;
- struct _URB *UrbLink;
- struct _URB_HCD_AREA hca;
-};
-
-struct _URB_CONTROL_DESCRIPTOR_REQUEST {
- struct _URB_HEADER Hdr;
- PVOID Reserved;
- ULONG Reserved0;
- ULONG TransferBufferLength;
- PVOID TransferBuffer;
- PMDL TransferBufferMDL;
- struct _URB *UrbLink;
- struct _URB_HCD_AREA hca;
- USHORT Reserved1;
- UCHAR Index;
- UCHAR DescriptorType;
- USHORT LanguageId;
- USHORT Reserved2;
-};
-
-struct _URB_CONTROL_FEATURE_REQUEST {
- struct _URB_HEADER Hdr;
- PVOID Reserved;
- ULONG Reserved2;
- ULONG Reserved3;
- PVOID Reserved4;
- PMDL Reserved5;
- struct _URB *UrbLink;
- struct _URB_HCD_AREA hca;
- USHORT Reserved0;
- USHORT FeatureSelector;
- USHORT Index;
- USHORT Reserved1;
-};
-
-struct _URB_CONTROL_GET_CONFIGURATION_REQUEST {
- struct _URB_HEADER Hdr;
- PVOID Reserved;
- ULONG Reserved0;
- ULONG TransferBufferLength;
- PVOID TransferBuffer;
- PMDL TransferBufferMDL;
- struct _URB *UrbLink;
- struct _URB_HCD_AREA hca;
- UCHAR Reserved1[8];
-};
-
-struct _URB_CONTROL_GET_INTERFACE_REQUEST {
- struct _URB_HEADER Hdr;
- PVOID Reserved;
- ULONG Reserved0;
- ULONG TransferBufferLength;
- PVOID TransferBuffer;
- PMDL TransferBufferMDL;
- struct _URB *UrbLink;
- struct _URB_HCD_AREA hca;
- UCHAR Reserved1[4];
- USHORT Interface;
- USHORT Reserved2;
-};
-
-struct _URB_CONTROL_GET_STATUS_REQUEST {
- struct _URB_HEADER Hdr;
- PVOID Reserved;
- ULONG Reserved0;
- ULONG TransferBufferLength;
- PVOID TransferBuffer;
- PMDL TransferBufferMDL;
- struct _URB *UrbLink;
- struct _URB_HCD_AREA hca;
- UCHAR Reserved1[4];
- USHORT Index;
- USHORT Reserved2;
-};
-
-struct _URB_CONTROL_TRANSFER {
- struct _URB_HEADER Hdr;
- USBD_PIPE_HANDLE PipeHandle;
- ULONG TransferFlags;
- ULONG TransferBufferLength;
- PVOID TransferBuffer;
- PMDL TransferBufferMDL;
- struct _URB *UrbLink;
- struct _URB_HCD_AREA hca;
- UCHAR SetupPacket[8];
-};
-
-struct _URB_CONTROL_VENDOR_OR_CLASS_REQUEST {
- struct _URB_HEADER Hdr;
- PVOID Reserved;
- ULONG TransferFlags;
- ULONG TransferBufferLength;
- PVOID TransferBuffer;
- PMDL TransferBufferMDL;
- struct _URB *UrbLink;
- struct _URB_HCD_AREA hca;
- UCHAR RequestTypeReservedBits;
- UCHAR Request;
- USHORT Value;
- USHORT Index;
- USHORT Reserved1;
-};
-
-struct _URB_FRAME_LENGTH_CONTROL {
- struct _URB_HEADER Hdr;
-};
-
-struct _URB_GET_CURRENT_FRAME_NUMBER {
- struct _URB_HEADER Hdr;
- ULONG FrameNumber;
-};
-
-struct _URB_GET_FRAME_LENGTH {
- struct _URB_HEADER Hdr;
- ULONG FrameLength;
- ULONG FrameNumber;
-};
-
-typedef struct _USBD_ISO_PACKET_DESCRIPTOR {
- ULONG Offset;
- ULONG Length;
- USBD_STATUS Status;
-} USBD_ISO_PACKET_DESCRIPTOR, *PUSBD_ISO_PACKET_DESCRIPTOR;
-
-struct _URB_ISOCH_TRANSFER {
- struct _URB_HEADER Hdr;
- USBD_PIPE_HANDLE PipeHandle;
- ULONG TransferFlags;
- ULONG TransferBufferLength;
- PVOID TransferBuffer;
- PMDL TransferBufferMDL;
- struct _URB *UrbLink;
- struct _URB_HCD_AREA hca;
- ULONG StartFrame;
- ULONG NumberOfPackets;
- ULONG ErrorCount;
- USBD_ISO_PACKET_DESCRIPTOR IsoPacket[1];
-};
-
-typedef enum _USBD_PIPE_TYPE {
- UsbdPipeTypeControl,
- UsbdPipeTypeIsochronous,
- UsbdPipeTypeBulk,
- UsbdPipeTypeInterrupt
-} USBD_PIPE_TYPE;
-
-typedef struct _USBD_PIPE_INFORMATION {
- USHORT MaximumPacketSize;
- UCHAR EndpointAddress;
- UCHAR Interval;
- USBD_PIPE_TYPE PipeType;
- USBD_PIPE_HANDLE PipeHandle;
- ULONG MaximumTransferSize;
- ULONG PipeFlags;
-} USBD_PIPE_INFORMATION, *PUSBD_PIPE_INFORMATION ;
-
-#define USBD_PIPE_DIRECTION_IN(pipeInformation) \
- ((pipeInformation)->EndpointAddress & USB_ENDPOINT_DIRECTION_MASK)
-
-typedef struct _USBD_INTERFACE_INFORMATION {
- USHORT Length;
- UCHAR InterfaceNumber;
- UCHAR AlternateSetting;
- UCHAR Class;
- UCHAR SubClass;
- UCHAR Protocol;
- UCHAR Reserved;
- USBD_INTERFACE_HANDLE InterfaceHandle;
- ULONG NumberOfPipes;
- USBD_PIPE_INFORMATION Pipes[1];
-} USBD_INTERFACE_INFORMATION, *PUSBD_INTERFACE_INFORMATION;
-
-struct _URB_SELECT_INTERFACE {
- struct _URB_HEADER Hdr;
- USBD_CONFIGURATION_HANDLE ConfigurationHandle;
- USBD_INTERFACE_INFORMATION Interface;
-};
-
-struct _URB_SELECT_CONFIGURATION {
- struct _URB_HEADER Hdr;
- PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor;
- USBD_CONFIGURATION_HANDLE ConfigurationHandle;
- USBD_INTERFACE_INFORMATION Interface;
-};
-
-struct _URB_PIPE_REQUEST {
- struct _URB_HEADER Hdr;
- USBD_PIPE_HANDLE PipeHandle;
- ULONG Reserved;
-};
-
-struct _URB_SET_FRAME_LENGTH {
- struct _URB_HEADER Hdr;
- LONG FrameLengthDelta;
-};
-
-typedef struct _URB {
- _ANONYMOUS_UNION union {
- struct _URB_HEADER UrbHeader;
- struct _URB_SELECT_INTERFACE UrbSelectInterface;
- struct _URB_SELECT_CONFIGURATION UrbSelectConfiguration;
- struct _URB_PIPE_REQUEST UrbPipeRequest;
- struct _URB_FRAME_LENGTH_CONTROL UrbFrameLengthControl;
- struct _URB_GET_FRAME_LENGTH UrbGetFrameLength;
- struct _URB_SET_FRAME_LENGTH UrbSetFrameLength;
- struct _URB_GET_CURRENT_FRAME_NUMBER UrbGetCurrentFrameNumber;
- struct _URB_CONTROL_TRANSFER UrbControlTransfer;
- struct _URB_BULK_OR_INTERRUPT_TRANSFER UrbBulkOrInterruptTransfer;
- struct _URB_ISOCH_TRANSFER UrbIsochronousTransfer;
- struct _URB_CONTROL_DESCRIPTOR_REQUEST UrbControlDescriptorRequest;
- struct _URB_CONTROL_GET_STATUS_REQUEST UrbControlGetStatusRequest;
- struct _URB_CONTROL_FEATURE_REQUEST UrbControlFeatureRequest;
- struct _URB_CONTROL_VENDOR_OR_CLASS_REQUEST UrbControlVendorClassRequest;
- struct _URB_CONTROL_GET_INTERFACE_REQUEST UrbControlGetInterfaceRequest;
- struct _URB_CONTROL_GET_CONFIGURATION_REQUEST UrbControlGetConfigurationRequest;
- } DUMMYUNIONNAME;
-} URB, *PURB;
-
-#define URB_FROM_IRP(Irp) ((IoGetCurrentIrpStackLocation(Irp))->Parameters.Others.Argument1)
-
-#define URB_FUNCTION_SELECT_CONFIGURATION 0x0000
-#define URB_FUNCTION_SELECT_INTERFACE 0x0001
-#define URB_FUNCTION_ABORT_PIPE 0x0002
-#define URB_FUNCTION_TAKE_FRAME_LENGTH_CONTROL 0x0003
-#define URB_FUNCTION_RELEASE_FRAME_LENGTH_CONTROL 0x0004
-#define URB_FUNCTION_GET_FRAME_LENGTH 0x0005
-#define URB_FUNCTION_SET_FRAME_LENGTH 0x0006
-#define URB_FUNCTION_GET_CURRENT_FRAME_NUMBER 0x0007
-#define URB_FUNCTION_CONTROL_TRANSFER 0x0008
-#define URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER 0x0009
-#define URB_FUNCTION_ISOCH_TRANSFER 0x000A
-#define URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE 0x000B
-#define URB_FUNCTION_SET_DESCRIPTOR_TO_DEVICE 0x000C
-#define URB_FUNCTION_SET_FEATURE_TO_DEVICE 0x000D
-#define URB_FUNCTION_SET_FEATURE_TO_INTERFACE 0x000E
-#define URB_FUNCTION_SET_FEATURE_TO_ENDPOINT 0x000F
-#define URB_FUNCTION_CLEAR_FEATURE_TO_DEVICE 0x0010
-#define URB_FUNCTION_CLEAR_FEATURE_TO_INTERFACE 0x0011
-#define URB_FUNCTION_CLEAR_FEATURE_TO_ENDPOINT 0x0012
-#define URB_FUNCTION_GET_STATUS_FROM_DEVICE 0x0013
-#define URB_FUNCTION_GET_STATUS_FROM_INTERFACE 0x0014
-#define URB_FUNCTION_GET_STATUS_FROM_ENDPOINT 0x0015
-#define URB_FUNCTION_RESERVED_0X0016 0x0016
-#define URB_FUNCTION_VENDOR_DEVICE 0x0017
-#define URB_FUNCTION_VENDOR_INTERFACE 0x0018
-#define URB_FUNCTION_VENDOR_ENDPOINT 0x0019
-#define URB_FUNCTION_CLASS_DEVICE 0x001A
-#define URB_FUNCTION_CLASS_INTERFACE 0x001B
-#define URB_FUNCTION_CLASS_ENDPOINT 0x001C
-#define URB_FUNCTION_RESERVE_0X001D 0x001D
-#define URB_FUNCTION_SYNC_RESET_PIPE_AND_CLEAR_STALL 0x001E
-#define URB_FUNCTION_CLASS_OTHER 0x001F
-#define URB_FUNCTION_VENDOR_OTHER 0x0020
-#define URB_FUNCTION_GET_STATUS_FROM_OTHER 0x0021
-#define URB_FUNCTION_CLEAR_FEATURE_TO_OTHER 0x0022
-#define URB_FUNCTION_SET_FEATURE_TO_OTHER 0x0023
-#define URB_FUNCTION_GET_DESCRIPTOR_FROM_ENDPOINT 0x0024
-#define URB_FUNCTION_SET_DESCRIPTOR_TO_ENDPOINT 0x0025
-#define URB_FUNCTION_GET_CONFIGURATION 0x0026
-#define URB_FUNCTION_GET_INTERFACE 0x0027
-#define URB_FUNCTION_GET_DESCRIPTOR_FROM_INTERFACE 0x0028
-#define URB_FUNCTION_SET_DESCRIPTOR_TO_INTERFACE 0x0029
-#define URB_FUNCTION_GET_MS_FEATURE_DESCRIPTOR 0x002A
-#define URB_FUNCTION_RESERVE_0X002B 0x002B
-#define URB_FUNCTION_RESERVE_0X002C 0x002C
-#define URB_FUNCTION_RESERVE_0X002D 0x002D
-#define URB_FUNCTION_RESERVE_0X002E 0x002E
-#define URB_FUNCTION_RESERVE_0X002F 0x002F
-#define URB_FUNCTION_SYNC_RESET_PIPE 0x0030
-#define URB_FUNCTION_SYNC_CLEAR_STALL 0x0031
-
-#define USBD_PF_CHANGE_MAX_PACKET 0x00000001
-#define USBD_PF_SHORT_PACKET_OPT 0x00000002
-#define USBD_PF_ENABLE_RT_THREAD_ACCESS 0x00000004
-#define USBD_PF_MAP_ADD_TRANSFERS 0x00000008
-
-#define USBD_PF_VALID_MASK (USBD_PF_CHANGE_MAX_PACKET | \
- USBD_PF_SHORT_PACKET_OPT | \
- USBD_PF_ENABLE_RT_THREAD_ACCESS | \
- USBD_PF_MAP_ADD_TRANSFERS)
-
-#define OS_STRING_DESCRIPTOR_INDEX 0xEE
-
-#define MS_GENRE_DESCRIPTOR_INDEX 0x0001
-#define MS_POWER_DESCRIPTOR_INDEX 0x0002
-
-#define MS_OS_STRING_SIGNATURE L"MSFT100"
-
-typedef struct _OS_STRING {
- UCHAR bLength;
- UCHAR bDescriptorType;
- WCHAR MicrosoftString[7];
- UCHAR bVendorCode;
- UCHAR bPad;
-} OS_STRING, *POS_STRING;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* defined __USBDI_H */
-
-#endif /* __USB_H */
diff --git a/winsup/w32api/include/ddk/usb100.h b/winsup/w32api/include/ddk/usb100.h
deleted file mode 100644
index 53b774b..0000000
--- a/winsup/w32api/include/ddk/usb100.h
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * usb100.h
- *
- * USB 1.0 support
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __USB100_H
-#define __USB100_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-#define MAXIMUM_USB_STRING_LENGTH 255
-
-#define USB_DEVICE_CLASS_RESERVED 0x00
-#define USB_DEVICE_CLASS_AUDIO 0x01
-#define USB_DEVICE_CLASS_COMMUNICATIONS 0x02
-#define USB_DEVICE_CLASS_HUMAN_INTERFACE 0x03
-#define USB_DEVICE_CLASS_MONITOR 0x04
-#define USB_DEVICE_CLASS_PHYSICAL_INTERFACE 0x05
-#define USB_DEVICE_CLASS_POWER 0x06
-#define USB_DEVICE_CLASS_PRINTER 0x07
-#define USB_DEVICE_CLASS_STORAGE 0x08
-#define USB_DEVICE_CLASS_HUB 0x09
-#define USB_DEVICE_CLASS_VENDOR_SPECIFIC 0xFF
-
-#define USB_RESERVED_DESCRIPTOR_TYPE 0x06
-#define USB_CONFIG_POWER_DESCRIPTOR_TYPE 0x07
-#define USB_INTERFACE_POWER_DESCRIPTOR_TYPE 0x08
-
-#define USB_REQUEST_GET_STATUS 0x00
-#define USB_REQUEST_CLEAR_FEATURE 0x01
-#define USB_REQUEST_SET_FEATURE 0x03
-#define USB_REQUEST_SET_ADDRESS 0x05
-#define USB_REQUEST_GET_DESCRIPTOR 0x06
-#define USB_REQUEST_SET_DESCRIPTOR 0x07
-#define USB_REQUEST_GET_CONFIGURATION 0x08
-#define USB_REQUEST_SET_CONFIGURATION 0x09
-#define USB_REQUEST_GET_INTERFACE 0x0A
-#define USB_REQUEST_SET_INTERFACE 0x0B
-#define USB_REQUEST_SYNC_FRAME 0x0C
-
-#define USB_GETSTATUS_SELF_POWERED 0x01
-#define USB_GETSTATUS_REMOTE_WAKEUP_ENABLED 0x02
-
-#define BMREQUEST_HOST_TO_DEVICE 0
-#define BMREQUEST_DEVICE_TO_HOST 1
-
-#define BMREQUEST_STANDARD 0
-#define BMREQUEST_CLASS 1
-#define BMREQUEST_VENDOR 2
-
-#define BMREQUEST_TO_DEVICE 0
-#define BMREQUEST_TO_INTERFACE 1
-#define BMREQUEST_TO_ENDPOINT 2
-#define BMREQUEST_TO_OTHER 3
-
-/* USB_COMMON_DESCRIPTOR.bDescriptorType constants */
-#define USB_DEVICE_DESCRIPTOR_TYPE 0x01
-#define USB_CONFIGURATION_DESCRIPTOR_TYPE 0x02
-#define USB_STRING_DESCRIPTOR_TYPE 0x03
-#define USB_INTERFACE_DESCRIPTOR_TYPE 0x04
-#define USB_ENDPOINT_DESCRIPTOR_TYPE 0x05
-
-typedef struct _USB_COMMON_DESCRIPTOR {
- UCHAR bLength;
- UCHAR bDescriptorType;
-} USB_COMMON_DESCRIPTOR, *PUSB_COMMON_DESCRIPTOR;
-
-#define USB_DESCRIPTOR_MAKE_TYPE_AND_INDEX(d, i) ((USHORT)((USHORT)d << 8 | i))
-
-/* USB_CONFIGURATION_DESCRIPTOR.bmAttributes constants */
-#define USB_CONFIG_POWERED_MASK 0xc0
-#define USB_CONFIG_BUS_POWERED 0x80
-#define USB_CONFIG_SELF_POWERED 0x40
-#define USB_CONFIG_REMOTE_WAKEUP 0x20
-
-#include <pshpack1.h>
-typedef struct _USB_CONFIGURATION_DESCRIPTOR {
- UCHAR bLength;
- UCHAR bDescriptorType;
- USHORT wTotalLength;
- UCHAR bNumInterfaces;
- UCHAR bConfigurationValue;
- UCHAR iConfiguration;
- UCHAR bmAttributes;
- UCHAR MaxPower;
-} USB_CONFIGURATION_DESCRIPTOR, *PUSB_CONFIGURATION_DESCRIPTOR;
-#include <poppack.h>
-
-typedef struct _USB_DEVICE_DESCRIPTOR {
- UCHAR bLength;
- UCHAR bDescriptorType;
- USHORT bcdUSB;
- UCHAR bDeviceClass;
- UCHAR bDeviceSubClass;
- UCHAR bDeviceProtocol;
- UCHAR bMaxPacketSize0;
- USHORT idVendor;
- USHORT idProduct;
- USHORT bcdDevice;
- UCHAR iManufacturer;
- UCHAR iProduct;
- UCHAR iSerialNumber;
- UCHAR bNumConfigurations;
-} USB_DEVICE_DESCRIPTOR, *PUSB_DEVICE_DESCRIPTOR;
-
-#define USB_ENDPOINT_DIRECTION_MASK 0x80
-
-#define USB_ENDPOINT_DIRECTION_OUT(x) (!((x) & USB_ENDPOINT_DIRECTION_MASK))
-#define USB_ENDPOINT_DIRECTION_IN(x) ((x) & USB_ENDPOINT_DIRECTION_MASK)
-
-/* USB_ENDPOINT_DESCRIPTOR.bmAttributes constants */
-#define USB_ENDPOINT_TYPE_MASK 0x03
-#define USB_ENDPOINT_TYPE_CONTROL 0x00
-#define USB_ENDPOINT_TYPE_ISOCHRONOUS 0x01
-#define USB_ENDPOINT_TYPE_BULK 0x02
-#define USB_ENDPOINT_TYPE_INTERRUPT 0x03
-
-#include <pshpack1.h>
-typedef struct _USB_ENDPOINT_DESCRIPTOR {
- UCHAR bLength;
- UCHAR bDescriptorType;
- UCHAR bEndpointAddress;
- UCHAR bmAttributes;
- USHORT wMaxPacketSize;
- UCHAR bInterval;
-} USB_ENDPOINT_DESCRIPTOR, *PUSB_ENDPOINT_DESCRIPTOR;
-#include <poppack.h>
-
-#define USB_FEATURE_ENDPOINT_STALL 0x0000
-#define USB_FEATURE_REMOTE_WAKEUP 0x0001
-
-typedef struct _USB_INTERFACE_DESCRIPTOR {
- UCHAR bLength;
- UCHAR bDescriptorType;
- UCHAR bInterfaceNumber;
- UCHAR bAlternateSetting;
- UCHAR bNumEndpoints;
- UCHAR bInterfaceClass;
- UCHAR bInterfaceSubClass;
- UCHAR bInterfaceProtocol;
- UCHAR iInterface;
-} USB_INTERFACE_DESCRIPTOR, *PUSB_INTERFACE_DESCRIPTOR;
-
-typedef struct _USB_STRING_DESCRIPTOR {
- UCHAR bLength;
- UCHAR bDescriptorType;
- WCHAR bString[1];
-} USB_STRING_DESCRIPTOR, *PUSB_STRING_DESCRIPTOR;
-
-#include <pshpack1.h>
-typedef struct _USB_HUB_DESCRIPTOR {
- UCHAR bDescriptorLength;
- UCHAR bDescriptorType;
- UCHAR bNumberOfPorts;
- USHORT wHubCharacteristics;
- UCHAR bPowerOnToPowerGood;
- UCHAR bHubControlCurrent;
- UCHAR bRemoveAndPowerMask[64];
-} USB_HUB_DESCRIPTOR, *PUSB_HUB_DESCRIPTOR;
-#include <poppack.h>
-
-#define USB_SUPPORT_D0_COMMAND 0x01
-#define USB_SUPPORT_D1_COMMAND 0x02
-#define USB_SUPPORT_D2_COMMAND 0x04
-#define USB_SUPPORT_D3_COMMAND 0x08
-
-#define USB_SUPPORT_D1_WAKEUP 0x10
-#define USB_SUPPORT_D2_WAKEUP 0x20
-
-typedef struct _USB_CONFIGURATION_POWER_DESCRIPTOR {
- UCHAR bLength;
- UCHAR bDescriptorType;
- UCHAR SelfPowerConsumedD0[3];
- UCHAR bPowerSummaryId;
- UCHAR bBusPowerSavingD1;
- UCHAR bSelfPowerSavingD1;
- UCHAR bBusPowerSavingD2;
- UCHAR bSelfPowerSavingD2;
- UCHAR bBusPowerSavingD3;
- UCHAR bSelfPowerSavingD3;
- USHORT TransitionTimeFromD1;
- USHORT TransitionTimeFromD2;
- USHORT TransitionTimeFromD3;
-} USB_CONFIGURATION_POWER_DESCRIPTOR, *PUSB_CONFIGURATION_POWER_DESCRIPTOR;
-
-#define USB_FEATURE_INTERFACE_POWER_D0 0x0002
-#define USB_FEATURE_INTERFACE_POWER_D1 0x0003
-#define USB_FEATURE_INTERFACE_POWER_D2 0x0004
-#define USB_FEATURE_INTERFACE_POWER_D3 0x0005
-
-#include <pshpack1.h>
-typedef struct _USB_INTERFACE_POWER_DESCRIPTOR {
- UCHAR bLength;
- UCHAR bDescriptorType;
- UCHAR bmCapabilitiesFlags;
- UCHAR bBusPowerSavingD1;
- UCHAR bSelfPowerSavingD1;
- UCHAR bBusPowerSavingD2;
- UCHAR bSelfPowerSavingD2;
- UCHAR bBusPowerSavingD3;
- UCHAR bSelfPowerSavingD3;
- USHORT TransitionTimeFromD1;
- USHORT TransitionTimeFromD2;
- USHORT TransitionTimeFromD3;
-} USB_INTERFACE_POWER_DESCRIPTOR, *PUSB_INTERFACE_POWER_DESCRIPTOR;
-#include <poppack.h>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __USB100_H */
diff --git a/winsup/w32api/include/ddk/usbcamdi.h b/winsup/w32api/include/ddk/usbcamdi.h
deleted file mode 100644
index 3a0f9de..0000000
--- a/winsup/w32api/include/ddk/usbcamdi.h
+++ /dev/null
@@ -1,404 +0,0 @@
-/*
- * usbcamdi.h
- *
- * USB Camera driver interface.
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __USBCAMDI_H
-#define __USBCAMDI_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#if !defined(__USB_H) && !defined(__USBDI_H)
-#error include usb.h or usbdi.h before usbcamdi.h
-#else
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#pragma pack(push,4)
-
-#include "ntddk.h"
-
-#if defined(_BATTERYCLASS_)
- #define USBCAMAPI DECLSPEC_EXPORT
-#else
- #define USBCAMAPI DECLSPEC_IMPORT
-#endif
-
-
-/* FIXME: Unknown definition */
-typedef PVOID PHW_STREAM_REQUEST_BLOCK;
-
-DEFINE_GUID(GUID_USBCAMD_INTERFACE,
- 0x2bcb75c0, 0xb27f, 0x11d1, 0xba, 0x41, 0x0, 0xa0, 0xc9, 0xd, 0x2b, 0x5);
-
-#define USBCAMD_PROCESSPACKETEX_DropFrame 0x0002
-#define USBCAMD_PROCESSPACKETEX_NextFrameIsStill 0x0004
-#define USBCAMD_PROCESSPACKETEX_CurrentFrameIsStill 0x0008
-
-#define USBCAMD_DATA_PIPE 0x0001
-#define USBCAMD_MULTIPLEX_PIPE 0x0002
-#define USBCAMD_SYNC_PIPE 0x0004
-#define USBCAMD_DONT_CARE_PIPE 0x0008
-
-#define USBCAMD_VIDEO_STREAM 0x1
-#define USBCAMD_STILL_STREAM 0x2
-#define USBCAMD_VIDEO_STILL_STREAM (USBCAMD_VIDEO_STREAM | USBCAMD_STILL_STREAM)
-
-#define USBCAMD_STOP_STREAM 0x00000001
-#define USBCAMD_START_STREAM 0x00000000
-
-typedef struct _pipe_config_descriptor {
- CHAR StreamAssociation;
- UCHAR PipeConfigFlags;
-} USBCAMD_Pipe_Config_Descriptor, *PUSBCAMD_Pipe_Config_Descriptor;
-
-typedef enum {
- USBCAMD_CamControlFlag_NoVideoRawProcessing = 1,
- USBCAMD_CamControlFlag_NoStillRawProcessing = 2,
- USBCAMD_CamControlFlag_AssociatedFormat = 4,
- USBCAMD_CamControlFlag_EnableDeviceEvents = 8
-} USBCAMD_CamControlFlags;
-
-typedef NTSTATUS DDKAPI
-(*PCAM_ALLOCATE_BW_ROUTINE)(
- PDEVICE_OBJECT BusDeviceObject,
- PVOID DeviceContext,
- PULONG RawFrameLength,
- PVOID Format);
-
-typedef NTSTATUS DDKAPI
-(*PCAM_ALLOCATE_BW_ROUTINE_EX)(
- PDEVICE_OBJECT BusDeviceObject,
- PVOID DeviceContext,
- PULONG RawFrameLength,
- PVOID Format,
- ULONG StreamNumber);
-
-typedef NTSTATUS DDKAPI
-(*PCAM_CONFIGURE_ROUTINE)(
- PDEVICE_OBJECT BusDeviceObject,
- PVOID DeviceContext,
- PUSBD_INTERFACE_INFORMATION Interface,
- PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor,
- PLONG DataPipeIndex,
- PLONG SyncPipeIndex);
-
-typedef NTSTATUS DDKAPI
-(*PCAM_CONFIGURE_ROUTINE_EX)(
- PDEVICE_OBJECT BusDeviceObject,
- PVOID DeviceContext,
- PUSBD_INTERFACE_INFORMATION Interface,
- PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor,
- ULONG PipeConfigListSize,
- PUSBCAMD_Pipe_Config_Descriptor PipeConfig,
- PUSB_DEVICE_DESCRIPTOR DeviceDescriptor);
-
-typedef NTSTATUS DDKAPI
-(*PCAM_FREE_BW_ROUTINE)(
- PDEVICE_OBJECT BusDeviceObject,
- PVOID DeviceContext);
-
-typedef NTSTATUS DDKAPI
-(*PCAM_FREE_BW_ROUTINE_EX)(
- PDEVICE_OBJECT BusDeviceObject,
- PVOID DeviceContext,
- ULONG StreamNumber);
-
-typedef NTSTATUS DDKAPI
-(*PCAM_INITIALIZE_ROUTINE)(
- PDEVICE_OBJECT BusDeviceObject,
- PVOID DeviceContext);
-
-typedef VOID DDKAPI
-(*PCAM_NEW_FRAME_ROUTINE)(
- PVOID DeviceContext,
- PVOID FrameContext);
-
-typedef VOID DDKAPI
-(*PCAM_NEW_FRAME_ROUTINE_EX)(
- PVOID DeviceContext,
- PVOID FrameContext,
- ULONG StreamNumber,
- PULONG FrameLength);
-
-typedef NTSTATUS DDKAPI
-(*PCAM_PROCESS_RAW_FRAME_ROUTINE)(
- PDEVICE_OBJECT BusDeviceObject,
- PVOID DeviceContext,
- PVOID FrameContext,
- PVOID FrameBuffer,
- ULONG FrameLength,
- PVOID RawFrameBuffer,
- ULONG RawFrameLength,
- ULONG NumberOfPackets,
- PULONG BytesReturned);
-
-typedef NTSTATUS DDKAPI
-(*PCAM_PROCESS_RAW_FRAME_ROUTINE_EX)(
- PDEVICE_OBJECT BusDeviceObject,
- PVOID DeviceContext,
- PVOID FrameContext,
- PVOID FrameBuffer,
- ULONG FrameLength,
- PVOID RawFrameBuffer,
- ULONG RawFrameLength,
- ULONG NumberOfPackets,
- PULONG BytesReturned,
- ULONG ActualRawFrameLength,
- ULONG StreamNumber);
-
-typedef ULONG DDKAPI
-(*PCAM_PROCESS_PACKET_ROUTINE)(
- PDEVICE_OBJECT BusDeviceObject,
- PVOID DeviceContext,
- PVOID CurrentFrameContext,
- PUSBD_ISO_PACKET_DESCRIPTOR SyncPacket,
- PVOID SyncBuffer,
- PUSBD_ISO_PACKET_DESCRIPTOR DataPacket,
- PVOID DataBuffer,
- PBOOLEAN FrameComplete,
- PBOOLEAN NextFrameIsStill);
-
-typedef ULONG DDKAPI
-(*PCAM_PROCESS_PACKET_ROUTINE_EX)(
- PDEVICE_OBJECT BusDeviceObject,
- PVOID DeviceContext,
- PVOID CurrentFrameContext,
- PUSBD_ISO_PACKET_DESCRIPTOR SyncPacket,
- PVOID SyncBuffer,
- PUSBD_ISO_PACKET_DESCRIPTOR DataPacket,
- PVOID DataBuffer,
- PBOOLEAN FrameComplete,
- PULONG PacketFlag,
- PULONG ValidDataOffset);
-
-typedef NTSTATUS DDKAPI
-(*PCAM_STATE_ROUTINE)(
- PDEVICE_OBJECT BusDeviceObject,
- PVOID DeviceContext);
-
-typedef NTSTATUS DDKAPI
-(*PCAM_START_CAPTURE_ROUTINE)(
- PDEVICE_OBJECT BusDeviceObject,
- PVOID DeviceContext);
-
-typedef NTSTATUS DDKAPI
-(*PCAM_START_CAPTURE_ROUTINE_EX)(
- PDEVICE_OBJECT BusDeviceObject,
- PVOID DeviceContext,
- ULONG StreamNumber);
-
-typedef NTSTATUS DDKAPI
-(*PCAM_STOP_CAPTURE_ROUTINE)(
- PDEVICE_OBJECT BusDeviceObject,
- PVOID DeviceContext);
-
-typedef NTSTATUS DDKAPI
-(*PCAM_STOP_CAPTURE_ROUTINE_EX)(
- PDEVICE_OBJECT BusDeviceObject,
- PVOID DeviceContext,
- ULONG StreamNumber);
-
-typedef struct _USBCAMD_DEVICE_DATA {
- ULONG Sig;
- PCAM_INITIALIZE_ROUTINE CamInitialize;
- PCAM_INITIALIZE_ROUTINE CamUnInitialize;
- PCAM_PROCESS_PACKET_ROUTINE CamProcessUSBPacket;
- PCAM_NEW_FRAME_ROUTINE CamNewVideoFrame;
- PCAM_PROCESS_RAW_FRAME_ROUTINE CamProcessRawVideoFrame;
- PCAM_START_CAPTURE_ROUTINE CamStartCapture;
- PCAM_STOP_CAPTURE_ROUTINE CamStopCapture;
- PCAM_CONFIGURE_ROUTINE CamConfigure;
- PCAM_STATE_ROUTINE CamSaveState;
- PCAM_STATE_ROUTINE CamRestoreState;
- PCAM_ALLOCATE_BW_ROUTINE CamAllocateBandwidth;
- PCAM_FREE_BW_ROUTINE CamFreeBandwidth;
-} USBCAMD_DEVICE_DATA, *PUSBCAMD_DEVICE_DATA;
-
-typedef struct _USBCAMD_DEVICE_DATA2 {
- ULONG Sig;
- PCAM_INITIALIZE_ROUTINE CamInitialize;
- PCAM_INITIALIZE_ROUTINE CamUnInitialize;
- PCAM_PROCESS_PACKET_ROUTINE_EX CamProcessUSBPacketEx;
- PCAM_NEW_FRAME_ROUTINE_EX CamNewVideoFrameEx;
- PCAM_PROCESS_RAW_FRAME_ROUTINE_EX CamProcessRawVideoFrameEx;
- PCAM_START_CAPTURE_ROUTINE_EX CamStartCaptureEx;
- PCAM_STOP_CAPTURE_ROUTINE_EX CamStopCaptureEx;
- PCAM_CONFIGURE_ROUTINE_EX CamConfigureEx;
- PCAM_STATE_ROUTINE CamSaveState;
- PCAM_STATE_ROUTINE CamRestoreState;
- PCAM_ALLOCATE_BW_ROUTINE_EX CamAllocateBandwidthEx;
- PCAM_FREE_BW_ROUTINE_EX CamFreeBandwidthEx;
-} USBCAMD_DEVICE_DATA2, *PUSBCAMD_DEVICE_DATA2;
-
-USBCAMAPI
-ULONG
-DDKAPI
-USBCAMD_InitializeNewInterface(
- /*IN*/ PVOID DeviceContext,
- /*IN*/ PVOID DeviceData,
- /*IN*/ ULONG Version,
- /*IN*/ ULONG CamControlFlag);
-
-typedef VOID DDKAPI
-(*PCOMMAND_COMPLETE_FUNCTION)(
- PVOID DeviceContext,
- PVOID CommandContext,
- NTSTATUS NtStatus);
-
-typedef NTSTATUS DDKAPI
-(*PFNUSBCAMD_BulkReadWrite)(
- /*IN*/ PVOID DeviceContext,
- /*IN*/ USHORT PipeIndex,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG BufferLength,
- /*IN*/ PCOMMAND_COMPLETE_FUNCTION CommandComplete,
- /*IN*/ PVOID CommandContext);
-
-typedef NTSTATUS DDKAPI
-(*PFNUSBCAMD_SetIsoPipeState)(
- /*IN*/ PVOID DeviceContext,
- /*IN*/ ULONG PipeStateFlags);
-
-typedef NTSTATUS DDKAPI
-(*PFNUSBCAMD_CancelBulkReadWrite)(
- /*IN*/ PVOID DeviceContext,
- /*IN*/ ULONG PipeIndex);
-
-typedef NTSTATUS DDKAPI
-(*PFNUSBCAMD_SetVideoFormat)(
- /*IN*/ PVOID DeviceContext,
- /*IN*/ PHW_STREAM_REQUEST_BLOCK pSrb);
-
-typedef NTSTATUS DDKAPI
-(*PFNUSBCAMD_WaitOnDeviceEvent)(
- /*IN*/ PVOID DeviceContext,
- /*IN*/ ULONG PipeIndex,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG BufferLength,
- /*IN*/ PCOMMAND_COMPLETE_FUNCTION EventComplete,
- /*IN*/ PVOID EventContext,
- /*IN*/ BOOLEAN LoopBack);
-
-USBCAMAPI
-PVOID
-DDKAPI
-USBCAMD_AdapterReceivePacket(
- /*IN*/ PHW_STREAM_REQUEST_BLOCK Srb,
- /*IN*/ PUSBCAMD_DEVICE_DATA DeviceData,
- /*IN*/ PDEVICE_OBJECT *DeviceObject,
- /*IN*/ BOOLEAN NeedsCompletion);
-
-USBCAMAPI
-NTSTATUS
-DDKAPI
-USBCAMD_ControlVendorCommand(
- /*IN*/ PVOID DeviceContext,
- /*IN*/ UCHAR Request,
- /*IN*/ USHORT Value,
- /*IN*/ USHORT Index,
- /*IN*/ PVOID Buffer,
- /*IN OUT*/ PULONG BufferLength,
- /*IN*/ BOOLEAN GetData,
- /*IN*/ PCOMMAND_COMPLETE_FUNCTION CommandComplete,
- /*IN*/ PVOID CommandContext);
-
-typedef VOID DDKAPI
-(*PADAPTER_RECEIVE_PACKET_ROUTINE)(
- /*IN*/ PHW_STREAM_REQUEST_BLOCK Srb);
-
-USBCAMAPI
-ULONG
-DDKAPI
-USBCAMD_DriverEntry(
- PVOID Context1,
- PVOID Context2,
- ULONG DeviceContextSize,
- ULONG FrameContextSize,
- PADAPTER_RECEIVE_PACKET_ROUTINE ReceivePacket);
-
-USBCAMAPI
-NTSTATUS
-DDKAPI
-USBCAMD_GetRegistryKeyValue(
- /*IN*/ HANDLE Handle,
- /*IN*/ PWCHAR KeyNameString,
- /*IN*/ ULONG KeyNameStringLength,
- /*IN*/ PVOID Data,
- /*IN*/ ULONG DataLength);
-
-USBCAMAPI
-NTSTATUS
-DDKAPI
-USBCAMD_SelectAlternateInterface(
- /*IN*/ PVOID DeviceContext,
- /*IN OUT*/ PUSBD_INTERFACE_INFORMATION RequestInterface);
-
-#define USBCAMD_VERSION_200 0x200
-
-typedef struct _USBCAMD_INTERFACE {
- INTERFACE Interface;
- PFNUSBCAMD_WaitOnDeviceEvent USBCAMD_WaitOnDeviceEvent;
- PFNUSBCAMD_BulkReadWrite USBCAMD_BulkReadWrite;
- PFNUSBCAMD_SetVideoFormat USBCAMD_SetVideoFormat;
- PFNUSBCAMD_SetIsoPipeState USBCAMD_SetIsoPipeState;
- PFNUSBCAMD_CancelBulkReadWrite USBCAMD_CancelBulkReadWrite;
-} USBCAMD_INTERFACE, *PUSBCAMD_INTERFACE;
-
-typedef VOID DDKAPI
-(*PSTREAM_RECEIVE_PACKET)(
- /*IN*/ PVOID Srb,
- /*IN*/ PVOID DeviceContext,
- /*IN*/ PBOOLEAN Completed);
-
-#if defined(DEBUG_LOG)
-
-USBCAMAPI
-VOID
-DDKAPI
-USBCAMD_Debug_LogEntry(
- /*IN*/ CHAR *Name,
- /*IN*/ ULONG Info1,
- /*IN*/ ULONG Info2,
- /*IN*/ ULONG Info3);
-
-#define ILOGENTRY(sig, info1, info2, info3) \
- USBCAMD_Debug_LogEntry(sig, (ULONG)info1, (ULONG)info2, (ULONG)info3)
-
-#else
-
-#define ILOGENTRY(sig, info1, info2, info3)
-
-#endif /* DEBUG_LOG */
-
-#pragma pack(pop)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !defined(__USB_H) && !defined(__USBDI_H) */
-
-
-#endif /* __USBCAMDI_H */
diff --git a/winsup/w32api/include/ddk/usbdi.h b/winsup/w32api/include/ddk/usbdi.h
deleted file mode 100644
index 99d2475..0000000
--- a/winsup/w32api/include/ddk/usbdi.h
+++ /dev/null
@@ -1,407 +0,0 @@
-/*
- * usbdi.h
- *
- * USBD and USB device driver definitions
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __USBDI_H
-#define __USBDI_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __USB_H
-#error usb.h cannot be included with usbdi.h
-#else
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include "usbioctl.h"
-
-#define USBDI_VERSION 0x300
-
-#define USB_DEFAULT_DEVICE_ADDRESS 0
-#define USB_DEFAULT_ENDPOINT_ADDRESS 0
-#define USB_DEFAULT_MAX_PACKET 64
-
-#define URB_FROM_IRP(Irp) ((IoGetCurrentIrpStackLocation(Irp))->Parameters.Others.Argument1)
-
-#define URB_FUNCTION_SELECT_CONFIGURATION 0x0000
-#define URB_FUNCTION_SELECT_INTERFACE 0x0001
-#define URB_FUNCTION_ABORT_PIPE 0x0002
-#define URB_FUNCTION_TAKE_FRAME_LENGTH_CONTROL 0x0003
-#define URB_FUNCTION_RELEASE_FRAME_LENGTH_CONTROL 0x0004
-#define URB_FUNCTION_GET_FRAME_LENGTH 0x0005
-#define URB_FUNCTION_SET_FRAME_LENGTH 0x0006
-#define URB_FUNCTION_GET_CURRENT_FRAME_NUMBER 0x0007
-#define URB_FUNCTION_CONTROL_TRANSFER 0x0008
-#define URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER 0x0009
-#define URB_FUNCTION_ISOCH_TRANSFER 0x000A
-#define URB_FUNCTION_RESET_PIPE 0x001E
-#define URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE 0x000B
-#define URB_FUNCTION_GET_DESCRIPTOR_FROM_ENDPOINT 0x0024
-#define URB_FUNCTION_GET_DESCRIPTOR_FROM_INTERFACE 0x0028
-#define URB_FUNCTION_SET_DESCRIPTOR_TO_DEVICE 0x000C
-#define URB_FUNCTION_SET_DESCRIPTOR_TO_ENDPOINT 0x0025
-#define URB_FUNCTION_SET_DESCRIPTOR_TO_INTERFACE 0x0029
-#define URB_FUNCTION_SET_FEATURE_TO_DEVICE 0x000D
-#define URB_FUNCTION_SET_FEATURE_TO_INTERFACE 0x000E
-#define URB_FUNCTION_SET_FEATURE_TO_ENDPOINT 0x000F
-#define URB_FUNCTION_SET_FEATURE_TO_OTHER 0x0023
-#define URB_FUNCTION_CLEAR_FEATURE_TO_DEVICE 0x0010
-#define URB_FUNCTION_CLEAR_FEATURE_TO_INTERFACE 0x0011
-#define URB_FUNCTION_CLEAR_FEATURE_TO_ENDPOINT 0x0012
-#define URB_FUNCTION_CLEAR_FEATURE_TO_OTHER 0x0022
-#define URB_FUNCTION_GET_STATUS_FROM_DEVICE 0x0013
-#define URB_FUNCTION_GET_STATUS_FROM_INTERFACE 0x0014
-#define URB_FUNCTION_GET_STATUS_FROM_ENDPOINT 0x0015
-#define URB_FUNCTION_GET_STATUS_FROM_OTHER 0x0021
-#define URB_FUNCTION_RESERVED0 0x0016
-#define URB_FUNCTION_VENDOR_DEVICE 0x0017
-#define URB_FUNCTION_VENDOR_INTERFACE 0x0018
-#define URB_FUNCTION_VENDOR_ENDPOINT 0x0019
-#define URB_FUNCTION_VENDOR_OTHER 0x0020
-#define URB_FUNCTION_CLASS_DEVICE 0x001A
-#define URB_FUNCTION_CLASS_INTERFACE 0x001B
-#define URB_FUNCTION_CLASS_ENDPOINT 0x001C
-#define URB_FUNCTION_CLASS_OTHER 0x001F
-#define URB_FUNCTION_RESERVED 0x001D
-#define URB_FUNCTION_GET_CONFIGURATION 0x0026
-#define URB_FUNCTION_GET_INTERFACE 0x0027
-#define URB_FUNCTION_LAST 0x0029
-
-typedef LONG USBD_STATUS;
-typedef PVOID USBD_PIPE_HANDLE;
-typedef PVOID USBD_CONFIGURATION_HANDLE;
-typedef PVOID USBD_INTERFACE_HANDLE;
-
-#define USBD_ERROR(Status) ((USBD_STATUS)(Status) < 0)
-#define USBD_HALTED(Status) ((ULONG)(Status) >> 30 == 3)
-#define USBD_PENDING(Status) ((ULONG)(Status) >> 30 == 1)
-#define USBD_STATUS(Status) ((ULONG)(Status) & 0x0FFFFFFFL)
-#define USBD_SUCCESS(Status) ((USBD_STATUS)(Status) >= 0)
-
-#define USBD_STATUS_SUCCESS ((USBD_STATUS)0x00000000L)
-#define USBD_STATUS_PENDING ((USBD_STATUS)0x40000000L)
-#define USBD_STATUS_HALTED ((USBD_STATUS)0xC0000000L)
-#define USBD_STATUS_ERROR ((USBD_STATUS)0x80000000L)
-#define USBD_STATUS_NO_MEMORY ((USBD_STATUS)0x80000100L)
-#define USBD_STATUS_INVALID_URB_FUNCTION ((USBD_STATUS)0x80000200L)
-#define USBD_STATUS_INVALID_PARAMETER ((USBD_STATUS)0x80000300L)
-#define USBD_STATUS_ERROR_BUSY ((USBD_STATUS)0x80000400L)
-#define USBD_STATUS_REQUEST_FAILED ((USBD_STATUS)0x80000500L)
-#define USBD_STATUS_INVALID_PIPE_HANDLE ((USBD_STATUS)0x80000600L)
-#define USBD_STATUS_NO_BANDWIDTH ((USBD_STATUS)0x80000700L)
-#define USBD_STATUS_INTERNAL_HC_ERROR ((USBD_STATUS)0x80000800L)
-#define USBD_STATUS_ERROR_SHORT_TRANSFER ((USBD_STATUS)0x80000900L)
-#define USBD_STATUS_CRC ((USBD_STATUS)0xC0000001L)
-#define USBD_STATUS_BTSTUFF ((USBD_STATUS)0xC0000002L)
-#define USBD_STATUS_DATA_TOGGLE_MISMATCH ((USBD_STATUS)0xC0000003L)
-#define USBD_STATUS_STALL_PID ((USBD_STATUS)0xC0000004L)
-#define USBD_STATUS_DEV_NOT_RESPONDING ((USBD_STATUS)0xC0000005L)
-#define USBD_STATUS_PID_CHECK_FAILURE ((USBD_STATUS)0xC0000006L)
-#define USBD_STATUS_UNEXPECTED_PID ((USBD_STATUS)0xC0000007L)
-#define USBD_STATUS_DATA_OVERRUN ((USBD_STATUS)0xC0000008L)
-#define USBD_STATUS_DATA_UNDERRUN ((USBD_STATUS)0xC0000009L)
-#define USBD_STATUS_RESERVED1 ((USBD_STATUS)0xC000000AL)
-#define USBD_STATUS_RESERVED2 ((USBD_STATUS)0xC000000BL)
-#define USBD_STATUS_BUFFER_OVERRUN ((USBD_STATUS)0xC000000CL)
-#define USBD_STATUS_BUFFER_UNDERRUN ((USBD_STATUS)0xC000000DL)
-#define USBD_STATUS_NOT_ACCESSED ((USBD_STATUS)0xC000000FL)
-#define USBD_STATUS_FIFO ((USBD_STATUS)0xC0000010L)
-#define USBD_STATUS_ENDPOINT_HALTED ((USBD_STATUS)0xC0000030L)
-#define USBD_STATUS_BAD_START_FRAME ((USBD_STATUS)0xC0000A00L)
-#define USBD_STATUS_ISOCH_REQUEST_FAILED ((USBD_STATUS)0xC0000B00L)
-#define USBD_STATUS_FRAME_CONTROL_OWNED ((USBD_STATUS)0xC0000C00L)
-#define USBD_STATUS_FRAME_CONTROL_NOT_OWNED \
- ((USBD_STATUS)0xC0000D00L)
-#define USBD_STATUS_INAVLID_CONFIGURATION_DESCRIPTOR \
- ((USBD_STATUS)0xC0000F00L)
-#define USBD_STATUS_CANCELING ((USBD_STATUS)0x00020000L)
-
-#define USBD_PIPE_DIRECTION_IN(pipeInformation) \
- ((pipeInformation)->EndpointAddress & USB_ENDPOINT_DIRECTION_MASK)
-
-struct _URB_HEADER {
- USHORT Length;
- USHORT Function;
- USBD_STATUS Status;
- PVOID UsbdDeviceHandle;
- ULONG UsbdFlags;
-};
-
-struct _URB_HCD_AREA {
- PVOID HcdEndpoint;
- PIRP HcdIrp;
- LIST_ENTRY HcdListEntry;
- LIST_ENTRY HcdListEntry2;
- PVOID HcdCurrentIoFlushPointer;
- PVOID HcdExtension;
-};
-
-struct _URB_BULK_OR_INTERRUPT_TRANSFER {
- struct _URB_HEADER Hdr;
- USBD_PIPE_HANDLE PipeHandle;
- ULONG TransferFlags;
- ULONG TransferBufferLength;
- PVOID TransferBuffer;
- PMDL TransferBufferMDL;
- struct _URB *UrbLink;
- struct _URB_HCD_AREA hca;
-};
-
-struct _URB_CONTROL_DESCRIPTOR_REQUEST {
- struct _URB_HEADER Hdr;
- PVOID Reserved;
- ULONG Reserved0;
- ULONG TransferBufferLength;
- PVOID TransferBuffer;
- PMDL TransferBufferMDL;
- struct _URB *UrbLink;
- struct _URB_HCD_AREA hca;
- USHORT Reserved1;
- UCHAR Index;
- UCHAR DescriptorType;
- USHORT LanguageId;
- USHORT Reserved2;
-};
-
-struct _URB_CONTROL_FEATURE_REQUEST {
- struct _URB_HEADER Hdr;
- PVOID Reserved;
- ULONG Reserved2;
- ULONG Reserved3;
- PVOID Reserved4;
- PMDL Reserved5;
- struct _URB *UrbLink;
- struct _URB_HCD_AREA hca;
- USHORT Reserved0;
- USHORT FeatureSelector;
- USHORT Index;
- USHORT Reserved1;
-};
-
-struct _URB_CONTROL_GET_CONFIGURATION_REQUEST {
- struct _URB_HEADER Hdr;
- PVOID Reserved;
- ULONG Reserved0;
- ULONG TransferBufferLength;
- PVOID TransferBuffer;
- PMDL TransferBufferMDL;
- struct _URB *UrbLink;
- struct _URB_HCD_AREA hca;
- UCHAR Reserved1[8];
-};
-
-struct _URB_CONTROL_GET_INTERFACE_REQUEST {
- struct _URB_HEADER Hdr;
- PVOID Reserved;
- ULONG Reserved0;
- ULONG TransferBufferLength;
- PVOID TransferBuffer;
- PMDL TransferBufferMDL;
- struct _URB *UrbLink;
- struct _URB_HCD_AREA hca;
- UCHAR Reserved1[4];
- USHORT Interface;
- USHORT Reserved2;
-};
-
-struct _URB_CONTROL_GET_STATUS_REQUEST {
- struct _URB_HEADER Hdr;
- PVOID Reserved;
- ULONG Reserved0;
- ULONG TransferBufferLength;
- PVOID TransferBuffer;
- PMDL TransferBufferMDL;
- struct _URB *UrbLink;
- struct _URB_HCD_AREA hca;
- UCHAR Reserved1[4];
- USHORT Index;
- USHORT Reserved2;
-};
-
-struct _URB_CONTROL_TRANSFER {
- struct _URB_HEADER Hdr;
- USBD_PIPE_HANDLE PipeHandle;
- ULONG TransferFlags;
- ULONG TransferBufferLength;
- PVOID TransferBuffer;
- PMDL TransferBufferMDL;
- struct _URB *UrbLink;
- struct _URB_HCD_AREA hca;
- UCHAR SetupPacket[8];
-};
-
-struct _URB_CONTROL_VENDOR_OR_CLASS_REQUEST {
- struct _URB_HEADER Hdr;
- PVOID Reserved;
- ULONG TransferFlags;
- ULONG TransferBufferLength;
- PVOID TransferBuffer;
- PMDL TransferBufferMDL;
- struct _URB *UrbLink;
- struct _URB_HCD_AREA hca;
- UCHAR RequestTypeReservedBits;
- UCHAR Request;
- USHORT Value;
- USHORT Index;
- USHORT Reserved1;
-};
-
-struct _URB_FRAME_LENGTH_CONTROL {
- struct _URB_HEADER Hdr;
-};
-
-struct _URB_GET_CURRENT_FRAME_NUMBER {
- struct _URB_HEADER Hdr;
- ULONG FrameNumber;
-};
-
-struct _URB_GET_FRAME_LENGTH {
- struct _URB_HEADER Hdr;
- ULONG FrameLength;
- ULONG FrameNumber;
-};
-
-typedef struct _USBD_ISO_PACKET_DESCRIPTOR {
- ULONG Offset;
- ULONG Length;
- USBD_STATUS Status;
-} USBD_ISO_PACKET_DESCRIPTOR, *PUSBD_ISO_PACKET_DESCRIPTOR;
-
-struct _URB_ISOCH_TRANSFER {
- struct _URB_HEADER Hdr;
- USBD_PIPE_HANDLE PipeHandle;
- ULONG TransferFlags;
- ULONG TransferBufferLength;
- PVOID TransferBuffer;
- PMDL TransferBufferMDL;
- struct _URB *UrbLink;
- struct _URB_HCD_AREA hca;
- ULONG StartFrame;
- ULONG NumberOfPackets;
- ULONG ErrorCount;
- USBD_ISO_PACKET_DESCRIPTOR IsoPacket[1];
-};
-
-struct _URB_PIPE_REQUEST {
- struct _URB_HEADER Hdr;
- USBD_PIPE_HANDLE PipeHandle;
- ULONG Reserved;
-};
-
-struct _URB_SET_FRAME_LENGTH {
- struct _URB_HEADER Hdr;
- LONG FrameLengthDelta;
-};
-
-typedef struct _USBD_DEVICE_INFORMATION {
- ULONG OffsetNext;
- PVOID UsbdDeviceHandle;
- USB_DEVICE_DESCRIPTOR DeviceDescriptor;
-} USBD_DEVICE_INFORMATION, *PUSBD_DEVICE_INFORMATION;
-
-typedef enum _USBD_PIPE_TYPE {
- UsbdPipeTypeControl,
- UsbdPipeTypeIsochronous,
- UsbdPipeTypeBulk,
- UsbdPipeTypeInterrupt
-} USBD_PIPE_TYPE;
-
-/* USBD_PIPE_INFORMATION.PipeFlags constants */
-#define USBD_PF_CHANGE_MAX_PACKET 0x00000001
-#define USBD_PF_DOUBLE_BUFFER 0x00000002
-#define USBD_PF_ENABLE_RT_THREAD_ACCESS 0x00000004
-#define USBD_PF_MAP_ADD_TRANSFERS 0x00000008
-
-typedef struct _USBD_PIPE_INFORMATION {
- USHORT MaximumPacketSize;
- UCHAR EndpointAddress;
- UCHAR Interval;
- USBD_PIPE_TYPE PipeType;
- USBD_PIPE_HANDLE PipeHandle;
- ULONG MaximumTransferSize;
- ULONG PipeFlags;
-} USBD_PIPE_INFORMATION, *PUSBD_PIPE_INFORMATION;
-
-typedef struct _USBD_INTERFACE_INFORMATION {
- USHORT Length;
- UCHAR InterfaceNumber;
- UCHAR AlternateSetting;
- UCHAR Class;
- UCHAR SubClass;
- UCHAR Protocol;
- UCHAR Reserved;
- USBD_INTERFACE_HANDLE InterfaceHandle;
- ULONG NumberOfPipes;
- USBD_PIPE_INFORMATION Pipes[1];
-} USBD_INTERFACE_INFORMATION, *PUSBD_INTERFACE_INFORMATION;
-
-struct _URB_SELECT_CONFIGURATION {
- struct _URB_HEADER Hdr;
- PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor;
- USBD_CONFIGURATION_HANDLE ConfigurationHandle;
- USBD_INTERFACE_INFORMATION Interface;
-};
-
-struct _URB_SELECT_INTERFACE {
- struct _URB_HEADER Hdr;
- USBD_CONFIGURATION_HANDLE ConfigurationHandle;
- USBD_INTERFACE_INFORMATION Interface;
-};
-
-typedef struct _USBD_VERSION_INFORMATION {
- ULONG USBDI_Version;
- ULONG Supported_USB_Version;
-} USBD_VERSION_INFORMATION, *PUSBD_VERSION_INFORMATION;
-
-typedef struct _URB {
- union {
- struct _URB_HEADER UrbHeader;
- struct _URB_SELECT_INTERFACE UrbSelectInterface;
- struct _URB_SELECT_CONFIGURATION UrbSelectConfiguration;
- struct _URB_PIPE_REQUEST UrbPipeRequest;
- struct _URB_FRAME_LENGTH_CONTROL UrbFrameLengthControl;
- struct _URB_GET_FRAME_LENGTH UrbGetFrameLength;
- struct _URB_SET_FRAME_LENGTH UrbSetFrameLength;
- struct _URB_GET_CURRENT_FRAME_NUMBER UrbGetCurrentFrameNumber;
- struct _URB_CONTROL_TRANSFER UrbControlTransfer;
- struct _URB_BULK_OR_INTERRUPT_TRANSFER UrbBulkOrInterruptTransfer;
- struct _URB_ISOCH_TRANSFER UrbIsochronousTransfer;
- struct _URB_CONTROL_DESCRIPTOR_REQUEST UrbControlDescriptorRequest;
- struct _URB_CONTROL_GET_STATUS_REQUEST UrbControlGetStatusRequest;
- struct _URB_CONTROL_FEATURE_REQUEST UrbControlFeatureRequest;
- struct _URB_CONTROL_VENDOR_OR_CLASS_REQUEST UrbControlVendorClassRequest;
- struct _URB_CONTROL_GET_INTERFACE_REQUEST UrbControlGetInterfaceRequest;
- struct _URB_CONTROL_GET_CONFIGURATION_REQUEST UrbControlGetConfigurationRequest;
- };
-} URB, *PURB;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* defined __USB_H */
-
-#endif /* __USBDI_H */
diff --git a/winsup/w32api/include/ddk/usbioctl.h b/winsup/w32api/include/ddk/usbioctl.h
deleted file mode 100644
index abd30b6..0000000
--- a/winsup/w32api/include/ddk/usbioctl.h
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
- * usbioctl.h
- *
- * USB IOCTL interface.
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __USBIOCTL_H
-#define __USBIOCTL_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include "usb100.h"
-#include "usbiodef.h"
-
-#define USBD_PORT_ENABLED 1
-#define USBD_PORT_CONNECTED 2
-
-#define IOCTL_INTERNAL_USB_CYCLE_PORT \
- CTL_CODE(FILE_DEVICE_USB, USB_CYCLE_PORT, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_USB_ENABLE_PORT \
- CTL_CODE(FILE_DEVICE_USB, USB_ENABLE_PORT, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_USB_GET_BUS_INFO \
- CTL_CODE(FILE_DEVICE_USB, USB_GET_BUS_INFO, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_USB_GET_BUSGUID_INFO \
- CTL_CODE(FILE_DEVICE_USB, USB_GET_BUSGUID_INFO, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_USB_GET_CONTROLLER_NAME \
- CTL_CODE(FILE_DEVICE_USB, USB_GET_CONTROLLER_NAME, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_USB_GET_DEVICE_HANDLE \
- CTL_CODE(FILE_DEVICE_USB, USB_GET_DEVICE_HANDLE, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_USB_GET_HUB_COUNT \
- CTL_CODE(FILE_DEVICE_USB, USB_GET_HUB_COUNT, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_USB_GET_HUB_NAME \
- CTL_CODE(FILE_DEVICE_USB, USB_GET_HUB_NAME, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_USB_GET_PARENT_HUB_INFO \
- CTL_CODE(FILE_DEVICE_USB, USB_GET_PARENT_HUB_INFO, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_USB_GET_PORT_STATUS \
- CTL_CODE(FILE_DEVICE_USB, USB_GET_PORT_STATUS, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_USB_RESET_PORT \
- CTL_CODE(FILE_DEVICE_USB, USB_RESET_PORT, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_USB_GET_ROOTHUB_PDO \
- CTL_CODE(FILE_DEVICE_USB, USB_GET_ROOTHUB_PDO, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_USB_SUBMIT_IDLE_NOTIFICATION \
- CTL_CODE(FILE_DEVICE_USB, USB_IDLE_NOTIFICATION, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-#define IOCTL_INTERNAL_USB_SUBMIT_URB \
- CTL_CODE(FILE_DEVICE_USB, USB_SUBMIT_URB, METHOD_NEITHER, FILE_ANY_ACCESS)
-
-
-#define IOCTL_USB_DIAG_IGNORE_HUBS_ON \
- CTL_CODE(FILE_DEVICE_USB, USB_DIAG_IGNORE_HUBS_ON, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_USB_DIAG_IGNORE_HUBS_OFF \
- CTL_CODE(FILE_DEVICE_USB, USB_DIAG_IGNORE_HUBS_OFF, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_USB_DIAGNOSTIC_MODE_OFF \
- CTL_CODE(FILE_DEVICE_USB, HCD_DIAGNOSTIC_MODE_OFF, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_USB_DIAGNOSTIC_MODE_ON \
- CTL_CODE(FILE_DEVICE_USB, HCD_DIAGNOSTIC_MODE_ON, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION \
- CTL_CODE(FILE_DEVICE_USB, USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_USB_GET_HUB_CAPABILITIES \
- CTL_CODE(FILE_DEVICE_USB, USB_GET_HUB_CAPABILITIES, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_USB_GET_ROOT_HUB_NAME \
- CTL_CODE(FILE_DEVICE_USB, HCD_GET_ROOT_HUB_NAME, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_GET_HCD_DRIVERKEY_NAME \
- CTL_CODE(FILE_DEVICE_USB, HCD_GET_DRIVERKEY_NAME, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_USB_GET_NODE_INFORMATION \
- CTL_CODE(FILE_DEVICE_USB, USB_GET_NODE_INFORMATION, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_USB_GET_NODE_CONNECTION_INFORMATION \
- CTL_CODE(FILE_DEVICE_USB, USB_GET_NODE_CONNECTION_INFORMATION, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_USB_GET_NODE_CONNECTION_ATTRIBUTES \
- CTL_CODE(FILE_DEVICE_USB, USB_GET_NODE_CONNECTION_ATTRIBUTES, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_USB_GET_NODE_CONNECTION_NAME \
- CTL_CODE(FILE_DEVICE_USB, USB_GET_NODE_CONNECTION_NAME, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_USB_GET_NODE_CONNECTION_DRIVERKEY_NAME \
- CTL_CODE(FILE_DEVICE_USB, USB_GET_NODE_CONNECTION_DRIVERKEY_NAME, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_USB_HCD_DISABLE_PORT \
- CTL_CODE(FILE_DEVICE_USB, HCD_DISABLE_PORT, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_USB_HCD_ENABLE_PORT \
- CTL_CODE(FILE_DEVICE_USB, HCD_ENABLE_PORT, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_USB_HCD_GET_STATS_1 \
- CTL_CODE(FILE_DEVICE_USB, HCD_GET_STATS_1, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define IOCTL_USB_HCD_GET_STATS_2 \
- CTL_CODE(FILE_DEVICE_USB, HCD_GET_STATS_2, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-
-typedef struct _USB_HUB_CAPABILITIES {
- ULONG HubIs2xCapable : 1;
-} USB_HUB_CAPABILITIES, *PUSB_HUB_CAPABILITIES;
-
-typedef enum _USB_CONNECTION_STATUS {
- NoDeviceConnected,
- DeviceConnected,
- DeviceFailedEnumeration,
- DeviceGeneralFailure,
- DeviceCausedOvercurrent,
- DeviceNotEnoughPower,
- DeviceNotEnoughBandwidth,
- DeviceHubNestedTooDeeply,
- DeviceInLegacyHub
-} USB_CONNECTION_STATUS, *PUSB_CONNECTION_STATUS;
-
-#include <pshpack1.h>
-
-typedef struct _USB_DESCRIPTOR_REQUEST {
- ULONG ConnectionIndex;
- struct {
- UCHAR bmRequest;
- UCHAR bRequest;
- USHORT wValue;
- USHORT wIndex;
- USHORT wLength;
- } SetupPacket;
- UCHAR Data[0];
-} USB_DESCRIPTOR_REQUEST, *PUSB_DESCRIPTOR_REQUEST;
-
-typedef struct _USB_HCD_DRIVERKEY_NAME {
- ULONG ActualLength;
- WCHAR DriverKeyName[1];
-} USB_HCD_DRIVERKEY_NAME, *PUSB_HCD_DRIVERKEY_NAME;
-
-typedef struct _HCD_ISO_STAT_COUNTERS {
- USHORT LateUrbs;
- USHORT DoubleBufferedPackets;
- USHORT TransfersCF_5ms;
- USHORT TransfersCF_2ms;
- USHORT TransfersCF_1ms;
- USHORT MaxInterruptLatency;
- USHORT BadStartFrame;
- USHORT StaleUrbs;
- USHORT IsoPacketNotAccesed;
- USHORT IsoPacketHWError;
- USHORT SmallestUrbPacketCount;
- USHORT LargestUrbPacketCount;
- USHORT IsoCRC_Error;
- USHORT IsoOVERRUN_Error;
- USHORT IsoINTERNAL_Error;
- USHORT IsoUNKNOWN_Error;
- ULONG IsoBytesTransferred;
- USHORT LateMissedCount;
- USHORT HWIsoMissedCount;
- ULONG Reserved7[8];
-} HCD_ISO_STAT_COUNTERS, *PHCD_ISO_STAT_COUNTERS;
-
-typedef struct _HCD_STAT_COUNTERS {
- ULONG BytesTransferred;
- USHORT IsoMissedCount;
- USHORT DataOverrunErrorCount;
- USHORT CrcErrorCount;
- USHORT ScheduleOverrunCount;
- USHORT TimeoutErrorCount;
- USHORT InternalHcErrorCount;
- USHORT BufferOverrunErrorCount;
- USHORT SWErrorCount;
- USHORT StallPidCount;
- USHORT PortDisableCount;
-} HCD_STAT_COUNTERS, *PHCD_STAT_COUNTERS;
-
-typedef struct _HCD_STAT_INFORMATION_1 {
- ULONG Reserved1;
- ULONG Reserved2;
- ULONG ResetCounters;
- LARGE_INTEGER TimeRead;
- HCD_STAT_COUNTERS Counters;
-} HCD_STAT_INFORMATION_1, *PHCD_STAT_INFORMATION_1;
-
-typedef struct _HCD_STAT_INFORMATION_2 {
- ULONG Reserved1;
- ULONG Reserved2;
- ULONG ResetCounters;
- LARGE_INTEGER TimeRead;
- LONG LockedMemoryUsed;
- HCD_STAT_COUNTERS Counters;
- HCD_ISO_STAT_COUNTERS IsoCounters;
-} HCD_STAT_INFORMATION_2, *PHCD_STAT_INFORMATION_2;
-
-typedef struct _USB_HUB_INFORMATION {
- USB_HUB_DESCRIPTOR HubDescriptor;
- BOOLEAN HubIsBusPowered;
-} USB_HUB_INFORMATION, *PUSB_HUB_INFORMATION;
-
-typedef struct _USB_HUB_NAME {
- ULONG ActualLength;
- WCHAR HubName[1];
-} USB_HUB_NAME, *PUSB_HUB_NAME;
-
-typedef enum _USB_HUB_NODE {
- UsbHub,
- UsbMIParent
-} USB_HUB_NODE;
-
-typedef VOID STDCALL
-(*USB_IDLE_CALLBACK)(
- PVOID Context);
-
-typedef struct _USB_IDLE_CALLBACK_INFO {
- USB_IDLE_CALLBACK IdleCallback;
- PVOID IdleContext;
-} USB_IDLE_CALLBACK_INFO, *PUSB_IDLE_CALLBACK_INFO;
-
-typedef struct _USB_NODE_CONNECTION_ATTRIBUTES {
- ULONG ConnectionIndex;
- USB_CONNECTION_STATUS ConnectionStatus;
- ULONG PortAttributes;
-} USB_NODE_CONNECTION_ATTRIBUTES, *PUSB_NODE_CONNECTION_ATTRIBUTES;
-
-typedef struct _USB_NODE_CONNECTION_DRIVERKEY_NAME {
- ULONG ConnectionIndex;
- ULONG ActualLength;
- WCHAR DriverKeyName[1];
-} USB_NODE_CONNECTION_DRIVERKEY_NAME, *PUSB_NODE_CONNECTION_DRIVERKEY_NAME;
-
-typedef struct _USB_PIPE_INFO {
- USB_ENDPOINT_DESCRIPTOR EndpointDescriptor;
- ULONG ScheduleOffset;
-} USB_PIPE_INFO, *PUSB_PIPE_INFO;
-
-typedef struct _USB_NODE_CONNECTION_INFORMATION {
- ULONG ConnectionIndex;
- USB_DEVICE_DESCRIPTOR DeviceDescriptor;
- UCHAR CurrentConfigurationValue;
- BOOLEAN LowSpeed;
- BOOLEAN DeviceIsHub;
- USHORT DeviceAddress;
- ULONG NumberOfOpenPipes;
- USB_CONNECTION_STATUS ConnectionStatus;
- USB_PIPE_INFO PipeList[0];
-} USB_NODE_CONNECTION_INFORMATION, *PUSB_NODE_CONNECTION_INFORMATION;
-
-typedef struct _USB_NODE_CONNECTION_NAME {
- ULONG ConnectionIndex;
- ULONG ActualLength;
- WCHAR NodeName[1];
-} USB_NODE_CONNECTION_NAME, *PUSB_NODE_CONNECTION_NAME;
-
-typedef struct _USB_MI_PARENT_INFORMATION {
- ULONG NumberOfInterfaces;
-} USB_MI_PARENT_INFORMATION, *PUSB_MI_PARENT_INFORMATION;
-
-typedef struct _USB_NODE_INFORMATION {
- USB_HUB_NODE NodeType;
- union {
- USB_HUB_INFORMATION HubInformation;
- USB_MI_PARENT_INFORMATION MiParentInformation;
- } u;
-} USB_NODE_INFORMATION, *PUSB_NODE_INFORMATION;
-
-#define WMI_USB_DRIVER_INFORMATION 0
-#define WMI_USB_DRIVER_NOTIFICATION 1
-#define WMI_USB_POWER_DEVICE_ENABLE 2
-
-typedef enum _USB_NOTIFICATION_TYPE {
- EnumerationFailure = 0,
- InsufficentBandwidth,
- InsufficentPower,
- OverCurrent,
- ResetOvercurrent,
- AcquireBusInfo,
- AcquireHubName,
- AcquireControllerName,
- HubOvercurrent,
- HubPowerChange,
- HubNestedTooDeeply,
- ModernDeviceInLegacyHub
-} USB_NOTIFICATION_TYPE;
-
-typedef struct _USB_ACQUIRE_INFO {
- USB_NOTIFICATION_TYPE NotificationType;
- ULONG TotalSize;
- WCHAR Buffer[1];
-} USB_ACQUIRE_INFO, *PUSB_ACQUIRE_INFO;
-
-typedef struct _USB_NOTIFICATION {
- USB_NOTIFICATION_TYPE NotificationType;
-} USB_NOTIFICATION, *PUSB_NOTIFICATION;
-
-typedef struct _USB_BUS_NOTIFICATION {
- USB_NOTIFICATION_TYPE NotificationType;
- ULONG TotalBandwidth;
- ULONG ConsumedBandwidth;
- ULONG ControllerNameLength;
-} USB_BUS_NOTIFICATION, *PUSB_BUS_NOTIFICATION;
-
-typedef struct _USB_CONNECTION_NOTIFICATION {
- USB_NOTIFICATION_TYPE NotificationType;
- ULONG ConnectionNumber;
- ULONG RequestedBandwidth;
- ULONG EnumerationFailReason;
- ULONG PowerRequested;
- ULONG HubNameLength;
-} USB_CONNECTION_NOTIFICATION, *PUSB_CONNECTION_NOTIFICATION;
-
-typedef struct _USB_ROOT_HUB_NAME {
- ULONG ActualLength;
- WCHAR RootHubName[1];
-} USB_ROOT_HUB_NAME, *PUSB_ROOT_HUB_NAME;
-
-#include <poppack.h>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __USBIOCTL_H */
diff --git a/winsup/w32api/include/ddk/usbiodef.h b/winsup/w32api/include/ddk/usbiodef.h
deleted file mode 100644
index 5faa344..0000000
--- a/winsup/w32api/include/ddk/usbiodef.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * usbiodef.h
- *
- * USB IOCTL definitions
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __USBIODEF_H
-#define __USBIODEF_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-DEFINE_GUID(GUID_DEVINTERFACE_USB_HUB, \
- 0xf18a0e88, 0xc30c, 0x11d0, 0x88, 0x15, 0x00, 0xa0, 0xc9, 0x06, 0xbe, 0xd8);
-
-DEFINE_GUID(GUID_DEVINTERFACE_USB_DEVICE,
- 0xA5DCBF10L, 0x6530, 0x11D2, 0x90, 0x1F, 0x00, 0xC0, 0x4F, 0xB9, 0x51, 0xED);
-
-DEFINE_GUID(GUID_DEVINTERFACE_USB_HOST_CONTROLLER,
- 0x3abf6f2d, 0x71c4, 0x462a, 0x8a, 0x92, 0x1e, 0x68, 0x61, 0xe6, 0xaf, 0x27);
-
-DEFINE_GUID(GUID_USB_WMI_STD_DATA,
- 0x4E623B20L, 0xCB14, 0x11D1, 0xB3, 0x31, 0x00, 0xA0, 0xC9, 0x59, 0xBB, 0xD2);
-
-DEFINE_GUID(GUID_USB_WMI_STD_NOTIFICATION,
- 0x4E623B20L, 0xCB14, 0x11D1, 0xB3, 0x31, 0x00, 0xA0, 0xC9, 0x59, 0xBB, 0xD2);
-
-#define GUID_CLASS_USBHUB GUID_DEVINTERFACE_USB_HUB
-#define GUID_CLASS_USB_DEVICE GUID_DEVINTERFACE_USB_DEVICE
-#define GUID_CLASS_USB_HOST_CONTROLLER GUID_DEVINTERFACE_USB_HOST_CONTROLLER
-
-#define USB_SUBMIT_URB 0
-#define USB_RESET_PORT 1
-#define USB_GET_ROOTHUB_PDO 3
-#define USB_GET_PORT_STATUS 4
-#define USB_ENABLE_PORT 5
-#define USB_GET_HUB_COUNT 6
-#define USB_CYCLE_PORT 7
-#define USB_GET_HUB_NAME 8
-#define USB_IDLE_NOTIFICATION 9
-#define USB_GET_BUS_INFO 264
-#define USB_GET_CONTROLLER_NAME 265
-#define USB_GET_BUSGUID_INFO 266
-#define USB_GET_PARENT_HUB_INFO 267
-#define USB_GET_DEVICE_HANDLE 268
-
-#define HCD_GET_STATS_1 255
-#define HCD_DIAGNOSTIC_MODE_ON 256
-#define HCD_DIAGNOSTIC_MODE_OFF 257
-#define HCD_GET_ROOT_HUB_NAME 258
-#define HCD_GET_DRIVERKEY_NAME 265
-#define HCD_GET_STATS_2 266
-#define HCD_DISABLE_PORT 268
-#define HCD_ENABLE_PORT 269
-#define HCD_USER_REQUEST 270
-
-#define USB_GET_NODE_INFORMATION 258
-#define USB_GET_NODE_CONNECTION_INFORMATION 259
-#define USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION 260
-#define USB_GET_NODE_CONNECTION_NAME 261
-#define USB_DIAG_IGNORE_HUBS_ON 262
-#define USB_DIAG_IGNORE_HUBS_OFF 263
-#define USB_GET_NODE_CONNECTION_DRIVERKEY_NAME 264
-#define USB_GET_HUB_CAPABILITIES 271
-#define USB_GET_NODE_CONNECTION_ATTRIBUTES 272
-
-#define FILE_DEVICE_USB FILE_DEVICE_UNKNOWN
-
-#define USB_CTL(id) CTL_CODE(FILE_DEVICE_USB, \
- (id), \
- METHOD_BUFFERED, \
- FILE_ANY_ACCESS)
-
-#define USB_KERNEL_CTL(id) CTL_CODE(FILE_DEVICE_USB, \
- (id), \
- METHOD_NEITHER, \
- FILE_ANY_ACCESS)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __USBIODEF_H */
diff --git a/winsup/w32api/include/ddk/usbscan.h b/winsup/w32api/include/ddk/usbscan.h
deleted file mode 100644
index f22b0b5..0000000
--- a/winsup/w32api/include/ddk/usbscan.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * usbscan.h
- *
- * USB scanner definitions
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __USBSCAN_H
-#define __USBSCAN_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-#define FILE_DEVICE_USB_SCAN 0x8000
-#define IOCTL_INDEX 0x0800
-
-#define IOCTL_CANCEL_IO \
- CTL_CODE(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 1, METHOD_BUFFERED,FILE_ANY_ACCESS)
-
-#define IOCTL_GET_VERSION \
- CTL_CODE(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 0, METHOD_BUFFERED,FILE_ANY_ACCESS)
-
-#define IOCTL_GET_CHANNEL_ALIGN_RQST \
- CTL_CODE(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 5, METHOD_BUFFERED,FILE_ANY_ACCESS)
-
-#define IOCTL_GET_DEVICE_DESCRIPTOR \
- CTL_CODE(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 6, METHOD_BUFFERED,FILE_ANY_ACCESS)
-
-#define IOCTL_GET_PIPE_CONFIGURATION \
- CTL_CODE(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 10,METHOD_BUFFERED,FILE_ANY_ACCESS)
-
-#define IOCTL_GET_USB_DESCRIPTOR \
- CTL_CODE(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 8, METHOD_BUFFERED,FILE_ANY_ACCESS)
-
-#define IOCTL_READ_REGISTERS \
- CTL_CODE(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 3, METHOD_BUFFERED,FILE_ANY_ACCESS)
-
-#define IOCTL_RESET_PIPE \
- CTL_CODE(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 7, METHOD_BUFFERED,FILE_ANY_ACCESS)
-
-#define IOCTL_SEND_USB_REQUEST \
- CTL_CODE(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 9, METHOD_BUFFERED,FILE_ANY_ACCESS)
-
-#define IOCTL_SET_TIMEOUT \
- CTL_CODE(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 11,METHOD_BUFFERED,FILE_ANY_ACCESS)
-
-#define IOCTL_WAIT_ON_DEVICE_EVENT \
- CTL_CODE(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 2, METHOD_BUFFERED,FILE_ANY_ACCESS)
-
-#define IOCTL_WRITE_REGISTERS \
- CTL_CODE(FILE_DEVICE_USB_SCAN, IOCTL_INDEX + 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-
-#define MAX_NUM_PIPES 8
-
-#define BULKIN_FLAG 0x80
-
-typedef struct _CHANNEL_INFO {
- /*OUT*/ ULONG EventChannelSize;
- /*OUT*/ ULONG uReadDataAlignment;
- /*OUT*/ ULONG uWriteDataAlignment;
-}CHANNEL_INFO, *PCHANNEL_INFO;
-
-typedef struct _DEVICE_DESCRIPTOR {
- /*OUT*/ USHORT usVendorId;
- /*OUT*/ USHORT usProductId;
- /*OUT*/ USHORT usBcdDevice;
- /*OUT*/ USHORT usLanguageId;
-} DEVICE_DESCRIPTOR, *PDEVICE_DESCRIPTOR;
-
-typedef struct _DRV_VERSION {
- /*OUT*/ ULONG major;
- /*OUT*/ ULONG minor;
- /*OUT*/ ULONG internal;
-} DRV_VERSION, *PDRV_VERSION;
-
-typedef struct _IO_BLOCK {
- /*IN*/ ULONG uOffset;
- /*IN*/ ULONG uLength;
- /*IN OUT*/ PUCHAR pbyData;
- /*IN*/ ULONG uIndex;
-} IO_BLOCK, *PIO_BLOCK;
-
-typedef struct _IO_BLOCK_EX {
- /*IN*/ ULONG uOffset;
- /*IN*/ ULONG uLength;
- /*IN OUT*/ PUCHAR pbyData;
- /*IN*/ ULONG uIndex;
- /*IN*/ UCHAR bRequest;
- /*IN*/ UCHAR bmRequestType;
- /*IN*/ UCHAR fTransferDirectionIn;
-} IO_BLOCK_EX, *PIO_BLOCK_EX;
-
-typedef struct _USBSCAN_GET_DESCRIPTOR {
- /*IN*/ UCHAR DescriptorType;
- /*IN*/ UCHAR Index;
- /*IN*/ USHORT LanguageId;
-} USBSCAN_GET_DESCRIPTOR, *PUSBSCAN_GET_DESCRIPTOR;
-
-typedef enum _RAW_PIPE_TYPE {
- USBSCAN_PIPE_CONTROL,
- USBSCAN_PIPE_ISOCHRONOUS,
- USBSCAN_PIPE_BULK,
- USBSCAN_PIPE_INTERRUPT
-} RAW_PIPE_TYPE;
-
-typedef struct _USBSCAN_PIPE_INFORMATION {
- USHORT MaximumPacketSize;
- UCHAR EndpointAddress;
- UCHAR Interval;
- RAW_PIPE_TYPE PipeType;
-} USBSCAN_PIPE_INFORMATION, *PUSBSCAN_PIPE_INFORMATION;
-
-typedef struct _USBSCAN_PIPE_CONFIGURATION {
- /*OUT*/ ULONG NumberOfPipes;
- /*OUT*/ USBSCAN_PIPE_INFORMATION PipeInfo[MAX_NUM_PIPES];
-} USBSCAN_PIPE_CONFIGURATION, *PUSBSCAN_PIPE_CONFIGURATION;
-
-typedef struct _USBSCAN_TIMEOUT {
- /*IN*/ ULONG TimeoutRead;
- /*IN*/ ULONG TimeoutWrite;
- /*IN*/ ULONG TimeoutEvent;
-} USBSCAN_TIMEOUT, *PUSBSCAN_TIMEOUT;
-
-typedef enum _PIPE_TYPE {
- EVENT_PIPE,
- READ_DATA_PIPE,
- WRITE_DATA_PIPE,
- ALL_PIPE
-} PIPE_TYPE;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __USBSCAN_H */
diff --git a/winsup/w32api/include/ddk/usbuser.h b/winsup/w32api/include/ddk/usbuser.h
deleted file mode 100644
index 4c4b9e9..0000000
--- a/winsup/w32api/include/ddk/usbuser.h
+++ /dev/null
@@ -1,328 +0,0 @@
-/*
- * usbuser.h
- *
- * USB user mode IOCTL interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __USBUSER_H
-#define __USBUSER_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include "usb.h"
-#include "usbiodef.h"
-
-#include <pshpack1.h>
-
-#define USBUSER_VERSION 0x0004
-
-#define IOCTL_USB_USER_REQUEST USB_CTL(HCD_USER_REQUEST)
-
-#ifndef IOCTL_USB_DIAGNOSTIC_MODE_ON
-#define IOCTL_USB_DIAGNOSTIC_MODE_ON USB_CTL(HCD_DIAGNOSTIC_MODE_ON)
-#endif
-#ifndef IOCTL_USB_DIAGNOSTIC_MODE_OFF
-#define IOCTL_USB_DIAGNOSTIC_MODE_OFF USB_CTL(HCD_DIAGNOSTIC_MODE_OFF)
-#endif
-
-#ifndef IOCTL_USB_GET_ROOT_HUB_NAME
-#define IOCTL_USB_GET_ROOT_HUB_NAME USB_CTL(HCD_GET_ROOT_HUB_NAME)
-#endif
-#ifndef IOCTL_GET_HCD_DRIVERKEY_NAME
-#define IOCTL_GET_HCD_DRIVERKEY_NAME USB_CTL(HCD_GET_DRIVERKEY_NAME)
-#endif
-
-typedef enum _USB_USER_ERROR_CODE {
- UsbUserSuccess = 0,
- UsbUserNotSupported,
- UsbUserInvalidRequestCode,
- UsbUserFeatureDisabled,
- UsbUserInvalidHeaderParameter,
- UsbUserInvalidParameter,
- UsbUserMiniportError,
- UsbUserBufferTooSmall,
- UsbUserErrorNotMapped,
- UsbUserDeviceNotStarted,
- UsbUserNoDeviceConnected
-} USB_USER_ERROR_CODE;
-
-#define USBUSER_GET_CONTROLLER_INFO_0 0x00000001
-#define USBUSER_GET_CONTROLLER_DRIVER_KEY 0x00000002
-#define USBUSER_PASS_THRU 0x00000003
-#define USBUSER_GET_POWER_STATE_MAP 0x00000004
-#define USBUSER_GET_BANDWIDTH_INFORMATION 0x00000005
-#define USBUSER_GET_BUS_STATISTICS_0 0x00000006
-#define USBUSER_GET_ROOTHUB_SYMBOLIC_NAME 0x00000007
-#define USBUSER_GET_USB_DRIVER_VERSION 0x00000008
-#define USBUSER_GET_USB2_HW_VERSION 0x00000009
-#define USBUSER_OP_SEND_ONE_PACKET 0x10000001
-#define USBUSER_OP_RAW_RESET_PORT 0x20000001
-#define USBUSER_OP_OPEN_RAW_DEVICE 0x20000002
-#define USBUSER_OP_CLOSE_RAW_DEVICE 0x20000003
-#define USBUSER_OP_SEND_RAW_COMMAND 0x20000004
-#define USBUSER_INVALID_REQUEST 0xFFFFFFF0
-#define USBUSER_OP_MASK_DEVONLY_API 0x10000000
-#define USBUSER_OP_MASK_HCTEST_API 0x20000000
-
-#define USB_PACKETFLAG_LOW_SPEED 0x00000001
-#define USB_PACKETFLAG_FULL_SPEED 0x00000002
-#define USB_PACKETFLAG_HIGH_SPEED 0x00000004
-#define USB_PACKETFLAG_ASYNC_IN 0x00000008
-#define USB_PACKETFLAG_ASYNC_OUT 0x00000010
-#define USB_PACKETFLAG_ISO_IN 0x00000020
-#define USB_PACKETFLAG_ISO_OUT 0x00000040
-#define USB_PACKETFLAG_SETUP 0x00000080
-#define USB_PACKETFLAG_TOGGLE0 0x00000100
-#define USB_PACKETFLAG_TOGGLE1 0x00000200
-
-typedef struct _PACKET_PARAMETERS {
- UCHAR DeviceAddress;
- UCHAR EndpointAddress;
- USHORT MaximumPacketSize;
- ULONG Timeout;
- ULONG Flags;
- ULONG DataLength;
- USHORT HubDeviceAddress;
- USHORT PortTTNumber;
- UCHAR ErrorCount;
- UCHAR Pad[3];
- USBD_STATUS UsbdStatusCode;
- UCHAR Data[4];
-} PACKET_PARAMETERS, *PPACKET_PARAMETERS;
-
-typedef struct _RAW_RESET_PORT_PARAMETERS {
- USHORT PortNumber;
- USHORT PortStatus;
-} RAW_RESET_PORT_PARAMETERS, *PRAW_RESET_PORT_PARAMETERS;
-
-typedef struct _USB_BANDWIDTH_INFO {
- ULONG DeviceCount;
- ULONG TotalBusBandwidth;
- ULONG Total32secBandwidth;
- ULONG AllocedBulkAndControl;
- ULONG AllocedIso;
- ULONG AllocedInterrupt_1ms;
- ULONG AllocedInterrupt_2ms;
- ULONG AllocedInterrupt_4ms;
- ULONG AllocedInterrupt_8ms;
- ULONG AllocedInterrupt_16ms;
- ULONG AllocedInterrupt_32ms;
-} USB_BANDWIDTH_INFO, *PUSB_BANDWIDTH_INFO;
-
-typedef struct _USBUSER_REQUEST_HEADER {
- ULONG UsbUserRequest;
- USB_USER_ERROR_CODE UsbUserStatusCode;
- ULONG RequestBufferLength;
- ULONG ActualBufferLength;
-} USBUSER_REQUEST_HEADER, *PUSBUSER_REQUEST_HEADER;
-
-typedef struct _USBUSER_BANDWIDTH_INFO_REQUEST {
- USBUSER_REQUEST_HEADER Header;
- USB_BANDWIDTH_INFO BandwidthInformation;
-} USBUSER_BANDWIDTH_INFO_REQUEST, *PUSBUSER_BANDWIDTH_INFO_REQUEST;
-
-typedef struct _USB_BUS_STATISTICS_0 {
- ULONG DeviceCount;
- LARGE_INTEGER CurrentSystemTime;
- ULONG CurrentUsbFrame;
- ULONG BulkBytes;
- ULONG IsoBytes;
- ULONG InterruptBytes;
- ULONG ControlDataBytes;
- ULONG PciInterruptCount;
- ULONG HardResetCount;
- ULONG WorkerSignalCount;
- ULONG CommonBufferBytes;
- ULONG WorkerIdleTimeMs;
- BOOLEAN RootHubEnabled;
- UCHAR RootHubDevicePowerState;
- UCHAR Unused;
- UCHAR NameIndex;
-} USB_BUS_STATISTICS_0, *PUSB_BUS_STATISTICS_0;
-
-typedef struct _USBUSER_BUS_STATISTICS_0_REQUEST {
- USBUSER_REQUEST_HEADER Header;
- USB_BUS_STATISTICS_0 BusStatistics0;
-} USBUSER_BUS_STATISTICS_0_REQUEST, *PUSBUSER_BUS_STATISTICS_0_REQUEST;
-
-/* USB_CONTROLLER_INFO_0.HcFeatureFlags constants */
-#define USB_HC_FEATURE_FLAG_PORT_POWER_SWITCHING 0x00000001
-#define USB_HC_FEATURE_FLAG_SEL_SUSPEND 0x00000002
-#define USB_HC_FEATURE_LEGACY_BIOS 0x00000004
-
-typedef struct _USB_CLOSE_RAW_DEVICE_PARAMETERS {
- ULONG xxx;
-} USB_CLOSE_RAW_DEVICE_PARAMETERS , *PUSB_CLOSE_RAW_DEVICE_PARAMETERS;
-
-typedef struct _USBUSER_CLOSE_RAW_DEVICE {
- USBUSER_REQUEST_HEADER Header;
- USB_CLOSE_RAW_DEVICE_PARAMETERS Parameters;
-} USBUSER_CLOSE_RAW_DEVICE, *PUSBUSER_CLOSE_RAW_DEVICE;
-
-typedef struct _USB_CONTROLLER_INFO_0 {
- ULONG PciVendorId;
- ULONG PciDeviceId;
- ULONG PciRevision;
- ULONG NumberOfRootPorts;
- USB_CONTROLLER_FLAVOR ControllerFlavor;
- ULONG HcFeatureFlags;
-} USB_CONTROLLER_INFO_0 , *PUSB_CONTROLLER_INFO_0;
-
-typedef struct _USBUSER_CONTROLLER_INFO_0 {
- USBUSER_REQUEST_HEADER Header;
- USB_CONTROLLER_INFO_0 Info0;
-} USBUSER_CONTROLLER_INFO_0, *PUSBUSER_CONTROLLER_INFO_0;
-
-typedef struct _USB_DRIVER_VERSION_PARAMETERS {
- ULONG DriverTrackingCode;
- ULONG USBDI_Version;
- ULONG USBUSER_Version;
- BOOLEAN CheckedPortDriver;
- BOOLEAN CheckedMiniportDriver;
- USHORT USB_Version;
-} USB_DRIVER_VERSION_PARAMETERS , *PUSB_DRIVER_VERSION_PARAMETERS;
-
-typedef struct _USBUSER_GET_DRIVER_VERSION {
- USBUSER_REQUEST_HEADER Header;
- USB_DRIVER_VERSION_PARAMETERS Parameters;
-} USBUSER_GET_DRIVER_VERSION, *PUSBUSER_GET_DRIVER_VERSION;
-
-typedef struct _USB_OPEN_RAW_DEVICE_PARAMETERS {
- USHORT PortStatus;
- USHORT MaxPacketEp0;
-} USB_OPEN_RAW_DEVICE_PARAMETERS , *PUSB_OPEN_RAW_DEVICE_PARAMETERS;
-
-typedef struct _USBUSER_OPEN_RAW_DEVICE {
- USBUSER_REQUEST_HEADER Header;
- USB_OPEN_RAW_DEVICE_PARAMETERS Parameters;
-} USBUSER_OPEN_RAW_DEVICE, *PUSBUSER_OPEN_RAW_DEVICE;
-
-typedef enum _WDMUSB_POWER_STATE {
- WdmUsbPowerNotMapped = 0,
- WdmUsbPowerSystemUnspecified = 100,
- WdmUsbPowerSystemWorking,
- WdmUsbPowerSystemSleeping1,
- WdmUsbPowerSystemSleeping2,
- WdmUsbPowerSystemSleeping3,
- WdmUsbPowerSystemHibernate,
- WdmUsbPowerSystemShutdown,
- WdmUsbPowerDeviceUnspecified = 200,
- WdmUsbPowerDeviceD0,
- WdmUsbPowerDeviceD1,
- WdmUsbPowerDeviceD2,
- WdmUsbPowerDeviceD3
-} WDMUSB_POWER_STATE;
-
-typedef struct _USB_POWER_INFO {
- WDMUSB_POWER_STATE SystemState;
- WDMUSB_POWER_STATE HcDevicePowerState;
- WDMUSB_POWER_STATE HcDeviceWake;
- WDMUSB_POWER_STATE HcSystemWake;
- WDMUSB_POWER_STATE RhDevicePowerState;
- WDMUSB_POWER_STATE RhDeviceWake;
- WDMUSB_POWER_STATE RhSystemWake;
- WDMUSB_POWER_STATE LastSystemSleepState;
- BOOLEAN CanWakeup;
- BOOLEAN IsPowered;
-} USB_POWER_INFO, *PUSB_POWER_INFO;
-
-typedef struct _USBUSER_POWER_INFO_REQUEST {
- USBUSER_REQUEST_HEADER Header;
- USB_POWER_INFO PowerInformation;
-} USBUSER_POWER_INFO_REQUEST, *PUSBUSER_POWER_INFO_REQUEST;
-
-typedef struct _USB_UNICODE_NAME {
- ULONG Length;
- WCHAR String[1];
-} USB_UNICODE_NAME, *PUSB_UNICODE_NAME;
-
-typedef struct _USBUSER_CONTROLLER_UNICODE_NAME {
- USBUSER_REQUEST_HEADER Header;
- USB_UNICODE_NAME UnicodeName;
-} USBUSER_CONTROLLER_UNICODE_NAME, *PUSBUSER_CONTROLLER_UNICODE_NAME;
-
-typedef struct _USB_PASS_THRU_PARAMETERS {
- GUID FunctionGUID;
- ULONG ParameterLength;
- UCHAR Parameters[4];
-} USB_PASS_THRU_PARAMETERS, *PUSB_PASS_THRU_PARAMETERS;
-
-typedef struct _USBUSER_PASS_THRU_REQUEST {
- USBUSER_REQUEST_HEADER Header;
- USB_PASS_THRU_PARAMETERS PassThru;
-} USBUSER_PASS_THRU_REQUEST, *PUSBUSER_PASS_THRU_REQUEST;
-
-typedef struct _USBUSER_RAW_RESET_ROOT_PORT {
- USBUSER_REQUEST_HEADER Header;
- RAW_RESET_PORT_PARAMETERS Parameters;
-} USBUSER_RAW_RESET_ROOT_PORT, *PUSBUSER_RAW_RESET_ROOT_PORT;
-
-typedef struct _USBUSER_SEND_ONE_PACKET {
- USBUSER_REQUEST_HEADER Header;
- PACKET_PARAMETERS PacketParameters;
-} USBUSER_SEND_ONE_PACKET, *PUSBUSER_SEND_ONE_PACKET;
-
-typedef struct _USB_SEND_RAW_COMMAND_PARAMETERS {
- UCHAR Usb_bmRequest;
- UCHAR Usb_bRequest;
- USHORT Usb_wVlaue;
- USHORT Usb_wIndex;
- USHORT Usb_wLength;
- USHORT DeviceAddress;
- USHORT MaximumPacketSize;
- ULONG Timeout;
- ULONG DataLength;
- USBD_STATUS UsbdStatusCode;
- UCHAR Data[4];
-} USB_SEND_RAW_COMMAND_PARAMETERS, *PUSB_SEND_RAW_COMMAND_PARAMETERS;
-
-typedef struct _USBUSER_SEND_RAW_COMMAND {
- USBUSER_REQUEST_HEADER Header;
- USB_SEND_RAW_COMMAND_PARAMETERS Parameters;
-} USBUSER_SEND_RAW_COMMAND, *PUSBUSER_SEND_RAW_COMMAND;
-
-/* USB_USB2HW_VERSION_PARAMETERS.Usb2HwRevision constants */
-#define USB2HW_UNKNOWN 0x00
-#define USB2HW_A0 0xA0
-#define USB2HW_A1 0xA1
-#define USB2HW_B0 0xB0
-
-typedef struct _USB_USB2HW_VERSION_PARAMETERS {
- UCHAR Usb2HwRevision;
-} USB_USB2HW_VERSION_PARAMETERS, *PUSB_USB2HW_VERSION_PARAMETERS;
-
-typedef struct _USBUSER_GET_USB2HW_VERSION {
- USBUSER_REQUEST_HEADER Header;
- USB_USB2HW_VERSION_PARAMETERS Parameters;
-} USBUSER_GET_USB2HW_VERSION, *PUSBUSER_GET_USB2HW_VERSION;
-
-#include <poppack.h>
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __USBUSER_H */
diff --git a/winsup/w32api/include/ddk/video.h b/winsup/w32api/include/ddk/video.h
deleted file mode 100644
index 52e8212..0000000
--- a/winsup/w32api/include/ddk/video.h
+++ /dev/null
@@ -1,1566 +0,0 @@
-/*
- * video.h
- *
- * Video port and miniport driver interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __VIDEO_H
-#define __VIDEO_H
-
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __WINDDI_H
-#error winddi.h cannot be included with video.h
-#else
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-#if defined(_VIDEOPORT_)
- #define VPAPI DECLSPEC_EXPORT
-#else
- #define VPAPI DECLSPEC_IMPORT
-#endif
-
-#include "videoagp.h"
-#include "ntddvdeo.h"
-
-
-typedef LONG VP_STATUS;
-typedef VP_STATUS *PVP_STATUS;
-typedef struct __DMA_PARAMETERS * PDMA;
-typedef struct _VIDEO_PORT_EVENT *PEVENT;
-typedef struct _VIDEO_PORT_SPIN_LOCK *PSPIN_LOCK;
-typedef struct __VP_DMA_ADAPTER *PVP_DMA_ADAPTER;
-
-#define DISPLAY_ADAPTER_HW_ID 0xFFFFFFFF
-
-#define EVENT_TYPE_MASK 1
-#define SYNCHRONIZATION_EVENT 0
-#define NOTIFICATION_EVENT 1
-
-#define INITIAL_EVENT_STATE_MASK 2
-#define INITIAL_EVENT_NOT_SIGNALED 0
-#define INITIAL_EVENT_SIGNALED 2
-
-typedef enum VIDEO_DEBUG_LEVEL {
- Error = 0,
- Warn,
- Trace,
- Info
-} VIDEO_DEBUG_LEVEL, *PVIDEO_DEBUG_LEVEL;
-
-typedef enum {
- VideoPortUnlockAfterDma = 1,
- VideoPortKeepPagesLocked,
- VideoPortDmaInitOnly
-} DMA_FLAGS;
-
-typedef enum _HW_DMA_RETURN {
- DmaAsyncReturn,
- DmaSyncReturn
-} HW_DMA_RETURN, *PHW_DMA_RETURN;
-
-typedef HW_DMA_RETURN
-(*PVIDEO_HW_START_DMA)(
- PVOID HwDeviceExtension,
- PDMA pDma);
-
-
-#ifdef DBG
-
-#define PAGED_CODE() \
- if (VideoPortGetCurrentIrql() > 1 /* APC_LEVEL */) \
- { \
- VideoPortDebugPrint(Error, "Video: Pageable code called at IRQL %d\n", VideoPortGetCurrentIrql() ); \
- ASSERT(FALSE); \
- }
-
-#else
-
-#define PAGED_CODE()
-
-#endif
-
-typedef struct _VIDEO_HARDWARE_CONFIGURATION_DATA {
- INTERFACE_TYPE InterfaceType;
- ULONG BusNumber;
- USHORT Version;
- USHORT Revision;
- USHORT Irql;
- USHORT Vector;
- ULONG ControlBase;
- ULONG ControlSize;
- ULONG CursorBase;
- ULONG CursorSize;
- ULONG FrameBase;
- ULONG FrameSize;
-} VIDEO_HARDWARE_CONFIGURATION_DATA, *PVIDEO_HARDWARE_CONFIGURATION_DATA;
-
-#define SIZE_OF_NT4_VIDEO_PORT_CONFIG_INFO 0x42
-#define SIZE_OF_NT4_VIDEO_HW_INITIALIZATION_DATA 0x28
-#define SIZE_OF_W2K_VIDEO_HW_INITIALIZATION_DATA 0x50
-
-typedef enum _VIDEO_DEVICE_DATA_TYPE {
- VpMachineData = 0,
- VpCmosData,
- VpBusData,
- VpControllerData,
- VpMonitorData
-} VIDEO_DEVICE_DATA_TYPE, *PVIDEO_DEVICE_DATA_TYPE;
-
-
-
-/* Video miniport driver functions */
-
-typedef struct _VP_SCATTER_GATHER_ELEMENT {
- PHYSICAL_ADDRESS Address;
- ULONG Length;
- ULONG_PTR Reserved;
-} VP_SCATTER_GATHER_ELEMENT, *PVP_SCATTER_GATHER_ELEMENT;
-
-typedef struct _VP_SCATTER_GATHER_LIST {
- ULONG NumberOfElements;
- ULONG_PTR Reserved;
- VP_SCATTER_GATHER_ELEMENT Elements[0];
-} VP_SCATTER_GATHER_LIST, *PVP_SCATTER_GATHER_LIST;
-
-typedef VOID DDKAPI
-(*PEXECUTE_DMA)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVP_DMA_ADAPTER VpDmaAdapter,
- /*IN*/ PVP_SCATTER_GATHER_LIST SGList,
- /*IN*/ PVOID Context);
-
-typedef PVOID DDKAPI
-(*PVIDEO_PORT_GET_PROC_ADDRESS)(
-/*IN*/ PVOID HwDeviceExtension,
-/*IN*/ PUCHAR FunctionName);
-
-typedef struct _VIDEO_PORT_CONFIG_INFO {
- ULONG Length;
- ULONG SystemIoBusNumber;
- INTERFACE_TYPE AdapterInterfaceType;
- ULONG BusInterruptLevel;
- ULONG BusInterruptVector;
- KINTERRUPT_MODE InterruptMode;
- ULONG NumEmulatorAccessEntries;
- PEMULATOR_ACCESS_ENTRY EmulatorAccessEntries;
- ULONG_PTR EmulatorAccessEntriesContext;
- PHYSICAL_ADDRESS VdmPhysicalVideoMemoryAddress;
- ULONG VdmPhysicalVideoMemoryLength;
- ULONG HardwareStateSize;
- ULONG DmaChannel;
- ULONG DmaPort;
- UCHAR DmaShareable;
- UCHAR InterruptShareable;
- BOOLEAN Master;
- DMA_WIDTH DmaWidth;
- DMA_SPEED DmaSpeed;
- BOOLEAN bMapBuffers;
- BOOLEAN NeedPhysicalAddresses;
- BOOLEAN DemandMode;
- ULONG MaximumTransferLength;
- ULONG NumberOfPhysicalBreaks;
- BOOLEAN ScatterGather;
- ULONG MaximumScatterGatherChunkSize;
- PVIDEO_PORT_GET_PROC_ADDRESS VideoPortGetProcAddress;
- PWSTR DriverRegistryPath;
- ULONGLONG SystemMemorySize;
-} VIDEO_PORT_CONFIG_INFO, *PVIDEO_PORT_CONFIG_INFO;
-
-typedef VP_STATUS DDKAPI
-(*PVIDEO_HW_FIND_ADAPTER)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVOID HwContext,
- /*IN*/ PWSTR ArgumentString,
- /*IN OUT*/ PVIDEO_PORT_CONFIG_INFO ConfigInfo,
- /*OUT*/ PUCHAR Again);
-
-typedef VP_STATUS DDKAPI
-(*PVIDEO_HW_POWER_GET)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ ULONG HwId,
- /*IN OUT*/ PVIDEO_POWER_MANAGEMENT VideoPowerControl);
-
-/* PVIDEO_HW_GET_CHILD_DESCRIPTOR return values */
-#define VIDEO_ENUM_MORE_DEVICES ERROR_CONTINUE
-#define VIDEO_ENUM_NO_MORE_DEVICES ERROR_NO_MORE_DEVICES
-#define VIDEO_ENUM_INVALID_DEVICE ERROR_INVALID_NAME
-
-/* PVIDEO_HW_GET_CHILD_DESCRIPTOR.ChildEnumInfo constants */
-typedef struct _VIDEO_CHILD_ENUM_INFO {
- ULONG Size;
- ULONG ChildDescriptorSize;
- ULONG ChildIndex;
- ULONG ACPIHwId;
- PVOID ChildHwDeviceExtension;
-} VIDEO_CHILD_ENUM_INFO, *PVIDEO_CHILD_ENUM_INFO;
-
-/* PVIDEO_HW_GET_CHILD_DESCRIPTOR.VideoChildType constants */
-typedef enum _VIDEO_CHILD_TYPE {
- Monitor = 1,
- NonPrimaryChip,
- VideoChip,
- Other
-} VIDEO_CHILD_TYPE, *PVIDEO_CHILD_TYPE;
-
-typedef VP_STATUS DDKAPI
-(*PVIDEO_HW_GET_CHILD_DESCRIPTOR)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVIDEO_CHILD_ENUM_INFO ChildEnumInfo,
- /*OUT*/ PVIDEO_CHILD_TYPE VideoChildType,
- /*OUT*/ PUCHAR pChildDescriptor,
- /*OUT*/ PULONG UId,
- /*OUT*/ PULONG pUnused);
-
-typedef BOOLEAN DDKAPI
-(*PVIDEO_HW_INITIALIZE)(
- /*IN*/ PVOID HwDeviceExtension);
-
-typedef BOOLEAN DDKAPI
-(*PVIDEO_HW_INTERRUPT)(
- /*IN*/ PVOID HwDeviceExtension);
-
-/* VIDEO_ACCESS_RANGE.RangePassive */
-#define VIDEO_RANGE_PASSIVE_DECODE 1
-#define VIDEO_RANGE_10_BIT_DECODE 2
-
-#ifndef VIDEO_ACCESS_RANGE_DEFINED /* also in miniport.h */
-#define VIDEO_ACCESS_RANGE_DEFINED
-typedef struct _VIDEO_ACCESS_RANGE {
- PHYSICAL_ADDRESS RangeStart;
- ULONG RangeLength;
- UCHAR RangeInIoSpace;
- UCHAR RangeVisible;
- UCHAR RangeShareable;
- UCHAR RangePassive;
-} VIDEO_ACCESS_RANGE, *PVIDEO_ACCESS_RANGE;
-#endif
-
-typedef VOID DDKAPI
-(*PVIDEO_HW_LEGACYRESOURCES)(
- /*IN*/ ULONG VendorId,
- /*IN*/ ULONG DeviceId,
- /*IN OUT*/ PVIDEO_ACCESS_RANGE *LegacyResourceList,
- /*IN OUT*/ PULONG LegacyResourceCount);
-
-typedef VP_STATUS DDKAPI
-(*PMINIPORT_QUERY_DEVICE_ROUTINE)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVOID Context,
- /*IN*/ VIDEO_DEVICE_DATA_TYPE DeviceDataType,
- /*IN*/ PVOID Identifier,
- /*IN*/ ULONG IdentifierLength,
- /*IN*/ PVOID ConfigurationData,
- /*IN*/ ULONG ConfigurationDataLength,
- /*IN OUT*/ PVOID ComponentInformation,
- /*IN*/ ULONG ComponentInformationLength);
-
-typedef struct _QUERY_INTERFACE {
- CONST GUID *InterfaceType;
- USHORT Size;
- USHORT Version;
- PINTERFACE Interface;
- PVOID InterfaceSpecificData;
-} QUERY_INTERFACE, *PQUERY_INTERFACE;
-
-typedef VP_STATUS DDKAPI
-(*PVIDEO_HW_QUERY_INTERFACE)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN OUT*/ PQUERY_INTERFACE QueryInterface);
-
-typedef VP_STATUS DDKAPI
-(*PMINIPORT_GET_REGISTRY_ROUTINE)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVOID Context,
- /*IN OUT*/ PWSTR ValueName,
- /*IN OUT*/ PVOID ValueData,
- /*IN*/ ULONG ValueLength);
-
-typedef BOOLEAN DDKAPI
-(*PVIDEO_HW_RESET_HW)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ ULONG Columns,
- /*IN*/ ULONG Rows);
-
-typedef VP_STATUS DDKAPI
-(*PVIDEO_HW_POWER_SET)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ ULONG HwId,
- /*IN*/ PVIDEO_POWER_MANAGEMENT VideoPowerControl);
-
-typedef struct _STATUS_BLOCK {
- _ANONYMOUS_UNION union {
- VP_STATUS Status;
- PVOID Pointer;
- } DUMMYUNIONNAME;
- ULONG_PTR Information;
-} STATUS_BLOCK, *PSTATUS_BLOCK;
-
-typedef struct _VIDEO_REQUEST_PACKET {
- ULONG IoControlCode;
- PSTATUS_BLOCK StatusBlock;
- PVOID InputBuffer;
- ULONG InputBufferLength;
- PVOID OutputBuffer;
- ULONG OutputBufferLength;
-} VIDEO_REQUEST_PACKET, *PVIDEO_REQUEST_PACKET;
-
-typedef BOOLEAN DDKAPI
-(*PVIDEO_HW_START_IO)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVIDEO_REQUEST_PACKET RequestPacket);
-
-typedef BOOLEAN DDKAPI
-(*PMINIPORT_SYNCHRONIZE_ROUTINE)(
- /*IN*/ PVOID Context);
-
-typedef VOID DDKAPI
-(*PVIDEO_HW_TIMER)(
- /*IN*/ PVOID HwDeviceExtension);
-
-typedef VOID DDKAPI
-(*PMINIPORT_DPC_ROUTINE)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVOID Context);
-
-typedef VP_STATUS DDKAPI
-(*PDRIVER_IO_PORT_UCHAR)(
- /*IN*/ ULONG_PTR Context,
- /*IN*/ ULONG Port,
- /*IN*/ UCHAR AccessMode,
- /*IN*/ PUCHAR Data);
-
-typedef VP_STATUS DDKAPI
-(*PDRIVER_IO_PORT_UCHAR_STRING)(
- /*IN*/ ULONG_PTR Context,
- /*IN*/ ULONG Port,
- /*IN*/ UCHAR AccessMode,
- /*IN*/ PUCHAR Data,
- /*IN*/ ULONG DataLength);
-
-typedef VP_STATUS DDKAPI
-(*PDRIVER_IO_PORT_ULONG)(
- /*IN*/ ULONG_PTR Context,
- /*IN*/ ULONG Port,
- /*IN*/ UCHAR AccessMode,
- /*IN*/ PULONG Data);
-
-typedef VP_STATUS DDKAPI
-(*PDRIVER_IO_PORT_ULONG_STRING)(
- /*IN*/ ULONG_PTR Context,
- /*IN*/ ULONG Port,
- /*IN*/ UCHAR AccessMode,
- /*IN*/ PULONG Data,
- /*IN*/ ULONG DataLength);
-
-typedef VP_STATUS DDKAPI
-(*PDRIVER_IO_PORT_USHORT)(
- /*IN*/ ULONG_PTR Context,
- /*IN*/ ULONG Port,
- /*IN*/ UCHAR AccessMode,
- /*IN*/ PUSHORT Data);
-
-typedef VP_STATUS DDKAPI
-(*PDRIVER_IO_PORT_USHORT_STRING)(
- /*IN*/ ULONG_PTR Context,
- /*IN*/ ULONG Port,
- /*IN*/ UCHAR AccessMode,
- /*IN*/ PUSHORT Data,
- /*IN*/ ULONG DataLength);
-
-
-
-typedef struct _INT10_BIOS_ARGUMENTS {
- ULONG Eax;
- ULONG Ebx;
- ULONG Ecx;
- ULONG Edx;
- ULONG Esi;
- ULONG Edi;
- ULONG Ebp;
- USHORT SegDs;
- USHORT SegEs;
-} INT10_BIOS_ARGUMENTS, *PINT10_BIOS_ARGUMENTS;
-
-typedef struct _VIDEO_CHILD_STATE {
- ULONG Id;
- ULONG State;
-} VIDEO_CHILD_STATE, *PVIDEO_CHILD_STATE;
-
-typedef struct _VIDEO_CHILD_STATE_CONFIGURATION {
- ULONG Count;
- VIDEO_CHILD_STATE ChildStateArray[ANYSIZE_ARRAY];
-} VIDEO_CHILD_STATE_CONFIGURATION, *PVIDEO_CHILD_STATE_CONFIGURATION;
-
-typedef struct _VIDEO_HW_INITIALIZATION_DATA {
- ULONG HwInitDataSize;
- INTERFACE_TYPE AdapterInterfaceType;
- PVIDEO_HW_FIND_ADAPTER HwFindAdapter;
- PVIDEO_HW_INITIALIZE HwInitialize;
- PVIDEO_HW_INTERRUPT HwInterrupt;
- PVIDEO_HW_START_IO HwStartIO;
- ULONG HwDeviceExtensionSize;
- ULONG StartingDeviceNumber;
- PVIDEO_HW_RESET_HW HwResetHw;
- PVIDEO_HW_TIMER HwTimer;
- PVIDEO_HW_START_DMA HwStartDma;
- PVIDEO_HW_POWER_SET HwSetPowerState;
- PVIDEO_HW_POWER_GET HwGetPowerState;
- PVIDEO_HW_GET_CHILD_DESCRIPTOR HwGetVideoChildDescriptor;
- PVIDEO_HW_QUERY_INTERFACE HwQueryInterface;
- ULONG HwChildDeviceExtensionSize;
- PVIDEO_ACCESS_RANGE HwLegacyResourceList;
- ULONG HwLegacyResourceCount;
- PVIDEO_HW_LEGACYRESOURCES HwGetLegacyResources;
- BOOLEAN AllowEarlyEnumeration;
- ULONG Reserved;
-} VIDEO_HW_INITIALIZATION_DATA, *PVIDEO_HW_INITIALIZATION_DATA;
-
- /* VIDEO_PORT_AGP_INTERFACE.Version contants */
-#define VIDEO_PORT_AGP_INTERFACE_VERSION_1 1
-
-typedef struct _VIDEO_PORT_AGP_INTERFACE {
- SHORT Size;
- SHORT Version;
- PVOID Context;
- PINTERFACE_REFERENCE InterfaceReference;
- PINTERFACE_DEREFERENCE InterfaceDereference;
- PAGP_RESERVE_PHYSICAL AgpReservePhysical;
- PAGP_RELEASE_PHYSICAL AgpReleasePhysical;
- PAGP_COMMIT_PHYSICAL AgpCommitPhysical;
- PAGP_FREE_PHYSICAL AgpFreePhysical;
- PAGP_RESERVE_VIRTUAL AgpReserveVirtual;
- PAGP_RELEASE_VIRTUAL AgpReleaseVirtual;
- PAGP_COMMIT_VIRTUAL AgpCommitVirtual;
- PAGP_FREE_VIRTUAL AgpFreeVirtual;
- ULONGLONG AgpAllocationLimit;
-} VIDEO_PORT_AGP_INTERFACE, *PVIDEO_PORT_AGP_INTERFACE;
-
- /* VIDEO_PORT_AGP_INTERFACE_2.Version constants */
-#define VIDEO_PORT_AGP_INTERFACE_VERSION_2 2
-
-typedef struct _VIDEO_PORT_AGP_INTERFACE_2 {
- /*IN*/ USHORT Size;
- /*IN*/ USHORT Version;
- /*OUT*/ PVOID Context;
- /*OUT*/ PINTERFACE_REFERENCE InterfaceReference;
- /*OUT*/ PINTERFACE_DEREFERENCE InterfaceDereference;
- /*OUT*/ PAGP_RESERVE_PHYSICAL AgpReservePhysical;
- /*OUT*/ PAGP_RELEASE_PHYSICAL AgpReleasePhysical;
- /*OUT*/ PAGP_COMMIT_PHYSICAL AgpCommitPhysical;
- /*OUT*/ PAGP_FREE_PHYSICAL AgpFreePhysical;
- /*OUT*/ PAGP_RESERVE_VIRTUAL AgpReserveVirtual;
- /*OUT*/ PAGP_RELEASE_VIRTUAL AgpReleaseVirtual;
- /*OUT*/ PAGP_COMMIT_VIRTUAL AgpCommitVirtual;
- /*OUT*/ PAGP_FREE_VIRTUAL AgpFreeVirtual;
- /*OUT*/ ULONGLONG AgpAllocationLimit;
- /*OUT*/ PAGP_SET_RATE AgpSetRate;
-} VIDEO_PORT_AGP_INTERFACE_2, *PVIDEO_PORT_AGP_INTERFACE_2;
-
-#define VIDEO_PORT_I2C_INTERFACE_VERSION_1 1
-
-typedef VOID DDKAPI
-(*PVIDEO_WRITE_CLOCK_LINE)(
- PVOID HwDeviceExtension,
- UCHAR Data);
-
-typedef VOID DDKAPI
-(*PVIDEO_WRITE_DATA_LINE)(
- PVOID HwDeviceExtension,
- UCHAR Data);
-
-typedef BOOLEAN DDKAPI
-(*PVIDEO_READ_CLOCK_LINE)(
- PVOID HwDeviceExtension);
-
-typedef BOOLEAN DDKAPI
-(*PVIDEO_READ_DATA_LINE)(
- PVOID HwDeviceExtension);
-
-typedef struct _I2C_CALLBACKS
-{
- /*IN*/ PVIDEO_WRITE_CLOCK_LINE WriteClockLine;
- /*IN*/ PVIDEO_WRITE_DATA_LINE WriteDataLine;
- /*IN*/ PVIDEO_READ_CLOCK_LINE ReadClockLine;
- /*IN*/ PVIDEO_READ_DATA_LINE ReadDataLine;
-} I2C_CALLBACKS, *PI2C_CALLBACKS;
-
-typedef BOOLEAN DDKAPI
-(*PI2C_START)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PI2C_CALLBACKS I2CCallbacks);
-
-typedef BOOLEAN DDKAPI
-(*PI2C_STOP)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PI2C_CALLBACKS I2CCallbacks);
-
-typedef BOOLEAN DDKAPI
-(*PI2C_WRITE)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PI2C_CALLBACKS I2CCallbacks,
- /*IN*/ PUCHAR Buffer,
- /*IN*/ ULONG Length);
-
-typedef BOOLEAN DDKAPI
-(*PI2C_READ)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PI2C_CALLBACKS I2CCallbacks,
- /*OUT*/ PUCHAR Buffer,
- /*IN*/ ULONG Length);
-
-typedef struct _VIDEO_PORT_I2C_INTERFACE {
- USHORT Size;
- USHORT Version;
- PVOID Context;
- PINTERFACE_REFERENCE InterfaceReference;
- PINTERFACE_DEREFERENCE InterfaceDereference;
- PI2C_START I2CStart;
- PI2C_STOP I2CStop;
- PI2C_WRITE I2CWrite;
- PI2C_READ I2CRead;
-} VIDEO_PORT_I2C_INTERFACE, *PVIDEO_PORT_I2C_INTERFACE;
-
- /* VIDEO_PORT_INT10_INTERFACE.Version constants */
-#define VIDEO_PORT_INT10_INTERFACE_VERSION_1 1
-
-typedef VP_STATUS DDKAPI
-(*PINT10_ALLOCATE_BUFFER)(
- /*IN*/ PVOID Context,
- /*OUT*/ PUSHORT Seg,
- /*OUT*/ PUSHORT Off,
- /*IN OUT*/ PULONG Length);
-
-typedef VP_STATUS DDKAPI
-(*PINT10_CALL_BIOS)(
- /*IN*/ PVOID Context,
- /*IN OUT*/ PINT10_BIOS_ARGUMENTS BiosArguments);
-
-typedef VP_STATUS DDKAPI
-(*PINT10_FREE_BUFFER)(
- /*IN*/ PVOID Context,
- /*IN*/ USHORT Seg,
- /*IN*/ USHORT Off);
-
-typedef VP_STATUS DDKAPI
-(*PINT10_READ_MEMORY)(
- /*IN*/ PVOID Context,
- /*IN*/ USHORT Seg,
- /*IN*/ USHORT Off,
- /*OUT*/ PVOID Buffer,
- /*IN*/ ULONG Length);
-
-typedef VP_STATUS DDKAPI
-(*PINT10_WRITE_MEMORY)(
- /*IN*/ PVOID Context,
- /*IN*/ USHORT Seg,
- /*IN*/ USHORT Off,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG Length);
-
-typedef struct _VIDEO_PORT_INT10_INTERFACE {
- /*IN*/ USHORT Size;
- /*IN*/ USHORT Version;
- /*OUT*/ PVOID Context;
- /*OUT*/ PINTERFACE_REFERENCE InterfaceReference;
- /*OUT*/ PINTERFACE_DEREFERENCE InterfaceDereference;
- /*OUT*/ PINT10_ALLOCATE_BUFFER Int10AllocateBuffer;
- /*OUT*/ PINT10_FREE_BUFFER Int10FreeBuffer;
- /*OUT*/ PINT10_READ_MEMORY Int10ReadMemory;
- /*OUT*/ PINT10_WRITE_MEMORY Int10WriteMemory;
- /*OUT*/ PINT10_CALL_BIOS Int10CallBios;
-} VIDEO_PORT_INT10_INTERFACE, *PVIDEO_PORT_INT10_INTERFACE;
-
- /* Flags for VideoPortGetDeviceBase and VideoPortMapMemory */
-#define VIDEO_MEMORY_SPACE_MEMORY 0x00
-#define VIDEO_MEMORY_SPACE_IO 0x01
-#define VIDEO_MEMORY_SPACE_USER_MODE 0x02
-#define VIDEO_MEMORY_SPACE_DENSE 0x04
-#define VIDEO_MEMORY_SPACE_P6CACHE 0x08
-
-typedef struct _VIDEO_X86_BIOS_ARGUMENTS {
- ULONG Eax;
- ULONG Ebx;
- ULONG Ecx;
- ULONG Edx;
- ULONG Esi;
- ULONG Edi;
- ULONG Ebp;
-} VIDEO_X86_BIOS_ARGUMENTS, *PVIDEO_X86_BIOS_ARGUMENTS;
-
-typedef struct _VP_DEVICE_DESCRIPTION {
- BOOLEAN ScatterGather;
- BOOLEAN Dma32BitAddresses;
- BOOLEAN Dma64BitAddresses;
- ULONG MaximumLength;
-} VP_DEVICE_DESCRIPTION, *PVP_DEVICE_DESCRIPTION;
-
-typedef struct _VPOSVERSIONINFO {
- /*IN*/ ULONG Size;
- /*OUT*/ ULONG MajorVersion;
- /*OUT*/ ULONG MinorVersion;
- /*OUT*/ ULONG BuildNumber;
- /*OUT*/ USHORT ServicePackMajor;
- /*OUT*/ USHORT ServicePackMinor;
-} VPOSVERSIONINFO, *PVPOSVERSIONINFO;
-
-
-
- /* Video port functions for miniports */
-
-VPAPI
-VOID
-DDKAPI
-VideoDebugPrint(
- /*IN*/ ULONG DebugPrintLevel,
- /*IN*/ PCHAR DebugMessage,
- /*IN*/ ...);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortAcquireDeviceLock(
- /*IN*/ PVOID HwDeviceExtension);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortAcquireSpinLock(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PSPIN_LOCK SpinLock,
- /*OUT*/ PUCHAR OldIrql);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortAcquireSpinLockAtDpcLevel(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PSPIN_LOCK SpinLock);
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortAllocateBuffer(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ ULONG Size,
- /*OUT*/ PVOID *Buffer);
-
-VPAPI
-PVOID
-DDKAPI
-VideoPortAllocateCommonBuffer(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVP_DMA_ADAPTER VpDmaAdapter,
- /*IN*/ ULONG DesiredLength,
- /*OUT*/ PPHYSICAL_ADDRESS LogicalAddress,
- /*IN*/ BOOLEAN CacheEnabled,
- PVOID Reserved);
-
-VPAPI
-PVOID
-DDKAPI
-VideoPortAllocateContiguousMemory(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ ULONG NumberOfBytes,
- /*IN*/ PHYSICAL_ADDRESS HighestAcceptableAddress);
-
- /* VideoPortAllocatePool.PoolType constants */
-typedef enum _VP_POOL_TYPE {
- VpNonPagedPool = 0,
- VpPagedPool,
- VpNonPagedPoolCacheAligned = 4,
- VpPagedPoolCacheAligned
-} VP_POOL_TYPE, *PVP_POOL_TYPE;
-
-VPAPI
-PVOID
-DDKAPI
-VideoPortAllocatePool(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ VP_POOL_TYPE PoolType,
- /*IN*/ SIZE_T NumberOfBytes,
- /*IN*/ ULONG Tag);
-
-VPAPI
-PDMA
-DDKAPI
-VideoPortAssociateEventsWithDmaHandle(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN OUT*/ PVIDEO_REQUEST_PACKET pVrp,
- /*IN*/ PVOID MappedUserEvent,
- /*IN*/ PVOID DisplayDriverEvent);
-
- /* VideoPortCheckForDeviceExistence.Flags constants */
-#define CDE_USE_SUBSYSTEM_IDS 0x00000001
-#define CDE_USE_REVISION 0x00000002
-
-VPAPI
-BOOLEAN
-DDKAPI
-VideoPortCheckForDeviceExistence(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ USHORT VendorId,
- /*IN*/ USHORT DeviceId,
- /*IN*/ UCHAR RevisionId,
- /*IN*/ USHORT SubVendorId,
- /*IN*/ USHORT SubSystemId,
- /*IN*/ ULONG Flags);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortClearEvent(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PEVENT pEvent);
-
-VPAPI
-ULONG
-DDKAPI
-VideoPortCompareMemory(
- /*IN*/ PVOID Source1,
- /*IN*/ PVOID Source2,
- /*IN*/ ULONG Length);
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortCompleteDma(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVP_DMA_ADAPTER VpDmaAdapter,
- /*IN*/ PVP_SCATTER_GATHER_LIST VpScatterGather,
- /*IN*/ BOOLEAN WriteToDevice);
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortCreateEvent(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ ULONG EventFlag,
- /*IN*/ PVOID Unused,
- /*OUT*/ PEVENT *ppEvent);
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortCreateSecondaryDisplay(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN OUT*/ PVOID *SecondaryDeviceExtension,
- /*IN*/ ULONG ulFlag);
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortCreateSpinLock(
- /*IN*/ PVOID HwDeviceExtension,
- /*OUT*/ PSPIN_LOCK *SpinLock);
-
-typedef struct _DDC_CONTROL {
- /*IN*/ ULONG Size;
- /*IN*/ I2C_CALLBACKS I2CCallbacks;
- /*IN*/ UCHAR EdidSegment;
-} DDC_CONTROL, *PDDC_CONTROL;
-
-VPAPI
-BOOLEAN
-DDKAPI
-VideoPortDDCMonitorHelper(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVOID DDCControl,
- /*IN OUT*/ PUCHAR EdidBuffer,
- /*IN*/ ULONG EdidBufferSize);
-
-VPAPI
-VOID
-DDKCDECLAPI
-VideoPortDebugPrint(
- /*IN*/ VIDEO_DEBUG_LEVEL DebugPrintLevel,
- /*IN*/ PCHAR DebugMessage,
- /*IN*/ ...);
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortDeleteEvent(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PEVENT pEvent);
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortDeleteSpinLock(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PSPIN_LOCK SpinLock);
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortDisableInterrupt(
- /*IN*/ PVOID HwDeviceExtension);
-
-VPAPI
-PDMA
-DDKAPI
-VideoPortDoDma(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PDMA pDma,
- /*IN*/ DMA_FLAGS DmaFlags);
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortEnableInterrupt(
- /*IN*/ PVOID HwDeviceExtension);
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortEnumerateChildren(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVOID Reserved);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortFreeCommonBuffer(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ ULONG Length,
- /*IN*/ PVOID VirtualAddress,
- /*IN*/ PHYSICAL_ADDRESS LogicalAddress,
- /*IN*/ BOOLEAN CacheEnabled);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortFreeDeviceBase(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVOID MappedAddress);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortFreePool(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVOID Ptr);
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortGetAccessRanges(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ ULONG NumRequestedResources,
- /*IN*/ PIO_RESOURCE_DESCRIPTOR RequestedResources /*OPTIONAL*/,
- /*IN*/ ULONG NumAccessRanges,
- /*OUT*/ PVIDEO_ACCESS_RANGE AccessRanges,
- /*IN*/ PVOID VendorId,
- /*IN*/ PVOID DeviceId,
- /*OUT*/ PULONG Slot);
-
-VPAPI
-PVOID
-DDKAPI
-VideoPortGetAssociatedDeviceExtension(
- /*IN*/ PVOID DeviceObject);
-
-VPAPI
-ULONG
-DDKAPI
-VideoPortGetAssociatedDeviceID(
- /*IN*/ PVOID DeviceObject);
-
-VPAPI
-ULONG
-DDKAPI
-VideoPortGetBusData(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ BUS_DATA_TYPE BusDataType,
- /*IN*/ ULONG SlotNumber,
- /*IN OUT*/ PVOID Buffer,
- /*IN*/ ULONG Offset,
- /*IN*/ ULONG Length);
-
-VPAPI
-ULONG
-DDKAPI
-VideoPortGetBytesUsed(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PDMA pDma);
-
-VPAPI
-PVOID
-DDKAPI
-VideoPortGetCommonBuffer(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ ULONG DesiredLength,
- /*IN*/ ULONG Alignment,
- /*OUT*/ PPHYSICAL_ADDRESS LogicalAddress,
- /*OUT*/ PULONG pActualLength,
- /*IN*/ BOOLEAN CacheEnabled);
-
-VPAPI
-UCHAR
-DDKAPI
-VideoPortGetCurrentIrql(
- VOID);
-
-VPAPI
-PVOID
-DDKAPI
-VideoPortGetDeviceBase(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PHYSICAL_ADDRESS IoAddress,
- /*IN*/ ULONG NumberOfUchars,
- /*IN*/ UCHAR InIoSpace);
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortGetDeviceData(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ VIDEO_DEVICE_DATA_TYPE DeviceDataType,
- /*IN*/ PMINIPORT_QUERY_DEVICE_ROUTINE CallbackRoutine,
- /*IN*/ PVOID Context);
-
-VPAPI
-PVP_DMA_ADAPTER
-DDKAPI
-VideoPortGetDmaAdapter(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVP_DEVICE_DESCRIPTION VpDeviceDescription);
-
-VPAPI
-PVOID
-DDKAPI
-VideoPortGetDmaContext(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PDMA pDma);
-
-VPAPI
-PVOID
-DDKAPI
-VideoPortGetMdl(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PDMA pDma);
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortGetRegistryParameters(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PWSTR ParameterName,
- /*IN*/ UCHAR IsParameterFileName,
- /*IN*/ PMINIPORT_GET_REGISTRY_ROUTINE CallbackRoutine,
- /*IN*/ PVOID Context);
-
-VPAPI
-PVOID
-DDKAPI
-VideoPortGetRomImage(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVOID Unused1,
- /*IN*/ ULONG Unused2,
- /*IN*/ ULONG Length);
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortGetVersion(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN OUT*/ PVPOSVERSIONINFO pVpOsVersionInfo);
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortGetVgaStatus(
- /*IN*/ PVOID HwDeviceExtension,
- /*OUT*/ PULONG VgaStatus);
-
-VPAPI
-ULONG
-DDKAPI
-VideoPortInitialize(
- /*IN*/ PVOID Argument1,
- /*IN*/ PVOID Argument2,
- /*IN*/ PVIDEO_HW_INITIALIZATION_DATA HwInitializationData,
- /*IN*/ PVOID HwContext);
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortInt10(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVIDEO_X86_BIOS_ARGUMENTS BiosArguments);
-
-VPAPI
-LONG
-DDKFASTAPI
-VideoPortInterlockedDecrement(
- /*IN*/ PLONG Addend);
-
-VPAPI
-LONG
-DDKFASTAPI
-VideoPortInterlockedExchange(
- /*IN OUT*/ PLONG Target,
- /*IN*/ LONG Value);
-
-VPAPI
-LONG
-DDKFASTAPI
-VideoPortInterlockedIncrement(
- /*IN*/ PLONG Addend);
-
-typedef enum _VP_LOCK_OPERATION {
- VpReadAccess = 0,
- VpWriteAccess,
- VpModifyAccess
-} VP_LOCK_OPERATION;
-
-VPAPI
-PVOID
-DDKAPI
-VideoPortLockBuffer(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVOID BaseAddress,
- /*IN*/ ULONG Length,
- /*IN*/ VP_LOCK_OPERATION Operation);
-
-VPAPI
-BOOLEAN
-DDKAPI
-VideoPortLockPages(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN OUT*/ PVIDEO_REQUEST_PACKET pVrp,
- /*IN OUT*/ PEVENT pUEvent,
- /*IN*/ PEVENT pDisplayEvent,
- /*IN*/ DMA_FLAGS DmaFlags);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortLogError(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVIDEO_REQUEST_PACKET Vrp /*OPTIONAL*/,
- /*IN*/ VP_STATUS ErrorCode,
- /*IN*/ ULONG UniqueId);
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortMapBankedMemory(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PHYSICAL_ADDRESS PhysicalAddress,
- /*IN OUT*/ PULONG Length,
- PULONG InIoSpace,
- PVOID *VirtualAddress,
- ULONG BankLength,
- UCHAR ReadWriteBank,
- PBANKED_SECTION_ROUTINE BankRoutine,
- PVOID Context);
-
-VPAPI
-PDMA
-DDKAPI
-VideoPortMapDmaMemory(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVIDEO_REQUEST_PACKET pVrp,
- /*IN*/ PHYSICAL_ADDRESS BoardAddress,
- /*IN*/ PULONG Length,
- /*IN*/ PULONG InIoSpace,
- /*IN*/ PVOID MappedUserEvent,
- /*IN*/ PVOID DisplayDriverEvent,
- /*IN OUT*/ PVOID *VirtualAddress);
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortMapMemory(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PHYSICAL_ADDRESS PhysicalAddress,
- /*IN OUT*/ PULONG Length,
- /*IN*/ PULONG InIoSpace,
- /*IN OUT*/ PVOID *VirtualAddress);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortMoveMemory(
- /*IN*/ PVOID Destination,
- /*IN*/ PVOID Source,
- /*IN*/ ULONG Length);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortPutDmaAdapter(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVP_DMA_ADAPTER VpDmaAdapter);
-
-VPAPI
-LONGLONG
-DDKAPI
-VideoPortQueryPerformanceCounter(
- /*IN*/ PVOID HwDeviceExtension,
- /*OUT*/ PLONGLONG PerformanceFrequency /*OPTIONAL*/);
-
- /* VideoPortQueryServices.ServicesType constants */
-typedef enum _VIDEO_PORT_SERVICES {
- VideoPortServicesAGP = 1,
- VideoPortServicesI2C,
- VideoPortServicesHeadless,
- VideoPortServicesInt10
-} VIDEO_PORT_SERVICES;
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortQueryServices(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ VIDEO_PORT_SERVICES ServicesType,
- /*IN OUT*/ PINTERFACE Interface);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortQuerySystemTime(
- /*OUT*/ PLARGE_INTEGER CurrentTime);
-
-VPAPI
-BOOLEAN
-DDKAPI
-VideoPortQueueDpc(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PMINIPORT_DPC_ROUTINE CallbackRoutine,
- /*IN*/ PVOID Context);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortReadPortBufferUchar(
- /*IN*/ PUCHAR Port,
- /*OUT*/ PUCHAR Buffer,
- /*IN*/ ULONG Count);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortReadPortBufferUlong(
- /*IN*/ PULONG Port,
- /*OUT*/ PULONG Buffer,
- /*IN*/ ULONG Count);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortReadPortBufferUshort(
- /*IN*/ PUSHORT Port,
- /*OUT*/ PUSHORT Buffer,
- /*IN*/ ULONG Count);
-
-VPAPI
-UCHAR
-DDKAPI
-VideoPortReadPortUchar(
- /*IN*/ PUCHAR Port);
-
-VPAPI
-ULONG
-DDKAPI
-VideoPortReadPortUlong(
- /*IN*/ PULONG Port);
-
-VPAPI
-USHORT
-DDKAPI
-VideoPortReadPortUshort(
- /*IN*/ PUSHORT Port);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortReadRegisterBufferUchar(
- /*IN*/ PUCHAR Register,
- /*OUT*/ PUCHAR Buffer,
- /*IN*/ ULONG Count);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortReadRegisterBufferUlong(
- /*IN*/ PULONG Register,
- /*OUT*/ PULONG Buffer,
- /*IN*/ ULONG Count);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortReadRegisterBufferUshort(
- /*IN*/ PUSHORT Register,
- /*OUT*/ PUSHORT Buffer,
- /*IN*/ ULONG Count);
-
-VPAPI
-UCHAR
-DDKAPI
-VideoPortReadRegisterUchar(
- /*IN*/ PUCHAR Register);
-
-VPAPI
-ULONG
-DDKAPI
-VideoPortReadRegisterUlong(
- /*IN*/ PULONG Register);
-
-VPAPI
-USHORT
-DDKAPI
-VideoPortReadRegisterUshort(
- /*IN*/ PUSHORT Register);
-
-VPAPI
-LONG
-DDKAPI
-VideoPortReadStateEvent(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PEVENT pEvent);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortReleaseBuffer(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVOID Buffer);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortReleaseCommonBuffer(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVP_DMA_ADAPTER VpDmaAdapter,
- /*IN*/ ULONG Length,
- /*IN*/ PHYSICAL_ADDRESS LogicalAddress,
- /*IN*/ PVOID VirtualAddress,
- /*IN*/ BOOLEAN CacheEnabled);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortReleaseDeviceLock(
- /*IN*/ PVOID HwDeviceExtension);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortReleaseSpinLock(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PSPIN_LOCK SpinLock,
- /*IN*/ UCHAR NewIrql);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortReleaseSpinLockFromDpcLevel(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PSPIN_LOCK SpinLock);
-
-VPAPI
-BOOLEAN
-DDKAPI
-VideoPortScanRom(
- PVOID HwDeviceExtension,
- PUCHAR RomBase,
- ULONG RomLength,
- PUCHAR String);
-
-VPAPI
-ULONG
-DDKAPI
-VideoPortSetBusData(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ BUS_DATA_TYPE BusDataType,
- /*IN*/ ULONG SlotNumber,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG Offset,
- /*IN*/ ULONG Length);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortSetBytesUsed(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN OUT*/ PDMA pDma,
- /*IN*/ ULONG BytesUsed);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortSetDmaContext(
- /*IN*/ PVOID HwDeviceExtension,
- /*OUT*/ PDMA pDma,
- /*IN*/ PVOID InstanceContext);
-
-VPAPI
-LONG
-DDKAPI
-VideoPortSetEvent(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PEVENT pEvent);
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortSetRegistryParameters(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PWSTR ValueName,
- /*IN*/ PVOID ValueData,
- /*IN*/ ULONG ValueLength);
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortSetTrappedEmulatorPorts(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ ULONG NumAccessRanges,
- /*IN*/ PVIDEO_ACCESS_RANGE AccessRange);
-
-VPAPI
-BOOLEAN
-DDKAPI
-VideoPortSignalDmaComplete(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVOID pDmaHandle);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortStallExecution(
- /*IN*/ ULONG Microseconds);
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortStartDma(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVP_DMA_ADAPTER VpDmaAdapter,
- /*IN*/ PVOID Mdl,
- /*IN*/ ULONG Offset,
- /*IN OUT*/ PULONG pLength,
- /*IN*/ PEXECUTE_DMA ExecuteDmaRoutine,
- /*IN*/ PVOID Context,
- /*IN*/ BOOLEAN WriteToDevice);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortStartTimer(
- /*IN*/ PVOID HwDeviceExtension);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortStopTimer(
- /*IN*/ PVOID HwDeviceExtension);
-
- /* VideoPortSynchronizeExecution.Priority constants */
-typedef enum VIDEO_SYNCHRONIZE_PRIORITY {
- VpLowPriority = 0,
- VpMediumPriority,
- VpHighPriority
-} VIDEO_SYNCHRONIZE_PRIORITY, *PVIDEO_SYNCHRONIZE_PRIORITY;
-
-VPAPI
-BOOLEAN
-DDKAPI
-VideoPortSynchronizeExecution(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ VIDEO_SYNCHRONIZE_PRIORITY Priority,
- /*IN*/ PMINIPORT_SYNCHRONIZE_ROUTINE SynchronizeRoutine,
- /*IN*/ PVOID Context);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortUnLockBuffer(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVOID Mdl);
-
-VPAPI
-BOOLEAN
-DDKAPI
-VideoPortUnlockPages(
- /*IN*/ PVOID hwDeviceExtension,
- /*IN OUT*/ PDMA pDma);
-
-VPAPI
-BOOLEAN
-DDKAPI
-VideoPortUnmapDmaMemory(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVOID VirtualAddress,
- /*IN*/ HANDLE ProcessHandle,
- /*IN*/ PDMA BoardMemoryHandle);
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortUnmapMemory(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN OUT*/ PVOID VirtualAddress,
- /*IN*/ HANDLE ProcessHandle);
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortVerifyAccessRanges(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ ULONG NumAccessRanges,
- /*IN*/ PVIDEO_ACCESS_RANGE AccessRanges);
-
-VPAPI
-VP_STATUS
-DDKAPI
-VideoPortWaitForSingleObject(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVOID Object,
- /*IN*/ PLARGE_INTEGER Timeout /*OPTIONAL*/);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortWritePortBufferUchar(
- /*IN*/ PUCHAR Port,
- /*IN*/ PUCHAR Buffer,
- /*IN*/ ULONG Count);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortWritePortBufferUlong(
- /*IN*/ PULONG Port,
- /*IN*/ PULONG Buffer,
- /*IN*/ ULONG Count);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortWritePortBufferUshort(
- /*IN*/ PUSHORT Port,
- /*IN*/ PUSHORT Buffer,
- /*IN*/ ULONG Count);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortWritePortUchar(
- /*IN*/ PUCHAR Port,
- /*IN*/ UCHAR Value);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortWritePortUlong(
- /*IN*/ PULONG Port,
- /*IN*/ ULONG Value);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortWritePortUshort(
- /*IN*/ PUSHORT Port,
- /*IN*/ USHORT Value);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortWriteRegisterBufferUchar(
- /*IN*/ PUCHAR Register,
- /*IN*/ PUCHAR Buffer,
- /*IN*/ ULONG Count);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortWriteRegisterBufferUlong(
- /*IN*/ PULONG Register,
- /*IN*/ PULONG Buffer,
- /*IN*/ ULONG Count);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortWriteRegisterBufferUshort(
- /*IN*/ PUSHORT Register,
- /*IN*/ PUSHORT Buffer,
- /*IN*/ ULONG Count);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortWriteRegisterUchar(
- /*IN*/ PUCHAR Register,
- /*IN*/ UCHAR Value);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortWriteRegisterUlong(
- /*IN*/ PULONG Register,
- /*IN*/ ULONG Value);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortWriteRegisterUshort(
- /*IN*/ PUSHORT Register,
- /*IN*/ USHORT Value);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortZeroDeviceMemory(
- /*IN*/ PVOID Destination,
- /*IN*/ ULONG Length);
-
-VPAPI
-VOID
-DDKAPI
-VideoPortZeroMemory(
- /*IN*/ PVOID Destination,
- /*2IN*/ ULONG Length);
-
-#ifdef DBG
-#define VideoDebugPrint(x) VideoPortDebugPrint x
-#else
-#define VideoDebugPrint(x)
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* defined __WINDDI_H */
-
-#endif /* __VIDEO_H */
diff --git a/winsup/w32api/include/ddk/videoagp.h b/winsup/w32api/include/ddk/videoagp.h
deleted file mode 100644
index 299def2..0000000
--- a/winsup/w32api/include/ddk/videoagp.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * videoagp.h
- *
- * Video miniport AGP interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __VIDEOAGP_H
-#define __VIDEOAGP_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include "video.h"
-
-
-#define VIDEO_AGP_RATE_1X 0x00000001
-#define VIDEO_AGP_RATE_2X 0x00000002
-#define VIDEO_AGP_RATE_4X 0x00000004
-#define VIDEO_AGP_RATE_8X 0x00000008
-
-typedef enum _VIDEO_PORT_CACHE_TYPE {
- VpNonCached = 0,
- VpWriteCombined,
- VpCached
-} VIDEO_PORT_CACHE_TYPE;
-
-typedef BOOLEAN DDKAPI
-(*PAGP_COMMIT_PHYSICAL)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVOID PhysicalReserveContext,
- /*IN*/ ULONG Pages,
- /*IN*/ ULONG Offset);
-
-typedef PVOID DDKAPI
-(*PAGP_COMMIT_VIRTUAL)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVOID VirtualReserveContext,
- /*IN*/ ULONG Pages,
- /*IN*/ ULONG Offset);
-
-typedef VOID DDKAPI
-(*PAGP_FREE_PHYSICAL)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVOID PhysicalReserveContext,
- /*IN*/ ULONG Pages,
- /*IN*/ ULONG Offset);
-
-typedef VOID DDKAPI
-(*PAGP_FREE_VIRTUAL)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVOID VirtualReserveContext,
- /*IN*/ ULONG Pages,
- /*IN*/ ULONG Offset);
-
-typedef VOID DDKAPI
-(*PAGP_RELEASE_PHYSICAL)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVOID PhysicalReserveContext);
-
-typedef VOID DDKAPI
-(*PAGP_RELEASE_VIRTUAL)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVOID VirtualReserveContext);
-
-typedef PHYSICAL_ADDRESS DDKAPI
-(*PAGP_RESERVE_PHYSICAL)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ ULONG Pages,
- /*IN*/ VIDEO_PORT_CACHE_TYPE Caching,
- /*OUT*/ PVOID *PhysicalReserveContext);
-
-typedef PVOID DDKAPI
-(*PAGP_RESERVE_VIRTUAL)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ HANDLE ProcessHandle,
- /*IN*/ PVOID PhysicalReserveContext,
- /*OUT*/ PVOID *VirtualReserveContext);
-
-typedef BOOLEAN DDKAPI
-(*PAGP_SET_RATE)(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ ULONG AgpRate);
-
-typedef struct _VIDEO_PORT_AGP_SERVICES {
- PAGP_RESERVE_PHYSICAL AgpReservePhysical;
- PAGP_RELEASE_PHYSICAL AgpReleasePhysical;
- PAGP_COMMIT_PHYSICAL AgpCommitPhysical;
- PAGP_FREE_PHYSICAL AgpFreePhysical;
- PAGP_RESERVE_VIRTUAL AgpReserveVirtual;
- PAGP_RELEASE_VIRTUAL AgpReleaseVirtual;
- PAGP_COMMIT_VIRTUAL AgpCommitVirtual;
- PAGP_FREE_VIRTUAL AgpFreeVirtual;
- ULONGLONG AllocationLimit;
-} VIDEO_PORT_AGP_SERVICES, *PVIDEO_PORT_AGP_SERVICES;
-
-VPAPI
-BOOLEAN
-DDKAPI
-VideoPortGetAgpServices(
- /*IN*/ PVOID HwDeviceExtension,
- /*IN*/ PVIDEO_PORT_AGP_SERVICES AgpServices);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __VIDEOAGP_H */
diff --git a/winsup/w32api/include/ddk/win2k.h b/winsup/w32api/include/ddk/win2k.h
deleted file mode 100644
index 84eadd0..0000000
--- a/winsup/w32api/include/ddk/win2k.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * win2k.h
- *
- * Definitions only used in Windows 2000 and earlier versions
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __WIN2K_H
-#define __WIN2K_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-#pragma pack(push,4)
-
-typedef enum _BUS_DATA_TYPE {
- ConfigurationSpaceUndefined = -1,
- Cmos,
- EisaConfiguration,
- Pos,
- CbusConfiguration,
- PCIConfiguration,
- VMEConfiguration,
- NuBusConfiguration,
- PCMCIAConfiguration,
- MPIConfiguration,
- MPSAConfiguration,
- PNPISAConfiguration,
- SgiInternalConfiguration,
- MaximumBusDataType
-} BUS_DATA_TYPE, *PBUS_DATA_TYPE;
-
-NTOSAPI
-VOID
-DDKAPI
-ExReleaseResourceForThreadLite(
- /*IN*/ PERESOURCE Resource,
- /*IN*/ ERESOURCE_THREAD ResourceThreadId);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoReadPartitionTable(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ ULONG SectorSize,
- /*IN*/ BOOLEAN ReturnRecognizedPartitions,
- /*OUT*/ struct _DRIVE_LAYOUT_INFORMATION **PartitionBuffer);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoSetPartitionInformation(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ ULONG SectorSize,
- /*IN*/ ULONG PartitionNumber,
- /*IN*/ ULONG PartitionType);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoWritePartitionTable(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ ULONG SectorSize,
- /*IN*/ ULONG SectorsPerTrack,
- /*IN*/ ULONG NumberOfHeads,
- /*IN*/ struct _DRIVE_LAYOUT_INFORMATION *PartitionBuffer);
-
-/*
- * PVOID MmGetSystemAddressForMdl(
- * IN PMDL Mdl);
- */
-#define MmGetSystemAddressForMdl(Mdl) \
- (((Mdl)->MdlFlags & (MDL_MAPPED_TO_SYSTEM_VA | \
- MDL_SOURCE_IS_NONPAGED_POOL)) ? \
- ((Mdl)->MappedSystemVa) : \
- (MmMapLockedPages((Mdl), KernelMode)))
-
-#pragma pack(pop)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __WIN2K_H */
diff --git a/winsup/w32api/include/ddk/winddi.h b/winsup/w32api/include/ddk/winddi.h
deleted file mode 100644
index fefb15d..0000000
--- a/winsup/w32api/include/ddk/winddi.h
+++ /dev/null
@@ -1,4258 +0,0 @@
-/*
- * winddi.h
- *
- * GDI device driver interface
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __WINDDI_H
-#define __WINDDI_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __VIDEO_H
-#error video.h cannot be included with winddi.h
-#else
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-#include <wingdi.h>
-
-#ifndef __DD_INCLUDED__
-/* FIXME: Some DirectDraw structures not added yet */
-typedef ULONG_PTR FLATPTR;
-typedef struct _DD_SURFACECALLBACKS {
-} DD_SURFACECALLBACKS, *PDD_SURFACECALLBACKS;
-typedef struct _DD_PALETTECALLBACKS {
-} DD_PALETTECALLBACKS, *PDD_PALETTECALLBACKS;
-typedef struct _DD_CALLBACKS {
-} DD_CALLBACKS, *PDD_CALLBACKS;
-typedef struct _DD_HALINFO {
-} DD_HALINFO, *PDD_HALINFO;
-typedef struct _VIDEOMEMORY {
-} VIDEOMEMORY, *LPVIDEOMEMORY;
-typedef struct _DD_DIRECTDRAW_GLOBAL {
-} DD_DIRECTDRAW_GLOBAL, *LPDD_DIRECTDRAW_GLOBAL;
-typedef struct _DD_SURFACE_LOCAL {
-} DD_SURFACE_LOCAL, *PDD_SURFACE_LOCAL, *LPDD_SURFACE_LOCAL;
-#endif
-
-#ifndef __DDRAWI_INCLUDED__
-typedef PVOID LPVIDMEM;
-#endif
-
-#if !defined(__DD_INCLUDED__) && !defined(__DDRAWI_INCLUDED__)
-typedef struct _DDSCAPS {
-} DDSCAPS, *PDDSCAPS;
-typedef struct _DDSCAPSEX {
-} DDSCAPSEX, *PDDSCAPSEX;
-typedef PVOID LPVMEMHEAP;
-#endif
-
-#if defined(_WIN32K_)
-#define WIN32KAPI DECL_EXPORT
-#else
-#define WIN32KAPI DECL_IMPORT
-#endif
-
-#define DDI_DRIVER_VERSION_NT4 0x00020000
-#define DDI_DRIVER_VERSION_SP3 0x00020003
-#define DDI_DRIVER_VERSION_NT5 0x00030000
-#define DDI_DRIVER_VERSION_NT5_01 0x00030100
-
-#define GDI_DRIVER_VERSION 0x4000
-
-#ifdef _X86_
-
-typedef DWORD FLOATL;
-
-#else /* !_X86_ */
-
-typedef FLOAT FLOATL;
-
-#endif
-
-typedef SHORT FWORD;
-typedef LONG LDECI4;
-typedef ULONG IDENT;
-
-typedef ULONG_PTR HFF;
-typedef ULONG_PTR HFC;
-
-typedef LONG PTRDIFF;
-typedef PTRDIFF *PPTRDIFF;
-typedef LONG FIX;
-typedef FIX *PFIX;
-typedef ULONG ROP4;
-typedef ULONG MIX;
-typedef ULONG HGLYPH;
-typedef HGLYPH *PHGLYPH;
-
-typedef LONG_PTR (DDKAPI *PFN)();
-
-DECLARE_HANDLE(HBM);
-DECLARE_HANDLE(HDEV);
-DECLARE_HANDLE(HSURF);
-DECLARE_HANDLE(DHSURF);
-DECLARE_HANDLE(DHPDEV);
-DECLARE_HANDLE(HDRVOBJ);
-
-
-#define GDI_DRIVER_VERSION 0x4000
-
-typedef struct _ENG_EVENT *PEVENT;
-
-#define OPENGL_CMD 4352
-#define OPENGL_GETINFO 4353
-#define WNDOBJ_SETUP 4354
-
-#define FD_ERROR 0xFFFFFFFF
-#define DDI_ERROR 0xFFFFFFFF
-
-#define HFF_INVALID ((HFF) 0)
-#define HFC_INVALID ((HFC) 0)
-#define HGLYPH_INVALID ((HGLYPH) -1)
-
-#define FP_ALTERNATEMODE 1
-#define FP_WINDINGMODE 2
-
-#define DN_ACCELERATION_LEVEL 1
-#define DN_DEVICE_ORIGIN 2
-#define DN_SLEEP_MODE 3
-#define DN_DRAWING_BEGIN 4
-
-#define DCR_SOLID 0
-#define DCR_DRIVER 1
-#define DCR_HALFTONE 2
-
-#define GX_IDENTITY 0
-#define GX_OFFSET 1
-#define GX_SCALE 2
-#define GX_GENERAL 3
-
-typedef struct _POINTE {
- FLOATL x;
- FLOATL y;
-} POINTE, *PPOINTE;
-
-typedef union _FLOAT_LONG {
- FLOATL e;
- LONG l;
-} FLOAT_LONG, *PFLOAT_LONG;
-
-typedef struct _POINTFIX {
- FIX x;
- FIX y;
-} POINTFIX, *PPOINTFIX;
-
-typedef struct _RECTFX {
- FIX xLeft;
- FIX yTop;
- FIX xRight;
- FIX yBottom;
-} RECTFX, *PRECTFX;
-
-typedef struct _POINTQF {
- LARGE_INTEGER x;
- LARGE_INTEGER y;
-} POINTQF, *PPOINTQF;
-
-
-typedef struct _BLENDOBJ {
- BLENDFUNCTION BlendFunction;
-} BLENDOBJ,*PBLENDOBJ;
-
-/* BRUSHOBJ.flColorType */
-#define BR_DEVICE_ICM 0x01
-#define BR_HOST_ICM 0x02
-#define BR_CMYKCOLOR 0x04
-#define BR_ORIGCOLOR 0x08
-
-typedef struct _BRUSHOBJ {
- ULONG iSolidColor;
- PVOID pvRbrush;
- FLONG flColorType;
-} BRUSHOBJ;
-
-typedef struct _CIECHROMA {
- LDECI4 x;
- LDECI4 y;
- LDECI4 Y;
-} CIECHROMA;
-
-typedef struct _RUN {
- LONG iStart;
- LONG iStop;
-} RUN, *PRUN;
-
-typedef struct _CLIPLINE {
- POINTFIX ptfxA;
- POINTFIX ptfxB;
- LONG lStyleState;
- ULONG c;
- RUN arun[1];
-} CLIPLINE, *PCLIPLINE;
-
-/* CLIPOBJ.iDComplexity constants */
-#define DC_TRIVIAL 0
-#define DC_RECT 1
-#define DC_COMPLEX 3
-
-/* CLIPOBJ.iFComplexity constants */
-#define FC_RECT 1
-#define FC_RECT4 2
-#define FC_COMPLEX 3
-
-/* CLIPOBJ.iMode constants */
-#define TC_RECTANGLES 0
-#define TC_PATHOBJ 2
-
-/* CLIPOBJ.fjOptions constants */
-#define OC_BANK_CLIP 1
-
-typedef struct _CLIPOBJ {
- ULONG iUniq;
- RECTL rclBounds;
- BYTE iDComplexity;
- BYTE iFComplexity;
- BYTE iMode;
- BYTE fjOptions;
-} CLIPOBJ;
-
-typedef struct _COLORINFO {
- CIECHROMA Red;
- CIECHROMA Green;
- CIECHROMA Blue;
- CIECHROMA Cyan;
- CIECHROMA Magenta;
- CIECHROMA Yellow;
- CIECHROMA AlignmentWhite;
- LDECI4 RedGamma;
- LDECI4 GreenGamma;
- LDECI4 BlueGamma;
- LDECI4 MagentaInCyanDye;
- LDECI4 YellowInCyanDye;
- LDECI4 CyanInMagentaDye;
- LDECI4 YellowInMagentaDye;
- LDECI4 CyanInYellowDye;
- LDECI4 MagentaInYellowDye;
-} COLORINFO, *PCOLORINFO;
-
-/* DEVHTADJDATA.DeviceFlags constants */
-#define DEVHTADJF_COLOR_DEVICE 0x00000001
-#define DEVHTADJF_ADDITIVE_DEVICE 0x00000002
-
-typedef struct _DEVHTINFO {
- DWORD HTFlags;
- DWORD HTPatternSize;
- DWORD DevPelsDPI;
- COLORINFO ColorInfo;
-} DEVHTINFO, *PDEVHTINFO;
-
-typedef struct _DEVHTADJDATA {
- DWORD DeviceFlags;
- DWORD DeviceXDPI;
- DWORD DeviceYDPI;
- PDEVHTINFO pDefHTInfo;
- PDEVHTINFO pAdjHTInfo;
-} DEVHTADJDATA, *PDEVHTADJDATA;
-
-/* DEVINFO.flGraphicsCaps flags */
-#define GCAPS_BEZIERS 0x00000001
-#define GCAPS_GEOMETRICWIDE 0x00000002
-#define GCAPS_ALTERNATEFILL 0x00000004
-#define GCAPS_WINDINGFILL 0x00000008
-#define GCAPS_HALFTONE 0x00000010
-#define GCAPS_COLOR_DITHER 0x00000020
-#define GCAPS_HORIZSTRIKE 0x00000040
-#define GCAPS_VERTSTRIKE 0x00000080
-#define GCAPS_OPAQUERECT 0x00000100
-#define GCAPS_VECTORFONT 0x00000200
-#define GCAPS_MONO_DITHER 0x00000400
-#define GCAPS_ASYNCCHANGE 0x00000800
-#define GCAPS_ASYNCMOVE 0x00001000
-#define GCAPS_DONTJOURNAL 0x00002000
-#define GCAPS_DIRECTDRAW 0x00004000
-#define GCAPS_ARBRUSHOPAQUE 0x00008000
-#define GCAPS_PANNING 0x00010000
-#define GCAPS_HIGHRESTEXT 0x00040000
-#define GCAPS_PALMANAGED 0x00080000
-#define GCAPS_DITHERONREALIZE 0x00200000
-#define GCAPS_NO64BITMEMACCESS 0x00400000
-#define GCAPS_FORCEDITHER 0x00800000
-#define GCAPS_GRAY16 0x01000000
-#define GCAPS_ICM 0x02000000
-#define GCAPS_CMYKCOLOR 0x04000000
-#define GCAPS_LAYERED 0x08000000
-#define GCAPS_ARBRUSHTEXT 0x10000000
-#define GCAPS_SCREENPRECISION 0x20000000
-#define GCAPS_FONT_RASTERIZER 0x40000000
-#define GCAPS_NUP 0x80000000
-
-/* DEVINFO.iDitherFormat constants */
-#define BMF_1BPP 1L
-#define BMF_4BPP 2L
-#define BMF_8BPP 3L
-#define BMF_16BPP 4L
-#define BMF_24BPP 5L
-#define BMF_32BPP 6L
-#define BMF_4RLE 7L
-#define BMF_8RLE 8L
-#define BMF_JPEG 9L
-#define BMF_PNG 10L
-
-/* DEVINFO.flGraphicsCaps2 flags */
-#define GCAPS2_JPEGSRC 0x00000001
-#define GCAPS2_xxxx 0x00000002
-#define GCAPS2_PNGSRC 0x00000008
-#define GCAPS2_CHANGEGAMMARAMP 0x00000010
-#define GCAPS2_ALPHACURSOR 0x00000020
-#define GCAPS2_SYNCFLUSH 0x00000040
-#define GCAPS2_SYNCTIMER 0x00000080
-#define GCAPS2_ICD_MULTIMON 0x00000100
-#define GCAPS2_MOUSETRAILS 0x00000200
-#define GCAPS2_RESERVED1 0x00000400
-
-typedef struct _DEVINFO {
- FLONG flGraphicsCaps;
- LOGFONTW lfDefaultFont;
- LOGFONTW lfAnsiVarFont;
- LOGFONTW lfAnsiFixFont;
- ULONG cFonts;
- ULONG iDitherFormat;
- USHORT cxDither;
- USHORT cyDither;
- HPALETTE hpalDefault;
- FLONG flGraphicsCaps2;
-} DEVINFO, *PDEVINFO;
-
-typedef struct _DRIVEROBJ *PDRIVEROBJ;
-
-typedef BOOL DDKAPI CALLBACK
-(*FREEOBJPROC)(
- /*IN*/ PDRIVEROBJ pDriverObj);
-
-typedef struct _DRIVEROBJ {
- PVOID pvObj;
- FREEOBJPROC pFreeProc;
- HDEV hdev;
- DHPDEV dhpdev;
-} DRIVEROBJ;
-
-/* DRVFN.iFunc constants */
-#define INDEX_DrvEnablePDEV 0L
-#define INDEX_DrvCompletePDEV 1L
-#define INDEX_DrvDisablePDEV 2L
-#define INDEX_DrvEnableSurface 3L
-#define INDEX_DrvDisableSurface 4L
-#define INDEX_DrvAssertMode 5L
-#define INDEX_DrvOffset 6L
-#define INDEX_DrvResetPDEV 7L
-#define INDEX_DrvDisableDriver 8L
-#define INDEX_DrvCreateDeviceBitmap 10L
-#define INDEX_DrvDeleteDeviceBitmap 11L
-#define INDEX_DrvRealizeBrush 12L
-#define INDEX_DrvDitherColor 13L
-#define INDEX_DrvStrokePath 14L
-#define INDEX_DrvFillPath 15L
-#define INDEX_DrvStrokeAndFillPath 16L
-#define INDEX_DrvPaint 17L
-#define INDEX_DrvBitBlt 18L
-#define INDEX_DrvCopyBits 19L
-#define INDEX_DrvStretchBlt 20L
-#define INDEX_DrvSetPalette 22L
-#define INDEX_DrvTextOut 23L
-#define INDEX_DrvEscape 24L
-#define INDEX_DrvDrawEscape 25L
-#define INDEX_DrvQueryFont 26L
-#define INDEX_DrvQueryFontTree 27L
-#define INDEX_DrvQueryFontData 28L
-#define INDEX_DrvSetPointerShape 29L
-#define INDEX_DrvMovePointer 30L
-#define INDEX_DrvLineTo 31L
-#define INDEX_DrvSendPage 32L
-#define INDEX_DrvStartPage 33L
-#define INDEX_DrvEndDoc 34L
-#define INDEX_DrvStartDoc 35L
-#define INDEX_DrvGetGlyphMode 37L
-#define INDEX_DrvSynchronize 38L
-#define INDEX_DrvSaveScreenBits 40L
-#define INDEX_DrvGetModes 41L
-#define INDEX_DrvFree 42L
-#define INDEX_DrvDestroyFont 43L
-#define INDEX_DrvQueryFontCaps 44L
-#define INDEX_DrvLoadFontFile 45L
-#define INDEX_DrvUnloadFontFile 46L
-#define INDEX_DrvFontManagement 47L
-#define INDEX_DrvQueryTrueTypeTable 48L
-#define INDEX_DrvQueryTrueTypeOutline 49L
-#define INDEX_DrvGetTrueTypeFile 50L
-#define INDEX_DrvQueryFontFile 51L
-#define INDEX_DrvMovePanning 52L
-#define INDEX_DrvQueryAdvanceWidths 53L
-#define INDEX_DrvSetPixelFormat 54L
-#define INDEX_DrvDescribePixelFormat 55L
-#define INDEX_DrvSwapBuffers 56L
-#define INDEX_DrvStartBanding 57L
-#define INDEX_DrvNextBand 58L
-#define INDEX_DrvGetDirectDrawInfo 59L
-#define INDEX_DrvEnableDirectDraw 60L
-#define INDEX_DrvDisableDirectDraw 61L
-#define INDEX_DrvQuerySpoolType 62L
-#define INDEX_DrvIcmCreateColorTransform 64L
-#define INDEX_DrvIcmDeleteColorTransform 65L
-#define INDEX_DrvIcmCheckBitmapBits 66L
-#define INDEX_DrvIcmSetDeviceGammaRamp 67L
-#define INDEX_DrvGradientFill 68L
-#define INDEX_DrvStretchBltROP 69L
-#define INDEX_DrvPlgBlt 70L
-#define INDEX_DrvAlphaBlend 71L
-#define INDEX_DrvSynthesizeFont 72L
-#define INDEX_DrvGetSynthesizedFontFiles 73L
-#define INDEX_DrvTransparentBlt 74L
-#define INDEX_DrvQueryPerBandInfo 75L
-#define INDEX_DrvQueryDeviceSupport 76L
-#define INDEX_DrvReserved1 77L
-#define INDEX_DrvReserved2 78L
-#define INDEX_DrvReserved3 79L
-#define INDEX_DrvReserved4 80L
-#define INDEX_DrvReserved5 81L
-#define INDEX_DrvReserved6 82L
-#define INDEX_DrvReserved7 83L
-#define INDEX_DrvReserved8 84L
-#define INDEX_DrvDeriveSurface 85L
-#define INDEX_DrvQueryGlyphAttrs 86L
-#define INDEX_DrvNotify 87L
-#define INDEX_DrvSynchronizeSurface 88L
-#define INDEX_DrvResetDevice 89L
-#define INDEX_DrvReserved9 90L
-#define INDEX_DrvReserved10 91L
-#define INDEX_DrvReserved11 92L
-#define INDEX_LAST 93L
-
-typedef struct _DRVFN {
- ULONG iFunc;
- PFN pfn;
-} DRVFN, *PDRVFN;
-
-/* DRVENABLEDATA.iDriverVersion constants */
-#define DDI_DRIVER_VERSION_NT4 0x00020000
-#define DDI_DRIVER_VERSION_SP3 0x00020003
-#define DDI_DRIVER_VERSION_NT5 0x00030000
-#define DDI_DRIVER_VERSION_NT5_01 0x00030100
-
-typedef struct _DRVENABLEDATA {
- ULONG iDriverVersion;
- ULONG c;
- DRVFN *pdrvfn;
-} DRVENABLEDATA, *PDRVENABLEDATA;
-
-DECLARE_HANDLE(HSEMAPHORE);
-
-typedef struct {
- DWORD nSize;
- HDC hdc;
- PBYTE pvEMF;
- PBYTE pvCurrentRecord;
-} EMFINFO, *PEMFINFO;
-
-typedef struct _ENGSAFESEMAPHORE {
- HSEMAPHORE hsem;
- LONG lCount;
-} ENGSAFESEMAPHORE;
-
-typedef struct _ENG_TIME_FIELDS {
- USHORT usYear;
- USHORT usMonth;
- USHORT usDay;
- USHORT usHour;
- USHORT usMinute;
- USHORT usSecond;
- USHORT usMilliseconds;
- USHORT usWeekday;
-} ENG_TIME_FIELDS, *PENG_TIME_FIELDS;
-
-typedef struct _ENUMRECTS {
- ULONG c;
- RECTL arcl[1];
-} ENUMRECTS;
-
-typedef struct _FD_XFORM {
- FLOATL eXX;
- FLOATL eXY;
- FLOATL eYX;
- FLOATL eYY;
-} FD_XFORM, *PFD_XFORM;
-
-/* FD_DEVICEMETRICS.flRealizedType constants */
-#define FDM_TYPE_BM_SIDE_CONST 0x00000001
-#define FDM_TYPE_MAXEXT_EQUAL_BM_SIDE 0x00000002
-#define FDM_TYPE_CHAR_INC_EQUAL_BM_BASE 0x00000004
-#define FDM_TYPE_ZERO_BEARINGS 0x00000008
-#define FDM_TYPE_CONST_BEARINGS 0x00000010
-
-typedef struct _FD_DEVICEMETRICS {
- FLONG flRealizedType;
- POINTE pteBase;
- POINTE pteSide;
- LONG lD;
- FIX fxMaxAscender;
- FIX fxMaxDescender;
- POINTL ptlUnderline1;
- POINTL ptlStrikeout;
- POINTL ptlULThickness;
- POINTL ptlSOThickness;
- ULONG cxMax;
- ULONG cyMax;
- ULONG cjGlyphMax;
- FD_XFORM fdxQuantized;
- LONG lNonLinearExtLeading;
- LONG lNonLinearIntLeading;
- LONG lNonLinearMaxCharWidth;
- LONG lNonLinearAvgCharWidth;
- LONG lMinA;
- LONG lMinC;
- LONG lMinD;
- LONG alReserved[1];
-} FD_DEVICEMETRICS, *PFD_DEVICEMETRICS;
-
-/* FD_GLYPHATTR.iMode constants */
-#define FO_ATTR_MODE_ROTATE 1
-
-typedef struct _FD_GLYPHATTR {
- ULONG cjThis;
- ULONG cGlyphs;
- ULONG iMode;
- BYTE aGlyphAttr[1];
-} FD_GLYPHATTR, *PFD_GLYPHATTR;
-
-/* FD_GLYPHSET.flAccel */
-#define GS_UNICODE_HANDLES 0x00000001
-#define GS_8BIT_HANDLES 0x00000002
-#define GS_16BIT_HANDLES 0x00000004
-
-typedef struct _WCRUN {
- WCHAR wcLow;
- USHORT cGlyphs;
- HGLYPH *phg;
-} WCRUN, *PWCRUN;
-
-typedef struct _FD_GLYPHSET {
- ULONG cjThis;
- FLONG flAccel;
- ULONG cGlyphsSupported;
- ULONG cRuns;
- WCRUN awcrun[1];
-} FD_GLYPHSET, *PFD_GLYPHSET;
-
-typedef struct _FD_KERNINGPAIR {
- WCHAR wcFirst;
- WCHAR wcSecond;
- FWORD fwdKern;
-} FD_KERNINGPAIR;
-
-typedef struct _FLOATOBJ
-{
- ULONG ul1;
- ULONG ul2;
-} FLOATOBJ, *PFLOATOBJ;
-
-typedef struct _FLOATOBJ_XFORM {
- FLOATOBJ eM11;
- FLOATOBJ eM12;
- FLOATOBJ eM21;
- FLOATOBJ eM22;
- FLOATOBJ eDx;
- FLOATOBJ eDy;
-} FLOATOBJ_XFORM, *PFLOATOBJ_XFORM, FAR *LPFLOATOBJ_XFORM;
-
-/* FONTDIFF.fsSelection */
-#define FM_SEL_ITALIC 0x0001
-#define FM_SEL_UNDERSCORE 0x0002
-#define FM_SEL_NEGATIVE 0x0004
-#define FM_SEL_OUTLINED 0x0008
-#define FM_SEL_STRIKEOUT 0x0010
-#define FM_SEL_BOLD 0x0020
-#define FM_SEL_REGULAR 0x0040
-
-typedef struct _FONTDIFF {
- BYTE jReserved1;
- BYTE jReserved2;
- BYTE jReserved3;
- BYTE bWeight;
- USHORT usWinWeight;
- FSHORT fsSelection;
- FWORD fwdAveCharWidth;
- FWORD fwdMaxCharInc;
- POINTL ptlCaret;
-} FONTDIFF;
-
-typedef struct _FONTSIM {
- PTRDIFF dpBold;
- PTRDIFF dpItalic;
- PTRDIFF dpBoldItalic;
-} FONTSIM;
-
-/* FONTINFO.flCaps constants */
-#define FO_DEVICE_FONT 1L
-#define FO_OUTLINE_CAPABLE 2L
-
-typedef struct _FONTINFO {
- ULONG cjThis;
- FLONG flCaps;
- ULONG cGlyphsSupported;
- ULONG cjMaxGlyph1;
- ULONG cjMaxGlyph4;
- ULONG cjMaxGlyph8;
- ULONG cjMaxGlyph32;
-} FONTINFO, *PFONTINFO;
-
-/* FONTOBJ.flFontType constants */
-#define FO_TYPE_RASTER RASTER_FONTTYPE
-#define FO_TYPE_DEVICE DEVICE_FONTTYPE
-#define FO_TYPE_TRUETYPE TRUETYPE_FONTTYPE
-#define FO_TYPE_OPENTYPE OPENTYPE_FONTTYPE
-
-#define FO_SIM_BOLD 0x00002000
-#define FO_SIM_ITALIC 0x00004000
-#define FO_EM_HEIGHT 0x00008000
-#define FO_GRAY16 0x00010000
-#define FO_NOGRAY16 0x00020000
-#define FO_NOHINTS 0x00040000
-#define FO_NO_CHOICE 0x00080000
-#define FO_CFF 0x00100000
-#define FO_POSTSCRIPT 0x00200000
-#define FO_MULTIPLEMASTER 0x00400000
-#define FO_VERT_FACE 0x00800000
-#define FO_DBCS_FONT 0X01000000
-#define FO_NOCLEARTYPE 0x02000000
-#define FO_CLEARTYPE_X 0x10000000
-#define FO_CLEARTYPE_Y 0x20000000
-
-typedef struct _FONTOBJ {
- ULONG iUniq;
- ULONG iFace;
- ULONG cxMax;
- FLONG flFontType;
- ULONG_PTR iTTUniq;
- ULONG_PTR iFile;
- SIZE sizLogResPpi;
- ULONG ulStyleSize;
- PVOID pvConsumer;
- PVOID pvProducer;
-} FONTOBJ;
-
-typedef struct _GAMMARAMP {
- WORD Red[256];
- WORD Green[256];
- WORD Blue[256];
-} GAMMARAMP, *PGAMMARAMP;
-
-/* GDIINFO.ulPrimaryOrder constants */
-#define PRIMARY_ORDER_ABC 0
-#define PRIMARY_ORDER_ACB 1
-#define PRIMARY_ORDER_BAC 2
-#define PRIMARY_ORDER_BCA 3
-#define PRIMARY_ORDER_CBA 4
-#define PRIMARY_ORDER_CAB 5
-
-/* GDIINFO.ulHTPatternSize constants */
-#define HT_PATSIZE_2x2 0
-#define HT_PATSIZE_2x2_M 1
-#define HT_PATSIZE_4x4 2
-#define HT_PATSIZE_4x4_M 3
-#define HT_PATSIZE_6x6 4
-#define HT_PATSIZE_6x6_M 5
-#define HT_PATSIZE_8x8 6
-#define HT_PATSIZE_8x8_M 7
-#define HT_PATSIZE_10x10 8
-#define HT_PATSIZE_10x10_M 9
-#define HT_PATSIZE_12x12 10
-#define HT_PATSIZE_12x12_M 11
-#define HT_PATSIZE_14x14 12
-#define HT_PATSIZE_14x14_M 13
-#define HT_PATSIZE_16x16 14
-#define HT_PATSIZE_16x16_M 15
-#define HT_PATSIZE_SUPERCELL 16
-#define HT_PATSIZE_SUPERCELL_M 17
-#define HT_PATSIZE_USER 18
-#define HT_PATSIZE_MAX_INDEX HT_PATSIZE_USER
-#define HT_PATSIZE_DEFAULT HT_PATSIZE_SUPERCELL_M
-#define HT_USERPAT_CX_MIN 4
-#define HT_USERPAT_CX_MAX 256
-#define HT_USERPAT_CY_MIN 4
-#define HT_USERPAT_CY_MAX 256
-
-/* GDIINFO.ulHTOutputFormat constants */
-#define HT_FORMAT_1BPP 0
-#define HT_FORMAT_4BPP 2
-#define HT_FORMAT_4BPP_IRGB 3
-#define HT_FORMAT_8BPP 4
-#define HT_FORMAT_16BPP 5
-#define HT_FORMAT_24BPP 6
-#define HT_FORMAT_32BPP 7
-
-/* GDIINFO.flHTFlags */
-#define HT_FLAG_SQUARE_DEVICE_PEL 0x00000001
-#define HT_FLAG_HAS_BLACK_DYE 0x00000002
-#define HT_FLAG_ADDITIVE_PRIMS 0x00000004
-#define HT_FLAG_USE_8BPP_BITMASK 0x00000008
-#define HT_FLAG_INK_HIGH_ABSORPTION 0x00000010
-#define HT_FLAG_INK_ABSORPTION_INDICES 0x00000060
-#define HT_FLAG_DO_DEVCLR_XFORM 0x00000080
-#define HT_FLAG_OUTPUT_CMY 0x00000100
-#define HT_FLAG_PRINT_DRAFT_MODE 0x00000200
-#define HT_FLAG_INVERT_8BPP_BITMASK_IDX 0x00000400
-#define HT_FLAG_8BPP_CMY332_MASK 0xFF000000
-
-#define MAKE_CMYMASK_BYTE(c,m,y) ((BYTE)(((BYTE)(c) & 0x07) << 5) \
- |(BYTE)(((BYTE)(m) & 0x07) << 2) \
- |(BYTE)((BYTE)(y) & 0x03))
-
-#define MAKE_CMY332_MASK(c,m,y) ((DWORD)(((DWORD)(c) & 0x07) << 29)\
- |(DWORD)(((DWORD)(m) & 0x07) << 26)\
- |(DWORD)(((DWORD)(y) & 0x03) << 24))
-
-/* GDIINFO.flHTFlags constants */
-#define HT_FLAG_INK_ABSORPTION_IDX0 0x00000000
-#define HT_FLAG_INK_ABSORPTION_IDX1 0x00000020
-#define HT_FLAG_INK_ABSORPTION_IDX2 0x00000040
-#define HT_FLAG_INK_ABSORPTION_IDX3 0x00000060
-
-#define HT_FLAG_HIGHEST_INK_ABSORPTION (HT_FLAG_INK_HIGH_ABSORPTION \
- |HT_FLAG_INK_ABSORPTION_IDX3)
-#define HT_FLAG_HIGHER_INK_ABSORPTION (HT_FLAG_INK_HIGH_ABSORPTION \
- |HT_FLAG_INK_ABSORPTION_IDX2)
-#define HT_FLAG_HIGH_INK_ABSORPTION (HT_FLAG_INK_HIGH_ABSORPTION \
- |HT_FLAG_INK_ABSORPTION_IDX1)
-#define HT_FLAG_NORMAL_INK_ABSORPTION HT_FLAG_INK_ABSORPTION_IDX0
-#define HT_FLAG_LOW_INK_ABSORPTION HT_FLAG_INK_ABSORPTION_IDX1
-#define HT_FLAG_LOWER_INK_ABSORPTION HT_FLAG_INK_ABSORPTION_IDX2
-#define HT_FLAG_LOWEST_INK_ABSORPTION HT_FLAG_INK_ABSORPTION_IDX3
-
-#define HT_BITMASKPALRGB (DWORD)'0BGR'
-#define HT_SET_BITMASKPAL2RGB(pPal) (*((LPDWORD)(pPal)) = HT_BITMASKPALRGB)
-#define HT_IS_BITMASKPALRGB(pPal) (*((LPDWORD)(pPal)) == (DWORD)0)
-
-/* GDIINFO.ulPhysicalPixelCharacteristics constants */
-#define PPC_DEFAULT 0x0
-#define PPC_UNDEFINED 0x1
-#define PPC_RGB_ORDER_VERTICAL_STRIPES 0x2
-#define PPC_BGR_ORDER_VERTICAL_STRIPES 0x3
-#define PPC_RGB_ORDER_HORIZONTAL_STRIPES 0x4
-#define PPC_BGR_ORDER_HORIZONTAL_STRIPES 0x5
-
-#define PPG_DEFAULT 0
-#define PPG_SRGB 1
-
-typedef struct _GDIINFO {
- ULONG ulVersion;
- ULONG ulTechnology;
- ULONG ulHorzSize;
- ULONG ulVertSize;
- ULONG ulHorzRes;
- ULONG ulVertRes;
- ULONG cBitsPixel;
- ULONG cPlanes;
- ULONG ulNumColors;
- ULONG flRaster;
- ULONG ulLogPixelsX;
- ULONG ulLogPixelsY;
- ULONG flTextCaps;
- ULONG ulDACRed;
- ULONG ulDACGreen;
- ULONG ulDACBlue;
- ULONG ulAspectX;
- ULONG ulAspectY;
- ULONG ulAspectXY;
- LONG xStyleStep;
- LONG yStyleStep;
- LONG denStyleStep;
- POINTL ptlPhysOffset;
- SIZEL szlPhysSize;
- ULONG ulNumPalReg;
- COLORINFO ciDevice;
- ULONG ulDevicePelsDPI;
- ULONG ulPrimaryOrder;
- ULONG ulHTPatternSize;
- ULONG ulHTOutputFormat;
- ULONG flHTFlags;
- ULONG ulVRefresh;
- ULONG ulBltAlignment;
- ULONG ulPanningHorzRes;
- ULONG ulPanningVertRes;
- ULONG xPanningAlignment;
- ULONG yPanningAlignment;
- ULONG cxHTPat;
- ULONG cyHTPat;
- LPBYTE pHTPatA;
- LPBYTE pHTPatB;
- LPBYTE pHTPatC;
- ULONG flShadeBlend;
- ULONG ulPhysicalPixelCharacteristics;
- ULONG ulPhysicalPixelGamma;
-} GDIINFO, *PGDIINFO;
-
-/* PATHDATA.flags constants */
-#define PD_BEGINSUBPATH 0x00000001
-#define PD_ENDSUBPATH 0x00000002
-#define PD_RESETSTYLE 0x00000004
-#define PD_CLOSEFIGURE 0x00000008
-#define PD_BEZIERS 0x00000010
-#define PD_ALL (PD_BEGINSUBPATH \
- |PD_ENDSUBPATH \
- |PD_RESETSTYLE \
- |PD_CLOSEFIGURE \
- PD_BEZIERS)
-
-typedef struct _PATHDATA {
- FLONG flags;
- ULONG count;
- POINTFIX *glypptfx;
-} PATHDATA, *PPATHDATA;
-
-/* PATHOBJ.fl constants */
-#define PO_BEZIERS 0x00000001
-#define PO_ELLIPSE 0x00000002
-#define PO_ALL_INTEGERS 0x00000004
-#define PO_ENUM_AS_INTEGERS 0x00000008
-
-typedef struct _PATHOBJ {
- FLONG fl;
- ULONG cCurves;
-} PATHOBJ;
-
-typedef struct _GLYPHBITS {
- POINTL ptlOrigin;
- SIZEL sizlBitmap;
- BYTE aj[1];
-} GLYPHBITS;
-
-typedef union _GLYPHDEF {
- GLYPHBITS *pgb;
- PATHOBJ *ppo;
-} GLYPHDEF;
-
-typedef struct _GLYPHPOS {
- HGLYPH hg;
- GLYPHDEF *pgdf;
- POINTL ptl;
-} GLYPHPOS, *PGLYPHPOS;
-
-typedef struct _GLYPHDATA {
- GLYPHDEF gdf;
- HGLYPH hg;
- FIX fxD;
- FIX fxA;
- FIX fxAB;
- FIX fxInkTop;
- FIX fxInkBottom;
- RECTL rclInk;
- POINTQF ptqD;
-} GLYPHDATA;
-
-typedef struct _IFIEXTRA {
- ULONG ulIdentifier;
- PTRDIFF dpFontSig;
- ULONG cig;
- PTRDIFF dpDesignVector;
- PTRDIFF dpAxesInfoW;
- ULONG aulReserved[1];
-} IFIEXTRA, *PIFIEXTRA;
-
-/* IFIMETRICS constants */
-
-#define FM_VERSION_NUMBER 0x0
-
-/* IFIMETRICS.fsType constants */
-#define FM_TYPE_LICENSED 0x2
-#define FM_READONLY_EMBED 0x4
-#define FM_EDITABLE_EMBED 0x8
-#define FM_NO_EMBEDDING FM_TYPE_LICENSED
-
-/* IFIMETRICS.flInfo constants */
-#define FM_INFO_TECH_TRUETYPE 0x00000001
-#define FM_INFO_TECH_BITMAP 0x00000002
-#define FM_INFO_TECH_STROKE 0x00000004
-#define FM_INFO_TECH_OUTLINE_NOT_TRUETYPE 0x00000008
-#define FM_INFO_ARB_XFORMS 0x00000010
-#define FM_INFO_1BPP 0x00000020
-#define FM_INFO_4BPP 0x00000040
-#define FM_INFO_8BPP 0x00000080
-#define FM_INFO_16BPP 0x00000100
-#define FM_INFO_24BPP 0x00000200
-#define FM_INFO_32BPP 0x00000400
-#define FM_INFO_INTEGER_WIDTH 0x00000800
-#define FM_INFO_CONSTANT_WIDTH 0x00001000
-#define FM_INFO_NOT_CONTIGUOUS 0x00002000
-#define FM_INFO_TECH_MM 0x00004000
-#define FM_INFO_RETURNS_OUTLINES 0x00008000
-#define FM_INFO_RETURNS_STROKES 0x00010000
-#define FM_INFO_RETURNS_BITMAPS 0x00020000
-#define FM_INFO_DSIG 0x00040000
-#define FM_INFO_RIGHT_HANDED 0x00080000
-#define FM_INFO_INTEGRAL_SCALING 0x00100000
-#define FM_INFO_90DEGREE_ROTATIONS 0x00200000
-#define FM_INFO_OPTICALLY_FIXED_PITCH 0x00400000
-#define FM_INFO_DO_NOT_ENUMERATE 0x00800000
-#define FM_INFO_ISOTROPIC_SCALING_ONLY 0x01000000
-#define FM_INFO_ANISOTROPIC_SCALING_ONLY 0x02000000
-#define FM_INFO_TECH_CFF 0x04000000
-#define FM_INFO_FAMILY_EQUIV 0x08000000
-#define FM_INFO_DBCS_FIXED_PITCH 0x10000000
-#define FM_INFO_NONNEGATIVE_AC 0x20000000
-#define FM_INFO_IGNORE_TC_RA_ABLE 0x40000000
-#define FM_INFO_TECH_TYPE1 0x80000000
-
-#define MAXCHARSETS 16
-
-/* IFIMETRICS.ulPanoseCulture constants */
-#define FM_PANOSE_CULTURE_LATIN 0x0
-
-typedef struct _IFIMETRICS {
- ULONG cjThis;
- ULONG cjIfiExtra;
- PTRDIFF dpwszFamilyName;
- PTRDIFF dpwszStyleName;
- PTRDIFF dpwszFaceName;
- PTRDIFF dpwszUniqueName;
- PTRDIFF dpFontSim;
- LONG lEmbedId;
- LONG lItalicAngle;
- LONG lCharBias;
- PTRDIFF dpCharSets;
- BYTE jWinCharSet;
- BYTE jWinPitchAndFamily;
- USHORT usWinWeight;
- ULONG flInfo;
- USHORT fsSelection;
- USHORT fsType;
- FWORD fwdUnitsPerEm;
- FWORD fwdLowestPPEm;
- FWORD fwdWinAscender;
- FWORD fwdWinDescender;
- FWORD fwdMacAscender;
- FWORD fwdMacDescender;
- FWORD fwdMacLineGap;
- FWORD fwdTypoAscender;
- FWORD fwdTypoDescender;
- FWORD fwdTypoLineGap;
- FWORD fwdAveCharWidth;
- FWORD fwdMaxCharInc;
- FWORD fwdCapHeight;
- FWORD fwdXHeight;
- FWORD fwdSubscriptXSize;
- FWORD fwdSubscriptYSize;
- FWORD fwdSubscriptXOffset;
- FWORD fwdSubscriptYOffset;
- FWORD fwdSuperscriptXSize;
- FWORD fwdSuperscriptYSize;
- FWORD fwdSuperscriptXOffset;
- FWORD fwdSuperscriptYOffset;
- FWORD fwdUnderscoreSize;
- FWORD fwdUnderscorePosition;
- FWORD fwdStrikeoutSize;
- FWORD fwdStrikeoutPosition;
- BYTE chFirstChar;
- BYTE chLastChar;
- BYTE chDefaultChar;
- BYTE chBreakChar;
- WCHAR wcFirstChar;
- WCHAR wcLastChar;
- WCHAR wcDefaultChar;
- WCHAR wcBreakChar;
- POINTL ptlBaseline;
- POINTL ptlAspect;
- POINTL ptlCaret;
- RECTL rclFontBox;
- BYTE achVendId[4];
- ULONG cKerningPairs;
- ULONG ulPanoseCulture;
- PANOSE panose;
-#if defined(_WIN64)
- PVOID Align;
-#endif
-} IFIMETRICS, *PIFIMETRICS;
-
-/* LINEATTRS.fl */
-#define LA_GEOMETRIC 0x00000001
-#define LA_ALTERNATE 0x00000002
-#define LA_STARTGAP 0x00000004
-#define LA_STYLED 0x00000008
-
-/* LINEATTRS.iJoin */
-#define JOIN_ROUND 0L
-#define JOIN_BEVEL 1L
-#define JOIN_MITER 2L
-
-/* LINEATTRS.iEndCap */
-#define ENDCAP_ROUND 0L
-#define ENDCAP_SQUARE 1L
-#define ENDCAP_BUTT 2L
-
-typedef struct _LINEATTRS {
- FLONG fl;
- ULONG iJoin;
- ULONG iEndCap;
- FLOAT_LONG elWidth;
- FLOATL eMiterLimit;
- ULONG cstyle;
- PFLOAT_LONG pstyle;
- FLOAT_LONG elStyleState;
-} LINEATTRS, *PLINEATTRS;
-
-typedef struct _PALOBJ {
- ULONG ulReserved;
-} PALOBJ;
-
-typedef struct _PERBANDINFO {
- BOOL bRepeatThisBand;
- SIZEL szlBand;
- ULONG ulHorzRes;
- ULONG ulVertRes;
-} PERBANDINFO, *PPERBANDINFO;
-
-/* STROBJ.flAccel constants */
-#define SO_FLAG_DEFAULT_PLACEMENT 0x00000001
-#define SO_HORIZONTAL 0x00000002
-#define SO_VERTICAL 0x00000004
-#define SO_REVERSED 0x00000008
-#define SO_ZERO_BEARINGS 0x00000010
-#define SO_CHAR_INC_EQUAL_BM_BASE 0x00000020
-#define SO_MAXEXT_EQUAL_BM_SIDE 0x00000040
-#define SO_DO_NOT_SUBSTITUTE_DEVICE_FONT 0x00000080
-#define SO_GLYPHINDEX_TEXTOUT 0x00000100
-#define SO_ESC_NOT_ORIENT 0x00000200
-#define SO_DXDY 0x00000400
-#define SO_CHARACTER_EXTRA 0x00000800
-#define SO_BREAK_EXTRA 0x00001000
-
-typedef struct _STROBJ {
- ULONG cGlyphs;
- FLONG flAccel;
- ULONG ulCharInc;
- RECTL rclBkGround;
- GLYPHPOS *pgp;
- LPWSTR pwszOrg;
-} STROBJ;
-
-typedef struct _SURFACEALIGNMENT {
- union {
- struct {
- DWORD dwStartAlignment;
- DWORD dwPitchAlignment;
- DWORD dwReserved1;
- DWORD dwReserved2;
- } Linear;
- struct {
- DWORD dwXAlignment;
- DWORD dwYAlignment;
- DWORD dwReserved1;
- DWORD dwReserved2;
- } Rectangular;
- };
-} SURFACEALIGNMENT, *LPSURFACEALIGNMENT;
-
-/* SURFOBJ.iType constants */
-#define STYPE_BITMAP 0L
-#define STYPE_DEVICE 1L
-#define STYPE_DEVBITMAP 3L
-
-/* SURFOBJ.fjBitmap constants */
-#define BMF_TOPDOWN 0x0001
-#define BMF_NOZEROINIT 0x0002
-#define BMF_DONTCACHE 0x0004
-#define BMF_USERMEM 0x0008
-#define BMF_KMSECTION 0x0010
-#define BMF_NOTSYSMEM 0x0020
-#define BMF_WINDOW_BLT 0x0040
-#define BMF_UMPDMEM 0x0080
-#define BMF_RESERVED 0xFF00
-
-typedef struct _SURFOBJ {
- DHSURF dhsurf;
- HSURF hsurf;
- DHPDEV dhpdev;
- HDEV hdev;
- SIZEL sizlBitmap;
- ULONG cjBits;
- PVOID pvBits;
- PVOID pvScan0;
- LONG lDelta;
- ULONG iUniq;
- ULONG iBitmapFormat;
- USHORT iType;
- USHORT fjBitmap;
-} SURFOBJ;
-
-typedef struct _TYPE1_FONT {
- HANDLE hPFM;
- HANDLE hPFB;
- ULONG ulIdentifier;
-} TYPE1_FONT;
-
-typedef struct _WNDOBJ {
- CLIPOBJ coClient;
- PVOID pvConsumer;
- RECTL rclClient;
- SURFOBJ *psoOwner;
-} WNDOBJ, *PWNDOBJ;
-
-typedef struct _XFORML {
- FLOATL eM11;
- FLOATL eM12;
- FLOATL eM21;
- FLOATL eM22;
- FLOATL eDx;
- FLOATL eDy;
-} XFORML, *PXFORML;
-
-typedef struct _XFORMOBJ {
- ULONG ulReserved;
-} XFORMOBJ;
-
-/* XLATEOBJ.flXlate constants */
-#define XO_TRIVIAL 0x00000001
-#define XO_TABLE 0x00000002
-#define XO_TO_MONO 0x00000004
-#define XO_FROM_CMYK 0x00000008
-#define XO_DEVICE_ICM 0x00000010
-#define XO_HOST_ICM 0x00000020
-
-typedef struct _XLATEOBJ {
- ULONG iUniq;
- FLONG flXlate;
- USHORT iSrcType;
- USHORT iDstType;
- ULONG cEntries;
- ULONG *pulXlate;
-} XLATEOBJ;
-
-typedef VOID DDKAPI (CALLBACK *WNDOBJCHANGEPROC)(
- /*IN*/ WNDOBJ *pwo,
- /*IN*/ FLONG fl);
-
-
-WIN32KAPI
-HANDLE
-DDKAPI
-BRUSHOBJ_hGetColorTransform(
- /*IN*/ BRUSHOBJ *pbo);
-
-WIN32KAPI
-PVOID
-DDKAPI
-BRUSHOBJ_pvAllocRbrush(
- /*IN*/ BRUSHOBJ *pbo,
- /*IN*/ ULONG cj);
-
-WIN32KAPI
-PVOID
-DDKAPI
-BRUSHOBJ_pvGetRbrush(
- /*IN*/ BRUSHOBJ *pbo);
-
-WIN32KAPI
-ULONG
-DDKAPI
-BRUSHOBJ_ulGetBrushColor(
- /*IN*/ BRUSHOBJ *pbo);
-
-WIN32KAPI
-BOOL
-DDKAPI
-CLIPOBJ_bEnum(
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ ULONG cj,
-
- /*OUT*/ ULONG *pv);
-
-/* CLIPOBJ_cEnumStart.iType constants */
-#define CT_RECTANGLES 0L
-
-/* CLIPOBJ_cEnumStart.iDirection constants */
-#define CD_RIGHTDOWN 0x00000000
-#define CD_LEFTDOWN 0x00000001
-#define CD_LEFTWARDS 0x00000001
-#define CD_RIGHTUP 0x00000002
-#define CD_UPWARDS 0x00000002
-#define CD_LEFTUP 0x00000003
-#define CD_ANY 0x00000004
-
-WIN32KAPI
-ULONG
-DDKAPI
-CLIPOBJ_cEnumStart(
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ BOOL bAll,
- /*IN*/ ULONG iType,
- /*IN*/ ULONG iDirection,
- /*IN*/ ULONG cLimit);
-
-WIN32KAPI
-PATHOBJ*
-DDKAPI
-CLIPOBJ_ppoGetPath(
- /*IN*/ CLIPOBJ *pco);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngAcquireSemaphore(
- /*IN*/ HSEMAPHORE hsem);
-
-#define FL_ZERO_MEMORY 0x00000001
-#define FL_NONPAGED_MEMORY 0x00000002
-
-WIN32KAPI
-PVOID
-DDKAPI
-EngAllocMem(
- /*IN*/ ULONG Flags,
- /*IN*/ ULONG MemSize,
- /*IN*/ ULONG Tag);
-
-WIN32KAPI
-PVOID
-DDKAPI
-EngAllocPrivateUserMem(
- /*IN*/ PDD_SURFACE_LOCAL psl,
- /*IN*/ SIZE_T cj,
- /*IN*/ ULONG tag);
-
-WIN32KAPI
-PVOID
-DDKAPI
-EngAllocUserMem(
- /*IN*/ SIZE_T cj,
- /*IN*/ ULONG tag);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngAlphaBlend(
- /*IN*/ SURFOBJ *psoDest,
- /*IN*/ SURFOBJ *psoSrc,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ RECTL *prclDest,
- /*IN*/ RECTL *prclSrc,
- /*IN*/ BLENDOBJ *pBlendObj);
-
-/* EngAssociateSurface.flHooks constants */
-#define HOOK_BITBLT 0x00000001
-#define HOOK_STRETCHBLT 0x00000002
-#define HOOK_PLGBLT 0x00000004
-#define HOOK_TEXTOUT 0x00000008
-#define HOOK_PAINT 0x00000010
-#define HOOK_STROKEPATH 0x00000020
-#define HOOK_FILLPATH 0x00000040
-#define HOOK_STROKEANDFILLPATH 0x00000080
-#define HOOK_LINETO 0x00000100
-#define HOOK_COPYBITS 0x00000400
-#define HOOK_MOVEPANNING 0x00000800
-#define HOOK_SYNCHRONIZE 0x00001000
-#define HOOK_STRETCHBLTROP 0x00002000
-#define HOOK_SYNCHRONIZEACCESS 0x00004000
-#define HOOK_TRANSPARENTBLT 0x00008000
-#define HOOK_ALPHABLEND 0x00010000
-#define HOOK_GRADIENTFILL 0x00020000
-#define HOOK_FLAGS 0x0003b5ff
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngAssociateSurface(
- /*IN*/ HSURF hsurf,
- /*IN*/ HDEV hdev,
- /*IN*/ FLONG flHooks);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngBitBlt(
- /*IN*/ SURFOBJ *psoTrg,
- /*IN*/ SURFOBJ *psoSrc,
- /*IN*/ SURFOBJ *psoMask,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ RECTL *prclTrg,
- /*IN*/ POINTL *pptlSrc,
- /*IN*/ POINTL *pptlMask,
- /*IN*/ BRUSHOBJ *pbo,
- /*IN*/ POINTL *pptlBrush,
- /*IN*/ ROP4 rop4);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngCheckAbort(
- /*IN*/ SURFOBJ *pso);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngClearEvent(
- /*IN*/ PEVENT pEvent);
-
-WIN32KAPI
-FD_GLYPHSET*
-DDKAPI
-EngComputeGlyphSet(
- /*IN*/ INT nCodePage,
- /*IN*/ INT nFirstChar,
- /*IN*/ INT cChars);
-
-/* EngControlSprites.fl constants */
-#define ECS_TEARDOWN 0x00000001
-#define ECS_REDRAW 0x00000002
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngControlSprites(
- /*IN*/ WNDOBJ *pwo,
- /*IN*/ FLONG fl);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngCopyBits(
-
- /*OUT*/ SURFOBJ *psoDest,
- /*IN*/ SURFOBJ *psoSrc,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ RECTL *prclDest,
- /*IN*/ POINTL *pptlSrc);
-
-WIN32KAPI
-HBITMAP
-DDKAPI
-EngCreateBitmap(
- /*IN*/ SIZEL sizl,
- /*IN*/ LONG lWidth,
- /*IN*/ ULONG iFormat,
- /*IN*/ FLONG fl,
- /*IN*/ PVOID pvBits);
-
-WIN32KAPI
-CLIPOBJ*
-DDKAPI
-EngCreateClip(
- VOID);
-
-WIN32KAPI
-HBITMAP
-DDKAPI
-EngCreateDeviceBitmap(
- /*IN*/ DHSURF dhsurf,
- /*IN*/ SIZEL sizl,
- /*IN*/ ULONG iFormatCompat);
-
-WIN32KAPI
-HSURF
-DDKAPI
-EngCreateDeviceSurface(
- DHSURF dhsurf,
- SIZEL sizl,
- ULONG iFormatCompat);
-
-#if 0
-WIN32KAPI
-HDRVOBJ
-DDKAPI
-EngCreateDriverObj(
- PVOID pvObj,
- FREEOBJPROC pFreeObjProc,
- HDEV hdev);
-#endif
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngCreateEvent(
-
- /*OUT*/ PEVENT *ppEvent);
-
-/* EngCreatePalette.iMode constants */
-#define PAL_INDEXED 0x00000001
-#define PAL_BITFIELDS 0x00000002
-#define PAL_RGB 0x00000004
-#define PAL_BGR 0x00000008
-#define PAL_CMYK 0x00000010
-
-WIN32KAPI
-HPALETTE
-DDKAPI
-EngCreatePalette(
- /*IN*/ ULONG iMode,
- /*IN*/ ULONG cColors,
- /*IN*/ ULONG *pulColors,
- /*IN*/ FLONG flRed,
- /*IN*/ FLONG flGreen,
- /*IN*/ FLONG flBlue);
-
-WIN32KAPI
-PATHOBJ*
-DDKAPI
-EngCreatePath(
- VOID);
-
-WIN32KAPI
-HSEMAPHORE
-DDKAPI
-EngCreateSemaphore(
- VOID);
-
-/* EngCreateWnd.fl constants */
-#define WO_RGN_CLIENT_DELTA 0x00000001
-#define WO_RGN_CLIENT 0x00000002
-#define WO_RGN_SURFACE_DELTA 0x00000004
-#define WO_RGN_SURFACE 0x00000008
-#define WO_RGN_UPDATE_ALL 0x00000010
-#define WO_RGN_WINDOW 0x00000020
-#define WO_DRAW_NOTIFY 0x00000040
-#define WO_SPRITE_NOTIFY 0x00000080
-#define WO_RGN_DESKTOP_COORD 0x00000100
-
-WIN32KAPI
-WNDOBJ*
-DDKAPI
-EngCreateWnd(
- SURFOBJ *pso,
- HWND hwnd,
- WNDOBJCHANGEPROC pfn,
- FLONG fl,
- int iPixelFormat);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngDebugBreak(
- VOID);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngDebugPrint(
- /*IN*/ PCHAR StandardPrefix,
- /*IN*/ PCHAR DebugMessage,
- /*IN*/ va_list ap);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngDeleteClip(
- /*IN*/ CLIPOBJ *pco);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngDeleteDriverObj(
- /*IN*/ HDRVOBJ hdo,
- /*IN*/ BOOL bCallBack,
- /*IN*/ BOOL bLocked);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngDeleteEvent(
- /*IN*/ PEVENT pEvent);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngDeleteFile(
- /*IN*/ LPWSTR pwszFileName);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngDeletePalette(
- /*IN*/ HPALETTE hpal);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngDeletePath(
- /*IN*/ PATHOBJ *ppo);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngDeleteSafeSemaphore(
- /*IN OUT*/ ENGSAFESEMAPHORE *pssem);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngDeleteSemaphore(
- /*IN OUT*/ HSEMAPHORE hsem);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngDeleteSurface(
- /*IN*/ HSURF hsurf);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngDeleteWnd(
- /*IN*/ WNDOBJ *pwo);
-
-WIN32KAPI
-DWORD
-DDKAPI
-EngDeviceIoControl(
- /*IN*/ HANDLE hDevice,
- /*IN*/ DWORD dwIoControlCode,
- /*IN*/ LPVOID lpInBuffer,
- /*IN*/ DWORD nInBufferSize,
- /*IN OUT*/ LPVOID lpOutBuffer,
- /*IN*/ DWORD nOutBufferSize,
-
- /*OUT*/ LPDWORD lpBytesReturned);
-
-WIN32KAPI
-ULONG
-DDKAPI
-EngDitherColor(
- /*IN*/ HDEV hdev,
- /*IN*/ ULONG iMode,
- /*IN*/ ULONG rgb,
-
- /*OUT*/ ULONG *pul);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngEnumForms(
- /*IN*/ HANDLE hPrinter,
- /*IN*/ DWORD Level,
-
- /*OUT*/ LPBYTE pForm,
- /*IN*/ DWORD cbBuf,
-
- /*OUT*/ LPDWORD pcbNeeded,
-
- /*OUT*/ LPDWORD pcReturned);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngEraseSurface(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ RECTL *prcl,
- /*IN*/ ULONG iColor);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngFillPath(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ PATHOBJ *ppo,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ BRUSHOBJ *pbo,
- /*IN*/ POINTL *pptlBrushOrg,
- /*IN*/ MIX mix,
- /*IN*/ FLONG flOptions);
-
-WIN32KAPI
-PVOID
-DDKAPI
-EngFindImageProcAddress(
- /*IN*/ HANDLE hModule,
- /*IN*/ LPSTR lpProcName);
-
-WIN32KAPI
-PVOID
-DDKAPI
-EngFindResource(
- /*IN*/ HANDLE h,
- /*IN*/ int iName,
- /*IN*/ int iType,
-
- /*OUT*/ PULONG pulSize);
-
-WIN32KAPI
-PVOID
-DDKAPI
-EngFntCacheAlloc(
- /*IN*/ ULONG FastCheckSum,
- /*IN*/ ULONG ulSize);
-
-/* EngFntCacheFault.iFaultMode constants */
-#define ENG_FNT_CACHE_READ_FAULT 0x00000001
-#define ENG_FNT_CACHE_WRITE_FAULT 0x00000002
-
-WIN32KAPI
-VOID
-DDKAPI
-EngFntCacheFault(
- /*IN*/ ULONG ulFastCheckSum,
- /*IN*/ ULONG iFaultMode);
-
-WIN32KAPI
-PVOID
-DDKAPI
-EngFntCacheLookUp(
- /*IN*/ ULONG FastCheckSum,
-
- /*OUT*/ ULONG *pulSize);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngFreeMem(
- /*IN*/ PVOID Mem);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngFreeModule(
- /*IN*/ HANDLE h);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngFreePrivateUserMem(
- /*IN*/ PDD_SURFACE_LOCAL psl,
- /*IN*/ PVOID pv);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngFreeUserMem(
- /*IN*/ PVOID pv);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngGetCurrentCodePage(
-
- /*OUT*/ PUSHORT OemCodePage,
-
- /*OUT*/ PUSHORT AnsiCodePage);
-
-WIN32KAPI
-HANDLE
-DDKAPI
-EngGetCurrentProcessId(
- VOID);
-
-WIN32KAPI
-HANDLE
-DDKAPI
-EngGetCurrentThreadId(
- VOID);
-
-WIN32KAPI
-LPWSTR
-DDKAPI
-EngGetDriverName(
- /*IN*/ HDEV hdev);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngGetFileChangeTime(
- /*IN*/ HANDLE h,
-
- /*OUT*/ LARGE_INTEGER *pChangeTime);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngGetFilePath(
- /*IN*/ HANDLE h,
-
- /*OUT*/ WCHAR (*pDest)[MAX_PATH+1]);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngGetForm(
- /*IN*/ HANDLE hPrinter,
- /*IN*/ LPWSTR pFormName,
- /*IN*/ DWORD Level,
-
- /*OUT*/ LPBYTE pForm,
- /*IN*/ DWORD cbBuf,
-
- /*OUT*/ LPDWORD pcbNeeded);
-
-WIN32KAPI
-ULONG
-DDKAPI
-EngGetLastError(
- VOID);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngGetPrinter(
- /*IN*/ HANDLE hPrinter,
- /*IN*/ DWORD dwLevel,
-
- /*OUT*/ LPBYTE pPrinter,
- /*IN*/ DWORD cbBuf,
-
- /*OUT*/ LPDWORD pcbNeeded);
-
-WIN32KAPI
-DWORD
-DDKAPI
-EngGetPrinterData(
- /*IN*/ HANDLE hPrinter,
- /*IN*/ LPWSTR pValueName,
-
- /*OUT*/ LPDWORD pType,
-
- /*OUT*/ LPBYTE pData,
- /*IN*/ DWORD nSize,
-
- /*OUT*/ LPDWORD pcbNeeded);
-
-WIN32KAPI
-LPWSTR
-DDKAPI
-EngGetPrinterDataFileName(
- /*IN*/ HDEV hdev);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngGetPrinterDriver(
- /*IN*/ HANDLE hPrinter,
- /*IN*/ LPWSTR pEnvironment,
- /*IN*/ DWORD dwLevel,
-
- /*OUT*/ BYTE *lpbDrvInfo,
- /*IN*/ DWORD cbBuf,
-
- /*OUT*/ DWORD *pcbNeeded);
-
-WIN32KAPI
-HANDLE
-DDKAPI
-EngGetProcessHandle(
- VOID);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngGetType1FontList(
- /*IN*/ HDEV hdev,
-
- /*OUT*/ TYPE1_FONT *pType1Buffer,
- /*IN*/ ULONG cjType1Buffer,
-
- /*OUT*/ PULONG pulLocalFonts,
-
- /*OUT*/ PULONG pulRemoteFonts,
-
- /*OUT*/ LARGE_INTEGER *pLastModified);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngGradientFill(
- /*IN*/ SURFOBJ *psoDest,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ TRIVERTEX *pVertex,
- /*IN*/ ULONG nVertex,
- /*IN*/ PVOID pMesh,
- /*IN*/ ULONG nMesh,
- /*IN*/ RECTL *prclExtents,
- /*IN*/ POINTL *pptlDitherOrg,
- /*IN*/ ULONG ulMode);
-
-/* EngHangNotification return values */
-#define EHN_RESTORED 0x00000000
-#define EHN_ERROR 0x00000001
-
-WIN32KAPI
-ULONG
-DDKAPI
-EngHangNotification(
- /*IN*/ HDEV hDev,
- /*IN*/ PVOID Reserved);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngInitializeSafeSemaphore(
-
- /*OUT*/ ENGSAFESEMAPHORE *pssem);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngIsSemaphoreOwned(
- /*IN*/ HSEMAPHORE hsem);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngIsSemaphoreOwnedByCurrentThread(
- /*IN*/ HSEMAPHORE hsem);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngLineTo(
- SURFOBJ *pso,
- CLIPOBJ *pco,
- BRUSHOBJ *pbo,
- LONG x1,
- LONG y1,
- LONG x2,
- LONG y2,
- RECTL *prclBounds,
- MIX mix);
-
-WIN32KAPI
-HANDLE
-DDKAPI
-EngLoadImage(
- /*IN*/ LPWSTR pwszDriver);
-
-WIN32KAPI
-HANDLE
-DDKAPI
-EngLoadModule(
- /*IN*/ LPWSTR pwsz);
-
-WIN32KAPI
-HANDLE
-DDKAPI
-EngLoadModuleForWrite(
- /*IN*/ LPWSTR pwsz,
- /*IN*/ ULONG cjSizeOfModule);
-
-WIN32KAPI
-PDD_SURFACE_LOCAL
-DDKAPI
-EngLockDirectDrawSurface(
- /*IN*/ HANDLE hSurface);
-
-WIN32KAPI
-DRIVEROBJ*
-DDKAPI
-EngLockDriverObj(
- /*IN*/ HDRVOBJ hdo);
-
-WIN32KAPI
-SURFOBJ*
-DDKAPI
-EngLockSurface(
- /*IN*/ HSURF hsurf);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngLpkInstalled(
- VOID);
-
-WIN32KAPI
-PEVENT
-DDKAPI
-EngMapEvent(
- /*IN*/ HDEV hDev,
- /*IN*/ HANDLE hUserObject,
- /*IN*/ PVOID Reserved1,
- /*IN*/ PVOID Reserved2,
- /*IN*/ PVOID Reserved3);
-
-WIN32KAPI
-PVOID
-DDKAPI
-EngMapFile(
- /*IN*/ LPWSTR pwsz,
- /*IN*/ ULONG cjSize,
-
- /*OUT*/ ULONG_PTR *piFile);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngMapFontFile(
- ULONG_PTR iFile,
- PULONG *ppjBuf,
- ULONG *pcjBuf);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngMapFontFileFD(
- /*IN*/ ULONG_PTR iFile,
-
- /*OUT*/ PULONG *ppjBuf,
-
- /*OUT*/ ULONG *pcjBuf);
-
-WIN32KAPI
-PVOID
-DDKAPI
-EngMapModule(
- /*IN*/ HANDLE h,
-
- /*OUT*/ PULONG pSize);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngMarkBandingSurface(
- /*IN*/ HSURF hsurf);
-
-/* EngModifySurface.flSurface constants */
-#define MS_NOTSYSTEMMEMORY 0x00000001
-#define MS_SHAREDACCESS 0x00000002
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngModifySurface(
- /*IN*/ HSURF hsurf,
- /*IN*/ HDEV hdev,
- /*IN*/ FLONG flHooks,
- /*IN*/ FLONG flSurface,
- /*IN*/ DHSURF dhsurf,
- /*IN*/ VOID *pvScan0,
- /*IN*/ LONG lDelta,
- /*IN*/ VOID *pvReserved);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngMovePointer(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ LONG x,
- /*IN*/ LONG y,
- /*IN*/ RECTL *prcl);
-
-WIN32KAPI
-int
-DDKAPI
-EngMulDiv(
- /*IN*/ int a,
- /*IN*/ int b,
- /*IN*/ int c);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngMultiByteToUnicodeN(
-
- /*OUT*/ LPWSTR UnicodeString,
- /*IN*/ ULONG MaxBytesInUnicodeString,
-
- /*OUT*/ PULONG BytesInUnicodeString,
- /*IN*/ PCHAR MultiByteString,
- /*IN*/ ULONG BytesInMultiByteString);
-
-WIN32KAPI
-INT
-DDKAPI
-EngMultiByteToWideChar(
- /*IN*/ UINT CodePage,
-
- /*OUT*/ LPWSTR WideCharString,
- /*IN*/ INT BytesInWideCharString,
- /*IN*/ LPSTR MultiByteString,
- /*IN*/ INT BytesInMultiByteString);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngPaint(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ BRUSHOBJ *pbo,
- /*IN*/ POINTL *pptlBrushOrg,
- /*IN*/ MIX mix);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngPlgBlt(
- /*IN*/ SURFOBJ *psoTrg,
- /*IN*/ SURFOBJ *psoSrc,
- /*IN*/ SURFOBJ *psoMsk,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ COLORADJUSTMENT *pca,
- /*IN*/ POINTL *pptlBrushOrg,
- /*IN*/ POINTFIX *pptfx,
- /*IN*/ RECTL *prcl,
- /*IN*/ POINTL *pptl,
- /*IN*/ ULONG iMode);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngProbeForRead(
- /*IN*/ PVOID Address,
- /*IN*/ ULONG Length,
- /*IN*/ ULONG Alignment);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngProbeForReadAndWrite(
- /*IN*/ PVOID Address,
- /*IN*/ ULONG Length,
- /*IN*/ ULONG Alignment);
-
-typedef enum _ENG_DEVICE_ATTRIBUTE {
- QDA_RESERVED = 0,
- QDA_ACCELERATION_LEVEL
-} ENG_DEVICE_ATTRIBUTE;
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngQueryDeviceAttribute(
- /*IN*/ HDEV hdev,
- /*IN*/ ENG_DEVICE_ATTRIBUTE devAttr,
- /*IN*/ VOID *pvIn,
- /*IN*/ ULONG ulInSize,
-
- /*OUT*/ VOID *pvOut,
-
- /*OUT*/ ULONG ulOutSize);
-
-WIN32KAPI
-LARGE_INTEGER
-DDKAPI
-EngQueryFileTimeStamp(
- /*IN*/ LPWSTR pwsz);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngQueryLocalTime(
-
- /*OUT*/ PENG_TIME_FIELDS ptf);
-
-WIN32KAPI
-ULONG
-DDKAPI
-EngQueryPalette(
- /*IN*/ HPALETTE hPal,
-
- /*OUT*/ ULONG *piMode,
- /*IN*/ ULONG cColors,
-
- /*OUT*/ ULONG *pulColors);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngQueryPerformanceCounter(
-
- /*OUT*/ LONGLONG *pPerformanceCount);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngQueryPerformanceFrequency(
-
- /*OUT*/ LONGLONG *pFrequency);
-
-typedef enum _ENG_SYSTEM_ATTRIBUTE {
- EngProcessorFeature = 1,
- EngNumberOfProcessors,
- EngOptimumAvailableUserMemory,
- EngOptimumAvailableSystemMemory,
-} ENG_SYSTEM_ATTRIBUTE;
-
-#define QSA_MMX 0x00000100
-#define QSA_SSE 0x00002000
-#define QSA_3DNOW 0x00004000
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngQuerySystemAttribute(
- /*IN*/ ENG_SYSTEM_ATTRIBUTE CapNum,
-
- /*OUT*/ PDWORD pCapability);
-
-WIN32KAPI
-LONG
-DDKAPI
-EngReadStateEvent(
- /*IN*/ PEVENT pEvent);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngReleaseSemaphore(
- /*IN*/ HSEMAPHORE hsem);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngRestoreFloatingPointState(
- /*IN*/ VOID *pBuffer);
-
-WIN32KAPI
-ULONG
-DDKAPI
-EngSaveFloatingPointState(
-
- /*OUT*/ VOID *pBuffer,
- /*IN*/ ULONG cjBufferSize);
-
-WIN32KAPI
-HANDLE
-DDKAPI
-EngSecureMem(
- /*IN*/ PVOID Address,
- /*IN*/ ULONG Length);
-
-WIN32KAPI
-LONG
-DDKAPI
-EngSetEvent(
- /*IN*/ PEVENT pEvent);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngSetLastError(
- /*IN*/ ULONG iError);
-
-WIN32KAPI
-ULONG
-DDKAPI
-EngSetPointerShape(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ SURFOBJ *psoMask,
- /*IN*/ SURFOBJ *psoColor,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ LONG xHot,
- /*IN*/ LONG yHot,
- /*IN*/ LONG x,
- /*IN*/ LONG y,
- /*IN*/ RECTL *prcl,
- /*IN*/ FLONG fl);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngSetPointerTag(
- /*IN*/ HDEV hdev,
- /*IN*/ SURFOBJ *psoMask,
- /*IN*/ SURFOBJ *psoColor,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ FLONG fl);
-
-WIN32KAPI
-DWORD
-DDKAPI
-EngSetPrinterData(
- /*IN*/ HANDLE hPrinter,
- /*IN*/ LPWSTR pType,
- /*IN*/ DWORD dwType,
- /*IN*/ LPBYTE lpbPrinterData,
- /*IN*/ DWORD cjPrinterData);
-
-typedef int DDKCDECLAPI (*SORTCOMP)(const void *pv1, const void *pv2);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngSort(
- /*IN OUT*/ PBYTE pjBuf,
- /*IN*/ ULONG c,
- /*IN*/ ULONG cjElem,
- /*IN*/ SORTCOMP pfnComp);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngStretchBlt(
- /*IN*/ SURFOBJ *psoDest,
- /*IN*/ SURFOBJ *psoSrc,
- /*IN*/ SURFOBJ *psoMask,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ COLORADJUSTMENT *pca,
- /*IN*/ POINTL *pptlHTOrg,
- /*IN*/ RECTL *prclDest,
- /*IN*/ RECTL *prclSrc,
- /*IN*/ POINTL *pptlMask,
- /*IN*/ ULONG iMode);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngStretchBltROP(
- /*IN*/ SURFOBJ *psoDest,
- /*IN*/ SURFOBJ *psoSrc,
- /*IN*/ SURFOBJ *psoMask,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ COLORADJUSTMENT *pca,
- /*IN*/ POINTL *pptlHTOrg,
- /*IN*/ RECTL *prclDest,
- /*IN*/ RECTL *prclSrc,
- /*IN*/ POINTL *pptlMask,
- /*IN*/ ULONG iMode,
- /*IN*/ BRUSHOBJ *pbo,
- /*IN*/ DWORD rop4);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngStrokeAndFillPath(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ PATHOBJ *ppo,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XFORMOBJ *pxo,
- /*IN*/ BRUSHOBJ *pboStroke,
- /*IN*/ LINEATTRS *plineattrs,
- /*IN*/ BRUSHOBJ *pboFill,
- /*IN*/ POINTL *pptlBrushOrg,
- /*IN*/ MIX mixFill,
- /*IN*/ FLONG flOptions);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngStrokePath(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ PATHOBJ *ppo,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XFORMOBJ *pxo,
- /*IN*/ BRUSHOBJ *pbo,
- /*IN*/ POINTL *pptlBrushOrg,
- /*IN*/ LINEATTRS *plineattrs,
- /*IN*/ MIX mix);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngTextOut(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ STROBJ *pstro,
- /*IN*/ FONTOBJ *pfo,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ RECTL *prclExtra,
- /*IN*/ RECTL *prclOpaque,
- /*IN*/ BRUSHOBJ *pboFore,
- /*IN*/ BRUSHOBJ *pboOpaque,
- /*IN*/ POINTL *pptlOrg,
- /*IN*/ MIX mix);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngTransparentBlt(
- /*IN*/ SURFOBJ *psoDst,
- /*IN*/ SURFOBJ *psoSrc,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ RECTL *prclDst,
- /*IN*/ RECTL *prclSrc,
- /*IN*/ ULONG iTransColor,
- /*IN*/ ULONG ulReserved);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngUnicodeToMultiByteN(
-
- /*OUT*/ PCHAR MultiByteString,
- /*IN*/ ULONG MaxBytesInMultiByteString,
-
- /*OUT*/ PULONG BytesInMultiByteString,
- /*IN*/ PWSTR UnicodeString,
- /*IN*/ ULONG BytesInUnicodeString);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngUnloadImage(
- /*IN*/ HANDLE hModule);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngUnlockDirectDrawSurface(
- /*IN*/ PDD_SURFACE_LOCAL pSurface);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngUnlockDriverObj(
- /*IN*/ HDRVOBJ hdo);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngUnlockSurface(
- /*IN*/ SURFOBJ *pso);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngUnmapEvent(
- /*IN*/ PEVENT pEvent);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngUnmapFile(
- /*IN*/ ULONG_PTR iFile);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngUnmapFontFile(
- ULONG_PTR iFile);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngUnmapFontFileFD(
- /*IN*/ ULONG_PTR iFile);
-
-WIN32KAPI
-VOID
-DDKAPI
-EngUnsecureMem(
- /*IN*/ HANDLE hSecure);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngWaitForSingleObject(
- /*IN*/ PEVENT pEvent,
- /*IN*/ PLARGE_INTEGER pTimeOut);
-
-WIN32KAPI
-INT
-DDKAPI
-EngWideCharToMultiByte(
- /*IN*/ UINT CodePage,
- /*IN*/ LPWSTR WideCharString,
- /*IN*/ INT BytesInWideCharString,
-
- /*OUT*/ LPSTR MultiByteString,
- /*IN*/ INT BytesInMultiByteString);
-
-WIN32KAPI
-BOOL
-DDKAPI
-EngWritePrinter(
- /*IN*/ HANDLE hPrinter,
- /*IN*/ LPVOID pBuf,
- /*IN*/ DWORD cbBuf,
-
- /*OUT*/ LPDWORD pcWritten);
-
-WIN32KAPI
-VOID
-DDKAPI
-FLOATOBJ_Add(
- /*IN OUT*/ PFLOATOBJ pf,
- /*IN*/ PFLOATOBJ pf1);
-
-WIN32KAPI
-VOID
-DDKAPI
-FLOATOBJ_AddFloat(
- /*IN OUT*/ PFLOATOBJ pf,
- /*IN*/ FLOATL f);
-
-WIN32KAPI
-VOID
-DDKAPI
-FLOATOBJ_AddLong(
- /*IN OUT*/ PFLOATOBJ pf,
- /*IN*/ LONG l);
-
-WIN32KAPI
-VOID
-DDKAPI
-FLOATOBJ_Div(
- /*IN OUT*/ PFLOATOBJ pf,
- /*IN*/ PFLOATOBJ pf1);
-
-WIN32KAPI
-VOID
-DDKAPI
-FLOATOBJ_DivFloat(
- /*IN OUT*/ PFLOATOBJ pf,
- /*IN*/ FLOATL f);
-
-WIN32KAPI
-VOID
-DDKAPI
-FLOATOBJ_DivLong(
- /*IN OUT*/ PFLOATOBJ pf,
- /*IN*/ LONG l);
-
-WIN32KAPI
-BOOL
-DDKAPI
-FLOATOBJ_Equal(
- /*IN*/ PFLOATOBJ pf,
- /*IN*/ PFLOATOBJ pf1);
-
-WIN32KAPI
-BOOL
-DDKAPI
-FLOATOBJ_EqualLong(
- /*IN*/ PFLOATOBJ pf,
- /*IN*/ LONG l);
-
-WIN32KAPI
-LONG
-DDKAPI
-FLOATOBJ_GetFloat(
- /*IN*/ PFLOATOBJ pf);
-
-WIN32KAPI
-LONG
-DDKAPI
-FLOATOBJ_GetLong(
- /*IN*/ PFLOATOBJ pf);
-
-WIN32KAPI
-BOOL
-DDKAPI
-FLOATOBJ_GreaterThan(
- /*IN*/ PFLOATOBJ pf,
- /*IN*/ PFLOATOBJ pf1);
-
-WIN32KAPI
-BOOL
-DDKAPI
-FLOATOBJ_GreaterThanLong(
- /*IN*/ PFLOATOBJ pf,
- /*IN*/ LONG l);
-
-WIN32KAPI
-BOOL
-DDKAPI
-FLOATOBJ_LessThan(
- /*IN*/ PFLOATOBJ pf,
- /*IN*/ PFLOATOBJ pf1);
-
-WIN32KAPI
-BOOL
-DDKAPI
-FLOATOBJ_LessThanLong(
- /*IN*/ PFLOATOBJ pf,
- /*IN*/ LONG l);
-
-WIN32KAPI
-VOID
-DDKAPI
-FLOATOBJ_Mul(
- /*IN OUT*/ PFLOATOBJ pf,
- /*IN*/ PFLOATOBJ pf1);
-
-WIN32KAPI
-VOID
-DDKAPI
-FLOATOBJ_MulFloat(
- /*IN OUT*/ PFLOATOBJ pf,
- /*IN*/ FLOATL f);
-
-WIN32KAPI
-VOID
-DDKAPI
-FLOATOBJ_MulLong(
- /*IN OUT*/ PFLOATOBJ pf,
- /*IN*/ LONG l);
-
-WIN32KAPI
-VOID
-DDKAPI
-FLOATOBJ_Neg(
- /*IN OUT*/ PFLOATOBJ pf);
-
-WIN32KAPI
-VOID
-DDKAPI
-FLOATOBJ_SetFloat(
-
- /*OUT*/ PFLOATOBJ pf,
- /*IN*/ FLOATL f);
-
-WIN32KAPI
-VOID
-DDKAPI
-FLOATOBJ_SetLong(
-
- /*OUT*/ PFLOATOBJ pf,
- /*IN*/ LONG l);
-
-WIN32KAPI
-VOID
-DDKAPI
-FLOATOBJ_Sub(
- /*IN OUT*/ PFLOATOBJ pf,
- /*IN*/ PFLOATOBJ pf1);
-
-WIN32KAPI
-VOID
-DDKAPI
-FLOATOBJ_SubFloat(
- /*IN OUT*/ PFLOATOBJ pf,
- /*IN*/ FLOATL f);
-
-WIN32KAPI
-VOID
-DDKAPI
-FLOATOBJ_SubLong(
- /*IN OUT*/ PFLOATOBJ pf,
- /*IN*/ LONG l);
-
-WIN32KAPI
-ULONG
-DDKAPI
-FONTOBJ_cGetAllGlyphHandles(
- /*IN*/ FONTOBJ *pfo,
-
- /*OUT*/ HGLYPH *phg);
-
-WIN32KAPI
-ULONG
-DDKAPI
-FONTOBJ_cGetGlyphs(
- /*IN*/ FONTOBJ *pfo,
- /*IN*/ ULONG iMode,
- /*IN*/ ULONG cGlyph,
- /*IN*/ HGLYPH *phg,
-
- /*OUT*/ PVOID *ppvGlyph);
-
-WIN32KAPI
-FD_GLYPHSET*
-DDKAPI
-FONTOBJ_pfdg(
- /*IN*/ FONTOBJ *pfo);
-
-WIN32KAPI
-IFIMETRICS*
-DDKAPI
-FONTOBJ_pifi(
- /*IN*/ FONTOBJ *pfo);
-
-WIN32KAPI
-PBYTE
-DDKAPI
-FONTOBJ_pjOpenTypeTablePointer(
- /*IN*/ FONTOBJ *pfo,
- /*IN*/ ULONG ulTag,
-
- /*OUT*/ ULONG *pcjTable);
-
-WIN32KAPI
-PFD_GLYPHATTR
-DDKAPI
-FONTOBJ_pQueryGlyphAttrs(
- /*IN*/ FONTOBJ *pfo,
- /*IN*/ ULONG iMode);
-
-WIN32KAPI
-PVOID
-DDKAPI
-FONTOBJ_pvTrueTypeFontFile(
- /*IN*/ FONTOBJ *pfo,
-
- /*OUT*/ ULONG *pcjFile);
-
-WIN32KAPI
-LPWSTR
-DDKAPI
-FONTOBJ_pwszFontFilePaths(
- /*IN*/ FONTOBJ *pfo,
-
- /*OUT*/ ULONG *pcwc);
-
-WIN32KAPI
-XFORMOBJ*
-DDKAPI
-FONTOBJ_pxoGetXform(
- /*IN*/ FONTOBJ *pfo);
-
-WIN32KAPI
-VOID
-DDKAPI
-FONTOBJ_vGetInfo(
- /*IN*/ FONTOBJ *pfo,
- /*IN*/ ULONG cjSize,
-
- /*OUT*/ FONTINFO *pfi);
-
-WIN32KAPI
-FLATPTR
-DDKAPI
-HeapVidMemAllocAligned(
- /*IN*/ LPVIDMEM lpVidMem,
- /*IN*/ DWORD dwWidth,
- /*IN*/ DWORD dwHeight,
- /*IN*/ LPSURFACEALIGNMENT lpAlignment,
-
- /*OUT*/ LPLONG lpNewPitch);
-
-WIN32KAPI
-LONG
-DDKAPI
-HT_ComputeRGBGammaTable(
- /*IN*/ USHORT GammaTableEntries,
- /*IN*/ USHORT GammaTableType,
- /*IN*/ USHORT RedGamma,
- /*IN*/ USHORT GreenGamma,
- /*IN*/ USHORT BlueGamma,
-
- /*OUT*/ LPBYTE pGammaTable);
-
-WIN32KAPI
-LONG
-DDKAPI
-HT_Get8BPPFormatPalette(
-
- /*OUT*/ LPPALETTEENTRY pPaletteEntry,
- /*IN*/ USHORT RedGamma,
- /*IN*/ USHORT GreenGamma,
- /*IN*/ USHORT BlueGamma);
-
-WIN32KAPI
-LONG
-DDKAPI
-HT_Get8BPPMaskPalette(
- /*IN OUT*/ LPPALETTEENTRY pPaletteEntry,
- /*IN*/ BOOL Use8BPPMaskPal,
- /*IN*/ BYTE CMYMask,
- /*IN*/ USHORT RedGamma,
- /*IN*/ USHORT GreenGamma,
- /*IN*/ USHORT BlueGamma);
-
-WIN32KAPI
-LONG
-DDKAPI
-HTUI_DeviceColorAdjustment(
- /*IN*/ LPSTR pDeviceName,
-
- /*OUT*/ PDEVHTADJDATA pDevHTAdjData);
-
-WIN32KAPI
-ULONG
-DDKAPI
-PALOBJ_cGetColors(
- /*IN*/ PALOBJ *ppalo,
- /*IN*/ ULONG iStart,
- /*IN*/ ULONG cColors,
-
- /*OUT*/ ULONG *pulColors);
-
-WIN32KAPI
-BOOL
-DDKAPI
-PATHOBJ_bCloseFigure(
- /*IN*/ PATHOBJ *ppo);
-
-WIN32KAPI
-BOOL
-DDKAPI
-PATHOBJ_bEnum(
- /*IN*/ PATHOBJ *ppo,
-
- /*OUT*/ PATHDATA *ppd);
-
-WIN32KAPI
-BOOL
-DDKAPI
-PATHOBJ_bEnumClipLines(
- /*IN*/ PATHOBJ *ppo,
- /*IN*/ ULONG cb,
-
- /*OUT*/ CLIPLINE *pcl);
-
-WIN32KAPI
-BOOL
-DDKAPI
-PATHOBJ_bMoveTo(
- /*IN*/ PATHOBJ *ppo,
- /*IN*/ POINTFIX ptfx);
-
-WIN32KAPI
-BOOL
-DDKAPI
-PATHOBJ_bPolyBezierTo(
- /*IN*/ PATHOBJ *ppo,
- /*IN*/ POINTFIX *pptfx,
- /*IN*/ ULONG cptfx);
-
-WIN32KAPI
-BOOL
-DDKAPI
-PATHOBJ_bPolyLineTo(
- /*IN*/ PATHOBJ *ppo,
- /*IN*/ POINTFIX *pptfx,
- /*IN*/ ULONG cptfx);
-
-WIN32KAPI
-VOID
-DDKAPI
-PATHOBJ_vEnumStart(
- /*IN*/ PATHOBJ *ppo);
-
-WIN32KAPI
-VOID
-DDKAPI
-PATHOBJ_vEnumStartClipLines(
- /*IN*/ PATHOBJ *ppo,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ SURFOBJ *pso,
- /*IN*/ LINEATTRS *pla);
-
-WIN32KAPI
-VOID
-DDKAPI
-PATHOBJ_vGetBounds(
- /*IN*/ PATHOBJ *ppo,
-
- /*OUT*/ PRECTFX prectfx);
-
-WIN32KAPI
-BOOL
-DDKAPI
-STROBJ_bEnum(
- /*IN*/ STROBJ *pstro,
-
- /*OUT*/ ULONG *pc,
-
- /*OUT*/ PGLYPHPOS *ppgpos);
-
-WIN32KAPI
-BOOL
-DDKAPI
-STROBJ_bEnumPositionsOnly(
- /*IN*/ STROBJ *pstro,
-
- /*OUT*/ ULONG *pc,
-
- /*OUT*/ PGLYPHPOS *ppgpos);
-
-WIN32KAPI
-BOOL
-DDKAPI
-STROBJ_bGetAdvanceWidths(
- /*IN*/ STROBJ *pso,
- /*IN*/ ULONG iFirst,
- /*IN*/ ULONG c,
-
- /*OUT*/ POINTQF *pptqD);
-
-WIN32KAPI
-DWORD
-DDKAPI
-STROBJ_dwGetCodePage(
- /*IN*/ STROBJ *pstro);
-
-WIN32KAPI
-FIX
-DDKAPI
-STROBJ_fxBreakExtra(
- /*IN*/ STROBJ *pstro);
-
-WIN32KAPI
-FIX
-DDKAPI
-STROBJ_fxCharacterExtra(
- /*IN*/ STROBJ *pstro);
-
-WIN32KAPI
-VOID
-DDKAPI
-STROBJ_vEnumStart(
- /*IN*/ STROBJ *pstro);
-
-WIN32KAPI
-VOID
-DDKAPI
-VidMemFree(
- /*IN*/ LPVMEMHEAP pvmh,
- /*IN*/ FLATPTR ptr);
-
-WIN32KAPI
-BOOL
-DDKAPI
-WNDOBJ_bEnum(
- /*IN*/ WNDOBJ *pwo,
- /*IN*/ ULONG cj,
-
- /*OUT*/ ULONG *pul);
-
-WIN32KAPI
-ULONG
-DDKAPI
-WNDOBJ_cEnumStart(
- /*IN*/ WNDOBJ *pwo,
- /*IN*/ ULONG iType,
- /*IN*/ ULONG iDirection,
- /*IN*/ ULONG cLimit);
-
-WIN32KAPI
-VOID
-DDKAPI
-WNDOBJ_vSetConsumer(
- /*IN*/ WNDOBJ *pwo,
- /*IN*/ PVOID pvConsumer);
-
-/* XFORMOBJ_bApplyXform.iMode constants */
-#define XF_LTOL 0L
-#define XF_INV_LTOL 1L
-#define XF_LTOFX 2L
-#define XF_INV_FXTOL 3L
-
-WIN32KAPI
-BOOL
-DDKAPI
-XFORMOBJ_bApplyXform(
- /*IN*/ XFORMOBJ *pxo,
- /*IN*/ ULONG iMode,
- /*IN*/ ULONG cPoints,
- /*IN*/ PVOID pvIn,
-
- /*OUT*/ PVOID pvOut);
-
-WIN32KAPI
-ULONG
-DDKAPI
-XFORMOBJ_iGetFloatObjXform(
- /*IN*/ XFORMOBJ *pxo,
-
- /*OUT*/ FLOATOBJ_XFORM *pxfo);
-
-WIN32KAPI
-ULONG
-DDKAPI
-XFORMOBJ_iGetXform(
- /*IN*/ XFORMOBJ *pxo,
-
- /*OUT*/ XFORML *pxform);
-
-/* XLATEOBJ_cGetPalette.iPal constants */
-#define XO_SRCPALETTE 1
-#define XO_DESTPALETTE 2
-#define XO_DESTDCPALETTE 3
-#define XO_SRCBITFIELDS 4
-#define XO_DESTBITFIELDS 5
-
-WIN32KAPI
-ULONG
-DDKAPI
-XLATEOBJ_cGetPalette(
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ ULONG iPal,
- /*IN*/ ULONG cPal,
-
- /*OUT*/ ULONG *pPal);
-
-WIN32KAPI
-HANDLE
-DDKAPI
-XLATEOBJ_hGetColorTransform(
- /*IN*/ XLATEOBJ *pxlo);
-
-WIN32KAPI
-ULONG
-DDKAPI
-XLATEOBJ_iXlate(
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ ULONG iColor);
-
-WIN32KAPI
-ULONG*
-DDKAPI
-XLATEOBJ_piVector(
- /*IN*/ XLATEOBJ *pxlo);
-
-
-
-/* Graphics Driver Functions */
-
-BOOL
-DDKAPI
-DrvAlphaBlend(
- /*IN*/ SURFOBJ *psoDest,
- /*IN*/ SURFOBJ *psoSrc,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ RECTL *prclDest,
- /*IN*/ RECTL *prclSrc,
- /*IN*/ BLENDOBJ *pBlendObj);
-
-BOOL
-DDKAPI
-DrvAssertMode(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ BOOL bEnable);
-
-BOOL
-DDKAPI
-DrvBitBlt(
- /*IN*/ SURFOBJ *psoTrg,
- /*IN*/ SURFOBJ *psoSrc,
- /*IN*/ SURFOBJ *psoMask,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ RECTL *prclTrg,
- /*IN*/ POINTL *pptlSrc,
- /*IN*/ POINTL *pptlMask,
- /*IN*/ BRUSHOBJ *pbo,
- /*IN*/ POINTL *pptlBrush,
- /*IN*/ ROP4 rop4);
-
-VOID
-DDKAPI
-DrvCompletePDEV(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ HDEV hdev);
-
-BOOL
-DDKAPI
-DrvCopyBits(
- /*IN*/ SURFOBJ *psoDest,
- /*IN*/ SURFOBJ *psoSrc,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ RECTL *prclDest,
- /*IN*/ POINTL *pptlSrc);
-
-HBITMAP
-DDKAPI
-DrvCreateDeviceBitmap(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ SIZEL sizl,
- /*IN*/ ULONG iFormat);
-
-VOID
-DDKAPI
-DrvDeleteDeviceBitmap(
- /*IN*/ DHSURF dhsurf);
-
-HBITMAP
-DDKAPI
-DrvDeriveSurface(
- DD_DIRECTDRAW_GLOBAL *pDirectDraw,
- DD_SURFACE_LOCAL *pSurface);
-
-LONG
-DDKAPI
-DrvDescribePixelFormat(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ LONG iPixelFormat,
- /*IN*/ ULONG cjpfd,
-
- /*OUT*/ PIXELFORMATDESCRIPTOR *ppfd);
-
-VOID
-DDKAPI
-DrvDestroyFont(
- /*IN*/ FONTOBJ *pfo);
-
-VOID
-DDKAPI
-DrvDisableDriver(
- VOID);
-
-VOID
-DDKAPI
-DrvDisablePDEV(
- /*IN*/ DHPDEV dhpdev);
-
-VOID
-DDKAPI
-DrvDisableSurface(
- /*IN*/ DHPDEV dhpdev);
-
-#define DM_DEFAULT 0x00000001
-#define DM_MONOCHROME 0x00000002
-
-ULONG
-DDKAPI
-DrvDitherColor(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ ULONG iMode,
- /*IN*/ ULONG rgb,
-
- /*OUT*/ ULONG *pul);
-
-ULONG
-DDKAPI
-DrvDrawEscape(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ ULONG iEsc,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ RECTL *prcl,
- /*IN*/ ULONG cjIn,
- /*IN*/ PVOID pvIn);
-
-BOOL
-DDKAPI
-DrvEnableDriver(
- /*IN*/ ULONG iEngineVersion,
- /*IN*/ ULONG cj,
-
- /*OUT*/ DRVENABLEDATA *pded);
-
-DHPDEV
-DDKAPI
-DrvEnablePDEV(
- /*IN*/ DEVMODEW *pdm,
- /*IN*/ LPWSTR pwszLogAddress,
- /*IN*/ ULONG cPat,
-
- /*OUT*/ HSURF *phsurfPatterns,
- /*IN*/ ULONG cjCaps,
-
- /*OUT*/ ULONG *pdevcaps,
- /*IN*/ ULONG cjDevInfo,
-
- /*OUT*/ DEVINFO *pdi,
- /*IN*/ HDEV hdev,
- /*IN*/ LPWSTR pwszDeviceName,
- /*IN*/ HANDLE hDriver);
-
-HSURF
-DDKAPI
-DrvEnableSurface(
- /*IN*/ DHPDEV dhpdev);
-
-/* DrvEndDoc.fl constants */
-#define ED_ABORTDOC 0x00000001
-
-BOOL
-DDKAPI
-DrvEndDoc(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ FLONG fl);
-
-ULONG
-DDKAPI
-DrvEscape(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ ULONG iEsc,
- /*IN*/ ULONG cjIn,
- /*IN*/ PVOID pvIn,
- /*IN*/ ULONG cjOut,
-
- /*OUT*/ PVOID pvOut);
-
-BOOL
-DDKAPI
-DrvFillPath(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ PATHOBJ *ppo,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ BRUSHOBJ *pbo,
- /*IN*/ POINTL *pptlBrushOrg,
- /*IN*/ MIX mix,
- /*IN*/ FLONG flOptions);
-
-ULONG
-DDKAPI
-DrvFontManagement(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ FONTOBJ *pfo,
- /*IN*/ ULONG iMode,
- /*IN*/ ULONG cjIn,
- /*IN*/ PVOID pvIn,
- /*IN*/ ULONG cjOut,
-
- /*OUT*/ PVOID pvOut);
-
-VOID
-DDKAPI
-DrvFree(
- /*IN*/ PVOID pv,
- /*IN*/ ULONG_PTR id);
-
-/* DrvGetGlyphMode return values */
-#define FO_HGLYPHS 0L
-#define FO_GLYPHBITS 1L
-#define FO_PATHOBJ 2L
-
-ULONG
-DDKAPI
-DrvGetGlyphMode(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ FONTOBJ *pfo);
-
-ULONG
-DDKAPI
-DrvGetModes(
- /*IN*/ HANDLE hDriver,
- /*IN*/ ULONG cjSize,
-
- /*OUT*/ DEVMODEW *pdm);
-
-PVOID
-DDKAPI
-DrvGetTrueTypeFile(
- /*IN*/ ULONG_PTR iFile,
- /*IN*/ ULONG *pcj);
-
-BOOL
-DDKAPI
-DrvGradientFill(
- /*IN*/ SURFOBJ *psoDest,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ TRIVERTEX *pVertex,
- /*IN*/ ULONG nVertex,
- /*IN*/ PVOID pMesh,
- /*IN*/ ULONG nMesh,
- /*IN*/ RECTL *prclExtents,
- /*IN*/ POINTL *pptlDitherOrg,
- /*IN*/ ULONG ulMode);
-
-BOOL
-DDKAPI
-DrvIcmCheckBitmapBits(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ HANDLE hColorTransform,
- /*IN*/ SURFOBJ *pso,
-
- /*OUT*/ PBYTE paResults);
-
-HANDLE
-DDKAPI
-DrvIcmCreateColorTransform(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ LPLOGCOLORSPACEW pLogColorSpace,
- /*IN*/ PVOID pvSourceProfile,
- /*IN*/ ULONG cjSourceProfile,
- /*IN*/ PVOID pvDestProfile,
- /*IN*/ ULONG cjDestProfile,
- /*IN*/ PVOID pvTargetProfile,
- /*IN*/ ULONG cjTargetProfile,
- /*IN*/ DWORD dwReserved);
-
-BOOL
-DDKAPI
-DrvIcmDeleteColorTransform(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ HANDLE hcmXform);
-
-/* DrvIcmSetDeviceGammaRamp.iFormat constants */
-#define IGRF_RGB_256BYTES 0x00000000
-#define IGRF_RGB_256WORDS 0x00000001
-
-BOOL
-DDKAPI
-DrvIcmSetDeviceGammaRamp(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ ULONG iFormat,
- /*IN*/ LPVOID lpRamp);
-
-BOOL
-DDKAPI
-DrvLineTo(
- SURFOBJ *pso,
- CLIPOBJ *pco,
- BRUSHOBJ *pbo,
- LONG x1,
- LONG y1,
- LONG x2,
- LONG y2,
- RECTL *prclBounds,
- MIX mix);
-
-ULONG_PTR
-DDKAPI
-DrvLoadFontFile(
- ULONG cFiles,
- ULONG_PTR *piFile,
- PVOID *ppvView,
- ULONG *pcjView,
- DESIGNVECTOR *pdv,
- ULONG ulLangID,
- ULONG ulFastCheckSum);
-
-VOID
-DDKAPI
-DrvMovePointer(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ LONG x,
- /*IN*/ LONG y,
- /*IN*/ RECTL *prcl);
-
-BOOL
-DDKAPI
-DrvNextBand(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ POINTL *pptl);
-
-VOID
-DDKAPI
-DrvNotify(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ ULONG iType,
- /*IN*/ PVOID pvData);
-
-BOOL
-DDKAPI
-DrvOffset(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ LONG x,
- /*IN*/ LONG y,
- /*IN*/ FLONG flReserved);
-
-BOOL
-DDKAPI
-DrvPaint(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ BRUSHOBJ *pbo,
- /*IN*/ POINTL *pptlBrushOrg,
- /*IN*/ MIX mix);
-
-BOOL
-DDKAPI
-DrvPlgBlt(
- /*IN*/ SURFOBJ *psoTrg,
- /*IN*/ SURFOBJ *psoSrc,
- /*IN*/ SURFOBJ *psoMsk,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ COLORADJUSTMENT *pca,
- /*IN*/ POINTL *pptlBrushOrg,
- /*IN*/ POINTFIX *pptfx,
- /*IN*/ RECTL *prcl,
- /*IN*/ POINTL *pptl,
- /*IN*/ ULONG iMode);
-
-/* DrvQueryAdvanceWidths.iMode constants */
-#define QAW_GETWIDTHS 0
-#define QAW_GETEASYWIDTHS 1
-
-BOOL
-DDKAPI
-DrvQueryAdvanceWidths(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ FONTOBJ *pfo,
- /*IN*/ ULONG iMode,
- /*IN*/ HGLYPH *phg,
-
- /*OUT*/ PVOID pvWidths,
- /*IN*/ ULONG cGlyphs);
-
-/* DrvQueryDeviceSupport.iType constants */
-#define QDS_CHECKJPEGFORMAT 0x00000000
-#define QDS_CHECKPNGFORMAT 0x00000001
-
-BOOL
-DDKAPI
-DrvQueryDeviceSupport(
- SURFOBJ *pso,
- XLATEOBJ *pxlo,
- XFORMOBJ *pxo,
- ULONG iType,
- ULONG cjIn,
- PVOID pvIn,
- ULONG cjOut,
- PVOID pvOut);
-
-/* DrvQueryDriverInfo.dwMode constants */
-#define DRVQUERY_USERMODE 0x00000001
-
-BOOL
-DDKAPI
-DrvQueryDriverInfo(
- DWORD dwMode,
- PVOID pBuffer,
- DWORD cbBuf,
- PDWORD pcbNeeded);
-
-PIFIMETRICS
-DDKAPI
-DrvQueryFont(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ ULONG_PTR iFile,
- /*IN*/ ULONG iFace,
- /*IN*/ ULONG_PTR *pid);
-
-/* DrvQueryFontCaps.pulCaps constants */
-#define QC_OUTLINES 0x00000001
-#define QC_1BIT 0x00000002
-#define QC_4BIT 0x00000004
-
-#define QC_FONTDRIVERCAPS (QC_OUTLINES | QC_1BIT | QC_4BIT)
-
-LONG
-DDKAPI
-DrvQueryFontCaps(
- /*IN*/ ULONG culCaps,
-
- /*OUT*/ ULONG *pulCaps);
-
-/* DrvQueryFontData.iMode constants */
-#define QFD_GLYPHANDBITMAP 1L
-#define QFD_GLYPHANDOUTLINE 2L
-#define QFD_MAXEXTENTS 3L
-#define QFD_TT_GLYPHANDBITMAP 4L
-#define QFD_TT_GRAY1_BITMAP 5L
-#define QFD_TT_GRAY2_BITMAP 6L
-#define QFD_TT_GRAY4_BITMAP 8L
-#define QFD_TT_GRAY8_BITMAP 9L
-
-#define QFD_TT_MONO_BITMAP QFD_TT_GRAY1_BITMAP
-
-LONG
-DDKAPI
-DrvQueryFontData(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ FONTOBJ *pfo,
- /*IN*/ ULONG iMode,
- /*IN*/ HGLYPH hg,
- /*IN OUT*/ GLYPHDATA *pgd,
- /*IN OUT*/ PVOID pv,
- /*IN*/ ULONG cjSize);
-
-/* DrvQueryFontFile.ulMode constants */
-#define QFF_DESCRIPTION 0x00000001
-#define QFF_NUMFACES 0x00000002
-
-LONG
-DDKAPI
-DrvQueryFontFile(
- /*IN*/ ULONG_PTR iFile,
- /*IN*/ ULONG ulMode,
- /*IN*/ ULONG cjBuf,
- /*IN*/ ULONG *pulBuf);
-
-/* DrvQueryFontTree.iMode constants */
-#define QFT_UNICODE 0L
-#define QFT_LIGATURES 1L
-#define QFT_KERNPAIRS 2L
-#define QFT_GLYPHSET 3L
-
-PVOID
-DDKAPI
-DrvQueryFontTree(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ ULONG_PTR iFile,
- /*IN*/ ULONG iFace,
- /*IN*/ ULONG iMode,
- /*IN*/ ULONG_PTR *pid);
-
-PFD_GLYPHATTR
-DDKAPI
-DrvQueryGlyphAttrs(
- /*IN*/ FONTOBJ *pfo,
- /*IN*/ ULONG iMode);
-
-ULONG
-DDKAPI
-DrvQueryPerBandInfo(
- /*IN*/ SURFOBJ *pso,
- /*IN OUT*/ PERBANDINFO *pbi);
-
-/* DrvQueryTrueTypeOutline.bMetricsOnly constants */
-#define TTO_METRICS_ONLY 0x00000001
-#define TTO_QUBICS 0x00000002
-#define TTO_UNHINTED 0x00000004
-
-LONG
-DDKAPI
-DrvQueryTrueTypeOutline(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ FONTOBJ *pfo,
- /*IN*/ HGLYPH hglyph,
- /*IN*/ BOOL bMetricsOnly,
- /*IN*/ GLYPHDATA *pgldt,
- /*IN*/ ULONG cjBuf,
-
- /*OUT*/ TTPOLYGONHEADER *ppoly);
-
-LONG
-DDKAPI
-DrvQueryTrueTypeTable(
- /*IN*/ ULONG_PTR iFile,
- /*IN*/ ULONG ulFont,
- /*IN*/ ULONG ulTag,
- /*IN*/ PTRDIFF dpStart,
- /*IN*/ ULONG cjBuf,
-
- /*OUT*/ BYTE *pjBuf,
-
- /*OUT*/ PBYTE *ppjTable,
-
- /*OUT*/ ULONG *pcjTable);
-
-/* DrvRealizeBrush.iHatch constants */
-#define RB_DITHERCOLOR 0x80000000L
-
-#define HS_DDI_MAX 6
-
-BOOL
-DDKAPI
-DrvRealizeBrush(
- /*IN*/ BRUSHOBJ *pbo,
- /*IN*/ SURFOBJ *psoTarget,
- /*IN*/ SURFOBJ *psoPattern,
- /*IN*/ SURFOBJ *psoMask,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ ULONG iHatch);
-
-/* DrvResetDevice return values */
-#define DRD_SUCCESS 0
-#define DRD_ERROR 1
-
-ULONG
-DDKAPI
-DrvResetDevice(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ PVOID Reserved);
-
-BOOL
-DDKAPI
-DrvResetPDEV(
- DHPDEV dhpdevOld,
- DHPDEV dhpdevNew);
-
-/* DrvSaveScreenBits.iMode constants */
-#define SS_SAVE 0x00000000
-#define SS_RESTORE 0x00000001
-#define SS_FREE 0x00000002
-
-ULONG_PTR
-DDKAPI
-DrvSaveScreenBits(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ ULONG iMode,
- /*IN*/ ULONG_PTR ident,
- /*IN*/ RECTL *prcl);
-
-BOOL
-DDKAPI
-DrvSendPage(
- /*IN*/ SURFOBJ *pso);
-
-BOOL
-DDKAPI
-DrvSetPalette(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ PALOBJ *ppalo,
- /*IN*/ FLONG fl,
- /*IN*/ ULONG iStart,
- /*IN*/ ULONG cColors);
-
-BOOL
-DDKAPI
-DrvSetPixelFormat(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ LONG iPixelFormat,
- /*IN*/ HWND hwnd);
-
-/* DrvSetPointerShape return values */
-#define SPS_ERROR 0x00000000
-#define SPS_DECLINE 0x00000001
-#define SPS_ACCEPT_NOEXCLUDE 0x00000002
-#define SPS_ACCEPT_EXCLUDE 0x00000003
-#define SPS_ACCEPT_SYNCHRONOUS 0x00000004
-
-/* DrvSetPointerShape.fl constants */
-#define SPS_CHANGE 0x00000001L
-#define SPS_ASYNCCHANGE 0x00000002L
-#define SPS_ANIMATESTART 0x00000004L
-#define SPS_ANIMATEUPDATE 0x00000008L
-#define SPS_ALPHA 0x00000010L
-#define SPS_LENGTHMASK 0x00000F00L
-#define SPS_FREQMASK 0x000FF000L
-
-ULONG
-DDKAPI
-DrvSetPointerShape(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ SURFOBJ *psoMask,
- /*IN*/ SURFOBJ *psoColor,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ LONG xHot,
- /*IN*/ LONG yHot,
- /*IN*/ LONG x,
- /*IN*/ LONG y,
- /*IN*/ RECTL *prcl,
- /*IN*/ FLONG fl);
-
-BOOL
-DDKAPI
-DrvStartBanding(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ POINTL *pptl);
-
-BOOL
-DDKAPI
-DrvStartDoc(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ LPWSTR pwszDocName,
- /*IN*/ DWORD dwJobId);
-
-BOOL
-DDKAPI
-DrvStartPage(
- /*IN*/ SURFOBJ *pso);
-
-BOOL
-DDKAPI
-DrvStretchBlt(
- /*IN*/ SURFOBJ *psoDest,
- /*IN*/ SURFOBJ *psoSrc,
- /*IN*/ SURFOBJ *psoMask,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ COLORADJUSTMENT *pca,
- /*IN*/ POINTL *pptlHTOrg,
- /*IN*/ RECTL *prclDest,
- /*IN*/ RECTL *prclSrc,
- /*IN*/ POINTL *pptlMask,
- /*IN*/ ULONG iMode);
-
-BOOL
-DDKAPI
-DrvStretchBltROP(
- /*IN*/ SURFOBJ *psoDest,
- /*IN*/ SURFOBJ *psoSrc,
- /*IN*/ SURFOBJ *psoMask,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ COLORADJUSTMENT *pca,
- /*IN*/ POINTL *pptlHTOrg,
- /*IN*/ RECTL *prclDest,
- /*IN*/ RECTL *prclSrc,
- /*IN*/ POINTL *pptlMask,
- /*IN*/ ULONG iMode,
- /*IN*/ BRUSHOBJ *pbo,
- /*IN*/ DWORD rop4);
-
-BOOL
-DDKAPI
-DrvStrokeAndFillPath(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ PATHOBJ *ppo,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XFORMOBJ *pxo,
- /*IN*/ BRUSHOBJ *pboStroke,
- /*IN*/ LINEATTRS *plineattrs,
- /*IN*/ BRUSHOBJ *pboFill,
- /*IN*/ POINTL *pptlBrushOrg,
- /*IN*/ MIX mixFill,
- /*IN*/ FLONG flOptions);
-
-BOOL
-DDKAPI
-DrvStrokePath(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ PATHOBJ *ppo,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XFORMOBJ *pxo,
- /*IN*/ BRUSHOBJ *pbo,
- /*IN*/ POINTL *pptlBrushOrg,
- /*IN*/ LINEATTRS *plineattrs,
- /*IN*/ MIX mix);
-
-BOOL
-DDKAPI
-DrvSwapBuffers(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ WNDOBJ *pwo);
-
-VOID
-DDKAPI
-DrvSynchronize(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ RECTL *prcl);
-
-/* DrvSynchronizeSurface.fl constants */
-#define DSS_TIMER_EVENT 0x00000001
-#define DSS_FLUSH_EVENT 0x00000002
-
-VOID
-DDKAPI
-DrvSynchronizeSurface(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ RECTL *prcl,
- /*IN*/ FLONG fl);
-
-BOOL
-DDKAPI
-DrvTextOut(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ STROBJ *pstro,
- /*IN*/ FONTOBJ *pfo,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ RECTL *prclExtra,
- /*IN*/ RECTL *prclOpaque,
- /*IN*/ BRUSHOBJ *pboFore,
- /*IN*/ BRUSHOBJ *pboOpaque,
- /*IN*/ POINTL *pptlOrg,
- /*IN*/ MIX mix);
-
-BOOL
-DDKAPI
-DrvTransparentBlt(
- /*IN*/ SURFOBJ *psoDst,
- /*IN*/ SURFOBJ *psoSrc,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ RECTL *prclDst,
- /*IN*/ RECTL *prclSrc,
- /*IN*/ ULONG iTransColor,
- /*IN*/ ULONG ulReserved);
-
-BOOL
-DDKAPI
-DrvUnloadFontFile(
- /*IN*/ ULONG_PTR iFile);
-
-/* WNDOBJCHANGEPROC.fl constants */
-#define WOC_RGN_CLIENT_DELTA 0x00000001
-#define WOC_RGN_CLIENT 0x00000002
-#define WOC_RGN_SURFACE_DELTA 0x00000004
-#define WOC_RGN_SURFACE 0x00000008
-#define WOC_CHANGED 0x00000010
-#define WOC_DELETE 0x00000020
-#define WOC_DRAWN 0x00000040
-#define WOC_SPRITE_OVERLAP 0x00000080
-#define WOC_SPRITE_NO_OVERLAP 0x00000100
-
-typedef VOID DDKAPI
-(CALLBACK * WNDOBJCHANGEPROC)(
- WNDOBJ *pwo,
- FLONG fl);
-
-
-typedef BOOL DDKAPI
-(*PFN_DrvAlphaBlend)(
- /*IN*/ SURFOBJ *psoDest,
- /*IN*/ SURFOBJ *psoSrc,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ RECTL *prclDest,
- /*IN*/ RECTL *prclSrc,
- /*IN*/ BLENDOBJ *pBlendObj);
-
-typedef BOOL DDKAPI
-(*PFN_DrvAssertMode)(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ BOOL bEnable);
-
-typedef BOOL DDKAPI
-(*PFN_DrvBitBlt)(
- /*IN*/ SURFOBJ *psoTrg,
- /*IN*/ SURFOBJ *psoSrc,
- /*IN*/ SURFOBJ *psoMask,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ RECTL *prclTrg,
- /*IN*/ POINTL *pptlSrc,
- /*IN*/ POINTL *pptlMask,
- /*IN*/ BRUSHOBJ *pbo,
- /*IN*/ POINTL *pptlBrush,
- /*IN*/ ROP4 rop4);
-
-typedef VOID DDKAPI
-(*PFN_DrvCompletePDEV)(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ HDEV hdev);
-
-typedef BOOL DDKAPI
-(*PFN_DrvCopyBits)(
- /*IN*/ SURFOBJ *psoDest,
- /*IN*/ SURFOBJ *psoSrc,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ RECTL *prclDest,
- /*IN*/ POINTL *pptlSrc);
-
-typedef HBITMAP DDKAPI
-(*PFN_DrvCreateDeviceBitmap)(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ SIZEL sizl,
- /*IN*/ ULONG iFormat);
-
-typedef VOID DDKAPI
-(*PFN_DrvDeleteDeviceBitmap)(
- /*IN*/ DHSURF dhsurf);
-
-typedef HBITMAP DDKAPI
-(*PFN_DrvDeriveSurface)(
- DD_DIRECTDRAW_GLOBAL *pDirectDraw,
- DD_SURFACE_LOCAL *pSurface);
-
-typedef LONG DDKAPI
-(*PFN_DrvDescribePixelFormat)(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ LONG iPixelFormat,
- /*IN*/ ULONG cjpfd,
-
- /*OUT*/ PIXELFORMATDESCRIPTOR *ppfd);
-
-typedef VOID DDKAPI
-(*PFN_DrvDestroyFont)(
- /*IN*/ FONTOBJ *pfo);
-
-typedef VOID DDKAPI
-(*PFN_DrvDisableDriver)(
- VOID);
-
-typedef VOID DDKAPI
-(*PFN_DrvDisablePDEV)(
- /*IN*/ DHPDEV dhpdev);
-
-typedef VOID DDKAPI
-(*PFN_DrvDisableSurface)(
- /*IN*/ DHPDEV dhpdev);
-
-typedef ULONG DDKAPI
-(*PFN_DrvDitherColor)(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ ULONG iMode,
- /*IN*/ ULONG rgb,
-
- /*OUT*/ ULONG *pul);
-
-typedef ULONG DDKAPI
-(*PFN_DrvDrawEscape)(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ ULONG iEsc,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ RECTL *prcl,
- /*IN*/ ULONG cjIn,
- /*IN*/ PVOID pvIn);
-
-typedef BOOL DDKAPI
-(*PFN_DrvEnableDriver)(
- /*IN*/ ULONG iEngineVersion,
- /*IN*/ ULONG cj,
-
- /*OUT*/ DRVENABLEDATA *pded);
-#if 0
-typedef DHPDEV DDKAPI
-(*PFN_DrvEnablePDEV)(
- /*IN*/ DEVMODEW *pdm,
- /*IN*/ LPWSTR pwszLogAddress,
- /*IN*/ ULONG cPat,
-
- /*OUT*/ HSURF *phsurfPatterns,
- /*IN*/ ULONG cjCaps,
-
- /*OUT*/ ULONG *pdevcaps,
- /*IN*/ ULONG cjDevInfo,
-
- /*OUT*/ DEVINFO *pdi,
- /*IN*/ HDEV hdev,
- /*IN*/ LPWSTR pwszDeviceName,
- /*IN*/ HANDLE hDriver);
-#endif
-typedef HSURF DDKAPI
-(*PFN_DrvEnableSurface)(
- /*IN*/ DHPDEV dhpdev);
-
-typedef BOOL DDKAPI
-(*PFN_DrvEndDoc)(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ FLONG fl);
-
-typedef ULONG DDKAPI
-(*PFN_DrvEscape)(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ ULONG iEsc,
- /*IN*/ ULONG cjIn,
- /*IN*/ PVOID pvIn,
- /*IN*/ ULONG cjOut,
-
- /*OUT*/ PVOID pvOut);
-
-typedef BOOL DDKAPI
-(*PFN_DrvFillPath)(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ PATHOBJ *ppo,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ BRUSHOBJ *pbo,
- /*IN*/ POINTL *pptlBrushOrg,
- /*IN*/ MIX mix,
- /*IN*/ FLONG flOptions);
-
-typedef ULONG DDKAPI
-(*PFN_DrvFontManagement)(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ FONTOBJ *pfo,
- /*IN*/ ULONG iMode,
- /*IN*/ ULONG cjIn,
- /*IN*/ PVOID pvIn,
- /*IN*/ ULONG cjOut,
-
- /*OUT*/ PVOID pvOut);
-
-typedef VOID DDKAPI
-(*PFN_DrvFree)(
- /*IN*/ PVOID pv,
- /*IN*/ ULONG_PTR id);
-
-typedef ULONG DDKAPI
-(*PFN_DrvGetGlyphMode)(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ FONTOBJ *pfo);
-
-typedef ULONG DDKAPI
-(*PFN_DrvGetModes)(
- /*IN*/ HANDLE hDriver,
- /*IN*/ ULONG cjSize,
-
- /*OUT*/ DEVMODEW *pdm);
-
-typedef PVOID DDKAPI
-(*PFN_DrvGetTrueTypeFile)(
- /*IN*/ ULONG_PTR iFile,
- /*IN*/ ULONG *pcj);
-
-typedef BOOL DDKAPI
-(*PFN_DrvGradientFill)(
- /*IN*/ SURFOBJ *psoDest,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ TRIVERTEX *pVertex,
- /*IN*/ ULONG nVertex,
- /*IN*/ PVOID pMesh,
- /*IN*/ ULONG nMesh,
- /*IN*/ RECTL *prclExtents,
- /*IN*/ POINTL *pptlDitherOrg,
- /*IN*/ ULONG ulMode);
-
-typedef BOOL DDKAPI
-(*PFN_DrvIcmCheckBitmapBits)(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ HANDLE hColorTransform,
- /*IN*/ SURFOBJ *pso,
-
- /*OUT*/ PBYTE paResults);
-
-typedef HANDLE DDKAPI
-(*PFN_DrvIcmCreateColorTransform)(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ LPLOGCOLORSPACEW pLogColorSpace,
- /*IN*/ PVOID pvSourceProfile,
- /*IN*/ ULONG cjSourceProfile,
- /*IN*/ PVOID pvDestProfile,
- /*IN*/ ULONG cjDestProfile,
- /*IN*/ PVOID pvTargetProfile,
- /*IN*/ ULONG cjTargetProfile,
- /*IN*/ DWORD dwReserved);
-
-typedef BOOL DDKAPI
-(*PFN_DrvIcmDeleteColorTransform)(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ HANDLE hcmXform);
-
-typedef BOOL DDKAPI
-(*PFN_DrvIcmSetDeviceGammaRamp)(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ ULONG iFormat,
- /*IN*/ LPVOID lpRamp);
-
-typedef BOOL DDKAPI
-(*PFN_DrvLineTo)(
- SURFOBJ *pso,
- CLIPOBJ *pco,
- BRUSHOBJ *pbo,
- LONG x1,
- LONG y1,
- LONG x2,
- LONG y2,
- RECTL *prclBounds,
- MIX mix);
-
-typedef ULONG_PTR DDKAPI
-(*PFN_DrvLoadFontFile)(
- ULONG cFiles,
- ULONG_PTR *piFile,
- PVOID *ppvView,
- ULONG *pcjView,
- DESIGNVECTOR *pdv,
- ULONG ulLangID,
- ULONG ulFastCheckSum);
-
-typedef VOID DDKAPI
-(*PFN_DrvMovePointer)(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ LONG x,
- /*IN*/ LONG y,
- /*IN*/ RECTL *prcl);
-
-typedef BOOL DDKAPI
-(*PFN_DrvNextBand)(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ POINTL *pptl);
-
-typedef VOID DDKAPI
-(*PFN_DrvNotify)(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ ULONG iType,
- /*IN*/ PVOID pvData);
-
-typedef BOOL DDKAPI
-(*PFN_DrvOffset)(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ LONG x,
- /*IN*/ LONG y,
- /*IN*/ FLONG flReserved);
-
-typedef BOOL DDKAPI
-(*PFN_DrvPaint)(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ BRUSHOBJ *pbo,
- /*IN*/ POINTL *pptlBrushOrg,
- /*IN*/ MIX mix);
-
-typedef BOOL DDKAPI
-(*PFN_DrvPlgBlt)(
- /*IN*/ SURFOBJ *psoTrg,
- /*IN*/ SURFOBJ *psoSrc,
- /*IN*/ SURFOBJ *psoMsk,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ COLORADJUSTMENT *pca,
- /*IN*/ POINTL *pptlBrushOrg,
- /*IN*/ POINTFIX *pptfx,
- /*IN*/ RECTL *prcl,
- /*IN*/ POINTL *pptl,
- /*IN*/ ULONG iMode);
-
-typedef BOOL DDKAPI
-(*PFN_DrvQueryAdvanceWidths)(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ FONTOBJ *pfo,
- /*IN*/ ULONG iMode,
- /*IN*/ HGLYPH *phg,
-
- /*OUT*/ PVOID pvWidths,
- /*IN*/ ULONG cGlyphs);
-
-typedef BOOL DDKAPI
-(*PFN_DrvQueryDeviceSupport)(
- SURFOBJ *pso,
- XLATEOBJ *pxlo,
- XFORMOBJ *pxo,
- ULONG iType,
- ULONG cjIn,
- PVOID pvIn,
- ULONG cjOut,
- PVOID pvOut);
-
-typedef BOOL DDKAPI
-(*PFN_DrvQueryDriverInfo)(
- DWORD dwMode,
- PVOID pBuffer,
- DWORD cbBuf,
- PDWORD pcbNeeded);
-
-typedef PIFIMETRICS DDKAPI
-(*PFN_DrvQueryFont)(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ ULONG_PTR iFile,
- /*IN*/ ULONG iFace,
- /*IN*/ ULONG_PTR *pid);
-
-typedef LONG DDKAPI
-(*PFN_DrvQueryFontCaps)(
- /*IN*/ ULONG culCaps,
-
- /*OUT*/ ULONG *pulCaps);
-
-typedef LONG DDKAPI
-(*PFN_DrvQueryFontData)(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ FONTOBJ *pfo,
- /*IN*/ ULONG iMode,
- /*IN*/ HGLYPH hg,
- /*IN OUT*/ GLYPHDATA *pgd,
- /*IN OUT*/ PVOID pv,
- /*IN*/ ULONG cjSize);
-
-typedef LONG DDKAPI
-(*PFN_DrvQueryFontFile)(
- /*IN*/ ULONG_PTR iFile,
- /*IN*/ ULONG ulMode,
- /*IN*/ ULONG cjBuf,
- /*IN*/ ULONG *pulBuf);
-
-typedef PVOID DDKAPI
-(*PFN_DrvQueryFontTree)(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ ULONG_PTR iFile,
- /*IN*/ ULONG iFace,
- /*IN*/ ULONG iMode,
- /*IN*/ ULONG_PTR *pid);
-
-typedef PFD_GLYPHATTR DDKAPI
-(*PFN_DrvQueryGlyphAttrs)(
- /*IN*/ FONTOBJ *pfo,
- /*IN*/ ULONG iMode);
-
-typedef ULONG DDKAPI
-(*PFN_DrvQueryPerBandInfo)(
- /*IN*/ SURFOBJ *pso,
- /*IN OUT*/ PERBANDINFO *pbi);
-
-typedef LONG DDKAPI
-(*PFN_DrvQueryTrueTypeOutline)(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ FONTOBJ *pfo,
- /*IN*/ HGLYPH hglyph,
- /*IN*/ BOOL bMetricsOnly,
- /*IN*/ GLYPHDATA *pgldt,
- /*IN*/ ULONG cjBuf,
- /*OUT*/ TTPOLYGONHEADER *ppoly);
-
-typedef LONG DDKAPI
-(*PFN_DrvQueryTrueTypeTable)(
- /*IN*/ ULONG_PTR iFile,
- /*IN*/ ULONG ulFont,
- /*IN*/ ULONG ulTag,
- /*IN*/ PTRDIFF dpStart,
- /*IN*/ ULONG cjBuf,
- /*OUT*/ BYTE *pjBuf,
- /*OUT*/ PBYTE *ppjTable,
- /*OUT*/ ULONG *pcjTable);
-
-typedef BOOL DDKAPI
-(*PFN_DrvRealizeBrush)(
- /*IN*/ BRUSHOBJ *pbo,
- /*IN*/ SURFOBJ *psoTarget,
- /*IN*/ SURFOBJ *psoPattern,
- /*IN*/ SURFOBJ *psoMask,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ ULONG iHatch);
-
-typedef ULONG DDKAPI
-(*PFN_DrvResetDevice)(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ PVOID Reserved);
-
-typedef BOOL DDKAPI
-(*PFN_DrvResetPDEV)(
- DHPDEV dhpdevOld,
- DHPDEV dhpdevNew);
-
-typedef ULONG_PTR DDKAPI
-(*PFN_DrvSaveScreenBits)(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ ULONG iMode,
- /*IN*/ ULONG_PTR ident,
- /*IN*/ RECTL *prcl);
-
-typedef BOOL DDKAPI
-(*PFN_DrvSendPage)(
- /*IN*/ SURFOBJ *pso);
-
-typedef BOOL DDKAPI
-(*PFN_DrvSetPalette)(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ PALOBJ *ppalo,
- /*IN*/ FLONG fl,
- /*IN*/ ULONG iStart,
- /*IN*/ ULONG cColors);
-
-typedef BOOL DDKAPI
-(*PFN_DrvSetPixelFormat)(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ LONG iPixelFormat,
- /*IN*/ HWND hwnd);
-
-typedef ULONG DDKAPI
-(*PFN_DrvSetPointerShape)(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ SURFOBJ *psoMask,
- /*IN*/ SURFOBJ *psoColor,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ LONG xHot,
- /*IN*/ LONG yHot,
- /*IN*/ LONG x,
- /*IN*/ LONG y,
- /*IN*/ RECTL *prcl,
- /*IN*/ FLONG fl);
-
-typedef BOOL DDKAPI
-(*PFN_DrvStartBanding)(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ POINTL *pptl);
-
-typedef BOOL DDKAPI
-(*PFN_DrvStartDoc)(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ LPWSTR pwszDocName,
- /*IN*/ DWORD dwJobId);
-
-typedef BOOL DDKAPI
-(*PFN_DrvStartPage)(
- /*IN*/ SURFOBJ *pso);
-
-typedef BOOL DDKAPI
-(*PFN_DrvStretchBlt)(
- /*IN*/ SURFOBJ *psoDest,
- /*IN*/ SURFOBJ *psoSrc,
- /*IN*/ SURFOBJ *psoMask,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ COLORADJUSTMENT *pca,
- /*IN*/ POINTL *pptlHTOrg,
- /*IN*/ RECTL *prclDest,
- /*IN*/ RECTL *prclSrc,
- /*IN*/ POINTL *pptlMask,
- /*IN*/ ULONG iMode);
-
-typedef BOOL DDKAPI
-(*PFN_DrvStretchBltROP)(
- /*IN*/ SURFOBJ *psoDest,
- /*IN*/ SURFOBJ *psoSrc,
- /*IN*/ SURFOBJ *psoMask,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ COLORADJUSTMENT *pca,
- /*IN*/ POINTL *pptlHTOrg,
- /*IN*/ RECTL *prclDest,
- /*IN*/ RECTL *prclSrc,
- /*IN*/ POINTL *pptlMask,
- /*IN*/ ULONG iMode,
- /*IN*/ BRUSHOBJ *pbo,
- /*IN*/ DWORD rop4);
-
-typedef BOOL DDKAPI
-(*PFN_DrvStrokeAndFillPath)(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ PATHOBJ *ppo,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XFORMOBJ *pxo,
- /*IN*/ BRUSHOBJ *pboStroke,
- /*IN*/ LINEATTRS *plineattrs,
- /*IN*/ BRUSHOBJ *pboFill,
- /*IN*/ POINTL *pptlBrushOrg,
- /*IN*/ MIX mixFill,
- /*IN*/ FLONG flOptions);
-
-typedef BOOL DDKAPI
-(*PFN_DrvStrokePath)(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ PATHOBJ *ppo,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XFORMOBJ *pxo,
- /*IN*/ BRUSHOBJ *pbo,
- /*IN*/ POINTL *pptlBrushOrg,
- /*IN*/ LINEATTRS *plineattrs,
- /*IN*/ MIX mix);
-
-typedef BOOL DDKAPI
-(*PFN_DrvSwapBuffers)(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ WNDOBJ *pwo);
-
-typedef VOID DDKAPI
-(*PFN_DrvSynchronize)(
- /*IN*/ DHPDEV dhpdev,
- /*IN*/ RECTL *prcl);
-
-typedef VOID DDKAPI
-(*PFN_DrvSynchronizeSurface)(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ RECTL *prcl,
- /*IN*/ FLONG fl);
-
-typedef BOOL DDKAPI
-(*PFN_DrvTextOut)(
- /*IN*/ SURFOBJ *pso,
- /*IN*/ STROBJ *pstro,
- /*IN*/ FONTOBJ *pfo,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ RECTL *prclExtra,
- /*IN*/ RECTL *prclOpaque,
- /*IN*/ BRUSHOBJ *pboFore,
- /*IN*/ BRUSHOBJ *pboOpaque,
- /*IN*/ POINTL *pptlOrg,
- /*IN*/ MIX mix);
-
-typedef BOOL DDKAPI
-(*PFN_DrvTransparentBlt)(
- /*IN*/ SURFOBJ *psoDst,
- /*IN*/ SURFOBJ *psoSrc,
- /*IN*/ CLIPOBJ *pco,
- /*IN*/ XLATEOBJ *pxlo,
- /*IN*/ RECTL *prclDst,
- /*IN*/ RECTL *prclSrc,
- /*IN*/ ULONG iTransColor,
- /*IN*/ ULONG ulReserved);
-
-typedef BOOL DDKAPI
-(*PFN_DrvUnloadFontFile)(
- /*IN*/ ULONG_PTR iFile);
-
-
-WIN32KAPI
-VOID
-DDKAPI
-DrvDisableDirectDraw(
- /*IN*/ DHPDEV dhpdev);
-
-WIN32KAPI
-BOOL
-DDKAPI
-DrvEnableDirectDraw(
- /*IN*/ DHPDEV dhpdev,
- /*OUT*/ DD_CALLBACKS *pCallBacks,
- /*OUT*/ DD_SURFACECALLBACKS *pSurfaceCallBacks,
- /*OUT*/ DD_PALETTECALLBACKS *pPaletteCallBacks);
-
-WIN32KAPI
-BOOL
-DDKAPI
-DrvGetDirectDrawInfo(
- /*IN*/ DHPDEV dhpdev,
- /*OUT*/ DD_HALINFO *pHalInfo,
- /*OUT*/ DWORD *pdwNumHeaps,
- /*OUT*/ VIDEOMEMORY *pvmList,
- /*OUT*/ DWORD *pdwNumFourCCCodes,
- /*OUT*/ DWORD *pdwFourCC);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* defined __VIDEO_H */
-
-#endif /* __WINDDI_H */
diff --git a/winsup/w32api/include/ddk/winddk.h b/winsup/w32api/include/ddk/winddk.h
deleted file mode 100644
index 964aeef..0000000
--- a/winsup/w32api/include/ddk/winddk.h
+++ /dev/null
@@ -1,9240 +0,0 @@
-/*
- * winddk.h
- *
- * Windows Device Driver Kit
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __WINDDK_H
-#define __WINDDK_H
-
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
-** Definitions specific to this Device Driver Kit
-*/
-#define DDKAPI __stdcall
-#define DDKFASTAPI __fastcall
-#define DDKCDECLAPI __cdecl
-
-#if defined(_NTOSKRNL_)
-#ifndef NTOSAPI
-#define NTOSAPI DECL_EXPORT
-#endif
-#define DECLARE_INTERNAL_OBJECT(x) typedef struct _##x; typedef struct _##x *P##x;
-#define DECLARE_INTERNAL_OBJECT2(x,y) typedef struct _##x; typedef struct _##x *P##y;
-#else
-#ifndef NTOSAPI
-#define NTOSAPI DECL_IMPORT
-#endif
-#define DECLARE_INTERNAL_OBJECT(x) struct _##x; typedef struct _##x *P##x;
-#define DECLARE_INTERNAL_OBJECT2(x,y) struct _##x; typedef struct _##x *P##y;
-#endif
-
-/* Pseudo modifiers for parameters
- We don't use these unnecessary defines in the w32api headers. Define
- them by default since that is what people expect, but allow users
- to avoid the pollution. */
-#ifndef _NO_W32_PSEUDO_MODIFIERS
-#define IN
-#define OUT
-#define OPTIONAL
-#define UNALLIGNED
-#endif
-
-#define CONST const
-#define VOLATILE volatile
-
-#define RESTRICTED_POINTER
-#define POINTER_ALIGNMENT
-
-#ifdef NONAMELESSUNION
-# define _DDK_DUMMYUNION_MEMBER(name) DUMMYUNIONNAME.name
-# define _DDK_DUMMYUNION_N_MEMBER(n, name) DUMMYUNIONNAME##n.name
-#else
-# define _DDK_DUMMYUNION_MEMBER(name) name
-# define _DDK_DUMMYUNION_N_MEMBER(n, name) name
-#endif
-
-/*
-** Forward declarations
-*/
-
-struct _IRP;
-struct _MDL;
-struct _KAPC;
-struct _KDPC;
-struct _KPCR;
-struct _KPRCB;
-struct _KTSS;
-struct _FILE_OBJECT;
-struct _DMA_ADAPTER;
-struct _DEVICE_OBJECT;
-struct _DRIVER_OBJECT;
-struct _SECTION_OBJECT;
-struct _IO_STATUS_BLOCK;
-struct _DEVICE_DESCRIPTION;
-struct _SCATTER_GATHER_LIST;
-
-DECLARE_INTERNAL_OBJECT(ADAPTER_OBJECT)
-DECLARE_INTERNAL_OBJECT(DMA_ADAPTER)
-DECLARE_INTERNAL_OBJECT(IO_STATUS_BLOCK)
-DECLARE_INTERNAL_OBJECT(SECTION_OBJECT)
-
-#if 1
-/* FIXME: Unknown definitions */
-struct _SET_PARTITION_INFORMATION_EX;
-typedef ULONG WAIT_TYPE;
-typedef HANDLE TRACEHANDLE;
-typedef PVOID PWMILIB_CONTEXT;
-typedef PVOID PSYSCTL_IRP_DISPOSITION;
-typedef ULONG LOGICAL;
-#endif
-
-/*
-** Routines specific to this DDK
-*/
-
-#define TAG(_a, _b, _c, _d) (ULONG) \
- (((_a) << 0) + ((_b) << 8) + ((_c) << 16) + ((_d) << 24))
-
-#ifdef __GNUC__
-static __inline struct _KPCR * KeGetCurrentKPCR(
- VOID)
-{
- ULONG Value;
-
- __asm__ __volatile__ (
-#if (__GNUC__ >= 3)
- /* support -masm=intel */
- "mov{l} {%%fs:0x18, %0|%0, %%fs:0x18}\n\t"
-#else
- "movl %%fs:0x18, %0\n\t"
-#endif
- : "=r" (Value)
- : /* no inputs */
- );
- return (struct _KPCR *) Value;
-}
-
-#elif defined( __WATCOMC__ )
-
-extern struct _KPCR * KeGetCurrentKPCR( void );
-#pragma aux KeGetCurrentKPCR = \
- "mov eax, fs:[0x18]" \
- value [ eax ];
-
-#endif
-
-/*
-** Simple structures
-*/
-
-typedef LONG KPRIORITY;
-typedef UCHAR KIRQL, *PKIRQL;
-typedef ULONG_PTR KSPIN_LOCK, *PKSPIN_LOCK;
-typedef ULONG_PTR KAFFINITY, *PKAFFINITY;
-typedef CCHAR KPROCESSOR_MODE;
-
-typedef enum _MODE {
- KernelMode,
- UserMode,
- MaximumMode
-} MODE;
-
-
-/* Structures not exposed to drivers */
-typedef struct _IO_TIMER *PIO_TIMER;
-typedef struct _EPROCESS *PEPROCESS;
-typedef struct _ETHREAD *PETHREAD;
-typedef struct _KINTERRUPT *PKINTERRUPT;
-typedef struct _OBJECT_TYPE *POBJECT_TYPE;
-typedef struct _KTHREAD *PKTHREAD, *PRKTHREAD;
-typedef struct _COMPRESSED_DATA_INFO *PCOMPRESSED_DATA_INFO;
-typedef struct _HAL_DISPATCH_TABLE *PHAL_DISPATCH_TABLE;
-typedef struct _HAL_PRIVATE_DISPATCH_TABLE *PHAL_PRIVATE_DISPATCH_TABLE;
-typedef struct _DRIVE_LAYOUT_INFORMATION *PDRIVE_LAYOUT_INFORMATION;
-typedef struct _DRIVE_LAYOUT_INFORMATION_EX *PDRIVE_LAYOUT_INFORMATION_EX;
-
-/* Constants */
-#define MAXIMUM_PROCESSORS 32
-
-#define MAXIMUM_WAIT_OBJECTS 64
-
-#define METHOD_BUFFERED 0
-#define METHOD_IN_DIRECT 1
-#define METHOD_OUT_DIRECT 2
-#define METHOD_NEITHER 3
-
-#define LOW_PRIORITY 0
-#define LOW_REALTIME_PRIORITY 16
-#define HIGH_PRIORITY 31
-#define MAXIMUM_PRIORITY 32
-
-#define FILE_SUPERSEDED 0x00000000
-#define FILE_OPENED 0x00000001
-#define FILE_CREATED 0x00000002
-#define FILE_OVERWRITTEN 0x00000003
-#define FILE_EXISTS 0x00000004
-#define FILE_DOES_NOT_EXIST 0x00000005
-
-/* also in winnt.h */
-#define FILE_LIST_DIRECTORY 0x00000001
-#define FILE_READ_DATA 0x00000001
-#define FILE_ADD_FILE 0x00000002
-#define FILE_WRITE_DATA 0x00000002
-#define FILE_ADD_SUBDIRECTORY 0x00000004
-#define FILE_APPEND_DATA 0x00000004
-#define FILE_CREATE_PIPE_INSTANCE 0x00000004
-#define FILE_READ_EA 0x00000008
-#define FILE_WRITE_EA 0x00000010
-#define FILE_EXECUTE 0x00000020
-#define FILE_TRAVERSE 0x00000020
-#define FILE_DELETE_CHILD 0x00000040
-#define FILE_READ_ATTRIBUTES 0x00000080
-#define FILE_WRITE_ATTRIBUTES 0x00000100
-
-#define FILE_SHARE_READ 0x00000001
-#define FILE_SHARE_WRITE 0x00000002
-#define FILE_SHARE_DELETE 0x00000004
-#define FILE_SHARE_VALID_FLAGS 0x00000007
-
-#define FILE_ATTRIBUTE_READONLY 0x00000001
-#define FILE_ATTRIBUTE_HIDDEN 0x00000002
-#define FILE_ATTRIBUTE_SYSTEM 0x00000004
-#define FILE_ATTRIBUTE_DIRECTORY 0x00000010
-#define FILE_ATTRIBUTE_ARCHIVE 0x00000020
-#define FILE_ATTRIBUTE_DEVICE 0x00000040
-#define FILE_ATTRIBUTE_NORMAL 0x00000080
-#define FILE_ATTRIBUTE_TEMPORARY 0x00000100
-#define FILE_ATTRIBUTE_SPARSE_FILE 0x00000200
-#define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400
-#define FILE_ATTRIBUTE_COMPRESSED 0x00000800
-#define FILE_ATTRIBUTE_OFFLINE 0x00001000
-#define FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x00002000
-#define FILE_ATTRIBUTE_ENCRYPTED 0x00004000
-
-#define FILE_ATTRIBUTE_VALID_FLAGS 0x00007fb7
-#define FILE_ATTRIBUTE_VALID_SET_FLAGS 0x000031a7
-
-#define FILE_COPY_STRUCTURED_STORAGE 0x00000041
-#define FILE_STRUCTURED_STORAGE 0x00000441
-
-#define FILE_VALID_OPTION_FLAGS 0x00ffffff
-#define FILE_VALID_PIPE_OPTION_FLAGS 0x00000032
-#define FILE_VALID_MAILSLOT_OPTION_FLAGS 0x00000032
-#define FILE_VALID_SET_FLAGS 0x00000036
-
-#define FILE_SUPERSEDE 0x00000000
-#define FILE_OPEN 0x00000001
-#define FILE_CREATE 0x00000002
-#define FILE_OPEN_IF 0x00000003
-#define FILE_OVERWRITE 0x00000004
-#define FILE_OVERWRITE_IF 0x00000005
-#define FILE_MAXIMUM_DISPOSITION 0x00000005
-
-#define FILE_DIRECTORY_FILE 0x00000001
-#define FILE_WRITE_THROUGH 0x00000002
-#define FILE_SEQUENTIAL_ONLY 0x00000004
-#define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008
-#define FILE_SYNCHRONOUS_IO_ALERT 0x00000010
-#define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
-#define FILE_NON_DIRECTORY_FILE 0x00000040
-#define FILE_CREATE_TREE_CONNECTION 0x00000080
-#define FILE_COMPLETE_IF_OPLOCKED 0x00000100
-#define FILE_NO_EA_KNOWLEDGE 0x00000200
-#define FILE_OPEN_FOR_RECOVERY 0x00000400
-#define FILE_RANDOM_ACCESS 0x00000800
-#define FILE_DELETE_ON_CLOSE 0x00001000
-#define FILE_OPEN_BY_FILE_ID 0x00002000
-#define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000
-#define FILE_NO_COMPRESSION 0x00008000
-#define FILE_RESERVE_OPFILTER 0x00100000
-#define FILE_OPEN_REPARSE_POINT 0x00200000
-#define FILE_OPEN_NO_RECALL 0x00400000
-#define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000
-
-#define FILE_ANY_ACCESS 0x00000000
-#define FILE_SPECIAL_ACCESS FILE_ANY_ACCESS
-#define FILE_READ_ACCESS 0x00000001
-#define FILE_WRITE_ACCESS 0x00000002
-
-#define FILE_ALL_ACCESS \
- (STANDARD_RIGHTS_REQUIRED | \
- SYNCHRONIZE | \
- 0x1FF)
-
-#define FILE_GENERIC_EXECUTE \
- (STANDARD_RIGHTS_EXECUTE | \
- FILE_READ_ATTRIBUTES | \
- FILE_EXECUTE | \
- SYNCHRONIZE)
-
-#define FILE_GENERIC_READ \
- (STANDARD_RIGHTS_READ | \
- FILE_READ_DATA | \
- FILE_READ_ATTRIBUTES | \
- FILE_READ_EA | \
- SYNCHRONIZE)
-
-#define FILE_GENERIC_WRITE \
- (STANDARD_RIGHTS_WRITE | \
- FILE_WRITE_DATA | \
- FILE_WRITE_ATTRIBUTES | \
- FILE_WRITE_EA | \
- FILE_APPEND_DATA | \
- SYNCHRONIZE)
-/* end winnt.h */
-
-#define DIRECTORY_QUERY (0x0001)
-#define DIRECTORY_TRAVERSE (0x0002)
-#define DIRECTORY_CREATE_OBJECT (0x0004)
-#define DIRECTORY_CREATE_SUBDIRECTORY (0x0008)
-#define DIRECTORY_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0xF)
-
-/* Exported object types */
-extern NTOSAPI POBJECT_TYPE ExDesktopObjectType;
-extern NTOSAPI POBJECT_TYPE ExEventObjectType;
-extern NTOSAPI POBJECT_TYPE ExSemaphoreObjectType;
-extern NTOSAPI POBJECT_TYPE ExWindowStationObjectType;
-extern NTOSAPI POBJECT_TYPE IoAdapterObjectType;
-extern NTOSAPI ULONG IoDeviceHandlerObjectSize;
-extern NTOSAPI POBJECT_TYPE IoDeviceHandlerObjectType;
-extern NTOSAPI POBJECT_TYPE IoDeviceObjectType;
-extern NTOSAPI POBJECT_TYPE IoDriverObjectType;
-extern NTOSAPI POBJECT_TYPE IoFileObjectType;
-extern NTOSAPI POBJECT_TYPE LpcPortObjectType;
-extern NTOSAPI POBJECT_TYPE MmSectionObjectType;
-extern NTOSAPI POBJECT_TYPE SeTokenObjectType;
-
-extern NTOSAPI CCHAR KeNumberProcessors;
-extern NTOSAPI PHAL_DISPATCH_TABLE HalDispatchTable;
-extern NTOSAPI PHAL_PRIVATE_DISPATCH_TABLE HalPrivateDispatchTable;
-
-
-/*
-** IRP function codes
-*/
-
-#define IRP_MJ_CREATE 0x00
-#define IRP_MJ_CREATE_NAMED_PIPE 0x01
-#define IRP_MJ_CLOSE 0x02
-#define IRP_MJ_READ 0x03
-#define IRP_MJ_WRITE 0x04
-#define IRP_MJ_QUERY_INFORMATION 0x05
-#define IRP_MJ_SET_INFORMATION 0x06
-#define IRP_MJ_QUERY_EA 0x07
-#define IRP_MJ_SET_EA 0x08
-#define IRP_MJ_FLUSH_BUFFERS 0x09
-#define IRP_MJ_QUERY_VOLUME_INFORMATION 0x0a
-#define IRP_MJ_SET_VOLUME_INFORMATION 0x0b
-#define IRP_MJ_DIRECTORY_CONTROL 0x0c
-#define IRP_MJ_FILE_SYSTEM_CONTROL 0x0d
-#define IRP_MJ_DEVICE_CONTROL 0x0e
-#define IRP_MJ_INTERNAL_DEVICE_CONTROL 0x0f
-#define IRP_MJ_SCSI 0x0f
-#define IRP_MJ_SHUTDOWN 0x10
-#define IRP_MJ_LOCK_CONTROL 0x11
-#define IRP_MJ_CLEANUP 0x12
-#define IRP_MJ_CREATE_MAILSLOT 0x13
-#define IRP_MJ_QUERY_SECURITY 0x14
-#define IRP_MJ_SET_SECURITY 0x15
-#define IRP_MJ_POWER 0x16
-#define IRP_MJ_SYSTEM_CONTROL 0x17
-#define IRP_MJ_DEVICE_CHANGE 0x18
-#define IRP_MJ_QUERY_QUOTA 0x19
-#define IRP_MJ_SET_QUOTA 0x1a
-#define IRP_MJ_PNP 0x1b
-#define IRP_MJ_PNP_POWER 0x1b
-#define IRP_MJ_MAXIMUM_FUNCTION 0x1b
-
-#define IRP_MN_QUERY_DIRECTORY 0x01
-#define IRP_MN_NOTIFY_CHANGE_DIRECTORY 0x02
-
-#define IRP_MN_USER_FS_REQUEST 0x00
-#define IRP_MN_MOUNT_VOLUME 0x01
-#define IRP_MN_VERIFY_VOLUME 0x02
-#define IRP_MN_LOAD_FILE_SYSTEM 0x03
-#define IRP_MN_TRACK_LINK 0x04
-#define IRP_MN_KERNEL_CALL 0x04
-
-#define IRP_MN_LOCK 0x01
-#define IRP_MN_UNLOCK_SINGLE 0x02
-#define IRP_MN_UNLOCK_ALL 0x03
-#define IRP_MN_UNLOCK_ALL_BY_KEY 0x04
-
-#define IRP_MN_NORMAL 0x00
-#define IRP_MN_DPC 0x01
-#define IRP_MN_MDL 0x02
-#define IRP_MN_COMPLETE 0x04
-#define IRP_MN_COMPRESSED 0x08
-
-#define IRP_MN_MDL_DPC (IRP_MN_MDL | IRP_MN_DPC)
-#define IRP_MN_COMPLETE_MDL (IRP_MN_COMPLETE | IRP_MN_MDL)
-#define IRP_MN_COMPLETE_MDL_DPC (IRP_MN_COMPLETE_MDL | IRP_MN_DPC)
-
-#define IRP_MN_SCSI_CLASS 0x01
-
-#define IRP_MN_START_DEVICE 0x00
-#define IRP_MN_QUERY_REMOVE_DEVICE 0x01
-#define IRP_MN_REMOVE_DEVICE 0x02
-#define IRP_MN_CANCEL_REMOVE_DEVICE 0x03
-#define IRP_MN_STOP_DEVICE 0x04
-#define IRP_MN_QUERY_STOP_DEVICE 0x05
-#define IRP_MN_CANCEL_STOP_DEVICE 0x06
-
-#define IRP_MN_QUERY_DEVICE_RELATIONS 0x07
-#define IRP_MN_QUERY_INTERFACE 0x08
-#define IRP_MN_QUERY_CAPABILITIES 0x09
-#define IRP_MN_QUERY_RESOURCES 0x0A
-#define IRP_MN_QUERY_RESOURCE_REQUIREMENTS 0x0B
-#define IRP_MN_QUERY_DEVICE_TEXT 0x0C
-#define IRP_MN_FILTER_RESOURCE_REQUIREMENTS 0x0D
-
-#define IRP_MN_READ_CONFIG 0x0F
-#define IRP_MN_WRITE_CONFIG 0x10
-#define IRP_MN_EJECT 0x11
-#define IRP_MN_SET_LOCK 0x12
-#define IRP_MN_QUERY_ID 0x13
-#define IRP_MN_QUERY_PNP_DEVICE_STATE 0x14
-#define IRP_MN_QUERY_BUS_INFORMATION 0x15
-#define IRP_MN_DEVICE_USAGE_NOTIFICATION 0x16
-#define IRP_MN_SURPRISE_REMOVAL 0x17
-#define IRP_MN_QUERY_LEGACY_BUS_INFORMATION 0x18
-
-#define IRP_MN_WAIT_WAKE 0x00
-#define IRP_MN_POWER_SEQUENCE 0x01
-#define IRP_MN_SET_POWER 0x02
-#define IRP_MN_QUERY_POWER 0x03
-
-#define IRP_MN_QUERY_ALL_DATA 0x00
-#define IRP_MN_QUERY_SINGLE_INSTANCE 0x01
-#define IRP_MN_CHANGE_SINGLE_INSTANCE 0x02
-#define IRP_MN_CHANGE_SINGLE_ITEM 0x03
-#define IRP_MN_ENABLE_EVENTS 0x04
-#define IRP_MN_DISABLE_EVENTS 0x05
-#define IRP_MN_ENABLE_COLLECTION 0x06
-#define IRP_MN_DISABLE_COLLECTION 0x07
-#define IRP_MN_REGINFO 0x08
-#define IRP_MN_EXECUTE_METHOD 0x09
-
-#define IRP_MN_REGINFO_EX 0x0b
-
-typedef enum _IO_ALLOCATION_ACTION {
- KeepObject = 1,
- DeallocateObject,
- DeallocateObjectKeepRegisters
-} IO_ALLOCATION_ACTION, *PIO_ALLOCATION_ACTION;
-
-typedef IO_ALLOCATION_ACTION
-(DDKAPI *PDRIVER_CONTROL)(
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject,
- /*IN*/ struct _IRP *Irp,
- /*IN*/ PVOID MapRegisterBase,
- /*IN*/ PVOID Context);
-
-typedef VOID
-(DDKAPI *PDRIVER_LIST_CONTROL)(
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject,
- /*IN*/ struct _IRP *Irp,
- /*IN*/ struct _SCATTER_GATHER_LIST *ScatterGather,
- /*IN*/ PVOID Context);
-
-typedef NTSTATUS
-(DDKAPI *PDRIVER_ADD_DEVICE)(
- /*IN*/ struct _DRIVER_OBJECT *DriverObject,
- /*IN*/ struct _DEVICE_OBJECT *PhysicalDeviceObject);
-
-typedef NTSTATUS
-(DDKAPI *PIO_COMPLETION_ROUTINE)(
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject,
- /*IN*/ struct _IRP *Irp,
- /*IN*/ PVOID Context);
-
-typedef VOID
-(DDKAPI *PDRIVER_CANCEL)(
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject,
- /*IN*/ struct _IRP *Irp);
-
-typedef VOID
-(DDKAPI *PKDEFERRED_ROUTINE)(
- /*IN*/ struct _KDPC *Dpc,
- /*IN*/ PVOID DeferredContext,
- /*IN*/ PVOID SystemArgument1,
- /*IN*/ PVOID SystemArgument2);
-
-typedef NTSTATUS
-(DDKAPI *PDRIVER_DISPATCH)(
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject,
- /*IN*/ struct _IRP *Irp);
-
-typedef VOID
-(DDKAPI *PIO_DPC_ROUTINE)(
- /*IN*/ struct _KDPC *Dpc,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject,
- /*IN*/ struct _IRP *Irp,
- /*IN*/ PVOID Context);
-
-typedef NTSTATUS
-(DDKAPI *PMM_DLL_INITIALIZE)(
- /*IN*/ PUNICODE_STRING RegistryPath);
-
-typedef NTSTATUS
-(DDKAPI *PMM_DLL_UNLOAD)(
- VOID);
-
-typedef NTSTATUS
-(DDKAPI *PDRIVER_ENTRY)(
- /*IN*/ struct _DRIVER_OBJECT *DriverObject,
- /*IN*/ PUNICODE_STRING RegistryPath);
-
-typedef NTSTATUS
-(DDKAPI *PDRIVER_INITIALIZE)(
- /*IN*/ struct _DRIVER_OBJECT *DriverObject,
- /*IN*/ PUNICODE_STRING RegistryPath);
-
-typedef BOOLEAN
-(DDKAPI *PKSERVICE_ROUTINE)(
- /*IN*/ struct _KINTERRUPT *Interrupt,
- /*IN*/ PVOID ServiceContext);
-
-typedef VOID
-(DDKAPI *PIO_TIMER_ROUTINE)(
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject,
- /*IN*/ PVOID Context);
-
-typedef VOID
-(DDKAPI *PDRIVER_REINITIALIZE)(
- /*IN*/ struct _DRIVER_OBJECT *DriverObject,
- /*IN*/ PVOID Context,
- /*IN*/ ULONG Count);
-
-typedef NTSTATUS
-(DDKAPI *PDRIVER_STARTIO)(
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject,
- /*IN*/ struct _IRP *Irp);
-
-typedef BOOLEAN
-(DDKAPI *PKSYNCHRONIZE_ROUTINE)(
- /*IN*/ PVOID SynchronizeContext);
-
-typedef VOID
-(DDKAPI *PDRIVER_UNLOAD)(
- /*IN*/ struct _DRIVER_OBJECT *DriverObject);
-
-
-
-/*
-** Plug and Play structures
-*/
-
-typedef VOID DDKAPI
-(*PINTERFACE_REFERENCE)(
- PVOID Context);
-
-typedef VOID DDKAPI
-(*PINTERFACE_DEREFERENCE)(
- PVOID Context);
-
-typedef BOOLEAN DDKAPI
-(*PTRANSLATE_BUS_ADDRESS)(
- /*IN*/ PVOID Context,
- /*IN*/ PHYSICAL_ADDRESS BusAddress,
- /*IN*/ ULONG Length,
- /*IN OUT*/ PULONG AddressSpace,
- /*OUT*/ PPHYSICAL_ADDRESS TranslatedAddress);
-
-typedef struct _DMA_ADAPTER* DDKAPI
-(*PGET_DMA_ADAPTER)(
- /*IN*/ PVOID Context,
- /*IN*/ struct _DEVICE_DESCRIPTION *DeviceDescriptor,
- /*OUT*/ PULONG NumberOfMapRegisters);
-
-typedef ULONG DDKAPI
-(*PGET_SET_DEVICE_DATA)(
- /*IN*/ PVOID Context,
- /*IN*/ ULONG DataType,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG Offset,
- /*IN*/ ULONG Length);
-
-typedef union _POWER_STATE {
- SYSTEM_POWER_STATE SystemState;
- DEVICE_POWER_STATE DeviceState;
-} POWER_STATE, *PPOWER_STATE;
-
-typedef enum _POWER_STATE_TYPE {
- SystemPowerState,
- DevicePowerState
-} POWER_STATE_TYPE, *PPOWER_STATE_TYPE;
-
-typedef struct _BUS_INTERFACE_STANDARD {
- USHORT Size;
- USHORT Version;
- PVOID Context;
- PINTERFACE_REFERENCE InterfaceReference;
- PINTERFACE_DEREFERENCE InterfaceDereference;
- PTRANSLATE_BUS_ADDRESS TranslateBusAddress;
- PGET_DMA_ADAPTER GetDmaAdapter;
- PGET_SET_DEVICE_DATA SetBusData;
- PGET_SET_DEVICE_DATA GetBusData;
-} BUS_INTERFACE_STANDARD, *PBUS_INTERFACE_STANDARD;
-
-typedef struct _DEVICE_CAPABILITIES {
- USHORT Size;
- USHORT Version;
- ULONG DeviceD1 : 1;
- ULONG DeviceD2 : 1;
- ULONG LockSupported : 1;
- ULONG EjectSupported : 1;
- ULONG Removable : 1;
- ULONG DockDevice : 1;
- ULONG UniqueID : 1;
- ULONG SilentInstall : 1;
- ULONG RawDeviceOK : 1;
- ULONG SurpriseRemovalOK : 1;
- ULONG WakeFromD0 : 1;
- ULONG WakeFromD1 : 1;
- ULONG WakeFromD2 : 1;
- ULONG WakeFromD3 : 1;
- ULONG HardwareDisabled : 1;
- ULONG NonDynamic : 1;
- ULONG WarmEjectSupported : 1;
- ULONG NoDisplayInUI : 1;
- ULONG Reserved : 14;
- ULONG Address;
- ULONG UINumber;
- DEVICE_POWER_STATE DeviceState[PowerSystemMaximum];
- SYSTEM_POWER_STATE SystemWake;
- DEVICE_POWER_STATE DeviceWake;
- ULONG D1Latency;
- ULONG D2Latency;
- ULONG D3Latency;
-} DEVICE_CAPABILITIES, *PDEVICE_CAPABILITIES;
-
-typedef struct _DEVICE_INTERFACE_CHANGE_NOTIFICATION {
- USHORT Version;
- USHORT Size;
- GUID Event;
- GUID InterfaceClassGuid;
- PUNICODE_STRING SymbolicLinkName;
-} DEVICE_INTERFACE_CHANGE_NOTIFICATION, *PDEVICE_INTERFACE_CHANGE_NOTIFICATION;
-
-typedef struct _HWPROFILE_CHANGE_NOTIFICATION {
- USHORT Version;
- USHORT Size;
- GUID Event;
-} HWPROFILE_CHANGE_NOTIFICATION, *PHWPROFILE_CHANGE_NOTIFICATION;
-
-#undef INTERFACE
-
-typedef struct _INTERFACE {
- USHORT Size;
- USHORT Version;
- PVOID Context;
- PINTERFACE_REFERENCE InterfaceReference;
- PINTERFACE_DEREFERENCE InterfaceDereference;
-} INTERFACE, *PINTERFACE;
-
-typedef struct _PLUGPLAY_NOTIFICATION_HEADER {
- USHORT Version;
- USHORT Size;
- GUID Event;
-} PLUGPLAY_NOTIFICATION_HEADER, *PPLUGPLAY_NOTIFICATION_HEADER;
-
-typedef ULONG PNP_DEVICE_STATE, *PPNP_DEVICE_STATE;
-
-/* PNP_DEVICE_STATE */
-
-#define PNP_DEVICE_DISABLED 0x00000001
-#define PNP_DEVICE_DONT_DISPLAY_IN_UI 0x00000002
-#define PNP_DEVICE_FAILED 0x00000004
-#define PNP_DEVICE_REMOVED 0x00000008
-#define PNP_DEVICE_RESOURCE_REQUIREMENTS_CHANGED 0x00000010
-#define PNP_DEVICE_NOT_DISABLEABLE 0x00000020
-
-typedef struct _TARGET_DEVICE_CUSTOM_NOTIFICATION {
- USHORT Version;
- USHORT Size;
- GUID Event;
- struct _FILE_OBJECT *FileObject;
- LONG NameBufferOffset;
- UCHAR CustomDataBuffer[1];
-} TARGET_DEVICE_CUSTOM_NOTIFICATION, *PTARGET_DEVICE_CUSTOM_NOTIFICATION;
-
-typedef struct _TARGET_DEVICE_REMOVAL_NOTIFICATION {
- USHORT Version;
- USHORT Size;
- GUID Event;
- struct _FILE_OBJECT *FileObject;
-} TARGET_DEVICE_REMOVAL_NOTIFICATION, *PTARGET_DEVICE_REMOVAL_NOTIFICATION;
-
-typedef enum _BUS_QUERY_ID_TYPE {
- BusQueryDeviceID,
- BusQueryHardwareIDs,
- BusQueryCompatibleIDs,
- BusQueryInstanceID,
- BusQueryDeviceSerialNumber
-} BUS_QUERY_ID_TYPE, *PBUS_QUERY_ID_TYPE;
-
-typedef enum _DEVICE_TEXT_TYPE {
- DeviceTextDescription,
- DeviceTextLocationInformation
-} DEVICE_TEXT_TYPE, *PDEVICE_TEXT_TYPE;
-
-typedef enum _DEVICE_USAGE_NOTIFICATION_TYPE {
- DeviceUsageTypeUndefined,
- DeviceUsageTypePaging,
- DeviceUsageTypeHibernation,
- DeviceUsageTypeDumpFile
-} DEVICE_USAGE_NOTIFICATION_TYPE;
-
-typedef struct _POWER_SEQUENCE {
- ULONG SequenceD1;
- ULONG SequenceD2;
- ULONG SequenceD3;
-} POWER_SEQUENCE, *PPOWER_SEQUENCE;
-
-typedef enum {
- DevicePropertyDeviceDescription,
- DevicePropertyHardwareID,
- DevicePropertyCompatibleIDs,
- DevicePropertyBootConfiguration,
- DevicePropertyBootConfigurationTranslated,
- DevicePropertyClassName,
- DevicePropertyClassGuid,
- DevicePropertyDriverKeyName,
- DevicePropertyManufacturer,
- DevicePropertyFriendlyName,
- DevicePropertyLocationInformation,
- DevicePropertyPhysicalDeviceObjectName,
- DevicePropertyBusTypeGuid,
- DevicePropertyLegacyBusType,
- DevicePropertyBusNumber,
- DevicePropertyEnumeratorName,
- DevicePropertyAddress,
- DevicePropertyUINumber,
- DevicePropertyInstallState,
- DevicePropertyRemovalPolicy
-} DEVICE_REGISTRY_PROPERTY;
-
-typedef enum _IO_NOTIFICATION_EVENT_CATEGORY {
- EventCategoryReserved,
- EventCategoryHardwareProfileChange,
- EventCategoryDeviceInterfaceChange,
- EventCategoryTargetDeviceChange
-} IO_NOTIFICATION_EVENT_CATEGORY;
-
-#define PNPNOTIFY_DEVICE_INTERFACE_INCLUDE_EXISTING_INTERFACES 0x00000001
-
-typedef NTSTATUS DDKAPI
-(*PDRIVER_NOTIFICATION_CALLBACK_ROUTINE)(
- /*IN*/ PVOID NotificationStructure,
- /*IN*/ PVOID Context);
-
-typedef VOID DDKAPI
-(*PDEVICE_CHANGE_COMPLETE_CALLBACK)(
- /*IN*/ PVOID Context);
-
-
-
-/*
-** System structures
-*/
-
-#define SYMBOLIC_LINK_QUERY 0x0001
-#define SYMBOLIC_LINK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
-
-/* also in winnt,h */
-#define DUPLICATE_CLOSE_SOURCE 0x00000001
-#define DUPLICATE_SAME_ACCESS 0x00000002
-#define DUPLICATE_SAME_ATTRIBUTES 0x00000004
-/* end winnt.h */
-
-typedef struct _OBJECT_NAME_INFORMATION {
- UNICODE_STRING Name;
-} OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
-
-typedef VOID DDKAPI
-(*PIO_APC_ROUTINE)(
- /*IN*/ PVOID ApcContext,
- /*IN*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*IN*/ ULONG Reserved);
-
-typedef struct _IO_STATUS_BLOCK {
- _ANONYMOUS_UNION union {
- NTSTATUS Status;
- PVOID Pointer;
- } DUMMYUNIONNAME;
- ULONG_PTR Information;
-} IO_STATUS_BLOCK;
-
-typedef VOID DDKAPI
-(*PKNORMAL_ROUTINE)(
- /*IN*/ PVOID NormalContext,
- /*IN*/ PVOID SystemArgument1,
- /*IN*/ PVOID SystemArgument2);
-
-typedef VOID DDKAPI
-(*PKKERNEL_ROUTINE)(
- /*IN*/ struct _KAPC *Apc,
- /*IN OUT*/ PKNORMAL_ROUTINE *NormalRoutine,
- /*IN OUT*/ PVOID *NormalContext,
- /*IN OUT*/ PVOID *SystemArgument1,
- /*IN OUT*/ PVOID *SystemArgument2);
-
-typedef VOID DDKAPI
-(*PKRUNDOWN_ROUTINE)(
- /*IN*/ struct _KAPC *Apc);
-
-typedef BOOLEAN DDKAPI
-(*PKTRANSFER_ROUTINE)(
- VOID);
-
-typedef struct _KAPC {
- CSHORT Type;
- CSHORT Size;
- ULONG Spare0;
- struct _KTHREAD *Thread;
- LIST_ENTRY ApcListEntry;
- PKKERNEL_ROUTINE KernelRoutine;
- PKRUNDOWN_ROUTINE RundownRoutine;
- PKNORMAL_ROUTINE NormalRoutine;
- PVOID NormalContext;
- PVOID SystemArgument1;
- PVOID SystemArgument2;
- CCHAR ApcStateIndex;
- KPROCESSOR_MODE ApcMode;
- BOOLEAN Inserted;
-} KAPC, *PKAPC, *RESTRICTED_POINTER PRKAPC;
-
-typedef struct _KDEVICE_QUEUE {
- CSHORT Type;
- CSHORT Size;
- LIST_ENTRY DeviceListHead;
- KSPIN_LOCK Lock;
- BOOLEAN Busy;
-} KDEVICE_QUEUE, *PKDEVICE_QUEUE, *RESTRICTED_POINTER PRKDEVICE_QUEUE;
-
-typedef struct _KDEVICE_QUEUE_ENTRY {
- LIST_ENTRY DeviceListEntry;
- ULONG SortKey;
- BOOLEAN Inserted;
-} KDEVICE_QUEUE_ENTRY, *PKDEVICE_QUEUE_ENTRY,
-*RESTRICTED_POINTER PRKDEVICE_QUEUE_ENTRY;
-
-#define LOCK_QUEUE_WAIT 1
-#define LOCK_QUEUE_OWNER 2
-
-typedef enum _KSPIN_LOCK_QUEUE_NUMBER {
- LockQueueDispatcherLock,
- LockQueueContextSwapLock,
- LockQueuePfnLock,
- LockQueueSystemSpaceLock,
- LockQueueVacbLock,
- LockQueueMasterLock,
- LockQueueNonPagedPoolLock,
- LockQueueIoCancelLock,
- LockQueueWorkQueueLock,
- LockQueueIoVpbLock,
- LockQueueIoDatabaseLock,
- LockQueueIoCompletionLock,
- LockQueueNtfsStructLock,
- LockQueueAfdWorkQueueLock,
- LockQueueBcbLock,
- LockQueueMaximumLock
-} KSPIN_LOCK_QUEUE_NUMBER, *PKSPIN_LOCK_QUEUE_NUMBER;
-
-typedef struct _KSPIN_LOCK_QUEUE {
- struct _KSPIN_LOCK_QUEUE *VOLATILE Next;
- PKSPIN_LOCK VOLATILE Lock;
-} KSPIN_LOCK_QUEUE, *PKSPIN_LOCK_QUEUE;
-
-typedef struct _KLOCK_QUEUE_HANDLE {
- KSPIN_LOCK_QUEUE LockQueue;
- KIRQL OldIrql;
-} KLOCK_QUEUE_HANDLE, *PKLOCK_QUEUE_HANDLE;
-
-typedef struct _KDPC {
- CSHORT Type;
- UCHAR Number;
- UCHAR Importance;
- LIST_ENTRY DpcListEntry;
- PKDEFERRED_ROUTINE DeferredRoutine;
- PVOID DeferredContext;
- PVOID SystemArgument1;
- PVOID SystemArgument2;
- PULONG_PTR Lock;
-} KDPC, *PKDPC, *RESTRICTED_POINTER PRKDPC;
-
-typedef struct _WAIT_CONTEXT_BLOCK {
- KDEVICE_QUEUE_ENTRY WaitQueueEntry;
- struct _DRIVER_CONTROL *DeviceRoutine;
- PVOID DeviceContext;
- ULONG NumberOfMapRegisters;
- PVOID DeviceObject;
- PVOID CurrentIrp;
- PKDPC BufferChainingDpc;
-} WAIT_CONTEXT_BLOCK, *PWAIT_CONTEXT_BLOCK;
-
-typedef struct _DISPATCHER_HEADER {
- UCHAR Type;
- UCHAR Absolute;
- UCHAR Size;
- UCHAR Inserted;
- LONG SignalState;
- LIST_ENTRY WaitListHead;
-} DISPATCHER_HEADER, *PDISPATCHER_HEADER;
-
-typedef struct _KEVENT {
- DISPATCHER_HEADER Header;
-} KEVENT, *PKEVENT, *RESTRICTED_POINTER PRKEVENT;
-
-typedef struct _KSEMAPHORE {
- DISPATCHER_HEADER Header;
- LONG Limit;
-} KSEMAPHORE, *PKSEMAPHORE, *RESTRICTED_POINTER PRKSEMAPHORE;
-
-typedef struct _FAST_MUTEX {
- LONG Count;
- struct _KTHREAD *Owner;
- ULONG Contention;
- KEVENT Event;
- ULONG OldIrql;
-} FAST_MUTEX, *PFAST_MUTEX;
-
-typedef struct _KTIMER {
- DISPATCHER_HEADER Header;
- ULARGE_INTEGER DueTime;
- LIST_ENTRY TimerListEntry;
- struct _KDPC *Dpc;
- LONG Period;
-} KTIMER, *PKTIMER, *RESTRICTED_POINTER PRKTIMER;
-
-typedef struct _KMUTANT {
- DISPATCHER_HEADER Header;
- LIST_ENTRY MutantListEntry;
- struct _KTHREAD *RESTRICTED_POINTER OwnerThread;
- BOOLEAN Abandoned;
- UCHAR ApcDisable;
-} KMUTANT, *PKMUTANT, *RESTRICTED_POINTER PRKMUTANT, KMUTEX, *PKMUTEX, *RESTRICTED_POINTER PRKMUTEX;
-
-typedef enum _TIMER_TYPE {
- NotificationTimer,
- SynchronizationTimer
-} TIMER_TYPE;
-
-#define EVENT_INCREMENT 1
-#define IO_NO_INCREMENT 0
-#define IO_CD_ROM_INCREMENT 1
-#define IO_DISK_INCREMENT 1
-#define IO_KEYBOARD_INCREMENT 6
-#define IO_MAILSLOT_INCREMENT 2
-#define IO_MOUSE_INCREMENT 6
-#define IO_NAMED_PIPE_INCREMENT 2
-#define IO_NETWORK_INCREMENT 2
-#define IO_PARALLEL_INCREMENT 1
-#define IO_SERIAL_INCREMENT 2
-#define IO_SOUND_INCREMENT 8
-#define IO_VIDEO_INCREMENT 1
-#define SEMAPHORE_INCREMENT 1
-
-typedef struct _IRP {
- CSHORT Type;
- USHORT Size;
- struct _MDL *MdlAddress;
- ULONG Flags;
- union {
- struct _IRP *MasterIrp;
- LONG IrpCount;
- PVOID SystemBuffer;
- } AssociatedIrp;
- LIST_ENTRY ThreadListEntry;
- IO_STATUS_BLOCK IoStatus;
- KPROCESSOR_MODE RequestorMode;
- BOOLEAN PendingReturned;
- CHAR StackCount;
- CHAR CurrentLocation;
- BOOLEAN Cancel;
- KIRQL CancelIrql;
- CCHAR ApcEnvironment;
- UCHAR AllocationFlags;
- PIO_STATUS_BLOCK UserIosb;
- PKEVENT UserEvent;
- union {
- struct {
- PIO_APC_ROUTINE UserApcRoutine;
- PVOID UserApcContext;
- } AsynchronousParameters;
- LARGE_INTEGER AllocationSize;
- } Overlay;
- PDRIVER_CANCEL CancelRoutine;
- PVOID UserBuffer;
- union {
- struct {
- _ANONYMOUS_UNION union {
- KDEVICE_QUEUE_ENTRY DeviceQueueEntry;
- _ANONYMOUS_STRUCT struct {
- PVOID DriverContext[4];
- } DUMMYSTRUCTNAME;
- } DUMMYUNIONNAME;
- PETHREAD Thread;
- PCHAR AuxiliaryBuffer;
- _ANONYMOUS_STRUCT struct {
- LIST_ENTRY ListEntry;
- _ANONYMOUS_UNION union {
- struct _IO_STACK_LOCATION *CurrentStackLocation;
- ULONG PacketType;
- } DUMMYUNIONNAME;
- } DUMMYSTRUCTNAME;
- struct _FILE_OBJECT *OriginalFileObject;
- } Overlay;
- KAPC Apc;
- PVOID CompletionKey;
- } Tail;
-} IRP;
-typedef struct _IRP *PIRP;
-
-/* IRP.Flags */
-
-#define SL_FORCE_ACCESS_CHECK 0x01
-#define SL_OPEN_PAGING_FILE 0x02
-#define SL_OPEN_TARGET_DIRECTORY 0x04
-#define SL_CASE_SENSITIVE 0x80
-
-#define SL_KEY_SPECIFIED 0x01
-#define SL_OVERRIDE_VERIFY_VOLUME 0x02
-#define SL_WRITE_THROUGH 0x04
-#define SL_FT_SEQUENTIAL_WRITE 0x08
-
-#define SL_FAIL_IMMEDIATELY 0x01
-#define SL_EXCLUSIVE_LOCK 0x02
-
-#define SL_RESTART_SCAN 0x01
-#define SL_RETURN_SINGLE_ENTRY 0x02
-#define SL_INDEX_SPECIFIED 0x04
-
-#define SL_WATCH_TREE 0x01
-
-#define SL_ALLOW_RAW_MOUNT 0x01
-
-#define CTL_CODE(DeviceType, Function, Method, Access)( \
- ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method))
-
-#define DEVICE_TYPE_FROM_CTL_CODE(ctl) (((ULONG) (ctl & 0xffff0000)) >> 16)
-
-enum
-{
- IRP_NOCACHE = 0x1,
- IRP_PAGING_IO = 0x2,
- IRP_MOUNT_COMPLETION = 0x2,
- IRP_SYNCHRONOUS_API = 0x4,
- IRP_ASSOCIATED_IRP = 0x8,
- IRP_BUFFERED_IO = 0x10,
- IRP_DEALLOCATE_BUFFER = 0x20,
- IRP_INPUT_OPERATION = 0x40,
- IRP_SYNCHRONOUS_PAGING_IO = 0x40,
- IRP_CREATE_OPERATION = 0x80,
- IRP_READ_OPERATION = 0x100,
- IRP_WRITE_OPERATION = 0x200,
- IRP_CLOSE_OPERATION = 0x400,
- IRP_DEFER_IO_COMPLETION = 0x800,
- IRP_OB_QUERY_NAME = 0x1000,
- IRP_HOLD_DEVICE_QUEUE = 0x2000,
- IRP_RETRY_IO_COMPLETION = 0x4000
-};
-
-
-typedef struct _DRIVE_LAYOUT_INFORMATION_MBR {
- ULONG Signature;
-} DRIVE_LAYOUT_INFORMATION_MBR, *PDRIVE_LAYOUT_INFORMATION_MBR;
-
-typedef struct _DRIVE_LAYOUT_INFORMATION_GPT {
- GUID DiskId;
- LARGE_INTEGER StartingUsableOffset;
- LARGE_INTEGER UsableLength;
- ULONG MaxPartitionCount;
-} DRIVE_LAYOUT_INFORMATION_GPT, *PDRIVE_LAYOUT_INFORMATION_GPT;
-
-typedef struct _PARTITION_INFORMATION_MBR {
- UCHAR PartitionType;
- BOOLEAN BootIndicator;
- BOOLEAN RecognizedPartition;
- ULONG HiddenSectors;
-} PARTITION_INFORMATION_MBR, *PPARTITION_INFORMATION_MBR;
-
-
-typedef struct _BOOTDISK_INFORMATION {
- LONGLONG BootPartitionOffset;
- LONGLONG SystemPartitionOffset;
- ULONG BootDeviceSignature;
- ULONG SystemDeviceSignature;
-} BOOTDISK_INFORMATION, *PBOOTDISK_INFORMATION;
-
-typedef struct _BOOTDISK_INFORMATION_EX {
- LONGLONG BootPartitionOffset;
- LONGLONG SystemPartitionOffset;
- ULONG BootDeviceSignature;
- ULONG SystemDeviceSignature;
- GUID BootDeviceGuid;
- GUID SystemDeviceGuid;
- BOOLEAN BootDeviceIsGpt;
- BOOLEAN SystemDeviceIsGpt;
-} BOOTDISK_INFORMATION_EX, *PBOOTDISK_INFORMATION_EX;
-
-typedef struct _EISA_MEMORY_TYPE {
- UCHAR ReadWrite : 1;
- UCHAR Cached : 1;
- UCHAR Reserved0 : 1;
- UCHAR Type : 2;
- UCHAR Shared : 1;
- UCHAR Reserved1 : 1;
- UCHAR MoreEntries : 1;
-} EISA_MEMORY_TYPE, *PEISA_MEMORY_TYPE;
-
-#include <pshpack1.h>
-typedef struct _EISA_MEMORY_CONFIGURATION {
- EISA_MEMORY_TYPE ConfigurationByte;
- UCHAR DataSize;
- USHORT AddressLowWord;
- UCHAR AddressHighByte;
- USHORT MemorySize;
-} EISA_MEMORY_CONFIGURATION, *PEISA_MEMORY_CONFIGURATION;
-#include <poppack.h>
-
-typedef struct _EISA_IRQ_DESCRIPTOR {
- UCHAR Interrupt : 4;
- UCHAR Reserved : 1;
- UCHAR LevelTriggered : 1;
- UCHAR Shared : 1;
- UCHAR MoreEntries : 1;
-} EISA_IRQ_DESCRIPTOR, *PEISA_IRQ_DESCRIPTOR;
-
-typedef struct _EISA_IRQ_CONFIGURATION {
- EISA_IRQ_DESCRIPTOR ConfigurationByte;
- UCHAR Reserved;
-} EISA_IRQ_CONFIGURATION, *PEISA_IRQ_CONFIGURATION;
-
-typedef struct _DMA_CONFIGURATION_BYTE0 {
- UCHAR Channel : 3;
- UCHAR Reserved : 3;
- UCHAR Shared : 1;
- UCHAR MoreEntries : 1;
-} DMA_CONFIGURATION_BYTE0;
-
-typedef struct _DMA_CONFIGURATION_BYTE1 {
- UCHAR Reserved0 : 2;
- UCHAR TransferSize : 2;
- UCHAR Timing : 2;
- UCHAR Reserved1 : 2;
-} DMA_CONFIGURATION_BYTE1;
-
-typedef struct _EISA_DMA_CONFIGURATION {
- DMA_CONFIGURATION_BYTE0 ConfigurationByte0;
- DMA_CONFIGURATION_BYTE1 ConfigurationByte1;
-} EISA_DMA_CONFIGURATION, *PEISA_DMA_CONFIGURATION;
-
-#include <pshpack1.h>
-typedef struct _EISA_PORT_DESCRIPTOR {
- UCHAR NumberPorts : 5;
- UCHAR Reserved : 1;
- UCHAR Shared : 1;
- UCHAR MoreEntries : 1;
-} EISA_PORT_DESCRIPTOR, *PEISA_PORT_DESCRIPTOR;
-
-typedef struct _EISA_PORT_CONFIGURATION {
- EISA_PORT_DESCRIPTOR Configuration;
- USHORT PortAddress;
-} EISA_PORT_CONFIGURATION, *PEISA_PORT_CONFIGURATION;
-#include <poppack.h>
-
-typedef struct _CM_EISA_FUNCTION_INFORMATION {
- ULONG CompressedId;
- UCHAR IdSlotFlags1;
- UCHAR IdSlotFlags2;
- UCHAR MinorRevision;
- UCHAR MajorRevision;
- UCHAR Selections[26];
- UCHAR FunctionFlags;
- UCHAR TypeString[80];
- EISA_MEMORY_CONFIGURATION EisaMemory[9];
- EISA_IRQ_CONFIGURATION EisaIrq[7];
- EISA_DMA_CONFIGURATION EisaDma[4];
- EISA_PORT_CONFIGURATION EisaPort[20];
- UCHAR InitializationData[60];
-} CM_EISA_FUNCTION_INFORMATION, *PCM_EISA_FUNCTION_INFORMATION;
-
-/* CM_EISA_FUNCTION_INFORMATION.FunctionFlags */
-
-#define EISA_FUNCTION_ENABLED 0x80
-#define EISA_FREE_FORM_DATA 0x40
-#define EISA_HAS_PORT_INIT_ENTRY 0x20
-#define EISA_HAS_PORT_RANGE 0x10
-#define EISA_HAS_DMA_ENTRY 0x08
-#define EISA_HAS_IRQ_ENTRY 0x04
-#define EISA_HAS_MEMORY_ENTRY 0x02
-#define EISA_HAS_TYPE_ENTRY 0x01
-#define EISA_HAS_INFORMATION \
- (EISA_HAS_PORT_RANGE + EISA_HAS_DMA_ENTRY + EISA_HAS_IRQ_ENTRY \
- + EISA_HAS_MEMORY_ENTRY + EISA_HAS_TYPE_ENTRY)
-
-typedef struct _CM_EISA_SLOT_INFORMATION {
- UCHAR ReturnCode;
- UCHAR ReturnFlags;
- UCHAR MajorRevision;
- UCHAR MinorRevision;
- USHORT Checksum;
- UCHAR NumberFunctions;
- UCHAR FunctionInformation;
- ULONG CompressedId;
-} CM_EISA_SLOT_INFORMATION, *PCM_EISA_SLOT_INFORMATION;
-
-/* CM_EISA_SLOT_INFORMATION.ReturnCode */
-
-#define EISA_INVALID_SLOT 0x80
-#define EISA_INVALID_FUNCTION 0x81
-#define EISA_INVALID_CONFIGURATION 0x82
-#define EISA_EMPTY_SLOT 0x83
-#define EISA_INVALID_BIOS_CALL 0x86
-
-typedef struct _CM_FLOPPY_DEVICE_DATA {
- USHORT Version;
- USHORT Revision;
- CHAR Size[8];
- ULONG MaxDensity;
- ULONG MountDensity;
- UCHAR StepRateHeadUnloadTime;
- UCHAR HeadLoadTime;
- UCHAR MotorOffTime;
- UCHAR SectorLengthCode;
- UCHAR SectorPerTrack;
- UCHAR ReadWriteGapLength;
- UCHAR DataTransferLength;
- UCHAR FormatGapLength;
- UCHAR FormatFillCharacter;
- UCHAR HeadSettleTime;
- UCHAR MotorSettleTime;
- UCHAR MaximumTrackValue;
- UCHAR DataTransferRate;
-} CM_FLOPPY_DEVICE_DATA, *PCM_FLOPPY_DEVICE_DATA;
-
-typedef enum _INTERFACE_TYPE {
- InterfaceTypeUndefined = -1,
- Internal,
- Isa,
- Eisa,
- MicroChannel,
- TurboChannel,
- PCIBus,
- VMEBus,
- NuBus,
- PCMCIABus,
- CBus,
- MPIBus,
- MPSABus,
- ProcessorInternal,
- InternalPowerBus,
- PNPISABus,
- PNPBus,
- MaximumInterfaceType
-} INTERFACE_TYPE, *PINTERFACE_TYPE;
-
-typedef struct _PNP_BUS_INFORMATION {
- GUID BusTypeGuid;
- INTERFACE_TYPE LegacyBusType;
- ULONG BusNumber;
-} PNP_BUS_INFORMATION, *PPNP_BUS_INFORMATION;
-
-#include <pshpack1.h>
-typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR {
- UCHAR Type;
- UCHAR ShareDisposition;
- USHORT Flags;
- union {
- struct {
- PHYSICAL_ADDRESS Start;
- ULONG Length;
- } Generic;
- struct {
- PHYSICAL_ADDRESS Start;
- ULONG Length;
- } Port;
- struct {
- ULONG Level;
- ULONG Vector;
- ULONG Affinity;
- } Interrupt;
- struct {
- PHYSICAL_ADDRESS Start;
- ULONG Length;
- } Memory;
- struct {
- ULONG Channel;
- ULONG Port;
- ULONG Reserved1;
- } Dma;
- struct {
- ULONG Data[3];
- } DevicePrivate;
- struct {
- ULONG Start;
- ULONG Length;
- ULONG Reserved;
- } BusNumber;
- struct {
- ULONG DataSize;
- ULONG Reserved1;
- ULONG Reserved2;
- } DeviceSpecificData;
- } u;
-} CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR;
-
-/* CM_PARTIAL_RESOURCE_DESCRIPTOR.Type */
-
-#define CmResourceTypeNull 0
-#define CmResourceTypePort 1
-#define CmResourceTypeInterrupt 2
-#define CmResourceTypeMemory 3
-#define CmResourceTypeDma 4
-#define CmResourceTypeDeviceSpecific 5
-#define CmResourceTypeBusNumber 6
-#define CmResourceTypeMaximum 7
-#define CmResourceTypeNonArbitrated 128
-#define CmResourceTypeConfigData 128
-#define CmResourceTypeDevicePrivate 129
-#define CmResourceTypePcCardConfig 130
-#define CmResourceTypeMfCardConfig 131
-
-/* CM_PARTIAL_RESOURCE_DESCRIPTOR.ShareDisposition */
-
-typedef enum _CM_SHARE_DISPOSITION {
- CmResourceShareUndetermined,
- CmResourceShareDeviceExclusive,
- CmResourceShareDriverExclusive,
- CmResourceShareShared
-} CM_SHARE_DISPOSITION;
-
-/* CM_PARTIAL_RESOURCE_DESCRIPTOR.Flags if Type = CmResourceTypePort */
-
-#define CM_RESOURCE_PORT_MEMORY 0x0000
-#define CM_RESOURCE_PORT_IO 0x0001
-#define CM_RESOURCE_PORT_10_BIT_DECODE 0x0004
-#define CM_RESOURCE_PORT_12_BIT_DECODE 0x0008
-#define CM_RESOURCE_PORT_16_BIT_DECODE 0x0010
-#define CM_RESOURCE_PORT_POSITIVE_DECODE 0x0020
-#define CM_RESOURCE_PORT_PASSIVE_DECODE 0x0040
-#define CM_RESOURCE_PORT_WINDOW_DECODE 0x0080
-
-/* CM_PARTIAL_RESOURCE_DESCRIPTOR.Flags if Type = CmResourceTypeInterrupt */
-
-#define CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE 0x0000
-#define CM_RESOURCE_INTERRUPT_LATCHED 0x0001
-
-/* CM_PARTIAL_RESOURCE_DESCRIPTOR.Flags if Type = CmResourceTypeMemory */
-
-#define CM_RESOURCE_MEMORY_READ_WRITE 0x0000
-#define CM_RESOURCE_MEMORY_READ_ONLY 0x0001
-#define CM_RESOURCE_MEMORY_WRITE_ONLY 0x0002
-#define CM_RESOURCE_MEMORY_PREFETCHABLE 0x0004
-#define CM_RESOURCE_MEMORY_COMBINEDWRITE 0x0008
-#define CM_RESOURCE_MEMORY_24 0x0010
-#define CM_RESOURCE_MEMORY_CACHEABLE 0x0020
-
-/* CM_PARTIAL_RESOURCE_DESCRIPTOR.Flags if Type = CmResourceTypeDma */
-
-#define CM_RESOURCE_DMA_8 0x0000
-#define CM_RESOURCE_DMA_16 0x0001
-#define CM_RESOURCE_DMA_32 0x0002
-#define CM_RESOURCE_DMA_8_AND_16 0x0004
-#define CM_RESOURCE_DMA_BUS_MASTER 0x0008
-#define CM_RESOURCE_DMA_TYPE_A 0x0010
-#define CM_RESOURCE_DMA_TYPE_B 0x0020
-#define CM_RESOURCE_DMA_TYPE_F 0x0040
-
-typedef struct _CM_PARTIAL_RESOURCE_LIST {
- USHORT Version;
- USHORT Revision;
- ULONG Count;
- CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1];
-} CM_PARTIAL_RESOURCE_LIST, *PCM_PARTIAL_RESOURCE_LIST;
-
-typedef struct _CM_FULL_RESOURCE_DESCRIPTOR {
- INTERFACE_TYPE InterfaceType;
- ULONG BusNumber;
- CM_PARTIAL_RESOURCE_LIST PartialResourceList;
-} CM_FULL_RESOURCE_DESCRIPTOR, *PCM_FULL_RESOURCE_DESCRIPTOR;
-
-typedef struct _CM_RESOURCE_LIST {
- ULONG Count;
- CM_FULL_RESOURCE_DESCRIPTOR List[1];
-} CM_RESOURCE_LIST, *PCM_RESOURCE_LIST;
-
-typedef struct _CM_INT13_DRIVE_PARAMETER {
- USHORT DriveSelect;
- ULONG MaxCylinders;
- USHORT SectorsPerTrack;
- USHORT MaxHeads;
- USHORT NumberDrives;
-} CM_INT13_DRIVE_PARAMETER, *PCM_INT13_DRIVE_PARAMETER;
-#include <poppack.h>
-
-typedef struct _CM_KEYBOARD_DEVICE_DATA {
- USHORT Version;
- USHORT Revision;
- UCHAR Type;
- UCHAR Subtype;
- USHORT KeyboardFlags;
-} CM_KEYBOARD_DEVICE_DATA, *PCM_KEYBOARD_DEVICE_DATA;
-
-#define KEYBOARD_INSERT_ON 0x80
-#define KEYBOARD_CAPS_LOCK_ON 0x40
-#define KEYBOARD_NUM_LOCK_ON 0x20
-#define KEYBOARD_SCROLL_LOCK_ON 0x10
-#define KEYBOARD_ALT_KEY_DOWN 0x08
-#define KEYBOARD_CTRL_KEY_DOWN 0x04
-#define KEYBOARD_LEFT_SHIFT_DOWN 0x02
-#define KEYBOARD_RIGHT_SHIFT_DOWN 0x01
-
-typedef struct _CM_MCA_POS_DATA {
- USHORT AdapterId;
- UCHAR PosData1;
- UCHAR PosData2;
- UCHAR PosData3;
- UCHAR PosData4;
-} CM_MCA_POS_DATA, *PCM_MCA_POS_DATA;
-
-typedef struct CM_Power_Data_s {
- ULONG PD_Size;
- DEVICE_POWER_STATE PD_MostRecentPowerState;
- ULONG PD_Capabilities;
- ULONG PD_D1Latency;
- ULONG PD_D2Latency;
- ULONG PD_D3Latency;
- DEVICE_POWER_STATE PD_PowerStateMapping[PowerSystemMaximum];
-} CM_POWER_DATA, *PCM_POWER_DATA;
-
-#define PDCAP_D0_SUPPORTED 0x00000001
-#define PDCAP_D1_SUPPORTED 0x00000002
-#define PDCAP_D2_SUPPORTED 0x00000004
-#define PDCAP_D3_SUPPORTED 0x00000008
-#define PDCAP_WAKE_FROM_D0_SUPPORTED 0x00000010
-#define PDCAP_WAKE_FROM_D1_SUPPORTED 0x00000020
-#define PDCAP_WAKE_FROM_D2_SUPPORTED 0x00000040
-#define PDCAP_WAKE_FROM_D3_SUPPORTED 0x00000080
-#define PDCAP_WARM_EJECT_SUPPORTED 0x00000100
-
-typedef struct _CM_SCSI_DEVICE_DATA {
- USHORT Version;
- USHORT Revision;
- UCHAR HostIdentifier;
-} CM_SCSI_DEVICE_DATA, *PCM_SCSI_DEVICE_DATA;
-
-typedef struct _CM_SERIAL_DEVICE_DATA {
- USHORT Version;
- USHORT Revision;
- ULONG BaudClock;
-} CM_SERIAL_DEVICE_DATA, *PCM_SERIAL_DEVICE_DATA;
-
-/* IO_RESOURCE_DESCRIPTOR.Option */
-
-#define IO_RESOURCE_PREFERRED 0x01
-#define IO_RESOURCE_DEFAULT 0x02
-#define IO_RESOURCE_ALTERNATIVE 0x08
-
-typedef struct _IO_RESOURCE_DESCRIPTOR {
- UCHAR Option;
- UCHAR Type;
- UCHAR ShareDisposition;
- UCHAR Spare1;
- USHORT Flags;
- USHORT Spare2;
- union {
- struct {
- ULONG Length;
- ULONG Alignment;
- PHYSICAL_ADDRESS MinimumAddress;
- PHYSICAL_ADDRESS MaximumAddress;
- } Port;
- struct {
- ULONG Length;
- ULONG Alignment;
- PHYSICAL_ADDRESS MinimumAddress;
- PHYSICAL_ADDRESS MaximumAddress;
- } Memory;
- struct {
- ULONG MinimumVector;
- ULONG MaximumVector;
- } Interrupt;
- struct {
- ULONG MinimumChannel;
- ULONG MaximumChannel;
- } Dma;
- struct {
- ULONG Length;
- ULONG Alignment;
- PHYSICAL_ADDRESS MinimumAddress;
- PHYSICAL_ADDRESS MaximumAddress;
- } Generic;
- struct {
- ULONG Data[3];
- } DevicePrivate;
- struct {
- ULONG Length;
- ULONG MinBusNumber;
- ULONG MaxBusNumber;
- ULONG Reserved;
- } BusNumber;
- struct {
- ULONG Priority;
- ULONG Reserved1;
- ULONG Reserved2;
- } ConfigData;
- } u;
-} IO_RESOURCE_DESCRIPTOR, *PIO_RESOURCE_DESCRIPTOR;
-
-typedef struct _IO_RESOURCE_LIST {
- USHORT Version;
- USHORT Revision;
- ULONG Count;
- IO_RESOURCE_DESCRIPTOR Descriptors[1];
-} IO_RESOURCE_LIST, *PIO_RESOURCE_LIST;
-
-typedef struct _IO_RESOURCE_REQUIREMENTS_LIST {
- ULONG ListSize;
- INTERFACE_TYPE InterfaceType;
- ULONG BusNumber;
- ULONG SlotNumber;
- ULONG Reserved[3];
- ULONG AlternativeLists;
- IO_RESOURCE_LIST List[1];
-} IO_RESOURCE_REQUIREMENTS_LIST, *PIO_RESOURCE_REQUIREMENTS_LIST;
-
-typedef struct _CONTROLLER_OBJECT {
- CSHORT Type;
- CSHORT Size;
- PVOID ControllerExtension;
- KDEVICE_QUEUE DeviceWaitQueue;
- ULONG Spare1;
- LARGE_INTEGER Spare2;
-} CONTROLLER_OBJECT, *PCONTROLLER_OBJECT;
-
-typedef enum _DMA_WIDTH {
- Width8Bits,
- Width16Bits,
- Width32Bits,
- MaximumDmaWidth
-} DMA_WIDTH, *PDMA_WIDTH;
-
-typedef enum _DMA_SPEED {
- Compatible,
- TypeA,
- TypeB,
- TypeC,
- TypeF,
- MaximumDmaSpeed
-} DMA_SPEED, *PDMA_SPEED;
-
-/* DEVICE_DESCRIPTION.Version */
-
-#define DEVICE_DESCRIPTION_VERSION 0x0000
-#define DEVICE_DESCRIPTION_VERSION1 0x0001
-#define DEVICE_DESCRIPTION_VERSION2 0x0002
-
-typedef struct _DEVICE_DESCRIPTION {
- ULONG Version;
- BOOLEAN Master;
- BOOLEAN ScatterGather;
- BOOLEAN DemandMode;
- BOOLEAN AutoInitialize;
- BOOLEAN Dma32BitAddresses;
- BOOLEAN IgnoreCount;
- BOOLEAN Reserved1;
- BOOLEAN Dma64BitAddresses;
- ULONG BusNumber;
- ULONG DmaChannel;
- INTERFACE_TYPE InterfaceType;
- DMA_WIDTH DmaWidth;
- DMA_SPEED DmaSpeed;
- ULONG MaximumLength;
- ULONG DmaPort;
-} DEVICE_DESCRIPTION, *PDEVICE_DESCRIPTION;
-
-/* VPB.Flags */
-#define VPB_MOUNTED 0x0001
-#define VPB_LOCKED 0x0002
-#define VPB_PERSISTENT 0x0004
-#define VPB_REMOVE_PENDING 0x0008
-#define VPB_RAW_MOUNT 0x0010
-
-#define MAXIMUM_VOLUME_LABEL_LENGTH (32 * sizeof(WCHAR))
-
-typedef struct _VPB {
- CSHORT Type;
- CSHORT Size;
- USHORT Flags;
- USHORT VolumeLabelLength;
- struct _DEVICE_OBJECT *DeviceObject;
- struct _DEVICE_OBJECT *RealDevice;
- ULONG SerialNumber;
- ULONG ReferenceCount;
- WCHAR VolumeLabel[MAXIMUM_VOLUME_LABEL_LENGTH / sizeof(WCHAR)];
-} VPB, *PVPB;
-
-/* DEVICE_OBJECT.Flags */
-
-#define DO_VERIFY_VOLUME 0x00000002
-#define DO_BUFFERED_IO 0x00000004
-#define DO_EXCLUSIVE 0x00000008
-#define DO_DIRECT_IO 0x00000010
-#define DO_MAP_IO_BUFFER 0x00000020
-#define DO_DEVICE_HAS_NAME 0x00000040
-#define DO_DEVICE_INITIALIZING 0x00000080
-#define DO_SYSTEM_BOOT_PARTITION 0x00000100
-#define DO_LONG_TERM_REQUESTS 0x00000200
-#define DO_NEVER_LAST_DEVICE 0x00000400
-#define DO_SHUTDOWN_REGISTERED 0x00000800
-#define DO_BUS_ENUMERATED_DEVICE 0x00001000
-#define DO_POWER_PAGABLE 0x00002000
-#define DO_POWER_INRUSH 0x00004000
-#define DO_LOW_PRIORITY_FILESYSTEM 0x00010000
-
-/* DEVICE_OBJECT.Characteristics */
-
-#define FILE_REMOVABLE_MEDIA 0x00000001
-#define FILE_READ_ONLY_DEVICE 0x00000002
-#define FILE_FLOPPY_DISKETTE 0x00000004
-#define FILE_WRITE_ONCE_MEDIA 0x00000008
-#define FILE_REMOTE_DEVICE 0x00000010
-#define FILE_DEVICE_IS_MOUNTED 0x00000020
-#define FILE_VIRTUAL_VOLUME 0x00000040
-#define FILE_AUTOGENERATED_DEVICE_NAME 0x00000080
-#define FILE_DEVICE_SECURE_OPEN 0x00000100
-
-/* DEVICE_OBJECT.AlignmentRequirement */
-
-#define FILE_BYTE_ALIGNMENT 0x00000000
-#define FILE_WORD_ALIGNMENT 0x00000001
-#define FILE_LONG_ALIGNMENT 0x00000003
-#define FILE_QUAD_ALIGNMENT 0x00000007
-#define FILE_OCTA_ALIGNMENT 0x0000000f
-#define FILE_32_BYTE_ALIGNMENT 0x0000001f
-#define FILE_64_BYTE_ALIGNMENT 0x0000003f
-#define FILE_128_BYTE_ALIGNMENT 0x0000007f
-#define FILE_256_BYTE_ALIGNMENT 0x000000ff
-#define FILE_512_BYTE_ALIGNMENT 0x000001ff
-
-/* DEVICE_OBJECT.DeviceType */
-
-#define DEVICE_TYPE ULONG
-
-#define FILE_DEVICE_BEEP 0x00000001
-#define FILE_DEVICE_CD_ROM 0x00000002
-#define FILE_DEVICE_CD_ROM_FILE_SYSTEM 0x00000003
-#define FILE_DEVICE_CONTROLLER 0x00000004
-#define FILE_DEVICE_DATALINK 0x00000005
-#define FILE_DEVICE_DFS 0x00000006
-#define FILE_DEVICE_DISK 0x00000007
-#define FILE_DEVICE_DISK_FILE_SYSTEM 0x00000008
-#define FILE_DEVICE_FILE_SYSTEM 0x00000009
-#define FILE_DEVICE_INPORT_PORT 0x0000000a
-#define FILE_DEVICE_KEYBOARD 0x0000000b
-#define FILE_DEVICE_MAILSLOT 0x0000000c
-#define FILE_DEVICE_MIDI_IN 0x0000000d
-#define FILE_DEVICE_MIDI_OUT 0x0000000e
-#define FILE_DEVICE_MOUSE 0x0000000f
-#define FILE_DEVICE_MULTI_UNC_PROVIDER 0x00000010
-#define FILE_DEVICE_NAMED_PIPE 0x00000011
-#define FILE_DEVICE_NETWORK 0x00000012
-#define FILE_DEVICE_NETWORK_BROWSER 0x00000013
-#define FILE_DEVICE_NETWORK_FILE_SYSTEM 0x00000014
-#define FILE_DEVICE_NULL 0x00000015
-#define FILE_DEVICE_PARALLEL_PORT 0x00000016
-#define FILE_DEVICE_PHYSICAL_NETCARD 0x00000017
-#define FILE_DEVICE_PRINTER 0x00000018
-#define FILE_DEVICE_SCANNER 0x00000019
-#define FILE_DEVICE_SERIAL_MOUSE_PORT 0x0000001a
-#define FILE_DEVICE_SERIAL_PORT 0x0000001b
-#define FILE_DEVICE_SCREEN 0x0000001c
-#define FILE_DEVICE_SOUND 0x0000001d
-#define FILE_DEVICE_STREAMS 0x0000001e
-#define FILE_DEVICE_TAPE 0x0000001f
-#define FILE_DEVICE_TAPE_FILE_SYSTEM 0x00000020
-#define FILE_DEVICE_TRANSPORT 0x00000021
-#define FILE_DEVICE_UNKNOWN 0x00000022
-#define FILE_DEVICE_VIDEO 0x00000023
-#define FILE_DEVICE_VIRTUAL_DISK 0x00000024
-#define FILE_DEVICE_WAVE_IN 0x00000025
-#define FILE_DEVICE_WAVE_OUT 0x00000026
-#define FILE_DEVICE_8042_PORT 0x00000027
-#define FILE_DEVICE_NETWORK_REDIRECTOR 0x00000028
-#define FILE_DEVICE_BATTERY 0x00000029
-#define FILE_DEVICE_BUS_EXTENDER 0x0000002a
-#define FILE_DEVICE_MODEM 0x0000002b
-#define FILE_DEVICE_VDM 0x0000002c
-#define FILE_DEVICE_MASS_STORAGE 0x0000002d
-#define FILE_DEVICE_SMB 0x0000002e
-#define FILE_DEVICE_KS 0x0000002f
-#define FILE_DEVICE_CHANGER 0x00000030
-#define FILE_DEVICE_SMARTCARD 0x00000031
-#define FILE_DEVICE_ACPI 0x00000032
-#define FILE_DEVICE_DVD 0x00000033
-#define FILE_DEVICE_FULLSCREEN_VIDEO 0x00000034
-#define FILE_DEVICE_DFS_FILE_SYSTEM 0x00000035
-#define FILE_DEVICE_DFS_VOLUME 0x00000036
-#define FILE_DEVICE_SERENUM 0x00000037
-#define FILE_DEVICE_TERMSRV 0x00000038
-#define FILE_DEVICE_KSEC 0x00000039
-#define FILE_DEVICE_FIPS 0x0000003a
-
-typedef struct _DEVICE_OBJECT {
- CSHORT Type;
- USHORT Size;
- LONG ReferenceCount;
- struct _DRIVER_OBJECT *DriverObject;
- struct _DEVICE_OBJECT *NextDevice;
- struct _DEVICE_OBJECT *AttachedDevice;
- struct _IRP *CurrentIrp;
- PIO_TIMER Timer;
- ULONG Flags;
- ULONG Characteristics;
- PVPB Vpb;
- PVOID DeviceExtension;
- DEVICE_TYPE DeviceType;
- CCHAR StackSize;
- union {
- LIST_ENTRY ListEntry;
- WAIT_CONTEXT_BLOCK Wcb;
- } Queue;
- ULONG AlignmentRequirement;
- KDEVICE_QUEUE DeviceQueue;
- KDPC Dpc;
- ULONG ActiveThreadCount;
- PSECURITY_DESCRIPTOR SecurityDescriptor;
- KEVENT DeviceLock;
- USHORT SectorSize;
- USHORT Spare1;
- struct _DEVOBJ_EXTENSION *DeviceObjectExtension;
- PVOID Reserved;
-} DEVICE_OBJECT;
-typedef struct _DEVICE_OBJECT *PDEVICE_OBJECT;
-
-typedef enum _DEVICE_RELATION_TYPE {
- BusRelations,
- EjectionRelations,
- PowerRelations,
- RemovalRelations,
- TargetDeviceRelation,
- SingleBusRelations
-} DEVICE_RELATION_TYPE, *PDEVICE_RELATION_TYPE;
-
-typedef struct _DEVICE_RELATIONS {
- ULONG Count;
- PDEVICE_OBJECT Objects[1];
-} DEVICE_RELATIONS, *PDEVICE_RELATIONS;
-
-typedef struct _SCATTER_GATHER_ELEMENT {
- PHYSICAL_ADDRESS Address;
- ULONG Length;
- ULONG_PTR Reserved;
-} SCATTER_GATHER_ELEMENT, *PSCATTER_GATHER_ELEMENT;
-
-typedef struct _SCATTER_GATHER_LIST {
- ULONG NumberOfElements;
- ULONG_PTR Reserved;
- SCATTER_GATHER_ELEMENT Elements[0];
-} SCATTER_GATHER_LIST, *PSCATTER_GATHER_LIST;
-
-typedef struct _MDL {
- struct _MDL *Next;
- CSHORT Size;
- CSHORT MdlFlags;
- struct _EPROCESS *Process;
- PVOID MappedSystemVa;
- PVOID StartVa;
- ULONG ByteCount;
- ULONG ByteOffset;
-} MDL, *PMDL;
-
-#define MDL_MAPPED_TO_SYSTEM_VA 0x0001
-#define MDL_PAGES_LOCKED 0x0002
-#define MDL_SOURCE_IS_NONPAGED_POOL 0x0004
-#define MDL_ALLOCATED_FIXED_SIZE 0x0008
-#define MDL_PARTIAL 0x0010
-#define MDL_PARTIAL_HAS_BEEN_MAPPED 0x0020
-#define MDL_IO_PAGE_READ 0x0040
-#define MDL_WRITE_OPERATION 0x0080
-#define MDL_PARENT_MAPPED_SYSTEM_VA 0x0100
-#define MDL_FREE_EXTRA_PTES 0x0200
-#define MDL_IO_SPACE 0x0800
-#define MDL_NETWORK_HEADER 0x1000
-#define MDL_MAPPING_CAN_FAIL 0x2000
-#define MDL_ALLOCATED_MUST_SUCCEED 0x4000
-
-#define MDL_MAPPING_FLAGS ( \
- MDL_MAPPED_TO_SYSTEM_VA | \
- MDL_PAGES_LOCKED | \
- MDL_SOURCE_IS_NONPAGED_POOL | \
- MDL_PARTIAL_HAS_BEEN_MAPPED | \
- MDL_PARENT_MAPPED_SYSTEM_VA | \
- MDL_SYSTEM_VA | \
- MDL_IO_SPACE)
-
-typedef VOID DDKAPI
-(*PPUT_DMA_ADAPTER)(
- /*IN*/ PDMA_ADAPTER DmaAdapter);
-
-typedef PVOID DDKAPI
-(*PALLOCATE_COMMON_BUFFER)(
- /*IN*/ PDMA_ADAPTER DmaAdapter,
- /*IN*/ ULONG Length,
- /*OUT*/ PPHYSICAL_ADDRESS LogicalAddress,
- /*IN*/ BOOLEAN CacheEnabled);
-
-typedef VOID DDKAPI
-(*PFREE_COMMON_BUFFER)(
- /*IN*/ PDMA_ADAPTER DmaAdapter,
- /*IN*/ ULONG Length,
- /*IN*/ PHYSICAL_ADDRESS LogicalAddress,
- /*IN*/ PVOID VirtualAddress,
- /*IN*/ BOOLEAN CacheEnabled);
-
-typedef NTSTATUS DDKAPI
-(*PALLOCATE_ADAPTER_CHANNEL)(
- /*IN*/ PDMA_ADAPTER DmaAdapter,
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ ULONG NumberOfMapRegisters,
- /*IN*/ PDRIVER_CONTROL ExecutionRoutine,
- /*IN*/ PVOID Context);
-
-typedef BOOLEAN DDKAPI
-(*PFLUSH_ADAPTER_BUFFERS)(
- /*IN*/ PDMA_ADAPTER DmaAdapter,
- /*IN*/ PMDL Mdl,
- /*IN*/ PVOID MapRegisterBase,
- /*IN*/ PVOID CurrentVa,
- /*IN*/ ULONG Length,
- /*IN*/ BOOLEAN WriteToDevice);
-
-typedef VOID DDKAPI
-(*PFREE_ADAPTER_CHANNEL)(
- /*IN*/ PDMA_ADAPTER DmaAdapter);
-
-typedef VOID DDKAPI
-(*PFREE_MAP_REGISTERS)(
- /*IN*/ PDMA_ADAPTER DmaAdapter,
- PVOID MapRegisterBase,
- ULONG NumberOfMapRegisters);
-
-typedef PHYSICAL_ADDRESS DDKAPI
-(*PMAP_TRANSFER)(
- /*IN*/ PDMA_ADAPTER DmaAdapter,
- /*IN*/ PMDL Mdl,
- /*IN*/ PVOID MapRegisterBase,
- /*IN*/ PVOID CurrentVa,
- /*IN OUT*/ PULONG Length,
- /*IN*/ BOOLEAN WriteToDevice);
-
-typedef ULONG DDKAPI
-(*PGET_DMA_ALIGNMENT)(
- /*IN*/ PDMA_ADAPTER DmaAdapter);
-
-typedef ULONG DDKAPI
-(*PREAD_DMA_COUNTER)(
- /*IN*/ PDMA_ADAPTER DmaAdapter);
-
-typedef NTSTATUS DDKAPI
-(*PGET_SCATTER_GATHER_LIST)(
- /*IN*/ PDMA_ADAPTER DmaAdapter,
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ PMDL Mdl,
- /*IN*/ PVOID CurrentVa,
- /*IN*/ ULONG Length,
- /*IN*/ PDRIVER_LIST_CONTROL ExecutionRoutine,
- /*IN*/ PVOID Context,
- /*IN*/ BOOLEAN WriteToDevice);
-
-typedef VOID DDKAPI
-(*PPUT_SCATTER_GATHER_LIST)(
- /*IN*/ PDMA_ADAPTER DmaAdapter,
- /*IN*/ PSCATTER_GATHER_LIST ScatterGather,
- /*IN*/ BOOLEAN WriteToDevice);
-
-typedef NTSTATUS DDKAPI
-(*PCALCULATE_SCATTER_GATHER_LIST_SIZE)(
- /*IN*/ PDMA_ADAPTER DmaAdapter,
- /*IN*/ PMDL Mdl /*OPTIONAL*/,
- /*IN*/ PVOID CurrentVa,
- /*IN*/ ULONG Length,
- /*OUT*/ PULONG ScatterGatherListSize,
- /*OUT*/ PULONG pNumberOfMapRegisters /*OPTIONAL*/);
-
-typedef NTSTATUS DDKAPI
-(*PBUILD_SCATTER_GATHER_LIST)(
- /*IN*/ PDMA_ADAPTER DmaAdapter,
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ PMDL Mdl,
- /*IN*/ PVOID CurrentVa,
- /*IN*/ ULONG Length,
- /*IN*/ PDRIVER_LIST_CONTROL ExecutionRoutine,
- /*IN*/ PVOID Context,
- /*IN*/ BOOLEAN WriteToDevice,
- /*IN*/ PVOID ScatterGatherBuffer,
- /*IN*/ ULONG ScatterGatherLength);
-
-typedef NTSTATUS DDKAPI
-(*PBUILD_MDL_FROM_SCATTER_GATHER_LIST)(
- /*IN*/ PDMA_ADAPTER DmaAdapter,
- /*IN*/ PSCATTER_GATHER_LIST ScatterGather,
- /*IN*/ PMDL OriginalMdl,
- /*OUT*/ PMDL *TargetMdl);
-
-typedef struct _DMA_OPERATIONS {
- ULONG Size;
- PPUT_DMA_ADAPTER PutDmaAdapter;
- PALLOCATE_COMMON_BUFFER AllocateCommonBuffer;
- PFREE_COMMON_BUFFER FreeCommonBuffer;
- PALLOCATE_ADAPTER_CHANNEL AllocateAdapterChannel;
- PFLUSH_ADAPTER_BUFFERS FlushAdapterBuffers;
- PFREE_ADAPTER_CHANNEL FreeAdapterChannel;
- PFREE_MAP_REGISTERS FreeMapRegisters;
- PMAP_TRANSFER MapTransfer;
- PGET_DMA_ALIGNMENT GetDmaAlignment;
- PREAD_DMA_COUNTER ReadDmaCounter;
- PGET_SCATTER_GATHER_LIST GetScatterGatherList;
- PPUT_SCATTER_GATHER_LIST PutScatterGatherList;
- PCALCULATE_SCATTER_GATHER_LIST_SIZE CalculateScatterGatherList;
- PBUILD_SCATTER_GATHER_LIST BuildScatterGatherList;
- PBUILD_MDL_FROM_SCATTER_GATHER_LIST BuildMdlFromScatterGatherList;
-} DMA_OPERATIONS, *PDMA_OPERATIONS;
-
-typedef struct _DMA_ADAPTER {
- USHORT Version;
- USHORT Size;
- PDMA_OPERATIONS DmaOperations;
-} DMA_ADAPTER;
-
-typedef enum _FILE_INFORMATION_CLASS {
- FileDirectoryInformation = 1,
- FileFullDirectoryInformation,
- FileBothDirectoryInformation,
- FileBasicInformation,
- FileStandardInformation,
- FileInternalInformation,
- FileEaInformation,
- FileAccessInformation,
- FileNameInformation,
- FileRenameInformation,
- FileLinkInformation,
- FileNamesInformation,
- FileDispositionInformation,
- FilePositionInformation,
- FileFullEaInformation,
- FileModeInformation,
- FileAlignmentInformation,
- FileAllInformation,
- FileAllocationInformation,
- FileEndOfFileInformation,
- FileAlternateNameInformation,
- FileStreamInformation,
- FilePipeInformation,
- FilePipeLocalInformation,
- FilePipeRemoteInformation,
- FileMailslotQueryInformation,
- FileMailslotSetInformation,
- FileCompressionInformation,
- FileObjectIdInformation,
- FileCompletionInformation,
- FileMoveClusterInformation,
- FileQuotaInformation,
- FileReparsePointInformation,
- FileNetworkOpenInformation,
- FileAttributeTagInformation,
- FileTrackingInformation,
- FileIdBothDirectoryInformation,
- FileIdFullDirectoryInformation,
- FileValidDataLengthInformation,
- FileShortNameInformation,
- FileMaximumInformation
-} FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;
-
-typedef struct _FILE_POSITION_INFORMATION {
- LARGE_INTEGER CurrentByteOffset;
-} FILE_POSITION_INFORMATION, *PFILE_POSITION_INFORMATION;
-
-typedef struct _FILE_ALIGNMENT_INFORMATION {
- ULONG AlignmentRequirement;
-} FILE_ALIGNMENT_INFORMATION;
-
-typedef struct _FILE_NAME_INFORMATION {
- ULONG FileNameLength;
- WCHAR FileName[1];
-} FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;
-
-typedef struct _FILE_BASIC_INFORMATION {
- LARGE_INTEGER CreationTime;
- LARGE_INTEGER LastAccessTime;
- LARGE_INTEGER LastWriteTime;
- LARGE_INTEGER ChangeTime;
- ULONG FileAttributes;
-} FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION;
-
-typedef struct _FILE_STANDARD_INFORMATION {
- LARGE_INTEGER AllocationSize;
- LARGE_INTEGER EndOfFile;
- ULONG NumberOfLinks;
- BOOLEAN DeletePending;
- BOOLEAN Directory;
-} FILE_STANDARD_INFORMATION, *PFILE_STANDARD_INFORMATION;
-
-typedef struct _FILE_NETWORK_OPEN_INFORMATION {
- LARGE_INTEGER CreationTime;
- LARGE_INTEGER LastAccessTime;
- LARGE_INTEGER LastWriteTime;
- LARGE_INTEGER ChangeTime;
- LARGE_INTEGER AllocationSize;
- LARGE_INTEGER EndOfFile;
- ULONG FileAttributes;
-} FILE_NETWORK_OPEN_INFORMATION, *PFILE_NETWORK_OPEN_INFORMATION;
-
-typedef struct _FILE_ATTRIBUTE_TAG_INFORMATION {
- ULONG FileAttributes;
- ULONG ReparseTag;
-} FILE_ATTRIBUTE_TAG_INFORMATION, *PFILE_ATTRIBUTE_TAG_INFORMATION;
-
-typedef struct _FILE_DISPOSITION_INFORMATION {
- BOOLEAN DoDeleteFile;
-} FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION;
-
-typedef struct _FILE_END_OF_FILE_INFORMATION {
- LARGE_INTEGER EndOfFile;
-} FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION;
-
-typedef struct _FILE_VALID_DATA_LENGTH_INFORMATION {
- LARGE_INTEGER ValidDataLength;
-} FILE_VALID_DATA_LENGTH_INFORMATION, *PFILE_VALID_DATA_LENGTH_INFORMATION;
-
-typedef enum _FSINFOCLASS {
- FileFsVolumeInformation = 1,
- FileFsLabelInformation,
- FileFsSizeInformation,
- FileFsDeviceInformation,
- FileFsAttributeInformation,
- FileFsControlInformation,
- FileFsFullSizeInformation,
- FileFsObjectIdInformation,
- FileFsDriverPathInformation,
- FileFsMaximumInformation
-} FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS;
-
-typedef struct _FILE_FS_DEVICE_INFORMATION {
- DEVICE_TYPE DeviceType;
- ULONG Characteristics;
-} FILE_FS_DEVICE_INFORMATION, *PFILE_FS_DEVICE_INFORMATION;
-
-typedef struct _FILE_FULL_EA_INFORMATION {
- ULONG NextEntryOffset;
- UCHAR Flags;
- UCHAR EaNameLength;
- USHORT EaValueLength;
- CHAR EaName[1];
-} FILE_FULL_EA_INFORMATION, *PFILE_FULL_EA_INFORMATION;
-
-typedef ULONG_PTR ERESOURCE_THREAD;
-typedef ERESOURCE_THREAD *PERESOURCE_THREAD;
-
-typedef struct _OWNER_ENTRY {
- ERESOURCE_THREAD OwnerThread;
- _ANONYMOUS_UNION union {
- LONG OwnerCount;
- ULONG TableSize;
- } DUMMYUNIONNAME;
-} OWNER_ENTRY, *POWNER_ENTRY;
-
-/* ERESOURCE.Flag */
-
-#define ResourceNeverExclusive 0x0010
-#define ResourceReleaseByOtherThread 0x0020
-#define ResourceOwnedExclusive 0x0080
-
-#define RESOURCE_HASH_TABLE_SIZE 64
-
-typedef struct _ERESOURCE {
- LIST_ENTRY SystemResourcesList;
- POWNER_ENTRY OwnerTable;
- SHORT ActiveCount;
- USHORT Flag;
- PKSEMAPHORE SharedWaiters;
- PKEVENT ExclusiveWaiters;
- OWNER_ENTRY OwnerThreads[2];
- ULONG ContentionCount;
- USHORT NumberOfSharedWaiters;
- USHORT NumberOfExclusiveWaiters;
- _ANONYMOUS_UNION union {
- PVOID Address;
- ULONG_PTR CreatorBackTraceIndex;
- } DUMMYUNIONNAME;
- KSPIN_LOCK SpinLock;
-} ERESOURCE, *PERESOURCE;
-
-/* NOTE: PVOID for methods to avoid 'assignment from incompatible pointer type' warning */
-typedef struct _DRIVER_EXTENSION {
- struct _DRIVER_OBJECT *DriverObject;
- PVOID AddDevice;
- ULONG Count;
- UNICODE_STRING ServiceKeyName;
-} DRIVER_EXTENSION, *PDRIVER_EXTENSION;
-
-typedef BOOLEAN DDKAPI
-(*PFAST_IO_CHECK_IF_POSSIBLE)(
- /*IN*/ struct _FILE_OBJECT *FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ ULONG Length,
- /*IN*/ BOOLEAN Wait,
- /*IN*/ ULONG LockKey,
- /*IN*/ BOOLEAN CheckForReadOperation,
- /*OUT*/ PIO_STATUS_BLOCK IoStatus,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject);
-
-typedef BOOLEAN DDKAPI
-(*PFAST_IO_READ)(
- /*IN*/ struct _FILE_OBJECT *FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ ULONG Length,
- /*IN*/ BOOLEAN Wait,
- /*IN*/ ULONG LockKey,
- /*OUT*/ PVOID Buffer,
- /*OUT*/ PIO_STATUS_BLOCK IoStatus,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject);
-
-typedef BOOLEAN DDKAPI
-(*PFAST_IO_WRITE)(
- /*IN*/ struct _FILE_OBJECT *FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ ULONG Length,
- /*IN*/ BOOLEAN Wait,
- /*IN*/ ULONG LockKey,
- /*IN*/ PVOID Buffer,
- /*OUT*/ PIO_STATUS_BLOCK IoStatus,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject);
-
-typedef BOOLEAN DDKAPI
-(*PFAST_IO_QUERY_BASIC_INFO)(
- /*IN*/ struct _FILE_OBJECT *FileObject,
- /*IN*/ BOOLEAN Wait,
- /*OUT*/ PFILE_BASIC_INFORMATION Buffer,
- /*OUT*/ PIO_STATUS_BLOCK IoStatus,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject);
-
-typedef BOOLEAN DDKAPI
-(*PFAST_IO_QUERY_STANDARD_INFO)(
- /*IN*/ struct _FILE_OBJECT *FileObject,
- /*IN*/ BOOLEAN Wait,
- /*OUT*/ PFILE_STANDARD_INFORMATION Buffer,
- /*OUT*/ PIO_STATUS_BLOCK IoStatus,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject);
-
-typedef BOOLEAN DDKAPI
-(*PFAST_IO_LOCK)(
- /*IN*/ struct _FILE_OBJECT *FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ PLARGE_INTEGER Length,
- PEPROCESS ProcessId,
- ULONG Key,
- BOOLEAN FailImmediately,
- BOOLEAN ExclusiveLock,
- /*OUT*/ PIO_STATUS_BLOCK IoStatus,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject);
-
-typedef BOOLEAN DDKAPI
-(*PFAST_IO_UNLOCK_SINGLE)(
- /*IN*/ struct _FILE_OBJECT *FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ PLARGE_INTEGER Length,
- PEPROCESS ProcessId,
- ULONG Key,
- /*OUT*/ PIO_STATUS_BLOCK IoStatus,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject);
-
-typedef BOOLEAN DDKAPI
-(*PFAST_IO_UNLOCK_ALL)(
- /*IN*/ struct _FILE_OBJECT *FileObject,
- PEPROCESS ProcessId,
- /*OUT*/ PIO_STATUS_BLOCK IoStatus,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject);
-
-typedef BOOLEAN DDKAPI
-(*PFAST_IO_UNLOCK_ALL_BY_KEY)(
- /*IN*/ struct _FILE_OBJECT *FileObject,
- PVOID ProcessId,
- ULONG Key,
- /*OUT*/ PIO_STATUS_BLOCK IoStatus,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject);
-
-typedef BOOLEAN DDKAPI
-(*PFAST_IO_DEVICE_CONTROL)(
- /*IN*/ struct _FILE_OBJECT *FileObject,
- /*IN*/ BOOLEAN Wait,
- /*IN*/ PVOID InputBuffer /*OPTIONAL*/,
- /*IN*/ ULONG InputBufferLength,
- /*OUT*/ PVOID OutputBuffer /*OPTIONAL*/,
- /*IN*/ ULONG OutputBufferLength,
- /*IN*/ ULONG IoControlCode,
- /*OUT*/ PIO_STATUS_BLOCK IoStatus,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject);
-
-typedef VOID DDKAPI
-(*PFAST_IO_ACQUIRE_FILE)(
- /*IN*/ struct _FILE_OBJECT *FileObject);
-
-typedef VOID DDKAPI
-(*PFAST_IO_RELEASE_FILE)(
- /*IN*/ struct _FILE_OBJECT *FileObject);
-
-typedef VOID DDKAPI
-(*PFAST_IO_DETACH_DEVICE)(
- /*IN*/ struct _DEVICE_OBJECT *SourceDevice,
- /*IN*/ struct _DEVICE_OBJECT *TargetDevice);
-
-typedef BOOLEAN DDKAPI
-(*PFAST_IO_QUERY_NETWORK_OPEN_INFO)(
- /*IN*/ struct _FILE_OBJECT *FileObject,
- /*IN*/ BOOLEAN Wait,
- /*OUT*/ struct _FILE_NETWORK_OPEN_INFORMATION *Buffer,
- /*OUT*/ struct _IO_STATUS_BLOCK *IoStatus,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject);
-
-typedef NTSTATUS DDKAPI
-(*PFAST_IO_ACQUIRE_FOR_MOD_WRITE)(
- /*IN*/ struct _FILE_OBJECT *FileObject,
- /*IN*/ PLARGE_INTEGER EndingOffset,
- /*OUT*/ struct _ERESOURCE **ResourceToRelease,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject);
-
-typedef BOOLEAN DDKAPI
-(*PFAST_IO_MDL_READ)(
- /*IN*/ struct _FILE_OBJECT *FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ ULONG Length,
- /*IN*/ ULONG LockKey,
- /*OUT*/ PMDL *MdlChain,
- /*OUT*/ PIO_STATUS_BLOCK IoStatus,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject);
-
-typedef BOOLEAN DDKAPI
-(*PFAST_IO_MDL_READ_COMPLETE)(
- /*IN*/ struct _FILE_OBJECT *FileObject,
- /*IN*/ PMDL MdlChain,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject);
-
-typedef BOOLEAN DDKAPI
-(*PFAST_IO_PREPARE_MDL_WRITE)(
- /*IN*/ struct _FILE_OBJECT *FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ ULONG Length,
- /*IN*/ ULONG LockKey,
- /*OUT*/ PMDL *MdlChain,
- /*OUT*/ PIO_STATUS_BLOCK IoStatus,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject);
-
-typedef BOOLEAN DDKAPI
-(*PFAST_IO_MDL_WRITE_COMPLETE)(
- /*IN*/ struct _FILE_OBJECT *FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ PMDL MdlChain,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject);
-
-typedef BOOLEAN DDKAPI
-(*PFAST_IO_READ_COMPRESSED)(
- /*IN*/ struct _FILE_OBJECT *FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ ULONG Length,
- /*IN*/ ULONG LockKey,
- /*OUT*/ PVOID Buffer,
- /*OUT*/ PMDL *MdlChain,
- /*OUT*/ PIO_STATUS_BLOCK IoStatus,
- /*OUT*/ struct _COMPRESSED_DATA_INFO *CompressedDataInfo,
- /*IN*/ ULONG CompressedDataInfoLength,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject);
-
-typedef BOOLEAN DDKAPI
-(*PFAST_IO_WRITE_COMPRESSED)(
- /*IN*/ struct _FILE_OBJECT *FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ ULONG Length,
- /*IN*/ ULONG LockKey,
- /*IN*/ PVOID Buffer,
- /*OUT*/ PMDL *MdlChain,
- /*OUT*/ PIO_STATUS_BLOCK IoStatus,
- /*IN*/ struct _COMPRESSED_DATA_INFO *CompressedDataInfo,
- /*IN*/ ULONG CompressedDataInfoLength,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject);
-
-typedef BOOLEAN DDKAPI
-(*PFAST_IO_MDL_READ_COMPLETE_COMPRESSED)(
- /*IN*/ struct _FILE_OBJECT *FileObject,
- /*IN*/ PMDL MdlChain,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject);
-
-typedef BOOLEAN DDKAPI
-(*PFAST_IO_MDL_WRITE_COMPLETE_COMPRESSED)(
- /*IN*/ struct _FILE_OBJECT *FileObject,
- /*IN*/ PLARGE_INTEGER FileOffset,
- /*IN*/ PMDL MdlChain,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject);
-
-typedef BOOLEAN DDKAPI
-(*PFAST_IO_QUERY_OPEN)(
- /*IN*/ struct _IRP *Irp,
- /*OUT*/ PFILE_NETWORK_OPEN_INFORMATION NetworkInformation,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject);
-
-typedef NTSTATUS DDKAPI
-(*PFAST_IO_RELEASE_FOR_MOD_WRITE)(
- /*IN*/ struct _FILE_OBJECT *FileObject,
- /*IN*/ struct _ERESOURCE *ResourceToRelease,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject);
-
-typedef NTSTATUS DDKAPI
-(*PFAST_IO_ACQUIRE_FOR_CCFLUSH)(
- /*IN*/ struct _FILE_OBJECT *FileObject,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject);
-
-typedef NTSTATUS DDKAPI
-(*PFAST_IO_RELEASE_FOR_CCFLUSH) (
- /*IN*/ struct _FILE_OBJECT *FileObject,
- /*IN*/ struct _DEVICE_OBJECT *DeviceObject);
-
-typedef struct _FAST_IO_DISPATCH {
- ULONG SizeOfFastIoDispatch;
- PFAST_IO_CHECK_IF_POSSIBLE FastIoCheckIfPossible;
- PFAST_IO_READ FastIoRead;
- PFAST_IO_WRITE FastIoWrite;
- PFAST_IO_QUERY_BASIC_INFO FastIoQueryBasicInfo;
- PFAST_IO_QUERY_STANDARD_INFO FastIoQueryStandardInfo;
- PFAST_IO_LOCK FastIoLock;
- PFAST_IO_UNLOCK_SINGLE FastIoUnlockSingle;
- PFAST_IO_UNLOCK_ALL FastIoUnlockAll;
- PFAST_IO_UNLOCK_ALL_BY_KEY FastIoUnlockAllByKey;
- PFAST_IO_DEVICE_CONTROL FastIoDeviceControl;
- PFAST_IO_ACQUIRE_FILE AcquireFileForNtCreateSection;
- PFAST_IO_RELEASE_FILE ReleaseFileForNtCreateSection;
- PFAST_IO_DETACH_DEVICE FastIoDetachDevice;
- PFAST_IO_QUERY_NETWORK_OPEN_INFO FastIoQueryNetworkOpenInfo;
- PFAST_IO_ACQUIRE_FOR_MOD_WRITE AcquireForModWrite;
- PFAST_IO_MDL_READ MdlRead;
- PFAST_IO_MDL_READ_COMPLETE MdlReadComplete;
- PFAST_IO_PREPARE_MDL_WRITE PrepareMdlWrite;
- PFAST_IO_MDL_WRITE_COMPLETE MdlWriteComplete;
- PFAST_IO_READ_COMPRESSED FastIoReadCompressed;
- PFAST_IO_WRITE_COMPRESSED FastIoWriteCompressed;
- PFAST_IO_MDL_READ_COMPLETE_COMPRESSED MdlReadCompleteCompressed;
- PFAST_IO_MDL_WRITE_COMPLETE_COMPRESSED MdlWriteCompleteCompressed;
- PFAST_IO_QUERY_OPEN FastIoQueryOpen;
- PFAST_IO_RELEASE_FOR_MOD_WRITE ReleaseForModWrite;
- PFAST_IO_ACQUIRE_FOR_CCFLUSH AcquireForCcFlush;
- PFAST_IO_RELEASE_FOR_CCFLUSH ReleaseForCcFlush;
-} FAST_IO_DISPATCH, *PFAST_IO_DISPATCH;
-
-typedef struct _DRIVER_OBJECT {
- CSHORT Type;
- CSHORT Size;
- PDEVICE_OBJECT DeviceObject;
- ULONG Flags;
- PVOID DriverStart;
- ULONG DriverSize;
- PVOID DriverSection;
- PDRIVER_EXTENSION DriverExtension;
- UNICODE_STRING DriverName;
- PUNICODE_STRING HardwareDatabase;
- PFAST_IO_DISPATCH FastIoDispatch;
- PDRIVER_INITIALIZE DriverInit;
- PDRIVER_STARTIO DriverStartIo;
- PDRIVER_UNLOAD DriverUnload;
- PDRIVER_DISPATCH MajorFunction[IRP_MJ_MAXIMUM_FUNCTION + 1];
-} DRIVER_OBJECT;
-typedef struct _DRIVER_OBJECT *PDRIVER_OBJECT;
-
-typedef struct _SECTION_OBJECT_POINTERS {
- PVOID DataSectionObject;
- PVOID SharedCacheMap;
- PVOID ImageSectionObject;
-} SECTION_OBJECT_POINTERS, *PSECTION_OBJECT_POINTERS;
-
-typedef struct _IO_COMPLETION_CONTEXT {
- PVOID Port;
- PVOID Key;
-} IO_COMPLETION_CONTEXT, *PIO_COMPLETION_CONTEXT;
-
-/* FILE_OBJECT.Flags */
-
-#define FO_FILE_OPEN 0x00000001
-#define FO_SYNCHRONOUS_IO 0x00000002
-#define FO_ALERTABLE_IO 0x00000004
-#define FO_NO_INTERMEDIATE_BUFFERING 0x00000008
-#define FO_WRITE_THROUGH 0x00000010
-#define FO_SEQUENTIAL_ONLY 0x00000020
-#define FO_CACHE_SUPPORTED 0x00000040
-#define FO_NAMED_PIPE 0x00000080
-#define FO_STREAM_FILE 0x00000100
-#define FO_MAILSLOT 0x00000200
-#define FO_GENERATE_AUDIT_ON_CLOSE 0x00000400
-#define FO_DIRECT_DEVICE_OPEN 0x00000800
-#define FO_FILE_MODIFIED 0x00001000
-#define FO_FILE_SIZE_CHANGED 0x00002000
-#define FO_CLEANUP_COMPLETE 0x00004000
-#define FO_TEMPORARY_FILE 0x00008000
-#define FO_DELETE_ON_CLOSE 0x00010000
-#define FO_OPENED_CASE_SENSITIVE 0x00020000
-#define FO_HANDLE_CREATED 0x00040000
-#define FO_FILE_FAST_IO_READ 0x00080000
-#define FO_RANDOM_ACCESS 0x00100000
-#define FO_FILE_OPEN_CANCELLED 0x00200000
-#define FO_VOLUME_OPEN 0x00400000
-#define FO_FILE_OBJECT_HAS_EXTENSION 0x00800000
-#define FO_REMOTE_ORIGIN 0x01000000
-
-typedef struct _FILE_OBJECT {
- CSHORT Type;
- CSHORT Size;
- PDEVICE_OBJECT DeviceObject;
- PVPB Vpb;
- PVOID FsContext;
- PVOID FsContext2;
- PSECTION_OBJECT_POINTERS SectionObjectPointer;
- PVOID PrivateCacheMap;
- NTSTATUS FinalStatus;
- struct _FILE_OBJECT *RelatedFileObject;
- BOOLEAN LockOperation;
- BOOLEAN DeletePending;
- BOOLEAN ReadAccess;
- BOOLEAN WriteAccess;
- BOOLEAN DeleteAccess;
- BOOLEAN SharedRead;
- BOOLEAN SharedWrite;
- BOOLEAN SharedDelete;
- ULONG Flags;
- UNICODE_STRING FileName;
- LARGE_INTEGER CurrentByteOffset;
- ULONG Waiters;
- ULONG Busy;
- PVOID LastLock;
- KEVENT Lock;
- KEVENT Event;
- PIO_COMPLETION_CONTEXT CompletionContext;
-} FILE_OBJECT;
-typedef struct _FILE_OBJECT *PFILE_OBJECT;
-
-typedef enum _SECURITY_OPERATION_CODE {
- SetSecurityDescriptor,
- QuerySecurityDescriptor,
- DeleteSecurityDescriptor,
- AssignSecurityDescriptor
-} SECURITY_OPERATION_CODE, *PSECURITY_OPERATION_CODE;
-
-#define INITIAL_PRIVILEGE_COUNT 3
-
-typedef struct _INITIAL_PRIVILEGE_SET {
- ULONG PrivilegeCount;
- ULONG Control;
- LUID_AND_ATTRIBUTES Privilege[INITIAL_PRIVILEGE_COUNT];
-} INITIAL_PRIVILEGE_SET, * PINITIAL_PRIVILEGE_SET;
-
-typedef struct _SECURITY_SUBJECT_CONTEXT {
- PACCESS_TOKEN ClientToken;
- SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
- PACCESS_TOKEN PrimaryToken;
- PVOID ProcessAuditId;
-} SECURITY_SUBJECT_CONTEXT, *PSECURITY_SUBJECT_CONTEXT;
-
-#include <pshpack4.h>
-typedef struct _ACCESS_STATE {
- LUID OperationID;
- BOOLEAN SecurityEvaluated;
- BOOLEAN GenerateAudit;
- BOOLEAN GenerateOnClose;
- BOOLEAN PrivilegesAllocated;
- ULONG Flags;
- ACCESS_MASK RemainingDesiredAccess;
- ACCESS_MASK PreviouslyGrantedAccess;
- ACCESS_MASK OriginalDesiredAccess;
- SECURITY_SUBJECT_CONTEXT SubjectSecurityContext;
- PSECURITY_DESCRIPTOR SecurityDescriptor;
- PVOID AuxData;
- union {
- INITIAL_PRIVILEGE_SET InitialPrivilegeSet;
- PRIVILEGE_SET PrivilegeSet;
- } Privileges;
-
- BOOLEAN AuditPrivileges;
- UNICODE_STRING ObjectName;
- UNICODE_STRING ObjectTypeName;
-} ACCESS_STATE, *PACCESS_STATE;
-#include <poppack.h>
-
-typedef struct _IO_SECURITY_CONTEXT {
- PSECURITY_QUALITY_OF_SERVICE SecurityQos;
- PACCESS_STATE AccessState;
- ACCESS_MASK DesiredAccess;
- ULONG FullCreateOptions;
-} IO_SECURITY_CONTEXT, *PIO_SECURITY_CONTEXT;
-
-struct _IO_CSQ;
-
-typedef struct _IO_CSQ_IRP_CONTEXT {
- ULONG Type;
- struct _IRP *Irp;
- struct _IO_CSQ *Csq;
-} IO_CSQ_IRP_CONTEXT, *PIO_CSQ_IRP_CONTEXT;
-
-typedef VOID DDKAPI
-(*PIO_CSQ_INSERT_IRP)(
- /*IN*/ struct _IO_CSQ *Csq,
- /*IN*/ PIRP Irp);
-
-typedef VOID DDKAPI
-(*PIO_CSQ_REMOVE_IRP)(
- /*IN*/ struct _IO_CSQ *Csq,
- /*IN*/ PIRP Irp);
-
-typedef PIRP DDKAPI
-(*PIO_CSQ_PEEK_NEXT_IRP)(
- /*IN*/ struct _IO_CSQ *Csq,
- /*IN*/ PIRP Irp,
- /*IN*/ PVOID PeekContext);
-
-typedef VOID DDKAPI
-(*PIO_CSQ_ACQUIRE_LOCK)(
- /*IN*/ struct _IO_CSQ *Csq,
- /*OUT*/ PKIRQL Irql);
-
-typedef VOID DDKAPI
-(*PIO_CSQ_RELEASE_LOCK)(
- /*IN*/ struct _IO_CSQ *Csq,
- /*IN*/ KIRQL Irql);
-
-typedef VOID DDKAPI
-(*PIO_CSQ_COMPLETE_CANCELED_IRP)(
- /*IN*/ struct _IO_CSQ *Csq,
- /*IN*/ PIRP Irp);
-
-typedef struct _IO_CSQ {
- ULONG Type;
- PIO_CSQ_INSERT_IRP CsqInsertIrp;
- PIO_CSQ_REMOVE_IRP CsqRemoveIrp;
- PIO_CSQ_PEEK_NEXT_IRP CsqPeekNextIrp;
- PIO_CSQ_ACQUIRE_LOCK CsqAcquireLock;
- PIO_CSQ_RELEASE_LOCK CsqReleaseLock;
- PIO_CSQ_COMPLETE_CANCELED_IRP CsqCompleteCanceledIrp;
- PVOID ReservePointer;
-} IO_CSQ, *PIO_CSQ;
-
-#include <pshpack4.h>
-typedef struct _IO_STACK_LOCATION {
- UCHAR MajorFunction;
- UCHAR MinorFunction;
- UCHAR Flags;
- UCHAR Control;
- union {
- struct {
- PIO_SECURITY_CONTEXT SecurityContext;
- ULONG Options;
- USHORT POINTER_ALIGNMENT FileAttributes;
- USHORT ShareAccess;
- ULONG POINTER_ALIGNMENT EaLength;
- } Create;
- struct {
- ULONG Length;
- ULONG POINTER_ALIGNMENT Key;
- LARGE_INTEGER ByteOffset;
- } Read;
- struct {
- ULONG Length;
- ULONG POINTER_ALIGNMENT Key;
- LARGE_INTEGER ByteOffset;
- } Write;
- struct {
- ULONG Length;
- FILE_INFORMATION_CLASS POINTER_ALIGNMENT FileInformationClass;
- } QueryFile;
- struct {
- ULONG Length;
- FILE_INFORMATION_CLASS POINTER_ALIGNMENT FileInformationClass;
- PFILE_OBJECT FileObject;
- _ANONYMOUS_UNION union {
- _ANONYMOUS_STRUCT struct {
- BOOLEAN ReplaceIfExists;
- BOOLEAN AdvanceOnly;
- } DUMMYSTRUCTNAME;
- ULONG ClusterCount;
- HANDLE DeleteHandle;
- } DUMMYUNIONNAME;
- } SetFile;
- struct {
- ULONG Length;
- FS_INFORMATION_CLASS POINTER_ALIGNMENT FsInformationClass;
- } QueryVolume;
- struct {
- ULONG OutputBufferLength;
- ULONG POINTER_ALIGNMENT InputBufferLength;
- ULONG POINTER_ALIGNMENT IoControlCode;
- PVOID Type3InputBuffer;
- } DeviceIoControl;
- struct {
- SECURITY_INFORMATION SecurityInformation;
- ULONG POINTER_ALIGNMENT Length;
- } QuerySecurity;
- struct {
- SECURITY_INFORMATION SecurityInformation;
- PSECURITY_DESCRIPTOR SecurityDescriptor;
- } SetSecurity;
- struct {
- PVPB Vpb;
- PDEVICE_OBJECT DeviceObject;
- } MountVolume;
- struct {
- PVPB Vpb;
- PDEVICE_OBJECT DeviceObject;
- } VerifyVolume;
- struct {
- struct _SCSI_REQUEST_BLOCK *Srb;
- } Scsi;
- struct {
- DEVICE_RELATION_TYPE Type;
- } QueryDeviceRelations;
- struct {
- CONST GUID *InterfaceType;
- USHORT Size;
- USHORT Version;
- PINTERFACE Interface;
- PVOID InterfaceSpecificData;
- } QueryInterface;
- struct {
- PDEVICE_CAPABILITIES Capabilities;
- } DeviceCapabilities;
- struct {
- PIO_RESOURCE_REQUIREMENTS_LIST IoResourceRequirementList;
- } FilterResourceRequirements;
- struct {
- ULONG WhichSpace;
- PVOID Buffer;
- ULONG Offset;
- ULONG POINTER_ALIGNMENT Length;
- } ReadWriteConfig;
- struct {
- BOOLEAN Lock;
- } SetLock;
- struct {
- BUS_QUERY_ID_TYPE IdType;
- } QueryId;
- struct {
- DEVICE_TEXT_TYPE DeviceTextType;
- LCID POINTER_ALIGNMENT LocaleId;
- } QueryDeviceText;
- struct {
- BOOLEAN InPath;
- BOOLEAN Reserved[3];
- DEVICE_USAGE_NOTIFICATION_TYPE POINTER_ALIGNMENT Type;
- } UsageNotification;
- struct {
- SYSTEM_POWER_STATE PowerState;
- } WaitWake;
- struct {
- PPOWER_SEQUENCE PowerSequence;
- } PowerSequence;
- struct {
- ULONG SystemContext;
- POWER_STATE_TYPE POINTER_ALIGNMENT Type;
- POWER_STATE POINTER_ALIGNMENT State;
- POWER_ACTION POINTER_ALIGNMENT ShutdownType;
- } Power;
- struct {
- PCM_RESOURCE_LIST AllocatedResources;
- PCM_RESOURCE_LIST AllocatedResourcesTranslated;
- } StartDevice;
- struct {
- ULONG_PTR ProviderId;
- PVOID DataPath;
- ULONG BufferSize;
- PVOID Buffer;
- } WMI;
- struct {
- PVOID Argument1;
- PVOID Argument2;
- PVOID Argument3;
- PVOID Argument4;
- } Others;
- } Parameters;
- PDEVICE_OBJECT DeviceObject;
- PFILE_OBJECT FileObject;
- PIO_COMPLETION_ROUTINE CompletionRoutine;
- PVOID Context;
-} IO_STACK_LOCATION, *PIO_STACK_LOCATION;
-#include <poppack.h>
-
-/* IO_STACK_LOCATION.Control */
-
-#define SL_PENDING_RETURNED 0x01
-#define SL_INVOKE_ON_CANCEL 0x20
-#define SL_INVOKE_ON_SUCCESS 0x40
-#define SL_INVOKE_ON_ERROR 0x80
-
-typedef enum _KEY_INFORMATION_CLASS {
- KeyBasicInformation,
- KeyNodeInformation,
- KeyFullInformation,
- KeyNameInformation,
- KeyCachedInformation,
- KeyFlagsInformation
-} KEY_INFORMATION_CLASS;
-
-typedef struct _KEY_BASIC_INFORMATION {
- LARGE_INTEGER LastWriteTime;
- ULONG TitleIndex;
- ULONG NameLength;
- WCHAR Name[1];
-} KEY_BASIC_INFORMATION, *PKEY_BASIC_INFORMATION;
-
-typedef struct _KEY_FULL_INFORMATION {
- LARGE_INTEGER LastWriteTime;
- ULONG TitleIndex;
- ULONG ClassOffset;
- ULONG ClassLength;
- ULONG SubKeys;
- ULONG MaxNameLen;
- ULONG MaxClassLen;
- ULONG Values;
- ULONG MaxValueNameLen;
- ULONG MaxValueDataLen;
- WCHAR Class[1];
-} KEY_FULL_INFORMATION, *PKEY_FULL_INFORMATION;
-
-typedef struct _KEY_NODE_INFORMATION {
- LARGE_INTEGER LastWriteTime;
- ULONG TitleIndex;
- ULONG ClassOffset;
- ULONG ClassLength;
- ULONG NameLength;
- WCHAR Name[1];
-} KEY_NODE_INFORMATION, *PKEY_NODE_INFORMATION;
-
-typedef struct _KEY_VALUE_BASIC_INFORMATION {
- ULONG TitleIndex;
- ULONG Type;
- ULONG NameLength;
- WCHAR Name[1];
-} KEY_VALUE_BASIC_INFORMATION, *PKEY_VALUE_BASIC_INFORMATION;
-
-typedef struct _KEY_VALUE_FULL_INFORMATION {
- ULONG TitleIndex;
- ULONG Type;
- ULONG DataOffset;
- ULONG DataLength;
- ULONG NameLength;
- WCHAR Name[1];
-} KEY_VALUE_FULL_INFORMATION, *PKEY_VALUE_FULL_INFORMATION;
-
-typedef struct _KEY_VALUE_PARTIAL_INFORMATION {
- ULONG TitleIndex;
- ULONG Type;
- ULONG DataLength;
- UCHAR Data[1];
-} KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION;
-
-typedef struct _KEY_VALUE_PARTIAL_INFORMATION_ALIGN64 {
- ULONG Type;
- ULONG DataLength;
- UCHAR Data[1];
-} KEY_VALUE_PARTIAL_INFORMATION_ALIGN64, *PKEY_VALUE_PARTIAL_INFORMATION_ALIGN64;
-
-typedef struct _KEY_VALUE_ENTRY {
- PUNICODE_STRING ValueName;
- ULONG DataLength;
- ULONG DataOffset;
- ULONG Type;
-} KEY_VALUE_ENTRY, *PKEY_VALUE_ENTRY;
-
-typedef enum _KEY_VALUE_INFORMATION_CLASS {
- KeyValueBasicInformation,
- KeyValueFullInformation,
- KeyValuePartialInformation,
- KeyValueFullInformationAlign64,
- KeyValuePartialInformationAlign64
-} KEY_VALUE_INFORMATION_CLASS;
-
-/* KEY_VALUE_Xxx.Type */
-
-#define REG_NONE 0
-#define REG_SZ 1
-#define REG_EXPAND_SZ 2
-#define REG_BINARY 3
-#define REG_DWORD 4
-#define REG_DWORD_LITTLE_ENDIAN 4
-#define REG_DWORD_BIG_ENDIAN 5
-#define REG_LINK 6
-#define REG_MULTI_SZ 7
-#define REG_RESOURCE_LIST 8
-#define REG_FULL_RESOURCE_DESCRIPTOR 9
-#define REG_RESOURCE_REQUIREMENTS_LIST 10
-#define REG_QWORD 11
-#define REG_QWORD_LITTLE_ENDIAN 11
-
-#define PCI_TYPE0_ADDRESSES 6
-#define PCI_TYPE1_ADDRESSES 2
-#define PCI_TYPE2_ADDRESSES 5
-
-typedef struct _PCI_COMMON_CONFIG {
- USHORT VendorID;
- USHORT DeviceID;
- USHORT Command;
- USHORT Status;
- UCHAR RevisionID;
- UCHAR ProgIf;
- UCHAR SubClass;
- UCHAR BaseClass;
- UCHAR CacheLineSize;
- UCHAR LatencyTimer;
- UCHAR HeaderType;
- UCHAR BIST;
- union {
- struct _PCI_HEADER_TYPE_0 {
- ULONG BaseAddresses[PCI_TYPE0_ADDRESSES];
- ULONG CIS;
- USHORT SubVendorID;
- USHORT SubSystemID;
- ULONG ROMBaseAddress;
- UCHAR CapabilitiesPtr;
- UCHAR Reserved1[3];
- ULONG Reserved2;
- UCHAR InterruptLine;
- UCHAR InterruptPin;
- UCHAR MinimumGrant;
- UCHAR MaximumLatency;
- } type0;
- struct _PCI_HEADER_TYPE_1 {
- ULONG BaseAddresses[PCI_TYPE1_ADDRESSES];
- UCHAR PrimaryBus;
- UCHAR SecondaryBus;
- UCHAR SubordinateBus;
- UCHAR SecondaryLatency;
- UCHAR IOBase;
- UCHAR IOLimit;
- USHORT SecondaryStatus;
- USHORT MemoryBase;
- USHORT MemoryLimit;
- USHORT PrefetchBase;
- USHORT PrefetchLimit;
- ULONG PrefetchBaseUpper32;
- ULONG PrefetchLimitUpper32;
- USHORT IOBaseUpper16;
- USHORT IOLimitUpper16;
- UCHAR CapabilitiesPtr;
- UCHAR Reserved1[3];
- ULONG ROMBaseAddress;
- UCHAR InterruptLine;
- UCHAR InterruptPin;
- USHORT BridgeControl;
- } type1;
- struct _PCI_HEADER_TYPE_2 {
- ULONG SocketRegistersBaseAddress;
- UCHAR CapabilitiesPtr;
- UCHAR Reserved;
- USHORT SecondaryStatus;
- UCHAR PrimaryBus;
- UCHAR SecondaryBus;
- UCHAR SubordinateBus;
- UCHAR SecondaryLatency;
- struct {
- ULONG Base;
- ULONG Limit;
- } Range[PCI_TYPE2_ADDRESSES - 1];
- UCHAR InterruptLine;
- UCHAR InterruptPin;
- USHORT BridgeControl;
- } type2;
- } u;
- UCHAR DeviceSpecific[192];
-} PCI_COMMON_CONFIG, *PPCI_COMMON_CONFIG;
-
-/* PCI_COMMON_CONFIG.Command */
-
-#define PCI_ENABLE_IO_SPACE 0x0001
-#define PCI_ENABLE_MEMORY_SPACE 0x0002
-#define PCI_ENABLE_BUS_MASTER 0x0004
-#define PCI_ENABLE_SPECIAL_CYCLES 0x0008
-#define PCI_ENABLE_WRITE_AND_INVALIDATE 0x0010
-#define PCI_ENABLE_VGA_COMPATIBLE_PALETTE 0x0020
-#define PCI_ENABLE_PARITY 0x0040
-#define PCI_ENABLE_WAIT_CYCLE 0x0080
-#define PCI_ENABLE_SERR 0x0100
-#define PCI_ENABLE_FAST_BACK_TO_BACK 0x0200
-
-/* PCI_COMMON_CONFIG.Status */
-
-#define PCI_STATUS_CAPABILITIES_LIST 0x0010
-#define PCI_STATUS_66MHZ_CAPABLE 0x0020
-#define PCI_STATUS_UDF_SUPPORTED 0x0040
-#define PCI_STATUS_FAST_BACK_TO_BACK 0x0080
-#define PCI_STATUS_DATA_PARITY_DETECTED 0x0100
-#define PCI_STATUS_DEVSEL 0x0600
-#define PCI_STATUS_SIGNALED_TARGET_ABORT 0x0800
-#define PCI_STATUS_RECEIVED_TARGET_ABORT 0x1000
-#define PCI_STATUS_RECEIVED_MASTER_ABORT 0x2000
-#define PCI_STATUS_SIGNALED_SYSTEM_ERROR 0x4000
-#define PCI_STATUS_DETECTED_PARITY_ERROR 0x8000
-
-/* PCI_COMMON_CONFIG.HeaderType */
-
-#define PCI_MULTIFUNCTION 0x80
-#define PCI_DEVICE_TYPE 0x00
-#define PCI_BRIDGE_TYPE 0x01
-#define PCI_CARDBUS_BRIDGE_TYPE 0x02
-
-#define PCI_CONFIGURATION_TYPE(PciData) \
- (((PPCI_COMMON_CONFIG) (PciData))->HeaderType & ~PCI_MULTIFUNCTION)
-
-#define PCI_MULTIFUNCTION_DEVICE(PciData) \
- ((((PPCI_COMMON_CONFIG) (PciData))->HeaderType & PCI_MULTIFUNCTION) != 0)
-
-typedef struct _PCI_SLOT_NUMBER {
- union {
- struct {
- ULONG DeviceNumber : 5;
- ULONG FunctionNumber : 3;
- ULONG Reserved : 24;
- } bits;
- ULONG AsULONG;
- } u;
-} PCI_SLOT_NUMBER, *PPCI_SLOT_NUMBER;
-
-typedef enum _POOL_TYPE {
- NonPagedPool,
- PagedPool,
- NonPagedPoolMustSucceed,
- DontUseThisType,
- NonPagedPoolCacheAligned,
- PagedPoolCacheAligned,
- NonPagedPoolCacheAlignedMustS,
- MaxPoolType,
- NonPagedPoolSession = 32,
- PagedPoolSession,
- NonPagedPoolMustSucceedSession,
- DontUseThisTypeSession,
- NonPagedPoolCacheAlignedSession,
- PagedPoolCacheAlignedSession,
- NonPagedPoolCacheAlignedMustSSession
-} POOL_TYPE;
-
-typedef enum _EX_POOL_PRIORITY {
- LowPoolPriority,
- LowPoolPrioritySpecialPoolOverrun = 8,
- LowPoolPrioritySpecialPoolUnderrun = 9,
- NormalPoolPriority = 16,
- NormalPoolPrioritySpecialPoolOverrun = 24,
- NormalPoolPrioritySpecialPoolUnderrun = 25,
- HighPoolPriority = 32,
- HighPoolPrioritySpecialPoolOverrun = 40,
- HighPoolPrioritySpecialPoolUnderrun = 41
-} EX_POOL_PRIORITY;
-
-/* PRIVILEGE_SET.Control */
-
-#define PRIVILEGE_SET_ALL_NECESSARY 1
-
-typedef struct _RTL_OSVERSIONINFOW {
- ULONG dwOSVersionInfoSize;
- ULONG dwMajorVersion;
- ULONG dwMinorVersion;
- ULONG dwBuildNumber;
- ULONG dwPlatformId;
- WCHAR szCSDVersion[128];
-} RTL_OSVERSIONINFOW, *PRTL_OSVERSIONINFOW;
-
-typedef struct _RTL_OSVERSIONINFOEXW {
- ULONG dwOSVersionInfoSize;
- ULONG dwMajorVersion;
- ULONG dwMinorVersion;
- ULONG dwBuildNumber;
- ULONG dwPlatformId;
- WCHAR szCSDVersion[128];
- USHORT wServicePackMajor;
- USHORT wServicePackMinor;
- USHORT wSuiteMask;
- UCHAR wProductType;
- UCHAR wReserved;
-} RTL_OSVERSIONINFOEXW, *PRTL_OSVERSIONINFOEXW;
-
-NTOSAPI
-ULONGLONG
-DDKAPI
-VerSetConditionMask(
- /*IN*/ ULONGLONG ConditionMask,
- /*IN*/ ULONG TypeMask,
- /*IN*/ UCHAR Condition);
-
-#define VER_SET_CONDITION(ConditionMask, TypeBitMask, ComparisonType) \
- ((ConditionMask) = VerSetConditionMask((ConditionMask), \
- (TypeBitMask), (ComparisonType)))
-
-/* RtlVerifyVersionInfo() TypeMask */
-
-#define VER_MINORVERSION 0x0000001
-#define VER_MAJORVERSION 0x0000002
-#define VER_BUILDNUMBER 0x0000004
-#define VER_PLATFORMID 0x0000008
-#define VER_SERVICEPACKMINOR 0x0000010
-#define VER_SERVICEPACKMAJOR 0x0000020
-#define VER_SUITENAME 0x0000040
-#define VER_PRODUCT_TYPE 0x0000080
-
-/* RtlVerifyVersionInfo() ComparisonType */
-
-#define VER_EQUAL 1
-#define VER_GREATER 2
-#define VER_GREATER_EQUAL 3
-#define VER_LESS 4
-#define VER_LESS_EQUAL 5
-#define VER_AND 6
-#define VER_OR 7
-
-#define VER_CONDITION_MASK 7
-#define VER_NUM_BITS_PER_CONDITION_MASK 3
-
-typedef struct _RTL_BITMAP {
- ULONG SizeOfBitMap;
- PULONG Buffer;
-} RTL_BITMAP, *PRTL_BITMAP;
-
-typedef struct _RTL_BITMAP_RUN {
- ULONG StartingIndex;
- ULONG NumberOfBits;
-} RTL_BITMAP_RUN, *PRTL_BITMAP_RUN;
-
-typedef NTSTATUS DDKAPI
-(*PRTL_QUERY_REGISTRY_ROUTINE)(
- /*IN*/ PWSTR ValueName,
- /*IN*/ ULONG ValueType,
- /*IN*/ PVOID ValueData,
- /*IN*/ ULONG ValueLength,
- /*IN*/ PVOID Context,
- /*IN*/ PVOID EntryContext);
-
-#define RTL_REGISTRY_ABSOLUTE 0
-#define RTL_REGISTRY_SERVICES 1
-#define RTL_REGISTRY_CONTROL 2
-#define RTL_REGISTRY_WINDOWS_NT 3
-#define RTL_REGISTRY_DEVICEMAP 4
-#define RTL_REGISTRY_USER 5
-
-/* RTL_QUERY_REGISTRY_TABLE.Flags */
-#define RTL_QUERY_REGISTRY_SUBKEY 0x00000001
-#define RTL_QUERY_REGISTRY_TOPKEY 0x00000002
-#define RTL_QUERY_REGISTRY_REQUIRED 0x00000004
-#define RTL_QUERY_REGISTRY_NOVALUE 0x00000008
-#define RTL_QUERY_REGISTRY_NOEXPAND 0x00000010
-#define RTL_QUERY_REGISTRY_DIRECT 0x00000020
-#define RTL_QUERY_REGISTRY_DELETE 0x00000040
-
-typedef struct _RTL_QUERY_REGISTRY_TABLE {
- PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine;
- ULONG Flags;
- PWSTR Name;
- PVOID EntryContext;
- ULONG DefaultType;
- PVOID DefaultData;
- ULONG DefaultLength;
-} RTL_QUERY_REGISTRY_TABLE, *PRTL_QUERY_REGISTRY_TABLE;
-
-typedef struct _TIME_FIELDS {
- CSHORT Year;
- CSHORT Month;
- CSHORT Day;
- CSHORT Hour;
- CSHORT Minute;
- CSHORT Second;
- CSHORT Milliseconds;
- CSHORT Weekday;
-} TIME_FIELDS, *PTIME_FIELDS;
-
-typedef PVOID DDKAPI
-(*PALLOCATE_FUNCTION)(
- /*IN*/ POOL_TYPE PoolType,
- /*IN*/ SIZE_T NumberOfBytes,
- /*IN*/ ULONG Tag);
-
-typedef VOID DDKAPI
-(*PFREE_FUNCTION)(
- /*IN*/ PVOID Buffer);
-
-#define GENERAL_LOOKASIDE_S \
- SLIST_HEADER ListHead; \
- USHORT Depth; \
- USHORT MaximumDepth; \
- ULONG TotalAllocates; \
- _ANONYMOUS_UNION union { \
- ULONG AllocateMisses; \
- ULONG AllocateHits; \
- } DUMMYUNIONNAME; \
- ULONG TotalFrees; \
- _ANONYMOUS_UNION union { \
- ULONG FreeMisses; \
- ULONG FreeHits; \
- } DUMMYUNIONNAME2; \
- POOL_TYPE Type; \
- ULONG Tag; \
- ULONG Size; \
- PALLOCATE_FUNCTION Allocate; \
- PFREE_FUNCTION Free; \
- LIST_ENTRY ListEntry; \
- ULONG LastTotalAllocates; \
- _ANONYMOUS_UNION union { \
- ULONG LastAllocateMisses; \
- ULONG LastAllocateHits; \
- } DUMMYUNIONNAME3; \
- ULONG Future[2];
-
-typedef struct _GENERAL_LOOKASIDE {
- GENERAL_LOOKASIDE_S
-} GENERAL_LOOKASIDE, *PGENERAL_LOOKASIDE;
-
-typedef struct _NPAGED_LOOKASIDE_LIST {
- GENERAL_LOOKASIDE_S
- KSPIN_LOCK Obsoleted;
-} NPAGED_LOOKASIDE_LIST, *PNPAGED_LOOKASIDE_LIST;
-
-typedef struct _PAGED_LOOKASIDE_LIST {
- GENERAL_LOOKASIDE_S
- FAST_MUTEX Obsoleted;
-} PAGED_LOOKASIDE_LIST, *PPAGED_LOOKASIDE_LIST;
-
-typedef struct _CALLBACK_OBJECT *PCALLBACK_OBJECT;
-
-typedef VOID DDKAPI (*PCALLBACK_FUNCTION)(
- /*IN*/ PVOID CallbackContext,
- /*IN*/ PVOID Argument1,
- /*IN*/ PVOID Argument2);
-
-typedef enum _EVENT_TYPE {
- NotificationEvent,
- SynchronizationEvent
-} EVENT_TYPE;
-
-typedef enum _KWAIT_REASON {
- Executive,
- FreePage,
- PageIn,
- PoolAllocation,
- DelayExecution,
- Suspended,
- UserRequest,
- WrExecutive,
- WrFreePage,
- WrPageIn,
- WrPoolAllocation,
- WrDelayExecution,
- WrSuspended,
- WrUserRequest,
- WrEventPair,
- WrQueue,
- WrLpcReceive,
- WrLpcReply,
- WrVirtualMemory,
- WrPageOut,
- WrRendezvous,
- Spare2,
- Spare3,
- Spare4,
- Spare5,
- Spare6,
- WrKernel,
- MaximumWaitReason
-} KWAIT_REASON;
-
-typedef struct _KWAIT_BLOCK {
- LIST_ENTRY WaitListEntry;
- struct _KTHREAD * RESTRICTED_POINTER Thread;
- PVOID Object;
- struct _KWAIT_BLOCK * RESTRICTED_POINTER NextWaitBlock;
- USHORT WaitKey;
- USHORT WaitType;
-} KWAIT_BLOCK, *PKWAIT_BLOCK, *RESTRICTED_POINTER PRKWAIT_BLOCK;
-
-typedef struct _IO_REMOVE_LOCK_TRACKING_BLOCK * PIO_REMOVE_LOCK_TRACKING_BLOCK;
-
-typedef struct _IO_REMOVE_LOCK_COMMON_BLOCK {
- BOOLEAN Removed;
- BOOLEAN Reserved[3];
- LONG IoCount;
- KEVENT RemoveEvent;
-} IO_REMOVE_LOCK_COMMON_BLOCK;
-
-typedef struct _IO_REMOVE_LOCK_DBG_BLOCK {
- LONG Signature;
- LONG HighWatermark;
- LONGLONG MaxLockedTicks;
- LONG AllocateTag;
- LIST_ENTRY LockList;
- KSPIN_LOCK Spin;
- LONG LowMemoryCount;
- ULONG Reserved1[4];
- PVOID Reserved2;
- PIO_REMOVE_LOCK_TRACKING_BLOCK Blocks;
-} IO_REMOVE_LOCK_DBG_BLOCK;
-
-typedef struct _IO_REMOVE_LOCK {
- IO_REMOVE_LOCK_COMMON_BLOCK Common;
-#ifdef DBG
- IO_REMOVE_LOCK_DBG_BLOCK Dbg;
-#endif
-} IO_REMOVE_LOCK, *PIO_REMOVE_LOCK;
-
-typedef struct _IO_WORKITEM *PIO_WORKITEM;
-
-typedef VOID DDKAPI
-(*PIO_WORKITEM_ROUTINE)(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ PVOID Context);
-
-typedef struct _SHARE_ACCESS {
- ULONG OpenCount;
- ULONG Readers;
- ULONG Writers;
- ULONG Deleters;
- ULONG SharedRead;
- ULONG SharedWrite;
- ULONG SharedDelete;
-} SHARE_ACCESS, *PSHARE_ACCESS;
-
-typedef enum _KINTERRUPT_MODE {
- LevelSensitive,
- Latched
-} KINTERRUPT_MODE;
-
-typedef VOID DDKAPI
-(*PKINTERRUPT_ROUTINE)(
- VOID);
-
-typedef enum _KPROFILE_SOURCE {
- ProfileTime,
- ProfileAlignmentFixup,
- ProfileTotalIssues,
- ProfilePipelineDry,
- ProfileLoadInstructions,
- ProfilePipelineFrozen,
- ProfileBranchInstructions,
- ProfileTotalNonissues,
- ProfileDcacheMisses,
- ProfileIcacheMisses,
- ProfileCacheMisses,
- ProfileBranchMispredictions,
- ProfileStoreInstructions,
- ProfileFpInstructions,
- ProfileIntegerInstructions,
- Profile2Issue,
- Profile3Issue,
- Profile4Issue,
- ProfileSpecialInstructions,
- ProfileTotalCycles,
- ProfileIcacheIssues,
- ProfileDcacheAccesses,
- ProfileMemoryBarrierCycles,
- ProfileLoadLinkedIssues,
- ProfileMaximum
-} KPROFILE_SOURCE;
-
-typedef enum _CREATE_FILE_TYPE {
- CreateFileTypeNone,
- CreateFileTypeNamedPipe,
- CreateFileTypeMailslot
-} CREATE_FILE_TYPE;
-
-typedef struct _CONFIGURATION_INFORMATION {
- ULONG DiskCount;
- ULONG FloppyCount;
- ULONG CdRomCount;
- ULONG TapeCount;
- ULONG ScsiPortCount;
- ULONG SerialCount;
- ULONG ParallelCount;
- BOOLEAN AtDiskPrimaryAddressClaimed;
- BOOLEAN AtDiskSecondaryAddressClaimed;
- ULONG Version;
- ULONG MediumChangerCount;
-} CONFIGURATION_INFORMATION, *PCONFIGURATION_INFORMATION;
-
-typedef enum _CONFIGURATION_TYPE {
- ArcSystem,
- CentralProcessor,
- FloatingPointProcessor,
- PrimaryIcache,
- PrimaryDcache,
- SecondaryIcache,
- SecondaryDcache,
- SecondaryCache,
- EisaAdapter,
- TcAdapter,
- ScsiAdapter,
- DtiAdapter,
- MultiFunctionAdapter,
- DiskController,
- TapeController,
- CdromController,
- WormController,
- SerialController,
- NetworkController,
- DisplayController,
- ParallelController,
- PointerController,
- KeyboardController,
- AudioController,
- OtherController,
- DiskPeripheral,
- FloppyDiskPeripheral,
- TapePeripheral,
- ModemPeripheral,
- MonitorPeripheral,
- PrinterPeripheral,
- PointerPeripheral,
- KeyboardPeripheral,
- TerminalPeripheral,
- OtherPeripheral,
- LinePeripheral,
- NetworkPeripheral,
- SystemMemory,
- DockingInformation,
- RealModeIrqRoutingTable,
- MaximumType
-} CONFIGURATION_TYPE, *PCONFIGURATION_TYPE;
-
-typedef NTSTATUS (*PIO_QUERY_DEVICE_ROUTINE)(
- /*IN*/ PVOID Context,
- /*IN*/ PUNICODE_STRING PathName,
- /*IN*/ INTERFACE_TYPE BusType,
- /*IN*/ ULONG BusNumber,
- /*IN*/ PKEY_VALUE_FULL_INFORMATION *BusInformation,
- /*IN*/ CONFIGURATION_TYPE ControllerType,
- /*IN*/ ULONG ControllerNumber,
- /*IN*/ PKEY_VALUE_FULL_INFORMATION *ControllerInformation,
- /*IN*/ CONFIGURATION_TYPE PeripheralType,
- /*IN*/ ULONG PeripheralNumber,
- /*IN*/ PKEY_VALUE_FULL_INFORMATION *PeripheralInformation);
-
-typedef enum _WORK_QUEUE_TYPE {
- CriticalWorkQueue,
- DelayedWorkQueue,
- HyperCriticalWorkQueue,
- MaximumWorkQueue
-} WORK_QUEUE_TYPE;
-
-typedef VOID DDKAPI
-(*PWORKER_THREAD_ROUTINE)(
- /*IN*/ PVOID Parameter);
-
-typedef struct _WORK_QUEUE_ITEM {
- LIST_ENTRY List;
- PWORKER_THREAD_ROUTINE WorkerRoutine;
- PVOID Parameter;
-} WORK_QUEUE_ITEM, *PWORK_QUEUE_ITEM;
-
-typedef enum _KBUGCHECK_BUFFER_DUMP_STATE {
- BufferEmpty,
- BufferInserted,
- BufferStarted,
- BufferFinished,
- BufferIncomplete
-} KBUGCHECK_BUFFER_DUMP_STATE;
-
-typedef VOID DDKAPI
-(*PKBUGCHECK_CALLBACK_ROUTINE)(
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG Length);
-
-typedef struct _KBUGCHECK_CALLBACK_RECORD {
- LIST_ENTRY Entry;
- PKBUGCHECK_CALLBACK_ROUTINE CallbackRoutine;
- PVOID Buffer;
- ULONG Length;
- PUCHAR Component;
- ULONG_PTR Checksum;
- UCHAR State;
-} KBUGCHECK_CALLBACK_RECORD, *PKBUGCHECK_CALLBACK_RECORD;
-
-/*
- * VOID
- * KeInitializeCallbackRecord(
- * IN PKBUGCHECK_CALLBACK_RECORD CallbackRecord)
- */
-#define KeInitializeCallbackRecord(CallbackRecord) \
- CallbackRecord->State = BufferEmpty;
-
-typedef enum _KDPC_IMPORTANCE {
- LowImportance,
- MediumImportance,
- HighImportance
-} KDPC_IMPORTANCE;
-
-typedef enum _MEMORY_CACHING_TYPE_ORIG {
- MmFrameBufferCached = 2
-} MEMORY_CACHING_TYPE_ORIG;
-
-typedef enum _MEMORY_CACHING_TYPE {
- MmNonCached = FALSE,
- MmCached = TRUE,
- MmWriteCombined = MmFrameBufferCached,
- MmHardwareCoherentCached,
- MmNonCachedUnordered,
- MmUSWCCached,
- MmMaximumCacheType
-} MEMORY_CACHING_TYPE;
-
-typedef enum _MM_PAGE_PRIORITY {
- LowPagePriority,
- NormalPagePriority = 16,
- HighPagePriority = 32
-} MM_PAGE_PRIORITY;
-
-typedef enum _LOCK_OPERATION {
- IoReadAccess,
- IoWriteAccess,
- IoModifyAccess
-} LOCK_OPERATION;
-
-typedef enum _MM_SYSTEM_SIZE {
- MmSmallSystem,
- MmMediumSystem,
- MmLargeSystem
-} MM_SYSTEM_SIZE;
-
-typedef struct _OBJECT_HANDLE_INFORMATION {
- ULONG HandleAttributes;
- ACCESS_MASK GrantedAccess;
-} OBJECT_HANDLE_INFORMATION, *POBJECT_HANDLE_INFORMATION;
-
-typedef struct _CLIENT_ID {
- HANDLE UniqueProcess;
- HANDLE UniqueThread;
-} CLIENT_ID, *PCLIENT_ID;
-
-typedef VOID DDKAPI
-(*PKSTART_ROUTINE)(
- /*IN*/ PVOID StartContext);
-
-typedef VOID DDKAPI
-(*PCREATE_PROCESS_NOTIFY_ROUTINE)(
- /*IN*/ HANDLE ParentId,
- /*IN*/ HANDLE ProcessId,
- /*IN*/ BOOLEAN Create);
-
-typedef VOID DDKAPI
-(*PCREATE_THREAD_NOTIFY_ROUTINE)(
- /*IN*/ HANDLE ProcessId,
- /*IN*/ HANDLE ThreadId,
- /*IN*/ BOOLEAN Create);
-
-typedef struct _IMAGE_INFO {
- _ANONYMOUS_UNION union {
- ULONG Properties;
- _ANONYMOUS_STRUCT struct {
- ULONG ImageAddressingMode : 8;
- ULONG SystemModeImage : 1;
- ULONG ImageMappedToAllPids : 1;
- ULONG Reserved : 22;
- } DUMMYSTRUCTNAME;
- } DUMMYUNIONNAME;
- PVOID ImageBase;
- ULONG ImageSelector;
- SIZE_T ImageSize;
- ULONG ImageSectionNumber;
-} IMAGE_INFO, *PIMAGE_INFO;
-
-#define IMAGE_ADDRESSING_MODE_32BIT 3
-
-typedef VOID DDKAPI
-(*PLOAD_IMAGE_NOTIFY_ROUTINE)(
- /*IN*/ PUNICODE_STRING FullImageName,
- /*IN*/ HANDLE ProcessId,
- /*IN*/ PIMAGE_INFO ImageInfo);
-
-typedef enum _PROCESSINFOCLASS {
- ProcessBasicInformation,
- ProcessQuotaLimits,
- ProcessIoCounters,
- ProcessVmCounters,
- ProcessTimes,
- ProcessBasePriority,
- ProcessRaisePriority,
- ProcessDebugPort,
- ProcessExceptionPort,
- ProcessAccessToken,
- ProcessLdtInformation,
- ProcessLdtSize,
- ProcessDefaultHardErrorMode,
- ProcessIoPortHandlers,
- ProcessPooledUsageAndLimits,
- ProcessWorkingSetWatch,
- ProcessUserModeIOPL,
- ProcessEnableAlignmentFaultFixup,
- ProcessPriorityClass,
- ProcessWx86Information,
- ProcessHandleCount,
- ProcessAffinityMask,
- ProcessPriorityBoost,
- ProcessDeviceMap,
- ProcessSessionInformation,
- ProcessForegroundInformation,
- ProcessWow64Information,
- ProcessImageFileName,
- ProcessLUIDDeviceMapsEnabled,
- ProcessBreakOnTermination,
- ProcessDebugObjectHandle,
- ProcessDebugFlags,
- ProcessHandleTracing,
- MaxProcessInfoClass
-} PROCESSINFOCLASS;
-
-typedef enum _THREADINFOCLASS {
- ThreadBasicInformation,
- ThreadTimes,
- ThreadPriority,
- ThreadBasePriority,
- ThreadAffinityMask,
- ThreadImpersonationToken,
- ThreadDescriptorTableEntry,
- ThreadEnableAlignmentFaultFixup,
- ThreadEventPair_Reusable,
- ThreadQuerySetWin32StartAddress,
- ThreadZeroTlsCell,
- ThreadPerformanceCount,
- ThreadAmILastThread,
- ThreadIdealProcessor,
- ThreadPriorityBoost,
- ThreadSetTlsArrayAddress,
- ThreadIsIoPending,
- ThreadHideFromDebugger,
- ThreadBreakOnTermination,
- MaxThreadInfoClass
-} THREADINFOCLASS;
-
-#define ES_SYSTEM_REQUIRED 0x00000001
-#define ES_DISPLAY_REQUIRED 0x00000002
-#define ES_USER_PRESENT 0x00000004
-#define ES_CONTINUOUS 0x80000000
-
-typedef ULONG EXECUTION_STATE;
-
-typedef VOID DDKAPI
-(*PREQUEST_POWER_COMPLETE)(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ UCHAR MinorFunction,
- /*IN*/ POWER_STATE PowerState,
- /*IN*/ PVOID Context,
- /*IN*/ PIO_STATUS_BLOCK IoStatus);
-
-typedef enum _TRACE_INFORMATION_CLASS {
- TraceIdClass,
- TraceHandleClass,
- TraceEnableFlagsClass,
- TraceEnableLevelClass,
- GlobalLoggerHandleClass,
- EventLoggerHandleClass,
- AllLoggerHandlesClass,
- TraceHandleByNameClass
-} TRACE_INFORMATION_CLASS;
-
-typedef NTSTATUS DDKAPI
-(*PEX_CALLBACK_FUNCTION)(
- /*IN*/ PVOID CallbackContext,
- /*IN*/ PVOID Argument1,
- /*IN*/ PVOID Argument2);
-
-
-
-/*
-** Storage structures
-*/
-typedef enum _PARTITION_STYLE {
- PARTITION_STYLE_MBR,
- PARTITION_STYLE_GPT
-} PARTITION_STYLE;
-
-typedef struct _CREATE_DISK_MBR {
- ULONG Signature;
-} CREATE_DISK_MBR, *PCREATE_DISK_MBR;
-
-typedef struct _CREATE_DISK_GPT {
- GUID DiskId;
- ULONG MaxPartitionCount;
-} CREATE_DISK_GPT, *PCREATE_DISK_GPT;
-
-typedef struct _CREATE_DISK {
- PARTITION_STYLE PartitionStyle;
- _ANONYMOUS_UNION union {
- CREATE_DISK_MBR Mbr;
- CREATE_DISK_GPT Gpt;
- } DUMMYUNIONNAME;
-} CREATE_DISK, *PCREATE_DISK;
-
-typedef struct _DISK_SIGNATURE {
- ULONG PartitionStyle;
- _ANONYMOUS_UNION union {
- struct {
- ULONG Signature;
- ULONG CheckSum;
- } Mbr;
- struct {
- GUID DiskId;
- } Gpt;
- } DUMMYUNIONNAME;
-} DISK_SIGNATURE, *PDISK_SIGNATURE;
-
-typedef VOID DDKFASTAPI
-(*PTIME_UPDATE_NOTIFY_ROUTINE)(
- /*IN*/ HANDLE ThreadId,
- /*IN*/ KPROCESSOR_MODE Mode);
-
-#define DBG_STATUS_CONTROL_C 1
-#define DBG_STATUS_SYSRQ 2
-#define DBG_STATUS_BUGCHECK_FIRST 3
-#define DBG_STATUS_BUGCHECK_SECOND 4
-#define DBG_STATUS_FATAL 5
-#define DBG_STATUS_DEBUG_CONTROL 6
-#define DBG_STATUS_WORKER 7
-
-typedef struct _PHYSICAL_MEMORY_RANGE {
- PHYSICAL_ADDRESS BaseAddress;
- LARGE_INTEGER NumberOfBytes;
-} PHYSICAL_MEMORY_RANGE, *PPHYSICAL_MEMORY_RANGE;
-
-typedef ULONG_PTR
-(*PDRIVER_VERIFIER_THUNK_ROUTINE)(
- /*IN*/ PVOID Context);
-
-typedef struct _DRIVER_VERIFIER_THUNK_PAIRS {
- PDRIVER_VERIFIER_THUNK_ROUTINE PristineRoutine;
- PDRIVER_VERIFIER_THUNK_ROUTINE NewRoutine;
-} DRIVER_VERIFIER_THUNK_PAIRS, *PDRIVER_VERIFIER_THUNK_PAIRS;
-
-#define DRIVER_VERIFIER_SPECIAL_POOLING 0x0001
-#define DRIVER_VERIFIER_FORCE_IRQL_CHECKING 0x0002
-#define DRIVER_VERIFIER_INJECT_ALLOCATION_FAILURES 0x0004
-#define DRIVER_VERIFIER_TRACK_POOL_ALLOCATIONS 0x0008
-#define DRIVER_VERIFIER_IO_CHECKING 0x0010
-
-#define RTL_RANGE_LIST_ADD_IF_CONFLICT 0x00000001
-#define RTL_RANGE_LIST_ADD_SHARED 0x00000002
-
-#define RTL_RANGE_LIST_SHARED_OK 0x00000001
-#define RTL_RANGE_LIST_NULL_CONFLICT_OK 0x00000002
-
-#define RTL_RANGE_LIST_SHARED_OK 0x00000001
-#define RTL_RANGE_LIST_NULL_CONFLICT_OK 0x00000002
-
-#define RTL_RANGE_LIST_MERGE_IF_CONFLICT RTL_RANGE_LIST_ADD_IF_CONFLICT
-
-typedef struct _RTL_RANGE {
- ULONGLONG Start;
- ULONGLONG End;
- PVOID UserData;
- PVOID Owner;
- UCHAR Attributes;
- UCHAR Flags;
-} RTL_RANGE, *PRTL_RANGE;
-
-#define RTL_RANGE_SHARED 0x01
-#define RTL_RANGE_CONFLICT 0x02
-
-typedef struct _RTL_RANGE_LIST {
- LIST_ENTRY ListHead;
- ULONG Flags;
- ULONG Count;
- ULONG Stamp;
-} RTL_RANGE_LIST, *PRTL_RANGE_LIST;
-
-typedef struct _RANGE_LIST_ITERATOR {
- PLIST_ENTRY RangeListHead;
- PLIST_ENTRY MergedHead;
- PVOID Current;
- ULONG Stamp;
-} RTL_RANGE_LIST_ITERATOR, *PRTL_RANGE_LIST_ITERATOR;
-
-typedef BOOLEAN
-(*PRTL_CONFLICT_RANGE_CALLBACK)(
- /*IN*/ PVOID Context,
- /*IN*/ PRTL_RANGE Range);
-
-#define HASH_STRING_ALGORITHM_DEFAULT 0
-#define HASH_STRING_ALGORITHM_X65599 1
-#define HASH_STRING_ALGORITHM_INVALID 0xffffffff
-
-typedef enum _SUITE_TYPE {
- SmallBusiness,
- Enterprise,
- BackOffice,
- CommunicationServer,
- TerminalServer,
- SmallBusinessRestricted,
- EmbeddedNT,
- DataCenter,
- SingleUserTS,
- Personal,
- Blade,
- MaxSuiteType
-} SUITE_TYPE;
-
-typedef VOID DDKAPI
-(*PTIMER_APC_ROUTINE)(
- /*IN*/ PVOID TimerContext,
- /*IN*/ ULONG TimerLowValue,
- /*IN*/ LONG TimerHighValue);
-
-
-
-/*
-** WMI structures
-*/
-
-typedef VOID DDKAPI
-(*WMI_NOTIFICATION_CALLBACK)(
- PVOID Wnode,
- PVOID Context);
-
-
-/*
-** Architecture specific structures
-*/
-
-#ifdef _X86_
-
-typedef ULONG PFN_NUMBER, *PPFN_NUMBER;
-
-#define PASSIVE_LEVEL 0
-#define LOW_LEVEL 0
-#define APC_LEVEL 1
-#define DISPATCH_LEVEL 2
-#define SYNCH_LEVEL 27
-#define PROFILE_LEVEL 27
-#define CLOCK1_LEVEL 28
-#define CLOCK2_LEVEL 28
-#define IPI_LEVEL 29
-#define POWER_LEVEL 30
-#define HIGH_LEVEL 31
-
-typedef struct _KPCR_TIB {
- PVOID ExceptionList; /* 00 */
- PVOID StackBase; /* 04 */
- PVOID StackLimit; /* 08 */
- PVOID SubSystemTib; /* 0C */
- _ANONYMOUS_UNION union {
- PVOID FiberData; /* 10 */
- DWORD Version; /* 10 */
- } DUMMYUNIONNAME;
- PVOID ArbitraryUserPointer; /* 14 */
- struct _NT_TIB *Self; /* 18 */
-} KPCR_TIB, *PKPCR_TIB; /* 1C */
-
-#define PCR_MINOR_VERSION 1
-#define PCR_MAJOR_VERSION 1
-
-typedef struct _KPCR {
- KPCR_TIB Tib; /* 00 */
- struct _KPCR *Self; /* 1C */
- struct _KPRCB *PCRCB; /* 20 */
- KIRQL Irql; /* 24 */
- ULONG IRR; /* 28 */
- ULONG IrrActive; /* 2C */
- ULONG IDR; /* 30 */
- PVOID KdVersionBlock; /* 34 */
- PUSHORT IDT; /* 38 */
- PUSHORT GDT; /* 3C */
- struct _KTSS *TSS; /* 40 */
- USHORT MajorVersion; /* 44 */
- USHORT MinorVersion; /* 46 */
- KAFFINITY SetMember; /* 48 */
- ULONG StallScaleFactor; /* 4C */
- UCHAR SpareUnused; /* 50 */
- UCHAR Number; /* 51 */
-} KPCR, *PKPCR; /* 54 */
-
-typedef struct _KFLOATING_SAVE {
- ULONG ControlWord;
- ULONG StatusWord;
- ULONG ErrorOffset;
- ULONG ErrorSelector;
- ULONG DataOffset;
- ULONG DataSelector;
- ULONG Cr0NpxState;
- ULONG Spare1;
-} KFLOATING_SAVE, *PKFLOATING_SAVE;
-
-#define PAGE_SIZE 0x1000
-#define PAGE_SHIFT 12L
-
-extern NTOSAPI PVOID *MmHighestUserAddress;
-extern NTOSAPI PVOID *MmSystemRangeStart;
-extern NTOSAPI ULONG *MmUserProbeAddress;
-
-#define MM_HIGHEST_USER_ADDRESS *MmHighestUserAddress
-#define MM_SYSTEM_RANGE_START *MmSystemRangeStart
-#define MM_USER_PROBE_ADDRESS *MmUserProbeAddress
-#define MM_LOWEST_USER_ADDRESS (PVOID)0x10000
-#define MM_LOWEST_SYSTEM_ADDRESS (PVOID)0xC0C00000
-
-#define KI_USER_SHARED_DATA 0xffdf0000
-#define SharedUserData ((KUSER_SHARED_DATA * CONST) KI_USER_SHARED_DATA)
-
-#define EFLAG_SIGN 0x8000
-#define EFLAG_ZERO 0x4000
-#define EFLAG_SELECT (EFLAG_SIGN | EFLAG_ZERO)
-
-#define RESULT_NEGATIVE ((EFLAG_SIGN & ~EFLAG_ZERO) & EFLAG_SELECT)
-#define RESULT_ZERO ((~EFLAG_SIGN & EFLAG_ZERO) & EFLAG_SELECT)
-#define RESULT_POSITIVE ((~EFLAG_SIGN & ~EFLAG_ZERO) & EFLAG_SELECT)
-
-typedef enum _INTERLOCKED_RESULT {
- ResultNegative = RESULT_NEGATIVE,
- ResultZero = RESULT_ZERO,
- ResultPositive = RESULT_POSITIVE
-} INTERLOCKED_RESULT;
-
-NTOSAPI
-KIRQL
-DDKAPI
-KeGetCurrentIrql(
- VOID);
-
-/*
- * ULONG
- * KeGetCurrentProcessorNumber(
- * VOID)
- */
-#define KeGetCurrentProcessorNumber() \
- ((ULONG)KeGetCurrentKPCR()->Number)
-
-
-#if __USE_NTOSKRNL__
-/* CAREFUL: These are exported from ntoskrnl.exe as __fastcall functions,
- but are also exported from kernel32.dll and declared in winbase.h as
- __stdcall */
-#if !defined(__INTERLOCKED_DECLARED)
-#define __INTERLOCKED_DECLARED
-
-NTOSAPI
-LONG
-DDKFASTAPI
-InterlockedIncrement(
- /*IN*/ LONG VOLATILE *Addend);
-
-NTOSAPI
-LONG
-DDKFASTAPI
-InterlockedDecrement(
- /*IN*/ LONG VOLATILE *Addend);
-
-NTOSAPI
-LONG
-DDKFASTAPI
-InterlockedCompareExchange(
- /*IN OUT*/ PLONG VOLATILE Destination,
- /*IN*/ LONG Exchange,
- /*IN*/ LONG Comparand);
-
-NTOSAPI
-LONG
-DDKFASTAPI
-InterlockedExchange(
- /*IN OUT*/ PLONG VOLATILE Target,
- /*IN*/ LONG Value);
-
-NTOSAPI
-LONG
-DDKFASTAPI
-InterlockedExchangeAdd(
- /*IN OUT*/ PLONG VOLATILE Addend,
- /*IN*/ LONG Value);
-
-/*
- * PVOID
- * InterlockedExchangePointer(
- * IN OUT PVOID VOLATILE *Target,
- * IN PVOID Value)
- */
-#define InterlockedExchangePointer(Target, Value) \
- ((PVOID) InterlockedExchange((PLONG) Target, (LONG) Value))
-
-/*
- * PVOID
- * InterlockedCompareExchangePointer(
- * IN OUT PVOID *Destination,
- * IN PVOID Exchange,
- * IN PVOID Comparand)
- */
-#define InterlockedCompareExchangePointer(Destination, Exchange, Comparand) \
- ((PVOID) InterlockedCompareExchange((PLONG) Destination, (LONG) Exchange, (LONG) Comparand))
-
-#if (_WIN32_WINNT >= 0x0501)
-PSLIST_ENTRY
-DDKFASTAPI
-InterlockedPopEntrySList(
- /*IN*/ PSLIST_HEADER ListHead);
-
-NTOSAPI
-PSLIST_ENTRY
-DDKFASTAPI
-InterlockedPushEntrySList(
- /*IN*/ PSLIST_HEADER ListHead,
- /*IN*/ PSLIST_ENTRY ListEntry);
-#endif /* _WIN32_WINNT >= 0x0501 */
-
-#endif /* !__INTERLOCKED_DECLARED */
-#endif /* __USE_NTOSKRNL__ */
-
-NTOSAPI
-VOID
-DDKFASTAPI
-KefAcquireSpinLockAtDpcLevel(
- /*IN*/ PKSPIN_LOCK SpinLock);
-
-NTOSAPI
-VOID
-DDKFASTAPI
-KefReleaseSpinLockFromDpcLevel(
- /*IN*/ PKSPIN_LOCK SpinLock);
-
-#define KeAcquireSpinLockAtDpcLevel(SpinLock) KefAcquireSpinLockAtDpcLevel(SpinLock)
-#define KeReleaseSpinLockFromDpcLevel(SpinLock) KefReleaseSpinLockFromDpcLevel(SpinLock)
-
-#define RtlCopyMemoryNonTemporal RtlCopyMemory
-
-#define KeGetDcacheFillSize() 1L
-
-#endif /* _X86_ */
-
-
-
-/*
-** Utillity functions
-*/
-
-#define ARGUMENT_PRESENT(ArgumentPointer) \
- ((BOOLEAN) ((PVOID)ArgumentPointer != (PVOID)NULL))
-
-/*
- * ULONG
- * BYTE_OFFSET(
- * IN PVOID Va)
- */
-#define BYTE_OFFSET(Va) \
- ((ULONG) ((ULONG_PTR) (Va) & (PAGE_SIZE - 1)))
-
-/*
- * ULONG
- * BYTES_TO_PAGES(
- * IN ULONG Size)
- */
-#define BYTES_TO_PAGES(Size) \
- ((ULONG) ((ULONG_PTR) (Size) >> PAGE_SHIFT) + (((ULONG) (Size) & (PAGE_SIZE - 1)) != 0))
-
-/*
- * PCHAR
- * CONTAINING_RECORD(
- * IN PCHAR Address,
- * IN TYPE Type,
- * IN PCHAR Field);
- */
-#ifndef CONTAINING_RECORD
-#define CONTAINING_RECORD(Address, Type, Field) \
- ((Type *) (((ULONG_PTR) Address) - FIELD_OFFSET(Type, Field)))
-#endif
-
-/* LONG
- * FIELD_OFFSET(
- * IN TYPE Type,
- * IN PCHAR Field);
- */
-#ifndef FIELD_OFFSET
-#define FIELD_OFFSET(Type, Field) \
- ((LONG) (&(((Type *) 0)->Field)))
-#endif
-
-/*
- * PVOID
- * PAGE_ALIGN(
- * IN PVOID Va)
- */
-#define PAGE_ALIGN(Va) \
- ((PVOID) ((ULONG_PTR)(Va) & ~(PAGE_SIZE - 1)))
-
-/*
- * ULONG_PTR
- * ROUND_TO_PAGES(
- * IN ULONG_PTR Size)
- */
-#define ROUND_TO_PAGES(Size) \
- ((ULONG_PTR) (((ULONG_PTR) Size + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1)))
-
-NTOSAPI
-VOID
-DDKAPI
-RtlAssert(
- /*IN*/ PVOID FailedAssertion,
- /*IN*/ PVOID FileName,
- /*IN*/ ULONG LineNumber,
- /*IN*/ PCHAR Message);
-
-#ifdef DBG
-
-#define ASSERT(exp) \
- ((!(exp)) ? \
- (RtlAssert( #exp, __FILE__, __LINE__, NULL ), FALSE) : TRUE)
-
-#define ASSERTMSG(msg, exp) \
- ((!(exp)) ? \
- (RtlAssert( #exp, __FILE__, __LINE__, msg ), FALSE) : TRUE)
-
-#define RTL_SOFT_ASSERT(exp) \
- ((!(_exp)) ? \
- (DbgPrint("%s(%d): Soft assertion failed\n Expression: %s\n", __FILE__, __LINE__, #exp), FALSE) : TRUE)
-
-#define RTL_SOFT_ASSERTMSG(msg, exp) \
- ((!(exp)) ? \
- (DbgPrint("%s(%d): Soft assertion failed\n Expression: %s\n Message: %s\n", __FILE__, __LINE__, #exp, (msg)), FALSE) : TRUE)
-
-#define RTL_VERIFY(exp) ASSERT(exp)
-#define RTL_VERIFYMSG(msg, exp) ASSERT(msg, exp)
-
-#define RTL_SOFT_VERIFY(exp) RTL_SOFT_ASSERT(exp)
-#define RTL_SOFT_VERIFYMSG(msg, exp) RTL_SOFT_ASSERTMSG(msg, exp)
-
-#else /* !DBG */
-
-#define ASSERT(exp) ((VOID) 0)
-#define ASSERTMSG(msg, exp) ((VOID) 0)
-
-#define RTL_SOFT_ASSERT(exp) ((VOID) 0)
-#define RTL_SOFT_ASSERTMSG(msg, exp) ((VOID) 0)
-
-#define RTL_VERIFY(exp) ((exp) ? TRUE : FALSE)
-#define RTL_VERIFYMSG(msg, exp) ((exp) ? TRUE : FALSE)
-
-#define RTL_SOFT_VERIFY(exp) ((exp) ? TRUE : FALSE)
-#define RTL_SOFT_VERIFYMSG(msg, exp) ((exp) ? TRUE : FALSE)
-
-#endif /* DBG */
-
-
-/*
-** Driver support routines
-*/
-
-/** Runtime library routines **/
-
-/*
- * VOID
- * InitializeListHead(
- * IN PLIST_ENTRY ListHead)
- */
-#define InitializeListHead(_ListHead) \
-{ \
- (_ListHead)->Flink = (_ListHead); \
- (_ListHead)->Blink = (_ListHead); \
-}
-
-/*
- * VOID
- * InsertHeadList(
- * IN PLIST_ENTRY ListHead,
- * IN PLIST_ENTRY Entry)
- */
-#define InsertHeadList(_ListHead, \
- _Entry) \
-{ \
- PLIST_ENTRY _OldFlink; \
- _OldFlink = (_ListHead)->Flink; \
- (_Entry)->Flink = _OldFlink; \
- (_Entry)->Blink = (_ListHead); \
- _OldFlink->Blink = (_Entry); \
- (_ListHead)->Flink = (_Entry); \
-}
-
-/*
- * VOID
- * InsertTailList(
- * IN PLIST_ENTRY ListHead,
- * IN PLIST_ENTRY Entry)
- */
-#define InsertTailList(_ListHead, \
- _Entry) \
-{ \
- PLIST_ENTRY _OldBlink; \
- _OldBlink = (_ListHead)->Blink; \
- (_Entry)->Flink = (_ListHead); \
- (_Entry)->Blink = _OldBlink; \
- _OldBlink->Flink = (_Entry); \
- (_ListHead)->Blink = (_Entry); \
-}
-
-/*
- * BOOLEAN
- * IsListEmpty(
- * IN PLIST_ENTRY ListHead)
- */
-#define IsListEmpty(_ListHead) \
- ((_ListHead)->Flink == (_ListHead))
-
-static __inline PSINGLE_LIST_ENTRY
-PopEntryList(
- /*IN*/ PSINGLE_LIST_ENTRY ListHead)
-{
- PSINGLE_LIST_ENTRY Entry;
-
- Entry = ListHead->Next;
- if (Entry != NULL)
- {
- ListHead->Next = Entry->Next;
- }
- return Entry;
-}
-
-/*
- * VOID
- * PushEntryList(
- * IN PSINGLE_LIST_ENTRY ListHead,
- * IN PSINGLE_LIST_ENTRY Entry)
- */
-#define PushEntryList(_ListHead, \
- _Entry) \
-{ \
- (_Entry)->Next = (_ListHead)->Next; \
- (_ListHead)->Next = (_Entry); \
-}
-
-/*
- * VOID
- * RemoveEntryList(
- * IN PLIST_ENTRY Entry)
- */
-#define RemoveEntryList(_Entry) \
-{ \
- PLIST_ENTRY _OldFlink; \
- PLIST_ENTRY _OldBlink; \
- _OldFlink = (_Entry)->Flink; \
- _OldBlink = (_Entry)->Blink; \
- _OldFlink->Blink = _OldBlink; \
- _OldBlink->Flink = _OldFlink; \
- (_Entry)->Flink = NULL; \
- (_Entry)->Blink = NULL; \
-}
-
-static __inline PLIST_ENTRY
-RemoveHeadList(
- /*IN*/ PLIST_ENTRY ListHead)
-{
- PLIST_ENTRY OldFlink;
- PLIST_ENTRY OldBlink;
- PLIST_ENTRY Entry;
-
- Entry = ListHead->Flink;
- OldFlink = ListHead->Flink->Flink;
- OldBlink = ListHead->Flink->Blink;
- OldFlink->Blink = OldBlink;
- OldBlink->Flink = OldFlink;
-
- if (Entry != ListHead)
- {
- Entry->Flink = NULL;
- Entry->Blink = NULL;
- }
-
- return Entry;
-}
-
-static __inline PLIST_ENTRY
-RemoveTailList(
- /*IN*/ PLIST_ENTRY ListHead)
-{
- PLIST_ENTRY OldFlink;
- PLIST_ENTRY OldBlink;
- PLIST_ENTRY Entry;
-
- Entry = ListHead->Blink;
- OldFlink = ListHead->Blink->Flink;
- OldBlink = ListHead->Blink->Blink;
- OldFlink->Blink = OldBlink;
- OldBlink->Flink = OldFlink;
-
- if (Entry != ListHead)
- {
- Entry->Flink = NULL;
- Entry->Blink = NULL;
- }
-
- return Entry;
-}
-
-/*
- * USHORT
- * QueryDepthSList(
- * IN PSLIST_HEADER SListHead)
- */
-#define QueryDepthSList(_SListHead) \
- ((USHORT) ((_SListHead)->Alignment & 0xffff))
-
-#define InterlockedFlushSList(ListHead) ExInterlockedFlushSList(ListHead)
-
-NTOSAPI
-ULONG
-DDKAPI
-RtlAnsiStringToUnicodeSize(
- /*IN*/ PANSI_STRING AnsiString);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlAddRange(
- /*IN OUT*/ PRTL_RANGE_LIST RangeList,
- /*IN*/ ULONGLONG Start,
- /*IN*/ ULONGLONG End,
- /*IN*/ UCHAR Attributes,
- /*IN*/ ULONG Flags,
- /*IN*/ PVOID UserData /*OPTIONAL*/,
- /*IN*/ PVOID Owner /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlAnsiStringToUnicodeString(
- /*IN OUT*/ PUNICODE_STRING DestinationString,
- /*IN*/ PANSI_STRING SourceString,
- /*IN*/ BOOLEAN AllocateDestinationString);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlAppendUnicodeStringToString(
- /*IN OUT*/ PUNICODE_STRING Destination,
- /*IN*/ PUNICODE_STRING Source);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlAppendUnicodeToString(
- /*IN OUT*/ PUNICODE_STRING Destination,
- /*IN*/ PCWSTR Source);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-RtlAreBitsClear(
- /*IN*/ PRTL_BITMAP BitMapHeader,
- /*IN*/ ULONG StartingIndex,
- /*IN*/ ULONG Length);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-RtlAreBitsSet(
- /*IN*/ PRTL_BITMAP BitMapHeader,
- /*IN*/ ULONG StartingIndex,
- /*IN*/ ULONG Length);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlCharToInteger(
- /*IN*/ PCSZ String,
- /*IN*/ ULONG Base /*OPTIONAL*/,
- /*IN OUT*/ PULONG Value);
-
-NTOSAPI
-ULONG
-DDKAPI
-RtlCheckBit(
- /*IN*/ PRTL_BITMAP BitMapHeader,
- /*IN*/ ULONG BitPosition);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlCheckRegistryKey(
- /*IN*/ ULONG RelativeTo,
- /*IN*/ PWSTR Path);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlClearAllBits(
- /*IN*/ PRTL_BITMAP BitMapHeader);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlClearBit(
- PRTL_BITMAP BitMapHeader,
- ULONG BitNumber);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlClearBits(
- /*IN*/ PRTL_BITMAP BitMapHeader,
- /*IN*/ ULONG StartingIndex,
- /*IN*/ ULONG NumberToClear);
-
-NTOSAPI
-SIZE_T
-DDKAPI
-RtlCompareMemory(
- /*IN*/ CONST VOID *Source1,
- /*IN*/ CONST VOID *Source2,
- /*IN*/ SIZE_T Length);
-
-NTOSAPI
-LONG
-DDKAPI
-RtlCompareString(
- /*IN*/ PSTRING String1,
- /*IN*/ PSTRING String2,
- BOOLEAN CaseInSensitive);
-
-NTOSAPI
-LONG
-DDKAPI
-RtlCompareUnicodeString(
- /*IN*/ PUNICODE_STRING String1,
- /*IN*/ PUNICODE_STRING String2,
- /*IN*/ BOOLEAN CaseInSensitive);
-
-NTOSAPI
-LARGE_INTEGER
-DDKAPI
-RtlConvertLongToLargeInteger(
- /*IN*/ LONG SignedInteger);
-
-NTOSAPI
-LUID
-DDKAPI
-RtlConvertLongToLuid(
- /*IN*/ LONG Long);
-
-NTOSAPI
-LARGE_INTEGER
-DDKAPI
-RtlConvertUlongToLargeInteger(
- /*IN*/ ULONG UnsignedInteger);
-
-NTOSAPI
-LUID
-DDKAPI
-RtlConvertUlongToLuid(
- ULONG Ulong);
-
-/*
- * VOID
- * RtlCopyMemory(
- * IN VOID UNALIGNED *Destination,
- * IN CONST VOID UNALIGNED *Source,
- * IN SIZE_T Length)
- */
-#ifndef RtlCopyMemory
-#define RtlCopyMemory(Destination, Source, Length) \
- memcpy(Destination, Source, Length);
-#endif
-
-#ifndef RtlCopyBytes
-#define RtlCopyBytes RtlCopyMemory
-#endif
-
-NTOSAPI
-VOID
-DDKAPI
-RtlCopyMemory32(
- /*IN*/ VOID UNALIGNED *Destination,
- /*IN*/ CONST VOID UNALIGNED *Source,
- /*IN*/ ULONG Length);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlCopyRangeList(
- /*OUT*/ PRTL_RANGE_LIST CopyRangeList,
- /*IN*/ PRTL_RANGE_LIST RangeList);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlCopyString(
- /*IN OUT*/ PSTRING DestinationString,
- /*IN*/ PSTRING SourceString /*OPTIONAL*/);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlCopyUnicodeString(
- /*IN OUT*/ PUNICODE_STRING DestinationString,
- /*IN*/ PUNICODE_STRING SourceString);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlCreateRegistryKey(
- /*IN*/ ULONG RelativeTo,
- /*IN*/ PWSTR Path);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlCreateSecurityDescriptor(
- /*IN OUT*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN*/ ULONG Revision);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlDeleteOwnersRanges(
- /*IN OUT*/ PRTL_RANGE_LIST RangeList,
- /*IN*/ PVOID Owner);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlDeleteRange(
- /*IN OUT*/ PRTL_RANGE_LIST RangeList,
- /*IN*/ ULONGLONG Start,
- /*IN*/ ULONGLONG End,
- /*IN*/ PVOID Owner);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlDeleteRegistryValue(
- /*IN*/ ULONG RelativeTo,
- /*IN*/ PCWSTR Path,
- /*IN*/ PCWSTR ValueName);
-
-NTOSAPI
-BOOL
-DDKAPI
-RtlDosPathNameToNtPathName_U(
- /*IN*/ PCWSTR DosPathName,
- /*OUT*/ PUNICODE_STRING NtPathName,
- /*OUT*/ PCWSTR *NtFileNamePart,
- /*OUT*/ VOID *DirectoryInfo);
-
-/*
- * BOOLEAN
- * RtlEqualLuid(
- * IN LUID Luid1,
- * IN LUID Luid2)
- */
-#define RtlEqualLuid(_Luid1, \
- _Luid2) \
- ((Luid1.LowPart == Luid2.LowPart) && (Luid1.HighPart == Luid2.HighPart))
-
-/*
- * ULONG
- * RtlEqualMemory(
- * IN VOID UNALIGNED *Destination,
- * IN CONST VOID UNALIGNED *Source,
- * IN SIZE_T Length)
- */
-#define RtlEqualMemory(Destination, Source, Length) (!memcmp(Destination, Source, Length))
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-RtlEqualString(
- /*IN*/ PSTRING String1,
- /*IN*/ PSTRING String2,
- /*IN*/ BOOLEAN CaseInSensitive);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-RtlEqualUnicodeString(
- /*IN*/ CONST UNICODE_STRING *String1,
- /*IN*/ CONST UNICODE_STRING *String2,
- /*IN*/ BOOLEAN CaseInSensitive);
-
-/*
- * VOID
- * RtlFillMemory(
- * IN VOID UNALIGNED *Destination,
- * IN SIZE_T Length,
- * IN UCHAR Fill)
- */
-#ifndef RtlFillMemory
-#define RtlFillMemory(Destination, Length, Fill) \
- memset(Destination, Fill, Length)
-#endif
-
-#ifndef RtlFillBytes
-#define RtlFillBytes RtlFillMemory
-#endif
-
-NTOSAPI
-ULONG
-DDKAPI
-RtlFindClearBits(
- /*IN*/ PRTL_BITMAP BitMapHeader,
- /*IN*/ ULONG NumberToFind,
- /*IN*/ ULONG HintIndex);
-
-NTOSAPI
-ULONG
-DDKAPI
-RtlFindClearBitsAndSet(
- /*IN*/ PRTL_BITMAP BitMapHeader,
- /*IN*/ ULONG NumberToFind,
- /*IN*/ ULONG HintIndex);
-
-NTOSAPI
-ULONG
-DDKAPI
-RtlFindClearRuns(
- /*IN*/ PRTL_BITMAP BitMapHeader,
- /*OUT*/ PRTL_BITMAP_RUN RunArray,
- /*IN*/ ULONG SizeOfRunArray,
- /*IN*/ BOOLEAN LocateLongestRuns);
-
-NTOSAPI
-ULONG
-DDKAPI
-RtlFindFirstRunClear(
- /*IN*/ PRTL_BITMAP BitMapHeader,
- /*OUT*/ PULONG StartingIndex);
-
-NTOSAPI
-ULONG
-DDKAPI
-RtlFindLastBackwardRunClear(
- /*IN*/ PRTL_BITMAP BitMapHeader,
- /*IN*/ ULONG FromIndex,
- /*OUT*/ PULONG StartingRunIndex);
-
-NTOSAPI
-CCHAR
-DDKAPI
-RtlFindLeastSignificantBit(
- /*IN*/ ULONGLONG Set);
-
-NTOSAPI
-ULONG
-DDKAPI
-RtlFindLongestRunClear(
- /*IN*/ PRTL_BITMAP BitMapHeader,
- /*OUT*/ PULONG StartingIndex);
-
-NTOSAPI
-CCHAR
-DDKAPI
-RtlFindMostSignificantBit(
- /*IN*/ ULONGLONG Set);
-
-NTOSAPI
-ULONG
-DDKAPI
-RtlFindNextForwardRunClear(
- /*IN*/ PRTL_BITMAP BitMapHeader,
- /*IN*/ ULONG FromIndex,
- /*OUT*/ PULONG StartingRunIndex);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlFindRange(
- /*IN*/ PRTL_RANGE_LIST RangeList,
- /*IN*/ ULONGLONG Minimum,
- /*IN*/ ULONGLONG Maximum,
- /*IN*/ ULONG Length,
- /*IN*/ ULONG Alignment,
- /*IN*/ ULONG Flags,
- /*IN*/ UCHAR AttributeAvailableMask,
- /*IN*/ PVOID Context /*OPTIONAL*/,
- /*IN*/ PRTL_CONFLICT_RANGE_CALLBACK Callback /*OPTIONAL*/,
- /*OUT*/ PULONGLONG Start);
-
-NTOSAPI
-ULONG
-DDKAPI
-RtlFindSetBits(
- /*IN*/ PRTL_BITMAP BitMapHeader,
- /*IN*/ ULONG NumberToFind,
- /*IN*/ ULONG HintIndex);
-
-NTOSAPI
-ULONG
-DDKAPI
-RtlFindSetBitsAndClear(
- /*IN*/ PRTL_BITMAP BitMapHeader,
- /*IN*/ ULONG NumberToFind,
- /*IN*/ ULONG HintIndex);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlFreeAnsiString(
- /*IN*/ PANSI_STRING AnsiString);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlFreeRangeList(
- /*IN*/ PRTL_RANGE_LIST RangeList);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlFreeUnicodeString(
- /*IN*/ PUNICODE_STRING UnicodeString);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlGetCallersAddress(
- /*OUT*/ PVOID *CallersAddress,
- /*OUT*/ PVOID *CallersCaller);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlGetVersion(
- /*IN OUT*/ PRTL_OSVERSIONINFOW lpVersionInformation);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlGetFirstRange(
- /*IN*/ PRTL_RANGE_LIST RangeList,
- /*OUT*/ PRTL_RANGE_LIST_ITERATOR Iterator,
- /*OUT*/ PRTL_RANGE *Range);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlGetNextRange(
- /*IN OUT*/ PRTL_RANGE_LIST_ITERATOR Iterator,
- /*OUT*/ PRTL_RANGE *Range,
- /*IN*/ BOOLEAN MoveForwards);
-
-#define FOR_ALL_RANGES(RangeList, Iterator, Current) \
- for (RtlGetFirstRange((RangeList), (Iterator), &(Current)); \
- (Current) != NULL; \
- RtlGetNextRange((Iterator), &(Current), TRUE))
-
-#define FOR_ALL_RANGES_BACKWARDS(RangeList, Iterator, Current) \
- for (RtlGetLastRange((RangeList), (Iterator), &(Current)); \
- (Current) != NULL; \
- RtlGetNextRange((Iterator), &(Current), FALSE))
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlGUIDFromString(
- /*IN*/ PUNICODE_STRING GuidString,
- /*OUT*/ GUID *Guid);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlHashUnicodeString(
- /*IN*/ CONST UNICODE_STRING *String,
- /*IN*/ BOOLEAN CaseInSensitive,
- /*IN*/ ULONG HashAlgorithm,
- /*OUT*/ PULONG HashValue);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlInitAnsiString(
- /*IN OUT*/ PANSI_STRING DestinationString,
- /*IN*/ PCSZ SourceString);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlInitializeBitMap(
- /*IN*/ PRTL_BITMAP BitMapHeader,
- /*IN*/ PULONG BitMapBuffer,
- /*IN*/ ULONG SizeOfBitMap);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlInitializeRangeList(
- /*IN OUT*/ PRTL_RANGE_LIST RangeList);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlInitString(
- /*IN OUT*/ PSTRING DestinationString,
- /*IN*/ PCSZ SourceString);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlInitUnicodeString(
- /*IN OUT*/ PUNICODE_STRING DestinationString,
- /*IN*/ PCWSTR SourceString);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlInt64ToUnicodeString(
- /*IN*/ ULONGLONG Value,
- /*IN*/ ULONG Base /*OPTIONAL*/,
- /*IN OUT*/ PUNICODE_STRING String);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlIntegerToUnicodeString(
- /*IN*/ ULONG Value,
- /*IN*/ ULONG Base /*OPTIONAL*/,
- /*IN OUT*/ PUNICODE_STRING String);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlIntPtrToUnicodeString(
- PLONG Value,
- ULONG Base /*OPTIONAL*/,
- PUNICODE_STRING String);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlInvertRangeList(
- /*OUT*/ PRTL_RANGE_LIST InvertedRangeList,
- /*IN*/ PRTL_RANGE_LIST RangeList);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlIsRangeAvailable(
- /*IN*/ PRTL_RANGE_LIST RangeList,
- /*IN*/ ULONGLONG Start,
- /*IN*/ ULONGLONG End,
- /*IN*/ ULONG Flags,
- /*IN*/ UCHAR AttributeAvailableMask,
- /*IN*/ PVOID Context /*OPTIONAL*/,
- /*IN*/ PRTL_CONFLICT_RANGE_CALLBACK Callback /*OPTIONAL*/,
- /*OUT*/ PBOOLEAN Available);
-
-/*
- * BOOLEAN
- * RtlIsZeroLuid(
- * IN PLUID L1)
- */
-#define RtlIsZeroLuid(_L1) \
- ((BOOLEAN) ((!(_L1)->LowPart) && (!(_L1)->HighPart)))
-
-NTOSAPI
-ULONG
-DDKAPI
-RtlLengthSecurityDescriptor(
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlMapGenericMask(
- /*IN OUT*/ PACCESS_MASK AccessMask,
- /*IN*/ PGENERIC_MAPPING GenericMapping);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlMergeRangeLists(
- /*OUT*/ PRTL_RANGE_LIST MergedRangeList,
- /*IN*/ PRTL_RANGE_LIST RangeList1,
- /*IN*/ PRTL_RANGE_LIST RangeList2,
- /*IN*/ ULONG Flags);
-
-/*
- * VOID
- * RtlMoveMemory(
- * IN VOID UNALIGNED *Destination,
- * IN CONST VOID UNALIGNED *Source,
- * IN SIZE_T Length)
- */
-#define RtlMoveMemory memmove
-
-NTOSAPI
-ULONG
-DDKAPI
-RtlNumberOfClearBits(
- /*IN*/ PRTL_BITMAP BitMapHeader);
-
-NTOSAPI
-ULONG
-DDKAPI
-RtlNumberOfSetBits(
- /*IN*/ PRTL_BITMAP BitMapHeader);
-
-NTOSAPI
-VOID
-DDKFASTAPI
-RtlPrefetchMemoryNonTemporal(
- /*IN*/ PVOID Source,
- /*IN*/ SIZE_T Length);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-RtlPrefixUnicodeString(
- /*IN*/ PUNICODE_STRING String1,
- /*IN*/ PUNICODE_STRING String2,
- /*IN*/ BOOLEAN CaseInSensitive);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlQueryRegistryValues(
- /*IN*/ ULONG RelativeTo,
- /*IN*/ PCWSTR Path,
- /*IN*/ PRTL_QUERY_REGISTRY_TABLE QueryTable,
- /*IN*/ PVOID Context,
- /*IN*/ PVOID Environment /*OPTIONAL*/);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlRetrieveUlong(
- /*IN OUT*/ PULONG DestinationAddress,
- /*IN*/ PULONG SourceAddress);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlRetrieveUshort(
- /*IN OUT*/ PUSHORT DestinationAddress,
- /*IN*/ PUSHORT SourceAddress);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlSetAllBits(
- /*IN*/ PRTL_BITMAP BitMapHeader);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlSetBit(
- PRTL_BITMAP BitMapHeader,
- ULONG BitNumber);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlSetBits(
- /*IN*/ PRTL_BITMAP BitMapHeader,
- /*IN*/ ULONG StartingIndex,
- /*IN*/ ULONG NumberToSet);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlSetDaclSecurityDescriptor(
- /*IN OUT*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN*/ BOOLEAN DaclPresent,
- /*IN*/ PACL Dacl /*OPTIONAL*/,
- /*IN*/ BOOLEAN DaclDefaulted /*OPTIONAL*/);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlStoreUlong(
- /*IN*/ PULONG Address,
- /*IN*/ ULONG Value);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlStoreUlonglong(
- /*IN OUT*/ PULONGLONG Address,
- ULONGLONG Value);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlStoreUlongPtr(
- /*IN OUT*/ PULONG_PTR Address,
- /*IN*/ ULONG_PTR Value);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlStoreUshort(
- /*IN*/ PUSHORT Address,
- /*IN*/ USHORT Value);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlStringFromGUID(
- /*IN*/ REFGUID Guid,
- /*OUT*/ PUNICODE_STRING GuidString);
-
-#define RtlStringCbCopyA(dst, dst_len, src) strncpy(dst, src, dst_len)
-#define RtlStringCbPrintfA(args...) snprintf(args)
-#define RtlStringCbVPrintfA(args...) vsnprintf(args)
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-RtlTestBit(
- /*IN*/ PRTL_BITMAP BitMapHeader,
- /*IN*/ ULONG BitNumber);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-RtlTimeFieldsToTime(
- /*IN*/ PTIME_FIELDS TimeFields,
- /*IN*/ PLARGE_INTEGER Time);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlTimeToTimeFields(
- /*IN*/ PLARGE_INTEGER Time,
- /*IN*/ PTIME_FIELDS TimeFields);
-
-NTOSAPI
-ULONG
-DDKFASTAPI
-RtlUlongByteSwap(
- /*IN*/ ULONG Source);
-
-NTOSAPI
-ULONGLONG
-DDKFASTAPI
-RtlUlonglongByteSwap(
- /*IN*/ ULONGLONG Source);
-
-NTOSAPI
-ULONG
-DDKAPI
-RtlUnicodeStringToAnsiSize(
- /*IN*/ PUNICODE_STRING UnicodeString);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlUnicodeStringToAnsiString(
- /*IN OUT*/ PANSI_STRING DestinationString,
- /*IN*/ PUNICODE_STRING SourceString,
- /*IN*/ BOOLEAN AllocateDestinationString);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlUnicodeStringToInteger(
- /*IN*/ PUNICODE_STRING String,
- /*IN*/ ULONG Base /*OPTIONAL*/,
- /*OUT*/ PULONG Value);
-
-NTOSAPI
-WCHAR
-DDKAPI
-RtlUpcaseUnicodeChar(
- /*IN*/ WCHAR SourceCharacter);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlUpcaseUnicodeString(
- /*IN OUT*/ PUNICODE_STRING DestinationString /*OPTIONAL*/,
- /*IN*/ PCUNICODE_STRING SourceString,
- /*IN*/ BOOLEAN AllocateDestinationString);
-
-NTOSAPI
-CHAR
-DDKAPI
-RtlUpperChar(
- /*IN*/ CHAR Character);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlUpperString(
- /*IN OUT*/ PSTRING DestinationString,
- /*IN*/ PSTRING SourceString);
-
-NTOSAPI
-USHORT
-DDKFASTAPI
-RtlUshortByteSwap(
- /*IN*/ USHORT Source);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-RtlValidRelativeSecurityDescriptor(
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptorInput,
- /*IN*/ ULONG SecurityDescriptorLength,
- /*IN*/ SECURITY_INFORMATION RequiredInformation);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-RtlValidSecurityDescriptor(
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlVerifyVersionInfo(
- /*IN*/ PRTL_OSVERSIONINFOEXW VersionInfo,
- /*IN*/ ULONG TypeMask,
- /*IN*/ ULONGLONG ConditionMask);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlVolumeDeviceToDosName(
- /*IN*/ PVOID VolumeDeviceObject,
- /*OUT*/ PUNICODE_STRING DosName);
-
-NTOSAPI
-ULONG
-DDKAPI
-RtlWalkFrameChain(
- /*OUT*/ PVOID *Callers,
- /*IN*/ ULONG Count,
- /*IN*/ ULONG Flags);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-RtlWriteRegistryValue(
- /*IN*/ ULONG RelativeTo,
- /*IN*/ PCWSTR Path,
- /*IN*/ PCWSTR ValueName,
- /*IN*/ ULONG ValueType,
- /*IN*/ PVOID ValueData,
- /*IN*/ ULONG ValueLength);
-
-NTOSAPI
-ULONG
-DDKAPI
-RtlxUnicodeStringToAnsiSize(
- /*IN*/ PUNICODE_STRING UnicodeString);
-
-/*
- * VOID
- * RtlZeroMemory(
- * IN VOID UNALIGNED *Destination,
- * IN SIZE_T Length)
- */
-#ifndef RtlZeroMemory
-#define RtlZeroMemory(Destination, Length) \
- memset(Destination, 0, Length)
-#endif
-
-#ifndef RtlZeroBytes
-#define RtlZeroBytes RtlZeroMemory
-#endif
-
-
-/** Executive support routines **/
-
-NTOSAPI
-VOID
-DDKFASTAPI
-ExAcquireFastMutex(
- /*IN*/ PFAST_MUTEX FastMutex);
-
-NTOSAPI
-VOID
-DDKFASTAPI
-ExAcquireFastMutexUnsafe(
- /*IN*/ PFAST_MUTEX FastMutex);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-ExAcquireResourceExclusiveLite(
- /*IN*/ PERESOURCE Resource,
- /*IN*/ BOOLEAN Wait);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-ExAcquireResourceSharedLite(
- /*IN*/ PERESOURCE Resource,
- /*IN*/ BOOLEAN Wait);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-ExAcquireSharedStarveExclusive(
- /*IN*/ PERESOURCE Resource,
- /*IN*/ BOOLEAN Wait);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-ExAcquireSharedWaitForExclusive(
- /*IN*/ PERESOURCE Resource,
- /*IN*/ BOOLEAN Wait);
-
-
-NTOSAPI
-PSINGLE_LIST_ENTRY
-DDKFASTAPI
-ExInterlockedPopEntrySList(
- /*IN*/ PSLIST_HEADER ListHead,
- /*IN*/ PKSPIN_LOCK Lock);
-
-
-NTOSAPI
-PSINGLE_LIST_ENTRY
-DDKFASTAPI
-ExInterlockedPushEntrySList(
- /*IN*/ PSLIST_HEADER ListHead,
- /*IN*/ PSINGLE_LIST_ENTRY ListEntry,
- /*IN*/ PKSPIN_LOCK Lock);
-
-
-#if (__USE_NTOSKRNL__) && (_WIN32_WINNT >= 0x0501)
-#define ExInterlockedPopEntrySList(_ListHead, \
- _Lock) \
- InterlockedPopEntrySList(_ListHead)
-
-#define ExInterlockedPushEntrySList(_ListHead, \
- _ListEntry, \
- _Lock) \
- InterlockedPushEntrySList(_ListHead, _ListEntry)
-#endif /* __USE_NTOSKRNL__ */
-
-#define ExQueryDepthSList(ListHead) QueryDepthSList(ListHead)
-
-static __inline PVOID
-ExAllocateFromNPagedLookasideList(
- /*IN*/ PNPAGED_LOOKASIDE_LIST Lookaside)
-{
- PVOID Entry;
-
- Lookaside->TotalAllocates++;
- Entry = ExInterlockedPopEntrySList(&Lookaside->ListHead,
- &Lookaside->Obsoleted);
- if (Entry == NULL) {
- Lookaside->_DDK_DUMMYUNION_MEMBER(AllocateMisses)++;
- Entry = (Lookaside->Allocate)(Lookaside->Type,
- Lookaside->Size,
- Lookaside->Tag);
- }
- return Entry;
-}
-
-static __inline VOID
-ExFreeToNPagedLookasideList(
- /*IN*/ PNPAGED_LOOKASIDE_LIST Lookaside,
- /*IN*/ PVOID Entry)
-{
- Lookaside->TotalFrees++;
- if (ExQueryDepthSList(&Lookaside->ListHead) >= Lookaside->Depth) {
- Lookaside->_DDK_DUMMYUNION_N_MEMBER(2,FreeMisses)++;
- (Lookaside->Free)(Entry);
- } else {
- ExInterlockedPushEntrySList(&Lookaside->ListHead,
- (PSLIST_ENTRY)Entry,
- &Lookaside->Obsoleted);
- }
-}
-
-#if (__USE_NTOSKRNL__) && (_WIN32_WINNT >= 0x0501)
-
-static __inline PVOID
-ExAllocateFromPagedLookasideList(
- /*IN*/ PPAGED_LOOKASIDE_LIST Lookaside)
-{
- PVOID Entry;
-
- Lookaside->TotalAllocates++;
- Entry = InterlockedPopEntrySList(&Lookaside->ListHead);
- if (Entry == NULL) {
- Lookaside->_DDK_DUMMYUNION_MEMBER(AllocateMisses)++;
- Entry = (Lookaside->Allocate)(Lookaside->Type,
- Lookaside->Size,
- Lookaside->Tag);
- }
- return Entry;
-}
-
-static __inline VOID
-ExFreeToPagedLookasideList(
- /*IN*/ PPAGED_LOOKASIDE_LIST Lookaside,
- /*IN*/ PVOID Entry)
-{
- Lookaside->TotalFrees++;
- if (ExQueryDepthSList(&Lookaside->ListHead) >= Lookaside->Depth) {
- Lookaside->_DDK_DUMMYUNION_N_MEMBER(2,FreeMisses)++;
- (Lookaside->Free)(Entry);
- } else {
- InterlockedPushEntrySList(&Lookaside->ListHead,
- (PSLIST_ENTRY)Entry);
- }
-}
-
-#else /* (__USE_NTOSKRNL__) && (_WIN32_WINNT >= 0x0501) */
-
-NTOSAPI
-PVOID
-DDKAPI
-ExAllocateFromPagedLookasideList(
- /*IN*/ PPAGED_LOOKASIDE_LIST Lookaside);
-
-NTOSAPI
-VOID
-DDKAPI
-ExFreeToPagedLookasideList(
- /*IN*/ PPAGED_LOOKASIDE_LIST Lookaside,
- /*IN*/ PVOID Entry);
-
-#endif /* (__USE_NTOSKRNL__) && (_WIN32_WINNT >= 0x0501) */
-
-NTOSAPI
-PVOID
-DDKAPI
-ExAllocatePoolWithQuotaTag(
- /*IN*/ POOL_TYPE PoolType,
- /*IN*/ SIZE_T NumberOfBytes,
- /*IN*/ ULONG Tag);
-
-NTOSAPI
-PVOID
-DDKAPI
-ExAllocatePoolWithTag(
- /*IN*/ POOL_TYPE PoolType,
- /*IN*/ SIZE_T NumberOfBytes,
- /*IN*/ ULONG Tag);
-
-#ifdef POOL_TAGGING
-
-#define ExAllocatePoolWithQuota(p,n) ExAllocatePoolWithQuotaTag(p,n,' kdD')
-#define ExAllocatePool(p,n) ExAllocatePoolWithTag(p,n,' kdD')
-
-#else /* !POOL_TAGGING */
-
-NTOSAPI
-PVOID
-DDKAPI
-ExAllocatePool(
- /*IN*/ POOL_TYPE PoolType,
- /*IN*/ SIZE_T NumberOfBytes);
-
-NTOSAPI
-PVOID
-DDKAPI
-ExAllocatePoolWithQuota(
- /*IN*/ POOL_TYPE PoolType,
- /*IN*/ SIZE_T NumberOfBytes);
-
-#endif /* POOL_TAGGING */
-
-NTOSAPI
-PVOID
-DDKAPI
-ExAllocatePoolWithTagPriority(
- /*IN*/ POOL_TYPE PoolType,
- /*IN*/ SIZE_T NumberOfBytes,
- /*IN*/ ULONG Tag,
- /*IN*/ EX_POOL_PRIORITY Priority);
-
-NTOSAPI
-VOID
-DDKAPI
-ExConvertExclusiveToSharedLite(
- /*IN*/ PERESOURCE Resource);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ExCreateCallback(
- /*OUT*/ PCALLBACK_OBJECT *CallbackObject,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*IN*/ BOOLEAN Create,
- /*IN*/ BOOLEAN AllowMultipleCallbacks);
-
-NTOSAPI
-VOID
-DDKAPI
-ExDeleteNPagedLookasideList(
- /*IN*/ PNPAGED_LOOKASIDE_LIST Lookaside);
-
-NTOSAPI
-VOID
-DDKAPI
-ExDeletePagedLookasideList(
- /*IN*/ PPAGED_LOOKASIDE_LIST Lookaside);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ExDeleteResourceLite(
- /*IN*/ PERESOURCE Resource);
-
-NTOSAPI
-VOID
-DDKAPI
-ExFreePool(
- /*IN*/ PVOID P);
-
-#define PROTECTED_POOL 0x80000000
-
-#ifdef POOL_TAGGING
-#define ExFreePool(P) ExFreePoolWithTag(P, 0)
-#endif
-
-NTOSAPI
-VOID
-DDKAPI
-ExFreePoolWithTag(
- /*IN*/ PVOID P,
- /*IN*/ ULONG Tag);
-
-/*
- * ERESOURCE_THREAD
- * ExGetCurrentResourceThread(
- * VOID);
- */
-#define ExGetCurrentResourceThread() ((ERESOURCE_THREAD) PsGetCurrentThread())
-
-NTOSAPI
-ULONG
-DDKAPI
-ExGetExclusiveWaiterCount(
- /*IN*/ PERESOURCE Resource);
-
-NTOSAPI
-KPROCESSOR_MODE
-DDKAPI
-ExGetPreviousMode(
- VOID);
-
-NTOSAPI
-ULONG
-DDKAPI
-ExGetSharedWaiterCount(
- /*IN*/ PERESOURCE Resource);
-
-NTOSAPI
-VOID
-DDKAPI
-KeInitializeEvent(
- /*IN*/ PRKEVENT Event,
- /*IN*/ EVENT_TYPE Type,
- /*IN*/ BOOLEAN State);
-
-/*
- * VOID DDKAPI
- * ExInitializeFastMutex(
- * IN PFAST_MUTEX FastMutex)
- */
-#define ExInitializeFastMutex(_FastMutex) \
-{ \
- (_FastMutex)->Count = 1; \
- (_FastMutex)->Owner = NULL; \
- (_FastMutex)->Contention = 0; \
- KeInitializeEvent(&(_FastMutex)->Event, SynchronizationEvent, FALSE); \
-}
-
-NTOSAPI
-VOID
-DDKAPI
-ExInitializeNPagedLookasideList(
- /*IN*/ PNPAGED_LOOKASIDE_LIST Lookaside,
- /*IN*/ PALLOCATE_FUNCTION Allocate /*OPTIONAL*/,
- /*IN*/ PFREE_FUNCTION Free /*OPTIONAL*/,
- /*IN*/ ULONG Flags,
- /*IN*/ SIZE_T Size,
- /*IN*/ ULONG Tag,
- /*IN*/ USHORT Depth);
-
-NTOSAPI
-VOID
-DDKAPI
-ExInitializePagedLookasideList(
- /*IN*/ PPAGED_LOOKASIDE_LIST Lookaside,
- /*IN*/ PALLOCATE_FUNCTION Allocate /*OPTIONAL*/,
- /*IN*/ PFREE_FUNCTION Free /*OPTIONAL*/,
- /*IN*/ ULONG Flags,
- /*IN*/ SIZE_T Size,
- /*IN*/ ULONG Tag,
- /*IN*/ USHORT Depth);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ExInitializeResourceLite(
- /*IN*/ PERESOURCE Resource);
-
-/*
- * VOID
- * InitializeSListHead(
- * IN PSLIST_HEADER SListHead)
- */
-#define InitializeSListHead(_SListHead) \
- (_SListHead)->Alignment = 0
-
-#define ExInitializeSListHead InitializeSListHead
-
-NTOSAPI
-LARGE_INTEGER
-DDKAPI
-ExInterlockedAddLargeInteger(
- /*IN*/ PLARGE_INTEGER Addend,
- /*IN*/ LARGE_INTEGER Increment,
- /*IN*/ PKSPIN_LOCK Lock);
-
-NTOSAPI
-VOID
-DDKFASTAPI
-ExInterlockedAddLargeStatistic(
- /*IN*/ PLARGE_INTEGER Addend,
- /*IN*/ ULONG Increment);
-
-NTOSAPI
-ULONG
-DDKAPI
-ExInterlockedAddUlong(
- /*IN*/ PULONG Addend,
- /*IN*/ ULONG Increment,
- PKSPIN_LOCK Lock);
-
-NTOSAPI
-ULONG
-DDKFASTAPI
-ExfInterlockedAddUlong(
- /*IN*/ PULONG Addend,
- /*IN*/ ULONG Increment,
- PKSPIN_LOCK Lock);
-
-
-NTOSAPI
-LONGLONG
-DDKFASTAPI
-ExInterlockedCompareExchange64(
- /*IN OUT*/ PLONGLONG Destination,
- /*IN*/ PLONGLONG Exchange,
- /*IN*/ PLONGLONG Comparand,
- /*IN*/ PKSPIN_LOCK Lock);
-
-NTOSAPI
-PSINGLE_LIST_ENTRY
-DDKFASTAPI
-ExInterlockedFlushSList(
- /*IN*/ PSLIST_HEADER ListHead);
-
-NTOSAPI
-PLIST_ENTRY
-DDKAPI
-ExInterlockedInsertHeadList(
- /*IN*/ PLIST_ENTRY ListHead,
- /*IN*/ PLIST_ENTRY ListEntry,
- /*IN*/ PKSPIN_LOCK Lock);
-
-NTOSAPI
-PLIST_ENTRY
-DDKFASTAPI
-ExfInterlockedInsertHeadList(
- /*IN*/ PLIST_ENTRY ListHead,
- /*IN*/ PLIST_ENTRY ListEntry,
- /*IN*/ PKSPIN_LOCK Lock);
-
-NTOSAPI
-PLIST_ENTRY
-DDKAPI
-ExInterlockedInsertTailList(
- /*IN*/ PLIST_ENTRY ListHead,
- /*IN*/ PLIST_ENTRY ListEntry,
- /*IN*/ PKSPIN_LOCK Lock);
-
-NTOSAPI
-PLIST_ENTRY
-DDKFASTAPI
-ExfInterlockedInsertTailList(
- /*IN*/ PLIST_ENTRY ListHead,
- /*IN*/ PLIST_ENTRY ListEntry,
- /*IN*/ PKSPIN_LOCK Lock);
-
-NTOSAPI
-PSINGLE_LIST_ENTRY
-DDKAPI
-ExInterlockedPopEntryList(
- /*IN*/ PSINGLE_LIST_ENTRY ListHead,
- /*IN*/ PKSPIN_LOCK Lock);
-
-NTOSAPI
-PSINGLE_LIST_ENTRY
-DDKFASTAPI
-ExfInterlockedPopEntryList(
- /*IN*/ PSINGLE_LIST_ENTRY ListHead,
- /*IN*/ PKSPIN_LOCK Lock);
-
-
-NTOSAPI
-PSINGLE_LIST_ENTRY
-DDKAPI
-ExInterlockedPushEntryList(
- /*IN*/ PSINGLE_LIST_ENTRY ListHead,
- /*IN*/ PSINGLE_LIST_ENTRY ListEntry,
- /*IN*/ PKSPIN_LOCK Lock);
-
-NTOSAPI
-PSINGLE_LIST_ENTRY
-DDKFASTAPI
-ExfInterlockedPushEntryList(
- /*IN*/ PSINGLE_LIST_ENTRY ListHead,
- /*IN*/ PSINGLE_LIST_ENTRY ListEntry,
- /*IN*/ PKSPIN_LOCK Lock);
-
-
-NTOSAPI
-PLIST_ENTRY
-DDKAPI
-ExInterlockedRemoveHeadList(
- /*IN*/ PLIST_ENTRY ListHead,
- /*IN*/ PKSPIN_LOCK Lock);
-
-NTOSAPI
-PLIST_ENTRY
-DDKFASTAPI
-ExfInterlockedRemoveHeadList(
- /*IN*/ PLIST_ENTRY ListHead,
- /*IN*/ PKSPIN_LOCK Lock);
-
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-ExIsProcessorFeaturePresent(
- /*IN*/ ULONG ProcessorFeature);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-ExIsResourceAcquiredExclusiveLite(
- /*IN*/ PERESOURCE Resource);
-
-NTOSAPI
-USHORT
-DDKAPI
-ExIsResourceAcquiredLite(
- /*IN*/ PERESOURCE Resource);
-
-NTOSAPI
-USHORT
-DDKAPI
-ExIsResourceAcquiredSharedLite(
- /*IN*/ PERESOURCE Resource);
-
-NTOSAPI
-VOID
-DDKAPI
-ExLocalTimeToSystemTime(
- /*IN*/ PLARGE_INTEGER LocalTime,
- /*OUT*/ PLARGE_INTEGER SystemTime);
-
-NTOSAPI
-VOID
-DDKAPI
-ExNotifyCallback(
- /*IN*/ PCALLBACK_OBJECT CallbackObject,
- /*IN*/ PVOID Argument1,
- /*IN*/ PVOID Argument2);
-
-NTOSAPI
-VOID
-DDKAPI
-ExRaiseAccessViolation(
- VOID);
-
-NTOSAPI
-VOID
-DDKAPI
-ExRaiseDatatypeMisalignment(
- VOID);
-
-NTOSAPI
-VOID
-DDKAPI
-ExRaiseStatus(
- /*IN*/ NTSTATUS Status);
-
-NTOSAPI
-PVOID
-DDKAPI
-ExRegisterCallback(
- /*IN*/ PCALLBACK_OBJECT CallbackObject,
- /*IN*/ PCALLBACK_FUNCTION CallbackFunction,
- /*IN*/ PVOID CallbackContext);
-
-NTOSAPI
-VOID
-DDKAPI
-ExReinitializeResourceLite(
- /*IN*/ PERESOURCE Resource);
-
-NTOSAPI
-VOID
-DDKFASTAPI
-ExReleaseFastMutex(
- /*IN*/ PFAST_MUTEX FastMutex);
-
-NTOSAPI
-VOID
-DDKFASTAPI
-ExReleaseFastMutexUnsafe(
- /*IN*/ PFAST_MUTEX FastMutex);
-
-NTOSAPI
-VOID
-DDKAPI
-ExReleaseResourceForThreadLite(
- /*IN*/ PERESOURCE Resource,
- /*IN*/ ERESOURCE_THREAD ResourceThreadId);
-
-NTOSAPI
-VOID
-DDKFASTAPI
-ExReleaseResourceLite(
- /*IN*/ PERESOURCE Resource);
-
-NTOSAPI
-VOID
-DDKAPI
-ExSetResourceOwnerPointer(
- /*IN*/ PERESOURCE Resource,
- /*IN*/ PVOID OwnerPointer);
-
-NTOSAPI
-ULONG
-DDKAPI
-ExSetTimerResolution(
- /*IN*/ ULONG DesiredTime,
- /*IN*/ BOOLEAN SetResolution);
-
-NTOSAPI
-VOID
-DDKAPI
-ExSystemTimeToLocalTime(
- /*IN*/ PLARGE_INTEGER SystemTime,
- /*OUT*/ PLARGE_INTEGER LocalTime);
-
-NTOSAPI
-BOOLEAN
-DDKFASTAPI
-ExTryToAcquireFastMutex(
- /*IN*/ PFAST_MUTEX FastMutex);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-ExTryToAcquireResourceExclusiveLite(
- /*IN*/ PERESOURCE Resource);
-
-NTOSAPI
-VOID
-DDKAPI
-ExUnregisterCallback(
- /*IN*/ PVOID CbRegistration);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ExUuidCreate(
- /*OUT*/ UUID *Uuid);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-ExVerifySuite(
- /*IN*/ SUITE_TYPE SuiteType);
-
-#ifdef DBG
-
-#define PAGED_CODE() { \
- if (KeGetCurrentIrql() > APC_LEVEL) { \
- KdPrint( ("NTDDK: Pageable code called at IRQL > APC_LEVEL (%d)\n", KeGetCurrentIrql() )); \
- ASSERT(FALSE); \
- } \
-}
-
-#else
-
-#define PAGED_CODE()
-
-#endif
-
-NTOSAPI
-VOID
-DDKAPI
-ProbeForRead(
- /*IN*/ CONST VOID *Address,
- /*IN*/ ULONG Length,
- /*IN*/ ULONG Alignment);
-
-NTOSAPI
-VOID
-DDKAPI
-ProbeForWrite(
- /*IN*/ CONST VOID *Address,
- /*IN*/ ULONG Length,
- /*IN*/ ULONG Alignment);
-
-
-
-/** Configuration manager routines **/
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-CmRegisterCallback(
- /*IN*/ PEX_CALLBACK_FUNCTION Function,
- /*IN*/ PVOID Context,
- /*IN OUT*/ PLARGE_INTEGER Cookie);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-CmUnRegisterCallback(
- /*IN*/ LARGE_INTEGER Cookie);
-
-
-
-/** Filesystem runtime library routines **/
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-FsRtlIsTotalDeviceFailure(
- /*IN*/ NTSTATUS Status);
-
-
-
-/** Hardware abstraction layer routines **/
-
-NTOSAPI
-VOID
-DDKFASTAPI
-HalExamineMBR(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ ULONG SectorSize,
- /*IN*/ ULONG MBRTypeIdentifier,
- /*OUT*/ PVOID Buffer);
-
-NTOSAPI
-VOID
-DDKAPI
-READ_PORT_BUFFER_UCHAR(
- /*IN*/ PUCHAR Port,
- /*IN*/ PUCHAR Buffer,
- /*IN*/ ULONG Count);
-
-NTOSAPI
-VOID
-DDKAPI
-READ_PORT_BUFFER_ULONG(
- /*IN*/ PULONG Port,
- /*IN*/ PULONG Buffer,
- /*IN*/ ULONG Count);
-
-NTOSAPI
-VOID
-DDKAPI
-READ_PORT_BUFFER_USHORT(
- /*IN*/ PUSHORT Port,
- /*IN*/ PUSHORT Buffer,
- /*IN*/ ULONG Count);
-
-NTOSAPI
-UCHAR
-DDKAPI
-READ_PORT_UCHAR(
- /*IN*/ PUCHAR Port);
-
-NTOSAPI
-ULONG
-DDKAPI
-READ_PORT_ULONG(
- /*IN*/ PULONG Port);
-
-NTOSAPI
-USHORT
-DDKAPI
-READ_PORT_USHORT(
- /*IN*/ PUSHORT Port);
-
-NTOSAPI
-VOID
-DDKAPI
-READ_REGISTER_BUFFER_UCHAR(
- /*IN*/ PUCHAR Register,
- /*IN*/ PUCHAR Buffer,
- /*IN*/ ULONG Count);
-
-NTOSAPI
-VOID
-DDKAPI
-READ_REGISTER_BUFFER_ULONG(
- /*IN*/ PULONG Register,
- /*IN*/ PULONG Buffer,
- /*IN*/ ULONG Count);
-
-NTOSAPI
-VOID
-DDKAPI
-READ_REGISTER_BUFFER_USHORT(
- /*IN*/ PUSHORT Register,
- /*IN*/ PUSHORT Buffer,
- /*IN*/ ULONG Count);
-
-NTOSAPI
-UCHAR
-DDKAPI
-READ_REGISTER_UCHAR(
- /*IN*/ PUCHAR Register);
-
-NTOSAPI
-ULONG
-DDKAPI
-READ_REGISTER_ULONG(
- /*IN*/ PULONG Register);
-
-NTOSAPI
-USHORT
-DDKAPI
-READ_REGISTER_USHORT(
- /*IN*/ PUSHORT Register);
-
-NTOSAPI
-VOID
-DDKAPI
-WRITE_PORT_BUFFER_UCHAR(
- /*IN*/ PUCHAR Port,
- /*IN*/ PUCHAR Buffer,
- /*IN*/ ULONG Count);
-
-NTOSAPI
-VOID
-DDKAPI
-WRITE_PORT_BUFFER_ULONG(
- /*IN*/ PULONG Port,
- /*IN*/ PULONG Buffer,
- /*IN*/ ULONG Count);
-
-NTOSAPI
-VOID
-DDKAPI
-WRITE_PORT_BUFFER_USHORT(
- /*IN*/ PUSHORT Port,
- /*IN*/ PUSHORT Buffer,
- /*IN*/ ULONG Count);
-
-NTOSAPI
-VOID
-DDKAPI
-WRITE_PORT_UCHAR(
- /*IN*/ PUCHAR Port,
- /*IN*/ UCHAR Value);
-
-NTOSAPI
-VOID
-DDKAPI
-WRITE_PORT_ULONG(
- /*IN*/ PULONG Port,
- /*IN*/ ULONG Value);
-
-NTOSAPI
-VOID
-DDKAPI
-WRITE_PORT_USHORT(
- /*IN*/ PUSHORT Port,
- /*IN*/ USHORT Value);
-
-NTOSAPI
-VOID
-DDKAPI
-WRITE_REGISTER_BUFFER_UCHAR(
- /*IN*/ PUCHAR Register,
- /*IN*/ PUCHAR Buffer,
- /*IN*/ ULONG Count);
-
-NTOSAPI
-VOID
-DDKAPI
-WRITE_REGISTER_BUFFER_ULONG(
- /*IN*/ PULONG Register,
- /*IN*/ PULONG Buffer,
- /*IN*/ ULONG Count);
-
-NTOSAPI
-VOID
-DDKAPI
-WRITE_REGISTER_BUFFER_USHORT(
- /*IN*/ PUSHORT Register,
- /*IN*/ PUSHORT Buffer,
- /*IN*/ ULONG Count);
-
-NTOSAPI
-VOID
-DDKAPI
-WRITE_REGISTER_UCHAR(
- /*IN*/ PUCHAR Register,
- /*IN*/ UCHAR Value);
-
-NTOSAPI
-VOID
-DDKAPI
-WRITE_REGISTER_ULONG(
- /*IN*/ PULONG Register,
- /*IN*/ ULONG Value);
-
-NTOSAPI
-VOID
-DDKAPI
-WRITE_REGISTER_USHORT(
- /*IN*/ PUSHORT Register,
- /*IN*/ USHORT Value);
-
-/** I/O manager routines **/
-
-NTOSAPI
-VOID
-DDKAPI
-IoAcquireCancelSpinLock(
- /*OUT*/ PKIRQL Irql);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoAcquireRemoveLockEx(
- /*IN*/ PIO_REMOVE_LOCK RemoveLock,
- /*IN*/ PVOID Tag /*OPTIONAL*/,
- /*IN*/ PCSTR File,
- /*IN*/ ULONG Line,
- /*IN*/ ULONG RemlockSize);
-
-/*
- * NTSTATUS
- * IoAcquireRemoveLock(
- * IN PIO_REMOVE_LOCK RemoveLock,
- * IN PVOID Tag OPTIONAL)
- */
-#define IoAcquireRemoveLock(_RemoveLock, \
- _Tag) \
- IoAcquireRemoveLockEx(_RemoveLock, _Tag, __FILE__, __LINE__, sizeof(IO_REMOVE_LOCK))
-
-/*
- * VOID
- * IoAdjustPagingPathCount(
- * IN PLONG Count,
- * IN BOOLEAN Increment)
- */
-#define IoAdjustPagingPathCount(_Count, \
- _Increment) \
-{ \
- if (_Increment) \
- { \
- InterlockedIncrement(_Count); \
- } \
- else \
- { \
- InterlockedDecrement(_Count); \
- } \
-}
-
-NTOSAPI
-VOID
-DDKAPI
-IoAllocateController(
- /*IN*/ PCONTROLLER_OBJECT ControllerObject,
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ PDRIVER_CONTROL ExecutionRoutine,
- /*IN*/ PVOID Context);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoAllocateDriverObjectExtension(
- /*IN*/ PDRIVER_OBJECT DriverObject,
- /*IN*/ PVOID ClientIdentificationAddress,
- /*IN*/ ULONG DriverObjectExtensionSize,
- /*OUT*/ PVOID *DriverObjectExtension);
-
-typedef struct _IO_ERROR_LOG_PACKET {
- UCHAR MajorFunctionCode;
- UCHAR RetryCount;
- USHORT DumpDataSize;
- USHORT NumberOfStrings;
- USHORT StringOffset;
- USHORT EventCategory;
- NTSTATUS ErrorCode;
- ULONG UniqueErrorValue;
- NTSTATUS FinalStatus;
- ULONG SequenceNumber;
- ULONG IoControlCode;
- LARGE_INTEGER DeviceOffset;
- ULONG DumpData[1];
-} IO_ERROR_LOG_PACKET, *PIO_ERROR_LOG_PACKET;
-
-NTOSAPI
-PVOID
-DDKAPI
-IoAllocateErrorLogEntry(
- /*IN*/ PVOID IoObject,
- /*IN*/ UCHAR EntrySize);
-
-NTOSAPI
-PIRP
-DDKAPI
-IoAllocateIrp(
- /*IN*/ CCHAR StackSize,
- /*IN*/ BOOLEAN ChargeQuota);
-
-NTOSAPI
-PMDL
-DDKAPI
-IoAllocateMdl(
- /*IN*/ PVOID VirtualAddress,
- /*IN*/ ULONG Length,
- /*IN*/ BOOLEAN SecondaryBuffer,
- /*IN*/ BOOLEAN ChargeQuota,
- /*IN OUT*/ PIRP Irp /*OPTIONAL*/);
-
-NTOSAPI
-PIO_WORKITEM
-DDKAPI
-IoAllocateWorkItem(
- /*IN*/ PDEVICE_OBJECT DeviceObject);
-
-/*
- * VOID IoAssignArcName(
- * IN PUNICODE_STRING ArcName,
- * IN PUNICODE_STRING DeviceName);
- */
-#define IoAssignArcName(_ArcName, _DeviceName) ( \
- IoCreateSymbolicLink((_ArcName), (_DeviceName)))
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoAttachDevice(
- /*IN*/ PDEVICE_OBJECT SourceDevice,
- /*IN*/ PUNICODE_STRING TargetDevice,
- /*OUT*/ PDEVICE_OBJECT *AttachedDevice);
-
-NTOSAPI
-PDEVICE_OBJECT
-DDKAPI
-IoAttachDeviceToDeviceStack(
- /*IN*/ PDEVICE_OBJECT SourceDevice,
- /*IN*/ PDEVICE_OBJECT TargetDevice);
-
-NTOSAPI
-PIRP
-DDKAPI
-IoBuildAsynchronousFsdRequest(
- /*IN*/ ULONG MajorFunction,
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN OUT*/ PVOID Buffer /*OPTIONAL*/,
- /*IN*/ ULONG Length /*OPTIONAL*/,
- /*IN*/ PLARGE_INTEGER StartingOffset /*OPTIONAL*/,
- /*IN*/ PIO_STATUS_BLOCK IoStatusBlock /*OPTIONAL*/);
-
-NTOSAPI
-PIRP
-DDKAPI
-IoBuildDeviceIoControlRequest(
- /*IN*/ ULONG IoControlCode,
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ PVOID InputBuffer /*OPTIONAL*/,
- /*IN*/ ULONG InputBufferLength,
- /*OUT*/ PVOID OutputBuffer /*OPTIONAL*/,
- /*IN*/ ULONG OutputBufferLength,
- /*IN*/ BOOLEAN InternalDeviceIoControl,
- /*IN*/ PKEVENT Event,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock);
-
-NTOSAPI
-VOID
-DDKAPI
-IoBuildPartialMdl(
- /*IN*/ PMDL SourceMdl,
- /*IN OUT*/ PMDL TargetMdl,
- /*IN*/ PVOID VirtualAddress,
- /*IN*/ ULONG Length);
-
-NTOSAPI
-PIRP
-DDKAPI
-IoBuildSynchronousFsdRequest(
- /*IN*/ ULONG MajorFunction,
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN OUT*/ PVOID Buffer /*OPTIONAL*/,
- /*IN*/ ULONG Length /*OPTIONAL*/,
- /*IN*/ PLARGE_INTEGER StartingOffset /*OPTIONAL*/,
- /*IN*/ PKEVENT Event,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock);
-
-NTOSAPI
-NTSTATUS
-DDKFASTAPI
-IofCallDriver(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN OUT*/ PIRP Irp);
-
-/*
- * NTSTATUS
- * IoCallDriver(
- * IN PDEVICE_OBJECT DeviceObject,
- * IN OUT PIRP Irp)
- */
-#define IoCallDriver IofCallDriver
-
-NTOSAPI
-VOID
-DDKAPI
-IoCancelFileOpen(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ PFILE_OBJECT FileObject);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-IoCancelIrp(
- /*IN*/ PIRP Irp);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoCheckShareAccess(
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ ULONG DesiredShareAccess,
- /*IN OUT*/ PFILE_OBJECT FileObject,
- /*IN OUT*/ PSHARE_ACCESS ShareAccess,
- /*IN*/ BOOLEAN Update);
-
-NTOSAPI
-VOID
-DDKFASTAPI
-IofCompleteRequest(
- /*IN*/ PIRP Irp,
- /*IN*/ CCHAR PriorityBoost);
-
-/*
- * VOID
- * IoCompleteRequest(
- * IN PIRP Irp,
- * IN CCHAR PriorityBoost)
- */
-#define IoCompleteRequest IofCompleteRequest
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoConnectInterrupt(
- /*OUT*/ PKINTERRUPT *InterruptObject,
- /*IN*/ PKSERVICE_ROUTINE ServiceRoutine,
- /*IN*/ PVOID ServiceContext,
- /*IN*/ PKSPIN_LOCK SpinLock /*OPTIONAL*/,
- /*IN*/ ULONG Vector,
- /*IN*/ KIRQL Irql,
- /*IN*/ KIRQL SynchronizeIrql,
- /*IN*/ KINTERRUPT_MODE InterruptMode,
- /*IN*/ BOOLEAN ShareVector,
- /*IN*/ KAFFINITY ProcessorEnableMask,
- /*IN*/ BOOLEAN FloatingSave);
-
-/*
- * PIO_STACK_LOCATION
- * IoGetCurrentIrpStackLocation(
- * IN PIRP Irp)
- */
-#define IoGetCurrentIrpStackLocation(_Irp) \
- ((_Irp)->Tail.Overlay.CurrentStackLocation)
-
-/*
- * PIO_STACK_LOCATION
- * IoGetNextIrpStackLocation(
- * IN PIRP Irp)
- */
-#define IoGetNextIrpStackLocation(_Irp) \
- ((_Irp)->Tail.Overlay.CurrentStackLocation - 1)
-
-/*
- * VOID
- * IoCopyCurrentIrpStackLocationToNext(
- * IN PIRP Irp)
- */
-#define IoCopyCurrentIrpStackLocationToNext(_Irp) \
-{ \
- PIO_STACK_LOCATION _IrpSp; \
- PIO_STACK_LOCATION _NextIrpSp; \
- _IrpSp = IoGetCurrentIrpStackLocation(_Irp); \
- _NextIrpSp = IoGetNextIrpStackLocation(_Irp); \
- RtlCopyMemory(_NextIrpSp, _IrpSp, \
- FIELD_OFFSET(IO_STACK_LOCATION, CompletionRoutine)); \
- _NextIrpSp->Control = 0; \
-}
-
-NTOSAPI
-PCONTROLLER_OBJECT
-DDKAPI
-IoCreateController(
- /*IN*/ ULONG Size);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoCreateDevice(
- /*IN*/ PDRIVER_OBJECT DriverObject,
- /*IN*/ ULONG DeviceExtensionSize,
- /*IN*/ PUNICODE_STRING DeviceName /*OPTIONAL*/,
- /*IN*/ DEVICE_TYPE DeviceType,
- /*IN*/ ULONG DeviceCharacteristics,
- /*IN*/ BOOLEAN Exclusive,
- /*OUT*/ PDEVICE_OBJECT *DeviceObject);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoCreateDisk(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ PCREATE_DISK Disk);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoCreateFile(
- /*OUT*/ PHANDLE FileHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*IN*/ PLARGE_INTEGER AllocationSize /*OPTIONAL*/,
- /*IN*/ ULONG FileAttributes,
- /*IN*/ ULONG ShareAccess,
- /*IN*/ ULONG Disposition,
- /*IN*/ ULONG CreateOptions,
- /*IN*/ PVOID EaBuffer /*OPTIONAL*/,
- /*IN*/ ULONG EaLength,
- /*IN*/ CREATE_FILE_TYPE CreateFileType,
- /*IN*/ PVOID ExtraCreateParameters /*OPTIONAL*/,
- /*IN*/ ULONG Options);
-
-NTOSAPI
-PKEVENT
-DDKAPI
-IoCreateNotificationEvent(
- /*IN*/ PUNICODE_STRING EventName,
- /*OUT*/ PHANDLE EventHandle);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoCreateSymbolicLink(
- /*IN*/ PUNICODE_STRING SymbolicLinkName,
- /*IN*/ PUNICODE_STRING DeviceName);
-
-NTOSAPI
-PKEVENT
-DDKAPI
-IoCreateSynchronizationEvent(
- /*IN*/ PUNICODE_STRING EventName,
- /*OUT*/ PHANDLE EventHandle);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoCreateUnprotectedSymbolicLink(
- /*IN*/ PUNICODE_STRING SymbolicLinkName,
- /*IN*/ PUNICODE_STRING DeviceName);
-
-NTOSAPI
-VOID
-DDKAPI
-IoCsqInitialize(
- PIO_CSQ Csq,
- /*IN*/ PIO_CSQ_INSERT_IRP CsqInsertIrp,
- /*IN*/ PIO_CSQ_REMOVE_IRP CsqRemoveIrp,
- /*IN*/ PIO_CSQ_PEEK_NEXT_IRP CsqPeekNextIrp,
- /*IN*/ PIO_CSQ_ACQUIRE_LOCK CsqAcquireLock,
- /*IN*/ PIO_CSQ_RELEASE_LOCK CsqReleaseLock,
- /*IN*/ PIO_CSQ_COMPLETE_CANCELED_IRP CsqCompleteCanceledIrp);
-
-NTOSAPI
-VOID
-DDKAPI
-IoCsqInsertIrp(
- /*IN*/ PIO_CSQ Csq,
- /*IN*/ PIRP Irp,
- /*IN*/ PIO_CSQ_IRP_CONTEXT Context);
-
-NTOSAPI
-PIRP
-DDKAPI
-IoCsqRemoveIrp(
- /*IN*/ PIO_CSQ Csq,
- /*IN*/ PIO_CSQ_IRP_CONTEXT Context);
-
-NTOSAPI
-PIRP
-DDKAPI
-IoCsqRemoveNextIrp(
- /*IN*/ PIO_CSQ Csq,
- /*IN*/ PVOID PeekContext);
-
-NTOSAPI
-VOID
-DDKAPI
-IoDeleteController(
- /*IN*/ PCONTROLLER_OBJECT ControllerObject);
-
-NTOSAPI
-VOID
-DDKAPI
-IoDeleteDevice(
- /*IN*/ PDEVICE_OBJECT DeviceObject);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoDeleteSymbolicLink(
- /*IN*/ PUNICODE_STRING SymbolicLinkName);
-
-/*
- * VOID
- * IoDeassignArcName(
- * IN PUNICODE_STRING ArcName)
- */
-#define IoDeassignArcName IoDeleteSymbolicLink
-
-NTOSAPI
-VOID
-DDKAPI
-IoDetachDevice(
- /*IN OUT*/ PDEVICE_OBJECT TargetDevice);
-
-NTOSAPI
-VOID
-DDKAPI
-IoDisconnectInterrupt(
- /*IN*/ PKINTERRUPT InterruptObject);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-IoForwardIrpSynchronously(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ PIRP Irp);
-
-#define IoForwardAndCatchIrp IoForwardIrpSynchronously
-
-NTOSAPI
-VOID
-DDKAPI
-IoFreeController(
- /*IN*/ PCONTROLLER_OBJECT ControllerObject);
-
-NTOSAPI
-VOID
-DDKAPI
-IoFreeErrorLogEntry(
- PVOID ElEntry);
-
-NTOSAPI
-VOID
-DDKAPI
-IoFreeIrp(
- /*IN*/ PIRP Irp);
-
-NTOSAPI
-VOID
-DDKAPI
-IoFreeMdl(
- /*IN*/ PMDL Mdl);
-
-NTOSAPI
-VOID
-DDKAPI
-IoFreeWorkItem(
- /*IN*/ PIO_WORKITEM pIOWorkItem);
-
-NTOSAPI
-PDEVICE_OBJECT
-DDKAPI
-IoGetAttachedDevice(
- /*IN*/ PDEVICE_OBJECT DeviceObject);
-
-NTOSAPI
-PDEVICE_OBJECT
-DDKAPI
-IoGetAttachedDeviceReference(
- /*IN*/ PDEVICE_OBJECT DeviceObject);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoGetBootDiskInformation(
- /*IN OUT*/ PBOOTDISK_INFORMATION BootDiskInformation,
- /*IN*/ ULONG Size);
-
-NTOSAPI
-PCONFIGURATION_INFORMATION
-DDKAPI
-IoGetConfigurationInformation(
- VOID);
-
-NTOSAPI
-PEPROCESS
-DDKAPI
-IoGetCurrentProcess(
- VOID);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoGetDeviceInterfaceAlias(
- /*IN*/ PUNICODE_STRING SymbolicLinkName,
- /*IN*/ CONST GUID *AliasInterfaceClassGuid,
- /*OUT*/ PUNICODE_STRING AliasSymbolicLinkName);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoGetDeviceInterfaces(
- /*IN*/ CONST GUID *InterfaceClassGuid,
- /*IN*/ PDEVICE_OBJECT PhysicalDeviceObject /*OPTIONAL*/,
- /*IN*/ ULONG Flags,
- /*OUT*/ PWSTR *SymbolicLinkList);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoGetDeviceObjectPointer(
- /*IN*/ PUNICODE_STRING ObjectName,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*OUT*/ PFILE_OBJECT *FileObject,
- /*OUT*/ PDEVICE_OBJECT *DeviceObject);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoGetDeviceProperty(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ DEVICE_REGISTRY_PROPERTY DeviceProperty,
- /*IN*/ ULONG BufferLength,
- /*OUT*/ PVOID PropertyBuffer,
- /*OUT*/ PULONG ResultLength);
-
-NTOSAPI
-PDEVICE_OBJECT
-DDKAPI
-IoGetDeviceToVerify(
- /*IN*/ PETHREAD Thread);
-
-NTOSAPI
-PDMA_ADAPTER
-DDKAPI
-IoGetDmaAdapter(
- /*IN*/ PDEVICE_OBJECT PhysicalDeviceObject,
- /*IN*/ PDEVICE_DESCRIPTION DeviceDescription,
- /*IN OUT*/ PULONG NumberOfMapRegisters);
-
-NTOSAPI
-PVOID
-DDKAPI
-IoGetDriverObjectExtension(
- /*IN*/ PDRIVER_OBJECT DriverObject,
- /*IN*/ PVOID ClientIdentificationAddress);
-
-NTOSAPI
-PGENERIC_MAPPING
-DDKAPI
-IoGetFileObjectGenericMapping(
- VOID);
-
-/*
- * ULONG
- * IoGetFunctionCodeFromCtlCode(
- * IN ULONG ControlCode)
- */
-#define IoGetFunctionCodeFromCtlCode(_ControlCode) \
- (((_ControlCode) >> 2) & 0x00000FFF)
-
-NTOSAPI
-PVOID
-DDKAPI
-IoGetInitialStack(
- VOID);
-
-NTOSAPI
-PDEVICE_OBJECT
-DDKAPI
-IoGetRelatedDeviceObject(
- /*IN*/ PFILE_OBJECT FileObject);
-
-NTOSAPI
-ULONG
-DDKAPI
-IoGetRemainingStackSize(
- VOID);
-
-NTOSAPI
-VOID
-DDKAPI
-IoGetStackLimits(
- /*OUT*/ PULONG_PTR LowLimit,
- /*OUT*/ PULONG_PTR HighLimit);
-
-NTOSAPI
-VOID
-DDKAPI
-KeInitializeDpc(
- /*IN*/ PRKDPC Dpc,
- /*IN*/ PKDEFERRED_ROUTINE DeferredRoutine,
- /*IN*/ PVOID DeferredContext);
-
-/*
- * VOID
- * IoInitializeDpcRequest(
- * IN PDEVICE_OBJECT DeviceObject,
- * IN PIO_DPC_ROUTINE DpcRoutine)
- */
-#define IoInitializeDpcRequest(_DeviceObject, \
- _DpcRoutine) \
- KeInitializeDpc(&(_DeviceObject)->Dpc, \
- (PKDEFERRED_ROUTINE) (_DpcRoutine), \
- _DeviceObject)
-
-NTOSAPI
-VOID
-DDKAPI
-IoInitializeIrp(
- /*IN OUT*/ PIRP Irp,
- /*IN*/ USHORT PacketSize,
- /*IN*/ CCHAR StackSize);
-
-NTOSAPI
-VOID
-DDKAPI
-IoInitializeRemoveLockEx(
- /*IN*/ PIO_REMOVE_LOCK Lock,
- /*IN*/ ULONG AllocateTag,
- /*IN*/ ULONG MaxLockedMinutes,
- /*IN*/ ULONG HighWatermark,
- /*IN*/ ULONG RemlockSize);
-
-/* VOID
- * IoInitializeRemoveLock(
- * IN PIO_REMOVE_LOCK Lock,
- * IN ULONG AllocateTag,
- * IN ULONG MaxLockedMinutes,
- * IN ULONG HighWatermark)
- */
-#define IoInitializeRemoveLock( \
- Lock, AllocateTag, MaxLockedMinutes, HighWatermark) \
- IoInitializeRemoveLockEx(Lock, AllocateTag, MaxLockedMinutes, \
- HighWatermark, sizeof(IO_REMOVE_LOCK))
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoInitializeTimer(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ PIO_TIMER_ROUTINE TimerRoutine,
- /*IN*/ PVOID Context);
-
-NTOSAPI
-VOID
-DDKAPI
-IoInvalidateDeviceRelations(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ DEVICE_RELATION_TYPE Type);
-
-NTOSAPI
-VOID
-DDKAPI
-IoInvalidateDeviceState(
- /*IN*/ PDEVICE_OBJECT PhysicalDeviceObject);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-IoIs32bitProcess(
- /*IN*/ PIRP Irp /*OPTIONAL*/);
-
-/*
- * BOOLEAN
- * IoIsErrorUserInduced(
- * IN NTSTATUS Status);
- */
-#define IoIsErrorUserInduced(Status) \
- ((BOOLEAN)(((Status) == STATUS_DEVICE_NOT_READY) || \
- ((Status) == STATUS_IO_TIMEOUT) || \
- ((Status) == STATUS_MEDIA_WRITE_PROTECTED) || \
- ((Status) == STATUS_NO_MEDIA_IN_DEVICE) || \
- ((Status) == STATUS_VERIFY_REQUIRED) || \
- ((Status) == STATUS_UNRECOGNIZED_MEDIA) || \
- ((Status) == STATUS_WRONG_VOLUME)))
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-IoIsWdmVersionAvailable(
- /*IN*/ UCHAR MajorVersion,
- /*IN*/ UCHAR MinorVersion);
-
-NTOSAPI
-PIRP
-DDKAPI
-IoMakeAssociatedIrp(
- /*IN*/ PIRP Irp,
- /*IN*/ CCHAR StackSize);
-
-/*
- * VOID
- * IoMarkIrpPending(
- * IN OUT PIRP Irp)
- */
-#define IoMarkIrpPending(_Irp) \
- (IoGetCurrentIrpStackLocation(_Irp)->Control |= SL_PENDING_RETURNED)
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoOpenDeviceInterfaceRegistryKey(
- /*IN*/ PUNICODE_STRING SymbolicLinkName,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*OUT*/ PHANDLE DeviceInterfaceKey);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoOpenDeviceRegistryKey(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ ULONG DevInstKeyType,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*OUT*/ PHANDLE DevInstRegKey);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoQueryDeviceDescription(
- /*IN*/ PINTERFACE_TYPE BusType /*OPTIONAL*/,
- /*IN*/ PULONG BusNumber /*OPTIONAL*/,
- /*IN*/ PCONFIGURATION_TYPE ControllerType /*OPTIONAL*/,
- /*IN*/ PULONG ControllerNumber /*OPTIONAL*/,
- /*IN*/ PCONFIGURATION_TYPE PeripheralType /*OPTIONAL*/,
- /*IN*/ PULONG PeripheralNumber /*OPTIONAL*/,
- /*IN*/ PIO_QUERY_DEVICE_ROUTINE CalloutRoutine,
- /*IN*/ PVOID Context);
-
-NTOSAPI
-VOID
-DDKAPI
-IoQueueWorkItem(
- /*IN*/ PIO_WORKITEM pIOWorkItem,
- /*IN*/ PIO_WORKITEM_ROUTINE Routine,
- /*IN*/ WORK_QUEUE_TYPE QueueType,
- /*IN*/ PVOID Context);
-
-NTOSAPI
-VOID
-DDKAPI
-IoRaiseHardError(
- /*IN*/ PIRP Irp,
- /*IN*/ PVPB Vpb /*OPTIONAL*/,
- /*IN*/ PDEVICE_OBJECT RealDeviceObject);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-IoRaiseInformationalHardError(
- /*IN*/ NTSTATUS ErrorStatus,
- /*IN*/ PUNICODE_STRING String /*OPTIONAL*/,
- /*IN*/ PKTHREAD Thread /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoReadDiskSignature(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ ULONG BytesPerSector,
- /*OUT*/ PDISK_SIGNATURE Signature);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoReadPartitionTableEx(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ struct _DRIVE_LAYOUT_INFORMATION_EX **PartitionBuffer);
-
-NTOSAPI
-VOID
-DDKAPI
-IoRegisterBootDriverReinitialization(
- /*IN*/ PDRIVER_OBJECT DriverObject,
- /*IN*/ PDRIVER_REINITIALIZE DriverReinitializationRoutine,
- /*IN*/ PVOID Context);
-
-NTOSAPI
-VOID
-DDKAPI
-IoRegisterBootDriverReinitialization(
- /*IN*/ PDRIVER_OBJECT DriverObject,
- /*IN*/ PDRIVER_REINITIALIZE DriverReinitializationRoutine,
- /*IN*/ PVOID Context);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoRegisterDeviceInterface(
- /*IN*/ PDEVICE_OBJECT PhysicalDeviceObject,
- /*IN*/ CONST GUID *InterfaceClassGuid,
- /*IN*/ PUNICODE_STRING ReferenceString /*OPTIONAL*/,
- /*OUT*/ PUNICODE_STRING SymbolicLinkName);
-
-NTOSAPI
-VOID
-DDKAPI
-IoRegisterDriverReinitialization(
- /*IN*/ PDRIVER_OBJECT DriverObject,
- /*IN*/ PDRIVER_REINITIALIZE DriverReinitializationRoutine,
- /*IN*/ PVOID Context);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoRegisterPlugPlayNotification(
- /*IN*/ IO_NOTIFICATION_EVENT_CATEGORY EventCategory,
- /*IN*/ ULONG EventCategoryFlags,
- /*IN*/ PVOID EventCategoryData /*OPTIONAL*/,
- /*IN*/ PDRIVER_OBJECT DriverObject,
- /*IN*/ PDRIVER_NOTIFICATION_CALLBACK_ROUTINE CallbackRoutine,
- /*IN*/ PVOID Context,
- /*OUT*/ PVOID *NotificationEntry);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoRegisterShutdownNotification(
- /*IN*/ PDEVICE_OBJECT DeviceObject);
-
-NTOSAPI
-VOID
-DDKAPI
-IoReleaseCancelSpinLock(
- /*IN*/ KIRQL Irql);
-
-NTOSAPI
-VOID
-DDKAPI
-IoReleaseRemoveLockAndWaitEx(
- /*IN*/ PIO_REMOVE_LOCK RemoveLock,
- /*IN*/ PVOID Tag,
- /*IN*/ ULONG RemlockSize);
-
-/*
- * VOID
- * IoReleaseRemoveLockAndWait(
- * IN PIO_REMOVE_LOCK RemoveLock,
- * IN PVOID Tag)
- */
-#define IoReleaseRemoveLockAndWait(_RemoveLock, \
- _Tag) \
- IoReleaseRemoveLockAndWaitEx(_RemoveLock, _Tag, sizeof(IO_REMOVE_LOCK))
-
-NTOSAPI
-VOID
-DDKAPI
-IoReleaseRemoveLockEx(
- /*IN*/ PIO_REMOVE_LOCK RemoveLock,
- /*IN*/ PVOID Tag,
- /*IN*/ ULONG RemlockSize);
-
-/*
- * VOID
- * IoReleaseRemoveLock(
- * IN PIO_REMOVE_LOCK RemoveLock,
- * IN PVOID Tag)
- */
-#define IoReleaseRemoveLock(_RemoveLock, \
- _Tag) \
- IoReleaseRemoveLockEx(_RemoveLock, _Tag, sizeof(IO_REMOVE_LOCK))
-
-NTOSAPI
-VOID
-DDKAPI
-IoRemoveShareAccess(
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN OUT*/ PSHARE_ACCESS ShareAccess);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoReportDetectedDevice(
- /*IN*/ PDRIVER_OBJECT DriverObject,
- /*IN*/ INTERFACE_TYPE LegacyBusType,
- /*IN*/ ULONG BusNumber,
- /*IN*/ ULONG SlotNumber,
- /*IN*/ PCM_RESOURCE_LIST ResourceList,
- /*IN*/ PIO_RESOURCE_REQUIREMENTS_LIST ResourceRequirements /*OPTIONAL*/,
- /*IN*/ BOOLEAN ResourceAssigned,
- /*IN OUT*/ PDEVICE_OBJECT *DeviceObject);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoReportResourceForDetection(
- /*IN*/ PDRIVER_OBJECT DriverObject,
- /*IN*/ PCM_RESOURCE_LIST DriverList /*OPTIONAL*/,
- /*IN*/ ULONG DriverListSize /*OPTIONAL*/,
- /*IN*/ PDEVICE_OBJECT DeviceObject /*OPTIONAL*/,
- /*IN*/ PCM_RESOURCE_LIST DeviceList /*OPTIONAL*/,
- /*IN*/ ULONG DeviceListSize /*OPTIONAL*/,
- /*OUT*/ PBOOLEAN ConflictDetected);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoReportResourceUsage(
- /*IN*/ PUNICODE_STRING DriverClassName /*OPTIONAL*/,
- /*IN*/ PDRIVER_OBJECT DriverObject,
- /*IN*/ PCM_RESOURCE_LIST DriverList /*OPTIONAL*/,
- /*IN*/ ULONG DriverListSize /*OPTIONAL*/,
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ PCM_RESOURCE_LIST DeviceList /*OPTIONAL*/,
- /*IN*/ ULONG DeviceListSize /*OPTIONAL*/,
- /*IN*/ BOOLEAN OverrideConflict,
- /*OUT*/ PBOOLEAN ConflictDetected);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoReportTargetDeviceChange(
- /*IN*/ PDEVICE_OBJECT PhysicalDeviceObject,
- /*IN*/ PVOID NotificationStructure);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoReportTargetDeviceChangeAsynchronous(
- /*IN*/ PDEVICE_OBJECT PhysicalDeviceObject,
- /*IN*/ PVOID NotificationStructure,
- /*IN*/ PDEVICE_CHANGE_COMPLETE_CALLBACK Callback /*OPTIONAL*/,
- /*IN*/ PVOID Context /*OPTIONAL*/);
-
-NTOSAPI
-VOID
-DDKAPI
-IoRequestDeviceEject(
- /*IN*/ PDEVICE_OBJECT PhysicalDeviceObject);
-
-/*
- * VOID
- * IoRequestDpc(
- * IN PDEVICE_OBJECT DeviceObject,
- * IN PIRP Irp,
- * IN PVOID Context);
- */
-#define IoRequestDpc(DeviceObject, Irp, Context)( \
- KeInsertQueueDpc(&(DeviceObject)->Dpc, (Irp), (Context)))
-
-NTOSAPI
-VOID
-DDKAPI
-IoReuseIrp(
- /*IN OUT*/ PIRP Irp,
- /*IN*/ NTSTATUS Status);
-
-/*
- * PDRIVER_CANCEL
- * IoSetCancelRoutine(
- * IN PIRP Irp,
- * IN PDRIVER_CANCEL CancelRoutine)
- */
-#define IoSetCancelRoutine(_Irp, \
- _CancelRoutine) \
- ((PDRIVER_CANCEL) InterlockedExchangePointer( \
- (PVOID *) &(_Irp)->CancelRoutine, (PVOID) (_CancelRoutine)))
-
-/*
- * VOID
- * IoSetCompletionRoutine(
- * IN PIRP Irp,
- * IN PIO_COMPLETION_ROUTINE CompletionRoutine,
- * IN PVOID Context,
- * IN BOOLEAN InvokeOnSuccess,
- * IN BOOLEAN InvokeOnError,
- * IN BOOLEAN InvokeOnCancel)
- */
-#define IoSetCompletionRoutine(_Irp, \
- _CompletionRoutine, \
- _Context, \
- _InvokeOnSuccess, \
- _InvokeOnError, \
- _InvokeOnCancel) \
-{ \
- PIO_STACK_LOCATION _IrpSp; \
- ASSERT(_InvokeOnSuccess || _InvokeOnError || _InvokeOnCancel ? \
- _CompletionRoutine != NULL : TRUE); \
- _IrpSp = IoGetNextIrpStackLocation(_Irp); \
- _IrpSp->CompletionRoutine = (PIO_COMPLETION_ROUTINE)(_CompletionRoutine); \
- _IrpSp->Context = (_Context); \
- _IrpSp->Control = 0; \
- if (_InvokeOnSuccess) _IrpSp->Control = SL_INVOKE_ON_SUCCESS; \
- if (_InvokeOnError) _IrpSp->Control |= SL_INVOKE_ON_ERROR; \
- if (_InvokeOnCancel) _IrpSp->Control |= SL_INVOKE_ON_CANCEL; \
-}
-
-NTOSAPI
-VOID
-DDKAPI
-IoSetCompletionRoutineEx(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ PIRP Irp,
- /*IN*/ PIO_COMPLETION_ROUTINE CompletionRoutine,
- /*IN*/ PVOID Context,
- /*IN*/ BOOLEAN InvokeOnSuccess,
- /*IN*/ BOOLEAN InvokeOnError,
- /*IN*/ BOOLEAN InvokeOnCancel);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoSetDeviceInterfaceState(
- /*IN*/ PUNICODE_STRING SymbolicLinkName,
- /*IN*/ BOOLEAN Enable);
-
-NTOSAPI
-VOID
-DDKAPI
-IoSetHardErrorOrVerifyDevice(
- /*IN*/ PIRP Irp,
- /*IN*/ PDEVICE_OBJECT DeviceObject);
-
-/*
- * VOID
- * IoSetNextIrpStackLocation(
- * IN OUT PIRP Irp)
- */
-#define IoSetNextIrpStackLocation(_Irp) \
-{ \
- (_Irp)->CurrentLocation--; \
- (_Irp)->Tail.Overlay.CurrentStackLocation--; \
-}
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoSetPartitionInformationEx(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ ULONG PartitionNumber,
- /*IN*/ struct _SET_PARTITION_INFORMATION_EX *PartitionInfo);
-
-NTOSAPI
-VOID
-DDKAPI
-IoSetShareAccess(
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ ULONG DesiredShareAccess,
- /*IN OUT*/ PFILE_OBJECT FileObject,
- /*OUT*/ PSHARE_ACCESS ShareAccess);
-
-NTOSAPI
-VOID
-DDKAPI
-IoSetStartIoAttributes(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ BOOLEAN DeferredStartIo,
- /*IN*/ BOOLEAN NonCancelable);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoSetSystemPartition(
- /*IN*/ PUNICODE_STRING VolumeNameString);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-IoSetThreadHardErrorMode(
- /*IN*/ BOOLEAN EnableHardErrors);
-
-/*
- * USHORT
- * IoSizeOfIrp(
- * IN CCHAR StackSize)
- */
-#define IoSizeOfIrp(_StackSize) \
- ((USHORT) (sizeof(IRP) + ((_StackSize) * (sizeof(IO_STACK_LOCATION)))))
-
-/*
- * VOID
- * IoSkipCurrentIrpStackLocation(
- * IN PIRP Irp)
- */
-#define IoSkipCurrentIrpStackLocation(_Irp) \
-{ \
- (_Irp)->CurrentLocation++; \
- (_Irp)->Tail.Overlay.CurrentStackLocation++; \
-}
-
-NTOSAPI
-VOID
-DDKAPI
-IoStartNextPacket(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ BOOLEAN Cancelable);
-
-NTOSAPI
-VOID
-DDKAPI
-IoStartNextPacketByKey(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ BOOLEAN Cancelable,
- /*IN*/ ULONG Key);
-
-NTOSAPI
-VOID
-DDKAPI
-IoStartPacket(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ PIRP Irp,
- /*IN*/ PULONG Key /*OPTIONAL*/,
- /*IN*/ PDRIVER_CANCEL CancelFunction /*OPTIONAL*/);
-
-NTOSAPI
-VOID
-DDKAPI
-IoStartTimer(
- /*IN*/ PDEVICE_OBJECT DeviceObject);
-
-NTOSAPI
-VOID
-DDKAPI
-IoStopTimer(
- /*IN*/ PDEVICE_OBJECT DeviceObject);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoUnregisterPlugPlayNotification(
- /*IN*/ PVOID NotificationEntry);
-
-NTOSAPI
-VOID
-DDKAPI
-IoUnregisterShutdownNotification(
- /*IN*/ PDEVICE_OBJECT DeviceObject);
-
-NTOSAPI
-VOID
-DDKAPI
-IoUpdateShareAccess(
- /*IN*/ PFILE_OBJECT FileObject,
- /*IN OUT*/ PSHARE_ACCESS ShareAccess);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoVerifyPartitionTable(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ BOOLEAN FixErrors);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoVolumeDeviceToDosName(
- /*IN*/ PVOID VolumeDeviceObject,
- /*OUT*/ PUNICODE_STRING DosName);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoWMIAllocateInstanceIds(
- /*IN*/ GUID *Guid,
- /*IN*/ ULONG InstanceCount,
- /*OUT*/ ULONG *FirstInstanceId);
-
-NTOSAPI
-ULONG
-DDKAPI
-IoWMIDeviceObjectToProviderId(
- /*IN*/ PDEVICE_OBJECT DeviceObject);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoWMIDeviceObjectToInstanceName(
- /*IN*/ PVOID DataBlockObject,
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*OUT*/ PUNICODE_STRING InstanceName);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoWMIExecuteMethod(
- /*IN*/ PVOID DataBlockObject,
- /*IN*/ PUNICODE_STRING InstanceName,
- /*IN*/ ULONG MethodId,
- /*IN*/ ULONG InBufferSize,
- /*IN OUT*/ PULONG OutBufferSize,
- /*IN OUT*/ PUCHAR InOutBuffer);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoWMIHandleToInstanceName(
- /*IN*/ PVOID DataBlockObject,
- /*IN*/ HANDLE FileHandle,
- /*OUT*/ PUNICODE_STRING InstanceName);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoWMIOpenBlock(
- /*IN*/ GUID *DataBlockGuid,
- /*IN*/ ULONG DesiredAccess,
- /*OUT*/ PVOID *DataBlockObject);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoWMIQueryAllData(
- /*IN*/ PVOID DataBlockObject,
- /*IN OUT*/ ULONG *InOutBufferSize,
- /*OUT*/ PVOID OutBuffer);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoWMIQueryAllDataMultiple(
- /*IN*/ PVOID *DataBlockObjectList,
- /*IN*/ ULONG ObjectCount,
- /*IN OUT*/ ULONG *InOutBufferSize,
- /*OUT*/ PVOID OutBuffer);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoWMIQuerySingleInstance(
- /*IN*/ PVOID DataBlockObject,
- /*IN*/ PUNICODE_STRING InstanceName,
- /*IN OUT*/ ULONG *InOutBufferSize,
- /*OUT*/ PVOID OutBuffer);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoWMIQuerySingleInstanceMultiple(
- /*IN*/ PVOID *DataBlockObjectList,
- /*IN*/ PUNICODE_STRING InstanceNames,
- /*IN*/ ULONG ObjectCount,
- /*IN OUT*/ ULONG *InOutBufferSize,
- /*OUT*/ PVOID OutBuffer);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoWMIRegistrationControl(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ ULONG Action);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoWMISetNotificationCallback(
- /*IN*/ PVOID Object,
- /*IN*/ WMI_NOTIFICATION_CALLBACK Callback,
- /*IN*/ PVOID Context);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoWMISetSingleInstance(
- /*IN*/ PVOID DataBlockObject,
- /*IN*/ PUNICODE_STRING InstanceName,
- /*IN*/ ULONG Version,
- /*IN*/ ULONG ValueBufferSize,
- /*IN*/ PVOID ValueBuffer);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoWMISetSingleItem(
- /*IN*/ PVOID DataBlockObject,
- /*IN*/ PUNICODE_STRING InstanceName,
- /*IN*/ ULONG DataItemId,
- /*IN*/ ULONG Version,
- /*IN*/ ULONG ValueBufferSize,
- /*IN*/ PVOID ValueBuffer);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoWMISuggestInstanceName(
- /*IN*/ PDEVICE_OBJECT PhysicalDeviceObject /*OPTIONAL*/,
- /*IN*/ PUNICODE_STRING SymbolicLinkName /*OPTIONAL*/,
- /*IN*/ BOOLEAN CombineNames,
- /*OUT*/ PUNICODE_STRING SuggestedInstanceName);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoWMIWriteEvent(
- /*IN*/ PVOID WnodeEventItem);
-
-NTOSAPI
-VOID
-DDKAPI
-IoWriteErrorLogEntry(
- /*IN*/ PVOID ElEntry);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoWritePartitionTableEx(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ struct _DRIVE_LAYOUT_INFORMATION_EX *PartitionBuffer);
-
-
-
-/** Kernel routines **/
-
-NTOSAPI
-VOID
-DDKFASTAPI
-KeAcquireInStackQueuedSpinLock(
- /*IN*/ PKSPIN_LOCK SpinLock,
- /*IN*/ PKLOCK_QUEUE_HANDLE LockHandle);
-
-NTOSAPI
-VOID
-DDKFASTAPI
-KeAcquireInStackQueuedSpinLockAtDpcLevel(
- /*IN*/ PKSPIN_LOCK SpinLock,
- /*IN*/ PKLOCK_QUEUE_HANDLE LockHandle);
-
-NTOSAPI
-KIRQL
-DDKAPI
-KeAcquireInterruptSpinLock(
- /*IN*/ PKINTERRUPT Interrupt);
-
-NTOSAPI
-VOID
-DDKAPI
-KeAcquireSpinLock(
- /*IN*/ PKSPIN_LOCK SpinLock,
- /*OUT*/ PKIRQL OldIrql);
-
-/* System Service Dispatch Table */
-typedef PVOID (NTAPI * SSDT)(VOID);
-typedef SSDT * PSSDT;
-
-/* System Service Parameters Table */
-typedef UCHAR SSPT, * PSSPT;
-
-typedef struct _SSDT_ENTRY {
- PSSDT SSDT;
- PULONG ServiceCounterTable;
- ULONG NumberOfServices;
- PSSPT SSPT;
-} SSDT_ENTRY, *PSSDT_ENTRY;
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-KeAddSystemServiceTable(
- /*IN*/ PSSDT SSDT,
- /*IN*/ PULONG ServiceCounterTable,
- /*IN*/ ULONG NumberOfServices,
- /*IN*/ PSSPT SSPT,
- /*IN*/ ULONG TableIndex);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-KeAreApcsDisabled(
- VOID);
-
-NTOSAPI
-VOID
-DDKAPI
-KeAttachProcess(
- /*IN*/ PEPROCESS Process);
-
-NTOSAPI
-VOID
-DDKAPI
-KeBugCheck(
- /*IN*/ ULONG BugCheckCode);
-
-NTOSAPI
-VOID
-DDKAPI
-KeBugCheckEx(
- /*IN*/ ULONG BugCheckCode,
- /*IN*/ ULONG_PTR BugCheckParameter1,
- /*IN*/ ULONG_PTR BugCheckParameter2,
- /*IN*/ ULONG_PTR BugCheckParameter3,
- /*IN*/ ULONG_PTR BugCheckParameter4);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-KeCancelTimer(
- /*IN*/ PKTIMER Timer);
-
-NTOSAPI
-VOID
-DDKAPI
-KeClearEvent(
- /*IN*/ PRKEVENT Event);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-KeDelayExecutionThread(
- /*IN*/ KPROCESSOR_MODE WaitMode,
- /*IN*/ BOOLEAN Alertable,
- /*IN*/ PLARGE_INTEGER Interval);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-KeDeregisterBugCheckCallback(
- /*IN*/ PKBUGCHECK_CALLBACK_RECORD CallbackRecord);
-
-NTOSAPI
-VOID
-DDKAPI
-KeDetachProcess(
- VOID);
-
-NTOSAPI
-VOID
-DDKAPI
-KeEnterCriticalRegion(
- VOID);
-
-/*
- * VOID
- * KeFlushIoBuffers(
- * IN PMDL Mdl,
- * IN BOOLEAN ReadOperation,
- * IN BOOLEAN DmaOperation)
- */
-#define KeFlushIoBuffers(_Mdl, _ReadOperation, _DmaOperation)
-
-NTOSAPI
-VOID
-DDKAPI
-KeFlushQueuedDpcs(VOID);
-
-NTOSAPI
-PRKTHREAD
-DDKAPI
-KeGetCurrentThread(
- VOID);
-
-NTOSAPI
-KPROCESSOR_MODE
-DDKAPI
-KeGetPreviousMode(
- VOID);
-
-NTOSAPI
-ULONG
-DDKAPI
-KeGetRecommendedSharedDataAlignment(
- VOID);
-
-NTOSAPI
-VOID
-DDKAPI
-KeInitializeApc(
- /*IN*/ PKAPC Apc,
- /*IN*/ PKTHREAD Thread,
- /*IN*/ UCHAR StateIndex,
- /*IN*/ PKKERNEL_ROUTINE KernelRoutine,
- /*IN*/ PKRUNDOWN_ROUTINE RundownRoutine,
- /*IN*/ PKNORMAL_ROUTINE NormalRoutine,
- /*IN*/ UCHAR Mode,
- /*IN*/ PVOID Context);
-
-NTOSAPI
-VOID
-DDKAPI
-KeInitializeDeviceQueue(
- /*IN*/ PKDEVICE_QUEUE DeviceQueue);
-
-NTOSAPI
-VOID
-DDKAPI
-KeInitializeMutex(
- /*IN*/ PRKMUTEX Mutex,
- /*IN*/ ULONG Level);
-
-NTOSAPI
-VOID
-DDKAPI
-KeInitializeSemaphore(
- /*IN*/ PRKSEMAPHORE Semaphore,
- /*IN*/ LONG Count,
- /*IN*/ LONG Limit);
-
-NTOSAPI
-VOID
-DDKAPI
-KeInitializeSpinLock(
- /*IN*/ PKSPIN_LOCK SpinLock);
-
-NTOSAPI
-VOID
-DDKAPI
-KeInitializeTimer(
- /*IN*/ PKTIMER Timer);
-
-NTOSAPI
-VOID
-DDKAPI
-KeInitializeTimerEx(
- /*IN*/ PKTIMER Timer,
- /*IN*/ TIMER_TYPE Type);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-KeInsertByKeyDeviceQueue(
- /*IN*/ PKDEVICE_QUEUE DeviceQueue,
- /*IN*/ PKDEVICE_QUEUE_ENTRY DeviceQueueEntry,
- /*IN*/ ULONG SortKey);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-KeInsertDeviceQueue(
- /*IN*/ PKDEVICE_QUEUE DeviceQueue,
- /*IN*/ PKDEVICE_QUEUE_ENTRY DeviceQueueEntry);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-KeInsertQueueDpc(
- /*IN*/ PRKDPC Dpc,
- /*IN*/ PVOID SystemArgument1,
- /*IN*/ PVOID SystemArgument2);
-
-NTOSAPI
-VOID
-DDKAPI
-KeLeaveCriticalRegion(
- VOID);
-
-#define KeMemoryBarrier() asm("mfence;")
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-KePulseEvent(
- /*IN*/ PRKEVENT Event,
- /*IN*/ KPRIORITY Increment,
- /*IN*/ BOOLEAN Wait);
-
-NTOSAPI
-ULONGLONG
-DDKAPI
-KeQueryInterruptTime(
- VOID);
-
-NTOSAPI
-LARGE_INTEGER
-DDKAPI
-KeQueryPerformanceCounter(
- /*OUT*/ PLARGE_INTEGER PerformanceFrequency /*OPTIONAL*/);
-
-NTOSAPI
-KPRIORITY
-DDKAPI
-KeQueryPriorityThread(
- /*IN*/ PRKTHREAD Thread);
-
-NTOSAPI
-VOID
-DDKAPI
-KeQuerySystemTime(
- /*OUT*/ PLARGE_INTEGER CurrentTime);
-
-NTOSAPI
-VOID
-DDKAPI
-KeQueryTickCount(
- /*OUT*/ PLARGE_INTEGER TickCount);
-
-NTOSAPI
-ULONG
-DDKAPI
-KeQueryTimeIncrement(
- VOID);
-
-NTOSAPI
-LONG
-DDKAPI
-KeReadStateEvent(
- /*IN*/ PRKEVENT Event);
-
-NTOSAPI
-LONG
-DDKAPI
-KeReadStateMutex(
- /*IN*/ PRKMUTEX Mutex);
-
-NTOSAPI
-LONG
-DDKAPI
-KeReadStateSemaphore(
- /*IN*/ PRKSEMAPHORE Semaphore);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-KeReadStateTimer(
- /*IN*/ PKTIMER Timer);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-KeRegisterBugCheckCallback(
- /*IN*/ PKBUGCHECK_CALLBACK_RECORD CallbackRecord,
- /*IN*/ PKBUGCHECK_CALLBACK_ROUTINE CallbackRoutine,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG Length,
- /*IN*/ PUCHAR Component);
-
-NTOSAPI
-VOID
-DDKFASTAPI
-KeReleaseInStackQueuedSpinLock(
- /*IN*/ PKLOCK_QUEUE_HANDLE LockHandle);
-
-NTOSAPI
-VOID
-DDKFASTAPI
-KeReleaseInStackQueuedSpinLockFromDpcLevel(
- /*IN*/ PKLOCK_QUEUE_HANDLE LockHandle);
-
-NTOSAPI
-VOID
-DDKAPI
-KeReleaseInterruptSpinLock(
- /*IN*/ PKINTERRUPT Interrupt,
- /*IN*/ KIRQL OldIrql);
-
-NTOSAPI
-LONG
-DDKAPI
-KeReleaseMutex(
- /*IN*/ PRKMUTEX Mutex,
- /*IN*/ BOOLEAN Wait);
-
-NTOSAPI
-LONG
-DDKAPI
-KeReleaseSemaphore(
- /*IN*/ PRKSEMAPHORE Semaphore,
- /*IN*/ KPRIORITY Increment,
- /*IN*/ LONG Adjustment,
- /*IN*/ BOOLEAN Wait);
-
-NTOSAPI
-VOID
-DDKAPI
-KeReleaseSpinLock(
- /*IN*/ PKSPIN_LOCK SpinLock,
- /*IN*/ KIRQL NewIrql);
-
-NTOSAPI
-PKDEVICE_QUEUE_ENTRY
-DDKAPI
-KeRemoveByKeyDeviceQueue(
- /*IN*/ PKDEVICE_QUEUE DeviceQueue,
- /*IN*/ ULONG SortKey);
-
-NTOSAPI
-PKDEVICE_QUEUE_ENTRY
-DDKAPI
-KeRemoveDeviceQueue(
- /*IN*/ PKDEVICE_QUEUE DeviceQueue);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-KeRemoveEntryDeviceQueue(
- /*IN*/ PKDEVICE_QUEUE DeviceQueue,
- /*IN*/ PKDEVICE_QUEUE_ENTRY DeviceQueueEntry);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-KeRemoveQueueDpc(
- /*IN*/ PRKDPC Dpc);
-
-NTOSAPI
-LONG
-DDKAPI
-KeResetEvent(
- /*IN*/ PRKEVENT Event);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-KeRestoreFloatingPointState(
- /*IN*/ PKFLOATING_SAVE FloatSave);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-KeSaveFloatingPointState(
- /*OUT*/ PKFLOATING_SAVE FloatSave);
-
-NTOSAPI
-LONG
-DDKAPI
-KeSetBasePriorityThread(
- /*IN*/ PRKTHREAD Thread,
- /*IN*/ LONG Increment);
-
-NTOSAPI
-LONG
-DDKAPI
-KeSetEvent(
- /*IN*/ PRKEVENT Event,
- /*IN*/ KPRIORITY Increment,
- /*IN*/ BOOLEAN Wait);
-
-NTOSAPI
-VOID
-DDKAPI
-KeSetImportanceDpc(
- /*IN*/ PRKDPC Dpc,
- /*IN*/ KDPC_IMPORTANCE Importance);
-
-NTOSAPI
-KPRIORITY
-DDKAPI
-KeSetPriorityThread(
- /*IN*/ PKTHREAD Thread,
- /*IN*/ KPRIORITY Priority);
-
-NTOSAPI
-VOID
-DDKAPI
-KeSetTargetProcessorDpc(
- /*IN*/ PRKDPC Dpc,
- /*IN*/ CCHAR Number);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-KeSetTimer(
- /*IN*/ PKTIMER Timer,
- /*IN*/ LARGE_INTEGER DueTime,
- /*IN*/ PKDPC Dpc /*OPTIONAL*/);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-KeSetTimerEx(
- /*IN*/ PKTIMER Timer,
- /*IN*/ LARGE_INTEGER DueTime,
- /*IN*/ LONG Period /*OPTIONAL*/,
- /*IN*/ PKDPC Dpc /*OPTIONAL*/);
-
-NTOSAPI
-VOID
-DDKFASTAPI
-KeSetTimeUpdateNotifyRoutine(
- /*IN*/ PTIME_UPDATE_NOTIFY_ROUTINE NotifyRoutine);
-
-NTOSAPI
-VOID
-DDKAPI
-KeStallExecutionProcessor(
- /*IN*/ ULONG MicroSeconds);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-KeSynchronizeExecution(
- /*IN*/ PKINTERRUPT Interrupt,
- /*IN*/ PKSYNCHRONIZE_ROUTINE SynchronizeRoutine,
- /*IN*/ PVOID SynchronizeContext);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-KeWaitForMultipleObjects(
- /*IN*/ ULONG Count,
- /*IN*/ PVOID Object[],
- /*IN*/ WAIT_TYPE WaitType,
- /*IN*/ KWAIT_REASON WaitReason,
- /*IN*/ KPROCESSOR_MODE WaitMode,
- /*IN*/ BOOLEAN Alertable,
- /*IN*/ PLARGE_INTEGER Timeout /*OPTIONAL */,
- /*IN*/ PKWAIT_BLOCK WaitBlockArray /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-KeWaitForMutexObject(
- /*IN*/ PRKMUTEX Mutex,
- /*IN*/ KWAIT_REASON WaitReason,
- /*IN*/ KPROCESSOR_MODE WaitMode,
- /*IN*/ BOOLEAN Alertable,
- /*IN*/ PLARGE_INTEGER Timeout /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-KeWaitForSingleObject(
- /*IN*/ PVOID Object,
- /*IN*/ KWAIT_REASON WaitReason,
- /*IN*/ KPROCESSOR_MODE WaitMode,
- /*IN*/ BOOLEAN Alertable,
- /*IN*/ PLARGE_INTEGER Timeout /*OPTIONAL*/);
-
-NTOSAPI
-VOID
-DDKAPI
-KeRaiseIrql(
- /*IN*/ KIRQL new_irql,
- /*OUT*/ PKIRQL old_irql);
-
-NTOSAPI
-VOID
-DDKAPI
-KeLowerIrql(
- /*IN*/ KIRQL irql);
-
-NTOSAPI
-KIRQL
-DDKAPI
-KeRaiseIrqlToDpcLevel(
- VOID);
-
-/** Memory manager routines **/
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-MmAdvanceMdl(
- /*IN*/ PMDL Mdl,
- /*IN*/ ULONG NumberOfBytes);
-
-NTOSAPI
-PVOID
-DDKAPI
-MmAllocateContiguousMemory(
- /*IN*/ ULONG NumberOfBytes,
- /*IN*/ PHYSICAL_ADDRESS HighestAcceptableAddress);
-
-NTOSAPI
-PVOID
-DDKAPI
-MmAllocateContiguousMemorySpecifyCache(
- /*IN*/ SIZE_T NumberOfBytes,
- /*IN*/ PHYSICAL_ADDRESS LowestAcceptableAddress,
- /*IN*/ PHYSICAL_ADDRESS HighestAcceptableAddress,
- /*IN*/ PHYSICAL_ADDRESS BoundaryAddressMultiple /*OPTIONAL*/,
- /*IN*/ MEMORY_CACHING_TYPE CacheType);
-
-NTOSAPI
-PVOID
-DDKAPI
-MmAllocateMappingAddress(
- /*IN*/ SIZE_T NumberOfBytes,
- /*IN*/ ULONG PoolTag);
-
-NTOSAPI
-PVOID
-DDKAPI
-MmAllocateNonCachedMemory(
- /*IN*/ ULONG NumberOfBytes);
-
-NTOSAPI
-PMDL
-DDKAPI
-MmAllocatePagesForMdl(
- /*IN*/ PHYSICAL_ADDRESS LowAddress,
- /*IN*/ PHYSICAL_ADDRESS HighAddress,
- /*IN*/ PHYSICAL_ADDRESS SkipBytes,
- /*IN*/ SIZE_T TotalBytes);
-
-NTOSAPI
-VOID
-DDKAPI
-MmBuildMdlForNonPagedPool(
- /*IN OUT*/ PMDL MemoryDescriptorList);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-MmCreateSection(
- /*OUT*/ PSECTION_OBJECT *SectionObject,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes /*OPTIONAL*/,
- /*IN*/ PLARGE_INTEGER MaximumSize,
- /*IN*/ ULONG SectionPageProtection,
- /*IN*/ ULONG AllocationAttributes,
- /*IN*/ HANDLE FileHandle /*OPTIONAL*/,
- /*IN*/ PFILE_OBJECT File /*OPTIONAL*/);
-
-typedef enum _MMFLUSH_TYPE {
- MmFlushForDelete,
- MmFlushForWrite
-} MMFLUSH_TYPE;
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-MmFlushImageSection(
- /*IN*/ PSECTION_OBJECT_POINTERS SectionObjectPointer,
- /*IN*/ MMFLUSH_TYPE FlushType);
-
-NTOSAPI
-VOID
-DDKAPI
-MmFreeContiguousMemory(
- /*IN*/ PVOID BaseAddress);
-
-NTOSAPI
-VOID
-DDKAPI
-MmFreeContiguousMemorySpecifyCache(
- /*IN*/ PVOID BaseAddress,
- /*IN*/ SIZE_T NumberOfBytes,
- /*IN*/ MEMORY_CACHING_TYPE CacheType);
-
-NTOSAPI
-VOID
-DDKAPI
-MmFreeMappingAddress(
- /*IN*/ PVOID BaseAddress,
- /*IN*/ ULONG PoolTag);
-
-NTOSAPI
-VOID
-DDKAPI
-MmFreeNonCachedMemory(
- /*IN*/ PVOID BaseAddress,
- /*IN*/ SIZE_T NumberOfBytes);
-
-NTOSAPI
-VOID
-DDKAPI
-MmFreePagesFromMdl(
- /*IN*/ PMDL MemoryDescriptorList);
-
-/*
- * ULONG
- * MmGetMdlByteCount(
- * IN PMDL Mdl)
- */
-#define MmGetMdlByteCount(_Mdl) \
- ((_Mdl)->ByteCount)
-
-/*
- * ULONG
- * MmGetMdlByteOffset(
- * IN PMDL Mdl)
- */
-#define MmGetMdlByteOffset(_Mdl) \
- ((_Mdl)->ByteOffset)
-
-/*
- * PPFN_NUMBER
- * MmGetMdlPfnArray(
- * IN PMDL Mdl)
- */
-#define MmGetMdlPfnArray(_Mdl) \
- ((PPFN_NUMBER) ((_Mdl) + 1))
-
-/*
- * PVOID
- * MmGetMdlVirtualAddress(
- * IN PMDL Mdl)
- */
-#define MmGetMdlVirtualAddress(_Mdl) \
- ((PVOID) ((PCHAR) ((_Mdl)->StartVa) + (_Mdl)->ByteOffset))
-
-NTOSAPI
-PHYSICAL_ADDRESS
-DDKAPI
-MmGetPhysicalAddress(
- /*IN*/ PVOID BaseAddress);
-
-NTOSAPI
-PPHYSICAL_MEMORY_RANGE
-DDKAPI
-MmGetPhysicalMemoryRanges(
- VOID);
-
-NTOSAPI
-PVOID
-DDKAPI
-MmGetVirtualForPhysical(
- /*IN*/ PHYSICAL_ADDRESS PhysicalAddress);
-
-NTOSAPI
-PVOID
-DDKAPI
-MmMapLockedPagesSpecifyCache(
- /*IN*/ PMDL MemoryDescriptorList,
- /*IN*/ KPROCESSOR_MODE AccessMode,
- /*IN*/ MEMORY_CACHING_TYPE CacheType,
- /*IN*/ PVOID BaseAddress,
- /*IN*/ ULONG BugCheckOnFailure,
- /*IN*/ MM_PAGE_PRIORITY Priority);
-
-NTOSAPI
-PVOID
-DDKAPI
-MmMapLockedPagesWithReservedMapping(
- /*IN*/ PVOID MappingAddress,
- /*IN*/ ULONG PoolTag,
- /*IN*/ PMDL MemoryDescriptorList,
- /*IN*/ MEMORY_CACHING_TYPE CacheType);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-MmMapUserAddressesToPage(
- /*IN*/ PVOID BaseAddress,
- /*IN*/ SIZE_T NumberOfBytes,
- /*IN*/ PVOID PageAddress);
-
-NTOSAPI
-PVOID
-DDKAPI
-MmMapVideoDisplay(
- /*IN*/ PHYSICAL_ADDRESS PhysicalAddress,
- /*IN*/ SIZE_T NumberOfBytes,
- /*IN*/ MEMORY_CACHING_TYPE CacheType);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-MmMapViewInSessionSpace(
- /*IN*/ PVOID Section,
- /*OUT*/ PVOID *MappedBase,
- /*IN OUT*/ PSIZE_T ViewSize);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-MmMapViewInSystemSpace(
- /*IN*/ PVOID Section,
- /*OUT*/ PVOID *MappedBase,
- /*IN*/ PSIZE_T ViewSize);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-MmMarkPhysicalMemoryAsBad(
- /*IN*/ PPHYSICAL_ADDRESS StartAddress,
- /*IN OUT*/ PLARGE_INTEGER NumberOfBytes);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-MmMarkPhysicalMemoryAsGood(
- /*IN*/ PPHYSICAL_ADDRESS StartAddress,
- /*IN OUT*/ PLARGE_INTEGER NumberOfBytes);
-
-/*
- * PVOID
- * MmGetSystemAddressForMdlSafe(
- * IN PMDL Mdl,
- * IN MM_PAGE_PRIORITY Priority)
- */
-#define MmGetSystemAddressForMdlSafe(_Mdl, _Priority) \
- ((_Mdl)->MdlFlags & (MDL_MAPPED_TO_SYSTEM_VA \
- | MDL_SOURCE_IS_NONPAGED_POOL)) ? \
- (_Mdl)->MappedSystemVa : \
- (PVOID) MmMapLockedPagesSpecifyCache((_Mdl), \
- KernelMode, MmCached, NULL, FALSE, _Priority)
-
-NTOSAPI
-PVOID
-DDKAPI
-MmGetSystemRoutineAddress(
- /*IN*/ PUNICODE_STRING SystemRoutineName);
-
-/*
- * ULONG
- * ADDRESS_AND_SIZE_TO_SPAN_PAGES(
- * IN PVOID Va,
- * IN ULONG Size)
- */
-#define ADDRESS_AND_SIZE_TO_SPAN_PAGES(_Va, \
- _Size) \
- ((ULONG) ((((ULONG_PTR) (_Va) & (PAGE_SIZE - 1)) \
- + (_Size) + (PAGE_SIZE - 1)) >> PAGE_SHIFT))
-
-/*
- * VOID
- * MmInitializeMdl(
- * IN PMDL MemoryDescriptorList,
- * IN PVOID BaseVa,
- * IN SIZE_T Length)
- */
-#define MmInitializeMdl(_MemoryDescriptorList, \
- _BaseVa, \
- _Length) \
-{ \
- (_MemoryDescriptorList)->Next = (PMDL) NULL; \
- (_MemoryDescriptorList)->Size = (CSHORT) (sizeof(MDL) + \
- (sizeof(PFN_NUMBER) * ADDRESS_AND_SIZE_TO_SPAN_PAGES(_BaseVa, _Length))); \
- (_MemoryDescriptorList)->MdlFlags = 0; \
- (_MemoryDescriptorList)->StartVa = (PVOID) PAGE_ALIGN(_BaseVa); \
- (_MemoryDescriptorList)->ByteOffset = BYTE_OFFSET(_BaseVa); \
- (_MemoryDescriptorList)->ByteCount = (ULONG) _Length; \
-}
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-MmIsAddressValid(
- /*IN*/ PVOID VirtualAddress);
-
-NTOSAPI
-LOGICAL
-DDKAPI
-MmIsDriverVerifying(
- /*IN*/ PDRIVER_OBJECT DriverObject);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-MmIsThisAnNtAsSystem(
- VOID);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-MmIsVerifierEnabled(
- /*OUT*/ PULONG VerifierFlags);
-
-NTOSAPI
-PVOID
-DDKAPI
-MmLockPagableDataSection(
- /*IN*/ PVOID AddressWithinSection);
-
-NTOSAPI
-PVOID
-DDKAPI
-MmLockPagableImageSection(
- /*IN*/ PVOID AddressWithinSection);
-
-/*
- * PVOID
- * MmLockPagableCodeSection(
- * IN PVOID AddressWithinSection)
- */
-#define MmLockPagableCodeSection MmLockPagableDataSection
-
-NTOSAPI
-VOID
-DDKAPI
-MmLockPagableSectionByHandle(
- /*IN*/ PVOID ImageSectionHandle);
-
-NTOSAPI
-PVOID
-DDKAPI
-MmMapIoSpace(
- /*IN*/ PHYSICAL_ADDRESS PhysicalAddress,
- /*IN*/ ULONG NumberOfBytes,
- /*IN*/ MEMORY_CACHING_TYPE CacheEnable);
-
-NTOSAPI
-PVOID
-DDKAPI
-MmMapLockedPages(
- /*IN*/ PMDL MemoryDescriptorList,
- /*IN*/ KPROCESSOR_MODE AccessMode);
-
-NTOSAPI
-VOID
-DDKAPI
-MmPageEntireDriver(
- /*IN*/ PVOID AddressWithinSection);
-
-NTOSAPI
-VOID
-DDKAPI
-MmProbeAndLockProcessPages(
- /*IN OUT*/ PMDL MemoryDescriptorList,
- /*IN*/ PEPROCESS Process,
- /*IN*/ KPROCESSOR_MODE AccessMode,
- /*IN*/ LOCK_OPERATION Operation);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-MmProtectMdlSystemAddress(
- /*IN*/ PMDL MemoryDescriptorList,
- /*IN*/ ULONG NewProtect);
-
-NTOSAPI
-VOID
-DDKAPI
-MmUnmapLockedPages(
- /*IN*/ PVOID BaseAddress,
- /*IN*/ PMDL MemoryDescriptorList);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-MmUnmapViewInSessionSpace(
- /*IN*/ PVOID MappedBase);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-MmUnmapViewInSystemSpace(
- /*IN*/ PVOID MappedBase);
-
-NTOSAPI
-VOID
-DDKAPI
-MmUnsecureVirtualMemory(
- /*IN*/ HANDLE SecureHandle);
-
-/*
- * VOID
- * MmPrepareMdlForReuse(
- * IN PMDL Mdl)
- */
-#define MmPrepareMdlForReuse(_Mdl) \
-{ \
- if (((_Mdl)->MdlFlags & MDL_PARTIAL_HAS_BEEN_MAPPED) != 0) { \
- ASSERT(((_Mdl)->MdlFlags & MDL_PARTIAL) != 0); \
- MmUnmapLockedPages((_Mdl)->MappedSystemVa, (_Mdl)); \
- } else if (((_Mdl)->MdlFlags & MDL_PARTIAL) == 0) { \
- ASSERT(((_Mdl)->MdlFlags & MDL_MAPPED_TO_SYSTEM_VA) == 0); \
- } \
-}
-
-NTOSAPI
-VOID
-DDKAPI
-MmProbeAndLockPages(
- /*IN OUT*/ PMDL MemoryDescriptorList,
- /*IN*/ KPROCESSOR_MODE AccessMode,
- /*IN*/ LOCK_OPERATION Operation);
-
-NTOSAPI
-MM_SYSTEM_SIZE
-DDKAPI
-MmQuerySystemSize(
- VOID);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-MmRemovePhysicalMemory(
- /*IN*/ PPHYSICAL_ADDRESS StartAddress,
- /*IN OUT*/ PLARGE_INTEGER NumberOfBytes);
-
-NTOSAPI
-VOID
-DDKAPI
-MmResetDriverPaging(
- /*IN*/ PVOID AddressWithinSection);
-
-NTOSAPI
-HANDLE
-DDKAPI
-MmSecureVirtualMemory(
- /*IN*/ PVOID Address,
- /*IN*/ SIZE_T Size,
- /*IN*/ ULONG ProbeMode);
-
-NTOSAPI
-ULONG
-DDKAPI
-MmSizeOfMdl(
- /*IN*/ PVOID Base,
- /*IN*/ SIZE_T Length);
-
-NTOSAPI
-VOID
-DDKAPI
-MmUnlockPagableImageSection(
- /*IN*/ PVOID ImageSectionHandle);
-
-NTOSAPI
-VOID
-DDKAPI
-MmUnlockPages(
- /*IN*/ PMDL MemoryDescriptorList);
-
-NTOSAPI
-VOID
-DDKAPI
-MmUnmapIoSpace(
- /*IN*/ PVOID BaseAddress,
- /*IN*/ SIZE_T NumberOfBytes);
-
-NTOSAPI
-VOID
-DDKAPI
-MmUnmapReservedMapping(
- /*IN*/ PVOID BaseAddress,
- /*IN*/ ULONG PoolTag,
- /*IN*/ PMDL MemoryDescriptorList);
-
-NTOSAPI
-VOID
-DDKAPI
-MmUnmapVideoDisplay(
- /*IN*/ PVOID BaseAddress,
- /*IN*/ SIZE_T NumberOfBytes);
-
-
-
-/** Object manager routines **/
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ObAssignSecurity(
- /*IN*/ PACCESS_STATE AccessState,
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN*/ PVOID Object,
- /*IN*/ POBJECT_TYPE Type);
-
-NTOSAPI
-VOID
-DDKAPI
-ObDereferenceSecurityDescriptor(
- PSECURITY_DESCRIPTOR SecurityDescriptor,
- ULONG Count);
-
-NTOSAPI
-VOID
-DDKFASTAPI
-ObfDereferenceObject(
- /*IN*/ PVOID Object);
-
-/*
- * VOID
- * ObDereferenceObject(
- * IN PVOID Object)
- */
-#define ObDereferenceObject ObfDereferenceObject
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ObGetObjectSecurity(
- /*IN*/ PVOID Object,
- /*OUT*/ PSECURITY_DESCRIPTOR *SecurityDescriptor,
- /*OUT*/ PBOOLEAN MemoryAllocated);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ObInsertObject(
- /*IN*/ PVOID Object,
- /*IN*/ PACCESS_STATE PassedAccessState /*OPTIONAL*/,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ ULONG AdditionalReferences,
- /*OUT*/ PVOID* ReferencedObject /*OPTIONAL*/,
- /*OUT*/ PHANDLE Handle);
-
-NTOSAPI
-VOID
-DDKFASTAPI
-ObfReferenceObject(
- /*IN*/ PVOID Object);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ObLogSecurityDescriptor(
- /*IN*/ PSECURITY_DESCRIPTOR InputSecurityDescriptor,
- /*OUT*/ PSECURITY_DESCRIPTOR *OutputSecurityDescriptor,
- /*IN*/ ULONG RefBias);
-/*
- * VOID
- * ObReferenceObject(
- * IN PVOID Object)
- */
-#define ObReferenceObject ObfReferenceObject
-
-NTOSAPI
-VOID
-DDKAPI
-ObMakeTemporaryObject(
- /*IN*/ PVOID Object);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ObOpenObjectByName(
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*IN*/ POBJECT_TYPE ObjectType,
- /*IN OUT*/ PVOID ParseContext /*OPTIONAL*/,
- /*IN*/ KPROCESSOR_MODE AccessMode,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ PACCESS_STATE PassedAccessState,
- /*OUT*/ PHANDLE Handle);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ObOpenObjectByPointer(
- /*IN*/ PVOID Object,
- /*IN*/ ULONG HandleAttributes,
- /*IN*/ PACCESS_STATE PassedAccessState /*OPTIONAL*/,
- /*IN*/ ACCESS_MASK DesiredAccess /*OPTIONAL*/,
- /*IN*/ POBJECT_TYPE ObjectType /*OPTIONAL*/,
- /*IN*/ KPROCESSOR_MODE AccessMode,
- /*OUT*/ PHANDLE Handle);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ObQueryObjectAuditingByHandle(
- /*IN*/ HANDLE Handle,
- /*OUT*/ PBOOLEAN GenerateOnClose);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ObReferenceObjectByHandle(
- /*IN*/ HANDLE Handle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_TYPE ObjectType /*OPTIONAL*/,
- /*IN*/ KPROCESSOR_MODE AccessMode,
- /*OUT*/ PVOID *Object,
- /*OUT*/ POBJECT_HANDLE_INFORMATION HandleInformation /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ObReferenceObjectByName(
- /*IN*/ PUNICODE_STRING ObjectPath,
- /*IN*/ ULONG Attributes,
- /*IN*/ PACCESS_STATE PassedAccessState /*OPTIONAL*/,
- /*IN*/ ACCESS_MASK DesiredAccess /*OPTIONAL*/,
- /*IN*/ POBJECT_TYPE ObjectType,
- /*IN*/ KPROCESSOR_MODE AccessMode,
- /*IN OUT*/ PVOID ParseContext /*OPTIONAL*/,
- /*OUT*/ PVOID *Object);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ObReferenceObjectByPointer(
- /*IN*/ PVOID Object,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_TYPE ObjectType,
- /*IN*/ KPROCESSOR_MODE AccessMode);
-
-NTOSAPI
-VOID
-DDKAPI
-ObReferenceSecurityDescriptor(
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN*/ ULONG Count);
-
-NTOSAPI
-VOID
-DDKAPI
-ObReleaseObjectSecurity(
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN*/ BOOLEAN MemoryAllocated);
-
-
-
-/** Process manager routines **/
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-PsCreateSystemProcess(
- /*IN*/ PHANDLE ProcessHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-PsCreateSystemThread(
- /*OUT*/ PHANDLE ThreadHandle,
- /*IN*/ ULONG DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes /*OPTIONAL*/,
- /*IN*/ HANDLE ProcessHandle /*OPTIONAL*/,
- /*OUT*/ PCLIENT_ID ClientId /*OPTIONAL*/,
- /*IN*/ PKSTART_ROUTINE StartRoutine,
- /*IN*/ PVOID StartContext);
-
-/*
- * PEPROCESS
- * PsGetCurrentProcess(VOID)
- */
-#define PsGetCurrentProcess IoGetCurrentProcess
-
-NTOSAPI
-HANDLE
-DDKAPI
-PsGetCurrentProcessId(
- VOID);
-
-/*
- * PETHREAD
- * PsGetCurrentThread(VOID)
- */
-#define PsGetCurrentThread() \
- ((PETHREAD) KeGetCurrentThread())
-
-NTOSAPI
-HANDLE
-DDKAPI
-PsGetCurrentThreadId(
- VOID);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-PsGetVersion(
- PULONG MajorVersion /*OPTIONAL*/,
- PULONG MinorVersion /*OPTIONAL*/,
- PULONG BuildNumber /*OPTIONAL*/,
- PUNICODE_STRING CSDVersion /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-PsRemoveCreateThreadNotifyRoutine(
- /*IN*/ PCREATE_THREAD_NOTIFY_ROUTINE NotifyRoutine);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-PsRemoveLoadImageNotifyRoutine(
- /*IN*/ PLOAD_IMAGE_NOTIFY_ROUTINE NotifyRoutine);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-PsSetCreateProcessNotifyRoutine(
- /*IN*/ PCREATE_PROCESS_NOTIFY_ROUTINE NotifyRoutine,
- /*IN*/ BOOLEAN Remove);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-PsSetCreateThreadNotifyRoutine(
- /*IN*/ PCREATE_THREAD_NOTIFY_ROUTINE NotifyRoutine);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-PsSetLoadImageNotifyRoutine(
- /*IN*/ PLOAD_IMAGE_NOTIFY_ROUTINE NotifyRoutine);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-PsTerminateSystemThread(
- /*IN*/ NTSTATUS ExitStatus);
-
-
-
-/** Security reference monitor routines **/
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-SeAccessCheck(
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor,
- /*IN*/ PSECURITY_SUBJECT_CONTEXT SubjectSecurityContext,
- /*IN*/ BOOLEAN SubjectContextLocked,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ ACCESS_MASK PreviouslyGrantedAccess,
- /*OUT*/ PPRIVILEGE_SET *Privileges /*OPTIONAL*/,
- /*IN*/ PGENERIC_MAPPING GenericMapping,
- /*IN*/ KPROCESSOR_MODE AccessMode,
- /*OUT*/ PACCESS_MASK GrantedAccess,
- /*OUT*/ PNTSTATUS AccessStatus);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-SeAssignSecurity(
- /*IN*/ PSECURITY_DESCRIPTOR ParentDescriptor /*OPTIONAL*/,
- /*IN*/ PSECURITY_DESCRIPTOR ExplicitDescriptor /*OPTIONAL*/,
- /*OUT*/ PSECURITY_DESCRIPTOR *NewDescriptor,
- /*IN*/ BOOLEAN IsDirectoryObject,
- /*IN*/ PSECURITY_SUBJECT_CONTEXT SubjectContext,
- /*IN*/ PGENERIC_MAPPING GenericMapping,
- /*IN*/ POOL_TYPE PoolType);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-SeAssignSecurityEx(
- /*IN*/ PSECURITY_DESCRIPTOR ParentDescriptor /*OPTIONAL*/,
- /*IN*/ PSECURITY_DESCRIPTOR ExplicitDescriptor /*OPTIONAL*/,
- /*OUT*/ PSECURITY_DESCRIPTOR *NewDescriptor,
- /*IN*/ GUID *ObjectType /*OPTIONAL*/,
- /*IN*/ BOOLEAN IsDirectoryObject,
- /*IN*/ ULONG AutoInheritFlags,
- /*IN*/ PSECURITY_SUBJECT_CONTEXT SubjectContext,
- /*IN*/ PGENERIC_MAPPING GenericMapping,
- /*IN*/ POOL_TYPE PoolType);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-SeDeassignSecurity(
- /*IN OUT*/ PSECURITY_DESCRIPTOR *SecurityDescriptor);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-SeSinglePrivilegeCheck(
- LUID PrivilegeValue,
- KPROCESSOR_MODE PreviousMode);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-SeValidSecurityDescriptor(
- /*IN*/ ULONG Length,
- /*IN*/ PSECURITY_DESCRIPTOR SecurityDescriptor);
-
-
-
-/** NtXxx routines **/
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-NtOpenProcess(
- /*OUT*/ PHANDLE ProcessHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*IN*/ PCLIENT_ID ClientId /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-NtQueryInformationProcess(
- /*IN*/ HANDLE ProcessHandle,
- /*IN*/ PROCESSINFOCLASS ProcessInformationClass,
- /*OUT*/ PVOID ProcessInformation,
- /*IN*/ ULONG ProcessInformationLength,
- /*OUT*/ PULONG ReturnLength /*OPTIONAL*/);
-
-
-
-/** NtXxx and ZwXxx routines **/
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwCancelTimer(
- /*IN*/ HANDLE TimerHandle,
- /*OUT*/ PBOOLEAN CurrentState /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-NtClose(
- /*IN*/ HANDLE Handle);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwClose(
- /*IN*/ HANDLE Handle);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwCreateDirectoryObject(
- /*OUT*/ PHANDLE DirectoryHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-NtCreateEvent(
- /*OUT*/ PHANDLE EventHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*IN*/ BOOLEAN ManualReset,
- /*IN*/ BOOLEAN InitialState);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwCreateEvent(
- /*OUT*/ PHANDLE EventHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*IN*/ BOOLEAN ManualReset,
- /*IN*/ BOOLEAN InitialState);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwCreateFile(
- /*OUT*/ PHANDLE FileHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*IN*/ PLARGE_INTEGER AllocationSize /*OPTIONAL*/,
- /*IN*/ ULONG FileAttributes,
- /*IN*/ ULONG ShareAccess,
- /*IN*/ ULONG CreateDisposition,
- /*IN*/ ULONG CreateOptions,
- /*IN*/ PVOID EaBuffer /*OPTIONAL*/,
- /*IN*/ ULONG EaLength);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwCreateKey(
- /*OUT*/ PHANDLE KeyHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*IN*/ ULONG TitleIndex,
- /*IN*/ PUNICODE_STRING Class /*OPTIONAL*/,
- /*IN*/ ULONG CreateOptions,
- /*OUT*/ PULONG Disposition /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwCreateTimer(
- /*OUT*/ PHANDLE TimerHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes /*OPTIONAL*/,
- /*IN*/ TIMER_TYPE TimerType);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwDeleteKey(
- /*IN*/ HANDLE KeyHandle);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwDeleteValueKey(
- /*IN*/ HANDLE KeyHandle,
- /*IN*/ PUNICODE_STRING ValueName);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-NtDeviceIoControlFile(
- /*IN*/ HANDLE DeviceHandle,
- /*IN*/ HANDLE Event /*OPTIONAL*/,
- /*IN*/ PIO_APC_ROUTINE UserApcRoutine /*OPTIONAL*/,
- /*IN*/ PVOID UserApcContext /*OPTIONAL*/,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*IN*/ ULONG IoControlCode,
- /*IN*/ PVOID InputBuffer,
- /*IN*/ ULONG InputBufferSize,
- /*OUT*/ PVOID OutputBuffer,
- /*IN*/ ULONG OutputBufferSize);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwDeviceIoControlFile(
- /*IN*/ HANDLE DeviceHandle,
- /*IN*/ HANDLE Event /*OPTIONAL*/,
- /*IN*/ PIO_APC_ROUTINE UserApcRoutine /*OPTIONAL*/,
- /*IN*/ PVOID UserApcContext /*OPTIONAL*/,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*IN*/ ULONG IoControlCode,
- /*IN*/ PVOID InputBuffer,
- /*IN*/ ULONG InputBufferSize,
- /*OUT*/ PVOID OutputBuffer,
- /*IN*/ ULONG OutputBufferSize);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwEnumerateKey(
- /*IN*/ HANDLE KeyHandle,
- /*IN*/ ULONG Index,
- /*IN*/ KEY_INFORMATION_CLASS KeyInformationClass,
- /*OUT*/ PVOID KeyInformation,
- /*IN*/ ULONG Length,
- /*OUT*/ PULONG ResultLength);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwEnumerateValueKey(
- /*IN*/ HANDLE KeyHandle,
- /*IN*/ ULONG Index,
- /*IN*/ KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
- /*OUT*/ PVOID KeyValueInformation,
- /*IN*/ ULONG Length,
- /*OUT*/ PULONG ResultLength);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwFlushKey(
- /*IN*/ HANDLE KeyHandle);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwMakeTemporaryObject(
- /*IN*/ HANDLE Handle);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-NtMapViewOfSection(
- /*IN*/ HANDLE SectionHandle,
- /*IN*/ HANDLE ProcessHandle,
- /*IN OUT*/ PVOID *BaseAddress,
- /*IN*/ ULONG ZeroBits,
- /*IN*/ ULONG CommitSize,
- /*IN OUT*/ PLARGE_INTEGER SectionOffset /*OPTIONAL*/,
- /*IN OUT*/ PSIZE_T ViewSize,
- /*IN*/ SECTION_INHERIT InheritDisposition,
- /*IN*/ ULONG AllocationType,
- /*IN*/ ULONG Protect);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwMapViewOfSection(
- /*IN*/ HANDLE SectionHandle,
- /*IN*/ HANDLE ProcessHandle,
- /*IN OUT*/ PVOID *BaseAddress,
- /*IN*/ ULONG ZeroBits,
- /*IN*/ ULONG CommitSize,
- /*IN OUT*/ PLARGE_INTEGER SectionOffset /*OPTIONAL*/,
- /*IN OUT*/ PSIZE_T ViewSize,
- /*IN*/ SECTION_INHERIT InheritDisposition,
- /*IN*/ ULONG AllocationType,
- /*IN*/ ULONG Protect);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-NtOpenFile(
- /*OUT*/ PHANDLE FileHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*IN*/ ULONG ShareAccess,
- /*IN*/ ULONG OpenOptions);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwOpenFile(
- /*OUT*/ PHANDLE FileHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*IN*/ ULONG ShareAccess,
- /*IN*/ ULONG OpenOptions);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwOpenKey(
- /*OUT*/ PHANDLE KeyHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwOpenSection(
- /*OUT*/ PHANDLE SectionHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwOpenSymbolicLinkObject(
- /*OUT*/ PHANDLE LinkHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwOpenTimer(
- /*OUT*/ PHANDLE TimerHandle,
- /*IN*/ ACCESS_MASK DesiredAccess,
- /*IN*/ POBJECT_ATTRIBUTES ObjectAttributes);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwQueryInformationFile(
- /*IN*/ HANDLE FileHandle,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*OUT*/ PVOID FileInformation,
- /*IN*/ ULONG Length,
- /*IN*/ FILE_INFORMATION_CLASS FileInformationClass);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwQueryKey(
- /*IN*/ HANDLE KeyHandle,
- /*IN*/ KEY_INFORMATION_CLASS KeyInformationClass,
- /*OUT*/ PVOID KeyInformation,
- /*IN*/ ULONG Length,
- /*OUT*/ PULONG ResultLength);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwQuerySymbolicLinkObject(
- /*IN*/ HANDLE LinkHandle,
- /*IN OUT*/ PUNICODE_STRING LinkTarget,
- /*OUT*/ PULONG ReturnedLength /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwQueryValueKey(
- /*IN*/ HANDLE KeyHandle,
- /*IN*/ PUNICODE_STRING ValueName,
- /*IN*/ KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
- /*OUT*/ PVOID KeyValueInformation,
- /*IN*/ ULONG Length,
- /*OUT*/ PULONG ResultLength);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-NtReadFile(
- /*IN*/ HANDLE FileHandle,
- /*IN*/ HANDLE Event /*OPTIONAL*/,
- /*IN*/ PIO_APC_ROUTINE ApcRoutine /*OPTIONAL*/,
- /*IN*/ PVOID ApcContext /*OPTIONAL*/,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*OUT*/ PVOID Buffer,
- /*IN*/ ULONG Length,
- /*IN*/ PLARGE_INTEGER ByteOffset /*OPTIONAL*/,
- /*IN*/ PULONG Key /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwReadFile(
- /*IN*/ HANDLE FileHandle,
- /*IN*/ HANDLE Event /*OPTIONAL*/,
- /*IN*/ PIO_APC_ROUTINE ApcRoutine /*OPTIONAL*/,
- /*IN*/ PVOID ApcContext /*OPTIONAL*/,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*OUT*/ PVOID Buffer,
- /*IN*/ ULONG Length,
- /*IN*/ PLARGE_INTEGER ByteOffset /*OPTIONAL*/,
- /*IN*/ PULONG Key /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-NtSetEvent(
- /*IN*/ HANDLE EventHandle,
- /*IN*/ PULONG NumberOfThreadsReleased);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwSetEvent(
- /*IN*/ HANDLE EventHandle,
- /*IN*/ PULONG NumberOfThreadsReleased);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwSetInformationFile(
- /*IN*/ HANDLE FileHandle,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*IN*/ PVOID FileInformation,
- /*IN*/ ULONG Length,
- /*IN*/ FILE_INFORMATION_CLASS FileInformationClass);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwSetInformationThread(
- /*IN*/ HANDLE ThreadHandle,
- /*IN*/ THREADINFOCLASS ThreadInformationClass,
- /*IN*/ PVOID ThreadInformation,
- /*IN*/ ULONG ThreadInformationLength);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwSetTimer(
- /*IN*/ HANDLE TimerHandle,
- /*IN*/ PLARGE_INTEGER DueTime,
- /*IN*/ PTIMER_APC_ROUTINE TimerApcRoutine /*OPTIONAL*/,
- /*IN*/ PVOID TimerContext /*OPTIONAL*/,
- /*IN*/ BOOLEAN WakeTimer,
- /*IN*/ LONG Period /*OPTIONAL*/,
- /*OUT*/ PBOOLEAN PreviousState /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwSetValueKey(
- /*IN*/ HANDLE KeyHandle,
- /*IN*/ PUNICODE_STRING ValueName,
- /*IN*/ ULONG TitleIndex /*OPTIONAL*/,
- /*IN*/ ULONG Type,
- /*IN*/ PVOID Data,
- /*IN*/ ULONG DataSize);
-
-/* [Nt|Zw]MapViewOfSection.InheritDisposition constants */
-#define AT_EXTENDABLE_FILE 0x00002000
-#define SEC_NO_CHANGE 0x00400000
-#define AT_RESERVED 0x20000000
-#define AT_ROUND_TO_PAGE 0x40000000
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-NtUnmapViewOfSection(
- /*IN*/ HANDLE ProcessHandle,
- /*IN*/ PVOID BaseAddress);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwUnmapViewOfSection(
- /*IN*/ HANDLE ProcessHandle,
- /*IN*/ PVOID BaseAddress);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-NtWaitForSingleObject(
- /*IN*/ HANDLE Object,
- /*IN*/ BOOLEAN Alertable,
- /*IN*/ PLARGE_INTEGER Time);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwWaitForSingleObject(
- /*IN*/ HANDLE Object,
- /*IN*/ BOOLEAN Alertable,
- /*IN*/ PLARGE_INTEGER Time);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-NtWriteFile(
- /*IN*/ HANDLE FileHandle,
- /*IN*/ HANDLE Event /*OPTIONAL*/,
- /*IN*/ PIO_APC_ROUTINE ApcRoutine /*OPTIONAL*/,
- /*IN*/ PVOID ApcContext /*OPTIONAL*/,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG Length,
- /*IN*/ PLARGE_INTEGER ByteOffset /*OPTIONAL*/,
- /*IN*/ PULONG Key /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ZwWriteFile(
- /*IN*/ HANDLE FileHandle,
- /*IN*/ HANDLE Event /*OPTIONAL*/,
- /*IN*/ PIO_APC_ROUTINE ApcRoutine /*OPTIONAL*/,
- /*IN*/ PVOID ApcContext /*OPTIONAL*/,
- /*OUT*/ PIO_STATUS_BLOCK IoStatusBlock,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG Length,
- /*IN*/ PLARGE_INTEGER ByteOffset /*OPTIONAL*/,
- /*IN*/ PULONG Key /*OPTIONAL*/);
-
-
-
-/** Power management support routines **/
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-PoCallDriver(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN OUT*/ PIRP Irp);
-
-NTOSAPI
-PULONG
-DDKAPI
-PoRegisterDeviceForIdleDetection(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ ULONG ConservationIdleTime,
- /*IN*/ ULONG PerformanceIdleTime,
- /*IN*/ DEVICE_POWER_STATE State);
-
-NTOSAPI
-PVOID
-DDKAPI
-PoRegisterSystemState(
- /*IN*/ PVOID StateHandle,
- /*IN*/ EXECUTION_STATE Flags);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-PoRequestPowerIrp(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ UCHAR MinorFunction,
- /*IN*/ POWER_STATE PowerState,
- /*IN*/ PREQUEST_POWER_COMPLETE CompletionFunction,
- /*IN*/ PVOID Context,
- /*OUT*/ PIRP *Irp /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-PoRequestShutdownEvent(
- /*OUT*/ PVOID *Event);
-
-NTOSAPI
-VOID
-DDKAPI
-PoSetDeviceBusy(
- PULONG IdlePointer);
-
-NTOSAPI
-POWER_STATE
-DDKAPI
-PoSetPowerState(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ POWER_STATE_TYPE Type,
- /*IN*/ POWER_STATE State);
-
-NTOSAPI
-VOID
-DDKAPI
-PoSetSystemState(
- /*IN*/ EXECUTION_STATE Flags);
-
-NTOSAPI
-VOID
-DDKAPI
-PoStartNextPowerIrp(
- /*IN*/ PIRP Irp);
-
-NTOSAPI
-VOID
-DDKAPI
-PoUnregisterSystemState(
- /*IN*/ PVOID StateHandle);
-
-
-
-/** WMI library support routines **/
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-WmiCompleteRequest(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ PIRP Irp,
- /*IN*/ NTSTATUS Status,
- /*IN*/ ULONG BufferUsed,
- /*IN*/ CCHAR PriorityBoost);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-WmiFireEvent(
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ LPGUID Guid,
- /*IN*/ ULONG InstanceIndex,
- /*IN*/ ULONG EventDataSize,
- /*IN*/ PVOID EventData);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-WmiQueryTraceInformation(
- /*IN*/ TRACE_INFORMATION_CLASS TraceInformationClass,
- /*OUT*/ PVOID TraceInformation,
- /*IN*/ ULONG TraceInformationLength,
- /*OUT*/ PULONG RequiredLength /*OPTIONAL*/,
- /*IN*/ PVOID Buffer /*OPTIONAL*/);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-WmiSystemControl(
- /*IN*/ PWMILIB_CONTEXT WmiLibInfo,
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ PIRP Irp,
- /*OUT*/ PSYSCTL_IRP_DISPOSITION IrpDisposition);
-
-NTOSAPI
-NTSTATUS
-DDKCDECLAPI
-WmiTraceMessage(
- /*IN*/ TRACEHANDLE LoggerHandle,
- /*IN*/ ULONG MessageFlags,
- /*IN*/ LPGUID MessageGuid,
- /*IN*/ USHORT MessageNumber,
- /*IN*/ ...);
-
-#if 0
-/* FIXME: Get va_list from where? */
-NTOSAPI
-NTSTATUS
-DDKCDECLAPI
-WmiTraceMessageVa(
- /*IN*/ TRACEHANDLE LoggerHandle,
- /*IN*/ ULONG MessageFlags,
- /*IN*/ LPGUID MessageGuid,
- /*IN*/ USHORT MessageNumber,
- /*IN*/ va_list MessageArgList);
-#endif
-
-
-/** Kernel debugger routines **/
-
-NTOSAPI
-VOID
-DDKAPI
-KdDisableDebugger(
- VOID);
-
-NTOSAPI
-VOID
-DDKAPI
-KdEnableDebugger(
- VOID);
-
-NTOSAPI
-VOID
-DDKAPI
-DbgBreakPoint(
- VOID);
-
-NTOSAPI
-VOID
-DDKAPI
-DbgBreakPointWithStatus(
- /*IN*/ ULONG Status);
-
-NTOSAPI
-ULONG
-DDKCDECLAPI
-DbgPrint(
- /*IN*/ PCH Format,
- /*IN*/ ...);
-
-NTOSAPI
-ULONG
-DDKCDECLAPI
-DbgPrintEx(
- /*IN*/ ULONG ComponentId,
- /*IN*/ ULONG Level,
- /*IN*/ PCH Format,
- /*IN*/ ...);
-
-NTOSAPI
-ULONG
-DDKCDECLAPI
-DbgPrintReturnControlC(
- /*IN*/ PCH Format,
- /*IN*/ ...);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-DbgQueryDebugFilterState(
- /*IN*/ ULONG ComponentId,
- /*IN*/ ULONG Level);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-DbgSetDebugFilterState(
- /*IN*/ ULONG ComponentId,
- /*IN*/ ULONG Level,
- /*IN*/ BOOLEAN State);
-
-#ifdef DBG
-
-#define KdPrint(_x_) DbgPrint _x_
-#define KdPrintEx(_x_) DbgPrintEx _x_
-#define KdBreakPoint() DbgBreakPoint()
-#define KdBreakPointWithStatus(s) DbgBreakPointWithStatus(s)
-
-#else /* !DBG */
-
-#define KdPrint(_x_)
-#define KdPrintEx(_x_)
-#define KdBreakPoint()
-#define KdBreakPointWithStatus(s)
-
-#endif /* !DBG */
-
-extern NTOSAPI PBOOLEAN KdDebuggerNotPresent;
-extern NTOSAPI PBOOLEAN KdDebuggerEnabled;
-#define KD_DEBUGGER_ENABLED *KdDebuggerEnabled
-#define KD_DEBUGGER_NOT_PRESENT *KdDebuggerNotPresent
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __WINDDK_H */
diff --git a/winsup/w32api/include/ddk/winnt4.h b/winsup/w32api/include/ddk/winnt4.h
deleted file mode 100644
index b7f6179..0000000
--- a/winsup/w32api/include/ddk/winnt4.h
+++ /dev/null
@@ -1,623 +0,0 @@
-/*
- * winnt4.h
- *
- * Definitions only used in Windows NT 4.0 and earlier versions
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __WINNT4_H
-#define __WINNT4_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct _ZONE_SEGMENT_HEADER {
- SINGLE_LIST_ENTRY SegmentList;
- PVOID Reserved;
-} ZONE_SEGMENT_HEADER, *PZONE_SEGMENT_HEADER;
-
-typedef struct _ZONE_HEADER {
- SINGLE_LIST_ENTRY FreeList;
- SINGLE_LIST_ENTRY SegmentList;
- ULONG BlockSize;
- ULONG TotalSegmentSize;
-} ZONE_HEADER, *PZONE_HEADER;
-
-static __inline PVOID
-ExAllocateFromZone(
- /*IN*/ PZONE_HEADER Zone)
-{
- if (Zone->FreeList.Next)
- Zone->FreeList.Next = Zone->FreeList.Next->Next;
- return (PVOID) Zone->FreeList.Next;
-}
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ExExtendZone(
- /*IN*/ PZONE_HEADER Zone,
- /*IN*/ PVOID Segment,
- /*IN*/ ULONG SegmentSize);
-
-static __inline PVOID
-ExFreeToZone(
- /*IN*/ PZONE_HEADER Zone,
- /*IN*/ PVOID Block)
-{
- ((PSINGLE_LIST_ENTRY) Block)->Next = Zone->FreeList.Next;
- Zone->FreeList.Next = ((PSINGLE_LIST_ENTRY) Block);
- return ((PSINGLE_LIST_ENTRY) Block)->Next;
-}
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ExInitializeZone(
- /*IN*/ PZONE_HEADER Zone,
- /*IN*/ ULONG BlockSize,
- /*IN*/ PVOID InitialSegment,
- /*IN*/ ULONG InitialSegmentSize);
-
-/*
- * PVOID
- * ExInterlockedAllocateFromZone(
- * IN PZONE_HEADER Zone,
- * IN PKSPIN_LOCK Lock)
- */
-#define ExInterlockedAllocateFromZone(Zone, \
- Lock) \
- ((PVOID) ExInterlockedPopEntryList(&Zone->FreeList, Lock))
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-ExInterlockedExtendZone(
- /*IN*/ PZONE_HEADER Zone,
- /*IN*/ PVOID Segment,
- /*IN*/ ULONG SegmentSize,
- /*IN*/ PKSPIN_LOCK Lock);
-
-NTOSAPI
-PVOID
-DDKAPI
-ExInterlockedFreeToZone(
- /*IN*/ PZONE_HEADER Zone,
- /*IN*/ PVOID Block,
- /*IN*/ PKSPIN_LOCK Lock);
-
-/*
- * VOID
- * ExInitializeWorkItem(
- * IN PWORK_QUEUE_ITEM Item,
- * IN PWORKER_THREAD_ROUTINE Routine,
- * IN PVOID Context)
- */
-#define ExInitializeWorkItem(Item, \
- Routine, \
- Context) \
-{ \
- (Item)->WorkerRoutine = Routine; \
- (Item)->Parameter = Context; \
- (Item)->List.Flink = NULL; \
-}
-
-/*
- * BOOLEAN
- * ExIsFullZone(
- * IN PZONE_HEADER Zone)
- */
-#define ExIsFullZone(Zone) \
- ((Zone)->FreeList.Next == (PSINGLE_LIST_ENTRY) NULL)
-
-NTOSAPI
-VOID
-DDKAPI
-ExQueueWorkItem(
- /*IN*/ PWORK_QUEUE_ITEM WorkItem,
- /*IN*/ WORK_QUEUE_TYPE QueueType);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-ExIsObjectInFirstZoneSegment(
- /*IN*/ PZONE_HEADER Zone,
- /*IN*/ PVOID Object);
-
-NTOSAPI
-VOID
-DDKAPI
-ExReleaseResource(
- /*IN*/ PERESOURCE Resource);
-
-#define ExAcquireResourceExclusive ExAcquireResourceExclusiveLite
-#define ExAcquireResourceShared ExAcquireResourceSharedLite
-#define ExConvertExclusiveToShared ExConvertExclusiveToSharedLite
-#define ExDeleteResource ExDeleteResourceLite
-#define ExInitializeResource ExInitializeResourceLite
-#define ExIsResourceAcquiredExclusive ExIsResourceAcquiredExclusiveLite
-#define ExIsResourceAcquiredShared ExIsResourceAcquiredSharedLite
-#define ExIsResourceAcquired ExIsResourceAcquiredSharedLite
-#define ExReleaseResourceForThread ExReleaseResourceForThreadLite
-
-NTOSAPI
-INTERLOCKED_RESULT
-DDKAPI
-ExInterlockedDecrementLong(
- /*IN*/ PLONG Addend,
- /*IN*/ PKSPIN_LOCK Lock);
-
-NTOSAPI
-ULONG
-DDKAPI
-ExInterlockedExchangeUlong(
- /*IN*/ PULONG Target,
- /*IN*/ ULONG Value,
- /*IN*/ PKSPIN_LOCK Lock);
-
-NTOSAPI
-INTERLOCKED_RESULT
-DDKAPI
-ExInterlockedIncrementLong(
- /*IN*/ PLONG Addend,
- /*IN*/ PKSPIN_LOCK Lock);
-
-NTOSAPI
-PVOID
-DDKAPI
-HalAllocateCommonBuffer(
- /*IN*/ PADAPTER_OBJECT AdapterObject,
- /*IN*/ ULONG Length,
- /*OUT*/ PPHYSICAL_ADDRESS LogicalAddress,
- /*IN*/ BOOLEAN CacheEnabled);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-HalAssignSlotResources(
- /*IN*/ PUNICODE_STRING RegistryPath,
- /*IN*/ PUNICODE_STRING DriverClassName,
- /*IN*/ PDRIVER_OBJECT DriverObject,
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ INTERFACE_TYPE BusType,
- /*IN*/ ULONG BusNumber,
- /*IN*/ ULONG SlotNumber,
- /*IN OUT*/ PCM_RESOURCE_LIST *AllocatedResources);
-
-NTOSAPI
-VOID
-DDKAPI
-HalFreeCommonBuffer(
- /*IN*/ PADAPTER_OBJECT AdapterObject,
- /*IN*/ ULONG Length,
- /*IN*/ PHYSICAL_ADDRESS LogicalAddress,
- /*IN*/ PVOID VirtualAddress,
- /*IN*/ BOOLEAN CacheEnabled);
-
-NTOSAPI
-PADAPTER_OBJECT
-DDKAPI
-HalGetAdapter(
- /*IN*/ PDEVICE_DESCRIPTION DeviceDescription,
- /*IN OUT*/ PULONG NumberOfMapRegisters);
-
-NTOSAPI
-ULONG
-DDKAPI
-HalGetBusData(
- /*IN*/ BUS_DATA_TYPE BusDataType,
- /*IN*/ ULONG BusNumber,
- /*IN*/ ULONG SlotNumber,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG Length);
-
-NTOSAPI
-ULONG
-DDKAPI
-HalGetBusDataByOffset(
- /*IN*/ BUS_DATA_TYPE BusDataType,
- /*IN*/ ULONG BusNumber,
- /*IN*/ ULONG SlotNumber,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG Offset,
- /*IN*/ ULONG Length);
-
-NTOSAPI
-ULONG
-DDKAPI
-HalGetDmaAlignmentRequirement(
- VOID);
-
-NTOSAPI
-ULONG
-DDKAPI
-HalGetInterruptVector(
- /*IN*/ INTERFACE_TYPE InterfaceType,
- /*IN*/ ULONG BusNumber,
- /*IN*/ ULONG BusInterruptLevel,
- /*IN*/ ULONG BusInterruptVector,
- /*OUT*/ PKIRQL Irql,
- /*OUT*/ PKAFFINITY Affinity);
-
-NTOSAPI
-ULONG
-DDKAPI
-HalReadDmaCounter(
- /*IN*/ PADAPTER_OBJECT AdapterObject);
-
-NTOSAPI
-ULONG
-DDKAPI
-HalSetBusData(
- /*IN*/ BUS_DATA_TYPE BusDataType,
- /*IN*/ ULONG BusNumber,
- /*IN*/ ULONG SlotNumber,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG Length);
-
-NTOSAPI
-ULONG
-DDKAPI
-HalSetBusDataByOffset(
- /*IN*/ BUS_DATA_TYPE BusDataType,
- /*IN*/ ULONG BusNumber,
- /*IN*/ ULONG SlotNumber,
- /*IN*/ PVOID Buffer,
- /*IN*/ ULONG Offset,
- /*IN*/ ULONG Length);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-HalTranslateBusAddress(
- /*IN*/ INTERFACE_TYPE InterfaceType,
- /*IN*/ ULONG BusNumber,
- /*IN*/ PHYSICAL_ADDRESS BusAddress,
- /*IN OUT*/ PULONG AddressSpace,
- /*OUT*/ PPHYSICAL_ADDRESS TranslatedAddress);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoAllocateAdapterChannel(
- /*IN*/ PADAPTER_OBJECT AdapterObject,
- /*IN*/ PDEVICE_OBJECT DeviceObject,
- /*IN*/ ULONG NumberOfMapRegisters,
- /*IN*/ PDRIVER_CONTROL ExecutionRoutine,
- /*IN*/ PVOID Context);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoAssignResources(
- /*IN*/ PUNICODE_STRING RegistryPath,
- /*IN*/ PUNICODE_STRING DriverClassName /*OPTIONAL*/,
- /*IN*/ PDRIVER_OBJECT DriverObject,
- /*IN*/ PDEVICE_OBJECT DeviceObject /*OPTIONAL*/,
- /*IN*/ PIO_RESOURCE_REQUIREMENTS_LIST RequestedResources,
- /*IN OUT*/ PCM_RESOURCE_LIST *AllocatedResources);
-
-NTOSAPI
-NTSTATUS
-DDKAPI
-IoAttachDeviceByPointer(
- /*IN*/ PDEVICE_OBJECT SourceDevice,
- /*IN*/ PDEVICE_OBJECT TargetDevice);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-IoFlushAdapterBuffers(
- /*IN*/ PADAPTER_OBJECT AdapterObject,
- /*IN*/ PMDL Mdl,
- /*IN*/ PVOID MapRegisterBase,
- /*IN*/ PVOID CurrentVa,
- /*IN*/ ULONG Length,
- /*IN*/ BOOLEAN WriteToDevice);
-
-NTOSAPI
-VOID
-DDKAPI
-IoFreeAdapterChannel(
- /*IN*/ PADAPTER_OBJECT AdapterObject);
-
-NTOSAPI
-VOID
-DDKAPI
-IoFreeMapRegisters(
- /*IN*/ PADAPTER_OBJECT AdapterObject,
- /*IN*/ PVOID MapRegisterBase,
- /*IN*/ ULONG NumberOfMapRegisters);
-
-NTOSAPI
-PHYSICAL_ADDRESS
-DDKAPI
-IoMapTransfer(
- /*IN*/ PADAPTER_OBJECT AdapterObject,
- /*IN*/ PMDL Mdl,
- /*IN*/ PVOID MapRegisterBase,
- /*IN*/ PVOID CurrentVa,
- /*IN OUT*/ PULONG Length,
- /*IN*/ BOOLEAN WriteToDevice);
-
-NTOSAPI
-PMDL
-DDKAPI
-MmCreateMdl(
- /*IN*/ PMDL MemoryDescriptorList /*OPTIONAL*/,
- /*IN*/ PVOID Base,
- /*IN*/ SIZE_T Length);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-MmIsNonPagedSystemAddressValid(
- /*IN*/ PVOID VirtualAddress);
-
-NTOSAPI
-LARGE_INTEGER
-DDKAPI
-RtlEnlargedIntegerMultiply(
- /*IN*/ LONG Multiplicand,
- /*IN*/ LONG Multiplier);
-
-NTOSAPI
-ULONG
-DDKAPI
-RtlEnlargedUnsignedDivide(
- /*IN*/ ULARGE_INTEGER Dividend,
- /*IN*/ ULONG Divisor,
- /*IN OUT*/ PULONG Remainder);
-
-NTOSAPI
-LARGE_INTEGER
-DDKAPI
-RtlEnlargedUnsignedMultiply(
- /*IN*/ ULONG Multiplicand,
- /*IN*/ ULONG Multiplier);
-
-NTOSAPI
-LARGE_INTEGER
-DDKAPI
-RtlExtendedIntegerMultiply(
- /*IN*/ LARGE_INTEGER Multiplicand,
- /*IN*/ LONG Multiplier);
-
-NTOSAPI
-LARGE_INTEGER
-DDKAPI
-RtlExtendedLargeIntegerDivide(
- /*IN*/ LARGE_INTEGER Dividend,
- /*IN*/ ULONG Divisor,
- /*IN OUT*/ PULONG Remainder);
-
-NTOSAPI
-LARGE_INTEGER
-DDKAPI
-RtlExtendedMagicDivide(
- /*IN*/ LARGE_INTEGER Dividend,
- /*IN*/ LARGE_INTEGER MagicDivisor,
- /*IN*/ CCHAR ShiftCount);
-
-NTOSAPI
-LARGE_INTEGER
-DDKAPI
-RtlLargeIntegerAdd(
- /*IN*/ LARGE_INTEGER Addend1,
- /*IN*/ LARGE_INTEGER Addend2);
-
-NTOSAPI
-VOID
-DDKAPI
-RtlLargeIntegerAnd(
- /*IN OUT*/ LARGE_INTEGER Result,
- /*IN*/ LARGE_INTEGER Source,
- /*IN*/ LARGE_INTEGER Mask);
-
-NTOSAPI
-LARGE_INTEGER
-DDKAPI
-RtlLargeIntegerArithmeticShift(
- /*IN*/ LARGE_INTEGER LargeInteger,
- /*IN*/ CCHAR ShiftCount);
-
-NTOSAPI
-LARGE_INTEGER
-DDKAPI
-RtlLargeIntegerDivide(
- /*IN*/ LARGE_INTEGER Dividend,
- /*IN*/ LARGE_INTEGER Divisor,
- /*IN OUT*/ PLARGE_INTEGER Remainder);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-RtlLargeIntegerEqualTo(
- /*IN*/ LARGE_INTEGER Operand1,
- /*IN*/ LARGE_INTEGER Operand2);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-RtlLargeIntegerEqualToZero(
- /*IN*/ LARGE_INTEGER Operand);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-RtlLargeIntegerGreaterOrEqualToZero(
- /*IN*/ LARGE_INTEGER Operand);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-RtlLargeIntegerGreaterThan(
- /*IN*/ LARGE_INTEGER Operand1,
- /*IN*/ LARGE_INTEGER Operand2);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-RtlLargeIntegerGreaterThanOrEqualTo(
- /*IN*/ LARGE_INTEGER Operand1,
- /*IN*/ LARGE_INTEGER Operand2);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-RtlLargeIntegerGreaterThanZero(
- /*IN*/ LARGE_INTEGER Operand);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-RtlLargeIntegerLessOrEqualToZero(
- /*IN*/ LARGE_INTEGER Operand);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-RtlLargeIntegerLessThan(
- /*IN*/ LARGE_INTEGER Operand1,
- /*IN*/ LARGE_INTEGER Operand2);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-RtlLargeIntegerLessThanOrEqualTo(
- /*IN*/ LARGE_INTEGER Operand1,
- /*IN*/ LARGE_INTEGER Operand2);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-RtlLargeIntegerLessThanZero(
- /*IN*/ LARGE_INTEGER Operand);
-
-NTOSAPI
-LARGE_INTEGER
-DDKAPI
-RtlLargeIntegerNegate(
- /*IN*/ LARGE_INTEGER Subtrahend);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-RtlLargeIntegerNotEqualTo(
- /*IN*/ LARGE_INTEGER Operand1,
- /*IN*/ LARGE_INTEGER Operand2);
-
-NTOSAPI
-BOOLEAN
-DDKAPI
-RtlLargeIntegerNotEqualToZero(
- /*IN*/ LARGE_INTEGER Operand);
-
-NTOSAPI
-LARGE_INTEGER
-DDKAPI
-RtlLargeIntegerShiftLeft(
- /*IN*/ LARGE_INTEGER LargeInteger,
- /*IN*/ CCHAR ShiftCount);
-
-NTOSAPI
-LARGE_INTEGER
-DDKAPI
-RtlLargeIntegerShiftRight(
- /*IN*/ LARGE_INTEGER LargeInteger,
- /*IN*/ CCHAR ShiftCount);
-
-NTOSAPI
-LARGE_INTEGER
-DDKAPI
-RtlLargeIntegerSubtract(
- /*IN*/ LARGE_INTEGER Minuend,
- /*IN*/ LARGE_INTEGER Subtrahend);
-
-
-/*
- * ULONG
- * COMPUTE_PAGES_SPANNED(
- * IN PVOID Va,
- * IN ULONG Size)
- */
-#define COMPUTE_PAGES_SPANNED(Va, \
- Size) \
- (ADDRESS_AND_SIZE_TO_SPAN_PAGES(Va, Size))
-
-
-/*
-** Architecture specific functions
-*/
-
-#ifdef _X86_
-
-NTOSAPI
-INTERLOCKED_RESULT
-DDKAPI
-Exi386InterlockedIncrementLong(
- /*IN*/ PLONG Addend);
-
-NTOSAPI
-INTERLOCKED_RESULT
-DDKFASTAPI
-Exfi386InterlockedIncrementLong(
- /*IN*/ PLONG Addend);
-
-NTOSAPI
-INTERLOCKED_RESULT
-DDKAPI
-Exi386InterlockedDecrementLong(
- /*IN*/ PLONG Addend);
-
-NTOSAPI
-INTERLOCKED_RESULT
-DDKFASTAPI
-Exfi386InterlockedDecrementLong(
- /*IN*/ PLONG Addend);
-
-NTOSAPI
-ULONG
-DDKAPI
-Exi386InterlockedExchangeUlong(
- /*IN*/ PULONG Target,
- /*IN*/ ULONG Value);
-
-NTOSAPI
-ULONG
-DDKFASTAPI
-Exfi386InterlockedExchangeUlong(
- /*IN*/ PULONG Target,
- /*IN*/ ULONG Value);
-
-#define ExInterlockedIncrementLong(Addend,Lock) Exfi386InterlockedIncrementLong(Addend)
-#define ExInterlockedDecrementLong(Addend,Lock) Exfi386InterlockedDecrementLong(Addend)
-#define ExInterlockedExchangeUlong(Target, Value, Lock) Exfi386InterlockedExchangeUlong(Target, Value)
-
-#endif /* _X86_ */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __WINNT4_H */
diff --git a/winsup/w32api/include/ddk/winxp.h b/winsup/w32api/include/ddk/winxp.h
deleted file mode 100644
index 28e34a8..0000000
--- a/winsup/w32api/include/ddk/winxp.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * winxp.h
- *
- * Definitions only used in Windows XP and earlier versions
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __WINXP_H
-#define __WINXP_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __WINXP_H */
diff --git a/winsup/w32api/include/ddk/ws2san.h b/winsup/w32api/include/ddk/ws2san.h
deleted file mode 100644
index dbb65a4..0000000
--- a/winsup/w32api/include/ddk/ws2san.h
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * ws2san.h
- *
- * WinSock Direct (SAN) support
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __WS2SAN_H
-#define __WS2SAN_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <winsock2.h>
-#include "ntddk.h"
-
-
-#define WSPAPI STDCALL
-
-/* FIXME: Unknown definitions */
-typedef PVOID LPWSPDATA;
-typedef PDWORD LPWSATHREADID;
-typedef PVOID LPWSPPROC_TABLE;
-typedef struct _WSPUPCALLTABLEEX WSPUPCALLTABLEEX;
-typedef WSPUPCALLTABLEEX *LPWSPUPCALLTABLEEX;
-
-#define SO_MAX_RDMA_SIZE 0x700D
-#define SO_RDMA_THRESHOLD_SIZE 0x700E
-
-#define WSAID_REGISTERMEMORY \
- {0xC0B422F5, 0xF58C, 0x11d1, {0xAD, 0x6C, 0x00, 0xC0, 0x4F, 0xA3, 0x4A, 0x2D}}
-
-#define WSAID_DEREGISTERMEMORY \
- {0xC0B422F6, 0xF58C, 0x11d1, {0xAD, 0x6C, 0x00, 0xC0, 0x4F, 0xA3, 0x4A, 0x2D}}
-
-#define WSAID_REGISTERRDMAMEMORY \
- {0xC0B422F7, 0xF58C, 0x11d1, {0xAD, 0x6C, 0x00, 0xC0, 0x4F, 0xA3, 0x4A, 0x2D}}
-
-#define WSAID_DEREGISTERRDMAMEMORY \
- {0xC0B422F8, 0xF58C, 0x11d1, {0xAD, 0x6C, 0x00, 0xC0, 0x4F, 0xA3, 0x4A, 0x2D}}
-
-#define WSAID_RDMAWRITE \
- {0xC0B422F9, 0xF58C, 0x11d1, {0xAD, 0x6C, 0x00, 0xC0, 0x4F, 0xA3, 0x4A, 0x2D}}
-
-#define WSAID_RDMAREAD \
- {0xC0B422FA, 0xF58C, 0x11d1, {0xAD, 0x6C, 0x00, 0xC0, 0x4F, 0xA3, 0x4A, 0x2D}}
-
-#define WSAID_MEMORYREGISTRATIONCACHECALLBACK \
- {0xE5DA4AF8, 0xD824, 0x48CD, {0xA7, 0x99, 0x63, 0x37, 0xA9, 0x8E, 0xD2, 0xAF}}
-
-typedef struct _WSABUFEX {
- u_long len;
- char FAR *buf;
- HANDLE handle;
-} WSABUFEX, FAR * LPWSABUFEX;
-
-#if 0
-typedef struct _WSPUPCALLTABLEEX {
- LPWPUCLOSEEVENT lpWPUCloseEvent;
- LPWPUCLOSESOCKETHANDLE lpWPUCloseSocketHandle;
- LPWPUCREATEEVENT lpWPUCreateEvent;
- LPWPUCREATESOCKETHANDLE lpWPUCreateSocketHandle;
- LPWPUFDISSET lpWPUFDIsSet;
- LPWPUGETPROVIDERPATH lpWPUGetProviderPath;
- LPWPUMODIFYIFSHANDLE lpWPUModifyIFSHandle;
- LPWPUPOSTMESSAGE lpWPUPostMessage;
- LPWPUQUERYBLOCKINGCALLBACK lpWPUQueryBlockingCallback;
- LPWPUQUERYSOCKETHANDLECONTEXT lpWPUQuerySocketHandleContext;
- LPWPUQUEUEAPC lpWPUQueueApc;
- LPWPURESETEVENT lpWPUResetEvent;
- LPWPUSETEVENT lpWPUSetEvent;
- LPWPUOPENCURRENTTHREAD lpWPUOpenCurrentThread;
- LPWPUCLOSETHREAD lpWPUCloseThread;
- LPWPUCOMPLETEOVERLAPPEDREQUEST lpWPUCompleteOverlappedRequest;
-} WSPUPCALLTABLEEX, FAR * LPWSPUPCALLTABLEEX;
-#endif
-
-int WSPAPI
-WSPStartupEx(
- /*IN*/ WORD wVersionRequested,
- /*OUT*/ LPWSPDATA lpWSPData,
- /*IN*/ LPWSAPROTOCOL_INFOW lpProtocolInfo,
- /*IN*/ LPWSPUPCALLTABLEEX lpUpcallTable,
- /*OUT*/ LPWSPPROC_TABLE lpProcTable);
-
-typedef int WSPAPI
-(*LPWSPSTARTUPEX)(
- /*IN*/ WORD wVersionRequested,
- /*OUT*/ LPWSPDATA lpWSPData,
- /*IN*/ LPWSAPROTOCOL_INFOW lpProtocolInfo,
- /*IN*/ LPWSPUPCALLTABLEEX lpUpcallTable,
- /*OUT*/ LPWSPPROC_TABLE lpProcTable);
-
-#define MEM_READ 1
-#define MEM_WRITE 2
-#define MEM_READWRITE 3
-
-int WSPAPI
-WSPDeregisterMemory(
- /*IN*/ SOCKET s,
- /*IN*/ HANDLE Handle,
- /*OUT*/ LPINT lpErrno);
-
-typedef int WSPAPI
-(*LPFN_WSPDEREGISTERMEMORY)(
- /*IN*/ SOCKET s,
- /*IN*/ HANDLE Handle,
- /*OUT*/ LPINT lpErrno);
-
-int WSPAPI
-WSPDeregisterRdmaMemory(
- /*IN*/ SOCKET s,
- /*IN*/ LPVOID lpRdmaBufferDescriptor,
- /*IN*/ DWORD dwDescriptorLength,
- /*OUT*/ LPINT lpErrno);
-
-typedef int WSPAPI
-(*LPFN_WSPDEREGISTERRDMAMEMORY)(
- /*IN*/ SOCKET s,
- /*IN*/ LPVOID lpRdmaBufferDescriptor,
- /*IN*/ DWORD dwDescriptorLength,
- /*OUT*/ LPINT lpErrno);
-
-int WSPAPI
-WSPMemoryRegistrationCacheCallback(
- /*IN*/ PVOID lpvAddress,
- /*IN*/ SIZE_T Size,
- /*OUT*/ LPINT lpErrno);
-
-typedef int WSPAPI
-(*LPFN_WSPMEMORYREGISTRATIONCACHECALLBACK)(
- /*IN*/ PVOID lpvAddress,
- /*IN*/ SIZE_T Size,
- /*OUT*/ LPINT lpErrno);
-
-int WSPAPI
-WSPRdmaRead(
- /*IN*/ SOCKET s,
- /*IN*/ LPWSABUFEX lpBuffers,
- /*IN*/ DWORD dwBufferCount,
- /*IN*/ LPVOID lpTargetBufferDescriptor,
- /*IN*/ DWORD dwTargetDescriptorLength,
- /*IN*/ DWORD dwTargetBufferOffset,
- /*OUT*/ LPDWORD lpdwNumberOfBytesRead,
- /*IN*/ DWORD dwFlags,
- /*IN*/ LPWSAOVERLAPPED lpOverlapped,
- /*IN*/ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine,
- /*IN*/ LPWSATHREADID lpThreadId,
- /*OUT*/ LPINT lpErrno);
-
-typedef int WSPAPI
-(*LPFN_WSPRDMAREAD)(
- /*IN*/ SOCKET s,
- /*IN*/ LPWSABUFEX lpBuffers,
- /*IN*/ DWORD dwBufferCount,
- /*IN*/ LPVOID lpTargetBufferDescriptor,
- /*IN*/ DWORD dwTargetDescriptorLength,
- /*IN*/ DWORD dwTargetBufferOffset,
- /*OUT*/ LPDWORD lpdwNumberOfBytesRead,
- /*IN*/ DWORD dwFlags,
- /*IN*/ LPWSAOVERLAPPED lpOverlapped,
- /*IN*/ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine,
- /*IN*/ LPWSATHREADID lpThreadId,
- /*OUT*/ LPINT lpErrno);
-
-int WSPAPI
-WSPRdmaWrite(
- /*IN*/ SOCKET s,
- /*IN*/ LPWSABUFEX lpBuffers,
- /*IN*/ DWORD dwBufferCount,
- /*IN*/ LPVOID lpTargetBufferDescriptor,
- /*IN*/ DWORD dwTargetDescriptorLength,
- /*IN*/ DWORD dwTargetBufferOffset,
- /*OUT*/ LPDWORD lpdwNumberOfBytesWritten,
- /*IN*/ DWORD dwFlags,
- /*IN*/ LPWSAOVERLAPPED lpOverlapped,
- /*IN*/ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine,
- /*IN*/ LPWSATHREADID lpThreadId,
- /*OUT*/ LPINT lpErrno);
-
-typedef int WSPAPI
-(*LPFN_WSPRDMAWRITE)(
- /*IN*/ SOCKET s,
- /*IN*/ LPWSABUFEX lpBuffers,
- /*IN*/ DWORD dwBufferCount,
- /*IN*/ LPVOID lpTargetBufferDescriptor,
- /*IN*/ DWORD dwTargetDescriptorLength,
- /*IN*/ DWORD dwTargetBufferOffset,
- /*OUT*/ LPDWORD lpdwNumberOfBytesWritten,
- /*IN*/ DWORD dwFlags,
- /*IN*/ LPWSAOVERLAPPED lpOverlapped,
- /*IN*/ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine,
- /*IN*/ LPWSATHREADID lpThreadId,
- /*OUT*/ LPINT lpErrno);
-
-HANDLE WSPAPI
-WSPRegisterMemory(
- /*IN*/ SOCKET s,
- /*IN*/ PVOID lpBuffer,
- /*IN*/ DWORD dwBufferLength,
- /*IN*/ DWORD dwFlags,
- /*OUT*/ LPINT lpErrno);
-
-int WSPAPI
-WSPRegisterRdmaMemory(
- /*IN*/ SOCKET s,
- /*IN*/ PVOID lpBuffer,
- /*IN*/ DWORD dwBufferLength,
- /*IN*/ DWORD dwFlags,
- /*OUT*/ LPVOID lpRdmaBufferDescriptor,
- /*IN OUT*/ LPDWORD lpdwDescriptorLength,
- /*OUT*/ LPINT lpErrno);
-
-typedef int WSPAPI
-(*LPFN_WSPREGISTERRDMAMEMORY)(
- /*IN*/ SOCKET s,
- /*IN*/ PVOID lpBuffer,
- /*IN*/ DWORD dwBufferLength,
- /*IN*/ DWORD dwFlags,
- /*OUT*/ LPVOID lpRdmaBufferDescriptor,
- /*IN OUT*/ LPDWORD lpdwDescriptorLength,
- /*OUT*/ LPINT lpErrno);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __WS2SAN_H */
diff --git a/winsup/w32api/include/ddk/xfilter.h b/winsup/w32api/include/ddk/xfilter.h
deleted file mode 100644
index 3940b44..0000000
--- a/winsup/w32api/include/ddk/xfilter.h
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * xfilter.h
- *
- * Address filtering for NDIS MACs
- *
- * This file is part of the w32api package.
- *
- * Contributors:
- * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-#ifndef __XFILTER_H
-#define __XFILTER_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ntddk.h"
-
-
-#define ETH_LENGTH_OF_ADDRESS 6
-
-#define ETH_IS_BROADCAST(Address) \
- ((((PUCHAR)(Address))[0] == ((UCHAR)0xff)) && (((PUCHAR)(Address))[1] == ((UCHAR)0xff)))
-
-#define ETH_IS_MULTICAST(Address) \
- (BOOLEAN)(((PUCHAR)(Address))[0] & ((UCHAR)0x01))
-
-#define ETH_COMPARE_NETWORK_ADDRESSES(_A, _B, _Result) \
-{ \
- if (*(ULONG UNALIGNED *)&(_A)[2] > *(ULONG UNALIGNED *)&(_B)[2]) \
- { \
- *(_Result) = 1; \
- } \
- else if (*(ULONG UNALIGNED *)&(_A)[2] < *(ULONG UNALIGNED *)&(_B)[2]) \
- { \
- *(_Result) = (UINT)-1; \
- } \
- else if (*(USHORT UNALIGNED *)(_A) > *(USHORT UNALIGNED *)(_B)) \
- { \
- *(_Result) = 1; \
- } \
- else if (*(USHORT UNALIGNED *)(_A) < *(USHORT UNALIGNED *)(_B)) \
- { \
- *(_Result) = (UINT)-1; \
- } \
- else \
- { \
- *(_Result) = 0; \
- } \
-}
-
-#define ETH_COMPARE_NETWORK_ADDRESSES_EQ(_A,_B, _Result) \
-{ \
- if ((*(ULONG UNALIGNED *)&(_A)[2] == *(ULONG UNALIGNED *)&(_B)[2]) && \
- (*(USHORT UNALIGNED *)(_A) == *(USHORT UNALIGNED *)(_B))) \
- { \
- *(_Result) = 0; \
- } \
- else \
- { \
- *(_Result) = 1; \
- } \
-}
-
-#define ETH_COPY_NETWORK_ADDRESS(_D, _S) \
-{ \
- *((ULONG UNALIGNED *)(_D)) = *((ULONG UNALIGNED *)(_S)); \
- *((USHORT UNALIGNED *)((UCHAR *)(_D) + 4)) = *((USHORT UNALIGNED *)((UCHAR *)(_S) + 4)); \
-}
-
-#define FDDI_LENGTH_OF_LONG_ADDRESS 6
-#define FDDI_LENGTH_OF_SHORT_ADDRESS 2
-
-#define FDDI_IS_BROADCAST(Address, AddressLength, Result) \
- *Result = ((*(PUCHAR)(Address) == (UCHAR)0xFF) && \
- (*((PUCHAR)(Address) + 1) == (UCHAR)0xFF))
-
-#define FDDI_IS_MULTICAST(Address, AddressLength, Result) \
- *Result = (BOOLEAN)(*(UCHAR *)(Address) & (UCHAR)0x01)
-
-#define FDDI_IS_SMT(FcByte, Result) \
-{ \
- *Result = ((FcByte & ((UCHAR)0xf0)) == 0x40); \
-}
-
-
-#define FDDI_COMPARE_NETWORK_ADDRESSES(_A, _B, _Length, _Result) \
-{ \
- if (*(USHORT UNALIGNED *)(_A) > *(USHORT UNALIGNED *)(_B)) \
- { \
- *(_Result) = 1; \
- } \
- else if (*(USHORT UNALIGNED *)(_A) < *(USHORT UNALIGNED *)(_B)) \
- { \
- *(_Result) = (UINT)-1; \
- } \
- else if (_Length == 2) \
- { \
- *(_Result) = 0; \
- } \
- else if (*(ULONG UNALIGNED *)((PUCHAR)(_A) + 2) > *(ULONG UNALIGNED *)((PUCHAR)(_B) + 2)) \
- { \
- *(_Result) = 1; \
- } \
- else if (*(ULONG UNALIGNED *)((PUCHAR)(_A) + 2) < *(ULONG UNALIGNED *)((PUCHAR)(_B) + 2)) \
- { \
- *(_Result) = (UINT)-1; \
- } \
- else \
- { \
- *(_Result) = 0; \
- } \
-}
-
-#define FDDI_COMPARE_NETWORK_ADDRESSES_EQ(_A, _B, _Length, _Result) \
-{ \
- if ((*(USHORT UNALIGNED *)(_A) == *(USHORT UNALIGNED *)(_B)) && \
- (((_Length) == 2) || \
- (*(ULONG UNALIGNED *)((PUCHAR)(_A) + 2) == *(ULONG UNALIGNED *)((PUCHAR)(_B) + 2)))) \
- { \
- *(_Result) = 0; \
- } \
- else \
- { \
- *(_Result) = 1; \
- } \
-}
-
-#define FDDI_COPY_NETWORK_ADDRESS(D, S, AddressLength) \
-{ \
- PCHAR _D = (D); \
- PCHAR _S = (S); \
- UINT _C = (AddressLength); \
- for ( ; _C > 0 ; _D++, _S++, _C--) \
- { \
- *_D = *_S; \
- } \
-}
-
-#define TR_LENGTH_OF_FUNCTIONAL 4
-#define TR_LENGTH_OF_ADDRESS 6
-
-typedef ULONG TR_FUNCTIONAL_ADDRESS;
-typedef ULONG TR_GROUP_ADDRESS;
-
-#define TR_IS_NOT_DIRECTED(_Address, _Result) \
-{ \
- *(_Result) = (BOOLEAN)((_Address)[0] & 0x80); \
-}
-
-#define TR_IS_FUNCTIONAL(_Address, _Result) \
-{ \
- *(_Result) = (BOOLEAN)(((_Address)[0] & 0x80) && !((_Address)[2] & 0x80)); \
-}
-
-#define TR_IS_GROUP(_Address, _Result) \
-{ \
- *(_Result) = (BOOLEAN)((_Address)[0] & (_Address)[2] & 0x80); \
-}
-
-#define TR_IS_SOURCE_ROUTING(_Address, _Result) \
-{ \
- *(_Result) = (BOOLEAN)((_Address)[0] & 0x80); \
-}
-
-#define TR_IS_MAC_FRAME(_PacketHeader) ((((PUCHAR)_PacketHeader)[1] & 0xFC) == 0)
-
-#define TR_IS_BROADCAST(_Address, _Result) \
-{ \
- *(_Result) = (BOOLEAN)(((*(UNALIGNED USHORT *)&(_Address)[0] == 0xFFFF) || \
- (*(UNALIGNED USHORT *)&(_Address)[0] == 0x00C0)) && \
- (*(UNALIGNED ULONG *)&(_Address)[2] == 0xFFFFFFFF)); \
-}
-
-#define TR_COMPARE_NETWORK_ADDRESSES(_A, _B, _Result) \
-{ \
- if (*(ULONG UNALIGNED *)&(_A)[2] > *(ULONG UNALIGNED *)&(_B)[2]) \
- { \
- *(_Result) = 1; \
- } \
- else if (*(ULONG UNALIGNED *)&(_A)[2] < *(ULONG UNALIGNED *)&(_B)[2]) \
- { \
- *(_Result) = (UINT)-1; \
- } \
- else if (*(USHORT UNALIGNED *)(_A) > *(USHORT UNALIGNED *)(_B)) \
- { \
- *(_Result) = 1; \
- } \
- else if (*(USHORT UNALIGNED *)(_A) < *(USHORT UNALIGNED *)(_B)) \
- { \
- *(_Result) = (UINT)-1; \
- } \
- else \
- { \
- *(_Result) = 0; \
- } \
-}
-
-#define TR_COPY_NETWORK_ADDRESS(_D, _S) \
-{ \
- *((ULONG UNALIGNED *)(_D)) = *((ULONG UNALIGNED *)(_S)); \
- *((USHORT UNALIGNED *)((UCHAR *)(_D)+4)) = *((USHORT UNALIGNED *)((UCHAR *)(_S) + 4)); \
-}
-
-#define TR_COMPARE_NETWORK_ADDRESSES_EQ(_A, _B, _Result) \
-{ \
- if ((*(ULONG UNALIGNED *)&(_A)[2] == *(ULONG UNALIGNED *)&(_B)[2]) && \
- (*(USHORT UNALIGNED *)&(_A)[0] == *(USHORT UNALIGNED *)&(_B)[0])) \
- { \
- *(_Result) = 0; \
- } \
- else \
- { \
- *(_Result) = 1; \
- } \
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __XFILTER_H */
diff --git a/winsup/w32api/include/devguid.h b/winsup/w32api/include/devguid.h
deleted file mode 100644
index 817a162..0000000
--- a/winsup/w32api/include/devguid.h
+++ /dev/null
@@ -1,65 +0,0 @@
-#ifndef _DEVGUID_H
-#define _DEVGUID_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern const GUID GUID_DEVCLASS_WCEUSBS;
-extern const GUID GUID_DEVCLASS_USB;
-extern const GUID GUID_DEVCLASS_PNPPRINTERS;
-extern const GUID GUID_DEVCLASS_DOT4;
-extern const GUID GUID_DEVCLASS_DOT4PRINT;
-extern const GUID GUID_DEVCLASS_CDROM;
-extern const GUID GUID_DEVCLASS_COMPUTER;
-extern const GUID GUID_DEVCLASS_DISKDRIVE;
-extern const GUID GUID_DEVCLASS_DISPLAY;
-extern const GUID GUID_DEVCLASS_FDC;
-extern const GUID GUID_DEVCLASS_HDC;
-extern const GUID GUID_DEVCLASS_KEYBOARD;
-extern const GUID GUID_DEVCLASS_MEDIA;
-extern const GUID GUID_DEVCLASS_MODEM;
-extern const GUID GUID_DEVCLASS_MONITOR;
-extern const GUID GUID_DEVCLASS_MOUSE;
-extern const GUID GUID_DEVCLASS_MTD;
-extern const GUID GUID_DEVCLASS_MULTIFUNCTION;
-extern const GUID GUID_DEVCLASS_NET;
-extern const GUID GUID_DEVCLASS_NETCLIENT;
-extern const GUID GUID_DEVCLASS_NETSERVICE;
-extern const GUID GUID_DEVCLASS_NETTRANS;
-extern const GUID GUID_DEVCLASS_PCMCIA;
-extern const GUID GUID_DEVCLASS_PORTS;
-extern const GUID GUID_DEVCLASS_PRINTER;
-extern const GUID GUID_DEVCLASS_SCSIADAPTER;
-extern const GUID GUID_DEVCLASS_SYSTEM;
-extern const GUID GUID_DEVCLASS_UNKNOWN;
-extern const GUID GUID_DEVCLASS_FLOPPYDISK;
-extern const GUID GUID_DEVCLASS_PROCESSOR;
-extern const GUID GUID_DEVCLASS_MULTIPORTSERIAL;
-extern const GUID GUID_DEVCLASS_SMARTCARDREADER;
-extern const GUID GUID_DEVCLASS_VOLUMESNAPSHOT;
-extern const GUID GUID_DEVCLASS_1394DEBUG;
-extern const GUID GUID_DEVCLASS_1394;
-extern const GUID GUID_DEVCLASS_INFRARED;
-extern const GUID GUID_DEVCLASS_IMAGE;
-extern const GUID GUID_DEVCLASS_TAPEDRIVE;
-extern const GUID GUID_DEVCLASS_VOLUME;
-extern const GUID GUID_DEVCLASS_BATTERY;
-extern const GUID GUID_DEVCLASS_HIDCLASS;
-extern const GUID GUID_DEVCLASS_61883;
-extern const GUID GUID_DEVCLASS_LEGACYDRIVER;
-extern const GUID GUID_DEVCLASS_SDHOST;
-extern const GUID GUID_DEVCLASS_AVC;
-extern const GUID GUID_DEVCLASS_ENUM1394;
-extern const GUID GUID_DEVCLASS_MEDIUMCHANGER;
-extern const GUID GUID_DEVCLASS_NTAPM;
-extern const GUID GUID_DEVCLASS_SBP2;
-extern const GUID GUID_DEVCLASS_BLUETOOTH;
-extern const GUID GUID_DEVCLASS_PROBES;
-#ifdef __cplusplus
-}
-#endif
-#endif /* _DEVGUID_H */
diff --git a/winsup/w32api/include/dhcpcsdk.h b/winsup/w32api/include/dhcpcsdk.h
deleted file mode 100644
index 1d27df7..0000000
--- a/winsup/w32api/include/dhcpcsdk.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef _DHCPCDSK_H
-#define _DHCPCDSK_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if (_WIN32_WINNT >= 0x0500)
-#define DHCPCAPI_REGISTER_HANDLE_EVENT 0x00000001
-#define DHCPCAPI_REQUEST_PERSISTENT 0x00000001
-#define DHCPCAPI_REQUEST_SYNCHRONOUS 0x00000002
-typedef struct _DHCPAPI_CLASSID {
- ULONG Flags;
- LPBYTE Data;
- ULONG nBytesData;
-} DHCPCAPI_CLASSID,*PDHCPCAPI_CLASSID,*LPDHCPCAPI_CLASSID;
-typedef struct _DHCPAPI_PARAMS {
- ULONG Flags;
- ULONG OptionId;
- BOOL IsVendor;
- LPBYTE Data;
- DWORD nBytesData;
-} DHCPAPI_PARAMS,*PDHCPAPI_PARAMS,*LPDHCPAPI_PARAMS;
-typedef struct _DHCPAPI_PARAMS_ARRAY {
- ULONG nParams;
- LPDHCPAPI_PARAMS Params;
-} DHCPCAPI_PARAMS_ARRAY,*PDHCPCAPI_PARAMS_ARRAY,*LPDHCPCAPI_PARAMS_ARRAY;
-VOID WINAPI DhcpCApiCleanup(void);
-DWORD WINAPI DhcpCApiInitialize(LPDWORD);
-DWORD WINAPI DhcpDeRegisterParamChange(DWORD,LPVOID,LPVOID);
-DWORD WINAPI DhcpRegisterParamChange(DWORD,LPVOID,PWSTR,LPDHCPCAPI_CLASSID,DHCPCAPI_PARAMS_ARRAY,LPVOID);
-DWORD WINAPI DhcpRemoveDNSRegistrations(void);
-DWORD WINAPI DhcpUndoRequestParams(DWORD,LPVOID,LPWSTR,LPWSTR);
-#endif /* (_WIN32_WINNT >= 0x0500) */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/directx/d3d9.h b/winsup/w32api/include/directx/d3d9.h
deleted file mode 100644
index 920c129..0000000
--- a/winsup/w32api/include/directx/d3d9.h
+++ /dev/null
@@ -1,1288 +0,0 @@
-/*
-
- d3d9.h - Header file for the Direct3D9 API
-
- Written by Filip Navara <xnavara@volny.cz>
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#ifndef _D3D9_H
-#define _D3D9_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifndef DIRECT3D_VERSION
-#define DIRECT3D_VERSION 0x0900
-#endif
-
-#if (DIRECT3D_VERSION >= 0x0900)
-
-#include <objbase.h>
-#include "d3d9types.h"
-#include "d3d9caps.h"
-
-#define D3D_SDK_VERSION 31
-#define D3DCREATE_FPU_PRESERVE 0x02
-#define D3DCREATE_MULTITHREADED 0x04
-#define D3DCREATE_PUREDEVICE 0x10
-#define D3DCREATE_SOFTWARE_VERTEXPROCESSING 0x20
-#define D3DCREATE_HARDWARE_VERTEXPROCESSING 0x40
-#define D3DCREATE_MIXED_VERTEXPROCESSING 0x80
-#define D3DSPD_IUNKNOWN 1
-#define D3DSGR_NO_CALIBRATION 0
-#define D3DSGR_CALIBRATE 1
-#define MAKE_D3DHRESULT(code) MAKE_HRESULT(1,0x876,code)
-#define MAKE_D3DSTATUS(code) MAKE_HRESULT(0,0x876,code)
-#define D3D_OK 0
-#define D3DOK_NOAUTOGEN MAKE_D3DSTATUS(2159)
-#define D3DERR_WRONGTEXTUREFORMAT MAKE_D3DHRESULT(2072)
-#define D3DERR_UNSUPPORTEDCOLOROPERATION MAKE_D3DHRESULT(2073)
-#define D3DERR_UNSUPPORTEDCOLORARG MAKE_D3DHRESULT(2074)
-#define D3DERR_UNSUPPORTEDALPHAOPERATION MAKE_D3DHRESULT(2075)
-#define D3DERR_UNSUPPORTEDALPHAARG MAKE_D3DHRESULT(2076)
-#define D3DERR_TOOMANYOPERATIONS MAKE_D3DHRESULT(2077)
-#define D3DERR_CONFLICTINGTEXTUREFILTER MAKE_D3DHRESULT(2078)
-#define D3DERR_UNSUPPORTEDFACTORVALUE MAKE_D3DHRESULT(2079)
-#define D3DERR_CONFLICTINGRENDERSTATE MAKE_D3DHRESULT(2081)
-#define D3DERR_UNSUPPORTEDTEXTUREFILTER MAKE_D3DHRESULT(2082)
-#define D3DERR_CONFLICTINGTEXTUREPALETTE MAKE_D3DHRESULT(2086)
-#define D3DERR_DRIVERINTERNALERROR MAKE_D3DHRESULT(2087)
-#define D3DERR_NOTFOUND MAKE_D3DHRESULT(2150)
-#define D3DERR_MOREDATA MAKE_D3DHRESULT(2151)
-#define D3DERR_DEVICELOST MAKE_D3DHRESULT(2152)
-#define D3DERR_DEVICENOTRESET MAKE_D3DHRESULT(2153)
-#define D3DERR_NOTAVAILABLE MAKE_D3DHRESULT(2154)
-#define D3DERR_OUTOFVIDEOMEMORY MAKE_D3DHRESULT(380)
-#define D3DERR_INVALIDDEVICE MAKE_D3DHRESULT(2155)
-#define D3DERR_INVALIDCALL MAKE_D3DHRESULT(2156)
-#define D3DERR_DRIVERINVALIDCALL MAKE_D3DHRESULT(2157)
-#define D3DERR_WASSTILLDRAWING MAKE_D3DHRESULT(540)
-#define D3DADAPTER_DEFAULT 0
-#define D3DCURSOR_IMMEDIATE_UPDATE 1
-#define D3DENUM_HOST_ADAPTER 1
-#define D3DPRESENTFLAG_LOCKABLE_BACKBUFFER 1
-#define D3DPV_DONOTCOPYDATA 1
-#define D3DENUM_NO_WHQL_LEVEL 2
-#define D3DPRESENT_BACK_BUFFERS_MAX 3
-#define VALID_D3DENUM_FLAGS 3
-#define D3DMAXNUMPRIMITIVES 0xFFFF
-#define D3DMAXNUMVERTICES 0xFFFF
-#define D3DCURRENT_DISPLAY_MODE 0xEFFFFF
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern const GUID IID_IDirect3D9;
-extern const GUID IID_IDirect3DDevice9;
-extern const GUID IID_IDirect3DVolume9;
-extern const GUID IID_IDirect3DSwapChain9;
-extern const GUID IID_IDirect3DResource9;
-extern const GUID IID_IDirect3DSurface9;
-extern const GUID IID_IDirect3DVertexBuffer9;
-extern const GUID IID_IDirect3DIndexBuffer9;
-extern const GUID IID_IDirect3DBaseTexture9;
-extern const GUID IID_IDirect3DCubeTexture9;
-extern const GUID IID_IDirect3DTexture9;
-extern const GUID IID_IDirect3DVolumeTexture9;
-extern const GUID IID_IDirect3DVertexDeclaration9;
-extern const GUID IID_IDirect3DVertexShader9;
-extern const GUID IID_IDirect3DPixelShader9;
-extern const GUID IID_IDirect3DStateBlock9;
-extern const GUID IID_IDirect3DQuery9;
-#ifdef __cplusplus
-};
-#endif
-
-typedef _COM_interface IDirect3D9 IDirect3D9;
-typedef _COM_interface IDirect3DDevice9 IDirect3DDevice9;
-typedef _COM_interface IDirect3DVolume9 IDirect3DVolume9;
-typedef _COM_interface IDirect3DSwapChain9 IDirect3DSwapChain9;
-typedef _COM_interface IDirect3DResource9 IDirect3DResource9;
-typedef _COM_interface IDirect3DSurface9 IDirect3DSurface9;
-typedef _COM_interface IDirect3DVertexBuffer9 IDirect3DVertexBuffer9;
-typedef _COM_interface IDirect3DIndexBuffer9 IDirect3DIndexBuffer9;
-typedef _COM_interface IDirect3DBaseTexture9 IDirect3DBaseTexture9;
-typedef _COM_interface IDirect3DCubeTexture9 IDirect3DCubeTexture9;
-typedef _COM_interface IDirect3DTexture9 IDirect3DTexture9;
-typedef _COM_interface IDirect3DVolumeTexture9 IDirect3DVolumeTexture9;
-typedef _COM_interface IDirect3DVertexDeclaration9 IDirect3DVertexDeclaration9;
-typedef _COM_interface IDirect3DVertexShader9 IDirect3DVertexShader9;
-typedef _COM_interface IDirect3DPixelShader9 IDirect3DPixelShader9;
-typedef _COM_interface IDirect3DStateBlock9 IDirect3DStateBlock9;
-typedef _COM_interface IDirect3DQuery9 IDirect3DQuery9;
-
-#undef INTERFACE
-#define INTERFACE IDirect3D9
-DECLARE_INTERFACE_(IDirect3D9,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(RegisterSoftwareDevice)(THIS_ void* pInitializeFunction) PURE;
- STDMETHOD_(UINT,GetAdapterCount)(THIS) PURE;
- STDMETHOD(GetAdapterIdentifier)(THIS_ UINT,DWORD,D3DADAPTER_IDENTIFIER9*) PURE;
- STDMETHOD_(UINT,GetAdapterModeCount)(THIS_ UINT,D3DFORMAT) PURE;
- STDMETHOD(EnumAdapterModes)(THIS_ UINT,D3DFORMAT,UINT,D3DDISPLAYMODE*) PURE;
- STDMETHOD(GetAdapterDisplayMode)(THIS_ UINT,D3DDISPLAYMODE*) PURE;
- STDMETHOD(CheckDeviceType)(THIS_ UINT,D3DDEVTYPE,D3DFORMAT,D3DFORMAT,BOOL) PURE;
- STDMETHOD(CheckDeviceFormat)(THIS_ UINT,D3DDEVTYPE,D3DFORMAT,DWORD,D3DRESOURCETYPE,D3DFORMAT) PURE;
- STDMETHOD(CheckDeviceMultiSampleType)(THIS_ UINT,D3DDEVTYPE,D3DFORMAT,BOOL,D3DMULTISAMPLE_TYPE,DWORD*) PURE;
- STDMETHOD(CheckDepthStencilMatch)(THIS_ UINT,D3DDEVTYPE,D3DFORMAT,D3DFORMAT,D3DFORMAT) PURE;
- STDMETHOD(CheckDeviceFormatConversion)(THIS_ UINT,D3DDEVTYPE,D3DFORMAT,D3DFORMAT) PURE;
- STDMETHOD(GetDeviceCaps)(THIS_ UINT,D3DDEVTYPE,D3DCAPS9*) PURE;
- STDMETHOD_(HMONITOR,GetAdapterMonitor)(THIS_ UINT) PURE;
- STDMETHOD(CreateDevice)(THIS_ UINT,D3DDEVTYPE,HWND,DWORD,D3DPRESENT_PARAMETERS*,IDirect3DDevice9**) PURE;
-};
-typedef struct IDirect3D9 *LPDIRECT3D9, *PDIRECT3D9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3D9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3D9_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IDirect3D9_Release(p) (p)->lpVtbl->Release(p)
-#define IDirect3D9_RegisterSoftwareDevice(p,a) (p)->lpVtbl->RegisterSoftwareDevice(p,a)
-#define IDirect3D9_GetAdapterCount(p) (p)->lpVtbl->GetAdapterCount(p)
-#define IDirect3D9_GetAdapterIdentifier(p,a,b,c) (p)->lpVtbl->GetAdapterIdentifier(p,a,b,c)
-#define IDirect3D9_GetAdapterModeCount(p,a,b) (p)->lpVtbl->GetAdapterModeCount(p,a,b)
-#define IDirect3D9_EnumAdapterModes(p,a,b,c,d) (p)->lpVtbl->EnumAdapterModes(p,a,b,c,d)
-#define IDirect3D9_GetAdapterDisplayMode(p,a,b) (p)->lpVtbl->GetAdapterDisplayMode(p,a,b)
-#define IDirect3D9_CheckDeviceType(p,a,b,c,d,e) (p)->lpVtbl->CheckDeviceType(p,a,b,c,d,e)
-#define IDirect3D9_CheckDeviceFormat(p,a,b,c,d,e,f) (p)->lpVtbl->CheckDeviceFormat(p,a,b,c,d,e,f)
-#define IDirect3D9_CheckDeviceMultiSampleType(p,a,b,c,d,e,f) (p)->lpVtbl->CheckDeviceMultiSampleType(p,a,b,c,d,e,f)
-#define IDirect3D9_CheckDepthStencilMatch(p,a,b,c,d,e) (p)->lpVtbl->CheckDepthStencilMatch(p,a,b,c,d,e)
-#define IDirect3D9_CheckDeviceFormatConversion(p,a,b,c,d) (p)->lpVtbl->CheckDeviceFormatConversion(p,a,b,c,d)
-#define IDirect3D9_GetDeviceCaps(p,a,b,c) (p)->lpVtbl->GetDeviceCaps(p,a,b,c)
-#define IDirect3D9_GetAdapterMonitor(p,a) (p)->lpVtbl->GetAdapterMonitor(p,a)
-#define IDirect3D9_CreateDevice(p,a,b,c,d,e,f) (p)->lpVtbl->CreateDevice(p,a,b,c,d,e,f)
-#else
-#define IDirect3D9_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirect3D9_AddRef(p) (p)->AddRef()
-#define IDirect3D9_Release(p) (p)->Release()
-#define IDirect3D9_RegisterSoftwareDevice(p,a) (p)->RegisterSoftwareDevice(a)
-#define IDirect3D9_GetAdapterCount(p) (p)->GetAdapterCount()
-#define IDirect3D9_GetAdapterIdentifier(p,a,b,c) (p)->GetAdapterIdentifier(a,b,c)
-#define IDirect3D9_GetAdapterModeCount(p,a,b) (p)->GetAdapterModeCount(a,b)
-#define IDirect3D9_EnumAdapterModes(p,a,b,c,d) (p)->EnumAdapterModes(a,b,c,d)
-#define IDirect3D9_GetAdapterDisplayMode(p,a,b) (p)->GetAdapterDisplayMode(a,b)
-#define IDirect3D9_CheckDeviceType(p,a,b,c,d,e) (p)->CheckDeviceType(a,b,c,d,e)
-#define IDirect3D9_CheckDeviceFormat(p,a,b,c,d,e,f) (p)->CheckDeviceFormat(a,b,c,d,e,f)
-#define IDirect3D9_CheckDeviceMultiSampleType(p,a,b,c,d,e,f) (p)->CheckDeviceMultiSampleType(a,b,c,d,e,f)
-#define IDirect3D9_CheckDepthStencilMatch(p,a,b,c,d,e) (p)->CheckDepthStencilMatch(a,b,c,d,e)
-#define IDirect3D9_CheckDeviceFormatConversion(p,a,b,c,d) (p)->CheckDeviceFormatConversion(a,b,c,d)
-#define IDirect3D9_GetDeviceCaps(p,a,b,c) (p)->GetDeviceCaps(a,b,c)
-#define IDirect3D9_GetAdapterMonitor(p,a) (p)->GetAdapterMonitor(a)
-#define IDirect3D9_CreateDevice(p,a,b,c,d,e,f) (p)->CreateDevice(a,b,c,d,e,f)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DDevice9
-DECLARE_INTERFACE_(IDirect3DDevice9,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(TestCooperativeLevel)(THIS) PURE;
- STDMETHOD_(UINT,GetAvailableTextureMem)(THIS) PURE;
- STDMETHOD(EvictManagedResources)(THIS) PURE;
- STDMETHOD(GetDirect3D)(THIS_ IDirect3D9**) PURE;
- STDMETHOD(GetDeviceCaps)(THIS_ D3DCAPS9*) PURE;
- STDMETHOD(GetDisplayMode)(THIS_ UINT,D3DDISPLAYMODE*) PURE;
- STDMETHOD(GetCreationParameters)(THIS_ D3DDEVICE_CREATION_PARAMETERS*) PURE;
- STDMETHOD(SetCursorProperties)(THIS_ UINT,UINT,IDirect3DSurface9*) PURE;
- STDMETHOD_(void,SetCursorPosition)(THIS_ int,int,DWORD) PURE;
- STDMETHOD_(BOOL,ShowCursor)(THIS_ BOOL) PURE;
- STDMETHOD(CreateAdditionalSwapChain)(THIS_ D3DPRESENT_PARAMETERS*,IDirect3DSwapChain9**) PURE;
- STDMETHOD(GetSwapChain)(THIS_ UINT,IDirect3DSwapChain9**) PURE;
- STDMETHOD_(UINT,GetNumberOfSwapChains)(THIS) PURE;
- STDMETHOD(Reset)(THIS_ D3DPRESENT_PARAMETERS*) PURE;
- STDMETHOD(Present)(THIS_ CONST RECT*,CONST RECT*,HWND,CONST RGNDATA*) PURE;
- STDMETHOD(GetBackBuffer)(THIS_ UINT,UINT,D3DBACKBUFFER_TYPE,IDirect3DSurface9**) PURE;
- STDMETHOD(GetRasterStatus)(THIS_ UINT,D3DRASTER_STATUS*) PURE;
- STDMETHOD(SetDialogBoxMode)(THIS_ BOOL) PURE;
- STDMETHOD_(void,SetGammaRamp)(THIS_ UINT,DWORD,CONST D3DGAMMARAMP*) PURE;
- STDMETHOD_(void,GetGammaRamp)(THIS_ UINT,D3DGAMMARAMP*) PURE;
- STDMETHOD(CreateTexture)(THIS_ UINT,UINT,UINT,DWORD,D3DFORMAT,D3DPOOL,IDirect3DTexture9**,HANDLE*) PURE;
- STDMETHOD(CreateVolumeTexture)(THIS_ UINT,UINT,UINT,UINT,DWORD,D3DFORMAT,D3DPOOL,IDirect3DVolumeTexture9**,HANDLE*) PURE;
- STDMETHOD(CreateCubeTexture)(THIS_ UINT,UINT,DWORD,D3DFORMAT,D3DPOOL,IDirect3DCubeTexture9**, HANDLE*) PURE;
- STDMETHOD(CreateVertexBuffer)(THIS_ UINT,DWORD,DWORD,D3DPOOL,IDirect3DVertexBuffer9**, HANDLE*) PURE;
- STDMETHOD(CreateIndexBuffer)(THIS_ UINT,DWORD,D3DFORMAT,D3DPOOL,IDirect3DIndexBuffer9**,HANDLE*) PURE;
- STDMETHOD(CreateRenderTarget)(THIS_ UINT,UINT,D3DFORMAT,D3DMULTISAMPLE_TYPE,DWORD,BOOL,IDirect3DSurface9**,HANDLE*) PURE;
- STDMETHOD(CreateDepthStencilSurface)(THIS_ UINT,UINT,D3DFORMAT,D3DMULTISAMPLE_TYPE,DWORD,BOOL,IDirect3DSurface9**,HANDLE*) PURE;
- STDMETHOD(UpdateSurface)(THIS_ IDirect3DSurface9*,CONST RECT*,IDirect3DSurface9*,CONST POINT*) PURE;
- STDMETHOD(UpdateTexture)(THIS_ IDirect3DBaseTexture9*,IDirect3DBaseTexture9*) PURE;
- STDMETHOD(GetRenderTargetData)(THIS_ IDirect3DSurface9*,IDirect3DSurface9*) PURE;
- STDMETHOD(GetFrontBufferData)(THIS_ UINT,IDirect3DSurface9*) PURE;
- STDMETHOD(StretchRect)(THIS_ IDirect3DSurface9*,CONST RECT*,IDirect3DSurface9*,CONST RECT*,D3DTEXTUREFILTERTYPE) PURE;
- STDMETHOD(ColorFill)(THIS_ IDirect3DSurface9*,CONST RECT*,D3DCOLOR) PURE;
- STDMETHOD(CreateOffscreenPlainSurface)(THIS_ UINT,UINT,D3DFORMAT,D3DPOOL,IDirect3DSurface9**,HANDLE*) PURE;
- STDMETHOD(SetRenderTarget)(THIS_ DWORD,IDirect3DSurface9*) PURE;
- STDMETHOD(GetRenderTarget)(THIS_ DWORD,IDirect3DSurface9**) PURE;
- STDMETHOD(SetDepthStencilSurface)(THIS_ IDirect3DSurface9*) PURE;
- STDMETHOD(GetDepthStencilSurface)(THIS_ IDirect3DSurface9**) PURE;
- STDMETHOD(BeginScene)(THIS) PURE;
- STDMETHOD(EndScene)(THIS) PURE;
- STDMETHOD(Clear)(THIS_ DWORD,CONST D3DRECT*,DWORD,D3DCOLOR,float,DWORD) PURE;
- STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE,CONST D3DMATRIX*) PURE;
- STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE,D3DMATRIX*) PURE;
- STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE,CONST D3DMATRIX*) PURE;
- STDMETHOD(SetViewport)(THIS_ CONST D3DVIEWPORT9*) PURE;
- STDMETHOD(GetViewport)(THIS_ D3DVIEWPORT9*) PURE;
- STDMETHOD(SetMaterial)(THIS_ CONST D3DMATERIAL9*) PURE;
- STDMETHOD(GetMaterial)(THIS_ D3DMATERIAL9*) PURE;
- STDMETHOD(SetLight)(THIS_ DWORD,CONST D3DLIGHT9*) PURE;
- STDMETHOD(GetLight)(THIS_ DWORD,D3DLIGHT9*) PURE;
- STDMETHOD(LightEnable)(THIS_ DWORD,BOOL) PURE;
- STDMETHOD(GetLightEnable)(THIS_ DWORD,BOOL*) PURE;
- STDMETHOD(SetClipPlane)(THIS_ DWORD,CONST float*) PURE;
- STDMETHOD(GetClipPlane)(THIS_ DWORD,float*) PURE;
- STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE,DWORD) PURE;
- STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE,DWORD*) PURE;
- STDMETHOD(CreateStateBlock)(THIS_ D3DSTATEBLOCKTYPE,IDirect3DStateBlock9**) PURE;
- STDMETHOD(BeginStateBlock)(THIS) PURE;
- STDMETHOD(EndStateBlock)(THIS_ IDirect3DStateBlock9**) PURE;
- STDMETHOD(SetClipStatus)(THIS_ CONST D3DCLIPSTATUS9*) PURE;
- STDMETHOD(GetClipStatus)(THIS_ D3DCLIPSTATUS9*) PURE;
- STDMETHOD(GetTexture)(THIS_ DWORD,IDirect3DBaseTexture9**) PURE;
- STDMETHOD(SetTexture)(THIS_ DWORD,IDirect3DBaseTexture9*) PURE;
- STDMETHOD(GetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,DWORD*) PURE;
- STDMETHOD(SetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,DWORD) PURE;
- STDMETHOD(GetSamplerState)(THIS_ DWORD,D3DSAMPLERSTATETYPE,DWORD*) PURE;
- STDMETHOD(SetSamplerState)(THIS_ DWORD,D3DSAMPLERSTATETYPE,DWORD) PURE;
- STDMETHOD(ValidateDevice)(THIS_ DWORD*) PURE;
- STDMETHOD(SetPaletteEntries)(THIS_ UINT,CONST PALETTEENTRY*) PURE;
- STDMETHOD(GetPaletteEntries)(THIS_ UINT,PALETTEENTRY*) PURE;
- STDMETHOD(SetCurrentTexturePalette)(THIS_ UINT) PURE;
- STDMETHOD(GetCurrentTexturePalette)(THIS_ UINT*) PURE;
- STDMETHOD(SetScissorRect)(THIS_ CONST RECT*) PURE;
- STDMETHOD(GetScissorRect)(THIS_ RECT*) PURE;
- STDMETHOD(SetSoftwareVertexProcessing)(THIS_ BOOL) PURE;
- STDMETHOD_(BOOL,GetSoftwareVertexProcessing)(THIS) PURE;
- STDMETHOD(SetNPatchMode)(THIS_ float) PURE;
- STDMETHOD_(float,GetNPatchMode)(THIS) PURE;
- STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE,UINT,UINT) PURE;
- STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE,INT,UINT,UINT,UINT,UINT) PURE;
- STDMETHOD(DrawPrimitiveUP)(THIS_ D3DPRIMITIVETYPE,UINT,CONST void*,UINT) PURE;
- STDMETHOD(DrawIndexedPrimitiveUP)(THIS_ D3DPRIMITIVETYPE,UINT,UINT,UINT,CONST void*,D3DFORMAT,CONST void*,UINT) PURE;
- STDMETHOD(ProcessVertices)(THIS_ UINT,UINT,UINT,IDirect3DVertexBuffer9*,IDirect3DVertexDeclaration9*,DWORD) PURE;
- STDMETHOD(CreateVertexDeclaration)(THIS_ CONST D3DVERTEXELEMENT9*,IDirect3DVertexDeclaration9**) PURE;
- STDMETHOD(SetVertexDeclaration)(THIS_ IDirect3DVertexDeclaration9*) PURE;
- STDMETHOD(GetVertexDeclaration)(THIS_ IDirect3DVertexDeclaration9**) PURE;
- STDMETHOD(SetFVF)(THIS_ DWORD) PURE;
- STDMETHOD(GetFVF)(THIS_ DWORD*) PURE;
- STDMETHOD(CreateVertexShader)(THIS_ CONST DWORD*,IDirect3DVertexShader9**) PURE;
- STDMETHOD(SetVertexShader)(THIS_ IDirect3DVertexShader9*) PURE;
- STDMETHOD(GetVertexShader)(THIS_ IDirect3DVertexShader9**) PURE;
- STDMETHOD(SetVertexShaderConstantF)(THIS_ UINT,CONST float*,UINT) PURE;
- STDMETHOD(GetVertexShaderConstantF)(THIS_ UINT,float*,UINT) PURE;
- STDMETHOD(SetVertexShaderConstantI)(THIS_ UINT,CONST int*,UINT) PURE;
- STDMETHOD(GetVertexShaderConstantI)(THIS_ UINT,int*,UINT) PURE;
- STDMETHOD(SetVertexShaderConstantB)(THIS_ UINT,CONST BOOL*,UINT) PURE;
- STDMETHOD(GetVertexShaderConstantB)(THIS_ UINT,BOOL*,UINT) PURE;
- STDMETHOD(SetStreamSource)(THIS_ UINT,IDirect3DVertexBuffer9*,UINT,UINT) PURE;
- STDMETHOD(GetStreamSource)(THIS_ UINT,IDirect3DVertexBuffer9**,UINT*,UINT*) PURE;
- STDMETHOD(SetStreamSourceFreq)(THIS_ UINT,UINT) PURE;
- STDMETHOD(GetStreamSourceFreq)(THIS_ UINT,UINT*) PURE;
- STDMETHOD(SetIndices)(THIS_ IDirect3DIndexBuffer9*) PURE;
- STDMETHOD(GetIndices)(THIS_ IDirect3DIndexBuffer9**) PURE;
- STDMETHOD(CreatePixelShader)(THIS_ CONST DWORD*,IDirect3DPixelShader9**) PURE;
- STDMETHOD(SetPixelShader)(THIS_ IDirect3DPixelShader9*) PURE;
- STDMETHOD(GetPixelShader)(THIS_ IDirect3DPixelShader9**) PURE;
- STDMETHOD(SetPixelShaderConstantF)(THIS_ UINT,CONST float*,UINT) PURE;
- STDMETHOD(GetPixelShaderConstantF)(THIS_ UINT,float*,UINT) PURE;
- STDMETHOD(SetPixelShaderConstantI)(THIS_ UINT,CONST int*,UINT) PURE;
- STDMETHOD(GetPixelShaderConstantI)(THIS_ UINT,int*,UINT) PURE;
- STDMETHOD(SetPixelShaderConstantB)(THIS_ UINT,CONST BOOL*,UINT) PURE;
- STDMETHOD(GetPixelShaderConstantB)(THIS_ UINT,BOOL*,UINT) PURE;
- STDMETHOD(DrawRectPatch)(THIS_ UINT,CONST float*,CONST D3DRECTPATCH_INFO*) PURE;
- STDMETHOD(DrawTriPatch)(THIS_ UINT,CONST float*,CONST D3DTRIPATCH_INFO*) PURE;
- STDMETHOD(DeletePatch)(THIS_ UINT) PURE;
- STDMETHOD(CreateQuery)(THIS_ D3DQUERYTYPE,IDirect3DQuery9**) PURE;
-};
-typedef struct IDirect3DDevice9 *LPDIRECT3DDEVICE9, *PDIRECT3DDEVICE9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DDevice9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DDevice9_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IDirect3DDevice9_Release(p) (p)->lpVtbl->Release(p)
-#define IDirect3DDevice9_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p)
-#define IDirect3DDevice9_GetAvailableTextureMem(p) (p)->lpVtbl->GetAvailableTextureMem(p)
-#define IDirect3DDevice9_EvictManagedResources(p) (p)->lpVtbl->EvictManagedResources(p)
-#define IDirect3DDevice9_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a)
-#define IDirect3DDevice9_GetDeviceCaps(p,a) (p)->lpVtbl->GetDeviceCaps(p,a)
-#define IDirect3DDevice9_GetDisplayMode(p,a,b) (p)->lpVtbl->GetDisplayMode(p,a,b)
-#define IDirect3DDevice9_GetCreationParameters(p,a) (p)->lpVtbl->GetCreationParameters(p,a)
-#define IDirect3DDevice9_SetCursorProperties(p,a,b,c) (p)->lpVtbl->SetCursorProperties(p,a,b,c)
-#define IDirect3DDevice9_SetCursorPosition(p,a,b,c) (p)->lpVtbl->SetCursorPosition(p,a,b,c)
-#define IDirect3DDevice9_ShowCursor(p,a) (p)->lpVtbl->ShowCursor(p,a)
-#define IDirect3DDevice9_CreateAdditionalSwapChain(p,a,b) (p)->lpVtbl->CreateAdditionalSwapChain(p,a,b)
-#define IDirect3DDevice9_GetSwapChain(p,a,b) (p)->lpVtbl->GetSwapChain(p,a,b)
-#define IDirect3DDevice9_GetNumberOfSwapChains(p) (p)->lpVtbl->GetNumberOfSwapChains(p)
-#define IDirect3DDevice9_Reset(p,a) (p)->lpVtbl->Reset(p,a)
-#define IDirect3DDevice9_Present(p,a,b,c,d) (p)->lpVtbl->Present(p,a,b,c,d)
-#define IDirect3DDevice9_GetBackBuffer(p,a,b,c,d) (p)->lpVtbl->GetBackBuffer(p,a,b,c,d)
-#define IDirect3DDevice9_GetRasterStatus(p,a,b) (p)->lpVtbl->GetRasterStatus(p,a,b)
-#define IDirect3DDevice9_SetDialogBoxMode(p,a) (p)->lpVtbl->SetDialogBoxMode(p,a)
-#define IDirect3DDevice9_SetGammaRamp(p,a,b,c) (p)->lpVtbl->SetGammaRamp(p,a,b,c)
-#define IDirect3DDevice9_GetGammaRamp(p,a,b) (p)->lpVtbl->GetGammaRamp(p,a,b)
-#define IDirect3DDevice9_CreateTexture(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->CreateTexture(p,a,b,c,d,e,f,g,h)
-#define IDirect3DDevice9_CreateVolumeTexture(p,a,b,c,d,e,f,g,h,i) (p)->lpVtbl->CreateVolumeTexture(p,a,b,c,d,e,f,g,h,i)
-#define IDirect3DDevice9_CreateCubeTexture(p,a,b,c,d,e,f,g) (p)->lpVtbl->CreateCubeTexture(p,a,b,c,d,e,f,g)
-#define IDirect3DDevice9_CreateVertexBuffer(p,a,b,c,d,e,f) (p)->lpVtbl->CreateVertexBuffer(p,a,b,c,d,e,f)
-#define IDirect3DDevice9_CreateIndexBuffer(p,a,b,c,d,e,f) (p)->lpVtbl->CreateIndexBuffer(p,a,b,c,d,e,f)
-#define IDirect3DDevice9_CreateRenderTarget(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->CreateRenderTarget(p,a,b,c,d,e,f,g,h)
-#define IDirect3DDevice9_CreateDepthStencilSurface(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->CreateDepthStencilSurface(p,a,b,c,d,e,f,g,h)
-#define IDirect3DDevice9_UpdateSurface(p,a,b,c,d) (p)->lpVtbl->UpdateSurface(p,a,b,c,d)
-#define IDirect3DDevice9_UpdateTexture(p,a,b) (p)->lpVtbl->UpdateTexture(p,a,b)
-#define IDirect3DDevice9_GetRenderTargetData(p,a,b) (p)->lpVtbl->GetRenderTargetData(p,a,b)
-#define IDirect3DDevice9_GetFrontBufferData(p,a,b) (p)->lpVtbl->GetFrontBufferData(p,a,b)
-#define IDirect3DDevice9_StretchRect(p,a,b,c,d,e) (p)->lpVtbl->StretchRect(p,a,b,c,d,e)
-#define IDirect3DDevice9_ColorFill(p,a,b,c) (p)->lpVtbl->ColorFill(p,a,b,c)
-#define IDirect3DDevice9_CreateOffscreenPlainSurface(p,a,b,c,d,e,f) (p)->lpVtbl->CreateOffscreenPlainSurface(p,a,b,c,d,e,f)
-#define IDirect3DDevice9_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b)
-#define IDirect3DDevice9_GetRenderTarget(p,a,b) (p)->lpVtbl->GetRenderTarget(p,a,b)
-#define IDirect3DDevice9_SetDepthStencilSurface(p,a) (p)->lpVtbl->SetDepthStencilSurface(p,a)
-#define IDirect3DDevice9_GetDepthStencilSurface(p,a) (p)->lpVtbl->GetDepthStencilSurface(p,a)
-#define IDirect3DDevice9_BeginScene(p) (p)->lpVtbl->BeginScene(p)
-#define IDirect3DDevice9_EndScene(p) (p)->lpVtbl->EndScene(p)
-#define IDirect3DDevice9_Clear(p,a,b,c,d,e,f) (p)->lpVtbl->Clear(p,a,b,c,d,e,f)
-#define IDirect3DDevice9_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b)
-#define IDirect3DDevice9_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b)
-#define IDirect3DDevice9_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b)
-#define IDirect3DDevice9_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a)
-#define IDirect3DDevice9_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a)
-#define IDirect3DDevice9_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a)
-#define IDirect3DDevice9_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a)
-#define IDirect3DDevice9_SetLight(p,a,b) (p)->lpVtbl->SetLight(p,a,b)
-#define IDirect3DDevice9_GetLight(p,a,b) (p)->lpVtbl->GetLight(p,a,b)
-#define IDirect3DDevice9_LightEnable(p,a,b) (p)->lpVtbl->LightEnable(p,a,b)
-#define IDirect3DDevice9_GetLightEnable(p,a,b) (p)->lpVtbl->GetLightEnable(p,a,b)
-#define IDirect3DDevice9_SetClipPlane(p,a,b) (p)->lpVtbl->SetClipPlane(p,a,b)
-#define IDirect3DDevice9_GetClipPlane(p,a,b) (p)->lpVtbl->GetClipPlane(p,a,b)
-#define IDirect3DDevice9_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b)
-#define IDirect3DDevice9_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b)
-#define IDirect3DDevice9_CreateStateBlock(p,a,b) (p)->lpVtbl->CreateStateBlock(p,a,b)
-#define IDirect3DDevice9_BeginStateBlock(p) (p)->lpVtbl->BeginStateBlock(p)
-#define IDirect3DDevice9_EndStateBlock(p,a) (p)->lpVtbl->EndStateBlock(p,a)
-#define IDirect3DDevice9_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a)
-#define IDirect3DDevice9_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a)
-#define IDirect3DDevice9_GetTexture(p,a,b) (p)->lpVtbl->GetTexture(p,a,b)
-#define IDirect3DDevice9_SetTexture(p,a,b) (p)->lpVtbl->SetTexture(p,a,b)
-#define IDirect3DDevice9_GetTextureStageState(p,a,b,c) (p)->lpVtbl->GetTextureStageState(p,a,b,c)
-#define IDirect3DDevice9_SetTextureStageState(p,a,b,c) (p)->lpVtbl->SetTextureStageState(p,a,b,c)
-#define IDirect3DDevice9_GetSamplerState(p,a,b,c) (p)->lpVtbl->GetSamplerState(p,a,b,c)
-#define IDirect3DDevice9_SetSamplerState(p,a,b,c) (p)->lpVtbl->SetSamplerState(p,a,b,c)
-#define IDirect3DDevice9_ValidateDevice(p,a) (p)->lpVtbl->ValidateDevice(p,a)
-#define IDirect3DDevice9_SetPaletteEntries(p,a,b) (p)->lpVtbl->SetPaletteEntries(p,a,b)
-#define IDirect3DDevice9_GetPaletteEntries(p,a,b) (p)->lpVtbl->GetPaletteEntries(p,a,b)
-#define IDirect3DDevice9_SetCurrentTexturePalette(p,a) (p)->lpVtbl->SetCurrentTexturePalette(p,a)
-#define IDirect3DDevice9_GetCurrentTexturePalette(p,a) (p)->lpVtbl->GetCurrentTexturePalette(p,a)
-#define IDirect3DDevice9_SetScissorRect(p,a) (p)->lpVtbl->SetScissorRect(p,a)
-#define IDirect3DDevice9_GetScissorRect(p,a) (p)->lpVtbl->GetScissorRect(p,a)
-#define IDirect3DDevice9_SetSoftwareVertexProcessing(p,a) (p)->lpVtbl->SetSoftwareVertexProcessing(p,a)
-#define IDirect3DDevice9_GetSoftwareVertexProcessing(p) (p)->lpVtbl->GetSoftwareVertexProcessing(p)
-#define IDirect3DDevice9_SetNPatchMode(p,a) (p)->lpVtbl->SetNPatchMode(p,a)
-#define IDirect3DDevice9_GetNPatchMode(p) (p)->lpVtbl->GetNPatchMode(p)
-#define IDirect3DDevice9_DrawPrimitive(p,a,b,c) (p)->lpVtbl->DrawPrimitive(p,a,b,c)
-#define IDirect3DDevice9_DrawIndexedPrimitive(p,a,b,c,d,e,f) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f)
-#define IDirect3DDevice9_DrawPrimitiveUP(p,a,b,c,d) (p)->lpVtbl->DrawPrimitiveUP(p,a,b,c,d)
-#define IDirect3DDevice9_DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h)
-#define IDirect3DDevice9_ProcessVertices(p,a,b,c,d,e,f) (p)->lpVtbl->ProcessVertices(p,a,b,c,d,e,f)
-#define IDirect3DDevice9_CreateVertexDeclaration(p,a,b) (p)->lpVtbl->CreateVertexDeclaration(p,a,b)
-#define IDirect3DDevice9_SetVertexDeclaration(p,a) (p)->lpVtbl->SetVertexDeclaration(p,a)
-#define IDirect3DDevice9_GetVertexDeclaration(p,a) (p)->lpVtbl->GetVertexDeclaration(p,a)
-#define IDirect3DDevice9_SetFVF(p,a) (p)->lpVtbl->SetFVF(p,a)
-#define IDirect3DDevice9_GetFVF(p,a) (p)->lpVtbl->GetFVF(p,a)
-#define IDirect3DDevice9_CreateVertexShader(p,a,b) (p)->lpVtbl->CreateVertexShader(p,a,b)
-#define IDirect3DDevice9_SetVertexShader(p,a) (p)->lpVtbl->SetVertexShader(p,a)
-#define IDirect3DDevice9_GetVertexShader(p,a) (p)->lpVtbl->GetVertexShader(p,a)
-#define IDirect3DDevice9_SetVertexShaderConstantF(p,a,b,c) (p)->lpVtbl->SetVertexShaderConstantF(p,a,b,c)
-#define IDirect3DDevice9_GetVertexShaderConstantF(p,a,b,c) (p)->lpVtbl->GetVertexShaderConstantF(p,a,b,c)
-#define IDirect3DDevice9_SetVertexShaderConstantI(p,a,b,c) (p)->lpVtbl->SetVertexShaderConstantI(p,a,b,c)
-#define IDirect3DDevice9_GetVertexShaderConstantI(p,a,b,c) (p)->lpVtbl->GetVertexShaderConstantI(p,a,b,c)
-#define IDirect3DDevice9_SetVertexShaderConstantB(p,a,b,c) (p)->lpVtbl->SetVertexShaderConstantB(p,a,b,c)
-#define IDirect3DDevice9_GetVertexShaderConstantB(p,a,b,c) (p)->lpVtbl->GetVertexShaderConstantB(p,a,b,c)
-#define IDirect3DDevice9_SetStreamSource(p,a,b,c,d) (p)->lpVtbl->SetStreamSource(p,a,b,c,d)
-#define IDirect3DDevice9_GetStreamSource(p,a,b,c,d) (p)->lpVtbl->GetStreamSource(p,a,b,c,d)
-#define IDirect3DDevice9_SetStreamSourceFreq(p,a,b) (p)->lpVtbl->SetStreamSourceFreq(p,a,b)
-#define IDirect3DDevice9_GetStreamSourceFreq(p,a,b) (p)->lpVtbl->GetStreamSourceFreq(p,a,b)
-#define IDirect3DDevice9_SetIndices(p,a) (p)->lpVtbl->SetIndices(p,a)
-#define IDirect3DDevice9_GetIndices(p,a) (p)->lpVtbl->GetIndices(p,a)
-#define IDirect3DDevice9_CreatePixelShader(p,a,b) (p)->lpVtbl->CreatePixelShader(p,a,b)
-#define IDirect3DDevice9_SetPixelShader(p,a) (p)->lpVtbl->SetPixelShader(p,a)
-#define IDirect3DDevice9_GetPixelShader(p,a) (p)->lpVtbl->GetPixelShader(p,a)
-#define IDirect3DDevice9_SetPixelShaderConstantF(p,a,b,c) (p)->lpVtbl->SetPixelShaderConstantF(p,a,b,c)
-#define IDirect3DDevice9_GetPixelShaderConstantF(p,a,b,c) (p)->lpVtbl->GetPixelShaderConstantF(p,a,b,c)
-#define IDirect3DDevice9_SetPixelShaderConstantI(p,a,b,c) (p)->lpVtbl->SetPixelShaderConstantI(p,a,b,c)
-#define IDirect3DDevice9_GetPixelShaderConstantI(p,a,b,c) (p)->lpVtbl->GetPixelShaderConstantI(p,a,b,c)
-#define IDirect3DDevice9_SetPixelShaderConstantB(p,a,b,c) (p)->lpVtbl->SetPixelShaderConstantB(p,a,b,c)
-#define IDirect3DDevice9_GetPixelShaderConstantB(p,a,b,c) (p)->lpVtbl->GetPixelShaderConstantB(p,a,b,c)
-#define IDirect3DDevice9_DrawRectPatch(p,a,b,c) (p)->lpVtbl->DrawRectPatch(p,a,b,c)
-#define IDirect3DDevice9_DrawTriPatch(p,a,b,c) (p)->lpVtbl->DrawTriPatch(p,a,b,c)
-#define IDirect3DDevice9_DeletePatch(p,a) (p)->lpVtbl->DeletePatch(p,a)
-#define IDirect3DDevice9_CreateQuery(p,a,b) (p)->lpVtbl->CreateQuery(p,a,b)
-#else
-#define IDirect3DDevice9_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirect3DDevice9_AddRef(p) (p)->AddRef()
-#define IDirect3DDevice9_Release(p) (p)->Release()
-#define IDirect3DDevice9_TestCooperativeLevel(p) (p)->TestCooperativeLevel()
-#define IDirect3DDevice9_GetAvailableTextureMem(p) (p)->GetAvailableTextureMem()
-#define IDirect3DDevice9_EvictManagedResources(p) (p)->EvictManagedResources()
-#define IDirect3DDevice9_GetDirect3D(p,a) (p)->GetDirect3D(a)
-#define IDirect3DDevice9_GetDeviceCaps(p,a) (p)->GetDeviceCaps(a)
-#define IDirect3DDevice9_GetDisplayMode(p,a,b) (p)->GetDisplayMode(a,b)
-#define IDirect3DDevice9_GetCreationParameters(p,a) (p)->GetCreationParameters(a)
-#define IDirect3DDevice9_SetCursorProperties(p,a,b,c) (p)->SetCursorProperties(a,b,c)
-#define IDirect3DDevice9_SetCursorPosition(p,a,b,c) (p)->SetCursorPosition(a,b,c)
-#define IDirect3DDevice9_ShowCursor(p,a) (p)->ShowCursor(a)
-#define IDirect3DDevice9_CreateAdditionalSwapChain(p,a,b) (p)->CreateAdditionalSwapChain(a,b)
-#define IDirect3DDevice9_GetSwapChain(p,a,b) (p)->GetSwapChain(a,b)
-#define IDirect3DDevice9_GetNumberOfSwapChains(p) (p)->GetNumberOfSwapChains()
-#define IDirect3DDevice9_Reset(p,a) (p)->Reset(a)
-#define IDirect3DDevice9_Present(p,a,b,c,d) (p)->Present(a,b,c,d)
-#define IDirect3DDevice9_GetBackBuffer(p,a,b,c,d) (p)->GetBackBuffer(a,b,c,d)
-#define IDirect3DDevice9_GetRasterStatus(p,a,b) (p)->GetRasterStatus(a,b)
-#define IDirect3DDevice9_SetDialogBoxMode(p,a) (p)->SetDialogBoxMode(a)
-#define IDirect3DDevice9_SetGammaRamp(p,a,b,c) (p)->SetGammaRamp(a,b,c)
-#define IDirect3DDevice9_GetGammaRamp(p,a,b) (p)->GetGammaRamp(a,b)
-#define IDirect3DDevice9_CreateTexture(p,a,b,c,d,e,f,g,h) (p)->CreateTexture(a,b,c,d,e,f,g,h)
-#define IDirect3DDevice9_CreateVolumeTexture(p,a,b,c,d,e,f,g,h,i) (p)->CreateVolumeTexture(a,b,c,d,e,f,g,h,i)
-#define IDirect3DDevice9_CreateCubeTexture(p,a,b,c,d,e,f,g) (p)->CreateCubeTexture(a,b,c,d,e,f,g)
-#define IDirect3DDevice9_CreateVertexBuffer(p,a,b,c,d,e,f) (p)->CreateVertexBuffer(a,b,c,d,e,f)
-#define IDirect3DDevice9_CreateIndexBuffer(p,a,b,c,d,e,f) (p)->CreateIndexBuffer(a,b,c,d,e,f)
-#define IDirect3DDevice9_CreateRenderTarget(p,a,b,c,d,e,f,g,h) (p)->CreateRenderTarget(a,b,c,d,e,f,g,h)
-#define IDirect3DDevice9_CreateDepthStencilSurface(p,a,b,c,d,e,f,g,h) (p)->CreateDepthStencilSurface(a,b,c,d,e,f,g,h)
-#define IDirect3DDevice9_UpdateSurface(p,a,b,c,d) (p)->UpdateSurface(a,b,c,d)
-#define IDirect3DDevice9_UpdateTexture(p,a,b) (p)->UpdateTexture(a,b)
-#define IDirect3DDevice9_GetRenderTargetData(p,a,b) (p)->GetRenderTargetData(a,b)
-#define IDirect3DDevice9_GetFrontBufferData(p,a,b) (p)->GetFrontBufferData(a,b)
-#define IDirect3DDevice9_StretchRect(p,a,b,c,d,e) (p)->StretchRect(a,b,c,d,e)
-#define IDirect3DDevice9_ColorFill(p,a,b,c) (p)->ColorFill(a,b,c)
-#define IDirect3DDevice9_CreateOffscreenPlainSurface(p,a,b,c,d,e,f) (p)->CreateOffscreenPlainSurface(a,b,c,d,e,f)
-#define IDirect3DDevice9_SetRenderTarget(p,a,b) (p)->SetRenderTarget(a,b)
-#define IDirect3DDevice9_GetRenderTarget(p,a,b) (p)->GetRenderTarget(a,b)
-#define IDirect3DDevice9_SetDepthStencilSurface(p,a) (p)->SetDepthStencilSurface(a)
-#define IDirect3DDevice9_GetDepthStencilSurface(p,a) (p)->GetDepthStencilSurface(a)
-#define IDirect3DDevice9_BeginScene(p) (p)->BeginScene()
-#define IDirect3DDevice9_EndScene(p) (p)->EndScene()
-#define IDirect3DDevice9_Clear(p,a,b,c,d,e,f) (p)->Clear(a,b,c,d,e,f)
-#define IDirect3DDevice9_SetTransform(p,a,b) (p)->SetTransform(a,b)
-#define IDirect3DDevice9_GetTransform(p,a,b) (p)->GetTransform(a,b)
-#define IDirect3DDevice9_MultiplyTransform(p,a,b) (p)->MultiplyTransform(a,b)
-#define IDirect3DDevice9_SetViewport(p,a) (p)->SetViewport(a)
-#define IDirect3DDevice9_GetViewport(p,a) (p)->GetViewport(a)
-#define IDirect3DDevice9_SetMaterial(p,a) (p)->SetMaterial(a)
-#define IDirect3DDevice9_GetMaterial(p,a) (p)->GetMaterial(a)
-#define IDirect3DDevice9_SetLight(p,a,b) (p)->SetLight(a,b)
-#define IDirect3DDevice9_GetLight(p,a,b) (p)->GetLight(a,b)
-#define IDirect3DDevice9_LightEnable(p,a,b) (p)->LightEnable(a,b)
-#define IDirect3DDevice9_GetLightEnable(p,a,b) (p)->GetLightEnable(a,b)
-#define IDirect3DDevice9_SetClipPlane(p,a,b) (p)->SetClipPlane(a,b)
-#define IDirect3DDevice9_GetClipPlane(p,a,b) (p)->GetClipPlane(a,b)
-#define IDirect3DDevice9_SetRenderState(p,a,b) (p)->SetRenderState(a,b)
-#define IDirect3DDevice9_GetRenderState(p,a,b) (p)->GetRenderState(a,b)
-#define IDirect3DDevice9_CreateStateBlock(p,a,b) (p)->CreateStateBlock(a,b)
-#define IDirect3DDevice9_BeginStateBlock(p) (p)->BeginStateBlock()
-#define IDirect3DDevice9_EndStateBlock(p,a) (p)->EndStateBlock(a)
-#define IDirect3DDevice9_SetClipStatus(p,a) (p)->SetClipStatus(a)
-#define IDirect3DDevice9_GetClipStatus(p,a) (p)->GetClipStatus(a)
-#define IDirect3DDevice9_GetTexture(p,a,b) (p)->GetTexture(a,b)
-#define IDirect3DDevice9_SetTexture(p,a,b) (p)->SetTexture(a,b)
-#define IDirect3DDevice9_GetTextureStageState(p,a,b,c) (p)->GetTextureStageState(a,b,c)
-#define IDirect3DDevice9_SetTextureStageState(p,a,b,c) (p)->SetTextureStageState(a,b,c)
-#define IDirect3DDevice9_GetSamplerState(p,a,b,c) (p)->GetSamplerState(a,b,c)
-#define IDirect3DDevice9_SetSamplerState(p,a,b,c) (p)->SetSamplerState(a,b,c)
-#define IDirect3DDevice9_ValidateDevice(p,a) (p)->ValidateDevice(a)
-#define IDirect3DDevice9_SetPaletteEntries(p,a,b) (p)->SetPaletteEntries(a,b)
-#define IDirect3DDevice9_GetPaletteEntries(p,a,b) (p)->GetPaletteEntries(a,b)
-#define IDirect3DDevice9_SetCurrentTexturePalette(p,a) (p)->SetCurrentTexturePalette(a)
-#define IDirect3DDevice9_GetCurrentTexturePalette(p,a) (p)->GetCurrentTexturePalette(a)
-#define IDirect3DDevice9_SetScissorRect(p,a) (p)->SetScissorRect(a)
-#define IDirect3DDevice9_GetScissorRect(p,a) (p)->GetScissorRect(a)
-#define IDirect3DDevice9_SetSoftwareVertexProcessing(p,a) (p)->SetSoftwareVertexProcessing(a)
-#define IDirect3DDevice9_GetSoftwareVertexProcessing(p) (p)->GetSoftwareVertexProcessing()
-#define IDirect3DDevice9_SetNPatchMode(p,a) (p)->SetNPatchMode(a)
-#define IDirect3DDevice9_GetNPatchMode(p) (p)->GetNPatchMode()
-#define IDirect3DDevice9_DrawPrimitive(p,a,b,c) (p)->DrawPrimitive(a,b,c)
-#define IDirect3DDevice9_DrawIndexedPrimitive(p,a,b,c,d,e,f) (p)->DrawIndexedPrimitive(a,b,c,d,e,f)
-#define IDirect3DDevice9_DrawPrimitiveUP(p,a,b,c,d) (p)->DrawPrimitiveUP(a,b,c,d)
-#define IDirect3DDevice9_DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h) (p)->DrawIndexedPrimitiveUP(a,b,c,d,e,f,g,h)
-#define IDirect3DDevice9_ProcessVertices(p,a,b,c,d,e,f) (p)->ProcessVertices(a,b,c,d,e,f)
-#define IDirect3DDevice9_CreateVertexDeclaration(p,a,b) (p)->CreateVertexDeclaration(a,b)
-#define IDirect3DDevice9_SetVertexDeclaration(p,a) (p)->SetVertexDeclaration(a)
-#define IDirect3DDevice9_GetVertexDeclaration(p,a) (p)->GetVertexDeclaration(a)
-#define IDirect3DDevice9_SetFVF(p,a) (p)->SetFVF(a)
-#define IDirect3DDevice9_GetFVF(p,a) (p)->GetFVF(a)
-#define IDirect3DDevice9_CreateVertexShader(p,a,b) (p)->CreateVertexShader(a,b)
-#define IDirect3DDevice9_SetVertexShader(p,a) (p)->SetVertexShader(a)
-#define IDirect3DDevice9_GetVertexShader(p,a) (p)->GetVertexShader(a)
-#define IDirect3DDevice9_SetVertexShaderConstantF(p,a,b,c) (p)->SetVertexShaderConstantF(a,b,c)
-#define IDirect3DDevice9_GetVertexShaderConstantF(p,a,b,c) (p)->GetVertexShaderConstantF(a,b,c)
-#define IDirect3DDevice9_SetVertexShaderConstantI(p,a,b,c) (p)->SetVertexShaderConstantI(a,b,c)
-#define IDirect3DDevice9_GetVertexShaderConstantI(p,a,b,c) (p)->GetVertexShaderConstantI(a,b,c)
-#define IDirect3DDevice9_SetVertexShaderConstantB(p,a,b,c) (p)->SetVertexShaderConstantB(a,b,c)
-#define IDirect3DDevice9_GetVertexShaderConstantB(p,a,b,c) (p)->GetVertexShaderConstantB(a,b,c)
-#define IDirect3DDevice9_SetStreamSource(p,a,b,c,d) (p)->SetStreamSource(a,b,c,d)
-#define IDirect3DDevice9_GetStreamSource(p,a,b,c,d) (p)->GetStreamSource(a,b,c,d)
-#define IDirect3DDevice9_SetStreamSourceFreq(p,a,b) (p)->SetStreamSourceFreq(a,b)
-#define IDirect3DDevice9_GetStreamSourceFreq(p,a,b) (p)->GetStreamSourceFreq(a,b)
-#define IDirect3DDevice9_SetIndices(p,a) (p)->SetIndices(a)
-#define IDirect3DDevice9_GetIndices(p,a) (p)->GetIndices(a)
-#define IDirect3DDevice9_CreatePixelShader(p,a,b) (p)->CreatePixelShader(a,b)
-#define IDirect3DDevice9_SetPixelShader(p,a) (p)->SetPixelShader(a)
-#define IDirect3DDevice9_GetPixelShader(p,a) (p)->GetPixelShader(a)
-#define IDirect3DDevice9_SetPixelShaderConstantF(p,a,b,c) (p)->SetPixelShaderConstantF(a,b,c)
-#define IDirect3DDevice9_GetPixelShaderConstantF(p,a,b,c) (p)->GetPixelShaderConstantF(a,b,c)
-#define IDirect3DDevice9_SetPixelShaderConstantI(p,a,b,c) (p)->SetPixelShaderConstantI(a,b,c)
-#define IDirect3DDevice9_GetPixelShaderConstantI(p,a,b,c) (p)->GetPixelShaderConstantI(a,b,c)
-#define IDirect3DDevice9_SetPixelShaderConstantB(p,a,b,c) (p)->SetPixelShaderConstantB(a,b,c)
-#define IDirect3DDevice9_GetPixelShaderConstantB(p,a,b,c) (p)->GetPixelShaderConstantB(a,b,c)
-#define IDirect3DDevice9_DrawRectPatch(p,a,b,c) (p)->DrawRectPatch(a,b,c)
-#define IDirect3DDevice9_DrawTriPatch(p,a,b,c) (p)->DrawTriPatch(a,b,c)
-#define IDirect3DDevice9_DeletePatch(p,a) (p)->DeletePatch(a)
-#define IDirect3DDevice9_CreateQuery(p,a,b) (p)->CreateQuery(a,b)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DVolume9
-DECLARE_INTERFACE_(IDirect3DVolume9,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
- STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
- STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
- STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
- STDMETHOD(GetContainer)(THIS_ REFIID,void**) PURE;
- STDMETHOD(GetDesc)(THIS_ D3DVOLUME_DESC*) PURE;
- STDMETHOD(LockBox)(THIS_ D3DLOCKED_BOX*,CONST D3DBOX*,DWORD) PURE;
- STDMETHOD(UnlockBox)(THIS) PURE;
-};
-typedef struct IDirect3DVolume9 *LPDIRECT3DVOLUME9, *PDIRECT3DVOLUME9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DVolume9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DVolume9_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IDirect3DVolume9_Release(p) (p)->lpVtbl->Release(p)
-#define IDirect3DVolume9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DVolume9_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
-#define IDirect3DVolume9_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
-#define IDirect3DVolume9_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
-#define IDirect3DVolume9_GetContainer(p,a,b) (p)->lpVtbl->GetContainer(p,a,b)
-#define IDirect3DVolume9_GetDesc(p,a) (p)->lpVtbl->GetDesc(p,a)
-#define IDirect3DVolume9_LockBox(p,a,b,c) (p)->lpVtbl->LockBox(p,a,b,c)
-#define IDirect3DVolume9_UnlockBox(p) (p)->lpVtbl->UnlockBox(p)
-#else
-#define IDirect3DVolume9_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirect3DVolume9_AddRef(p) (p)->AddRef()
-#define IDirect3DVolume9_Release(p) (p)->Release()
-#define IDirect3DVolume9_GetDevice(p,a) (p)->GetDevice(a)
-#define IDirect3DVolume9_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
-#define IDirect3DVolume9_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
-#define IDirect3DVolume9_FreePrivateData(p,a) (p)->FreePrivateData(a)
-#define IDirect3DVolume9_GetContainer(p,a,b) (p)->GetContainer(a,b)
-#define IDirect3DVolume9_GetDesc(p,a) (p)->GetDesc(a)
-#define IDirect3DVolume9_LockBox(p,a,b,c) (p)->LockBox(a,b,c)
-#define IDirect3DVolume9_UnlockBox(p) (p)->UnlockBox()
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DSwapChain9
-DECLARE_INTERFACE_(IDirect3DSwapChain9,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Present)(THIS_ CONST RECT*,CONST RECT*,HWND,CONST RGNDATA*,DWORD) PURE;
- STDMETHOD(GetFrontBufferData)(THIS_ IDirect3DSurface9*) PURE;
- STDMETHOD(GetBackBuffer)(THIS_ UINT,D3DBACKBUFFER_TYPE,IDirect3DSurface9**) PURE;
- STDMETHOD(GetRasterStatus)(THIS_ D3DRASTER_STATUS*) PURE;
- STDMETHOD(GetDisplayMode)(THIS_ D3DDISPLAYMODE*) PURE;
- STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
- STDMETHOD(GetPresentParameters)(THIS_ D3DPRESENT_PARAMETERS*) PURE;
-};
-typedef struct IDirect3DSwapChain9 *LPDIRECT3DSWAPCHAIN9, *PDIRECT3DSWAPCHAIN9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DSwapChain9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DSwapChain9_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IDirect3DSwapChain9_Release(p) (p)->lpVtbl->Release(p)
-#define IDirect3DSwapChain9_Present(p,a,b,c,d,e) (p)->lpVtbl->Present(p,a,b,c,d,e)
-#define IDirect3DSwapChain9_GetFrontBufferData(p,a) (p)->lpVtbl->GetFrontBufferData(p,a)
-#define IDirect3DSwapChain9_GetBackBuffer(p,a,b,c) (p)->lpVtbl->GetBackBuffer(p,a,b,c)
-#define IDirect3DSwapChain9_GetRasterStatus(p,a) (p)->lpVtbl->GetRasterStatus(p,a)
-#define IDirect3DSwapChain9_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a)
-#define IDirect3DSwapChain9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DSwapChain9_GetPresentParameters(p,a) (p)->lpVtbl->GetPresentParameters(p,a)
-#else
-#define IDirect3DSwapChain9_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirect3DSwapChain9_AddRef(p) (p)->AddRef()
-#define IDirect3DSwapChain9_Release(p) (p)->Release()
-#define IDirect3DSwapChain9_Present(p,a,b,c,d,e) (p)->Present(a,b,c,d,e)
-#define IDirect3DSwapChain9_GetFrontBufferData(p,a) (p)->GetFrontBufferData(a)
-#define IDirect3DSwapChain9_GetBackBuffer(p,a,b,c) (p)->GetBackBuffer(a,b,c)
-#define IDirect3DSwapChain9_GetRasterStatus(p,a) (p)->GetRasterStatus(a)
-#define IDirect3DSwapChain9_GetDisplayMode(p,a) (p)->GetDisplayMode(a)
-#define IDirect3DSwapChain9_GetDevice(p,a) (p)->GetDevice(a)
-#define IDirect3DSwapChain9_GetPresentParameters(p,a) (p)->GetPresentParameters(a)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DResource9
-DECLARE_INTERFACE_(IDirect3DResource9,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
- STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
- STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
- STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
- STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD) PURE;
- STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
- STDMETHOD_(void,PreLoad)(THIS) PURE;
- STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE;
-};
-typedef struct IDirect3DResource9 *LPDIRECT3DRESOURCE9, *PDIRECT3DRESOURCE9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DResource9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DResource9_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IDirect3DResource9_Release(p) (p)->lpVtbl->Release(p)
-#define IDirect3DResource9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DResource9_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
-#define IDirect3DResource9_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
-#define IDirect3DResource9_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
-#define IDirect3DResource9_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
-#define IDirect3DResource9_GetPriority(p) (p)->lpVtbl->GetPriority(p)
-#define IDirect3DResource9_PreLoad(p) (p)->lpVtbl->PreLoad(p)
-#define IDirect3DResource9_GetType(p) (p)->lpVtbl->GetType(p)
-#else
-#define IDirect3DResource9_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirect3DResource9_AddRef(p) (p)->AddRef()
-#define IDirect3DResource9_Release(p) (p)->Release()
-#define IDirect3DResource9_GetDevice(p,a) (p)->GetDevice(a)
-#define IDirect3DResource9_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
-#define IDirect3DResource9_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
-#define IDirect3DResource9_FreePrivateData(p,a) (p)->FreePrivateData(a)
-#define IDirect3DResource9_SetPriority(p,a) (p)->SetPriority(a)
-#define IDirect3DResource9_GetPriority(p) (p)->GetPriority()
-#define IDirect3DResource9_PreLoad(p) (p)->PreLoad()
-#define IDirect3DResource9_GetType(p) (p)->GetType()
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DSurface9
-DECLARE_INTERFACE_(IDirect3DSurface9,IDirect3DResource9)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
- STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
- STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
- STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
- STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD) PURE;
- STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
- STDMETHOD_(void,PreLoad)(THIS) PURE;
- STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE;
- STDMETHOD(GetContainer)(THIS_ REFIID,void**) PURE;
- STDMETHOD(GetDesc)(THIS_ D3DSURFACE_DESC*) PURE;
- STDMETHOD(LockRect)(THIS_ D3DLOCKED_RECT*,CONST RECT*,DWORD) PURE;
- STDMETHOD(UnlockRect)(THIS) PURE;
- STDMETHOD(GetDC)(THIS_ HDC*) PURE;
- STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
-};
-typedef struct IDirect3DSurface9 *LPDIRECT3DSURFACE9, *PDIRECT3DSURFACE9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DSurface9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DSurface9_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IDirect3DSurface9_Release(p) (p)->lpVtbl->Release(p)
-#define IDirect3DSurface9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DSurface9_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
-#define IDirect3DSurface9_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
-#define IDirect3DSurface9_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
-#define IDirect3DSurface9_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
-#define IDirect3DSurface9_GetPriority(p) (p)->lpVtbl->GetPriority(p)
-#define IDirect3DSurface9_PreLoad(p) (p)->lpVtbl->PreLoad(p)
-#define IDirect3DSurface9_GetType(p) (p)->lpVtbl->GetType(p)
-#define IDirect3DSurface9_GetContainer(p,a,b) (p)->lpVtbl->GetContainer(p,a,b)
-#define IDirect3DSurface9_GetDesc(p,a) (p)->lpVtbl->GetDesc(p,a)
-#define IDirect3DSurface9_LockRect(p,a,b,c) (p)->lpVtbl->LockRect(p,a,b,c)
-#define IDirect3DSurface9_UnlockRect(p) (p)->lpVtbl->UnlockRect(p)
-#define IDirect3DSurface9_GetDC(p,a) (p)->lpVtbl->GetDC(p,a)
-#define IDirect3DSurface9_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a)
-#else
-#define IDirect3DSurface9_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirect3DSurface9_AddRef(p) (p)->AddRef()
-#define IDirect3DSurface9_Release(p) (p)->Release()
-#define IDirect3DSurface9_GetDevice(p,a) (p)->GetDevice(a)
-#define IDirect3DSurface9_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
-#define IDirect3DSurface9_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
-#define IDirect3DSurface9_FreePrivateData(p,a) (p)->FreePrivateData(a)
-#define IDirect3DSurface9_SetPriority(p,a) (p)->SetPriority(a)
-#define IDirect3DSurface9_GetPriority(p) (p)->GetPriority()
-#define IDirect3DSurface9_PreLoad(p) (p)->PreLoad()
-#define IDirect3DSurface9_GetType(p) (p)->GetType()
-#define IDirect3DSurface9_GetContainer(p,a,b) (p)->GetContainer(a,b)
-#define IDirect3DSurface9_GetDesc(p,a) (p)->GetDesc(a)
-#define IDirect3DSurface9_LockRect(p,a,b,c) (p)->LockRect(a,b,c)
-#define IDirect3DSurface9_UnlockRect(p) (p)->UnlockRect()
-#define IDirect3DSurface9_GetDC(p,a) (p)->GetDC(a)
-#define IDirect3DSurface9_ReleaseDC(p,a) (p)->ReleaseDC(a)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DVertexBuffer9
-DECLARE_INTERFACE_(IDirect3DVertexBuffer9,IDirect3DResource9)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
- STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
- STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
- STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
- STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD) PURE;
- STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
- STDMETHOD_(void,PreLoad)(THIS) PURE;
- STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE;
- STDMETHOD(Lock)(THIS_ UINT,UINT,void**,DWORD) PURE;
- STDMETHOD(Unlock)(THIS) PURE;
- STDMETHOD(GetDesc)(THIS_ D3DVERTEXBUFFER_DESC*) PURE;
-};
-typedef struct IDirect3DVertexBuffer9 *LPDIRECT3DVERTEXBUFFER9, *PDIRECT3DVERTEXBUFFER9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DVertexBuffer9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DVertexBuffer9_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IDirect3DVertexBuffer9_Release(p) (p)->lpVtbl->Release(p)
-#define IDirect3DVertexBuffer9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DVertexBuffer9_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
-#define IDirect3DVertexBuffer9_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
-#define IDirect3DVertexBuffer9_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
-#define IDirect3DVertexBuffer9_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
-#define IDirect3DVertexBuffer9_GetPriority(p) (p)->lpVtbl->GetPriority(p)
-#define IDirect3DVertexBuffer9_PreLoad(p) (p)->lpVtbl->PreLoad(p)
-#define IDirect3DVertexBuffer9_GetType(p) (p)->lpVtbl->GetType(p)
-#define IDirect3DVertexBuffer9_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
-#define IDirect3DVertexBuffer9_Unlock(p) (p)->lpVtbl->Unlock(p)
-#define IDirect3DVertexBuffer9_GetDesc(p,a) (p)->lpVtbl->GetDesc(p,a)
-#else
-#define IDirect3DVertexBuffer9_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirect3DVertexBuffer9_AddRef(p) (p)->AddRef()
-#define IDirect3DVertexBuffer9_Release(p) (p)->Release()
-#define IDirect3DVertexBuffer9_GetDevice(p,a) (p)->GetDevice(a)
-#define IDirect3DVertexBuffer9_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
-#define IDirect3DVertexBuffer9_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
-#define IDirect3DVertexBuffer9_FreePrivateData(p,a) (p)->FreePrivateData(a)
-#define IDirect3DVertexBuffer9_SetPriority(p,a) (p)->SetPriority(a)
-#define IDirect3DVertexBuffer9_GetPriority(p) (p)->GetPriority()
-#define IDirect3DVertexBuffer9_PreLoad(p) (p)->PreLoad()
-#define IDirect3DVertexBuffer9_GetType(p) (p)->GetType()
-#define IDirect3DVertexBuffer9_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
-#define IDirect3DVertexBuffer9_Unlock(p) (p)->Unlock()
-#define IDirect3DVertexBuffer9_GetDesc(p,a) (p)->GetDesc(a)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DIndexBuffer9
-DECLARE_INTERFACE_(IDirect3DIndexBuffer9,IDirect3DResource9)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
- STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
- STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
- STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
- STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD) PURE;
- STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
- STDMETHOD_(void,PreLoad)(THIS) PURE;
- STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE;
- STDMETHOD(Lock)(THIS_ UINT,UINT,void**,DWORD) PURE;
- STDMETHOD(Unlock)(THIS) PURE;
- STDMETHOD(GetDesc)(THIS_ D3DINDEXBUFFER_DESC*) PURE;
-};
-typedef struct IDirect3DIndexBuffer9 *LPDIRECT3DINDEXBUFFER9, *PDIRECT3DINDEXBUFFER9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DIndexBuffer9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DIndexBuffer9_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IDirect3DIndexBuffer9_Release(p) (p)->lpVtbl->Release(p)
-#define IDirect3DIndexBuffer9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DIndexBuffer9_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
-#define IDirect3DIndexBuffer9_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
-#define IDirect3DIndexBuffer9_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
-#define IDirect3DIndexBuffer9_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
-#define IDirect3DIndexBuffer9_GetPriority(p) (p)->lpVtbl->GetPriority(p)
-#define IDirect3DIndexBuffer9_PreLoad(p) (p)->lpVtbl->PreLoad(p)
-#define IDirect3DIndexBuffer9_GetType(p) (p)->lpVtbl->GetType(p)
-#define IDirect3DIndexBuffer9_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d)
-#define IDirect3DIndexBuffer9_Unlock(p) (p)->lpVtbl->Unlock(p)
-#define IDirect3DIndexBuffer9_GetDesc(p,a) (p)->lpVtbl->GetDesc(p,a)
-#else
-#define IDirect3DIndexBuffer9_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirect3DIndexBuffer9_AddRef(p) (p)->AddRef()
-#define IDirect3DIndexBuffer9_Release(p) (p)->Release()
-#define IDirect3DIndexBuffer9_GetDevice(p,a) (p)->GetDevice(a)
-#define IDirect3DIndexBuffer9_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
-#define IDirect3DIndexBuffer9_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
-#define IDirect3DIndexBuffer9_FreePrivateData(p,a) (p)->FreePrivateData(a)
-#define IDirect3DIndexBuffer9_SetPriority(p,a) (p)->SetPriority(a)
-#define IDirect3DIndexBuffer9_GetPriority(p) (p)->GetPriority()
-#define IDirect3DIndexBuffer9_PreLoad(p) (p)->PreLoad()
-#define IDirect3DIndexBuffer9_GetType(p) (p)->GetType()
-#define IDirect3DIndexBuffer9_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d)
-#define IDirect3DIndexBuffer9_Unlock(p) (p)->Unlock()
-#define IDirect3DIndexBuffer9_GetDesc(p,a) (p)->GetDesc(a)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DBaseTexture9
-DECLARE_INTERFACE_(IDirect3DBaseTexture9,IDirect3DResource9)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
- STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
- STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
- STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
- STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD) PURE;
- STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
- STDMETHOD_(void,PreLoad)(THIS) PURE;
- STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE;
- STDMETHOD_(DWORD,SetLOD)(THIS_ DWORD) PURE;
- STDMETHOD_(DWORD,GetLOD)(THIS) PURE;
- STDMETHOD_(DWORD,GetLevelCount)(THIS) PURE;
- STDMETHOD(SetAutoGenFilterType)(THIS_ D3DTEXTUREFILTERTYPE) PURE;
- STDMETHOD_(D3DTEXTUREFILTERTYPE,GetAutoGenFilterType)(THIS) PURE;
- STDMETHOD_(void,GenerateMipSubLevels)(THIS) PURE;
-};
-typedef struct IDirect3DBaseTexture9 *LPDIRECT3DBASETEXTURE9, *PDIRECT3DBASETEXTURE9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DBaseTexture9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DBaseTexture9_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IDirect3DBaseTexture9_Release(p) (p)->lpVtbl->Release(p)
-#define IDirect3DBaseTexture9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DBaseTexture9_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
-#define IDirect3DBaseTexture9_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
-#define IDirect3DBaseTexture9_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
-#define IDirect3DBaseTexture9_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
-#define IDirect3DBaseTexture9_GetPriority(p) (p)->lpVtbl->GetPriority(p)
-#define IDirect3DBaseTexture9_PreLoad(p) (p)->lpVtbl->PreLoad(p)
-#define IDirect3DBaseTexture9_GetType(p) (p)->lpVtbl->GetType(p)
-#define IDirect3DBaseTexture9_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a)
-#define IDirect3DBaseTexture9_GetLOD(p) (p)->lpVtbl->GetLOD(p)
-#define IDirect3DBaseTexture9_GetLevelCount(p) (p)->lpVtbl->GetLevelCount(p)
-#define IDirect3DBaseTexture9_SetAutoGenFilterType(p,a) (p)->lpVtbl->SetAutoGenFilterType(p,a)
-#define IDirect3DBaseTexture9_GetAutoGenFilterType(p) (p)->lpVtbl->GetAutoGenFilterType(p)
-#define IDirect3DBaseTexture9_GenerateMipSubLevels(p) (p)->lpVtbl->GenerateMipSubLevels(p)
-#else
-#define IDirect3DBaseTexture9_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirect3DBaseTexture9_AddRef(p) (p)->AddRef()
-#define IDirect3DBaseTexture9_Release(p) (p)->Release()
-#define IDirect3DBaseTexture9_GetDevice(p,a) (p)->GetDevice(a)
-#define IDirect3DBaseTexture9_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
-#define IDirect3DBaseTexture9_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
-#define IDirect3DBaseTexture9_FreePrivateData(p,a) (p)->FreePrivateData(a)
-#define IDirect3DBaseTexture9_SetPriority(p,a) (p)->SetPriority(a)
-#define IDirect3DBaseTexture9_GetPriority(p) (p)->GetPriority()
-#define IDirect3DBaseTexture9_PreLoad(p) (p)->PreLoad()
-#define IDirect3DBaseTexture9_GetType(p) (p)->GetType()
-#define IDirect3DBaseTexture9_SetLOD(p,a) (p)->SetLOD(a)
-#define IDirect3DBaseTexture9_GetLOD(p) (p)->GetLOD()
-#define IDirect3DBaseTexture9_GetLevelCount(p) (p)->GetLevelCount()
-#define IDirect3DBaseTexture9_SetAutoGenFilterType(p,a) (p)->SetAutoGenFilterType(a)
-#define IDirect3DBaseTexture9_GetAutoGenFilterType(p) (p)->GetAutoGenFilterType()
-#define IDirect3DBaseTexture9_GenerateMipSubLevels(p) (p)->GenerateMipSubLevels()
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DCubeTexture9
-DECLARE_INTERFACE_(IDirect3DCubeTexture9,IDirect3DBaseTexture9)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
- STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
- STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
- STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
- STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD) PURE;
- STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
- STDMETHOD_(void,PreLoad)(THIS) PURE;
- STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE;
- STDMETHOD_(DWORD,SetLOD)(THIS_ DWORD) PURE;
- STDMETHOD_(DWORD,GetLOD)(THIS) PURE;
- STDMETHOD_(DWORD,GetLevelCount)(THIS) PURE;
- STDMETHOD(SetAutoGenFilterType)(THIS_ D3DTEXTUREFILTERTYPE) PURE;
- STDMETHOD_(D3DTEXTUREFILTERTYPE,GetAutoGenFilterType)(THIS) PURE;
- STDMETHOD_(void,GenerateMipSubLevels)(THIS) PURE;
- STDMETHOD(GetLevelDesc)(THIS_ UINT,D3DSURFACE_DESC*) PURE; \
- STDMETHOD(GetCubeMapSurface)(THIS_ D3DCUBEMAP_FACES,UINT,IDirect3DSurface9**) PURE; \
- STDMETHOD(LockRect)(THIS_ D3DCUBEMAP_FACES,UINT,D3DLOCKED_RECT*,CONST RECT*,DWORD) PURE; \
- STDMETHOD(UnlockRect)(THIS_ D3DCUBEMAP_FACES,UINT) PURE; \
- STDMETHOD(AddDirtyRect)(THIS_ D3DCUBEMAP_FACES,CONST RECT*) PURE;
-};
-typedef struct IDirect3DCubeTexture9 *LPDIRECT3DCUBETEXTURE9, *PDIRECT3DCUBETEXTURE9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DCubeTexture9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DCubeTexture9_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IDirect3DCubeTexture9_Release(p) (p)->lpVtbl->Release(p)
-#define IDirect3DCubeTexture9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DCubeTexture9_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
-#define IDirect3DCubeTexture9_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
-#define IDirect3DCubeTexture9_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
-#define IDirect3DCubeTexture9_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
-#define IDirect3DCubeTexture9_GetPriority(p) (p)->lpVtbl->GetPriority(p)
-#define IDirect3DCubeTexture9_PreLoad(p) (p)->lpVtbl->PreLoad(p)
-#define IDirect3DCubeTexture9_GetType(p) (p)->lpVtbl->GetType(p)
-#define IDirect3DCubeTexture9_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a)
-#define IDirect3DCubeTexture9_GetLOD(p) (p)->lpVtbl->GetLOD(p)
-#define IDirect3DCubeTexture9_GetLevelCount(p) (p)->lpVtbl->GetLevelCount(p)
-#define IDirect3DCubeTexture9_SetAutoGenFilterType(p,a) (p)->lpVtbl->SetAutoGenFilterType(p,a)
-#define IDirect3DCubeTexture9_GetAutoGenFilterType(p) (p)->lpVtbl->GetAutoGenFilterType(p)
-#define IDirect3DCubeTexture9_GenerateMipSubLevels(p) (p)->lpVtbl->GenerateMipSubLevels(p)
-#define IDirect3DCubeTexture9_GetLevelDesc(p,a,b) (p)->lpVtbl->GetLevelDesc(p,a,b)
-#define IDirect3DCubeTexture9_GetCubeMapSurface(p,a,b,c) (p)->lpVtbl->GetCubeMapSurface(p,a,b,c)
-#define IDirect3DCubeTexture9_LockRect(p,a,b,c,d,e) (p)->lpVtbl->LockRect(p,a,b,c,d,e)
-#define IDirect3DCubeTexture9_UnlockRect(p,a,b) (p)->lpVtbl->UnlockRect(p,a,b)
-#define IDirect3DCubeTexture9_AddDirtyRect(p,a,b) (p)->lpVtbl->AddDirtyRect(p,a,b)
-#else
-#define IDirect3DCubeTexture9_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirect3DCubeTexture9_AddRef(p) (p)->AddRef()
-#define IDirect3DCubeTexture9_Release(p) (p)->Release()
-#define IDirect3DCubeTexture9_GetDevice(p,a) (p)->GetDevice(a)
-#define IDirect3DCubeTexture9_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
-#define IDirect3DCubeTexture9_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
-#define IDirect3DCubeTexture9_FreePrivateData(p,a) (p)->FreePrivateData(a)
-#define IDirect3DCubeTexture9_SetPriority(p,a) (p)->SetPriority(a)
-#define IDirect3DCubeTexture9_GetPriority(p) (p)->GetPriority()
-#define IDirect3DCubeTexture9_PreLoad(p) (p)->PreLoad()
-#define IDirect3DCubeTexture9_GetType(p) (p)->GetType()
-#define IDirect3DCubeTexture9_SetLOD(p,a) (p)->SetLOD(a)
-#define IDirect3DCubeTexture9_GetLOD(p) (p)->GetLOD()
-#define IDirect3DCubeTexture9_GetLevelCount(p) (p)->GetLevelCount()
-#define IDirect3DCubeTexture9_SetAutoGenFilterType(p,a) (p)->SetAutoGenFilterType(a)
-#define IDirect3DCubeTexture9_GetAutoGenFilterType(p) (p)->GetAutoGenFilterType()
-#define IDirect3DCubeTexture9_GenerateMipSubLevels(p) (p)->GenerateMipSubLevels()
-#define IDirect3DCubeTexture9_GetLevelDesc(p,a,b) (p)->GetLevelDesc(a,b)
-#define IDirect3DCubeTexture9_GetCubeMapSurface(p,a,b,c) (p)->GetCubeMapSurface(a,b,c)
-#define IDirect3DCubeTexture9_LockRect(p,a,b,c,d,e) (p)->LockRect(a,b,c,d,e)
-#define IDirect3DCubeTexture9_UnlockRect(p,a,b) (p)->UnlockRect(a,b)
-#define IDirect3DCubeTexture9_AddDirtyRect(p,a,b) (p)->AddDirtyRect(a,b)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DTexture9
-DECLARE_INTERFACE_(IDirect3DTexture9,IDirect3DBaseTexture9)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
- STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
- STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
- STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
- STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD) PURE;
- STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
- STDMETHOD_(void,PreLoad)(THIS) PURE;
- STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE;
- STDMETHOD_(DWORD,SetLOD)(THIS_ DWORD) PURE;
- STDMETHOD_(DWORD,GetLOD)(THIS) PURE;
- STDMETHOD_(DWORD,GetLevelCount)(THIS) PURE;
- STDMETHOD(SetAutoGenFilterType)(THIS_ D3DTEXTUREFILTERTYPE) PURE;
- STDMETHOD_(D3DTEXTUREFILTERTYPE,GetAutoGenFilterType)(THIS) PURE;
- STDMETHOD_(void,GenerateMipSubLevels)(THIS) PURE;
- STDMETHOD(GetLevelDesc)(THIS_ UINT,D3DSURFACE_DESC*) PURE;
- STDMETHOD(GetSurfaceLevel)(THIS_ UINT,IDirect3DSurface9**) PURE;
- STDMETHOD(LockRect)(THIS_ UINT,D3DLOCKED_RECT*,CONST RECT*,DWORD) PURE;
- STDMETHOD(UnlockRect)(THIS_ UINT) PURE;
- STDMETHOD(AddDirtyRect)(THIS_ CONST RECT*) PURE;
-};
-typedef struct IDirect3DTexture9 *LPDIRECT3DTEXTURE9, *PDIRECT3DTEXTURE9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DTexture9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DTexture9_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IDirect3DTexture9_Release(p) (p)->lpVtbl->Release(p)
-#define IDirect3DTexture9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DTexture9_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
-#define IDirect3DTexture9_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
-#define IDirect3DTexture9_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
-#define IDirect3DTexture9_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
-#define IDirect3DTexture9_GetPriority(p) (p)->lpVtbl->GetPriority(p)
-#define IDirect3DTexture9_PreLoad(p) (p)->lpVtbl->PreLoad(p)
-#define IDirect3DTexture9_GetType(p) (p)->lpVtbl->GetType(p)
-#define IDirect3DTexture9_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a)
-#define IDirect3DTexture9_GetLOD(p) (p)->lpVtbl->GetLOD(p)
-#define IDirect3DTexture9_GetLevelCount(p) (p)->lpVtbl->GetLevelCount(p)
-#define IDirect3DTexture9_SetAutoGenFilterType(p,a) (p)->lpVtbl->SetAutoGenFilterType(p,a)
-#define IDirect3DTexture9_GetAutoGenFilterType(p) (p)->lpVtbl->GetAutoGenFilterType(p)
-#define IDirect3DTexture9_GenerateMipSubLevels(p) (p)->lpVtbl->GenerateMipSubLevels(p)
-#define IDirect3DTexture9_GetLevelDesc(p,a,b) (p)->lpVtbl->GetLevelDesc(p,a,b)
-#define IDirect3DTexture9_GetSurfaceLevel(p,a,b) (p)->lpVtbl->GetSurfaceLevel(p,a,b)
-#define IDirect3DTexture9_LockRect(p,a,b,c,d) (p)->lpVtbl->LockRect(p,a,b,c,d)
-#define IDirect3DTexture9_UnlockRect(p,a) (p)->lpVtbl->UnlockRect(p,a)
-#define IDirect3DTexture9_AddDirtyRect(p,a) (p)->lpVtbl->AddDirtyRect(p,a)
-#else
-#define IDirect3DTexture9_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirect3DTexture9_AddRef(p) (p)->AddRef()
-#define IDirect3DTexture9_Release(p) (p)->Release()
-#define IDirect3DTexture9_GetDevice(p,a) (p)->GetDevice(a)
-#define IDirect3DTexture9_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
-#define IDirect3DTexture9_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
-#define IDirect3DTexture9_FreePrivateData(p,a) (p)->FreePrivateData(a)
-#define IDirect3DTexture9_SetPriority(p,a) (p)->SetPriority(a)
-#define IDirect3DTexture9_GetPriority(p) (p)->GetPriority()
-#define IDirect3DTexture9_PreLoad(p) (p)->PreLoad()
-#define IDirect3DTexture9_GetType(p) (p)->GetType()
-#define IDirect3DTexture9_SetLOD(p,a) (p)->SetLOD(a)
-#define IDirect3DTexture9_GetLOD(p) (p)->GetLOD()
-#define IDirect3DTexture9_GetLevelCount(p) (p)->GetLevelCount()
-#define IDirect3DTexture9_SetAutoGenFilterType(p,a) (p)->SetAutoGenFilterType(a)
-#define IDirect3DTexture9_GetAutoGenFilterType(p) (p)->GetAutoGenFilterType()
-#define IDirect3DTexture9_GenerateMipSubLevels(p) (p)->GenerateMipSubLevels()
-#define IDirect3DTexture9_GetLevelDesc(p,a,b) (p)->GetLevelDesc(a,b)
-#define IDirect3DTexture9_GetSurfaceLevel(p,a,b) (p)->GetSurfaceLevel(a,b)
-#define IDirect3DTexture9_LockRect(p,a,b,c,d) (p)->LockRect(a,b,c,d)
-#define IDirect3DTexture9_UnlockRect(p,a) (p)->UnlockRect(a)
-#define IDirect3DTexture9_AddDirtyRect(p,a) (p)->AddDirtyRect(a)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DVolumeTexture9
-DECLARE_INTERFACE_(IDirect3DVolumeTexture9,IDirect3DBaseTexture9)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
- STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
- STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
- STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
- STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD) PURE;
- STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
- STDMETHOD_(void,PreLoad)(THIS) PURE;
- STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE;
- STDMETHOD_(DWORD,SetLOD)(THIS_ DWORD) PURE;
- STDMETHOD_(DWORD,GetLOD)(THIS) PURE;
- STDMETHOD_(DWORD,GetLevelCount)(THIS) PURE;
- STDMETHOD(SetAutoGenFilterType)(THIS_ D3DTEXTUREFILTERTYPE) PURE;
- STDMETHOD_(D3DTEXTUREFILTERTYPE,GetAutoGenFilterType)(THIS) PURE;
- STDMETHOD_(void,GenerateMipSubLevels)(THIS) PURE;
- STDMETHOD(GetLevelDesc)(THIS_ UINT,D3DVOLUME_DESC*) PURE;
- STDMETHOD(GetVolumeLevel)(THIS_ UINT,IDirect3DVolume9**) PURE;
- STDMETHOD(LockBox)(THIS_ UINT,D3DLOCKED_BOX*,CONST D3DBOX*,DWORD) PURE;
- STDMETHOD(UnlockBox)(THIS_ UINT) PURE;
- STDMETHOD(AddDirtyBox)(THIS_ CONST D3DBOX*) PURE;
-};
-typedef struct IDirect3DVolumeTexture9 *LPDIRECT3DVOLUMETEXTURE9, *PDIRECT3DVOLUMETEXTURE9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DVolumeTexture9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DVolumeTexture9_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IDirect3DVolumeTexture9_Release(p) (p)->lpVtbl->Release(p)
-#define IDirect3DVolumeTexture9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DVolumeTexture9_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
-#define IDirect3DVolumeTexture9_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
-#define IDirect3DVolumeTexture9_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
-#define IDirect3DVolumeTexture9_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
-#define IDirect3DVolumeTexture9_GetPriority(p) (p)->lpVtbl->GetPriority(p)
-#define IDirect3DVolumeTexture9_PreLoad(p) (p)->lpVtbl->PreLoad(p)
-#define IDirect3DVolumeTexture9_GetType(p) (p)->lpVtbl->GetType(p)
-#define IDirect3DVolumeTexture9_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a)
-#define IDirect3DVolumeTexture9_GetLOD(p) (p)->lpVtbl->GetLOD(p)
-#define IDirect3DVolumeTexture9_GetLevelCount(p) (p)->lpVtbl->GetLevelCount(p)
-#define IDirect3DVolumeTexture9_SetAutoGenFilterType(p,a) (p)->lpVtbl->SetAutoGenFilterType(p,a)
-#define IDirect3DVolumeTexture9_GetAutoGenFilterType(p) (p)->lpVtbl->GetAutoGenFilterType(p)
-#define IDirect3DVolumeTexture9_GenerateMipSubLevels(p) (p)->lpVtbl->GenerateMipSubLevels(p)
-#define IDirect3DVolumeTexture9_GetLevelDesc(p,a,b) (p)->lpVtbl->GetLevelDesc(p,a,b)
-#define IDirect3DVolumeTexture9_GetVolumeLevel(p,a,b) (p)->lpVtbl->GetVolumeLevel(p,a,b)
-#define IDirect3DVolumeTexture9_LockBox(p,a,b,c,d) (p)->lpVtbl->LockBox(p,a,b,c,d)
-#define IDirect3DVolumeTexture9_UnlockBox(p,a) (p)->lpVtbl->UnlockBox(p,a)
-#define IDirect3DVolumeTexture9_AddDirtyBox(p,a) (p)->lpVtbl->AddDirtyBox(p,a)
-#else
-#define IDirect3DVolumeTexture9_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirect3DVolumeTexture9_AddRef(p) (p)->AddRef()
-#define IDirect3DVolumeTexture9_Release(p) (p)->Release()
-#define IDirect3DVolumeTexture9_GetDevice(p,a) (p)->GetDevice(a)
-#define IDirect3DVolumeTexture9_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
-#define IDirect3DVolumeTexture9_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
-#define IDirect3DVolumeTexture9_FreePrivateData(p,a) (p)->FreePrivateData(a)
-#define IDirect3DVolumeTexture9_SetPriority(p,a) (p)->SetPriority(a)
-#define IDirect3DVolumeTexture9_GetPriority(p) (p)->GetPriority()
-#define IDirect3DVolumeTexture9_PreLoad(p) (p)->PreLoad()
-#define IDirect3DVolumeTexture9_GetType(p) (p)->GetType()
-#define IDirect3DVolumeTexture9_SetLOD(p,a) (p)->SetLOD(a)
-#define IDirect3DVolumeTexture9_GetLOD(p) (p)->GetLOD()
-#define IDirect3DVolumeTexture9_GetLevelCount(p) (p)->GetLevelCount()
-#define IDirect3DVolumeTexture9_SetAutoGenFilterType(p,a) (p)->SetAutoGenFilterType(a)
-#define IDirect3DVolumeTexture9_GetAutoGenFilterType(p) (p)->GetAutoGenFilterType()
-#define IDirect3DVolumeTexture9_GenerateMipSubLevels(p) (p)->GenerateMipSubLevels()
-#define IDirect3DVolumeTexture9_GetLevelDesc(p,a,b) (p)->GetLevelDesc(a,b)
-#define IDirect3DVolumeTexture9_GetVolumeLevel(p,a,b) (p)->GetVolumeLevel(a,b)
-#define IDirect3DVolumeTexture9_LockBox(p,a,b,c,d) (p)->LockBox(a,b,c,d)
-#define IDirect3DVolumeTexture9_UnlockBox(p,a) (p)->UnlockBox(a)
-#define IDirect3DVolumeTexture9_AddDirtyBox(p,a) (p)->AddDirtyBox(a)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DVertexDeclaration9
-DECLARE_INTERFACE_(IDirect3DVertexDeclaration9,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
- STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9*,UINT*) PURE;
-};
-typedef struct IDirect3DVertexDeclaration9 *LPDIRECT3DVERTEXDECLARATION9, *PDIRECT3DVERTEXDECLARATION9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DVertexDeclaration9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DVertexDeclaration9_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IDirect3DVertexDeclaration9_Release(p) (p)->lpVtbl->Release(p)
-#define IDirect3DVertexDeclaration9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DVertexDeclaration9_GetDeclaration(p,a,b) (p)->lpVtbl->GetDeclaration(p,a,b)
-#else
-#define IDirect3DVertexDeclaration9_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirect3DVertexDeclaration9_AddRef(p) (p)->AddRef()
-#define IDirect3DVertexDeclaration9_Release(p) (p)->Release()
-#define IDirect3DVertexDeclaration9_GetDevice(p,a) (p)->GetDevice(a)
-#define IDirect3DVertexDeclaration9_GetDeclaration(p,a,b) (p)->GetDeclaration(a,b)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DVertexShader9
-DECLARE_INTERFACE_(IDirect3DVertexShader9,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
- STDMETHOD(GetFunction)(THIS_ void*,UINT*) PURE;
-};
-typedef struct IDirect3DVertexShader9 *LPDIRECT3DVERTEXSHADER9, *PDIRECT3DVERTEXSHADER9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DVertexShader9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DVertexShader9_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IDirect3DVertexShader9_Release(p) (p)->lpVtbl->Release(p)
-#define IDirect3DVertexShader9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DVertexShader9_GetFunction(p,a,b) (p)->lpVtbl->GetFunction(p,a,b)
-#else
-#define IDirect3DVertexShader9_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirect3DVertexShader9_AddRef(p) (p)->AddRef()
-#define IDirect3DVertexShader9_Release(p) (p)->Release()
-#define IDirect3DVertexShader9_GetDevice(p,a) (p)->GetDevice(a)
-#define IDirect3DVertexShader9_GetFunction(p,a,b) (p)->GetFunction(a,b)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DPixelShader9
-DECLARE_INTERFACE_(IDirect3DPixelShader9,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
- STDMETHOD(GetFunction)(THIS_ void*,UINT*) PURE;
-};
-typedef struct IDirect3DPixelShader9 *LPDIRECT3DPIXELSHADER9, *PDIRECT3DPIXELSHADER9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DPixelShader9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DPixelShader9_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IDirect3DPixelShader9_Release(p) (p)->lpVtbl->Release(p)
-#define IDirect3DPixelShader9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DPixelShader9_GetFunction(p,a,b) (p)->lpVtbl->GetFunction(p,a,b)
-#else
-#define IDirect3DPixelShader9_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirect3DPixelShader9_AddRef(p) (p)->AddRef()
-#define IDirect3DPixelShader9_Release(p) (p)->Release()
-#define IDirect3DPixelShader9_GetDevice(p,a) (p)->GetDevice(a)
-#define IDirect3DPixelShader9_GetFunction(p,a,b) (p)->GetFunction(a,b)
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DStateBlock9
-DECLARE_INTERFACE_(IDirect3DStateBlock9,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
- STDMETHOD(Capture)(THIS) PURE;
- STDMETHOD(Apply)(THIS) PURE;
-};
-typedef struct IDirect3DStateBlock9 *LPDIRECT3DSTATEBLOCK9, *PDIRECT3DSTATEBLOCK9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DStateBlock9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DStateBlock9_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IDirect3DStateBlock9_Release(p) (p)->lpVtbl->Release(p)
-#define IDirect3DStateBlock9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DStateBlock9_Capture(p) (p)->lpVtbl->Capture(p)
-#define IDirect3DStateBlock9_Apply(p) (p)->lpVtbl->Apply(p)
-#else
-#define IDirect3DStateBlock9_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirect3DStateBlock9_AddRef(p) (p)->AddRef()
-#define IDirect3DStateBlock9_Release(p) (p)->Release()
-#define IDirect3DStateBlock9_GetDevice(p,a) (p)->GetDevice(a)
-#define IDirect3DStateBlock9_Capture(p) (p)->Capture()
-#define IDirect3DStateBlock9_Apply(p) (p)->Apply()
-#endif
-
-#undef INTERFACE
-#define INTERFACE IDirect3DQuery9
-DECLARE_INTERFACE_(IDirect3DQuery9,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
- STDMETHOD_(D3DQUERYTYPE, GetType)(THIS) PURE;
- STDMETHOD_(DWORD, GetDataSize)(THIS) PURE;
- STDMETHOD(Issue)(THIS_ DWORD) PURE;
- STDMETHOD(GetData)(THIS_ void*,DWORD,DWORD) PURE;
-};
-typedef struct IDirect3DQuery9 *LPDIRECT3DQUERY9, *PDIRECT3DQUERY9;
-
-#if !defined(__cplusplus) || defined(CINTERFACE)
-#define IDirect3DQuery9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirect3DQuery9_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IDirect3DQuery9_Release(p) (p)->lpVtbl->Release(p)
-#define IDirect3DQuery9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DQuery9_GetType(p) (p)->lpVtbl->GetType(p)
-#define IDirect3DQuery9_GetDataSize(p) (p)->lpVtbl->GetDataSize(p)
-#define IDirect3DQuery9_Issue(p,a) (p)->lpVtbl->Issue(p,a)
-#define IDirect3DQuery9_GetData(p,a,b,c) (p)->lpVtbl->GetData(p,a,b,c)
-#else
-#define IDirect3DQuery9_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
-#define IDirect3DQuery9_AddRef(p) (p)->AddRef()
-#define IDirect3DQuery9_Release(p) (p)->Release()
-#define IDirect3DQuery9_GetDevice(p,a) (p)->GetDevice(a)
-#define IDirect3DQuery9_GetType(p) (p)->GetType()
-#define IDirect3DQuery9_GetDataSize(p) (p)->GetDataSize()
-#define IDirect3DQuery9_Issue(p,a) (p)->Issue(a)
-#define IDirect3DQuery9_GetData(p,a,b,c) (p)->GetData(a,b,c)
-#endif
-
-#ifdef __cplusplus
-extern "C" IDirect3D9* WINAPI Direct3DCreate9(UINT SDKVersion);
-#else
-extern IDirect3D9* WINAPI Direct3DCreate9(UINT SDKVersion);
-#endif
-
-#endif
-#endif
diff --git a/winsup/w32api/include/directx/d3d9caps.h b/winsup/w32api/include/directx/d3d9caps.h
deleted file mode 100644
index 9858cf2..0000000
--- a/winsup/w32api/include/directx/d3d9caps.h
+++ /dev/null
@@ -1,338 +0,0 @@
-/*
-
- d3d9caps.h - Header file for the Direct3D9 API
-
- Written by Filip Navara <xnavara@volny.cz>
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#ifndef _D3D9_CAPS_H
-#define _D3D9_CAPS_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifndef DIRECT3D_VERSION
-#define DIRECT3D_VERSION 0x0900
-#endif
-
-#if (DIRECT3D_VERSION >= 0x0900)
-
-#define D3DCURSORCAPS_COLOR 1
-#define D3DCURSORCAPS_LOWRES 2
-#define D3DDEVCAPS_EXECUTESYSTEMMEMORY 0x10
-#define D3DDEVCAPS_EXECUTEVIDEOMEMORY 0x20
-#define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x40
-#define D3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x80
-#define D3DDEVCAPS_TEXTURESYSTEMMEMORY 0x100
-#define D3DDEVCAPS_TEXTUREVIDEOMEMORY 0x200
-#define D3DDEVCAPS_DRAWPRIMTLVERTEX 0x400
-#define D3DDEVCAPS_CANRENDERAFTERFLIP 0x800
-#define D3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x1000
-#define D3DDEVCAPS_DRAWPRIMITIVES2 0x2000
-#define D3DDEVCAPS_SEPARATETEXTUREMEMORIES 0x4000
-#define D3DDEVCAPS_DRAWPRIMITIVES2EX 0x8000
-#define D3DDEVCAPS_HWTRANSFORMANDLIGHT 0x10000
-#define D3DDEVCAPS_CANBLTSYSTONONLOCAL 0x20000
-#define D3DDEVCAPS_HWRASTERIZATION 0x80000
-#define D3DDEVCAPS_PUREDEVICE 0x100000
-#define D3DDEVCAPS_QUINTICRTPATCHES 0x200000
-#define D3DDEVCAPS_RTPATCHES 0x400000
-#define D3DDEVCAPS_RTPATCHHANDLEZERO 0x800000
-#define D3DDEVCAPS_NPATCHES 0x1000000
-#define D3DDEVCAPS2_STREAMOFFSET 0x01
-#define D3DDEVCAPS2_DMAPNPATCH 0x02
-#define D3DDEVCAPS2_ADAPTIVETESSRTPATCH 0x04
-#define D3DDEVCAPS2_ADAPTIVETESSNPATCH 0x08
-#define D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES 0x10
-#define D3DDEVCAPS2_PRESAMPLEDDMAPNPATCH 0x20
-#define D3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET 0x40
-#define D3DFVFCAPS_TEXCOORDCOUNTMASK 0xFFFF
-#define D3DFVFCAPS_DONOTSTRIPELEMENTS 0x80000
-#define D3DFVFCAPS_PSIZE 0x100000
-#define D3DLINECAPS_TEXTURE 0x01
-#define D3DLINECAPS_ZTEST 0x02
-#define D3DLINECAPS_BLEND 0x04
-#define D3DLINECAPS_ALPHACMP 0x08
-#define D3DLINECAPS_FOG 0x10
-#define D3DLINECAPS_ANTIALIAS 0x20
-#define D3DPBLENDCAPS_ZERO 0x01
-#define D3DPBLENDCAPS_ONE 0x02
-#define D3DPBLENDCAPS_SRCCOLOR 0x04
-#define D3DPBLENDCAPS_INVSRCCOLOR 0x08
-#define D3DPBLENDCAPS_SRCALPHA 0x10
-#define D3DPBLENDCAPS_INVSRCALPHA 0x20
-#define D3DPBLENDCAPS_DESTALPHA 0x40
-#define D3DPBLENDCAPS_INVDESTALPHA 0x80
-#define D3DPBLENDCAPS_DESTCOLOR 0x100
-#define D3DPBLENDCAPS_INVDESTCOLOR 0x200
-#define D3DPBLENDCAPS_SRCALPHASAT 0x400
-#define D3DPBLENDCAPS_BOTHSRCALPHA 0x800
-#define D3DPBLENDCAPS_BOTHINVSRCALPHA 0x1000
-#define D3DPBLENDCAPS_BLENDFACTOR 0x2000
-#define D3DPCMPCAPS_NEVER 0x01
-#define D3DPCMPCAPS_LESS 0x02
-#define D3DPCMPCAPS_EQUAL 0x04
-#define D3DPCMPCAPS_LESSEQUAL 0x08
-#define D3DPCMPCAPS_GREATER 0x10
-#define D3DPCMPCAPS_NOTEQUAL 0x20
-#define D3DPCMPCAPS_GREATEREQUAL 0x40
-#define D3DPCMPCAPS_ALWAYS 0x80
-#define D3DPMISCCAPS_MASKZ 0x02
-#define D3DPMISCCAPS_CULLNONE 0x10
-#define D3DPMISCCAPS_CULLCW 0x20
-#define D3DPMISCCAPS_CULLCCW 0x40
-#define D3DPMISCCAPS_COLORWRITEENABLE 0x80
-#define D3DPMISCCAPS_CLIPPLANESCALEDPOINTS 0x100
-#define D3DPMISCCAPS_CLIPTLVERTS 0x200
-#define D3DPMISCCAPS_TSSARGTEMP 0x400
-#define D3DPMISCCAPS_BLENDOP 0x800
-#define D3DPMISCCAPS_NULLREFERENCE 0x1000
-#define D3DPMISCCAPS_INDEPENDENTWRITEMASKS 0x4000
-#define D3DPMISCCAPS_PERSTAGECONSTANT 0x8000
-#define D3DPMISCCAPS_FOGANDSPECULARALPHA 0x10000
-#define D3DPMISCCAPS_SEPARATEALPHABLEND 0x20000
-#define D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS 0x40000
-#define D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING 0x80000
-#define D3DPMISCCAPS_FOGVERTEXCLAMPED 0x100000
-#define D3DPRASTERCAPS_DITHER 0x01
-#define D3DPRASTERCAPS_ZTEST 0x10
-#define D3DPRASTERCAPS_FOGVERTEX 0x80
-#define D3DPRASTERCAPS_FOGTABLE 0x100
-#define D3DPRASTERCAPS_MIPMAPLODBIAS 0x2000
-#define D3DPRASTERCAPS_ZBUFFERLESSHSR 0x8000
-#define D3DPRASTERCAPS_FOGRANGE 0x10000
-#define D3DPRASTERCAPS_ANISOTROPY 0x20000
-#define D3DPRASTERCAPS_WBUFFER 0x40000
-#define D3DPRASTERCAPS_WFOG 0x100000
-#define D3DPRASTERCAPS_ZFOG 0x200000
-#define D3DPRASTERCAPS_COLORPERSPECTIVE 0x400000
-#define D3DPRASTERCAPS_SCISSORTEST 0x1000000
-#define D3DPRASTERCAPS_SLOPESCALEDEPTHBIAS 0x2000000
-#define D3DPRASTERCAPS_DEPTHBIAS 0x4000000
-#define D3DPRASTERCAPS_MULTISAMPLE_TOGGLE 0x8000000
-#define D3DPRESENT_INTERVAL_DEFAULT 0x00
-#define D3DPRESENT_INTERVAL_ONE 0x01
-#define D3DPRESENT_INTERVAL_TWO 0x02
-#define D3DPRESENT_INTERVAL_THREE 0x04
-#define D3DPRESENT_INTERVAL_FOUR 0x08
-#define D3DPRESENT_INTERVAL_IMMEDIATE 0x80000000L
-#define D3DPSHADECAPS_COLORGOURAUDRGB 0x08
-#define D3DPSHADECAPS_SPECULARGOURAUDRGB 0x200
-#define D3DPSHADECAPS_ALPHAGOURAUDBLEND 0x4000
-#define D3DPSHADECAPS_FOGGOURAUD 0x80000
-#define D3DPTADDRESSCAPS_WRAP 0x01
-#define D3DPTADDRESSCAPS_MIRROR 0x02
-#define D3DPTADDRESSCAPS_CLAMP 0x04
-#define D3DPTADDRESSCAPS_BORDER 0x08
-#define D3DPTADDRESSCAPS_INDEPENDENTUV 0x10
-#define D3DPTADDRESSCAPS_MIRRORONCE 0x20
-#define D3DPTEXTURECAPS_PERSPECTIVE 0x01
-#define D3DPTEXTURECAPS_POW2 0x02
-#define D3DPTEXTURECAPS_ALPHA 0x04
-#define D3DPTEXTURECAPS_SQUAREONLY 0x20
-#define D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE 0x40
-#define D3DPTEXTURECAPS_ALPHAPALETTE 0x80
-#define D3DPTEXTURECAPS_NONPOW2CONDITIONAL 0x100
-#define D3DPTEXTURECAPS_PROJECTED 0x400
-#define D3DPTEXTURECAPS_CUBEMAP 0x800
-#define D3DPTEXTURECAPS_VOLUMEMAP 0x2000
-#define D3DPTEXTURECAPS_MIPMAP 0x4000
-#define D3DPTEXTURECAPS_MIPVOLUMEMAP 0x8000
-#define D3DPTEXTURECAPS_MIPCUBEMAP 0x10000
-#define D3DPTEXTURECAPS_CUBEMAP_POW2 0x20000
-#define D3DPTEXTURECAPS_VOLUMEMAP_POW2 0x40000
-#define D3DPTEXTURECAPS_NOPROJECTEDBUMPENV 0x200000
-#define D3DPTFILTERCAPS_MINFPOINT 0x100
-#define D3DPTFILTERCAPS_MINFLINEAR 0x200
-#define D3DPTFILTERCAPS_MINFANISOTROPIC 0x400
-#define D3DPTFILTERCAPS_MINFPYRAMIDALQUAD 0x800
-#define D3DPTFILTERCAPS_MINFGAUSSIANQUAD 0x1000
-#define D3DPTFILTERCAPS_MIPFPOINT 0x10000
-#define D3DPTFILTERCAPS_MIPFLINEAR 0x20000
-#define D3DPTFILTERCAPS_MAGFPOINT 0x1000000
-#define D3DPTFILTERCAPS_MAGFLINEAR 0x2000000
-#define D3DPTFILTERCAPS_MAGFANISOTROPIC 0x4000000
-#define D3DPTFILTERCAPS_MAGFPYRAMIDALQUAD 0x8000000
-#define D3DPTFILTERCAPS_MAGFGAUSSIANQUAD 0x10000000
-#define D3DSTENCILCAPS_KEEP 0x01
-#define D3DSTENCILCAPS_ZERO 0x02
-#define D3DSTENCILCAPS_REPLACE 0x04
-#define D3DSTENCILCAPS_INCRSAT 0x08
-#define D3DSTENCILCAPS_DECRSAT 0x10
-#define D3DSTENCILCAPS_INVERT 0x20
-#define D3DSTENCILCAPS_INCR 0x40
-#define D3DSTENCILCAPS_DECR 0x80
-#define D3DSTENCILCAPS_TWOSIDED 0x100
-#define D3DTEXOPCAPS_DISABLE 0x01
-#define D3DTEXOPCAPS_SELECTARG1 0x02
-#define D3DTEXOPCAPS_SELECTARG2 0x04
-#define D3DTEXOPCAPS_MODULATE 0x08
-#define D3DTEXOPCAPS_MODULATE2X 0x10
-#define D3DTEXOPCAPS_MODULATE4X 0x20
-#define D3DTEXOPCAPS_ADD 0x40
-#define D3DTEXOPCAPS_ADDSIGNED 0x80
-#define D3DTEXOPCAPS_ADDSIGNED2X 0x100
-#define D3DTEXOPCAPS_SUBTRACT 0x200
-#define D3DTEXOPCAPS_ADDSMOOTH 0x400
-#define D3DTEXOPCAPS_BLENDDIFFUSEALPHA 0x800
-#define D3DTEXOPCAPS_BLENDTEXTUREALPHA 0x1000
-#define D3DTEXOPCAPS_BLENDFACTORALPHA 0x2000
-#define D3DTEXOPCAPS_BLENDTEXTUREALPHAPM 0x4000
-#define D3DTEXOPCAPS_BLENDCURRENTALPHA 0x8000
-#define D3DTEXOPCAPS_PREMODULATE 0x10000
-#define D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR 0x20000
-#define D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA 0x40000
-#define D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR 0x80000
-#define D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA 0x100000
-#define D3DTEXOPCAPS_BUMPENVMAP 0x200000
-#define D3DTEXOPCAPS_BUMPENVMAPLUMINANCE 0x400000
-#define D3DTEXOPCAPS_DOTPRODUCT3 0x800000
-#define D3DTEXOPCAPS_MULTIPLYADD 0x1000000
-#define D3DTEXOPCAPS_LERP 0x2000000
-#define D3DVTXPCAPS_TEXGEN 0x01
-#define D3DVTXPCAPS_MATERIALSOURCE7 0x02
-#define D3DVTXPCAPS_DIRECTIONALLIGHTS 0x08
-#define D3DVTXPCAPS_POSITIONALLIGHTS 0x10
-#define D3DVTXPCAPS_LOCALVIEWER 0x20
-#define D3DVTXPCAPS_TWEENING 0x40
-#define D3DVTXPCAPS_TEXGEN_SPHEREMAP 0x100
-#define D3DVTXPCAPS_NO_TEXGEN_NONLOCALVIEWER 0x200
-#define D3DCAPS_READ_SCANLINE 0x20000
-#define D3DCAPS2_FULLSCREENGAMMA 0x20000L
-#define D3DCAPS2_CANCALIBRATEGAMMA 0x100000L
-#define D3DCAPS2_RESERVED 0x2000000L
-#define D3DCAPS2_CANMANAGERESOURCE 0x10000000L
-#define D3DCAPS2_DYNAMICTEXTURES 0x20000000L
-#define D3DCAPS2_CANAUTOGENMIPMAP 0x40000000L
-#define D3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD 0x20
-#define D3DCAPS3_LINEAR_TO_SRGB_PRESENTATION 0x80
-#define D3DCAPS3_COPY_TO_VIDMEM 0x100
-#define D3DCAPS3_COPY_TO_SYSTEMMEM 0x200
-#define D3DCAPS3_RESERVED 0x8000001fL
-#define D3DDTCAPS_UBYTE4 0x01
-#define D3DDTCAPS_UBYTE4N 0x02
-#define D3DDTCAPS_SHORT2N 0x04
-#define D3DDTCAPS_SHORT4N 0x08
-#define D3DDTCAPS_USHORT2N 0x10
-#define D3DDTCAPS_USHORT4N 0x20
-#define D3DDTCAPS_UDEC3 0x40
-#define D3DDTCAPS_DEC3N 0x80
-#define D3DDTCAPS_FLOAT16_2 0x100
-#define D3DDTCAPS_FLOAT16_4 0x200
-#define D3DMIN30SHADERINSTRUCTIONS 512
-#define D3DMAX30SHADERINSTRUCTIONS 32768
-#define D3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH 24
-#define D3DPS20_MIN_DYNAMICFLOWCONTROLDEPTH 0
-#define D3DPS20_MAX_NUMTEMPS 32
-#define D3DPS20_MIN_NUMTEMPS 12
-#define D3DPS20_MAX_STATICFLOWCONTROLDEPTH 4
-#define D3DPS20_MIN_STATICFLOWCONTROLDEPTH 0
-#define D3DPS20_MAX_NUMINSTRUCTIONSLOTS 512
-#define D3DPS20_MIN_NUMINSTRUCTIONSLOTS 96
-#define D3DPS20CAPS_ARBITRARYSWIZZLE 0x1
-#define D3DPS20CAPS_GRADIENTINSTRUCTIONS 0x2
-#define D3DPS20CAPS_PREDICATION 0x4
-#define D3DPS20CAPS_NODEPENDENTREADLIMIT 0x8
-#define D3DPS20CAPS_NOTEXINSTRUCTIONLIMIT 0x10
-#define D3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH 24
-#define D3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH 0
-#define D3DVS20_MAX_NUMTEMPS 32
-#define D3DVS20_MIN_NUMTEMPS 12
-#define D3DVS20_MAX_STATICFLOWCONTROLDEPTH 4
-#define D3DVS20_MIN_STATICFLOWCONTROLDEPTH 1
-#define D3DVS20CAPS_PREDICATION 1
-
-typedef struct _D3DVSHADERCAPS2_0 {
- DWORD Caps;
- INT DynamicFlowControlDepth;
- INT NumTemps;
- INT StaticFlowControlDepth;
-} D3DVSHADERCAPS2_0;
-
-typedef struct _D3DPSHADERCAPS2_0 {
- DWORD Caps;
- INT DynamicFlowControlDepth;
- INT NumTemps;
- INT StaticFlowControlDepth;
- INT NumInstructionSlots;
-} D3DPSHADERCAPS2_0;
-
-typedef struct _D3DCAPS9 {
- D3DDEVTYPE DeviceType;
- UINT AdapterOrdinal;
- DWORD Caps;
- DWORD Caps2;
- DWORD Caps3;
- DWORD PresentationIntervals;
- DWORD CursorCaps;
- DWORD DevCaps;
- DWORD PrimitiveMiscCaps;
- DWORD RasterCaps;
- DWORD ZCmpCaps;
- DWORD SrcBlendCaps;
- DWORD DestBlendCaps;
- DWORD AlphaCmpCaps;
- DWORD ShadeCaps;
- DWORD TextureCaps;
- DWORD TextureFilterCaps;
- DWORD CubeTextureFilterCaps;
- DWORD VolumeTextureFilterCaps;
- DWORD TextureAddressCaps;
- DWORD VolumeTextureAddressCaps;
- DWORD LineCaps;
- DWORD MaxTextureWidth;
- DWORD MaxTextureHeight;
- DWORD MaxVolumeExtent;
- DWORD MaxTextureRepeat;
- DWORD MaxTextureAspectRatio;
- DWORD MaxAnisotropy;
- float MaxVertexW;
- float GuardBandLeft;
- float GuardBandTop;
- float GuardBandRight;
- float GuardBandBottom;
- float ExtentsAdjust;
- DWORD StencilCaps;
- DWORD FVFCaps;
- DWORD TextureOpCaps;
- DWORD MaxTextureBlendStages;
- DWORD MaxSimultaneousTextures;
- DWORD VertexProcessingCaps;
- DWORD MaxActiveLights;
- DWORD MaxUserClipPlanes;
- DWORD MaxVertexBlendMatrices;
- DWORD MaxVertexBlendMatrixIndex;
- float MaxPointSize;
- DWORD MaxPrimitiveCount;
- DWORD MaxVertexIndex;
- DWORD MaxStreams;
- DWORD MaxStreamStride;
- DWORD VertexShaderVersion;
- DWORD MaxVertexShaderConst;
- DWORD PixelShaderVersion;
- float PixelShader1xMaxValue;
- DWORD DevCaps2;
- float MaxNpatchTessellationLevel;
- DWORD Reserved5;
- UINT MasterAdapterOrdinal;
- UINT AdapterOrdinalInGroup;
- UINT NumberOfAdaptersInGroup;
- DWORD DeclTypes;
- DWORD NumSimultaneousRTs;
- DWORD StretchRectFilterCaps;
- D3DVSHADERCAPS2_0 VS20Caps;
- D3DPSHADERCAPS2_0 PS20Caps;
- DWORD VertexTextureFilterCaps;
- DWORD MaxVShaderInstructionsExecuted;
- DWORD MaxPShaderInstructionsExecuted;
- DWORD MaxVertexShader30InstructionSlots;
- DWORD MaxPixelShader30InstructionSlots;
-} D3DCAPS9;
-
-#endif
-#endif
diff --git a/winsup/w32api/include/directx/d3d9types.h b/winsup/w32api/include/directx/d3d9types.h
deleted file mode 100644
index 6b74f63..0000000
--- a/winsup/w32api/include/directx/d3d9types.h
+++ /dev/null
@@ -1,1272 +0,0 @@
-/*
-
- d3d9types.h - Header file for the Direct3D9 API
-
- Written by Filip Navara <xnavara@volny.cz>
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#ifndef _D3D9_TYPES_H
-#define _D3D9_TYPES_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifndef DIRECT3D_VERSION
-#define DIRECT3D_VERSION 0x0900
-#endif
-
-#if (DIRECT3D_VERSION >= 0x0900)
-
-#include <pshpack4.h>
-
-#define D3DCLEAR_TARGET 0x01
-#define D3DCLEAR_ZBUFFER 0x02
-#define D3DCLEAR_STENCIL 0x04
-#define D3DCLIPPLANE0 0x01
-#define D3DCLIPPLANE1 0x02
-#define D3DCLIPPLANE2 0x04
-#define D3DCLIPPLANE3 0x08
-#define D3DCLIPPLANE4 0x10
-#define D3DCLIPPLANE5 0x20
-#define D3DCOLOR_ARGB(a,r,g,b) ((D3DCOLOR)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff)))
-#define D3DCOLOR_COLORVALUE(r,g,b,a) D3DCOLOR_RGBA((DWORD)((r)*255.f),(DWORD)((g)*255.f),(DWORD)((b)*255.f),(DWORD)((a)*255.f))
-#define D3DCOLOR_RGBA(r,g,b,a) D3DCOLOR_ARGB(a,r,g,b)
-#define D3DCOLOR_XRGB(r,g,b) D3DCOLOR_ARGB(0xff,r,g,b)
-#define D3DCOLOR_XYUV(y,u,v) D3DCOLOR_ARGB(0xff,y,u,v)
-#define D3DCOLOR_AYUV(a,y,u,v) D3DCOLOR_ARGB(a,y,u,v)
-#define D3DCOLORWRITEENABLE_RED 0x01
-#define D3DCOLORWRITEENABLE_GREEN 0x02
-#define D3DCOLORWRITEENABLE_BLUE 0x04
-#define D3DCOLORWRITEENABLE_ALPHA 0x08
-#define D3DCS_LEFT 0x01
-#define D3DCS_RIGHT 0x02
-#define D3DCS_TOP 0x04
-#define D3DCS_BOTTOM 0x08
-#define D3DCS_FRONT 0x10
-#define D3DCS_BACK 0x20
-#define D3DCS_PLANE0 0x40
-#define D3DCS_PLANE1 0x80
-#define D3DCS_PLANE2 0x100
-#define D3DCS_PLANE3 0x200
-#define D3DCS_PLANE4 0x400
-#define D3DCS_PLANE5 0x800
-#define D3DCS_ALL (D3DCS_LEFT|D3DCS_RIGHT|D3DCS_TOP|D3DCS_BOTTOM|D3DCS_FRONT|D3DCS_BACK|D3DCS_PLANE0|D3DCS_PLANE1|D3DCS_PLANE2|D3DCS_PLANE3|D3DCS_PLANE4|D3DCS_PLANE5)
-#define D3DDECL_END() {0xff,0,D3DDECLTYPE_UNUSED,0,0,0}
-#define D3DDP_MAXTEXCOORD 8
-#define D3DPV_DONOTCOPYDATA 0x01
-#define D3DTA_SELECTMASK 0x0f
-#define D3DTA_DIFFUSE 0x00
-#define D3DTA_CURRENT 0x01
-#define D3DTA_TEXTURE 0x02
-#define D3DTA_TFACTOR 0x03
-#define D3DTA_SPECULAR 0x04
-#define D3DTA_TEMP 0x05
-#define D3DTA_CONSTANT 0x06
-#define D3DTA_COMPLEMENT 0x10
-#define D3DTA_ALPHAREPLICATE 0x20
-#define D3DFVF_RESERVED0 0x01
-#define D3DFVF_POSITION_MASK 0x4000E
-#define D3DFVF_XYZ 0x02
-#define D3DFVF_XYZRHW 0x04
-#define D3DFVF_XYZB1 0x06
-#define D3DFVF_XYZB2 0x08
-#define D3DFVF_XYZB3 0x0a
-#define D3DFVF_XYZB4 0x0c
-#define D3DFVF_XYZB5 0x0e
-#define D3DFVF_XYZW 0x4002
-#define D3DFVF_NORMAL 0x10
-#define D3DFVF_PSIZE 0x20
-#define D3DFVF_DIFFUSE 0x40
-#define D3DFVF_SPECULAR 0x80
-#define D3DFVF_TEXCOUNT_MASK 0xf00
-#define D3DFVF_TEXCOUNT_SHIFT 8
-#define D3DFVF_TEX0 0x0000
-#define D3DFVF_TEX1 0x0100
-#define D3DFVF_TEX2 0x0200
-#define D3DFVF_TEX3 0x0300
-#define D3DFVF_TEX4 0x0400
-#define D3DFVF_TEX5 0x0500
-#define D3DFVF_TEX6 0x0600
-#define D3DFVF_TEX7 0x0700
-#define D3DFVF_TEX8 0x0800
-#define D3DFVF_TEXCOORDSIZE1(i) (D3DFVF_TEXTUREFORMAT1 << (i * 2 + 16))
-#define D3DFVF_TEXCOORDSIZE2(i) (D3DFVF_TEXTUREFORMAT2)
-#define D3DFVF_TEXCOORDSIZE3(i) (D3DFVF_TEXTUREFORMAT3 << (i * 2 + 16))
-#define D3DFVF_TEXCOORDSIZE4(i) (D3DFVF_TEXTUREFORMAT4 << (i * 2 + 16))
-#define D3DFVF_TEXTUREFORMAT1 3
-#define D3DFVF_TEXTUREFORMAT2 0
-#define D3DFVF_TEXTUREFORMAT3 1
-#define D3DFVF_TEXTUREFORMAT4 2
-#define D3DFVF_LASTBETA_UBYTE4 0x1000
-#define D3DFVF_LASTBETA_D3DCOLOR 0x8000
-#define D3DFVF_RESERVED2 0x6000
-#define D3DDMAPSAMPLER 256
-#define D3DVERTEXTEXTURESAMPLER0 (D3DDMAPSAMPLER+1)
-#define D3DVERTEXTEXTURESAMPLER1 (D3DDMAPSAMPLER+2)
-#define D3DVERTEXTEXTURESAMPLER2 (D3DDMAPSAMPLER+3)
-#define D3DVERTEXTEXTURESAMPLER3 (D3DDMAPSAMPLER+4)
-#define D3DVS_ADDRESSMODE_SHIFT 13
-#define D3DVS_ADDRESSMODE_MASK (1 << D3DVS_ADDRESSMODE_SHIFT)
-#define D3DVS_SWIZZLE_SHIFT 16
-#define D3DVS_SWIZZLE_MASK 0x00FF0000
-#define D3DVS_X_X (0 << D3DVS_SWIZZLE_SHIFT)
-#define D3DVS_X_Y (1 << D3DVS_SWIZZLE_SHIFT)
-#define D3DVS_X_Z (2 << D3DVS_SWIZZLE_SHIFT)
-#define D3DVS_X_W (3 << D3DVS_SWIZZLE_SHIFT)
-#define D3DVS_Y_X (0 << (D3DVS_SWIZZLE_SHIFT + 2))
-#define D3DVS_Y_Y (1 << (D3DVS_SWIZZLE_SHIFT + 2))
-#define D3DVS_Y_Z (2 << (D3DVS_SWIZZLE_SHIFT + 2))
-#define D3DVS_Y_W (3 << (D3DVS_SWIZZLE_SHIFT + 2))
-#define D3DVS_Z_X (0 << (D3DVS_SWIZZLE_SHIFT + 4))
-#define D3DVS_Z_Y (1 << (D3DVS_SWIZZLE_SHIFT + 4))
-#define D3DVS_Z_Z (2 << (D3DVS_SWIZZLE_SHIFT + 4))
-#define D3DVS_Z_W (3 << (D3DVS_SWIZZLE_SHIFT + 4))
-#define D3DVS_W_X (0 << (D3DVS_SWIZZLE_SHIFT + 6))
-#define D3DVS_W_Y (1 << (D3DVS_SWIZZLE_SHIFT + 6))
-#define D3DVS_W_Z (2 << (D3DVS_SWIZZLE_SHIFT + 6))
-#define D3DVS_W_W (3 << (D3DVS_SWIZZLE_SHIFT + 6))
-#define D3DVS_NOSWIZZLE (D3DVS_X_X|D3DVS_Y_Y|D3DVS_Z_Z|D3DVS_W_W)
-#define D3DPRESENT_RATE_DEFAULT 0
-#define D3DRENDERSTATE_WRAPBIAS 128UL
-#define D3DSHADER_ADDRESSMODE_SHIFT 13
-#define D3DSHADER_ADDRESSMODE_MASK (1 << D3DSHADER_ADDRESSMODE_SHIFT)
-#define D3DSHADER_COMPARISON_SHIFT D3DSP_OPCODESPECIFICCONTROL_SHIFT
-#define D3DSHADER_COMPARISON_MASK (0x07 << D3DSHADER_COMPARISON_SHIFT)
-#define D3DSHADER_INSTRUCTION_PREDICATED 0x10000000
-#define D3DSI_COISSUE 0x40000000
-#define D3DSI_COMMENTSIZE_SHIFT 16
-#define D3DSI_COMMENTSIZE_MASK 0x7fff0000
-#define D3DSI_OPCODE_MASK 0xffff
-#define D3DSI_INSTLENGTH_MASK 0xf000000
-#define D3DSI_INSTLENGTH_SHIFT 24
-#define D3DSI_TEXLD_PROJECT (0x01 << D3DSP_OPCODESPECIFICCONTROL_SHIFT)
-#define D3DSI_TEXLD_BIAS (0x02 << D3DSP_OPCODESPECIFICCONTROL_SHIFT)
-#define D3DSINCOSCONST1 -1.5500992e-006f, -2.1701389e-005f, 0.0026041667f, 0.00026041668f
-#define D3DSINCOSCONST2 -0.020833334f, -0.12500000f, 1.0f, 0.50000000f
-#define D3DSP_OPCODESPECIFICCONTROL_MASK 0xff0000
-#define D3DSP_OPCODESPECIFICCONTROL_SHIFT 16
-#define D3DSP_DCL_USAGE_SHIFT 0
-#define D3DSP_DCL_USAGE_MASK 0x0000000f
-#define D3DSP_DCL_USAGEINDEX_SHIFT 16
-#define D3DSP_DCL_USAGEINDEX_MASK 0x000f0000
-#define D3DSP_TEXTURETYPE_SHIFT 27
-#define D3DSP_TEXTURETYPE_MASK 0x78000000
-#define D3DSP_REGNUM_MASK 0x7ff
-#define D3DSP_WRITEMASK_0 0x10000
-#define D3DSP_WRITEMASK_1 0x20000
-#define D3DSP_WRITEMASK_2 0x40000
-#define D3DSP_WRITEMASK_3 0x80000
-#define D3DSP_WRITEMASK_ALL 0xf0000
-#define D3DSP_DSTMOD_SHIFT 20
-#define D3DSP_DSTMOD_MASK 0xf00000
-#define D3DSPDM_NONE 0
-#define D3DSPDM_SATURATE (1 << D3DSP_DSTMOD_SHIFT)
-#define D3DSPDM_PARTIALPRECISION (2 << D3DSP_DSTMOD_SHIFT)
-#define D3DSPDM_MSAMPCENTROID (4 << D3DSP_DSTMOD_SHIFT)
-#define D3DSP_DSTSHIFT_SHIFT 24
-#define D3DSP_DSTSHIFT_MASK 0xf000000
-#define D3DSP_NOSWIZZLE ((0 << (D3DSP_SWIZZLE_SHIFT + 0)) | (1 << (D3DSP_SWIZZLE_SHIFT + 2)) | (2 << (D3DSP_SWIZZLE_SHIFT + 4)) | (3 << (D3DSP_SWIZZLE_SHIFT + 6)))
-#define D3DSP_REPLICATERED 0
-#define D3DSP_REPLICATEGREEN ((1 << (D3DSP_SWIZZLE_SHIFT + 0)) | (1 << (D3DSP_SWIZZLE_SHIFT + 2)) | (1 << (D3DSP_SWIZZLE_SHIFT + 4)) | (1 << (D3DSP_SWIZZLE_SHIFT + 6)))
-#define D3DSP_REPLICATEBLUE ((2 << (D3DSP_SWIZZLE_SHIFT + 0)) | (2 << (D3DSP_SWIZZLE_SHIFT + 2)) | (2 << (D3DSP_SWIZZLE_SHIFT + 4)) | (2 << (D3DSP_SWIZZLE_SHIFT + 6)))
-#define D3DSP_REPLICATEALPHA ((3 << (D3DSP_SWIZZLE_SHIFT + 0)) | (3 << (D3DSP_SWIZZLE_SHIFT + 2)) | (3 << (D3DSP_SWIZZLE_SHIFT + 4)) | (3 << (D3DSP_SWIZZLE_SHIFT + 6)))
-#define D3DSP_REGTYPE_SHIFT 28
-#define D3DSP_REGTYPE_SHIFT2 8
-#define D3DSP_REGTYPE_MASK 0x70000000
-#define D3DSP_REGTYPE_MASK2 0x1800
-#define D3DSP_SRCMOD_SHIFT 24
-#define D3DSP_SRCMOD_MASK 0xf000000
-#define D3DSP_SWIZZLE_SHIFT 16
-#define D3DSP_SWIZZLE_MASK 0xff0000
-#define D3DTS_WORLDMATRIX(index) (D3DTRANSFORMSTATETYPE)(index + 256)
-#define D3DTS_WORLD D3DTS_WORLDMATRIX(0)
-#define D3DTS_WORLD1 D3DTS_WORLDMATRIX(1)
-#define D3DTS_WORLD2 D3DTS_WORLDMATRIX(2)
-#define D3DTS_WORLD3 D3DTS_WORLDMATRIX(3)
-#define D3DTSS_TCI_PASSTHRU 0x00
-#define D3DTSS_TCI_CAMERASPACENORMAL 0x10000
-#define D3DTSS_TCI_CAMERASPACEPOSITION 0x20000
-#define D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR 0x30000
-#define D3DTSS_TCI_SPHEREMAP 0x40000
-#define D3DUSAGE_RENDERTARGET 0x01
-#define D3DUSAGE_DEPTHSTENCIL 0x02
-#define D3DUSAGE_WRITEONLY 0x08
-#define D3DUSAGE_SOFTWAREPROCESSING 0x10
-#define D3DUSAGE_DONOTCLIP 0x20
-#define D3DUSAGE_POINTS 0x40
-#define D3DUSAGE_RTPATCHES 0x80
-#define D3DUSAGE_NPATCHES 0x100
-#define D3DUSAGE_DYNAMIC 0x200
-#define D3DUSAGE_AUTOGENMIPMAP 0x400
-#define D3DUSAGE_DMAP 0x4000
-#define D3DUSAGE_QUERY_LEGACYBUMPMAP 0x8000
-#define D3DUSAGE_QUERY_SRGBREAD 0x10000
-#define D3DUSAGE_QUERY_FILTER 0x20000
-#define D3DUSAGE_QUERY_SRGBWRITE 0x40000
-#define D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING 0x80000
-#define D3DUSAGE_QUERY_VERTEXTEXTURE 0x100000
-#define D3DWRAP_U 0x01
-#define D3DWRAP_V 0x02
-#define D3DWRAP_W 0x04
-#define D3DWRAPCOORD_0 0x01
-#define D3DWRAPCOORD_1 0x02
-#define D3DWRAPCOORD_2 0x04
-#define D3DWRAPCOORD_3 0x08
-#define MAX_DEVICE_IDENTIFIER_STRING 512
-#define MAXD3DDECLLENGTH 64
-#define MAXD3DDECLMETHOD D3DDECLMETHOD_LOOKUPPRESAMPLED
-#define MAXD3DDECLTYPE D3DDECLTYPE_UNUSED
-#define MAXD3DDECLUSAGE D3DDECLUSAGE_SAMPLE
-#define MAXD3DDECLUSAGEINDEX 15
-#define D3DMAXUSERCLIPPLANES 32
-#define D3D_MAX_SIMULTANEOUS_RENDERTARGETS 4
-#define D3DPS_VERSION(major,minor) (0xffff0000 | ((major) << 8) | (minor))
-#define D3DVS_VERSION(major,minor) (0xfffe0000 | ((major) << 8) | (minor))
-#define D3DSHADER_VERSION_MAJOR(version) (((version) >> 8) & 0xff)
-#define D3DSHADER_VERSION_MINOR(version) (((version) >> 0) & 0xff)
-#define D3DSHADER_COMMENT(s) ((((s) << D3DSI_COMMENTSIZE_SHIFT) & D3DSI_COMMENTSIZE_MASK) | D3DSIO_COMMENT)
-#define D3DPS_END() 0xffff
-#define D3DVS_END() 0xffff
-#define D3DPRESENTFLAG_LOCKABLE_BACKBUFFER 0x01
-#define D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL 0x02
-#define D3DPRESENTFLAG_DEVICECLIP 0x04
-#define D3DPRESENTFLAG_VIDEO 0x10
-#define D3DLOCK_READONLY 0x10
-#define D3DLOCK_NOSYSLOCK 0x800
-#define D3DLOCK_NOOVERWRITE 0x1000
-#define D3DLOCK_DISCARD 0x2000
-#define D3DLOCK_DONOTWAIT 0x4000
-#define D3DLOCK_NO_DIRTY_UPDATE 0x8000
-#define D3DISSUE_END 0x01
-#define D3DISSUE_BEGIN 0x02
-#define D3DGETDATA_FLUSH 0x01
-#define D3DRTYPECOUNT (D3DRTYPE_INDEXBUFFER+1)
-
-#define MAKEFOURCC(a,b,c,d) \
- ((DWORD)(BYTE)(a) | ((DWORD)(BYTE)(b) << 8) | \
- ((DWORD)(BYTE)(c) << 16) | ((DWORD)(BYTE)(d) << 24 ))
-
-typedef DWORD D3DCOLOR;
-
-typedef enum _D3DBACKBUFFER_TYPE {
- D3DBACKBUFFER_TYPE_MONO = 0,
- D3DBACKBUFFER_TYPE_LEFT = 1,
- D3DBACKBUFFER_TYPE_RIGHT = 2,
- D3DBACKBUFFER_TYPE_FORCE_DWORD = 0xffffffff
-} D3DBACKBUFFER_TYPE;
-
-typedef enum _D3DBASISTYPE {
- D3DBASIS_BEZIER = 0,
- D3DBASIS_BSPLINE = 1,
- D3DBASIS_INTERPOLATE = 2,
- D3DBASIS_FORCE_DWORD = 0xffffffff
-} D3DBASISTYPE;
-
-typedef enum _D3DBLEND {
- D3DBLEND_ZERO = 1,
- D3DBLEND_ONE = 2,
- D3DBLEND_SRCCOLOR = 3,
- D3DBLEND_INVSRCCOLOR = 4,
- D3DBLEND_SRCALPHA = 5,
- D3DBLEND_INVSRCALPHA = 6,
- D3DBLEND_DESTALPHA = 7,
- D3DBLEND_INVDESTALPHA = 8,
- D3DBLEND_DESTCOLOR = 9,
- D3DBLEND_INVDESTCOLOR = 10,
- D3DBLEND_SRCALPHASAT = 11,
- D3DBLEND_BOTHSRCALPHA = 12,
- D3DBLEND_BOTHINVSRCALPHA = 13,
- D3DBLEND_BLENDFACTOR = 14,
- D3DBLEND_INVBLENDFACTOR = 15,
- D3DBLEND_FORCE_DWORD = 0xffffffff
-} D3DBLEND;
-
-typedef enum _D3DBLENDOP {
- D3DBLENDOP_ADD = 1,
- D3DBLENDOP_SUBTRACT = 2,
- D3DBLENDOP_REVSUBTRACT = 3,
- D3DBLENDOP_MIN = 4,
- D3DBLENDOP_MAX = 5,
- D3DBLENDOP_FORCE_DWORD = 0x7fffffff
-} D3DBLENDOP;
-
-typedef enum _D3DCMPFUNC {
- D3DCMP_NEVER = 1,
- D3DCMP_LESS = 2,
- D3DCMP_EQUAL = 3,
- D3DCMP_LESSEQUAL = 4,
- D3DCMP_GREATER = 5,
- D3DCMP_NOTEQUAL = 6,
- D3DCMP_GREATEREQUAL = 7,
- D3DCMP_ALWAYS = 8,
- D3DCMP_FORCE_DWORD = 0xffffffff
-} D3DCMPFUNC;
-
-typedef enum _D3DCUBEMAP_FACES {
- D3DCUBEMAP_FACE_POSITIVE_X = 0,
- D3DCUBEMAP_FACE_NEGATIVE_X = 1,
- D3DCUBEMAP_FACE_POSITIVE_Y = 2,
- D3DCUBEMAP_FACE_NEGATIVE_Y = 3,
- D3DCUBEMAP_FACE_POSITIVE_Z = 4,
- D3DCUBEMAP_FACE_NEGATIVE_Z = 5,
- D3DCUBEMAP_FACE_FORCE_DWORD = 0xffffffff
-} D3DCUBEMAP_FACES;
-
-typedef enum _D3DCULL {
- D3DCULL_NONE = 1,
- D3DCULL_CW = 2,
- D3DCULL_CCW = 3,
- D3DCULL_FORCE_DWORD = 0xffffffff
-} D3DCULL;
-
-typedef enum _D3DDEBUGMONITORTOKENS {
- D3DDMT_ENABLE = 0,
- D3DDMT_DISABLE = 1,
- D3DDMT_FORCE_DWORD = 0xffffffff
-} D3DDEBUGMONITORTOKENS;
-
-typedef enum _D3DDECLMETHOD
-{
- D3DDECLMETHOD_DEFAULT = 0,
- D3DDECLMETHOD_PARTIALU = 1,
- D3DDECLMETHOD_PARTIALV = 2,
- D3DDECLMETHOD_CROSSUV = 3,
- D3DDECLMETHOD_UV = 4,
- D3DDECLMETHOD_LOOKUP = 5,
- D3DDECLMETHOD_LOOKUPPRESAMPLED = 6
-} D3DDECLMETHOD;
-
-typedef enum _D3DDECLTYPE
-{
- D3DDECLTYPE_FLOAT1 = 0,
- D3DDECLTYPE_FLOAT2 = 1,
- D3DDECLTYPE_FLOAT3 = 2,
- D3DDECLTYPE_FLOAT4 = 3,
- D3DDECLTYPE_D3DCOLOR = 4,
- D3DDECLTYPE_UBYTE4 = 5,
- D3DDECLTYPE_SHORT2 = 6,
- D3DDECLTYPE_SHORT4 = 7,
- D3DDECLTYPE_UBYTE4N = 8,
- D3DDECLTYPE_SHORT2N = 9,
- D3DDECLTYPE_SHORT4N = 10,
- D3DDECLTYPE_USHORT2N = 11,
- D3DDECLTYPE_USHORT4N = 12,
- D3DDECLTYPE_UDEC3 = 13,
- D3DDECLTYPE_DEC3N = 14,
- D3DDECLTYPE_FLOAT16_2 = 15,
- D3DDECLTYPE_FLOAT16_4 = 16,
- D3DDECLTYPE_UNUSED = 17,
-} D3DDECLTYPE;
-
-typedef enum _D3DDECLUSAGE
-{
- D3DDECLUSAGE_POSITION = 0,
- D3DDECLUSAGE_BLENDWEIGHT = 1,
- D3DDECLUSAGE_BLENDINDICES = 2,
- D3DDECLUSAGE_NORMAL = 3,
- D3DDECLUSAGE_PSIZE = 4,
- D3DDECLUSAGE_TEXCOORD = 5,
- D3DDECLUSAGE_TANGENT = 6,
- D3DDECLUSAGE_BINORMAL = 7,
- D3DDECLUSAGE_TESSFACTOR = 8,
- D3DDECLUSAGE_POSITIONT = 9,
- D3DDECLUSAGE_COLOR = 10,
- D3DDECLUSAGE_FOG = 11,
- D3DDECLUSAGE_DEPTH = 12,
- D3DDECLUSAGE_SAMPLE = 13
-} D3DDECLUSAGE;
-
-typedef enum _D3DDEGREETYPE {
- D3DDEGREE_LINEAR = 1,
- D3DDEGREE_QUADRATIC = 2,
- D3DDEGREE_CUBIC = 3,
- D3DDEGREE_QUINTIC = 5,
- D3DDEGREE_FORCE_DWORD = 0xffffffff,
-} D3DDEGREETYPE;
-
-typedef enum _D3DDEVTYPE {
- D3DDEVTYPE_HAL = 1,
- D3DDEVTYPE_REF = 2,
- D3DDEVTYPE_SW = 3,
- D3DDEVTYPE_FORCE_DWORD = 0xffffffff
-} D3DDEVTYPE;
-
-typedef enum _D3DFILLMODE {
- D3DFILL_POINT = 1,
- D3DFILL_WIREFRAME = 2,
- D3DFILL_SOLID = 3,
- D3DFILL_FORCE_DWORD = 0xffffffff
-} D3DFILLMODE;
-
-typedef enum _D3DFOGMODE {
- D3DFOG_NONE = 0,
- D3DFOG_EXP = 1,
- D3DFOG_EXP2 = 2,
- D3DFOG_LINEAR = 3,
- D3DFOG_FORCE_DWORD = 0xffffffff
-} D3DFOGMODE;
-
-typedef enum _D3DFORMAT {
- D3DFMT_UNKNOWN = 0,
- D3DFMT_R8G8B8 = 20,
- D3DFMT_A8R8G8B8 = 21,
- D3DFMT_X8R8G8B8 = 22,
- D3DFMT_R5G6B5 = 23,
- D3DFMT_X1R5G5B5 = 24,
- D3DFMT_A1R5G5B5 = 25,
- D3DFMT_A4R4G4B4 = 26,
- D3DFMT_R3G3B2 = 27,
- D3DFMT_A8 = 28,
- D3DFMT_A8R3G3B2 = 29,
- D3DFMT_X4R4G4B4 = 30,
- D3DFMT_A2B10G10R10 = 31,
- D3DFMT_A8B8G8R8 = 32,
- D3DFMT_X8B8G8R8 = 33,
- D3DFMT_G16R16 = 34,
- D3DFMT_A2R10G10B10 = 35,
- D3DFMT_A16B16G16R16 = 36,
- D3DFMT_A8P8 = 40,
- D3DFMT_P8 = 41,
- D3DFMT_L8 = 50,
- D3DFMT_A8L8 = 51,
- D3DFMT_A4L4 = 52,
- D3DFMT_V8U8 = 60,
- D3DFMT_L6V5U5 = 61,
- D3DFMT_X8L8V8U8 = 62,
- D3DFMT_Q8W8V8U8 = 63,
- D3DFMT_V16U16 = 64,
- D3DFMT_A2W10V10U10 = 67,
- D3DFMT_UYVY = MAKEFOURCC('U','Y','V','Y'),
- D3DFMT_R8G8_B8G8 = MAKEFOURCC('R','G','B','G'),
- D3DFMT_YUY2 = MAKEFOURCC('Y','U','Y','2'),
- D3DFMT_G8R8_G8B8 = MAKEFOURCC('G','R','G','B'),
- D3DFMT_DXT1 = MAKEFOURCC('D','X','T','1'),
- D3DFMT_DXT2 = MAKEFOURCC('D','X','T','2'),
- D3DFMT_DXT3 = MAKEFOURCC('D','X','T','3'),
- D3DFMT_DXT4 = MAKEFOURCC('D','X','T','4'),
- D3DFMT_DXT5 = MAKEFOURCC('D','X','T','5'),
- D3DFMT_D16_LOCKABLE = 70,
- D3DFMT_D32 = 71,
- D3DFMT_D15S1 = 73,
- D3DFMT_D24S8 = 75,
- D3DFMT_D24X8 = 77,
- D3DFMT_D24X4S4 = 79,
- D3DFMT_D16 = 80,
- D3DFMT_L16 = 81,
- D3DFMT_D32F_LOCKABLE = 82,
- D3DFMT_D24FS8 = 83,
- D3DFMT_VERTEXDATA = 100,
- D3DFMT_INDEX16 = 101,
- D3DFMT_INDEX32 = 102,
- D3DFMT_Q16W16V16U16 = 110,
- D3DFMT_MULTI2_ARGB8 = MAKEFOURCC('M','E','T','1'),
- D3DFMT_R16F = 111,
- D3DFMT_G16R16F = 112,
- D3DFMT_A16B16G16R16F = 113,
- D3DFMT_R32F = 114,
- D3DFMT_G32R32F = 115,
- D3DFMT_A32B32G32R32F = 116,
- D3DFMT_CxV8U8 = 117,
- D3DFMT_FORCE_DWORD = 0xffffffff
-} D3DFORMAT;
-
-typedef enum _D3DLIGHTTYPE {
- D3DLIGHT_POINT = 1,
- D3DLIGHT_SPOT = 2,
- D3DLIGHT_DIRECTIONAL = 3,
- D3DLIGHT_FORCE_DWORD = 0xffffffff
-} D3DLIGHTTYPE;
-
-typedef enum _D3DMATERIALCOLORSOURCE
-{
- D3DMCS_MATERIAL = 0,
- D3DMCS_COLOR1 = 1,
- D3DMCS_COLOR2 = 2,
- D3DMCS_FORCE_DWORD = 0xffffffff
-} D3DMATERIALCOLORSOURCE;
-
-typedef enum _D3DMULTISAMPLE_TYPE {
- D3DMULTISAMPLE_NONE = 0,
- D3DMULTISAMPLE_NONMASKABLE = 1,
- D3DMULTISAMPLE_2_SAMPLES = 2,
- D3DMULTISAMPLE_3_SAMPLES = 3,
- D3DMULTISAMPLE_4_SAMPLES = 4,
- D3DMULTISAMPLE_5_SAMPLES = 5,
- D3DMULTISAMPLE_6_SAMPLES = 6,
- D3DMULTISAMPLE_7_SAMPLES = 7,
- D3DMULTISAMPLE_8_SAMPLES = 8,
- D3DMULTISAMPLE_9_SAMPLES = 9,
- D3DMULTISAMPLE_10_SAMPLES = 10,
- D3DMULTISAMPLE_11_SAMPLES = 11,
- D3DMULTISAMPLE_12_SAMPLES = 12,
- D3DMULTISAMPLE_13_SAMPLES = 13,
- D3DMULTISAMPLE_14_SAMPLES = 14,
- D3DMULTISAMPLE_15_SAMPLES = 15,
- D3DMULTISAMPLE_16_SAMPLES = 16,
- D3DMULTISAMPLE_FORCE_DWORD = 0xffffffff
-} D3DMULTISAMPLE_TYPE;
-
-typedef enum _D3DORDERTYPE {
- D3DORDER_LINEAR = 1,
- D3DORDER_QUADRATIC = 2,
- D3DORDER_CUBIC = 3,
- D3DORDER_QUINTIC = 5,
- D3DORDER_FORCE_DWORD = 0xffffffff
-} D3DORDERTYPE;
-
-typedef enum _D3DPATCHEDGESTYLE
-{
- D3DPATCHEDGE_DISCRETE = 0,
- D3DPATCHEDGE_CONTINUOUS = 1,
- D3DPATCHEDGE_FORCE_DWORD = 0xffffffff
-} D3DPATCHEDGESTYLE;
-
-typedef enum _D3DPOOL {
- D3DPOOL_DEFAULT = 0,
- D3DPOOL_MANAGED = 1,
- D3DPOOL_SYSTEMMEM = 2,
- D3DPOOL_SCRATCH = 3,
- D3DPOOL_FORCE_DWORD = 0xffffffff
-} D3DPOOL;
-
-typedef enum _D3DPRIMITIVETYPE {
- D3DPT_POINTLIST = 1,
- D3DPT_LINELIST = 2,
- D3DPT_LINESTRIP = 3,
- D3DPT_TRIANGLELIST = 4,
- D3DPT_TRIANGLESTRIP = 5,
- D3DPT_TRIANGLEFAN = 6,
- D3DPT_FORCE_DWORD = 0xffffffff
-} D3DPRIMITIVETYPE;
-
-typedef enum _D3DQUERYTYPE {
- D3DQUERYTYPE_VCACHE = 4,
- D3DQUERYTYPE_RESOURCEMANAGER = 5,
- D3DQUERYTYPE_VERTEXSTATS = 6,
- D3DQUERYTYPE_EVENT = 8,
- D3DQUERYTYPE_OCCLUSION = 9
-} D3DQUERYTYPE;
-
-typedef enum _D3DRENDERSTATETYPE {
- D3DRS_ZENABLE = 7,
- D3DRS_FILLMODE = 8,
- D3DRS_SHADEMODE = 9,
- D3DRS_ZWRITEENABLE = 14,
- D3DRS_ALPHATESTENABLE = 15,
- D3DRS_LASTPIXEL = 16,
- D3DRS_SRCBLEND = 19,
- D3DRS_DESTBLEND = 20,
- D3DRS_CULLMODE = 22,
- D3DRS_ZFUNC = 23,
- D3DRS_ALPHAREF = 24,
- D3DRS_ALPHAFUNC = 25,
- D3DRS_DITHERENABLE = 26,
- D3DRS_ALPHABLENDENABLE = 27,
- D3DRS_FOGENABLE = 28,
- D3DRS_SPECULARENABLE = 29,
- D3DRS_FOGCOLOR = 34,
- D3DRS_FOGTABLEMODE = 35,
- D3DRS_FOGSTART = 36,
- D3DRS_FOGEND = 37,
- D3DRS_FOGDENSITY = 38,
- D3DRS_RANGEFOGENABLE = 48,
- D3DRS_STENCILENABLE = 52,
- D3DRS_STENCILFAIL = 53,
- D3DRS_STENCILZFAIL = 54,
- D3DRS_STENCILPASS = 55,
- D3DRS_STENCILFUNC = 56,
- D3DRS_STENCILREF = 57,
- D3DRS_STENCILMASK = 58,
- D3DRS_STENCILWRITEMASK = 59,
- D3DRS_TEXTUREFACTOR = 60,
- D3DRS_WRAP0 = 128,
- D3DRS_WRAP1 = 129,
- D3DRS_WRAP2 = 130,
- D3DRS_WRAP3 = 131,
- D3DRS_WRAP4 = 132,
- D3DRS_WRAP5 = 133,
- D3DRS_WRAP6 = 134,
- D3DRS_WRAP7 = 135,
- D3DRS_CLIPPING = 136,
- D3DRS_LIGHTING = 137,
- D3DRS_AMBIENT = 139,
- D3DRS_FOGVERTEXMODE = 140,
- D3DRS_COLORVERTEX = 141,
- D3DRS_LOCALVIEWER = 142,
- D3DRS_NORMALIZENORMALS = 143,
- D3DRS_DIFFUSEMATERIALSOURCE = 145,
- D3DRS_SPECULARMATERIALSOURCE = 146,
- D3DRS_AMBIENTMATERIALSOURCE = 147,
- D3DRS_EMISSIVEMATERIALSOURCE = 148,
- D3DRS_VERTEXBLEND = 151,
- D3DRS_CLIPPLANEENABLE = 152,
- D3DRS_POINTSIZE = 154,
- D3DRS_POINTSIZE_MIN = 155,
- D3DRS_POINTSPRITEENABLE = 156,
- D3DRS_POINTSCALEENABLE = 157,
- D3DRS_POINTSCALE_A = 158,
- D3DRS_POINTSCALE_B = 159,
- D3DRS_POINTSCALE_C = 160,
- D3DRS_MULTISAMPLEANTIALIAS = 161,
- D3DRS_MULTISAMPLEMASK = 162,
- D3DRS_PATCHEDGESTYLE = 163,
- D3DRS_DEBUGMONITORTOKEN = 165,
- D3DRS_POINTSIZE_MAX = 166,
- D3DRS_INDEXEDVERTEXBLENDENABLE = 167,
- D3DRS_COLORWRITEENABLE = 168,
- D3DRS_TWEENFACTOR = 170,
- D3DRS_BLENDOP = 171,
- D3DRS_POSITIONDEGREE = 172,
- D3DRS_NORMALDEGREE = 173,
- D3DRS_SCISSORTESTENABLE = 174,
- D3DRS_SLOPESCALEDEPTHBIAS = 175,
- D3DRS_ANTIALIASEDLINEENABLE = 176,
- D3DRS_MINTESSELLATIONLEVEL = 178,
- D3DRS_MAXTESSELLATIONLEVEL = 179,
- D3DRS_ADAPTIVETESS_X = 180,
- D3DRS_ADAPTIVETESS_Y = 181,
- D3DRS_ADAPTIVETESS_Z = 182,
- D3DRS_ADAPTIVETESS_W = 183,
- D3DRS_ENABLEADAPTIVETESSELLATION = 184,
- D3DRS_TWOSIDEDSTENCILMODE = 185,
- D3DRS_CCW_STENCILFAIL = 186,
- D3DRS_CCW_STENCILZFAIL = 187,
- D3DRS_CCW_STENCILPASS = 188,
- D3DRS_CCW_STENCILFUNC = 189,
- D3DRS_COLORWRITEENABLE1 = 190,
- D3DRS_COLORWRITEENABLE2 = 191,
- D3DRS_COLORWRITEENABLE3 = 192,
- D3DRS_BLENDFACTOR = 193,
- D3DRS_SRGBWRITEENABLE = 194,
- D3DRS_DEPTHBIAS = 195,
- D3DRS_WRAP8 = 198,
- D3DRS_WRAP9 = 199,
- D3DRS_WRAP10 = 200,
- D3DRS_WRAP11 = 201,
- D3DRS_WRAP12 = 202,
- D3DRS_WRAP13 = 203,
- D3DRS_WRAP14 = 204,
- D3DRS_WRAP15 = 205,
- D3DRS_SEPARATEALPHABLENDENABLE = 206,
- D3DRS_SRCBLENDALPHA = 207,
- D3DRS_DESTBLENDALPHA = 208,
- D3DRS_BLENDOPALPHA = 209,
- D3DRS_FORCE_DWORD = 0xffffffff
-} D3DRENDERSTATETYPE;
-
-typedef enum _D3DRESOURCETYPE {
- D3DRTYPE_SURFACE = 1,
- D3DRTYPE_VOLUME = 2,
- D3DRTYPE_TEXTURE = 3,
- D3DRTYPE_VOLUMETEXTURE = 4,
- D3DRTYPE_CUBETEXTURE = 5,
- D3DRTYPE_VERTEXBUFFER = 6,
- D3DRTYPE_INDEXBUFFER = 7,
- D3DRTYPE_FORCE_DWORD = 0xffffffff
-} D3DRESOURCETYPE;
-
-typedef enum _D3DSAMPLER_TEXTURE_TYPE
-{
- D3DSTT_UNKNOWN = 0 << D3DSP_TEXTURETYPE_SHIFT,
- D3DSTT_2D = 2 << D3DSP_TEXTURETYPE_SHIFT,
- D3DSTT_CUBE = 3 << D3DSP_TEXTURETYPE_SHIFT,
- D3DSTT_VOLUME = 4 << D3DSP_TEXTURETYPE_SHIFT,
- D3DSTT_FORCE_DWORD = 0xffffffff
-} D3DSAMPLER_TEXTURE_TYPE;
-
-typedef enum _D3DSAMPLERSTATETYPE {
- D3DSAMP_ADDRESSU = 1,
- D3DSAMP_ADDRESSV = 2,
- D3DSAMP_ADDRESSW = 3,
- D3DSAMP_BORDERCOLOR = 4,
- D3DSAMP_MAGFILTER = 5,
- D3DSAMP_MINFILTER = 6,
- D3DSAMP_MIPFILTER = 7,
- D3DSAMP_MIPMAPLODBIAS = 8,
- D3DSAMP_MAXMIPLEVEL = 9,
- D3DSAMP_MAXANISOTROPY = 10,
- D3DSAMP_SRGBTEXTURE = 11,
- D3DSAMP_ELEMENTINDEX = 12,
- D3DSAMP_DMAPOFFSET = 13,
- D3DSAMP_FORCE_DWORD = 0xffffffff,
-} D3DSAMPLERSTATETYPE;
-
-typedef enum _D3DSHADEMODE {
- D3DSHADE_FLAT = 1,
- D3DSHADE_GOURAUD = 2,
- D3DSHADE_PHONG = 3,
- D3DSHADE_FORCE_DWORD = 0xffffffff
-} D3DSHADEMODE;
-
-typedef enum _D3DSHADER_ADDRESSMODE_TYPE
-{
- D3DSHADER_ADDRMODE_ABSOLUTE = (0 << D3DSHADER_ADDRESSMODE_SHIFT),
- D3DSHADER_ADDRMODE_RELATIVE = (1 << D3DSHADER_ADDRESSMODE_SHIFT),
- D3DSHADER_ADDRMODE_FORCE_DWORD = 0xffffffff
-} D3DSHADER_ADDRESSMODE_TYPE;
-
-typedef enum _D3DSHADER_COMPARISON
-{
- D3DSPC_RESERVED0 = 0,
- D3DSPC_GT = 1,
- D3DSPC_EQ = 2,
- D3DSPC_GE = 3,
- D3DSPC_LT = 4,
- D3DSPC_NE = 5,
- D3DSPC_LE = 6,
- D3DSPC_RESERVED1 = 7
-} D3DSHADER_COMPARISON;
-
-typedef enum _D3DSHADER_INSTRUCTION_OPCODE_TYPE
-{
- D3DSIO_NOP = 0,
- D3DSIO_MOV = 1,
- D3DSIO_ADD = 2,
- D3DSIO_SUB = 3,
- D3DSIO_MAD = 4,
- D3DSIO_MUL = 5,
- D3DSIO_RCP = 6,
- D3DSIO_RSQ = 7,
- D3DSIO_DP3 = 8,
- D3DSIO_DP4 = 9,
- D3DSIO_MIN = 10,
- D3DSIO_MAX = 11,
- D3DSIO_SLT = 12,
- D3DSIO_SGE = 13,
- D3DSIO_EXP = 14,
- D3DSIO_LOG = 15,
- D3DSIO_LIT = 16,
- D3DSIO_DST = 17,
- D3DSIO_LRP = 18,
- D3DSIO_FRC = 19,
- D3DSIO_M4x4 = 20,
- D3DSIO_M4x3 = 21,
- D3DSIO_M3x4 = 22,
- D3DSIO_M3x3 = 23,
- D3DSIO_M3x2 = 24,
- D3DSIO_CALL = 25,
- D3DSIO_CALLNZ = 26,
- D3DSIO_LOOP = 27,
- D3DSIO_RET = 28,
- D3DSIO_ENDLOOP = 29,
- D3DSIO_LABEL = 30,
- D3DSIO_DCL = 31,
- D3DSIO_POW = 32,
- D3DSIO_CRS = 33,
- D3DSIO_SGN = 34,
- D3DSIO_ABS = 35,
- D3DSIO_NRM = 36,
- D3DSIO_SINCOS = 37,
- D3DSIO_REP = 38,
- D3DSIO_ENDREP = 39,
- D3DSIO_IF = 40,
- D3DSIO_IFC = 41,
- D3DSIO_ELSE = 42,
- D3DSIO_ENDIF = 43,
- D3DSIO_BREAK = 44,
- D3DSIO_BREAKC = 45,
- D3DSIO_MOVA = 46,
- D3DSIO_DEFB = 47,
- D3DSIO_DEFI = 48,
- D3DSIO_TEXCOORD = 64,
- D3DSIO_TEXKILL = 65,
- D3DSIO_TEX = 66,
- D3DSIO_TEXBEM = 67,
- D3DSIO_TEXBEML = 68,
- D3DSIO_TEXREG2AR = 69,
- D3DSIO_TEXREG2GB = 70,
- D3DSIO_TEXM3x2PAD = 71,
- D3DSIO_TEXM3x2TEX = 72,
- D3DSIO_TEXM3x3PAD = 73,
- D3DSIO_TEXM3x3TEX = 74,
- D3DSIO_RESERVED0 = 75,
- D3DSIO_TEXM3x3SPEC = 76,
- D3DSIO_TEXM3x3VSPEC = 77,
- D3DSIO_EXPP = 78,
- D3DSIO_LOGP = 79,
- D3DSIO_CND = 80,
- D3DSIO_DEF = 81,
- D3DSIO_TEXREG2RGB = 82,
- D3DSIO_TEXDP3TEX = 83,
- D3DSIO_TEXM3x2DEPTH = 84,
- D3DSIO_TEXDP3 = 85,
- D3DSIO_TEXM3x3 = 86,
- D3DSIO_TEXDEPTH = 87,
- D3DSIO_CMP = 88,
- D3DSIO_BEM = 89,
- D3DSIO_DP2ADD = 90,
- D3DSIO_DSX = 91,
- D3DSIO_DSY = 92,
- D3DSIO_TEXLDD = 93,
- D3DSIO_SETP = 94,
- D3DSIO_TEXLDL = 95,
- D3DSIO_BREAKP = 96,
- D3DSIO_PHASE = 0xfffd,
- D3DSIO_COMMENT = 0xfffe,
- D3DSIO_END = 0xffff,
- D3DSIO_FORCE_DWORD = 0xffffffff
-} D3DSHADER_INSTRUCTION_OPCODE_TYPE;
-
-typedef enum _D3DSHADER_MISCTYPE_OFFSETS
-{
- D3DSMO_POSITION = 0,
- D3DSMO_FACE = 1
-} D3DSHADER_MISCTYPE_OFFSETS;
-
-typedef enum _D3DSHADER_PARAM_REGISTER_TYPE
-{
- D3DSPR_TEMP = 0,
- D3DSPR_INPUT = 1,
- D3DSPR_CONST = 2,
- D3DSPR_ADDR = 3,
- D3DSPR_TEXTURE = 3,
- D3DSPR_RASTOUT = 4,
- D3DSPR_ATTROUT = 5,
- D3DSPR_TEXCRDOUT = 6,
- D3DSPR_OUTPUT = 6,
- D3DSPR_CONSTINT = 7,
- D3DSPR_COLOROUT = 8,
- D3DSPR_DEPTHOUT = 9,
- D3DSPR_SAMPLER = 10,
- D3DSPR_CONST2 = 11,
- D3DSPR_CONST3 = 12,
- D3DSPR_CONST4 = 13,
- D3DSPR_CONSTBOOL = 14,
- D3DSPR_LOOP = 15,
- D3DSPR_TEMPFLOAT16 = 16,
- D3DSPR_MISCTYPE = 17,
- D3DSPR_LABEL = 18,
- D3DSPR_PREDICATE = 19,
- D3DSPR_FORCE_DWORD = 0xffffffff
-} D3DSHADER_PARAM_REGISTER_TYPE;
-
-typedef enum _D3DSHADER_PARAM_SRCMOD_TYPE
-{
- D3DSPSM_NONE = 0 << D3DSP_SRCMOD_SHIFT,
- D3DSPSM_NEG = 1 << D3DSP_SRCMOD_SHIFT,
- D3DSPSM_BIAS = 2 << D3DSP_SRCMOD_SHIFT,
- D3DSPSM_BIASNEG = 3 << D3DSP_SRCMOD_SHIFT,
- D3DSPSM_SIGN = 4 << D3DSP_SRCMOD_SHIFT,
- D3DSPSM_SIGNNEG = 5 << D3DSP_SRCMOD_SHIFT,
- D3DSPSM_COMP = 6 << D3DSP_SRCMOD_SHIFT,
- D3DSPSM_X2 = 7 << D3DSP_SRCMOD_SHIFT,
- D3DSPSM_X2NEG = 8 << D3DSP_SRCMOD_SHIFT,
- D3DSPSM_DZ = 9 << D3DSP_SRCMOD_SHIFT,
- D3DSPSM_DW = 10 << D3DSP_SRCMOD_SHIFT,
- D3DSPSM_ABS = 11 << D3DSP_SRCMOD_SHIFT,
- D3DSPSM_ABSNEG = 12 << D3DSP_SRCMOD_SHIFT,
- D3DSPSM_NOT = 13 << D3DSP_SRCMOD_SHIFT,
- D3DSPSM_FORCE_DWORD = 0xffffffff
-} D3DSHADER_PARAM_SRCMOD_TYPE;
-
-typedef enum _D3DVS_ADDRESSMODE_TYPE
-{
- D3DVS_ADDRMODE_ABSOLUTE = (0 << D3DVS_ADDRESSMODE_SHIFT),
- D3DVS_ADDRMODE_RELATIVE = (1 << D3DVS_ADDRESSMODE_SHIFT),
- D3DVS_ADDRMODE_FORCE_DWORD = 0xffffffff
-} D3DVS_ADDRESSMODE_TYPE;
-
-typedef enum _D3DVS_RASTOUT_OFFSETS
-{
- D3DSRO_POSITION = 0,
- D3DSRO_FOG = 1,
- D3DSRO_POINT_SIZE = 2,
- D3DSRO_FORCE_DWORD = 0xffffffff
-} D3DVS_RASTOUT_OFFSETS;
-
-typedef enum _D3DSTENCILOP {
- D3DSTENCILOP_KEEP = 1,
- D3DSTENCILOP_ZERO = 2,
- D3DSTENCILOP_REPLACE = 3,
- D3DSTENCILOP_INCRSAT = 4,
- D3DSTENCILOP_DECRSAT = 5,
- D3DSTENCILOP_INVERT = 6,
- D3DSTENCILOP_INCR = 7,
- D3DSTENCILOP_DECR = 8,
- D3DSTENCILOP_FORCE_DWORD = 0x7fffffff
-} D3DSTENCILOP;
-
-typedef enum _D3DSTATEBLOCKTYPE {
- D3DSBT_ALL = 1,
- D3DSBT_PIXELSTATE = 2,
- D3DSBT_VERTEXSTATE = 3,
- D3DSBT_FORCE_DWORD = 0xffffffff
-} D3DSTATEBLOCKTYPE;
-
-typedef enum _D3DSWAPEFFECT {
- D3DSWAPEFFECT_DISCARD = 1,
- D3DSWAPEFFECT_FLIP = 2,
- D3DSWAPEFFECT_COPY = 3,
- D3DSWAPEFFECT_COPY_VSYNC = 4,
- D3DSWAPEFFECT_FORCE_DWORD = 0xffffffff
-} D3DSWAPEFFECT;
-
-typedef enum _D3DTEXTUREADDRESS {
- D3DTADDRESS_WRAP = 1,
- D3DTADDRESS_MIRROR = 2,
- D3DTADDRESS_CLAMP = 3,
- D3DTADDRESS_BORDER = 4,
- D3DTADDRESS_MIRRORONCE = 5,
- D3DTADDRESS_FORCE_DWORD = 0xffffffff
-} D3DTEXTUREADDRESS;
-
-typedef enum _D3DTEXTUREFILTERTYPE {
- D3DTEXF_NONE = 0,
- D3DTEXF_POINT = 1,
- D3DTEXF_LINEAR = 2,
- D3DTEXF_ANISOTROPIC = 3,
- D3DTEXF_PYRAMIDALQUAD = 6,
- D3DTEXF_GAUSSIANQUAD = 7,
- D3DTEXF_FORCE_DWORD = 0xffffffff
-} D3DTEXTUREFILTERTYPE;
-
-typedef enum _D3DTEXTURESTAGESTATETYPE {
- D3DTSS_COLOROP = 1,
- D3DTSS_COLORARG1 = 2,
- D3DTSS_COLORARG2 = 3,
- D3DTSS_ALPHAOP = 4,
- D3DTSS_ALPHAARG1 = 5,
- D3DTSS_ALPHAARG2 = 6,
- D3DTSS_BUMPENVMAT00 = 7,
- D3DTSS_BUMPENVMAT01 = 8,
- D3DTSS_BUMPENVMAT10 = 9,
- D3DTSS_BUMPENVMAT11 = 10,
- D3DTSS_TEXCOORDINDEX = 11,
- D3DTSS_BUMPENVLSCALE = 22,
- D3DTSS_BUMPENVLOFFSET = 23,
- D3DTSS_TEXTURETRANSFORMFLAGS = 24,
- D3DTSS_ADDRESSW = 25,
- D3DTSS_COLORARG0 = 26,
- D3DTSS_ALPHAARG0 = 27,
- D3DTSS_RESULTARG = 28,
- D3DTSS_CONSTANT = 32,
- D3DTSS_FORCE_DWORD = 0xffffffff
-} D3DTEXTURESTAGESTATETYPE;
-
-typedef enum _D3DTEXTUREOP {
- D3DTOP_DISABLE = 1,
- D3DTOP_SELECTARG1 = 2,
- D3DTOP_SELECTARG2 = 3,
- D3DTOP_MODULATE = 4,
- D3DTOP_MODULATE2X = 5,
- D3DTOP_MODULATE4X = 6,
- D3DTOP_ADD = 7,
- D3DTOP_ADDSIGNED = 8,
- D3DTOP_ADDSIGNED2X = 9,
- D3DTOP_SUBTRACT = 10,
- D3DTOP_ADDSMOOTH = 11,
- D3DTOP_BLENDDIFFUSEALPHA = 12,
- D3DTOP_BLENDTEXTUREALPHA = 13,
- D3DTOP_BLENDFACTORALPHA = 14,
- D3DTOP_BLENDTEXTUREALPHAPM = 15,
- D3DTOP_BLENDCURRENTALPHA = 16,
- D3DTOP_PREMODULATE = 17,
- D3DTOP_MODULATEALPHA_ADDCOLOR = 18,
- D3DTOP_MODULATECOLOR_ADDALPHA = 19,
- D3DTOP_MODULATEINVALPHA_ADDCOLOR = 20,
- D3DTOP_MODULATEINVCOLOR_ADDALPHA = 21,
- D3DTOP_BUMPENVMAP = 22,
- D3DTOP_BUMPENVMAPLUMINANCE = 23,
- D3DTOP_DOTPRODUCT3 = 24,
- D3DTOP_MULTIPLYADD = 25,
- D3DTOP_LERP = 26,
- D3DTOP_FORCE_DWORD = 0xffffffff,
-} D3DTEXTUREOP;
-
-typedef enum _D3DTEXTURETRANSFORMFLAGS {
- D3DTTFF_DISABLE = 0,
- D3DTTFF_COUNT1 = 1,
- D3DTTFF_COUNT2 = 2,
- D3DTTFF_COUNT3 = 3,
- D3DTTFF_COUNT4 = 4,
- D3DTTFF_PROJECTED = 256,
- D3DTTFF_FORCE_DWORD = 0xffffffff,
-} D3DTEXTURETRANSFORMFLAGS;
-
-typedef enum _D3DTRANSFORMSTATETYPE {
- D3DTS_VIEW = 2,
- D3DTS_PROJECTION = 3,
- D3DTS_TEXTURE0 = 16,
- D3DTS_TEXTURE1 = 17,
- D3DTS_TEXTURE2 = 18,
- D3DTS_TEXTURE3 = 19,
- D3DTS_TEXTURE4 = 20,
- D3DTS_TEXTURE5 = 21,
- D3DTS_TEXTURE6 = 22,
- D3DTS_TEXTURE7 = 23,
- D3DTS_FORCE_DWORD = 0xffffffff
-} D3DTRANSFORMSTATETYPE;
-
-typedef enum _D3DVERTEXBLENDFLAGS
-{
- D3DVBF_DISABLE = 0,
- D3DVBF_1WEIGHTS = 1,
- D3DVBF_2WEIGHTS = 2,
- D3DVBF_3WEIGHTS = 3,
- D3DVBF_TWEENING = 255,
- D3DVBF_0WEIGHTS = 256,
- D3DVBF_FORCE_DWORD = 0xffffffff
-} D3DVERTEXBLENDFLAGS;
-
-typedef enum _D3DZBUFFERTYPE {
- D3DZB_FALSE = 0,
- D3DZB_TRUE = 1,
- D3DZB_USEW = 2,
- D3DZB_FORCE_DWORD = 0xffffffff
-} D3DZBUFFERTYPE;
-
-typedef struct _D3DADAPTER_IDENTIFIER9 {
- char Driver[MAX_DEVICE_IDENTIFIER_STRING];
- char Description[MAX_DEVICE_IDENTIFIER_STRING];
- char DeviceName[32];
- LARGE_INTEGER DriverVersion;
- DWORD VendorId;
- DWORD DeviceId;
- DWORD SubSysId;
- DWORD Revision;
- GUID DeviceIdentifier;
- DWORD WHQLLevel;
-} D3DADAPTER_IDENTIFIER9;
-
-typedef struct _D3DBOX {
- UINT Left;
- UINT Top;
- UINT Right;
- UINT Bottom;
- UINT Front;
- UINT Back;
-} D3DBOX;
-
-typedef struct _D3DCLIPSTATUS9 {
- DWORD ClipUnion;
- DWORD ClipIntersection;
-} D3DCLIPSTATUS9;
-
-typedef struct _D3DCOLORVALUE {
- float r;
- float g;
- float b;
- float a;
-} D3DCOLORVALUE;
-
-typedef struct _D3DRESOURCESTATS
-{
- BOOL bThrashing;
- DWORD ApproxBytesDownloaded;
- DWORD NumEvicts;
- DWORD NumVidCreates;
- DWORD LastPri;
- DWORD NumUsed;
- DWORD NumUsedInVidMem;
- DWORD WorkingSet;
- DWORD WorkingSetBytes;
- DWORD TotalManaged;
- DWORD TotalBytes;
-} D3DRESOURCESTATS;
-
-typedef struct _D3DDEVICE_CREATION_PARAMETERS {
- UINT AdapterOrdinal;
- D3DDEVTYPE DeviceType;
- HWND hFocusWindow;
- DWORD BehaviorFlags;
-} D3DDEVICE_CREATION_PARAMETERS;
-
-typedef struct _D3DDEVINFO_RESOURCEMANAGER {
- D3DRESOURCESTATS stats[D3DRTYPECOUNT];
-} D3DDEVINFO_RESOURCEMANAGER, *LPD3DDEVINFO_RESOURCEMANAGER;
-
-typedef struct _D3DDEVINFO_D3DVERTEXSTATS {
- DWORD NumRenderedTriangles;
- DWORD NumExtraClippingTriangles;
-} D3DDEVINFO_D3DVERTEXSTATS, *LPD3DDEVINFO_D3DVERTEXSTATS;
-
-typedef struct _D3DDEVINFO_VCACHE {
- DWORD Pattern;
- DWORD OptMethod;
- DWORD CacheSize;
- DWORD MagicNumber;
-} D3DDEVINFO_VCACHE, *LPD3DDEVINFO_VCACHE;
-
-typedef struct _D3DDISPLAYMODE {
- UINT Width;
- UINT Height;
- UINT RefreshRate;
- D3DFORMAT Format;
-} D3DDISPLAYMODE;
-
-typedef struct _D3DGAMMARAMP {
- WORD red[256];
- WORD green[256];
- WORD blue[256];
-} D3DGAMMARAMP;
-
-typedef struct _D3DINDEXBUFFER_DESC {
- D3DFORMAT Format;
- D3DRESOURCETYPE Type;
- DWORD Usage;
- D3DPOOL Pool;
- UINT Size;
-} D3DINDEXBUFFER_DESC;
-
-typedef struct _D3DVECTOR {
- float x;
- float y;
- float z;
-} D3DVECTOR;
-
-typedef struct _D3DLIGHT9 {
- D3DLIGHTTYPE Type;
- D3DCOLORVALUE Diffuse;
- D3DCOLORVALUE Specular;
- D3DCOLORVALUE Ambient;
- D3DVECTOR Position;
- D3DVECTOR Direction;
- float Range;
- float Falloff;
- float Attenuation0;
- float Attenuation1;
- float Attenuation2;
- float Theta;
- float Phi;
-} D3DLIGHT9;
-
-typedef struct _D3DLOCKED_BOX {
- INT RowPitch;
- INT SlicePitch;
- void *pBits;
-} D3DLOCKED_BOX;
-
-typedef struct _D3DLOCKED_RECT {
- INT Pitch;
- void *pBits;
-} D3DLOCKED_RECT;
-
-typedef struct _D3DMATERIAL9 {
- D3DCOLORVALUE Diffuse;
- D3DCOLORVALUE Ambient;
- D3DCOLORVALUE Specular;
- D3DCOLORVALUE Emissive;
- float Power;
-} D3DMATERIAL9;
-
-typedef struct _D3DMATRIX {
- union {
- struct {
- float _11, _12, _13, _14;
- float _21, _22, _23, _24;
- float _31, _32, _33, _34;
- float _41, _42, _43, _44;
- };
- float m[4][4];
- };
-} D3DMATRIX;
-
-typedef struct _D3DPRESENT_PARAMETERS {
- UINT BackBufferWidth;
- UINT BackBufferHeight;
- D3DFORMAT BackBufferFormat;
- UINT BackBufferCount;
- D3DMULTISAMPLE_TYPE MultiSampleType;
- DWORD MultiSampleQuality;
- D3DSWAPEFFECT SwapEffect;
- HWND hDeviceWindow;
- BOOL Windowed;
- BOOL EnableAutoDepthStencil;
- D3DFORMAT AutoDepthStencilFormat;
- DWORD Flags;
- UINT FullScreen_RefreshRateInHz;
- UINT PresentationInterval;
-} D3DPRESENT_PARAMETERS;
-
-typedef struct _D3DRANGE
-{
- UINT Offset;
- UINT Size;
-} D3DRANGE;
-
-typedef struct _D3DRASTER_STATUS {
- BOOL InVBlank;
- UINT ScanLine;
-} D3DRASTER_STATUS;
-
-typedef struct _D3DRECT {
- LONG x1;
- LONG y1;
- LONG x2;
- LONG y2;
-} D3DRECT;
-
-typedef struct _D3DRECTPATCH_INFO {
- UINT StartVertexOffsetWidth;
- UINT StartVertexOffsetHeight;
- UINT Width;
- UINT Height;
- UINT Stride;
- D3DBASISTYPE Basis;
- D3DORDERTYPE Order;
-} D3DRECTPATCH_INFO;
-
-typedef struct _D3DSURFACE_DESC {
- D3DFORMAT Format;
- D3DRESOURCETYPE Type;
- DWORD Usage;
- D3DPOOL Pool;
- UINT Size;
- D3DMULTISAMPLE_TYPE MultiSampleType;
- UINT Width;
- UINT Height;
-} D3DSURFACE_DESC;
-
-typedef struct _D3DTRIPATCH_INFO {
- UINT StartVertexOffset;
- UINT NumVertices;
- D3DBASISTYPE Basis;
- D3DORDERTYPE Order;
-} D3DTRIPATCH_INFO;
-
-typedef struct _D3DVERTEXBUFFER_DESC {
- D3DFORMAT Format;
- D3DRESOURCETYPE Type;
- DWORD Usage;
- D3DPOOL Pool;
- UINT Size;
- DWORD FVF;
-} D3DVERTEXBUFFER_DESC;
-
-typedef struct _D3DVERTEXELEMENT9 {
- WORD Stream;
- WORD Offset;
- BYTE Type;
- BYTE Method;
- BYTE Usage;
- BYTE UsageIndex;
-} D3DVERTEXELEMENT9, *LPD3DVERTEXELEMENT9;
-
-typedef struct _D3DVIEWPORT9 {
- DWORD X;
- DWORD Y;
- DWORD Width;
- DWORD Height;
- float MinZ;
- float MaxZ;
-} D3DVIEWPORT9;
-
-typedef struct _D3DVOLUME_DESC {
- D3DFORMAT Format;
- D3DRESOURCETYPE Type;
- DWORD Usage;
- D3DPOOL Pool;
- UINT Width;
- UINT Height;
- UINT Depth;
-} D3DVOLUME_DESC;
-
-#include <poppack.h>
-
-#endif
-#endif
diff --git a/winsup/w32api/include/directx/dxerr8.h b/winsup/w32api/include/directx/dxerr8.h
deleted file mode 100644
index 9bf21ea..0000000
--- a/winsup/w32api/include/directx/dxerr8.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-
- dxerr8.h - Header file for the DirectX 8 Error API
-
- Written by Filip Navara <xnavara@volny.cz>
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#ifndef _DXERR8_H
-#define _DXERR8_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-const char *WINAPI DXGetErrorString8A(HRESULT);
-const WCHAR *WINAPI DXGetErrorString8W(HRESULT);
-const char* WINAPI DXGetErrorDescription8A(HRESULT);
-const WCHAR* WINAPI DXGetErrorDescription8W(HRESULT);
-HRESULT WINAPI DXTraceA(const char*,DWORD,HRESULT,const char*,BOOL);
-HRESULT WINAPI DXTraceW(const char*,DWORD,HRESULT,const WCHAR*,BOOL);
-
-#ifdef UNICODE
-#define DXGetErrorString8 DXGetErrorString8W
-#define DXGetErrorDescription8 DXGetErrorDescription8W
-#define DXTrace DXTraceW
-#else
-#define DXGetErrorString8 DXGetErrorString8A
-#define DXGetErrorDescription8 DXGetErrorDescription8A
-#define DXTrace DXTraceA
-#endif
-
-#if defined(DEBUG) || defined(_DEBUG)
-#define DXTRACE_MSG(str) DXTrace(__FILE__,(DWORD)__LINE__,0,str,FALSE)
-#define DXTRACE_ERR(str,hr) DXTrace(__FILE__,(DWORD)__LINE__,hr,str,TRUE)
-#define DXTRACE_ERR_NOMSGBOX(str,hr) DXTrace(__FILE__,(DWORD)__LINE__,hr,str,FALSE)
-#else
-#define DXTRACE_MSG(str) (0L)
-#define DXTRACE_ERR(str,hr) (hr)
-#define DXTRACE_ERR_NOMSGBOX(str,hr) (hr)
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/directx/dxerr9.h b/winsup/w32api/include/directx/dxerr9.h
deleted file mode 100644
index 36605c9..0000000
--- a/winsup/w32api/include/directx/dxerr9.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-
- dxerr9.h - Header file for the DirectX 9 Error API
-
- Written by Filip Navara <xnavara@volny.cz>
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#ifndef _DXERR9_H
-#define _DXERR9_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-const char *WINAPI DXGetErrorString9A(HRESULT);
-const WCHAR *WINAPI DXGetErrorString9W(HRESULT);
-const char* WINAPI DXGetErrorDescription9A(HRESULT);
-const WCHAR* WINAPI DXGetErrorDescription9W(HRESULT);
-HRESULT WINAPI DXTraceA(const char*,DWORD,HRESULT,const char*,BOOL);
-HRESULT WINAPI DXTraceW(const char*,DWORD,HRESULT,const WCHAR*,BOOL);
-
-#ifdef UNICODE
-#define DXGetErrorString9 DXGetErrorString9W
-#define DXGetErrorDescription9 DXGetErrorDescription9W
-#define DXTrace DXTraceW
-#else
-#define DXGetErrorString9 DXGetErrorString9A
-#define DXGetErrorDescription9 DXGetErrorDescription9A
-#define DXTrace DXTraceA
-#endif
-
-#if defined(DEBUG) || defined(_DEBUG)
-#define DXTRACE_MSG(str) DXTrace(__FILE__,(DWORD)__LINE__,0,str,FALSE)
-#define DXTRACE_ERR(str,hr) DXTrace(__FILE__,(DWORD)__LINE__,hr,str,FALSE)
-#define DXTRACE_ERR_MSGBOX(str,hr) DXTrace(__FILE__,(DWORD)__LINE__,hr,str,TRUE)
-#else
-#define DXTRACE_MSG(str) (0L)
-#define DXTRACE_ERR(str,hr) (hr)
-#define DXTRACE_ERR_MSGBOX(str,hr) (hr)
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/dlgs.h b/winsup/w32api/include/dlgs.h
deleted file mode 100644
index 82525ab..0000000
--- a/winsup/w32api/include/dlgs.h
+++ /dev/null
@@ -1,186 +0,0 @@
-#ifndef _DLGS_H
-#define _DLGS_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define FILEOPENORD 1536
-#define MULTIFILEOPENORD 1537
-#define PRINTDLGORD 1538
-#define PRNSETUPDLGORD 1539
-#define FINDDLGORD 1540
-#define REPLACEDLGORD 1541
-#define FONTDLGORD 1542
-#define FORMATDLGORD31 1543
-#define FORMATDLGORD30 1544
-#define PAGESETUPDLGORD 1546
-#define ctlFirst 0x400
-#define ctlLast 0x4ff
-#define chx1 0x410
-#define chx2 0x411
-#define chx3 0x412
-#define chx4 0x413
-#define chx5 0x414
-#define chx6 0x415
-#define chx7 0x416
-#define chx8 0x417
-#define chx9 0x418
-#define chx10 0x419
-#define chx11 0x41a
-#define chx12 0x41b
-#define chx13 0x41c
-#define chx14 0x41d
-#define chx15 0x41e
-#define chx16 0x41f
-#define cmb1 0x470
-#define cmb2 0x471
-#define cmb3 0x472
-#define cmb4 0x473
-#define cmb5 0x474
-#define cmb6 0x475
-#define cmb7 0x476
-#define cmb8 0x477
-#define cmb9 0x478
-#define cmb10 0x479
-#define cmb11 0x47a
-#define cmb12 0x47b
-#define cmb13 0x47c
-#define cmb14 0x47d
-#define cmb15 0x47e
-#define cmb16 0x47f
-#define edt1 0x480
-#define edt2 0x481
-#define edt3 0x482
-#define edt4 0x483
-#define edt5 0x484
-#define edt6 0x485
-#define edt7 0x486
-#define edt8 0x487
-#define edt9 0x488
-#define edt10 0x489
-#define edt11 0x48a
-#define edt12 0x48b
-#define edt13 0x48c
-#define edt14 0x48d
-#define edt15 0x48e
-#define edt16 0x48f
-#define frm1 0x434
-#define frm2 0x435
-#define frm3 0x436
-#define frm4 0x437
-#define grp1 0x430
-#define grp2 0x431
-#define grp3 0x432
-#define grp4 0x433
-#define ico1 0x43c
-#define ico2 0x43d
-#define ico3 0x43e
-#define ico4 0x43f
-#define lst1 0x460
-#define lst2 0x461
-#define lst3 0x462
-#define lst4 0x463
-#define lst5 0x464
-#define lst6 0x465
-#define lst7 0x466
-#define lst8 0x467
-#define lst9 0x468
-#define lst10 0x469
-#define lst11 0x46a
-#define lst12 0x46b
-#define lst13 0x46c
-#define lst14 0x46d
-#define lst15 0x46e
-#define lst16 0x46f
-#define psh1 0x400
-#define psh2 0x401
-#define psh3 0x402
-#define psh4 0x403
-#define psh5 0x404
-#define psh6 0x405
-#define psh7 0x406
-#define psh8 0x407
-#define psh9 0x408
-#define psh10 0x409
-#define psh11 0x40a
-#define psh12 0x40b
-#define psh13 0x40c
-#define psh14 0x40d
-#define psh15 0x40e
-#define pshHelp 0x40e
-#define psh16 0x40f
-#define rad1 0x420
-#define rad2 0x421
-#define rad3 0x422
-#define rad4 0x423
-#define rad5 0x424
-#define rad6 0x425
-#define rad7 0x426
-#define rad8 0x427
-#define rad9 0x428
-#define rad10 0x429
-#define rad11 0x42a
-#define rad12 0x42b
-#define rad13 0x42c
-#define rad14 0x42d
-#define rad15 0x42e
-#define rad16 0x42f
-#define rct1 0x438
-#define rct2 0x439
-#define rct3 0x43a
-#define rct4 0x43b
-#define scr1 0x490
-#define scr2 0x491
-#define scr3 0x492
-#define scr4 0x493
-#define scr5 0x494
-#define scr6 0x495
-#define scr7 0x496
-#define scr8 0x497
-#define stc1 0x440
-#define stc2 0x441
-#define stc3 0x442
-#define stc4 0x443
-#define stc5 0x444
-#define stc6 0x445
-#define stc7 0x446
-#define stc8 0x447
-#define stc9 0x448
-#define stc10 0x449
-#define stc11 0x44a
-#define stc12 0x44b
-#define stc13 0x44c
-#define stc14 0x44d
-#define stc15 0x44e
-#define stc16 0x44f
-#define stc17 0x450
-#define stc18 0x451
-#define stc19 0x452
-#define stc20 0x453
-#define stc21 0x454
-#define stc22 0x455
-#define stc23 0x456
-#define stc24 0x457
-#define stc25 0x458
-#define stc26 0x459
-#define stc27 0x45a
-#define stc28 0x45b
-#define stc29 0x45c
-#define stc30 0x45d
-#define stc31 0x45e
-#define stc32 0x45f
-#ifndef RC_INVOKED
-typedef struct tagCRGB {
- BYTE bRed;
- BYTE bGreen;
- BYTE bBlue;
- BYTE bExtra;
-} CRGB;
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/docobj.h b/winsup/w32api/include/docobj.h
deleted file mode 100644
index e6666bf..0000000
--- a/winsup/w32api/include/docobj.h
+++ /dev/null
@@ -1,147 +0,0 @@
-#ifndef _DOCOBJ_H
-#define _DOCOBJ_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define OLECMDERR_E_UNKNOWNGROUP (-2147221244)
-#define OLECMDERR_E_DISABLED (-2147221247)
-#define OLECMDERR_E_NOHELP (-2147221246)
-#define OLECMDERR_E_CANCELED (-2147221245)
-#define OLECMDERR_E_NOTSUPPORTED (-2147221248)
-
-typedef enum {
- OLECMDID_OPEN = 1,
- OLECMDID_NEW = 2,
- OLECMDID_SAVE = 3,
- OLECMDID_SAVEAS = 4,
- OLECMDID_SAVECOPYAS = 5,
- OLECMDID_PRINT = 6,
- OLECMDID_PRINTPREVIEW = 7,
- OLECMDID_PAGESETUP = 8,
- OLECMDID_SPELL = 9,
- OLECMDID_PROPERTIES = 10,
- OLECMDID_CUT = 11,
- OLECMDID_COPY = 12,
- OLECMDID_PASTE = 13,
- OLECMDID_PASTESPECIAL = 14,
- OLECMDID_UNDO = 15,
- OLECMDID_REDO = 16,
- OLECMDID_SELECTALL = 17,
- OLECMDID_CLEARSELECTION = 18,
- OLECMDID_ZOOM = 19,
- OLECMDID_GETZOOMRANGE = 20,
- OLECMDID_UPDATECOMMANDS = 21,
- OLECMDID_REFRESH = 22,
- OLECMDID_STOP = 23,
- OLECMDID_HIDETOOLBARS = 24,
- OLECMDID_SETPROGRESSMAX = 25,
- OLECMDID_SETPROGRESSPOS = 26,
- OLECMDID_SETPROGRESSTEXT = 27,
- OLECMDID_SETTITLE = 28,
- OLECMDID_SETDOWNLOADSTATE = 29,
- OLECMDID_STOPDOWNLOAD = 30
-} OLECMDID;
-typedef enum {
- OLECMDF_SUPPORTED = 1,
- OLECMDF_ENABLED = 2,
- OLECMDF_LATCHED = 4,
- OLECMDF_NINCHED = 8
-} OLECMDF;
-typedef enum {
- OLECMDEXECOPT_DODEFAULT = 0,
- OLECMDEXECOPT_PROMPTUSER = 1,
- OLECMDEXECOPT_DONTPROMPTUSER = 2,
- OLECMDEXECOPT_SHOWHELP = 3
-} OLECMDEXECOPT;
-
-typedef struct _tagOLECMDTEXT {
- DWORD cmdtextf;
- ULONG cwActual;
- ULONG cwBuf;
- wchar_t rgwz[1];
-} OLECMDTEXT;
-typedef struct _tagOLECMD {
- ULONG cmdID;
- DWORD cmdf;
-} OLECMD;
-
-typedef _COM_interface IOleInPlaceSite *LPOLEINPLACESITE;
-typedef _COM_interface IEnumOleDocumentViews *LPENUMOLEDOCUMENTVIEWS;
-
-EXTERN_C const IID IID_IContinueCallback;
-EXTERN_C const IID IID_IEnumOleDocumentViews;
-EXTERN_C const IID IID_IPrint;
-
-EXTERN_C const IID IID_IOleDocumentView;
-#define INTERFACE IOleDocumentView
-DECLARE_INTERFACE_(IOleDocumentView,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
-
- STDMETHOD(SetInPlaceSite)(THIS_ LPOLEINPLACESITE) PURE;
- STDMETHOD(GetInPlaceSite)(THIS_ LPOLEINPLACESITE*) PURE;
- STDMETHOD(GetDocument)(THIS_ IUnknown**) PURE;
- STDMETHOD(SetRect)(THIS_ LPRECT) PURE;
- STDMETHOD(GetRect)(THIS_ LPRECT) PURE;
- STDMETHOD(SetRectComplex)(THIS_ LPRECT,LPRECT,LPRECT,LPRECT) PURE;
- STDMETHOD(Show)(THIS_ BOOL) PURE;
- STDMETHOD(UIActivate)(THIS_ BOOL) PURE;
- STDMETHOD(Open)(THIS) PURE;
- STDMETHOD(Close)(THIS_ DWORD) PURE;
- STDMETHOD(SaveViewState)(THIS_ IStream*) PURE;
- STDMETHOD(ApplyViewState)(THIS_ IStream*) PURE;
- STDMETHOD(Clone)(THIS_ LPOLEINPLACESITE,IOleDocumentView**) PURE;
-};
-#undef INTERFACE
-DECLARE_ENUMERATOR_(IEnumOleDocumentViews,IOleDocumentView);
-
-EXTERN_C const IID IID_IOleDocument;
-#define INTERFACE IOleDocument
-DECLARE_INTERFACE_(IOleDocument,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
-
- STDMETHOD(CreateView)(THIS_ LPOLEINPLACESITE,IStream*,DWORD,IOleDocumentView**) PURE;
- STDMETHOD(GetDocMiscStatus)(THIS_ DWORD*) PURE;
- STDMETHOD(EnumViews)(THIS_ LPENUMOLEDOCUMENTVIEWS*,IOleDocumentView**) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IOleCommandTarget;
-#define INTERFACE IOleCommandTarget
-DECLARE_INTERFACE_(IOleCommandTarget,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
-
- STDMETHOD(QueryStatus)(THIS_ const GUID*,ULONG,OLECMD*,OLECMDTEXT*) PURE;
- STDMETHOD(Exec)(THIS_ const GUID*,DWORD,DWORD,VARIANTARG*,VARIANTARG*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IOleDocumentSite;
-#define INTERFACE IOleDocumentSite
-DECLARE_INTERFACE_(IOleDocumentSite,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
-
- STDMETHOD(ActivateMe)(THIS_ IOleDocumentView*) PURE;
-};
-#undef INTERFACE
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/dsadmin.h b/winsup/w32api/include/dsadmin.h
deleted file mode 100644
index e2eb1ce..0000000
--- a/winsup/w32api/include/dsadmin.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * dsadmin.h - Active Directory
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may use,
- * modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-#ifndef _DSADMIN_H
-#define _DSADMIN_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- Active Directory Reference - Active Directory Structures - Active Directory Admin Structures */
-#if (_WIN32_WINNT >= 0x0500)
-typedef struct {
- DWORD dwSize;
- HICON hObjClassIcon;
- LPWSTR lpszWizTitle;
- LPWSTR lpszContDisplayName;
-} DSA_NEWOBJ_DISPINFO,*LPDSA_NEWOBJ_DISPINFO;
-#endif /* (_WIN32_WINNT >= 0x0500) */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/dsclient.h b/winsup/w32api/include/dsclient.h
deleted file mode 100644
index 341ca99..0000000
--- a/winsup/w32api/include/dsclient.h
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * dsclient.h - Active Directory
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may use,
- * modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-#ifndef _DSCLIENT_H
-#define _DSCLIENT_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if (_WIN32_WINNT >= 0x0500)
-/*--- Active Directory Reference - Active Directory Functions - Active Directory Display Functions - BFFCallBack */
-#define DSBM_QUERYINSERTW 0x0064
-#define DSBM_QUERYINSERTA 0x0065
-#define DSBM_CHANGEIMAGESTATE 0x0066
-#define DSBM_HELP 0x0067
-#define DSBM_CONTEXTMENU 0x0068
-#ifdef UNICODE
-#define DSBM_QUERYINSERT DSBM_QUERYINSERTW
-#else
-#define DSBM_QUERYINSERT DSBM_QUERYINSERTA
-#endif
-/*--- Active Directory Reference - Active Directory Structures - Active Directory Display Structures */
-typedef struct _DOMAINDESC {
- LPWSTR pszName;
- LPWSTR pszPath;
- LPWSTR pszNCName;
- LPWSTR pszTrustParent;
- LPWSTR pszObjectClass;
- ULONG ulFlags;
- BOOL fDownLevel;
- struct _DOMAINDESC* pdChildList;
- struct _DOMAINDESC* pdNextSibling;
-} DOMAIN_DESC,DOMAINDESC,*PDOMAIN_DESC,*LPDOMAINDESC;
-typedef struct {
- DWORD dsSize;
- DWORD dwCount;
- DOMAINDESC aDomains[1];
-} DOMAINTREE,DOMAIN_TREE,*PDOMAIN_TREE,*LPDOMAINTREE;
-#define DSB_MAX_DISPLAYNAME_CHARS 64
-typedef struct {
- DWORD cbStruct;
- LPCWSTR pszADsPath;
- LPCWSTR pszClass;
- DWORD dwMask;
- DWORD dwState;
- DWORD dwStateMask;
- CHAR szDisplayName[DSB_MAX_DISPLAYNAME_CHARS];
- CHAR szIconLocation[MAX_PATH];
- INT iIconResID;
-} DSBITEMA,*PDSBITEMA;
-typedef struct {
- DWORD cbStruct;
- LPCWSTR pszADsPath;
- LPCWSTR pszClass;
- DWORD dwMask;
- DWORD dwState;
- DWORD dwStateMask;
- CHAR szDisplayName[DSB_MAX_DISPLAYNAME_CHARS];
- CHAR szIconLocation[MAX_PATH];
- INT iIconResID;
-} DSBITEMW,*PDSBITEMW;
-#define DSBF_STATE 0x00000001
-#define DSBF_ICONLOCATION 0x00000002
-#define DSBF_DISPLAYNAME 0x00000004
-#define DSBS_CHECKED 0x00000001
-#define DSBS_HIDDEN 0x00000002
-#define DSBS_ROOT 0x00000004
-typedef struct {
- DWORD cbStruct;
- HWND hwndOwner;
- LPCSTR pszCaption;
- LPCSTR pszTitle;
- LPCWSTR pszRoot;
- LPWSTR pszPath;
- ULONG cchPath;
- DWORD dwFlags;
- BFFCALLBACK pfnCallback;
- LPARAM lParam;
- DWORD dwReturnFormat;
- LPCWSTR pUserName;
- LPCWSTR pPassword;
- LPWSTR pszObjectClass;
- ULONG cchObjectClass;
-} DSBROWSEINFOA,*PDSBROWSEINFOA;
-typedef struct {
- DWORD cbStruct;
- HWND hwndOwner;
- LPCWSTR pszCaption;
- LPCWSTR pszTitle;
- LPCWSTR pszRoot;
- LPWSTR pszPath;
- ULONG cchPath;
- DWORD dwFlags;
- BFFCALLBACK pfnCallback;
- LPARAM lParam;
- DWORD dwReturnFormat;
- LPCWSTR pUserName;
- LPCWSTR pPassword;
- LPWSTR pszObjectClass;
- ULONG cchObjectClass;
-} DSBROWSEINFOW,*PDSBROWSEINFOW;
-#define DSBI_NOBUTTONS 0x00000001
-#define DSBI_NOLINES 0x00000002
-#define DSBI_NOLINESATROOT 0x00000004
-#define DSBI_CHECKBOXES 0x00000100
-#define DSBI_NOROOT 0x00010000
-#define DSBI_INCLUDEHIDDEN 0x00020000
-#define DSBI_EXPANDONOPEN 0x00040000
-#define DSBI_ENTIREDIRECTORY 0x00090000
-#define DSBI_RETURN_FORMAT 0x00100000
-#define DSBI_HASCREDENTIALS 0x00200000
-#define DSBI_IGNORETREATASLEAF 0x00400000
-#define DSBI_SIMPLEAUTHENTICATE 0x00800000
-#define DSBI_RETURNOBJECTCLASS 0x01000000
-#define DSBI_DONTSIGNSEAL 0x02000000
-typedef struct {
- DWORD dwFlags;
- CLSID clsidWizardDialog;
- CLSID clsidWizardPrimaryPage;
- DWORD cWizardExtensions;
- CLSID aWizardExtensions[1];
-} DSCLASSCREATIONINFO,*LPDSCLASSCREATIONINFO;
-#define DSCCIF_HASWIZARDDIALOG 0x00000001
-#define DSCCIF_HASWIZARDPRIMARYPAGE 0x00000002
-typedef struct _DSDISPLAYSPECOPTIONS {
- DWORD dwSize;
- DWORD dwFlags;
- DWORD offsetAttribPrefix;
- DWORD offsetUserName;
- DWORD offsetPassword;
- DWORD offsetServer;
- DWORD offsetServerConfigPath;
-} DSDISPLAYSPECOPTIONS,*PDSDISPLAYSPECOPTIONS,*LPDSDISPLAYSPECOPTIONS;
-#define DSDSOF_HASUSERANDSERVERINFO 0x00000001
-#define DSDSOF_SIMPLEAUTHENTICATE 0x00000002
-#define DSDSOF_DONTSIGNSEAL 0x00000004
-#define DSDSOF_DSAVAILABLE 0x40000000
-typedef struct {
- DWORD dwFlags;
- DWORD dwProviderFlags;
- DWORD offsetName;
- DWORD offsetClass;
-} DSOBJECT,*LPDSOBJECT;
-#define DSOBJECT_ISCONTAINER 0x00000001
-#define DSOBJECT_READONLYPAGES 0x80000000
-#define DSPROVIDER_UNUSED_0 0x00000001
-#define DSPROVIDER_UNUSED_1 0x00000002
-#define DSPROVIDER_UNUSED_2 0x00000004
-#define DSPROVIDER_UNUSED_3 0x00000008
-#define DSPROVIDER_ADVANCED 0x00000010
-typedef struct {
- CLSID clsidNamespace;
- UINT cItems;
- DSOBJECT aObjects[1];
-} DSOBJECTNAMES,*LPDSOBJECTNAMES;
-typedef struct {
- DWORD offsetString;
-} DSPROPERTYPAGEINFO,*LPDSPROPERTYPAGEINFO;
-#ifdef UNICODE
-typedef DSBITEMW DSBITEM,*PDSBITEM;
-typedef DSBROWSEINFOW DSBROWSEINFO,*PDSBROWSEINFO;
-#else
-typedef DSBITEMA DSBITEM,*PDSBITEM;
-typedef DSBROWSEINFOA DSBROWSEINFO,*PDSBROWSEINFO;
-#endif
-#endif /* (_WIN32_WINNT >= 0x0500) */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/dsgetdc.h b/winsup/w32api/include/dsgetdc.h
deleted file mode 100644
index 793cab2..0000000
--- a/winsup/w32api/include/dsgetdc.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * dsgetdc.h - Active Directory
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may use,
- * modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-#ifndef _DSGETDC_H
-#define _DSGETDC_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- Active Directory Reference - Active Directory Structures - Directory Service Structures */
-#if (_WIN32_WINNT >= 0x0500)
-#define DS_FORCE_REDISCOVERY 0x00000001
-#define DS_DIRECTORY_SERVICE_REQUIRED 0x00000010
-#define DS_DIRECTORY_SERVICE_PREFERRED 0x00000020
-#define DS_GC_SERVER_REQUIRED 0x00000040
-#define DS_PDC_REQUIRED 0x00000080
-#define DS_BACKGROUND_ONLY 0x00000100
-#define DS_IP_REQUIRED 0x00000200
-#define DS_KDC_REQUIRED 0x00000400
-#define DS_TIMESERV_REQUIRED 0x00000800
-#define DS_WRITABLE_REQUIRED 0x00001000
-#define DS_GOOD_TIMESERV_PREFERRED 0x00002000
-#define DS_AVOID_SELF 0x00004000
-#define DS_ONLY_LDAP_NEEDED 0x00008000
-#define DS_IS_FLAT_NAME 0x00010000
-#define DS_IS_DNS_NAME 0x00020000
-#define DS_RETURN_DNS_NAME 0x40000000
-#define DS_RETURN_FLAT_NAME 0x80000000
-typedef struct _DOMAIN_CONTROLLER_INFOA {
- LPSTR DomainControllerName;
- LPSTR DomainControllerAddress;
- ULONG DomainControllerAddressType;
- GUID DomainGuid;
- LPSTR DomainName;
- LPSTR DnsForestName;
- ULONG Flags;
- LPSTR DcSiteName;
- LPSTR ClientSiteName;
-} DOMAIN_CONTROLLER_INFOA,*PDOMAIN_CONTROLLER_INFOA;
-typedef struct _DOMAIN_CONTROLLER_INFOW {
- LPWSTR DomainControllerName;
- LPWSTR DomainControllerAddress;
- ULONG DomainControllerAddressType;
- GUID DomainGuid;
- LPWSTR DomainName;
- LPWSTR DnsForestName;
- ULONG Flags;
- LPWSTR DcSiteName;
- LPWSTR ClientSiteName;
-} DOMAIN_CONTROLLER_INFOW,*PDOMAIN_CONTROLLER_INFOW;
-#define DS_INET_ADDRESS 0x0001
-#define DS_NETBIOS_ADDRESS 0x0002
-#define DS_PDC_FLAG 0x00000001
-#define DS_GC_FLAG 0x00000004
-#define DS_DS_FLAG 0x00000010
-#define DS_KDC_FLAG 0x00000020
-#define DS_TIMESERV_FLAG 0x00000040
-#define DS_WRITABLE_FLAG 0x00000100
-#define DS_DNS_CONTROLLER_FLAG 0x20000000
-#define DS_DNS_DOMAIN_FLAG 0x40000000
-#define DS_DNS_FOREST_FLAG 0x80000000
-typedef struct _DS_DOMAIN_TRUSTSA {
- LPSTR NetbiosDomainName;
- LPSTR DnsDomainName;
- ULONG Flags;
- ULONG ParentIndex;
- ULONG TrustType;
- ULONG TrustAttributes;
- PSID DomainSid;
- GUID DomainGuid;
-} DS_DOMAIN_TRUSTSA,*PDS_DOMAIN_TRUSTSA;
-typedef struct _DS_DOMAIN_TRUSTSW {
- LPWSTR NetbiosDomainName;
- LPWSTR DnsDomainName;
- ULONG Flags;
- ULONG ParentIndex;
- ULONG TrustType;
- ULONG TrustAttributes;
- PSID DomainSid;
- GUID DomainGuid;
-} DS_DOMAIN_TRUSTSW,*PDS_DOMAIN_TRUSTSW;
-#define DS_DOMAIN_IN_FOREST 0x0001
-#define DS_DOMAIN_DIRECT_OUTBOUND 0x0002
-#define DS_DOMAIN_TREE_ROOT 0x0004
-#define DS_DOMAIN_PRIMARY 0x0008
-#define DS_DOMAIN_NATIVE_MODE 0x0010
-#define DS_DOMAIN_DIRECT_INBOUND 0x0020
-
-DWORD WINAPI DsGetDcNameW(LPCWSTR, LPCWSTR, GUID*, LPCWSTR, ULONG, PDOMAIN_CONTROLLER_INFOW*);
-DWORD WINAPI DsGetDcNameA(LPCSTR, LPCSTR, GUID*, LPCSTR, ULONG, PDOMAIN_CONTROLLER_INFOA*);
-
-#ifdef UNICODE
-typedef DOMAIN_CONTROLLER_INFOW DOMAIN_CONTROLLER_INFO,*PDOMAIN_CONTROLLER_INFO;
-typedef DS_DOMAIN_TRUSTSW DS_DOMAIN_TRUSTS,*PDS_DOMAIN_TRUSTS;
-#define DsGetDcName DsGetDcNameW
-#else
-typedef DOMAIN_CONTROLLER_INFOA DOMAIN_CONTROLLER_INFO,*PDOMAIN_CONTROLLER_INFO;
-typedef DS_DOMAIN_TRUSTSA DS_DOMAIN_TRUSTS,*PDS_DOMAIN_TRUSTS;
-#define DsGetDcName DsGetDcNameA
-#endif
-#endif /* (_WIN32_WINNT >= 0x0500) */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/dshow.h b/winsup/w32api/include/dshow.h
deleted file mode 100644
index da4bf68..0000000
--- a/winsup/w32api/include/dshow.h
+++ /dev/null
@@ -1,108 +0,0 @@
-#ifndef _DSHOW_H
-#define _DSHOW_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#include <strmif.h>
-#include <amaudio.h>
-#include <amvideo.h>
-#include <evcode.h>
-#include <audevcod.h>
-#include <dvdevcod.h>
-#include <errors.h>
-#include <vptype.h>
-#include <ks.h>
-#include <vidcap.h>
-#include <bdatypes.h>
-#include <dvdmedia.h>
-#include <il21dec.h>
-#include <ddraw.h> /* DDSCAPS2, DDPIXELFORMAT */
-#ifndef _WINGDI_H
-#include <wingdi.h> /* BITMAPINFOHEADER */
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- DirectShow Reference - DirectShow Enumerated Types */
-typedef enum _AM_ASPECT_RATIO_MODE {
- AM_ARMODE_STRETCHED,
- AM_ARMODE_LETTER_BOX,
- AM_ARMODE_CROP,
- AM_ARMODE_STRETCHED_AS_PRIMARY
-} AM_ASPECT_RATIO_MODE;
-typedef enum _AM_WST_DRAWBGMODE {
- AM_WST_DRAWBGMODE_Opaque,
- AM_WST_DRAWBGMODE_Transparent
-} AM_WST_DRAWBGMODE,*PAM_WST_DRAWBGMODE;
-typedef enum _AM_WST_LEVEL {
- AM_WST_LEVEL_1_5 = 0
-} AM_WST_LEVEL,*PAM_WST_LEVEL;
-typedef enum _AM_WST_SERVICE {
- AM_WST_SERVICE_None = 0,
- AM_WST_SERVICE_Text,
- AM_WST_SERVICE_IDS,
- AM_WST_SERVICE_Invalid
-} AM_WST_SERVICE,*PAM_WST_SERVICE;
-typedef enum _AM_WST_STATE {
- AM_WST_STATE_Off = 0,
- AM_WST_STATE_On
-} AM_WST_STATE,*PAM_WST_STATE;
-typedef enum _AM_WST_STYLE {
- AM_WST_STYLE_None = 0,
- AM_WST_STYLE_Invers
-} AM_WST_STYLE,*PAM_WST_STYLE;
-typedef enum {
- AM_EXSEEK_CANSEEK= 1,
- AM_EXSEEK_CANSCAN = 2,
- AM_EXSEEK_MARKERSEEK = 4,
- AM_EXSEEK_SCANWITHOUTCLOCK = 8,
- AM_EXSEEK_NOSTANDARDREPAINT = 16,
- AM_EXSEEK_BUFFERING = 32,
- AM_EXSEEK_SENDS_VIDEOFRAMEREADY = 64
-} AMExtendedSeekingCapabilities;
-/*--- DirectShow Reference - DirectShow Structures */
-typedef struct _AM_WST_PAGE {
- DWORD dwPageNr;
- DWORD dwSubPageNr;
- BYTE *pucPageData;
-} AM_WST_PAGE,*PAM_WST_PAGE;
-typedef struct _tag_AMVABeginFrameInfo{
- DWORD dwDestSurfaceIndex;
- LPVOID pInputData;
- DWORD dwSizeInputData;
- LPVOID pOutputData;
- DWORD dwSizeOutputData;
- } AMVABeginFrameInfo,*LPAMVABeginFrameInfo;
-typedef struct _tag_AMVACompBufferInfo{
- DWORD dwNumCompBuffers;
- DWORD dwWidthToCreate;
- DWORD dwHeightToCreate;
- DWORD dwBytesToAllocate;
- DDSCAPS2 ddCompCaps;
- DDPIXELFORMAT ddPixelFormat;
-} AMVACompBufferInfo,*LPAMVACompBufferInfo;
-typedef struct _tag_AMVAEndFrameInfo{
- DWORD dwSizeMiscData;
- LPVOID pMiscData;
-} AMVAEndFrameInfo,*LPAMVAEndFrameInfo;
-typedef struct _tag_AMVAInternalMemInfo{
- DWORD dwScratchMemAlloc;
-} AMVAInternalMemInfo,*LPAMVAInternalMemInfo;
-typedef struct _tag_AMVAUncompBufferInfo{
- DWORD dwMinNumSurfaces;
- DWORD dwMaxNumSurfaces;
- DDPIXELFORMAT ddUncompPixelFormat;
-} AMVAUncompBufferInfo,*LPAMVAUncompBufferInfo;
- typedef struct _tag_AMVAUncompDataInfo{
- DWORD dwUncompWidth;
- DWORD dwUncompHeight;
- DDPIXELFORMAT ddUncompPixelFormat;
-} AMVAUncompDataInfo,*LPAMVAUncompDataInfo;
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/dsquery.h b/winsup/w32api/include/dsquery.h
deleted file mode 100644
index 0f3f870..0000000
--- a/winsup/w32api/include/dsquery.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * dsquery.h - Active Directory
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may use,
- * modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-#ifndef _DSQUERY_H
-#define _DSQUERY_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- Active Directory Reference - Active Directory Structures - Active Directory Display Structures */
-#if (_WIN32_WINNT >= 0x0500)
-typedef struct {
- DWORD dwFlags;
- INT fmt;
- INT cx;
- INT idsName;
- LONG offsetProperty;
- DWORD dwReserved;
-} DSCOLUMN,*LPDSCOLUMN;
-#define DSCOLUMNPROP_ADSPATH -1
-#define DSCOLUMNPROP_OBJECTCLASS -2
-typedef struct {
- DWORD cbStruct;
- LONG cClasses;
- DWORD offsetClass[1];
-} DSQUERYCLASSLIST,*LPDSQUERYCLASSLIST;
-typedef struct {
- DWORD cbStruct;
- DWORD dwFlags;
- LPWSTR pDefaultScope;
- LPWSTR pDefaultSaveLocation;
- LPWSTR pUserName;
- LPWSTR pPassword;
- LPWSTR pServer;
-} DSQUERYINITPARAMS,*LPDSQUERYINITPARAMS;
-#define DSQPF_NOSAVE 0x00000001
-#define DSQPF_SAVELOCATION 0x00000002
-#define DSQPF_SHOWHIDDENOBJECTS 0x00000004
-#define DSQPF_ENABLEADMINFEATURES 0x00000008
-#define DSQPF_ENABLEADVANCEDFEATURES 0x00000010
-#define DSQPF_HASCREDENTIALS 0x00000020
-#define DSQPF_NOCHOOSECOLUMNS 0x00000040
-typedef struct {
- DWORD cbStruct;
- DWORD dwFlags;
- HINSTANCE hInstance;
- LONG offsetQuery;
- LONG iColumns;
- DWORD dwReserved;
- DSCOLUMN aColumns[1];
-} DSQUERYPARAMS,*LPDSQUERYPARAMS;
-#endif /* (_WIN32_WINNT >= 0x0500) */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/dsrole.h b/winsup/w32api/include/dsrole.h
deleted file mode 100644
index 6b950f9..0000000
--- a/winsup/w32api/include/dsrole.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * dsrole.h - Active Directory
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may use,
- * modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-#ifndef _DSROLE_H
-#define _DSROLE_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if (_WIN32_WINNT >= 0x0500)
-/*--- Active Directory Reference - Active Directory Enumerations */
-typedef enum {
- DsRole_RoleStandaloneWorkstation,
- DsRole_RoleMemberWorkstation,
- DsRole_RoleStandaloneServer,
- DsRole_RoleMemberServer,
- DsRole_RoleBackupDomainController,
- DsRole_RolePrimaryDomainController
-} DSROLE_MACHINE_ROLE;
-typedef enum {
- DsRoleOperationIdle,
- DsRoleOperationActive,
- DsRoleOperationNeedReboot
-} DSROLE_OPERATION_STATE;
-typedef enum {
- DsRolePrimaryDomainInfoBasic,
- DsRoleUpgradeStatus,
- DsRoleOperationState
-} DSROLE_PRIMARY_DOMAIN_INFO_LEVEL;
-typedef enum {
- DsRoleServerUnknown,
- DsRoleServerPrimary,
- DsRoleServerBackup
-} DSROLE_SERVER_STATE;
-/*--- Active Directory Reference - Active Directory Structures - Directory Service Structures */
-typedef struct {
- DSROLE_OPERATION_STATE OperationState;
-} DSROLE_OPERATION_STATE_INFO;
-typedef struct _DSROLE_PRIMARY_DOMAIN_INFO_BASIC {
- DSROLE_MACHINE_ROLE MachineRole;
- ULONG Flags;
- LPWSTR DomainNameFlat;
- LPWSTR DomainNameDns;
- LPWSTR DomainForestName;
- GUID DomainGuid;
-} DSROLE_PRIMARY_DOMAIN_INFO_BASIC,*PDSROLE_PRIMARY_DOMAIN_INFO_BASIC;
-#define DSROLE_PRIMARY_DS_RUNNING 0x00000001
-#define DSROLE_PRIMARY_DS_MIXED_MODE 0x00000002
-#define DSROLE_UPGRADE_IN_PROGRESS 0x00000004
-#define DSROLE_PRIMARY_DOMAIN_GUID_PRESENT 0x01000000
-typedef struct _DSROLE_UPGRADE_STATUS_INFO {
- ULONG OperationState;
- DSROLE_SERVER_STATE PreviousServerState;
-} DSROLE_UPGRADE_STATUS_INFO,*PDSROLE_UPGRADE_STATUS_INFO;
-#endif /* (_WIN32_WINNT >= 0x0500) */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/dvdevcod.h b/winsup/w32api/include/dvdevcod.h
deleted file mode 100644
index 2c8e5bd..0000000
--- a/winsup/w32api/include/dvdevcod.h
+++ /dev/null
@@ -1,76 +0,0 @@
-#ifndef _DVDEVCOD_H
-#define _DVDEVCOD_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define EC_DVD_ANGLE_CHANGE 0x0106
-#define EC_DVD_ANGLES_AVAILABLE 0x0113
-#define EC_DVD_AUDIO_STREAM_CHANGE 0x0104
-#define EC_DVD_BUTTON_AUTO_ACTIVATED 0x0115
-#define EC_DVD_BUTTON_CHANGE 0x0107
-#define EC_DVD_CHAPTER_AUTOSTOP 0x010E
-#define EC_DVD_CHAPTER_START 0x0103
-#define EC_DVD_CMD_START 0x0116
-#define EC_DVD_CMD_END 0x0117
-#define EC_DVD_CURRENT_HMSF_TIME 0x011A
-#define EC_DVD_CURRENT_TIME 0x010B
-#define EC_DVD_DISC_EJECTED 0x0118
-#define EC_DVD_DISC_INSERTED 0x0119
-#define EC_DVD_DOMAIN_CHANGE 0x0101
-#define EC_DVD_ERROR 0x010C
-#define EC_DVD_KARAOKE_MODE 0x011B
-#define EC_DVD_NO_FP_PGC 0x010F
-#define EC_DVD_PARENTAL_LEVEL_CHANGE 0x0111
-#define EC_DVD_PLAYBACK_RATE_CHANGE 0x0110
-#define EC_DVD_PLAYBACK_STOPPED 0x0112
-#define EC_DVD_PLAYPERIOD_AUTOSTOP 0x0114
-#define EC_DVD_STILL_OFF 0x010A
-#define EC_DVD_STILL_ON 0x0109
-#define EC_DVD_SUBPICTURE_STREAM_CHANGE 0x0105
-#define EC_DVD_TITLE_CHANGE 0x0102
-#define EC_DVD_VALID_UOPS_CHANGE 0x0108
-#define EC_DVD_WARNING 0x010D
-typedef enum _tagDVD_ERROR {
- DVD_ERROR_Unexpected = 1,
- DVD_ERROR_CopyProtectFail = 2,
- DVD_ERROR_InvalidDVD1_0Disc = 3,
- DVD_ERROR_InvalidDiscRegion = 4,
- DVD_ERROR_LowParentalLevel = 5,
- DVD_ERROR_MacrovisionFail = 6,
- DVD_ERROR_IncompatibleSystemAndDecoderRegions = 7,
- DVD_ERROR_IncompatibleDiscAndDecoderRegions = 8
-} DVD_ERROR;
-typedef enum _tagDVD_PB_STOPPED {
- DVD_PB_STOPPED_Other = 0,
- DVD_PB_STOPPED_NoBranch = 1,
- DVD_PB_STOPPED_NoFirstPlayDomain = 2,
- DVD_PB_STOPPED_StopCommand = 3,
- DVD_PB_STOPPED_Reset = 4,
- DVD_PB_STOPPED_DiscEjected = 5,
- DVD_PB_STOPPED_IllegalNavCommand = 6,
- DVD_PB_STOPPED_PlayPeriodAutoStop = 7,
- DVD_PB_STOPPED_PlayChapterAutoStop = 8,
- DVD_PB_STOPPED_ParentalFailure = 9,
- DVD_PB_STOPPED_RegionFailure = 10,
- DVD_PB_STOPPED_MacrovisionFailure = 11,
- DVD_PB_STOPPED_DiscReadError = 12,
- DVD_PB_STOPPED_CopyProtectFailure = 13
-} DVD_PB_STOPPED;
-typedef enum _tagDVD_WARNING {
- DVD_WARNING_InvalidDVD1_0Disc = 1,
- DVD_WARNING_FormatNotSupported = 2,
- DVD_WARNING_IllegalNavCommand = 3,
- DVD_WARNING_Open = 4,
- DVD_WARNING_Seek = 5,
- DVD_WARNING_Read = 6
-} DVD_WARNING;
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/dvdmedia.h b/winsup/w32api/include/dvdmedia.h
deleted file mode 100644
index 0a312c0..0000000
--- a/winsup/w32api/include/dvdmedia.h
+++ /dev/null
@@ -1,101 +0,0 @@
-#ifndef _DVDMEDIA_H
-#define _DVDMEDIA_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifndef _STRMIF_H
-#include <strmif.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- DirectShow Reference - DirectShow Structures - AM_SAMPLE2_PROPERTIES Structure */
-#define AM_VIDEO_FLAG_FIELD_MASK 0x0003
-#define AM_VIDEO_FLAG_INTERLEAVED_FRAME 0x0000
-#define AM_VIDEO_FLAG_FIELD1 0x0001
-#define AM_VIDEO_FLAG_FIELD2 0x0002
-#define AM_VIDEO_FLAG_FIELD1FIRST 0x0004
-#define AM_VIDEO_FLAG_WEAVE 0x0008
-#define AM_VIDEO_FLAG_REPEAT_FIELD 0x0040
-/*--- DirectShow Reference - DirectShow Enumerated Types */
-enum AM_MPEG2Level {
- AM_MPEG2Level_Low = 1,
- AM_MPEG2Level_Main,
- AM_MPEG2Level_High1440,
- AM_MPEG2Level_High
-};
-enum AM_MPEG2Profile {
- AM_MPEG2Profile_Simple = 1,
- AM_MPEG2Profile_Main,
- AM_MPEG2Profile_SNRScalable,
- AM_MPEG2Profile_SpatiallyScalable,
- AM_MPEG2Profile_High
-};
-typedef enum {
- AM_RATE_ChangeRate = 1,
- AM_RATE_FullDataRateMax = 2,
- AM_RATE_ReverseDecode = 3,
- AM_RATE_DecoderPosition = 4,
- AM_RATE_DecoderVersion = 5
-} AM_PROPERTY_DVD_RATE_CHANGE;
-/*--- DirectShow Reference - DirectShow Structures */
-typedef struct tagVIDEOINFOHEADER2 {
- RECT rcSource;
- RECT rcTarget;
- DWORD dwBitRate;
- DWORD dwBitErrorRate;
- REFERENCE_TIME AvgTimePerFrame;
- DWORD dwInterlaceFlags;
- DWORD dwCopyProtectFlags;
- DWORD dwPictAspectRatioX;
- DWORD dwPictAspectRatioY;
- union {
- DWORD dwControlFlags;
- DWORD dwReserved1;
- };
- DWORD dwReserved2;
- BITMAPINFOHEADER bmiHeader;
-} VIDEOINFOHEADER2;
-#define AMINTERLACE_IsInterlaced 0x00000001
-#define AMINTERLACE_1FieldPerSample 0x00000002
-#define AMINTERLACE_Field1First 0x00000004
-#define AMINTERLACE_FieldPatField1Only 0x00000000
-#define AMINTERLACE_FieldPatField2Only 0x00000010
-#define AMINTERLACE_FieldPatBothRegular 0x00000020
-#define AMINTERLACE_FieldPatBothIrregular 0x00000030
-#define AMINTERLACE_DisplayModeBobOnly 0x00000000
-#define AMINTERLACE_DisplayModeWeaveOnly 0x00000040
-#define AMINTERLACE_DisplayModeBobOrWeave 0x00000080
-#define AMINTERLACE_FieldPatternMask 0x00000030
-#define AMINTERLACE_DisplayModeMask 0x000000C0
-#define AMCONTROL_USED 0x00000001
-#define AMCONTROL_PAD_TO_4x3 0x00000002
-#define AMCONTROL_PAD_TO_16x9 0x00000004
-#define AMCONTROL_COLORINFO_PRESENT 0x00000008
-typedef struct tagMPEG2VIDEOINFO {
- VIDEOINFOHEADER2 hdr;
- DWORD dwStartTimeCode;
- DWORD cbSequenceHeader;
- DWORD dwProfile;
- DWORD dwLevel;
- DWORD dwFlags;
- DWORD dwSequenceHeader[1];
-} MPEG2VIDEOINFO;
-#define AMMPEG2_DoPanScan 0x00000001
-#define AMMPEG2_DVDLine21Field1 0x00000002
-#define AMMPEG2_DVDLine21Field2 0x00000004
-#define AMMPEG2_SourceIsLetterboxed 0x00000008
-#define AMMPEG2_FilmCameraMode 0x00000010
-#define AMMPEG2_LetterboxAnalogOut 0x00000020
-#define AMMPEG2_DSS_UserData 0x00000040
-#define AMMPEG2_DVB_UserData 0x00000080
-#define AMMPEG2_27MhzTimebase 0x00000100
-#define AMMPEG2_WidescreenAnalogOut 0x00000200
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/edevdefs.h b/winsup/w32api/include/edevdefs.h
deleted file mode 100644
index 128631a..0000000
--- a/winsup/w32api/include/edevdefs.h
+++ /dev/null
@@ -1,346 +0,0 @@
-#ifndef _EDEVDEFS_H
-#define _EDEVDEFS_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#define ED_TOP 0x00000001
-#define ED_MIDDLE 0x00000002
-#define ED_BOTTOM 0x00000004
-#define ED_LEFT 0x00000100
-#define ED_CENTER 0x00000200
-#define ED_RIGHT 0x00000400
-#define ED_DEVCAP_CAN_RECORD 0x00001001
-#define ED_DEVCAP_CAN_RECORD_STROBE 0x00001002
-#define ED_DEVCAP_HAS_AUDIO 0x00001003
-#define ED_DEVCAP_HAS_VIDEO 0x00001004
-#define ED_DEVCAP_USES_FILES 0x00001005
-#define ED_DEVCAP_CAN_SAVE 0x00001006
-#define ED_DEVCAP_DEVICE_TYPE 0x00001007
-#define ED_DEVTYPE_VCR 0x00001008
-#define ED_DEVTYPE_LASERDISK 0x00001009
-#define ED_DEVTYPE_ATR 0x0000100A
-#define ED_DEVTYPE_DDR 0x0000100B
-#define ED_DEVTYPE_ROUTER 0x0000100C
-#define ED_DEVTYPE_KEYER 0x0000100D
-#define ED_DEVTYPE_MIXER_VIDEO 0x000010OE
-#define ED_DEVTYPE_DVE 0x000010OF
-#define ED_DEVTYPE_WIPEGEN 0x00001010
-#define ED_DEVTYPE_MIXER_AUDIO 0x00001011
-#define ED_DEVTYPE_CG 0x00001012
-#define ED_DEVTYPE_TBC 0x00001013
-#define ED_DEVTYPE_TCG 0x00001014
-#define ED_DEVTYPE_GPI 0x00001015
-#define ED_DEVTYPE_JOYSTICK 0x00001016
-#define ED_DEVTYPE_KEYBOARD 0x00001017
-#define ED_DEVCAP_EXTERNAL_DEVICE_ID 0x00001018
-#define ED_DEVCAP_TIMECODE_READ 0x00001019
-#define ED_DEVCAP_TIMECODE_WRITE 0x0000101A
-#define ED_DEVCAP_CTLTRK_READ 0x0000101B
-#define ED_DEVCAP_INDEX_READ 0x0000101C
-#define ED_DEVCAP_PREROLL 0x0000101D
-#define ED_DEVCAP_POSTROLL 0x0000101E
-#define ED_DEVCAP_SYNC_ACCURACY 0x0000101F
-#define ED_SYNCACC_PRECISE 0x00001020
-#define ED_SYNCACC_FRAME 0x00001021
-#define ED_SYNCACC_ROUGH 0x00001022
-#define ED_DEVCAP_NORMAL_RATE 0x00001023
-#define ED_RATE_24 0x00001024
-#define ED_RATE_25 0x00001025
-#define ED_RATE_2997 0x00001026
-#define ED_RATE_30 0x00001027
-#define ED_DEVCAP_CAN_PREVIEW 0x00001028
-#define ED_DEVCAP_CAN_MONITOR_SOURCES 0x00001029
-#define ED_DEVCAP_CAN_TEST 0x0000102A
-#define ED_DEVCAP_VIDEO_INPUTS 0x0000102B
-#define ED_DEVCAP_AUDIO_INPUTS 0x0000102C
-#define ED_DEVCAP_NEEDS_CALIBRATING 0x0000102D
-#define ED_DEVCAP_SEEK_TYPE 0x0000102E
-#define ED_SEEK_PERFECT 0x0000102F
-#define ED_SEEK_FAST 0x00001030
-#define ED_SEEK_SLOW 0x00001031
-#define ED_POWER_ON 0x00001032
-#define ED_POWER_OFF 0x00001033
-#define ED_POWER_STANDBY 0x00001034
-#define ED_ACTIVE 0x00001035
-#define ED_INACTIVE 0x00001036
-#define ED_ALL 0x00001037
-#define ED_TEST 0x00001038
-#define ED_TRANSCAP_CAN_EJECT 0x00001064
-#define ED_TRANSCAP_CAN_BUMP_PLAY 0x00001065
-#define ED_TRANSCAP_CAN_PLAY_BACKWARDS 0x00001066
-#define ED_TRANSCAP_CAN_SET_EE 0x00001067
-#define ED_TRANSCAP_CAN_SET_PB 0x00001068
-#define ED_TRANSCAP_CAN_DELAY_VIDEO_IN 0x00001069
-#define ED_TRANSCAP_CAN_DELAY_VIDEO_OUT 0x0000106A
-#define ED_TRANSCAP_CAN_DELAY_AUDIO_IN 0x0000106B
-#define ED_TRANSCAP_CAN_DELAY_AUDIO_OUT 0x0000106C
-#define ED_TRANSCAP_FWD_VARIABLE_MAX 0x0000106D
-#define ED_TRANSCAP_REV_VARIABLE_MAX 0x0000106E
-#define ED_TRANSCAP_NUM_AUDIO_TRACKS 0x0000106F
-#define ED_TRANSCAP_LTC_TRACK 0x00001070
-#define ED_TRANSCAP_NEEDS_TBC 0x00001071
-#define ED_TRANSCAP_NEEDS_CUEING 0x00001072
-#define ED_TRANSCAP_CAN_INSERT 0x00001073
-#define ED_TRANSCAP_CAN_ASSEMBLE 0x00001074
-#define ED_TRANSCAP_FIELD_STEP 0x00001075
-#define ED_TRANSCAP_CLOCK_INC_RATE 0x00001076
-#define ED_TRANSCAP_CAN_DETECT_LENGTH 0x00001077
-#define ED_TRANSCAP_CAN_FREEZE 0x00001078
-#define ED_TRANSCAP_HAS_TUNER 0x00001079
-#define ED_TRANSCAP_HAS_TIMER 0x0000107A
-#define ED_TRANSCAP_HAS_CLOCK 0x0000107B
-#define ED_MEDIA_SPIN_UP 0x00001082
-#define ED_MEDIA_SPIN_DOWN 0x00001083
-#define ED_MEDIA_UNLOAD 0x00001084
-#define ED_MODE_PLAY 0x000010C8
-#define ED_MODE_STOP 0x000010C9
-#define ED_MODE_FREEZE 0x000010CA
-#define ED_MODE_THAW 0x000010CB
-#define ED_MODE_FF 0x000010CC
-#define ED_MODE_REW 0x000010CD
-#define ED_MODE_RECORD 0x000010CE
-#define ED_MODE_RECORD_STROBE 0x000010CF
-#define ED_MODE_STEP 0x000010D0
-#define ED_MODE_STEP_FWD 0x000010D0
-#define ED_MODE_SHUTTLE 0x000010D1
-#define ED_MODE_EDIT_CUE 0x000010D2
-#define ED_MODE_VAR_SPEED 0x000010D3
-#define ED_MODE_PERFORM 0x000010D4
-#define ED_MODE_LINK_ON 0x00001118
-#define ED_MODE_LINK_OFF 0x00001119
-#define ED_TCG_TIMECODE_TYPE 0x00001190
-#define ED_TCG_SMPTE_LTC 0x00001191
-#define ED_TCG_SMPTE_VITC 0x00001192
-#define ED_TCG_MIDI_QF 0x00001193
-#define ED_TCG_MIDI_FULL 0x00001194
-#define ED_TCG_FRAMERATE 0x00001195
-#define ED_TCG_SYNC_SOURCE 0x0000119A
-#define ED_TCG_VIDEO 0x0000119B
-#define ED_TCG_READER 0x0000119C
-#define ED_TCG_FREE 0x0000119D
-#define ED_TCG_REFERENCE_SOURCE 0x0000119E
-#define ED_TCR_SOURCE 0x000011A0
-#define ED_TCR_LTC 0x000011A1
-#define ED_TCR_VITC 0x000011A2
-#define ED_TCR_CT 0x000011A3
-#define ED_TCR_FTC 0x000011A4
-#define ED_TCR_LAST_VALUE 0x000011A5
-#define ED_TCD_SOURCE 0x000011A6
-#define ED_TCR 0x000011A7
-#define ED_TCG 0x000011A8
-#define ED_TCD_SIZE 0x000011A9
-#define ED_SMALL 0x000011AA
-#define ED_MED 0x000011AB
-#define ED_LARGE 0x000011AC
-#define ED_TCD_POSITION 0x000011AD
-#define ED_TCD_INTENSITY 0x000011B4
-#define ED_HIGH 0x000011B5
-#define ED_LOW 0x000011B6
-#define ED_TCD_TRANSPARENCY 0x000011B7
-#define ED_TCD_INVERT 0x000011B8
-#define ED_MODE 0x000011F4
-#define ED_ERROR 0x000011F5
-#define ED_LOCAL 0x000011F6
-#define ED_RECORD_INHIBIT 0x000011F7
-#define ED_SERVO_LOCK 0x000011F8
-#define ED_MEDIA_PRESENT 0x000011F9
-#define ED_MEDIA_LENGTH 0x000011FA
-#define ED_MEDIA_SIZE 0x000011FB
-#define ED_MEDIA_TRACK_COUNT 0x000011FC
-#define ED_MEDIA_TRACK_LENGTH 0x000011FD
-#define ED_MEDIA_SIDE 0x000011FE
-#define ED_MEDIA_TYPE 0x000011FF
-#define ED_MEDIA_VHS 0x00001200
-#define ED_MEDIA_SVHS 0x00001201
-#define ED_MEDIA_HI8 0x00001202
-#define ED_MEDIA_UMATIC 0x00001203
-#define ED_MEDIA_DVC 0x00001204
-#define ED_MEDIA_1_INCH 0x00001205
-#define ED_MEDIA_D1 0x00001206
-#define ED_MEDIA_D2 0x00001207
-#define ED_MEDIA_D3 0x00001208
-#define ED_MEDIA_D5 0x00001209
-#define ED_MEDIA_DBETA 0x0000120A
-#define ED_MEDIA_BETA 0x0000120B
-#define ED_MEDIA_8MM 0x0000120C
-#define ED_MEDIA_DDR 0x0000120D
-#define ED_MEDIA_OTHER 0x0000120E
-#define ED_MEDIA_CLV 0x0000120F
-#define ED_MEDIA_CAV 0x00001210
-#define ED_MEDIA_POSITION 0x00001211
-#define ED_LINK_MODE 0x00001212
-#define ED_TRANSBASIC_TIME_FORMAT 0x0000121C
-#define ED_FORMAT_MILLISECONDS 0x0000121D
-#define ED_FORMAT_FRAMES 0x0000121E
-#define ED_FORMAT_REFERENCE_TIME 0x0000121F
-#define ED_FORMAT_HMSF 0x00001223
-#define ED_FORMAT_TMSF 0x00001224
-#define ED_TRANSBASIC_TIME_REFERENCE 0x00001225
-#define ED_TIMEREF_TIMECODE 0x00001226
-#define ED_TIMEREF_CONTROL_TRACK 0x00001227
-#define ED_TIMEREF_INDEX 0x00001228
-#define ED_TRANSBASIC_SUPERIMPOSE 0x00001229
-#define ED_TRANSBASIC_END_STOP_ACTION 0x0000122A
-#define ED_TRANSBASIC_RECORD_FORMAT 0x0000122B
-#define ED_RECORD_FORMAT_SP 0x0000122C
-#define ED_RECORD_FORMAT_LP 0x0000122D
-#define ED_RECORD_FORMAT_EP 0x0000122E
-#define ED_TRANSBASIC_STEP_COUNT 0x0000122F
-#define ED_TRANSBASIC_STEP_UNIT 0x00001230
-#define ED_STEP_FIELD 0x00001231
-#define ED_STEP_FRAME 0x00001232
-#define ED_STEP_3_2 0x00001233
-#define ED_TRANSBASIC_PREROLL 0x00001234
-#define ED_TRANSBASIC_RECPREROLL 0x00001235
-#define ED_TRANSBASIC_POSTROLL 0x00001236
-#define ED_TRANSBASIC_EDIT_DELAY 0x00001237
-#define ED_TRANSBASIC_PLAYTC_DELAY 0x00001238
-#define ED_TRANSBASIC_RECTC_DELAY 0x00001239
-#define ED_TRANSBASIC_EDIT_FIELD 0x0000123A
-#define ED_TRANSBASIC_FRAME_SERVO 0x0000123B
-#define ED_TRANSBASIC_CF_SERVO 0x0000123C
-#define ED_TRANSBASIC_SERVO_REF 0x0000123D
-#define ED_REF_EXTERNAL 0x0000123E
-#define ED_REF_INPUT 0x0000123F
-#define ED_REF_INTERNAL 0x00001240
-#define ED_REF_AUTO 0x00001241
-#define ED_TRANSBASIC_WARN_GL 0x00001242
-#define ED_TRANSBASIC_SET_TRACKING 0x00001243
-#define ED_TRACKING_PLUS 0x00001244
-#define ED_TRACKING_MINUS 0x00001245
-#define ED_TRACKING_RESET 0x00001246
-#define ED_TRANSBASIC_SET_FREEZE_TIMEOUT 0x00001247
-#define ED_TRANSBASIC_VOLUME_NAME 0x00001248
-#define ED_TRANSBASIC_BALLISTIC_1 0x00001249
-#define ED_TRANSBASIC_BALLISTIC_2 0x0000124A
-#define ED_TRANSBASIC_BALLISTIC_3 0x0000124B
-#define ED_TRANSBASIC_BALLISTIC_4 0x0000124C
-#define ED_TRANSBASIC_BALLISTIC_5 0x0000124D
-#define ED_TRANSBASIC_BALLISTIC_6 0x0000124E
-#define ED_TRANSBASIC_BALLISTIC_7 0x0000124F
-#define ED_TRANSBASIC_BALLISTIC_8 0x00001250
-#define ED_TRANSBASIC_BALLISTIC_9 0x00001251
-#define ED_TRANSBASIC_BALLISTIC_10 0x00001252
-#define ED_TRANSBASIC_BALLISTIC_11 0x00001253
-#define ED_TRANSBASIC_BALLISTIC_12 0x00001254
-#define ED_TRANSBASIC_BALLISTIC_13 0x00001255
-#define ED_TRANSBASIC_BALLISTIC_14 0x00001256
-#define ED_TRANSBASIC_BALLISTIC_15 0x00001257
-#define ED_TRANSBASIC_BALLISTIC_16 0x00001258
-#define ED_TRANSBASIC_BALLISTIC_17 0x00001259
-#define ED_TRANSBASIC_BALLISTIC_18 0x0000125A
-#define ED_TRANSBASIC_BALLISTIC_19 0x0000125B
-#define ED_TRANSBASIC_BALLISTIC_20 0x0000125C
-#define ED_TRANSBASIC_SETCLOCK 0x0000125D
-#define ED_TRANSBASIC_SET_COUNTER_FORMAT 0x0000125E
-#define ED_TRANSBASIC_SET_COUNTER_VALUE 0x0000125F
-#define ED_TRANSBASIC_SETTUNER_CH_UP 0x00001260
-#define ED_TRANSBASIC_SETTUNER_CH_DN 0x00001261
-#define ED_TRANSBASIC_SETTUNER_SK_UP 0x00001262
-#define ED_TRANSBASIC_SETTUNER_SK_DN 0x00001263
-#define ED_TRANSBASIC_SETTUNER_CH 0x00001264
-#define ED_TRANSBASIC_SETTUNER_NUM 0x00001265
-#define ED_TRANSBASIC_SETTIMER_EVENT 0x00001266
-#define ED_TRANSBASIC_SETTIMER_STARTDAY 0x00001267
-#define ED_TRANSBASIC_SETTIMER_STARTTIME 0x00001268
-#define ED_TRANSBASIC_SETTIMER_STOPDAY 0x00001269
-#define ED_TRANSBASIC_SETTIMER_STOPTIME 0x0000126A
-#define ED_TRANSVIDEO_SET_OUTPUT 0x00001276
-#define ED_E2E 0x00001277
-#define ED_PLAYBACK 0x00001278
-#define ED_OFF 0x00001279
-#define ED_TRANSVIDEO_SET_SOURCE 0x0000127A
-#define ED_TRANSAUDIO_ENABLE_OUTPUT 0x00001280
-#define ED_TRANSAUDIO_ENABLE_RECORD 0x00001282
-#define ED_TRANSAUDIO_ENABLE_SELSYNC 0x00001283
-#define ED_TRANSAUDIO_SET_SOURCE 0x00001284
-#define ED_TRANSAUDIO_SET_MONITOR 0x00001285
-#define ED_INVALID 0x0000128C
-#define ED_EXECUTING 0x0000128D
-#define ED_REGISTER 0x0000128E
-#define ED_DELETE 0x0000128F
-#define ED_EDIT_HEVENT 0x00001290
-#define ED_EDIT_TEST 0x00001291
-#define ED_EDIT_IMMEDIATE 0x00001292
-#define ED_EDIT_MODE 0x00001293
-#define ED_EDIT_MODE_ASSEMBLE 0x00001294
-#define ED_EDIT_MODE_INSERT 0x00001295
-#define ED_EDIT_MODE_CRASH_RECORD 0x00001296
-#define ED_EDIT_MODE_BOOKMARK_TIME 0x00001297
-#define ED_EDIT_MODE_BOOKMARK_CHAPTER 0x00001298
-#define ED_EDIT_MASTER 0x0000129A
-#define ED_EDIT_TRACK 0x0000129B
-#define ED_EDIT_SRC_INPOINT 0x0000129C
-#define ED_EDIT_SRC_OUTPOINT 0x0000129D
-#define ED_EDIT_REC_INPOINT 0x0000129E
-#define ED_EDIT_REC_OUTPOINT 0x0000129F
-#define ED_EDIT_REHEARSE_MODE 0x000012A0
-#define ED_EDIT_BVB 0x000012A1
-#define ED_EDIT_VBV 0x000012A2
-#define ED_EDIT_VVV 0x000012A3
-#define ED_EDIT_PERFORM 0x000012A4
-#define ED_EDIT_ABORT 0x000012A5
-#define ED_EDIT_TIMEOUT 0x000012A6
-#define ED_EDIT_SEEK 0x000012A7
-#define ED_EDIT_SEEK_EDIT_IN 0x000012A9
-#define ED_EDIT_SEEK_EDIT_OUT 0x000012AA
-#define ED_EDIT_SEEK_PREROLL 0x000012AB
-#define ED_EDIT_SEEK_PREROLL_CT 0x000012AC
-#define ED_EDIT_SEEK_BOOKMARK 0x000012AD
-#define ED_EDIT_OFFSET 0x000012AE
-#define ED_ERR_DEVICE_NOT_READY 0x000012BC
-#define ED_TRANSCAP_FWD_VARIABLE_MIN 0x00001320
-#define ED_TRANSCAP_REV_VARIABLE_MIN 0x00001321
-#define ED_TRANSCAP_FWD_SHUTTLE_MAX 0x00001322
-#define ED_TRANSCAP_FWD_SHUTTLE_MIN 0x00001323
-#define ED_TRANSCAP_REV_SHUTTLE_MAX 0x00001324
-#define ED_TRANSCAP_REV_SHUTTLE_MIN 0x00001325
-#define ED_TRANSCAP_MULTIPLE_EDITS 0x00001326
-#define ED_TRANSCAP_IS_MASTER 0x00001327
-#define ED_MODE_RECORD_FREEZE 0x00001328
-#define ED_MODE_STEP_REV 0x00001329
-#define ED_MODE_NOTIFY_ENABLE 0x0000132A
-#define ED_MODE_NOTIFY_DISABLE 0x0000132B
-#define ED_MODE_SHOT_SEARCH 0x0000132C
-#define ED_MEDIA_SX 0x0000132D
-#define ED_TRANSCAP_HAS_DT 0x0000132E
-#define ED_EDIT_PREREAD 0x0000132F
-#define ED_AUDIO_1 0x00000001
-#define ED_AUDIO_2 0x00000002
-#define ED_AUDIO_3 0x00000004
-#define ED_AUDIO_4 0x00000008
-#define ED_AUDIO_5 0x00000010
-#define ED_AUDIO_6 0x00000020
-#define ED_AUDIO_7 0x00000040
-#define ED_AUDIO_8 0x00000080
-#define ED_AUDIO_9 0x00000100
-#define ED_AUDIO_10 0x00000200
-#define ED_AUDIO_11 0x00000400
-#define ED_AUDIO_12 0x00000800
-#define ED_AUDIO_13 0x00001000
-#define ED_AUDIO_14 0x00002000
-#define ED_AUDIO_15 0x00004000
-#define ED_AUDIO_16 0x00008000
-#define ED_AUDIO_17 0x00010000
-#define ED_AUDIO_18 0x00020000
-#define ED_AUDIO_19 0x00040000
-#define ED_AUDIO_20 0x00080000
-#define ED_AUDIO_21 0x00100000
-#define ED_AUDIO_22 0x00200000
-#define ED_AUDIO_23 0x00400000
-#define ED_AUDIO_24 0x00800000
-#define ED_AUDIO_ALL 0x10000000
-#define ED_VIDEO 0x02000000
-#define DEV_PORT_SIM 0x00000001
-#define DEV_PORT_COM1 0x00000002
-#define DEV_PORT_COM2 0x00000003
-#define DEV_PORT_COM3 0x00000004
-#define DEV_PORT_COM4 0x00000005
-#define DEV_PORT_DIAQ 0x00000006
-#define DEV_PORT_ARTI 0x00000007
-#define DEV_PORT_1394 0x00000008
-#define DEV_PORT_USB 0x00000009
-#define DEV_PORT_MIN DEV_PORT_SIM
-
-#endif
diff --git a/winsup/w32api/include/errorrep.h b/winsup/w32api/include/errorrep.h
deleted file mode 100644
index 1361855..0000000
--- a/winsup/w32api/include/errorrep.h
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef _ERRORREP_H
-#define _ERRORREP_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if (_WIN32_WINNT >= 0x0501)
-typedef enum {
- frrvErr = 3,
- frrvErrNoDW = 4,
- frrvErrTimeout = 5,
- frrvLaunchDebugger = 6,
- frrvOk = 0,
- frrvOkHeadless = 7,
- frrvOkManifest = 1,
- frrvOkQueued = 2
-} EFaultRepRetVal;
-BOOL WINAPI AddERExcludedApplicationA(LPCSTR);
-BOOL WINAPI AddERExcludedApplicationW(LPCWSTR);
-EFaultRepRetVal WINAPI ReportFault(LPEXCEPTION_POINTERS,DWORD);
-#endif
-
-#ifdef UNICODE
-#if (_WIN32_WINNT >= 0x0501)
-#define AddERExcludedApplication AddERExcludedApplicationW
-#endif
-#else
-#if (_WIN32_WINNT >= 0x0501)
-#define AddERExcludedApplication AddERExcludedApplicationA
-#endif
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/errors.h b/winsup/w32api/include/errors.h
deleted file mode 100644
index 7581899..0000000
--- a/winsup/w32api/include/errors.h
+++ /dev/null
@@ -1,169 +0,0 @@
-#ifndef _ERRORS_H
-#define _ERRORS_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- DirectShow Reference - Constants and GUIDs - Error and Success Codes */
-#define VFW_S_NO_MORE_ITEMS 0x00040103
-#define VFW_S_DUPLICATE_NAME 0x0004022D
-#define VFW_S_STATE_INTERMEDIATE 0x00040237
-#define VFW_S_PARTIAL_RENDER 0x00040242
-#define VFW_S_SOME_DATA_IGNORED 0x00040245
-#define VFW_S_CONNECTIONS_DEFERRED 0x00040246
-#define VFW_S_RESOURCE_NOT_NEEDED 0x00040250
-#define VFW_S_MEDIA_TYPE_IGNORED 0x00040254
-#define VFW_S_VIDEO_NOT_RENDERED 0x00040257
-#define VFW_S_AUDIO_NOT_RENDERED 0x00040258
-#define VFW_S_RPZA 0x0004025A
-#define VFW_S_ESTIMATED 0x00040260
-#define VFW_S_RESERVED 0x00040263
-#define VFW_S_STREAM_OFF 0x00040267
-#define VFW_S_CANT_CUE 0x00040268
-#define VFW_S_NOPREVIEWPIN 0x0004027E
-#define VFW_S_DVD_NON_ONE_SEQUENTIAL 0x00040280
-#define VFW_S_DVD_CHANNEL_CONTENTS_NOT_AVAILABLE 0x0004028C
-#define VFW_S_DVD_NOT_ACCURATE 0x0004028D
-#define VFW_E_INVALIDMEDIATYPE 0x80040200
-#define VFW_E_INVALIDSUBTYPE 0x80040201
-#define VFW_E_NEED_OWNER 0x80040202
-#define VFW_E_ENUM_OUT_OF_SYNC 0x80040203
-#define VFW_E_ALREADY_CONNECTED 0x80040204
-#define VFW_E_FILTER_ACTIVE 0x80040205
-#define VFW_E_NO_TYPES 0x80040206
-#define VFW_E_NO_ACCEPTABLE_TYPES 0x80040207
-#define VFW_E_INVALID_DIRECTION 0x80040208
-#define VFW_E_NOT_CONNECTED 0x80040209
-#define VFW_E_NO_ALLOCATOR 0x8004020A
-#define VFW_E_RUNTIME_ERROR 0x8004020B
-#define VFW_E_BUFFER_NOTSET 0x8004020C
-#define VFW_E_BUFFER_OVERFLOW 0x8004020D
-#define VFW_E_BADALIGN 0x8004020E
-#define VFW_E_ALREADY_COMMITTED 0x8004020F
-#define VFW_E_BUFFERS_OUTSTANDING 0x80040210
-#define VFW_E_NOT_COMMITTED 0x80040211
-#define VFW_E_SIZENOTSET 0x80040212
-#define VFW_E_NO_CLOCK 0x80040213
-#define VFW_E_NO_SINK 0x80040214
-#define VFW_E_NO_INTERFACE 0x80040215
-#define VFW_E_NOT_FOUND 0x80040216
-#define VFW_E_CANNOT_CONNECT 0x80040217
-#define VFW_E_CANNOT_RENDER 0x80040218
-#define VFW_E_CHANGING_FORMAT 0x80040219
-#define VFW_E_NO_COLOR_KEY_SET 0x8004021A
-#define VFW_E_NOT_OVERLAY_CONNECTION 0x8004021B
-#define VFW_E_NOT_SAMPLE_CONNECTION 0x8004021C
-#define VFW_E_PALETTE_SET 0x8004021D
-#define VFW_E_COLOR_KEY_SET 0x8004021E
-#define VFW_E_NO_COLOR_KEY_FOUND 0x8004021F
-#define VFW_E_NO_PALETTE_AVAILABLE 0x80040220
-#define VFW_E_NO_DISPLAY_PALETTE 0x80040221
-#define VFW_E_TOO_MANY_COLORS 0x80040222
-#define VFW_E_STATE_CHANGED 0x80040223
-#define VFW_E_NOT_STOPPED 0x80040224
-#define VFW_E_NOT_PAUSED 0x80040225
-#define VFW_E_NOT_RUNNING 0x80040226
-#define VFW_E_WRONG_STATE 0x80040227
-#define VFW_E_START_TIME_AFTER_END 0x80040228
-#define VFW_E_INVALID_RECT 0x80040229
-#define VFW_E_TYPE_NOT_ACCEPTED 0x8004022A
-#define VFW_E_SAMPLE_REJECTED 0x8004022B
-#define VFW_E_SAMPLE_REJECTED_EOS 0x8004022C
-#define VFW_E_DUPLICATE_NAME 0x8004022D
-#define VFW_E_TIMEOUT 0x8004022E
-#define VFW_E_INVALID_FILE_FORMAT 0x8004022F
-#define VFW_E_ENUM_OUT_OF_RANGE 0x80040230
-#define VFW_E_CIRCULAR_GRAPH 0x80040231
-#define VFW_E_NOT_ALLOWED_TO_SAVE 0x80040232
-#define VFW_E_TIME_ALREADY_PASSED 0x80040233
-#define VFW_E_ALREADY_CANCELLED 0x80040234
-#define VFW_E_CORRUPT_GRAPH_FILE 0x80040235
-#define VFW_E_ADVISE_ALREADY_SET 0x80040236
-#define VFW_E_NO_MODEX_AVAILABLE 0x80040238
-#define VFW_E_NO_ADVISE_SET 0x80040239
-#define VFW_E_NO_FULLSCREEN 0x8004023A
-#define VFW_E_IN_FULLSCREEN_MODE 0x8004023B
-#define VFW_E_UNKNOWN_FILE_TYPE 0x80040240
-#define VFW_E_CANNOT_LOAD_SOURCE_FILTER 0x80040241
-#define VFW_E_FILE_TOO_SHORT 0x80040243
-#define VFW_E_INVALID_FILE_VERSION 0x80040244
-#define VFW_E_INVALID_CLSID 0x80040247
-#define VFW_E_INVALID_MEDIA_TYPE 0x80040248
-#define VFW_E_SAMPLE_TIME_NOT_SET 0x80040249
-#define VFW_E_MEDIA_TIME_NOT_SET 0x80040251
-#define VFW_E_NO_TIME_FORMAT_SET 0x80040252
-#define VFW_E_MONO_AUDIO_HW 0x80040253
-#define VFW_E_NO_DECOMPRESSOR 0x80040255
-#define VFW_E_NO_AUDIO_HARDWARE 0x80040256
-#define VFW_E_RPZA 0x80040259
-#define VFW_E_PROCESSOR_NOT_SUITABLE 0x8004025B
-#define VFW_E_UNSUPPORTED_AUDIO 0x8004025C
-#define VFW_E_UNSUPPORTED_VIDEO 0x8004025D
-#define VFW_E_MPEG_NOT_CONSTRAINED 0x8004025E
-#define VFW_E_NOT_IN_GRAPH 0x8004025F
-#define VFW_E_NO_TIME_FORMAT 0x80040261
-#define VFW_E_READ_ONLY 0x80040262
-#define VFW_E_BUFFER_UNDERFLOW 0x80040264
-#define VFW_E_UNSUPPORTED_STREAM 0x80040265
-#define VFW_E_NO_TRANSPORT 0x80040266
-#define VFW_E_BAD_VIDEOCD 0x80040269
-#define VFW_S_NO_STOP_TIME 0x80040270
-#define VFW_E_OUT_OF_VIDEO_MEMORY 0x80040271
-#define VFW_E_VP_NEGOTIATION_FAILED 0x80040272
-#define VFW_E_DDRAW_CAPS_NOT_SUITABLE 0x80040273
-#define VFW_E_NO_VP_HARDWARE 0x80040274
-#define VFW_E_NO_CAPTURE_HARDWARE 0x80040275
-#define VFW_E_DVD_OPERATION_INHIBITED 0x80040276
-#define VFW_E_DVD_INVALIDDOMAIN 0x80040277
-#define VFW_E_DVD_NO_BUTTON 0x80040278
-#define VFW_E_DVD_GRAPHNOTREADY 0x80040279
-#define VFW_E_DVD_RENDERFAIL 0x8004027A
-#define VFW_E_DVD_DECNOTENOUGH 0x8004027B
-#define VFW_E_DDRAW_VERSION_NOT_SUITABLE 0x8004027C
-#define VFW_E_COPYPROT_FAILED 0x8004027D
-#define VFW_E_TIME_EXPIRED 0x8004027F
-#define VFW_E_DVD_WRONG_SPEED 0x80040281
-#define VFW_E_DVD_MENU_DOES_NOT_EXIST 0x80040282
-#define VFW_E_DVD_CMD_CANCELLED 0x80040283
-#define VFW_E_DVD_STATE_WRONG_VERSION 0x80040284
-#define VFW_E_DVD_STATE_CORRUPT 0x80040285
-#define VFW_E_DVD_STATE_WRONG_DISC 0x80040286
-#define VFW_E_DVD_INCOMPATIBLE_REGION 0x80040287
-#define VFW_E_DVD_NO_ATTRIBUTES 0x80040288
-#define VFW_E_DVD_NO_GOUP_PGC 0x80040289
-#define VFW_E_DVD_LOW_PARENTAL_LEVEL 0x8004028A
-#define VFW_E_DVD_NOT_IN_KARAOKE_MODE 0x8004028B
-#define VFW_E_FRAME_STEP_UNSUPPORTED 0x8004028E
-#define VFW_E_DVD_STREAM_DISABLED 0x8004028F
-#define VFW_E_DVD_TITLE_UNKNOWN 0x80040290
-#define VFW_E_DVD_INVALID_DISC 0x80040291
-#define VFW_E_DVD_NO_RESUME_INFORMATION 0x80040292
-#define VFW_E_PIN_ALREADY_BLOCKED_ON_THIS_THREAD 0x80040293
-#define VFW_E_PIN_ALREADY_BLOCKED 0x80040294
-#define VFW_E_CERTIFICATION_FAILURE 0x80040295
-#define VFW_E_VMR_NOT_IN_MIXER_MODE 0x80040296
-#define VFW_E_VMR_NO_AP_SUPPLIED 0x80040297
-#define VFW_E_VMR_NO_DEINTERLACE_HW 0x80040298
-#define VFW_E_VMR_NO_PROCAMP_HW 0x80040299
-#define VFW_E_DVD_VMR9_INCOMPATIBLEDEC 0x8004029A
-#define VFW_E_NO_COPP_HW 0x8004029B
-#define VFW_E_BAD_KEY 0x800403F2
-/*--- DirectShow Reference - Functions */
-#define MAX_ERROR_TEXT_LEN 160
-/*--- DirectShow Reference - Functions */
-DWORD WINAPI AMGetErrorTextA(HRESULT,CHAR*,DWORD);
-DWORD WINAPI AMGetErrorTextW(HRESULT,WCHAR*,DWORD);
-#ifdef UNICODE
-#define AMGetErrorText AMGetErrorTextW
-#else
-#define AMGetErrorText AMGetErrorTextA
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/evcode.h b/winsup/w32api/include/evcode.h
deleted file mode 100644
index 11426e4..0000000
--- a/winsup/w32api/include/evcode.h
+++ /dev/null
@@ -1,68 +0,0 @@
-#ifndef _EVCODE_H
-#define _EVCODE_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- DirectShow Reference - Constants and GUIDs - Event Notification Codes */
-#define EC_ACTIVATE 0x0013
-#define EC_BUFFERING_DATA 0x0011
-#define EC_BUILT 0x0300
-#define EC_CLOCK_CHANGED 0x000D
-#define EC_CLOCK_UNSET 0x0051
-#define EC_CODECAPI_EVENT 0x0057
-#define EC_COMPLETE 0x0001
-#define EC_DEVICE_LOST 0x001F
-#define EC_DISPLAY_CHANGED 0x0016
-#define EC_END_OF_SEGMENT 0x001C
-#define EC_ERROR_STILLPLAYING 0x0008
-#define EC_ERRORABORT 0x0003
-#define EC_EXTDEVICE_MODE_CHANGE 0x0031
-#define EC_FULLSCREEN_LOST 0x0012
-#define EC_GRAPH_CHANGED 0x0050
-#define EC_LENGTH_CHANGED 0x001E
-#define EC_NEED_RESTART 0x0014
-#define EC_NOTIFY_WINDOW 0x0019
-#define EC_OLE_EVENT 0x0018
-#define EC_OPENING_FILE 0x0010
-#define EC_PALETTE_CHANGED 0x0009
-#define EC_PAUSED 0x000E
-#define EC_PREPROCESS_COMPLETE 0x0056
-#define EC_QUALITY_CHANGE 0x000B
-#define EC_REPAINT 0x0005
-#define EC_SEGMENT_STARTED 0x001D
-#define EC_SHUTTING_DOWN 0x000C
-#define EC_SNDDEV_IN_ERROR 0x0200
-#define EC_SNDDEV_OUT_ERROR 0x0201
-#define EC_STARVATION 0x0017
-#define EC_STATE_CHANGE 0x0032
-#define EC_STEP_COMPLETE 0x0024
-#define EC_STREAM_CONTROL_STARTED 0x001B
-#define EC_STREAM_CONTROL_STOPPED 0x001A
-#define EC_STREAM_ERROR_STILLPLAYING 0x0007
-#define EC_STREAM_ERROR_STOPPED 0x0006
-#define EC_TIMECODE_AVAILABLE 0x0030
-#define EC_UNBUILT 0x0301
-#define EC_USERABORT 0x0002
-#define EC_VIDEO_SIZE_CHANGED 0x000A
-#define EC_VMR_RENDERDEVICE_SET 0x0053
-#define EC_VMR_SURFACE_FLIPPED 0x0054
-#define EC_VMR_RECONNECTION_FAILED 0x0055
-#define EC_WINDOW_DESTROYED 0x0015
-#define EC_WMT_EVENT 0x0252
-#define EC_WMT_INDEX_EVENT 0x0251
-#define EC_USER 0x8000
-/*--- DirectShow Reference - DirectShow Structures */
-typedef struct {
- HRESULT hrStatus;
- void *pData;
-} AM_WMT_EVENT_DATA;
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/exdisp.h b/winsup/w32api/include/exdisp.h
deleted file mode 100644
index 55c0288..0000000
--- a/winsup/w32api/include/exdisp.h
+++ /dev/null
@@ -1,225 +0,0 @@
-#ifndef _EXDISP_H
-#define _EXDISP_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include <oaidl.h>
-#include <ocidl.h>
-#include <docobj.h>
-
-EXTERN_C const CLSID CLSID_WebBrowser;
-EXTERN_C const IID DIID_DWebBrowserEvents;
-
-typedef enum {
- navOpenInNewWindow = 0x1,
- navNoHistory = 0x2,
- navNoReadFromCache = 0x4,
- navNoWriteTocache = 0x8,
- navAllowAutosearch = 0x10,
- navBrowserBar = 0x20,
- navHyperLink = 0x40
-} BrowserNavConstants;
-
-EXTERN_C const IID IID_IWebBrowser;
-#define INTERFACE IWebBrowser
-DECLARE_INTERFACE_(IWebBrowser,IDispatch)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
- STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
-
- STDMETHOD(GoBack)(THIS) PURE;
- STDMETHOD(GoForward)(THIS) PURE;
- STDMETHOD(GoHome)(THIS) PURE;
- STDMETHOD(GoSearch)(THIS) PURE;
- STDMETHOD(Navigate)(THIS_ BSTR,VARIANT*,VARIANT*,VARIANT*,VARIANT*) PURE;
- STDMETHOD(Refresh)(THIS) PURE;
- STDMETHOD(Refresh2)(THIS_ VARIANT*) PURE;
- STDMETHOD(Stop)(THIS) PURE;
- STDMETHOD(get_Application)(THIS_ IDispatch**) PURE;
- STDMETHOD(get_Parent)(THIS_ IDispatch**) PURE;
- STDMETHOD(get_Container)(THIS_ IDispatch**) PURE;
- STDMETHOD(get_Document)(THIS_ IDispatch**) PURE;
- STDMETHOD(get_TopLevelContainer)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(get_Type)(THIS_ BSTR*) PURE;
- STDMETHOD(get_Left)(THIS_ long*) PURE;
- STDMETHOD(put_Left)(THIS_ long) PURE;
- STDMETHOD(get_Top)(THIS_ long*) PURE;
- STDMETHOD(put_Top)(THIS_ long) PURE;
- STDMETHOD(get_Width)(THIS_ long*) PURE;
- STDMETHOD(put_Width)(THIS_ long) PURE;
- STDMETHOD(get_Height)(THIS_ long*) PURE;
- STDMETHOD(put_Height)(THIS_ long) PURE;
- STDMETHOD(get_LocationName)(THIS_ BSTR*) PURE;
- STDMETHOD(get_LocationURL)(THIS_ BSTR*) PURE;
- STDMETHOD(get_Busy)(THIS_ VARIANT_BOOL*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IWebBrowserApp;
-#define INTERFACE IWebBrowserApp
-DECLARE_INTERFACE_(IWebBrowserApp,IWebBrowser)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
- STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
-
- STDMETHOD(GoBack)(THIS) PURE;
- STDMETHOD(GoForward)(THIS) PURE;
- STDMETHOD(GoHome)(THIS) PURE;
- STDMETHOD(GoSearch)(THIS) PURE;
- STDMETHOD(Navigate)(THIS_ BSTR,VARIANT*,VARIANT*,VARIANT*,VARIANT*) PURE;
- STDMETHOD(Refresh)(THIS) PURE;
- STDMETHOD(Refresh2)(THIS_ VARIANT*) PURE;
- STDMETHOD(Stop)(THIS) PURE;
- STDMETHOD(get_Application)(THIS_ IDispatch**) PURE;
- STDMETHOD(get_Parent)(THIS_ IDispatch**) PURE;
- STDMETHOD(get_Container)(THIS_ IDispatch**) PURE;
- STDMETHOD(get_Document)(THIS_ IDispatch**) PURE;
- STDMETHOD(get_TopLevelContainer)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(get_Type)(THIS_ BSTR*) PURE;
- STDMETHOD(get_Left)(THIS_ long*) PURE;
- STDMETHOD(put_Left)(THIS_ long) PURE;
- STDMETHOD(get_Top)(THIS_ long*) PURE;
- STDMETHOD(put_Top)(THIS_ long) PURE;
- STDMETHOD(get_Width)(THIS_ long*) PURE;
- STDMETHOD(put_Width)(THIS_ long) PURE;
- STDMETHOD(get_Height)(THIS_ long*) PURE;
- STDMETHOD(put_Height)(THIS_ long) PURE;
- STDMETHOD(get_LocationName)(THIS_ BSTR*) PURE;
- STDMETHOD(get_LocationURL)(THIS_ BSTR*) PURE;
- STDMETHOD(get_Busy)(THIS_ VARIANT_BOOL*) PURE;
-
- STDMETHOD(Quit)(THIS) PURE;
- STDMETHOD(ClientToWindow)(THIS_ int*,int*) PURE;
- STDMETHOD(PutProperty)(THIS_ BSTR,VARIANT) PURE;
- STDMETHOD(GetProperty)(THIS_ BSTR,VARIANT*) PURE;
- STDMETHOD(get_Name)(THIS_ BSTR*) PURE;
- STDMETHOD(get_HWND)(THIS_ long*) PURE;
- STDMETHOD(get_FullName)(THIS_ BSTR*) PURE;
- STDMETHOD(get_Path)(THIS_ BSTR*) PURE;
- STDMETHOD(get_Visible)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(put_Visible)(THIS_ VARIANT_BOOL) PURE;
- STDMETHOD(get_StatusBar)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(put_StatusBar)(THIS_ VARIANT_BOOL) PURE;
- STDMETHOD(get_StatusText)(THIS_ BSTR*) PURE;
- STDMETHOD(put_StatusText)(THIS_ BSTR) PURE;
- STDMETHOD(get_ToolBar)(THIS_ int*) PURE;
- STDMETHOD(put_ToolBar)(THIS_ int) PURE;
- STDMETHOD(get_MenuBar)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(put_MenuBar)(THIS_ VARIANT_BOOL) PURE;
- STDMETHOD(get_FullScreen)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(put_FullScreen)(THIS_ VARIANT_BOOL) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IWebBrowser2;
-#define INTERFACE IWebBrowser2
-DECLARE_INTERFACE_(IWebBrowser2,IWebBrowserApp)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
- STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
-
- STDMETHOD(GoBack)(THIS) PURE;
- STDMETHOD(GoForward)(THIS) PURE;
- STDMETHOD(GoHome)(THIS) PURE;
- STDMETHOD(GoSearch)(THIS) PURE;
- STDMETHOD(Navigate)(THIS_ BSTR,VARIANT*,VARIANT*,VARIANT*,VARIANT*) PURE;
- STDMETHOD(Refresh)(THIS) PURE;
- STDMETHOD(Refresh2)(THIS_ VARIANT*) PURE;
- STDMETHOD(Stop)(THIS) PURE;
- STDMETHOD(get_Application)(THIS_ IDispatch**) PURE;
- STDMETHOD(get_Parent)(THIS_ IDispatch**) PURE;
- STDMETHOD(get_Container)(THIS_ IDispatch**) PURE;
- STDMETHOD(get_Document)(THIS_ IDispatch**) PURE;
- STDMETHOD(get_TopLevelContainer)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(get_Type)(THIS_ BSTR*) PURE;
- STDMETHOD(get_Left)(THIS_ long*) PURE;
- STDMETHOD(put_Left)(THIS_ long) PURE;
- STDMETHOD(get_Top)(THIS_ long*) PURE;
- STDMETHOD(put_Top)(THIS_ long) PURE;
- STDMETHOD(get_Width)(THIS_ long*) PURE;
- STDMETHOD(put_Width)(THIS_ long) PURE;
- STDMETHOD(get_Height)(THIS_ long*) PURE;
- STDMETHOD(put_Height)(THIS_ long) PURE;
- STDMETHOD(get_LocationName)(THIS_ BSTR*) PURE;
- STDMETHOD(get_LocationURL)(THIS_ BSTR*) PURE;
- STDMETHOD(get_Busy)(THIS_ VARIANT_BOOL*) PURE;
-
- STDMETHOD(Quit)(THIS) PURE;
- STDMETHOD(ClientToWindow)(THIS_ int*,int*) PURE;
- STDMETHOD(PutProperty)(THIS_ BSTR,VARIANT) PURE;
- STDMETHOD(GetProperty)(THIS_ BSTR,VARIANT*) PURE;
- STDMETHOD(get_Name)(THIS_ BSTR*) PURE;
- STDMETHOD(get_HWND)(THIS_ long*) PURE;
- STDMETHOD(get_FullName)(THIS_ BSTR*) PURE;
- STDMETHOD(get_Path)(THIS_ BSTR*) PURE;
- STDMETHOD(get_Visible)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(put_Visible)(THIS_ VARIANT_BOOL) PURE;
- STDMETHOD(get_StatusBar)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(put_StatusBar)(THIS_ VARIANT_BOOL) PURE;
- STDMETHOD(get_StatusText)(THIS_ BSTR*) PURE;
- STDMETHOD(put_StatusText)(THIS_ BSTR) PURE;
- STDMETHOD(get_ToolBar)(THIS_ int*) PURE;
- STDMETHOD(put_ToolBar)(THIS_ int) PURE;
- STDMETHOD(get_MenuBar)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(put_MenuBar)(THIS_ VARIANT_BOOL) PURE;
- STDMETHOD(get_FullScreen)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(put_FullScreen)(THIS_ VARIANT_BOOL) PURE;
-
- STDMETHOD(Navigate2)(THIS_ VARIANT*,VARIANT*,VARIANT*,VARIANT*,VARIANT*) PURE;
- STDMETHOD(QueryStatusWB)(THIS_ OLECMDID,OLECMDF*) PURE;
- STDMETHOD(ExecWB)(THIS_ OLECMDID,OLECMDEXECOPT,VARIANT*,VARIANT*) PURE;
- STDMETHOD(ShowBrowserBar)(THIS_ VARIANT*,VARIANT*,VARIANT*) PURE;
- STDMETHOD(get_ReadyState)(THIS_ READYSTATE*) PURE;
- STDMETHOD(get_Offline)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(put_Offline)(THIS_ VARIANT_BOOL) PURE;
- STDMETHOD(get_Silent)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(put_Silent)(THIS_ VARIANT_BOOL) PURE;
- STDMETHOD(get_RegistaerAsBrowser)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(put_RegisterAsBrowser)(THIS_ VARIANT_BOOL) PURE;
- STDMETHOD(get_RegistaerAsDropTarget)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(put_RegisterAsDropTarget)(THIS_ VARIANT_BOOL) PURE;
- STDMETHOD(get_TheaterMode)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(put_TheaterMode)(THIS_ VARIANT_BOOL) PURE;
- STDMETHOD(get_AddressBar)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(put_AddressBar)(THIS_ VARIANT_BOOL) PURE;
- STDMETHOD(get_Resizable)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(put_Resizable)(THIS_ VARIANT_BOOL) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID DIID_DWebBrowserEvents2;
-#define INTERFACE DWebBrowserEvents2
-DECLARE_INTERFACE_(DWebBrowserEvents2,IDispatch)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
- STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
-};
-#undef INTERFACE
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/exdispid.h b/winsup/w32api/include/exdispid.h
deleted file mode 100644
index da2b0a4..0000000
--- a/winsup/w32api/include/exdispid.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef _EXDISPID_H
-#define _EXDISPID_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#define DISPID_BEFORENAVIGATE2 250
-#define DISPID_NEWWINDOW2 251
-#define DISPID_PROGRESSCHANGE 108
-#define DISPID_DOCUMENTCOMPLETE 259
-#define DISPID_STATUSTEXTCHANGE 102
-#define DISPID_TITLECHANGE 113
-
-#endif
diff --git a/winsup/w32api/include/fltdefs.h b/winsup/w32api/include/fltdefs.h
deleted file mode 100644
index eadf0ac..0000000
--- a/winsup/w32api/include/fltdefs.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * fltdefs.h - Routing and Remote Access Services
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may use,
- * modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-#ifndef _FLTDEFS_H
-#define _FLTDEFS_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- Packet Filtering Reference - Packet Filtering Enumerated Types */
-#if (_WIN32_WINNT >= 0x0500)
-typedef enum _GlobalFilter {
- GF_FRAGMENTS = 2,
- GF_STRONGHOST = 8,
- GF_FRAGCACHE = 9
-} GLOBAL_FILTER,*PGLOBAL_FILTER;
-typedef enum _PfAddresType {
- PF_IPV4,
- PF_IPV6
-} PFADDRESSTYPE,*PPFADDRESSTYPE;
-typedef enum _PfForwardAction {
- PF_ACTION_FORWARD = 0,
- PF_ACTION_DROP
-} PFFORWARD_ACTION,*PPFFORWARD_ACTION;
-typedef enum _PfFrameType {
- PFFT_FILTER = 1,
- PFFT_FRAG = 2,
- PFFT_SPOOF = 3
-} PFFRAMETYPE,*PPFFRAMETYPE;
-#endif /* (_WIN32_WINNT >= 0x0500) */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/httpext.h b/winsup/w32api/include/httpext.h
deleted file mode 100644
index b1be908..0000000
--- a/winsup/w32api/include/httpext.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- httpext.h - Header for ISAPI extensions.
-
- This file is part of a free library for the Win32 API.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-*/
-
-#ifndef _HTTPEXT_H
-#define _HTTPEXT_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#include <windows.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define HSE_VERSION_MAJOR 2
-#define HSE_VERSION_MINOR 0
-#define HSE_LOG_BUFFER_LEN 80
-#define HSE_MAX_EXT_DLL_NAME_LEN 256
-#define HSE_STATUS_SUCCESS 1
-#define HSE_STATUS_SUCCESS_AND_KEEP_CONN 2
-#define HSE_STATUS_PENDING 3
-#define HSE_STATUS_ERROR 4
-#define HSE_REQ_BASE 0
-#define HSE_REQ_SEND_URL_REDIRECT_RESP 1
-#define HSE_REQ_SEND_URL 2
-#define HSE_REQ_SEND_RESPONSE_HEADER 3
-#define HSE_REQ_DONE_WITH_SESSION 4
-#define HSE_REQ_SEND_RESPONSE_HEADER_EX 1016
-#define HSE_REQ_END_RESERVED 1000
-#define HSE_TERM_ADVISORY_UNLOAD 0x00000001
-#define HSE_TERM_MUST_UNLOAD 0x00000002
-#define HSE_IO_SYNC 0x00000001
-#define HSE_IO_ASYNC 0x00000002
-#define HSE_IO_DISCONNECT_AFTER_SEND 0x00000004
-#define HSE_IO_SEND_HEADERS 0x00000008
-typedef LPVOID HCONN;
-typedef struct _HSE_VERSION_INFO {
- DWORD dwExtensionVersion;
- CHAR lpszExtensionDesc[HSE_MAX_EXT_DLL_NAME_LEN];
-} HSE_VERSION_INFO, *LPHSE_VERSION_INFO;
-typedef struct _EXTENSION_CONTROL_BLOCK {
- DWORD cbSize;
- DWORD dwVersion;
- HCONN ConnID;
- DWORD dwHttpStatusCode;
- CHAR lpszLogData[HSE_LOG_BUFFER_LEN];
- LPSTR lpszMethod;
- LPSTR lpszQueryString;
- LPSTR lpszPathInfo;
- LPSTR lpszPathTranslated;
- DWORD cbTotalBytes;
- DWORD cbAvailable;
- LPBYTE lpbData;
- LPSTR lpszContentType;
- BOOL (PASCAL *GetServerVariable)(HCONN,LPSTR,LPVOID,LPDWORD);
- BOOL (PASCAL *WriteClient)(HCONN,LPVOID,LPDWORD,DWORD);
- BOOL (PASCAL *ReadClient)(HCONN,LPVOID,LPDWORD);
- BOOL (PASCAL *ServerSupportFunction)(HCONN,DWORD,LPVOID,LPDWORD,LPDWORD);
-} EXTENSION_CONTROL_BLOCK, *LPEXTENSION_CONTROL_BLOCK;
-typedef BOOL (PASCAL *PFN_GETEXTENSIONVERSION)(HSE_VERSION_INFO*);
-typedef DWORD (PASCAL *PFN_HTTPEXTENSIONPROC)(EXTENSION_CONTROL_BLOCK*);
-typedef BOOL (PASCAL *PFN_TERMINATEEXTENSION)(DWORD);
-typedef VOID (PASCAL *PFN_HSE_IO_COMPLETION)(EXTENSION_CONTROL_BLOCK*,PVOID,DWORD,DWORD);
-typedef struct _HSE_TF_INFO {
- PFN_HSE_IO_COMPLETION pfnHseIO;
- PVOID pContext;
- HANDLE hFile;
- LPCSTR pszStatusCode;
- DWORD BytesToWrite;
- DWORD Offset;
- PVOID pHead;
- DWORD HeadLength;
- PVOID pTail;
- DWORD TailLength;
- DWORD dwFlags;
-} HSE_TF_INFO, *LPHSE_TF_INFO;
-typedef struct _HSE_SEND_HEADER_EX_INFO {
- LPCSTR pszStatus;
- LPCSTR pszHeader;
- DWORD cchStatus;
- DWORD cchHeader;
- BOOL fKeepConn;
-} HSE_SEND_HEADER_EX_INFO, * LPHSE_SEND_HEADER_EX_INF;
-BOOL PASCAL GetExtensionVersion(HSE_VERSION_INFO*);
-DWORD PASCAL HttpExtensionProc(EXTENSION_CONTROL_BLOCK*);
-BOOL PASCAL TerminateExtension(DWORD);
-#ifdef __cplusplus
-}
-#endif
-#endif /* _HTTPEXT_H */
diff --git a/winsup/w32api/include/icm.h b/winsup/w32api/include/icm.h
deleted file mode 100755
index a18c8e5..0000000
--- a/winsup/w32api/include/icm.h
+++ /dev/null
@@ -1,399 +0,0 @@
-#ifndef _ICM_H
-#define _ICM_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= 0x0500)
-#define MAX_COLOR_CHANNELS 8
-#define PROFILE_FILENAME 1
-#define PROFILE_MEMBUFFER 2
-#define PROFILE_READ 1
-#define PROFILE_READWRITE 2
-#define CLASS_SCANNER 0x73636E72
-#define CLASS_MONITOR 0x6D6E7472
-#define CLASS_PRINTER 0x70727472
-#define CLASS_LINK 0x6C696E6B
-#define CLASS_COLORSPAC 0x73706163
-#define CLASS_ABSTRACT 0x61627374
-#define CLASS_NAMED 0x6E6D636C
-#define SPACE_XYZ 0x58595A20
-#define SPACE_Lab 0x4C616220
-#define SPACE_Luv 0x4C757620
-#define SPACE_YCbCr 0x59436272
-#define SPACE_Yxy 0x59787920
-#define SPACE_RGB 0x52474220
-#define SPACE_GRAY 0x47524159
-#define SPACE_HSV 0x48535620
-#define SPACE_HLS 0x484C5320
-#define SPACE_CMYK 0x434D594B
-#define SPACE_CMY 0x434D5920
-#define SPACE_2_CHANNEL 0x32434C52
-#define SPACE_3_CHANNEL 0x33434C52
-#define SPACE_4_CHANNEL 0x34434C52
-#define SPACE_5_CHANNEL 0x35434C52
-#define SPACE_6_CHANNEL 0x36434C52
-#define SPACE_7_CHANNEL 0x37434C52
-#define SPACE_8_CHANNEL 0x38434C52
-#define FLAG_EMBEDDEDPROFILE 1
-#define FLAG_DEPENDENTONDATA 2
-#define ATTRIB_TRANSPARENCY 1
-#define ATTRIB_MATTE 2
-#define INTENT_PERCEPTUAL 0
-#define INTENT_RELATIVE_COLORIMETRIC 1
-#define INTENT_SATURATION 2
-#define INTENT_ABSOLUTE_COLORIMETRIC 3
-#define COLOR_MATCH_VERSION 0x200
-#define CMS_DISABLEICM 0x1
-#define CMS_ENABLEPROOFING 0x2
-#define CMS_SETRENDERINTENT 0x4
-#define CMS_SETPROOFINTENT 0x8
-#define CMS_SETMONITORPROFILE 0x10
-#define CMS_SETPRINTERPROFILE 0x20
-#define CMS_SETTARGETPROFILE 0x40
-#define CMS_USEHOOK 0x80
-#define CMS_USEAPPLYCALLBACK 0x100
-#define CMS_USEDESCRIPTION 0x200
-#define CMS_TARGETOVERFLOW 0x20000000
-#define CMS_PRINTERROVERFLOW 0x40000000
-#define CMS_MONITOROVERFLOW 0x80000000
-
-DECLARE_HANDLE(HPROFILE);
-typedef HPROFILE *PHPROFILE,*LPHPROFILE;
-DECLARE_HANDLE(HTRANSFORM);\
-
-typedef BOOL (CALLBACK *PBMCALLBACKFN)(ULONG,ULONG,LPARAM);
-struct _tagCOLORMATCHSETUPA;
-struct _tagCOLORMATCHSETUPW;
-typedef BOOL (CALLBACK *PCMSCALLBACKA)(struct _tagCOLORMATCHSETUPA*,LPARAM);
-typedef BOOL (CALLBACK *PCMSCALLBACKW)(struct _tagCOLORMATCHSETUPW*,LPARAM);
-
-typedef CHAR COLOR_NAME[32];
-typedef COLOR_NAME *PCOLOR_NAME,*LPCOLOR_NAME;
-typedef DWORD TAGTYPE,*PTAGTYPE,*LPTAGTYPE;
-typedef enum
-{
- BM_x555RGB = 0x0000,
- BM_x555XYZ = 0x0101,
- BM_x555Yxy,
- BM_x555Lab,
- BM_x555G3CH,
- BM_RGBTRIPLETS = 0x0002,
- BM_BGRTRIPLETS = 0x0004,
- BM_XYZTRIPLETS = 0x0201,
- BM_YxyTRIPLETS,
- BM_LabTRIPLETS,
- BM_G3CHTRIPLETS,
- BM_5CHANNEL,
- BM_6CHANNEL,
- BM_7CHANNEL,
- BM_8CHANNEL,
- BM_GRAY,
- BM_xRGBQUADS = 0x0008,
- BM_xBGRQUADS = 0x0010,
- BM_xG3CHQUADS = 0x0304,
- BM_KYMCQUADS,
- BM_CMYKQUADS = 0x0020,
- BM_10b_RGB = 0x0009,
- BM_10b_XYZ = 0x0401,
- BM_10b_Yxy,
- BM_10b_Lab,
- BM_10b_G3CH,
- BM_NAMED_INDEX,
- BM_16b_RGB = 0x000A,
- BM_16b_XYZ = 0x0501,
- BM_16b_Yxy,
- BM_16b_Lab,
- BM_16b_G3CH,
- BM_16b_GRAY,
- BM_565RGB = 0x0001
-} BMFORMAT,*PBMFORMAT,*LPBMFORMAT;
-typedef enum
-{
- COLOR_GRAY = 1,
- COLOR_RGB,
- COLOR_XYZ,
- COLOR_Yxy,
- COLOR_Lab,
- COLOR_3_CHANNEL,
- COLOR_CMYK,
- COLOR_5_CHANNEL,
- COLOR_6_CHANNEL,
- COLOR_7_CHANNEL,
- COLOR_8_CHANNEL,
- COLOR_NAMED
-} COLORTYPE,*PCOLORTYPE,*LPCOLORTYPE;
-struct GRAYCOLOR {
- WORD gray;
-};
-struct RGBCOLOR {
- WORD red;
- WORD green;
- WORD blue;
-};
-struct CMYKCOLOR {
- WORD cyan;
- WORD magenta;
- WORD yellow;
- WORD black;
-};
-struct XYZCOLOR {
- WORD X;
- WORD Y;
- WORD Z;
-};
-struct YxyCOLOR {
- WORD Y;
- WORD x;
- WORD y;
-};
-struct LabCOLOR {
- WORD L;
- WORD a;
- WORD b;
-};
-struct GENERIC3CHANNEL {
- WORD ch1;
- WORD ch2;
- WORD ch3;
-};
-struct NAMEDCOLOR {
- DWORD dwIndex;
-};
-struct HiFiCOLOR {
- BYTE channel[MAX_COLOR_CHANNELS];
-};
-typedef union tagCOLOR {
- struct GRAYCOLOR gray;
- struct RGBCOLOR rgb;
- struct CMYKCOLOR cmyk;
- struct XYZCOLOR XYZ;
- struct YxyCOLOR Yxy;
- struct LabCOLOR Lab;
- struct GENERIC3CHANNEL gen3ch;
- struct NAMEDCOLOR named;
- struct HiFiCOLOR hifi;
-} COLOR,*PCOLOR,*LPCOLOR;
-typedef struct _tagCOLORMATCHSETUPA {
- DWORD dwSize;
- DWORD dwVersion;
- DWORD dwFlags;
- HWND hwndOwner;
- PCSTR pSourceName;
- PCSTR pDisplayName;
- PCSTR pPrinterName;
- DWORD dwRenderIntent;
- DWORD dwProofingIntent;
- PSTR pMonitorProfile;
- DWORD ccMonitorProfile;
- PSTR pPrinterProfile;
- DWORD ccPrinterProfile;
- PSTR pTargetProfile;
- DWORD ccTargetProfile;
- DLGPROC lpfnHook;
- LPARAM lParam;
- PCMSCALLBACKA lpfnApplyCallback;
- LPARAM lParamApplyCallback;
-} COLORMATCHSETUPA,*PCOLORMATCHSETUPA,*LPCOLORMATCHSETUPA;
-typedef struct _tagCOLORMATCHSETUPW {
- DWORD dwSize;
- DWORD dwVersion;
- DWORD dwFlags;
- HWND hwndOwner;
- PCWSTR pSourceName;
- PCWSTR pDisplayName;
- PCWSTR pPrinterName;
- DWORD dwRenderIntent;
- DWORD dwProofingIntent;
- PWSTR pMonitorProfile;
- DWORD ccMonitorProfile;
- PWSTR pPrinterProfile;
- DWORD ccPrinterProfile;
- PWSTR pTargetProfile;
- DWORD ccTargetProfile;
- DLGPROC lpfnHook;
- LPARAM lParam;
- PCMSCALLBACKW lpfnApplyCallback;
- LPARAM lParamApplyCallback;
-} COLORMATCHSETUPW,*PCOLORMATCHSETUPW,*LPCOLORMATCHSETUPW;
-typedef struct tagENUMTYPEW {
- DWORD dwSize;
- DWORD dwVersion;
- DWORD dwFields;
- PCWSTR pDeviceName;
- DWORD dwMediaType;
- DWORD dwDitheringMode;
- DWORD dwResolution[2];
- DWORD dwCMMType;
- DWORD dwClass;
- DWORD dwDataColorSpace;
- DWORD dwConnectionSpace;
- DWORD dwSignature;
- DWORD dwPlatform;
- DWORD dwProfileFlags;
- DWORD dwManufacturer;
- DWORD dwModel;
- DWORD dwAttributes[2];
- DWORD dwRenderingIntent;
- DWORD dwCreator;
- DWORD dwDeviceClass;
-} ENUMTYPEW,*PENUMTYPEW,*LPENUMTYPEW;
-typedef struct tagENUMTYPEA {
- DWORD dwSize;
- DWORD dwVersion;
- DWORD dwFields;
- PCSTR pDeviceName;
- DWORD dwMediaType;
- DWORD dwDitheringMode;
- DWORD dwResolution[2];
- DWORD dwCMMType;
- DWORD dwClass;
- DWORD dwDataColorSpace;
- DWORD dwConnectionSpace;
- DWORD dwSignature;
- DWORD dwPlatform;
- DWORD dwProfileFlags;
- DWORD dwManufacturer;
- DWORD dwModel;
- DWORD dwAttributes[2];
- DWORD dwRenderingIntent;
- DWORD dwCreator;
- DWORD dwDeviceClass;
-} ENUMTYPEA,*PENUMTYPEA,*LPENUMTYPEA;
-typedef struct tagNAMED_PROFILE_INFO{
- DWORD dwFlags;
- DWORD dwCount;
- DWORD dwCountDevCoordinates;
- COLOR_NAME szPrefix;
- COLOR_NAME szSuffix;
-} NAMED_PROFILE_INFO,*PNAMED_PROFILE_INFO,*LPNAMED_PROFILE_INFO;
-typedef struct tagPROFILE {
- DWORD dwType;
- PVOID pProfileData;
- DWORD cbDataSize;
-} PROFILE,*PPROFILE,*LPPROFILE;
-typedef struct tagPROFILEHEADER {
- DWORD phSize;
- DWORD phCMMType;
- DWORD phVersion;
- DWORD phClass;
- DWORD phDataColorSpace;
- DWORD phConnectionSpace;
- DWORD phDateTime[3];
- DWORD phSignature;
- DWORD phPlatform;
- DWORD phProfileFlags;
- DWORD phManufacturer;
- DWORD phModel;
- DWORD phAttributes[2];
- DWORD phRenderingIntent;
- CIEXYZ phIlluminant;
- DWORD phCreator;
- BYTE phReserved[44];
-} PROFILEHEADER,*PPROFILEHEADER,*LPPROFILEHEADER;
-
-BOOL WINAPI AssociateColorProfileWithDeviceA(PCSTR,PCSTR,PCSTR);
-BOOL WINAPI AssociateColorProfileWithDeviceW(PCWSTR,PCWSTR,PCWSTR);
-BOOL WINAPI CheckBitmapBits(HTRANSFORM,PVOID,BMFORMAT,DWORD,DWORD,DWORD,PBYTE,PBMCALLBACKFN,LPARAM);
-BOOL WINAPI CheckColors(HTRANSFORM,PCOLOR,DWORD,COLORTYPE,PBYTE);
-BOOL WINAPI CloseColorProfile(HPROFILE);
-BOOL WINAPI ConvertColorNameToIndex(HPROFILE,PCOLOR_NAME,PDWORD,DWORD);
-BOOL WINAPI ConvertIndexToColorName(HPROFILE,PDWORD,PCOLOR_NAME,DWORD);
-HTRANSFORM WINAPI CreateColorTransformA(LPLOGCOLORSPACEA,HPROFILE,HPROFILE,DWORD);
-HTRANSFORM WINAPI CreateColorTransformW(LPLOGCOLORSPACEW,HPROFILE,HPROFILE,DWORD);
-BOOL WINAPI CreateDeviceLinkProfile(PHPROFILE,DWORD,PDWORD,DWORD,DWORD,PBYTE*,DWORD);
-HTRANSFORM WINAPI CreateMultiProfileTransform(PHPROFILE,DWORD,PDWORD,DWORD,DWORD,DWORD);
-BOOL WINAPI CreateProfileFromLogColorSpaceA(LPLOGCOLORSPACEA,PBYTE*);
-BOOL WINAPI CreateProfileFromLogColorSpaceW(LPLOGCOLORSPACEW,PBYTE*);
-BOOL WINAPI DeleteColorTransform(HTRANSFORM);
-BOOL WINAPI DisassociateColorProfileFromDeviceA(PCSTR,PCSTR,PCSTR);
-BOOL WINAPI DisassociateColorProfileFromDeviceW(PCWSTR,PCWSTR,PCWSTR);
-BOOL WINAPI EnumColorProfilesA(PCSTR,PENUMTYPEA,PBYTE,PDWORD,PDWORD);
-BOOL WINAPI EnumColorProfilesW(PCWSTR,PENUMTYPEW,PBYTE,PDWORD,PDWORD);
-DWORD WINAPI GetCMMInfo(HTRANSFORM,DWORD);
-BOOL WINAPI GetColorDirectoryA(PCSTR,PSTR,PDWORD);
-BOOL WINAPI GetColorDirectoryW(PCWSTR,PWSTR,PDWORD);
-BOOL WINAPI GetColorProfileElement(HPROFILE,TAGTYPE,DWORD,PDWORD,PVOID,PBOOL);
-BOOL WINAPI GetColorProfileElementTag(HPROFILE,DWORD,PTAGTYPE);
-BOOL WINAPI GetColorProfileFromHandle(HPROFILE,PBYTE,PDWORD);
-BOOL WINAPI GetColorProfileHeader(HPROFILE,PPROFILEHEADER);
-BOOL WINAPI GetCountColorProfileElements(HPROFILE,PDWORD);
-BOOL WINAPI GetNamedProfileInfo(HPROFILE,PNAMED_PROFILE_INFO);
-BOOL WINAPI GetPS2ColorRenderingDictionary(HPROFILE,DWORD,PBYTE,PDWORD,PBOOL);
-BOOL WINAPI GetPS2ColorRenderingIntent(HPROFILE,DWORD,PBYTE,PDWORD);
-BOOL WINAPI GetPS2ColorSpaceArray(HPROFILE,DWORD,DWORD,PBYTE,PDWORD,PBOOL);
-BOOL WINAPI GetStandardColorSpaceProfileA(PCSTR,DWORD,PSTR,PDWORD);
-BOOL WINAPI GetStandardColorSpaceProfileW(PCWSTR,DWORD,PWSTR,PDWORD);
-BOOL WINAPI InstallColorProfileA(PCSTR,PCSTR);
-BOOL WINAPI InstallColorProfileW(PCWSTR,PCWSTR);
-BOOL WINAPI IsColorProfileTagPresent(HPROFILE,TAGTYPE,PBOOL);
-BOOL WINAPI IsColorProfileValid(HPROFILE,PBOOL);
-HPROFILE WINAPI OpenColorProfileA(PPROFILE,DWORD,DWORD,DWORD);
-HPROFILE WINAPI OpenColorProfileW(PPROFILE,DWORD,DWORD,DWORD);
-BOOL WINAPI RegisterCMMA(PCSTR,DWORD,PCSTR);
-BOOL WINAPI RegisterCMMW(PCWSTR,DWORD,PCWSTR);
-BOOL WINAPI SelectCMM(DWORD);
-BOOL WINAPI SetColorProfileElement(HPROFILE,TAGTYPE,DWORD,PDWORD,PVOID);
-BOOL WINAPI SetColorProfileElementReference(HPROFILE,TAGTYPE,TAGTYPE);
-BOOL WINAPI SetColorProfileElementSize(HPROFILE,TAGTYPE,DWORD);
-BOOL WINAPI SetColorProfileHeader(HPROFILE,PPROFILEHEADER);
-BOOL WINAPI SetStandardColorSpaceProfileA(PCSTR,DWORD,PCSTR);
-BOOL WINAPI SetStandardColorSpaceProfileW(PCWSTR,DWORD,PCSTR);
-BOOL WINAPI SetupColorMatchingA(PCOLORMATCHSETUPA);
-BOOL WINAPI SetupColorMatchingW(PCOLORMATCHSETUPW);
-BOOL WINAPI TranslateBitmapBits(HTRANSFORM,PVOID,BMFORMAT,DWORD,DWORD,DWORD,PVOID,BMFORMAT,DWORD,PBMCALLBACKFN,ULONG);
-BOOL WINAPI TranslateColors(HTRANSFORM,PCOLOR,DWORD,COLORTYPE,PCOLOR,COLORTYPE);
-BOOL WINAPI UninstallColorProfileA(PCSTR,PCSTR,BOOL);
-BOOL WINAPI UninstallColorProfileW(PCWSTR,PCWSTR,BOOL);
-BOOL WINAPI UnregisterCMMA(PCSTR,DWORD);
-BOOL WINAPI UnregisterCMMW(PCWSTR,DWORD);
-
-#ifdef UNICODE
-typedef PCMSCALLBACKW PCMSCALLBACK;
-typedef COLORMATCHSETUPW COLORMATCHSETUP,*PCOLORMATCHSETUP,*LPCOLORMATCHSETUP;
-typedef ENUMTYPEW ENUMTYPE,*PENUMTYPE,*LPENUMTYPE;
-#define AssociateColorProfileWithDevice AssociateColorProfileWithDeviceW
-#define CreateColorTransform CreateColorTransformW
-#define CreateProfileFromLogColorSpace CreateProfileFromLogColorSpaceW
-#define DisassociateColorProfileFromDevice DisassociateColorProfileFromDeviceW
-#define EnumColorProfiles EnumColorProfilesW
-#define GetColorDirectory GetColorDirectoryW
-#define GetStandardColorSpaceProfile GetStandardColorSpaceProfileW
-#define InstallColorProfile InstallColorProfileW
-#define OpenColorProfile OpenColorProfileW
-#define RegisterCMM RegisterCMMW
-#define SetStandardColorSpaceProfile SetStandardColorSpaceProfileW
-#define SetupColorMatching SetupColorMatchingW
-#define UninstallColorProfile UninstallColorProfileW
-#define UnregisterCMM UnregisterCMMW
-#else /* UNICODE */
-typedef PCMSCALLBACKA PCMSCALLBACK;
-typedef COLORMATCHSETUPA COLORMATCHSETUP,*PCOLORMATCHSETUP,*LPCOLORMATCHSETUP;
-typedef ENUMTYPEA ENUMTYPE,*PENUMTYPE,*LPENUMTYPE;
-#define AssociateColorProfileWithDevice AssociateColorProfileWithDeviceA
-#define CreateColorTransform CreateColorTransformA
-#define CreateProfileFromLogColorSpace CreateProfileFromLogColorSpaceA
-#define DisassociateColorProfileFromDevice DisassociateColorProfileFromDeviceA
-#define EnumColorProfiles EnumColorProfilesA
-#define GetColorDirectory GetColorDirectoryA
-#define GetStandardColorSpaceProfile GetStandardColorSpaceProfileA
-#define InstallColorProfile InstallColorProfileA
-#define OpenColorProfile OpenColorProfileA
-#define RegisterCMM RegisterCMMA
-#define SetStandardColorSpaceProfile SetStandardColorSpaceProfileA
-#define SetupColorMatching SetupColorMatchingA
-#define UninstallColorProfile UninstallColorProfileA
-#define UnregisterCMM UnregisterCMMA
-#endif /* !UNICODE */
-
-#endif /* (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= 0x0500) */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ICM_H */
diff --git a/winsup/w32api/include/idispids.h b/winsup/w32api/include/idispids.h
deleted file mode 100644
index 66585b4..0000000
--- a/winsup/w32api/include/idispids.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef _IDISPIDS_H
-#define _IDISPIDS_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#define DISPID_AMBIENT_OFFLINEIFNOTCONNECTED (-5501)
-#define DISPID_AMBIENT_SILENT (-5502)
-
-#endif
diff --git a/winsup/w32api/include/il21dec.h b/winsup/w32api/include/il21dec.h
deleted file mode 100644
index fea328e..0000000
--- a/winsup/w32api/include/il21dec.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#ifndef _IL21DEC_H
-#define _IL21DEC_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- DirectShow Reference - DirectShow Enumerated Types */
-typedef enum _AM_LINE21_CCLEVEL {
- AM_L21_CCLEVEL_TC2
-} AM_LINE21_CCLEVEL,*PAM_LINE21_CCLEVEL;
-typedef enum _AM_LINE21_CCSERVICE {
- AM_L21_CCSERVICE_None,
- AM_L21_CCSERVICE_Caption1,
- AM_L21_CCSERVICE_Caption2,
- AM_L21_CCSERVICE_Text1,
- AM_L21_CCSERVICE_Text2,
- AM_L21_CCSERVICE_XDS,
-} AM_LINE21_CCSERVICE,*PAM_LINE21_CCSERVICE;
-typedef enum _AM_LINE21_CCSTATE {
- AM_L21_CCSTATE_Off,
- AM_L21_CCSTATE_On
-} AM_LINE21_CCSTATE,*PAM_LINE21_CCSTATE;
-typedef enum _AM_LINE21_DRAWBGMODE {
- AM_L21_DRAWBGMODE_Opaque,
- AM_L21_DRAWBGMODE_Transparent
-} AM_LINE21_DRAWBGMODE,*PAM_LINE21_DRAWBGMODE;
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/imagehlp.h b/winsup/w32api/include/imagehlp.h
deleted file mode 100644
index 448c51d..0000000
--- a/winsup/w32api/include/imagehlp.h
+++ /dev/null
@@ -1,329 +0,0 @@
-/*
- imagehlp.h - Include file for IMAGEHLP.DLL APIs
-
- Written by Mumit Khan <khan@nanotech.wisc.edu>
-
- This file is part of a free library for the Win32 API.
-
- NOTE: This strictly does not belong in the Win32 API since it's
- really part of Platform SDK. However,GDB needs it and we might
- as well provide it here.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#ifndef _IMAGEHLP_H
-#define _IMAGEHLP_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define API_VERSION_NUMBER 7
-#define BIND_NO_BOUND_IMPORTS 0x00000001
-#define BIND_NO_UPDATE 0x00000002
-#define BIND_ALL_IMAGES 0x00000004
-#define BIND_CACHE_IMPORT_DLLS 0x00000008
-#define CBA_DEFERRED_SYMBOL_LOAD_START 1
-#define CBA_DEFERRED_SYMBOL_LOAD_COMPLETE 2
-#define CBA_DEFERRED_SYMBOL_LOAD_FAILURE 3
-#define CBA_SYMBOLS_UNLOADED 4
-#define CBA_DUPLICATE_SYMBOL 5
-#define CERT_PE_IMAGE_DIGEST_DEBUG_INFO 1
-#define CERT_PE_IMAGE_DIGEST_RESOURCES 2
-#define CERT_PE_IMAGE_DIGEST_ALL_IMPORT_INFO 4
-#define CERT_PE_IMAGE_DIGEST_NON_PE_INFO 8
-#define CERT_SECTION_TYPE_ANY 255
-#define CHECKSUM_SUCCESS 0
-#define CHECKSUM_OPEN_FAILURE 1
-#define CHECKSUM_MAP_FAILURE 2
-#define CHECKSUM_MAPVIEW_FAILURE 3
-#define CHECKSUM_UNICODE_FAILURE 4
-#define IMAGE_SEPARATION 65536
-#define SPLITSYM_REMOVE_PRIVATE 1
-#define SPLITSYM_EXTRACT_ALL 2
-#define SPLITSYM_SYMBOLPATH_IS_SRC 4
-#define SYMF_OMAP_GENERATED 1
-#define SYMF_OMAP_MODIFIED 2
-#define SYMOPT_CASE_INSENSITIVE 1
-#define SYMOPT_UNDNAME 2
-#define SYMOPT_DEFERRED_LOADS 4
-#define SYMOPT_NO_CPP 8
-#define SYMOPT_LOAD_LINES 16
-#define SYMOPT_OMAP_FIND_NEAREST 32
-#define UNDNAME_COMPLETE 0
-#define UNDNAME_NO_LEADING_UNDERSCORES 1
-#define UNDNAME_NO_MS_KEYWORDS 2
-#define UNDNAME_NO_FUNCTION_RETURNS 4
-#define UNDNAME_NO_ALLOCATION_MODEL 8
-#define UNDNAME_NO_ALLOCATION_LANGUAGE 16
-#define UNDNAME_NO_MS_THISTYPE 32
-#define UNDNAME_NO_CV_THISTYPE 64
-#define UNDNAME_NO_THISTYPE 96
-#define UNDNAME_NO_ACCESS_SPECIFIERS 128
-#define UNDNAME_NO_THROW_SIGNATURES 256
-#define UNDNAME_NO_MEMBER_TYPE 512
-#define UNDNAME_NO_RETURN_UDT_MODEL 1024
-#define UNDNAME_32_BIT_DECODE 2048
-#define UNDNAME_NAME_ONLY 4096
-#define UNDNAME_NO_ARGUMENTS 8192
-#define UNDNAME_NO_SPECIAL_SYMS 16384
-
-#define _IMAGEHLPAPI DECLSPEC_IMPORT WINAPI
-
-#ifndef RC_INVOKED
-
-typedef enum _IMAGEHLP_STATUS_REASON {
- BindOutOfMemory,
- BindRvaToVaFailed,
- BindNoRoomInImage,
- BindImportModuleFailed,
- BindImportProcedureFailed,
- BindImportModule,
- BindImportProcedure,
- BindForwarder,
- BindForwarderNOT,
- BindImageModified,
- BindExpandFileHeaders,
- BindImageComplete,
- BindMismatchedSymbols,
- BindSymbolsNotUpdated
-} IMAGEHLP_STATUS_REASON;
-typedef BOOL(STDCALL*PIMAGEHLP_STATUS_ROUTINE)(IMAGEHLP_STATUS_REASON,LPSTR,LPSTR,ULONG,ULONG);
-typedef struct _LOADED_IMAGE {
- LPSTR ModuleName;
- HANDLE hFile;
- PUCHAR MappedAddress;
- PIMAGE_NT_HEADERS FileHeader;
- PIMAGE_SECTION_HEADER LastRvaSection;
- ULONG NumberOfSections;
- PIMAGE_SECTION_HEADER Sections;
- ULONG Characteristics;
- BOOLEAN fSystemImage;
- BOOLEAN fDOSImage;
- LIST_ENTRY Links;
- ULONG SizeOfImage;
-} LOADED_IMAGE,*PLOADED_IMAGE;
-typedef struct _IMAGE_DEBUG_INFORMATION {
- LIST_ENTRY List;
- DWORD Size;
- PVOID MappedBase;
- USHORT Machine;
- USHORT Characteristics;
- DWORD CheckSum;
- DWORD ImageBase;
- DWORD SizeOfImage;
- DWORD NumberOfSections;
- PIMAGE_SECTION_HEADER Sections;
- DWORD ExportedNamesSize;
- LPSTR ExportedNames;
- DWORD NumberOfFunctionTableEntries;
- PIMAGE_FUNCTION_ENTRY FunctionTableEntries;
- DWORD LowestFunctionStartingAddress;
- DWORD HighestFunctionEndingAddress;
- DWORD NumberOfFpoTableEntries;
- PFPO_DATA FpoTableEntries;
- DWORD SizeOfCoffSymbols;
- PIMAGE_COFF_SYMBOLS_HEADER CoffSymbols;
- DWORD SizeOfCodeViewSymbols;
- PVOID CodeViewSymbols;
- LPSTR ImageFilePath;
- LPSTR ImageFileName;
- LPSTR DebugFilePath;
- DWORD TimeDateStamp;
- BOOL RomImage;
- PIMAGE_DEBUG_DIRECTORY DebugDirectory;
- DWORD NumberOfDebugDirectories;
- DWORD Reserved[3];
-} IMAGE_DEBUG_INFORMATION,*PIMAGE_DEBUG_INFORMATION;
-typedef enum {
- AddrMode1616,
- AddrMode1632,
- AddrModeReal,
- AddrModeFlat
-} ADDRESS_MODE;
-typedef struct _tagADDRESS {
- DWORD Offset;
- WORD Segment;
- ADDRESS_MODE Mode;
-} ADDRESS,*LPADDRESS;
-typedef struct _KDHELP {
- DWORD Thread;
- DWORD ThCallbackStack;
- DWORD NextCallback;
- DWORD FramePointer;
- DWORD KiCallUserMode;
- DWORD KeUserCallbackDispatcher;
- DWORD SystemRangeStart;
-} KDHELP,*PKDHELP;
-typedef struct _tagSTACKFRAME {
- ADDRESS AddrPC;
- ADDRESS AddrReturn;
- ADDRESS AddrFrame;
- ADDRESS AddrStack;
- LPVOID FuncTableEntry;
- DWORD Params[4];
- BOOL Far;
- BOOL Virtual;
- DWORD Reserved[3];
- KDHELP KdHelp;
-} STACKFRAME,*LPSTACKFRAME;
-typedef BOOL(STDCALL*PREAD_PROCESS_MEMORY_ROUTINE)(HANDLE ,LPCVOID,LPVOID,DWORD,LPDWORD);
-typedef LPVOID(STDCALL*PFUNCTION_TABLE_ACCESS_ROUTINE)(HANDLE,DWORD);
-typedef DWORD(STDCALL*PGET_MODULE_BASE_ROUTINE)(HANDLE,DWORD);
-typedef DWORD(STDCALL*PTRANSLATE_ADDRESS_ROUTINE)(HANDLE,HANDLE,LPADDRESS);
-typedef struct API_VERSION {
- USHORT MajorVersion;
- USHORT MinorVersion;
- USHORT Revision;
- USHORT Reserved;
-} API_VERSION,*LPAPI_VERSION;
-typedef BOOL(CALLBACK*PSYM_ENUMMODULES_CALLBACK)(LPSTR,ULONG,PVOID);
-typedef BOOL(CALLBACK*PSYM_ENUMSYMBOLS_CALLBACK)(LPSTR,ULONG,ULONG,PVOID);
-typedef BOOL(CALLBACK*PENUMLOADED_MODULES_CALLBACK)(LPSTR,ULONG,ULONG,PVOID);
-typedef BOOL(CALLBACK*PSYMBOL_REGISTERED_CALLBACK)(HANDLE,ULONG,PVOID,PVOID);
-typedef enum {
- SymNone,
- SymCoff,
- SymCv,
- SymPdb,
- SymExport,
- SymDeferred,
- SymSym
-} SYM_TYPE;
-typedef struct _IMAGEHLP_SYMBOL {
- DWORD SizeOfStruct;
- DWORD Address;
- DWORD Size;
- DWORD Flags;
- DWORD MaxNameLength;
- CHAR Name[1];
-} IMAGEHLP_SYMBOL,*PIMAGEHLP_SYMBOL;
-typedef struct _IMAGEHLP_MODULE {
- DWORD SizeOfStruct;
- DWORD BaseOfImage;
- DWORD ImageSize;
- DWORD TimeDateStamp;
- DWORD CheckSum;
- DWORD NumSyms;
- SYM_TYPE SymType;
- CHAR ModuleName[32];
- CHAR ImageName[256];
- CHAR LoadedImageName[256];
-} IMAGEHLP_MODULE,*PIMAGEHLP_MODULE;
-typedef struct _IMAGEHLP_LINE {
- DWORD SizeOfStruct;
- DWORD Key;
- DWORD LineNumber;
- PCHAR FileName;
- DWORD Address;
-} IMAGEHLP_LINE,*PIMAGEHLP_LINE;
-typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD {
- DWORD SizeOfStruct;
- DWORD BaseOfImage;
- DWORD CheckSum;
- DWORD TimeDateStamp;
- CHAR FileName[MAX_PATH];
- BOOLEAN Reparse;
-} IMAGEHLP_DEFERRED_SYMBOL_LOAD,*PIMAGEHLP_DEFERRED_SYMBOL_LOAD;
-typedef struct _IMAGEHLP_DUPLICATE_SYMBOL {
- DWORD SizeOfStruct;
- DWORD NumberOfDups;
- PIMAGEHLP_SYMBOL Symbol;
- ULONG SelectedSymbol;
-} IMAGEHLP_DUPLICATE_SYMBOL,*PIMAGEHLP_DUPLICATE_SYMBOL;
-typedef PVOID DIGEST_HANDLE;
-typedef BOOL(WINAPI*DIGEST_FUNCTION)(DIGEST_HANDLE refdata,PBYTE pData,DWORD dwLength);
-
-PIMAGE_NT_HEADERS _IMAGEHLPAPI CheckSumMappedFile(LPVOID,DWORD,LPDWORD,LPDWORD);
-DWORD _IMAGEHLPAPI MapFileAndCheckSumA(LPSTR,LPDWORD,LPDWORD);
-DWORD _IMAGEHLPAPI MapFileAndCheckSumW(PWSTR,LPDWORD,LPDWORD);
-BOOL _IMAGEHLPAPI TouchFileTimes(HANDLE,LPSYSTEMTIME);
-BOOL _IMAGEHLPAPI SplitSymbols(LPSTR,LPSTR,LPSTR,DWORD);
-HANDLE _IMAGEHLPAPI FindDebugInfoFile(LPSTR,LPSTR,LPSTR);
-HANDLE _IMAGEHLPAPI FindExecutableImage(LPSTR,LPSTR,LPSTR);
-BOOL _IMAGEHLPAPI UpdateDebugInfoFile(LPSTR,LPSTR,LPSTR,PIMAGE_NT_HEADERS);
-BOOL _IMAGEHLPAPI UpdateDebugInfoFileEx(LPSTR,LPSTR,LPSTR,PIMAGE_NT_HEADERS,DWORD);
-BOOL _IMAGEHLPAPI BindImage(/*IN*/ LPSTR,/*IN*/ LPSTR,/*IN*/ LPSTR);
-BOOL _IMAGEHLPAPI BindImageEx(/*IN*/ DWORD,/*IN*/ LPSTR,/*IN*/ LPSTR,/*IN*/ LPSTR,/*IN*/ PIMAGEHLP_STATUS_ROUTINE);
-BOOL _IMAGEHLPAPI ReBaseImage(/*IN*/ LPSTR,/*IN*/ LPSTR,/*IN*/ BOOL,/*IN*/ BOOL,/*IN*/ BOOL,/*IN*/ ULONG,/*OUT*/ ULONG*,/*OUT*/ ULONG*,/*OUT*/ ULONG*,/*IN OUT*/ ULONG*,/*IN*/ ULONG);
-
-PLOADED_IMAGE _IMAGEHLPAPI ImageLoad(LPSTR,LPSTR);
-BOOL _IMAGEHLPAPI ImageUnload(PLOADED_IMAGE);
-PIMAGE_NT_HEADERS _IMAGEHLPAPI ImageNtHeader(/*IN*/ PVOID);
-PVOID _IMAGEHLPAPI ImageDirectoryEntryToData(/*IN*/ PVOID,/*IN*/ BOOLEAN,/*IN*/ USHORT,/*OUT*/ PULONG);
-PIMAGE_SECTION_HEADER _IMAGEHLPAPI ImageRvaToSection(/*IN*/ PIMAGE_NT_HEADERS,/*IN*/ PVOID,/*IN*/ ULONG);
-PVOID _IMAGEHLPAPI ImageRvaToVa(/*IN*/ PIMAGE_NT_HEADERS,/*IN*/ PVOID,/*IN*/ ULONG,/*IN OUT*/ PIMAGE_SECTION_HEADER*);
-BOOL _IMAGEHLPAPI MapAndLoad(LPSTR,LPSTR,PLOADED_IMAGE,BOOL,BOOL);
-BOOL _IMAGEHLPAPI GetImageConfigInformation(PLOADED_IMAGE,PIMAGE_LOAD_CONFIG_DIRECTORY);
-DWORD _IMAGEHLPAPI GetImageUnusedHeaderBytes(PLOADED_IMAGE,LPDWORD);
-BOOL _IMAGEHLPAPI SetImageConfigInformation(PLOADED_IMAGE,PIMAGE_LOAD_CONFIG_DIRECTORY);
-BOOL _IMAGEHLPAPI UnMapAndLoad(PLOADED_IMAGE);
-PIMAGE_DEBUG_INFORMATION _IMAGEHLPAPI MapDebugInformation(HANDLE,LPSTR,LPSTR,DWORD);
-BOOL _IMAGEHLPAPI UnmapDebugInformation(PIMAGE_DEBUG_INFORMATION);
-HANDLE _IMAGEHLPAPI FindExecutableImage(LPSTR,LPSTR,LPSTR);
-BOOL _IMAGEHLPAPI SearchTreeForFile(LPSTR,LPSTR,LPSTR);
-BOOL _IMAGEHLPAPI MakeSureDirectoryPathExists(LPCSTR);
-DWORD _IMAGEHLPAPI WINAPI UnDecorateSymbolName(LPCSTR,LPSTR,DWORD, DWORD);
-BOOL
-_IMAGEHLPAPI
-StackWalk(DWORD,HANDLE,HANDLE,LPSTACKFRAME,LPVOID,PREAD_PROCESS_MEMORY_ROUTINE,PFUNCTION_TABLE_ACCESS_ROUTINE,PGET_MODULE_BASE_ROUTINE,PTRANSLATE_ADDRESS_ROUTINE);
-LPAPI_VERSION _IMAGEHLPAPI ImagehlpApiVersion(VOID);
-LPAPI_VERSION _IMAGEHLPAPI ImagehlpApiVersionEx(LPAPI_VERSION);
-DWORD _IMAGEHLPAPI GetTimestampForLoadedLibrary(HMODULE);
-BOOL _IMAGEHLPAPI RemovePrivateCvSymbolic(PCHAR,PCHAR*,ULONG*);
-VOID _IMAGEHLPAPI RemoveRelocations(PCHAR);
-DWORD _IMAGEHLPAPI SymSetOptions(/*IN*/ DWORD);
-DWORD _IMAGEHLPAPI SymGetOptions(VOID);
-BOOL _IMAGEHLPAPI SymCleanup(/*IN*/ HANDLE);
-BOOL _IMAGEHLPAPI SymEnumerateModules(/*IN*/ HANDLE,/*IN*/ PSYM_ENUMMODULES_CALLBACK,/*IN*/ PVOID);
-BOOL _IMAGEHLPAPI SymEnumerateSymbols(/*IN*/ HANDLE,/*IN*/ DWORD,/*IN*/ PSYM_ENUMSYMBOLS_CALLBACK,/*IN*/ PVOID);
-BOOL _IMAGEHLPAPI EnumerateLoadedModules(/*IN*/ HANDLE,/*IN*/ PENUMLOADED_MODULES_CALLBACK,/*IN*/ PVOID);
-LPVOID _IMAGEHLPAPI SymFunctionTableAccess(HANDLE,DWORD);
-BOOL _IMAGEHLPAPI SymGetModuleInfo(/*IN*/ HANDLE,/*IN*/ DWORD,/*OUT*/ PIMAGEHLP_MODULE);
-DWORD _IMAGEHLPAPI SymGetModuleBase(/*IN*/ HANDLE,/*IN*/ DWORD);
-BOOL _IMAGEHLPAPI SymGetSymFromAddr(/*IN*/ HANDLE,/*IN*/ DWORD,/*OUT*/ PDWORD,/*OUT*/ PIMAGEHLP_SYMBOL);
-BOOL _IMAGEHLPAPI SymGetSymFromName(/*IN*/ HANDLE,/*IN*/ LPSTR,/*OUT*/ PIMAGEHLP_SYMBOL);
-BOOL _IMAGEHLPAPI SymGetSymNext(/*IN*/ HANDLE,/*IN OUT*/ PIMAGEHLP_SYMBOL);
-BOOL _IMAGEHLPAPI SymGetSymPrev(/*IN*/ HANDLE,/*IN OUT*/ PIMAGEHLP_SYMBOL);
-BOOL _IMAGEHLPAPI SymGetLineFromAddr(/*IN*/ HANDLE,/*IN*/ DWORD,/*OUT*/ PDWORD,/*OUT*/ PIMAGEHLP_LINE);
-BOOL _IMAGEHLPAPI SymGetLineFromName(/*IN*/ HANDLE,/*IN*/ LPSTR,/*IN*/ LPSTR,/*IN*/ DWORD,/*OUT*/ PLONG,/*IN OUT*/ PIMAGEHLP_LINE);
-BOOL _IMAGEHLPAPI SymGetLineNext(/*IN*/ HANDLE,/*IN OUT*/ PIMAGEHLP_LINE);
-BOOL _IMAGEHLPAPI SymGetLinePrev(/*IN*/ HANDLE,/*IN OUT*/ PIMAGEHLP_LINE);
-BOOL _IMAGEHLPAPI SymMatchFileName(/*IN*/ LPSTR,/*IN*/ LPSTR,/*OUT*/ LPSTR*,/*OUT*/ LPSTR*);
-BOOL _IMAGEHLPAPI SymInitialize(/*IN*/ HANDLE,/*IN*/ LPSTR,/*IN*/ BOOL);
-BOOL _IMAGEHLPAPI SymGetSearchPath(/*IN*/ HANDLE,/*OUT*/ LPSTR,/*IN*/ DWORD);
-BOOL _IMAGEHLPAPI SymSetSearchPath(/*IN*/ HANDLE,/*IN*/ LPSTR);
-BOOL _IMAGEHLPAPI SymLoadModule(/*IN*/ HANDLE,/*IN*/ HANDLE,/*IN*/ PSTR,/*IN*/ PSTR,/*IN*/ DWORD,/*IN*/ DWORD);
-BOOL _IMAGEHLPAPI SymUnloadModule(/*IN*/ HANDLE,/*IN*/ DWORD);
-BOOL _IMAGEHLPAPI SymUnDName(/*IN*/ PIMAGEHLP_SYMBOL,/*OUT*/ LPSTR,/*IN*/ DWORD);
-BOOL _IMAGEHLPAPI SymRegisterCallback(/*IN*/ HANDLE,/*IN*/ PSYMBOL_REGISTERED_CALLBACK,/*IN*/ PVOID);
-BOOL _IMAGEHLPAPI ImageGetDigestStream(/*IN*/ HANDLE,/*IN*/ DWORD,/*IN*/ DIGEST_FUNCTION,/*IN*/ DIGEST_HANDLE);
-BOOL _IMAGEHLPAPI ImageAddCertificate(/*IN*/ HANDLE,/*IN*/ LPWIN_CERTIFICATE,/*OUT*/ PDWORD);
-BOOL _IMAGEHLPAPI ImageRemoveCertificate(/*IN*/ HANDLE,/*IN*/ DWORD);
-BOOL _IMAGEHLPAPI ImageEnumerateCertificates(/*IN*/ HANDLE,/*IN*/ WORD,/*OUT*/ PDWORD,/*IN OUT*/ PDWORD /*OPTIONAL*/,/*IN OUT*/ DWORD /*OPTIONAL*/);
-BOOL _IMAGEHLPAPI ImageGetCertificateData(/*IN*/ HANDLE,/*IN*/ DWORD,/*OUT*/ LPWIN_CERTIFICATE,/*IN OUT*/ PDWORD);
-BOOL _IMAGEHLPAPI ImageGetCertificateHeader(/*IN*/ HANDLE,/*IN*/ DWORD,/*IN OUT*/ LPWIN_CERTIFICATE);
-BOOL _IMAGEHLPAPI CopyPdb(CHAR const*,CHAR const*,BOOL);
-BOOL _IMAGEHLPAPI RemovePrivateCvSymbolicEx(PCHAR,ULONG,PCHAR*,ULONG*);
-
-#endif /* RC_INVOKED */
-
-#ifdef UNICODE
-#define MapFileAndCheckSum MapFileAndCheckSumW
-#else
-#define MapFileAndCheckSum MapFileAndCheckSumA
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _IMAGEHLP_H */
-
diff --git a/winsup/w32api/include/imm.h b/winsup/w32api/include/imm.h
deleted file mode 100644
index 4fb6905..0000000
--- a/winsup/w32api/include/imm.h
+++ /dev/null
@@ -1,452 +0,0 @@
-#ifndef _IMM_H
-#define _IMM_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define WM_CONVERTREQUESTEX 0x108
-#define WM_IME_STARTCOMPOSITION 0x10D
-#define WM_IME_ENDCOMPOSITION 0x10E
-#define WM_IME_COMPOSITION 0x10F
-#define WM_IME_KEYLAST 0x10F
-#define WM_IME_SETCONTEXT 0x281
-#define WM_IME_NOTIFY 0x282
-#define WM_IME_CONTROL 0x283
-#define WM_IME_COMPOSITIONFULL 0x284
-#define WM_IME_SELECT 0x285
-#define WM_IME_CHAR 0x286
-#define WM_IME_KEYDOWN 0x290
-#define WM_IME_KEYUP 0x291
-#if (_WIN32_WINNT >= 0x0500)
-#define WM_IME_REQUEST 0x0288
-#endif
-#define IMC_GETCANDIDATEPOS 7
-#define IMC_SETCANDIDATEPOS 8
-#define IMC_GETCOMPOSITIONFONT 9
-#define IMC_SETCOMPOSITIONFONT 10
-#define IMC_GETCOMPOSITIONWINDOW 11
-#define IMC_SETCOMPOSITIONWINDOW 12
-#define IMC_GETSTATUSWINDOWPOS 15
-#define IMC_SETSTATUSWINDOWPOS 16
-#define IMC_CLOSESTATUSWINDOW 0x21
-#define IMC_OPENSTATUSWINDOW 0x22
-#define IMN_CLOSESTATUSWINDOW 1
-#define IMN_OPENSTATUSWINDOW 2
-#define IMN_CHANGECANDIDATE 3
-#define IMN_CLOSECANDIDATE 4
-#define IMN_OPENCANDIDATE 5
-#define IMN_SETCONVERSIONMODE 6
-#define IMN_SETSENTENCEMODE 7
-#define IMN_SETOPENSTATUS 8
-#define IMN_SETCANDIDATEPOS 9
-#define IMN_SETCOMPOSITIONFONT 10
-#define IMN_SETCOMPOSITIONWINDOW 11
-#define IMN_SETSTATUSWINDOWPOS 12
-#define IMN_GUIDELINE 13
-#define IMN_PRIVATE 14
-#define NI_OPENCANDIDATE 16
-#define NI_CLOSECANDIDATE 17
-#define NI_SELECTCANDIDATESTR 18
-#define NI_CHANGECANDIDATELIST 19
-#define NI_FINALIZECONVERSIONRESULT 20
-#define NI_COMPOSITIONSTR 21
-#define NI_SETCANDIDATE_PAGESTART 22
-#define NI_SETCANDIDATE_PAGESIZE 23
-#define NI_IMEMENUSELECTED 24
-#define ISC_SHOWUICANDIDATEWINDOW 1
-#define ISC_SHOWUICOMPOSITIONWINDOW 0x80000000
-#define ISC_SHOWUIGUIDELINE 0x40000000
-#define ISC_SHOWUIALLCANDIDATEWINDOW 15
-#define ISC_SHOWUIALL 0xC000000F
-#define CPS_COMPLETE 1
-#define CPS_CONVERT 2
-#define CPS_REVERT 3
-#define CPS_CANCEL 4
-#define IME_CHOTKEY_IME_NONIME_TOGGLE 16
-#define IME_CHOTKEY_SHAPE_TOGGLE 17
-#define IME_CHOTKEY_SYMBOL_TOGGLE 18
-#define IME_JHOTKEY_CLOSE_OPEN 0x30
-#define IME_KHOTKEY_SHAPE_TOGGLE 0x50
-#define IME_KHOTKEY_HANJACONVERT 0x51
-#define IME_KHOTKEY_ENGLISH 0x52
-#define IME_THOTKEY_IME_NONIME_TOGGLE 0x70
-#define IME_THOTKEY_SHAPE_TOGGLE 0x71
-#define IME_THOTKEY_SYMBOL_TOGGLE 0x72
-#define IME_HOTKEY_DSWITCH_FIRST 256
-#define IME_HOTKEY_DSWITCH_LAST 0x11F
-#define IME_ITHOTKEY_RESEND_RESULTSTR 512
-#define IME_ITHOTKEY_PREVIOUS_COMPOSITION 513
-#define IME_ITHOTKEY_UISTYLE_TOGGLE 514
-#define GCS_COMPREADSTR 1
-#define GCS_COMPREADATTR 2
-#define GCS_COMPREADCLAUSE 4
-#define GCS_COMPSTR 8
-#define GCS_COMPATTR 16
-#define GCS_COMPCLAUSE 32
-#define GCS_CURSORPOS 128
-#define GCS_DELTASTART 256
-#define GCS_RESULTREADSTR 512
-#define GCS_RESULTREADCLAUSE 1024
-#define GCS_RESULTSTR 2048
-#define GCS_RESULTCLAUSE 4096
-#define CS_INSERTCHAR 0x2000
-#define CS_NOMOVECARET 0x4000
-#define IMEVER_0310 0x3000A
-#define IMEVER_0400 0x40000
-#define IME_PROP_AT_CARET 0x10000
-#define IME_PROP_SPECIAL_UI 0x20000
-#define IME_PROP_CANDLIST_START_FROM_1 0x40000
-#define IME_PROP_UNICODE 0x80000
-#define UI_CAP_2700 1
-#define UI_CAP_ROT90 2
-#define UI_CAP_ROTANY 4
-#define SCS_CAP_COMPSTR 1
-#define SCS_CAP_MAKEREAD 2
-#define SELECT_CAP_CONVERSION 1
-#define SELECT_CAP_SENTENCE 2
-#define GGL_LEVEL 1
-#define GGL_INDEX 2
-#define GGL_STRING 3
-#define GGL_PRIVATE 4
-#define GL_LEVEL_NOGUIDELINE 0
-#define GL_LEVEL_FATAL 1
-#define GL_LEVEL_ERROR 2
-#define GL_LEVEL_WARNING 3
-#define GL_LEVEL_INFORMATION 4
-#define GL_ID_UNKNOWN 0
-#define GL_ID_NOMODULE 1
-#define GL_ID_NODICTIONARY 16
-#define GL_ID_CANNOTSAVE 17
-#define GL_ID_NOCONVERT 32
-#define GL_ID_TYPINGERROR 33
-#define GL_ID_TOOMANYSTROKE 34
-#define GL_ID_READINGCONFLICT 35
-#define GL_ID_INPUTREADING 36
-#define GL_ID_INPUTRADICAL 37
-#define GL_ID_INPUTCODE 38
-#define GL_ID_INPUTSYMBOL 39
-#define GL_ID_CHOOSECANDIDATE 40
-#define GL_ID_REVERSECONVERSION 41
-#define GL_ID_PRIVATE_FIRST 0x8000
-#define GL_ID_PRIVATE_LAST 0xFFFF
-#define IGP_GETIMEVERSION (DWORD)(-4)
-#define IGP_PROPERTY 4
-#define IGP_CONVERSION 8
-#define IGP_SENTENCE 12
-#define IGP_UI 16
-#define IGP_SETCOMPSTR 0x14
-#define IGP_SELECT 0x18
-#define SCS_SETSTR (GCS_COMPREADSTR|GCS_COMPSTR)
-#define SCS_CHANGEATTR (GCS_COMPREADATTR|GCS_COMPATTR)
-#define SCS_CHANGECLAUSE (GCS_COMPREADCLAUSE|GCS_COMPCLAUSE)
-#define ATTR_INPUT 0
-#define ATTR_TARGET_CONVERTED 1
-#define ATTR_CONVERTED 2
-#define ATTR_TARGET_NOTCONVERTED 3
-#define ATTR_INPUT_ERROR 4
-#define ATTR_FIXEDCONVERTED 5
-#define CFS_DEFAULT 0
-#define CFS_RECT 1
-#define CFS_POINT 2
-#define CFS_SCREEN 4
-#define CFS_FORCE_POSITION 32
-#define CFS_CANDIDATEPOS 64
-#define CFS_EXCLUDE 128
-#define GCL_CONVERSION 1
-#define GCL_REVERSECONVERSION 2
-#define GCL_REVERSE_LENGTH 3
-#define IME_CMODE_ALPHANUMERIC 0
-#define IME_CMODE_NATIVE 1
-#define IME_CMODE_CHINESE IME_CMODE_NATIVE
-#define IME_CMODE_HANGEUL IME_CMODE_NATIVE
-#define IME_CMODE_HANGUL IME_CMODE_NATIVE
-#define IME_CMODE_JAPANESE IME_CMODE_NATIVE
-#define IME_CMODE_KATAKANA 2
-#define IME_CMODE_LANGUAGE 3
-#define IME_CMODE_FULLSHAPE 8
-#define IME_CMODE_ROMAN 16
-#define IME_CMODE_CHARCODE 32
-#define IME_CMODE_HANJACONVERT 64
-#define IME_CMODE_SOFTKBD 128
-#define IME_CMODE_NOCONVERSION 256
-#define IME_CMODE_EUDC 512
-#define IME_CMODE_SYMBOL 1024
-#define IME_CMODE_FIXED 2048
-#define IME_SMODE_NONE 0
-#define IME_SMODE_PLAURALCLAUSE 1
-#define IME_SMODE_SINGLECONVERT 2
-#define IME_SMODE_AUTOMATIC 4
-#define IME_SMODE_PHRASEPREDICT 8
-#define IME_CAND_UNKNOWN 0
-#define IME_CAND_READ 1
-#define IME_CAND_CODE 2
-#define IME_CAND_MEANING 3
-#define IME_CAND_RADICAL 4
-#define IME_CAND_STROKE 5
-#define IMM_ERROR_NODATA (-1)
-#define IMM_ERROR_GENERAL (-2)
-#define IME_CONFIG_GENERAL 1
-#define IME_CONFIG_REGISTERWORD 2
-#define IME_CONFIG_SELECTDICTIONARY 3
-#define IME_ESC_QUERY_SUPPORT 3
-#define IME_ESC_RESERVED_FIRST 4
-#define IME_ESC_RESERVED_LAST 0x7FF
-#define IME_ESC_PRIVATE_FIRST 0x800
-#define IME_ESC_PRIVATE_LAST 0xFFF
-#define IME_ESC_SEQUENCE_TO_INTERNAL 0x1001
-#define IME_ESC_GET_EUDC_DICTIONARY 0x1003
-#define IME_ESC_SET_EUDC_DICTIONARY 0x1004
-#define IME_ESC_MAX_KEY 0x1005
-#define IME_ESC_IME_NAME 0x1006
-#define IME_ESC_SYNC_HOTKEY 0x1007
-#define IME_ESC_HANJA_MODE 0x1008
-#define IME_ESC_AUTOMATA 0x1009
-#define IME_REGWORD_STYLE_EUDC 1
-#define IME_REGWORD_STYLE_USER_FIRST 0x80000000
-#define IME_REGWORD_STYLE_USER_LAST 0xFFFFFFFF
-#define IMR_RECONVERTSTRING 4
-#define IMR_QUERYCHARPOSITION 6
-#define SOFTKEYBOARD_TYPE_T1 1
-#define SOFTKEYBOARD_TYPE_C1 2
-#define IMEMENUITEM_STRING_SIZE 80
-#define MOD_ALT 1
-#define MOD_CONTROL 2
-#define MOD_SHIFT 4
-#define MOD_WIN 8
-#define MOD_IGNORE_ALL_MODIFIER 1024
-#define MOD_ON_KEYUP 2048
-#define MOD_RIGHT 16384
-#define MOD_LEFT 32768
-#define IACE_CHILDREN 1
-#define IACE_DEFAULT 16
-#define IACE_IGNORENOCONTEXT 32
-#define IGIMIF_RIGHTMENU 1
-#define IGIMII_CMODE 1
-#define IGIMII_SMODE 2
-#define IGIMII_CONFIGURE 4
-#define IGIMII_TOOLS 8
-#define IGIMII_HELP 16
-#define IGIMII_OTHER 32
-#define IGIMII_INPUTTOOLS 64
-#define IMFT_RADIOCHECK 1
-#define IMFT_SEPARATOR 2
-#define IMFT_SUBMENU 4
-#define IMFS_GRAYED MFS_GRAYED
-#define IMFS_DISABLED MFS_DISABLED
-#define IMFS_CHECKED MFS_CHECKED
-#define IMFS_HILITE MFS_HILITE
-#define IMFS_ENABLED MFS_ENABLED
-#define IMFS_UNCHECKED MFS_UNCHECKED
-#define IMFS_UNHILITE MFS_UNHILITE
-#define IMFS_DEFAULT MFS_DEFAULT
-#ifndef VK_PROCESSKEY
-#define VK_PROCESSKEY 0x0E5
-#endif
-#define STYLE_DESCRIPTION_SIZE 32
-typedef DWORD HIMC;
-typedef DWORD HIMCC;
-typedef HKL *LPHKL;
-typedef struct tagCOMPOSITIONFORM {
- DWORD dwStyle;
- POINT ptCurrentPos;
- RECT rcArea;
-} COMPOSITIONFORM,*PCOMPOSITIONFORM,*LPCOMPOSITIONFORM;
-typedef struct tagCANDIDATEFORM {
- DWORD dwIndex;
- DWORD dwStyle;
- POINT ptCurrentPos;
- RECT rcArea;
-} CANDIDATEFORM,*PCANDIDATEFORM,*LPCANDIDATEFORM;
-typedef struct tagCANDIDATELIST {
- DWORD dwSize;
- DWORD dwStyle;
- DWORD dwCount;
- DWORD dwSelection;
- DWORD dwPageStart;
- DWORD dwPageSize;
- DWORD dwOffset[1];
-} CANDIDATELIST,*PCANDIDATELIST,*LPCANDIDATELIST;
-typedef struct tagIMECHARPOSITION {
- DWORD dwSize;
- DWORD dwCharPos;
- POINT pt;
- UINT cLineHeight;
- RECT rcDocument;
-} IMECHARPOSITION, *PIMECHARPOSITION;
-typedef struct tagRECONVERTSTRING {
- DWORD dwSize;
- DWORD dwVersion;
- DWORD dwStrLen;
- DWORD dwStrOffset;
- DWORD dwCompStrLen;
- DWORD dwCompStrOffset;
- DWORD dwTargetStrLen;
- DWORD dwTargetStrOffset;
-} RECONVERTSTRING, *PRECONVERTSTRING;
-typedef struct tagREGISTERWORDA {
- LPSTR lpReading;
- LPSTR lpWord;
-} REGISTERWORDA,*PREGISTERWORDA,*LPREGISTERWORDA;
-typedef struct tagREGISTERWORDW {
- LPWSTR lpReading;
- LPWSTR lpWord;
-} REGISTERWORDW,*PREGISTERWORDW,*LPREGISTERWORDW;
-typedef struct tagSTYLEBUFA {
- DWORD dwStyle;
- CHAR szDescription[STYLE_DESCRIPTION_SIZE];
-} STYLEBUFA,*PSTYLEBUFA,*LPSTYLEBUFA;
-typedef struct tagSTYLEBUFW {
- DWORD dwStyle;
- WCHAR szDescription[STYLE_DESCRIPTION_SIZE];
-} STYLEBUFW,*PSTYLEBUFW,*LPSTYLEBUFW;
-typedef struct tagIMEMENUITEMINFOA {
- UINT cbSize;
- UINT fType;
- UINT fState;
- UINT wID;
- HBITMAP hbmpChecked;
- HBITMAP hbmpUnchecked;
- DWORD dwItemData;
- CHAR szString[IMEMENUITEM_STRING_SIZE];
- HBITMAP hbmpItem;
-} IMEMENUITEMINFOA,*PIMEMENUITEMINFOA,*LPIMEMENUITEMINFOA;
-typedef struct tagIMEMENUITEMINFOW {
- UINT cbSize;
- UINT fType;
- UINT fState;
- UINT wID;
- HBITMAP hbmpChecked;
- HBITMAP hbmpUnchecked;
- DWORD dwItemData;
- WCHAR szString[IMEMENUITEM_STRING_SIZE];
- HBITMAP hbmpItem;
-} IMEMENUITEMINFOW,*PIMEMENUITEMINFOW,*LPIMEMENUITEMINFOW;
-typedef int (CALLBACK *REGISTERWORDENUMPROCA)(LPCSTR, DWORD, LPCSTR, LPVOID);
-typedef int (CALLBACK *REGISTERWORDENUMPROCW)(LPCWSTR, DWORD, LPCWSTR, LPVOID);
-#ifdef UNICODE
-#define REGISTERWORDENUMPROC REGISTERWORDENUMPROCW
-typedef REGISTERWORDW REGISTERWORD,*PREGISTERWORD,*LPREGISTERWORD;
-typedef STYLEBUFW STYLEBUF,*PSTYLEBUF,*LPSTYLEBUF;
-typedef IMEMENUITEMINFOW IMEMENUITEMINFO,*PIMEMENUITEMINFO,*LPIMEMENUITEMINFO;
-#else
-#define REGISTERWORDENUMPROC REGISTERWORDENUMPROCA
-typedef REGISTERWORDA REGISTERWORD,*PREGISTERWORD,*LPREGISTERWORD;
-typedef STYLEBUFA STYLEBUF,*PSTYLEBUF,*LPSTYLEBUF;
-typedef IMEMENUITEMINFOA IMEMENUITEMINFO,*PIMEMENUITEMINFO,*LPIMEMENUITEMINFO;
-#endif
-HKL WINAPI ImmInstallIMEA(LPCSTR,LPCSTR);
-HKL WINAPI ImmInstallIMEW(LPCWSTR,LPCWSTR);
-HWND WINAPI ImmGetDefaultIMEWnd(HWND);
-UINT WINAPI ImmGetDescriptionA(HKL,LPSTR,UINT);
-UINT WINAPI ImmGetDescriptionW(HKL,LPWSTR,UINT);
-UINT WINAPI ImmGetIMEFileNameA(HKL,LPSTR,UINT);
-UINT WINAPI ImmGetIMEFileNameW(HKL,LPWSTR,UINT);
-DWORD WINAPI ImmGetProperty(HKL,DWORD);
-BOOL WINAPI ImmIsIME(HKL);
-BOOL WINAPI ImmSimulateHotKey(HWND,DWORD);
-HIMC WINAPI ImmCreateContext(void);
-BOOL WINAPI ImmDestroyContext(HIMC);
-HIMC WINAPI ImmGetContext(HWND);
-BOOL WINAPI ImmReleaseContext(HWND,HIMC);
-HIMC WINAPI ImmAssociateContext(HWND,HIMC);
-LONG WINAPI ImmGetCompositionStringA(HIMC,DWORD,PVOID,DWORD);
-LONG WINAPI ImmGetCompositionStringW(HIMC,DWORD,PVOID,DWORD);
-BOOL WINAPI ImmSetCompositionStringA(HIMC,DWORD,PCVOID,DWORD,PCVOID,DWORD);
-BOOL WINAPI ImmSetCompositionStringW(HIMC,DWORD,PCVOID,DWORD,PCVOID,DWORD);
-DWORD WINAPI ImmGetCandidateListCountA(HIMC,PDWORD);
-DWORD WINAPI ImmGetCandidateListCountW(HIMC,PDWORD);
-DWORD WINAPI ImmGetCandidateListA(HIMC,DWORD,PCANDIDATELIST,DWORD);
-DWORD WINAPI ImmGetCandidateListW(HIMC,DWORD,PCANDIDATELIST,DWORD);
-DWORD WINAPI ImmGetGuideLineA(HIMC,DWORD,LPSTR,DWORD);
-DWORD WINAPI ImmGetGuideLineW(HIMC,DWORD,LPWSTR,DWORD);
-BOOL WINAPI ImmGetConversionStatus(HIMC,LPDWORD,PDWORD);
-BOOL WINAPI ImmSetConversionStatus(HIMC,DWORD,DWORD);
-BOOL WINAPI ImmGetOpenStatus(HIMC);
-BOOL WINAPI ImmSetOpenStatus(HIMC,BOOL);
-#ifndef NOGDI
-BOOL WINAPI ImmGetCompositionFontA(HIMC,LPLOGFONTA);
-BOOL WINAPI ImmGetCompositionFontW(HIMC,LPLOGFONTW);
-BOOL WINAPI ImmSetCompositionFontA(HIMC,LPLOGFONTA);
-BOOL WINAPI ImmSetCompositionFontW(HIMC,LPLOGFONTW);
-#endif
-BOOL WINAPI ImmConfigureIMEA(HKL,HWND,DWORD,PVOID);
-BOOL WINAPI ImmConfigureIMEW(HKL,HWND,DWORD,PVOID);
-LRESULT WINAPI ImmEscapeA(HKL,HIMC,UINT,PVOID);
-LRESULT WINAPI ImmEscapeW(HKL,HIMC,UINT,PVOID);
-DWORD WINAPI ImmGetConversionListA(HKL,HIMC,LPCSTR,PCANDIDATELIST,DWORD,UINT);
-DWORD WINAPI ImmGetConversionListW(HKL,HIMC,LPCWSTR,PCANDIDATELIST,DWORD,UINT);
-BOOL WINAPI ImmNotifyIME(HIMC,DWORD,DWORD,DWORD);
-BOOL WINAPI ImmGetStatusWindowPos(HIMC,LPPOINT);
-BOOL WINAPI ImmSetStatusWindowPos(HIMC,LPPOINT);
-BOOL WINAPI ImmGetCompositionWindow(HIMC,PCOMPOSITIONFORM);
-BOOL WINAPI ImmSetCompositionWindow(HIMC,PCOMPOSITIONFORM);
-BOOL WINAPI ImmGetCandidateWindow(HIMC,DWORD,PCANDIDATEFORM);
-BOOL WINAPI ImmSetCandidateWindow(HIMC,PCANDIDATEFORM);
-BOOL WINAPI ImmIsUIMessageA(HWND,UINT,WPARAM,LPARAM);
-BOOL WINAPI ImmIsUIMessageW(HWND,UINT,WPARAM,LPARAM);
-UINT WINAPI ImmGetVirtualKey(HWND);
-BOOL WINAPI ImmRegisterWordA(HKL,LPCSTR,DWORD,LPCSTR);
-BOOL WINAPI ImmRegisterWordW(HKL,LPCWSTR,DWORD,LPCWSTR);
-BOOL WINAPI ImmUnregisterWordA(HKL,LPCSTR,DWORD,LPCSTR);
-BOOL WINAPI ImmUnregisterWordW(HKL,LPCWSTR,DWORD,LPCWSTR);
-UINT WINAPI ImmGetRegisterWordStyleA(HKL,UINT,PSTYLEBUFA);
-UINT WINAPI ImmGetRegisterWordStyleW(HKL,UINT,PSTYLEBUFW);
-UINT WINAPI ImmEnumRegisterWordA(HKL,REGISTERWORDENUMPROCA,LPCSTR,DWORD,LPCSTR,PVOID);
-UINT WINAPI ImmEnumRegisterWordW(HKL,REGISTERWORDENUMPROCW,LPCWSTR,DWORD,LPCWSTR,PVOID);
-BOOL WINAPI EnableEUDC(BOOL);
-BOOL WINAPI ImmDisableIME(DWORD);
-DWORD WINAPI ImmGetImeMenuItemsA(HIMC,DWORD,DWORD,LPIMEMENUITEMINFOA,LPIMEMENUITEMINFOA,DWORD);
-DWORD WINAPI ImmGetImeMenuItemsW(HIMC,DWORD,DWORD,LPIMEMENUITEMINFOW,LPIMEMENUITEMINFOW,DWORD);
-
-#ifdef UNICODE
-#define ImmEnumRegisterWord ImmEnumRegisterWordW
-#define ImmGetRegisterWordStyle ImmGetRegisterWordStyleW
-#define ImmUnregisterWord ImmUnregisterWordW
-#define ImmRegisterWord ImmRegisterWordW
-#define ImmInstallIME ImmInstallIMEW
-#define ImmIsUIMessage ImmIsUIMessageW
-#define ImmGetConversionList ImmGetConversionListW
-#define ImmEscape ImmEscapeW
-#define ImmConfigureIME ImmConfigureIMEW
-#ifndef NOGDI
-#define ImmSetCompositionFont ImmSetCompositionFontW
-#define ImmGetCompositionFont ImmGetCompositionFontW
-#endif
-#define ImmGetGuideLine ImmGetGuideLineW
-#define ImmGetCandidateList ImmGetCandidateListW
-#define ImmGetCandidateListCount ImmGetCandidateListCountW
-#define ImmSetCompositionString ImmSetCompositionStringW
-#define ImmGetCompositionString ImmGetCompositionStringW
-#define ImmGetDescription ImmGetDescriptionW
-#define ImmGetIMEFileName ImmGetIMEFileNameW
-#define ImmGetImeMenuItems ImmGetImeMenuItemsW
-#else
-#define ImmEnumRegisterWord ImmEnumRegisterWordA
-#define ImmGetRegisterWordStyle ImmGetRegisterWordStyleA
-#define ImmUnregisterWord ImmUnregisterWordA
-#define ImmRegisterWord ImmRegisterWordA
-#define ImmInstallIME ImmInstallIMEA
-#define ImmIsUIMessage ImmIsUIMessageA
-#define ImmGetConversionList ImmGetConversionListA
-#define ImmEscape ImmEscapeA
-#define ImmConfigureIME ImmConfigureIMEA
-#ifndef NOGDI
-#define ImmSetCompositionFont ImmSetCompositionFontA
-#define ImmGetCompositionFont ImmGetCompositionFontA
-#endif
-#define ImmGetGuideLine ImmGetGuideLineA
-#define ImmGetCandidateList ImmGetCandidateListA
-#define ImmGetCandidateListCount ImmGetCandidateListCountA
-#define ImmSetCompositionString ImmSetCompositionStringA
-#define ImmGetCompositionString ImmGetCompositionStringA
-#define ImmGetDescription ImmGetDescriptionA
-#define ImmGetIMEFileName ImmGetIMEFileNameA
-#define ImmGetImeMenuItems ImmGetImeMenuItemsW
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/initguid.h b/winsup/w32api/include/initguid.h
deleted file mode 100644
index b024c70..0000000
--- a/winsup/w32api/include/initguid.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _INITGUID_H
-#define _INITGUID_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifndef DEFINE_GUID
-#include <basetyps.h>
-#endif
-#undef DEFINE_GUID
-#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) GUID_EXT const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
-#endif
diff --git a/winsup/w32api/include/intshcut.h b/winsup/w32api/include/intshcut.h
deleted file mode 100644
index 9742ff9..0000000
--- a/winsup/w32api/include/intshcut.h
+++ /dev/null
@@ -1,82 +0,0 @@
-#ifndef _INTSHCUT_H
-#define _INTSHCUT_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#include <isguids.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define INTSHCUTAPI DECLSPEC_IMPORT
-#define E_FLAGS MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x1000)
-#define IS_E_EXEC_FAILED MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x2002)
-#define URL_E_INVALID_SYNTAX MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x1001)
-#define URL_E_UNREGISTERED_PROTOCOL MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x1002)
-typedef enum iurl_seturl_flags {
- IURL_SETURL_FL_GUESS_PROTOCOL=1,
- IURL_SETURL_FL_USE_DEFAULT_PROTOCOL,
- ALL_IURL_SETURL_FLAGS=(IURL_SETURL_FL_GUESS_PROTOCOL|IURL_SETURL_FL_USE_DEFAULT_PROTOCOL)
-} IURL_SETURL_FLAGS;
-typedef enum iurl_invokecommand_flags {
- IURL_INVOKECOMMAND_FL_ALLOW_UI=1,
- IURL_INVOKECOMMAND_FL_USE_DEFAULT_VERB,
- ALL_IURL_INVOKECOMMAND_FLAGS=(IURL_INVOKECOMMAND_FL_ALLOW_UI|IURL_INVOKECOMMAND_FL_USE_DEFAULT_VERB)
-} IURL_INVOKECOMMAND_FLAGS;
-typedef enum translateurl_in_flags {
- TRANSLATEURL_FL_GUESS_PROTOCOL=1,
- TRANSLATEURL_FL_USE_DEFAULT_PROTOCOL,
- ALL_TRANSLATEURL_FLAGS=(TRANSLATEURL_FL_GUESS_PROTOCOL|TRANSLATEURL_FL_USE_DEFAULT_PROTOCOL)
-} TRANSLATEURL_IN_FLAGS;
-typedef enum urlassociationdialog_in_flags {
- URLASSOCDLG_FL_USE_DEFAULT_NAME=1,
- URLASSOCDLG_FL_REGISTER_ASSOC,
- ALL_URLASSOCDLG_FLAGS=(URLASSOCDLG_FL_USE_DEFAULT_NAME|URLASSOCDLG_FL_REGISTER_ASSOC)
-} URLASSOCIATIONDIALOG_IN_FLAGS;
-typedef enum mimeassociationdialog_in_flags {
- MIMEASSOCDLG_FL_REGISTER_ASSOC=1,
- ALL_MIMEASSOCDLG_FLAGS=MIMEASSOCDLG_FL_REGISTER_ASSOC
-} MIMEASSOCIATIONDIALOG_IN_FLAGS;
-typedef struct urlinvokecommandinfo {
- DWORD dwcbSize;
- DWORD dwFlags;
- HWND hwndParent;
- PCSTR pcszVerb;
-} URLINVOKECOMMANDINFO,*PURLINVOKECOMMANDINFO;
-typedef const URLINVOKECOMMANDINFO CURLINVOKECOMMANDINFO;
-typedef const URLINVOKECOMMANDINFO *PCURLINVOKECOMMANDINFO;
-#define INTERFACE IUniformResourceLocator
-DECLARE_INTERFACE_(IUniformResourceLocator,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(SetURL)(THIS_ PCSTR,DWORD) PURE;
- STDMETHOD(GetURL)(THIS_ PSTR*) PURE;
- STDMETHOD(InvokeCommand)(THIS_ PURLINVOKECOMMANDINFO) PURE;
-};
-#undef INTERFACE
-typedef IUniformResourceLocator *PIUniformResourceLocator;
-typedef const IUniformResourceLocator CIUniformResourceLocator;
-typedef const IUniformResourceLocator *PCIUniformResourceLocator;
-
-BOOL WINAPI InetIsOffline(DWORD);
-HRESULT WINAPI MIMEAssociationDialogA(HWND,DWORD,PCSTR,PCSTR,PSTR,UINT);
-HRESULT WINAPI MIMEAssociationDialogW(HWND,DWORD,PCWSTR,PCWSTR,PWSTR,UINT);
-HRESULT WINAPI TranslateURLA(PCSTR,DWORD,PSTR*);
-HRESULT WINAPI TranslateURLW(PCWSTR,DWORD,PWSTR*);
-HRESULT WINAPI URLAssociationDialogA(HWND,DWORD,PCSTR,PCSTR,PSTR,UINT);
-HRESULT WINAPI URLAssociationDialogW(HWND,DWORD,PCWSTR,PCWSTR,PWSTR,UINT);
-#ifdef UNICODE
-#define TranslateURL TranslateURLW
-#define MIMEAssociationDialog MIMEAssociationDialogW
-#define URLAssociationDialog URLAssociationDialogW
-#else
-#define TranslateURL TranslateURLA
-#define MIMEAssociationDialog MIMEAssociationDialogA
-#define URLAssociationDialog URLAssociationDialogA
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/ipexport.h b/winsup/w32api/include/ipexport.h
deleted file mode 100644
index 3fbf4ee..0000000
--- a/winsup/w32api/include/ipexport.h
+++ /dev/null
@@ -1,88 +0,0 @@
-#ifndef _IPEXPORT_H
-#define _IPEXPORT_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifndef ANY_SIZE
-#define ANY_SIZE 1
-#endif
-#define MAX_ADAPTER_NAME 128
-/* IP STATUS flags */
-#define IP_STATUS_BASE 11000
-#define IP_SUCCESS 0
-#define IP_BUF_TOO_SMALL (IP_STATUS_BASE + 1)
-#define IP_DEST_NET_UNREACHABLE (IP_STATUS_BASE + 2)
-#define IP_DEST_HOST_UNREACHABLE (IP_STATUS_BASE + 3)
-#define IP_DEST_PROT_UNREACHABLE (IP_STATUS_BASE + 4)
-#define IP_DEST_PORT_UNREACHABLE (IP_STATUS_BASE + 5)
-#define IP_NO_RESOURCES (IP_STATUS_BASE + 6)
-#define IP_BAD_OPTION (IP_STATUS_BASE + 7)
-#define IP_HW_ERROR (IP_STATUS_BASE + 8)
-#define IP_PACKET_TOO_BIG (IP_STATUS_BASE + 9)
-#define IP_REQ_TIMED_OUT (IP_STATUS_BASE + 10)
-#define IP_BAD_REQ (IP_STATUS_BASE + 11)
-#define IP_BAD_ROUTE (IP_STATUS_BASE + 12)
-#define IP_TTL_EXPIRED_TRANSIT (IP_STATUS_BASE + 13)
-#define IP_TTL_EXPIRED_REASSEM (IP_STATUS_BASE + 14)
-#define IP_PARAM_PROBLEM (IP_STATUS_BASE + 15)
-#define IP_SOURCE_QUENCH (IP_STATUS_BASE + 16)
-#define IP_OPTION_TOO_BIG (IP_STATUS_BASE + 17)
-#define IP_BAD_DESTINATION (IP_STATUS_BASE + 18)
-#define IP_ADDR_DELETED (IP_STATUS_BASE + 19)
-#define IP_SPEC_MTU_CHANGE (IP_STATUS_BASE + 20)
-#define IP_MTU_CHANGE (IP_STATUS_BASE + 21)
-#define IP_UNLOAD (IP_STATUS_BASE + 22)
-#define IP_GENERAL_FAILURE (IP_STATUS_BASE + 50)
-#define MAX_IP_STATUS IP_GENERAL_FAILURE
-#define IP_PENDING (IP_STATUS_BASE + 255)
-/* IP header Flags values */
-#define IP_FLAG_DF 0x2
-/* IP Option types */
-#define IP_OPT_EOL 0
-#define IP_OPT_NOP 1
-#define IP_OPT_SECURITY 0x82
-#define IP_OPT_LSRR 0x83
-#define IP_OPT_SSRR 0x89
-#define IP_OPT_RR 0x7
-#define IP_OPT_TS 0x44
-#define IP_OPT_SID 0x88
-#define IP_OPT_ROUTER_ALERT 0x94
-#define MAX_OPT_SIZE 40
-
-typedef unsigned long IPAddr, IPMask, IP_STATUS;
-typedef struct ip_option_information {
- unsigned char Ttl;
- unsigned char Tos;
- unsigned char Flags;
- unsigned char OptionsSize;
- unsigned char* OptionsData;
-}IP_OPTION_INFORMATION, *PIP_OPTION_INFORMATION;
-typedef struct icmp_echo_reply {
- IPAddr Address;
- unsigned long Status;
- unsigned long RoundTripTime;
- unsigned short DataSize;
- unsigned short Reserved;
- void* Data;
- struct ip_option_information Options;
-} ICMP_ECHO_REPLY, *PICMP_ECHO_REPLY;
-typedef struct {
- ULONG Index;
- WCHAR Name[MAX_ADAPTER_NAME];
-} IP_ADAPTER_INDEX_MAP, *PIP_ADAPTER_INDEX_MAP;
-typedef struct {
- LONG NumAdapters;
- IP_ADAPTER_INDEX_MAP Adapter[ANY_SIZE];
-} IP_INTERFACE_INFO, *PIP_INTERFACE_INFO;
-typedef struct _IP_UNIDIRECTIONAL_ADAPTER_ADDRESS {
- ULONG NumAdapters;
- IPAddr Address[1];
-} IP_UNIDIRECTIONAL_ADAPTER_ADDRESS, *PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS;
-#ifdef __cplusplus
-}
-#endif
-#endif /* _IPEXPORT_H */
diff --git a/winsup/w32api/include/iphlpapi.h b/winsup/w32api/include/iphlpapi.h
deleted file mode 100644
index c35c495..0000000
--- a/winsup/w32api/include/iphlpapi.h
+++ /dev/null
@@ -1,77 +0,0 @@
-#ifndef _IPHLPAPI_H
-#define _IPHLPAPI_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#include <iprtrmib.h>
-#include <ipexport.h>
-#include <iptypes.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if (_WIN32_WINNT >= 0x0501)
-#define GAA_FLAG_SKIP_UNICAST 0x00000001
-#define GAA_FLAG_SKIP_ANYCAST 0x00000002
-#define GAA_FLAG_SKIP_MULTICAST 0x00000004
-#define GAA_FLAG_SKIP_DNS_SERVER 0x00000008
-#define GAA_FLAG_INCLUDE_PREFIX 0x00000010
-#define GAA_FLAG_SKIP_FRIENDLY_NAME 0x00000020
-#endif
-
-DWORD WINAPI AddIPAddress(IPAddr,IPMask,DWORD,PULONG,PULONG);
-DWORD WINAPI CreateIpForwardEntry(PMIB_IPFORWARDROW);
-DWORD WINAPI CreateIpNetEntry(PMIB_IPNETROW);
-DWORD WINAPI CreateProxyArpEntry(DWORD,DWORD,DWORD);
-DWORD WINAPI DeleteIPAddress(ULONG);
-DWORD WINAPI DeleteIpForwardEntry(PMIB_IPFORWARDROW);
-DWORD WINAPI DeleteIpNetEntry(PMIB_IPNETROW);
-DWORD WINAPI DeleteProxyArpEntry(DWORD,DWORD,DWORD);
-DWORD WINAPI EnableRouter(HANDLE*,OVERLAPPED*);
-DWORD WINAPI FlushIpNetTable(DWORD);
-#if (_WIN32_WINNT >= 0x0501 && defined(_WINSOCK2_H))
-ULONG WINAPI GetAdaptersAddresses(ULONG,ULONG,PVOID,PIP_ADAPTER_ADDRESSES,PULONG);
-#endif
-DWORD WINAPI GetAdapterIndex(LPWSTR,PULONG);
-DWORD WINAPI GetAdaptersInfo(PIP_ADAPTER_INFO,PULONG);
-DWORD WINAPI GetBestInterface(IPAddr,PDWORD);
-DWORD WINAPI GetBestRoute(DWORD,DWORD,PMIB_IPFORWARDROW);
-#if (_WIN32_WINNT >= 0x0501)
-DWORD WINAPI GetExtendedTcpTable (PVOID,PDWORD,BOOL,ULONG,TCP_TABLE_CLASS,ULONG);
-#endif
-DWORD WINAPI GetFriendlyIfIndex(DWORD);
-DWORD WINAPI GetIcmpStatistics(PMIB_ICMP);
-DWORD WINAPI GetIfEntry(PMIB_IFROW);
-DWORD WINAPI GetIfTable(PMIB_IFTABLE,PULONG,BOOL);
-DWORD WINAPI GetInterfaceInfo(PIP_INTERFACE_INFO,PULONG);
-DWORD WINAPI GetIpAddrTable(PMIB_IPADDRTABLE,PULONG,BOOL);
-DWORD WINAPI GetIpForwardTable(PMIB_IPFORWARDTABLE,PULONG,BOOL);
-DWORD WINAPI GetIpNetTable(PMIB_IPNETTABLE,PULONG,BOOL);
-DWORD WINAPI GetIpStatistics(PMIB_IPSTATS);
-DWORD WINAPI GetNetworkParams(PFIXED_INFO,PULONG);
-DWORD WINAPI GetNumberOfInterfaces(PDWORD);
-DWORD WINAPI GetPerAdapterInfo(ULONG,PIP_PER_ADAPTER_INFO, PULONG);
-BOOL WINAPI GetRTTAndHopCount(IPAddr,PULONG,ULONG,PULONG);
-DWORD WINAPI GetTcpStatistics(PMIB_TCPSTATS);
-DWORD WINAPI GetTcpTable(PMIB_TCPTABLE,PDWORD,BOOL);
-DWORD WINAPI GetUniDirectionalAdapterInfo(PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS,PULONG);
-DWORD WINAPI GetUdpStatistics(PMIB_UDPSTATS);
-DWORD WINAPI GetUdpTable(PMIB_UDPTABLE,PDWORD,BOOL);
-DWORD WINAPI IpReleaseAddress(PIP_ADAPTER_INDEX_MAP);
-DWORD WINAPI IpRenewAddress(PIP_ADAPTER_INDEX_MAP);
-DWORD WINAPI NotifyAddrChange(PHANDLE,LPOVERLAPPED);
-DWORD WINAPI NotifyRouteChange(PHANDLE,LPOVERLAPPED);
-DWORD WINAPI SendARP(IPAddr,IPAddr,PULONG,PULONG);
-DWORD WINAPI SetIfEntry(PMIB_IFROW);
-DWORD WINAPI SetIpForwardEntry(PMIB_IPFORWARDROW);
-DWORD WINAPI SetIpNetEntry(PMIB_IPNETROW);
-DWORD WINAPI SetIpStatistics(PMIB_IPSTATS);
-DWORD WINAPI SetIpTTL(UINT);
-DWORD WINAPI SetTcpEntry(PMIB_TCPROW);
-DWORD WINAPI UnenableRouter(OVERLAPPED*, LPDWORD);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _IPHLPAPI_H */
diff --git a/winsup/w32api/include/ipifcons.h b/winsup/w32api/include/ipifcons.h
deleted file mode 100644
index 1b481c6..0000000
--- a/winsup/w32api/include/ipifcons.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- ipifcons.h - Routing and Remote Access Services
-
- This file is part of a free library for the Win32 API.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-*/
-#ifndef _IPIFCONS_H
-#define _IPIFCONS_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#define MIN_IF_TYPE 1
-#define IF_TYPE_OTHER 1
-#define IF_TYPE_REGULAR_1822 2
-#define IF_TYPE_HDH_1822 3
-#define IF_TYPE_DDN_X25 4
-#define IF_TYPE_RFC877_X25 5
-#define IF_TYPE_ETHERNET_CSMACD 6
-#define IF_TYPE_IS088023_CSMACD 7
-#define IF_TYPE_ISO88024_TOKENBUS 8
-#define IF_TYPE_ISO88025_TOKENRING 9
-#define IF_TYPE_ISO88026_MAN 10
-#define IF_TYPE_STARLAN 11
-#define IF_TYPE_PROTEON_10MBIT 12
-#define IF_TYPE_PROTEON_80MBIT 13
-#define IF_TYPE_HYPERCHANNEL 14
-#define IF_TYPE_FDDI 15
-#define IF_TYPE_LAP_B 16
-#define IF_TYPE_SDLC 17
-#define IF_TYPE_DS1 18
-#define IF_TYPE_E1 19
-#define IF_TYPE_BASIC_ISDN 20
-#define IF_TYPE_PRIMARY_ISDN 21
-#define IF_TYPE_PROP_POINT2POINT_SERIAL 22
-#define IF_TYPE_PPP 23
-#define IF_TYPE_SOFTWARE_LOOPBACK 24
-#define IF_TYPE_EON 25
-#define IF_TYPE_ETHERNET_3MBIT 26
-#define IF_TYPE_NSIP 27
-#define IF_TYPE_SLIP 28
-#define IF_TYPE_ULTRA 29
-#define IF_TYPE_DS3 30
-#define IF_TYPE_SIP 31
-#define IF_TYPE_FRAMERELAY 32
-#define IF_TYPE_RS232 33
-#define IF_TYPE_PARA 34
-#define IF_TYPE_ARCNET 35
-#define IF_TYPE_ARCNET_PLUS 36
-#define IF_TYPE_ATM 37
-#define IF_TYPE_MIO_X25 38
-#define IF_TYPE_SONET 39
-#define IF_TYPE_X25_PLE 40
-#define IF_TYPE_ISO88022_LLC 41
-#define IF_TYPE_LOCALTALK 42
-#define IF_TYPE_SMDS_DXI 43
-#define IF_TYPE_FRAMERELAY_SERVICE 44
-#define IF_TYPE_V35 45
-#define IF_TYPE_HSSI 46
-#define IF_TYPE_HIPPI 47
-#define IF_TYPE_MODEM 48
-#define IF_TYPE_AAL5 49
-#define IF_TYPE_SONET_PATH 50
-#define IF_TYPE_SONET_VT 51
-#define IF_TYPE_SMDS_ICIP 52
-#define IF_TYPE_PROP_VIRTUAL 53
-#define IF_TYPE_PROP_MULTIPLEXOR 54
-#define IF_TYPE_IEEE80212 55
-#define IF_TYPE_FIBRECHANNEL 56
-#define IF_TYPE_HIPPIINTERFACE 57
-#define IF_TYPE_FRAMERELAY_INTERCONNECT 58
-#define IF_TYPE_AFLANE_8023 59
-#define IF_TYPE_AFLANE_8025 60
-#define IF_TYPE_CCTEMUL 61
-#define IF_TYPE_FASTETHER 62
-#define IF_TYPE_ISDN 63
-#define IF_TYPE_V11 64
-#define IF_TYPE_V36 65
-#define IF_TYPE_G703_64K 66
-#define IF_TYPE_G703_2MB 67
-#define IF_TYPE_QLLC 68
-#define IF_TYPE_FASTETHER_FX 69
-#define IF_TYPE_CHANNEL 70
-#define IF_TYPE_IEEE80211 71
-#define IF_TYPE_IBM370PARCHAN 72
-#define IF_TYPE_ESCON 73
-#define IF_TYPE_DLSW 74
-#define IF_TYPE_ISDN_S 75
-#define IF_TYPE_ISDN_U 76
-#define IF_TYPE_LAP_D 77
-#define IF_TYPE_IPSWITCH 78
-#define IF_TYPE_RSRB 79
-#define IF_TYPE_ATM_LOGICAL 80
-#define IF_TYPE_DS0 81
-#define IF_TYPE_DS0_BUNDLE 82
-#define IF_TYPE_BSC 83
-#define IF_TYPE_ASYNC 84
-#define IF_TYPE_CNR 85
-#define IF_TYPE_ISO88025R_DTR 86
-#define IF_TYPE_EPLRS 87
-#define IF_TYPE_ARAP 88
-#define IF_TYPE_PROP_CNLS 89
-#define IF_TYPE_HOSTPAD 90
-#define IF_TYPE_TERMPAD 91
-#define IF_TYPE_FRAMERELAY_MPI 92
-#define IF_TYPE_X213 93
-#define IF_TYPE_ADSL 94
-#define IF_TYPE_RADSL 95
-#define IF_TYPE_SDSL 96
-#define IF_TYPE_VDSL 97
-#define IF_TYPE_ISO88025_CRFPRINT 98
-#define IF_TYPE_MYRINET 99
-#define IF_TYPE_VOICE_EM 100
-#define IF_TYPE_VOICE_FXO 101
-#define IF_TYPE_VOICE_FXS 102
-#define IF_TYPE_VOICE_ENCAP 103
-#define IF_TYPE_VOICE_OVERIP 104
-#define IF_TYPE_ATM_DXI 105
-#define IF_TYPE_ATM_FUNI 106
-#define IF_TYPE_ATM_IMA 107
-#define IF_TYPE_PPPMULTILINKBUNDLE 108
-#define IF_TYPE_IPOVER_CDLC 109
-#define IF_TYPE_IPOVER_CLAW 110
-#define IF_TYPE_STACKTOSTACK 111
-#define IF_TYPE_VIRTUALIPADDRESS 112
-#define IF_TYPE_MPC 113
-#define IF_TYPE_IPOVER_ATM 114
-#define IF_TYPE_ISO88025_FIBER 115
-#define IF_TYPE_TDLC 116
-#define IF_TYPE_GIGABITETHERNET 117
-#define IF_TYPE_HDLC 118
-#define IF_TYPE_LAP_F 119
-#define IF_TYPE_V37 120
-#define IF_TYPE_X25_MLP 121
-#define IF_TYPE_X25_HUNTGROUP 122
-#define IF_TYPE_TRANSPHDLC 123
-#define IF_TYPE_INTERLEAVE 124
-#define IF_TYPE_FAST 125
-#define IF_TYPE_IP 126
-#define IF_TYPE_DOCSCABLE_MACLAYER 127
-#define IF_TYPE_DOCSCABLE_DOWNSTREAM 128
-#define IF_TYPE_DOCSCABLE_UPSTREAM 129
-#define IF_TYPE_A12MPPSWITCH 130
-#define IF_TYPE_TUNNEL 131
-#define IF_TYPE_COFFEE 132
-#define IF_TYPE_CES 133
-#define IF_TYPE_ATM_SUBINTERFACE 134
-#define IF_TYPE_L2_VLAN 135
-#define IF_TYPE_L3_IPVLAN 136
-#define IF_TYPE_L3_IPXVLAN 137
-#define IF_TYPE_DIGITALPOWERLINE 138
-#define IF_TYPE_MEDIAMAILOVERIP 139
-#define IF_TYPE_DTM 140
-#define IF_TYPE_DCN 141
-#define IF_TYPE_IPFORWARD 142
-#define IF_TYPE_MSDSL 143
-#define IF_TYPE_IEEE1394 144
-#define IF_TYPE_RECEIVE_ONLY 145
-#define MAX_IF_TYPE 145
-#define IF_ACCESS_LOOPBACK 1
-#define IF_ACCESS_BROADCAST 2
-#define IF_ACCESS_POINTTOPOINT 3
-#define IF_ACCESS_POINTTOMULTIPOINT 4
-#define IF_CHECK_NONE 0x00
-#define IF_CHECK_MCAST 0x01
-#define IF_CHECK_SEND 0x02
-#define IF_CONNECTION_DEDICATED 1
-#define IF_CONNECTION_PASSIVE 2
-#define IF_CONNECTION_DEMAND 3
-#define IF_ADMIN_STATUS_UP 1
-#define IF_ADMIN_STATUS_DOWN 2
-#define IF_ADMIN_STATUS_TESTING 3
-#define IF_OPER_STATUS_NON_OPERATIONAL 0
-#define IF_OPER_STATUS_UNREACHABLE 1
-#define IF_OPER_STATUS_DISCONNECTED 2
-#define IF_OPER_STATUS_CONNECTING 3
-#define IF_OPER_STATUS_CONNECTED 4
-#define IF_OPER_STATUS_OPERATIONAL 5
-#define MIB_IF_ADMIN_STATUS_UP 1
-#define MIB_IF_ADMIN_STATUS_DOWN 2
-#define MIB_IF_ADMIN_STATUS_TESTING 3
-#define MIB_IF_OPER_STATUS_NON_OPERATIONAL 0
-#define MIB_IF_OPER_STATUS_UNREACHABLE 1
-#define MIB_IF_OPER_STATUS_DISCONNECTED 2
-#define MIB_IF_OPER_STATUS_CONNECTING 3
-#define MIB_IF_OPER_STATUS_CONNECTED 4
-#define MIB_IF_OPER_STATUS_OPERATIONAL 5
-#define MIB_IF_TYPE_OTHER 1
-#define MIB_IF_TYPE_ETHERNET 6
-#define MIB_IF_TYPE_TOKENRING 9
-#define MIB_IF_TYPE_FDDI 15
-#define MIB_IF_TYPE_PPP 23
-#define MIB_IF_TYPE_LOOPBACK 24
-#define MIB_IF_TYPE_SLIP 28
-
-#endif
diff --git a/winsup/w32api/include/ipinfoid.h b/winsup/w32api/include/ipinfoid.h
deleted file mode 100644
index be5adb2..0000000
--- a/winsup/w32api/include/ipinfoid.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * ipinfoid.h - Routing and Remote Access Services
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may use,
- * modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-#ifndef _IPINFOID_H
-#define _IPINFOID_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-/*--- Router Management Reference - Router Information Enumeration Types */
-#define IP_IN_FILTER_INFO 0xFFFF0001
-#define IP_OUT_FILTER_INFO 0xFFFF0002
-#define IP_GLOBAL_INFO 0xFFFF0003
-#define IP_INTERFACE_STATUS_INFO 0xFFFF0004
-#define IP_ROUTE_INFO 0xFFFF0005
-#define IP_PROT_PRIORITY_INFO 0xFFFF0006
-#define IP_ROUTER_DISC_INFO 0xFFFF0007
-#define IP_DEMAND_DIAL_FILTER_INFO 0xFFFF0009
-#define IP_MCAST_HEARBEAT_INFO 0xFFFF000A
-#define IP_MCAST_BOUNDARY_INFO 0xFFFF000B
-#define IP_IPINIP_CFG_INFO 0xFFFF000C
-#define IP_IFFILTER_INFO 0xFFFF000D
-#define IP_MCAST_LIMIT_INFO 0xFFFF000E
-/*#define IP_DEMAND_DIAL_FILTER_INFO_V6 */
-/*#define IP_FILTER_ENABLE_INFO_V6 */
-/*#define IP_IN_FILTER_INFO_V6 */
-/*#define IP_IFFILTER_INFO_V6 */
-/*#define IP_OUT_FILTER_INFO_V6 */
-/*#define IPV6_GLOBAL_INFO */
-/*#define IPV6_ROUTE_INFO */
-
-#endif
diff --git a/winsup/w32api/include/iprtrmib.h b/winsup/w32api/include/iprtrmib.h
deleted file mode 100644
index 3b32f45..0000000
--- a/winsup/w32api/include/iprtrmib.h
+++ /dev/null
@@ -1,246 +0,0 @@
-#ifndef _IPRTRMIB_H
-#define _IPRTRMIB_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#include <ipifcons.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifndef ANY_SIZE
-#define ANY_SIZE 1
-#endif
-#define MAXLEN_PHYSADDR 8
-#define MAXLEN_IFDESCR 256
-#ifndef MAX_INTERFACE_NAME_LEN
-#define MAX_INTERFACE_NAME_LEN 256
-#endif
-#define MIB_IPNET_TYPE_OTHER 1
-#define MIB_IPNET_TYPE_INVALID 2
-#define MIB_IPNET_TYPE_DYNAMIC 3
-#define MIB_IPNET_TYPE_STATIC 4
-#define MIB_TCP_RTO_OTHER 1
-#define MIB_TCP_RTO_CONSTANT 2
-#define MIB_TCP_RTO_RSRE 3
-#define MIB_TCP_RTO_VANJ 4
-#define MIB_TCP_STATE_CLOSED 1
-#define MIB_TCP_STATE_LISTEN 2
-#define MIB_TCP_STATE_SYN_SENT 3
-#define MIB_TCP_STATE_SYN_RCVD 4
-#define MIB_TCP_STATE_ESTAB 5
-#define MIB_TCP_STATE_FIN_WAIT1 6
-#define MIB_TCP_STATE_FIN_WAIT2 7
-#define MIB_TCP_STATE_CLOSE_WAIT 8
-#define MIB_TCP_STATE_CLOSING 9
-#define MIB_TCP_STATE_LAST_ACK 10
-#define MIB_TCP_STATE_TIME_WAIT 11
-#define MIB_TCP_STATE_DELETE_TCB 12
-#define MIB_USE_CURRENT_TTL ((DWORD)-1)
-#define MIB_USE_CURRENT_FORWARDING ((DWORD)-1)
-#define MIB_TCP_MAXCONN_DYNAMIC ((DWORD)-1)
-typedef enum {
- TCP_TABLE_BASIC_LISTENER,
- TCP_TABLE_BASIC_CONNECTIONS,
- TCP_TABLE_BASIC_ALL,
- TCP_TABLE_OWNER_PID_LISTENER,
- TCP_TABLE_OWNER_PID_CONNECTIONS,
- TCP_TABLE_OWNER_PID_ALL,
- TCP_TABLE_OWNER_MODULE_LISTENER,
- TCP_TABLE_OWNER_MODULE_CONNECTIONS,
- TCP_TABLE_OWNER_MODULE_ALL
-} TCP_TABLE_CLASS, *PTCP_TABLE_CLASS;
-typedef struct {
- DWORD dwAddr;
- DWORD dwIndex;
- DWORD dwMask;
- DWORD dwBCastAddr;
- DWORD dwReasmSize;
- unsigned short unused1;
- unsigned short unused2;
-} MIB_IPADDRROW, *PMIB_IPADDRROW;
-typedef struct {
- DWORD dwNumEntries;
- MIB_IPADDRROW table[ANY_SIZE];
-} MIB_IPADDRTABLE, *PMIB_IPADDRTABLE;
-typedef struct {
- DWORD dwForwardDest;
- DWORD dwForwardMask;
- DWORD dwForwardPolicy;
- DWORD dwForwardNextHop;
- DWORD dwForwardIfIndex;
- DWORD dwForwardType;
- DWORD dwForwardProto;
- DWORD dwForwardAge;
- DWORD dwForwardNextHopAS;
- DWORD dwForwardMetric1;
- DWORD dwForwardMetric2;
- DWORD dwForwardMetric3;
- DWORD dwForwardMetric4;
- DWORD dwForwardMetric5;
-} MIB_IPFORWARDROW, *PMIB_IPFORWARDROW;
-typedef struct {
- DWORD dwNumEntries;
- MIB_IPFORWARDROW table[ANY_SIZE];
-} MIB_IPFORWARDTABLE, *PMIB_IPFORWARDTABLE;
-typedef struct {
- DWORD dwIndex;
- DWORD dwPhysAddrLen;
- BYTE bPhysAddr[MAXLEN_PHYSADDR];
- DWORD dwAddr;
- DWORD dwType;
-} MIB_IPNETROW, *PMIB_IPNETROW;
-typedef struct {
- DWORD dwNumEntries;
- MIB_IPNETROW table[ANY_SIZE];
-} MIB_IPNETTABLE, *PMIB_IPNETTABLE;
-typedef struct {
- DWORD dwMsgs;
- DWORD dwErrors;
- DWORD dwDestUnreachs;
- DWORD dwTimeExcds;
- DWORD dwParmProbs;
- DWORD dwSrcQuenchs;
- DWORD dwRedirects;
- DWORD dwEchos;
- DWORD dwEchoReps;
- DWORD dwTimestamps;
- DWORD dwTimestampReps;
- DWORD dwAddrMasks;
- DWORD dwAddrMaskReps;
-} MIBICMPSTATS, *PMIBICMPSTATS;
-typedef struct {
- MIBICMPSTATS icmpInStats;
- MIBICMPSTATS icmpOutStats;
-} MIBICMPINFO, *PMIBICMPINFO;
-typedef struct {
- MIBICMPINFO stats;
-} MIB_ICMP, *PMIB_ICMP;
-typedef struct {
- WCHAR wszName[MAX_INTERFACE_NAME_LEN];
- DWORD dwIndex;
- DWORD dwType;
- DWORD dwMtu;
- DWORD dwSpeed;
- DWORD dwPhysAddrLen;
- BYTE bPhysAddr[MAXLEN_PHYSADDR];
- DWORD dwAdminStatus;
- DWORD dwOperStatus;
- DWORD dwLastChange;
- DWORD dwInOctets;
- DWORD dwInUcastPkts;
- DWORD dwInNUcastPkts;
- DWORD dwInDiscards;
- DWORD dwInErrors;
- DWORD dwInUnknownProtos;
- DWORD dwOutOctets;
- DWORD dwOutUcastPkts;
- DWORD dwOutNUcastPkts;
- DWORD dwOutDiscards;
- DWORD dwOutErrors;
- DWORD dwOutQLen;
- DWORD dwDescrLen;
- BYTE bDescr[MAXLEN_IFDESCR];
-} MIB_IFROW, *PMIB_IFROW;
-typedef struct {
- DWORD dwNumEntries;
- MIB_IFROW table[ANY_SIZE];
-} MIB_IFTABLE, *PMIB_IFTABLE;
-typedef struct {
- DWORD dwForwarding;
- DWORD dwDefaultTTL;
- DWORD dwInReceives;
- DWORD dwInHdrErrors;
- DWORD dwInAddrErrors;
- DWORD dwForwDatagrams;
- DWORD dwInUnknownProtos;
- DWORD dwInDiscards;
- DWORD dwInDelivers;
- DWORD dwOutRequests;
- DWORD dwRoutingDiscards;
- DWORD dwOutDiscards;
- DWORD dwOutNoRoutes;
- DWORD dwReasmTimeout;
- DWORD dwReasmReqds;
- DWORD dwReasmOks;
- DWORD dwReasmFails;
- DWORD dwFragOks;
- DWORD dwFragFails;
- DWORD dwFragCreates;
- DWORD dwNumIf;
- DWORD dwNumAddr;
- DWORD dwNumRoutes;
-} MIB_IPSTATS, *PMIB_IPSTATS;
-typedef struct {
- DWORD dwRtoAlgorithm;
- DWORD dwRtoMin;
- DWORD dwRtoMax;
- DWORD dwMaxConn;
- DWORD dwActiveOpens;
- DWORD dwPassiveOpens;
- DWORD dwAttemptFails;
- DWORD dwEstabResets;
- DWORD dwCurrEstab;
- DWORD dwInSegs;
- DWORD dwOutSegs;
- DWORD dwRetransSegs;
- DWORD dwInErrs;
- DWORD dwOutRsts;
- DWORD dwNumConns;
-} MIB_TCPSTATS, *PMIB_TCPSTATS;
-typedef struct {
- DWORD dwState;
- DWORD dwLocalAddr;
- DWORD dwLocalPort;
- DWORD dwRemoteAddr;
- DWORD dwRemotePort;
-} MIB_TCPROW, *PMIB_TCPROW;
-typedef struct {
- DWORD dwNumEntries;
- MIB_TCPROW table[ANY_SIZE];
-} MIB_TCPTABLE, *PMIB_TCPTABLE;
-typedef struct {
- DWORD dwState;
- DWORD dwLocalAddr;
- DWORD dwLocalPort;
- DWORD dwRemoteAddr;
- DWORD dwRemotePort;
- DWORD dwOwningPid;
-} MIB_TCPROW_OWNER_PID, *PMIB_TCPROW_OWNER_PID;
-typedef struct {
- DWORD dwNumEntries;
- MIB_TCPROW_OWNER_PID table[ANY_SIZE];
-} MIB_TCPTABLE_OWNER_PID, *PMIB_TCPTABLE_OWNER_PID;
-typedef struct {
- DWORD dwInDatagrams;
- DWORD dwNoPorts;
- DWORD dwInErrors;
- DWORD dwOutDatagrams;
- DWORD dwNumAddrs;
-} MIB_UDPSTATS, *PMIB_UDPSTATS;
-typedef struct {
- DWORD dwLocalAddr;
- DWORD dwLocalPort;
-} MIB_UDPROW, *PMIB_UDPROW;
-typedef struct {
- DWORD dwNumEntries;
- MIB_UDPROW table[ANY_SIZE];
-} MIB_UDPTABLE, *PMIB_UDPTABLE;
-typedef struct {
- UCHAR ucLocalAddr[16];
- DWORD dwLocalScopeId;
- DWORD dwLocalPort;
- UCHAR ucRemoteAddr[16];
- DWORD dwRemoteScopeId;
- DWORD dwRemotePort;
- DWORD dwState;
- DWORD dwOwningPid;
-} MIB_TCP6ROW_OWNER_PID, *PMIB_TCP6ROW_OWNER_PID;
-typedef struct {
- DWORD dwNumEntries;
- MIB_TCP6ROW_OWNER_PID table[ANY_SIZE];
-} MIB_TCP6TABLE_OWNER_PID, *PMIB_TCP6TABLE_OWNER_PID;
-#ifdef __cplusplus
-}
-#endif
-#endif /* _IPRTRMIB_H */
diff --git a/winsup/w32api/include/iptypes.h b/winsup/w32api/include/iptypes.h
deleted file mode 100644
index df281e6..0000000
--- a/winsup/w32api/include/iptypes.h
+++ /dev/null
@@ -1,229 +0,0 @@
-#ifndef _IPTYPES_H
-#define _IPTYPES_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#include <sys/types.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define DEFAULT_MINIMUM_ENTITIES 32
-#define MAX_ADAPTER_ADDRESS_LENGTH 8
-#define MAX_ADAPTER_DESCRIPTION_LENGTH 128
-#define MAX_ADAPTER_NAME_LENGTH 256
-#define MAX_DOMAIN_NAME_LEN 128
-#define MAX_HOSTNAME_LEN 128
-#define MAX_SCOPE_ID_LEN 256
-#define BROADCAST_NODETYPE 1
-#define PEER_TO_PEER_NODETYPE 2
-#define MIXED_NODETYPE 4
-#define HYBRID_NODETYPE 8
-#define IF_OTHER_ADAPTERTYPE 0
-#define IF_ETHERNET_ADAPTERTYPE 1
-#define IF_TOKEN_RING_ADAPTERTYPE 2
-#define IF_FDDI_ADAPTERTYPE 3
-#define IF_PPP_ADAPTERTYPE 4
-#define IF_LOOPBACK_ADAPTERTYPE 5
-#if (_WIN32_WINNT >= 0x0501)
-#define IP_ADAPTER_DDNS_ENABLED 0x00000001
-#define IP_ADAPTER_REGISTER_ADAPTER_SUFFIX 0x00000002
-#define IP_ADAPTER_DHCP_ENABLED 0x00000004
-#define IP_ADAPTER_RECEIVE_ONLY 0x00000008
-#define IP_ADAPTER_NO_MULTICAST 0x00000010
-#define IP_ADAPTER_IPV6_OTHER_STATEFUL_CONFIG 0x00000020
-#define IP_ADAPTER_ADDRESS_DNS_ELIGIBLE 0x00000001
-#define IP_ADAPTER_ADDRESS_TRANSIENT 0x00000002
-#endif
-
-typedef struct {
- char String[16];
-} IP_ADDRESS_STRING, *PIP_ADDRESS_STRING, IP_MASK_STRING, *PIP_MASK_STRING;
-typedef struct _IP_ADDR_STRING {
- struct _IP_ADDR_STRING* Next;
- IP_ADDRESS_STRING IpAddress;
- IP_MASK_STRING IpMask;
- DWORD Context;
-} IP_ADDR_STRING, *PIP_ADDR_STRING;
-typedef struct _IP_ADAPTER_INFO {
- struct _IP_ADAPTER_INFO* Next;
- DWORD ComboIndex;
- char AdapterName[MAX_ADAPTER_NAME_LENGTH+4];
- char Description[MAX_ADAPTER_DESCRIPTION_LENGTH+4];
- UINT AddressLength;
- BYTE Address[MAX_ADAPTER_ADDRESS_LENGTH];
- DWORD Index;
- UINT Type;
- UINT DhcpEnabled;
- PIP_ADDR_STRING CurrentIpAddress;
- IP_ADDR_STRING IpAddressList;
- IP_ADDR_STRING GatewayList;
- IP_ADDR_STRING DhcpServer;
- BOOL HaveWins;
- IP_ADDR_STRING PrimaryWinsServer;
- IP_ADDR_STRING SecondaryWinsServer;
- time_t LeaseObtained;
- time_t LeaseExpires;
-} IP_ADAPTER_INFO, *PIP_ADAPTER_INFO;
-typedef struct _IP_PER_ADAPTER_INFO {
- UINT AutoconfigEnabled;
- UINT AutoconfigActive;
- PIP_ADDR_STRING CurrentDnsServer;
- IP_ADDR_STRING DnsServerList;
-} IP_PER_ADAPTER_INFO, *PIP_PER_ADAPTER_INFO;
-typedef struct _FIXED_INFO {
- char HostName[MAX_HOSTNAME_LEN+4] ;
- char DomainName[MAX_DOMAIN_NAME_LEN+4];
- PIP_ADDR_STRING CurrentDnsServer;
- IP_ADDR_STRING DnsServerList;
- UINT NodeType;
- char ScopeId[MAX_SCOPE_ID_LEN+4];
- UINT EnableRouting;
- UINT EnableProxy;
- UINT EnableDns;
-} FIXED_INFO, *PFIXED_INFO;
-#if (_WIN32_WINNT >= 0x0501) && defined(_WINSOCK2_H)
-typedef enum {
- IfOperStatusUp = 1,
- IfOperStatusDown,
- IfOperStatusTesting,
- IfOperStatusUnknown,
- IfOperStatusDormant,
- IfOperStatusNotPresent,
- IfOperStatusLowerLayerDown
-} IF_OPER_STATUS;
-typedef enum {
- IpDadStateInvalid = 0,
- IpDadStateTentative,
- IpDadStateDuplicate,
- IpDadStateDeprecated,
- IpDadStatePreferred
-} IP_DAD_STATE;
-typedef enum {
- IpPrefixOriginOther = 0,
- IpPrefixOriginManual,
- IpPrefixOriginWellKnown,
- IpPrefixOriginDhcp,
- IpPrefixOriginRouterAdvertisement
-} IP_PREFIX_ORIGIN;
-typedef enum {
- IpSuffixOriginOther = 0,
- IpSuffixOriginManual,
- IpSuffixOriginWellKnown,
- IpSuffixOriginDhcp,
- IpSuffixOriginLinkLayerAddress,
- IpSuffixOriginRandom
-} IP_SUFFIX_ORIGIN;
-typedef enum {
- ScopeLevelInterface = 1,
- ScopeLevelLink = 2,
- ScopeLevelSubnet = 3,
- ScopeLevelAdmin = 4,
- ScopeLevelSite = 5,
- ScopeLevelOrganization = 8,
- ScopeLevelGlobal = 14
-} SCOPE_LEVEL;
-typedef struct {
- ULONG Index;
- ULONG MediaType;
- UCHAR ConnectionType;
- UCHAR AccessType;
- GUID DeviceGuid;
- GUID InterfaceGuid;
-} IP_INTERFACE_NAME_INFO,*PIP_INTERFACE_NAME_INFO;
-typedef struct _IP_ADAPTER_ANYCAST_ADDRESS {
- _ANONYMOUS_UNION union {
- ULONGLONG Alignment;
- _ANONYMOUS_STRUCT struct {
- ULONG Length;
- DWORD Flags;
- } DUMMYSTRUCTNAME;
- } DUMMYUNIONNAME;
- struct _IP_ADAPTER_ANYCAST_ADDRESS* Next;
- SOCKET_ADDRESS Address;
-} IP_ADAPTER_ANYCAST_ADDRESS,*PIP_ADAPTER_ANYCAST_ADDRESS;
-typedef struct _IP_ADAPTER_MULTICAST_ADDRESS {
- _ANONYMOUS_UNION union {
- ULONGLONG Alignment;
- _ANONYMOUS_STRUCT struct {
- ULONG Length;
- DWORD Flags;
- } DUMMYSTRUCTNAME;
- } DUMMYUNIONNAME;
- struct _IP_ADAPTER_MULTICAST_ADDRESS* Next;
- SOCKET_ADDRESS Address;
-} IP_ADAPTER_MULTICAST_ADDRESS,*PIP_ADAPTER_MULTICAST_ADDRESS;
-typedef struct _IP_ADAPTER_UNICAST_ADDRESS {
- _ANONYMOUS_UNION union {
- ULONGLONG Alignment;
- _ANONYMOUS_STRUCT struct {
- ULONG Length;
- DWORD Flags;
- } DUMMYSTRUCTNAME;
- } DUMMYUNIONNAME;
- struct _IP_ADAPTER_UNICAST_ADDRESS* Next;
- SOCKET_ADDRESS Address;
- IP_PREFIX_ORIGIN PrefixOrigin;
- IP_SUFFIX_ORIGIN SuffixOrigin;
- IP_DAD_STATE DadState;
- ULONG ValidLifetime;
- ULONG PreferredLifetime;
- ULONG LeaseLifetime;
-} IP_ADAPTER_UNICAST_ADDRESS,*PIP_ADAPTER_UNICAST_ADDRESS;
-typedef struct _IP_ADAPTER_DNS_SERVER_ADDRESS {
- _ANONYMOUS_UNION union {
- ULONGLONG Alignment;
- _ANONYMOUS_STRUCT struct {
- ULONG Length;
- DWORD Reserved;
- } DUMMYSTRUCTNAME;
- } DUMMYUNIONNAME;
- struct _IP_ADAPTER_DNS_SERVER_ADDRESS* Next;
- SOCKET_ADDRESS Address;
-} IP_ADAPTER_DNS_SERVER_ADDRESS,*PIP_ADAPTER_DNS_SERVER_ADDRESS;
-typedef struct _IP_ADAPTER_PREFIX {
- _ANONYMOUS_UNION union {
- ULONGLONG Alignment;
- _ANONYMOUS_STRUCT struct {
- ULONG Length;
- DWORD Flags;
- } DUMMYSTRUCTNAME;
- } DUMMYUNIONNAME;
- struct _IP_ADAPTER_PREFIX* Next;
- SOCKET_ADDRESS Address;
- ULONG PrefixLength;
-} IP_ADAPTER_PREFIX,*PIP_ADAPTER_PREFIX;
-typedef struct _IP_ADAPTER_ADDRESSES {
- _ANONYMOUS_UNION union {
- ULONGLONG Alignment;
- _ANONYMOUS_STRUCT struct {
- ULONG Length;
- DWORD IfIndex;
- } DUMMYSTRUCTNAME;
- } DUMMYUNIONNAME;
- struct _IP_ADAPTER_ADDRESSES* Next;
- PCHAR AdapterName;
- PIP_ADAPTER_UNICAST_ADDRESS FirstUnicastAddress;
- PIP_ADAPTER_ANYCAST_ADDRESS FirstAnycastAddress;
- PIP_ADAPTER_MULTICAST_ADDRESS FirstMulticastAddress;
- PIP_ADAPTER_DNS_SERVER_ADDRESS FirstDnsServerAddress;
- PWCHAR DnsSuffix;
- PWCHAR Description;
- PWCHAR FriendlyName;
- BYTE PhysicalAddress[MAX_ADAPTER_ADDRESS_LENGTH];
- DWORD PhysicalAddressLength;
- DWORD Flags;
- DWORD Mtu;
- DWORD IfType;
- IF_OPER_STATUS OperStatus;
- DWORD Ipv6IfIndex;
- DWORD ZoneIndices[16];
- PIP_ADAPTER_PREFIX FirstPrefix;
-} IP_ADAPTER_ADDRESSES,*PIP_ADAPTER_ADDRESSES;
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _IPTYPES_H */
diff --git a/winsup/w32api/include/ipxconst.h b/winsup/w32api/include/ipxconst.h
deleted file mode 100644
index bd52d34..0000000
--- a/winsup/w32api/include/ipxconst.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * ipxconst.h - Routing and Remote Access Services
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may use,
- * modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-#ifndef _IPXCONST_H
-#define _IPXCONST_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- Router Management Reference - Router Information Structures - IPX Information Structures */
-#if (_WIN32_WINNT >= 0x0500)
-#define ADMIN_STATE_DISABLED 0x00000001
-#define ADMIN_STATE_ENABLED 0x00000002
-#define ADMIN_STATE_ENABLED_ONLY_FOR_NETBIOS_STATIC_ROUTING 0x00000003
-#define ADMIN_STATE_ENABLED_ONLY_FOR_OPER_STATE_UP 0x00000004
-#endif /* (_WIN32_WINNT >= 0x0500) */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/ipxrtdef.h b/winsup/w32api/include/ipxrtdef.h
deleted file mode 100644
index 5000456..0000000
--- a/winsup/w32api/include/ipxrtdef.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * ipxrtdef.h - Routing and Remote Access Services
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may use,
- * modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-#ifndef _IPXRTDEF_H
-#define _IPXRTDEF_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#include <stm.h>
-#include <ipxconst.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- Router Management Reference - Router Information Enumeration Types */
-#define IPX_INTERFACE_INFO_TYPE 0x0001
-#define IPX_STATIC_ROUTE_INFO_TYPE 0x0002
-#define IPX_STATIC_SERVICE_INFO_TYPE 0x0003
-#define IPX_SERVICE_FILTER_INFO_TYPE 0x0004
-#define IPX_ROUTE_FILTER_INFO_TYPE 0x0005
-#define IPX_IN_TRAFFIC_FILTER_INFO_TYPE 0x0006
-#define IPX_ADAPTER_INFO_TYPE 0x0007
-#define IPXWAN_INTERFACE_INFO_TYPE 0x0008
-#define IPX_GLOBAL_INFO_TYPE 0x0009
-#define IPX_STATIC_NETBIOS_NAME_INFO_TYPE 0x000A
-#define IPX_IN_TRAFFIC_FILTER_GLOBAL_INFO_TYPE 0x000B
-#define IPX_OUT_TRAFFIC_FILTER_INFO_TYPE 0x000C
-#define IPX_OUT_TRAFFIC_FILTER_GLOBAL_INFO_TYPE 0x000D
-/*--- Router Management Reference - Router Information Structures - IPX Information Structures */
-#if (_WIN32_WINNT >= 0x0500)
-typedef struct _IPX_IF_INFO {
- ULONG AdminState;
- ULONG NetbiosAccept;
- ULONG NetbiosDeliver;
-} IPX_IF_INFO,*PIPX_IF_INFO;
-typedef IPX_SERVER_ENTRY IPX_STATIC_SERVICE_INFO,*PIPX_STATIC_SERVICE_INFO;
-typedef struct _IPXWAN_IF_INFO {
- ULONG AdminState;
-} IPXWAN_IF_INFO,*PIPXWAN_IF_INFO;
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/ipxtfflt.h b/winsup/w32api/include/ipxtfflt.h
deleted file mode 100644
index c089d6c..0000000
--- a/winsup/w32api/include/ipxtfflt.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * ipxtfflt.h - Routing and Remote Access Services
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may use,
- * modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-#ifndef _IPXTFFLT_H
-#define _IPXTFFLT_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- Router Management Reference - Router Information Structures - IPX Information Structures */
-#if 0
-typedef struct {
- ???
-} IPX_TRAFFIC_FILTER_INFO,*PIPX_TRAFFIC_FILTER_INFO;
-typedef struct {
- ???
-} IPX_TRAFFIC_FILTER_GLOBAL_INFO,*PIPX_TRAFFIC_FILTER_GLOBAL_INFO;
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/isguids.h b/winsup/w32api/include/isguids.h
deleted file mode 100644
index d5655d2..0000000
--- a/winsup/w32api/include/isguids.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef _ISGUID_H
-#define _ISGUID_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern const GUID CLSID_InternetShortcut;
-extern const GUID IID_IUniformResourceLocator;
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/ks.h b/winsup/w32api/include/ks.h
deleted file mode 100644
index 7154eae..0000000
--- a/winsup/w32api/include/ks.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef _KS_H
-#define _KS_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- DirectShow Reference - DirectShow Structures */
-typedef struct {
- ULONG Size;
- ULONG Count;
-} KSMULTIPLE_ITEM,*PKSMULTIPLE_ITEM;
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/ksmedia.h b/winsup/w32api/include/ksmedia.h
deleted file mode 100644
index 906649d..0000000
--- a/winsup/w32api/include/ksmedia.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef _KSMEDIA_H
-#define _KSMEDIA_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- DirectShow Reference - DirectShow Enumerated Types - CameraControlFlags Enumeration */
-#define KSPROPERTY_CAMERACONTROL_FLAGS_AUTO 0x0001L
-#define KSPROPERTY_CAMERACONTROL_FLAGS_MANUAL 0x0002L
-#define KSPROPERTY_CAMERACONTROL_FLAGS_ABSOLUTE 0x0000L
-#define KSPROPERTY_CAMERACONTROL_FLAGS_RELATIVE 0x0010L
-/*--- DirectShow Reference - DirectShow Enumerated Types - VideoProcAmpFlags Enumeration */
-#define KSPROPERTY_VIDEOPROCAMP_FLAGS_AUTO 0X0001L
-#define KSPROPERTY_VIDEOPROCAMP_FLAGS_MANUAL 0X0002L
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/largeint.h b/winsup/w32api/include/largeint.h
deleted file mode 100644
index b2222a9..0000000
--- a/winsup/w32api/include/largeint.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- largeint.h
-
- Header for 64 bit integer arithmetics library
-
- */
-#ifndef _LARGEINT_H
-#define _LARGEINT_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#include <windows.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef _HAVE_INT64
-#define _toi (__int64)
-#define _toui (unsigned __int64)
-#else
-#error "64 bit integers not supported"
-#endif
-
-/*
- We don't let the compiler see the prototypes if we are compiling the
- library because if it does it will choke on conflicting types in the
- prototypes.
-*/
-
-#if defined(LARGEINT_PROTOS) || defined(__COMPILING_LARGEINT)
-
-#ifndef __COMPILING_LARGEINT
-/* addition/subtraction */
-LARGE_INTEGER WINAPI LargeIntegerAdd (LARGE_INTEGER, LARGE_INTEGER);
-LARGE_INTEGER WINAPI LargeIntegerSubtract (LARGE_INTEGER, LARGE_INTEGER);
-
-/* bit operations */
-LARGE_INTEGER WINAPI LargeIntegerArithmeticShift (LARGE_INTEGER, int);
-LARGE_INTEGER WINAPI LargeIntegerShiftLeft (LARGE_INTEGER, int);
-LARGE_INTEGER WINAPI LargeIntegerShiftRight (LARGE_INTEGER, int);
-LARGE_INTEGER WINAPI LargeIntegerNegate (LARGE_INTEGER);
-
-/* conversion */
-LARGE_INTEGER WINAPI ConvertLongToLargeInteger (LONG);
-LARGE_INTEGER WINAPI ConvertUlongToLargeInteger (ULONG);
-
-/* multiplication */
-LARGE_INTEGER WINAPI EnlargedIntegerMultiply (LONG, LONG);
-LARGE_INTEGER WINAPI EnlargedUnsignedMultiply (ULONG, ULONG);
-LARGE_INTEGER WINAPI ExtendedIntegerMultiply (LARGE_INTEGER, LONG);
-/* FIXME: is this not part of largeint? */
-LARGE_INTEGER WINAPI LargeIntegerMultiply (LARGE_INTEGER, LARGE_INTEGER);
-#endif /* __COMPILING_LARGEINT */
-
-#else
-
-#define LargeIntegerAdd(a,b) (LARGE_INTEGER)(_toi(a) + _toi(b))
-#define LargeIntegerSubtract(a,b) (LARGE_INTEGER)(_toi(a) - _toi(b))
-#define LargeIntegerRightShift(i,n) (LARGE_INTEGER)(_toi(i) >> (n))
-#define LargeIntegerArithmeticShift LargeIntegerRightShift
-#define LargeIntegerLeftShift(i,n) (LARGE_INTEGER)(_toi(i) << (n))
-#define LargeIntegerNegate(i) (LARGE_INTEGER)(- _toi(i))
-#define EnlargedIntegerMultiply(a,b) (LARGE_INTEGER)(_toi(a) * _toi(b))
-#define EnlargedUnsignedMultiply(a,b) (LARGE_INTEGER)(_toui(a) * _toui(b))
-#define ExtendedIntegerMultiply(a,b) (LARGE_INTEGER)(_toi(a) * _toi(b))
-/* FIXME: should this exist */
-#define LargeIntegerMultiply(a,b) (LARGE_INTEGER)(_toi(a) * _toi(b))
-#define ConvertLongToLargeInteger(l) (LARGE_INTEGER)(_toi(l))
-#define ConvertUlongToLargeInteger(ul) (LARGE_INTEGER)(_toui(ul))
-
-#endif /* LARGEINT_PROTOS || __COMPILING_LARGEINT */
-
-#ifndef __COMPILING_LARGEINT
-/* division; no macros of these because of multiple expansion */
-LARGE_INTEGER WINAPI LargeIntegerDivide (LARGE_INTEGER, LARGE_INTEGER, PLARGE_INTEGER);
-ULONG WINAPI EnlargedUnsignedDivide (ULARGE_INTEGER, ULONG, PULONG);
-LARGE_INTEGER WINAPI ExtendedLargeIntegerDivide (LARGE_INTEGER, ULONG, PULONG);
-LARGE_INTEGER WINAPI ExtendedMagicDivide (LARGE_INTEGER, LARGE_INTEGER, int);
-#endif /* __COMPILING_LARGEINT */
-
-#define LargeIntegerAnd(dest, src, m) \
-{ \
- dest._STRUCT_NAME(u.)LowPart = s._STRUCT_NAME(u.)LowPart & m._STRUCT_NAME(u.)LowPart; \
- dest._STRUCT_NAME(u.)HighPart = s._STRUCT_NAME(u.)HighPart & m._STRUCT_NAME(u.)HighPart; \
-}
-
-/* comparision */
-#define LargeIntegerGreaterThan(a,b) (_toi(a) > _toi(b))
-#define LargeIntegerGreaterThanOrEqual(a,b) (_toi(a) >= _toi(b))
-#define LargeIntegerEqualTo(a,b) (_toi(a) == _toi(b))
-#define LargeIntegerNotEqualTo(a,b) (_toi(a) != _toi(b))
-#define LargeIntegerLessThan(a,b) (_toi(a) < _toi(b))
-#define LargeIntegerLessThanOrEqualTo(a,b) (_toi(a) <= _toi(b))
-#define LargeIntegerGreaterThanZero(a) (_toi(a) > 0)
-#define LargeIntegerGreaterOrEqualToZero(a) ((a)._STRUCT_NAME(u.)HighPart > 0)
-#define LargeIntegerEqualToZero(a) !((a)._STRUCT_NAME(u.)LowPart | (a)._STRUCT_NAME(u.)HighPart)
-#define LargeIntegerNotEqualToZero(a) ((a)._STRUCT_NAME(u.)LowPart | (a)._STRUCT_NAME(u.)HighPart)
-#define LargeIntegerLessThanZero(a) ((a)._STRUCT_NAME(u.)HighPart < 0)
-#define LargeIntegerLessOrEqualToZero(a) (_toi(a) <= 0)
-
-#ifndef __COMPILING_LARGEINT
-#undef _toi
-#undef _toui
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _LARGEINT_H */
diff --git a/winsup/w32api/include/lm.h b/winsup/w32api/include/lm.h
deleted file mode 100644
index db1779d..0000000
--- a/winsup/w32api/include/lm.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef _LM_H
-#define _LM_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#include <lmcons.h>
-#include <lmaccess.h>
-#include <lmalert.h>
-#include <lmat.h>
-#include <lmaudit.h>
-#include <lmchdev.h>
-#include <lmconfig.h>
-#include <lmerr.h>
-#include <lmmsg.h>
-#include <lmshare.h>
-#include <lmapibuf.h>
-#include <lmremutl.h>
-#include <lmrepl.h>
-#include <lmuse.h>
-#include <lmerrlog.h>
-#include <lmsvc.h>
-#include <lmwksta.h>
-#include <lmserver.h>
-#include <lmstats.h>
-
-#endif
diff --git a/winsup/w32api/include/lmaccess.h b/winsup/w32api/include/lmaccess.h
deleted file mode 100644
index 5c14db8..0000000
--- a/winsup/w32api/include/lmaccess.h
+++ /dev/null
@@ -1,654 +0,0 @@
-#ifndef _LMACCESS_H
-#define _LMACCESS_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include <lmcons.h>
-#define GROUP_SPECIALGRP_USERS L"USERS"
-#define GROUP_SPECIALGRP_ADMINS L"ADMINS"
-#define GROUP_SPECIALGRP_GUESTS L"GUESTS"
-#define GROUP_SPECIALGRP_LOCAL L"LOCAL"
-#define ACCESS_LETTERS "RWCXDAP "
-#define NETLOGON_CONTROL_QUERY 1
-#define NETLOGON_CONTROL_REPLICATE 2
-#define NETLOGON_CONTROL_SYNCHRONIZE 3
-#define NETLOGON_CONTROL_PDC_REPLICATE 4
-#define NETLOGON_CONTROL_REDISCOVER 5
-#define NETLOGON_CONTROL_TC_QUERY 6
-#define NETLOGON_CONTROL_BACKUP_CHANGE_LOG 65532
-#define NETLOGON_CONTROL_TRUNCATE_LOG 65533
-#define NETLOGON_CONTROL_SET_DBFLAG 65534
-#define NETLOGON_CONTROL_BREAKPOINT 65535
-#define UF_SCRIPT 1
-#define UF_ACCOUNTDISABLE 2
-#define UF_HOMEDIR_REQUIRED 8
-#define UF_LOCKOUT 16
-#define UF_PASSWD_NOTREQD 32
-#define UF_PASSWD_CANT_CHANGE 64
-#define UF_TEMP_DUPLICATE_ACCOUNT 256
-#define UF_NORMAL_ACCOUNT 512
-#define UF_INTERDOMAIN_TRUST_ACCOUNT 2048
-#define UF_WORKSTATION_TRUST_ACCOUNT 4096
-#define UF_SERVER_TRUST_ACCOUNT 8192
-#define UF_MNS_LOGON_ACCOUNT 131072
-#define UF_MACHINE_ACCOUNT_MASK (UF_INTERDOMAIN_TRUST_ACCOUNT|UF_WORKSTATION_TRUST_ACCOUNT|UF_SERVER_TRUST_ACCOUNT)
-#define UF_ACCOUNT_TYPE_MASK (UF_TEMP_DUPLICATE_ACCOUNT|UF_NORMAL_ACCOUNT|UF_INTERDOMAIN_TRUST_ACCOUNT|UF_WORKSTATION_TRUST_ACCOUNT|UF_SERVER_TRUST_ACCOUNT)
-#define UF_DONT_EXPIRE_PASSWD 65536
-#define UF_SETTABLE_BITS (UF_SCRIPT|UF_ACCOUNTDISABLE|UF_LOCKOUT|UF_HOMEDIR_REQUIRED|UF_PASSWD_NOTREQD|UF_PASSWD_CANT_CHANGE|UF_ACCOUNT_TYPE_MASK|UF_DONT_EXPIRE_PASSWD)
-#define FILTER_TEMP_DUPLICATE_ACCOUNT 1
-#define FILTER_NORMAL_ACCOUNT 2
-#define FILTER_INTERDOMAIN_TRUST_ACCOUNT 8
-#define FILTER_WORKSTATION_TRUST_ACCOUNT 16
-#define FILTER_SERVER_TRUST_ACCOUNT 32
-#define LG_INCLUDE_INDIRECT 1
-#define AF_OP_PRINT 1
-#define AF_OP_COMM 2
-#define AF_OP_SERVER 4
-#define AF_OP_ACCOUNTS 8
-#define AF_SETTABLE_BITS (AF_OP_PRINT|AF_OP_COMM|AF_OP_SERVER|AF_OP_ACCOUNTS)
-#define UAS_ROLE_STANDALONE 0
-#define UAS_ROLE_MEMBER 1
-#define UAS_ROLE_BACKUP 2
-#define UAS_ROLE_PRIMARY 3
-#define USER_NAME_PARMNUM 1
-#define USER_PASSWORD_PARMNUM 3
-#define USER_PASSWORD_AGE_PARMNUM 4
-#define USER_PRIV_PARMNUM 5
-#define USER_HOME_DIR_PARMNUM 6
-#define USER_COMMENT_PARMNUM 7
-#define USER_FLAGS_PARMNUM 8
-#define USER_SCRIPT_PATH_PARMNUM 9
-#define USER_AUTH_FLAGS_PARMNUM 10
-#define USER_FULL_NAME_PARMNUM 11
-#define USER_USR_COMMENT_PARMNUM 12
-#define USER_PARMS_PARMNUM 13
-#define USER_WORKSTATIONS_PARMNUM 14
-#define USER_LAST_LOGON_PARMNUM 15
-#define USER_LAST_LOGOFF_PARMNUM 16
-#define USER_ACCT_EXPIRES_PARMNUM 17
-#define USER_MAX_STORAGE_PARMNUM 18
-#define USER_UNITS_PER_WEEK_PARMNUM 19
-#define USER_LOGON_HOURS_PARMNUM 20
-#define USER_PAD_PW_COUNT_PARMNUM 21
-#define USER_NUM_LOGONS_PARMNUM 22
-#define USER_LOGON_SERVER_PARMNUM 23
-#define USER_COUNTRY_CODE_PARMNUM 24
-#define USER_CODE_PAGE_PARMNUM 25
-#define USER_PRIMARY_GROUP_PARMNUM 51
-#define USER_PROFILE 52
-#define USER_PROFILE_PARMNUM 52
-#define USER_HOME_DIR_DRIVE_PARMNUM 53
-#define USER_NAME_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_NAME_PARMNUM)
-#define USER_PASSWORD_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_PASSWORD_PARMNUM)
-#define USER_PASSWORD_AGE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_PASSWORD_AGE_PARMNUM)
-#define USER_PRIV_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_PRIV_PARMNUM)
-#define USER_HOME_DIR_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_HOME_DIR_PARMNUM)
-#define USER_COMMENT_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_COMMENT_PARMNUM)
-#define USER_FLAGS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_FLAGS_PARMNUM)
-#define USER_SCRIPT_PATH_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_SCRIPT_PATH_PARMNUM)
-#define USER_AUTH_FLAGS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_AUTH_FLAGS_PARMNUM)
-#define USER_FULL_NAME_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_FULL_NAME_PARMNUM)
-#define USER_USR_COMMENT_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_USR_COMMENT_PARMNUM)
-#define USER_PARMS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_PARMS_PARMNUM)
-#define USER_WORKSTATIONS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_WORKSTATIONS_PARMNUM)
-#define USER_LAST_LOGON_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_LAST_LOGON_PARMNUM)
-#define USER_LAST_LOGOFF_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_LAST_LOGOFF_PARMNUM)
-#define USER_ACCT_EXPIRES_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_ACCT_EXPIRES_PARMNUM)
-#define USER_MAX_STORAGE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_MAX_STORAGE_PARMNUM)
-#define USER_UNITS_PER_WEEK_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_UNITS_PER_WEEK_PARMNUM)
-#define USER_LOGON_HOURS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_LOGON_HOURS_PARMNUM)
-#define USER_PAD_PW_COUNT_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_PAD_PW_COUNT_PARMNUM)
-#define USER_NUM_LOGONS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_NUM_LOGONS_PARMNUM)
-#define USER_LOGON_SERVER_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_LOGON_SERVER_PARMNUM)
-#define USER_COUNTRY_CODE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_COUNTRY_CODE_PARMNUM)
-#define USER_CODE_PAGE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_CODE_PAGE_PARMNUM)
-#define USER_PRIMARY_GROUP_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_PRIMARY_GROUP_PARMNUM)
-#define USER_POSIX_ID_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_POSIX_ID_PARMNUM)
-#define USER_HOME_DIR_DRIVE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+USER_HOME_DIR_DRIVE_PARMNUM)
-#define NULL_USERSETINFO_PASSWD " "
-#define TIMEQ_FOREVER ((ULONG)-1)
-#define USER_MAXSTORAGE_UNLIMITED ((ULONG)-1)
-#define USER_NO_LOGOFF ((ULONG)-1L)
-#define UNITS_PER_DAY 24
-#define UNITS_PER_WEEK 168
-#define USER_PRIV_MASK 3
-#define USER_PRIV_GUEST 0
-#define USER_PRIV_USER 1
-#define USER_PRIV_ADMIN 2
-#define MAX_PASSWD_LEN PWLEN
-#define DEF_MIN_PWLEN 6
-#define DEF_PWUNIQUENESS 5
-#define DEF_MAX_PWHIST 8
-#define DEF_MAX_PWAGE TIMEQ_FOREVER
-#define DEF_MIN_PWAGE 0
-#define DEF_FORCE_LOGOFF (ULONG)0xffffffff
-#define DEF_MAX_BADPW 0
-#define ONE_DAY 86400
-#define VALIDATED_LOGON 0
-#define PASSWORD_EXPIRED 2
-#define NON_VALIDATED_LOGON 3
-#define VALID_LOGOFF 1
-#define MODALS_MIN_PASSWD_LEN_PARMNUM 1
-#define MODALS_MAX_PASSWD_AGE_PARMNUM 2
-#define MODALS_MIN_PASSWD_AGE_PARMNUM 3
-#define MODALS_FORCE_LOGOFF_PARMNUM 4
-#define MODALS_PASSWD_HIST_LEN_PARMNUM 5
-#define MODALS_ROLE_PARMNUM 6
-#define MODALS_PRIMARY_PARMNUM 7
-#define MODALS_DOMAIN_NAME_PARMNUM 8
-#define MODALS_DOMAIN_ID_PARMNUM 9
-#define MODALS_LOCKOUT_DURATION_PARMNUM 10
-#define MODALS_LOCKOUT_OBSERVATION_WINDOW_PARMNUM 11
-#define MODALS_LOCKOUT_THRESHOLD_PARMNUM 12
-#define MODALS_MIN_PASSWD_LEN_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+MODALS_MIN_PASSWD_LEN_PARMNUM)
-#define MODALS_MAX_PASSWD_AGE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+MODALS_MAX_PASSWD_AGE_PARMNUM)
-#define MODALS_MIN_PASSWD_AGE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+MODALS_MIN_PASSWD_AGE_PARMNUM)
-#define MODALS_FORCE_LOGOFF_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+MODALS_FORCE_LOGOFF_PARMNUM)
-#define MODALS_PASSWD_HIST_LEN_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+MODALS_PASSWD_HIST_LEN_PARMNUM)
-#define MODALS_ROLE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+MODALS_ROLE_PARMNUM)
-#define MODALS_PRIMARY_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+MODALS_PRIMARY_PARMNUM)
-#define MODALS_DOMAIN_NAME_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+MODALS_DOMAIN_NAME_PARMNUM)
-#define MODALS_DOMAIN_ID_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+MODALS_DOMAIN_ID_PARMNUM)
-#define GROUPIDMASK 0x8000
-#define GROUP_ALL_PARMNUM 0
-#define GROUP_NAME_PARMNUM 1
-#define GROUP_COMMENT_PARMNUM 2
-#define GROUP_ATTRIBUTES_PARMNUM 3
-#define GROUP_ALL_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+GROUP_ALL_PARMNUM)
-#define GROUP_NAME_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+GROUP_NAME_PARMNUM)
-#define GROUP_COMMENT_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+GROUP_COMMENT_PARMNUM)
-#define GROUP_ATTRIBUTES_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+GROUP_ATTRIBUTES_PARMNUM)
-#define GROUP_POSIX_ID_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+GROUP_POSIX_ID_PARMNUM)
-#define LOCALGROUP_NAME_PARMNUM 1
-#define LOCALGROUP_COMMENT_PARMNUM 2
-#define MAXPERMENTRIES 64
-#define ACCESS_NONE 0
-#define ACCESS_ALL (ACCESS_READ|ACCESS_WRITE|ACCESS_CREATE|ACCESS_EXEC|ACCESS_DELETE|ACCESS_ATRIB|ACCESS_PERM)
-#define ACCESS_READ 1
-#define ACCESS_WRITE 2
-#define ACCESS_CREATE 4
-#define ACCESS_EXEC 8
-#define ACCESS_DELETE 16
-#define ACCESS_ATRIB 32
-#define ACCESS_PERM 64
-#define ACCESS_GROUP 0x8000
-#define ACCESS_AUDIT 1
-#define ACCESS_SUCCESS_OPEN 16
-#define ACCESS_SUCCESS_WRITE 32
-#define ACCESS_SUCCESS_DELETE 64
-#define ACCESS_SUCCESS_ACL 128
-#define ACCESS_SUCCESS_MASK 240
-#define ACCESS_FAIL_OPEN 256
-#define ACCESS_FAIL_WRITE 512
-#define ACCESS_FAIL_DELETE 1024
-#define ACCESS_FAIL_ACL 2048
-#define ACCESS_FAIL_MASK 3840
-#define ACCESS_FAIL_SHIFT 4
-#define ACCESS_RESOURCE_NAME_PARMNUM 1
-#define ACCESS_ATTR_PARMNUM 2
-#define ACCESS_COUNT_PARMNUM 3
-#define ACCESS_ACCESS_LIST_PARMNUM 4
-#define ACCESS_RESOURCE_NAME_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+ACCESS_RESOURCE_NAME_PARMNUM)
-#define ACCESS_ATTR_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+ACCESS_ATTR_PARMNUM)
-#define ACCESS_COUNT_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+ACCESS_COUNT_PARMNUM)
-#define ACCESS_ACCESS_LIST_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+ACCESS_ACCESS_LIST_PARMNUM)
-#define NETLOGON_REPLICATION_NEEDED 1
-#define NETLOGON_REPLICATION_IN_PROGRESS 2
-#define NETLOGON_FULL_SYNC_REPLICATION 4
-#define NETLOGON_REDO_NEEDED 8
-
-typedef struct _USER_INFO_0 { LPWSTR usri0_name; }USER_INFO_0,*PUSER_INFO_0,*LPUSER_INFO_0;
-typedef struct _USER_INFO_1 {
- LPWSTR usri1_name;
- LPWSTR usri1_password;
- DWORD usri1_password_age;
- DWORD usri1_priv;
- LPWSTR usri1_home_dir;
- LPWSTR usri1_comment;
- DWORD usri1_flags;
- LPWSTR usri1_script_path;
-}USER_INFO_1,*PUSER_INFO_1,*LPUSER_INFO_1;
-typedef struct _USER_INFO_2 {
- LPWSTR usri2_name;
- LPWSTR usri2_password;
- DWORD usri2_password_age;
- DWORD usri2_priv;
- LPWSTR usri2_home_dir;
- LPWSTR usri2_comment;
- DWORD usri2_flags;
- LPWSTR usri2_script_path;
- DWORD usri2_auth_flags;
- LPWSTR usri2_full_name;
- LPWSTR usri2_usr_comment;
- LPWSTR usri2_parms;
- LPWSTR usri2_workstations;
- DWORD usri2_last_logon;
- DWORD usri2_last_logoff;
- DWORD usri2_acct_expires;
- DWORD usri2_max_storage;
- DWORD usri2_units_per_week;
- PBYTE usri2_logon_hours;
- DWORD usri2_bad_pw_count;
- DWORD usri2_num_logons;
- LPWSTR usri2_logon_server;
- DWORD usri2_country_code;
- DWORD usri2_code_page;
-}USER_INFO_2,*PUSER_INFO_2,*LPUSER_INFO_2;
-typedef struct _USER_INFO_3 {
- LPWSTR usri3_name;
- LPWSTR usri3_password;
- DWORD usri3_password_age;
- DWORD usri3_priv;
- LPWSTR usri3_home_dir;
- LPWSTR usri3_comment;
- DWORD usri3_flags;
- LPWSTR usri3_script_path;
- DWORD usri3_auth_flags;
- LPWSTR usri3_full_name;
- LPWSTR usri3_usr_comment;
- LPWSTR usri3_parms;
- LPWSTR usri3_workstations;
- DWORD usri3_last_logon;
- DWORD usri3_last_logoff;
- DWORD usri3_acct_expires;
- DWORD usri3_max_storage;
- DWORD usri3_units_per_week;
- PBYTE usri3_logon_hours;
- DWORD usri3_bad_pw_count;
- DWORD usri3_num_logons;
- LPWSTR usri3_logon_server;
- DWORD usri3_country_code;
- DWORD usri3_code_page;
- DWORD usri3_user_id;
- DWORD usri3_primary_group_id;
- LPWSTR usri3_profile;
- LPWSTR usri3_home_dir_drive;
- DWORD usri3_password_expired;
-}USER_INFO_3,*PUSER_INFO_3,*LPUSER_INFO_3;
-typedef struct _USER_INFO_4 {
- LPWSTR usri4_name;
- LPWSTR usri4_password;
- DWORD usri4_password_age;
- DWORD usri4_priv;
- LPWSTR usri4_home_dir;
- LPWSTR usri4_comment;
- DWORD usri4_flags;
- LPWSTR usri4_script_path;
- DWORD usri4_auth_flags;
- LPWSTR usri4_full_name;
- LPWSTR usri4_usr_comment;
- LPWSTR usri4_parms;
- LPWSTR usri4_workstations;
- DWORD usri4_last_logon;
- DWORD usri4_last_logoff;
- DWORD usri4_acct_expires;
- DWORD usri4_max_storage;
- DWORD usri4_units_per_week;
- PBYTE usri4_logon_hours;
- DWORD usri4_bad_pw_count;
- DWORD usri4_num_logons;
- LPWSTR usri4_logon_server;
- DWORD usri4_country_code;
- DWORD usri4_code_page;
- PSID usri4_user_sid;
- DWORD usri4_primary_group_id;
- LPWSTR usri4_profile;
- LPWSTR usri4_home_dir_drive;
- DWORD usri4_password_expired;
-}USER_INFO_4,*PUSER_INFO_4,*LPUSER_INFO_4;
-typedef struct _USER_INFO_10 {
- LPWSTR usri10_name;
- LPWSTR usri10_comment;
- LPWSTR usri10_usr_comment;
- LPWSTR usri10_full_name;
-}USER_INFO_10,*PUSER_INFO_10,*LPUSER_INFO_10;
-typedef struct _USER_INFO_11 {
- LPWSTR usri11_name;
- LPWSTR usri11_comment;
- LPWSTR usri11_usr_comment;
- LPWSTR usri11_full_name;
- DWORD usri11_priv;
- DWORD usri11_auth_flags;
- DWORD usri11_password_age;
- LPWSTR usri11_home_dir;
- LPWSTR usri11_parms;
- DWORD usri11_last_logon;
- DWORD usri11_last_logoff;
- DWORD usri11_bad_pw_count;
- DWORD usri11_num_logons;
- LPWSTR usri11_logon_server;
- DWORD usri11_country_code;
- LPWSTR usri11_workstations;
- DWORD usri11_max_storage;
- DWORD usri11_units_per_week;
- PBYTE usri11_logon_hours;
- DWORD usri11_code_page;
-}USER_INFO_11,*PUSER_INFO_11,*LPUSER_INFO_11;
-typedef struct _USER_INFO_20 {
- LPWSTR usri20_name;
- LPWSTR usri20_full_name;
- LPWSTR usri20_comment;
- DWORD usri20_flags;
- DWORD usri20_user_id;
-}USER_INFO_20,*PUSER_INFO_20,*LPUSER_INFO_20;
-typedef struct _USER_INFO_21 {
- BYTE usri21_password[ENCRYPTED_PWLEN];
-}USER_INFO_21,*PUSER_INFO_21,*LPUSER_INFO_21;
-typedef struct _USER_INFO_22 {
- LPWSTR usri22_name;
- BYTE usri22_password[ENCRYPTED_PWLEN];
- DWORD usri22_password_age;
- DWORD usri22_priv;
- LPWSTR usri22_home_dir;
- LPWSTR usri22_comment;
- DWORD usri22_flags;
- LPWSTR usri22_script_path;
- DWORD usri22_auth_flags;
- LPWSTR usri22_full_name;
- LPWSTR usri22_usr_comment;
- LPWSTR usri22_parms;
- LPWSTR usri22_workstations;
- DWORD usri22_last_logon;
- DWORD usri22_last_logoff;
- DWORD usri22_acct_expires;
- DWORD usri22_max_storage;
- DWORD usri22_units_per_week;
- PBYTE usri22_logon_hours;
- DWORD usri22_bad_pw_count;
- DWORD usri22_num_logons;
- LPWSTR usri22_logon_server;
- DWORD usri22_country_code;
- DWORD usri22_code_page;
-}USER_INFO_22,*PUSER_INFO_22,*LPUSER_INFO_22;
-typedef struct _USER_INFO_23 {
- LPWSTR usri23_name;
- LPWSTR usri23_full_name;
- LPWSTR usri23_comment;
- DWORD usri23_flags;
- PSID usri23_user_sid;
-}USER_INFO_23,*PUSER_INFO_23,*LPUSER_INFO_23;
-typedef struct _USER_INFO_1003 {
- LPWSTR usri1003_password;
-} USER_INFO_1003,*PUSER_INFO_1003,*LPUSER_INFO_1003;
-typedef struct _USER_INFO_1005 {
- DWORD usri1005_priv;
-} USER_INFO_1005,*PUSER_INFO_1005,*LPUSER_INFO_1005;
-typedef struct _USER_INFO_1006 {
- LPWSTR usri1006_home_dir;
-} USER_INFO_1006,*PUSER_INFO_1006,*LPUSER_INFO_1006;
-typedef struct _USER_INFO_1007 {
- LPWSTR usri1007_comment;
-} USER_INFO_1007,*PUSER_INFO_1007,*LPUSER_INFO_1007;
-typedef struct _USER_INFO_1008 {
- DWORD usri1008_flags;
-} USER_INFO_1008,*PUSER_INFO_1008,*LPUSER_INFO_1008;
-typedef struct _USER_INFO_1009 {
- LPWSTR usri1009_script_path;
-} USER_INFO_1009,*PUSER_INFO_1009,*LPUSER_INFO_1009;
-typedef struct _USER_INFO_1010 {
- DWORD usri1010_auth_flags;
-} USER_INFO_1010,*PUSER_INFO_1010,*LPUSER_INFO_1010;
-typedef struct _USER_INFO_1011 {
- LPWSTR usri1011_full_name;
-} USER_INFO_1011,*PUSER_INFO_1011,*LPUSER_INFO_1011;
-typedef struct _USER_INFO_1012 {
- LPWSTR usri1012_usr_comment;
-} USER_INFO_1012,*PUSER_INFO_1012,*LPUSER_INFO_1012;
-typedef struct _USER_INFO_1013 {
- LPWSTR usri1013_parms;
-} USER_INFO_1013,*PUSER_INFO_1013,*LPUSER_INFO_1013;
-typedef struct _USER_INFO_1014 {
- LPWSTR usri1014_workstations;
-} USER_INFO_1014,*PUSER_INFO_1014,*LPUSER_INFO_1014;
-typedef struct _USER_INFO_1017 {
- DWORD usri1017_acct_expires;
-} USER_INFO_1017,*PUSER_INFO_1017,*LPUSER_INFO_1017;
-typedef struct _USER_INFO_1018 {
- DWORD usri1018_max_storage;
-} USER_INFO_1018,*PUSER_INFO_1018,*LPUSER_INFO_1018;
-typedef struct _USER_INFO_1020 {
- DWORD usri1020_units_per_week;
- PBYTE usri1020_logon_hours;
-} USER_INFO_1020,*PUSER_INFO_1020,*LPUSER_INFO_1020;
-typedef struct _USER_INFO_1023 {
- LPWSTR usri1023_logon_server;
-} USER_INFO_1023,*PUSER_INFO_1023,*LPUSER_INFO_1023;
-typedef struct _USER_INFO_1024 {
- DWORD usri1024_country_code;
-} USER_INFO_1024,*PUSER_INFO_1024,*LPUSER_INFO_1024;
-typedef struct _USER_INFO_1025 {
- DWORD usri1025_code_page;
-} USER_INFO_1025,*PUSER_INFO_1025,*LPUSER_INFO_1025;
-typedef struct _USER_INFO_1051 {
- DWORD usri1051_primary_group_id;
-} USER_INFO_1051,*PUSER_INFO_1051,*LPUSER_INFO_1051;
-typedef struct _USER_INFO_1052 {
- LPWSTR usri1052_profile;
-} USER_INFO_1052,*PUSER_INFO_1052,*LPUSER_INFO_1052;
-typedef struct _USER_INFO_1053 {
- LPWSTR usri1053_home_dir_drive;
-} USER_INFO_1053,*PUSER_INFO_1053,*LPUSER_INFO_1053;
-typedef struct _USER_MODALS_INFO_0 {
- DWORD usrmod0_min_passwd_len;
- DWORD usrmod0_max_passwd_age;
- DWORD usrmod0_min_passwd_age;
- DWORD usrmod0_force_logoff;
- DWORD usrmod0_password_hist_len;
-}USER_MODALS_INFO_0,*PUSER_MODALS_INFO_0,*LPUSER_MODALS_INFO_0;
-typedef struct _USER_MODALS_INFO_1 {
- DWORD usrmod1_role;
- LPWSTR usrmod1_primary;
-}USER_MODALS_INFO_1,*PUSER_MODALS_INFO_1,*LPUSER_MODALS_INFO_1;
-typedef struct _USER_MODALS_INFO_2 {
- LPWSTR usrmod2_domain_name;
- PSID usrmod2_domain_id;
-}USER_MODALS_INFO_2,*PUSER_MODALS_INFO_2,*LPUSER_MODALS_INFO_2;
-typedef struct _USER_MODALS_INFO_3 {
- DWORD usrmod3_lockout_duration;
- DWORD usrmod3_lockout_observation_window;
- DWORD usrmod3_lockout_threshold;
-}USER_MODALS_INFO_3,*PUSER_MODALS_INFO_3,*LPUSER_MODALS_INFO_3;
-typedef struct _USER_MODALS_INFO_1001 {
- DWORD usrmod1001_min_passwd_len;
-} USER_MODALS_INFO_1001,*PUSER_MODALS_INFO_1001,*LPUSER_MODALS_INFO_1001;
-typedef struct _USER_MODALS_INFO_1002 {
- DWORD usrmod1002_max_passwd_age;
-} USER_MODALS_INFO_1002,*PUSER_MODALS_INFO_1002,*LPUSER_MODALS_INFO_1002;
-typedef struct _USER_MODALS_INFO_1003 {
- DWORD usrmod1003_min_passwd_age;
-} USER_MODALS_INFO_1003,*PUSER_MODALS_INFO_1003,*LPUSER_MODALS_INFO_1003;
-typedef struct _USER_MODALS_INFO_1004 {
- DWORD usrmod1004_force_logoff;
-} USER_MODALS_INFO_1004,*PUSER_MODALS_INFO_1004,*LPUSER_MODALS_INFO_1004;
-typedef struct _USER_MODALS_INFO_1005 {
- DWORD usrmod1005_password_hist_len;
-} USER_MODALS_INFO_1005,*PUSER_MODALS_INFO_1005,*LPUSER_MODALS_INFO_1005;
-typedef struct _USER_MODALS_INFO_1006 {
- DWORD usrmod1006_role;
-} USER_MODALS_INFO_1006,*PUSER_MODALS_INFO_1006,*LPUSER_MODALS_INFO_1006;
-typedef struct _USER_MODALS_INFO_1007 {
- LPWSTR usrmod1007_primary;
-} USER_MODALS_INFO_1007,*PUSER_MODALS_INFO_1007,*LPUSER_MODALS_INFO_1007;
-typedef struct _GROUP_INFO_0 {
- LPWSTR grpi0_name;
-}GROUP_INFO_0,*PGROUP_INFO_0,*LPGROUP_INFO_0;
-typedef struct _GROUP_INFO_1 {
- LPWSTR grpi1_name;
- LPWSTR grpi1_comment;
-}GROUP_INFO_1,*PGROUP_INFO_1,*LPGROUP_INFO_1;
-typedef struct _GROUP_INFO_2 {
- LPWSTR grpi2_name;
- LPWSTR grpi2_comment;
- DWORD grpi2_group_id;
- DWORD grpi2_attributes;
-}GROUP_INFO_2,*PGROUP_INFO_2;
-typedef struct _GROUP_INFO_3 {
- LPWSTR grpi3_name;
- LPWSTR grpi3_comment;
- PSID grpi3_group_sid;
- DWORD grpi3_attributes;
-}GROUP_INFO_3,*PGROUP_INFO_3;
-typedef struct _GROUP_INFO_1002 {
- LPWSTR grpi1002_comment;
-} GROUP_INFO_1002,*PGROUP_INFO_1002,*LPGROUP_INFO_1002;
-typedef struct _GROUP_INFO_1005 {
- DWORD grpi1005_attributes;
-} GROUP_INFO_1005,*PGROUP_INFO_1005,*LPGROUP_INFO_1005;
-typedef struct _GROUP_USERS_INFO_0 {
- LPWSTR grui0_name;
-} GROUP_USERS_INFO_0,*PGROUP_USERS_INFO_0,*LPGROUP_USERS_INFO_0;
-typedef struct _GROUP_USERS_INFO_1 {
- LPWSTR grui1_name;
- DWORD grui1_attributes;
-} GROUP_USERS_INFO_1,*PGROUP_USERS_INFO_1,*LPGROUP_USERS_INFO_1;
-typedef struct _LOCALGROUP_INFO_0 {
- LPWSTR lgrpi0_name;
-}LOCALGROUP_INFO_0,*PLOCALGROUP_INFO_0,*LPLOCALGROUP_INFO_0;
-typedef struct _LOCALGROUP_INFO_1 {
- LPWSTR lgrpi1_name;
- LPWSTR lgrpi1_comment;
-}LOCALGROUP_INFO_1,*PLOCALGROUP_INFO_1,*LPLOCALGROUP_INFO_1;
-typedef struct _LOCALGROUP_INFO_1002 {
- LPWSTR lgrpi1002_comment;
-}LOCALGROUP_INFO_1002,*PLOCALGROUP_INFO_1002,*LPLOCALGROUP_INFO_1002;
-typedef struct _LOCALGROUP_MEMBERS_INFO_0 {
- PSID lgrmi0_sid;
-} LOCALGROUP_MEMBERS_INFO_0,*PLOCALGROUP_MEMBERS_INFO_0,*LPLOCALGROUP_MEMBERS_INFO_0;
-typedef struct _LOCALGROUP_MEMBERS_INFO_1 {
- PSID lgrmi1_sid;
- SID_NAME_USE lgrmi1_sidusage;
- LPWSTR lgrmi1_name;
-} LOCALGROUP_MEMBERS_INFO_1,*PLOCALGROUP_MEMBERS_INFO_1,*LPLOCALGROUP_MEMBERS_INFO_1;
-typedef struct _LOCALGROUP_MEMBERS_INFO_2 {
- PSID lgrmi2_sid;
- SID_NAME_USE lgrmi2_sidusage;
- LPWSTR lgrmi2_domainandname;
-} LOCALGROUP_MEMBERS_INFO_2,*PLOCALGROUP_MEMBERS_INFO_2,*LPLOCALGROUP_MEMBERS_INFO_2;
-typedef struct _LOCALGROUP_MEMBERS_INFO_3 {
- LPWSTR lgrmi3_domainandname;
-} LOCALGROUP_MEMBERS_INFO_3,*PLOCALGROUP_MEMBERS_INFO_3,
-*LPLOCALGROUP_MEMBERS_INFO_3;
-typedef struct _LOCALGROUP_USERS_INFO_0 {
- LPWSTR lgrui0_name;
-} LOCALGROUP_USERS_INFO_0,*PLOCALGROUP_USERS_INFO_0,*LPLOCALGROUP_USERS_INFO_0;
-typedef struct _NET_DISPLAY_USER {
- LPWSTR usri1_name;
- LPWSTR usri1_comment;
- DWORD usri1_flags;
- LPWSTR usri1_full_name;
- DWORD usri1_user_id;
- DWORD usri1_next_index;
-} NET_DISPLAY_USER,*PNET_DISPLAY_USER;
-typedef struct _NET_DISPLAY_MACHINE {
- LPWSTR usri2_name;
- LPWSTR usri2_comment;
- DWORD usri2_flags;
- DWORD usri2_user_id;
- DWORD usri2_next_index;
-} NET_DISPLAY_MACHINE,*PNET_DISPLAY_MACHINE;
-typedef struct _NET_DISPLAY_GROUP {
- LPWSTR grpi3_name;
- LPWSTR grpi3_comment;
- DWORD grpi3_group_id;
- DWORD grpi3_attributes;
- DWORD grpi3_next_index;
-} NET_DISPLAY_GROUP,*PNET_DISPLAY_GROUP;
-typedef struct _ACCESS_INFO_0 {
- LPTSTR acc0_resource_name;
-}ACCESS_INFO_0,*PACCESS_INFO_0,*LPACCESS_INFO_0;
-typedef struct _ACCESS_INFO_1 {
- LPTSTR acc1_resource_name;
- DWORD acc1_attr;
- DWORD acc1_count;
-}ACCESS_INFO_1,*PACCESS_INFO_1,*LPACCESS_INFO_1;
-typedef struct _ACCESS_INFO_1002 {
- DWORD acc1002_attr;
-} ACCESS_INFO_1002,*PACCESS_INFO_1002,*LPACCESS_INFO_1002;
-typedef struct _ACCESS_LIST {
- LPTSTR acl_ugname;
- DWORD acl_access;
-}ACCESS_LIST,*PACCESS_LIST,*LPACCESS_LIST;
-typedef struct _NETLOGON_INFO_1 {
- DWORD netlog1_flags;
- NET_API_STATUS netlog1_pdc_connection_status;
-} NETLOGON_INFO_1,*PNETLOGON_INFO_1;
-typedef struct _NETLOGON_INFO_2 {
- DWORD netlog2_flags;
- NET_API_STATUS netlog2_pdc_connection_status;
- LPWSTR netlog2_trusted_dc_name;
- NET_API_STATUS netlog2_tc_connection_status;
-} NETLOGON_INFO_2,*PNETLOGON_INFO_2;
-typedef struct _NETLOGON_INFO_3 {
- DWORD netlog3_flags;
- DWORD netlog3_logon_attempts;
- DWORD netlog3_reserved1;
- DWORD netlog3_reserved2;
- DWORD netlog3_reserved3;
- DWORD netlog3_reserved4;
- DWORD netlog3_reserved5;
-} NETLOGON_INFO_3,*PNETLOGON_INFO_3;
-
-#if 0
-/* MS has these defined, but the RxNetAccessXX functions aren't documented nor do
- they exist in any headers */
-#define NetAccessAdd RxNetAccessAdd
-#define NetAccessEnum RxNetAccessEnum
-#define NetAccessGetInfo RxNetAccessGetInfo
-#define NetAccessSetInfo RxNetAccessSetInfo
-#define NetAccessDel RxNetAccessDel
-#define NetAccessGetUserPerms RxNetAccessGetUserPerms
-/* These are obsolete */
-NET_API_STATUS WINAPI NetAccessAdd(LPCWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetAccessEnum(LPCWSTR,LPCWSTR,DWORD,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetAccessGetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE*);
-NET_API_STATUS WINAPI NetAccessSetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetAccessDel(LPCWSTR,LPCWSTR);
-NET_API_STATUS WINAPI NetAccessGetUserPerms(LPCWSTR,LPCWSTR,LPCWSTR,PDWORD);
-#endif
-
-NET_API_STATUS WINAPI NetUserAdd(LPCWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetUserEnum(LPCWSTR,DWORD,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetUserGetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE*);
-NET_API_STATUS WINAPI NetUserSetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetUserDel(LPCWSTR,LPCWSTR);
-NET_API_STATUS WINAPI NetUserGetGroups(LPCWSTR,LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetUserSetGroups(LPCWSTR,LPCWSTR,DWORD,PBYTE,DWORD);
-NET_API_STATUS WINAPI NetUserGetLocalGroups(LPCWSTR,LPCWSTR,DWORD,DWORD,PBYTE*,DWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetUserModalsGet(LPCWSTR,DWORD,PBYTE*);
-NET_API_STATUS WINAPI NetUserModalsSet(LPCWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetUserChangePassword(LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
-NET_API_STATUS WINAPI NetGroupAdd(LPCWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetGroupAddUser(LPCWSTR,LPCWSTR,LPCWSTR);
-NET_API_STATUS WINAPI NetGroupEnum(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetGroupGetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE*);
-NET_API_STATUS WINAPI NetGroupSetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetGroupDel(LPCWSTR,LPCWSTR);
-NET_API_STATUS WINAPI NetGroupDelUser(LPCWSTR,LPCWSTR,LPCWSTR);
-NET_API_STATUS WINAPI NetGroupGetUsers(LPCWSTR,LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetGroupSetUsers(LPCWSTR,LPCWSTR,DWORD,PBYTE,DWORD);
-NET_API_STATUS WINAPI NetLocalGroupAdd(LPCWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetLocalGroupAddMember(LPCWSTR,LPCWSTR,PSID);
-NET_API_STATUS WINAPI NetLocalGroupEnum(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetLocalGroupGetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE*);
-NET_API_STATUS WINAPI NetLocalGroupSetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetLocalGroupDel(LPCWSTR,LPCWSTR);
-NET_API_STATUS WINAPI NetLocalGroupDelMember(LPCWSTR,LPCWSTR,PSID);
-NET_API_STATUS WINAPI NetLocalGroupGetMembers(LPCWSTR,LPCWSTR,DWORD,PBYTE*,DWORD,
-PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetLocalGroupSetMembers(LPCWSTR,LPCWSTR,DWORD,PBYTE,DWORD);
-NET_API_STATUS WINAPI NetLocalGroupAddMembers(LPCWSTR,LPCWSTR,DWORD,PBYTE,DWORD);
-NET_API_STATUS WINAPI NetLocalGroupDelMembers(LPCWSTR,LPCWSTR,DWORD,PBYTE,DWORD);
-NET_API_STATUS WINAPI NetQueryDisplayInformation(LPCWSTR,DWORD,DWORD,DWORD,DWORD,PDWORD,PVOID*);
-NET_API_STATUS WINAPI NetGetDisplayInformationIndex(LPCWSTR,DWORD,LPCWSTR,PDWORD);
-NET_API_STATUS WINAPI NetGetDCName(LPCWSTR,LPCWSTR,PBYTE*);
-NET_API_STATUS WINAPI NetGetAnyDCName(LPCWSTR,LPCWSTR,PBYTE*);
-NET_API_STATUS WINAPI I_NetLogonControl(LPCWSTR,DWORD,DWORD,PBYTE*);
-NET_API_STATUS WINAPI I_NetLogonControl2(LPCWSTR,DWORD,DWORD,PBYTE,PBYTE*);
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/lmalert.h b/winsup/w32api/include/lmalert.h
deleted file mode 100644
index 4f59edc..0000000
--- a/winsup/w32api/include/lmalert.h
+++ /dev/null
@@ -1,60 +0,0 @@
-#ifndef _LMALERT_H
-#define _LMALERT_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#define ALERTER_MAILSLOT TEXT("\\\\.\\MAILSLOT\\Alerter")
-#define ALERT_PRINT_EVENT TEXT("PRINTING")
-#define ALERT_MESSAGE_EVENT TEXT("MESSAGE")
-#define ALERT_ERRORLOG_EVENT TEXT("ERRORLOG")
-#define ALERT_ADMIN_EVENT TEXT("ADMIN")
-#define ALERT_USER_EVENT TEXT("USER")
-#define ALERT_OTHER_INFO(x) ((PBYTE)(x)+sizeof(STD_ALERT))
-#define ALERT_VAR_DATA(p) ((PBYTE)(p)+sizeof(*p))
-#define PRJOB_QSTATUS 3
-#define PRJOB_DEVSTATUS 508
-#define PRJOB_COMPLETE 4
-#define PRJOB_INTERV 8
-#define PRJOB_ 16
-#define PRJOB_DESTOFFLINE 32
-#define PRJOB_DESTPAUSED 64
-#define PRJOB_NOTIFY 128
-#define PRJOB_DESTNOPAPER 256
-#define PRJOB_DELETED 32768
-#define PRJOB_QS_QUEUED 0
-#define PRJOB_QS_PAUSED 1
-#define PRJOB_QS_SPOOLING 2
-#define PRJOB_QS_PRINTING 3
-#ifdef __cplusplus
-extern "C" {
-#endif
-typedef struct _ADMIN_OTHER_INFO {
- DWORD alrtad_errcode;
- DWORD alrtad_numstrings;
-}ADMIN_OTHER_INFO,*PADMIN_OTHER_INFO,*LPADMIN_OTHER_INFO;
-typedef struct _STD_ALERT {
- DWORD alrt_timestamp;
- TCHAR alrt_eventname[EVLEN+1];
- TCHAR alrt_servicename[SNLEN+1];
-}STD_ALERT,*PSTD_ALERT,*LPSTD_ALERT;
-typedef struct _ERRLOG_OTHER_INFO {
- DWORD alrter_errcode;
- DWORD alrter_offset;
-}ERRLOG_OTHER_INFO,*PERRLOG_OTHER_INFO,*LPERRLOG_OTHER_INFO;
-typedef struct _PRINT_OTHER_INFO {
- DWORD alrtpr_jobid;
- DWORD alrtpr_status;
- DWORD alrtpr_submitted;
- DWORD alrtpr_size;
-}PRINT_OTHER_INFO,*PPRINT_OTHER_INFO,*LPPRINT_OTHER_INFO;
-typedef struct _USER_OTHER_INFO {
- DWORD alrtus_errcode;
- DWORD alrtus_numstrings;
-}USER_OTHER_INFO,*PUSER_OTHER_INFO,*LPUSER_OTHER_INFO;
-NET_API_STATUS WINAPI NetAlertRaise(LPCWSTR,PVOID,DWORD);
-NET_API_STATUS WINAPI NetAlertRaiseEx(LPCWSTR,PVOID,DWORD,LPCWSTR);
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/lmapibuf.h b/winsup/w32api/include/lmapibuf.h
deleted file mode 100644
index 54de811..0000000
--- a/winsup/w32api/include/lmapibuf.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef _LMAPIBUF_H
-#define _LMAPIBUF_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-NET_API_STATUS WINAPI NetApiBufferAllocate(DWORD,PVOID*);
-NET_API_STATUS WINAPI NetApiBufferFree(PVOID);
-NET_API_STATUS WINAPI NetApiBufferReallocate(PVOID,DWORD,PVOID*);
-NET_API_STATUS WINAPI NetApiBufferSize(PVOID,PDWORD);
-NET_API_STATUS WINAPI NetapipBufferAllocate(DWORD,PVOID*);
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/lmat.h b/winsup/w32api/include/lmat.h
deleted file mode 100644
index 95999a8..0000000
--- a/winsup/w32api/include/lmat.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef _LMAT_H
-#define _LMAT_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define JOB_RUN_PERIODICALLY 1
-#define JOB_EXEC_ERROR 2
-#define JOB_RUNS_TODAY 4
-#define JOB_ADD_CURRENT_DATE 8
-#define JOB_NONINTERACTIVE 16
-#define JOB_INPUT_FLAGS (JOB_RUN_PERIODICALLY|JOB_ADD_CURRENT_DATE|JOB_NONINTERACTIVE)
-#define JOB_OUTPUT_FLAGS (JOB_RUN_PERIODICALLY|JOB_EXEC_ERROR|JOB_RUNS_TODAY|JOB_NONINTERACTIVE)
-typedef struct _AT_ENUM {
- DWORD JobId;
- DWORD JobTime;
- DWORD DaysOfMonth;
- UCHAR DaysOfWeek;
- UCHAR Flags;
- LPWSTR Command;
-} AT_ENUM,*PAT_ENUM,*LPAT_ENUM;
-typedef struct _AT_INFO {
- DWORD JobTime;
- DWORD DaysOfMonth;
- UCHAR DaysOfWeek;
- UCHAR Flags;
- LPWSTR Command;
-} AT_INFO,*PAT_INFO,*LPAT_INFO;
-NET_API_STATUS WINAPI NetScheduleJobAdd(LPWSTR,PBYTE,LPDWORD);
-NET_API_STATUS WINAPI NetScheduleJobDel(LPWSTR,DWORD,DWORD);
-NET_API_STATUS WINAPI NetScheduleJobEnum(LPWSTR,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetScheduleJobGetInfo(LPWSTR,DWORD,PBYTE*);
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/lmaudit.h b/winsup/w32api/include/lmaudit.h
deleted file mode 100644
index 4a97baa..0000000
--- a/winsup/w32api/include/lmaudit.h
+++ /dev/null
@@ -1,250 +0,0 @@
-#ifndef _LMAUDIT_H
-#define _LMAUDIT_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define REVISED_AUDIT_ENTRY_STRUCT
-#define LOGFLAGS_FORWARD 0
-#define LOGFLAGS_BACKWARD 1
-#define LOGFLAGS_SEEK 2
-#define ACTION_LOCKOUT 0
-#define ACTION_ADMINUNLOCK 1
-#define AE_GUEST 0
-#define AE_USER 1
-#define AE_ADMIN 2
-#define AE_NORMAL 0
-#define AE_USERLIMIT 0
-#define AE_GENERAL 0
-#define AE_ERROR 1
-#define AE_SESSDIS 1
-#define AE_BADPW 1
-#define AE_AUTODIS 2
-#define AE_UNSHARE 2
-#define AE_ADMINPRIVREQD 2
-#define AE_ADMINDIS 3
-#define AE_NOACCESSPERM 3
-#define AE_ACCRESTRICT 4
-#define AE_NORMAL_CLOSE 0
-#define AE_SES_CLOSE 1
-#define AE_ADMIN_CLOSE 2
-#define AE_LIM_UNKNOWN 0
-#define AE_LIM_LOGONHOURS 1
-#define AE_LIM_EXPIRED 2
-#define AE_LIM_INVAL_WKSTA 3
-#define AE_LIM_DISABLED 4
-#define AE_LIM_DELETED 5
-#define AE_MOD 0
-#define AE_DELETE 1
-#define AE_ADD 2
-#define AE_UAS_USER 0
-#define AE_UAS_GROUP 1
-#define AE_UAS_MODALS 2
-#define SVAUD_SERVICE 1
-#define SVAUD_GOODSESSLOGON 6
-#define SVAUD_BADSESSLOGON 24
-#define SVAUD_SESSLOGON (SVAUD_GOODSESSLOGON|SVAUD_BADSESSLOGON)
-#define SVAUD_GOODNETLOGON 96
-#define SVAUD_BADNETLOGON 384
-#define SVAUD_NETLOGON (SVAUD_GOODNETLOGON|SVAUD_BADNETLOGON)
-#define SVAUD_LOGON (SVAUD_NETLOGON|SVAUD_SESSLOGON)
-#define SVAUD_GOODUSE 0x600
-#define SVAUD_BADUSE 0x1800
-#define SVAUD_USE (SVAUD_GOODUSE|SVAUD_BADUSE)
-#define SVAUD_USERLIST 8192
-#define SVAUD_PERMISSIONS 16384
-#define SVAUD_RESOURCE 32768
-#define SVAUD_LOGONLIM 65536
-#define AA_AUDIT_ALL 1
-#define AA_A_OWNER 4
-#define AA_CLOSE 8
-#define AA_S_OPEN 16
-#define AA_S_WRITE 32
-#define AA_S_CREATE 32
-#define AA_S_DELETE 64
-#define AA_S_ACL 128
-#define AA_S_ALL 253
-#define AA_F_OPEN 256
-#define AA_F_WRITE 512
-#define AA_F_CREATE 512
-#define AA_F_DELETE 1024
-#define AA_F_ACL 2048
-#define AA_F_ALL (AA_F_OPEN|AA_F_WRITE|AA_F_DELETE|AA_F_ACL)
-#define AA_A_OPEN 2048
-#define AA_A_WRITE 4096
-#define AA_A_CREATE 8192
-#define AA_A_DELETE 16384
-#define AA_A_ACL 32768
-#define AA_A_ALL (AA_F_OPEN|AA_F_WRITE|AA_F_DELETE|AA_F_ACL)
-typedef struct _AUDIT_ENTRY {
- DWORD ae_len;
- DWORD ae_reserved;
- DWORD ae_time;
- DWORD ae_type;
- DWORD ae_data_offset;
- DWORD ae_data_size;
-} AUDIT_ENTRY,*PAUDIT_ENTRY,*LPAUDIT_ENTRY;
-typedef struct _HLOG {
- DWORD time;
- DWORD last_flags;
- DWORD offset;
- DWORD rec_offset;
-} HLOG,*PHLOG,*LPHLOG;
-typedef struct _AE_SRVSTATUS {
- DWORD ae_sv_status;
-} AE_SRVSTATUS,*PAE_SRVSTATUS,*LPAE_SRVSTATUS;
-typedef struct _AE_SESSLOGON {
- DWORD ae_so_compname;
- DWORD ae_so_username;
- DWORD ae_so_privilege;
-} AE_SESSLOGON,*PAE_SESSLOGON,*LPAE_SESSLOGON;
-typedef struct _AE_SESSLOGOFF {
- DWORD ae_sf_compname;
- DWORD ae_sf_username;
- DWORD ae_sf_reason;
-} AE_SESSLOGOFF,*PAE_SESSLOGOFF,*LPAE_SESSLOGOFF;
-typedef struct _AE_SESSPWERR {
- DWORD ae_sp_compname;
- DWORD ae_sp_username;
-} AE_SESSPWERR,*PAE_SESSPWERR,*LPAE_SESSPWERR;
-typedef struct _AE_CONNSTART {
- DWORD ae_ct_compname;
- DWORD ae_ct_username;
- DWORD ae_ct_netname;
- DWORD ae_ct_connid;
-} AE_CONNSTART,*PAE_CONNSTART,*LPAE_CONNSTART;
-typedef struct _AE_CONNSTOP {
- DWORD ae_cp_compname;
- DWORD ae_cp_username;
- DWORD ae_cp_netname;
- DWORD ae_cp_connid;
- DWORD ae_cp_reason;
-} AE_CONNSTOP,*PAE_CONNSTOP,*LPAE_CONNSTOP;
-typedef struct _AE_CONNREJ {
- DWORD ae_cr_compname;
- DWORD ae_cr_username;
- DWORD ae_cr_netname;
- DWORD ae_cr_reason;
-} AE_CONNREJ,*PAE_CONNREJ,*LPAE_CONNREJ;
-typedef struct _AE_RESACCESS {
- DWORD ae_ra_compname;
- DWORD ae_ra_username;
- DWORD ae_ra_resname;
- DWORD ae_ra_operation;
- DWORD ae_ra_returncode;
- DWORD ae_ra_restype;
- DWORD ae_ra_fileid;
-} AE_RESACCESS,*PAE_RESACCESS,*LPAE_RESACCESS;
-typedef struct _AE_RESACCESSREJ {
- DWORD ae_rr_compname;
- DWORD ae_rr_username;
- DWORD ae_rr_resname;
- DWORD ae_rr_operation;
-} AE_RESACCESSREJ,*PAE_RESACCESSREJ,*LPAE_RESACCESSREJ;
-typedef struct _AE_CLOSEFILE {
- DWORD ae_cf_compname;
- DWORD ae_cf_username;
- DWORD ae_cf_resname;
- DWORD ae_cf_fileid;
- DWORD ae_cf_duration;
- DWORD ae_cf_reason;
-} AE_CLOSEFILE,*PAE_CLOSEFILE,*LPAE_CLOSEFILE;
-typedef struct _AE_SERVICESTAT {
- DWORD ae_ss_compname;
- DWORD ae_ss_username;
- DWORD ae_ss_svcname;
- DWORD ae_ss_status;
- DWORD ae_ss_code;
- DWORD ae_ss_text;
- DWORD ae_ss_returnval;
-} AE_SERVICESTAT,*PAE_SERVICESTAT,*LPAE_SERVICESTAT;
-typedef struct _AE_ACLMOD {
- DWORD ae_am_compname;
- DWORD ae_am_username;
- DWORD ae_am_resname;
- DWORD ae_am_action;
- DWORD ae_am_datalen;
-} AE_ACLMOD,*PAE_ACLMOD,*LPAE_ACLMOD;
-typedef struct _AE_UASMOD {
- DWORD ae_um_compname;
- DWORD ae_um_username;
- DWORD ae_um_resname;
- DWORD ae_um_rectype;
- DWORD ae_um_action;
- DWORD ae_um_datalen;
-} AE_UASMOD,*PAE_UASMOD,*LPAE_UASMOD;
-typedef struct _AE_NETLOGON {
- DWORD ae_no_compname;
- DWORD ae_no_username;
- DWORD ae_no_privilege;
- DWORD ae_no_authflags;
-} AE_NETLOGON,*PAE_NETLOGON,*LPAE_NETLOGON;
-typedef struct _AE_NETLOGOFF {
- DWORD ae_nf_compname;
- DWORD ae_nf_username;
- DWORD ae_nf_reserved1;
- DWORD ae_nf_reserved2;
-} AE_NETLOGOFF,*PAE_NETLOGOFF,*LPAE_NETLOGOFF;
-typedef struct _AE_ACCLIM {
- DWORD ae_al_compname;
- DWORD ae_al_username;
- DWORD ae_al_resname;
- DWORD ae_al_limit;
-} AE_ACCLIM,*PAE_ACCLIM,*LPAE_ACCLIM;
-typedef struct _AE_LOCKOUT {
- DWORD ae_lk_compname;
- DWORD ae_lk_username;
- DWORD ae_lk_action;
- DWORD ae_lk_bad_pw_count;
-} AE_LOCKOUT,*PAE_LOCKOUT,*LPAE_LOCKOUT;
-typedef struct _AE_GENERIC {
- DWORD ae_ge_msgfile;
- DWORD ae_ge_msgnum;
- DWORD ae_ge_params;
- DWORD ae_ge_param1;
- DWORD ae_ge_param2;
- DWORD ae_ge_param3;
- DWORD ae_ge_param4;
- DWORD ae_ge_param5;
- DWORD ae_ge_param6;
- DWORD ae_ge_param7;
- DWORD ae_ge_param8;
- DWORD ae_ge_param9;
-} AE_GENERIC,*PAE_GENERIC,*LPAE_GENERIC;
-NET_API_STATUS WINAPI NetAuditClear(LPCWSTR,LPCWSTR,LPCWSTR);
-NET_API_STATUS WINAPI NetAuditRead(LPTSTR,LPTSTR,LPHLOG,DWORD,PDWORD,DWORD,DWORD,PBYTE*,DWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetAuditWrite(DWORD,PBYTE,DWORD,LPTSTR,PBYTE);
-
-/* These conflict with struct typedefs, why? */
-#define AE_SRVSTATUS 0
-#define AE_SESSLOGON 1
-#define AE_SESSLOGOFF 2
-#define AE_SESSPWERR 3
-#define AE_CONNSTART 4
-#define AE_CONNSTOP 5
-#define AE_CONNREJ 6
-#define AE_RESACCESS 7
-#define AE_RESACCESSREJ 8
-#define AE_CLOSEFILE 9
-#define AE_SERVICESTAT 11
-#define AE_ACLMOD 12
-#define AE_UASMOD 13
-#define AE_NETLOGON 14
-#define AE_NETLOGOFF 15
-#define AE_NETLOGDENIED 16
-#define AE_ACCLIMITEXCD 17
-#define AE_RESACCESS2 18
-#define AE_ACLMODFAIL 19
-#define AE_LOCKOUT 20
-#define AE_GENERIC_TYPE 21
-#define AE_SRVSTART 0
-#define AE_SRVPAUSED 1
-#define AE_SRVCONT 2
-#define AE_SRVSTOP 3
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/lmbrowsr.h b/winsup/w32api/include/lmbrowsr.h
deleted file mode 100644
index 4aee464..0000000
--- a/winsup/w32api/include/lmbrowsr.h
+++ /dev/null
@@ -1,74 +0,0 @@
-#ifndef _LMBROWSR_H
-#define _LMBROWSR_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define BROWSER_ROLE_PDC 1
-#define BROWSER_ROLE_BDC 2
-typedef struct _BROWSER_STATISTICS {
- LARGE_INTEGER StatisticsStartTime;
- LARGE_INTEGER NumberOfServerAnnouncements;
- LARGE_INTEGER NumberOfDomainAnnouncements;
- ULONG NumberOfElectionPackets;
- ULONG NumberOfMailslotWrites;
- ULONG NumberOfGetBrowserServerListRequests;
- ULONG NumberOfServerEnumerations;
- ULONG NumberOfDomainEnumerations;
- ULONG NumberOfOtherEnumerations;
- ULONG NumberOfMissedServerAnnouncements;
- ULONG NumberOfMissedMailslotDatagrams;
- ULONG NumberOfMissedGetBrowserServerListRequests;
- ULONG NumberOfFailedServerAnnounceAllocations;
- ULONG NumberOfFailedMailslotAllocations;
- ULONG NumberOfFailedMailslotReceives;
- ULONG NumberOfFailedMailslotWrites;
- ULONG NumberOfFailedMailslotOpens;
- ULONG NumberOfDuplicateMasterAnnouncements;
-LARGE_INTEGER NumberOfIllegalDatagrams;
-} BROWSER_STATISTICS,*PBROWSER_STATISTICS,*LPBROWSER_STATISTICS;
-typedef struct _BROWSER_STATISTICS_100 {
- LARGE_INTEGER StartTime;
- LARGE_INTEGER NumberOfServerAnnouncements;
- LARGE_INTEGER NumberOfDomainAnnouncements;
- ULONG NumberOfElectionPackets;
- ULONG NumberOfMailslotWrites;
- ULONG NumberOfGetBrowserServerListRequests;
- LARGE_INTEGER NumberOfIllegalDatagrams;
-} BROWSER_STATISTICS_100,*PBROWSER_STATISTICS_100;
-typedef struct _BROWSER_STATISTICS_101 {
- LARGE_INTEGER StartTime;
- LARGE_INTEGER NumberOfServerAnnouncements;
- LARGE_INTEGER NumberOfDomainAnnouncements;
- ULONG NumberOfElectionPackets;
- ULONG NumberOfMailslotWrites;
- ULONG NumberOfGetBrowserServerListRequests;
- LARGE_INTEGER NumberOfIllegalDatagrams;
- ULONG NumberOfMissedServerAnnouncements;
- ULONG NumberOfMissedMailslotDatagrams;
- ULONG NumberOfMissedGetBrowserServerListRequests;
- ULONG NumberOfFailedServerAnnounceAllocations;
- ULONG NumberOfFailedMailslotAllocations;
- ULONG NumberOfFailedMailslotReceives;
- ULONG NumberOfFailedMailslotWrites;
- ULONG NumberOfFailedMailslotOpens;
- ULONG NumberOfDuplicateMasterAnnouncements;
-} BROWSER_STATISTICS_101,*PBROWSER_STATISTICS_101;
-
-NET_API_STATUS WINAPI I_BrowserServerEnum(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,DWORD,LPCWSTR,PDWORD);
-NET_API_STATUS WINAPI I_BrowserServerEnumEx(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,DWORD,LPCWSTR,LPCWSTR);
-NET_API_STATUS I_BrowserQueryEmulatedDomains(LPWSTR,PBYTE*,PDWORD);
-NET_API_STATUS I_BrowserQueryOtherDomains(LPCWSTR,PBYTE*,PDWORD,PDWORD);
-NET_API_STATUS I_BrowserResetNetlogonState(LPCWSTR);
-NET_API_STATUS I_BrowserSetNetlogonState(LPWSTR,LPWSTR,LPWSTR,DWORD);
-NET_API_STATUS I_BrowserQueryStatistics(LPCWSTR,LPBROWSER_STATISTICS*);
-NET_API_STATUS I_BrowserResetStatistics(LPCWSTR);
-WORD I_BrowserServerEnumForXactsrv(LPCWSTR,LPCWSTR,ULONG,USHORT,PVOID,WORD,DWORD,PDWORD,PDWORD,DWORD,LPCWSTR,LPCWSTR,PWORD);
-NET_API_STATUS I_BrowserDebugTrace(PWCHAR,PCHAR);
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/lmchdev.h b/winsup/w32api/include/lmchdev.h
deleted file mode 100644
index 3a40968..0000000
--- a/winsup/w32api/include/lmchdev.h
+++ /dev/null
@@ -1,61 +0,0 @@
-#ifndef _LMCHDEV_H
-#define _LMCHDEV_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define CHARDEVQ_NO_REQUESTS (-1)
-#define CHARDEV_CLOSE 0
-#define CHARDEVQ_MAX_PRIORITY 1
-#define CHARDEVQ_DEV_PARMNUM 1
-#define HANDLE_INFO_LEVEL_1 1
-#define HANDLE_CHARTIME_PARMNUM 1
-#define HANDLE_CHARCOUNT_PARMNUM 2
-#define CHARDEV_STAT_OPENED 2
-#define CHARDEVQ_PRIORITY_PARMNUM 2
-#define CHARDEVQ_DEVS_PARMNUM 3
-#define CHARDEV_STAT_ERROR 4
-#define CHARDEVQ_NUMUSERS_PARMNUM 4
-#define CHARDEVQ_NUMAHEAD_PARMNUM 5
-#define CHARDEVQ_DEF_PRIORITY 5
-#define CHARDEVQ_PRIORITY_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+CHARDEVQ_PRIORITY_PARMNUM)
-#define CHARDEVQ_DEVS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+CHARDEVQ_DEVS_PARMNUM)
-#define CHARDEVQ_MIN_PRIORITY 9
-typedef struct _CHARDEV_INFO_0 { LPWSTR ch0_dev; } CHARDEV_INFO_0,*PCHARDEV_INFO_0,*LPCHARDEV_INFO_0;
-typedef struct _CHARDEV_INFO_1 {
- LPWSTR ch1_dev;
- DWORD ch1_status;
- LPWSTR ch1_username;
- DWORD ch1_time;
-} CHARDEV_INFO_1,*PCHARDEV_INFO_1,*LPCHARDEV_INFO_1;
-typedef struct _CHARDEVQ_INFO_0 { LPWSTR cq0_dev; } CHARDEVQ_INFO_0,*PCHARDEVQ_INFO_0,*LPCHARDEVQ_INFO_0;
-typedef struct _CHARDEVQ_INFO_1 {
- LPWSTR cq1_dev;
- DWORD cq1_priority;
- LPWSTR cq1_devs;
- DWORD cq1_numusers;
- DWORD cq1_numahead;
-} CHARDEVQ_INFO_1,*PCHARDEVQ_INFO_1,*LPCHARDEVQ_INFO_1;
-typedef struct _CHARDEVQ_INFO_1002 { DWORD cq1002_priority; } CHARDEVQ_INFO_1002,*PCHARDEVQ_INFO_1002,*LPCHARDEVQ_INFO_1002;
-typedef struct _CHARDEVQ_INFO_1003 { LPWSTR cq1003_devs; } CHARDEVQ_INFO_1003,*PCHARDEVQ_INFO_1003,*LPCHARDEVQ_INFO_1003;
-typedef struct _HANDLE_INFO_1 {
- DWORD hdli1_chartime;
- DWORD hdli1_charcount;
-}HANDLE_INFO_1,*PHANDLE_INFO_1,*LPHANDLE_INFO_1;
-NET_API_STATUS WINAPI NetCharDevEnum(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetCharDevGetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE*);
-NET_API_STATUS WINAPI NetCharDevControl(LPCWSTR,LPCWSTR,DWORD);
-NET_API_STATUS WINAPI NetCharDevQEnum(LPCWSTR,LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetCharDevQGetInfo(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,PBYTE*);
-NET_API_STATUS WINAPI NetCharDevQSetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetCharDevQPurge(LPCWSTR,LPCWSTR);
-NET_API_STATUS WINAPI NetCharDevQPurgeSelf(LPCWSTR,LPCWSTR,LPCWSTR);
-NET_API_STATUS WINAPI NetHandleGetInfo(HANDLE,DWORD,PBYTE*);
-NET_API_STATUS WINAPI NetHandleSetInfo(HANDLE,DWORD,PBYTE,DWORD,PDWORD);
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/lmconfig.h b/winsup/w32api/include/lmconfig.h
deleted file mode 100644
index b75c6ab..0000000
--- a/winsup/w32api/include/lmconfig.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef _LMCONFIG_H
-#define _LMCONFIG_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define REVISED_CONFIG_APIS
-typedef struct _CONFIG_INFO_0 {
- LPWSTR cfgi0_key;
- LPWSTR cfgi0_data;
-} CONFIG_INFO_0,*PCONFIG_INFO_0,*LPCONFIG_INFO_0;
-NET_API_STATUS WINAPI NetConfigGet(LPCWSTR,LPCWSTR,LPCWSTR,PBYTE*);
-NET_API_STATUS WINAPI NetConfigGetAll(LPCWSTR,LPCWSTR,PBYTE*);
-NET_API_STATUS WINAPI NetConfigSet(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,DWORD,PBYTE,DWORD);
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/lmcons.h b/winsup/w32api/include/lmcons.h
deleted file mode 100644
index 27566b3..0000000
--- a/winsup/w32api/include/lmcons.h
+++ /dev/null
@@ -1,75 +0,0 @@
-#ifndef _LMCONS_H
-#define _LMCONS_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#define MESSAGE_FILENAME TEXT("NETMSG")
-#define OS2MSG_FILENAME TEXT("BASE")
-#define HELP_MSG_FILENAME TEXT("NETH")
-#define NET_API_FUNCTION __stdcall
-#define NET_API_STATUS DWORD
-#define API_RET_TYPE NET_API_STATUS
-#define MIN_LANMAN_MESSAGE_ID NERR_BASE
-#define MAX_LANMAN_MESSAGE_ID 5799
-#ifndef CNLEN /* also in nddeapi.h */
-#define CNLEN 15
-#define UNCLEN (CNLEN + 2)
-#endif
-#define DNLEN 15
-#define LM20_CNLEN 15
-#define LM20_DNLEN 15
-#define LM20_SNLEN 15
-#define LM20_STXTLEN 63
-#define LM20_UNCLEN (LM20_CNLEN+2)
-#define LM20_NNLEN 12
-#define LM20_RMLEN (LM20_UNCLEN+1+LM20_NNLEN)
-#define NNLEN 80
-#define RMLEN (UNCLEN+1+NNLEN)
-#define SNLEN 80
-#define STXTLEN 256
-#define PATHLEN 256
-#define LM20_PATHLEN 256
-#define DEVLEN 80
-#define LM20_DEVLEN 8
-#define EVLEN 16
-#define UNLEN 256
-#define LM20_UNLEN 20
-#define GNLEN UNLEN
-#define LM20_GNLEN LM20_UNLEN
-#define PWLEN 256
-#define LM20_PWLEN 14
-#define SHPWLEN 8
-#define CLTYPE_LEN 12
-#define MAXCOMMENTSZ 256
-#define LM20_MAXCOMMENTSZ 48
-#define QNLEN NNLEN
-#define LM20_QNLEN LM20_NNLEN
-#define ALERTSZ 128
-#define MAXDEVENTRIES (sizeof(int)*8)
-#define NETBIOS_NAME_LEN 16
-#define MAX_PREFERRED_LENGTH ((DWORD)-1)
-#define CRYPT_KEY_LEN 7
-#define CRYPT_TXT_LEN 8
-#define ENCRYPTED_PWLEN 16
-#define SESSION_PWLEN 24
-#define SESSION_CRYPT_KLEN 21
-#define PARMNUM_ALL 0
-#define PARM_ERROR_UNKNOWN ((DWORD)-1)
-#define PARM_ERROR_NONE 0
-#define PARMNUM_BASE_INFOLEVEL 1000
-#define PLATFORM_ID_DOS 300
-#define PLATFORM_ID_OS2 400
-#define PLATFORM_ID_NT 500
-#define PLATFORM_ID_OSF 600
-#define PLATFORM_ID_VMS 700
-/* new typedef in W2K */
-#if defined( _WIN32_WINNT ) || defined( WINNT ) || defined( FORCE_UNICODE )
-#define LMSTR LPWSTR
-#define LMCSTR LPCWSTR
-#else
-#define LMSTR LPSTR
-#define LMCSTR LPCSTR
-#endif
-
-#endif
diff --git a/winsup/w32api/include/lmerr.h b/winsup/w32api/include/lmerr.h
deleted file mode 100644
index 58b1484..0000000
--- a/winsup/w32api/include/lmerr.h
+++ /dev/null
@@ -1,306 +0,0 @@
-#ifndef _LMERR_H
-#define _LMERR_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#include <winerror.h>
-#define NERR_Success 0
-#define NERR_BASE 2100
-#define NERR_NetNotStarted (NERR_BASE+2)
-#define NERR_UnknownServer (NERR_BASE+3)
-#define NERR_ShareMem (NERR_BASE+4)
-#define NERR_NoNetworkResource (NERR_BASE+5)
-#define NERR_RemoteOnly (NERR_BASE+6)
-#define NERR_DevNotRedirected (NERR_BASE+7)
-#define NERR_ServerNotStarted (NERR_BASE+14)
-#define NERR_ItemNotFound (NERR_BASE+15)
-#define NERR_UnknownDevDir (NERR_BASE+16)
-#define NERR_RedirectedPath (NERR_BASE+17)
-#define NERR_DuplicateShare (NERR_BASE+18)
-#define NERR_NoRoom (NERR_BASE+19)
-#define NERR_TooManyItems (NERR_BASE+21)
-#define NERR_InvalidMaxUsers (NERR_BASE+22)
-#define NERR_BufTooSmall (NERR_BASE+23)
-#define NERR_RemoteErr (NERR_BASE+27)
-#define NERR_LanmanIniError (NERR_BASE+31)
-#define NERR_NetworkError (NERR_BASE+36)
-#define NERR_WkstaInconsistentState (NERR_BASE+37)
-#define NERR_WkstaNotStarted (NERR_BASE+38)
-#define NERR_BrowserNotStarted (NERR_BASE+39)
-#define NERR_InternalError (NERR_BASE+40)
-#define NERR_BadTransactConfig (NERR_BASE+41)
-#define NERR_InvalidAPI (NERR_BASE+42)
-#define NERR_BadEventName (NERR_BASE+43)
-#define NERR_DupNameReboot (NERR_BASE+44)
-#define NERR_CfgCompNotFound (NERR_BASE+46)
-#define NERR_CfgParamNotFound (NERR_BASE+47)
-#define NERR_LineTooLong (NERR_BASE+49)
-#define NERR_QNotFound (NERR_BASE+50)
-#define NERR_JobNotFound (NERR_BASE+51)
-#define NERR_DestNotFound (NERR_BASE+52)
-#define NERR_DestExists (NERR_BASE+53)
-#define NERR_QExists (NERR_BASE+54)
-#define NERR_QNoRoom (NERR_BASE+55)
-#define NERR_JobNoRoom (NERR_BASE+56)
-#define NERR_DestNoRoom (NERR_BASE+57)
-#define NERR_DestIdle (NERR_BASE+58)
-#define NERR_DestInvalidOp (NERR_BASE+59)
-#define NERR_ProcNoRespond (NERR_BASE+60)
-#define NERR_SpoolerNotLoaded (NERR_BASE+61)
-#define NERR_DestInvalidState (NERR_BASE+62)
-#define NERR_QInvalidState (NERR_BASE+63)
-#define NERR_JobInvalidState (NERR_BASE+64)
-#define NERR_SpoolNoMemory (NERR_BASE+65)
-#define NERR_DriverNotFound (NERR_BASE+66)
-#define NERR_DataTypeInvalid (NERR_BASE+67)
-#define NERR_ProcNotFound (NERR_BASE+68)
-#define NERR_ServiceTableLocked (NERR_BASE+80)
-#define NERR_ServiceTableFull (NERR_BASE+81)
-#define NERR_ServiceInstalled (NERR_BASE+82)
-#define NERR_ServiceEntryLocked (NERR_BASE+83)
-#define NERR_ServiceNotInstalled (NERR_BASE+84)
-#define NERR_BadServiceName (NERR_BASE+85)
-#define NERR_ServiceCtlTimeout (NERR_BASE+86)
-#define NERR_ServiceCtlBusy (NERR_BASE+87)
-#define NERR_BadServiceProgName (NERR_BASE+88)
-#define NERR_ServiceNotCtrl (NERR_BASE+89)
-#define NERR_ServiceKillProc (NERR_BASE+90)
-#define NERR_ServiceCtlNotValid (NERR_BASE+91)
-#define NERR_NotInDispatchTbl (NERR_BASE+92)
-#define NERR_BadControlRecv (NERR_BASE+93)
-#define NERR_ServiceNotStarting (NERR_BASE+94)
-#define NERR_AlreadyLoggedOn (NERR_BASE+100)
-#define NERR_NotLoggedOn (NERR_BASE+101)
-#define NERR_BadUsername (NERR_BASE+102)
-#define NERR_BadPassword (NERR_BASE+103)
-#define NERR_UnableToAddName_W (NERR_BASE+104)
-#define NERR_UnableToAddName_F (NERR_BASE+105)
-#define NERR_UnableToDelName_W (NERR_BASE+106)
-#define NERR_UnableToDelName_F (NERR_BASE+107)
-#define NERR_LogonsPaused (NERR_BASE+109)
-#define NERR_LogonServerConflict (NERR_BASE+110)
-#define NERR_LogonNoUserPath (NERR_BASE+111)
-#define NERR_LogonScriptError (NERR_BASE+112)
-#define NERR_StandaloneLogon (NERR_BASE+114)
-#define NERR_LogonServerNotFound (NERR_BASE+115)
-#define NERR_LogonDomainExists (NERR_BASE+116)
-#define NERR_NonValidatedLogon (NERR_BASE+117)
-#define NERR_ACFNotFound (NERR_BASE+119)
-#define NERR_GroupNotFound (NERR_BASE+120)
-#define NERR_UserNotFound (NERR_BASE+121)
-#define NERR_ResourceNotFound (NERR_BASE+122)
-#define NERR_GroupExists (NERR_BASE+123)
-#define NERR_UserExists (NERR_BASE+124)
-#define NERR_ResourceExists (NERR_BASE+125)
-#define NERR_NotPrimary (NERR_BASE+126)
-#define NERR_ACFNotLoaded (NERR_BASE+127)
-#define NERR_ACFNoRoom (NERR_BASE+128)
-#define NERR_ACFFileIOFail (NERR_BASE+129)
-#define NERR_ACFTooManyLists (NERR_BASE+130)
-#define NERR_UserLogon (NERR_BASE+131)
-#define NERR_ACFNoParent (NERR_BASE+132)
-#define NERR_CanNotGrowSegment (NERR_BASE+133)
-#define NERR_SpeGroupOp (NERR_BASE+134)
-#define NERR_NotInCache (NERR_BASE+135)
-#define NERR_UserInGroup (NERR_BASE+136)
-#define NERR_UserNotInGroup (NERR_BASE+137)
-#define NERR_AccountUndefined (NERR_BASE+138)
-#define NERR_AccountExpired (NERR_BASE+139)
-#define NERR_InvalidWorkstation (NERR_BASE+140)
-#define NERR_InvalidLogonHours (NERR_BASE+141)
-#define NERR_PasswordExpired (NERR_BASE+142)
-#define NERR_PasswordCantChange (NERR_BASE+143)
-#define NERR_PasswordHistConflict (NERR_BASE+144)
-#define NERR_PasswordTooShort (NERR_BASE+145)
-#define NERR_PasswordTooRecent (NERR_BASE+146)
-#define NERR_InvalidDatabase (NERR_BASE+147)
-#define NERR_DatabaseUpToDate (NERR_BASE+148)
-#define NERR_SyncRequired (NERR_BASE+149)
-#define NERR_UseNotFound (NERR_BASE+150)
-#define NERR_BadAsgType (NERR_BASE+151)
-#define NERR_DeviceIsShared (NERR_BASE+152)
-#define NERR_NoComputerName (NERR_BASE+170)
-#define NERR_MsgAlreadyStarted (NERR_BASE+171)
-#define NERR_MsgInitFailed (NERR_BASE+172)
-#define NERR_NameNotFound (NERR_BASE+173)
-#define NERR_AlreadyForwarded (NERR_BASE+174)
-#define NERR_AddForwarded (NERR_BASE+175)
-#define NERR_AlreadyExists (NERR_BASE+176)
-#define NERR_TooManyNames (NERR_BASE+177)
-#define NERR_DelComputerName (NERR_BASE+178)
-#define NERR_LocalForward (NERR_BASE+179)
-#define NERR_GrpMsgProcessor (NERR_BASE+180)
-#define NERR_PausedRemote (NERR_BASE+181)
-#define NERR_BadReceive (NERR_BASE+182)
-#define NERR_NameInUse (NERR_BASE+183)
-#define NERR_MsgNotStarted (NERR_BASE+184)
-#define NERR_NotLocalName (NERR_BASE+185)
-#define NERR_NoForwardName (NERR_BASE+186)
-#define NERR_RemoteFull (NERR_BASE+187)
-#define NERR_NameNotForwarded (NERR_BASE+188)
-#define NERR_TruncatedBroadcast (NERR_BASE+189)
-#define NERR_InvalidDevice (NERR_BASE+194)
-#define NERR_WriteFault (NERR_BASE+195)
-#define NERR_DuplicateName (NERR_BASE+197)
-#define NERR_DeleteLater (NERR_BASE+198)
-#define NERR_IncompleteDel (NERR_BASE+199)
-#define NERR_MultipleNets (NERR_BASE+200)
-#define NERR_NetNameNotFound (NERR_BASE+210)
-#define NERR_DeviceNotShared (NERR_BASE+211)
-#define NERR_ClientNameNotFound (NERR_BASE+212)
-#define NERR_FileIdNotFound (NERR_BASE+214)
-#define NERR_ExecFailure (NERR_BASE+215)
-#define NERR_TmpFile (NERR_BASE+216)
-#define NERR_TooMuchData (NERR_BASE+217)
-#define NERR_DeviceShareConflict (NERR_BASE+218)
-#define NERR_BrowserTableIncomplete (NERR_BASE+219)
-#define NERR_NotLocalDomain (NERR_BASE+220)
-#define NERR_DevInvalidOpCode (NERR_BASE+231)
-#define NERR_DevNotFound (NERR_BASE+232)
-#define NERR_DevNotOpen (NERR_BASE+233)
-#define NERR_BadQueueDevString (NERR_BASE+234)
-#define NERR_BadQueuePriority (NERR_BASE+235)
-#define NERR_NoCommDevs (NERR_BASE+237)
-#define NERR_QueueNotFound (NERR_BASE+238)
-#define NERR_BadDevString (NERR_BASE+240)
-#define NERR_BadDev (NERR_BASE+241)
-#define NERR_InUseBySpooler (NERR_BASE+242)
-#define NERR_CommDevInUse (NERR_BASE+243)
-#define NERR_InvalidComputer (NERR_BASE+251)
-#define NERR_MaxLenExceeded (NERR_BASE+254)
-#define NERR_BadComponent (NERR_BASE+256)
-#define NERR_CantType (NERR_BASE+257)
-#define NERR_TooManyEntries (NERR_BASE+262)
-#define NERR_ProfileFileTooBig (NERR_BASE+270)
-#define NERR_ProfileOffset (NERR_BASE+271)
-#define NERR_ProfileCleanup (NERR_BASE+272)
-#define NERR_ProfileUnknownCmd (NERR_BASE+273)
-#define NERR_ProfileLoadErr (NERR_BASE+274)
-#define NERR_ProfileSaveErr (NERR_BASE+275)
-#define NERR_LogOverflow (NERR_BASE+277)
-#define NERR_LogFileChanged (NERR_BASE+278)
-#define NERR_LogFileCorrupt (NERR_BASE+279)
-#define NERR_SourceIsDir (NERR_BASE+280)
-#define NERR_BadSource (NERR_BASE+281)
-#define NERR_BadDest (NERR_BASE+282)
-#define NERR_DifferentServers (NERR_BASE+283)
-#define NERR_RunSrvPaused (NERR_BASE+285)
-#define NERR_ErrCommRunSrv (NERR_BASE+289)
-#define NERR_ErrorExecingGhost (NERR_BASE+291)
-#define NERR_ShareNotFound (NERR_BASE+292)
-#define NERR_InvalidLana (NERR_BASE+300)
-#define NERR_OpenFiles (NERR_BASE+301)
-#define NERR_ActiveConns (NERR_BASE+302)
-#define NERR_BadPasswordCore (NERR_BASE+303)
-#define NERR_DevInUse (NERR_BASE+304)
-#define NERR_LocalDrive (NERR_BASE+305)
-#define NERR_AlertExists (NERR_BASE+330)
-#define NERR_TooManyAlerts (NERR_BASE+331)
-#define NERR_NoSuchAlert (NERR_BASE+332)
-#define NERR_BadRecipient (NERR_BASE+333)
-#define NERR_AcctLimitExceeded (NERR_BASE+334)
-#define NERR_InvalidLogSeek (NERR_BASE+340)
-#define NERR_BadUasConfig (NERR_BASE+350)
-#define NERR_InvalidUASOp (NERR_BASE+351)
-#define NERR_LastAdmin (NERR_BASE+352)
-#define NERR_DCNotFound (NERR_BASE+353)
-#define NERR_LogonTrackingError (NERR_BASE+354)
-#define NERR_NetlogonNotStarted (NERR_BASE+355)
-#define NERR_CanNotGrowUASFile (NERR_BASE+356)
-#define NERR_TimeDiffAtDC (NERR_BASE+357)
-#define NERR_PasswordMismatch (NERR_BASE+358)
-#define NERR_NoSuchServer (NERR_BASE+360)
-#define NERR_NoSuchSession (NERR_BASE+361)
-#define NERR_NoSuchConnection (NERR_BASE+362)
-#define NERR_TooManyServers (NERR_BASE+363)
-#define NERR_TooManySessions (NERR_BASE+364)
-#define NERR_TooManyConnections (NERR_BASE+365)
-#define NERR_TooManyFiles (NERR_BASE+366)
-#define NERR_NoAlternateServers (NERR_BASE+367)
-#define NERR_TryDownLevel (NERR_BASE+370)
-#define NERR_UPSDriverNotStarted (NERR_BASE+380)
-#define NERR_UPSInvalidConfig (NERR_BASE+381)
-#define NERR_UPSInvalidCommPort (NERR_BASE+382)
-#define NERR_UPSSignalAsserted (NERR_BASE+383)
-#define NERR_UPSShutdownFailed (NERR_BASE+384)
-#define NERR_BadDosRetCode (NERR_BASE+400)
-#define NERR_ProgNeedsExtraMem (NERR_BASE+401)
-#define NERR_BadDosFunction (NERR_BASE+402)
-#define NERR_RemoteBootFailed (NERR_BASE+403)
-#define NERR_BadFileCheckSum (NERR_BASE+404)
-#define NERR_NoRplBootSystem (NERR_BASE+405)
-#define NERR_RplLoadrNetBiosErr (NERR_BASE+406)
-#define NERR_RplLoadrDiskErr (NERR_BASE+407)
-#define NERR_ImageParamErr (NERR_BASE+408)
-#define NERR_TooManyImageParams (NERR_BASE+409)
-#define NERR_NonDosFloppyUsed (NERR_BASE+410)
-#define NERR_RplBootRestart (NERR_BASE+411)
-#define NERR_RplSrvrCallFailed (NERR_BASE+412)
-#define NERR_CantConnectRplSrvr (NERR_BASE+413)
-#define NERR_CantOpenImageFile (NERR_BASE+414)
-#define NERR_CallingRplSrvr (NERR_BASE+415)
-#define NERR_StartingRplBoot (NERR_BASE+416)
-#define NERR_RplBootServiceTerm (NERR_BASE+417)
-#define NERR_RplBootStartFailed (NERR_BASE+418)
-#define NERR_RPL_CONNECTED (NERR_BASE+419)
-#define NERR_BrowserConfiguredToNotRun (NERR_BASE+450)
-#define NERR_RplNoAdaptersStarted (NERR_BASE+510)
-#define NERR_RplBadRegistry (NERR_BASE+511)
-#define NERR_RplBadDatabase (NERR_BASE+512)
-#define NERR_RplRplfilesShare (NERR_BASE+513)
-#define NERR_RplNotRplServer (NERR_BASE+514)
-#define NERR_RplCannotEnum (NERR_BASE+515)
-#define NERR_RplWkstaInfoCorrupted (NERR_BASE+516)
-#define NERR_RplWkstaNotFound (NERR_BASE+517)
-#define NERR_RplWkstaNameUnavailable (NERR_BASE+518)
-#define NERR_RplProfileInfoCorrupted (NERR_BASE+519)
-#define NERR_RplProfileNotFound (NERR_BASE+520)
-#define NERR_RplProfileNameUnavailable (NERR_BASE+521)
-#define NERR_RplProfileNotEmpty (NERR_BASE+522)
-#define NERR_RplConfigInfoCorrupted (NERR_BASE+523)
-#define NERR_RplConfigNotFound (NERR_BASE+524)
-#define NERR_RplAdapterInfoCorrupted (NERR_BASE+525)
-#define NERR_RplInternal (NERR_BASE+526)
-#define NERR_RplVendorInfoCorrupted (NERR_BASE+527)
-#define NERR_RplBootInfoCorrupted (NERR_BASE+528)
-#define NERR_RplWkstaNeedsUserAcct (NERR_BASE+529)
-#define NERR_RplNeedsRPLUSERAcct (NERR_BASE+530)
-#define NERR_RplBootNotFound (NERR_BASE+531)
-#define NERR_RplIncompatibleProfile (NERR_BASE+532)
-#define NERR_RplAdapterNameUnavailable (NERR_BASE+533)
-#define NERR_RplConfigNotEmpty (NERR_BASE+534)
-#define NERR_RplBootInUse (NERR_BASE+535)
-#define NERR_RplBackupDatabase (NERR_BASE+536)
-#define NERR_RplAdapterNotFound (NERR_BASE+537)
-#define NERR_RplVendorNotFound (NERR_BASE+538)
-#define NERR_RplVendorNameUnavailable (NERR_BASE+539)
-#define NERR_RplBootNameUnavailable (NERR_BASE+540)
-#define NERR_RplConfigNameUnavailable (NERR_BASE+541)
-#define NERR_DfsInternalCorruption (NERR_BASE+560)
-#define NERR_DfsVolumeDataCorrupt (NERR_BASE+561)
-#define NERR_DfsNoSuchVolume (NERR_BASE+562)
-#define NERR_DfsVolumeAlreadyExists (NERR_BASE+563)
-#define NERR_DfsAlreadyShared (NERR_BASE+564)
-#define NERR_DfsNoSuchShare (NERR_BASE+565)
-#define NERR_DfsNotALeafVolume (NERR_BASE+566)
-#define NERR_DfsLeafVolume (NERR_BASE+567)
-#define NERR_DfsVolumeHasMultipleServers (NERR_BASE+568)
-#define NERR_DfsCantCreateJunctionPoint (NERR_BASE+569)
-#define NERR_DfsServerNotDfsAware (NERR_BASE+570)
-#define NERR_DfsBadRenamePath (NERR_BASE+571)
-#define NERR_DfsVolumeIsOffline (NERR_BASE+572)
-#define NERR_DfsNoSuchServer (NERR_BASE+573)
-#define NERR_DfsCyclicalName (NERR_BASE+574)
-#define NERR_DfsNotSupportedInServerDfs (NERR_BASE+575)
-#define NERR_DfsDuplicateService (NERR_BASE+576)
-#define NERR_DfsCantRemoveLastServerShare (NERR_BASE+577)
-#define NERR_DfsVolumeIsInterDfs (NERR_BASE+578)
-#define NERR_DfsInconsistent (NERR_BASE+579)
-#define NERR_DfsServerUpgraded (NERR_BASE+580)
-#define NERR_DfsDataIsIdentical (NERR_BASE+581)
-#define NERR_DfsCantRemoveDfsRoot (NERR_BASE+582)
-#define NERR_DfsChildOrParentInDfs (NERR_BASE+583)
-#define NERR_DfsInternalError (NERR_BASE+590)
-#define MAX_NERR (NERR_BASE+899)
-#endif
diff --git a/winsup/w32api/include/lmerrlog.h b/winsup/w32api/include/lmerrlog.h
deleted file mode 100644
index 2f41603..0000000
--- a/winsup/w32api/include/lmerrlog.h
+++ /dev/null
@@ -1,211 +0,0 @@
-#ifndef _LMERRLOG_H
-#define _LMERRLOG_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define ERRLOG_BASE 3100
-#define ERRLOG2_BASE 5700
-#define LOGFLAGS_FORWARD 0
-#define LOGFLAGS_BACKWARD 1
-#define LOGFLAGS_SEEK 2
-#define NELOG_Internal_Error ERRLOG_BASE
-#define NELOG_Resource_Shortage (ERRLOG_BASE+1)
-#define NELOG_Unable_To_Lock_Segment (ERRLOG_BASE+2)
-#define NELOG_Unable_To_Unlock_Segment (ERRLOG_BASE+3)
-#define NELOG_Uninstall_Service (ERRLOG_BASE+4)
-#define NELOG_Init_Exec_Fail (ERRLOG_BASE+5)
-#define NELOG_Ncb_Error (ERRLOG_BASE+6)
-#define NELOG_Net_Not_Started (ERRLOG_BASE+7)
-#define NELOG_Ioctl_Error (ERRLOG_BASE+8)
-#define NELOG_System_Semaphore (ERRLOG_BASE+9)
-#define NELOG_Init_OpenCreate_Err (ERRLOG_BASE+10)
-#define NELOG_NetBios (ERRLOG_BASE+11)
-#define NELOG_SMB_Illegal (ERRLOG_BASE+12)
-#define NELOG_Service_Fail (ERRLOG_BASE+13)
-#define NELOG_Entries_Lost (ERRLOG_BASE+14)
-#define NELOG_Init_Seg_Overflow (ERRLOG_BASE+20)
-#define NELOG_Srv_No_Mem_Grow (ERRLOG_BASE+21)
-#define NELOG_Access_File_Bad (ERRLOG_BASE+22)
-#define NELOG_Srvnet_Not_Started (ERRLOG_BASE+23)
-#define NELOG_Init_Chardev_Err (ERRLOG_BASE+24)
-#define NELOG_Remote_API (ERRLOG_BASE+25)
-#define NELOG_Ncb_TooManyErr (ERRLOG_BASE+26)
-#define NELOG_Mailslot_err (ERRLOG_BASE+27)
-#define NELOG_ReleaseMem_Alert (ERRLOG_BASE+28)
-#define NELOG_AT_cannot_write (ERRLOG_BASE+29)
-#define NELOG_Cant_Make_Msg_File (ERRLOG_BASE+30)
-#define NELOG_Exec_Netservr_NoMem (ERRLOG_BASE+31)
-#define NELOG_Server_Lock_Failure (ERRLOG_BASE+32)
-#define NELOG_Msg_Shutdown (ERRLOG_BASE+40)
-#define NELOG_Msg_Sem_Shutdown (ERRLOG_BASE+41)
-#define NELOG_Msg_Log_Err (ERRLOG_BASE+50)
-#define NELOG_VIO_POPUP_ERR (ERRLOG_BASE+51)
-#define NELOG_Msg_Unexpected_SMB_Type (ERRLOG_BASE+52)
-#define NELOG_Wksta_Infoseg (ERRLOG_BASE+60)
-#define NELOG_Wksta_Compname (ERRLOG_BASE+61)
-#define NELOG_Wksta_BiosThreadFailure (ERRLOG_BASE+62)
-#define NELOG_Wksta_IniSeg (ERRLOG_BASE+63)
-#define NELOG_Wksta_HostTab_Full (ERRLOG_BASE+64)
-#define NELOG_Wksta_Bad_Mailslot_SMB (ERRLOG_BASE+65)
-#define NELOG_Wksta_UASInit (ERRLOG_BASE+66)
-#define NELOG_Wksta_SSIRelogon (ERRLOG_BASE+67)
-#define NELOG_Build_Name (ERRLOG_BASE+70)
-#define NELOG_Name_Expansion (ERRLOG_BASE+71)
-#define NELOG_Message_Send (ERRLOG_BASE+72)
-#define NELOG_Mail_Slt_Err (ERRLOG_BASE+73)
-#define NELOG_AT_cannot_read (ERRLOG_BASE+74)
-#define NELOG_AT_sched_err (ERRLOG_BASE+75)
-#define NELOG_AT_schedule_file_created (ERRLOG_BASE+76)
-#define NELOG_Srvnet_NB_Open (ERRLOG_BASE+77)
-#define NELOG_AT_Exec_Err (ERRLOG_BASE+78)
-#define NELOG_Lazy_Write_Err (ERRLOG_BASE+80)
-#define NELOG_HotFix (ERRLOG_BASE+81)
-#define NELOG_HardErr_From_Server (ERRLOG_BASE+82)
-#define NELOG_LocalSecFail1 (ERRLOG_BASE+83)
-#define NELOG_LocalSecFail2 (ERRLOG_BASE+84)
-#define NELOG_LocalSecFail3 (ERRLOG_BASE+85)
-#define NELOG_LocalSecGeneralFail (ERRLOG_BASE+86)
-#define NELOG_NetWkSta_Internal_Error (ERRLOG_BASE+90)
-#define NELOG_NetWkSta_No_Resource (ERRLOG_BASE+91)
-#define NELOG_NetWkSta_SMB_Err (ERRLOG_BASE+92)
-#define NELOG_NetWkSta_VC_Err (ERRLOG_BASE+93)
-#define NELOG_NetWkSta_Stuck_VC_Err (ERRLOG_BASE+94)
-#define NELOG_NetWkSta_NCB_Err (ERRLOG_BASE+95)
-#define NELOG_NetWkSta_Write_Behind_Err (ERRLOG_BASE+96)
-#define NELOG_NetWkSta_Reset_Err (ERRLOG_BASE+97)
-#define NELOG_NetWkSta_Too_Many (ERRLOG_BASE+98)
-#define NELOG_Srv_Thread_Failure (ERRLOG_BASE+104)
-#define NELOG_Srv_Close_Failure (ERRLOG_BASE+105)
-#define NELOG_ReplUserCurDir (ERRLOG_BASE+106)
-#define NELOG_ReplCannotMasterDir (ERRLOG_BASE+107)
-#define NELOG_ReplUpdateError (ERRLOG_BASE+108)
-#define NELOG_ReplLostMaster (ERRLOG_BASE+109)
-#define NELOG_NetlogonAuthDCFail (ERRLOG_BASE+110)
-#define NELOG_ReplLogonFailed (ERRLOG_BASE+111)
-#define NELOG_ReplNetErr (ERRLOG_BASE+112)
-#define NELOG_ReplMaxFiles (ERRLOG_BASE+113)
-#define NELOG_ReplMaxTreeDepth (ERRLOG_BASE+114)
-#define NELOG_ReplBadMsg (ERRLOG_BASE+115)
-#define NELOG_ReplSysErr (ERRLOG_BASE+116)
-#define NELOG_ReplUserLoged (ERRLOG_BASE+117)
-#define NELOG_ReplBadImport (ERRLOG_BASE+118)
-#define NELOG_ReplBadExport (ERRLOG_BASE+119)
-#define NELOG_ReplSignalFileErr (ERRLOG_BASE+120)
-#define NELOG_DiskFT (ERRLOG_BASE+121)
-#define NELOG_ReplAccessDenied (ERRLOG_BASE+122)
-#define NELOG_NetlogonFailedPrimary (ERRLOG_BASE+123)
-#define NELOG_NetlogonPasswdSetFailed (ERRLOG_BASE+124)
-#define NELOG_NetlogonTrackingError (ERRLOG_BASE+125)
-#define NELOG_NetlogonSyncError (ERRLOG_BASE+126)
-#define NELOG_UPS_PowerOut (ERRLOG_BASE+130)
-#define NELOG_UPS_Shutdown (ERRLOG_BASE+131)
-#define NELOG_UPS_CmdFileError (ERRLOG_BASE+132)
-#define NELOG_UPS_CannotOpenDriver (ERRLOG_BASE+133)
-#define NELOG_UPS_PowerBack (ERRLOG_BASE+134)
-#define NELOG_UPS_CmdFileConfig (ERRLOG_BASE+135)
-#define NELOG_UPS_CmdFileExec (ERRLOG_BASE+136)
-#define NELOG_Missing_Parameter (ERRLOG_BASE+150)
-#define NELOG_Invalid_Config_Line (ERRLOG_BASE+151)
-#define NELOG_Invalid_Config_File (ERRLOG_BASE+152)
-#define NELOG_File_Changed (ERRLOG_BASE+153)
-#define NELOG_Files_Dont_Fit (ERRLOG_BASE+154)
-#define NELOG_Wrong_DLL_Version (ERRLOG_BASE+155)
-#define NELOG_Error_in_DLL (ERRLOG_BASE+156)
-#define NELOG_System_Error (ERRLOG_BASE+157)
-#define NELOG_FT_ErrLog_Too_Large (ERRLOG_BASE+158)
-#define NELOG_FT_Update_In_Progress (ERRLOG_BASE+159)
-#define NELOG_OEM_Code (ERRLOG_BASE+199)
-#define NELOG_NetlogonSSIInitError ERRLOG2_BASE
-#define NELOG_NetlogonFailedToUpdateTrustList (ERRLOG2_BASE+1)
-#define NELOG_NetlogonFailedToAddRpcInterface (ERRLOG2_BASE+2)
-#define NELOG_NetlogonFailedToReadMailslot (ERRLOG2_BASE+3)
-#define NELOG_NetlogonFailedToRegisterSC (ERRLOG2_BASE+4)
-#define NELOG_NetlogonChangeLogCorrupt (ERRLOG2_BASE+5)
-#define NELOG_NetlogonFailedToCreateShare (ERRLOG2_BASE+6)
-#define NELOG_NetlogonDownLevelLogonFailed (ERRLOG2_BASE+7)
-#define NELOG_NetlogonDownLevelLogoffFailed (ERRLOG2_BASE+8)
-#define NELOG_NetlogonNTLogonFailed (ERRLOG2_BASE+9)
-#define NELOG_NetlogonNTLogoffFailed (ERRLOG2_BASE+10)
-#define NELOG_NetlogonPartialSyncCallSuccess (ERRLOG2_BASE+11)
-#define NELOG_NetlogonPartialSyncCallFailed (ERRLOG2_BASE+12)
-#define NELOG_NetlogonFullSyncCallSuccess (ERRLOG2_BASE+13)
-#define NELOG_NetlogonFullSyncCallFailed (ERRLOG2_BASE+14)
-#define NELOG_NetlogonPartialSyncSuccess (ERRLOG2_BASE+15)
-#define NELOG_NetlogonPartialSyncFailed (ERRLOG2_BASE+16)
-#define NELOG_NetlogonFullSyncSuccess (ERRLOG2_BASE+17)
-#define NELOG_NetlogonFullSyncFailed (ERRLOG2_BASE+18)
-#define NELOG_NetlogonAuthNoDomainController (ERRLOG2_BASE+19)
-#define NELOG_NetlogonAuthNoTrustLsaSecret (ERRLOG2_BASE+20)
-#define NELOG_NetlogonAuthNoTrustSamAccount (ERRLOG2_BASE+21)
-#define NELOG_NetlogonServerAuthFailed (ERRLOG2_BASE+22)
-#define NELOG_NetlogonServerAuthNoTrustSamAccount (ERRLOG2_BASE+23)
-#define NELOG_FailedToRegisterSC (ERRLOG2_BASE+24)
-#define NELOG_FailedToSetServiceStatus (ERRLOG2_BASE+25)
-#define NELOG_FailedToGetComputerName (ERRLOG2_BASE+26)
-#define NELOG_DriverNotLoaded (ERRLOG2_BASE+27)
-#define NELOG_NoTranportLoaded (ERRLOG2_BASE+28)
-#define NELOG_NetlogonFailedDomainDelta (ERRLOG2_BASE+29)
-#define NELOG_NetlogonFailedGlobalGroupDelta (ERRLOG2_BASE+30)
-#define NELOG_NetlogonFailedLocalGroupDelta (ERRLOG2_BASE+31)
-#define NELOG_NetlogonFailedUserDelta (ERRLOG2_BASE+32)
-#define NELOG_NetlogonFailedPolicyDelta (ERRLOG2_BASE+33)
-#define NELOG_NetlogonFailedTrustedDomainDelta (ERRLOG2_BASE+34)
-#define NELOG_NetlogonFailedAccountDelta (ERRLOG2_BASE+35)
-#define NELOG_NetlogonFailedSecretDelta (ERRLOG2_BASE+36)
-#define NELOG_NetlogonSystemError (ERRLOG2_BASE+37)
-#define NELOG_NetlogonDuplicateMachineAccounts (ERRLOG2_BASE+38)
-#define NELOG_NetlogonTooManyGlobalGroups (ERRLOG2_BASE+39)
-#define NELOG_NetlogonBrowserDriver (ERRLOG2_BASE+40)
-#define NELOG_NetlogonAddNameFailure (ERRLOG2_BASE+41)
-#define NELOG_RplMessages (ERRLOG2_BASE+42)
-#define NELOG_RplXnsBoot (ERRLOG2_BASE+43)
-#define NELOG_RplSystem (ERRLOG2_BASE+44)
-#define NELOG_RplWkstaTimeout (ERRLOG2_BASE+45)
-#define NELOG_RplWkstaFileOpen (ERRLOG2_BASE+46)
-#define NELOG_RplWkstaFileRead (ERRLOG2_BASE+47)
-#define NELOG_RplWkstaMemory (ERRLOG2_BASE+48)
-#define NELOG_RplWkstaFileChecksum (ERRLOG2_BASE+49)
-#define NELOG_RplWkstaFileLineCount (ERRLOG2_BASE+50)
-#define NELOG_RplWkstaBbcFile (ERRLOG2_BASE+51)
-#define NELOG_RplWkstaFileSize (ERRLOG2_BASE+52)
-#define NELOG_RplWkstaInternal (ERRLOG2_BASE+53)
-#define NELOG_RplWkstaWrongVersion (ERRLOG2_BASE+54)
-#define NELOG_RplWkstaNetwork (ERRLOG2_BASE+55)
-#define NELOG_RplAdapterResource (ERRLOG2_BASE+56)
-#define NELOG_RplFileCopy (ERRLOG2_BASE+57)
-#define NELOG_RplFileDelete (ERRLOG2_BASE+58)
-#define NELOG_RplFilePerms (ERRLOG2_BASE+59)
-#define NELOG_RplCheckConfigs (ERRLOG2_BASE+60)
-#define NELOG_RplCreateProfiles (ERRLOG2_BASE+61)
-#define NELOG_RplRegistry (ERRLOG2_BASE+62)
-#define NELOG_RplReplaceRPLDISK (ERRLOG2_BASE+63)
-#define NELOG_RplCheckSecurity (ERRLOG2_BASE+64)
-#define NELOG_RplBackupDatabase (ERRLOG2_BASE+65)
-#define NELOG_RplInitDatabase (ERRLOG2_BASE+66)
-#define NELOG_RplRestoreDatabaseFailure (ERRLOG2_BASE+67)
-#define NELOG_RplRestoreDatabaseSuccess (ERRLOG2_BASE+68)
-#define NELOG_RplInitRestoredDatabase (ERRLOG2_BASE+69)
-#define NELOG_NetlogonSessionTypeWrong (ERRLOG2_BASE+70)
-#define REVISED_ERROR_LOG_STRUCT
-typedef struct _ERROR_LOG {
- DWORD el_len;
- DWORD el_reserved;
- DWORD el_time;
- DWORD el_error;
- LPWSTR el_name;
- LPWSTR el_text;
- LPBYTE el_data;
- DWORD el_data_size;
- DWORD el_nstrings;
-} ERROR_LOG,*PERROR_LOG,*LPERROR_LOG;
-NET_API_STATUS WINAPI NetErrorLogClear(LPCWSTR,LPCWSTR,LPBYTE);
-NET_API_STATUS WINAPI NetErrorLogRead(LPCWSTR,LPWSTR,LPHLOG,DWORD,LPDWORD,DWORD,DWORD,LPBYTE*,DWORD,LPDWORD,LPDWORD);
-NET_API_STATUS WINAPI NetErrorLogWrite(LPBYTE,DWORD,LPCWSTR,LPBYTE,DWORD,LPBYTE,DWORD,LPBYTE);
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/lmmsg.h b/winsup/w32api/include/lmmsg.h
deleted file mode 100644
index 9a4ea64..0000000
--- a/winsup/w32api/include/lmmsg.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef _LMMSG_H
-#define _LMMSG_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define MSGNAME_NOT_FORWARDED 0
-#define MSGNAME_FORWARDED_TO 4
-#define MSGNAME_FORWARDED_FROM 16
-typedef struct _MSG_INFO_0 { LPWSTR msgi0_name; }MSG_INFO_0,*PMSG_INFO_0,*LPMSG_INFO_0;
-typedef struct _MSG_INFO_1 {
- LPWSTR msgi1_name;
- DWORD msgi1_forward_flag;
- LPWSTR msgi1_forward;
-}MSG_INFO_1,*PMSG_INFO_1,*LPMSG_INFO_1;
-NET_API_STATUS WINAPI NetMessageBufferSend(LPCWSTR,LPCWSTR,LPCWSTR,PBYTE,DWORD);
-NET_API_STATUS WINAPI NetMessageNameAdd(LPCWSTR,LPCWSTR);
-NET_API_STATUS WINAPI NetMessageNameDel(LPCWSTR,LPCWSTR);
-NET_API_STATUS WINAPI NetMessageNameEnum(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetMessageNameGetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE*);
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/lmremutl.h b/winsup/w32api/include/lmremutl.h
deleted file mode 100644
index 0609240..0000000
--- a/winsup/w32api/include/lmremutl.h
+++ /dev/null
@@ -1,45 +0,0 @@
-#ifndef _LMREMUTL_H
-#define _LMREMUTL_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define SUPPORTS_REMOTE_ADMIN_PROTOCOL 2
-#define SUPPORTS_RPC 4
-#define SUPPORTS_SAM_PROTOCOL 8
-#define SUPPORTS_UNICODE 16
-#define SUPPORTS_LOCAL 32
-#define SUPPORTS_ANY 0xFFFFFFFF
-#define NO_PERMISSION_REQUIRED 1
-#define ALLOCATE_RESPONSE 2
-#define USE_SPECIFIC_TRANSPORT 0x80000000
-#ifndef DESC_CHAR_UNICODE
-typedef CHAR DESC_CHAR;
-#else
-typedef WCHAR DESC_CHAR;
-#endif
-typedef DESC_CHAR *LPDESC;
-typedef struct _TIME_OF_DAY_INFO {
- DWORD tod_elapsedt;
- DWORD tod_msecs;
- DWORD tod_hours;
- DWORD tod_mins;
- DWORD tod_secs;
- DWORD tod_hunds;
- LONG tod_timezone;
- DWORD tod_tinterval;
- DWORD tod_day;
- DWORD tod_month;
- DWORD tod_year;
- DWORD tod_weekday;
-} TIME_OF_DAY_INFO,*PTIME_OF_DAY_INFO,*LPTIME_OF_DAY_INFO;
-NET_API_STATUS WINAPI NetRemoteTOD(LPCWSTR,PBYTE*);
-NET_API_STATUS WINAPI NetRemoteComputerSupports(LPCWSTR,DWORD,PDWORD);
-NET_API_STATUS RxRemoteApi(DWORD,LPCWSTR,LPDESC,LPDESC,LPDESC,LPDESC,LPDESC,LPDESC,LPDESC,DWORD,... );
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/lmrepl.h b/winsup/w32api/include/lmrepl.h
deleted file mode 100644
index 0cef98c..0000000
--- a/winsup/w32api/include/lmrepl.h
+++ /dev/null
@@ -1,94 +0,0 @@
-#ifndef _LMREPL_H
-#define _LMREPL_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define REPL_ROLE_EXPORT 1
-#define REPL_ROLE_IMPORT 2
-#define REPL_ROLE_BOTH 3
-#define REPL_INTERVAL_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+0)
-#define REPL_PULSE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+1)
-#define REPL_GUARDTIME_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+2)
-#define REPL_RANDOM_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+3)
-#define REPL_UNLOCK_NOFORCE 0
-#define REPL_UNLOCK_FORCE 1
-#define REPL_STATE_OK 0
-#define REPL_STATE_NO_MASTER 1
-#define REPL_STATE_NO_SYNC 2
-#define REPL_STATE_NEVER_REPLICATED 3
-#define REPL_INTEGRITY_FILE 1
-#define REPL_INTEGRITY_TREE 2
-#define REPL_EXTENT_FILE 1
-#define REPL_EXTENT_TREE 2
-#define REPL_EXPORT_INTEGRITY_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+0)
-#define REPL_EXPORT_EXTENT_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+1)
-typedef struct _REPL_INFO_0 {
- DWORD rp0_role;
- LPWSTR rp0_exportpath;
- LPWSTR rp0_exportlist;
- LPWSTR rp0_importpath;
- LPWSTR rp0_importlist;
- LPWSTR rp0_logonusername;
- DWORD rp0_interval;
- DWORD rp0_pulse;
- DWORD rp0_guardtime;
- DWORD rp0_random;
-} REPL_INFO_0,*PREPL_INFO_0,*LPREPL_INFO_0;
-typedef struct _REPL_INFO_1000 { DWORD rp1000_interval; } REPL_INFO_1000,*PREPL_INFO_1000,*LPREPL_INFO_1000;
-typedef struct _REPL_INFO_1001 { DWORD rp1001_pulse; } REPL_INFO_1001,*PREPL_INFO_1001,*LPREPL_INFO_1001;
-typedef struct _REPL_INFO_1002 { DWORD rp1002_guardtime; } REPL_INFO_1002,*PREPL_INFO_1002,*LPREPL_INFO_1002;
-typedef struct _REPL_INFO_1003 { DWORD rp1003_random; } REPL_INFO_1003,*PREPL_INFO_1003,*LPREPL_INFO_1003;
-
-NET_API_STATUS WINAPI NetReplGetInfo(LPCWSTR,DWORD,PBYTE*);
-NET_API_STATUS WINAPI NetReplSetInfo(LPCWSTR,DWORD,PBYTE,PDWORD);
-typedef struct _REPL_EDIR_INFO_0 {
- LPWSTR rped0_dirname;
-} REPL_EDIR_INFO_0,*PREPL_EDIR_INFO_0,*LPREPL_EDIR_INFO_0;
-typedef struct _REPL_EDIR_INFO_1 {
- LPWSTR rped1_dirname;
- DWORD rped1_integrity;
- DWORD rped1_extent;
-} REPL_EDIR_INFO_1,*PREPL_EDIR_INFO_1,*LPREPL_EDIR_INFO_1;
-typedef struct _REPL_EDIR_INFO_2 {
- LPWSTR rped2_dirname;
- DWORD rped2_integrity;
- DWORD rped2_extent;
- DWORD rped2_lockcount;
- DWORD rped2_locktime;
-} REPL_EDIR_INFO_2,*PREPL_EDIR_INFO_2,*LPREPL_EDIR_INFO_2;
-typedef struct _REPL_EDIR_INFO_1000 {
- DWORD rped1000_integrity;
-} REPL_EDIR_INFO_1000,*PREPL_EDIR_INFO_1000,*LPREPL_EDIR_INFO_1000;
-typedef struct _REPL_EDIR_INFO_1001 {
- DWORD rped1001_extent;
-} REPL_EDIR_INFO_1001,*PREPL_EDIR_INFO_1001,*LPREPL_EDIR_INFO_1001;
-typedef struct _REPL_IDIR_INFO_0 { LPWSTR rpid0_dirname; } REPL_IDIR_INFO_0,*PREPL_IDIR_INFO_0,*LPREPL_IDIR_INFO_0;
-typedef struct _REPL_IDIR_INFO_1 {
- LPWSTR rpid1_dirname;
- DWORD rpid1_state;
- LPWSTR rpid1_mastername;
- DWORD rpid1_last_update_time;
- DWORD rpid1_lockcount;
- DWORD rpid1_locktime;
-} REPL_IDIR_INFO_1,*PREPL_IDIR_INFO_1,*LPREPL_IDIR_INFO_1;
-NET_API_STATUS WINAPI NetReplExportDirAdd(LPCWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetReplExportDirDel(LPCWSTR,LPCWSTR);
-NET_API_STATUS WINAPI NetReplExportDirEnum(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetReplExportDirGetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE*);
-NET_API_STATUS WINAPI NetReplExportDirSetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetReplExportDirLock(LPCWSTR,LPCWSTR);
-NET_API_STATUS WINAPI NetReplExportDirUnlock(LPCWSTR,LPCWSTR,DWORD);
-NET_API_STATUS WINAPI NetReplImportDirAdd(LPCWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetReplImportDirDel(LPCWSTR,LPCWSTR);
-NET_API_STATUS WINAPI NetReplImportDirEnum(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetReplImportDirGetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE*);
-NET_API_STATUS WINAPI NetReplImportDirLock(LPCWSTR,LPCWSTR);
-NET_API_STATUS WINAPI NetReplImportDirUnlock(LPCWSTR,LPCWSTR,DWORD);
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/lmserver.h b/winsup/w32api/include/lmserver.h
deleted file mode 100644
index 7119714..0000000
--- a/winsup/w32api/include/lmserver.h
+++ /dev/null
@@ -1,606 +0,0 @@
-#ifndef _LMSERVER_H
-#define _LMSERVER_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include <winsvc.h>
-#include <lmcons.h>
-typedef struct _SERVER_INFO_100 {
-DWORD sv100_platform_id;
-LPWSTR sv100_name;
-} SERVER_INFO_100,*PSERVER_INFO_100,*LPSERVER_INFO_100;
-typedef struct _SERVER_INFO_101 {
-DWORD sv101_platform_id;
-LPWSTR sv101_name;
-DWORD sv101_version_major;
-DWORD sv101_version_minor;
-DWORD sv101_type;
-LPWSTR sv101_comment;
-} SERVER_INFO_101,*PSERVER_INFO_101,*LPSERVER_INFO_101;
-typedef struct _SERVER_INFO_102 {
-DWORD sv102_platform_id;
-LPWSTR sv102_name;
-DWORD sv102_version_major;
-DWORD sv102_version_minor;
-DWORD sv102_type;
-LPWSTR sv102_comment;
-DWORD sv102_users;
-LONG sv102_disc;
-BOOL sv102_hidden;
-DWORD sv102_announce;
-DWORD sv102_anndelta;
-DWORD sv102_licenses;
-LPWSTR sv102_userpath;
-} SERVER_INFO_102,*PSERVER_INFO_102,*LPSERVER_INFO_102;
-typedef struct _SERVER_INFO_402 {
-DWORD sv402_ulist_mtime;
-DWORD sv402_glist_mtime;
-DWORD sv402_alist_mtime;
-LPWSTR sv402_alerts;
-DWORD sv402_security;
-DWORD sv402_numadmin;
-DWORD sv402_lanmask;
-LPWSTR sv402_guestacct;
-DWORD sv402_chdevs;
-DWORD sv402_chdevq;
-DWORD sv402_chdevjobs;
-DWORD sv402_connections;
-DWORD sv402_shares;
-DWORD sv402_openfiles;
-DWORD sv402_sessopens;
-DWORD sv402_sessvcs;
-DWORD sv402_sessreqs;
-DWORD sv402_opensearch;
-DWORD sv402_activelocks;
-DWORD sv402_numreqbuf;
-DWORD sv402_sizreqbuf;
-DWORD sv402_numbigbuf;
-DWORD sv402_numfiletasks;
-DWORD sv402_alertsched;
-DWORD sv402_erroralert;
-DWORD sv402_logonalert;
-DWORD sv402_accessalert;
-DWORD sv402_diskalert;
-DWORD sv402_netioalert;
-DWORD sv402_maxauditsz;
-LPWSTR sv402_srvheuristics;
-} SERVER_INFO_402,*PSERVER_INFO_402,*LPSERVER_INFO_402;
-typedef struct _SERVER_INFO_403 {
-DWORD sv403_ulist_mtime;
-DWORD sv403_glist_mtime;
-DWORD sv403_alist_mtime;
-LPWSTR sv403_alerts;
-DWORD sv403_security;
-DWORD sv403_numadmin;
-DWORD sv403_lanmask;
-LPWSTR sv403_guestacct;
-DWORD sv403_chdevs;
-DWORD sv403_chdevq;
-DWORD sv403_chdevjobs;
-DWORD sv403_connections;
-DWORD sv403_shares;
-DWORD sv403_openfiles;
-DWORD sv403_sessopens;
-DWORD sv403_sessvcs;
-DWORD sv403_sessreqs;
-DWORD sv403_opensearch;
-DWORD sv403_activelocks;
-DWORD sv403_numreqbuf;
-DWORD sv403_sizreqbuf;
-DWORD sv403_numbigbuf;
-DWORD sv403_numfiletasks;
-DWORD sv403_alertsched;
-DWORD sv403_erroralert;
-DWORD sv403_logonalert;
-DWORD sv403_accessalert;
-DWORD sv403_diskalert;
-DWORD sv403_netioalert;
-DWORD sv403_maxauditsz;
-LPWSTR sv403_srvheuristics;
-DWORD sv403_auditedevents;
-DWORD sv403_autoprofile;
-LPWSTR sv403_autopath;
-} SERVER_INFO_403,*PSERVER_INFO_403,*LPSERVER_INFO_403;
-typedef struct _SERVER_INFO_502 {
-DWORD sv502_sessopens;
-DWORD sv502_sessvcs;
-DWORD sv502_opensearch;
-DWORD sv502_sizreqbuf;
-DWORD sv502_initworkitems;
-DWORD sv502_maxworkitems;
-DWORD sv502_rawworkitems;
-DWORD sv502_irpstacksize;
-DWORD sv502_maxrawbuflen;
-DWORD sv502_sessusers;
-DWORD sv502_sessconns;
-DWORD sv502_maxpagedmemoryusage;
-DWORD sv502_maxnonpagedmemoryusage;
-BOOL sv502_enablesoftcompat;
-BOOL sv502_enableforcedlogoff;
-BOOL sv502_timesource;
-BOOL sv502_acceptdownlevelapis;
-BOOL sv502_lmannounce;
-} SERVER_INFO_502,*PSERVER_INFO_502,*LPSERVER_INFO_502;
-typedef struct _SERVER_INFO_503 {
-DWORD sv503_sessopens;
-DWORD sv503_sessvcs;
-DWORD sv503_opensearch;
-DWORD sv503_sizreqbuf;
-DWORD sv503_initworkitems;
-DWORD sv503_maxworkitems;
-DWORD sv503_rawworkitems;
-DWORD sv503_irpstacksize;
-DWORD sv503_maxrawbuflen;
-DWORD sv503_sessusers;
-DWORD sv503_sessconns;
-DWORD sv503_maxpagedmemoryusage;
-DWORD sv503_maxnonpagedmemoryusage;
-BOOL sv503_enablesoftcompat;
-BOOL sv503_enableforcedlogoff;
-BOOL sv503_timesource;
-BOOL sv503_acceptdownlevelapis;
-BOOL sv503_lmannounce;
-LPWSTR sv503_domain;
-DWORD sv503_maxcopyreadlen;
-DWORD sv503_maxcopywritelen;
-DWORD sv503_minkeepsearch;
-DWORD sv503_maxkeepsearch;
-DWORD sv503_minkeepcomplsearch;
-DWORD sv503_maxkeepcomplsearch;
-DWORD sv503_threadcountadd;
-DWORD sv503_numblockthreads;
-DWORD sv503_scavtimeout;
-DWORD sv503_minrcvqueue;
-DWORD sv503_minfreeworkitems;
-DWORD sv503_xactmemsize;
-DWORD sv503_threadpriority;
-DWORD sv503_maxmpxct;
-DWORD sv503_oplockbreakwait;
-DWORD sv503_oplockbreakresponsewait;
-BOOL sv503_enableoplocks;
-BOOL sv503_enableoplockforceclose;
-BOOL sv503_enablefcbopens;
-BOOL sv503_enableraw;
-BOOL sv503_enablesharednetdrives;
-DWORD sv503_minfreeconnections;
-DWORD sv503_maxfreeconnections;
-} SERVER_INFO_503,*PSERVER_INFO_503,*LPSERVER_INFO_503;
-typedef struct _SERVER_INFO_599 {
-DWORD sv599_sessopens;
-DWORD sv599_sessvcs;
-DWORD sv599_opensearch;
-DWORD sv599_sizreqbuf;
-DWORD sv599_initworkitems;
-DWORD sv599_maxworkitems;
-DWORD sv599_rawworkitems;
-DWORD sv599_irpstacksize;
-DWORD sv599_maxrawbuflen;
-DWORD sv599_sessusers;
-DWORD sv599_sessconns;
-DWORD sv599_maxpagedmemoryusage;
-DWORD sv599_maxnonpagedmemoryusage;
-BOOL sv599_enablesoftcompat;
-BOOL sv599_enableforcedlogoff;
-BOOL sv599_timesource;
-BOOL sv599_acceptdownlevelapis;
-BOOL sv599_lmannounce;
-LPWSTR sv599_domain;
-DWORD sv599_maxcopyreadlen;
-DWORD sv599_maxcopywritelen;
-DWORD sv599_minkeepsearch;
-DWORD sv599_maxkeepsearch;
-DWORD sv599_minkeepcomplsearch;
-DWORD sv599_maxkeepcomplsearch;
-DWORD sv599_threadcountadd;
-DWORD sv599_numblockthreads;
-DWORD sv599_scavtimeout;
-DWORD sv599_minrcvqueue;
-DWORD sv599_minfreeworkitems;
-DWORD sv599_xactmemsize;
-DWORD sv599_threadpriority;
-DWORD sv599_maxmpxct;
-DWORD sv599_oplockbreakwait;
-DWORD sv599_oplockbreakresponsewait;
-BOOL sv599_enableoplocks;
-BOOL sv599_enableoplockforceclose;
-BOOL sv599_enablefcbopens;
-BOOL sv599_enableraw;
-BOOL sv599_enablesharednetdrives;
-DWORD sv599_minfreeconnections;
-DWORD sv599_maxfreeconnections;
-DWORD sv599_initsesstable;
-DWORD sv599_initconntable;
-DWORD sv599_initfiletable;
-DWORD sv599_initsearchtable;
-DWORD sv599_alertschedule;
-DWORD sv599_errorthreshold;
-DWORD sv599_networkerrorthreshold;
-DWORD sv599_diskspacethreshold;
-DWORD sv599_reserved;
-DWORD sv599_maxlinkdelay;
-DWORD sv599_minlinkthroughput;
-DWORD sv599_linkinfovalidtime;
-DWORD sv599_scavqosinfoupdatetime;
-DWORD sv599_maxworkitemidletime;
-} SERVER_INFO_599,*PSERVER_INFO_599,*LPSERVER_INFO_599;
-typedef struct _SERVER_INFO_598 {
-DWORD sv598_maxrawworkitems;
-DWORD sv598_maxthreadsperqueue;
-DWORD sv598_producttype;
-DWORD sv598_serversize;
-DWORD sv598_connectionlessautodisc;
-DWORD sv598_sharingviolationretries;
-DWORD sv598_sharingviolationdelay;
-DWORD sv598_maxglobalopensearch;
-DWORD sv598_removeduplicatesearches;
-DWORD sv598_lockviolationoffset;
-DWORD sv598_lockviolationdelay;
-DWORD sv598_mdlreadswitchover;
-DWORD sv598_cachedopenlimit;
-DWORD sv598_otherqueueaffinity;
-BOOL sv598_restrictnullsessaccess;
-BOOL sv598_enablewfw311directipx;
-DWORD sv598_queuesamplesecs;
-DWORD sv598_balancecount;
-DWORD sv598_preferredaffinity;
-DWORD sv598_maxfreerfcbs;
-DWORD sv598_maxfreemfcbs;
-DWORD sv598_maxfreelfcbs;
-DWORD sv598_maxfreepagedpoolchunks;
-DWORD sv598_minpagedpoolchunksize;
-DWORD sv598_maxpagedpoolchunksize;
-BOOL sv598_sendsfrompreferredprocessor;
-} SERVER_INFO_598,*PSERVER_INFO_598,*LPSERVER_INFO_598;
-typedef struct _SERVER_INFO_1005 {LPWSTR sv1005_comment; } SERVER_INFO_1005,*PSERVER_INFO_1005,*LPSERVER_INFO_1005;
-typedef struct _SERVER_INFO_1107 { DWORD sv1107_users; } SERVER_INFO_1107,*PSERVER_INFO_1107,*LPSERVER_INFO_1107;
-typedef struct _SERVER_INFO_1010 { LONG sv1010_disc; } SERVER_INFO_1010,*PSERVER_INFO_1010,*LPSERVER_INFO_1010;
-typedef struct _SERVER_INFO_1016 { BOOL sv1016_hidden; } SERVER_INFO_1016,*PSERVER_INFO_1016,*LPSERVER_INFO_1016;
-typedef struct _SERVER_INFO_1017 { DWORD sv1017_announce; } SERVER_INFO_1017,*PSERVER_INFO_1017,*LPSERVER_INFO_1017;
-typedef struct _SERVER_INFO_1018 { DWORD sv1018_anndelta; } SERVER_INFO_1018,*PSERVER_INFO_1018,*LPSERVER_INFO_1018;
-typedef struct _SERVER_INFO_1501 { DWORD sv1501_sessopens; } SERVER_INFO_1501,*PSERVER_INFO_1501,*LPSERVER_INFO_1501;
-typedef struct _SERVER_INFO_1502 { DWORD sv1502_sessvcs; } SERVER_INFO_1502,*PSERVER_INFO_1502,*LPSERVER_INFO_1502;
-typedef struct _SERVER_INFO_1503 { DWORD sv1503_opensearch; } SERVER_INFO_1503,*PSERVER_INFO_1503,*LPSERVER_INFO_1503;
-typedef struct _SERVER_INFO_1506 { DWORD sv1506_maxworkitems; } SERVER_INFO_1506,*PSERVER_INFO_1506,*LPSERVER_INFO_1506;
-typedef struct _SERVER_INFO_1509 { DWORD sv1509_maxrawbuflen; } SERVER_INFO_1509,*PSERVER_INFO_1509,*LPSERVER_INFO_1509;
-typedef struct _SERVER_INFO_1510 { DWORD sv1510_sessusers; } SERVER_INFO_1510,*PSERVER_INFO_1510,*LPSERVER_INFO_1510;
-typedef struct _SERVER_INFO_1511 { DWORD sv1511_sessconns; } SERVER_INFO_1511,*PSERVER_INFO_1511,*LPSERVER_INFO_1511;
-typedef struct _SERVER_INFO_1512 { DWORD sv1512_maxnonpagedmemoryusage; } SERVER_INFO_1512,*PSERVER_INFO_1512,*LPSERVER_INFO_1512;
-typedef struct _SERVER_INFO_1513 { DWORD sv1513_maxpagedmemoryusage; } SERVER_INFO_1513,*PSERVER_INFO_1513,*LPSERVER_INFO_1513;
-typedef struct _SERVER_INFO_1514 { BOOL sv1514_enablesoftcompat; } SERVER_INFO_1514,*PSERVER_INFO_1514,*LPSERVER_INFO_1514;
-typedef struct _SERVER_INFO_1515 { BOOL sv1515_enableforcedlogoff; } SERVER_INFO_1515,*PSERVER_INFO_1515,*LPSERVER_INFO_1515;
-typedef struct _SERVER_INFO_1516 { BOOL sv1516_timesource; } SERVER_INFO_1516,*PSERVER_INFO_1516,*LPSERVER_INFO_1516;
-typedef struct _SERVER_INFO_1518 { BOOL sv1518_lmannounce; } SERVER_INFO_1518,*PSERVER_INFO_1518,*LPSERVER_INFO_1518;
-typedef struct _SERVER_INFO_1520 { DWORD sv1520_maxcopyreadlen; } SERVER_INFO_1520,*PSERVER_INFO_1520,*LPSERVER_INFO_1520;
-typedef struct _SERVER_INFO_1521 { DWORD sv1521_maxcopywritelen; } SERVER_INFO_1521,*PSERVER_INFO_1521,*LPSERVER_INFO_1521;
-typedef struct _SERVER_INFO_1522 { DWORD sv1522_minkeepsearch; } SERVER_INFO_1522,*PSERVER_INFO_1522,*LPSERVER_INFO_1522;
-typedef struct _SERVER_INFO_1523 { DWORD sv1523_maxkeepsearch; } SERVER_INFO_1523,*PSERVER_INFO_1523,*LPSERVER_INFO_1523;
-typedef struct _SERVER_INFO_1524 { DWORD sv1524_minkeepcomplsearch; } SERVER_INFO_1524,*PSERVER_INFO_1524,*LPSERVER_INFO_1524;
-typedef struct _SERVER_INFO_1525 { DWORD sv1525_maxkeepcomplsearch; } SERVER_INFO_1525,*PSERVER_INFO_1525,*LPSERVER_INFO_1525;
-typedef struct _SERVER_INFO_1528 { DWORD sv1528_scavtimeout; } SERVER_INFO_1528,*PSERVER_INFO_1528,*LPSERVER_INFO_1528;
-typedef struct _SERVER_INFO_1529 { DWORD sv1529_minrcvqueue; } SERVER_INFO_1529,*PSERVER_INFO_1529,*LPSERVER_INFO_1529;
-typedef struct _SERVER_INFO_1530 { DWORD sv1530_minfreeworkitems; } SERVER_INFO_1530,*PSERVER_INFO_1530,*LPSERVER_INFO_1530;
-typedef struct _SERVER_INFO_1533 { DWORD sv1533_maxmpxct; } SERVER_INFO_1533,*PSERVER_INFO_1533,*LPSERVER_INFO_1533;
-typedef struct _SERVER_INFO_1534 { DWORD sv1534_oplockbreakwait; } SERVER_INFO_1534,*PSERVER_INFO_1534,*LPSERVER_INFO_1534;
-typedef struct _SERVER_INFO_1535 { DWORD sv1535_oplockbreakresponsewait; } SERVER_INFO_1535,*PSERVER_INFO_1535,*LPSERVER_INFO_1535;
-typedef struct _SERVER_INFO_1536 { BOOL sv1536_enableoplocks; } SERVER_INFO_1536,*PSERVER_INFO_1536,*LPSERVER_INFO_1536;
-typedef struct _SERVER_INFO_1537 { BOOL sv1537_enableoplockforceclose; } SERVER_INFO_1537,*PSERVER_INFO_1537,*LPSERVER_INFO_1537;
-typedef struct _SERVER_INFO_1538 { BOOL sv1538_enablefcbopens; } SERVER_INFO_1538,*PSERVER_INFO_1538,*LPSERVER_INFO_1538;
-typedef struct _SERVER_INFO_1539 { BOOL sv1539_enableraw; } SERVER_INFO_1539,*PSERVER_INFO_1539,*LPSERVER_INFO_1539;
-typedef struct _SERVER_INFO_1540 { BOOL sv1540_enablesharednetdrives; } SERVER_INFO_1540,*PSERVER_INFO_1540,*LPSERVER_INFO_1540;
-typedef struct _SERVER_INFO_1541 { BOOL sv1541_minfreeconnections; } SERVER_INFO_1541,*PSERVER_INFO_1541,*LPSERVER_INFO_1541;
-typedef struct _SERVER_INFO_1542 { BOOL sv1542_maxfreeconnections; } SERVER_INFO_1542,*PSERVER_INFO_1542,*LPSERVER_INFO_1542;
-typedef struct _SERVER_INFO_1543 { DWORD sv1543_initsesstable; } SERVER_INFO_1543,*PSERVER_INFO_1543,*LPSERVER_INFO_1543;
-typedef struct _SERVER_INFO_1544 { DWORD sv1544_initconntable; } SERVER_INFO_1544,*PSERVER_INFO_1544,*LPSERVER_INFO_1544;
-typedef struct _SERVER_INFO_1545 { DWORD sv1545_initfiletable; } SERVER_INFO_1545,*PSERVER_INFO_1545,*LPSERVER_INFO_1545;
-typedef struct _SERVER_INFO_1546 { DWORD sv1546_initsearchtable; } SERVER_INFO_1546,*PSERVER_INFO_1546,*LPSERVER_INFO_1546;
-typedef struct _SERVER_INFO_1547 { DWORD sv1547_alertschedule; } SERVER_INFO_1547,*PSERVER_INFO_1547,*LPSERVER_INFO_1547;
-typedef struct _SERVER_INFO_1548 { DWORD sv1548_errorthreshold; } SERVER_INFO_1548,*PSERVER_INFO_1548,*LPSERVER_INFO_1548;
-typedef struct _SERVER_INFO_1549 { DWORD sv1549_networkerrorthreshold; } SERVER_INFO_1549,*PSERVER_INFO_1549,*LPSERVER_INFO_1549;
-typedef struct _SERVER_INFO_1550 { DWORD sv1550_diskspacethreshold; } SERVER_INFO_1550,*PSERVER_INFO_1550,*LPSERVER_INFO_1550;
-typedef struct _SERVER_INFO_1552 { DWORD sv1552_maxlinkdelay; } SERVER_INFO_1552,*PSERVER_INFO_1552,*LPSERVER_INFO_1552;
-typedef struct _SERVER_INFO_1553 { DWORD sv1553_minlinkthroughput; } SERVER_INFO_1553,*PSERVER_INFO_1553,*LPSERVER_INFO_1553;
-typedef struct _SERVER_INFO_1554 { DWORD sv1554_linkinfovalidtime; } SERVER_INFO_1554,*PSERVER_INFO_1554,*LPSERVER_INFO_1554;
-typedef struct _SERVER_INFO_1555 { DWORD sv1555_scavqosinfoupdatetime; } SERVER_INFO_1555,*PSERVER_INFO_1555,*LPSERVER_INFO_1555;
-typedef struct _SERVER_INFO_1556 { DWORD sv1556_maxworkitemidletime; } SERVER_INFO_1556,*PSERVER_INFO_1556,*LPSERVER_INFO_1556;
-typedef struct _SERVER_INFO_1557 { DWORD sv1557_maxrawworkitems; } SERVER_INFO_1557,*PSERVER_INFO_1557,*LPSERVER_INFO_1557;
-typedef struct _SERVER_INFO_1560 { DWORD sv1560_producttype; } SERVER_INFO_1560,*PSERVER_INFO_1560,*LPSERVER_INFO_1560;
-typedef struct _SERVER_INFO_1561 { DWORD sv1561_serversize; } SERVER_INFO_1561,*PSERVER_INFO_1561,*LPSERVER_INFO_1561;
-typedef struct _SERVER_INFO_1562 { DWORD sv1562_connectionlessautodisc; } SERVER_INFO_1562,*PSERVER_INFO_1562,*LPSERVER_INFO_1562;
-typedef struct _SERVER_INFO_1563 { DWORD sv1563_sharingviolationretries; } SERVER_INFO_1563,*PSERVER_INFO_1563,*LPSERVER_INFO_1563;
-typedef struct _SERVER_INFO_1564 { DWORD sv1564_sharingviolationdelay; } SERVER_INFO_1564,*PSERVER_INFO_1564,*LPSERVER_INFO_1564;
-typedef struct _SERVER_INFO_1565 { DWORD sv1565_maxglobalopensearch; } SERVER_INFO_1565,*PSERVER_INFO_1565,*LPSERVER_INFO_1565;
-typedef struct _SERVER_INFO_1566 { BOOL sv1566_removeduplicatesearches; } SERVER_INFO_1566,*PSERVER_INFO_1566,*LPSERVER_INFO_1566;
-typedef struct _SERVER_INFO_1567 { DWORD sv1567_lockviolationretries; } SERVER_INFO_1567,*PSERVER_INFO_1567,*LPSERVER_INFO_1567;
-typedef struct _SERVER_INFO_1568 { DWORD sv1568_lockviolationoffset; } SERVER_INFO_1568,*PSERVER_INFO_1568,*LPSERVER_INFO_1568;
-typedef struct _SERVER_INFO_1569 { DWORD sv1569_lockviolationdelay; } SERVER_INFO_1569,*PSERVER_INFO_1569,*LPSERVER_INFO_1569;
-typedef struct _SERVER_INFO_1570 { DWORD sv1570_mdlreadswitchover; } SERVER_INFO_1570,*PSERVER_INFO_1570,*LPSERVER_INFO_1570;
-typedef struct _SERVER_INFO_1571 { DWORD sv1571_cachedopenlimit; } SERVER_INFO_1571,*PSERVER_INFO_1571,*LPSERVER_INFO_1571;
-typedef struct _SERVER_INFO_1572 { DWORD sv1572_criticalthreads; } SERVER_INFO_1572,*PSERVER_INFO_1572,*LPSERVER_INFO_1572;
-typedef struct _SERVER_INFO_1573 { DWORD sv1573_restrictnullsessaccess; } SERVER_INFO_1573,*PSERVER_INFO_1573,*LPSERVER_INFO_1573;
-typedef struct _SERVER_INFO_1574 { DWORD sv1574_enablewfw311directipx;} SERVER_INFO_1574,*PSERVER_INFO_1574,*LPSERVER_INFO_1574;
-typedef struct _SERVER_INFO_1575 { DWORD sv1575_otherqueueaffinity; } SERVER_INFO_1575,*PSERVER_INFO_1575,*LPSERVER_INFO_1575;
-typedef struct _SERVER_INFO_1576 { DWORD sv1576_queuesamplesecs; } SERVER_INFO_1576,*PSERVER_INFO_1576,*LPSERVER_INFO_1576;
-typedef struct _SERVER_INFO_1577 { DWORD sv1577_balancecount; } SERVER_INFO_1577,*PSERVER_INFO_1577,*LPSERVER_INFO_1577;
-typedef struct _SERVER_INFO_1578 { DWORD sv1578_preferredaffinity; } SERVER_INFO_1578,*PSERVER_INFO_1578,*LPSERVER_INFO_1578;
-typedef struct _SERVER_INFO_1579 { DWORD sv1579_maxfreerfcbs; } SERVER_INFO_1579,*PSERVER_INFO_1579,*LPSERVER_INFO_1579;
-typedef struct _SERVER_INFO_1580 { DWORD sv1580_maxfreemfcbs; } SERVER_INFO_1580,*PSERVER_INFO_1580,*LPSERVER_INFO_1580;
-typedef struct _SERVER_INFO_1581 { DWORD sv1581_maxfreemlcbs; } SERVER_INFO_1581,*PSERVER_INFO_1581,*LPSERVER_INFO_1581;
-typedef struct _SERVER_INFO_1582 { DWORD sv1582_maxfreepagedpoolchunks; } SERVER_INFO_1582,*PSERVER_INFO_1582,*LPSERVER_INFO_1582;
-typedef struct _SERVER_INFO_1583 { DWORD sv1583_minpagedpoolchunksize; } SERVER_INFO_1583,*PSERVER_INFO_1583,*LPSERVER_INFO_1583;
-typedef struct _SERVER_INFO_1584 { DWORD sv1584_maxpagedpoolchunksize; } SERVER_INFO_1584,*PSERVER_INFO_1584,*LPSERVER_INFO_1584;
-typedef struct _SERVER_INFO_1585 { BOOL sv1585_sendsfrompreferredprocessor; } SERVER_INFO_1585,*PSERVER_INFO_1585,*LPSERVER_INFO_1585;
-typedef struct _SERVER_INFO_1586 { BOOL sv1586_maxthreadsperqueue; } SERVER_INFO_1586,*PSERVER_INFO_1586,*LPSERVER_INFO_1586;
-typedef struct _SERVER_TRANSPORT_INFO_0 {
-DWORD svti0_numberofvcs;
-LPWSTR svti0_transportname;
-PBYTE svti0_transportaddress;
-DWORD svti0_transportaddresslength;
-LPWSTR svti0_networkaddress;
-} SERVER_TRANSPORT_INFO_0,*PSERVER_TRANSPORT_INFO_0,*LPSERVER_TRANSPORT_INFO_0;
-
-NET_API_STATUS WINAPI NetServerEnum(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,DWORD,LPCWSTR,PDWORD);
-NET_API_STATUS WINAPI NetServerEnumEx(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,DWORD,LPCWSTR,LPCWSTR);
-NET_API_STATUS WINAPI NetServerGetInfo(LPWSTR,DWORD,PBYTE*);
-NET_API_STATUS WINAPI NetServerSetInfo(LPWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS NetServerSetInfoCommandLine(WORD,LPWSTR*);
-NET_API_STATUS WINAPI NetServerDiskEnum(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetServerComputerNameAdd(LPWSTR,LPWSTR,LPWSTR);
-NET_API_STATUS WINAPI NetServerComputerNameDel(LPWSTR,LPWSTR);
-NET_API_STATUS WINAPI NetServerTransportAdd(LPWSTR,DWORD,PBYTE);
-NET_API_STATUS WINAPI NetServerTransportAddEx(LPWSTR,DWORD,PBYTE);
-NET_API_STATUS WINAPI NetServerTransportDel(LPWSTR,DWORD,PBYTE);
-NET_API_STATUS WINAPI NetServerTransportEnum(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-BOOL SetServiceBits(SERVICE_STATUS_HANDLE,DWORD,BOOL,BOOL);
-
-#define SVI1_NUM_ELEMENTS 5
-#define SVI2_NUM_ELEMENTS 40
-#define SVI3_NUM_ELEMENTS 44
-#define SV_MAX_CMD_LEN PATHLEN
-#define SW_AUTOPROF_LOAD_MASK 1
-#define SW_AUTOPROF_SAVE_MASK 2
-#define SV_MAX_SRV_HEUR_LEN 32
-#define SV_USERS_PER_LICENSE 5
-#define SV_PLATFORM_ID_OS2 400
-#define SV_PLATFORM_ID_NT 500
-#define MAJOR_VERSION_MASK 15
-#define SV_TYPE_WORKSTATION 1
-#define SV_TYPE_SERVER 2
-#define SV_TYPE_SQLSERVER 4
-#define SV_TYPE_DOMAIN_CTRL 8
-#define SV_TYPE_DOMAIN_BAKCTRL 16
-#define SV_TYPE_TIME_SOURCE 32
-#define SV_TYPE_AFP 64
-#define SV_TYPE_NOVELL 128
-#define SV_TYPE_DOMAIN_MEMBER 256
-#define SV_TYPE_PRINTQ_SERVER 512
-#define SV_TYPE_DIALIN_SERVER 1024
-#define SV_TYPE_XENIX_SERVER 2048
-#define SV_TYPE_SERVER_UNIX SV_TYPE_XENIX_SERVER
-#define SV_TYPE_NT 4096
-#define SV_TYPE_WFW 8192
-#define SV_TYPE_SERVER_MFPN 16384
-#define SV_TYPE_SERVER_NT 32768
-#define SV_TYPE_POTENTIAL_BROWSER 65536
-#define SV_TYPE_BACKUP_BROWSER 0x20000
-#define SV_TYPE_MASTER_BROWSER 0x40000
-#define SV_TYPE_DOMAIN_MASTER 0x80000
-#define SV_TYPE_SERVER_OSF 0x100000
-#define SV_TYPE_SERVER_VMS 0x200000
-#define SV_TYPE_WINDOWS 0x400000
-#define SV_TYPE_ALTERNATE_XPORT 0x20000000
-#define SV_TYPE_LOCAL_LIST_ONLY 0x40000000
-#define SV_TYPE_DOMAIN_ENUM 0x80000000
-#define SV_TYPE_ALL 0xFFFFFFFF
-#define SV_NODISC (-1)
-#define SV_USERSECURITY 1
-#define SV_SHARESECURITY 0
-#define SV_HIDDEN 1
-#define SV_VISIBLE 0
-#define SV_PLATFORM_ID_PARMNUM 101
-#define SV_NAME_PARMNUM 102
-#define SV_VERSION_MAJOR_PARMNUM 103
-#define SV_VERSION_MINOR_PARMNUM 104
-#define SV_TYPE_PARMNUM 105
-#define SV_COMMENT_PARMNUM 5
-#define SV_USERS_PARMNUM 107
-#define SV_DISC_PARMNUM 10
-#define SV_HIDDEN_PARMNUM 16
-#define SV_ANNOUNCE_PARMNUM 17
-#define SV_ANNDELTA_PARMNUM 18
-#define SV_USERPATH_PARMNUM 112
-#define SV_ULIST_MTIME_PARMNUM 401
-#define SV_GLIST_MTIME_PARMNUM 402
-#define SV_ALIST_MTIME_PARMNUM 403
-#define SV_ALERTS_PARMNUM 11
-#define SV_SECURITY_PARMNUM 405
-#define SV_NUMADMIN_PARMNUM 406
-#define SV_LANMASK_PARMNUM 407
-#define SV_GUESTACC_PARMNUM 408
-#define SV_CHDEVQ_PARMNUM 410
-#define SV_CHDEVJOBS_PARMNUM 411
-#define SV_CONNECTIONS_PARMNUM 412
-#define SV_SHARES_PARMNUM 413
-#define SV_OPENFILES_PARMNUM 414
-#define SV_SESSREQS_PARMNUM 417
-#define SV_ACTIVELOCKS_PARMNUM 419
-#define SV_NUMREQBUF_PARMNUM 420
-#define SV_NUMBIGBUF_PARMNUM 422
-#define SV_NUMFILETASKS_PARMNUM 423
-#define SV_ALERTSCHED_PARMNUM 37
-#define SV_ERRORALERT_PARMNUM 38
-#define SV_LOGONALERT_PARMNUM 39
-#define SV_ACCESSALERT_PARMNUM 40
-#define SV_DISKALERT_PARMNUM 41
-#define SV_NETIOALERT_PARMNUM 42
-#define SV_MAXAUDITSZ_PARMNUM 43
-#define SV_SRVHEURISTICS_PARMNUM 431
-#define SV_SESSOPENS_PARMNUM 501
-#define SV_SESSVCS_PARMNUM 502
-#define SV_OPENSEARCH_PARMNUM 503
-#define SV_SIZREQBUF_PARMNUM 504
-#define SV_INITWORKITEMS_PARMNUM 505
-#define SV_MAXWORKITEMS_PARMNUM 506
-#define SV_RAWWORKITEMS_PARMNUM 507
-#define SV_IRPSTACKSIZE_PARMNUM 508
-#define SV_MAXRAWBUFLEN_PARMNUM 509
-#define SV_SESSUSERS_PARMNUM 510
-#define SV_SESSCONNS_PARMNUM 511
-#define SV_MAXNONPAGEDMEMORYUSAGE_PARMNUM 512
-#define SV_MAXPAGEDMEMORYUSAGE_PARMNUM 513
-#define SV_ENABLESOFTCOMPAT_PARMNUM 514
-#define SV_ENABLEFORCEDLOGOFF_PARMNUM 515
-#define SV_TIMESOURCE_PARMNUM 516
-#define SV_ACCEPTDOWNLEVELAPIS_PARMNUM 517
-#define SV_LMANNOUNCE_PARMNUM 518
-#define SV_DOMAIN_PARMNUM 519
-#define SV_MAXCOPYREADLEN_PARMNUM 520
-#define SV_MAXCOPYWRITELEN_PARMNUM 521
-#define SV_MINKEEPSEARCH_PARMNUM 522
-#define SV_MAXKEEPSEARCH_PARMNUM 523
-#define SV_MINKEEPCOMPLSEARCH_PARMNUM 524
-#define SV_MAXKEEPCOMPLSEARCH_PARMNUM 525
-#define SV_THREADCOUNTADD_PARMNUM 526
-#define SV_NUMBLOCKTHREADS_PARMNUM 527
-#define SV_SCAVTIMEOUT_PARMNUM 528
-#define SV_MINRCVQUEUE_PARMNUM 529
-#define SV_MINFREEWORKITEMS_PARMNUM 530
-#define SV_XACTMEMSIZE_PARMNUM 531
-#define SV_THREADPRIORITY_PARMNUM 532
-#define SV_MAXMPXCT_PARMNUM 533
-#define SV_OPLOCKBREAKWAIT_PARMNUM 534
-#define SV_OPLOCKBREAKRESPONSEWAIT_PARMNUM 535
-#define SV_ENABLEOPLOCKS_PARMNUM 536
-#define SV_ENABLEOPLOCKFORCECLOSE_PARMNUM 537
-#define SV_ENABLEFCBOPENS_PARMNUM 538
-#define SV_ENABLERAW_PARMNUM 539
-#define SV_ENABLESHAREDNETDRIVES_PARMNUM 540
-#define SV_MINFREECONNECTIONS_PARMNUM 541
-#define SV_MAXFREECONNECTIONS_PARMNUM 542
-#define SV_INITSESSTABLE_PARMNUM 543
-#define SV_INITCONNTABLE_PARMNUM 544
-#define SV_INITFILETABLE_PARMNUM 545
-#define SV_INITSEARCHTABLE_PARMNUM 546
-#define SV_ALERTSCHEDULE_PARMNUM 547
-#define SV_ERRORTHRESHOLD_PARMNUM 548
-#define SV_NETWORKERRORTHRESHOLD_PARMNUM 549
-#define SV_DISKSPACETHRESHOLD_PARMNUM 550
-#define SV_MAXLINKDELAY_PARMNUM 552
-#define SV_MINLINKTHROUGHPUT_PARMNUM 553
-#define SV_LINKINFOVALIDTIME_PARMNUM 554
-#define SV_SCAVQOSINFOUPDATETIME_PARMNUM 555
-#define SV_MAXWORKITEMIDLETIME_PARMNUM 556
-#define SV_MAXRAWWORKITEMS_PARMNUM 557
-#define SV_PRODUCTTYPE_PARMNUM 560
-#define SV_SERVERSIZE_PARMNUM 561
-#define SV_CONNECTIONLESSAUTODISC_PARMNUM 562
-#define SV_SHARINGVIOLATIONRETRIES_PARMNUM 563
-#define SV_SHARINGVIOLATIONDELAY_PARMNUM 564
-#define SV_MAXGLOBALOPENSEARCH_PARMNUM 565
-#define SV_REMOVEDUPLICATESEARCHES_PARMNUM 566
-#define SV_LOCKVIOLATIONRETRIES_PARMNUM 567
-#define SV_LOCKVIOLATIONOFFSET_PARMNUM 568
-#define SV_LOCKVIOLATIONDELAY_PARMNUM 569
-#define SV_MDLREADSWITCHOVER_PARMNUM 570
-#define SV_CACHEDOPENLIMIT_PARMNUM 571
-#define SV_CRITICALTHREADS_PARMNUM 572
-#define SV_RESTRICTNULLSESSACCESS_PARMNUM 573
-#define SV_ENABLEWFW311DIRECTIPX_PARMNUM 574
-#define SV_OTHERQUEUEAFFINITY_PARMNUM 575
-#define SV_QUEUESAMPLESECS_PARMNUM 576
-#define SV_BALANCECOUNT_PARMNUM 577
-#define SV_PREFERREDAFFINITY_PARMNUM 578
-#define SV_MAXFREERFCBS_PARMNUM 579
-#define SV_MAXFREEMFCBS_PARMNUM 580
-#define SV_MAXFREELFCBS_PARMNUM 581
-#define SV_MAXFREEPAGEDPOOLCHUNKS_PARMNUM 582
-#define SV_MINPAGEDPOOLCHUNKSIZE_PARMNUM 583
-#define SV_MAXPAGEDPOOLCHUNKSIZE_PARMNUM 584
-#define SV_SENDSFROMPREFERREDPROCESSOR_PARMNUM 585
-#define SV_MAXTHREADSPERQUEUE_PARMNUM 586
-#define SV_COMMENT_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_COMMENT_PARMNUM)
-#define SV_USERS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_USERS_PARMNUM)
-#define SV_DISC_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_DISC_PARMNUM)
-#define SV_HIDDEN_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_HIDDEN_PARMNUM)
-#define SV_ANNOUNCE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_ANNOUNCE_PARMNUM)
-#define SV_ANNDELTA_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_ANNDELTA_PARMNUM)
-#define SV_SESSOPENS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_SESSOPENS_PARMNUM)
-#define SV_SESSVCS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_SESSVCS_PARMNUM)
-#define SV_OPENSEARCH_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_OPENSEARCH_PARMNUM)
-#define SV_MAXWORKITEMS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MAXWORKITEMS_PARMNUM)
-#define SV_MAXRAWBUFLEN_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MAXRAWBUFLEN_PARMNUM)
-#define SV_SESSUSERS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_SESSUSERS_PARMNUM)
-#define SV_SESSCONNS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_SESSCONNS_PARMNUM)
-#define SV_MAXNONPAGEDMEMORYUSAGE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MAXNONPAGEDMEMORYUSAGE_PARMNUM)
-#define SV_MAXPAGEDMEMORYUSAGE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MAXPAGEDMEMORYUSAGE_PARMNUM)
-#define SV_ENABLESOFTCOMPAT_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_ENABLESOFTCOMPAT_PARMNUM)
-#define SV_ENABLEFORCEDLOGOFF_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_ENABLEFORCEDLOGOFF_PARMNUM)
-#define SV_TIMESOURCE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_TIMESOURCE_PARMNUM)
-#define SV_LMANNOUNCE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_LMANNOUNCE_PARMNUM)
-#define SV_MAXCOPYREADLEN_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MAXCOPYREADLEN_PARMNUM)
-#define SV_MAXCOPYWRITELEN_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MAXCOPYWRITELEN_PARMNUM)
-#define SV_MINKEEPSEARCH_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MINKEEPSEARCH_PARMNUM)
-#define SV_MAXKEEPSEARCH_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MAXKEEPSEARCH_PARMNUM)
-#define SV_MINKEEPCOMPLSEARCH_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MINKEEPCOMPLSEARCH_PARMNUM)
-#define SV_MAXKEEPCOMPLSEARCH_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MAXKEEPCOMPLSEARCH_PARMNUM)
-#define SV_SCAVTIMEOUT_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_SCAVTIMEOUT_PARMNUM)
-#define SV_MINRCVQUEUE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MINRCVQUEUE_PARMNUM)
-#define SV_MINFREEWORKITEMS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MINFREEWORKITEMS_PARMNUM)
-#define SV_MAXMPXCT_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MAXMPXCT_PARMNUM)
-#define SV_OPLOCKBREAKWAIT_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_OPLOCKBREAKWAIT_PARMNUM)
-#define SV_OPLOCKBREAKRESPONSEWAIT_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_OPLOCKBREAKRESPONSEWAIT_PARMNUM)
-#define SV_ENABLEOPLOCKS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_ENABLEOPLOCKS_PARMNUM)
-#define SV_ENABLEOPLOCKFORCECLOSE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_ENABLEOPLOCKFORCECLOSE_PARMNUM)
-#define SV_ENABLEFCBOPENS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_ENABLEFCBOPENS_PARMNUM)
-#define SV_ENABLERAW_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_ENABLERAW_PARMNUM)
-#define SV_ENABLESHAREDNETDRIVES_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_ENABLESHAREDNETDRIVES_PARMNUM)
-#define SV_MINFREECONNECTIONS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MINFREECONNECTIONS_PARMNUM)
-#define SV_MAXFREECONNECTIONS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MAXFREECONNECTIONS_PARMNUM)
-#define SV_INITSESSTABLE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_INITSESSTABLE_PARMNUM)
-#define SV_INITCONNTABLE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_INITCONNTABLE_PARMNUM)
-#define SV_INITFILETABLE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_INITFILETABLE_PARMNUM)
-#define SV_INITSEARCHTABLE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_INITSEARCHTABLE_PARMNUM)
-#define SV_ALERTSCHEDULE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_ALERTSCHEDULE_PARMNUM)
-#define SV_ERRORTHRESHOLD_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_ERRORTHRESHOLD_PARMNUM)
-#define SV_NETWORKERRORTHRESHOLD_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_NETWORKERRORTHRESHOLD_PARMNUM)
-#define SV_DISKSPACETHRESHOLD_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_DISKSPACETHRESHOLD_PARMNUM)
-#define SV_MAXLINKDELAY_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MAXLINKDELAY_PARMNUM)
-#define SV_MINLINKTHROUGHPUT_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MINLINKTHROUGHPUT_PARMNUM)
-#define SV_LINKINFOVALIDTIME_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_LINKINFOVALIDTIME_PARMNUM)
-#define SV_SCAVQOSINFOUPDATETIME_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_SCAVQOSINFOUPDATETIME_PARMNUM)
-#define SV_MAXWORKITEMIDLETIME_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MAXWORKITEMIDLETIME_PARMNUM)
-#define SV_MAXRAWWORKITEMS_INFOLOEVEL (PARMNUM_BASE_INFOLEVEL+SV_MAXRAWWORKITEMS_PARMNUM)
-#define SV_PRODUCTTYPE_INFOLOEVEL (PARMNUM_BASE_INFOLEVEL+SV_PRODUCTTYPE_PARMNUM)
-#define SV_SERVERSIZE_INFOLOEVEL (PARMNUM_BASE_INFOLEVEL+SV_SERVERSIZE_PARMNUM)
-#define SV_CONNECTIONLESSAUTODISC_INFOLOEVEL (PARMNUM_BASE_INFOLEVEL+SV_CONNECTIONLESSAUTODISC_PARMNUM)
-#define SV_SHARINGVIOLATIONRETRIES_INFOLOEVEL (PARMNUM_BASE_INFOLEVEL+SV_SHARINGVIOLATIONRETRIES_PARMNUM)
-#define SV_SHARINGVIOLATIONDELAY_INFOLOEVEL (PARMNUM_BASE_INFOLEVEL+SV_SHARINGVIOLATIONDELAY_PARMNUM)
-#define SV_MAXGLOBALOPENSEARCH_INFOLOEVEL (PARMNUM_BASE_INFOLEVEL+SV_MAXGLOBALOPENSEARCH_PARMNUM)
-#define SV_REMOVEDUPLICATESEARCHES_INFOLOEVEL (PARMNUM_BASE_INFOLEVEL+SV_REMOVEDUPLICATESEARCHES_PARMNUM)
-#define SV_LOCKVIOLATIONRETRIES_INFOLOEVEL (PARMNUM_BASE_INFOLEVEL+SV_LOCKVIOLATIONRETRIES_PARMNUM)
-#define SV_LOCKVIOLATIONOFFSET_INFOLOEVEL (PARMNUM_BASE_INFOLEVEL+SV_LOCKVIOLATIONOFFSET_PARMNUM)
-#define SV_LOCKVIOLATIONDELAY_INFOLOEVEL (PARMNUM_BASE_INFOLEVEL+SV_LOCKVIOLATIONDELAY_PARMNUM)
-#define SV_MDLREADSWITCHOVER_INFOLOEVEL (PARMNUM_BASE_INFOLEVEL+SV_MDLREADSWITCHOVER_PARMNUM)
-#define SV_CACHEDOPENLIMIT_INFOLOEVEL (PARMNUM_BASE_INFOLEVEL+SV_CACHEDOPENLIMIT_PARMNUM)
-#define SV_CRITICALTHREADS_INFOLOEVEL (PARMNUM_BASE_INFOLEVEL+SV_CRITICALTHREADS_PARMNUM)
-#define SV_RESTRICTNULLSESSACCESS_INFOLOEVEL (PARMNUM_BASE_INFOLEVEL+SV_RESTRICTNULLSESSACCESS_PARMNUM)
-#define SV_ENABLEWFW311DIRECTIPX_INFOLOEVEL (PARMNUM_BASE_INFOLEVEL+SV_ENABLEWFW311DIRECTIPX_PARMNUM)
-#define SV_OTHERQUEUEAFFINITY_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_OTHERQUEUEAFFINITY_PARMNUM)
-#define SV_QUEUESAMPLESECS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_QUEUESAMPLESECS_PARMNUM)
-#define SV_BALANCECOUNT_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_BALANCECOUNT_PARMNUM)
-#define SV_PREFERREDAFFINITY_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_PREFERREDAFFINITY_PARMNUM)
-#define SV_MAXFREERFCBS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MAXFREERFCBS_PARMNUM)
-#define SV_MAXFREEMFCBS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MAXFREEMFCBS_PARMNUM)
-#define SV_MAXFREELFCBS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MAXFREELFCBS_PARMNUM)
-#define SV_MAXFREEPAGEDPOOLCHUNKS_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MAXFREEPAGEDPOOLCHUNKS_PARMNUM)
-#define SV_MINPAGEDPOOLCHUNKSIZE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MINPAGEDPOOLCHUNKSIZE_PARMNUM)
-#define SV_MAXPAGEDPOOLCHUNKSIZE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MAXPAGEDPOOLCHUNKSIZE_PARMNUM)
-#define SV_SENDSFROMPREFERREDPROCESSOR_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_SENDSFROMPREFERREDPROCESSOR_PARMNUM)
-#define SV_MAXTHREADSPERQUEUE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SV_MAXTHREADSPERQUEUE_PARMNUM)
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/lmshare.h b/winsup/w32api/include/lmshare.h
deleted file mode 100644
index 07fe927..0000000
--- a/winsup/w32api/include/lmshare.h
+++ /dev/null
@@ -1,147 +0,0 @@
-#ifndef _LMSHARE_H
-#define _LMSHARE_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include <lmcons.h>
-#define SHARE_NETNAME_PARMNUM 1
-#define SHARE_TYPE_PARMNUM 3
-#define SHARE_REMARK_PARMNUM 4
-#define SHARE_PERMISSIONS_PARMNUM 5
-#define SHARE_MAX_USES_PARMNUM 6
-#define SHARE_CURRENT_USES_PARMNUM 7
-#define SHARE_PATH_PARMNUM 8
-#define SHARE_PASSWD_PARMNUM 9
-#define SHARE_FILE_SD_PARMNUM 501
-#define SHARE_REMARK_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SHARE_REMARK_PARMNUM)
-#define SHARE_MAX_USES_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SHARE_MAX_USES_PARMNUM)
-#define SHARE_FILE_SD_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+SHARE_FILE_SD_PARMNUM)
-#define SHI1_NUM_ELEMENTS 4
-#define SHI2_NUM_ELEMENTS 10
-#define STYPE_DISKTREE 0
-#define STYPE_PRINTQ 1
-#define STYPE_DEVICE 2
-#define STYPE_IPC 3
-#define STYPE_DFS 100
-#define STYPE_SPECIAL 0x80000000
-#define SHI_USES_UNLIMITED (DWORD)(-1)
-#define SESS_GUEST 1
-#define SESS_NOENCRYPTION 2
-#define SESI1_NUM_ELEMENTS 8
-#define SESI2_NUM_ELEMENTS 9
-#define PERM_FILE_READ 1
-#define PERM_FILE_WRITE 2
-#define PERM_FILE_CREATE 4
-typedef struct _FILE_INFO_2 { DWORD fi2_id;} FILE_INFO_2,*PFILE_INFO_2,*LPFILE_INFO_2;
-typedef struct _FILE_INFO_3 {
- DWORD fi3_id;
- DWORD fi3_permissions;
- DWORD fi3_num_locks;
- LPTSTR fi3_pathname;
- LPTSTR fi3_username;
-} FILE_INFO_3,*PFILE_INFO_3,*LPFILE_INFO_3;
-typedef struct _SHARE_INFO_0 { LPTSTR shi0_netname; } SHARE_INFO_0,*PSHARE_INFO_0,*LPSHARE_INFO_0;
-typedef struct _SHARE_INFO_1 {
- LPTSTR shi1_netname;
- DWORD shi1_type;
- LPTSTR shi1_remark;
-} SHARE_INFO_1,*PSHARE_INFO_1,*LPSHARE_INFO_1;
-typedef struct _SHARE_INFO_2 {
- LPTSTR shi2_netname;
- DWORD shi2_type;
- LPTSTR shi2_remark;
- DWORD shi2_permissions;
- DWORD shi2_max_uses;
- DWORD shi2_current_uses;
- LPTSTR shi2_path;
- LPTSTR shi2_passwd;
-} SHARE_INFO_2,*PSHARE_INFO_2,*LPSHARE_INFO_2;
-typedef struct _SHARE_INFO_502 {
- LPTSTR shi502_netname;
- DWORD shi502_type;
- LPTSTR shi502_remark;
- DWORD shi502_permissions;
- DWORD shi502_max_uses;
- DWORD shi502_current_uses;
- LPTSTR shi502_path;
- LPTSTR shi502_passwd;
- DWORD shi502_reserved;
- PSECURITY_DESCRIPTOR shi502_security_descriptor;
-} SHARE_INFO_502,*PSHARE_INFO_502,*LPSHARE_INFO_502;
-typedef struct _SHARE_INFO_1004 {
- LPTSTR shi1004_remark;
-} SHARE_INFO_1004,*PSHARE_INFO_1004,*LPSHARE_INFO_1004;
-typedef struct _SHARE_INFO_1006 {
- DWORD shi1006_max_uses;
-} SHARE_INFO_1006,*PSHARE_INFO_1006,*LPSHARE_INFO_1006;
-typedef struct _SHARE_INFO_1501 {
- DWORD shi1501_reserved;
- PSECURITY_DESCRIPTOR shi1501_security_descriptor;
-} SHARE_INFO_1501,*PSHARE_INFO_1501,*LPSHARE_INFO_1501;
-typedef struct _SESSION_INFO_0 { LPWSTR sesi0_cname; } SESSION_INFO_0,*PSESSION_INFO_0,*LPSESSION_INFO_0;
-typedef struct _SESSION_INFO_1 {
- LPTSTR sesi1_cname;
- LPTSTR sesi1_username;
- DWORD sesi1_num_opens;
- DWORD sesi1_time;
- DWORD sesi1_idle_time;
- DWORD sesi1_user_flags;
-} SESSION_INFO_1,*PSESSION_INFO_1,*LPSESSION_INFO_1;
-typedef struct _SESSION_INFO_2 {
- LPTSTR sesi2_cname;
- LPTSTR sesi2_username;
- DWORD sesi2_num_opens;
- DWORD sesi2_time;
- DWORD sesi2_idle_time;
- DWORD sesi2_user_flags;
- LPWSTR sesi2_cltype_name;
-} SESSION_INFO_2,*PSESSION_INFO_2,*LPSESSION_INFO_2;
-typedef struct _SESSION_INFO_10 {
- LPWSTR sesi10_cname;
- LPWSTR sesi10_username;
- DWORD sesi10_time;
- DWORD sesi10_idle_time;
-} SESSION_INFO_10,*PSESSION_INFO_10,*LPSESSION_INFO_10;
-typedef struct _SESSION_INFO_502 {
- LPWSTR sesi502_cname;
- LPWSTR sesi502_username;
- DWORD sesi502_num_opens;
- DWORD sesi502_time;
- DWORD sesi502_idle_time;
- DWORD sesi502_user_flags;
- LPWSTR sesi502_cltype_name;
- LPWSTR sesi502_transport;
-} SESSION_INFO_502,*PSESSION_INFO_502,*LPSESSION_INFO_502;
-typedef struct _CONNECTION_INFO_0 { DWORD coni0_id; } CONNECTION_INFO_0,*PCONNECTION_INFO_0,*LPCONNECTION_INFO_0;
-typedef struct _CONNECTION_INFO_1 {
- DWORD coni1_id;
- DWORD coni1_type;
- DWORD coni1_num_opens;
- DWORD coni1_num_users;
- DWORD coni1_time;
- LPWSTR coni1_username;
- LPWSTR coni1_netname;
-} CONNECTION_INFO_1,*PCONNECTION_INFO_1,*LPCONNECTION_INFO_1;
-NET_API_STATUS WINAPI NetShareAdd(LPWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetShareEnum(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetShareEnumSticky(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD resume_handle);
-NET_API_STATUS WINAPI NetShareGetInfo(LPWSTR,LPWSTR,DWORD,PBYTE*);
-NET_API_STATUS WINAPI NetShareSetInfo(LPWSTR,LPWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetShareDel(LPWSTR,LPWSTR,DWORD);
-NET_API_STATUS WINAPI NetShareDelSticky(LPWSTR,LPWSTR,DWORD);
-NET_API_STATUS WINAPI NetShareCheck(LPWSTR,LPWSTR,PDWORD);
-NET_API_STATUS WINAPI NetSessionEnum(LPWSTR,LPWSTR,LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetSessionDel(LPWSTR,LPWSTR,LPWSTR);
-NET_API_STATUS WINAPI NetSessionGetInfo(LPWSTR,LPWSTR,LPWSTR,DWORD,PBYTE*);
-NET_API_STATUS WINAPI NetConnectionEnum(LPWSTR,LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetFileClose(LPWSTR,DWORD);
-NET_API_STATUS WINAPI NetFileEnum(LPWSTR,LPWSTR,LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetFileGetInfo(LPWSTR,DWORD,DWORD,PBYTE*);
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/lmsname.h b/winsup/w32api/include/lmsname.h
deleted file mode 100644
index a840cb2..0000000
--- a/winsup/w32api/include/lmsname.h
+++ /dev/null
@@ -1,58 +0,0 @@
-#ifndef _LMSNAME_H
-#define _LMSNAME_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#define SERVICE_WORKSTATION TEXT("LanmanWorkstation")
-#define SERVICE_LM20_WORKSTATION TEXT("WORKSTATION")
-#define WORKSTATION_DISPLAY_NAME TEXT("Workstation")
-#define SERVICE_SERVER TEXT("LanmanServer")
-#define SERVICE_LM20_SERVER TEXT("SERVER")
-#define SERVER_DISPLAY_NAME TEXT("Server")
-#define SERVICE_BROWSER TEXT("BROWSER")
-#define SERVICE_LM20_BROWSER SERVICE_BROWSER
-#define SERVICE_MESSENGER TEXT("MESSENGER")
-#define SERVICE_LM20_MESSENGER SERVICE_MESSENGER
-#define SERVICE_NETRUN TEXT("NETRUN")
-#define SERVICE_LM20_NETRUN SERVICE_NETRUN
-#define SERVICE_SPOOLER TEXT("SPOOLER")
-#define SERVICE_LM20_SPOOLER SERVICE_SPOOLER
-#define SERVICE_ALERTER TEXT("ALERTER")
-#define SERVICE_LM20_ALERTER SERVICE_ALERTER
-#define SERVICE_NETLOGON TEXT("NETLOGON")
-#define SERVICE_LM20_NETLOGON SERVICE_NETLOGON
-#define SERVICE_NETPOPUP TEXT("NETPOPUP")
-#define SERVICE_LM20_NETPOPUP SERVICE_NETPOPUP
-#define SERVICE_SQLSERVER TEXT("SQLSERVER")
-#define SERVICE_LM20_SQLSERVER SERVICE_SQLSERVER
-#define SERVICE_REPL TEXT("REPLICATOR")
-#define SERVICE_LM20_REPL SERVICE_REPL
-#define SERVICE_RIPL TEXT("REMOTEBOOT")
-#define SERVICE_LM20_RIPL SERVICE_RIPL
-#define SERVICE_TIMESOURCE TEXT("TIMESOURCE")
-#define SERVICE_LM20_TIMESOURCE SERVICE_TIMESOURCE
-#define SERVICE_AFP TEXT("AFP")
-#define SERVICE_LM20_AFP SERVICE_AFP
-#define SERVICE_UPS TEXT("UPS")
-#define SERVICE_LM20_UPS SERVICE_UPS
-#define SERVICE_XACTSRV TEXT("XACTSRV")
-#define SERVICE_LM20_XACTSRV SERVICE_XACTSRV
-#define SERVICE_TCPIP TEXT("TCPIP")
-#define SERVICE_LM20_TCPIP SERVICE_TCPIP
-#define SERVICE_NBT TEXT("NBT")
-#define SERVICE_LM20_NBT SERVICE_NBT
-#define SERVICE_LMHOSTS TEXT("LMHOSTS")
-#define SERVICE_LM20_LMHOSTS SERVICE_LMHOSTS
-#define SERVICE_TELNET TEXT("Telnet")
-#define SERVICE_LM20_TELNET SERVICE_TELNET
-#define SERVICE_SCHEDULE TEXT("Schedule")
-#define SERVICE_LM20_SCHEDULE SERVICE_SCHEDULE
-#define SERVICE_NTLMSSP TEXT("NtLmSsp")
-#define SERVICE_DHCP TEXT("DHCP")
-#define SERVICE_LM20_DHCP SERVICE_DHCP
-#define SERVICE_NWSAP TEXT("NwSapAgent")
-#define SERVICE_LM20_NWSAP SERVICE_NWSAP
-#define NWSAP_DISPLAY_NAME TEXT("NW Sap Agent")
-#define SERVICE_NWCS TEXT("NWCWorkstation")
-#endif
diff --git a/winsup/w32api/include/lmstats.h b/winsup/w32api/include/lmstats.h
deleted file mode 100644
index 2a4a2c2..0000000
--- a/winsup/w32api/include/lmstats.h
+++ /dev/null
@@ -1,114 +0,0 @@
-#ifndef _LMSTATS_H
-#define _LMSTATS_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define STATSOPT_CLR 1
-#define STATS_NO_VALUE ((ULONG)-1)
-#define STATS_OVERFLOW ((ULONG)-2)
-typedef struct _STAT_SERVER_0 {
- DWORD sts0_start;
- DWORD sts0_fopens;
- DWORD sts0_devopens;
- DWORD sts0_jobsqueued;
- DWORD sts0_sopens;
- DWORD sts0_stimedout;
- DWORD sts0_serrorout;
- DWORD sts0_pwerrors;
- DWORD sts0_permerrors;
- DWORD sts0_syserrors;
- DWORD sts0_bytessent_low;
- DWORD sts0_bytessent_high;
- DWORD sts0_bytesrcvd_low;
- DWORD sts0_bytesrcvd_high;
- DWORD sts0_avresponse;
- DWORD sts0_reqbufneed;
- DWORD sts0_bigbufneed;
-} STAT_SERVER_0,*PSTAT_SERVER_0,*LPSTAT_SERVER_0;
-#ifdef LM20_WORKSTATION_STATISTICS
-typedef struct _STAT_WORKSTATION_0 {
- DWORD stw0_start;
- DWORD stw0_numNCB_r;
- DWORD stw0_numNCB_s;
- DWORD stw0_numNCB_a;
- DWORD stw0_fiNCB_r;
- DWORD stw0_fiNCB_s;
- DWORD stw0_fiNCB_a;
- DWORD stw0_fcNCB_r;
- DWORD stw0_fcNCB_s;
- DWORD stw0_fcNCB_a;
- DWORD stw0_sesstart;
- DWORD stw0_sessfailcon;
- DWORD stw0_sessbroke;
- DWORD stw0_uses;
- DWORD stw0_usefail;
- DWORD stw0_autorec;
- DWORD stw0_bytessent_r_lo;
- DWORD stw0_bytessent_r_hi;
- DWORD stw0_bytesrcvd_r_lo;
- DWORD stw0_bytesrcvd_r_hi;
- DWORD stw0_bytessent_s_lo;
- DWORD stw0_bytessent_s_hi;
- DWORD stw0_bytesrcvd_s_lo;
- DWORD stw0_bytesrcvd_s_hi;
- DWORD stw0_bytessent_a_lo;
- DWORD stw0_bytessent_a_hi;
- DWORD stw0_bytesrcvd_a_lo;
- DWORD stw0_bytesrcvd_a_hi;
- DWORD stw0_reqbufneed;
- DWORD stw0_bigbufneed;
-} STAT_WORKSTATION_0,*PSTAT_WORKSTATION_0,*LPSTAT_WORKSTATION_0;
-#else
-typedef struct _STAT_WORKSTATION_0 {
- LARGE_INTEGER StatisticsStartTime;
- LARGE_INTEGER BytesReceived;
- LARGE_INTEGER SmbsReceived;
- LARGE_INTEGER PagingReadBytesRequested;
- LARGE_INTEGER NonPagingReadBytesRequested;
- LARGE_INTEGER CacheReadBytesRequested;
- LARGE_INTEGER NetworkReadBytesRequested;
- LARGE_INTEGER BytesTransmitted;
- LARGE_INTEGER SmbsTransmitted;
- LARGE_INTEGER PagingWriteBytesRequested;
- LARGE_INTEGER NonPagingWriteBytesRequested;
- LARGE_INTEGER CacheWriteBytesRequested;
- LARGE_INTEGER NetworkWriteBytesRequested;
- DWORD InitiallyFailedOperations;
- DWORD FailedCompletionOperations;
- DWORD ReadOperations;
- DWORD RandomReadOperations;
- DWORD ReadSmbs;
- DWORD LargeReadSmbs;
- DWORD SmallReadSmbs;
- DWORD WriteOperations;
- DWORD RandomWriteOperations;
- DWORD WriteSmbs;
- DWORD LargeWriteSmbs;
- DWORD SmallWriteSmbs;
- DWORD RawReadsDenied;
- DWORD RawWritesDenied;
- DWORD NetworkErrors;
- DWORD Sessions;
- DWORD FailedSessions;
- DWORD Reconnects;
- DWORD CoreConnects;
- DWORD Lanman20Connects;
- DWORD Lanman21Connects;
- DWORD LanmanNtConnects;
- DWORD ServerDisconnects;
- DWORD HungSessions;
- DWORD UseCount;
- DWORD FailedUseCount;
- DWORD CurrentCommands;
-} STAT_WORKSTATION_0,*PSTAT_WORKSTATION_0,*LPSTAT_WORKSTATION_0;
-#endif
-
-NET_API_STATUS WINAPI NetStatisticsGet(LPWSTR,LPWSTR,DWORD,DWORD,PBYTE*);
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/lmsvc.h b/winsup/w32api/include/lmsvc.h
deleted file mode 100644
index bb19ee0..0000000
--- a/winsup/w32api/include/lmsvc.h
+++ /dev/null
@@ -1,134 +0,0 @@
-#ifndef _LMSVC_H
-#define _LMSVC_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include <lmsname.h>
-#define SERVICE_DOS_ENCRYPTION TEXT("ENCRYPT")
-#define SERVICE_UNINSTALLED 0
-#define SERVICE_INSTALL_PENDING 1
-#define SERVICE_UNINSTALL_PENDING 2
-#define SERVICE_INSTALLED 3
-#define SERVICE_INSTALL_STATE 3
-#define SERVICE_PAUSE_STATE 18
-#define LM20_SERVICE_ACTIVE 0
-#define LM20_SERVICE_CONTINUE_PENDING 4
-#define LM20_SERVICE_PAUSE_PENDING 8
-#define LM20_SERVICE_PAUSED 18
-#define SERVICE_NOT_UNINSTALLABLE 0
-#define SERVICE_UNINSTALLABLE 16
-#define SERVICE_NOT_PAUSABLE 0
-#define SERVICE_PAUSABLE 32
-#define SERVICE_REDIR_PAUSED 0x700
-#define SERVICE_REDIR_DISK_PAUSED 256
-#define SERVICE_REDIR_PRINT_PAUSED 512
-#define SERVICE_REDIR_COMM_PAUSED 1024
-#define SERVICE_CTRL_INTERROGATE 0
-#define SERVICE_CTRL_PAUSE 1
-#define SERVICE_CTRL_CONTINUE 2
-#define SERVICE_CTRL_UNINSTALL 3
-#define SERVICE_CTRL_REDIR_DISK 1
-#define SERVICE_CTRL_REDIR_PRINT 2
-#define SERVICE_CTRL_REDIR_COMM 4
-#define SERVICE_IP_NO_HINT 0
-#define SERVICE_CCP_NO_HINT 0
-#define SERVICE_IP_QUERY_HINT 0x10000
-#define SERVICE_CCP_QUERY_HINT 0x10000
-#define SERVICE_IP_CHKPT_NUM 255
-#define SERVICE_CCP_CHKPT_NUM 255
-#define SERVICE_IP_WAIT_TIME 0xFF00
-#define SERVICE_CCP_WAIT_TIME 0xFF00
-#define SERVICE_IP_WAITTIME_SHIFT 8
-#define SERVICE_NTIP_WAITTIME_SHIFT 12
-#define UPPER_HINT_MASK 0xFF00
-#define LOWER_HINT_MASK 255
-#define UPPER_GET_HINT_MASK 0xFF00000
-#define LOWER_GET_HINT_MASK 0xFF00
-#define SERVICE_NT_MAXTIME 0xFFFF
-#define SERVICE_RESRV_MASK 0x1FFFF
-#define SERVICE_MAXTIME 255
-#define SERVICE_BASE 3050
-#define SERVICE_UIC_NORMAL 0
-#define SERVICE_UIC_BADPARMVAL (SERVICE_BASE+1)
-#define SERVICE_UIC_MISSPARM (SERVICE_BASE+2)
-#define SERVICE_UIC_UNKPARM (SERVICE_BASE+3)
-#define SERVICE_UIC_RESOURCE (SERVICE_BASE+4)
-#define SERVICE_UIC_CONFIG (SERVICE_BASE+5)
-#define SERVICE_UIC_SYSTEM (SERVICE_BASE+6)
-#define SERVICE_UIC_INTERNAL (SERVICE_BASE+7)
-#define SERVICE_UIC_AMBIGPARM (SERVICE_BASE+8)
-#define SERVICE_UIC_DUPPARM (SERVICE_BASE+9)
-#define SERVICE_UIC_KILL (SERVICE_BASE+10)
-#define SERVICE_UIC_EXEC (SERVICE_BASE+11)
-#define SERVICE_UIC_SUBSERV (SERVICE_BASE+12)
-#define SERVICE_UIC_CONFLPARM (SERVICE_BASE+13)
-#define SERVICE_UIC_FILE (SERVICE_BASE+14)
-#define SERVICE_UIC_M_NULL 0
-#define SERVICE_UIC_M_MEMORY (SERVICE_BASE+20)
-#define SERVICE_UIC_M_DISK (SERVICE_BASE+21)
-#define SERVICE_UIC_M_THREADS (SERVICE_BASE+22)
-#define SERVICE_UIC_M_PROCESSES (SERVICE_BASE+23)
-#define SERVICE_UIC_M_SECURITY (SERVICE_BASE+24)
-#define SERVICE_UIC_M_LANROOT (SERVICE_BASE+25)
-#define SERVICE_UIC_M_REDIR (SERVICE_BASE+26)
-#define SERVICE_UIC_M_SERVER (SERVICE_BASE+27)
-#define SERVICE_UIC_M_SEC_FILE_ERR (SERVICE_BASE+28)
-#define SERVICE_UIC_M_FILES (SERVICE_BASE+29)
-#define SERVICE_UIC_M_LOGS (SERVICE_BASE+30)
-#define SERVICE_UIC_M_LANGROUP (SERVICE_BASE+31)
-#define SERVICE_UIC_M_MSGNAME (SERVICE_BASE+32)
-#define SERVICE_UIC_M_ANNOUNCE (SERVICE_BASE+33)
-#define SERVICE_UIC_M_UAS (SERVICE_BASE+34)
-#define SERVICE_UIC_M_SERVER_SEC_ERR (SERVICE_BASE+35)
-#define SERVICE_UIC_M_WKSTA (SERVICE_BASE+37)
-#define SERVICE_UIC_M_ERRLOG (SERVICE_BASE+38)
-#define SERVICE_UIC_M_FILE_UW (SERVICE_BASE+39)
-#define SERVICE_UIC_M_ADDPAK (SERVICE_BASE+40)
-#define SERVICE_UIC_M_LAZY (SERVICE_BASE+41)
-#define SERVICE_UIC_M_UAS_MACHINE_ACCT (SERVICE_BASE+42)
-#define SERVICE_UIC_M_UAS_SERVERS_NMEMB (SERVICE_BASE+43)
-#define SERVICE_UIC_M_UAS_SERVERS_NOGRP (SERVICE_BASE+44)
-#define SERVICE_UIC_M_UAS_INVALID_ROLE (SERVICE_BASE+45)
-#define SERVICE_UIC_M_NETLOGON_NO_DC (SERVICE_BASE+46)
-#define SERVICE_UIC_M_NETLOGON_DC_CFLCT (SERVICE_BASE+47)
-#define SERVICE_UIC_M_NETLOGON_AUTH (SERVICE_BASE+48)
-#define SERVICE_UIC_M_UAS_PROLOG (SERVICE_BASE+49)
-#define SERVICE2_BASE 5600
-#define SERVICE_UIC_M_NETLOGON_MPATH (SERVICE2_BASE+0)
-#define SERVICE_UIC_M_LSA_MACHINE_ACCT (SERVICE2_BASE+1)
-#define SERVICE_UIC_M_DATABASE_ERROR (SERVICE2_BASE+2)
-
-typedef struct _SERVICE_INFO_0 { LPWSTR svci0_name;} SERVICE_INFO_0,*PSERVICE_INFO_0,* LPSERVICE_INFO_0;
-typedef struct _SERVICE_INFO_1 {
- LPWSTR svci1_name;
- DWORD svci1_status;
- DWORD svci1_code;
- DWORD svci1_pid;
-} SERVICE_INFO_1,*PSERVICE_INFO_1,* LPSERVICE_INFO_1;
-typedef struct _SERVICE_INFO_2 {
- LPWSTR svci2_name;
- DWORD svci2_status;
- DWORD svci2_code;
- DWORD svci2_pid;
- LPWSTR svci2_text;
- DWORD svci2_specific_error;
- LPWSTR svci2_display_name;
-} SERVICE_INFO_2,*PSERVICE_INFO_2,* LPSERVICE_INFO_2;
-
-NET_API_STATUS WINAPI NetServiceControl(LPCWSTR,LPCWSTR,DWORD,DWORD,PBYTE*);
-NET_API_STATUS WINAPI NetServiceEnum(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetServiceGetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE*);
-NET_API_STATUS WINAPI NetServiceInstall(LPCWSTR,LPCWSTR,DWORD,LPCWSTR*,PBYTE*);
-#define SERVICE_IP_CODE(t,n) ((long)SERVICE_IP_QUERY_HINT|(long)(n|(t<<SERVICE_IP_WAITTIME_SHIFT)))
-#define SERVICE_CCP_CODE(t,n) ((long)SERVICE_CCP_QUERY_HINT|(long)(n|(t<<SERVICE_IP_WAITTIME_SHIFT)))
-#define SERVICE_UIC_CODE(c,m) ((long)(((long)c<<16)|(long)(USHORT)m))
-#define SERVICE_NT_CCP_CODE(t,n) (((long)SERVICE_CCP_QUERY_HINT)|((long)(n))|(((t)&LOWER_HINT_MASK)<<SERVICE_IP_WAITTIME_SHIFT)|(((t)&UPPER_HINT_MASK)<<SERVICE_NTIP_WAITTIME_SHIFT))
-#define SERVICE_NT_WAIT_GET(c) ((((c)&UPPER_GET_HINT_MASK)>>SERVICE_NTIP_WAITTIME_SHIFT)|(((c)&LOWER_GET_HINT_MASK)>>SERVICE_IP_WAITTIME_SHIFT))
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/lmuse.h b/winsup/w32api/include/lmuse.h
deleted file mode 100644
index a63a71f..0000000
--- a/winsup/w32api/include/lmuse.h
+++ /dev/null
@@ -1,60 +0,0 @@
-#ifndef _LMUSE_H
-#define _LMUSE_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include <lmuseflg.h>
-#define USE_LOCAL_PARMNUM 1
-#define USE_REMOTE_PARMNUM 2
-#define USE_PASSWORD_PARMNUM 3
-#define USE_ASGTYPE_PARMNUM 4
-#define USE_USERNAME_PARMNUM 5
-#define USE_DOMAINNAME_PARMNUM 6
-#define USE_OK 0
-#define USE_PAUSED 1
-#define USE_SESSLOST 2
-#define USE_DISCONN 2
-#define USE_NETERR 3
-#define USE_CONN 4
-#define USE_RECONN 5
-#define USE_WILDCARD ((DWORD)-1)
-#define USE_DISKDEV 0
-#define USE_SPOOLDEV 1
-#define USE_CHARDEV 2
-#define USE_IPC 3
-typedef struct _USE_INFO_0 {
- LPWSTR ui0_local;
- LPWSTR ui0_remote;
-}USE_INFO_0,*PUSE_INFO_0,*LPUSE_INFO_0;
-typedef struct _USE_INFO_1 {
- LPWSTR ui1_local;
- LPWSTR ui1_remote;
- LPWSTR ui1_password;
- DWORD ui1_status;
- DWORD ui1_asg_type;
- DWORD ui1_refcount;
- DWORD ui1_usecount;
-}USE_INFO_1,*PUSE_INFO_1,*LPUSE_INFO_1;
-typedef struct _USE_INFO_2 {
- LPWSTR ui2_local;
- LPWSTR ui2_remote;
- LPWSTR ui2_password;
- DWORD ui2_status;
- DWORD ui2_asg_type;
- DWORD ui2_refcount;
- DWORD ui2_usecount;
- LPWSTR ui2_username;
- LPWSTR ui2_domainname;
-}USE_INFO_2,*PUSE_INFO_2,*LPUSE_INFO_2;
-NET_API_STATUS WINAPI NetUseAdd(LPWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetUseDel(LPWSTR,LPWSTR,DWORD);
-NET_API_STATUS WINAPI NetUseEnum(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetUseGetInfo(LPWSTR,LPWSTR,DWORD,PBYTE*);
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/lmuseflg.h b/winsup/w32api/include/lmuseflg.h
deleted file mode 100644
index 34162e4..0000000
--- a/winsup/w32api/include/lmuseflg.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef _LMUSEFLG_H
-#define _LMUSEFLG_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#define USE_NOFORCE 0
-#define USE_FORCE 1
-#define USE_LOTS_OF_FORCE 2
-#endif
diff --git a/winsup/w32api/include/lmwksta.h b/winsup/w32api/include/lmwksta.h
deleted file mode 100644
index a8c6ccb..0000000
--- a/winsup/w32api/include/lmwksta.h
+++ /dev/null
@@ -1,233 +0,0 @@
-#ifndef _LMWKSTA_H
-#define _LMWKSTA_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include <lmuseflg.h>
-#define WKSTA_PLATFORM_ID_PARMNUM 100
-#define WKSTA_COMPUTERNAME_PARMNUM 1
-#define WKSTA_LANGROUP_PARMNUM 2
-#define WKSTA_VER_MAJOR_PARMNUM 4
-#define WKSTA_VER_MINOR_PARMNUM 5
-#define WKSTA_LOGGED_ON_USERS_PARMNUM 6
-#define WKSTA_LANROOT_PARMNUM 7
-#define WKSTA_LOGON_DOMAIN_PARMNUM 8
-#define WKSTA_LOGON_SERVER_PARMNUM 9
-#define WKSTA_CHARWAIT_PARMNUM 10
-#define WKSTA_CHARTIME_PARMNUM 11
-#define WKSTA_CHARCOUNT_PARMNUM 12
-#define WKSTA_KEEPCONN_PARMNUM 13
-#define WKSTA_KEEPSEARCH_PARMNUM 14
-#define WKSTA_MAXCMDS_PARMNUM 15
-#define WKSTA_NUMWORKBUF_PARMNUM 16
-#define WKSTA_MAXWRKCACHE_PARMNUM 17
-#define WKSTA_SESSTIMEOUT_PARMNUM 18
-#define WKSTA_SIZERROR_PARMNUM 19
-#define WKSTA_NUMALERTS_PARMNUM 20
-#define WKSTA_NUMSERVICES_PARMNUM 21
-#define WKSTA_NUMCHARBUF_PARMNUM 22
-#define WKSTA_SIZCHARBUF_PARMNUM 23
-#define WKSTA_ERRLOGSZ_PARMNUM 27
-#define WKSTA_PRINTBUFTIME_PARMNUM 28
-#define WKSTA_SIZWORKBUF_PARMNUM 29
-#define WKSTA_MAILSLOTS_PARMNUM 30
-#define WKSTA_NUMDGRAMBUF_PARMNUM 31
-#define WKSTA_WRKHEURISTICS_PARMNUM 32
-#define WKSTA_MAXTHREADS_PARMNUM 33
-#define WKSTA_LOCKQUOTA_PARMNUM 41
-#define WKSTA_LOCKINCREMENT_PARMNUM 42
-#define WKSTA_LOCKMAXIMUM_PARMNUM 43
-#define WKSTA_PIPEINCREMENT_PARMNUM 44
-#define WKSTA_PIPEMAXIMUM_PARMNUM 45
-#define WKSTA_DORMANTFILELIMIT_PARMNUM 46
-#define WKSTA_CACHEFILETIMEOUT_PARMNUM 47
-#define WKSTA_USEOPPORTUNISTICLOCKING_PARMNUM 48
-#define WKSTA_USEUNLOCKBEHIND_PARMNUM 49
-#define WKSTA_USECLOSEBEHIND_PARMNUM 50
-#define WKSTA_BUFFERNAMEDPIPES_PARMNUM 51
-#define WKSTA_USELOCKANDREADANDUNLOCK_PARMNUM 52
-#define WKSTA_UTILIZENTCACHING_PARMNUM 53
-#define WKSTA_USERAWREAD_PARMNUM 54
-#define WKSTA_USERAWWRITE_PARMNUM 55
-#define WKSTA_USEWRITERAWWITHDATA_PARMNUM 56
-#define WKSTA_USEENCRYPTION_PARMNUM 57
-#define WKSTA_BUFFILESWITHDENYWRITE_PARMNUM 58
-#define WKSTA_BUFFERREADONLYFILES_PARMNUM 59
-#define WKSTA_FORCECORECREATEMODE_PARMNUM 60
-#define WKSTA_USE512BYTESMAXTRANSFER_PARMNUM 61
-#define WKSTA_READAHEADTHRUPUT_PARMNUM 62
-#define WKSTA_OTH_DOMAINS_PARMNUM 101
-#define TRANSPORT_QUALITYOFSERVICE_PARMNUM 201
-#define TRANSPORT_NAME_PARMNUM 202
-
-typedef struct _WKSTA_INFO_100 {
- DWORD wki100_platform_id;
- LPWSTR wki100_computername;
- LPWSTR wki100_langroup;
- DWORD wki100_ver_major;
- DWORD wki100_ver_minor;
-}WKSTA_INFO_100,*PWKSTA_INFO_100,*LPWKSTA_INFO_100;
-typedef struct _WKSTA_INFO_101 {
- DWORD wki101_platform_id;
- LPWSTR wki101_computername;
- LPWSTR wki101_langroup;
- DWORD wki101_ver_major;
- DWORD wki101_ver_minor;
- LPWSTR wki101_lanroot;
-}WKSTA_INFO_101,*PWKSTA_INFO_101,*LPWKSTA_INFO_101;
-typedef struct _WKSTA_INFO_102 {
- DWORD wki102_platform_id;
- LPWSTR wki102_computername;
- LPWSTR wki102_langroup;
- DWORD wki102_ver_major;
- DWORD wki102_ver_minor;
- LPWSTR wki102_lanroot;
- DWORD wki102_logged_on_users;
-}WKSTA_INFO_102,*PWKSTA_INFO_102,*LPWKSTA_INFO_102;
-typedef struct _WKSTA_INFO_302{
- DWORD wki302_char_wait;
- DWORD wki302_collection_time;
- DWORD wki302_maximum_collection_count;
- DWORD wki302_keep_conn;
- DWORD wki302_keep_search;
- DWORD wki302_max_cmds;
- DWORD wki302_num_work_buf;
- DWORD wki302_siz_work_buf;
- DWORD wki302_max_wrk_cache;
- DWORD wki302_sess_timeout;
- DWORD wki302_siz_error;
- DWORD wki302_num_alerts;
- DWORD wki302_num_services;
- DWORD wki302_errlog_sz;
- DWORD wki302_print_buf_time;
- DWORD wki302_num_char_buf;
- DWORD wki302_siz_char_buf;
- LPWSTR wki302_wrk_heuristics;
- DWORD wki302_mailslots;
- DWORD wki302_num_dgram_buf;
-}WKSTA_INFO_302,*PWKSTA_INFO_302,*LPWKSTA_INFO_302;
-typedef struct _WKSTA_INFO_402{
- DWORD wki402_char_wait;
- DWORD wki402_collection_time;
- DWORD wki402_maximum_collection_count;
- DWORD wki402_keep_conn;
- DWORD wki402_keep_search;
- DWORD wki402_max_cmds;
- DWORD wki402_num_work_buf;
- DWORD wki402_siz_work_buf;
- DWORD wki402_max_wrk_cache;
- DWORD wki402_sess_timeout;
- DWORD wki402_siz_error;
- DWORD wki402_num_alerts;
- DWORD wki402_num_services;
- DWORD wki402_errlog_sz;
- DWORD wki402_print_buf_time;
- DWORD wki402_num_char_buf;
- DWORD wki402_siz_char_buf;
- LPWSTR wki402_wrk_heuristics;
- DWORD wki402_mailslots;
- DWORD wki402_num_dgram_buf;
- DWORD wki402_max_threads;
-}WKSTA_INFO_402,*PWKSTA_INFO_402,*LPWKSTA_INFO_402;
-typedef struct _WKSTA_INFO_502{
- DWORD wki502_char_wait;
- DWORD wki502_collection_time;
- DWORD wki502_maximum_collection_count;
- DWORD wki502_keep_conn;
- DWORD wki502_max_cmds;
- DWORD wki502_sess_timeout;
- DWORD wki502_siz_char_buf;
- DWORD wki502_max_threads;
- DWORD wki502_lock_quota;
- DWORD wki502_lock_increment;
- DWORD wki502_lock_maximum;
- DWORD wki502_pipe_increment;
- DWORD wki502_pipe_maximum;
- DWORD wki502_cache_file_timeout;
- DWORD wki502_dormant_file_limit;
- DWORD wki502_read_ahead_throughput;
- DWORD wki502_num_mailslot_buffers;
- DWORD wki502_num_srv_announce_buffers;
- DWORD wki502_max_illegal_datagram_events;
- DWORD wki502_illegal_datagram_event_reset_frequency;
- BOOL wki502_log_election_packets;
- BOOL wki502_use_opportunistic_locking;
- BOOL wki502_use_unlock_behind;
- BOOL wki502_use_close_behind;
- BOOL wki502_buf_named_pipes;
- BOOL wki502_use_lock_read_unlock;
- BOOL wki502_utilize_nt_caching;
- BOOL wki502_use_raw_read;
- BOOL wki502_use_raw_write;
- BOOL wki502_use_write_raw_data;
- BOOL wki502_use_encryption;
- BOOL wki502_buf_files_deny_write;
- BOOL wki502_buf_read_only_files;
- BOOL wki502_force_core_create_mode;
- BOOL wki502_use_512_byte_max_transfer;
-}WKSTA_INFO_502,*PWKSTA_INFO_502,*LPWKSTA_INFO_502;
-typedef struct _WKSTA_INFO_1010 { DWORD wki1010_char_wait;} WKSTA_INFO_1010,*PWKSTA_INFO_1010,*LPWKSTA_INFO_1010;
-typedef struct _WKSTA_INFO_1011 { DWORD wki1011_collection_time;} WKSTA_INFO_1011,*PWKSTA_INFO_1011,*LPWKSTA_INFO_1011;
-typedef struct _WKSTA_INFO_1012 { DWORD wki1012_maximum_collection_count;} WKSTA_INFO_1012,*PWKSTA_INFO_1012,*LPWKSTA_INFO_1012;
-typedef struct _WKSTA_INFO_1027 { DWORD wki1027_errlog_sz;} WKSTA_INFO_1027,*PWKSTA_INFO_1027,*LPWKSTA_INFO_1027;
-typedef struct _WKSTA_INFO_1028 { DWORD wki1028_print_buf_time;} WKSTA_INFO_1028,*PWKSTA_INFO_1028,*LPWKSTA_INFO_1028;
-typedef struct _WKSTA_INFO_1032 { DWORD wki1032_wrk_heuristics;} WKSTA_INFO_1032,*PWKSTA_INFO_1032,*LPWKSTA_INFO_1032;
-typedef struct _WKSTA_INFO_1013 { DWORD wki1013_keep_conn;} WKSTA_INFO_1013,*PWKSTA_INFO_1013,*LPWKSTA_INFO_1013;
-typedef struct _WKSTA_INFO_1018 { DWORD wki1018_sess_timeout;} WKSTA_INFO_1018,*PWKSTA_INFO_1018,*LPWKSTA_INFO_1018;
-typedef struct _WKSTA_INFO_1023 { DWORD wki1023_siz_char_buf;} WKSTA_INFO_1023,*PWKSTA_INFO_1023,*LPWKSTA_INFO_1023;
-typedef struct _WKSTA_INFO_1033 { DWORD wki1033_max_threads;} WKSTA_INFO_1033,*PWKSTA_INFO_1033,*LPWKSTA_INFO_1033;
-typedef struct _WKSTA_INFO_1041 { DWORD wki1041_lock_quota;} WKSTA_INFO_1041,*PWKSTA_INFO_1041,*LPWKSTA_INFO_1041;
-typedef struct _WKSTA_INFO_1042 { DWORD wki1042_lock_increment;} WKSTA_INFO_1042,*PWKSTA_INFO_1042,*LPWKSTA_INFO_1042;
-typedef struct _WKSTA_INFO_1043 { DWORD wki1043_lock_maximum;} WKSTA_INFO_1043,*PWKSTA_INFO_1043,*LPWKSTA_INFO_1043;
-typedef struct _WKSTA_INFO_1044 { DWORD wki1044_pipe_increment;} WKSTA_INFO_1044,*PWKSTA_INFO_1044,*LPWKSTA_INFO_1044;
-typedef struct _WKSTA_INFO_1045 { DWORD wki1045_pipe_maximum;} WKSTA_INFO_1045,*PWKSTA_INFO_1045,*LPWKSTA_INFO_1045;
-typedef struct _WKSTA_INFO_1046 { DWORD wki1046_dormant_file_limit;} WKSTA_INFO_1046,*PWKSTA_INFO_1046,*LPWKSTA_INFO_1046;
-typedef struct _WKSTA_INFO_1047 { DWORD wki1047_cache_file_timeout;} WKSTA_INFO_1047,*PWKSTA_INFO_1047,*LPWKSTA_INFO_1047;
-typedef struct _WKSTA_INFO_1048 { BOOL wki1048_use_opportunistic_locking;} WKSTA_INFO_1048,*PWKSTA_INFO_1048,*LPWKSTA_INFO_1048;
-typedef struct _WKSTA_INFO_1049 { BOOL wki1049_use_unlock_behind;} WKSTA_INFO_1049,*PWKSTA_INFO_1049,*LPWKSTA_INFO_1049;
-typedef struct _WKSTA_INFO_1050 { BOOL wki1050_use_close_behind;} WKSTA_INFO_1050,*PWKSTA_INFO_1050,*LPWKSTA_INFO_1050;
-typedef struct _WKSTA_INFO_1051 { BOOL wki1051_buf_named_pipes;} WKSTA_INFO_1051,*PWKSTA_INFO_1051,*LPWKSTA_INFO_1051;
-typedef struct _WKSTA_INFO_1052 { BOOL wki1052_use_lock_read_unlock;} WKSTA_INFO_1052,*PWKSTA_INFO_1052,*LPWKSTA_INFO_1052;
-typedef struct _WKSTA_INFO_1053 { BOOL wki1053_utilize_nt_caching;} WKSTA_INFO_1053,*PWKSTA_INFO_1053,*LPWKSTA_INFO_1053;
-typedef struct _WKSTA_INFO_1054 { BOOL wki1054_use_raw_read;} WKSTA_INFO_1054,*PWKSTA_INFO_1054,*LPWKSTA_INFO_1054;
-typedef struct _WKSTA_INFO_1055 { BOOL wki1055_use_raw_write;} WKSTA_INFO_1055,*PWKSTA_INFO_1055,*LPWKSTA_INFO_1055;
-typedef struct _WKSTA_INFO_1056 { BOOL wki1056_use_write_raw_data;} WKSTA_INFO_1056,*PWKSTA_INFO_1056,*LPWKSTA_INFO_1056;
-typedef struct _WKSTA_INFO_1057 { BOOL wki1057_use_encryption;} WKSTA_INFO_1057,*PWKSTA_INFO_1057,*LPWKSTA_INFO_1057;
-typedef struct _WKSTA_INFO_1058 { BOOL wki1058_buf_files_deny_write;} WKSTA_INFO_1058,*PWKSTA_INFO_1058,*LPWKSTA_INFO_1058;
-typedef struct _WKSTA_INFO_1059 { BOOL wki1059_buf_read_only_files;} WKSTA_INFO_1059,*PWKSTA_INFO_1059,*LPWKSTA_INFO_1059;
-typedef struct _WKSTA_INFO_1060 { BOOL wki1060_force_core_create_mode;} WKSTA_INFO_1060,*PWKSTA_INFO_1060,*LPWKSTA_INFO_1060;
-typedef struct _WKSTA_INFO_1061 { BOOL wki1061_use_512_byte_max_transfer;} WKSTA_INFO_1061,*PWKSTA_INFO_1061,*LPWKSTA_INFO_1061;
-typedef struct _WKSTA_INFO_1062 { DWORD wki1062_read_ahead_throughput;} WKSTA_INFO_1062,*PWKSTA_INFO_1062,*LPWKSTA_INFO_1062;
-typedef struct _WKSTA_USER_INFO_0 { LPWSTR wkui0_username;}WKSTA_USER_INFO_0,*PWKSTA_USER_INFO_0,*LPWKSTA_USER_INFO_0;
-typedef struct _WKSTA_USER_INFO_1 {
- LPWSTR wkui1_username;
- LPWSTR wkui1_logon_domain;
- LPWSTR wkui1_oth_domains;
- LPWSTR wkui1_logon_server;
-}WKSTA_USER_INFO_1,*PWKSTA_USER_INFO_1,*LPWKSTA_USER_INFO_1;
-typedef struct _WKSTA_USER_INFO_1101 { LPWSTR wkui1101_oth_domains;} WKSTA_USER_INFO_1101,*PWKSTA_USER_INFO_1101,*LPWKSTA_USER_INFO_1101;
-typedef struct _WKSTA_TRANSPORT_INFO_0 {
- DWORD wkti0_quality_of_service;
- DWORD wkti0_number_of_vcs;
- LPWSTR wkti0_transport_name;
- LPWSTR wkti0_transport_address;
- BOOL wkti0_wan_ish;
-}WKSTA_TRANSPORT_INFO_0,*PWKSTA_TRANSPORT_INFO_0,*LPWKSTA_TRANSPORT_INFO_0;
-
-NET_API_STATUS WINAPI NetWkstaGetInfo(LPWSTR,DWORD,PBYTE*);
-NET_API_STATUS WINAPI NetWkstaSetInfo(LPWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetWkstaUserGetInfo(LPWSTR,DWORD,PBYTE*);
-NET_API_STATUS WINAPI NetWkstaUserSetInfo(LPWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetWkstaUserEnum(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-NET_API_STATUS WINAPI NetWkstaTransportAdd(LPWSTR,DWORD,PBYTE,PDWORD);
-NET_API_STATUS WINAPI NetWkstaTransportDel(LPWSTR,LPWSTR,DWORD);
-NET_API_STATUS WINAPI NetWkstaTransportEnum(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/lzexpand.h b/winsup/w32api/include/lzexpand.h
deleted file mode 100644
index 68d4807..0000000
--- a/winsup/w32api/include/lzexpand.h
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef _LZEXPAND_H
-#define _LZEXPAND_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define LZERROR_BADINHANDLE (-1)
-#define LZERROR_BADOUTHANDLE (-2)
-#define LZERROR_READ (-3)
-#define LZERROR_WRITE (-4)
-#define LZERROR_GLOBALLOC (-5)
-#define LZERROR_GLOBLOCK (-6)
-#define LZERROR_BADVALUE (-7)
-#define LZERROR_UNKNOWNALG (-8)
-LONG WINAPI CopyLZFile(INT,INT);
-INT WINAPI GetExpandedNameA(LPSTR,LPSTR);
-INT WINAPI GetExpandedNameW(LPWSTR,LPWSTR);
-VOID APIENTRY LZClose(INT);
-LONG APIENTRY LZCopy(INT,INT);
-VOID WINAPI LZDone(VOID);
-INT WINAPI LZInit(INT);
-INT WINAPI LZOpenFileA(LPSTR,LPOFSTRUCT,WORD);
-INT WINAPI LZOpenFileW(LPWSTR,LPOFSTRUCT,WORD);
-INT WINAPI LZRead(INT,LPSTR,INT);
-LONG WINAPI LZSeek(INT,LONG,INT);
-INT WINAPI LZStart(VOID);
-#ifdef UNICODE
-#define GetExpandedName GetExpandedNameW
-#define LZOpenFile LZOpenFileW
-#else
-#define GetExpandedName GetExpandedNameA
-#define LZOpenFile LZOpenFileA
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/mapi.h b/winsup/w32api/include/mapi.h
deleted file mode 100644
index 8474f89..0000000
--- a/winsup/w32api/include/mapi.h
+++ /dev/null
@@ -1,163 +0,0 @@
-#ifndef _MAPI_H
-#define _MAPI_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define SUCCESS_SUCCESS 0
-#define MAPI_USER_ABORT 1
-#define MAPI_E_USER_ABORT 1
-#define MAPI_E_FAILURE 2
-#define MAPI_E_LOGIN_FAILURE 3
-#define MAPI_E_LOGON_FAILURE 3
-#define MAPI_E_DISK_FULL 4
-#define MAPI_E_INSUFFICIENT_MEMORY 5
-#define MAPI_E_ACCESS_DENIED 6
-#define MAPI_E_BLK_TOO_SMALL 6
-#define MAPI_E_TOO_MANY_SESSIONS 8
-#define MAPI_E_TOO_MANY_FILES 9
-#define MAPI_E_TOO_MANY_RECIPIENTS 10
-#define MAPI_E_ATTACHMENT_NOT_FOUND 11
-#define MAPI_E_ATTACHMENT_OPEN_FAILURE 12
-#define MAPI_E_ATTACHMENT_WRITE_FAILURE 13
-#define MAPI_E_UNKNOWN_RECIPIENT 14
-#define MAPI_E_BAD_RECIPTYPE 15
-#define MAPI_E_NO_MESSAGES 16
-#define MAPI_E_INVALID_MESSAGE 17
-#define MAPI_E_TEXT_TOO_LARGE 18
-#define MAPI_E_INVALID_SESSION 19
-#define MAPI_E_TYPE_NOT_SUPPORTED 20
-#define MAPI_E_AMBIGUOUS_RECIPIENT 21
-#define MAPI_E_AMBIGUOUS_RECIP 21
-#define MAPI_E_MESSAGE_IN_USE 22
-#define MAPI_E_NETWORK_FAILURE 23
-#define MAPI_E_INVALID_EDITFIELDS 24
-#define MAPI_E_INVALID_RECIPS 25
-#define MAPI_E_NOT_SUPPORTED 26
-
-#define MAPI_ORIG 0
-#define MAPI_TO 1
-#define MAPI_CC 2
-#define MAPI_BCC 3
-
-#define MAPI_LOGON_UI 0x0001
-#define MAPI_NEW_SESSION 0x0002
-#define MAPI_FORCE_DOWNLOAD 0x1000
-#define MAPI_LOGOFF_SHARED 0x0001
-#define MAPI_LOGOFF_UI 0x0002
-#define MAPI_DIALOG 0x0008
-#define MAPI_UNREAD_ONLY 0x0020
-#define MAPI_LONG_MSGID 0x4000
-#define MAPI_GUARANTEE_FIFO 0x0100
-#define MAPI_ENVELOPE_ONLY 0x0040
-#define MAPI_PEEK 0x0080
-#define MAPI_BODY_AS_FILE 0x0200
-#define MAPI_SUPPRESS_ATTACH 0x0800
-#define MAPI_AB_NOMODIFY 0x0400
-#define MAPI_OLE 0x0001
-#define MAPI_OLE_STATIC 0x0002
-#define MAPI_UNREAD 0x0001
-#define MAPI_RECEIPT_REQUESTED 0x0002
-#define MAPI_SENT 0x0004
-
-#ifndef RC_INVOKED
-typedef unsigned long FLAGS;
-typedef unsigned long LHANDLE;
-typedef unsigned long FAR *LPLHANDLE, FAR *LPULONG;
-
-typedef struct {
- ULONG ulReserved;
- ULONG ulRecipClass;
- LPSTR lpszName;
- LPSTR lpszAddress;
- ULONG ulEIDSize;
- LPVOID lpEntryID;
-} MapiRecipDesc, *lpMapiRecipDesc;
-typedef struct {
- ULONG ulReserved;
- ULONG flFlags;
- ULONG nPosition;
- LPSTR lpszPathName;
- LPSTR lpszFileName;
- LPVOID lpFileType;
-} MapiFileDesc, *lpMapiFileDesc;
-typedef struct {
- ULONG ulReserved;
- ULONG cbTag;
- LPBYTE lpTag;
- ULONG cbEncoding;
- LPBYTE lpEncoding;
-} MapiFileTagExt, *lpMapiFileTagExt;
-typedef struct {
- ULONG ulReserved;
- LPSTR lpszSubject;
- LPSTR lpszNoteText;
- LPSTR lpszMessageType;
- LPSTR lpszDateReceived;
- LPSTR lpszConversationID;
- FLAGS flFlags;
- lpMapiRecipDesc lpOriginator;
- ULONG nRecipCount;
- lpMapiRecipDesc lpRecips;
- ULONG nFileCount;
- lpMapiFileDesc lpFiles;
-} MapiMessage, *lpMapiMessage;
-
-ULONG PASCAL MAPILogon (ULONG,LPSTR,LPSTR,FLAGS,ULONG,LPLHANDLE);
-ULONG PASCAL MAPISendMail (LHANDLE,ULONG,lpMapiMessage,FLAGS,ULONG);
-ULONG PASCAL MAPISendDocuments (ULONG,LPSTR,LPSTR,LPSTR,ULONG);
-ULONG PASCAL MAPIReadMail (LHANDLE,ULONG,LPSTR,FLAGS,ULONG,
- lpMapiMessage*);
-ULONG PASCAL MAPIFindNext (LHANDLE,ULONG,LPSTR,LPSTR,FLAGS,ULONG,LPSTR);
-ULONG PASCAL MAPIResolveName (LHANDLE,ULONG,LPSTR,FLAGS,ULONG,
- lpMapiRecipDesc*);
-ULONG PASCAL MAPIAddress (LHANDLE,ULONG,LPSTR,ULONG,LPSTR,ULONG,
- lpMapiRecipDesc,FLAGS,ULONG,LPULONG,
- lpMapiRecipDesc*);
-ULONG PASCAL MAPIFreeBuffer (LPVOID);
-ULONG PASCAL MAPIDetails (LHANDLE,ULONG,lpMapiRecipDesc,FLAGS,ULONG);
-ULONG PASCAL MAPISaveMail (LHANDLE,ULONG,lpMapiMessage lpszMessage,
- FLAGS,ULONG,LPSTR);
-ULONG PASCAL MAPIDeleteMail (LHANDLE lpSession,ULONG,LPSTR,FLAGS,ULONG);
-ULONG PASCAL MAPILogoff (LHANDLE,ULONG,FLAGS,ULONG);
-/* Netscape extensions. */
-ULONG PASCAL MAPIGetNetscapeVersion (void);
-ULONG PASCAL MAPI_NSCP_SynchronizeClient (LHANDLE,ULONG);
-
-/* Handles for use with GetProcAddress */
-typedef ULONG (PASCAL * LPMAPILOGON) (ULONG,LPSTR,LPSTR,FLAGS,ULONG,
- LPLHANDLE);
-typedef ULONG (PASCAL * LPMAPISENDMAIL) (LHANDLE,ULONG,lpMapiMessage,
- FLAGS,ULONG);
-typedef ULONG (PASCAL * LPMAPISENDDOCUMENTS) (ULONG,LPSTR,LPSTR,
- LPSTR,ULONG);
-typedef ULONG (PASCAL * LPMAPIREADMAIL) (LHANDLE,ULONG,LPSTR,FLAGS,
- ULONG,lpMapiMessage*);
-typedef ULONG (PASCAL * LPMAPIFINDNEXT) (LHANDLE,ULONG,LPSTR,LPSTR,
- FLAGS,ULONG,LPSTR);
-typedef ULONG (PASCAL * LPMAPIRESOLVENAME) (LHANDLE,ULONG,LPSTR,FLAGS,
- ULONG,lpMapiRecipDesc*);
-typedef ULONG (PASCAL * LPMAPIADDRESS) (LHANDLE,ULONG,LPSTR,ULONG,LPSTR,
- ULONG,lpMapiRecipDesc,FLAGS,ULONG,
- LPULONG,lpMapiRecipDesc*);
-typedef ULONG (PASCAL * LPMAPIFREEBUFFER) (LPVOID lpv);
-typedef ULONG (PASCAL * LPMAPIDETAILS) (LHANDLE,ULONG,lpMapiRecipDesc,
- FLAGS,ULONG);
-typedef ULONG (PASCAL * LPMAPISAVEMAIL) (LHANDLE,ULONG,lpMapiMessage,
- FLAGS,ULONG,LPSTR);
-typedef ULONG (PASCAL * LPMAPIDELETEMAIL) (LHANDLE lpSession,ULONG,
- LPSTR, FLAGS,ULONG);
-typedef ULONG (PASCAL * LPMAPILOGOFF)(LHANDLE,ULONG,FLAGS,ULONG);
-
-#endif /* RC_INVOKED */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* Not _MAPI_H */
-
diff --git a/winsup/w32api/include/mciavi.h b/winsup/w32api/include/mciavi.h
deleted file mode 100644
index 8535a7f..0000000
--- a/winsup/w32api/include/mciavi.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef _MCIAVI_H
-#define _MCIAVI_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#define MCI_MCIAVI_PLAY_WINDOW 0x1000000
-#define MCI_MCIAVI_PLAY_FULLSCREEN 0x2000000
-#define MCI_MCIAVI_PLAY_FULLBY2 0x4000000
-#define MCI_AVI_STATUS_FRAMES_SKIPPED 0x8001
-#define MCI_AVI_STATUS_LAST_PLAY_SPEED 0x8002
-#define MCI_AVI_STATUS_AUDIO_BREAKS 0x8003
-#define MCI_AVI_SETVIDEO_DRAW_PROCEDURE 0x8000
-#define MCI_AVI_SETVIDEO_PALETTE_COLOR 0x8100
-#define MCI_AVI_SETVIDEO_PALETTE_HALFTONE 0x0000FFFF
-#define MCIERR_AVI_OLDAVIFORMAT (MCIERR_CUSTOM_DRIVER_BASE+100)
-#define MCIERR_AVI_NOTINTERLEAVED (MCIERR_CUSTOM_DRIVER_BASE+101)
-#define MCIERR_AVI_NODISPDIB (MCIERR_CUSTOM_DRIVER_BASE+102)
-#define MCIERR_AVI_CANTPLAYFULLSCREEN (MCIERR_CUSTOM_DRIVER_BASE+103)
-#define MCIERR_AVI_TOOBIGFORVGA (MCIERR_CUSTOM_DRIVER_BASE+104)
-#define MCIERR_AVI_NOCOMPRESSOR (MCIERR_CUSTOM_DRIVER_BASE+105)
-#define MCIERR_AVI_DISPLAYERROR (MCIERR_CUSTOM_DRIVER_BASE+106)
-#define MCIERR_AVI_AUDIOERROR (MCIERR_CUSTOM_DRIVER_BASE+107)
-#define MCIERR_AVI_BADPALETTE (MCIERR_CUSTOM_DRIVER_BASE+108)
-#endif
diff --git a/winsup/w32api/include/mcx.h b/winsup/w32api/include/mcx.h
deleted file mode 100644
index c7173b7..0000000
--- a/winsup/w32api/include/mcx.h
+++ /dev/null
@@ -1,77 +0,0 @@
-#ifndef _MCX_H
-#define _MCX_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define DIALOPTION_BILLING 64
-#define DIALOPTION_QUIET 128
-#define DIALOPTION_DIALTONE 256
-#define MDMVOLFLAG_LOW 1
-#define MDMVOLFLAG_MEDIUM 2
-#define MDMVOLFLAG_HIGH 4
-#define MDMVOL_LOW 0
-#define MDMVOL_MEDIUM 1
-#define MDMVOL_HIGH 2
-#define MDMSPKRFLAG_OFF 1
-#define MDMSPKRFLAG_DIAL 2
-#define MDMSPKRFLAG_ON 4
-#define MDMSPKRFLAG_CALLSETUP 8
-#define MDMSPKR_OFF 0
-#define MDMSPKR_DIAL 1
-#define MDMSPKR_ON 2
-#define MDMSPKR_CALLSETUP 3
-#define MDM_COMPRESSION 1
-#define MDM_ERROR_CONTROL 2
-#define MDM_FORCED_EC 4
-#define MDM_CELLULAR 8
-#define MDM_FLOWCONTROL_HARD 16
-#define MDM_FLOWCONTROL_SOFT 32
-#define MDM_CCITT_OVERRIDE 64
-#define MDM_SPEED_ADJUST 128
-#define MDM_TONE_DIAL 256
-#define MDM_BLIND_DIAL 512
-#define MDM_V23_OVERRIDE 1024
-typedef struct _MODEMDEVCAPS {
- DWORD dwActualSize;
- DWORD dwRequiredSize;
- DWORD dwDevSpecificOffset;
- DWORD dwDevSpecificSize;
- DWORD dwModemProviderVersion;
- DWORD dwModemManufacturerOffset;
- DWORD dwModemManufacturerSize;
- DWORD dwModemModelOffset;
- DWORD dwModemModelSize;
- DWORD dwModemVersionOffset;
- DWORD dwModemVersionSize;
- DWORD dwDialOptions;
- DWORD dwCallSetupFailTimer;
- DWORD dwInactivityTimeout;
- DWORD dwSpeakerVolume;
- DWORD dwSpeakerMode;
- DWORD dwModemOptions;
- DWORD dwMaxDTERate;
- DWORD dwMaxDCERate;
- BYTE abVariablePortion[1];
-} MODEMDEVCAPS,*PMODEMDEVCAPS,*LPMODEMDEVCAPS;
-typedef struct _MODEMSETTINGS {
- DWORD dwActualSize;
- DWORD dwRequiredSize;
- DWORD dwDevSpecificOffset;
- DWORD dwDevSpecificSize;
- DWORD dwCallSetupFailTimer;
- DWORD dwInactivityTimeout;
- DWORD dwSpeakerVolume;
- DWORD dwSpeakerMode;
- DWORD dwPreferredModemOptions;
- DWORD dwNegotiatedModemOptions;
- DWORD dwNegotiatedDCERate;
- BYTE abVariablePortion[1];
-} MODEMSETTINGS,*PMODEMSETTINGS,*LPMODEMSETTINGS;
-#ifdef __cplusplus
-}
-#endif
-#endif /* _MCX_H */
diff --git a/winsup/w32api/include/mgm.h b/winsup/w32api/include/mgm.h
deleted file mode 100644
index d8f0d89..0000000
--- a/winsup/w32api/include/mgm.h
+++ /dev/null
@@ -1,75 +0,0 @@
-#ifndef _MGM_H
-#define _MGM_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if (_WIN32_WINNT >= 0x0500)
-#define MGM_JOIN_STATE_FLAG 0x00000001
-#define MGM_FORWARD_STATE_FLAG 0x00000002
-#define MGM_MFE_STATS_0 0x00000001
-#define MGM_MFE_STATS_1 0x00000002
-typedef enum _MGM_ENUM_TYPES {
- ANY_SOURCE=0,
- ALL_SOURCES
-} MGM_ENUM_TYPES;
-typedef struct _MGM_IF_ENTRY {
- DWORD dwIfIndex;
- DWORD dwIfNextHopAddr;
- BOOL bIGMP;
- BOOL bIsEnabled;
-} MGM_IF_ENTRY,*PMGM_IF_ENTRY;
-typedef DWORD(CALLBACK *PMGM_RPF_CALLBACK)(DWORD,DWORD,DWORD,DWORD,PDWORD,PDWORD,PDWORD,DWORD,PBYTE,PBYTE);
-typedef DWORD(CALLBACK *PMGM_CREATION_ALERT_CALLBACK)(DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,PMGM_IF_ENTRY);
-typedef DWORD(CALLBACK *PMGM_PRUNE_ALERT_CALLBACK)(DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,BOOL,PDWORD);
-typedef DWORD(CALLBACK *PMGM_JOIN_ALERT_CALLBACK)(DWORD,DWORD,DWORD,DWORD,BOOL);
-typedef DWORD(CALLBACK *PMGM_WRONG_IF_CALLBACK)(DWORD,DWORD,DWORD,DWORD,DWORD,PBYTE);
-typedef DWORD(CALLBACK *PMGM_LOCAL_JOIN_CALLBACK)(DWORD,DWORD,DWORD,DWORD,DWORD,DWORD);
-typedef DWORD(CALLBACK *PMGM_LOCAL_LEAVE_CALLBACK)(DWORD,DWORD,DWORD,DWORD,DWORD,DWORD);
-typedef DWORD(CALLBACK *PMGM_DISABLE_IGMP_CALLBACK)(DWORD,DWORD);
-typedef DWORD(CALLBACK *PMGM_ENABLE_IGMP_CALLBACK)(DWORD,DWORD);
-typedef struct _ROUTING_PROTOCOL_CONFIG {
- DWORD dwCallbackFlags;
- PMGM_RPF_CALLBACK pfnRpfCallback;
- PMGM_CREATION_ALERT_CALLBACK pfnCreationAlertCallback;
- PMGM_PRUNE_ALERT_CALLBACK pfnPruneAlertCallback;
- PMGM_JOIN_ALERT_CALLBACK pfnJoinAlertCallback;
- PMGM_WRONG_IF_CALLBACK pfnWrongIfCallback;
- PMGM_LOCAL_JOIN_CALLBACK pfnLocalJoinCallback;
- PMGM_LOCAL_LEAVE_CALLBACK pfnLocalLeaveCallback;
- PMGM_DISABLE_IGMP_CALLBACK pfnDisableIgmpCallback;
- PMGM_ENABLE_IGMP_CALLBACK pfnEnableIgmpCallback;
-} ROUTING_PROTOCOL_CONFIG,*PROUTING_PROTOCOL_CONFIG;
-typedef struct _SOURCE_GROUP_ENTRY {
- DWORD dwSourceAddr;
- DWORD dwSourceMask;
- DWORD dwGroupAddr;
- DWORD dwGroupMask;
-} SOURCE_GROUP_ENTRY,*PSOURCE_GROUP_ENTRY;
-DWORD WINAPI MgmAddGroupMembershipEntry(HANDLE,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD);
-DWORD WINAPI MgmDeleteGroupMembershipEntry(HANDLE,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD);
-DWORD WINAPI MgmDeRegisterMProtocol(HANDLE);
-DWORD WINAPI MgmGetFirstMfe(PDWORD,PBYTE,PDWORD);
-DWORD WINAPI MgmGetFirstMfeStats(PDWORD,PBYTE,PDWORD,DWORD);
-DWORD WINAPI MgmGetMfe(PMIB_IPMCAST_MFE,PDWORD,PBYTE);
-DWORD WINAPI MgmGetMfeStats(PMIB_IPMCAST_MFE,PDWORD,PBYTE,DWORD);
-DWORD WINAPI MgmGetNextMfe(PMIB_IPMCAST_MFE,PDWORD,PBYTE,PDWORD);
-DWORD WINAPI MgmGetNextMfeStats(PMIB_IPMCAST_MFE,PDWORD,PBYTE,PDWORD,DWORD);
-DWORD WINAPI MgmGetProtocolOnInterface(DWORD,DWORD,PDWORD,PDWORD);
-DWORD WINAPI MgmGroupEnumerationEnd(HANDLE);
-DWORD WINAPI MgmGroupEnumerationGetNext(HANDLE,PDWORD,PBYTE,PDWORD);
-DWORD WINAPI MgmGroupEnumerationStart(HANDLE,MGM_ENUM_TYPES,HANDLE*);
-DWORD WINAPI MgmRegisterMProtocol(PROUTING_PROTOCOL_CONFIG,DWORD,DWORD,HANDLE*);
-DWORD WINAPI MgmReleaseInterfaceOwnership(HANDLE,DWORD,DWORD);
-DWORD WINAPI MgmSetMfe(HANDLE,PMIB_IPMCAST_MFE);
-DWORD WINAPI MgmTakeInterfaceOwnership(HANDLE,DWORD,DWORD);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/mgmtapi.h b/winsup/w32api/include/mgmtapi.h
deleted file mode 100644
index 89e68e3..0000000
--- a/winsup/w32api/include/mgmtapi.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- mgmtapi.h - Header file for the SNMP Management API
-
- Written by Filip Navara <xnavara@volny.cz>
-
- References (2003-08-25):
- http://msdn.microsoft.com/library/en-us/snmp/snmp/snmp_reference.asp
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-*/
-
-#ifndef _MGMTAPI_H
-#define _MGMTAPI_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifndef _SNMP_H
-#include <snmp.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define SNMP_MGMTAPI_TIMEOUT 40
-#define SNMP_MGMTAPI_SELECT_FDERRORS 41
-#define SNMP_MGMTAPI_TRAP_ERRORS 42
-#define SNMP_MGMTAPI_TRAP_DUPINIT 43
-#define SNMP_MGMTAPI_NOTRAPS 44
-#define SNMP_MGMTAPI_AGAIN 45
-#define SNMP_MGMTAPI_INVALID_CTL 46
-#define SNMP_MGMTAPI_INVALID_SESSION 47
-#define SNMP_MGMTAPI_INVALID_BUFFER 48
-#define MGMCTL_SETAGENTPORT 1
-
-#ifndef RC_INVOKED
-
-typedef PVOID LPSNMP_MGR_SESSION;
-
-BOOL WINSNMPAPI SnmpMgrClose(LPSNMP_MGR_SESSION);
-BOOL WINSNMPAPI SnmpMgrCtl(LPSNMP_MGR_SESSION,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD);
-BOOL WINSNMPAPI SnmpMgrGetTrap(AsnObjectIdentifier*,AsnNetworkAddress*,AsnInteger*,AsnInteger*,AsnTimeticks*,SnmpVarBindList*);
-BOOL WINSNMPAPI SnmpMgrGetTrapEx(AsnObjectIdentifier*,AsnNetworkAddress*,AsnNetworkAddress*,AsnInteger*,AsnInteger*,AsnOctetString*,AsnTimeticks*,SnmpVarBindList*);
-BOOL WINSNMPAPI SnmpMgrOidToStr(AsnObjectIdentifier*,LPSTR*);
-LPSNMP_MGR_SESSION WINSNMPAPI SnmpMgrOpen(LPSTR,LPSTR,INT,INT);
-INT WINSNMPAPI SnmpMgrRequest(LPSNMP_MGR_SESSION,BYTE,SnmpVarBindList*,AsnInteger*,AsnInteger*);
-BOOL WINSNMPAPI SnmpMgrStrToOid(LPSTR,AsnObjectIdentifier*);
-BOOL WINSNMPAPI SnmpMgrTrapListen(HANDLE*);
-
-#endif /* RC_INVOKED */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/mlang.h b/winsup/w32api/include/mlang.h
deleted file mode 100755
index 17a1f50..0000000
--- a/winsup/w32api/include/mlang.h
+++ /dev/null
@@ -1,349 +0,0 @@
-#ifndef _MLANG_H
-#define _MLANG_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#include <windows.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#pragma pack(push,1)
-
-#define MAX_MIMECP_NAME 64
-#define MAX_MIMECSET_NAME 50
-#define MAX_SCRIPT_NAME 48
-#define MAX_MIMEFACE_NAME 32
-#define MAX_RFC1766_NAME 6
-#define MAX_LOCALE_NAME 32
-
-typedef enum tagMIMECONTF {
- MIMECONTF_MAILNEWS = 0x00000001,
- MIMECONTF_BROWSER = 0x00000002,
- MIMECONTF_MINIMAL = 0x00000004,
- MIMECONTF_IMPORT = 0x00000008,
- MIMECONTF_SAVABLE_MAILNEWS = 0x00000100,
- MIMECONTF_SAVABLE_BROWSER = 0x00000200,
- MIMECONTF_EXPORT = 0x00000400,
- MIMECONTF_PRIVCONVERTER = 0x00010000,
- MIMECONTF_VALID = 0x00020000,
- MIMECONTF_VALID_NLS = 0x00040000,
- MIMECONTF_MIME_IE4 = 0x10000000,
- MIMECONTF_MIME_LATEST = 0x20000000,
- MIMECONTF_MIME_REGISTRY = 0x40000000
-} MIMECONTF;
-typedef enum tagMLCONVCHARF {
- MLCONVCHARF_NONE = 0,
- MLCONVCHARF_AUTODETECT = 1,
- MLCONVCHARF_NCR_ENTITIZE = 2,
- MLCONVCHARF_NAME_ENTITIZE = 4,
- MLCONVCHARF_USEDEFCHAR = 8,
- MLCONVCHARF_NOBESTFITCHARS = 16
-} MLCONVCHAR;
-typedef enum tagMLCPF {
- MLDETECTF_MAILNEWS = 0x0001,
- MLDETECTF_BROWSER = 0x0002,
- MLDETECTF_VALID = 0x0004,
- MLDETECTF_VALID_NLS = 0x0008,
- MLDETECTF_PRESERVE_ORDER = 0x0010,
- MLDETECTF_PREFERRED_ONLY = 0x0020,
- MLDETECTF_FILTER_SPECIALCHAR = 0x0040
-} MLCP;
-typedef enum tagMLDETECTCP {
- MLDETECTCP_NONE = 0,
- MLDETECTCP_7BIT = 1,
- MLDETECTCP_8BIT = 2,
- MLDETECTCP_DBCS = 4,
- MLDETECTCP_HTML = 8
-} MLDETECTCP;
-typedef enum tagSCRIPTFONTCONTF {
- SCRIPTCONTF_FIXED_FONT = 0x00000001,
- SCRIPTCONTF_PROPORTIONAL_FONT = 0x00000002,
- SCRIPTCONTF_SCRIPT_USER = 0x00010000,
- SCRIPTCONTF_SCRIPT_HIDE = 0x00020000,
- SCRIPTCONTF_SCRIPT_SYSTEM = 0x00040000
-} SCRIPTFONTCONTF;
-typedef enum tagSCRIPTCONTF {
- sidDefault,
- sidMerge,
- sidAsciiSym,
- sidAsciiLatin,
- sidLatin,
- sidGreek,
- sidCyrillic,
- sidArmenian,
- sidHebrew,
- sidArabic,
- sidDevanagari,
- sidBengali,
- sidGurmukhi,
- sidGujarati,
- sidOriya,
- sidTamil,
- sidTelugu,
- sidKannada,
- sidMalayalam,
- sidThai,
- sidLao,
- sidTibetan,
- sidGeorgian,
- sidHangul,
- sidKana,
- sidBopomofo,
- sidHan,
- sidEthiopic,
- sidCanSyllabic,
- sidCherokee,
- sidYi,
- sidBraille,
- sidRunic,
- sidOgham,
- sidSinhala,
- sidSyriac,
- sidBurmese,
- sidKhmer,
- sidThaana,
- sidMongolian,
- sidLim,
- sidFEFirst = sidHangul,
- sidFELast = sidHan
-} SCRIPTCONTF;
-
-typedef struct tagDetectEncodingInfo {
- UINT nLangID;
- UINT nCodePage;
- INT nDocPercent;
- INT nConfidence;
-} DetectEncodingInfo, *pDetectEncodingInfo;
-typedef struct tagMIMECPINFO {
- DWORD dwFlags;
- UINT uiCodePage;
- UINT uiFamilyCodePage;
- WCHAR wszDescription[MAX_MIMECP_NAME];
- WCHAR wszWebCharset[MAX_MIMECSET_NAME];
- WCHAR wszHeaderCharset[MAX_MIMECSET_NAME];
- WCHAR wszBodyCharset[MAX_MIMECSET_NAME];
- WCHAR wszFixedWidthFont[MAX_MIMEFACE_NAME];
- WCHAR wszProportionalFont[MAX_MIMEFACE_NAME];
- BYTE bGDICharset;
-} MIMECPINFO, *PMIMECPINFO;
-typedef struct tagMIMECSETINFO {
- UINT uiCodePage;
- UINT uiInternetEncoding;
- WCHAR wszCharset[MAX_MIMECSET_NAME];
-} MIMECSETINFO, *PMIMECSETINFO;
-typedef struct tagRFC1766INFO {
- LCID lcid;
- WCHAR wszRfc1766[MAX_RFC1766_NAME];
- WCHAR wszLocaleName[MAX_LOCALE_NAME];
-} RFC1766INFO, *PRFC1766INFO;
-typedef BYTE SCRIPT_ID;
-typedef struct tagSCRIPTINFO {
- SCRIPT_ID ScriptId;
- UINT uiCodePage;
- WCHAR wszDescription[MAX_SCRIPT_NAME];
- WCHAR wszFixedWidthFont[MAX_MIMEFACE_NAME];
- WCHAR wszProportionalFont[MAX_MIMEFACE_NAME];
-} SCRIPTINFO, *PSCRIPTINFO;
-typedef struct tagUNICODERANGE {
- WCHAR wcFrom;
- WCHAR wcTo;
-} UNICODERANGE;
-
-typedef struct tagSCRIPTFONTINFO SCRIPTFONTINFO;
-
-EXTERN_C const IID IID_IEnumCodePage;
-#define INTERFACE IEnumCodePage
-DECLARE_INTERFACE_(IEnumCodePage,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Clone)(THIS_ IEnumCodePage**) PURE;
- STDMETHOD(Next)(THIS_ ULONG,PMIMECPINFO,ULONG*) PURE;
- STDMETHOD(Reset)(THIS) PURE;
- STDMETHOD(Skip)(THIS_ ULONG) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IEnumRfc1766;
-#define INTERFACE IEnumRfc1766
-DECLARE_INTERFACE_(IEnumRfc1766,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Clone)(THIS_ IEnumRfc1766**) PURE;
- STDMETHOD(Next)(THIS_ ULONG,PRFC1766INFO,ULONG*) PURE;
- STDMETHOD(Reset)(THIS) PURE;
- STDMETHOD(Skip)(THIS_ ULONG) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IEnumScript;
-#define INTERFACE IEnumScript
-DECLARE_INTERFACE_(IEnumScript,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Clone)(THIS_ IEnumScript**) PURE;
- STDMETHOD(Next)(THIS_ ULONG,PSCRIPTINFO,ULONG*) PURE;
- STDMETHOD(Reset)(THIS) PURE;
- STDMETHOD(Skip)(THIS_ ULONG) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IMLangCodePages;
-#define INTERFACE IMLangCodePages
-DECLARE_INTERFACE_(IMLangCodePages,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetCharCodePages)(THIS_ WCHAR,DWORD*) PURE;
- STDMETHOD(GetStrCodePages)(THIS_ const WCHAR *,long,DWORD,DWORD*,long*) PURE;
- STDMETHOD(CodePageToCodePages)(THIS_ UINT,DWORD*) PURE;
- STDMETHOD(CodePagesToCodePage)(THIS_ DWORD,UINT,UINT*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IMLangConvertCharset;
-#define INTERFACE IMLangConvertCharset
-DECLARE_INTERFACE_(IMLangConvertCharset,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Initialize)(THIS_ UINT,UINT,DWORD) PURE;
- STDMETHOD(GetSourceCodePage)(THIS_ UINT*) PURE;
- STDMETHOD(GetDestinationCodePage)(THIS_ UINT*) PURE;
- STDMETHOD(GetProperty)(THIS_ DWORD*) PURE;
- STDMETHOD(DoConversion)(THIS_ BYTE*,UINT*,BYTE*,UINT*) PURE;
- STDMETHOD(DoConversionToUnicode)(THIS_ CHAR*,UINT*,WCHAR*,UINT*) PURE;
- STDMETHOD(DoConversionFromUnicode)(THIS_ WCHAR*,UINT*,CHAR*,UINT*) PURE;
-};
-#undef INTERFACE
-EXTERN_C const CLSID CLSID_CMLangConvertCharset;
-
-EXTERN_C const IID IID_IMLangFontLink;
-#define INTERFACE IMLangFontLink
-DECLARE_INTERFACE_(IMLangFontLink,IMLangCodePages)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetCharCodePages)(THIS_ WCHAR,DWORD*) PURE;
- STDMETHOD(GetStrCodePages)(THIS_ const WCHAR *,long,DWORD,DWORD*,long*) PURE;
- STDMETHOD(CodePageToCodePages)(THIS_ UINT,DWORD*) PURE;
- STDMETHOD(CodePagesToCodePage)(THIS_ DWORD,UINT,UINT*) PURE;
- STDMETHOD(GetFontCodePages)(THIS_ HDC,HFONT,DWORD*) PURE;
- STDMETHOD(MapFont)(THIS_ HDC,DWORD,HFONT,HFONT*) PURE;
- STDMETHOD(ReleaseFont)(THIS_ HFONT) PURE;
- STDMETHOD(ResetFontMapping)(THIS) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IMLangFontLink2;
-#define INTERFACE IMLangFontLink2
-DECLARE_INTERFACE_(IMLangFontLink2,IMLangCodePages)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetCharCodePages)(THIS_ WCHAR,DWORD*) PURE;
- STDMETHOD(GetStrCodePages)(THIS_ const WCHAR *,long,DWORD,DWORD*,long*) PURE;
- STDMETHOD(CodePageToCodePages)(THIS_ UINT,DWORD*) PURE;
- STDMETHOD(CodePagesToCodePage)(THIS_ DWORD,UINT,UINT*) PURE;
- STDMETHOD(GetFontCodePages)(THIS_ HDC,HFONT,DWORD*) PURE;
- STDMETHOD(ReleaseFont)(THIS_ HFONT) PURE;
- STDMETHOD(ResetFontMapping)(THIS) PURE;
- STDMETHOD(MapFont)(THIS_ HDC,DWORD,WCHAR,HFONT*) PURE;
- STDMETHOD(GetFontUnicodeRange)(THIS_ HDC,UINT*,UNICODERANGE*) PURE;
- STDMETHOD(GetScriptFontInfo)(THIS_ SCRIPT_ID,DWORD,UINT*,SCRIPTFONTINFO*) PURE;
- STDMETHOD(CodePageToScriptID)(THIS) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IMLangLineBreakConsole;
-#define INTERFACE IMLangLineBreakConsole
-DECLARE_INTERFACE_(IMLangLineBreakConsole,IMLangCodePages)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(BreakLineML)(THIS) PURE;
- STDMETHOD(BreakLineW)(THIS_ LCID,const WCHAR*,long,long,long*,long*) PURE;
- STDMETHOD(BreakLineA)(THIS_ LCID,UINT,const CHAR*,long,long,long*,long*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IMultiLanguage;
-#define INTERFACE IMultiLanguage
-DECLARE_INTERFACE_(IMultiLanguage,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetNumberOfCodePageInfo)(THIS_ UINT*) PURE;
- STDMETHOD(GetCodePageInfo)(THIS_ UINT,PMIMECPINFO) PURE;
- STDMETHOD(GetFamilyCodePage)(THIS_ UINT,UINT*) PURE;
- STDMETHOD(EnumCodePages)(THIS_ DWORD,IEnumCodePage**) PURE;
- STDMETHOD(GetCharsetInfo)(THIS_ BSTR,PMIMECSETINFO) PURE;
- STDMETHOD(IsConvertible)(THIS_ DWORD,DWORD) PURE;
- STDMETHOD(ConvertString)(THIS_ DWORD*,DWORD,DWORD,BYTE*,UINT*,BYTE*,UINT*) PURE;
- STDMETHOD(ConvertStringToUnicode)(THIS_ DWORD*,DWORD,CHAR*,UINT*,WCHAR*,UINT*) PURE;
- STDMETHOD(ConvertStringFromUnicode)(THIS_ DWORD*,DWORD,WCHAR*,UINT*,CHAR*,UINT*) PURE;
- STDMETHOD(ConvertStringReset)(THIS) PURE;
- STDMETHOD(GetRfc1766FromLcid)(THIS_ LCID,BSTR*) PURE;
- STDMETHOD(GetLcidFromRfc1766)(THIS_ LCID*,BSTR) PURE;
- STDMETHOD(EnumRfc1766)(THIS_ IEnumRfc1766**) PURE;
- STDMETHOD(GetRfc1766Info)(THIS_ LCID,PRFC1766INFO) PURE;
- STDMETHOD(CreateConvertCharset)(THIS_ UINT,UINT,DWORD,IMLangConvertCharset**) PURE;
-};
-#undef INTERFACE
-EXTERN_C const CLSID CLSID_CMultiLanguage;
-
-EXTERN_C const IID IID_IMultiLanguage2;
-#define INTERFACE IMultiLanguage2
-DECLARE_INTERFACE_(IMultiLanguage2,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetNumberOfCodePageInfo)(THIS_ UINT*) PURE;
- STDMETHOD(GetCodePageInfo)(THIS_ UINT,PMIMECPINFO) PURE;
- STDMETHOD(GetFamilyCodePage)(THIS_ UINT,UINT*) PURE;
- STDMETHOD(EnumCodePages)(THIS_ DWORD,IEnumCodePage**) PURE;
- STDMETHOD(GetCharsetInfo)(THIS_ BSTR,PMIMECSETINFO) PURE;
- STDMETHOD(IsConvertible)(THIS_ DWORD,DWORD) PURE;
- STDMETHOD(ConvertString)(THIS_ DWORD*,DWORD,DWORD,BYTE*,UINT*,BYTE*,UINT*) PURE;
- STDMETHOD(ConvertStringToUnicode)(THIS_ DWORD*,DWORD,CHAR*,UINT*,WCHAR*,UINT*) PURE;
- STDMETHOD(ConvertStringFromUnicode)(THIS_ DWORD*,DWORD,WCHAR*,UINT*,CHAR*,UINT*) PURE;
- STDMETHOD(ConvertStringReset)(THIS) PURE;
- STDMETHOD(GetRfc1766FromLcid)(THIS_ LCID,BSTR*) PURE;
- STDMETHOD(GetLcidFromRfc1766)(THIS_ LCID*,BSTR) PURE;
- STDMETHOD(EnumRfc1766)(THIS_ IEnumRfc1766**) PURE;
- STDMETHOD(GetRfc1766Info)(THIS_ LCID,PRFC1766INFO) PURE;
- STDMETHOD(CreateConvertCharset)(THIS_ UINT,UINT,DWORD,IMLangConvertCharset**) PURE;
- STDMETHOD(ConvertStringInIStream)(THIS_ DWORD*,DWORD,WCHAR*,DWORD,DWORD,IStream*,IStream*) PURE;
- STDMETHOD(ConvertStringToUnicodeEx)(THIS_ DWORD*,DWORD,CHAR*,UINT*,WCHAR*,UINT*,DWORD,WCHAR*) PURE;
- STDMETHOD(ConvertStringFromUnicodeEx)(THIS_ DWORD*,DWORD,WCHAR*,UINT*,CHAR*,UINT*,DWORD,WCHAR*) PURE;
- STDMETHOD(DetectCodepageInIStream)(THIS_ DWORD,DWORD,IStream*,DetectEncodingInfo*,INT*) PURE;
- STDMETHOD(DetectInputCodepage)(THIS_ DWORD,DWORD,CHAR*,INT*,DetectEncodingInfo*,INT*) PURE;
- STDMETHOD(ValidateCodePage)(THIS) PURE;
- STDMETHOD(GetCodePageDescription)(THIS_ UINT,LCID,LPWSTR,int) PURE;
- STDMETHOD(IsCodePageInstallable)(THIS) PURE;
- STDMETHOD(SetMimeDBSource)(THIS_ MIMECONTF) PURE;
- STDMETHOD(GetNumberOfScripts)(THIS_ UINT*) PURE;
- STDMETHOD(EnumScripts)(THIS_ DWORD,LANGID,IEnumScript**) PURE;
-};
-#undef INTERFACE
-
-
-#pragma pack(pop)
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/mmreg.h b/winsup/w32api/include/mmreg.h
deleted file mode 100644
index 9867db0..0000000
--- a/winsup/w32api/include/mmreg.h
+++ /dev/null
@@ -1,71 +0,0 @@
-#ifndef _MMREG_H
-#define _MMREG_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifndef _MMSYSTEM_H
-#include <mmsystem.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- DirectShow Reference - DirectShow Structures */
-typedef struct mpeg1waveformat_tag {
- WAVEFORMATEX wfx;
- WORD fwHeadLayer;
- DWORD dwHeadBitrate;
- WORD fwHeadMode;
- WORD fwHeadModeExt;
- WORD wHeadEmphasis;
- WORD fwHeadFlags;
- DWORD dwPTSLow;
- DWORD dwPTSHigh;
-} MPEG1WAVEFORMAT;
-#define ACM_MPEG_LAYER1 0x0001
-#define ACM_MPEG_LAYER2 0x0002
-#define ACM_MPEG_LAYER3 0x0004
-#define ACM_MPEG_STEREO 0x0001
-#define ACM_MPEG_JOINTSTEREO 0x0002
-#define ACM_MPEG_DUALCHANNEL 0x0004
-#define ACM_MPEG_SINGLECHANNEL 0x0008
-#define ACM_MPEG_PRIVATEBIT 0x0001
-#define ACM_MPEG_COPYRIGHT 0x0002
-#define ACM_MPEG_ORIGINALHOME 0x0004
-#define ACM_MPEG_PROTECTIONBIT 0x0008
-#define ACM_MPEG_ID_MPEG1 0x0010
-typedef struct {
- WAVEFORMATEX Format;
- union {
- WORD wValidBitsPerSample;
- WORD wSamplesPerBlock;
- WORD wReserved;
- } Samples;
- DWORD dwChannelMask;
- GUID SubFormat;
-} WAVEFORMATEXTENSIBLE,*PWAVEFORMATEXTENSIBLE;
-#define SPEAKER_FRONT_LEFT 0x1
-#define SPEAKER_FRONT_RIGHT 0x2
-#define SPEAKER_FRONT_CENTER 0x4
-#define SPEAKER_LOW_FREQUENCY 0x8
-#define SPEAKER_BACK_LEFT 0x10
-#define SPEAKER_BACK_RIGHT 0x20
-#define SPEAKER_FRONT_LEFT_OF_CENTER 0x40
-#define SPEAKER_FRONT_RIGHT_OF_CENTER 0x80
-#define SPEAKER_BACK_CENTER 0x100
-#define SPEAKER_SIDE_LEFT 0x200
-#define SPEAKER_SIDE_RIGHT 0x400
-#define SPEAKER_TOP_CENTER 0x800
-#define SPEAKER_TOP_FRONT_LEFT 0x1000
-#define SPEAKER_TOP_FRONT_CENTER 0x2000
-#define SPEAKER_TOP_FRONT_RIGHT 0x4000
-#define SPEAKER_TOP_BACK_LEFT 0x8000
-#define SPEAKER_TOP_BACK_CENTER 0x10000
-#define SPEAKER_TOP_BACK_RIGHT 0x20000
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/mmsystem.h b/winsup/w32api/include/mmsystem.h
deleted file mode 100644
index 70c612a..0000000
--- a/winsup/w32api/include/mmsystem.h
+++ /dev/null
@@ -1,1943 +0,0 @@
-
-#ifndef _MMSYSTEM_H
-#define _MMSYSTEM_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-#pragma pack(push,1)
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define WINMMAPI DECLSPEC_IMPORT
-#define _loadds
-#define _huge
-#define MAXPNAMELEN 32
-#define MAXERRORLENGTH 256
-#define MAX_JOYSTICKOEMVXDNAME 260
-#define _MMRESULT_
-#define TIME_MS 1
-#define TIME_SAMPLES 2
-#define TIME_BYTES 4
-#define TIME_SMPTE 8
-#define TIME_MIDI 16
-#define TIME_TICKS 32
-#define MAKEFOURCC(c0,c1,c2,c3) ((DWORD)(BYTE)(c0)|((DWORD)(BYTE)(c1)<<8)|((DWORD)(BYTE)(c2)<<16)|((DWORD)(BYTE)(c3)<<24))
-#ifndef mmioFOURCC
-#define mmioFOURCC(c0,c1,c2,c3) MAKEFOURCC(c0,c1,c2,c3)
-#endif
-#define MM_JOY1MOVE 0x3A0
-#define MM_JOY2MOVE 0x3A1
-#define MM_JOY1ZMOVE 0x3A2
-#define MM_JOY2ZMOVE 0x3A3
-#define MM_JOY1BUTTONDOWN 0x3B5
-#define MM_JOY2BUTTONDOWN 0x3B6
-#define MM_JOY1BUTTONUP 0x3B7
-#define MM_JOY2BUTTONUP 0x3B8
-#define MM_MCINOTIFY 0x3B9
-#define MM_WOM_OPEN 0x3BB
-#define MM_WOM_CLOSE 0x3BC
-#define MM_WOM_DONE 0x3BD
-#define MM_WIM_OPEN 0x3BE
-#define MM_WIM_CLOSE 0x3BF
-#define MM_WIM_DATA 0x3C0
-#define MM_MIM_OPEN 0x3C1
-#define MM_MIM_CLOSE 0x3C2
-#define MM_MIM_DATA 0x3C3
-#define MM_MIM_LONGDATA 0x3C4
-#define MM_MIM_ERROR 0x3C5
-#define MM_MIM_LONGERROR 0x3C6
-#define MM_MOM_OPEN 0x3C7
-#define MM_MOM_CLOSE 0x3C8
-#define MM_MOM_DONE 0x3C9
-#define MM_DRVM_OPEN 0x3D0
-#define MM_DRVM_CLOSE 0x3D1
-#define MM_DRVM_DATA 0x3D2
-#define MM_DRVM_ERROR 0x3D3
-#define MM_STREAM_OPEN 0x3D4
-#define MM_STREAM_CLOSE 0x3D5
-#define MM_STREAM_DONE 0x3D6
-#define MM_STREAM_ERROR 0x3D7
-#define MM_MOM_POSITIONCB 0x3CA
-#define MM_MCISIGNAL 0x3CB
-#define MM_MIM_MOREDATA 0x3CC
-#define MM_MIXM_LINE_CHANGE 0x3D0
-#define MM_MIXM_CONTROL_CHANGE 0x3D1
-#define MMSYSERR_BASE 0
-#define WAVERR_BASE 32
-#define MIDIERR_BASE 64
-#define TIMERR_BASE 96
-#define JOYERR_BASE 160
-#define MCIERR_BASE 256
-#define MIXERR_BASE 1024
-#define MCI_STRING_OFFSET 512
-#define MCI_VD_OFFSET 1024
-#define MCI_CD_OFFSET 1088
-#define MCI_WAVE_OFFSET 1152
-#define MCI_SEQ_OFFSET 1216
-#define MMSYSERR_NOERROR 0
-#define MMSYSERR_ERROR (MMSYSERR_BASE+1)
-#define MMSYSERR_BADDEVICEID (MMSYSERR_BASE+2)
-#define MMSYSERR_NOTENABLED (MMSYSERR_BASE+3)
-#define MMSYSERR_ALLOCATED (MMSYSERR_BASE+4)
-#define MMSYSERR_INVALHANDLE (MMSYSERR_BASE+5)
-#define MMSYSERR_NODRIVER (MMSYSERR_BASE+6)
-#define MMSYSERR_NOMEM (MMSYSERR_BASE+7)
-#define MMSYSERR_NOTSUPPORTED (MMSYSERR_BASE+8)
-#define MMSYSERR_BADERRNUM (MMSYSERR_BASE+9)
-#define MMSYSERR_INVALFLAG (MMSYSERR_BASE+10)
-#define MMSYSERR_INVALPARAM (MMSYSERR_BASE+11)
-#define MMSYSERR_HANDLEBUSY (MMSYSERR_BASE+12)
-#define MMSYSERR_INVALIDALIAS (MMSYSERR_BASE+13)
-#define MMSYSERR_BADDB (MMSYSERR_BASE+14)
-#define MMSYSERR_KEYNOTFOUND (MMSYSERR_BASE+15)
-#define MMSYSERR_READERROR (MMSYSERR_BASE+16)
-#define MMSYSERR_WRITEERROR (MMSYSERR_BASE+17)
-#define MMSYSERR_DELETEERROR (MMSYSERR_BASE+18)
-#define MMSYSERR_VALNOTFOUND (MMSYSERR_BASE+19)
-#define MMSYSERR_NODRIVERCB (MMSYSERR_BASE+20)
-#define MMSYSERR_LASTERROR (MMSYSERR_BASE+20)
-#define DRV_LOAD 1
-#define DRV_ENABLE 2
-#define DRV_OPEN 3
-#define DRV_CLOSE 4
-#define DRV_DISABLE 5
-#define DRV_FREE 6
-#define DRV_CONFIGURE 7
-#define DRV_QUERYCONFIGURE 8
-#define DRV_INSTALL 9
-#define DRV_REMOVE 10
-#define DRV_EXITSESSION 11
-#define DRV_POWER 15
-#define DRV_RESERVED 0x800
-#define DRV_USER 0x4000
-#define DRVCNF_CANCEL 0
-#define DRVCNF_OK 1
-#define DRVCNF_RESTART 2
-#define DRV_CANCEL DRVCNF_CANCEL
-#define DRV_OK DRVCNF_OK
-#define DRV_RESTART DRVCNF_RESTART
-#define DRV_MCI_FIRST DRV_RESERVED
-#define DRV_MCI_LAST (DRV_RESERVED+0xFFF)
-#define CALLBACK_TYPEMASK 0x70000
-#define CALLBACK_NULL 0
-#define CALLBACK_WINDOW 0x10000
-#define CALLBACK_TASK 0x20000
-#define CALLBACK_FUNCTION 0x30000
-#define CALLBACK_THREAD CALLBACK_TASK
-#define CALLBACK_EVENT 0x50000
-#define SND_SYNC 0
-#define SND_ASYNC 1
-#define SND_NODEFAULT 2
-#define SND_MEMORY 4
-#define SND_LOOP 8
-#define SND_NOSTOP 16
-#define SND_NOWAIT 0x2000
-#define SND_ALIAS 0x10000
-#define SND_ALIAS_ID 0x110000
-#define SND_FILENAME 0x20000
-#define SND_RESOURCE 0x40004
-#define SND_PURGE 0x40
-#define SND_APPLICATION 0x80
-#define SND_ALIAS_START 0
-#define sndAlias(c0,c1) (SND_ALIAS_START+((DWORD)(BYTE)(c0)|((DWORD)(BYTE)(c1)<<8)))
-#define SND_ALIAS_SYSTEMASTERISK sndAlias('S','*')
-#define SND_ALIAS_SYSTEMQUESTION sndAlias('S','?')
-#define SND_ALIAS_SYSTEMHAND sndAlias('S','H')
-#define SND_ALIAS_SYSTEMEXIT sndAlias('S','E')
-#define SND_ALIAS_SYSTEMSTART sndAlias('S','S')
-#define SND_ALIAS_SYSTEMWELCOME sndAlias('S','W')
-#define SND_ALIAS_SYSTEMEXCLAMATION sndAlias('S','!')
-#define SND_ALIAS_SYSTEMDEFAULT sndAlias('S','D')
-#define WAVERR_BADFORMAT (WAVERR_BASE + 0)
-#define WAVERR_STILLPLAYING (WAVERR_BASE + 1)
-#define WAVERR_UNPREPARED (WAVERR_BASE + 2)
-#define WAVERR_SYNC (WAVERR_BASE + 3)
-#define WAVERR_LASTERROR (WAVERR_BASE + 3)
-#define WOM_OPEN MM_WOM_OPEN
-#define WOM_CLOSE MM_WOM_CLOSE
-#define WOM_DONE MM_WOM_DONE
-#define WIM_OPEN MM_WIM_OPEN
-#define WIM_CLOSE MM_WIM_CLOSE
-#define WIM_DATA MM_WIM_DATA
-#define WAVE_MAPPER ((UINT)-1)
-#define WAVE_FORMAT_QUERY 1
-#define WAVE_ALLOWSYNC 2
-#define WAVE_MAPPED 4
-#define WAVE_FORMAT_DIRECT 8
-#define WAVE_FORMAT_DIRECT_QUERY (WAVE_FORMAT_QUERY|WAVE_FORMAT_DIRECT)
-#define WHDR_DONE 1
-#define WHDR_PREPARED 2
-#define WHDR_BEGINLOOP 4
-#define WHDR_ENDLOOP 8
-#define WHDR_INQUEUE 16
-#define WAVECAPS_PITCH 1
-#define WAVECAPS_PLAYBACKRATE 2
-#define WAVECAPS_VOLUME 4
-#define WAVECAPS_LRVOLUME 8
-#define WAVECAPS_SYNC 16
-#define WAVECAPS_SAMPLEACCURATE 32
-#define WAVECAPS_DIRECTSOUND 64
-#define WAVE_INVALIDFORMAT 0
-#define WAVE_FORMAT_1M08 1
-#define WAVE_FORMAT_1S08 2
-#define WAVE_FORMAT_1M16 4
-#define WAVE_FORMAT_1S16 8
-#define WAVE_FORMAT_2M08 16
-#define WAVE_FORMAT_2S08 32
-#define WAVE_FORMAT_2M16 64
-#define WAVE_FORMAT_2S16 128
-#define WAVE_FORMAT_4M08 256
-#define WAVE_FORMAT_4S08 512
-#define WAVE_FORMAT_4M16 1024
-#define WAVE_FORMAT_4S16 2048
-#define WAVE_FORMAT_PCM 1
-#define WAVE_FORMAT_EXTENSIBLE 0xFFFE
-#define MIDIERR_UNPREPARED MIDIERR_BASE
-#define MIDIERR_STILLPLAYING (MIDIERR_BASE+1)
-#define MIDIERR_NOMAP (MIDIERR_BASE+2)
-#define MIDIERR_NOTREADY (MIDIERR_BASE+3)
-#define MIDIERR_NODEVICE (MIDIERR_BASE+4)
-#define MIDIERR_INVALIDSETUP (MIDIERR_BASE+5)
-#define MIDIERR_BADOPENMODE (MIDIERR_BASE+6)
-#define MIDIERR_DONT_CONTINUE (MIDIERR_BASE+7)
-#define MIDIERR_LASTERROR (MIDIERR_BASE+7)
-#define MIDIPATCHSIZE 128
-#define MIM_OPEN MM_MIM_OPEN
-#define MIM_CLOSE MM_MIM_CLOSE
-#define MIM_DATA MM_MIM_DATA
-#define MIM_LONGDATA MM_MIM_LONGDATA
-#define MIM_ERROR MM_MIM_ERROR
-#define MIM_LONGERROR MM_MIM_LONGERROR
-#define MOM_OPEN MM_MOM_OPEN
-#define MOM_CLOSE MM_MOM_CLOSE
-#define MOM_DONE MM_MOM_DONE
-#define MIM_MOREDATA MM_MIM_MOREDATA
-#define MOM_POSITIONCB MM_MOM_POSITIONCB
-#define MIDIMAPPER ((UINT)-1)
-#define MIDI_MAPPER ((UINT)-1)
-#define MIDI_IO_STATUS 32
-#define MIDI_CACHE_ALL 1
-#define MIDI_CACHE_BESTFIT 2
-#define MIDI_CACHE_QUERY 3
-#define MIDI_UNCACHE 4
-#define MOD_MIDIPORT 1
-#define MOD_SYNTH 2
-#define MOD_SQSYNTH 3
-#define MOD_FMSYNTH 4
-#define MOD_MAPPER 5
-#define MIDICAPS_VOLUME 1
-#define MIDICAPS_LRVOLUME 2
-#define MIDICAPS_CACHE 4
-#define MIDICAPS_STREAM 8
-#define MHDR_DONE 1
-#define MHDR_PREPARED 2
-#define MHDR_INQUEUE 4
-#define MHDR_ISSTRM 8
-#define MEVT_F_SHORT 0
-#define MEVT_F_LONG 0x80000000
-#define MEVT_F_CALLBACK 0x40000000
-#define MEVT_EVENTTYPE(x) ((BYTE)(((x)>>24)&0xFF))
-#define MEVT_EVENTPARM(x) ((DWORD)((x)&0xFFFFFFL))
-#define MEVT_SHORTMSG 0
-#define MEVT_TEMPO 1
-#define MEVT_NOP 2
-#define MEVT_LONGMSG ((BYTE)0x80)
-#define MEVT_COMMENT ((BYTE)0x82)
-#define MEVT_VERSION ((BYTE)0x84)
-#define MIDISTRM_ERROR (-2)
-#define MIDIPROP_SET 0x80000000
-#define MIDIPROP_GET 0x40000000
-#define MIDIPROP_TIMEDIV 1
-#define MIDIPROP_TEMPO 2
-#define AUX_MAPPER ((UINT)-1)
-#define AUXCAPS_CDAUDIO 1
-#define AUXCAPS_AUXIN 2
-#define AUXCAPS_VOLUME 1
-#define AUXCAPS_LRVOLUME 2
-#define MIXER_SHORT_NAME_CHARS 16
-#define MIXER_LONG_NAME_CHARS 64
-#define MIXERR_INVALLINE MIXERR_BASE
-#define MIXERR_INVALCONTROL (MIXERR_BASE+1)
-#define MIXERR_INVALVALUE (MIXERR_BASE+2)
-#define MIXERR_LASTERROR (MIXERR_BASE+2)
-#define MIXER_OBJECTF_HANDLE 0x80000000
-#define MIXER_OBJECTF_MIXER 0
-#define MIXER_OBJECTF_HMIXER (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIXER)
-#define MIXER_OBJECTF_WAVEOUT 0x10000000
-#define MIXER_OBJECTF_HWAVEOUT (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_WAVEOUT)
-#define MIXER_OBJECTF_WAVEIN 0x20000000
-#define MIXER_OBJECTF_HWAVEIN (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_WAVEIN)
-#define MIXER_OBJECTF_MIDIOUT 0x30000000
-#define MIXER_OBJECTF_HMIDIOUT (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIDIOUT)
-#define MIXER_OBJECTF_MIDIIN 0x40000000
-#define MIXER_OBJECTF_HMIDIIN (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIDIIN)
-#define MIXER_OBJECTF_AUX 0x50000000
-#define MIXERLINE_LINEF_ACTIVE 1
-#define MIXERLINE_LINEF_DISCONNECTED 0x8000
-#define MIXERLINE_LINEF_SOURCE 0x80000000
-#define MIXERLINE_COMPONENTTYPE_DST_FIRST 0
-#define MIXERLINE_COMPONENTTYPE_DST_UNDEFINED MIXERLINE_COMPONENTTYPE_DST_FIRST
-#define MIXERLINE_COMPONENTTYPE_DST_DIGITAL (MIXERLINE_COMPONENTTYPE_DST_FIRST+1)
-#define MIXERLINE_COMPONENTTYPE_DST_LINE (MIXERLINE_COMPONENTTYPE_DST_FIRST+2)
-#define MIXERLINE_COMPONENTTYPE_DST_MONITOR (MIXERLINE_COMPONENTTYPE_DST_FIRST+3)
-#define MIXERLINE_COMPONENTTYPE_DST_SPEAKERS (MIXERLINE_COMPONENTTYPE_DST_FIRST+4)
-#define MIXERLINE_COMPONENTTYPE_DST_HEADPHONES (MIXERLINE_COMPONENTTYPE_DST_FIRST+5)
-#define MIXERLINE_COMPONENTTYPE_DST_TELEPHONE (MIXERLINE_COMPONENTTYPE_DST_FIRST+6)
-#define MIXERLINE_COMPONENTTYPE_DST_WAVEIN (MIXERLINE_COMPONENTTYPE_DST_FIRST+7)
-#define MIXERLINE_COMPONENTTYPE_DST_VOICEIN (MIXERLINE_COMPONENTTYPE_DST_FIRST+8)
-#define MIXERLINE_COMPONENTTYPE_DST_LAST (MIXERLINE_COMPONENTTYPE_DST_FIRST+8)
-#define MIXERLINE_COMPONENTTYPE_SRC_FIRST 0x1000
-#define MIXERLINE_COMPONENTTYPE_SRC_UNDEFINED MIXERLINE_COMPONENTTYPE_SRC_FIRST
-#define MIXERLINE_COMPONENTTYPE_SRC_DIGITAL (MIXERLINE_COMPONENTTYPE_SRC_FIRST+1)
-#define MIXERLINE_COMPONENTTYPE_SRC_LINE (MIXERLINE_COMPONENTTYPE_SRC_FIRST+2)
-#define MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE (MIXERLINE_COMPONENTTYPE_SRC_FIRST+3)
-#define MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER (MIXERLINE_COMPONENTTYPE_SRC_FIRST+4)
-#define MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC (MIXERLINE_COMPONENTTYPE_SRC_FIRST+5)
-#define MIXERLINE_COMPONENTTYPE_SRC_TELEPHONE (MIXERLINE_COMPONENTTYPE_SRC_FIRST+6)
-#define MIXERLINE_COMPONENTTYPE_SRC_PCSPEAKER (MIXERLINE_COMPONENTTYPE_SRC_FIRST+7)
-#define MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT (MIXERLINE_COMPONENTTYPE_SRC_FIRST+8)
-#define MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY (MIXERLINE_COMPONENTTYPE_SRC_FIRST+9)
-#define MIXERLINE_COMPONENTTYPE_SRC_ANALOG (MIXERLINE_COMPONENTTYPE_SRC_FIRST+10)
-#define MIXERLINE_COMPONENTTYPE_SRC_LAST (MIXERLINE_COMPONENTTYPE_SRC_FIRST+10)
-#define MIXERLINE_TARGETTYPE_UNDEFINED 0
-#define MIXERLINE_TARGETTYPE_WAVEOUT 1
-#define MIXERLINE_TARGETTYPE_WAVEIN 2
-#define MIXERLINE_TARGETTYPE_MIDIOUT 3
-#define MIXERLINE_TARGETTYPE_MIDIIN 4
-#define MIXERLINE_TARGETTYPE_AUX 5
-#define MIXER_GETLINEINFOF_DESTINATION 0
-#define MIXER_GETLINEINFOF_SOURCE 1
-#define MIXER_GETLINEINFOF_LINEID 2
-#define MIXER_GETLINEINFOF_COMPONENTTYPE 3
-#define MIXER_GETLINEINFOF_TARGETTYPE 4
-#define MIXER_GETLINEINFOF_QUERYMASK 15
-#define MIXERCONTROL_CONTROLF_UNIFORM 1
-#define MIXERCONTROL_CONTROLF_MULTIPLE 2
-#define MIXERCONTROL_CONTROLF_DISABLED 0x80000000
-#define MIXERCONTROL_CT_CLASS_MASK 0xF0000000
-#define MIXERCONTROL_CT_CLASS_CUSTOM 0
-#define MIXERCONTROL_CT_CLASS_METER 0x10000000
-#define MIXERCONTROL_CT_CLASS_SWITCH 0x20000000
-#define MIXERCONTROL_CT_CLASS_NUMBER 0x30000000
-#define MIXERCONTROL_CT_CLASS_SLIDER 0x40000000
-#define MIXERCONTROL_CT_CLASS_FADER 0x50000000
-#define MIXERCONTROL_CT_CLASS_TIME 0x60000000
-#define MIXERCONTROL_CT_CLASS_LIST 0x70000000
-#define MIXERCONTROL_CT_SUBCLASS_MASK 0xF000000
-#define MIXERCONTROL_CT_SC_SWITCH_BOOLEAN 0
-#define MIXERCONTROL_CT_SC_SWITCH_BUTTON 0x1000000
-#define MIXERCONTROL_CT_SC_METER_POLLED 0
-#define MIXERCONTROL_CT_SC_TIME_MICROSECS 0
-#define MIXERCONTROL_CT_SC_TIME_MILLISECS 0x1000000
-#define MIXERCONTROL_CT_SC_LIST_SINGLE 0
-#define MIXERCONTROL_CT_SC_LIST_MULTIPLE 0x1000000
-#define MIXERCONTROL_CT_UNITS_MASK 0xFF0000
-#define MIXERCONTROL_CT_UNITS_CUSTOM 0
-#define MIXERCONTROL_CT_UNITS_BOOLEAN 0x10000
-#define MIXERCONTROL_CT_UNITS_SIGNED 0x20000
-#define MIXERCONTROL_CT_UNITS_UNSIGNED 0x30000
-#define MIXERCONTROL_CT_UNITS_DECIBELS 0x40000
-#define MIXERCONTROL_CT_UNITS_PERCENT 0x50000
-#define MIXERCONTROL_CONTROLTYPE_CUSTOM (MIXERCONTROL_CT_CLASS_CUSTOM|MIXERCONTROL_CT_UNITS_CUSTOM)
-#define MIXERCONTROL_CONTROLTYPE_BOOLEANMETER (MIXERCONTROL_CT_CLASS_METER|MIXERCONTROL_CT_SC_METER_POLLED|MIXERCONTROL_CT_UNITS_BOOLEAN)
-#define MIXERCONTROL_CONTROLTYPE_SIGNEDMETER (MIXERCONTROL_CT_CLASS_METER|MIXERCONTROL_CT_SC_METER_POLLED|MIXERCONTROL_CT_UNITS_SIGNED)
-#define MIXERCONTROL_CONTROLTYPE_PEAKMETER (MIXERCONTROL_CONTROLTYPE_SIGNEDMETER+1)
-#define MIXERCONTROL_CONTROLTYPE_UNSIGNEDMETER (MIXERCONTROL_CT_CLASS_METER|MIXERCONTROL_CT_SC_METER_POLLED|MIXERCONTROL_CT_UNITS_UNSIGNED)
-#define MIXERCONTROL_CONTROLTYPE_BOOLEAN (MIXERCONTROL_CT_CLASS_SWITCH|MIXERCONTROL_CT_SC_SWITCH_BOOLEAN|MIXERCONTROL_CT_UNITS_BOOLEAN)
-#define MIXERCONTROL_CONTROLTYPE_ONOFF (MIXERCONTROL_CONTROLTYPE_BOOLEAN+1)
-#define MIXERCONTROL_CONTROLTYPE_MUTE (MIXERCONTROL_CONTROLTYPE_BOOLEAN+2)
-#define MIXERCONTROL_CONTROLTYPE_MONO (MIXERCONTROL_CONTROLTYPE_BOOLEAN+3)
-#define MIXERCONTROL_CONTROLTYPE_LOUDNESS (MIXERCONTROL_CONTROLTYPE_BOOLEAN+4)
-#define MIXERCONTROL_CONTROLTYPE_STEREOENH (MIXERCONTROL_CONTROLTYPE_BOOLEAN+5)
-#define MIXERCONTROL_CONTROLTYPE_BUTTON (MIXERCONTROL_CT_CLASS_SWITCH|MIXERCONTROL_CT_SC_SWITCH_BUTTON|MIXERCONTROL_CT_UNITS_BOOLEAN)
-#define MIXERCONTROL_CONTROLTYPE_DECIBELS (MIXERCONTROL_CT_CLASS_NUMBER|MIXERCONTROL_CT_UNITS_DECIBELS)
-#define MIXERCONTROL_CONTROLTYPE_SIGNED (MIXERCONTROL_CT_CLASS_NUMBER|MIXERCONTROL_CT_UNITS_SIGNED)
-#define MIXERCONTROL_CONTROLTYPE_UNSIGNED (MIXERCONTROL_CT_CLASS_NUMBER|MIXERCONTROL_CT_UNITS_UNSIGNED)
-#define MIXERCONTROL_CONTROLTYPE_PERCENT (MIXERCONTROL_CT_CLASS_NUMBER|MIXERCONTROL_CT_UNITS_PERCENT)
-#define MIXERCONTROL_CONTROLTYPE_SLIDER (MIXERCONTROL_CT_CLASS_SLIDER|MIXERCONTROL_CT_UNITS_SIGNED)
-#define MIXERCONTROL_CONTROLTYPE_PAN (MIXERCONTROL_CONTROLTYPE_SLIDER+1)
-#define MIXERCONTROL_CONTROLTYPE_QSOUNDPAN (MIXERCONTROL_CONTROLTYPE_SLIDER+2)
-#define MIXERCONTROL_CONTROLTYPE_FADER (MIXERCONTROL_CT_CLASS_FADER|MIXERCONTROL_CT_UNITS_UNSIGNED)
-#define MIXERCONTROL_CONTROLTYPE_VOLUME (MIXERCONTROL_CONTROLTYPE_FADER+1)
-#define MIXERCONTROL_CONTROLTYPE_BASS (MIXERCONTROL_CONTROLTYPE_FADER+2)
-#define MIXERCONTROL_CONTROLTYPE_TREBLE (MIXERCONTROL_CONTROLTYPE_FADER+3)
-#define MIXERCONTROL_CONTROLTYPE_EQUALIZER (MIXERCONTROL_CONTROLTYPE_FADER+4)
-#define MIXERCONTROL_CONTROLTYPE_SINGLESELECT (MIXERCONTROL_CT_CLASS_LIST|MIXERCONTROL_CT_SC_LIST_SINGLE|MIXERCONTROL_CT_UNITS_BOOLEAN)
-#define MIXERCONTROL_CONTROLTYPE_MUX (MIXERCONTROL_CONTROLTYPE_SINGLESELECT+1)
-#define MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT (MIXERCONTROL_CT_CLASS_LIST|MIXERCONTROL_CT_SC_LIST_MULTIPLE|MIXERCONTROL_CT_UNITS_BOOLEAN)
-#define MIXERCONTROL_CONTROLTYPE_MIXER (MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT+1)
-#define MIXERCONTROL_CONTROLTYPE_MICROTIME (MIXERCONTROL_CT_CLASS_TIME|MIXERCONTROL_CT_SC_TIME_MICROSECS|MIXERCONTROL_CT_UNITS_UNSIGNED)
-#define MIXERCONTROL_CONTROLTYPE_MILLITIME (MIXERCONTROL_CT_CLASS_TIME|MIXERCONTROL_CT_SC_TIME_MILLISECS|MIXERCONTROL_CT_UNITS_UNSIGNED)
-#define MIXER_GETLINECONTROLSF_ALL 0
-#define MIXER_GETLINECONTROLSF_ONEBYID 1
-#define MIXER_GETLINECONTROLSF_ONEBYTYPE 2
-#define MIXER_GETLINECONTROLSF_QUERYMASK 15
-#define MIXER_GETCONTROLDETAILSF_VALUE 0
-#define MIXER_GETCONTROLDETAILSF_LISTTEXT 1
-#define MIXER_GETCONTROLDETAILSF_QUERYMASK 15
-#define MIXER_SETCONTROLDETAILSF_VALUE 0
-#define MIXER_SETCONTROLDETAILSF_CUSTOM 1
-#define MIXER_SETCONTROLDETAILSF_QUERYMASK 15
-#define TIMERR_NOERROR 0
-#define TIMERR_NOCANDO (TIMERR_BASE+1)
-#define TIMERR_STRUCT (TIMERR_BASE+33)
-#define TIME_ONESHOT 0
-#define TIME_PERIODIC 1
-#define TIME_CALLBACK_FUNCTION 0
-#define TIME_CALLBACK_EVENT_SET 16
-#define TIME_CALLBACK_EVENT_PULSE 32
-#if (WINVER >= 0x0501)
-#define TIME_KILL_SYNCHRONOUS 0x0100
-#endif
-#define JOYERR_NOERROR (0)
-#define JOYERR_PARMS (JOYERR_BASE+5)
-#define JOYERR_NOCANDO (JOYERR_BASE+6)
-#define JOYERR_UNPLUGGED (JOYERR_BASE+7)
-#define JOY_BUTTON1 1
-#define JOY_BUTTON2 2
-#define JOY_BUTTON3 4
-#define JOY_BUTTON4 8
-#define JOY_BUTTON1CHG 256
-#define JOY_BUTTON2CHG 512
-#define JOY_BUTTON3CHG 1024
-#define JOY_BUTTON4CHG 2048
-#define JOY_BUTTON5 257
-#define JOY_BUTTON6 513
-#define JOY_BUTTON7 1025
-#define JOY_BUTTON8 2049
-#define JOY_BUTTON9 256
-#define JOY_BUTTON10 512
-#define JOY_BUTTON11 1024
-#define JOY_BUTTON12 2048
-#define JOY_BUTTON13 4096
-#define JOY_BUTTON14 8192
-#define JOY_BUTTON15 16384
-#define JOY_BUTTON16 32768
-#define JOY_BUTTON17 65536
-#define JOY_BUTTON18 0x20000
-#define JOY_BUTTON19 0x40000
-#define JOY_BUTTON20 0x80000
-#define JOY_BUTTON21 0x100000
-#define JOY_BUTTON22 0x200000
-#define JOY_BUTTON23 0x400000
-#define JOY_BUTTON24 0x800000
-#define JOY_BUTTON25 0x1000000
-#define JOY_BUTTON26 0x2000000
-#define JOY_BUTTON27 0x4000000
-#define JOY_BUTTON28 0x8000000
-#define JOY_BUTTON29 0x10000000
-#define JOY_BUTTON30 0x20000000
-#define JOY_BUTTON31 0x40000000
-#define JOY_BUTTON32 0x80000000
-#define JOY_POVCENTERED ((WORD)-1)
-#define JOY_POVFORWARD 0
-#define JOY_POVRIGHT 9000
-#define JOY_POVBACKWARD 18000
-#define JOY_POVLEFT 27000
-#define JOY_RETURNX 1
-#define JOY_RETURNY 2
-#define JOY_RETURNZ 4l
-#define JOY_RETURNR 8
-#define JOY_RETURNU 16
-#define JOY_RETURNV 32
-#define JOY_RETURNPOV 64
-#define JOY_RETURNBUTTONS 128
-#define JOY_RETURNRAWDATA 256
-#define JOY_RETURNPOVCTS 512
-#define JOY_RETURNCENTERED 1024
-#define JOY_USEDEADZONE 2048
-#define JOY_RETURNALL (JOY_RETURNX|JOY_RETURNY|JOY_RETURNZ|JOY_RETURNR|JOY_RETURNU|JOY_RETURNV|JOY_RETURNPOV|JOY_RETURNBUTTONS)
-#define JOY_CAL_READALWAYS 0x10000
-#define JOY_CAL_READXYONLY 0x20000
-#define JOY_CAL_READ3 0x40000
-#define JOY_CAL_READ4 0x80000
-#define JOY_CAL_READXONLY 0x100000
-#define JOY_CAL_READYONLY 0x200000
-#define JOY_CAL_READ5 0x400000
-#define JOY_CAL_READ6 0x800000
-#define JOY_CAL_READZONLY 0x1000000
-#define JOY_CAL_READRONLY 0x2000000
-#define JOY_CAL_READUONLY 0x4000000
-#define JOY_CAL_READVONLY 0x8000000
-#define JOYSTICKID1 0
-#define JOYSTICKID2 1
-#define JOYCAPS_HASZ 1
-#define JOYCAPS_HASR 2
-#define JOYCAPS_HASU 4
-#define JOYCAPS_HASV 8
-#define JOYCAPS_HASPOV 16
-#define JOYCAPS_POV4DIR 32
-#define JOYCAPS_POVCTS 64
-#define MMIOERR_BASE 256
-#define MMIOERR_FILENOTFOUND (MMIOERR_BASE+1)
-#define MMIOERR_OUTOFMEMORY (MMIOERR_BASE+2)
-#define MMIOERR_CANNOTOPEN (MMIOERR_BASE+3)
-#define MMIOERR_CANNOTCLOSE (MMIOERR_BASE+4)
-#define MMIOERR_CANNOTREAD (MMIOERR_BASE+5)
-#define MMIOERR_CANNOTWRITE (MMIOERR_BASE+6)
-#define MMIOERR_CANNOTSEEK (MMIOERR_BASE+7)
-#define MMIOERR_CANNOTEXPAND (MMIOERR_BASE+8)
-#define MMIOERR_CHUNKNOTFOUND (MMIOERR_BASE+9)
-#define MMIOERR_UNBUFFERED (MMIOERR_BASE+10)
-#define MMIOERR_PATHNOTFOUND (MMIOERR_BASE+11)
-#define MMIOERR_ACCESSDENIED (MMIOERR_BASE+12)
-#define MMIOERR_SHARINGVIOLATION (MMIOERR_BASE+13)
-#define MMIOERR_NETWORKERROR (MMIOERR_BASE+14)
-#define MMIOERR_TOOMANYOPENFILES (MMIOERR_BASE+15)
-#define MMIOERR_INVALIDFILE (MMIOERR_BASE+16)
-#define CFSEPCHAR '+'
-#define MMIO_RWMODE 3
-#define MMIO_SHAREMODE 0x70
-#define MMIO_CREATE 0x1000
-#define MMIO_PARSE 256
-#define MMIO_DELETE 512
-#define MMIO_EXIST 0x4000
-#define MMIO_ALLOCBUF 0x10000
-#define MMIO_GETTEMP 0x20000
-#define MMIO_DIRTY 0x10000000
-#define MMIO_READ 0
-#define MMIO_WRITE 1
-#define MMIO_READWRITE 2
-#define MMIO_COMPAT 0
-#define MMIO_EXCLUSIVE 16
-#define MMIO_DENYWRITE 32
-#define MMIO_DENYREAD 0x30
-#define MMIO_DENYNONE 64
-#define MMIO_FHOPEN 16
-#define MMIO_EMPTYBUF 16
-#define MMIO_TOUPPER 16
-#define MMIO_INSTALLPROC 0x10000
-#define MMIO_GLOBALPROC 0x10000000
-#define MMIO_REMOVEPROC 0x20000
-#define MMIO_UNICODEPROC 0x1000000
-#define MMIO_FINDPROC 0x40000
-#define MMIO_FINDCHUNK 16
-#define MMIO_FINDRIFF 32
-#define MMIO_FINDLIST 64
-#define MMIO_CREATERIFF 32
-#define MMIO_CREATELIST 64
-#define MMIOM_READ MMIO_READ
-#define MMIOM_WRITE MMIO_WRITE
-#define MMIOM_SEEK 2
-#define MMIOM_OPEN 3
-#define MMIOM_CLOSE 4
-#define MMIOM_WRITEFLUSH 5
-#define MMIOM_RENAME 6
-#define MMIOM_USER 0x8000
-#define FOURCC_RIFF mmioFOURCC('R', 'I', 'F', 'F')
-#define FOURCC_LIST mmioFOURCC('L', 'I', 'S', 'T')
-#define FOURCC_DOS mmioFOURCC('D', 'O', 'S', ' ')
-#define FOURCC_MEM mmioFOURCC('M', 'E', 'M', ' ')
-#define MMIO_DEFAULTBUFFER 8192
-#define MCIERR_INVALID_DEVICE_ID (MCIERR_BASE+1)
-#define MCIERR_UNRECOGNIZED_KEYWORD (MCIERR_BASE+3)
-#define MCIERR_UNRECOGNIZED_COMMAND (MCIERR_BASE+5)
-#define MCIERR_HARDWARE (MCIERR_BASE+6)
-#define MCIERR_INVALID_DEVICE_NAME (MCIERR_BASE+7)
-#define MCIERR_OUT_OF_MEMORY (MCIERR_BASE+8)
-#define MCIERR_DEVICE_OPEN (MCIERR_BASE+9)
-#define MCIERR_CANNOT_LOAD_DRIVER (MCIERR_BASE+10)
-#define MCIERR_MISSING_COMMAND_STRING (MCIERR_BASE+11)
-#define MCIERR_PARAM_OVERFLOW (MCIERR_BASE+12)
-#define MCIERR_MISSING_STRING_ARGUMENT (MCIERR_BASE+13)
-#define MCIERR_BAD_INTEGER (MCIERR_BASE+14)
-#define MCIERR_PARSER_INTERNAL (MCIERR_BASE+15)
-#define MCIERR_DRIVER_INTERNAL (MCIERR_BASE+16)
-#define MCIERR_MISSING_PARAMETER (MCIERR_BASE+17)
-#define MCIERR_UNSUPPORTED_FUNCTION (MCIERR_BASE+18)
-#define MCIERR_FILE_NOT_FOUND (MCIERR_BASE+19)
-#define MCIERR_DEVICE_NOT_READY (MCIERR_BASE+20)
-#define MCIERR_INTERNAL (MCIERR_BASE+21)
-#define MCIERR_DRIVER (MCIERR_BASE+22)
-#define MCIERR_CANNOT_USE_ALL (MCIERR_BASE+23)
-#define MCIERR_MULTIPLE (MCIERR_BASE+24)
-#define MCIERR_EXTENSION_NOT_FOUND (MCIERR_BASE+25)
-#define MCIERR_OUTOFRANGE (MCIERR_BASE+26)
-#define MCIERR_FLAGS_NOT_COMPATIBLE (MCIERR_BASE+28)
-#define MCIERR_FILE_NOT_SAVED (MCIERR_BASE+30)
-#define MCIERR_DEVICE_TYPE_REQUIRED (MCIERR_BASE+31)
-#define MCIERR_DEVICE_LOCKED (MCIERR_BASE+32)
-#define MCIERR_DUPLICATE_ALIAS (MCIERR_BASE+33)
-#define MCIERR_BAD_CONSTANT (MCIERR_BASE+34)
-#define MCIERR_MUST_USE_SHAREABLE (MCIERR_BASE+35)
-#define MCIERR_MISSING_DEVICE_NAME (MCIERR_BASE+36)
-#define MCIERR_BAD_TIME_FORMAT (MCIERR_BASE+37)
-#define MCIERR_NO_CLOSING_QUOTE (MCIERR_BASE+38)
-#define MCIERR_DUPLICATE_FLAGS (MCIERR_BASE+39)
-#define MCIERR_INVALID_FILE (MCIERR_BASE+40)
-#define MCIERR_NULL_PARAMETER_BLOCK (MCIERR_BASE+41)
-#define MCIERR_UNNAMED_RESOURCE (MCIERR_BASE+42)
-#define MCIERR_NEW_REQUIRES_ALIAS (MCIERR_BASE+43)
-#define MCIERR_NOTIFY_ON_AUTO_OPEN (MCIERR_BASE+44)
-#define MCIERR_NO_ELEMENT_ALLOWED (MCIERR_BASE+45)
-#define MCIERR_NONAPPLICABLE_FUNCTION (MCIERR_BASE+46)
-#define MCIERR_ILLEGAL_FOR_AUTO_OPEN (MCIERR_BASE+47)
-#define MCIERR_FILENAME_REQUIRED (MCIERR_BASE+48)
-#define MCIERR_EXTRA_CHARACTERS (MCIERR_BASE+49)
-#define MCIERR_DEVICE_NOT_INSTALLED (MCIERR_BASE+50)
-#define MCIERR_GET_CD (MCIERR_BASE+51)
-#define MCIERR_SET_CD (MCIERR_BASE+52)
-#define MCIERR_SET_DRIVE (MCIERR_BASE+53)
-#define MCIERR_DEVICE_LENGTH (MCIERR_BASE+54)
-#define MCIERR_DEVICE_ORD_LENGTH (MCIERR_BASE+55)
-#define MCIERR_NO_INTEGER (MCIERR_BASE+56)
-#define MCIERR_WAVE_OUTPUTSINUSE (MCIERR_BASE+64)
-#define MCIERR_WAVE_SETOUTPUTINUSE (MCIERR_BASE+65)
-#define MCIERR_WAVE_INPUTSINUSE (MCIERR_BASE+66)
-#define MCIERR_WAVE_SETINPUTINUSE (MCIERR_BASE+67)
-#define MCIERR_WAVE_OUTPUTUNSPECIFIED (MCIERR_BASE+68)
-#define MCIERR_WAVE_INPUTUNSPECIFIED (MCIERR_BASE+69)
-#define MCIERR_WAVE_OUTPUTSUNSUITABLE (MCIERR_BASE+70)
-#define MCIERR_WAVE_SETOUTPUTUNSUITABLE (MCIERR_BASE+71)
-#define MCIERR_WAVE_INPUTSUNSUITABLE (MCIERR_BASE+72)
-#define MCIERR_WAVE_SETINPUTUNSUITABLE (MCIERR_BASE+73)
-#define MCIERR_SEQ_DIV_INCOMPATIBLE (MCIERR_BASE+80)
-#define MCIERR_SEQ_PORT_INUSE (MCIERR_BASE+81)
-#define MCIERR_SEQ_PORT_NONEXISTENT (MCIERR_BASE+82)
-#define MCIERR_SEQ_PORT_MAPNODEVICE (MCIERR_BASE+83)
-#define MCIERR_SEQ_PORT_MISCERROR (MCIERR_BASE+84)
-#define MCIERR_SEQ_TIMER (MCIERR_BASE+85)
-#define MCIERR_SEQ_PORTUNSPECIFIED (MCIERR_BASE+86)
-#define MCIERR_SEQ_NOMIDIPRESENT (MCIERR_BASE+87)
-#define MCIERR_NO_WINDOW (MCIERR_BASE+90)
-#define MCIERR_CREATEWINDOW (MCIERR_BASE+91)
-#define MCIERR_FILE_READ (MCIERR_BASE+92)
-#define MCIERR_FILE_WRITE (MCIERR_BASE+93)
-#define MCIERR_NO_IDENTITY (MCIERR_BASE+94)
-#define MCIERR_CUSTOM_DRIVER_BASE (MCIERR_BASE+256)
-#define MCI_FIRST DRV_MCI_FIRST
-#define MCI_OPEN 0x803
-#define MCI_CLOSE 0x804
-#define MCI_ESCAPE 0x805
-#define MCI_PLAY 0x806
-#define MCI_SEEK 0x807
-#define MCI_STOP 0x808
-#define MCI_PAUSE 0x809
-#define MCI_INFO 0x80A
-#define MCI_GETDEVCAPS 0x80B
-#define MCI_SPIN 0x80C
-#define MCI_SET 0x80D
-#define MCI_STEP 0x80E
-#define MCI_RECORD 0x80F
-#define MCI_SYSINFO 0x810
-#define MCI_BREAK 0x811
-#define MCI_SAVE 0x813
-#define MCI_STATUS 0x814
-#define MCI_CUE 0x830
-#define MCI_REALIZE 0x840
-#define MCI_WINDOW 0x841
-#define MCI_PUT 0x842
-#define MCI_WHERE 0x843
-#define MCI_FREEZE 0x844
-#define MCI_UNFREEZE 0x845
-#define MCI_LOAD 0x850
-#define MCI_CUT 0x851
-#define MCI_COPY 0x852
-#define MCI_PASTE 0x853
-#define MCI_UPDATE 0x854
-#define MCI_RESUME 0x855
-#define MCI_DELETE 0x856
-#define MCI_USER_MESSAGES (DRV_MCI_FIRST+0x400)
-#define MCI_LAST 0xFFF
-#define MCI_ALL_DEVICE_ID ((MCIDEVICEID)-1)
-#define MCI_DEVTYPE_VCR 513
-#define MCI_DEVTYPE_VIDEODISC 514
-#define MCI_DEVTYPE_OVERLAY 515
-#define MCI_DEVTYPE_CD_AUDIO 516
-#define MCI_DEVTYPE_DAT 517
-#define MCI_DEVTYPE_SCANNER 518
-#define MCI_DEVTYPE_ANIMATION 519
-#define MCI_DEVTYPE_DIGITAL_VIDEO 520
-#define MCI_DEVTYPE_OTHER 521
-#define MCI_DEVTYPE_WAVEFORM_AUDIO 522
-#define MCI_DEVTYPE_SEQUENCER 523
-#define MCI_DEVTYPE_FIRST MCI_DEVTYPE_VCR
-#define MCI_DEVTYPE_LAST MCI_DEVTYPE_SEQUENCER
-#define MCI_DEVTYPE_FIRST_USER 0x1000
-#define MCI_MODE_NOT_READY (MCI_STRING_OFFSET+12)
-#define MCI_MODE_STOP (MCI_STRING_OFFSET+13)
-#define MCI_MODE_PLAY (MCI_STRING_OFFSET+14)
-#define MCI_MODE_RECORD (MCI_STRING_OFFSET+15)
-#define MCI_MODE_SEEK (MCI_STRING_OFFSET+16)
-#define MCI_MODE_PAUSE (MCI_STRING_OFFSET+17)
-#define MCI_MODE_OPEN (MCI_STRING_OFFSET+18)
-#define MCI_FORMAT_MILLISECONDS 0
-#define MCI_FORMAT_HMS 1
-#define MCI_FORMAT_MSF 2
-#define MCI_FORMAT_FRAMES 3
-#define MCI_FORMAT_SMPTE_24 4
-#define MCI_FORMAT_SMPTE_25 5
-#define MCI_FORMAT_SMPTE_30 6
-#define MCI_FORMAT_SMPTE_30DROP 7
-#define MCI_FORMAT_BYTES 8
-#define MCI_FORMAT_SAMPLES 9
-#define MCI_FORMAT_TMSF 10
-#define MCI_MSF_MINUTE(t) ((BYTE)(t))
-#define MCI_MSF_SECOND(t) ((BYTE)(((WORD)(t))>>8))
-#define MCI_MSF_FRAME(t) ((BYTE)((t)>>16))
-#define MCI_MAKE_MSF(m,s,f) ((DWORD)(((BYTE)(m)|((WORD)(s)<<8))|(((DWORD)(BYTE)(f))<<16)))
-#define MCI_TMSF_TRACK(t) ((BYTE)(t))
-#define MCI_TMSF_MINUTE(t) ((BYTE)(((WORD)(t))>>8))
-#define MCI_TMSF_SECOND(t) ((BYTE)((t)>>16))
-#define MCI_TMSF_FRAME(t) ((BYTE)((t)>>24))
-#define MCI_MAKE_TMSF(t,m,s,f) ((DWORD)(((BYTE)(t)|((WORD)(m)<<8))|(((DWORD)(BYTE)(s)|((WORD)(f)<<8))<<16)))
-#define MCI_HMS_HOUR(t) ((BYTE)(t))
-#define MCI_HMS_MINUTE(t) ((BYTE)(((WORD)(t))>>8))
-#define MCI_HMS_SECOND(t) ((BYTE)((t)>>16))
-#define MCI_MAKE_HMS(h,m,s) ((DWORD)(((BYTE)(h)|((WORD)(m)<<8))|(((DWORD)(BYTE)(s))<<16)))
-#define MCI_NOTIFY_SUCCESSFUL 1
-#define MCI_NOTIFY_SUPERSEDED 2
-#define MCI_NOTIFY_ABORTED 4
-#define MCI_NOTIFY_FAILURE 8
-#define MCI_NOTIFY 1
-#define MCI_WAIT 2
-#define MCI_FROM 4
-#define MCI_TO 8
-#define MCI_TRACK 16
-#define MCI_OPEN_SHAREABLE 256
-#define MCI_OPEN_ELEMENT 512
-#define MCI_OPEN_ALIAS 1024
-#define MCI_OPEN_ELEMENT_ID 2048
-#define MCI_OPEN_TYPE_ID 0x1000
-#define MCI_OPEN_TYPE 0x2000
-#define MCI_SEEK_TO_START 256
-#define MCI_SEEK_TO_END 512
-#define MCI_STATUS_ITEM 256
-#define MCI_STATUS_START 512
-#define MCI_STATUS_LENGTH 1
-#define MCI_STATUS_POSITION 2
-#define MCI_STATUS_NUMBER_OF_TRACKS 3
-#define MCI_STATUS_MODE 4
-#define MCI_STATUS_MEDIA_PRESENT 5
-#define MCI_STATUS_TIME_FORMAT 6
-#define MCI_STATUS_READY 7
-#define MCI_STATUS_CURRENT_TRACK 8
-#define MCI_INFO_PRODUCT 256
-#define MCI_INFO_FILE 512
-#define MCI_INFO_MEDIA_UPC 1024
-#define MCI_INFO_MEDIA_IDENTITY 2048
-#define MCI_INFO_NAME 0x1000
-#define MCI_INFO_COPYRIGHT 0x2000
-#define MCI_GETDEVCAPS_ITEM 256
-#define MCI_GETDEVCAPS_CAN_RECORD 1
-#define MCI_GETDEVCAPS_HAS_AUDIO 2
-#define MCI_GETDEVCAPS_HAS_VIDEO 3
-#define MCI_GETDEVCAPS_DEVICE_TYPE 4
-#define MCI_GETDEVCAPS_USES_FILES 5
-#define MCI_GETDEVCAPS_COMPOUND_DEVICE 6
-#define MCI_GETDEVCAPS_CAN_EJECT 7
-#define MCI_GETDEVCAPS_CAN_PLAY 8
-#define MCI_GETDEVCAPS_CAN_SAVE 9
-#define MCI_SYSINFO_QUANTITY 256
-#define MCI_SYSINFO_OPEN 512
-#define MCI_SYSINFO_NAME 1024
-#define MCI_SYSINFO_INSTALLNAME 2048
-#define MCI_SET_DOOR_OPEN 256
-#define MCI_SET_DOOR_CLOSED 512
-#define MCI_SET_TIME_FORMAT 1024
-#define MCI_SET_AUDIO 2048
-#define MCI_SET_VIDEO 0x1000
-#define MCI_SET_ON 0x2000
-#define MCI_SET_OFF 0x4000
-#define MCI_SET_AUDIO_ALL 0
-#define MCI_SET_AUDIO_LEFT 1
-#define MCI_SET_AUDIO_RIGHT 2
-#define MCI_BREAK_KEY 256
-#define MCI_BREAK_HWND 512
-#define MCI_BREAK_OFF 1024
-#define MCI_RECORD_INSERT 256
-#define MCI_RECORD_OVERWRITE 512
-#define MCI_SAVE_FILE 256
-#define MCI_LOAD_FILE 256
-#define MCI_VD_MODE_PARK (MCI_VD_OFFSET+1)
-#define MCI_VD_MEDIA_CLV (MCI_VD_OFFSET+2)
-#define MCI_VD_MEDIA_CAV (MCI_VD_OFFSET+3)
-#define MCI_VD_MEDIA_OTHER (MCI_VD_OFFSET+4)
-#define MCI_VD_FORMAT_TRACK 0x4001
-#define MCI_VD_PLAY_REVERSE 0x10000
-#define MCI_VD_PLAY_FAST 0x20000
-#define MCI_VD_PLAY_SPEED 0x40000
-#define MCI_VD_PLAY_SCAN 0x80000
-#define MCI_VD_PLAY_SLOW 0x100000
-#define MCI_VD_SEEK_REVERSE 0x10000
-#define MCI_VD_STATUS_SPEED 0x4002
-#define MCI_VD_STATUS_FORWARD 0x4003
-#define MCI_VD_STATUS_MEDIA_TYPE 0x4004
-#define MCI_VD_STATUS_SIDE 0x4005
-#define MCI_VD_STATUS_DISC_SIZE 0x4006
-#define MCI_VD_GETDEVCAPS_CLV 0x10000
-#define MCI_VD_GETDEVCAPS_CAV 0x20000
-#define MCI_VD_SPIN_UP 0x10000
-#define MCI_VD_SPIN_DOWN 0x20000
-#define MCI_VD_GETDEVCAPS_CAN_REVERSE 0x4002
-#define MCI_VD_GETDEVCAPS_FAST_RATE 0x4003
-#define MCI_VD_GETDEVCAPS_SLOW_RATE 0x4004
-#define MCI_VD_GETDEVCAPS_NORMAL_RATE 0x4005
-#define MCI_VD_STEP_FRAMES 0x10000
-#define MCI_VD_STEP_REVERSE 0x20000
-#define MCI_VD_ESCAPE_STRING 256
-#define MCI_CDA_STATUS_TYPE_TRACK 0x4001
-#define MCI_CDA_TRACK_AUDIO MCI_CD_OFFSET
-#define MCI_CDA_TRACK_OTHER (MCI_CD_OFFSET+1)
-#define MCI_WAVE_PCM MCI_WAVE_OFFSET
-#define MCI_WAVE_MAPPER (MCI_WAVE_OFFSET+1)
-#define MCI_WAVE_OPEN_BUFFER 0x10000
-#define MCI_WAVE_SET_FORMATTAG 0x10000
-#define MCI_WAVE_SET_CHANNELS 0x20000
-#define MCI_WAVE_SET_SAMPLESPERSEC 0x40000
-#define MCI_WAVE_SET_AVGBYTESPERSEC 0x80000
-#define MCI_WAVE_SET_BLOCKALIGN 0x100000
-#define MCI_WAVE_SET_BITSPERSAMPLE 0x200000
-#define MCI_WAVE_INPUT 0x400000
-#define MCI_WAVE_OUTPUT 0x800000
-#define MCI_WAVE_STATUS_FORMATTAG 0x4001
-#define MCI_WAVE_STATUS_CHANNELS 0x4002
-#define MCI_WAVE_STATUS_SAMPLESPERSEC 0x4003
-#define MCI_WAVE_STATUS_AVGBYTESPERSEC 0x4004
-#define MCI_WAVE_STATUS_BLOCKALIGN 0x4005
-#define MCI_WAVE_STATUS_BITSPERSAMPLE 0x4006
-#define MCI_WAVE_STATUS_LEVEL 0x4007
-#define MCI_WAVE_SET_ANYINPUT 0x4000000
-#define MCI_WAVE_SET_ANYOUTPUT 0x8000000
-#define MCI_WAVE_GETDEVCAPS_INPUTS 0x4001
-#define MCI_WAVE_GETDEVCAPS_OUTPUTS 0x4002
-#define MCI_SEQ_DIV_PPQN MCI_SEQ_OFFSET
-#define MCI_SEQ_DIV_SMPTE_24 (MCI_SEQ_OFFSET+1)
-#define MCI_SEQ_DIV_SMPTE_25 (MCI_SEQ_OFFSET+2)
-#define MCI_SEQ_DIV_SMPTE_30DROP (MCI_SEQ_OFFSET+3)
-#define MCI_SEQ_DIV_SMPTE_30 (MCI_SEQ_OFFSET+4)
-#define MCI_SEQ_FORMAT_SONGPTR 0x4001
-#define MCI_SEQ_FILE 0x4002
-#define MCI_SEQ_MIDI 0x4003
-#define MCI_SEQ_SMPTE 0x4004
-#define MCI_SEQ_NONE 65533
-#define MCI_SEQ_MAPPER 65535
-#define MCI_SEQ_STATUS_TEMPO 0x4002
-#define MCI_SEQ_STATUS_PORT 0x4003
-#define MCI_SEQ_STATUS_SLAVE 0x4007
-#define MCI_SEQ_STATUS_MASTER 0x4008
-#define MCI_SEQ_STATUS_OFFSET 0x4009
-#define MCI_SEQ_STATUS_DIVTYPE 0x400A
-#define MCI_SEQ_STATUS_NAME 0x400B
-#define MCI_SEQ_STATUS_COPYRIGHT 0x400C
-#define MCI_SEQ_SET_TEMPO 0x10000
-#define MCI_SEQ_SET_PORT 0x20000
-#define MCI_SEQ_SET_SLAVE 0x40000
-#define MCI_SEQ_SET_MASTER 0x80000
-#define MCI_SEQ_SET_OFFSET 0x1000000
-#define MCI_ANIM_OPEN_WS 0x10000
-#define MCI_ANIM_OPEN_PARENT 0x20000
-#define MCI_ANIM_OPEN_NOSTATIC 0x40000
-#define MCI_ANIM_PLAY_SPEED 0x10000
-#define MCI_ANIM_PLAY_REVERSE 0x20000
-#define MCI_ANIM_PLAY_FAST 0x40000
-#define MCI_ANIM_PLAY_SLOW 0x80000
-#define MCI_ANIM_PLAY_SCAN 0x100000
-#define MCI_ANIM_STEP_REVERSE 0x10000
-#define MCI_ANIM_STEP_FRAMES 0x20000
-#define MCI_ANIM_STATUS_SPEED 0x4001
-#define MCI_ANIM_STATUS_FORWARD 0x4002
-#define MCI_ANIM_STATUS_HWND 0x4003
-#define MCI_ANIM_STATUS_HPAL 0x4004
-#define MCI_ANIM_STATUS_STRETCH 0x4005
-#define MCI_ANIM_INFO_TEXT 0x10000
-#define MCI_ANIM_GETDEVCAPS_CAN_REVERSE 0x4001
-#define MCI_ANIM_GETDEVCAPS_FAST_RATE 0x4002
-#define MCI_ANIM_GETDEVCAPS_SLOW_RATE 0x4003
-#define MCI_ANIM_GETDEVCAPS_NORMAL_RATE 0x4004
-#define MCI_ANIM_GETDEVCAPS_PALETTES 0x4006
-#define MCI_ANIM_GETDEVCAPS_CAN_STRETCH 0x4007
-#define MCI_ANIM_GETDEVCAPS_MAX_WINDOWS 0x4008
-#define MCI_ANIM_REALIZE_NORM 0x10000
-#define MCI_ANIM_REALIZE_BKGD 0x20000
-#define MCI_ANIM_WINDOW_HWND 0x10000
-#define MCI_ANIM_WINDOW_STATE 0x40000
-#define MCI_ANIM_WINDOW_TEXT 0x80000
-#define MCI_ANIM_WINDOW_ENABLE_STRETCH 0x100000
-#define MCI_ANIM_WINDOW_DISABLE_STRETCH 0x200000
-#define MCI_ANIM_WINDOW_DEFAULT 0xL
-#define MCI_ANIM_RECT 0x10000
-#define MCI_ANIM_PUT_SOURCE 0x20000
-#define MCI_ANIM_PUT_DESTINATION 0x40000
-#define MCI_ANIM_WHERE_SOURCE 0x20000
-#define MCI_ANIM_WHERE_DESTINATION 0x40000
-#define MCI_ANIM_UPDATE_HDC 0x20000
-#define MCI_OVLY_OPEN_WS 0x10000
-#define MCI_OVLY_OPEN_PARENT 0x20000
-#define MCI_OVLY_STATUS_HWND 0x4001
-#define MCI_OVLY_STATUS_STRETCH 0x4002
-#define MCI_OVLY_INFO_TEXT 0x10000
-#define MCI_OVLY_GETDEVCAPS_CAN_STRETCH 0x4001
-#define MCI_OVLY_GETDEVCAPS_CAN_FREEZE 0x4002
-#define MCI_OVLY_GETDEVCAPS_MAX_WINDOWS 0x4003
-#define MCI_OVLY_WINDOW_HWND 0x10000
-#define MCI_OVLY_WINDOW_STATE 0x40000
-#define MCI_OVLY_WINDOW_TEXT 0x80000
-#define MCI_OVLY_WINDOW_ENABLE_STRETCH 0x100000
-#define MCI_OVLY_WINDOW_DISABLE_STRETCH 0x200000
-#define MCI_OVLY_WINDOW_DEFAULT 0xL
-#define MCI_OVLY_RECT 0x10000
-#define MCI_OVLY_PUT_SOURCE 0x20000
-#define MCI_OVLY_PUT_DESTINATION 0x40000
-#define MCI_OVLY_PUT_FRAME 0x80000
-#define MCI_OVLY_PUT_VIDEO 0x100000
-#define MCI_OVLY_WHERE_SOURCE 0x20000
-#define MCI_OVLY_WHERE_DESTINATION 0x40000
-#define MCI_OVLY_WHERE_FRAME 0x80000
-#define MCI_OVLY_WHERE_VIDEO 0x100000
-#define NEWTRANSPARENT 3
-#define QUERYROPSUPPORT 40
-#define SELECTDIB 41
-#define DIBINDEX(n) MAKELONG((n),0x10FF)
-#define SC_SCREENSAVE 0xF140
-#define CAPS1 94
-#define C1_TRANSPARENT 1
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#endif
-#ifndef SEEK_CUR
-#define SEEK_CUR 1
-#endif
-#ifndef SEEK_END
-#define SEEK_END 2
-#endif
-
-typedef DWORD MCIERROR;
-typedef UINT MCIDEVICEID;
-typedef UINT(CALLBACK *YIELDPROC)(MCIDEVICEID,DWORD);
-typedef UINT MMVERSION;
-typedef UINT MMRESULT;
-typedef struct mmtime_tag {
- UINT wType;
- union {
- DWORD ms;
- DWORD sample;
- DWORD cb;
- DWORD ticks;
- struct {
- BYTE hour;
- BYTE min;
- BYTE sec;
- BYTE frame;
- BYTE fps;
- BYTE dummy;
- BYTE pad[2];
- } smpte;
- struct {
- DWORD songptrpos;
- } midi;
- } u;
-} MMTIME,*PMMTIME,*LPMMTIME;
-DECLARE_HANDLE(HDRVR);
-typedef struct tagDRVCONFIGINFO {
- DWORD dwDCISize;
- LPCWSTR lpszDCISectionName;
- LPCWSTR lpszDCIAliasName;
-} DRVCONFIGINFO,*PDRVCONFIGINFO,*LPDRVCONFIGINFO;
-typedef struct DRVCONFIGINFOEX {
- DWORD dwDCISize;
- LPCWSTR lpszDCISectionName;
- LPCWSTR lpszDCIAliasName;
- DWORD dnDevNode;
-} DRVCONFIGINFOEX,*PDRVCONFIGINFOEX,*LPDRVCONFIGINFOEX;
-typedef LRESULT(CALLBACK* DRIVERPROC)(DWORD,HDRVR,UINT,LPARAM,LPARAM);
-typedef void (CALLBACK DRVCALLBACK)(HDRVR,UINT,DWORD,DWORD,DWORD);
-typedef DRVCALLBACK *LPDRVCALLBACK;
-typedef DRVCALLBACK *PDRVCALLBACK;
-DECLARE_HANDLE(HWAVE);
-DECLARE_HANDLE(HWAVEIN);
-DECLARE_HANDLE(HWAVEOUT);
-typedef HWAVEIN *LPHWAVEIN;
-typedef HWAVEOUT *LPHWAVEOUT;
-typedef DRVCALLBACK WAVECALLBACK;
-typedef WAVECALLBACK *LPWAVECALLBACK;
-typedef struct wavehdr_tag {
- LPSTR lpData;
- DWORD dwBufferLength;
- DWORD dwBytesRecorded;
- DWORD dwUser;
- DWORD dwFlags;
- DWORD dwLoops;
- struct wavehdr_tag *lpNext;
- DWORD reserved;
-} WAVEHDR,*PWAVEHDR,*LPWAVEHDR;
-typedef struct tagWAVEOUTCAPSA {
- WORD wMid;
- WORD wPid;
- MMVERSION vDriverVersion;
- CHAR szPname[MAXPNAMELEN];
- DWORD dwFormats;
- WORD wChannels;
- WORD wReserved1;
- DWORD dwSupport;
-} WAVEOUTCAPSA,*PWAVEOUTCAPSA,*LPWAVEOUTCAPSA;
-typedef struct tagWAVEOUTCAPSW {
- WORD wMid;
- WORD wPid;
- MMVERSION vDriverVersion;
- WCHAR szPname[MAXPNAMELEN];
- DWORD dwFormats;
- WORD wChannels;
- WORD wReserved1;
- DWORD dwSupport;
-} WAVEOUTCAPSW,*PWAVEOUTCAPSW,*LPWAVEOUTCAPSW;
-typedef struct tagWAVEINCAPSA {
- WORD wMid;
- WORD wPid;
- MMVERSION vDriverVersion;
- CHAR szPname[MAXPNAMELEN];
- DWORD dwFormats;
- WORD wChannels;
- WORD wReserved1;
-} WAVEINCAPSA,*PWAVEINCAPSA,*LPWAVEINCAPSA;
-typedef struct tagWAVEINCAPSW {
- WORD wMid;
- WORD wPid;
- MMVERSION vDriverVersion;
- WCHAR szPname[MAXPNAMELEN];
- DWORD dwFormats;
- WORD wChannels;
- WORD wReserved1;
-} WAVEINCAPSW,*PWAVEINCAPSW,*LPWAVEINCAPSW;
-typedef struct waveformat_tag {
- WORD wFormatTag;
- WORD nChannels;
- DWORD nSamplesPerSec;
- DWORD nAvgBytesPerSec;
- WORD nBlockAlign;
-} WAVEFORMAT,*PWAVEFORMAT,*LPWAVEFORMAT;
-typedef struct pcmwaveformat_tag {
- WAVEFORMAT wf;
- WORD wBitsPerSample;
-} PCMWAVEFORMAT, *PPCMWAVEFORMAT,*LPPCMWAVEFORMAT;
-#ifndef _LPCWAVEFORMATEX_DEFINED
-#define _LPCWAVEFORMATEX_DEFINED
-#define _WAVEFORMATEX_
-typedef struct tWAVEFORMATEX {
- WORD wFormatTag;
- WORD nChannels;
- DWORD nSamplesPerSec;
- DWORD nAvgBytesPerSec;
- WORD nBlockAlign;
- WORD wBitsPerSample;
- WORD cbSize;
-} WAVEFORMATEX,*PWAVEFORMATEX,*LPWAVEFORMATEX;
-typedef const WAVEFORMATEX *LPCWAVEFORMATEX;
-#endif
-DECLARE_HANDLE(HMIDI);
-DECLARE_HANDLE(HMIDIIN);
-DECLARE_HANDLE(HMIDIOUT);
-DECLARE_HANDLE(HMIDISTRM);
-typedef HMIDI *LPHMIDI;
-typedef HMIDIIN *LPHMIDIIN;
-typedef HMIDIOUT *LPHMIDIOUT;
-typedef HMIDISTRM *LPHMIDISTRM;
-typedef DRVCALLBACK MIDICALLBACK;
-typedef MIDICALLBACK *LPMIDICALLBACK;
-typedef WORD PATCHARRAY[MIDIPATCHSIZE];
-typedef WORD *LPPATCHARRAY;
-typedef WORD KEYARRAY[MIDIPATCHSIZE];
-typedef WORD *LPKEYARRAY;
-typedef struct tagMIDIOUTCAPSA {
- WORD wMid;
- WORD wPid;
- MMVERSION vDriverVersion;
- CHAR szPname[MAXPNAMELEN];
- WORD wTechnology;
- WORD wVoices;
- WORD wNotes;
- WORD wChannelMask;
- DWORD dwSupport;
-} MIDIOUTCAPSA,*PMIDIOUTCAPSA,*LPMIDIOUTCAPSA;
-typedef struct tagMIDIOUTCAPSW {
- WORD wMid;
- WORD wPid;
- MMVERSION vDriverVersion;
- WCHAR szPname[MAXPNAMELEN];
- WORD wTechnology;
- WORD wVoices;
- WORD wNotes;
- WORD wChannelMask;
- DWORD dwSupport;
-} MIDIOUTCAPSW,*PMIDIOUTCAPSW,*LPMIDIOUTCAPSW;
-typedef struct tagMIDIINCAPSA {
- WORD wMid;
- WORD wPid;
- MMVERSION vDriverVersion;
- CHAR szPname[MAXPNAMELEN];
- DWORD dwSupport;
-} MIDIINCAPSA,*PMIDIINCAPSA,*LPMIDIINCAPSA;
-typedef struct tagMIDIINCAPSW {
- WORD wMid;
- WORD wPid;
- MMVERSION vDriverVersion;
- WCHAR szPname[MAXPNAMELEN];
- DWORD dwSupport;
-} MIDIINCAPSW,*PMIDIINCAPSW,*NPMIDIINCAPSW,*LPMIDIINCAPSW;
-typedef struct midihdr_tag {
- LPSTR lpData;
- DWORD dwBufferLength;
- DWORD dwBytesRecorded;
- DWORD dwUser;
- DWORD dwFlags;
- struct midihdr_tag *lpNext;
- DWORD reserved;
- DWORD dwOffset;
- DWORD dwReserved[8];
-} MIDIHDR,*PMIDIHDR,*LPMIDIHDR;
-typedef struct midievent_tag {
- DWORD dwDeltaTime;
- DWORD dwStreamID;
- DWORD dwEvent;
- DWORD dwParms[1];
-} MIDIEVENT;
-typedef struct midistrmbuffver_tag {
- DWORD dwVersion;
- DWORD dwMid;
- DWORD dwOEMVersion;
-} MIDISTRMBUFFVER;
-typedef struct midiproptimediv_tag {
- DWORD cbStruct;
- DWORD dwTimeDiv;
-} MIDIPROPTIMEDIV,*LPMIDIPROPTIMEDIV;
-typedef struct midiproptempo_tag {
- DWORD cbStruct;
- DWORD dwTempo;
-} MIDIPROPTEMPO,*LPMIDIPROPTEMPO;
-typedef struct tagAUXCAPSA {
- WORD wMid;
- WORD wPid;
- MMVERSION vDriverVersion;
- CHAR szPname[MAXPNAMELEN];
- WORD wTechnology;
- WORD wReserved1;
- DWORD dwSupport;
-} AUXCAPSA,*PAUXCAPSA,*LPAUXCAPSA;
-typedef struct tagAUXCAPSW {
- WORD wMid;
- WORD wPid;
- MMVERSION vDriverVersion;
- WCHAR szPname[MAXPNAMELEN];
- WORD wTechnology;
- WORD wReserved1;
- DWORD dwSupport;
-} AUXCAPSW,*PAUXCAPSW,*LPAUXCAPSW;
-DECLARE_HANDLE(HMIXEROBJ);
-typedef HMIXEROBJ *LPHMIXEROBJ;
-DECLARE_HANDLE(HMIXER);
-typedef HMIXER *LPHMIXER;
-typedef struct tagMIXERCAPSA {
- WORD wMid;
- WORD wPid;
- MMVERSION vDriverVersion;
- CHAR szPname[MAXPNAMELEN];
- DWORD fdwSupport;
- DWORD cDestinations;
-} MIXERCAPSA,*PMIXERCAPSA,*LPMIXERCAPSA;
-typedef struct tagMIXERCAPSW {
- WORD wMid;
- WORD wPid;
- MMVERSION vDriverVersion;
- WCHAR szPname[MAXPNAMELEN];
- DWORD fdwSupport;
- DWORD cDestinations;
-} MIXERCAPSW,*PMIXERCAPSW,*LPMIXERCAPSW;
-typedef struct tagMIXERLINEA {
- DWORD cbStruct;
- DWORD dwDestination;
- DWORD dwSource;
- DWORD dwLineID;
- DWORD fdwLine;
- DWORD dwUser;
- DWORD dwComponentType;
- DWORD cChannels;
- DWORD cConnections;
- DWORD cControls;
- CHAR szShortName[MIXER_SHORT_NAME_CHARS];
- CHAR szName[MIXER_LONG_NAME_CHARS];
- struct {
- DWORD dwType;
- DWORD dwDeviceID;
- WORD wMid;
- WORD wPid;
- MMVERSION vDriverVersion;
- CHAR szPname[MAXPNAMELEN];
- } Target;
-} MIXERLINEA,*PMIXERLINEA,*LPMIXERLINEA;
-typedef struct tagMIXERLINEW {
- DWORD cbStruct;
- DWORD dwDestination;
- DWORD dwSource;
- DWORD dwLineID;
- DWORD fdwLine;
- DWORD dwUser;
- DWORD dwComponentType;
- DWORD cChannels;
- DWORD cConnections;
- DWORD cControls;
- WCHAR szShortName[MIXER_SHORT_NAME_CHARS];
- WCHAR szName[MIXER_LONG_NAME_CHARS];
- struct {
- DWORD dwType;
- DWORD dwDeviceID;
- WORD wMid;
- WORD wPid;
- MMVERSION vDriverVersion;
- WCHAR szPname[MAXPNAMELEN];
- } Target;
-} MIXERLINEW,*PMIXERLINEW,*LPMIXERLINEW;
-typedef struct tagMIXERCONTROLA {
- DWORD cbStruct;
- DWORD dwControlID;
- DWORD dwControlType;
- DWORD fdwControl;
- DWORD cMultipleItems;
- CHAR szShortName[MIXER_SHORT_NAME_CHARS];
- CHAR szName[MIXER_LONG_NAME_CHARS];
- union {
- _ANONYMOUS_STRUCT struct {
- LONG lMinimum;
- LONG lMaximum;
- }_STRUCT_NAME(s);
- _ANONYMOUS_STRUCT struct {
- DWORD dwMinimum;
- DWORD dwMaximum;
- }_STRUCT_NAME(s1);
- DWORD dwReserved[6];
- } Bounds;
- union {
- DWORD cSteps;
- DWORD cbCustomData;
- DWORD dwReserved[6];
- } Metrics;
-} MIXERCONTROLA,*PMIXERCONTROLA,*LPMIXERCONTROLA;
-typedef struct tagMIXERCONTROLW {
- DWORD cbStruct;
- DWORD dwControlID;
- DWORD dwControlType;
- DWORD fdwControl;
- DWORD cMultipleItems;
- WCHAR szShortName[MIXER_SHORT_NAME_CHARS];
- WCHAR szName[MIXER_LONG_NAME_CHARS];
- union {
- _ANONYMOUS_STRUCT struct {
- LONG lMinimum;
- LONG lMaximum;
- }_STRUCT_NAME(s);
- _ANONYMOUS_STRUCT struct {
- DWORD dwMinimum;
- DWORD dwMaximum;
- }_STRUCT_NAME(s1);
- DWORD dwReserved[6];
- } Bounds;
- union {
- DWORD cSteps;
- DWORD cbCustomData;
- DWORD dwReserved[6];
- } Metrics;
-} MIXERCONTROLW,*PMIXERCONTROLW,*LPMIXERCONTROLW;
-typedef struct tagMIXERLINECONTROLSA {
- DWORD cbStruct;
- DWORD dwLineID;
- _ANONYMOUS_UNION union {
- DWORD dwControlID;
- DWORD dwControlType;
- } DUMMYUNIONNAME;
- DWORD cControls;
- DWORD cbmxctrl;
- LPMIXERCONTROLA pamxctrl;
-} MIXERLINECONTROLSA,*PMIXERLINECONTROLSA,*LPMIXERLINECONTROLSA;
-typedef struct tagMIXERLINECONTROLSW {
- DWORD cbStruct;
- DWORD dwLineID;
- _ANONYMOUS_UNION union {
- DWORD dwControlID;
- DWORD dwControlType;
- } DUMMYUNIONNAME;
- DWORD cControls;
- DWORD cbmxctrl;
- LPMIXERCONTROLW pamxctrl;
-} MIXERLINECONTROLSW,*PMIXERLINECONTROLSW,*LPMIXERLINECONTROLSW;
-typedef struct tMIXERCONTROLDETAILS {
- DWORD cbStruct;
- DWORD dwControlID;
- DWORD cChannels;
- _ANONYMOUS_UNION union {
- HWND hwndOwner;
- DWORD cMultipleItems;
- } DUMMYUNIONNAME;
- DWORD cbDetails;
- PVOID paDetails;
-} MIXERCONTROLDETAILS,*PMIXERCONTROLDETAILS,*LPMIXERCONTROLDETAILS;
-typedef struct tagMIXERCONTROLDETAILS_LISTTEXTA {
- DWORD dwParam1;
- DWORD dwParam2;
- CHAR szName[MIXER_LONG_NAME_CHARS];
-} MIXERCONTROLDETAILS_LISTTEXTA,*PMIXERCONTROLDETAILS_LISTTEXTA,*LPMIXERCONTROLDETAILS_LISTTEXTA;
-typedef struct tagMIXERCONTROLDETAILS_LISTTEXTW {
- DWORD dwParam1;
- DWORD dwParam2;
- WCHAR szName[MIXER_LONG_NAME_CHARS];
-} MIXERCONTROLDETAILS_LISTTEXTW,*PMIXERCONTROLDETAILS_LISTTEXTW,*LPMIXERCONTROLDETAILS_LISTTEXTW;
-typedef struct tMIXERCONTROLDETAILS_BOOLEAN {
- LONG fValue;
-} MIXERCONTROLDETAILS_BOOLEAN,*PMIXERCONTROLDETAILS_BOOLEAN,*LPMIXERCONTROLDETAILS_BOOLEAN;
-typedef struct tMIXERCONTROLDETAILS_SIGNED {
- LONG lValue;
-} MIXERCONTROLDETAILS_SIGNED,*PMIXERCONTROLDETAILS_SIGNED,*LPMIXERCONTROLDETAILS_SIGNED;
-typedef struct tMIXERCONTROLDETAILS_UNSIGNED {
- DWORD dwValue;
-} MIXERCONTROLDETAILS_UNSIGNED,*PMIXERCONTROLDETAILS_UNSIGNED,*LPMIXERCONTROLDETAILS_UNSIGNED;
-typedef void(CALLBACK TIMECALLBACK)(UINT,UINT,DWORD,DWORD,DWORD);
-typedef TIMECALLBACK *LPTIMECALLBACK;
-typedef struct timecaps_tag {
- UINT wPeriodMin;
- UINT wPeriodMax;
-} TIMECAPS,*PTIMECAPS,*LPTIMECAPS;
-typedef struct tagJOYCAPSA {
- WORD wMid;
- WORD wPid;
- CHAR szPname[MAXPNAMELEN];
- UINT wXmin;
- UINT wXmax;
- UINT wYmin;
- UINT wYmax;
- UINT wZmin;
- UINT wZmax;
- UINT wNumButtons;
- UINT wPeriodMin;
- UINT wPeriodMax;
- UINT wRmin;
- UINT wRmax;
- UINT wUmin;
- UINT wUmax;
- UINT wVmin;
- UINT wVmax;
- UINT wCaps;
- UINT wMaxAxes;
- UINT wNumAxes;
- UINT wMaxButtons;
- CHAR szRegKey[MAXPNAMELEN];
- CHAR szOEMVxD[MAX_JOYSTICKOEMVXDNAME];
-} JOYCAPSA,*PJOYCAPSA,*LPJOYCAPSA;
-typedef struct tagJOYCAPSW {
- WORD wMid;
- WORD wPid;
- WCHAR szPname[MAXPNAMELEN];
- UINT wXmin;
- UINT wXmax;
- UINT wYmin;
- UINT wYmax;
- UINT wZmin;
- UINT wZmax;
- UINT wNumButtons;
- UINT wPeriodMin;
- UINT wPeriodMax;
- UINT wRmin;
- UINT wRmax;
- UINT wUmin;
- UINT wUmax;
- UINT wVmin;
- UINT wVmax;
- UINT wCaps;
- UINT wMaxAxes;
- UINT wNumAxes;
- UINT wMaxButtons;
- WCHAR szRegKey[MAXPNAMELEN];
- WCHAR szOEMVxD[MAX_JOYSTICKOEMVXDNAME];
-} JOYCAPSW,*PJOYCAPSW,*LPJOYCAPSW;
-typedef struct joyinfo_tag {
- UINT wXpos;
- UINT wYpos;
- UINT wZpos;
- UINT wButtons;
-} JOYINFO,*PJOYINFO,*LPJOYINFO;
-typedef struct joyinfoex_tag {
- DWORD dwSize;
- DWORD dwFlags;
- DWORD dwXpos;
- DWORD dwYpos;
- DWORD dwZpos;
- DWORD dwRpos;
- DWORD dwUpos;
- DWORD dwVpos;
- DWORD dwButtons;
- DWORD dwButtonNumber;
- DWORD dwPOV;
- DWORD dwReserved1;
- DWORD dwReserved2;
-} JOYINFOEX,*PJOYINFOEX,*LPJOYINFOEX;
-typedef DWORD FOURCC;
-typedef char *HPSTR;
-DECLARE_HANDLE(HMMIO);
-typedef LRESULT (CALLBACK MMIOPROC)(LPSTR,UINT,LPARAM,LPARAM);
-typedef MMIOPROC *LPMMIOPROC;
-typedef struct _MMIOINFO {
- DWORD dwFlags;
- FOURCC fccIOProc;
- LPMMIOPROC pIOProc;
- UINT wErrorRet;
- HTASK htask;
- LONG cchBuffer;
- HPSTR pchBuffer;
- HPSTR pchNext;
- HPSTR pchEndRead;
- HPSTR pchEndWrite;
- LONG lBufOffset;
- LONG lDiskOffset;
- DWORD adwInfo[3];
- DWORD dwReserved1;
- DWORD dwReserved2;
- HMMIO hmmio;
-} MMIOINFO,*PMMIOINFO,*LPMMIOINFO;
-typedef const MMIOINFO *LPCMMIOINFO;
-typedef struct _MMCKINFO {
- FOURCC ckid;
- DWORD cksize;
- FOURCC fccType;
- DWORD dwDataOffset;
- DWORD dwFlags;
-} MMCKINFO,*PMMCKINFO,*LPMMCKINFO;
-typedef const MMCKINFO *LPCMMCKINFO;
-typedef struct tagMCI_GENERIC_PARMS {
- DWORD dwCallback;
-} MCI_GENERIC_PARMS,*PMCI_GENERIC_PARMS,*LPMCI_GENERIC_PARMS;
-typedef struct tagMCI_OPEN_PARMSA {
- DWORD dwCallback;
- MCIDEVICEID wDeviceID;
- LPCSTR lpstrDeviceType;
- LPCSTR lpstrElementName;
- LPCSTR lpstrAlias;
-} MCI_OPEN_PARMSA,*PMCI_OPEN_PARMSA,*LPMCI_OPEN_PARMSA;
-typedef struct tagMCI_OPEN_PARMSW {
- DWORD dwCallback;
- MCIDEVICEID wDeviceID;
- LPCWSTR lpstrDeviceType;
- LPCWSTR lpstrElementName;
- LPCWSTR lpstrAlias;
-} MCI_OPEN_PARMSW,*PMCI_OPEN_PARMSW,*LPMCI_OPEN_PARMSW;
-typedef struct tagMCI_PLAY_PARMS {
- DWORD dwCallback;
- DWORD dwFrom;
- DWORD dwTo;
-} MCI_PLAY_PARMS,*PMCI_PLAY_PARMS,*LPMCI_PLAY_PARMS;
-typedef struct tagMCI_SEEK_PARMS {
- DWORD dwCallback;
- DWORD dwTo;
-} MCI_SEEK_PARMS, *PMCI_SEEK_PARMS,*LPMCI_SEEK_PARMS;
-typedef struct tagMCI_STATUS_PARMS {
- DWORD dwCallback;
- DWORD dwReturn;
- DWORD dwItem;
- DWORD dwTrack;
-} MCI_STATUS_PARMS,*PMCI_STATUS_PARMS,*LPMCI_STATUS_PARMS;
-typedef struct tagMCI_INFO_PARMSA {
- DWORD dwCallback;
- LPSTR lpstrReturn;
- DWORD dwRetSize;
-} MCI_INFO_PARMSA,*LPMCI_INFO_PARMSA;
-typedef struct tagMCI_INFO_PARMSW {
- DWORD dwCallback;
- LPWSTR lpstrReturn;
- DWORD dwRetSize;
-} MCI_INFO_PARMSW,*LPMCI_INFO_PARMSW;
-typedef struct tagMCI_GETDEVCAPS_PARMS {
- DWORD dwCallback;
- DWORD dwReturn;
- DWORD dwItem;
-} MCI_GETDEVCAPS_PARMS,*PMCI_GETDEVCAPS_PARMS,*LPMCI_GETDEVCAPS_PARMS;
-typedef struct tagMCI_SYSINFO_PARMSA {
- DWORD dwCallback;
- LPSTR lpstrReturn;
- DWORD dwRetSize;
- DWORD dwNumber;
- UINT wDeviceType;
-} MCI_SYSINFO_PARMSA,*PMCI_SYSINFO_PARMSA,*LPMCI_SYSINFO_PARMSA;
-typedef struct tagMCI_SYSINFO_PARMSW {
- DWORD dwCallback;
- LPWSTR lpstrReturn;
- DWORD dwRetSize;
- DWORD dwNumber;
- UINT wDeviceType;
-} MCI_SYSINFO_PARMSW,*PMCI_SYSINFO_PARMSW,*LPMCI_SYSINFO_PARMSW;
-typedef struct tagMCI_SET_PARMS {
- DWORD dwCallback;
- DWORD dwTimeFormat;
- DWORD dwAudio;
-} MCI_SET_PARMS,*PMCI_SET_PARMS,*LPMCI_SET_PARMS;
-typedef struct tagMCI_BREAK_PARMS {
- DWORD dwCallback;
- int nVirtKey;
- HWND hwndBreak;
-} MCI_BREAK_PARMS,*PMCI_BREAK_PARMS,*LPMCI_BREAK_PARMS;
-typedef struct tagMCI_SAVE_PARMSA {
- DWORD dwCallback;
- LPCSTR lpfilename;
-} MCI_SAVE_PARMSA,*PMCI_SAVE_PARMSA,*LPMCI_SAVE_PARMSA;
-typedef struct tagMCI_SAVE_PARMSW {
- DWORD dwCallback;
- LPCWSTR lpfilename;
-} MCI_SAVE_PARMSW,*PMCI_SAVE_PARMSW,*LPMCI_SAVE_PARMSW;
-typedef struct tagMCI_LOAD_PARMSA {
- DWORD dwCallback;
- LPCSTR lpfilename;
-} MCI_LOAD_PARMSA,*PMCI_LOAD_PARMSA,*LPMCI_LOAD_PARMSA;
-typedef struct tagMCI_LOAD_PARMSW {
- DWORD dwCallback;
- LPCWSTR lpfilename;
-} MCI_LOAD_PARMSW,*PMCI_LOAD_PARMSW,*LPMCI_LOAD_PARMSW;
-typedef struct tagMCI_RECORD_PARMS {
- DWORD dwCallback;
- DWORD dwFrom;
- DWORD dwTo;
-} MCI_RECORD_PARMS,*LPMCI_RECORD_PARMS;
-typedef struct tagMCI_VD_PLAY_PARMS {
- DWORD dwCallback;
- DWORD dwFrom;
- DWORD dwTo;
- DWORD dwSpeed;
-} MCI_VD_PLAY_PARMS,*PMCI_VD_PLAY_PARMS,*LPMCI_VD_PLAY_PARMS;
-typedef struct tagMCI_VD_STEP_PARMS {
- DWORD dwCallback;
- DWORD dwFrames;
-} MCI_VD_STEP_PARMS,*PMCI_VD_STEP_PARMS,*LPMCI_VD_STEP_PARMS;
-typedef struct tagMCI_VD_ESCAPE_PARMSA {
- DWORD dwCallback;
- LPCSTR lpstrCommand;
-} MCI_VD_ESCAPE_PARMSA,*PMCI_VD_ESCAPE_PARMSA,*LPMCI_VD_ESCAPE_PARMSA;
-typedef struct tagMCI_VD_ESCAPE_PARMSW {
- DWORD dwCallback;
- LPCWSTR lpstrCommand;
-} MCI_VD_ESCAPE_PARMSW,*PMCI_VD_ESCAPE_PARMSW,*LPMCI_VD_ESCAPE_PARMSW;
-typedef struct tagMCI_WAVE_OPEN_PARMSA {
- DWORD dwCallback;
- MCIDEVICEID wDeviceID;
- LPCSTR lpstrDeviceType;
- LPCSTR lpstrElementName;
- LPCSTR lpstrAlias;
- DWORD dwBufferSeconds;
-} MCI_WAVE_OPEN_PARMSA,*PMCI_WAVE_OPEN_PARMSA,*LPMCI_WAVE_OPEN_PARMSA;
-typedef struct tagMCI_WAVE_OPEN_PARMSW {
- DWORD dwCallback;
- MCIDEVICEID wDeviceID;
- LPCWSTR lpstrDeviceType;
- LPCWSTR lpstrElementName;
- LPCWSTR lpstrAlias;
- DWORD dwBufferSeconds;
-} MCI_WAVE_OPEN_PARMSW,*PMCI_WAVE_OPEN_PARMSW,*LPMCI_WAVE_OPEN_PARMSW;
-typedef struct tagMCI_WAVE_DELETE_PARMS {
- DWORD dwCallback;
- DWORD dwFrom;
- DWORD dwTo;
-} MCI_WAVE_DELETE_PARMS, *PMCI_WAVE_DELETE_PARMS,*LPMCI_WAVE_DELETE_PARMS;
-typedef struct tagMCI_WAVE_SET_PARMS {
- DWORD dwCallback;
- DWORD dwTimeFormat;
- DWORD dwAudio;
- UINT wInput;
- UINT wOutput;
- WORD wFormatTag;
- WORD wReserved2;
- WORD nChannels;
- WORD wReserved3;
- DWORD nSamplesPerSec;
- DWORD nAvgBytesPerSec;
- WORD nBlockAlign;
- WORD wReserved4;
- WORD wBitsPerSample;
- WORD wReserved5;
-} MCI_WAVE_SET_PARMS,*PMCI_WAVE_SET_PARMS,*LPMCI_WAVE_SET_PARMS;
-
-LRESULT WINAPI CloseDriver(HDRVR,LONG,LONG);
-HDRVR WINAPI OpenDriver(LPCWSTR,LPCWSTR,LONG);
-LRESULT WINAPI SendDriverMessage(HDRVR,UINT,LONG,LONG);
-HMODULE WINAPI DrvGetModuleHandle(HDRVR);
-HMODULE WINAPI GetDriverModuleHandle(HDRVR);
-LRESULT WINAPI DefDriverProc(DWORD,HDRVR,UINT,LPARAM,LPARAM);
-UINT WINAPI mmsystemGetVersion(void);
-#define OutputDebugStr OutputDebugString
-BOOL WINAPI sndPlaySoundA(LPCSTR,UINT);
-BOOL WINAPI sndPlaySoundW(LPCWSTR,UINT);
-BOOL WINAPI PlaySoundA(LPCSTR,HMODULE,DWORD);
-BOOL WINAPI PlaySoundW(LPCWSTR,HMODULE,DWORD);
-UINT WINAPI waveOutGetNumDevs(void);
-MMRESULT WINAPI waveOutGetDevCapsA(UINT,LPWAVEOUTCAPSA,UINT);
-MMRESULT WINAPI waveOutGetDevCapsW(UINT,LPWAVEOUTCAPSW,UINT);
-MMRESULT WINAPI waveOutGetVolume(HWAVEOUT,PDWORD);
-MMRESULT WINAPI waveOutSetVolume(HWAVEOUT,DWORD);
-MMRESULT WINAPI waveOutGetErrorTextA(MMRESULT,LPSTR,UINT);
-MMRESULT WINAPI waveOutGetErrorTextW(MMRESULT,LPWSTR,UINT);
-MMRESULT WINAPI waveOutOpen(LPHWAVEOUT,UINT,LPCWAVEFORMATEX,DWORD,DWORD,DWORD);
-MMRESULT WINAPI waveOutClose(HWAVEOUT);
-MMRESULT WINAPI waveOutPrepareHeader(HWAVEOUT,LPWAVEHDR,UINT);
-MMRESULT WINAPI waveOutUnprepareHeader(HWAVEOUT,LPWAVEHDR,UINT);
-MMRESULT WINAPI waveOutWrite(HWAVEOUT,LPWAVEHDR,UINT);
-MMRESULT WINAPI waveOutPause(HWAVEOUT);
-MMRESULT WINAPI waveOutRestart(HWAVEOUT);
-MMRESULT WINAPI waveOutReset(HWAVEOUT);
-MMRESULT WINAPI waveOutBreakLoop(HWAVEOUT);
-MMRESULT WINAPI waveOutGetPosition(HWAVEOUT,LPMMTIME,UINT);
-MMRESULT WINAPI waveOutGetPitch(HWAVEOUT,PDWORD);
-MMRESULT WINAPI waveOutSetPitch(HWAVEOUT,DWORD);
-MMRESULT WINAPI waveOutGetPlaybackRate(HWAVEOUT,PDWORD);
-MMRESULT WINAPI waveOutSetPlaybackRate(HWAVEOUT,DWORD);
-MMRESULT WINAPI waveOutGetID(HWAVEOUT,LPUINT);
-MMRESULT WINAPI waveOutMessage(HWAVEOUT,UINT,DWORD,DWORD);
-UINT WINAPI waveInGetNumDevs(void);
-MMRESULT WINAPI waveInGetDevCapsA(UINT,LPWAVEINCAPSA,UINT);
-MMRESULT WINAPI waveInGetDevCapsW(UINT,LPWAVEINCAPSW,UINT);
-MMRESULT WINAPI waveInGetErrorTextA(MMRESULT,LPSTR,UINT);
-MMRESULT WINAPI waveInGetErrorTextW(MMRESULT,LPWSTR,UINT);
-MMRESULT WINAPI waveInOpen(LPHWAVEIN,UINT,LPCWAVEFORMATEX,DWORD,DWORD,DWORD);
-MMRESULT WINAPI waveInClose(HWAVEIN);
-MMRESULT WINAPI waveInPrepareHeader(HWAVEIN,LPWAVEHDR,UINT);
-MMRESULT WINAPI waveInUnprepareHeader(HWAVEIN,LPWAVEHDR,UINT);
-MMRESULT WINAPI waveInAddBuffer(HWAVEIN,LPWAVEHDR,UINT);
-MMRESULT WINAPI waveInStart(HWAVEIN);
-MMRESULT WINAPI waveInStop(HWAVEIN);
-MMRESULT WINAPI waveInReset(HWAVEIN);
-MMRESULT WINAPI waveInGetPosition(HWAVEIN,LPMMTIME,UINT);
-MMRESULT WINAPI waveInGetID(HWAVEIN,LPUINT);
-MMRESULT WINAPI waveInMessage(HWAVEIN,UINT,DWORD,DWORD);
-UINT WINAPI midiOutGetNumDevs(void);
-MMRESULT WINAPI midiStreamOpen(LPHMIDISTRM,LPUINT,DWORD,DWORD,DWORD,DWORD);
-MMRESULT WINAPI midiStreamClose(HMIDISTRM);
-MMRESULT WINAPI midiStreamProperty(HMIDISTRM,LPBYTE,DWORD);
-MMRESULT WINAPI midiStreamPosition(HMIDISTRM,LPMMTIME,UINT);
-MMRESULT WINAPI midiStreamOut(HMIDISTRM,LPMIDIHDR,UINT);
-MMRESULT WINAPI midiStreamPause(HMIDISTRM);
-MMRESULT WINAPI midiStreamRestart(HMIDISTRM);
-MMRESULT WINAPI midiStreamStop(HMIDISTRM);
-MMRESULT WINAPI midiConnect(HMIDI,HMIDIOUT,PVOID);
-MMRESULT WINAPI midiDisconnect(HMIDI,HMIDIOUT,PVOID);
-MMRESULT WINAPI midiOutGetDevCapsA(UINT,LPMIDIOUTCAPSA,UINT);
-MMRESULT WINAPI midiOutGetDevCapsW(UINT,LPMIDIOUTCAPSW,UINT);
-MMRESULT WINAPI midiOutGetVolume(HMIDIOUT,PDWORD);
-MMRESULT WINAPI midiOutSetVolume(HMIDIOUT,DWORD);
-MMRESULT WINAPI midiOutGetErrorTextA(MMRESULT,LPSTR,UINT);
-MMRESULT WINAPI midiOutGetErrorTextW(MMRESULT,LPWSTR,UINT);
-MMRESULT WINAPI midiOutOpen(LPHMIDIOUT,UINT,DWORD,DWORD,DWORD);
-MMRESULT WINAPI midiOutClose(HMIDIOUT);
-MMRESULT WINAPI midiOutPrepareHeader(HMIDIOUT,LPMIDIHDR,UINT);
-MMRESULT WINAPI midiOutUnprepareHeader(HMIDIOUT,LPMIDIHDR,UINT);
-MMRESULT WINAPI midiOutShortMsg(HMIDIOUT,DWORD);
-MMRESULT WINAPI midiOutLongMsg(HMIDIOUT,LPMIDIHDR,UINT);
-MMRESULT WINAPI midiOutReset(HMIDIOUT);
-MMRESULT WINAPI midiOutCachePatches(HMIDIOUT,UINT,LPWORD,UINT);
-MMRESULT WINAPI midiOutCacheDrumPatches(HMIDIOUT,UINT,LPWORD,UINT);
-MMRESULT WINAPI midiOutGetID(HMIDIOUT,LPUINT);
-MMRESULT WINAPI midiOutMessage(HMIDIOUT,UINT,DWORD,DWORD);
-UINT WINAPI midiInGetNumDevs(void);
-MMRESULT WINAPI midiInGetDevCapsA(UINT,LPMIDIINCAPSA,UINT);
-MMRESULT WINAPI midiInGetDevCapsW(UINT,LPMIDIINCAPSW,UINT);
-MMRESULT WINAPI midiInGetErrorTextA(MMRESULT,LPSTR,UINT);
-MMRESULT WINAPI midiInGetErrorTextW(MMRESULT,LPWSTR,UINT);
-MMRESULT WINAPI midiInOpen(LPHMIDIIN,UINT,DWORD,DWORD,DWORD);
-MMRESULT WINAPI midiInClose(HMIDIIN);
-MMRESULT WINAPI midiInPrepareHeader(HMIDIIN,LPMIDIHDR,UINT);
-MMRESULT WINAPI midiInUnprepareHeader(HMIDIIN,LPMIDIHDR,UINT);
-MMRESULT WINAPI midiInAddBuffer(HMIDIIN,LPMIDIHDR,UINT);
-MMRESULT WINAPI midiInStart(HMIDIIN);
-MMRESULT WINAPI midiInStop(HMIDIIN);
-MMRESULT WINAPI midiInReset(HMIDIIN);
-MMRESULT WINAPI midiInGetID(HMIDIIN,LPUINT);
-MMRESULT WINAPI midiInMessage(HMIDIIN,UINT,DWORD,DWORD);
-UINT WINAPI auxGetNumDevs(void);
-MMRESULT WINAPI auxGetDevCapsA(UINT,LPAUXCAPSA,UINT);
-MMRESULT WINAPI auxGetDevCapsW(UINT,LPAUXCAPSW,UINT);
-MMRESULT WINAPI auxSetVolume(UINT,DWORD);
-MMRESULT WINAPI auxGetVolume(UINT,PDWORD);
-MMRESULT WINAPI auxOutMessage(UINT,UINT,DWORD,DWORD);
-UINT WINAPI mixerGetNumDevs(void);
-MMRESULT WINAPI mixerGetDevCapsA(UINT,LPMIXERCAPSA,UINT);
-MMRESULT WINAPI mixerGetDevCapsW(UINT,LPMIXERCAPSW,UINT);
-MMRESULT WINAPI mixerOpen(LPHMIXER,UINT,DWORD,DWORD,DWORD);
-MMRESULT WINAPI mixerClose(HMIXER);
-DWORD WINAPI mixerMessage(HMIXER,UINT,DWORD,DWORD);
-MMRESULT WINAPI mixerGetLineInfoA(HMIXEROBJ,LPMIXERLINEA,DWORD);
-MMRESULT WINAPI mixerGetLineInfoW(HMIXEROBJ,LPMIXERLINEW,DWORD);
-MMRESULT WINAPI mixerGetID(HMIXEROBJ,PUINT,DWORD);
-MMRESULT WINAPI mixerGetLineControlsA(HMIXEROBJ,LPMIXERLINECONTROLSA,DWORD);
-MMRESULT WINAPI mixerGetLineControlsW(HMIXEROBJ,LPMIXERLINECONTROLSW,DWORD);
-MMRESULT WINAPI mixerGetControlDetailsA(HMIXEROBJ,LPMIXERCONTROLDETAILS,DWORD);
-MMRESULT WINAPI mixerGetControlDetailsW(HMIXEROBJ,LPMIXERCONTROLDETAILS,DWORD);
-MMRESULT WINAPI mixerSetControlDetails(HMIXEROBJ,LPMIXERCONTROLDETAILS,DWORD);
-MMRESULT WINAPI timeGetSystemTime(LPMMTIME,UINT);
-DWORD WINAPI timeGetTime(void);
-MMRESULT WINAPI timeSetEvent(UINT,UINT,LPTIMECALLBACK,DWORD,UINT);
-MMRESULT WINAPI timeKillEvent(UINT);
-MMRESULT WINAPI timeGetDevCaps(LPTIMECAPS,UINT);
-MMRESULT WINAPI timeBeginPeriod(UINT);
-MMRESULT WINAPI timeEndPeriod(UINT);
-UINT WINAPI joyGetNumDevs(void);
-MMRESULT WINAPI joyGetDevCapsA(UINT,LPJOYCAPSA,UINT);
-MMRESULT WINAPI joyGetDevCapsW(UINT,LPJOYCAPSW,UINT);
-MMRESULT WINAPI joyGetPos(UINT,LPJOYINFO);
-MMRESULT WINAPI joyGetPosEx(UINT,LPJOYINFOEX);
-MMRESULT WINAPI joyGetThreshold(UINT,LPUINT);
-MMRESULT WINAPI joyReleaseCapture(UINT);
-MMRESULT WINAPI joySetCapture(HWND,UINT,UINT,BOOL);
-MMRESULT WINAPI joySetThreshold(UINT,UINT);
-FOURCC WINAPI mmioStringToFOURCCA(LPCSTR,UINT);
-FOURCC WINAPI mmioStringToFOURCCW(LPCWSTR,UINT);
-LPMMIOPROC WINAPI mmioInstallIOProcA(FOURCC,LPMMIOPROC,DWORD);
-LPMMIOPROC WINAPI mmioInstallIOProcW(FOURCC,LPMMIOPROC,DWORD);
-HMMIO WINAPI mmioOpenA(LPSTR,LPMMIOINFO,DWORD);
-HMMIO WINAPI mmioOpenW(LPWSTR,LPMMIOINFO,DWORD);
-MMRESULT WINAPI mmioRenameA(LPCSTR,LPCSTR,LPCMMIOINFO,DWORD);
-MMRESULT WINAPI mmioRenameW(LPCWSTR,LPCWSTR,LPCMMIOINFO,DWORD);
-MMRESULT WINAPI mmioClose(HMMIO,UINT);
-LONG WINAPI mmioRead(HMMIO,HPSTR,LONG);
-LONG WINAPI mmioWrite(HMMIO,LPCSTR,LONG);
-LONG WINAPI mmioSeek(HMMIO,LONG,int);
-MMRESULT WINAPI mmioGetInfo(HMMIO,LPMMIOINFO,UINT);
-MMRESULT WINAPI mmioSetInfo(HMMIO,LPCMMIOINFO,UINT);
-MMRESULT WINAPI mmioSetBuffer(HMMIO,LPSTR,LONG,UINT);
-MMRESULT WINAPI mmioFlush(HMMIO,UINT);
-MMRESULT WINAPI mmioAdvance(HMMIO,LPMMIOINFO,UINT);
-LRESULT WINAPI mmioSendMessage(HMMIO,UINT,LPARAM,LPARAM);
-MMRESULT WINAPI mmioDescend(HMMIO,LPMMCKINFO,const MMCKINFO*,UINT);
-MMRESULT WINAPI mmioAscend(HMMIO,LPMMCKINFO,UINT);
-MMRESULT WINAPI mmioCreateChunk(HMMIO,LPMMCKINFO,UINT);
-MCIERROR WINAPI mciSendCommandA(MCIDEVICEID,UINT,DWORD,DWORD);
-MCIERROR WINAPI mciSendCommandW(MCIDEVICEID,UINT,DWORD,DWORD);
-MCIERROR WINAPI mciSendStringA(LPCSTR,LPSTR,UINT,HWND);
-MCIERROR WINAPI mciSendStringW(LPCWSTR,LPWSTR,UINT,HWND);
-MCIDEVICEID WINAPI mciGetDeviceIDA(LPCSTR);
-MCIDEVICEID WINAPI mciGetDeviceIDW(LPCWSTR);
-MCIDEVICEID WINAPI mciGetDeviceIDFromElementIDA(DWORD,LPCSTR);
-MCIDEVICEID WINAPI mciGetDeviceIDFromElementIDW(DWORD,LPCWSTR);
-BOOL WINAPI mciGetErrorStringA(MCIERROR,LPSTR,UINT);
-BOOL WINAPI mciGetErrorStringW(MCIERROR,LPWSTR,UINT);
-BOOL WINAPI mciSetYieldProc(MCIDEVICEID,YIELDPROC,DWORD);
-HTASK WINAPI mciGetCreatorTask(MCIDEVICEID);
-YIELDPROC WINAPI mciGetYieldProc(MCIDEVICEID,PDWORD);
-
-typedef struct tagMCI_SEQ_SET_PARMS {
- DWORD dwCallback;
- DWORD dwTimeFormat;
- DWORD dwAudio;
- DWORD dwTempo;
- DWORD dwPort;
- DWORD dwSlave;
- DWORD dwMaster;
- DWORD dwOffset;
-} MCI_SEQ_SET_PARMS,*PMCI_SEQ_SET_PARMS,*LPMCI_SEQ_SET_PARMS;
-typedef struct tagMCI_ANIM_OPEN_PARMSA {
- DWORD dwCallback;
- MCIDEVICEID wDeviceID;
- LPCSTR lpstrDeviceType;
- LPCSTR lpstrElementName;
- LPCSTR lpstrAlias;
- DWORD dwStyle;
- HWND hWndParent;
-} MCI_ANIM_OPEN_PARMSA,*PMCI_ANIM_OPEN_PARMSA,*LPMCI_ANIM_OPEN_PARMSA;
-typedef struct tagMCI_ANIM_OPEN_PARMSW {
- DWORD dwCallback;
- MCIDEVICEID wDeviceID;
- LPCWSTR lpstrDeviceType;
- LPCWSTR lpstrElementName;
- LPCWSTR lpstrAlias;
- DWORD dwStyle;
- HWND hWndParent;
-} MCI_ANIM_OPEN_PARMSW,*PMCI_ANIM_OPEN_PARMSW,*LPMCI_ANIM_OPEN_PARMSW;
-typedef struct tagMCI_ANIM_PLAY_PARMS {
- DWORD dwCallback;
- DWORD dwFrom;
- DWORD dwTo;
- DWORD dwSpeed;
-} MCI_ANIM_PLAY_PARMS,*PMCI_ANIM_PLAY_PARMS,*LPMCI_ANIM_PLAY_PARMS;
-typedef struct tagMCI_ANIM_STEP_PARMS {
- DWORD dwCallback;
- DWORD dwFrames;
-} MCI_ANIM_STEP_PARMS,*PMCI_ANIM_STEP_PARMS,*LPMCI_ANIM_STEP_PARMS;
-typedef struct tagMCI_ANIM_WINDOW_PARMSA {
- DWORD dwCallback;
- HWND hWnd;
- UINT nCmdShow;
- LPCSTR lpstrText;
-} MCI_ANIM_WINDOW_PARMSA,*PMCI_ANIM_WINDOW_PARMSA,*LPMCI_ANIM_WINDOW_PARMSA;
-typedef struct tagMCI_ANIM_WINDOW_PARMSW {
- DWORD dwCallback;
- HWND hWnd;
- UINT nCmdShow;
- LPCWSTR lpstrText;
-} MCI_ANIM_WINDOW_PARMSW,*PMCI_ANIM_WINDOW_PARMSW,*LPMCI_ANIM_WINDOW_PARMSW;
-typedef struct tagMCI_ANIM_RECT_PARMS {
- DWORD dwCallback;
-#ifdef MCI_USE_OFFEXT
- POINT ptOffset;
- POINT ptExtent;
-#else
- RECT rc;
-#endif
-} MCI_ANIM_RECT_PARMS,*PMCI_ANIM_RECT_PARMS,*LPMCI_ANIM_RECT_PARMS;
-typedef struct tagMCI_ANIM_UPDATE_PARMS {
- DWORD dwCallback;
- RECT rc;
- HDC hDC;
-} MCI_ANIM_UPDATE_PARMS,*PMCI_ANIM_UPDATE_PARMS,*LPMCI_ANIM_UPDATE_PARMS;
-typedef struct tagMCI_OVLY_OPEN_PARMSA {
- DWORD dwCallback;
- MCIDEVICEID wDeviceID;
- LPCSTR lpstrDeviceType;
- LPCSTR lpstrElementName;
- LPCSTR lpstrAlias;
- DWORD dwStyle;
- HWND hWndParent;
-} MCI_OVLY_OPEN_PARMSA,*PMCI_OVLY_OPEN_PARMSA,*LPMCI_OVLY_OPEN_PARMSA;
-typedef struct tagMCI_OVLY_OPEN_PARMSW {
- DWORD dwCallback;
- MCIDEVICEID wDeviceID;
- LPCWSTR lpstrDeviceType;
- LPCWSTR lpstrElementName;
- LPCWSTR lpstrAlias;
- DWORD dwStyle;
- HWND hWndParent;
-} MCI_OVLY_OPEN_PARMSW,*PMCI_OVLY_OPEN_PARMSW,*LPMCI_OVLY_OPEN_PARMSW;
-typedef struct tagMCI_OVLY_WINDOW_PARMSA {
- DWORD dwCallback;
- HWND hWnd;
- UINT nCmdShow;
- LPCSTR lpstrText;
-} MCI_OVLY_WINDOW_PARMSA,*PMCI_OVLY_WINDOW_PARMSA,*LPMCI_OVLY_WINDOW_PARMSA;
-typedef struct tagMCI_OVLY_WINDOW_PARMSW {
- DWORD dwCallback;
- HWND hWnd;
- UINT nCmdShow;
- LPCWSTR lpstrText;
-} MCI_OVLY_WINDOW_PARMSW,*PMCI_OVLY_WINDOW_PARMSW,*LPMCI_OVLY_WINDOW_PARMSW;
-typedef struct tagMCI_OVLY_RECT_PARMS {
- DWORD dwCallback;
-#ifdef MCI_USE_OFFEXT
- POINT ptOffset;
- POINT ptExtent;
-#else
- RECT rc;
-#endif
-} MCI_OVLY_RECT_PARMS,*PMCI_OVLY_RECT_PARMS,*LPMCI_OVLY_RECT_PARMS;
-typedef struct tagMCI_OVLY_SAVE_PARMSA {
- DWORD dwCallback;
- LPCSTR lpfilename;
- RECT rc;
-} MCI_OVLY_SAVE_PARMSA,*PMCI_OVLY_SAVE_PARMSA,*LPMCI_OVLY_SAVE_PARMSA;
-typedef struct tagMCI_OVLY_SAVE_PARMSW {
- DWORD dwCallback;
- LPCWSTR lpfilename;
- RECT rc;
-} MCI_OVLY_SAVE_PARMSW,*PMCI_OVLY_SAVE_PARMSW,*LPMCI_OVLY_SAVE_PARMSW;
-typedef struct tagMCI_OVLY_LOAD_PARMSA {
- DWORD dwCallback;
- LPCSTR lpfilename;
- RECT rc;
-} MCI_OVLY_LOAD_PARMSA,*PMCI_OVLY_LOAD_PARMSA,*LPMCI_OVLY_LOAD_PARMSA;
-typedef struct tagMCI_OVLY_LOAD_PARMSW {
- DWORD dwCallback;
- LPCWSTR lpfilename;
- RECT rc;
-} MCI_OVLY_LOAD_PARMSW,*PMCI_OVLY_LOAD_PARMSW,*LPMCI_OVLY_LOAD_PARMSW;
-
-#ifdef UNICODE
-typedef WAVEOUTCAPSW WAVEOUTCAPS,*PWAVEOUTCAPS,*LPWAVEOUTCAPS;
-typedef WAVEINCAPSW WAVEINCAPS,*PWAVEINCAPS,*LPWAVEINCAPS;
-typedef MIDIOUTCAPSW MIDIOUTCAPS,*PMIDIOUTCAPS,*LPMIDIOUTCAPS;
-typedef MIDIINCAPSW MIDIINCAPS,*PMIDIINCAPS,*LPMIDIINCAPS;
-typedef AUXCAPSW AUXCAPS,*PAUXCAPS,*LPAUXCAPS;
-typedef MIXERCAPSW MIXERCAPS,*PMIXERCAPS,*LPMIXERCAPS;
-typedef MIXERLINEW MIXERLINE,*PMIXERLINE,*LPMIXERLINE;
-typedef MIXERCONTROLW MIXERCONTROL,*PMIXERCONTROL,*LPMIXERCONTROL;
-typedef MIXERLINECONTROLSW MIXERLINECONTROLS,*PMIXERLINECONTROLS,*LPMIXERLINECONTROLS;
-typedef MIXERCONTROLDETAILS_LISTTEXTW MIXERCONTROLDETAILS_LISTTEXT,*PMIXERCONTROLDETAILS_LISTTEXT,*LPMIXERCONTROLDETAILS_LISTTEXT;
-typedef JOYCAPSW JOYCAPS,*PJOYCAPS,*LPJOYCAPS;
-typedef MCI_OPEN_PARMSW MCI_OPEN_PARMS,*PMCI_OPEN_PARMS,*LPMCI_OPEN_PARMS;
-typedef MCI_INFO_PARMSW MCI_INFO_PARMS,*LPMCI_INFO_PARMS;
-typedef MCI_SYSINFO_PARMSW MCI_SYSINFO_PARMS,*PMCI_SYSINFO_PARMS,*LPMCI_SYSINFO_PARMS;
-typedef MCI_SAVE_PARMSW MCI_SAVE_PARMS,*PMCI_SAVE_PARMS,*LPMCI_SAVE_PARMS;
-typedef MCI_LOAD_PARMSW MCI_LOAD_PARMS,*PMCI_LOAD_PARMS,*LPMCI_LOAD_PARMS;
-typedef MCI_VD_ESCAPE_PARMSW MCI_VD_ESCAPE_PARMS,*PMCI_VD_ESCAPE_PARMS,*LPMCI_VD_ESCAPE_PARMS;
-typedef MCI_WAVE_OPEN_PARMSW MCI_WAVE_OPEN_PARMS,*PMCI_WAVE_OPEN_PARMS,*LPMCI_WAVE_OPEN_PARMS;
-typedef MCI_ANIM_OPEN_PARMSW MCI_ANIM_OPEN_PARMS,*PMCI_ANIM_OPEN_PARMS,*LPMCI_ANIM_OPEN_PARMS;
-typedef MCI_ANIM_WINDOW_PARMSW MCI_ANIM_WINDOW_PARMS,*PMCI_ANIM_WINDOW_PARMS,*LPMCI_ANIM_WINDOW_PARMS;
-typedef MCI_OVLY_OPEN_PARMSW MCI_OVLY_OPEN_PARMS,*PMCI_OVLY_OPEN_PARMS,*LPMCI_OVLY_OPEN_PARMS;
-typedef MCI_OVLY_WINDOW_PARMSW MCI_OVLY_WINDOW_PARMS,*PMCI_OVLY_WINDOW_PARMS,*LPMCI_OVLY_WINDOW_PARMS;
-typedef MCI_OVLY_SAVE_PARMSW MCI_OVLY_SAVE_PARMS,*PMCI_OVLY_SAVE_PARMS,*LPMCI_OVLY_SAVE_PARMS;
-#define sndPlaySound sndPlaySoundW
-#define PlaySound PlaySoundW
-#define waveOutGetDevCaps waveOutGetDevCapsW
-#define waveOutGetErrorText waveOutGetErrorTextW
-#define waveInGetDevCaps waveInGetDevCapsW
-#define waveInGetErrorText waveInGetErrorTextW
-#define midiOutGetDevCaps midiOutGetDevCapsW
-#define midiOutGetErrorText midiOutGetErrorTextW
-#define midiInGetDevCaps midiInGetDevCapsW
-#define midiInGetErrorText midiInGetErrorTextW
-#define auxGetDevCaps auxGetDevCapsW
-#define mixerGetDevCaps mixerGetDevCapsW
-#define mixerGetLineInfo mixerGetLineInfoW
-#define mixerGetLineControls mixerGetLineControlsW
-#define mixerGetControlDetails mixerGetControlDetailsW
-#define joyGetDevCaps joyGetDevCapsW
-#define mmioInstallIOProc mmioInstallIOProcW
-#define mmioStringToFOURCC mmioStringToFOURCCW
-#define mmioOpen mmioOpenW
-#define mmioRename mmioRenameW
-#define mciSendCommand mciSendCommandW
-#define mciSendString mciSendStringW
-#define mciGetDeviceID mciGetDeviceIDW
-#define mciGetDeviceIDFromElementID mciGetDeviceIDFromElementIDW
-#define mciGetErrorString mciGetErrorStringW
-#else
-typedef WAVEOUTCAPSA WAVEOUTCAPS,*PWAVEOUTCAPS,*LPWAVEOUTCAPS;
-typedef WAVEINCAPSA WAVEINCAPS,*PWAVEINCAPS,*LPWAVEINCAPS;
-typedef MIDIOUTCAPSA MIDIOUTCAPS,*PMIDIOUTCAPS,*LPMIDIOUTCAPS;
-typedef MIDIINCAPSA MIDIINCAPS,*PMIDIINCAPS,*LPMIDIINCAPS;
-typedef AUXCAPSA AUXCAPS,*PAUXCAPS,*LPAUXCAPS;
-typedef MIXERCAPSA MIXERCAPS,*PMIXERCAPS,*LPMIXERCAPS;
-typedef MIXERLINEA MIXERLINE,*PMIXERLINE,*LPMIXERLINE;
-typedef MIXERCONTROLA MIXERCONTROL,*PMIXERCONTROL,*LPMIXERCONTROL;
-typedef MIXERLINECONTROLSA MIXERLINECONTROLS,*PMIXERLINECONTROLS,*LPMIXERLINECONTROLS;
-typedef MIXERCONTROLDETAILS_LISTTEXTA MIXERCONTROLDETAILS_LISTTEXT,*PMIXERCONTROLDETAILS_LISTTEXT,*LPMIXERCONTROLDETAILS_LISTTEXT;
-typedef JOYCAPSA JOYCAPS,*PJOYCAPS,*LPJOYCAPS;
-typedef MCI_OPEN_PARMSA MCI_OPEN_PARMS,*PMCI_OPEN_PARMS,*LPMCI_OPEN_PARMS;
-typedef MCI_INFO_PARMSA MCI_INFO_PARMS,*LPMCI_INFO_PARMS;
-typedef MCI_SYSINFO_PARMSA MCI_SYSINFO_PARMS,*PMCI_SYSINFO_PARMS,*LPMCI_SYSINFO_PARMS;
-typedef MCI_SAVE_PARMSA MCI_SAVE_PARMS,*PMCI_SAVE_PARMS,*LPMCI_SAVE_PARMS;
-typedef MCI_LOAD_PARMSA MCI_LOAD_PARMS,*PMCI_LOAD_PARMS,*LPMCI_LOAD_PARMS;
-typedef MCI_VD_ESCAPE_PARMSA MCI_VD_ESCAPE_PARMS,*PMCI_VD_ESCAPE_PARMS,*LPMCI_VD_ESCAPE_PARMS;
-typedef MCI_WAVE_OPEN_PARMSA MCI_WAVE_OPEN_PARMS,*PMCI_WAVE_OPEN_PARMS,*LPMCI_WAVE_OPEN_PARMS;
-typedef MCI_ANIM_OPEN_PARMSA MCI_ANIM_OPEN_PARMS,*PMCI_ANIM_OPEN_PARMS,*LPMCI_ANIM_OPEN_PARMS;
-typedef MCI_ANIM_WINDOW_PARMSA MCI_ANIM_WINDOW_PARMS,*PMCI_ANIM_WINDOW_PARMS,*LPMCI_ANIM_WINDOW_PARMS;
-typedef MCI_OVLY_OPEN_PARMSA MCI_OVLY_OPEN_PARMS,*PMCI_OVLY_OPEN_PARMS,*LPMCI_OVLY_OPEN_PARMS;
-typedef MCI_OVLY_WINDOW_PARMSA MCI_OVLY_WINDOW_PARMS,*PMCI_OVLY_WINDOW_PARMS,*LPMCI_OVLY_WINDOW_PARMS;
-typedef MCI_OVLY_SAVE_PARMSA MCI_OVLY_SAVE_PARMS,*PMCI_OVLY_SAVE_PARMS,*LPMCI_OVLY_SAVE_PARMS;
-#define sndPlaySound sndPlaySoundA
-#define PlaySound PlaySoundA
-#define waveOutGetDevCaps waveOutGetDevCapsA
-#define waveOutGetErrorText waveOutGetErrorTextA
-#define waveInGetDevCaps waveInGetDevCapsA
-#define waveInGetErrorText waveInGetErrorTextA
-#define midiOutGetDevCaps midiOutGetDevCapsA
-#define midiOutGetErrorText midiOutGetErrorTextA
-#define midiInGetDevCaps midiInGetDevCapsA
-#define midiInGetErrorText midiInGetErrorTextA
-#define auxGetDevCaps auxGetDevCapsA
-#define mixerGetDevCaps mixerGetDevCapsA
-#define mixerGetLineInfo mixerGetLineInfoA
-#define mixerGetLineControls mixerGetLineControlsA
-#define mixerGetControlDetails mixerGetControlDetailsA
-#define joyGetDevCaps joyGetDevCapsA
-#define mmioInstallIOProc mmioInstallIOProcA
-#define mmioStringToFOURCC mmioStringToFOURCCA
-#define mmioOpen mmioOpenA
-#define mmioRename mmioRenameA
-#define mciSendCommand mciSendCommandA
-#define mciSendString mciSendStringA
-#define mciGetDeviceID mciGetDeviceIDA
-#define mciGetDeviceIDFromElementID mciGetDeviceIDFromElementIDA
-#define mciGetErrorString mciGetErrorStringA
-#endif
-#ifdef __cplusplus
-}
-#endif
-#pragma pack(pop)
-#endif
diff --git a/winsup/w32api/include/mpegtype.h b/winsup/w32api/include/mpegtype.h
deleted file mode 100644
index 9d8a218..0000000
--- a/winsup/w32api/include/mpegtype.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef _MPEGTYPE_H
-#define _MPEGTYPE_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#include <strmif.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- DirectShow Reference - DirectShow Structures */
-typedef struct tagAM_MPEGSTREAMTYPE {
- DWORD dwStreamID;
- DWORD dwReserved;
- AM_MEDIA_TYPE mt;
- BYTE bFormat[1];
-} AM_MPEGSTREAMTYPE;
-typedef struct tagAM_MPEGSYSTEMTYPE {
- DWORD dwBitRate;
- DWORD cStreams;
- AM_MPEGSTREAMTYPE Streams[1];
-} AM_MPEGSYSTEMTYPE;
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/mprapi.h b/winsup/w32api/include/mprapi.h
deleted file mode 100644
index 0145264..0000000
--- a/winsup/w32api/include/mprapi.h
+++ /dev/null
@@ -1,576 +0,0 @@
-/*
- * mprapi.h - Routing and Remote Access Services
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may use,
- * modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-#ifndef _MPRAPI_H
-#define _MPRAPI_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#include <ras.h>
-#include <lmcons.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if (_WIN32_WINNT >= 0x0500)
-/*--- Router Management Reference - Router Management Enumerated Types */
-typedef enum _ROUTER_CONNECTION_STATE {
- ROUTER_IF_STATE_UNREACHABLE,
- ROUTER_IF_STATE_DISCONNECTED,
- ROUTER_IF_STATE_CONNECTING,
- ROUTER_IF_STATE_CONNECTED
-} ROUTER_CONNECTION_STATE;
-typedef enum _ROUTER_INTERFACE_TYPE {
- ROUTER_IF_TYPE_CLIENT,
- ROUTER_IF_TYPE_HOME_ROUTER,
- ROUTER_IF_TYPE_FULL_ROUTER,
- ROUTER_IF_TYPE_DEDICATED,
- ROUTER_IF_TYPE_INTERNAL,
- ROUTER_IF_TYPE_LOOPBACK,
- ROUTER_IF_TYPE_TUNNEL1,
- ROUTER_IF_TYPE_DIALOUT
-} ROUTER_INTERFACE_TYPE;
-#define MPR_INTERFACE_ADMIN_DISABLED 0x00000002
-#define MPR_INTERFACE_CONNECTION_FAILURE 0x00000004
-#define MPR_INTERFACE_DIALOUT_HOURS_RESTRICTION 0x00000010
-#define MPR_INTERFACE_OUT_OF_RESOURCES 0x00000001
-#define MPR_INTERFACE_SERVICE_PAUSED 0x00000008
-#define MPR_INTERFACE_NO_MEDIA_SENSE 0x00000020
-#define MPR_INTERFACE_NO_DEVICE 0x00000040
-/*--- Router Management MIB Reference - Transport and Protocol Constants */
-#define PID_ATALK 0x00000029
-#define PID_IP 0x00000021
-#define PID_IPX 0x0000002B
-#define PID_NBF 0x0000003F
-/*--- Remote Access Service Administration Reference - RAS Administration Enumerated Types */
-typedef enum _RAS_HARDWARE_CONDITION {
- RAS_HARDWARE_OPERATIONAL,
- RAS_HARDWARE_FAILURE
-} RAS_HARDWARE_CONDITION;
-typedef enum _RAS_PORT_CONDITION {
- RAS_PORT_NON_OPERATIONAL,
- RAS_PORT_DISCONNECTED,
- RAS_PORT_CALLING_BACK,
- RAS_PORT_LISTENING,
- RAS_PORT_AUTHENTICATING,
- RAS_PORT_AUTHENTICATED,
- RAS_PORT_INITIALIZING
-} RAS_PORT_CONDITION;
-/*--- Remote Access Service Administration Reference - RAS Administration Structures */
-#define ATADDRESSLEN 32
-typedef struct _PPP_ATCP_INFO {
- DWORD dwError;
- WCHAR wszAddress[ATADDRESSLEN+1];
-} PPP_ATCP_INFO;
-typedef struct _PPP_CCP_INFO {
- DWORD dwError;
- DWORD dwCompressionAlgorithm;
- DWORD dwOptions;
- DWORD dwRemoteCompressionAlgorithm;
- DWORD dwRemoteOptions;
-} PPP_CCP_INFO;
-#define RASCCPCA_STAC 0x00000005
-#define RASCCPCA_MPPC 0x00000006
-#define PPP_CCP_COMPRESSION 0x00000001
-#define PPP_CCP_ENCRYPTION40BITOLD 0x00000010
-#define PPP_CCP_ENCRYPTION40BIT 0x00000020
-#define PPP_CCP_ENCRYPTION128BIT 0x00000040
-#define PPP_CCP_ENCRYPTION56BIT 0x00000080
-#define PPP_CCP_HISTORYLESS 0x01000000
-#define IPADDRESSLEN 15
-typedef struct _PPP_IPCP_INFO {
- DWORD dwError;
- WCHAR wszAddress[IPADDRESSLEN+1];
- WCHAR wszRemoteAddress[IPADDRESSLEN+1];
-} PPP_IPCP_INFO;
-typedef struct _PPP_IPCP_INFO2 {
- DWORD dwError;
- WCHAR wszAddress[IPADDRESSLEN+1];
- WCHAR wszRemoteAddress[IPADDRESSLEN+1];
- DWORD dwOptions;
- DWORD dwRemoteOptons;
-} PPP_IPCP_INFO2;
-#define IPXADDRESSLEN 22
-typedef struct _PPP_IPXCP_INFO {
- DWORD dwError;
- WCHAR wszAddress[IPXADDRESSLEN+1];
-} PPP_IPXCP_INFO;
-typedef struct _PPP_LCP_INFO {
- DWORD dwError;
- DWORD dwAuthenticationProtocol;
- DWORD dwAuthenticationData;
- DWORD dwRemoteAuthenticationProtocol;
- DWORD dwRemoteAuthenticationData;
- DWORD dwTerminateReason;
- DWORD dwRemoteTerminateReason;
- DWORD dwOptions;
- DWORD dwRemoteOptions;
- DWORD dwEapTypeId;
- DWORD dwRemoteEapTypeId;
-} PPP_LCP_INFO;
-#define PPP_LCP_PAP 0x0000C023
-#define PPP_LCP_SPAP 0x0000C027
-#define PPP_LCP_CHAP 0x0000C223
-#define PPP_LCP_EAP 0x0000C227
-#define PPP_LCP_CHAP_MD5 0x00000005
-#define PPP_LCP_CHAP_MS 0x00000080
-#define PPP_LCP_CHAP_MSV2 0x00000081
-#define PPP_LCP_MULTILINK_FRAMING 0x00000001
-typedef struct _PPP_NBFCP_INFO {
- DWORD dwError;
- WCHAR wszWksta[NETBIOS_NAME_LEN+1];
-} PPP_NBFCP_INFO;
-typedef struct _PPP_INFO {
- PPP_NBFCP_INFO nbf;
- PPP_IPCP_INFO ip;
- PPP_IPXCP_INFO ipx;
- PPP_ATCP_INFO at;
-} PPP_INFO;
-typedef struct _PPP_INFO_2 {
- PPP_NBFCP_INFO nbf;
- PPP_IPCP_INFO2 ip;
- PPP_IPXCP_INFO ipx;
- PPP_ATCP_INFO at;
- PPP_CCP_INFO ccp;
- PPP_LCP_INFO lcp;
-} PPP_INFO_2;
-#define MAX_INTERFACE_NAME_LEN 256
-typedef struct _RAS_CONNECTION_0 {
- HANDLE hConnection;
- HANDLE hInterface;
- DWORD dwConnectDuration;
- ROUTER_INTERFACE_TYPE dwInterfaceType;
- DWORD dwConnectionFlags;
- WCHAR wszInterfaceName[MAX_INTERFACE_NAME_LEN+1];
- WCHAR wszUserName[UNLEN+1];
- WCHAR wszLogonDomain[DNLEN+1];
- WCHAR wszRemoteComputer[NETBIOS_NAME_LEN+1];
-} RAS_CONNECTION_0,*PRAS_CONNECTION_0;
-#define RAS_FLAGS_PPP_CONNECTION 0x00000001
-#define RAS_FLAGS_MESSENGER_PRESENT 0x00000002
-#define RAS_FLAGS_RAS_CONNECTION 0x00000004
-#define RAS_FLAGS_QUARANTINE_PRESENT 0x00000008
-typedef struct RAS_CONNECTION_1 {
- HANDLE hConnection;
- HANDLE hInterface;
- PPP_INFO PppInfo;
- DWORD dwBytesXmited;
- DWORD dwBytesRcved;
- DWORD dwFramesXmited;
- DWORD dwFramesRcved;
- DWORD dwCrcErr;
- DWORD dwTimeoutErr;
- DWORD dwAlignmentErr;
- DWORD dwHardwareOverrunErr;
- DWORD dwFramingErr;
- DWORD dwBufferOverrunErr;
- DWORD dwCompressionRatioIn;
- DWORD dwCompressionRatioOut;
-} RAS_CONNECTION_1,*PRAS_CONNECTION_1;
-typedef struct _RAS_CONNECTION_2 {
- HANDLE hConnection;
- WCHAR wszUserName[UNLEN+1];
- ROUTER_INTERFACE_TYPE dwInterfaceType;
- GUID guid;
- PPP_INFO_2 PppInfo2;
-} RAS_CONNECTION_2,*PRAS_CONNECTION_2;
-#define MAX_PORT_NAME 16
-#define MAX_MEDIA_NAME 16
-#define MAX_DEVICE_NAME 128
-#define MAX_DEVICETYPE_NAME 16
-typedef struct _RAS_PORT_0 {
- HANDLE hPort;
- HANDLE hConnection;
- RAS_PORT_CONDITION dwPortCondition;
- DWORD dwTotalNumberOfCalls;
- DWORD dwConnectDuration;
- WCHAR wszPortName[MAX_PORT_NAME+1];
- WCHAR wszMediaName[MAX_MEDIA_NAME+1];
- WCHAR wszDeviceName[MAX_DEVICE_NAME+1];
- WCHAR wszDeviceType[MAX_DEVICETYPE_NAME+1];
-} RAS_PORT_0,*PRAS_PORT_0;
-typedef struct _RAS_PORT_1 {
- HANDLE hPort;
- HANDLE hConnection;
- RAS_HARDWARE_CONDITION dwHardwareCondition;
- DWORD dwLineSpeed;
- DWORD dwBytesXmited;
- DWORD dwBytesRcved;
- DWORD dwFramesXmited;
- DWORD dwFramesRcved;
- DWORD dwCrcErr;
- DWORD dwTimeoutErr;
- DWORD dwAlignmentErr;
- DWORD dwHardwareOverrunErr;
- DWORD dwFramingErr;
- DWORD dwBufferOverrunErr;
- DWORD dwCompressionRatioIn;
- DWORD dwCompressionRatioOut;
-} RAS_PORT_1,*PRAS_PORT_1;
-#define MAX_PHONE_NUMBER_LEN 128
-typedef struct _RAS_USER_0 {
- BYTE bfPrivilege;
- WCHAR wszPhoneNumber[MAX_PHONE_NUMBER_LEN+1];
-} RAS_USER_0,*PRAS_USER_0;
-#define RASPRIV_NoCallback 0x01
-#define RASPRIV_AdminSetCallback 0x02
-#define RASPRIV_CallerSetCallback 0x04
-#define RASPRIV_DialinPrivilege 0x08
-#define RASPRIV_CallbackType 0x07
-typedef struct _RAS_USER_1 {
- BYTE bfPrivilege;
- WCHAR wszPhoneNumber[MAX_PHONE_NUMBER_LEN+1];
- BYTE bfPrivilege2;
-} RAS_USER_1,*PRAS_USER_1;
-#define RASPRIV2_DialinPolicy 0x01
-/*--- Router Management Reference - Router Management Structures */
-typedef struct _MPR_CREDENTIALSEX_0 {
- DWORD dwSize;
- LPBYTE lpbCredentialsInfo;
-} MPR_CREDENTIALSEX_0,*PMPR_CREDENTIALSEX_0;
-#if (_WIN32_WINNT >= 0x0502)
-typedef struct _MPR_CREDENTIALSEX_1 {
- DWORD dwSize;
- LPBYTE lpbCredentialsInfo;
-} MPR_CREDENTIALSEX_1,*PMPR_CREDENTIALSEX_1;
-#endif
-#define MPR_MaxDeviceType RAS_MaxDeviceType
-#define MPR_MaxDeviceName RAS_MaxDeviceName
-#define MPR_MaxPadType RAS_MaxPadType
-#define MPR_MaxX25Address RAS_MaxX25Address
-#define MPR_MaxFacilities RAS_MaxFacilities
-#define MPR_MaxUserData RAS_MaxUserData
-#define MPR_MaxPhoneNumber RAS_MaxPhoneNumber
-typedef struct _MPR_DEVICE_0 {
- WCHAR szDeviceType[MPR_MaxDeviceType+1];
- WCHAR szDeviceName[MPR_MaxDeviceName+1];
-} MPR_DEVICE_0,*PMPR_DEVICE_0;
-typedef struct _MPR_DEVICE_1 {
- WCHAR szDeviceType[MPR_MaxDeviceType+1];
- WCHAR szDeviceName[MPR_MaxDeviceName+1];
- WCHAR szLocalPhoneNumber[MPR_MaxPhoneNumber+1];
- PWCHAR szAlternates;
-} MPR_DEVICE_1,*PMPR_DEVICE_1;
-#define MAX_TRANSPORT_NAME_LEN 40
-typedef struct _MPR_IFTRANSPORT_0 {
- DWORD dwTransportId;
- HANDLE hIfTransport;
- WCHAR wszIfTransportName[MAX_TRANSPORT_NAME_LEN+1];
-} MPR_IFTRANSPORT_0,*PMPR_IFTRANSPORT_0;
-typedef struct _MPR_INTERFACE_0 {
- WCHAR wszInterfaceName[MAX_INTERFACE_NAME_LEN+1];
- HANDLE hInterface;
- BOOL fEnabled;
- ROUTER_INTERFACE_TYPE dwIfType;
- ROUTER_CONNECTION_STATE dwConnectionState;
- DWORD fUnReachabilityReasons;
- DWORD dwLastError;
-} MPR_INTERFACE_0,*PMPR_INTERFACE_0;
-typedef struct _MPR_INTERFACE_1 {
- WCHAR wszInterfaceName[MAX_INTERFACE_NAME_LEN+1];
- HANDLE hInterface;
- BOOL fEnabled;
- ROUTER_INTERFACE_TYPE IfType;
- ROUTER_CONNECTION_STATE dwConnectionState;
- DWORD fUnReachabilityReasons;
- DWORD dwLastError;
- LPWSTR lpwsDialoutHoursRestriction;
-} MPR_INTERFACE_1,*PMPR_INTERFACE_1;
-typedef struct _MPR_INTERFACE_2 {
- WCHAR wszInterfaceName[MAX_INTERFACE_NAME_LEN+1];
- HANDLE hInterface;
- BOOL fEnabled;
- ROUTER_INTERFACE_TYPE dwIfType;
- ROUTER_CONNECTION_STATE dwConnectionState;
- DWORD fUnReachabilityReasons;
- DWORD dwLastError;
- DWORD dwfOptions;
- WCHAR szLocalPhoneNumber[RAS_MaxPhoneNumber+1];
- PWCHAR szAlternates;
- DWORD ipaddr;
- DWORD ipaddrDns;
- DWORD ipaddrDnsAlt;
- DWORD ipaddrWins;
- DWORD ipaddrWinsAlt;
- DWORD dwfNetProtocols;
- WCHAR szDeviceType[MPR_MaxDeviceType+1];
- WCHAR szDeviceName[MPR_MaxDeviceName+1];
- WCHAR szX25PadType[MPR_MaxPadType+1];
- WCHAR szX25Address[MPR_MaxX25Address+1];
- WCHAR szX25Facilities[MPR_MaxFacilities+1];
- WCHAR szX25UserData[MPR_MaxUserData+1];
- DWORD dwChannels;
- DWORD dwSubEntries;
- DWORD dwDialMode;
- DWORD dwDialExtraPercent;
- DWORD dwDialExtraSampleSeconds;
- DWORD dwHangUpExtraPercent;
- DWORD dwHangUpExtraSampleSeconds;
- DWORD dwIdleDisconnectSeconds;
- DWORD dwType;
- DWORD dwEncryptionType;
- DWORD dwCustomAuthKey;
- DWORD dwCustomAuthDataSize;
- LPBYTE lpbCustomAuthData;
- GUID guidId;
- DWORD dwVpnStrategy;
-} MPR_INTERFACE_2,*PMPR_INTERFACE_2;
-#define MPRIO_SpecificIpAddr RASEO_SpecificIpAddr
-#define MPRIO_SpecificNameServers RASEO_SpecificNameServers
-#define MPRIO_IpHeaderCompression RASEO_IpHeaderCompression
-#define MPRIO_RemoteDefaultGateway RASEO_RemoteDefaultGateway
-#define MPRIO_DisableLcpExtensions RASEO_DisableLcpExtensions
-#define MPRIO_SwCompression RASEO_SwCompression
-#define MPRIO_RequireEncryptedPw RASEO_RequireEncryptedPw
-#define MPRIO_RequireMsEncryptedPw RASEO_RequireMsEncryptedPw
-#define MPRIO_RequireDataEncryption RASEO_RequireDataEncryption
-#define MPRIO_NetworkLogon RASEO_NetworkLogon
-#define MPRIO_UseLogonCredentials RASEO_UseLogonCredentials
-#define MPRIO_PromoteAlternates RASEO_PromoteAlternates
-#define MPRIO_SecureLocalFiles RASEO_SecureLocalFiles
-#define MPRIO_RequireEAP RASEO_RequireEAP
-#define MPRIO_RequirePAP RASEO_RequirePAP
-#define MPRIO_RequireSPAP RASEO_RequireSPAP
-#define MPRIO_SharedPhoneNumbers RASEO_SharedPhoneNumbers
-#define MPRIO_RequireCHAP RASEO_RequireCHAP
-#define MPRIO_RequireMsCHAP RASEO_RequireMsCHAP
-#define MPRIO_RequireMsCHAP2 RASEO_RequireMsCHAP2
-#define MPRNP_Ipx RASNP_Ipx
-#define MPRNP_Ip RASNP_Ip
-#define MPRDT_Modem RASDT_Modem
-#define MPRDT_Isdn RASDT_Isdn
-#define MPRDT_X25 RASDT_X25
-#define MPRDT_Vpn RASDT_Vpn
-#define MPRDT_Pad RASDT_Pad
-#define MPRDT_Generic RASDT_Generic
-#define MPRDT_Serial RASDT_Serial
-#define MPRDT_FrameRelay RASDT_FrameRelay
-#define MPRDT_Atm RASDT_Atm
-#define MPRDT_Sonet RASDT_Sonet
-#define MPRDT_SW56 RASDT_SW56
-#define MPRDT_Irda RASDT_Irda
-#define MPRDT_Parallel RASDT_Parallel
-#define MPRDM_DialAll RASEDM_DialAll
-#define MPRDM_DialAsNeeded RASEDM_DialAsNeeded
-#define MPRIDS_Disabled RASIDS_Disabled
-#define MPRIDS_UseGlobalValue RASIDS_UseGlobalValue
-#define MPRET_Phone RASET_Phone
-#define MPRET_Vpn RASET_Vpn
-#define MPRET_Direct RASET_Direct
-#define MPR_ET_None ET_None
-#define MPR_ET_Require ET_Require
-#define MPR_ET_RequireMax ET_RequireMax
-#define MPR_ET_Optional ET_Optional
-#define MPR_VS_Default VS_Default
-#define MPR_VS_PptpOnly VS_PptpOnly
-#define MPR_VS_PptpFirst VS_PptpFirst
-#define MPR_VS_L2tpOnly VS_L2tpOnly
-#define MPR_VS_L2tpFirst VS_L2tpFirst
-#if (_WIN32_WINNT>=0x0600)
-typedef struct _MPR_INTERFACE_3 {
- WCHAR wszInterfaceName[MAX_INTERFACE_NAME_LEN+1];
- HANDLE hInterface;
- BOOL fEnabled;
- ROUTER_INTERFACE_TYPE dwIfType;
- ROUTER_CONNECTION_STATE dwConnectionState;
- DWORD fUnReachabilityReasons;
- DWORD dwLastError;
- DWORD dwfOptions;
- WCHAR szLocalPhoneNumber[RAS_MaxPhoneNumber+1];
- PWCHAR szAlternates;
- DWORD ipaddr;
- DWORD ipaddrDns;
- DWORD ipaddrDnsAlt;
- DWORD ipaddrWins;
- DWORD ipaddrWinsAlt;
- DWORD dwfNetProtocols;
- WCHAR szDeviceType[MPR_MaxDeviceType+1];
- WCHAR szDeviceName[MPR_MaxDeviceName+1];
- WCHAR szX25PadType[MPR_MaxPadType+1];
- WCHAR szX25Address[MPR_MaxX25Address+1];
- WCHAR szX25Facilities[MPR_MaxFacilities+1];
- WCHAR szX25UserData[MPR_MaxUserData+1];
- DWORD dwChannels;
- DWORD dwSubEntries;
- DWORD dwDialMode;
- DWORD dwDialExtraPercent;
- DWORD dwDialExtraSampleSeconds;
- DWORD dwHangUpExtraPercent;
- DWORD dwHangUpExtraSampleSeconds;
- DWORD dwIdleDisconnectSeconds;
- DWORD dwType;
- DWORD dwEncryptionType;
- DWORD dwCustomAuthKey;
- DWORD dwCustomAuthDataSize;
- LPBYTE lpbCustomAuthData;
- GUID guidId;
- DWORD dwVpnStrategy;
- ULONG AddressCount;
- IN6_ADDR ipv6addrDns;
- IN6_ADDR ipv6addrDnsAlt;
- IN6_ADDR* ipv6addr;
-} MPR_INTERFACE_3,*PMPR_INTERFACE_3;
-#endif
-typedef struct _MPR_SERVER_0 {
- BOOL fLanOnlyMode;
- DWORD dwUpTime;
- DWORD dwTotalPorts;
- DWORD dwPortsInUse;
-} MPR_SERVER_0,*PMPR_SERVER_0;
-#if (_WIN32_WINNT >= 0x0502)
-typedef struct _MPR_SERVER_1 {
- DWORD dwNumPptpPorts;
- DWORD dwPptpPortFlags;
- DWORD dwNumL2tpPorts;
- DWORD dwL2tpPortFlags;
-} MPR_SERVER_1,*PMPR_SERVER_1;
-#define MPR_ENABLE_RAS_ON_DEVICE 0x00000001
-#define MPR_ENABLE_ROUTING_ON_DEVICE 0x00000002
-#endif
-typedef struct _MPR_TRANSPORT_0 {
- DWORD dwTransportId;
- HANDLE hTransport;
- WCHAR wszTransportName[MAX_TRANSPORT_NAME_LEN+1];
-} MPR_TRANSPORT_0,*PMPR_TRANSPORT_0;
-typedef HANDLE RAS_SERVER_HANDLE;
-typedef HANDLE MPR_SERVER_HANDLE;
-/*--- Remote Access Service Administration Reference - RAS Administration Functions */
-DWORD WINAPI MprAdminConnectionClearStats(RAS_SERVER_HANDLE,HANDLE);
-DWORD WINAPI MprAdminConnectionEnum(RAS_SERVER_HANDLE,DWORD,LPBYTE*,DWORD,LPDWORD,LPDWORD,LPDWORD);
-DWORD WINAPI MprAdminConnectionGetInfo(RAS_SERVER_HANDLE,DWORD,HANDLE,LPBYTE*);
-DWORD WINAPI MprAdminConnectionRemoveQuarantine(HANDLE,HANDLE,BOOL);
-DWORD WINAPI MprAdminPortClearStats(RAS_SERVER_HANDLE,HANDLE);
-DWORD WINAPI MprAdminPortDisconnect(RAS_SERVER_HANDLE,HANDLE);
-DWORD WINAPI MprAdminPortEnum(RAS_SERVER_HANDLE,DWORD,HANDLE,LPBYTE*,DWORD,LPDWORD,LPDWORD,LPDWORD);
-DWORD WINAPI MprAdminPortGetInfo(RAS_SERVER_HANDLE,DWORD,HANDLE,LPBYTE);
-DWORD WINAPI MprAdminPortReset(RAS_SERVER_HANDLE,HANDLE);
-/*--- Remote Access Service Administration Reference - RAS Administration Functions - RAS Admin DLL Functions */
-BOOL WINAPI MprAdminAcceptNewConnection(RAS_CONNECTION_0*,RAS_CONNECTION_1*);
-BOOL WINAPI MprAdminAcceptNewConnection2(RAS_CONNECTION_0*,RAS_CONNECTION_1*,RAS_CONNECTION_2*);
-BOOL WINAPI MprAdminAcceptNewLink(RAS_PORT_0*,RAS_PORT_1*);
-#if (_WIN32_WINNT >= 0x0600)
-BOOL WINAPI MprAdminAcceptReauthentication(RAS_CONNECTION_0*,RAS_CONNECTION_1*,RAS_CONNECTION_2*,RAS_CONNECTION_3*);
-#endif
-void WINAPI MprAdminConnectionHangupNotification(RAS_CONNECTION_0*,RAS_CONNECTION_1*);
-void WINAPI MprAdminConnectionHangupNotification2(RAS_CONNECTION_0*,RAS_CONNECTION_1*,RAS_CONNECTION_2*);
-DWORD WINAPI MprAdminGetIpAddressForUser(WCHAR*,WCHAR*,DWORD*,BOOL*);
-#if (_WIN32_WINNT >= 0x0502)
-DWORD WINAPI MprAdminInitializeDll(void);
-DWORD WINAPI MprAdminTerminateDll(void);
-#endif
-void WINAPI MprAdminLinkHangupNotification(RAS_PORT_0*,RAS_PORT_1*);
-void WINAPI MprAdminReleaseIpAddress(WCHAR*,WCHAR*,DWORD*);
-/*--- Remote Access Service Administration Reference - RAS Administration Functions - RAS User Administration Functions */
-DWORD WINAPI MprAdminGetPDCServer(const WCHAR*,const WCHAR*,LPWSTR);
-DWORD WINAPI MprAdminSendUserMessage(MPR_SERVER_HANDLE,HANDLE,LPWSTR);
-DWORD WINAPI MprAdminUserGetInfo(const WCHAR*,const WCHAR*,DWORD,LPBYTE);
-DWORD WINAPI MprAdminUserSetInfo(const WCHAR*,const WCHAR*,DWORD,const LPBYTE);
-/*--- Router Management Reference - Router Administration Functions */
-DWORD WINAPI MprAdminBufferFree(LPVOID);
-DWORD WINAPI MprAdminDeregisterConnectionNotification(MPR_SERVER_HANDLE,HANDLE);
-DWORD WINAPI MprAdminEstablishDomainRasServer(PWCHAR,PWCHAR,BOOL);
-DWORD WINAPI MprAdminGetErrorString(DWORD,LPWSTR*);
-DWORD WINAPI MprAdminInterfaceConnect(MPR_SERVER_HANDLE,HANDLE,HANDLE,BOOL);
-DWORD WINAPI MprAdminInterfaceCreate(MPR_SERVER_HANDLE,DWORD,LPBYTE,HANDLE*);
-DWORD WINAPI MprAdminInterfaceDelete(MPR_SERVER_HANDLE,HANDLE);
-DWORD WINAPI MprAdminInterfaceDeviceGetInfo(MPR_SERVER_HANDLE,HANDLE,DWORD,DWORD,LPBYTE*);
-DWORD WINAPI MprAdminInterfaceDeviceSetInfo(MPR_SERVER_HANDLE,HANDLE,DWORD,DWORD,LPBYTE);
-DWORD WINAPI MprAdminInterfaceDisconnect(MPR_SERVER_HANDLE,HANDLE);
-DWORD WINAPI MprAdminInterfaceEnum(MPR_SERVER_HANDLE,DWORD,LPBYTE*,DWORD,LPDWORD,LPDWORD,LPDWORD);
-DWORD WINAPI MprAdminInterfaceGetCredentials(LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR);
-DWORD WINAPI MprAdminInterfaceGetHandle(MPR_SERVER_HANDLE,LPWSTR,HANDLE*,BOOL);
-DWORD WINAPI MprAdminInterfaceGetInfo(MPR_SERVER_HANDLE,HANDLE,DWORD,LPBYTE*);
-DWORD WINAPI MprAdminInterfaceQueryUpdateResult(MPR_SERVER_HANDLE,HANDLE,DWORD,LPDWORD);
-DWORD WINAPI MprAdminInterfaceSetCredentials(LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR);
-DWORD WINAPI MprAdminInterfaceSetCredentialsEx(MPR_SERVER_HANDLE,HANDLE,DWORD,LPBYTE);
-DWORD WINAPI MprAdminInterfaceSetInfo(MPR_SERVER_HANDLE,HANDLE,DWORD,LPBYTE);
-DWORD WINAPI MprAdminInterfaceTransportAdd(MPR_SERVER_HANDLE,HANDLE,DWORD,LPBYTE,DWORD);
-DWORD WINAPI MprAdminInterfaceTransportGetInfo(MPR_SERVER_HANDLE,HANDLE,DWORD,LPBYTE*,LPDWORD);
-DWORD WINAPI MprAdminInterfaceTransportRemove(MPR_SERVER_HANDLE,HANDLE,DWORD);
-DWORD WINAPI MprAdminInterfaceTransportSetInfo(MPR_SERVER_HANDLE,HANDLE,DWORD,LPBYTE,DWORD);
-DWORD WINAPI MprAdminInterfaceUpdatePhonebookInfo(MPR_SERVER_HANDLE,HANDLE);
-DWORD WINAPI MprAdminInterfaceUpdateRoutes(MPR_SERVER_HANDLE,HANDLE,DWORD,HANDLE);
-DWORD WINAPI MprAdminIsDomainRasServer(PWCHAR,PWCHAR,PBOOL);
-BOOL WINAPI MprAdminIsServiceRunning(LPWSTR);
-DWORD WINAPI MprAdminRegisterConnectionNotification(MPR_SERVER_HANDLE,HANDLE);
-DWORD WINAPI MprAdminServerConnect(LPWSTR,MPR_SERVER_HANDLE*);
-void WINAPI MprAdminServerDisconnect(MPR_SERVER_HANDLE);
-DWORD WINAPI MprAdminServerGetCredentials(MPR_SERVER_HANDLE,DWORD,LPBYTE*);
-DWORD WINAPI MprAdminInterfaceGetCredentialsEx(MPR_SERVER_HANDLE,HANDLE,DWORD,LPBYTE*);
-DWORD WINAPI MprAdminServerGetInfo(MPR_SERVER_HANDLE,DWORD,LPBYTE*);
-DWORD WINAPI MprAdminServerSetCredentials(MPR_SERVER_HANDLE,DWORD,LPBYTE);
-DWORD WINAPI MprAdminServerSetInfo(MPR_SERVER_HANDLE,DWORD,LPBYTE);
-DWORD WINAPI MprAdminTransportCreate(MPR_SERVER_HANDLE,DWORD,LPWSTR,LPBYTE,DWORD,LPBYTE,DWORD,LPWSTR);
-DWORD WINAPI MprAdminTransportGetInfo(MPR_SERVER_HANDLE,DWORD,LPBYTE*,LPDWORD,LPBYTE*,LPDWORD);
-DWORD WINAPI MprAdminTransportSetInfo(MPR_SERVER_HANDLE,DWORD,LPBYTE,DWORD,LPBYTE,DWORD);
-/*--- Router Management Reference - Router Configuration Functions */
-DWORD WINAPI MprConfigBufferFree(LPVOID);
-DWORD WINAPI MprConfigGetFriendlyName(HANDLE,PWCHAR,PWCHAR,DWORD);
-DWORD WINAPI MprConfigGetGuidName(HANDLE,PWCHAR,PWCHAR,DWORD);
-DWORD WINAPI MprConfigInterfaceCreate(HANDLE,DWORD,LPBYTE,HANDLE*);
-DWORD WINAPI MprConfigInterfaceDelete(HANDLE,HANDLE);
-DWORD WINAPI MprConfigInterfaceEnum(HANDLE,DWORD,LPBYTE*,DWORD,LPDWORD,LPDWORD,LPDWORD);
-DWORD WINAPI MprConfigInterfaceGetHandle(HANDLE,LPWSTR,HANDLE*);
-DWORD WINAPI MprConfigInterfaceGetInfo(HANDLE,HANDLE,DWORD,LPBYTE*,LPDWORD);
-DWORD WINAPI MprConfigInterfaceSetInfo(HANDLE,HANDLE,DWORD,LPBYTE);
-DWORD WINAPI MprConfigInterfaceTransportAdd(HANDLE,HANDLE,DWORD,LPWSTR,LPBYTE,DWORD,HANDLE*);
-DWORD WINAPI MprConfigInterfaceTransportEnum(HANDLE,HANDLE,DWORD,LPBYTE*,DWORD,LPDWORD,LPDWORD,LPDWORD);
-DWORD WINAPI MprConfigInterfaceTransportGetHandle(HANDLE,HANDLE,DWORD,HANDLE*);
-DWORD WINAPI MprConfigInterfaceTransportGetInfo(HANDLE,HANDLE,HANDLE,LPBYTE*,LPDWORD);
-DWORD WINAPI MprConfigInterfaceTransportRemove(HANDLE,HANDLE,HANDLE);
-DWORD WINAPI MprConfigInterfaceTransportSetInfo(HANDLE,HANDLE,HANDLE,LPBYTE,DWORD);
-DWORD WINAPI MprConfigServerBackup(HANDLE,LPWSTR);
-DWORD WINAPI MprConfigServerConnect(LPWSTR,HANDLE*);
-void WINAPI MprConfigServerDisconnect(HANDLE);
-DWORD WINAPI MprConfigServerGetInfo(HANDLE,DWORD,LPBYTE*);
-DWORD WINAPI MprConfigServerInstall(DWORD,PVOID);
-DWORD WINAPI MprConfigServerRestore(HANDLE,LPWSTR);
-DWORD WINAPI MprConfigServerSetInfo(HANDLE,DWORD,LPBYTE);
-DWORD WINAPI MprConfigTransportCreate(HANDLE,DWORD,LPWSTR,LPBYTE,DWORD,LPBYTE,DWORD,LPWSTR,HANDLE);
-DWORD WINAPI MprConfigTransportDelete(HANDLE,HANDLE);
-DWORD WINAPI MprConfigTransportEnum(HANDLE,DWORD,LPBYTE*,DWORD,LPDWORD,LPDWORD,LPDWORD);
-DWORD WINAPI MprConfigTransportGetHandle(HANDLE,DWORD,HANDLE*);
-DWORD WINAPI MprConfigTransportGetInfo(HANDLE,HANDLE,LPBYTE*,LPDWORD,LPBYTE*,LPDWORD,LPWSTR*);
-DWORD WINAPI MprConfigTransportSetInfo(HANDLE,HANDLE,LPBYTE,DWORD,LPBYTE,DWORD,LPWSTR);
-/*--- Router Management Reference - Information Header Functions */
-DWORD WINAPI MprInfoBlockAdd(LPVOID,DWORD,DWORD,DWORD,LPBYTE,LPVOID*);
-DWORD WINAPI MprInfoBlockFind(LPVOID,DWORD,LPDWORD,LPDWORD,LPBYTE*);
-DWORD WINAPI MprInfoBlockQuerySize(LPVOID);
-DWORD WINAPI MprInfoBlockRemove(LPVOID,DWORD,LPVOID*);
-DWORD WINAPI MprInfoBlockSet(LPVOID,DWORD,DWORD,DWORD,LPBYTE,LPVOID*);
-DWORD WINAPI MprInfoCreate(DWORD,LPVOID*);
-DWORD WINAPI MprInfoDelete(LPVOID);
-DWORD WINAPI MprInfoDuplicate(LPVOID,LPVOID*);
-DWORD WINAPI MprInfoRemoveAll(LPVOID,LPVOID*);
-/*--- Router Management MIB Reference - Router Management MIB Functions */
-typedef HANDLE MIB_SERVER_HANDLE;
-DWORD WINAPI MprAdminMIBBufferFree(LPVOID);
-DWORD WINAPI MprAdminMIBEntryCreate(MIB_SERVER_HANDLE,DWORD,DWORD,LPVOID,DWORD);
-DWORD WINAPI MprAdminMIBEntryDelete(MIB_SERVER_HANDLE,DWORD,DWORD,LPVOID,DWORD);
-DWORD WINAPI MprAdminMIBEntryGet(MIB_SERVER_HANDLE,DWORD,DWORD,LPVOID,DWORD,LPVOID*,LPDWORD);
-DWORD WINAPI MprAdminMIBEntryGetFirst(MIB_SERVER_HANDLE,DWORD,DWORD,LPVOID,DWORD,LPVOID*,LPDWORD);
-DWORD WINAPI MprAdminMIBEntryGetNext(MIB_SERVER_HANDLE,DWORD,DWORD,LPVOID,DWORD,LPVOID*,LPDWORD);
-DWORD WINAPI MprAdminMIBEntrySet(MIB_SERVER_HANDLE,DWORD,DWORD,LPVOID,DWORD);
-DWORD WINAPI MprAdminMIBGetTrapInfo(MIB_SERVER_HANDLE,DWORD,DWORD,LPVOID,DWORD,LPVOID*,LPDWORD);
-DWORD WINAPI MprAdminMIBServerConnect(LPWSTR,MIB_SERVER_HANDLE*);
-void WINAPI MprAdminMIBServerDisconnect(MIB_SERVER_HANDLE);
-DWORD WINAPI MprAdminMIBSetTrapInfo(DWORD,DWORD,HANDLE,LPVOID,DWORD,LPVOID*,LPDWORD);
-#endif /* (_WIN32_WINNT >= 0x0500) */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/mq.h b/winsup/w32api/include/mq.h
deleted file mode 100644
index cec1683..0000000
--- a/winsup/w32api/include/mq.h
+++ /dev/null
@@ -1,534 +0,0 @@
-#ifndef _MQ_H
-#define _MQ_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define PROPID_Q_INSTANCE 101
-#define PROPID_Q_TYPE 102
-#define PROPID_Q_PATHNAME 103
-#define PROPID_Q_JOURNAL 104
-#define PROPID_Q_QUOTA 105
-#define PROPID_Q_BASEPRIORITY 106
-#define PROPID_Q_JOURNAL_QUOTA 107
-#define PROPID_Q_LABEL 108
-#define PROPID_Q_CREATE_TIME 109
-#define PROPID_Q_MODIFY_TIME 110
-#define PROPID_Q_AUTHENTICATE 111
-#define PROPID_Q_PRIV_LEVEL 112
-#define PROPID_Q_TRANSACTION 113
-#define PROPID_Q_PATHNAME_DNS 124
-#define PROPID_Q_MULTICAST_ADDRESS 125
-#define PROPID_Q_ADS_PATH 126
-#define MQ_TRANSACTIONAL_NONE 0
-#define MQ_TRANSACTIONAL 1
-#define MQ_AUTHENTICATE_NONE 0
-#define MQ_AUTHENTICATE 1
-#define MQ_PRIV_LEVEL_NONE 0
-#define MQ_PRIV_LEVEL_OPTIONAL 1
-#define MQ_PRIV_LEVEL_BODY 2
-/*#define PROPID_M_ABORT_COUNT*/
-#define PROPID_M_CLASS 1
-#define PROPID_M_MSGID 2
-#define PROPID_M_CORRELATIONID 3
-#define PROPID_M_PRIORITY 4
-#define PROPID_M_DELIVERY 5
-#define PROPID_M_ACKNOWLEDGE 6
-#define PROPID_M_JOURNAL 7
-#define PROPID_M_APPSPECIFIC 8
-#define PROPID_M_BODY 9
-#define PROPID_M_BODY_SIZE 10
-#define PROPID_M_LABEL 11
-#define PROPID_M_LABEL_LEN 12
-#define PROPID_M_TIME_TO_REACH_QUEUE 13
-#define PROPID_M_TIME_TO_BE_RECEIVED 14
-#define PROPID_M_RESP_QUEUE 15
-#define PROPID_M_RESP_QUEUE_LEN 16
-#define PROPID_M_ADMIN_QUEUE 17
-#define PROPID_M_ADMIN_QUEUE_LEN 18
-#define PROPID_M_VERSION 19
-#define PROPID_M_SENDERID 20
-#define PROPID_M_SENDERID_LEN 21
-#define PROPID_M_SENDERID_TYPE 22
-#define PROPID_M_PRIV_LEVEL 23
-#define PROPID_M_AUTH_LEVEL 24
-#define PROPID_M_AUTHENTICATED 25
-#define PROPID_M_HASH_ALG 26
-#define PROPID_M_ENCRYPTION_ALG 27
-#define PROPID_M_SENDER_CERT 28
-#define PROPID_M_SENDER_CERT_LEN 29
-#define PROPID_M_SRC_MACHINE_ID 30
-#define PROPID_M_SENTTIME 31
-#define PROPID_M_ARRIVEDTIME 32
-#define PROPID_M_DEST_QUEUE 33
-#define PROPID_M_DEST_QUEUE_LEN 34
-#define PROPID_M_EXTENSION 35
-#define PROPID_M_EXTENSION_LEN 36
-#define PROPID_M_SECURITY_CONTEXT 37
-#define PROPID_M_CONNECTOR_TYPE 38
-#define PROPID_M_XACT_STATUS_QUEUE 39
-#define PROPID_M_XACT_STATUS_QUEUE_LEN 40
-#define PROPID_M_TRACE 41
-#define PROPID_M_BODY_TYPE 42
-#define PROPID_M_DEST_SYMM_KEY 43
-#define PROPID_M_DEST_SYMM_KEY_LEN 44
-#define PROPID_M_SIGNATURE 45
-#define PROPID_M_SIGNATURE_LEN 46
-#define PROPID_M_PROV_TYPE 47
-#define PROPID_M_PROV_NAME 48
-#define PROPID_M_PROV_NAME_LEN 49
-#define PROPID_M_FIRST_IN_XACT 50
-#define PROPID_M_LAST_IN_XACT 51
-#define PROPID_M_XACTID 52
-#define PROPID_M_AUTHENTICATED_EX 53
-#if (_WIN32_WINNT >= 0x0501)
-#define PROPID_M_RESP_FORMAT_NAME 54
-#define PROPID_M_RESP_FORMAT_NAME_LEN 55
-#define PROPID_M_DEST_FORMAT_NAME 58
-#define PROPID_M_DEST_FORMAT_NAME_LEN 59
-#define PROPID_M_LOOKUPID 60
-#define PROPID_M_SOAP_ENVELOPE 61
-#define PROPID_M_SOAP_ENVELOPE_LEN 62
-#define PROPID_M_COMPOUND_MESSAGE 63
-#define PROPID_M_COMPOUND_MESSAGE_SIZE 64
-#define PROPID_M_SOAP_HEADER 65
-#define PROPID_M_SOAP_BODY 66
-#endif
-/*#define PROPID_M_TOTAL_ABORT_COUNT*/
-#define PROPID_M_CORRELATIONID_SIZE 20
-#define PROPID_M_MSGID_SIZE 20
-#define PROPID_M_XACTID_SIZE 20
-#define MQMSG_DELIVERY_EXPRESS 0
-#define MQMSG_DELIVERY_RECOVERABLE 1
-#define MQMSG_JOURNAL_NONE 0
-#define MQMSG_DEADLETTER 1
-#define MQMSG_JOURNAL 2
-#define MQMSG_TRACE_NONE 0
-#define MQMSG_SEND_ROUTE_TO_REPORT_QUEUE 1
-#define MQMSG_SENDERID_TYPE_NONE 0
-#define MQMSG_SENDERID_TYPE_SID 1
-#define MQMSG_NOT_FIRST_IN_XACT 0
-#define MQMSG_FIRST_IN_XACT 1
-#define MQMSG_NOT_LAST_IN_XACT 0
-#define MQMSG_LAST_IN_XACT 1
-#define MQMSG_PRIV_LEVEL_NONE 0
-/*#define MQMSG_PRIV_LEVEL_BODY*/
-#define MQMSG_PRIV_LEVEL_BODY_BASE 1
-#define MQMSG_PRIV_LEVEL_BODY_ENHANCED 3
-#define MQMSG_AUTHENTICATION_NOT_REQUESTED 0
-#define MQMSG_AUTHENTICATION_REQUESTED 1
-#define MQMSG_AUTHENTICATION_REQUESTED_EX 3
-#define MQMSG_AUTH_LEVEL_NONE 0
-#define MQMSG_AUTH_LEVEL_ALWAYS 1
-#define MQMSG_AUTH_LEVEL_MSMQ10 2
-#define MQMSG_AUTH_LEVEL_MSMQ20 4
-#define MQMSG_AUTH_LEVEL_SIG10 2
-#define MQMSG_AUTH_LEVEL_SIG20 4
-#define MQMSG_AUTH_LEVEL_SIG30 8
-#define MQMSG_AUTHENTICATED_SIG10 1
-#define MQMSG_AUTHENTICATED_SIG20 3
-#define MQMSG_AUTHENTICATED_SIG30 5
-#define MQMSG_AUTHENTICATED_SIGXML 9
-#define PROPID_MGMT_MSMQ_ACTIVEQUEUES 1
-#define PROPID_MGMT_MSMQ_PRIVATEQ 2
-#define PROPID_MGMT_MSMQ_DSSERVER 3
-#define PROPID_MGMT_MSMQ_CONNECTED 4
-#define PROPID_MGMT_MSMQ_TYPE 5
-#define PROPID_MGMT_MSMQ_BYTES_IN_ALL_QUEUES 6
-#define PROPID_MGMT_QUEUE_PATHNAME 1
-#define PROPID_MGMT_QUEUE_FORMATNAME 2
-#define PROPID_MGMT_QUEUE_TYPE 3
-#define PROPID_MGMT_QUEUE_LOCATION 4
-#define PROPID_MGMT_QUEUE_XACT 5
-#define PROPID_MGMT_QUEUE_FOREIGN 6
-#define PROPID_MGMT_QUEUE_MESSAGE_COUNT 7
-#define PROPID_MGMT_QUEUE_BYTES_IN_QUEUE 8
-#define PROPID_MGMT_QUEUE_JOURNAL_MESSAGE_COUNT 9
-#define PROPID_MGMT_QUEUE_BYTES_IN_JOURNAL 10
-#define PROPID_MGMT_QUEUE_STATE 11
-#define PROPID_MGMT_QUEUE_NEXTHOPS 12
-#define PROPID_MGMT_QUEUE_EOD_LAST_ACK 13
-#define PROPID_MGMT_QUEUE_EOD_LAST_ACK_TIME 14
-#define PROPID_MGMT_QUEUE_EOD_LAST_ACK_COUNT 15
-#define PROPID_MGMT_QUEUE_EOD_FIRST_NON_ACK 16
-#define PROPID_MGMT_QUEUE_EOD_LAST_NON_ACK 17
-#define PROPID_MGMT_QUEUE_EOD_NEXT_SEQ 18
-#define PROPID_MGMT_QUEUE_EOD_NO_READ_COUNT 19
-#define PROPID_MGMT_QUEUE_EOD_NO_ACK_COUNT 20
-#define PROPID_MGMT_QUEUE_EOD_RESEND_TIME 21
-#define PROPID_MGMT_QUEUE_EOD_RESEND_INTERVAL 22
-#define PROPID_MGMT_QUEUE_EOD_RESEND_COUNT 23
-#define PROPID_MGMT_QUEUE_EOD_SOURCE_INFO 24
-/*#define PROPID_MGMT_QUEUE_SUBQUEUE_COUNT*/
-/*#define PROPID_MGMT_QUEUE_SUBQUEUE_NAMES*/
-#define PROPID_PC_VERSION 5801
-#define PROPID_PC_DS_ENABLED 5802
-#define PROPID_QM_SITE_ID 201
-#define PROPID_QM_MACHINE_ID 202
-#define PROPID_QM_PATHNAME 203
-#define PROPID_QM_CONNECTION 204
-#define PROPID_QM_ENCRYPTION_PK 205
-#define PROPID_QM_ENCRYPTION_PK_BASE 231
-#define PROPID_QM_ENCRYPTION_PK_ENHANCED 232
-#define PROPID_QM_PATHNAME_DNS 233
-#define MQ_OK 0x00000000
-#define MQ_INFORMATION_PROPERTY 0x400E0001
-#define MQ_INFORMATION_ILLEGAL_PROPERTY 0x400E0002
-#define MQ_INFORMATION_PROPERTY_IGNORED 0x400E0003
-#define MQ_INFORMATION_UNSUPPORTED_PROPERTY 0x400E0004
-#define MQ_INFORMATION_DUPLICATE_PROPERTY 0x400E0005
-#define MQ_INFORMATION_OPERATION_PENDING 0x400E0006
-#define MQ_INFORMATION_FORMATNAME_BUFFER_TOO_SMALL 0x400E0009
-#define MQ_INFORMATION_INTERNAL_USER_CERT_EXIST 0x400E000A
-#define MQ_INFORMATION_OWNER_IGNORED 0x400E000B
-#define MQ_ERROR 0xC00E0001
-#define MQ_ERROR_PROPERTY 0xC00E0002
-#define MQ_ERROR_QUEUE_NOT_FOUND 0xC00E0003
-#define MQ_ERROR_QUEUE_NOT_ACTIVE 0xC00E0004
-#define MQ_ERROR_QUEUE_EXISTS 0xC00E0005
-#define MQ_ERROR_INVALID_PARAMETER 0xC00E0006
-#define MQ_ERROR_INVALID_HANDLE 0xC00E0007
-#define MQ_ERROR_OPERATION_CANCELLED0xC00E0008
-#define MQ_ERROR_SHARING_VIOLATION 0xC00E0009
-#define MQ_ERROR_SERVICE_NOT_AVAILABLE 0xC00E000B
-#define MQ_ERROR_MACHINE_NOT_FOUND 0xC00E000D
-#define MQ_ERROR_ILLEGAL_SORT 0xC00E0010
-#define MQ_ERROR_ILLEGAL_USER 0xC00E0011
-#define MQ_ERROR_NO_DS 0xC00E0013
-#define MQ_ERROR_ILLEGAL_QUEUE_PATHNAME 0xC00E0014
-#define MQ_ERROR_ILLEGAL_PROPERTY_VALUE 0xC00E0018
-#define MQ_ERROR_ILLEGAL_PROPERTY_VT 0xC00E0019
-#define MQ_ERROR_BUFFER_OVERFLOW 0xC00E001A
-#define MQ_ERROR_IO_TIMEOUT 0xC00E001B
-#define MQ_ERROR_ILLEGAL_CURSOR_ACTION 0xC00E001C
-#define MQ_ERROR_MESSAGE_ALREADY_RECEIVED 0xC00E001D
-#define MQ_ERROR_ILLEGAL_FORMATNAME 0xC00E001E
-#define MQ_ERROR_FORMATNAME_BUFFER_TOO_SMALL 0xC00E001F
-#define MQ_ERROR_UNSUPPORTED_FORMATNAME_OPERATION 0xC00E0020
-#define MQ_ERROR_ILLEGAL_SECURITY_DESCRIPTOR 0xC00E0021
-#define MQ_ERROR_SENDERID_BUFFER_TOO_SMALL 0xC00E0022
-#define MQ_ERROR_SECURITY_DESCRIPTOR_TOO_SMALL 0xC00E0023
-#define MQ_ERROR_CANNOT_IMPERSONATE_CLIENT 0xC00E0024
-#define MQ_ERROR_ACCESS_DENIED 0xC00E0025
-#define MQ_ERROR_PRIVILEGE_NOT_HELD 0xC00E0026
-#define MQ_ERROR_INSUFFICIENT_RESOURCES 0xC00E0027
-#define MQ_ERROR_USER_BUFFER_TOO_SMALL 0xC00E0028
-#define MQ_ERROR_MESSAGE_STORAGE_FAILED 0xC00E002A
-#define MQ_ERROR_SENDER_CERT_BUFFER_TOO_SMALL 0xC00E002B
-#define MQ_ERROR_INVALID_CERTIFICATE 0xC00E002C
-#define MQ_ERROR_CORRUPTED_INTERNAL_CERTIFICATE 0xC00E002D
-#define MQ_ERROR_INTERNAL_USER_CERT_EXIST 0xC00E002E
-#define MQ_ERROR_NO_INTERNAL_USER_CERT 0xC00E002F
-#define MQ_ERROR_CORRUPTED_SECURITY_DATA 0xC00E0030
-#define MQ_ERROR_CORRUPTED_PERSONAL_CERT_STORE 0xC00E0031
-#define MQ_ERROR_COMPUTER_DOES_NOT_SUPPORT_ENCRYPTION 0xC00E0033
-#define MQ_ERROR_BAD_SECURITY_CONTEXT 0xC00E0035
-#define MQ_ERROR_COULD_NOT_GET_USER_SID 0xC00E0036
-#define MQ_ERROR_COULD_NOT_GET_ACCOUNT_INFO 0xC00E0037
-#define MQ_ERROR_ILLEGAL_MQCOLUMNS 0xC00E0038
-#define MQ_ERROR_ILLEGAL_PROPID 0xC00E0039
-#define MQ_ERROR_ILLEGAL_RELATION 0xC00E003A
-#define MQ_ERROR_ILLEGAL_PROPERTY_SIZE 0xC00E003B
-#define MQ_ERROR_ILLEGAL_RESTRICTION_PROPID 0xC00E003C
-#define MQ_ERROR_ILLEGAL_MQQUEUEPROPS 0xC00E003D
-#define MQ_ERROR_PROPERTY_NOTALLOWED 0xC00E003E
-#define MQ_ERROR_INSUFFICIENT_PROPERTIES 0xC00E003F
-#define MQ_ERROR_MACHINE_EXISTS 0xC00E0040
-#define MQ_ERROR_ILLEGAL_MQQMPROPS 0xC00E0041
-#define MQ_ERROR_DS_IS_FULL 0xC00E0042
-#define MQ_ERROR_DS_ERROR 0xC00E0043
-#define MQ_ERROR_INVALID_OWNER 0xC00E0044
-#define MQ_ERROR_UNSUPPORTED_ACCESS_MODE 0xC00E0045
-#define MQ_ERROR_RESULT_BUFFER_TOO_SMALL 0xC00E0046
-#define MQ_ERROR_DELETE_CN_IN_USE 0xC00E0048
-#define MQ_ERROR_NO_RESPONSE_FROM_OBJECT_SERVER 0xC00E0049
-#define MQ_ERROR_OBJECT_SERVER_NOT_AVAILABLE 0xC00E004A
-#define MQ_ERROR_QUEUE_NOT_AVAILABLE 0xC00E004B
-#define MQ_ERROR_DTC_CONNECT 0xC00E004C
-#define MQ_ERROR_TRANSACTION_IMPORT 0xC00E004E
-#define MQ_ERROR_TRANSACTION_USAGE 0xC00E0050
-#define MQ_ERROR_TRANSACTION_SEQUENCE 0xC00E0051
-#define MQ_ERROR_MISSING_CONNECTOR_TYPE 0xC00E0055
-#define MQ_ERROR_STALE_HANDLE 0xC00E0056
-#define MQ_ERROR_TRANSACTION_ENLIST 0xC00E0058
-#define MQ_ERROR_QUEUE_DELETED 0xC00E005A
-#define MQ_ERROR_ILLEGAL_CONTEXT 0xC00E005B
-#define MQ_ERROR_ILLEGAL_SORT_PROPID 0xC00E005C
-#define MQ_ERROR_LABEL_TOO_LONG 0xC00E005D
-#define MQ_ERROR_LABEL_BUFFER_TOO_SMALL 0xC00E005E
-#define MQ_ERROR_MQIS_SERVER_EMPTY 0xC00E005F
-#define MQ_ERROR_MQIS_READONLY_MODE 0xC00E0060
-#define MQ_ERROR_SYMM_KEY_BUFFER_TOO_SMALL 0xC00E0061
-#define MQ_ERROR_SIGNATURE_BUFFER_TOO_SMALL 0xC00E0062
-#define MQ_ERROR_PROV_NAME_BUFFER_TOO_SMALL 0xC00E0063
-#define MQ_ERROR_ILLEGAL_OPERATION 0xC00E0064
-#define MQ_ERROR_WRITE_NOT_ALLOWED 0xC00E0065
-#define MQ_ERROR_WKS_CANT_SERVE_CLIENT 0xC00E0066
-#define MQ_ERROR_DEPEND_WKS_LICENSE_OVERFLOW 0xC00E0067
-#define MQ_CORRUPTED_QUEUE_WAS_DELETED 0xC00E0068
-#define MQ_ERROR_REMOTE_MACHINE_NOT_AVAILABLE 0xC00E0069
-#define MQ_ERROR_UNSUPPORTED_OPERATION 0xC00E006A
-#define MQ_ERROR_ENCRYPTION_PROVIDER_NOT_SUPPORTED 0xC00E006B
-#define MQ_ERROR_CANNOT_SET_CRYPTO_SEC_DESCR 0xC00E006C
-#define MQ_ERROR_CERTIFICATE_NOT_PROVIDED 0xC00E006D
-#define MQ_ERROR_Q_DNS_PROPERTY_NOT_SUPPORTED 0xC00E006E
-#define MQ_ERROR_CANNOT_CREATE_CERT_STORE 0xC00E006F
-#define MQ_ERROR_CANNOT_OPEN_CERT_STORE 0xC00E0070
-#define MQ_ERROR_ILLEGAL_ENTERPRISE_OPERATION 0xC00E0071
-#define MQ_ERROR_CANNOT_GRANT_ADD_GUID 0xC00E0072
-#define MQ_ERROR_CANNOT_LOAD_MSMQOCM 0xC00E0073
-#define MQ_ERROR_NO_ENTRY_POINT_MSMQOCM 0xC00E0074
-#define MQ_ERROR_NO_MSMQ_SERVERS_ON_DC 0xC00E0075
-#define MQ_ERROR_CANNOT_JOIN_DOMAIN 0xC00E0076
-#define MQ_ERROR_CANNOT_CREATE_ON_GC 0xC00E0077
-#define MQ_ERROR_GUID_NOT_MATCHING 0xC00E0078
-#define MQ_ERROR_PUBLIC_KEY_NOT_FOUND 0xC00E0079
-#define MQ_ERROR_PUBLIC_KEY_DOES_NOT_EXIST 0xC00E007A
-#define MQ_ERROR_ILLEGAL_MQPRIVATEPROPS 0xC00E007B
-#define MQ_ERROR_NO_GC_IN_DOMAIN 0xC00E007C
-#define MQ_ERROR_NO_MSMQ_SERVERS_ON_GC 0xC00E007D
-#define MQ_ERROR_CANNOT_GET_DN 0xC00E007E
-#define MQ_ERROR_CANNOT_HASH_DATA_EX 0xC00E007F
-#define MQ_ERROR_CANNOT_SIGN_DATA_EX 0xC00E0080
-#define MQ_ERROR_CANNOT_CREATE_HASH_EX 0xC00E0081
-#define MQ_ERROR_FAIL_VERIFY_SIGNATURE_EX 0xC00E0082
-#define MQ_ERROR_CANNOT_DELETE_PSC_OBJECTS 0xC00E0083
-#define MQ_ERROR_NO_MQUSER_OU 0xC00E0084
-#define MQ_ERROR_CANNOT_LOAD_MQAD 0xC00E0085
-#define MQ_ERROR_CANNOT_LOAD_MQDSSRV 0xC00E0086
-#define MQ_ERROR_PROPERTIES_CONFLICT 0xC00E0087
-#define MQ_ERROR_MESSAGE_NOT_FOUND 0xC00E0088
-#define MQ_ERROR_CANT_RESOLVE_SITES 0xC00E0089
-#define MQ_ERROR_NOT_SUPPORTED_BY_DEPENDENT_CLIENTS 0xC00E008A
-#define MQ_ERROR_OPERATION_NOT_SUPPORTED_BY_REMOTE_COMPUTER 0xC00E008B
-#define MQ_ERROR_NOT_A_CORRECT_OBJECT_CLASS 0xC00E008C
-#define MQ_ERROR_MULTI_SORT_KEYS 0xC00E008D
-#define MQ_ERROR_GC_NEEDED 0xC00E008E
-#define MQ_ERROR_DS_BIND_ROOT_FOREST 0xC00E008F
-#define MQ_ERROR_DS_LOCAL_USER 0xC00E0090
-#define MQ_ERROR_Q_ADS_PROPERTY_NOT_SUPPORTED 0xC00E0091
-#define MQ_ERROR_BAD_XML_FORMAT 0xC00E0092
-#define MQ_ERROR_UNSUPPORTED_CLASS xC00E0093
-#define MQ_ERROR_UNINITIALIZED_OBJECT 0xC00E0094
-#define MQ_ERROR_CANNOT_CREATE_PSC_OBJECTS 0xC00E0095
-#define MQ_ERROR_CANNOT_UPDATE_PSC_OBJECTS 0xC00E0096
-#define MQSEC_DELETE_MESSAGE 0x00000001
-#define MQSEC_PEEK_MESSAGE 0x00000002
-#define MQSEC_WRITE_MESSAGE 0x00000004
-#define MQSEC_DELETE_JOURNAL_MESSAGE 0x00000008
-#define MQSEC_SET_QUEUE_PROPERTIES 0x00000010
-#define MQSEC_GET_QUEUE_PROPERTIES 0x00000020
-#define MQSEC_DELETE_QUEUE 0x00010000
-#define MQSEC_GET_QUEUE_PERMISSIONS 0x00020000
-#define MQSEC_CHANGE_QUEUE_PERMISSIONS 0x00040000
-#define MQSEC_TAKE_QUEUE_OWNERSHIP 0x00080000
-#define MQSEC_RECEIVE_MESSAGE (MQSEC_DELETE_MESSAGE|MQSEC_PEEK_MESSAGE)
-#define MQSEC_RECEIVE_JOURNAL_MESSAGE (MQSEC_DELETE_JOURNAL_MESSAGE|MQSEC_PEEK_MESSAGE)
-#define MQSEC_QUEUE_GENERIC_READ (MQSEC_GET_QUEUE_PROPERTIES|MQSEC_GET_QUEUE_PERMISSIONS|MQSEC_RECEIVE_MESSAGE|MQSEC_RECEIVE_JOURNAL_MESSAGE)
-#define MQSEC_QUEUE_GENERIC_WRITE (MQSEC_GET_QUEUE_PROPERTIES|MQSEC_GET_QUEUE_PERMISSIONS|MQSEC_WRITE_MESSAGE)
-#define MQSEC_QUEUE_GENERIC_ALL (MQSEC_RECEIVE_MESSAGE|MQSEC_RECEIVE_JOURNAL_MESSAGE|MQSEC_WRITE_MESSAGE|MQSEC_SET_QUEUE_PROPERTIES|MQSEC_GET_QUEUE_PROPERTIES|MQSEC_DELETE_QUEUE|MQSEC_GET_QUEUE_PERMISSIONS|MQSEC_CHANGE_QUEUE_PERMISSIONS|MQSEC_TAKE_QUEUE_OWNERSHIP)
-#define MSMQ_CONNECTED L"CONNECTED"
-#define MSMQ_DISCONNECTED L"DISCONNECTED"
-#define MQ_RECEIVE_ACCESS 0x00000001
-#define MQ_SEND_ACCESS 0x00000002
-#define MQ_PEEK_ACCESS 0x00000020
-#define MQ_ADMIN_ACCESS 0x00000080
-#define MQ_DENY_NONE 0x00000000
-#define MQ_DENY_RECEIVE_SHARE 0x00000001
-#define MQ_ACTION_RECEIVE 0x00000000
-#define MQ_ACTION_PEEK_CURRENT 0x80000000
-#define MQ_ACTION_PEEK_NEXT 0x80000001
-/*#define MQ_NO_TRANSACTION*/
-/*#define MQ_MTS_TRANSACTION*/
-/*#define MQ_SINGLE_MESSAGE*/
-/*#define MQ_XA_TRANSACTION*/
-#if (_WIN32_WINNT >= 0x0501)
-#define MQ_LOOKUP_PEEK_CURRENT 0x40000010
-#define MQ_LOOKUP_PEEK_NEXT 0x40000011
-#define MQ_LOOKUP_PEEK_PREV 0x40000012
-#define MQ_LOOKUP_PEEK_FIRST 0x40000014
-#define MQ_LOOKUP_PEEK_LAST 0x40000018
-#define MQ_LOOKUP_RECEIVE_CURRENT 0x40000020
-#define MQ_LOOKUP_RECEIVE_NEXT 0x40000021
-#define MQ_LOOKUP_RECEIVE_PREV 0x40000022
-#define MQ_LOOKUP_RECEIVE_FIRST 0x40000024
-#define MQ_LOOKUP_RECEIVE_LAST 0x40000028
-#endif
-#if (_WIN32_WINNT >= 0x0500)
-#define MQCERT_REGISTER_ALWAYS 0x00000001
-#define MQCERT_REGISTER_IF_NOT_EXIST 0x00000002
-#endif
-#define PRLT 0
-#define PRLE 1
-#define PRGT 2
-#define PRGE 3
-#define PREQ 4
-#define PRNE 5
-#define MQ_MIN_PRIORITY 0
-#define MQ_MAX_PRIORITY 7
-#define MQ_DEFAULT_PRIORITY 3
-#define QUERY_SORTASCEND 0
-#define QUERY_SORTDESCEND 1
-
-typedef struct tagMQCOLUMNSET {
- ULONG cCol;
- PROPID *aCol;
-} MQCOLUMNSET;
-typedef PROPID MGMTPROPID;
-typedef struct tagMQMGMTPROPS {
- DWORD cProp;
- MGMTPROPID *aPropID;
- MQPROPVARIANT *aPropVar;
- HRESULT *aStatus;
-} MQMGMTPROPS;
-typedef PROPID MSGPROPID;
-typedef struct tagMQMSGPROPS {
- DWORD cProp;
- MSGPROPID *aPropID;
- MQPROPVARIANT *aPropVar;
- HRESULT *aStatus;
-} MQMSGPROPS;
-typedef PROPID QMPROPID;
-typedef struct tagMQPRIVATEPROPS {
- DWORD cProp;
- QMPROPID *aPropID;
- MQPROPVARIANT *aPropVar;
- HRESULT *aStatus;
-} MQPRIVATEPROPS;
-typedef struct tagMQPROPERTYRESTRICTION {
- ULONG rel;
- PROPID prop;
- MQPROPVARIANT prval;
-} MQPROPERTYRESTRICTION;
-typedef struct tagMQQMPROPS {
- DWORD cProp;
- QMPROPID *aPropID;
- MQPROPVARIANT *aPropVar;
- HRESULT *aStatus;
-} MQQMPROPS;
-typedef PROPID QUEUEPROPID;
-typedef struct tagMQQUEUEPROPS {
- DWORD cProp;
- QUEUEPROPID *aPropID;
- MQPROPVARIANT *aPropVar;
- HRESULT *aStatus;
-} MQQUEUEPROPS;
-typedef struct tagMQRESTRICTION {
- ULONG cRes;
- MQPROPERTYRESTRICTION *paPropRes;
-} MQRESTRICTION;
-typedef struct tagMQSORTKEY {
- PROPID propColumn;
- ULONG dwOrder;
-} MQSORTKEY;
-typedef struct tagMQSORTSET {
- ULONG cCol;
- MQSORTKEY *aCol;
-} MQSORTSET;
-typedef struct tagMQPROPVARIANT {
- VARTYPE vt;
- WORD wReserved1;
- WORD wReserved2;
- WORD wReserved3;
- union {
- UCHAR bVal;
- SHORT iVal;
- USHORT uiVal;
- VARIANT_BOOL boolVal;
- LONG lVal;
- ULONG ulVal;
- ULARGE_INTEGER uhVal;
- SCODE scode;
- DATE date;
- CLSID _RPC_FAR *puuid;
- BLOB blob;
- LPOLESTR bstrVal;
- LPSTR pszVal;
- LPWSTR pwszVal;
- CAUB caub;
- CAI cai;
- CAUI caui;
- CABOOL cabool;
- CAL cal;
- CAUL caul;
- CACLSID cauuid;
- CABSTR cabstr;
- CALPWSTR calpwstr;
- CAPROPVARIANT capropvar;
- };
-} MQPROPVARIANT;
-typedef struct tagSEQUENCE_INFO {
- LONGLONG SeqID;
- ULONG SeqNo;
- ULONG PrevNo;
-} SEQUENCE_INFO;
-typedef HANDLE QUEUEHANDLE;
-typedef VOID (*PMQRECEIVECALLBACK)(VOID);
-
-#if (_WIN32_WINNT >= 0x0501)
-HRESULT WINAPI MQADsPathToFormatName(LPCWSTR,LPWSTR,LPDWORD);
-#endif
-HRESULT WINAPI MQBeginTransaction(ITransaction **);
-HRESULT WINAPI MQCloseCursor(HANDLE);
-HRESULT WINAPI MQCloseQueue(QUEUEHANDLE);
-HRESULT WINAPI MQCreateCursor(QUEUEHANDLE,PHANDLE);
-HRESULT WINAPI MQCreateQueue(PSECURITY_DESCRIPTOR,MQQUEUEPROPS *,LPWSTR,LPDWORD);
-HRESULT WINAPI MQDeleteQueue(LPCWSTR);
-VOID WINAPI MQFreeMemory(PVOID);
-VOID WINAPI MQFreeSecurityContext(HANDLE);
-HRESULT WINAPI MQGetMachineProperties(LPCWSTR,const GUID *,MQQMPROPS *);
-#if (_WIN32_WINNT >= 0x0500)
-HRESULT WINAPI MQGetOverlappedResult(LPOVERLAPPED);
-HRESULT WINAPI MQGetPrivateComputerInformation(LPCWSTR,MQPRIVATEPROPS *);
-#endif
-HRESULT WINAPI MQGetQueueProperties(LPCWSTR,MQQUEUEPROPS *);
-HRESULT WINAPI MQGetQueueSecurity(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
-HRESULT WINAPI MQGetSecurityContext(LPVOID,DWORD,HANDLE *);
-HRESULT WINAPI MQGetMachineProperties(LPCWSTR,const GUID *,MQQMPROPS *);
-HRESULT WINAPI MQGetOverlappedResult(LPOVERLAPPED);
-HRESULT WINAPI MQGetPrivateComputerInformation(LPCWSTR,MQPRIVATEPROPS *);
-HRESULT WINAPI MQGetQueueProperties(LPCWSTR,MQQUEUEPROPS *);
-HRESULT WINAPI MQGetQueueSecurity(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
-HRESULT WINAPI MQGetSecurityContext(LPVOID,DWORD,HANDLE *);
-#if (_WIN32_WINNT >= 0x0500)
-HRESULT WINAPI MQGetSecurityContextEx(LPVOID,DWORD,HANDLE *);
-#endif
-HRESULT WINAPI MQHandleToFormatName(QUEUEHANDLE,LPWSTR,LPDWORD);
-HRESULT WINAPI MQInstanceToFormatName(GUID *,LPWSTR,LPDWORD);
-HRESULT WINAPI MQLocateBegin(LPCWSTR,MQRESTRICTION *,MQCOLUMNSET *,MQSORTSET *,PHANDLE);
-HRESULT WINAPI MQLocateEnd(HANDLE);
-HRESULT WINAPI MQLocateNext(HANDLE,DWORD *,MQPROPVARIANT[]);
-#if (_WIN32_WINNT >= 0x0600)
-HRESULT WINAPI MQMarkMessageRejected(QUEUEHANDLE,ULONGLONG);
-#endif
-#if (_WIN32_WINNT >= 0x0501)
-HRESULT WINAPI MQMgmtAction(LPCWSTR,LPCWSTR,LPCWSTR);
-HRESULT WINAPI MQMgmtGetInfo(LPCWSTR,LPCWSTR,MQMGMTPROPS *);
-#endif
-#if (_WIN32_WINNT >= 0x0600)
-HRESULT WINAPI MQMoveMessage(QUEUEHANDLE,QUEUEHANDLE,ULONGLONG,ITransaction *);
-#endif
-HRESULT WINAPI MQOpenQueue(LPCWSTR,DWORD,DWORD,QUEUEHANDLE *);
-HRESULT WINAPI MQPathNameToFormatName(LPCWSTR,LPWSTR,LPDWORD);
-#if (_WIN32_WINNT >= 0x0501)
-HRESULT WINAPI MQPurgeQueue(QUEUEHANDLE);
-#endif
-HRESULT WINAPI MQReceiveMessage(QUEUEHANDLE,DWORD,DWORD,MQMSGPROPS *,LPOVERLAPPED,PMQRECEIVECALLBACK,HANDLE,ITransaction *);
-#if (_WIN32_WINNT >= 0x0501)
-HRESULT WINAPI MQReceiveMessageByLookupId(QUEUEHANDLE,ULONGLONG,DWORD,MQMSGPROPS *,LPOVERLAPPED,PMQRECEIVECALLBACK,ITransaction *);
-#endif
-#if (_WIN32_WINNT >= 0x0500)
-HRESULT WINAPI MQRegisterCertificate(DWORD,PVOID,DWORD);
-#endif
-HRESULT WINAPI MQSendMessage(QUEUEHANDLE,MQMSGPROPS *,ITransaction *);
-HRESULT WINAPI MQSetQueueProperties(LPCWSTR,MQQUEUEPROPS *);
-HRESULT WINAPI MQSetQueueSecurity(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/msacm.h b/winsup/w32api/include/msacm.h
deleted file mode 100644
index 4f21536..0000000
--- a/winsup/w32api/include/msacm.h
+++ /dev/null
@@ -1,186 +0,0 @@
-/*author: Adrian Sandor
- written for MinGW*/
-#ifndef _MSACM_H
-#define _MSACM_H
-
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef HANDLE HACMDRIVERID, HACMDRIVER, *LPHACMDRIVER; /*they're handles, right?*/
-
-/*found through experimentation*/
-#define ACMDRIVERDETAILS_SHORTNAME_CHARS 32
-#define ACMDRIVERDETAILS_LONGNAME_CHARS 128
-#define ACMDRIVERDETAILS_COPYRIGHT_CHARS 80
-#define ACMDRIVERDETAILS_LICENSING_CHARS 128
-
-/*I don't know the right values for these macros*/
-#define ACMFORMATDETAILS_FORMAT_CHARS 256
-#define ACMFORMATTAGDETAILS_FORMATTAG_CHARS 256
-#define ACMDRIVERDETAILS_FEATURES_CHARS 256
-
-/*msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_acmformatdetails_str.asp*/
-typedef struct {
- DWORD cbStruct;
- DWORD dwFormatIndex;
- DWORD dwFormatTag;
- DWORD fdwSupport;
- LPWAVEFORMATEX pwfx;
- DWORD cbwfx;
- char szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
-} ACMFORMATDETAILSA, *LPACMFORMATDETAILSA;
-typedef struct {
- DWORD cbStruct;
- DWORD dwFormatIndex;
- DWORD dwFormatTag;
- DWORD fdwSupport;
- LPWAVEFORMATEX pwfx;
- DWORD cbwfx;
- WCHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS];
-} ACMFORMATDETAILSW, *LPACMFORMATDETAILSW;
-
-/*msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_acmformattagdetails_str.asp*/
-typedef struct {
- DWORD cbStruct;
- DWORD dwFormatTagIndex;
- DWORD dwFormatTag;
- DWORD cbFormatSize;
- DWORD fdwSupport;
- DWORD cStandardFormats;
- char szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
-} ACMFORMATTAGDETAILSA, *LPACMFORMATTAGDETAILSA;
-typedef struct {
- DWORD cbStruct;
- DWORD dwFormatTagIndex;
- DWORD dwFormatTag;
- DWORD cbFormatSize;
- DWORD fdwSupport;
- DWORD cStandardFormats;
- WCHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS];
-} ACMFORMATTAGDETAILSW, *LPACMFORMATTAGDETAILSW;
-
-/*msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_acmdriverdetails_str.asp*/
-typedef struct {
- DWORD cbStruct;
- FOURCC fccType;
- FOURCC fccComp;
- WORD wMid;
- WORD wPid;
- DWORD vdwACM;
- DWORD vdwDriver;
- DWORD fdwSupport;
- DWORD cFormatTags;
- DWORD cFilterTags;
- HICON hicon;
- char szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS];
- char szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS];
- char szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS];
- char szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS];
- char szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS];
-} ACMDRIVERDETAILSA, *LPACMDRIVERDETAILSA;
-typedef struct {
- DWORD cbStruct;
- FOURCC fccType;
- FOURCC fccComp;
- WORD wMid;
- WORD wPid;
- DWORD vdwACM;
- DWORD vdwDriver;
- DWORD fdwSupport;
- DWORD cFormatTags;
- DWORD cFilterTags;
- HICON hicon;
- WCHAR szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS];
- WCHAR szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS];
- WCHAR szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS];
- WCHAR szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS];
- WCHAR szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS];
-} ACMDRIVERDETAILSW, *LPACMDRIVERDETAILSW;
-
-/*msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_acmformatenumcallback.asp*/
-typedef BOOL (CALLBACK *ACMFORMATENUMCBA) (
- HACMDRIVERID hadid,
- LPACMFORMATDETAILSA pafd,
- DWORD_PTR dwInstance,
- DWORD fdwSupport
-);
-typedef BOOL (CALLBACK *ACMFORMATENUMCBW) (
- HACMDRIVERID hadid,
- LPACMFORMATDETAILSW pafd,
- DWORD_PTR dwInstance,
- DWORD fdwSupport
-);
-
-/*msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_acmformattagenumcallback.asp*/
-typedef BOOL (CALLBACK *ACMFORMATTAGENUMCBA) (
- HACMDRIVERID hadid,
- LPACMFORMATTAGDETAILSA paftd,
- DWORD_PTR dwInstance,
- DWORD fdwSupport
-);
-typedef BOOL (CALLBACK *ACMFORMATTAGENUMCBW) (
- HACMDRIVERID hadid,
- LPACMFORMATTAGDETAILSW paftd,
- DWORD_PTR dwInstance,
- DWORD fdwSupport
-);
-
-/*msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_acmdriverenumcallback.asp*/
-typedef BOOL (CALLBACK *ACMDRIVERENUMCB) (
- HACMDRIVERID hadid,
- DWORD_PTR dwInstance,
- DWORD fdwSupport
-);
-
-/*and now the functions...*/
-
-/*msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_acmdriveropen.asp*/
-MMRESULT WINAPI acmDriverOpen(LPHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpen);
-/*msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_acmdriverenum.asp*/
-MMRESULT WINAPI acmDriverEnum(ACMDRIVERENUMCB fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum);
-/*msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_acmformatenum.asp*/
-MMRESULT WINAPI acmFormatEnumA(HACMDRIVER had, LPACMFORMATDETAILSA pafd, ACMFORMATENUMCBA fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum);
-MMRESULT WINAPI acmFormatEnumW(HACMDRIVER had, LPACMFORMATDETAILSW pafd, ACMFORMATENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum);
-/*msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_acmdriverclose.asp*/
-MMRESULT WINAPI acmDriverClose(HACMDRIVER had, DWORD fdwClose);
-/*msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_acmdriverdetails.asp*/
-MMRESULT WINAPI acmDriverDetailsA(HACMDRIVERID hadid, LPACMDRIVERDETAILSA padd, DWORD fdwDetails);
-MMRESULT WINAPI acmDriverDetailsW(HACMDRIVERID hadid, LPACMDRIVERDETAILSW padd, DWORD fdwDetails);
-/*msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_acmformattagenum.asp*/
-MMRESULT WINAPI acmFormatTagEnumA(HACMDRIVER had, LPACMFORMATTAGDETAILSA paftd, ACMFORMATTAGENUMCBA fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum);
-MMRESULT WINAPI acmFormatTagEnumW(HACMDRIVER had, LPACMFORMATTAGDETAILSW paftd, ACMFORMATTAGENUMCBW fnCallback, DWORD_PTR dwInstance, DWORD fdwEnum);
-
-#ifdef UNICODE
-
-typedef ACMFORMATDETAILSW ACMFORMATDETAILS, *LPACMFORMATDETAILS;
-typedef ACMFORMATTAGDETAILSW ACMFORMATTAGDETAILS, *LPACMFORMATTAGDETAILS;
-typedef ACMDRIVERDETAILSW ACMDRIVERDETAILS, *LPACMDRIVERDETAILS;
-typedef ACMFORMATENUMCBW ACMFORMATENUMCB;
-typedef ACMFORMATTAGENUMCBW ACMFORMATTAGENUMCB;
-#define acmFormatEnum acmFormatEnumW
-#define acmDriverDetails acmDriverDetailsW
-#define acmFormatTagEnum acmFormatTagEnumW
-
-#else /*ifdef UNICODE*/
-
-typedef ACMFORMATDETAILSA ACMFORMATDETAILS, *LPACMFORMATDETAILS;
-typedef ACMFORMATTAGDETAILSA ACMFORMATTAGDETAILS, *LPACMFORMATTAGDETAILS;
-typedef ACMDRIVERDETAILSA ACMDRIVERDETAILS, *LPACMDRIVERDETAILS;
-typedef ACMFORMATENUMCBA ACMFORMATENUMCB;
-typedef ACMFORMATTAGENUMCBA ACMFORMATTAGENUMCB;
-#define acmFormatEnum acmFormatEnumA
-#define acmDriverDetails acmDriverDetailsA
-#define acmFormatTagEnum acmFormatTagEnumA
-
-#endif /*ifdef UNICODE*/
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/winsup/w32api/include/mshtml.h b/winsup/w32api/include/mshtml.h
deleted file mode 100644
index 288a427..0000000
--- a/winsup/w32api/include/mshtml.h
+++ /dev/null
@@ -1,704 +0,0 @@
-#ifndef _MSHTML_H
-#define _MSHTML_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef _COM_interface IHTMLElementCollection *LPHTMLELEMENTCOLLECTION;
-typedef _COM_interface IHTMLElement *LPHTMLELEMENT;
-typedef _COM_interface IHTMLSelectionObject *LPHTMLSELECTIONOBJECT;
-typedef _COM_interface IHTMLFramesCollection *LPHTMLFRAMESCOLLECTION;
-typedef _COM_interface IHTMLLocation *LPHTMLLOCATION;
-typedef _COM_interface IHTMLWindow2 *LPHTMLWINDOW2;
-typedef _COM_interface IHTMLStyleSheetsCollection *LPHTMLSTYLESHEETSCOLLECTION;
-typedef _COM_interface IHTMLStyleSheet *LPHTMLSTYLESHEET;
-typedef _COM_interface IHTMLStyle *LPHTMLSTYLE;
-typedef _COM_interface IHTMLFiltersCollection *LPHTMLFILTERSCOLLECTION;
-typedef _COM_interface IHTMLLinkElement *LPHTMLLINKELEMENT;
-typedef _COM_interface IHTMLImgElement *LPHTMLIMGELEMENT;
-typedef _COM_interface IHTMLImageElementFactory *LPHTMLIMAGEELEMENTFACTORY;
-typedef _COM_interface IHTMLEventObj *LPHTMLEVENTOBJ;
-typedef _COM_interface IHTMLScreen *LPHTMLSCREEN;
-typedef _COM_interface IHTMLOptionElementFactory *LPHTMLOPTIONELEMENTFACTORY;
-typedef _COM_interface IOmHistory *LPOMHISTORY;
-typedef _COM_interface IOmNavigator *LPOMNAVIGATOR;
-
-EXTERN_C const IID IID_IHTMLLinkElement;
-#define INTERFACE IHTMLLinkElement
-DECLARE_INTERFACE_(IHTMLLinkElement,IDispatch)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
- STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
-
- STDMETHOD(put_href)(THIS_ BSTR) PURE;
- STDMETHOD(get_href)(THIS_ BSTR*) PURE;
- STDMETHOD(put_rel)(THIS_ BSTR) PURE;
- STDMETHOD(get_rel)(THIS_ BSTR*) PURE;
- STDMETHOD(put_rev)(THIS_ BSTR) PURE;
- STDMETHOD(get_rev)(THIS_ BSTR*) PURE;
- STDMETHOD(put_type)(THIS_ BSTR) PURE;
- STDMETHOD(get_type)(THIS_ BSTR*) PURE;
- STDMETHOD(get_readyState)(THIS_ BSTR*) PURE;
- STDMETHOD(put_onreadystatechange)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onreadystatechange)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onload)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onload)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onerror)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onerror)(THIS_ VARIANT*) PURE;
- STDMETHOD(get_styleSheet)(THIS_ LPHTMLSTYLESHEET*) PURE;
- STDMETHOD(put_disabled)(THIS_ VARIANT_BOOL) PURE;
- STDMETHOD(get_disabled)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(put_media)(THIS_ BSTR) PURE;
- STDMETHOD(get_media)(THIS_ BSTR*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IHTMLImgElement;
-#define INTERFACE IHTMLImgElement
-DECLARE_INTERFACE_(IHTMLImgElement,IDispatch)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
- STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
-
- STDMETHOD(put_isMap)(THIS_ VARIANT_BOOL) PURE;
- STDMETHOD(get_isMap)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(put_useMap)(THIS_ BSTR) PURE;
- STDMETHOD(get_useMap)(THIS_ BSTR*) PURE;
- STDMETHOD(get_mimeType)(THIS_ BSTR*) PURE;
- STDMETHOD(get_fileSize)(THIS_ BSTR*) PURE;
- STDMETHOD(get_fileCreatedDate)(THIS_ BSTR*) PURE;
- STDMETHOD(get_fileModifiedDate)(THIS_ BSTR*) PURE;
- STDMETHOD(get_fileUpdatedDate)(THIS_ BSTR*) PURE;
- STDMETHOD(get_protocol)(THIS_ BSTR*) PURE;
- STDMETHOD(get_href)(THIS_ BSTR*) PURE;
- STDMETHOD(get_nameProp)(THIS_ BSTR*) PURE;
- STDMETHOD(put_border)(THIS_ VARIANT) PURE;
- STDMETHOD(get_border)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_vspace)(THIS_ long) PURE;
- STDMETHOD(get_vspace)(THIS_ long*) PURE;
- STDMETHOD(put_hspace)(THIS_ long) PURE;
- STDMETHOD(get_hspace)(THIS_ long*) PURE;
- STDMETHOD(put_alt)(THIS_ BSTR) PURE;
- STDMETHOD(get_alt)(THIS_ BSTR*) PURE;
- STDMETHOD(put_src)(THIS_ BSTR) PURE;
- STDMETHOD(get_src)(THIS_ BSTR*) PURE;
- STDMETHOD(put_lowsrc)(THIS_ BSTR) PURE;
- STDMETHOD(get_lowsrc)(THIS_ BSTR*) PURE;
- STDMETHOD(put_vrml)(THIS_ BSTR) PURE;
- STDMETHOD(get_vrml)(THIS_ BSTR*) PURE;
- STDMETHOD(put_dynsrc)(THIS_ BSTR) PURE;
- STDMETHOD(get_dynsrc)(THIS_ BSTR*) PURE;
- STDMETHOD(get_readyState)(THIS_ BSTR*) PURE;
- STDMETHOD(get_complete)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(put_loop)(THIS_ VARIANT) PURE;
- STDMETHOD(get_loop)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_align)(THIS_ BSTR) PURE;
- STDMETHOD(get_align)(THIS_ BSTR*) PURE;
- STDMETHOD(put_onload)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onload)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onerror)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onerror)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onabort)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onabort)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_name)(THIS_ BSTR) PURE;
- STDMETHOD(get_name)(THIS_ BSTR*) PURE;
- STDMETHOD(put_width)(THIS_ long) PURE;
- STDMETHOD(get_width)(THIS_ long*) PURE;
- STDMETHOD(put_height)(THIS_ long) PURE;
- STDMETHOD(get_height)(THIS_ long*) PURE;
- STDMETHOD(put_start)(THIS_ BSTR) PURE;
- STDMETHOD(get_start)(THIS_ BSTR*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IHTMLElementCollection;
-#define INTERFACE IHTMLElementCollection
-DECLARE_INTERFACE_(IHTMLElementCollection,IDispatch)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
- STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
-
- STDMETHOD(toString)(THIS_ BSTR*) PURE;
- STDMETHOD(put_length)(THIS_ long) PURE;
- STDMETHOD(get_length)(THIS_ long*) PURE;
- STDMETHOD(get__newEnum)(THIS_ IUnknown**) PURE;
- STDMETHOD(item)(THIS_ VARIANT,VARIANT,IDispatch**) PURE;
- STDMETHOD(tags)(THIS_ VARIANT,IDispatch**) PURE;
-};
-#undef INTERFACE
-
-
-EXTERN_C const IID IID_IHTMLDocument;
-#define INTERFACE IHTMLDocument
-DECLARE_INTERFACE_(IHTMLDocument,IDispatch)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
- STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
-
- STDMETHOD(get_Script)(THIS_ IDispatch**) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IHTMLDocument2;
-#define INTERFACE IHTMLDocument2
-DECLARE_INTERFACE_(IHTMLDocument2,IHTMLDocument)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
- STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
-
- STDMETHOD(get_Script)(THIS_ IDispatch**) PURE;
-
- STDMETHOD(get_all)(THIS_ LPHTMLELEMENTCOLLECTION*) PURE;
- STDMETHOD(get_body)(THIS_ LPHTMLELEMENT*) PURE;
- STDMETHOD(get_activeElement)(THIS_ LPHTMLELEMENT*) PURE;
- STDMETHOD(get_images)(THIS_ LPHTMLELEMENTCOLLECTION*) PURE;
- STDMETHOD(get_applets)(THIS_ LPHTMLELEMENTCOLLECTION*) PURE;
- STDMETHOD(get_links)(THIS_ LPHTMLELEMENTCOLLECTION*) PURE;
- STDMETHOD(get_forms)(THIS_ LPHTMLELEMENTCOLLECTION*) PURE;
- STDMETHOD(get_anchors)(THIS_ LPHTMLELEMENTCOLLECTION*) PURE;
- STDMETHOD(put_title)(THIS_ BSTR) PURE;
- STDMETHOD(get_title)(THIS_ BSTR*) PURE;
- STDMETHOD(get_scripts)(THIS_ LPHTMLELEMENTCOLLECTION*) PURE;
- STDMETHOD(put_designMode)(THIS_ BSTR) PURE;
- STDMETHOD(get_designMode)(THIS_ BSTR*) PURE;
- STDMETHOD(get_selection)(THIS_ LPHTMLSELECTIONOBJECT*) PURE;
- STDMETHOD(get_readyState)(THIS_ BSTR*) PURE;
- STDMETHOD(get_frames)(THIS_ LPHTMLFRAMESCOLLECTION*) PURE;
- STDMETHOD(get_embeds)(THIS_ LPHTMLELEMENTCOLLECTION*) PURE;
- STDMETHOD(get_plugins)(THIS_ LPHTMLELEMENTCOLLECTION*) PURE;
- STDMETHOD(put_alinkColor)(THIS_ VARIANT) PURE;
- STDMETHOD(get_alinkColor)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_bgColor)(THIS_ VARIANT) PURE;
- STDMETHOD(get_bgColor)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_fgColor)(THIS_ VARIANT) PURE;
- STDMETHOD(get_fgColor)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_linkColor)(THIS_ VARIANT) PURE;
- STDMETHOD(get_linkColor)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_vlinkColor)(THIS_ VARIANT) PURE;
- STDMETHOD(get_vlinkColor)(THIS_ VARIANT*) PURE;
- STDMETHOD(get_referrer)(THIS_ BSTR*) PURE;
- STDMETHOD(get_location)(THIS_ LPHTMLLOCATION*) PURE;
- STDMETHOD(get_lastModified)(THIS_ BSTR*) PURE;
- STDMETHOD(put_URL)(THIS_ BSTR) PURE;
- STDMETHOD(get_URL)(THIS_ BSTR*) PURE;
- STDMETHOD(put_domain)(THIS_ BSTR) PURE;
- STDMETHOD(get_domain)(THIS_ BSTR*) PURE;
- STDMETHOD(put_cookie)(THIS_ BSTR) PURE;
- STDMETHOD(get_cookie)(THIS_ BSTR*) PURE;
- STDMETHOD(put_expands)(THIS_ VARIANT_BOOL) PURE;
- STDMETHOD(get_expands)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(put_charset)(THIS_ BSTR) PURE;
- STDMETHOD(get_charset)(THIS_ BSTR*) PURE;
- STDMETHOD(put_defaultCharset)(THIS_ BSTR) PURE;
- STDMETHOD(get_defaultCharset)(THIS_ BSTR*) PURE;
- STDMETHOD(get_mimeType)(THIS_ BSTR*) PURE;
- STDMETHOD(get_fileSize)(THIS_ BSTR*) PURE;
- STDMETHOD(get_fileCreatedDate)(THIS_ BSTR*) PURE;
- STDMETHOD(get_fileModifiedDate)(THIS_ BSTR*) PURE;
- STDMETHOD(get_fileUpdatedDate)(THIS_ BSTR*) PURE;
- STDMETHOD(get_security)(THIS_ BSTR*) PURE;
- STDMETHOD(get_protocol)(THIS_ BSTR*) PURE;
- STDMETHOD(get_nameProp)(THIS_ BSTR*) PURE;
- STDMETHOD(write)(THIS_ SAFEARRAY*) PURE;
- STDMETHOD(writeln)(THIS_ SAFEARRAY*) PURE;
- STDMETHOD(open)(THIS_ BSTR,VARIANT,VARIANT,VARIANT,IDispatch**) PURE;
- STDMETHOD(close)(THIS) PURE;
- STDMETHOD(clear)(THIS) PURE;
- STDMETHOD(queryCommandSupported)(THIS_ BSTR,VARIANT_BOOL*) PURE;
- STDMETHOD(queryCommandEnabled)(THIS_ BSTR,VARIANT_BOOL*) PURE;
- STDMETHOD(queryCommandState)(THIS_ BSTR,VARIANT_BOOL*) PURE;
- STDMETHOD(queryCommandIndeterm)(THIS_ BSTR,VARIANT_BOOL*) PURE;
- STDMETHOD(queryCommandText)(THIS_ BSTR,BSTR*) PURE;
- STDMETHOD(queryCommandValue)(THIS_ BSTR,VARIANT*) PURE;
- STDMETHOD(execCommand)(THIS_ BSTR,VARIANT_BOOL,VARIANT,VARIANT_BOOL*) PURE;
- STDMETHOD(execCommandShowHelp)(THIS_ BSTR,VARIANT_BOOL*) PURE;
- STDMETHOD(createElement)(THIS_ BSTR,LPHTMLELEMENT*) PURE;
- STDMETHOD(put_onhelp)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onhelp)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onclick)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onclick)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_ondblclick)(THIS_ VARIANT) PURE;
- STDMETHOD(get_ondblclick)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onkeyup)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onkeyup)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onkeydown)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onkeydown)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onkeypress)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onkeypress)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onmouseup)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onmouseup)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onmousedown)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onmousedown)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onmousemove)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onmousemove)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onmouseout)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onmouseout)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onmouseover)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onmouseover)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onreadystatechange)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onreadystatechange)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onafterupdate)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onafterupdate)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onrowexit)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onrowexit)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onrowenter)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onrowenter)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_ondragstart)(THIS_ VARIANT) PURE;
- STDMETHOD(get_ondragstart)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onselectstart)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onselectstart)(THIS_ VARIANT*) PURE;
- STDMETHOD(elementFromPoint)(THIS_ long,long,LPHTMLELEMENT*) PURE;
- STDMETHOD(get_parentWindow)(THIS_ LPHTMLWINDOW2*) PURE;
- STDMETHOD(get_styleSheets)(THIS_ LPHTMLSTYLESHEETSCOLLECTION*) PURE;
- STDMETHOD(put_onbeforeupdate)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onbeforeupdate)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onerrorupdate)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onerrorupdate)(THIS_ VARIANT*) PURE;
- STDMETHOD(toString)(THIS_ BSTR*) PURE;
- STDMETHOD(createStyleSheet)(THIS_ BSTR,long,LPHTMLSTYLESHEET*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IHTMLSelectionObject;
-#define INTERFACE IHTMLSelectionObject
-DECLARE_INTERFACE_(IHTMLSelectionObject,IDispatch)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
- STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
-
- STDMETHOD(createRange)(THIS_ IDispatch**) PURE;
- STDMETHOD(empty)(THIS) PURE;
- STDMETHOD(clear)(THIS) PURE;
- STDMETHOD(get_type)(THIS_ BSTR*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IHTMLTxtRange;
-#define INTERFACE IHTMLTxtRange
-DECLARE_INTERFACE_(IHTMLTxtRange,IDispatch)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
- STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
-
- STDMETHOD(get_htmlText)(THIS_ BSTR*) PURE;
- STDMETHOD(put_text)(THIS_ BSTR) PURE;
- STDMETHOD(get_text)(THIS_ BSTR*) PURE;
- STDMETHOD(parentElement)(THIS_ LPHTMLELEMENT*) PURE;
- STDMETHOD(duplicate)(THIS_ IHTMLTxtRange**) PURE;
- STDMETHOD(inRange)(THIS_ IHTMLTxtRange*,VARIANT_BOOL*) PURE;
- STDMETHOD(isEqual)(THIS_ IHTMLTxtRange*,VARIANT_BOOL*) PURE;
- STDMETHOD(scrollIntoView)(THIS_ VARIANT_BOOL) PURE;
- STDMETHOD(collapse)(THIS_ VARIANT_BOOL) PURE;
- STDMETHOD(expand)(THIS_ BSTR,VARIANT_BOOL*) PURE;
- STDMETHOD(move)(THIS_ BSTR,long,long*) PURE;
- STDMETHOD(moveStart)(THIS_ BSTR,long,long*) PURE;
- STDMETHOD(moveEnd)(THIS_ BSTR,long,long*) PURE;
- STDMETHOD(select)(THIS) PURE;
- STDMETHOD(pasteHTML)(THIS_ BSTR) PURE;
- STDMETHOD(moveToElementText)(THIS_ LPHTMLELEMENT) PURE;
- STDMETHOD(setEndPoint)(THIS_ BSTR,IHTMLTxtRange*) PURE;
- STDMETHOD(compareEndPoints)(THIS_ BSTR,IHTMLTxtRange*,long*) PURE;
- STDMETHOD(findText)(THIS_ BSTR,long,long,VARIANT_BOOL*) PURE;
- STDMETHOD(moveToPoint)(THIS_ long,long) PURE;
- STDMETHOD(getBookmark)(THIS_ BSTR*) PURE;
- STDMETHOD(moveToBookbark)(THIS_ BSTR,VARIANT_BOOL*) PURE;
- STDMETHOD(queryCommandSupported)(THIS_ BSTR,VARIANT_BOOL*) PURE;
- STDMETHOD(queryCommandEnabled)(THIS_ BSTR,VARIANT_BOOL*) PURE;
- STDMETHOD(queryCommandState)(THIS_ BSTR,VARIANT_BOOL*) PURE;
- STDMETHOD(queryCommandIndeterm)(THIS_ BSTR,VARIANT_BOOL*) PURE;
- STDMETHOD(queryCommandText)(THIS_ BSTR,BSTR*) PURE;
- STDMETHOD(queryCommandValue)(THIS_ BSTR,VARIANT*) PURE;
- STDMETHOD(execCommand)(THIS_ BSTR,VARIANT_BOOL,VARIANT,VARIANT_BOOL*) PURE;
- STDMETHOD(execCommandShowHelp)(THIS_ BSTR,VARIANT_BOOL*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IHTMLElement;
-#define INTERFACE IHTMLElement
-DECLARE_INTERFACE_(IHTMLElement,IDispatch)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
- STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
-
- STDMETHOD(setAttribute)(THIS_ BSTR,VARIANT,long) PURE;
- STDMETHOD(getAttribute)(THIS_ BSTR,long,VARIANT*) PURE;
- STDMETHOD(removeAttribute)(THIS_ BSTR,long,VARIANT_BOOL*) PURE;
- STDMETHOD(put_className)(THIS_ BSTR) PURE;
- STDMETHOD(get_className)(THIS_ BSTR*) PURE;
- STDMETHOD(put_id)(THIS_ BSTR) PURE;
- STDMETHOD(get_id)(THIS_ BSTR*) PURE;
- STDMETHOD(get_tagName)(THIS_ BSTR*) PURE;
- STDMETHOD(get_parentElement)(THIS_ LPHTMLELEMENT*) PURE;
- STDMETHOD(get_style)(THIS_ LPHTMLSTYLE*) PURE;
- STDMETHOD(put_onhelp)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onhelp)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onclick)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onclick)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_ondblclick)(THIS_ VARIANT) PURE;
- STDMETHOD(get_ondblclick)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onkeydown)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onkeydown)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onkeyup)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onkeyup)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onkeypress)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onkeypress)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onmouseout)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onmouseout)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onmouseover)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onmouseover)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onmousemove)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onmousemove)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onmousedown)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onmousedown)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onmouseup)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onmouseup)(THIS_ VARIANT*) PURE;
- STDMETHOD(get_document)(THIS_ IDispatch**) PURE;
- STDMETHOD(put_title)(THIS_ BSTR) PURE;
- STDMETHOD(get_title)(THIS_ BSTR*) PURE;
- STDMETHOD(put_language)(THIS_ BSTR) PURE;
- STDMETHOD(get_language)(THIS_ BSTR*) PURE;
- STDMETHOD(put_onselectstart)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onselectstart)(THIS_ VARIANT*) PURE;
- STDMETHOD(scrollIntoView)(THIS_ VARIANT) PURE;
- STDMETHOD(contains)(THIS_ LPHTMLELEMENT,VARIANT_BOOL*) PURE;
- STDMETHOD(get_source3Index)(THIS_ long*) PURE;
- STDMETHOD(get_recordNumber)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_lang)(THIS_ BSTR) PURE;
- STDMETHOD(get_lang)(THIS_ BSTR*) PURE;
- STDMETHOD(get_offsetLeft)(THIS_ long*) PURE;
- STDMETHOD(get_offsetTop)(THIS_ long*) PURE;
- STDMETHOD(get_offsetWidth)(THIS_ long*) PURE;
- STDMETHOD(get_offsetHeight)(THIS_ long*) PURE;
- STDMETHOD(get_offsetParent)(THIS_ LPHTMLELEMENT*) PURE;
- STDMETHOD(put_innerHTML)(THIS_ BSTR) PURE;
- STDMETHOD(get_innerHTML)(THIS_ BSTR*) PURE;
- STDMETHOD(put_innerText)(THIS_ BSTR) PURE;
- STDMETHOD(get_innerText)(THIS_ BSTR*) PURE;
- STDMETHOD(put_outerHTML)(THIS_ BSTR) PURE;
- STDMETHOD(get_outerHTML)(THIS_ BSTR*) PURE;
- STDMETHOD(put_outerText)(THIS_ BSTR) PURE;
- STDMETHOD(get_outerText)(THIS_ BSTR*) PURE;
- STDMETHOD(insertAdjacentHTML)(THIS_ BSTR,BSTR) PURE;
- STDMETHOD(insertAdjacentText)(THIS_ BSTR,BSTR) PURE;
- STDMETHOD(get_parentTextEdit)(THIS_ LPHTMLELEMENT*) PURE;
- STDMETHOD(isTextEdit)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(click)(THIS) PURE;
- STDMETHOD(get_filters)(THIS_ LPHTMLFILTERSCOLLECTION*) PURE;
- STDMETHOD(put_ondragstart)(THIS_ VARIANT) PURE;
- STDMETHOD(get_ondragstart)(THIS_ VARIANT*) PURE;
- STDMETHOD(toString)(THIS_ BSTR*) PURE;
- STDMETHOD(put_onbeforeupdate)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onbeforeupdate)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onafterupdate)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onafterupdate)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onerrorupdate)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onerrorupdate)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onrowexit)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onrowexit)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onrowenter)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onrowenter)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_ondatasetchanged)(THIS_ VARIANT) PURE;
- STDMETHOD(get_ondatasetchanged)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_ondataavailable)(THIS_ VARIANT) PURE;
- STDMETHOD(get_ondataavailable)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_ondatasetcomplete)(THIS_ VARIANT) PURE;
- STDMETHOD(get_ondatasetcomplete)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onfilterchange)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onfilterchange)(THIS_ VARIANT*) PURE;
- STDMETHOD(get_children)(THIS_ IDispatch**) PURE;
- STDMETHOD(get_all)(THIS_ IDispatch**) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IHTMLFramesCollection2;
-#define INTERFACE IHTMLFramesCollection2
-DECLARE_INTERFACE_(IHTMLFramesCollection2,IDispatch)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
- STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
-
- STDMETHOD(item)(THIS_ VARIANT*,VARIANT*) PURE;
- STDMETHOD(get_length)(THIS_ long*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IHTMLWindow2;
-#define INTERFACE IHTMLWindow2
-DECLARE_INTERFACE_(IHTMLWindow2,IHTMLFramesCollection2)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
- STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
- STDMETHOD(item)(THIS_ VARIANT*,VARIANT*) PURE;
- STDMETHOD(get_length)(THIS_ long*) PURE;
-
- STDMETHOD(get_frames)(THIS_ IHTMLFramesCollection2**) PURE;
- STDMETHOD(put_defaultStatus)(THIS_ BSTR) PURE;
- STDMETHOD(get_defaultStatus)(THIS_ BSTR*) PURE;
- STDMETHOD(put_status)(THIS_ BSTR) PURE;
- STDMETHOD(get_status)(THIS_ BSTR*) PURE;
- STDMETHOD(setTimeout)(THIS_ BSTR,long,VARIANT*,long*) PURE;
- STDMETHOD(clearTimeout)(THIS_ long) PURE;
- STDMETHOD(alert)(THIS_ BSTR) PURE;
- STDMETHOD(confirm)(THIS_ BSTR,VARIANT_BOOL*) PURE;
- STDMETHOD(prompt)(THIS_ BSTR,BSTR,VARIANT*) PURE;
- STDMETHOD(get_Image)(THIS_ LPHTMLIMAGEELEMENTFACTORY*) PURE;
- STDMETHOD(get_location)(THIS_ LPHTMLLOCATION*) PURE;
- STDMETHOD(get_history)(THIS_ LPOMHISTORY*) PURE;
- STDMETHOD(close)(THIS) PURE;
- STDMETHOD(put_opener)(THIS_ VARIANT) PURE;
- STDMETHOD(get_opener)(THIS_ VARIANT*) PURE;
- STDMETHOD(get_navigator)(THIS_ LPOMNAVIGATOR*) PURE;
- STDMETHOD(put_name)(THIS_ BSTR) PURE;
- STDMETHOD(get_name)(THIS_ BSTR*) PURE;
- STDMETHOD(get_parent)(THIS_ LPHTMLWINDOW2*) PURE;
- STDMETHOD(open)(THIS_ BSTR,BSTR,BSTR,VARIANT_BOOL,LPHTMLWINDOW2*) PURE;
- STDMETHOD(get_self)(THIS_ LPHTMLWINDOW2*) PURE;
- STDMETHOD(get_top)(THIS_ LPHTMLWINDOW2*) PURE;
- STDMETHOD(get_window)(THIS_ LPHTMLWINDOW2*) PURE;
- STDMETHOD(navigate)(THIS_ BSTR) PURE;
- STDMETHOD(put_onfocus)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onfocus)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onblur)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onblur)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onload)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onload)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onbeforeunload)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onbeforeunload)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onunload)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onunload)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onhelp)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onhelp)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onerror)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onerror)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onresize)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onresize)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onscroll)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onscroll)(THIS_ VARIANT*) PURE;
- STDMETHOD(get_document)(THIS_ IHTMLDocument2**) PURE;
- STDMETHOD(get_event)(THIS_ LPHTMLEVENTOBJ*) PURE;
- STDMETHOD(get__newEnum)(THIS_ IUnknown**) PURE;
- STDMETHOD(showModalDialog)(THIS_ BSTR,VARIANT*,VARIANT*,VARIANT*) PURE;
- STDMETHOD(showHelp)(THIS_ BSTR,VARIANT,BSTR) PURE;
- STDMETHOD(get_screen)(THIS_ LPHTMLSCREEN*) PURE;
- STDMETHOD(get_Option)(THIS_ LPHTMLOPTIONELEMENTFACTORY*) PURE;
- STDMETHOD(focus)(THIS) PURE;
- STDMETHOD(get_closed)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(blur)(THIS) PURE;
- STDMETHOD(scroll)(THIS_ long,long) PURE;
- STDMETHOD(get_clientInformation)(THIS_ LPOMNAVIGATOR*) PURE;
- STDMETHOD(setInterval)(THIS_ BSTR,long,VARIANT*,long*) PURE;
- STDMETHOD(clearInterval)(THIS_ long) PURE;
- STDMETHOD(put_offscreenBuffering)(THIS_ VARIANT) PURE;
- STDMETHOD(get_offscreenBuffering)(THIS_ VARIANT*) PURE;
- STDMETHOD(execScript)(THIS_ BSTR,BSTR,VARIANT*) PURE;
- STDMETHOD(toString)(THIS_ BSTR*) PURE;
- STDMETHOD(scrollBy)(THIS_ long,long) PURE;
- STDMETHOD(scrollTo)(THIS_ long,long) PURE;
- STDMETHOD(moveTo)(THIS_ long,long) PURE;
- STDMETHOD(moveBy)(THIS_ long,long) PURE;
- STDMETHOD(resizeTo)(THIS_ long,long) PURE;
- STDMETHOD(resizeBy)(THIS_ long,long) PURE;
- STDMETHOD(get_external)(THIS_ IDispatch**) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IHTMLFrameBase;
-#define INTERFACE IHTMLFrameBase
-DECLARE_INTERFACE_(IHTMLFrameBase,IDispatch)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
- STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
-
- STDMETHOD(put_src)(THIS_ BSTR) PURE;
- STDMETHOD(get_src)(THIS_ BSTR*) PURE;
- STDMETHOD(put_name)(THIS_ BSTR) PURE;
- STDMETHOD(get_name)(THIS_ BSTR*) PURE;
- STDMETHOD(put_border)(THIS_ VARIANT) PURE;
- STDMETHOD(get_border)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_frameBorder)(THIS_ BSTR) PURE;
- STDMETHOD(get_frameBorder)(THIS_ BSTR*) PURE;
- STDMETHOD(put_frameSpacing)(THIS_ VARIANT) PURE;
- STDMETHOD(get_frameSpacing)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_marginWidth)(THIS_ VARIANT) PURE;
- STDMETHOD(get_marginWidth)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_marginHeight)(THIS_ VARIANT) PURE;
- STDMETHOD(get_marginHeight)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_noResize)(THIS_ VARIANT_BOOL) PURE;
- STDMETHOD(get_noResize)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(put_scrolling)(THIS_ BSTR) PURE;
- STDMETHOD(get_scrolling)(THIS_ BSTR*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IHTMLFrameBase2;
-#define INTERFACE IHTMLFrameBase2
-DECLARE_INTERFACE_(IHTMLFrameBase2,IDispatch)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
- STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
-
- STDMETHOD(get_contentWindow)(THIS_ IHTMLWindow2 **) PURE;
- STDMETHOD(put_onload)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onload)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onreadystatechange)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onreadystatechange)(THIS_ VARIANT*) PURE;
- STDMETHOD(get_readyState)(THIS_ BSTR*) PURE;
- STDMETHOD(put_allowTransparency)(THIS_ VARIANT_BOOL) PURE;
- STDMETHOD(get_allowTransparency)(THIS_ VARIANT_BOOL*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IHTMLFrameBase3;
-#define INTERFACE IHTMLFrameBase3
-DECLARE_INTERFACE_(IHTMLFrameBase3,IDispatch)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
- STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
-
- STDMETHOD(put_longDesc)(THIS_ BSTR) PURE;
- STDMETHOD(get_longDesc)(THIS_ BSTR*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IHTMLBodyElement;
-#define INTERFACE IHTMLBodyElement
-DECLARE_INTERFACE_(IHTMLBodyElement,IDispatch)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
- STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
-
- STDMETHOD(put_background)(THIS_ BSTR) PURE;
- STDMETHOD(get_background)(THIS_ BSTR*) PURE;
- STDMETHOD(put_bgProperties)(THIS_ BSTR) PURE;
- STDMETHOD(get_bgProperties)(THIS_ BSTR*) PURE;
- STDMETHOD(put_leftMargin)(THIS_ VARIANT) PURE;
- STDMETHOD(get_leftMargin)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_topMargin)(THIS_ VARIANT) PURE;
- STDMETHOD(get_topMargin)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_rightMargin)(THIS_ VARIANT) PURE;
- STDMETHOD(get_rightMargin)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_bottomMargin)(THIS_ VARIANT) PURE;
- STDMETHOD(get_bottomMargin)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_noWrap)(THIS_ VARIANT_BOOL) PURE;
- STDMETHOD(get_noWrap)(THIS_ VARIANT_BOOL*) PURE;
- STDMETHOD(put_bgColor)(THIS_ VARIANT) PURE;
- STDMETHOD(get_bgColor)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_text)(THIS_ VARIANT) PURE;
- STDMETHOD(get_text)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_link)(THIS_ VARIANT) PURE;
- STDMETHOD(get_link)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_vLink)(THIS_ VARIANT) PURE;
- STDMETHOD(get_vLink)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_aLink)(THIS_ VARIANT) PURE;
- STDMETHOD(get_aLink)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onload)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onload)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onunload)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onunload)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_scroll)(THIS_ BSTR) PURE;
- STDMETHOD(get_scroll)(THIS_ BSTR*) PURE;
- STDMETHOD(put_onselect)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onselect)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onbeforeunload)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onbeforeunload)(THIS_ VARIANT*) PURE;
- STDMETHOD(createTextRange)(THIS_ IHTMLTxtRange**) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IHTMLBodyElement2;
-#define INTERFACE IHTMLBodyElement2
-DECLARE_INTERFACE_(IHTMLBodyElement2,IDispatch)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
- STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
-
- STDMETHOD(put_onbeforeprint)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onbeforeprint)(THIS_ VARIANT*) PURE;
- STDMETHOD(put_onafterprint)(THIS_ VARIANT) PURE;
- STDMETHOD(get_onafterprint)(THIS_ VARIANT*) PURE;
-};
-#undef INTERFACE
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/mswsock.h b/winsup/w32api/include/mswsock.h
deleted file mode 100644
index 0cea0b8..0000000
--- a/winsup/w32api/include/mswsock.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * mswsock.h
- * MS-specific extensions to Windows Sockets, exported from mswsock.dll.
- * These functions are N/A on Windows9x.
- *
- * This file is part of a free library for the Win32 API.
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef _MSWSOCK_H
-#define _MSWSOCK_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define SO_CONNDATA 0x7000
-#define SO_CONNOPT 0x7001
-#define SO_DISCDATA 0x7002
-#define SO_DISCOPT 0x7003
-#define SO_CONNDATALEN 0x7004
-#define SO_CONNOPTLEN 0x7005
-#define SO_DISCDATALEN 0x7006
-#define SO_DISCOPTLEN 0x7007
-#define SO_OPENTYPE 0x7008
-#define SO_SYNCHRONOUS_ALERT 0x10
-#define SO_SYNCHRONOUS_NONALERT 0x20
-#define SO_MAXDG 0x7009
-#define SO_MAXPATHDG 0x700A
-#define SO_UPDATE_ACCEPT_CONTEXT 0x700B
-#define SO_CONNECT_TIME 0x700C
-#define TCP_BSDURGENT 0x7000
-
-#define TF_DISCONNECT 1
-#define TF_REUSE_SOCKET 2
-#define TF_WRITE_BEHIND 4
-#define TF_USE_DEFAULT_WORKER 0
-#define TF_USE_SYSTEM_THREAD 16
-#define TF_USE_KERNEL_APC 32
-
-typedef struct _TRANSMIT_FILE_BUFFERS {
- PVOID Head;
- DWORD HeadLength;
- PVOID Tail;
- DWORD TailLength;
-} TRANSMIT_FILE_BUFFERS, *PTRANSMIT_FILE_BUFFERS, *LPTRANSMIT_FILE_BUFFERS;
-
-int PASCAL WSARecvEx(SOCKET,char*,int,int*);
-BOOL PASCAL TransmitFile(SOCKET,HANDLE,DWORD,DWORD,LPOVERLAPPED,LPTRANSMIT_FILE_BUFFERS,DWORD);
-BOOL PASCAL AcceptEx(SOCKET,SOCKET,PVOID,DWORD,DWORD,DWORD,LPDWORD,LPOVERLAPPED);
-VOID PASCAL GetAcceptExSockaddrs(PVOID,DWORD,DWORD,DWORD,struct sockaddr**, LPINT, struct sockaddr**, LPINT);
-
-#ifdef _WINSOCK2_H /* These require the winsock2 interface. */
-
-#define TP_ELEMENT_FILE 1
-#define TP_ELEMENT_MEMORY 2
-#define TP_ELEMENT_EOP 4
-
-typedef struct _TRANSMIT_PACKETS_ELEMENT {
- ULONG dwElFlags;
- ULONG cLength;
- _ANONYMOUS_UNION
- union {
- struct {
- LARGE_INTEGER nFileOffset;
- HANDLE hFile;
- };
- PVOID pBuffer;
- };
-} TRANSMIT_PACKETS_ELEMENT;
-
-typedef struct _WSAMSG {
- LPSOCKADDR name;
- INT namelen;
- LPWSABUF lpBuffers;
- DWORD dwBufferCount;
- WSABUF Control;
- DWORD dwFlags;
-} WSAMSG, *PWSAMSG, *LPWSAMSG;
-
-
-/* According to MSDN docs, the WSAMSG.Control buffer starts with a
- cmsghdr header of the following form. See also RFC 2292. */
-
-typedef struct wsacmsghdr {
- UINT cmsg_len;
- INT cmsg_level;
- INT cmsg_type;
- /* followed by UCHAR cmsg_data[]; */
-} WSACMSGHDR;
-
-/* TODO: Standard Posix.1g macros as per RFC 2292, with WSA_uglification. */
-#if 0
-#define WSA_CMSG_FIRSTHDR(mhdr)
-#define WSA_CMSG_NXTHDR(mhdr, cmsg)
-#define WSA_CMSG_SPACE(length)
-#define WSA_CMSG_LEN(length)
-#endif
-
-BOOL PASCAL DisconnectEx(SOCKET,LPOVERLAPPED,DWORD,DWORD);
-int PASCAL WSARecvMsg(SOCKET,LPWSAMSG,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
-
-#endif /* _WINSOCK2_H */
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _MSWSOCK_H */
-
diff --git a/winsup/w32api/include/nb30.h b/winsup/w32api/include/nb30.h
deleted file mode 100644
index c0ef0e5..0000000
--- a/winsup/w32api/include/nb30.h
+++ /dev/null
@@ -1,186 +0,0 @@
-#ifndef _NB30_H
-#define _NB30_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define NCBNAMSZ 16
-#define MAX_LANA 254
-#define NAME_FLAGS_MASK 0x87
-#define GROUP_NAME 0x80
-#define UNIQUE_NAME 0x00
-#define REGISTERING 0x00
-#define REGISTERED 0x04
-#define DEREGISTERED 0x05
-#define DUPLICATE 0x06
-#define DUPLICATE_DEREG 0x07
-#define LISTEN_OUTSTANDING 0x01
-#define CALL_PENDING 0x02
-#define SESSION_ESTABLISHED 0x03
-#define HANGUP_PENDING 0x04
-#define HANGUP_COMPLETE 0x05
-#define SESSION_ABORTED 0x06
-#define ALL_TRANSPORTS "M\0\0\0"
-#define MS_NBF "MNBF"
-#define NCBCALL 0x10
-#define NCBLISTEN 0x11
-#define NCBHANGUP 0x12
-#define NCBSEND 0x14
-#define NCBRECV 0x15
-#define NCBRECVANY 0x16
-#define NCBCHAINSEND 0x17
-#define NCBDGSEND 0x20
-#define NCBDGRECV 0x21
-#define NCBDGSENDBC 0x22
-#define NCBDGRECVBC 0x23
-#define NCBADDNAME 0x30
-#define NCBDELNAME 0x31
-#define NCBRESET 0x32
-#define NCBASTAT 0x33
-#define NCBSSTAT 0x34
-#define NCBCANCEL 0x35
-#define NCBADDGRNAME 0x36
-#define NCBENUM 0x37
-#define NCBUNLINK 0x70
-#define NCBSENDNA 0x71
-#define NCBCHAINSENDNA 0x72
-#define NCBLANSTALERT 0x73
-#define NCBACTION 0x77
-#define NCBFINDNAME 0x78
-#define NCBTRACE 0x79
-#define ASYNCH 0x80
-#define NRC_GOODRET 0x00
-#define NRC_BUFLEN 0x01
-#define NRC_ILLCMD 0x03
-#define NRC_CMDTMO 0x05
-#define NRC_INCOMP 0x06
-#define NRC_BADDR 0x07
-#define NRC_SNUMOUT 0x08
-#define NRC_NORES 0x09
-#define NRC_SCLOSED 0x0a
-#define NRC_CMDCAN 0x0b
-#define NRC_DUPNAME 0x0d
-#define NRC_NAMTFUL 0x0e
-#define NRC_ACTSES 0x0f
-#define NRC_LOCTFUL 0x11
-#define NRC_REMTFUL 0x12
-#define NRC_ILLNN 0x13
-#define NRC_NOCALL 0x14
-#define NRC_NOWILD 0x15
-#define NRC_INUSE 0x16
-#define NRC_NAMERR 0x17
-#define NRC_SABORT 0x18
-#define NRC_NAMCONF 0x19
-#define NRC_IFBUSY 0x21
-#define NRC_TOOMANY 0x22
-#define NRC_BRIDGE 0x23
-#define NRC_CANOCCR 0x24
-#define NRC_CANCEL 0x26
-#define NRC_DUPENV 0x30
-#define NRC_ENVNOTDEF 0x34
-#define NRC_OSRESNOTAV 0x35
-#define NRC_MAXAPPS 0x36
-#define NRC_NOSAPS 0x37
-#define NRC_NORESOURCES 0x38
-#define NRC_INVADDRESS 0x39
-#define NRC_INVDDID 0x3B
-#define NRC_LOCKFAIL 0x3C
-#define NRC_OPENERR 0x3f
-#define NRC_SYSTEM 0x40
-#define NRC_PENDING 0xff
-#define NCB_POST void CALLBACK
-typedef struct _ACTION_HEADER {
- ULONG transport_id;
- USHORT action_code;
- USHORT reserved;
-} ACTION_HEADER,*PACTION_HEADER;
-typedef struct _ADAPTER_STATUS {
- UCHAR adapter_address[6];
- UCHAR rev_major;
- UCHAR reserved0;
- UCHAR adapter_type;
- UCHAR rev_minor;
- WORD duration;
- WORD frmr_recv;
- WORD frmr_xmit;
- WORD iframe_recv_err;
- WORD xmit_aborts;
- DWORD xmit_success;
- DWORD recv_success;
- WORD iframe_xmit_err;
- WORD recv_buff_unavail;
- WORD t1_timeouts;
- WORD ti_timeouts;
- DWORD reserved1;
- WORD free_ncbs;
- WORD max_cfg_ncbs;
- WORD max_ncbs;
- WORD xmit_buf_unavail;
- WORD max_dgram_size;
- WORD pending_sess;
- WORD max_cfg_sess;
- WORD max_sess;
- WORD max_sess_pkt_size;
- WORD name_count;
-} ADAPTER_STATUS,*PADAPTER_STATUS;
-typedef struct _FIND_NAME_BUFFER {
- UCHAR length;
- UCHAR access_control;
- UCHAR frame_control;
- UCHAR destination_addr[6];
- UCHAR source_addr[6];
- UCHAR routing_info[18];
-} FIND_NAME_BUFFER,*PFIND_NAME_BUFFER;
-typedef struct _FIND_NAME_HEADER {
- WORD node_count;
- UCHAR reserved;
- UCHAR unique_group;
-} FIND_NAME_HEADER,*PFIND_NAME_HEADER;
-typedef struct _LANA_ENUM {
- UCHAR length;
- UCHAR lana[MAX_LANA+1];
-} LANA_ENUM,*PLANA_ENUM;
-typedef struct _NAME_BUFFER {
- UCHAR name[NCBNAMSZ];
- UCHAR name_num;
- UCHAR name_flags;
-} NAME_BUFFER,*PNAME_BUFFER;
-typedef struct _NCB {
- UCHAR ncb_command;
- UCHAR ncb_retcode;
- UCHAR ncb_lsn;
- UCHAR ncb_num;
- PUCHAR ncb_buffer;
- WORD ncb_length;
- UCHAR ncb_callname[NCBNAMSZ];
- UCHAR ncb_name[NCBNAMSZ];
- UCHAR ncb_rto;
- UCHAR ncb_sto;
- void (CALLBACK *ncb_post)(struct _NCB*);
- UCHAR ncb_lana_num;
- UCHAR ncb_cmd_cplt;
- UCHAR ncb_reserve[10];
- HANDLE ncb_event;
-} NCB,*PNCB;
-typedef struct _SESSION_BUFFER {
- UCHAR lsn;
- UCHAR state;
- UCHAR local_name[NCBNAMSZ];
- UCHAR remote_name[NCBNAMSZ];
- UCHAR rcvs_outstanding;
- UCHAR sends_outstanding;
-} SESSION_BUFFER,*PSESSION_BUFFER;
-typedef struct _SESSION_HEADER {
- UCHAR sess_name;
- UCHAR num_sess;
- UCHAR rcv_dg_outstanding;
- UCHAR rcv_any_outstanding;
-} SESSION_HEADER,*PSESSION_HEADER;
-UCHAR WINAPI Netbios(PNCB);
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/nddeapi.h b/winsup/w32api/include/nddeapi.h
deleted file mode 100644
index a6ea207..0000000
--- a/winsup/w32api/include/nddeapi.h
+++ /dev/null
@@ -1,133 +0,0 @@
-#ifndef _NDDEAPI_H
-#define _NDDEAPI_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifndef CNLEN /* also in lmcons.h */
-#define CNLEN 15
-#define UNCLEN (CNLEN + 2)
-#endif
-#define SEP_CHAR ','
-#define BAR_CHAR "|"
-#define SEP_WCHAR L','
-#define BAR_WCHAR L"|"
-#define NDDE_NO_ERROR 0
-#define NDDE_ACCESS_DENIED 1
-#define NDDE_BUF_TOO_SMALL 2
-#define NDDE_ERROR_MORE_DATA 3
-#define NDDE_INVALID_SERVER 4
-#define NDDE_INVALID_SHARE 5
-#define NDDE_INVALID_PARAMETER 6
-#define NDDE_INVALID_LEVEL 7
-#define NDDE_INVALID_PASSWORD 8
-#define NDDE_INVALID_ITEMNAME 9
-#define NDDE_INVALID_TOPIC 10
-#define NDDE_INTERNAL_ERROR 11
-#define NDDE_OUT_OF_MEMORY 12
-#define NDDE_INVALID_APPNAME 13
-#define NDDE_NOT_IMPLEMENTED 14
-#define NDDE_SHARE_ALREADY_EXIST 15
-#define NDDE_SHARE_NOT_EXIST 16
-#define NDDE_INVALID_FILENAME 17
-#define NDDE_NOT_RUNNING 18
-#define NDDE_INVALID_WINDOW 19
-#define NDDE_INVALID_SESSION 20
-#define NDDE_INVALID_ITEM_LIST 21
-#define NDDE_SHARE_DATA_CORRUPTED 22
-#define NDDE_REGISTRY_ERROR 23
-#define NDDE_CANT_ACCESS_SERVER 24
-#define NDDE_INVALID_SPECIAL_COMMAND 25
-#define NDDE_INVALID_SECURITY_DESC 26
-#define NDDE_TRUST_SHARE_FAIL 27
-#define MAX_NDDESHARENAME 256
-#define MAX_DOMAINNAME 15
-#define MAX_USERNAME 15
-#define MAX_APPNAME 255
-#define MAX_TOPICNAME 255
-#define MAX_ITEMNAME 255
-#define NDDEF_NOPASSWORDPROMPT 0x0001
-#define NDDEF_NOCACHELOOKUP 0x0002
-#define NDDEF_STRIP_NDDE 0x0004
-#define SHARE_TYPE_OLD 0x01
-#define SHARE_TYPE_NEW 0x02
-#define SHARE_TYPE_STATIC 0x04
-#define NDDE_TRUST_SHARE_START 0x80000000L
-#define NDDE_TRUST_SHARE_INIT 0x40000000L
-#define NDDE_TRUST_SHARE_DEL 0x20000000L
-#define NDDE_TRUST_CMD_SHOW 0x10000000L
-#define NDDE_CMD_SHOW_MASK 0x0000FFFFL
-struct NDdeShareInfo_tag {
- LONG lRevision;
- LPTSTR lpszShareName;
- LONG lShareType;
- LPTSTR lpszAppTopicList;
- LONG fSharedFlag;
- LONG fService;
- LONG fStartAppFlag;
- LONG nCmdShow;
- LONG qModifyId[2];
- LONG cNumItems;
- LPTSTR lpszItemList;
-} NDDESHAREINFO,*PNDDESHAREINFO;
-
-UINT WINAPI NDdeGetErrorStringA(UINT,LPSTR,DWORD);
-UINT WINAPI NDdeGetErrorStringW(UINT,LPWSTR,DWORD);
-UINT WINAPI NDdeGetShareSecurityA(LPSTR,LPSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,PDWORD);
-UINT WINAPI NDdeGetShareSecurityW(LPWSTR,LPWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,PDWORD);
-UINT WINAPI NDdeGetTrustedShareA(LPSTR,LPSTR,PDWORD,PDWORD,PDWORD);
-UINT WINAPI NDdeGetTrustedShareW(LPWSTR,LPWSTR,PDWORD,PDWORD,PDWORD);
-BOOL WINAPI NDdeIsValidShareNameA(LPSTR);
-BOOL WINAPI NDdeIsValidShareNameW(LPWSTR);
-BOOL WINAPI NDdeIsValidAppTopicListA(LPSTR);
-BOOL WINAPI NDdeIsValidAppTopicListW(LPWSTR);
-UINT WINAPI NDdeSetShareSecurityA(LPSTR,LPSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
-UINT WINAPI NDdeSetShareSecurityW(LPWSTR,LPWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
-UINT WINAPI NDdeSetTrustedShareA(LPSTR,LPSTR,DWORD);
-UINT WINAPI NDdeSetTrustedShareW(LPWSTR,LPWSTR,DWORD);
-UINT WINAPI NDdeShareAddA(LPSTR,UINT,PSECURITY_DESCRIPTOR,PBYTE,DWORD);
-UINT WINAPI NDdeShareAddW(LPWSTR,UINT,PSECURITY_DESCRIPTOR,PBYTE,DWORD);
-UINT WINAPI NDdeShareDelA(LPSTR,LPSTR,UINT);
-UINT WINAPI NDdeShareDelW(LPWSTR,LPWSTR,UINT);
-UINT WINAPI NDdeShareEnumA(LPSTR,UINT,PBYTE,DWORD,PDWORD,PDWORD);
-UINT WINAPI NDdeShareEnumW(LPWSTR,UINT,PBYTE,DWORD,PDWORD,PDWORD);
-UINT WINAPI NDdeShareGetInfoA(LPSTR,LPSTR,UINT,PBYTE,DWORD,PDWORD,PWORD);
-UINT WINAPI NDdeShareGetInfoW(LPWSTR,LPWSTR,UINT,PBYTE,DWORD,PDWORD,PWORD);
-UINT WINAPI NDdeShareSetInfoA(LPSTR,LPSTR,UINT,PBYTE,DWORD,WORD);
-UINT WINAPI NDdeShareSetInfoW(LPWSTR,LPWSTR,UINT,PBYTE,DWORD,WORD);
-UINT WINAPI NDdeTrustedShareEnumA(LPSTR,UINT,PBYTE,DWORD,PDWORD,PDWORD);
-UINT WINAPI NDdeTrustedShareEnumW(LPWSTR,UINT,PBYTE,DWORD,PDWORD,PDWORD);
-#ifdef UNICODE
-#define NDdeShareAdd NDdeShareAddW
-#define NDdeShareDel NDdeShareDelW
-#define NDdeSetShareSecurity NDdeSetShareSecurityW
-#define NDdeGetShareSecurity NDdeGetShareSecurityW
-#define NDdeShareEnum NDdeShareEnumW
-#define NDdeShareGetInfo NDdeShareGetInfoW
-#define NDdeShareSetInfo NDdeShareSetInfoW
-#define NDdeGetErrorString NDdeGetErrorStringW
-#define NDdeSetTrustedShare NDdeSetTrustedShareW
-#define NDdeGetTrustedShare NDdeGetTrustedShareW
-#define NDdeTrustedShareEnum NDdeTrustedShareEnumW
-#else
-#define NDdeShareAdd NDdeShareAddA
-#define NDdeShareDel NDdeShareDelA
-#define NDdeSetShareSecurity NDdeSetShareSecurityA
-#define NDdeGetShareSecurity NDdeGetShareSecurityA
-#define NDdeShareEnum NDdeShareEnumA
-#define NDdeShareGetInfo NDdeShareGetInfoA
-#define NDdeShareSetInfo NDdeShareSetInfoA
-#define NDdeGetErrorString NDdeGetErrorStringA
-#define NDdeIsValidShareName NDdeIsValidShareNameA
-#define NDdeIsValidAppTopicList NDdeIsValidAppTopicListA
-#define NDdeSetTrustedShare NDdeSetTrustedShareA
-#define NDdeGetTrustedShare NDdeGetTrustedShareA
-#define NDdeTrustedShareEnum NDdeTrustedShareEnumA
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/nspapi.h b/winsup/w32api/include/nspapi.h
deleted file mode 100644
index 463b139..0000000
--- a/winsup/w32api/include/nspapi.h
+++ /dev/null
@@ -1,126 +0,0 @@
-#ifndef _NSPAPI_H
-#define _NSPAPI_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define NS_ALL 0
-
-#define NS_SAP 1
-#define NS_NDS 2
-#define NS_PEER_BROWSE 3
-
-#define NS_TCPIP_LOCAL 10
-#define NS_TCPIP_HOSTS 11
-#define NS_DNS 12
-#define NS_NETBT 13
-#define NS_WINS 14
-
-#define NS_NBP 20
-
-#define NS_MS 30
-#define NS_STDA 31
-#define NS_NTDS 32
-
-#define NS_X500 40
-#define NS_NIS 41
-#define NS_NISPLUS 42
-
-#define NS_WRQ 50
-
-#define SERVICE_REGISTER 1
-#define SERVICE_DEREGISTER 2
-#define SERVICE_FLUSH 3
-#define SERVICE_FLAG_HARD 0x00000002
-
-#ifndef RC_INVOKED
-
-#if defined (_WINSOCK_H) || defined (_WINSOCK2_H) /* needed for LPSOCKADDR */
-#ifndef __CSADDR_T_DEFINED /* also in winsock2.h, but not in winsock.h */
-#define __CSADDR_T_DEFINED
-typedef struct _SOCKET_ADDRESS {
- LPSOCKADDR lpSockaddr;
- INT iSockaddrLength;
-} SOCKET_ADDRESS,*PSOCKET_ADDRESS,*LPSOCKET_ADDRESS;
-typedef struct _CSADDR_INFO {
- SOCKET_ADDRESS LocalAddr;
- SOCKET_ADDRESS RemoteAddr;
- INT iSocketType;
- INT iProtocol;
-} CSADDR_INFO,*PCSADDR_INFO,*LPCSADDR_INFO;
-#endif
-#endif
-
-#ifndef __BLOB_T_DEFINED /* also in wtypes.h and winsock2.h */
-#define __BLOB_T_DEFINED
-typedef struct _BLOB {
- ULONG cbSize;
- BYTE *pBlobData;
-} BLOB,*PBLOB,*LPBLOB;
-#endif
-
-typedef struct _SERVICE_ADDRESS {
- DWORD dwAddressType;
- DWORD dwAddressFlags;
- DWORD dwAddressLength;
- DWORD dwPrincipalLength;
- BYTE *lpAddress;
- BYTE *lpPrincipal;
-} SERVICE_ADDRESS;
-typedef struct _SERVICE_ADDRESSES {
- DWORD dwAddressCount;
- SERVICE_ADDRESS Addresses[1];
-} SERVICE_ADDRESSES, *PSERVICE_ADDRESSES, *LPSERVICE_ADDRESSES;
-typedef struct _SERVICE_INFOA {
- LPGUID lpServiceType;
- LPSTR lpServiceName;
- LPSTR lpComment;
- LPSTR lpLocale;
- DWORD dwDisplayHint;
- DWORD dwVersion;
- DWORD dwTime;
- LPSTR lpMachineName;
- LPSERVICE_ADDRESSES lpServiceAddress;
- BLOB ServiceSpecificInfo;
-} SERVICE_INFOA, *LPSERVICE_INFOA;
-typedef struct _SERVICE_INFOW {
- LPGUID lpServiceType;
- LPWSTR lpServiceName;
- LPWSTR lpComment;
- LPWSTR lpLocale;
- DWORD dwDisplayHint;
- DWORD dwVersion;
- DWORD dwTime;
- LPWSTR lpMachineName;
- LPSERVICE_ADDRESSES lpServiceAddress;
- BLOB ServiceSpecificInfo;
-} SERVICE_INFOW, *LPSERVICE_INFOW;
-
-typedef void *LPSERVICE_ASYNC_INFO;
-INT WINAPI SetServiceA(DWORD,DWORD,DWORD,LPSERVICE_INFOA,LPSERVICE_ASYNC_INFO,LPDWORD);
-INT WINAPI SetServiceW(DWORD,DWORD,DWORD,LPSERVICE_INFOW,LPSERVICE_ASYNC_INFO,LPDWORD);
-INT WINAPI GetAddressByNameA(DWORD,LPGUID,LPSTR,LPINT,DWORD,LPSERVICE_ASYNC_INFO,LPVOID,LPDWORD,LPSTR,LPDWORD);
-INT WINAPI GetAddressByNameW(DWORD,LPGUID,LPWSTR,LPINT,DWORD,LPSERVICE_ASYNC_INFO,LPVOID,LPDWORD,LPWSTR,LPDWORD);
-
-#ifdef UNICODE
-typedef SERVICE_INFOW SERVICE_INFO, *LPSERVICE_INFO;
-#define _SERVICE_INFO SERVICE_INFOW
-#define SetService SetServiceW
-#define GetAddressByName GetAddressByNameW
-#else
-typedef SERVICE_INFOA SERVICE_INFO, *LPSERVICE_INFO;
-#define _SERVICE_INFO SERVICE_INFOA
-#define SetService SetServiceA
-#define GetAddressByName GetAddressByNameA
-#endif
-
-#endif /* RC_INVOKED */
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _NSPAPI_H */
diff --git a/winsup/w32api/include/ntdef.h b/winsup/w32api/include/ntdef.h
deleted file mode 100644
index 83f4fa3..0000000
--- a/winsup/w32api/include/ntdef.h
+++ /dev/null
@@ -1,60 +0,0 @@
-#ifndef _NTDEF_H
-#define _NTDEF_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#define NTAPI __stdcall
-#define OBJ_INHERIT 2L
-#define OBJ_PERMANENT 16L
-#define OBJ_EXCLUSIVE 32L
-#define OBJ_CASE_INSENSITIVE 64L
-#define OBJ_OPENIF 128L
-#define OBJ_OPENLINK 256L
-#define OBJ_VALID_ATTRIBUTES 498L
-#define InitializeObjectAttributes(p,n,a,r,s) { \
- (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
- (p)->RootDirectory = (r); \
- (p)->Attributes = (a); \
- (p)->ObjectName = (n); \
- (p)->SecurityDescriptor = (s); \
- (p)->SecurityQualityOfService = NULL; \
-}
-#ifndef NT_SUCCESS
-#define NT_SUCCESS(x) ((x)>=0)
-#define STATUS_SUCCESS ((NTSTATUS)0)
-#endif
-#if !defined(_NTSECAPI_H) && !defined(_SUBAUTH_H)
-typedef LONG NTSTATUS, *PNTSTATUS;
-typedef struct _UNICODE_STRING {
- USHORT Length;
- USHORT MaximumLength;
- PWSTR Buffer;
-} UNICODE_STRING, *PUNICODE_STRING;
-typedef const UNICODE_STRING* PCUNICODE_STRING;
-typedef struct _STRING {
- USHORT Length;
- USHORT MaximumLength;
- PCHAR Buffer;
-} STRING, *PSTRING;
-#endif
-typedef STRING ANSI_STRING;
-typedef PSTRING PANSI_STRING;
-typedef STRING OEM_STRING;
-typedef PSTRING POEM_STRING;
-typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS;
-typedef enum _SECTION_INHERIT {
- ViewShare = 1,
- ViewUnmap = 2
-} SECTION_INHERIT;
-#if !defined(_NTSECAPI_H)
-typedef struct _OBJECT_ATTRIBUTES {
- ULONG Length;
- HANDLE RootDirectory;
- PUNICODE_STRING ObjectName;
- ULONG Attributes;
- PVOID SecurityDescriptor;
- PVOID SecurityQualityOfService;
-} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
-#endif
-#endif /* _NTDEF_H */
diff --git a/winsup/w32api/include/ntdll.h b/winsup/w32api/include/ntdll.h
deleted file mode 100644
index b666613..0000000
--- a/winsup/w32api/include/ntdll.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef _NTDLL_H
-#define _NTDLL_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-typedef enum _SHUTDOWN_ACTION {
- ShutdownNoReboot,
- ShutdownReboot,
- ShutdownPowerOff
- } SHUTDOWN_ACTION;
-
-DWORD WINAPI NtShutdownSystem (SHUTDOWN_ACTION Action);
-
-#endif /* _NTDLL_H */
diff --git a/winsup/w32api/include/ntdsapi.h b/winsup/w32api/include/ntdsapi.h
deleted file mode 100644
index 2218bee..0000000
--- a/winsup/w32api/include/ntdsapi.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * ntdsapi.h - Active Directory
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may use,
- * modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-#ifndef _NTDSAPI_H
-#define _NTDSAPI_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- Active Directory Reference - Active Directory Enumerations */
-#if (_WIN32_WINNT >= 0x0501)
-typedef enum _DS_MANGLE_FOR {
- DS_MANGLE_UNKNOWN = 0,
- DS_MANGLE_OBJECT_RDN_FOR_DELETION = 1,
- DS_MANGLE_OBJECT_RDN_FOR_NAME_CONFLICT = 2
-} DS_MANGLE_FOR;
-#endif /* (_WIN32_WINNT >= 0x0501) */
-#if (_WIN32_WINNT >= 0x0500)
-typedef enum {
- DS_NAME_NO_ERROR = 0,
- DS_NAME_ERROR_RESOLVING = 1,
- DS_NAME_ERROR_NOT_FOUND = 2,
- DS_NAME_ERROR_NOT_UNIQUE = 3,
- DS_NAME_ERROR_NO_MAPPING = 4,
- DS_NAME_ERROR_DOMAIN_ONLY = 5,
- DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING = 6,
- DS_NAME_ERROR_TRUST_REFERRAL = 7
-} DS_NAME_ERROR;
-typedef enum {
- DS_NAME_NO_FLAGS = 0x0,
- DS_NAME_FLAG_SYNTACTICAL_ONLY = 0x1,
- DS_NAME_FLAG_EVAL_AT_DC = 0x2,
- DS_NAME_FLAG_GCVERIFY = 0x4,
- DS_NAME_FLAG_TRUST_REFERRAL = 0x8
-} DS_NAME_FLAGS;
-typedef enum {
- DS_UNKNOWN_NAME = 0,
- DS_FQDN_1779_NAME = 1,
- DS_NT4_ACCOUNT_NAME = 2,
- DS_DISPLAY_NAME = 3,
- DS_UNIQUE_ID_NAME = 6,
- DS_CANONICAL_NAME = 7,
- DS_USER_PRINCIPAL_NAME = 8,
- DS_CANONICAL_NAME_EX = 9,
- DS_SERVICE_PRINCIPAL_NAME = 10,
- DS_SID_OR_SID_HISTORY_NAME = 11,
- DS_DNS_DOMAIN_NAME = 12
-} DS_NAME_FORMAT;
-typedef enum _DS_REPL_INFO_TYPE {
- DS_REPL_INFO_NEIGHBORS = 0,
- DS_REPL_INFO_CURSORS_FOR_NC = 1,
- DS_REPL_INFO_METADATA_FOR_OBJ = 2,
- DS_REPL_INFO_KCC_DSA_CONNECT_FAILURES = 3,
- DS_REPL_INFO_KCC_DSA_LINK_FAILURES = 4,
- DS_REPL_INFO_PENDING_OPS = 5,
- DS_REPL_INFO_METADATA_FOR_ATTR_VALUE = 6,
- DS_REPL_INFO_CURSORS_2_FOR_NC = 7,
- DS_REPL_INFO_CURSORS_3_FOR_NC = 8,
- DS_REPL_INFO_METADATA_2_FOR_OBJ = 9,
- DS_REPL_INFO_METADATA_2_FOR_ATTR_VALUE = 10
-} DS_REPL_INFO_TYPE;
-typedef enum {
- DS_REPL_OP_TYPE_SYNC = 0,
- DS_REPL_OP_TYPE_ADD,
- DS_REPL_OP_TYPE_DELETE,
- DS_REPL_OP_TYPE_MODIFY,
- DS_REPL_OP_TYPE_UPDATE_REFS
-} DS_REPL_OP_TYPE;
-typedef enum {
- DS_REPSYNCALL_WIN32_ERROR_CONTACTING_SERVER = 0,
- DS_REPSYNCALL_WIN32_ERROR_REPLICATING = 1,
- DS_REPSYNCALL_SERVER_UNREACHABLE = 2
-} DS_REPSYNCALL_ERROR;
-typedef enum {
- DS_REPSYNCALL_EVENT_ERROR = 0,
- DS_REPSYNCALL_EVENT_SYNC_STARTED = 1,
- DS_REPSYNCALL_EVENT_SYNC_COMPLETED = 2,
- DS_REPSYNCALL_EVENT_FINISHED = 3
-} DS_REPSYNCALL_EVENT;
-typedef enum {
- DS_SPN_DNS_HOST = 0,
- DS_SPN_DN_HOST = 1,
- DS_SPN_NB_HOST = 2,
- DS_SPN_DOMAIN = 3,
- DS_SPN_NB_DOMAIN = 4,
- DS_SPN_SERVICE = 5
-} DS_SPN_NAME_TYPE;
-typedef enum {
- DS_SPN_ADD_SPN_OP = 0,
- DS_SPN_REPLACE_SPN_OP = 1,
- DS_SPN_DELETE_SPN_OP = 2
-} DS_SPN_WRITE_OP;
-
-
-#endif /* (_WIN32_WINNT >= 0x0500) */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/ntdsbcli.h b/winsup/w32api/include/ntdsbcli.h
deleted file mode 100644
index 3508fef..0000000
--- a/winsup/w32api/include/ntdsbcli.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * ntdsbcli.h - Active Directory
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may use,
- * modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-#ifndef _NTDSBCLI_H
-#define _NTDSBCLI_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- Active Directory Reference - Active Directory Structures - Directory Backup Structures */
-#if (_WIN32_WINNT >= 0x0500)
-typedef struct {
- LPSTR szDatabaseName;
- LPSTR szNewDatabaseName;
-} EDB_RSTMAPA,*PEDB_RSTMAPA;
-typedef struct {
- LPWSTR szDatabaseName;
- LPWSTR szNewDatabaseName;
-} EDB_RSTMAPW,*PEDB_RSTMAPW;
-#ifdef UNICODE
-typedef EDB_RSTMAPW EDB_RSTMAP,*PEDB_RSTMAP;
-#else
-typedef EDB_RSTMAPA EDB_RSTMAP,*PEDB_RSTMAP;
-#endif
-#endif /* (_WIN32_WINNT >= 0x0500) */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/ntldap.h b/winsup/w32api/include/ntldap.h
deleted file mode 100644
index 29236a0..0000000
--- a/winsup/w32api/include/ntldap.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- ntldap.h - Header file for the Windows LDAP API Extensions
-
- Written by Filip Navara <xnavara@volny.cz>
-
- References:
- Lightweight Directory Access Protocol Reference
- http://msdn.microsoft.com/library/en-us/netdir/ldap/ldap_reference.asp
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-*/
-
-#ifndef _NTLDAP_H
-#define _NTLDAP_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#define LDAP_SERVER_ASQ_OID "1.2.840.113556.1.4.1504"
-#define LDAP_SERVER_ASQ_OID_W L"1.2.840.113556.1.4.1504"
-#define LDAP_SERVER_DIRSYNC_OID "1.2.840.113556.1.4.841"
-#define LDAP_SERVER_DIRSYNC_OID_W L"1.2.840.113556.1.4.841"
-#define LDAP_SERVER_SD_FLAGS_OID "1.2.840.113556.1.4.801"
-#define LDAP_SERVER_SD_FLAGS_OID_W L"1.2.840.113556.1.4.801"
-#define LDAP_SERVER_FAST_BIND_OID "1.2.840.113556.1.4.1781"
-#define LDAP_SERVER_FAST_BIND_OID_W L"1.2.840.113556.1.4.1781"
-#define LDAP_MATCHING_RULE_BIT_OR "1.2.840.113556.1.4.804"
-#define LDAP_MATCHING_RULE_BIT_OR_W L"1.2.840.113556.1.4.804"
-#define LDAP_MATCHING_RULE_BIT_AND "1.2.840.113556.1.4.803"
-#define LDAP_MATCHING_RULE_BIT_AND_W L"1.2.840.113556.1.4.803"
-#define LDAP_SERVER_EXTENDED_DN_OID "1.2.840.113556.1.4.529"
-#define LDAP_SERVER_EXTENDED_DN_OID_W L"1.2.840.113556.1.4.529"
-#define LDAP_SERVER_LAZY_COMMIT_OID "1.2.840.113556.1.4.619"
-#define LDAP_SERVER_LAZY_COMMIT_OID_W L"1.2.840.113556.1.4.619"
-#define LDAP_SERVER_TREE_DELETE_OID "1.2.840.113556.1.4.805"
-#define LDAP_SERVER_TREE_DELETE_OID_W L"1.2.840.113556.1.4.805"
-#define LDAP_SERVER_VERIFY_NAME_OID "1.2.840.113556.1.4.1338"
-#define LDAP_SERVER_VERIFY_NAME_OID_W L"1.2.840.113556.1.4.1338"
-#define LDAP_SERVER_SHOW_DELETED_OID "1.2.840.113556.1.4.417"
-#define LDAP_SERVER_SHOW_DELETED_OID_W L"1.2.840.113556.1.4.417"
-#define LDAP_SERVER_NOTIFICATION_OID "1.2.840.113556.1.4.528"
-#define LDAP_SERVER_NOTIFICATION_OID_W L"1.2.840.113556.1.4.528"
-#define LDAP_SERVER_DOMAIN_SCOPE_OID "1.2.840.113556.1.4.1339"
-#define LDAP_SERVER_DOMAIN_SCOPE_OID_W L"1.2.840.113556.1.4.1339"
-#define LDAP_CAP_ACTIVE_DIRECTORY_OID "1.2.840.113556.1.4.800"
-#define LDAP_CAP_ACTIVE_DIRECTORY_OID_W L"1.2.840.113556.1.4.800"
-#define LDAP_SERVER_SEARCH_OPTIONS_OID "1.2.840.113556.1.4.1340"
-#define LDAP_SERVER_SEARCH_OPTIONS_OID_W L"1.2.840.113556.1.4.1340"
-#define LDAP_CAP_ACTIVE_DIRECTORY_V51_OID "1.2.840.113556.1.4.1670"
-#define LDAP_CAP_ACTIVE_DIRECTORY_V51_OID_W L"1.2.840.113556.1.4.1670"
-#define LDAP_SERVER_PERMISSIVE_MODIFY_OID "1.2.840.113556.1.4.1413"
-#define LDAP_SERVER_PERMISSIVE_MODIFY_OID_W L"1.2.840.113556.1.4.1413"
-#define LDAP_SERVER_CROSSDOM_MOVE_TARGET_OID "1.2.840.113556.1.4.521"
-#define LDAP_SERVER_CROSSDOM_MOVE_TARGET_OID_W L"1.2.840.113556.1.4.521"
-#define SERVER_SEARCH_FLAG_DOMAIN_SCOPE 1
-#define SERVER_SEARCH_FLAG_PHANTOM_ROOT 2
-
-#endif /* _NTLDAP_H */
diff --git a/winsup/w32api/include/ntsecapi.h b/winsup/w32api/include/ntsecapi.h
deleted file mode 100644
index a57cfca..0000000
--- a/winsup/w32api/include/ntsecapi.h
+++ /dev/null
@@ -1,612 +0,0 @@
-#ifndef _NTSECAPI_H
-#define _NTSECAPI_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define KERB_WRAP_NO_ENCRYPT 0x80000001
-#define LOGON_GUEST 1
-#define LOGON_NOENCRYPTION 2
-#define LOGON_CACHED_ACCOUNT 4
-#define LOGON_USED_LM_PASSWORD 8
-#define LOGON_EXTRA_SIDS 32
-#define LOGON_SUBAUTH_SESSION_KEY 64
-#define LOGON_SERVER_TRUST_ACCOUNT 128
-#define LOGON_NTLMV2_ENABLED 256
-#define LOGON_RESOURCE_GROUPS 512
-#define LOGON_PROFILE_PATH_RETURNED 1024
-#define LOGON_GRACE_LOGON 16777216
-#define LSA_MODE_PASSWORD_PROTECTED 1
-#define LSA_MODE_INDIVIDUAL_ACCOUNTS 2
-#define LSA_MODE_MANDATORY_ACCESS 3
-#define LSA_MODE_LOG_FULL 4
-#define LSA_SUCCESS(x) ((LONG)(x)>=0)
-#define MICROSOFT_KERBEROS_NAME_A "Kerberos"
-#define MICROSOFT_KERBEROS_NAME_W L"Kerberos"
-#define MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT 32
-#define MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT 2048
-#define MSV1_0_CHALLENGE_LENGTH 8
-#define MSV1_0_CLEARTEXT_PASSWORD_ALLOWED 2
-#define MSV1_0_CRED_LM_PRESENT 1
-#define MSV1_0_CRED_NT_PRESENT 2
-#define MSV1_0_CRED_VERSION 0
-#define MSV1_0_DONT_TRY_GUEST_ACCOUNT 16
-#define MSV1_0_LANMAN_SESSION_KEY_LENGTH 8
-#define MSV1_0_MAX_NTLM3_LIFE 1800
-#define MSV1_0_MAX_AVL_SIZE 64000
-#define MSV1_0_MNS_LOGON 16777216
-#define MSV1_0_NTLM3_RESPONSE_LENGTH 16
-#define MSV1_0_NTLM3_OWF_LENGTH 16
-#define MSV1_0_NTLM3_INPUT_LENGTH (sizeof(MSV1_0_NTLM3_RESPONSE)-MSV1_0_NTLM3_RESPONSE_LENGTH)
-#define MSV1_0_OWF_PASSWORD_LENGTH 16
-#define MSV1_0_PACKAGE_NAME "MICROSOFT_AUTHENTICATION_PACKAGE_V1_0"
-#define MSV1_0_PACKAGE_NAMEW L"MICROSOFT_AUTHENTICATION_PACKAGE_V1_0"
-#define MSV1_0_PACKAGE_NAMEW_LENGTH sizeof(MSV1_0_PACKAGE_NAMEW)-sizeof(WCHAR)
-#define MSV1_0_RETURN_USER_PARAMETERS 8
-#define MSV1_0_RETURN_PASSWORD_EXPIRY 64
-#define MSV1_0_RETURN_PROFILE_PATH 512
-#define MSV1_0_SUBAUTHENTICATION_DLL_EX 1048576
-#define MSV1_0_SUBAUTHENTICATION_DLL 0xff000000
-#define MSV1_0_SUBAUTHENTICATION_DLL_SHIFT 24
-#define MSV1_0_SUBAUTHENTICATION_DLL_RAS 2
-#define MSV1_0_SUBAUTHENTICATION_DLL_IIS 132
-#define MSV1_0_SUBAUTHENTICATION_FLAGS 0xff000000
-#define MSV1_0_SUBAUTHENTICATION_KEY "System\\CurrentControlSet\\Control\\Lsa\\MSV1_0"
-#define MSV1_0_SUBAUTHENTICATION_VALUE "Auth"
-#define MSV1_0_TRY_GUEST_ACCOUNT_ONLY 256
-#define MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY 1024
-#define MSV1_0_UPDATE_LOGON_STATISTICS 4
-#define MSV1_0_USE_CLIENT_CHALLENGE 128
-#define MSV1_0_USER_SESSION_KEY_LENGTH 16
-#define POLICY_VIEW_LOCAL_INFORMATION 1
-#define POLICY_VIEW_AUDIT_INFORMATION 2
-#define POLICY_GET_PRIVATE_INFORMATION 4
-#define POLICY_TRUST_ADMIN 8
-#define POLICY_CREATE_ACCOUNT 16
-#define POLICY_CREATE_SECRET 32
-#define POLICY_CREATE_PRIVILEGE 64
-#define POLICY_SET_DEFAULT_QUOTA_LIMITS 128
-#define POLICY_SET_AUDIT_REQUIREMENTS 256
-#define POLICY_AUDIT_LOG_ADMIN 512
-#define POLICY_SERVER_ADMIN 1024
-#define POLICY_LOOKUP_NAMES 2048
-#define POLICY_READ (STANDARD_RIGHTS_READ|6)
-#define POLICY_WRITE (STANDARD_RIGHTS_WRITE|2040)
-#define POLICY_EXECUTE (STANDARD_RIGHTS_EXECUTE|2049)
-#define POLICY_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|4095)
-#define POLICY_AUDIT_EVENT_UNCHANGED 0
-#define POLICY_AUDIT_EVENT_SUCCESS 1
-#define POLICY_AUDIT_EVENT_FAILURE 2
-#define POLICY_AUDIT_EVENT_NONE 4
-#define POLICY_AUDIT_EVENT_MASK 7
-#define POLICY_LOCATION_LOCAL 1
-#define POLICY_LOCATION_DS 2
-#define POLICY_MACHINE_POLICY_LOCAL 0
-#define POLICY_MACHINE_POLICY_DEFAULTED 1
-#define POLICY_MACHINE_POLICY_EXPLICIT 2
-#define POLICY_MACHINE_POLICY_UNKNOWN 0xFFFFFFFF
-#define POLICY_QOS_SCHANEL_REQUIRED 1
-#define POLICY_QOS_OUTBOUND_INTEGRITY 2
-#define POLICY_QOS_OUTBOUND_CONFIDENTIALITY 4
-#define POLICY_QOS_INBOUND_INTEGREITY 8
-#define POLICY_QOS_INBOUND_CONFIDENTIALITY 16
-#define POLICY_QOS_ALLOW_LOCAL_ROOT_CERT_STORE 32
-#define POLICY_QOS_RAS_SERVER_ALLOWED 64
-#define POLICY_QOS_DHCP_SERVER_ALLOWD 128
-#define POLICY_KERBEROS_FORWARDABLE 1
-#define POLICY_KERBEROS_PROXYABLE 2
-#define POLICY_KERBEROS_RENEWABLE 4
-#define POLICY_KERBEROS_POSTDATEABLE 8
-#define SAM_PASSWORD_CHANGE_NOTIFY_ROUTINE "PasswordChangeNotify"
-#define SAM_INIT_NOTIFICATION_ROUTINE "InitializeChangeNotify"
-#define SAM_PASSWORD_FILTER_ROUTINE "PasswordFilter"
-#define SE_INTERACTIVE_LOGON_NAME TEXT("SeInteractiveLogonRight")
-#define SE_NETWORK_LOGON_NAME TEXT("SeNetworkLogonRight")
-#define SE_BATCH_LOGON_NAME TEXT("SeBatchLogonRight")
-#define SE_SERVICE_LOGON_NAME TEXT("SeServiceLogonRight")
-#define TRUST_ATTRIBUTE_NON_TRANSITIVE 1
-#define TRUST_ATTRIBUTE_UPLEVEL_ONLY 2
-#define TRUST_ATTRIBUTE_TREE_PARENT 4194304
-#define TRUST_ATTRIBUTES_VALID -16580609
-#define TRUST_AUTH_TYPE_NONE 0
-#define TRUST_AUTH_TYPE_NT4OWF 1
-#define TRUST_AUTH_TYPE_CLEAR 2
-#define TRUST_DIRECTION_DISABLED 0
-#define TRUST_DIRECTION_INBOUND 1
-#define TRUST_DIRECTION_OUTBOUND 2
-#define TRUST_DIRECTION_BIDIRECTIONAL 3
-#define TRUST_TYPE_DOWNLEVEL 1
-#define TRUST_TYPE_UPLEVEL 2
-#define TRUST_TYPE_MIT 3
-#define TRUST_TYPE_DCE 4
-#if !defined(_NTDEF_H) && !defined(_SUBAUTH_H)
-typedef LONG NTSTATUS, *PNTSTATUS;
-typedef struct _UNICODE_STRING {
- USHORT Length;
- USHORT MaximumLength;
- PWSTR Buffer;
-} UNICODE_STRING, *PUNICODE_STRING;
-typedef const UNICODE_STRING* PCUNICODE_STRING;
-typedef struct _STRING {
- USHORT Length;
- USHORT MaximumLength;
- PCHAR Buffer;
-} STRING, *PSTRING;
-#endif
-typedef UNICODE_STRING LSA_UNICODE_STRING, *PLSA_UNICODE_STRING;
-typedef STRING LSA_STRING, *PLSA_STRING;
-typedef enum _MSV1_0_LOGON_SUBMIT_TYPE {
- MsV1_0InteractiveLogon = 2,
- MsV1_0Lm20Logon,
- MsV1_0NetworkLogon,
- MsV1_0SubAuthLogon,
- MsV1_0WorkstationUnlockLogon = 7
-} MSV1_0_LOGON_SUBMIT_TYPE, *PMSV1_0_LOGON_SUBMIT_TYPE;
-typedef enum _MSV1_0_PROFILE_BUFFER_TYPE {
- MsV1_0InteractiveProfile = 2,
- MsV1_0Lm20LogonProfile,
- MsV1_0SmartCardProfile
-} MSV1_0_PROFILE_BUFFER_TYPE, *PMSV1_0_PROFILE_BUFFER_TYPE;
-typedef enum {
- MsvAvEOL,
- MsvAvNbComputerName,
- MsvAvNbDomainName,
- MsvAvDnsComputerName,
- MsvAvDnsDomainName
-} MSV1_0_AVID;
-typedef enum _MSV1_0_PROTOCOL_MESSAGE_TYPE {
- MsV1_0Lm20ChallengeRequest = 0,
- MsV1_0Lm20GetChallengeResponse,
- MsV1_0EnumerateUsers,
- MsV1_0GetUserInfo,
- MsV1_0ReLogonUsers,
- MsV1_0ChangePassword,
- MsV1_0ChangeCachedPassword,
- MsV1_0GenericPassthrough,
- MsV1_0CacheLogon,
- MsV1_0SubAuth,
- MsV1_0DeriveCredential,
- MsV1_0CacheLookup
-} MSV1_0_PROTOCOL_MESSAGE_TYPE, *PMSV1_0_PROTOCOL_MESSAGE_TYPE;
-typedef enum _POLICY_LSA_SERVER_ROLE {
- PolicyServerRoleBackup = 2,
- PolicyServerRolePrimary
-} POLICY_LSA_SERVER_ROLE, *PPOLICY_LSA_SERVER_ROLE;
-typedef enum _POLICY_SERVER_ENABLE_STATE {
- PolicyServerEnabled = 2,
- PolicyServerDisabled
-} POLICY_SERVER_ENABLE_STATE, *PPOLICY_SERVER_ENABLE_STATE;
-typedef enum _POLICY_INFORMATION_CLASS {
- PolicyAuditLogInformation = 1,
- PolicyAuditEventsInformation,
- PolicyPrimaryDomainInformation,
- PolicyPdAccountInformation,
- PolicyAccountDomainInformation,
- PolicyLsaServerRoleInformation,
- PolicyReplicaSourceInformation,
- PolicyDefaultQuotaInformation,
- PolicyModificationInformation,
- PolicyAuditFullSetInformation,
- PolicyAuditFullQueryInformation,
- PolicyDnsDomainInformation,
- PolicyEfsInformation
-} POLICY_INFORMATION_CLASS, *PPOLICY_INFORMATION_CLASS;
-typedef enum _POLICY_AUDIT_EVENT_TYPE {
- AuditCategorySystem,
- AuditCategoryLogon,
- AuditCategoryObjectAccess,
- AuditCategoryPrivilegeUse,
- AuditCategoryDetailedTracking,
- AuditCategoryPolicyChange,
- AuditCategoryAccountManagement,
- AuditCategoryDirectoryServiceAccess,
- AuditCategoryAccountLogon
-} POLICY_AUDIT_EVENT_TYPE, *PPOLICY_AUDIT_EVENT_TYPE;
-typedef enum _POLICY_LOCAL_INFORMATION_CLASS {
- PolicyLocalAuditEventsInformation = 1,
- PolicyLocalPdAccountInformation,
- PolicyLocalAccountDomainInformation,
- PolicyLocalLsaServerRoleInformation,
- PolicyLocalReplicaSourceInformation,
- PolicyLocalModificationInformation,
- PolicyLocalAuditFullSetInformation,
- PolicyLocalAuditFullQueryInformation,
- PolicyLocalDnsDomainInformation,
- PolicyLocalIPSecReferenceInformation,
- PolicyLocalMachinePasswordInformation,
- PolicyLocalQualityOfServiceInformation,
- PolicyLocalPolicyLocationInformation
-} POLICY_LOCAL_INFORMATION_CLASS, *PPOLICY_LOCAL_INFORMATION_CLASS;
-typedef enum _POLICY_DOMAIN_INFORMATION_CLASS {
- PolicyDomainIPSecReferenceInformation = 1,
- PolicyDomainQualityOfServiceInformation,
- PolicyDomainEfsInformation,
- PolicyDomainPublicKeyInformation,
- PolicyDomainPasswordPolicyInformation,
- PolicyDomainLockoutInformation,
- PolicyDomainKerberosTicketInformation
-} POLICY_DOMAIN_INFORMATION_CLASS, *PPOLICY_DOMAIN_INFORMATION_CLASS;
-typedef enum _SECURITY_LOGON_TYPE {
- Interactive = 2,
- Network,
- Batch,
- Service,
- Proxy,
- Unlock
-} SECURITY_LOGON_TYPE, *PSECURITY_LOGON_TYPE;
-typedef enum _TRUSTED_INFORMATION_CLASS {
- TrustedDomainNameInformation = 1,
- TrustedControllersInformation,
- TrustedPosixOffsetInformation,
- TrustedPasswordInformation,
- TrustedDomainInformationBasic,
- TrustedDomainInformationEx,
- TrustedDomainAuthInformation,
- TrustedDomainFullInformation
-} TRUSTED_INFORMATION_CLASS, *PTRUSTED_INFORMATION_CLASS;
-typedef struct _DOMAIN_PASSWORD_INFORMATION {
- USHORT MinPasswordLength;
- USHORT PasswordHistoryLength;
- ULONG PasswordProperties;
- LARGE_INTEGER MaxPasswordAge;
- LARGE_INTEGER MinPasswordAge;
-} DOMAIN_PASSWORD_INFORMATION, *PDOMAIN_PASSWORD_INFORMATION;
-typedef ULONG LSA_ENUMERATION_HANDLE, *PLSA_ENUMERATION_HANDLE;
-typedef struct _LSA_ENUMERATION_INFORMATION {
- PSID Sid;
-} LSA_ENUMERATION_INFORMATION, *PLSA_ENUMERATION_INFORMATION;
-typedef ULONG LSA_OPERATIONAL_MODE, *PLSA_OPERATIONAL_MODE;
-#if !defined(_NTDEF_H)
-typedef struct _LSA_OBJECT_ATTRIBUTES {
- ULONG Length;
- HANDLE RootDirectory;
- PLSA_UNICODE_STRING ObjectName;
- ULONG Attributes;
- PVOID SecurityDescriptor;
- PVOID SecurityQualityOfService;
-} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
-#endif
-typedef OBJECT_ATTRIBUTES LSA_OBJECT_ATTRIBUTES, *PLSA_OBJECT_ATTRIBUTES;
-typedef struct _LSA_TRUST_INFORMATION {
- LSA_UNICODE_STRING Name;
- PSID Sid;
-} LSA_TRUST_INFORMATION, *PLSA_TRUST_INFORMATION;
-typedef struct _LSA_REFERENCED_DOMAIN_LIST {
- ULONG Entries;
- PLSA_TRUST_INFORMATION Domains;
-} LSA_REFERENCED_DOMAIN_LIST, *PLSA_REFERENCED_DOMAIN_LIST;
-typedef struct _LSA_TRANSLATED_SID {
- SID_NAME_USE Use;
- ULONG RelativeId;
- LONG DomainIndex;
-} LSA_TRANSLATED_SID, *PLSA_TRANSLATED_SID;
-typedef struct _LSA_TRANSLATED_NAME {
- SID_NAME_USE Use;
- LSA_UNICODE_STRING Name;
- LONG DomainIndex;
-} LSA_TRANSLATED_NAME, *PLSA_TRANSLATED_NAME;
-typedef struct _MSV1_0_INTERACTIVE_LOGON {
- MSV1_0_LOGON_SUBMIT_TYPE MessageType;
- UNICODE_STRING LogonDomainName;
- UNICODE_STRING UserName;
- UNICODE_STRING Password;
-} MSV1_0_INTERACTIVE_LOGON, *PMSV1_0_INTERACTIVE_LOGON;
-typedef struct _MSV1_0_INTERACTIVE_PROFILE {
- MSV1_0_PROFILE_BUFFER_TYPE MessageType;
- USHORT LogonCount;
- USHORT BadPasswordCount;
- LARGE_INTEGER LogonTime;
- LARGE_INTEGER LogoffTime;
- LARGE_INTEGER KickOffTime;
- LARGE_INTEGER PasswordLastSet;
- LARGE_INTEGER PasswordCanChange;
- LARGE_INTEGER PasswordMustChange;
- UNICODE_STRING LogonScript;
- UNICODE_STRING HomeDirectory;
- UNICODE_STRING FullName;
- UNICODE_STRING ProfilePath;
- UNICODE_STRING HomeDirectoryDrive;
- UNICODE_STRING LogonServer;
- ULONG UserFlags;
-} MSV1_0_INTERACTIVE_PROFILE, *PMSV1_0_INTERACTIVE_PROFILE;
-typedef struct _MSV1_0_LM20_LOGON {
- MSV1_0_LOGON_SUBMIT_TYPE MessageType;
- UNICODE_STRING LogonDomainName;
- UNICODE_STRING UserName;
- UNICODE_STRING Workstation;
- UCHAR ChallengeToClient[MSV1_0_CHALLENGE_LENGTH];
- STRING CaseSensitiveChallengeResponse;
- STRING CaseInsensitiveChallengeResponse;
- ULONG ParameterControl;
-} MSV1_0_LM20_LOGON, * PMSV1_0_LM20_LOGON;
-typedef struct _MSV1_0_SUBAUTH_LOGON{ /* W2K only */
- MSV1_0_LOGON_SUBMIT_TYPE MessageType;
- UNICODE_STRING LogonDomainName;
- UNICODE_STRING UserName;
- UNICODE_STRING Workstation;
- UCHAR ChallengeToClient[MSV1_0_CHALLENGE_LENGTH];
- STRING AuthenticationInfo1;
- STRING AuthenticationInfo2;
- ULONG ParameterControl;
- ULONG SubAuthPackageId;
-} MSV1_0_SUBAUTH_LOGON, * PMSV1_0_SUBAUTH_LOGON;
-typedef struct _MSV1_0_LM20_LOGON_PROFILE {
- MSV1_0_PROFILE_BUFFER_TYPE MessageType;
- LARGE_INTEGER KickOffTime;
- LARGE_INTEGER LogoffTime;
- ULONG UserFlags;
- UCHAR UserSessionKey[MSV1_0_USER_SESSION_KEY_LENGTH];
- UNICODE_STRING LogonDomainName;
- UCHAR LanmanSessionKey[MSV1_0_LANMAN_SESSION_KEY_LENGTH];
- UNICODE_STRING LogonServer;
- UNICODE_STRING UserParameters;
-} MSV1_0_LM20_LOGON_PROFILE, * PMSV1_0_LM20_LOGON_PROFILE;
-typedef struct _MSV1_0_SUPPLEMENTAL_CREDENTIAL {
- ULONG Version;
- ULONG Flags;
- UCHAR LmPassword[MSV1_0_OWF_PASSWORD_LENGTH];
- UCHAR NtPassword[MSV1_0_OWF_PASSWORD_LENGTH];
-} MSV1_0_SUPPLEMENTAL_CREDENTIAL, *PMSV1_0_SUPPLEMENTAL_CREDENTIAL;
-typedef struct _MSV1_0_NTLM3_RESPONSE {
- UCHAR Response[MSV1_0_NTLM3_RESPONSE_LENGTH];
- UCHAR RespType;
- UCHAR HiRespType;
- USHORT Flags;
- ULONG MsgWord;
- ULONGLONG TimeStamp;
- UCHAR ChallengeFromClient[MSV1_0_CHALLENGE_LENGTH];
- ULONG AvPairsOff;
- UCHAR Buffer[1];
-} MSV1_0_NTLM3_RESPONSE, *PMSV1_0_NTLM3_RESPONSE;
-typedef struct _MSV1_0_AV_PAIR {
- USHORT AvId;
- USHORT AvLen;
-} MSV1_0_AV_PAIR, *PMSV1_0_AV_PAIR;
-typedef struct _MSV1_0_CHANGEPASSWORD_REQUEST {
- MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
- UNICODE_STRING DomainName;
- UNICODE_STRING AccountName;
- UNICODE_STRING OldPassword;
- UNICODE_STRING NewPassword;
- BOOLEAN Impersonating;
-} MSV1_0_CHANGEPASSWORD_REQUEST, *PMSV1_0_CHANGEPASSWORD_REQUEST;
-typedef struct _MSV1_0_CHANGEPASSWORD_RESPONSE {
- MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
- BOOLEAN PasswordInfoValid;
- DOMAIN_PASSWORD_INFORMATION DomainPasswordInfo;
-} MSV1_0_CHANGEPASSWORD_RESPONSE, *PMSV1_0_CHANGEPASSWORD_RESPONSE;
-typedef struct _MSV1_0_SUBAUTH_REQUEST{
- MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
- ULONG SubAuthPackageId;
- ULONG SubAuthInfoLength;
- PUCHAR SubAuthSubmitBuffer;
-} MSV1_0_SUBAUTH_REQUEST, *PMSV1_0_SUBAUTH_REQUEST;
-typedef struct _MSV1_0_SUBAUTH_RESPONSE{
- MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
- ULONG SubAuthInfoLength;
- PUCHAR SubAuthReturnBuffer;
-} MSV1_0_SUBAUTH_RESPONSE, *PMSV1_0_SUBAUTH_RESPONSE;
-#define MSV1_0_DERIVECRED_TYPE_SHA1 0
-typedef struct _MSV1_0_DERIVECRED_REQUEST {
- MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
- LUID LogonId;
- ULONG DeriveCredType;
- ULONG DeriveCredInfoLength;
- UCHAR DeriveCredSubmitBuffer[1];
-} MSV1_0_DERIVECRED_REQUEST, *PMSV1_0_DERIVECRED_REQUEST;
-typedef struct _MSV1_0_DERIVECRED_RESPONSE {
- MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
- ULONG DeriveCredInfoLength;
- UCHAR DeriveCredReturnBuffer[1];
-} MSV1_0_DERIVECRED_RESPONSE, *PMSV1_0_DERIVECRED_RESPONSE;
-typedef ULONG POLICY_AUDIT_EVENT_OPTIONS, *PPOLICY_AUDIT_EVENT_OPTIONS;
-typedef struct _POLICY_PRIVILEGE_DEFINITION {
- LSA_UNICODE_STRING Name;
- LUID LocalValue;
-} POLICY_PRIVILEGE_DEFINITION, *PPOLICY_PRIVILEGE_DEFINITION;
-typedef struct _POLICY_AUDIT_LOG_INFO {
- ULONG AuditLogPercentFull;
- ULONG MaximumLogSize;
- LARGE_INTEGER AuditRetentionPeriod;
- BOOLEAN AuditLogFullShutdownInProgress;
- LARGE_INTEGER TimeToShutdown;
- ULONG NextAuditRecordId;
-} POLICY_AUDIT_LOG_INFO, *PPOLICY_AUDIT_LOG_INFO;
-typedef struct _POLICY_AUDIT_EVENTS_INFO {
- BOOLEAN AuditingMode;
- PPOLICY_AUDIT_EVENT_OPTIONS EventAuditingOptions;
- ULONG MaximumAuditEventCount;
-} POLICY_AUDIT_EVENTS_INFO, *PPOLICY_AUDIT_EVENTS_INFO;
-typedef struct _POLICY_ACCOUNT_DOMAIN_INFO {
- LSA_UNICODE_STRING DomainName;
- PSID DomainSid;
-} POLICY_ACCOUNT_DOMAIN_INFO, *PPOLICY_ACCOUNT_DOMAIN_INFO;
-typedef struct _POLICY_PRIMARY_DOMAIN_INFO {
- LSA_UNICODE_STRING Name;
- PSID Sid;
-} POLICY_PRIMARY_DOMAIN_INFO, *PPOLICY_PRIMARY_DOMAIN_INFO;
-typedef struct _POLICY_DNS_DOMAIN_INFO {
- LSA_UNICODE_STRING Name;
- LSA_UNICODE_STRING DnsDomainName;
- LSA_UNICODE_STRING DnsForestName;
- GUID DomainGuid;
- PSID Sid;
-} POLICY_DNS_DOMAIN_INFO, *PPOLICY_DNS_DOMAIN_INFO;
-typedef struct _POLICY_PD_ACCOUNT_INFO {
- LSA_UNICODE_STRING Name;
-} POLICY_PD_ACCOUNT_INFO, *PPOLICY_PD_ACCOUNT_INFO;
-typedef struct _POLICY_LSA_SERVER_ROLE_INFO {
- POLICY_LSA_SERVER_ROLE LsaServerRole;
-} POLICY_LSA_SERVER_ROLE_INFO, *PPOLICY_LSA_SERVER_ROLE_INFO;
-typedef struct _POLICY_REPLICA_SOURCE_INFO {
- LSA_UNICODE_STRING ReplicaSource;
- LSA_UNICODE_STRING ReplicaAccountName;
-} POLICY_REPLICA_SOURCE_INFO, *PPOLICY_REPLICA_SOURCE_INFO;
-typedef struct _POLICY_DEFAULT_QUOTA_INFO {
- QUOTA_LIMITS QuotaLimits;
-} POLICY_DEFAULT_QUOTA_INFO, *PPOLICY_DEFAULT_QUOTA_INFO;
-typedef struct _POLICY_MODIFICATION_INFO {
- LARGE_INTEGER ModifiedId;
- LARGE_INTEGER DatabaseCreationTime;
-} POLICY_MODIFICATION_INFO, *PPOLICY_MODIFICATION_INFO;
-typedef struct _POLICY_AUDIT_FULL_SET_INFO {
- BOOLEAN ShutDownOnFull;
-} POLICY_AUDIT_FULL_SET_INFO, *PPOLICY_AUDIT_FULL_SET_INFO;
-typedef struct _POLICY_AUDIT_FULL_QUERY_INFO {
- BOOLEAN ShutDownOnFull;
- BOOLEAN LogIsFull;
-} POLICY_AUDIT_FULL_QUERY_INFO, *PPOLICY_AUDIT_FULL_QUERY_INFO;
-typedef struct _POLICY_EFS_INFO {
- ULONG InfoLength;
- PUCHAR EfsBlob;
-} POLICY_EFS_INFO, *PPOLICY_EFS_INFO;
-typedef struct _POLICY_LOCAL_IPSEC_REFERENCE_INFO {
- LSA_UNICODE_STRING ObjectPath;
-} POLICY_LOCAL_IPSEC_REFERENCE_INFO, *PPOLICY_LOCAL_IPSEC_REFERENCE_INFO;
-typedef struct _POLICY_LOCAL_MACHINE_PASSWORD_INFO {
- LARGE_INTEGER PasswordChangeInterval;
-} POLICY_LOCAL_MACHINE_PASSWORD_INFO, *PPOLICY_LOCAL_MACHINE_PASSWORD_INFO;
-typedef struct _POLICY_LOCAL_POLICY_LOCATION_INFO {
- ULONG PolicyLocation;
-} POLICY_LOCAL_POLICY_LOCATION_INFO, *PPOLICY_LOCAL_POLICY_LOCATION_INFO;
-typedef struct _POLICY_LOCAL_QUALITY_OF_SERVICE_INFO {
- ULONG QualityOfService;
-} POLICY_LOCAL_QUALITY_OF_SERVICE_INFO, *PPOLICY_LOCAL_QUALITY_OF_SERVICE_INFO;
-typedef struct _POLICY_LOCAL_QUALITY_OF_SERVICE_INFO POLICY_DOMAIN_QUALITY_OF_SERVICE_INFO;
-typedef struct _POLICY_LOCAL_QUALITY_OF_SERVICE_INFO *PPOLICY_DOMAIN_QUALITY_OF_SERVICE_INFO;
-typedef struct _POLICY_DOMAIN_PUBLIC_KEY_INFO {
- ULONG InfoLength;
- PUCHAR PublicKeyInfo;
-} POLICY_DOMAIN_PUBLIC_KEY_INFO, *PPOLICY_DOMAIN_PUBLIC_KEY_INFO;
-typedef struct _POLICY_DOMAIN_LOCKOUT_INFO {
- LARGE_INTEGER LockoutDuration;
- LARGE_INTEGER LockoutObservationWindow;
- USHORT LockoutThreshold;
-} POLICY_DOMAIN_LOCKOUT_INFO, *PPOLICY_DOMAIN_LOCKOUT_INFO;
-typedef struct _POLICY_DOMAIN_PASSWORD_INFO {
- USHORT MinPasswordLength;
- USHORT PasswordHistoryLength;
- ULONG PasswordProperties;
- LARGE_INTEGER MaxPasswordAge;
- LARGE_INTEGER MinPasswordAge;
-} POLICY_DOMAIN_PASSWORD_INFO, *PPOLICY_DOMAIN_PASSWORD_INFO;
-typedef struct _POLICY_DOMAIN_KERBEROS_TICKET_INFO {
- ULONG AuthenticationOptions;
- LARGE_INTEGER MinTicketAge;
- LARGE_INTEGER MaxTicketAge;
- LARGE_INTEGER MaxRenewAge;
- LARGE_INTEGER ProxyLifetime;
- LARGE_INTEGER ForceLogoff;
-} POLICY_DOMAIN_KERBEROS_TICKET_INFO, *PPOLICY_DOMAIN_KERBEROS_TICKET_INFO;
-typedef PVOID LSA_HANDLE, *PLSA_HANDLE;
-typedef struct _TRUSTED_DOMAIN_NAME_INFO {
- LSA_UNICODE_STRING Name;
-} TRUSTED_DOMAIN_NAME_INFO, *PTRUSTED_DOMAIN_NAME_INFO;
-typedef struct _TRUSTED_CONTROLLERS_INFO {
- ULONG Entries;
- PLSA_UNICODE_STRING Names;
-} TRUSTED_CONTROLLERS_INFO, *PTRUSTED_CONTROLLERS_INFO;
-typedef struct _TRUSTED_POSIX_OFFSET_INFO {
- ULONG Offset;
-} TRUSTED_POSIX_OFFSET_INFO, *PTRUSTED_POSIX_OFFSET_INFO;
-typedef struct _TRUSTED_PASSWORD_INFO {
- LSA_UNICODE_STRING Password;
- LSA_UNICODE_STRING OldPassword;
-} TRUSTED_PASSWORD_INFO, *PTRUSTED_PASSWORD_INFO;
-typedef LSA_TRUST_INFORMATION TRUSTED_DOMAIN_INFORMATION_BASIC;
-typedef PLSA_TRUST_INFORMATION *PTRUSTED_DOMAIN_INFORMATION_BASIC;
-typedef struct _TRUSTED_DOMAIN_INFORMATION_EX {
- LSA_UNICODE_STRING Name;
- LSA_UNICODE_STRING FlatName;
- PSID Sid;
- ULONG TrustDirection;
- ULONG TrustType;
- ULONG TrustAttributes;
-} TRUSTED_DOMAIN_INFORMATION_EX, *PTRUSTED_DOMAIN_INFORMATION_EX;
-typedef struct _LSA_AUTH_INFORMATION {
- LARGE_INTEGER LastUpdateTime;
- ULONG AuthType;
- ULONG AuthInfoLength;
- PUCHAR AuthInfo;
-} LSA_AUTH_INFORMATION, *PLSA_AUTH_INFORMATION;
-typedef struct _TRUSTED_DOMAIN_AUTH_INFORMATION {
- ULONG IncomingAuthInfos;
- PLSA_AUTH_INFORMATION IncomingAuthenticationInformation;
- PLSA_AUTH_INFORMATION IncomingPreviousAuthenticationInformation;
- ULONG OutgoingAuthInfos;
- PLSA_AUTH_INFORMATION OutgoingAuthenticationInformation;
- PLSA_AUTH_INFORMATION OutgoingPreviousAuthenticationInformation;
-} TRUSTED_DOMAIN_AUTH_INFORMATION, *PTRUSTED_DOMAIN_AUTH_INFORMATION;
-typedef struct _TRUSTED_DOMAIN_FULL_INFORMATION {
- TRUSTED_DOMAIN_INFORMATION_EX Information;
- TRUSTED_POSIX_OFFSET_INFO PosixOffset;
- TRUSTED_DOMAIN_AUTH_INFORMATION AuthInformation;
-} TRUSTED_DOMAIN_FULL_INFORMATION, *PTRUSTED_DOMAIN_FULL_INFORMATION;
-NTSTATUS NTAPI LsaAddAccountRights(LSA_HANDLE,PSID,PLSA_UNICODE_STRING,ULONG);
-NTSTATUS NTAPI LsaCallAuthenticationPackage(HANDLE,ULONG,PVOID,ULONG,PVOID*,
- PULONG,PNTSTATUS);
-NTSTATUS NTAPI LsaClose(LSA_HANDLE);
-NTSTATUS NTAPI LsaConnectUntrusted(PHANDLE);
-NTSTATUS NTAPI LsaCreateTrustedDomainEx(LSA_HANDLE,
- PTRUSTED_DOMAIN_INFORMATION_EX,
- PTRUSTED_DOMAIN_AUTH_INFORMATION,ACCESS_MASK,
- PLSA_HANDLE);
-NTSTATUS NTAPI LsaDeleteTrustedDomain(LSA_HANDLE,PSID);
-NTSTATUS NTAPI LsaDeregisterLogonProcess(HANDLE);
-NTSTATUS NTAPI LsaEnumerateAccountRights(LSA_HANDLE,PSID,PLSA_UNICODE_STRING*,PULONG);
-NTSTATUS NTAPI LsaEnumerateAccountsWithUserRight(LSA_HANDLE,PLSA_UNICODE_STRING,
- PVOID*,PULONG);
-NTSTATUS NTAPI LsaEnumerateTrustedDomains(LSA_HANDLE,PLSA_ENUMERATION_HANDLE,
- PVOID*,ULONG,PULONG);
-NTSTATUS NTAPI LsaEnumerateTrustedDomainsEx(LSA_HANDLE,PLSA_ENUMERATION_HANDLE,
- TRUSTED_INFORMATION_CLASS,PVOID*,ULONG,PULONG);
-NTSTATUS NTAPI LsaFreeMemory(PVOID);
-NTSTATUS NTAPI LsaFreeReturnBuffer(PVOID);
-NTSTATUS NTAPI LsaLogonUser(HANDLE,PLSA_STRING,SECURITY_LOGON_TYPE,ULONG,PVOID,
- ULONG,PTOKEN_GROUPS,PTOKEN_SOURCE,PVOID*,PULONG,
- PLUID,PHANDLE,PQUOTA_LIMITS,PNTSTATUS);
-NTSTATUS NTAPI LsaLookupAuthenticationPackage(HANDLE,PLSA_STRING,PULONG);
-NTSTATUS NTAPI LsaLookupNames(LSA_HANDLE,ULONG,PLSA_UNICODE_STRING,
- PLSA_REFERENCED_DOMAIN_LIST*,PLSA_TRANSLATED_SID*);
-NTSTATUS NTAPI LsaLookupSids(LSA_HANDLE,ULONG,PSID*,
- PLSA_REFERENCED_DOMAIN_LIST*,PLSA_TRANSLATED_NAME*);
-ULONG NTAPI LsaNtStatusToWinError(NTSTATUS);
-NTSTATUS NTAPI LsaOpenPolicy(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,
- ACCESS_MASK,PLSA_HANDLE);
-NTSTATUS NTAPI LsaQueryDomainInformationPolicy(LSA_HANDLE,
- POLICY_DOMAIN_INFORMATION_CLASS,PVOID*);
-NTSTATUS NTAPI LsaQueryInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID*);
-NTSTATUS NTAPI LsaQueryLocalInformationPolicy(LSA_HANDLE,
- POLICY_LOCAL_INFORMATION_CLASS,PVOID*);
-NTSTATUS NTAPI LsaQueryTrustedDomainInfo(LSA_HANDLE,PSID,
- TRUSTED_INFORMATION_CLASS,PVOID*);
-NTSTATUS NTAPI LsaQueryTrustedDomainInfoByName(LSA_HANDLE,PLSA_UNICODE_STRING,
- TRUSTED_INFORMATION_CLASS,PVOID*);
-NTSTATUS NTAPI LsaRegisterLogonProcess(PLSA_STRING,PHANDLE,PLSA_OPERATIONAL_MODE);
-NTSTATUS NTAPI LsaRemoveAccountRights(LSA_HANDLE,PSID,BOOLEAN,
- PLSA_UNICODE_STRING,ULONG);
-NTSTATUS NTAPI LsaRetrievePrivateData(LSA_HANDLE,PLSA_UNICODE_STRING,
- PLSA_UNICODE_STRING*);
-NTSTATUS NTAPI LsaSetDomainInformationPolicy(LSA_HANDLE,
- POLICY_DOMAIN_INFORMATION_CLASS,PVOID);
-NTSTATUS NTAPI LsaSetInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS, PVOID);
-NTSTATUS NTAPI LsaSetLocalInformationPolicy(LSA_HANDLE,
- POLICY_LOCAL_INFORMATION_CLASS,PVOID);
-NTSTATUS NTAPI LsaSetTrustedDomainInformation(LSA_HANDLE,PSID,
- TRUSTED_INFORMATION_CLASS,PVOID);
-NTSTATUS NTAPI LsaSetTrustedDomainInfoByName(LSA_HANDLE,PLSA_UNICODE_STRING,
- TRUSTED_INFORMATION_CLASS,PVOID);
-NTSTATUS NTAPI LsaStorePrivateData(LSA_HANDLE,PLSA_UNICODE_STRING,
- PLSA_UNICODE_STRING);
-typedef NTSTATUS (*PSAM_PASSWORD_NOTIFICATION_ROUTINE)(PUNICODE_STRING,
- ULONG,PUNICODE_STRING);
-typedef BOOLEAN (*PSAM_INIT_NOTIFICATION_ROUTINE)(void);
-typedef BOOLEAN (*PSAM_PASSWORD_FILTER_ROUTINE)(PUNICODE_STRING,PUNICODE_STRING,
- PUNICODE_STRING,BOOLEAN);
-#ifdef __cplusplus
-}
-#endif
-#endif /* _NTSECAPI_H */
diff --git a/winsup/w32api/include/ntsecpkg.h b/winsup/w32api/include/ntsecpkg.h
deleted file mode 100644
index 6aff8e5..0000000
--- a/winsup/w32api/include/ntsecpkg.h
+++ /dev/null
@@ -1,431 +0,0 @@
-#ifndef _NTSECPKG_H
-#define _NTSECPKG_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#include "windef.h"
-#include "ntsecapi.h"
-#include "security.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define ISC_REQ_DELEGATE 1
-#define ISC_REQ_MUTUAL_AUTH 2
-#define ISC_REQ_REPLAY_DETECT 4
-#define ISC_REQ_SEQUENCE_DETECT 8
-#define ISC_REQ_CONFIDENTIALITY 16
-#define ISC_REQ_USE_SESSION_KEY 32
-#define ISC_REQ_PROMPT_FOR_CREDS 64
-#define ISC_REQ_USE_SUPPLIED_CREDS 128
-#define ISC_REQ_ALLOCATE_MEMORY 256
-#define ISC_REQ_USE_DCE_STYLE 512
-#define ISC_REQ_DATAGRAM 1024
-#define ISC_REQ_CONNECTION 2048
-#define ISC_REQ_EXTENDED_ERROR 16384
-#define ISC_REQ_STREAM 32768
-#define ISC_REQ_INTEGRITY 65536
-#define ISC_REQ_MANUAL_CRED_VALIDATION 524288
-#define ISC_REQ_HTTP 268435456
-
-#define ISC_RET_EXTENDED_ERROR 16384
-
-#define ASC_REQ_DELEGATE 1
-#define ASC_REQ_MUTUAL_AUTH 2
-#define ASC_REQ_REPLAY_DETECT 4
-#define ASC_REQ_SEQUENCE_DETECT 8
-#define ASC_REQ_CONFIDENTIALITY 16
-#define ASC_REQ_USE_SESSION_KEY 32
-#define ASC_REQ_ALLOCATE_MEMORY 256
-#define ASC_REQ_USE_DCE_STYLE 512
-#define ASC_REQ_DATAGRAM 1024
-#define ASC_REQ_CONNECTION 2048
-#define ASC_REQ_EXTENDED_ERROR 32768
-#define ASC_REQ_STREAM 65536
-#define ASC_REQ_INTEGRITY 131072
-
-#define SECURITY_NATIVE_DREP 16
-#define SECURITY_NETWORK_DREP 0
-
-#define SECPKG_STATE_ENCRYPTION_PERMITTED 0x01
-#define SECPKG_STATE_STRONG_ENCRYPTION_PERMITTED 0x02
-#define SECPKG_STATE_DOMAIN_CONTROLLER 0x04
-#define SECPKG_STATE_WORKSTATION 0x08
-#define SECPKG_STATE_STANDALONE 0x10
-
-/* enum definitions for Secure Service Provider/Authentication Packages */
-typedef enum _LSA_TOKEN_INFORMATION_TYPE {
- LsaTokenInformationNull,
- LsaTokenInformationV1
-} LSA_TOKEN_INFORMATION_TYPE, *PLSA_TOKEN_INFORMATION_TYPE;
-typedef enum _SECPKG_EXTENDED_INFORMATION_CLASS
-{
- SecpkgGssInfo = 1,
- SecpkgContextThunks,
- SecpkgMutualAuthLevel,
- SecpkgMaxInfo
-} SECPKG_EXTENDED_INFORMATION_CLASS;
-typedef enum _SECPKG_NAME_TYPE {
- SecNameSamCompatible,
- SecNameAlternateId,
- SecNameFlat,
- SecNameDN
-} SECPKG_NAME_TYPE;
-
-/* struct definitions for SSP/AP */
-typedef struct _SECPKG_PRIMARY_CRED {
- LUID LogonId;
- UNICODE_STRING DownlevelName;
- UNICODE_STRING DomainName;
- UNICODE_STRING Password;
- UNICODE_STRING OldPassword;
- PSID UserSid;
- ULONG Flags;
- UNICODE_STRING DnsDomainName;
- UNICODE_STRING Upn;
- UNICODE_STRING LogonServer;
- UNICODE_STRING Spare1;
- UNICODE_STRING Spare2;
- UNICODE_STRING Spare3;
- UNICODE_STRING Spare4;
-} SECPKG_PRIMARY_CRED, *PSECPKG_PRIMARY_CRED;
-typedef struct _SECPKG_SUPPLEMENTAL_CRED {
- UNICODE_STRING PackageName;
- ULONG CredentialSize;
- PUCHAR Credentials;
-} SECPKG_SUPPLEMENTAL_CRED, *PSECPKG_SUPPLEMENTAL_CRED;
-typedef struct _SECPKG_SUPPLEMENTAL_CRED_ARRAY {
- ULONG CredentialCount;
- SECPKG_SUPPLEMENTAL_CRED Credentials[1];
-} SECPKG_SUPPLEMENTAL_CRED_ARRAY, *PSECPKG_SUPPLEMENTAL_CRED_ARRAY;
-typedef struct _SECPKG_PARAMETERS {
- ULONG Version;
- ULONG MachineState;
- ULONG SetupMode;
- PSID DomainSid;
- UNICODE_STRING DomainName;
- UNICODE_STRING DnsDomainName;
- GUID DomainGuid;
-} SECPKG_PARAMETERS, *PSECPKG_PARAMETERS,
- SECPKG_EVENT_DOMAIN_CHANGE, *PSECPKG_EVENT_DOMAIN_CHANGE;
-typedef struct _SECPKG_CLIENT_INFO {
- LUID LogonId;
- ULONG ProcessID;
- ULONG ThreadID;
- BOOLEAN HasTcbPrivilege;
- BOOLEAN Impersonating;
- BOOLEAN Restricted;
-} SECPKG_CLIENT_INFO,
- *PSECPKG_CLIENT_INFO;
-typedef struct _SECURITY_USER_DATA {
- SECURITY_STRING UserName;
- SECURITY_STRING LogonDomainName;
- SECURITY_STRING LogonServer;
- PSID pSid;
-} SECURITY_USER_DATA, *PSECURITY_USER_DATA,
- SecurityUserData, *PSecurityUserData;
-typedef struct _SECPKG_GSS_INFO {
- ULONG EncodedIdLength;
- UCHAR EncodedId[4];
-} SECPKG_GSS_INFO, *PSECPKG_GSS_INFO;
-typedef struct _SECPKG_CONTEXT_THUNKS {
- ULONG InfoLevelCount;
- ULONG Levels[1];
-} SECPKG_CONTEXT_THUNKS, *PSECPKG_CONTEXT_THUNKS;
-typedef struct _SECPKG_MUTUAL_AUTH_LEVEL {
- ULONG MutualAuthLevel;
-} SECPKG_MUTUAL_AUTH_LEVEL, *PSECPKG_MUTUAL_AUTH_LEVEL;
-typedef struct _SECPKG_CALL_INFO {
- ULONG ProcessId;
- ULONG ThreadId;
- ULONG Attributes;
- ULONG CallCount;
-} SECPKG_CALL_INFO, *PSECPKG_CALL_INFO;
-typedef struct _SECPKG_EXTENDED_INFORMATION {
- SECPKG_EXTENDED_INFORMATION_CLASS Class;
- union {
- SECPKG_GSS_INFO GssInfo;
- SECPKG_CONTEXT_THUNKS ContextThunks;
- SECPKG_MUTUAL_AUTH_LEVEL MutualAuthLevel;
- } Info;
-} SECPKG_EXTENDED_INFORMATION, *PSECPKG_EXTENDED_INFORMATION;
-
-/* callbacks implemented by SSP/AP dlls and called by the LSA */
-typedef VOID (NTAPI *PLSA_CALLBACK_FUNCTION)(ULONG_PTR, ULONG_PTR, PSecBuffer,
- PSecBuffer);
-
-/* misc typedefs used in the below prototypes */
-typedef PVOID *PLSA_CLIENT_REQUEST;
-typedef ULONG LSA_SEC_HANDLE, *PLSA_SEC_HANDLE;
-typedef LPTHREAD_START_ROUTINE SEC_THREAD_START;
-typedef PSECURITY_ATTRIBUTES SEC_ATTRS;
-
-/* functions used by SSP/AP obtainable by dispatch tables */
-typedef NTSTATUS (NTAPI *PLSA_REGISTER_CALLBACK)(ULONG, PLSA_CALLBACK_FUNCTION);
-typedef NTSTATUS (NTAPI *PLSA_CREATE_LOGON_SESSION)(PLUID);
-typedef NTSTATUS (NTAPI *PLSA_DELETE_LOGON_SESSION)(PLUID);
-typedef NTSTATUS (NTAPI *PLSA_ADD_CREDENTIAL)(PLUID, ULONG, PLSA_STRING,
- PLSA_STRING);
-typedef NTSTATUS (NTAPI *PLSA_GET_CREDENTIALS)(PLUID, ULONG, PULONG, BOOLEAN,
- PLSA_STRING, PULONG, PLSA_STRING);
-typedef NTSTATUS (NTAPI *PLSA_DELETE_CREDENTIAL)(PLUID, ULONG, PLSA_STRING);
-typedef PVOID (NTAPI *PLSA_ALLOCATE_LSA_HEAP)(ULONG);
-typedef VOID (NTAPI *PLSA_FREE_LSA_HEAP)(PVOID);
-typedef NTSTATUS (NTAPI *PLSA_ALLOCATE_CLIENT_BUFFER)(PLSA_CLIENT_REQUEST,
- ULONG, PVOID*);
-typedef NTSTATUS (NTAPI *PLSA_FREE_CLIENT_BUFFER)(PLSA_CLIENT_REQUEST, PVOID);
-typedef NTSTATUS (NTAPI *PLSA_COPY_TO_CLIENT_BUFFER)(PLSA_CLIENT_REQUEST, ULONG,
- PVOID, PVOID);
-typedef NTSTATUS (NTAPI *PLSA_COPY_FROM_CLIENT_BUFFER)(PLSA_CLIENT_REQUEST,
- ULONG, PVOID, PVOID);
-typedef NTSTATUS (NTAPI *PLSA_IMPERSONATE_CLIENT)(void);
-typedef NTSTATUS (NTAPI *PLSA_UNLOAD_PACKAGE)(void);
-typedef NTSTATUS (NTAPI *PLSA_DUPLICATE_HANDLE)(HANDLE, PHANDLE);
-typedef NTSTATUS (NTAPI *PLSA_SAVE_SUPPLEMENTAL_CREDENTIALS)(PLUID, ULONG,
- PVOID, BOOLEAN);
-typedef HANDLE (NTAPI *PLSA_CREATE_THREAD)(SEC_ATTRS, ULONG, SEC_THREAD_START,
- PVOID, ULONG, PULONG);
-typedef NTSTATUS (NTAPI *PLSA_GET_CLIENT_INFO)(PSECPKG_CLIENT_INFO);
-typedef HANDLE (NTAPI *PLSA_REGISTER_NOTIFICATION)(SEC_THREAD_START, PVOID,
- ULONG, ULONG, ULONG, ULONG, HANDLE);
-typedef NTSTATUS (NTAPI *PLSA_CANCEL_NOTIFICATION)(HANDLE);
-typedef NTSTATUS (NTAPI *PLSA_MAP_BUFFER)(PSecBuffer, PSecBuffer);
-typedef NTSTATUS (NTAPI *PLSA_CREATE_TOKEN)(PLUID, PTOKEN_SOURCE,
- SECURITY_LOGON_TYPE, SECURITY_IMPERSONATION_LEVEL, LSA_TOKEN_INFORMATION_TYPE,
- PVOID, PTOKEN_GROUPS, PUNICODE_STRING, PUNICODE_STRING, PUNICODE_STRING,
- PUNICODE_STRING, PHANDLE, PNTSTATUS);
-typedef VOID (NTAPI *PLSA_AUDIT_LOGON)(NTSTATUS, NTSTATUS, PUNICODE_STRING,
- PUNICODE_STRING, PUNICODE_STRING, OPTIONAL PSID, SECURITY_LOGON_TYPE,
- PTOKEN_SOURCE, PLUID);
-typedef NTSTATUS (NTAPI *PLSA_CALL_PACKAGE)(PUNICODE_STRING, PVOID, ULONG,
- PVOID*, PULONG, PNTSTATUS);
-typedef VOID (NTAPI *PLSA_FREE_LSA_HEAP)(PVOID);
-typedef BOOLEAN (NTAPI *PLSA_GET_CALL_INFO)(PSECPKG_CALL_INFO);
-typedef NTSTATUS (NTAPI *PLSA_CALL_PACKAGEEX)(PUNICODE_STRING, PVOID, PVOID,
- ULONG, PVOID*, PULONG, PNTSTATUS);
-typedef PVOID (NTAPI *PLSA_CREATE_SHARED_MEMORY)(ULONG, ULONG);
-typedef PVOID (NTAPI *PLSA_ALLOCATE_SHARED_MEMORY)(PVOID, ULONG);
-typedef VOID (NTAPI *PLSA_FREE_SHARED_MEMORY)(PVOID, PVOID);
-typedef BOOLEAN (NTAPI *PLSA_DELETE_SHARED_MEMORY)(PVOID);
-typedef NTSTATUS (NTAPI *PLSA_OPEN_SAM_USER)(PSECURITY_STRING, SECPKG_NAME_TYPE,
- PSECURITY_STRING, BOOLEAN, ULONG, PVOID*);
-typedef NTSTATUS (NTAPI *PLSA_GET_USER_CREDENTIALS)(PVOID, PVOID *, PULONG,
- PVOID *, PULONG);
-typedef NTSTATUS (NTAPI *PLSA_GET_USER_AUTH_DATA)(PVOID, PUCHAR *, PULONG);
-typedef NTSTATUS (NTAPI *PLSA_CLOSE_SAM_USER)(PVOID);
-typedef NTSTATUS (NTAPI *PLSA_CONVERT_AUTH_DATA_TO_TOKEN)(PVOID, ULONG,
- SECURITY_IMPERSONATION_LEVEL, PTOKEN_SOURCE, SECURITY_LOGON_TYPE,
- PUNICODE_STRING, PHANDLE, PLUID, PUNICODE_STRING, PNTSTATUS);
-typedef NTSTATUS (NTAPI *PLSA_CLIENT_CALLBACK)(PCHAR, ULONG_PTR, ULONG_PTR,
- PSecBuffer, PSecBuffer);
-typedef NTSTATUS (NTAPI *PLSA_UPDATE_PRIMARY_CREDENTIALS)(PSECPKG_PRIMARY_CRED, PSECPKG_SUPPLEMENTAL_CRED_ARRAY);
-typedef NTSTATUS (NTAPI *PLSA_GET_AUTH_DATA_FOR_USER)(PSECURITY_STRING,
- SECPKG_NAME_TYPE, PSECURITY_STRING, PUCHAR *, PULONG, PUNICODE_STRING);
-typedef NTSTATUS (NTAPI *PLSA_CRACK_SINGLE_NAME)(ULONG, BOOLEAN,
- PUNICODE_STRING, PUNICODE_STRING, ULONG, PUNICODE_STRING, PUNICODE_STRING,
- PULONG);
-typedef NTSTATUS (NTAPI *PLSA_AUDIT_ACCOUNT_LOGON)(ULONG, BOOLEAN,
- PUNICODE_STRING, PUNICODE_STRING, PUNICODE_STRING, NTSTATUS);
-typedef NTSTATUS (NTAPI *PLSA_CALL_PACKAGE_PASSTHROUGH)(PUNICODE_STRING, PVOID,
- PVOID, ULONG, PVOID*, PULONG, PNTSTATUS);
-
-/* Dispatch tables of functions used by SSP/AP */
-typedef struct SECPKG_DLL_FUNCTIONS {
- PLSA_ALLOCATE_LSA_HEAP AllocateHeap;
- PLSA_FREE_LSA_HEAP FreeHeap;
- PLSA_REGISTER_CALLBACK RegisterCallback;
-} SECPKG_DLL_FUNCTIONS,
- *PSECPKG_DLL_FUNCTIONS;
-typedef struct LSA_DISPATCH_TABLE {
- PLSA_CREATE_LOGON_SESSION CreateLogonSession;
- PLSA_DELETE_LOGON_SESSION DeleteLogonSession;
- PLSA_ADD_CREDENTIAL AddCredential;
- PLSA_GET_CREDENTIALS GetCredentials;
- PLSA_DELETE_CREDENTIAL DeleteCredential;
- PLSA_ALLOCATE_LSA_HEAP AllocateLsaHeap;
- PLSA_FREE_LSA_HEAP FreeLsaHeap;
- PLSA_ALLOCATE_CLIENT_BUFFER AllocateClientBuffer;
- PLSA_FREE_CLIENT_BUFFER FreeClientBuffer;
- PLSA_COPY_TO_CLIENT_BUFFER CopyToClientBuffer;
- PLSA_COPY_FROM_CLIENT_BUFFER CopyFromClientBuffer;
-} LSA_DISPATCH_TABLE,
- *PLSA_DISPATCH_TABLE;
-typedef struct _LSA_SECPKG_FUNCTION_TABLE {
- PLSA_CREATE_LOGON_SESSION CreateLogonSession;
- PLSA_DELETE_LOGON_SESSION DeleteLogonSession;
- PLSA_ADD_CREDENTIAL AddCredential;
- PLSA_GET_CREDENTIALS GetCredentials;
- PLSA_DELETE_CREDENTIAL DeleteCredential;
- PLSA_ALLOCATE_LSA_HEAP AllocateLsaHeap;
- PLSA_FREE_LSA_HEAP FreeLsaHeap;
- PLSA_ALLOCATE_CLIENT_BUFFER AllocateClientBuffer;
- PLSA_FREE_CLIENT_BUFFER FreeClientBuffer;
- PLSA_COPY_TO_CLIENT_BUFFER CopyToClientBuffer;
- PLSA_COPY_FROM_CLIENT_BUFFER CopyFromClientBuffer;
- PLSA_IMPERSONATE_CLIENT ImpersonateClient;
- PLSA_UNLOAD_PACKAGE UnloadPackage;
- PLSA_DUPLICATE_HANDLE DuplicateHandle;
- PLSA_SAVE_SUPPLEMENTAL_CREDENTIALS SaveSupplementalCredentials;
- PLSA_CREATE_THREAD CreateThread;
- PLSA_GET_CLIENT_INFO GetClientInfo;
- PLSA_REGISTER_NOTIFICATION RegisterNotification;
- PLSA_CANCEL_NOTIFICATION CancelNotification;
- PLSA_MAP_BUFFER MapBuffer;
- PLSA_CREATE_TOKEN CreateToken;
- PLSA_AUDIT_LOGON AuditLogon;
- PLSA_CALL_PACKAGE CallPackage;
- PLSA_FREE_LSA_HEAP FreeReturnBuffer;
- PLSA_GET_CALL_INFO GetCallInfo;
- PLSA_CALL_PACKAGEEX CallPackageEx;
- PLSA_CREATE_SHARED_MEMORY CreateSharedMemory;
- PLSA_ALLOCATE_SHARED_MEMORY AllocateSharedMemory;
- PLSA_FREE_SHARED_MEMORY FreeSharedMemory;
- PLSA_DELETE_SHARED_MEMORY DeleteSharedMemory;
- PLSA_OPEN_SAM_USER OpenSamUser;
- PLSA_GET_USER_CREDENTIALS GetUserCredentials;
- PLSA_GET_USER_AUTH_DATA GetUserAuthData;
- PLSA_CLOSE_SAM_USER CloseSamUser;
- PLSA_CONVERT_AUTH_DATA_TO_TOKEN ConvertAuthDataToToken;
- PLSA_CLIENT_CALLBACK ClientCallback;
- PLSA_UPDATE_PRIMARY_CREDENTIALS UpdateCredentials;
- PLSA_GET_AUTH_DATA_FOR_USER GetAuthDataForUser;
- PLSA_CRACK_SINGLE_NAME CrackSingleName;
- PLSA_AUDIT_ACCOUNT_LOGON AuditAccountLogon;
- PLSA_CALL_PACKAGE_PASSTHROUGH CallPackagePassthrough;
-} LSA_SECPKG_FUNCTION_TABLE,
- *PLSA_SECPKG_FUNCTION_TABLE;
-
-/* functions implemented by SSP/AP obtainable by dispatch tables */
-typedef NTSTATUS (NTAPI *PLSA_AP_INITIALIZE_PACKAGE)(ULONG, PLSA_DISPATCH_TABLE,
- PLSA_STRING, PLSA_STRING, PLSA_STRING *);
-typedef NTSTATUS (NTAPI *PLSA_AP_LOGON_USER)(LPWSTR, LPWSTR, LPWSTR, LPWSTR,
- DWORD, DWORD, PHANDLE);
-typedef NTSTATUS (NTAPI *PLSA_AP_CALL_PACKAGE)(PUNICODE_STRING, PVOID, ULONG,
- PVOID *, PULONG, PNTSTATUS);
-typedef VOID (NTAPI *PLSA_AP_LOGON_TERMINATED)(PLUID);
-typedef NTSTATUS (NTAPI *PLSA_AP_CALL_PACKAGE_UNTRUSTED)(PLSA_CLIENT_REQUEST,
- PVOID, PVOID, ULONG, PVOID *, PULONG, PNTSTATUS);
-typedef NTSTATUS (NTAPI *PLSA_AP_CALL_PACKAGE_PASSTHROUGH)(PUNICODE_STRING,
- PVOID, PVOID, ULONG, PVOID *, PULONG, PNTSTATUS);
-typedef NTSTATUS (NTAPI *PLSA_AP_LOGON_USER_EX)(PLSA_CLIENT_REQUEST,
- SECURITY_LOGON_TYPE, PVOID, PVOID, ULONG, PVOID *, PULONG, PLUID, PNTSTATUS,
- PLSA_TOKEN_INFORMATION_TYPE, PVOID *, PUNICODE_STRING *, PUNICODE_STRING *,
- PUNICODE_STRING *);
-typedef NTSTATUS (NTAPI *PLSA_AP_LOGON_USER_EX2)(PLSA_CLIENT_REQUEST,
- SECURITY_LOGON_TYPE, PVOID, PVOID, ULONG, PVOID *, PULONG, PLUID, PNTSTATUS,
- PLSA_TOKEN_INFORMATION_TYPE, PVOID *, PUNICODE_STRING *, PUNICODE_STRING *,
- PUNICODE_STRING *, PSECPKG_PRIMARY_CRED, PSECPKG_SUPPLEMENTAL_CRED_ARRAY *);
-typedef NTSTATUS (SpInitializeFn)(ULONG_PTR, PSECPKG_PARAMETERS,
- PLSA_SECPKG_FUNCTION_TABLE);
-typedef NTSTATUS (NTAPI SpShutDownFn)(void);
-typedef NTSTATUS (NTAPI SpGetInfoFn)(PSecPkgInfoW);
-typedef NTSTATUS (NTAPI SpAcceptCredentialsFn)(SECURITY_LOGON_TYPE,
- PUNICODE_STRING, PSECPKG_PRIMARY_CRED, PSECPKG_SUPPLEMENTAL_CRED);
-typedef NTSTATUS (NTAPI SpAcquireCredentialsHandleFn)(PUNICODE_STRING, ULONG,
- PLUID, PVOID, PVOID, PVOID, PLSA_SEC_HANDLE, PTimeStamp);
-typedef NTSTATUS (NTAPI SpQueryCredentialsAttributesFn)(LSA_SEC_HANDLE, ULONG,
- PVOID);
-typedef NTSTATUS (NTAPI SpFreeCredentialsHandleFn)(LSA_SEC_HANDLE);
-typedef NTSTATUS (NTAPI SpSaveCredentialsFn)(LSA_SEC_HANDLE, PSecBuffer);
-typedef NTSTATUS (NTAPI SpGetCredentialsFn)(LSA_SEC_HANDLE, PSecBuffer);
-typedef NTSTATUS (NTAPI SpDeleteCredentialsFn)(LSA_SEC_HANDLE, PSecBuffer);
-typedef NTSTATUS (NTAPI SpInitLsaModeContextFn)(LSA_SEC_HANDLE, LSA_SEC_HANDLE,
- PUNICODE_STRING, ULONG, ULONG, PSecBufferDesc, PLSA_SEC_HANDLE, PSecBufferDesc,
- PULONG, PTimeStamp, PBOOLEAN, PSecBuffer);
-typedef NTSTATUS (NTAPI SpAcceptLsaModeContextFn)(LSA_SEC_HANDLE,
- LSA_SEC_HANDLE, PSecBufferDesc, ULONG, ULONG, PLSA_SEC_HANDLE, PSecBufferDesc,
- PULONG, PTimeStamp, PBOOLEAN, PSecBuffer);
-typedef NTSTATUS (NTAPI SpDeleteContextFn)(LSA_SEC_HANDLE);
-typedef NTSTATUS (NTAPI SpApplyControlTokenFn)(LSA_SEC_HANDLE, PSecBufferDesc);
-typedef NTSTATUS (NTAPI SpGetUserInfoFn)(PLUID, ULONG, PSecurityUserData *);
-typedef NTSTATUS (NTAPI SpGetExtendedInformationFn)(
- SECPKG_EXTENDED_INFORMATION_CLASS, PSECPKG_EXTENDED_INFORMATION *);
-typedef NTSTATUS (NTAPI SpQueryContextAttributesFn)(LSA_SEC_HANDLE, ULONG,
- PVOID);
-typedef NTSTATUS (NTAPI SpAddCredentialsFn)(LSA_SEC_HANDLE, PUNICODE_STRING,
- PUNICODE_STRING, ULONG, PVOID, PVOID, PVOID, PTimeStamp);
-typedef NTSTATUS (NTAPI SpSetExtendedInformationFn)(
- SECPKG_EXTENDED_INFORMATION_CLASS, PSECPKG_EXTENDED_INFORMATION);
-typedef NTSTATUS (NTAPI SpInstanceInitFn)(ULONG, PSECPKG_DLL_FUNCTIONS,
- PVOID *);
-typedef NTSTATUS (NTAPI SpInitUserModeContextFn)(LSA_SEC_HANDLE, PSecBuffer);
-typedef NTSTATUS (NTAPI SpMakeSignatureFn)(LSA_SEC_HANDLE, ULONG,
- PSecBufferDesc, ULONG);
-typedef NTSTATUS (NTAPI SpVerifySignatureFn)(LSA_SEC_HANDLE, PSecBufferDesc,
- ULONG, PULONG);
-typedef NTSTATUS (NTAPI SpSealMessageFn)(LSA_SEC_HANDLE, ULONG, PSecBufferDesc,
- ULONG);
-typedef NTSTATUS (NTAPI SpUnsealMessageFn)(LSA_SEC_HANDLE, PSecBufferDesc,
- ULONG, PULONG);
-typedef NTSTATUS (NTAPI SpGetContextTokenFn)(LSA_SEC_HANDLE, PHANDLE);
-typedef NTSTATUS (NTAPI SpCompleteAuthTokenFn)(LSA_SEC_HANDLE, PSecBufferDesc);
-typedef NTSTATUS (NTAPI SpFormatCredentialsFn)(PSecBuffer, PSecBuffer);
-typedef NTSTATUS (NTAPI SpMarshallSupplementalCredsFn)(ULONG, PUCHAR, PULONG,
- PVOID *);
-typedef NTSTATUS (NTAPI SpExportSecurityContextFn)(LSA_SEC_HANDLE, ULONG,
- PSecBuffer, PHANDLE);
-typedef NTSTATUS (NTAPI SpImportSecurityContextFn)(PSecBuffer, HANDLE,
- PLSA_SEC_HANDLE);
-
-/* Dispatch tables of functions implemented by SSP/AP */
-typedef struct SECPKG_FUNCTION_TABLE {
- PLSA_AP_INITIALIZE_PACKAGE InitializePackage;
- PLSA_AP_LOGON_USER LogonUser;
- PLSA_AP_CALL_PACKAGE CallPackage;
- PLSA_AP_LOGON_TERMINATED LogonTerminated;
- PLSA_AP_CALL_PACKAGE_UNTRUSTED CallPackageUntrusted;
- PLSA_AP_CALL_PACKAGE_PASSTHROUGH CallPackagePassthrough;
- PLSA_AP_LOGON_USER_EX LogonUserEx;
- PLSA_AP_LOGON_USER_EX2 LogonUserEx2;
- SpInitializeFn *Initialize;
- SpShutDownFn *Shutdown;
- SpGetInfoFn *GetInfo;
- SpAcceptCredentialsFn *AcceptCredentials;
- SpAcquireCredentialsHandleFn *AcquireCredentialsHandle;
- SpQueryCredentialsAttributesFn *QueryCredentialsAttributes;
- SpFreeCredentialsHandleFn *FreeCredentialsHandle;
- SpSaveCredentialsFn *SaveCredentials;
- SpGetCredentialsFn *GetCredentials;
- SpDeleteCredentialsFn *DeleteCredentials;
- SpInitLsaModeContextFn *InitLsaModeContext;
- SpAcceptLsaModeContextFn *AcceptLsaModeContext;
- SpDeleteContextFn *DeleteContext;
- SpApplyControlTokenFn *ApplyControlToken;
- SpGetUserInfoFn *GetUserInfo;
- SpGetExtendedInformationFn *GetExtendedInformation;
- SpQueryContextAttributesFn *QueryContextAttributes;
- SpAddCredentialsFn *AddCredentials;
- SpSetExtendedInformationFn *SetExtendedInformation;
-} SECPKG_FUNCTION_TABLE,
- *PSECPKG_FUNCTION_TABLE;
-
-typedef struct SECPKG_USER_FUNCTION_TABLE {
- SpInstanceInitFn *InstanceInit;
- SpInitUserModeContextFn *InitUserModeContext;
- SpMakeSignatureFn *MakeSignature;
- SpVerifySignatureFn *VerifySignature;
- SpSealMessageFn *SealMessage;
- SpUnsealMessageFn *UnsealMessage;
- SpGetContextTokenFn *GetContextToken;
- SpQueryContextAttributesFn *QueryContextAttributes;
- SpCompleteAuthTokenFn *CompleteAuthToken;
- SpDeleteContextFn *DeleteUserModeContext;
- SpFormatCredentialsFn *FormatCredentials;
- SpMarshallSupplementalCredsFn *MarshallSupplementalCreds;
- SpExportSecurityContextFn *ExportContext;
- SpImportSecurityContextFn *ImportContext;
-} SECPKG_USER_FUNCTION_TABLE,
- *PSECPKG_USER_FUNCTION_TABLE;
-
-/* Entry points to SSP/AP */
-typedef NTSTATUS (NTAPI *SpLsaModeInitializeFn)(ULONG, PULONG,
- PSECPKG_FUNCTION_TABLE *, PULONG);
-typedef NTSTATUS (WINAPI *SpUserModeInitializeFn)(ULONG, PULONG,
- PSECPKG_USER_FUNCTION_TABLE *, PULONG);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _NTSECPKG_H */
diff --git a/winsup/w32api/include/oaidl.h b/winsup/w32api/include/oaidl.h
deleted file mode 100644
index b8a2985..0000000
--- a/winsup/w32api/include/oaidl.h
+++ /dev/null
@@ -1,778 +0,0 @@
-#ifndef _OAIDL_H
-#define _OAIDL_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifndef COM_NO_WINDOWS_H
-#include <windows.h>
-#include <ole2.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef NONAMELESSUNION
-#define __VARIANT_NAME_1 n1
-#define __VARIANT_NAME_2 n2
-#define __VARIANT_NAME_3 n3
-#define __VARIANT_NAME_4 n4
-#else
-#define __tagVARIANT
-#define __VARIANT_NAME_1
-#define __VARIANT_NAME_2
-#define __VARIANT_NAME_3
-#define __VARIANT_NAME_4
-#endif
-#define DISPID_UNKNOWN (-1)
-#define DISPID_VALUE (0)
-#define DISPID_PROPERTYPUT (-3)
-#define DISPID_NEWENUM (-4)
-#define DISPID_EVALUATE (-5)
-#define DISPID_CONSTRUCTOR (-6)
-#define DISPID_DESTRUCTOR (-7)
-#define DISPID_COLLECT (-8)
-#define FADF_AUTO (1)
-#define FADF_STATIC (2)
-#define FADF_EMBEDDED (4)
-#define FADF_FIXEDSIZE (16)
-#define FADF_RECORD (32)
-#define FADF_HAVEIID (64)
-#define FADF_HAVEVARTYPE (128)
-#define FADF_BSTR (256)
-#define FADF_UNKNOWN (512)
-#define FADF_DISPATCH (1024)
-#define FADF_VARIANT (2048)
-#define FADF_RESERVED (0xf0e8)
-#define FADF_DATADELETED (0x1000)
-#define FADF_CREATEVECTOR (0x2000)
-#define PARAMFLAG_NONE (0)
-#define PARAMFLAG_FIN (1)
-#define PARAMFLAG_FOUT (2)
-#define PARAMFLAG_FLCID (4)
-#define PARAMFLAG_FRETVAL (8)
-#define PARAMFLAG_FOPT (16)
-#define PARAMFLAG_FHASDEFAULT (32)
-#define IDLFLAG_NONE PARAMFLAG_NONE
-#define IDLFLAG_FIN PARAMFLAG_FIN
-#define IDLFLAG_FOUT PARAMFLAG_FOUT
-#define IDLFLAG_FLCID PARAMFLAG_FLCID
-#define IDLFLAG_FRETVAL PARAMFLAG_FRETVAL
-#define IMPLTYPEFLAG_FDEFAULT 1
-#define IMPLTYPEFLAG_FSOURCE 2
-#define IMPLTYPEFLAG_FRESTRICTED 4
-#define IMPLTYPEFLAG_FDEFAULTVTABLE 8
-
-typedef _COM_interface ITypeLib *LPTYPELIB;
-typedef _COM_interface ITypeLib2 *LPTYPELIB2;
-typedef _COM_interface ICreateTypeInfo *LPCREATETYPEINFO;
-typedef _COM_interface ICreateTypeInfo2 *LPCREATETYPEINFO2;
-typedef _COM_interface ICreateTypeLib *LPCREATETYPELIB;
-typedef _COM_interface ICreateTypeLib2 *LPCREATETYPELIB2;
-typedef _COM_interface ITypeComp *LPTYPECOMP;
-typedef _COM_interface ITypeInfo *LPTYPEINFO;
-typedef _COM_interface ITypeInfo2 *LPTYPEINFO2;
-typedef _COM_interface IErrorInfo *LPERRORINFO;
-typedef _COM_interface IDispatch *LPDISPATCH;
-typedef _COM_interface IEnumVARIANT *LPENUMVARIANT;
-typedef _COM_interface ICreateErrorInfo *LPCREATEERRORINFO;
-typedef _COM_interface ISupportErrorInfo *LPSUPPORTERRORINFO;
-typedef _COM_interface IRecordInfo *LPRECORDINFO;
-
-extern const IID IID_ITypeLib;
-extern const IID IID_ITypeLib2;
-extern const IID IID_ICreateTypeInfo;
-extern const IID IID_ICreateTypeInfo2;
-extern const IID IID_ICreateTypeLib;
-extern const IID IID_ICreateTypeLib2;
-extern const IID IID_ITypeInfo;
-extern const IID IID_ITypeInfo2;
-extern const IID IID_IErrorInfo;
-extern const IID IID_IDispatch;
-extern const IID IID_IEnumVARIANT;
-extern const IID IID_ICreateErrorInfo;
-extern const IID IID_ISupportErrorInfo;
-extern const IID IID_IRecordInfo;
-extern const IID IID_ITypeMarshal;
-
-typedef enum tagSYSKIND {
- SYS_WIN16,SYS_WIN32,SYS_MAC
-} SYSKIND;
-typedef enum tagLIBFLAGS {
- LIBFLAG_FRESTRICTED=1,LIBFLAG_FCONTROL=2,LIBFLAG_FHIDDEN=4,
- LIBFLAG_FHASDISKIMAGE=8
-} LIBFLAGS;
-typedef struct tagTLIBATTR {
- GUID guid;
- LCID lcid;
- SYSKIND syskind;
- WORD wMajorVerNum;
- WORD wMinorVerNum;
- WORD wLibFlags;
-} TLIBATTR,*LPTLIBATTR;
-typedef CY CURRENCY;
-typedef struct tagSAFEARRAYBOUND {
- ULONG cElements;
- LONG lLbound;
-}SAFEARRAYBOUND,*LPSAFEARRAYBOUND;
-typedef struct _wireSAFEARR_BSTR
-{
- ULONG Size;
- wireBSTR *aBstr;
-}SAFEARR_BSTR;
-typedef struct _wireSAFEARR_UNKNOWN {
- ULONG Size;
- IUnknown **apUnknown;
-}SAFEARR_UNKNOWN;
-typedef struct _wireSAFEARR_DISPATCH {
- ULONG Size;
- LPDISPATCH *apDispatch;
-}SAFEARR_DISPATCH;
-typedef struct _wireSAFEARR_VARIANT {
- ULONG Size;
- struct _wireVARIANT *aVariant;
-}SAFEARR_VARIANT;
-typedef enum tagSF_TYPE {
- SF_ERROR=VT_ERROR,
- SF_I1=VT_I1,
- SF_I2=VT_I2,
- SF_I4=VT_I4,
- SF_I8=VT_I8,
- SF_BSTR=VT_BSTR,
- SF_UNKNOWN=VT_UNKNOWN,
- SF_DISPATCH=VT_DISPATCH,
- SF_VARIANT=VT_VARIANT
-}SF_TYPE;
-typedef struct _wireBRECORD {
- ULONG fFlags;
- ULONG clSize;
- LPRECORDINFO* pRecInfo;
- byte* pRecord;
-} *wireBRECORD;
-typedef struct _wireSAFEARR_BRECORD {
- ULONG Size;
- wireBRECORD* aRecord;
- } SAFEARR_BRECORD;
-typedef struct _wireSAFEARR_HAVEIID {
- ULONG Size;
- IUnknown** apUnknown;
- IID iid;
- } SAFEARR_HAVEIID;
-typedef struct _wireSAFEARRAY_UNION {
- ULONG sfType;
- union {
- SAFEARR_BSTR BstrStr;
- SAFEARR_UNKNOWN UnknownStr;
- SAFEARR_DISPATCH DispatchStr;
- SAFEARR_VARIANT VariantStr;
- SAFEARR_BRECORD RecordStr;
- SAFEARR_HAVEIID HaveIidStr;
- BYTE_SIZEDARR ByteStr;
- WORD_SIZEDARR WordStr;
- DWORD_SIZEDARR LongStr;
- HYPER_SIZEDARR HyperStr;
- }u;
-}SAFEARRAYUNION;
-typedef struct _wireSAFEARRAY {
- USHORT cDims;
- USHORT fFeatures;
- ULONG cbElements;
- ULONG cLocks;
- SAFEARRAYUNION uArrayStructs;
- SAFEARRAYBOUND rgsabound[1];
-}*wireSAFEARRAY;
-typedef wireSAFEARRAY *wirePSAFEARRAY;
-typedef struct tagSAFEARRAY {
- USHORT cDims;
- USHORT fFeatures;
- ULONG cbElements;
- ULONG cLocks;
- PVOID pvData;
- SAFEARRAYBOUND rgsabound[1];
-}SAFEARRAY,*LPSAFEARRAY;
-#if defined (__GNUC__) && !defined (NONAMELESSUNION)
-__extension__ /* no named members */
-#endif
-typedef struct tagVARIANT {
- _ANONYMOUS_UNION union {
- struct __tagVARIANT {
- VARTYPE vt;
- WORD wReserved1;
- WORD wReserved2;
- WORD wReserved3;
- _ANONYMOUS_UNION union {
- long lVal;
- LONGLONG llVal;
- unsigned char bVal;
- short iVal;
- float fltVal;
- double dblVal;
- VARIANT_BOOL boolVal;
- SCODE scode;
- CY cyVal;
- DATE date;
- BSTR bstrVal;
- IUnknown *punkVal;
- LPDISPATCH pdispVal;
- SAFEARRAY *parray;
- unsigned char *pbVal;
- short *piVal;
- long *plVal;
- LONGLONG * pllVal;
- float *pfltVal;
- double *pdblVal;
- VARIANT_BOOL *pboolVal;
- _VARIANT_BOOL *pbool;
- SCODE *pscode;
- CY *pcyVal;
- DATE *pdate;
- BSTR *pbstrVal;
- IUnknown **ppunkVal;
- LPDISPATCH *ppdispVal;
- SAFEARRAY **pparray;
- struct tagVARIANT *pvarVal;
- void *byref;
- CHAR cVal;
- USHORT uiVal;
- ULONG ulVal;
- ULONGLONG ullVal;
- INT intVal;
- UINT uintVal;
- DECIMAL *pdecVal;
- CHAR *pcVal;
- USHORT *puiVal;
- ULONG *pulVal;
- ULONGLONG * pullVal;
- INT *pintVal;
- UINT *puintVal;
- _ANONYMOUS_STRUCT struct {
- PVOID pvRecord;
- struct IRecordInfo *pRecInfo;
- } __VARIANT_NAME_4;
- } __VARIANT_NAME_3;
- } __VARIANT_NAME_2;
- DECIMAL decVal;
- } __VARIANT_NAME_1;
-} VARIANT,*LPVARIANT;
-typedef VARIANT VARIANTARG;
-typedef VARIANT *LPVARIANTARG;
-typedef struct _wireVARIANT {
- DWORD clSize;
- DWORD rpcReserved;
- USHORT vt;
- USHORT wReserved1;
- USHORT wReserved2;
- USHORT wReserved3;
- _ANONYMOUS_UNION union {
- LONG lVal;
- LONGLONG llVal;
- BYTE bVal;
- SHORT iVal;
- FLOAT fltVal;
- DOUBLE dblVal;
- VARIANT_BOOL boolVal;
- SCODE scode;
- CY cyVal;
- DATE date;
- wireBSTR bstrVal;
- IUnknown *punkVal;
- LPDISPATCH pdispVal;
- wirePSAFEARRAY parray;
- wireBRECORD brecVal;
- BYTE *pbVal;
- SHORT *piVal;
- LONG *plVal;
- FLOAT *pfltVal;
- DOUBLE *pdblVal;
- VARIANT_BOOL *pboolVal;
- SCODE *pscode;
- CY *pcyVal;
- DATE *pdate;
- wireBSTR *pbstrVal;
- IUnknown **ppunkVal;
- LPDISPATCH *ppdispVal;
- wirePSAFEARRAY *pparray;
- struct _wireVARIANT *pvarVal;
- CHAR cVal;
- USHORT uiVal;
- ULONG ulVal;
- ULONGLONG ullVal;
- INT intVal;
- UINT uintVal;
- DECIMAL decVal;
- DECIMAL *pdecVal;
- CHAR *pcVal;
- USHORT *puiVal;
- ULONG *pulVal;
- INT *pintVal;
- UINT *puintVal;
- } DUMMYUNIONNAME;
-} *wireVARIANT;
-typedef LONG DISPID;
-typedef DISPID MEMBERID;
-typedef DWORD HREFTYPE;
-typedef enum tagTYPEKIND {
- TKIND_ENUM,TKIND_RECORD,TKIND_MODULE,TKIND_INTERFACE,TKIND_DISPATCH,
- TKIND_COCLASS,TKIND_ALIAS,TKIND_UNION,TKIND_MAX
-}TYPEKIND;
-typedef struct tagTYPEDESC {
- _ANONYMOUS_UNION union {
- struct tagTYPEDESC *lptdesc;
- struct tagARRAYDESC *lpadesc;
- HREFTYPE hreftype;
- } DUMMYUNIONNAME;
- VARTYPE vt;
-}TYPEDESC;
-typedef struct tagARRAYDESC {
- TYPEDESC tdescElem;
- USHORT cDims;
- SAFEARRAYBOUND rgbounds[1];
-}ARRAYDESC;
-typedef struct tagPARAMDESCEX {
- ULONG cBytes;
- VARIANTARG varDefaultValue;
-}PARAMDESCEX,*LPPARAMDESCEX;
-typedef struct tagPARAMDESC {
- LPPARAMDESCEX pparamdescex;
- USHORT wParamFlags;
-}PARAMDESC,*LPPARAMDESC;
-typedef struct tagIDLDESC {
- ULONG dwReserved;
- USHORT wIDLFlags;
-}IDLDESC,*LPIDLDESC;
-typedef struct tagELEMDESC {
- TYPEDESC tdesc;
- _ANONYMOUS_UNION union {
- IDLDESC idldesc;
- PARAMDESC paramdesc;
- } DUMMYUNIONNAME;
-} ELEMDESC,*LPELEMDESC;
-typedef struct tagTYPEATTR {
- GUID guid;
- LCID lcid;
- DWORD dwReserved;
- MEMBERID memidConstructor;
- MEMBERID memidDestructor;
- LPOLESTR lpstrSchema;
- ULONG cbSizeInstance;
- TYPEKIND typekind;
- WORD cFuncs;
- WORD cVars;
- WORD cImplTypes;
- WORD cbSizeVft;
- WORD cbAlignment;
- WORD wTypeFlags;
- WORD wMajorVerNum;
- WORD wMinorVerNum;
- TYPEDESC tdescAlias;
- IDLDESC idldescType;
-}TYPEATTR,*LPTYPEATTR;
-typedef struct tagDISPPARAMS {
- VARIANTARG *rgvarg;
- DISPID *rgdispidNamedArgs;
- UINT cArgs;
- UINT cNamedArgs;
-}DISPPARAMS;
-typedef struct tagEXCEPINFO {
- WORD wCode;
- WORD wReserved;
- BSTR bstrSource;
- BSTR bstrDescription;
- BSTR bstrHelpFile;
- DWORD dwHelpContext;
- PVOID pvReserved;
- HRESULT(__stdcall * pfnDeferredFillIn)(struct tagEXCEPINFO*);
- SCODE scode;
-} EXCEPINFO,*LPEXCEPINFO;
-typedef enum tagCALLCONV {
- CC_FASTCALL,CC_CDECL,CC_MSCPASCAL,CC_PASCAL=CC_MSCPASCAL,
- CC_MACPASCAL,CC_STDCALL,CC_FPFASTCALL,CC_SYSCALL,CC_MPWCDECL,
- CC_MPWPASCAL,CC_MAX=CC_MPWPASCAL
-}CALLCONV;
-typedef enum tagFUNCKIND {
- FUNC_VIRTUAL,FUNC_PUREVIRTUAL,FUNC_NONVIRTUAL,
- FUNC_STATIC,FUNC_DISPATCH
-}FUNCKIND;
-typedef enum tagINVOKEKIND {
- INVOKE_FUNC=1,INVOKE_PROPERTYGET,INVOKE_PROPERTYPUT=4,
- INVOKE_PROPERTYPUTREF=8
-}INVOKEKIND;
-typedef struct tagFUNCDESC {
- MEMBERID memid;
- SCODE *lprgscode;
- ELEMDESC *lprgelemdescParam;
- FUNCKIND funckind;
- INVOKEKIND invkind;
- CALLCONV callconv;
- SHORT cParams;
- SHORT cParamsOpt;
- SHORT oVft;
- SHORT cScodes;
- ELEMDESC elemdescFunc;
- WORD wFuncFlags;
-}FUNCDESC,*LPFUNCDESC;
-typedef enum tagVARKIND {
- VAR_PERINSTANCE,VAR_STATIC,VAR_CONST,VAR_DISPATCH
-} VARKIND;
-typedef struct tagVARDESC {
- MEMBERID memid;
- LPOLESTR lpstrSchema;
- _ANONYMOUS_UNION union {
- ULONG oInst;
- VARIANT *lpvarValue;
- } DUMMYUNIONNAME;
- ELEMDESC elemdescVar;
- WORD wVarFlags;
- VARKIND varkind;
-} VARDESC,*LPVARDESC;
-typedef enum tagTYPEFLAGS {
- TYPEFLAG_FAPPOBJECT=1,TYPEFLAG_FCANCREATE=2,TYPEFLAG_FLICENSED=4,
- TYPEFLAG_FPREDECLID=8,TYPEFLAG_FHIDDEN=16,TYPEFLAG_FCONTROL=32,
- TYPEFLAG_FDUAL=64,TYPEFLAG_FNONEXTENSIBLE=128,
- TYPEFLAG_FOLEAUTOMATION=256,TYPEFLAG_FRESTRICTED=512,
- TYPEFLAG_FAGGREGATABLE=1024,TYPEFLAG_FREPLACEABLE=2048,
- TYPEFLAG_FDISPATCHABLE=4096,TYPEFLAG_FREVERSEBIND=8192
-} TYPEFLAGS;
-typedef enum tagFUNCFLAGS {
- FUNCFLAG_FRESTRICTED=1,FUNCFLAG_FSOURCE=2,FUNCFLAG_FBINDABLE=4,
- FUNCFLAG_FREQUESTEDIT=8,FUNCFLAG_FDISPLAYBIND=16,FUNCFLAG_FDEFAULTBIND=32,
- FUNCFLAG_FHIDDEN=64,FUNCFLAG_FUSESGETLASTERROR=128,FUNCFLAG_FDEFAULTCOLLELEM=256,
- FUNCFLAG_FUIDEFAULT=512,FUNCFLAG_FNONBROWSABLE=1024,FUNCFLAG_FREPLACEABLE=2048,
- FUNCFLAG_FIMMEDIATEBIND=4096
-} FUNCFLAGS;
-typedef enum tagVARFLAGS {
- VARFLAG_FREADONLY=1,VARFLAG_FSOURCE=2,VARFLAG_FBINDABLE=4,VARFLAG_FREQUESTEDIT=8,
- VARFLAG_FDISPLAYBIND=16,VARFLAG_FDEFAULTBIND=32,VARFLAG_FHIDDEN=64,VARFLAG_FRESTRICTED=128,
- VARFLAG_FDEFAULTCOLLELEM=256,VARFLAG_FUIDEFAULT=512,VARFLAG_FNONBROWSABLE=1024,
- VARFLAG_FREPLACEABLE=2048,VARFLAG_FIMMEDIATEBIND=4096
-} VARFLAGS;
-typedef struct tagCLEANLOCALSTORAGE {
- IUnknown *pInterface;
- PVOID pStorage;
- DWORD flags;
-} CLEANLOCALSTORAGE;
-typedef struct tagCUSTDATAITEM {
- GUID guid;
- VARIANTARG varValue;
-} CUSTDATAITEM,*LPCUSTDATAITEM;
-typedef struct tagCUSTDATA {
- DWORD cCustData;
- LPCUSTDATAITEM prgCustData;
-} CUSTDATA,*LPCUSTDATA;
-
-typedef enum tagDESCKIND {
- DESCKIND_NONE=0,DESCKIND_FUNCDESC=DESCKIND_NONE+1,
- DESCKIND_VARDESC=DESCKIND_FUNCDESC+1,DESCKIND_TYPECOMP=DESCKIND_VARDESC+1,
- DESCKIND_IMPLICITAPPOBJ=DESCKIND_TYPECOMP+1,
- DESCKIND_MAX=DESCKIND_IMPLICITAPPOBJ+1
-} DESCKIND;
-
-typedef union tagBINDPTR {
- LPFUNCDESC lpfuncdesc;
- LPVARDESC lpvardesc;
- LPTYPECOMP lptcomp;
-} BINDPTR,*LPBINDPTR;
-
-#define INTERFACE IDispatch
-DECLARE_INTERFACE_(IDispatch,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
- STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IDispatch_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDispatch_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IDispatch_Release(p) (p)->lpVtbl->Release(p)
-#define IDispatch_GetTypeInfoCount(p,a) (p)->lpVtbl->GetTypeInfoCount(p,a)
-#define IDispatch_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
-#define IDispatch_GetIDsOfNames(p,a,b,c,d,e) (p)->lpVtbl->GetIDsOfNames(p,a,b,c,d,e)
-#define IDispatch_Invoke(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Invoke(p,a,b,c,d,e,f,g,h)
-#endif
-
-#define INTERFACE IEnumVARIANT
-DECLARE_INTERFACE_(IEnumVARIANT,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Next)(THIS_ ULONG,VARIANT*,ULONG*) PURE;
- STDMETHOD(Skip)(THIS_ ULONG) PURE;
- STDMETHOD(Reset)(THIS) PURE;
- STDMETHOD(Clone)(THIS_ IEnumVARIANT**) PURE;
-};
-#undef INTERFACE
-
-#define INTERFACE ITypeComp
-DECLARE_INTERFACE_(ITypeComp,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Bind)(THIS_ LPOLESTR,ULONG,WORD,LPTYPEINFO*,DESCKIND*,LPBINDPTR) PURE;
- STDMETHOD(BindType)(THIS_ LPOLESTR,ULONG,LPTYPEINFO*,LPTYPECOMP*) PURE;
-};
-#undef INTERFACE
-
-#define INTERFACE ITypeInfo
-DECLARE_INTERFACE_(ITypeInfo,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeAttr)(THIS_ LPTYPEATTR*) PURE;
- STDMETHOD(GetTypeComp)(THIS_ LPTYPECOMP*) PURE;
- STDMETHOD(GetFuncDesc)(THIS_ UINT,LPFUNCDESC*) PURE;
- STDMETHOD(GetVarDesc)(THIS_ UINT,LPVARDESC*) PURE;
- STDMETHOD(GetNames)(THIS_ MEMBERID,BSTR*,UINT,UINT*) PURE;
- STDMETHOD(GetRefTypeOfImplType)(THIS_ UINT,HREFTYPE*) PURE;
- STDMETHOD(GetImplTypeFlags)(THIS_ UINT,INT*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ LPOLESTR*,UINT,MEMBERID*) PURE;
- STDMETHOD(Invoke)(THIS_ PVOID,MEMBERID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
- STDMETHOD(GetDocumentation)(THIS_ MEMBERID,BSTR*,BSTR*,DWORD*,BSTR*) PURE;
- STDMETHOD(GetDllEntry)(THIS_ MEMBERID,INVOKEKIND,BSTR*,BSTR*,WORD*) PURE;
- STDMETHOD(GetRefTypeInfo)(THIS_ HREFTYPE,LPTYPEINFO*) PURE;
- STDMETHOD(AddressOfMember)(THIS_ MEMBERID,INVOKEKIND,PVOID*) PURE;
- STDMETHOD(CreateInstance)(THIS_ LPUNKNOWN,REFIID,PVOID*) PURE;
- STDMETHOD(GetMops)(THIS_ MEMBERID,BSTR*) PURE;
- STDMETHOD(GetContainingTypeLib)(THIS_ LPTYPELIB*,UINT*) PURE;
- STDMETHOD_(void,ReleaseTypeAttr)(THIS_ LPTYPEATTR) PURE;
- STDMETHOD_(void,ReleaseFuncDesc)(THIS_ LPFUNCDESC) PURE;
- STDMETHOD_(void,ReleaseVarDesc)(THIS_ LPVARDESC) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define ITypeInfo_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define ITypeInfo_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define ITypeInfo_Release(p) (p)->lpVtbl->Release(p)
-#define ITypeInfo_GetTypeAttr(p,a) (p)->lpVtbl->GetTypeAttr(p,a)
-#define ITypeInfo_GetTypeComp(p,a) (p)->lpVtbl->GetTypeComp(p,a)
-#define ITypeInfo_GetFuncDesc(p,a,b) (p)->lpVtbl->GetFuncDesc(p,a,b)
-#define ITypeInfo_GetVarDesc(p,a,b) (p)->lpVtbl->GetVarDesc(p,a,b)
-#define ITypeInfo_GetNames(p,a,b,c,d) (p)->lpVtbl->GetNames(p,a,b,c,d)
-#define ITypeInfo_GetRefTypeOfImplType(p,a,b) (p)->lpVtbl->GetRefTypeOfImplType(p,a,b)
-#define ITypeInfo_GetImplTypeFlags(p,a,b) (p)->lpVtbl->GetImplTypeFlags(p,a,b)
-#define ITypeInfo_GetIDsOfNames(p,a,b,c) (p)->lpVtbl->GetIDsOfNames(p,a,b,c)
-#define ITypeInfo_Invoke(p,a,b,c,d,e,f,g) (p)->lpVtbl->Invoke(p,a,b,c,d,e,f,g)
-#define ITypeInfo_GetDocumentation(p,a,b,c,d,e) (p)->lpVtbl->GetDocumentation(p,a,b,c,d,e)
-#define ITypeInfo_GetDllEntry(p,a,b,c,d,e) (p)->lpVtbl->GetDllEntry(p,a,b,c,d,e)
-#define ITypeInfo_GetRefTypeInfo(p,a,b) (p)->lpVtbl->GetRefTypeInfo(p,a,b)
-#define ITypeInfo_AddressOfMember(p,a,b,c) (p)->lpVtbl->AddressOfMember(p,a,b,c)
-#define ITypeInfo_CreateInstance(p,a,b,c) (p)->lpVtbl->CreateInstance(p,a,b,c)
-#define ITypeInfo_GetMops(p,a,b) (p)->lpVtbl->GetMops(p,a,b)
-#define ITypeInfo_GetContainingTypeLib(p,a,b) (p)->lpVtbl->GetContainingTypeLib(p,a,b)
-#define ITypeInfo_ReleaseTypeAttr(p,a) (p)->lpVtbl->ReleaseTypeAttr(p,a)
-#define ITypeInfo_ReleaseFuncDesc(p,a) (p)->lpVtbl->ReleaseFuncDesc(p,a)
-#define ITypeInfo_ReleaseVarDesc(p,a) (p)->lpVtbl->ReleaseVarDesc(p,a)
-#endif
-
-#define INTERFACE ITypeInfo2
-DECLARE_INTERFACE_(ITypeInfo2,ITypeInfo)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeAttr)(THIS_ LPTYPEATTR*) PURE;
- STDMETHOD(GetTypeComp)(THIS_ LPTYPECOMP*) PURE;
- STDMETHOD(GetFuncDesc)(THIS_ UINT,LPFUNCDESC*) PURE;
- STDMETHOD(GetVarDesc)(THIS_ UINT,LPVARDESC*) PURE;
- STDMETHOD(GetNames)(THIS_ MEMBERID,BSTR*,UINT,UINT*) PURE;
- STDMETHOD(GetRefTypeOfImplType)(THIS_ UINT,HREFTYPE*) PURE;
- STDMETHOD(GetImplTypeFlags)(THIS_ UINT,INT*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ LPOLESTR*,UINT,MEMBERID*) PURE;
- STDMETHOD(Invoke)(THIS_ PVOID,MEMBERID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
- STDMETHOD(GetDocumentation)(THIS_ MEMBERID,BSTR*,BSTR*,DWORD*,BSTR*) PURE;
- STDMETHOD(GetDllEntry)(THIS_ MEMBERID,INVOKEKIND,BSTR*,BSTR*,WORD*) PURE;
- STDMETHOD(GetRefTypeInfo)(THIS_ HREFTYPE,LPTYPEINFO*) PURE;
- STDMETHOD(AddressOfMember)(THIS_ MEMBERID,INVOKEKIND,PVOID*) PURE;
- STDMETHOD(CreateInstance)(THIS_ LPUNKNOWN,REFIID,PVOID*) PURE;
- STDMETHOD(GetMops)(THIS_ MEMBERID,BSTR*) PURE;
- STDMETHOD(GetContainingTypeLib)(THIS_ LPTYPELIB*,UINT*) PURE;
- STDMETHOD_(void,ReleaseTypeAttr)(THIS_ LPTYPEATTR) PURE;
- STDMETHOD_(void,ReleaseFuncDesc)(THIS_ LPFUNCDESC) PURE;
- STDMETHOD_(void,ReleaseVarDesc)(THIS_ LPVARDESC) PURE;
- STDMETHOD(GetTypeKind)(THIS_ TYPEKIND*) PURE;
- STDMETHOD(GetTypeFlags)(THIS_ ULONG*) PURE;
- STDMETHOD(GetFuncIndexOfMemId)(THIS_ MEMBERID,INVOKEKIND,UINT*) PURE;
- STDMETHOD(GetVarIndexOfMemId)(THIS_ MEMBERID,UINT*) PURE;
- STDMETHOD(GetCustData)(THIS_ REFGUID,VARIANT*) PURE;
- STDMETHOD(GetFuncCustData)(THIS_ UINT,REFGUID,VARIANT*) PURE;
- STDMETHOD(GetParamCustData)(THIS_ UINT,UINT,REFGUID,VARIANT*) PURE;
- STDMETHOD(GetVarCustData)(THIS_ UINT,REFGUID,VARIANT*) PURE;
- STDMETHOD(GetImplTypeCustData)(THIS_ UINT,REFGUID,VARIANT*) PURE;
- STDMETHOD(GetDocumentation2)(THIS_ MEMBERID,LCID,BSTR*,DWORD*,BSTR*) PURE;
- STDMETHOD(GetAllCustData)(THIS_ CUSTDATA*) PURE;
- STDMETHOD(GetAllFuncCustData)(THIS_ UINT,CUSTDATA*) PURE;
- STDMETHOD(GetAllParamCustData)(THIS_ UINT,UINT,CUSTDATA*) PURE;
- STDMETHOD(GetAllVarCustData)(THIS_ UINT,CUSTDATA*) PURE;
- STDMETHOD(GetAllImplTypeCustData)(THIS_ UINT,CUSTDATA*) PURE;
-};
-#undef INTERFACE
-
-#define INTERFACE ITypeLib
-DECLARE_INTERFACE_(ITypeLib,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD_(UINT,GetTypeInfoCount)(THIS) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,ITypeInfo**) PURE;
- STDMETHOD(GetTypeInfoType)(THIS_ UINT,TYPEKIND*) PURE;
- STDMETHOD(GetTypeInfoOfGuid)(THIS_ REFGUID,ITypeInfo**) PURE;
- STDMETHOD(GetLibAttr)(THIS_ TLIBATTR**) PURE;
- STDMETHOD(GetTypeComp)(THIS_ ITypeComp*) PURE;
- STDMETHOD(GetDocumentation)(THIS_ INT,BSTR*,BSTR*,DWORD*,BSTR*) PURE;
- STDMETHOD(IsName)(THIS_ LPOLESTR,ULONG,BOOL*) PURE;
- STDMETHOD(FindName)(THIS_ LPOLESTR,ULONG,ITypeInfo**,MEMBERID*,USHORT*) PURE;
- STDMETHOD_(void,ReleaseTLibAttr)(THIS_ TLIBATTR*) PURE;
-};
-#undef INTERFACE
-
-#define INTERFACE ITypeLib2
-DECLARE_INTERFACE_(ITypeLib2,ITypeLib)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD_(UINT,GetTypeInfoCount)(THIS) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,ITypeInfo**) PURE;
- STDMETHOD(GetTypeInfoType)(THIS_ UINT,TYPEKIND*) PURE;
- STDMETHOD(GetTypeInfoOfGuid)(THIS_ REFGUID,ITypeInfo**) PURE;
- STDMETHOD(GetLibAttr)(THIS_ TLIBATTR**) PURE;
- STDMETHOD(GetTypeComp)(THIS_ ITypeComp*) PURE;
- STDMETHOD(GetDocumentation)(THIS_ INT,BSTR*,BSTR*,DWORD*,BSTR*) PURE;
- STDMETHOD(IsName)(THIS_ LPOLESTR,ULONG,BOOL*) PURE;
- STDMETHOD(FindName)(THIS_ LPOLESTR,ULONG,ITypeInfo**,MEMBERID*,USHORT*) PURE;
- STDMETHOD_(void,ReleaseTLibAttr)(THIS_ TLIBATTR*) PURE;
- STDMETHOD(GetCustData)(THIS_ REFGUID,VARIANT*) PURE;
- STDMETHOD(GetLibStatistics)(THIS_ ULONG*,ULONG*) PURE;
- STDMETHOD(GetDocumentation2)(THIS_ INT,LCID,BSTR*,DWORD*,BSTR*) PURE;
- STDMETHOD(GetAllCustData)(THIS_ CUSTDATA*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IErrorInfo;
-#define INTERFACE IErrorInfo
-DECLARE_INTERFACE_(IErrorInfo, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetGUID)(THIS_ GUID*) PURE;
- STDMETHOD(GetSource)(THIS_ BSTR*) PURE;
- STDMETHOD(GetDescription)(THIS_ BSTR*) PURE;
- STDMETHOD(GetHelpFile)(THIS_ BSTR*) PURE;
- STDMETHOD(GetHelpContext)(THIS_ DWORD*) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IErrorInfo_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IErrorInfo_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IErrorInfo_Release(T) (T)->lpVtbl->Release(T)
-#define IErrorInfo_GetGUID(T,a) (T)->lpVtbl->GetGUID(T,a)
-#define IErrorInfo_GetSource(T,a) (T)->lpVtbl->GetSource(T,a)
-#define IErrorInfo_GetDescription(T,a) (T)->lpVtbl->GetDescription(T,a)
-#define IErrorInfo_GetHelpFile(T,a) (T)->lpVtbl->GetHelpFile(T,a)
-#define IErrorInfo_GetHelpContext(T,a) (T)->lpVtbl->GetHelpContext(T,a)
-#endif
-
-EXTERN_C const IID IID_ICreateErrorInfo;
-#define INTERFACE ICreateErrorInfo
-DECLARE_INTERFACE_(ICreateErrorInfo, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*)PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(SetGUID)(THIS_ REFGUID) PURE;
- STDMETHOD(SetSource)(THIS_ LPOLESTR) PURE;
- STDMETHOD(SetDescription)(THIS_ LPOLESTR) PURE;
- STDMETHOD(SetHelpFile)(THIS_ LPOLESTR) PURE;
- STDMETHOD(SetHelpContext)(THIS_ DWORD) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_ISupportErrorInfo;
-#define INTERFACE ISupportErrorInfo
-DECLARE_INTERFACE_(ISupportErrorInfo, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(InterfaceSupportsErrorInfo)(THIS_ REFIID) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IRecordInfo;
-#define INTERFACE IRecordInfo
-DECLARE_INTERFACE_(IRecordInfo, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(RecordInit)(THIS_ PVOID) PURE;
- STDMETHOD(RecordClear)(THIS_ PVOID) PURE;
- STDMETHOD(RecordCopy)(THIS_ PVOID, PVOID) PURE;
- STDMETHOD(GetGuid)(THIS_ GUID*) PURE;
- STDMETHOD(GetName)(THIS_ BSTR*) PURE;
- STDMETHOD(GetSize)(THIS_ ULONG*) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ ITypeInfo**) PURE;
- STDMETHOD(GetField)(THIS_ PVOID,LPCOLESTR,VARIANT*) PURE;
- STDMETHOD(GetFieldNoCopy)(THIS_ PVOID,LPCOLESTR,VARIANT*,PVOID*) PURE;
- STDMETHOD(PutField )(THIS_ ULONG,PVOID,LPCOLESTR, VARIANT*) PURE;
- STDMETHOD(PutFieldNoCopy)(THIS_ ULONG,PVOID,LPCOLESTR,VARIANT*) PURE;
- STDMETHOD(GetFieldNames)(THIS_ ULONG*,BSTR*) PURE;
- STDMETHOD_(BOOL,IsMatchingType)(THIS_ THIS) PURE;
- STDMETHOD_(PVOID,RecordCreate)(THIS) PURE;
- STDMETHOD(RecordCreateCopy)(THIS_ PVOID,PVOID*) PURE;
- STDMETHOD(RecordDestroy )(THIS_ PVOID) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IRecordInfo_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IRecordInfo_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IRecordInfo_Release(p) (p)->lpVtbl->Release(p)
-#define IRecordInfo_RecordInit(p,a) (p)->lpVtbl->RecordInit(p,a)
-#define IRecordInfo_RecordClear(p,a) (p)->lpVtbl->RecordClear(p,a)
-#define IRecordInfo_RecordCopy(p,a,b) (p)->lpVtbl->RecordCopy(p,a,b)
-#define IRecordInfo_GetGuid(p,a) (p)->lpVtbl->GetGuid(p,a)
-#define IRecordInfo_GetName(p,a) (p)->lpVtbl->GetName(p,a)
-#define IRecordInfo_GetSize(p,a) (p)->lpVtbl->GetSize(p,a)
-#define IRecordInfo_GetTypeInfo(p,a) (p)->lpVtbl->GetTypeInfo(p,a)
-#define IRecordInfo_GetField(p,a,b,c) (p)->lpVtbl->GetField(p,a,b,c)
-#define IRecordInfo_GetFieldNoCopy(p,a,b,c,d) (p)->lpVtbl->GetFieldNoCopy(p,a,b,c,d)
-#define IRecordInfo_PutField(p,a,b,c,d) (p)->lpVtbl->PutField(p,a,b,c,d)
-#define IRecordInfo_PutFieldNoCopy(p,a,b,c,d) (p)->lpVtbl->PutFieldNoCopy(p,a,b,c,d)
-#define IRecordInfo_GetFieldNames(p,a,b) (p)->lpVtbl->GetFieldNames(p,a,b)
-#define IRecordInfo_IsMatchingType(p,a) (p)->lpVtbl->IsMatchingType(p,a)
-#define IRecordInfo_RecordCreate(p) (p)->lpVtbl->RecordCreate(p)
-#define IRecordInfo_RecordCreateCopy(p,a,b) (p)->lpVtbl->RecordCreateCopy(p,a,b)
-#define IRecordInfo_RecordDestroy(p,a) (p)->lpVtbl->RecordDestroy(p,a)
-#endif
-
-EXTERN_C const IID IID_ITypeMarshal;
-#define INTERFACE ITypeMarshal
-DECLARE_INTERFACE_(ITypeMarshal, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Size)(THIS_ PVOID,DWORD,PVOID,ULONG*) PURE;
- STDMETHOD(Marshal)(THIS_ PVOID,DWORD,PVOID,ULONG,BYTE*,ULONG*) PURE;
- STDMETHOD(Unmarshal)(THIS_ PVOID,DWORD,ULONG,BYTE*,ULONG*) PURE;
- STDMETHOD(Free)(THIS_ PVOID) PURE;
-};
-#undef INTERFACE
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/objbase.h b/winsup/w32api/include/objbase.h
deleted file mode 100644
index 71d1097..0000000
--- a/winsup/w32api/include/objbase.h
+++ /dev/null
@@ -1,203 +0,0 @@
-/* Include here to prevent circular dependencies if windows.h
- not already included */
-#include <rpc.h>
-#include <rpcndr.h>
-
-#ifndef _OBJBASE_H
-#define _OBJBASE_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#include <stdlib.h>
-#pragma pack(push,8)
-#include <basetyps.h>
-
-#define WINOLEAPI STDAPI
-#define WINOLEAPI_(type) STDAPI_(type)
-#define FARSTRUCT
-#define HUGEP
-#define LISet32(li,v) ((li).HighPart=(v)<0?-1:0,(li).LowPart=(v))
-#define ULISet32(li,v) ((li).HighPart=0,(li).LowPart=(v))
-#define CLSCTX_ALL (CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER|CLSCTX_LOCAL_SERVER)
-#define CLSCTX_INPROC (CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER)
-#define CLSCTX_SERVER (CLSCTX_INPROC_SERVER|CLSCTX_LOCAL_SERVER|CLSCTX_REMOTE_SERVER)
-#define MARSHALINTERFACE_MIN 500
-#define CWCSTORAGENAME 32
-#define STGM_DIRECT 0
-#define STGM_TRANSACTED 0x10000L
-#define STGM_SIMPLE 0x8000000L
-#define STGM_READ 0
-#define STGM_WRITE 1
-#define STGM_READWRITE 2
-#define STGM_SHARE_DENY_NONE 0x40
-#define STGM_SHARE_DENY_READ 0x30
-#define STGM_SHARE_DENY_WRITE 0x20
-#define STGM_SHARE_EXCLUSIVE 0x10
-#define STGM_PRIORITY 0x40000L
-#define STGM_DELETEONRELEASE 0x4000000
-#define STGM_NOSCRATCH 0x100000
-#define STGM_CREATE 0x1000
-#define STGM_CONVERT 0x20000
-#define STGM_NOSNAPSHOT 0x200000
-#define STGM_FAILIFTHERE 0
-#define CWCSTORAGENAME 32
-#define ASYNC_MODE_COMPATIBILITY 1
-#define ASYNC_MODE_DEFAULT 0
-#define STGTY_REPEAT 256
-#define STG_TOEND 0xFFFFFFFF
-#define STG_LAYOUT_SEQUENTIAL 0
-#define STG_LAYOUT_INTERLEAVED 1
-#define COM_RIGHTS_EXECUTE 1
-#define COM_RIGHTS_SAFE_FOR_SCRIPTING 2
-#define STGOPTIONS_VERSION 2
-typedef enum tagSTGFMT {
- STGFMT_STORAGE = 0,
- STGFMT_FILE = 3,
- STGFMT_ANY = 4,
- STGFMT_DOCFILE = 5
-} STGFMT;
-typedef struct tagSTGOPTIONS {
- USHORT usVersion;
- USHORT reserved;
- ULONG ulSectorSize;
- const WCHAR *pwcsTemplateFile;
-} STGOPTIONS;
-typedef enum tagREGCLS {
- REGCLS_SINGLEUSE = 0,
- REGCLS_MULTIPLEUSE = 1,
- REGCLS_MULTI_SEPARATE = 2
-} REGCLS;
-#include <wtypes.h>
-#include <unknwn.h>
-#include <objidl.h>
-
-#ifdef __cplusplus
-inline BOOL IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
- { return !memcmp(&rguid1, &rguid2, sizeof(GUID)); }
-inline BOOL operator==(const GUID& guidOne, const GUID& guidOther)
- { return !memcmp(&guidOne,&guidOther,sizeof(GUID)); }
-inline BOOL operator!=(const GUID& g1, const GUID& g2)
- { return !(g1 == g2); }
-#else
-#define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID)))
-#endif
-#define IsEqualIID(id1,id2) IsEqualGUID(id1,id2)
-#define IsEqualCLSID(id1,id2) IsEqualGUID(id1,id2)
-#include <cguid.h>
-
-typedef enum tagCOINIT {
- COINIT_APARTMENTTHREADED = 0x2,
- COINIT_MULTITHREADED = 0x0,
- COINIT_DISABLE_OLE1DDE = 0x4,
- COINIT_SPEED_OVER_MEMORY = 0x8
-} COINIT;
-typedef enum tagSTDMSHLFLAGS {
- SMEXF_SERVER = 0x01,
- SMEXF_HANDLER = 0x02
-} STDMSHLFLAGS;
-
-WINOLEAPI_(DWORD) CoBuildVersion(void);
-WINOLEAPI CoInitialize(PVOID);
-WINOLEAPI CoInitializeEx(LPVOID,DWORD);
-WINOLEAPI_(void) CoUninitialize(void);
-WINOLEAPI CoGetMalloc(DWORD,LPMALLOC*);
-WINOLEAPI_(DWORD) CoGetCurrentProcess(void);
-WINOLEAPI CoRegisterMallocSpy(LPMALLOCSPY);
-WINOLEAPI CoRevokeMallocSpy(void);
-WINOLEAPI CoCreateStandardMalloc(DWORD,IMalloc**);
-#ifdef DBG
-WINOLEAPI_(ULONG) DebugCoGetRpcFault(void);
-WINOLEAPI_(void) DebugCoSetRpcFault(ULONG);
-#endif
-WINOLEAPI CoGetClassObject(REFCLSID,DWORD,COSERVERINFO*,REFIID,PVOID*);
-WINOLEAPI CoRegisterClassObject(REFCLSID,LPUNKNOWN,DWORD,DWORD,PDWORD);
-WINOLEAPI CoRevokeClassObject(DWORD);
-WINOLEAPI CoGetMarshalSizeMax(ULONG*,REFIID,LPUNKNOWN,DWORD,PVOID,DWORD);
-WINOLEAPI CoMarshalInterface(LPSTREAM,REFIID,LPUNKNOWN,DWORD,PVOID,DWORD);
-WINOLEAPI CoUnmarshalInterface(LPSTREAM,REFIID,PVOID*);
-WINOLEAPI CoMarshalHresult(LPSTREAM,HRESULT);
-WINOLEAPI CoUnmarshalHresult(LPSTREAM,HRESULT*);
-WINOLEAPI CoReleaseMarshalData(LPSTREAM);
-WINOLEAPI CoDisconnectObject(LPUNKNOWN,DWORD);
-WINOLEAPI CoLockObjectExternal(LPUNKNOWN,BOOL,BOOL);
-WINOLEAPI CoGetStandardMarshal(REFIID,LPUNKNOWN,DWORD,PVOID,DWORD,LPMARSHAL*);
-WINOLEAPI CoGetStdMarshalEx(LPUNKNOWN,DWORD,LPUNKNOWN*);
-WINOLEAPI_(BOOL) CoIsHandlerConnected(LPUNKNOWN);
-WINOLEAPI_(BOOL) CoHasStrongExternalConnections(LPUNKNOWN);
-WINOLEAPI CoMarshalInterThreadInterfaceInStream(REFIID,LPUNKNOWN,LPSTREAM*);
-WINOLEAPI CoGetInterfaceAndReleaseStream(LPSTREAM,REFIID,PVOID*);
-WINOLEAPI CoCreateFreeThreadedMarshaler(LPUNKNOWN,LPUNKNOWN*);
-WINOLEAPI_(HINSTANCE) CoLoadLibrary(LPOLESTR,BOOL);
-WINOLEAPI_(void) CoFreeLibrary(HINSTANCE);
-WINOLEAPI_(void) CoFreeAllLibraries(void);
-WINOLEAPI_(void) CoFreeUnusedLibraries(void);
-WINOLEAPI CoCreateInstance(REFCLSID,LPUNKNOWN,DWORD,REFIID,PVOID*);
-WINOLEAPI CoCreateInstanceEx(REFCLSID,IUnknown*,DWORD,COSERVERINFO*,DWORD,MULTI_QI*);
-WINOLEAPI StringFromCLSID(REFCLSID,LPOLESTR*);
-WINOLEAPI CLSIDFromString(LPOLESTR,LPCLSID);
-WINOLEAPI StringFromIID(REFIID,LPOLESTR*);
-WINOLEAPI IIDFromString(LPOLESTR,LPIID);
-WINOLEAPI_(BOOL) CoIsOle1Class(REFCLSID);
-WINOLEAPI ProgIDFromCLSID(REFCLSID,LPOLESTR*);
-WINOLEAPI CLSIDFromProgID(LPCOLESTR,LPCLSID);
-WINOLEAPI_(int) StringFromGUID2(REFGUID,LPOLESTR,int);
-WINOLEAPI CoCreateGuid(GUID*);
-WINOLEAPI_(BOOL) CoFileTimeToDosDateTime(FILETIME*,LPWORD,LPWORD);
-WINOLEAPI_(BOOL) CoDosDateTimeToFileTime(WORD,WORD,FILETIME*);
-WINOLEAPI CoFileTimeNow(FILETIME*);
-WINOLEAPI CoRegisterMessageFilter(LPMESSAGEFILTER,LPMESSAGEFILTER*);
-WINOLEAPI CoGetTreatAsClass(REFCLSID,LPCLSID);
-WINOLEAPI CoTreatAsClass(REFCLSID,REFCLSID);
-typedef HRESULT (STDAPICALLTYPE *LPFNGETCLASSOBJECT)(REFCLSID,REFIID,PVOID*);
-typedef HRESULT (STDAPICALLTYPE *LPFNCANUNLOADNOW)(void);
-STDAPI DllGetClassObject(REFCLSID,REFIID,PVOID*);
-STDAPI DllCanUnloadNow(void);
-WINOLEAPI_(PVOID) CoTaskMemAlloc(ULONG);
-WINOLEAPI_(PVOID) CoTaskMemRealloc(PVOID,ULONG);
-WINOLEAPI_(void) CoTaskMemFree(PVOID);
-WINOLEAPI CreateDataAdviseHolder(LPDATAADVISEHOLDER*);
-WINOLEAPI CreateDataCache(LPUNKNOWN,REFCLSID,REFIID,PVOID*);
-WINOLEAPI StgCreateDocfile(const OLECHAR*,DWORD,DWORD,IStorage**);
-WINOLEAPI StgCreateDocfileOnILockBytes(ILockBytes*,DWORD,DWORD,IStorage**);
-WINOLEAPI StgOpenStorage(const OLECHAR*,IStorage*,DWORD,SNB,DWORD,IStorage**);
-WINOLEAPI StgOpenStorageOnILockBytes(ILockBytes*,IStorage*,DWORD,SNB,DWORD,IStorage**);
-WINOLEAPI StgIsStorageFile(const OLECHAR*);
-WINOLEAPI StgIsStorageILockBytes(ILockBytes*);
-WINOLEAPI StgSetTimes(OLECHAR const*,FILETIME const*,FILETIME const*,FILETIME const*);
-WINOLEAPI StgCreateStorageEx(const WCHAR*,DWORD,DWORD,DWORD,STGOPTIONS*,void*,REFIID,void**);
-WINOLEAPI StgOpenStorageEx(const WCHAR*,DWORD,DWORD,DWORD,STGOPTIONS*,void*,REFIID,void**);
-WINOLEAPI BindMoniker(LPMONIKER,DWORD,REFIID,PVOID*);
-WINOLEAPI CoGetObject(LPCWSTR,BIND_OPTS*,REFIID,void**);
-WINOLEAPI MkParseDisplayName(LPBC,LPCOLESTR,ULONG*,LPMONIKER*);
-WINOLEAPI MonikerRelativePathTo(LPMONIKER,LPMONIKER,LPMONIKER*,BOOL);
-WINOLEAPI MonikerCommonPrefixWith(LPMONIKER,LPMONIKER,LPMONIKER*);
-WINOLEAPI CreateBindCtx(DWORD,LPBC*);
-WINOLEAPI CreateGenericComposite(LPMONIKER,LPMONIKER,LPMONIKER*);
-WINOLEAPI GetClassFile (LPCOLESTR,CLSID*);
-WINOLEAPI CreateFileMoniker(LPCOLESTR,LPMONIKER*);
-WINOLEAPI CreateItemMoniker(LPCOLESTR,LPCOLESTR,LPMONIKER*);
-WINOLEAPI CreateAntiMoniker(LPMONIKER*);
-WINOLEAPI CreatePointerMoniker(LPUNKNOWN,LPMONIKER*);
-WINOLEAPI GetRunningObjectTable(DWORD,LPRUNNINGOBJECTTABLE*);
-WINOLEAPI CoInitializeSecurity(PSECURITY_DESCRIPTOR,LONG,SOLE_AUTHENTICATION_SERVICE*, void*,DWORD,DWORD,void*,DWORD,void*);
-WINOLEAPI CoGetCallContext(REFIID,void**);
-WINOLEAPI CoQueryProxyBlanket(IUnknown*, DWORD*,DWORD*,OLECHAR**,DWORD*,DWORD*,RPC_AUTH_IDENTITY_HANDLE*,DWORD*);
-WINOLEAPI CoSetProxyBlanket(IUnknown*,DWORD,DWORD,OLECHAR*,DWORD,DWORD,RPC_AUTH_IDENTITY_HANDLE, DWORD);
-WINOLEAPI CoCopyProxy(IUnknown*,IUnknown**);
-WINOLEAPI CoQueryClientBlanket(DWORD*,DWORD*,OLECHAR**, DWORD*,DWORD*,RPC_AUTHZ_HANDLE*,DWORD*);
-WINOLEAPI CoImpersonateClient(void);
-WINOLEAPI CoRevertToSelf(void);
-WINOLEAPI CoQueryAuthenticationServices(DWORD*, SOLE_AUTHENTICATION_SERVICE**);
-WINOLEAPI CoSwitchCallContext(IUnknown*,IUnknown**);
-WINOLEAPI CoGetInstanceFromFile(COSERVERINFO*, CLSID*,IUnknown*,DWORD,DWORD,OLECHAR*,DWORD,MULTI_QI*);
-WINOLEAPI CoGetInstanceFromIStorage(COSERVERINFO*,CLSID*, IUnknown*,DWORD,struct IStorage*, DWORD,MULTI_QI*);
-WINOLEAPI_(ULONG) CoAddRefServerProcess(void);
-WINOLEAPI_(ULONG) CoReleaseServerProcess(void);
-WINOLEAPI CoResumeClassObjects(void);
-WINOLEAPI CoSuspendClassObjects(void);
-WINOLEAPI CoGetPSClsid(REFIID,CLSID*);
-WINOLEAPI CoRegisterPSClsid(REFIID,REFCLSID);
-
-#pragma pack(pop)
-#endif
diff --git a/winsup/w32api/include/objfwd.h b/winsup/w32api/include/objfwd.h
deleted file mode 100644
index 41d80d6..0000000
--- a/winsup/w32api/include/objfwd.h
+++ /dev/null
@@ -1,57 +0,0 @@
-#ifndef _OBJFWD_H
-#define _OBJFWD_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#include <basetyps.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-typedef _COM_interface IMoniker *LPMONIKER;
-typedef _COM_interface IStream *LPSTREAM;
-typedef _COM_interface IMarshal *LPMARSHAL;
-typedef _COM_interface IMalloc *LPMALLOC;
-typedef _COM_interface IMallocSpy *LPMALLOCSPY;
-typedef _COM_interface IMessageFilter *LPMESSAGEFILTER;
-typedef _COM_interface IPersist *LPPERSIST;
-typedef _COM_interface IPersistStream *LPPERSISTSTREAM;
-typedef _COM_interface IRunningObjectTable *LPRUNNINGOBJECTTABLE;
-typedef _COM_interface IBindCtx *LPBINDCTX,*LPBC;
-typedef _COM_interface IAdviseSink *LPADVISESINK;
-typedef _COM_interface IAdviseSink2 *LPADVISESINK2;
-typedef _COM_interface IDataObject *LPDATAOBJECT;
-typedef _COM_interface IDataAdviseHolder *LPDATAADVISEHOLDER;
-typedef _COM_interface IEnumMoniker *LPENUMMONIKER;
-typedef _COM_interface IEnumFORMATETC *LPENUMFORMATETC;
-typedef _COM_interface IEnumSTATDATA *LPENUMSTATDATA;
-typedef _COM_interface IEnumSTATSTG *LPENUMSTATSTG;
-typedef _COM_interface IEnumSTATPROPSTG LPENUMSTATPROPSTG;
-typedef _COM_interface IEnumString *LPENUMSTRING;
-typedef _COM_interface IEnumUnknown *LPENUMUNKNOWN;
-typedef _COM_interface IStorage *LPSTORAGE;
-typedef _COM_interface IPersistStorage *LPPERSISTSTORAGE;
-typedef _COM_interface ILockBytes *LPLOCKBYTES;
-typedef _COM_interface IStdMarshalInfo *LPSTDMARSHALINFO;
-typedef _COM_interface IExternalConnection *LPEXTERNALCONNECTION;
-typedef _COM_interface IRunnableObject *LPRUNNABLEOBJECT;
-typedef _COM_interface IROTData *LPROTDATA;
-typedef _COM_interface IPersistFile *LPPERSISTFILE;
-typedef _COM_interface IRootStorage *LPROOTSTORAGE;
-typedef _COM_interface IRpcChannelBuffer *LPRPCCHANNELBUFFER;
-typedef _COM_interface IRpcProxyBuffer *LPRPCPROXYBUFFER;
-typedef _COM_interface IRpcStubBuffer *LPRPCSTUBBUFFER;
-typedef _COM_interface IPropertyStorage *LPPROPERTYSTORAGE;
-typedef _COM_interface IEnumSTATPROPSETSTG *LPENUMSTATPROPSETSTG;
-typedef _COM_interface IPropertySetStorage *LPPROPERTYSETSTORAGE;
-typedef _COM_interface IClientSecurity *LPCLIENTSECURITY;
-typedef _COM_interface IServerSecurity *LPSERVERSECURITY;
-typedef _COM_interface IClassActivator *LPCLASSACTIVATOR;
-typedef _COM_interface IFillLockBytes *LPFILLLOCKBYTES;
-typedef _COM_interface IProgressNotify *LPPROGRESSNOTIFY;
-typedef _COM_interface ILayoutStorage *LPLAYOUTSTORAGE;
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/objidl.h b/winsup/w32api/include/objidl.h
deleted file mode 100644
index 8d70404..0000000
--- a/winsup/w32api/include/objidl.h
+++ /dev/null
@@ -1,1771 +0,0 @@
-#ifndef _OBJIDL_H
-#define _OBJIDL_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#include <objfwd.h>
-
-#define PIDSI_TITLE 0x00000002
-#define PIDSI_SUBJECT 0x00000003
-#define PIDSI_AUTHOR 0x00000004
-#define PIDSI_KEYWORDS 0x00000005
-#define PIDSI_COMMENTS 0x00000006
-#define PIDSI_TEMPLATE 0x00000007
-#define PIDSI_LASTAUTHOR 0x00000008
-#define PIDSI_REVNUMBER 0x00000009
-#define PIDSI_EDITTIME 0x0000000A
-#define PIDSI_LASTPRINTED 0x0000000B
-#define PIDSI_CREATE_DTM 0x0000000C
-#define PIDSI_LASTSAVE_DTM 0x0000000D
-#define PIDSI_PAGECOUNT 0x0000000E
-#define PIDSI_WORDCOUNT 0x0000000F
-#define PIDSI_CHARCOUNT 0x00000010
-#define PIDSI_THUMBNAIL 0x00000011
-#define PIDSI_APPNAME 0x00000012
-#define PIDSI_DOC_SECURITY 0x00000013
-#define PIDDSI_CATEGORY 0x00000002
-#define PIDDSI_PRESFORMAT 0x00000003
-#define PIDDSI_BYTECOUNT 0x00000004
-#define PIDDSI_LINECOUNT 0x00000005
-#define PIDDSI_PARCOUNT 0x00000006
-#define PIDDSI_SLIDECOUNT 0x00000007
-#define PIDDSI_NOTECOUNT 0x00000008
-#define PIDDSI_HIDDENCOUNT 0x00000009
-#define PIDDSI_MMCLIPCOUNT 0x0000000A
-#define PIDDSI_SCALE 0x0000000B
-#define PIDDSI_HEADINGPAIR 0x0000000C
-#define PIDDSI_DOCPARTS 0x0000000D
-#define PIDDSI_MANAGER 0x0000000E
-#define PIDDSI_COMPANY 0x0000000F
-#define PIDDSI_LINKSDIRTY 0x00000010
-#define PRSPEC_INVALID 0xFFFFFFFF
-#define PRSPEC_LPWSTR 0x00000000
-#define PRSPEC_PROPID 0x00000001
-
-typedef struct tagSTATSTG {
- LPOLESTR pwcsName;
- DWORD type;
- ULARGE_INTEGER cbSize;
- FILETIME mtime;
- FILETIME ctime;
- FILETIME atime;
- DWORD grfMode;
- DWORD grfLocksSupported;
- CLSID clsid;
- DWORD grfStateBits;
- DWORD reserved;
-} STATSTG;
-typedef enum tagSTGTY {
- STGTY_STORAGE=1,
- STGTY_STREAM,
- STGTY_LOCKBYTES,
- STGTY_PROPERTY
-} STGTY;
-typedef enum tagSTREAM_SEEK {
- STREAM_SEEK_SET,
- STREAM_SEEK_CUR,
- STREAM_SEEK_END
-} STREAM_SEEK;
-typedef struct tagINTERFACEINFO {
- LPUNKNOWN pUnk;
- IID iid;
- WORD wMethod;
-} INTERFACEINFO,*LPINTERFACEINFO;
-typedef enum tagCALLTYPE {
- CALLTYPE_TOPLEVEL=1,
- CALLTYPE_NESTED,
- CALLTYPE_ASYNC,
- CALLTYPE_TOPLEVEL_CALLPENDING,
- CALLTYPE_ASYNC_CALLPENDING
-} CALLTYPE;
-typedef enum tagPENDINGTYPE {
- PENDINGTYPE_TOPLEVEL=1,
- PENDINGTYPE_NESTED
-} PENDINGTYPE;
-typedef enum tagPENDINGMSG {
- PENDINGMSG_CANCELCALL=0,
- PENDINGMSG_WAITNOPROCESS,
- PENDINGMSG_WAITDEFPROCESS
-} PENDINGMSG;
-typedef OLECHAR **SNB;
-typedef enum tagDATADIR {
- DATADIR_GET=1,
- DATADIR_SET
-} DATADIR;
-typedef WORD CLIPFORMAT,*LPCLIPFORMAT;
-typedef struct tagDVTARGETDEVICE {
- DWORD tdSize;
- WORD tdDriverNameOffset;
- WORD tdDeviceNameOffset;
- WORD tdPortNameOffset;
- WORD tdExtDevmodeOffset;
- BYTE tdData[1];
-} DVTARGETDEVICE;
-typedef struct tagFORMATETC {
- CLIPFORMAT cfFormat;
- DVTARGETDEVICE*ptd;
- DWORD dwAspect;
- LONG lindex;
- DWORD tymed;
-} FORMATETC,*LPFORMATETC;
-typedef struct tagRemSTGMEDIUM {
- DWORD tymed;
- DWORD dwHandleType;
- ULONG pData;
- unsigned long pUnkForRelease;
- unsigned long cbData;
- BYTE data[1];
-} RemSTGMEDIUM;
-typedef struct tagHLITEM {
- ULONG uHLID;
- LPWSTR pwzFriendlyName;
-} HLITEM;
-typedef struct tagSTATDATA {
- FORMATETC formatetc;
- DWORD grfAdvf;
- struct IAdviseSink *pAdvSink;
- DWORD dwConnection;
-} STATDATA;
-typedef struct tagSTATPROPSETSTG {
- FMTID fmtid;
- CLSID clsid;
- DWORD grfFlags;
- FILETIME mtime;
- FILETIME ctime;
- FILETIME atime;
-} STATPROPSETSTG;
-typedef enum tagEXTCONN {
- EXTCONN_STRONG=1,
- EXTCONN_WEAK=2,
- EXTCONN_CALLABLE=4
-} EXTCONN;
-typedef struct tagMULTI_QI {
- const IID *pIID;
- IUnknown *pItf;
- HRESULT hr;
-} MULTI_QI;
-typedef struct _AUTH_IDENTITY {
- USHORT *User;
- ULONG UserLength;
- USHORT *Domain;
- ULONG DomainLength;
- USHORT *Password;
- ULONG PasswordLength;
- ULONG Flags;
-} AUTH_IDENTITY;
-typedef struct _COAUTHINFO{
- DWORD dwAuthnSvc;
- DWORD dwAuthzSvc;
- LPWSTR pwszServerPrincName;
- DWORD dwAuthnLevel;
- DWORD dwImpersonationLevel;
- AUTH_IDENTITY *pAuthIdentityData;
- DWORD dwCapabilities;
-} COAUTHINFO;
-typedef struct _COSERVERINFO {
- DWORD dwReserved1;
- LPWSTR pwszName;
- COAUTHINFO *pAuthInfo;
- DWORD dwReserved2;
-} COSERVERINFO;
-typedef struct tagBIND_OPTS {
- DWORD cbStruct;
- DWORD grfFlags;
- DWORD grfMode;
- DWORD dwTickCountDeadline;
-} BIND_OPTS,*LPBIND_OPTS;
-typedef struct tagBIND_OPTS2 {
- DWORD cbStruct;
- DWORD grfFlags;
- DWORD grfMode;
- DWORD dwTickCountDeadline;
- DWORD dwTrackFlags;
- DWORD dwClassContext;
- LCID locale;
- COSERVERINFO *pServerInfo;
-} BIND_OPTS2,*LPBIND_OPTS2;
-typedef enum tagBIND_FLAGS {
- BIND_MAYBOTHERUSER=1,
- BIND_JUSTTESTEXISTENCE
-} BIND_FLAGS;
-typedef struct tagSTGMEDIUM {
- DWORD tymed;
- _ANONYMOUS_UNION union {
- HBITMAP hBitmap;
- PVOID hMetaFilePict;
- HENHMETAFILE hEnhMetaFile;
- HGLOBAL hGlobal;
- LPWSTR lpszFileName;
- LPSTREAM pstm;
- LPSTORAGE pstg;
- } DUMMYUNIONNAME;
- LPUNKNOWN pUnkForRelease;
-} STGMEDIUM,*LPSTGMEDIUM;
-typedef enum tagLOCKTYPE {
- LOCK_WRITE=1,
- LOCK_EXCLUSIVE=2,
- LOCK_ONLYONCE=4
-} LOCKTYPE;
-typedef unsigned long RPCOLEDATAREP;
-typedef struct tagRPCOLEMESSAGE {
- PVOID reserved1;
- RPCOLEDATAREP dataRepresentation;
- PVOID Buffer;
- ULONG cbBuffer;
- ULONG iMethod;
- PVOID reserved2[5];
- ULONG rpcFlags;
-} RPCOLEMESSAGE, *PRPCOLEMESSAGE;
-typedef enum tagMKSYS {
- MKSYS_NONE,
- MKSYS_GENERICCOMPOSITE,
- MKSYS_FILEMONIKER,
- MKSYS_ANTIMONIKER,
- MKSYS_ITEMMONIKER,
- MKSYS_POINTERMONIKER
-} MKSYS;
-typedef enum tagMKREDUCE {
- MKRREDUCE_ALL,
- MKRREDUCE_ONE=196608,
- MKRREDUCE_TOUSER=131072,
- MKRREDUCE_THROUGHUSER=65536
-} MKRREDUCE;
-typedef struct tagRemSNB {
- unsigned long ulCntStr;
- unsigned long ulCntChar;
- OLECHAR rgString[1];
-} RemSNB;
-typedef enum tagADVF {
- ADVF_NODATA=1,ADVF_PRIMEFIRST=2,ADVF_ONLYONCE=4,ADVF_DATAONSTOP=64,
- ADVFCACHE_NOHANDLER=8,ADVFCACHE_FORCEBUILTIN=16,ADVFCACHE_ONSAVE=32
-} ADVF;
-typedef enum tagTYMED {
- TYMED_HGLOBAL=1,TYMED_FILE=2,TYMED_ISTREAM=4,TYMED_ISTORAGE=8,
- TYMED_GDI=16,TYMED_MFPICT=32,TYMED_ENHMF=64,TYMED_NULL=0
-} TYMED;
-typedef enum tagSERVERCALL {
- SERVERCALL_ISHANDLED,SERVERCALL_REJECTED,SERVERCALL_RETRYLATER
-} SERVERCALL;
-typedef struct tagCAUB {
- ULONG cElems;
- unsigned char *pElems;
-}CAUB;
-typedef struct tagCAI {
- ULONG cElems;
- short *pElems;
-}CAI;
-typedef struct tagCAUI {
- ULONG cElems;
- USHORT *pElems;
-}CAUI;
-typedef struct tagCAL {
- ULONG cElems;
- long *pElems;
-}CAL;
-typedef struct tagCAUL {
- ULONG cElems;
- ULONG *pElems;
-}CAUL;
-typedef struct tagCAFLT {
- ULONG cElems;
- float *pElems;
-}CAFLT;
-typedef struct tagCADBL {
- ULONG cElems;
- double *pElems;
-}CADBL;
-typedef struct tagCACY {
- ULONG cElems;
- CY *pElems;
-}CACY;
-typedef struct tagCADATE {
- ULONG cElems;
- DATE *pElems;
-}CADATE;
-typedef struct tagCABSTR {
- ULONG cElems;
- BSTR *pElems;
-}CABSTR;
-typedef struct tagCABSTRBLOB {
- ULONG cElems;
- BSTRBLOB *pElems;
-}CABSTRBLOB;
-typedef struct tagCABOOL {
- ULONG cElems;
- VARIANT_BOOL *pElems;
-}CABOOL;
-typedef struct tagCASCODE {
- ULONG cElems;
- SCODE *pElems;
-}CASCODE;
-typedef struct tagCAH {
- ULONG cElems;
- LARGE_INTEGER *pElems;
-}CAH;
-typedef struct tagCAUH {
- ULONG cElems;
- ULARGE_INTEGER *pElems;
-}CAUH;
-typedef struct tagCALPSTR {
- ULONG cElems;
- LPSTR *pElems;
-}CALPSTR;
-typedef struct tagCALPWSTR {
- ULONG cElems;
- LPWSTR *pElems;
-}CALPWSTR;
-typedef struct tagCAFILETIME {
- ULONG cElems;
- FILETIME *pElems;
-}CAFILETIME;
-typedef struct tagCACLIPDATA {
- ULONG cElems;
- CLIPDATA *pElems;
-}CACLIPDATA;
-typedef struct tagCACLSID {
- ULONG cElems;
- CLSID *pElems;
-}CACLSID;
-typedef struct tagPROPVARIANT *LPPROPVARIANT;
-typedef struct tagCAPROPVARIANT {
- ULONG cElems;
- LPPROPVARIANT pElems;
-}CAPROPVARIANT;
-typedef struct tagPROPVARIANT {
- VARTYPE vt;
- WORD wReserved1;
- WORD wReserved2;
- WORD wReserved3;
- _ANONYMOUS_UNION union {
- CHAR cVal;
- UCHAR bVal;
- short iVal;
- USHORT uiVal;
- VARIANT_BOOL boolVal;
-#if 0
-/* bool is a standard type in C++, and a standard macro expanding
- to the _Bool type in C99 (see stdbool.h) */
- _VARIANT_BOOL bool;
-#endif
- long lVal;
- ULONG ulVal;
- float fltVal;
- SCODE scode;
- LARGE_INTEGER hVal;
- ULARGE_INTEGER uhVal;
- double dblVal;
- CY cyVal;
- DATE date;
- FILETIME filetime;
- CLSID *puuid;
- BLOB blob;
- CLIPDATA *pclipdata;
- LPSTREAM pStream;
- LPSTORAGE pStorage;
- BSTR bstrVal;
- BSTRBLOB bstrblobVal;
- LPSTR pszVal;
- LPWSTR pwszVal;
- CAUB caub;
- CAI cai;
- CAUI caui;
- CABOOL cabool;
- CAL cal;
- CAUL caul;
- CAFLT caflt;
- CASCODE cascode;
- CAH cah;
- CAUH cauh;
- CADBL cadbl;
- CACY cacy;
- CADATE cadate;
- CAFILETIME cafiletime;
- CACLSID cauuid;
- CACLIPDATA caclipdata;
- CABSTR cabstr;
- CABSTRBLOB cabstrblob;
- CALPSTR calpstr;
- CALPWSTR calpwstr;
- CAPROPVARIANT capropvar;
- } DUMMYUNIONNAME;
-} PROPVARIANT;
-typedef struct tagPROPSPEC {
- ULONG ulKind;
- _ANONYMOUS_UNION union {
- PROPID propid;
- LPOLESTR lpwstr;
- } DUMMYUNIONNAME;
-}PROPSPEC;
-typedef struct tagSTATPROPSTG {
- LPOLESTR lpwstrName;
- PROPID propid;
- VARTYPE vt;
-} STATPROPSTG;
-typedef enum PROPSETFLAG {
- PROPSETFLAG_DEFAULT,PROPSETFLAG_NONSIMPLE,PROPSETFLAG_ANSI,
- PROPSETFLAG_UNBUFFERED=4
-} PROPSETFLAG;
-typedef struct tagSTORAGELAYOUT {
- DWORD LayoutType;
- OLECHAR* pwcsElementName;
- LARGE_INTEGER cOffset;
- LARGE_INTEGER cBytes;
-} STORAGELAYOUT;
-typedef struct tagSOLE_AUTHENTICATION_SERVICE {
- DWORD dwAuthnSvc;
- DWORD dwAuthzSvc;
- OLECHAR *pPrincipalName;
- HRESULT hr;
-} SOLE_AUTHENTICATION_SERVICE;
-#define COLE_DEFAULT_PRINCIPAL ( ( OLECHAR* )-1 )
-typedef enum tagEOLE_AUTHENTICATION_CAPABILITIES {
- EOAC_NONE = 0,
- EOAC_MUTUAL_AUTH = 0x1,
- EOAC_STATIC_CLOAKING = 0x20,
- EOAC_DYNAMIC_CLOAKING = 0x40,
- EOAC_ANY_AUTHORITY = 0x80,
- EOAC_MAKE_FULLSIC = 0x100,
- EOAC_DEFAULT = 0x800,
- EOAC_SECURE_REFS = 0x2,
- EOAC_ACCESS_CONTROL = 0x4,
- EOAC_APPID = 0x8,
- EOAC_DYNAMIC = 0x10,
- EOAC_REQUIRE_FULLSIC = 0x200,
- EOAC_AUTO_IMPERSONATE = 0x400,
- EOAC_NO_CUSTOM_MARSHAL = 0x2000,
- EOAC_DISABLE_AAA = 0x1000
-} EOLE_AUTHENTICATION_CAPABILITIES;
-typedef struct tagSOLE_AUTHENTICATION_INFO {
- DWORD dwAuthnSvc;
- DWORD dwAuthzSvc;
- void* pAuthInfo;
-} SOLE_AUTHENTICATION_INFO;
-#define COLE_DEFAULT_AUTHINFO ( ( void* )-1 )
-typedef struct tagSOLE_AUTHENTICATION_LIST {
- DWORD cAuthInfo;
- SOLE_AUTHENTICATION_INFO* aAuthInfo;
-} SOLE_AUTHENTICATION_LIST;
-
-EXTERN_C const FMTID FMTID_SummaryInformation;
-EXTERN_C const FMTID FMTID_DocSummaryInformation;
-EXTERN_C const FMTID FMTID_UserDefinedProperties;
-
-DECLARE_ENUMERATOR(FORMATETC);
-DECLARE_ENUMERATOR(HLITEM);
-DECLARE_ENUMERATOR(STATDATA);
-DECLARE_ENUMERATOR(STATPROPSETSTG);
-DECLARE_ENUMERATOR(STATPROPSTG);
-DECLARE_ENUMERATOR(STATSTG);
-DECLARE_ENUMERATOR_(IEnumString,LPOLESTR);
-DECLARE_ENUMERATOR_(IEnumMoniker,_COM_interface IMoniker*);
-DECLARE_ENUMERATOR_(IEnumUnknown,IUnknown*);
-
-EXTERN_C const IID IID_ISequentialStream;
-#define INTERFACE ISequentialStream
-DECLARE_INTERFACE_(ISequentialStream,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Read)(THIS_ void*,ULONG,ULONG*) PURE;
- STDMETHOD(Write)(THIS_ void const*,ULONG,ULONG*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IStream;
-#define INTERFACE IStream
-DECLARE_INTERFACE_(IStream,ISequentialStream)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Read)(THIS_ void*,ULONG,ULONG*) PURE;
- STDMETHOD(Write)(THIS_ void const*,ULONG,ULONG*) PURE;
- STDMETHOD(Seek)(THIS_ LARGE_INTEGER,DWORD,ULARGE_INTEGER*) PURE;
- STDMETHOD(SetSize)(THIS_ ULARGE_INTEGER) PURE;
- STDMETHOD(CopyTo)(THIS_ IStream*,ULARGE_INTEGER,ULARGE_INTEGER*,ULARGE_INTEGER*) PURE;
- STDMETHOD(Commit)(THIS_ DWORD) PURE;
- STDMETHOD(Revert)(THIS) PURE;
- STDMETHOD(LockRegion)(THIS_ ULARGE_INTEGER,ULARGE_INTEGER,DWORD) PURE;
- STDMETHOD(UnlockRegion)(THIS_ ULARGE_INTEGER,ULARGE_INTEGER,DWORD) PURE;
- STDMETHOD(Stat)(THIS_ STATSTG*,DWORD) PURE;
- STDMETHOD(Clone)(THIS_ LPSTREAM*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IMarshal;
-#define INTERFACE IMarshal
-DECLARE_INTERFACE_(IMarshal,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetUnmarshalClass) (THIS_ REFIID,PVOID,DWORD,PVOID,DWORD,CLSID*) PURE;
- STDMETHOD(GetMarshalSizeMax) (THIS_ REFIID,PVOID,DWORD,PVOID,PDWORD,ULONG*) PURE;
- STDMETHOD(MarshalInterface) (THIS_ IStream*,REFIID,PVOID,DWORD,PVOID,DWORD) PURE;
- STDMETHOD(UnmarshalInterface) (THIS_ IStream*,REFIID,void**) PURE;
- STDMETHOD(ReleaseMarshalData) (THIS_ IStream*) PURE;
- STDMETHOD(DisconnectObject) (THIS_ DWORD) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IStdMarshalInfo;
-#define INTERFACE IStdMarshalInfo
-DECLARE_INTERFACE_(IStdMarshalInfo,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetClassForHandler)(THIS_ DWORD,PVOID,CLSID*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IMalloc;
-#define INTERFACE IMalloc
-DECLARE_INTERFACE_(IMalloc,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD_(void*,Alloc)(THIS_ ULONG) PURE;
- STDMETHOD_(void*,Realloc)(THIS_ void*,ULONG) PURE;
- STDMETHOD_(void,Free)(THIS_ void*) PURE;
- STDMETHOD_(ULONG,GetSize)(THIS_ void*) PURE;
- STDMETHOD_(int,DidAlloc)(THIS_ void*) PURE;
- STDMETHOD_(void,HeapMinimize)(THIS) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IMallocSpy;
-#define INTERFACE IMallocSpy
-DECLARE_INTERFACE_(IMallocSpy,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD_(ULONG,PreAlloc)(THIS_ ULONG) PURE;
- STDMETHOD_(void*,PostAlloc)(THIS_ void*) PURE;
- STDMETHOD_(void*,PreFree)(THIS_ void*,BOOL) PURE;
- STDMETHOD_(void,PostFree)(THIS_ BOOL) PURE;
- STDMETHOD_(ULONG,PreRealloc)(THIS_ void*,ULONG,void**,BOOL) PURE;
- STDMETHOD_(void*,PostRealloc)(THIS_ void*,BOOL) PURE;
- STDMETHOD_(void*,PreGetSize)(THIS_ void*,BOOL) PURE;
- STDMETHOD_(ULONG,PostGetSize)(THIS_ ULONG,BOOL) PURE;
- STDMETHOD_(void*,PreDidAlloc)(THIS_ void*,BOOL) PURE;
- STDMETHOD_(int,PostDidAlloc)(THIS_ void*,BOOL,int) PURE;
- STDMETHOD_(void,PreHeapMinimize)(THIS) PURE;
- STDMETHOD_(void,PostHeapMinimize)(THIS) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IMessageFilter;
-#define INTERFACE IMessageFilter
-DECLARE_INTERFACE_(IMessageFilter,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD_(DWORD,HandleInComingCall)(THIS_ DWORD,HTASK,DWORD,LPINTERFACEINFO) PURE;
- STDMETHOD_(DWORD,RetryRejectedCall)(THIS_ HTASK,DWORD,DWORD) PURE;
- STDMETHOD_(DWORD,MessagePending)(THIS_ HTASK,DWORD,DWORD) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IPersist;
-#define INTERFACE IPersist
-DECLARE_INTERFACE_(IPersist,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetClassID)(THIS_ CLSID*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IPersistStream;
-#define INTERFACE IPersistStream
-DECLARE_INTERFACE_(IPersistStream,IPersist)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetClassID)(THIS_ LPCLSID) PURE;
- STDMETHOD(IsDirty)(THIS) PURE;
- STDMETHOD(Load)(THIS_ IStream*) PURE;
- STDMETHOD(Save)(THIS_ IStream*,BOOL) PURE;
- STDMETHOD(GetSizeMax)(THIS_ PULARGE_INTEGER) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IRunningObjectTable;
-#define INTERFACE IRunningObjectTable
-DECLARE_INTERFACE_(IRunningObjectTable,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Register)(THIS_ DWORD,LPUNKNOWN,LPMONIKER,PDWORD) PURE;
- STDMETHOD(Revoke)(THIS_ DWORD) PURE;
- STDMETHOD(IsRunning)(THIS_ LPMONIKER) PURE;
- STDMETHOD(GetObject)(THIS_ LPMONIKER,LPUNKNOWN*) PURE;
- STDMETHOD(NoteChangeTime)(THIS_ DWORD,LPFILETIME) PURE;
- STDMETHOD(GetTimeOfLastChange)(THIS_ LPMONIKER,LPFILETIME) PURE;
- STDMETHOD(EnumRunning)(THIS_ IEnumMoniker**) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IBindCtx;
-#define INTERFACE IBindCtx
-DECLARE_INTERFACE_(IBindCtx,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(RegisterObjectBound)(THIS_ LPUNKNOWN) PURE;
- STDMETHOD(RevokeObjectBound)(THIS_ LPUNKNOWN) PURE;
- STDMETHOD(ReleaseBoundObjects)(THIS) PURE;
- STDMETHOD(SetBindOptions)(THIS_ LPBIND_OPTS) PURE;
- STDMETHOD(GetBindOptions)(THIS_ LPBIND_OPTS) PURE;
- STDMETHOD(GetRunningObjectTable)(THIS_ IRunningObjectTable**) PURE;
- STDMETHOD(RegisterObjectParam)(THIS_ LPOLESTR,IUnknown*) PURE;
- STDMETHOD(GetObjectParam)(THIS_ LPOLESTR,IUnknown**) PURE;
- STDMETHOD(EnumObjectParam)(THIS_ IEnumString**) PURE;
- STDMETHOD(RevokeObjectParam)(THIS_ LPOLESTR) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IMoniker;
-#define INTERFACE IMoniker
-DECLARE_INTERFACE_(IMoniker,IPersistStream)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetClassID)(THIS_ LPCLSID) PURE;
- STDMETHOD(IsDirty)(THIS) PURE;
- STDMETHOD(Load)(THIS_ IStream*) PURE;
- STDMETHOD(Save)(THIS_ IStream*,BOOL) PURE;
- STDMETHOD(GetSizeMax)(THIS_ PULARGE_INTEGER) PURE;
- STDMETHOD(BindToObject)(THIS_ IBindCtx*,IMoniker*,REFIID,PVOID*) PURE;
- STDMETHOD(BindToStorage)(THIS_ IBindCtx*,IMoniker*,REFIID,PVOID*) PURE;
- STDMETHOD(Reduce)(THIS_ IBindCtx*,DWORD,IMoniker**,IMoniker**) PURE;
- STDMETHOD(ComposeWith)(THIS_ IMoniker*,BOOL,IMoniker**) PURE;
- STDMETHOD(Enum)(THIS_ BOOL,IEnumMoniker**) PURE;
- STDMETHOD(IsEqual)(THIS_ IMoniker*) PURE;
- STDMETHOD(Hash)(THIS_ PDWORD) PURE;
- STDMETHOD(IsRunning)(THIS_ IBindCtx*,IMoniker*,IMoniker*) PURE;
- STDMETHOD(GetTimeOfLastChange)(THIS_ IBindCtx*,IMoniker*,LPFILETIME) PURE;
- STDMETHOD(Inverse)(THIS_ IMoniker**) PURE;
- STDMETHOD(CommonPrefixWith)(THIS_ IMoniker*,IMoniker**) PURE;
- STDMETHOD(RelativePathTo)(THIS_ IMoniker*,IMoniker**) PURE;
- STDMETHOD(GetDisplayName)(THIS_ IBindCtx*,IMoniker*,LPOLESTR*) PURE;
- STDMETHOD(ParseDisplayName)(THIS_ IBindCtx*,IMoniker*,LPOLESTR,ULONG*,IMoniker**) PURE;
- STDMETHOD(IsSystemMoniker)(THIS_ PDWORD) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IPersistStorage;
-#define INTERFACE IPersistStorage
-DECLARE_INTERFACE_(IPersistStorage,IPersist)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetClassID)(THIS_ CLSID*) PURE;
- STDMETHOD(IsDirty)(THIS) PURE;
- STDMETHOD(InitNew)(THIS_ LPSTORAGE) PURE;
- STDMETHOD(Load)(THIS_ LPSTORAGE) PURE;
- STDMETHOD(Save)(THIS_ LPSTORAGE,BOOL) PURE;
- STDMETHOD(SaveCompleted)(THIS_ LPSTORAGE) PURE;
- STDMETHOD(HandsOffStorage)(THIS) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IPersistFile;
-#define INTERFACE IPersistFile
-DECLARE_INTERFACE_(IPersistFile,IPersist)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetClassID)(THIS_ CLSID*) PURE;
- STDMETHOD(IsDirty)(THIS) PURE;
- STDMETHOD(Load)(THIS_ LPCOLESTR,DWORD) PURE;
- STDMETHOD(Save)(THIS_ LPCOLESTR,BOOL) PURE;
- STDMETHOD(SaveCompleted)(THIS_ LPCOLESTR) PURE;
- STDMETHOD(GetCurFile)(THIS_ LPOLESTR*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IAdviseSink;
-#define INTERFACE IAdviseSink
-DECLARE_INTERFACE_(IAdviseSink,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD_(void,OnDataChange)(THIS_ FORMATETC*,STGMEDIUM*) PURE;
- STDMETHOD_(void,OnViewChange)(THIS_ DWORD,LONG) PURE;
- STDMETHOD_(void,OnRename)(THIS_ IMoniker*) PURE;
- STDMETHOD_(void,OnSave)(THIS) PURE;
- STDMETHOD_(void,OnClose)(THIS) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IAdviseSink2;
-#define INTERFACE IAdviseSink2
-DECLARE_INTERFACE_(IAdviseSink2,IAdviseSink)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD_(void,OnDataChange)(THIS_ FORMATETC*,STGMEDIUM*) PURE;
- STDMETHOD_(void,OnViewChange)(THIS_ DWORD,LONG) PURE;
- STDMETHOD_(void,OnRename)(THIS_ IMoniker*) PURE;
- STDMETHOD_(void,OnSave)(THIS) PURE;
- STDMETHOD_(void,OnClose)(THIS) PURE;
- STDMETHOD_(void,OnLinkSrcChange)(THIS_ IMoniker*);
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IDataObject;
-#define INTERFACE IDataObject
-DECLARE_INTERFACE_(IDataObject,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetData)(THIS_ FORMATETC*,STGMEDIUM*) PURE;
- STDMETHOD(GetDataHere)(THIS_ FORMATETC*,STGMEDIUM*) PURE;
- STDMETHOD(QueryGetData)(THIS_ FORMATETC*) PURE;
- STDMETHOD(GetCanonicalFormatEtc)(THIS_ FORMATETC*,FORMATETC*) PURE;
- STDMETHOD(SetData)(THIS_ FORMATETC*,STGMEDIUM*,BOOL) PURE;
- STDMETHOD(EnumFormatEtc)(THIS_ DWORD,IEnumFORMATETC**) PURE;
- STDMETHOD(DAdvise)(THIS_ FORMATETC*,DWORD,IAdviseSink*,PDWORD) PURE;
- STDMETHOD(DUnadvise)(THIS_ DWORD) PURE;
- STDMETHOD(EnumDAdvise)(THIS_ IEnumSTATDATA**) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IDataAdviseHolder;
-#define INTERFACE IDataAdviseHolder
-DECLARE_INTERFACE_(IDataAdviseHolder,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Advise)(THIS_ IDataObject*,FORMATETC*,DWORD,IAdviseSink*,PDWORD) PURE;
- STDMETHOD(Unadvise)(THIS_ DWORD) PURE;
- STDMETHOD(EnumAdvise)(THIS_ IEnumSTATDATA**) PURE;
- STDMETHOD(SendOnDataChange)(THIS_ IDataObject*,DWORD,DWORD) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IStorage;
-#define INTERFACE IStorage
-DECLARE_INTERFACE_(IStorage,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(CreateStream)(THIS_ LPCWSTR,DWORD,DWORD,DWORD,IStream**) PURE;
- STDMETHOD(OpenStream)(THIS_ LPCWSTR,PVOID,DWORD,DWORD,IStream**) PURE;
- STDMETHOD(CreateStorage)(THIS_ LPCWSTR,DWORD,DWORD,DWORD,IStorage**) PURE;
- STDMETHOD(OpenStorage)(THIS_ LPCWSTR,IStorage*,DWORD,SNB,DWORD,IStorage**) PURE;
- STDMETHOD(CopyTo)(THIS_ DWORD,IID const*,SNB,IStorage*) PURE;
- STDMETHOD(MoveElementTo)(THIS_ LPCWSTR,IStorage*,LPCWSTR,DWORD) PURE;
- STDMETHOD(Commit)(THIS_ DWORD) PURE;
- STDMETHOD(Revert)(THIS) PURE;
- STDMETHOD(EnumElements)(THIS_ DWORD,PVOID,DWORD,IEnumSTATSTG**) PURE;
- STDMETHOD(DestroyElement)(THIS_ LPCWSTR) PURE;
- STDMETHOD(RenameElement)(THIS_ LPCWSTR,LPCWSTR) PURE;
- STDMETHOD(SetElementTimes)(THIS_ LPCWSTR,FILETIME const*,FILETIME const*,FILETIME const*) PURE;
- STDMETHOD(SetClass)(THIS_ REFCLSID) PURE;
- STDMETHOD(SetStateBits)(THIS_ DWORD,DWORD) PURE;
- STDMETHOD(Stat)(THIS_ STATSTG*,DWORD) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IRootStorage;
-#define INTERFACE IRootStorage
-DECLARE_INTERFACE_(IRootStorage,IPersist)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(SwitchToFile)(THIS_ LPOLESTR) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IRpcChannelBuffer;
-#define INTERFACE IRpcChannelBuffer
-DECLARE_INTERFACE_(IRpcChannelBuffer,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetBuffer)(THIS_ RPCOLEMESSAGE*,REFIID) PURE;
- STDMETHOD(SendReceive)(THIS_ RPCOLEMESSAGE*,PULONG) PURE;
- STDMETHOD(FreeBuffer)(THIS_ RPCOLEMESSAGE*) PURE;
- STDMETHOD(GetDestCtx)(THIS_ PDWORD,PVOID*) PURE;
- STDMETHOD(IsConnected)(THIS) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IRpcProxyBuffer;
-#define INTERFACE IRpcProxyBuffer
-DECLARE_INTERFACE_(IRpcProxyBuffer,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Connect)(THIS_ IRpcChannelBuffer*) PURE;
- STDMETHOD_(void,Disconnect)(THIS) PURE;
-
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IRpcStubBuffer;
-#define INTERFACE IRpcStubBuffer
-DECLARE_INTERFACE_(IRpcStubBuffer,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Connect)(THIS_ LPUNKNOWN) PURE;
- STDMETHOD_(void,Disconnect)(THIS) PURE;
- STDMETHOD(Invoke)(THIS_ RPCOLEMESSAGE*,LPRPCSTUBBUFFER) PURE;
- STDMETHOD_(LPRPCSTUBBUFFER,IsIIDSupported)(THIS_ REFIID) PURE;
- STDMETHOD_(ULONG,CountRefs)(THIS) PURE;
- STDMETHOD(DebugServerQueryInterface)(THIS_ PVOID*) PURE;
- STDMETHOD(DebugServerRelease)(THIS_ PVOID) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IPSFactoryBuffer;
-#define INTERFACE IPSFactoryBuffer
-DECLARE_INTERFACE_(IPSFactoryBuffer,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(CreateProxy)(THIS_ LPUNKNOWN,REFIID,LPRPCPROXYBUFFER*,PVOID*) PURE;
- STDMETHOD(CreateStub)(THIS_ REFIID,LPUNKNOWN,LPRPCSTUBBUFFER*) PURE;
-};
-#undef INTERFACE
-typedef _COM_interface IPSFactoryBuffer *LPPSFACTORYBUFFER;
-
-EXTERN_C const IID IID_ILockBytes;
-#define INTERFACE ILockBytes
-DECLARE_INTERFACE_(ILockBytes,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(ReadAt)(THIS_ ULARGE_INTEGER,PVOID,ULONG,ULONG*) PURE;
- STDMETHOD(WriteAt)(THIS_ ULARGE_INTEGER,PCVOID,ULONG,ULONG*) PURE;
- STDMETHOD(Flush)(THIS) PURE;
- STDMETHOD(SetSize)(THIS_ ULARGE_INTEGER) PURE;
- STDMETHOD(LockRegion)(THIS_ ULARGE_INTEGER,ULARGE_INTEGER,DWORD) PURE;
- STDMETHOD(UnlockRegion)(THIS_ ULARGE_INTEGER,ULARGE_INTEGER,DWORD) PURE;
- STDMETHOD(Stat)(THIS_ STATSTG*,DWORD) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IExternalConnection;
-#define INTERFACE IExternalConnection
-DECLARE_INTERFACE_(IExternalConnection,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(AddConnection)(THIS_ DWORD,DWORD) PURE;
- STDMETHOD(ReleaseConnection)(THIS_ DWORD,DWORD,BOOL) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IRunnableObject;
-#define INTERFACE IRunnableObject
-DECLARE_INTERFACE_(IRunnableObject,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetRunningClass)(THIS_ LPCLSID) PURE;
- STDMETHOD(Run)(THIS_ LPBC) PURE;
- STDMETHOD_(BOOL,IsRunning)(THIS) PURE;
- STDMETHOD(LockRunning)(THIS_ BOOL,BOOL) PURE;
- STDMETHOD(SetContainedObject)(THIS_ BOOL) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IROTData;
-#define INTERFACE IROTData
-DECLARE_INTERFACE_(IROTData,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetComparisonData)(THIS_ PVOID,ULONG,PULONG) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IChannelHook;
-#define INTERFACE IChannelHook
-DECLARE_INTERFACE_(IChannelHook,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD_(void,ClientGetSize)(THIS_ REFGUID,REFIID,PULONG) PURE;
- STDMETHOD_(void,ClientFillBuffer)(THIS_ REFGUID,REFIID,PULONG,PVOID) PURE;
- STDMETHOD_(void,ClientNotify)(THIS_ REFGUID,REFIID,ULONG,PVOID,DWORD,HRESULT) PURE;
- STDMETHOD_(void,ServerNotify)(THIS_ REFGUID,REFIID,ULONG,PVOID,DWORD) PURE;
- STDMETHOD_(void,ServerGetSize)(THIS_ REFGUID,REFIID,HRESULT,PULONG) PURE;
- STDMETHOD_(void,ServerFillBuffer)(THIS_ REFGUID,REFIID,PULONG,PVOID,HRESULT) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IPropertyStorage;
-#define INTERFACE IPropertyStorage
-DECLARE_INTERFACE_(IPropertyStorage,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(ReadMultiple)(THIS_ ULONG,PROPSPEC const*,PROPVARIANT*) PURE;
- STDMETHOD(WriteMultiple)(THIS_ ULONG,PROPSPEC const*,PROPVARIANT*,PROPID) PURE;
- STDMETHOD(DeleteMultiple)(THIS_ ULONG,PROPSPEC const*) PURE;
- STDMETHOD(ReadPropertyNames)(THIS_ ULONG,PROPID const*,LPWSTR*) PURE;
- STDMETHOD(WritePropertyNames)(THIS_ ULONG,PROPID const*,LPWSTR const*) PURE;
- STDMETHOD(DeletePropertyNames)(THIS_ ULONG,PROPID const*) PURE;
- STDMETHOD(SetClass)(THIS_ REFCLSID) PURE;
- STDMETHOD(Commit)(THIS_ DWORD) PURE;
- STDMETHOD(Revert)(THIS) PURE;
- STDMETHOD(Enum)(THIS_ IEnumSTATPROPSTG**) PURE;
- STDMETHOD(Stat)(THIS_ STATPROPSTG*) PURE;
- STDMETHOD(SetTimes)(THIS_ FILETIME const*,FILETIME const*,FILETIME const*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IPropertySetStorage;
-#define INTERFACE IPropertySetStorage
-DECLARE_INTERFACE_(IPropertySetStorage,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Create)(THIS_ REFFMTID,CLSID*,DWORD,DWORD,LPPROPERTYSTORAGE*) PURE;
- STDMETHOD(Open)(THIS_ REFFMTID,DWORD,LPPROPERTYSTORAGE*) PURE;
- STDMETHOD(Delete)(THIS_ REFFMTID) PURE;
- STDMETHOD(Enum)(THIS_ IEnumSTATPROPSETSTG**) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IClientSecurity;
-#define INTERFACE IClientSecurity
-DECLARE_INTERFACE_(IClientSecurity,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(QueryBlanket)(THIS_ PVOID,PDWORD,PDWORD,OLECHAR**,PDWORD,PDWORD,RPC_AUTH_IDENTITY_HANDLE**,PDWORD*) PURE;
- STDMETHOD(SetBlanket)(THIS_ PVOID,DWORD,DWORD,LPWSTR,DWORD,DWORD,RPC_AUTH_IDENTITY_HANDLE*,DWORD) PURE;
- STDMETHOD(CopyProxy)(THIS_ LPUNKNOWN,LPUNKNOWN*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IServerSecurity;
-#define INTERFACE IServerSecurity
-DECLARE_INTERFACE_(IServerSecurity,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(QueryBlanket)(THIS_ PDWORD,PDWORD,OLECHAR**,PDWORD,PDWORD,RPC_AUTHZ_HANDLE*,PDWORD*) PURE;
- STDMETHOD(ImpersonateClient)(THIS) PURE;
- STDMETHOD(RevertToSelf)(THIS) PURE;
- STDMETHOD(IsImpersonating)(THIS) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IClassActivator;
-#define INTERFACE IClassActivator
-DECLARE_INTERFACE_(IClassActivator,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetClassObject)(THIS_ REFCLSID,DWORD,LCID,REFIID,PVOID*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IFillLockBytes;
-#define INTERFACE IFillLockBytes
-DECLARE_INTERFACE_(IFillLockBytes,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(FillAppend)(THIS_ void const*,ULONG,PULONG) PURE;
- STDMETHOD(FillAt)(THIS_ ULARGE_INTEGER,void const*,ULONG,PULONG) PURE;
- STDMETHOD(SetFillSize)(THIS_ ULARGE_INTEGER) PURE;
- STDMETHOD(Terminate)(THIS_ BOOL) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IProgressNotify;
-#define INTERFACE IProgressNotify
-DECLARE_INTERFACE_(IProgressNotify,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(OnProgress)(THIS_ DWORD,DWORD,BOOL,BOOL) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_ILayoutStorage;
-#define INTERFACE ILayoutStorage
-DECLARE_INTERFACE_(ILayoutStorage,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(LayoutScript)(THIS_ STORAGELAYOUT*,DWORD,DWORD) PURE;
- STDMETHOD(BeginMonitor)(THIS) PURE;
- STDMETHOD(EndMonitor)(THIS) PURE;
- STDMETHOD(ReLayoutDocfile)(THIS_ OLECHAR*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IGlobalInterfaceTable;
-#define INTERFACE IGlobalInterfaceTable
-DECLARE_INTERFACE_(IGlobalInterfaceTable,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(RegisterInterfaceInGlobal)(THIS_ IUnknown*,REFIID,DWORD*) PURE;
- STDMETHOD(RevokeInterfaceFromGlobal)(THIS_ DWORD) PURE;
- STDMETHOD(GetInterfaceFromGlobal)(THIS_ DWORD,REFIID,void**) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IGlobalInterfaceTable_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IGlobalInterfaceTable_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IGlobalInterfaceTable_Release(T) (T)->lpVtbl->Release(T)
-#define IGlobalInterfaceTable_RegisterInterfaceInGlobal(T,a,b,c) (T)->lpVtbl->RegisterInterfaceInGlobal(T,a,b,c)
-#define IGlobalInterfaceTable_RevokeInterfaceFromGlobal(T,a) (T)->lpVtbl->RevokeInterfaceFromGlobal(T,a)
-#define IGlobalInterfaceTable_GetInterfaceFromGlobal(T,a,b,c) (T)->lpVtbl->GetInterfaceFromGlobal(T,a,b,c)
-#endif
-
-HRESULT STDMETHODCALLTYPE IMarshal_GetUnmarshalClass_Proxy(IMarshal*,REFIID,void*,DWORD,void*,DWORD,CLSID*);
-void STDMETHODCALLTYPE IMarshal_GetUnmarshalClass_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IMarshal_GetMarshalSizeMax_Proxy(IMarshal*,REFIID,void*,DWORD,void*,DWORD,DWORD*);
-void STDMETHODCALLTYPE IMarshal_GetMarshalSizeMax_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IMarshal_MarshalInterface_Proxy(IMarshal*,IStream*,REFIID,void*,DWORD,void*,DWORD);
-void STDMETHODCALLTYPE IMarshal_MarshalInterface_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IMarshal_UnmarshalInterface_Proxy(IMarshal*,IStream*,REFIID,void**);
-void STDMETHODCALLTYPE IMarshal_UnmarshalInterface_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IMarshal_ReleaseMarshalData_Proxy(IMarshal*,IStream*);
-void STDMETHODCALLTYPE IMarshal_ReleaseMarshalData_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IMarshal_DisconnectObject_Proxy(IMarshal*,DWORD);
-void STDMETHODCALLTYPE IMarshal_DisconnectObject_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-void* STDMETHODCALLTYPE IMalloc_Alloc_Proxy(IMalloc*,ULONG);
-void STDMETHODCALLTYPE IMalloc_Alloc_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-void* STDMETHODCALLTYPE IMalloc_Realloc_Proxy(IMalloc*,void*,ULONG);
-void STDMETHODCALLTYPE IMalloc_Realloc_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-void STDMETHODCALLTYPE IMalloc_Free_Proxy(IMalloc*,void*);
-void STDMETHODCALLTYPE IMalloc_Free_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-ULONG STDMETHODCALLTYPE IMalloc_GetSize_Proxy(IMalloc*,void*);
-void STDMETHODCALLTYPE IMalloc_GetSize_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-int STDMETHODCALLTYPE IMalloc_DidAlloc_Proxy(IMalloc*,void*);
-void STDMETHODCALLTYPE IMalloc_DidAlloc_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-void STDMETHODCALLTYPE IMalloc_HeapMinimize_Proxy(IMalloc*);
-void STDMETHODCALLTYPE IMalloc_HeapMinimize_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-ULONG STDMETHODCALLTYPE IMallocSpy_PreAlloc_Proxy(IMallocSpy*,ULONG cbRequest);
-void STDMETHODCALLTYPE IMallocSpy_PreAlloc_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-void* STDMETHODCALLTYPE IMallocSpy_PostAlloc_Proxy(IMallocSpy*,void*);
-void STDMETHODCALLTYPE IMallocSpy_PostAlloc_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-void* STDMETHODCALLTYPE IMallocSpy_PreFree_Proxy(IMallocSpy*,void*,BOOL);
-void STDMETHODCALLTYPE IMallocSpy_PreFree_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-void STDMETHODCALLTYPE IMallocSpy_PostFree_Proxy(IMallocSpy*,BOOL);
-void STDMETHODCALLTYPE IMallocSpy_PostFree_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-ULONG STDMETHODCALLTYPE IMallocSpy_PreRealloc_Proxy(IMallocSpy*,void*,ULONG,void**,BOOL);
-void STDMETHODCALLTYPE IMallocSpy_PreRealloc_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-void* STDMETHODCALLTYPE IMallocSpy_PostRealloc_Proxy(IMallocSpy*,void*,BOOL);
-void STDMETHODCALLTYPE IMallocSpy_PostRealloc_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-void* STDMETHODCALLTYPE IMallocSpy_PreGetSize_Proxy(IMallocSpy*,void*,BOOL);
-void STDMETHODCALLTYPE IMallocSpy_PreGetSize_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-ULONG STDMETHODCALLTYPE IMallocSpy_PostGetSize_Proxy(IMallocSpy*,ULONG,BOOL);
-void STDMETHODCALLTYPE IMallocSpy_PostGetSize_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-void* STDMETHODCALLTYPE IMallocSpy_PreDidAlloc_Proxy(IMallocSpy*,void*,BOOL);
-void STDMETHODCALLTYPE IMallocSpy_PreDidAlloc_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-int STDMETHODCALLTYPE IMallocSpy_PostDidAlloc_Proxy(IMallocSpy*,void*,BOOL,int);
-void STDMETHODCALLTYPE IMallocSpy_PostDidAlloc_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-void STDMETHODCALLTYPE IMallocSpy_PreHeapMinimize_Proxy(IMallocSpy* );
-void STDMETHODCALLTYPE IMallocSpy_PreHeapMinimize_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-void STDMETHODCALLTYPE IMallocSpy_PostHeapMinimize_Proxy(IMallocSpy*);
-void STDMETHODCALLTYPE IMallocSpy_PostHeapMinimize_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStdMarshalInfo_GetClassForHandler_Proxy(IStdMarshalInfo*,DWORD,void*,CLSID*);
-void STDMETHODCALLTYPE IStdMarshalInfo_GetClassForHandler_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-DWORD STDMETHODCALLTYPE IExternalConnection_AddConnection_Proxy(IExternalConnection*,DWORD,DWORD);
-void STDMETHODCALLTYPE IExternalConnection_AddConnection_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-DWORD STDMETHODCALLTYPE IExternalConnection_ReleaseConnection_Proxy(IExternalConnection*,DWORD,DWORD,BOOL);
-void STDMETHODCALLTYPE IExternalConnection_ReleaseConnection_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumUnknown_RemoteNext_Proxy(IEnumUnknown*,ULONG,IUnknown**,ULONG*);
-void STDMETHODCALLTYPE IEnumUnknown_RemoteNext_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumUnknown_Skip_Proxy(IEnumUnknown*,ULONG);
-void STDMETHODCALLTYPE IEnumUnknown_Skip_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumUnknown_Reset_Proxy(IEnumUnknown* );
-void STDMETHODCALLTYPE IEnumUnknown_Reset_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumUnknown_Clone_Proxy(IEnumUnknown*,IEnumUnknown**);
-void STDMETHODCALLTYPE IEnumUnknown_Clone_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IBindCtx_RegisterObjectBound_Proxy(IBindCtx*,IUnknown*punk);
-void STDMETHODCALLTYPE IBindCtx_RegisterObjectBound_Stub(IRpcStubBuffer*,IRpcChannelBuffer*_pRpcChannelBuffer,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IBindCtx_RevokeObjectBound_Proxy(IBindCtx*,IUnknown*punk);
-void STDMETHODCALLTYPE IBindCtx_RevokeObjectBound_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IBindCtx_ReleaseBoundObjects_Proxy(IBindCtx*);
-void STDMETHODCALLTYPE IBindCtx_ReleaseBoundObjects_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IBindCtx_SetBindOptions_Proxy(IBindCtx*,BIND_OPTS*);
-void STDMETHODCALLTYPE IBindCtx_SetBindOptions_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IBindCtx_GetBindOptions_Proxy(IBindCtx*,BIND_OPTS*pbindopts);
-void STDMETHODCALLTYPE IBindCtx_GetBindOptions_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IBindCtx_GetRunningObjectTable_Proxy(IBindCtx*,IRunningObjectTable**);
-void STDMETHODCALLTYPE IBindCtx_GetRunningObjectTable_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IBindCtx_RegisterObjectParam_Proxy(IBindCtx*,LPCSTR,IUnknown*);
-void STDMETHODCALLTYPE IBindCtx_RegisterObjectParam_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IBindCtx_GetObjectParam_Proxy(IBindCtx*,LPCSTR,IUnknown**);
-void STDMETHODCALLTYPE IBindCtx_GetObjectParam_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IBindCtx_EnumObjectParam_Proxy(IBindCtx*,IEnumString**);
-void STDMETHODCALLTYPE IBindCtx_EnumObjectParam_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IBindCtx_RevokeObjectParam_Proxy(IBindCtx*,LPCSTR);
-void STDMETHODCALLTYPE IBindCtx_RevokeObjectParam_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumMoniker_RemoteNext_Proxy(IEnumMoniker*,ULONG,IMoniker**,ULONG*);
-void STDMETHODCALLTYPE IEnumMoniker_RemoteNext_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumMoniker_Skip_Proxy(IEnumMoniker*,ULONG);
-void STDMETHODCALLTYPE IEnumMoniker_Skip_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumMoniker_Reset_Proxy(IEnumMoniker*);
-void STDMETHODCALLTYPE IEnumMoniker_Reset_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumMoniker_Clone_Proxy(IEnumMoniker*,IEnumMoniker**);
-void STDMETHODCALLTYPE IEnumMoniker_Clone_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IRunnableObject_GetRunningClass_Proxy(IRunnableObject*,LPCLSID);
-void STDMETHODCALLTYPE IRunnableObject_GetRunningClass_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IRunnableObject_Run_Proxy(IRunnableObject*,LPBINDCTX);
-void STDMETHODCALLTYPE IRunnableObject_Run_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-BOOL STDMETHODCALLTYPE IRunnableObject_IsRunning_Proxy(IRunnableObject*);
-void STDMETHODCALLTYPE IRunnableObject_IsRunning_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IRunnableObject_LockRunning_Proxy(IRunnableObject*,BOOL,BOOL);
-void STDMETHODCALLTYPE IRunnableObject_LockRunning_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IRunnableObject_SetContainedObject_Proxy(IRunnableObject*,BOOL);
-void STDMETHODCALLTYPE IRunnableObject_SetContainedObject_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IRunningObjectTable_Register_Proxy(IRunningObjectTable*,DWORD,IUnknown*,IMoniker*,DWORD*);
-void STDMETHODCALLTYPE IRunningObjectTable_Register_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IRunningObjectTable_Revoke_Proxy(IRunningObjectTable*,DWORD);
-void STDMETHODCALLTYPE IRunningObjectTable_Revoke_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IRunningObjectTable_IsRunning_Proxy(IRunningObjectTable*,IMoniker*);
-void STDMETHODCALLTYPE IRunningObjectTable_IsRunning_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IRunningObjectTable_GetObject_Proxy(IRunningObjectTable*,IMoniker*,IUnknown**);
-void STDMETHODCALLTYPE IRunningObjectTable_GetObject_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IRunningObjectTable_NoteChangeTime_Proxy(IRunningObjectTable*,DWORD,FILETIME*);
-void STDMETHODCALLTYPE IRunningObjectTable_NoteChangeTime_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IRunningObjectTable_GetTimeOfLastChange_Proxy(IRunningObjectTable*,IMoniker*,FILETIME*);
-void STDMETHODCALLTYPE IRunningObjectTable_GetTimeOfLastChange_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IRunningObjectTable_EnumRunning_Proxy(IRunningObjectTable*,IEnumMoniker**);
-void STDMETHODCALLTYPE IRunningObjectTable_EnumRunning_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IPersist_GetClassID_Proxy(IPersist*,CLSID*);
-void STDMETHODCALLTYPE IPersist_GetClassID_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IPersistStream_IsDirty_Proxy(IPersistStream*);
-void STDMETHODCALLTYPE IPersistStream_IsDirty_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IPersistStream_Load_Proxy(IPersistStream*,IStream*);
-void STDMETHODCALLTYPE IPersistStream_Load_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IPersistStream_Save_Proxy(IPersistStream*,IStream*,BOOL);
-void STDMETHODCALLTYPE IPersistStream_Save_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IPersistStream_GetSizeMax_Proxy(IPersistStream*,ULARGE_INTEGER*);
-void STDMETHODCALLTYPE IPersistStream_GetSizeMax_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IMoniker_RemoteBindToObject_Proxy(IMoniker*,IBindCtx*,IMoniker*,REFIID,IUnknown**);
-void STDMETHODCALLTYPE IMoniker_RemoteBindToObject_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IMoniker_RemoteBindToStorage_Proxy(IMoniker*,IBindCtx*,IMoniker*,REFIID,IUnknown**);
-void STDMETHODCALLTYPE IMoniker_RemoteBindToStorage_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IMoniker_Reduce_Proxy(IMoniker*,IBindCtx*,DWORD,IMoniker**,IMoniker**);
-void STDMETHODCALLTYPE IMoniker_Reduce_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IMoniker_ComposeWith_Proxy(IMoniker*,IMoniker*,BOOL,IMoniker**);
-void STDMETHODCALLTYPE IMoniker_ComposeWith_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IMoniker_Enum_Proxy(IMoniker*,BOOL,IEnumMoniker**);
-void STDMETHODCALLTYPE IMoniker_Enum_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IMoniker_IsEqual_Proxy(IMoniker*,IMoniker*);
-void STDMETHODCALLTYPE IMoniker_IsEqual_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IMoniker_Hash_Proxy(IMoniker*,DWORD*);
-void STDMETHODCALLTYPE IMoniker_Hash_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IMoniker_IsRunning_Proxy(IMoniker*,IBindCtx*,IMoniker*,IMoniker*);
-void STDMETHODCALLTYPE IMoniker_IsRunning_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IMoniker_GetTimeOfLastChange_Proxy(IMoniker*,IBindCtx*,IMoniker*,FILETIME*);
-void STDMETHODCALLTYPE IMoniker_GetTimeOfLastChange_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IMoniker_Inverse_Proxy(IMoniker*,IMoniker**);
-void STDMETHODCALLTYPE IMoniker_Inverse_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IMoniker_CommonPrefixWith_Proxy(IMoniker*,IMoniker*,IMoniker**);
-void STDMETHODCALLTYPE IMoniker_CommonPrefixWith_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IMoniker_RelativePathTo_Proxy(IMoniker*,IMoniker*,IMoniker**);
-void STDMETHODCALLTYPE IMoniker_RelativePathTo_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IMoniker_GetDisplayName_Proxy(IMoniker*,IBindCtx*,IMoniker*,LPCSTR*);
-void STDMETHODCALLTYPE IMoniker_GetDisplayName_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IMoniker_ParseDisplayName_Proxy(IMoniker*,IBindCtx*,IMoniker*,LPCSTR,ULONG*,IMoniker**);
-void STDMETHODCALLTYPE IMoniker_ParseDisplayName_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IMoniker_IsSystemMoniker_Proxy(IMoniker*,DWORD*);
-void STDMETHODCALLTYPE IMoniker_IsSystemMoniker_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IROTData_GetComparisonData_Proxy(IROTData*,BYTE*,ULONG cbMax,ULONG*);
-void STDMETHODCALLTYPE IROTData_GetComparisonData_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumString_RemoteNext_Proxy(IEnumString*,ULONG,LPCSTR*rgelt,ULONG*);
-void STDMETHODCALLTYPE IEnumString_RemoteNext_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumString_Skip_Proxy(IEnumString*,ULONG);
-void STDMETHODCALLTYPE IEnumString_Skip_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumString_Reset_Proxy(IEnumString*);
-void STDMETHODCALLTYPE IEnumString_Reset_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumString_Clone_Proxy(IEnumString*,IEnumString**);
-void STDMETHODCALLTYPE IEnumString_Clone_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStream_RemoteRead_Proxy(IStream*,BYTE*,ULONG,ULONG*);
-void STDMETHODCALLTYPE IStream_RemoteRead_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStream_RemoteWrite_Proxy(IStream*,BYTE*pv,ULONG,ULONG*);
-void STDMETHODCALLTYPE IStream_RemoteWrite_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStream_RemoteSeek_Proxy(IStream*,LARGE_INTEGER,DWORD,ULARGE_INTEGER*);
-void STDMETHODCALLTYPE IStream_RemoteSeek_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStream_SetSize_Proxy(IStream*,ULARGE_INTEGER);
-void STDMETHODCALLTYPE IStream_SetSize_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStream_RemoteCopyTo_Proxy(IStream*,IStream*,ULARGE_INTEGER,ULARGE_INTEGER*,ULARGE_INTEGER*);
-void STDMETHODCALLTYPE IStream_RemoteCopyTo_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStream_Commit_Proxy(IStream*,DWORD);
-void STDMETHODCALLTYPE IStream_Commit_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStream_Revert_Proxy(IStream*);
-void STDMETHODCALLTYPE IStream_Revert_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStream_LockRegion_Proxy(IStream*,ULARGE_INTEGER,ULARGE_INTEGER,DWORD);
-void STDMETHODCALLTYPE IStream_LockRegion_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStream_UnlockRegion_Proxy(IStream*,ULARGE_INTEGER,ULARGE_INTEGER,DWORD);
-void STDMETHODCALLTYPE IStream_UnlockRegion_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStream_Stat_Proxy(IStream*,STATSTG*,DWORD);
-void STDMETHODCALLTYPE IStream_Stat_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStream_Clone_Proxy(IStream*,IStream**);
-void STDMETHODCALLTYPE IStream_Clone_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumSTATSTG_RemoteNext_Proxy(IEnumSTATSTG*,ULONG,STATSTG*,ULONG*);
-void STDMETHODCALLTYPE IEnumSTATSTG_RemoteNext_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumSTATSTG_Skip_Proxy(IEnumSTATSTG*,ULONG celt);
-void STDMETHODCALLTYPE IEnumSTATSTG_Skip_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumSTATSTG_Reset_Proxy(IEnumSTATSTG*);
-void STDMETHODCALLTYPE IEnumSTATSTG_Reset_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumSTATSTG_Clone_Proxy(IEnumSTATSTG*,IEnumSTATSTG**);
-void STDMETHODCALLTYPE IEnumSTATSTG_Clone_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStorage_CreateStream_Proxy(IStorage*,OLECHAR*,DWORD,DWORD,DWORD,IStream**);
-void STDMETHODCALLTYPE IStorage_CreateStream_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStorage_RemoteOpenStream_Proxy(IStorage*,const OLECHAR*,unsigned long,BYTE*,DWORD,DWORD,IStream**);
-void STDMETHODCALLTYPE IStorage_RemoteOpenStream_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStorage_CreateStorage_Proxy(IStorage*,OLECHAR*,DWORD,DWORD,DWORD,IStorage**);
-void STDMETHODCALLTYPE IStorage_CreateStorage_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStorage_OpenStorage_Proxy(IStorage*,OLECHAR*,IStorage*,DWORD,SNB,DWORD,IStorage**);
-void STDMETHODCALLTYPE IStorage_OpenStorage_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStorage_CopyTo_Proxy(IStorage*,DWORD,const IID*,SNB,IStorage*);
-void STDMETHODCALLTYPE IStorage_CopyTo_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStorage_MoveElementTo_Proxy(IStorage*,const OLECHAR*,IStorage*,const OLECHAR*,DWORD);
-void STDMETHODCALLTYPE IStorage_MoveElementTo_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStorage_Commit_Proxy(IStorage*,DWORD);
-void STDMETHODCALLTYPE IStorage_Commit_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStorage_Revert_Proxy(IStorage*);
-void STDMETHODCALLTYPE IStorage_Revert_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStorage_RemoteEnumElements_Proxy(IStorage*,DWORD,unsigned long,BYTE*,DWORD,IEnumSTATSTG**);
-void STDMETHODCALLTYPE IStorage_RemoteEnumElements_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStorage_DestroyElement_Proxy(IStorage*,OLECHAR*);
-void STDMETHODCALLTYPE IStorage_DestroyElement_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStorage_RenameElement_Proxy(IStorage*,const OLECHAR*,const OLECHAR*);
-void STDMETHODCALLTYPE IStorage_RenameElement_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStorage_SetElementTimes_Proxy(IStorage*,const OLECHAR*,const FILETIME*,const FILETIME*,const FILETIME*);
-void STDMETHODCALLTYPE IStorage_SetElementTimes_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStorage_SetClass_Proxy(IStorage*,REFCLSID);
-void STDMETHODCALLTYPE IStorage_SetClass_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStorage_SetStateBits_Proxy(IStorage*,DWORD,DWORD);
-void STDMETHODCALLTYPE IStorage_SetStateBits_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IStorage_Stat_Proxy(IStorage*,STATSTG*,DWORD);
-void STDMETHODCALLTYPE IStorage_Stat_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IPersistFile_IsDirty_Proxy(IPersistFile*);
-void STDMETHODCALLTYPE IPersistFile_IsDirty_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IPersistFile_Load_Proxy(IPersistFile*,LPCOLESTR,DWORD);
-void STDMETHODCALLTYPE IPersistFile_Load_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IPersistFile_Save_Proxy(IPersistFile*,LPCOLESTR pszFileName,BOOL);
-void STDMETHODCALLTYPE IPersistFile_Save_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IPersistFile_SaveCompleted_Proxy(IPersistFile*,LPCOLESTR);
-void STDMETHODCALLTYPE IPersistFile_SaveCompleted_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IPersistFile_GetCurFile_Proxy(IPersistFile*,LPCSTR*);
-void STDMETHODCALLTYPE IPersistFile_GetCurFile_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IPersistStorage_IsDirty_Proxy(IPersistStorage*);
-void STDMETHODCALLTYPE IPersistStorage_IsDirty_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IPersistStorage_InitNew_Proxy(IPersistStorage*,IStorage*);
-void STDMETHODCALLTYPE IPersistStorage_InitNew_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IPersistStorage_Load_Proxy(IPersistStorage*,IStorage*);
-void STDMETHODCALLTYPE IPersistStorage_Load_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IPersistStorage_Save_Proxy(IPersistStorage*,IStorage*,BOOL);
-void STDMETHODCALLTYPE IPersistStorage_Save_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IPersistStorage_SaveCompleted_Proxy(IPersistStorage*,IStorage*);
-void STDMETHODCALLTYPE IPersistStorage_SaveCompleted_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IPersistStorage_HandsOffStorage_Proxy(IPersistStorage*);
-void STDMETHODCALLTYPE IPersistStorage_HandsOffStorage_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE ILockBytes_RemoteReadAt_Proxy(ILockBytes*,ULARGE_INTEGER,BYTE*,ULONG,ULONG*);
-void STDMETHODCALLTYPE ILockBytes_RemoteReadAt_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE ILockBytes_RemoteWriteAt_Proxy(ILockBytes*,ULARGE_INTEGER,BYTE*pv,ULONG,ULONG*);
-void STDMETHODCALLTYPE ILockBytes_RemoteWriteAt_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE ILockBytes_Flush_Proxy(ILockBytes*);
-void STDMETHODCALLTYPE ILockBytes_Flush_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE ILockBytes_SetSize_Proxy(ILockBytes*,ULARGE_INTEGER);
-void STDMETHODCALLTYPE ILockBytes_SetSize_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE ILockBytes_LockRegion_Proxy(ILockBytes*,ULARGE_INTEGER,ULARGE_INTEGER,DWORD);
-void STDMETHODCALLTYPE ILockBytes_LockRegion_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE ILockBytes_UnlockRegion_Proxy(ILockBytes*,ULARGE_INTEGER,ULARGE_INTEGER,DWORD);
-void STDMETHODCALLTYPE ILockBytes_UnlockRegion_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE ILockBytes_Stat_Proxy(ILockBytes*,STATSTG*,DWORD);
-void STDMETHODCALLTYPE ILockBytes_Stat_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumFORMATETC_RemoteNext_Proxy(IEnumFORMATETC*,ULONG,FORMATETC*,ULONG*);
-void STDMETHODCALLTYPE IEnumFORMATETC_RemoteNext_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumFORMATETC_Skip_Proxy(IEnumFORMATETC*,ULONG);
-void STDMETHODCALLTYPE IEnumFORMATETC_Skip_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumFORMATETC_Reset_Proxy(IEnumFORMATETC*);
-void STDMETHODCALLTYPE IEnumFORMATETC_Reset_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumFORMATETC_Clone_Proxy(IEnumFORMATETC*,IEnumFORMATETC**);
-void STDMETHODCALLTYPE IEnumFORMATETC_Clone_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumFORMATETC_Next_Proxy(IEnumFORMATETC*,ULONG,FORMATETC*,ULONG*);
-HRESULT STDMETHODCALLTYPE IEnumFORMATETC_Next_Stub(IEnumFORMATETC*,ULONG,FORMATETC*,ULONG*);
-HRESULT STDMETHODCALLTYPE IEnumSTATDATA_RemoteNext_Proxy(IEnumSTATDATA*,ULONG,STATDATA*,ULONG*);
-void STDMETHODCALLTYPE IEnumSTATDATA_RemoteNext_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumSTATDATA_Skip_Proxy(IEnumSTATDATA*,ULONG);
-void STDMETHODCALLTYPE IEnumSTATDATA_Skip_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumSTATDATA_Reset_Proxy(IEnumSTATDATA*);
-void STDMETHODCALLTYPE IEnumSTATDATA_Reset_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumSTATDATA_Clone_Proxy(IEnumSTATDATA*,IEnumSTATDATA**);
-void STDMETHODCALLTYPE IEnumSTATDATA_Clone_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IEnumSTATDATA_Next_Proxy(IEnumSTATDATA*,ULONG,STATDATA*,ULONG*);
-HRESULT STDMETHODCALLTYPE IEnumSTATDATA_Next_Stub(IEnumSTATDATA*,ULONG,STATDATA*,ULONG*);
-HRESULT STDMETHODCALLTYPE IRootStorage_SwitchToFile_Proxy(IRootStorage*,LPCSTR);
-void STDMETHODCALLTYPE IRootStorage_SwitchToFile_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-void STDMETHODCALLTYPE IAdviseSink_RemoteOnDataChange_Proxy(IAdviseSink*,FORMATETC*,RemSTGMEDIUM*);
-void STDMETHODCALLTYPE IAdviseSink_RemoteOnDataChange_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-void STDMETHODCALLTYPE IAdviseSink_RemoteOnViewChange_Proxy(IAdviseSink*,DWORD,LONG);
-void STDMETHODCALLTYPE IAdviseSink_RemoteOnViewChange_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-void STDMETHODCALLTYPE IAdviseSink_RemoteOnRename_Proxy(IAdviseSink*,IMoniker*);
-void STDMETHODCALLTYPE IAdviseSink_RemoteOnRename_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-void STDMETHODCALLTYPE IAdviseSink_RemoteOnSave_Proxy(IAdviseSink*);
-void STDMETHODCALLTYPE IAdviseSink_RemoteOnSave_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IAdviseSink_RemoteOnClose_Proxy(IAdviseSink*);
-void STDMETHODCALLTYPE IAdviseSink_RemoteOnClose_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-void STDMETHODCALLTYPE IAdviseSink_OnDataChange_Proxy(IAdviseSink*,FORMATETC*,STGMEDIUM*);
-void STDMETHODCALLTYPE IAdviseSink_OnDataChange_Stub(IAdviseSink*,FORMATETC*,RemSTGMEDIUM*);
-void STDMETHODCALLTYPE IAdviseSink_OnViewChange_Proxy(IAdviseSink*,DWORD,LONG);
-void STDMETHODCALLTYPE IAdviseSink_OnViewChange_Stub(IAdviseSink*,DWORD,LONG);
-void STDMETHODCALLTYPE IAdviseSink_OnRename_Proxy(IAdviseSink*,IMoniker*);
-void STDMETHODCALLTYPE IAdviseSink_OnRename_Stub(IAdviseSink*,IMoniker*);
-void STDMETHODCALLTYPE IAdviseSink_OnSave_Proxy(IAdviseSink*);
-void STDMETHODCALLTYPE IAdviseSink_OnSave_Stub(IAdviseSink*);
-void STDMETHODCALLTYPE IAdviseSink_OnClose_Proxy(IAdviseSink*);
-HRESULT STDMETHODCALLTYPE IAdviseSink_OnClose_Stub(IAdviseSink*);
-void STDMETHODCALLTYPE IAdviseSink2_RemoteOnLinkSrcChange_Proxy(IAdviseSink2*,IMoniker*);
-void STDMETHODCALLTYPE IAdviseSink2_RemoteOnLinkSrcChange_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-void STDMETHODCALLTYPE IAdviseSink2_OnLinkSrcChange_Proxy(IAdviseSink2*,IMoniker*);
-void STDMETHODCALLTYPE IAdviseSink2_OnLinkSrcChange_Stub(IAdviseSink2*,IMoniker*);
-HRESULT STDMETHODCALLTYPE IDataObject_RemoteGetData_Proxy(IDataObject*,FORMATETC*,RemSTGMEDIUM**);
-void STDMETHODCALLTYPE IDataObject_RemoteGetData_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IDataObject_RemoteGetDataHere_Proxy(IDataObject*,FORMATETC*,RemSTGMEDIUM**);
-void STDMETHODCALLTYPE IDataObject_RemoteGetDataHere_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IDataObject_QueryGetData_Proxy(IDataObject*,FORMATETC*);
-void STDMETHODCALLTYPE IDataObject_QueryGetData_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IDataObject_GetCanonicalFormatEtc_Proxy(IDataObject*,FORMATETC*,FORMATETC*);
-void STDMETHODCALLTYPE IDataObject_GetCanonicalFormatEtc_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IDataObject_RemoteSetData_Proxy(IDataObject*,FORMATETC*,RemSTGMEDIUM*,BOOL);
-void STDMETHODCALLTYPE IDataObject_RemoteSetData_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IDataObject_EnumFormatEtc_Proxy(IDataObject*,DWORD,IEnumFORMATETC**);
-void STDMETHODCALLTYPE IDataObject_EnumFormatEtc_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IDataObject_DAdvise_Proxy(IDataObject*,FORMATETC*,DWORD,IAdviseSink*,DWORD*);
-void STDMETHODCALLTYPE IDataObject_DAdvise_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IDataObject_DUnadvise_Proxy(IDataObject*,DWORD);
-void STDMETHODCALLTYPE IDataObject_DUnadvise_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IDataObject_EnumDAdvise_Proxy(IDataObject*,IEnumSTATDATA**);
-void STDMETHODCALLTYPE IDataObject_EnumDAdvise_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IDataObject_GetData_Proxy(IDataObject*,FORMATETC*,STGMEDIUM*);
-HRESULT STDMETHODCALLTYPE IDataObject_GetData_Stub(IDataObject*,FORMATETC*,RemSTGMEDIUM**);
-HRESULT STDMETHODCALLTYPE IDataObject_GetDataHere_Proxy(IDataObject*,FORMATETC*,STGMEDIUM*);
-HRESULT STDMETHODCALLTYPE IDataObject_GetDataHere_Stub(IDataObject*,FORMATETC*,RemSTGMEDIUM**);
-HRESULT STDMETHODCALLTYPE IDataObject_SetData_Proxy(IDataObject*,FORMATETC*,STGMEDIUM*,BOOL);
-HRESULT STDMETHODCALLTYPE IDataObject_SetData_Stub(IDataObject*,FORMATETC*,RemSTGMEDIUM*,BOOL);
-HRESULT STDMETHODCALLTYPE IDataAdviseHolder_Advise_Proxy(IDataAdviseHolder*,IDataObject*,FORMATETC*,DWORD,IAdviseSink*,DWORD*);
-void STDMETHODCALLTYPE IDataAdviseHolder_Advise_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IDataAdviseHolder_Unadvise_Proxy(IDataAdviseHolder*,DWORD);
-void STDMETHODCALLTYPE IDataAdviseHolder_Unadvise_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IDataAdviseHolder_EnumAdvise_Proxy(IDataAdviseHolder*,IEnumSTATDATA**);
-void STDMETHODCALLTYPE IDataAdviseHolder_EnumAdvise_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IDataAdviseHolder_SendOnDataChange_Proxy(IDataAdviseHolder*,IDataObject*,DWORD,DWORD);
-void STDMETHODCALLTYPE IDataAdviseHolder_SendOnDataChange_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-DWORD STDMETHODCALLTYPE IMessageFilter_HandleInComingCall_Proxy(IMessageFilter*,DWORD,HTASK,DWORD,LPINTERFACEINFO);
-void STDMETHODCALLTYPE IMessageFilter_HandleInComingCall_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-DWORD STDMETHODCALLTYPE IMessageFilter_RetryRejectedCall_Proxy(IMessageFilter*,HTASK,DWORD,DWORD);
-void STDMETHODCALLTYPE IMessageFilter_RetryRejectedCall_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-DWORD STDMETHODCALLTYPE IMessageFilter_MessagePending_Proxy(IMessageFilter*,HTASK,DWORD,DWORD);
-void STDMETHODCALLTYPE IMessageFilter_MessagePending_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IRpcChannelBuffer_GetBuffer_Proxy(IRpcChannelBuffer*,RPCOLEMESSAGE*,REFIID);
-void STDMETHODCALLTYPE IRpcChannelBuffer_GetBuffer_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IRpcChannelBuffer_SendReceive_Proxy(IRpcChannelBuffer*,RPCOLEMESSAGE*,ULONG*);
-void STDMETHODCALLTYPE IRpcChannelBuffer_SendReceive_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IRpcChannelBuffer_FreeBuffer_Proxy(IRpcChannelBuffer*,RPCOLEMESSAGE*);
-void STDMETHODCALLTYPE IRpcChannelBuffer_FreeBuffer_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IRpcChannelBuffer_GetDestCtx_Proxy(IRpcChannelBuffer*,DWORD*,void**);
-void STDMETHODCALLTYPE IRpcChannelBuffer_GetDestCtx_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IRpcChannelBuffer_IsConnected_Proxy(IRpcChannelBuffer*);
-void STDMETHODCALLTYPE IRpcChannelBuffer_IsConnected_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IRpcProxyBuffer_Connect_Proxy(IRpcProxyBuffer*,IRpcChannelBuffer*pRpcChannelBuffer);
-void STDMETHODCALLTYPE IRpcProxyBuffer_Connect_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-void STDMETHODCALLTYPE IRpcProxyBuffer_Disconnect_Proxy(IRpcProxyBuffer*);
-void STDMETHODCALLTYPE IRpcProxyBuffer_Disconnect_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IRpcStubBuffer_Connect_Proxy(IRpcStubBuffer*,IUnknown*);
-void STDMETHODCALLTYPE IRpcStubBuffer_Connect_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-void STDMETHODCALLTYPE IRpcStubBuffer_Disconnect_Proxy(IRpcStubBuffer*);
-void STDMETHODCALLTYPE IRpcStubBuffer_Disconnect_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IRpcStubBuffer_Invoke_Proxy(IRpcStubBuffer*,RPCOLEMESSAGE*,IRpcChannelBuffer*);
-void STDMETHODCALLTYPE IRpcStubBuffer_Invoke_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-IRpcStubBuffer*STDMETHODCALLTYPE IRpcStubBuffer_IsIIDSupported_Proxy(IRpcStubBuffer*,REFIID);
-void STDMETHODCALLTYPE IRpcStubBuffer_IsIIDSupported_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-ULONG STDMETHODCALLTYPE IRpcStubBuffer_CountRefs_Proxy(IRpcStubBuffer*);
-void STDMETHODCALLTYPE IRpcStubBuffer_CountRefs_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IRpcStubBuffer_DebugServerQueryInterface_Proxy(IRpcStubBuffer*,void**);
-void STDMETHODCALLTYPE IRpcStubBuffer_DebugServerQueryInterface_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-void STDMETHODCALLTYPE IRpcStubBuffer_DebugServerRelease_Proxy(IRpcStubBuffer*,void*);
-void STDMETHODCALLTYPE IRpcStubBuffer_DebugServerRelease_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IPSFactoryBuffer_CreateProxy_Proxy(IPSFactoryBuffer*,IUnknown*,REFIID,IRpcProxyBuffer**,void**);
-void STDMETHODCALLTYPE IPSFactoryBuffer_CreateProxy_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IPSFactoryBuffer_CreateStub_Proxy(IPSFactoryBuffer*,REFIID,IUnknown*,IRpcStubBuffer**);
-void STDMETHODCALLTYPE IPSFactoryBuffer_CreateStub_Stub(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,PDWORD);
-void STDMETHODCALLTYPE SNB_to_xmit(SNB*,RemSNB**);
-void STDMETHODCALLTYPE SNB_from_xmit(RemSNB*,SNB*);
-void STDMETHODCALLTYPE SNB_free_inst(SNB*);
-void STDMETHODCALLTYPE SNB_free_xmit(RemSNB*);
-HRESULT STDMETHODCALLTYPE IEnumUnknown_Next_Proxy(IEnumUnknown*,ULONG,IUnknown**,ULONG*);
-HRESULT STDMETHODCALLTYPE IEnumUnknown_Next_Stub(IEnumUnknown*,ULONG,IUnknown**,ULONG*);
-HRESULT STDMETHODCALLTYPE IEnumMoniker_Next_Proxy(IEnumMoniker*,ULONG,IMoniker**,ULONG*);
-HRESULT STDMETHODCALLTYPE IEnumMoniker_Next_Stub(IEnumMoniker*,ULONG,IMoniker**,ULONG*);
-HRESULT STDMETHODCALLTYPE IMoniker_BindToObject_Proxy(IMoniker*,IBindCtx*,IMoniker*,REFIID,void**);
-HRESULT STDMETHODCALLTYPE IMoniker_BindToObject_Stub(IMoniker*,IBindCtx*,IMoniker*,REFIID,IUnknown**);
-HRESULT STDMETHODCALLTYPE IMoniker_BindToStorage_Proxy(IMoniker*,IBindCtx*,IMoniker*,REFIID,void**);
-HRESULT STDMETHODCALLTYPE IMoniker_BindToStorage_Stub(IMoniker*,IBindCtx*,IMoniker*,REFIID,IUnknown**);
-HRESULT STDMETHODCALLTYPE IEnumString_Next_Proxy(IEnumString*,ULONG,LPCSTR*,ULONG*);
-HRESULT STDMETHODCALLTYPE IEnumString_Next_Stub(IEnumString*,ULONG,LPCSTR*,ULONG*);
-HRESULT STDMETHODCALLTYPE IStream_Read_Proxy(IStream*,void*,ULONG,ULONG*);
-HRESULT STDMETHODCALLTYPE IStream_Read_Stub(IStream*,BYTE*,ULONG,ULONG*);
-HRESULT STDMETHODCALLTYPE IStream_Write_Proxy(IStream*,void*,ULONG,ULONG*);
-HRESULT STDMETHODCALLTYPE IStream_Write_Stub(IStream*,BYTE*,ULONG,ULONG*);
-HRESULT STDMETHODCALLTYPE IStream_Seek_Proxy(IStream*,LARGE_INTEGER,DWORD,ULARGE_INTEGER*);
-HRESULT STDMETHODCALLTYPE IStream_Seek_Stub(IStream*,LARGE_INTEGER,DWORD,ULARGE_INTEGER*);
-HRESULT STDMETHODCALLTYPE IStream_CopyTo_Proxy(IStream*,IStream*,ULARGE_INTEGER,ULARGE_INTEGER*,ULARGE_INTEGER*);
-HRESULT STDMETHODCALLTYPE IStream_CopyTo_Stub(IStream*,IStream*,ULARGE_INTEGER,ULARGE_INTEGER*,ULARGE_INTEGER*);
-HRESULT STDMETHODCALLTYPE IEnumSTATSTG_Next_Proxy(IEnumSTATSTG*,ULONG,STATSTG*,ULONG*);
-HRESULT STDMETHODCALLTYPE IEnumSTATSTG_Next_Stub(IEnumSTATSTG*,ULONG,STATSTG*,ULONG*);
-HRESULT STDMETHODCALLTYPE IStorage_OpenStream_Proxy(IStorage*,OLECHAR*,void*,DWORD,DWORD,IStream**);
-HRESULT STDMETHODCALLTYPE IStorage_OpenStream_Stub(IStorage*,OLECHAR*,unsigned long,BYTE*,DWORD,DWORD,IStream** );
-HRESULT STDMETHODCALLTYPE IStorage_EnumElements_Proxy(IStorage*,DWORD,void*,DWORD,IEnumSTATSTG**);
-HRESULT STDMETHODCALLTYPE IStorage_EnumElements_Stub(IStorage*,DWORD,unsigned long,BYTE*,DWORD,IEnumSTATSTG**);
-HRESULT STDMETHODCALLTYPE ILockBytes_ReadAt_Proxy(ILockBytes*,ULARGE_INTEGER,void*,ULONG,ULONG*);
-HRESULT STDMETHODCALLTYPE ILockBytes_ReadAt_Stub(ILockBytes*,ULARGE_INTEGER,BYTE*,ULONG,ULONG*);
-HRESULT STDMETHODCALLTYPE ILockBytes_WriteAt_Proxy(ILockBytes*,ULARGE_INTEGER,const void*,ULONG,ULONG*);
-HRESULT STDMETHODCALLTYPE ILockBytes_WriteAt_Stub(ILockBytes*,ULARGE_INTEGER,BYTE*,ULONG,ULONG*);
-
-#if (!defined (__cplusplus) || defined (CINTERFACE)) \
- && defined (COBJMACROS)
-#define IMarshal_QueryInterface(T,r,p) (T)->lpVtbl->QueryInterface(T,r,p)
-#define IMarshal_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IMarshal_Release(This) (This)->lpVtbl->Release(This)
-#define IMarshal_GetUnmarshalClass(T,r,pv,dw,pvD,m,pC) (T)->lpVtbl->GetUnmarshalClass(T,r,pv,dw,pvD,m,pC)
-#define IMarshal_GetMarshalSizeMax(T,r,pv,dw,pD,m,p) (T)->lpVtbl->GetMarshalSizeMax(T,r,pv,dw,pD,m,p)
-#define IMarshal_MarshalInterface(T,p,r,pv,dw,pvD,m) (T)->lpVtbl->MarshalInterface(T,p,r,pv,dw,pv,m)
-#define IMarshal_UnmarshalInterface(T,p,r,pp) (T)->lpVtbl->UnmarshalInterface(T,p,r,pp)
-#define IMarshal_ReleaseMarshalData(T,p) (T)->lpVtbl->ReleaseMarshalData(T,p)
-#define IMarshal_DisconnectObject(T,d) (T)->lpVtbl->DisconnectObject(T,d)
-#define IMalloc_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-#define IMalloc_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IMalloc_Release(This) (This)->lpVtbl->Release(This)
-#define IMalloc_Alloc(This,cb) (This)->lpVtbl->Alloc(This,cb)
-#define IMalloc_Realloc(This,pv,cb) (This)->lpVtbl->Realloc(This,pv,cb)
-#define IMalloc_Free(This,pv) (This)->lpVtbl->Free(This,pv)
-#define IMalloc_GetSize(This,pv) (This)->lpVtbl->GetSize(This,pv)
-#define IMalloc_DidAlloc(This,pv) (This)->lpVtbl->DidAlloc(This,pv)
-#define IMalloc_HeapMinimize(This) (This)->lpVtbl->HeapMinimize(This)
-#define IMallocSpy_QueryInterface(T,r,p) (T)->lpVtbl->QueryInterface(T,r,p)
-#define IMallocSpy_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IMallocSpy_Release(This) (This)->lpVtbl->Release(This)
-#define IMallocSpy_PreAlloc(T,c) (T)->lpVtbl->PreAlloc(T,c)
-#define IMallocSpy_PostAlloc(This,p) (This)->lpVtbl->PostAlloc(This,p)
-#define IMallocSpy_PreFree(This,p,f) (This)->lpVtbl->PreFree(This,p,f)
-#define IMallocSpy_PostFree(This,fSpyed) (This)->lpVtbl->PostFree(This,fSpyed)
-#define IMallocSpy_PreRealloc(T,p,c,pp,f) (T)->lpVtbl->PreRealloc(T,p,c,pp,f)
-#define IMallocSpy_PostRealloc(T,p,f) (T)->lpVtbl->PostRealloc(T,p,f)
-#define IMallocSpy_PreGetSize(This,p,f) (This)->lpVtbl->PreGetSize(This,p,f)
-#define IMallocSpy_PostGetSize(This,cbActual,fSpyed) (This)->lpVtbl->PostGetSize(This,cbActual,fSpyed)
-#define IMallocSpy_PreDidAlloc(This,pRequest,fSpyed) (This)->lpVtbl->PreDidAlloc(This,pRequest,fSpyed)
-#define IMallocSpy_PostDidAlloc(This,pRequest,fSpyed,fActual) (This)->lpVtbl->PostDidAlloc(This,pRequest,fSpyed,fActual)
-#define IMallocSpy_PreHeapMinimize(T) (T)->lpVtbl->PreHeapMinimize(T)
-#define IMallocSpy_PostHeapMinimize(T) (T)->lpVtbl->PostHeapMinimize(T)
-#define IStdMarshalInfo_QueryInterface(T,r,p) (This)->lpVtbl->QueryInterface(T,r,p)
-#define IStdMarshalInfo_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IStdMarshalInfo_Release(This) (This)->lpVtbl->Release(This)
-#define IStdMarshalInfo_GetClassForHandler(This,D,p,C) (This)->lpVtbl->GetClassForHandler(This,D,p,C)
-#define IExternalConnection_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-#define IExternalConnection_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IExternalConnection_Release(This) (This)->lpVtbl->Release(This)
-#define IExternalConnection_AddConnection(T,e,r) (T)->lpVtbl->AddConnection(T,e,r)
-#define IExternalConnection_ReleaseConnection(This,e,r,f) (This)->lpVtbl->ReleaseConnection(This,e,r,f)
-#define IEnumUnknown_QueryInterface(T,r,p) (This)->lpVtbl->QueryInterface(T,r,p)
-#define IEnumUnknown_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IEnumUnknown_Release(This) (This)->lpVtbl->Release(This)
-#define IEnumUnknown_Next(This,celt,rgelt,p) (This)->lpVtbl->Next(This,celt,rgelt,p)
-#define IEnumUnknown_Skip(This,celt) (This)->lpVtbl->Skip(This,celt)
-#define IEnumUnknown_Reset(This) (This)->lpVtbl->Reset(This)
-#define IEnumUnknown_Clone(This,ppenum) (This)->lpVtbl->Clone(This,ppenum)
-#define IBindCtx_QueryInterface(T,r,p) (T)->lpVtbl->QueryInterface(T,r,p)
-#define IBindCtx_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IBindCtx_Release(This) (This)->lpVtbl->Release(This)
-#define IBindCtx_RegisterObjectBound(T,p) (T)->lpVtbl->RegisterObjectBound(T,p)
-#define IBindCtx_RevokeObjectBound(T,p) (T)->lpVtbl->RevokeObjectBound(T,p)
-#define IBindCtx_ReleaseBoundObjects(T) (T)->lpVtbl->ReleaseBoundObjects(T)
-#define IBindCtx_SetBindOptions(T,p) (T)->lpVtbl->SetBindOptions(T,p)
-#define IBindCtx_GetBindOptions(This,pbindopts) (This)->lpVtbl->GetBindOptions(This,pbindopts)
-#define IBindCtx_GetRunningObjectTable(This,pprot) (This)->lpVtbl->GetRunningObjectTable(This,pprot)
-#define IBindCtx_RegisterObjectParam(This,pszKey,punk) (This)->lpVtbl->RegisterObjectParam(This,pszKey,punk)
-#define IBindCtx_GetObjectParam(This,pszKey,ppunk) (This)->lpVtbl->GetObjectParam(This,pszKey,ppunk)
-#define IBindCtx_EnumObjectParam(This,ppenum) (This)->lpVtbl->EnumObjectParam(This,ppenum)
-#define IBindCtx_RevokeObjectParam(This,pszKey) (This)->lpVtbl->RevokeObjectParam(This,pszKey)
-#define IEnumMoniker_QueryInterface(T,r,p) (T)->lpVtbl->QueryInterface(T,r,p)
-#define IEnumMoniker_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IEnumMoniker_Release(This) (This)->lpVtbl->Release(This)
-#define IEnumMoniker_Next(This,celt,rgelt,pceltFetched) (This)->lpVtbl->Next(This,celt,rgelt,pceltFetched)
-#define IEnumMoniker_Skip(This,celt) (This)->lpVtbl->Skip(This,celt)
-#define IEnumMoniker_Reset(This) (This)->lpVtbl->Reset(This)
-#define IEnumMoniker_Clone(This,ppenum) (This)->lpVtbl->Clone(This,ppenum)
-#define IRunnableObject_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-#define IRunnableObject_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IRunnableObject_Release(This) (This)->lpVtbl->Release(This)
-#define IRunnableObject_GetRunningClass(This,lpClsid) (This)->lpVtbl->GetRunningClass(This,lpClsid)
-#define IRunnableObject_Run(This,pbc) (This)->lpVtbl->Run(This,pbc)
-#define IRunnableObject_IsRunning(This) (This)->lpVtbl->IsRunning(This)
-#define IRunnableObject_LockRunning(This,fLock,fLastUnlockCloses) (This)->lpVtbl->LockRunning(This,fLock,fLastUnlockCloses)
-#define IRunnableObject_SetContainedObject(This,fContained) (This)->lpVtbl->SetContainedObject(This,fContained)
-#define IRunningObjectTable_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-#define IRunningObjectTable_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IRunningObjectTable_Release(This) (This)->lpVtbl->Release(This)
-#define IRunningObjectTable_Register(This,grfFlags,punkObject,pmkObjectName,pdwRegister) (This)->lpVtbl->Register(This,grfFlags,punkObject,pmkObjectName,pdwRegister)
-#define IRunningObjectTable_Revoke(This,dwRegister) (This)->lpVtbl->Revoke(This,dwRegister)
-#define IRunningObjectTable_IsRunning(This,pmkObjectName) (This)->lpVtbl->IsRunning(This,pmkObjectName)
-#define IRunningObjectTable_GetObject(This,pmkObjectName,ppunkObject) (This)->lpVtbl->GetObject(This,pmkObjectName,ppunkObject)
-#define IRunningObjectTable_NoteChangeTime(This,dwRegister,pfiletime) (This)->lpVtbl->NoteChangeTime(This,dwRegister,pfiletime)
-#define IRunningObjectTable_GetTimeOfLastChange(This,pmkObjectName,pfiletime) (This)->lpVtbl->GetTimeOfLastChange(This,pmkObjectName,pfiletime)
-#define IRunningObjectTable_EnumRunning(This,ppenumMoniker) (This)->lpVtbl->EnumRunning(This,ppenumMoniker)
-#define IPersist_QueryInterface(T,r,p) (T)->lpVtbl->QueryInterface(T,r,p)
-#define IPersist_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IPersist_Release(This) (This)->lpVtbl->Release(This)
-#define IPersist_GetClassID(This,pClassID) (This)->lpVtbl->GetClassID(This,pClassID)
-#define IPersistStream_QueryInterface(T,r,p) (T)->lpVtbl->QueryInterface(T,r,p)
-#define IPersistStream_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IPersistStream_Release(This) (This)->lpVtbl->Release(This)
-#define IPersistStream_GetClassID(T,p) (T)->lpVtbl->GetClassID(T,p)
-#define IPersistStream_IsDirty(This) (This)->lpVtbl->IsDirty(This)
-#define IPersistStream_Load(This,pStm) (This)->lpVtbl->Load(This,pStm)
-#define IPersistStream_Save(T,p,f) (T)->lpVtbl->Save(T,p,f)
-#define IPersistStream_GetSizeMax(T,p) (T)->lpVtbl->GetSizeMax(T,p)
-#define IMoniker_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-#define IMoniker_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IMoniker_Release(This) (This)->lpVtbl->Release(This)
-#define IMoniker_GetClassID(This,pClassID) (This)->lpVtbl->GetClassID(This,pClassID)
-#define IMoniker_IsDirty(This) (This)->lpVtbl->IsDirty(This)
-#define IMoniker_Load(This,pStm) (This)->lpVtbl->Load(This,pStm)
-#define IMoniker_Save(This,pStm,fClearDirty) (This)->lpVtbl->Save(This,pStm,fClearDirty)
-#define IMoniker_GetSizeMax(This,pcbSize) (This)->lpVtbl->GetSizeMax(This,pcbSize)
-#define IMoniker_BindToObject(T,p,pm,r,pp) (T)->lpVtbl->BindToObject(T,p,pm,r,pp)
-#define IMoniker_BindToStorage(This,pbc,pmkToLeft,riid,ppvObj) (This)->lpVtbl->BindToStorage(This,pbc,pmkToLeft,riid,ppvObj)
-#define IMoniker_Reduce(This,pbc,dwReduceHowFar,ppmkToLeft,ppmkReduced) (This)->lpVtbl->Reduce(This,pbc,dwReduceHowFar,ppmkToLeft,ppmkReduced)
-#define IMoniker_ComposeWith(This,pmkRight,fOnlyIfNotGeneric,ppmkComposite) (This)->lpVtbl->ComposeWith(This,pmkRight,fOnlyIfNotGeneric,ppmkComposite)
-#define IMoniker_Enum(T,f,pp) (T)->lpVtbl->Enum(T,f,pp)
-#define IMoniker_IsEqual(This,p) (This)->lpVtbl->IsEqual(This,p)
-#define IMoniker_Hash(This,pdwHash) (This)->lpVtbl->Hash(This,pdwHash)
-#define IMoniker_IsRunning(T,pbc,Left,N) (T)->lpVtbl->IsRunning(T,pbc,Left,N)
-#define IMoniker_GetTimeOfLastChange(This,pbc,pmkToLeft,pFileTime) (This)->lpVtbl->GetTimeOfLastChange(This,pbc,pmkToLeft,pFileTime)
-#define IMoniker_Inverse(This,ppmk) (This)->lpVtbl->Inverse(This,ppmk)
-#define IMoniker_CommonPrefixWith(This,pmkOther,ppmkPrefix) (This)->lpVtbl->CommonPrefixWith(This,pmkOther,ppmkPrefix)
-#define IMoniker_RelativePathTo(This,pmkOther,ppmkRelPath) (This)->lpVtbl->RelativePathTo(This,pmkOther,ppmkRelPath)
-#define IMoniker_GetDisplayName(This,pbc,pmkToLeft,ppszDisplayName) (This)->lpVtbl->GetDisplayName(This,pbc,pmkToLeft,ppszDisplayName)
-#define IMoniker_ParseDisplayName(This,pbc,pmkToLeft,pszDisplayName,pchEaten,ppmkOut) (This)->lpVtbl->ParseDisplayName(This,pbc,pmkToLeft,pszDisplayName,pchEaten,ppmkOut)
-#define IMoniker_IsSystemMoniker(This,pdwMksys) (This)->lpVtbl->IsSystemMoniker(This,pdwMksys)
-#define IROTData_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-#define IROTData_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IROTData_Release(This) (This)->lpVtbl->Release(This)
-#define IROTData_GetComparisonData(This,pbData,cbMax,pcbData) (This)->lpVtbl->GetComparisonData(This,pbData,cbMax,pcbData)
-#define IEnumString_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-#define IEnumString_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IEnumString_Release(This) (This)->lpVtbl->Release(This)
-#define IEnumString_Next(This,celt,rgelt,pceltFetched) (This)->lpVtbl->Next(This,celt,rgelt,pceltFetched)
-#define IEnumString_Skip(This,celt) (This)->lpVtbl->Skip(This,celt)
-#define IEnumString_Reset(This) (This)->lpVtbl->Reset(This)
-#define IEnumString_Clone(This,ppenum) (This)->lpVtbl->Clone(This,ppenum)
-#define IStream_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-#define IStream_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IStream_Release(This) (This)->lpVtbl->Release(This)
-#define IStream_Read(This,pv,cb,pcbRead) (This)->lpVtbl->Read(This,pv,cb,pcbRead)
-#define IStream_Write(This,pv,cb,pcbWritten) (This)->lpVtbl->Write(This,pv,cb,pcbWritten)
-#define IStream_Seek(This,dlibMove,dwOrigin,plibNewPosition) (This)->lpVtbl->Seek(This,dlibMove,dwOrigin,plibNewPosition)
-#define IStream_SetSize(This,libNewSize) (This)->lpVtbl->SetSize(This,libNewSize)
-#define IStream_CopyTo(This,pstm,cb,pcbRead,pcbWritten) (This)->lpVtbl->CopyTo(This,pstm,cb,pcbRead,pcbWritten)
-#define IStream_Commit(This,grfCommitFlags) (This)->lpVtbl->Commit(This,grfCommitFlags)
-#define IStream_Revert(This) (This)->lpVtbl->Revert(This)
-#define IStream_LockRegion(This,libOffset,cb,dwLockType) (This)->lpVtbl->LockRegion(This,libOffset,cb,dwLockType)
-#define IStream_UnlockRegion(This,libOffset,cb,dwLockType) (This)->lpVtbl->UnlockRegion(This,libOffset,cb,dwLockType)
-#define IStream_Stat(This,pstatstg,grfStatFlag) (This)->lpVtbl->Stat(This,pstatstg,grfStatFlag)
-#define IStream_Clone(This,ppstm) (This)->lpVtbl->Clone(This,ppstm)
-#define IEnumSTATSTG_QueryInterface(T,r,p) (T)->lpVtbl->QueryInterface(T,r,p)
-#define IEnumSTATSTG_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IEnumSTATSTG_Release(This) (This)->lpVtbl->Release(This)
-#define IEnumSTATSTG_Next(T,c,r,p) (T)->lpVtbl->Next(T,c,r,p)
-#define IEnumSTATSTG_Skip(This,celt) (This)->lpVtbl->Skip(This,celt)
-#define IEnumSTATSTG_Reset(This) (This)->lpVtbl->Reset(This)
-#define IEnumSTATSTG_Clone(This,ppenum) (This)->lpVtbl->Clone(This,ppenum)
-#define IStorage_QueryInterface(T,r,p) (T)->lpVtbl->QueryInterface(T,r,p)
-#define IStorage_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IStorage_Release(This) (This)->lpVtbl->Release(This)
-#define IStorage_CreateStream(T,p,g,r1,r2,pp) (T)->lpVtbl->CreateStream(T,p,g,r1,r2,pp)
-#define IStorage_OpenStream(T,p,r1,g,r2,pp) (T)->lpVtbl->OpenStream(T,p,r1,g,r2,pp)
-#define IStorage_CreateStorage(T,p,g,d,r2,pp) (T)->lpVtbl->CreateStorage(T,p,g,d,r2,pp)
-#define IStorage_OpenStorage(This,pwcsName,pstgPriority,grfMode,snbExclude,reserved,ppstg) (This)->lpVtbl->OpenStorage(This,pwcsName,pstgPriority,grfMode,snbExclude,reserved,ppstg)
-#define IStorage_CopyTo(This,ciidExclude,rgiidExclude,snbExclude,pstgDest) (This)->lpVtbl->CopyTo(This,ciidExclude,rgiidExclude,snbExclude,pstgDest)
-#define IStorage_MoveElementTo(This,pwcsName,pstgDest,pwcsNewName,grfFlags) (This)->lpVtbl->MoveElementTo(This,pwcsName,pstgDest,pwcsNewName,grfFlags)
-#define IStorage_Commit(This,g) (This)->lpVtbl->Commit(This,g)
-#define IStorage_Revert(This) (This)->lpVtbl->Revert(This)
-#define IStorage_EnumElements(This,reserved1,reserved2,reserved3,ppenum) (This)->lpVtbl->EnumElements(This,reserved1,reserved2,reserved3,ppenum)
-#define IStorage_DestroyElement(This,pwcsName) (This)->lpVtbl->DestroyElement(This,pwcsName)
-#define IStorage_RenameElement(This,pwcsOldName,pwcsNewName) (This)->lpVtbl->RenameElement(This,pwcsOldName,pwcsNewName)
-#define IStorage_SetElementTimes(This,pwcsName,pctime,patime,pmtime) (This)->lpVtbl->SetElementTimes(This,pwcsName,pctime,patime,pmtime)
-#define IStorage_SetClass(This,clsid) (This)->lpVtbl->SetClass(This,clsid)
-#define IStorage_SetStateBits(This,grfStateBits,grfMask) (This)->lpVtbl->SetStateBits(This,grfStateBits,grfMask)
-#define IStorage_Stat(This,p,g) (This)->lpVtbl->Stat(This,p,g)
-#define IPersistFile_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-#define IPersistFile_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IPersistFile_Release(This) (This)->lpVtbl->Release(This)
-#define IPersistFile_GetClassID(This,pClassID) (This)->lpVtbl->GetClassID(This,pClassID)
-#define IPersistFile_IsDirty(This) (This)->lpVtbl->IsDirty(This)
-#define IPersistFile_Load(This,pszFileName,dwMode) (This)->lpVtbl->Load(This,pszFileName,dwMode)
-#define IPersistFile_Save(This,pszFileName,fRemember) (This)->lpVtbl->Save(This,pszFileName,fRemember)
-#define IPersistFile_SaveCompleted(This,pszFileName) (This)->lpVtbl->SaveCompleted(This,pszFileName)
-#define IPersistFile_GetCurFile(This,ppszFileName) (This)->lpVtbl->GetCurFile(This,ppszFileName)
-#define IPersistStorage_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-#define IPersistStorage_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IPersistStorage_Release(This) (This)->lpVtbl->Release(This)
-#define IPersistStorage_GetClassID(This,pClassID) (This)->lpVtbl->GetClassID(This,pClassID)
-#define IPersistStorage_IsDirty(This) (This)->lpVtbl->IsDirty(This)
-#define IPersistStorage_InitNew(This,pStg) (This)->lpVtbl->InitNew(This,pStg)
-#define IPersistStorage_Load(This,pStg) (This)->lpVtbl->Load(This,pStg)
-#define IPersistStorage_Save(This,pStgSave,fSameAsLoad) (This)->lpVtbl->Save(This,pStgSave,fSameAsLoad)
-#define IPersistStorage_SaveCompleted(This,pStgNew) (This)->lpVtbl->SaveCompleted(This,pStgNew)
-#define IPersistStorage_HandsOffStorage(This) (This)->lpVtbl->HandsOffStorage(This)
-#define ILockBytes_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-#define ILockBytes_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define ILockBytes_Release(This) (This)->lpVtbl->Release(This)
-#define ILockBytes_ReadAt(This,ulOffset,pv,cb,pcbRead) (This)->lpVtbl->ReadAt(This,ulOffset,pv,cb,pcbRead)
-#define ILockBytes_WriteAt(This,ulOffset,pv,cb,pcbWritten) (This)->lpVtbl->WriteAt(This,ulOffset,pv,cb,pcbWritten)
-#define ILockBytes_Flush(This) (This)->lpVtbl->Flush(This)
-#define ILockBytes_SetSize(This,cb) (This)->lpVtbl->SetSize(This,cb)
-#define ILockBytes_LockRegion(This,libOffset,cb,dwLockType) (This)->lpVtbl->LockRegion(This,libOffset,cb,dwLockType)
-#define ILockBytes_UnlockRegion(This,libOffset,cb,dwLockType) (This)->lpVtbl->UnlockRegion(This,libOffset,cb,dwLockType)
-#define ILockBytes_Stat(This,pstatstg,grfStatFlag) (This)->lpVtbl->Stat(This,pstatstg,grfStatFlag)
-#define IEnumFORMATETC_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-#define IEnumFORMATETC_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IEnumFORMATETC_Release(This) (This)->lpVtbl->Release(This)
-#define IEnumFORMATETC_Next(This,celt,rgelt,pceltFetched) (This)->lpVtbl->Next(This,celt,rgelt,pceltFetched)
-#define IEnumFORMATETC_Skip(This,celt) (This)->lpVtbl->Skip(This,celt)
-#define IEnumFORMATETC_Reset(This) (This)->lpVtbl->Reset(This)
-#define IEnumFORMATETC_Clone(This,ppenum) (This)->lpVtbl->Clone(This,ppenum)
-#define IEnumSTATDATA_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-#define IEnumSTATDATA_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IEnumSTATDATA_Release(This) (This)->lpVtbl->Release(This)
-#define IEnumSTATDATA_Next(This,celt,rgelt,pceltFetched) (This)->lpVtbl->Next(This,celt,rgelt,pceltFetched)
-#define IEnumSTATDATA_Skip(This,celt) (This)->lpVtbl->Skip(This,celt)
-#define IEnumSTATDATA_Reset(This) (This)->lpVtbl->Reset(This)
-#define IEnumSTATDATA_Clone(This,ppenum) (This)->lpVtbl->Clone(This,ppenum)
-#define IRootStorage_QueryInterface(T,r,O) (T)->lpVtbl->QueryInterface(T,r,O)
-#define IRootStorage_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IRootStorage_Release(This) (This)->lpVtbl->Release(This)
-#define IRootStorage_SwitchToFile(This,pszFile) (This)->lpVtbl->SwitchToFile(This,pszFile)
-#define IAdviseSink_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-#define IAdviseSink_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IAdviseSink_Release(This) (This)->lpVtbl->Release(This)
-#define IAdviseSink_OnDataChange(This,pFormatetc,pStgmed) (This)->lpVtbl->OnDataChange(This,pFormatetc,pStgmed)
-#define IAdviseSink_OnViewChange(This,dwAspect,lindex) (This)->lpVtbl->OnViewChange(This,dwAspect,lindex)
-#define IAdviseSink_OnRename(This,pmk) (This)->lpVtbl->OnRename(This,pmk)
-#define IAdviseSink_OnSave(This) (This)->lpVtbl->OnSave(This)
-#define IAdviseSink_OnClose(This) (This)->lpVtbl->OnClose(This)
-#define IAdviseSink2_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-#define IAdviseSink2_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IAdviseSink2_Release(This) (This)->lpVtbl->Release(This)
-#define IAdviseSink2_OnDataChange(This,pFormatetc,pStgmed) (This)->lpVtbl->OnDataChange(This,pFormatetc,pStgmed)
-#define IAdviseSink2_OnViewChange(This,dwAspect,lindex) (This)->lpVtbl->OnViewChange(This,dwAspect,lindex)
-#define IAdviseSink2_OnRename(This,pmk) (This)->lpVtbl->OnRename(This,pmk)
-#define IAdviseSink2_OnSave(This) (This)->lpVtbl->OnSave(This)
-#define IAdviseSink2_OnClose(This) (This)->lpVtbl->OnClose(This)
-#define IAdviseSink2_OnLinkSrcChange(This,pmk) (This)->lpVtbl->OnLinkSrcChange(This,pmk)
-#define IDataObject_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-#define IDataObject_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IDataObject_Release(This) (This)->lpVtbl->Release(This)
-#define IDataObject_GetData(This,pformatetcIn,pmedium) (This)->lpVtbl->GetData(This,pformatetcIn,pmedium)
-#define IDataObject_GetDataHere(This,pformatetc,pmedium) (This)->lpVtbl->GetDataHere(This,pformatetc,pmedium)
-#define IDataObject_QueryGetData(This,pformatetc) (This)->lpVtbl->QueryGetData(This,pformatetc)
-#define IDataObject_GetCanonicalFormatEtc(This,pformatectIn,pformatetcOut) (This)->lpVtbl->GetCanonicalFormatEtc(This,pformatectIn,pformatetcOut)
-#define IDataObject_SetData(This,pformatetc,pmedium,fRelease) (This)->lpVtbl->SetData(This,pformatetc,pmedium,fRelease)
-#define IDataObject_EnumFormatEtc(This,dwDirection,ppenumFormatEtc) (This)->lpVtbl->EnumFormatEtc(This,dwDirection,ppenumFormatEtc)
-#define IDataObject_DAdvise(This,pformatetc,advf,pAdvSink,pdwConnection) (This)->lpVtbl->DAdvise(This,pformatetc,advf,pAdvSink,pdwConnection)
-#define IDataObject_DUnadvise(This,dwConnection) (This)->lpVtbl->DUnadvise(This,dwConnection)
-#define IDataObject_EnumDAdvise(This,ppenumAdvise) (This)->lpVtbl->EnumDAdvise(This,ppenumAdvise)
-#define IDataAdviseHolder_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-#define IDataAdviseHolder_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IDataAdviseHolder_Release(This) (This)->lpVtbl->Release(This)
-#define IDataAdviseHolder_Advise(This,pDataObject,pFetc,advf,pAdvise,pdwConnection) (This)->lpVtbl->Advise(This,pDataObject,pFetc,advf,pAdvise,pdwConnection)
-#define IDataAdviseHolder_Unadvise(This,dwConnection) (This)->lpVtbl->Unadvise(This,dwConnection)
-#define IDataAdviseHolder_EnumAdvise(This,ppenumAdvise) (This)->lpVtbl->EnumAdvise(This,ppenumAdvise)
-#define IDataAdviseHolder_SendOnDataChange(This,pDataObject,dwReserved,advf) (This)->lpVtbl->SendOnDataChange(This,pDataObject,dwReserved,advf)
-#define IMessageFilter_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-#define IMessageFilter_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IMessageFilter_Release(This) (This)->lpVtbl->Release(This)
-#define IMessageFilter_HandleInComingCall(T,d,h,dw,lp) (T)->lpVtbl->HandleInComingCall(T,d,h,dw,lp)
-#define IMessageFilter_RetryRejectedCall(s,C,T,R) (s)->lpVtbl->RetryRejectedCall(s,C,T,R)
-#define IMessageFilter_MessagePending(s,C,T,P) (s)->lpVtbl->MessagePending(This,C,T,P)
-#define IRpcChannelBuffer_QueryInterface(T,r,p) (T)->lpVtbl->QueryInterface(T,r,p)
-#define IRpcChannelBuffer_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IRpcChannelBuffer_Release(This) (This)->lpVtbl->Release(This)
-#define IRpcChannelBuffer_GetBuffer(This,pMessage,riid) (This)->lpVtbl->GetBuffer(This,pMessage,riid)
-#define IRpcChannelBuffer_SendReceive(T,p,pS) (T)->lpVtbl->SendReceive(T,p,pS)
-#define IRpcChannelBuffer_FreeBuffer(T,p) (T)->lpVtbl->FreeBuffer(T,p)
-#define IRpcChannelBuffer_GetDestCtx(This,pdwDestContext,ppvDestContext) (This)->lpVtbl->GetDestCtx(This,pdwDestContext,ppvDestContext)
-#define IRpcChannelBuffer_IsConnected(This) (This)->lpVtbl->IsConnected(This)
-#define IRpcProxyBuffer_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-#define IRpcProxyBuffer_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IRpcProxyBuffer_Release(This) (This)->lpVtbl->Release(This)
-#define IRpcProxyBuffer_Connect(This,pRpcChannelBuffer) (This)->lpVtbl->Connect(This,pRpcChannelBuffer)
-#define IRpcProxyBuffer_Disconnect(This) (This)->lpVtbl->Disconnect(This)
-#define IRpcStubBuffer_QueryInterface(T,r,pp) (T)->lpVtbl->QueryInterface(T,r,pp)
-#define IRpcStubBuffer_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IRpcStubBuffer_Release(This) (This)->lpVtbl->Release(This)
-#define IRpcStubBuffer_Connect(This,p) (This)->lpVtbl->Connect(This,p)
-#define IRpcStubBuffer_Disconnect(This) (This)->lpVtbl->Disconnect(This)
-#define IRpcStubBuffer_Invoke(T,_prpcmsg,_p) (T)->lpVtbl->Invoke(T,_prpcmsg,_p)
-#define IRpcStubBuffer_IsIIDSupported(T,d) (T)->lpVtbl->IsIIDSupported(T,d)
-#define IRpcStubBuffer_CountRefs(This) (This)->lpVtbl->CountRefs(This)
-#define IRpcStubBuffer_DebugServerQueryInterface(T,p) (T)->lpVtbl->DebugServerQueryInterface(T,p)
-#define IRpcStubBuffer_DebugServerRelease(T,p) (T)->lpVtbl->DebugServerRelease(T,p)
-#define IPSFactoryBuffer_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-#define IPSFactoryBuffer_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define IPSFactoryBuffer_Release(This) (This)->lpVtbl->Release(This)
-#define IPSFactoryBuffer_CreateProxy(T,U,r,P,p) (T)->lpVtbl->CreateProxy(T,U,r,P,p)
-#define IPSFactoryBuffer_CreateStub(T,r,U,p) (T)->lpVtbl->CreateStub(T,r,U,p)
-#define IClassActivator_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IClassActivator_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IClassActivator_Release(T) (T)->lpVtbl->Release(T)
-#define IClassActivator_GetClassObject(T,a,b,c,d,e) (T)->lpVtbl->GetClassObject(T,a,b,c,d,e)
-#endif /* COBJMACROS */
-
-#endif
diff --git a/winsup/w32api/include/objsafe.h b/winsup/w32api/include/objsafe.h
deleted file mode 100644
index ffab650..0000000
--- a/winsup/w32api/include/objsafe.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef _OBJSAFE_H
-#define _OBJSAFE_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define INTERFACESAFE_FOR_UNTRUSTED_CALLER 0x00000001
-#define INTERFACESAFE_FOR_UNTRUSTED_DATA 0x00000002
-
-EXTERN_C const IID IID_IObjectSafety;
-#define INTERFACE IObjectSafety
-DECLARE_INTERFACE_(IObjectSafety,IUnknown)
-{
- STDMETHOD(GetInterfaceSafetyOptions)(THIS_ REFIID,DWORD*,DWORD*) PURE;
- STDMETHOD(SetInterfaceSafetyOptions)(THIS_ REFIID,DWORD,DWORD) PURE;
-};
-#undef INTERFACE
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/objsel.h b/winsup/w32api/include/objsel.h
deleted file mode 100644
index c298a55..0000000
--- a/winsup/w32api/include/objsel.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * objsel.h - Active Directory
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may use,
- * modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-#ifndef _OBJSEL_H
-#define _OBJSEL_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- Active Directory Reference - Active Directory Structures - Object Picker Dialog Box Structures */
-#if (_WIN32_WINNT >= 0x0500)
-typedef struct _DS_SELECTION {
- PWSTR pwzName;
- PWSTR pwzADsPath;
- PWSTR pwzClass;
- PWSTR pwzUPN;
- VARIANT *pvarFetchedAttributes;
- ULONG flScopeType;
-} DS_SELECTION,*PDS_SELECTION;
-typedef struct _DS_SELECTION_LIST {
- ULONG cItems;
- ULONG cFetchedAttributes;
- DS_SELECTION aDsSelection[ANYSIZE_ARRAY];
-} DS_SELECTION_LIST,*PDS_SELECTION_LIST;
-
-typedef struct _DSOP_UPLEVEL_FILTER_FLAGS {
- ULONG flBothModes;
- ULONG flMixedModeOnly;
- ULONG flNativeModeOnly;
-} DSOP_UPLEVEL_FILTER_FLAGS;
-#define DSOP_FILTER_INCLUDE_ADVANCED_VIEW 0x00000001
-#define DSOP_FILTER_USERS 0x00000002
-#define DSOP_FILTER_BUILTIN_GROUPS 0x00000004
-#define DSOP_FILTER_WELL_KNOWN_PRINCIPALS 0x00000008
-#define DSOP_FILTER_UNIVERSAL_GROUPS_DL 0x00000010
-#define DSOP_FILTER_UNIVERSAL_GROUPS_SE 0x00000020
-#define DSOP_FILTER_GLOBAL_GROUPS_DL 0x00000040
-#define DSOP_FILTER_GLOBAL_GROUPS_SE 0x00000080
-#define DSOP_FILTER_DOMAIN_LOCAL_GROUPS_DL 0x00000100
-#define DSOP_FILTER_DOMAIN_LOCAL_GROUPS_SE 0x00000200
-#define DSOP_FILTER_CONTACTS 0x00000400
-#define DSOP_FILTER_COMPUTERS 0x00000800
-typedef struct _DSOP_FILTER_FLAGS {
- DSOP_UPLEVEL_FILTER_FLAGS Uplevel;
- ULONG flDownlevel;
-} DSOP_FILTER_FLAGS;
-#define DSOP_DOWNLEVEL_FILTER_USERS 0x80000001
-#define DSOP_DOWNLEVEL_FILTER_LOCAL_GROUPS 0x80000002
-#define DSOP_DOWNLEVEL_FILTER_GLOBAL_GROUPS 0x80000004
-#define DSOP_DOWNLEVEL_FILTER_COMPUTERS 0x80000008
-#define DSOP_DOWNLEVEL_FILTER_WORLD 0x80000010
-#define DSOP_DOWNLEVEL_FILTER_AUTHENTICATED_USER 0x80000020
-#define DSOP_DOWNLEVEL_FILTER_ANONYMOUS 0x80000040
-#define DSOP_DOWNLEVEL_FILTER_BATCH 0x80000080
-#define DSOP_DOWNLEVEL_FILTER_CREATOR_OWNER 0x80000100
-#define DSOP_DOWNLEVEL_FILTER_CREATOR_GROUP 0x80000200
-#define DSOP_DOWNLEVEL_FILTER_DIALUP 0x80000400
-#define DSOP_DOWNLEVEL_FILTER_INTERACTIVE 0x80000800
-#define DSOP_DOWNLEVEL_FILTER_NETWORK 0x80001000
-#define DSOP_DOWNLEVEL_FILTER_SERVICE 0x80002000
-#define DSOP_DOWNLEVEL_FILTER_SYSTEM 0x80004000
-#define DSOP_DOWNLEVEL_FILTER_EXCLUDE_BUILTIN_GROUPS 0x80008000
-#define DSOP_DOWNLEVEL_FILTER_TERMINAL_SERVER 0x80010000
-#define DSOP_DOWNLEVEL_FILTER_ALL_WELLKNOWN_SIDS 0x80020000
-#define DSOP_DOWNLEVEL_FILTER_LOCAL_SERVICE 0x80040000
-#define DSOP_DOWNLEVEL_FILTER_NETWORK_SERVICE 0x80080000
-#define DSOP_DOWNLEVEL_FILTER_REMOTE_LOGON 0x80100000
-typedef struct _DSOP_SCOPE_INIT_INFO {
- ULONG cbSize;
- ULONG flType;
- ULONG flScope;
- DSOP_FILTER_FLAGS FilterFlags;
- PCWSTR pwzDcName;
- PCWSTR pwzADsPath;
- HRESULT hr;
-} DSOP_SCOPE_INIT_INFO,*PDSOP_SCOPE_INIT_INFO,*PCDSOP_SCOPE_INIT_INFO;
-#define DSOP_SCOPE_TYPE_TARGET_COMPUTER 0x00000001
-#define DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN 0x00000002
-#define DSOP_SCOPE_TYPE_DOWNLEVEL_JOINED_DOMAIN 0x00000004
-#define DSOP_SCOPE_TYPE_ENTERPRISE_DOMAIN 0x00000008
-#define DSOP_SCOPE_TYPE_GLOBAL_CATALOG 0x00000010
-#define DSOP_SCOPE_TYPE_EXTERNAL_UPLEVEL_DOMAIN 0x00000020
-#define DSOP_SCOPE_TYPE_EXTERNAL_DOWNLEVEL_DOMAIN 0x00000040
-#define DSOP_SCOPE_TYPE_WORKGROUP 0x00000080
-#define DSOP_SCOPE_TYPE_USER_ENTERED_UPLEVEL_SCOPE 0x00000100
-#define DSOP_SCOPE_TYPE_USER_ENTERED_DOWNLEVEL_SCOPE 0x00000200
-typedef struct _DSOP_INIT_INFO {
- ULONG cbSize;
- PCWSTR pwzTargetComputer;
- ULONG cDsScopeInfos;
- PDSOP_SCOPE_INIT_INFO aDsScopeInfos;
- ULONG flOptions;
- ULONG cAttributesToFetch;
- PCWSTR* apwzAttributeNames;
-} DSOP_INIT_INFO,*PDSOP_INIT_INFO;
-#define DSOP_FLAG_MULTISELECT 0x00000001
-#define DSOP_FLAG_SKIP_TARGET_COMPUTER_DC_CHECK 0x00000002
-#endif /* (_WIN32_WINNT >= 0x0500) */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/ocidl.h b/winsup/w32api/include/ocidl.h
deleted file mode 100644
index 79f6b43..0000000
--- a/winsup/w32api/include/ocidl.h
+++ /dev/null
@@ -1,837 +0,0 @@
-#ifndef _OCIDL_H
-#define _OCIDL_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <ole2.h>
-
-typedef _COM_interface IErrorLog *LPERRORLOG;
-typedef _COM_interface IPropertyBag *LPPROPERTYBAG;
-typedef _COM_interface IPropertyBag2 *LPPROPERTYBAG2;
-typedef _COM_interface IEnumConnections *LPENUMCONNECTIONS;
-typedef _COM_interface IConnectionPoint *LPCONNECTIONPOINT;
-typedef _COM_interface IEnumConnectionPoints *LPENUMCONNECTIONPOINTS;
-typedef _COM_interface IPropertyPageSite *LPPROPERTYPAGESITE;
-typedef _COM_interface IFont *LPFONT;
-typedef _COM_interface IFontDisp *LPFONTDISP;
-typedef _COM_interface IOleUndoManager *LPOLEUNDOMANAGER;
-
-#ifndef OLE2ANSI
-typedef TEXTMETRICW TEXTMETRICOLE;
-#else
-typedef TEXTMETRIC TEXTMETRICOLE;
-#endif
-typedef TEXTMETRICOLE *LPTEXTMETRICOLE;
-typedef DWORD OLE_COLOR;
-typedef UINT OLE_HANDLE;
-typedef long OLE_XPOS_HIMETRIC;
-typedef long OLE_YPOS_HIMETRIC;
-typedef long OLE_XSIZE_HIMETRIC;
-typedef long OLE_YSIZE_HIMETRIC;
-
-typedef enum tagREADYSTATE {
- READYSTATE_UNINITIALIZED = 0,
- READYSTATE_LOADING = 1,
- READYSTATE_LOADED = 2,
- READYSTATE_INTERACTIVE = 3,
- READYSTATE_COMPLETE = 4
-} READYSTATE;
-typedef enum tagPROPBAG2_TYPE {
- PROPBAG2_TYPE_UNDEFINED = 0,
- PROPBAG2_TYPE_DATA = 1,
- PROPBAG2_TYPE_URL = 2,
- PROPBAG2_TYPE_OBJECT = 3,
- PROPBAG2_TYPE_STREAM = 4,
- PROPBAG2_TYPE_STORAGE = 5,
- PROPBAG2_TYPE_MONIKER = 6
-} PROPBAG2_TYPE;
-typedef struct tagPROPBAG2
-{
- DWORD dwType;
- VARTYPE vt;
- CLIPFORMAT cfType;
- DWORD dwHint;
- LPOLESTR pstrName;
- CLSID clsid;
-} PROPBAG2;
-typedef enum tagQACONTAINERFLAGS
-{
- QACONTAINER_SHOWHATCHING = 1,
- QACONTAINER_SHOWGRABHANDLES = 2,
- QACONTAINER_USERMODE = 4,
- QACONTAINER_DISPLAYASDEFAULT = 8,
- QACONTAINER_UIDEAD = 16,
- QACONTAINER_AUTOCLIP = 32,
- QACONTAINER_MESSAGEREFLECT = 64,
- QACONTAINER_SUPPORTSMNEMONICS = 128
-} QACONTAINERFLAGS;
-typedef struct tagQACONTAINER
-{
- ULONG cbSize;
- _COM_interface IOleClientSite *pClientSite;
- _COM_interface IAdviseSinkEx *pAdviseSink;
- _COM_interface IPropertyNotifySink *pPropertyNotifySink;
- IUnknown *pUnkEventSink;
- DWORD dwAmbientFlags;
- OLE_COLOR colorFore;
- OLE_COLOR colorBack;
- _COM_interface IFont *pFont;
- _COM_interface IOleUndoManager *pUndoMgr;
- DWORD dwAppearance;
- LONG lcid;
- HPALETTE hpal;
- _COM_interface IBindHost *pBindHost;
- _COM_interface IOleControlSite *pOleControlSite;
- _COM_interface IServiceProvider *pServiceProvider;
-} QACONTAINER;
-typedef struct tagQACONTROL
-{
- ULONG cbSize;
- DWORD dwMiscStatus;
- DWORD dwViewStatus;
- DWORD dwEventCookie;
- DWORD dwPropNotifyCookie;
- DWORD dwPointerActivationPolicy;
-} QACONTROL;
-typedef struct tagPOINTF {
- float x;
- float y;
-} POINTF,*LPPOINTF;
-typedef struct tagCONTROLINFO {
- ULONG cb;
- HACCEL hAccel;
- USHORT cAccel;
- DWORD dwFlags;
-} CONTROLINFO,*LPCONTROLINFO;
-typedef struct tagCONNECTDATA {
- LPUNKNOWN pUnk;
- DWORD dwCookie;
-} CONNECTDATA,*LPCONNECTDATA;
-typedef struct tagLICINFO {
- long cbLicInfo;
- BOOL fRuntimeKeyAvail;
- BOOL fLicVerified;
-} LICINFO,*LPLICINFO;
-typedef struct tagCAUUID {
- ULONG cElems;
- GUID *pElems;
-} CAUUID,*LPCAUUID;
-typedef struct tagCALPOLESTR {
- ULONG cElems;
- LPOLESTR *pElems;
-} CALPOLESTR,*LPCALPOLESTR;
-typedef struct tagCADWORD {
- ULONG cElems;
- DWORD *pElems;
-} CADWORD,*LPCADWORD;
-typedef struct tagPROPPAGEINFO {
- ULONG cb;
- LPOLESTR pszTitle;
- SIZE size;
- LPOLESTR pszDocString;
- LPOLESTR pszHelpFile;
- DWORD dwHelpContext;
-} PROPPAGEINFO,*LPPROPPAGEINFO;
-
-EXTERN_C const IID IID_IOleControl;
-#define INTERFACE IOleControl
-DECLARE_INTERFACE_(IOleControl,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetControlInfo)(THIS_ LPCONTROLINFO) PURE;
- STDMETHOD(OnMnemonic)(THIS_ LPMSG) PURE;
- STDMETHOD(OnAmbientPropertyChange)(THIS_ DISPID) PURE;
- STDMETHOD(FreezeEvents)(THIS_ BOOL) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IOleControlSite;
-#define INTERFACE IOleControlSite
-DECLARE_INTERFACE_(IOleControlSite,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(OnControlInfoChanged)(THIS) PURE;
- STDMETHOD(LockInPlaceActive)(THIS_ BOOL) PURE;
- STDMETHOD(GetExtendedControl)(THIS_ LPDISPATCH*) PURE;
- STDMETHOD(TransformCoords)(THIS_ POINTL*,POINTF*,DWORD) PURE;
- STDMETHOD(TranslateAccelerator)(THIS_ LPMSG,DWORD) PURE;
- STDMETHOD(OnFocus)(THIS_ BOOL) PURE;
- STDMETHOD(ShowPropertyFrame)(THIS) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IOleControlSite_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IOleControlSite_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IOleControlSite_Release(T) (T)->lpVtbl->Release(T)
-#define IOleControlSite_OnControlInfoChanged(T) (T)->lpVtbl->OnControlInfoChanged(T)
-#define IOleControlSite_LockInPlaceActive(T,a) (T)->lpVtbl->LockInPlaceActive(T,a)
-#define IOleControlSite_GetExtendedControl(T,a) (T)->lpVtbl->GetExtendedControl(T,a)
-#define IOleControlSite_TransformCoords(T,a,b,c) (T)->lpVtbl->TransformCoords(T,a,b,c)
-#define IOleControlSite_TranslateAccelerator(T,a,b) (T)->lpVtbl->TranslateAccelerator(T,a,b)
-#define IOleControlSite_OnFocus(T,a) (T)->lpVtbl->OnFocus(T,a)
-#define IOleControlSite_ShowPropertyFrame(T) (T)->lpVtbl->ShowPropertyFrame(T)
-#endif
-
-EXTERN_C const IID IID_ISimpleFrameSite;
-#define INTERFACE ISimpleFrameSite
-DECLARE_INTERFACE_(ISimpleFrameSite,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(PreMessageFilter)(THIS_ HWND,UINT,WPARAM,LPARAM,LRESULT*,PDWORD) PURE;
- STDMETHOD(PostMessageFilter)(THIS_ HWND,UINT,WPARAM,LPARAM,LRESULT*,DWORD) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IErrorLog;
-#define INTERFACE IErrorLog
-DECLARE_INTERFACE_(IErrorLog,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(AddError)(THIS_ LPCOLESTR,LPEXCEPINFO) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IPropertyBag;
-#define INTERFACE IPropertyBag
-DECLARE_INTERFACE_(IPropertyBag,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Read)(THIS_ LPCOLESTR,LPVARIANT,LPERRORLOG) PURE;
- STDMETHOD(Write)(THIS_ LPCOLESTR,LPVARIANT) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IPropertyBag2;
-#define INTERFACE IPropertyBag2
-DECLARE_INTERFACE_(IPropertyBag2,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Read)(THIS_ ULONG,PROPBAG2*,LPERRORLOG,VARIANT*,HRESULT*) PURE;
- STDMETHOD(Write)(THIS_ ULONG,PROPBAG2*,VARIANT*) PURE;
- STDMETHOD(CountProperties)(THIS_ ULONG*) PURE;
- STDMETHOD(GetPropertyInfo)(THIS_ ULONG,ULONG,PROPBAG2*,ULONG*) PURE;
- STDMETHOD(LoadObject)(THIS_ LPCOLESTR,DWORD,IUnknown*,LPERRORLOG) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IPersistPropertyBag;
-#define INTERFACE IPersistPropertyBag
-DECLARE_INTERFACE_(IPersistPropertyBag,IPersist)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetClassID)(THIS_ LPCLSID) PURE;
- STDMETHOD(InitNew)(THIS) PURE;
- STDMETHOD(Load)(THIS_ LPPROPERTYBAG,LPERRORLOG) PURE;
- STDMETHOD(Save)(THIS_ LPPROPERTYBAG,BOOL,BOOL) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IPersistPropertyBag_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IPersistPropertyBag_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IPersistPropertyBag_Release(T) (T)->lpVtbl->Release(T)
-#define IPersistPropertyBag_GetClassID(T,a) (T)->lpVtbl->GetClassID(T,a)
-#define IPersistPropertyBag_InitNew(T) (T)->lpVtbl->InitNew(T)
-#define IPersistPropertyBag_Load(T,a,b) (T)->lpVtbl->Load(T,a,b)
-#define IPersistPropertyBag_Save(T,a,b,c) (T)->lpVtbl->Save(T,a,b,c)
-#endif
-
-EXTERN_C const IID IID_IPersistPropertyBag2;
-#define INTERFACE IPersistPropertyBag2
-DECLARE_INTERFACE_(IPersistPropertyBag2,IPersist)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetClassID)(THIS_ LPCLSID) PURE;
- STDMETHOD(InitNew)(THIS) PURE;
- STDMETHOD(Load)(THIS_ LPPROPERTYBAG2,LPERRORLOG) PURE;
- STDMETHOD(Save)(THIS_ LPPROPERTYBAG2,BOOL,BOOL) PURE;
- STDMETHOD(IsDirty)(THIS) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IPersistPropertyBag2_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IPersistPropertyBag2_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IPersistPropertyBag2_Release(T) (T)->lpVtbl->Release(T)
-#define IPersistPropertyBag2_GetClassID(T,a) (T)->lpVtbl->GetClassID(T,a)
-#define IPersistPropertyBag2_InitNew(T) (T)->lpVtbl->InitNew(T)
-#define IPersistPropertyBag2_Load(T,a,b) (T)->lpVtbl->Load(T,a,b)
-#define IPersistPropertyBag2_Save(T,a,b,c) (T)->lpVtbl->Save(T,a,b,c)
-#define IPersistPropertyBag2_IsDirty(T) (T)->lpVtbl->IsDirty(T)
-#endif
-
-EXTERN_C const IID IID_IPersistStreamInit;
-#define INTERFACE IPersistStreamInit
-DECLARE_INTERFACE_(IPersistStreamInit,IPersist)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetClassID)(THIS_ LPCLSID) PURE;
- STDMETHOD(IsDirty)(THIS) PURE;
- STDMETHOD(Load)(THIS_ LPSTREAM) PURE;
- STDMETHOD(Save)(THIS_ LPSTREAM,BOOL) PURE;
- STDMETHOD(GetSizeMax)(THIS_ PULARGE_INTEGER) PURE;
- STDMETHOD(InitNew)(THIS) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IPersistMemory;
-#define INTERFACE IPersistMemory
-DECLARE_INTERFACE_(IPersistMemory,IPersist)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetClassID)(THIS_ LPCLSID) PURE;
- STDMETHOD(IsDirty)(THIS) PURE;
- STDMETHOD(Load)(THIS_ PVOID,ULONG) PURE;
- STDMETHOD(Save)(THIS_ PVOID,BOOL,ULONG) PURE;
- STDMETHOD(GetSizeMax)(THIS_ PULONG) PURE;
- STDMETHOD(InitNew)(THIS) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IPropertyNotifySink;
-#define INTERFACE IPropertyNotifySink
-DECLARE_INTERFACE_(IPropertyNotifySink,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(OnChanged)(THIS_ DISPID) PURE;
- STDMETHOD(OnRequestEdit)(THIS_ DISPID) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IPropertyNotifySink_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IPropertyNotifySink_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IPropertyNotifySink_Release(T) (T)->lpVtbl->Release(T)
-#define IPropertyNotifySink_OnChanged(T,a) (T)->lpVtbl->OnChanged(T,a)
-#define IPropertyNotifySink_OnRequestEdit(T,a) (T)->lpVtbl->OnRequestEdit(T,a)
-#endif
-
-EXTERN_C const IID IID_IProvideClassInfo;
-#define INTERFACE IProvideClassInfo
-DECLARE_INTERFACE_(IProvideClassInfo,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetClassInfo)(THIS_ LPTYPEINFO*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IProvideClassInfo2;
-#define INTERFACE IProvideClassInfo2
-DECLARE_INTERFACE_(IProvideClassInfo2,IProvideClassInfo)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetClassInfo)(THIS_ LPTYPEINFO*) PURE;
- STDMETHOD(GetGUID)(THIS_ DWORD,GUID*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IConnectionPointContainer;
-#define INTERFACE IConnectionPointContainer
-DECLARE_INTERFACE_(IConnectionPointContainer,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(EnumConnectionPoints)(THIS_ LPENUMCONNECTIONPOINTS*) PURE;
- STDMETHOD(FindConnectionPoint)(THIS_ REFIID,LPCONNECTIONPOINT*) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IConnectionPointContainer_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IConnectionPointContainer_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IConnectionPointContainer_Release(T) (T)->lpVtbl->Release(T)
-#define IConnectionPointContainer_EnumConnectionPoints(T,a) (T)->lpVtbl->EnumConnectionPoints(T,a)
-#define IConnectionPointContainer_FindConnectionPoint(T,a,b) (T)->lpVtbl->FindConnectionPoint(T,a,b)
-#endif
-
-EXTERN_C const IID IID_IEnumConnectionPoints;
-#define INTERFACE IEnumConnectionPoints
-DECLARE_INTERFACE_(IEnumConnectionPoints,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Next)(THIS_ ULONG,LPCONNECTIONPOINT*,ULONG*) PURE;
- STDMETHOD(Skip)(THIS_ ULONG) PURE;
- STDMETHOD(Reset)(THIS) PURE;
- STDMETHOD(Clone)(THIS_ LPENUMCONNECTIONPOINTS*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IConnectionPoint;
-#define INTERFACE IConnectionPoint
-DECLARE_INTERFACE_(IConnectionPoint,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetConnectionInterface)(THIS_ IID*) PURE;
- STDMETHOD(GetConnectionPointContainer)(THIS_ IConnectionPointContainer**) PURE;
- STDMETHOD(Advise)(THIS_ LPUNKNOWN,PDWORD) PURE;
- STDMETHOD(Unadvise)(THIS_ DWORD) PURE;
- STDMETHOD(EnumConnections)(THIS_ LPENUMCONNECTIONS*) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IConnectionPoint_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IConnectionPoint_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IConnectionPoint_Release(T) (T)->lpVtbl->Release(T)
-#define IConnectionPoint_GetConnectionInterface(T,a) (T)->lpVtbl->GetConnectionInterface(T,a)
-#define IConnectionPoint_GetConnectionPointContainer(T,a) (T)->lpVtbl->GetConnectionPointContainer(T,a)
-#define IConnectionPoint_Advise(T,a,b) (T)->lpVtbl->Advise(T,a,b)
-#define IConnectionPoint_Unadvise(T,a) (T)->lpVtbl->Unadvise(T,a)
-#define IConnectionPoint_EnumConnections(T,a) (T)->lpVtbl->EnumConnections(T,a)
-#endif
-
-EXTERN_C const IID IID_IEnumConnections;
-#define INTERFACE IEnumConnections
-DECLARE_INTERFACE_(IEnumConnections,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Next)(THIS_ ULONG,LPCONNECTDATA,PULONG) PURE;
- STDMETHOD(Skip)(THIS_ ULONG) PURE;
- STDMETHOD(Reset)(THIS) PURE;
- STDMETHOD(Clone)(THIS_ LPENUMCONNECTIONS*) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IEnumConnections_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IEnumConnections_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IEnumConnections_Release(T) (T)->lpVtbl->Release(T)
-#define IEnumConnections_Next(T,a,b,c) (T)->lpVtbl->Next(T,a,b,c)
-#define IEnumConnections_Skip(T,a) (T)->lpVtbl->Skip(T,a)
-#define IEnumConnections_Reset(T) (T)->lpVtbl->Reset(T)
-#define IEnumConnections_Clone(T,a) (T)->lpVtbl->Clone(T,a)
-#endif
-
-EXTERN_C const IID IID_IClassFactory2;
-#define INTERFACE IClassFactory2
-DECLARE_INTERFACE_(IClassFactory2,IClassFactory)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(CreateInstance)(THIS_ LPUNKNOWN,REFIID,PVOID*) PURE;
- STDMETHOD(LockServer)(THIS_ BOOL) PURE;
- STDMETHOD(GetLicInfo)(THIS_ LPLICINFO) PURE;
- STDMETHOD(RequestLicKey)(THIS_ DWORD,BSTR*) PURE;
- STDMETHOD(CreateInstanceLic)(THIS_ LPUNKNOWN,LPUNKNOWN,REFIID,BSTR,PVOID*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_ISpecifyPropertyPages;
-#define INTERFACE ISpecifyPropertyPages
-DECLARE_INTERFACE_(ISpecifyPropertyPages,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetPages)(THIS_ CAUUID*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IPerPropertyBrowsing;
-#define INTERFACE IPerPropertyBrowsing
-DECLARE_INTERFACE_(IPerPropertyBrowsing,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetDisplayString)(THIS_ DISPID,BSTR*) PURE;
- STDMETHOD(MapPropertyToPage)(THIS_ DISPID,LPCLSID) PURE;
- STDMETHOD(GetPredefinedStrings)(THIS_ DISPID,CALPOLESTR*,CADWORD*) PURE;
- STDMETHOD(GetPredefinedValue)(THIS_ DISPID,DWORD,VARIANT*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IPropertyPageSite;
-#define INTERFACE IPropertyPageSite
-DECLARE_INTERFACE_(IPropertyPageSite,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(OnStatusChange)(THIS_ DWORD) PURE;
- STDMETHOD(GetLocaleID)(THIS_ LCID*) PURE;
- STDMETHOD(GetPageContainer)(THIS_ LPUNKNOWN*) PURE;
- STDMETHOD(TranslateAccelerator)(THIS_ LPMSG) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IPropertyPage;
-#define INTERFACE IPropertyPage
-DECLARE_INTERFACE_(IPropertyPage,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(SetPageSite)(THIS_ LPPROPERTYPAGESITE) PURE;
- STDMETHOD(Activate)(THIS_ HWND,LPCRECT,BOOL) PURE;
- STDMETHOD(Deactivate)(THIS) PURE;
- STDMETHOD(GetPageInfo)(THIS_ LPPROPPAGEINFO) PURE;
- STDMETHOD(SetObjects)(THIS_ ULONG,LPUNKNOWN*) PURE;
- STDMETHOD(Show)(THIS_ UINT) PURE;
- STDMETHOD(Move)(THIS_ LPCRECT) PURE;
- STDMETHOD(IsPageDirty)(THIS) PURE;
- STDMETHOD(Apply)(THIS) PURE;
- STDMETHOD(Help)(THIS_ LPCOLESTR) PURE;
- STDMETHOD(TranslateAccelerator)(THIS_ LPMSG) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IPropertyPage2;
-#define INTERFACE IPropertyPage2
-DECLARE_INTERFACE_(IPropertyPage2,IPropertyPage)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(SetPageSite)(THIS_ LPPROPERTYPAGESITE) PURE;
- STDMETHOD(Activate)(THIS_ HWND,LPCRECT,BOOL) PURE;
- STDMETHOD(Deactivate)(THIS) PURE;
- STDMETHOD(GetPageInfo)(THIS_ LPPROPPAGEINFO) PURE;
- STDMETHOD(SetObjects)(THIS_ ULONG,LPUNKNOWN*) PURE;
- STDMETHOD(Show)(THIS_ UINT) PURE;
- STDMETHOD(Move)(THIS_ LPCRECT) PURE;
- STDMETHOD(IsPageDirty)(THIS) PURE;
- STDMETHOD(Apply)(THIS) PURE;
- STDMETHOD(Help)(THIS_ LPCOLESTR) PURE;
- STDMETHOD(TranslateAccelerator)(THIS_ LPMSG) PURE;
- STDMETHOD(EditProperty)(THIS_ DISPID) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IFont;
-#define INTERFACE IFont
-DECLARE_INTERFACE_(IFont,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(get_Name)(THIS_ BSTR*) PURE;
- STDMETHOD(put_Name)(THIS_ BSTR) PURE;
- STDMETHOD(get_Size)(THIS_ CY*) PURE;
- STDMETHOD(put_Size)(THIS_ CY) PURE;
- STDMETHOD(get_Bold)(THIS_ BOOL*) PURE;
- STDMETHOD(put_Bold)(THIS_ BOOL) PURE;
- STDMETHOD(get_Italic)(THIS_ BOOL*) PURE;
- STDMETHOD(put_Italic)(THIS_ BOOL) PURE;
- STDMETHOD(get_Underline)(THIS_ BOOL*) PURE;
- STDMETHOD(put_Underline)(THIS_ BOOL) PURE;
- STDMETHOD(get_Strikethrough)(THIS_ BOOL*) PURE;
- STDMETHOD(put_Strikethrough)(THIS_ BOOL) PURE;
- STDMETHOD(get_Weight)(THIS_ short*) PURE;
- STDMETHOD(put_Weight)(THIS_ short) PURE;
- STDMETHOD(get_Charset)(THIS_ short*) PURE;
- STDMETHOD(put_Charset)(THIS_ short) PURE;
- STDMETHOD(get_hFont)(THIS_ HFONT*) PURE;
- STDMETHOD(Clone)(THIS_ IFont**) PURE;
- STDMETHOD(IsEqual)(THIS_ IFont*) PURE;
- STDMETHOD(SetRatio)(THIS_ long,long) PURE;
- STDMETHOD(QueryTextMetrics)(THIS_ LPTEXTMETRICOLE) PURE;
- STDMETHOD(AddRefHfont)(THIS_ HFONT) PURE;
- STDMETHOD(ReleaseHfont)(THIS_ HFONT) PURE;
- STDMETHOD(SetHdc)(THIS_ HDC) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IFontDisp;
-#define INTERFACE IFontDisp
-DECLARE_INTERFACE_(IFontDisp,IDispatch)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
- STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IPicture;
-#define INTERFACE IPicture
-DECLARE_INTERFACE_(IPicture,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(get_Handle)(THIS_ OLE_HANDLE*) PURE;
- STDMETHOD(get_hPal)(THIS_ OLE_HANDLE*) PURE;
- STDMETHOD(get_Type)(THIS_ short*) PURE;
- STDMETHOD(get_Width)(THIS_ OLE_XSIZE_HIMETRIC*) PURE;
- STDMETHOD(get_Height)(THIS_ OLE_YSIZE_HIMETRIC*) PURE;
- STDMETHOD(Render)(THIS_ HDC,long,long,long,long,OLE_XPOS_HIMETRIC,OLE_YPOS_HIMETRIC,OLE_XSIZE_HIMETRIC,OLE_YSIZE_HIMETRIC,LPCRECT) PURE;
- STDMETHOD(set_hPal)(THIS_ OLE_HANDLE) PURE;
- STDMETHOD(get_CurDC)(THIS_ HDC*) PURE;
- STDMETHOD(SelectPicture)(THIS_ HDC,HDC*,OLE_HANDLE*) PURE;
- STDMETHOD(get_KeepOriginalFormat)(THIS_ BOOL*) PURE;
- STDMETHOD(put_KeepOriginalFormat)(THIS_ BOOL) PURE;
- STDMETHOD(PictureChanged)(THIS) PURE;
- STDMETHOD(SaveAsFile)(THIS_ LPSTREAM,BOOL,LONG*) PURE;
- STDMETHOD(get_Attributes)(THIS_ PDWORD) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IPicture_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IPicture_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IPicture_Release(p) (p)->lpVtbl->Release(p)
-#define IPicture_get_Handle(p,a) (p)->lpVtbl->get_Handle(p,a)
-#define IPicture_get_hPal(p,a) (p)->lpVtbl->get_hPal(p,a)
-#define IPicture_get_Type(p,a) (p)->lpVtbl->get_Type(p,a)
-#define IPicture_get_Width(p,a) (p)->lpVtbl->get_Width(p,a)
-#define IPicture_get_Height(p,a) (p)->lpVtbl->get_Height(p,a)
-#define IPicture_Render(p,a,b,c,d,e,f,g,h,i,j) (p)->lpVtbl->Render(p,a,b,c,d,e,f,g,h,i,j)
-#define IPicture_set_hPal(p,a) (p)->lpVtbl->set_hPal(p,a)
-#define IPicture_get_CurDC(p,a) (p)->lpVtbl->get_CurDC(p,a)
-#define IPicture_SelectPicture(p,a,b,c) (p)->lpVtbl->SelectPicture(p,a,b,c)
-#define IPicture_get_KeepOriginalFormat(p,a) (p)->lpVtbl->get_KeepOriginalFormat(p,a)
-#define IPicture_put_KeepOriginalFormat(p,a) (p)->lpVtbl->put_KeepOriginalFormat(p,a)
-#define IPicture_PictureChanged(p) (p)->lpVtbl->PictureChanged(p)
-#define IPicture_SaveAsFile(p,a,b,c) (p)->lpVtbl->SaveAsFile(p,a,b,c)
-#define IPicture_get_Attributes(p,a) (p)->lpVtbl->get_Attributes(p,a)
-#endif
-
-EXTERN_C const IID IID_IPictureDisp;
-#define INTERFACE IPictureDisp
-DECLARE_INTERFACE_(IPictureDisp,IDispatch)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
- STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IOleInPlaceSiteEx;
-#define INTERFACE IOleInPlaceSiteEx
-DECLARE_INTERFACE_(IOleInPlaceSiteEx,IOleInPlaceSite)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
- STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
- STDMETHOD(CanInPlaceActivate)(THIS) PURE;
- STDMETHOD(OnInPlaceActivate)(THIS) PURE;
- STDMETHOD(OnUIActivate)(THIS) PURE;
- STDMETHOD(GetWindowContext)(THIS_ IOleInPlaceFrame**,IOleInPlaceUIWindow**,LPRECT,LPRECT,LPOLEINPLACEFRAMEINFO) PURE;
- STDMETHOD(Scroll)(THIS_ SIZE) PURE;
- STDMETHOD(OnUIDeactivate)(THIS_ BOOL) PURE;
- STDMETHOD(OnInPlaceDeactivate)(THIS) PURE;
- STDMETHOD(DiscardUndoState)(THIS) PURE;
- STDMETHOD(DeactivateAndUndo)(THIS) PURE;
- STDMETHOD(OnPosRectChange)(THIS_ LPCRECT) PURE;
- STDMETHOD(OnInPlaceActivateEx)(THIS_ BOOL*,DWORD) PURE;
- STDMETHOD(OnInPlaceDeactivateEx)(THIS_ BOOL) PURE;
- STDMETHOD(RequestUIActivate)(THIS) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IObjectWithSite;
-#define INTERFACE IObjectWithSite
-DECLARE_INTERFACE_(IObjectWithSite,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(SetSite)(THIS_ IUnknown*) PURE;
- STDMETHOD(GetSite)(THIS_ REFIID, void**) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IOleInPlaceSiteWindowless;
-#define INTERFACE IOleInPlaceSiteWindowless
-DECLARE_INTERFACE_(IOleInPlaceSiteWindowless,IOleInPlaceSiteEx)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
- STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
- STDMETHOD(CanInPlaceActivate)(THIS) PURE;
- STDMETHOD(OnInPlaceActivate)(THIS) PURE;
- STDMETHOD(OnUIActivate)(THIS) PURE;
- STDMETHOD(GetWindowContext)(THIS_ IOleInPlaceFrame**,IOleInPlaceUIWindow**,LPRECT,LPRECT,LPOLEINPLACEFRAMEINFO) PURE;
- STDMETHOD(Scroll)(THIS_ SIZE) PURE;
- STDMETHOD(OnUIDeactivate)(THIS_ BOOL) PURE;
- STDMETHOD(OnInPlaceDeactivate)(THIS) PURE;
- STDMETHOD(DiscardUndoState)(THIS) PURE;
- STDMETHOD(DeactivateAndUndo)(THIS) PURE;
- STDMETHOD(OnPosRectChange)(THIS_ LPCRECT) PURE;
-
- STDMETHOD(OnInPlaceActivateEx)(THIS_ BOOL*,DWORD) PURE;
- STDMETHOD(OnInPlaceDeactivateEx)(THIS_ BOOL) PURE;
- STDMETHOD(RequestUIActivate)(THIS) PURE;
-
- STDMETHOD(CanWindowlessActivate)(THIS) PURE;
- STDMETHOD(GetCapture)(THIS) PURE;
- STDMETHOD(SetCapture)(THIS_ BOOL) PURE;
- STDMETHOD(GetFocus)(THIS) PURE;
- STDMETHOD(SetFocus)(THIS_ BOOL) PURE;
- STDMETHOD(GetDC)(THIS_ LPCRECT,DWORD,HDC*) PURE;
- STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
- STDMETHOD(InvalidateRect)(THIS_ LPCRECT,BOOL) PURE;
- STDMETHOD(InvalidateRgn)(THIS_ HRGN,BOOL) PURE;
- STDMETHOD(ScrollRect)(THIS_ INT,INT,LPCRECT,LPCRECT) PURE;
- STDMETHOD(AdjustRect)(THIS_ LPCRECT) PURE;
- STDMETHOD(OnDefWindowMessage)(THIS_ UINT,WPARAM,LPARAM,LRESULT*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IAdviseSinkEx;
-#define INTERFACE IAdviseSinkEx
-DECLARE_INTERFACE_(IAdviseSinkEx,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD_(void,OnDataChange)(THIS_ FORMATETC*,STGMEDIUM*) PURE;
- STDMETHOD_(void,OnViewChange)(THIS_ DWORD,LONG) PURE;
- STDMETHOD_(void,OnRename)(THIS_ IMoniker*) PURE;
- STDMETHOD_(void,OnSave)(THIS) PURE;
- STDMETHOD_(void,OnClose)(THIS) PURE;
- STDMETHOD(OnViewStatusChange)(THIS_ DWORD) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IPointerInactive;
-#define INTERFACE IPointerInactive
-DECLARE_INTERFACE_(IPointerInactive,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetActivationPolicy)(THIS_ DWORD*) PURE;
- STDMETHOD(OnInactiveMouseMove)(THIS_ LPCRECT,LONG,LONG,DWORD) PURE;
- STDMETHOD(OnInactiveSetCursor)(THIS_ LPCRECT,LONG,LONG,DWORD,BOOL) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IOleUndoUnit;
-#define INTERFACE IOleUndoUnit
-DECLARE_INTERFACE_(IOleUndoUnit,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Do)(THIS_ LPOLEUNDOMANAGER) PURE;
- STDMETHOD(GetDescription)(THIS_ BSTR*) PURE;
- STDMETHOD(GetUnitType)(THIS_ CLSID*,LONG*) PURE;
- STDMETHOD(OnNextAdd)(THIS) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IOleParentUndoUnit;
-#define INTERFACE IOleParentUndoUnit
-DECLARE_INTERFACE_(IOleParentUndoUnit,IOleUndoUnit)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Do)(THIS_ LPOLEUNDOMANAGER) PURE;
- STDMETHOD(GetDescription)(THIS_ BSTR*) PURE;
- STDMETHOD(GetUnitType)(THIS_ CLSID*,LONG*) PURE;
- STDMETHOD(OnNextAdd)(THIS) PURE;
- STDMETHOD(Open)(THIS_ IOleParentUndoUnit*) PURE;
- STDMETHOD(Close)(THIS_ IOleParentUndoUnit*,BOOL) PURE;
- STDMETHOD(Add)(THIS_ IOleUndoUnit*) PURE;
- STDMETHOD(FindUnit)(THIS_ IOleUndoUnit*) PURE;
- STDMETHOD(GetParentState)(THIS_ DWORD*) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IEnumOleUndoUnits;
-#define INTERFACE IEnumOleUndoUnits
-DECLARE_INTERFACE_(IEnumOleUndoUnits,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Next)(THIS_ ULONG,IOleUndoUnit**,ULONG*) PURE;
- STDMETHOD(Skip)(THIS_ ULONG) PURE;
- STDMETHOD(Reset)(THIS) PURE;
- STDMETHOD(Clone)(THIS_ IEnumOleUndoUnits**) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IOleUndoManager;
-#define INTERFACE IOleUndoManager
-DECLARE_INTERFACE_(IOleUndoManager,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Open)(THIS_ IOleParentUndoUnit*) PURE;
- STDMETHOD(Close)(THIS_ IOleParentUndoUnit*,BOOL) PURE;
- STDMETHOD(Add)(THIS_ IOleUndoUnit*) PURE;
- STDMETHOD(GetOpenParentState)(THIS_ DWORD*) PURE;
- STDMETHOD(DiscardFrom)(THIS_ IOleUndoUnit*) PURE;
- STDMETHOD(UndoTo)(THIS_ IOleUndoUnit*) PURE;
- STDMETHOD(RedoTo)(THIS_ IOleUndoUnit*) PURE;
- STDMETHOD(EnumUndoable)(THIS_ IEnumOleUndoUnits**) PURE;
- STDMETHOD(EnumRedoable)(THIS_ IEnumOleUndoUnits**) PURE;
- STDMETHOD(GetLastUndoDescription)(THIS_ BSTR*) PURE;
- STDMETHOD(GetLastRedoDescription)(THIS_ BSTR*) PURE;
- STDMETHOD(Enable)(THIS_ BOOL) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IQuickActivate;
-#define INTERFACE IQuickActivate
-DECLARE_INTERFACE_(IQuickActivate,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(QuickActivate)(THIS_ QACONTAINER*,QACONTROL*) PURE;
- STDMETHOD(SetContentExtent)(THIS_ LPSIZEL) PURE;
- STDMETHOD(GetContentExtent)(THIS_ LPSIZEL) PURE;
-};
-#undef INTERFACE
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/odbcinst.h b/winsup/w32api/include/odbcinst.h
deleted file mode 100644
index b90464f..0000000
--- a/winsup/w32api/include/odbcinst.h
+++ /dev/null
@@ -1,148 +0,0 @@
-#ifndef _ODBCINST_H
-#define _ODBCINST_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-#include <sql.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifndef ODBCVER
-#define ODBCVER 0x0351
-#endif
-#define INSTAPI __stdcall
-#define ODBC_ADD_DSN 1
-#define ODBC_CONFIG_DSN 2
-#define ODBC_REMOVE_DSN 3
-#if (ODBCVER >= 0x0250)
-#define ODBC_ADD_SYS_DSN 4
-#define ODBC_CONFIG_SYS_DSN 5
-#define ODBC_REMOVE_SYS_DSN 6
-#define ODBC_INSTALL_INQUIRY 1
-#define ODBC_INSTALL_COMPLETE 2
-#define ODBC_INSTALL_DRIVER 1
-#define ODBC_REMOVE_DRIVER 2
-#define ODBC_CONFIG_DRIVER 3
-#define ODBC_CONFIG_DRIVER_MAX 100
-#endif /* (ODBCVER >= 0x0250) */
-#if (ODBCVER >= 0x0300)
-#define ODBC_REMOVE_DEFAULT_DSN 7
-#define ODBC_BOTH_DSN 0
-#define ODBC_USER_DSN 1
-#define ODBC_SYSTEM_DSN 2
-#define ODBC_ERROR_GENERAL_ERR 1
-#define ODBC_ERROR_INVALID_BUFF_LEN 2
-#define ODBC_ERROR_INVALID_HWND 3
-#define ODBC_ERROR_INVALID_STR 4
-#define ODBC_ERROR_INVALID_REQUEST_TYPE 5
-#define ODBC_ERROR_COMPONENT_NOT_FOUND 6
-#define ODBC_ERROR_INVALID_NAME 7
-#define ODBC_ERROR_INVALID_KEYWORD_VALUE 8
-#define ODBC_ERROR_INVALID_DSN 9
-#define ODBC_ERROR_INVALID_INF 10
-#define ODBC_ERROR_REQUEST_FAILED 11
-#define ODBC_ERROR_INVALID_PATH 12
-#define ODBC_ERROR_LOAD_LIB_FAILED 13
-#define ODBC_ERROR_INVALID_PARAM_SEQUENCE 14
-#define ODBC_ERROR_INVALID_LOG_FILE 15
-#define ODBC_ERROR_USER_CANCELED 16
-#define ODBC_ERROR_USAGE_UPDATE_FAILED 17
-#define ODBC_ERROR_CREATE_DSN_FAILED 18
-#define ODBC_ERROR_WRITING_SYSINFO_FAILED 19
-#define ODBC_ERROR_REMOVE_DSN_FAILED 20
-#define ODBC_ERROR_OUT_OF_MEM 21
-#define ODBC_ERROR_OUTPUT_STRING_TRUNCATED 22
-#endif /* ODBCVER >= 0x0300 */
-
-#ifndef RC_INVOKED
-BOOL INSTAPI ConfigDSN(HWND,WORD,LPCSTR,LPCSTR);
-BOOL INSTAPI ConfigDSNW(HWND,WORD,LPCWSTR,LPCWSTR);
-BOOL INSTAPI ConfigTranslator(HWND,DWORD*);
-BOOL INSTAPI SQLConfigDataSource(HWND,WORD,LPCSTR,LPCSTR);
-BOOL INSTAPI SQLConfigDataSourceW(HWND,WORD,LPCWSTR,LPCWSTR);
-BOOL INSTAPI SQLCreateDataSource(HWND,LPCSTR);
-BOOL INSTAPI SQLCreateDataSourceW(HWND,LPCWSTR);
-BOOL INSTAPI SQLGetAvailableDrivers(LPCSTR,LPSTR,WORD,WORD*);
-BOOL INSTAPI SQLGetAvailableDriversW(LPCWSTR,LPWSTR,WORD,WORD*);
-BOOL INSTAPI SQLGetInstalledDrivers(LPSTR,WORD,WORD*);
-BOOL INSTAPI SQLGetInstalledDriversW(LPWSTR,WORD,WORD*);
-int INSTAPI SQLGetPrivateProfileString(LPCSTR,LPCSTR,LPCSTR,LPSTR,int,LPCSTR);
-int INSTAPI SQLGetPrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,int,LPCWSTR);
-BOOL INSTAPI SQLGetTranslator(HWND,LPSTR,WORD,WORD*,LPSTR,WORD,WORD*,DWORD*);
-BOOL INSTAPI SQLGetTranslatorW(HWND,LPWSTR,WORD,WORD*,LPWSTR,WORD,WORD*,DWORD*);
-BOOL INSTAPI SQLInstallDriver(LPCSTR,LPCSTR,LPSTR,WORD,WORD*);
-BOOL INSTAPI SQLInstallDriverManager(LPSTR,WORD,WORD*);
-BOOL INSTAPI SQLInstallDriverManagerW(LPWSTR,WORD,WORD*);
-BOOL INSTAPI SQLInstallDriverW(LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*);
-BOOL INSTAPI SQLInstallODBC(HWND,LPCSTR,LPCSTR,LPCSTR);
-BOOL INSTAPI SQLInstallODBCW(HWND,LPCWSTR,LPCWSTR,LPCWSTR);
-BOOL INSTAPI SQLManageDataSources(HWND);
-BOOL INSTAPI SQLRemoveDefaultDataSource(void);
-BOOL INSTAPI SQLRemoveDSNFromIni(LPCSTR);
-BOOL INSTAPI SQLRemoveDSNFromIniW(LPCWSTR);
-BOOL INSTAPI SQLValidDSN(LPCSTR);
-BOOL INSTAPI SQLValidDSNW(LPCWSTR);
-BOOL INSTAPI SQLWriteDSNToIni(LPCSTR,LPCSTR);
-BOOL INSTAPI SQLWriteDSNToIniW(LPCWSTR,LPCWSTR);
-BOOL INSTAPI SQLWritePrivateProfileString(LPCSTR,LPCSTR,LPCSTR,LPCSTR);
-BOOL INSTAPI SQLWritePrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
-#if(ODBCVER >= 0x0250)
-BOOL INSTAPI ConfigDriver(HWND,WORD,LPCSTR,LPCSTR,LPSTR,WORD,WORD*);
-BOOL INSTAPI ConfigDriverW(HWND,WORD,LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*);
-BOOL INSTAPI SQLConfigDriver(HWND,WORD,LPCSTR,LPCSTR,LPSTR,WORD,WORD*);
-BOOL INSTAPI SQLConfigDriverW(HWND,WORD,LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*);
-BOOL INSTAPI SQLInstallTranslator(LPCSTR,LPCSTR,LPCSTR,LPSTR,WORD,WORD*,WORD,LPDWORD);
-BOOL INSTAPI SQLInstallTranslatorW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*,WORD,LPDWORD);
-BOOL INSTAPI SQLRemoveDriver(LPCSTR,BOOL,LPDWORD);
-BOOL INSTAPI SQLRemoveDriverManager(LPDWORD);
-BOOL INSTAPI SQLRemoveDriverW(LPCWSTR,BOOL,LPDWORD);
-BOOL INSTAPI SQLRemoveTranslator(LPCSTR,LPDWORD);
-BOOL INSTAPI SQLRemoveTranslatorW(LPCWSTR,LPDWORD);
-#endif /* ODBCVER >= 0x0250 */
-#if (ODBCVER >= 0x0300)
-BOOL INSTAPI SQLGetConfigMode(UWORD*);
-BOOL INSTAPI SQLInstallDriverEx(LPCSTR,LPCSTR,LPSTR,WORD,WORD*,WORD,LPDWORD);
-BOOL INSTAPI SQLInstallDriverExW(LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*,WORD,LPDWORD);
-SQLRETURN INSTAPI SQLInstallerError(WORD,DWORD*,LPSTR,WORD,WORD*);
-SQLRETURN INSTAPI SQLInstallerErrorW(WORD,DWORD*,LPWSTR,WORD,WORD*);
-BOOL INSTAPI SQLInstallTranslatorEx(LPCSTR,LPCSTR,LPSTR,WORD,WORD*,WORD,LPDWORD);
-BOOL INSTAPI SQLInstallTranslatorExW(LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*,WORD,LPDWORD);
-SQLRETURN INSTAPI SQLPostInstallerError(DWORD,LPCSTR);
-SQLRETURN INSTAPI SQLPostInstallerErrorW(DWORD,LPCWSTR);
-BOOL INSTAPI SQLReadFileDSN(LPCSTR,LPCSTR,LPCSTR,LPSTR,WORD,WORD*);
-BOOL INSTAPI SQLReadFileDSNW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,WORD,WORD*);
-BOOL INSTAPI SQLSetConfigMode(UWORD);
-BOOL INSTAPI SQLWriteFileDSN(LPCSTR,LPCSTR,LPCSTR,LPCSTR);
-BOOL INSTAPI SQLWriteFileDSNW(LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
-#endif /* ODBCVER >= 0x0300 */
-
-#if defined (UNICODE) && !defined (SQL_NOUNICODEMAP)
-#define SQLConfigDataSource SQLConfigDataSourceW
-#define SQLConfigDriver SQLConfigDriverW
-#define SQLCreateDataSource SQLCreateDataSourceW
-#define SQLGetAvailableDrivers SQLGetAvailableDriversW
-#define SQLGetInstalledDrivers SQLGetInstalledDriversW
-#define SQLGetPrivateProfileString SQLGetPrivateProfileStringW
-#define SQLGetTranslator SQLGetTranslatorW
-#define SQLInstallDriver SQLInstallDriverW
-#define SQLInstallDriverEx SQLInstallDriverExW
-#define SQLInstallDriverManager SQLInstallDriverManagerW
-#define SQLInstallerError SQLInstallerErrorW
-#define SQLInstallODBC SQLInstallODBCW
-#define SQLInstallTranslator SQLInstallTranslatorW
-#define SQLInstallTranslatorEx SQLInstallTranslatorExW
-#define SQLPostInstallerError SQLPostInstallerErrorW
-#define SQLReadFileDSN SQLReadFileDSNW
-#define SQLRemoveDriver SQLRemoveDriverW
-#define SQLRemoveDSNFromIni SQLRemoveDSNFromIniW
-#define SQLRemoveTranslator SQLRemoveTranslatorW
-#define SQLValidDSN SQLValidDSNW
-#define SQLWriteDSNToIni SQLWriteDSNToIniW
-#define SQLWriteFileDSN SQLWriteFileDSNW
-#define SQLWritePrivateProfileString SQLWritePrivateProfileStringW
-#endif /* UNICODE && !SQL_NOUNICODEMAP */
-#endif /* RC_INVOKED */
-#ifdef __cplusplus
-}
-#endif
-#endif /* _ODBCINST_H */
diff --git a/winsup/w32api/include/ole.h b/winsup/w32api/include/ole.h
deleted file mode 100644
index d2dd202..0000000
--- a/winsup/w32api/include/ole.h
+++ /dev/null
@@ -1,308 +0,0 @@
-#ifndef _OLE_H
-#define _OLE_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef STRICT
-#define OLE_LPCSTR LPCSTR
-#define OLE_CONST const
-#else
-#define OLE_LPCSTR LPSTR
-#define OLE_CONST
-#endif
-#define LRESULT LONG
-#define HGLOBAL HANDLE
-#define OT_LINK 1L
-#define OT_EMBEDDED 2L
-#define OT_STATIC 3L
-#define OLEVERB_PRIMARY 0
-#define OF_SET 1
-#define OF_GET 2
-#define OF_HANDLER 4
-
-typedef struct _OLETARGETDEVICE {
- USHORT otdDeviceNameOffset;
- USHORT otdDriverNameOffset;
- USHORT otdPortNameOffset;
- USHORT otdExtDevmodeOffset;
- USHORT otdExtDevmodeSize;
- USHORT otdEnvironmentOffset;
- USHORT otdEnvironmentSize;
- BYTE otdData[1];
-} OLETARGETDEVICE;
-typedef OLETARGETDEVICE *LPOLETARGETDEVICE;
-typedef enum {
-OLE_OK,
-OLE_WAIT_FOR_RELEASE,
-OLE_BUSY,
-OLE_ERROR_PROTECT_ONLY,
-OLE_ERROR_MEMORY,
-OLE_ERROR_STREAM,
-OLE_ERROR_STATIC,
-OLE_ERROR_BLANK,
-OLE_ERROR_DRAW,
-OLE_ERROR_METAFILE,
-OLE_ERROR_ABORT,
-OLE_ERROR_CLIPBOARD,
-OLE_ERROR_FORMAT,
-OLE_ERROR_OBJECT,
-OLE_ERROR_OPTION,
-OLE_ERROR_PROTOCOL,
-OLE_ERROR_ADDRESS,
-OLE_ERROR_NOT_EQUAL,
-OLE_ERROR_HANDLE,
-OLE_ERROR_GENERIC,
-OLE_ERROR_CLASS,
-OLE_ERROR_SYNTAX,
-OLE_ERROR_DATATYPE,
-OLE_ERROR_PALETTE,
-OLE_ERROR_NOT_LINK,
-OLE_ERROR_NOT_EMPTY,
-OLE_ERROR_SIZE,
-OLE_ERROR_DRIVE,
-OLE_ERROR_NETWORK,
-OLE_ERROR_NAME,
-OLE_ERROR_TEMPLATE,
-OLE_ERROR_NEW,
-OLE_ERROR_EDIT,
-OLE_ERROR_OPEN,
-OLE_ERROR_NOT_OPEN,
-OLE_ERROR_LAUNCH,
-OLE_ERROR_COMM,
-OLE_ERROR_TERMINATE,
-OLE_ERROR_COMMAND,
-OLE_ERROR_SHOW,
-OLE_ERROR_DOVERB,
-OLE_ERROR_ADVISE_NATIVE,
-OLE_ERROR_ADVISE_PICT,
-OLE_ERROR_ADVISE_RENAME,
-OLE_ERROR_POKE_NATIVE,
-OLE_ERROR_REQUEST_NATIVE,
-OLE_ERROR_REQUEST_PICT,
-OLE_ERROR_SERVER_BLOCKED,
-OLE_ERROR_REGISTRATION,
-OLE_ERROR_ALREADY_REGISTERED,
-OLE_ERROR_TASK,
-OLE_ERROR_OUTOFDATE,
-OLE_ERROR_CANT_UPDATE_CLIENT,
-OLE_ERROR_UPDATE,
-OLE_ERROR_SETDATA_FORMAT,
-OLE_ERROR_STATIC_FROM_OTHER_OS,
-OLE_ERROR_FILE_VER,
-OLE_WARN_DELETE_DATA = 1000
-} OLESTATUS;
-typedef enum {
- OLE_CHANGED,
- OLE_SAVED,
- OLE_CLOSED,
- OLE_RENAMED,
- OLE_QUERY_PAINT,
- OLE_RELEASE,
- OLE_QUERY_RETRY
-} OLE_NOTIFICATION;
-typedef enum {
- OLE_NONE,
- OLE_DELETE,
- OLE_LNKPASTE,
- OLE_EMBPASTE,
- OLE_SHOW,
- OLE_RUN,
- OLE_ACTIVATE,
- OLE_UPDATE,
- OLE_CLOSE,
- OLE_RECONNECT,
- OLE_SETUPDATEOPTIONS,
- OLE_SERVERUNLAUNCH,
- OLE_LOADFROMSTREAM,
- OLE_SETDATA,
- OLE_REQUESTDATA,
- OLE_OTHER,
- OLE_CREATE,
- OLE_CREATEFROMTEMPLATE,
- OLE_CREATELINKFROMFILE,
- OLE_COPYFROMLNK,
- OLE_CREATEFROMFILE,
- OLE_CREATEINVISIBLE
-} OLE_RELEASE_METHOD;
-typedef enum {
- olerender_none,
- olerender_draw,
- olerender_format
- } OLEOPT_RENDER;
-typedef WORD OLECLIPFORMAT;
-typedef enum {
- oleupdate_always,
- oleupdate_onsave,
-#ifdef OLE_INTERNAL
- oleupdate_oncall,
- oleupdate_onclose
-#else
- oleupdate_oncall
-#endif
-} OLEOPT_UPDATE;
-typedef HANDLE HOBJECT;
-typedef LONG LHSERVER;
-typedef LONG LHCLIENTDOC;
-typedef LONG LHSERVERDOC;
-typedef struct _OLEOBJECT *LPOLEOBJECT;
-typedef struct _OLESTREAM *LPOLESTREAM;
-typedef struct _OLECLIENT *LPOLECLIENT;
-typedef struct _OLEOBJECTVTBL {
- void *(CALLBACK* QueryProtocol)(LPOLEOBJECT,OLE_LPCSTR);
- OLESTATUS (CALLBACK* Release)(LPOLEOBJECT);
- OLESTATUS (CALLBACK* Show)(LPOLEOBJECT,BOOL);
- OLESTATUS (CALLBACK* DoVerb)(LPOLEOBJECT,UINT,BOOL,BOOL);
- OLESTATUS (CALLBACK* GetData)(LPOLEOBJECT,OLECLIPFORMAT,HANDLE*);
- OLESTATUS (CALLBACK* SetData)(LPOLEOBJECT,OLECLIPFORMAT,HANDLE);
- OLESTATUS (CALLBACK* SetTargetDevice)(LPOLEOBJECT,HGLOBAL);
- OLESTATUS (CALLBACK* SetBounds)(LPOLEOBJECT,OLE_CONST RECT*);
- OLECLIPFORMAT (CALLBACK* EnumFormats)(LPOLEOBJECT,OLECLIPFORMAT);
- OLESTATUS (CALLBACK* SetColorScheme)(LPOLEOBJECT,OLE_CONST LOGPALETTE*);
-#ifndef SERVERONLY
- OLESTATUS (CALLBACK* Delete)(LPOLEOBJECT);
- OLESTATUS (CALLBACK* SetHostNames)(LPOLEOBJECT,OLE_LPCSTR,OLE_LPCSTR);
- OLESTATUS (CALLBACK* SaveToStream)(LPOLEOBJECT,LPOLESTREAM);
- OLESTATUS (CALLBACK* Clone)(LPOLEOBJECT,LPOLECLIENT,LHCLIENTDOC,OLE_LPCSTR,LPOLEOBJECT*);
- OLESTATUS (CALLBACK* CopyFromLink)(LPOLEOBJECT,LPOLECLIENT,LHCLIENTDOC,OLE_LPCSTR,LPOLEOBJECT*);
- OLESTATUS (CALLBACK* Equal)(LPOLEOBJECT,LPOLEOBJECT);
- OLESTATUS (CALLBACK* CopyToClipboard)(LPOLEOBJECT);
- OLESTATUS (CALLBACK* Draw)(LPOLEOBJECT,HDC,OLE_CONST RECT*,OLE_CONST RECT*,HDC);
- OLESTATUS (CALLBACK* Activate)(LPOLEOBJECT,UINT,BOOL,BOOL,HWND,OLE_CONST RECT*);
- OLESTATUS (CALLBACK* Execute)(LPOLEOBJECT,HGLOBAL,UINT);
- OLESTATUS (CALLBACK* Close)(LPOLEOBJECT);
- OLESTATUS (CALLBACK* Update)(LPOLEOBJECT);
- OLESTATUS (CALLBACK* Reconnect)(LPOLEOBJECT);
- OLESTATUS (CALLBACK* ObjectConvert)(LPOLEOBJECT,OLE_LPCSTR,LPOLECLIENT,LHCLIENTDOC,OLE_LPCSTR,LPOLEOBJECT*);
- OLESTATUS (CALLBACK* GetLinkUpdateOptions)(LPOLEOBJECT,OLEOPT_UPDATE*);
- OLESTATUS (CALLBACK* SetLinkUpdateOptions)(LPOLEOBJECT,OLEOPT_UPDATE);
- OLESTATUS (CALLBACK* Rename)(LPOLEOBJECT,OLE_LPCSTR);
- OLESTATUS (CALLBACK* QueryName)(LPOLEOBJECT,LPSTR,UINT*);
- OLESTATUS (CALLBACK* QueryType)(LPOLEOBJECT,LONG*);
- OLESTATUS (CALLBACK* QueryBounds)(LPOLEOBJECT,RECT*);
- OLESTATUS (CALLBACK* QuerySize)(LPOLEOBJECT,DWORD*);
- OLESTATUS (CALLBACK* QueryOpen)(LPOLEOBJECT);
- OLESTATUS (CALLBACK* QueryOutOfDate)(LPOLEOBJECT);
- OLESTATUS (CALLBACK* QueryReleaseStatus)(LPOLEOBJECT);
- OLESTATUS (CALLBACK* QueryReleaseError)(LPOLEOBJECT);
- OLE_RELEASE_METHOD (CALLBACK* QueryReleaseMethod)(LPOLEOBJECT);
- OLESTATUS (CALLBACK* RequestData)(LPOLEOBJECT,OLECLIPFORMAT);
- OLESTATUS (CALLBACK* ObjectLong)(LPOLEOBJECT,UINT,LONG*);
- OLESTATUS (CALLBACK* ChangeData)(LPOLEOBJECT,HANDLE,LPOLECLIENT,BOOL);
-#endif
-} OLEOBJECTVTBL;
-typedef OLEOBJECTVTBL*LPOLEOBJECTVTBL;
-#ifndef OLE_INTERNAL
-typedef struct _OLEOBJECT { LPOLEOBJECTVTBL lpvtbl; } OLEOBJECT;
-#endif
-typedef struct _OLECLIENTVTBL { int (CALLBACK* CallBack)(LPOLECLIENT,OLE_NOTIFICATION,LPOLEOBJECT); } OLECLIENTVTBL;
-typedef OLECLIENTVTBL *LPOLECLIENTVTBL;
-typedef struct _OLECLIENT { LPOLECLIENTVTBL lpvtbl; } OLECLIENT;
-typedef struct _OLESTREAMVTBL {
- DWORD (CALLBACK* Get)(LPOLESTREAM,void*,DWORD);
- DWORD (CALLBACK* Put)(LPOLESTREAM,OLE_CONST void*,DWORD);
-} OLESTREAMVTBL;
-typedef OLESTREAMVTBL *LPOLESTREAMVTBL;
-typedef struct _OLESTREAM { LPOLESTREAMVTBL lpstbl; } OLESTREAM;
-typedef enum {
- OLE_SERVER_MULTI,
- OLE_SERVER_SINGLE
-} OLE_SERVER_USE;
-typedef struct _OLESERVER *LPOLESERVER;
-typedef struct _OLESERVERDOC *LPOLESERVERDOC;
-typedef struct _OLESERVERVTBL {
- OLESTATUS (CALLBACK* Open)(LPOLESERVER,LHSERVERDOC,OLE_LPCSTR,LPOLESERVERDOC*);
- OLESTATUS (CALLBACK* Create)(LPOLESERVER,LHSERVERDOC,OLE_LPCSTR,OLE_LPCSTR,LPOLESERVERDOC*);
- OLESTATUS (CALLBACK* CreateFromTemplate)(LPOLESERVER,LHSERVERDOC,OLE_LPCSTR,OLE_LPCSTR,OLE_LPCSTR,LPOLESERVERDOC*);
- OLESTATUS (CALLBACK* Edit)(LPOLESERVER,LHSERVERDOC,OLE_LPCSTR,OLE_LPCSTR,LPOLESERVERDOC*);
- OLESTATUS (CALLBACK* Exit)(LPOLESERVER);
- OLESTATUS (CALLBACK* Release)(LPOLESERVER);
- OLESTATUS (CALLBACK* Execute)(LPOLESERVER,HGLOBAL);
-} OLESERVERVTBL;
-typedef OLESERVERVTBL *LPOLESERVERVTBL;
-typedef struct _OLESERVER { LPOLESERVERVTBL lpvtbl; } OLESERVER;
-typedef struct _OLESERVERDOCVTBL {
- OLESTATUS (CALLBACK* Save)(LPOLESERVERDOC);
- OLESTATUS (CALLBACK* Close)(LPOLESERVERDOC);
- OLESTATUS (CALLBACK* SetHostNames)(LPOLESERVERDOC,OLE_LPCSTR,OLE_LPCSTR);
- OLESTATUS (CALLBACK* SetDocDimensions)(LPOLESERVERDOC,OLE_CONST RECT*);
- OLESTATUS (CALLBACK* GetObject)(LPOLESERVERDOC,OLE_LPCSTR,LPOLEOBJECT*,LPOLECLIENT);
- OLESTATUS (CALLBACK* Release)(LPOLESERVERDOC);
- OLESTATUS (CALLBACK* SetColorScheme)(LPOLESERVERDOC,OLE_CONST LOGPALETTE*);
- OLESTATUS (CALLBACK* Execute)(LPOLESERVERDOC,HGLOBAL);
-} OLESERVERDOCVTBL;
-typedef OLESERVERDOCVTBL *LPOLESERVERDOCVTBL;
-typedef struct _OLESERVERDOC { LPOLESERVERDOCVTBL lpvtbl; } OLESERVERDOC;
-OLESTATUS WINAPI OleDelete(LPOLEOBJECT);
-OLESTATUS WINAPI OleRelease(LPOLEOBJECT);
-OLESTATUS WINAPI OleSaveToStream(LPOLEOBJECT,LPOLESTREAM);
-OLESTATUS WINAPI OleEqual(LPOLEOBJECT,LPOLEOBJECT );
-OLESTATUS WINAPI OleCopyToClipboard(LPOLEOBJECT);
-OLESTATUS WINAPI OleSetHostNames(LPOLEOBJECT,LPCSTR,LPCSTR);
-OLESTATUS WINAPI OleSetTargetDevice(LPOLEOBJECT,HGLOBAL);
-OLESTATUS WINAPI OleSetBounds(LPOLEOBJECT,LPCRECT);
-OLESTATUS WINAPI OleSetColorScheme(LPOLEOBJECT,const LOGPALETTE*);
-OLESTATUS WINAPI OleQueryBounds(LPOLEOBJECT,RECT*);
-OLESTATUS WINAPI OleQuerySize(LPOLEOBJECT,DWORD*);
-OLESTATUS WINAPI OleDraw(LPOLEOBJECT,HDC,LPCRECT,LPCRECT,HDC);
-OLESTATUS WINAPI OleQueryOpen(LPOLEOBJECT);
-OLESTATUS WINAPI OleActivate(LPOLEOBJECT,UINT,BOOL,BOOL,HWND,LPCRECT);
-OLESTATUS WINAPI OleExecute(LPOLEOBJECT,HGLOBAL,UINT);
-OLESTATUS WINAPI OleClose(LPOLEOBJECT);
-OLESTATUS WINAPI OleUpdate(LPOLEOBJECT);
-OLESTATUS WINAPI OleReconnect(LPOLEOBJECT);
-OLESTATUS WINAPI OleGetLinkUpdateOptions(LPOLEOBJECT,OLEOPT_UPDATE*);
-OLESTATUS WINAPI OleSetLinkUpdateOptions(LPOLEOBJECT,OLEOPT_UPDATE);
-WINAPI void *OleQueryProtocol(LPOLEOBJECT,LPCSTR);
-OLESTATUS WINAPI OleQueryReleaseStatus(LPOLEOBJECT);
-OLESTATUS WINAPI OleQueryReleaseError(LPOLEOBJECT);
-OLE_RELEASE_METHOD WINAPI OleQueryReleaseMethod(LPOLEOBJECT);
-OLESTATUS WINAPI OleQueryType(LPOLEOBJECT,LONG*);
-DWORD WINAPI OleQueryClientVersion(void);
-DWORD WINAPI OleQueryServerVersion(void);
-OLECLIPFORMAT WINAPI OleEnumFormats(LPOLEOBJECT,OLECLIPFORMAT);
-OLESTATUS WINAPI OleGetData(LPOLEOBJECT,OLECLIPFORMAT,HANDLE*);
-OLESTATUS WINAPI OleSetData(LPOLEOBJECT,OLECLIPFORMAT,HANDLE);
-OLESTATUS WINAPI OleQueryOutOfDate(LPOLEOBJECT);
-OLESTATUS WINAPI OleRequestData(LPOLEOBJECT,OLECLIPFORMAT);
-OLESTATUS WINAPI OleQueryLinkFromClip(LPCSTR,OLEOPT_RENDER,OLECLIPFORMAT);
-OLESTATUS WINAPI OleQueryCreateFromClip(LPCSTR,OLEOPT_RENDER,OLECLIPFORMAT);
-OLESTATUS WINAPI OleCreateFromClip(LPCSTR,LPOLECLIENT,LHCLIENTDOC,LPCSTR,LPOLEOBJECT*,OLEOPT_RENDER,OLECLIPFORMAT);
-OLESTATUS WINAPI OleCreateLinkFromClip(LPCSTR,LPOLECLIENT,LHCLIENTDOC,LPCSTR,LPOLEOBJECT*,OLEOPT_RENDER,OLECLIPFORMAT);
-OLESTATUS WINAPI OleCreateFromFile(LPCSTR,LPOLECLIENT,LPCSTR,LPCSTR,LHCLIENTDOC,LPCSTR,LPOLEOBJECT*,OLEOPT_RENDER,OLECLIPFORMAT);
-OLESTATUS WINAPI OleCreateLinkFromFile(LPCSTR,LPOLECLIENT,LPCSTR,LPCSTR,LPCSTR,LHCLIENTDOC,LPCSTR,LPOLEOBJECT*,OLEOPT_RENDER,OLECLIPFORMAT);
-OLESTATUS WINAPI OleLoadFromStream(LPOLESTREAM,LPCSTR,LPOLECLIENT,LHCLIENTDOC,LPCSTR,LPOLEOBJECT*);
-OLESTATUS WINAPI OleCreate(LPCSTR,LPOLECLIENT,LPCSTR,LHCLIENTDOC,LPCSTR,LPOLEOBJECT*,OLEOPT_RENDER,OLECLIPFORMAT);
-OLESTATUS WINAPI OleCreateInvisible(LPCSTR,LPOLECLIENT,LPCSTR,LHCLIENTDOC,LPCSTR,LPOLEOBJECT*,OLEOPT_RENDER,OLECLIPFORMAT,BOOL);
-OLESTATUS WINAPI OleCreateFromTemplate(LPCSTR,LPOLECLIENT,LPCSTR,LHCLIENTDOC,LPCSTR,LPOLEOBJECT*,OLEOPT_RENDER,OLECLIPFORMAT);
-OLESTATUS WINAPI OleClone(LPOLEOBJECT,LPOLECLIENT,LHCLIENTDOC,LPCSTR,LPOLEOBJECT*);
-OLESTATUS WINAPI OleCopyFromLink(LPOLEOBJECT,LPCSTR,LPOLECLIENT,LHCLIENTDOC,LPCSTR,LPOLEOBJECT*);
-OLESTATUS WINAPI OleObjectConvert(LPOLEOBJECT,LPCSTR,LPOLECLIENT,LHCLIENTDOC,LPCSTR,LPOLEOBJECT*);
-OLESTATUS WINAPI OleRename(LPOLEOBJECT,LPCSTR);
-OLESTATUS WINAPI OleQueryName(LPOLEOBJECT,LPSTR,UINT*);
-OLESTATUS WINAPI OleRevokeObject(LPOLECLIENT);
-BOOL WINAPI OleIsDcMeta(HDC);
-OLESTATUS WINAPI OleRegisterClientDoc(LPCSTR,LPCSTR,LONG,LHCLIENTDOC*);
-OLESTATUS WINAPI OleRevokeClientDoc(LHCLIENTDOC);
-OLESTATUS WINAPI OleRenameClientDoc(LHCLIENTDOC,LPCSTR);
-OLESTATUS WINAPI OleRevertClientDoc(LHCLIENTDOC);
-OLESTATUS WINAPI OleSavedClientDoc(LHCLIENTDOC);
-OLESTATUS WINAPI OleEnumObjects(LHCLIENTDOC,LPOLEOBJECT*);
-OLESTATUS WINAPI OleRegisterServer(LPCSTR,LPOLESERVER,LHSERVER*,HINSTANCE,OLE_SERVER_USE);
-OLESTATUS WINAPI OleRevokeServer(LHSERVER);
-OLESTATUS WINAPI OleBlockServer(LHSERVER);
-OLESTATUS WINAPI OleUnblockServer(LHSERVER,BOOL*);
-OLESTATUS WINAPI OleLockServer(LPOLEOBJECT,LHSERVER*);
-OLESTATUS WINAPI OleUnlockServer(LHSERVER);
-OLESTATUS WINAPI OleRegisterServerDoc(LHSERVER,LPCSTR,LPOLESERVERDOC,LHSERVERDOC*);
-OLESTATUS WINAPI OleRevokeServerDoc(LHSERVERDOC);
-OLESTATUS WINAPI OleRenameServerDoc(LHSERVERDOC,LPCSTR);
-OLESTATUS WINAPI OleRevertServerDoc(LHSERVERDOC);
-OLESTATUS WINAPI OleSavedServerDoc(LHSERVERDOC);
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/ole2.h b/winsup/w32api/include/ole2.h
deleted file mode 100644
index c80a9a9..0000000
--- a/winsup/w32api/include/ole2.h
+++ /dev/null
@@ -1,110 +0,0 @@
-#ifndef _OLE2_H
-#define _OLE2_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#pragma pack(push,8)
-#include <winerror.h>
-#include <objbase.h>
-#include <olectlid.h>
-#include <oleauto.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define E_DRAW VIEW_E_DRAW
-#define DATA_E_FORMATETC DV_E_FORMATETC
-#define OLEIVERB_PRIMARY (0L)
-#define OLEIVERB_SHOW (-1L)
-#define OLEIVERB_OPEN (-2L)
-#define OLEIVERB_HIDE (-3L)
-#define OLEIVERB_UIACTIVATE (-4L)
-#define OLEIVERB_INPLACEACTIVATE (-5L)
-#define OLEIVERB_DISCARDUNDOSTATE (-6L)
-#define EMBDHLP_INPROC_HANDLER 0x0000L
-#define EMBDHLP_INPROC_SERVER 0x0001L
-#define EMBDHLP_CREATENOW 0x00000000L
-#define EMBDHLP_DELAYCREATE 0x00010000L
-#include <oleidl.h>
-
-typedef struct _OLESTREAMVTBL *LPOLESTREAMVTBL;
-typedef struct _OLESTREAM {
- LPOLESTREAMVTBL lpstbl;
-} OLESTREAM,*LPOLESTREAM;
-typedef struct _OLESTREAMVTBL {
- DWORD (CALLBACK* Get)(LPOLESTREAM,void*,DWORD);
- DWORD (CALLBACK* Put)(LPOLESTREAM,const void*,DWORD);
-} OLESTREAMVTBL;
-
-WINOLEAPI CreateDataAdviseHolder(LPDATAADVISEHOLDER*);
-WINOLEAPI_(DWORD) OleBuildVersion(void);
-WINOLEAPI ReadClassStg(LPSTORAGE,CLSID*);
-WINOLEAPI WriteClassStg(LPSTORAGE,REFCLSID);
-WINOLEAPI ReadClassStm(LPSTREAM,CLSID*);
-WINOLEAPI WriteClassStm(LPSTREAM,REFCLSID);
-WINOLEAPI WriteFmtUserTypeStg(LPSTORAGE,CLIPFORMAT,LPOLESTR);
-WINOLEAPI ReadFmtUserTypeStg(LPSTORAGE,CLIPFORMAT*,LPOLESTR*);
-WINOLEAPI OleInitialize(PVOID);
-WINOLEAPI_(void) OleUninitialize(void);
-WINOLEAPI OleQueryLinkFromData(LPDATAOBJECT);
-WINOLEAPI OleQueryCreateFromData(LPDATAOBJECT);
-WINOLEAPI OleCreate(REFCLSID,REFIID,DWORD,LPFORMATETC,LPOLECLIENTSITE,LPSTORAGE,PVOID*);
-WINOLEAPI OleCreateFromData(LPDATAOBJECT,REFIID,DWORD,LPFORMATETC,LPOLECLIENTSITE,LPSTORAGE,PVOID*);
-WINOLEAPI OleCreateLinkFromData(LPDATAOBJECT,REFIID,DWORD,LPFORMATETC,LPOLECLIENTSITE,LPSTORAGE,PVOID*);
-WINOLEAPI OleCreateStaticFromData(LPDATAOBJECT,REFIID,DWORD,LPFORMATETC,LPOLECLIENTSITE,LPSTORAGE,PVOID*);
-WINOLEAPI OleCreateLink(LPMONIKER,REFIID,DWORD,LPFORMATETC,LPOLECLIENTSITE,LPSTORAGE,PVOID*);
-WINOLEAPI OleCreateLinkToFile(LPCOLESTR,REFIID,DWORD,LPFORMATETC,LPOLECLIENTSITE,LPSTORAGE,PVOID*);
-WINOLEAPI OleCreateFromFile(REFCLSID,LPCOLESTR,REFIID,DWORD,LPFORMATETC,LPOLECLIENTSITE,LPSTORAGE,PVOID*);
-WINOLEAPI OleLoad(LPSTORAGE,REFIID,LPOLECLIENTSITE,PVOID*);
-WINOLEAPI OleSave(LPPERSISTSTORAGE,LPSTORAGE,BOOL);
-WINOLEAPI OleLoadFromStream(LPSTREAM,REFIID,PVOID*);
-WINOLEAPI OleSaveToStream(LPPERSISTSTREAM,LPSTREAM);
-WINOLEAPI OleSetContainedObject(LPUNKNOWN,BOOL);
-WINOLEAPI OleNoteObjectVisible(LPUNKNOWN,BOOL);
-WINOLEAPI RegisterDragDrop(HWND,LPDROPTARGET);
-WINOLEAPI RevokeDragDrop(HWND);
-WINOLEAPI DoDragDrop(LPDATAOBJECT,LPDROPSOURCE,DWORD,PDWORD);
-WINOLEAPI OleSetClipboard(LPDATAOBJECT);
-WINOLEAPI OleGetClipboard(LPDATAOBJECT*);
-WINOLEAPI OleFlushClipboard(void);
-WINOLEAPI OleIsCurrentClipboard(LPDATAOBJECT);
-WINOLEAPI_(HOLEMENU) OleCreateMenuDescriptor(HMENU,LPOLEMENUGROUPWIDTHS);
-WINOLEAPI OleSetMenuDescriptor(HOLEMENU,HWND,HWND,LPOLEINPLACEFRAME,LPOLEINPLACEACTIVEOBJECT);
-WINOLEAPI OleDestroyMenuDescriptor(HOLEMENU);
-WINOLEAPI OleTranslateAccelerator(LPOLEINPLACEFRAME,LPOLEINPLACEFRAMEINFO,LPMSG);
-WINOLEAPI_(HANDLE) OleDuplicateData(HANDLE,CLIPFORMAT,UINT);
-WINOLEAPI OleDraw(LPUNKNOWN,DWORD,HDC,LPCRECT);
-WINOLEAPI OleRun(LPUNKNOWN);
-WINOLEAPI_(BOOL) OleIsRunning(LPOLEOBJECT);
-WINOLEAPI OleLockRunning(LPUNKNOWN,BOOL,BOOL);
-WINOLEAPI_(void) ReleaseStgMedium(LPSTGMEDIUM);
-WINOLEAPI CreateOleAdviseHolder(LPOLEADVISEHOLDER*);
-WINOLEAPI OleCreateDefaultHandler(REFCLSID,LPUNKNOWN,REFIID,PVOID*);
-WINOLEAPI OleCreateEmbeddingHelper(REFCLSID,LPUNKNOWN,DWORD,LPCLASSFACTORY,REFIID,PVOID*);
-WINOLEAPI_(BOOL) IsAccelerator(HACCEL,int,LPMSG,WORD*);
-WINOLEAPI_(HGLOBAL) OleGetIconOfFile(LPOLESTR,BOOL);
-WINOLEAPI_(HGLOBAL) OleGetIconOfClass(REFCLSID,LPOLESTR,BOOL);
-WINOLEAPI_(HGLOBAL) OleMetafilePictFromIconAndLabel(HICON,LPOLESTR,LPOLESTR,UINT);
-WINOLEAPI OleRegGetUserType(REFCLSID,DWORD,LPOLESTR*);
-WINOLEAPI OleRegGetMiscStatus(REFCLSID,DWORD,DWORD*);
-WINOLEAPI OleRegEnumFormatEtc (REFCLSID,DWORD,LPENUMFORMATETC*);
-WINOLEAPI OleRegEnumVerbs (REFCLSID,LPENUMOLEVERB*);
-WINOLEAPI OleConvertOLESTREAMToIStorage(LPOLESTREAM,LPSTORAGE,const DVTARGETDEVICE*);
-WINOLEAPI OleConvertIStorageToOLESTREAM(LPSTORAGE,LPOLESTREAM);
-WINOLEAPI GetHGlobalFromILockBytes(LPLOCKBYTES,HGLOBAL*);
-WINOLEAPI CreateILockBytesOnHGlobal(HGLOBAL,BOOL,LPLOCKBYTES*);
-WINOLEAPI GetHGlobalFromStream(LPSTREAM,HGLOBAL*);
-WINOLEAPI CreateStreamOnHGlobal(HGLOBAL,BOOL,LPSTREAM*);
-WINOLEAPI OleDoAutoConvert(LPSTORAGE,LPCLSID);
-WINOLEAPI OleGetAutoConvert(REFCLSID,LPCLSID);
-WINOLEAPI OleSetAutoConvert(REFCLSID,REFCLSID);
-WINOLEAPI GetConvertStg(LPSTORAGE);
-WINOLEAPI SetConvertStg(LPSTORAGE,BOOL);
-WINOLEAPI OleConvertIStorageToOLESTREAMEx(LPSTORAGE,CLIPFORMAT,LONG,LONG,DWORD,LPSTGMEDIUM,LPOLESTREAM);
-WINOLEAPI OleConvertOLESTREAMToIStorageEx(LPOLESTREAM,LPSTORAGE,CLIPFORMAT*,LONG*,LONG*,DWORD*,LPSTGMEDIUM);
-#ifdef __cplusplus
-}
-#endif
-#pragma pack(pop)
-#endif
diff --git a/winsup/w32api/include/ole2ver.h b/winsup/w32api/include/ole2ver.h
deleted file mode 100644
index 667003a..0000000
--- a/winsup/w32api/include/ole2ver.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef _OLE2VER_H
-#define _OLE2VER_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-#define rmm 23
-#define rup 639
-#endif
diff --git a/winsup/w32api/include/oleacc.h b/winsup/w32api/include/oleacc.h
deleted file mode 100644
index c1a2825..0000000
--- a/winsup/w32api/include/oleacc.h
+++ /dev/null
@@ -1,219 +0,0 @@
-#ifndef _OLEACC_H
-#define _OLEACC_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define DISPID_ACC_PARENT (-5000)
-#define DISPID_ACC_CHILDCOUNT (-5001)
-#define DISPID_ACC_CHILD (-5002)
-
-#define DISPID_ACC_NAME (-5003)
-#define DISPID_ACC_VALUE (-5004)
-#define DISPID_ACC_DESCRIPTION (-5005)
-#define DISPID_ACC_ROLE (-5006)
-#define DISPID_ACC_STATE (-5007)
-#define DISPID_ACC_HELP (-5008)
-#define DISPID_ACC_HELPTOPIC (-5009)
-#define DISPID_ACC_KEYBOARDSHORTCUT (-5010)
-#define DISPID_ACC_FOCUS (-5011)
-#define DISPID_ACC_SELECTION (-5012)
-#define DISPID_ACC_DEFAULTACTION (-5013)
-
-#define DISPID_ACC_SELECT (-5014)
-#define DISPID_ACC_LOCATION (-5015)
-#define DISPID_ACC_NAVIGATE (-5016)
-#define DISPID_ACC_HITTEST (-5017)
-#define DISPID_ACC_DODEFAULTACTION (-5018)
-
-#define NAVDIR_DOWN 2
-#define NAVDIR_FIRSTCHILD 7
-#define NAVDIR_LASTCHILD 8
-#define NAVDIR_LEFT 3
-#define NAVDIR_NEXT 5
-#define NAVDIR_PREVIOUS 6
-#define NAVDIR_RIGHT 4
-#define NAVDIR_UP 1
-
-#define ROLE_SYSTEM_ALERT 8
-#define ROLE_SYSTEM_ANIMATION 54
-#define ROLE_SYSTEM_APPLICATION 14
-#define ROLE_SYSTEM_BORDER 19
-#define ROLE_SYSTEM_BUTTONDROPDOWN 56
-#define ROLE_SYSTEM_BUTTONDROPDOWNGRID 58
-#define ROLE_SYSTEM_BUTTONMENU 57
-#define ROLE_SYSTEM_CARET 7
-#define ROLE_SYSTEM_CELL 29
-#define ROLE_SYSTEM_CHARACTER 32
-#define ROLE_SYSTEM_CHART 17
-#define ROLE_SYSTEM_CHECKBUTTON 44
-#define ROLE_SYSTEM_CLIENT 10
-#define ROLE_SYSTEM_CLOCK 61
-#define ROLE_SYSTEM_COLUMN 27
-#define ROLE_SYSTEM_COLUMNHEADER 25
-#define ROLE_SYSTEM_COMBOBOX 46
-#define ROLE_SYSTEM_CURSOR 6
-#define ROLE_SYSTEM_DIAGRAM 53
-#define ROLE_SYSTEM_DIAL 49
-#define ROLE_SYSTEM_DIALOG 18
-#define ROLE_SYSTEM_DOCUMENT 15
-#define ROLE_SYSTEM_DROPLIST 47
-#define ROLE_SYSTEM_EQUATION 55
-#define ROLE_SYSTEM_GRAPHIC 40
-#define ROLE_SYSTEM_GRIP 4
-#define ROLE_SYSTEM_GROUPING 20
-#define ROLE_SYSTEM_HELPBALLOON 31
-#define ROLE_SYSTEM_HOTKEYFIELD 50
-#define ROLE_SYSTEM_INDICATOR 39
-#define ROLE_SYSTEM_LINK 30
-#define ROLE_SYSTEM_LIST 33
-#define ROLE_SYSTEM_LISTITEM 34
-#define ROLE_SYSTEM_MENUBAR 2
-#define ROLE_SYSTEM_MENUITEM 12
-#define ROLE_SYSTEM_MENUPOPUP 11
-#define ROLE_SYSTEM_OUTLINE 35
-#define ROLE_SYSTEM_OUTLINEITEM 36
-#define ROLE_SYSTEM_PAGETAB 37
-#define ROLE_SYSTEM_PAGETABLIST 60
-#define ROLE_SYSTEM_PANE 16
-#define ROLE_SYSTEM_PROGRESSBAR 48
-#define ROLE_SYSTEM_PROPERTYPAGE 38
-#define ROLE_SYSTEM_PUSHBUTTON 43
-#define ROLE_SYSTEM_RADIOBUTTON 45
-#define ROLE_SYSTEM_ROW 28
-#define ROLE_SYSTEM_ROWHEADER 26
-#define ROLE_SYSTEM_SCROLLBAR 3
-#define ROLE_SYSTEM_SEPARATOR 21
-#define ROLE_SYSTEM_SLIDER 51
-#define ROLE_SYSTEM_SOUND 5
-#define ROLE_SYSTEM_SPINBUTTON 52
-#define ROLE_SYSTEM_STATICTEXT 41
-#define ROLE_SYSTEM_STATUSBAR 23
-#define ROLE_SYSTEM_TABLE 24
-#define ROLE_SYSTEM_TEXT 42
-#define ROLE_SYSTEM_TITLEBAR 1
-#define ROLE_SYSTEM_TOOLBAR 22
-#define ROLE_SYSTEM_TOOLTIP 13
-#define ROLE_SYSTEM_WHITESPACE 59
-#define ROLE_SYSTEM_WINDOW 9
-
-#define STATE_SYSTEM_UNAVAILABLE 0x00000001
-#define STATE_SYSTEM_SELECTED 0x00000002
-#define STATE_SYSTEM_FOCUSED 0x00000004
-#define STATE_SYSTEM_PRESSED 0x00000008
-#define STATE_SYSTEM_CHECKED 0x00000010
-#define STATE_SYSTEM_MIXED 0x00000020
-#define STATE_SYSTEM_READONLY 0x00000040
-#define STATE_SYSTEM_HOTTRACKED 0x00000080
-#define STATE_SYSTEM_DEFAULT 0x00000100
-#define STATE_SYSTEM_EXPANDED 0x00000200
-#define STATE_SYSTEM_COLLAPSED 0x00000400
-#define STATE_SYSTEM_BUSY 0x00000800
-#define STATE_SYSTEM_FLOATING 0x00001000
-#define STATE_SYSTEM_MARQUEED 0x00002000
-#define STATE_SYSTEM_ANIMATED 0x00004000
-#define STATE_SYSTEM_INVISIBLE 0x00008000
-#define STATE_SYSTEM_OFFSCREEN 0x00010000
-#define STATE_SYSTEM_SIZEABLE 0x00020000
-#define STATE_SYSTEM_MOVEABLE 0x00040000
-#define STATE_SYSTEM_SELFVOICING 0x00080000
-#define STATE_SYSTEM_FOCUSABLE 0x00100000
-#define STATE_SYSTEM_SELECTABLE 0x00200000
-#define STATE_SYSTEM_LINKED 0x00400000
-#define STATE_SYSTEM_TRAVERSED 0x00800000
-#define STATE_SYSTEM_MULTISELECTABLE 0x01000000
-#define STATE_SYSTEM_EXTSELECTABLE 0x02000000
-#define STATE_SYSTEM_ALERT_LOW 0x04000000
-#define STATE_SYSTEM_ALERT_MEDIUM 0x08000000
-#define STATE_SYSTEM_ALERT_HIGH 0x10000000
-#define STATE_SYSTEM_VALID 0x1fffffff
-
-typedef enum tagSELFLAG
-{
- SELFLAG_NONE = 0,
- SELFLAG_TAKEFOCUS = 1,
- SELFLAG_TAKESELECTION = 2,
- SELFLAG_EXTENDSELECTION = 4,
- SELFLAG_ADDSELECTION = 8,
- SELFLAG_REMOVESELECTION = 16
-} SELFLAG;
-
-#define SELFLAG_VALID 0x0000001F
-
-/* DEFINE_GUID(LIBID_Accessibility, 0x1ea4dbf0, 0x3c3b,0x11cf, 0x81, 0x0c, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); */
-/* DEFINE_GUID(IID_IAccessible, 0x618736e0, 0x3c3d,0x11cf, 0x81, 0x0c, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); */
-EXTERN_C const IID LIBID_Accessibility;
-EXTERN_C const IID IID_IAccessible;
-
-#define INTERFACE IAccessible
-DECLARE_INTERFACE_(IAccessible, IDispatch)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetTypeInfoCount)(THIS_ UINT*) PURE;
- STDMETHOD(GetTypeInfo)(THIS_ UINT,LCID,LPTYPEINFO*) PURE;
- STDMETHOD(GetIDsOfNames)(THIS_ REFIID,LPOLESTR*,UINT,LCID,DISPID*) PURE;
- STDMETHOD(Invoke)(THIS_ DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*) PURE;
-
- STDMETHOD(get_accParent)(THIS_ IDispatch**) PURE;
- STDMETHOD(get_accChildCount)(THIS_ long*) PURE;
- STDMETHOD(get_accChild)(THIS_ VARIANT, IDispatch **) PURE;
- STDMETHOD(get_accName)(THIS_ VARIANT, BSTR*) PURE;
- STDMETHOD(get_accValue)(THIS_ VARIANT, BSTR*) PURE;
- STDMETHOD(get_accDescription)(THIS_ VARIANT, BSTR*) PURE;
- STDMETHOD(get_accRole)(THIS_ VARIANT, VARIANT*) PURE;
- STDMETHOD(get_accState)(THIS_ VARIANT, VARIANT*) PURE;
- STDMETHOD(get_accHelp)(THIS_ VARIANT, BSTR*) PURE;
- STDMETHOD(get_accHelpTopic)(THIS_ BSTR*, VARIANT, long*) PURE;
- STDMETHOD(get_accKeyboardShortcut)(THIS_ VARIANT, BSTR*) PURE;
- STDMETHOD(get_accFocus)(THIS_ VARIANT*) PURE;
- STDMETHOD(get_accSelection)(THIS_ VARIANT*) PURE;
- STDMETHOD(get_accDefaultAction)(THIS_ VARIANT, BSTR*) PURE;
-
- STDMETHOD(accSelect)(THIS_ long, VARIANT) PURE;
- STDMETHOD(accLocation)(THIS_ long*, long*, long*, long*, VARIANT) PURE;
- STDMETHOD(accNavigate)(THIS_ long, VARIANT, VARIANT*) PURE;
- STDMETHOD(accHitTest)(THIS_ long, long, VARIANT*) PURE;
- STDMETHOD(accDoDefaultAction)(THIS_ VARIANT) PURE;
-
- STDMETHOD(put_accName)(THIS_ VARIANT, BSTR) PURE;
- STDMETHOD(put_accValue)(THIS_ VARIANT, BSTR) PURE;
-};
-#undef INTERFACE
-typedef IAccessible* LPACCESSIBLE;
-
-STDAPI AccessibleChildren(IAccessible*,LONG,LONG,VARIANT*,LONG*);
-STDAPI AccessibleObjectFromEvent(HWND,DWORD,DWORD,IAccessible*,VARIANT*);
-STDAPI AccessibleObjectFromPoint(POINT,IAccessible**,VARIANT*);
-STDAPI AccessibleObjectFromWindow(HWND,DWORD,REFIID,void**);
-STDAPI CreateStdAccessibleObject(HWND,LONG,REFIID,void**);
-STDAPI CreateStdAccessibleProxyA(HWND,LPCSTR,LONG,REFIID,void**);
-STDAPI CreateStdAccessibleProxyW(HWND,LPCWSTR,LONG,REFIID,void**);
-void WINAPI GetOleaccVersionInfo(DWORD*,DWORD*);
-UINT WINAPI GetRoleTextA(DWORD,LPSTR,UINT);
-UINT WINAPI GetRoleTextW(DWORD,LPWSTR,UINT);
-UINT WINAPI GetStateTextA(DWORD,LPSTR,UINT);
-UINT WINAPI GetStateTextW(DWORD,LPWSTR,UINT);
-LRESULT WINAPI LresultFromObject(REFIID,WPARAM,LPUNKNOWN);
-STDAPI ObjectFromLresult(LRESULT,REFIID,WPARAM,void**);
-STDAPI WindowFromAccessibleObject(IAccessible*,HWND*);
-
-#ifdef UNICODE
-#define CreateStdAccessibleProxy CreateStdAccessibleProxyW
-#define GetRoleText GetRoleTextW
-#define GetStateText GetStateTextW
-#else
-#define CreateStdAccessibleProxy CreateStdAccessibleProxyA
-#define GetRoleText GetRoleTextA
-#define GetStateText GetStateTextA
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _OLEACC_H */
diff --git a/winsup/w32api/include/oleauto.h b/winsup/w32api/include/oleauto.h
deleted file mode 100644
index f409042..0000000
--- a/winsup/w32api/include/oleauto.h
+++ /dev/null
@@ -1,656 +0,0 @@
-#ifndef _OLEAUTO_H
-#define _OLEAUTO_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#pragma pack(push,8)
-#define WINOLEAUTAPI STDAPI
-#define WINOLEAUTAPI_(type) STDAPI_(type)
-#define STDOLE_MAJORVERNUM 1
-#define STDOLE_MINORVERNUM 0
-#define STDOLE_LCID 0
-
-#define VARIANT_NOVALUEPROP 0x01
-#define VARIANT_ALPHABOOL 0x02
-#define VARIANT_NOUSEOVERRIDE 0x04
-#define VARIANT_LOCALBOOL 0x08
-
-#define VAR_TIMEVALUEONLY 0x0001
-#define VAR_DATEVALUEONLY 0x0002
-#define VAR_VALIDDATE 0x0004
-#define VAR_CALENDAR_HIJRI 0x0008
-#define VAR_LOCALBOOL 0x0010
-#define VAR_FORMAT_NOSUBSTITUTE 0x0020
-#define VAR_FOURDIGITYEARS 0x0040
-#define VAR_CALENDAR_THAI 0x0080
-#define VAR_CALENDAR_GREGORIAN 0x0100
-
-#define MEMBERID_NIL DISPID_UNKNOWN
-#define ID_DEFAULTINST (-2)
-#define DISPATCH_METHOD 1
-#define DISPATCH_PROPERTYGET 2
-#define DISPATCH_PROPERTYPUT 4
-#define DISPATCH_PROPERTYPUTREF 8
-#define LHashValOfName(l,n) LHashValOfNameSys(SYS_WIN32,l,n)
-#define WHashValOfLHashVal(h) ((unsigned short)(0x0000ffff&(h)))
-#define IsHashValCompatible(h1,h2) ((BOOL)((0x00ff0000&(h1))==(0x00ff0000&(h2))))
-#define ACTIVEOBJECT_STRONG 0
-#define ACTIVEOBJECT_WEAK 1
-#ifdef NONAMELESSUNION
-#define V_UNION(X,Y) ((X)->__VARIANT_NAME_1.__VARIANT_NAME_2.__VARIANT_NAME_3.Y)
-#define V_VT(X) ((X)->__VARIANT_NAME_1.__VARIANT_NAME_2.vt)
-#else
-#define V_UNION(X,Y) ((X)->Y)
-#define V_VT(X) ((X)->vt)
-#endif
-#define V_BOOL(X) V_UNION(X,boolVal)
-#define V_ISBYREF(X) (V_VT(X)&VT_BYREF)
-#define V_ISARRAY(X) (V_VT(X)&VT_ARRAY)
-#define V_ISVECTOR(X) (V_VT(X)&VT_VECTOR)
-#define V_NONE(X) V_I2(X)
-#define V_UI1(X) V_UNION(X,bVal)
-#define V_UI1REF(X) V_UNION(X,pbVal)
-#define V_I2(X) V_UNION(X,iVal)
-#define V_UI2(X) V_UNION(X,uiVal)
-#define V_I2REF(X) V_UNION(X,piVal)
-#define V_I4(X) V_UNION(X,lVal)
-#define V_UI4(X) V_UNION(X,ulVal)
-#define V_I4REF(X) V_UNION(X,plVal)
-#define V_UI4REF(X) V_UNION(X,pulVal)
-#define V_I8(X) V_UNION(X,llVal)
-#define V_UI8(X) V_UNION(X,ullVal)
-#define V_I8REF(X) V_UNION(X,pllVal)
-#define V_UI8REF(X) V_UNION(X,pullVal)
-#define V_R4(X) V_UNION(X,fltVal)
-#define V_R4REF(X) V_UNION(X,pfltVal)
-#define V_R8(X) V_UNION(X,dblVal)
-#define V_R8REF(X) V_UNION(X,pdblVal)
-#define V_CY(X) V_UNION(X,cyVal)
-#define V_CYREF(X) V_UNION(X,pcyVal)
-#define V_DATE(X) V_UNION(X,date)
-#define V_DATEREF(X) V_UNION(X,pdate)
-#define V_BSTR(X) V_UNION(X,bstrVal)
-#define V_BSTRREF(X) V_UNION(X,pbstrVal)
-#define V_DISPATCH(X) V_UNION(X,pdispVal)
-#define V_DISPATCHREF(X) V_UNION(X,ppdispVal)
-#define V_ERROR(X) V_UNION(X,scode)
-#define V_ERRORREF(X) V_UNION(X,pscode)
-#define V_BOOLREF(X) V_UNION(X,pboolVal)
-#define V_UNKNOWN(X) V_UNION(X,punkVal)
-#define V_UNKNOWNREF(X) V_UNION(X,ppunkVal)
-#define V_VARIANTREF(X) V_UNION(X,pvarVal)
-#define V_LPSTR(X) V_UNION(X,pszVal)
-#define V_LPSTRREF(X) V_UNION(X,ppszVal)
-#define V_LPWSTR(X) V_UNION(X,pwszVal)
-#define V_LPWSTRREF(X) V_UNION(X,ppwszVal)
-#define V_FILETIME(X) V_UNION(X,filetime)
-#define V_FILETIMEREF(X) V_UNION(X,pfiletime)
-#define V_BLOB(X) V_UNION(X,blob)
-#define V_UUID(X) V_UNION(X,puuid)
-#define V_CLSID(X) V_UNION(X,puuid)
-#define V_ARRAY(X) V_UNION(X,parray)
-#define V_ARRAYREF(X) V_UNION(X,pparray)
-#define V_BYREF(X) V_UNION(X,byref)
-#if defined(NONAMELESSUNION)
-#define V_DECIMAL(X) ((X)->__VARIANT_NAME_1.decVal)
-#else
-#define V_DECIMAL(X) ((X)->decVal)
-#endif
-#define V_DECIMALREF(X) V_UNION(X,pdecVal)
-#define V_I1(X) V_UNION(X,cVal)
-
-#ifdef _WIN64
-#define V_INT_PTR(X) V_I8(X)
-#define V_UINT_PTR(X) V_UI8(X)
-#define V_INT_PTRREF(X) V_I8REF(X)
-#define V_UINT_PTRREF(X) V_UI8REF(X)
-#else
-#define V_INT_PTR(X) V_I4(X)
-#define V_UINT_PTR(X) V_UI4(X)
-#define V_INT_PTRREF(X) V_I4REF(X)
-#define V_UINT_PTRREF(X) V_UI4REF(X)
-#endif
-
-#define VARCMP_LT 0
-#define VARCMP_EQ 1
-#define VARCMP_GT 2
-#define VARCMP_NULL 3
-
-#define LOCALE_USE_NLS 0x10000000
-
-#define VARIANT_NOUSEROVERRIDE 0x04
-#define VARIANT_CALENDAR_HIJRI 0x08
-#define VARIANT_CALENDAR_THAI 0x20
-#define VARIANT_CALENDAR_GREGORIAN 0x40
-#define VARIANT_USE_NLS 0x80
-
-#define NUMPRS_LEADING_WHITE 0x00001
-#define NUMPRS_TRAILING_WHITE 0x00002
-#define NUMPRS_LEADING_PLUS 0x00004
-#define NUMPRS_TRAILING_PLUS 0x00008
-#define NUMPRS_LEADING_MINUS 0x00010
-#define NUMPRS_TRAILING_MINUS 0x00020
-#define NUMPRS_HEX_OCT 0x00040
-#define NUMPRS_PARENS 0x00080
-#define NUMPRS_DECIMAL 0x00100
-#define NUMPRS_THOUSANDS 0x00200
-#define NUMPRS_CURRENCY 0x00400
-#define NUMPRS_EXPONENT 0x00800
-#define NUMPRS_USE_ALL 0x01000
-#define NUMPRS_STD 0x01FFF
-#define NUMPRS_NEG 0x10000
-#define NUMPRS_INEXACT 0x20000
-
-#define VTBIT_I1 (1<<VT_I1)
-#define VTBIT_UI1 (1<<VT_UI1)
-#define VTBIT_I2 (1<<VT_I2)
-#define VTBIT_UI2 (1<<VT_UI2)
-#define VTBIT_I4 (1<<VT_I4)
-#define VTBIT_UI4 (1<<VT_UI4)
-#define VTBIT_I8 (1<<VT_I8)
-#define VTBIT_UI8 (1<<VT_UI8)
-#define VTBIT_R4 (1<<VT_R4)
-#define VTBIT_R8 (1<<VT_R8)
-#define VTBIT_CY (1<<VT_CY)
-#define VTBIT_DECIMAL (1<<VT_DECIMAL)
-
-#include <oaidl.h>
-
-typedef enum tagREGKIND {
- REGKIND_DEFAULT,
- REGKIND_REGISTER,
- REGKIND_NONE
-} REGKIND;
-typedef struct tagPARAMDATA {
- OLECHAR *szName;
- VARTYPE vt;
-} PARAMDATA,*LPPARAMDATA;
-typedef struct tagMETHODDATA {
- OLECHAR *szName;
- PARAMDATA *ppdata;
- DISPID dispid;
- UINT iMeth;
- CALLCONV cc;
- UINT cArgs;
- WORD wFlags;
- VARTYPE vtReturn;
-} METHODDATA,*LPMETHODDATA;
-typedef struct tagINTERFACEDATA {
- METHODDATA *pmethdata;
- UINT cMembers;
-} INTERFACEDATA,*LPINTERFACEDATA;
-
-typedef struct {
- SYSTEMTIME st;
- USHORT wDayOfYear;
-} UDATE;
-
-typedef struct {
- int cDig;
- unsigned long dwInFlags;
- unsigned long dwOutFlags;
- int cchUsed;
- int nBaseShift;
- int nPwr10;
-} NUMPARSE;
-
-WINOLEAUTAPI_(BSTR) SysAllocString(const OLECHAR*);
-WINOLEAUTAPI_(int) SysReAllocString(BSTR*,const OLECHAR*);
-WINOLEAUTAPI_(BSTR) SysAllocStringLen(const OLECHAR*,unsigned int);
-WINOLEAUTAPI_(int) SysReAllocStringLen(BSTR*,const OLECHAR*,unsigned int);
-WINOLEAUTAPI_(void) SysFreeString(BSTR);
-WINOLEAUTAPI_(unsigned int) SysStringLen(BSTR);
-WINOLEAUTAPI_(unsigned int) SysStringByteLen(BSTR);
-WINOLEAUTAPI_(BSTR) SysAllocStringByteLen(const char*,unsigned int);
-WINOLEAUTAPI_(int) DosDateTimeToVariantTime(unsigned short,unsigned short,double*);
-WINOLEAUTAPI_(int) VariantTimeToDosDateTime(double,unsigned short*,unsigned short*);
-WINOLEAUTAPI_(int) VariantTimeToSystemTime(double,LPSYSTEMTIME);
-WINOLEAUTAPI_(int) SystemTimeToVariantTime(LPSYSTEMTIME, double*);
-WINOLEAUTAPI VarDateFromUdate(UDATE*,ULONG,DATE*);
-WINOLEAUTAPI VarDateFromUdateEx(UDATE*,LCID,ULONG,DATE*);
-WINOLEAUTAPI VarUdateFromDate(DATE,ULONG,UDATE*);
-WINOLEAUTAPI SafeArrayAllocDescriptor(unsigned int,SAFEARRAY**);
-WINOLEAUTAPI SafeArrayAllocData(SAFEARRAY*);
-WINOLEAUTAPI_(SAFEARRAY*) SafeArrayCreate(VARTYPE,unsigned int,SAFEARRAYBOUND*);
-WINOLEAUTAPI SafeArrayDestroyDescriptor(SAFEARRAY*);
-WINOLEAUTAPI SafeArrayDestroyData(SAFEARRAY*);
-WINOLEAUTAPI SafeArrayDestroy(SAFEARRAY*);
-WINOLEAUTAPI SafeArrayRedim(SAFEARRAY*,SAFEARRAYBOUND*);
-WINOLEAUTAPI_(unsigned int) SafeArrayGetDim(SAFEARRAY*);
-WINOLEAUTAPI_(unsigned int) SafeArrayGetElemsize(SAFEARRAY*);
-WINOLEAUTAPI SafeArrayGetUBound(SAFEARRAY*,unsigned int,long*);
-WINOLEAUTAPI SafeArrayGetLBound(SAFEARRAY*,unsigned int,long*);
-WINOLEAUTAPI SafeArrayLock(SAFEARRAY*);
-WINOLEAUTAPI SafeArrayUnlock(SAFEARRAY*);
-WINOLEAUTAPI SafeArrayAccessData(SAFEARRAY*,void**);
-WINOLEAUTAPI SafeArrayUnaccessData(SAFEARRAY*);
-WINOLEAUTAPI SafeArrayGetElement(SAFEARRAY*,long*,void*);
-WINOLEAUTAPI SafeArrayPutElement(SAFEARRAY*,long*,void*);
-WINOLEAUTAPI SafeArrayCopy(SAFEARRAY*,SAFEARRAY**);
-WINOLEAUTAPI SafeArrayPtrOfIndex(SAFEARRAY*,long*,void**);
-WINOLEAUTAPI_(SAFEARRAY*) SafeArrayCreateVector(VARTYPE,LONG,ULONG);
-WINOLEAUTAPI_(SAFEARRAY*) SafeArrayCreateVectorEx(VARTYPE,LONG,ULONG,LPVOID);
-WINOLEAUTAPI SafeArrayAllocDescriptorEx(VARTYPE,UINT,SAFEARRAY**);
-WINOLEAUTAPI SafeArrayGetVartype(SAFEARRAY*,VARTYPE*);
-WINOLEAUTAPI SafeArraySetRecordInfo(SAFEARRAY*,IRecordInfo*);
-WINOLEAUTAPI SafeArrayGetRecordInfo(SAFEARRAY*,IRecordInfo**);
-WINOLEAUTAPI SafeArraySetIID(SAFEARRAY*,REFGUID);
-WINOLEAUTAPI SafeArrayGetIID(SAFEARRAY*,GUID*);
-WINOLEAUTAPI_(void) VariantInit(VARIANTARG*);
-WINOLEAUTAPI VariantClear(VARIANTARG*);
-WINOLEAUTAPI VariantCopy(VARIANTARG*,VARIANTARG*);
-WINOLEAUTAPI VariantCopyInd(VARIANT*,VARIANTARG*);
-WINOLEAUTAPI VariantChangeType(VARIANTARG*,VARIANTARG*,unsigned short,VARTYPE);
-WINOLEAUTAPI VariantChangeTypeEx(VARIANTARG*,VARIANTARG*,LCID,unsigned short,VARTYPE);
-WINOLEAUTAPI VarUI1FromI2(short,unsigned char*);
-WINOLEAUTAPI VarUI1FromI4(long,unsigned char*);
-WINOLEAUTAPI VarUI1FromR4(float,unsigned char*);
-WINOLEAUTAPI VarUI1FromR8(double,unsigned char*);
-WINOLEAUTAPI VarUI1FromCy(CY,unsigned char*);
-WINOLEAUTAPI VarUI1FromDate(DATE,unsigned char*);
-WINOLEAUTAPI VarUI1FromStr(OLECHAR*,LCID,unsigned long,unsigned char*);
-WINOLEAUTAPI VarUI1FromDisp(LPDISPATCH,LCID,unsigned char*);
-WINOLEAUTAPI VarUI1FromBool(VARIANT_BOOL,unsigned char*);
-WINOLEAUTAPI VarI2FromUI1(unsigned char,short*);
-WINOLEAUTAPI VarI2FromI4(long,short*);
-WINOLEAUTAPI VarI2FromR4(float,short*);
-WINOLEAUTAPI VarI2FromR8(double,short*);
-WINOLEAUTAPI VarI2FromCy(CY cyIn,short*);
-WINOLEAUTAPI VarI2FromDate(DATE,short*);
-WINOLEAUTAPI VarI2FromStr(OLECHAR*,LCID,unsigned long,short*);
-WINOLEAUTAPI VarI2FromDisp(LPDISPATCH,LCID,short*);
-WINOLEAUTAPI VarI2FromBool(VARIANT_BOOL,short*);
-WINOLEAUTAPI VarI4FromUI1(unsigned char,long*);
-WINOLEAUTAPI VarI4FromI2(short,long*);
-WINOLEAUTAPI VarI4FromR4(float,long*);
-WINOLEAUTAPI VarI4FromR8(double,long*);
-WINOLEAUTAPI VarI4FromCy(CY,long*);
-WINOLEAUTAPI VarI4FromDate(DATE,long*);
-WINOLEAUTAPI VarI4FromStr(OLECHAR*,LCID,unsigned long,long*);
-WINOLEAUTAPI VarI4FromDisp(LPDISPATCH,LCID,long*);
-WINOLEAUTAPI VarI4FromBool(VARIANT_BOOL,long*);
-WINOLEAUTAPI VarR4FromUI1(unsigned char,float*);
-WINOLEAUTAPI VarR4FromI2(short,float*);
-WINOLEAUTAPI VarR4FromI4(long,float*);
-WINOLEAUTAPI VarR4FromR8(double,float*);
-WINOLEAUTAPI VarR4FromCy(CY,float*);
-WINOLEAUTAPI VarR4FromDate(DATE,float*);
-WINOLEAUTAPI VarR4FromStr(OLECHAR*,LCID,unsigned long,float*);
-WINOLEAUTAPI VarR4FromDisp(LPDISPATCH,LCID,float*);
-WINOLEAUTAPI VarR4FromBool(VARIANT_BOOL,float*);
-WINOLEAUTAPI VarR8FromUI1(unsigned char,double*);
-WINOLEAUTAPI VarR8FromI2(short,double*);
-WINOLEAUTAPI VarR8FromI4(long,double*);
-WINOLEAUTAPI VarR8FromR4(float,double*);
-WINOLEAUTAPI VarR8FromCy(CY,double*);
-WINOLEAUTAPI VarR8FromDate(DATE,double*);
-WINOLEAUTAPI VarR8FromStr(OLECHAR*,LCID,unsigned long,double*);
-WINOLEAUTAPI VarR8FromDisp(LPDISPATCH,LCID,double*);
-WINOLEAUTAPI VarR8FromBool(VARIANT_BOOL,double*);
-WINOLEAUTAPI VarR8FromDec(DECIMAL*,double*);
-WINOLEAUTAPI VarDateFromUI1(unsigned char,DATE*);
-WINOLEAUTAPI VarDateFromI2(short,DATE*);
-WINOLEAUTAPI VarDateFromI4(long,DATE*);
-WINOLEAUTAPI VarDateFromR4(float,DATE*);
-WINOLEAUTAPI VarDateFromR8(double,DATE*);
-WINOLEAUTAPI VarDateFromCy(CY,DATE*);
-WINOLEAUTAPI VarDateFromStr(OLECHAR*,LCID,unsigned long,DATE*);
-WINOLEAUTAPI VarDateFromDisp(LPDISPATCH,LCID,DATE*);
-WINOLEAUTAPI VarDateFromBool(VARIANT_BOOL,DATE*);
-WINOLEAUTAPI VarCyFromUI1(unsigned char,CY*);
-WINOLEAUTAPI VarCyFromI2(short,CY*);
-WINOLEAUTAPI VarCyFromI4(long,CY*);
-WINOLEAUTAPI VarCyFromR4(float,CY*);
-WINOLEAUTAPI VarCyFromR8(double,CY*);
-WINOLEAUTAPI VarCyFromDate(DATE,CY*);
-WINOLEAUTAPI VarCyFromStr(OLECHAR*,LCID,unsigned long,CY*);
-WINOLEAUTAPI VarCyFromDisp(LPDISPATCH,LCID,CY*);
-WINOLEAUTAPI VarCyFromBool(VARIANT_BOOL,CY*);
-WINOLEAUTAPI VarBstrFromUI1(unsigned char,LCID,unsigned long,BSTR*);
-WINOLEAUTAPI VarBstrFromI2(short,LCID,unsigned long,BSTR*);
-WINOLEAUTAPI VarBstrFromI4(long,LCID,unsigned long,BSTR*);
-WINOLEAUTAPI VarBstrFromR4(float,LCID,unsigned long,BSTR*);
-WINOLEAUTAPI VarBstrFromR8(double,LCID,unsigned long,BSTR*);
-WINOLEAUTAPI VarBstrFromCy(CY,LCID,unsigned long,BSTR*);
-WINOLEAUTAPI VarBstrFromDate(DATE,LCID,unsigned long,BSTR*);
-WINOLEAUTAPI VarBstrFromDisp(LPDISPATCH,LCID,unsigned long,BSTR*);
-WINOLEAUTAPI VarBstrFromBool(VARIANT_BOOL,LCID,unsigned long,BSTR*);
-WINOLEAUTAPI VarBoolFromUI1(unsigned char,VARIANT_BOOL*);
-WINOLEAUTAPI VarBoolFromI2(short,VARIANT_BOOL*);
-WINOLEAUTAPI VarBoolFromI4(long,VARIANT_BOOL*);
-WINOLEAUTAPI VarBoolFromR4(float,VARIANT_BOOL*);
-WINOLEAUTAPI VarBoolFromR8(double,VARIANT_BOOL*);
-WINOLEAUTAPI VarBoolFromDate(DATE,VARIANT_BOOL*);
-WINOLEAUTAPI VarBoolFromCy(CY,VARIANT_BOOL*);
-WINOLEAUTAPI VarBoolFromStr(OLECHAR*,LCID,unsigned long,VARIANT_BOOL*);
-WINOLEAUTAPI VarBoolFromDisp(LPDISPATCH,LCID,VARIANT_BOOL*);
-WINOLEAUTAPI VarDecFromR8(double,DECIMAL*);
-WINOLEAUTAPI_(ULONG) LHashValOfNameSysA(SYSKIND,LCID,const char*);
-WINOLEAUTAPI_(ULONG) LHashValOfNameSys(SYSKIND,LCID,const OLECHAR*);
-WINOLEAUTAPI LoadTypeLib(const OLECHAR*,LPTYPELIB*);
-WINOLEAUTAPI LoadTypeLibEx(LPCOLESTR,REGKIND,LPTYPELIB*);
-WINOLEAUTAPI LoadRegTypeLib(REFGUID,WORD,WORD,LCID,LPTYPELIB*);
-WINOLEAUTAPI QueryPathOfRegTypeLib(REFGUID,unsigned short,unsigned short,LCID,LPBSTR);
-WINOLEAUTAPI RegisterTypeLib(LPTYPELIB,OLECHAR*,OLECHAR*);
-WINOLEAUTAPI UnRegisterTypeLib(REFGUID,WORD,WORD,LCID,SYSKIND);
-WINOLEAUTAPI CreateTypeLib(SYSKIND,const OLECHAR*,LPCREATETYPELIB*);
-WINOLEAUTAPI DispGetParam(DISPPARAMS*,UINT,VARTYPE,VARIANT*,UINT*);
-WINOLEAUTAPI DispGetIDsOfNames(LPTYPEINFO,OLECHAR**,UINT,DISPID*);
-WINOLEAUTAPI DispInvoke(void*,LPTYPEINFO,DISPID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*);
-WINOLEAUTAPI CreateDispTypeInfo(INTERFACEDATA*,LCID,LPTYPEINFO*);
-WINOLEAUTAPI CreateStdDispatch(IUnknown*,void*,LPTYPEINFO,IUnknown**);
-WINOLEAUTAPI RegisterActiveObject(IUnknown*,REFCLSID,DWORD,DWORD*);
-WINOLEAUTAPI RevokeActiveObject(DWORD,void*);
-WINOLEAUTAPI GetActiveObject(REFCLSID,void*,IUnknown**);
-WINOLEAUTAPI SetErrorInfo(unsigned long,LPERRORINFO);
-WINOLEAUTAPI GetErrorInfo(unsigned long,LPERRORINFO*);
-WINOLEAUTAPI CreateErrorInfo(LPCREATEERRORINFO*);
-WINOLEAUTAPI_(unsigned long) OaBuildVersion(void);
-WINOLEAUTAPI VectorFromBstr (BSTR, SAFEARRAY **);
-WINOLEAUTAPI BstrFromVector (SAFEARRAY *, BSTR *);
-WINOLEAUTAPI VarParseNumFromStr(OLECHAR*,LCID,ULONG,NUMPARSE*,BYTE*);
-WINOLEAUTAPI VarNumFromParseNum(NUMPARSE*,BYTE*,ULONG,VARIANT*);
-WINOLEAUTAPI_(HRESULT) GetRecordInfoFromTypeInfo (ITypeInfo*,IRecordInfo**);
-WINOLEAUTAPI_(HRESULT) GetRecordInfoFromGuids (REFGUID,ULONG,ULONG,LCID,REFGUID,IRecordInfo**);
-
-WINOLEAUTAPI VarAdd(LPVARIANT, LPVARIANT, LPVARIANT);
-WINOLEAUTAPI VarSub(LPVARIANT, LPVARIANT, LPVARIANT);
-WINOLEAUTAPI VarMul(LPVARIANT, LPVARIANT, LPVARIANT);
-WINOLEAUTAPI VarDiv(LPVARIANT, LPVARIANT, LPVARIANT);
-
-WINOLEAUTAPI VarUI1FromI2(SHORT,BYTE*);
-WINOLEAUTAPI VarUI1FromI4(LONG,BYTE*);
-WINOLEAUTAPI VarUI1FromI8(LONG64,BYTE*);
-WINOLEAUTAPI VarUI1FromR4(FLOAT,BYTE*);
-WINOLEAUTAPI VarUI1FromR8(DOUBLE,BYTE*);
-WINOLEAUTAPI VarUI1FromDate(DATE,BYTE*);
-WINOLEAUTAPI VarUI1FromBool(VARIANT_BOOL,BYTE*);
-WINOLEAUTAPI VarUI1FromI1(signed char,BYTE*);
-WINOLEAUTAPI VarUI1FromUI2(USHORT,BYTE*);
-WINOLEAUTAPI VarUI1FromUI4(ULONG,BYTE*);
-WINOLEAUTAPI VarUI1FromUI8(ULONG64,BYTE*);
-WINOLEAUTAPI VarUI1FromStr(OLECHAR*,LCID,ULONG,BYTE*);
-WINOLEAUTAPI VarUI1FromCy(CY,BYTE*);
-WINOLEAUTAPI VarUI1FromDec(DECIMAL*,BYTE*);
-WINOLEAUTAPI VarUI1FromDisp(IDispatch*,LCID,BYTE*);
-
-WINOLEAUTAPI VarI2FromUI1(BYTE,SHORT*);
-WINOLEAUTAPI VarI2FromI4(LONG,SHORT*);
-WINOLEAUTAPI VarI2FromI8(LONG64,SHORT*);
-WINOLEAUTAPI VarI2FromR4(FLOAT,SHORT*);
-WINOLEAUTAPI VarI2FromR8(DOUBLE,SHORT*);
-WINOLEAUTAPI VarI2FromDate(DATE,SHORT*);
-WINOLEAUTAPI VarI2FromBool(VARIANT_BOOL,SHORT*);
-WINOLEAUTAPI VarI2FromI1(signed char,SHORT*);
-WINOLEAUTAPI VarI2FromUI2(USHORT,SHORT*);
-WINOLEAUTAPI VarI2FromUI4(ULONG,SHORT*);
-WINOLEAUTAPI VarI2FromUI8(ULONG64,SHORT*);
-WINOLEAUTAPI VarI2FromStr(OLECHAR*,LCID,ULONG,SHORT*);
-WINOLEAUTAPI VarI2FromCy(CY,SHORT*);
-WINOLEAUTAPI VarI2FromDec(DECIMAL*,SHORT*);
-WINOLEAUTAPI VarI2FromDisp(IDispatch*,LCID,SHORT*);
-
-WINOLEAUTAPI VarI4FromUI1(BYTE,LONG*);
-WINOLEAUTAPI VarI4FromI2(SHORT,LONG*);
-WINOLEAUTAPI VarI4FromI8(LONG64,LONG*);
-WINOLEAUTAPI VarI4FromR4(FLOAT,LONG*);
-WINOLEAUTAPI VarI4FromR8(DOUBLE,LONG*);
-WINOLEAUTAPI VarI4FromDate(DATE,LONG*);
-WINOLEAUTAPI VarI4FromBool(VARIANT_BOOL,LONG*);
-WINOLEAUTAPI VarI4FromI1(signed char,LONG*);
-WINOLEAUTAPI VarI4FromUI2(USHORT,LONG*);
-WINOLEAUTAPI VarI4FromUI4(ULONG,LONG*);
-WINOLEAUTAPI VarI4FromUI8(ULONG64,LONG*);
-WINOLEAUTAPI VarI4FromStr(OLECHAR*,LCID,ULONG,LONG*);
-WINOLEAUTAPI VarI4FromCy(CY,LONG*);
-WINOLEAUTAPI VarI4FromDec(DECIMAL*,LONG*);
-WINOLEAUTAPI VarI4FromDisp(IDispatch*,LCID,LONG*);
-
-WINOLEAUTAPI VarI8FromUI1(BYTE,LONG64*);
-WINOLEAUTAPI VarI8FromI2(SHORT,LONG64*);
-WINOLEAUTAPI VarI8FromI4(LONG,LONG64*);
-WINOLEAUTAPI VarI8FromR4(FLOAT,LONG64*);
-WINOLEAUTAPI VarI8FromR8(DOUBLE,LONG64*);
-WINOLEAUTAPI VarI8FromDate(DATE,LONG64*);
-WINOLEAUTAPI VarI8FromStr(OLECHAR*,LCID,ULONG,LONG64*);
-WINOLEAUTAPI VarI8FromBool(VARIANT_BOOL,LONG64*);
-WINOLEAUTAPI VarI8FromI1(signed char,LONG64*);
-WINOLEAUTAPI VarI8FromUI2(USHORT,LONG64*);
-WINOLEAUTAPI VarI8FromUI4(ULONG,LONG64*);
-WINOLEAUTAPI VarI8FromUI8(ULONG64,LONG64*);
-WINOLEAUTAPI VarI8FromDec(DECIMAL *pdecIn,LONG64*);
-WINOLEAUTAPI VarI8FromInt(INT intIn,LONG64*);
-WINOLEAUTAPI VarI8FromCy(CY,LONG64*);
-WINOLEAUTAPI VarI8FromDisp(IDispatch*,LCID,LONG64*);
-
-WINOLEAUTAPI VarR4FromUI1(BYTE,FLOAT*);
-WINOLEAUTAPI VarR4FromI2(SHORT,FLOAT*);
-WINOLEAUTAPI VarR4FromI4(LONG,FLOAT*);
-WINOLEAUTAPI VarR4FromI8(LONG64,FLOAT*);
-WINOLEAUTAPI VarR4FromR8(DOUBLE,FLOAT*);
-WINOLEAUTAPI VarR4FromDate(DATE,FLOAT*);
-WINOLEAUTAPI VarR4FromBool(VARIANT_BOOL,FLOAT*);
-WINOLEAUTAPI VarR4FromI1(signed char,FLOAT*);
-WINOLEAUTAPI VarR4FromUI2(USHORT,FLOAT*);
-WINOLEAUTAPI VarR4FromUI4(ULONG,FLOAT*);
-WINOLEAUTAPI VarR4FromUI8(ULONG64,FLOAT*);
-WINOLEAUTAPI VarR4FromStr(OLECHAR*,LCID,ULONG,FLOAT*);
-WINOLEAUTAPI VarR4FromCy(CY,FLOAT*);
-WINOLEAUTAPI VarR4FromDec(DECIMAL*,FLOAT*);
-WINOLEAUTAPI VarR4FromDisp(IDispatch*,LCID,FLOAT*);
-
-WINOLEAUTAPI VarR8FromUI1(BYTE,double*);
-WINOLEAUTAPI VarR8FromI2(SHORT,double*);
-WINOLEAUTAPI VarR8FromI4(LONG,double*);
-WINOLEAUTAPI VarR8FromI8(LONG64,double*);
-WINOLEAUTAPI VarR8FromR4(FLOAT,double*);
-WINOLEAUTAPI VarR8FromDate(DATE,double*);
-WINOLEAUTAPI VarR8FromBool(VARIANT_BOOL,double*);
-WINOLEAUTAPI VarR8FromI1(signed char,double*);
-WINOLEAUTAPI VarR8FromUI2(USHORT,double*);
-WINOLEAUTAPI VarR8FromUI4(ULONG,double*);
-WINOLEAUTAPI VarR8FromUI8(ULONG64,double*);
-WINOLEAUTAPI VarR8FromStr(OLECHAR*,LCID,ULONG,double*);
-WINOLEAUTAPI VarR8FromCy(CY,double*);
-WINOLEAUTAPI VarR8FromDec(DECIMAL*,double*);
-WINOLEAUTAPI VarR8FromDisp(IDispatch*,LCID,double*);
-
-WINOLEAUTAPI VarDateFromUI1(BYTE,DATE*);
-WINOLEAUTAPI VarDateFromI2(SHORT,DATE*);
-WINOLEAUTAPI VarDateFromI4(LONG,DATE*);
-WINOLEAUTAPI VarDateFromI8(LONG64,DATE*);
-WINOLEAUTAPI VarDateFromR4(FLOAT,DATE*);
-WINOLEAUTAPI VarDateFromR8(DOUBLE,DATE*);
-WINOLEAUTAPI VarDateFromStr(OLECHAR*,LCID,ULONG,DATE*);
-WINOLEAUTAPI VarDateFromI1(signed char,DATE*);
-WINOLEAUTAPI VarDateFromUI2(USHORT,DATE*);
-WINOLEAUTAPI VarDateFromUI4(ULONG,DATE*);
-WINOLEAUTAPI VarDateFromUI8(ULONG64,DATE*);
-WINOLEAUTAPI VarDateFromBool(VARIANT_BOOL,DATE*);
-WINOLEAUTAPI VarDateFromCy(CY,DATE*);
-WINOLEAUTAPI VarDateFromDec(DECIMAL*,DATE*);
-WINOLEAUTAPI VarDateFromDisp(IDispatch*,LCID,DATE*);
-
-WINOLEAUTAPI VarCyFromUI1(BYTE,CY*);
-WINOLEAUTAPI VarCyFromI2(SHORT sIn,CY*);
-WINOLEAUTAPI VarCyFromI4(LONG,CY*);
-WINOLEAUTAPI VarCyFromI8(LONG64,CY*);
-WINOLEAUTAPI VarCyFromR4(FLOAT,CY*);
-WINOLEAUTAPI VarCyFromR8(DOUBLE,CY*);
-WINOLEAUTAPI VarCyFromDate(DATE,CY*);
-WINOLEAUTAPI VarCyFromStr(OLECHAR*,LCID,ULONG,CY*);
-WINOLEAUTAPI VarCyFromBool(VARIANT_BOOL,CY*);
-WINOLEAUTAPI VarCyFromI1(signed char,CY*);
-WINOLEAUTAPI VarCyFromUI2(USHORT,CY*);
-WINOLEAUTAPI VarCyFromUI4(ULONG,CY*);
-WINOLEAUTAPI VarCyFromUI8(ULONG64,CY*);
-WINOLEAUTAPI VarCyFromDec(DECIMAL*,CY*);
-WINOLEAUTAPI VarCyFromStr(OLECHAR*,LCID,ULONG,CY*);
-WINOLEAUTAPI VarCyFromDisp(IDispatch*,LCID,CY*);
-
-WINOLEAUTAPI VarBstrFromUI1(BYTE,LCID,ULONG,BSTR*);
-WINOLEAUTAPI VarBstrFromI2(SHORT,LCID,ULONG,BSTR*);
-WINOLEAUTAPI VarBstrFromI4(LONG,LCID,ULONG,BSTR*);
-WINOLEAUTAPI VarBstrFromI8(LONG64,LCID,ULONG,BSTR*);
-WINOLEAUTAPI VarBstrFromR4(FLOAT,LCID,ULONG,BSTR*);
-WINOLEAUTAPI VarBstrFromR8(DOUBLE,LCID,ULONG,BSTR*);
-WINOLEAUTAPI VarBstrFromDate(DATE,LCID,ULONG,BSTR*);
-WINOLEAUTAPI VarBstrFromBool(VARIANT_BOOL,LCID,ULONG,BSTR*);
-WINOLEAUTAPI VarBstrFromI1(signed char,LCID,ULONG,BSTR*);
-WINOLEAUTAPI VarBstrFromUI2(USHORT,LCID,ULONG,BSTR*);
-WINOLEAUTAPI VarBstrFromUI8(ULONG64,LCID,ULONG,BSTR*);
-WINOLEAUTAPI VarBstrFromUI4(ULONG,LCID,ULONG,BSTR*);
-WINOLEAUTAPI VarBstrFromCy(CY,LCID,ULONG,BSTR*);
-WINOLEAUTAPI VarBstrFromDec(DECIMAL*,LCID,ULONG,BSTR*);
-WINOLEAUTAPI VarBstrFromDisp(IDispatch*,LCID,ULONG,BSTR*);
-
-WINOLEAUTAPI VarBoolFromUI1(BYTE,VARIANT_BOOL*);
-WINOLEAUTAPI VarBoolFromI2(SHORT,VARIANT_BOOL*);
-WINOLEAUTAPI VarBoolFromI4(LONG,VARIANT_BOOL*);
-WINOLEAUTAPI VarBoolFromI8(LONG64,VARIANT_BOOL*);
-WINOLEAUTAPI VarBoolFromR4(FLOAT,VARIANT_BOOL*);
-WINOLEAUTAPI VarBoolFromR8(DOUBLE,VARIANT_BOOL*);
-WINOLEAUTAPI VarBoolFromDate(DATE,VARIANT_BOOL*);
-WINOLEAUTAPI VarBoolFromStr(OLECHAR*,LCID,ULONG,VARIANT_BOOL*);
-WINOLEAUTAPI VarBoolFromI1(signed char,VARIANT_BOOL*);
-WINOLEAUTAPI VarBoolFromUI2(USHORT,VARIANT_BOOL*);
-WINOLEAUTAPI VarBoolFromUI4(ULONG,VARIANT_BOOL*);
-WINOLEAUTAPI VarBoolFromUI8(ULONG64,VARIANT_BOOL*);
-WINOLEAUTAPI VarBoolFromCy(CY,VARIANT_BOOL*);
-WINOLEAUTAPI VarBoolFromDec(DECIMAL*,VARIANT_BOOL*);
-WINOLEAUTAPI VarBoolFromDisp(IDispatch*,LCID,VARIANT_BOOL*);
-
-WINOLEAUTAPI VarI1FromUI1(BYTE,signed char*);
-WINOLEAUTAPI VarI1FromI2(SHORT,signed char*);
-WINOLEAUTAPI VarI1FromI4(LONG,signed char*);
-WINOLEAUTAPI VarI1FromI8(LONG64,signed char*);
-WINOLEAUTAPI VarI1FromR4(FLOAT,signed char*);
-WINOLEAUTAPI VarI1FromR8(DOUBLE,signed char*);
-WINOLEAUTAPI VarI1FromDate(DATE,signed char*);
-WINOLEAUTAPI VarI1FromStr(OLECHAR*,LCID,ULONG,signed char*);
-WINOLEAUTAPI VarI1FromBool(VARIANT_BOOL,signed char*);
-WINOLEAUTAPI VarI1FromUI2(USHORT,signed char*);
-WINOLEAUTAPI VarI1FromUI4(ULONG,signed char*);
-WINOLEAUTAPI VarI1FromUI8(ULONG64,signed char*);
-WINOLEAUTAPI VarI1FromCy(CY,signed char*);
-WINOLEAUTAPI VarI1FromDec(DECIMAL*,signed char*);
-WINOLEAUTAPI VarI1FromDisp(IDispatch*,LCID,signed char*);
-
-WINOLEAUTAPI VarUI2FromUI1(BYTE,USHORT*);
-WINOLEAUTAPI VarUI2FromI2(SHORT,USHORT*);
-WINOLEAUTAPI VarUI2FromI4(LONG,USHORT*);
-WINOLEAUTAPI VarUI2FromI8(LONG64,USHORT*);
-WINOLEAUTAPI VarUI2FromR4(FLOAT,USHORT*);
-WINOLEAUTAPI VarUI2FromR8(DOUBLE,USHORT*);
-WINOLEAUTAPI VarUI2FromDate(DATE,USHORT*);
-WINOLEAUTAPI VarUI2FromStr(OLECHAR*,LCID,ULONG,USHORT*);
-WINOLEAUTAPI VarUI2FromBool(VARIANT_BOOL,USHORT*);
-WINOLEAUTAPI VarUI2FromI1(signed char,USHORT*);
-WINOLEAUTAPI VarUI2FromUI4(ULONG,USHORT*);
-WINOLEAUTAPI VarUI2FromUI8(ULONG64,USHORT*);
-WINOLEAUTAPI VarUI2FromCy(CY,USHORT*);
-WINOLEAUTAPI VarUI2FromDec(DECIMAL*,USHORT*);
-WINOLEAUTAPI VarUI2FromDisp(IDispatch*,LCID,USHORT*);
-
-WINOLEAUTAPI VarUI4FromStr(OLECHAR*,LCID,ULONG,ULONG*);
-WINOLEAUTAPI VarUI4FromUI1(BYTE,ULONG*);
-WINOLEAUTAPI VarUI4FromI2(SHORT,ULONG*);
-WINOLEAUTAPI VarUI4FromI4(LONG,ULONG*);
-WINOLEAUTAPI VarUI4FromI8(LONG64,ULONG*);
-WINOLEAUTAPI VarUI4FromR4(FLOAT,ULONG*);
-WINOLEAUTAPI VarUI4FromR8(DOUBLE,ULONG*);
-WINOLEAUTAPI VarUI4FromDate(DATE,ULONG*);
-WINOLEAUTAPI VarUI4FromBool(VARIANT_BOOL,ULONG*);
-WINOLEAUTAPI VarUI4FromI1(signed char,ULONG*);
-WINOLEAUTAPI VarUI4FromUI2(USHORT,ULONG*);
-WINOLEAUTAPI VarUI4FromUI8(ULONG64,ULONG*);
-WINOLEAUTAPI VarUI4FromCy(CY,ULONG*);
-WINOLEAUTAPI VarUI4FromDec(DECIMAL*,ULONG*);
-WINOLEAUTAPI VarUI4FromDisp(IDispatch*,LCID,ULONG*);
-
-WINOLEAUTAPI VarUI8FromUI1(BYTE,ULONG64*);
-WINOLEAUTAPI VarUI8FromI2(SHORT,ULONG64*);
-WINOLEAUTAPI VarUI8FromI4(LONG,ULONG64*);
-WINOLEAUTAPI VarUI8FromI8(LONG64,ULONG64*);
-WINOLEAUTAPI VarUI8FromR4(FLOAT,ULONG64*);
-WINOLEAUTAPI VarUI8FromR8(DOUBLE,ULONG64*);
-WINOLEAUTAPI VarUI8FromDate(DATE,ULONG64*);
-WINOLEAUTAPI VarUI8FromStr(OLECHAR*,LCID,ULONG,ULONG64*);
-WINOLEAUTAPI VarUI8FromBool(VARIANT_BOOL,ULONG64*);
-WINOLEAUTAPI VarUI8FromI1(signed char,ULONG64*);
-WINOLEAUTAPI VarUI8FromUI2(USHORT,ULONG64*);
-WINOLEAUTAPI VarUI8FromUI4(ULONG,ULONG64*);
-WINOLEAUTAPI VarUI8FromDec(DECIMAL*,ULONG64*);
-WINOLEAUTAPI VarUI8FromInt(INT,ULONG64*);
-WINOLEAUTAPI VarUI8FromCy(CY,ULONG64*);
-WINOLEAUTAPI VarUI8FromDisp(IDispatch*,LCID,ULONG64*);
-
-WINOLEAUTAPI VarDecFromUI1(BYTE,DECIMAL*);
-WINOLEAUTAPI VarDecFromI2(SHORT,DECIMAL*);
-WINOLEAUTAPI VarDecFromI4(LONG,DECIMAL*);
-WINOLEAUTAPI VarDecFromI8(LONG64,DECIMAL*);
-WINOLEAUTAPI VarDecFromR4(FLOAT,DECIMAL*);
-WINOLEAUTAPI VarDecFromR8(DOUBLE,DECIMAL*);
-WINOLEAUTAPI VarDecFromDate(DATE,DECIMAL*);
-WINOLEAUTAPI VarDecFromStr(OLECHAR*,LCID,ULONG,DECIMAL*);
-WINOLEAUTAPI VarDecFromBool(VARIANT_BOOL,DECIMAL*);
-WINOLEAUTAPI VarDecFromI1(signed char,DECIMAL*);
-WINOLEAUTAPI VarDecFromUI2(USHORT,DECIMAL*);
-WINOLEAUTAPI VarDecFromUI4(ULONG,DECIMAL*);
-WINOLEAUTAPI VarDecFromUI8(ULONG64,DECIMAL*);
-WINOLEAUTAPI VarDecFromCy(CY,DECIMAL*);
-WINOLEAUTAPI VarDecFromDisp(IDispatch*,LCID,DECIMAL*);
-
-WINOLEAUTAPI VarDecNeg(const DECIMAL*,DECIMAL*);
-WINOLEAUTAPI VarR4CmpR8(float,double);
-WINOLEAUTAPI VarR8Pow(double,double,double*);
-WINOLEAUTAPI VarR8Round(double,int,double*);
-WINOLEAUTAPI VarDecAbs(const DECIMAL*,DECIMAL*);
-WINOLEAUTAPI VarDecAdd(const DECIMAL*,const DECIMAL*,DECIMAL*);
-WINOLEAUTAPI VarDecCmp(const DECIMAL*,const DECIMAL*);
-WINOLEAUTAPI VarDecCmpR8(const DECIMAL*,DOUBLE);
-WINOLEAUTAPI VarDecDiv(const DECIMAL*,const DECIMAL*,DECIMAL*);
-WINOLEAUTAPI VarDecFix(const DECIMAL*,DECIMAL*);
-WINOLEAUTAPI VarDecInt(const DECIMAL*,DECIMAL*);
-WINOLEAUTAPI VarDecMul(const DECIMAL*,const DECIMAL*,DECIMAL*);
-WINOLEAUTAPI VarDecRound(const DECIMAL*,int,DECIMAL*);
-WINOLEAUTAPI VarDecSub(const DECIMAL*,const DECIMAL*,DECIMAL*);
-WINOLEAUTAPI VarCyAbs(const CY,CY*);
-WINOLEAUTAPI VarCyAdd(const CY,const CY,CY*);
-WINOLEAUTAPI VarCyCmp(const CY,const CY);
-WINOLEAUTAPI VarCyCmpR8(const CY,DOUBLE);
-WINOLEAUTAPI VarCyFix(const CY,CY*);
-WINOLEAUTAPI VarCyInt(const CY,CY*);
-WINOLEAUTAPI VarCyMul(const CY,CY,CY*);
-WINOLEAUTAPI VarCyMulI4(const CY,LONG,CY*);
-WINOLEAUTAPI VarCyMulI8(const CY,LONG64,CY*);
-WINOLEAUTAPI VarCyNeg(const CY,CY*);
-WINOLEAUTAPI VarCyRound(const CY,INT,CY*);
-WINOLEAUTAPI VarCySub(const CY,const CY,CY*);
-WINOLEAUTAPI VarAdd(LPVARIANT,LPVARIANT,LPVARIANT);
-WINOLEAUTAPI VarAnd(LPVARIANT,LPVARIANT,LPVARIANT);
-WINOLEAUTAPI VarCat(LPVARIANT,LPVARIANT,LPVARIANT);
-WINOLEAUTAPI VarDiv(LPVARIANT,LPVARIANT,LPVARIANT);
-WINOLEAUTAPI VarEqv(LPVARIANT,LPVARIANT,LPVARIANT);
-WINOLEAUTAPI VarIdiv(LPVARIANT,LPVARIANT,LPVARIANT);
-WINOLEAUTAPI VarImp(LPVARIANT,LPVARIANT,LPVARIANT);
-WINOLEAUTAPI VarMod(LPVARIANT,LPVARIANT,LPVARIANT);
-WINOLEAUTAPI VarMul(LPVARIANT,LPVARIANT,LPVARIANT);
-WINOLEAUTAPI VarOr(LPVARIANT,LPVARIANT,LPVARIANT);
-WINOLEAUTAPI VarPow(LPVARIANT,LPVARIANT,LPVARIANT);
-WINOLEAUTAPI VarSub(LPVARIANT,LPVARIANT,LPVARIANT);
-WINOLEAUTAPI VarXor(LPVARIANT,LPVARIANT,LPVARIANT);
-WINOLEAUTAPI VarAbs(LPVARIANT,LPVARIANT);
-WINOLEAUTAPI VarFix(LPVARIANT,LPVARIANT);
-WINOLEAUTAPI VarInt(LPVARIANT,LPVARIANT);
-WINOLEAUTAPI VarNeg(LPVARIANT,LPVARIANT);
-WINOLEAUTAPI VarNot(LPVARIANT,LPVARIANT);
-WINOLEAUTAPI VarRound(LPVARIANT,int,LPVARIANT);
-WINOLEAUTAPI VarCmp(LPVARIANT,LPVARIANT,LCID,ULONG);
-WINOLEAUTAPI VarBstrCmp(BSTR,BSTR,LCID,ULONG);
-WINOLEAUTAPI VarBstrCat(BSTR,BSTR,BSTR*);
-
-#pragma pack(pop)
-
-#endif
diff --git a/winsup/w32api/include/olectl.h b/winsup/w32api/include/olectl.h
deleted file mode 100644
index f6e915f..0000000
--- a/winsup/w32api/include/olectl.h
+++ /dev/null
@@ -1,323 +0,0 @@
-#ifndef _OLECTL_H
-#define _OLECTL_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <ocidl.h>
-#include <olectlid.h>
-
-#define STD_CTL_SCODE(n) MAKE_SCODE(SEVERITY_ERROR,FACILITY_CONTROL,n)
-#define CTL_E_ILLEGALFUNCTIONCALL STD_CTL_SCODE(5)
-#define CTL_E_OVERFLOW STD_CTL_SCODE(6)
-#define CTL_E_OUTOFMEMORY STD_CTL_SCODE(7)
-#define CTL_E_DIVISIONBYZERO STD_CTL_SCODE(11)
-#define CTL_E_OUTOFSTRINGSPACE STD_CTL_SCODE(14)
-#define CTL_E_OUTOFSTACKSPACE STD_CTL_SCODE(28)
-#define CTL_E_BADFILENAMEORNUMBER STD_CTL_SCODE(52)
-#define CTL_E_FILENOTFOUND STD_CTL_SCODE(53)
-#define CTL_E_BADFILEMODE STD_CTL_SCODE(54)
-#define CTL_E_FILEALREADYOPEN STD_CTL_SCODE(55)
-#define CTL_E_DEVICEIOERROR STD_CTL_SCODE(57)
-#define CTL_E_FILEALREADYEXISTS STD_CTL_SCODE(58)
-#define CTL_E_BADRECORDLENGTH STD_CTL_SCODE(59)
-#define CTL_E_DISKFULL STD_CTL_SCODE(61)
-#define CTL_E_BADRECORDNUMBER STD_CTL_SCODE(63)
-#define CTL_E_BADFILENAME STD_CTL_SCODE(64)
-#define CTL_E_TOOMANYFILES STD_CTL_SCODE(67)
-#define CTL_E_DEVICEUNAVAILABLE STD_CTL_SCODE(68)
-#define CTL_E_PERMISSIONDENIED STD_CTL_SCODE(70)
-#define CTL_E_DISKNOTREADY STD_CTL_SCODE(71)
-#define CTL_E_PATHFILEACCESSERROR STD_CTL_SCODE(75)
-#define CTL_E_PATHNOTFOUND STD_CTL_SCODE(76)
-#define CTL_E_INVALIDPATTERNSTRING STD_CTL_SCODE(93)
-#define CTL_E_INVALIDUSEOFNULL STD_CTL_SCODE(94)
-#define CTL_E_INVALIDFILEFORMAT STD_CTL_SCODE(321)
-#define CTL_E_INVALIDPROPERTYVALUE STD_CTL_SCODE(380)
-#define CTL_E_INVALIDPROPERTYARRAYINDEX STD_CTL_SCODE(381)
-#define CTL_E_SETNOTSUPPORTEDATRUNTIME STD_CTL_SCODE(382)
-#define CTL_E_SETNOTSUPPORTED STD_CTL_SCODE(383)
-#define CTL_E_NEEDPROPERTYARRAYINDEX STD_CTL_SCODE(385)
-#define CTL_E_SETNOTPERMITTED STD_CTL_SCODE(387)
-#define CTL_E_GETNOTSUPPORTEDATRUNTIME STD_CTL_SCODE(393)
-#define CTL_E_GETNOTSUPPORTED STD_CTL_SCODE(394)
-#define CTL_E_PROPERTYNOTFOUND STD_CTL_SCODE(422)
-#define CTL_E_INVALIDCLIPBOARDFORMAT STD_CTL_SCODE(460)
-#define CTL_E_INVALIDPICTURE STD_CTL_SCODE(481)
-#define CTL_E_PRINTERERROR STD_CTL_SCODE(482)
-#define CTL_E_CANTSAVEFILETOTEMP STD_CTL_SCODE(735)
-#define CTL_E_SEARCHTEXTNOTFOUND STD_CTL_SCODE(744)
-#define CTL_E_REPLACEMENTSTOOLONG STD_CTL_SCODE(746)
-#define CUSTOM_CTL_SCODE(n) MAKE_SCODE(SEVERITY_ERROR,FACILITY_CONTROL,n)
-#define CTL_E_CUSTOM_FIRST CUSTOM_CTL_SCODE(600)
-#define CLASS_E_NOTLICENSED (CLASSFACTORY_E_FIRST+2)
-#define CONNECT_E_FIRST MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x200)
-#define CONNECT_E_LAST MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x20F)
-#define CONNECT_S_FIRST MAKE_SCODE(SEVERITY_SUCCESS,FACILITY_ITF,0x200)
-#define CONNECT_S_LAST MAKE_SCODE(SEVERITY_SUCCESS,FACILITY_ITF,0x20F)
-#define CONNECT_E_NOCONNECTION (CONNECT_E_FIRST+0)
-#define CONNECT_E_ADVISELIMIT (CONNECT_E_FIRST+1)
-#define CONNECT_E_CANNOTCONNECT (CONNECT_E_FIRST+2)
-#define CONNECT_E_OVERRIDDEN (CONNECT_E_FIRST+3)
-#define SELFREG_E_FIRST MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x200)
-#define SELFREG_E_LAST MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x20F)
-#define SELFREG_S_FIRST MAKE_SCODE(SEVERITY_SUCCESS,FACILITY_ITF,0x200)
-#define SELFREG_S_LAST MAKE_SCODE(SEVERITY_SUCCESS,FACILITY_ITF,0x20F)
-#define SELFREG_E_TYPELIB (SELFREG_E_FIRST+0)
-#define SELFREG_E_CLASS (SELFREG_E_FIRST+1)
-#define PERPROP_E_FIRST MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x200)
-#define PERPROP_E_LAST MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x20F)
-#define PERPROP_S_FIRST MAKE_SCODE(SEVERITY_SUCCESS,FACILITY_ITF,0x200)
-#define PERPROP_S_LAST MAKE_SCODE(SEVERITY_SUCCESS,FACILITY_ITF,0x20F)
-#define PERPROP_E_NOPAGEAVAILABLE PERPROP_E_FIRST
-#define OLEMISC_RECOMPOSEONRESIZE 0x1
-#define OLEMISC_ONLYICONIC 0x2
-#define OLEMISC_INSERTNOTREPLACE 0x4
-#define OLEMISC_STATIC 0x8
-#define OLEMISC_CANTLINKINSIDE 0x10
-#define OLEMISC_CANLINKBYOLE1 0x20
-#define OLEMISC_ISLINKOBJECT 0x40
-#define OLEMISC_INSIDEOUT 0x80
-#define OLEMISC_ACTIVATEWHENVISIBLE 0x100
-#define OLEMISC_RENDERINGISDEVICEINDEPENDENT 0x200
-#define OLEMISC_INVISIBLEATRUNTIME 0x400
-#define OLEMISC_ALWAYSRUN 0x800
-#define OLEMISC_ACTSLIKEBUTTON 0x1000
-#define OLEMISC_ACTSLIKELABEL 0x2000
-#define OLEMISC_NOUIACTIVATE 0x4000
-#define OLEMISC_ALIGNABLE 0x8000
-#define OLEMISC_SIMPLEFRAME 0x10000
-#define OLEMISC_SETCLIENTSITEFIRST 0x20000
-#define OLEMISC_IMEMODE 0x40000
-#define OLEMISC_IGNOREACTIVATEWHENVISIBLE 0x80000
-#define OLEMISC_WANTSTOMENUMERGE 0x100000
-#define OLEMISC_SUPPORTSMULTILEVELUNDO 0x200000
-#define OLEIVERB_PROPERTIES (-7)
-#define VT_STREAMED_PROPSET 73
-#define VT_STORED_PROPSET 74
-#define VT_BLOB_PROPSET 75
-#define VT_VERBOSE_ENUM 76
-#define VT_COLOR VT_I4
-#define VT_XPOS_PIXELS VT_I4
-#define VT_YPOS_PIXELS VT_I4
-#define VT_XSIZE_PIXELS VT_I4
-#define VT_YSIZE_PIXELS VT_I4
-#define VT_XPOS_HIMETRIC VT_I4
-#define VT_YPOS_HIMETRIC VT_I4
-#define VT_XSIZE_HIMETRIC VT_I4
-#define VT_YSIZE_HIMETRIC VT_I4
-#define VT_TRISTATE VT_I2
-#define VT_OPTEXCLUSIVE VT_BOOL
-#define VT_FONT VT_DISPATCH
-#define VT_PICTURE VT_DISPATCH
-#define VT_HANDLE VT_I4
-#define OCM__BASE (WM_USER+0x1c00)
-#define OCM_COMMAND (OCM__BASE+WM_COMMAND)
-#define OCM_CTLCOLORBTN (OCM__BASE+WM_CTLCOLORBTN)
-#define OCM_CTLCOLOREDIT (OCM__BASE+WM_CTLCOLOREDIT)
-#define OCM_CTLCOLORDLG (OCM__BASE+WM_CTLCOLORDLG)
-#define OCM_CTLCOLORLISTBOX (OCM__BASE+WM_CTLCOLORLISTBOX)
-#define OCM_CTLCOLORMSGBOX (OCM__BASE+WM_CTLCOLORMSGBOX)
-#define OCM_CTLCOLORSCROLLBAR (OCM__BASE+WM_CTLCOLORSCROLLBAR)
-#define OCM_CTLCOLORSTATIC (OCM__BASE+WM_CTLCOLORSTATIC)
-#define OCM_DRAWITEM (OCM__BASE+WM_DRAWITEM)
-#define OCM_MEASUREITEM (OCM__BASE+WM_MEASUREITEM)
-#define OCM_DELETEITEM (OCM__BASE+WM_DELETEITEM)
-#define OCM_VKEYTOITEM (OCM__BASE+WM_VKEYTOITEM)
-#define OCM_CHARTOITEM (OCM__BASE+WM_CHARTOITEM)
-#define OCM_COMPAREITEM (OCM__BASE+WM_COMPAREITEM)
-#define OCM_HSCROLL (OCM__BASE+WM_HSCROLL)
-#define OCM_VSCROLL (OCM__BASE+WM_VSCROLL)
-#define OCM_PARENTNOTIFY (OCM__BASE+WM_PARENTNOTIFY)
-#define OCM_NOTIFY (OCM__BASE+WM_NOTIFY)
-#define CTRLINFO_EATS_RETURN 1
-#define CTRLINFO_EATS_ESCAPE 2
-#define XFORMCOORDS_POSITION 1
-#define XFORMCOORDS_SIZE 2
-#define XFORMCOORDS_HIMETRICTOCONTAINER 4
-#define XFORMCOORDS_CONTAINERTOHIMETRIC 8
-#define GUIDKIND_DEFAULT_SOURCE_DISP_IID 1
-#define PROPPAGESTATUS_DIRTY 1
-#define PROPPAGESTATUS_VALIDATE 2
-#define FONTSIZE(n) {n##0000,0}
-#define PICTURE_SCALABLE 1
-#define PICTURE_TRANSPARENT 2
-#define PICTYPE_UNINITIALIZED (-1)
-#define PICTYPE_NONE 0
-#define PICTYPE_BITMAP 1
-#define PICTYPE_METAFILE 2
-#define PICTYPE_ICON 3
-#define PICTYPE_ENHMETAFILE 4
-#define DISPID_AUTOSIZE (-500)
-#define DISPID_BACKCOLOR (-501)
-#define DISPID_BACKSTYLE (-502)
-#define DISPID_BORDERCOLOR (-503)
-#define DISPID_BORDERSTYLE (-504)
-#define DISPID_BORDERWIDTH (-505)
-#define DISPID_DRAWMODE (-507)
-#define DISPID_DRAWSTYLE (-508)
-#define DISPID_DRAWWIDTH (-509)
-#define DISPID_FILLCOLOR (-510)
-#define DISPID_FILLSTYLE (-511)
-#define DISPID_FONT (-512)
-#define DISPID_FORECOLOR (-513)
-#define DISPID_ENABLED (-514)
-#define DISPID_HWND (-515)
-#define DISPID_TABSTOP (-516)
-#define DISPID_TEXT (-517)
-#define DISPID_CAPTION (-518)
-#define DISPID_BORDERVISIBLE (-519)
-#define DISPID_APPEARANCE (-520)
-#define DISPID_MOUSEPOINTER (-521)
-#define DISPID_MOUSEICON (-522)
-#define DISPID_PICTURE (-523)
-#define DISPID_VALID (-524)
-#define DISPID_REFRESH (-550)
-#define DISPID_DOCLICK (-551)
-#define DISPID_ABOUTBOX (-552)
-#define DISPID_CLICK (-600)
-#define DISPID_DBLCLICK (-601)
-#define DISPID_KEYDOWN (-602)
-#define DISPID_KEYPRESS (-603)
-#define DISPID_KEYUP (-604)
-#define DISPID_MOUSEDOWN (-605)
-#define DISPID_MOUSEMOVE (-606)
-#define DISPID_MOUSEUP (-607)
-#define DISPID_ERROREVENT (-608)
-#define DISPID_AMBIENT_BACKCOLOR (-701)
-#define DISPID_AMBIENT_DISPLAYNAME (-702)
-#define DISPID_AMBIENT_FONT (-703)
-#define DISPID_AMBIENT_FORECOLOR (-704)
-#define DISPID_AMBIENT_LOCALEID (-705)
-#define DISPID_AMBIENT_MESSAGEREFLECT (-706)
-#define DISPID_AMBIENT_SCALEUNITS (-707)
-#define DISPID_AMBIENT_TEXTALIGN (-708)
-#define DISPID_AMBIENT_USERMODE (-709)
-#define DISPID_AMBIENT_UIDEAD (-710)
-#define DISPID_AMBIENT_SHOWGRABHANDLES (-711)
-#define DISPID_AMBIENT_SHOWHATCHING (-712)
-#define DISPID_AMBIENT_DISPLAYASDEFAULT (-713)
-#define DISPID_AMBIENT_SUPPORTSMNEMONICS (-714)
-#define DISPID_AMBIENT_AUTOCLIP (-715)
-#define DISPID_AMBIENT_APPEARANCE (-716)
-#define DISPID_AMBIENT_CODEPAGE (-725)
-#define DISPID_AMBIENT_PALETTE (-726)
-#define DISPID_AMBIENT_CHARSET (-727)
-#define DISPID_AMBIENT_RIGHTTOLEFT (-732)
-#define DISPID_AMBIENT_TOPTOBOTTOM (-733)
-
-#define DISPID_FONT_NAME 0
-#define DISPID_FONT_SIZE 2
-#define DISPID_FONT_BOLD 3
-#define DISPID_FONT_ITALIC 4
-#define DISPID_FONT_UNDER 5
-#define DISPID_FONT_STRIKE 6
-#define DISPID_FONT_WEIGHT 7
-#define DISPID_FONT_CHARSET 8
-#define DISPID_PICT_HANDLE 0
-#define DISPID_PICT_HPAL 2
-#define DISPID_PICT_TYPE 3
-#define DISPID_PICT_WIDTH 4
-#define DISPID_PICT_HEIGHT 5
-#define DISPID_PICT_RENDER 6
-
-typedef _COM_interface IOleControl *LPOLECONTROL;
-typedef _COM_interface IOleControlSite *LPOLECONTROLSITE;
-typedef _COM_interface ISimpleFrameSite *LPSIMPLEFRAMESITE;
-typedef _COM_interface IPersistPropertyBag *LPPERSISTPROPERTYBAG;
-typedef _COM_interface IPersistStreamInit *LPPERSISTSTREAMINIT;
-typedef _COM_interface IPersistMemory *LPPERSISTMEMORY;
-typedef _COM_interface IPropertyNotifySink* LPPROPERTYNOTIFYSINK;
-typedef _COM_interface IProvideClassInfo *LPPROVIDECLASSINFO;
-typedef _COM_interface IProvideClassInfo2 *LPPROVIDECLASSINFO2;
-typedef _COM_interface IConnectionPointContainer *LPCONNECTIONPOINTCONTAINER;
-typedef _COM_interface IClassFactory2 *LPCLASSFACTORY2;
-typedef _COM_interface ISpecifyPropertyPages *LPSPECIFYPROPERTYPAGES;
-typedef _COM_interface IPerPropertyBrowsing *LPPERPROPERTYBROWSING;
-typedef _COM_interface IPropertyPage *LPPROPERTYPAGE;
-typedef _COM_interface IPropertyPage2 *LPPROPERTYPAGE2;
-
-typedef _COM_interface IPicture *LPPICTURE;
-typedef _COM_interface IPictureDisp *LPPICTUREDISP;
-typedef long OLE_XPOS_PIXELS;
-typedef long OLE_YPOS_PIXELS;
-typedef long OLE_XSIZE_PIXELS;
-typedef long OLE_YSIZE_PIXELS;
-typedef float OLE_XPOS_CONTAINER;
-typedef float OLE_YPOS_CONTAINER;
-typedef float OLE_XSIZE_CONTAINER;
-
-typedef VARIANT_BOOL OLE_OPTEXCLUSIVE;
-typedef VARIANT_BOOL OLE_CANCELBOOL;
-typedef VARIANT_BOOL OLE_ENABLEDEFAULTBOOL;
-
-#pragma pack(push,8)
-typedef enum { triUnchecked,triChecked1,triGray } OLE_TRISTATE;
-typedef struct tagOCPFIPARAMS {
- ULONG cbStructSize;
- HWND hWndOwner;
- int x;
- int y;
- LPCOLESTR lpszCaption;
- ULONG cObjects;
- LPUNKNOWN *lplpUnk;
- ULONG cPages;
- CLSID *lpPages;
- LCID lcid;
- DISPID dispidInitialProperty;
-} OCPFIPARAMS,*LPOCPFIPARAMS;
-typedef struct tagFONTDESC {
- UINT cbSizeofstruct;
- LPOLESTR lpstrName;
- CY cySize;
- SHORT sWeight;
- SHORT sCharset;
- BOOL fItalic;
- BOOL fUnderline;
- BOOL fStrikethrough;
-} FONTDESC,*LPFONTDESC;
-typedef struct tagPICTDESC {
- UINT cbSizeofstruct;
- UINT picType;
- _ANONYMOUS_UNION union {
- struct {
- HBITMAP hbitmap;
- HPALETTE hpal;
- } bmp;
- struct {
- HMETAFILE hmeta;
- int xExt;
- int yExt;
- } wmf;
- struct {
- HICON hicon;
- } icon;
- struct {
- HENHMETAFILE hemf;
- } emf;
- } DUMMYUNIONNAME;
-} PICTDESC,*LPPICTDESC;
-#pragma pack(pop)
-
-STDAPI DllRegisterServer(void);
-STDAPI DllUnregisterServer(void);
-STDAPI OleCreateFontIndirect(LPFONTDESC,REFIID,PVOID*);
-STDAPI OleCreatePictureIndirect(LPPICTDESC,REFIID,BOOL,PVOID*);
-STDAPI OleCreatePropertyFrame(HWND,UINT,UINT,LPCOLESTR,ULONG,LPUNKNOWN*,ULONG,LPCLSID,LCID,DWORD,PVOID);
-STDAPI OleCreatePropertyFrameIndirect(LPOCPFIPARAMS);
-STDAPI_(HCURSOR) OleIconToCursor(HINSTANCE,HICON);
-STDAPI OleLoadPicture(LPSTREAM,LONG,BOOL,REFIID,PVOID*);
-STDAPI OleLoadPictureEx(LPSTREAM,LONG,BOOL,REFIID,DWORD,DWORD,DWORD,LPVOID*);
-STDAPI OleLoadPicturePath(LPOLESTR,LPUNKNOWN,DWORD,OLE_COLOR,REFIID,LPVOID*);
-STDAPI OleLoadPictureFile(VARIANT,LPDISPATCH*);
-STDAPI OleLoadPictureFileEx(VARIANT,DWORD,DWORD,DWORD,LPDISPATCH*);
-STDAPI OleSavePictureFile(LPDISPATCH,BSTR);
-STDAPI OleTranslateColor(OLE_COLOR,HPALETTE,COLORREF*);
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/olectlid.h b/winsup/w32api/include/olectlid.h
deleted file mode 100644
index 73e935c..0000000
--- a/winsup/w32api/include/olectlid.h
+++ /dev/null
@@ -1,114 +0,0 @@
-#ifndef _OLECTLID_H
-#define _OLECTLID_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern const GUID IID_IDispatch;
-extern const GUID IID_IPropertyNotifySink;
-extern const GUID IID_IClassFactory2;
-extern const GUID IID_IProvideClassInfo;
-extern const GUID IID_IProvideClassInfo2;
-extern const GUID IID_IConnectionPointContainer;
-extern const GUID IID_IEnumConnectionPoints;
-extern const GUID IID_IConnectionPoint;
-extern const GUID IID_IEnumConnections;
-extern const GUID IID_IOleControl;
-extern const GUID IID_IOleControlSite;
-extern const GUID IID_ISimpleFrameSite;
-extern const GUID IID_IPersistStreamInit;
-extern const GUID IID_IPersistMemory;
-extern const GUID IID_IPersistPropertyBag;
-extern const GUID IID_IPropertyBag;
-extern const GUID IID_IErrorLog;
-extern const GUID IID_IPropertyFrame;
-extern const GUID IID_ISpecifyPropertyPages;
-extern const GUID IID_IPerPropertyBrowsing;
-extern const GUID IID_IPropertyPageSite;
-extern const GUID IID_IPropertyPage;
-extern const GUID IID_IPropertyPage2;
-extern const GUID CLSID_CFontPropPage;
-extern const GUID CLSID_CColorPropPage;
-extern const GUID CLSID_CPicturePropPage;
-extern const GUID CLSID_PersistPropset;
-extern const GUID CLSID_ConvertVBX;
-extern const GUID CLSID_StdFont;
-extern const GUID CLSID_StdPicture;
-extern const GUID IID_IFont;
-extern const GUID IID_IFontDisp;
-extern const GUID IID_IPicture;
-extern const GUID IID_IPictureDisp;
-extern const GUID GUID_HIMETRIC;
-extern const GUID GUID_COLOR;
-extern const GUID GUID_XPOSPIXEL;
-extern const GUID GUID_YPOSPIXEL;
-extern const GUID GUID_XSIZEPIXEL;
-extern const GUID GUID_YSIZEPIXEL;
-extern const GUID GUID_XPOS;
-extern const GUID GUID_YPOS;
-extern const GUID GUID_XSIZE;
-extern const GUID GUID_YSIZE;
-extern const GUID GUID_TRISTATE;
-extern const GUID GUID_OPTIONVALUEEXCLUSIVE;
-extern const GUID GUID_CHECKVALUEEXCLUSIVE;
-extern const GUID GUID_FONTNAME;
-extern const GUID GUID_FONTSIZE;
-extern const GUID GUID_FONTBOLD;
-extern const GUID GUID_FONTITALIC;
-extern const GUID GUID_FONTUNDERSCORE;
-extern const GUID GUID_FONTSTRIKETHROUGH;
-extern const GUID GUID_HANDLE;
-extern const GUID IID_IEnumUnknown;
-extern const GUID IID_IEnumString;
-extern const GUID IID_IEnumMoniker;
-extern const GUID IID_IEnumFORMATETC;
-extern const GUID IID_IEnumOLEVERB;
-extern const GUID IID_IEnumSTATDATA;
-extern const GUID IID_IEnumSTATSTG;
-extern const GUID IID_IEnumGeneric;
-extern const GUID IID_IEnumHolder;
-extern const GUID IID_IEnumCallback;
-extern const GUID IID_IPersistStream;
-extern const GUID IID_IPersistStorage;
-extern const GUID IID_IPersistFile;
-extern const GUID IID_IPersist;
-extern const GUID IID_IViewObject;
-extern const GUID IID_IDataObject;
-extern const GUID IID_IAdviseSink;
-extern const GUID IID_IDataAdviseHolder;
-extern const GUID IID_IOleAdviseHolder;
-extern const GUID IID_IOleObject;
-extern const GUID IID_IOleInPlaceObject;
-extern const GUID IID_IOleWindow;
-extern const GUID IID_IOleInPlaceUIWindow;
-extern const GUID IID_IOleInPlaceFrame;
-extern const GUID IID_IOleInPlaceActiveObject;
-extern const GUID IID_IOleClientSite;
-extern const GUID IID_IOleInPlaceSite;
-extern const GUID IID_IParseDisplayName;
-extern const GUID IID_IOleContainer;
-extern const GUID IID_IOleItemContainer;
-extern const GUID IID_IOleLink;
-extern const GUID IID_IOleCache;
-extern const GUID IID_IOleManager;
-extern const GUID IID_IOlePresObj;
-extern const GUID IID_IDropSource;
-extern const GUID IID_IDropTarget;
-extern const GUID IID_IDebug;
-extern const GUID IID_IDebugStream;
-extern const GUID IID_IAdviseSink2;
-extern const GUID IID_IRunnableObject;
-extern const GUID IID_IViewObject2;
-extern const GUID IID_IOleCache2;
-extern const GUID IID_IOleCacheControl;
-extern const GUID CLSID_Picture_Metafile;
-extern const GUID CLSID_Picture_Dib;
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/oledlg.h b/winsup/w32api/include/oledlg.h
deleted file mode 100644
index 27ed2ad..0000000
--- a/winsup/w32api/include/oledlg.h
+++ /dev/null
@@ -1,935 +0,0 @@
-#ifndef _OLEDLG_H
-#define _OLEDLG_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include <windows.h>
-#include <shellapi.h>
-#include <commdlg.h>
-#include <ole2.h>
-#include <string.h>
-/* #include <tchar.h> */
-#include <dlgs.h>
-#include <prsht.h>
-#define PS_MAXLINKTYPES 8
-#define OLESTDDELIM TEXT("\\")
-#define SZOLEUI_MSG_HELP TEXT("OLEUI_MSG_HELP")
-#define SZOLEUI_MSG_ENDDIALOG TEXT("OLEUI_MSG_ENDDIALOG")
-#define SZOLEUI_MSG_BROWSE TEXT("OLEUI_MSG_BROWSE")
-#define SZOLEUI_MSG_CHANGEICON TEXT("OLEUI_MSG_CHANGEICON")
-#define SZOLEUI_MSG_CLOSEBUSYDIALOG TEXT("OLEUI_MSG_CLOSEBUSYDIALOG")
-#define SZOLEUI_MSG_CONVERT TEXT("OLEUI_MSG_CONVERT")
-#define SZOLEUI_MSG_CHANGESOURCE TEXT("OLEUI_MSG_CHANGESOURCE")
-#define SZOLEUI_MSG_ADDCONTROL TEXT("OLEUI_MSG_ADDCONTROL")
-#define SZOLEUI_MSG_BROWSE_OFN TEXT("OLEUI_MSG_BROWSE_OFN")
-#define PROP_HWND_CHGICONDLG TEXT("HWND_CIDLG")
-#define IDC_OLEUIHELP 99
-#define IDC_IO_CREATENEW 2100
-#define IDC_IO_CREATEFROMFILE 2101
-#define IDC_IO_LINKFILE 2102
-#define IDC_IO_OBJECTTYPELIST 2103
-#define IDC_IO_DISPLAYASICON 2104
-#define IDC_IO_CHANGEICON 2105
-#define IDC_IO_FILE 2106
-#define IDC_IO_FILEDISPLAY 2107
-#define IDC_IO_RESULTIMAGE 2108
-#define IDC_IO_RESULTTEXT 2109
-#define IDC_IO_ICONDISPLAY 2110
-#define IDC_IO_OBJECTTYPETEXT 2111
-#define IDC_IO_FILETEXT 2112
-#define IDC_IO_FILETYPE 2113
-#define IDC_IO_INSERTCONTROL 2114
-#define IDC_IO_ADDCONTROL 2115
-#define IDC_IO_CONTROLTYPELIST 2116
-#define IDC_PS_PASTE 500
-#define IDC_PS_PASTELINK 501
-#define IDC_PS_SOURCETEXT 502
-#define IDC_PS_PASTELIST 503
-#define IDC_PS_PASTELINKLIST 504
-#define IDC_PS_DISPLAYLIST 505
-#define IDC_PS_DISPLAYASICON 506
-#define IDC_PS_ICONDISPLAY 507
-#define IDC_PS_CHANGEICON 508
-#define IDC_PS_RESULTIMAGE 509
-#define IDC_PS_RESULTTEXT 510
-#define IDC_CI_GROUP 120
-#define IDC_CI_CURRENT 121
-#define IDC_CI_CURRENTICON 122
-#define IDC_CI_DEFAULT 123
-#define IDC_CI_DEFAULTICON 124
-#define IDC_CI_FROMFILE 125
-#define IDC_CI_FROMFILEEDIT 126
-#define IDC_CI_ICONLIST 127
-#define IDC_CI_LABEL 128
-#define IDC_CI_LABELEDIT 129
-#define IDC_CI_BROWSE 130
-#define IDC_CI_ICONDISPLAY 131
-#define IDC_CV_OBJECTTYPE 150
-#define IDC_CV_DISPLAYASICON 152
-#define IDC_CV_CHANGEICON 153
-#define IDC_CV_ACTIVATELIST 154
-#define IDC_CV_CONVERTTO 155
-#define IDC_CV_ACTIVATEAS 156
-#define IDC_CV_RESULTTEXT 157
-#define IDC_CV_CONVERTLIST 158
-#define IDC_CV_ICONDISPLAY 165
-#define IDC_EL_CHANGESOURCE 201
-#define IDC_EL_AUTOMATIC 202
-#define IDC_EL_CANCELLINK 209
-#define IDC_EL_UPDATENOW 210
-#define IDC_EL_OPENSOURCE 211
-#define IDC_EL_MANUAL 212
-#define IDC_EL_LINKSOURCE 216
-#define IDC_EL_LINKTYPE 217
-#define IDC_EL_LINKSLISTBOX 206
-#define IDC_EL_COL1 220
-#define IDC_EL_COL2 221
-#define IDC_EL_COL3 222
-#define IDC_BZ_RETRY 600
-#define IDC_BZ_ICON 601
-#define IDC_BZ_MESSAGE1 602
-#define IDC_BZ_SWITCHTO 604
-#define IDC_UL_METER 1029
-#define IDC_UL_STOP 1030
-#define IDC_UL_PERCENT 1031
-#define IDC_UL_PROGRESS 1032
-#define IDC_PU_LINKS 900
-#define IDC_PU_TEXT 901
-#define IDC_PU_CONVERT 902
-#define IDC_PU_ICON 908
-#define IDC_GP_OBJECTNAME 1009
-#define IDC_GP_OBJECTTYPE 1010
-#define IDC_GP_OBJECTSIZE 1011
-#define IDC_GP_CONVERT 1013
-#define IDC_GP_OBJECTICON 1014
-#define IDC_GP_OBJECTLOCATION 1022
-#define IDC_VP_PERCENT 1000
-#define IDC_VP_CHANGEICON 1001
-#define IDC_VP_EDITABLE 1002
-#define IDC_VP_ASICON 1003
-#define IDC_VP_RELATIVE 1005
-#define IDC_VP_SPIN 1006
-#define IDC_VP_SCALETXT 1034
-#define IDC_VP_ICONDISPLAY 1021
-#define IDC_VP_RESULTIMAGE 1033
-#define IDC_LP_OPENSOURCE 1006
-#define IDC_LP_UPDATENOW 1007
-#define IDC_LP_BREAKLINK 1008
-#define IDC_LP_LINKSOURCE 1012
-#define IDC_LP_CHANGESOURCE 1015
-#define IDC_LP_AUTOMATIC 1016
-#define IDC_LP_MANUAL 1017
-#define IDC_LP_DATE 1018
-#define IDC_LP_TIME 1019
-#define IDD_INSERTOBJECT 1000
-#define IDD_CHANGEICON 1001
-#define IDD_CONVERT 1002
-#define IDD_PASTESPECIAL 1003
-#define IDD_EDITLINKS 1004
-#define IDD_BUSY 1006
-#define IDD_UPDATELINKS 1007
-#define IDD_CHANGESOURCE 1009
-#define IDD_INSERTFILEBROWSE 1010
-#define IDD_CHANGEICONBROWSE 1011
-#define IDD_CONVERTONLY 1012
-#define IDD_CHANGESOURCE4 1013
-#define IDD_GNRLPROPS 1100
-#define IDD_VIEWPROPS 1101
-#define IDD_LINKPROPS 1102
-#define IDD_CANNOTUPDATELINK 1008
-#define IDD_LINKSOURCEUNAVAILABLE 1020
-#define IDD_SERVERNOTFOUND 1023
-#define IDD_OUTOFMEMORY 1024
-#define IDD_SERVERNOTREGW 1021
-#define IDD_LINKTYPECHANGEDW 1022
-#define IDD_SERVERNOTREGA 1025
-#define IDD_LINKTYPECHANGEDA 1026
-#define ID_BROWSE_CHANGEICON 1
-#define ID_BROWSE_INSERTFILE 2
-#define ID_BROWSE_ADDCONTROL 3
-#define ID_BROWSE_CHANGESOURCE 4
-#define OLEUI_FALSE 0
-#define OLEUI_SUCCESS 1
-#define OLEUI_OK 1
-#define OLEUI_CANCEL 2
-#define OLEUI_ERR_STANDARDMIN 100
-#define OLEUI_ERR_STRUCTURENULL 101
-#define OLEUI_ERR_STRUCTUREINVALID 102
-#define OLEUI_ERR_CBSTRUCTINCORRECT 103
-#define OLEUI_ERR_HWNDOWNERINVALID 104
-#define OLEUI_ERR_LPSZCAPTIONINVALID 105
-#define OLEUI_ERR_LPFNHOOKINVALID 106
-#define OLEUI_ERR_HINSTANCEINVALID 107
-#define OLEUI_ERR_LPSZTEMPLATEINVALID 108
-#define OLEUI_ERR_HRESOURCEINVALID 109
-#define OLEUI_ERR_FINDTEMPLATEFAILURE 110
-#define OLEUI_ERR_LOADTEMPLATEFAILURE 111
-#define OLEUI_ERR_DIALOGFAILURE 112
-#define OLEUI_ERR_LOCALMEMALLOC 113
-#define OLEUI_ERR_GLOBALMEMALLOC 114
-#define OLEUI_ERR_LOADSTRING 115
-#define OLEUI_ERR_OLEMEMALLOC 116
-#define OLEUI_ERR_STANDARDMAX 116
-#define OPF_OBJECTISLINK 1
-#define OPF_NOFILLDEFAULT 2
-#define OPF_SHOWHELP 4
-#define OPF_DISABLECONVERT 8
-#define OLEUI_OPERR_SUBPROPNULL OLEUI_ERR_STANDARDMAX
-#define OLEUI_OPERR_SUBPROPINVALID (OLEUI_ERR_STANDARDMAX+1)
-#define OLEUI_OPERR_PROPSHEETNULL (OLEUI_ERR_STANDARDMAX+2)
-#define OLEUI_OPERR_PROPSHEETINVALID (OLEUI_ERR_STANDARDMAX+3)
-#define OLEUI_OPERR_SUPPROP (OLEUI_ERR_STANDARDMAX+4)
-#define OLEUI_OPERR_PROPSINVALID (OLEUI_ERR_STANDARDMAX+5)
-#define OLEUI_OPERR_PAGESINCORRECT (OLEUI_ERR_STANDARDMAX+6)
-#define OLEUI_OPERR_INVALIDPAGES (OLEUI_ERR_STANDARDMAX+7)
-#define OLEUI_OPERR_NOTSUPPORTED (OLEUI_ERR_STANDARDMAX+8)
-#define OLEUI_OPERR_DLGPROCNOTNULL (OLEUI_ERR_STANDARDMAX+9)
-#define OLEUI_OPERR_LPARAMNOTZERO (OLEUI_ERR_STANDARDMAX+10)
-#define OLEUI_GPERR_STRINGINVALID (OLEUI_ERR_STANDARDMAX+11)
-#define OLEUI_GPERR_CLASSIDINVALID (OLEUI_ERR_STANDARDMAX+12)
-#define OLEUI_GPERR_LPCLSIDEXCLUDEINVALID (OLEUI_ERR_STANDARDMAX+13)
-#define OLEUI_GPERR_CBFORMATINVALID (OLEUI_ERR_STANDARDMAX+14)
-#define OLEUI_VPERR_METAPICTINVALID (OLEUI_ERR_STANDARDMAX+15)
-#define OLEUI_VPERR_DVASPECTINVALID (OLEUI_ERR_STANDARDMAX+16)
-#define OLEUI_LPERR_LINKCNTRNULL (OLEUI_ERR_STANDARDMAX+17)
-#define OLEUI_LPERR_LINKCNTRINVALID (OLEUI_ERR_STANDARDMAX+18)
-#define OLEUI_OPERR_PROPERTYSHEET (OLEUI_ERR_STANDARDMAX+19)
-#define OLEUI_OPERR_OBJINFOINVALID (OLEUI_ERR_STANDARDMAX+20)
-#define OLEUI_OPERR_LINKINFOINVALID (OLEUI_ERR_STANDARDMAX+21)
-#define OLEUI_QUERY_GETCLASSID 65280
-#define OLEUI_QUERY_LINKBROKEN 65281
-#define IOF_SHOWHELP 1
-#define IOF_SELECTCREATENEW 2
-#define IOF_SELECTCREATEFROMFILE 4
-#define IOF_CHECKLINK 8
-#define IOF_CHECKDISPLAYASICON 16
-#define IOF_CREATENEWOBJECT 32
-#define IOF_CREATEFILEOBJECT 64
-#define IOF_CREATELINKOBJECT 128
-#define IOF_DISABLELINK 256
-#define IOF_VERIFYSERVERSEXIST 512
-#define IOF_DISABLEDISPLAYASICON 1024
-#define IOF_HIDECHANGEICON 2048
-#define IOF_SHOWINSERTCONTROL 4096
-#define IOF_SELECTCREATECONTROL 8192
-#define OLEUI_IOERR_LPSZFILEINVALID OLEUI_ERR_STANDARDMAX
-#define OLEUI_IOERR_LPSZLABELINVALID (OLEUI_ERR_STANDARDMAX+1)
-#define OLEUI_IOERR_HICONINVALID (OLEUI_ERR_STANDARDMAX+2)
-#define OLEUI_IOERR_LPFORMATETCINVALID (OLEUI_ERR_STANDARDMAX+3)
-#define OLEUI_IOERR_PPVOBJINVALID (OLEUI_ERR_STANDARDMAX+4)
-#define OLEUI_IOERR_LPIOLECLIENTSITEINVALID (OLEUI_ERR_STANDARDMAX+5)
-#define OLEUI_IOERR_LPISTORAGEINVALID (OLEUI_ERR_STANDARDMAX+6)
-#define OLEUI_IOERR_SCODEHASERROR (OLEUI_ERR_STANDARDMAX+7)
-#define OLEUI_IOERR_LPCLSIDEXCLUDEINVALID (OLEUI_ERR_STANDARDMAX+8)
-#define OLEUI_IOERR_CCHFILEINVALID (OLEUI_ERR_STANDARDMAX+9)
-#define PSF_SHOWHELP 1
-#define PSF_SELECTPASTE 2
-#define PSF_SELECTPASTELINK 4
-#define PSF_CHECKDISPLAYASICON 8
-#define PSF_DISABLEDISPLAYASICON 16
-#define PSF_HIDECHANGEICON 32
-#define PSF_STAYONCLIPBOARDCHANGE 64
-#define PSF_NOREFRESHDATAOBJECT 128
-#define OLEUI_IOERR_SRCDATAOBJECTINVALID OLEUI_ERR_STANDARDMAX
-#define OLEUI_IOERR_ARRPASTEENTRIESINVALID (OLEUI_ERR_STANDARDMAX+1)
-#define OLEUI_IOERR_ARRLINKTYPESINVALID (OLEUI_ERR_STANDARDMAX+2)
-#define OLEUI_PSERR_CLIPBOARDCHANGED (OLEUI_ERR_STANDARDMAX+3)
-#define OLEUI_PSERR_GETCLIPBOARDFAILED (OLEUI_ERR_STANDARDMAX+4)
-#define OLEUI_ELERR_LINKCNTRNULL OLEUI_ERR_STANDARDMAX
-#define OLEUI_ELERR_LINKCNTRINVALID (OLEUI_ERR_STANDARDMAX+1)
-#define ELF_SHOWHELP 1
-#define ELF_DISABLEUPDATENOW 2
-#define ELF_DISABLEOPENSOURCE 4
-#define ELF_DISABLECHANGESOURCE 8
-#define ELF_DISABLECANCELLINK 16
-#define CIF_SHOWHELP 1
-#define CIF_SELECTCURRENT 2
-#define CIF_SELECTDEFAULT 4
-#define CIF_SELECTFROMFILE 8
-#define CIF_USEICONEXE 16
-#define OLEUI_CIERR_MUSTHAVECLSID OLEUI_ERR_STANDARDMAX
-#define OLEUI_CIERR_MUSTHAVECURRENTMETAFILE (OLEUI_ERR_STANDARDMAX+1)
-#define OLEUI_CIERR_SZICONEXEINVALID (OLEUI_ERR_STANDARDMAX+2)
-#define CF_SHOWHELPBUTTON 1
-#define CF_SETCONVERTDEFAULT 2
-#define CF_SETACTIVATEDEFAULT 4
-#define CF_SELECTCONVERTTO 8
-#define CF_SELECTACTIVATEAS 16
-#define CF_DISABLEDISPLAYASICON 32
-#define CF_DISABLEACTIVATEAS 64
-#define CF_HIDECHANGEICON 128
-#define CF_CONVERTONLY 256
-#define OLEUI_CTERR_CLASSIDINVALID (OLEUI_ERR_STANDARDMAX+1)
-#define OLEUI_CTERR_DVASPECTINVALID (OLEUI_ERR_STANDARDMAX+2)
-#define OLEUI_CTERR_CBFORMATINVALID (OLEUI_ERR_STANDARDMAX+3)
-#define OLEUI_CTERR_HMETAPICTINVALID (OLEUI_ERR_STANDARDMAX+4)
-#define OLEUI_CTERR_STRINGINVALID (OLEUI_ERR_STANDARDMAX+5)
-#define BZ_DISABLECANCELBUTTON 1
-#define BZ_DISABLESWITCHTOBUTTON 2
-#define BZ_DISABLERETRYBUTTON 4
-#define BZ_NOTRESPONDINGDIALOG 8
-#define OLEUI_BZERR_HTASKINVALID OLEUI_ERR_STANDARDMAX
-#define OLEUI_BZ_SWITCHTOSELECTED (OLEUI_ERR_STANDARDMAX+1)
-#define OLEUI_BZ_RETRYSELECTED (OLEUI_ERR_STANDARDMAX+2)
-#define OLEUI_BZ_CALLUNBLOCKED (OLEUI_ERR_STANDARDMAX+3)
-#define CSF_SHOWHELP 1
-#define CSF_VALIDSOURCE 2
-#define CSF_ONLYGETSOURCE 4
-#define CSF_EXPLORER 8
-#define OLEUI_CSERR_LINKCNTRNULL OLEUI_ERR_STANDARDMAX
-#define OLEUI_CSERR_LINKCNTRINVALID (OLEUI_ERR_STANDARDMAX+1)
-#define OLEUI_CSERR_FROMNOTNULL (OLEUI_ERR_STANDARDMAX+2)
-#define OLEUI_CSERR_TONOTNULL (OLEUI_ERR_STANDARDMAX+3)
-#define OLEUI_CSERR_SOURCENULL (OLEUI_ERR_STANDARDMAX+4)
-#define OLEUI_CSERR_SOURCEINVALID (OLEUI_ERR_STANDARDMAX+5)
-#define OLEUI_CSERR_SOURCEPARSERROR (OLEUI_ERR_STANDARDMAX+6)
-#define OLEUI_CSERR_SOURCEPARSEERROR (OLEUI_ERR_STANDARDMAX+7)
-#define VPF_SELECTRELATIVE 1
-#define VPF_DISABLERELATIVE 2
-#define VPF_DISABLESCALE 4
-
-#ifndef RC_INVOKED
-#pragma pack(push, 8)
-typedef UINT (CALLBACK *LPFNOLEUIHOOK)(HWND, UINT, WPARAM, LPARAM);
-typedef struct tagOLEUIINSERTOBJECTW {
- DWORD cbStruct;
- DWORD dwFlags;
- HWND hWndOwner;
- LPCWSTR lpszCaption;
- LPFNOLEUIHOOK lpfnHook;
- LPARAM lCustData;
- HINSTANCE hInstance;
- LPCWSTR lpszTemplate;
- HRSRC hResource;
- CLSID clsid;
- LPWSTR lpszFile;
- UINT cchFile;
- UINT cClsidExclude;
- LPCLSID lpClsidExclude;
- IID iid;
- DWORD oleRender;
- LPFORMATETC lpFormatEtc;
- LPOLECLIENTSITE lpIOleClientSite;
- LPSTORAGE lpIStorage;
- PVOID *ppvObj;
- SCODE sc;
- HGLOBAL hMetaPict;
-} OLEUIINSERTOBJECTW,*POLEUIINSERTOBJECTW,*LPOLEUIINSERTOBJECTW;
-typedef struct tagOLEUIINSERTOBJECTA {
- DWORD cbStruct;
- DWORD dwFlags;
- HWND hWndOwner;
- LPCSTR lpszCaption;
- LPFNOLEUIHOOK lpfnHook;
- LPARAM lCustData;
- HINSTANCE hInstance;
- LPCSTR lpszTemplate;
- HRSRC hResource;
- CLSID clsid;
- LPSTR lpszFile;
- UINT cchFile;
- UINT cClsidExclude;
- LPCLSID lpClsidExclude;
- IID iid;
- DWORD oleRender;
- LPFORMATETC lpFormatEtc;
- LPOLECLIENTSITE lpIOleClientSite;
- LPSTORAGE lpIStorage;
- PVOID *ppvObj;
- SCODE sc;
- HGLOBAL hMetaPict;
-} OLEUIINSERTOBJECTA,*POLEUIINSERTOBJECTA,*LPOLEUIINSERTOBJECTA;
-STDAPI_(UINT) OleUIInsertObjectW(LPOLEUIINSERTOBJECTW);
-STDAPI_(UINT) OleUIInsertObjectA(LPOLEUIINSERTOBJECTA);
-typedef enum tagOLEUIPASTEFLAG {
- OLEUIPASTE_PASTEONLY,
- OLEUIPASTE_LINKTYPE1,
- OLEUIPASTE_LINKTYPE2,
- OLEUIPASTE_LINKTYPE3=4,
- OLEUIPASTE_LINKTYPE4=8,
- OLEUIPASTE_LINKTYPE5=16,
- OLEUIPASTE_LINKTYPE6=32,
- OLEUIPASTE_LINKTYPE7=64,
- OLEUIPASTE_LINKTYPE8=128,
- OLEUIPASTE_PASTE=512,
- OLEUIPASTE_LINKANYTYPE=1024,
- OLEUIPASTE_ENABLEICON=2048
-} OLEUIPASTEFLAG;
-typedef struct tagOLEUIPASTEENTRYW {
- FORMATETC fmtetc;
- LPCWSTR lpstrFormatName;
- LPCWSTR lpstrResultText;
- DWORD dwFlags;
- DWORD dwScratchSpace;
-} OLEUIPASTEENTRYW,*POLEUIPASTEENTRYW,*LPOLEUIPASTEENTRYW;
-typedef struct tagOLEUIPASTEENTRYA {
- FORMATETC fmtetc;
- LPCSTR lpstrFormatName;
- LPCSTR lpstrResultText;
- DWORD dwFlags;
- DWORD dwScratchSpace;
-} OLEUIPASTEENTRYA,*POLEUIPASTEENTRYA,*LPOLEUIPASTEENTRYA;
-typedef struct tagOLEUIPASTESPECIALW {
- DWORD cbStruct;
- DWORD dwFlags;
- HWND hWndOwner;
- LPCWSTR lpszCaption;
- LPFNOLEUIHOOK lpfnHook;
- LPARAM lCustData;
- HINSTANCE hInstance;
- LPCWSTR lpszTemplate;
- HRSRC hResource;
- LPDATAOBJECT lpSrcDataObj;
- LPOLEUIPASTEENTRYW arrPasteEntries;
- int cPasteEntries;
- UINT *arrLinkTypes;
- int cLinkTypes;
- UINT cClsidExclude;
- LPCLSID lpClsidExclude;
- int nSelectedIndex;
- BOOL fLink;
- HGLOBAL hMetaPict;
- SIZEL sizel;
-} OLEUIPASTESPECIALW,*POLEUIPASTESPECIALW,*LPOLEUIPASTESPECIALW;
-typedef struct tagOLEUIPASTESPECIALA {
- DWORD cbStruct;
- DWORD dwFlags;
- HWND hWndOwner;
- LPCSTR lpszCaption;
- LPFNOLEUIHOOK lpfnHook;
- LPARAM lCustData;
- HINSTANCE hInstance;
- LPCSTR lpszTemplate;
- HRSRC hResource;
- LPDATAOBJECT lpSrcDataObj;
- LPOLEUIPASTEENTRYA arrPasteEntries;
- int cPasteEntries;
- UINT *arrLinkTypes;
- int cLinkTypes;
- UINT cClsidExclude;
- LPCLSID lpClsidExclude;
- int nSelectedIndex;
- BOOL fLink;
- HGLOBAL hMetaPict;
- SIZEL sizel;
-} OLEUIPASTESPECIALA,*POLEUIPASTESPECIALA,*LPOLEUIPASTESPECIALA;
-#define INTERFACE IOleUILinkContainerW
-DECLARE_INTERFACE_(IOleUILinkContainerW, IUnknown)
-{
- STDMETHOD(QueryInterface) (THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef) (THIS) PURE;
- STDMETHOD_(ULONG,Release) (THIS) PURE;
- STDMETHOD_(DWORD,GetNextLink) (THIS_ DWORD dwLink) PURE;
- STDMETHOD(SetLinkUpdateOptions) (THIS_ DWORD,DWORD) PURE;
- STDMETHOD(GetLinkUpdateOptions) (THIS_ DWORD,PDWORD) PURE;
- STDMETHOD(SetLinkSource) (THIS_ DWORD, LPWSTR,ULONG,PULONG,BOOL) PURE;
- STDMETHOD(GetLinkSource) (THIS_ DWORD,LPWSTR*,PULONG,LPWSTR*,LPWSTR*,BOOL*,BOOL*) PURE;
- STDMETHOD(OpenLinkSource) (THIS_ DWORD) PURE;
- STDMETHOD(UpdateLink) (THIS_ DWORD,BOOL,BOOL) PURE;
- STDMETHOD(CancelLink) (THIS_ DWORD) PURE;
-};
-#undef INTERFACE
-typedef IOleUILinkContainerW *LPOLEUILINKCONTAINERW;
-#define INTERFACE IOleUILinkContainerA
-DECLARE_INTERFACE_(IOleUILinkContainerA, IUnknown)
-{
- STDMETHOD(QueryInterface) (THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef) (THIS) PURE;
- STDMETHOD_(ULONG,Release) (THIS) PURE;
- STDMETHOD_(DWORD,GetNextLink) (THIS_ DWORD) PURE;
- STDMETHOD(SetLinkUpdateOptions) (THIS_ DWORD,DWORD) PURE;
- STDMETHOD(GetLinkUpdateOptions) (THIS_ DWORD,PDWORD) PURE;
- STDMETHOD(SetLinkSource) (THIS_ DWORD, LPSTR,ULONG,PULONG,BOOL) PURE;
- STDMETHOD(GetLinkSource) (THIS_ DWORD,LPSTR*,PULONG,LPSTR*,LPSTR*,BOOL*,BOOL*) PURE;
- STDMETHOD(OpenLinkSource) (THIS_ DWORD) PURE;
- STDMETHOD(UpdateLink) (THIS_ DWORD,BOOL,BOOL) PURE;
- STDMETHOD(CancelLink) (THIS_ DWORD) PURE;
-};
-#undef INTERFACE
-typedef IOleUILinkContainerA *LPOLEUILINKCONTAINERA;
-typedef struct tagOLEUIEDITLINKSW {
- DWORD cbStruct;
- DWORD dwFlags;
- HWND hWndOwner;
- LPCWSTR lpszCaption;
- LPFNOLEUIHOOK lpfnHook;
- LPARAM lCustData;
- HINSTANCE hInstance;
- LPCWSTR lpszTemplate;
- HRSRC hResource;
- LPOLEUILINKCONTAINERW lpOleUILinkContainer;
-} OLEUIEDITLINKSW,*POLEUIEDITLINKSW,*LPOLEUIEDITLINKSW;
-typedef struct tagOLEUIEDITLINKSA {
- DWORD cbStruct;
- DWORD dwFlags;
- HWND hWndOwner;
- LPCSTR lpszCaption;
- LPFNOLEUIHOOK lpfnHook;
- LPARAM lCustData;
- HINSTANCE hInstance;
- LPCSTR lpszTemplate;
- HRSRC hResource;
- LPOLEUILINKCONTAINERA lpOleUILinkContainer;
-} OLEUIEDITLINKSA,*POLEUIEDITLINKSA,*LPOLEUIEDITLINKSA;
-typedef struct tagOLEUICHANGEICONW {
- DWORD cbStruct;
- DWORD dwFlags;
- HWND hWndOwner;
- LPCWSTR lpszCaption;
- LPFNOLEUIHOOK lpfnHook;
- LPARAM lCustData;
- HINSTANCE hInstance;
- LPCWSTR lpszTemplate;
- HRSRC hResource;
- HGLOBAL hMetaPict;
- CLSID clsid;
- WCHAR szIconExe[MAX_PATH];
- int cchIconExe;
-} OLEUICHANGEICONW,*POLEUICHANGEICONW,*LPOLEUICHANGEICONW;
-typedef struct tagOLEUICHANGEICONA {
- DWORD cbStruct;
- DWORD dwFlags;
- HWND hWndOwner;
- LPCSTR lpszCaption;
- LPFNOLEUIHOOK lpfnHook;
- LPARAM lCustData;
- HINSTANCE hInstance;
- LPCSTR lpszTemplate;
- HRSRC hResource;
- HGLOBAL hMetaPict;
- CLSID clsid;
- CHAR szIconExe[MAX_PATH];
- int cchIconExe;
-} OLEUICHANGEICONA,*POLEUICHANGEICONA,*LPOLEUICHANGEICONA;
-typedef struct tagOLEUICONVERTW {
- DWORD cbStruct;
- DWORD dwFlags;
- HWND hWndOwner;
- LPCWSTR lpszCaption;
- LPFNOLEUIHOOK lpfnHook;
- LPARAM lCustData;
- HINSTANCE hInstance;
- LPCWSTR lpszTemplate;
- HRSRC hResource;
- CLSID clsid;
- CLSID clsidConvertDefault;
- CLSID clsidActivateDefault;
- CLSID clsidNew;
- DWORD dvAspect;
- WORD wFormat;
- BOOL fIsLinkedObject;
- HGLOBAL hMetaPict;
- LPWSTR lpszUserType;
- BOOL fObjectsIconChanged;
- LPWSTR lpszDefLabel;
- UINT cClsidExclude;
- LPCLSID lpClsidExclude;
-} OLEUICONVERTW,*POLEUICONVERTW,*LPOLEUICONVERTW;
-typedef struct tagOLEUICONVERTA {
- DWORD cbStruct;
- DWORD dwFlags;
- HWND hWndOwner;
- LPCSTR lpszCaption;
- LPFNOLEUIHOOK lpfnHook;
- LPARAM lCustData;
- HINSTANCE hInstance;
- LPCSTR lpszTemplate;
- HRSRC hResource;
- CLSID clsid;
- CLSID clsidConvertDefault;
- CLSID clsidActivateDefault;
- CLSID clsidNew;
- DWORD dvAspect;
- WORD wFormat;
- BOOL fIsLinkedObject;
- HGLOBAL hMetaPict;
- LPSTR lpszUserType;
- BOOL fObjectsIconChanged;
- LPSTR lpszDefLabel;
- UINT cClsidExclude;
- LPCLSID lpClsidExclude;
-} OLEUICONVERTA,*POLEUICONVERTA,*LPOLEUICONVERTA;
-typedef struct tagOLEUIBUSYW {
- DWORD cbStruct;
- DWORD dwFlags;
- HWND hWndOwner;
- LPCWSTR lpszCaption;
- LPFNOLEUIHOOK lpfnHook;
- LPARAM lCustData;
- HINSTANCE hInstance;
- LPCWSTR lpszTemplate;
- HRSRC hResource;
- HTASK hTask;
- HWND *lphWndDialog;
-} OLEUIBUSYW,*POLEUIBUSYW,*LPOLEUIBUSYW;
-typedef struct tagOLEUIBUSYA {
- DWORD cbStruct;
- DWORD dwFlags;
- HWND hWndOwner;
- LPCSTR lpszCaption;
- LPFNOLEUIHOOK lpfnHook;
- LPARAM lCustData;
- HINSTANCE hInstance;
- LPCSTR lpszTemplate;
- HRSRC hResource;
- HTASK hTask;
- HWND *lphWndDialog;
-} OLEUIBUSYA,*POLEUIBUSYA,*LPOLEUIBUSYA;
-typedef struct tagOLEUICHANGESOURCEW {
- DWORD cbStruct;
- DWORD dwFlags;
- HWND hWndOwner;
- LPCWSTR lpszCaption;
- LPFNOLEUIHOOK lpfnHook;
- LPARAM lCustData;
- HINSTANCE hInstance;
- LPCWSTR lpszTemplate;
- HRSRC hResource;
- OPENFILENAMEW* lpOFN;
- DWORD dwReserved1[4];
- LPOLEUILINKCONTAINERW lpOleUILinkContainer;
- DWORD dwLink;
- LPWSTR lpszDisplayName;
- ULONG nFileLength;
- LPWSTR lpszFrom;
- LPWSTR lpszTo;
-} OLEUICHANGESOURCEW,*POLEUICHANGESOURCEW,*LPOLEUICHANGESOURCEW;
-typedef struct tagOLEUICHANGESOURCEA {
- DWORD cbStruct;
- DWORD dwFlags;
- HWND hWndOwner;
- LPCSTR lpszCaption;
- LPFNOLEUIHOOK lpfnHook;
- LPARAM lCustData;
- HINSTANCE hInstance;
- LPCSTR lpszTemplate;
- HRSRC hResource;
- OPENFILENAMEA *lpOFN;
- DWORD dwReserved1[4];
- LPOLEUILINKCONTAINERA lpOleUILinkContainer;
- DWORD dwLink;
- LPSTR lpszDisplayName;
- ULONG nFileLength;
- LPSTR lpszFrom;
- LPSTR lpszTo;
-} OLEUICHANGESOURCEA,*POLEUICHANGESOURCEA,*LPOLEUICHANGESOURCEA;
-#define INTERFACE IOleUIObjInfoW
-DECLARE_INTERFACE_(IOleUIObjInfoW, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetObjectInfo)(THIS_ DWORD,PDWORD,LPWSTR*,LPWSTR*,LPWSTR*,LPWSTR*) PURE;
- STDMETHOD(GetConvertInfo)(THIS_ DWORD,CLSID*,PWORD,CLSID*,LPCLSID*,UINT*) PURE;
- STDMETHOD(ConvertObject)(THIS_ DWORD,REFCLSID) PURE;
- STDMETHOD(GetViewInfo)(THIS_ DWORD,HGLOBAL*,PDWORD,int*) PURE;
- STDMETHOD(SetViewInfo)(THIS_ DWORD,HGLOBAL,DWORD,int,BOOL) PURE;
-};
-#undef INTERFACE
-typedef IOleUIObjInfoW *LPOLEUIOBJINFOW;
-#define INTERFACE IOleUIObjInfoA
-DECLARE_INTERFACE_(IOleUIObjInfoA, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetObjectInfo)(THIS_ DWORD,PDWORD,LPSTR*,LPSTR*,LPSTR*,LPSTR*) PURE;
- STDMETHOD(GetConvertInfo)(THIS_ DWORD,CLSID*,PWORD,CLSID*,LPCLSID*,UINT*) PURE;
- STDMETHOD(ConvertObject)(THIS_ DWORD,REFCLSID) PURE;
- STDMETHOD(GetViewInfo)(THIS_ DWORD,HGLOBAL*,PDWORD,int*) PURE;
- STDMETHOD(SetViewInfo)(THIS_ DWORD,HGLOBAL,DWORD,int,BOOL) PURE;
-};
-#undef INTERFACE
-typedef IOleUIObjInfoA *LPOLEUIOBJINFOA;
-#define INTERFACE IOleUILinkInfoW
-DECLARE_INTERFACE_(IOleUILinkInfoW, IOleUILinkContainerW)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD_(DWORD,GetNextLink)(THIS_ DWORD) PURE;
- STDMETHOD(SetLinkUpdateOptions)(THIS_ DWORD,DWORD) PURE;
- STDMETHOD(GetLinkUpdateOptions)(THIS_ DWORD,DWORD*) PURE;
- STDMETHOD(SetLinkSource)(THIS_ DWORD,LPWSTR,ULONG,PULONG,BOOL) PURE;
- STDMETHOD(GetLinkSource)(THIS_ DWORD,LPWSTR*,PULONG,LPWSTR*,LPWSTR*,BOOL*,BOOL*) PURE;
- STDMETHOD(OpenLinkSource)(THIS_ DWORD) PURE;
- STDMETHOD(UpdateLink)(THIS_ DWORD,BOOL,BOOL) PURE;
- STDMETHOD(CancelLink)(THIS_ DWORD) PURE;
- STDMETHOD(GetLastUpdate)(THIS_ DWORD,FILETIME*) PURE;
-};
-#undef INTERFACE
-typedef IOleUILinkInfoW *LPOLEUILINKINFOW;
-#define INTERFACE IOleUILinkInfoA
-DECLARE_INTERFACE_(IOleUILinkInfoA, IOleUILinkContainerA)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD_(DWORD,GetNextLink)(THIS_ DWORD) PURE;
- STDMETHOD(SetLinkUpdateOptions)(THIS_ DWORD,DWORD) PURE;
- STDMETHOD(GetLinkUpdateOptions)(THIS_ DWORD,DWORD*) PURE;
- STDMETHOD(SetLinkSource)(THIS_ DWORD,LPSTR,ULONG,PULONG,BOOL) PURE;
- STDMETHOD(GetLinkSource)(THIS_ DWORD,LPSTR*,PULONG,LPSTR*,LPSTR*,BOOL*,BOOL*) PURE;
- STDMETHOD(OpenLinkSource)(THIS_ DWORD) PURE;
- STDMETHOD(UpdateLink)(THIS_ DWORD,BOOL,BOOL) PURE;
- STDMETHOD(CancelLink)(THIS_ DWORD) PURE;
- STDMETHOD(GetLastUpdate)(THIS_ DWORD,FILETIME*) PURE;
-};
-#undef INTERFACE
-typedef IOleUILinkInfoA* LPOLEUILINKINFOA;
-struct tagOLEUIOBJECTPROPSW;
-struct tagOLEUIOBJECTPROPSA;
-typedef struct tagOLEUIGNRLPROPSW {
- DWORD cbStruct;
- DWORD dwFlags;
- DWORD dwReserved1[2];
- LPFNOLEUIHOOK lpfnHook;
- LPARAM lCustData;
- DWORD dwReserved2[3];
- struct tagOLEUIOBJECTPROPSW* lpOP;
-} OLEUIGNRLPROPSW,*POLEUIGNRLPROPSW,*LPOLEUIGNRLPROPSW;
-typedef struct tagOLEUIGNRLPROPSA {
- DWORD cbStruct;
- DWORD dwFlags;
- DWORD dwReserved1[2];
- LPFNOLEUIHOOK lpfnHook;
- LPARAM lCustData;
- DWORD dwReserved2[3];
- struct tagOLEUIOBJECTPROPSA* lpOP;
-} OLEUIGNRLPROPSA,*POLEUIGNRLPROPSA,*LPOLEUIGNRLPROPSA;
-typedef struct tagOLEUIVIEWPROPSW {
- DWORD cbStruct;
- DWORD dwFlags;
- DWORD dwReserved1[2];
- LPFNOLEUIHOOK lpfnHook;
- LPARAM lCustData;
- DWORD dwReserved2[3];
- struct tagOLEUIOBJECTPROPSW* lpOP;
- int nScaleMin;
- int nScaleMax;
-} OLEUIVIEWPROPSW,*POLEUIVIEWPROPSW,*LPOLEUIVIEWPROPSW;
-typedef struct tagOLEUIVIEWPROPSA {
- DWORD cbStruct;
- DWORD dwFlags;
- DWORD dwReserved1[2];
- LPFNOLEUIHOOK lpfnHook;
- LPARAM lCustData;
- DWORD dwReserved2[3];
- struct tagOLEUIOBJECTPROPSA *lpOP;
- int nScaleMin;
- int nScaleMax;
-} OLEUIVIEWPROPSA,*POLEUIVIEWPROPSA,*LPOLEUIVIEWPROPSA;
-typedef struct tagOLEUILINKPROPSW {
- DWORD cbStruct;
- DWORD dwFlags;
- DWORD dwReserved1[2];
- LPFNOLEUIHOOK lpfnHook;
- LPARAM lCustData;
- DWORD dwReserved2[3];
- struct tagOLEUIOBJECTPROPSW *lpOP;
-} OLEUILINKPROPSW, *POLEUILINKPROPSW,* LPOLEUILINKPROPSW;
-typedef struct tagOLEUILINKPROPSA {
- DWORD cbStruct;
- DWORD dwFlags;
- DWORD dwReserved1[2];
- LPFNOLEUIHOOK lpfnHook;
- LPARAM lCustData;
- DWORD dwReserved2[3];
- struct tagOLEUIOBJECTPROPSA* lpOP;
-} OLEUILINKPROPSA,*POLEUILINKPROPSA,*LPOLEUILINKPROPSA;
-typedef struct tagOLEUIOBJECTPROPSW {
- DWORD cbStruct;
- DWORD dwFlags;
- LPPROPSHEETHEADERW lpPS;
- DWORD dwObject;
- LPOLEUIOBJINFOW lpObjInfo;
- DWORD dwLink;
- LPOLEUILINKINFOW lpLinkInfo;
- LPOLEUIGNRLPROPSW lpGP;
- LPOLEUIVIEWPROPSW lpVP;
- LPOLEUILINKPROPSW lpLP;
-} OLEUIOBJECTPROPSW,*POLEUIOBJECTPROPSW,*LPOLEUIOBJECTPROPSW;
-typedef struct tagOLEUIOBJECTPROPSA {
- DWORD cbStruct;
- DWORD dwFlags;
- LPPROPSHEETHEADERA lpPS;
- DWORD dwObject;
- LPOLEUIOBJINFOA lpObjInfo;
- DWORD dwLink;
- LPOLEUILINKINFOA lpLinkInfo;
- LPOLEUIGNRLPROPSA lpGP;
- LPOLEUIVIEWPROPSA lpVP;
- LPOLEUILINKPROPSA lpLP;
-} OLEUIOBJECTPROPSA,*POLEUIOBJECTPROPSA,*LPOLEUIOBJECTPROPSA;
-
-STDAPI_(BOOL) OleUIAddVerbMenuW(LPOLEOBJECT,LPCWSTR,HMENU,UINT,UINT,UINT,BOOL,UINT,HMENU*);
-STDAPI_(BOOL) OleUIAddVerbMenuA(LPOLEOBJECT,LPCSTR,HMENU,UINT,UINT,UINT,BOOL,UINT,HMENU*);
-STDAPI_(UINT) OleUIBusyW(LPOLEUIBUSYW);
-STDAPI_(UINT) OleUIBusyA(LPOLEUIBUSYA);
-STDAPI_(BOOL) OleUICanConvertOrActivateAs(REFCLSID,BOOL,WORD);
-STDAPI_(UINT) OleUIChangeIconW(LPOLEUICHANGEICONW);
-STDAPI_(UINT) OleUIChangeIconA(LPOLEUICHANGEICONA);
-STDAPI_(UINT) OleUIChangeSourceW(LPOLEUICHANGESOURCEW);
-STDAPI_(UINT) OleUIChangeSourceA(LPOLEUICHANGESOURCEA);
-STDAPI_(UINT) OleUIConvertW(LPOLEUICONVERTW);
-STDAPI_(UINT) OleUIConvertA(LPOLEUICONVERTA);
-STDAPI_(UINT) OleUIEditLinksW(LPOLEUIEDITLINKSW);
-STDAPI_(UINT) OleUIEditLinksA(LPOLEUIEDITLINKSA);
-STDAPI_(UINT) OleUIObjectPropertiesW(LPOLEUIOBJECTPROPSW);
-STDAPI_(UINT) OleUIObjectPropertiesA(LPOLEUIOBJECTPROPSA);
-STDAPI_(UINT) OleUIPasteSpecialW(LPOLEUIPASTESPECIALW);
-STDAPI_(UINT) OleUIPasteSpecialA(LPOLEUIPASTESPECIALA);
-int OleUIPromptUserW(int,HWND,...);
-int OleUIPromptUserA(int,HWND,...);
-STDAPI_(BOOL) OleUIUpdateLinksW(LPOLEUILINKCONTAINERW,HWND,LPWSTR,int);
-STDAPI_(BOOL) OleUIUpdateLinksA(LPOLEUILINKCONTAINERA,HWND,LPSTR,int);
-
-#ifdef UNICODE
-#define IDD_SERVERNOTREG IDD_SERVERNOTREGW
-#define IDD_LINKTYPECHANGED IDD_LINKTYPECHANGEDW
-#define OleUIUpdateLinks OleUIUpdateLinksW
-#define OleUIAddVerbMenu OleUIAddVerbMenuW
-#define tagOLEUIOBJECTPROPS tagOLEUIOBJECTPROPSW
-#define OLEUIOBJECTPROPS OLEUIOBJECTPROPSW
-#define POLEUIOBJECTPROPS POLEUIOBJECTPROPSW
-#define LPOLEUIOBJECTPROPS LPOLEUIOBJECTPROPSW
-#define OleUIObjectProperties OleUIObjectPropertiesW
-#define tagOLEUIINSERTOBJECT tagOLEUIINSERTOBJECTW
-#define OLEUIINSERTOBJECT OLEUIINSERTOBJECTW
-#define POLEUIINSERTOBJECT POLEUIINSERTOBJECTW
-#define LPOLEUIINSERTOBJECT LPOLEUIINSERTOBJECTW
-#define OleUIInsertObject OleUIInsertObjectW
-#define OleUIPromptUser OleUIPromptUserW
-#define tagOLEUIPASTEENTRY tagOLEUIPASTEENTRYW
-#define OLEUIPASTEENTRY OLEUIPASTEENTRYW
-#define POLEUIPASTEENTRY POLEUIPASTEENTRYW
-#define LPOLEUIPASTEENTRY LPOLEUIPASTEENTRYW
-#define tagOLEUIPASTESPECIAL tagOLEUIPASTESPECIALW
-#define OLEUIPASTESPECIAL OLEUIPASTESPECIALW
-#define POLEUIPASTESPECIAL POLEUIPASTESPECIALW
-#define LPOLEUIPASTESPECIAL LPOLEUIPASTESPECIALW
-#define OleUIPasteSpecial OleUIPasteSpecialW
-#define IOleUILinkContainer IOleUILinkContainerW
-#define LPOLEUILINKCONTAINER LPOLEUILINKCONTAINERW
-#define tagOLEUIEDITLINKS tagOLEUIEDITLINKSW
-#define OLEUIEDITLINKS OLEUIEDITLINKSW
-#define POLEUIEDITLINKS POLEUIEDITLINKSW
-#define LPOLEUIEDITLINKS LPOLEUIEDITLINKSW
-#define OleUIEditLinks OleUIEditLinksW
-#define tagOLEUICHANGEICON tagOLEUICHANGEICONW
-#define OLEUICHANGEICON OLEUICHANGEICONW
-#define POLEUICHANGEICON POLEUICHANGEICONW
-#define LPOLEUICHANGEICON LPOLEUICHANGEICONW
-#define OleUIChangeIcon OleUIChangeIconW
-#define tagOLEUICONVERT tagOLEUICONVERTW
-#define OLEUICONVERT OLEUICONVERTW
-#define POLEUICONVERT POLEUICONVERTW
-#define LPOLEUICONVERT LPOLEUICONVERTW
-#define OleUIConvert OleUIConvertW
-#define tagOLEUIBUSY tagOLEUIBUSYW
-#define OLEUIBUSY OLEUIBUSYW
-#define POLEUIBUSY POLEUIBUSYW
-#define LPOLEUIBUSY LPOLEUIBUSYW
-#define OleUIBusy OleUIBusyW
-#define tagOLEUICHANGESOURCE tagOLEUICHANGESOURCEW
-#define OLEUICHANGESOURCE OLEUICHANGESOURCEW
-#define POLEUICHANGESOURCE POLEUICHANGESOURCEW
-#define LPOLEUICHANGESOURCE LPOLEUICHANGESOURCEW
-#define OleUIChangeSource OleUIChangeSourceW
-#define IOleUIObjInfo IOleUIObjInfoW
-#define LPOLEUIOBJINFO LPOLEUIOBJINFOW
-#define IOleUILinkInfo IOleUILinkInfoW
-#define IOleUILinkInfoVtbl IOleUILinkInfoWVtbl
-#define LPOLEUILINKINFO LPOLEUILINKINFOW
-#define tagOLEUIGNRLPROPS tagOLEUIGNRLPROPSW
-#define OLEUIGNRLPROPS OLEUIGNRLPROPSW
-#define POLEUIGNRLPROPS POLEUIGNRLPROPSW
-#define LPOLEUIGNRLPROPS LPOLEUIGNRLPROPSW
-#define tagOLEUIVIEWPROPS tagOLEUIVIEWPROPSW
-#define OLEUIVIEWPROPS OLEUIVIEWPROPSW
-#define POLEUIVIEWPROPS POLEUIVIEWPROPSW
-#define LPOLEUIVIEWPROPS LPOLEUIVIEWPROPSW
-#define tagOLEUILINKPROPS tagOLEUILINKPROPSW
-#define OLEUILINKPROPS OLEUILINKPROPSW
-#define POLEUILINKPROPS POLEUILINKPROPSW
-#define LPOLEUILINKPROPS LPOLEUILINKPROPSW
-#else
-#define IDD_SERVERNOTREG IDD_SERVERNOTREGA
-#define IDD_LINKTYPECHANGED IDD_LINKTYPECHANGEDA
-#define OleUIUpdateLinks OleUIUpdateLinksA
-#define OleUIAddVerbMenu OleUIAddVerbMenuA
-#define tagOLEUIOBJECTPROPS tagOLEUIOBJECTPROPSA
-#define OLEUIOBJECTPROPS OLEUIOBJECTPROPSA
-#define POLEUIOBJECTPROPS POLEUIOBJECTPROPSA
-#define LPOLEUIOBJECTPROPS LPOLEUIOBJECTPROPSA
-#define OleUIObjectProperties OleUIObjectPropertiesA
-#define tagOLEUIINSERTOBJECT tagOLEUIINSERTOBJECTA
-#define OLEUIINSERTOBJECT OLEUIINSERTOBJECTA
-#define POLEUIINSERTOBJECT POLEUIINSERTOBJECTA
-#define LPOLEUIINSERTOBJECT LPOLEUIINSERTOBJECTA
-#define OleUIInsertObject OleUIInsertObjectA
-#define OleUIPromptUser OleUIPromptUserA
-#define tagOLEUIPASTEENTRY tagOLEUIPASTEENTRYA
-#define OLEUIPASTEENTRY OLEUIPASTEENTRYA
-#define POLEUIPASTEENTRY POLEUIPASTEENTRYA
-#define LPOLEUIPASTEENTRY LPOLEUIPASTEENTRYA
-#define tagOLEUIPASTESPECIAL tagOLEUIPASTESPECIALA
-#define OLEUIPASTESPECIAL OLEUIPASTESPECIALA
-#define POLEUIPASTESPECIAL POLEUIPASTESPECIALA
-#define LPOLEUIPASTESPECIAL LPOLEUIPASTESPECIALA
-#define OleUIPasteSpecial OleUIPasteSpecialA
-#define IOleUILinkContainer IOleUILinkContainerA
-#define LPOLEUILINKCONTAINER LPOLEUILINKCONTAINERA
-#define tagOLEUIEDITLINKS tagOLEUIEDITLINKSA
-#define OLEUIEDITLINKS OLEUIEDITLINKSA
-#define POLEUIEDITLINKS POLEUIEDITLINKSA
-#define LPOLEUIEDITLINKS LPOLEUIEDITLINKSA
-#define OleUIEditLinks OleUIEditLinksA
-#define tagOLEUICHANGEICON tagOLEUICHANGEICONA
-#define OLEUICHANGEICON OLEUICHANGEICONA
-#define POLEUICHANGEICON POLEUICHANGEICONA
-#define LPOLEUICHANGEICON LPOLEUICHANGEICONA
-#define OleUIChangeIcon OleUIChangeIconA
-#define tagOLEUICONVERT tagOLEUICONVERTA
-#define OLEUICONVERT OLEUICONVERTA
-#define POLEUICONVERT POLEUICONVERTA
-#define LPOLEUICONVERT LPOLEUICONVERTA
-#define OleUIConvert OleUIConvertA
-#define tagOLEUIBUSY tagOLEUIBUSYA
-#define OLEUIBUSY OLEUIBUSYA
-#define POLEUIBUSY POLEUIBUSYA
-#define LPOLEUIBUSY LPOLEUIBUSYA
-#define OleUIBusy OleUIBusyA
-#define tagOLEUICHANGESOURCE tagOLEUICHANGESOURCEA
-#define OLEUICHANGESOURCE OLEUICHANGESOURCEA
-#define POLEUICHANGESOURCE POLEUICHANGESOURCEA
-#define LPOLEUICHANGESOURCE LPOLEUICHANGESOURCEA
-#define OleUIChangeSource OleUIChangeSourceA
-#define IOleUIObjInfo IOleUIObjInfoA
-#define LPOLEUIOBJINFO LPOLEUIOBJINFOA
-#define IOleUILinkInfo IOleUILinkInfoA
-#define IOleUILinkInfoVtbl IOleUILinkInfoAVtbl
-#define LPOLEUILINKINFO LPOLEUILINKINFOA
-#define tagOLEUIGNRLPROPS tagOLEUIGNRLPROPSA
-#define OLEUIGNRLPROPS OLEUIGNRLPROPSA
-#define POLEUIGNRLPROPS POLEUIGNRLPROPSA
-#define LPOLEUIGNRLPROPS LPOLEUIGNRLPROPSA
-#define tagOLEUIVIEWPROPS tagOLEUIVIEWPROPSA
-#define OLEUIVIEWPROPS OLEUIVIEWPROPSA
-#define POLEUIVIEWPROPS POLEUIVIEWPROPSA
-#define LPOLEUIVIEWPROPS LPOLEUIVIEWPROPSA
-#define tagOLEUILINKPROPS tagOLEUILINKPROPSA
-#define OLEUILINKPROPS OLEUILINKPROPSA
-#define POLEUILINKPROPS POLEUILINKPROPSA
-#define LPOLEUILINKPROPS LPOLEUILINKPROPSA
-#endif
-#pragma pack(pop)
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/oleidl.h b/winsup/w32api/include/oleidl.h
deleted file mode 100644
index bade579..0000000
--- a/winsup/w32api/include/oleidl.h
+++ /dev/null
@@ -1,575 +0,0 @@
-#ifndef _OLEIDL_H
-#define _OLEIDL_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <objfwd.h>
-
-#define MK_ALT 32
-
-typedef _COM_interface IParseDisplayName *LPPARSEDISPLAYNAME;
-typedef _COM_interface IOleContainer *LPOLECONTAINER;
-typedef _COM_interface IOleClientSite *LPOLECLIENTSITE;
-typedef _COM_interface IOleObject *LPOLEOBJECT;
-typedef _COM_interface IDropTarget *LPDROPTARGET;
-typedef _COM_interface IDropSource *LPDROPSOURCE;
-typedef _COM_interface IEnumOleUndoUnits *LPENUMOLEUNDOUNITS;
-typedef _COM_interface IEnumOLEVERB *LPENUMOLEVERB;
-typedef _COM_interface IOleWindow *LPOLEWINDOW;
-typedef _COM_interface IOleInPlaceUIWindow *LPOLEINPLACEUIWINDOW;
-typedef _COM_interface IOleInPlaceActiveObject *LPOLEINPLACEACTIVEOBJECT;
-typedef _COM_interface IOleInPlaceFrame *LPOLEINPLACEFRAME;
-typedef _COM_interface IOleAdviseHolder *LPOLEADVISEHOLDER;
-typedef _COM_interface IViewObject *LPVIEWOBJECT;
-typedef _COM_interface IViewObject2 *LPVIEWOBJECT2;
-typedef _COM_interface IOleCache *LPOLECACHE;
-typedef _COM_interface IOleCache2 *LPOLECACHE2;
-typedef _COM_interface IOleCacheControl *LPOLECACHECONTROL;
-
-typedef enum tagBINDSPEED
-{
- BINDSPEED_INDEFINITE=1,
- BINDSPEED_MODERATE,
- BINDSPEED_IMMEDIATE
-} BINDSPEED;
-typedef enum tagOLEWHICHMK {
- OLEWHICHMK_CONTAINER=1,
- OLEWHICHMK_OBJREL,
- OLEWHICHMK_OBJFULL
-} OLEWHICHMK;
-typedef enum tagOLEGETMONIKER {
- OLEGETMONIKER_ONLYIFTHERE=1,
- OLEGETMONIKER_FORCEASSIGN,
- OLEGETMONIKER_UNASSIGN,
- OLEGETMONIKER_TEMPFORUSER
-} OLEGETMONIKER;
-typedef enum tagUSERCLASSTYPE {
- USERCLASSTYPE_FULL=1,
- USERCLASSTYPE_SHORT,
- USERCLASSTYPE_APPNAME
-} USERCLASSTYPE;
-
-#ifdef __GNUC__
-__extension__ /* IS0 C says enums limited to range of int */
-#endif
-typedef enum tagDROPEFFECT {
- DROPEFFECT_NONE=0,
- DROPEFFECT_COPY=1,
- DROPEFFECT_MOVE=2,
- DROPEFFECT_LINK=4,
- DROPEFFECT_SCROLL=0x80000000
-} DROPEFFECT;
-typedef struct tagOleMenuGroupWidths {
- LONG width[6];
-} OLEMENUGROUPWIDTHS,*LPOLEMENUGROUPWIDTHS;
-typedef HGLOBAL HOLEMENU;
-typedef enum tagOLECLOSE {
- OLECLOSE_SAVEIFDIRTY,
- OLECLOSE_NOSAVE,
- OLECLOSE_PROMPTSAVE
-} OLECLOSE;
-typedef struct tagOLEVERB {
- LONG lVerb;
- LPWSTR lpszVerbName;
- DWORD fuFlags;
- DWORD grfAttribs;
-} OLEVERB,*LPOLEVERB;
-typedef RECT BORDERWIDTHS;
-typedef LPRECT LPBORDERWIDTHS;
-typedef LPCRECT LPCBORDERWIDTHS;
-typedef struct tagOIFI {
- UINT cb;
- BOOL fMDIApp;
- HWND hwndFrame;
- HACCEL haccel;
- UINT cAccelEntries;
-}OLEINPLACEFRAMEINFO,*LPOLEINPLACEFRAMEINFO;
-
-DECLARE_ENUMERATOR(OLEVERB);
-typedef IEnumOLEVERB IEnumOleVerb;
-
-EXTERN_C const IID IID_IParseDisplayName;
-#define INTERFACE IParseDisplayName
-DECLARE_INTERFACE_(IParseDisplayName,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(ParseDisplayName)(THIS_ IBindCtx*,LPOLESTR,ULONG*,IMoniker**) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IParseDisplayName_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IParseDisplayName_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IParseDisplayName_Release(T) (T)->lpVtbl->Release(T)
-#define IParseDisplayName_ParseDisplayName(T,a,b,c,d) (T)->lpVtbl->ParseDisplayName(T,a,b,c,d)
-#endif
-
-EXTERN_C const IID IID_IOleContainer;
-#define INTERFACE IOleContainer
-DECLARE_INTERFACE_(IOleContainer,IParseDisplayName)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(ParseDisplayName)(THIS_ IBindCtx*,LPOLESTR,ULONG*,IMoniker**) PURE;
- STDMETHOD(EnumObjects)(THIS_ DWORD,IEnumUnknown**) PURE;
- STDMETHOD(LockContainer)(THIS_ BOOL) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IOleItemContainer;
-#define INTERFACE IOleItemContainer
-DECLARE_INTERFACE_(IOleItemContainer,IOleContainer)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(ParseDisplayName)(THIS_ IBindCtx*,LPOLESTR,ULONG*,IMoniker**) PURE;
- STDMETHOD(EnumObjects)(THIS_ DWORD,IEnumUnknown**) PURE;
- STDMETHOD(LockContainer)(THIS_ BOOL) PURE;
- STDMETHOD(GetObject)(THIS_ LPOLESTR,DWORD,IBindCtx*,REFIID,void**) PURE;
- STDMETHOD(GetObjectStorage)(THIS_ LPOLESTR,IBindCtx*,REFIID,void**) PURE;
- STDMETHOD(IsRunning)(THIS_ LPOLESTR) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IOleItemContainer_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IOleItemContainer_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IOleItemContainer_Release(T) (T)->lpVtbl->Release(T)
-#define IOleItemContainer_ParseDisplayName(T,a,b,c,d) (T)->lpVtbl->ParseDisplayName(T,a,b,c,d)
-#define IOleItemContainer_EnumObjects(T,a,b) (T)->lpVtbl->EnumObjects(T,a,b)
-#define IOleItemContainer_LockContainer(T,a) (T)->lpVtbl->LockContainer(T,a)
-#define IOleItemContainer_GetObject(T,a,b,c,d,e) (T)->lpVtbl->GetObject(T,a,b,c,d,e)
-#define IOleItemContainer_GetObjectStorage(T,a,b,c,d) (T)->lpVtbl->GetObjectStorage(T,a,b,c,d)
-#define IOleItemContainer_IsRunning(T,a) (T)->lpVtbl->IsRunning(T,a)
-#endif
-
-EXTERN_C const IID IID_IOleClientSite;
-#define INTERFACE IOleClientSite
-DECLARE_INTERFACE_(IOleClientSite,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(SaveObject)(THIS) PURE;
- STDMETHOD(GetMoniker)(THIS_ DWORD,DWORD,LPMONIKER*) PURE;
- STDMETHOD(GetContainer)(THIS_ LPOLECONTAINER*) PURE;
- STDMETHOD(ShowObject)(THIS) PURE;
- STDMETHOD(OnShowWindow)(THIS_ BOOL) PURE;
- STDMETHOD(RequestNewObjectLayout)(THIS) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IOleClientSite_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IOleClientSite_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IOleClientSite_Release(T) (T)->lpVtbl->Release(T)
-#define IOleClientSite_SaveObject(T) (T)->lpVtbl->SaveObject(T)
-#define IOleClientSite_GetMoniker(T,a,b,c) (T)->lpVtbl->GetMoniker(T,a,b,c)
-#define IOleClientSite_GetContainer(T,a) (T)->lpVtbl->GetContainer(T,a)
-#define IOleClientSite_ShowObject(T) (T)->lpVtbl->ShowObject(T)
-#define IOleClientSite_OnShowWindow(T,a) (T)->lpVtbl->OnShowWindow(T,a)
-#define IOleClientSite_RequestNewObjectLayout(T) (T)->lpVtbl->RequestNewObjectLayout(T)
-#endif
-
-EXTERN_C const IID IID_IOleObject;
-#define INTERFACE IOleObject
-DECLARE_INTERFACE_(IOleObject,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(SetClientSite)(THIS_ LPOLECLIENTSITE) PURE;
- STDMETHOD(GetClientSite)(THIS_ LPOLECLIENTSITE*) PURE;
- STDMETHOD(SetHostNames)(THIS_ LPCOLESTR,LPCOLESTR) PURE;
- STDMETHOD(Close)(THIS_ DWORD) PURE;
- STDMETHOD(SetMoniker)(THIS_ DWORD,LPMONIKER) PURE;
- STDMETHOD(GetMoniker)(THIS_ DWORD,DWORD,LPMONIKER*) PURE;
- STDMETHOD(InitFromData)(THIS_ LPDATAOBJECT,BOOL,DWORD) PURE;
- STDMETHOD(GetClipboardData)(THIS_ DWORD,LPDATAOBJECT*) PURE;
- STDMETHOD(DoVerb)(THIS_ LONG,LPMSG,LPOLECLIENTSITE,LONG,HWND,LPCRECT) PURE;
- STDMETHOD(EnumVerbs)(THIS_ LPENUMOLEVERB*) PURE;
- STDMETHOD(Update)(THIS) PURE;
- STDMETHOD(IsUpToDate)(THIS) PURE;
- STDMETHOD(GetUserClassID)(THIS_ LPCLSID) PURE;
- STDMETHOD(GetUserType)(THIS_ DWORD,LPOLESTR*) PURE;
- STDMETHOD(SetExtent)(THIS_ DWORD,SIZEL*) PURE;
- STDMETHOD(GetExtent)(THIS_ DWORD,SIZEL*) PURE;
- STDMETHOD(Advise)(THIS_ LPADVISESINK,PDWORD) PURE;
- STDMETHOD(Unadvise)(THIS_ DWORD) PURE;
- STDMETHOD(EnumAdvise)(THIS_ LPENUMSTATDATA*) PURE;
- STDMETHOD(GetMiscStatus)(THIS_ DWORD,PDWORD) PURE;
- STDMETHOD(SetColorScheme)(THIS_ LPLOGPALETTE) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IOleObject_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IOleObject_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IOleObject_Release(T) (T)->lpVtbl->Release(T)
-#define IOleObject_SetClientSite(T,a) (T)->lpVtbl->SetClientSite(T,a)
-#define IOleObject_GetClientSite(T,a) (T)->lpVtbl->GetClientSite(T,a)
-#define IOleObject_SetHostNames(T,a,b) (T)->lpVtbl->SetHostNames(T,a,b)
-#define IOleObject_Close(T,a) (T)->lpVtbl->Close(T,a)
-#define IOleObject_SetMoniker(T,a,b) (T)->lpVtbl->SetMoniker(T,a,b)
-#define IOleObject_GetMoniker(T,a,b,c) (T)->lpVtbl->GetMoniker(T,a,b,c)
-#define IOleObject_InitFromData(T,a,b,c) (T)->lpVtbl->InitFromData(T,a,b,c)
-#define IOleObject_GetClipboardData(T,a,b) (T)->lpVtbl->GetClipboardData(T,a,b)
-#define IOleObject_DoVerb(T,a,b,c,d,e,f) (T)->lpVtbl->DoVerb(T,a,b,c,d,e,f)
-#define IOleObject_EnumVerbs(T,a) (T)->lpVtbl->EnumVerbs(T,a)
-#define IOleObject_Update(T) (T)->lpVtbl->Update(T)
-#define IOleObject_IsUpToDate(T) (T)->lpVtbl->IsUpToDate(T)
-#define IOleObject_GetUserClassID(T,a) (T)->lpVtbl->GetUserClassID(T,a)
-#define IOleObject_GetUserType(T,a,b) (T)->lpVtbl->GetUserType(T,a,b)
-#define IOleObject_SetExtent(T,a,b) (T)->lpVtbl->SetExtent(T,a,b)
-#define IOleObject_GetExtent(T,a,b) (T)->lpVtbl->GetExtent(T,a,b)
-#define IOleObject_Advise(T,a,b) (T)->lpVtbl->Advise(T,a,b)
-#define IOleObject_Unadvise(T,a) (T)->lpVtbl->Unadvise(T,a)
-#define IOleObject_EnumAdvise(T,a) (T)->lpVtbl->EnumAdvise(T,a)
-#define IOleObject_GetMiscStatus(T,a,b) (T)->lpVtbl->GetMiscStatus(T,a,b)
-#define IOleObject_SetColorScheme(T,a) (T)->lpVtbl->SetColorScheme(T,a)
-#endif
-
-EXTERN_C const IID IID_IOleWindow;
-#define INTERFACE IOleWindow
-DECLARE_INTERFACE_(IOleWindow,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
- STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IOleWindow_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IOleWindow_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IOleWindow_Release(T) (T)->lpVtbl->Release(T)
-#define IOleWindow_GetWindow(T,a) (T)->lpVtbl->GetWindow(T,a)
-#define IOleWindow_ContextSensitiveHelp(T,a) (T)->lpVtbl->ContextSensitiveHelp(T,a)
-#endif
-
-EXTERN_C const IID IID_IOleInPlaceUIWindow;
-#define INTERFACE IOleInPlaceUIWindow
-DECLARE_INTERFACE_(IOleInPlaceUIWindow,IOleWindow)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
- STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
- STDMETHOD(GetBorder)(THIS_ LPRECT) PURE;
- STDMETHOD(RequestBorderSpace)(THIS_ LPCBORDERWIDTHS) PURE;
- STDMETHOD(SetBorderSpace)(THIS_ LPCBORDERWIDTHS) PURE;
- STDMETHOD(SetActiveObject)(THIS_ LPOLEINPLACEACTIVEOBJECT,LPCOLESTR) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IOleInPlaceObject;
-#define INTERFACE IOleInPlaceObject
-DECLARE_INTERFACE_(IOleInPlaceObject,IOleWindow)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
- STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
- STDMETHOD(InPlaceDeactivate)(THIS) PURE;
- STDMETHOD(UIDeactivate)(THIS) PURE;
- STDMETHOD(SetObjectRects)(THIS_ LPCRECT,LPCRECT) PURE;
- STDMETHOD(ReactivateAndUndo)(THIS) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IOleInPlaceActiveObject;
-#define INTERFACE IOleInPlaceActiveObject
-DECLARE_INTERFACE_(IOleInPlaceActiveObject,IOleWindow)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
- STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
- STDMETHOD(TranslateAccelerator)(THIS_ LPMSG) PURE;
- STDMETHOD(OnFrameWindowActivate)(THIS_ BOOL) PURE;
- STDMETHOD(OnDocWindowActivate)(THIS_ BOOL) PURE;
- STDMETHOD(ResizeBorder)(THIS_ LPCRECT,LPOLEINPLACEUIWINDOW,BOOL) PURE;
- STDMETHOD(EnableModeless)(THIS_ BOOL) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IOleInPlaceFrame;
-#define INTERFACE IOleInPlaceFrame
-DECLARE_INTERFACE_(IOleInPlaceFrame,IOleInPlaceUIWindow)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
- STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
- STDMETHOD(GetBorder)(THIS_ LPRECT) PURE;
- STDMETHOD(RequestBorderSpace)(THIS_ LPCBORDERWIDTHS) PURE;
- STDMETHOD(SetBorderSpace)(THIS_ LPCBORDERWIDTHS) PURE;
- STDMETHOD(SetActiveObject)(THIS_ LPOLEINPLACEACTIVEOBJECT,LPCOLESTR) PURE;
- STDMETHOD(InsertMenus)(THIS_ HMENU,LPOLEMENUGROUPWIDTHS) PURE;
- STDMETHOD(SetMenu)(THIS_ HMENU,HOLEMENU,HWND) PURE;
- STDMETHOD(RemoveMenus)(THIS_ HMENU) PURE;
- STDMETHOD(SetStatusText)(THIS_ LPCOLESTR) PURE;
- STDMETHOD(EnableModeless)(THIS_ BOOL) PURE;
- STDMETHOD(TranslateAccelerator)(THIS_ LPMSG,WORD) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IOleInPlaceFrame_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IOleInPlaceFrame_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IOleInPlaceFrame_Release(T) (T)->lpVtbl->Release(T)
-#define IOleInPlaceFrame_GetWindow(T,a) (T)->lpVtbl->GetWindow(T,a)
-#define IOleInPlaceFrame_ContextSensitiveHelp(T,a) (T)->lpVtbl->ContextSensitiveHelp(T,a)
-#define IOleInPlaceFrame_GetBorder(T,a) (T)->lpVtbl->GetBorder(T,a)
-#define IOleInPlaceFrame_RequestBorderSpace(T,a) (T)->lpVtbl->RequestBorderSpace(T,a)
-#define IOleInPlaceFrame_SetBorderSpace(T,a) (T)->lpVtbl->SetBorderSpace(T,a)
-#define IOleInPlaceFrame_SetActiveObject(T,a,b) (T)->lpVtbl->SetActiveObject(T,a,b)
-#define IOleInPlaceFrame_InsertMenus(T,a,b) (T)->lpVtbl->InsertMenus(T,a,b)
-#define IOleInPlaceFrame_SetMenu(T,a,b,c) (T)->lpVtbl->SetMenu(T,a,b,c)
-#define IOleInPlaceFrame_RemoveMenus(T,a) (T)->lpVtbl->RemoveMenus(T,a)
-#define IOleInPlaceFrame_SetStatusText(T,a) (T)->lpVtbl->SetStatusText(T,a)
-#define IOleInPlaceFrame_EnableModeless(T,a) (T)->lpVtbl->EnableModeless(T,a)
-#define IOleInPlaceFrame_TranslateAccelerator(T,a,b) (T)->lpVtbl->TranslateAccelerator(T,a,b)
-#endif
-
-EXTERN_C const IID IID_IOleInPlaceSite;
-#define INTERFACE IOleInPlaceSite
-DECLARE_INTERFACE_(IOleInPlaceSite,IOleWindow)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
- STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
- STDMETHOD(CanInPlaceActivate)(THIS) PURE;
- STDMETHOD(OnInPlaceActivate)(THIS) PURE;
- STDMETHOD(OnUIActivate)(THIS) PURE;
- STDMETHOD(GetWindowContext)(THIS_ IOleInPlaceFrame**,IOleInPlaceUIWindow**,LPRECT,LPRECT,LPOLEINPLACEFRAMEINFO) PURE;
- STDMETHOD(Scroll)(THIS_ SIZE) PURE;
- STDMETHOD(OnUIDeactivate)(THIS_ BOOL) PURE;
- STDMETHOD(OnInPlaceDeactivate)(THIS) PURE;
- STDMETHOD(DiscardUndoState)(THIS) PURE;
- STDMETHOD(DeactivateAndUndo)(THIS) PURE;
- STDMETHOD(OnPosRectChange)(THIS_ LPCRECT) PURE;
-};
-#undef INTERFACE
-
-EXTERN_C const IID IID_IOleAdviseHolder;
-#define INTERFACE IOleAdviseHolder
-DECLARE_INTERFACE_(IOleAdviseHolder,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Advise)(THIS_ LPADVISESINK,PDWORD) PURE;
- STDMETHOD(Unadvise)(THIS_ DWORD) PURE;
- STDMETHOD(EnumAdvise)(THIS_ LPENUMSTATDATA*) PURE;
- STDMETHOD(SendOnRename)(THIS_ LPMONIKER) PURE;
- STDMETHOD(SendOnSave)(THIS) PURE;
- STDMETHOD(SendOnClose)(THIS) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IOleAdviseHolder_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IOleAdviseHolder_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IOleAdviseHolder_Release(T) (T)->lpVtbl->Release(T)
-#define IOleAdviseHolder_Advise(T,a,b) (T)->lpVtbl->Advise(T,a,b)
-#define IOleAdviseHolder_Unadvise(T,a) (T)->lpVtbl->Unadvise(T,a)
-#define IOleAdviseHolder_EnumAdvise(T,a) (T)->lpVtbl->EnumAdvise(T,a)
-#define IOleAdviseHolder_SendOnRename(T,a) (T)->lpVtbl->SendOnRename(T,a)
-#define IOleAdviseHolder_SendOnSave(T) (T)->lpVtbl->SendOnSave(T)
-#define IOleAdviseHolder_SendOnClose(T) (T)->lpVtbl->SendOnClose(T)
-#endif
-
-EXTERN_C const IID IID_IDropSource;
-#define INTERFACE IDropSource
-DECLARE_INTERFACE_(IDropSource,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(QueryContinueDrag)(THIS_ BOOL,DWORD) PURE;
- STDMETHOD(GiveFeedback)(THIS_ DWORD) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IDropSource_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IDropSource_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IDropSource_Release(T) (T)->lpVtbl->Release(T)
-#define IDropSource_QueryContinueDrag(T,a,b) (T)->lpVtbl->QueryContinueDrag(T,a,b)
-#define IDropSource_GiveFeedback(T,a) (T)->lpVtbl->GiveFeedback(T,a)
-#endif
-
-EXTERN_C const IID IID_IDropTarget;
-#define INTERFACE IDropTarget
-DECLARE_INTERFACE_(IDropTarget,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(DragEnter)(THIS_ LPDATAOBJECT,DWORD,POINTL,PDWORD) PURE;
- STDMETHOD(DragOver)(THIS_ DWORD,POINTL,PDWORD) PURE;
- STDMETHOD(DragLeave)(THIS) PURE;
- STDMETHOD(Drop)(THIS_ LPDATAOBJECT,DWORD,POINTL,PDWORD) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IDropTarget_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IDropTarget_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IDropTarget_Release(T) (T)->lpVtbl->Release(T)
-#define IDropTarget_DragEnter(T,a,b,c,d) (T)->lpVtbl->DragEnter(T,a,b,c,d)
-#define IDropTarget_DragOver(T,a,b,c) (T)->lpVtbl->DragOver(T,a,b,c)
-#define IDropTarget_DragLeave(T) (T)->lpVtbl->DragLeave(T)
-#define IDropTarget_Drop(T,a,b,c,d) (T)->lpVtbl->Drop(T,a,b,c,d)
-#endif
-
-typedef BOOL(CALLBACK *__IView_pfncont)(DWORD);
-EXTERN_C const IID IID_IViewObject;
-#define INTERFACE IViewObject
-DECLARE_INTERFACE_(IViewObject,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Draw)(THIS_ DWORD,LONG,PVOID,DVTARGETDEVICE*,HDC,HDC,LPCRECTL,LPCRECTL,__IView_pfncont pfnContinue,DWORD) PURE;
- STDMETHOD(GetColorSet)(THIS_ DWORD,LONG,PVOID,DVTARGETDEVICE*,HDC,LPLOGPALETTE*) PURE;
- STDMETHOD(Freeze)(THIS_ DWORD,LONG,PVOID,PDWORD) PURE;
- STDMETHOD(Unfreeze)(THIS_ DWORD) PURE;
- STDMETHOD(SetAdvise)(THIS_ DWORD,DWORD,IAdviseSink*) PURE;
- STDMETHOD(GetAdvise)(THIS_ PDWORD,PDWORD,IAdviseSink**) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IViewObject_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IViewObject_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IViewObject_Release(T) (T)->lpVtbl->Release(T)
-#define IViewObject_Draw(T,a,b,c,d,e,f,g,h,i,j) (T)->lpVtbl->Draw(T,a,b,c,d,e,f,g,h,i,j)
-#define IViewObject_GetColorSet(T,a,b,c,d,e,f) (T)->lpVtbl->GetColorSet(T,a,b,c,d,e,f)
-#define IViewObject_Freeze(T,a,b,c,d) (T)->lpVtbl->Freeze(T,a,b,c,d)
-#define IViewObject_Unfreeze(T,a) (T)->lpVtbl->Unfreeze(T,a)
-#define IViewObject_SetAdvise(T,a,b,c) (T)->lpVtbl->SetAdvise(T,a,b,c)
-#define IViewObject_GetAdvise(T,a,b,c) (T)->lpVtbl->GetAdvise(T,a,b,c)
-#endif
-
-EXTERN_C const IID IID_IViewObject2;
-#define INTERFACE IViewObject2
-DECLARE_INTERFACE_(IViewObject2,IViewObject)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Draw)(THIS_ DWORD,LONG,PVOID,DVTARGETDEVICE*,HDC,HDC,LPCRECTL,LPCRECTL,__IView_pfncont pfnContinue,DWORD) PURE;
- STDMETHOD(GetColorSet)(THIS_ DWORD,LONG,PVOID,DVTARGETDEVICE*,HDC,LPLOGPALETTE*) PURE;
- STDMETHOD(Freeze)(THIS_ DWORD,LONG,PVOID,PDWORD) PURE;
- STDMETHOD(Unfreeze)(THIS_ DWORD) PURE;
- STDMETHOD(SetAdvise)(THIS_ DWORD,DWORD,IAdviseSink*) PURE;
- STDMETHOD(GetAdvise)(THIS_ PDWORD,PDWORD,IAdviseSink**) PURE;
- STDMETHOD(GetExtent)(THIS_ DWORD,LONG,DVTARGETDEVICE*,LPSIZEL) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IViewObject2_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IViewObject2_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IViewObject2_Release(T) (T)->lpVtbl->Release(T)
-#define IViewObject2_Draw(T,a,b,c,d,e,f,g,h,i,j) (T)->lpVtbl->Draw(T,a,b,c,d,e,f,g,h,i,j)
-#define IViewObject2_GetColorSet(T,a,b,c,d,e,f) (T)->lpVtbl->GetColorSet(T,a,b,c,d,e,f)
-#define IViewObject2_Freeze(T,a,b,c,d) (T)->lpVtbl->Freeze(T,a,b,c,d)
-#define IViewObject2_Unfreeze(T,a) (T)->lpVtbl->Unfreeze(T,a)
-#define IViewObject2_SetAdvise(T,a,b,c) (T)->lpVtbl->SetAdvise(T,a,b,c)
-#define IViewObject2_GetAdvise(T,a,b,c) (T)->lpVtbl->GetAdvise(T,a,b,c)
-#define IViewObject2_GetExtent(T,a,b,c,d) (T)->lpVtbl->GetExtent(T,a,b,c,d)
-#endif
-
-EXTERN_C const IID IID_IOleCache;
-#define INTERFACE IOleCache
-DECLARE_INTERFACE_(IOleCache,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Cache)(THIS_ FORMATETC*,DWORD,DWORD*) PURE;
- STDMETHOD(Uncache)(THIS_ DWORD) PURE;
- STDMETHOD(EnumCache)(THIS_ IEnumSTATDATA**);
- STDMETHOD(InitCache)(THIS_ LPDATAOBJECT);
- STDMETHOD(SetData)(THIS_ FORMATETC*,STGMEDIUM*,BOOL);
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IOleCache_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IOleCache_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IOleCache_Release(T) (T)->lpVtbl->Release(T)
-#define IOleCache_Cache(T,a,b,c) (T)->lpVtbl->Cache(T,a,b,c)
-#define IOleCache_Uncache(T,a) (T)->lpVtbl->Uncache(T,a)
-#define IOleCache_EnumCache(T,a) (T)->lpVtbl->EnumCache(T,a)
-#define IOleCache_InitCache(T,a) (T)->lpVtbl->InitCache(T,a)
-#define IOleCache_SetData(T,a,b,c) (T)->lpVtbl->SetData(T,a,b,c)
-#endif
-
-EXTERN_C const IID IID_IOleCache2;
-#define INTERFACE IOleCache2
-DECLARE_INTERFACE_(IOleCache2,IOleCache)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Cache)(THIS_ FORMATETC*,DWORD,DWORD*) PURE;
- STDMETHOD(Uncache)(THIS_ DWORD) PURE;
- STDMETHOD(EnumCache)(THIS_ IEnumSTATDATA**) PURE;
- STDMETHOD(InitCache)(THIS_ LPDATAOBJECT) PURE;
- STDMETHOD(SetData)(THIS_ FORMATETC*,STGMEDIUM*,BOOL) PURE;
- STDMETHOD(UpdateCache)(THIS_ LPDATAOBJECT,DWORD,LPVOID) PURE;
- STDMETHOD(DiscardCache)(THIS_ DWORD) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IOleCache2_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IOleCache2_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IOleCache2_Release(T) (T)->lpVtbl->Release(T)
-#define IOleCache2_Cache(T,a,b,c) (T)->lpVtbl->Cache(T,a,b,c)
-#define IOleCache2_Uncache(T,a) (T)->lpVtbl->Uncache(T,a)
-#define IOleCache2_EnumCache(T,a) (T)->lpVtbl->EnumCache(T,a)
-#define IOleCache2_InitCache(T,a) (T)->lpVtbl->InitCache(T,a)
-#define IOleCache2_SetData(T,a,b,c) (T)->lpVtbl->SetData(T,a,b,c)
-#define IOleCache2_UpdateCache(T,a,b,c) (T)->lpVtbl->UpdateCache(T,a,b,c)
-#define IOleCache2_DiscardCache(T,a) (T)->lpVtbl->DiscardCache(T,a)
-#endif
-
-EXTERN_C const IID IID_IOleCacheControl;
-#define INTERFACE IOleCacheControl
-DECLARE_INTERFACE_(IOleCacheControl,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(OnRun)(THIS_ LPDATAOBJECT) PURE;
- STDMETHOD(OnStop)(THIS) PURE;
-};
-#undef INTERFACE
-
-#ifdef __cplusplus
-}
-#endif
-#endif
-
diff --git a/winsup/w32api/include/pbt.h b/winsup/w32api/include/pbt.h
deleted file mode 100644
index 21cb1cd..0000000
--- a/winsup/w32api/include/pbt.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef _PBT_H
-#define _PBT_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-/* Also in winuser.h */
-#define PBT_APMQUERYSUSPEND 0
-#define PBT_APMQUERYSTANDBY 1
-#define PBT_APMQUERYSUSPENDFAILED 2
-#define PBT_APMQUERYSTANDBYFAILED 3
-#define PBT_APMSUSPEND 4
-#define PBT_APMSTANDBY 5
-#define PBT_APMRESUMECRITICAL 6
-#define PBT_APMRESUMESUSPEND 7
-#define PBT_APMRESUMESTANDBY 8
-#define PBT_APMBATTERYLOW 9
-#define PBT_APMPOWERSTATUSCHANGE 10
-#define PBT_APMOEMEVENT 11
-#define PBT_APMRESUMEAUTOMATIC 18
-
-#define PBTF_APMRESUMEFROMFAILURE 1
-
-#endif
diff --git a/winsup/w32api/include/poppack.h b/winsup/w32api/include/poppack.h
deleted file mode 100644
index bb04d45..0000000
--- a/winsup/w32api/include/poppack.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#ifndef RC_INVOKED
-#pragma pack(pop)
-#endif
diff --git a/winsup/w32api/include/powrprof.h b/winsup/w32api/include/powrprof.h
deleted file mode 100644
index dc7d1f3..0000000
--- a/winsup/w32api/include/powrprof.h
+++ /dev/null
@@ -1,120 +0,0 @@
-#ifndef _POWRPROF_H
-#define _POWRPROF_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define EnableMultiBatteryDisplay 2
-#define EnablePasswordLogon 4
-#define EnableSysTrayBatteryMeter 1
-#define EnableWakeOnRing 8
-#define EnableVideoDimDisplay 16
-#define NEWSCHEME (UINT)-1
-
-#ifndef RC_INVOKED
-#include <ntdef.h> /* for NTSTATUS */
-typedef struct _GLOBAL_MACHINE_POWER_POLICY{
- ULONG Revision;
- SYSTEM_POWER_STATE LidOpenWakeAc;
- SYSTEM_POWER_STATE LidOpenWakeDc;
- ULONG BroadcastCapacityResolution;
-} GLOBAL_MACHINE_POWER_POLICY, *PGLOBAL_MACHINE_POWER_POLICY;
-typedef struct _GLOBAL_USER_POWER_POLICY{
- ULONG Revision;
- POWER_ACTION_POLICY PowerButtonAc;
- POWER_ACTION_POLICY PowerButtonDc;
- POWER_ACTION_POLICY SleepButtonAc;
- POWER_ACTION_POLICY SleepButtonDc;
- POWER_ACTION_POLICY LidCloseAc;
- POWER_ACTION_POLICY LidCloseDc;
- SYSTEM_POWER_LEVEL DischargePolicy[NUM_DISCHARGE_POLICIES];
- ULONG GlobalFlags;
-} GLOBAL_USER_POWER_POLICY, *PGLOBAL_USER_POWER_POLICY;
-typedef struct _GLOBAL_POWER_POLICY{
- GLOBAL_USER_POWER_POLICY user;
- GLOBAL_MACHINE_POWER_POLICY mach;
-} GLOBAL_POWER_POLICY, *PGLOBAL_POWER_POLICY;
-typedef struct _MACHINE_POWER_POLICY{
- ULONG Revision;
- SYSTEM_POWER_STATE MinSleepAc;
- SYSTEM_POWER_STATE MinSleepDc;
- SYSTEM_POWER_STATE ReducedLatencySleepAc;
- SYSTEM_POWER_STATE ReducedLatencySleepDc;
- ULONG DozeTimeoutAc;
- ULONG DozeTimeoutDc;
- ULONG DozeS4TimeoutAc;
- ULONG DozeS4TimeoutDc;
- UCHAR MinThrottleAc;
- UCHAR MinThrottleDc;
- UCHAR pad1[2];
- POWER_ACTION_POLICY OverThrottledAc;
- POWER_ACTION_POLICY OverThrottledDc;
-} MACHINE_POWER_POLICY, *PMACHINE_POWER_POLICY;
-typedef struct _MACHINE_PROCESSOR_POWER_POLICY {
- ULONG Revision;
- PROCESSOR_POWER_POLICY ProcessorPolicyAc;
- PROCESSOR_POWER_POLICY ProcessorPolicyDc;
-} MACHINE_PROCESSOR_POWER_POLICY, *PMACHINE_PROCESSOR_POWER_POLICY;
-typedef struct _USER_POWER_POLICY{
- ULONG Revision;
- POWER_ACTION_POLICY IdleAc;
- POWER_ACTION_POLICY IdleDc;
- ULONG IdleTimeoutAc;
- ULONG IdleTimeoutDc;
- UCHAR IdleSensitivityAc;
- UCHAR IdleSensitivityDc;
- UCHAR ThrottlePolicyAc;
- UCHAR ThrottlePolicyDc;
- SYSTEM_POWER_STATE MaxSleepAc;
- SYSTEM_POWER_STATE MaxSleepDc;
- ULONG Reserved[2];
- ULONG VideoTimeoutAc;
- ULONG VideoTimeoutDc;
- ULONG SpindownTimeoutAc;
- ULONG SpindownTimeoutDc;
- BOOLEAN OptimizeForPowerAc;
- BOOLEAN OptimizeForPowerDc;
- UCHAR FanThrottleToleranceAc;
- UCHAR FanThrottleToleranceDc;
- UCHAR ForcedThrottleAc;
- UCHAR ForcedThrottleDc;
-} USER_POWER_POLICY, *PUSER_POWER_POLICY;
-typedef struct _POWER_POLICY{
- USER_POWER_POLICY user;
- MACHINE_POWER_POLICY mach;
-} POWER_POLICY, *PPOWER_POLICY;
-typedef BOOLEAN (CALLBACK* PWRSCHEMESENUMPROC)(UINT, DWORD, LPTSTR, DWORD, LPTSTR, PPOWER_POLICY, LPARAM);
-typedef BOOLEAN (CALLBACK* PFNNTINITIATEPWRACTION)(POWER_ACTION, SYSTEM_POWER_STATE, ULONG, BOOLEAN);
-NTSTATUS WINAPI CallNtPowerInformation(POWER_INFORMATION_LEVEL, PVOID, ULONG, PVOID, ULONG);
-BOOLEAN WINAPI CanUserWritePwrScheme(VOID);
-BOOLEAN WINAPI DeletePwrScheme(UINT);
-BOOLEAN WINAPI EnumPwrSchemes(PWRSCHEMESENUMPROC, LPARAM);
-BOOLEAN WINAPI GetActivePwrScheme(PUINT);
-BOOLEAN WINAPI GetCurrentPowerPolicies(PGLOBAL_POWER_POLICY, PPOWER_POLICY);
-BOOLEAN WINAPI GetPwrCapabilities(PSYSTEM_POWER_CAPABILITIES);
-BOOLEAN WINAPI GetPwrDiskSpindownRange(PUINT, PUINT);
-BOOLEAN WINAPI IsAdminOverrideActive(PADMINISTRATOR_POWER_POLICY);
-BOOLEAN WINAPI IsPwrHibernateAllowed(VOID);
-BOOLEAN WINAPI IsPwrShutdownAllowed(VOID);
-BOOLEAN WINAPI IsPwrSuspendAllowed(VOID);
-BOOLEAN WINAPI ReadGlobalPwrPolicy(PGLOBAL_POWER_POLICY);
-BOOLEAN WINAPI ReadProcessorPwrScheme(UINT, PMACHINE_PROCESSOR_POWER_POLICY);
-BOOLEAN WINAPI ReadPwrScheme(UINT, PPOWER_POLICY);
-BOOLEAN WINAPI SetActivePwrScheme(UINT, PGLOBAL_POWER_POLICY, PPOWER_POLICY);
-BOOLEAN WINAPI SetSuspendState(BOOLEAN, BOOLEAN, BOOLEAN);
-BOOLEAN WINAPI WriteGlobalPwrPolicy(PGLOBAL_POWER_POLICY);
-BOOLEAN WINAPI WriteProcessorPwrScheme(UINT, PMACHINE_PROCESSOR_POWER_POLICY);
-BOOLEAN WINAPI ValidatePowerPolicies(PGLOBAL_POWER_POLICY, PPOWER_POLICY);
-BOOLEAN WINAPI WritePwrScheme(PUINT, LPTSTR, LPTSTR, PPOWER_POLICY);
-
-#endif /* RC_INVOKED */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _POWRPROF_H */
diff --git a/winsup/w32api/include/prsht.h b/winsup/w32api/include/prsht.h
deleted file mode 100644
index 299834b..0000000
--- a/winsup/w32api/include/prsht.h
+++ /dev/null
@@ -1,304 +0,0 @@
-#ifndef _PRSHT_H
-#define _PRSHT_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define MAXPROPPAGES 100
-#define PSP_DEFAULT 0
-#define PSP_DLGINDIRECT 1
-#define PSP_USEHICON 2
-#define PSP_USEICONID 4
-#define PSP_USETITLE 8
-#define PSP_RTLREADING 16
-#define PSP_HASHELP 32
-#define PSP_USEREFPARENT 64
-#define PSP_USECALLBACK 128
-#define PSP_PREMATURE 1024
-#if (_WIN32_IE >= 0x0400)
-#define PSP_HIDEHEADER 2048
-#define PSP_USEHEADERTITLE 4096
-#define PSP_USEHEADERSUBTITLE 8192
-#endif
-#define PSPCB_RELEASE 1
-#define PSPCB_CREATE 2
-#define PSH_DEFAULT 0
-#define PSH_PROPTITLE 1
-#define PSH_USEHICON 2
-#define PSH_USEICONID 4
-#define PSH_PROPSHEETPAGE 8
-#define PSH_WIZARDHASFINISH 16
-#define PSH_WIZARD 32
-#define PSH_USEPSTARTPAGE 64
-#define PSH_NOAPPLYNOW 128
-#define PSH_USECALLBACK 256
-#define PSH_HASHELP 512
-#define PSH_MODELESS 1024
-#define PSH_RTLREADING 2048
-#define PSH_WIZARDCONTEXTHELP 4096
-#if (_WIN32_IE >= 0x0400)
-#define PSH_WATERMARK 32768
-#define PSH_USEHBMWATERMARK 65536
-#define PSH_USEHPLWATERMARK 131072
-#define PSH_STRETCHWATERMARK 262144
-#define PSH_HEADER 524288
-#define PSH_USEHBMHEADER 1048576
-#define PSH_USEPAGELANG 2097152
-#if (_WIN32_IE < 0x0500)
-#define PSH_WIZARD97 0x00002000
-#else
-#define PSH_WIZARD97 0x01000000
-#endif
-#endif /* _WIN32_IE >= 0x0400 */
-#if (_WIN32_IE >= 0x0500)
-#define PSH_WIZARD_LITE 0x400000
-#define PSH_NOCONTEXTHELP 0x2000000
-#endif
-#define PSCB_INITIALIZED 1
-#define PSCB_PRECREATE 2
-#define PSM_GETTABCONTROL 1140
-#define PSM_GETCURRENTPAGEHWND 1142
-#define PSM_ISDIALOGMESSAGE 1141
-#define PSM_PRESSBUTTON 1137
-#define PSM_SETCURSELID 1138
-#define PSM_SETFINISHTEXTW 1145
-#define PSM_SETFINISHTEXTA 1139
-#define PSN_FIRST (-200)
-#define PSN_LAST (-299)
-#define PSN_APPLY (-202)
-#define PSN_HELP (-205)
-#define PSN_KILLACTIVE (-201)
-#define PSN_QUERYCANCEL (-209)
-#define PSN_RESET (-203)
-#define PSN_SETACTIVE (-200)
-#define PSN_WIZBACK (-206)
-#define PSN_WIZFINISH (-208)
-#define PSN_WIZNEXT (-207)
-#define PSNRET_NOERROR 0
-#define PSNRET_INVALID 1
-#define PSNRET_INVALID_NOCHANGEPAGE 2
-#define ID_PSRESTARTWINDOWS 2
-#define ID_PSREBOOTSYSTEM 3
-#define WIZ_CXDLG 276
-#define WIZ_CYDLG 140
-#define WIZ_CXBMP 80
-#define WIZ_BODYX 92
-#define WIZ_BODYCX 184
-#define PROP_SM_CXDLG 212
-#define PROP_SM_CYDLG 188
-#define PROP_MED_CXDLG 227
-#define PROP_MED_CYDLG 215
-#define PROP_LG_CXDLG 252
-#define PROP_LG_CYDLG 218
-#define PSBTN_MAX 6
-#define PSBTN_BACK 0
-#define PSBTN_NEXT 1
-#define PSBTN_FINISH 2
-#define PSBTN_OK 3
-#define PSBTN_APPLYNOW 4
-#define PSBTN_CANCEL 5
-#define PSBTN_HELP 6
-#define PSWIZB_BACK 1
-#define PSWIZB_NEXT 2
-#define PSWIZB_FINISH 4
-#define PSWIZB_DISABLEDFINISH 8
-#define PSM_SETWIZBUTTONS (WM_USER+112)
-#define PSM_APPLY (WM_USER+110)
-#define PSM_UNCHANGED (WM_USER+109)
-#define PSM_QUERYSIBLINGS (WM_USER+108)
-#define PSM_CANCELTOCLOSE (WM_USER+107)
-#define PSM_REBOOTSYSTEM (WM_USER+106)
-#define PSM_RESTARTWINDOWS (WM_USER+105)
-#define PSM_CHANGED (WM_USER+104)
-#define PSM_ADDPAGE (WM_USER+103)
-#define PSM_REMOVEPAGE (WM_USER+102)
-#define PSM_SETCURSEL (WM_USER+101)
-#define PSM_SETTITLEA (WM_USER+111)
-#define PSM_SETTITLEW (WM_USER+120)
-
-#ifndef RC_INVOKED
-
-#pragma pack(push,8)
-typedef struct _PROPSHEETPAGEA {
- DWORD dwSize;
- DWORD dwFlags;
- HINSTANCE hInstance;
- _ANONYMOUS_UNION union {
- LPCSTR pszTemplate;
- LPCDLGTEMPLATE pResource;
- } DUMMYUNIONNAME;
- _ANONYMOUS_UNION union {
- HICON hIcon;
- LPCSTR pszIcon;
- } DUMMYUNIONNAME2;
- LPCSTR pszTitle;
- DLGPROC pfnDlgProc;
- LPARAM lParam;
- UINT(CALLBACK *pfnCallback)(HWND,UINT,struct _PROPSHEETPAGEA*);
- UINT *pcRefParent;
-#if (_WIN32_IE >= 0x0400)
- LPCSTR pszHeaderTitle;
- LPCSTR pszHeaderSubTitle;
-#endif
-} PROPSHEETPAGEA,*LPPROPSHEETPAGEA;
-typedef const PROPSHEETPAGEA *LPCPROPSHEETPAGEA;
-typedef struct _PROPSHEETPAGEW {
- DWORD dwSize;
- DWORD dwFlags;
- HINSTANCE hInstance;
- _ANONYMOUS_UNION union {
- LPCWSTR pszTemplate;
- LPCDLGTEMPLATE pResource;
- } DUMMYUNIONNAME;
- _ANONYMOUS_UNION union {
- HICON hIcon;
- LPCWSTR pszIcon;
- } DUMMYUNIONNAME2;
- LPCWSTR pszTitle;
- DLGPROC pfnDlgProc;
- LPARAM lParam;
- UINT(CALLBACK *pfnCallback)(HWND,UINT,struct _PROPSHEETPAGEW*);
- UINT *pcRefParent;
-#if (_WIN32_IE >= 0x0400)
- LPCWSTR pszHeaderTitle;
- LPCWSTR pszHeaderSubTitle;
-#endif
-} PROPSHEETPAGEW,*LPPROPSHEETPAGEW;
-typedef const PROPSHEETPAGEW *LPCPROPSHEETPAGEW;
-typedef UINT(CALLBACK *LPFNPSPCALLBACKA)(HWND,UINT,LPPROPSHEETPAGEA);
-typedef UINT(CALLBACK *LPFNPSPCALLBACKW)(HWND,UINT,LPPROPSHEETPAGEW);
-typedef int(CALLBACK *PFNPROPSHEETCALLBACK)(HWND,UINT,LPARAM);
-DECLARE_HANDLE(HPROPSHEETPAGE);
-typedef struct _PROPSHEETHEADERA {
- DWORD dwSize;
- DWORD dwFlags;
- HWND hwndParent;
- HINSTANCE hInstance;
- _ANONYMOUS_UNION union {
- HICON hIcon;
- LPCSTR pszIcon;
- }DUMMYUNIONNAME;
- LPCSTR pszCaption;
- UINT nPages;
- _ANONYMOUS_UNION union {
- UINT nStartPage;
- LPCSTR pStartPage;
- }DUMMYUNIONNAME2;
- _ANONYMOUS_UNION union {
- LPCPROPSHEETPAGEA ppsp;
- HPROPSHEETPAGE *phpage;
- }DUMMYUNIONNAME3;
- PFNPROPSHEETCALLBACK pfnCallback;
-#if (_WIN32_IE >= 0x0400)
- _ANONYMOUS_UNION union {
- HBITMAP hbmWatermark;
- LPCSTR pszbmWatermark;
- } DUMMYUNIONNAME4;
- HPALETTE hplWatermark;
- _ANONYMOUS_UNION union {
- HBITMAP hbmHeader;
- LPCSTR pszbmHeader;
- } DUMMYUNIONNAME5;
-#endif
-} PROPSHEETHEADERA,*LPPROPSHEETHEADERA;
-typedef const PROPSHEETHEADERA *LPCPROPSHEETHEADERA;
-typedef struct _PROPSHEETHEADERW {
- DWORD dwSize;
- DWORD dwFlags;
- HWND hwndParent;
- HINSTANCE hInstance;
- _ANONYMOUS_UNION union {
- HICON hIcon;
- LPCWSTR pszIcon;
- }DUMMYUNIONNAME;
- LPCWSTR pszCaption;
- UINT nPages;
- _ANONYMOUS_UNION union {
- UINT nStartPage;
- LPCWSTR pStartPage;
- }DUMMYUNIONNAME2;
- _ANONYMOUS_UNION union {
- LPCPROPSHEETPAGEW ppsp;
- HPROPSHEETPAGE *phpage;
- }DUMMYUNIONNAME3;
- PFNPROPSHEETCALLBACK pfnCallback;
-#if (_WIN32_IE >= 0x0400)
- _ANONYMOUS_UNION union {
- HBITMAP hbmWatermark;
- LPCWSTR pszbmWatermark;
- } DUMMYUNIONNAME4;
- HPALETTE hplWatermark;
- _ANONYMOUS_UNION union {
- HBITMAP hbmHeader;
- LPCWSTR pszbmHeader;
- } DUMMYUNIONNAME5;
-#endif
-} PROPSHEETHEADERW,*LPPROPSHEETHEADERW;
-typedef const PROPSHEETHEADERW *LPCPROPSHEETHEADERW;
-typedef BOOL(CALLBACK *LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE,LPARAM);
-typedef BOOL(CALLBACK *LPFNADDPROPSHEETPAGES)(LPVOID,LPFNADDPROPSHEETPAGE,LPARAM);
-typedef struct _PSHNOTIFY {
- NMHDR hdr;
- LPARAM lParam;
-} PSHNOTIFY,*LPPSHNOTIFY;
-
-#pragma pack(pop)
-
-HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(LPCPROPSHEETPAGEA);
-HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW);
-BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE);
-int WINAPI PropertySheetA(LPCPROPSHEETHEADERA);
-int WINAPI PropertySheetW(LPCPROPSHEETHEADERW);
-#define PropSheet_AddPage(d,p) SendMessage(d,PSM_ADDPAGE,0,(LPARAM)p)
-#define PropSheet_Apply(d) SendMessage(d,PSM_APPLY,0,0)
-#define PropSheet_CancelToClose(d) SendMessage(d,PSM_CANCELTOCLOSE,0,0)
-#define PropSheet_Changed(d,w) SendMessage(d,PSM_CHANGED,(WPARAM)w,0)
-#define PropSheet_GetCurrentPageHwnd(d) (HWND)SendMessage(d,PSM_GETCURRENTPAGEHWND,0,0)
-#define PropSheet_GetTabControl(d) (HWND)SendMessage(d,PSM_GETTABCONTROL,0,0)
-#define PropSheet_IsDialogMessage(d,m) (BOOL)SendMessage(d,PSM_ISDIALOGMESSAGE,0,(LPARAM)m)
-#define PropSheet_PressButton(d,i) SendMessage(d,PSM_PRESSBUTTON,i,0)
-#define PropSheet_QuerySiblings(d,w,l) SendMessage(d,PSM_QUERYSIBLINGS,w,l)
-#define PropSheet_RebootSystem(d) SendMessage(d,PSM_REBOOTSYSTEM,0,0)
-#define PropSheet_RemovePage(d,i,p) SendMessage(d,PSM_REMOVEPAGE,i,(LPARAM)p)
-#define PropSheet_RestartWindows(d) SendMessage(d,PSM_RESTARTWINDOWS,0,0)
-#define PropSheet_SetCurSel(d,p,i) SendMessage(d,PSM_SETCURSEL,i,(LPARAM)p)
-#define PropSheet_SetCurSelByID(d,i) SendMessage(d,PSM_SETCURSELID,0,i)
-#define PropSheet_SetFinishText(d,s) SendMessage(d,PSM_SETFINISHTEXT,0,(LPARAM)s)
-#define PropSheet_SetTitle(d,w,s) SendMessage(d,PSM_SETTITLE,w,(LPARAM)s)
-#define PropSheet_SetWizButtons(d,f) PostMessage(d,PSM_SETWIZBUTTONS,0,(LPARAM)f)
-#define PropSheet_UnChanged(d,w) SendMessage(d,PSM_UNCHANGED,(WPARAM)w,0)
-#endif
-
-#ifdef UNICODE
-#define LPFNPSPCALLBACK LPFNPSPCALLBACKW
-#define PROPSHEETPAGE PROPSHEETPAGEW
-#define LPPROPSHEETPAGE LPPROPSHEETPAGEW
-#define LPCPROPSHEETPAGE LPCPROPSHEETPAGEW
-#define PROPSHEETHEADER PROPSHEETHEADERW
-#define LPPROPSHEETHEADER LPPROPSHEETHEADERW
-#define LPCPROPSHEETHEADER LPCPROPSHEETHEADERW
-#define PSM_SETTITLE PSM_SETTITLEW
-#define PSM_SETFINISHTEXT PSM_SETFINISHTEXTW
-#define CreatePropertySheetPage CreatePropertySheetPageW
-#define PropertySheet PropertySheetW
-#else
-#define LPFNPSPCALLBACK LPFNPSPCALLBACKA
-#define PROPSHEETPAGE PROPSHEETPAGEA
-#define LPPROPSHEETPAGE LPPROPSHEETPAGEA
-#define LPCPROPSHEETPAGE LPCPROPSHEETPAGEA
-#define PROPSHEETHEADER PROPSHEETHEADERA
-#define LPPROPSHEETHEADER LPPROPSHEETHEADERA
-#define LPCPROPSHEETHEADER LPCPROPSHEETHEADERA
-#define PSM_SETTITLE PSM_SETTITLEA
-#define PSM_SETFINISHTEXT PSM_SETFINISHTEXTA
-#define CreatePropertySheetPage CreatePropertySheetPageA
-#define PropertySheet PropertySheetA
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/psapi.h b/winsup/w32api/include/psapi.h
deleted file mode 100644
index 398f64a..0000000
--- a/winsup/w32api/include/psapi.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- psapi.h - Include file for PSAPI.DLL APIs
-
- Written by Mumit Khan <khan@nanotech.wisc.edu>
-
- This file is part of a free library for the Win32 API.
-
- NOTE: This strictly does not belong in the Win32 API since it's
- really part of Platform SDK. However,GDB needs it and we might
- as well provide it here.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-#ifndef _PSAPI_H
-#define _PSAPI_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef RC_INVOKED
-
-typedef struct _MODULEINFO {
- LPVOID lpBaseOfDll;
- DWORD SizeOfImage;
- LPVOID EntryPoint;
-} MODULEINFO,*LPMODULEINFO;
-
-typedef struct _PSAPI_WS_WATCH_INFORMATION {
- LPVOID FaultingPc;
- LPVOID FaultingVa;
-} PSAPI_WS_WATCH_INFORMATION,*PPSAPI_WS_WATCH_INFORMATION;
-
-typedef struct _PROCESS_MEMORY_COUNTERS {
- DWORD cb;
- DWORD PageFaultCount;
- DWORD PeakWorkingSetSize;
- DWORD WorkingSetSize;
- DWORD QuotaPeakPagedPoolUsage;
- DWORD QuotaPagedPoolUsage;
- DWORD QuotaPeakNonPagedPoolUsage;
- DWORD QuotaNonPagedPoolUsage;
- DWORD PagefileUsage;
- DWORD PeakPagefileUsage;
-} PROCESS_MEMORY_COUNTERS,*PPROCESS_MEMORY_COUNTERS;
-
-/* Grouped by application,not in alphabetical order. */
-BOOL WINAPI EnumProcesses(DWORD *,DWORD,DWORD *);
-BOOL WINAPI EnumProcessModules(HANDLE,HMODULE *,DWORD,LPDWORD);
-DWORD WINAPI GetModuleBaseNameA(HANDLE,HMODULE,LPSTR,DWORD);
-DWORD WINAPI GetModuleBaseNameW(HANDLE,HMODULE,LPWSTR,DWORD);
-DWORD WINAPI GetModuleFileNameExA(HANDLE,HMODULE,LPSTR,DWORD);
-DWORD WINAPI GetModuleFileNameExW(HANDLE,HMODULE,LPWSTR,DWORD);
-BOOL WINAPI GetModuleInformation(HANDLE,HMODULE,LPMODULEINFO,DWORD);
-BOOL WINAPI EmptyWorkingSet(HANDLE);
-BOOL WINAPI QueryWorkingSet(HANDLE,PVOID,DWORD);
-BOOL WINAPI InitializeProcessForWsWatch(HANDLE);
-BOOL WINAPI GetWsChanges(HANDLE,PPSAPI_WS_WATCH_INFORMATION,DWORD);
-DWORD WINAPI GetMappedFileNameW(HANDLE,LPVOID,LPWSTR,DWORD);
-DWORD WINAPI GetMappedFileNameA(HANDLE,LPVOID,LPSTR,DWORD);
-BOOL WINAPI EnumDeviceDrivers(LPVOID *,DWORD,LPDWORD);
-DWORD WINAPI GetDeviceDriverBaseNameA(LPVOID,LPSTR,DWORD);
-DWORD WINAPI GetDeviceDriverBaseNameW(LPVOID,LPWSTR,DWORD);
-DWORD WINAPI GetDeviceDriverFileNameA(LPVOID,LPSTR,DWORD);
-DWORD WINAPI GetDeviceDriverFileNameW(LPVOID,LPWSTR,DWORD);
-BOOL WINAPI GetProcessMemoryInfo(HANDLE,PPROCESS_MEMORY_COUNTERS,DWORD);
-#if (_WIN32_WINNT >= 0x0501)
-DWORD WINAPI GetProcessImageFileNameA(HANDLE,LPSTR,DWORD);
-DWORD WINAPI GetProcessImageFileNameW(HANDLE,LPWSTR,DWORD);
-#endif
-
-#endif /* not RC_INVOKED */
-
-#ifdef UNICODE
-#define GetModuleBaseName GetModuleBaseNameW
-#define GetModuleFileNameEx GetModuleFileNameExW
-#define GetMappedFileName GetMappedFileNameW
-#define GetDeviceDriverBaseName GetDeviceDriverBaseNameW
-#define GetDeviceDriverFileName GetDeviceDriverFileNameW
-#if (_WIN32_WINNT >= 0x0501)
-#define GetProcessImageFileName GetProcessImageFileNameW
-#endif
-#else
-#define GetModuleBaseName GetModuleBaseNameA
-#define GetModuleFileNameEx GetModuleFileNameExA
-#define GetMappedFileName GetMappedFileNameA
-#define GetDeviceDriverBaseName GetDeviceDriverBaseNameA
-#define GetDeviceDriverFileName GetDeviceDriverFileNameA
-#if (_WIN32_WINNT >= 0x0501)
-#define GetProcessImageFileName GetProcessImageFileNameA
-#endif
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _PSAPI_H */
-
diff --git a/winsup/w32api/include/pshpack1.h b/winsup/w32api/include/pshpack1.h
deleted file mode 100644
index 3cbcf23..0000000
--- a/winsup/w32api/include/pshpack1.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#ifndef RC_INVOKED
-#pragma pack(push,1)
-#endif
diff --git a/winsup/w32api/include/pshpack2.h b/winsup/w32api/include/pshpack2.h
deleted file mode 100644
index 4d88e00..0000000
--- a/winsup/w32api/include/pshpack2.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#ifndef RC_INVOKED
-#pragma pack(push,2)
-#endif
diff --git a/winsup/w32api/include/pshpack4.h b/winsup/w32api/include/pshpack4.h
deleted file mode 100644
index c1c3cf9..0000000
--- a/winsup/w32api/include/pshpack4.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#ifndef RC_INVOKED
-#pragma pack(push,4)
-#endif
diff --git a/winsup/w32api/include/pshpack8.h b/winsup/w32api/include/pshpack8.h
deleted file mode 100644
index f0c4539..0000000
--- a/winsup/w32api/include/pshpack8.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#ifndef RC_INVOKED
-#pragma pack(push,8)
-#endif
diff --git a/winsup/w32api/include/qedit.h b/winsup/w32api/include/qedit.h
deleted file mode 100644
index 2e8b821..0000000
--- a/winsup/w32api/include/qedit.h
+++ /dev/null
@@ -1,70 +0,0 @@
-#ifndef _QEDIT_H
-#define _QEDIT_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifndef _STRMIF_H
-#include <strmif.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- DirectShow Reference - Constants and GUIDs - Error and Success Codes */
-#define S_WARN_OUTPUTRESET 0x00009DD4
-#define E_NOTINTREE 0x80040400
-#define E_RENDER_ENGINE_IS_BROKEN 0x80040401
-#define E_MUST_INIT_RENDERER 0x80040402
-#define E_NOTDETERMINED 0x80040403
-#define E_NO_TIMELINE 0x80040404
-/*--- DirectShow Editing Services - C++ Reference - Structures */
-typedef struct {
- BSTR Name;
- DISPID dispID;
- LONG nValues;
-} DEXTER_PARAM;
-typedef struct {
- VARIANT v;
- REFERENCE_TIME rt;
- DWORD dwInterp;
-} DEXTER_VALUE;
-typedef struct _SCompFmt0 {
- long nFormatId;
- AM_MEDIA_TYPE MediaType;
-} SCompFmt0;
-/*--- DirectShow Editing Services - C++ Reference - Enumerated Types */
-typedef enum {
- DEXTERF_BOUNDING = -1,
- DEXTERF_EXACTLY_AT = 0,
- DEXTERF_FORWARDS = 1
-} DEXTERF_TRACK_SEARCH_FLAGS;
-typedef enum {
- TIMELINE_MAJOR_TYPE_COMPOSITE = 1,
- TIMELINE_MAJOR_TYPE_TRACK = 2,
- TIMELINE_MAJOR_TYPE_SOURCE = 4,
- TIMELINE_MAJOR_TYPE_TRANSITION = 8,
- TIMELINE_MAJOR_TYPE_EFFECT = 16,
- TIMELINE_MAJOR_TYPE_GROUP = 128
-} TIMELINE_MAJOR_TYPE;
-/*--- DirectShow Editing Services - C++ Reference - Constants */
-#define CONNECTF_DYNAMIC_NONE 0x00
-#define CONNECTF_DYNAMIC_SOURCES 0x01
-#define CONNECTF_DYNAMIC_EFFECTS 0x02
-#define SFN_VALIDATEF_CHECK 0x01
-#define SFN_VALIDATEF_POPUP 0x02
-#define SFN_VALIDATEF_TELLME 0x04
-#define SFN_VALIDATEF_REPLACE 0x08
-#define SFN_VALIDATEF_USELOCAL 0x10
-#define SFN_VALIDATEF_NOFIND 0x20
-#define SFN_VALIDATEF_IGNOREMUTED 0x40
-#define RESIZEF_STRETCH 0
-#define RESIZEF_CROP 1
-#define RESIZEF_PRESERVEASPECTRATIO 2
-#define RESIZEF_PRESERVEASPECTRATIO_NOLETTERBOX 3
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/rapi.h b/winsup/w32api/include/rapi.h
deleted file mode 100644
index 4cf6515..0000000
--- a/winsup/w32api/include/rapi.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* rapi.h - main header file for the RAPI API
-
- NOTE: This strictly does not belong in the Win32 API since it's
- really part of Platform SDK.
-
-*/
-
-#ifndef _RAPI_H
-#define _RAPI_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-typedef struct IRAPIStream
-{
- struct IRAPIStreamVtbl * lpVtbl;
-} IRAPIStream;
-
-typedef struct IRAPIStreamVtbl IRAPIStreamVtbl;
-
-typedef enum tagRAPISTREAMFLAG
-{
- STREAM_TIMEOUT_READ
-} RAPISTREAMFLAG;
-
-struct IRAPIStreamVtbl
-{
- HRESULT (__stdcall * SetRapiStat)( IRAPIStream *, RAPISTREAMFLAG, DWORD);
- HRESULT (__stdcall * GetRapiStat)( IRAPIStream *, RAPISTREAMFLAG, DWORD *);
-};
-
-typedef HRESULT (STDAPICALLTYPE RAPIEXT)(DWORD, BYTE, DWORD, BYTE, IRAPIStream *);
-
-typedef struct _RAPIINIT
-{
- DWORD cbSize;
- HANDLE heRapiInit;
- HRESULT hrRapiInit;
-} RAPIINIT;
-
-STDAPI CeRapiInit (void);
-STDAPI CeRapiInitEx (RAPIINIT*);
-STDAPI_(BOOL) CeCreateProcess (LPCWSTR, LPCWSTR, LPSECURITY_ATTRIBUTES, LPSECURITY_ATTRIBUTES,
- BOOL, DWORD, LPVOID, LPWSTR, LPSTARTUPINFO, LPPROCESS_INFORMATION);
-STDAPI CeRapiUninit (void);
-
-STDAPI_(BOOL) CeWriteFile (HANDLE, LPCVOID, DWORD, LPDWORD, LPOVERLAPPED);
-STDAPI_(HANDLE) CeCreateFile (LPCWSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE);
-STDAPI_(BOOL) CeCreateDirectory (LPCWSTR, LPSECURITY_ATTRIBUTES);
-STDAPI_(DWORD) CeGetLastError (void);
-STDAPI_(BOOL) CeGetFileTime (HANDLE, LPFILETIME, LPFILETIME, LPFILETIME);
-STDAPI_(BOOL) CeCloseHandle (HANDLE);
-
-#endif /* _RAPI_H */
diff --git a/winsup/w32api/include/ras.h b/winsup/w32api/include/ras.h
deleted file mode 100644
index 4b427a1..0000000
--- a/winsup/w32api/include/ras.h
+++ /dev/null
@@ -1,997 +0,0 @@
-#ifndef _RAS_H
-#define _RAS_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#ifndef _LMCONS_H
-#include <lmcons.h>
-#endif
-
-/* TODO
-include <basetsd.h> from winnt.h so that this typedef is not necessary
-*/
-#ifndef _BASETSD_H
-typedef unsigned long ULONG_PTR, *PULONG_PTR;
-#endif
-
-#include <pshpack4.h>
-
-#define RAS_MaxDeviceType 16
-#define RAS_MaxPhoneNumber 128
-#define RAS_MaxIpAddress 15
-#define RAS_MaxIpxAddress 21
-#define RAS_MaxEntryName 256
-#define RAS_MaxDeviceName 128
-#define RAS_MaxCallbackNumber RAS_MaxPhoneNumber
-#define RAS_MaxAreaCode 10
-#define RAS_MaxPadType 32
-#define RAS_MaxX25Address 200
-#define RAS_MaxFacilities 200
-#define RAS_MaxUserData 200
-#define RAS_MaxReplyMessage 1024
-#define RAS_MaxDnsSuffix 256
-#define RDEOPT_UsePrefixSuffix 0x00000001
-#define RDEOPT_PausedStates 0x00000002
-#define RDEOPT_IgnoreModemSpeaker 0x00000004
-#define RDEOPT_SetModemSpeaker 0x00000008
-#define RDEOPT_IgnoreSoftwareCompression 0x00000010
-#define RDEOPT_SetSoftwareCompression 0x00000020
-#define RDEOPT_DisableConnectedUI 0x00000040
-#define RDEOPT_DisableReconnectUI 0x00000080
-#define RDEOPT_DisableReconnect 0x00000100
-#define RDEOPT_NoUser 0x00000200
-#define RDEOPT_PauseOnScript 0x00000400
-#define RDEOPT_Router 0x00000800
-#define REN_User 0x00000000
-#define REN_AllUsers 0x00000001
-#define VS_Default 0
-#define VS_PptpOnly 1
-#define VS_PptpFirst 2
-#define VS_L2tpOnly 3
-#define VS_L2tpFirst 4
-#define RASDIALEVENT "RasDialEvent"
-#define WM_RASDIALEVENT 0xCCCD
-#define RASEO_UseCountryAndAreaCodes 0x00000001
-#define RASEO_SpecificIpAddr 0x00000002
-#define RASEO_SpecificNameServers 0x00000004
-#define RASEO_IpHeaderCompression 0x00000008
-#define RASEO_RemoteDefaultGateway 0x00000010
-#define RASEO_DisableLcpExtensions 0x00000020
-#define RASEO_TerminalBeforeDial 0x00000040
-#define RASEO_TerminalAfterDial 0x00000080
-#define RASEO_ModemLights 0x00000100
-#define RASEO_SwCompression 0x00000200
-#define RASEO_RequireEncryptedPw 0x00000400
-#define RASEO_RequireMsEncryptedPw 0x00000800
-#define RASEO_RequireDataEncryption 0x00001000
-#define RASEO_NetworkLogon 0x00002000
-#define RASEO_UseLogonCredentials 0x00004000
-#define RASEO_PromoteAlternates 0x00008000
-#if (WINVER >= 0x501)
-#define RASEO2_SecureFileAndPrint 0x00000001
-#define RASEO2_SecureClientForMSNet 0x00000002
-#define RASEO2_DontNegotiateMultilink 0x00000004
-#define RASEO2_DontUseRasCredentials 0x00000008
-#define RASEO2_UsePreSharedKey 0x00000010
-#define RASEO2_Internet 0x00000020
-#define RASEO2_DisableNbtOverIP 0x00000040
-#define RASEO2_UseGlobalDeviceSettings 0x00000080
-#define RASEO2_ReconnectIfDropped 0x00000100
-#define RASEO2_SharePhoneNumbers 0x00000200
-#endif
-#define RASNP_NetBEUI 0x00000001
-#define RASNP_Ipx 0x00000002
-#define RASNP_Ip 0x00000004
-#define RASFP_Ppp 0x00000001
-#define RASFP_Slip 0x00000002
-#define RASFP_Ras 0x00000004
-#define RASDT_Modem TEXT("modem")
-#define RASDT_Isdn TEXT("isdn")
-#define RASDT_X25 TEXT("x25")
-#define RASDT_Vpn TEXT("vpn")
-#define RASDT_Pad TEXT("pad")
-#define RASDT_Generic TEXT("GENERIC")
-#define RASDT_Serial TEXT("SERIAL")
-#define RASDT_FrameRelay TEXT("FRAMERELAY")
-#define RASDT_Atm TEXT("ATM")
-#define RASDT_Sonet TEXT("SONET")
-#define RASDT_SW56 TEXT("SW56")
-#define RASDT_Irda TEXT("IRDA")
-#define RASDT_Parallel TEXT("PARALLEL")
-#define RASET_Phone 1
-#define RASET_Vpn 2
-#define RASET_Direct 3
-#define RASET_Internet 4
-#if (WINVER >= 0x401)
-#define RASEO_SecureLocalFiles 0x00010000
-#define RASCN_Connection 0x00000001
-#define RASCN_Disconnection 0x00000002
-#define RASCN_BandwidthAdded 0x00000004
-#define RASCN_BandwidthRemoved 0x00000008
-#define RASEDM_DialAll 1
-#define RASEDM_DialAsNeeded 2
-#define RASIDS_Disabled 0xffffffff
-#define RASIDS_UseGlobalValue 0
-#define RASADFLG_PositionDlg 0x00000001
-#define RASCM_UserName 0x00000001
-#define RASCM_Password 0x00000002
-#define RASCM_Domain 0x00000004
-#define RASADP_DisableConnectionQuery 0
-#define RASADP_LoginSessionDisable 1
-#define RASADP_SavedAddressesLimit 2
-#define RASADP_FailedConnectionTimeout 3
-#define RASADP_ConnectionQueryTimeout 4
-#endif /* (WINVER >= 0x401) */
-#if (WINVER >= 0x500)
-#define RDEOPT_CustomDial 0x00001000
-#define RASLCPAP_PAP 0xC023
-#define RASLCPAP_SPAP 0xC027
-#define RASLCPAP_CHAP 0xC223
-#define RASLCPAP_EAP 0xC227
-#define RASLCPAD_CHAP_MD5 0x05
-#define RASLCPAD_CHAP_MS 0x80
-#define RASLCPAD_CHAP_MSV2 0x81
-#define RASLCPO_PFC 0x00000001
-#define RASLCPO_ACFC 0x00000002
-#define RASLCPO_SSHF 0x00000004
-#define RASLCPO_DES_56 0x00000008
-#define RASLCPO_3_DES 0x00000010
-#define RASCCPCA_MPPC 0x00000006
-#define RASCCPCA_STAC 0x00000005
-#define RASCCPO_Compression 0x00000001
-#define RASCCPO_HistoryLess 0x00000002
-#define RASCCPO_Encryption56bit 0x00000010
-#define RASCCPO_Encryption40bit 0x00000020
-#define RASCCPO_Encryption128bit 0x00000040
-#define RASEO_RequireEAP 0x00020000
-#define RASEO_RequirePAP 0x00040000
-#define RASEO_RequireSPAP 0x00080000
-#define RASEO_Custom 0x00100000
-#define RASEO_PreviewPhoneNumber 0x00200000
-#define RASEO_SharedPhoneNumbers 0x00800000
-#define RASEO_PreviewUserPw 0x01000000
-#define RASEO_PreviewDomain 0x02000000
-#define RASEO_ShowDialingProgress 0x04000000
-#define RASEO_RequireCHAP 0x08000000
-#define RASEO_RequireMsCHAP 0x10000000
-#define RASEO_RequireMsCHAP2 0x20000000
-#define RASEO_RequireW95MSCHAP 0x40000000
-#define RASEO_CustomScript 0x80000000
-#define RASIPO_VJ 0x00000001
-#define RCD_SingleUser 0
-#define RCD_AllUsers 0x00000001
-#define RCD_Eap 0x00000002
-#define RASEAPF_NonInteractive 0x00000002
-#define RASEAPF_Logon 0x00000004
-#define RASEAPF_Preview 0x00000008
-#define ET_40Bit 1
-#define ET_128Bit 2
-#define ET_None 0
-#define ET_Require 1
-#define ET_RequireMax 2
-#define ET_Optional 3
-#endif /* (WINVER >= 0x500) */
-
-#define RASCS_PAUSED 0x1000
-#define RASCS_DONE 0x2000
-typedef enum tagRASCONNSTATE {
- RASCS_OpenPort = 0,
- RASCS_PortOpened,
- RASCS_ConnectDevice,
- RASCS_DeviceConnected,
- RASCS_AllDevicesConnected,
- RASCS_Authenticate,
- RASCS_AuthNotify,
- RASCS_AuthRetry,
- RASCS_AuthCallback,
- RASCS_AuthChangePassword,
- RASCS_AuthProject,
- RASCS_AuthLinkSpeed,
- RASCS_AuthAck,
- RASCS_ReAuthenticate,
- RASCS_Authenticated,
- RASCS_PrepareForCallback,
- RASCS_WaitForModemReset,
- RASCS_WaitForCallback,
- RASCS_Projected,
- RASCS_StartAuthentication,
- RASCS_CallbackComplete,
- RASCS_LogonNetwork,
- RASCS_SubEntryConnected,
- RASCS_SubEntryDisconnected,
- RASCS_Interactive = RASCS_PAUSED,
- RASCS_RetryAuthentication,
- RASCS_CallbackSetByCaller,
- RASCS_PasswordExpired,
-#if (WINVER >= 0x500)
- RASCS_InvokeEapUI,
-#endif
- RASCS_Connected = RASCS_DONE,
- RASCS_Disconnected
-} RASCONNSTATE, *LPRASCONNSTATE;
-
-typedef enum tagRASPROJECTION {
- RASP_Amb = 0x10000,
- RASP_PppNbf = 0x803F,
- RASP_PppIpx = 0x802B,
- RASP_PppIp = 0x8021,
-#if (WINVER >= 0x500)
- RASP_PppCcp = 0x80FD,
-#endif
- RASP_PppLcp = 0xC021,
- RASP_Slip = 0x20000
-} RASPROJECTION, *LPRASPROJECTION;
-
-DECLARE_HANDLE (HRASCONN);
-typedef HRASCONN* LPHRASCONN;
-
-typedef struct tagRASCONNW {
- DWORD dwSize;
- HRASCONN hrasconn;
- WCHAR szEntryName[RAS_MaxEntryName + 1];
-#if (WINVER >= 0x400)
- WCHAR szDeviceType[RAS_MaxDeviceType + 1];
- WCHAR szDeviceName[RAS_MaxDeviceName + 1];
-#endif
-#if (WINVER >= 0x401)
- WCHAR szPhonebook[MAX_PATH];
- DWORD dwSubEntry;
-#endif
-#if (WINVER >= 0x500)
- GUID guidEntry;
-#endif
-#if (WINVER >= 0x501)
- DWORD dwFlags;
- LUID luid;
-#endif
-} RASCONNW, *LPRASCONNW;
-
-typedef struct tagRASCONNA {
- DWORD dwSize;
- HRASCONN hrasconn;
- CHAR szEntryName[RAS_MaxEntryName + 1];
-#if (WINVER >= 0x400)
- CHAR szDeviceType[RAS_MaxDeviceType + 1];
- CHAR szDeviceName[RAS_MaxDeviceName + 1];
-#endif
-#if (WINVER >= 0x401)
- CHAR szPhonebook[MAX_PATH];
- DWORD dwSubEntry;
-#endif
-#if (WINVER >= 0x500)
- GUID guidEntry;
-#endif
-#if (WINVER >= 0x501)
- DWORD dwFlags;
- LUID luid;
-#endif
-} RASCONNA, *LPRASCONNA;
-
-typedef struct tagRASCONNSTATUSW {
- DWORD dwSize;
- RASCONNSTATE rasconnstate;
- DWORD dwError;
- WCHAR szDeviceType[RAS_MaxDeviceType + 1];
- WCHAR szDeviceName[RAS_MaxDeviceName + 1];
-#if (WINVER >= 0x401)
- WCHAR szPhoneNumber[RAS_MaxPhoneNumber + 1];
-#endif
-} RASCONNSTATUSW, *LPRASCONNSTATUSW;
-
-typedef struct tagRASCONNSTATUSA {
- DWORD dwSize;
- RASCONNSTATE rasconnstate;
- DWORD dwError;
- CHAR szDeviceType[RAS_MaxDeviceType + 1];
- CHAR szDeviceName[RAS_MaxDeviceName + 1];
-#if (WINVER >= 0x401)
- CHAR szPhoneNumber[RAS_MaxPhoneNumber + 1];
-#endif
-} RASCONNSTATUSA, *LPRASCONNSTATUSA;
-
-typedef struct tagRASDIALPARAMSW {
- DWORD dwSize;
- WCHAR szEntryName[RAS_MaxEntryName + 1];
- WCHAR szPhoneNumber[RAS_MaxPhoneNumber + 1];
- WCHAR szCallbackNumber[RAS_MaxCallbackNumber + 1];
- WCHAR szUserName[UNLEN + 1];
- WCHAR szPassword[PWLEN + 1];
- WCHAR szDomain[DNLEN + 1];
-#if (WINVER >= 0x401)
- DWORD dwSubEntry;
- ULONG_PTR dwCallbackId;
-#endif
-} RASDIALPARAMSW, *LPRASDIALPARAMSW;
-
-typedef struct tagRASDIALPARAMSA {
- DWORD dwSize;
- CHAR szEntryName[RAS_MaxEntryName + 1];
- CHAR szPhoneNumber[RAS_MaxPhoneNumber + 1];
- CHAR szCallbackNumber[RAS_MaxCallbackNumber + 1];
- CHAR szUserName[UNLEN + 1];
- CHAR szPassword[PWLEN + 1];
- CHAR szDomain[DNLEN + 1];
-#if (WINVER >= 0x401)
- DWORD dwSubEntry;
- ULONG_PTR dwCallbackId;
-#endif
-} RASDIALPARAMSA, *LPRASDIALPARAMSA;
-
-#if (WINVER >= 0x500)
-typedef struct tagRASEAPINFO {
- DWORD dwSizeofEapInfo;
- BYTE *pbEapInfo;
-} RASEAPINFO;
-#endif
-
-typedef struct tagRASDIALEXTENSIONS {
- DWORD dwSize;
- DWORD dwfOptions;
- HWND hwndParent;
- ULONG_PTR reserved;
-#if (WINVER >= 0x500)
- ULONG_PTR reserved1;
- RASEAPINFO RasEapInfo;
-#endif
-} RASDIALEXTENSIONS, *LPRASDIALEXTENSIONS;
-
-typedef struct tagRASENTRYNAMEW {
- DWORD dwSize;
- WCHAR szEntryName[RAS_MaxEntryName + 1];
-#if (WINVER >= 0x500)
- DWORD dwFlags;
- WCHAR szPhonebookPath[MAX_PATH + 1];
-#endif
-} RASENTRYNAMEW, *LPRASENTRYNAMEW;
-
-typedef struct tagRASENTRYNAMEA {
- DWORD dwSize;
- CHAR szEntryName[RAS_MaxEntryName + 1];
-#if (WINVER >= 0x500)
- DWORD dwFlags;
- CHAR szPhonebookPath[MAX_PATH + 1];
-#endif
-} RASENTRYNAMEA, *LPRASENTRYNAMEA;
-
-typedef struct tagRASAMBW {
- DWORD dwSize;
- DWORD dwError;
- WCHAR szNetBiosError[NETBIOS_NAME_LEN + 1];
- BYTE bLana;
-} RASAMBW, *LPRASAMBW;
-
-typedef struct tagRASAMBA {
- DWORD dwSize;
- DWORD dwError;
- CHAR szNetBiosError[NETBIOS_NAME_LEN + 1];
- BYTE bLana;
-} RASAMBA, *LPRASAMBA;
-
-typedef struct tagRASPPPNBFW {
- DWORD dwSize;
- DWORD dwError;
- DWORD dwNetBiosError;
- WCHAR szNetBiosError[NETBIOS_NAME_LEN + 1];
- WCHAR szWorkstationName[NETBIOS_NAME_LEN + 1];
- BYTE bLana;
-} RASPPPNBFW, *LPRASPPPNBFW;
-
-typedef struct tagRASPPPNBFA {
- DWORD dwSize;
- DWORD dwError;
- DWORD dwNetBiosError;
- CHAR szNetBiosError[NETBIOS_NAME_LEN + 1];
- CHAR szWorkstationName[NETBIOS_NAME_LEN + 1];
- BYTE bLana;
-} RASPPPNBFA, *LPRASPPPNBFA;
-
-typedef struct tagRASIPXW {
- DWORD dwSize;
- DWORD dwError;
- WCHAR szIpxAddress[RAS_MaxIpxAddress + 1];
-} RASPPPIPXW, *LPRASPPPIPXW;
-
-typedef struct tagRASIPXA {
- DWORD dwSize;
- DWORD dwError;
- CHAR szIpxAddress[RAS_MaxIpxAddress + 1];
-} RASPPPIPXA, *LPRASPPPIPXA;
-
-typedef struct tagRASPPPIPW {
- DWORD dwSize;
- DWORD dwError;
- WCHAR szIpAddress[RAS_MaxIpAddress + 1];
-#ifndef WINNT35COMPATIBLE
- WCHAR szServerIpAddress[RAS_MaxIpAddress + 1];
-#endif
-#if (WINVER >= 0x500)
- DWORD dwOptions;
- DWORD dwServerOptions;
-#endif
-} RASPPPIPW, *LPRASPPPIPW;
-
-typedef struct tagRASPPPIPA {
- DWORD dwSize;
- DWORD dwError;
- CHAR szIpAddress[RAS_MaxIpAddress + 1];
-#ifndef WINNT35COMPATIBLE
- CHAR szServerIpAddress[RAS_MaxIpAddress + 1];
-#endif
-#if (WINVER >= 0x500)
- DWORD dwOptions;
- DWORD dwServerOptions;
-#endif
-} RASPPPIPA, *LPRASPPPIPA;
-
-typedef struct tagRASPPPLCPW {
- DWORD dwSize;
- BOOL fBundled;
-#if (WINVER >= 0x500)
- DWORD dwError;
- DWORD dwAuthenticationProtocol;
- DWORD dwAuthenticationData;
- DWORD dwEapTypeId;
- DWORD dwServerAuthenticationProtocol;
- DWORD dwServerAuthenticationData;
- DWORD dwServerEapTypeId;
- BOOL fMultilink;
- DWORD dwTerminateReason;
- DWORD dwServerTerminateReason;
- WCHAR szReplyMessage[RAS_MaxReplyMessage];
- DWORD dwOptions;
- DWORD dwServerOptions;
-#endif
-} RASPPPLCPW, *LPRASPPPLCPW;
-
-typedef struct tagRASPPPLCPA {
- DWORD dwSize;
- BOOL fBundled;
-#if (WINVER >= 0x500)
- DWORD dwError;
- DWORD dwAuthenticationProtocol;
- DWORD dwAuthenticationData;
- DWORD dwEapTypeId;
- DWORD dwServerAuthenticationProtocol;
- DWORD dwServerAuthenticationData;
- DWORD dwServerEapTypeId;
- BOOL fMultilink;
- DWORD dwTerminateReason;
- DWORD dwServerTerminateReason;
- CHAR szReplyMessage[RAS_MaxReplyMessage];
- DWORD dwOptions;
- DWORD dwServerOptions;
-#endif
-} RASPPPLCPA, *LPRASPPPLCPA;
-
-typedef struct tagRASSLIPW {
- DWORD dwSize;
- DWORD dwError;
- WCHAR szIpAddress[RAS_MaxIpAddress + 1];
-} RASSLIPW, *LPRASSLIPW;
-
-
-typedef struct tagRASSLIPA {
- DWORD dwSize;
- DWORD dwError;
- CHAR szIpAddress[RAS_MaxIpAddress + 1];
-} RASSLIPA, *LPRASSLIPA;
-
-typedef struct tagRASDEVINFOW {
- DWORD dwSize;
- WCHAR szDeviceType[RAS_MaxDeviceType + 1];
- WCHAR szDeviceName[RAS_MaxDeviceName + 1];
-} RASDEVINFOW, *LPRASDEVINFOW;
-
-typedef struct tagRASDEVINFOA {
- DWORD dwSize;
- CHAR szDeviceType[RAS_MaxDeviceType + 1];
- CHAR szDeviceName[RAS_MaxDeviceName + 1];
-} RASDEVINFOA, *LPRASDEVINFOA;
-
-typedef struct tagRASCTRYINFO {
- DWORD dwSize;
- DWORD dwCountryID;
- DWORD dwNextCountryID;
- DWORD dwCountryCode;
- DWORD dwCountryNameOffset;
-} RASCTRYINFO, *LPRASCTRYINFO;
-
-typedef RASCTRYINFO RASCTRYINFOW, *LPRASCTRYINFOW;
-typedef RASCTRYINFO RASCTRYINFOA, *LPRASCTRYINFOA;
-
-typedef struct tagRASIPADDR {
- BYTE a;
- BYTE b;
- BYTE c;
- BYTE d;
-} RASIPADDR;
-
-typedef struct tagRASENTRYW {
- DWORD dwSize;
- DWORD dwfOptions;
- DWORD dwCountryID;
- DWORD dwCountryCode;
- WCHAR szAreaCode[RAS_MaxAreaCode + 1];
- WCHAR szLocalPhoneNumber[RAS_MaxPhoneNumber + 1];
- DWORD dwAlternateOffset;
- RASIPADDR ipaddr;
- RASIPADDR ipaddrDns;
- RASIPADDR ipaddrDnsAlt;
- RASIPADDR ipaddrWins;
- RASIPADDR ipaddrWinsAlt;
- DWORD dwFrameSize;
- DWORD dwfNetProtocols;
- DWORD dwFramingProtocol;
- WCHAR szScript[MAX_PATH];
- WCHAR szAutodialDll[MAX_PATH];
- WCHAR szAutodialFunc[MAX_PATH];
- WCHAR szDeviceType[RAS_MaxDeviceType + 1];
- WCHAR szDeviceName[RAS_MaxDeviceName + 1];
- WCHAR szX25PadType[RAS_MaxPadType + 1];
- WCHAR szX25Address[RAS_MaxX25Address + 1];
- WCHAR szX25Facilities[RAS_MaxFacilities + 1];
- WCHAR szX25UserData[RAS_MaxUserData + 1];
- DWORD dwChannels;
- DWORD dwReserved1;
- DWORD dwReserved2;
-#if (WINVER >= 0x401)
- DWORD dwSubEntries;
- DWORD dwDialMode;
- DWORD dwDialExtraPercent;
- DWORD dwDialExtraSampleSeconds;
- DWORD dwHangUpExtraPercent;
- DWORD dwHangUpExtraSampleSeconds;
- DWORD dwIdleDisconnectSeconds;
-#endif
-#if (WINVER >= 0x500)
- DWORD dwType;
- DWORD dwEncryptionType;
- DWORD dwCustomAuthKey;
- GUID guidId;
- WCHAR szCustomDialDll[MAX_PATH];
- DWORD dwVpnStrategy;
-#endif
-#if (WINVER >= 0x501)
- DWORD dwfOptions2;
- DWORD dwfOptions3;
- WCHAR szDnsSuffix[RAS_MaxDnsSuffix];
- DWORD dwTcpWindowSize;
- WCHAR szPrerequisitePbk[MAX_PATH];
- WCHAR szPrerequisiteEntry[RAS_MaxEntryName + 1];
- DWORD dwRedialCount;
- DWORD dwRedialPause;
-#endif
-} RASENTRYW, *LPRASENTRYW;
-
-typedef struct tagRASENTRYA {
- DWORD dwSize;
- DWORD dwfOptions;
- DWORD dwCountryID;
- DWORD dwCountryCode;
- CHAR szAreaCode[RAS_MaxAreaCode + 1];
- CHAR szLocalPhoneNumber[RAS_MaxPhoneNumber + 1];
- DWORD dwAlternateOffset;
- RASIPADDR ipaddr;
- RASIPADDR ipaddrDns;
- RASIPADDR ipaddrDnsAlt;
- RASIPADDR ipaddrWins;
- RASIPADDR ipaddrWinsAlt;
- DWORD dwFrameSize;
- DWORD dwfNetProtocols;
- DWORD dwFramingProtocol;
- CHAR szScript[MAX_PATH];
- CHAR szAutodialDll[MAX_PATH];
- CHAR szAutodialFunc[MAX_PATH];
- CHAR szDeviceType[RAS_MaxDeviceType + 1];
- CHAR szDeviceName[RAS_MaxDeviceName + 1];
- CHAR szX25PadType[RAS_MaxPadType + 1];
- CHAR szX25Address[RAS_MaxX25Address + 1];
- CHAR szX25Facilities[RAS_MaxFacilities + 1];
- CHAR szX25UserData[RAS_MaxUserData + 1];
- DWORD dwChannels;
- DWORD dwReserved1;
- DWORD dwReserved2;
-#if (WINVER >= 0x401)
- DWORD dwSubEntries;
- DWORD dwDialMode;
- DWORD dwDialExtraPercent;
- DWORD dwDialExtraSampleSeconds;
- DWORD dwHangUpExtraPercent;
- DWORD dwHangUpExtraSampleSeconds;
- DWORD dwIdleDisconnectSeconds;
-#endif
-#if (WINVER >= 0x500)
- DWORD dwType;
- DWORD dwEncryptionType;
- DWORD dwCustomAuthKey;
- GUID guidId;
- CHAR szCustomDialDll[MAX_PATH];
- DWORD dwVpnStrategy;
-#endif
-#if (WINVER >= 0x501)
- DWORD dwfOptions2;
- DWORD dwfOptions3;
- CHAR szDnsSuffix[RAS_MaxDnsSuffix];
- DWORD dwTcpWindowSize;
- CHAR szPrerequisitePbk[MAX_PATH];
- CHAR szPrerequisiteEntry[RAS_MaxEntryName + 1];
- DWORD dwRedialCount;
- DWORD dwRedialPause;
-#endif
-} RASENTRYA, *LPRASENTRYA;
-
-
-#if (WINVER >= 0x401)
-typedef struct tagRASADPARAMS {
- DWORD dwSize;
- HWND hwndOwner;
- DWORD dwFlags;
- LONG xDlg;
- LONG yDlg;
-} RASADPARAMS, *LPRASADPARAMS;
-
-typedef struct tagRASSUBENTRYW {
- DWORD dwSize;
- DWORD dwfFlags;
- WCHAR szDeviceType[RAS_MaxDeviceType + 1];
- WCHAR szDeviceName[RAS_MaxDeviceName + 1];
- WCHAR szLocalPhoneNumber[RAS_MaxPhoneNumber + 1];
- DWORD dwAlternateOffset;
-} RASSUBENTRYW, *LPRASSUBENTRYW;
-
-typedef struct tagRASSUBENTRYA {
- DWORD dwSize;
- DWORD dwfFlags;
- CHAR szDeviceType[RAS_MaxDeviceType + 1];
- CHAR szDeviceName[RAS_MaxDeviceName + 1];
- CHAR szLocalPhoneNumber[RAS_MaxPhoneNumber + 1];
- DWORD dwAlternateOffset;
-} RASSUBENTRYA, *LPRASSUBENTRYA;
-
-typedef struct tagRASCREDENTIALSW {
- DWORD dwSize;
- DWORD dwMask;
- WCHAR szUserName[UNLEN + 1];
- WCHAR szPassword[PWLEN + 1];
- WCHAR szDomain[DNLEN + 1];
-} RASCREDENTIALSW, *LPRASCREDENTIALSW;
-
-typedef struct tagRASCREDENTIALSA {
- DWORD dwSize;
- DWORD dwMask;
- CHAR szUserName[UNLEN + 1];
- CHAR szPassword[PWLEN + 1];
- CHAR szDomain[DNLEN + 1];
-} RASCREDENTIALSA, *LPRASCREDENTIALSA;
-
-typedef struct tagRASAUTODIALENTRYW {
- DWORD dwSize;
- DWORD dwFlags;
- DWORD dwDialingLocation;
- WCHAR szEntry[RAS_MaxEntryName + 1];
-} RASAUTODIALENTRYW, *LPRASAUTODIALENTRYW;
-
-typedef struct tagRASAUTODIALENTRYA {
- DWORD dwSize;
- DWORD dwFlags;
- DWORD dwDialingLocation;
- CHAR szEntry[RAS_MaxEntryName + 1];
-} RASAUTODIALENTRYA, *LPRASAUTODIALENTRYA;
-#endif /* (WINVER >= 0x401) */
-
-#if (WINVER >= 0x500)
-typedef struct tagRASPPPCCP {
- DWORD dwSize;
- DWORD dwError;
- DWORD dwCompressionAlgorithm;
- DWORD dwOptions;
- DWORD dwServerCompressionAlgorithm;
- DWORD dwServerOptions;
-} RASPPPCCP, *LPRASPPPCCP;
-
-typedef struct tagRASEAPUSERIDENTITYW {
- WCHAR szUserName[UNLEN + 1];
- DWORD dwSizeofEapInfo;
- BYTE pbEapInfo[1];
-} RASEAPUSERIDENTITYW, *LPRASEAPUSERIDENTITYW;
-
-typedef struct tagRASEAPUSERIDENTITYA {
- CHAR szUserName[UNLEN + 1];
- DWORD dwSizeofEapInfo;
- BYTE pbEapInfo[1];
-} RASEAPUSERIDENTITYA, *LPRASEAPUSERIDENTITYA;
-
-typedef struct tagRAS_STATS {
- DWORD dwSize;
- DWORD dwBytesXmited;
- DWORD dwBytesRcved;
- DWORD dwFramesXmited;
- DWORD dwFramesRcved;
- DWORD dwCrcErr;
- DWORD dwTimeoutErr;
- DWORD dwAlignmentErr;
- DWORD dwHardwareOverrunErr;
- DWORD dwFramingErr;
- DWORD dwBufferOverrunErr;
- DWORD dwCompressionRatioIn;
- DWORD dwCompressionRatioOut;
- DWORD dwBps;
- DWORD dwConnectDuration;
-} RAS_STATS, *PRAS_STATS;
-#endif /* (WINVER >= 0x500) */
-
-
-/* UNICODE typedefs for structures*/
-#ifdef UNICODE
-typedef RASCONNW RASCONN, *LPRASCONN;
-typedef RASENTRYW RASENTRY, *LPRASENTRY;
-typedef RASCONNSTATUSW RASCONNSTATUS, *LPRASCONNSTATUS;
-typedef RASDIALPARAMSW RASDIALPARAMS, *LPRASDIALPARAMS;
-typedef RASAMBW RASAMB, *LPRASAM;
-typedef RASPPPNBFW RASPPPNBF, *LPRASPPPNBF;
-typedef RASPPPIPXW RASPPPIPX, *LPRASPPPIPX;
-typedef RASPPPIPW RASPPPIP, *LPRASPPPIP;
-typedef RASPPPLCPW RASPPPLCP, *LPRASPPPLCP;
-typedef RASSLIPW RASSLIP, *LPRASSLIP;
-typedef RASDEVINFOW RASDEVINFO, *LPRASDEVINFO;
-typedef RASENTRYNAMEW RASENTRYNAME, *LPRASENTRYNAME;
-
-#if (WINVER >= 0x401)
-typedef RASSUBENTRYW RASSUBENTRY, *LPRASSUBENTRY;
-typedef RASCREDENTIALSW RASCREDENTIALS, *LPRASCREDENTIALS;
-typedef RASAUTODIALENTRYW RASAUTODIALENTRY, *LPRASAUTODIALENTRY;
-#endif /* (WINVER >= 0x401) */
-
-#if (WINVER >= 0x500)
-typedef RASEAPUSERIDENTITYW RASEAPUSERIDENTITY, *LPRASEAPUSERIDENTITY;
-#endif /* (WINVER >= 0x500) */
-
-#else /* ! defined UNICODE */
-typedef RASCONNA RASCONN, *LPRASCONN;
-typedef RASENTRYA RASENTRY, *LPRASENTRY;
-typedef RASCONNSTATUSA RASCONNSTATUS, *LPRASCONNSTATUS;
-typedef RASDIALPARAMSA RASDIALPARAMS, *LPRASDIALPARAMS;
-typedef RASAMBA RASAMB, *LPRASAM;
-typedef RASPPPNBFA RASPPPNBF, *LPRASPPPNBF;
-typedef RASPPPIPXA RASPPPIPX, *LPRASPPPIPX;
-typedef RASPPPIPA RASPPPIP, *LPRASPPPIP;
-typedef RASPPPLCPA RASPPPLCP, *LPRASPPPLCP;
-typedef RASSLIPA RASSLIP, *LPRASSLIP;
-typedef RASDEVINFOA RASDEVINFO, *LPRASDEVINFO;
-typedef RASENTRYNAMEA RASENTRYNAME, *LPRASENTRYNAME;
-
-#if (WINVER >= 0x401)
-typedef RASSUBENTRYA RASSUBENTRY, *LPRASSUBENTRY;
-typedef RASCREDENTIALSA RASCREDENTIALS, *LPRASCREDENTIALS;
-typedef RASAUTODIALENTRYA RASAUTODIALENTRY, *LPRASAUTODIALENTRY;
-#endif /*(WINVER >= 0x401)*/
-#if (WINVER >= 0x500)
-typedef RASEAPUSERIDENTITYA RASEAPUSERIDENTITY, *LPRASEAPUSERIDENTITY;
-#endif /* (WINVER >= 0x500) */
-#endif /* ! UNICODE */
-
-/* Callback prototypes */
-typedef BOOL (WINAPI * ORASADFUNC) (HWND, LPSTR, DWORD, LPDWORD); /* deprecated */
-typedef VOID (WINAPI * RASDIALFUNC) (UINT, RASCONNSTATE, DWORD);
-typedef VOID (WINAPI * RASDIALFUNC1) (HRASCONN, UINT, RASCONNSTATE, DWORD,
- DWORD);
-typedef DWORD (WINAPI * RASDIALFUNC2) (ULONG_PTR, DWORD, HRASCONN, UINT,
- RASCONNSTATE, DWORD, DWORD);
-
-/* External functions */
-DWORD APIENTRY RasDialA (LPRASDIALEXTENSIONS, LPCSTR, LPRASDIALPARAMSA,
- DWORD, LPVOID, LPHRASCONN);
-DWORD APIENTRY RasDialW (LPRASDIALEXTENSIONS, LPCWSTR, LPRASDIALPARAMSW,
- DWORD, LPVOID, LPHRASCONN);
-DWORD APIENTRY RasEnumConnectionsA (LPRASCONNA, LPDWORD, LPDWORD);
-DWORD APIENTRY RasEnumConnectionsW (LPRASCONNW, LPDWORD, LPDWORD);
-DWORD APIENTRY RasEnumEntriesA (LPCSTR, LPCSTR, LPRASENTRYNAMEA, LPDWORD,
- LPDWORD);
-DWORD APIENTRY RasEnumEntriesW (LPCWSTR, LPCWSTR, LPRASENTRYNAMEW, LPDWORD,
- LPDWORD);
-DWORD APIENTRY RasGetConnectStatusA (HRASCONN, LPRASCONNSTATUSA);
-DWORD APIENTRY RasGetConnectStatusW (HRASCONN, LPRASCONNSTATUSW);
-DWORD APIENTRY RasGetErrorStringA (UINT, LPSTR, DWORD);
-DWORD APIENTRY RasGetErrorStringW (UINT, LPWSTR, DWORD);
-DWORD APIENTRY RasHangUpA (HRASCONN);
-DWORD APIENTRY RasHangUpW (HRASCONN);
-DWORD APIENTRY RasGetProjectionInfoA (HRASCONN, RASPROJECTION, LPVOID,
- LPDWORD);
-DWORD APIENTRY RasGetProjectionInfoW (HRASCONN, RASPROJECTION, LPVOID,
- LPDWORD);
-DWORD APIENTRY RasCreatePhonebookEntryA (HWND, LPCSTR);
-DWORD APIENTRY RasCreatePhonebookEntryW (HWND, LPCWSTR);
-DWORD APIENTRY RasEditPhonebookEntryA (HWND, LPCSTR, LPCSTR);
-DWORD APIENTRY RasEditPhonebookEntryW (HWND, LPCWSTR, LPCWSTR);
-DWORD APIENTRY RasSetEntryDialParamsA (LPCSTR, LPRASDIALPARAMSA, BOOL);
-DWORD APIENTRY RasSetEntryDialParamsW (LPCWSTR, LPRASDIALPARAMSW, BOOL);
-DWORD APIENTRY RasGetEntryDialParamsA (LPCSTR, LPRASDIALPARAMSA, LPBOOL);
-DWORD APIENTRY RasGetEntryDialParamsW (LPCWSTR, LPRASDIALPARAMSW, LPBOOL);
-DWORD APIENTRY RasEnumDevicesA (LPRASDEVINFOA, LPDWORD, LPDWORD);
-DWORD APIENTRY RasEnumDevicesW (LPRASDEVINFOW, LPDWORD, LPDWORD);
-DWORD APIENTRY RasGetCountryInfoA (LPRASCTRYINFOA, LPDWORD);
-DWORD APIENTRY RasGetCountryInfoW (LPRASCTRYINFOW, LPDWORD);
-DWORD APIENTRY RasGetEntryPropertiesA (LPCSTR, LPCSTR, LPRASENTRYA, LPDWORD,
- LPBYTE, LPDWORD);
-DWORD APIENTRY RasGetEntryPropertiesW (LPCWSTR, LPCWSTR, LPRASENTRYW,
- LPDWORD, LPBYTE, LPDWORD);
-DWORD APIENTRY RasSetEntryPropertiesA (LPCSTR, LPCSTR, LPRASENTRYA, DWORD,
- LPBYTE, DWORD);
-DWORD APIENTRY RasSetEntryPropertiesW (LPCWSTR, LPCWSTR, LPRASENTRYW, DWORD,
- LPBYTE, DWORD);
-DWORD APIENTRY RasRenameEntryA (LPCSTR, LPCSTR, LPCSTR);
-DWORD APIENTRY RasRenameEntryW (LPCWSTR, LPCWSTR, LPCWSTR);
-DWORD APIENTRY RasDeleteEntryA (LPCSTR, LPCSTR);
-DWORD APIENTRY RasDeleteEntryW (LPCWSTR, LPCWSTR);
-DWORD APIENTRY RasValidateEntryNameA (LPCSTR, LPCSTR);
-DWORD APIENTRY RasValidateEntryNameW (LPCWSTR, LPCWSTR);
-
-#if (WINVER >= 0x401)
-typedef BOOL (WINAPI * RASADFUNCA) (LPSTR, LPSTR, LPRASADPARAMS, LPDWORD);
-typedef BOOL (WINAPI * RASADFUNCW) (LPWSTR, LPWSTR, LPRASADPARAMS, LPDWORD);
-
-DWORD APIENTRY RasGetSubEntryHandleA (HRASCONN, DWORD, LPHRASCONN);
-DWORD APIENTRY RasGetSubEntryHandleW (HRASCONN, DWORD, LPHRASCONN);
-DWORD APIENTRY RasGetCredentialsA (LPCSTR, LPCSTR, LPRASCREDENTIALSA);
-DWORD APIENTRY RasGetCredentialsW (LPCWSTR, LPCWSTR, LPRASCREDENTIALSW);
-DWORD APIENTRY RasSetCredentialsA (LPCSTR, LPCSTR, LPRASCREDENTIALSA, BOOL);
-DWORD APIENTRY RasSetCredentialsW (LPCWSTR, LPCWSTR, LPRASCREDENTIALSW, BOOL);
-DWORD APIENTRY RasConnectionNotificationA (HRASCONN, HANDLE, DWORD);
-DWORD APIENTRY RasConnectionNotificationW (HRASCONN, HANDLE, DWORD);
-DWORD APIENTRY RasGetSubEntryPropertiesA (LPCSTR, LPCSTR, DWORD,
- LPRASSUBENTRYA, LPDWORD, LPBYTE, LPDWORD);
-DWORD APIENTRY RasGetSubEntryPropertiesW (LPCWSTR, LPCWSTR, DWORD,
- LPRASSUBENTRYW, LPDWORD, LPBYTE, LPDWORD);
-DWORD APIENTRY RasSetSubEntryPropertiesA (LPCSTR, LPCSTR, DWORD,
- LPRASSUBENTRYA, DWORD, LPBYTE, DWORD);
-DWORD APIENTRY RasSetSubEntryPropertiesW (LPCWSTR, LPCWSTR, DWORD,
- LPRASSUBENTRYW, DWORD, LPBYTE, DWORD);
-DWORD APIENTRY RasGetAutodialAddressA (LPCSTR, LPDWORD, LPRASAUTODIALENTRYA,
- LPDWORD, LPDWORD);
-DWORD APIENTRY RasGetAutodialAddressW (LPCWSTR, LPDWORD,
- LPRASAUTODIALENTRYW, LPDWORD, LPDWORD);
-DWORD APIENTRY RasSetAutodialAddressA (LPCSTR, DWORD, LPRASAUTODIALENTRYA,
- DWORD, DWORD);
-DWORD APIENTRY RasSetAutodialAddressW (LPCWSTR, DWORD, LPRASAUTODIALENTRYW,
- DWORD, DWORD);
-DWORD APIENTRY RasEnumAutodialAddressesA (LPSTR *, LPDWORD, LPDWORD);
-DWORD APIENTRY RasEnumAutodialAddressesW (LPWSTR *, LPDWORD, LPDWORD);
-DWORD APIENTRY RasGetAutodialEnableA (DWORD, LPBOOL);
-DWORD APIENTRY RasGetAutodialEnableW (DWORD, LPBOOL);
-DWORD APIENTRY RasSetAutodialEnableA (DWORD, BOOL);
-DWORD APIENTRY RasSetAutodialEnableW (DWORD, BOOL);
-DWORD APIENTRY RasGetAutodialParamA (DWORD, LPVOID, LPDWORD);
-DWORD APIENTRY RasGetAutodialParamW (DWORD, LPVOID, LPDWORD);
-DWORD APIENTRY RasSetAutodialParamA (DWORD, LPVOID, DWORD);
-DWORD APIENTRY RasSetAutodialParamW (DWORD, LPVOID, DWORD);
-#endif
-
-#if (WINVER >= 0x500)
-typedef DWORD (WINAPI * RasCustomHangUpFn) (HRASCONN);
-typedef DWORD (WINAPI * RasCustomDeleteEntryNotifyFn) (LPCTSTR, LPCTSTR, DWORD);
-typedef DWORD (WINAPI * RasCustomDialFn) (HINSTANCE, LPRASDIALEXTENSIONS,
- LPCTSTR, LPRASDIALPARAMS, DWORD, LPVOID, LPHRASCONN, DWORD);
-
-DWORD APIENTRY RasInvokeEapUI (HRASCONN, DWORD, LPRASDIALEXTENSIONS, HWND);
-DWORD APIENTRY RasGetLinkStatistics (HRASCONN, DWORD, RAS_STATS*);
-DWORD APIENTRY RasGetConnectionStatistics (HRASCONN, RAS_STATS*);
-DWORD APIENTRY RasClearLinkStatistics (HRASCONN, DWORD);
-DWORD APIENTRY RasClearConnectionStatistics (HRASCONN);
-DWORD APIENTRY RasGetEapUserDataA (HANDLE, LPCSTR, LPCSTR, BYTE*, DWORD*);
-DWORD APIENTRY RasGetEapUserDataW (HANDLE, LPCWSTR, LPCWSTR, BYTE*, DWORD*);
-DWORD APIENTRY RasSetEapUserDataA (HANDLE, LPCSTR, LPCSTR, BYTE*, DWORD);
-DWORD APIENTRY RasSetEapUserDataW (HANDLE, LPCWSTR, LPCWSTR, BYTE*, DWORD);
-DWORD APIENTRY RasGetCustomAuthDataA (LPCSTR, LPCSTR, BYTE*, DWORD*);
-DWORD APIENTRY RasGetCustomAuthDataW (LPCWSTR, LPCWSTR, BYTE*, DWORD*);
-DWORD APIENTRY RasSetCustomAuthDataA (LPCSTR, LPCSTR, BYTE*, DWORD);
-DWORD APIENTRY RasSetCustomAuthDataW (LPCWSTR, LPCWSTR, BYTE*, DWORD);
-DWORD APIENTRY RasGetEapUserIdentityW (LPCWSTR, LPCWSTR, DWORD, HWND, LPRASEAPUSERIDENTITYW*);
-DWORD APIENTRY RasGetEapUserIdentityA (LPCSTR, LPCSTR, DWORD, HWND, LPRASEAPUSERIDENTITYA*);
-VOID APIENTRY RasFreeEapUserIdentityW (LPRASEAPUSERIDENTITYW);
-VOID APIENTRY RasFreeEapUserIdentityA (LPRASEAPUSERIDENTITYA);
-#endif /* (WINVER >= 0x500) */
-
-
-/* UNICODE defines for functions */
-#ifdef UNICODE
-#define RasDial RasDialW
-#define RasEnumConnections RasEnumConnectionsW
-#define RasEnumEntries RasEnumEntriesW
-#define RasGetConnectStatus RasGetConnectStatusW
-#define RasGetErrorString RasGetErrorStringW
-#define RasHangUp RasHangUpW
-#define RasGetProjectionInfo RasGetProjectionInfoW
-#define RasCreatePhonebookEntry RasCreatePhonebookEntryW
-#define RasEditPhonebookEntry RasEditPhonebookEntryW
-#define RasSetEntryDialParams RasSetEntryDialParamsW
-#define RasGetEntryDialParams RasGetEntryDialParamsW
-#define RasEnumDevices RasEnumDevicesW
-#define RasGetCountryInfo RasGetCountryInfoW
-#define RasGetEntryProperties RasGetEntryPropertiesW
-#define RasSetEntryProperties RasSetEntryPropertiesW
-#define RasRenameEntry RasRenameEntryW
-#define RasDeleteEntry RasDeleteEntryW
-#define RasValidateEntryName RasValidateEntryNameW
-#if (WINVER >= 0x401)
-#define RASADFUNC RASADFUNCW
-#define RasGetSubEntryHandle RasGetSubEntryHandleW
-#define RasConnectionNotification RasConnectionNotificationW
-#define RasGetSubEntryProperties RasGetSubEntryPropertiesW
-#define RasSetSubEntryProperties RasSetSubEntryPropertiesW
-#define RasGetCredentials RasGetCredentialsW
-#define RasSetCredentials RasSetCredentialsW
-#define RasGetAutodialAddress RasGetAutodialAddressW
-#define RasSetAutodialAddress RasSetAutodialAddressW
-#define RasEnumAutodialAddresses RasEnumAutodialAddressesW
-#define RasGetAutodialEnable RasGetAutodialEnableW
-#define RasSetAutodialEnable RasSetAutodialEnableW
-#define RasGetAutodialParam RasGetAutodialParamW
-#define RasSetAutodialParam RasSetAutodialParamW
-#endif /* (WINVER >= 0x401) */
-#if (WINVER >= 0x500)
-#define RasGetEapUserData RasGetEapUserDataW
-#define RasSetEapUserData RasSetEapUserDataW
-#define RasGetCustomAuthData RasGetCustomAuthDataW
-#define RasSetCustomAuthData RasSetCustomAuthDataW
-#define RasGetEapUserIdentity RasGetEapUserIdentityW
-#define RasFreeEapUserIdentity RasFreeEapUserIdentityW
-#endif /* (WINVER >= 0x500) */
-
-#else /* ! defined UNICODE */
-#define RasDial RasDialA
-#define RasEnumConnections RasEnumConnectionsA
-#define RasEnumEntries RasEnumEntriesA
-#define RasGetConnectStatus RasGetConnectStatusA
-#define RasGetErrorString RasGetErrorStringA
-#define RasHangUp RasHangUpA
-#define RasGetProjectionInfo RasGetProjectionInfoA
-#define RasCreatePhonebookEntry RasCreatePhonebookEntryA
-#define RasEditPhonebookEntry RasEditPhonebookEntryA
-#define RasSetEntryDialParams RasSetEntryDialParamsA
-#define RasGetEntryDialParams RasGetEntryDialParamsA
-#define RasEnumDevices RasEnumDevicesA
-#define RasGetCountryInfo RasGetCountryInfoA
-#define RasGetEntryProperties RasGetEntryPropertiesA
-#define RasSetEntryProperties RasSetEntryPropertiesA
-#define RasRenameEntry RasRenameEntryA
-#define RasDeleteEntry RasDeleteEntryA
-#define RasValidateEntryName RasValidateEntryNameA
-
-#if (WINVER >= 0x401)
-#define RASADFUNC RASADFUNCA
-#define RasGetSubEntryHandle RasGetSubEntryHandleA
-#define RasConnectionNotification RasConnectionNotificationA
-#define RasGetSubEntryProperties RasGetSubEntryPropertiesA
-#define RasSetSubEntryProperties RasSetSubEntryPropertiesA
-#define RasGetCredentials RasGetCredentialsA
-#define RasSetCredentials RasSetCredentialsA
-#define RasGetAutodialAddress RasGetAutodialAddressA
-#define RasSetAutodialAddress RasSetAutodialAddressA
-#define RasEnumAutodialAddressesRasEnumAutodialAddressesA
-#define RasGetAutodialEnable RasGetAutodialEnableA
-#define RasSetAutodialEnable RasSetAutodialEnableA
-#define RasGetAutodialParam RasGetAutodialParamA
-#define RasSetAutodialParam RasSetAutodialParamA
-#endif /*(WINVER >= 0x401)*/
-
-#if (WINVER >= 0x500)
-#define RasGetEapUserData RasGetEapUserDataA
-#define RasSetEapUserData RasSetEapUserDataA
-#define RasGetCustomAuthData RasGetCustomAuthDataA
-#define RasSetCustomAuthData RasSetCustomAuthDataA
-#define RasGetEapUserIdentity RasGetEapUserIdentityA
-#define RasFreeEapUserIdentity RasFreeEapUserIdentityA
-#endif /* (WINVER >= 0x500) */
-#endif /* ! UNICODE */
-
-#ifdef __cplusplus
-}
-#endif
-#include <poppack.h>
-#endif /* _RAS_H */
diff --git a/winsup/w32api/include/rasdlg.h b/winsup/w32api/include/rasdlg.h
deleted file mode 100644
index 6ba20da..0000000
--- a/winsup/w32api/include/rasdlg.h
+++ /dev/null
@@ -1,152 +0,0 @@
-#ifndef _RASDLG_H
-#define _RASDLG_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <ras.h>
-
-#define RASPBDEVENT_AddEntry 1
-#define RASPBDEVENT_EditEntry 2
-#define RASPBDEVENT_RemoveEntry 3
-#define RASPBDEVENT_DialEntry 4
-#define RASPBDEVENT_EditGlobals 5
-#define RASPBDEVENT_NoUser 6
-#define RASPBDEVENT_NoUserEdit 7
-
-#define RASPBDFLAG_PositionDlg 1
-#define RASPBDFLAG_ForceCloseOnDial 2
-#define RASPBDFLAG_NoUser 16
-
-#define RASEDFLAG_PositionDlg 1
-#define RASEDFLAG_NewEntry 2
-#define RASEDFLAG_CloneEntry 4
-
-#define RASDDFLAG_PositionDlg 1
-
-#ifndef RC_INVOKED
-#include <pshpack4.h>
-
-typedef struct tagRASENTRYDLGA
-{
- DWORD dwSize;
- HWND hwndOwner;
- DWORD dwFlags;
- LONG xDlg;
- LONG yDlg;
- CHAR szEntry[RAS_MaxEntryName + 1];
- DWORD dwError;
- ULONG_PTR reserved;
- ULONG_PTR reserved2;
-} RASENTRYDLGA, *LPRASENTRYDLGA;
-typedef struct tagRASENTRYDLGW
-{
- DWORD dwSize;
- HWND hwndOwner;
- DWORD dwFlags;
- LONG xDlg;
- LONG yDlg;
- WCHAR szEntry[RAS_MaxEntryName + 1];
- DWORD dwError;
- ULONG_PTR reserved;
- ULONG_PTR reserved2;
-} RASENTRYDLGW, *LPRASENTRYDLGW;
-
-typedef struct tagRASDIALDLG
-{
- DWORD dwSize;
- HWND hwndOwner;
- DWORD dwFlags;
- LONG xDlg;
- LONG yDlg;
- DWORD dwSubEntry;
- DWORD dwError;
- ULONG_PTR reserved;
- ULONG_PTR reserved2;
-} RASDIALDLG, *LPRASDIALDLG;
-
-/* Application-defined callback functions */
-typedef VOID (WINAPI* RASPBDLGFUNCW)(DWORD, DWORD, LPWSTR, LPVOID);
-typedef VOID (WINAPI* RASPBDLGFUNCA)(DWORD, DWORD, LPSTR, LPVOID);
-
-typedef struct tagRASPBDLGA
-{
- DWORD dwSize;
- HWND hwndOwner;
- DWORD dwFlags;
- LONG xDlg;
- LONG yDlg;
- ULONG_PTR dwCallbackId;
- RASPBDLGFUNCA pCallback;
- DWORD dwError;
- ULONG_PTR reserved;
- ULONG_PTR reserved2;
-} RASPBDLGA, *LPRASPBDLGA;
-typedef struct tagRASPBDLGW
-{
- DWORD dwSize;
- HWND hwndOwner;
- DWORD dwFlags;
- LONG xDlg;
- LONG yDlg;
- ULONG_PTR dwCallbackId;
- RASPBDLGFUNCW pCallback;
- DWORD dwError;
- ULONG_PTR reserved;
- ULONG_PTR reserved2;
-} RASPBDLGW, *LPRASPBDLGW;
-
-typedef struct tagRASNOUSERA
-{
- DWORD dwSize;
- DWORD dwFlags;
- DWORD dwTimeoutMs;
- CHAR szUserName[UNLEN + 1];
- CHAR szPassword[PWLEN + 1];
- CHAR szDomain[DNLEN + 1];
-} RASNOUSERA, *LPRASNOUSERA;
-typedef struct tagRASNOUSERW
-{
- DWORD dwSize;
- DWORD dwFlags;
- DWORD dwTimeoutMs;
- WCHAR szUserName[UNLEN + 1];
- WCHAR szPassword[PWLEN + 1];
- WCHAR szDomain[DNLEN + 1];
-} RASNOUSERW, *LPRASNOUSERW ;
-
-#include <poppack.h>
-
-BOOL APIENTRY RasDialDlgA(LPSTR,LPSTR,LPSTR,LPRASDIALDLG);
-BOOL APIENTRY RasDialDlgW(LPWSTR,LPWSTR,LPWSTR,LPRASDIALDLG);
-BOOL APIENTRY RasEntryDlgA(LPSTR,LPSTR,LPRASENTRYDLGA);
-BOOL APIENTRY RasEntryDlgW(LPWSTR,LPWSTR,LPRASENTRYDLGW);
-BOOL APIENTRY RasPhonebookDlgA(LPSTR,LPSTR,LPRASPBDLGA);
-BOOL APIENTRY RasPhonebookDlgW(LPWSTR,LPWSTR,LPRASPBDLGW);
-
-#ifdef UNICODE
-typedef RASENTRYDLGW RASENTRYDLG, *LPRASENTRYDLG;
-typedef RASPBDLGW RASPBDLG, *LPRASPBDLG;
-typedef RASNOUSERW RASNOUSER, *LPRASNOUSER;
-#define RasDialDlg RasDialDlgW
-#define RasEntryDlg RasEntryDlgW
-#define RasPhonebookDlg RasPhonebookDlgW
-#else
-typedef RASENTRYDLGA RASENTRYDLG, *LPRASENTRYDLG;
-typedef RASPBDLGA RASPBDLG, *LPRASPBDLG;
-typedef RASNOUSERA RASNOUSER, *LPRASNOUSER;
-#define RasDialDlg RasDialDlgA
-#define RasEntryDlg RasEntryDlgA
-#define RasPhonebookDlg RasPhonebookDlgA
-#endif /* UNICODE */
-
-#endif /* RC_INVOKED */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/raserror.h b/winsup/w32api/include/raserror.h
deleted file mode 100644
index 97498b0..0000000
--- a/winsup/w32api/include/raserror.h
+++ /dev/null
@@ -1,210 +0,0 @@
-#ifndef _RASERROR_H
-#define _RASERROR_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#define RASBASE 600
-#define SUCCESS 0
-#define PENDING (RASBASE+0)
-#define ERROR_INVALID_PORT_HANDLE (RASBASE+1)
-#define ERROR_PORT_ALREADY_OPEN (RASBASE+2)
-#define ERROR_BUFFER_TOO_SMALL (RASBASE+3)
-#define ERROR_WRONG_INFO_SPECIFIED (RASBASE+4)
-#define ERROR_CANNOT_SET_PORT_INFO (RASBASE+5)
-#define ERROR_PORT_NOT_CONNECTED (RASBASE+6)
-#define ERROR_EVENT_INVALID (RASBASE+7)
-#define ERROR_DEVICE_DOES_NOT_EXIST (RASBASE+8)
-#define ERROR_DEVICETYPE_DOES_NOT_EXIST (RASBASE+9)
-#define ERROR_BUFFER_INVALID (RASBASE+10)
-#define ERROR_ROUTE_NOT_AVAILABLE (RASBASE+11)
-#define ERROR_ROUTE_NOT_ALLOCATED (RASBASE+12)
-#define ERROR_INVALID_COMPRESSION_SPECIFIED (RASBASE+13)
-#define ERROR_OUT_OF_BUFFERS (RASBASE+14)
-#define ERROR_PORT_NOT_FOUND (RASBASE+15)
-#define ERROR_ASYNC_REQUEST_PENDING (RASBASE+16)
-#define ERROR_ALREADY_DISCONNECTING (RASBASE+17)
-#define ERROR_PORT_NOT_OPEN (RASBASE+18)
-#define ERROR_PORT_DISCONNECTED (RASBASE+19)
-#define ERROR_NO_ENDPOINTS (RASBASE+20)
-#define ERROR_CANNOT_OPEN_PHONEBOOK (RASBASE+21)
-#define ERROR_CANNOT_LOAD_PHONEBOOK (RASBASE+22)
-#define ERROR_CANNOT_FIND_PHONEBOOK_ENTRY (RASBASE+23)
-#define ERROR_CANNOT_WRITE_PHONEBOOK (RASBASE+24)
-#define ERROR_CORRUPT_PHONEBOOK (RASBASE+25)
-#define ERROR_CANNOT_LOAD_STRING (RASBASE+26)
-#define ERROR_KEY_NOT_FOUND (RASBASE+27)
-#define ERROR_DISCONNECTION (RASBASE+28)
-#define ERROR_REMOTE_DISCONNECTION (RASBASE+29)
-#define ERROR_HARDWARE_FAILURE (RASBASE+30)
-#define ERROR_USER_DISCONNECTION (RASBASE+31)
-#define ERROR_INVALID_SIZE (RASBASE+32)
-#define ERROR_PORT_NOT_AVAILABLE (RASBASE+33)
-#define ERROR_CANNOT_PROJECT_CLIENT (RASBASE+34)
-#define ERROR_UNKNOWN (RASBASE+35)
-#define ERROR_WRONG_DEVICE_ATTACHED (RASBASE+36)
-#define ERROR_BAD_STRING (RASBASE+37)
-#define ERROR_REQUEST_TIMEOUT (RASBASE+38)
-#define ERROR_CANNOT_GET_LANA (RASBASE+39)
-#define ERROR_NETBIOS_ERROR (RASBASE+40)
-#define ERROR_SERVER_OUT_OF_RESOURCES (RASBASE+41)
-#define ERROR_NAME_EXISTS_ON_NET (RASBASE+42)
-#define ERROR_SERVER_GENERAL_NET_FAILURE (RASBASE+43)
-#define WARNING_MSG_ALIAS_NOT_ADDED (RASBASE+44)
-#define ERROR_AUTH_INTERNAL (RASBASE+45)
-#define ERROR_RESTRICTED_LOGON_HOURS (RASBASE+46)
-#define ERROR_ACCT_DISABLED (RASBASE+47)
-#define ERROR_PASSWD_EXPIRED (RASBASE+48)
-#define ERROR_NO_DIALIN_PERMISSION (RASBASE+49)
-#define ERROR_SERVER_NOT_RESPONDING (RASBASE+50)
-#define ERROR_FROM_DEVICE (RASBASE+51)
-#define ERROR_UNRECOGNIZED_RESPONSE (RASBASE+52)
-#define ERROR_MACRO_NOT_FOUND (RASBASE+53)
-#define ERROR_MACRO_NOT_DEFINED (RASBASE+54)
-#define ERROR_MESSAGE_MACRO_NOT_FOUND (RASBASE+55)
-#define ERROR_DEFAULTOFF_MACRO_NOT_FOUND (RASBASE+56)
-#define ERROR_FILE_COULD_NOT_BE_OPENED (RASBASE+57)
-#define ERROR_DEVICENAME_TOO_LONG (RASBASE+58)
-#define ERROR_DEVICENAME_NOT_FOUND (RASBASE+59)
-#define ERROR_NO_RESPONSES (RASBASE+60)
-#define ERROR_NO_COMMAND_FOUND (RASBASE+61)
-#define ERROR_WRONG_KEY_SPECIFIED (RASBASE+62)
-#define ERROR_UNKNOWN_DEVICE_TYPE (RASBASE+63)
-#define ERROR_ALLOCATING_MEMORY (RASBASE+64)
-#define ERROR_PORT_NOT_CONFIGURED (RASBASE+65)
-#define ERROR_DEVICE_NOT_READY (RASBASE+66)
-#define ERROR_READING_INI_FILE (RASBASE+67)
-#define ERROR_NO_CONNECTION (RASBASE+68)
-#define ERROR_BAD_USAGE_IN_INI_FILE (RASBASE+69)
-#define ERROR_READING_SECTIONNAME (RASBASE+70)
-#define ERROR_READING_DEVICETYPE (RASBASE+71)
-#define ERROR_READING_DEVICENAME (RASBASE+72)
-#define ERROR_READING_USAGE (RASBASE+73)
-#define ERROR_READING_MAXCONNECTBPS (RASBASE+74)
-#define ERROR_READING_MAXCARRIERBPS (RASBASE+75)
-#define ERROR_LINE_BUSY (RASBASE+76)
-#define ERROR_VOICE_ANSWER (RASBASE+77)
-#define ERROR_NO_ANSWER (RASBASE+78)
-#define ERROR_NO_CARRIER (RASBASE+79)
-#define ERROR_NO_DIALTONE (RASBASE+80)
-#define ERROR_IN_COMMAND (RASBASE+81)
-#define ERROR_WRITING_SECTIONNAME (RASBASE+82)
-#define ERROR_WRITING_DEVICETYPE (RASBASE+83)
-#define ERROR_WRITING_DEVICENAME (RASBASE+84)
-#define ERROR_WRITING_MAXCONNECTBPS (RASBASE+85)
-#define ERROR_WRITING_MAXCARRIERBPS (RASBASE+86)
-#define ERROR_WRITING_USAGE (RASBASE+87)
-#define ERROR_WRITING_DEFAULTOFF (RASBASE+88)
-#define ERROR_READING_DEFAULTOFF (RASBASE+89)
-#define ERROR_EMPTY_INI_FILE (RASBASE+90)
-#define ERROR_AUTHENTICATION_FAILURE (RASBASE+91)
-#define ERROR_PORT_OR_DEVICE (RASBASE+92)
-#define ERROR_NOT_BINARY_MACRO (RASBASE+93)
-#define ERROR_DCB_NOT_FOUND (RASBASE+94)
-#define ERROR_STATE_MACHINES_NOT_STARTED (RASBASE+95)
-#define ERROR_STATE_MACHINES_ALREADY_STARTED (RASBASE+96)
-#define ERROR_PARTIAL_RESPONSE_LOOPING (RASBASE+97)
-#define ERROR_UNKNOWN_RESPONSE_KEY (RASBASE+98)
-#define ERROR_RECV_BUF_FULL (RASBASE+99)
-#define ERROR_CMD_TOO_LONG (RASBASE+100)
-#define ERROR_UNSUPPORTED_BPS (RASBASE+101)
-#define ERROR_UNEXPECTED_RESPONSE (RASBASE+102)
-#define ERROR_INTERACTIVE_MODE (RASBASE+103)
-#define ERROR_BAD_CALLBACK_NUMBER (RASBASE+104)
-#define ERROR_INVALID_AUTH_STATE (RASBASE+105)
-#define ERROR_WRITING_INITBPS (RASBASE+106)
-#define ERROR_X25_DIAGNOSTIC (RASBASE+107)
-#define ERROR_ACCT_EXPIRED (RASBASE+108)
-#define ERROR_CHANGING_PASSWORD (RASBASE+109)
-#define ERROR_OVERRUN (RASBASE+110)
-#define ERROR_RASMAN_CANNOT_INITIALIZE (RASBASE+111)
-#define ERROR_BIPLEX_PORT_NOT_AVAILABLE (RASBASE+112)
-#define ERROR_NO_ACTIVE_ISDN_LINES (RASBASE+113)
-#define ERROR_NO_ISDN_CHANNELS_AVAILABLE (RASBASE+114)
-#define ERROR_TOO_MANY_LINE_ERRORS (RASBASE+115)
-#define ERROR_IP_CONFIGURATION (RASBASE+116)
-#define ERROR_NO_IP_ADDRESSES (RASBASE+117)
-#define ERROR_PPP_TIMEOUT (RASBASE+118)
-#define ERROR_PPP_REMOTE_TERMINATED (RASBASE+119)
-#define ERROR_PPP_NO_PROTOCOLS_CONFIGURED (RASBASE+120)
-#define ERROR_PPP_NO_RESPONSE (RASBASE+121)
-#define ERROR_PPP_INVALID_PACKET (RASBASE+122)
-#define ERROR_PHONE_NUMBER_TOO_LONG (RASBASE+123)
-#define ERROR_IPXCP_NO_DIALOUT_CONFIGURED (RASBASE+124)
-#define ERROR_IPXCP_NO_DIALIN_CONFIGURED (RASBASE+125)
-#define ERROR_IPXCP_DIALOUT_ALREADY_ACTIVE (RASBASE+126)
-#define ERROR_ACCESSING_TCPCFGDLL (RASBASE+127)
-#define ERROR_NO_IP_RAS_ADAPTER (RASBASE+128)
-#define ERROR_SLIP_REQUIRES_IP (RASBASE+129)
-#define ERROR_PROJECTION_NOT_COMPLETE (RASBASE+130)
-#define ERROR_PROTOCOL_NOT_CONFIGURED (RASBASE+131)
-#define ERROR_PPP_NOT_CONVERGING (RASBASE+132)
-#define ERROR_PPP_CP_REJECTED (RASBASE+133)
-#define ERROR_PPP_LCP_TERMINATED (RASBASE+134)
-#define ERROR_PPP_REQUIRED_ADDRESS_REJECTED (RASBASE+135)
-#define ERROR_PPP_NCP_TERMINATED (RASBASE+136)
-#define ERROR_PPP_LOOPBACK_DETECTED (RASBASE+137)
-#define ERROR_PPP_NO_ADDRESS_ASSIGNED (RASBASE+138)
-#define ERROR_CANNOT_USE_LOGON_CREDENTIALS (RASBASE+139)
-#define ERROR_TAPI_CONFIGURATION (RASBASE+140)
-#define ERROR_NO_LOCAL_ENCRYPTION (RASBASE+141)
-#define ERROR_NO_REMOTE_ENCRYPTION (RASBASE+142)
-#define ERROR_REMOTE_REQUIRES_ENCRYPTION (RASBASE+143)
-#define ERROR_IPXCP_NET_NUMBER_CONFLICT (RASBASE+144)
-#define ERROR_INVALID_SMM (RASBASE+145)
-#define ERROR_SMM_UNINITIALIZED (RASBASE+146)
-#define ERROR_NO_MAC_FOR_PORT (RASBASE+147)
-#define ERROR_SMM_TIMEOUT (RASBASE+148)
-#define ERROR_BAD_PHONE_NUMBER (RASBASE+149)
-#define ERROR_WRONG_MODULE (RASBASE+150)
-#define ERROR_INVALID_CALLBACK_NUMBER (RASBASE+151)
-
-#define ERROR_SCRIPT_SYNTAX (RASBASE+152)
-#define ERROR_HANGUP_FAILED (RASBASE+153)
-#define ERROR_BUNDLE_NOT_FOUND (RASBASE+154)
-#define ERROR_CANNOT_DO_CUSTOMDIAL (RASBASE+155)
-#define ERROR_DIAL_ALREADY_IN_PROGRESS (RASBASE+156)
-#define ERROR_RASAUTO_CANNOT_INITIALIZE (RASBASE+157)
-#define ERROR_CONNECTION_ALREADY_SHARED (RASBASE+158)
-#define ERROR_SHARING_CHANGE_FAILED (RASBASE+159)
-#define ERROR_SHARING_ROUTER_INSTALL (RASBASE+160)
-#define ERROR_SHARE_CONNECTION_FAILED (RASBASE+161)
-#define ERROR_SHARING_PRIVATE_INSTALL (RASBASE+162)
-#define ERROR_CANNOT_SHARE_CONNECTION (RASBASE+163)
-#define ERROR_NO_SMART_CARD_READER (RASBASE+164)
-#define ERROR_SHARING_ADDRESS_EXISTS (RASBASE+165)
-#define ERROR_NO_CERTIFICATE (RASBASE+166)
-#define ERROR_SHARING_MULTIPLE_ADDRESSES (RASBASE+167)
-#define ERROR_FAILED_TO_ENCRYPT (RASBASE+168)
-#define ERROR_BAD_ADDRESS_SPECIFIED (RASBASE+169)
-#define ERROR_CONNECTION_REJECT (RASBASE+170)
-#define ERROR_CONGESTION (RASBASE+171)
-#define ERROR_INCOMPATIBLE (RASBASE+172)
-#define ERROR_NUMBERCHANGED (RASBASE+173)
-#define ERROR_TEMPFAILURE (RASBASE+174)
-#define ERROR_BLOCKED (RASBASE+175)
-#define ERROR_DONOTDISTURB (RASBASE+176)
-#define ERROR_OUTOFORDER (RASBASE+177)
-#define ERROR_UNABLE_TO_AUTHENTICATE_SERVER (RASBASE+178)
-#define ERROR_SMART_CARD_REQUIRED (RASBASE+179)
-#define ERROR_INVALID_FUNCTION_FOR_ENTRY (RASBASE+180)
-#define ERROR_CERT_FOR_ENCRYPTION_NOT_FOUND (RASBASE+181)
-#define ERROR_SHARING_RRAS_CONFLICT (RASBASE+182)
-#define ERROR_SHARING_NO_PRIVATE_LAN (RASBASE+183)
-#define ERROR_NO_DIFF_USER_AT_LOGON (RASBASE+184)
-#define ERROR_NO_REG_CERT_AT_LOGON (RASBASE+185)
-#define ERROR_OAKLEY_NO_CERT (RASBASE+186)
-#define ERROR_OAKLEY_AUTH_FAIL (RASBASE+187)
-#define ERROR_OAKLEY_ATTRIB_FAIL (RASBASE+188)
-#define ERROR_OAKLEY_GENERAL_PROCESSING (RASBASE+189)
-#define ERROR_OAKLEY_NO_PEER_CERT (RASBASE+190)
-#define ERROR_OAKLEY_NO_POLICY (RASBASE+191)
-#define ERROR_OAKLEY_TIMED_OUT (RASBASE+192)
-#define ERROR_OAKLEY_ERROR (RASBASE+193)
-#define ERROR_UNKNOWN_FRAMED_PROTOCOL (RASBASE+194)
-#define ERROR_WRONG_TUNNEL_TYPE (RASBASE+195)
-#define ERROR_UNKNOWN_SERVICE_TYPE (RASBASE+196)
-#define ERROR_CONNECTING_DEVICE_NOT_FOUND (RASBASE+197)
-#define ERROR_NO_EAPTLS_CERTIFICATE (RASBASE+198)
-#define RASBASEEND (RASBASE+198)
-#endif /* _RASERROR_H */
diff --git a/winsup/w32api/include/rassapi.h b/winsup/w32api/include/rassapi.h
deleted file mode 100644
index 9ba4afb..0000000
--- a/winsup/w32api/include/rassapi.h
+++ /dev/null
@@ -1,182 +0,0 @@
-#ifndef _RASSAPI_H
-#define _RASSAPI_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifndef UNLEN
-#include <lmcons.h>
-#endif
-#define RASSAPI_MAX_PHONENUMBER_SIZE 128
-#define RASSAPI_MAX_MEDIA_NAME 16
-#define RASSAPI_MAX_PORT_NAME 16
-#define RASSAPI_MAX_DEVICE_NAME 128
-#define RASSAPI_MAX_DEVICETYPE_NAME 16
-#define RASSAPI_MAX_PARAM_KEY_SIZE 32
-#define RASPRIV_NoCallback 0x01
-#define RASPRIV_AdminSetCallback 0x02
-#define RASPRIV_CallerSetCallback 0x04
-#define RASPRIV_DialinPrivilege 0x08
-#define RASPRIV_CallbackType (RASPRIV_AdminSetCallback \
- | RASPRIV_CallerSetCallback \
- | RASPRIV_NoCallback)
-#define RAS_MODEM_OPERATIONAL 1
-#define RAS_MODEM_NOT_RESPONDING 2
-#define RAS_MODEM_HARDWARE_FAILURE 3
-#define RAS_MODEM_INCORRECT_RESPONSE 4
-#define RAS_MODEM_UNKNOWN 5
-#define RAS_PORT_NON_OPERATIONAL 1
-#define RAS_PORT_DISCONNECTED 2
-#define RAS_PORT_CALLING_BACK 3
-#define RAS_PORT_LISTENING 4
-#define RAS_PORT_AUTHENTICATING 5
-#define RAS_PORT_AUTHENTICATED 6
-#define RAS_PORT_INITIALIZING 7
-#define MEDIA_UNKNOWN 0
-#define MEDIA_SERIAL 1
-#define MEDIA_RAS10_SERIAL 2
-#define MEDIA_X25 3
-#define MEDIA_ISDN 4
-#define USER_AUTHENTICATED 0x0001
-#define MESSENGER_PRESENT 0x0002
-#define PPP_CLIENT 0x0004
-#define GATEWAY_ACTIVE 0x0008
-#define REMOTE_LISTEN 0x0010
-#define PORT_MULTILINKED 0x0020
-#define RAS_IPADDRESSLEN 15
-#define RAS_IPXADDRESSLEN 22
-#define RAS_ATADDRESSLEN 32
-#define RASDOWNLEVEL 10
-#define RASADMIN_35 35
-#define RASADMIN_CURRENT 40
-
-typedef ULONG IPADDR;
-typedef enum _RAS_PARAMS_FORMAT {
- ParamNumber = 0,
- ParamString = 1
-} RAS_PARAMS_FORMAT;
-typedef union RAS_PARAMS_VALUE {
- DWORD Number;
- struct {
- DWORD Length;
- PCHAR Data;
- } String;
-} RAS_PARAMS_VALUE;
-typedef struct RAS_PARAMETERS {
- CHAR P_Key [RASSAPI_MAX_PARAM_KEY_SIZE];
- RAS_PARAMS_FORMAT P_Type;
- BYTE P_Attributes;
- RAS_PARAMS_VALUE P_Value;
-} RAS_PARAMETERS;
-typedef struct _RAS_USER_0 {
- BYTE bfPrivilege;
- WCHAR szPhoneNumber[RASSAPI_MAX_PHONENUMBER_SIZE + 1];
-} RAS_USER_0, *PRAS_USER_0;
-typedef struct _RAS_PORT_0 {
- WCHAR wszPortName[RASSAPI_MAX_PORT_NAME];
- WCHAR wszDeviceType[RASSAPI_MAX_DEVICETYPE_NAME];
- WCHAR wszDeviceName[RASSAPI_MAX_DEVICE_NAME];
- WCHAR wszMediaName[RASSAPI_MAX_MEDIA_NAME];
- DWORD reserved;
- DWORD Flags;
- WCHAR wszUserName[UNLEN + 1];
- WCHAR wszComputer[NETBIOS_NAME_LEN];
- DWORD dwStartSessionTime; /* seconds from 1/1/1970 */
- WCHAR wszLogonDomain[DNLEN + 1];
- BOOL fAdvancedServer;
-} RAS_PORT_0, *PRAS_PORT_0;
-typedef struct _RAS_PPP_NBFCP_RESULT {
- DWORD dwError;
- DWORD dwNetBiosError;
- CHAR szName[ NETBIOS_NAME_LEN + 1 ];
- WCHAR wszWksta[ NETBIOS_NAME_LEN + 1 ];
-} RAS_PPP_NBFCP_RESULT;
-typedef struct _RAS_PPP_IPCP_RESULT{
- DWORD dwError;
- WCHAR wszAddress[ RAS_IPADDRESSLEN + 1 ];
-} RAS_PPP_IPCP_RESULT;
-typedef struct _RAS_PPP_IPXCP_RESULT {
- DWORD dwError;
- WCHAR wszAddress[ RAS_IPXADDRESSLEN + 1 ];
-} RAS_PPP_IPXCP_RESULT;
-typedef struct _RAS_PPP_ATCP_RESULT {
- DWORD dwError;
- WCHAR wszAddress[ RAS_ATADDRESSLEN + 1 ];
-} RAS_PPP_ATCP_RESULT;
-typedef struct _RAS_PPP_PROJECTION_RESULT {
- RAS_PPP_NBFCP_RESULT nbf;
- RAS_PPP_IPCP_RESULT ip;
- RAS_PPP_IPXCP_RESULT ipx;
- RAS_PPP_ATCP_RESULT at;
-} RAS_PPP_PROJECTION_RESULT;
-typedef struct _RAS_PORT_1{
- RAS_PORT_0 rasport0;
- DWORD LineCondition;
- DWORD HardwareCondition;
- DWORD LineSpeed;
- WORD NumStatistics;
- WORD NumMediaParms;
- DWORD SizeMediaParms;
- RAS_PPP_PROJECTION_RESULT ProjResult;
-} RAS_PORT_1, *PRAS_PORT_1;
-typedef struct _RAS_PORT_STATISTICS {
- DWORD dwBytesXmited;
- DWORD dwBytesRcved;
- DWORD dwFramesXmited;
- DWORD dwFramesRcved;
- DWORD dwCrcErr;
- DWORD dwTimeoutErr;
- DWORD dwAlignmentErr;
- DWORD dwHardwareOverrunErr;
- DWORD dwFramingErr;
- DWORD dwBufferOverrunErr;
- DWORD dwBytesXmitedUncompressed;
- DWORD dwBytesRcvedUncompressed;
- DWORD dwBytesXmitedCompressed;
- DWORD dwBytesRcvedCompressed;
- DWORD dwPortBytesXmited;
- DWORD dwPortBytesRcved;
- DWORD dwPortFramesXmited;
- DWORD dwPortFramesRcved;
- DWORD dwPortCrcErr;
- DWORD dwPortTimeoutErr;
- DWORD dwPortAlignmentErr;
- DWORD dwPortHardwareOverrunErr;
- DWORD dwPortFramingErr;
- DWORD dwPortBufferOverrunErr;
- DWORD dwPortBytesXmitedUncompressed;
- DWORD dwPortBytesRcvedUncompressed;
- DWORD dwPortBytesXmitedCompressed;
- DWORD dwPortBytesRcvedCompressed;
-} RAS_PORT_STATISTICS, *PRAS_PORT_STATISTICS;
-typedef struct _RAS_SERVER_0 {
- WORD TotalPorts;
- WORD PortsInUse;
- DWORD RasVersion;
-} RAS_SERVER_0, *PRAS_SERVER_0;
-
-DWORD APIENTRY RasAdminServerGetInfo( const WCHAR*, PRAS_SERVER_0 );
-DWORD APIENTRY RasAdminGetUserAccountServer( const WCHAR*, const WCHAR*, LPWSTR );
-DWORD APIENTRY RasAdminUserGetInfo( const WCHAR*, const WCHAR*, PRAS_USER_0 );
-DWORD APIENTRY RasAdminUserSetInfo( const WCHAR*, const WCHAR*, const PRAS_USER_0 );
-DWORD APIENTRY RasAdminPortEnum( const WCHAR*, PRAS_PORT_0*, WORD*);
-DWORD APIENTRY RasAdminPortGetInfo( const WCHAR*, const WCHAR*, RAS_PORT_1*, RAS_PORT_STATISTICS*, RAS_PARAMETERS** );
-DWORD APIENTRY RasAdminPortClearStatistics( const WCHAR*, const WCHAR* );
-DWORD APIENTRY RasAdminPortDisconnect( const WCHAR*, const WCHAR* );
-DWORD APIENTRY RasAdminFreeBuffer(PVOID);
-DWORD APIENTRY RasAdminGetErrorString( UINT, WCHAR*, DWORD );
-BOOL APIENTRY RasAdminAcceptNewConnection( RAS_PORT_1*, RAS_PORT_STATISTICS*, RAS_PARAMETERS* );
-VOID APIENTRY RasAdminConnectionHangupNotification ( RAS_PORT_1*, RAS_PORT_STATISTICS*, RAS_PARAMETERS* );
-DWORD APIENTRY RasAdminGetIpAddressForUser ( WCHAR*, WCHAR*, IPADDR*, BOOL*);
-VOID APIENTRY RasAdminReleaseIpAddress ( WCHAR*, WCHAR*,IPADDR* );
-DWORD APIENTRY RasAdminGetUserParms( WCHAR*, PRAS_USER_0 );
-DWORD APIENTRY RasAdminSetUserParms( WCHAR*, DWORD, PRAS_USER_0 );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _RASSAPI_H */
diff --git a/winsup/w32api/include/reason.h b/winsup/w32api/include/reason.h
deleted file mode 100644
index fb73451..0000000
--- a/winsup/w32api/include/reason.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#ifndef _REASON_H
-#define _REASON_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#if (_WIN32_WINNT >= 0x0501)
-#define SHTDN_REASON_MAJOR_APPLICATION 0x00040000
-#define SHTDN_REASON_MAJOR_HARDWARE 0x00010000
-#define SHTDN_REASON_MAJOR_LEGACY_API 0x00070000
-#define SHTDN_REASON_MAJOR_OPERATINGSYSTEM 0x00020000
-#define SHTDN_REASON_MAJOR_OTHER 0x00000000
-#define SHTDN_REASON_MAJOR_POWER 0x00060000
-#define SHTDN_REASON_MAJOR_SOFTWARE 0x00030000
-#define SHTDN_REASON_MAJOR_SYSTEM 0x00050000
-#define SHTDN_REASON_MINOR_BLUESCREEN 0x0000000F
-#define SHTDN_REASON_MINOR_CORDUNPLUGGED 0x0000000b
-#define SHTDN_REASON_MINOR_DISK 0x00000007
-#define SHTDN_REASON_MINOR_ENVIRONMENT 0x0000000c
-#define SHTDN_REASON_MINOR_HARDWARE_DRIVER 0x0000000d
-#define SHTDN_REASON_MINOR_HOTFIX 0x00000011
-#define SHTDN_REASON_MINOR_HOTFIX_UNINSTALL 0x00000017
-#define SHTDN_REASON_MINOR_HUNG 0x00000005
-#define SHTDN_REASON_MINOR_INSTALLATION 0x00000002
-#define SHTDN_REASON_MINOR_MAINTENANCE 0x00000001
-#define SHTDN_REASON_MINOR_MMC 0x00000019
-#define SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY 0x00000014
-#define SHTDN_REASON_MINOR_NETWORKCARD 0x00000009
-#define SHTDN_REASON_MINOR_OTHER 0x00000000
-#define SHTDN_REASON_MINOR_OTHERDRIVER 0x0000000e
-#define SHTDN_REASON_MINOR_POWER_SUPPLY 0x0000000a
-#define SHTDN_REASON_MINOR_PROCESSOR 0x00000008
-#define SHTDN_REASON_MINOR_RECONFIG 0x00000004
-#define SHTDN_REASON_MINOR_SECURITY 0x00000013
-#define SHTDN_REASON_MINOR_SECURITYFIX 0x00000012
-#define SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL 0x00000018
-#define SHTDN_REASON_MINOR_SERVICEPACK 0x00000010
-#define SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL 0x00000016
-#define SHTDN_REASON_MINOR_TERMSRV 0x00000020
-#define SHTDN_REASON_MINOR_UNSTABLE 0x00000006
-#define SHTDN_REASON_MINOR_UPGRADE 0x00000003
-#define SHTDN_REASON_MINOR_WMI 0x00000015
-#define SHTDN_REASON_FLAG_USER_DEFINED 0x40000000
-#define SHTDN_REASON_FLAG_PLANNED 0x80000000
-#endif /* (WIN32_WINNT >= 0x0501) */
-
-#endif
diff --git a/winsup/w32api/include/regstr.h b/winsup/w32api/include/regstr.h
deleted file mode 100644
index ccf80ea..0000000
--- a/winsup/w32api/include/regstr.h
+++ /dev/null
@@ -1,769 +0,0 @@
-#ifndef _REGSTR_H
-#define _REGSTR_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define REGSTR_KEY_CLASS TEXT("Class")
-#define REGSTR_KEY_CONFIG TEXT("Config")
-#define REGSTR_KEY_ENUM TEXT("Enum")
-#define REGSTR_KEY_ROOTENUM TEXT("Root")
-#define REGSTR_KEY_BIOSENUM TEXT("BIOS")
-#define REGSTR_KEY_PCMCIAENUM TEXT("PCMCIA")
-#define REGSTR_KEY_PCIENUM TEXT("PCI")
-#define REGSTR_KEY_LOGCONFIG TEXT("LogConfig")
-#define REGSTR_KEY_SYSTEMBOARD TEXT("*PNP0C01")
-#define REGSTR_KEY_APM TEXT("*PNP0C05")
-#define REGSTR_KEY_INIUPDATE TEXT("IniUpdate")
-#define REG_KEY_INSTDEV TEXT("Installed")
-#define REGSTR_KEY_DOSOPTCDROM TEXT("CD-ROM")
-#define REGSTR_KEY_DOSOPTMOUSE TEXT("MOUSE")
-#define REGSTR_DEFAULT_INSTANCE TEXT("0000")
-#define REGSTR_PATH_MOTHERBOARD REGSTR_KEY_SYSTEMBOARD TEXT("\\" REGSTR_DEFAULT_INSTANCE
-#define REGSTR_PATH_SETUP TEXT("Software\\Microsoft\\Windows\\CurrentVersion")
-#define REGSTR_PATH_PIFCONVERT TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\PIFConvert")
-#define REGSTR_PATH_MSDOSOPTS TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\MS-DOSOptions")
-#define REGSTR_PATH_MSDOSEMU TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\MS-DOS Emulation")
-#define REGSTR_PATH_NEWDOSBOX TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\MS-DOS Emulation\\AppCompat")
-#define REGSTR_PATH_RUNONCE TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce")
-#define REGSTR_PATH_RUN TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Run")
-#define REGSTR_PATH_RUNSERVICESONCE TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\RunServicesOnce")
-#define REGSTR_PATH_RUNSERVICES TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\RunServices")
-#ifndef REGSTR_PATH_EXPLORER /* also in shlobj.h */
-#define REGSTR_PATH_EXPLORER TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer")
-#endif
-#define REGSTR_PATH_DETECT TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Detect")
-#define REGSTR_PATH_APPPATHS TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\App Paths")
-#define REGSTR_PATH_UNINSTALL TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall")
-#define REGSTR_PATH_REALMODENET TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Network\\Real Mode Net")
-#define REGSTR_PATH_NETEQUIV TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Network\\Equivalent")
-#define REGSTR_PATH_CVNETWORK TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Network")
-#define REGSTR_PATH_IDCONFIGDB TEXT("System\\CurrentControlSet\\Control\\IDConfigDB")
-#define REGSTR_PATH_CLASS TEXT("System\\CurrentControlSet\\Services\\Class")
-#define REGSTR_PATH_DISPLAYSETTINGS TEXT("Display\\Settings")
-#define REGSTR_PATH_FONTS TEXT("Display\\Fonts")
-#define REGSTR_PATH_ENUM TEXT("Enum")
-#define REGSTR_PATH_ROOT TEXT("Enum\\Root")
-#define REGSTR_PATH_SERVICES TEXT("System\\CurrentControlSet\\Services")
-#define REGSTR_PATH_VXD TEXT("System\\CurrentControlSet\\Services\\VxD")
-#define REGSTR_PATH_IOS TEXT("System\\CurrentControlSet\\Services\\VxD\\IOS")
-#define REGSTR_PATH_VMM TEXT("System\\CurrentControlSet\\Services\\VxD\\VMM")
-#define REGSTR_PATH_VPOWERD TEXT("System\\CurrentControlSet\\Services\\VxD\\VPOWERD")
-#define REGSTR_PATH_VNETSUP TEXT("System\\CurrentControlSet\\Services\\VxD\\VNETSUP")
-#define REGSTR_PATH_NWREDIR TEXT("System\\CurrentControlSet\\Services\\VxD\\NWREDIR")
-#define REGSTR_PATH_NCPSERVER TEXT("System\\CurrentControlSet\\Services\\NcpServer\\Parameters")
-#define REGSTR_PATH_IOARB TEXT("System\\CurrentControlSet\\Services\\Arbitrators\\IOArb")
-#define REGSTR_PATH_ADDRARB TEXT("System\\CurrentControlSet\\Services\\Arbitrators\\AddrArb")
-#define REGSTR_PATH_DMAARB TEXT("System\\CurrentControlSet\\Services\\Arbitrators\\DMAArb")
-#define REGSTR_PATH_IRQARB TEXT("System\\CurrentControlSet\\Services\\Arbitrators\\IRQArb")
-#define REGSTR_PATH_CODEPAGE TEXT("System\\CurrentControlSet\\Control\\Nls\\Codepage")
-#define REGSTR_PATH_FILESYSTEM TEXT("System\\CurrentControlSet\\Control\\FileSystem")
-#define REGSTR_PATH_FILESYSTEM_NOVOLTRACK TEXT("System\\CurrentControlSet\\Control\\FileSystem\\NoVolTrack")
-#define REGSTR_PATH_CDFS TEXT("System\\CurrentControlSet\\Control\\FileSystem\\CDFS")
-#define REGSTR_PATH_WINBOOT TEXT("System\\CurrentControlSet\\Control\\WinBoot")
-#define REGSTR_PATH_INSTALLEDFILES TEXT("System\\CurrentControlSet\\Control\\InstalledFiles")
-#define REGSTR_PATH_VMM32FILES TEXT("System\\CurrentControlSet\\Control\\VMM32Files")
-#define REGSTR_MAX_VALUE_LENGTH 256
-#define REGSTR_VAL_BITSPERPIXEL TEXT("BitsPerPixel")
-#define REGSTR_VAL_RESOLUTION TEXT("Resolution")
-#define REGSTR_VAL_DPILOGICALX TEXT("DPILogicalX")
-#define REGSTR_VAL_DPILOGICALY TEXT("DPILogicalY")
-#define REGSTR_VAL_DPIPHYSICALX TEXT("DPIPhysicalX")
-#define REGSTR_VAL_DPIPHYSICALY TEXT("DPIPhysicalY")
-#define REGSTR_VAL_REFRESHRATE TEXT("RefreshRate")
-#define REGSTR_VAL_DISPLAYFLAGS TEXT("DisplayFlags")
-#define REGSTR_PATH_CONTROLPANEL TEXT("Control Panel")
-#define REGSTR_PATH_CONTROLSFOLDER TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Controls Folder")
-#define REGSTR_VAL_DOSCP TEXT("OEMCP")
-#define REGSTR_VAL_WINCP TEXT("ACP")
-#define REGSTR_PATH_DYNA_ENUM TEXT("Config Manager\\Enum")
-#define REGSTR_VAL_HARDWARE_KEY TEXT("HardWareKey")
-#define REGSTR_VAL_ALLOCATION TEXT("Allocation")
-#define REGSTR_VAL_PROBLEM TEXT("Problem")
-#define REGSTR_VAL_STATUS TEXT("Status")
-#define REGSTR_VAL_DONTUSEMEM TEXT("DontAllocLastMem")
-#define REGSTR_VAL_SYSTEMROOT TEXT("SystemRoot")
-#define REGSTR_VAL_BOOTCOUNT TEXT("BootCount")
-#define REGSTR_VAL_REALNETSTART TEXT("RealNetStart")
-#define REGSTR_VAL_MEDIA TEXT("MediaPath")
-#define REGSTR_VAL_CONFIG TEXT("ConfigPath")
-#define REGSTR_VAL_DEVICEPATH TEXT("DevicePath")
-#define REGSTR_VAL_SRCPATH TEXT("SourcePath")
-#define REGSTR_VAL_OLDWINDIR TEXT("OldWinDir")
-#define REGSTR_VAL_SETUPFLAGS TEXT("SetupFlags")
-#define REGSTR_VAL_REGOWNER TEXT("RegisteredOwner")
-#define REGSTR_VAL_REGORGANIZATION TEXT("RegisteredOrganization")
-#define REGSTR_VAL_LICENSINGINFO TEXT("LicensingInfo")
-#define REGSTR_VAL_OLDMSDOSVER TEXT("OldMSDOSVer")
-#define REGSTR_VAL_FIRSTINSTALLDATETIME TEXT("FirstInstallDateTime")
-#define REGSTR_VAL_INSTALLTYPE TEXT("InstallType")
-#define REGSTR_VAL_WRAPPER TEXT("Wrapper")
-#define IT_COMPACT 0
-#define IT_TYPICAL 1
-#define IT_PORTABLE 2
-#define IT_CUSTOM 3
-#define REGSTR_KEY_SETUP TEXT("\\Setup")
-#define REGSTR_VAL_BOOTDIR TEXT("BootDir")
-#define REGSTR_VAL_WINBOOTDIR TEXT("WinbootDir")
-#define REGSTR_VAL_WINDIR TEXT("WinDir")
-#define REGSTR_VAL_APPINSTPATH TEXT("AppInstallPath")
-#define REGSTR_PATH_EBD REGSTR_PATH_SETUP REGSTR_KEY_SETUP TEXT("\\EBD")
-#define REGSTR_KEY_EBDFILESLOCAL TEXT("EBDFilesLocale")
-#define REGSTR_KEY_EBDFILESKEYBOARD TEXT("EBDFilesKeyboard")
-#define REGSTR_KEY_EBDAUTOEXECBATLOCAL TEXT("EBDAutoexecBatLocale")
-#define REGSTR_KEY_EBDAUTOEXECBATKEYBOARD TEXT("EBDAutoexecBatKeyboard")
-#define REGSTR_KEY_EBDCONFIGSYSLOCAL TEXT("EBDConfigSysLocale")
-#define REGSTR_KEY_EBDCONFIGSYSKEYBOARD TEXT("EBDConfigSysKeyboard")
-#define REGSTR_VAL_MSDOSMODE TEXT("MSDOSMode")
-#define REGSTR_VAL_MSDOSMODEDISCARD TEXT("Discard")
-#define REGSTR_VAL_DOSOPTGLOBALFLAGS TEXT("GlobalFlags")
-#define DOSOPTGF_DEFCLEAN 1
-#define REGSTR_VAL_DOSOPTFLAGS TEXT("Flags")
-#define REGSTR_VAL_OPTORDER TEXT("Order")
-#define REGSTR_VAL_CONFIGSYS TEXT("Config.Sys")
-#define REGSTR_VAL_AUTOEXEC TEXT("Autoexec.Bat")
-#define REGSTR_VAL_STDDOSOPTION TEXT("StdOption")
-#define REGSTR_VAL_DOSOPTTIP TEXT("TipText")
-#define DOSOPTF_DEFAULT 1
-#define DOSOPTF_SUPPORTED 2
-#define DOSOPTF_ALWAYSUSE 4
-#define DOSOPTF_USESPMODE 8
-#define DOSOPTF_PROVIDESUMB 16
-#define DOSOPTF_NEEDSETUP 32
-#define DOSOPTF_INDOSSTART 64
-#define DOSOPTF_MULTIPLE 128
-#define SUF_FIRSTTIME 1
-#define SUF_EXPRESS 2
-#define SUF_BATCHINF 4
-#define SUF_CLEAN 8
-#define SUF_INSETUP 16
-#define SUF_NETSETUP 32
-#define SUF_NETHDBOOT 64
-#define SUF_NETRPLBOOT 128
-#define SUF_SBSCOPYOK 256
-#define REGSTR_VAL_DOSPAGER TEXT("DOSPager")
-#define REGSTR_VAL_VXDGROUPS TEXT("VXDGroups")
-#define REGSTR_VAL_VPOWERDFLAGS TEXT("Flags")
-#define VPDF_DISABLEPWRMGMT 1
-#define VPDF_FORCEAPM10MODE 2
-#define VPDF_SKIPINTELSLCHECK 4
-#define VPDF_DISABLEPWRSTATUSPOLL 8
-#define REGSTR_VAL_WORKGROUP TEXT("Workgroup")
-#define REGSTR_VAL_DIRECTHOST TEXT("DirectHost")
-#define REGSTR_VAL_FILESHARING TEXT("FileSharing")
-#define REGSTR_VAL_PRINTSHARING TEXT("PrintSharing")
-#define REGSTR_VAL_FIRSTNETDRIVE TEXT("FirstNetworkDrive")
-#define REGSTR_VAL_MAXCONNECTIONS TEXT("MaxConnections")
-#define REGSTR_VAL_APISUPPORT TEXT("APISupport")
-#define REGSTR_VAL_MAXRETRY TEXT("MaxRetry")
-#define REGSTR_VAL_MINRETRY TEXT("MinRetry")
-#define REGSTR_VAL_SUPPORTLFN TEXT("SupportLFN")
-#define REGSTR_VAL_SUPPORTBURST TEXT("SupportBurst")
-#define REGSTR_VAL_SUPPORTTUNNELLING TEXT("SupportTunnelling")
-#define REGSTR_VAL_FULLTRACE TEXT("FullTrace")
-#define REGSTR_VAL_READCACHING TEXT("ReadCaching")
-#define REGSTR_VAL_SHOWDOTS TEXT("ShowDots")
-#define REGSTR_VAL_GAPTIME TEXT("GapTime")
-#define REGSTR_VAL_SEARCHMODE TEXT("SearchMode")
-#define REGSTR_VAL_SHELLVERSION TEXT("ShellVersion")
-#define REGSTR_VAL_MAXLIP TEXT("MaxLIP")
-#define REGSTR_VAL_PRESERVECASE TEXT("PreserveCase")
-#define REGSTR_VAL_OPTIMIZESFN TEXT("OptimizeSFN")
-#define REGSTR_VAL_NCP_BROWSEMASTER TEXT("BrowseMaster")
-#define REGSTR_VAL_NCP_USEPEERBROWSING TEXT("Use_PeerBrowsing")
-#define REGSTR_VAL_NCP_USESAP TEXT("Use_Sap")
-#define REGSTR_VAL_WIN31FILESYSTEM TEXT("Win31FileSystem")
-#define REGSTR_VAL_PRESERVELONGNAMES TEXT("PreserveLongNames")
-#define REGSTR_VAL_DRIVEWRITEBEHIND TEXT("DriveWriteBehind")
-#define REGSTR_VAL_ASYNCFILECOMMIT TEXT("AsyncFileCommit")
-#define REGSTR_VAL_PATHCACHECOUNT TEXT("PathCache")
-#define REGSTR_VAL_NAMECACHECOUNT TEXT("NameCache")
-#define REGSTR_VAL_CONTIGFILEALLOC TEXT("ContigFileAllocSize")
-#define REGSTR_VAL_VOLIDLETIMEOUT TEXT("VolumeIdleTimeout")
-#define REGSTR_VAL_BUFFIDLETIMEOUT TEXT("BufferIdleTimeout")
-#define REGSTR_VAL_BUFFAGETIMEOUT TEXT("BufferAgeTimeout")
-#define REGSTR_VAL_NAMENUMERICTAIL TEXT("NameNumericTail")
-#define REGSTR_VAL_READAHEADTHRESHOLD TEXT("ReadAheadThreshold")
-#define REGSTR_VAL_DOUBLEBUFFER TEXT("DoubleBuffer")
-#define REGSTR_VAL_SOFTCOMPATMODE TEXT("SoftCompatMode")
-#define REGSTR_VAL_DRIVESPINDOWN TEXT("DriveSpinDown")
-#define REGSTR_VAL_FORCEPMIO TEXT("ForcePMIO")
-#define REGSTR_VAL_FORCERMIO TEXT("ForceRMIO")
-#define REGSTR_VAL_LASTBOOTPMDRVS TEXT("LastBootPMDrvs")
-#define REGSTR_VAL_VIRTUALHDIRQ TEXT("VirtualHDIRQ")
-#define REGSTR_VAL_SRVNAMECACHECOUNT TEXT("ServerNameCacheMax")
-#define REGSTR_VAL_SRVNAMECACHE TEXT("ServerNameCache")
-#define REGSTR_VAL_SRVNAMECACHENETPROV TEXT("ServerNameCacheNumNets")
-#define REGSTR_VAL_AUTOMOUNT TEXT("AutoMountDrives")
-#define REGSTR_VAL_COMPRESSIONMETHOD TEXT("CompressionAlgorithm")
-#define REGSTR_VAL_COMPRESSIONTHRESHOLD TEXT("CompressionThreshold")
-#define REGSTR_VAL_CDCACHESIZE TEXT("CacheSize")
-#define REGSTR_VAL_CDPREFETCH TEXT("Prefetch")
-#define REGSTR_VAL_CDPREFETCHTAIL TEXT("PrefetchTail")
-#define REGSTR_VAL_CDRAWCACHE TEXT("RawCache")
-#define REGSTR_VAL_CDEXTERRORS TEXT("ExtendedErrors")
-#define REGSTR_VAL_CDSVDSENSE TEXT("SVDSense")
-#define REGSTR_VAL_CDSHOWVERSIONS TEXT("ShowVersions")
-#define REGSTR_VAL_CDCOMPATNAMES TEXT("MSCDEXCompatNames")
-#define REGSTR_VAL_CDNOREADAHEAD TEXT("NoReadAhead")
-#define REGSTR_VAL_SCSI TEXT("SCSI\\")
-#define REGSTR_VAL_ESDI TEXT("ESDI\\")
-#define REGSTR_VAL_FLOP TEXT("FLOP\\")
-#define REGSTR_VAL_DISK TEXT("GenDisk")
-#define REGSTR_VAL_CDROM TEXT("GenCD")
-#define REGSTR_VAL_TAPE TEXT("TAPE")
-#define REGSTR_VAL_SCANNER TEXT("SCANNER")
-#define REGSTR_VAL_FLOPPY TEXT("FLOPPY")
-#define REGSTR_VAL_SCSITID TEXT("SCSITargetID")
-#define REGSTR_VAL_SCSILUN TEXT("SCSILUN")
-#define REGSTR_VAL_REVLEVEL TEXT("RevisionLevel")
-#define REGSTR_VAL_PRODUCTID TEXT("ProductId")
-#define REGSTR_VAL_PRODUCTTYPE TEXT("ProductType")
-#define REGSTR_VAL_DEVTYPE TEXT("DeviceType")
-#define REGSTR_VAL_REMOVABLE TEXT("Removable")
-#define REGSTR_VAL_CURDRVLET TEXT("CurrentDriveLetterAssignment")
-#define REGSTR_VAL_USRDRVLET TEXT("UserDriveLetterAssignment")
-#define REGSTR_VAL_SYNCDATAXFER TEXT("SyncDataXfer")
-#define REGSTR_VAL_AUTOINSNOTE TEXT("AutoInsertNotification")
-#define REGSTR_VAL_DISCONNECT TEXT("Disconnect")
-#define REGSTR_VAL_INT13 TEXT("Int13")
-#define REGSTR_VAL_PMODE_INT13 TEXT("PModeInt13")
-#define REGSTR_VAL_USERSETTINGS TEXT("AdapterSettings")
-#define REGSTR_VAL_NOIDE TEXT("NoIDE")
-#define REGSTR_VAL_DISKCLASSNAME TEXT("DiskDrive")
-#define REGSTR_VAL_CDROMCLASSNAME TEXT("CDROM")
-#define REGSTR_VAL_FORCELOAD TEXT("ForceLoadPD")
-#define REGSTR_VAL_FORCEFIFO TEXT("ForceFIFO")
-#define REGSTR_VAL_FORCECL TEXT("ForceChangeLine")
-#define REGSTR_VAL_NOUSECLASS TEXT("NoUseClass")
-#define REGSTR_VAL_NOINSTALLCLASS TEXT("NoInstallClass")
-#define REGSTR_VAL_NODISPLAYCLASS TEXT("NoDisplayClass")
-#define REGSTR_VAL_SILENTINSTALL TEXT("SilentInstall")
-#define REGSTR_KEY_PCMCIA_CLASS TEXT("PCMCIA")
-#define REGSTR_KEY_SCSI_CLASS TEXT("SCSIAdapter")
-#define REGSTR_KEY_PORTS_CLASS TEXT("ports")
-#define REGSTR_KEY_MEDIA_CLASS TEXT("MEDIA")
-#define REGSTR_KEY_DISPLAY_CLASS TEXT("Display")
-#define REGSTR_KEY_KEYBOARD_CLASS TEXT("Keyboard")
-#define REGSTR_KEY_MOUSE_CLASS TEXT("Mouse")
-#define REGSTR_KEY_MONITOR_CLASS TEXT("Monitor")
-#define REGSTR_VAL_PCMCIA_OPT TEXT("Options")
-#define PCMCIA_OPT_HAVE_SOCKET 1
-#define PCMCIA_OPT_AUTOMEM 4
-#define PCMCIA_OPT_NO_SOUND 8
-#define PCMCIA_OPT_NO_AUDIO 16
-#define PCMCIA_OPT_NO_APMREMOVE 32
-#define REGSTR_VAL_PCMCIA_MEM TEXT("Memory")
-#define PCMCIA_DEF_MEMBEGIN 0xC0000
-#define PCMCIA_DEF_MEMEND 0xFFFFFF
-#define PCMCIA_DEF_MEMLEN 0x1000
-#define REGSTR_VAL_PCMCIA_ALLOC TEXT("AllocMemWin")
-#define REGSTR_VAL_PCMCIA_ATAD TEXT("ATADelay")
-#define REGSTR_VAL_PCMCIA_SIZ TEXT("MinRegionSize")
-#define PCMCIA_DEF_MIN_REGION 0x10000
-#define REGSTR_VAL_P1284MDL TEXT("Model")
-#define REGSTR_VAL_P1284MFG TEXT("Manufacturer")
-#define REGSTR_VAL_ISAPNP TEXT("ISAPNP")
-#define REGSTR_VAL_ISAPNP_RDP_OVERRIDE TEXT("RDPOverRide")
-#define REGSTR_VAL_PCI TEXT("PCI")
-#define REGSTR_PCI_OPTIONS TEXT("Options")
-#define REGSTR_PCI_DUAL_IDE TEXT("PCIDualIDE")
-#define PCI_OPTIONS_USE_BIOS 1
-#define PCI_OPTIONS_USE_IRQ_STEERING 2
-#define PCI_FLAG_NO_VIDEO_IRQ 1
-#define PCI_FLAG_PCMCIA_WANT_IRQ 2
-#define PCI_FLAG_DUAL_IDE 4
-#define PCI_FLAG_NO_ENUM_AT_ALL 8
-#define PCI_FLAG_ENUM_NO_RESOURCE 16
-#define PCI_FLAG_NEED_DWORD_ACCESS 32
-#define PCI_FLAG_SINGLE_FUNCTION 64
-#define PCI_FLAG_ALWAYS_ENABLED 128
-#define PCI_FLAG_IS_IDE 256
-#define PCI_FLAG_IS_VIDEO 512
-#define PCI_FLAG_FAIL_START 1024
-#define REGSTR_KEY_CRASHES TEXT("Crashes")
-#define REGSTR_KEY_DANGERS TEXT("Dangers")
-#define REGSTR_KEY_DETMODVARS TEXT("DetModVars")
-#define REGSTR_KEY_NDISINFO TEXT("NDISInfo")
-#define REGSTR_VAL_PROTINIPATH TEXT("ProtIniPath")
-#define REGSTR_VAL_RESOURCES TEXT("Resources")
-#define REGSTR_VAL_CRASHFUNCS TEXT("CrashFuncs")
-#define REGSTR_VAL_CLASS TEXT("Class")
-#define REGSTR_VAL_DEVDESC TEXT("DeviceDesc")
-#define REGSTR_VAL_BOOTCONFIG TEXT("BootConfig")
-#define REGSTR_VAL_DETFUNC TEXT("DetFunc")
-#define REGSTR_VAL_DETFLAGS TEXT("DetFlags")
-#define REGSTR_VAL_COMPATIBLEIDS TEXT("CompatibleIDs")
-#define REGSTR_VAL_DETCONFIG TEXT("DetConfig")
-#define REGSTR_VAL_VERIFYKEY TEXT("VerifyKey")
-#define REGSTR_VAL_COMINFO TEXT("ComInfo")
-#define REGSTR_VAL_INFNAME TEXT("InfName")
-#define REGSTR_VAL_CARDSPECIFIC TEXT("CardSpecific")
-#define REGSTR_VAL_NETOSTYPE TEXT("NetOSType")
-#define REGSTR_DATA_NETOS_NDIS TEXT("NDIS")
-#define REGSTR_DATA_NETOS_ODI TEXT("ODI")
-#define REGSTR_DATA_NETOS_IPX TEXT("IPX")
-#define REGSTR_VAL_MFG TEXT("Mfg")
-#define REGSTR_VAL_SCAN_ONLY_FIRST TEXT("ScanOnlyFirstDrive")
-#define REGSTR_VAL_SHARE_IRQ TEXT("ForceIRQSharing")
-#define REGSTR_VAL_NONSTANDARD_ATAPI TEXT("NonStandardATAPI")
-#define REGSTR_VAL_IDE_FORCE_SERIALIZE TEXT("ForceSerialization")
-#define REGSTR_VAL_MAX_HCID_LEN 1024
-#define REGSTR_VAL_HWREV TEXT("HWRevision")
-#define REGSTR_VAL_ENABLEINTS TEXT("EnableInts")
-#define REGDF_NOTDETIO 1
-#define REGDF_NOTDETMEM 2
-#define REGDF_NOTDETIRQ 4
-#define REGDF_NOTDETDMA 8
-#define REGDF_NOTDETALL (REGDF_NOTDETIO | REGDF_NOTDETMEM | REGDF_NOTDETIRQ | REGDF_NOTDETDMA)
-#define REGDF_NEEDFULLCONFIG 16
-#define REGDF_GENFORCEDCONFIG 32
-#define REGDF_NODETCONFIG 0x8000
-#define REGDF_CONFLICTIO 0x10000
-#define REGDF_CONFLICTMEM 0x20000
-#define REGDF_CONFLICTIRQ 0x40000
-#define REGDF_CONFLICTDMA 0x80000
-#define REGDF_CONFLICTALL (REGDF_CONFLICTIO | REGDF_CONFLICTMEM | REGDF_CONFLICTIRQ | REGDF_CONFLICTDMA)
-#define REGDF_MAPIRQ2TO9 0x100000
-#define REGDF_NOTVERIFIED 0x80000000
-#define REGSTR_VAL_APMBIOSVER TEXT("APMBiosVer")
-#define REGSTR_VAL_APMFLAGS TEXT("APMFlags")
-#define REGSTR_VAL_SLSUPPORT TEXT("SLSupport")
-#define REGSTR_VAL_MACHINETYPE TEXT("MachineType")
-#define REGSTR_VAL_SETUPMACHINETYPE TEXT("SetupMachineType")
-#define REGSTR_MACHTYPE_UNKNOWN TEXT("Unknown")
-#define REGSTR_MACHTYPE_IBMPC TEXT("IBM PC")
-#define REGSTR_MACHTYPE_IBMPCJR TEXT("IBM PCjr")
-#define REGSTR_MACHTYPE_IBMPCCONV TEXT("IBM PC Convertible")
-#define REGSTR_MACHTYPE_IBMPCXT TEXT("IBM PC/XT")
-#define REGSTR_MACHTYPE_IBMPCXT_286 TEXT("IBM PC/XT 286")
-#define REGSTR_MACHTYPE_IBMPCAT TEXT("IBM PC/AT")
-#define REGSTR_MACHTYPE_IBMPS2_25 TEXT("IBM PS/2-25")
-#define REGSTR_MACHTYPE_IBMPS2_30_286 TEXT("IBM PS/2-30 286")
-#define REGSTR_MACHTYPE_IBMPS2_30 TEXT("IBM PS/2-30")
-#define REGSTR_MACHTYPE_IBMPS2_50 TEXT("IBM PS/2-50")
-#define REGSTR_MACHTYPE_IBMPS2_50Z TEXT("IBM PS/2-50Z")
-#define REGSTR_MACHTYPE_IBMPS2_55SX TEXT("IBM PS/2-55SX")
-#define REGSTR_MACHTYPE_IBMPS2_60 TEXT("IBM PS/2-60")
-#define REGSTR_MACHTYPE_IBMPS2_65SX TEXT("IBM PS/2-65SX")
-#define REGSTR_MACHTYPE_IBMPS2_70 TEXT("IBM PS/2-70")
-#define REGSTR_MACHTYPE_IBMPS2_P70 TEXT("IBM PS/2-P70")
-#define REGSTR_MACHTYPE_IBMPS2_70_80 TEXT("IBM PS/2-70/80")
-#define REGSTR_MACHTYPE_IBMPS2_80 TEXT("IBM PS/2-80")
-#define REGSTR_MACHTYPE_IBMPS2_90 TEXT("IBM PS/2-90")
-#define REGSTR_MACHTYPE_IBMPS1 TEXT("IBM PS/1")
-#define REGSTR_MACHTYPE_PHOENIX_PCAT TEXT("Phoenix PC/AT Compatible")
-#define REGSTR_MACHTYPE_HP_VECTRA TEXT("HP Vectra")
-#define REGSTR_MACHTYPE_ATT_PC TEXT("AT&T PC")
-#define REGSTR_MACHTYPE_ZENITH_PC TEXT("Zenith PC")
-#define REGSTR_VAL_APMMENUSUSPEND TEXT("APMMenuSuspend")
-#define APMMENUSUSPEND_DISABLED 0
-#define APMMENUSUSPEND_ENABLED 1
-#define APMMENUSUSPEND_UNDOCKED 2
-#define APMMENUSUSPEND_NOCHANGE 128
-#define REGSTR_VAL_BUSTYPE TEXT("BusType")
-#define REGSTR_VAL_CPU TEXT("CPU")
-#define REGSTR_VAL_NDP TEXT("NDP")
-#define REGSTR_VAL_PNPBIOSVER TEXT("PnPBIOSVer")
-#define REGSTR_VAL_PNPSTRUCOFFSET TEXT("PnPStrucOffset")
-#define REGSTR_VAL_PCIBIOSVER TEXT("PCIBIOSVer")
-#define REGSTR_VAL_HWMECHANISM TEXT("HWMechanism")
-#define REGSTR_VAL_LASTPCIBUSNUM TEXT("LastPCIBusNum")
-#define REGSTR_VAL_CONVMEM TEXT("ConvMem")
-#define REGSTR_VAL_EXTMEM TEXT("ExtMem")
-#define REGSTR_VAL_COMPUTERNAME TEXT("ComputerName")
-#define REGSTR_VAL_BIOSNAME TEXT("BIOSName")
-#define REGSTR_VAL_BIOSVERSION TEXT("BIOSVersion")
-#define REGSTR_VAL_BIOSDATE TEXT("BIOSDate")
-#define REGSTR_VAL_MODEL TEXT("Model")
-#define REGSTR_VAL_SUBMODEL TEXT("Submodel")
-#define REGSTR_VAL_REVISION TEXT("Revision")
-#define REGSTR_VAL_FIFODEPTH TEXT("FIFODepth")
-#define REGSTR_VAL_RDINTTHRESHOLD TEXT("RDIntThreshold")
-#define REGSTR_VAL_WRINTTHRESHOLD TEXT("WRIntThreshold")
-#define REGSTR_VAL_PRIORITY TEXT("Priority")
-#define REGSTR_VAL_DRIVER TEXT("Driver")
-#define REGSTR_VAL_FUNCDESC TEXT("FunctionDesc")
-#define REGSTR_VAL_FORCEDCONFIG TEXT("ForcedConfig")
-#define REGSTR_VAL_CONFIGFLAGS TEXT("ConfigFlags")
-#define REGSTR_VAL_CSCONFIGFLAGS TEXT("CSConfigFlags")
-#define CONFIGFLAG_DISABLED 1
-#define CONFIGFLAG_REMOVED 2
-#define CONFIGFLAG_MANUAL_INSTALL 4
-#define CONFIGFLAG_IGNORE_BOOT_LC 8
-#define CONFIGFLAG_NET_BOOT 16
-#define CONFIGFLAG_REINSTALL 32
-#define CONFIGFLAG_FAILEDINSTALL 64
-#define CONFIGFLAG_CANTSTOPACHILD 128
-#define CONFIGFLAG_OKREMOVEROM 256
-#define CONFIGFLAG_NOREMOVEEXIT 512
-#define CSCONFIGFLAG_BITS 7
-#define CSCONFIGFLAG_DISABLED 1
-#define CSCONFIGFLAG_DO_NOT_CREATE 2
-#define CSCONFIGFLAG_DO_NOT_START 4
-#define DMSTATEFLAG_APPLYTOALL 1
-#define REGSTR_VAL_ROOT_DEVNODE TEXT("HTREE\\ROOT\\0")
-#define REGSTR_VAL_RESERVED_DEVNODE TEXT("HTREE\\RESERVED\\0")
-#define REGSTR_PATH_READDATAPORT REGSTR_KEY_ISAENUM TEXT("\\ReadDataPort\\0")
-#define REGSTR_PATH_MULTI_FUNCTION TEXT("MF")
-#define REGSTR_VAL_RESOURCE_MAP TEXT("ResourceMap")
-#define REGSTR_PATH_CHILD_PREFIX TEXT("Child")
-#define NUM_RESOURCE_MAP 256
-#define REGSTR_VAL_MF_FLAGS TEXT("MFFlags")
-#define MF_FLAGS_EVEN_IF_NO_RESOURCE 1
-#define MF_FLAGS_NO_CREATE_IF_NO_RESOURCE 2
-#define MF_FLAGS_FILL_IN_UNKNOWN_RESOURCE 4
-#define MF_FLAGS_CREATE_BUT_NO_SHOW_DISABLED 8
-#define EISAFLAG_NO_IO_MERGE 1
-#define EISAFLAG_SLOT_IO_FIRST 2
-#define EISA_NO_MAX_FUNCTION 0xFF
-#define NUM_EISA_RANGES 4
-#define REGSTR_VAL_DRVDESC TEXT("DriverDesc")
-#define REGSTR_VAL_DEVLOADER TEXT("DevLoader")
-#define REGSTR_VAL_STATICVXD TEXT("StaticVxD")
-#define REGSTR_VAL_PROPERTIES TEXT("Properties")
-#define REGSTR_VAL_MANUFACTURER TEXT("Manufacturer")
-#define REGSTR_VAL_EXISTS TEXT("Exists")
-#define REGSTR_VAL_CMENUMFLAGS TEXT("CMEnumFlags")
-#define REGSTR_VAL_CMDRIVFLAGS TEXT("CMDrivFlags")
-#define REGSTR_VAL_ENUMERATOR TEXT("Enumerator")
-#define REGSTR_VAL_DEVICEDRIVER TEXT("DeviceDriver")
-#define REGSTR_VAL_PORTNAME TEXT("PortName")
-#define REGSTR_VAL_INFPATH TEXT("InfPath")
-#define REGSTR_VAL_INFSECTION TEXT("InfSection")
-#define REGSTR_VAL_POLLING TEXT("Polling")
-#define REGSTR_VAL_DONTLOADIFCONFLICT TEXT("DontLoadIfConflict")
-#define REGSTR_VAL_PORTSUBCLASS TEXT("PortSubClass")
-#define REGSTR_VAL_NETCLEAN TEXT("NetClean")
-#define REGSTR_VAL_IDE_NO_SERIALIZE TEXT("IDENoSerialize")
-#define REGSTR_VAL_NOCMOSORFDPT TEXT("NoCMOSorFDPT")
-#define REGSTR_VAL_COMVERIFYBASE TEXT("COMVerifyBase")
-#define REGSTR_KEY_OVERRIDE TEXT("Override")
-#define REGSTR_VAL_CONFIGMG TEXT("CONFIGMG")
-#define REGSTR_VAL_SYSDM TEXT("SysDM")
-#define REGSTR_VAL_SYSDMFUNC TEXT("SysDMFunc")
-#define REGSTR_VAL_PRIVATE TEXT("Private")
-#define REGSTR_VAL_PRIVATEFUNC TEXT("PrivateFunc")
-#define REGSTR_VAL_DETECT TEXT("Detect")
-#define REGSTR_VAL_DETECTFUNC TEXT("DetectFunc")
-#define REGSTR_VAL_ASKFORCONFIG TEXT("AskForConfig")
-#define REGSTR_VAL_ASKFORCONFIGFUNC TEXT("AskForConfigFunc")
-#define REGSTR_VAL_WAITFORUNDOCK TEXT("WaitForUndock")
-#define REGSTR_VAL_WAITFORUNDOCKFUNC TEXT("WaitForUndockFunc")
-#define REGSTR_VAL_REMOVEROMOKAY TEXT("RemoveRomOkay")
-#define REGSTR_VAL_REMOVEROMOKAYFUNC TEXT("RemoveRomOkayFunc")
-#define REGSTR_VAL_CURCONFIG TEXT("CurrentConfig")
-#define REGSTR_VAL_FRIENDLYNAME TEXT("FriendlyName")
-#define REGSTR_VAL_CURRENTCONFIG TEXT("CurrentConfig")
-#define REGSTR_VAL_MAP TEXT("Map")
-#define REGSTR_VAL_ID TEXT("CurrentID")
-#define REGSTR_VAL_DOCKED TEXT("CurrentDockedState")
-#define REGSTR_VAL_CHECKSUM TEXT("CurrentChecksum")
-#define REGSTR_VAL_HWDETECT TEXT("HardwareDetect")
-#define REGSTR_VAL_INHIBITRESULTS TEXT("InhibitResults")
-#define REGSTR_VAL_PROFILEFLAGS TEXT("ProfileFlags")
-#define REGSTR_KEY_PCMCIA TEXT("PCMCIA\\")
-#define REGSTR_KEY_PCUNKNOWN TEXT("UNKNOWN_MANUFACTURER")
-#define REGSTR_VAL_PCSSDRIVER TEXT("Driver")
-#define REGSTR_KEY_PCMTD TEXT("MTD-")
-#define REGSTR_VAL_PCMTDRIVER TEXT("MTD")
-#define REGSTR_VAL_HARDWAREID TEXT("HardwareID")
-#define REGSTR_VAL_INSTALLER TEXT("Installer")
-#define REGSTR_VAL_INSICON TEXT("Icon")
-#define REGSTR_VAL_ENUMPROPPAGES TEXT("EnumPropPages")
-#define REGSTR_VAL_BASICPROPERTIES TEXT("BasicProperties")
-#define REGSTR_VAL_PRIVATEPROBLEM TEXT("PrivateProblem")
-#define REGSTR_KEY_CURRENT TEXT("Current")
-#define REGSTR_KEY_DEFAULT TEXT("Default")
-#define REGSTR_KEY_MODES TEXT("Modes")
-#define REGSTR_VAL_MODE TEXT("Mode")
-#define REGSTR_VAL_BPP TEXT("BPP")
-#define REGSTR_VAL_HRES TEXT("HRes")
-#define REGSTR_VAL_VRES TEXT("VRes")
-#define REGSTR_VAL_FONTSIZE TEXT("FontSize")
-#define REGSTR_VAL_DRV TEXT("drv")
-#define REGSTR_VAL_GRB TEXT("grb")
-#define REGSTR_VAL_VDD TEXT("vdd")
-#define REGSTR_VAL_VER TEXT("Ver")
-#define REGSTR_VAL_MAXRES TEXT("MaxResolution")
-#define REGSTR_VAL_DPMS TEXT("DPMS")
-#define REGSTR_VAL_RESUMERESET TEXT("ResumeReset")
-#define REGSTR_VAL_DESCRIPTION TEXT("Description")
-#define REGSTR_KEY_SYSTEM TEXT("System")
-#define REGSTR_KEY_USER TEXT("User")
-#define REGSTR_VAL_DPI TEXT("dpi")
-#define REGSTR_VAL_PCICOPTIONS TEXT("PCICOptions")
-#ifndef NEC_98
-#define PCIC_DEFAULT_IRQMASK 0x4EB8
-#else
-#define PCIC_DEFAULT_IRQMASK 0x1468
-#endif
-#define PCIC_DEFAULT_NUMSOCKETS 0
-#define REGSTR_VAL_PCICIRQMAP TEXT("PCICIRQMap")
-#define REGSTR_PATH_APPEARANCE TEXT("Control Panel\\Appearance")
-#define REGSTR_PATH_LOOKSCHEMES TEXT("Control Panel\\Appearance\\Schemes")
-#define REGSTR_VAL_CUSTOMCOLORS TEXT("CustomColors")
-#define REGSTR_PATH_SCREENSAVE TEXT("Control Panel\\Desktop")
-#define REGSTR_VALUE_USESCRPASSWORD TEXT("ScreenSaveUsePassword")
-#define REGSTR_VALUE_SCRPASSWORD TEXT("ScreenSave_Data")
-#define REGSTR_VALUE_LOWPOWERTIMEOUT TEXT("ScreenSaveLowPowerTimeout")
-#define REGSTR_VALUE_POWEROFFTIMEOUT TEXT("ScreenSavePowerOffTimeout")
-#define REGSTR_VALUE_LOWPOWERACTIVE TEXT("ScreenSaveLowPowerActive")
-#define REGSTR_VALUE_POWEROFFACTIVE TEXT("ScreenSavePowerOffActive")
-#define REGSTR_PATH_WINDOWSAPPLETS TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Applets")
-#define REGSTR_PATH_SYSTRAY TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\SysTray")
-#define REGSTR_VAL_SYSTRAYSVCS TEXT("Services")
-#define REGSTR_VAL_SYSTRAYBATFLAGS TEXT("PowerFlags")
-#define REGSTR_VAL_SYSTRAYPCCARDFLAGS TEXT("PCMCIAFlags")
-#define REGSTR_PATH_NETWORK_USERSETTINGS TEXT("Network")
-#define REGSTR_KEY_NETWORK_PERSISTENT TEXT("\\Persistent")
-#define REGSTR_KEY_NETWORK_RECENT TEXT("\\Recent")
-#define REGSTR_VAL_REMOTE_PATH TEXT("RemotePath")
-#define REGSTR_VAL_USER_NAME TEXT("UserName")
-#define REGSTR_VAL_PROVIDER_NAME TEXT("ProviderName")
-#define REGSTR_VAL_CONNECTION_TYPE TEXT("ConnectionType")
-#define REGSTR_VAL_UPGRADE TEXT("Upgrade")
-#define REGSTR_KEY_LOGON TEXT("\\Logon")
-#define REGSTR_VAL_MUSTBEVALIDATED TEXT("MustBeValidated")
-#define REGSTR_VAL_RUNLOGINSCRIPT TEXT("ProcessLoginScript")
-#define REGSTR_KEY_NETWORKPROVIDER TEXT("\\NetworkProvider")
-#define REGSTR_PATH_NW32NETPROVIDER REGSTR_PATH_SERVICES TEXT("\\NWNP32" REGSTR_KEY_NETWORKPROVIDER
-#define REGSTR_PATH_MS32NETPROVIDER REGSTR_PATH_SERVICES TEXT("\\MSNP32" REGSTR_KEY_NETWORKPROVIDER
-#define REGSTR_VAL_AUTHENT_AGENT TEXT("AuthenticatingAgent")
-#define REGSTR_VAL_PREFREDIR TEXT("PreferredRedir")
-#define REGSTR_VAL_AUTOSTART TEXT("AutoStart")
-#define REGSTR_VAL_AUTOLOGON TEXT("AutoLogon")
-#define REGSTR_VAL_NETCARD TEXT("Netcard")
-#define REGSTR_VAL_TRANSPORT TEXT("Transport")
-#define REGSTR_VAL_DYNAMIC TEXT("Dynamic")
-#define REGSTR_VAL_TRANSITION TEXT("Transition")
-#define REGSTR_VAL_STATICDRIVE TEXT("StaticDrive")
-#define REGSTR_VAL_LOADHI TEXT("LoadHi")
-#define REGSTR_VAL_LOADRMDRIVERS TEXT("LoadRMDrivers")
-#define REGSTR_VAL_SETUPN TEXT("SetupN")
-#define REGSTR_VAL_SETUPNPATH TEXT("SetupNPath")
-#define REGSTR_VAL_WRKGRP_FORCEMAPPING TEXT("WrkgrpForceMapping")
-#define REGSTR_VAL_WRKGRP_REQUIRED TEXT("WrkgrpRequired")
-#define REGSTR_PATH_CURRENT_CONTROL_SET TEXT("System\\CurrentControlSet\\Control")
-#define REGSTR_VAL_CURRENT_USER TEXT("Current User")
-#define REGSTR_PATH_PWDPROVIDER TEXT("System\\CurrentControlSet\\Control\\PwdProvider")
-#define REGSTR_VAL_PWDPROVIDER_PATH TEXT("ProviderPath")
-#define REGSTR_VAL_PWDPROVIDER_DESC TEXT("Description")
-#define REGSTR_VAL_PWDPROVIDER_CHANGEPWD TEXT("ChangePassword")
-#define REGSTR_VAL_PWDPROVIDER_CHANGEPWDHWND TEXT("ChangePasswordHwnd")
-#define REGSTR_VAL_PWDPROVIDER_GETPWDSTATUS TEXT("GetPasswordStatus")
-#define REGSTR_VAL_PWDPROVIDER_ISNP TEXT("NetworkProvider")
-#define REGSTR_VAL_PWDPROVIDER_CHANGEORDER TEXT("ChangeOrder")
-#define REGSTR_PATH_POLICIES TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Policies")
-#define REGSTR_PATH_UPDATE TEXT("System\\CurrentControlSet\\Control\\Update")
-#define REGSTR_VALUE_ENABLE TEXT("Enable")
-#define REGSTR_VALUE_VERBOSE TEXT("Verbose")
-#define REGSTR_VALUE_NETPATH TEXT("NetworkPath")
-#define REGSTR_VALUE_DEFAULTLOC TEXT("UseDefaultNetLocation")
-#define REGSTR_KEY_NETWORK TEXT("Network")
-#define REGSTR_KEY_SYSTEM TEXT("System")
-#define REGSTR_KEY_PRINTERS TEXT("Printers")
-#define REGSTR_KEY_WINOLDAPP TEXT("WinOldApp")
-#define REGSTR_VAL_NOFILESHARING TEXT("NoFileSharing")
-#define REGSTR_VAL_NOPRINTSHARING TEXT("NoPrintSharing")
-#define REGSTR_VAL_NOFILESHARINGCTRL TEXT("NoFileSharingControl")
-#define REGSTR_VAL_NOPRINTSHARINGCTRL TEXT("NoPrintSharingControl")
-#define REGSTR_VAL_HIDESHAREPWDS TEXT("HideSharePwds")
-#define REGSTR_VAL_DISABLEPWDCACHING TEXT("DisablePwdCaching")
-#define REGSTR_VAL_ALPHANUMPWDS TEXT("AlphanumPwds")
-#define REGSTR_VAL_NETSETUP_DISABLE TEXT("NoNetSetup")
-#define REGSTR_VAL_NETSETUP_NOCONFIGPAGE TEXT("NoNetSetupConfigPage")
-#define REGSTR_VAL_NETSETUP_NOIDPAGE TEXT("NoNetSetupIDPage")
-#define REGSTR_VAL_NETSETUP_NOSECURITYPAGE TEXT("NoNetSetupSecurityPage")
-#define REGSTR_VAL_SYSTEMCPL_NOVIRTMEMPAGE TEXT("NoVirtMemPage")
-#define REGSTR_VAL_SYSTEMCPL_NODEVMGRPAGE TEXT("NoDevMgrPage")
-#define REGSTR_VAL_SYSTEMCPL_NOCONFIGPAGE TEXT("NoConfigPage")
-#define REGSTR_VAL_SYSTEMCPL_NOFILESYSPAGE TEXT("NoFileSysPage")
-#define REGSTR_VAL_DISPCPL_NODISPCPL TEXT("NoDispCPL")
-#define REGSTR_VAL_DISPCPL_NOBACKGROUNDPAGE TEXT("NoDispBackgroundPage")
-#define REGSTR_VAL_DISPCPL_NOSCRSAVPAGE TEXT("NoDispScrSavPage")
-#define REGSTR_VAL_DISPCPL_NOAPPEARANCEPAGE TEXT("NoDispAppearancePage")
-#define REGSTR_VAL_DISPCPL_NOSETTINGSPAGE TEXT("NoDispSettingsPage")
-#define REGSTR_VAL_SECCPL_NOSECCPL TEXT("NoSecCPL")
-#define REGSTR_VAL_SECCPL_NOPWDPAGE TEXT("NoPwdPage")
-#define REGSTR_VAL_SECCPL_NOADMINPAGE TEXT("NoAdminPage")
-#define REGSTR_VAL_SECCPL_NOPROFILEPAGE TEXT("NoProfilePage")
-#define REGSTR_VAL_PRINTERS_HIDETABS TEXT("NoPrinterTabs")
-#define REGSTR_VAL_PRINTERS_NODELETE TEXT("NoDeletePrinter")
-#define REGSTR_VAL_PRINTERS_NOADD TEXT("NoAddPrinter")
-#define REGSTR_VAL_WINOLDAPP_DISABLED TEXT("Disabled")
-#define REGSTR_VAL_WINOLDAPP_NOREALMODE TEXT("NoRealMode")
-#define REGSTR_VAL_NOENTIRENETWORK TEXT("NoEntireNetwork")
-#define REGSTR_VAL_NOWORKGROUPCONTENTS TEXT("NoWorkgroupContents")
-#define REGSTR_VAL_MINPWDLEN TEXT("MinPwdLen")
-#define REGSTR_VAL_PWDEXPIRATION TEXT("PwdExpiration")
-#define REGSTR_VAL_WIN31PROVIDER TEXT("Win31Provider")
-#define REGSTR_VAL_DISABLEREGTOOLS TEXT("DisableRegistryTools")
-#define REGSTR_PATH_WINLOGON TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Winlogon")
-#define REGSTR_VAL_LEGALNOTICECAPTION TEXT("LegalNoticeCaption")
-#define REGSTR_VAL_LEGALNOTICETEXT TEXT("LegalNoticeText")
-#define REGSTR_VAL_RESTRICTRUN TEXT("RestrictRun")
-#define REGSTR_KEY_POL_USERS TEXT("Users")
-#define REGSTR_KEY_POL_COMPUTERS TEXT("Computers")
-#define REGSTR_KEY_POL_USERGROUPS TEXT("UserGroups")
-#define REGSTR_KEY_POL_DEFAULT TEXT(".default")
-#define REGSTR_KEY_POL_USERGROUPDATA TEXT("GroupData\\UserGroups\\Priority")
-#define REGSTR_PATH_TIMEZONE TEXT("System\\CurrentControlSet\\Control\\TimeZoneInformation")
-#define REGSTR_VAL_TZBIAS TEXT("Bias")
-#define REGSTR_VAL_TZDLTBIAS TEXT("DaylightBias")
-#define REGSTR_VAL_TZSTDBIAS TEXT("StandardBias")
-#define REGSTR_VAL_TZACTBIAS TEXT("ActiveTimeBias")
-#define REGSTR_VAL_TZDLTFLAG TEXT("DaylightFlag")
-#define REGSTR_VAL_TZSTDSTART TEXT("StandardStart")
-#define REGSTR_VAL_TZDLTSTART TEXT("DaylightStart")
-#define REGSTR_VAL_TZDLTNAME TEXT("DaylightName")
-#define REGSTR_VAL_TZSTDNAME TEXT("StandardName")
-#define REGSTR_VAL_TZNOCHANGESTART TEXT("NoChangeStart")
-#define REGSTR_VAL_TZNOCHANGEEND TEXT("NoChangeEnd")
-#define REGSTR_VAL_TZNOAUTOTIME TEXT("DisableAutoDaylightTimeSet")
-#define REGSTR_PATH_FLOATINGPOINTPROCESSOR TEXT("HARDWARE\\DESCRIPTION\\System\\FloatingPointProcessor")
-#define REGSTR_PATH_FLOATINGPOINTPROCESSOR0 TEXT("HARDWARE\\DESCRIPTION\\System\\FloatingPointProcessor\\0")
-#define REGSTR_PATH_COMPUTRNAME TEXT("System\\CurrentControlSet\\Control\\ComputerName\\ComputerName")
-#define REGSTR_VAL_COMPUTRNAME TEXT("ComputerName")
-#define REGSTR_PATH_SHUTDOWN TEXT("System\\CurrentControlSet\\Control\\Shutdown")
-#define REGSTR_VAL_FORCEREBOOT TEXT("ForceReboot")
-#define REGSTR_VAL_SETUPPROGRAMRAN TEXT("SetupProgramRan")
-#define REGSTR_VAL_DOES_POLLING TEXT("PollingSupportNeeded")
-#define REGSTR_PATH_KNOWNDLLS TEXT("System\\CurrentControlSet\\Control\\SessionManager\\KnownDLLs")
-#define REGSTR_PATH_KNOWN16DLLS TEXT("System\\CurrentControlSet\\Control\\SessionManager\\Known16DLLs")
-#define REGSTR_PATH_CHECKVERDLLS TEXT("System\\CurrentControlSet\\Control\\SessionManager\\CheckVerDLLs")
-#define REGSTR_PATH_WARNVERDLLS TEXT("System\\CurrentControlSet\\Control\\SessionManager\\WarnVerDLLs")
-#define REGSTR_PATH_HACKINIFILE TEXT("System\\CurrentControlSet\\Control\\SessionManager\\HackIniFiles")
-#define REGSTR_PATH_CHECKBADAPPS TEXT("System\\CurrentControlSet\\Control\\SessionManager\\CheckBadApps")
-#define REGSTR_PATH_APPPATCH TEXT("System\\CurrentControlSet\\Control\\SessionManager\\AppPatches")
-#define REGSTR_PATH_KNOWNVXDS TEXT("System\\CurrentControlSet\\Control\\SessionManager\\KnownVxDs")
-#define REGSTR_VAL_UNINSTALLER_DISPLAYNAME TEXT("DisplayName")
-#define REGSTR_VAL_UNINSTALLER_COMMANDLINE TEXT("UninstallString")
-#define REGSTR_PATH_DESKTOP REGSTR_PATH_SCREENSAVE
-#define REGSTR_PATH_MOUSE TEXT("Control Panel\\Mouse")
-#define REGSTR_PATH_KEYBOARD TEXT("Control Panel\\Keyboard")
-#define REGSTR_PATH_COLORS TEXT("Control Panel\\Colors")
-#define REGSTR_PATH_SOUND TEXT("Control Panel\\Sound")
-#define REGSTR_PATH_METRICS TEXT("Control Panel\\Desktop\\WindowMetrics")
-#define REGSTR_PATH_ICONS TEXT("Control Panel\\Icons")
-#define REGSTR_PATH_CURSORS TEXT("Control Panel\\Cursors")
-#define REGSTR_PATH_CHECKDISK TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Check Drive")
-#define REGSTR_PATH_CHECKDISKSET TEXT("Settings")
-#define REGSTR_PATH_CHECKDISKUDRVS TEXT("NoUnknownDDErrDrvs")
-#define REGSTR_PATH_FAULT TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Fault")
-#define REGSTR_VAL_FAULT_LOGFILE TEXT("LogFile")
-#define REGSTR_PATH_AEDEBUG TEXT("Software\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug")
-#define REGSTR_VAL_AEDEBUG_DEBUGGER TEXT("Debugger")
-#define REGSTR_VAL_AEDEBUG_AUTO TEXT("Auto")
-#define REGSTR_PATH_GRPCONV TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\GrpConv")
-#define REGSTR_VAL_REGITEMDELETEMESSAGE TEXT("Removal Message")
-#define REGSTR_PATH_LASTCHECK TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\LastCheck")
-#define REGSTR_PATH_LASTOPTIMIZE TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\LastOptimize")
-#define REGSTR_PATH_LASTBACKUP TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\LastBackup")
-#define REGSTR_PATH_CHKLASTCHECK TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Check Drive\\LastCheck")
-#define REGSTR_PATH_CHKLASTSURFAN TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Check Drive\\LastSurfaceAnalysis")
-#define DTRESULTOK 0
-#define DTRESULTFIX 1
-#define DTRESULTPROB 2
-#define DTRESULTPART 3
-#define REGSTR_KEY_SHARES TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Network\\LanMan")
-#define REGSTR_VAL_SHARES_FLAGS TEXT("Flags")
-#define REGSTR_VAL_SHARES_TYPE TEXT("Type")
-#define REGSTR_VAL_SHARES_PATH TEXT("Path")
-#define REGSTR_VAL_SHARES_REMARK TEXT("Remark")
-#define REGSTR_VAL_SHARES_RW_PASS TEXT("Parm1")
-#define REGSTR_VAL_SHARES_RO_PASS TEXT("Parm2")
-#define REGSTR_PATH_PRINT TEXT("System\\CurrentControlSet\\Control\\Print")
-#define REGSTR_PATH_PRINTERS TEXT("System\\CurrentControlSet\\Control\\Print\\Printers")
-#define REGSTR_PATH_PROVIDERS TEXT("System\\CurrentControlSet\\Control\\Print\\Providers")
-#define REGSTR_PATH_MONITORS TEXT("System\\CurrentControlSet\\Control\\Print\\Monitors")
-#define REGSTR_PATH_ENVIRONMENTS TEXT("System\\CurrentControlSet\\Control\\Print\\Environments")
-#define REGSTR_VAL_START_ON_BOOT TEXT("StartOnBoot")
-#define REGSTR_VAL_PRINTERS_MASK TEXT("PrintersMask")
-#define REGSTR_VAL_DOS_SPOOL_MASK TEXT("DOSSpoolMask")
-#define REGSTR_KEY_CURRENT_ENV TEXT("\\Windows 4.0")
-#define REGSTR_KEY_DRIVERS TEXT("\\Drivers")
-#define REGSTR_KEY_PRINT_PROC TEXT("\\Print Processors")
-#define REGSTR_PATH_EVENTLABELS TEXT("AppEvents\\EventLabels")
-#define REGSTR_PATH_SCHEMES TEXT("AppEvents\\Schemes")
-#define REGSTR_PATH_APPS REGSTR_PATH_SCHEMES TEXT("\\Apps")
-#define REGSTR_PATH_APPS_DEFAULT REGSTR_PATH_SCHEMES TEXT("\\Apps\\.Default")
-#define REGSTR_PATH_NAMES REGSTR_PATH_SCHEMES TEXT("\\Names")
-#define REGSTR_PATH_MULTIMEDIA REGSTR_PATH_SETUP TEXT("\\Multimedia")
-#define REGSTR_PATH_MULTIMEDIA_AUDIO TEXT("Software\\Microsoft\\Multimedia\\Audio")
-#define REGSTR_PATH_MEDIARESOURCES REGSTR_PATH_CURRENT_CONTROL_SET TEXT("\\MediaResources")
-#define REGSTR_PATH_MEDIAPROPERTIES REGSTR_PATH_CURRENT_CONTROL_SET TEXT("\\MediaProperties")
-#define REGSTR_PATH_PRIVATEPROPERTIES REGSTR_PATH_MEDIAPROPERTIES TEXT("\\PrivateProperties")
-#define REGSTR_PATH_PUBLICPROPERTIES REGSTR_PATH_MEDIAPROPERTIES TEXT("\\PublicProperties")
-#define REGSTR_PATH_JOYOEM REGSTR_PATH_PRIVATEPROPERTIES TEXT("\\Joystick\\OEM")
-#define REGSTR_PATH_JOYCONFIG REGSTR_PATH_MEDIARESOURCES TEXT("\\Joystick")
-#define REGSTR_KEY_JOYCURR TEXT("CurrentJoystickSettings")
-#define REGSTR_KEY_JOYSETTINGS TEXT("JoystickSettings")
-#define REGSTR_VAL_JOYUSERVALUES TEXT("JoystickUserValues")
-#define REGSTR_VAL_JOYCALLOUT TEXT("JoystickCallout")
-#define REGSTR_VAL_JOYNCONFIG TEXT("Joystick%dConfiguration")
-#define REGSTR_VAL_JOYNOEMNAME TEXT("Joystick%dOEMName")
-#define REGSTR_VAL_JOYNOEMCALLOUT TEXT("Joystick%dOEMCallout")
-#define REGSTR_VAL_JOYOEMCALLOUT TEXT("OEMCallout")
-#define REGSTR_VAL_JOYOEMNAME TEXT("OEMName")
-#define REGSTR_VAL_JOYOEMDATA TEXT("OEMData")
-#define REGSTR_VAL_JOYOEMXYLABEL TEXT("OEMXYLabel")
-#define REGSTR_VAL_JOYOEMZLABEL TEXT("OEMZLabel")
-#define REGSTR_VAL_JOYOEMRLABEL TEXT("OEMRLabel")
-#define REGSTR_VAL_JOYOEMPOVLABEL TEXT("OEMPOVLabel")
-#define REGSTR_VAL_JOYOEMULABEL TEXT("OEMULabel")
-#define REGSTR_VAL_JOYOEMVLABEL TEXT("OEMVLabel")
-#define REGSTR_VAL_JOYOEMTESTMOVEDESC TEXT("OEMTestMoveDesc")
-#define REGSTR_VAL_JOYOEMTESTBUTTONDESC TEXT("OEMTestButtonDesc")
-#define REGSTR_VAL_JOYOEMTESTMOVECAP TEXT("OEMTestMoveCap")
-#define REGSTR_VAL_JOYOEMTESTBUTTONCAP TEXT("OEMTestButtonCap")
-#define REGSTR_VAL_JOYOEMTESTWINCAP TEXT("OEMTestWinCap")
-#define REGSTR_VAL_JOYOEMCALCAP TEXT("OEMCalCap")
-#define REGSTR_VAL_JOYOEMCALWINCAP TEXT("OEMCalWinCap")
-#define REGSTR_VAL_JOYOEMCAL1 TEXT("OEMCal1")
-#define REGSTR_VAL_JOYOEMCAL2 TEXT("OEMCal2")
-#define REGSTR_VAL_JOYOEMCAL3 TEXT("OEMCal3")
-#define REGSTR_VAL_JOYOEMCAL4 TEXT("OEMCal4")
-#define REGSTR_VAL_JOYOEMCAL5 TEXT("OEMCal5")
-#define REGSTR_VAL_JOYOEMCAL6 TEXT("OEMCal6")
-#define REGSTR_VAL_JOYOEMCAL7 TEXT("OEMCal7")
-#define REGSTR_VAL_JOYOEMCAL8 TEXT("OEMCal8")
-#define REGSTR_VAL_JOYOEMCAL9 TEXT("OEMCal9")
-#define REGSTR_VAL_JOYOEMCAL10 TEXT("OEMCal10")
-#define REGSTR_VAL_JOYOEMCAL11 TEXT("OEMCal11")
-#define REGSTR_VAL_JOYOEMCAL12 TEXT("OEMCal12")
-#ifndef NEC_98
-#define REGSTR_KEY_ISAENUM TEXT("ISAPnP")
-#define REGSTR_KEY_EISAENUM TEXT("EISA")
-#define REGSTR_VAL_EISA_RANGES TEXT("EISARanges")
-#define REGSTR_VAL_EISA_FUNCTIONS TEXT("EISAFunctions")
-#define REGSTR_VAL_EISA_FUNCTIONS_MASK TEXT("EISAFunctionsMask")
-#define REGSTR_VAL_EISA_FLAGS TEXT("EISAFlags")
-#define REGSTR_VAL_EISA_SIMULATE_INT15 TEXT("EISASimulateInt15")
-#else
-#define REGSTR_KEY_ISAENUM TEXT("C98PnP")
-#define REGSTR_KEY_EISAENUM TEXT("NESA")
-#define REGSTR_VAL_EISA_RANGES TEXT("NESARanges")
-#define REGSTR_VAL_EISA_FUNCTIONS TEXT("NESAFunctions")
-#define REGSTR_VAL_EISA_FUNCTIONS_MASK TEXT("NESAFunctionsMask")
-#define REGSTR_VAL_EISA_FLAGS TEXT("NESAFlags")
-#define REGSTR_VAL_EISA_SIMULATE_INT15 TEXT("NESASimulateInt15")
-#endif
-typedef struct _DSKTLSYSTEMTIME {
- WORD wYear;
- WORD wMonth;
- WORD wDayOfWeek;
- WORD wDay;
- WORD wHour;
- WORD wMinute;
- WORD wSecond;
- WORD wMilliseconds;
- WORD wResult;
-} DSKTLSYSTEMTIME,*PDSKTLSYSTEMTIME,*LPDSKTLSYSTEMTIME;
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/richedit.h b/winsup/w32api/include/richedit.h
deleted file mode 100644
index 8cb57e8..0000000
--- a/winsup/w32api/include/richedit.h
+++ /dev/null
@@ -1,523 +0,0 @@
-#ifndef _RICHEDIT_H
-#define _RICHEDIT_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#pragma pack(push,4)
-
-#ifdef UNICODE
-#define RICHEDIT_CLASS L"RichEdit20W"
-#else
-#define RICHEDIT_CLASS "RichEdit20A"
-#endif
-#define RICHEDIT_CLASS10A "RICHEDIT"
-#define CF_RTF TEXT("Rich Text Format")
-#define CF_RTFNOOBJS TEXT("Rich Text Format Without Objects")
-#define CF_RETEXTOBJ TEXT("RichEdit Text and Objects")
-#define CFM_BOLD 1
-#define CFM_ITALIC 2
-#define CFM_UNDERLINE 4
-#define CFM_STRIKEOUT 8
-#define CFM_PROTECTED 16
-#define CFM_LINK 32
-#define CFM_SIZE 0x80000000
-#define CFM_COLOR 0x40000000
-#define CFM_FACE 0x20000000
-#define CFM_OFFSET 0x10000000
-#define CFM_CHARSET 0x08000000
-#define CFM_SUBSCRIPT 0x00030000
-#define CFM_SUPERSCRIPT 0x00030000
-#define CFM_EFFECTS (CFM_BOLD | CFM_ITALIC | CFM_UNDERLINE | CFM_COLOR | CFM_STRIKEOUT | CFE_PROTECTED | CFM_LINK)
-#define CFE_BOLD 1
-#define CFE_ITALIC 2
-#define CFE_UNDERLINE 4
-#define CFE_STRIKEOUT 8
-#define CFE_PROTECTED 16
-#define CFE_AUTOCOLOR 0x40000000
-#define CFE_SUBSCRIPT 0x00010000
-#define CFE_SUPERSCRIPT 0x00020000
-#define IMF_FORCENONE 1
-#define IMF_FORCEENABLE 2
-#define IMF_FORCEDISABLE 4
-#define IMF_CLOSESTATUSWINDOW 8
-#define IMF_VERTICAL 32
-#define IMF_FORCEACTIVE 64
-#define IMF_FORCEINACTIVE 128
-#define IMF_FORCEREMEMBER 256
-#define SEL_EMPTY 0
-#define SEL_TEXT 1
-#define SEL_OBJECT 2
-#define SEL_MULTICHAR 4
-#define SEL_MULTIOBJECT 8
-#define MAX_TAB_STOPS 32
-#define PFM_ALIGNMENT 8
-#define PFM_NUMBERING 32
-#define PFM_OFFSET 4
-#define PFM_OFFSETINDENT 0x80000000
-#define PFM_RIGHTINDENT 2
-#define PFM_STARTINDENT 1
-#define PFM_TABSTOPS 16
-#define PFM_BORDER 2048
-#define PFM_LINESPACING 256
-#define PFM_NUMBERINGSTART 32768
-#define PFM_NUMBERINGSTYLE 8192
-#define PFM_NUMBERINGTAB 16384
-#define PFM_SHADING 4096
-#define PFM_SPACEAFTER 128
-#define PFM_SPACEBEFORE 64
-#define PFM_STYLE 1024
-#define PFM_DONOTHYPHEN 4194304
-#define PFM_KEEP 131072
-#define PFM_KEEPNEXT 262144
-#define PFM_NOLINENUMBER 1048576
-#define PFM_NOWIDOWCONTROL 2097152
-#define PFM_PAGEBREAKBEFORE 524288
-#define PFM_RTLPARA 65536
-#define PFM_SIDEBYSIDE 8388608
-#define PFM_TABLE 1073741824
-#define PFN_BULLET 1
-#define PFE_DONOTHYPHEN 64
-#define PFE_KEEP 2
-#define PFE_KEEPNEXT 4
-#define PFE_NOLINENUMBER 16
-#define PFE_NOWIDOWCONTROL 32
-#define PFE_PAGEBREAKBEFORE 8
-#define PFE_RTLPARA 1
-#define PFE_SIDEBYSIDE 128
-#define PFE_TABLE 16384
-#define PFA_LEFT 1
-#define PFA_RIGHT 2
-#define PFA_CENTER 3
-#define PFA_JUSTIFY 4
-#define PFA_FULL_INTERWORD 4
-#define SF_TEXT 1
-#define SF_RTF 2
-#define SF_RTFNOOBJS 3
-#define SF_TEXTIZED 4
-#define SF_UNICODE 16
-#define SF_USECODEPAGE 32
-#define SF_NCRFORNONASCII 64
-#define SF_RTFVAL 0x0700
-#define SFF_PWD 0x0800
-#define SFF_KEEPDOCINFO 0x1000
-#define SFF_PERSISTVIEWSCALE 0x2000
-#define SFF_PLAINRTF 0x4000
-#define SFF_SELECTION 0x8000
-#define WB_CLASSIFY 3
-#define WB_MOVEWORDLEFT 4
-#define WB_MOVEWORDRIGHT 5
-#define WB_LEFTBREAK 6
-#define WB_RIGHTBREAK 7
-#define WB_MOVEWORDPREV 4
-#define WB_MOVEWORDNEXT 5
-#define WB_PREVBREAK 6
-#define WB_NEXTBREAK 7
-#define WBF_WORDWRAP 16
-#define WBF_WORDBREAK 32
-#define WBF_OVERFLOW 64
-#define WBF_LEVEL1 128
-#define WBF_LEVEL2 256
-#define WBF_CUSTOM 512
-#define ES_DISABLENOSCROLL 8192
-#define ES_EX_NOCALLOLEINIT 16777216
-#define ES_NOIME 524288
-#define ES_NOOLEDRAGDROP 8
-#define ES_SAVESEL 32768
-#define ES_SELECTIONBAR 16777216
-#define ES_SELFIME 262144
-#define ES_SUNKEN 16384
-#define ES_VERTICAL 4194304
-#define EM_CANPASTE (WM_USER+50)
-#define EM_DISPLAYBAND (WM_USER+51)
-#define EM_EXGETSEL (WM_USER+52)
-#define EM_EXLIMITTEXT (WM_USER+53)
-#define EM_EXLINEFROMCHAR (WM_USER+54)
-#define EM_EXSETSEL (WM_USER+55)
-#define EM_FINDTEXT (WM_USER+56)
-#define EM_FORMATRANGE (WM_USER+57)
-#define EM_GETCHARFORMAT (WM_USER+58)
-#define EM_GETEVENTMASK (WM_USER+59)
-#define EM_GETOLEINTERFACE (WM_USER+60)
-#define EM_GETPARAFORMAT (WM_USER+61)
-#define EM_GETSELTEXT (WM_USER+62)
-#define EM_HIDESELECTION (WM_USER+63)
-#define EM_PASTESPECIAL (WM_USER+64)
-#define EM_REQUESTRESIZE (WM_USER+65)
-#define EM_SELECTIONTYPE (WM_USER+66)
-#define EM_SETBKGNDCOLOR (WM_USER+67)
-#define EM_SETCHARFORMAT (WM_USER+68)
-#define EM_SETEVENTMASK (WM_USER+69)
-#define EM_SETOLECALLBACK (WM_USER+70)
-#define EM_SETPARAFORMAT (WM_USER+71)
-#define EM_SETTARGETDEVICE (WM_USER+72)
-#define EM_STREAMIN (WM_USER+73)
-#define EM_STREAMOUT (WM_USER+74)
-#define EM_GETTEXTRANGE (WM_USER+75)
-#define EM_FINDWORDBREAK (WM_USER+76)
-#define EM_SETOPTIONS (WM_USER+77)
-#define EM_GETOPTIONS (WM_USER+78)
-#define EM_FINDTEXTEX (WM_USER+79)
-#define EM_GETWORDBREAKPROCEX (WM_USER+80)
-#define EM_SETWORDBREAKPROCEX (WM_USER+81)
-/* RichEdit 2.0 messages */
-#define EM_SETUNDOLIMIT (WM_USER+82)
-#define EM_REDO (WM_USER+84)
-#define EM_CANREDO (WM_USER+85)
-#define EM_GETUNDONAME (WM_USER+86)
-#define EM_GETREDONAME (WM_USER+87)
-#define EM_STOPGROUPTYPING (WM_USER+88)
-#define EM_SETTEXTMODE (WM_USER+89)
-#define EM_GETTEXTMODE (WM_USER+90)
-#define EM_AUTOURLDETECT (WM_USER+91)
-#define EM_GETAUTOURLDETECT (WM_USER + 92)
-#define EM_SETPALETTE (WM_USER + 93)
-#define EM_GETTEXTEX (WM_USER+94)
-#define EM_GETTEXTLENGTHEX (WM_USER+95)
-#define EM_SHOWSCROLLBAR (WM_USER+96)
-#define EM_SETTEXTEX (WM_USER + 97)
-#define EM_SETPUNCTUATION (WM_USER + 100)
-#define EM_GETPUNCTUATION (WM_USER + 101)
-#define EM_SETWORDWRAPMODE (WM_USER + 102)
-#define EM_GETWORDWRAPMODE (WM_USER + 103)
-#define EM_SETIMECOLOR (WM_USER + 104)
-#define EM_GETIMECOLOR (WM_USER + 105)
-#define EM_SETIMEOPTIONS (WM_USER + 106)
-#define EM_GETIMEOPTIONS (WM_USER + 107)
-#define EM_SETLANGOPTIONS (WM_USER+120)
-#define EM_GETLANGOPTIONS (WM_USER+121)
-#define EM_GETIMECOMPMODE (WM_USER+122)
-#define EM_FINDTEXTW (WM_USER + 123)
-#define EM_FINDTEXTEXW (WM_USER + 124)
-#define EM_RECONVERSION (WM_USER + 125)
-#define EM_SETBIDIOPTIONS (WM_USER + 200)
-#define EM_GETBIDIOPTIONS (WM_USER + 201)
-#define EM_SETTYPOGRAPHYOPTIONS (WM_USER+202)
-#define EM_GETTYPOGRAPHYOPTIONS (WM_USER+203)
-#define EM_SETEDITSTYLE (WM_USER + 204)
-#define EM_GETEDITSTYLE (WM_USER + 205)
-#define EM_GETSCROLLPOS (WM_USER+221)
-#define EM_SETSCROLLPOS (WM_USER+222)
-#define EM_SETFONTSIZE (WM_USER+223)
-#define EM_GETZOOM (WM_USER+224)
-#define EM_SETZOOM (WM_USER+225)
-
-#define EN_CORRECTTEXT 1797
-#define EN_DROPFILES 1795
-#define EN_IMECHANGE 1799
-#define EN_LINK 1803
-#define EN_MSGFILTER 1792
-#define EN_OLEOPFAILED 1801
-#define EN_PROTECTED 1796
-#define EN_REQUESTRESIZE 1793
-#define EN_SAVECLIPBOARD 1800
-#define EN_SELCHANGE 1794
-#define EN_STOPNOUNDO 1798
-#define ENM_NONE 0
-#define ENM_CHANGE 1
-#define ENM_CORRECTTEXT 4194304
-#define ENM_DRAGDROPDONE 16
-#define ENM_DROPFILES 1048576
-#define ENM_IMECHANGE 8388608
-#define ENM_KEYEVENTS 65536
-#define ENM_LANGCHANGE 16777216
-#define ENM_LINK 67108864
-#define ENM_MOUSEEVENTS 131072
-#define ENM_OBJECTPOSITIONS 33554432
-#define ENM_PROTECTED 2097152
-#define ENM_REQUESTRESIZE 262144
-#define ENM_SCROLL 4
-#define ENM_SCROLLEVENTS 8
-#define ENM_SELCHANGE 524288
-#define ENM_UPDATE 2
-#define ECO_AUTOWORDSELECTION 1
-#define ECO_AUTOVSCROLL 64
-#define ECO_AUTOHSCROLL 128
-#define ECO_NOHIDESEL 256
-#define ECO_READONLY 2048
-#define ECO_WANTRETURN 4096
-#define ECO_SAVESEL 0x8000
-#define ECO_SELECTIONBAR 0x1000000
-#define ECO_VERTICAL 0x400000
-#define ECOOP_SET 1
-#define ECOOP_OR 2
-#define ECOOP_AND 3
-#define ECOOP_XOR 4
-#define SCF_DEFAULT 0
-#define SCF_SELECTION 1
-#define SCF_WORD 2
-#define SCF_ALL 4
-#define SCF_USEUIRULES 8
-#define TM_PLAINTEXT 1
-#define TM_RICHTEXT 2
-#define TM_SINGLELEVELUNDO 4
-#define TM_MULTILEVELUNDO 8
-#define TM_SINGLECODEPAGE 16
-#define TM_MULTICODEPAGE 32
-#define yHeightCharPtsMost 1638
-#define lDefaultTab 720
-
-typedef struct _charformat {
- UINT cbSize;
- DWORD dwMask;
- DWORD dwEffects;
- LONG yHeight;
- LONG yOffset;
- COLORREF crTextColor;
- BYTE bCharSet;
- BYTE bPitchAndFamily;
- char szFaceName[LF_FACESIZE];
-} CHARFORMATA;
-typedef struct _charformatw {
- UINT cbSize;
- DWORD dwMask;
- DWORD dwEffects;
- LONG yHeight;
- LONG yOffset;
- COLORREF crTextColor;
- BYTE bCharSet;
- BYTE bPitchAndFamily;
- WCHAR szFaceName[LF_FACESIZE];
-} CHARFORMATW;
-typedef struct _charformat2a {
- UINT cbSize;
- DWORD dwMask;
- DWORD dwEffects;
- LONG yHeight;
- LONG yOffset;
- COLORREF crTextColor;
- BYTE bCharSet;
- BYTE bPitchAndFamily;
- char szFaceName[LF_FACESIZE];
- WORD wWeight;
- SHORT sSpacing;
- COLORREF crBackColor;
- LCID lcid;
- DWORD dwReserved;
- SHORT sStyle;
- WORD wKerning;
- BYTE bUnderlineType;
- BYTE bAnimation;
- BYTE bRevAuthor;
-} CHARFORMAT2A;
-typedef struct _charformat2w {
- UINT cbSize;
- DWORD dwMask;
- DWORD dwEffects;
- LONG yHeight;
- LONG yOffset;
- COLORREF crTextColor;
- BYTE bCharSet;
- BYTE bPitchAndFamily;
- WCHAR szFaceName[LF_FACESIZE];
- WORD wWeight;
- SHORT sSpacing;
- COLORREF crBackColor;
- LCID lcid;
- DWORD dwReserved;
- SHORT sStyle;
- WORD wKerning;
- BYTE bUnderlineType;
- BYTE bAnimation;
- BYTE bRevAuthor;
-} CHARFORMAT2W;
-typedef struct _charrange {
- LONG cpMin;
- LONG cpMax;
-} CHARRANGE;
-typedef struct _compcolor {
- COLORREF crText;
- COLORREF crBackground;
- DWORD dwEffects;
-} COMPCOLOR;
-typedef DWORD(CALLBACK *EDITSTREAMCALLBACK)(DWORD,PBYTE,LONG,LONG*);
-typedef struct _editstream {
- DWORD dwCookie;
- DWORD dwError;
- EDITSTREAMCALLBACK pfnCallback;
-} EDITSTREAM;
-typedef struct _encorrecttext {
- NMHDR nmhdr;
- CHARRANGE chrg;
- WORD seltyp;
-} ENCORRECTTEXT;
-typedef struct _endropfiles {
- NMHDR nmhdr;
- HANDLE hDrop;
- LONG cp;
- BOOL fProtected;
-} ENDROPFILES;
-typedef struct _enlink {
- NMHDR nmhdr;
- UINT msg;
- WPARAM wParam;
- LPARAM lParam;
- CHARRANGE chrg;
-} ENLINK;
-typedef struct {
- NMHDR nmhdr;
- LONG iob;
- LONG lOper;
- HRESULT hr;
-} ENOLEOPFAILED;
-typedef struct _enprotected {
- NMHDR nmhdr;
- UINT msg;
- WPARAM wParam;
- LPARAM lParam;
- CHARRANGE chrg;
-} ENPROTECTED,*LPENPROTECTED;
-typedef struct _ensaveclipboard {
- NMHDR nmhdr;
- LONG cObjectCount;
- LONG cch;
-} ENSAVECLIPBOARD;
-typedef struct _findtextA {
- CHARRANGE chrg;
- LPSTR lpstrText;
-} FINDTEXTA;
-typedef struct _findtextW {
- CHARRANGE chrg;
- LPWSTR lpstrText;
-} FINDTEXTW;
-typedef struct _findtextexA {
- CHARRANGE chrg;
- LPSTR lpstrText;
- CHARRANGE chrgText;
-} FINDTEXTEXA;
-typedef struct _findtextexW {
- CHARRANGE chrg;
- LPWSTR lpstrText;
- CHARRANGE chrgText;
-} FINDTEXTEXW;
-typedef struct _formatrange {
- HDC hdc;
- HDC hdcTarget;
- RECT rc;
- RECT rcPage;
- CHARRANGE chrg;
-} FORMATRANGE;
-typedef struct _msgfilter {
- NMHDR nmhdr;
- UINT msg;
- WPARAM wParam;
- LPARAM lParam;
-} MSGFILTER;
-typedef struct _paraformat {
- UINT cbSize;
- DWORD dwMask;
- WORD wNumbering;
- WORD wReserved;
- LONG dxStartIndent;
- LONG dxRightIndent;
- LONG dxOffset;
- WORD wAlignment;
- SHORT cTabCount;
- LONG rgxTabs[MAX_TAB_STOPS];
-} PARAFORMAT;
-typedef struct _paraformat2 {
- UINT cbSize;
- DWORD dwMask;
- WORD wNumbering;
- WORD wEffects;
- LONG dxStartIndent;
- LONG dxRightIndent;
- LONG dxOffset;
- WORD wAlignment;
- SHORT cTabCount;
- LONG rgxTabs[MAX_TAB_STOPS];
- LONG dySpaceBefore;
- LONG dySpaceAfter;
- LONG dyLineSpacing;
- SHORT sStype;
- BYTE bLineSpacingRule;
- BYTE bOutlineLevel;
- WORD wShadingWeight;
- WORD wShadingStyle;
- WORD wNumberingStart;
- WORD wNumberingStyle;
- WORD wNumberingTab;
- WORD wBorderSpace;
- WORD wBorderWidth;
- WORD wBorders;
-} PARAFORMAT2;
-typedef struct _selchange {
- NMHDR nmhdr;
- CHARRANGE chrg;
- WORD seltyp;
-} SELCHANGE;
-typedef struct _textrange {
- CHARRANGE chrg;
- LPSTR lpstrText;
-} TEXTRANGEA;
-typedef struct _textrangew {
- CHARRANGE chrg;
- LPWSTR lpstrText;
-} TEXTRANGEW;
-typedef struct _reqresize {
- NMHDR nmhdr;
- RECT rc;
-} REQRESIZE;
-typedef struct _repastespecial {
- DWORD dwAspect;
- DWORD dwParam;
-} REPASTESPECIAL;
-typedef struct _punctuation {
- UINT iSize;
- LPSTR szPunctuation;
-} PUNCTUATION;
-typedef struct _gettextex {
- DWORD cb;
- DWORD flags;
- UINT codepage;
- LPCSTR lpDefaultChar;
- LPBOOL lpUsedDefChar;
-} GETTEXTEX;
-/* GETTEXTEX flags */
-#define GT_DEFAULT 0
-#define GT_USECRLF 1
-#define GT_SELECTION 2
-typedef struct _settextex {
- DWORD flags;
- UINT codepage;
-} SETTEXTEX;
-/* SETTEXTEX flags */
-#define ST_DEFAULT 0
-#define ST_KEEPUNDO 1
-#define ST_SELECTION 2
-typedef LONG (*EDITWORDBREAKPROCEX)(char*,LONG,BYTE,INT);
-/* Defines for EM_SETTYPOGRAPHYOPTIONS */
-#define TO_ADVANCEDTYPOGRAPHY 1
-#define TO_SIMPLELINEBREAK 2
-/* Defines for GETTEXTLENGTHEX */
-#define GTL_DEFAULT 0
-#define GTL_USECRLF 1
-#define GTL_PRECISE 2
-#define GTL_CLOSE 4
-#define GTL_NUMCHARS 8
-#define GTL_NUMBYTES 16
-typedef struct _gettextlengthex {
- DWORD flags;
- UINT codepage;
-} GETTEXTLENGTHEX;
-#ifdef UNICODE
-typedef CHARFORMATW CHARFORMAT;
-typedef CHARFORMAT2W CHARFORMAT2;
-typedef FINDTEXTW FINDTEXT;
-typedef FINDTEXTEXW FINDTEXTEX;
-typedef TEXTRANGEW TEXTRANGE;
-#else
-typedef CHARFORMATA CHARFORMAT;
-typedef CHARFORMAT2A CHARFORMAT2;
-typedef FINDTEXTA FINDTEXT;
-typedef FINDTEXTEXA FINDTEXTEX;
-typedef TEXTRANGEA TEXTRANGE;
-#endif
-#pragma pack(pop)
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/richole.h b/winsup/w32api/include/richole.h
deleted file mode 100644
index 48dc13a..0000000
--- a/winsup/w32api/include/richole.h
+++ /dev/null
@@ -1,107 +0,0 @@
-#ifndef _RICHOLE_H
-#define _RICHOLE_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#pragma pack(push,4)
-#define REO_GETOBJ_NO_INTERFACES 0
-#define REO_GETOBJ_POLEOBJ 1
-#define REO_GETOBJ_PSTG 2
-#define REO_GETOBJ_POLESITE 4
-#define REO_GETOBJ_ALL_INTERFACES 7
-#define REO_CP_SELECTION ((ULONG)-1)
-#define REO_IOB_SELECTION ((ULONG)-1)
-#define REO_IOB_USE_CP ((ULONG)-2)
-#define REO_NULL 0
-#define REO_READWRITEMASK 0x3FL
-#define REO_DONTNEEDPALETTE 32
-#define REO_BLANK 16
-#define REO_DYNAMICSIZE 8
-#define REO_INVERTEDSELECT 4
-#define REO_BELOWBASELINE 2
-#define REO_RESIZABLE 1
-#define REO_LINK 0x80000000
-#define REO_STATIC 0x40000000
-#define REO_SELECTED 0x08000000
-#define REO_OPEN 0x4000000
-#define REO_INPLACEACTIVE 0x2000000
-#define REO_HILITED 0x1000000
-#define REO_LINKAVAILABLE 0x800000
-#define REO_GETMETAFILE 0x400000
-#define RECO_PASTE 0
-#define RECO_DROP 1
-#define RECO_COPY 2
-#define RECO_CUT 3
-#define RECO_DRAG 4
-
-extern const GUID IID_IRichEditOle;
-extern const GUID IID_IRichEditOleCallback;
-#ifndef INITGUID
-typedef struct _reobject {
- DWORD cbStruct;
- LONG cp;
- CLSID clsid;
- LPOLEOBJECT poleobj;
- LPSTORAGE pstg;
- LPOLECLIENTSITE polesite;
- SIZEL sizel;
- DWORD dvaspect;
- DWORD dwFlags;
- DWORD dwUser;
-} REOBJECT;
-
-#define INTERFACE IRichEditOle
-DECLARE_INTERFACE_(IRichEditOle, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetClientSite)(THIS_ LPOLECLIENTSITE*) PURE;
- STDMETHOD_(LONG,GetObjectCount)(THIS) PURE;
- STDMETHOD_(LONG,GetLinkCount)(THIS) PURE;
- STDMETHOD(GetObject)(THIS_ LONG, REOBJECT*,DWORD) PURE;
- STDMETHOD(InsertObject)(THIS_ REOBJECT*) PURE;
- STDMETHOD(ConvertObject)(THIS_ LONG,REFCLSID,LPCSTR) PURE;
- STDMETHOD(ActivateAs)(THIS_ REFCLSID,REFCLSID) PURE;
- STDMETHOD(SetHostNames)(THIS_ LPCSTR,LPCSTR) PURE;
- STDMETHOD(SetLinkAvailable)(THIS_ LONG,BOOL) PURE;
- STDMETHOD(SetDvaspect)(THIS_ LONG,DWORD) PURE;
- STDMETHOD(HandsOffStorage)(THIS_ LONG) PURE;
- STDMETHOD(SaveCompleted)(THIS_ LONG,LPSTORAGE) PURE;
- STDMETHOD(InPlaceDeactivate)(THIS) PURE;
- STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
- STDMETHOD(GetClipboardData)(THIS_ CHARRANGE*,DWORD,LPDATAOBJECT*) PURE;
- STDMETHOD(ImportDataObject)(THIS_ LPDATAOBJECT,CLIPFORMAT,HGLOBAL) PURE;
-};
-#undef INTERFACE
-typedef IRichEditOle *LPRICHEDITOLE;
-
-#define INTERFACE IRichEditOleCallback
-DECLARE_INTERFACE_(IRichEditOleCallback, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetNewStorage)(THIS_ LPSTORAGE*) PURE;
- STDMETHOD(GetInPlaceContext)(THIS_ LPOLEINPLACEFRAME*,LPOLEINPLACEUIWINDOW*,LPOLEINPLACEFRAMEINFO) PURE;
- STDMETHOD(ShowContainerUI)(THIS_ BOOL) PURE;
- STDMETHOD(QueryInsertObject)(THIS_ LPCLSID,LPSTORAGE,LONG) PURE;
- STDMETHOD(DeleteObject)(THIS_ LPOLEOBJECT) PURE;
- STDMETHOD(QueryAcceptData) (THIS_ LPDATAOBJECT,CLIPFORMAT*,DWORD,BOOL,HGLOBAL) PURE;
- STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL) PURE;
- STDMETHOD(GetClipboardData) (THIS_ CHARRANGE*,DWORD,LPDATAOBJECT*) PURE;
- STDMETHOD(GetDragDropEffect) (THIS_ BOOL,DWORD,PDWORD) PURE;
- STDMETHOD(GetContextMenu) (THIS_ WORD,LPOLEOBJECT,CHARRANGE*,HMENU*) PURE;
-};
-#undef INTERFACE
-typedef IRichEditOleCallback FAR * LPRICHEDITOLECALLBACK;
-#endif
-#pragma pack(pop)
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/routprot.h b/winsup/w32api/include/routprot.h
deleted file mode 100644
index 54fe9ee..0000000
--- a/winsup/w32api/include/routprot.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- routprot.h - Routing and Remote Access Services
-
- This file is part of a free library for the Win32 API.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-*/
-#ifndef _ROUTPROT_H
-#define _ROUTPROT_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- Router Management MIB Reference - Transport and Protocol Constants */
-#define PROTO_IP_OTHER 0x00000001
-#define PROTO_IP_LOCAL 0x00000002
-#define PROTO_IP_NETMGMT 0x00000003
-#define PROTO_IP_ICMP 0x00000004
-#define PROTO_IP_EGP 0x00000005
-#define PROTO_IP_GGP 0x00000006
-#define PROTO_IP_HELLO 0x00000007
-#define PROTO_IP_RIP 0x00000008
-#define PROTO_IP_IS_IS 0x00000009
-#define PROTO_IP_ES_IS 0x0000000A
-#define PROTO_IP_CISCO 0x0000000B
-#define PROTO_IP_BBN 0x0000000C
-#define PROTO_IP_OSPF 0x0000000D
-#define PROTO_IP_BGP 0x0000000E
-#define PROTO_IP_BOOTP 0x0000270F
-#define PROTO_IP_NT_AUTOSTATIC 0x00002712
-#define PROTO_IP_NT_STATIC 0x00002716
-#define PROTO_IP_NT_STATIC_NON_DOD 0x00002717
-#define IPRTRMGR_PID 10000
-#define IPX_PROTOCOL_BASE 0x0001FFFF
-#define IPX_PROTOCOL_RIP 0x00020000
-#define IPX_PROTOCOL_SAP 0x00020001
-#define IPX_PROTOCOL_NLSP 0x00020002
-/*--- Router Management Reference - Router Management Structures */
-#if (_WIN32_WINNT >= 0x0500)
-typedef struct IP_ADAPTER_BINDING_INFO {
- ULONG AddressCount;
- DWORD RemoteAddress;
- ULONG Mtu;
- ULONGLONG Speed;
- IP_LOCAL_BINDING Address[];
-} IP_ADAPTER_BINDING_INFO,*PIP_ADAPTER_BINDING_INFO;
-typedef struct IP_LOCAL_BINDING {
- DWORD Address;
- DWORD Mask;
-} IP_LOCAL_BINDING,*PIP_LOCAL_BINDING;
-typedef struct IPX_ADAPTER_BINDING_INFO {
- ULONG AdapterIndex;
- UCHAR Network[4];
- UCHAR LocalNode[6];
- UCHAR RemoteNode[6];
- ULONG MaxPacketSize;
- ULONG LinkSpeed;
-} IPX_ADAPTER_BINDING_INFO,*PIPX_ADAPTER_BINDING_INFO;
-#endif /* (_WIN32_WINNT >= 0x0500) */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/rpc.h b/winsup/w32api/include/rpc.h
deleted file mode 100644
index 659d909..0000000
--- a/winsup/w32api/include/rpc.h
+++ /dev/null
@@ -1,65 +0,0 @@
-#ifndef RPC_NO_WINDOWS_H
-#include <windows.h>
-#endif
-
-#ifndef _RPC_H
-#define _RPC_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define __RPC_WIN32__
-#ifndef _WIN95
-#define __RPC_NT__
-#define RPC_UNICODE_SUPPORTED
-#endif
-
-#ifdef _RPCRT4_
-#define RPCRTAPI DECLSPEC_EXPORT
-#else
-#define RPCRTAPI DECLSPEC_IMPORT
-#endif
-
-#ifndef __MIDL_USER_DEFINED
-#define midl_user_allocate MIDL_user_allocate
-#define midl_user_free MIDL_user_free
-#define __MIDL_USER_DEFINED
-#endif
-#define RPC_UNICODE_SUPPORTED
-#define __RPC_FAR
-#define __RPC_API __stdcall
-#define __RPC_USER __stdcall
-#define __RPC_STUB __stdcall
-#define RPC_ENTRY __stdcall
-typedef void *I_RPC_HANDLE;
-typedef long RPC_STATUS;
-
-#include <rpcdce.h>
-#include <rpcnsi.h>
-#include <rpcnterr.h>
-
-#include <winerror.h>
-
-/* SEH is not supported */
-#if 0
-#include <excpt.h>
-#define RpcTryExcept __try {
-#define RpcExcept(x) } __except (x) {
-#define RpcEndExcept }
-#define RpcTryFinally __try {
-#define RpcFinally } __finally {
-#define RpcEndFinally }
-#define RpcExceptionCode() GetExceptionCode()
-#define RpcAbnormalTermination() AbnormalTermination()
-#endif /* 0 */
-
-RPC_STATUS RPC_ENTRY RpcImpersonateClient(RPC_BINDING_HANDLE);
-RPC_STATUS RPC_ENTRY RpcRevertToSelf(void);
-long RPC_ENTRY I_RpcMapWin32Status(RPC_STATUS);
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/rpcdce.h b/winsup/w32api/include/rpcdce.h
deleted file mode 100644
index edcdd39..0000000
--- a/winsup/w32api/include/rpcdce.h
+++ /dev/null
@@ -1,396 +0,0 @@
-#ifndef _RPCDCE_H
-#define _RPCDCE_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include <basetyps.h>
-
-#ifndef _NO_W32_PSEUDO_MODIFIERS
-#define IN
-#define OUT
-#ifndef OPTIONAL
-#define OPTIONAL
-#endif
-#endif
-
-#define uuid_t UUID
-#define rpc_binding_handle_t RPC_BINDING_HANDLE
-#define rpc_binding_vector_t RPC_BINDING_VECTOR
-#define uuid_vector_t UUID_VECTOR
-#define RPC_C_BINDING_INFINITE_TIMEOUT 10
-#define RPC_C_BINDING_MIN_TIMEOUT 0
-#define RPC_C_BINDING_DEFAULT_TIMEOUT 5
-#define RPC_C_BINDING_MAX_TIMEOUT 9
-#define RPC_C_CANCEL_INFINITE_TIMEOUT (-1)
-#define RPC_C_LISTEN_MAX_CALLS_DEFAULT 1234
-#define RPC_C_PROTSEQ_MAX_REQS_DEFAULT 10
-#define RPC_C_BIND_TO_ALL_NICS 1
-#define RPC_C_USE_INTERNET_PORT 1
-#define RPC_C_USE_INTRANET_PORT 2
-#define RPC_MGR_EPV void
-#define RPC_C_STATS_CALLS_IN 0
-#define RPC_C_STATS_CALLS_OUT 1
-#define RPC_C_STATS_PKTS_IN 2
-#define RPC_C_STATS_PKTS_OUT 3
-#define RPC_IF_AUTOLISTEN 0x0001
-#define RPC_IF_OLE 2
-#define RPC_C_MGMT_INQ_IF_IDS 0
-#define RPC_C_MGMT_INQ_PRINC_NAME 1
-#define RPC_C_MGMT_INQ_STATS 2
-#define RPC_C_MGMT_IS_SERVER_LISTEN 3
-#define RPC_C_MGMT_STOP_SERVER_LISTEN 4
-#define RPC_C_EP_ALL_ELTS 0
-#define RPC_C_EP_MATCH_BY_IF 1
-#define RPC_C_EP_MATCH_BY_OBJ 2
-#define RPC_C_EP_MATCH_BY_BOTH 3
-#define RPC_C_VERS_ALL 1
-#define RPC_C_VERS_COMPATIBLE 2
-#define RPC_C_VERS_EXACT 3
-#define RPC_C_VERS_MAJOR_ONLY 4
-#define RPC_C_VERS_UPTO 5
-#define DCE_C_ERROR_STRING_LEN 256
-#define RPC_C_PARM_MAX_PACKET_LENGTH 1
-#define RPC_C_PARM_BUFFER_LENGTH 2
-#define RPC_C_AUTHN_LEVEL_DEFAULT 0
-#define RPC_C_AUTHN_LEVEL_NONE 1
-#define RPC_C_AUTHN_LEVEL_CONNECT 2
-#define RPC_C_AUTHN_LEVEL_CALL 3
-#define RPC_C_AUTHN_LEVEL_PKT 4
-#define RPC_C_AUTHN_LEVEL_PKT_INTEGRITY 5
-#define RPC_C_AUTHN_LEVEL_PKT_PRIVACY 6
-#define RPC_C_IMP_LEVEL_ANONYMOUS 1
-#define RPC_C_IMP_LEVEL_IDENTIFY 2
-#define RPC_C_IMP_LEVEL_IMPERSONATE 3
-#define RPC_C_IMP_LEVEL_DELEGATE 4
-#define RPC_C_QOS_IDENTITY_STATIC 0
-#define RPC_C_QOS_IDENTITY_DYNAMIC 1
-#define RPC_C_QOS_CAPABILITIES_DEFAULT 0
-#define RPC_C_QOS_CAPABILITIES_MUTUAL_AUTH 1
-#define RPC_C_PROTECT_LEVEL_DEFAULT(RPC_C_AUTHN_LEVEL_DEFAULT)
-#define RPC_C_PROTECT_LEVEL_NONE(RPC_C_AUTHN_LEVEL_NONE)
-#define RPC_C_PROTECT_LEVEL_CONNECT(RPC_C_AUTHN_LEVEL_CONNECT)
-#define RPC_C_PROTECT_LEVEL_CALL(RPC_C_AUTHN_LEVEL_CALL)
-#define RPC_C_PROTECT_LEVEL_PKT(RPC_C_AUTHN_LEVEL_PKT)
-#define RPC_C_PROTECT_LEVEL_PKT_INTEGRITY(RPC_C_AUTHN_LEVEL_PKT_INTEGRITY)
-#define RPC_C_PROTECT_LEVEL_PKT_PRIVACY(RPC_C_AUTHN_LEVEL_PKT_PRIVACY)
-#define RPC_C_AUTHN_NONE 0
-#define RPC_C_AUTHN_DCE_PRIVATE 1
-#define RPC_C_AUTHN_DCE_PUBLIC 2
-#define RPC_C_AUTHN_DEC_PUBLIC 4
-#define RPC_C_AUTHN_WINNT 10
-#define RPC_C_AUTHN_DEFAULT 0xFFFFFFFF
-#define RPC_C_SECURITY_QOS_VERSION L
-#define SEC_WINNT_AUTH_IDENTITY_ANSI 0x1
-#define SEC_WINNT_AUTH_IDENTITY_UNICODE 0x2
-#define RPC_C_AUTHZ_NONE 0
-#define RPC_C_AUTHZ_NAME 1
-#define RPC_C_AUTHZ_DCE 2
-#define RPC_C_AUTHZ_DEFAULT 0xFFFFFFFF
-
-typedef I_RPC_HANDLE RPC_BINDING_HANDLE;
-typedef RPC_BINDING_HANDLE handle_t;
-typedef struct _RPC_BINDING_VECTOR {
- unsigned long Count;
- RPC_BINDING_HANDLE BindingH[1];
-} RPC_BINDING_VECTOR;
-typedef struct _UUID_VECTOR {
- unsigned long Count;
- UUID *Uuid[1];
-} UUID_VECTOR;
-typedef void *RPC_IF_HANDLE;
-typedef struct _RPC_IF_ID {
- UUID Uuid;
- unsigned short VersMajor;
- unsigned short VersMinor;
-} RPC_IF_ID;
-typedef struct _RPC_POLICY {
- unsigned int Length ;
- unsigned long EndpointFlags ;
- unsigned long NICFlags ;
-} RPC_POLICY,*PRPC_POLICY ;
-typedef void __RPC_USER RPC_OBJECT_INQ_FN(UUID*,UUID*,RPC_STATUS*);
-typedef RPC_STATUS RPC_IF_CALLBACK_FN(RPC_IF_HANDLE,void*);
-typedef struct {
- unsigned int Count;
- unsigned long Stats[1];
-} RPC_STATS_VECTOR;
-typedef struct {
- unsigned long Count;
- RPC_IF_ID*IfId[1];
-} RPC_IF_ID_VECTOR;
-typedef void *RPC_AUTH_IDENTITY_HANDLE;
-typedef void *RPC_AUTHZ_HANDLE;
-typedef struct _RPC_SECURITY_QOS {
- unsigned long Version;
- unsigned long Capabilities;
- unsigned long IdentityTracking;
- unsigned long ImpersonationType;
-} RPC_SECURITY_QOS,*PRPC_SECURITY_QOS;
-typedef struct _SEC_WINNT_AUTH_IDENTITY_W {
- unsigned short *User;
- unsigned long UserLength;
- unsigned short *Domain;
- unsigned long DomainLength;
- unsigned short *Password;
- unsigned long PasswordLength;
- unsigned long Flags;
-} SEC_WINNT_AUTH_IDENTITY_W,*PSEC_WINNT_AUTH_IDENTITY_W;
-typedef struct _SEC_WINNT_AUTH_IDENTITY_A {
- unsigned char *User;
- unsigned long UserLength;
- unsigned char *Domain;
- unsigned long DomainLength;
- unsigned char *Password;
- unsigned long PasswordLength;
- unsigned long Flags;
-} SEC_WINNT_AUTH_IDENTITY_A,*PSEC_WINNT_AUTH_IDENTITY_A;
-typedef struct {
- unsigned char *UserName;
- unsigned char *ComputerName;
- unsigned short Privilege;
- unsigned long AuthFlags;
-} RPC_CLIENT_INFORMATION1,* PRPC_CLIENT_INFORMATION1;
-typedef I_RPC_HANDLE *RPC_EP_INQ_HANDLE;
-typedef int(__RPC_API *RPC_MGMT_AUTHORIZATION_FN)(RPC_BINDING_HANDLE,unsigned long,RPC_STATUS*);
-
-#ifdef RPC_UNICODE_SUPPORTED
-typedef struct _RPC_PROTSEQ_VECTORA {
- unsigned int Count;
- unsigned char*Protseq[1];
-} RPC_PROTSEQ_VECTORA;
-typedef struct _RPC_PROTSEQ_VECTORW {
- unsigned int Count;
- unsigned short*Protseq[1];
-} RPC_PROTSEQ_VECTORW;
-RPC_STATUS RPC_ENTRY RpcBindingFromStringBindingA(unsigned char *,RPC_BINDING_HANDLE *);
-RPC_STATUS RPC_ENTRY RpcBindingFromStringBindingW(unsigned short *,RPC_BINDING_HANDLE *);
-RPC_STATUS RPC_ENTRY RpcBindingToStringBindingA(RPC_BINDING_HANDLE,unsigned char**);
-RPC_STATUS RPC_ENTRY RpcBindingToStringBindingW(RPC_BINDING_HANDLE,unsigned short**);
-RPC_STATUS RPC_ENTRY RpcStringBindingComposeA(unsigned char *,unsigned char *,unsigned char *,unsigned char *,unsigned char *,unsigned char **);
-RPC_STATUS RPC_ENTRY RpcStringBindingComposeW(unsigned short *,unsigned short *,unsigned short *,unsigned short *,unsigned short *,unsigned short **);
-RPC_STATUS RPC_ENTRY RpcStringBindingParseA(unsigned char *,unsigned char **,unsigned char **,unsigned char **,unsigned char **,unsigned char **);
-RPC_STATUS RPC_ENTRY RpcStringBindingParseW(unsigned short *,unsigned short **,unsigned short **,unsigned short **,unsigned short **,unsigned short **);
-RPC_STATUS RPC_ENTRY RpcStringFreeA(unsigned char**);
-RPC_STATUS RPC_ENTRY RpcStringFreeW(unsigned short**);
-RPC_STATUS RPC_ENTRY RpcNetworkIsProtseqValidA(unsigned char*);
-RPC_STATUS RPC_ENTRY RpcNetworkIsProtseqValidW(unsigned short*);
-RPC_STATUS RPC_ENTRY RpcNetworkInqProtseqsA(RPC_PROTSEQ_VECTORA**);
-RPC_STATUS RPC_ENTRY RpcNetworkInqProtseqsW(RPC_PROTSEQ_VECTORW**);
-RPC_STATUS RPC_ENTRY RpcProtseqVectorFreeA(RPC_PROTSEQ_VECTORA**);
-RPC_STATUS RPC_ENTRY RpcProtseqVectorFreeW(RPC_PROTSEQ_VECTORW**);
-RPC_STATUS RPC_ENTRY RpcServerUseProtseqA(unsigned char*,unsigned int,void*);
-RPC_STATUS RPC_ENTRY RpcServerUseProtseqW(unsigned short*,unsigned int,void*);
-RPC_STATUS RPC_ENTRY RpcServerUseProtseqExA(unsigned char*,unsigned int MaxCalls,void*,PRPC_POLICY);
-RPC_STATUS RPC_ENTRY RpcServerUseProtseqExW(unsigned short*,unsigned int,void*,PRPC_POLICY);
-RPC_STATUS RPC_ENTRY RpcServerUseProtseqEpA(unsigned char*,unsigned int,unsigned char*,void*);
-RPC_STATUS RPC_ENTRY RpcServerUseProtseqEpExA(unsigned char*,unsigned int,unsigned char*,void*,PRPC_POLICY);
-RPC_STATUS RPC_ENTRY RpcServerUseProtseqEpW(unsigned short*,unsigned int,unsigned short*,void*);
-RPC_STATUS RPC_ENTRY RpcServerUseProtseqEpExW(unsigned short*,unsigned int,unsigned short*,void*,PRPC_POLICY);
-RPC_STATUS RPC_ENTRY RpcServerUseProtseqIfA(unsigned char*,unsigned int,RPC_IF_HANDLE,void*);
-RPC_STATUS RPC_ENTRY RpcServerUseProtseqIfExA(unsigned char*,unsigned int,RPC_IF_HANDLE,void*,PRPC_POLICY);
-RPC_STATUS RPC_ENTRY RpcServerUseProtseqIfW(unsigned short*,unsigned int,RPC_IF_HANDLE,void*);
-RPC_STATUS RPC_ENTRY RpcServerUseProtseqIfExW(unsigned short*,unsigned int,RPC_IF_HANDLE,void*,PRPC_POLICY);
-RPC_STATUS RPC_ENTRY RpcMgmtInqServerPrincNameA(RPC_BINDING_HANDLE,unsigned long,unsigned char**);
-RPC_STATUS RPC_ENTRY RpcMgmtInqServerPrincNameW(RPC_BINDING_HANDLE,unsigned long,unsigned short**);
-RPC_STATUS RPC_ENTRY RpcServerInqDefaultPrincNameA(unsigned long,unsigned char**);
-RPC_STATUS RPC_ENTRY RpcServerInqDefaultPrincNameW(unsigned long,unsigned short**);
-RPC_STATUS RPC_ENTRY RpcNsBindingInqEntryNameA(RPC_BINDING_HANDLE,unsigned long,unsigned char**);
-RPC_STATUS RPC_ENTRY RpcNsBindingInqEntryNameW(RPC_BINDING_HANDLE,unsigned long,unsigned short**);
-RPC_STATUS RPC_ENTRY RpcBindingInqAuthClientA(RPC_BINDING_HANDLE,RPC_AUTHZ_HANDLE *,unsigned char**,unsigned long*,unsigned long*,unsigned long*);
-RPC_STATUS RPC_ENTRY RpcBindingInqAuthClientW(RPC_BINDING_HANDLE,RPC_AUTHZ_HANDLE *,unsigned short**,unsigned long*,unsigned long*,unsigned long*);
-RPC_STATUS RPC_ENTRY RpcBindingInqAuthInfoA(RPC_BINDING_HANDLE,unsigned char**,unsigned long*,unsigned long*,RPC_AUTH_IDENTITY_HANDLE*,unsigned long*);
-RPC_STATUS RPC_ENTRY RpcBindingInqAuthInfoW(RPC_BINDING_HANDLE,unsigned short**,unsigned long*,unsigned long*,RPC_AUTH_IDENTITY_HANDLE*,unsigned long*);
-RPC_STATUS RPC_ENTRY RpcBindingSetAuthInfoA(RPC_BINDING_HANDLE,unsigned char*,unsigned long,unsigned long,RPC_AUTH_IDENTITY_HANDLE,unsigned long);
-RPC_STATUS RPC_ENTRY RpcBindingSetAuthInfoExA(RPC_BINDING_HANDLE,unsigned char*,unsigned long,unsigned long,RPC_AUTH_IDENTITY_HANDLE,unsigned long,RPC_SECURITY_QOS*);
-RPC_STATUS RPC_ENTRY RpcBindingSetAuthInfoW(RPC_BINDING_HANDLE,unsigned short*,unsigned long,unsigned long,RPC_AUTH_IDENTITY_HANDLE,unsigned long);
-RPC_STATUS RPC_ENTRY RpcBindingSetAuthInfoExW(RPC_BINDING_HANDLE,unsigned short*,unsigned long,unsigned long,RPC_AUTH_IDENTITY_HANDLE,unsigned long,RPC_SECURITY_QOS*);
-RPC_STATUS RPC_ENTRY RpcBindingInqAuthInfoExA(RPC_BINDING_HANDLE,unsigned char**,unsigned long*,unsigned long*,RPC_AUTH_IDENTITY_HANDLE*,unsigned long*,unsigned long,RPC_SECURITY_QOS*);
-RPC_STATUS RPC_ENTRY RpcBindingInqAuthInfoExW(RPC_BINDING_HANDLE,unsigned short ** , unsigned long *, unsigned long *, RPC_AUTH_IDENTITY_HANDLE *, unsigned long *, unsigned long , RPC_SECURITY_QOS *);
-typedef void(__RPC_USER *RPC_AUTH_KEY_RETRIEVAL_FN)(void*,unsigned short*,unsigned long,void**,RPC_STATUS*);
-RPC_STATUS RPC_ENTRY RpcServerRegisterAuthInfoA(unsigned char*,unsigned long,RPC_AUTH_KEY_RETRIEVAL_FN,void*);
-RPC_STATUS RPC_ENTRY RpcServerRegisterAuthInfoW(unsigned short*,unsigned long,RPC_AUTH_KEY_RETRIEVAL_FN,void*);
-RPC_STATUS RPC_ENTRY UuidToStringA(UUID*,unsigned char**);
-RPC_STATUS RPC_ENTRY UuidFromStringA(unsigned char*,UUID*);
-RPC_STATUS RPC_ENTRY UuidToStringW(UUID*,unsigned short**);
-RPC_STATUS RPC_ENTRY UuidFromStringW(unsigned short*,UUID*);
-RPC_STATUS RPC_ENTRY RpcEpRegisterNoReplaceA(RPC_IF_HANDLE,RPC_BINDING_VECTOR*,UUID_VECTOR*,unsigned char*);
-RPC_STATUS RPC_ENTRY RpcEpRegisterNoReplaceW(RPC_IF_HANDLE,RPC_BINDING_VECTOR*, UUID_VECTOR*,unsigned short*);
-RPC_STATUS RPC_ENTRY RpcEpRegisterA(RPC_IF_HANDLE,RPC_BINDING_VECTOR*,UUID_VECTOR*,unsigned char*);
-RPC_STATUS RPC_ENTRY RpcEpRegisterW(RPC_IF_HANDLE,RPC_BINDING_VECTOR*,UUID_VECTOR*,unsigned short*);
-RPC_STATUS RPC_ENTRY DceErrorInqTextA(RPC_STATUS,unsigned char*);
-RPC_STATUS RPC_ENTRY DceErrorInqTextW(RPC_STATUS,unsigned short*);
-RPC_STATUS RPC_ENTRY RpcMgmtEpEltInqNextA(RPC_EP_INQ_HANDLE,RPC_IF_ID*,RPC_BINDING_HANDLE*,UUID*,unsigned char**);
-RPC_STATUS RPC_ENTRY RpcMgmtEpEltInqNextW(RPC_EP_INQ_HANDLE,RPC_IF_ID*,RPC_BINDING_HANDLE*,UUID*,unsigned short**);
-#ifdef UNICODE
-#define RPC_PROTSEQ_VECTOR RPC_PROTSEQ_VECTORW
-#define SEC_WINNT_AUTH_IDENTITY SEC_WINNT_AUTH_IDENTITY_W
-#define PSEC_WINNT_AUTH_IDENTITY PSEC_WINNT_AUTH_IDENTITY_W
-#define _SEC_WINNT_AUTH_IDENTITY _SEC_WINNT_AUTH_IDENTITY_W
-#define RpcMgmtEpEltInqNext RpcMgmtEpEltInqNextW
-#define RpcBindingFromStringBinding RpcBindingFromStringBindingW
-#define RpcBindingToStringBinding RpcBindingToStringBindingW
-#define RpcStringBindingCompose RpcStringBindingComposeW
-#define RpcStringBindingParse RpcStringBindingParseW
-#define RpcStringFree RpcStringFreeW
-#define RpcNetworkIsProtseqValid RpcNetworkIsProtseqValidW
-#define RpcNetworkInqProtseqs RpcNetworkInqProtseqsW
-#define RpcProtseqVectorFree RpcProtseqVectorFreeW
-#define RpcServerUseProtseq RpcServerUseProtseqW
-#define RpcServerUseProtseqEx RpcServerUseProtseqExW
-#define RpcServerUseProtseqEp RpcServerUseProtseqEpW
-#define RpcServerUseProtseqEpEx RpcServerUseProtseqEpExW
-#define RpcServerUseProtseqIf RpcServerUseProtseqIfW
-#define RpcServerUseProtseqIfEx RpcServerUseProtseqIfExW
-#define RpcMgmtInqServerPrincName RpcMgmtInqServerPrincNameW
-#define RpcServerInqDefaultPrincName RpcServerInqDefaultPrincNameW
-#define RpcNsBindingInqEntryName RpcNsBindingInqEntryNameW
-#define RpcBindingInqAuthClient RpcBindingInqAuthClientW
-#define RpcBindingInqAuthInfo RpcBindingInqAuthInfoW
-#define RpcBindingSetAuthInfo RpcBindingSetAuthInfoW
-#define RpcServerRegisterAuthInfo RpcServerRegisterAuthInfoW
-#define RpcBindingInqAuthInfoEx RpcBindingInqAuthInfoExW
-#define RpcBindingSetAuthInfoEx RpcBindingSetAuthInfoExW
-#define UuidFromString UuidFromStringW
-#define UuidToString UuidToStringW
-#define RpcEpRegisterNoReplace RpcEpRegisterNoReplaceW
-#define RpcEpRegister RpcEpRegisterW
-#define DceErrorInqText DceErrorInqTextW
-#else /* UNICODE */
-#define RPC_PROTSEQ_VECTOR RPC_PROTSEQ_VECTORA
-#define SEC_WINNT_AUTH_IDENTITY SEC_WINNT_AUTH_IDENTITY_A
-#define PSEC_WINNT_AUTH_IDENTITY PSEC_WINNT_AUTH_IDENTITY_A
-#define _SEC_WINNT_AUTH_IDENTITY _SEC_WINNT_AUTH_IDENTITY_A
-#define RpcMgmtEpEltInqNext RpcMgmtEpEltInqNextA
-#define RpcBindingFromStringBinding RpcBindingFromStringBindingA
-#define RpcBindingToStringBinding RpcBindingToStringBindingA
-#define RpcStringBindingCompose RpcStringBindingComposeA
-#define RpcStringBindingParse RpcStringBindingParseA
-#define RpcStringFree RpcStringFreeA
-#define RpcNetworkIsProtseqValid RpcNetworkIsProtseqValidA
-#define RpcNetworkInqProtseqs RpcNetworkInqProtseqsA
-#define RpcProtseqVectorFree RpcProtseqVectorFreeA
-#define RpcServerUseProtseq RpcServerUseProtseqA
-#define RpcServerUseProtseqEx RpcServerUseProtseqExA
-#define RpcServerUseProtseqEp RpcServerUseProtseqEpA
-#define RpcServerUseProtseqEpEx RpcServerUseProtseqEpExA
-#define RpcServerUseProtseqIf RpcServerUseProtseqIfA
-#define RpcServerUseProtseqIfEx RpcServerUseProtseqIfExA
-#define RpcMgmtInqServerPrincName RpcMgmtInqServerPrincNameA
-#define RpcServerInqDefaultPrincName RpcServerInqDefaultPrincNameA
-#define RpcNsBindingInqEntryName RpcNsBindingInqEntryNameA
-#define RpcBindingInqAuthClient RpcBindingInqAuthClientA
-#define RpcBindingInqAuthInfo RpcBindingInqAuthInfoA
-#define RpcBindingSetAuthInfo RpcBindingSetAuthInfoA
-#define RpcServerRegisterAuthInfo RpcServerRegisterAuthInfoA
-#define RpcBindingInqAuthInfoEx RpcBindingInqAuthInfoExA
-#define RpcBindingSetAuthInfoEx RpcBindingSetAuthInfoExA
-#define UuidFromString UuidFromStringA
-#define UuidToString UuidToStringA
-#define RpcEpRegisterNoReplace RpcEpRegisterNoReplaceA
-#define RpcEpRegister RpcEpRegisterA
-#define DceErrorInqText DceErrorInqTextA
-#endif /* UNICODE */
-#else /* RPC_UNICODE_SUPPORTED */
-typedef struct _RPC_PROTSEQ_VECTOR {
- unsigned int Count;
- unsigned char* Protseq[1];
-} RPC_PROTSEQ_VECTOR;
-RPC_STATUS RPC_ENTRY RpcBindingFromStringBinding(unsigned char *,RPC_BINDING_HANDLE *);
-RPC_STATUS RPC_ENTRY RpcBindingToStringBinding(RPC_BINDING_HANDLE,unsigned char **);
-RPC_STATUS RPC_ENTRY RpcStringBindingCompose(unsigned char *,unsigned char *,unsigned char *,unsigned char *,unsigned char *,unsigned char **);
-RPC_STATUS RPC_ENTRY RpcStringBindingParse(unsigned char *,unsigned char **,unsigned char **,unsigned char **,unsigned char **,unsigned char **);
-RPC_STATUS RPC_ENTRY RpcStringFree(unsigned char**);
-RPC_STATUS RPC_ENTRY RpcNetworkIsProtseqValid(unsigned char*);
-RPC_STATUS RPC_ENTRY RpcNetworkInqProtseqs(RPC_PROTSEQ_VECTOR **);
-RPC_STATUS RPC_ENTRY RpcServerInqBindings(RPC_BINDING_VECTOR **);
-RPC_STATUS RPC_ENTRY RpcServerUseProtseq(unsigned char*,unsigned int,void*);
-RPC_STATUS RPC_ENTRY RpcServerUseProtseqEx(unsigned char*,unsigned int,void*,PRPC_POLICY);
-RPC_STATUS RPC_ENTRY RpcServerUseProtseqEp(unsigned char*,unsigned int,unsigned char*,void*);
-RPC_STATUS RPC_ENTRY RpcServerUseProtseqEpEx(unsigned char*,unsigned int,unsigned char*,void*,PRPC_POLICY);
-RPC_STATUS RPC_ENTRY RpcServerUseProtseqIf(unsigned char*,unsigned int,RPC_IF_HANDLE,void*);
-RPC_STATUS RPC_ENTRY RpcServerUseProtseqIfEx(unsigned char*,unsigned int,RPC_IF_HANDLE,void*,PRPC_POLICY);
-RPC_STATUS RPC_ENTRY RpcMgmtInqServerPrincName(RPC_BINDING_HANDLE,unsigned long,unsigned char**);
-RPC_STATUS RPC_ENTRY RpcServerInqDefaultPrincName(unsigned long,unsigned char**);
-RPC_STATUS RPC_ENTRY RpcNsBindingInqEntryName(RPC_BINDING_HANDLE,unsigned long,unsigned char**);
-RPC_STATUS RPC_ENTRY RpcBindingInqAuthClient(RPC_BINDING_HANDLE,RPC_AUTHZ_HANDLE*,unsigned char**,unsigned long*,unsigned long*,unsigned long*);
-RPC_STATUS RPC_ENTRY RpcBindingInqAuthInfo(RPC_BINDING_HANDLE,unsigned char **,unsigned long *,unsigned long *,RPC_AUTH_IDENTITY_HANDLE *,unsigned long *);
-RPC_STATUS RPC_ENTRY RpcBindingSetAuthInfo(RPC_BINDING_HANDLE,unsigned char *,unsigned long,unsigned long,RPC_AUTH_IDENTITY_HANDLE,unsigned long);
-typedef void(__RPC_USER *RPC_AUTH_KEY_RETRIEVAL_FN)(void*,unsigned char*,unsigned long,void**,RPC_STATUS*);
-RPC_STATUS RPC_ENTRY RpcServerRegisterAuthInfo(unsigned char*,unsigned long,RPC_AUTH_KEY_RETRIEVAL_FN,void*);
-RPC_STATUS RPC_ENTRY UuidToString(UUID*,unsigned char**);
-RPC_STATUS RPC_ENTRY UuidFromString(unsigned char*,UUID*);
-RPC_STATUS RPC_ENTRY RpcEpRegisterNoReplace(RPC_IF_HANDLE,RPC_BINDING_VECTOR*,UUID_VECTOR*,unsigned char*);
-RPC_STATUS RPC_ENTRY RpcEpRegister(RPC_IF_HANDLE,RPC_BINDING_VECTOR*,UUID_VECTOR*,unsigned char*);
-RPC_STATUS RPC_ENTRY DceErrorInqText(RPC_STATUS,unsigned char*);
-RPC_STATUS RPC_ENTRY RpcMgmtEpEltInqNext(RPC_EP_INQ_HANDLE,RPC_IF_ID *,RPC_BINDING_HANDLE *,unsigned char **);
-#endif /* RPC_UNICODE_SUPPORTED */
-
-RPC_STATUS RPC_ENTRY RpcBindingCopy(RPC_BINDING_HANDLE,RPC_BINDING_HANDLE*);
-RPC_STATUS RPC_ENTRY RpcBindingFree(RPC_BINDING_HANDLE*);
-RPC_STATUS RPC_ENTRY RpcBindingInqObject(RPC_BINDING_HANDLE,UUID *);
-RPC_STATUS RPC_ENTRY RpcBindingReset(RPC_BINDING_HANDLE);
-RPC_STATUS RPC_ENTRY RpcBindingSetObject(RPC_BINDING_HANDLE,UUID *);
-RPC_STATUS RPC_ENTRY RpcMgmtInqDefaultProtectLevel(unsigned long,unsigned long *);
-RPC_STATUS RPC_ENTRY RpcBindingVectorFree(RPC_BINDING_VECTOR **);
-RPC_STATUS RPC_ENTRY RpcIfInqId(RPC_IF_HANDLE,RPC_IF_ID *);
-RPC_STATUS RPC_ENTRY RpcMgmtInqComTimeout(RPC_BINDING_HANDLE,unsigned int*);
-RPC_STATUS RPC_ENTRY RpcMgmtSetComTimeout(RPC_BINDING_HANDLE,unsigned int);
-RPC_STATUS RPC_ENTRY RpcMgmtSetCancelTimeout(long Timeout);
-RPC_STATUS RPC_ENTRY RpcObjectInqType(UUID *,UUID *);
-RPC_STATUS RPC_ENTRY RpcObjectSetInqFn(RPC_OBJECT_INQ_FN *);
-RPC_STATUS RPC_ENTRY RpcObjectSetType(UUID *,UUID *);
-RPC_STATUS RPC_ENTRY RpcProtseqVectorFree(RPC_PROTSEQ_VECTOR **);
-RPC_STATUS RPC_ENTRY RpcServerInqIf(RPC_IF_HANDLE,UUID*,RPC_MGR_EPV**);
-RPC_STATUS RPC_ENTRY RpcServerListen(unsigned int,unsigned int,unsigned int);
-RPC_STATUS RPC_ENTRY RpcServerRegisterIf(RPC_IF_HANDLE,UUID*,RPC_MGR_EPV*);
-RPC_STATUS RPC_ENTRY RpcServerRegisterIfEx(RPC_IF_HANDLE,UUID*,RPC_MGR_EPV*,unsigned int,unsigned int,RPC_IF_CALLBACK_FN*);
-RPC_STATUS RPC_ENTRY RpcServerRegisterIf2(RPC_IF_HANDLE,UUID*,RPC_MGR_EPV*,unsigned int,unsigned int,unsigned int,RPC_IF_CALLBACK_FN*);
-RPC_STATUS RPC_ENTRY RpcServerUnregisterIf(RPC_IF_HANDLE,UUID*,unsigned int);
-RPC_STATUS RPC_ENTRY RpcServerUseAllProtseqs(unsigned int,void*);
-RPC_STATUS RPC_ENTRY RpcServerUseAllProtseqsEx(unsigned int,void*,PRPC_POLICY);
-RPC_STATUS RPC_ENTRY RpcServerUseAllProtseqsIf(unsigned int,RPC_IF_HANDLE,void*);
-RPC_STATUS RPC_ENTRY RpcServerUseAllProtseqsIfEx(unsigned int,RPC_IF_HANDLE,void*,PRPC_POLICY);
-RPC_STATUS RPC_ENTRY RpcMgmtStatsVectorFree(RPC_STATS_VECTOR**);
-RPC_STATUS RPC_ENTRY RpcMgmtInqStats(RPC_BINDING_HANDLE,RPC_STATS_VECTOR**);
-RPC_STATUS RPC_ENTRY RpcMgmtIsServerListening(RPC_BINDING_HANDLE);
-RPC_STATUS RPC_ENTRY RpcMgmtStopServerListening(RPC_BINDING_HANDLE);
-RPC_STATUS RPC_ENTRY RpcMgmtWaitServerListen(void);
-RPC_STATUS RPC_ENTRY RpcMgmtSetServerStackSize(unsigned long);
-void RPC_ENTRY RpcSsDontSerializeContext(void);
-RPC_STATUS RPC_ENTRY RpcMgmtEnableIdleCleanup(void);
-RPC_STATUS RPC_ENTRY RpcMgmtInqIfIds(RPC_BINDING_HANDLE,RPC_IF_ID_VECTOR**);
-RPC_STATUS RPC_ENTRY RpcIfIdVectorFree(RPC_IF_ID_VECTOR**);
-RPC_STATUS RPC_ENTRY RpcEpResolveBinding(RPC_BINDING_HANDLE,RPC_IF_HANDLE);
-RPC_STATUS RPC_ENTRY RpcBindingServerFromClient(RPC_BINDING_HANDLE,RPC_BINDING_HANDLE*);
-DECLSPEC_NORETURN void RPC_ENTRY RpcRaiseException(RPC_STATUS);
-RPC_STATUS RPC_ENTRY RpcTestCancel(void);
-RPC_STATUS RPC_ENTRY RpcCancelThread(void*);
-RPC_STATUS RPC_ENTRY UuidCreate(UUID*);
-signed int RPC_ENTRY UuidCompare(UUID*,UUID*, RPC_STATUS*);
-RPC_STATUS RPC_ENTRY UuidCreateNil(UUID*);
-int RPC_ENTRY UuidEqual(UUID*,UUID*, RPC_STATUS*);
-unsigned short RPC_ENTRY UuidHash(UUID*,RPC_STATUS*);
-int RPC_ENTRY UuidIsNil(UUID*,RPC_STATUS*);
-RPC_STATUS RPC_ENTRY RpcEpUnregister(RPC_IF_HANDLE,RPC_BINDING_VECTOR*,UUID_VECTOR*);
-RPC_STATUS RPC_ENTRY RpcMgmtEpEltInqBegin(RPC_BINDING_HANDLE,unsigned long,RPC_IF_ID*,unsigned long,UUID*,RPC_EP_INQ_HANDLE*);
-RPC_STATUS RPC_ENTRY RpcMgmtEpEltInqDone(RPC_EP_INQ_HANDLE*);
-RPC_STATUS RPC_ENTRY RpcMgmtEpUnregister(RPC_BINDING_HANDLE,RPC_IF_ID*,RPC_BINDING_HANDLE,UUID*);
-RPC_STATUS RPC_ENTRY RpcMgmtSetAuthorizationFn(RPC_MGMT_AUTHORIZATION_FN);
-RPC_STATUS RPC_ENTRY RpcMgmtInqParameter(unsigned int,unsigned long*);
-RPC_STATUS RPC_ENTRY RpcMgmtSetParameter(unsigned int,unsigned long);
-RPC_STATUS RPC_ENTRY RpcMgmtBindingInqParameter(RPC_BINDING_HANDLE,unsigned int,unsigned long*);
-RPC_STATUS RPC_ENTRY RpcMgmtBindingSetParameter(RPC_BINDING_HANDLE,unsigned int,unsigned long);
-
-#if _WIN32_WINNT >= 0x0500
-RPC_STATUS RPC_ENTRY UuidCreateSequential(UUID*);
-#endif
-
-#include <rpcdcep.h>
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/rpcdce2.h b/winsup/w32api/include/rpcdce2.h
deleted file mode 100644
index 4d065f1..0000000
--- a/winsup/w32api/include/rpcdce2.h
+++ /dev/null
@@ -1,56 +0,0 @@
-#ifndef _RPCDCE2_H
-#define _RPCDCE2_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include <rpcdce.h>
-
-#define RPC_C_EP_ALL_ELTS 0
-#define RPC_C_EP_MATCH_BY_IF 1
-#define RPC_C_EP_MATCH_BY_OBJ 2
-#define RPC_C_EP_MATCH_BY_BOTH 3
-#define RPC_C_VERS_ALL 1
-#define RPC_C_VERS_COMPATIBLE 2
-#define RPC_C_VERS_EXACT 3
-#define RPC_C_VERS_MAJOR_ONLY 4
-#define RPC_C_VERS_UPTO 5
-#define DCE_C_ERROR_STRING_LEN 256
-#define RPC_C_MGMT_INQ_IF_IDS 0
-#define RPC_C_MGMT_INQ_PRINC_NAME 1
-#define RPC_C_MGMT_INQ_STATS 2
-#define RPC_C_MGMT_IS_SERVER_LISTEN 3
-#define RPC_C_MGMT_STOP_SERVER_LISTEN 4
-
-int RPC_ENTRY UuidCompare(UUID*,UUID*,RPC_STATUS*);
-RPC_STATUS RPC_ENTRY UuidCreateNil(UUID*);
-int RPC_ENTRY UuidEqual(UUID*,UUID*,RPC_STATUS*);
-unsigned short RPC_ENTRY UuidHash(UUID*,RPC_STATUS*);
-int RPC_ENTRY UuidIsNil(UUID*,RPC_STATUS*);
-#ifdef RPC_UNICODE_SUPPORTED
-RPC_STATUS RPC_ENTRY DceErrorInqTextA(RPC_STATUS,unsigned char*);
-RPC_STATUS RPC_ENTRY DceErrorInqTextW(RPC_STATUS,unsigned short*);
-RPC_STATUS RPC_ENTRY RpcMgmtEpEltInqNextA(RPC_EP_INQ_HANDLE,RPC_IF_ID*,RPC_BINDING_HANDLE*,UUID*,unsigned char**);
-RPC_STATUS RPC_ENTRY RpcMgmtEpEltInqNextW(RPC_EP_INQ_HANDLE,RPC_IF_ID*,RPC_BINDING_HANDLE*,UUID*,unsigned short**);
-#ifdef UNICODE
-#define RpcMgmtEpEltInqNext RpcMgmtEpEltInqNextW
-#define DceErrorInqText DceErrorInqTextW
-#else
-#define RpcMgmtEpEltInqNext RpcMgmtEpEltInqNextA
-#define DceErrorInqText DceErrorInqTextA
-#endif /* UNICODE */
-#else /* RPC_UNICODE_SUPPORTED */
-RPC_STATUS RPC_ENTRY DceErrorInqText(RPC_STATUS,unsigned char*);
-RPC_STATUS RPC_ENTRY RpcMgmtEpEltInqNext(RPC_EP_INQ_HANDLE,RPC_IF_ID*,RPC_BINDING_HANDLE*,UUID*,unsigned char**);
-#endif
-RPC_STATUS RPC_ENTRY RpcMgmtEpEltInqBegin(RPC_BINDING_HANDLE,unsigned long,RPC_IF_ID*,unsigned long,UUID*,RPC_EP_INQ_HANDLE*);
-RPC_STATUS RPC_ENTRY RpcMgmtEpEltInqDone(RPC_EP_INQ_HANDLE*);
-RPC_STATUS RPC_ENTRY RpcMgmtEpUnregister(RPC_BINDING_HANDLE,RPC_IF_ID*,RPC_BINDING_HANDLE,UUID*);
-RPC_STATUS RPC_ENTRY RpcMgmtSetAuthorizationFn(RPC_MGMT_AUTHORIZATION_FN);
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/rpcdcep.h b/winsup/w32api/include/rpcdcep.h
deleted file mode 100644
index 399d4ac..0000000
--- a/winsup/w32api/include/rpcdcep.h
+++ /dev/null
@@ -1,129 +0,0 @@
-#ifndef _RPCDCEP_H
-#define _RPCDCEP_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define RPC_NCA_FLAGS_DEFAULT 0
-#define RPC_NCA_FLAGS_IDEMPOTENT 1
-#define RPC_NCA_FLAGS_BROADCAST 2
-#define RPC_NCA_FLAGS_MAYBE 4
-#define RPCFLG_ASYNCHRONOUS 0x40000000
-#define RPCFLG_INPUT_SYNCHRONOUS 0x20000000
-#define RPC_FLAGS_VALID_BIT 0x8000
-#define TRANSPORT_TYPE_CN 1
-#define TRANSPORT_TYPE_DG 2
-#define TRANSPORT_TYPE_LPC 4
-#define TRANSPORT_TYPE_WMSG 8
-
-typedef struct _RPC_VERSION {
- unsigned short MajorVersion;
- unsigned short MinorVersion;
-} RPC_VERSION;
-typedef struct _RPC_SYNTAX_IDENTIFIER {
- GUID SyntaxGUID;
- RPC_VERSION SyntaxVersion;
-} RPC_SYNTAX_IDENTIFIER, *PRPC_SYNTAX_IDENTIFIER;
-typedef struct _RPC_MESSAGE {
- HANDLE Handle;
- unsigned long DataRepresentation;
- void *Buffer;
- unsigned int BufferLength;
- unsigned int ProcNum;
- PRPC_SYNTAX_IDENTIFIER TransferSyntax;
- void *RpcInterfaceInformation;
- void *ReservedForRuntime;
- void *ManagerEpv;
- void *ImportContext;
- unsigned long RpcFlags;
-} RPC_MESSAGE,*PRPC_MESSAGE;
-typedef long __stdcall RPC_FORWARD_FUNCTION(GUID*,RPC_VERSION*,GUID*,unsigned char*,void**);
-typedef void(__stdcall *RPC_DISPATCH_FUNCTION) ( PRPC_MESSAGE Message);
-typedef struct {
- unsigned int DispatchTableCount;
- RPC_DISPATCH_FUNCTION *DispatchTable;
- int Reserved;
-} RPC_DISPATCH_TABLE,*PRPC_DISPATCH_TABLE;
-typedef struct _RPC_PROTSEQ_ENDPOINT {
- unsigned char *RpcProtocolSequence;
- unsigned char *Endpoint;
-} RPC_PROTSEQ_ENDPOINT,*PRPC_PROTSEQ_ENDPOINT;
-typedef struct _RPC_SERVER_INTERFACE {
- unsigned int Length;
- RPC_SYNTAX_IDENTIFIER InterfaceId;
- RPC_SYNTAX_IDENTIFIER TransferSyntax;
- PRPC_DISPATCH_TABLE DispatchTable;
- unsigned int RpcProtseqEndpointCount;
- PRPC_PROTSEQ_ENDPOINT RpcProtseqEndpoint;
- void *DefaultManagerEpv;
- void const *InterpreterInfo;
-} RPC_SERVER_INTERFACE,*PRPC_SERVER_INTERFACE;
-typedef struct _RPC_CLIENT_INTERFACE {
- unsigned int Length;
- RPC_SYNTAX_IDENTIFIER InterfaceId;
- RPC_SYNTAX_IDENTIFIER TransferSyntax;
- PRPC_DISPATCH_TABLE DispatchTable;
- unsigned int RpcProtseqEndpointCount;
- PRPC_PROTSEQ_ENDPOINT RpcProtseqEndpoint;
- unsigned long Reserved;
- void const *InterpreterInfo;
-} RPC_CLIENT_INTERFACE,*PRPC_CLIENT_INTERFACE;
-typedef void *I_RPC_MUTEX;
-typedef struct _RPC_TRANSFER_SYNTAX {
- GUID Uuid;
- unsigned short VersMajor;
- unsigned short VersMinor;
-} RPC_TRANSFER_SYNTAX;
-typedef RPC_STATUS (*RPC_BLOCKING_FN)(void*,void*,void*);
-
-long __stdcall I_RpcGetBuffer(RPC_MESSAGE*);
-long __stdcall I_RpcSendReceive(RPC_MESSAGE*);
-long __stdcall I_RpcSend(RPC_MESSAGE*);
-long __stdcall I_RpcFreeBuffer(RPC_MESSAGE*);
-void __stdcall I_RpcRequestMutex(I_RPC_MUTEX*);
-void __stdcall I_RpcClearMutex(I_RPC_MUTEX);
-void __stdcall I_RpcDeleteMutex(I_RPC_MUTEX);
-DECLARE_STDCALL_P(void *) I_RpcAllocate(unsigned int);
-void __stdcall I_RpcFree(void*);
-void __stdcall I_RpcPauseExecution(unsigned long);
-typedef void(__stdcall *PRPC_RUNDOWN) (void*);
-long __stdcall I_RpcMonitorAssociation(HANDLE,PRPC_RUNDOWN,void*);
-long __stdcall I_RpcStopMonitorAssociation(HANDLE);
-HANDLE __stdcall I_RpcGetCurrentCallHandle(void);
-long __stdcall I_RpcGetAssociationContext(void**);
-long __stdcall I_RpcSetAssociationContext(void*);
-#ifdef __RPC_NT__
-long __stdcall I_RpcNsBindingSetEntryName(HANDLE,unsigned long,unsigned short*);
-long __stdcall I_RpcBindingInqDynamicEndpoint(HANDLE, unsigned short**);
-#else
-long __stdcall I_RpcNsBindingSetEntryName(HANDLE,unsigned long,unsigned char*);
-long __stdcall I_RpcBindingInqDynamicEndpoint(HANDLE,unsigned char**);
-#endif
-long __stdcall I_RpcBindingInqTransportType(HANDLE,unsigned int*);
-long __stdcall I_RpcIfInqTransferSyntaxes(HANDLE,RPC_TRANSFER_SYNTAX*,unsigned int,unsigned int*);
-long __stdcall I_UuidCreate(GUID*);
-long __stdcall I_RpcBindingCopy(HANDLE,HANDLE*);
-long __stdcall I_RpcBindingIsClientLocal(HANDLE,unsigned int*);
-void __stdcall I_RpcSsDontSerializeContext(void);
-long __stdcall I_RpcServerRegisterForwardFunction(RPC_FORWARD_FUNCTION*);
-long __stdcall I_RpcConnectionInqSockBuffSize(unsigned long*,unsigned long*);
-long __stdcall I_RpcConnectionSetSockBuffSize(unsigned long,unsigned long);
-long __stdcall I_RpcBindingSetAsync(HANDLE,RPC_BLOCKING_FN);
-long __stdcall I_RpcAsyncSendReceive(RPC_MESSAGE*,void*);
-long __stdcall I_RpcGetThreadWindowHandle(void**);
-long __stdcall I_RpcServerThreadPauseListening(void);
-long __stdcall I_RpcServerThreadContinueListening(void);
-long __stdcall I_RpcServerUnregisterEndpointA(unsigned char*,unsigned char*);
-long __stdcall I_RpcServerUnregisterEndpointW(unsigned short*,unsigned short*);
-#ifdef UNICODE
-#define I_RpcServerUnregisterEndpoint I_RpcServerUnregisterEndpointW
-#else
-#define I_RpcServerUnregisterEndpoint I_RpcServerUnregisterEndpointA
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/rpcndr.h b/winsup/w32api/include/rpcndr.h
deleted file mode 100644
index 95d188a..0000000
--- a/winsup/w32api/include/rpcndr.h
+++ /dev/null
@@ -1,518 +0,0 @@
-#ifndef _RPCNDR_H
-#define _RPCNDR_H
-#define __RPCNDR_H__
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifndef __RPCNDR_H_VERSION__
-#define __RPCNDR_H_VERSION__ ( 450 )
-#endif /* __RPCNDR_H_VERSION__ */
-#include <rpcnsip.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include <objfwd.h>
-#define DECLSPEC_UUID(x)
-#define MIDL_INTERFACE(x) struct
-#define NDR_CHAR_REP_MASK (unsigned long)0xFL
-#define NDR_INT_REP_MASK (unsigned long)0xF0L
-#define NDR_FLOAT_REP_MASK (unsigned long)0xFF00L
-#define NDR_LITTLE_ENDIAN (unsigned long)0x10L
-#define NDR_BIG_ENDIAN (unsigned long)0
-#define NDR_IEEE_FLOAT (unsigned long)0
-#define NDR_VAX_FLOAT (unsigned long)0x100L
-#define NDR_ASCII_CHAR (unsigned long)0
-#define NDR_EBCDIC_CHAR (unsigned long)1
-#define NDR_LOCAL_DATA_REPRESENTATION (unsigned long)0x10L
-#define NDR_LOCAL_ENDIAN NDR_LITTLE_ENDIAN
-#define __RPC_CALLEE __stdcall
-#ifndef __MIDL_USER_DEFINED
-#define midl_user_allocate MIDL_user_allocate
-#define midl_user_free MIDL_user_free
-#define __MIDL_USER_DEFINED
-#endif
-#define RPC_VAR_ENTRY __cdecl
-#ifdef _M_IX86
-#define __MIDL_DECLSPEC_DLLIMPORT __declspec(dllimport)
-#define __MIDL_DECLSPEC_DLLEXPORT __declspec(dllexport)
-#else
-#define __MIDL_DECLSPEC_DLLIMPORT
-#define __MIDL_DECLSPEC_DLLEXPORT
-#endif
-#if defined(_HAVE_INT64) || (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64)
-#define hyper __int64
-#define MIDL_uhyper unsigned __int64
-#else
-#define hyper double
-#define MIDL_uhyper double
-#endif
-#define small char
-typedef unsigned char byte;
-typedef unsigned char boolean;
-#define NDRSContextValue(hContext) (&(hContext)->userContext)
-#define cbNDRContext 20
-#define byte_from_ndr(source, target) { *(target) = *(*(char**)&(source)->Buffer)++; }
-#define byte_array_from_ndr(Source, LowerIndex, UpperIndex, Target) { NDRcopy ((((char *)(Target))+(LowerIndex)), (Source)->Buffer, (unsigned int)((UpperIndex)-(LowerIndex))); *(unsigned long *)&(Source)->Buffer += ((UpperIndex)-(LowerIndex)); }
-#define boolean_from_ndr(source, target) { *(target) = *(*(char**)&(source)->Buffer)++; }
-#define boolean_array_from_ndr(Source, LowerIndex, UpperIndex, Target) { NDRcopy ((((char *)(Target))+(LowerIndex)), (Source)->Buffer, (unsigned int)((UpperIndex)-(LowerIndex))); *(unsigned long *)&(Source)->Buffer += ((UpperIndex)-(LowerIndex)); }
-#define small_from_ndr(source, target) { *(target) = *(*(char**)&(source)->Buffer)++; }
-#define small_from_ndr_temp(source, target, format) { *(target) = *(*(char**)(source))++; }
-#define small_array_from_ndr(Source, LowerIndex, UpperIndex, Target) { NDRcopy ((((char *)(Target))+(LowerIndex)), (Source)->Buffer, (unsigned int)((UpperIndex)-(LowerIndex))); *(unsigned long *)&(Source)->Buffer += ((UpperIndex)-(LowerIndex)); }
-#define MIDL_ascii_strlen(string) strlen(string)
-#define MIDL_ascii_strcpy(target,source) strcpy(target,source)
-#define MIDL_memset(s,c,n) memset(s,c,n)
-#define _midl_ma1( p, cast ) *(*( cast **)&p)++
-#define _midl_ma2( p, cast ) *(*( cast **)&p)++
-#define _midl_ma4( p, cast ) *(*( cast **)&p)++
-#define _midl_ma8( p, cast ) *(*( cast **)&p)++
-#define _midl_unma1( p, cast ) *(( cast *)p)++
-#define _midl_unma2( p, cast ) *(( cast *)p)++
-#define _midl_unma3( p, cast ) *(( cast *)p)++
-#define _midl_unma4( p, cast ) *(( cast *)p)++
-#define _midl_fa2( p ) (p = (RPC_BUFPTR )((unsigned long)(p+1) & 0xfffffffe))
-#define _midl_fa4( p ) (p = (RPC_BUFPTR )((unsigned long)(p+3) & 0xfffffffc))
-#define _midl_fa8( p ) (p = (RPC_BUFPTR )((unsigned long)(p+7) & 0xfffffff8))
-#define _midl_addp( p, n ) (p += n)
-#define _midl_marsh_lhs( p, cast ) *(*( cast **)&p)++
-#define _midl_marsh_up( mp, p ) *(*(unsigned long **)&mp)++ = (unsigned long)p
-#define _midl_advmp( mp ) *(*(unsigned long **)&mp)++
-#define _midl_unmarsh_up( p ) (*(*(unsigned long **)&p)++)
-#define NdrMarshConfStringHdr( p, s, l ) (_midl_ma4( p, unsigned long) = s, _midl_ma4( p, unsigned long) = 0, _midl_ma4( p, unsigned long) = l)
-#define NdrUnMarshConfStringHdr(p, s, l) ((s=_midl_unma4(p,unsigned long), (_midl_addp(p,4)), (l=_midl_unma4(p,unsigned long))
-#define NdrMarshCCtxtHdl(pc,p) (NDRCContextMarshall( (NDR_CCONTEXT)pc, p ),p+20)
-#define NdrUnMarshCCtxtHdl(pc,p,h,drep) (NDRCContextUnmarshall((NDR_CONTEXT)pc,h,p,drep), p+20)
-#define NdrUnMarshSCtxtHdl(pc, p,drep) (pc = NdrSContextUnMarshall(p,drep ))
-#define NdrMarshSCtxtHdl(pc,p,rd) (NdrSContextMarshall((NDR_SCONTEXT)pc,p, (NDR_RUNDOWN)rd)
-#define NdrFieldOffset(s,f) (long)(& (((s *)0)->f))
-#define NdrFieldPad(s,f,p,t) (NdrFieldOffset(s,f) - NdrFieldOffset(s,p) - sizeof(t))
-#define NdrFcShort(s) (unsigned char)(s & 0xff), (unsigned char)(s >> 8)
-#define NdrFcLong(s) (unsigned char)(s & 0xff), (unsigned char)((s & 0x0000ff00) >> 8), (unsigned char)((s & 0x00ff0000) >> 16), (unsigned char)(s >> 24)
-#ifdef CONST_VTABLE
-#define CONST_VTBL const
-#else
-#define CONST_VTBL
-#endif
-typedef void *NDR_CCONTEXT;
-typedef struct {
- void *pad[2];
- void *userContext;
-} *NDR_SCONTEXT;
-typedef void (__RPC_USER *NDR_RUNDOWN)(void*);
-typedef struct _SCONTEXT_QUEUE {
- unsigned long NumberOfObjects;
- NDR_SCONTEXT *ArrayOfObjects;
-} SCONTEXT_QUEUE,*PSCONTEXT_QUEUE;
-struct _MIDL_STUB_MESSAGE;
-struct _MIDL_STUB_DESC;
-struct _FULL_PTR_XLAT_TABLES;
-typedef unsigned char *RPC_BUFPTR;
-typedef unsigned long RPC_LENGTH;
-typedef void(__RPC_USER *EXPR_EVAL)(struct _MIDL_STUB_MESSAGE*);
-typedef const unsigned char *PFORMAT_STRING;
-typedef struct {
- long Dimension;
- unsigned long *BufferConformanceMark;
- unsigned long *BufferVarianceMark;
- unsigned long *MaxCountArray;
- unsigned long *OffsetArray;
- unsigned long *ActualCountArray;
-} ARRAY_INFO,*PARRAY_INFO;
-
-RPC_BINDING_HANDLE RPC_ENTRY NDRCContextBinding(NDR_CCONTEXT);
-void RPC_ENTRY NDRCContextMarshall(NDR_CCONTEXT,void*);
-void RPC_ENTRY NDRCContextUnmarshall(NDR_CCONTEXT*,RPC_BINDING_HANDLE,void*,unsigned long);
-void RPC_ENTRY NDRSContextMarshall(NDR_SCONTEXT,void*,NDR_RUNDOWN);
-NDR_SCONTEXT RPC_ENTRY NDRSContextUnmarshall(void*pBuff,unsigned long);
-void RPC_ENTRY RpcSsDestroyClientContext(void**);
-void RPC_ENTRY NDRcopy(void*,void*,unsigned int);
-unsigned int RPC_ENTRY MIDL_wchar_strlen(wchar_t*);
-void RPC_ENTRY MIDL_wchar_strcpy(void*,wchar_t*);
-void RPC_ENTRY char_from_ndr(PRPC_MESSAGE,unsigned char*);
-void RPC_ENTRY char_array_from_ndr(PRPC_MESSAGE,unsigned long,unsigned long,unsigned char*);
-void RPC_ENTRY short_from_ndr(PRPC_MESSAGE,unsigned short*);
-void RPC_ENTRY short_array_from_ndr(PRPC_MESSAGE,unsigned long,unsigned long,unsigned short*);
-void RPC_ENTRY short_from_ndr_temp(unsigned char**,unsigned short*,unsigned long);
-void RPC_ENTRY long_from_ndr(PRPC_MESSAGE,unsigned long*);
-void RPC_ENTRY long_array_from_ndr(PRPC_MESSAGE,unsigned long,unsigned long,unsigned long*);
-void RPC_ENTRY long_from_ndr_temp(unsigned char**,unsigned long*,unsigned long);
-void RPC_ENTRY enum_from_ndr(PRPC_MESSAGE,unsigned int*);
-void RPC_ENTRY float_from_ndr(PRPC_MESSAGE,void*);
-void RPC_ENTRY float_array_from_ndr(PRPC_MESSAGE,unsigned long,unsigned long,void*);
-void RPC_ENTRY double_from_ndr(PRPC_MESSAGE,void*);
-void RPC_ENTRY double_array_from_ndr(PRPC_MESSAGE,unsigned long,unsigned long,void*);
-void RPC_ENTRY hyper_from_ndr(PRPC_MESSAGE,hyper*);
-void RPC_ENTRY hyper_array_from_ndr(PRPC_MESSAGE,unsigned long,unsigned long,hyper*);
-void RPC_ENTRY hyper_from_ndr_temp(unsigned char**,hyper*,unsigned long);
-void RPC_ENTRY data_from_ndr(PRPC_MESSAGE,void*,char*,unsigned char);
-void RPC_ENTRY data_into_ndr(void*,PRPC_MESSAGE,char*,unsigned char);
-void RPC_ENTRY tree_into_ndr(void*,PRPC_MESSAGE,char*,unsigned char);
-void RPC_ENTRY data_size_ndr(void*,PRPC_MESSAGE,char*,unsigned char);
-void RPC_ENTRY tree_size_ndr(void*,PRPC_MESSAGE,char*,unsigned char);
-void RPC_ENTRY tree_peek_ndr(PRPC_MESSAGE,unsigned char**,char*,unsigned char);
-void *RPC_ENTRY midl_allocate(int);
-
-#pragma pack(push,4)
-typedef struct _MIDL_STUB_MESSAGE {
- PRPC_MESSAGE RpcMsg;
- unsigned char *Buffer;
- unsigned char *BufferStart;
- unsigned char *BufferEnd;
- unsigned char *BufferMark;
- unsigned long BufferLength;
- unsigned long MemorySize;
- unsigned char *Memory;
- int IsClient;
- int ReuseBuffer;
- unsigned char *AllocAllNodesMemory;
- unsigned char *AllocAllNodesMemoryEnd;
- int IgnoreEmbeddedPointers;
- unsigned char *PointerBufferMark;
- unsigned char fBufferValid;
- unsigned char Unused;
- unsigned long MaxCount;
- unsigned long Offset;
- unsigned long ActualCount;
- void*(__RPC_API *pfnAllocate)(unsigned int);
- void(__RPC_API *pfnFree)(void*);
- unsigned char *StackTop;
- unsigned char *pPresentedType;
- unsigned char *pTransmitType;
- handle_t SavedHandle;
- const struct _MIDL_STUB_DESC *StubDesc;
- struct _FULL_PTR_XLAT_TABLES *FullPtrXlatTables;
- unsigned long FullPtrRefId;
- int fCheckBounds;
- int fInDontFree :1;
- int fDontCallFreeInst :1;
- int fInOnlyParam :1;
- int fHasReturn :1;
- unsigned long dwDestContext;
- void*pvDestContext;
- NDR_SCONTEXT *SavedContextHandles;
- long ParamNumber;
- struct IRpcChannelBuffer *pRpcChannelBuffer;
- PARRAY_INFO pArrayInfo;
- unsigned long *SizePtrCountArray;
- unsigned long *SizePtrOffsetArray;
- unsigned long *SizePtrLengthArray;
- void*pArgQueue;
- unsigned long dwStubPhase;
- unsigned long w2kReserved[5];
-} MIDL_STUB_MESSAGE,*PMIDL_STUB_MESSAGE;
-#pragma pack(pop)
-typedef void*(__RPC_API *GENERIC_BINDING_ROUTINE)(void*);
-typedef void (__RPC_API *GENERIC_UNBIND_ROUTINE)(void*,unsigned char*);
-typedef struct _GENERIC_BINDING_ROUTINE_PAIR {
- GENERIC_BINDING_ROUTINE pfnBind;
- GENERIC_UNBIND_ROUTINE pfnUnbind;
-} GENERIC_BINDING_ROUTINE_PAIR,*PGENERIC_BINDING_ROUTINE_PAIR;
-typedef struct __GENERIC_BINDING_INFO {
- void *pObj;
- unsigned int Size;
- GENERIC_BINDING_ROUTINE pfnBind;
- GENERIC_UNBIND_ROUTINE pfnUnbind;
-} GENERIC_BINDING_INFO,*PGENERIC_BINDING_INFO;
-typedef void(__RPC_USER *XMIT_HELPER_ROUTINE)(PMIDL_STUB_MESSAGE);
-typedef struct _XMIT_ROUTINE_QUINTUPLE {
- XMIT_HELPER_ROUTINE pfnTranslateToXmit;
- XMIT_HELPER_ROUTINE pfnTranslateFromXmit;
- XMIT_HELPER_ROUTINE pfnFreeXmit;
- XMIT_HELPER_ROUTINE pfnFreeInst;
-} XMIT_ROUTINE_QUINTUPLE,*PXMIT_ROUTINE_QUINTUPLE;
-typedef struct _MALLOC_FREE_STRUCT {
-void*(__RPC_USER *pfnAllocate)(unsigned int);
-void(__RPC_USER *pfnFree)(void*);
-} MALLOC_FREE_STRUCT;
-typedef struct _COMM_FAULT_OFFSETS {
- short CommOffset;
- short FaultOffset;
-} COMM_FAULT_OFFSETS;
-typedef unsigned long (__RPC_USER *USER_MARSHAL_SIZING_ROUTINE)(unsigned long *,unsigned long,void *);
-typedef unsigned char *(__RPC_USER *USER_MARSHAL_MARSHALLING_ROUTINE)(unsigned long *,unsigned char *,void *);
-typedef unsigned char *(__RPC_USER *USER_MARSHAL_UNMARSHALLING_ROUTINE)(unsigned long *,unsigned char *,void *);
-typedef void (__RPC_USER *USER_MARSHAL_FREEING_ROUTINE)(unsigned long *,void *);
-typedef struct _USER_MARSHAL_ROUTINE_QUADRUPLE {
- USER_MARSHAL_SIZING_ROUTINE pfnBufferSize;
- USER_MARSHAL_MARSHALLING_ROUTINE pfnMarshall;
- USER_MARSHAL_UNMARSHALLING_ROUTINE pfnUnmarshall;
- USER_MARSHAL_FREEING_ROUTINE pfnFree;
-} USER_MARSHAL_ROUTINE_QUADRUPLE;
-typedef void (__RPC_USER *NDR_NOTIFY_ROUTINE)(void);
-typedef enum _IDL_CS_CONVERT {
- IDL_CS_NO_CONVERT,
- IDL_CS_IN_PLACE_CONVERT,
- IDL_CS_NEW_BUFFER_CONVERT
-} IDL_CS_CONVERT;
-typedef void (__RPC_USER *CS_TYPE_NET_SIZE_ROUTINE)(RPC_BINDING_HANDLE,unsigned long,unsigned long,IDL_CS_CONVERT*,unsigned long*,error_status_t*);
-typedef void (__RPC_USER *CS_TYPE_LOCAL_SIZE_ROUTINE)(RPC_BINDING_HANDLE,unsigned long,unsigned long,IDL_CS_CONVERT*,unsigned long*,error_status_t*);
-typedef void (__RPC_USER *CS_TYPE_TO_NETCS_ROUTINE)(RPC_BINDING_HANDLE,unsigned long,void*,unsigned long,byte*,unsigned long*,error_status_t*);
-typedef void (__RPC_USER *CS_TYPE_FROM_NETCS_ROUTINE)(RPC_BINDING_HANDLE,unsigned long,byte*,unsigned long,unsigned long,void*,unsigned long*,error_status_t*);
-typedef void (__RPC_USER *CS_TAG_GETTING_ROUTINE)(RPC_BINDING_HANDLE,int,unsigned long*,unsigned long*,unsigned long*,error_status_t*);
-typedef struct _NDR_CS_SIZE_CONVERT_ROUTINES {
- CS_TYPE_NET_SIZE_ROUTINE pfnNetSize;
- CS_TYPE_TO_NETCS_ROUTINE pfnToNetCs;
- CS_TYPE_LOCAL_SIZE_ROUTINE pfnLocalSize;
- CS_TYPE_FROM_NETCS_ROUTINE pfnFromNetCs;
-} NDR_CS_SIZE_CONVERT_ROUTINES;
-typedef struct _NDR_CS_ROUTINES {
- NDR_CS_SIZE_CONVERT_ROUTINES *pSizeConvertRoutines;
- CS_TAG_GETTING_ROUTINE *pTagGettingRoutines;
-} NDR_CS_ROUTINES;
-typedef struct _MIDL_STUB_DESC {
- void*RpcInterfaceInformation;
- void*(__RPC_API *pfnAllocate)(unsigned int);
- void(__RPC_API *pfnFree)(void*);
- union {
- handle_t *pAutoHandle;
- handle_t *pPrimitiveHandle;
- PGENERIC_BINDING_INFO pGenericBindingInfo;
- } IMPLICIT_HANDLE_INFO;
- const NDR_RUNDOWN *apfnNdrRundownRoutines;
- const GENERIC_BINDING_ROUTINE_PAIR *aGenericBindingRoutinePairs;
- const EXPR_EVAL *apfnExprEval;
- const XMIT_ROUTINE_QUINTUPLE *aXmitQuintuple;
- const unsigned char *pFormatTypes;
- int fCheckBounds;
- unsigned long Version;
- MALLOC_FREE_STRUCT *pMallocFreeStruct;
- long MIDLVersion;
- const COMM_FAULT_OFFSETS *CommFaultOffsets;
- const USER_MARSHAL_ROUTINE_QUADRUPLE *aUserMarshalQuadruple;
- const NDR_NOTIFY_ROUTINE *NotifyRoutineTable;
- ULONG_PTR mFlags;
- const NDR_CS_ROUTINES *CsRoutineTables;
- void *Reserved4;
- ULONG_PTR Reserved5;
-} MIDL_STUB_DESC;
-typedef const MIDL_STUB_DESC *PMIDL_STUB_DESC;
-typedef void*PMIDL_XMIT_TYPE;
-typedef struct _MIDL_FORMAT_STRING {
- short Pad;
- unsigned char Format[1];
-} MIDL_FORMAT_STRING;
-typedef void(__RPC_API *STUB_THUNK)(PMIDL_STUB_MESSAGE);
-typedef long(__RPC_API *SERVER_ROUTINE)(void);
-typedef struct _MIDL_SERVER_INFO_ {
- PMIDL_STUB_DESC pStubDesc;
- const SERVER_ROUTINE *DispatchTable;
- PFORMAT_STRING ProcString;
- const unsigned short *FmtStringOffset;
- const STUB_THUNK *ThunkTable;
-} MIDL_SERVER_INFO,*PMIDL_SERVER_INFO;
-typedef struct _MIDL_STUBLESS_PROXY_INFO {
- PMIDL_STUB_DESC pStubDesc;
- PFORMAT_STRING ProcFormatString;
- const unsigned short *FormatStringOffset;
-} MIDL_STUBLESS_PROXY_INFO;
-typedef MIDL_STUBLESS_PROXY_INFO *PMIDL_STUBLESS_PROXY_INFO;
-typedef union _CLIENT_CALL_RETURN {
- void *Pointer;
- long Simple;
-} CLIENT_CALL_RETURN;
-typedef enum { XLAT_SERVER = 1,XLAT_CLIENT } XLAT_SIDE;
-typedef struct _FULL_PTR_TO_REFID_ELEMENT {
- struct _FULL_PTR_TO_REFID_ELEMENT *Next;
- void*Pointer;
- unsigned long RefId;
- unsigned char State;
-} FULL_PTR_TO_REFID_ELEMENT,*PFULL_PTR_TO_REFID_ELEMENT;
-typedef struct _FULL_PTR_XLAT_TABLES {
- struct {
- void **XlatTable;
- unsigned char *StateTable;
- unsigned long NumberOfEntries;
- } RefIdToPointer;
- struct {
- PFULL_PTR_TO_REFID_ELEMENT *XlatTable;
- unsigned long NumberOfBuckets;
- unsigned long HashMask;
- } PointerToRefId;
- unsigned long NextRefId;
- XLAT_SIDE XlatSide;
-} FULL_PTR_XLAT_TABLES,*PFULL_PTR_XLAT_TABLES;
-void RPC_ENTRY NdrSimpleTypeMarshall(PMIDL_STUB_MESSAGE,unsigned char*,unsigned char);
-unsigned char *RPC_ENTRY NdrPointerMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING pFormat);
-unsigned char *RPC_ENTRY NdrSimpleStructMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-unsigned char *RPC_ENTRY NdrConformantStructMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-unsigned char *RPC_ENTRY NdrConformantVaryingStructMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-unsigned char *RPC_ENTRY NdrHardStructMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-unsigned char *RPC_ENTRY NdrComplexStructMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-unsigned char *RPC_ENTRY NdrFixedArrayMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-unsigned char *RPC_ENTRY NdrConformantArrayMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-unsigned char *RPC_ENTRY NdrConformantVaryingArrayMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-unsigned char *RPC_ENTRY NdrVaryingArrayMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-unsigned char *RPC_ENTRY NdrComplexArrayMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-unsigned char *RPC_ENTRY NdrNonConformantStringMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-unsigned char *RPC_ENTRY NdrConformantStringMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-unsigned char *RPC_ENTRY NdrEncapsulatedUnionMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-unsigned char *RPC_ENTRY NdrNonEncapsulatedUnionMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-unsigned char *RPC_ENTRY NdrByteCountPointerMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-unsigned char *RPC_ENTRY NdrXmitOrRepAsMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-unsigned char *RPC_ENTRY NdrInterfacePointerMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrClientContextMarshall(PMIDL_STUB_MESSAGE,NDR_CCONTEXT,int);
-void RPC_ENTRY NdrServerContextMarshall(PMIDL_STUB_MESSAGE,NDR_SCONTEXT,NDR_RUNDOWN);
-void RPC_ENTRY NdrSimpleTypeUnmarshall(PMIDL_STUB_MESSAGE,unsigned char*,unsigned char);
-unsigned char *RPC_ENTRY NdrPointerUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
-unsigned char *RPC_ENTRY NdrSimpleStructUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
-unsigned char *RPC_ENTRY NdrConformantStructUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
-unsigned char *RPC_ENTRY NdrConformantVaryingStructUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
-unsigned char *RPC_ENTRY NdrHardStructUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
-unsigned char *RPC_ENTRY NdrComplexStructUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
-unsigned char *RPC_ENTRY NdrFixedArrayUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
-unsigned char *RPC_ENTRY NdrConformantArrayUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
-unsigned char *RPC_ENTRY NdrConformantVaryingArrayUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
-unsigned char *RPC_ENTRY NdrVaryingArrayUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
-unsigned char *RPC_ENTRY NdrComplexArrayUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
-unsigned char *RPC_ENTRY NdrNonConformantStringUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
-unsigned char *RPC_ENTRY NdrConformantStringUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
-unsigned char *RPC_ENTRY NdrEncapsulatedUnionUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
-unsigned char *RPC_ENTRY NdrNonEncapsulatedUnionUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
-unsigned char *RPC_ENTRY NdrByteCountPointerUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
-unsigned char *RPC_ENTRY NdrXmitOrRepAsUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
-unsigned char *RPC_ENTRY NdrInterfacePointerUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
-void RPC_ENTRY NdrClientContextUnmarshall(PMIDL_STUB_MESSAGE,NDR_CCONTEXT*,RPC_BINDING_HANDLE);
-NDR_SCONTEXT RPC_ENTRY NdrServerContextUnmarshall(PMIDL_STUB_MESSAGE);
-void RPC_ENTRY NdrPointerBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrSimpleStructBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrConformantStructBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrConformantVaryingStructBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrHardStructBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrComplexStructBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrFixedArrayBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrConformantArrayBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrConformantVaryingArrayBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrVaryingArrayBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrComplexArrayBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrConformantStringBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrNonConformantStringBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrEncapsulatedUnionBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrNonEncapsulatedUnionBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrByteCountPointerBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrXmitOrRepAsBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrInterfacePointerBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrContextHandleSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-unsigned long RPC_ENTRY NdrPointerMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
-unsigned long RPC_ENTRY NdrSimpleStructMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
-unsigned long RPC_ENTRY NdrConformantStructMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
-unsigned long RPC_ENTRY NdrConformantVaryingStructMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
-unsigned long RPC_ENTRY NdrHardStructMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
-unsigned long RPC_ENTRY NdrComplexStructMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
-unsigned long RPC_ENTRY NdrFixedArrayMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
-unsigned long RPC_ENTRY NdrConformantArrayMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
-unsigned long RPC_ENTRY NdrConformantVaryingArrayMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
-unsigned long RPC_ENTRY NdrVaryingArrayMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
-unsigned long RPC_ENTRY NdrComplexArrayMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
-unsigned long RPC_ENTRY NdrConformantStringMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
-unsigned long RPC_ENTRY NdrNonConformantStringMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
-unsigned long RPC_ENTRY NdrEncapsulatedUnionMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
-unsigned long RPC_ENTRY NdrNonEncapsulatedUnionMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
-unsigned long RPC_ENTRY NdrXmitOrRepAsMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
-unsigned long RPC_ENTRY NdrInterfacePointerMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
-void RPC_ENTRY NdrPointerFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrSimpleStructFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrConformantStructFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrConformantVaryingStructFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrHardStructFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrComplexStructFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrFixedArrayFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrConformantArrayFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrConformantVaryingArrayFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrVaryingArrayFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrComplexArrayFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrEncapsulatedUnionFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrNonEncapsulatedUnionFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrByteCountPointerFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrXmitOrRepAsFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrInterfacePointerFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-void RPC_ENTRY NdrConvert(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
-void RPC_ENTRY NdrClientInitializeNew(PRPC_MESSAGE,PMIDL_STUB_MESSAGE,PMIDL_STUB_DESC,unsigned int);
-unsigned char *RPC_ENTRY NdrServerInitializeNew(PRPC_MESSAGE,PMIDL_STUB_MESSAGE,PMIDL_STUB_DESC);
-void RPC_ENTRY NdrClientInitialize(PRPC_MESSAGE,PMIDL_STUB_MESSAGE,PMIDL_STUB_DESC,unsigned int);
-unsigned char *RPC_ENTRY NdrServerInitialize(PRPC_MESSAGE,PMIDL_STUB_MESSAGE,PMIDL_STUB_DESC);
-unsigned char *RPC_ENTRY NdrServerInitializeUnmarshall(PMIDL_STUB_MESSAGE,PMIDL_STUB_DESC,PRPC_MESSAGE);
-void RPC_ENTRY NdrServerInitializeMarshall(PRPC_MESSAGE,PMIDL_STUB_MESSAGE);
-unsigned char *RPC_ENTRY NdrGetBuffer(PMIDL_STUB_MESSAGE,unsigned long,RPC_BINDING_HANDLE);
-unsigned char *RPC_ENTRY NdrNsGetBuffer(PMIDL_STUB_MESSAGE,unsigned long,RPC_BINDING_HANDLE);
-unsigned char *RPC_ENTRY NdrSendReceive(PMIDL_STUB_MESSAGE,unsigned char*);
-unsigned char *RPC_ENTRY NdrNsSendReceive(PMIDL_STUB_MESSAGE,unsigned char*,RPC_BINDING_HANDLE*);
-void RPC_ENTRY NdrFreeBuffer(PMIDL_STUB_MESSAGE);
-CLIENT_CALL_RETURN RPC_VAR_ENTRY NdrClientCall(PMIDL_STUB_DESC,PFORMAT_STRING,...);
-CLIENT_CALL_RETURN RPC_VAR_ENTRY NdrClientCall2(PMIDL_STUB_DESC,PFORMAT_STRING,...);
-typedef enum {
- STUB_UNMARSHAL,
- STUB_CALL_SERVER,
- STUB_MARSHAL,
- STUB_CALL_SERVER_NO_HRESULT
-} STUB_PHASE;
-typedef enum {
- PROXY_CALCSIZE,
- PROXY_GETBUFFER,
- PROXY_MARSHAL,
- PROXY_SENDRECEIVE,
- PROXY_UNMARSHAL
-} PROXY_PHASE;
-long RPC_ENTRY NdrStubCall(struct IRpcStubBuffer*,struct IRpcChannelBuffer*,PRPC_MESSAGE,unsigned long*);
-void RPC_ENTRY NdrServerCall(PRPC_MESSAGE);
-int RPC_ENTRY NdrServerUnmarshall(struct IRpcChannelBuffer*,PRPC_MESSAGE,PMIDL_STUB_MESSAGE,PMIDL_STUB_DESC,PFORMAT_STRING,void*);
-void RPC_ENTRY NdrServerMarshall(struct IRpcStubBuffer*,struct IRpcChannelBuffer*,PMIDL_STUB_MESSAGE,PFORMAT_STRING);
-RPC_STATUS RPC_ENTRY NdrMapCommAndFaultStatus(PMIDL_STUB_MESSAGE,unsigned long*,unsigned long*,RPC_STATUS);
-int RPC_ENTRY NdrSH_UPDecision(PMIDL_STUB_MESSAGE,unsigned char**,RPC_BUFPTR);
-int RPC_ENTRY NdrSH_TLUPDecision(PMIDL_STUB_MESSAGE,unsigned char**);
-int RPC_ENTRY NdrSH_TLUPDecisionBuffer(PMIDL_STUB_MESSAGE,unsigned char**);
-int RPC_ENTRY NdrSH_IfAlloc(PMIDL_STUB_MESSAGE,unsigned char**,unsigned long);
-int RPC_ENTRY NdrSH_IfAllocRef(PMIDL_STUB_MESSAGE,unsigned char**,unsigned long);
-int RPC_ENTRY NdrSH_IfAllocSet(PMIDL_STUB_MESSAGE,unsigned char**,unsigned long);
-RPC_BUFPTR RPC_ENTRY NdrSH_IfCopy(PMIDL_STUB_MESSAGE,unsigned char**,unsigned long);
-RPC_BUFPTR RPC_ENTRY NdrSH_IfAllocCopy(PMIDL_STUB_MESSAGE,unsigned char**,unsigned long);
-unsigned long RPC_ENTRY NdrSH_Copy(unsigned char*,unsigned char*,unsigned long);
-void RPC_ENTRY NdrSH_IfFree(PMIDL_STUB_MESSAGE,unsigned char*);
-RPC_BUFPTR RPC_ENTRY NdrSH_StringMarshall(PMIDL_STUB_MESSAGE,unsigned char*,unsigned long,int);
-RPC_BUFPTR RPC_ENTRY NdrSH_StringUnMarshall(PMIDL_STUB_MESSAGE,unsigned char**,int);
-typedef void *RPC_SS_THREAD_HANDLE;
-typedef void* __RPC_API RPC_CLIENT_ALLOC(unsigned int);
-typedef void __RPC_API RPC_CLIENT_FREE(void*);
-void*RPC_ENTRY RpcSsAllocate(unsigned int);
-void RPC_ENTRY RpcSsDisableAllocate(void);
-void RPC_ENTRY RpcSsEnableAllocate(void);
-void RPC_ENTRY RpcSsFree(void*);
-RPC_SS_THREAD_HANDLE RPC_ENTRY RpcSsGetThreadHandle(void);
-void RPC_ENTRY RpcSsSetClientAllocFree(RPC_CLIENT_ALLOC*,RPC_CLIENT_FREE*);
-void RPC_ENTRY RpcSsSetThreadHandle(RPC_SS_THREAD_HANDLE);
-void RPC_ENTRY RpcSsSwapClientAllocFree(RPC_CLIENT_ALLOC*,RPC_CLIENT_FREE*,RPC_CLIENT_ALLOC**,RPC_CLIENT_FREE**);
-void*RPC_ENTRY RpcSmAllocate(unsigned int,RPC_STATUS*);
-RPC_STATUS RPC_ENTRY RpcSmClientFree(void*);
-RPC_STATUS RPC_ENTRY RpcSmDestroyClientContext(void**);
-RPC_STATUS RPC_ENTRY RpcSmDisableAllocate(void);
-RPC_STATUS RPC_ENTRY RpcSmEnableAllocate(void);
-RPC_STATUS RPC_ENTRY RpcSmFree(void*);
-RPC_SS_THREAD_HANDLE RPC_ENTRY RpcSmGetThreadHandle(RPC_STATUS*);
-RPC_STATUS RPC_ENTRY RpcSmSetClientAllocFree(RPC_CLIENT_ALLOC*,RPC_CLIENT_FREE*);
-RPC_STATUS RPC_ENTRY RpcSmSetThreadHandle(RPC_SS_THREAD_HANDLE);
-RPC_STATUS RPC_ENTRY RpcSmSwapClientAllocFree(RPC_CLIENT_ALLOC*,RPC_CLIENT_FREE*,RPC_CLIENT_ALLOC**,RPC_CLIENT_FREE**);
-void RPC_ENTRY NdrRpcSsEnableAllocate(PMIDL_STUB_MESSAGE);
-void RPC_ENTRY NdrRpcSsDisableAllocate(PMIDL_STUB_MESSAGE);
-void RPC_ENTRY NdrRpcSmSetClientToOsf(PMIDL_STUB_MESSAGE);
-void*RPC_ENTRY NdrRpcSmClientAllocate(unsigned int);
-void RPC_ENTRY NdrRpcSmClientFree(void*);
-void*RPC_ENTRY NdrRpcSsDefaultAllocate(unsigned int);
-void RPC_ENTRY NdrRpcSsDefaultFree(void*);
-PFULL_PTR_XLAT_TABLES RPC_ENTRY NdrFullPointerXlatInit(unsigned long,XLAT_SIDE);
-void RPC_ENTRY NdrFullPointerXlatFree(PFULL_PTR_XLAT_TABLES);
-int RPC_ENTRY NdrFullPointerQueryPointer(PFULL_PTR_XLAT_TABLES,void*,unsigned char,unsigned long*);
-int RPC_ENTRY NdrFullPointerQueryRefId(PFULL_PTR_XLAT_TABLES,unsigned long,unsigned char,void**);
-void RPC_ENTRY NdrFullPointerInsertRefId(PFULL_PTR_XLAT_TABLES,unsigned long,void*);
-int RPC_ENTRY NdrFullPointerFree(PFULL_PTR_XLAT_TABLES,void*);
-void*RPC_ENTRY NdrAllocate(PMIDL_STUB_MESSAGE,unsigned int);
-void RPC_ENTRY NdrClearOutParameters(PMIDL_STUB_MESSAGE,PFORMAT_STRING,void*);
-void*RPC_ENTRY NdrOleAllocate(unsigned int);
-void RPC_ENTRY NdrOleFree(void*);
-unsigned char*RPC_ENTRY NdrUserMarshalMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-unsigned char*RPC_ENTRY NdrUserMarshalUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
-void RPC_ENTRY NdrUserMarshalBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-unsigned long RPC_ENTRY NdrUserMarshalMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
-void RPC_ENTRY NdrUserMarshalFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/rpcnsi.h b/winsup/w32api/include/rpcnsi.h
deleted file mode 100644
index c8b25eb..0000000
--- a/winsup/w32api/include/rpcnsi.h
+++ /dev/null
@@ -1,122 +0,0 @@
-#ifndef _RPCNSI_H
-#define _RPCNSI_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-typedef void *RPC_NS_HANDLE;
-#define RPC_C_NS_SYNTAX_DEFAULT 0
-#define RPC_C_NS_SYNTAX_DCE 3
-#define RPC_C_PROFILE_DEFAULT_ELT 0
-#define RPC_C_PROFILE_ALL_ELT 1
-#define RPC_C_PROFILE_MATCH_BY_IF 2
-#define RPC_C_PROFILE_MATCH_BY_MBR 3
-#define RPC_C_PROFILE_MATCH_BY_BOTH 4
-#define RPC_C_NS_DEFAULT_EXP_AGE -1
-
-RPC_STATUS RPC_ENTRY RpcNsBindingExportA(unsigned long,unsigned char*,RPC_IF_HANDLE,RPC_BINDING_VECTOR*,UUID_VECTOR*);
-RPC_STATUS RPC_ENTRY RpcNsBindingUnexportA(unsigned long,unsigned char*,RPC_IF_HANDLE,UUID_VECTOR*);
-RPC_STATUS RPC_ENTRY RpcNsBindingLookupBeginA(unsigned long,unsigned char*,RPC_IF_HANDLE,UUID*,unsigned long,RPC_NS_HANDLE*);
-RPC_STATUS RPC_ENTRY RpcNsBindingLookupNext(RPC_NS_HANDLE,RPC_BINDING_VECTOR**);
-RPC_STATUS RPC_ENTRY RpcNsBindingLookupDone(RPC_NS_HANDLE*);
-RPC_STATUS RPC_ENTRY RpcNsGroupDeleteA(unsigned long,unsigned char*);
-RPC_STATUS RPC_ENTRY RpcNsGroupMbrAddA(unsigned long,unsigned char*,unsigned long,unsigned char*);
-RPC_STATUS RPC_ENTRY RpcNsGroupMbrRemoveA(unsigned long,unsigned char*,unsigned long,unsigned char*);
-RPC_STATUS RPC_ENTRY RpcNsGroupMbrInqBeginA(unsigned long,unsigned char*,unsigned long,RPC_NS_HANDLE*);
-RPC_STATUS RPC_ENTRY RpcNsGroupMbrInqNextA(RPC_NS_HANDLE,unsigned char**);
-RPC_STATUS RPC_ENTRY RpcNsGroupMbrInqDone(RPC_NS_HANDLE*);
-RPC_STATUS RPC_ENTRY RpcNsProfileDeleteA(unsigned long,unsigned char*);
-RPC_STATUS RPC_ENTRY RpcNsProfileEltAddA(unsigned long,unsigned char*,RPC_IF_ID*,unsigned long,unsigned char*,unsigned long,unsigned char*);
-RPC_STATUS RPC_ENTRY RpcNsProfileEltRemoveA(unsigned long,unsigned char*,RPC_IF_ID*,unsigned long,unsigned char*);
-RPC_STATUS RPC_ENTRY RpcNsProfileEltInqBeginA(unsigned long,unsigned char*,unsigned long,RPC_IF_ID*,unsigned long,unsigned long,unsigned char*,RPC_NS_HANDLE*);
-RPC_STATUS RPC_ENTRY RpcNsProfileEltInqNextA(RPC_NS_HANDLE,RPC_IF_ID*,unsigned char**,unsigned long*,unsigned char**);
-RPC_STATUS RPC_ENTRY RpcNsProfileEltInqDone(RPC_NS_HANDLE*);
-RPC_STATUS RPC_ENTRY RpcNsEntryObjectInqNext(/*IN*/ RPC_NS_HANDLE,/*OUT*/ UUID*);
-RPC_STATUS RPC_ENTRY RpcNsEntryObjectInqDone(/*IN OUT*/ RPC_NS_HANDLE*);
-RPC_STATUS RPC_ENTRY RpcNsEntryExpandNameA(unsigned long,unsigned char*,unsigned char**);
-RPC_STATUS RPC_ENTRY RpcNsMgmtBindingUnexportA(unsigned long,unsigned char*,RPC_IF_ID*,unsigned long,UUID_VECTOR*);
-RPC_STATUS RPC_ENTRY RpcNsMgmtEntryCreateA(unsigned long,unsigned char*);
-RPC_STATUS RPC_ENTRY RpcNsMgmtEntryDeleteA(unsigned long,unsigned char*);
-RPC_STATUS RPC_ENTRY RpcNsMgmtEntryInqIfIdsA(unsigned long,unsigned char*,RPC_IF_ID_VECTOR**);
-RPC_STATUS RPC_ENTRY RpcNsMgmtHandleSetExpAge(RPC_NS_HANDLE,unsigned long);
-RPC_STATUS RPC_ENTRY RpcNsMgmtInqExpAge(unsigned long*);
-RPC_STATUS RPC_ENTRY RpcNsMgmtSetExpAge(unsigned long);
-RPC_STATUS RPC_ENTRY RpcNsBindingImportNext(RPC_NS_HANDLE,RPC_BINDING_HANDLE*);
-RPC_STATUS RPC_ENTRY RpcNsBindingImportDone(RPC_NS_HANDLE*);
-RPC_STATUS RPC_ENTRY RpcNsBindingSelect(RPC_BINDING_VECTOR*,RPC_BINDING_HANDLE*);
-#ifndef UNICODE_ONLY
-RPC_STATUS RPC_ENTRY RpcNsEntryObjectInqBeginA(unsigned long,unsigned char*,RPC_NS_HANDLE*);
-RPC_STATUS RPC_ENTRY RpcNsBindingImportBeginA(unsigned long,unsigned char*,RPC_IF_HANDLE,UUID*,RPC_NS_HANDLE*);
-#endif
-#ifdef RPC_UNICODE_SUPPORTED
-RPC_STATUS RPC_ENTRY RpcNsBindingExportW(unsigned long,unsigned short*,RPC_IF_HANDLE,RPC_BINDING_VECTOR*,UUID_VECTOR*);
-RPC_STATUS RPC_ENTRY RpcNsBindingUnexportW(unsigned long,unsigned short*,RPC_IF_HANDLE,UUID_VECTOR*);
-RPC_STATUS RPC_ENTRY RpcNsBindingLookupBeginW(unsigned long,unsigned short*,RPC_IF_HANDLE,UUID*,unsigned long,RPC_NS_HANDLE*);
-RPC_STATUS RPC_ENTRY RpcNsGroupDeleteW(unsigned long,unsigned short*);
-RPC_STATUS RPC_ENTRY RpcNsGroupMbrAddW(unsigned long,unsigned short*,unsigned long,unsigned short*);
-RPC_STATUS RPC_ENTRY RpcNsGroupMbrRemoveW(unsigned long,unsigned short*,unsigned long,unsigned short*);
-RPC_STATUS RPC_ENTRY RpcNsGroupMbrInqBeginW(unsigned long,unsigned short*,unsigned long,RPC_NS_HANDLE*);
-RPC_STATUS RPC_ENTRY RpcNsGroupMbrInqNextW(RPC_NS_HANDLE,unsigned short**);
-RPC_STATUS RPC_ENTRY RpcNsProfileDeleteW(unsigned long,unsigned short*);
-RPC_STATUS RPC_ENTRY RpcNsProfileEltAddW(unsigned long,unsigned short*, RPC_IF_ID*,unsigned long,unsigned short*,unsigned long,unsigned short*);
-RPC_STATUS RPC_ENTRY RpcNsProfileEltRemoveW(unsigned long,unsigned short*, RPC_IF_ID*,unsigned long,unsigned short*);
-RPC_STATUS RPC_ENTRY RpcNsProfileEltInqBeginW(unsigned long,unsigned short*, unsigned long,RPC_IF_ID*,unsigned long,unsigned long,unsigned short*, RPC_NS_HANDLE*);
-RPC_STATUS RPC_ENTRY RpcNsProfileEltInqNextW(RPC_NS_HANDLE,RPC_IF_ID*, unsigned short**,unsigned long*,unsigned short**);
-RPC_STATUS RPC_ENTRY RpcNsEntryObjectInqBeginW(unsigned long,unsigned short*,RPC_NS_HANDLE*);
-RPC_STATUS RPC_ENTRY RpcNsEntryExpandNameW(unsigned long,unsigned short*,unsigned short**);
-RPC_STATUS RPC_ENTRY RpcNsMgmtBindingUnexportW(unsigned long,unsigned short*,RPC_IF_ID*,unsigned long,UUID_VECTOR*);
-RPC_STATUS RPC_ENTRY RpcNsMgmtEntryCreateW(unsigned long,unsigned short*);
-RPC_STATUS RPC_ENTRY RpcNsMgmtEntryDeleteW(unsigned long,unsigned short*);
-RPC_STATUS RPC_ENTRY RpcNsMgmtEntryInqIfIdsW(unsigned long,unsigned short , RPC_IF_ID_VECTOR**);
-RPC_STATUS RPC_ENTRY RpcNsBindingImportBeginW(unsigned long,unsigned short*,RPC_IF_HANDLE,UUID*,RPC_NS_HANDLE*);
-#endif /* RPC_UNICODE_SUPPORTED */
-#ifdef UNICODE
-#define RpcNsBindingLookupBegin RpcNsBindingLookupBeginW
-#define RpcNsBindingImportBegin RpcNsBindingImportBeginW
-#define RpcNsBindingExport RpcNsBindingExportW
-#define RpcNsBindingUnexport RpcNsBindingUnexportW
-#define RpcNsGroupDelete RpcNsGroupDeleteW
-#define RpcNsGroupMbrAdd RpcNsGroupMbrAddW
-#define RpcNsGroupMbrRemove RpcNsGroupMbrRemoveW
-#define RpcNsGroupMbrInqBegin RpcNsGroupMbrInqBeginW
-#define RpcNsGroupMbrInqNext RpcNsGroupMbrInqNextW
-#define RpcNsEntryExpandName RpcNsEntryExpandNameW
-#define RpcNsEntryObjectInqBegin RpcNsEntryObjectInqBeginW
-#define RpcNsMgmtBindingUnexport RpcNsMgmtBindingUnexportW
-#define RpcNsMgmtEntryCreate RpcNsMgmtEntryCreateW
-#define RpcNsMgmtEntryDelete RpcNsMgmtEntryDeleteW
-#define RpcNsMgmtEntryInqIfIds RpcNsMgmtEntryInqIfIdsW
-#define RpcNsProfileDelete RpcNsProfileDeleteW
-#define RpcNsProfileEltAdd RpcNsProfileEltAddW
-#define RpcNsProfileEltRemove RpcNsProfileEltRemoveW
-#define RpcNsProfileEltInqBegin RpcNsProfileEltInqBeginW
-#define RpcNsProfileEltInqNext RpcNsProfileEltInqNextW
-#else
-#define RpcNsBindingLookupBegin RpcNsBindingLookupBeginA
-#define RpcNsBindingImportBegin RpcNsBindingImportBeginA
-#define RpcNsBindingExport RpcNsBindingExportA
-#define RpcNsBindingUnexport RpcNsBindingUnexportA
-#define RpcNsGroupDelete RpcNsGroupDeleteA
-#define RpcNsGroupMbrAdd RpcNsGroupMbrAddA
-#define RpcNsGroupMbrRemove RpcNsGroupMbrRemoveA
-#define RpcNsGroupMbrInqBegin RpcNsGroupMbrInqBeginA
-#define RpcNsGroupMbrInqNext RpcNsGroupMbrInqNextA
-#define RpcNsEntryExpandName RpcNsEntryExpandNameA
-#define RpcNsEntryObjectInqBegin RpcNsEntryObjectInqBeginA
-#define RpcNsMgmtBindingUnexport RpcNsMgmtBindingUnexportA
-#define RpcNsMgmtEntryCreate RpcNsMgmtEntryCreateA
-#define RpcNsMgmtEntryDelete RpcNsMgmtEntryDeleteA
-#define RpcNsMgmtEntryInqIfIds RpcNsMgmtEntryInqIfIdsA
-#define RpcNsProfileDelete RpcNsProfileDeleteA
-#define RpcNsProfileEltAdd RpcNsProfileEltAddA
-#define RpcNsProfileEltRemove RpcNsProfileEltRemoveA
-#define RpcNsProfileEltInqBegin RpcNsProfileEltInqBeginA
-#define RpcNsProfileEltInqNext RpcNsProfileEltInqNextA
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/rpcnsip.h b/winsup/w32api/include/rpcnsip.h
deleted file mode 100644
index 3c50dad..0000000
--- a/winsup/w32api/include/rpcnsip.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef _RPCNSIP_H
-#define _RPCNSIP_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-typedef struct {
- RPC_NS_HANDLE LookupContext;
- RPC_BINDING_HANDLE ProposedHandle;
- RPC_BINDING_VECTOR *Bindings;
-} RPC_IMPORT_CONTEXT_P,*PRPC_IMPORT_CONTEXT_P;
-RPC_STATUS RPC_ENTRY I_RpcNsGetBuffer(/*IN*/ PRPC_MESSAGE);
-RPC_STATUS RPC_ENTRY I_RpcNsSendReceive(/*IN*/ PRPC_MESSAGE,/*OUT*/ RPC_BINDING_HANDLE*);
-void RPC_ENTRY I_RpcNsRaiseException(/*IN*/ PRPC_MESSAGE,/*IN*/ RPC_STATUS);
-RPC_STATUS RPC_ENTRY I_RpcReBindBuffer(/*IN*/ PRPC_MESSAGE);
-RPC_STATUS RPC_ENTRY I_NsServerBindSearch(void);
-RPC_STATUS RPC_ENTRY I_NsClientBindSearch(void);
-void RPC_ENTRY I_NsClientBindDone(void);
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/rpcnterr.h b/winsup/w32api/include/rpcnterr.h
deleted file mode 100644
index b23c429..0000000
--- a/winsup/w32api/include/rpcnterr.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef _RPCNTERR_H
-#define _RPCNTERR_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#define RPC_S_OK ERROR_SUCCESS
-#define RPC_S_INVALID_ARG ERROR_INVALID_PARAMETER
-#define RPC_S_OUT_OF_MEMORY ERROR_OUTOFMEMORY
-#define RPC_S_OUT_OF_THREADS ERROR_MAX_THRDS_REACHED
-#define RPC_S_INVALID_LEVEL ERROR_INVALID_PARAMETER
-#define RPC_S_BUFFER_TOO_SMALL ERROR_INSUFFICIENT_BUFFER
-#define RPC_S_INVALID_SECURITY_DESC ERROR_INVALID_SECURITY_DESCR
-#define RPC_S_ACCESS_DENIED ERROR_ACCESS_DENIED
-#define RPC_S_SERVER_OUT_OF_MEMORY ERROR_NOT_ENOUGH_SERVER_MEMORY
-#define RPC_X_NO_MEMORY RPC_S_OUT_OF_MEMORY
-#define RPC_X_INVALID_BOUND RPC_S_INVALID_BOUND
-#define RPC_X_INVALID_TAG RPC_S_INVALID_TAG
-#define RPC_X_ENUM_VALUE_TOO_LARGE RPC_X_ENUM_VALUE_OUT_OF_RANGE
-#define RPC_X_SS_CONTEXT_MISMATCH ERROR_INVALID_HANDLE
-#define RPC_X_INVALID_BUFFER ERROR_INVALID_USER_BUFFER
-#define RPC_X_INVALID_PIPE_OPERATION RPC_X_WRONG_PIPE_ORDER
-#endif
diff --git a/winsup/w32api/include/rpcproxy.h b/winsup/w32api/include/rpcproxy.h
deleted file mode 100644
index d4fcce5..0000000
--- a/winsup/w32api/include/rpcproxy.h
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- -DREGISTER_PROXY_DLL Generates DllMain, DllRegisterServer, and DllUnregisterServer
- -DPROXY_CLSID=clsid Specifies a class ID to be used by the proxy DLL.
- -DPROXY_CLSID_IS={..} Specifies the class ID to be used by the proxy DLL.
- -DNT35_STRICT No new features
-*/
-#ifndef _RPCPROXY_H
-#define _RPCPROXY_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#if defined __cplusplus && !defined CINTERFACE
-#warning "rpcproxy type definitions require CINTERFACE"
-#else
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include <rpc.h>
-#include <rpcndr.h>
-#include <string.h>
-
-#define CStdStubBuffer_METHODS CStdStubBuffer_QueryInterface,CStdStubBuffer_AddRef,\
-CStdStubBuffer_Release,CStdStubBuffer_Connect,CStdStubBuffer_Disconnect,CStdStubBuffer_Invoke,\
-CStdStubBuffer_IsIIDSupported,CStdStubBuffer_CountRefs,CStdStubBuffer_DebugServerQueryInterface,\
-CStdStubBuffer_DebugServerRelease
-#define IID_GENERIC_CHECK_IID(name,pIID,index) memcmp(pIID,name##_ProxyVtblList[index]->header.piid,16)
-#define IID_BS_LOOKUP_SETUP int result, low=-1;
-#define IID_BS_LOOKUP_INITIAL_TEST(name,sz,split) if ((result = name##_CHECK_IID(split))>0) { low=sz-split;} else if (!result) { low = split; goto found_label; }
-#define IID_BS_LOOKUP_NEXT_TEST(name,split) if ((result = name##_CHECK_IID(low+split))>=0) { low=low+split; if (!result) goto found_label; }
-#define IID_BS_LOOKUP_RETURN_RESULT(name,sz,index) low+=1; if ((low>=sz )||(result=name##_CHECK_IID(low))) goto not_found_label; found_label: (index)=low; return 1; not_found_label: return 0;
-#define REGISTER_PROXY_DLL_ROUTINES(pProxyFileList, pClsID) \
-HINSTANCE hProxyDll = 0; \
-BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) \
-{ \
-if(fdwReason == DLL_PROCESS_ATTACH) hProxyDll = hinstDLL; \
-return TRUE; \
-} \
-HRESULT STDAPICALLTYPE DllRegisterServer(void) \
-{\
-return NdrDllRegisterProxy(hProxyDll, pProxyFileList, pClsID); \
-}\
-HRESULT STDAPICALLTYPE DllUnregisterServer(void)\
-{\
-return NdrDllUnregisterProxy(hProxyDll, pProxyFileList, pClsID);\
-}
-#ifdef PROXY_CLSID
-#define CLSID_PSFACTORYBUFFER extern CLSID PROXY_CLSID;
-#else
-#ifdef PROXY_CLSID_IS
-#define CLSID_PSFACTORYBUFFER const CLSID CLSID_PSFactoryBuffer = PROXY_CLSID_IS;
-#define PROXY_CLSID CLSID_PSFactoryBuffer
-#else
-#define CLSID_PSFACTORYBUFFER
-#endif
-#endif
-#ifndef PROXY_CLSID
-#define GET_DLL_CLSID (aProxyFileList[0]->pStubVtblList[0] != 0 ? aProxyFileList[0]->pStubVtblList[0]->header.piid : 0)
-#else
-#define GET_DLL_CLSID &PROXY_CLSID
-#endif
-#define EXTERN_PROXY_FILE(name) EXTERN_C const ProxyFileInfo name##_ProxyFileInfo;
-#define PROXYFILE_LIST_START const ProxyFileInfo * aProxyFileList[] = {
-#define REFERENCE_PROXY_FILE(name) & name##_ProxyFileInfo
-#define PROXYFILE_LIST_END 0 };
-#define DLLDATA_GETPROXYDLLINFO(pPFList,pClsid) \
-void RPC_ENTRY GetProxyDllInfo( const ProxyFileInfo*** pInfo, const CLSID ** pId ) \
-{ *pInfo = pPFList; *pId = pClsid; };
-#define DLLGETCLASSOBJECTROUTINE(pPFlist, pClsid,pFactory) HRESULT STDAPICALLTYPE DllGetClassObject(REFCLSID rclsid,REFIID riid,void **ppv) \
-{ return NdrDllGetClassObject(rclsid,riid,ppv,pPFlist,pClsid,pFactory ); }
-#define DLLCANUNLOADNOW(pFactory) HRESULT STDAPICALLTYPE DllCanUnloadNow(void) \
-{ return NdrDllCanUnloadNow( pFactory ); }
-#define DLLDUMMYPURECALL void __cdecl _purecall(void) { }
-#define CSTDSTUBBUFFERRELEASE(pFactory) ULONG STDMETHODCALLTYPE CStdStubBuffer_Release(IRpcStubBuffer *This) \
-{ return NdrCStdStubBuffer_Release(This,(IPSFactoryBuffer *)pFactory); }
-#ifdef PROXY_DELEGATION
-#define CSTDSTUBBUFFER2RELEASE(pFactory) ULONG STDMETHODCALLTYPE CStdStubBuffer2_Release(IRpcStubBuffer *This) \
-{ return NdrCStdStubBuffer2_Release(This,(IPSFactoryBuffer *)pFactory); }
-#else
-#define CSTDSTUBBUFFER2RELEASE(pFactory)
-#endif
-
-#ifdef REGISTER_PROXY_DLL
-#define DLLREGISTRY_ROUTINES(pProxyFileList,pClsID ) REGISTER_PROXY_DLL_ROUTINES(pProxyFileList,pClsID)
-#else
-#define DLLREGISTRY_ROUTINES(pProxyFileList,pClsID)
-#endif
-#define DLLDATA_ROUTINES(pProxyFileList,pClsID) \
-CLSID_PSFACTORYBUFFER \
-CStdPSFactoryBuffer gPFactory = {0,0,0,0}; \
-DLLDATA_GETPROXYDLLINFO(pProxyFileList,pClsID) \
-DLLGETCLASSOBJECTROUTINE(pProxyFileList,pClsID,&gPFactory) \
-DLLCANUNLOADNOW(&gPFactory) \
-CSTDSTUBBUFFERRELEASE(&gPFactory) \
-CSTDSTUBBUFFER2RELEASE(&gPFactory) \
-DLLDUMMYPURECALL \
-DLLREGISTRY_ROUTINES(pProxyFileList, pClsID)
-
-#define DLLDATA_STANDARD_ROUTINES DLLDATA_ROUTINES( (const ProxyFileInfo**) pProxyFileList, &CLSID_PSFactoryBuffer)
-
-struct tagCInterfaceStubVtbl;
-struct tagCInterfaceProxyVtbl;
-typedef struct tagCInterfaceStubVtbl *PCInterfaceStubVtblList;
-typedef struct tagCInterfaceProxyVtbl *PCInterfaceProxyVtblList;
-typedef const char *PCInterfaceName;
-typedef int __stdcall IIDLookupRtn(const IID*,int*);
-typedef IIDLookupRtn *PIIDLookup;
-typedef struct tagProxyFileInfo {
- const PCInterfaceProxyVtblList *pProxyVtblList;
- const PCInterfaceStubVtblList *pStubVtblList;
- const PCInterfaceName * pNamesArray;
- const IID ** pDelegatedIIDs;
- const PIIDLookup pIIDLookupRtn;
- unsigned short TableSize;
- unsigned short TableVersion;
- unsigned long Filler1;
- unsigned long Filler2;
- unsigned long Filler3;
- unsigned long Filler4;
-}ProxyFileInfo;
-typedef ProxyFileInfo ExtendedProxyFileInfo;
-
-typedef struct tagCInterfaceProxyHeader {
-#ifdef USE_STUBLESS_PROXY
- const void *pStublessProxyInfo;
-#endif
- const IID *piid;
-} CInterfaceProxyHeader;
-typedef struct tagCInterfaceProxyVtbl {
- CInterfaceProxyHeader header;
-#if defined(__WATCOMC__)
- void *Vtbl[1];
-#else
-#ifdef __GNUC__
-__extension__
-#endif
- void *Vtbl[0];
-#endif
-} CInterfaceProxyVtbl;
-typedef void (__RPC_STUB *PRPC_STUB_FUNCTION)(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,DWORD*);
-typedef struct tagCInterfaceStubHeader {
- const IID *piid;
- const MIDL_SERVER_INFO *pServerInfo;
- unsigned long DispatchTableCount;
- const PRPC_STUB_FUNCTION *pDispatchTable;
-} CInterfaceStubHeader;
-typedef struct tagCInterfaceStubVtbl {
- CInterfaceStubHeader header;
- IRpcStubBufferVtbl Vtbl;
-} CInterfaceStubVtbl;
-typedef struct tagCStdStubBuffer {
- const struct IRpcStubBufferVtbl * lpVtbl;
- long RefCount;
- struct IUnknown *pvServerObject;
- const struct ICallFactoryVtbl * pCallFactoryVtbl;
- const IID * pAsyncIID;
- struct IPSFactoryBuffer * pPSFactory;
- const struct IReleaseMarshalBuffersVtbl * pRMBVtbl;
-} CStdStubBuffer;
-typedef struct tagCStdPSFactoryBuffer {
- const IPSFactoryBufferVtbl *lpVtbl;
- long RefCount;
- const ProxyFileInfo ** pProxyFileList;
- long Filler1;
-} CStdPSFactoryBuffer;
-void RPC_ENTRY NdrProxyInitialize(void*,PRPC_MESSAGE,PMIDL_STUB_MESSAGE,PMIDL_STUB_DESC,unsigned int);
-void RPC_ENTRY NdrProxyGetBuffer(void*,PMIDL_STUB_MESSAGE);
-void RPC_ENTRY NdrProxySendReceive(void*,MIDL_STUB_MESSAGE*);
-void RPC_ENTRY NdrProxyFreeBuffer(void*,MIDL_STUB_MESSAGE*);
-HRESULT RPC_ENTRY NdrProxyErrorHandler(DWORD);
-void RPC_ENTRY NdrStubInitialize(PRPC_MESSAGE,PMIDL_STUB_MESSAGE,PMIDL_STUB_DESC,IRpcChannelBuffer*);
-void __RPC_STUB NdrStubForwardingFunction(IRpcStubBuffer*,IRpcChannelBuffer*,PRPC_MESSAGE,DWORD*);
-void RPC_ENTRY NdrStubGetBuffer(IRpcStubBuffer*,IRpcChannelBuffer*,PMIDL_STUB_MESSAGE);
-HRESULT RPC_ENTRY NdrStubErrorHandler(DWORD);
-HRESULT STDMETHODCALLTYPE CStdStubBuffer_QueryInterface(IRpcStubBuffer*,REFIID,void**);
-ULONG STDMETHODCALLTYPE CStdStubBuffer_AddRef(IRpcStubBuffer*);
-ULONG STDMETHODCALLTYPE CStdStubBuffer_Release(IRpcStubBuffer*);
-ULONG STDMETHODCALLTYPE NdrCStdStubBuffer_Release(IRpcStubBuffer*,IPSFactoryBuffer*);
-HRESULT STDMETHODCALLTYPE CStdStubBuffer_Connect(IRpcStubBuffer*,IUnknown*);
-void STDMETHODCALLTYPE CStdStubBuffer_Disconnect(IRpcStubBuffer*);
-HRESULT STDMETHODCALLTYPE CStdStubBuffer_Invoke(IRpcStubBuffer*,RPCOLEMESSAGE*,IRpcChannelBuffer*);
-IRpcStubBuffer* STDMETHODCALLTYPE CStdStubBuffer_IsIIDSupported(IRpcStubBuffer*,REFIID);
-ULONG STDMETHODCALLTYPE CStdStubBuffer_CountRefs(IRpcStubBuffer*);
-HRESULT STDMETHODCALLTYPE CStdStubBuffer_DebugServerQueryInterface(IRpcStubBuffer*,void**);
-void STDMETHODCALLTYPE CStdStubBuffer_DebugServerRelease(IRpcStubBuffer*,void*);
-HRESULT RPC_ENTRY NdrDllGetClassObject(REFCLSID,REFIID,void**,const ProxyFileInfo**,const CLSID*,CStdPSFactoryBuffer*);
-HRESULT RPC_ENTRY NdrDllCanUnloadNow(CStdPSFactoryBuffer*);
-#ifndef NT35_STRICT
-HRESULT RPC_ENTRY NdrDllRegisterProxy(HMODULE,const ProxyFileInfo**,const CLSID*);
-HRESULT RPC_ENTRY NdrDllUnregisterProxy(HMODULE,const ProxyFileInfo**,const CLSID*);
-#define STUB_FORWARDING_FUNCTION NdrStubForwardingFunction
-ULONG STDMETHODCALLTYPE
-CStdStubBuffer2_Release(IRpcStubBuffer*);
-ULONG STDMETHODCALLTYPE
-NdrCStdStubBuffer2_Release(IRpcStubBuffer*,IPSFactoryBuffer*);
-#define CStdStubBuffer_DELEGATING_METHODS 0, 0, CStdStubBuffer2_Release, 0, 0, 0, 0, 0, 0, 0
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* defined __cplusplus && !defined CINTERFACE */
-#endif /* ndef _RPCPROXY_H */
-
diff --git a/winsup/w32api/include/rtutils.h b/winsup/w32api/include/rtutils.h
deleted file mode 100644
index 56c7fc1..0000000
--- a/winsup/w32api/include/rtutils.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * rtutils.h - Routing and Remote Access Services
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may use,
- * modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-#ifndef _RTUTILS_H
-#define _RTUTILS_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- Tracing Reference */
-#if (_WIN32_WINNT >= 0x0500)
-DWORD WINAPI TraceDeregisterA(DWORD);
-DWORD WINAPI TraceDeregisterW(DWORD);
-DWORD WINAPI TraceDeregisterExA(DWORD,DWORD);
-DWORD WINAPI TraceDeregisterExW(DWORD,DWORD);
-#define TRACE_NO_SYNCH 0x00000004
-#define TraceDumpA(a,b,c,d,e,f) TraceDumpExA((a),0,(b),(c),(d),(e),(f))
-#define TraceDumpW(a,b,c,d,e,f) TraceDumpExW((a),0,(b),(c),(d),(e),(f))
-DWORD WINAPI TraceDumpExA(DWORD,DWORD,LPBYTE,DWORD,DWORD,BOOL,LPCSTR);
-DWORD WINAPI TraceDumpExW(DWORD,DWORD,LPBYTE,DWORD,DWORD,BOOL,LPCWSTR);
-DWORD WINAPI TracePrintfA(DWORD,LPCSTR,...);
-DWORD WINAPI TracePrintfW(DWORD,LPCWSTR,...);
-DWORD WINAPI TracePrintfExA(DWORD,DWORD,LPCSTR,...);
-DWORD WINAPI TracePrintfExW(DWORD,DWORD,LPCWSTR,...);
-#define TracePutsA(a,b) TracePutsExA((a),0,(b))
-#define TracePutsW(a,b) TracePutsExW((a),0,(b))
-DWORD WINAPI TracePutsExA(DWORD,DWORD,LPCSTR);
-DWORD WINAPI TracePutsExW(DWORD,DWORD,LPCWSTR);
-#define TraceRegisterA(a) TraceRegisterExA((a),0)
-#define TraceRegisterW(a) TraceRegisterExW((a),0)
-DWORD WINAPI TraceRegisterExA(LPCSTR,DWORD);
-DWORD WINAPI TraceRegisterExW(LPCWSTR,DWORD);
-#define TRACE_USE_FILE 0x00000001
-#define TRACE_USE_CONSOLE 0x00000002
-#define INVALID_TRACEID 0xFFFFFFFF
-#define TraceVprintfA(a,b,c) TraceVprintfExA((a),0,(b),(c))
-#define TraceVprintfW(a,b,c) TraceVprintfExW((a),0,(b),(c))
-DWORD WINAPI TraceVprintfExA(DWORD,DWORD,LPCSTR,va_list);
-DWORD WINAPI TraceVprintfExW(DWORD,DWORD,LPCWSTR,va_list);
-#define TRACE_NO_STDINFO 0x00000001
-#define TRACE_USE_MASK 0x00000002
-#define TRACE_USE_MSEC 0x00000004
-#ifdef UNICODE
-#define TraceDeregister TraceDeregisterW
-#define TraceDeregisterEx TraceDeregisterExW
-#define TraceDump TraceDumpW
-#define TraceDumpEx TraceDumpExW
-#define TracePrintf TracePrintfW
-#define TracePrintfEx TracePrintfExW
-#define TracePuts TracePutsW
-#define TracePutsEx TracePutsExW
-#define TraceRegister TraceRegisterW
-#define TraceRegisterEx TraceRegisterExW
-#define TraceVprintf TraceVprintfW
-#define TraceVprintfEx TraceVprintfExW
-#else
-#define TraceDeregister TraceDeregisterA
-#define TraceDeregisterEx TraceDeregisterExA
-#define TraceDump TraceDumpA
-#define TraceDumpEx TraceDumpExA
-#define TracePrintf TracePrintfA
-#define TracePrintfEx TracePrintfExA
-#define TracePuts TracePutsA
-#define TracePutsEx TracePutsExA
-#define TraceRegister TraceRegisterA
-#define TraceRegisterEx TraceRegisterExA
-#define TraceVprintf TraceVprintfA
-#define TraceVprintfEx TraceVprintfExA
-#endif
-#endif /* (_WIN32_WINNT >= 0x0500) */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/schannel.h b/winsup/w32api/include/schannel.h
deleted file mode 100644
index e010555..0000000
--- a/winsup/w32api/include/schannel.h
+++ /dev/null
@@ -1,90 +0,0 @@
-#ifndef _SCHANNEL_H
-#define _SCHANNEL_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#include <wincrypt.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define SCHANNEL_CRED_VERSION 4
-#define SCHANNEL_SHUTDOWN 1
-/* ? Do these belong here or in wincrypt.h */
-#define AUTHTYPE_CLIENT 1
-#define AUTHTYPE_SERVER 2
-
-#define SP_PROT_TLS1_CLIENT 128
-#define SP_PROT_TLS1_SERVER 64
-#define SP_PROT_SSL3_CLIENT 32
-#define SP_PROT_SSL3_SERVER 16
-#define SP_PROT_SSL2_CLIENT 8
-#define SP_PROT_SSL2_SERVER 4
-#define SP_PROT_PCT1_SERVER 1
-#define SP_PROT_PCT1_CLIENT 2
-
-#define SP_PROT_PCT1 (SP_PROT_PCT1_CLIENT|SP_PROT_PCT1_SERVER)
-#define SP_PROT_TLS1 (SP_PROT_TLS1_CLIENT|SP_PROT_TLS1_SERVER)
-#define SP_PROT_SSL2 (SP_PROT_SSL2_CLIENT|SP_PROT_SSL2_SERVER)
-#define SP_PROT_SSL3 (SP_PROT_SSL3_CLIENT|SP_PROT_SSL3_SERVER)
-
-#define SCH_CRED_NO_SYSTEM_MAPPER 2
-#define SCH_CRED_NO_SERVERNAME_CHECK 4
-#define SCH_CRED_MANUAL_CRED_VALIDATION 8
-#define SCH_CRED_NO_DEFAULT_CREDS 16
-#define SCH_CRED_AUTO_CRED_VALIDATION 32
-#define SCH_CRED_REVOCATION_CHECK_CHAIN 512
-#define SCH_CRED_REVOCATION_CHECK_END_CERT 256
-#define SCH_CRED_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT 1024
-#define SCH_CRED_IGNORE_NO_REVOCATION_CHECK 2048
-#define SCH_CRED_IGNORE_REVOCATION_OFFLINE 4096
-#define SCH_CRED_USE_DEFAULT_CREDS 64
-
-typedef struct _SCHANNEL_CRED {
- DWORD dwVersion;
- DWORD cCreds;
- PCCERT_CONTEXT* paCred;
- HCERTSTORE hRootStore;
- DWORD cMappers;
- struct _HMAPPER** aphMappers;
- DWORD cSupportedAlgs;
- ALG_ID* palgSupportedAlgs;
- DWORD grbitEnabledProtocols;
- DWORD dwMinimumCypherStrength;
- DWORD dwMaximumCypherStrength;
- DWORD dwSessionLifespan;
- DWORD dwFlags;
- DWORD reserved;
-} SCHANNEL_CRED, *PSCHANNEL_CRED;
-typedef struct _SecPkgCred_SupportedAlgs {
- DWORD cSupportedAlgs;
- ALG_ID* palgSupportedAlgs;
-} SecPkgCred_SupportedAlgs, *PSecPkgCred_SupportedAlgs;
-typedef struct _SecPkgCred_CypherStrengths {
- DWORD dwMinimumCypherStrength;
- DWORD dwMaximumCypherStrength;
-} SecPkgCred_CypherStrengths, *PSecPkgCred_CypherStrengths;
-typedef struct _SecPkgCred_SupportedProtocols {
- DWORD grbitProtocol;
-} SecPkgCred_SupportedProtocols, *PSecPkgCred_SupportedProtocols;
-typedef struct _SecPkgContext_IssuerListInfoEx {
- PCERT_NAME_BLOB aIssuers;
- DWORD cIssuers;
-} SecPkgContext_IssuerListInfoEx, *PSecPkgContext_IssuerListInfoEx;
-typedef struct _SecPkgContext_ConnectionInfo {
- DWORD dwProtocol;
- ALG_ID aiCipher;
- DWORD dwCipherStrength;
- ALG_ID aiHash;
- DWORD dwHashStrength;
- ALG_ID aiExch;
- DWORD dwExchStrength;
-} SecPkgContext_ConnectionInfo, *PSecPkgContext_ConnectionInfo;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SCHANNEL_H */
diff --git a/winsup/w32api/include/schnlsp.h b/winsup/w32api/include/schnlsp.h
deleted file mode 100644
index 8e9e095..0000000
--- a/winsup/w32api/include/schnlsp.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef _SCHNLSP_H
-#define _SCHNLSP_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-
-#define SECPKG_ATTR_SUPPORTED_ALGS 86
-#define SECPKG_ATTR_CIPHER_STRENGTHS 87
-#define SECPKG_ATTR_SUPPORTED_PROTOCOLS 88
-
-#include <schannel.h>
-
-#endif /* _SCHNLSP_H */
diff --git a/winsup/w32api/include/scrnsave.h b/winsup/w32api/include/scrnsave.h
deleted file mode 100644
index 5cee4b6..0000000
--- a/winsup/w32api/include/scrnsave.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- Screen saver library by Anders Norlander <anorland@hem2.passagen.se>
-
- This library is (hopefully) compatible with Microsoft's
- screen saver library.
-
- This is public domain software.
-
- */
-#ifndef _SCRNSAVE_H
-#define _SCRNSAVE_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* configure dialog identifier */
-#define DLG_SCRNSAVECONFIGURE 2003
-
-#define idsIsPassword 1000
-#define idsIniFile 1001
-#define idsScreenSaver 1002
-#define idsPassword 1003
-#define idsDifferentPW 1004
-#define idsChangePW 1005
-#define idsBadOldPW 1006
-#define idsAppName 1007
-#define idsNoHelpMemory 1008
-#define idsHelpFile 1009
-#define idsDefKeyword 1010
-
-#define IDS_DESCRIPTION 1
-#define ID_APP 100
-
-#define WS_GT (WS_GROUP | WS_TABSTOP)
-#define SCRM_VERIFYPW WM_APP
-#define MAXFILELEN 13
-#define TITLEBARNAMELEN 40
-#define APPNAMEBUFFERLEN 40
-#define BUFFLEN 255
-
-#ifndef RC_INVOKED
-
-/* functions provided by the aothor of the screen saver */
-BOOL WINAPI ScreenSaverConfigureDialog(HWND,UINT,WPARAM,LPARAM);
-BOOL WINAPI RegisterDialogClasses(HANDLE);
-LONG WINAPI ScreenSaverProc(HWND,UINT,WPARAM,LPARAM);
-
-/* Change name of function if we are using UNICODE */
-#ifdef UNICODE
-#define DefScreenSaverProc DefScreenSaverProcW
-#endif
-
-/* default screen saver proc; call instead of DefWindowProc */
-LONG WINAPI DefScreenSaverProc(HWND,UINT,WPARAM,LPARAM);
-
-/* change password */
-void WINAPI ScreenSaverChangePassword(HWND);
-
-/* globals that may be used by screen saver */
-extern HINSTANCE hMainInstance;
-extern HWND hMainWindow;
-extern BOOL fChildPreview;
-extern TCHAR szName[];
-extern TCHAR szAppName[];
-extern TCHAR szIniFile[];
-extern TCHAR szScreenSaver[];
-extern TCHAR szHelpFile[];
-extern TCHAR szNoHelpMemory[];
-extern UINT MyHelpMessage;
-
-#endif /* RC_INVOKED */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SCRNSAVE_H */
diff --git a/winsup/w32api/include/sddl.h b/winsup/w32api/include/sddl.h
deleted file mode 100755
index 093c6dd..0000000
--- a/winsup/w32api/include/sddl.h
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifndef _SDDL_H
-#define _SDDL_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifndef WINADVAPI
-#define WINADVAPI
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if (WINVER >= 0x0500)
-WINADVAPI BOOL WINAPI ConvertSidToStringSidA(PSID Sid, LPSTR* StringSid);
-WINADVAPI BOOL WINAPI ConvertSidToStringSidW(PSID Sid, LPWSTR* StringSid);
-WINADVAPI BOOL WINAPI ConvertStringSidToSidA(LPSTR StringSid, PSID *Sid);
-WINADVAPI BOOL WINAPI ConvertStringSidToSidW(LPWSTR StringSid, PSID *Sid);
-#endif
-
-#ifdef UNICODE
-#define ConvertSidToStringSid ConvertSidToStringSidW
-#define ConvertStringSidToSid ConvertStringSidToSidW
-#else
-#define ConvertSidToStringSid ConvertSidToStringSidA
-#define ConvertStringSidToSid ConvertStringSidToSidA
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SDDL_H */
diff --git a/winsup/w32api/include/secext.h b/winsup/w32api/include/secext.h
deleted file mode 100644
index 15457e0..0000000
--- a/winsup/w32api/include/secext.h
+++ /dev/null
@@ -1,52 +0,0 @@
-#ifndef _SECEXT_H
-#define _SECEXT_H
-
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef RC_INVOKED
-#if (_WIN32_WINNT >= 0x0500)
-typedef enum
-{
- NameUnknown = 0,
- NameFullyQualifiedDN = 1,
- NameSamCompatible = 2,
- NameDisplay = 3,
- NameUniqueId = 6,
- NameCanonical = 7,
- NameUserPrincipal = 8,
- NameCanonicalEx = 9,
- NameServicePrincipal = 10,
- NameDnsDomain = 12
-} EXTENDED_NAME_FORMAT, *PEXTENDED_NAME_FORMAT;
-
-BOOLEAN WINAPI GetComputerObjectNameA(EXTENDED_NAME_FORMAT,LPSTR,PULONG);
-BOOLEAN WINAPI GetComputerObjectNameW(EXTENDED_NAME_FORMAT,LPWSTR,PULONG);
-BOOLEAN WINAPI GetUserNameExA(EXTENDED_NAME_FORMAT,LPSTR,PULONG);
-BOOLEAN WINAPI GetUserNameExW(EXTENDED_NAME_FORMAT,LPWSTR,PULONG);
-BOOLEAN WINAPI TranslateNameA(LPCSTR,EXTENDED_NAME_FORMAT,EXTENDED_NAME_FORMAT,LPSTR,PULONG);
-BOOLEAN WINAPI TranslateNameW(LPCWSTR,EXTENDED_NAME_FORMAT,EXTENDED_NAME_FORMAT,LPWSTR,PULONG);
-
-#ifdef UNICODE
-#define GetComputerObjectName GetComputerObjectNameW
-#define GetUserNameEx GetUserNameExW
-#define TranslateName TranslateNameW
-#else
-#define GetComputerObjectName GetComputerObjectNameA
-#define GetUserNameEx GetUserNameExA
-#define TranslateName TranslateNameA
-#endif
-
-#endif /* ! RC_INVOKED */
-#endif /* _WIN32_WINNT >= 0x0500 */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ! _SECEXT_H */
diff --git a/winsup/w32api/include/security.h b/winsup/w32api/include/security.h
deleted file mode 100644
index 9685cf0..0000000
--- a/winsup/w32api/include/security.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef _SECURITY_H
-#define _SECURITY_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-
-#define SEC_E_OK 0
-#define SEC_E_CERT_EXPIRED (-2146893016)
-#define SEC_E_INCOMPLETE_MESSAGE (-2146893032)
-#define SEC_E_INSUFFICIENT_MEMORY (-2146893056)
-#define SEC_E_INTERNAL_ERROR (-2146893052)
-#define SEC_E_INVALID_HANDLE (-2146893055)
-#define SEC_E_INVALID_TOKEN (-2146893048)
-#define SEC_E_LOGON_DENIED (-2146893044)
-#define SEC_E_NO_AUTHENTICATING_AUTHORITY (-2146893039)
-#define SEC_E_NO_CREDENTIALS (-2146893042)
-#define SEC_E_TARGET_UNKNOWN (-2146893053)
-#define SEC_E_UNSUPPORTED_FUNCTION (-2146893054)
-#define SEC_E_UNTRUSTED_ROOT (-2146893019)
-#define SEC_E_WRONG_PRINCIPAL (-2146893022)
-#define SEC_E_SECPKG_NOT_FOUND (-2146893051)
-#define SEC_E_QOP_NOT_SUPPORTED (-2146893046)
-#define SEC_E_UNKNOWN_CREDENTIALS (-2146893043)
-#define SEC_E_NOT_OWNER (-2146893050)
-#define SEC_I_RENEGOTIATE 590625
-#define SEC_I_COMPLETE_AND_CONTINUE 590612
-#define SEC_I_COMPLETE_NEEDED 590611
-#define SEC_I_CONTINUE_NEEDED 590610
-#define SEC_I_INCOMPLETE_CREDENTIALS 590624
-
-/* always a char */
-typedef char SEC_CHAR;
-typedef wchar_t SEC_WCHAR;
-typedef long SECURITY_STATUS;
-#define SEC_FAR
-
-#include <sspi.h>
-#include <ntsecpkg.h>
-#include <secext.h>
-
-#endif /* _SECURITY_H */
diff --git a/winsup/w32api/include/servprov.h b/winsup/w32api/include/servprov.h
deleted file mode 100644
index 7666102..0000000
--- a/winsup/w32api/include/servprov.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef _SERVPROV_H
-#define _SERVPROV_H
-#define _OLEIDL_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-EXTERN_C const IID IID_IServiceProvider;
-#define INTERFACE IServiceProvider
-DECLARE_INTERFACE_(IServiceProvider,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(QueryService)(THIS_ REFGUID,REFIID,void**) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IServiceProvider_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IServiceProvider_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IServiceProvider_Release(T) (T)->lpVtbl->Release(T)
-#define IServiceProvider_QueryService(T,a,b,c) (T)->lpVtbl->QueryService(T,a,b,c)
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/setupapi.h b/winsup/w32api/include/setupapi.h
deleted file mode 100644
index ef38852..0000000
--- a/winsup/w32api/include/setupapi.h
+++ /dev/null
@@ -1,1590 +0,0 @@
-#ifndef _SETUPAPI_H
-#define _SETUPAPI_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#include <commctrl.h>
-#include <pshpack1.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define WINSETUPAPI DECLSPEC_IMPORT
-
-#define LINE_LEN 256
-#define MAX_INF_STRING_LENGTH 4096
-#define MAX_TITLE_LEN 60
-#define MAX_INSTRUCTION_LEN 256
-#define MAX_LABEL_LEN 30
-#define MAX_SERVICE_NAME_LEN 256
-#define MAX_SUBTITLE_LEN 256
-#define SP_MAX_MACHINENAME_LENGTH (MAX_PATH + 3)
-
-#define COPYFLG_WARN_IF_SKIP 0x00000001
-#define COPYFLG_NOSKIP 0x00000002
-#define COPYFLG_NOVERSIONCHECK 0x00000004
-#define COPYFLG_FORCE_FILE_IN_USE 0x00000008
-#define COPYFLG_NO_OVERWRITE 0x00000010
-#define COPYFLG_NO_VERSION_DIALOG 0x00000020
-#define COPYFLG_OVERWRITE_OLDER_ONLY 0x00000040
-#define COPYFLG_REPLACEONLY 0x00000400
-#define COPYFLG_NODECOMP 0x00000800
-#define COPYFLG_REPLACE_BOOT_FILE 0x00001000
-#define COPYFLG_NOPRUNE 0x00002000
-#define DELFLG_IN_USE 0x00000001
-#define DELFLG_IN_USE1 0x00010000
-#define DI_REMOVEDEVICE_GLOBAL 0x00000001
-#define DI_REMOVEDEVICE_CONFIGSPECIFIC 0x00000002
-#define DI_UNREMOVEDEVICE_CONFIGSPECIFIC 0x00000002
-#define DI_SHOWOEM 0x00000001
-#define DI_SHOWCOMPAT 0x00000002
-#define DI_SHOWCLASS 0x00000004
-#define DI_SHOWALL 0x00000007
-#define DI_NOVCP 0x00000008
-#define DI_DIDCOMPAT 0x00000010
-#define DI_DIDCLASS 0x00000020
-#define DI_AUTOASSIGNRES 0x00000040
-#define DI_NEEDRESTART 0x00000080
-#define DI_NEEDREBOOT 0x00000100
-#define DI_NOBROWSE 0x00000200
-#define DI_MULTMFGS 0x00000400
-#define DI_DISABLED 0x00000800
-#define DI_GENERALPAGE_ADDED 0x00001000
-#define DI_RESOURCEPAGE_ADDED 0x00002000
-#define DI_PROPERTIES_CHANGE 0x00004000
-#define DI_INF_IS_SORTED 0x00008000
-#define DI_ENUMSINGLEINF 0x00010000
-#define DI_DONOTCALLCONFIGMG 0x00020000
-#define DI_INSTALLDISABLED 0x00040000
-#define DI_COMPAT_FROM_CLASS 0x00080000
-#define DI_CLASSINSTALLPARAMS 0x00100000
-#define DI_NODI_DEFAULTACTION 0x00200000
-#define DI_QUIETINSTALL 0x00800000
-#define DI_NOFILECOPY 0x01000000
-#define DI_FORCECOPY 0x02000000
-#define DI_DRIVERPAGE_ADDED 0x04000000
-#define DI_USECI_SELECTSTRINGS 0x08000000
-#define DI_OVERRIDE_INFFLAGS 0x10000000
-#define DI_PROPS_NOCHANGEUSAGE 0x20000000
-#define DI_NOSELECTICONS 0x40000000
-#define DI_NOWRITE_IDS 0x80000000
-#define DI_FLAGSEX_USEOLDINFSEARCH 0x00000001
-#define DI_FLAGSEX_AUTOSELECTRANK0 0x00000002
-#define DI_FLAGSEX_CI_FAILED 0x00000004
-#define DI_FLAGSEX_DIDINFOLIST 0x00000010
-#define DI_FLAGSEX_DIDCOMPATINFO 0x00000020
-#define DI_FLAGSEX_FILTERCLASSES 0x00000040
-#define DI_FLAGSEX_SETFAILEDINSTALL 0x00000080
-#define DI_FLAGSEX_DEVICECHANGE 0x00000100
-#define DI_FLAGSEX_ALWAYSWRITEIDS 0x00000200
-#define DI_FLAGSEX_PROPCHANGE_PENDING 0x00000400
-#define DI_FLAGSEX_ALLOWEXCLUDEDDRVS 0x00000800
-#define DI_FLAGSEX_NOUIONQUERYREMOVE 0x00001000
-#define DI_FLAGSEX_USECLASSFORCOMPAT 0x00002000
-#define DI_FLAGSEX_OLDINF_IN_CLASSLIST 0x00004000
-#define DI_FLAGSEX_NO_DRVREG_MODIFY 0x00008000
-#define DI_FLAGSEX_IN_SYSTEM_SETUP 0x00010000
-#define DI_FLAGSEX_INET_DRIVER 0x00020000
-#define DI_FLAGSEX_APPENDDRIVERLIST 0x00040000
-#define DI_FLAGSEX_PREINSTALLBACKUP 0x00080000
-#define DI_FLAGSEX_BACKUPONREPLACE 0x00100000
-#define DI_FLAGSEX_DRIVERLIST_FROM_URL 0x00200000
-#define DI_FLAGSEX_RESERVED1 0x00400000
-#define DI_FLAGSEX_EXCLUDE_OLD_INET_DRIVERS 0x00800000
-#define DI_FLAGSEX_POWERPAGE_ADDED 0x01000000
-#define DIBCI_NOINSTALLCLASS 0x00000001
-#define DIBCI_NODISPLAYCLASS 0x00000002
-#define DICD_GENERATE_ID 0x00000001
-#define DICD_INHERIT_CLASSDRVS 0x00000002
-#define DICS_ENABLE 1
-#define DICS_FLAG_GLOBAL 1
-#define DICS_DISABLE 2
-#define DICS_FLAG_CONFIGSPECIFIC 2
-#define DICS_PROPCHANGE 3
-#define DICS_START 4
-#define DICS_FLAG_CONFIGGENERAL 4
-#define DICS_STOP 5
-#define DIF_SELECTDEVICE 1
-#define DIF_INSTALLDEVICE 2
-#define DIF_ASSIGNRESOURCES 3
-#define DIF_PROPERTIES 4
-#define DIF_REMOVE 5
-#define DIF_FIRSTTIMESETUP 6
-#define DIF_FOUNDDEVICE 7
-#define DIF_SELECTCLASSDRIVERS 8
-#define DIF_VALIDATECLASSDRIVERS 9
-#define DIF_INSTALLCLASSDRIVERS 10
-#define DIF_CALCDISKSPACE 11
-#define DIF_DESTROYPRIVATEDATA 12
-#define DIF_VALIDATEDRIVER 13
-#define DIF_MOVEDEVICE 14
-#define DIF_DETECT 15
-#define DIF_INSTALLWIZARD 16
-#define DIF_DESTROYWIZARDDATA 17
-#define DIF_PROPERTYCHANGE 18
-#define DIF_ENABLECLASS 19
-#define DIF_DETECTVERIFY 20
-#define DIF_INSTALLDEVICEFILES 21
-#define DIF_UNREMOVE 22
-#define DIF_SELECTBESTCOMPATDRV 23
-#define DIF_ALLOW_INSTALL 24
-#define DIF_REGISTERDEVICE 25
-#define DIF_NEWDEVICEWIZARD_PRESELECT 26
-#define DIF_NEWDEVICEWIZARD_SELECT 27
-#define DIF_NEWDEVICEWIZARD_PREANALYZE 28
-#define DIF_NEWDEVICEWIZARD_POSTANALYZE 29
-#define DIF_NEWDEVICEWIZARD_FINISHINSTALL 30
-#define DIF_UNUSED1 31
-#define DIF_INSTALLINTERFACES 32
-#define DIF_DETECTCANCEL 33
-#define DIF_REGISTER_COINSTALLERS 34
-#define DIF_ADDPROPERTYPAGE_ADVANCED 35
-#define DIF_ADDPROPERTYPAGE_BASIC 36
-#define DIF_RESERVED1 37
-#define DIF_TROUBLESHOOTER 38
-#define DIF_POWERMESSAGEWAKE 39
-#define DIGCF_DEFAULT 0x00000001
-#define DIGCDP_FLAG_BASIC 0x00000001
-#define DIGCF_PRESENT 0x00000002
-#define DIGCDP_FLAG_ADVANCED 0x00000002
-#define DIGCF_ALLCLASSES 0x00000004
-#define DIGCF_PROFILE 0x00000008
-#define DIGCF_DEVICEINTERFACE 0x00000010
-#define DIGCF_INTERFACEDEVICE 0x00000010
-#define DIOCR_INSTALLER 0x00000001
-#define DIOCR_INTERFACE 0x00000002
-#define DIODI_NO_ADD 0x00000001
-#define DIOD_INHERIT_CLASSDRVS 0x00000002
-#define DIOD_CANCEL_REMOVE 0x00000004
-#define DIREG_DEV 0x00000001
-#define DIREG_DRV 0x00000002
-#define DIREG_BOTH 0x00000004
-#define DIRID_ABSOLUTE -1
-#define DIRID_NULL 0
-#define DIRID_SRCPATH 1
-#define DIRID_WINDOWS 10
-#define DIRID_SYSTEM 11
-#define DIRID_DRIVERS 12
-#define DIRID_INF 17
-#define DIRID_HELP 18
-#define DIRID_FONTS 20
-#define DIRID_VIEWERS 21
-#define DIRID_COLOR 23
-#define DIRID_APPS 24
-#define DIRID_SHARED 25
-#define DIRID_BOOT 30
-#define DIRID_SYSTEM16 50
-#define DIRID_SPOOL 51
-#define DIRID_SPOOLDRIVERS 52
-#define DIRID_USERPROFILE 53
-#define DIRID_LOADER 54
-#define DIRID_PRINTPROCESSOR 55
-#define DIRID_COMMON_STARTMENU 16406
-#define DIRID_COMMON_PROGRAMS 16407
-#define DIRID_COMMON_STARTUP 16408
-#define DIRID_COMMON_DESKTOPDIRECTORY 16409
-#define DIRID_COMMON_FAVORITES 16415
-#define DIRID_COMMON_APPDATA 16419
-#define DIRID_PROGRAM_FILES 16422
-#define DIRID_SYSTEM_X86 16425
-#define DIRID_PROGRAM_FILES_X86 16426
-#define DIRID_PROGRAM_FILES_COMMON 16427
-#define DIRID_PROGRAM_FILES_COMMONX86 16428
-#define DIRID_COMMON_TEMPLATES 16429
-#define DIRID_COMMON_DOCUMENTS 16430
-#define DIRID_USER 0x8000
-#define DIRID_ABSOLUTE_16BIT 0xffff
-#define DIRID_IOSUBSYS DIRID_DRIVERS
-#define DIRID_DEFAULT DIRID_SYSTEM
-#define DMI_MASK 0x00000001
-#define DMI_BKCOLOR 0x00000002
-#define DMI_USERECT 0x00000004
-#define DNF_DUPDESC 0x00000001
-#define DNF_OLDDRIVER 0x00000002
-#define DNF_EXCLUDEFROMLIST 0x00000004
-#define DNF_NODRIVER 0x00000008
-#define DNF_LEGACYINF 0x00000010
-#define DNF_CLASS_DRIVER 0x00000020
-#define DNF_COMPATIBLE_DRIVER 0x00000040
-#define DNF_INET_DRIVER 0x00000080
-#define DNF_UNUSED1 0x00000100
-#define DNF_INDEXED_DRIVER 0x00000200
-#define DNF_OLD_INET_DRIVER 0x00000400
-#define DNF_BAD_DRIVER 0x00000800
-#define DNF_DUPPROVIDER 0x00001000
-#define DPROMPT_SUCCESS 0
-#define DPROMPT_CANCEL 1
-#define DPROMPT_SKIPFILE 2
-#define DPROMPT_BUFFERTOOSMALL 3
-#define DPROMPT_OUTOFMEMORY 4
-#define DRIVER_HARDWAREID_RANK 0x00000FFF
-#define DYNAWIZ_FLAG_PAGESADDED 0x00000001
-#define DYNAWIZ_FLAG_INSTALLDET_NEXT 0x00000002
-#define DYNAWIZ_FLAG_INSTALLDET_PREV 0x00000004
-#define DYNAWIZ_FLAG_ANALYZE_HANDLECONFLICT 0x00000008
-#define ENABLECLASS_QUERY 0
-#define ENABLECLASS_SUCCESS 1
-#define ENABLECLASS_FAILURE 2
-#define ERROR_EXPECTED_SECTION_NAME (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0)
-#define ERROR_BAD_SECTION_NAME_LINE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|1)
-#define ERROR_SECTION_NAME_TOO_LONG (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|2)
-#define ERROR_GENERAL_SYNTAX (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|3)
-#define ERROR_WRONG_INF_STYLE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x100)
-#define ERROR_NOT_INSTALLED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x1000)
-#define ERROR_SECTION_NOT_FOUND (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x101)
-#define ERROR_LINE_NOT_FOUND (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x102)
-#define ERROR_NO_BACKUP (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x103)
-#define ERROR_NO_ASSOCIATED_CLASS (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x200)
-#define ERROR_CLASS_MISMATCH (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x201)
-#define ERROR_DUPLICATE_FOUND (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x202)
-#define ERROR_NO_DRIVER_SELECTED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x203)
-#define ERROR_KEY_DOES_NOT_EXIST (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x204)
-#define ERROR_INVALID_DEVINST_NAME (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x205)
-#define ERROR_INVALID_CLASS (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x206)
-#define ERROR_DEVINST_ALREADY_EXISTS (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x207)
-#define ERROR_DEVINFO_NOT_REGISTERED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x208)
-#define ERROR_INVALID_REG_PROPERTY (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x209)
-#define ERROR_NO_INF (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x20A)
-#define ERROR_NO_SUCH_DEVINST (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x20B)
-#define ERROR_CANT_LOAD_CLASS_ICON (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x20C)
-#define ERROR_INVALID_CLASS_INSTALLER (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x20D)
-#define ERROR_DI_DO_DEFAULT (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x20E)
-#define ERROR_DI_NOFILECOPY (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x20F)
-#define ERROR_INVALID_HWPROFILE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x210)
-#define ERROR_NO_DEVICE_SELECTED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x211)
-#define ERROR_DEVINFO_LIST_LOCKED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x212)
-#define ERROR_DEVINFO_DATA_LOCKED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x213)
-#define ERROR_DI_BAD_PATH (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x214)
-#define ERROR_NO_CLASSINSTALL_PARAMS (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x215)
-#define ERROR_FILEQUEUE_LOCKED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x216)
-#define ERROR_BAD_SERVICE_INSTALLSECT (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x217)
-#define ERROR_NO_CLASS_DRIVER_LIST (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x218)
-#define ERROR_NO_ASSOCIATED_SERVICE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x219)
-#define ERROR_NO_DEFAULT_DEVICE_INTERFACE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x21A)
-#define ERROR_DEVICE_INTERFACE_ACTIVE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x21B)
-#define ERROR_DEVICE_INTERFACE_REMOVED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x21C)
-#define ERROR_BAD_INTERFACE_INSTALLSECT (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x21D)
-#define ERROR_NO_SUCH_INTERFACE_CLASS (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x21E)
-#define ERROR_INVALID_REFERENCE_STRING (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x21F)
-#define ERROR_INVALID_MACHINENAME (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x220)
-#define ERROR_REMOTE_COMM_FAILURE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x221)
-#define ERROR_MACHINE_UNAVAILABLE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x222)
-#define ERROR_NO_CONFIGMGR_SERVICES (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x223)
-#define ERROR_INVALID_PROPPAGE_PROVIDER (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x224)
-#define ERROR_NO_SUCH_DEVICE_INTERFACE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x225)
-#define ERROR_DI_POSTPROCESSING_REQUIRED (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x226)
-#define ERROR_INVALID_COINSTALLER (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x227)
-#define ERROR_NO_COMPAT_DRIVERS (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x228)
-#define ERROR_NO_DEVICE_ICON (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x229)
-#define ERROR_INVALID_INF_LOGCONFIG (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x22A)
-#define ERROR_DI_DONT_INSTALL (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x22B)
-#define ERROR_INVALID_FILTER_DRIVER (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x22C)
-#define ERROR_NON_WINDOWS_NT_DRIVER (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x22D)
-#define ERROR_NON_WINDOWS_DRIVER (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x22E)
-#define ERROR_NO_CATALOG_FOR_OEM_INF (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x22F)
-#define ERROR_DEVINSTALL_QUEUE_NONNATIVE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x230)
-#define ERROR_NOT_DISABLEABLE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x231)
-#define ERROR_CANT_REMOVE_DEVINST (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x232)
-#define ERROR_INTERFACE_DEVICE_ACTIVE ERROR_DEVICE_INTERFACE_ACTIVE
-#define ERROR_INTERFACE_DEVICE_REMOVED ERROR_DEVICE_INTERFACE_REMOVED
-#define ERROR_NO_DEFAULT_INTERFACE_DEVICE ERROR_NO_DEFAULT_DEVICE_INTERFACE
-#define ERROR_NO_SUCH_INTERFACE_DEVICE ERROR_NO_SUCH_DEVICE_INTERFACE
-
-#define FILEOP_COPY 0
-#define FILEOP_ABORT 0
-#define FILE_COMPRESSION_NONE 0
-#define FILEOP_RENAME 1
-#define FILEOP_DOIT 1
-#define FILE_COMPRESSION_WINLZA 1
-#define FILEOP_DELETE 2
-#define FILEOP_SKIP 2
-#define FILE_COMPRESSION_MSZIP 2
-#define FILEOP_BACKUP 3
-#define FILE_COMPRESSION_NTCAB 3
-#define FILEOP_NEWPATH 4
-#define FILEOP_RETRY FILEOP_DOIT
-#define FLG_ADDREG_TYPE_SZ 0x00000000
-#define FLG_ADDREG_BINVALUETYPE 0x00000001
-#define FLG_ADDREG_NOCLOBBER 0x00000002
-#define FLG_ADDREG_DELVAL 0x00000004
-#define FLG_ADDREG_APPEND 0x00000008
-#define FLG_ADDREG_KEYONLY 0x00000010
-#define FLG_ADDREG_OVERWRITEONLY 0x00000020
-#if (_SETUPAPI_VER >= 0x0501)
-#define FLG_ADDREG_64BITKEY 0x00001000
-#define FLG_ADDREG_KEYONLY_COMMON 0x00002000
-#define FLG_ADDREG_32BITKEY 0x00004000
-#define FLG_ADDREG_DELREG_BIT 0x00008000
-#endif
-#define FLG_ADDREG_TYPE_MULTI_SZ 0x00010000
-#define FLG_ADDREG_TYPE_EXPAND_SZ 0x00020000
-#define FLG_ADDREG_TYPE_BINARY (0x00000000|FLG_ADDREG_BINVALUETYPE)
-#define FLG_ADDREG_TYPE_DWORD (0x00010000|FLG_ADDREG_BINVALUETYPE)
-#define FLG_ADDREG_TYPE_NONE (0x00020000|FLG_ADDREG_BINVALUETYPE)
-#define FLG_ADDREG_TYPE_MASK (0xFFFF0000|FLG_ADDREG_BINVALUETYPE)
-#define FLG_DELREG_VALUE 0x00000000
-#if (_SETUPAPI_VER >= 0x0501)
-#define FLG_DELREG_TYPE_MASK FLG_ADDREG_TYPE_MASK
-#define FLG_DELREG_TYPE_SZ FLG_ADDREG_TYPE_SZ
-#define FLG_DELREG_TYPE_MULTI_SZ FLG_ADDREG_TYPE_MULTI_SZ
-#define FLG_DELREG_TYPE_EXPAND_SZ FLG_ADDREG_TYPE_EXPAND_SZ
-#define FLG_DELREG_TYPE_BINARY FLG_ADDREG_TYPE_BINARY
-#define FLG_DELREG_TYPE_DWORD FLG_ADDREG_TYPE_DWORD
-#define FLG_DELREG_TYPE_NONE FLG_ADDREG_TYPE_NONE
-#define FLG_DELREG_64BITKEY FLG_ADDREG_64BITKEY
-#define FLG_DELREG_KEYONLY_COMMON FLG_ADDREG_KEYONLY_COMMON
-#define FLG_DELREG_32BITKEY FLG_ADDREG_32BITKEY
-#define FLG_DELREG_OPERATION_MASK 0x000000FE
-#define FLG_DELREG_MULTI_SZ_DELSTRING (0x00000002|FLG_DELREG_TYPE_MULTI_SZ|FLG_ADDREG_DELREG_BIT)
-#endif
-#define FLG_BITREG_CLEARBITS 0x00000000
-#define FLG_BITREG_SETBITS 0x00000001
-#define FLG_PROFITEM_CURRENTUSER 0x00000001
-#define FLG_PROFITEM_DELETE 0x00000002
-#define FLG_PROFITEM_GROUP 0x00000004
-#define FLG_PROFITEM_CSIDL 0x00000008
-#define FLG_REGSVR_DLLREGISTER 0x00000001
-#define FLG_REGSVR_DLLINSTALL 0x00000002
-#define MIN_IDD_DYNAWIZ_RESOURCE_ID 10000
-#define MAX_IDD_DYNAWIZ_RESOURCE_ID 11000
-#define IDD_DYNAWIZ_FIRSTPAGE 10000
-#define IDD_DYNAWIZ_SELECT_PREVPAGE 10001
-#define IDD_DYNAWIZ_SELECT_NEXTPAGE 10002
-#define IDD_DYNAWIZ_ANALYZE_PREVPAGE 10003
-#define IDD_DYNAWIZ_ANALYZE_NEXTPAGE 10004
-#define IDD_DYNAWIZ_INSTALLDETECTED_PREVPAGE 10006
-#define IDD_DYNAWIZ_INSTALLDETECTED_NEXTPAGE 10007
-#define IDD_DYNAWIZ_INSTALLDETECTED_NODEVS 10008
-#define IDD_DYNAWIZ_SELECTDEV_PAGE 10009
-#define IDD_DYNAWIZ_ANALYZEDEV_PAGE 10010
-#define IDD_DYNAWIZ_INSTALLDETECTEDDEVS_PAGE 10011
-#define IDD_DYNAWIZ_SELECTCLASS_PAGE 10012
-#define IDF_NOBROWSE 0x00000001
-#define IDF_NOSKIP 0x00000002
-#define IDF_NODETAILS 0x00000004
-#define IDF_NOCOMPRESSED 0x00000008
-#define IDF_CHECKFIRST 0x00000100
-#define IDF_NOBEEP 0x00000200
-#define IDF_NOFOREGROUND 0x00000400
-#define IDF_WARNIFSKIP 0x00000800
-#define IDF_OEMDISK 0x80000000
-#define IDI_RESOURCEFIRST 159
-#define IDI_RESOURCE 159
-#define IDI_RESOURCELAST 161
-#define IDI_RESOURCEOVERLAYFIRST 161
-#define IDI_RESOURCEOVERLAYLAST 161
-#define IDI_CONFLICT 161
-#define IDI_PROBLEM_OVL 500
-#define IDI_DISABLED_OVL 501
-#define IDI_FORCED_OVL 502
-#define IDI_CLASSICON_OVERLAYFIRST 500
-#define IDI_CLASSICON_OVERLAYLAST 502
-#define INF_STYLE_NONE 0x00000000
-#define INF_STYLE_OLDNT 0x00000001
-#define INF_STYLE_WIN4 0x00000002
-#define INF_STYLE_CACHE_ENABLE 0x00000010
-#define INF_STYLE_CACHE_DISABLE 0x00000020
-#define INFINFO_INF_SPEC_IS_HINF 1
-#define INFINFO_INF_NAME_IS_ABSOLUTE 2
-#define INFINFO_DEFAULT_SEARCH 3
-#define INFINFO_REVERSE_DEFAULT_SEARCH 4
-#define INFINFO_INF_PATH_LIST_SEARCH 5
-#define LogSevInformation 0
-#define LogSevWarning 1
-#define LogSevError 2
-#define LogSevFatalError 3
-#define LogSevMaximum 4
-#define LogSeverity DWORD
-#define MAX_INSTALLWIZARD_DYNAPAGES 20
-#define NDW_INSTALLFLAG_DIDFACTDEFS 0x00000001
-#define NDW_INSTALLFLAG_HARDWAREALLREADYIN 0x00000002
-#define NDW_INSTALLFLAG_NEEDSHUTDOWN 0x00000200
-#define NDW_INSTALLFLAG_EXPRESSINTRO 0x00000400
-#define NDW_INSTALLFLAG_SKIPISDEVINSTALLED 0x00000800
-#define NDW_INSTALLFLAG_NODETECTEDDEVS 0x00001000
-#define NDW_INSTALLFLAG_INSTALLSPECIFIC 0x00002000
-#define NDW_INSTALLFLAG_SKIPCLASSLIST 0x00004000
-#define NDW_INSTALLFLAG_CI_PICKED_OEM 0x00008000
-#define NDW_INSTALLFLAG_PCMCIAMODE 0x00010000
-#define NDW_INSTALLFLAG_PCMCIADEVICE 0x00020000
-#define NDW_INSTALLFLAG_USERCANCEL 0x00040000
-#define NDW_INSTALLFLAG_KNOWNCLASS 0x00080000
-#define NDW_INSTALLFLAG_NEEDRESTART 0x00000080
-#define NDW_INSTALLFLAG_NEEDREBOOT 0x00000100
-#if (_SETUPAPI_VER >= 0x0502)
-#define SCWMI_CLOBBER_SECURITY 0x00000001
-#endif
-#define SETDIRID_NOT_FULL_PATH 0x00000001
-#define SP_COPY_DELETESOURCE 0x0000001
-#define SP_COPY_REPLACEONLY 0x0000002
-#define SP_COPY_NEWER 0x0000004
-#define SP_COPY_NEWER_OR_SAME 0x0000004
-#define SP_COPY_NOOVERWRITE 0x0000008
-#define SP_COPY_NODECOMP 0x0000010
-#define SP_COPY_LANGUAGEAWARE 0x0000020
-#define SP_COPY_SOURCE_ABSOLUTE 0x0000040
-#define SP_COPY_SOURCEPATH_ABSOLUTE 0x0000080
-#define SP_COPY_IN_USE_NEEDS_REBOOT 0x0000100
-#define SP_COPY_FORCE_IN_USE 0x0000200
-#define SP_COPY_NOSKIP 0x0000400
-#define SP_COPY_FORCE_NOOVERWRITE 0x0001000
-#define SP_COPY_FORCE_NEWER 0x0002000
-#define SP_COPY_WARNIFSKIP 0x0004000
-#define SP_COPY_NOBROWSE 0x0008000
-#define SP_COPY_NEWER_ONLY 0x0010000
-#define SP_COPY_SOURCE_SIS_MASTER 0x0020000
-#define SP_COPY_OEMINF_CATALOG_ONLY 0x0040000
-#define SP_COPY_REPLACE_BOOT_FILE 0x0080000
-#define SP_COPY_NOPRUNE 0x0100000
-#define SP_FLAG_CABINETCONTINUATION 0x0000800
-#define SPCRP_SECURITY 23
-#define SPCRP_SECURITY_SDS 24
-#define SPCRP_DEVTYPE 25
-#define SPCRP_EXCLUSIVE 26
-#define SPCRP_CHARACTERISTICS 27
-#define SPCRP_MAXIMUM_PROPERTY 28
-#define SPDIT_NODRIVER 0
-#define SPDIT_CLASSDRIVER 1
-#define SPDIT_COMPATDRIVER 2
-#define SPDRP_DEVICEDESC 0
-#define SPDRP_HARDWAREID 1
-#define SPDRP_COMPATIBLEIDS 2
-#define SPDRP_UNUSED0 3
-#define SPDRP_SERVICE 4
-#define SPDRP_UNUSED1 5
-#define SPDRP_UNUSED2 6
-#define SPDRP_CLASS 7
-#define SPDRP_CLASSGUID 8
-#define SPDRP_DRIVER 9
-#define SPDRP_CONFIGFLAGS 10
-#define SPDRP_MFG 11
-#define SPDRP_FRIENDLYNAME 12
-#define SPDRP_LOCATION_INFORMATION 13
-#define SPDRP_PHYSICAL_DEVICE_OBJECT_NAME 14
-#define SPDRP_CAPABILITIES 15
-#define SPDRP_UI_NUMBER 16
-#define SPDRP_UPPERFILTERS 17
-#define SPDRP_LOWERFILTERS 18
-#define SPDRP_BUSTYPEGUID 19
-#define SPDRP_LEGACYBUSTYPE 20
-#define SPDRP_BUSNUMBER 21
-#define SPDRP_ENUMERATOR_NAME 22
-#define SPDRP_SECURITY 23
-#define SPDRP_SECURITY_SDS 24
-#define SPDRP_DEVTYPE 25
-#define SPDRP_EXCLUSIVE 26
-#define SPDRP_CHARACTERISTICS 27
-#define SPDRP_ADDRESS 28
-#define SPDRP_UI_NUMBER_DESC_FORMAT 30
-#define SPDRP_MAXIMUM_PROPERTY 31
-#define SPDSL_IGNORE_DISK 1
-#define SPDSL_DISALLOW_NEGATIVE_ADJUST 2
-
-#define SPFILENOTIFY_STARTQUEUE 1
-#define SPFILENOTIFY_ENDQUEUE 2
-#define SPFILENOTIFY_STARTSUBQUEUE 3
-#define SPFILENOTIFY_ENDSUBQUEUE 4
-#define SPFILENOTIFY_STARTDELETE 5
-#define SPFILENOTIFY_ENDDELETE 6
-#define SPFILENOTIFY_DELETEERROR 7
-#define SPFILENOTIFY_STARTRENAME 8
-#define SPFILENOTIFY_ENDRENAME 9
-#define SPFILENOTIFY_RENAMEERROR 10
-#define SPFILENOTIFY_STARTCOPY 11
-#define SPFILENOTIFY_ENDCOPY 12
-#define SPFILENOTIFY_COPYERROR 13
-#define SPFILENOTIFY_NEEDMEDIA 14
-#define SPFILENOTIFY_QUEUESCAN 15
-#define SPFILENOTIFY_CABINETINFO 16
-#define SPFILENOTIFY_FILEINCABINET 17
-#define SPFILENOTIFY_NEEDNEWCABINET 18
-#define SPFILENOTIFY_FILEEXTRACTED 19
-#define SPFILENOTIFY_FILEOPDELAYED 20
-#define SPFILENOTIFY_STARTBACKUP 21
-#define SPFILENOTIFY_BACKUPERROR 22
-#define SPFILENOTIFY_ENDBACKUP 23
-#define SPFILENOTIFY_QUEUESCAN_EX 24
-#define SPFILENOTIFY_LANGMISMATCH 0x00010000
-#define SPFILENOTIFY_TARGETEXISTS 0x00020000
-#define SPFILENOTIFY_TARGETNEWER 0x00040000
-#define SPFILELOG_SYSTEMLOG 0x00000001
-#define SPFILELOG_OEMFILE 0x00000001
-#define SPFILELOG_FORCENEW 0x00000002
-#define SPFILELOG_QUERYONLY 0x00000004
-#define SPFILEQ_FILE_IN_USE 0x00000001
-#define SPFILEQ_REBOOT_RECOMMENDED 0x00000002
-#define SPFILEQ_REBOOT_IN_PROGRESS 0x00000004
-#define SPINT_ACTIVE 0x00000001
-#define SPINT_DEFAULT 0x00000002
-#define SPINT_REMOVED 0x00000004
-#define SPID_ACTIVE 0x00000001
-#define SPID_DEFAULT 0x00000002
-#define SPID_REMOVED 0x00000004
-#define SPINST_LOGCONFIG 0x00000001
-#define SPINST_INIFILES 0x00000002
-#define SPINST_REGISTRY 0x00000004
-#define SPINST_INI2REG 0x00000008
-#define SPINST_FILES 0x00000010
-#define SPINST_BITREG 0x00000020
-#define SPINST_REGSVR 0x00000040
-#define SPINST_UNREGSVR 0x00000080
-#define SPINST_PROFILEITEMS 0x00000100
-#if (_SETUPAPI_VER >= 0x0501)
-#define SPINST_COPYINF 0x00000200
-#define SPINST_ALL 0x000003ff
-#else
-#define SPINST_ALL 0x000001ff
-#endif
-#define SPINST_SINGLESECTION 0x00010000
-#define SPINST_LOGCONFIG_IS_FORCED 0x00020000
-#define SPINST_LOGCONFIGS_ARE_OVERRIDES 0x00040000
-#define SPOST_NONE 0
-#define SPOST_PATH 1
-#define SPOST_URL 2
-#define SPOST_MAX 3
-#define SPPSR_SELECT_DEVICE_RESOURCES 1
-#define SPPSR_ENUM_BASIC_DEVICE_PROPERTIES 2
-#define SPPSR_ENUM_ADV_DEVICE_PROPERTIES 3
-#define SPQ_SCAN_FILE_PRESENCE 0x00000001
-#define SPQ_DELAYED_COPY 0x00000001
-#define SPQ_SCAN_FILE_VALIDITY 0x00000002
-#define SPQ_SCAN_USE_CALLBACK 0x00000004
-#define SPQ_SCAN_USE_CALLBACKEX 0x00000008
-#define SPQ_SCAN_INFORM_USER 0x00000010
-#define SPQ_SCAN_PRUNE_COPY_QUEUE 0x00000020
-#define SPRDI_FIND_DUPS 0x00000001
-#define SPSVCINST_TAGTOFRONT 0x00000001
-#define SPSVCINST_ASSOCSERVICE 0x00000002
-#define SPSVCINST_DELETEEVENTLOGENTRY 0x00000004
-#define SPSVCINST_NOCLOBBER_DISPLAYNAME 0x00000008
-#define SPSVCINST_NOCLOBBER_STARTTYPE 0x00000010
-#define SPSVCINST_NOCLOBBER_ERRORCONTROL 0x00000020
-#define SPSVCINST_NOCLOBBER_LOADORDERGROUP 0x00000040
-#define SPSVCINST_NOCLOBBER_DEPENDENCIES 0x00000080
-#define SPSVCINST_NOCLOBBER_DESCRIPTION 0x00000100
-#define SPSVCINST_STOPSERVICE 0x00000200
-#define SPWPT_SELECTDEVICE 0x00000001
-#define SPWP_USE_DEVINFO_DATA 0x00000001
-#define SRCINFO_PATH 1
-#define SRCINFO_TAGFILE 2
-#define SRCINFO_DESCRIPTION 3
-#define SRCINFO_FLAGS 4
-#define SRCLIST_TEMPORARY 0x00000001
-#define SRCLIST_NOBROWSE 0x00000002
-#define SRCLIST_SYSTEM 0x00000010
-#define SRCLIST_USER 0x00000020
-#define SRCLIST_SYSIFADMIN 0x00000040
-#define SRCLIST_SUBDIRS 0x00000100
-#define SRCLIST_APPEND 0x00000200
-#define SRCLIST_NOSTRIPPLATFORM 0x00000400
-
-#ifndef RC_INVOKED
-typedef PVOID HINF;
-typedef PVOID HDSKSPC;
-typedef PVOID HDEVINFO;
-typedef PVOID HSPFILEQ;
-typedef PVOID HSPFILELOG;
-typedef UINT DI_FUNCTION;
-
-typedef enum {
- SetupFileLogSourceFilename,
- SetupFileLogChecksum,
- SetupFileLogDiskTagfile,
- SetupFileLogDiskDescription,
- SetupFileLogOtherInfo,
- SetupFileLogMax
-} SetupFileLogInfo;
-typedef struct _INFCONTEXT {
- PVOID Inf;
- PVOID CurrentInf;
- UINT Section;
- UINT Line;
-} INFCONTEXT, *PINFCONTEXT;
-typedef struct _SP_INF_INFORMATION {
- DWORD InfStyle;
- DWORD InfCount;
- BYTE VersionData[ANYSIZE_ARRAY];
-} SP_INF_INFORMATION, *PSP_INF_INFORMATION;
-typedef struct _SP_ALTPLATFORM_INFO {
- DWORD cbSize;
- DWORD Platform;
- DWORD MajorVersion;
- DWORD MinorVersion;
- WORD ProcessorArchitecture;
- WORD Reserved;
-} SP_ALTPLATFORM_INFO, *PSP_ALTPLATFORM_INFO;
-typedef struct _SP_ORIGINAL_FILE_INFO_A {
- DWORD cbSize;
- CHAR OriginalInfName[MAX_PATH];
- CHAR OriginalCatalogName[MAX_PATH];
-} SP_ORIGINAL_FILE_INFO_A, *PSP_ORIGINAL_FILE_INFO_A;
-typedef struct _SP_ORIGINAL_FILE_INFO_W {
- DWORD cbSize;
- WCHAR OriginalInfName[MAX_PATH];
- WCHAR OriginalCatalogName[MAX_PATH];
-} SP_ORIGINAL_FILE_INFO_W, *PSP_ORIGINAL_FILE_INFO_W;
-typedef struct _FILEPATHS_A {
- PCSTR Target;
- PCSTR Source;
- UINT Win32Error;
- DWORD Flags;
-} FILEPATHS_A, *PFILEPATHS_A;
-typedef struct _FILEPATHS_W {
- PCWSTR Target;
- PCWSTR Source;
- UINT Win32Error;
- DWORD Flags;
-} FILEPATHS_W, *PFILEPATHS_W;
-typedef struct _SOURCE_MEDIA_A {
- PCSTR Reserved;
- PCSTR Tagfile;
- PCSTR Description;
- PCSTR SourcePath;
- PCSTR SourceFile;
- DWORD Flags;
-} SOURCE_MEDIA_A, *PSOURCE_MEDIA_A;
-typedef struct _SOURCE_MEDIA_W {
- PCWSTR Reserved;
- PCWSTR Tagfile;
- PCWSTR Description;
- PCWSTR SourcePath;
- PCWSTR SourceFile;
- DWORD Flags;
-} SOURCE_MEDIA_W, *PSOURCE_MEDIA_W;
-typedef struct _CABINET_INFO_A {
- PCSTR CabinetPath;
- PCSTR CabinetFile;
- PCSTR DiskName;
- USHORT SetId;
- USHORT CabinetNumber;
-} CABINET_INFO_A, *PCABINET_INFO_A;
-typedef struct _CABINET_INFO_W {
- PCWSTR CabinetPath;
- PCWSTR CabinetFile;
- PCWSTR DiskName;
- USHORT SetId;
- USHORT CabinetNumber;
-} CABINET_INFO_W, *PCABINET_INFO_W;
-typedef struct _FILE_IN_CABINET_INFO_A {
- PCSTR NameInCabinet;
- DWORD FileSize;
- DWORD Win32Error;
- WORD DosDate;
- WORD DosTime;
- WORD DosAttribs;
- CHAR FullTargetName[MAX_PATH];
-} FILE_IN_CABINET_INFO_A, *PFILE_IN_CABINET_INFO_A;
-typedef struct _FILE_IN_CABINET_INFO_W {
- PCWSTR NameInCabinet;
- DWORD FileSize;
- DWORD Win32Error;
- WORD DosDate;
- WORD DosTime;
- WORD DosAttribs;
- WCHAR FullTargetName[MAX_PATH];
-} FILE_IN_CABINET_INFO_W, *PFILE_IN_CABINET_INFO_W;
-typedef struct _SP_FILE_COPY_PARAMS_A {
- DWORD cbSize;
- HSPFILEQ QueueHandle;
- PCSTR SourceRootPath;
- PCSTR SourcePath;
- PCSTR SourceFilename;
- PCSTR SourceDescription;
- PCSTR SourceTagfile;
- PCSTR TargetDirectory;
- PCSTR TargetFilename;
- DWORD CopyStyle;
- HINF LayoutInf;
- PCSTR SecurityDescriptor;
-} SP_FILE_COPY_PARAMS_A, *PSP_FILE_COPY_PARAMS_A;
-typedef struct _SP_FILE_COPY_PARAMS_W {
- DWORD cbSize;
- HSPFILEQ QueueHandle;
- PCWSTR SourceRootPath;
- PCWSTR SourcePath;
- PCWSTR SourceFilename;
- PCWSTR SourceDescription;
- PCWSTR SourceTagfile;
- PCWSTR TargetDirectory;
- PCWSTR TargetFilename;
- DWORD CopyStyle;
- HINF LayoutInf;
- PCWSTR SecurityDescriptor;
-} SP_FILE_COPY_PARAMS_W, *PSP_FILE_COPY_PARAMS_W;
-typedef struct _SP_DEVINFO_DATA {
- DWORD cbSize;
- GUID ClassGuid;
- DWORD DevInst;
- ULONG_PTR Reserved;
-} SP_DEVINFO_DATA, *PSP_DEVINFO_DATA;
-typedef struct _SP_DEVICE_INTERFACE_DATA {
- DWORD cbSize;
- GUID InterfaceClassGuid;
- DWORD Flags;
- ULONG_PTR Reserved;
-} SP_DEVICE_INTERFACE_DATA, *PSP_DEVICE_INTERFACE_DATA;
-/* For backward compatibility */
-typedef SP_DEVICE_INTERFACE_DATA SP_INTERFACE_DEVICE_DATA, *PSP_INTERFACE_DEVICE_DATA;
-
-typedef struct _SP_DEVICE_INTERFACE_DETAIL_DATA_A {
- DWORD cbSize;
- CHAR DevicePath[ANYSIZE_ARRAY];
-} SP_DEVICE_INTERFACE_DETAIL_DATA_A, *PSP_DEVICE_INTERFACE_DETAIL_DATA_A;
-typedef struct _SP_DEVICE_INTERFACE_DETAIL_DATA_W {
- DWORD cbSize;
- WCHAR DevicePath[ANYSIZE_ARRAY];
-} SP_DEVICE_INTERFACE_DETAIL_DATA_W, *PSP_DEVICE_INTERFACE_DETAIL_DATA_W;
-/* For backward compatibility */
-typedef SP_DEVICE_INTERFACE_DETAIL_DATA_A SP_INTERFACE_DEVICE_DETAIL_DATA_A,
- *PSP_INTERFACE_DEVICE_DETAIL_DATA_A;
-typedef SP_DEVICE_INTERFACE_DETAIL_DATA_W SP_INTERFACE_DEVICE_DETAIL_DATA_W,
- *PSP_INTERFACE_DEVICE_DETAIL_DATA_W;
-
-typedef struct _SP_DEVINFO_LIST_DETAIL_DATA_A {
- DWORD cbSize;
- GUID ClassGuid;
- HANDLE RemoteMachineHandle;
- CHAR RemoteMachineName[SP_MAX_MACHINENAME_LENGTH];
-} SP_DEVINFO_LIST_DETAIL_DATA_A, *PSP_DEVINFO_LIST_DETAIL_DATA_A;
-typedef struct _SP_DEVINFO_LIST_DETAIL_DATA_W {
- DWORD cbSize;
- GUID ClassGuid;
- HANDLE RemoteMachineHandle;
- WCHAR RemoteMachineName[SP_MAX_MACHINENAME_LENGTH];
-} SP_DEVINFO_LIST_DETAIL_DATA_W, *PSP_DEVINFO_LIST_DETAIL_DATA_W;
-
-typedef UINT (CALLBACK* PSP_FILE_CALLBACK_A)(PVOID,UINT,UINT_PTR,UINT_PTR);
-typedef UINT (CALLBACK* PSP_FILE_CALLBACK_W)(PVOID,UINT,UINT_PTR,UINT_PTR);
-typedef struct _SP_DEVINSTALL_PARAMS_A {
- DWORD cbSize;
- DWORD Flags;
- DWORD FlagsEx;
- HWND hwndParent;
- PSP_FILE_CALLBACK_A InstallMsgHandler;
- PVOID InstallMsgHandlerContext;
- HSPFILEQ FileQueue;
- ULONG_PTR ClassInstallReserved;
- DWORD Reserved;
- CHAR DriverPath[MAX_PATH];
-} SP_DEVINSTALL_PARAMS_A, *PSP_DEVINSTALL_PARAMS_A;
-typedef struct _SP_DEVINSTALL_PARAMS_W {
- DWORD cbSize;
- DWORD Flags;
- DWORD FlagsEx;
- HWND hwndParent;
- PSP_FILE_CALLBACK_W InstallMsgHandler;
- PVOID InstallMsgHandlerContext;
- HSPFILEQ FileQueue;
- ULONG_PTR ClassInstallReserved;
- DWORD Reserved;
- WCHAR DriverPath[MAX_PATH];
-} SP_DEVINSTALL_PARAMS_W, *PSP_DEVINSTALL_PARAMS_W;
-typedef struct _SP_CLASSINSTALL_HEADER {
- DWORD cbSize;
- DI_FUNCTION InstallFunction;
-} SP_CLASSINSTALL_HEADER, *PSP_CLASSINSTALL_HEADER;
-typedef struct _SP_ENABLECLASS_PARAMS {
- SP_CLASSINSTALL_HEADER ClassInstallHeader;
- GUID ClassGuid;
- DWORD EnableMessage;
-} SP_ENABLECLASS_PARAMS, *PSP_ENABLECLASS_PARAMS;
-typedef struct _SP_MOVEDEV_PARAMS {
- SP_CLASSINSTALL_HEADER ClassInstallHeader;
- SP_DEVINFO_DATA SourceDeviceInfoData;
-} SP_MOVEDEV_PARAMS, *PSP_MOVEDEV_PARAMS;
-typedef struct _SP_PROPCHANGE_PARAMS {
- SP_CLASSINSTALL_HEADER ClassInstallHeader;
- DWORD StateChange;
- DWORD Scope;
- DWORD HwProfile;
-} SP_PROPCHANGE_PARAMS, *PSP_PROPCHANGE_PARAMS;
-typedef struct _SP_REMOVEDEVICE_PARAMS {
- SP_CLASSINSTALL_HEADER ClassInstallHeader;
- DWORD Scope;
- DWORD HwProfile;
-} SP_REMOVEDEVICE_PARAMS, *PSP_REMOVEDEVICE_PARAMS;
-typedef struct _SP_UNREMOVEDEVICE_PARAMS {
- SP_CLASSINSTALL_HEADER ClassInstallHeader;
- DWORD Scope;
- DWORD HwProfile;
-} SP_UNREMOVEDEVICE_PARAMS, *PSP_UNREMOVEDEVICE_PARAMS;
-typedef struct _SP_SELECTDEVICE_PARAMS_A {
- SP_CLASSINSTALL_HEADER ClassInstallHeader;
- CHAR Title[MAX_TITLE_LEN];
- CHAR Instructions[MAX_INSTRUCTION_LEN];
- CHAR ListLabel[MAX_LABEL_LEN];
- CHAR SubTitle[MAX_SUBTITLE_LEN];
- BYTE Reserved[2];
-} SP_SELECTDEVICE_PARAMS_A, *PSP_SELECTDEVICE_PARAMS_A;
-typedef struct _SP_SELECTDEVICE_PARAMS_W {
- SP_CLASSINSTALL_HEADER ClassInstallHeader;
- WCHAR Title[MAX_TITLE_LEN];
- WCHAR Instructions[MAX_INSTRUCTION_LEN];
- WCHAR ListLabel[MAX_LABEL_LEN];
- WCHAR SubTitle[MAX_SUBTITLE_LEN];
-} SP_SELECTDEVICE_PARAMS_W, *PSP_SELECTDEVICE_PARAMS_W;
-
-typedef BOOL (CALLBACK* PDETECT_PROGRESS_NOTIFY)(PVOID,DWORD);
-typedef struct _SP_DETECTDEVICE_PARAMS {
- SP_CLASSINSTALL_HEADER ClassInstallHeader;
- PDETECT_PROGRESS_NOTIFY DetectProgressNotify;
- PVOID ProgressNotifyParam;
-} SP_DETECTDEVICE_PARAMS, *PSP_DETECTDEVICE_PARAMS;
-typedef struct _SP_INSTALLWIZARD_DATA {
- SP_CLASSINSTALL_HEADER ClassInstallHeader;
- DWORD Flags;
- HPROPSHEETPAGE DynamicPages[MAX_INSTALLWIZARD_DYNAPAGES];
- DWORD NumDynamicPages;
- DWORD DynamicPageFlags;
- DWORD PrivateFlags;
- LPARAM PrivateData;
- HWND hwndWizardDlg;
-} SP_INSTALLWIZARD_DATA, *PSP_INSTALLWIZARD_DATA;
-typedef struct _SP_NEWDEVICEWIZARD_DATA {
- SP_CLASSINSTALL_HEADER ClassInstallHeader;
- DWORD Flags;
- HPROPSHEETPAGE DynamicPages[MAX_INSTALLWIZARD_DYNAPAGES];
- DWORD NumDynamicPages;
- HWND hwndWizardDlg;
-} SP_NEWDEVICEWIZARD_DATA, *PSP_NEWDEVICEWIZARD_DATA;
-typedef SP_NEWDEVICEWIZARD_DATA SP_ADDPROPERTYPAGE_DATA,
- *PSP_ADDPROPERTYPAGE_DATA;
-typedef struct _SP_TROUBLESHOOTER_PARAMS_A {
- SP_CLASSINSTALL_HEADER ClassInstallHeader;
- CHAR ChmFile[MAX_PATH];
- CHAR HtmlTroubleShooter[MAX_PATH];
-} SP_TROUBLESHOOTER_PARAMS_A, *PSP_TROUBLESHOOTER_PARAMS_A;
-typedef struct _SP_TROUBLESHOOTER_PARAMS_W {
- SP_CLASSINSTALL_HEADER ClassInstallHeader;
- WCHAR ChmFile[MAX_PATH];
- WCHAR HtmlTroubleShooter[MAX_PATH];
-} SP_TROUBLESHOOTER_PARAMS_W, *PSP_TROUBLESHOOTER_PARAMS_W;
-typedef struct _SP_POWERMESSAGEWAKE_PARAMS_A {
- SP_CLASSINSTALL_HEADER ClassInstallHeader;
- CHAR PowerMessageWake[LINE_LEN*2];
-} SP_POWERMESSAGEWAKE_PARAMS_A, *PSP_POWERMESSAGEWAKE_PARAMS_A;
-typedef struct _SP_POWERMESSAGEWAKE_PARAMS_W {
- SP_CLASSINSTALL_HEADER ClassInstallHeader;
- WCHAR PowerMessageWake[LINE_LEN*2];
-} SP_POWERMESSAGEWAKE_PARAMS_W, *PSP_POWERMESSAGEWAKE_PARAMS_W;
-typedef struct _SP_DRVINFO_DATA_V2_A {
- DWORD cbSize;
- DWORD DriverType;
- ULONG_PTR Reserved;
- CHAR Description[LINE_LEN];
- CHAR MfgName[LINE_LEN];
- CHAR ProviderName[LINE_LEN];
- FILETIME DriverDate;
- DWORDLONG DriverVersion;
-} SP_DRVINFO_DATA_V2_A, *PSP_DRVINFO_DATA_V2_A;
-typedef struct _SP_DRVINFO_DATA_V2_W {
- DWORD cbSize;
- DWORD DriverType;
- ULONG_PTR Reserved;
- WCHAR Description[LINE_LEN];
- WCHAR MfgName[LINE_LEN];
- WCHAR ProviderName[LINE_LEN];
- FILETIME DriverDate;
- DWORDLONG DriverVersion;
-} SP_DRVINFO_DATA_V2_W, *PSP_DRVINFO_DATA_V2_W;
-typedef struct _SP_DRVINFO_DATA_V1_A {
- DWORD cbSize;
- DWORD DriverType;
- ULONG_PTR Reserved;
- CHAR Description[LINE_LEN];
- CHAR MfgName[LINE_LEN];
- CHAR ProviderName[LINE_LEN];
-} SP_DRVINFO_DATA_V1_A, *PSP_DRVINFO_DATA_V1_A;
-typedef struct _SP_DRVINFO_DATA_V1_W {
- DWORD cbSize;
- DWORD DriverType;
- ULONG_PTR Reserved;
- WCHAR Description[LINE_LEN];
- WCHAR MfgName[LINE_LEN];
- WCHAR ProviderName[LINE_LEN];
-} SP_DRVINFO_DATA_V1_W, *PSP_DRVINFO_DATA_V1_W;
-
-#ifdef UNICODE
-typedef SP_DRVINFO_DATA_V1_W SP_DRVINFO_DATA_V1, *PSP_DRVINFO_DATA_V1;
-typedef SP_DRVINFO_DATA_V2_W SP_DRVINFO_DATA_V2, *PSP_DRVINFO_DATA_V2;
-#else
-typedef SP_DRVINFO_DATA_V1_A SP_DRVINFO_DATA_V1, *PSP_DRVINFO_DATA_V1;
-typedef SP_DRVINFO_DATA_V2_A SP_DRVINFO_DATA_V2, *PSP_DRVINFO_DATA_V2;
-#endif
-
-#if USE_SP_DRVINFO_DATA_V1
-typedef SP_DRVINFO_DATA_V1_A SP_DRVINFO_DATA_A, *PSP_DRVINFO_DATA_A;
-typedef SP_DRVINFO_DATA_V1_W SP_DRVINFO_DATA_W, *PSP_DRVINFO_DATA_W;
-typedef SP_DRVINFO_DATA_V1 SP_DRVINFO_DATA, *PSP_DRVINFO_DATA;
-#else
-typedef SP_DRVINFO_DATA_V2_A SP_DRVINFO_DATA_A, *PSP_DRVINFO_DATA_A;
-typedef SP_DRVINFO_DATA_V2_W SP_DRVINFO_DATA_W, *PSP_DRVINFO_DATA_W;
-typedef SP_DRVINFO_DATA_V2 SP_DRVINFO_DATA, *PSP_DRVINFO_DATA;
-#endif
-
-typedef DWORD (CALLBACK* PSP_DETSIG_CMPPROC)(HDEVINFO,PSP_DEVINFO_DATA,PSP_DEVINFO_DATA,PVOID);
-
-typedef struct _SP_DRVINFO_DETAIL_DATA_A {
- DWORD cbSize;
- FILETIME InfDate;
- DWORD CompatIDsOffset;
- DWORD CompatIDsLength;
- ULONG_PTR Reserved;
- CHAR SectionName[LINE_LEN];
- CHAR InfFileName[MAX_PATH];
- CHAR DrvDescription[LINE_LEN];
- CHAR HardwareID[ANYSIZE_ARRAY];
-} SP_DRVINFO_DETAIL_DATA_A, *PSP_DRVINFO_DETAIL_DATA_A;
-typedef struct _SP_DRVINFO_DETAIL_DATA_W {
- DWORD cbSize;
- FILETIME InfDate;
- DWORD CompatIDsOffset;
- DWORD CompatIDsLength;
- ULONG_PTR Reserved;
- WCHAR SectionName[LINE_LEN];
- WCHAR InfFileName[MAX_PATH];
- WCHAR DrvDescription[LINE_LEN];
- WCHAR HardwareID[ANYSIZE_ARRAY];
-} SP_DRVINFO_DETAIL_DATA_W, *PSP_DRVINFO_DETAIL_DATA_W;
-typedef struct _SP_DRVINSTALL_PARAMS {
- DWORD cbSize;
- DWORD Rank;
- DWORD Flags;
- DWORD_PTR PrivateData;
- DWORD Reserved;
-} SP_DRVINSTALL_PARAMS, *PSP_DRVINSTALL_PARAMS;
-
-
-typedef struct _COINSTALLER_CONTEXT_DATA {
- BOOL PostProcessing;
- DWORD InstallResult;
- PVOID PrivateData;
-} COINSTALLER_CONTEXT_DATA, *PCOINSTALLER_CONTEXT_DATA;
-typedef struct _SP_CLASSIMAGELIST_DATA {
- DWORD cbSize;
- HIMAGELIST ImageList;
- ULONG_PTR Reserved;
-} SP_CLASSIMAGELIST_DATA, *PSP_CLASSIMAGELIST_DATA;
-typedef struct _SP_PROPSHEETPAGE_REQUEST {
- DWORD cbSize;
- DWORD PageRequested;
- HDEVINFO DeviceInfoSet;
- PSP_DEVINFO_DATA DeviceInfoData;
-} SP_PROPSHEETPAGE_REQUEST, *PSP_PROPSHEETPAGE_REQUEST;
-typedef struct _SP_BACKUP_QUEUE_PARAMS_A {
- DWORD cbSize;
- CHAR FullInfPath[MAX_PATH];
- INT FilenameOffset;
-} SP_BACKUP_QUEUE_PARAMS_A, *PSP_BACKUP_QUEUE_PARAMS_A;
-typedef struct _SP_BACKUP_QUEUE_PARAMS_W {
- DWORD cbSize;
- WCHAR FullInfPath[MAX_PATH];
- INT FilenameOffset;
-} SP_BACKUP_QUEUE_PARAMS_W, *PSP_BACKUP_QUEUE_PARAMS_W;
-
-
-#ifdef UNICODE
-typedef SP_ORIGINAL_FILE_INFO_W SP_ORIGINAL_FILE_INFO, *PSP_ORIGINAL_FILE_INFO;
-typedef FILEPATHS_W FILEPATHS, *PFILEPATHS;
-typedef SOURCE_MEDIA_W SOURCE_MEDIA, *PSOURCE_MEDIA;
-typedef CABINET_INFO_W CABINET_INFO, *PCABINET_INFO;
-typedef FILE_IN_CABINET_INFO_W FILE_IN_CABINET_INFO, *PFILE_IN_CABINET_INFO;
-typedef SP_FILE_COPY_PARAMS_W SP_FILE_COPY_PARAMS, PSP_FILE_COPY_PARAMS;
-typedef SP_DEVICE_INTERFACE_DETAIL_DATA_W SP_DEVICE_INTERFACE_DETAIL_DATA,
- *PSP_DEVICE_INTERFACE_DETAIL_DATA;
-typedef SP_INTERFACE_DEVICE_DETAIL_DATA_W SP_INTERFACE_DEVICE_DETAIL_DATA,
- *PSP_INTERFACE_DEVICE_DETAIL_DATA; /* deprecated */
-typedef SP_DEVINFO_LIST_DETAIL_DATA_W SP_DEVINFO_LIST_DETAIL_DATA,
- *PSP_DEVINFO_LIST_DETAIL_DATA;
-typedef SP_DEVINSTALL_PARAMS_W SP_DEVINSTALL_PARAMS, *PSP_DEVINSTALL_PARAMS;
-typedef SP_SELECTDEVICE_PARAMS_W SP_SELECTDEVICE_PARAMS, *PSP_SELECTDEVICE_PARAMS;
-typedef SP_TROUBLESHOOTER_PARAMS_W SP_TROUBLESHOOTER_PARAMS,
- *PSP_TROUBLESHOOTER_PARAMS;
-typedef SP_POWERMESSAGEWAKE_PARAMS_W SP_POWERMESSAGEWAKE_PARAMS,
- *PSP_POWERMESSAGEWAKE_PARAMS;
-typedef SP_DRVINFO_DETAIL_DATA_W SP_DRVINFO_DETAIL_DATA,
- *PSP_DRVINFO_DETAIL_DATA;
-typedef SP_BACKUP_QUEUE_PARAMS_W SP_BACKUP_QUEUE_PARAMS,
- *PSP_BACKUP_QUEUE_PARAMS;
-#else
-typedef SP_ORIGINAL_FILE_INFO_A SP_ORIGINAL_FILE_INFO, *PSP_ORIGINAL_FILE_INFO;
-typedef FILEPATHS_A FILEPATHS, *PFILEPATHS;
-typedef SOURCE_MEDIA_A SOURCE_MEDIA, *PSOURCE_MEDIA;
-typedef CABINET_INFO_A CABINET_INFO, *PCABINET_INFO;
-typedef FILE_IN_CABINET_INFO_A FILE_IN_CABINET_INFO, *PFILE_IN_CABINET_INFO;
-typedef SP_FILE_COPY_PARAMS_A SP_FILE_COPY_PARAMS, *PSP_FILE_COPY_PARAMS;
-typedef SP_DEVICE_INTERFACE_DETAIL_DATA_A SP_DEVICE_INTERFACE_DETAIL_DATA,
- *PSP_DEVICE_INTERFACE_DETAIL_DATA;
-typedef SP_INTERFACE_DEVICE_DETAIL_DATA_A SP_INTERFACE_DEVICE_DETAIL_DATA,
- *PSP_INTERFACE_DEVICE_DETAIL_DATA; /* deprecated */
-typedef SP_DEVINFO_LIST_DETAIL_DATA_A SP_DEVINFO_LIST_DETAIL_DATA,
- *PSP_DEVINFO_LIST_DETAIL_DATA;
-typedef SP_DEVINSTALL_PARAMS_A SP_DEVINSTALL_PARAMS, *PSP_DEVINSTALL_PARAMS;
-typedef SP_SELECTDEVICE_PARAMS_A SP_SELECTDEVICE_PARAMS,
- *PSP_SELECTDEVICE_PARAMS;
-typedef SP_TROUBLESHOOTER_PARAMS_A SP_TROUBLESHOOTER_PARAMS,
- *PSP_TROUBLESHOOTER_PARAMS;
-typedef SP_POWERMESSAGEWAKE_PARAMS_A SP_POWERMESSAGEWAKE_PARAMS,
- *PSP_POWERMESSAGEWAKE_PARAMS;
-typedef SP_DRVINFO_DETAIL_DATA_A SP_DRVINFO_DETAIL_DATA,
- *PSP_DRVINFO_DETAIL_DATA;
-typedef SP_BACKUP_QUEUE_PARAMS_A SP_BACKUP_QUEUE_PARAMS,
- *PSP_BACKUP_QUEUE_PARAMS;
-#endif /* UNICODE */
-
-WINSETUPAPI BOOL WINAPI SetupAddInstallSectionToDiskSpaceListA(HDSKSPC,HINF,HINF,PCSTR,PVOID,UINT);
-WINSETUPAPI BOOL WINAPI SetupAddInstallSectionToDiskSpaceListW(HDSKSPC,HINF,HINF,PCWSTR,PVOID,UINT);
-WINSETUPAPI BOOL WINAPI SetupAddSectionToDiskSpaceListA(HDSKSPC,HINF,HINF,PCSTR,UINT,PVOID,UINT);
-WINSETUPAPI BOOL WINAPI SetupAddSectionToDiskSpaceListW(HDSKSPC,HINF,HINF,PCWSTR,UINT,PVOID,UINT);
-WINSETUPAPI BOOL WINAPI SetupAddToDiskSpaceListA(HDSKSPC,PCSTR,LONGLONG,UINT,PVOID,UINT);
-WINSETUPAPI BOOL WINAPI SetupAddToDiskSpaceListW(HDSKSPC,PCWSTR,LONGLONG,UINT,PVOID,UINT);
-WINSETUPAPI BOOL WINAPI SetupAddToSourceListA(DWORD,PCSTR);
-WINSETUPAPI BOOL WINAPI SetupAddToSourceListW(DWORD,PCWSTR);
-WINSETUPAPI BOOL WINAPI SetupAdjustDiskSpaceListA(HDSKSPC,LPCSTR,LONGLONG,PVOID,UINT);
-WINSETUPAPI BOOL WINAPI SetupAdjustDiskSpaceListW(HDSKSPC,LPCWSTR,LONGLONG,PVOID,UINT);
-WINSETUPAPI UINT WINAPI SetupBackupErrorA(HWND,PCSTR,PCSTR,PCSTR,UINT,DWORD);
-WINSETUPAPI UINT WINAPI SetupBackupErrorW(HWND,PCWSTR,PCWSTR,PCWSTR,UINT,DWORD);
-WINSETUPAPI BOOL WINAPI SetupCancelTemporary(VOID);
-WINSETUPAPI BOOL WINAPI SetupCloseFileQueue(HSPFILEQ);
-WINSETUPAPI VOID WINAPI SetupCloseInfFile(HINF);
-WINSETUPAPI VOID WINAPI SetupCloseLog(VOID);
-WINSETUPAPI BOOL WINAPI SetupCommitFileQueueA(HWND,HSPFILEQ,PSP_FILE_CALLBACK_A,PVOID);
-WINSETUPAPI BOOL WINAPI SetupCommitFileQueueW(HWND,HSPFILEQ,PSP_FILE_CALLBACK_W,PVOID);
-#if (_SETUPAPI_VER >= 0x502)
-WINSETUPAPI BOOL WINAPI SetupConfigureWmiFromInfSectionA(HINF,PCSTR,DWORD);
-WINSETUPAPI BOOL WINAPI SetupConfigureWmiFromInfSectionW(HINF,PCWSTR,DWORD);
-#endif
-WINSETUPAPI UINT WINAPI SetupCopyErrorA(HWND,PCSTR,PCSTR,PCSTR,PCSTR,PCSTR,UINT,DWORD,PSTR,DWORD,PDWORD);
-WINSETUPAPI UINT WINAPI SetupCopyErrorW(HWND,PCWSTR,PCWSTR,PCWSTR,PCWSTR,PCWSTR,UINT,DWORD,PWSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupCopyOEMInfA(PCSTR,PCSTR,DWORD,DWORD,PSTR,DWORD,PDWORD,PSTR*);
-WINSETUPAPI BOOL WINAPI SetupCopyOEMInfW(PCWSTR,PCWSTR,DWORD,DWORD,PWSTR,DWORD,PDWORD,PWSTR*);
-WINSETUPAPI HDSKSPC WINAPI SetupCreateDiskSpaceListA(PVOID,DWORD,UINT);
-WINSETUPAPI HDSKSPC WINAPI SetupCreateDiskSpaceListW(PVOID,DWORD,UINT);
-WINSETUPAPI DWORD WINAPI SetupDecompressOrCopyFileA(PCSTR,PCSTR,PUINT);
-WINSETUPAPI DWORD WINAPI SetupDecompressOrCopyFileW(PCWSTR,PCWSTR,PUINT);
-WINSETUPAPI UINT WINAPI SetupDefaultQueueCallbackA(PVOID,UINT,UINT_PTR,UINT_PTR);
-WINSETUPAPI UINT WINAPI SetupDefaultQueueCallbackW(PVOID,UINT,UINT_PTR,UINT_PTR);
-WINSETUPAPI UINT WINAPI SetupDeleteErrorA(HWND,PCSTR,PCSTR,UINT,DWORD);
-WINSETUPAPI UINT WINAPI SetupDeleteErrorW(HWND,PCWSTR,PCWSTR,UINT,DWORD);
-WINSETUPAPI BOOL WINAPI SetupDestroyDiskSpaceList(HDSKSPC);
-WINSETUPAPI BOOL WINAPI SetupDiAskForOEMDisk(HDEVINFO,PSP_DEVINFO_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiBuildClassInfoList(DWORD,LPGUID,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupDiBuildClassInfoListExA(DWORD,LPGUID,DWORD,PDWORD,PCSTR,PVOID);
-WINSETUPAPI BOOL WINAPI SetupDiBuildClassInfoListExW(DWORD,LPGUID,DWORD,PDWORD,PCWSTR,PVOID);
-WINSETUPAPI BOOL WINAPI SetupDiBuildDriverInfoList(HDEVINFO,PSP_DEVINFO_DATA,DWORD);
-WINSETUPAPI BOOL WINAPI SetupDiCallClassInstaller(DI_FUNCTION,HDEVINFO,PSP_DEVINFO_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiCancelDriverInfoSearch(HDEVINFO);
-WINSETUPAPI BOOL WINAPI SetupDiChangeState(HDEVINFO,PSP_DEVINFO_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiClassGuidsFromNameA(PCSTR,LPGUID,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupDiClassGuidsFromNameW(PCWSTR,LPGUID,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupDiClassGuidsFromNameExA(PCSTR,LPGUID,DWORD,PDWORD,PCSTR,PVOID);
-WINSETUPAPI BOOL WINAPI SetupDiClassGuidsFromNameExW(PCWSTR,LPGUID,DWORD,PDWORD,PCWSTR,PVOID);
-WINSETUPAPI BOOL WINAPI SetupDiClassNameFromGuidA(CONST GUID*,PSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupDiClassNameFromGuidW(CONST GUID*,PWSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupDiClassNameFromGuidExA(CONST GUID*,PSTR,DWORD,PDWORD,PCSTR,PVOID);
-WINSETUPAPI BOOL WINAPI SetupDiClassNameFromGuidExW(CONST GUID*,PWSTR,DWORD,PDWORD,PCWSTR,PVOID);
-WINSETUPAPI BOOL WINAPI SetupDiCreateDeviceInfoA(HDEVINFO,PCSTR,CONST GUID*,PCSTR,HWND,DWORD,PSP_DEVINFO_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiCreateDeviceInfoW(HDEVINFO,PCWSTR,CONST GUID*,PCWSTR,HWND,DWORD,PSP_DEVINFO_DATA);
-WINSETUPAPI HDEVINFO WINAPI SetupDiCreateDeviceInfoList(CONST GUID*,HWND);
-WINSETUPAPI HDEVINFO WINAPI SetupDiCreateDeviceInfoListExA(CONST GUID*,HWND,PCSTR,PVOID);
-WINSETUPAPI HDEVINFO WINAPI SetupDiCreateDeviceInfoListExW(CONST GUID*,HWND,PCWSTR,PVOID);
-WINSETUPAPI BOOL WINAPI SetupDiCreateDeviceInterfaceA(HDEVINFO,PSP_DEVINFO_DATA,CONST GUID*,PCSTR,DWORD,PSP_DEVICE_INTERFACE_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiCreateDeviceInterfaceW(HDEVINFO,PSP_DEVINFO_DATA,CONST GUID*,PCWSTR,DWORD,PSP_DEVICE_INTERFACE_DATA);
-WINSETUPAPI HKEY WINAPI SetupDiCreateDeviceInterfaceRegKeyA(HDEVINFO,PSP_DEVICE_INTERFACE_DATA,DWORD,REGSAM,HINF,PCSTR);
-WINSETUPAPI HKEY WINAPI SetupDiCreateDeviceInterfaceRegKeyW(HDEVINFO,PSP_DEVICE_INTERFACE_DATA,DWORD,REGSAM,HINF,PCWSTR);
-WINSETUPAPI HKEY WINAPI SetupDiCreateDevRegKeyA(HDEVINFO,PSP_DEVINFO_DATA,DWORD,DWORD,DWORD,HINF,PCSTR);
-WINSETUPAPI HKEY WINAPI SetupDiCreateDevRegKeyW(HDEVINFO,PSP_DEVINFO_DATA,DWORD,DWORD,DWORD,HINF,PCWSTR);
-WINSETUPAPI BOOL WINAPI SetupDiDeleteDeviceInfo(HDEVINFO,PSP_DEVINFO_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiDeleteDeviceInterfaceData(HDEVINFO,PSP_DEVICE_INTERFACE_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiDeleteDeviceInterfaceRegKey(HDEVINFO,PSP_DEVICE_INTERFACE_DATA,DWORD);
-WINSETUPAPI BOOL WINAPI SetupDiDeleteDevRegKey(HDEVINFO,PSP_DEVINFO_DATA,DWORD,DWORD,DWORD);
-WINSETUPAPI BOOL WINAPI SetupDiDestroyClassImageList(PSP_CLASSIMAGELIST_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO);
-WINSETUPAPI BOOL WINAPI SetupDiDestroyDriverInfoList(HDEVINFO,PSP_DEVINFO_DATA,DWORD);
-WINSETUPAPI INT WINAPI SetupDiDrawMiniIcon(HDC,RECT,INT,DWORD);
-WINSETUPAPI BOOL WINAPI SetupDiEnumDeviceInfo(HDEVINFO,DWORD,PSP_DEVINFO_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiEnumDeviceInterfaces(HDEVINFO,PSP_DEVINFO_DATA,CONST GUID*,DWORD,PSP_DEVICE_INTERFACE_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiEnumDriverInfoA(HDEVINFO,PSP_DEVINFO_DATA,DWORD,DWORD,PSP_DRVINFO_DATA_A);
-WINSETUPAPI BOOL WINAPI SetupDiEnumDriverInfoW(HDEVINFO,PSP_DEVINFO_DATA,DWORD,DWORD,PSP_DRVINFO_DATA_W);
-WINSETUPAPI BOOL WINAPI SetupDiGetActualSectionToInstallA(HINF,PCSTR,PSTR,DWORD,PDWORD,PSTR*);
-WINSETUPAPI BOOL WINAPI SetupDiGetActualSectionToInstallW(HINF,PCWSTR,PWSTR,DWORD,PDWORD,PWSTR*);
-WINSETUPAPI BOOL WINAPI SetupDiGetClassBitmapIndex(CONST GUID*,PINT);
-WINSETUPAPI BOOL WINAPI SetupDiGetClassDescriptionA(CONST GUID*,PSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupDiGetClassDescriptionW(CONST GUID*,PWSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupDiGetClassDescriptionExA(CONST GUID*,PSTR,DWORD,PDWORD,PCSTR,PVOID);
-WINSETUPAPI BOOL WINAPI SetupDiGetClassDescriptionExW(CONST GUID*,PWSTR,DWORD,PDWORD,PCWSTR,PVOID);
-WINSETUPAPI BOOL WINAPI SetupDiGetClassDevPropertySheetsA(HDEVINFO,PSP_DEVINFO_DATA,LPPROPSHEETHEADERA,DWORD,PDWORD,DWORD);
-WINSETUPAPI BOOL WINAPI SetupDiGetClassDevPropertySheetsW(HDEVINFO,PSP_DEVINFO_DATA,LPPROPSHEETHEADERW,DWORD,PDWORD,DWORD);
-WINSETUPAPI HDEVINFO WINAPI SetupDiGetClassDevsA(CONST GUID*,PCSTR,HWND,DWORD);
-WINSETUPAPI HDEVINFO WINAPI SetupDiGetClassDevsW(CONST GUID*,PCWSTR,HWND,DWORD);
-WINSETUPAPI HDEVINFO WINAPI SetupDiGetClassDevsExA(CONST GUID*,PCSTR,HWND,DWORD,HDEVINFO,PCSTR,PVOID);
-WINSETUPAPI HDEVINFO WINAPI SetupDiGetClassDevsExW(CONST GUID*,PCWSTR,HWND,DWORD,HDEVINFO,PCWSTR,PVOID);
-WINSETUPAPI BOOL WINAPI SetupDiGetClassImageIndex(PSP_CLASSIMAGELIST_DATA,CONST GUID*,PINT);
-WINSETUPAPI BOOL WINAPI SetupDiGetClassImageList(PSP_CLASSIMAGELIST_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiGetClassImageListExA(PSP_CLASSIMAGELIST_DATA,PCSTR,PVOID);
-WINSETUPAPI BOOL WINAPI SetupDiGetClassImageListExW(PSP_CLASSIMAGELIST_DATA,PCWSTR,PVOID);
-WINSETUPAPI BOOL WINAPI SetupDiGetClassInstallParamsA(HDEVINFO,PSP_DEVINFO_DATA,PSP_CLASSINSTALL_HEADER,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupDiGetClassInstallParamsW(HDEVINFO,PSP_DEVINFO_DATA,PSP_CLASSINSTALL_HEADER,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupDiGetClassRegistryPropertyA(LPGUID,DWORD,PDWORD,PBYTE,DWORD,PDWORD,PCSTR,PVOID);
-WINSETUPAPI BOOL WINAPI SetupDiGetClassRegistryPropertyW(LPGUID,DWORD,PDWORD,PBYTE,DWORD,PDWORD,PCWSTR,PVOID);
-WINSETUPAPI BOOL WINAPI SetupDiGetDeviceInfoListClass(HDEVINFO,LPGUID);
-WINSETUPAPI BOOL WINAPI SetupDiGetDeviceInfoListDetailA(HDEVINFO,PSP_DEVINFO_LIST_DETAIL_DATA_A);
-WINSETUPAPI BOOL WINAPI SetupDiGetDeviceInfoListDetailW(HDEVINFO,PSP_DEVINFO_LIST_DETAIL_DATA_W);
-WINSETUPAPI BOOL WINAPI SetupDiGetDeviceInstallParamsA(HDEVINFO,PSP_DEVINFO_DATA,PSP_DEVINSTALL_PARAMS_A);
-WINSETUPAPI BOOL WINAPI SetupDiGetDeviceInstallParamsW(HDEVINFO,PSP_DEVINFO_DATA,PSP_DEVINSTALL_PARAMS_W);
-WINSETUPAPI BOOL WINAPI SetupDiGetDeviceInstanceIdA(HDEVINFO,PSP_DEVINFO_DATA,PSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupDiGetDeviceInstanceIdW(HDEVINFO,PSP_DEVINFO_DATA,PWSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupDiGetDeviceInterfaceAlias(HDEVINFO,PSP_DEVICE_INTERFACE_DATA,CONST GUID*,PSP_DEVICE_INTERFACE_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiGetDeviceInterfaceDetailA(HDEVINFO,PSP_DEVICE_INTERFACE_DATA,PSP_DEVICE_INTERFACE_DETAIL_DATA_A,DWORD,PDWORD,PSP_DEVINFO_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiGetDeviceInterfaceDetailW(HDEVINFO,PSP_DEVICE_INTERFACE_DATA,PSP_DEVICE_INTERFACE_DETAIL_DATA_W,DWORD,PDWORD,PSP_DEVINFO_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiGetDeviceRegistryPropertyA(HDEVINFO,PSP_DEVINFO_DATA,DWORD,PDWORD,PBYTE,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupDiGetDeviceRegistryPropertyW(HDEVINFO,PSP_DEVINFO_DATA,DWORD,PDWORD,PBYTE,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupDiGetDriverInfoDetailA(HDEVINFO,PSP_DEVINFO_DATA,PSP_DRVINFO_DATA_A,PSP_DRVINFO_DETAIL_DATA_A,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupDiGetDriverInfoDetailW(HDEVINFO,PSP_DEVINFO_DATA,PSP_DRVINFO_DATA_W,PSP_DRVINFO_DETAIL_DATA_W,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupDiGetDriverInstallParamsA(HDEVINFO,PSP_DEVINFO_DATA,PSP_DRVINFO_DATA_A,PSP_DRVINSTALL_PARAMS);
-WINSETUPAPI BOOL WINAPI SetupDiGetDriverInstallParamsW(HDEVINFO,PSP_DEVINFO_DATA,PSP_DRVINFO_DATA_W,PSP_DRVINSTALL_PARAMS);
-WINSETUPAPI BOOL WINAPI SetupDiGetHwProfileFriendlyNameA(DWORD,PSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupDiGetHwProfileFriendlyNameExA(DWORD,PSTR,DWORD,PDWORD,PCSTR,PVOID);
-WINSETUPAPI BOOL WINAPI SetupDiGetHwProfileFriendlyNameExW(DWORD,PWSTR,DWORD,PDWORD,PCWSTR,PVOID);
-WINSETUPAPI BOOL WINAPI SetupDiGetHwProfileFriendlyNameW(DWORD,PWSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupDiGetHwProfileList(PDWORD,DWORD,PDWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupDiGetHwProfileListExA(PDWORD,DWORD,PDWORD,PDWORD,PCSTR,PVOID);
-WINSETUPAPI BOOL WINAPI SetupDiGetHwProfileListExW(PDWORD,DWORD,PDWORD,PDWORD,PCWSTR,PVOID);
-WINSETUPAPI BOOL WINAPI SetupDiGetINFClassA(PCSTR,LPGUID,PSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupDiGetINFClassW(PCWSTR,LPGUID,PWSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupDiGetSelectedDevice(HDEVINFO,PSP_DEVINFO_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiGetSelectedDriverA(HDEVINFO,PSP_DEVINFO_DATA,PSP_DRVINFO_DATA_A);
-WINSETUPAPI BOOL WINAPI SetupDiGetSelectedDriverW(HDEVINFO,PSP_DEVINFO_DATA,PSP_DRVINFO_DATA_W);
-WINSETUPAPI HPROPSHEETPAGE WINAPI SetupDiGetWizardage(HDEVINFO,PSP_DEVINFO_DATA,PSP_INSTALLWIZARD_DATA,DWORD,DWORD);
-WINSETUPAPI BOOL WINAPI SetupDiInstallClassA(HWND,PCSTR,DWORD,HSPFILEQ);
-WINSETUPAPI BOOL WINAPI SetupDiInstallClassW(HWND,PCWSTR,DWORD,HSPFILEQ);
-WINSETUPAPI BOOL WINAPI SetupDiInstallClassExA(HWND,PCSTR,DWORD,HSPFILEQ,CONST GUID*,PVOID,PVOID);
-WINSETUPAPI BOOL WINAPI SetupDiInstallClassExW(HWND,PCWSTR,DWORD,HSPFILEQ,CONST GUID*,PVOID,PVOID);
-WINSETUPAPI BOOL WINAPI SetupDiInstallDevice(HDEVINFO,PSP_DEVINFO_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiInstallDeviceInterfaces(HDEVINFO,PSP_DEVINFO_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiInstallDriverFiles(HDEVINFO,PSP_DEVINFO_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiLoadClassIcon(CONST GUID*,HICON*,PINT);
-WINSETUPAPI BOOL WINAPI SetupDiMoveDuplicateDevice(HDEVINFO,PSP_DEVINFO_DATA);
-WINSETUPAPI HKEY WINAPI SetupDiOpenClassRegKey(CONST GUID*,REGSAM);
-WINSETUPAPI HKEY WINAPI SetupDiOpenClassRegKeyExA(CONST GUID*,REGSAM,DWORD,PCSTR,PVOID);
-WINSETUPAPI HKEY WINAPI SetupDiOpenClassRegKeyExW(CONST GUID*,REGSAM,DWORD,PCWSTR,PVOID);
-WINSETUPAPI BOOL WINAPI SetupDiOpenDeviceInfoA(HDEVINFO,PCSTR,HWND,DWORD,PSP_DEVINFO_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiOpenDeviceInfoW(HDEVINFO,PCWSTR,HWND,DWORD,PSP_DEVINFO_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiOpenDeviceInterfaceA(HDEVINFO,PCSTR,DWORD,PSP_DEVICE_INTERFACE_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiOpenDeviceInterfaceW(HDEVINFO,PCWSTR,DWORD,PSP_DEVICE_INTERFACE_DATA);
-WINSETUPAPI HKEY WINAPI SetupDiOpenDeviceInterfaceRegKey(HDEVINFO,PSP_DEVICE_INTERFACE_DATA,DWORD,REGSAM);
-WINSETUPAPI HKEY WINAPI SetupDiOpenDevRegKey(HDEVINFO,PSP_DEVINFO_DATA,DWORD,DWORD,DWORD,REGSAM);
-WINSETUPAPI BOOL WINAPI SetupDiRegisterCoDeviceInstallers(HDEVINFO,PSP_DEVINFO_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiRegisterDeviceInfo(HDEVINFO,PSP_DEVINFO_DATA,DWORD,PSP_DETSIG_CMPPROC,PVOID,PSP_DEVINFO_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiRemoveDevice(HDEVINFO,PSP_DEVINFO_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiRemoveDeviceInterface(HDEVINFO,PSP_DEVICE_INTERFACE_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiSelectBestCompatDrv(HDEVINFO,PSP_DEVINFO_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiSelectDevice(HDEVINFO,PSP_DEVINFO_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiSelectOEMDrv(HWND,HDEVINFO,PSP_DEVINFO_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiSetClassInstallParamsA(HDEVINFO,PSP_DEVINFO_DATA,PSP_CLASSINSTALL_HEADER,DWORD);
-WINSETUPAPI BOOL WINAPI SetupDiSetClassInstallParamsW(HDEVINFO,PSP_DEVINFO_DATA,PSP_CLASSINSTALL_HEADER,DWORD);
-WINSETUPAPI BOOL WINAPI SetupDiSetClassRegistryPropertyA(LPGUID,DWORD,CONST BYTE*,DWORD,PCSTR,PVOID);
-WINSETUPAPI BOOL WINAPI SetupDiSetClassRegistryPropertyW(LPGUID,DWORD,CONST BYTE*,DWORD,PCWSTR,PVOID);
-WINSETUPAPI BOOL WINAPI SetupDiSetDeviceInstallParamsA(HDEVINFO,PSP_DEVINFO_DATA,PSP_DEVINSTALL_PARAMS_A);
-WINSETUPAPI BOOL WINAPI SetupDiSetDeviceInstallParamsW(HDEVINFO,PSP_DEVINFO_DATA,PSP_DEVINSTALL_PARAMS_W);
-WINSETUPAPI BOOL WINAPI SetupDiSetDeviceRegistryPropertyA(HDEVINFO,PSP_DEVINFO_DATA,DWORD,CONST BYTE*,DWORD);
-WINSETUPAPI BOOL WINAPI SetupDiSetDeviceRegistryPropertyW(HDEVINFO,PSP_DEVINFO_DATA,DWORD,CONST BYTE*,DWORD);
-WINSETUPAPI BOOL WINAPI SetupDiSetDriverInstallParamsA(HDEVINFO,PSP_DEVINFO_DATA,PSP_DRVINFO_DATA_A,PSP_DRVINSTALL_PARAMS);
-WINSETUPAPI BOOL WINAPI SetupDiSetDriverInstallParamsW(HDEVINFO,PSP_DEVINFO_DATA,PSP_DRVINFO_DATA_W,PSP_DRVINSTALL_PARAMS);
-WINSETUPAPI BOOL WINAPI SetupDiSetSelectedDevice(HDEVINFO,PSP_DEVINFO_DATA);
-WINSETUPAPI BOOL WINAPI SetupDiSetSelectedDriverA(HDEVINFO,PSP_DEVINFO_DATA,PSP_DRVINFO_DATA_A);
-WINSETUPAPI BOOL WINAPI SetupDiSetSelectedDriverW(HDEVINFO,PSP_DEVINFO_DATA,PSP_DRVINFO_DATA_W);
-WINSETUPAPI BOOL WINAPI SetupDiUnremoveDevice(HDEVINFO,PSP_DEVINFO_DATA);
-WINSETUPAPI HDSKSPC WINAPI SetupDuplicateDiskSpaceListA(HDSKSPC,PVOID,DWORD,UINT);
-WINSETUPAPI HDSKSPC WINAPI SetupDuplicateDiskSpaceListW(HDSKSPC,PVOID,DWORD,UINT);
-WINSETUPAPI BOOL WINAPI SetupFindFirstLineA(HINF,PCSTR,PCSTR,PINFCONTEXT);
-WINSETUPAPI BOOL WINAPI SetupFindFirstLineW(HINF,PCWSTR,PCWSTR,PINFCONTEXT);
-WINSETUPAPI BOOL WINAPI SetupFindNextLine(PINFCONTEXT,PINFCONTEXT);
-WINSETUPAPI BOOL WINAPI SetupFindNextMatchLineA(PINFCONTEXT,PCSTR,PINFCONTEXT);
-WINSETUPAPI BOOL WINAPI SetupFindNextMatchLineW(PINFCONTEXT,PCWSTR,PINFCONTEXT);
-WINSETUPAPI BOOL WINAPI SetupFreeA(PCSTR**,UINT);
-WINSETUPAPI BOOL WINAPI SetupFreeW(PCWSTR**,UINT);
-WINSETUPAPI BOOL WINAPI SetupGetBackupInformationA(HSPFILEQ,PSP_BACKUP_QUEUE_PARAMS_A);
-WINSETUPAPI BOOL WINAPI SetupGetBackupInformationW(HSPFILEQ,PSP_BACKUP_QUEUE_PARAMS_W);
-WINSETUPAPI BOOL WINAPI SetupGetBinaryField(PINFCONTEXT,DWORD,PBYTE,DWORD,LPDWORD);
-WINSETUPAPI DWORD WINAPI SetupGetFieldCount(PINFCONTEXT);
-WINSETUPAPI DWORD WINAPI SetupGetFileCompressionInfoA(PCSTR,PSTR*,PDWORD,PDWORD,PUINT);
-WINSETUPAPI DWORD WINAPI SetupGetFileCompressionInfoW(PCWSTR,PWSTR*,PDWORD,PDWORD,PUINT);
-WINSETUPAPI BOOL WINAPI SetupGetInfFileListA(PCSTR,DWORD,PSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupGetInfFileListW(PCWSTR,DWORD,PWSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupGetInfInformationA(LPCVOID,DWORD,PSP_INF_INFORMATION,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupGetInfInformationW(LPCVOID,DWORD,PSP_INF_INFORMATION,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupGetIntField(PINFCONTEXT,DWORD,PINT);
-WINSETUPAPI BOOL WINAPI SetupGetLineByIndexA(HINF,PCSTR,DWORD,PINFCONTEXT);
-WINSETUPAPI BOOL WINAPI SetupGetLineByIndexW(HINF,PCWSTR,DWORD,PINFCONTEXT);
-WINSETUPAPI LONG WINAPI SetupGetLineCountA(HINF,PCSTR);
-WINSETUPAPI LONG WINAPI SetupGetLineCountW(HINF,PCWSTR);
-WINSETUPAPI BOOL WINAPI SetupGetLineTextA(PINFCONTEXT,HINF,PCSTR,PCSTR,PSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupGetLineTextW(PINFCONTEXT,HINF,PCWSTR,PCWSTR,PWSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupGetMultiSzFieldA(PINFCONTEXT,DWORD,PSTR,DWORD,LPDWORD);
-WINSETUPAPI BOOL WINAPI SetupGetMultiSzFieldW(PINFCONTEXT,DWORD,PWSTR,DWORD,LPDWORD);
-WINSETUPAPI BOOL WINAPI SetupGetSourceFileLocationA(HINF,PINFCONTEXT,PCSTR,PUINT,PSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupGetSourceFileLocationW(HINF,PINFCONTEXT,PCWSTR,PUINT,PWSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupGetSourceFileSizeA(HINF,PINFCONTEXT,PCSTR,PCSTR,PDWORD,UINT);
-WINSETUPAPI BOOL WINAPI SetupGetSourceFileSizeW(HINF,PINFCONTEXT,PCWSTR,PCWSTR,PDWORD,UINT);
-WINSETUPAPI BOOL WINAPI SetupGetSourceInfoA(HINF,UINT,UINT,PSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupGetSourceInfoW(HINF,UINT,UINT,PWSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupGetStringFieldA(PINFCONTEXT,DWORD,PSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupGetStringFieldW(PINFCONTEXT,DWORD,PWSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupGetTargetPathA(HINF,PINFCONTEXT,PCSTR,PSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupGetTargetPathW(HINF,PINFCONTEXT,PCWSTR,PWSTR,DWORD,PDWORD);
-WINSETUPAPI PVOID WINAPI SetupInitDefaultQueueCallback(HWND);
-WINSETUPAPI PVOID WINAPI SetupInitDefaultQueueCallbackEx(HWND,HWND,UINT,DWORD,PVOID);
-WINSETUPAPI HSPFILELOG WINAPI SetupInitializeFileLogA(PCSTR,DWORD);
-WINSETUPAPI HSPFILELOG WINAPI SetupInitializeFileLogW(PCWSTR,DWORD);
-WINSETUPAPI BOOL WINAPI SetupInstallFileA(HINF,PINFCONTEXT,PCSTR,PCSTR,PCSTR,DWORD,PSP_FILE_CALLBACK_A,PVOID);
-WINSETUPAPI BOOL WINAPI SetupInstallFileW(HINF,PINFCONTEXT,PCWSTR,PCWSTR,PCWSTR,DWORD,PSP_FILE_CALLBACK_W,PVOID);
-WINSETUPAPI BOOL WINAPI SetupInstallFileExA(HINF,PINFCONTEXT,PCSTR,PCSTR,PCSTR,DWORD,PSP_FILE_CALLBACK_A,PVOID,PBOOL);
-WINSETUPAPI BOOL WINAPI SetupInstallFileExW(HINF,PINFCONTEXT,PCWSTR,PCWSTR,PCWSTR,DWORD,PSP_FILE_CALLBACK_W,PVOID,PBOOL);
-WINSETUPAPI BOOL WINAPI SetupInstallFilesFromInfSectionA(HINF,HINF,HSPFILEQ,PCSTR,PCSTR,UINT);
-WINSETUPAPI BOOL WINAPI SetupInstallFilesFromInfSectionW(HINF,HINF,HSPFILEQ,PCWSTR,PCWSTR,UINT);
-WINSETUPAPI BOOL WINAPI SetupInstallFromInfSectionA(HWND,HINF,PCSTR,UINT,HKEY,PCSTR,UINT,PSP_FILE_CALLBACK_A,PVOID,HDEVINFO,PSP_DEVINFO_DATA);
-WINSETUPAPI BOOL WINAPI SetupInstallFromInfSectionW(HWND,HINF,PCWSTR,UINT,HKEY,PCWSTR,UINT,PSP_FILE_CALLBACK_W,PVOID,HDEVINFO,PSP_DEVINFO_DATA);
-WINSETUPAPI BOOL WINAPI SetupInstallServicesFromInfSectionA(HINF,PCSTR,DWORD);
-WINSETUPAPI BOOL WINAPI SetupInstallServicesFromInfSectionW(HINF,PCWSTR,DWORD);
-WINSETUPAPI BOOL WINAPI SetupInstallServicesFromInfSectionExA(HINF,PCSTR,DWORD,HDEVINFO,PSP_DEVINFO_DATA,PVOID,PVOID);
-WINSETUPAPI BOOL WINAPI SetupInstallServicesFromInfSectionExW(HINF,PCWSTR,DWORD,HDEVINFO,PSP_DEVINFO_DATA,PVOID,PVOID);
-WINSETUPAPI BOOL WINAPI SetupIterateCabinetA(PCSTR,DWORD,PSP_FILE_CALLBACK_A,PVOID);
-WINSETUPAPI BOOL WINAPI SetupIterateCabinetW(PCWSTR,DWORD,PSP_FILE_CALLBACK_W,PVOID);
-WINSETUPAPI BOOL WINAPI SetupLogErrorA(LPCSTR,LogSeverity);
-WINSETUPAPI BOOL WINAPI SetupLogErrorW(LPCWSTR,LogSeverity);
-WINSETUPAPI BOOL WINAPI SetupLogFileA(HSPFILELOG,PCSTR,PCSTR,PCSTR,DWORD,PCSTR,PCSTR,PCSTR,DWORD);
-WINSETUPAPI BOOL WINAPI SetupLogFileW(HSPFILELOG,PCWSTR,PCWSTR,PCWSTR,DWORD,PCWSTR,PCWSTR,PCWSTR,DWORD);
-WINSETUPAPI BOOL WINAPI SetupOpenAppendInfFileA(PCSTR,HINF,PUINT);
-WINSETUPAPI BOOL WINAPI SetupOpenAppendInfFileW(PCWSTR,HINF,PUINT);
-WINSETUPAPI HSPFILEQ WINAPI SetupOpenFileQueue(VOID);
-WINSETUPAPI HINF WINAPI SetupOpenInfFileA(PCSTR,PCSTR,DWORD,PUINT);
-WINSETUPAPI HINF WINAPI SetupOpenInfFileW(PCWSTR,PCWSTR,DWORD,PUINT);
-WINSETUPAPI BOOL WINAPI SetupOpenLog(BOOL);
-WINSETUPAPI HINF WINAPI SetupOpenMasterInf(VOID);
-WINSETUPAPI UINT WINAPI SetupPromptForDiskA(HWND,PCSTR,PCSTR,PCSTR,PCSTR,PCSTR,DWORD,PSTR,DWORD,PDWORD);
-WINSETUPAPI UINT WINAPI SetupPromptForDiskW(HWND,PCWSTR,PCWSTR,PCWSTR,PCWSTR,PCWSTR,DWORD,PWSTR,DWORD,PDWORD);
-WINSETUPAPI INT WINAPI SetupPromptReboot(HSPFILEQ,HWND,BOOL);
-WINSETUPAPI BOOL WINAPI SetupQueryA(DWORD,PCSTR**,PUINT);
-WINSETUPAPI BOOL WINAPI SetupQueryW(DWORD,PCWSTR**,PUINT);
-WINSETUPAPI BOOL WINAPI SetupQueryDrivesInDiskSpaceListA(HDSKSPC,PSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupQueryDrivesInDiskSpaceListW(HDSKSPC,PWSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupQueryFileLogA(HSPFILELOG,PCSTR,PCSTR,SetupFileLogInfo,PSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupQueryFileLogW(HSPFILELOG,PCWSTR,PCWSTR,SetupFileLogInfo,PWSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupQueryInfFileInformationA(PSP_INF_INFORMATION,UINT,PSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupQueryInfFileInformationW(PSP_INF_INFORMATION,UINT,PWSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupQueryInfOriginalFileInformationA(PSP_INF_INFORMATION,UINT,PSP_ALTPLATFORM_INFO,PSP_ORIGINAL_FILE_INFO_A);
-WINSETUPAPI BOOL WINAPI SetupQueryInfOriginalFileInformationW(PSP_INF_INFORMATION,UINT,PSP_ALTPLATFORM_INFO,PSP_ORIGINAL_FILE_INFO_W);
-WINSETUPAPI BOOL WINAPI SetupQueryInfVersionInformationA(PSP_INF_INFORMATION,UINT,PSTR,PSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupQueryInfVersionInformationW(PSP_INF_INFORMATION,UINT,PCWSTR,PWSTR,DWORD,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupQuerySpaceRequiredOnDriveA(HDSKSPC,PCSTR,LONGLONG*,PVOID,UINT);
-WINSETUPAPI BOOL WINAPI SetupQuerySpaceRequiredOnDriveW(HDSKSPC,PCWSTR,LONGLONG*,PVOID,UINT);
-WINSETUPAPI BOOL WINAPI SetupQueueCopyA(HSPFILEQ,PCSTR,PCSTR,PCSTR,PCSTR,PCSTR,PCSTR,PCSTR,DWORD);
-WINSETUPAPI BOOL WINAPI SetupQueueCopyW(HSPFILEQ,PCWSTR,PCWSTR,PCWSTR,PCWSTR,PCWSTR,PCWSTR,PCWSTR,DWORD);
-WINSETUPAPI BOOL WINAPI SetupQueueCopyIndirectA(PSP_FILE_COPY_PARAMS_A);
-WINSETUPAPI BOOL WINAPI SetupQueueCopyIndirectW(PSP_FILE_COPY_PARAMS_W);
-WINSETUPAPI BOOL WINAPI SetupQueueCopySectionA(HSPFILEQ,PCSTR,HINF,HINF,PCSTR,DWORD);
-WINSETUPAPI BOOL WINAPI SetupQueueCopySectionW(HSPFILEQ,PCWSTR,HINF,HINF,PCWSTR,DWORD);
-WINSETUPAPI BOOL WINAPI SetupQueueDefaultCopyA(HSPFILEQ,HINF,PCSTR,PCSTR,PCSTR,DWORD);
-WINSETUPAPI BOOL WINAPI SetupQueueDefaultCopyW(HSPFILEQ,HINF,PCWSTR,PCWSTR,PCWSTR,DWORD);
-WINSETUPAPI BOOL WINAPI SetupQueueDeleteA(HSPFILEQ,PCSTR,PCSTR);
-WINSETUPAPI BOOL WINAPI SetupQueueDeleteW(HSPFILEQ,PCWSTR,PCWSTR);
-WINSETUPAPI BOOL WINAPI SetupQueueDeleteSectionA(HSPFILEQ,HINF,HINF,PCSTR);
-WINSETUPAPI BOOL WINAPI SetupQueueDeleteSectionW(HSPFILEQ,HINF,HINF,PCWSTR);
-WINSETUPAPI BOOL WINAPI SetupQueueRenameA(HSPFILEQ,PCSTR,PCSTR,PCSTR,PCSTR);
-WINSETUPAPI BOOL WINAPI SetupQueueRenameW(HSPFILEQ,PCWSTR,PCWSTR,PCWSTR,PCWSTR);
-WINSETUPAPI BOOL WINAPI SetupQueueRenameSectionA(HSPFILEQ,HINF,HINF,PCSTR);
-WINSETUPAPI BOOL WINAPI SetupQueueRenameSectionW(HSPFILEQ,HINF,HINF,PCWSTR);
-WINSETUPAPI BOOL WINAPI SetupRemoveFileLogEntryA(HSPFILELOG,PCSTR,PCSTR);
-WINSETUPAPI BOOL WINAPI SetupRemoveFileLogEntryW(HSPFILELOG,PCWSTR,PCWSTR);
-WINSETUPAPI BOOL WINAPI SetupRemoveFromDiskSpaceListA(HDSKSPC,PCSTR,UINT,PVOID,UINT);
-WINSETUPAPI BOOL WINAPI SetupRemoveFromDiskSpaceListW(HDSKSPC,PCWSTR,UINT,PVOID,UINT);
-WINSETUPAPI BOOL WINAPI SetupRemoveFromSourceListA(DWORD,PCSTR);
-WINSETUPAPI BOOL WINAPI SetupRemoveFromSourceListW(DWORD,PCWSTR);
-WINSETUPAPI BOOL WINAPI SetupRemoveInstallSectionFromDiskSpaceListA(HDSKSPC,HINF,HINF,PCSTR,PVOID,UINT);
-WINSETUPAPI BOOL WINAPI SetupRemoveInstallSectionFromDiskSpaceListW(HDSKSPC,HINF,HINF,PCWSTR,PVOID,UINT);
-WINSETUPAPI BOOL WINAPI SetupRemoveSectionFromDiskSpaceListA(HDSKSPC,HINF,HINF,PCSTR,UINT,PVOID,UINT);
-WINSETUPAPI BOOL WINAPI SetupRemoveSectionFromDiskSpaceListW(HDSKSPC,HINF,HINF,PCWSTR,UINT,PVOID,UINT);
-WINSETUPAPI UINT WINAPI SetupRenameErrorA(HWND,PCSTR,PCSTR,PCSTR,UINT,DWORD);
-WINSETUPAPI UINT WINAPI SetupRenameErrorW(HWND,PCWSTR,PCWSTR,PCWSTR,UINT,DWORD);
-WINSETUPAPI BOOL WINAPI SetupScanFileQueueA(HSPFILEQ,DWORD,HWND,PSP_FILE_CALLBACK_A,PVOID,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupScanFileQueueW(HSPFILEQ,DWORD,HWND,PSP_FILE_CALLBACK_W,PVOID,PDWORD);
-WINSETUPAPI BOOL WINAPI SetupSetDirectoryIdA(HINF,DWORD,PCSTR);
-WINSETUPAPI BOOL WINAPI SetupSetDirectoryIdW(HINF,DWORD,PCWSTR);
-WINSETUPAPI BOOL WINAPI SetupSetDirectoryIdExA(HINF,DWORD,PCSTR,DWORD,DWORD,PVOID);
-WINSETUPAPI BOOL WINAPI SetupSetDirectoryIdExW(HINF,DWORD,PCWSTR,DWORD,DWORD,PVOID);
-WINSETUPAPI BOOL WINAPI SetupSetFileQueueAlternatePlatformA(HSPFILEQ,PSP_ALTPLATFORM_INFO,PCSTR);
-WINSETUPAPI BOOL WINAPI SetupSetFileQueueAlternatePlatformW(HSPFILEQ,PSP_ALTPLATFORM_INFO,PCWSTR);
-WINSETUPAPI BOOL WINAPI SetupSetPlatformPathOverrideA(PCSTR);
-WINSETUPAPI BOOL WINAPI SetupSetPlatformPathOverrideW(PCWSTR);
-WINSETUPAPI BOOL WINAPI SetupSetSourceListA(DWORD,PCSTR*,UINT);
-WINSETUPAPI BOOL WINAPI SetupSetSourceListW(DWORD,PCWSTR*,UINT);
-WINSETUPAPI VOID WINAPI SetupTermDefaultQueueCallback(PVOID);
-WINSETUPAPI BOOL WINAPI SetupTerminateFileLog(HSPFILELOG);
-
-/* for backward compatibility */
-#define SetupDiCreateInterfaceDeviceW SetupDiCreateDeviceInterfaceW
-#define SetupDiCreateInterfaceDeviceRegKeyW SetupDiCreateDeviceInterfaceRegKeyW
-#define SetupDiOpenInterfaceDeviceW SetupDiOpenDeviceInterfaceW
-#define SetupDiGetInterfaceDeviceDetailW SetupDiGetDeviceInterfaceDetailW
-#define SetupDiCreateInterfaceDeviceA SetupDiCreateDeviceInterfaceA
-#define SetupDiCreateInterfaceDeviceRegKeyA SetupDiCreateDeviceInterfaceRegKeyA
-#define SetupDiOpenInterfaceDeviceA SetupDiOpenDeviceInterfaceA
-#define SetupDiGetInterfaceDeviceDetailA SetupDiGetDeviceInterfaceDetailA
-
-#ifdef UNICODE
-#define PSP_FILE_CALLBACK PSP_FILE_CALLBACK_W
-#define SetupAddInstallSectionToDiskSpaceList SetupAddInstallSectionToDiskSpaceListW
-#define SetupAddSectionToDiskSpaceList SetupAddSectionToDiskSpaceListW
-#define SetupAddToDiskSpaceList SetupAddToDiskSpaceListW
-#define SetupAddToSourceList SetupAddToSourceListW
-#define SetupAdjustDiskSpaceList SetupAdjustDiskSpaceListW
-#define SetupBackupError SetupBackupErrorW
-#define SetupCommitFileQueue SetupCommitFileQueueW
-#if (_SETUPAPI_VER >= 0x0502)
-#define SetupConfigureWmiFromInfSection SetupConfigureWmiFromInfSectionW
-#endif
-#define SetupCopyError SetupCopyErrorW
-#define SetupCopyOEMInf SetupCopyOEMInfW
-#define SetupCreateDiskSpaceList SetupCreateDiskSpaceListW
-#define SetupDecompressOrCopyFile SetupDecompressOrCopyFileW
-#define SetupDefaultQueueCallback SetupDefaultQueueCallbackW
-#define SetupDeleteError SetupDeleteErrorW
-#define SetupDiBuildClassInfoListEx SetupDiBuildClassInfoListExW
-#define SetupDiClassGuidsFromNameEx SetupDiClassGuidsFromNameExW
-#define SetupDiClassGuidsFromName SetupDiClassGuidsFromNameW
-#define SetupDiClassNameFromGuidEx SetupDiClassNameFromGuidExW
-#define SetupDiClassNameFromGuid SetupDiClassNameFromGuidW
-#define SetupDiCreateDeviceInfoListEx SetupDiCreateDeviceInfoListExW
-#define SetupDiCreateDeviceInfo SetupDiCreateDeviceInfoW
-#define SetupDiCreateDeviceInterfaceRegKey SetupDiCreateDeviceInterfaceRegKeyW
-#define SetupDiCreateInterfaceDeviceRegKey SetupDiCreateDeviceInterfaceRegKeyW
-#define SetupDiCreateDeviceInterface SetupDiCreateDeviceInterfaceW
-#define SetupDiCreateInterfaceDevice SetupDiCreateDeviceInterfaceW
-#define SetupDiCreateDevRegKey SetupDiCreateDevRegKeyW
-#define SetupDiEnumDriverInfo SetupDiEnumDriverInfoW
-#define SetupDiGetActualSectionToInstall SetupDiGetActualSectionToInstallW
-#define SetupDiGetClassDescriptionEx SetupDiGetClassDescriptionExW
-#define SetupDiGetClassDescription SetupDiGetClassDescriptionW
-#define SetupDiGetClassDevPropertySheets SetupDiGetClassDevPropertySheetsW
-#define SetupDiGetClassDevsEx SetupDiGetClassDevsExW
-#define SetupDiGetClassDevs SetupDiGetClassDevsW
-#define SetupDiGetClassImageListEx SetupDiGetClassImageListExW
-#define SetupDiGetClassInstallParams SetupDiGetClassInstallParamsW
-#define SetupDiGetClassRegistryProperty SetupDiGetClassRegistryPropertyW
-#define SetupDiGetDeviceInfoListDetail SetupDiGetDeviceInfoListDetailW
-#define SetupDiGetDeviceInstallParams SetupDiGetDeviceInstallParamsW
-#define SetupDiGetDeviceInstanceId SetupDiGetDeviceInstanceIdW
-#define SetupDiGetDeviceInterfaceDetail SetupDiGetDeviceInterfaceDetailW
-#define SetupDiGetInterfaceDeviceDetail SetupDiGetDeviceInterfaceDetailW
-#define SetupDiGetDeviceRegistryProperty SetupDiGetDeviceRegistryPropertyW
-#define SetupDiGetDriverInfoDetail SetupDiGetDriverInfoDetailW
-#define SetupDiGetDriverInstallParams SetupDiGetDriverInstallParamsW
-#define SetupDiGetHwProfileFriendlyNameEx SetupDiGetHwProfileFriendlyNameExW
-#define SetupDiGetHwProfileFriendlyName SetupDiGetHwProfileFriendlyNameW
-#define SetupDiGetHwProfileListEx SetupDiGetHwProfileListExW
-#define SetupDiGetINFClass SetupDiGetINFClassW
-#define SetupDiGetSelectedDriver SetupDiGetSelectedDriverW
-#define SetupDiInstallClassEx SetupDiInstallClassExW
-#define SetupDiInstallClass SetupDiInstallClassW
-#define SetupDiOpenClassRegKeyEx SetupDiOpenClassRegKeyExW
-#define SetupDiOpenDeviceInfo SetupDiOpenDeviceInfoW
-#define SetupDiOpenDeviceInterface SetupDiOpenDeviceInterfaceW
-#define SetupDiOpenInterfaceDevice SetupDiOpenDeviceInterfaceW
-#define SetupDiSetClassInstallParams SetupDiSetClassInstallParamsW
-#define SetupDiSetClassRegistryProperty SetupDiSetClassRegistryPropertyW
-#define SetupDiSetDeviceInstallParams SetupDiSetDeviceInstallParamsW
-#define SetupDiSetDeviceRegistryProperty SetupDiSetDeviceRegistryPropertyW
-#define SetupDiSetDriverInstallParams SetupDiSetDriverInstallParamsW
-#define SetupDiSetSelectedDriver SetupDiSetSelectedDriverW
-#define SetupDuplicateDiskSpaceList SetupDuplicateDiskSpaceListW
-#define SetupFindFirstLine SetupFindFirstLineW
-#define SetupFindNextMatchLine SetupFindNextMatchLineW
-#define SetupFreeSourceList SetupFreeSourceListW
-#define SetupGetBackupInformation SetupGetBackupInformationW
-#define SetupGetFileCompressionInfo SetupGetFileCompressionInfoW
-#define SetupGetInfFileList SetupGetInfFileListW
-#define SetupGetInfInformation SetupGetInfInformationW
-#define SetupGetLineByIndex SetupGetLineByIndexW
-#define SetupGetLineCount SetupGetLineCountW
-#define SetupGetLineText SetupGetLineTextW
-#define SetupGetMultiSzField SetupGetMultiSzFieldW
-#define SetupGetSourceFileLocation SetupGetSourceFileLocationW
-#define SetupGetSourceFileSize SetupGetSourceFileSizeW
-#define SetupGetSourceInfo SetupGetSourceInfoW
-#define SetupGetStringField SetupGetStringFieldW
-#define SetupGetTargetPath SetupGetTargetPathW
-#define SetupInitializeFileLog SetupInitializeFileLogW
-#define SetupInstallFileEx SetupInstallFileExW
-#define SetupInstallFilesFromInfSection SetupInstallFilesFromInfSectionW
-#define SetupInstallFile SetupInstallFileW
-#define SetupInstallFromInfSection SetupInstallFromInfSectionW
-#define SetupInstallServicesFromInfSectionEx SetupInstallServicesFromInfSectionExW
-#define SetupInstallServicesFromInfSection SetupInstallServicesFromInfSectionW
-#define SetupIterateCabinet SetupIterateCabinetW
-#define SetupLogError SetupLogErrorW
-#define SetupLogFile SetupLogFileW
-#define SetupOpenAppendInfFile SetupOpenAppendInfFileW
-#define SetupOpenInfFile SetupOpenInfFileW
-#define SetupPromptForDisk SetupPromptForDiskW
-#define SetupQueryDrivesInDiskSpaceList SetupQueryDrivesInDiskSpaceListW
-#define SetupQueryFileLog SetupQueryFileLogW
-#define SetupQueryInfFileInformation SetupQueryInfFileInformationW
-#define SetupQueryInfOriginalFileInformation SetupQueryInfOriginalFileInformationW
-#define SetupQueryInfVersionInformation SetupQueryInfVersionInformationW
-#define SetupQuerySourceList SetupQuerySourceListW
-#define SetupQuerySpaceRequiredOnDrive SetupQuerySpaceRequiredOnDriveW
-#define SetupQueueCopyIndirect SetupQueueCopyIndirectW
-#define SetupQueueCopySection SetupQueueCopySectionW
-#define SetupQueueCopy SetupQueueCopyW
-#define SetupQueueDefaultCopy SetupQueueDefaultCopyW
-#define SetupQueueDeleteSection SetupQueueDeleteSectionW
-#define SetupQueueDelete SetupQueueDeleteW
-#define SetupQueueRenameSection SetupQueueRenameSectionW
-#define SetupQueueRename SetupQueueRenameW
-#define SetupRemoveFileLogEntry SetupRemoveFileLogEntryW
-#define SetupRemoveFromDiskSpaceList SetupRemoveFromDiskSpaceListW
-#define SetupRemoveFromSourceList SetupRemoveFromSourceListW
-#define SetupRemoveInstallSectionFromDiskSpaceList SetupRemoveInstallSectionFromDiskSpaceListW
-#define SetupRemoveSectionFromDiskSpaceList SetupRemoveSectionFromDiskSpaceListW
-#define SetupRenameError SetupRenameErrorW
-#define SetupScanFileQueue SetupScanFileQueueW
-#define SetupSetDirectoryIdEx SetupSetDirectoryIdExW
-#define SetupSetDirectoryId SetupSetDirectoryIdW
-#define SetupSetFileQueueAlternatePlatform SetupSetFileQueueAlternatePlatformW
-#define SetupSetPlatformPathOverride SetupSetPlatformPathOverrideW
-#define SetupSetSourceList SetupSetSourceListW
-#else
-#define PSP_FILE_CALLBACK PSP_FILE_CALLBACK_A
-#define SetupAddInstallSectionToDiskSpaceList SetupAddInstallSectionToDiskSpaceListA
-#define SetupAddSectionToDiskSpaceList SetupAddSectionToDiskSpaceListA
-#define SetupAddToDiskSpaceList SetupAddToDiskSpaceListA
-#define SetupAddToSourceList SetupAddToSourceListA
-#define SetupAdjustDiskSpaceList SetupAdjustDiskSpaceListA
-#define SetupBackupError SetupBackupErrorA
-#define SetupCommitFileQueue SetupCommitFileQueueA
-#if (_SETUPAPI_VER >= 0x0502)
-#define SetupConfigureWmiFromInfSection SetupConfigureWmiFromInfSectionW
-#endif
-#define SetupCopyError SetupCopyErrorA
-#define SetupCopyOEMInf SetupCopyOEMInfA
-#define SetupCreateDiskSpaceList SetupCreateDiskSpaceListA
-#define SetupDecompressOrCopyFile SetupDecompressOrCopyFileA
-#define SetupDefaultQueueCallback SetupDefaultQueueCallbackA
-#define SetupDeleteError SetupDeleteErrorA
-#define SetupDiBuildClassInfoListEx SetupDiBuildClassInfoListExA
-#define SetupDiClassGuidsFromName SetupDiClassGuidsFromNameA
-#define SetupDiClassGuidsFromNameEx SetupDiClassGuidsFromNameExA
-#define SetupDiClassNameFromGuid SetupDiClassNameFromGuidA
-#define SetupDiClassNameFromGuidEx SetupDiClassNameFromGuidExA
-#define SetupDiCreateDeviceInfo SetupDiCreateDeviceInfoA
-#define SetupDiCreateDeviceInfoListEx SetupDiCreateDeviceInfoListExA
-#define SetupDiCreateDeviceInterface SetupDiCreateDeviceInterfaceA
-#define SetupDiCreateInterfaceDevice SetupDiCreateDeviceInterfaceA
-#define SetupDiCreateDeviceInterfaceRegKey SetupDiCreateDeviceInterfaceRegKeyA
-#define SetupDiCreateInterfaceDeviceRegKey SetupDiCreateDeviceInterfaceRegKeyA
-#define SetupDiCreateDevRegKey SetupDiCreateDevRegKeyA
-#define SetupDiDeleteInterfaceDeviceData SetupDiDeleteDeviceInterfaceData
-#define SetupDiEnumDriverInfo SetupDiEnumDriverInfoA
-#define SetupDiGetActualSectionToInstall SetupDiGetActualSectionToInstallA
-#define SetupDiGetClassDescription SetupDiGetClassDescriptionA
-#define SetupDiGetClassDescriptionEx SetupDiGetClassDescriptionExA
-#define SetupDiGetClassDevPropertySheets SetupDiGetClassDevPropertySheetsA
-#define SetupDiGetClassDevs SetupDiGetClassDevsA
-#define SetupDiGetClassDevsEx SetupDiGetClassDevsExA
-#define SetupDiGetClassImageListEx SetupDiGetClassImageListExA
-#define SetupDiGetClassInstallParams SetupDiGetClassInstallParamsA
-#define SetupDiGetClassRegistryProperty SetupDiGetClassRegistryPropertyA
-#define SetupDiGetDeviceInfoListDetail SetupDiGetDeviceInfoListDetailA
-#define SetupDiGetDeviceInstallParams SetupDiGetDeviceInstallParamsA
-#define SetupDiGetDeviceInstanceId SetupDiGetDeviceInstanceIdA
-#define SetupDiGetDeviceInterfaceDetail SetupDiGetDeviceInterfaceDetailA
-#define SetupDiGetInterfaceDeviceDetail SetupDiGetDeviceInterfaceDetailA
-#define SetupDiGetDeviceRegistryProperty SetupDiGetDeviceRegistryPropertyA
-#define SetupDiGetDriverInfoDetail SetupDiGetDriverInfoDetailA
-#define SetupDiGetDriverInstallParams SetupDiGetDriverInstallParamsA
-#define SetupDiGetHwProfileFriendlyName SetupDiGetHwProfileFriendlyNameA
-#define SetupDiGetHwProfileFriendlyNameEx SetupDiGetHwProfileFriendlyNameExA
-#define SetupDiGetHwProfileListEx SetupDiGetHwProfileListExA
-#define SetupDiGetINFClass SetupDiGetINFClassA
-#define SetupDiGetSelectedDriver SetupDiGetSelectedDriverA
-#define SetupDiInstallClass SetupDiInstallClassA
-#define SetupDiInstallClassEx SetupDiInstallClassExA
-#define SetupDiOpenClassRegKeyEx SetupDiOpenClassRegKeyExA
-#define SetupDiOpenDeviceInfo SetupDiOpenDeviceInfoA
-#define SetupDiOpenDeviceInterface SetupDiOpenDeviceInterfaceA
-#define SetupDiOpenInterfaceDevice SetupDiOpenDeviceInterfaceA
-#define SetupDiSetClassInstallParams SetupDiSetClassInstallParamsA
-#define SetupDiSetClassRegistryProperty SetupDiSetClassRegistryPropertyA
-#define SetupDiSetDeviceInstallParams SetupDiSetDeviceInstallParamsA
-#define SetupDiSetDeviceRegistryProperty SetupDiSetDeviceRegistryPropertyA
-#define SetupDiSetDriverInstallParams SetupDiSetDriverInstallParamsA
-#define SetupDiSetSelectedDriver SetupDiSetSelectedDriverA
-#define SetupDuplicateDiskSpaceList SetupDuplicateDiskSpaceListA
-#define SetupFindFirstLine SetupFindFirstLineA
-#define SetupFindNextMatchLine SetupFindNextMatchLineA
-#define SetupFreeSourceList SetupFreeSourceListA
-#define SetupGetBackupInformation SetupGetBackupInformationA
-#define SetupGetFileCompressionInfo SetupGetFileCompressionInfoA
-#define SetupGetInfFileList SetupGetInfFileListA
-#define SetupGetInfInformation SetupGetInfInformationA
-#define SetupGetLineByIndex SetupGetLineByIndexA
-#define SetupGetLineCount SetupGetLineCountA
-#define SetupGetLineText SetupGetLineTextA
-#define SetupGetMultiSzField SetupGetMultiSzFieldA
-#define SetupGetSourceFileLocation SetupGetSourceFileLocationA
-#define SetupGetSourceFileSize SetupGetSourceFileSizeA
-#define SetupGetSourceInfo SetupGetSourceInfoA
-#define SetupGetStringField SetupGetStringFieldA
-#define SetupGetTargetPath SetupGetTargetPathA
-#define SetupInitializeFileLog SetupInitializeFileLogA
-#define SetupInstallFile SetupInstallFileA
-#define SetupInstallFileEx SetupInstallFileExA
-#define SetupInstallFilesFromInfSection SetupInstallFilesFromInfSectionA
-#define SetupInstallFromInfSection SetupInstallFromInfSectionA
-#define SetupInstallServicesFromInfSection SetupInstallServicesFromInfSectionA
-#define SetupInstallServicesFromInfSectionEx SetupInstallServicesFromInfSectionExA
-#define SetupIterateCabinet SetupIterateCabinetA
-#define SetupLogError SetupLogErrorA
-#define SetupLogFile SetupLogFileA
-#define SetupOpenAppendInfFile SetupOpenAppendInfFileA
-#define SetupOpenInfFile SetupOpenInfFileA
-#define SetupPromptForDisk SetupPromptForDiskA
-#define SetupQueryDrivesInDiskSpaceList SetupQueryDrivesInDiskSpaceListA
-#define SetupQueryFileLog SetupQueryFileLogA
-#define SetupQueryInfFileInformation SetupQueryInfFileInformationA
-#define SetupQueryInfOriginalFileInformation SetupQueryInfOriginalFileInformationA
-#define SetupQueryInfVersionInformation SetupQueryInfVersionInformationA
-#define SetupQuerySourceList SetupQuerySourceListA
-#define SetupQuerySpaceRequiredOnDrive SetupQuerySpaceRequiredOnDriveA
-#define SetupQueueCopy SetupQueueCopyA
-#define SetupQueueCopyIndirect SetupQueueCopyIndirectA
-#define SetupQueueCopySection SetupQueueCopySectionA
-#define SetupQueueDefaultCopy SetupQueueDefaultCopyA
-#define SetupQueueDelete SetupQueueDeleteA
-#define SetupQueueDeleteSection SetupQueueDeleteSectionA
-#define SetupQueueRename SetupQueueRenameA
-#define SetupQueueRenameSection SetupQueueRenameSectionA
-#define SetupRemoveFileLogEntry SetupRemoveFileLogEntryA
-#define SetupRemoveFromDiskSpaceList SetupRemoveFromDiskSpaceListA
-#define SetupRemoveFromSourceList SetupRemoveFromSourceListA
-#define SetupRemoveInstallSectionFromDiskSpaceList SetupRemoveInstallSectionFromDiskSpaceListA
-#define SetupRemoveSectionFromDiskSpaceList SetupRemoveSectionFromDiskSpaceListA
-#define SetupRenameError SetupRenameErrorA
-#define SetupScanFileQueue SetupScanFileQueueA
-#define SetupSetDirectoryId SetupSetDirectoryIdA
-#define SetupSetDirectoryIdEx SetupSetDirectoryIdExA
-#define SetupSetFileQueueAlternatePlatform SetupSetFileQueueAlternatePlatformA
-#define SetupSetPlatformPathOverride SetupSetPlatformPathOverrideA
-#define SetupSetSourceList SetupSetSourceListA
-#endif /* UNICODE */
-
-#endif /* RC_INVOKED */
-
-#ifdef __cplusplus
-}
-#endif
-#include <poppack.h>
-#endif
diff --git a/winsup/w32api/include/shellapi.h b/winsup/w32api/include/shellapi.h
deleted file mode 100644
index 9fb30bb..0000000
--- a/winsup/w32api/include/shellapi.h
+++ /dev/null
@@ -1,366 +0,0 @@
-#ifndef _SHELLAPI_H
-#define _SHELLAPI_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define WINSHELLAPI DECLSPEC_IMPORT
-#define ABE_LEFT 0
-#define ABE_TOP 1
-#define ABE_RIGHT 2
-#define ABE_BOTTOM 3
-#define ABS_AUTOHIDE 1
-#define ABS_ALWAYSONTOP 2
-#define SEE_MASK_CLASSNAME 0x1
-#define SEE_MASK_CLASSKEY 0x3
-#define SEE_MASK_IDLIST 0x4
-#define SEE_MASK_INVOKEIDLIST 0xc
-#define SEE_MASK_ICON 0x10
-#define SEE_MASK_HOTKEY 0x20
-#define SEE_MASK_NOCLOSEPROCESS 0x40
-#define SEE_MASK_CONNECTNETDRV 0x80
-#define SEE_MASK_FLAG_DDEWAIT 0x100
-#define SEE_MASK_DOENVSUBST 0x200
-#define SEE_MASK_FLAG_NO_UI 0x400
-#define SEE_MASK_NO_CONSOLE 0x8000
-#define SEE_MASK_UNICODE 0x10000
-#define SEE_MASK_ASYNCOK 0x100000
-#define SEE_MASK_HMONITOR 0x200000
-#if (_WIN32_IE >= 0x0600)
-#define SEE_MASK_NOZONECHECKS 0x800000
-#define SEE_MASK_FLAG_LOG_USAGE 0x4000000
-#endif
-#define ABM_NEW 0
-#define ABM_REMOVE 1
-#define ABM_QUERYPOS 2
-#define ABM_SETPOS 3
-#define ABM_GETSTATE 4
-#define ABM_GETTASKBARPOS 5
-#define ABM_ACTIVATE 6
-#define ABM_GETAUTOHIDEBAR 7
-#define ABM_SETAUTOHIDEBAR 8
-#define ABM_WINDOWPOSCHANGED 9
-#define ABN_STATECHANGE 0
-#define ABN_POSCHANGED 1
-#define ABN_FULLSCREENAPP 2
-#define ABN_WINDOWARRANGE 3
-#define NIM_ADD 0
-#define NIM_MODIFY 1
-#define NIM_DELETE 2
-#if (_WIN32_IE >= 0x0500)
-#define NOTIFYICON_VERSION 3
-#if (_WIN32_WINNT >= 0x600)
-#define NOTIFYICON_VERSION_4 4
-#endif
-#define NIM_SETFOCUS 3
-#define NIM_SETVERSION 4
-#define NIN_POPUPOPEN WM_USER+6
-#define NIN_POPUPCLOSE WM_USER+7
-#endif
-#define NIF_MESSAGE 0x00000001
-#define NIF_ICON 0x00000002
-#define NIF_TIP 0x00000004
-#define NIF_STATE 0x00000008
-#if (_WIN32_IE >= 0x0500)
-#define NIF_INFO 0x00000010
-#endif
-#if (_WIN32_IE >= 0x0600)
-#define NIF_GUID 0x00000020
-#endif
-#if (_WIN32_IE >= 0x0500)
-#define NIIF_NONE 0x00000000
-#define NIIF_INFO 0x00000001
-#define NIIF_WARNING 0x00000002
-#define NIIF_ERROR 0x00000003
-#endif
-#if (_WIN32_IE >= 0x0600)
-#define NIIF_ICON_MASK 0x0000000F
-#define NIIF_NOSOUND 0x00000010
-#endif
-#if (_WIN32_IE >= 0x0500)
-#define NIS_HIDDEN 0x00000001
-#define NIS_SHAREDICON 0x00000002
-#endif
-#define SE_ERR_FNF 2
-#define SE_ERR_PNF 3
-#define SE_ERR_ACCESSDENIED 5
-#define SE_ERR_OOM 8
-#define SE_ERR_DLLNOTFOUND 32
-#define SE_ERR_SHARE 26
-#define SE_ERR_ASSOCINCOMPLETE 27
-#define SE_ERR_DDETIMEOUT 28
-#define SE_ERR_DDEFAIL 29
-#define SE_ERR_DDEBUSY 30
-#define SE_ERR_NOASSOC 31
-#define FO_MOVE 1
-#define FO_COPY 2
-#define FO_DELETE 3
-#define FO_RENAME 4
-#define FOF_MULTIDESTFILES 1
-#define FOF_CONFIRMMOUSE 2
-#define FOF_SILENT 4
-#define FOF_RENAMEONCOLLISION 8
-#define FOF_NOCONFIRMATION 16
-#define FOF_WANTMAPPINGHANDLE 32
-#define FOF_ALLOWUNDO 64
-#define FOF_FILESONLY 128
-#define FOF_SIMPLEPROGRESS 256
-#define FOF_NOCONFIRMMKDIR 512
-#define FOF_NOERRORUI 1024
-#define FOF_NOCOPYSECURITYATTRIBS 2048
-#define PO_DELETE 19
-#define PO_RENAME 20
-#define PO_PORTCHANGE 32
-#define PO_REN_PORT 52
-#define SHGFI_ICON 256
-#define SHGFI_DISPLAYNAME 512
-#define SHGFI_TYPENAME 1024
-#define SHGFI_ATTRIBUTES 2048
-#define SHGFI_ICONLOCATION 4096
-#define SHGFI_EXETYPE 8192
-#define SHGFI_SYSICONINDEX 16384
-#define SHGFI_LINKOVERLAY 32768
-#define SHGFI_SELECTED 65536
-#define SHGFI_ATTR_SPECIFIED 131072
-#define SHGFI_LARGEICON 0
-#define SHGFI_SMALLICON 1
-#define SHGFI_OPENICON 2
-#define SHGFI_SHELLICONSIZE 4
-#define SHGFI_PIDL 8
-#define SHGFI_USEFILEATTRIBUTES 16
-#define SHERB_NOCONFIRMATION 1
-#define SHERB_NOPROGRESSUI 2
-#define SHERB_NOSOUND 4
-#ifdef UNICODE
-#define NOTIFYICONDATA_V2_SIZE 936
-#define NOTIFYICONDATA_V1_SIZE 152
-#else
-#define NOTIFYICONDATA_V2_SIZE 488
-#define NOTIFYICONDATA_V1_SIZE 88
-#endif
-
-typedef WORD FILEOP_FLAGS;
-typedef WORD PRINTEROP_FLAGS;
-#include <pshpack2.h>
-typedef struct _AppBarData {
- DWORD cbSize;
- HWND hWnd;
- UINT uCallbackMessage;
- UINT uEdge;
- RECT rc;
- LPARAM lParam;
-} APPBARDATA,*PAPPBARDATA;
-DECLARE_HANDLE(HDROP);
-
-typedef struct _NOTIFYICONDATAA {
- DWORD cbSize;
- HWND hWnd;
- UINT uID;
- UINT uFlags;
- UINT uCallbackMessage;
- HICON hIcon;
-#if _WIN32_IE >= 0x0500
- CHAR szTip[128];
- DWORD dwState;
- DWORD dwStateMask;
- CHAR szInfo[256];
- _ANONYMOUS_UNION union {
- UINT uTimeout;
- UINT uVersion;
- } DUMMYUNIONNAME;
- CHAR szInfoTitle[64];
- DWORD dwInfoFlags;
-#else
- CHAR szTip[64];
-#endif
-#if _WIN32_IE >= 0x600
- GUID guidItem;
-#endif
-#if _WIN32_WINNT >= 0x600
- HICON hBalloonIcon;
-#endif
-} NOTIFYICONDATAA,*PNOTIFYICONDATAA;
-
-typedef struct _NOTIFYICONDATAW {
- DWORD cbSize;
- HWND hWnd;
- UINT uID;
- UINT uFlags;
- UINT uCallbackMessage;
- HICON hIcon;
-#if _WIN32_IE >= 0x0500
- WCHAR szTip[128];
- DWORD dwState;
- DWORD dwStateMask;
- WCHAR szInfo[256];
- _ANONYMOUS_UNION union {
- UINT uTimeout;
- UINT uVersion;
- } DUMMYUNIONNAME;
- WCHAR szInfoTitle[64];
- DWORD dwInfoFlags;
-#else
- WCHAR szTip[64];
-#endif
-#if _WIN32_IE >= 0x600
- GUID guidItem;
-#endif
-#if _WIN32_WINNT >= 0x600
- HICON hBalloonIcon;
-#endif
-} NOTIFYICONDATAW,*PNOTIFYICONDATAW;
-
-typedef struct _SHELLEXECUTEINFOA {
- DWORD cbSize;
- ULONG fMask;
- HWND hwnd;
- LPCSTR lpVerb;
- LPCSTR lpFile;
- LPCSTR lpParameters;
- LPCSTR lpDirectory;
- int nShow;
- HINSTANCE hInstApp;
- PVOID lpIDList;
- LPCSTR lpClass;
- HKEY hkeyClass;
- DWORD dwHotKey;
- HANDLE hIcon;
- HANDLE hProcess;
-} SHELLEXECUTEINFOA,*LPSHELLEXECUTEINFOA;
-typedef struct _SHELLEXECUTEINFOW {
- DWORD cbSize;
- ULONG fMask;
- HWND hwnd;
- LPCWSTR lpVerb;
- LPCWSTR lpFile;
- LPCWSTR lpParameters;
- LPCWSTR lpDirectory;
- int nShow;
- HINSTANCE hInstApp;
- PVOID lpIDList;
- LPCWSTR lpClass;
- HKEY hkeyClass;
- DWORD dwHotKey;
- HANDLE hIcon;
- HANDLE hProcess;
-} SHELLEXECUTEINFOW,*LPSHELLEXECUTEINFOW;
-typedef struct _SHFILEOPSTRUCTA {
- HWND hwnd;
- UINT wFunc;
- LPCSTR pFrom;
- LPCSTR pTo;
- FILEOP_FLAGS fFlags;
- BOOL fAnyOperationsAborted;
- PVOID hNameMappings;
- LPCSTR lpszProgressTitle;
-} SHFILEOPSTRUCTA,*LPSHFILEOPSTRUCTA;
-typedef struct _SHFILEOPSTRUCTW {
- HWND hwnd;
- UINT wFunc;
- LPCWSTR pFrom;
- LPCWSTR pTo;
- FILEOP_FLAGS fFlags;
- BOOL fAnyOperationsAborted;
- PVOID hNameMappings;
- LPCWSTR lpszProgressTitle;
-} SHFILEOPSTRUCTW,*LPSHFILEOPSTRUCTW;
-typedef struct _SHFILEINFOA {
- HICON hIcon;
- int iIcon;
- DWORD dwAttributes;
- CHAR szDisplayName[MAX_PATH];
- CHAR szTypeName[80];
-} SHFILEINFOA;
-typedef struct _SHFILEINFOW {
- HICON hIcon;
- int iIcon;
- DWORD dwAttributes;
- WCHAR szDisplayName[MAX_PATH];
- WCHAR szTypeName[80];
-} SHFILEINFOW;
-typedef struct _SHQUERYRBINFO {
- DWORD cbSize;
- __int64 i64Size;
- __int64 i64NumItems;
-} SHQUERYRBINFO, *LPSHQUERYRBINFO;
-#include <poppack.h>
-
-LPWSTR * WINAPI CommandLineToArgvW(LPCWSTR,int*);
-void WINAPI DragAcceptFiles(HWND,BOOL);
-void WINAPI DragFinish(HDROP);
-UINT WINAPI DragQueryFileA(HDROP,UINT,LPSTR,UINT);
-UINT WINAPI DragQueryFileW(HDROP,UINT,LPWSTR,UINT);
-BOOL WINAPI DragQueryPoint(HDROP,LPPOINT);
-HICON WINAPI DuplicateIcon(HINSTANCE,HICON);
-HICON WINAPI ExtractAssociatedIconA(HINSTANCE,LPCSTR,PWORD);
-HICON WINAPI ExtractAssociatedIconW(HINSTANCE,LPCWSTR,PWORD);
-HICON WINAPI ExtractIconA(HINSTANCE,LPCSTR,UINT);
-HICON WINAPI ExtractIconW(HINSTANCE,LPCWSTR,UINT);
-UINT WINAPI ExtractIconExA(LPCSTR,int,HICON*,HICON*,UINT);
-UINT WINAPI ExtractIconExW(LPCWSTR,int,HICON*,HICON*,UINT);
-HINSTANCE WINAPI FindExecutableA(LPCSTR,LPCSTR,LPSTR);
-HINSTANCE WINAPI FindExecutableW(LPCWSTR,LPCWSTR,LPWSTR);
-UINT WINAPI SHAppBarMessage(DWORD,PAPPBARDATA);
-BOOL WINAPI Shell_NotifyIconA(DWORD,PNOTIFYICONDATAA);
-BOOL WINAPI Shell_NotifyIconW(DWORD,PNOTIFYICONDATAW);
-int WINAPI ShellAboutA(HWND,LPCSTR,LPCSTR,HICON);
-int WINAPI ShellAboutW(HWND,LPCWSTR,LPCWSTR,HICON);
-HINSTANCE WINAPI ShellExecuteA(HWND,LPCSTR,LPCSTR,LPCSTR,LPCSTR,INT);
-HINSTANCE WINAPI ShellExecuteW(HWND,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,INT);
-BOOL WINAPI ShellExecuteExA(LPSHELLEXECUTEINFOA);
-BOOL WINAPI ShellExecuteExW(LPSHELLEXECUTEINFOW);
-int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA);
-int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW);
-void WINAPI SHFreeNameMappings(HANDLE);
-DWORD WINAPI SHGetFileInfoA(LPCSTR,DWORD,SHFILEINFOA*,UINT,UINT);
-DWORD WINAPI SHGetFileInfoW(LPCWSTR,DWORD,SHFILEINFOW*,UINT,UINT);
-HRESULT WINAPI SHQueryRecycleBinA(LPCSTR, LPSHQUERYRBINFO);
-HRESULT WINAPI SHQueryRecycleBinW(LPCWSTR, LPSHQUERYRBINFO);
-HRESULT WINAPI SHEmptyRecycleBinA(HWND,LPCSTR,DWORD);
-HRESULT WINAPI SHEmptyRecycleBinW(HWND,LPCWSTR,DWORD);
-
-#ifdef UNICODE
-typedef NOTIFYICONDATAW NOTIFYICONDATA,*PNOTIFYICONDATA;
-typedef SHELLEXECUTEINFOW SHELLEXECUTEINFO,*LPSHELLEXECUTEINFO;
-typedef SHFILEOPSTRUCTW SHFILEOPSTRUCT,*LPSHFILEOPSTRUCT;
-typedef SHFILEINFOW SHFILEINFO;
-#define DragQueryFile DragQueryFileW
-#define ExtractAssociatedIcon ExtractAssociatedIconW
-#define ExtractIcon ExtractIconW
-#define ExtractIconEx ExtractIconExW
-#define FindExecutable FindExecutableW
-#define Shell_NotifyIcon Shell_NotifyIconW
-#define ShellAbout ShellAboutW
-#define ShellExecute ShellExecuteW
-#define ShellExecuteEx ShellExecuteExW
-#define SHFileOperation SHFileOperationW
-#define SHGetFileInfo SHGetFileInfoW
-#define SHQueryRecycleBin SHQueryRecycleBinW
-#define SHEmptyRecycleBin SHEmptyRecycleBinW
-
-#else
-typedef NOTIFYICONDATAA NOTIFYICONDATA,*PNOTIFYICONDATA;
-typedef SHELLEXECUTEINFOA SHELLEXECUTEINFO,*LPSHELLEXECUTEINFO;
-typedef SHFILEOPSTRUCTA SHFILEOPSTRUCT,*LPSHFILEOPSTRUCT;
-typedef SHFILEINFOA SHFILEINFO;
-#define DragQueryFile DragQueryFileA
-#define ExtractAssociatedIcon ExtractAssociatedIconA
-#define ExtractIcon ExtractIconA
-#define ExtractIconEx ExtractIconExA
-#define FindExecutable FindExecutableA
-#define Shell_NotifyIcon Shell_NotifyIconA
-#define ShellAbout ShellAboutA
-#define ShellExecute ShellExecuteA
-#define ShellExecuteEx ShellExecuteExA
-#define SHFileOperation SHFileOperationA
-#define SHGetFileInfo SHGetFileInfoA
-#define SHQueryRecycleBin SHQueryRecycleBinA
-#define SHEmptyRecycleBin SHEmptyRecycleBinA
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/shldisp.h b/winsup/w32api/include/shldisp.h
deleted file mode 100755
index 0b5d299..0000000
--- a/winsup/w32api/include/shldisp.h
+++ /dev/null
@@ -1,61 +0,0 @@
-#ifndef _SHLDISP_H
-#define _SHLDISP_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define ACO_AUTOSUGGEST 0x01
-
-#define INTERFACE IAutoComplete
-DECLARE_INTERFACE_(IAutoComplete, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Init)(THIS_ HWND,IUnknown*,LPCOLESTR,LPCOLESTR) PURE;
- STDMETHOD(Enable)(THIS_ BOOL) PURE;
-};
-#undef INTERFACE
-typedef IAutoComplete *LPAUTOCOMPLETE;
-
-#ifdef COBJMACROS
-#define IAutoComplete_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IAutoComplete_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IAutoComplete_Release(T) (T)->lpVtbl->Release(T)
-#define IAutoComplete_Init(T,a,b,c,d) (T)->lpVtbl->Init(T,a,b,c,d)
-#define IAutoComplete_Enable(T,a) (T)->lpVtbl->Enable(T,a)
-#endif
-
-#define INTERFACE IAutoComplete2
-DECLARE_INTERFACE_(IAutoComplete2, IAutoComplete)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Init)(THIS_ HWND,IUnknown*,LPCOLESTR,LPCOLESTR) PURE;
- STDMETHOD(Enable)(THIS_ BOOL) PURE;
- STDMETHOD(SetOptions)(THIS_ DWORD) PURE;
- STDMETHOD(GetOptions)(THIS_ DWORD*) PURE;
-};
-#undef INTERFACE
-typedef IAutoComplete2 *LPAUTOCOMPLETE2;
-
-#ifdef COBJMACROS
-#define IAutoComplete2_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IAutoComplete2_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IAutoComplete2_Release(T) (T)->lpVtbl->Release(T)
-#define IAutoComplete2_Init(T,a,b,c,d) (T)->lpVtbl->Init(T,a,b,c,d)
-#define IAutoComplete2_Enable(T,a) (T)->lpVtbl->Enable(T,a)
-#define IAutoComplete2_SetOptions(T,a) (T)->lpVtbl->Enable(T,a)
-#define IAutoComplete2_GetOptions(T,a) (T)->lpVtbl->Enable(T,a)
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SHLDISP_H */
diff --git a/winsup/w32api/include/shlguid.h b/winsup/w32api/include/shlguid.h
deleted file mode 100644
index 3583e32..0000000
--- a/winsup/w32api/include/shlguid.h
+++ /dev/null
@@ -1,102 +0,0 @@
-#ifndef _SHLGUID_H
-#define _SHLGUID_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define DEFINE_SHLGUID(n,l,w1,w2) DEFINE_GUID(n,l,w1,w2,0xC0,0,0,0,0,0,0,0x46)
-#define SID_SShellBrowser IID_IShellBrowser
-extern const GUID CLSID_ShellDesktop;
-extern const GUID CLSID_ShellLink;
-extern const GUID FMTID_Intshcut;
-extern const GUID FMTID_InternetSite;
-extern const GUID CGID_Explorer;
-extern const GUID CGID_ShellDocView;
-extern const GUID CGID_ShellServiceObject;
-extern const GUID IID_INewShortcutHookA;
-extern const GUID IID_IShellBrowser;
-extern const GUID IID_IShellView;
-extern const GUID IID_IContextMenu;
-extern const GUID IID_IColumnProvider;
-extern const GUID IID_IQueryInfo;
-extern const GUID IID_IShellIcon;
-extern const GUID IID_IShellIconOverlayIdentifier;
-extern const GUID IID_IShellFolder;
-extern const GUID IID_IShellExtInit;
-extern const GUID IID_IShellPropSheetExt;
-extern const GUID IID_IPersistFolder;
-extern const GUID IID_IExtractIconA;
-extern const GUID IID_IShellLinkA;
-extern const GUID IID_IShellCopyHookA;
-extern const GUID IID_IFileViewerA;
-extern const GUID IID_ICommDlgBrowser;
-extern const GUID IID_IEnumIDList;
-extern const GUID IID_IFileViewerSite;
-extern const GUID IID_IContextMenu2;
-extern const GUID IID_IContextMenu3;
-extern const GUID IID_IShellExecuteHookA;
-extern const GUID IID_IPropSheetPage;
-extern const GUID IID_INewShortcutHookW;
-extern const GUID IID_IFileViewerW;
-extern const GUID IID_IShellLinkW;
-extern const GUID IID_IExtractIconW;
-extern const GUID IID_IShellExecuteHookW;
-extern const GUID IID_IShellCopyHookW;
-extern const GUID IID_IShellView2;
-extern const GUID LIBID_SHDocVw;
-extern const GUID IID_IShellExplorer;
-extern const GUID DIID_DShellExplorerEvents;
-extern const GUID CLSID_ShellExplorer;
-extern const GUID IID_ISHItemOC;
-extern const GUID DIID_DSHItemOCEvents;
-extern const GUID CLSID_SHItemOC;
-extern const GUID IID_DHyperLink;
-extern const GUID IID_DIExplorer;
-extern const GUID DIID_DExplorerEvents;
-extern const GUID CLSID_InternetExplorer;
-extern const GUID CLSID_StdHyperLink;
-extern const GUID CLSID_FileTypes;
-extern const GUID CLSID_InternetShortcut;
-extern const GUID IID_IUniformResourceLocator;
-extern const GUID CLSID_DragDropHelper;
-extern const GUID IID_IDropTargetHelper;
-extern const GUID IID_IDragSourceHelper;
-extern const GUID CLSID_AutoComplete;
-extern const GUID IID_IAutoComplete;
-extern const GUID IID_IAutoComplete2;
-extern const GUID CLSID_ACLMulti;
-extern const GUID IID_IObjMgr;
-extern const GUID CLSID_ACListISF;
-extern const GUID IID_IACList;
-#if (_WIN32_IE >= 0x400 || _WIN32_WINNT >= 0x500)
-extern const GUID IID_IPersistFolder2;
-#endif
-#if (_WIN32_WINNT >= 0x500)
-extern const GUID IID_IPersistFolder3;
-extern const GUID IID_IShellFolder2;
-extern const GUID IID_IFileSystemBindData;
-#endif
-#ifdef UNICODE
-#define IID_IFileViewer IID_IFileViewerW
-#define IID_IShellLink IID_IShellLinkW
-#define IID_IExtractIcon IID_IExtractIconW
-#define IID_IShellCopyHook IID_IShellCopyHookW
-#define IID_IShellExecuteHook IID_IShellExecuteHookW
-#define IID_INewShortcutHook IID_INewShortcutHookW
-#else
-#define IID_IFileViewer IID_IFileViewerA
-#define IID_IShellLink IID_IShellLinkA
-#define IID_IExtractIcon IID_IExtractIconA
-#define IID_IShellCopyHook IID_IShellCopyHookA
-#define IID_IShellExecuteHook IID_IShellExecuteHookA
-#define IID_INewShortcutHook IID_INewShortcutHookA
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/winsup/w32api/include/shlobj.h b/winsup/w32api/include/shlobj.h
deleted file mode 100644
index 348fe7f..0000000
--- a/winsup/w32api/include/shlobj.h
+++ /dev/null
@@ -1,1535 +0,0 @@
-#ifndef _SHLOBJ_H
-#define _SHLOBJ_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <ole2.h>
-#include <shlguid.h>
-#include <shellapi.h>
-#pragma pack(push,1)
-#include <commctrl.h>
-
-#define BIF_RETURNONLYFSDIRS 1
-#define BIF_DONTGOBELOWDOMAIN 2
-#define BIF_STATUSTEXT 4
-#define BIF_RETURNFSANCESTORS 8
-#define BIF_EDITBOX 16
-#define BIF_VALIDATE 32
-#define BIF_NEWDIALOGSTYLE 64
-#define BIF_BROWSEINCLUDEURLS 128
-#define BIF_USENEWUI ( BIF_EDITBOX | BIF_NEWDIALOGSTYLE )
-#define BIF_BROWSEFORCOMPUTER 0x1000
-#define BIF_BROWSEFORPRINTER 0x2000
-#define BIF_BROWSEINCLUDEFILES 0x4000
-#define BIF_SHAREABLE 0x8000
-#define BFFM_INITIALIZED 1
-#define BFFM_SELCHANGED 2
-#define BFFM_VALIDATEFAILEDA 3
-#define BFFM_VALIDATEFAILEDW 4
-#define BFFM_SETSTATUSTEXTA (WM_USER + 100)
-#define BFFM_SETSTATUSTEXTW (WM_USER + 104)
-#define BFFM_ENABLEOK (WM_USER + 101)
-#define BFFM_SETSELECTIONA (WM_USER + 102)
-#define BFFM_SETSELECTIONW (WM_USER + 103)
-#define BFFM_SETOKTEXT (WM_USER + 105)
-#define BFFM_SETEXPANDED (WM_USER + 106)
-#ifdef UNICODE
-#define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTW
-#define BFFM_SETSELECTION BFFM_SETSELECTIONW
-#define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDW
-#else
-#define BFFM_SETSTATUSTEXT BFFM_SETSTATUSTEXTA
-#define BFFM_SETSELECTION BFFM_SETSELECTIONA
-#define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA
-#endif
-#define DVASPECT_SHORTNAME 2
-#define SHARD_PIDL 1
-#define SHARD_PATH 2
-#define SHCNE_RENAMEITEM 1
-#define SHCNE_CREATE 2
-#define SHCNE_DELETE 4
-#define SHCNE_MKDIR 8
-#define SHCNE_RMDIR 16
-#define SHCNE_MEDIAINSERTED 32
-#define SHCNE_MEDIAREMOVED 64
-#define SHCNE_DRIVEREMOVED 128
-#define SHCNE_DRIVEADD 256
-#define SHCNE_NETSHARE 512
-#define SHCNE_NETUNSHARE 1024
-#define SHCNE_ATTRIBUTES 2048
-#define SHCNE_UPDATEDIR 4096
-#define SHCNE_UPDATEITEM 8192
-#define SHCNE_SERVERDISCONNECT 16384
-#define SHCNE_UPDATEIMAGE 32768
-#define SHCNE_DRIVEADDGUI 65536
-#define SHCNE_RENAMEFOLDER 0x20000
-#define SHCNE_FREESPACE 0x40000
-#define SHCNE_ASSOCCHANGED 0x8000000
-#define SHCNE_DISKEVENTS 0x2381F
-#define SHCNE_GLOBALEVENTS 0xC0581E0
-#define SHCNE_ALLEVENTS 0x7FFFFFFF
-#define SHCNE_INTERRUPT 0x80000000
-#define SHCNF_IDLIST 0
-#define SHCNF_PATHA 1
-#define SHCNF_PRINTERA 2
-#define SHCNF_DWORD 3
-#define SHCNF_PATHW 5
-#define SHCNF_PRINTERW 6
-#define SHCNF_TYPE 0xFF
-#define SHCNF_FLUSH 0x1000
-#define SHCNF_FLUSHNOWAIT 0x2000
-#ifdef UNICODE
-#define SHCNF_PATH SHCNF_PATHW
-#define SHCNF_PRINTER SHCNF_PRINTERW
-#else
-#define SHCNF_PATH SHCNF_PATHA
-#define SHCNF_PRINTER SHCNF_PRINTERA
-#endif
-#define SFGAO_CANCOPY DROPEFFECT_COPY
-#define SFGAO_CANMOVE DROPEFFECT_MOVE
-#define SFGAO_CANLINK DROPEFFECT_LINK
-#define SFGAO_CANRENAME 0x00000010L
-#define SFGAO_CANDELETE 0x00000020L
-#define SFGAO_HASPROPSHEET 0x00000040L
-#define SFGAO_DROPTARGET 0x00000100L
-#define SFGAO_CAPABILITYMASK 0x00000177L
-#define SFGAO_ISSLOW 0x00004000L
-#define SFGAO_GHOSTED 0x00008000L
-#define SFGAO_LINK 0x00010000L
-#define SFGAO_SHARE 0x00020000L
-#define SFGAO_READONLY 0x00040000L
-#define SFGAO_HIDDEN 0x00080000L
-#define SFGAO_DISPLAYATTRMASK (SFGAO_ISSLOW \
- | SFGAO_GHOSTED \
- | SFGAO_LINK \
- | SFGAO_SHARE \
- | SFGAO_READONLY \
- | SFGAO_HIDDEN)
-#define SFGAO_FILESYSANCESTOR 0x10000000L
-#define SFGAO_FOLDER 0x20000000L
-#define SFGAO_FILESYSTEM 0x40000000L
-#define SFGAO_HASSUBFOLDER 0x80000000L
-#define SFGAO_CONTENTSMASK 0x80000000L
-#define SFGAO_VALIDATE 0x01000000L
-#define SFGAO_REMOVABLE 0x02000000L
-#define SFGAO_COMPRESSED 0x04000000L
-#define STRRET_WSTR 0
-#define STRRET_OFFSET 1
-#define STRRET_CSTR 2
-#define SHGDFIL_FINDDATA 1
-#define SHGDFIL_NETRESOURCE 2
-#define SHGDFIL_DESCRIPTIONID 3
-#define SHDID_ROOT_REGITEM 1
-#define SHDID_FS_FILE 2
-#define SHDID_FS_DIRECTORY 3
-#define SHDID_FS_OTHER 4
-#define SHDID_COMPUTER_DRIVE35 5
-#define SHDID_COMPUTER_DRIVE525 6
-#define SHDID_COMPUTER_REMOVABLE 7
-#define SHDID_COMPUTER_FIXED 8
-#define SHDID_COMPUTER_NETDRIVE 9
-#define SHDID_COMPUTER_CDROM 10
-#define SHDID_COMPUTER_RAMDISK 11
-#define SHDID_COMPUTER_OTHER 12
-#define SHDID_NET_DOMAIN 13
-#define SHDID_NET_SERVER 14
-#define SHDID_NET_SHARE 15
-#define SHDID_NET_RESTOFNET 16
-#define SHDID_NET_OTHER 17
-#ifndef REGSTR_PATH_EXPLORER
-#define REGSTR_PATH_EXPLORER TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer")
-#endif
-#define REGSTR_PATH_SPECIAL_FOLDERS REGSTR_PATH_EXPLORER TEXT("\\Shell Folders")
-#define CSIDL_DESKTOP 0
-#define CSIDL_INTERNET 1
-#define CSIDL_PROGRAMS 2
-#define CSIDL_CONTROLS 3
-#define CSIDL_PRINTERS 4
-#define CSIDL_PERSONAL 5
-#define CSIDL_FAVORITES 6
-#define CSIDL_STARTUP 7
-#define CSIDL_RECENT 8
-#define CSIDL_SENDTO 9
-#define CSIDL_BITBUCKET 10
-#define CSIDL_STARTMENU 11
-#define CSIDL_MYMUSIC 13
-#define CSIDL_MYVIDEO 14
-#define CSIDL_DESKTOPDIRECTORY 16
-#define CSIDL_DRIVES 17
-#define CSIDL_NETWORK 18
-#define CSIDL_NETHOOD 19
-#define CSIDL_FONTS 20
-#define CSIDL_TEMPLATES 21
-#define CSIDL_COMMON_STARTMENU 22
-#define CSIDL_COMMON_PROGRAMS 23
-#define CSIDL_COMMON_STARTUP 24
-#define CSIDL_COMMON_DESKTOPDIRECTORY 25
-#define CSIDL_APPDATA 26
-#define CSIDL_PRINTHOOD 27
-#define CSIDL_LOCAL_APPDATA 28
-#define CSIDL_ALTSTARTUP 29
-#define CSIDL_COMMON_ALTSTARTUP 30
-#define CSIDL_COMMON_FAVORITES 31
-#define CSIDL_INTERNET_CACHE 32
-#define CSIDL_COOKIES 33
-#define CSIDL_HISTORY 34
-#define CSIDL_COMMON_APPDATA 35
-#define CSIDL_WINDOWS 36
-#define CSIDL_SYSTEM 37
-#define CSIDL_PROGRAM_FILES 38
-#define CSIDL_MYPICTURES 39
-#define CSIDL_PROFILE 40
-#define CSIDL_SYSTEMX86 41
-#define CSIDL_PROGRAM_FILESX86 42
-#define CSIDL_PROGRAM_FILES_COMMON 43
-#define CSIDL_PROGRAM_FILES_COMMONX86 44
-#define CSIDL_COMMON_TEMPLATES 45
-#define CSIDL_COMMON_DOCUMENTS 46
-#define CSIDL_COMMON_ADMINTOOLS 47
-#define CSIDL_ADMINTOOLS 48
-#define CSIDL_CONNECTIONS 49
-#define CSIDL_COMMON_MUSIC 53
-#define CSIDL_COMMON_PICTURES 54
-#define CSIDL_COMMON_VIDEO 55
-#define CSIDL_RESOURCES 56
-#define CSIDL_RESOURCES_LOCALIZED 57
-#define CSIDL_COMMON_OEM_LINKS 58
-#define CSIDL_CDBURN_AREA 59
-#define CSIDL_COMPUTERSNEARME 61
-#define CSIDL_FLAG_DONT_VERIFY 0x4000
-#define CSIDL_FLAG_CREATE 0x8000
-#define CSIDL_FLAG_MASK 0xFF00
-#define CFSTR_SHELLIDLIST TEXT("Shell IDList Array")
-#define CFSTR_SHELLIDLISTOFFSET TEXT("Shell Object Offsets")
-#define CFSTR_NETRESOURCES TEXT("Net Resource")
-#define CFSTR_FILECONTENTS TEXT("FileContents")
-#define CFSTR_FILENAMEA TEXT("FileName")
-#define CFSTR_FILENAMEMAPA TEXT("FileNameMap")
-#define CFSTR_FILEDESCRIPTORA TEXT("FileGroupDescriptor")
-#define CFSTR_INETURLA TEXT("UniformResourceLocator")
-#define CFSTR_SHELLURL CFSTR_INETURLA
-#define CFSTR_FILENAMEW TEXT("FileNameW")
-#define CFSTR_FILENAMEMAPW TEXT("FileNameMapW")
-#define CFSTR_FILEDESCRIPTORW TEXT("FileGroupDescriptorW")
-#define CFSTR_INETURLW TEXT("UniformResourceLocatorW")
-#ifdef UNICODE
-#define CFSTR_FILENAME CFSTR_FILENAMEW
-#define CFSTR_FILENAMEMAP CFSTR_FILENAMEMAPW
-#define CFSTR_FILEDESCRIPTOR CFSTR_FILEDESCRIPTORW
-#define CFSTR_INETURL CFSTR_INETURLW
-#else
-#define CFSTR_FILENAME CFSTR_FILENAMEA
-#define CFSTR_FILENAMEMAP CFSTR_FILENAMEMAPA
-#define CFSTR_FILEDESCRIPTOR CFSTR_FILEDESCRIPTORA
-#define CFSTR_INETURL CFSTR_INETURLA
-#endif
-#define CFSTR_PRINTERGROUP TEXT("PrinterFriendlyName")
-#define CFSTR_INDRAGLOOP TEXT("InShellDragLoop")
-#define CFSTR_PASTESUCCEEDED TEXT("Paste Succeeded")
-#define CFSTR_PERFORMEDDROPEFFECT TEXT("Performed DropEffect")
-#define CFSTR_PREFERREDDROPEFFECT TEXT("Preferred DropEffect")
-#define CMF_NORMAL 0
-#define CMF_DEFAULTONLY 1
-#define CMF_VERBSONLY 2
-#define CMF_EXPLORE 4
-#define CMF_NOVERBS 8
-#define CMF_CANRENAME 16
-#define CMF_NODEFAULT 32
-#define CMF_INCLUDESTATIC 64
-#define CMF_RESERVED 0xffff0000
-#define GCS_VERBA 0
-#define GCS_HELPTEXTA 1
-#define GCS_VALIDATEA 2
-#define GCS_VERBW 4
-#define GCS_HELPTEXTW 5
-#define GCS_VALIDATEW 6
-#define GCS_UNICODE 4
-#ifdef UNICODE
-#define GCS_VERB GCS_VERBW
-#define GCS_HELPTEXT GCS_HELPTEXTW
-#define GCS_VALIDATE GCS_VALIDATEW
-#else
-#define GCS_VERB GCS_VERBA
-#define GCS_HELPTEXT GCS_HELPTEXTA
-#define GCS_VALIDATE GCS_VALIDATEA
-#endif
-#define CMDSTR_NEWFOLDERA "NewFolder"
-#define CMDSTR_VIEWLISTA "ViewList"
-#define CMDSTR_VIEWDETAILSA "ViewDetails"
-#define CMDSTR_NEWFOLDERW L"NewFolder"
-#define CMDSTR_VIEWLISTW L"ViewList"
-#define CMDSTR_VIEWDETAILSW L"ViewDetails"
-#ifdef UNICODE
-#define CMDSTR_NEWFOLDER CMDSTR_NEWFOLDERW
-#define CMDSTR_VIEWLIST CMDSTR_VIEWLISTW
-#define CMDSTR_VIEWDETAILS CMDSTR_VIEWDETAILSW
-#else
-#define CMDSTR_NEWFOLDER CMDSTR_NEWFOLDER
-#define CMDSTR_VIEWLIST CMDSTR_VIEWLIST
-#define CMDSTR_VIEWDETAILS CMDSTR_VIEWDETAILS
-#endif
-#define CMIC_MASK_HOTKEY SEE_MASK_HOTKEY
-#define CMIC_MASK_ICON SEE_MASK_ICON
-#define CMIC_MASK_FLAG_NO_UI SEE_MASK_FLAG_NO_UI
-#define CMIC_MASK_MODAL 0x80000000
-#define CMIC_VALID_SEE_FLAGS SEE_VALID_CMIC_FLAGS
-#define GIL_OPENICON 1
-#define GIL_FORSHELL 2
-#define GIL_SIMULATEDOC 1
-#define GIL_PERINSTANCE 2
-#define GIL_PERCLASS 4
-#define GIL_NOTFILENAME 8
-#define GIL_DONTCACHE 16
-#define FVSIF_RECT 1
-#define FVSIF_PINNED 2
-#define FVSIF_NEWFAILED 0x8000000
-#define FVSIF_NEWFILE 0x80000000
-#define FVSIF_CANVIEWIT 0x40000000
-#define CDBOSC_SETFOCUS 0
-#define CDBOSC_KILLFOCUS 1
-#define CDBOSC_SELCHANGE 2
-#define CDBOSC_RENAME 3
-#define FCIDM_SHVIEWFIRST 0
-#define FCIDM_SHVIEWLAST 0x7fff
-#define FCIDM_BROWSERFIRST 0xa000
-#define FCIDM_BROWSERLAST 0xbf00
-#define FCIDM_GLOBALFIRST 0x8000
-#define FCIDM_GLOBALLAST 0x9fff
-#define FCIDM_MENU_FILE FCIDM_GLOBALFIRST
-#define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040)
-#define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080)
-#define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
-#define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0)
-#define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1)
-#define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100)
-#define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140)
-#define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150)
-#define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170)
-#define FCIDM_TOOLBAR FCIDM_BROWSERFIRST
-#define FCIDM_STATUS (FCIDM_BROWSERFIRST+1)
-#define SBSP_DEFBROWSER 0
-#define SBSP_SAMEBROWSER 1
-#define SBSP_NEWBROWSER 2
-#define SBSP_DEFMODE 0
-#define SBSP_OPENMODE 16
-#define SBSP_EXPLOREMODE 32
-#define SBSP_ABSOLUTE 0
-#define SBSP_RELATIVE 0x1000
-#define SBSP_PARENT 0x2000
-#define SBSP_INITIATEDBYHLINKFRAME 0x80000000
-#define SBSP_REDIRECT 0x40000000
-#define FCW_STATUS 1
-#define FCW_TOOLBAR 2
-#define FCW_TREE 3
-#define FCT_MERGE 1
-#define FCT_CONFIGABLE 2
-#define FCT_ADDTOEND 4
-#define SVSI_DESELECT 0
-#define SVSI_SELECT 1
-#define SVSI_EDIT 3
-#define SVSI_DESELECTOTHERS 4
-#define SVSI_ENSUREVISIBLE 8
-#define SVSI_FOCUSED 16
-#define SVGIO_BACKGROUND 0
-#define SVGIO_SELECTION 1
-#define SVGIO_ALLVIEW 2
-#define SV2GV_CURRENTVIEW ((UINT)-1)
-#define SV2GV_DEFAULTVIEW ((UINT)-2)
-
-typedef ULONG SFGAOF;
-typedef DWORD SHGDNF;
-
-typedef struct _IDA {
- UINT cidl;
- UINT aoffset[1];
-} CIDA,*LPIDA;
-typedef struct _SHITEMID {
- USHORT cb;
- BYTE abID[1];
-} SHITEMID, * LPSHITEMID;
-typedef const SHITEMID *LPCSHITEMID;
-typedef struct _ITEMIDLIST {
- SHITEMID mkid;
-} ITEMIDLIST,*LPITEMIDLIST;
-typedef const ITEMIDLIST *LPCITEMIDLIST;
-typedef int (CALLBACK* BFFCALLBACK)(HWND,UINT,LPARAM,LPARAM);
-typedef struct _browseinfoA {
- HWND hwndOwner;
- LPCITEMIDLIST pidlRoot;
- LPSTR pszDisplayName;
- LPCSTR lpszTitle;
- UINT ulFlags;
- BFFCALLBACK lpfn;
- LPARAM lParam;
- int iImage;
-} BROWSEINFOA,*PBROWSEINFOA,*LPBROWSEINFOA;
-typedef struct _browseinfoW {
- HWND hwndOwner;
- LPCITEMIDLIST pidlRoot;
- LPWSTR pszDisplayName;
- LPCWSTR lpszTitle;
- UINT ulFlags;
- BFFCALLBACK lpfn;
- LPARAM lParam;
- int iImage;
-} BROWSEINFOW,*PBROWSEINFOW,*LPBROWSEINFOW;
-typedef struct _CMInvokeCommandInfo {
- DWORD cbSize;
- DWORD fMask;
- HWND hwnd;
- LPCSTR lpVerb;
- LPCSTR lpParameters;
- LPCSTR lpDirectory;
- int nShow;
- DWORD dwHotKey;
- HANDLE hIcon;
-} CMINVOKECOMMANDINFO,*LPCMINVOKECOMMANDINFO;
-typedef struct _DROPFILES {
- DWORD pFiles;
- POINT pt;
- BOOL fNC;
- BOOL fWide;
-} DROPFILES,*LPDROPFILES;
-typedef enum tagSHGDN {
- SHGDN_NORMAL=0,
- SHGDN_INFOLDER,
- SHGDN_FOREDITING=0x1000,
- SHGDN_INCLUDE_NONFILESYS=0x2000,
- SHGDN_FORADDRESSBAR=0x4000,
- SHGDN_FORPARSING=0x8000
-} SHGNO;
-typedef enum tagSHCONTF {
- SHCONTF_FOLDERS = 32,
- SHCONTF_NONFOLDERS = 64,
- SHCONTF_INCLUDEHIDDEN = 128,
- SHCONTF_INIT_ON_FIRST_NEXT = 256,
- SHCONTF_NETPRINTERSRCH = 512,
- SHCONTF_SHAREABLE = 1024,
- SHCONTF_STORAGE = 2048
-} SHCONTF;
-typedef struct _STRRET {
- UINT uType;
- _ANONYMOUS_UNION union {
- LPWSTR pOleStr;
- UINT uOffset;
- char cStr[MAX_PATH];
- } DUMMYUNIONNAME;
-} STRRET,*LPSTRRET;
-typedef enum {
- FD_CLSID=1,FD_SIZEPOINT=2,FD_ATTRIBUTES=4,FD_CREATETIME=8,FD_ACCESSTIME=16,
- FD_WRITESTIME=32,FD_FILESIZE=64,FD_LINKUI=0x8000
-} FD_FLAGS;
-typedef struct _FILEDESCRIPTORA {
- DWORD dwFlags;
- CLSID clsid;
- SIZEL sizel;
- POINTL pointl;
- DWORD dwFileAttributes;
- FILETIME ftCreationTime;
- FILETIME ftLastAccessTime;
- FILETIME ftLastWriteTime;
- DWORD nFileSizeHigh;
- DWORD nFileSizeLow;
- CHAR cFileName[MAX_PATH];
-} FILEDESCRIPTORA,*LPFILEDESCRIPTORA;
-typedef struct _FILEDESCRIPTORW {
- DWORD dwFlags;
- CLSID clsid;
- SIZEL sizel;
- POINTL pointl;
- DWORD dwFileAttributes;
- FILETIME ftCreationTime;
- FILETIME ftLastAccessTime;
- FILETIME ftLastWriteTime;
- DWORD nFileSizeHigh;
- DWORD nFileSizeLow;
- WCHAR cFileName[MAX_PATH];
-} FILEDESCRIPTORW,*LPFILEDESCRIPTORW;
-typedef struct _FILEGROUPDESCRIPTORA {
- UINT cItems;
- FILEDESCRIPTORA fgd[1];
-} FILEGROUPDESCRIPTORA,*LPFILEGROUPDESCRIPTORA;
-typedef struct _FILEGROUPDESCRIPTORW {
- UINT cItems;
- FILEDESCRIPTORW fgd[1];
-} FILEGROUPDESCRIPTORW,*LPFILEGROUPDESCRIPTORW;
-typedef enum {
- SLR_NO_UI=1,
- SLR_ANY_MATCH=2,
- SLR_UPDATE=4,
- SLR_NOUPDATE=8,
- SLR_NOSEARCH=16,
- SLR_NOTRACK=32,
- SLR_NOLINKINFO=64,
- SLR_INVOKE_MSI=128
-} SLR_FLAGS;
-typedef enum {
- SLGP_SHORTPATH=1,
- SLGP_UNCPRIORITY=2,
- SLGP_RAWPATH=4
-} SLGP_FLAGS;
-typedef PBYTE LPVIEWSETTINGS;
-typedef enum {
- FWF_AUTOARRANGE=1,FWF_ABBREVIATEDNAMES=2,FWF_SNAPTOGRID=4,FWF_OWNERDATA=8,
- FWF_BESTFITWINDOW=16,FWF_DESKTOP=32,FWF_SINGLESEL=64,FWF_NOSUBFOLDERS=128,
- FWF_TRANSPARENT=256,FWF_NOCLIENTEDGE=512,FWF_NOSCROLL=0x400,FWF_ALIGNLEFT=0x800,
- FWF_SINGLECLICKACTIVATE=0x8000
-} FOLDERFLAGS;
-typedef enum {
- FVM_ICON=1,
- FVM_SMALLICON,
- FVM_LIST,
- FVM_DETAILS
-} FOLDERVIEWMODE;
-typedef struct {
- UINT ViewMode;
- UINT fFlags;
-} FOLDERSETTINGS,*LPFOLDERSETTINGS;
-typedef const FOLDERSETTINGS *LPCFOLDERSETTINGS;
-typedef struct {
- DWORD cbSize;
- HWND hwndOwner;
- int iShow;
- DWORD dwFlags;
- RECT rect;
- LPUNKNOWN punkRel;
- OLECHAR strNewFile[MAX_PATH];
-} FVSHOWINFO,*LPFVSHOWINFO;
-typedef struct _NRESARRAY {
- UINT cItems;
- NETRESOURCE nr[1];
-} NRESARRAY, *LPNRESARRAY;
-enum { SBSC_HIDE,SBSC_SHOW,SBSC_TOGGLE,SBSC_QUERY };
-enum {
- SBCMDID_ENABLESHOWTREE,SBCMDID_SHOWCONTROL,SBCMDID_CANCELNAVIGATION,
- SBCMDID_MAYSAVECHANGES,SBCMDID_SETHLINKFRAME,SBCMDID_ENABLESTOP,SBCMDID_OPTIONS
-};
-typedef enum {
- SVUIA_DEACTIVATE,SVUIA_ACTIVATE_NOFOCUS,SVUIA_ACTIVATE_FOCUS,
- SVUIA_INPLACEACTIVATE
-} SVUIA_STATUS;
-#if (_WIN32_IE >= 0x0500)
-typedef struct tagEXTRASEARCH
-{
- GUID guidSearch;
- WCHAR wszFriendlyName[80];
- WCHAR wszUrl[2084];
-} EXTRASEARCH, *LPEXTRASEARCH;
-typedef DWORD SHCOLSTATEF;
-typedef struct
-{
- GUID fmtid;
- DWORD pid;
-} SHCOLUMNID, *LPSHCOLUMNID;
-typedef const SHCOLUMNID *LPCSHCOLUMNID;
-typedef struct _SHELLDETAILS
-{
- int fmt;
- int cxChar;
- STRRET str;
-} SHELLDETAILS, *LPSHELLDETAILS;
-typedef struct
-{
- LPITEMIDLIST pidlTargetFolder;
- WCHAR szTargetParsingName[MAX_PATH];
- WCHAR szNetworkProvider[MAX_PATH];
- DWORD dwAttributes;
- int csidl;
-} PERSIST_FOLDER_TARGET_INFO;
-
-typedef enum {
- SHGFP_TYPE_CURRENT = 0,
- SHGFP_TYPE_DEFAULT = 1,
-} SHGFP_TYPE;
-#endif
-
-
-DECLARE_ENUMERATOR_(IEnumIDList,LPITEMIDLIST);
-typedef IEnumIDList *LPENUMIDLIST;
-
-#ifdef COBJMACROS
-#define IEnumIDList_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IEnumIDList_Release(T) (T)->lpVtbl->AddRef(T)
-#define IEnumIDList_AddRef(T) (T)->lpVtbl->Release(T)
-#define IEnumIDList_Next(T,a,b,c) (T)->lpVtbl->Next(T,a,b,c)
-#define IEnumIDList_Skip(T,a) (T)->lpVtbl->Skip(T,a)
-#define IEnumIDList_Reset(T) (T)->lpVtbl->Reset(T)
-#define IEnumIDList_Clone(T,a) (T)->lpVtbl->Clone(T,a)
-#endif
-
-#define INTERFACE IObjMgr
-DECLARE_INTERFACE_(IObjMgr, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Append)(THIS_ IUnknown*) PURE;
- STDMETHOD(Remove)(THIS_ IUnknown*) PURE;
-};
-#undef INTERFACE
-
-#define INTERFACE IContextMenu
-DECLARE_INTERFACE_(IContextMenu,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(QueryContextMenu)(THIS_ HMENU,UINT,UINT,UINT,UINT) PURE;
- STDMETHOD(InvokeCommand)(THIS_ LPCMINVOKECOMMANDINFO) PURE;
- STDMETHOD(GetCommandString)(THIS_ UINT,UINT,PUINT,LPSTR,UINT) PURE;
-};
-#undef INTERFACE
-typedef IContextMenu *LPCONTEXTMENU;
-
-#ifdef COBJMACROS
-#define IContextMenu_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IContextMenu_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IContextMenu_Release(T) (T)->lpVtbl->Release(T)
-#define IContextMenu_QueryContextMenu(T,a,b,c,d,e) (T)->lpVtbl->QueryContextMenu(T,a,b,c,d,e)
-#define IContextMenu_InvokeCommand(T,a) (T)->lpVtbl->InvokeCommand(T,a)
-#define IContextMenu_GetCommandString(T,a,b,c,d,e) (T)->lpVtbl->GetCommandString(T,a,b,c,d,e)
-#endif
-
-#define INTERFACE IContextMenu2
-DECLARE_INTERFACE_(IContextMenu2,IContextMenu)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(QueryContextMenu)(THIS_ HMENU,UINT,UINT,UINT,UINT) PURE;
- STDMETHOD(InvokeCommand)(THIS_ LPCMINVOKECOMMANDINFO) PURE;
- STDMETHOD(GetCommandString)(THIS_ UINT,UINT,PUINT,LPSTR,UINT) PURE;
- STDMETHOD(HandleMenuMsg)(THIS_ UINT,WPARAM,LPARAM) PURE;
-};
-#undef INTERFACE
-typedef IContextMenu2 *LPCONTEXTMENU2;
-
-#define INTERFACE IContextMenu3
-DECLARE_INTERFACE_(IContextMenu3,IContextMenu2)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(QueryContextMenu)(THIS_ HMENU,UINT,UINT,UINT,UINT) PURE;
- STDMETHOD(InvokeCommand)(THIS_ LPCMINVOKECOMMANDINFO) PURE;
- STDMETHOD(GetCommandString)(THIS_ UINT,UINT,PUINT,LPSTR,UINT) PURE;
- STDMETHOD(HandleMenuMsg)(THIS_ UINT,WPARAM,LPARAM) PURE;
- STDMETHOD(HandleMenuMsg2)(THIS_ UINT,WPARAM,LPARAM,LRESULT*) PURE;
-};
-#undef INTERFACE
-typedef IContextMenu3 *LPCONTEXTMENU3;
-
-#if (_WIN32_IE >= 0x0500)
-#pragma pack(push,8)
-typedef struct {
- ULONG dwFlags;
- ULONG dwReserved;
- WCHAR wszFolder[MAX_PATH];
-} SHCOLUMNINIT,*LPSHCOLUMNINIT;
-typedef const SHCOLUMNINIT* LPCSHCOLUMNINIT;
-typedef struct {
- ULONG dwFlags;
- DWORD dwFileAttributes;
- ULONG dwReserved;
- WCHAR *pwszExt;
- WCHAR wszFile[MAX_PATH];
-} SHCOLUMNDATA,*LPSHCOLUMNDATA;
-typedef const SHCOLUMNDATA* LPCSHCOLUMNDATA;
-#pragma pack(pop)
-
-#define MAX_COLUMN_NAME_LEN 80
-#define MAX_COLUMN_DESC_LEN 128
-
-#pragma pack(push,1)
-typedef struct {
- SHCOLUMNID scid;
- VARTYPE vt;
- DWORD fmt;
- UINT cChars;
- DWORD csFlags;
- WCHAR wszTitle[MAX_COLUMN_NAME_LEN];
- WCHAR wszDescription[MAX_COLUMN_DESC_LEN];
-} SHCOLUMNINFO,*LPSHCOLUMNINFO;
-typedef const SHCOLUMNINFO* LPCSHCOLUMNINFO;
-#pragma pack(pop)
-
-typedef enum {
- SHCOLSTATE_TYPE_STR = 0x00000001,
- SHCOLSTATE_TYPE_INT = 0x00000002,
- SHCOLSTATE_TYPE_DATE = 0x00000003,
- SHCOLSTATE_TYPEMASK = 0x0000000f,
- SHCOLSTATE_ONBYDEFAULT = 0x00000010,
- SHCOLSTATE_SLOW = 0x00000020,
- SHCOLSTATE_EXTENDED = 0x00000040,
- SHCOLSTATE_SECONDARYUI = 0x00000080,
- SHCOLSTATE_HIDDEN = 0x00000100,
- SHCOLSTATE_PREFER_VARCMP = 0x00000200
-} SHCOLSTATE;
-
-#ifdef COBJMACROS
-#define IContextMenu2_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IContextMenu2_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IContextMenu2_Release(T) (T)->lpVtbl->Release(T)
-#define IContextMenu2_QueryContextMenu(T,a,b,c,d,e) (T)->lpVtbl->QueryContextMenu(T,a,b,c,d,e)
-#define IContextMenu2_InvokeCommand(T,a) (T)->lpVtbl->InvokeCommand(T,a)
-#define IContextMenu2_GetCommandString(T,a,b,c,d,e) (T)->lpVtbl->GetCommandString(T,a,b,c,d,e)
-#define IContextMenu2_HandleMenuMsg(T,a,b,c) (T)->lpVtbl->HandleMenuMsg(T,a,b,c)
-#endif
-
-#ifdef COBJMACROS
-#define IContextMenu3_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IContextMenu3_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IContextMenu3_Release(T) (T)->lpVtbl->Release(T)
-#define IContextMenu3_QueryContextMenu(T,a,b,c,d,e) (T)->lpVtbl->QueryContextMenu(T,a,b,c,d,e)
-#define IContextMenu3_InvokeCommand(T,a) (T)->lpVtbl->InvokeCommand(T,a)
-#define IContextMenu3_GetCommandString(T,a,b,c,d,e) (T)->lpVtbl->GetCommandString(T,a,b,c,d,e)
-#define IContextMenu3_HandleMenuMsg(T,a,b,c) (T)->lpVtbl->HandleMenuMsg(T,a,b,c)
-#define IContextMenu3_HandleMenuMsg2(T,a,b,c,d) (T)->lpVtbl->HandleMenuMsg(T,a,b,c,d)
-#endif
-
-#define INTERFACE IColumnProvider
-DECLARE_INTERFACE_(IColumnProvider,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Initialize)(THIS_ LPCSHCOLUMNINIT) PURE;
- STDMETHOD(GetColumnInfo)(THIS_ DWORD,SHCOLUMNINFO*) PURE;
- STDMETHOD(GetItemData)(THIS_ LPCSHCOLUMNID,LPCSHCOLUMNDATA,VARIANT*) PURE;
-};
-#undef INTERFACE
-#endif /* _WIN32_IE >= 0x0500 */
-
-#define INTERFACE IQueryInfo
-DECLARE_INTERFACE_(IQueryInfo,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetInfoTip)(THIS_ DWORD,WCHAR**) PURE;
- STDMETHOD(GetInfoFlags)(THIS_ DWORD*) PURE;
-};
-#undef INTERFACE
-
-#define INTERFACE IShellExtInit
-DECLARE_INTERFACE_(IShellExtInit, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST,LPDATAOBJECT,HKEY) PURE;
-};
-#undef INTERFACE
-typedef IShellExtInit *LPSHELLEXTINIT;
-
-#define INTERFACE IShellPropSheetExt
-DECLARE_INTERFACE_(IShellPropSheetExt, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(AddPages)(THIS_ LPFNADDPROPSHEETPAGE,LPARAM) PURE;
- STDMETHOD(ReplacePage)(THIS_ UINT,LPFNADDPROPSHEETPAGE,LPARAM) PURE;
-};
-#undef INTERFACE
-typedef IShellPropSheetExt *LPSHELLPROPSHEETEXT;
-
-#define INTERFACE IExtractIconA
-DECLARE_INTERFACE_(IExtractIconA, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetIconLocation)(THIS_ UINT,LPSTR,UINT,int*,PUINT) PURE;
- STDMETHOD(Extract)(THIS_ LPCSTR,UINT,HICON*,HICON*,UINT) PURE;
-};
-#undef INTERFACE
-typedef IExtractIconA *LPEXTRACTICONA;
-
-#ifdef COBJMACROS
-#define IExtractIconA_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IExtractIconA_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IExtractIconA_Release(T) (T)->lpVtbl->Release(T)
-#define IExtractIconA_GetIconLocation(T,a,b,c,d,e) (T)->lpVtbl->GetIconLocation(T,a,b,c,d,e)
-#define IExtractIconA_Extract(T,a,b,c,d,e) (T)->lpVtbl->Extract(T,a,b,c,d,e)
-#endif
-
-#define INTERFACE IExtractIconW
-DECLARE_INTERFACE_(IExtractIconW, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetIconLocation)(THIS_ UINT,LPWSTR,UINT,int*,PUINT) PURE;
- STDMETHOD(Extract)(THIS_ LPCWSTR,UINT,HICON*,HICON*,UINT) PURE;
-};
-#undef INTERFACE
-typedef IExtractIconW *LPEXTRACTICONW;
-
-#ifdef COBJMACROS
-#define IExtractIconW_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IExtractIconW_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IExtractIconW_Release(T) (T)->lpVtbl->Release(T)
-#define IExtractIconW_GetIconLocation(T,a,b,c,d,e) (T)->lpVtbl->GetIconLocation(T,a,b,c,d,e)
-#define IExtractIconW_Extract(T,a,b,c,d,e) (T)->lpVtbl->Extract(T,a,b,c,d,e)
-#endif
-
-#ifdef UNICODE
-#define IExtractIcon IExtractIconW
-#define LPEXTRACTICON LPEXTRACTICONW
-#else
-#define IExtractIcon IExtractIconA
-#define LPEXTRACTICON LPEXTRACTICONA
-#endif
-
-#define INTERFACE IShellLinkA
-DECLARE_INTERFACE_(IShellLinkA, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetPath)(THIS_ LPSTR,int,WIN32_FIND_DATAA*,DWORD) PURE;
- STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST*) PURE;
- STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST) PURE;
- STDMETHOD(GetDescription)(THIS_ LPSTR,int) PURE;
- STDMETHOD(SetDescription)(THIS_ LPCSTR) PURE;
- STDMETHOD(GetWorkingDirectory)(THIS_ LPSTR,int) PURE;
- STDMETHOD(SetWorkingDirectory)(THIS_ LPCSTR) PURE;
- STDMETHOD(GetArguments)(THIS_ LPSTR,int) PURE;
- STDMETHOD(SetArguments)(THIS_ LPCSTR) PURE;
- STDMETHOD(GetHotkey)(THIS_ PWORD) PURE;
- STDMETHOD(SetHotkey)(THIS_ WORD) PURE;
- STDMETHOD(GetShowCmd)(THIS_ int*) PURE;
- STDMETHOD(SetShowCmd)(THIS_ int) PURE;
- STDMETHOD(GetIconLocation)(THIS_ LPSTR,int,int*) PURE;
- STDMETHOD(SetIconLocation)(THIS_ LPCSTR,int) PURE;
- STDMETHOD(SetRelativePath)(THIS_ LPCSTR ,DWORD) PURE;
- STDMETHOD(Resolve)(THIS_ HWND,DWORD) PURE;
- STDMETHOD(SetPath)(THIS_ LPCSTR) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IShellLinkA_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IShellLinkA_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IShellLinkA_Release(T) (T)->lpVtbl->Release(T)
-#define IShellLinkA_GetPath(T,a,b,c,d) (T)->lpVtbl->GetPath(T,a,b,c,d)
-#define IShellLinkA_GetIDList(T,a) (T)->lpVtbl->GetIDList(T,a)
-#define IShellLinkA_SetIDList(T,a) (T)->lpVtbl->SetIDList(T,a)
-#define IShellLinkA_GetDescription(T,a,b) (T)->lpVtbl->GetDescription(T,a,b)
-#define IShellLinkA_SetDescription(T,a) (T)->lpVtbl->SetDescription(T,a)
-#define IShellLinkA_GetWorkingDirectory(T,a,b) (T)->lpVtbl->GetWorkingDirectory(T,a,b)
-#define IShellLinkA_SetWorkingDirectory(T,a) (T)->lpVtbl->SetWorkingDirectory(T,a)
-#define IShellLinkA_GetArguments(T,a,b) (T)->lpVtbl->GetArguments(T,a,b)
-#define IShellLinkA_SetArguments(T,a) (T)->lpVtbl->SetArguments(T,a)
-#define IShellLinkA_GetHotkey(T,a) (T)->lpVtbl->GetHotkey(T,a)
-#define IShellLinkA_SetHotkey(T,a) (T)->lpVtbl->SetHotkey(T,a)
-#define IShellLinkA_GetShowCmd(T,a) (T)->lpVtbl->GetShowCmd(T,a)
-#define IShellLinkA_SetShowCmd(T,a) (T)->lpVtbl->SetShowCmd(T,a)
-#define IShellLinkA_GetIconLocation(T,a,b,c) (T)->lpVtbl->GetIconLocation(T,a,b,c)
-#define IShellLinkA_SetIconLocation(T,a,b) (T)->lpVtbl->SetIconLocation(T,a,b)
-#define IShellLinkA_SetRelativePath(T,a,b) (T)->lpVtbl->SetRelativePath(T,a,b)
-#define IShellLinkA_Resolve(T,a,b) (T)->lpVtbl->Resolve(T,a,b)
-#define IShellLinkA_SetPath(T,a) (T)->lpVtbl->SetPath(T,a)
-#endif
-
-#define INTERFACE IShellLinkW
-DECLARE_INTERFACE_(IShellLinkW, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetPath)(THIS_ LPWSTR,int,WIN32_FIND_DATAW*,DWORD) PURE;
- STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST*) PURE;
- STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST) PURE;
- STDMETHOD(GetDescription)(THIS_ LPWSTR,int) PURE;
- STDMETHOD(SetDescription)(THIS_ LPCWSTR) PURE;
- STDMETHOD(GetWorkingDirectory)(THIS_ LPWSTR,int) PURE;
- STDMETHOD(SetWorkingDirectory)(THIS_ LPCWSTR) PURE;
- STDMETHOD(GetArguments)(THIS_ LPWSTR,int) PURE;
- STDMETHOD(SetArguments)(THIS_ LPCWSTR) PURE;
- STDMETHOD(GetHotkey)(THIS_ PWORD) PURE;
- STDMETHOD(SetHotkey)(THIS_ WORD) PURE;
- STDMETHOD(GetShowCmd)(THIS_ int*) PURE;
- STDMETHOD(SetShowCmd)(THIS_ int) PURE;
- STDMETHOD(GetIconLocation)(THIS_ LPWSTR,int,int*) PURE;
- STDMETHOD(SetIconLocation)(THIS_ LPCWSTR,int) PURE;
- STDMETHOD(SetRelativePath)(THIS_ LPCWSTR ,DWORD) PURE;
- STDMETHOD(Resolve)(THIS_ HWND,DWORD) PURE;
- STDMETHOD(SetPath)(THIS_ LPCWSTR) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IShellLinkW_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IShellLinkW_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IShellLinkW_Release(T) (T)->lpVtbl->Release(T)
-#define IShellLinkW_GetPath(T,a,b,c,d) (T)->lpVtbl->GetPath(T,a,b,c,d)
-#define IShellLinkW_GetIDList(T,a) (T)->lpVtbl->GetIDList(T,a)
-#define IShellLinkW_SetIDList(T,a) (T)->lpVtbl->SetIDList(T,a)
-#define IShellLinkW_GetDescription(T,a,b) (T)->lpVtbl->GetDescription(T,a,b)
-#define IShellLinkW_SetDescription(T,a) (T)->lpVtbl->SetDescription(T,a)
-#define IShellLinkW_GetWorkingDirectory(T,a,b) (T)->lpVtbl->GetWorkingDirectory(T,a,b)
-#define IShellLinkW_SetWorkingDirectory(T,a) (T)->lpVtbl->SetWorkingDirectory(T,a)
-#define IShellLinkW_GetArguments(T,a,b) (T)->lpVtbl->GetArguments(T,a,b)
-#define IShellLinkW_SetArguments(T,a) (T)->lpVtbl->SetArguments(T,a)
-#define IShellLinkW_GetHotkey(T,a) (T)->lpVtbl->GetHotkey(T,a)
-#define IShellLinkW_SetHotkey(T,a) (T)->lpVtbl->SetHotkey(T,a)
-#define IShellLinkW_GetShowCmd(T,a) (T)->lpVtbl->GetShowCmd(T,a)
-#define IShellLinkW_SetShowCmd(T,a) (T)->lpVtbl->SetShowCmd(T,a)
-#define IShellLinkW_GetIconLocation(T,a,b,c) (T)->lpVtbl->GetIconLocation(T,a,b,c)
-#define IShellLinkW_SetIconLocation(T,a,b) (T)->lpVtbl->SetIconLocation(T,a,b)
-#define IShellLinkW_SetRelativePath(T,a,b) (T)->lpVtbl->SetRelativePath(T,a,b)
-#define IShellLinkW_Resolve(T,a,b) (T)->lpVtbl->Resolve(T,a,b)
-#define IShellLinkW_SetPath(T,a) (T)->lpVtbl->SetPath(T,a)
-#endif
-
-#define INTERFACE IShellFolder
-DECLARE_INTERFACE_(IShellFolder, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(ParseDisplayName)(THIS_ HWND,LPBC,LPOLESTR,PULONG,LPITEMIDLIST*,PULONG) PURE;
- STDMETHOD(EnumObjects)(THIS_ HWND,DWORD,LPENUMIDLIST*) PURE;
- STDMETHOD(BindToObject)(THIS_ LPCITEMIDLIST,LPBC,REFIID,PVOID*) PURE;
- STDMETHOD(BindToStorage)(THIS_ LPCITEMIDLIST,LPBC,REFIID,PVOID*) PURE;
- STDMETHOD(CompareIDs)(THIS_ LPARAM,LPCITEMIDLIST,LPCITEMIDLIST) PURE;
- STDMETHOD(CreateViewObject)(THIS_ HWND,REFIID,PVOID*) PURE;
- STDMETHOD(GetAttributesOf)(THIS_ UINT,LPCITEMIDLIST*,PULONG) PURE;
- STDMETHOD(GetUIObjectOf)(THIS_ HWND,UINT,LPCITEMIDLIST*,REFIID,PUINT,PVOID*) PURE;
- STDMETHOD(GetDisplayNameOf)(THIS_ LPCITEMIDLIST,DWORD,LPSTRRET) PURE;
- STDMETHOD(SetNameOf)(THIS_ HWND,LPCITEMIDLIST,LPCOLESTR,DWORD,LPITEMIDLIST*) PURE;
-};
-#undef INTERFACE
-typedef IShellFolder *LPSHELLFOLDER;
-
-#ifdef COBJMACROS
-#define IShellFolder_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IShellFolder_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IShellFolder_Release(T) (T)->lpVtbl->Release(T)
-#define IShellFolder_ParseDisplayName(T,a,b,c,d,e,f) (T)->lpVtbl->ParseDisplayName(T,a,b,c,d,e,f)
-#define IShellFolder_EnumObjects(T,a,b,c) (T)->lpVtbl->EnumObjects(T,a,b,c)
-#define IShellFolder_BindToObject(T,a,b,c,d) (T)->lpVtbl->BindToObject(T,a,b,c,d)
-#define IShellFolder_BindToStorage(T,a,b,c,d) (T)->lpVtbl->BindToStorage(T,a,b,c,d)
-#define IShellFolder_CompareIDs(T,a,b,c) (T)->lpVtbl->CompareIDs(T,a,b,c)
-#define IShellFolder_CreateViewObject(T,a,b) (T)->lpVtbl->CreateViewObject(T,a,b)
-#define IShellFolder_GetAttributesOf(T,a,b,c) (T)->lpVtbl->GetAttributesOf(T,a,b,c)
-#define IShellFolder_GetUIObjectOf(T,a,b,c,d,e,f) (T)->lpVtbl->GetUIObjectOf(T,a,b,c,d,e,f)
-#define IShellFolder_GetDisplayNameOf(T,a,b,c) (T)->lpVtbl->GetDisplayNameOf(T,a,b,c)
-#define IShellFolder_SetNameOf(T,a,b,c,d,e) (T)->lpVtbl->SetNameOf(T,a,b,c,d,e)
-#endif
-
-#if (_WIN32_IE >= 0x0500)
-
-DECLARE_ENUMERATOR_(IEnumExtraSearch,LPEXTRASEARCH);
-typedef IEnumExtraSearch *LPENUMEXTRASEARCH;
-
-#define INTERFACE IShellFolder2
-DECLARE_INTERFACE_(IShellFolder2, IShellFolder)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(ParseDisplayName)(THIS_ HWND,LPBC,LPOLESTR,PULONG,LPITEMIDLIST*,PULONG) PURE;
- STDMETHOD(EnumObjects)(THIS_ HWND,DWORD,LPENUMIDLIST*) PURE;
- STDMETHOD(BindToObject)(THIS_ LPCITEMIDLIST,LPBC,REFIID,PVOID*) PURE;
- STDMETHOD(BindToStorage)(THIS_ LPCITEMIDLIST,LPBC,REFIID,PVOID*) PURE;
- STDMETHOD(CompareIDs)(THIS_ LPARAM,LPCITEMIDLIST,LPCITEMIDLIST) PURE;
- STDMETHOD(CreateViewObject)(THIS_ HWND,REFIID,PVOID*) PURE;
- STDMETHOD(GetAttributesOf)(THIS_ UINT,LPCITEMIDLIST*,PULONG) PURE;
- STDMETHOD(GetUIObjectOf)(THIS_ HWND,UINT,LPCITEMIDLIST*,REFIID,PUINT,PVOID*) PURE;
- STDMETHOD(GetDisplayNameOf)(THIS_ LPCITEMIDLIST,DWORD,LPSTRRET) PURE;
- STDMETHOD(SetNameOf)(THIS_ HWND,LPCITEMIDLIST,LPCOLESTR,DWORD,LPITEMIDLIST*) PURE;
- STDMETHOD(GetDefaultSearchGUID)(THIS_ GUID*) PURE;
- STDMETHOD(EnumSearches)(THIS_ IEnumExtraSearch**) PURE;
- STDMETHOD(GetDefaultColumn)(THIS_ DWORD,ULONG*,ULONG*) PURE;
- STDMETHOD(GetDefaultColumnState)(THIS_ UINT,SHCOLSTATEF*) PURE;
- STDMETHOD(GetDetailsEx)(THIS_ LPCITEMIDLIST,const SHCOLUMNID*,VARIANT*) PURE;
- STDMETHOD(GetDetailsOf)(THIS_ LPCITEMIDLIST,UINT,SHELLDETAILS*) PURE;
- STDMETHOD(MapColumnToSCID)(THIS_ UINT,SHCOLUMNID*) PURE;
-};
-#undef INTERFACE
-typedef IShellFolder2 *LPSHELLFOLDER2;
-
-#ifdef COBJMACROS
-#define IShellFolder2_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IShellFolder2_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IShellFolder2_Release(T) (T)->lpVtbl->Release(T)
-#define IShellFolder2_ParseDisplayName(T,a,b,c,d,e,f) (T)->lpVtbl->ParseDisplayName(T,a,b,c,d,e,f)
-#define IShellFolder2_EnumObjects(T,a,b,c) (T)->lpVtbl->EnumObjects(T,a,b,c)
-#define IShellFolder2_BindToObject(T,a,b,c,d) (T)->lpVtbl->BindToObject(T,a,b,c,d)
-#define IShellFolder2_BindToStorage(T,a,b,c,d) (T)->lpVtbl->BindToStorage(T,a,b,c,d)
-#define IShellFolder2_CompareIDs(T,a,b,c) (T)->lpVtbl->CompareIDs(T,a,b,c)
-#define IShellFolder2_CreateViewObject(T,a,b) (T)->lpVtbl->CreateViewObject(T,a,b)
-#define IShellFolder2_GetAttributesOf(T,a,b,c) (T)->lpVtbl->GetAttributesOf(T,a,b,c)
-#define IShellFolder2_GetUIObjectOf(T,a,b,c,d,e,f) (T)->lpVtbl->GetUIObjectOf(T,a,b,c,d,e,f)
-#define IShellFolder2_GetDisplayNameOf(T,a,b,c) (T)->lpVtbl->GetDisplayNameOf(T,a,b,c)
-#define IShellFolder2_SetNameOf(T,a,b,c,d,e) (T)->lpVtbl->SetNameOf(T,a,b,c,d,e)
-#define IShellFolder2_GetDefaultSearchGUID(T,a) (T)->lpVtbl->GetDefaultSearchGUID(T,a)
-#define IShellFolder2_EnumSearches(T,a) (T)->lpVtbl->EnumSearches(T,a)
-#define IShellFolder2_GetDefaultColumn(T,a,b,c) (T)->lpVtbl->GetDefaultColumn(T,a,b,c)
-#define IShellFolder2_GetDefaultColumnState(T,a,b) (T)->lpVtbl->GetDefaultColumnState(T,a,b)
-#define IShellFolder2_GetDetailsEx(T,a,b,c) (T)->lpVtbl->GetDetailsEx(T,a,b,c)
-#define IShellFolder2_GetDetailsOf(T,a,b,c) (T)->lpVtbl->GetDetailsOf(T,a,b,c)
-#define IShellFolder2_MapColumnToSCID(T,a,b) (T)->lpVtbl->MapColumnToSCID(T,a,b)
-#endif
-
-#endif /* _WIN32_IE >= 0x0500 */
-#define INTERFACE ICopyHook
-DECLARE_INTERFACE_(ICopyHook, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD_(UINT,CopyCallback)(THIS_ HWND,UINT,UINT,LPCSTR,DWORD,LPCSTR,DWORD) PURE;
-};
-#undef INTERFACE
-typedef ICopyHook *LPCOPYHOOK;
-
-#define INTERFACE IFileViewerSite
-DECLARE_INTERFACE(IFileViewerSite)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(SetPinnedWindow)(THIS_ HWND) PURE;
- STDMETHOD(GetPinnedWindow)(THIS_ HWND*) PURE;
-};
-#undef INTERFACE
-typedef IFileViewerSite *LPFILEVIEWERSITE;
-
-#define INTERFACE IFileViewer
-DECLARE_INTERFACE(IFileViewer)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(ShowInitialize)(THIS_ LPFILEVIEWERSITE) PURE;
- STDMETHOD(Show)(THIS_ LPFVSHOWINFO) PURE;
- STDMETHOD(PrintTo)(THIS_ LPSTR,BOOL) PURE;
-};
-#undef INTERFACE
-typedef IFileViewer *LPFILEVIEWER;
-
-#define INTERFACE IFileSystemBindData
-DECLARE_INTERFACE_(IFileSystemBindData, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(SetFindData)(THIS_ const WIN32_FIND_DATAW*) PURE;
- STDMETHOD(GetFindData)(THIS_ WIN32_FIND_DATAW*) PURE;
-};
-#undef INTERFACE
-
-#define INTERFACE IPersistFolder
-DECLARE_INTERFACE_(IPersistFolder,IPersist)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetClassID)(THIS_ CLSID*) PURE;
- STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST) PURE;
-};
-#undef INTERFACE
-typedef IPersistFolder *LPPERSISTFOLDER;
-
-#ifdef COBJMACROS
-#define IPersistFolder_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IPersistFolder_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IPersistFolder_Release(T) (T)->lpVtbl->Release(T)
-#define IPersistFolder_GetClassID(T,a) (T)->lpVtbl->GetClassID(T,a)
-#define IPersistFolder_Initialize(T,a) (T)->lpVtbl->Initialize(T,a)
-#endif
-
-#if (_WIN32_IE >= 0x0400 || _WIN32_WINNT >= 0x0500)
-
-#define INTERFACE IPersistFolder2
-DECLARE_INTERFACE_(IPersistFolder2,IPersistFolder)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetClassID)(THIS_ CLSID*) PURE;
- STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST) PURE;
- STDMETHOD(GetCurFolder)(THIS_ LPITEMIDLIST*) PURE;
-};
-#undef INTERFACE
-typedef IPersistFolder2 *LPPERSISTFOLDER2;
-
-#ifdef COBJMACROS
-#define IPersistFolder2_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IPersistFolder2_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IPersistFolder2_Release(T) (T)->lpVtbl->Release(T)
-#define IPersistFolder2_GetClassID(T,a) (T)->lpVtbl->GetClassID(T,a)
-#define IPersistFolder2_Initialize(T,a) (T)->lpVtbl->Initialize(T,a)
-#define IPersistFolder2_GetCurFolder(T,a) (T)->lpVtbl->GetCurFolder(T,a)
-#endif
-
-#endif /* _WIN32_IE >= 0x0400 || _WIN32_WINNT >= 0x0500 */
-
-#if (_WIN32_IE >= 0x0500)
-
-#define INTERFACE IPersistFolder3
-DECLARE_INTERFACE_(IPersistFolder3,IPersistFolder2)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetClassID)(THIS_ CLSID*) PURE;
- STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST) PURE;
- STDMETHOD(GetCurFolder)(THIS_ LPITEMIDLIST*) PURE;
- STDMETHOD(InitializeEx)(THIS_ IBindCtx*,LPCITEMIDLIST,const PERSIST_FOLDER_TARGET_INFO*) PURE;
- STDMETHOD(GetFolderTargetInfo)(THIS_ PERSIST_FOLDER_TARGET_INFO*) PURE;
-};
-#undef INTERFACE
-typedef IPersistFolder3 *LPPERSISTFOLDER3;
-
-#ifdef COBJMACROS
-#define IPersistFolder3_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IPersistFolder3_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IPersistFolder3_Release(T) (T)->lpVtbl->Release(T)
-#define IPersistFolder3_GetClassID(T,a) (T)->lpVtbl->GetClassID(T,a)
-#define IPersistFolder3_Initialize(T,a) (T)->lpVtbl->Initialize(T,a)
-#define IPersistFolder3_GetCurFolder(T,a) (T)->lpVtbl->GetCurFolder(T,a)
-#define IPersistFolder3_InitializeEx(T,a,b,c) (T)->lpVtbl->InitializeEx(T,a,b,c)
-#define IPersistFolder3_GetFolderTargetInfo(T,a) (T)->lpVtbl->GetFolderTargetInfo(T,a)
-#endif
-
-#endif /* _WIN32_IE >= 0x0500 */
-
-typedef _COM_interface IShellBrowser *LPSHELLBROWSER;
-typedef _COM_interface IShellView *LPSHELLVIEW;
-
-#define INTERFACE IShellBrowser
-DECLARE_INTERFACE_(IShellBrowser,IOleWindow)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
- STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
- STDMETHOD(InsertMenusSB)(THIS_ HMENU,LPOLEMENUGROUPWIDTHS) PURE;
- STDMETHOD(SetMenuSB)(THIS_ HMENU,HOLEMENU,HWND) PURE;
- STDMETHOD(RemoveMenusSB)(THIS_ HMENU) PURE;
- STDMETHOD(SetStatusTextSB)(THIS_ LPCOLESTR) PURE;
- STDMETHOD(EnableModelessSB)(THIS_ BOOL) PURE;
- STDMETHOD(TranslateAcceleratorSB) (THIS_ LPMSG,WORD) PURE;
- STDMETHOD(BrowseObject)(THIS_ LPCITEMIDLIST,UINT) PURE;
- STDMETHOD(GetViewStateStream)(THIS_ DWORD,LPSTREAM*) PURE;
- STDMETHOD(GetControlWindow)(THIS_ UINT,HWND*) PURE;
- STDMETHOD(SendControlMsg)(THIS_ UINT,UINT,WPARAM,LPARAM,LRESULT*) PURE;
- STDMETHOD(QueryActiveShellView)(THIS_ LPSHELLVIEW*) PURE;
- STDMETHOD(OnViewWindowActive)(THIS_ LPSHELLVIEW) PURE;
- STDMETHOD(SetToolbarItems)(THIS_ LPTBBUTTON,UINT,UINT) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IShellBrowser_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IShellBrowser_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IShellBrowser_Release(T) (T)->lpVtbl->Release(T)
-#define IShellBrowser_GetWindow(T,a) (T)->lpVtbl->GetWindow(T,a)
-#define IShellBrowser_ContextSensitiveHelp(T,a) (T)->lpVtbl->ContextSensitiveHelp(T,a)
-#define IShellBrowser_InsertMenusSB(T,a,b) (T)->lpVtbl->InsertMenusSB(T,a,b)
-#define IShellBrowser_SetMenuSB(T,a,b,c) (T)->lpVtbl->SetMenuSB(T,a,b,c)
-#define IShellBrowser_RemoveMenusSB(T,a) (T)->lpVtbl->RemoveMenusSB(T,a)
-#define IShellBrowser_SetStatusTextSB(T,a) (T)->lpVtbl->SetStatusTextSB(T,a)
-#define IShellBrowser_EnableModelessSB(T,a) (T)->lpVtbl->EnableModelessSB(T,a)
-#define IShellBrowser_TranslateAcceleratorSB(T,a,b) (T)->lpVtbl->TranslateAcceleratorSB(T,a,b)
-#define IShellBrowser_BrowseObject(T,a,b) (T)->lpVtbl->BrowseObject(T,a,b)
-#define IShellBrowser_GetViewStateStream(T,a,b) (T)->lpVtbl->GetViewStateStream(T,a,b)
-#define IShellBrowser_GetControlWindow(T,a,b) (T)->lpVtbl->GetControlWindow(T,a,b)
-#define IShellBrowser_SendControlMsg(T,a,b,c,d,e) (T)->lpVtbl->SendControlMsg(T,a,b,c,d,e)
-#define IShellBrowser_QueryActiveShellView(T,a) (T)->lpVtbl->QueryActiveShellView(T,a)
-#define IShellBrowser_OnViewWindowActive(T,a) (T)->lpVtbl->OnViewWindowActive(T,a)
-#define IShellBrowser_SetToolbarItems(T,a,b,c) (T)->lpVtbl->SetToolbarItems(T,a,b,c)
-#endif
-
-#define INTERFACE IShellView
-DECLARE_INTERFACE_(IShellView,IOleWindow)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
- STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
- STDMETHOD(TranslateAccelerator) (THIS_ LPMSG) PURE;
-#ifdef _FIX_ENABLEMODELESS_CONFLICT
- STDMETHOD(EnableModelessSV)(THIS_ BOOL) PURE;
-#else
- STDMETHOD(EnableModeless)(THIS_ BOOL) PURE;
-#endif
- STDMETHOD(UIActivate)(THIS_ UINT) PURE;
- STDMETHOD(Refresh) (THIS) PURE;
- STDMETHOD(CreateViewWindow)(THIS_ IShellView*,LPCFOLDERSETTINGS,LPSHELLBROWSER,RECT*,HWND*) PURE;
- STDMETHOD(DestroyViewWindow)(THIS) PURE;
- STDMETHOD(GetCurrentInfo)(THIS_ LPFOLDERSETTINGS) PURE;
- STDMETHOD(AddPropertySheetPages)(THIS_ DWORD,LPFNADDPROPSHEETPAGE,LPARAM) PURE;
- STDMETHOD(SaveViewState)(THIS) PURE;
- STDMETHOD(SelectItem)(THIS_ LPCITEMIDLIST,UINT) PURE;
- STDMETHOD(GetItemObject)(THIS_ UINT,REFIID,PVOID*) PURE;
-};
-#undef INTERFACE
-
-#ifdef COBJMACROS
-#define IShellView_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IShellView_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IShellView_Release(T) (T)->lpVtbl->Release(T)
-#define IShellView_GetWindow(T,a) (T)->lpVtbl->GetWindow(T,a)
-#define IShellView_ContextSensitiveHelp(T,a) (T)->lpVtbl->ContextSensitiveHelp(T,a)
-#define IShellView_TranslateAccelerator(T,a) (T)->lpVtbl->TranslateAccelerator(T,a)
-#ifdef _FIX_ENABLEMODELESS_CONFLICT
-#define IShellView_EnableModeless(T,a) (T)->lpVtbl->EnableModelessSV(T,a)
-#else
-#define IShellView_EnableModeless(T,a) (T)->lpVtbl->EnableModeless(T,a)
-#endif
-#define IShellView_UIActivate(T,a) (T)->lpVtbl->UIActivate(T,a)
-#define IShellView_Refresh(T) (T)->lpVtbl->Refresh(T)
-#define IShellView_CreateViewWindow(T,a,b,c,d,e) (T)->lpVtbl->CreateViewWindow(T,a,b,c,d,e)
-#define IShellView_DestroyViewWindow(T) (T)->lpVtbl->DestroyViewWindow(T)
-#define IShellView_GetCurrentInfo(T,a) (T)->lpVtbl->GetCurrentInfo(T,a)
-#define IShellView_AddPropertySheetPages(T,a,b,c) (T)->lpVtbl->AddPropertySheetPages(T,a,b,c)
-#define IShellView_SaveViewState(T) (T)->lpVtbl->SaveViewState(T)
-#define IShellView_SelectItem(T,a,b) (T)->lpVtbl->SelectItem(T,a,b)
-#define IShellView_GetItemObject(T,a,b,c) (T)->lpVtbl->GetItemObject(T,a,b,c)
-#endif
-
-#define INTERFACE ICommDlgBrowser
-DECLARE_INTERFACE_(ICommDlgBrowser,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(OnDefaultCommand)(THIS_ IShellView*) PURE;
- STDMETHOD(OnStateChange)(THIS_ IShellView*,ULONG) PURE;
- STDMETHOD(IncludeObject)(THIS_ IShellView*,LPCITEMIDLIST) PURE;
-};
-#undef INTERFACE
-typedef ICommDlgBrowser *LPCOMMDLGBROWSER;
-
-#ifdef COBJMACROS
-#define ICommDlgBrowser_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define ICommDlgBrowser_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define ICommDlgBrowser_Release(T) (T)->lpVtbl->Release(T)
-#define ICommDlgBrowser_OnDefaultCommand(T,a) (T)->lpVtbl->OnDefaultCommand(T,a)
-#define ICommDlgBrowser_OnStateChange(T,a,b) (T)->lpVtbl->OnStateChange(T,a,b)
-#define ICommDlgBrowser_IncludeObject(T,a,b) (T)->lpVtbl->IncludeObject(T,a,b)
-#endif
-
-typedef GUID SHELLVIEWID;
-typedef struct _SV2CVW2_PARAMS {
- DWORD cbSize;
- IShellView *psvPrev;
- FOLDERSETTINGS const *pfs;
- IShellBrowser *psbOwner;
- RECT *prcView;
- SHELLVIEWID const *pvid;
- HWND hwndView;
-} SV2CVW2_PARAMS,*LPSV2CVW2_PARAMS;
-#define INTERFACE IShellView2
-DECLARE_INTERFACE_(IShellView2,IShellView)
-{
-
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
- STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
- STDMETHOD(TranslateAccelerator) (THIS_ LPMSG) PURE;
-#ifdef _FIX_ENABLEMODELESS_CONFLICT
- STDMETHOD(EnableModelessSV)(THIS_ BOOL) PURE;
-#else
- STDMETHOD(EnableModeless)(THIS_ BOOL) PURE;
-#endif
- STDMETHOD(UIActivate)(THIS_ UINT) PURE;
- STDMETHOD(Refresh) (THIS) PURE;
- STDMETHOD(CreateViewWindow)(THIS_ IShellView*,LPCFOLDERSETTINGS,LPSHELLBROWSER,RECT*,HWND*) PURE;
- STDMETHOD(DestroyViewWindow)(THIS) PURE;
- STDMETHOD(GetCurrentInfo)(THIS_ LPFOLDERSETTINGS) PURE;
- STDMETHOD(AddPropertySheetPages)(THIS_ DWORD,LPFNADDPROPSHEETPAGE,LPARAM) PURE;
- STDMETHOD(SaveViewState)(THIS) PURE;
- STDMETHOD(SelectItem)(THIS_ LPCITEMIDLIST,UINT) PURE;
- STDMETHOD(GetItemObject)(THIS_ UINT,REFIID,PVOID*) PURE;
- STDMETHOD(GetView)(THIS_ SHELLVIEWID*,ULONG) PURE;
- STDMETHOD(CreateViewWindow2)(THIS_ LPSV2CVW2_PARAMS) PURE;
-};
-#undef INTERFACE
-
-#define INTERFACE IShellExecuteHookA
-DECLARE_INTERFACE_(IShellExecuteHookA,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Execute)(THIS_ LPSHELLEXECUTEINFOA) PURE;
-};
-#undef INTERFACE
-
-#define INTERFACE IShellExecuteHookW
-DECLARE_INTERFACE_(IShellExecuteHookW,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Execute)(THIS_ LPSHELLEXECUTEINFOW) PURE;
-};
-#undef INTERFACE
-
-#define INTERFACE IShellIcon
-DECLARE_INTERFACE_(IShellIcon,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetIconOf)(THIS_ LPCITEMIDLIST,UINT,PINT) PURE;
-};
-#undef INTERFACE
-typedef IShellIcon *LPSHELLICON;
-
-typedef struct {
- BOOL fShowAllObjects : 1;
- BOOL fShowExtensions : 1;
- BOOL fNoConfirmRecycle : 1;
- BOOL fShowSysFiles : 1;
- BOOL fShowCompColor : 1;
- BOOL fDoubleClickInWebView : 1;
- BOOL fDesktopHTML : 1;
- BOOL fWin95Classic : 1;
- BOOL fDontPrettyPath : 1;
- BOOL fShowAttribCol : 1;
- BOOL fMapNetDrvBtn : 1;
- BOOL fShowInfoTip : 1;
- BOOL fHideIcons : 1;
- UINT fRestFlags : 3;
-} SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
-
-#define SSF_SHOWALLOBJECTS 0x1
-#define SSF_SHOWEXTENSIONS 0x2
-#define SSF_SHOWCOMPCOLOR 0x8
-#define SSF_SHOWSYSFILES 0x20
-#define SSF_DOUBLECLICKINWEBVIEW 0x80
-#define SSF_SHOWATTRIBCOL 0x100
-#define SSF_DESKTOPHTML 0x200
-#define SSF_WIN95CLASSIC 0x400
-#define SSF_DONTPRETTYPATH 0x800
-#define SSF_MAPNETDRVBUTTON 0x1000
-#define SSF_SHOWINFOTIP 0x2000
-#define SSF_HIDEICONS 0x4000
-#define SSF_NOCONFIRMRECYCLE 0x8000
-
-#define INTERFACE IShellIconOverlayIdentifier
-DECLARE_INTERFACE_(IShellIconOverlayIdentifier,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(IsMemberOf)(THIS_ LPCWSTR,DWORD) PURE;
- STDMETHOD(GetOverlayInfo)(THIS_ LPWSTR,int,int*,DWORD*) PURE;
- STDMETHOD(GetPriority)(THIS_ int*) PURE;
-};
-#undef INTERFACE
-
-#define ISIOI_ICONFILE 0x00000001
-#define ISIOI_ICONINDEX 0x00000002
-
-#if (_WIN32_WINNT >= 0x0500) /* W2K */
-typedef struct {
- BOOL fShowAllObjects : 1;
- BOOL fShowExtensions : 1;
- BOOL fNoConfirmRecycle : 1;
- BOOL fShowSysFiles : 1;
- BOOL fShowCompColor : 1;
- BOOL fDoubleClickInWebView : 1;
- BOOL fDesktopHTML : 1;
- BOOL fWin95Classic : 1;
- BOOL fDontPrettyPath : 1;
- BOOL fShowAttribCol : 1;
- BOOL fMapNetDrvBtn : 1;
- BOOL fShowInfoTip : 1;
- BOOL fHideIcons : 1;
- BOOL fWebView : 1;
- BOOL fFilter : 1;
- BOOL fShowSuperHidden : 1;
- BOOL fNoNetCrawling : 1;
- DWORD dwWin95Unused;
- UINT uWin95Unused;
- LONG lParamSort;
- int iSortDirection;
- UINT version;
- UINT uNotUsed;
- BOOL fSepProcess : 1;
- BOOL fStartPanelOn : 1;
- BOOL fShowStartPage : 1;
- UINT fSpareFlags : 13;
-} SHELLSTATE, *LPSHELLSTATE;
-#endif /* _WIN32_WINNT >= 0x0500 */
-
-#if (_WIN32_IE >= 0x0500)
-#pragma pack(push,8)
-typedef struct
-{
- SIZE sizeDragImage;
- POINT ptOffset;
- HBITMAP hbmpDragImage;
- COLORREF crColorKey;
-} SHDRAGIMAGE, *LPSHDRAGIMAGE;
-#pragma pack(pop)
-
-#define INTERFACE IDragSourceHelper
-DECLARE_INTERFACE_(IDragSourceHelper, IUnknown)
-{
- STDMETHOD (QueryInterface)(THIS_ REFIID riid, void **ppv) PURE;
- STDMETHOD_(ULONG, AddRef) (THIS) PURE;
- STDMETHOD_(ULONG, Release) (THIS) PURE;
- STDMETHOD (InitializeFromBitmap)(THIS_ LPSHDRAGIMAGE pshdi, IDataObject* pDataObject) PURE;
- STDMETHOD (InitializeFromWindow)(THIS_ HWND hwnd, POINT* ppt, IDataObject* pDataObject) PURE;
-};
-#undef INTERFACE
-
-#define INTERFACE IDropTargetHelper
-DECLARE_INTERFACE_(IDropTargetHelper, IUnknown)
-{
- STDMETHOD (QueryInterface)(THIS_ REFIID riid, void** ppv) PURE;
- STDMETHOD_(ULONG, AddRef) (THIS) PURE;
- STDMETHOD_(ULONG, Release) (THIS) PURE;
- STDMETHOD (DragEnter)(THIS_ HWND hwndTarget, IDataObject* pDataObject, POINT* ppt, DWORD dwEffect) PURE;
- STDMETHOD (DragLeave)(THIS) PURE;
- STDMETHOD (DragOver)(THIS_ POINT* ppt, DWORD dwEffect) PURE;
- STDMETHOD (Drop)(THIS_ IDataObject* pDataObject, POINT* ppt, DWORD dwEffect) PURE;
- STDMETHOD (Show)(THIS_ BOOL fShow) PURE;
-};
-#undef INTERFACE
-#endif /* _WIN32_IE >= 0x0500 */
-
-#if (_WIN32_WINNT >= 0x0500)
-BOOL WINAPI PathResolve(LPWSTR, LPCWSTR*, UINT);
-#define PRF_VERIFYEXISTS 0x0001
-#define PRF_TRYPROGRAMEXTENSIONS (0x0002 | PRF_VERIFYEXISTS)
-#define PRF_FIRSTDIRDEF 0x0004
-#define PRF_DONTFINDLNK 0x0008
-#endif
-
-void WINAPI SHAddToRecentDocs(UINT,PCVOID);
-LPITEMIDLIST WINAPI SHBrowseForFolderA(PBROWSEINFOA);
-LPITEMIDLIST WINAPI SHBrowseForFolderW(PBROWSEINFOW);
-void WINAPI SHChangeNotify(LONG,UINT,PCVOID,PCVOID);
-HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER,LPCITEMIDLIST,int,PVOID,int);
-HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER,LPCITEMIDLIST,int,PVOID,int);
-HRESULT WINAPI SHGetDesktopFolder(LPSHELLFOLDER*);
-HRESULT WINAPI SHGetInstanceExplorer(IUnknown **);
-HRESULT WINAPI SHGetMalloc(LPMALLOC*);
-BOOL WINAPI SHGetPathFromIDListA(LPCITEMIDLIST,LPSTR);
-BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST,LPWSTR);
-HRESULT WINAPI SHGetSpecialFolderLocation(HWND,int,LPITEMIDLIST*);
-HRESULT WINAPI SHLoadInProc(REFCLSID);
-#if (_WIN32_IE >= 0x0400)
-BOOL WINAPI SHGetSpecialFolderPathA(HWND,LPSTR,int,BOOL);
-BOOL WINAPI SHGetSpecialFolderPathW(HWND,LPWSTR,int,BOOL);
-#endif
-/* SHGetFolderPath in shfolder.dll on W9x, NT4, also in shell32.dll on W2K */
-HRESULT WINAPI SHGetFolderPathA(HWND,int,HANDLE,DWORD,LPSTR);
-HRESULT WINAPI SHGetFolderPathW(HWND,int,HANDLE,DWORD,LPWSTR);
-#if (_WIN32_WINDOWS >= 0x0490) || (_WIN32_WINNT >= 0x0500) /* ME or W2K */
-HRESULT WINAPI SHGetFolderLocation(HWND,int,HANDLE,DWORD,LPITEMIDLIST*);
-#endif
-#if (_WIN32_WINNT >= 0x0500)
-INT WINAPI SHCreateDirectoryExA(HWND,LPCSTR,LPSECURITY_ATTRIBUTES);
-INT WINAPI SHCreateDirectoryExW(HWND,LPCWSTR,LPSECURITY_ATTRIBUTES);
-HRESULT WINAPI SHBindToParent(LPCITEMIDLIST,REFIID,VOID**,LPCITEMIDLIST*);
-#endif
-#if (_WIN32_WINNT >= 0x0501) /* XP */
-HRESULT WINAPI SHGetFolderPathAndSubDirA(HWND,int,HANDLE,DWORD,LPCSTR,LPSTR);
-HRESULT WINAPI SHGetFolderPathAndSubDirW(HWND,int,HANDLE,DWORD,LPCWSTR,LPWSTR);
-#endif
-void WINAPI SHGetSettings(LPSHELLFLAGSTATE,DWORD);
-#if (_WIN32_WINNT >= 0x0500) /* W2K */
-void WINAPI SHGetSetSettings(LPSHELLSTATE,DWORD,BOOL);
-#endif
-
-#if (_WIN32_WINNT >= 0x0500) /* W2K */
-BOOL WINAPI ILIsEqual(LPCITEMIDLIST, LPCITEMIDLIST);
-BOOL WINAPI ILIsParent(LPCITEMIDLIST, LPCITEMIDLIST, BOOL);
-BOOL WINAPI ILRemoveLastID(LPITEMIDLIST);
-HRESULT WINAPI ILLoadFromStream(IStream*, LPITEMIDLIST*);
-HRESULT WINAPI ILSaveToStream(IStream*, LPCITEMIDLIST);
-LPITEMIDLIST WINAPI ILAppendID(LPITEMIDLIST, LPCSHITEMID, BOOL);
-LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST);
-LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST);
-LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST, LPCITEMIDLIST);
-LPITEMIDLIST WINAPI ILFindChild(LPCITEMIDLIST, LPCITEMIDLIST);
-LPITEMIDLIST WINAPI ILFindLastID(LPCITEMIDLIST);
-LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST);
-UINT WINAPI ILGetSize(LPCITEMIDLIST);
-void WINAPI ILFree(LPITEMIDLIST);
-
-HRESULT WINAPI SHCoCreateInstance(LPCWSTR,REFCLSID,IUnknown*,REFIID,void**);
-#endif
-
-#ifdef UNICODE
-typedef IShellExecuteHookW IShellExecuteHook;
-typedef IShellLinkW IShellLink;
-typedef BROWSEINFOW BROWSEINFO,*PBROWSEINFO,*LPBROWSEINFO;
-#define SHBrowseForFolder SHBrowseForFolderW
-#define SHGetDataFromIDList SHGetDataFromIDListW
-#define SHGetPathFromIDList SHGetPathFromIDListW
-#if (_WIN32_IE >= 0x0400)
-#define SHGetSpecialFolderPath SHGetSpecialFolderPathW
-#endif
-#define SHGetFolderPath SHGetFolderPathW
-#if (_WIN32_WINNT >= 0x0500)
-#define SHCreateDirectoryEx SHCreateDirectoryExW
-#endif
-#if (_WIN32_WINNT >= 0x0501)
-#define SHGetFolderPathAndSubDir SHGetFolderPathAndSubDirW
-#endif
-#define FILEDESCRIPTOR FILEDESCRIPTORW
-#define LPFILEDESCRIPTOR LPFILEDESCRIPTORW
-#define FILEGROUPDESCRIPTOR FILEGROUPDESCRIPTORW
-#define LPFILEGROUPDESCRIPTOR LPFILEGROUPDESCRIPTORW
-
-#else
-typedef IShellExecuteHookA IShellExecuteHook;
-typedef IShellLinkA IShellLink;
-typedef BROWSEINFOA BROWSEINFO,*PBROWSEINFO,*LPBROWSEINFO;
-#define SHBrowseForFolder SHBrowseForFolderA
-#define SHGetDataFromIDList SHGetDataFromIDListA
-#define SHGetPathFromIDList SHGetPathFromIDListA
-#if (_WIN32_IE >= 0x0400)
-#define SHGetSpecialFolderPath SHGetSpecialFolderPathA
-#endif
-#define SHGetFolderPath SHGetFolderPathA
-#if (_WIN32_WINNT >= 0x0500)
-#define SHCreateDirectoryEx SHCreateDirectoryExA
-#endif
-#if (_WIN32_WINNT >= 0x0501)
-#define SHGetFolderPathAndSubDir SHGetFolderPathAndSubDirA
-#endif
-#define FILEDESCRIPTOR FILEDESCRIPTORA
-#define LPFILEDESCRIPTOR LPFILEDESCRIPTORA
-#define FILEGROUPDESCRIPTOR FILEGROUPDESCRIPTORA
-#define LPFILEGROUPDESCRIPTOR LPFILEGROUPDESCRIPTORA
-#endif /* UNICODE */
-
-DWORD WINAPI SHFormatDrive(HWND,UINT,UINT,UINT);
-
-#define SHFMT_ID_DEFAULT 0xFFFF
-#define SHFMT_OPT_FULL 1
-#define SHFMT_OPT_SYSONLY 2
-#define SHFMT_ERROR 0xFFFFFFFF
-#define SHFMT_CANCEL 0xFFFFFFFE
-#define SHFMT_NOFORMAT 0xFFFFFFFD
-
-#pragma pack(pop)
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _SHLOBJ_H */
diff --git a/winsup/w32api/include/shlwapi.h b/winsup/w32api/include/shlwapi.h
deleted file mode 100644
index aaa01e7..0000000
--- a/winsup/w32api/include/shlwapi.h
+++ /dev/null
@@ -1,736 +0,0 @@
-#ifndef _SHLWAPI_H
-#define _SHLWAPI_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _OBJC_NO_COM
-#include <objbase.h>
-#include <shlobj.h>
-#endif
-
-#ifndef WINSHLWAPI
-#define WINSHLWAPI DECLSPEC_IMPORT
-#endif
-
-#define DLLVER_PLATFORM_WINDOWS 0x00000001
-#define DLLVER_PLATFORM_NT 0x00000002
-
-#define URL_DONT_ESCAPE_EXTRA_INFO 0x02000000
-#define URL_DONT_SIMPLIFY 0x08000000
-#define URL_ESCAPE_PERCENT 0x00001000
-#define URL_ESCAPE_SEGMENT_ONLY 0x00002000
-#define URL_ESCAPE_SPACES_ONLY 0x04000000
-#define URL_ESCAPE_UNSAFE 0x20000000
-#define URL_INTERNAL_PATH 0x00800000
-#define URL_PARTFLAG_KEEPSCHEME 0x00000001
-#define URL_PLUGGABLE_PROTOCOL 0x40000000
-#define URL_UNESCAPE 0x10000000
-#define URL_UNESCAPE_HIGH_ANSI_ONLY 0x00400000
-#define URL_UNESCAPE_INPLACE 0x00100000
-
-#ifndef RC_INVOKED
-#include <pshpack1.h>
-typedef struct _DllVersionInfo
-{
- DWORD cbSize;
- DWORD dwMajorVersion;
- DWORD dwMinorVersion;
- DWORD dwBuildNumber;
- DWORD dwPlatformID;
-} DLLVERSIONINFO;
-typedef struct _DLLVERSIONINFO2
-{
- DLLVERSIONINFO info1;
- DWORD dwFlags;
- ULONGLONG ullVersion;
-} DLLVERSIONINFO2;
-#include <poppack.h>
-
-#define MAKEDLLVERULL(major, minor, build, qfe) \
- (((ULONGLONG)(major) << 48) | \
- ((ULONGLONG)(minor) << 32) | \
- ((ULONGLONG)(build) << 16) | \
- ((ULONGLONG)( qfe) << 0))
-
-typedef enum {
- ASSOCSTR_COMMAND = 1,
- ASSOCSTR_EXECUTABLE,
- ASSOCSTR_FRIENDLYDOCNAME,
- ASSOCSTR_FRIENDLYAPPNAME,
- ASSOCSTR_NOOPEN,
- ASSOCSTR_SHELLNEWVALUE,
- ASSOCSTR_DDECOMMAND,
- ASSOCSTR_DDEIFEXEC,
- ASSOCSTR_DDEAPPLICATION,
- ASSOCSTR_DDETOPIC,
- ASSOCSTR_INFOTIP
-#ifdef _WIN32_IE >= 0x0600
- ,
- ASSOCSTR_QUICKTIP,
- ASSOCSTR_TILEINFO,
- ASSOCSTR_CONTENTTYPE,
- ASSOCSTR_DEFAULTICON,
- ASSOCSTR_SHELLEXTENSION
-#endif
-} ASSOCSTR;
-typedef enum
-{
- ASSOCKEY_SHELLEXECCLASS = 1,
- ASSOCKEY_APP,
- ASSOCKEY_CLASS,
- ASSOCKEY_BASECLASS
-} ASSOCKEY;
-typedef enum
-{
- ASSOCDATA_MSIDESCRIPTOR = 1,
- ASSOCDATA_NOACTIVATEHANDLER,
- ASSOCDATA_QUERYCLASSSTORE
-} ASSOCDATA;
-typedef enum {
- ASSOCF_INIT_NOREMAPCLSID = 0x00000001,
- ASSOCF_INIT_BYEXENAME = 0x00000002,
- ASSOCF_OPEN_BYEXENAME = 0x00000002,
- ASSOCF_INIT_DEFAULTTOSTAR = 0x00000004,
- ASSOCF_INIT_DEFAULTTOFOLDER = 0x00000008,
- ASSOCF_NOUSERSETTINGS = 0x00000010,
- ASSOCF_NOTRUNCATE = 0x00000020,
- ASSOCF_VERIFY = 0x00000040,
- ASSOCF_REMAPRUNDLL = 0x00000080,
- ASSOCF_NOFIXUPS = 0x00000100,
- ASSOCF_IGNOREBASECLASS = 0x00000200,
- ASSOCF_INIT_IGNOREUNKNOWN = 0x00000400
-} ASSOCF;
-typedef enum
-{
- SHREGDEL_DEFAULT = 0x00000000,
- SHREGDEL_HKCU = 0x00000001,
- SHREGDEL_HKLM = 0x00000010,
- SHREGDEL_BOTH = 0x00000011
-} SHREGDEL_FLAGS;
-typedef enum
-{
- SHREGENUM_DEFAULT = 0x00000000,
- SHREGENUM_HKCU = 0x00000001,
- SHREGENUM_HKLM = 0x00000010,
- SHREGENUM_BOTH = 0x00000011
-} SHREGENUM_FLAGS;
-typedef enum
-{
- URLIS_URL,
- URLIS_OPAQUE,
- URLIS_NOHISTORY,
- URLIS_FILEURL,
- URLIS_APPLIABLE,
- URLIS_DIRECTORY,
- URLIS_HASQUERY
-} URLIS;
-
-typedef HANDLE HUSKEY, *PHUSKEY;
-
-typedef HRESULT (WINAPI* DLLGETVERSIONPROC)(DLLVERSIONINFO *);
-
-WINSHLWAPI BOOL WINAPI ChrCmpIA(WORD,WORD);
-WINSHLWAPI BOOL WINAPI ChrCmpIW(WCHAR,WCHAR);
-#define IntlStrEqNA(pStr1, pStr2, nChar) IntlStrEqWorkerA(TRUE, pStr1, pStr2, nChar);
-#define IntlStrEqNW(pStr1, pStr2, nChar) IntlStrEqWorkerW(TRUE, pStr1, pStr2, nChar);
-#define IntlStrEqNIA(pStr1, pStr2, nChar) IntlStrEqWorkerA(FALSE, pStr1, pStr2, nChar);
-#define IntlStrEqNIW(pStr1, pStr2, nChar) IntlStrEqWorkerW(FALSE, pStr1, pStr2, nChar);
-WINSHLWAPI BOOL WINAPI IntlStrEqWorkerA(BOOL,LPCSTR,LPCSTR,int);
-WINSHLWAPI BOOL WINAPI IntlStrEqWorkerW(BOOL,LPCWSTR,LPCWSTR,int);
-WINSHLWAPI HRESULT WINAPI SHStrDupA(LPCSTR,LPWSTR*);
-WINSHLWAPI HRESULT WINAPI SHStrDupW(LPCWSTR,LPWSTR*);
-WINSHLWAPI LPSTR WINAPI StrCatA(LPSTR,LPCSTR);
-WINSHLWAPI LPWSTR WINAPI StrCatW(LPWSTR,LPCWSTR);
-WINSHLWAPI LPSTR WINAPI StrCatBuffA(LPSTR,LPCSTR,int);
-WINSHLWAPI LPWSTR WINAPI StrCatBuffW(LPWSTR,LPCWSTR,int);
-WINSHLWAPI DWORD WINAPI StrCatChainW(LPWSTR,DWORD,DWORD,LPCWSTR);
-WINSHLWAPI LPSTR WINAPI StrChrA(LPCSTR,WORD);
-WINSHLWAPI LPWSTR WINAPI StrChrW(LPCWSTR,WCHAR);
-WINSHLWAPI LPSTR WINAPI StrChrIA(LPCSTR,WORD);
-WINSHLWAPI LPWSTR WINAPI StrChrIW(LPCWSTR,WCHAR);
-#define StrCmpIA lstrcmpiA
-#define StrCmpA lstrcmpA
-#define StrCpyA lstrcpyA
-#define StrCpyNA lstrcpynA
-WINSHLWAPI int WINAPI StrCmpIW(LPCWSTR,LPCWSTR);
-WINSHLWAPI int WINAPI StrCmpW(LPCWSTR,LPCWSTR);
-WINSHLWAPI LPWSTR WINAPI StrCpyW(LPWSTR,LPCWSTR);
-WINSHLWAPI LPWSTR WINAPI StrCpyNW(LPWSTR,LPCWSTR,int);
-WINSHLWAPI int WINAPI StrCmpNA(LPCSTR,LPCSTR,int);
-WINSHLWAPI int WINAPI StrCmpNW(LPCWSTR,LPCWSTR,int);
-WINSHLWAPI int WINAPI StrCmpNIA(LPCSTR,LPCSTR,int);
-WINSHLWAPI int WINAPI StrCmpNIW(LPCWSTR,LPCWSTR,int);
-WINSHLWAPI int WINAPI StrCSpnA(LPCSTR,LPCSTR);
-WINSHLWAPI int WINAPI StrCSpnW(LPCWSTR,LPCWSTR);
-WINSHLWAPI int WINAPI StrCSpnIA(LPCSTR,LPCSTR);
-WINSHLWAPI int WINAPI StrCSpnIW(LPCWSTR,LPCWSTR);
-WINSHLWAPI LPSTR WINAPI StrDupA(LPCSTR);
-WINSHLWAPI LPWSTR WINAPI StrDupW(LPCWSTR);
-WINSHLWAPI LPSTR WINAPI StrFormatByteSize64A(LONGLONG,LPSTR,UINT);
-WINSHLWAPI LPSTR WINAPI StrFormatByteSizeA(DWORD,LPSTR,UINT);
-WINSHLWAPI LPWSTR WINAPI StrFormatByteSizeW(LONGLONG,LPWSTR,UINT);
-WINSHLWAPI LPSTR WINAPI StrFormatKBSizeA(LONGLONG,LPSTR,UINT);
-WINSHLWAPI LPWSTR WINAPI StrFormatKBSizeW(LONGLONG,LPWSTR,UINT);
-WINSHLWAPI int WINAPI StrFromTimeIntervalA(LPSTR,UINT,DWORD,int);
-WINSHLWAPI int WINAPI StrFromTimeIntervalW(LPWSTR,UINT,DWORD,int);
-WINSHLWAPI BOOL WINAPI StrIsIntlEqualA(BOOL,LPCSTR,LPCSTR,int);
-WINSHLWAPI BOOL WINAPI StrIsIntlEqualW(BOOL,LPCWSTR,LPCWSTR,int);
-WINSHLWAPI LPSTR WINAPI StrNCatA(LPSTR,LPCSTR,int);
-WINSHLWAPI LPWSTR WINAPI StrNCatW(LPWSTR,LPCWSTR,int);
-WINSHLWAPI LPSTR WINAPI StrPBrkA(LPCSTR,LPCSTR);
-WINSHLWAPI LPWSTR WINAPI StrPBrkW(LPCWSTR,LPCWSTR);
-WINSHLWAPI LPSTR WINAPI StrRChrA(LPCSTR,LPCSTR,WORD);
-WINSHLWAPI LPWSTR WINAPI StrRChrW(LPCWSTR,LPCWSTR,WCHAR);
-WINSHLWAPI LPSTR WINAPI StrRChrIA(LPCSTR,LPCSTR,WORD);
-WINSHLWAPI LPWSTR WINAPI StrRChrIW(LPCWSTR,LPCWSTR,WCHAR);
-#ifndef _OBJC_NO_COM
-WINSHLWAPI HRESULT WINAPI StrRetToBufA(LPSTRRET,LPCITEMIDLIST,LPSTR,UINT);
-WINSHLWAPI HRESULT WINAPI StrRetToBufW(LPSTRRET,LPCITEMIDLIST,LPWSTR,UINT);
-WINSHLWAPI HRESULT WINAPI StrRetToStrA(LPSTRRET,LPCITEMIDLIST,LPSTR*);
-WINSHLWAPI HRESULT WINAPI StrRetToStrW(LPSTRRET,LPCITEMIDLIST,LPWSTR*);
-#endif
-WINSHLWAPI LPSTR WINAPI StrRStrIA(LPCSTR,LPCSTR,LPCSTR);
-WINSHLWAPI LPWSTR WINAPI StrRStrIW(LPCWSTR,LPCWSTR,LPCWSTR);
-WINSHLWAPI int WINAPI StrSpnA(LPCSTR,LPCSTR);
-WINSHLWAPI int WINAPI StrSpnW(LPCWSTR,LPCWSTR);
-WINSHLWAPI LPSTR WINAPI StrStrA(LPCSTR, LPCSTR);
-WINSHLWAPI LPSTR WINAPI StrStrIA(LPCSTR,LPCSTR);
-WINSHLWAPI LPWSTR WINAPI StrStrIW(LPCWSTR,LPCWSTR);
-WINSHLWAPI LPWSTR WINAPI StrStrW(LPCWSTR,LPCWSTR);
-WINSHLWAPI int WINAPI StrToIntA(LPCSTR);
-WINSHLWAPI int WINAPI StrToIntW(LPCWSTR);
-#define STIF_DEFAULT 0x0L
-#define STIF_SUPPORT_HEX 0x1L
-WINSHLWAPI BOOL WINAPI StrToIntExA(LPCSTR,DWORD,int*);
-WINSHLWAPI BOOL WINAPI StrToIntExW(LPCWSTR,DWORD,int*);
-WINSHLWAPI BOOL WINAPI StrTrimA(LPSTR,LPCSTR);
-WINSHLWAPI BOOL WINAPI StrTrimW(LPWSTR,LPCWSTR);
-WINSHLWAPI LPSTR WINAPI PathAddBackslashA(LPSTR);
-WINSHLWAPI LPWSTR WINAPI PathAddBackslashW(LPWSTR);
-WINSHLWAPI BOOL WINAPI PathAddExtensionA(LPSTR,LPCSTR);
-WINSHLWAPI BOOL WINAPI PathAddExtensionW(LPWSTR,LPCWSTR);
-WINSHLWAPI BOOL WINAPI PathAppendA(LPSTR,LPCSTR);
-WINSHLWAPI BOOL WINAPI PathAppendW(LPWSTR,LPCWSTR);
-WINSHLWAPI LPSTR WINAPI PathBuildRootA(LPSTR,int);
-WINSHLWAPI LPWSTR WINAPI PathBuildRootW(LPWSTR,int);
-WINSHLWAPI BOOL WINAPI PathCanonicalizeA(LPSTR,LPCSTR);
-WINSHLWAPI BOOL WINAPI PathCanonicalizeW(LPWSTR,LPCWSTR);
-WINSHLWAPI LPSTR WINAPI PathCombineA(LPSTR,LPCSTR,LPCSTR);
-WINSHLWAPI LPWSTR WINAPI PathCombineW(LPWSTR,LPCWSTR,LPCWSTR);
-WINSHLWAPI int WINAPI PathCommonPrefixA(LPCSTR,LPCSTR,LPSTR);
-WINSHLWAPI int WINAPI PathCommonPrefixW(LPCWSTR,LPCWSTR,LPWSTR);
-WINSHLWAPI BOOL WINAPI PathCompactPathA(HDC,LPSTR,UINT);
-WINSHLWAPI BOOL WINAPI PathCompactPathW(HDC,LPWSTR,UINT);
-WINSHLWAPI BOOL WINAPI PathCompactPathExA(LPSTR,LPCSTR,UINT,DWORD);
-WINSHLWAPI BOOL WINAPI PathCompactPathExW(LPWSTR,LPCWSTR,UINT,DWORD);
-WINSHLWAPI HRESULT WINAPI PathCreateFromUrlA(LPCSTR,LPSTR,LPDWORD,DWORD);
-WINSHLWAPI HRESULT WINAPI PathCreateFromUrlW(LPCWSTR,LPWSTR,LPDWORD,DWORD);
-WINSHLWAPI BOOL WINAPI PathFileExistsA(LPCSTR);
-WINSHLWAPI BOOL WINAPI PathFileExistsW(LPCWSTR);
-WINSHLWAPI LPSTR WINAPI PathFindExtensionA(LPCSTR);
-WINSHLWAPI LPWSTR WINAPI PathFindExtensionW(LPCWSTR);
-WINSHLWAPI LPSTR WINAPI PathFindFileNameA(LPCSTR);
-WINSHLWAPI LPWSTR WINAPI PathFindFileNameW(LPCWSTR);
-WINSHLWAPI LPSTR WINAPI PathFindNextComponentA(LPCSTR);
-WINSHLWAPI LPWSTR WINAPI PathFindNextComponentW(LPCWSTR);
-WINSHLWAPI BOOL WINAPI PathFindOnPathA(LPSTR,LPCSTR*);
-WINSHLWAPI BOOL WINAPI PathFindOnPathW(LPWSTR,LPCWSTR*);
-WINSHLWAPI LPCSTR WINAPI PathFindSuffixArrayA(LPCSTR,LPCSTR*,int);
-WINSHLWAPI LPCWSTR WINAPI PathFindSuffixArrayW(LPCWSTR,LPCWSTR*,int);
-WINSHLWAPI LPSTR WINAPI PathGetArgsA(LPCSTR);
-WINSHLWAPI LPWSTR WINAPI PathGetArgsW(LPCWSTR);
-WINSHLWAPI UINT WINAPI PathGetCharTypeA(UCHAR);
-WINSHLWAPI UINT WINAPI PathGetCharTypeW(WCHAR);
-WINSHLWAPI int WINAPI PathGetDriveNumberA(LPCSTR);
-WINSHLWAPI int WINAPI PathGetDriveNumberW(LPCWSTR);
-WINSHLWAPI BOOL WINAPI PathIsContentTypeA(LPCSTR,LPCSTR);
-WINSHLWAPI BOOL WINAPI PathIsContentTypeW(LPCWSTR,LPCWSTR);
-WINSHLWAPI BOOL WINAPI PathIsDirectoryA(LPCSTR);
-WINSHLWAPI BOOL WINAPI PathIsDirectoryEmptyA(LPCSTR);
-WINSHLWAPI BOOL WINAPI PathIsDirectoryEmptyW(LPCWSTR);
-WINSHLWAPI BOOL WINAPI PathIsDirectoryW(LPCWSTR);
-WINSHLWAPI BOOL WINAPI PathIsFileSpecA(LPCSTR);
-WINSHLWAPI BOOL WINAPI PathIsFileSpecW(LPCWSTR);
-WINSHLWAPI BOOL WINAPI PathIsLFNFileSpecA(LPCSTR);
-WINSHLWAPI BOOL WINAPI PathIsLFNFileSpecW(LPCWSTR);
-WINSHLWAPI BOOL WINAPI PathIsNetworkPathA(LPCSTR);
-WINSHLWAPI BOOL WINAPI PathIsNetworkPathW(LPCWSTR);
-WINSHLWAPI BOOL WINAPI PathIsPrefixA(LPCSTR,LPCSTR);
-WINSHLWAPI BOOL WINAPI PathIsPrefixW(LPCWSTR,LPCWSTR);
-WINSHLWAPI BOOL WINAPI PathIsRelativeA(LPCSTR);
-WINSHLWAPI BOOL WINAPI PathIsRelativeW(LPCWSTR);
-WINSHLWAPI BOOL WINAPI PathIsRootA(LPCSTR);
-WINSHLWAPI BOOL WINAPI PathIsRootW(LPCWSTR);
-WINSHLWAPI BOOL WINAPI PathIsSameRootA(LPCSTR,LPCSTR);
-WINSHLWAPI BOOL WINAPI PathIsSameRootW(LPCWSTR,LPCWSTR);
-WINSHLWAPI BOOL WINAPI PathIsSystemFolderA(LPCSTR,DWORD);
-WINSHLWAPI BOOL WINAPI PathIsSystemFolderW(LPCWSTR,DWORD);
-WINSHLWAPI BOOL WINAPI PathIsUNCA(LPCSTR);
-WINSHLWAPI BOOL WINAPI PathIsUNCServerA(LPCSTR);
-WINSHLWAPI BOOL WINAPI PathIsUNCServerShareA(LPCSTR);
-WINSHLWAPI BOOL WINAPI PathIsUNCServerShareW(LPCWSTR);
-WINSHLWAPI BOOL WINAPI PathIsUNCServerW(LPCWSTR);
-WINSHLWAPI BOOL WINAPI PathIsUNCW(LPCWSTR);
-WINSHLWAPI BOOL WINAPI PathIsURLA(LPCSTR);
-WINSHLWAPI BOOL WINAPI PathIsURLW(LPCWSTR);
-WINSHLWAPI BOOL WINAPI PathMakePrettyA(LPSTR);
-WINSHLWAPI BOOL WINAPI PathMakePrettyW(LPWSTR);
-WINSHLWAPI BOOL WINAPI PathMakeSystemFolderA(LPSTR);
-WINSHLWAPI BOOL WINAPI PathMakeSystemFolderW(LPWSTR);
-WINSHLWAPI BOOL WINAPI PathMatchSpecA(LPCSTR,LPCSTR);
-WINSHLWAPI BOOL WINAPI PathMatchSpecW(LPCWSTR,LPCWSTR);
-WINSHLWAPI int WINAPI PathParseIconLocationA(LPSTR);
-WINSHLWAPI int WINAPI PathParseIconLocationW(LPWSTR);
-WINSHLWAPI void WINAPI PathQuoteSpacesA(LPSTR);
-WINSHLWAPI void WINAPI PathQuoteSpacesW(LPWSTR);
-WINSHLWAPI BOOL WINAPI PathRelativePathToA(LPSTR,LPCSTR,DWORD,LPCSTR,DWORD);
-WINSHLWAPI BOOL WINAPI PathRelativePathToW(LPWSTR,LPCWSTR,DWORD,LPCWSTR,DWORD);
-WINSHLWAPI void WINAPI PathRemoveArgsA(LPSTR);
-WINSHLWAPI void WINAPI PathRemoveArgsW(LPWSTR);
-WINSHLWAPI LPSTR WINAPI PathRemoveBackslashA(LPSTR);
-WINSHLWAPI LPWSTR WINAPI PathRemoveBackslashW(LPWSTR);
-WINSHLWAPI void WINAPI PathRemoveBlanksA(LPSTR);
-WINSHLWAPI void WINAPI PathRemoveBlanksW(LPWSTR);
-WINSHLWAPI void WINAPI PathRemoveExtensionA(LPSTR);
-WINSHLWAPI void WINAPI PathRemoveExtensionW(LPWSTR);
-WINSHLWAPI BOOL WINAPI PathRemoveFileSpecA(LPSTR);
-WINSHLWAPI BOOL WINAPI PathRemoveFileSpecW(LPWSTR);
-WINSHLWAPI BOOL WINAPI PathRenameExtensionA(LPSTR,LPCSTR);
-WINSHLWAPI BOOL WINAPI PathRenameExtensionW(LPWSTR,LPCWSTR);
-WINSHLWAPI BOOL WINAPI PathSearchAndQualifyA(LPCSTR,LPSTR,UINT);
-WINSHLWAPI BOOL WINAPI PathSearchAndQualifyW(LPCWSTR,LPWSTR,UINT);
-WINSHLWAPI void WINAPI PathSetDlgItemPathA(HWND,int,LPCSTR);
-WINSHLWAPI void WINAPI PathSetDlgItemPathW(HWND,int,LPCWSTR);
-WINSHLWAPI LPSTR WINAPI PathSkipRootA(LPCSTR);
-WINSHLWAPI LPWSTR WINAPI PathSkipRootW(LPCWSTR);
-WINSHLWAPI void WINAPI PathStripPathA(LPSTR);
-WINSHLWAPI void WINAPI PathStripPathW(LPWSTR);
-WINSHLWAPI BOOL WINAPI PathStripToRootA(LPSTR);
-WINSHLWAPI BOOL WINAPI PathStripToRootW(LPWSTR);
-WINSHLWAPI void WINAPI PathUndecorateA(LPSTR);
-WINSHLWAPI void WINAPI PathUndecorateW(LPWSTR);
-WINSHLWAPI BOOL WINAPI PathUnExpandEnvStringsA(LPCSTR,LPSTR,UINT);
-WINSHLWAPI BOOL WINAPI PathUnExpandEnvStringsW(LPCWSTR,LPWSTR,UINT);
-WINSHLWAPI BOOL WINAPI PathUnmakeSystemFolderA(LPSTR);
-WINSHLWAPI BOOL WINAPI PathUnmakeSystemFolderW(LPWSTR);
-WINSHLWAPI void WINAPI PathUnquoteSpacesA(LPSTR);
-WINSHLWAPI void WINAPI PathUnquoteSpacesW(LPWSTR);
-WINSHLWAPI HRESULT WINAPI SHAutoComplete(HWND,DWORD);
-#ifndef _OBJC_NO_COM
-WINSHLWAPI HRESULT WINAPI SHCreateStreamOnFileA(LPCSTR,DWORD,struct IStream**);
-WINSHLWAPI HRESULT WINAPI SHCreateStreamOnFileW(LPCWSTR,DWORD,struct IStream**);
-WINSHLWAPI struct IStream* WINAPI SHOpenRegStream2A(HKEY,LPCSTR,LPCSTR,DWORD);
-WINSHLWAPI struct IStream* WINAPI SHOpenRegStream2W(HKEY,LPCWSTR,LPCWSTR,DWORD);
-WINSHLWAPI struct IStream* WINAPI SHOpenRegStreamA(HKEY,LPCSTR,LPCSTR,DWORD);
-WINSHLWAPI struct IStream* WINAPI SHOpenRegStreamW(HKEY,LPCWSTR,LPCWSTR,DWORD);
-#endif
-WINSHLWAPI BOOL WINAPI SHCreateThread(LPTHREAD_START_ROUTINE,void*,DWORD,LPTHREAD_START_ROUTINE);
-WINSHLWAPI DWORD WINAPI SHCopyKeyA(HKEY,LPCSTR,HKEY,DWORD);
-WINSHLWAPI DWORD WINAPI SHCopyKeyW(HKEY,LPCWSTR,HKEY,DWORD);
-WINSHLWAPI DWORD WINAPI SHDeleteEmptyKeyA(HKEY,LPCSTR);
-WINSHLWAPI DWORD WINAPI SHDeleteEmptyKeyW(HKEY,LPCWSTR);
-WINSHLWAPI DWORD WINAPI SHDeleteKeyA(HKEY,LPCSTR);
-WINSHLWAPI DWORD WINAPI SHDeleteKeyW(HKEY,LPCWSTR);
-WINSHLWAPI DWORD WINAPI SHEnumKeyExA(HKEY,DWORD,LPSTR,LPDWORD);
-WINSHLWAPI DWORD WINAPI SHEnumKeyExW(HKEY,DWORD,LPWSTR,LPDWORD);
-WINSHLWAPI DWORD WINAPI SHQueryInfoKeyA(HKEY,LPDWORD,LPDWORD,LPDWORD,LPDWORD);
-WINSHLWAPI DWORD WINAPI SHQueryInfoKeyW(HKEY,LPDWORD,LPDWORD,LPDWORD,LPDWORD);
-WINSHLWAPI DWORD WINAPI SHQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPVOID,LPDWORD);
-WINSHLWAPI DWORD WINAPI SHQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPVOID,LPDWORD);
-#ifndef _OBJC_NO_COM
-WINSHLWAPI HRESULT WINAPI SHGetThreadRef(IUnknown**);
-WINSHLWAPI HRESULT WINAPI SHSetThreadRef(IUnknown*);
-WINSHLWAPI BOOL WINAPI SHSkipJunction(IBindCtx*,const CLSID*);
-#endif
-WINSHLWAPI DWORD WINAPI SHEnumValueA(HKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPVOID,LPDWORD);
-WINSHLWAPI DWORD WINAPI SHEnumValueW(HKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPVOID,LPDWORD);
-WINSHLWAPI DWORD WINAPI SHGetValueA(HKEY,LPCSTR,LPCSTR,LPDWORD,LPVOID,LPDWORD);
-WINSHLWAPI DWORD WINAPI SHGetValueW(HKEY,LPCWSTR,LPCWSTR,LPDWORD,LPVOID,LPDWORD);
-WINSHLWAPI DWORD WINAPI SHSetValueA(HKEY,LPCSTR,LPCSTR,DWORD,LPCVOID,DWORD);
-WINSHLWAPI DWORD WINAPI SHSetValueW(HKEY,LPCWSTR,LPCWSTR,DWORD,LPCVOID,DWORD);
-WINSHLWAPI DWORD WINAPI SHDeleteValueA(HKEY,LPCSTR,LPCSTR);
-WINSHLWAPI DWORD WINAPI SHDeleteValueW(HKEY,LPCWSTR,LPCWSTR);
-WINSHLWAPI HRESULT WINAPI AssocCreate(CLSID,const IID* const,LPVOID*);
-WINSHLWAPI HRESULT WINAPI AssocQueryKeyA(ASSOCF,ASSOCKEY,LPCSTR,LPCSTR,HKEY*);
-WINSHLWAPI HRESULT WINAPI AssocQueryKeyW(ASSOCF,ASSOCKEY,LPCWSTR,LPCWSTR,HKEY*);
-WINSHLWAPI HRESULT WINAPI AssocQueryStringA(ASSOCF,ASSOCSTR,LPCSTR,LPCSTR,LPSTR,DWORD*);
-WINSHLWAPI HRESULT WINAPI AssocQueryStringByKeyA(ASSOCF,ASSOCSTR,HKEY,LPCSTR,LPSTR,DWORD*);
-WINSHLWAPI HRESULT WINAPI AssocQueryStringByKeyW(ASSOCF,ASSOCSTR,HKEY,LPCWSTR,LPWSTR,DWORD*);
-WINSHLWAPI HRESULT WINAPI AssocQueryStringW(ASSOCF,ASSOCSTR,LPCWSTR,LPCWSTR,LPWSTR,DWORD*);
-
-WINSHLWAPI HRESULT WINAPI UrlApplySchemeA(LPCSTR,LPSTR,LPDWORD,DWORD);
-WINSHLWAPI HRESULT WINAPI UrlApplySchemeW(LPCWSTR,LPWSTR,LPDWORD,DWORD);
-WINSHLWAPI HRESULT WINAPI UrlCanonicalizeA(LPCSTR,LPSTR,LPDWORD,DWORD);
-WINSHLWAPI HRESULT WINAPI UrlCanonicalizeW(LPCWSTR,LPWSTR,LPDWORD,DWORD);
-WINSHLWAPI HRESULT WINAPI UrlCombineA(LPCSTR,LPCSTR,LPSTR,LPDWORD,DWORD);
-WINSHLWAPI HRESULT WINAPI UrlCombineW(LPCWSTR,LPCWSTR,LPWSTR,LPDWORD,DWORD);
-WINSHLWAPI int WINAPI UrlCompareA(LPCSTR,LPCSTR,BOOL);
-WINSHLWAPI int WINAPI UrlCompareW(LPCWSTR,LPCWSTR,BOOL);
-WINSHLWAPI HRESULT WINAPI UrlCreateFromPathA(LPCSTR,LPSTR,LPDWORD,DWORD);
-WINSHLWAPI HRESULT WINAPI UrlCreateFromPathW(LPCWSTR,LPWSTR,LPDWORD,DWORD);
-WINSHLWAPI HRESULT WINAPI UrlEscapeA(LPCSTR,LPSTR,LPDWORD,DWORD);
-WINSHLWAPI HRESULT WINAPI UrlEscapeW(LPCWSTR,LPWSTR,LPDWORD,DWORD);
-WINSHLWAPI LPCSTR WINAPI UrlGetLocationA(LPCSTR);
-WINSHLWAPI LPCWSTR WINAPI UrlGetLocationW(LPCWSTR);
-WINSHLWAPI HRESULT WINAPI UrlGetPartA(LPCSTR,LPSTR,LPDWORD,DWORD,DWORD);
-WINSHLWAPI HRESULT WINAPI UrlGetPartW(LPCWSTR,LPWSTR,LPDWORD,DWORD,DWORD);
-WINSHLWAPI HRESULT WINAPI UrlHashA(LPCSTR,LPBYTE,DWORD);
-WINSHLWAPI HRESULT WINAPI UrlHashW(LPCWSTR,LPBYTE,DWORD);
-WINSHLWAPI BOOL WINAPI UrlIsA(LPCSTR,URLIS);
-WINSHLWAPI BOOL WINAPI UrlIsW(LPCWSTR,URLIS);
-#define UrlIsFileUrlA(pszURL) UrlIsA(pzURL, URLIS_FILEURL)
-#define UrlIsFileUrlW(pszURL) UrlIsW(pszURL, URLIS_FILEURL)
-WINSHLWAPI BOOL WINAPI UrlIsNoHistoryA(LPCSTR);
-WINSHLWAPI BOOL WINAPI UrlIsNoHistoryW(LPCWSTR);
-WINSHLWAPI BOOL WINAPI UrlIsOpaqueA(LPCSTR);
-WINSHLWAPI BOOL WINAPI UrlIsOpaqueW(LPCWSTR);
-WINSHLWAPI HRESULT WINAPI UrlUnescapeA(LPSTR,LPSTR,LPDWORD,DWORD);
-WINSHLWAPI HRESULT WINAPI UrlUnescapeW(LPWSTR,LPWSTR,LPDWORD,DWORD);
-#define UrlUnescapeInPlaceA(pszUrl,dwFlags )\
- UrlUnescapeA(pszUrl, NULL, NULL, dwFlags | URL_UNESCAPE_INPLACE)
-#define UrlUnescapeInPlaceW(pszUrl,dwFlags )\
- UrlUnescapeW(pszUrl, NULL, NULL, dwFlags | URL_UNESCAPE_INPLACE)
-WINSHLWAPI DWORD WINAPI SHRegCloseUSKey(HUSKEY);
-WINSHLWAPI LONG WINAPI SHRegCreateUSKeyA(LPCSTR,REGSAM,HUSKEY,PHUSKEY,DWORD);
-WINSHLWAPI LONG WINAPI SHRegCreateUSKeyW(LPCWSTR,REGSAM,HUSKEY,PHUSKEY,DWORD);
-WINSHLWAPI LONG WINAPI SHRegDeleteEmptyUSKeyA(HUSKEY,LPCSTR,SHREGDEL_FLAGS);
-WINSHLWAPI LONG WINAPI SHRegDeleteEmptyUSKeyW(HUSKEY,LPCWSTR,SHREGDEL_FLAGS);
-WINSHLWAPI LONG WINAPI SHRegDeleteUSValueA(HUSKEY,LPCSTR,SHREGDEL_FLAGS);
-WINSHLWAPI LONG WINAPI SHRegDeleteUSValueW(HUSKEY,LPCWSTR,SHREGDEL_FLAGS);
-WINSHLWAPI HKEY WINAPI SHRegDuplicateHKey(HKEY);
-WINSHLWAPI DWORD WINAPI SHRegEnumUSKeyA(HUSKEY,DWORD,LPSTR,LPDWORD,SHREGENUM_FLAGS);
-WINSHLWAPI DWORD WINAPI SHRegEnumUSKeyW(HUSKEY,DWORD,LPWSTR,LPDWORD,SHREGENUM_FLAGS);
-WINSHLWAPI DWORD WINAPI SHRegEnumUSValueA(HUSKEY,DWORD,LPSTR,LPDWORD,LPDWORD,LPVOID,LPDWORD,SHREGENUM_FLAGS);
-WINSHLWAPI DWORD WINAPI SHRegEnumUSValueW(HUSKEY,DWORD,LPWSTR,LPDWORD,LPDWORD,LPVOID,LPDWORD,SHREGENUM_FLAGS);
-WINSHLWAPI BOOL WINAPI SHRegGetBoolUSValueA(LPCSTR,LPCSTR,BOOL,BOOL);
-WINSHLWAPI BOOL WINAPI SHRegGetBoolUSValueW(LPCWSTR,LPCWSTR,BOOL,BOOL);
-WINSHLWAPI DWORD WINAPI SHRegGetPathA(HKEY,LPCSTR,LPCSTR,LPSTR,DWORD);
-WINSHLWAPI DWORD WINAPI SHRegGetPathW(HKEY,LPCWSTR,LPCWSTR,LPWSTR,DWORD);
-WINSHLWAPI LONG WINAPI SHRegGetUSValueA(LPCSTR,LPCSTR,LPDWORD,LPVOID,LPDWORD,BOOL,LPVOID,DWORD);
-WINSHLWAPI LONG WINAPI SHRegGetUSValueW(LPCWSTR,LPCWSTR,LPDWORD,LPVOID,LPDWORD,BOOL,LPVOID,DWORD);
-WINSHLWAPI LONG WINAPI SHRegOpenUSKeyA(LPCSTR,REGSAM,HUSKEY,PHUSKEY,BOOL);
-WINSHLWAPI LONG WINAPI SHRegOpenUSKeyW(LPCWSTR,REGSAM,HUSKEY,PHUSKEY,BOOL);
-WINSHLWAPI DWORD WINAPI SHRegQueryInfoUSKeyA(HUSKEY,LPDWORD,LPDWORD,LPDWORD,LPDWORD,SHREGENUM_FLAGS);
-WINSHLWAPI DWORD WINAPI SHRegQueryInfoUSKeyW(HUSKEY,LPDWORD,LPDWORD,LPDWORD,LPDWORD,SHREGENUM_FLAGS);
-WINSHLWAPI LONG WINAPI SHRegQueryUSValueA(HUSKEY,LPCSTR,LPDWORD,LPVOID,LPDWORD,BOOL,LPVOID,DWORD);
-WINSHLWAPI LONG WINAPI SHRegQueryUSValueW(HUSKEY,LPCWSTR,LPDWORD,LPVOID,LPDWORD,BOOL,LPVOID,DWORD);
-WINSHLWAPI DWORD WINAPI SHRegSetPathA(HKEY,LPCSTR,LPCSTR,LPCSTR,DWORD);
-WINSHLWAPI DWORD WINAPI SHRegSetPathW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR,DWORD);
-WINSHLWAPI LONG WINAPI SHRegSetUSValueA(LPCSTR,LPCSTR,DWORD,LPVOID,DWORD,DWORD);
-WINSHLWAPI LONG WINAPI SHRegSetUSValueW(LPCWSTR,LPCWSTR,DWORD,LPVOID,DWORD,DWORD);
-WINSHLWAPI LONG WINAPI SHRegWriteUSValueA(HUSKEY,LPCSTR,DWORD,LPVOID,DWORD,DWORD);
-WINSHLWAPI LONG WINAPI SHRegWriteUSValueW(HUSKEY,LPCWSTR,DWORD,LPVOID,DWORD,DWORD);
-WINSHLWAPI HRESULT WINAPI HashData(LPBYTE,DWORD,LPBYTE,DWORD);
-WINSHLWAPI HPALETTE WINAPI SHCreateShellPalette(HDC);
-WINSHLWAPI COLORREF WINAPI ColorHLSToRGB(WORD,WORD,WORD);
-WINSHLWAPI COLORREF WINAPI ColorAdjustLuma(COLORREF,int,BOOL);
-WINSHLWAPI void WINAPI ColorRGBToHLS(COLORREF,WORD*,WORD*,WORD*);
-WINSHLWAPI int __cdecl wnsprintfA(LPSTR,int,LPCSTR,...);
-WINSHLWAPI int __cdecl wnsprintfW(LPWSTR,int,LPCWSTR,...);
-WINSHLWAPI int WINAPI wvnsprintfA(LPSTR,int,LPCSTR,va_list);
-WINSHLWAPI int WINAPI wvnsprintfW(LPWSTR,int,LPCWSTR,va_list);
-
-HINSTANCE WINAPI MLLoadLibraryA(LPCSTR,HANDLE,DWORD,LPCSTR,BOOL);
-HINSTANCE WINAPI MLLoadLibraryW(LPCWSTR,HANDLE,DWORD,LPCWSTR,BOOL);
-
-HRESULT WINAPI DllInstall(BOOL,LPCWSTR);
-
-#ifdef UNICODE
-#define ChrCmpI ChrCmpIW
-#define IntlStrEqN IntlStrEqNW
-#define IntlStrEqNI IntlStrEqNIW
-#define IntlStrEqWorker IntlStrEqWorkerW
-#define SHStrDup SHStrDupW
-#define StrCat StrCatW
-#define StrCatBuff StrCatBuffW
-#define StrChr StrChrW
-#define StrChrI StrChrIW
-#define StrCmp StrCmpW
-#define StrCmpI StrCmpIW
-#define StrCmpNI StrCmpNIW
-#define StrCmpN StrCmpNW
-#define StrCpyN StrCpyNW
-#define StrCpy StrCpyW
-#define StrCSpnI StrCSpnIW
-#define StrCSpn StrCSpnW
-#define StrDup StrDupW
-#define StrFormatByteSize StrFormatByteSizeW
-#define StrFormatKBSize StrFormatKBSizeW
-#define StrFromTimeInterval StrFromTimeIntervalW
-#define StrIsIntlEqual StrIsIntlEqualW
-#define StrNCat StrNCatW
-#define StrPBrk StrPBrkW
-#define StrRChr StrRChrW
-#define StrRChrI StrRChrIW
-#ifndef _OBJC_NO_COM
-#define StrRetToBuf StrRetToBufW
-#define StrRetToStr StrRetToStrW
-#endif
-#define StrRStrI StrRStrIW
-#define StrSpn StrSpnW
-#define StrStrI StrStrIW
-#define StrStr StrStrW
-#define StrToInt StrToIntW
-#define StrToIntEx StrToIntExW
-#define StrTrim StrTrimW
-#define PathAddBackslash PathAddBackslashW
-#define PathAddExtension PathAddExtensionW
-#define PathAppend PathAppendW
-#define PathBuildRoot PathBuildRootW
-#define PathCanonicalize PathCanonicalizeW
-#define PathCombine PathCombineW
-#define PathCommonPrefix PathCommonPrefixW
-#define PathCompactPath PathCompactPathW
-#define PathCompactPathEx PathCompactPathExW
-#define PathCreateFromUrl PathCreateFromUrlW
-#define PathFileExists PathFileExistsW
-#define PathFindExtension PathFindExtensionW
-#define PathFindFileName PathFindFileNameW
-#define PathFindNextComponent PathFindNextComponentW
-#define PathFindOnPath PathFindOnPathW
-#define PathFindSuffixArray PathFindSuffixArrayW
-#define PathGetArgs PathGetArgsW
-#define PathGetCharType PathGetCharTypeW
-#define PathGetDriveNumber PathGetDriveNumberW
-#define PathIsContentType PathIsContentTypeW
-#define PathIsDirectoryEmpty PathIsDirectoryEmptyW
-#define PathIsDirectory PathIsDirectoryW
-#define PathIsFileSpec PathIsFileSpecW
-#define PathIsLFNFileSpec PathIsLFNFileSpecW
-#define PathIsNetworkPath PathIsNetworkPathW
-#define PathIsPrefix PathIsPrefixW
-#define PathIsRelative PathIsRelativeW
-#define PathIsRoot PathIsRootW
-#define PathIsSameRoot PathIsSameRootW
-#define PathIsSystemFolder PathIsSystemFolderW
-#define PathIsUNCServerShare PathIsUNCServerShareW
-#define PathIsUNCServer PathIsUNCServerW
-#define PathIsUNC PathIsUNCW
-#define PathIsURL PathIsURLW
-#define PathMakePretty PathMakePrettyW
-#define PathMakeSystemFolder PathMakeSystemFolderW
-#define PathMatchSpec PathMatchSpecW
-#define PathParseIconLocation PathParseIconLocationW
-#define PathQuoteSpaces PathQuoteSpacesW
-#define PathRelativePathTo PathRelativePathToW
-#define PathRemoveArgs PathRemoveArgsW
-#define PathRemoveBackslash PathRemoveBackslashW
-#define PathRemoveBlanks PathRemoveBlanksW
-#define PathRemoveExtension PathRemoveExtensionW
-#define PathRemoveFileSpec PathRemoveFileSpecW
-#define PathRenameExtension PathRenameExtensionW
-#define PathSearchAndQualify PathSearchAndQualifyW
-#define PathSetDlgItemPath PathSetDlgItemPathW
-#define PathSkipRoot PathSkipRootW
-#define PathStripPath PathStripPathW
-#define PathStripToRoot PathStripToRootW
-#define PathUndecorate PathUndecorateW
-#define PathUnExpandEnvStrings PathUnExpandEnvStringsW
-#define PathUnmakeSystemFolder PathUnmakeSystemFolderW
-#define PathUnquoteSpaces PathUnquoteSpacesW
-#ifndef _OBJC_NO_COM
-#define SHCreateStreamOnFile SHCreateStreamOnFileW
-#define SHOpenRegStream SHOpenRegStreamW
-#define SHOpenRegStream2 SHOpenRegStream2W
-#endif
-#define SHCopyKey SHCopyKeyW
-#define SHDeleteEmptyKey SHDeleteEmptyKeyW
-#define SHDeleteKey SHDeleteKeyW
-#define SHEnumKeyEx SHEnumKeyExW
-#define SHQueryInfoKey SHRegQueryInfoKeyW
-#define SHQueryValueEx SHQueryValueExW
-#define SHEnumValue SHEnumValueW
-#define SHGetValue SHGetValueW
-#define SHSetValue SHSetValueW
-#define SHDeleteValue SHDeleteValueW
-#define AssocQueryKey AssocQueryKeyW
-#define AssocQueryStringByKey AssocQueryStringByKeyW
-#define AssocQueryString AssocQueryStringW
-#define UrlApplyScheme UrlApplySchemeW
-#define UrlCanonicalize UrlCanonicalizeW
-#define UrlCombine UrlCombineW
-#define UrlCompare UrlCompareW
-#define UrlCreateFromPath UrlCreateFromPathW
-#define UrlEscape UrlEscapeW
-#define UrlGetLocation UrlGetLocationW
-#define UrlGetPart UrlGetPartW
-#define UrlHash UrlHashW
-#define UrlIs UrlIsW
-#define UrlIsFileUrl UrlIsFileUrlW
-#define UrlIsNoHistory UrlIsNoHistoryW
-#define UrlIsOpaque UrlIsOpaqueW
-#define UrlUnescape UrlUnescapeW
-#define UrlUnescapeInPlace UrlUnescapeInPlaceW
-#define SHRegCreateUSKey SHRegCreateUSKeyW
-#define SHRegDeleteEmptyUSKey SHRegDeleteEmptyUSKeyW
-#define SHRegDeleteUSValue SHRegDeleteUSValueW
-#define SHRegEnumUSKey SHRegEnumUSKeyW
-#define SHRegEnumUSValue SHRegEnumUSValueW
-#define SHRegGetBoolUSValue SHRegGetBoolUSValueW
-#define SHRegGetPath SHRegGetPathW
-#define SHRegGetUSValue SHRegGetUSValueW
-#define SHRegOpenUSKey SHRegOpenUSKeyW
-#define SHRegQueryInfoUSKey SHRegQueryInfoUSKeyW
-#define SHRegQueryUSValue SHRegQueryUSValueW
-#define SHRegSetPath SHRegSetPathW
-#define SHRegSetUSValue SHRegSetUSValueW
-#define SHRegWriteUSValue SHRegWriteUSValueW
-#define wnsprintf wnsprintfW
-#define wvnsprintf wvnsprintfW
-#else /* UNICODE */
-#define ChrCmpI ChrCmpIA
-#define IntlStrEqN IntlStrEqNA
-#define IntlStrEqNI IntlStrEqNIA
-#define IntlStrEqWorker IntlStrEqWorkerA
-#define SHStrDup SHStrDupA
-#define StrCat lstrcatA
-#define StrCatBuff StrCatBuffA
-#define StrChr StrChrA
-#define StrChrI StrChrIA
-#define StrCmp lstrcmpA
-#define StrCmpI lstrcmpiA
-#define StrCmpNI StrCmpNIA
-#define StrCmpN StrCmpNA
-#define StrCpyN lstrcpynA
-#define StrCpy lstrcpyA
-#define StrCSpnI StrCSpnIA
-#define StrCSpn StrCSpnA
-#define StrDup StrDupA
-#define StrFormatByteSize StrFormatByteSizeA
-#define StrFormatKBSize StrFormatKBSizeA
-#define StrFromTimeInterval StrFromTimeIntervalA
-#define StrIsIntlEqual StrIsIntlEqualA
-#define StrNCat StrNCatA
-#define StrPBrk StrPBrkA
-#define StrRChr StrRChrA
-#define StrRChrI StrRChrIA
-#ifndef _OBJC_NO_COM
-#define StrRetToBuf StrRetToBufA
-#define StrRetToStr StrRetToStrA
-#endif
-#define StrRStrI StrRStrIA
-#define StrSpn StrSpnA
-#define StrStrI StrStrIA
-#define StrStr StrStrA
-#define StrToInt StrToIntA
-#define StrToIntEx StrToIntExA
-#define StrTrim StrTrimA
-#define PathAddBackslash PathAddBackslashA
-#define PathAddExtension PathAddExtensionA
-#define PathAppend PathAppendA
-#define PathBuildRoot PathBuildRootA
-#define PathCanonicalize PathCanonicalizeA
-#define PathCombine PathCombineA
-#define PathCommonPrefix PathCommonPrefixA
-#define PathCompactPath PathCompactPathA
-#define PathCompactPathEx PathCompactPathExA
-#define PathCreateFromUrl PathCreateFromUrlA
-#define PathFileExists PathFileExistsA
-#define PathFindExtension PathFindExtensionA
-#define PathFindFileName PathFindFileNameA
-#define PathFindNextComponent PathFindNextComponentA
-#define PathFindOnPath PathFindOnPathA
-#define PathFindSuffixArray PathFindSuffixArrayA
-#define PathGetArgs PathGetArgsA
-#define PathGetCharType PathGetCharTypeA
-#define PathGetDriveNumber PathGetDriveNumberA
-#define PathIsContentType PathIsContentTypeA
-#define PathIsDirectoryEmpty PathIsDirectoryEmptyA
-#define PathIsDirectory PathIsDirectoryA
-#define PathIsFileSpec PathIsFileSpecA
-#define PathIsLFNFileSpec PathIsLFNFileSpecA
-#define PathIsNetworkPath PathIsNetworkPathA
-#define PathIsPrefix PathIsPrefixA
-#define PathIsRelative PathIsRelativeA
-#define PathIsRoot PathIsRootA
-#define PathIsSameRoot PathIsSameRootA
-#define PathIsSystemFolder PathIsSystemFolderA
-#define PathIsUNCServerShare PathIsUNCServerShareA
-#define PathIsUNCServer PathIsUNCServerA
-#define PathIsUNC PathIsUNCA
-#define PathIsURL PathIsURLA
-#define PathMakePretty PathMakePrettyA
-#define PathMakeSystemFolder PathMakeSystemFolderA
-#define PathMatchSpec PathMatchSpecA
-#define PathParseIconLocation PathParseIconLocationA
-#define PathQuoteSpaces PathQuoteSpacesA
-#define PathRelativePathTo PathRelativePathToA
-#define PathRemoveArgs PathRemoveArgsA
-#define PathRemoveBackslash PathRemoveBackslashA
-#define PathRemoveBlanks PathRemoveBlanksA
-#define PathRemoveExtension PathRemoveExtensionA
-#define PathRemoveFileSpec PathRemoveFileSpecA
-#define PathRenameExtension PathRenameExtensionA
-#define PathSearchAndQualify PathSearchAndQualifyA
-#define PathSetDlgItemPath PathSetDlgItemPathA
-#define PathSkipRoot PathSkipRootA
-#define PathStripPath PathStripPathA
-#define PathStripToRoot PathStripToRootA
-#define PathUndecorate PathUndecorateA
-#define PathUnExpandEnvStrings PathUnExpandEnvStringsA
-#define PathUnmakeSystemFolder PathUnmakeSystemFolderA
-#define PathUnquoteSpaces PathUnquoteSpacesA
-#ifndef _OBJC_NO_COM
-#define SHCreateStreamOnFile SHCreateStreamOnFileA
-#define SHOpenRegStream SHOpenRegStreamA
-#define SHOpenRegStream2 SHOpenRegStream2A
-#endif
-#define SHCopyKey SHCopyKeyA
-#define SHDeleteEmptyKey SHDeleteEmptyKeyA
-#define SHDeleteKey SHDeleteKeyA
-#define SHEnumKeyEx SHEnumKeyExA
-#define SHQueryInfoKey SHRegQueryInfoKeyA
-#define SHQueryValueEx SHQueryValueExA
-#define SHEnumValue SHEnumValueA
-#define SHGetValue SHGetValueA
-#define SHSetValue SHSetValueA
-#define SHDeleteValue SHDeleteValueA
-#define AssocQueryKey AssocQueryKeyA
-#define AssocQueryStringByKey AssocQueryStringByKeyA
-#define AssocQueryString AssocQueryStringA
-#define UrlApplyScheme UrlApplySchemeA
-#define UrlCanonicalize UrlCanonicalizeA
-#define UrlCombine UrlCombineA
-#define UrlCompare UrlCompareA
-#define UrlCreateFromPath UrlCreateFromPathA
-#define UrlEscape UrlEscapeA
-#define UrlGetLocation UrlGetLocationA
-#define UrlGetPart UrlGetPartA
-#define UrlHash UrlHashA
-#define UrlIs UrlIsA
-#define UrlIsFileUrl UrlIsFileUrl
-#define UrlIsNoHistory UrlIsNoHistoryA
-#define UrlIsOpaque UrlIsOpaqueA
-#define UrlUnescape UrlUnescapeA
-#define UrlUnescapeInPlace UrlUnescapeInPlaceA
-#define SHRegCreateUSKey SHRegCreateUSKeyA
-#define SHRegDeleteEmptyUSKey SHRegDeleteEmptyUSKeyA
-#define SHRegDeleteUSValue SHRegDeleteUSValueA
-#define SHRegEnumUSKey SHRegEnumUSKeyA
-#define SHRegEnumUSValue SHRegEnumUSValueA
-#define SHRegGetBoolUSValue SHRegGetBoolUSValueA
-#define SHRegGetPath SHRegGetPathA
-#define SHRegGetUSValue SHRegGetUSValueA
-#define SHRegOpenUSKey SHRegOpenUSKeyA
-#define SHRegQueryInfoUSKey SHRegQueryInfoUSKeyA
-#define SHRegQueryUSValue SHRegQueryUSValueA
-#define SHRegSetPath SHRegSetPathA
-#define SHRegSetUSValue SHRegSetUSValueA
-#define SHRegWriteUSValue SHRegWriteUSValueA
-#define wnsprintf wnsprintfA
-#define wvnsprintf wvnsprintfA
-#endif /* UNICODE */
-
-#define StrToLong StrToInt
-
-#endif /* !RC_INVOKED */
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* ! defined _SHLWAPI_H */
diff --git a/winsup/w32api/include/snmp.h b/winsup/w32api/include/snmp.h
deleted file mode 100644
index f35a2be..0000000
--- a/winsup/w32api/include/snmp.h
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- snmp.h - Header file for the Windows SNMP API
-
- Written by Filip Navara <xnavara@volny.cz>
-
- References (2003-08-25):
- http://msdn.microsoft.com/library/en-us/snmp/snmp/snmp_reference.asp
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-*/
-
-#ifndef _SNMP_H
-#define _SNMP_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifndef _WINDOWS_H
-#include <windows.h>
-#endif
-
-#include <pshpack4.h>
-
-#ifndef WINSNMPAPI
-#define WINSNMPAPI WINAPI
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define DEFAULT_SNMP_PORT_UDP 161
-#define DEFAULT_SNMP_PORT_IPX 36879
-#define DEFAULT_SNMPTRAP_PORT_UDP 162
-#define DEFAULT_SNMPTRAP_PORT_IPX 36880
-#ifndef _SNMP_ASN_DEFINED
-#define _SNMP_ASN_DEFINED
-#define ASN_UNIVERSAL 0x00
-#define ASN_PRIMITIVE 0x00
-#define ASN_CONSTRUCTOR 0x20
-#define ASN_APPLICATION 0x40
-#define ASN_CONTEXT 0x80
-#define ASN_PRIVATE 0xC0
-#define SNMP_PDU_GET (ASN_CONTEXT | ASN_CONSTRUCTOR | 0)
-#define SNMP_PDU_GETNEXT (ASN_CONTEXT | ASN_CONSTRUCTOR | 1)
-#define SNMP_PDU_RESPONSE (ASN_CONTEXT | ASN_CONSTRUCTOR | 2)
-#define SNMP_PDU_SET (ASN_CONTEXT | ASN_CONSTRUCTOR | 3)
-#define SNMP_PDU_GETBULK (ASN_CONTEXT | ASN_CONSTRUCTOR | 4)
-#define SNMP_PDU_V1TRAP (ASN_CONTEXT | ASN_CONSTRUCTOR | 4)
-#define SNMP_PDU_INFORM (ASN_CONTEXT | ASN_CONSTRUCTOR | 6)
-#define SNMP_PDU_TRAP (ASN_CONTEXT | ASN_CONSTRUCTOR | 7)
-#define SNMP_PDU_REPORT (ASN_CONTEXT | ASN_CONSTRUCTOR | 8)
-#endif /* _SNMP_ASN_DEFINED */
-#define ASN_INTEGER (ASN_UNIVERSAL | ASN_PRIMITIVE | 2)
-#define ASN_BITS (ASN_UNIVERSAL | ASN_PRIMITIVE | 3)
-#define ASN_OCTETSTRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 4)
-#define ASN_NULL (ASN_UNIVERSAL | ASN_PRIMITIVE | 5)
-#define ASN_OBJECTIDENTIFIER (ASN_UNIVERSAL | ASN_PRIMITIVE | 6)
-#define ASN_INTEGER32 ASN_INTEGER
-#define ASN_SEQUENCE (ASN_UNIVERSAL | ASN_CONSTRUCTOR | 0x10)
-#define ASN_SEQUENCEOF ASN_SEQUENCE
-#define ASN_IPADDRESS (ASN_APPLICATION | ASN_PRIMITIVE | 0x00)
-#define ASN_COUNTER32 (ASN_APPLICATION | ASN_PRIMITIVE | 0x01)
-#define ASN_GAUGE32 (ASN_APPLICATION | ASN_PRIMITIVE | 0x02)
-#define ASN_TIMETICKS (ASN_APPLICATION | ASN_PRIMITIVE | 0x03)
-#define ASN_OPAQUE (ASN_APPLICATION | ASN_PRIMITIVE | 0x04)
-#define ASN_COUNTER64 (ASN_APPLICATION | ASN_PRIMITIVE | 0x06)
-#define ASN_UNSIGNED32 (ASN_APPLICATION | ASN_PRIMITIVE | 0x07)
-#define SNMP_EXCEPTION_NOSUCHOBJECT (ASN_CONTEXT | ASN_PRIMITIVE | 0x00)
-#define SNMP_EXCEPTION_NOSUCHINSTANCE (ASN_CONTEXT | ASN_PRIMITIVE | 0x01)
-#define SNMP_EXCEPTION_ENDOFMIBVIEW (ASN_CONTEXT | ASN_PRIMITIVE | 0x02)
-#define SNMP_EXTENSION_GET SNMP_PDU_GET
-#define SNMP_EXTENSION_GET_NEXT SNMP_PDU_GETNEXT
-#define SNMP_EXTENSION_GET_BULK SNMP_PDU_GETBULK
-#define SNMP_EXTENSION_SET_TEST (ASN_PRIVATE | ASN_CONSTRUCTOR | 0x0)
-#define SNMP_EXTENSION_SET_COMMIT SNMP_PDU_SET
-#define SNMP_EXTENSION_SET_UNDO (ASN_PRIVATE | ASN_CONSTRUCTOR | 0x1)
-#define SNMP_EXTENSION_SET_CLEANUP (ASN_PRIVATE | ASN_CONSTRUCTOR | 0x2)
-#define SNMP_ERRORSTATUS_NOERROR 0
-#define SNMP_ERRORSTATUS_TOOBIG 1
-#define SNMP_ERRORSTATUS_NOSUCHNAME 2
-#define SNMP_ERRORSTATUS_BADVALUE 3
-#define SNMP_ERRORSTATUS_READONLY 4
-#define SNMP_ERRORSTATUS_GENERR 5
-#define SNMP_ERRORSTATUS_NOACCESS 6
-#define SNMP_ERRORSTATUS_WRONGTYPE 7
-#define SNMP_ERRORSTATUS_WRONGLENGTH 8
-#define SNMP_ERRORSTATUS_WRONGENCODING 9
-#define SNMP_ERRORSTATUS_WRONGVALUE 10
-#define SNMP_ERRORSTATUS_NOCREATION 11
-#define SNMP_ERRORSTATUS_INCONSISTENTVALUE 12
-#define SNMP_ERRORSTATUS_RESOURCEUNAVAILABLE 13
-#define SNMP_ERRORSTATUS_COMMITFAILED 14
-#define SNMP_ERRORSTATUS_UNDOFAILED 15
-#define SNMP_ERRORSTATUS_AUTHORIZATIONERROR 16
-#define SNMP_ERRORSTATUS_NOTWRITABLE 17
-#define SNMP_ERRORSTATUS_INCONSISTENTNAME 18
-#define SNMP_GENERICTRAP_COLDSTART 0
-#define SNMP_GENERICTRAP_WARMSTART 1
-#define SNMP_GENERICTRAP_LINKDOWN 2
-#define SNMP_GENERICTRAP_LINKUP 3
-#define SNMP_GENERICTRAP_AUTHFAILURE 4
-#define SNMP_GENERICTRAP_EGPNEIGHLOSS 5
-#define SNMP_GENERICTRAP_ENTERSPECIFIC 6
-#define SNMP_ACCESS_NONE 0
-#define SNMP_ACCESS_NOTIFY 1
-#define SNMP_ACCESS_READ_ONLY 2
-#define SNMP_ACCESS_READ_WRITE 3
-#define SNMP_ACCESS_READ_CREATE 4
-#define SNMPAPI_ERROR FALSE
-#define SNMPAPI_NOERROR TRUE
-#define SNMP_LOG_SILENT 0
-#define SNMP_LOG_FATAL 1
-#define SNMP_LOG_ERROR 2
-#define SNMP_LOG_WARNING 3
-#define SNMP_LOG_TRACE 4
-#define SNMP_LOG_VERBOSE 5
-#define SNMP_OUTPUT_TO_CONSOLE 1
-#define SNMP_OUTPUT_TO_LOGFILE 2
-#define SNMP_OUTPUT_TO_EVENTLOG 4
-#define SNMP_OUTPUT_TO_DEBUGGER 8
-#define SNMP_MAX_OID_LEN 128
-#define SNMP_MEM_ALLOC_ERROR 1
-#define SNMP_BERAPI_INVALID_LENGTH 10
-#define SNMP_BERAPI_INVALID_TAG 11
-#define SNMP_BERAPI_OVERFLOW 12
-#define SNMP_BERAPI_SHORT_BUFFER 13
-#define SNMP_BERAPI_INVALID_OBJELEM 14
-#define SNMP_PDUAPI_UNRECOGNIZED_PDU 20
-#define SNMP_PDUAPI_INVALID_ES 21
-#define SNMP_PDUAPI_INVALID_GT 22
-#define SNMP_AUTHAPI_INVALID_VERSION 30
-#define SNMP_AUTHAPI_INVALID_MSG_TYPE 31
-#define SNMP_AUTHAPI_TRIV_AUTH_FAILED 32
-
-#ifndef RC_INVOKED
-
-typedef INT SNMPAPI;
-typedef LONG AsnInteger32;
-typedef ULONG AsnUnsigned32;
-typedef ULARGE_INTEGER AsnCounter64;
-typedef AsnUnsigned32 AsnCounter32;
-typedef AsnUnsigned32 AsnGauge32;
-typedef AsnUnsigned32 AsnTimeticks;
-typedef struct {
- BYTE *stream;
- UINT length;
- BOOL dynamic;
-} AsnOctetString, AsnBits, AsnSequence, AsnImplicitSequence, AsnIPAddress, AsnNetworkAddress, AsnDisplayString, AsnOpaque;
-typedef struct {
- UINT idLength;
- UINT *ids;
-} AsnObjectIdentifier, AsnObjectName;
-typedef struct {
- BYTE asnType;
- union {
- AsnInteger32 number;
- AsnUnsigned32 unsigned32;
- AsnCounter64 counter64;
- AsnOctetString string;
- AsnBits bits;
- AsnObjectIdentifier object;
- AsnSequence sequence;
- AsnIPAddress address;
- AsnCounter32 counter;
- AsnGauge32 gauge;
- AsnTimeticks ticks;
- AsnOpaque arbitrary;
- } asnValue;
-} AsnAny, AsnObjectSyntax;
-typedef struct {
- AsnObjectName name;
- AsnObjectSyntax value;
-} SnmpVarBind;
-typedef struct {
- SnmpVarBind *list;
- UINT len;
-} SnmpVarBindList;
-
-VOID WINSNMPAPI SnmpExtensionClose(void);
-BOOL WINSNMPAPI SnmpExtensionInit(DWORD,HANDLE*,AsnObjectIdentifier*);
-BOOL WINSNMPAPI SnmpExtensionInitEx(AsnObjectIdentifier*);
-BOOL WINSNMPAPI SnmpExtensionMonitor(LPVOID);
-BOOL WINSNMPAPI SnmpExtensionQuery(BYTE,SnmpVarBindList*,AsnInteger32*,AsnInteger32*);
-BOOL WINSNMPAPI SnmpExtensionQueryEx(DWORD,DWORD,SnmpVarBindList*,AsnOctetString*,AsnInteger32*,AsnInteger32*);
-BOOL WINSNMPAPI SnmpExtensionTrap(AsnObjectIdentifier*,AsnInteger32*,AsnInteger32*,AsnTimeticks*,SnmpVarBindList*);
-DWORD WINSNMPAPI SnmpSvcGetUptime(void);
-VOID WINSNMPAPI SnmpSvcSetLogLevel(INT);
-VOID WINSNMPAPI SnmpSvcSetLogType(INT);
-SNMPAPI WINSNMPAPI SnmpUtilAsnAnyCpy(AsnAny*,AsnAny*);
-VOID WINSNMPAPI SnmpUtilAsnAnyFree(AsnAny*);
-VOID WINSNMPAPI SnmpUtilDbgPrint(INT,LPSTR,...);
-LPSTR WINSNMPAPI SnmpUtilIdsToA(UINT*,UINT);
-LPVOID WINSNMPAPI SnmpUtilMemAlloc(UINT);
-VOID WINSNMPAPI SnmpUtilMemFree(LPVOID);
-LPVOID WINSNMPAPI SnmpUtilMemReAlloc(LPVOID,UINT);
-SNMPAPI WINSNMPAPI SnmpUtilOctetsCmp(AsnOctetString*,AsnOctetString*);
-SNMPAPI WINSNMPAPI SnmpUtilOctetsCpy(AsnOctetString*,AsnOctetString*);
-VOID WINSNMPAPI SnmpUtilOctetsFree(AsnOctetString*);
-SNMPAPI WINSNMPAPI SnmpUtilOctetsNCmp(AsnOctetString*,AsnOctetString*,UINT);
-SNMPAPI WINSNMPAPI SnmpUtilOidAppend(AsnObjectIdentifier*,AsnObjectIdentifier*);
-SNMPAPI WINSNMPAPI SnmpUtilOidCmp(AsnObjectIdentifier*,AsnObjectIdentifier*);
-SNMPAPI WINSNMPAPI SnmpUtilOidCpy(AsnObjectIdentifier*,AsnObjectIdentifier*);
-VOID WINSNMPAPI SnmpUtilOidFree(AsnObjectIdentifier*);
-SNMPAPI WINSNMPAPI SnmpUtilOidNCmp(AsnObjectIdentifier*,AsnObjectIdentifier*,UINT);
-LPSTR WINSNMPAPI SnmpUtilOidToA(AsnObjectIdentifier*);
-VOID WINSNMPAPI SnmpUtilPrintAsnAny(AsnAny*);
-VOID WINSNMPAPI SnmpUtilPrintOid(AsnObjectIdentifier*);
-SNMPAPI WINSNMPAPI SnmpUtilVarBindCpy( SnmpVarBind*,SnmpVarBind*);
-SNMPAPI WINSNMPAPI SnmpUtilVarBindListCpy(SnmpVarBindList*,SnmpVarBindList*);
-VOID WINSNMPAPI SnmpUtilVarBindFree(SnmpVarBind*);
-VOID WINSNMPAPI SnmpUtilVarBindListFree(SnmpVarBindList*);
-
-#ifndef SNMPSTRICT
-#define SNMP_malloc SnmpUtilMemAlloc
-#define SNMP_free SnmpUtilMemFree
-#define SNMP_realloc SnmpUtilMemReAlloc
-#define SNMP_DBG_malloc SnmpUtilMemAlloc
-#define SNMP_DBG_free SnmpUtilMemFree
-#define SNMP_DBG_realloc SnmpUtilMemReAlloc
-#define SNMP_oidappend SnmpUtilOidAppend
-#define SNMP_oidcmp SnmpUtilOidCmp
-#define SNMP_oidcpy SnmpUtilOidCpy
-#define SNMP_oidfree SnmpUtilOidFree
-#define SNMP_oidncmp SnmpUtilOidNCmp
-#define SNMP_printany SnmpUtilPrintAsnAny
-#define SNMP_CopyVarBind SnmpUtilVarBindCpy
-#define SNMP_CopyVarBindList SnmpUtilVarBindListCpy
-#define SNMP_FreeVarBind SnmpUtilVarBindFree
-#define SNMP_FreeVarBindList SnmpUtilVarBindListFree
-#define ASN_RFC1155_IPADDRESS ASN_IPADDRESS
-#define ASN_RFC1155_COUNTER ASN_COUNTER32
-#define ASN_RFC1155_GAUGE ASN_GAUGE32
-#define ASN_RFC1155_TIMETICKS ASN_TIMETICKS
-#define ASN_RFC1155_OPAQUE ASN_OPAQUE
-#define ASN_RFC1213_DISPSTRING ASN_OCTETSTRING
-#define ASN_RFC1157_GETREQUEST SNMP_PDU_GET
-#define ASN_RFC1157_GETNEXTREQUEST SNMP_PDU_GETNEXT
-#define ASN_RFC1157_GETRESPONSE SNMP_PDU_RESPONSE
-#define ASN_RFC1157_SETREQUEST SNMP_PDU_SET
-#define ASN_RFC1157_TRAP SNMP_PDU_V1TRAP
-#define ASN_CONTEXTSPECIFIC ASN_CONTEXT
-#define ASN_PRIMATIVE ASN_PRIMITIVE
-#define RFC1157VarBindList SnmpVarBindList
-#define RFC1157VarBind SnmpVarBind
-#define AsnInteger AsnInteger32
-#define AsnCounter AsnCounter32
-#define AsnGauge AsnGauge32
-#endif /* SNMPSTRICT */
-
-#endif /* RC_INVOKED */
-
-#ifdef __cplusplus
-}
-#endif
-#include <poppack.h>
-#endif
diff --git a/winsup/w32api/include/specstrings.h b/winsup/w32api/include/specstrings.h
deleted file mode 100644
index 2d68471..0000000
--- a/winsup/w32api/include/specstrings.h
+++ /dev/null
@@ -1,130 +0,0 @@
-#ifndef _SPECSTRINGS_H
-#define _SPECSTRINGS_H
-
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-/* These are built from primitives in Microsoft's Standard Annotation Language.
- Search for "Header Annotation" on MSDN site for their MS-specific meanings */
-
-/* __in and __out currently conflict with libstdc++, use with caution */
-
-
-#define __bcount(size)
-#define __bcount_opt(size)
-#define __deref_bcount(size)
-#define __deref_bcount_opt(size)
-#define __deref_ecount(size)
-#define __deref_ecount_opt(size)
-#define __deref_in
-#define __deref_in_bcount(size)
-#define __deref_in_bcount_opt(size)
-#define __deref_in_ecount(size)
-#define __deref_in_ecount_opt(size)
-#define __deref_in_opt
-#define __deref_inout
-#define __deref_inout_bcount(size)
-#define __deref_inout_bcount_full(size)
-#define __deref_inout_bcount_full_opt(size)
-#define __deref_inout_bcount_opt(size)
-#define __deref_inout_bcount_part(size,length)
-#define __deref_inout_bcount_part_opt(size,length)
-#define __deref_inout_ecount(size)
-#define __deref_inout_ecount_full(size)
-#define __deref_inout_ecount_full_opt(size)
-#define __deref_inout_ecount_opt(size)
-#define __deref_inout_ecount_part(size,length)
-#define __deref_inout_ecount_part_opt(size,length)
-#define __deref_inout_opt
-#define __deref_opt_bcount(size)
-#define __deref_opt_bcount_opt(size)
-#define __deref_opt_ecount(size)
-#define __deref_opt_ecount_opt(size)
-#define __deref_opt_in
-#define __deref_opt_in_bcount(size)
-#define __deref_opt_in_bcount_opt(size)
-#define __deref_opt_in_ecount(size)
-#define __deref_opt_in_ecount_opt(size)
-#define __deref_opt_in_opt
-#define __deref_opt_inout
-#define __deref_opt_inout_bcount(size)
-#define __deref_opt_inout_bcount_full(size)
-#define __deref_opt_inout_bcount_full_opt(size)
-#define __deref_opt_inout_bcount_opt(size)
-#define __deref_opt_inout_bcount_part(size,length)
-#define __deref_opt_inout_bcount_part_opt(size,length)
-#define __deref_opt_inout_ecount(size)
-#define __deref_opt_inout_ecount_full(size)
-#define __deref_opt_inout_ecount_full_opt(size)
-#define __deref_opt_inout_ecount_opt(size)
-#define __deref_opt_inout_ecount_part(size,length)
-#define __deref_opt_inout_ecount_part_opt(size,length)
-#define __deref_opt_inout_opt
-#define __deref_opt_out
-#define __deref_opt_out_bcount(size)
-#define __deref_opt_out_bcount_full(size)
-#define __deref_opt_out_bcount_full_opt(size)
-#define __deref_opt_out_bcount_opt(size)
-#define __deref_opt_out_bcount_part(size,length)
-#define __deref_opt_out_bcount_part_opt(size,length)
-#define __deref_opt_out_ecount(size)
-#define __deref_opt_out_ecount_full(size)
-#define __deref_opt_out_ecount_full_opt(size)
-#define __deref_opt_out_ecount_opt(size)
-#define __deref_opt_out_ecount_part(size,length)
-#define __deref_opt_out_ecount_part_opt(size,length)
-#define __deref_opt_out_opt
-#define __deref_out
-#define __deref_out_bcount(size)
-#define __deref_out_bcount_full(size)
-#define __deref_out_bcount_full_opt(size)
-#define __deref_out_bcount_opt(size)
-#define __deref_out_bcount_part(size,length)
-#define __deref_out_bcount_part_opt(size,length)
-#define __deref_out_ecount(size)
-#define __deref_out_ecount_full(size)
-#define __deref_out_ecount_full_opt(size)
-#define __deref_out_ecount_opt(size)
-#define __deref_out_ecount_part(size,length)
-#define __deref_out_ecount_part_opt(size,length)
-#define __deref_out_opt
-#define __ecount(size)
-#define __ecount_opt(size)
-#define __in
-#define __in_bcount(size)
-#define __in_bcount_opt(size)
-#define __in_ecount(size)
-#define __in_ecount_opt(size)
-#define __in_opt
-#define __inout
-#define __inout_bcount(size)
-#define __inout_bcount_full(size)
-#define __inout_bcount_full_opt(size)
-#define __inout_bcount_opt(size)
-#define __inout_bcount_part(size,length)
-#define __inout_bcount_part_opt(size,length)
-#define __inout_ecount(size)
-#define __inout_ecount_full(size)
-#define __inout_ecount_full_opt(size)
-#define __inout_ecount_opt(size)
-#define __inout_ecount_part(size,length)
-#define __inout_ecount_part_opt(size,length)
-#define __inout_opt
-#define __out
-#define __out_bcount(size)
-#define __out_bcount_full(size)
-#define __out_bcount_full_opt(size)
-#define __out_bcount_opt(size)
-#define __out_bcount_part(size,length)
-#define __out_bcount_part_opt(size,length)
-#define __out_ecount(size)
-#define __out_ecount_full(size)
-#define __out_ecount_full_opt(size)
-#define __out_ecount_opt(size)
-#define __out_ecount_part(size,length)
-#define __out_ecount_part_opt(size,length)
-#define __out_opt
-
-
-#endif /*_SPECSTRINGS_H */
diff --git a/winsup/w32api/include/sql.h b/winsup/w32api/include/sql.h
deleted file mode 100644
index 2f0391b..0000000
--- a/winsup/w32api/include/sql.h
+++ /dev/null
@@ -1,408 +0,0 @@
-#ifndef _SQL_H
-#define _SQL_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifndef ODBCVER
-#define ODBCVER 0x0351
-#endif
-#include <sqltypes.h>
-#define SQL_ACCESSIBLE_PROCEDURES 20
-#define SQL_ACCESSIBLE_TABLES 19
-#define SQL_ALL_TYPES 0
-#define SQL_ALTER_TABLE 86
-#define SQL_API_SQLALLOCCONNECT 1
-#define SQL_API_SQLALLOCENV 2
-#define SQL_API_SQLALLOCSTMT 3
-#define SQL_API_SQLBINDCOL 4
-#define SQL_API_SQLCANCEL 5
-#define SQL_API_SQLCOLUMNS 40
-#define SQL_API_SQLCONNECT 7
-#define SQL_API_SQLDATASOURCES 57
-#define SQL_API_SQLDESCRIBECOL 8
-#define SQL_API_SQLDISCONNECT 9
-#define SQL_API_SQLERROR 10
-#define SQL_API_SQLEXECDIRECT 11
-#define SQL_API_SQLEXECUTE 12
-#define SQL_API_SQLFETCH 13
-#define SQL_API_SQLFREECONNECT 14
-#define SQL_API_SQLFREEENV 15
-#define SQL_API_SQLFREESTMT 16
-#define SQL_API_SQLGETCONNECTOPTION 42
-#define SQL_API_SQLGETCURSORNAME 17
-#define SQL_API_SQLGETDATA 43
-#define SQL_API_SQLGETFUNCTIONS 44
-#define SQL_API_SQLGETINFO 45
-#define SQL_API_SQLGETSTMTOPTION 46
-#define SQL_API_SQLGETTYPEINFO 47
-#define SQL_API_SQLNUMRESULTCOLS 18
-#define SQL_API_SQLPARAMDATA 48
-#define SQL_API_SQLPREPARE 19
-#define SQL_API_SQLPUTDATA 49
-#define SQL_API_SQLROWCOUNT 20
-#define SQL_API_SQLSETCONNECTOPTION 50
-#define SQL_API_SQLSETCURSORNAME 21
-#define SQL_API_SQLSETPARAM 22
-#define SQL_API_SQLSETSTMTOPTION 51
-#define SQL_API_SQLSPECIALCOLUMNS 52
-#define SQL_API_SQLSTATISTICS 53
-#define SQL_API_SQLTABLES 54
-#define SQL_API_SQLTRANSACT 23
-#define SQL_CB_CLOSE 1
-#define SQL_CB_DELETE 0
-#define SQL_CB_PRESERVE 2
-#define SQL_CHAR 1
-#define SQL_CLOSE 0
-#define SQL_COMMIT 0
-#define SQL_CURSOR_COMMIT_BEHAVIOR 23
-#define SQL_DATA_AT_EXEC (-2)
-#define SQL_DATA_SOURCE_NAME 2
-#define SQL_DATA_SOURCE_READ_ONLY 25
-#define SQL_DBMS_NAME 17
-#define SQL_DBMS_VER 18
-#define SQL_DECIMAL 3
-#define SQL_DEFAULT_TXN_ISOLATION 26
-#define SQL_DOUBLE 8
-#define SQL_DROP 1
-#define SQL_ERROR (-1)
-#define SQL_FD_FETCH_ABSOLUTE 16
-#define SQL_FD_FETCH_FIRST 2
-#define SQL_FD_FETCH_LAST 4
-#define SQL_FD_FETCH_NEXT 1
-#define SQL_FD_FETCH_PRIOR 8
-#define SQL_FD_FETCH_RELATIVE 32
-#define SQL_FETCH_ABSOLUTE 5
-#define SQL_FETCH_DIRECTION 8
-#define SQL_FETCH_FIRST 2
-#define SQL_FETCH_LAST 3
-#define SQL_FETCH_NEXT 1
-#define SQL_FETCH_PRIOR 4
-#define SQL_FETCH_RELATIVE 6
-#define SQL_FLOAT 6
-#define SQL_GD_ANY_COLUMN 1
-#define SQL_GD_ANY_ORDER 2
-#define SQL_GETDATA_EXTENSIONS 81
-#define SQL_IC_LOWER 2
-#define SQL_IC_MIXED 4
-#define SQL_IC_SENSITIVE 3
-#define SQL_IC_UPPER 1
-#define SQL_IDENTIFIER_CASE 28
-#define SQL_IDENTIFIER_QUOTE_CHAR 29
-#define SQL_INDEX_ALL 1
-#define SQL_INDEX_CLUSTERED 1
-#define SQL_INDEX_HASHED 2
-#define SQL_INDEX_OTHER 3
-#define SQL_INDEX_UNIQUE 0
-#define SQL_INTEGER 4
-#define SQL_INTEGRITY 73
-#define SQL_INVALID_HANDLE (-2)
-#define SQL_MAX_CATALOG_NAME_LEN 34
-#define SQL_MAX_COLUMN_NAME_LEN 30
-#define SQL_MAX_COLUMNS_IN_GROUP_BY 97
-#define SQL_MAX_COLUMNS_IN_INDEX 98
-#define SQL_MAX_COLUMNS_IN_ORDER_BY 99
-#define SQL_MAX_COLUMNS_IN_SELECT 100
-#define SQL_MAX_COLUMNS_IN_TABLE 101
-#define SQL_MAX_CURSOR_NAME_LEN 31
-#define SQL_MAX_INDEX_SIZE 102
-#define SQL_MAX_MESSAGE_LENGTH 512
-#define SQL_MAX_ROW_SIZE 104
-#define SQL_MAX_SCHEMA_NAME_LEN 32
-#define SQL_MAX_STATEMENT_LEN 105
-#define SQL_MAX_TABLE_NAME_LEN 35
-#define SQL_MAX_TABLES_IN_SELECT 106
-#define SQL_MAX_USER_NAME_LEN 107
-#define SQL_MAXIMUM_CATALOG_NAME_LENGTH SQL_MAX_CATALOG_NAME_LEN
-#define SQL_MAXIMUM_COLUMN_NAME_LENGTH SQL_MAX_COLUMN_NAME_LEN
-#define SQL_MAXIMUM_COLUMNS_IN_GROUP_BY SQL_MAX_COLUMNS_IN_GROUP_BY
-#define SQL_MAXIMUM_COLUMNS_IN_INDEX SQL_MAX_COLUMNS_IN_INDEX
-#define SQL_MAXIMUM_COLUMNS_IN_ORDER_BY SQL_MAX_COLUMNS_IN_ORDER_BY
-#define SQL_MAXIMUM_COLUMNS_IN_SELECT SQL_MAX_COLUMNS_IN_SELECT
-#define SQL_MAXIMUM_CURSOR_NAME_LENGTH SQL_MAX_CURSOR_NAME_LEN
-#define SQL_MAXIMUM_INDEX_SIZE SQL_MAX_INDEX_SIZE
-#define SQL_MAXIMUM_ROW_SIZE SQL_MAX_ROW_SIZE
-#define SQL_MAXIMUM_SCHEMA_NAME_LENGTH SQL_MAX_SCHEMA_NAME_LEN
-#define SQL_MAXIMUM_STATEMENT_LENGTH SQL_MAX_STATEMENT_LEN
-#define SQL_MAXIMUM_TABLES_IN_SELECT SQL_MAX_TABLES_IN_SELECT
-#define SQL_MAXIMUM_USER_NAME_LENGTH SQL_MAX_USER_NAME_LEN
-#define SQL_NC_HIGH 0
-#define SQL_NC_LOW 1
-#define SQL_NEED_DATA 99
-#define SQL_NO_NULLS 0
-#define SQL_NTS (-3)
-#define SQL_NTSL (-3L)
-#define SQL_NULL_COLLATION 85
-#define SQL_NULL_DATA (-1)
-#define SQL_NULL_HDBC 0
-#define SQL_NULL_HENV 0
-#define SQL_NULL_HSTMT 0
-#define SQL_NULLABLE 1
-#define SQL_NULLABLE_UNKNOWN 2
-#define SQL_NUMERIC 2
-#define SQL_ORDER_BY_COLUMNS_IN_SELECT 90
-#define SQL_PC_PSEUDO 2
-#define SQL_PC_UNKNOWN 0
-#define SQL_REAL 7
-#define SQL_RESET_PARAMS 3
-#define SQL_ROLLBACK 1
-#define SQL_SCCO_LOCK 2
-#define SQL_SCCO_OPT_ROWVER 4
-#define SQL_SCCO_OPT_VALUES 8
-#define SQL_SCCO_READ_ONLY 1
-#define SQL_SCOPE_CURROW 0
-#define SQL_SCOPE_SESSION 2
-#define SQL_SCOPE_TRANSACTION 1
-#define SQL_SCROLL_CONCURRENCY 43
-#define SQL_SEARCH_PATTERN_ESCAPE 14
-#define SQL_SERVER_NAME 13
-#define SQL_SMALLINT 5
-#define SQL_SPECIAL_CHARACTERS 94
-#define SQL_STILL_EXECUTING 2
-#define SQL_SUCCEEDED(rc) (((rc)&(~1))==0)
-#define SQL_SUCCESS 0
-#define SQL_SUCCESS_WITH_INFO 1
-#define SQL_TC_ALL 2
-#define SQL_TC_DDL_COMMIT 3
-#define SQL_TC_DDL_IGNORE 4
-#define SQL_TC_DML 1
-#define SQL_TC_NONE 0
-#define SQL_TRANSACTION_CAPABLE SQL_TXN_CAPABLE
-#define SQL_TRANSACTION_ISOLATION_OPTION SQL_TXN_ISOLATION_OPTION
-#define SQL_TRANSACTION_READ_COMMITTED SQL_TXN_READ_COMMITTED
-#define SQL_TRANSACTION_READ_UNCOMMITTED SQL_TXN_READ_UNCOMMITTED
-#define SQL_TRANSACTION_REPEATABLE_READ SQL_TXN_REPEATABLE_READ
-#define SQL_TRANSACTION_SERIALIZABLE SQL_TXN_SERIALIZABLE
-#define SQL_TXN_CAPABLE 46
-#define SQL_TXN_ISOLATION_OPTION 72
-#define SQL_TXN_READ_COMMITTED 2
-#define SQL_TXN_READ_UNCOMMITTED 1
-#define SQL_TXN_REPEATABLE_READ 4
-#define SQL_TXN_SERIALIZABLE 8
-#define SQL_UNBIND 2
-#define SQL_UNKNOWN_TYPE 0
-#define SQL_USER_NAME 47
-#define SQL_VARCHAR 12
-#if (ODBCVER >= 0x0200)
-#define SQL_AT_ADD_COLUMN 1
-#define SQL_AT_DROP_COLUMN 2
-#endif /* ODBCVER >= 0x0200 */
-#if (ODBCVER >= 0x0201)
-#define SQL_OJ_LEFT 1
-#define SQL_OJ_RIGHT 2
-#define SQL_OJ_FULL 4
-#define SQL_OJ_NESTED 8
-#define SQL_OJ_NOT_ORDERED 16
-#define SQL_OJ_INNER 32
-#define SQL_OJ_ALL_COMPARISON_OPS 64
-#endif /* ODBCVER >= 0x0201 */
-#if (ODBCVER >= 0x0300)
-#define SQL_AM_CONNECTION 1
-#define SQL_AM_NONE 0
-#define SQL_AM_STATEMENT 2
-#define SQL_API_SQLALLOCHANDLE 1001
-#define SQL_API_SQLBINDPARAM 1002
-#define SQL_API_SQLCLOSECURSOR 1003
-#define SQL_API_SQLCOLATTRIBUTE 6
-#define SQL_API_SQLCOPYDESC 1004
-#define SQL_API_SQLENDTRAN 1005
-#define SQL_API_SQLFETCHSCROLL 1021
-#define SQL_API_SQLFREEHANDLE 1006
-#define SQL_API_SQLGETCONNECTATTR 1007
-#define SQL_API_SQLGETDESCFIELD 1008
-#define SQL_API_SQLGETDESCREC 1009
-#define SQL_API_SQLGETDIAGFIELD 1010
-#define SQL_API_SQLGETDIAGREC 1011
-#define SQL_API_SQLGETENVATTR 1012
-#define SQL_API_SQLGETSTMTATTR 1014
-#define SQL_API_SQLSETCONNECTATTR 1016
-#define SQL_API_SQLSETDESCFIELD 1017
-#define SQL_API_SQLSETDESCREC 1018
-#define SQL_API_SQLSETENVATTR 1019
-#define SQL_API_SQLSETSTMTATTR 1020
-#define SQL_ARD_TYPE (-99)
-#define SQL_AT_ADD_CONSTRAINT 8
-#define SQL_ATTR_APP_PARAM_DESC 10011
-#define SQL_ATTR_APP_ROW_DESC 10010
-#define SQL_ATTR_AUTO_IPD 10001
-#define SQL_ATTR_CURSOR_SCROLLABLE (-1)
-#define SQL_ATTR_CURSOR_SENSITIVITY (-2)
-#define SQL_ATTR_IMP_PARAM_DESC 10013
-#define SQL_ATTR_IMP_ROW_DESC 10012
-#define SQL_ATTR_METADATA_ID 10014
-#define SQL_ATTR_OUTPUT_NTS 10001
-#define SQL_CATALOG_NAME 10003
-#define SQL_CODE_DATE 1
-#define SQL_CODE_TIME 2
-#define SQL_CODE_TIMESTAMP 3
-#define SQL_COLLATION_SEQ 10004
-#define SQL_CURSOR_SENSITIVITY 10001
-#define SQL_DATE_LEN 10
-#define SQL_DATETIME 9
-#define SQL_DEFAULT 99
-#define SQL_DESC_ALLOC_AUTO 1
-#define SQL_DESC_ALLOC_TYPE 1099
-#define SQL_DESC_ALLOC_USER 2
-#define SQL_DESC_COUNT 1001
-#define SQL_DESC_DATA_PTR 1010
-#define SQL_DESC_DATETIME_INTERVAL_CODE 1007
-#define SQL_DESC_INDICATOR_PTR 1009
-#define SQL_DESC_LENGTH 1003
-#define SQL_DESC_NAME 1011
-#define SQL_DESC_NULLABLE 1008
-#define SQL_DESC_OCTET_LENGTH 1013
-#define SQL_DESC_OCTET_LENGTH_PTR 1004
-#define SQL_DESC_PRECISION 1005
-#define SQL_DESC_SCALE 1006
-#define SQL_DESC_TYPE 1002
-#define SQL_DESC_UNNAMED 1012
-#define SQL_DESCRIBE_PARAMETER 10002
-#define SQL_DIAG_ALTER_DOMAIN 3
-#define SQL_DIAG_ALTER_TABLE 4
-#define SQL_DIAG_CALL 7
-#define SQL_DIAG_CLASS_ORIGIN 8
-#define SQL_DIAG_CONNECTION_NAME 10
-#define SQL_DIAG_CREATE_ASSERTION 6
-#define SQL_DIAG_CREATE_CHARACTER_SET 8
-#define SQL_DIAG_CREATE_COLLATION 10
-#define SQL_DIAG_CREATE_DOMAIN 23
-#define SQL_DIAG_CREATE_INDEX (-1)
-#define SQL_DIAG_CREATE_SCHEMA 64
-#define SQL_DIAG_CREATE_TABLE 77
-#define SQL_DIAG_CREATE_TRANSLATION 79
-#define SQL_DIAG_CREATE_VIEW 84
-#define SQL_DIAG_DELETE_WHERE 19
-#define SQL_DIAG_DROP_ASSERTION 24
-#define SQL_DIAG_DROP_CHARACTER_SET 25
-#define SQL_DIAG_DROP_COLLATION 26
-#define SQL_DIAG_DROP_DOMAIN 27
-#define SQL_DIAG_DROP_INDEX (-2)
-#define SQL_DIAG_DROP_SCHEMA 31
-#define SQL_DIAG_DROP_TABLE 32
-#define SQL_DIAG_DROP_TRANSLATION 33
-#define SQL_DIAG_DROP_VIEW 36
-#define SQL_DIAG_DYNAMIC_DELETE_CURSOR 38
-#define SQL_DIAG_DYNAMIC_FUNCTION 7
-#define SQL_DIAG_DYNAMIC_FUNCTION_CODE 12
-#define SQL_DIAG_DYNAMIC_UPDATE_CURSOR 81
-#define SQL_DIAG_GRANT 48
-#define SQL_DIAG_INSERT 50
-#define SQL_DIAG_MESSAGE_TEXT 6
-#define SQL_DIAG_NATIVE 5
-#define SQL_DIAG_NUMBER 2
-#define SQL_DIAG_RETURNCODE 1
-#define SQL_DIAG_REVOKE 59
-#define SQL_DIAG_ROW_COUNT 3
-#define SQL_DIAG_SELECT_CURSOR 85
-#define SQL_DIAG_SERVER_NAME 11
-#define SQL_DIAG_SQLSTATE 4
-#define SQL_DIAG_SUBCLASS_ORIGIN 9
-#define SQL_DIAG_UNKNOWN_STATEMENT 0
-#define SQL_DIAG_UPDATE_WHERE 82
-#define SQL_FALSE 0
-#define SQL_HANDLE_DBC 2
-#define SQL_HANDLE_DESC 4
-#define SQL_HANDLE_ENV 1
-#define SQL_HANDLE_STMT 3
-#define SQL_INSENSITIVE 1
-#define SQL_MAX_CONCURRENT_ACTIVITIES 1
-#define SQL_MAX_DRIVER_CONNECTIONS 0
-#define SQL_MAX_IDENTIFIER_LEN 10005
-#define SQL_MAXIMUM_CONCURRENT_ACTIVITIES SQL_MAX_CONCURRENT_ACTIVITIES
-#define SQL_MAXIMUM_DRIVER_CONNECTIONS SQL_MAX_DRIVER_CONNECTIONS
-#define SQL_MAXIMUM_IDENTIFIER_LENGTH SQL_MAX_IDENTIFIER_LEN
-#define SQL_NAMED 0
-#define SQL_NO_DATA 100
-#define SQL_NONSCROLLABLE 0
-#define SQL_NULL_HANDLE 0L
-#define SQL_NULL_HDESC 0
-#define SQL_OJ_CAPABILITIES 115
-#define SQL_OUTER_JOIN_CAPABILITIES SQL_OJ_CAPABILITIES
-#define SQL_PC_NON_PSEUDO 1
-#define SQL_PRED_BASIC 2
-#define SQL_PRED_CHAR 1
-#define SQL_PRED_NONE 0
-#define SQL_ROW_IDENTIFIER 1
-#define SQL_SCROLLABLE 1
-#define SQL_SENSITIVE 2
-#define SQL_TIME_LEN 8
-#define SQL_TIMESTAMP_LEN 19
-#define SQL_TRUE 1
-#define SQL_TYPE_DATE 91
-#define SQL_TYPE_TIME 92
-#define SQL_TYPE_TIMESTAMP 93
-#define SQL_UNNAMED 1
-#define SQL_UNSPECIFIED 0
-#define SQL_XOPEN_CLI_YEAR 10000
-#endif /* ODBCVER >= 0x0300 */
-
-#ifndef RC_INVOKED
-SQLRETURN SQL_API SQLAllocConnect(SQLHENV,SQLHDBC*); /* deprecated */
-SQLRETURN SQL_API SQLAllocEnv(SQLHENV*); /* deprecated */
-SQLRETURN SQL_API SQLAllocStmt(SQLHDBC,SQLHSTMT*); /* deprecated */
-SQLRETURN SQL_API SQLBindCol(SQLHSTMT,SQLUSMALLINT,SQLSMALLINT,SQLPOINTER,SQLLEN,SQLLEN*);
-SQLRETURN SQL_API SQLCancel(SQLHSTMT);
-SQLRETURN SQL_API SQLConnect(SQLHDBC,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLDescribeCol(SQLHSTMT,SQLUSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLSMALLINT*,SQLULEN*,SQLSMALLINT*,SQLSMALLINT*);
-SQLRETURN SQL_API SQLDisconnect(SQLHDBC);
-SQLRETURN SQL_API SQLError(SQLHENV,SQLHDBC,SQLHSTMT,SQLCHAR*,SQLINTEGER*,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*); /* deprecated */
-SQLRETURN SQL_API SQLExecDirect(SQLHSTMT,SQLCHAR*,SQLINTEGER);
-SQLRETURN SQL_API SQLExecute(SQLHSTMT);
-SQLRETURN SQL_API SQLFetch(SQLHSTMT);
-SQLRETURN SQL_API SQLFreeConnect(SQLHDBC); /* deprecated */
-SQLRETURN SQL_API SQLFreeEnv(SQLHENV); /* deprecated */
-SQLRETURN SQL_API SQLFreeStmt(SQLHSTMT,SQLUSMALLINT);
-SQLRETURN SQL_API SQLGetCursorName(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLNumResultCols(SQLHSTMT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLPrepare(SQLHSTMT,SQLCHAR*,SQLINTEGER);
-SQLRETURN SQL_API SQLRowCount(SQLHSTMT,SQLLEN*);
-SQLRETURN SQL_API SQLSetCursorName(SQLHSTMT,SQLCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLTransact(SQLHENV,SQLHDBC,SQLUSMALLINT);
-SQLRETURN SQL_API SQLSetParam(SQLHSTMT,SQLUSMALLINT,SQLSMALLINT,SQLSMALLINT,SQLULEN,SQLSMALLINT,SQLPOINTER,SQLLEN*); /* deprecated */
-SQLRETURN SQL_API SQLColumns(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLGetConnectOption(SQLHDBC,SQLUSMALLINT,SQLPOINTER); /* deprecated */
-SQLRETURN SQL_API SQLGetData(SQLHSTMT,SQLUSMALLINT,SQLSMALLINT,SQLPOINTER,SQLLEN,SQLLEN*);
-SQLRETURN SQL_API SQLGetFunctions(SQLHDBC,SQLUSMALLINT,SQLUSMALLINT*);
-SQLRETURN SQL_API SQLGetInfo(SQLHDBC,SQLUSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLGetStmtOption(SQLHSTMT,SQLUSMALLINT,SQLPOINTER); /* deprecated */
-SQLRETURN SQL_API SQLGetTypeInfo(SQLHSTMT,SQLSMALLINT);
-SQLRETURN SQL_API SQLParamData(SQLHSTMT,SQLPOINTER*);
-SQLRETURN SQL_API SQLPutData(SQLHSTMT,SQLPOINTER,SQLLEN);
-SQLRETURN SQL_API SQLSetConnectOption(SQLHDBC,SQLUSMALLINT,SQLULEN); /* deprecated */
-SQLRETURN SQL_API SQLSetStmtOption(SQLHSTMT,SQLUSMALLINT,SQLROWCOUNT); /* deprecated */
-SQLRETURN SQL_API SQLSpecialColumns(SQLHSTMT,SQLUSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLUSMALLINT,SQLUSMALLINT);
-SQLRETURN SQL_API SQLStatistics(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLUSMALLINT,SQLUSMALLINT);
-SQLRETURN SQL_API SQLTables(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLDataSources(SQLHENV,SQLUSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*);
-#if (ODBCVER >= 0x0300)
-SQLRETURN SQL_API SQLAllocHandle(SQLSMALLINT,SQLHANDLE,SQLHANDLE*);
-SQLRETURN SQL_API SQLBindParam(SQLHSTMT,SQLUSMALLINT,SQLSMALLINT,SQLSMALLINT,SQLULEN,SQLSMALLINT,SQLPOINTER,SQLLEN*);
-SQLRETURN SQL_API SQLCloseCursor(SQLHSTMT);
-SQLRETURN SQL_API SQLColAttribute(SQLHSTMT,SQLUSMALLINT,SQLUSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*,SQLPOINTER);
-SQLRETURN SQL_API SQLCopyDesc(SQLHDESC,SQLHDESC);
-SQLRETURN SQL_API SQLEndTran(SQLSMALLINT,SQLHANDLE,SQLSMALLINT);
-SQLRETURN SQL_API SQLFetchScroll(SQLHSTMT,SQLSMALLINT,SQLROWOFFSET);
-SQLRETURN SQL_API SQLFreeHandle(SQLSMALLINT,SQLHANDLE);
-SQLRETURN SQL_API SQLGetConnectAttr(SQLHDBC,SQLINTEGER,SQLPOINTER,SQLINTEGER,SQLINTEGER*);
-SQLRETURN SQL_API SQLGetDescField(SQLHDESC,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLINTEGER,SQLINTEGER*);
-SQLRETURN SQL_API SQLGetDescRec(SQLHDESC,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*,
- SQLSMALLINT*,SQLSMALLINT*,SQLLEN*,SQLSMALLINT*,SQLSMALLINT*,SQLSMALLINT*);
-SQLRETURN SQL_API SQLGetDiagField(SQLSMALLINT,SQLHANDLE,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLGetDiagRec(SQLSMALLINT,SQLHANDLE,SQLSMALLINT,SQLCHAR*,SQLINTEGER*,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLGetEnvAttr(SQLHENV,SQLINTEGER,SQLPOINTER,SQLINTEGER,SQLINTEGER*);
-SQLRETURN SQL_API SQLGetStmtAttr(SQLHSTMT,SQLINTEGER,SQLPOINTER,SQLINTEGER,SQLINTEGER*);
-SQLRETURN SQL_API SQLSetConnectAttr(SQLHDBC,SQLINTEGER,SQLPOINTER,SQLINTEGER);
-SQLRETURN SQL_API SQLSetDescField(SQLHDESC,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLINTEGER);
-SQLRETURN SQL_API SQLSetDescRec(SQLHDESC,SQLSMALLINT,SQLSMALLINT,SQLSMALLINT,SQLLEN,SQLSMALLINT,
- SQLSMALLINT,SQLPOINTER,SQLLEN*,SQLLEN*);
-SQLRETURN SQL_API SQLSetEnvAttr(SQLHENV,SQLINTEGER,SQLPOINTER,SQLINTEGER);
-SQLRETURN SQL_API SQLSetStmtAttr(SQLHSTMT,SQLINTEGER,SQLPOINTER,SQLINTEGER);
-#endif /* (ODBCVER >= 0x0300) */
-#endif /* ndef RC_INVOKED */
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/sqlext.h b/winsup/w32api/include/sqlext.h
deleted file mode 100644
index 9702b1b..0000000
--- a/winsup/w32api/include/sqlext.h
+++ /dev/null
@@ -1,1218 +0,0 @@
-#ifndef _SQLEXT_H
-#define _SQLEXT_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#include <sql.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define SQL_SPEC_MAJOR 3
-#define SQL_SPEC_MINOR 51
-#define SQL_SPEC_STRING "03.51"
-#define SQL_ACCESS_MODE 101
-#define SQL_ACTIVE_CONNECTIONS 0
-#define SQL_ACTIVE_STATEMENTS 1
-#define SQL_ADD 4
-#define SQL_ALL_EXCEPT_LIKE 2
-#define SQL_API_ALL_FUNCTIONS 0
-#define SQL_API_LOADBYORDINAL 199
-#define SQL_API_SQLBINDPARAMETER 72
-#define SQL_API_SQLBROWSECONNECT 55
-#define SQL_API_SQLCOLATTRIBUTES 6
-#define SQL_API_SQLCOLUMNPRIVILEGES 56
-#define SQL_API_SQLDESCRIBEPARAM 58
-#define SQL_API_SQLDRIVERCONNECT 41
-#define SQL_API_SQLDRIVERS 71
-#define SQL_API_SQLEXTENDEDFETCH 59
-#define SQL_API_SQLFOREIGNKEYS 60
-#define SQL_API_SQLMORERESULTS 61
-#define SQL_API_SQLNATIVESQL 62
-#define SQL_API_SQLNUMPARAMS 63
-#define SQL_API_SQLPARAMOPTIONS 64
-#define SQL_API_SQLPRIMARYKEYS 65
-#define SQL_API_SQLPROCEDURECOLUMNS 66
-#define SQL_API_SQLPROCEDURES 67
-#define SQL_API_SQLSETPOS 68
-#define SQL_API_SQLSETSCROLLOPTIONS 69
-#define SQL_API_SQLTABLEPRIVILEGES 70
-#define SQL_ASYNC_ENABLE 4
-#define SQL_ASYNC_ENABLE_DEFAULT SQL_ASYNC_ENABLE_OFF
-#define SQL_ASYNC_ENABLE_OFF 0UL
-#define SQL_ASYNC_ENABLE_ON 1UL
-#define SQL_ATTR_CONNECTION_DEAD 1209
-#define SQL_ATTR_READONLY 0
-#define SQL_ATTR_READWRITE_UNKNOWN 2
-#define SQL_ATTR_WRITE 1
-#define SQL_AUTOCOMMIT 102
-#define SQL_AUTOCOMMIT_DEFAULT SQL_AUTOCOMMIT_ON
-#define SQL_AUTOCOMMIT_OFF 0UL
-#define SQL_AUTOCOMMIT_ON 1UL
-#define SQL_BEST_ROWID 1
-#define SQL_BIGINT (-5)
-#define SQL_BINARY (-2)
-#define SQL_BIND_BY_COLUMN 0UL
-#define SQL_BIND_TYPE 5
-#define SQL_BIND_TYPE_DEFAULT SQL_BIND_BY_COLUMN
-#define SQL_BIT (-7)
-#define SQL_BOOKMARK_PERSISTENCE 82
-#define SQL_BP_CLOSE 1
-#define SQL_BP_DELETE 2
-#define SQL_BP_DROP 4
-#define SQL_BP_OTHER_HSTMT 32
-#define SQL_BP_SCROLL 64
-#define SQL_BP_TRANSACTION 8
-#define SQL_BP_UPDATE 16
-#define SQL_C_BINARY SQL_BINARY
-#define SQL_C_BIT SQL_BIT
-#define SQL_C_BOOKMARK SQL_C_ULONG
-#define SQL_C_CHAR SQL_CHAR
-#define SQL_C_DATE SQL_DATE
-#define SQL_C_DEFAULT 99
-#define SQL_C_DOUBLE SQL_DOUBLE
-#define SQL_C_FLOAT SQL_REAL
-#define SQL_C_LONG SQL_INTEGER
-#define SQL_C_SHORT SQL_SMALLINT
-#define SQL_C_SLONG (SQL_C_LONG+SQL_SIGNED_OFFSET)
-#define SQL_C_SSHORT (SQL_C_SHORT+SQL_SIGNED_OFFSET)
-#define SQL_C_STINYINT (SQL_TINYINT+SQL_SIGNED_OFFSET)
-#define SQL_C_TIME SQL_TIME
-#define SQL_C_TIMESTAMP SQL_TIMESTAMP
-#define SQL_C_TINYINT SQL_TINYINT
-#define SQL_C_ULONG (SQL_C_LONG+SQL_UNSIGNED_OFFSET)
-#define SQL_C_USHORT (SQL_C_SHORT+SQL_UNSIGNED_OFFSET)
-#define SQL_C_UTINYINT (SQL_TINYINT+SQL_UNSIGNED_OFFSET)
-#define SQL_CASCADE 0
-#define SQL_CB_NON_NULL 1
-#define SQL_CB_NULL 0
-#define SQL_CC_CLOSE SQL_CB_CLOSE /* deprecated */
-#define SQL_CC_DELETE SQL_CB_DELETE /* deprecated */
-#define SQL_CC_PRESERVE SQL_CB_PRESERVE /* deprecated */
-#define SQL_CD_FALSE 0L
-#define SQL_CD_TRUE 1L
-#define SQL_CN_ANY 2
-#define SQL_CN_DIFFERENT 1
-#define SQL_CN_NONE 0
-#define SQL_COLATT_OPT_MAX SQL_COLUMN_LABEL
-#define SQL_COLATT_OPT_MIN SQL_COLUMN_COUNT
-#define SQL_COLUMN_ALIAS 87
-#define SQL_COLUMN_AUTO_INCREMENT 11
-#define SQL_COLUMN_CASE_SENSITIVE 12
-#define SQL_COLUMN_COUNT 0
-#define SQL_COLUMN_DISPLAY_SIZE 6
-#define SQL_COLUMN_LABEL 18
-#define SQL_COLUMN_LENGTH 3
-#define SQL_COLUMN_MONEY 9
-#define SQL_COLUMN_NAME 1
-#define SQL_COLUMN_NULLABLE 7
-#define SQL_COLUMN_OWNER_NAME 16
-#define SQL_COLUMN_PRECISION 4
-#define SQL_COLUMN_QUALIFIER_NAME 17
-#define SQL_COLUMN_SCALE 5
-#define SQL_COLUMN_SEARCHABLE 13
-#define SQL_COLUMN_TABLE_NAME 15
-#define SQL_COLUMN_TYPE 2
-#define SQL_COLUMN_TYPE_NAME 14
-#define SQL_COLUMN_UNSIGNED 8
-#define SQL_COLUMN_UPDATABLE 10
-#define SQL_CONCAT_NULL_BEHAVIOR 22
-#define SQL_CONCUR_DEFAULT SQL_CONCUR_READ_ONLY
-#define SQL_CONCUR_LOCK 2
-#define SQL_CONCUR_READ_ONLY 1
-#define SQL_CONCUR_ROWVER 3
-#define SQL_CONCUR_TIMESTAMP SQL_CONCUR_ROWVER /* deprecated */
-#define SQL_CONCUR_VALUES 4
-#define SQL_CONCURRENCY 7
-#define SQL_CONVERT_BIGINT 53
-#define SQL_CONVERT_BINARY 54
-#define SQL_CONVERT_BIT 55
-#define SQL_CONVERT_CHAR 56
-#define SQL_CONVERT_DATE 57
-#define SQL_CONVERT_DECIMAL 58
-#define SQL_CONVERT_DOUBLE 59
-#define SQL_CONVERT_FLOAT 60
-#define SQL_CONVERT_FUNCTIONS 48
-#define SQL_CONVERT_INTEGER 61
-#define SQL_CONVERT_LONGVARBINARY 71
-#define SQL_CONVERT_LONGVARCHAR 62
-#define SQL_CONVERT_NUMERIC 63
-#define SQL_CONVERT_REAL 64
-#define SQL_CONVERT_SMALLINT 65
-#define SQL_CONVERT_TIME 66
-#define SQL_CONVERT_TIMESTAMP 67
-#define SQL_CONVERT_TINYINT 68
-#define SQL_CONVERT_VARBINARY 69
-#define SQL_CONVERT_VARCHAR 70
-#define SQL_CORRELATION_NAME 74
-#define SQL_CR_CLOSE SQL_CB_CLOSE /* deprecated */
-#define SQL_CR_DELETE SQL_CB_DELETE /* deprecated */
-#define SQL_CR_PRESERVE SQL_CB_PRESERVE /* deprecated */
-#define SQL_CUR_DEFAULT SQL_CUR_USE_DRIVER
-#define SQL_CUR_USE_DRIVER 2UL
-#define SQL_CUR_USE_IF_NEEDED 0UL
-#define SQL_CUR_USE_ODBC 1UL
-#define SQL_CURRENT_QUALIFIER 109
-#define SQL_CURSOR_DYNAMIC 2UL
-#define SQL_CURSOR_FORWARD_ONLY 0UL
-#define SQL_CURSOR_KEYSET_DRIVEN 1UL
-#define SQL_CURSOR_ROLLBACK_BEHAVIOR 24
-#define SQL_CURSOR_STATIC 3UL
-#define SQL_CURSOR_TYPE 6
-#define SQL_CURSOR_TYPE_DEFAULT SQL_CURSOR_FORWARD_ONLY
-#define SQL_CV_CASCADED 0x00000004L
-#define SQL_CV_CHECK_OPTION 0x00000002L
-#define SQL_CV_CREATE_VIEW 0x00000001L
-#define SQL_CV_LOCAL 0x00000008L
-#define SQL_CVT_BIGINT 0x00004000L
-#define SQL_CVT_BINARY 0x00000400L
-#define SQL_CVT_BIT 0x00001000L
-#define SQL_CVT_CHAR 0x00000001L
-#define SQL_CVT_DATE 0x00008000L
-#define SQL_CVT_DECIMAL 0x00000004L
-#define SQL_CVT_DOUBLE 0x00000080L
-#define SQL_CVT_FLOAT 0x00000020L
-#define SQL_CVT_INTEGER 0x00000008L
-#define SQL_CVT_LONGVARBINARY 0x00040000L
-#define SQL_CVT_LONGVARCHAR 0x00000200L
-#define SQL_CVT_NUMERIC 0x00000002L
-#define SQL_CVT_REAL 0x00000040L
-#define SQL_CVT_SMALLINT 0x00000010L
-#define SQL_CVT_TIME 0x00010000L
-#define SQL_CVT_TIMESTAMP 0x00020000L
-#define SQL_CVT_TINYINT 0x00002000L
-#define SQL_CVT_VARBINARY 0x00000800L
-#define SQL_CVT_VARCHAR 0x00000100L
-#define SQL_DATABASE_NAME 16 /* deprecated */
-#define SQL_DATE 9
-#define SQL_DEFAULT_PARAM (-5)
-#define SQL_DELETE 3
-#define SQL_DRIVER_COMPLETE 1
-#define SQL_DRIVER_COMPLETE_REQUIRED 3
-#define SQL_DRIVER_HDBC 3
-#define SQL_DRIVER_HENV 4
-#define SQL_DRIVER_HLIB 76
-#define SQL_DRIVER_HSTMT 5
-#define SQL_DRIVER_NAME 6
-#define SQL_DRIVER_NOPROMPT 0
-#define SQL_DRIVER_ODBC_VER 77
-#define SQL_DRIVER_PROMPT 2
-#define SQL_DRIVER_VER 7
-#define SQL_DTC_ENLIST_EXPENSIVE 1
-#define SQL_DTC_TRANSITION_COST 1750
-#define SQL_DTC_UNENLIST_EXPENSIVE 2
-#define SQL_ENSURE 1
-#define SQL_ENTIRE_ROWSET 0
-#define SQL_EXPRESSIONS_IN_ORDERBY 27
-#define SQL_FD_FETCH_BOOKMARK 128
-#define SQL_FD_FETCH_PREV SQL_FD_FETCH_PRIOR /* deprecated */
-#define SQL_FD_FETCH_RESUME 64
-#define SQL_FETCH_BOOKMARK 8
-#define SQL_FETCH_PREV SQL_FETCH_PRIOR /* deprecated */
-#define SQL_FETCH_RESUME 7 /* deprecated */
-#define SQL_FILE_CATALOG SQL_FILE_QUALIFIER
-#define SQL_FILE_NOT_SUPPORTED 0x0000
-#define SQL_FILE_QUALIFIER 0x0002
-#define SQL_FILE_TABLE 0x0001
-#define SQL_FILE_USAGE 84
-#define SQL_FN_CVT_CONVERT 0x00000001L
-#define SQL_FN_NUM_ABS 0x00000001L
-#define SQL_FN_NUM_ACOS 0x00000002L
-#define SQL_FN_NUM_ASIN 0x00000004L
-#define SQL_FN_NUM_ATAN 0x00000008L
-#define SQL_FN_NUM_ATAN2 0x00000010L
-#define SQL_FN_NUM_CEILING 0x00000020L
-#define SQL_FN_NUM_COS 0x00000040L
-#define SQL_FN_NUM_COT 0x00000080L
-#define SQL_FN_NUM_DEGREES 0x00040000L
-#define SQL_FN_NUM_EXP 0x00000100L
-#define SQL_FN_NUM_FLOOR 0x00000200L
-#define SQL_FN_NUM_LOG 0x00000400L
-#define SQL_FN_NUM_LOG10 0x00080000L
-#define SQL_FN_NUM_MOD 0x00000800L
-#define SQL_FN_NUM_PI 0x00010000L
-#define SQL_FN_NUM_POWER 0x00100000L
-#define SQL_FN_NUM_RADIANS 0x00200000L
-#define SQL_FN_NUM_RAND 0x00020000L
-#define SQL_FN_NUM_ROUND 0x00400000L
-#define SQL_FN_NUM_SIGN 0x00001000L
-#define SQL_FN_NUM_SIN 0x00002000L
-#define SQL_FN_NUM_SQRT 0x00004000L
-#define SQL_FN_NUM_TAN 0x00008000L
-#define SQL_FN_NUM_TRUNCATE 0x00800000L
-#define SQL_FN_STR_ASCII 0x00002000L
-#define SQL_FN_STR_CHAR 0x00004000L
-#define SQL_FN_STR_CONCAT 0x00000001L
-#define SQL_FN_STR_DIFFERENCE 0x00008000L
-#define SQL_FN_STR_INSERT 0x00000002L
-#define SQL_FN_STR_LCASE 0x00000040L
-#define SQL_FN_STR_LEFT 0x00000004L
-#define SQL_FN_STR_LENGTH 0x00000010L
-#define SQL_FN_STR_LOCATE 0x00000020L
-#define SQL_FN_STR_LOCATE_2 0x00010000L
-#define SQL_FN_STR_LTRIM 0x00000008L
-#define SQL_FN_STR_REPEAT 0x00000080L
-#define SQL_FN_STR_REPLACE 0x00000100L
-#define SQL_FN_STR_RIGHT 0x00000200L
-#define SQL_FN_STR_RTRIM 0x00000400L
-#define SQL_FN_STR_SOUNDEX 0x00020000L
-#define SQL_FN_STR_SPACE 0x00040000L
-#define SQL_FN_STR_SUBSTRING 0x00000800L
-#define SQL_FN_STR_UCASE 0x00001000L
-#define SQL_FN_SYS_DBNAME 0x00000002L
-#define SQL_FN_SYS_IFNULL 0x00000004L
-#define SQL_FN_SYS_USERNAME 0x00000001L
-#define SQL_FN_TD_CURDATE 0x00000002L
-#define SQL_FN_TD_CURTIME 0x00000200L
-#define SQL_FN_TD_DAYNAME 0x00008000L
-#define SQL_FN_TD_DAYOFMONTH 0x00000004L
-#define SQL_FN_TD_DAYOFWEEK 0x00000008L
-#define SQL_FN_TD_DAYOFYEAR 0x00000010L
-#define SQL_FN_TD_HOUR 0x00000400L
-#define SQL_FN_TD_MINUTE 0x00000800L
-#define SQL_FN_TD_MONTH 0x00000020L
-#define SQL_FN_TD_MONTHNAME 0x00010000L
-#define SQL_FN_TD_NOW 0x00000001L
-#define SQL_FN_TD_QUARTER 0x00000040L
-#define SQL_FN_TD_SECOND 0x00001000L
-#define SQL_FN_TD_TIMESTAMPADD 0x00002000L
-#define SQL_FN_TD_TIMESTAMPDIFF 0x00004000L
-#define SQL_FN_TD_WEEK 0x00000080L
-#define SQL_FN_TD_YEAR 0x00000100L
-#define SQL_FN_TSI_DAY 0x00000010L
-#define SQL_FN_TSI_FRAC_SECOND 0x00000001L
-#define SQL_FN_TSI_HOUR 0x00000008L
-#define SQL_FN_TSI_MINUTE 0x00000004L
-#define SQL_FN_TSI_MONTH 0x00000040L
-#define SQL_FN_TSI_QUARTER 0x00000080L
-#define SQL_FN_TSI_SECOND 0x00000002L
-#define SQL_FN_TSI_WEEK 0x00000020L
-#define SQL_FN_TSI_YEAR 0x00000100L
-#define SQL_GB_GROUP_BY_CONTAINS_SELECT 2
-#define SQL_GB_GROUP_BY_EQUALS_SELECT 1
-#define SQL_GB_NO_RELATION 3
-#define SQL_GB_NOT_SUPPORTED 0
-#define SQL_GD_BLOCK 4
-#define SQL_GD_BOUND 8
-#define SQL_GET_BOOKMARK 13
-#define SQL_GROUP_BY 88
-#define SQL_IGNORE (-6)
-#define SQL_INFO_FIRST 0
-#define SQL_KEYSET_SIZE 8
-#define SQL_KEYSET_SIZE_DEFAULT 0UL
-#define SQL_KEYWORDS 89
-#define SQL_LCK_EXCLUSIVE 2
-#define SQL_LCK_NO_CHANGE 1
-#define SQL_LCK_UNLOCK 4
-#define SQL_LEN_BINARY_ATTR(length) (-(length)+SQL_LEN_BINARY_ATTR_OFFSET)
-#define SQL_LEN_BINARY_ATTR_OFFSET (-100)
-#define SQL_LEN_DATA_AT_EXEC(length) (-(length)+SQL_LEN_DATA_AT_EXEC_OFFSET)
-#define SQL_LEN_DATA_AT_EXEC_OFFSET (-100)
-#define SQL_LIKE_ESCAPE_CLAUSE 113
-#define SQL_LIKE_ONLY 1
-#define SQL_LOCK_EXCLUSIVE 1
-#define SQL_LOCK_NO_CHANGE 0
-#define SQL_LOCK_TYPES 78
-#define SQL_LOCK_UNLOCK 2
-#define SQL_LOGIN_TIMEOUT 103
-#define SQL_LOGIN_TIMEOUT_DEFAULT 15UL
-#define SQL_LONGVARBINARY (-4)
-#define SQL_LONGVARCHAR (-1)
-#define SQL_MAX_BINARY_LITERAL_LEN 112
-#define SQL_MAX_CHAR_LITERAL_LEN 108
-#define SQL_MAX_DSN_LENGTH 32
-#define SQL_MAX_LENGTH 3
-#define SQL_MAX_LENGTH_DEFAULT 0UL
-#define SQL_MAX_OPTION_STRING_LENGTH 256
-#define SQL_MAX_OWNER_NAME_LEN 32
-#define SQL_MAX_PROCEDURE_NAME_LEN 33
-#define SQL_MAX_QUALIFIER_NAME_LEN 34
-#define SQL_MAX_ROW_SIZE_INCLUDES_LONG 103
-#define SQL_MAX_ROWS 1
-#define SQL_MAX_ROWS_DEFAULT 0UL
-#define SQL_MODE_DEFAULT SQL_MODE_READ_WRITE
-#define SQL_MODE_READ_ONLY 1UL
-#define SQL_MODE_READ_WRITE 0UL
-#define SQL_MULT_RESULT_SETS 36
-#define SQL_MULTIPLE_ACTIVE_TXN 37
-#define SQL_NC_END 0x0004
-#define SQL_NC_START 0x0002
-#define SQL_NEED_LONG_DATA_LEN 111
-#define SQL_NNC_NON_NULL 0x0001
-#define SQL_NNC_NULL 0x0000
-#define SQL_NO_TOTAL (-4)
-#define SQL_NON_NULLABLE_COLUMNS 75
-#define SQL_NOSCAN 2
-#define SQL_NOSCAN_DEFAULT SQL_NOSCAN_OFF
-#define SQL_NOSCAN_OFF 0UL
-#define SQL_NOSCAN_ON 1UL
-#define SQL_NUMERIC_FUNCTIONS 49
-#define SQL_OAC_LEVEL1 0x0001
-#define SQL_OAC_LEVEL2 0x0002
-#define SQL_OAC_NONE 0x0000
-#define SQL_ODBC_API_CONFORMANCE 9
-#define SQL_ODBC_CURSORS 110
-#define SQL_ODBC_SAG_CLI_CONFORMANCE 12
-#define SQL_ODBC_SQL_CONFORMANCE 15
-#define SQL_ODBC_SQL_OPT_IEF 73
-#define SQL_ODBC_VER 10
-#define SQL_OPT_TRACE 104
-#define SQL_OPT_TRACE_DEFAULT SQL_OPT_TRACE_OFF
-#define SQL_OPT_TRACE_FILE_DEFAULT "\\SQL.LOG"
-#define SQL_OPT_TRACE_OFF 0UL
-#define SQL_OPT_TRACE_ON 1UL
-#define SQL_OPT_TRACEFILE 105
-#define SQL_OSC_CORE 1
-#define SQL_OSC_EXTENDED 2
-#define SQL_OSC_MINIMUM 0
-#define SQL_OSCC_COMPLIANT 1
-#define SQL_OSCC_NOT_COMPLIANT 0
-#define SQL_OU_DML_STATEMENTS 1
-#define SQL_OU_INDEX_DEFINITION 8
-#define SQL_OU_PRIVILEGE_DEFINITION 16
-#define SQL_OU_PROCEDURE_INVOCATION 2
-#define SQL_OU_TABLE_DEFINITION 4
-#define SQL_OUTER_JOINS 38
-#define SQL_OWNER_TERM 39
-#define SQL_OWNER_USAGE 91
-#define SQL_PACKET_SIZE 112
-#define SQL_PARAM_INPUT 1
-#define SQL_PARAM_INPUT_OUTPUT 2
-#define SQL_PARAM_OUTPUT 4
-#define SQL_PARAM_TYPE_DEFAULT SQL_PARAM_INPUT_OUTPUT
-#define SQL_PARAM_TYPE_UNKNOWN 0
-#define SQL_PC_NOT_PSEUDO 1
-#define SQL_POS_ADD 16
-#define SQL_POS_DELETE 8
-#define SQL_POS_OPERATIONS 79
-#define SQL_POS_POSITION 1
-#define SQL_POS_REFRESH 2
-#define SQL_POS_UPDATE 4
-#define SQL_POSITION 0
-#define SQL_POSITIONED_STATEMENTS 80
-#define SQL_PRED_SEARCHABLE SQL_SEARCHABLE
-#define SQL_PROCEDURE_TERM 40
-#define SQL_PROCEDURES 21
-#define SQL_PS_POSITIONED_DELETE 1
-#define SQL_PS_POSITIONED_UPDATE 2
-#define SQL_PS_SELECT_FOR_UPDATE 4
-#define SQL_PT_FUNCTION 2
-#define SQL_PT_PROCEDURE 1
-#define SQL_PT_UNKNOWN 0
-#define SQL_QL_END 0x0002
-#define SQL_QL_START 0x0001
-#define SQL_QU_DML_STATEMENTS 1
-#define SQL_QU_INDEX_DEFINITION 8
-#define SQL_QU_PRIVILEGE_DEFINITION 16
-#define SQL_QU_PROCEDURE_INVOCATION 2
-#define SQL_QU_TABLE_DEFINITION 4
-#define SQL_QUALIFIER_LOCATION 114
-#define SQL_QUALIFIER_NAME_SEPARATOR 41
-#define SQL_QUALIFIER_TERM 42
-#define SQL_QUALIFIER_USAGE 92
-#define SQL_QUERY_TIMEOUT 0
-#define SQL_QUERY_TIMEOUT_DEFAULT 0UL
-#define SQL_QUICK 0
-#define SQL_QUIET_MODE 111
-#define SQL_QUOTED_IDENTIFIER_CASE 93
-#define SQL_RD_DEFAULT SQL_RD_ON
-#define SQL_RD_OFF 0UL
-#define SQL_RD_ON 1UL
-#define SQL_REFRESH 1
-#define SQL_RESTRICT 1
-#define SQL_RESULT_COL 3
-#define SQL_RETRIEVE_DATA 11
-#define SQL_RETURN_VALUE 5
-#define SQL_ROW_ADDED 4
-#define SQL_ROW_DELETED 1
-#define SQL_ROW_ERROR 5
-#define SQL_ROW_NOROW 3
-#define SQL_ROW_NUMBER 14
-#define SQL_ROW_SUCCESS 0
-#define SQL_ROW_UPDATED 2
-#define SQL_ROW_UPDATES 11
-#define SQL_ROWSET_SIZE 9
-#define SQL_ROWSET_SIZE_DEFAULT 1UL
-#define SQL_ROWVER 2
-#define SQL_SC_NON_UNIQUE 0UL
-#define SQL_SC_TRY_UNIQUE 1UL
-#define SQL_SC_UNIQUE 2UL
-#define SQL_SCCO_OPT_TIMESTAMP SQL_SCCO_OPT_ROWVER /* deprecated */
-#define SQL_SCROLL_DYNAMIC (-2L) /* deprecated */
-#define SQL_SCROLL_FORWARD_ONLY 0L /* deprecated */
-#define SQL_SCROLL_KEYSET_DRIVEN (-1L) /* deprecated */
-#define SQL_SCROLL_OPTIONS 44
-#define SQL_SCROLL_STATIC (-3L) /* deprecated */
-#define SQL_SEARCHABLE 3
-#define SQL_SET_NULL 2
-#define SQL_SETPARAM_VALUE_MAX (-1L)
-#define SQL_SETPOS_MAX_LOCK_VALUE SQL_LOCK_UNLOCK
-#define SQL_SETPOS_MAX_OPTION_VALUE SQL_ADD
-#define SQL_SIGNED_OFFSET (-20)
-#define SQL_SIMULATE_CURSOR 10
-#define SQL_SO_DYNAMIC 4
-#define SQL_SO_FORWARD_ONLY 1
-#define SQL_SO_KEYSET_DRIVEN 2
-#define SQL_SO_MIXED 8
-#define SQL_SO_STATIC 16
-#define SQL_SQ_COMPARISON 1
-#define SQL_SQ_CORRELATED_SUBQUERIES 16
-#define SQL_SQ_EXISTS 2
-#define SQL_SQ_IN 4
-#define SQL_SQ_QUANTIFIED 8
-#define SQL_SQLSTATE_SIZE 5
-#define SQL_SS_ADDITIONS 1
-#define SQL_SS_DELETIONS 2
-#define SQL_SS_UPDATES 4
-#define SQL_STATIC_SENSITIVITY 83
-#define SQL_STRING_FUNCTIONS 50
-#define SQL_SUBQUERIES 95
-#define SQL_SYSTEM_FUNCTIONS 51
-#define SQL_TABLE_STAT 0
-#define SQL_TABLE_TERM 45
-#define SQL_TIME 10
-#define SQL_TIMEDATE_ADD_INTERVALS 109
-#define SQL_TIMEDATE_DIFF_INTERVALS 110
-#define SQL_TIMEDATE_FUNCTIONS 52
-#define SQL_TIMESTAMP 11
-#define SQL_TINYINT (-6)
-#define SQL_TRANSLATE_DLL 106
-#define SQL_TRANSLATE_OPTION 107
-#define SQL_TXN_ISOLATION 108
-#define SQL_TXN_VERSIONING 16
-#define SQL_TYPE_NULL 0
-#define SQL_U_UNION 1
-#define SQL_U_UNION_ALL 2
-#define SQL_UB_DEFAULT SQL_UB_OFF
-#define SQL_UB_OFF 0UL
-#define SQL_UB_ON 01UL
-#define SQL_UNION 96
-#define SQL_UNSEARCHABLE 0
-#define SQL_UNSIGNED_OFFSET (-22)
-#define SQL_UPDATE 2
-#define SQL_USE_BOOKMARKS 12
-#define SQL_VARBINARY (-3)
-#define SQL_POSITION_TO(s,r) SQLSetPos(s,r,SQL_POSITION,SQL_LOCK_NO_CHANGE)
-#define SQL_LOCK_RECORD(s,r,l) SQLSetPos(s,r,SQL_POSITION,l)
-#define SQL_REFRESH_RECORD(s,r,l) SQLSetPos(s,r,SQL_REFRESH,l)
-#define SQL_UPDATE_RECORD(s,r) SQLSetPos(s,r,SQL_UPDATE,SQL_LOCK_NO_CHANGE)
-#define SQL_DELETE_RECORD(s,r) SQLSetPos(s,r,SQL_DELETE,SQL_LOCK_NO_CHANGE)
-#define SQL_ADD_RECORD(s,r) SQLSetPos(s,r,SQL_ADD,SQL_LOCK_NO_CHANGE)
-
-#if (ODBCVER < 0x0300)
-#define SQL_CONNECT_OPT_DRVR_START 1000
-#define SQL_CONN_OPT_MAX SQL_PACKET_SIZE
-#define SQL_CONN_OPT_MIN SQL_ACCESS_MODE
-#define SQL_STMT_OPT_MAX SQL_ROW_NUMBER
-#define SQL_STMT_OPT_MIN SQL_QUERY_TIMEOUT
-#define SQL_TYPE_DRIVER_START SQL_INTERVAL_YEAR
-#define SQL_TYPE_DRIVER_END SQL_UNICODE_LONGVARCHAR
-#define SQL_TYPE_MIN SQL_BIT
-#define SQL_TYPE_MAX SQL_VARCHAR
-#endif
-
-#if (ODBCVER < 0x0300)
-#define SQL_NO_DATA_FOUND 100
-#define SQL_INTERVAL_YEAR (-80)
-#define SQL_INTERVAL_MONTH (-81)
-#define SQL_INTERVAL_YEAR_TO_MONTH (-82)
-#define SQL_INTERVAL_DAY (-83)
-#define SQL_INTERVAL_HOUR (-84)
-#define SQL_INTERVAL_MINUTE (-85)
-#define SQL_INTERVAL_SECOND (-86)
-#define SQL_INTERVAL_DAY_TO_HOUR (-87)
-#define SQL_INTERVAL_DAY_TO_MINUTE (-88)
-#define SQL_INTERVAL_DAY_TO_SECOND (-89)
-#define SQL_INTERVAL_HOUR_TO_MINUTE (-90)
-#define SQL_INTERVAL_HOUR_TO_SECOND (-91)
-#define SQL_INTERVAL_MINUTE_TO_SECOND (-92)
-#else
-#define SQL_NO_DATA_FOUND SQL_NO_DATA
-#define SQL_CODE_YEAR 1
-#define SQL_CODE_MONTH 2
-#define SQL_CODE_DAY 3
-#define SQL_CODE_HOUR 4
-#define SQL_CODE_MINUTE 5
-#define SQL_CODE_SECOND 6
-#define SQL_CODE_YEAR_TO_MONTH 7
-#define SQL_CODE_DAY_TO_HOUR 8
-#define SQL_CODE_DAY_TO_MINUTE 9
-#define SQL_CODE_DAY_TO_SECOND 10
-#define SQL_CODE_HOUR_TO_MINUTE 11
-#define SQL_CODE_HOUR_TO_SECOND 12
-#define SQL_CODE_MINUTE_TO_SECOND 13
-#define SQL_INTERVAL_YEAR (100 + SQL_CODE_YEAR)
-#define SQL_INTERVAL_MONTH (100 + SQL_CODE_MONTH)
-#define SQL_INTERVAL_DAY (100 + SQL_CODE_DAY)
-#define SQL_INTERVAL_HOUR (100 + SQL_CODE_HOUR)
-#define SQL_INTERVAL_MINUTE (100 + SQL_CODE_MINUTE)
-#define SQL_INTERVAL_SECOND (100 + SQL_CODE_SECOND)
-#define SQL_INTERVAL_YEAR_TO_MONTH (100 + SQL_CODE_YEAR_TO_MONTH)
-#define SQL_INTERVAL_DAY_TO_HOUR (100 + SQL_CODE_DAY_TO_HOUR)
-#define SQL_INTERVAL_DAY_TO_MINUTE (100 + SQL_CODE_DAY_TO_MINUTE)
-#define SQL_INTERVAL_DAY_TO_SECOND (100 + SQL_CODE_DAY_TO_SECOND)
-#define SQL_INTERVAL_HOUR_TO_MINUTE (100 + SQL_CODE_HOUR_TO_MINUTE)
-#define SQL_INTERVAL_HOUR_TO_SECOND (100 + SQL_CODE_HOUR_TO_SECOND)
-#define SQL_INTERVAL_MINUTE_TO_SECOND (100 + SQL_CODE_MINUTE_TO_SECOND)
-#endif
-
-#if (ODBCVER <= 0x0300)
-#define SQL_UNICODE (-95)
-#define SQL_UNICODE_VARCHAR (-96)
-#define SQL_UNICODE_LONGVARCHAR (-97)
-#define SQL_UNICODE_CHAR SQL_UNICODE
-#else
-#define SQL_UNICODE SQL_WCHAR
-#define SQL_UNICODE_VARCHAR SQL_WVARCHAR
-#define SQL_UNICODE_LONGVARCHAR SQL_WLONGVARCHAR
-#define SQL_UNICODE_CHAR SQL_WCHAR
-#endif
-
-#if (ODBCVER >= 0x0201) && (ODBCVER < 0x0300)
-#define SQL_OJ_CAPABILITIES 65003
-#endif /* ODBCVER < 0x0300 */
-
-#if (ODBCVER >= 0x0250)
-#define SQL_NO_ACTION 3
-#define SQL_SET_DEFAULT 4
-#endif /* ODBCVER >= 0x0250 */
-
-#if (ODBCVER >= 0x0300)
-#define SQL_ACTIVE_ENVIRONMENTS 116
-#define SQL_AD_ADD_CONSTRAINT_DEFERRABLE 0x00000080L
-#define SQL_AD_ADD_CONSTRAINT_INITIALLY_DEFERRED 0x00000020L
-#define SQL_AD_ADD_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000040L
-#define SQL_AD_ADD_CONSTRAINT_NON_DEFERRABLE 0x00000100L
-#define SQL_AD_ADD_DOMAIN_CONSTRAINT 0x00000002L
-#define SQL_AD_ADD_DOMAIN_DEFAULT 0x00000008L
-#define SQL_AD_CONSTRAINT_NAME_DEFINITION 0x00000001L
-#define SQL_AD_DROP_DOMAIN_CONSTRAINT 0x00000004L
-#define SQL_AD_DROP_DOMAIN_DEFAULT 0x00000010L
-#define SQL_AF_ALL 0x00000040L
-#define SQL_AF_AVG 0x00000001L
-#define SQL_AF_COUNT 0x00000002L
-#define SQL_AF_DISTINCT 0x00000020L
-#define SQL_AF_MAX 0x00000004L
-#define SQL_AF_MIN 0x00000008L
-#define SQL_AF_SUM 0x00000010L
-#define SQL_AGGREGATE_FUNCTIONS 169
-#define SQL_ALL_CATALOGS "%"
-#define SQL_ALL_SCHEMAS "%"
-#define SQL_ALL_TABLE_TYPES "%"
-#define SQL_ALTER_DOMAIN 117
-#define SQL_AM_CONNECTION 1
-#define SQL_AM_NONE 0
-#define SQL_AM_STATEMENT 2
-#define SQL_API_ODBC3_ALL_FUNCTIONS 999
-#define SQL_API_ODBC3_ALL_FUNCTIONS_SIZE 250
-#define SQL_API_SQLALLOCHANDLESTD 73
-#define SQL_API_SQLBULKOPERATIONS 24
-#define SQL_ASYNC_MODE 10021
-#define SQL_AT_ADD_COLUMN_COLLATION 0x00000080L
-#define SQL_AT_ADD_COLUMN_DEFAULT 0x00000040L
-#define SQL_AT_ADD_COLUMN_SINGLE 0x00000020L
-#define SQL_AT_ADD_TABLE_CONSTRAINT 0x00001000L
-#define SQL_AT_CONSTRAINT_DEFERRABLE 0x00040000L
-#define SQL_AT_CONSTRAINT_INITIALLY_DEFERRED 0x00010000L
-#define SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE 0x00020000L
-#define SQL_AT_CONSTRAINT_NAME_DEFINITION 0x00008000L
-#define SQL_AT_CONSTRAINT_NON_DEFERRABLE 0x00080000L
-#define SQL_AT_DROP_COLUMN_CASCADE 0x00000400L
-#define SQL_AT_DROP_COLUMN_DEFAULT 0x00000200L
-#define SQL_AT_DROP_COLUMN_RESTRICT 0x00000800L
-#define SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE 0x00002000L
-#define SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT 0x00004000L
-#define SQL_AT_SET_COLUMN_DEFAULT 0x00000100L
-#define SQL_ATTR_ACCESS_MODE SQL_ACCESS_MODE
-#define SQL_ATTR_ASYNC_ENABLE 4
-#define SQL_ATTR_AUTOCOMMIT SQL_AUTOCOMMIT
-#define SQL_ATTR_CONCURRENCY SQL_CONCURRENCY
-#define SQL_ATTR_CONNECTION_POOLING 201
-#define SQL_ATTR_CONNECTION_TIMEOUT 113
-#define SQL_ATTR_CP_MATCH 202
-#define SQL_ATTR_CURRENT_CATALOG SQL_CURRENT_QUALIFIER
-#define SQL_ATTR_CURSOR_TYPE SQL_CURSOR_TYPE
-#define SQL_ATTR_DISCONNECT_BEHAVIOR 114
-#define SQL_ATTR_ENABLE_AUTO_IPD 15
-#define SQL_ATTR_ENLIST_IN_DTC 1207
-#define SQL_ATTR_ENLIST_IN_XA 1208
-#define SQL_ATTR_FETCH_BOOKMARK_PTR 16
-#define SQL_ATTR_KEYSET_SIZE SQL_KEYSET_SIZE
-#define SQL_ATTR_LOGIN_TIMEOUT SQL_LOGIN_TIMEOUT
-#define SQL_ATTR_MAX_LENGTH SQL_MAX_LENGTH
-#define SQL_ATTR_MAX_ROWS SQL_MAX_ROWS
-#define SQL_ATTR_NOSCAN SQL_NOSCAN
-#define SQL_ATTR_ODBC_CURSORS SQL_ODBC_CURSORS
-#define SQL_ATTR_ODBC_VERSION 200
-#define SQL_ATTR_PACKET_SIZE SQL_PACKET_SIZE
-#define SQL_ATTR_PARAM_BIND_OFFSET_PTR 17
-#define SQL_ATTR_PARAM_BIND_TYPE 18
-#define SQL_ATTR_PARAM_OPERATION_PTR 19
-#define SQL_ATTR_PARAM_STATUS_PTR 20
-#define SQL_ATTR_PARAMS_PROCESSED_PTR 21
-#define SQL_ATTR_PARAMSET_SIZE 22
-#define SQL_ATTR_QUERY_TIMEOUT SQL_QUERY_TIMEOUT
-#define SQL_ATTR_QUIET_MODE SQL_QUIET_MODE
-#define SQL_ATTR_RETRIEVE_DATA SQL_RETRIEVE_DATA
-#define SQL_ATTR_ROW_ARRAY_SIZE 27
-#define SQL_ATTR_ROW_BIND_OFFSET_PTR 23
-#define SQL_ATTR_ROW_BIND_TYPE SQL_BIND_TYPE
-#define SQL_ATTR_ROW_NUMBER SQL_ROW_NUMBER
-#define SQL_ATTR_ROW_OPERATION_PTR 24
-#define SQL_ATTR_ROW_STATUS_PTR 25
-#define SQL_ATTR_ROWS_FETCHED_PTR 26
-#define SQL_ATTR_SIMULATE_CURSOR SQL_SIMULATE_CURSOR
-#define SQL_ATTR_TRACE SQL_OPT_TRACE
-#define SQL_ATTR_TRACEFILE SQL_OPT_TRACEFILE
-#define SQL_ATTR_TRANSLATE_LIB SQL_TRANSLATE_DLL
-#define SQL_ATTR_TRANSLATE_OPTION SQL_TRANSLATE_OPTION
-#define SQL_ATTR_TXN_ISOLATION SQL_TXN_ISOLATION
-#define SQL_ATTR_USE_BOOKMARKS SQL_USE_BOOKMARKS
-#define SQL_BATCH_ROW_COUNT 120
-#define SQL_BATCH_SUPPORT 121
-#define SQL_BRC_EXPLICIT 0x0000002
-#define SQL_BRC_PROCEDURES 0x0000001
-#define SQL_BRC_ROLLED_UP 0x0000004
-#define SQL_BS_ROW_COUNT_EXPLICIT 0x00000002L
-#define SQL_BS_ROW_COUNT_PROC 0x00000008L
-#define SQL_BS_SELECT_EXPLICIT 0x00000001L
-#define SQL_BS_SELECT_PROC 0x00000004L
-#define SQL_C_INTERVAL_DAY SQL_INTERVAL_DAY
-#define SQL_C_INTERVAL_DAY_TO_HOUR SQL_INTERVAL_DAY_TO_HOUR
-#define SQL_C_INTERVAL_DAY_TO_MINUTE SQL_INTERVAL_DAY_TO_MINUTE
-#define SQL_C_INTERVAL_DAY_TO_SECOND SQL_INTERVAL_DAY_TO_SECOND
-#define SQL_C_INTERVAL_HOUR SQL_INTERVAL_HOUR
-#define SQL_C_INTERVAL_HOUR_TO_MINUTE SQL_INTERVAL_HOUR_TO_MINUTE
-#define SQL_C_INTERVAL_HOUR_TO_SECOND SQL_INTERVAL_HOUR_TO_SECOND
-#define SQL_C_INTERVAL_MINUTE SQL_INTERVAL_MINUTE
-#define SQL_C_INTERVAL_MINUTE_TO_SECOND SQL_INTERVAL_MINUTE_TO_SECOND
-#define SQL_C_INTERVAL_MONTH SQL_INTERVAL_MONTH
-#define SQL_C_INTERVAL_SECOND SQL_INTERVAL_SECOND
-#define SQL_C_INTERVAL_YEAR SQL_INTERVAL_YEAR
-#define SQL_C_INTERVAL_YEAR_TO_MONTH SQL_INTERVAL_YEAR_TO_MONTH
-#define SQL_C_NUMERIC SQL_NUMERIC
-#define SQL_C_SBIGINT (SQL_BIGINT+SQL_SIGNED_OFFSET)
-#define SQL_C_TYPE_DATE SQL_TYPE_DATE
-#define SQL_C_TYPE_TIME SQL_TYPE_TIME
-#define SQL_C_TYPE_TIMESTAMP SQL_TYPE_TIMESTAMP
-#define SQL_C_UBIGINT (SQL_BIGINT+SQL_UNSIGNED_OFFSET)
-#define SQL_C_VARBOOKMARK SQL_C_BINARY
-#define SQL_CA_CONSTRAINT_DEFERRABLE 0x00000040L
-#define SQL_CA_CONSTRAINT_INITIALLY_DEFERRED 0x00000010L
-#define SQL_CA_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000020L
-#define SQL_CA_CONSTRAINT_NON_DEFERRABLE 0x00000080L
-#define SQL_CA_CREATE_ASSERTION 0x00000001L
-#define SQL_CA1_ABSOLUTE 0x00000002L
-#define SQL_CA1_BOOKMARK 0x00000008L
-#define SQL_CA1_BULK_ADD 0x00010000L
-#define SQL_CA1_BULK_DELETE_BY_BOOKMARK 0x00040000L
-#define SQL_CA1_BULK_FETCH_BY_BOOKMARK 0x00080000L
-#define SQL_CA1_BULK_UPDATE_BY_BOOKMARK 0x00020000L
-#define SQL_CA1_LOCK_EXCLUSIVE 0x00000080L
-#define SQL_CA1_LOCK_NO_CHANGE 0x00000040L
-#define SQL_CA1_LOCK_UNLOCK 0x00000100L
-#define SQL_CA1_NEXT 0x00000001L
-#define SQL_CA1_POS_DELETE 0x00000800L
-#define SQL_CA1_POS_POSITION 0x00000200L
-#define SQL_CA1_POS_REFRESH 0x00001000L
-#define SQL_CA1_POS_UPDATE 0x00000400L
-#define SQL_CA1_POSITIONED_DELETE 0x00004000L
-#define SQL_CA1_POSITIONED_UPDATE 0x00002000L
-#define SQL_CA1_RELATIVE 0x00000004L
-#define SQL_CA1_SELECT_FOR_UPDATE 0x00008000L
-#define SQL_CA2_CRC_APPROXIMATE 0x00002000L
-#define SQL_CA2_CRC_EXACT 0x00001000L
-#define SQL_CA2_LOCK_CONCURRENCY 0x00000002L
-#define SQL_CA2_MAX_ROWS_AFFECTS_ALL (SQL_CA2_MAX_ROWS_SELECT | SQL_CA2_MAX_ROWS_INSERT | \
- SQL_CA2_MAX_ROWS_DELETE | SQL_CA2_MAX_ROWS_UPDATE | SQL_CA2_MAX_ROWS_CATALOG)
-#define SQL_CA2_MAX_ROWS_CATALOG 0x00000800L
-#define SQL_CA2_MAX_ROWS_DELETE 0x00000200L
-#define SQL_CA2_MAX_ROWS_INSERT 0x00000100L
-#define SQL_CA2_MAX_ROWS_SELECT 0x00000080L
-#define SQL_CA2_MAX_ROWS_UPDATE 0x00000400L
-#define SQL_CA2_OPT_ROWVER_CONCURRENCY 0x00000004L
-#define SQL_CA2_OPT_VALUES_CONCURRENCY 0x00000008L
-#define SQL_CA2_READ_ONLY_CONCURRENCY 0x00000001L
-#define SQL_CA2_SENSITIVITY_ADDITIONS 0x00000010L
-#define SQL_CA2_SENSITIVITY_DELETIONS 0x00000020L
-#define SQL_CA2_SENSITIVITY_UPDATES 0x00000040L
-#define SQL_CA2_SIMULATE_NON_UNIQUE 0x00004000L
-#define SQL_CA2_SIMULATE_TRY_UNIQUE 0x00008000L
-#define SQL_CA2_SIMULATE_UNIQUE 0x00010000L
-#define SQL_CATALOG_LOCATION SQL_QUALIFIER_LOCATION
-#define SQL_CATALOG_NAME_SEPARATOR SQL_QUALIFIER_NAME_SEPARATOR
-#define SQL_CATALOG_TERM SQL_QUALIFIER_TERM
-#define SQL_CATALOG_USAGE SQL_QUALIFIER_USAGE
-#define SQL_CCOL_CREATE_COLLATION 0x00000001L
-#define SQL_CCS_COLLATE_CLAUSE 0x00000002L
-#define SQL_CCS_CREATE_CHARACTER_SET 0x00000001L
-#define SQL_CCS_LIMITED_COLLATION 0x00000004L
-#define SQL_CDO_COLLATION 0x00000008L
-#define SQL_CDO_CONSTRAINT 0x00000004L
-#define SQL_CDO_CONSTRAINT_DEFERRABLE 0x00000080L
-#define SQL_CDO_CONSTRAINT_INITIALLY_DEFERRED 0x00000020L
-#define SQL_CDO_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000040L
-#define SQL_CDO_CONSTRAINT_NAME_DEFINITION 0x00000010L
-#define SQL_CDO_CONSTRAINT_NON_DEFERRABLE 0x00000100L
-#define SQL_CDO_CREATE_DOMAIN 0x00000001L
-#define SQL_CDO_DEFAULT 0x00000002L
-#define SQL_CL_END SQL_QL_END
-#define SQL_CL_START SQL_QL_START
-#define SQL_COL_PRED_BASIC SQL_ALL_EXCEPT_LIKE
-#define SQL_COL_PRED_CHAR SQL_LIKE_ONLY
-#define SQL_COLUMN_DRIVER_START 1000
-#define SQL_COLUMN_IGNORE SQL_IGNORE
-#define SQL_COLUMN_NUMBER_UNKNOWN (-2)
-#define SQL_CONVERT_GUID 173
-#define SQL_CONVERT_INTERVAL_DAY_TIME 123
-#define SQL_CONVERT_INTERVAL_YEAR_MONTH 124
-#define SQL_CONVERT_WCHAR 122
-#define SQL_CONVERT_WLONGVARCHAR 125
-#define SQL_CONVERT_WVARCHAR 126
-#define SQL_CP_DEFAULT SQL_CP_OFF
-#define SQL_CP_MATCH_DEFAULT SQL_CP_STRICT_MATCH
-#define SQL_CP_OFF 0UL
-#define SQL_CP_ONE_PER_DRIVER 1UL
-#define SQL_CP_ONE_PER_HENV 2UL
-#define SQL_CP_RELAXED_MATCH 1UL
-#define SQL_CP_STRICT_MATCH 0UL
-#define SQL_CREATE_ASSERTION 127
-#define SQL_CREATE_CHARACTER_SET 128
-#define SQL_CREATE_COLLATION 129
-#define SQL_CREATE_DOMAIN 130
-#define SQL_CREATE_SCHEMA 131
-#define SQL_CREATE_TABLE 132
-#define SQL_CREATE_TRANSLATION 133
-#define SQL_CREATE_VIEW 134
-#define SQL_CS_AUTHORIZATION 0x00000002L
-#define SQL_CS_CREATE_SCHEMA 0x00000001L
-#define SQL_CS_DEFAULT_CHARACTER_SET 0x00000004L
-#define SQL_CT_COLUMN_COLLATION 0x00000800L
-#define SQL_CT_COLUMN_CONSTRAINT 0x00000200L
-#define SQL_CT_COLUMN_DEFAULT 0x00000400L
-#define SQL_CT_COMMIT_DELETE 0x00000004L
-#define SQL_CT_COMMIT_PRESERVE 0x00000002L
-#define SQL_CT_CONSTRAINT_DEFERRABLE 0x00000080L
-#define SQL_CT_CONSTRAINT_INITIALLY_DEFERRED 0x00000020L
-#define SQL_CT_CONSTRAINT_INITIALLY_IMMEDIATE 0x00000040L
-#define SQL_CT_CONSTRAINT_NAME_DEFINITION 0x00002000L
-#define SQL_CT_CONSTRAINT_NON_DEFERRABLE 0x00000100L
-#define SQL_CT_CREATE_TABLE 0x00000001L
-#define SQL_CT_GLOBAL_TEMPORARY 0x00000008L
-#define SQL_CT_LOCAL_TEMPORARY 0x00000010L
-#define SQL_CT_TABLE_CONSTRAINT 0x00001000L
-#define SQL_CTR_CREATE_TRANSLATION 0x00000001L
-#define SQL_CU_DML_STATEMENTS SQL_QU_DML_STATEMENTS
-#define SQL_CU_INDEX_DEFINITION SQL_QU_INDEX_DEFINITION
-#define SQL_CU_PRIVILEGE_DEFINITION SQL_QU_PRIVILEGE_DEFINITION
-#define SQL_CU_PROCEDURE_INVOCATION SQL_QU_PROCEDURE_INVOCATION
-#define SQL_CU_TABLE_DEFINITION SQL_QU_TABLE_DEFINITION
-#define SQL_CVT_GUID 0x1000000L
-#define SQL_CVT_INTERVAL_DAY_TIME 0x00100000L
-#define SQL_CVT_INTERVAL_YEAR_MONTH 0x00080000L
-#define SQL_CVT_WCHAR 0x00200000L
-#define SQL_CVT_WLONGVARCHAR 0x00400000L
-#define SQL_CVT_WVARCHAR 0x00800000L
-#define SQL_DA_DROP_ASSERTION 0x00000001L
-#define SQL_DATETIME_LITERALS 119
-#define SQL_DB_DEFAULT SQL_DB_RETURN_TO_POOL
-#define SQL_DB_DISCONNECT 1UL
-#define SQL_DB_RETURN_TO_POOL 0UL
-#define SQL_DC_DROP_COLLATION 0x00000001L
-#define SQL_DCS_DROP_CHARACTER_SET 0x00000001L
-#define SQL_DD_CASCADE 0x00000004L
-#define SQL_DD_DROP_DOMAIN 0x00000001L
-#define SQL_DD_RESTRICT 0x00000002L
-#define SQL_DDL_INDEX 170
-#define SQL_DELETE_BY_BOOKMARK 6
-#define SQL_DESC_ARRAY_SIZE 20
-#define SQL_DESC_ARRAY_STATUS_PTR 21
-#define SQL_DESC_AUTO_UNIQUE_VALUE SQL_COLUMN_AUTO_INCREMENT
-#define SQL_DESC_BASE_COLUMN_NAME 22
-#define SQL_DESC_BASE_TABLE_NAME 23
-#define SQL_DESC_BIND_OFFSET_PTR 24
-#define SQL_DESC_BIND_TYPE 25
-#define SQL_DESC_CASE_SENSITIVE SQL_COLUMN_CASE_SENSITIVE
-#define SQL_DESC_CATALOG_NAME SQL_COLUMN_QUALIFIER_NAME
-#define SQL_DESC_CONCISE_TYPE SQL_COLUMN_TYPE
-#define SQL_DESC_DATETIME_INTERVAL_PRECISION 26
-#define SQL_DESC_DISPLAY_SIZE SQL_COLUMN_DISPLAY_SIZE
-#define SQL_DESC_FIXED_PREC_SCALE SQL_COLUMN_MONEY
-#define SQL_DESC_LABEL SQL_COLUMN_LABEL
-#define SQL_DESC_LITERAL_PREFIX 27
-#define SQL_DESC_LITERAL_SUFFIX 28
-#define SQL_DESC_LOCAL_TYPE_NAME 29
-#define SQL_DESC_MAXIMUM_SCALE 30
-#define SQL_DESC_MINIMUM_SCALE 31
-#define SQL_DESC_NUM_PREC_RADIX 32
-#define SQL_DESC_PARAMETER_TYPE 33
-#define SQL_DESC_ROWS_PROCESSED_PTR 34
-#define SQL_DESC_SCHEMA_NAME SQL_COLUMN_OWNER_NAME
-#define SQL_DESC_SEARCHABLE SQL_COLUMN_SEARCHABLE
-#define SQL_DESC_TABLE_NAME SQL_COLUMN_TABLE_NAME
-#define SQL_DESC_TYPE_NAME SQL_COLUMN_TYPE_NAME
-#define SQL_DESC_UNSIGNED SQL_COLUMN_UNSIGNED
-#define SQL_DESC_UPDATABLE SQL_COLUMN_UPDATABLE
-#define SQL_DI_CREATE_INDEX 0x00000001L
-#define SQL_DI_DROP_INDEX 0x00000002L
-#define SQL_DIAG_COLUMN_NUMBER (-1247)
-#define SQL_DIAG_CURSOR_ROW_COUNT (-1249)
-#define SQL_DIAG_ROW_NUMBER (-1248)
-#define SQL_DL_SQL92_DATE 0x00000001L
-#define SQL_DL_SQL92_INTERVAL_DAY 0x00000020L
-#define SQL_DL_SQL92_INTERVAL_DAY_TO_HOUR 0x00000400L
-#define SQL_DL_SQL92_INTERVAL_DAY_TO_MINUTE 0x00000800L
-#define SQL_DL_SQL92_INTERVAL_DAY_TO_SECOND 0x00001000L
-#define SQL_DL_SQL92_INTERVAL_HOUR 0x00000040L
-#define SQL_DL_SQL92_INTERVAL_HOUR_TO_MINUTE 0x00002000L
-#define SQL_DL_SQL92_INTERVAL_HOUR_TO_SECOND 0x00004000L
-#define SQL_DL_SQL92_INTERVAL_MINUTE 0x00000080L
-#define SQL_DL_SQL92_INTERVAL_MINUTE_TO_SECOND 0x00008000L
-#define SQL_DL_SQL92_INTERVAL_MONTH 0x00000010L
-#define SQL_DL_SQL92_INTERVAL_SECOND 0x00000100L
-#define SQL_DL_SQL92_INTERVAL_YEAR 0x00000008L
-#define SQL_DL_SQL92_INTERVAL_YEAR_TO_MONTH 0x00000200L
-#define SQL_DL_SQL92_TIME 0x00000002L
-#define SQL_DL_SQL92_TIMESTAMP 0x00000004L
-#define SQL_DM_VER 171
-#define SQL_DRIVER_HDESC 135
-#define SQL_DROP_ASSERTION 136
-#define SQL_DROP_CHARACTER_SET 137
-#define SQL_DROP_COLLATION 138
-#define SQL_DROP_DOMAIN 139
-#define SQL_DROP_SCHEMA 140
-#define SQL_DROP_TABLE 141
-#define SQL_DROP_TRANSLATION 142
-#define SQL_DROP_VIEW 143
-#define SQL_DS_CASCADE 0x00000004L
-#define SQL_DS_DROP_SCHEMA 0x00000001L
-#define SQL_DS_RESTRICT 0x00000002L
-#define SQL_DT_CASCADE 0x00000004L
-#define SQL_DT_DROP_TABLE 0x00000001L
-#define SQL_DT_RESTRICT 0x00000002L
-#define SQL_DTC_DONE 0L
-#define SQL_DTR_DROP_TRANSLATION 0x00000001L
-#define SQL_DV_CASCADE 0x00000004L
-#define SQL_DV_DROP_VIEW 0x00000001L
-#define SQL_DV_RESTRICT 0x00000002L
-#define SQL_DYNAMIC_CURSOR_ATTRIBUTES1 144
-#define SQL_DYNAMIC_CURSOR_ATTRIBUTES2 145
-#define SQL_EXT_API_LAST SQL_API_SQLBINDPARAMETER
-#define SQL_EXT_API_START 40
-#define SQL_FETCH_BY_BOOKMARK 7
-#define SQL_FETCH_FIRST_SYSTEM 32
-#define SQL_FETCH_FIRST_USER 31
-#define SQL_FN_CVT_CAST 0x00000002L
-#define SQL_FN_STR_BIT_LENGTH 0x00080000L
-#define SQL_FN_STR_CHAR_LENGTH 0x00100000L
-#define SQL_FN_STR_CHARACTER_LENGTH 0x00200000L
-#define SQL_FN_STR_OCTET_LENGTH 0x00400000L
-#define SQL_FN_STR_POSITION 0x00800000L
-#define SQL_FN_TD_CURRENT_DATE 0x00020000L
-#define SQL_FN_TD_CURRENT_TIME 0x00040000L
-#define SQL_FN_TD_CURRENT_TIMESTAMP 0x00080000L
-#define SQL_FN_TD_EXTRACT 0x00100000L
-#define SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1 146
-#define SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 147
-#define SQL_FUNC_EXISTS(exists, api) \
- ((*(((UWORD*) (exists)) + ((api) >> 4)) & (1 << ((api) & 15)) ) ? \
- SQL_TRUE : SQL_FALSE )
-#define SQL_GB_COLLATE 0x0004
-#define SQL_HANDLE_SENV 5
-#define SQL_IK_ALL (SQL_IK_ASC | SQL_IK_DESC)
-#define SQL_IK_ASC 1
-#define SQL_IK_DESC 2
-#define SQL_IK_NONE 0
-#define SQL_INDEX_KEYWORDS 148
-#define SQL_INFO_DRIVER_START 1000
-#define SQL_INFO_LAST SQL_QUALIFIER_LOCATION
-#define SQL_INFO_SCHEMA_VIEWS 149
-#define SQL_INITIALLY_DEFERRED 5
-#define SQL_INITIALLY_IMMEDIATE 6
-#define SQL_INSERT_STATEMENT 172
-#define SQL_INTERVAL 10
-#define SQL_IS_INSERT_LITERALS 0x00000001L
-#define SQL_IS_INSERT_SEARCHED 0x00000002L
-#define SQL_IS_INTEGER (-6)
-#define SQL_IS_POINTER (-4)
-#define SQL_IS_SELECT_INTO 0x00000004L
-#define SQL_IS_SMALLINT (-8)
-#define SQL_IS_UINTEGER (-5)
-#define SQL_IS_USMALLINT (-7)
-#define SQL_ISV_ASSERTIONS 0x00000001L
-#define SQL_ISV_CHARACTER_SETS 0x00000002L
-#define SQL_ISV_CHECK_CONSTRAINTS 0x00000004L
-#define SQL_ISV_COLLATIONS 0x00000008L
-#define SQL_ISV_COLUMN_DOMAIN_USAGE 0x00000010L
-#define SQL_ISV_COLUMN_PRIVILEGES 0x00000020L
-#define SQL_ISV_COLUMNS 0x00000040L
-#define SQL_ISV_CONSTRAINT_COLUMN_USAGE 0x00000080L
-#define SQL_ISV_CONSTRAINT_TABLE_USAGE 0x00000100L
-#define SQL_ISV_DOMAIN_CONSTRAINTS 0x00000200L
-#define SQL_ISV_DOMAINS 0x00000400L
-#define SQL_ISV_KEY_COLUMN_USAGE 0x00000800L
-#define SQL_ISV_REFERENTIAL_CONSTRAINTS 0x00001000L
-#define SQL_ISV_SCHEMATA 0x00002000L
-#define SQL_ISV_SQL_LANGUAGES 0x00004000L
-#define SQL_ISV_TABLE_CONSTRAINTS 0x00008000L
-#define SQL_ISV_TABLE_PRIVILEGES 0x00010000L
-#define SQL_ISV_TABLES 0x00020000L
-#define SQL_ISV_TRANSLATIONS 0x00040000L
-#define SQL_ISV_USAGE_PRIVILEGES 0x00080000L
-#define SQL_ISV_VIEW_COLUMN_USAGE 0x00100000L
-#define SQL_ISV_VIEW_TABLE_USAGE 0x00200000L
-#define SQL_ISV_VIEWS 0x00400000L
-#define SQL_KEYSET_CURSOR_ATTRIBUTES1 150
-#define SQL_KEYSET_CURSOR_ATTRIBUTES2 151
-#define SQL_MAX_ASYNC_CONCURRENT_STATEMENTS 10022
-#define SQL_NO_COLUMN_NUMBER (-1)
-#define SQL_NO_ROW_NUMBER (-1)
-#define SQL_NOT_DEFERRABLE 7
-#define SQL_NUM_EXTENSIONS (SQL_EXT_API_LAST-SQL_EXT_API_START+1)
-#define SQL_NUM_FUNCTIONS 23
-#define SQL_ODBC_INTERFACE_CONFORMANCE 152
-#define SQL_OIC_CORE 1UL
-#define SQL_OIC_LEVEL1 2UL
-#define SQL_OIC_LEVEL2 3UL
-#define SQL_OV_ODBC2 2UL
-#define SQL_OV_ODBC3 3UL
-#define SQL_PARAM_ARRAY_ROW_COUNTS 153
-#define SQL_PARAM_ARRAY_SELECTS 154
-#define SQL_PARAM_BIND_BY_COLUMN 0UL
-#define SQL_PARAM_BIND_TYPE_DEFAULT SQL_PARAM_BIND_BY_COLUMN
-#define SQL_PARAM_DIAG_UNAVAILABLE 1
-#define SQL_PARAM_ERROR 5
-#define SQL_PARAM_IGNORE 1
-#define SQL_PARAM_PROCEED 0
-#define SQL_PARAM_SUCCESS 0
-#define SQL_PARAM_SUCCESS_WITH_INFO 6
-#define SQL_PARAM_UNUSED 7
-#define SQL_PARC_BATCH 1
-#define SQL_PARC_NO_BATCH 2
-#define SQL_PAS_BATCH 1
-#define SQL_PAS_NO_BATCH 2
-#define SQL_PAS_NO_SELECT 3
-#define SQL_ROW_IGNORE 1
-#define SQL_ROW_NUMBER_UNKNOWN (-2)
-#define SQL_ROW_PROCEED 0
-#define SQL_ROW_SUCCESS_WITH_INFO 6
-#define SQL_SC_FIPS127_2_TRANSITIONAL 0x00000002L
-#define SQL_SC_SQL92_ENTRY 0x00000001L
-#define SQL_SC_SQL92_FULL 0x00000008L
-#define SQL_SC_SQL92_INTERMEDIATE 0x00000004L
-#define SQL_SCC_ISO92_CLI 0x00000002L
-#define SQL_SCC_XOPEN_CLI_VERSION1 0x00000001L
-#define SQL_SCHEMA_TERM SQL_OWNER_TERM
-#define SQL_SCHEMA_USAGE SQL_OWNER_USAGE
-#define SQL_SDF_CURRENT_DATE 0x00000001L
-#define SQL_SDF_CURRENT_TIME 0x00000002L
-#define SQL_SDF_CURRENT_TIMESTAMP 0x00000004L
-#define SQL_SFKD_CASCADE 0x00000001L
-#define SQL_SFKD_NO_ACTION 0x00000002L
-#define SQL_SFKD_SET_DEFAULT 0x00000004L
-#define SQL_SFKD_SET_NULL 0x00000008L
-#define SQL_SFKU_CASCADE 0x00000001L
-#define SQL_SFKU_NO_ACTION 0x00000002L
-#define SQL_SFKU_SET_DEFAULT 0x00000004L
-#define SQL_SFKU_SET_NULL 0x00000008L
-#define SQL_SG_DELETE_TABLE 0x00000020L
-#define SQL_SG_INSERT_COLUMN 0x00000080L
-#define SQL_SG_INSERT_TABLE 0x00000040L
-#define SQL_SG_REFERENCES_COLUMN 0x00000200L
-#define SQL_SG_REFERENCES_TABLE 0x00000100L
-#define SQL_SG_SELECT_TABLE 0x00000400L
-#define SQL_SG_UPDATE_COLUMN 0x00001000L
-#define SQL_SG_UPDATE_TABLE 0x00000800L
-#define SQL_SG_USAGE_ON_CHARACTER_SET 0x00000002L
-#define SQL_SG_USAGE_ON_COLLATION 0x00000004L
-#define SQL_SG_USAGE_ON_DOMAIN 0x00000001L
-#define SQL_SG_USAGE_ON_TRANSLATION 0x00000008L
-#define SQL_SG_WITH_GRANT_OPTION 0x00000010L
-#define SQL_SNVF_BIT_LENGTH 0x00000001L
-#define SQL_SNVF_CHAR_LENGTH 0x00000002L
-#define SQL_SNVF_CHARACTER_LENGTH 0x00000004L
-#define SQL_SNVF_EXTRACT 0x00000008L
-#define SQL_SNVF_OCTET_LENGTH 0x00000010L
-#define SQL_SNVF_POSITION 0x00000020L
-#define SQL_SP_BETWEEN 0x00000800L
-#define SQL_SP_COMPARISON 0x00001000L
-#define SQL_SP_EXISTS 0x00000001L
-#define SQL_SP_IN 0x00000400L
-#define SQL_SP_ISNOTNULL 0x00000002L
-#define SQL_SP_ISNULL 0x00000004L
-#define SQL_SP_LIKE 0x00000200L
-#define SQL_SP_MATCH_FULL 0x00000008L
-#define SQL_SP_MATCH_PARTIAL 0x00000010L
-#define SQL_SP_MATCH_UNIQUE_FULL 0x00000020L
-#define SQL_SP_MATCH_UNIQUE_PARTIAL 0x00000040L
-#define SQL_SP_OVERLAPS 0x00000080L
-#define SQL_SP_QUANTIFIED_COMPARISON 0x00002000L
-#define SQL_SP_UNIQUE 0x00000100L
-#define SQL_SQL_CONFORMANCE 118
-#define SQL_SQL92_DATETIME_FUNCTIONS 155
-#define SQL_SQL92_FOREIGN_KEY_DELETE_RULE 156
-#define SQL_SQL92_FOREIGN_KEY_UPDATE_RULE 157
-#define SQL_SQL92_GRANT 158
-#define SQL_SQL92_NUMERIC_VALUE_FUNCTIONS 159
-#define SQL_SQL92_PREDICATES 160
-#define SQL_SQL92_RELATIONAL_JOIN_OPERATORS 161
-#define SQL_SQL92_REVOKE 162
-#define SQL_SQL92_ROW_VALUE_CONSTRUCTOR 163
-#define SQL_SQL92_STRING_FUNCTIONS 164
-#define SQL_SQL92_VALUE_EXPRESSIONS 165
-#define SQL_SR_CASCADE 0x00000020L
-#define SQL_SR_DELETE_TABLE 0x00000080L
-#define SQL_SR_GRANT_OPTION_FOR 0x00000010L
-#define SQL_SR_INSERT_COLUMN 0x00000200L
-#define SQL_SR_INSERT_TABLE 0x00000100L
-#define SQL_SR_REFERENCES_COLUMN 0x00000800L
-#define SQL_SR_REFERENCES_TABLE 0x00000400L
-#define SQL_SR_RESTRICT 0x00000040L
-#define SQL_SR_SELECT_TABLE 0x00001000L
-#define SQL_SR_UPDATE_COLUMN 0x00004000L
-#define SQL_SR_UPDATE_TABLE 0x00002000L
-#define SQL_SR_USAGE_ON_CHARACTER_SET 0x00000002L
-#define SQL_SR_USAGE_ON_COLLATION 0x00000004L
-#define SQL_SR_USAGE_ON_DOMAIN 0x00000001L
-#define SQL_SR_USAGE_ON_TRANSLATION 0x00000008L
-#define SQL_SRJO_CORRESPONDING_CLAUSE 0x00000001L
-#define SQL_SRJO_CROSS_JOIN 0x00000002L
-#define SQL_SRJO_EXCEPT_JOIN 0x00000004L
-#define SQL_SRJO_FULL_OUTER_JOIN 0x00000008L
-#define SQL_SRJO_INNER_JOIN 0x00000010L
-#define SQL_SRJO_INTERSECT_JOIN 0x00000020L
-#define SQL_SRJO_LEFT_OUTER_JOIN 0x00000040L
-#define SQL_SRJO_NATURAL_JOIN 0x00000080L
-#define SQL_SRJO_RIGHT_OUTER_JOIN 0x00000100L
-#define SQL_SRJO_UNION_JOIN 0x00000200L
-#define SQL_SRVC_DEFAULT 0x00000004L
-#define SQL_SRVC_NULL 0x00000002L
-#define SQL_SRVC_ROW_SUBQUERY 0x00000008L
-#define SQL_SRVC_VALUE_EXPRESSION 0x00000001L
-#define SQL_SSF_CONVERT 0x00000001L
-#define SQL_SSF_LOWER 0x00000002L
-#define SQL_SSF_SUBSTRING 0x00000008L
-#define SQL_SSF_TRANSLATE 0x00000010L
-#define SQL_SSF_TRIM_BOTH 0x00000020L
-#define SQL_SSF_TRIM_LEADING 0x00000040L
-#define SQL_SSF_TRIM_TRAILING 0x00000080L
-#define SQL_SSF_UPPER 0x00000004L
-#define SQL_STANDARD_CLI_CONFORMANCE 166
-#define SQL_STATIC_CURSOR_ATTRIBUTES1 167
-#define SQL_STATIC_CURSOR_ATTRIBUTES2 168
-#define SQL_SU_DML_STATEMENTS SQL_OU_DML_STATEMENTS
-#define SQL_SU_INDEX_DEFINITION SQL_OU_INDEX_DEFINITION
-#define SQL_SU_PRIVILEGE_DEFINITION SQL_OU_PRIVILEGE_DEFINITION
-#define SQL_SU_PROCEDURE_INVOCATION SQL_OU_PROCEDURE_INVOCATION
-#define SQL_SU_TABLE_DEFINITION SQL_OU_TABLE_DEFINITION
-#define SQL_SVE_CASE 0x00000001L
-#define SQL_SVE_CAST 0x00000002L
-#define SQL_SVE_COALESCE 0x00000004L
-#define SQL_SVE_NULLIF 0x00000008L
-#define SQL_UB_FIXED SQL_UB_ON
-#define SQL_UB_VARIABLE 2UL
-#define SQL_UNION_STATEMENT SQL_UNION
-#define SQL_UPDATE_BY_BOOKMARK 5
-#define SQL_US_UNION SQL_U_UNION
-#define SQL_US_UNION_ALL SQL_U_UNION_ALL
-#endif /* ODBCVER >= 0x300 */
-#if (ODBCVER >= 0x0350)
-#define SQL_DESC_ROWVER 35
-#define SQL_GUID (-11)
-#define SQL_C_GUID SQL_GUID
-#ifdef ODBC_STD
-#define SQLAllocHandle SQLAllocHandleStd
-#define SQLAllocEnv(p) SQLAllocHandleStd(SQL_HANDLE_ENV,SQL_NULL_HANDLE,p)
-#define SQL_YEAR SQL_CODE_YEAR
-#define SQL_MONTH SQL_CODE_MONTH
-#define SQL_DAY SQL_CODE_DAY
-#define SQL_HOUR SQL_CODE_HOUR
-#define SQL_MINUTE SQL_CODE_MINUTE
-#define SQL_SECOND SQL_CODE_SECOND
-#define SQL_YEAR_TO_MONTH SQL_CODE_YEAR_TO_MONTH
-#define SQL_DAY_TO_HOUR SQL_CODE_DAY_TO_HOUR
-#define SQL_DAY_TO_MINUTE SQL_CODE_DAY_TO_MINUTE
-#define SQL_DAY_TO_SECOND SQL_CODE_DAY_TO_SECOND
-#define SQL_HOUR_TO_MINUTE SQL_CODE_HOUR_TO_MINUTE
-#define SQL_HOUR_TO_SECOND SQL_CODE_HOUR_TO_SECOND
-#define SQL_MINUTE_TO_SECOND SQL_CODE_MINUTE_TO_SECOND
-#endif /* ODBC_STD */
-#endif /* ODBCVER >= 0x0350 */
-#if (ODBCVER >= 0x0351)
-#define SQL_ATTR_ANSI_APP 115
-#define SQL_AA_TRUE 1L
-#define SQL_AA_FALSE 0L
-#endif
-
-#define TRACE_VERSION 1000
-#define TRACE_ON 1
-
-#ifndef RC_INVOKED
-#define SQL_ODBC_KEYWORDS \
-"ABSOLUTE,ACTION,ADA,ADD,ALL,ALLOCATE,ALTER,AND,ANY,ARE,AS,"\
-"ASC,ASSERTION,AT,AUTHORIZATION,AVG,"\
-"BEGIN,BETWEEN,BIT,BIT_LENGTH,BOTH,BY,CASCADE,CASCADED,CASE,CAST,CATALOG,"\
-"CHAR,CHAR_LENGTH,CHARACTER,CHARACTER_LENGTH,CHECK,CLOSE,COALESCE,"\
-"COLLATE,COLLATION,COLUMN,COMMIT,CONNECT,CONNECTION,CONSTRAINT,"\
-"CONSTRAINTS,CONTINUE,CONVERT,CORRESPONDING,COUNT,CREATE,CROSS,CURRENT,"\
-"CURRENT_DATE,CURRENT_TIME,CURRENT_TIMESTAMP,CURRENT_USER,CURSOR,"\
-"DATE,DAY,DEALLOCATE,DEC,DECIMAL,DECLARE,DEFAULT,DEFERRABLE,"\
-"DEFERRED,DELETE,DESC,DESCRIBE,DESCRIPTOR,DIAGNOSTICS,DISCONNECT,"\
-"DISTINCT,DOMAIN,DOUBLE,DROP,"\
-"ELSE,END,END-EXEC,ESCAPE,EXCEPT,EXCEPTION,EXEC,EXECUTE,"\
-"EXISTS,EXTERNAL,EXTRACT,"\
-"FALSE,FETCH,FIRST,FLOAT,FOR,FOREIGN,FORTRAN,FOUND,FROM,FULL,"\
-"GET,GLOBAL,GO,GOTO,GRANT,GROUP,HAVING,HOUR,"\
-"IDENTITY,IMMEDIATE,IN,INCLUDE,INDEX,INDICATOR,INITIALLY,INNER,"\
-"INPUT,INSENSITIVE,INSERT,INT,INTEGER,INTERSECT,INTERVAL,INTO,IS,ISOLATION,"\
-"JOIN,KEY,LANGUAGE,LAST,LEADING,LEFT,LEVEL,LIKE,LOCAL,LOWER,"\
-"MATCH,MAX,MIN,MINUTE,MODULE,MONTH,"\
-"NAMES,NATIONAL,NATURAL,NCHAR,NEXT,NO,NONE,NOT,NULL,NULLIF,NUMERIC,"\
-"OCTET_LENGTH,OF,ON,ONLY,OPEN,OPTION,OR,ORDER,OUTER,OUTPUT,OVERLAPS,"\
-"PAD,PARTIAL,PASCAL,PLI,POSITION,PRECISION,PREPARE,PRESERVE,"\
-"PRIMARY,PRIOR,PRIVILEGES,PROCEDURE,PUBLIC,"\
-"READ,REAL,REFERENCES,RELATIVE,RESTRICT,REVOKE,RIGHT,ROLLBACK,ROWS"\
-"SCHEMA,SCROLL,SECOND,SECTION,SELECT,SESSION,SESSION_USER,SET,SIZE,"\
-"SMALLINT,SOME,SPACE,SQL,SQLCA,SQLCODE,SQLERROR,SQLSTATE,SQLWARNING,"\
-"SUBSTRING,SUM,SYSTEM_USER,"\
-"TABLE,TEMPORARY,THEN,TIME,TIMESTAMP,TIMEZONE_HOUR,TIMEZONE_MINUTE,"\
-"TO,TRAILING,TRANSACTION,TRANSLATE,TRANSLATION,TRIM,TRUE,"\
-"UNION,UNIQUE,UNKNOWN,UPDATE,UPPER,USAGE,USER,USING,"\
-"VALUE,VALUES,VARCHAR,VARYING,VIEW,WHEN,WHENEVER,WHERE,WITH,WORK,WRITE,"\
-"YEAR,ZONE"
-
-SQLRETURN SQL_API SQLDriverConnect(SQLHDBC,SQLHWND,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLUSMALLINT);
-SQLRETURN SQL_API SQLBrowseConnect(SQLHDBC,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLColumnPrivileges(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLColAttributes(SQLHSTMT,SQLUSMALLINT, SQLUSMALLINT, SQLPOINTER, SQLSMALLINT, SQLSMALLINT*, SQLLEN*);
-SQLRETURN SQL_API SQLDescribeParam(SQLHSTMT,SQLUSMALLINT,SQLSMALLINT*,SQLULEN*,SQLSMALLINT*,SQLSMALLINT*);
-SQLRETURN SQL_API SQLExtendedFetch(SQLHSTMT,SQLUSMALLINT,SQLINTEGER,SQLUINTEGER*,SQLUSMALLINT*);
-SQLRETURN SQL_API SQLForeignKeys(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLMoreResults(SQLHSTMT);
-SQLRETURN SQL_API SQLNativeSql(SQLHDBC,SQLCHAR*,SQLINTEGER,SQLCHAR*,SQLINTEGER,SQLINTEGER*);
-SQLRETURN SQL_API SQLNumParams(SQLHSTMT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLParamOptions(SQLHSTMT,SQLUINTEGER,SQLUINTEGER*);
-SQLRETURN SQL_API SQLPrimaryKeys(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLProcedureColumns(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLProcedures(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLSetPos(SQLHSTMT,SQLUSMALLINT,SQLUSMALLINT,SQLUSMALLINT);
-SQLRETURN SQL_API SQLTablePrivileges(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLDrivers(SQLHENV,SQLUSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLBindParameter(SQLHSTMT,SQLUSMALLINT,SQLSMALLINT,SQLSMALLINT,SQLSMALLINT,SQLULEN,SQLSMALLINT,SQLPOINTER,SQLLEN,SQLLEN*);
-SQLRETURN SQL_API SQLSetScrollOptions(SQLHSTMT,SQLUSMALLINT,SQLLEN,SQLUSMALLINT); /* deprecated */
-DWORD SQL_API ODBCGetTryWaitValue(void);
-BOOL SQL_API ODBCSetTryWaitValue(DWORD);
-RETCODE SQL_API TraceOpenLogFile(LPWSTR,LPWSTR,DWORD);
-RETCODE SQL_API TraceCloseLogFile(void);
-VOID SQL_API TraceReturn(RETCODE,RETCODE);
-DWORD SQL_API TraceVersion(void);
-#if (ODBCVER >= 0x0300)
-SQLRETURN SQL_API SQLBulkOperations(SQLHSTMT,SQLSMALLINT);
-SQLRETURN SQL_API SQLAllocHandleStd( SQLSMALLINT,SQLHANDLE,SQLHANDLE*);
-#endif
-#endif /* ndef RC_INVOKED */
-#include <sqlucode.h>
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/sqltypes.h b/winsup/w32api/include/sqltypes.h
deleted file mode 100644
index fcc7135..0000000
--- a/winsup/w32api/include/sqltypes.h
+++ /dev/null
@@ -1,165 +0,0 @@
-#ifndef _SQLTYPES_H
-#define _SQLTYPES_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define SQL_API __stdcall
-#ifndef RC_INVOKED
-#define __need_wchar_t
-#include <stddef.h>
-typedef signed char SCHAR;
-typedef long SDWORD;
-typedef short SWORD;
-typedef ULONG UDWORD;
-typedef USHORT UWORD;
-typedef signed long SLONG;
-typedef signed short SSHORT;
-typedef double SDOUBLE;
-typedef double LDOUBLE;
-typedef float SFLOAT;
-typedef PVOID PTR;
-typedef PVOID HENV;
-typedef PVOID HDBC;
-typedef PVOID HSTMT;
-typedef short RETCODE;
-typedef UCHAR SQLCHAR;
-typedef SCHAR SQLSCHAR;
-typedef SDWORD SQLINTEGER;
-typedef SWORD SQLSMALLINT;
-#ifndef __WIN64
-typedef UDWORD SQLUINTEGER;
-#endif
-typedef UWORD SQLUSMALLINT;
-typedef PVOID SQLPOINTER;
-#if (ODBCVER >= 0x0300)
-typedef void* SQLHANDLE;
-typedef SQLHANDLE SQLHENV;
-typedef SQLHANDLE SQLHDBC;
-typedef SQLHANDLE SQLHSTMT;
-typedef SQLHANDLE SQLHDESC;
-#else
-typedef void* SQLHENV;
-typedef void* SQLHDBC;
-typedef void* SQLHSTMT;
-#endif
-typedef SQLSMALLINT SQLRETURN;
-typedef HWND SQLHWND;
-typedef ULONG BOOKMARK;
-#ifdef _WIN64
-typedef INT64 SQLLEN;
-typedef INT64 SQLROWOFFSET;
-typedef UINT64 SQLROWCOUNT;
-typedef UINT64 SQLULEN;
-typedef UINT64 SQLTRANSID;
-typedef unsigned long SQLSETPOSIROW;
-#else
-#define SQLLEN SQLINTEGER
-#define SQLROWOFFSET SQLINTEGER
-#define SQLROWCOUNT SQLUINTEGER
-#define SQLULEN SQLUINTEGER
-#define SQLTRANSID DWORD
-#define SQLSETPOSIROW SQLUSMALLINT
-#endif
-typedef wchar_t SQLWCHAR;
-#ifdef UNICODE
-typedef SQLWCHAR SQLTCHAR;
-#else
-typedef SQLCHAR SQLTCHAR;
-#endif /* UNICODE */
-#if (ODBCVER >= 0x0300)
-typedef unsigned char SQLDATE;
-typedef unsigned char SQLDECIMAL;
-typedef double SQLDOUBLE;
-typedef double SQLFLOAT;
-typedef unsigned char SQLNUMERIC;
-typedef float SQLREAL;
-typedef unsigned char SQLTIME;
-typedef unsigned char SQLTIMESTAMP;
-typedef unsigned char SQLVARCHAR;
-#define ODBCINT64 __int64
-typedef __int64 SQLBIGINT;
-typedef unsigned __int64 SQLUBIGINT;
-#endif
-
-typedef struct tagDATE_STRUCT {
- SQLSMALLINT year;
- SQLUSMALLINT month;
- SQLUSMALLINT day;
-} DATE_STRUCT;
-typedef struct tagTIME_STRUCT {
- SQLUSMALLINT hour;
- SQLUSMALLINT minute;
- SQLUSMALLINT second;
-} TIME_STRUCT;
-typedef struct tagTIMESTAMP_STRUCT {
- SQLSMALLINT year;
- SQLUSMALLINT month;
- SQLUSMALLINT day;
- SQLUSMALLINT hour;
- SQLUSMALLINT minute;
- SQLUSMALLINT second;
- SQLUINTEGER fraction;
-} TIMESTAMP_STRUCT;
-#if (ODBCVER >= 0x0300)
-typedef DATE_STRUCT SQL_DATE_STRUCT;
-typedef TIME_STRUCT SQL_TIME_STRUCT;
-typedef TIMESTAMP_STRUCT SQL_TIMESTAMP_STRUCT;
-typedef enum {
- SQL_IS_YEAR = 1,SQL_IS_MONTH,SQL_IS_DAY,SQL_IS_HOUR,
- SQL_IS_MINUTE,SQL_IS_SECOND,SQL_IS_YEAR_TO_MONTH,SQL_IS_DAY_TO_HOUR,
- SQL_IS_DAY_TO_MINUTE,SQL_IS_DAY_TO_SECOND,SQL_IS_HOUR_TO_MINUTE,
- SQL_IS_HOUR_TO_SECOND,SQL_IS_MINUTE_TO_SECOND
-} SQLINTERVAL;
-typedef struct tagSQL_YEAR_MONTH {
- SQLUINTEGER year;
- SQLUINTEGER month;
-} SQL_YEAR_MONTH_STRUCT;
-typedef struct tagSQL_DAY_SECOND {
- SQLUINTEGER day;
- SQLUINTEGER hour;
- SQLUINTEGER minute;
- SQLUINTEGER second;
- SQLUINTEGER fraction;
-} SQL_DAY_SECOND_STRUCT;
-typedef struct tagSQL_INTERVAL_STRUCT {
- SQLINTERVAL interval_type;
- SQLSMALLINT interval_sign;
- union {
- SQL_YEAR_MONTH_STRUCT year_month;
- SQL_DAY_SECOND_STRUCT day_second;
- } intval;
-} SQL_INTERVAL_STRUCT;
-#define SQL_MAX_NUMERIC_LEN 16
-typedef struct tagSQL_NUMERIC_STRUCT {
- SQLCHAR precision;
- SQLSCHAR scale;
- SQLCHAR sign;
- SQLCHAR val[SQL_MAX_NUMERIC_LEN];
-} SQL_NUMERIC_STRUCT;
-#endif /* ODBCVER >= 0x0300 */
-#if (ODBCVER >= 0x0350)
-
-#ifdef _GUID_DEFINED
-# warning _GUID_DEFINED is deprecated, use GUID_DEFINED instead
-#endif
-
-#if defined _GUID_DEFINED || defined GUID_DEFINED
-typedef GUID SQLGUID;
-#else
-typedef struct tagSQLGUID{
- DWORD Data1;
- WORD Data2;
- WORD Data3;
- BYTE Data4[ 8 ];
-} SQLGUID;
-#endif /* GUID_DEFINED */
-#endif /* ODBCVER >= 0x0350 */
-#endif /* RC_INVOKED */
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/sqlucode.h b/winsup/w32api/include/sqlucode.h
deleted file mode 100644
index 688ced2..0000000
--- a/winsup/w32api/include/sqlucode.h
+++ /dev/null
@@ -1,142 +0,0 @@
-#ifndef _SQLUCODE_H
-#define _SQLUCODE_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#include <sqlext.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define SQL_WCHAR (-8)
-#define SQL_WVARCHAR (-9)
-#define SQL_WLONGVARCHAR (-10)
-#define SQL_C_WCHAR SQL_WCHAR
-#define SQL_SQLSTATE_SIZEW 10
-#ifdef UNICODE
-#define SQL_C_TCHAR SQL_C_WCHAR
-#else
-#define SQL_C_TCHAR SQL_C_CHAR
-#endif
-#ifndef RC_INVOKED
-SQLRETURN SQL_API SQLBrowseConnectA(SQLHDBC,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLBrowseConnectW(SQLHDBC,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLColAttributeA(SQLHSTMT,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*,SQLPOINTER);
-SQLRETURN SQL_API SQLColAttributeW(SQLHSTMT,SQLUSMALLINT,SQLUSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*,SQLPOINTER);
-SQLRETURN SQL_API SQLColAttributesA(SQLHSTMT,SQLUSMALLINT,SQLUSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*,SQLLEN*);
-SQLRETURN SQL_API SQLColAttributesW(SQLHSTMT,SQLUSMALLINT,SQLUSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*,SQLLEN*);
-SQLRETURN SQL_API SQLColumnPrivilegesA( SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT ,SQLCHAR*,SQLSMALLINT );
-SQLRETURN SQL_API SQLColumnPrivilegesW( SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT );
-SQLRETURN SQL_API SQLColumnsA(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT ,SQLCHAR*,SQLSMALLINT );
-SQLRETURN SQL_API SQLColumnsW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT ,SQLWCHAR*,SQLSMALLINT );
-SQLRETURN SQL_API SQLConnectA(SQLHDBC,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLConnectW(SQLHDBC,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLDataSourcesA(SQLHENV,SQLUSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLDataSourcesW(SQLHENV,SQLUSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLDescribeColA(SQLHSTMT,SQLUSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLSMALLINT*,SQLULEN*,SQLSMALLINT*,SQLSMALLINT*);
-SQLRETURN SQL_API SQLDescribeColW(SQLHSTMT,SQLUSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLSMALLINT*,SQLULEN*,SQLSMALLINT*,SQLSMALLINT*);
-SQLRETURN SQL_API SQLDriverConnectA(SQLHDBC,SQLHWND,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLUSMALLINT);
-SQLRETURN SQL_API SQLDriverConnectW(SQLHDBC,SQLHWND,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLUSMALLINT);
-SQLRETURN SQL_API SQLDriversA(SQLHENV,SQLUSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLDriversW(SQLHENV,SQLUSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLErrorA(SQLHENV,SQLHDBC,SQLHSTMT,SQLCHAR*,SQLINTEGER*,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLErrorW(SQLHENV,SQLHDBC,SQLHSTMT,SQLWCHAR*,SQLINTEGER*,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLExecDirectA(SQLHSTMT,SQLCHAR*,SQLINTEGER);
-SQLRETURN SQL_API SQLExecDirectW(SQLHSTMT,SQLWCHAR*,SQLINTEGER);
-SQLRETURN SQL_API SQLForeignKeysA(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLForeignKeysW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLGetConnectAttrA(SQLHDBC,SQLINTEGER,SQLPOINTER,SQLINTEGER,SQLINTEGER*);
-SQLRETURN SQL_API SQLGetConnectAttrW(SQLHDBC,SQLINTEGER,SQLPOINTER,SQLINTEGER,SQLINTEGER*);
-SQLRETURN SQL_API SQLGetConnectOptionA(SQLHDBC,SQLUSMALLINT,SQLPOINTER);
-SQLRETURN SQL_API SQLGetConnectOptionW(SQLHDBC,SQLUSMALLINT,SQLPOINTER);
-SQLRETURN SQL_API SQLGetCursorNameA(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLGetCursorNameW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLGetInfoA(SQLHDBC,SQLUSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLGetInfoW(SQLHDBC,SQLUSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLGetTypeInfoA(SQLHSTMT,SQLSMALLINT);
-SQLRETURN SQL_API SQLGetTypeInfoW(SQLHSTMT,SQLSMALLINT);
-SQLRETURN SQL_API SQLNativeSqlA(SQLHDBC,SQLCHAR*,SQLINTEGER,SQLCHAR*,SQLINTEGER,SQLINTEGER*);
-SQLRETURN SQL_API SQLNativeSqlW(SQLHDBC,SQLWCHAR*,SQLINTEGER,SQLWCHAR*,SQLINTEGER,SQLINTEGER*);
-SQLRETURN SQL_API SQLPrepareA(SQLHSTMT,SQLCHAR*,SQLINTEGER);
-SQLRETURN SQL_API SQLPrepareW(SQLHSTMT,SQLWCHAR*,SQLINTEGER);
-SQLRETURN SQL_API SQLPrimaryKeysA(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT );
-SQLRETURN SQL_API SQLPrimaryKeysW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLProcedureColumnsA(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLProcedureColumnsW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLProceduresA(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLProceduresW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLSetConnectAttrA(SQLHDBC,SQLINTEGER,SQLPOINTER,SQLINTEGER);
-SQLRETURN SQL_API SQLSetConnectAttrW(SQLHDBC,SQLINTEGER,SQLPOINTER,SQLINTEGER);
-SQLRETURN SQL_API SQLSetConnectOptionA(SQLHDBC,SQLUSMALLINT,SQLULEN);
-SQLRETURN SQL_API SQLSetConnectOptionW(SQLHDBC,SQLUSMALLINT,SQLULEN);
-SQLRETURN SQL_API SQLSetCursorNameA(SQLHSTMT,SQLCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLSetCursorNameW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLSpecialColumnsA(SQLHSTMT,SQLUSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT ,SQLUSMALLINT,SQLUSMALLINT);
-SQLRETURN SQL_API SQLSpecialColumnsW(SQLHSTMT,SQLUSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT ,SQLUSMALLINT,SQLUSMALLINT);
-SQLRETURN SQL_API SQLStatisticsA(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT ,SQLUSMALLINT,SQLUSMALLINT);
-SQLRETURN SQL_API SQLStatisticsW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT ,SQLUSMALLINT,SQLUSMALLINT);
-SQLRETURN SQL_API SQLTablePrivilegesA(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLTablePrivilegesW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT );
-SQLRETURN SQL_API SQLTablesA(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT);
-SQLRETURN SQL_API SQLTablesW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT);
-#if (ODBCVER >= 0x0300)
-SQLRETURN SQL_API SQLGetDescFieldA(SQLHDESC,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLINTEGER,SQLINTEGER*);
-SQLRETURN SQL_API SQLGetDescFieldW(SQLHDESC,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLINTEGER,SQLINTEGER*);
-SQLRETURN SQL_API SQLSetDescFieldA(SQLHDESC,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLINTEGER);
-SQLRETURN SQL_API SQLSetDescFieldW(SQLHDESC,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLINTEGER);
-SQLRETURN SQL_API SQLGetDescRecA(SQLHDESC,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLSMALLINT*,SQLSMALLINT*,SQLLEN*,SQLSMALLINT*,SQLSMALLINT*,SQLSMALLINT*);
-SQLRETURN SQL_API SQLGetDescRecW(SQLHDESC,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLSMALLINT*,SQLSMALLINT*,SQLLEN*,SQLSMALLINT*,SQLSMALLINT*,SQLSMALLINT*);
-SQLRETURN SQL_API SQLGetDiagFieldA(SQLSMALLINT,SQLHANDLE,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLGetDiagFieldW(SQLSMALLINT,SQLHANDLE,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLGetDiagRecA(SQLSMALLINT,SQLHANDLE,SQLSMALLINT,SQLCHAR*,SQLINTEGER*,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLGetDiagRecW(SQLSMALLINT,SQLHANDLE,SQLSMALLINT,SQLWCHAR*,SQLINTEGER*,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*);
-SQLRETURN SQL_API SQLGetStmtAttrA(SQLHSTMT,SQLINTEGER,SQLPOINTER,SQLINTEGER,SQLINTEGER*);
-SQLRETURN SQL_API SQLGetStmtAttrW(SQLHSTMT,SQLINTEGER,SQLPOINTER,SQLINTEGER,SQLINTEGER*);
-SQLRETURN SQL_API SQLSetStmtAttrA(SQLHSTMT,SQLINTEGER,SQLPOINTER,SQLINTEGER);
-SQLRETURN SQL_API SQLSetStmtAttrW(SQLHSTMT,SQLINTEGER,SQLPOINTER,SQLINTEGER);
-#endif /* (ODBCVER >= 0x0300) */
-
-#if defined (UNICODE) && !defined (SQL_NOUNICODEMAP)
-#define SQLBrowseConnect SQLBrowseConnectW
-#define SQLColAttribute SQLColAttributeW
-#define SQLColAttributes SQLColAttributesW
-#define SQLColumnPrivileges SQLColumnPrivilegesW
-#define SQLColumns SQLColumnsW
-#define SQLConnect SQLConnectW
-#define SQLDataSources SQLDataSourcesW
-#define SQLDescribeCol SQLDescribeColW
-#define SQLDriverConnect SQLDriverConnectW
-#define SQLDrivers SQLDriversW
-#define SQLError SQLErrorW
-#define SQLExecDirect SQLExecDirectW
-#define SQLForeignKeys SQLForeignKeysW
-#define SQLGetConnectAttr SQLGetConnectAttrW
-#define SQLGetConnectOption SQLGetConnectOptionW
-#define SQLGetCursorName SQLGetCursorNameW
-#define SQLGetDescField SQLGetDescFieldW
-#define SQLGetDescRec SQLGetDescRecW
-#define SQLGetDiagField SQLGetDiagFieldW
-#define SQLGetDiagRec SQLGetDiagRecW
-#define SQLGetInfo SQLGetInfoW
-#define SQLGetStmtAttr SQLGetStmtAttrW
-#define SQLGetTypeInfo SQLGetTypeInfoW
-#define SQLNativeSql SQLNativeSqlW
-#define SQLPrepare SQLPrepareW
-#define SQLPrimaryKeys SQLPrimaryKeysW
-#define SQLProcedureColumns SQLProcedureColumnsW
-#define SQLProcedures SQLProceduresW
-#define SQLSetConnectAttr SQLSetConnectAttrW
-#define SQLSetConnectOption SQLSetConnectOptionW
-#define SQLSetCursorName SQLSetCursorNameW
-#define SQLSetDescField SQLSetDescFieldW
-#define SQLSetStmtAttr SQLSetStmtAttrW
-#define SQLSpecialColumns SQLSpecialColumnsW
-#define SQLStatistics SQLStatisticsW
-#define SQLTablePrivileges SQLTablePrivilegesW
-#define SQLTables SQLTablesW
-#endif /* UNICODE && ! SQL_NOUNICODEMAP */
-#endif /* RC_INVOKED */
-#ifdef __cplusplus
-}
-#endif /* __cplusplus*/
-#endif /* ndef _SQLUCODE_H */
diff --git a/winsup/w32api/include/sspi.h b/winsup/w32api/include/sspi.h
deleted file mode 100644
index 07639e8..0000000
--- a/winsup/w32api/include/sspi.h
+++ /dev/null
@@ -1,343 +0,0 @@
-#ifndef _SSPI_H
-#define _SSPI_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <subauth.h>
-
-#define SECPKG_CRED_INBOUND 1
-#define SECPKG_CRED_OUTBOUND 2
-#define SECPKG_CRED_BOTH (SECPKG_CRED_OUTBOUND|SECPKG_CRED_INBOUND)
-#define SECPKG_CRED_ATTR_NAMES 1
-
-#define SECPKG_FLAG_INTEGRITY 1
-#define SECPKG_FLAG_PRIVACY 2
-#define SECPKG_FLAG_TOKEN_ONLY 4
-#define SECPKG_FLAG_DATAGRAM 8
-#define SECPKG_FLAG_CONNECTION 16
-#define SECPKG_FLAG_MULTI_REQUIRED 32
-#define SECPKG_FLAG_CLIENT_ONLY 64
-#define SECPKG_FLAG_EXTENDED_ERROR 128
-#define SECPKG_FLAG_IMPERSONATION 256
-#define SECPKG_FLAG_ACCEPT_WIN32_NAME 512
-#define SECPKG_FLAG_STREAM 1024
-
-#define SECPKG_ATTR_AUTHORITY 6
-#define SECPKG_ATTR_CONNECTION_INFO 90
-#define SECPKG_ATTR_ISSUER_LIST 80
-#define SECPKG_ATTR_ISSUER_LIST_EX 89
-#define SECPKG_ATTR_KEY_INFO 5
-#define SECPKG_ATTR_LIFESPAN 2
-#define SECPKG_ATTR_LOCAL_CERT_CONTEXT 84
-#define SECPKG_ATTR_LOCAL_CRED 82
-#define SECPKG_ATTR_NAMES 1
-#define SECPKG_ATTR_PROTO_INFO 7
-#define SECPKG_ATTR_REMOTE_CERT_CONTEXT 83
-#define SECPKG_ATTR_REMOTE_CRED 81
-#define SECPKG_ATTR_SIZES 0
-#define SECPKG_ATTR_STREAM_SIZES 4
-
-#define SECBUFFER_EMPTY 0
-#define SECBUFFER_DATA 1
-#define SECBUFFER_TOKEN 2
-#define SECBUFFER_PKG_PARAMS 3
-#define SECBUFFER_MISSING 4
-#define SECBUFFER_EXTRA 5
-#define SECBUFFER_STREAM_TRAILER 6
-#define SECBUFFER_STREAM_HEADER 7
-#define SECBUFFER_PADDING 9
-#define SECBUFFER_STREAM 10
-#define SECBUFFER_READONLY 0x80000000
-#define SECBUFFER_ATTRMASK 0xf0000000
-
-#define UNISP_NAME_A "Microsoft Unified Security Protocol Provider"
-#define UNISP_NAME_W L"Microsoft Unified Security Protocol Provider"
-#define SECBUFFER_VERSION 0
-
-typedef UNICODE_STRING SECURITY_STRING, *PSECURITY_STRING;
-
-typedef struct _SecHandle {
- ULONG_PTR dwLower;
- ULONG_PTR dwUpper;
-} SecHandle, *PSecHandle;
-typedef struct _SecBuffer {
- ULONG cbBuffer;
- ULONG BufferType;
- PVOID pvBuffer;
-} SecBuffer, *PSecBuffer;
-typedef SecHandle CredHandle;
-typedef PSecHandle PCredHandle;
-typedef SecHandle CtxtHandle;
-typedef PSecHandle PCtxtHandle;
-typedef struct _SECURITY_INTEGER {
- unsigned long LowPart;
- long HighPart;
-} SECURITY_INTEGER;
-typedef SECURITY_INTEGER TimeStamp, *PTimeStamp;
-typedef struct _SecBufferDesc {
- ULONG ulVersion;
- ULONG cBuffers;
- PSecBuffer pBuffers;
-} SecBufferDesc, *PSecBufferDesc;
-typedef struct _SecPkgContext_StreamSizes {
- ULONG cbHeader;
- ULONG cbTrailer;
- ULONG cbMaximumMessage;
- ULONG cBuffers;
- ULONG cbBlockSize;
-} SecPkgContext_StreamSizes, *PSecPkgContext_StreamSizes;
-typedef struct _SecPkgContext_Sizes {
- ULONG cbMaxToken;
- ULONG cbMaxSignature;
- ULONG cbBlockSize;
- ULONG cbSecurityTrailer;
-} SecPkgContext_Sizes, *PSecPkgContext_Sizes;
-typedef struct _SecPkgContext_AuthorityW {
- SEC_WCHAR* sAuthorityName;
-} SecPkgContext_AuthorityW, *PSecPkgContext_AuthorityW;
-typedef struct _SecPkgContext_AuthorityA {
- SEC_CHAR* sAuthorityName;
-} SecPkgContext_AuthorityA, *PSecPkgContext_AuthorityA;
-typedef struct _SecPkgContext_KeyInfoW {
- SEC_WCHAR* sSignatureAlgorithmName;
- SEC_WCHAR* sEncryptAlgorithmName;
- ULONG KeySize;
- ULONG SignatureAlgorithm;
- ULONG EncryptAlgorithm;
-} SecPkgContext_KeyInfoW, *PSecPkgContext_KeyInfoW;
-typedef struct _SecPkgContext_KeyInfoA {
- SEC_CHAR* sSignatureAlgorithmName;
- SEC_CHAR* sEncryptAlgorithmName;
- ULONG KeySize;
- ULONG SignatureAlgorithm;
- ULONG EncryptAlgorithm;
-} SecPkgContext_KeyInfoA, *PSecPkgContext_KeyInfoA;
-typedef struct _SecPkgContext_LifeSpan {
- TimeStamp tsStart;
- TimeStamp tsExpiry;
-} SecPkgContext_LifeSpan, *PSecPkgContext_LifeSpan;
-typedef struct _SecPkgContext_NamesW {
- SEC_WCHAR* sUserName;
-} SecPkgContext_NamesW, *PSecPkgContext_NamesW;
-typedef struct _SecPkgContext_NamesA {
- SEC_CHAR* sUserName;
-} SecPkgContext_NamesA, *PSecPkgContext_NamesA;
-typedef struct _SecPkgInfoW {
- ULONG fCapabilities;
- USHORT wVersion;
- USHORT wRPCID;
- ULONG cbMaxToken;
- SEC_WCHAR* Name;
- SEC_WCHAR* Comment;
-} SecPkgInfoW, *PSecPkgInfoW;
-typedef struct _SecPkgInfoA {
- ULONG fCapabilities;
- USHORT wVersion;
- USHORT wRPCID;
- ULONG cbMaxToken;
- SEC_CHAR* Name;
- SEC_CHAR* Comment;
-} SecPkgInfoA, *PSecPkgInfoA;
-/* supported only in win2k+, so it should be a PSecPkgInfoW */
-/* PSDK does not say it has ANSI/Unicode versions */
-typedef struct _SecPkgContext_PackageInfo {
- PSecPkgInfoW PackageInfo;
-} SecPkgContext_PackageInfo, *PSecPkgContext_PackageInfo;
-typedef struct _SecPkgCredentials_NamesW {
- SEC_WCHAR* sUserName;
-} SecPkgCredentials_NamesW, *PSecPkgCredentials_NamesW;
-typedef struct _SecPkgCredentials_NamesA {
- SEC_CHAR* sUserName;
-} SecPkgCredentials_NamesA, *PSecPkgCredentials_NamesA;
-
-/* TODO: missing type in SDK */
-typedef void (*SEC_GET_KEY_FN)();
-
-typedef SECURITY_STATUS (WINAPI *ENUMERATE_SECURITY_PACKAGES_FN_W)(PULONG,PSecPkgInfoW*);
-typedef SECURITY_STATUS (WINAPI *ENUMERATE_SECURITY_PACKAGES_FN_A)(PULONG,PSecPkgInfoA*);
-typedef SECURITY_STATUS (WINAPI *QUERY_CREDENTIALS_ATTRIBUTES_FN_W)(PCredHandle,ULONG,PVOID);
-typedef SECURITY_STATUS (WINAPI *QUERY_CREDENTIALS_ATTRIBUTES_FN_A)(PCredHandle,ULONG,PVOID);
-typedef SECURITY_STATUS (WINAPI *ACQUIRE_CREDENTIALS_HANDLE_FN_W)(SEC_WCHAR*,SEC_WCHAR*,ULONG,PLUID,PVOID,SEC_GET_KEY_FN,PVOID,PCredHandle,PTimeStamp);
-typedef SECURITY_STATUS (WINAPI *ACQUIRE_CREDENTIALS_HANDLE_FN_A)(SEC_CHAR*,SEC_CHAR*,ULONG,PLUID,PVOID,SEC_GET_KEY_FN,PVOID,PCredHandle,PTimeStamp);
-typedef SECURITY_STATUS (WINAPI *FREE_CREDENTIALS_HANDLE_FN)(PCredHandle);
-typedef SECURITY_STATUS (WINAPI *INITIALIZE_SECURITY_CONTEXT_FN_W)(PCredHandle,PCtxtHandle,SEC_WCHAR*,ULONG,ULONG,ULONG,PSecBufferDesc,ULONG,PCtxtHandle,PSecBufferDesc,PULONG,PTimeStamp);
-typedef SECURITY_STATUS (WINAPI *INITIALIZE_SECURITY_CONTEXT_FN_A)(PCredHandle,PCtxtHandle,SEC_CHAR*,ULONG,ULONG,ULONG,PSecBufferDesc,ULONG,PCtxtHandle,PSecBufferDesc,PULONG,PTimeStamp);
-typedef SECURITY_STATUS (WINAPI *ACCEPT_SECURITY_CONTEXT_FN)(PCredHandle,PCtxtHandle,PSecBufferDesc,ULONG,ULONG,PCtxtHandle,PSecBufferDesc,PULONG,PTimeStamp);
-typedef SECURITY_STATUS (WINAPI *COMPLETE_AUTH_TOKEN_FN)(PCtxtHandle,PSecBufferDesc);
-typedef SECURITY_STATUS (WINAPI *DELETE_SECURITY_CONTEXT_FN)(PCtxtHandle);
-typedef SECURITY_STATUS (WINAPI *APPLY_CONTROL_TOKEN_FN_W)(PCtxtHandle,PSecBufferDesc);
-typedef SECURITY_STATUS (WINAPI *APPLY_CONTROL_TOKEN_FN_A)(PCtxtHandle,PSecBufferDesc);
-typedef SECURITY_STATUS (WINAPI *QUERY_CONTEXT_ATTRIBUTES_FN_A)(PCtxtHandle,ULONG,PVOID);
-typedef SECURITY_STATUS (WINAPI *QUERY_CONTEXT_ATTRIBUTES_FN_W)(PCtxtHandle,ULONG,PVOID);
-typedef SECURITY_STATUS (WINAPI *IMPERSONATE_SECURITY_CONTEXT_FN)(PCtxtHandle);
-typedef SECURITY_STATUS (WINAPI *REVERT_SECURITY_CONTEXT_FN)(PCtxtHandle);
-typedef SECURITY_STATUS (WINAPI *MAKE_SIGNATURE_FN)(PCtxtHandle,ULONG,PSecBufferDesc,ULONG);
-typedef SECURITY_STATUS (WINAPI *VERIFY_SIGNATURE_FN)(PCtxtHandle,PSecBufferDesc,ULONG,PULONG);
-typedef SECURITY_STATUS (WINAPI *FREE_CONTEXT_BUFFER_FN)(PVOID);
-typedef SECURITY_STATUS (WINAPI *QUERY_SECURITY_PACKAGE_INFO_FN_A)(SEC_CHAR*,PSecPkgInfoA*);
-typedef SECURITY_STATUS (WINAPI *QUERY_SECURITY_CONTEXT_TOKEN_FN)(PCtxtHandle,HANDLE*);
-typedef SECURITY_STATUS (WINAPI *QUERY_SECURITY_PACKAGE_INFO_FN_W)(SEC_WCHAR*,PSecPkgInfoW*);
-typedef SECURITY_STATUS (WINAPI *ENCRYPT_MESSAGE_FN)(PCtxtHandle,ULONG,PSecBufferDesc,ULONG);
-typedef SECURITY_STATUS (WINAPI *DECRYPT_MESSAGE_FN)(PCtxtHandle,PSecBufferDesc,ULONG,PULONG);
-
-/* No, it really is FreeCredentialsHandle, see the thread beginning
- * http://sourceforge.net/mailarchive/message.php?msg_id=4321080 for a
- * discovery discussion. */
-typedef struct _SECURITY_FUNCTION_TABLEW {
- unsigned long dwVersion;
- ENUMERATE_SECURITY_PACKAGES_FN_W EnumerateSecurityPackagesW;
- QUERY_CREDENTIALS_ATTRIBUTES_FN_W QueryCredentialsAttributesW;
- ACQUIRE_CREDENTIALS_HANDLE_FN_W AcquireCredentialsHandleW;
- FREE_CREDENTIALS_HANDLE_FN FreeCredentialsHandle;
- void SEC_FAR* Reserved2;
- INITIALIZE_SECURITY_CONTEXT_FN_W InitializeSecurityContextW;
- ACCEPT_SECURITY_CONTEXT_FN AcceptSecurityContext;
- COMPLETE_AUTH_TOKEN_FN CompleteAuthToken;
- DELETE_SECURITY_CONTEXT_FN DeleteSecurityContext;
- APPLY_CONTROL_TOKEN_FN_W ApplyControlTokenW;
- QUERY_CONTEXT_ATTRIBUTES_FN_W QueryContextAttributesW;
- IMPERSONATE_SECURITY_CONTEXT_FN ImpersonateSecurityContext;
- REVERT_SECURITY_CONTEXT_FN RevertSecurityContext;
- MAKE_SIGNATURE_FN MakeSignature;
- VERIFY_SIGNATURE_FN VerifySignature;
- FREE_CONTEXT_BUFFER_FN FreeContextBuffer;
- QUERY_SECURITY_PACKAGE_INFO_FN_W QuerySecurityPackageInfoW;
- void SEC_FAR* Reserved3;
- void SEC_FAR* Reserved4;
- void SEC_FAR* Reserved5;
- void SEC_FAR* Reserved6;
- void SEC_FAR* Reserved7;
- void SEC_FAR* Reserved8;
- QUERY_SECURITY_CONTEXT_TOKEN_FN QuerySecurityContextToken;
- ENCRYPT_MESSAGE_FN EncryptMessage;
- DECRYPT_MESSAGE_FN DecryptMessage;
-} SecurityFunctionTableW, *PSecurityFunctionTableW;
-typedef struct _SECURITY_FUNCTION_TABLEA {
- unsigned long dwVersion;
- ENUMERATE_SECURITY_PACKAGES_FN_A EnumerateSecurityPackagesA;
- QUERY_CREDENTIALS_ATTRIBUTES_FN_A QueryCredentialsAttributesA;
- ACQUIRE_CREDENTIALS_HANDLE_FN_A AcquireCredentialsHandleA;
- FREE_CREDENTIALS_HANDLE_FN FreeCredentialsHandle;
- void SEC_FAR* Reserved2;
- INITIALIZE_SECURITY_CONTEXT_FN_A InitializeSecurityContextA;
- ACCEPT_SECURITY_CONTEXT_FN AcceptSecurityContext;
- COMPLETE_AUTH_TOKEN_FN CompleteAuthToken;
- DELETE_SECURITY_CONTEXT_FN DeleteSecurityContext;
- APPLY_CONTROL_TOKEN_FN_A ApplyControlTokenA;
- QUERY_CONTEXT_ATTRIBUTES_FN_A QueryContextAttributesA;
- IMPERSONATE_SECURITY_CONTEXT_FN ImpersonateSecurityContext;
- REVERT_SECURITY_CONTEXT_FN RevertSecurityContext;
- MAKE_SIGNATURE_FN MakeSignature;
- VERIFY_SIGNATURE_FN VerifySignature;
- FREE_CONTEXT_BUFFER_FN FreeContextBuffer;
- QUERY_SECURITY_PACKAGE_INFO_FN_A QuerySecurityPackageInfoA;
- void SEC_FAR* Reserved3;
- void SEC_FAR* Reserved4;
- void SEC_FAR* Unknown1;
- void SEC_FAR* Unknown2;
- void SEC_FAR* Unknown3;
- void SEC_FAR* Unknown4;
- void SEC_FAR* Unknown5;
- ENCRYPT_MESSAGE_FN EncryptMessage;
- DECRYPT_MESSAGE_FN DecryptMessage;
-} SecurityFunctionTableA, *PSecurityFunctionTableA;
-typedef PSecurityFunctionTableA (WINAPI *INIT_SECURITY_INTERFACE_A)(VOID);
-typedef PSecurityFunctionTableW (WINAPI *INIT_SECURITY_INTERFACE_W)(VOID);
-
-SECURITY_STATUS WINAPI FreeCredentialsHandle(PCredHandle);
-SECURITY_STATUS WINAPI EnumerateSecurityPackagesA(PULONG,PSecPkgInfoA*);
-SECURITY_STATUS WINAPI EnumerateSecurityPackagesW(PULONG,PSecPkgInfoW*);
-SECURITY_STATUS WINAPI AcquireCredentialsHandleA(SEC_CHAR*,SEC_CHAR*,ULONG,PLUID,PVOID,SEC_GET_KEY_FN,PVOID,PCredHandle,PTimeStamp);
-SECURITY_STATUS WINAPI AcquireCredentialsHandleW(SEC_WCHAR*,SEC_WCHAR*,ULONG,PLUID,PVOID,SEC_GET_KEY_FN,PVOID,PCredHandle,PTimeStamp);
-SECURITY_STATUS WINAPI AcceptSecurityContext(PCredHandle,PCtxtHandle,PSecBufferDesc,ULONG,ULONG,PCtxtHandle,PSecBufferDesc,PULONG,PTimeStamp);
-SECURITY_STATUS WINAPI InitializeSecurityContextA(PCredHandle,PCtxtHandle,SEC_CHAR*,ULONG,ULONG,ULONG,PSecBufferDesc,ULONG,PCtxtHandle,PSecBufferDesc,PULONG,PTimeStamp);
-SECURITY_STATUS WINAPI InitializeSecurityContextW(PCredHandle,PCtxtHandle,SEC_WCHAR*,ULONG,ULONG,ULONG,PSecBufferDesc,ULONG,PCtxtHandle,PSecBufferDesc,PULONG,PTimeStamp);
-SECURITY_STATUS WINAPI FreeContextBuffer(PVOID);
-SECURITY_STATUS WINAPI QueryContextAttributesA(PCtxtHandle,ULONG,PVOID);
-SECURITY_STATUS WINAPI QueryContextAttributesW(PCtxtHandle,ULONG,PVOID);
-SECURITY_STATUS WINAPI QueryCredentialsAttributesA(PCredHandle,ULONG,PVOID);
-SECURITY_STATUS WINAPI QueryCredentialsAttributesW(PCredHandle,ULONG,PVOID);
-SECURITY_STATUS WINAPI DecryptMessage(PCtxtHandle,PSecBufferDesc,ULONG,PULONG);
-SECURITY_STATUS WINAPI EncryptMessage(PCtxtHandle,ULONG,PSecBufferDesc,ULONG);
-SECURITY_STATUS WINAPI DeleteSecurityContext(PCtxtHandle);
-SECURITY_STATUS WINAPI CompleteAuthToken(PCtxtHandle,PSecBufferDesc);
-SECURITY_STATUS WINAPI ApplyControlTokenA(PCtxtHandle,PSecBufferDesc);
-SECURITY_STATUS WINAPI ApplyControlTokenW(PCtxtHandle,PSecBufferDesc);
-SECURITY_STATUS WINAPI ImpersonateSecurityContext(PCtxtHandle);
-SECURITY_STATUS WINAPI RevertSecurityContext(PCtxtHandle);
-SECURITY_STATUS WINAPI MakeSignature(PCtxtHandle,ULONG,PSecBufferDesc,ULONG);
-SECURITY_STATUS WINAPI VerifySignature(PCtxtHandle,PSecBufferDesc,ULONG,PULONG);
-SECURITY_STATUS WINAPI QuerySecurityPackageInfoA(SEC_CHAR*,PSecPkgInfoA*);
-SECURITY_STATUS WINAPI QuerySecurityPackageInfoW(SEC_WCHAR*,PSecPkgInfoW*);
-PSecurityFunctionTableA WINAPI InitSecurityInterfaceA(VOID);
-PSecurityFunctionTableW WINAPI InitSecurityInterfaceW(VOID);
-
-#ifdef UNICODE
-#define UNISP_NAME UNISP_NAME_W
-#define SecPkgInfo SecPkgInfoW
-#define PSecPkgInfo PSecPkgInfoW
-#define SecPkgCredentials_Names SecPkgCredentials_NamesW
-#define PSecPkgCredentials_Names PSecPkgCredentials_NamesW
-#define SecPkgContext_Authority SecPkgContext_AuthorityW
-#define PSecPkgContext_Authority PSecPkgContext_AuthorityW
-#define SecPkgContext_KeyInfo SecPkgContext_KeyInfoW
-#define PSecPkgContext_KeyInfo PSecPkgContext_KeyInfoW
-#define SecPkgContext_Names SecPkgContext_NamesW
-#define PSecPkgContext_Names PSecPkgContext_NamesW
-#define SecurityFunctionTable SecurityFunctionTableW
-#define PSecurityFunctionTable PSecurityFunctionTableW
-#define AcquireCredentialsHandle AcquireCredentialsHandleW
-#define EnumerateSecurityPackages EnumerateSecurityPackagesW
-#define InitializeSecurityContext InitializeSecurityContextW
-#define QueryContextAttributes QueryContextAttributesW
-#define QueryCredentialsAttributes QueryCredentialsAttributesW
-#define QuerySecurityPackageInfo QuerySecurityPackageInfoW
-#define ApplyControlToken ApplyControlTokenW
-#define ENUMERATE_SECURITY_PACKAGES_FN ENUMERATE_SECURITY_PACKAGES_FN_W
-#define QUERY_CREDENTIALS_ATTRIBUTES_FN QUERY_CREDENTIALS_ATTRIBUTES_FN_W
-#define ACQUIRE_CREDENTIALS_HANDLE_FN ACQUIRE_CREDENTIALS_HANDLE_FN_W
-#define INITIALIZE_SECURITY_CONTEXT_FN INITIALIZE_SECURITY_CONTEXT_FN_W
-#define APPLY_CONTROL_TOKEN_FN APPLY_CONTROL_TOKEN_FN_W
-#define QUERY_CONTEXT_ATTRIBUTES_FN QUERY_CONTEXT_ATTRIBUTES_FN_W
-#define QUERY_SECURITY_PACKAGE_INFO_FN QUERY_SECURITY_PACKAGE_INFO_FN_W
-#define INIT_SECURITY_INTERFACE INIT_SECURITY_INTERFACE_W
-#else
-#define UNISP_NAME UNISP_NAME_A
-#define SecPkgInfo SecPkgInfoA
-#define PSecPkgInfo PSecPkgInfoA
-#define SecPkgCredentials_Names SecPkgCredentials_NamesA
-#define PSecPkgCredentials_Names PSecPkgCredentials_NamesA
-#define SecPkgContext_Authority SecPkgContext_AuthorityA
-#define PSecPkgContext_Authority PSecPkgContext_AuthorityA
-#define SecPkgContext_KeyInfo SecPkgContext_KeyInfoA
-#define PSecPkgContext_KeyInfo PSecPkgContext_KeyInfoA
-#define SecPkgContext_Names SecPkgContext_NamesA
-#define PSecPkgContext_Names PSecPkgContext_NamesA
-#define SecurityFunctionTable SecurityFunctionTableA
-#define PSecurityFunctionTable PSecurityFunctionTableA
-#define AcquireCredentialsHandle AcquireCredentialsHandleA
-#define EnumerateSecurityPackages EnumerateSecurityPackagesA
-#define InitializeSecurityContext InitializeSecurityContextA
-#define QueryContextAttributes QueryContextAttributesA
-#define QueryCredentialsAttributes QueryCredentialsAttributesA
-#define QuerySecurityPackageInfo QuerySecurityPackageInfoA
-#define ApplyControlToken ApplyControlTokenA
-#define ENUMERATE_SECURITY_PACKAGES_FN ENUMERATE_SECURITY_PACKAGES_FN_A
-#define QUERY_CREDENTIALS_ATTRIBUTES_FN QUERY_CREDENTIALS_ATTRIBUTES_FN_A
-#define ACQUIRE_CREDENTIALS_HANDLE_FN ACQUIRE_CREDENTIALS_HANDLE_FN_A
-#define INITIALIZE_SECURITY_CONTEXT_FN INITIALIZE_SECURITY_CONTEXT_FN_A
-#define APPLY_CONTROL_TOKEN_FN APPLY_CONTROL_TOKEN_FN_A
-#define QUERY_CONTEXT_ATTRIBUTES_FN QUERY_CONTEXT_ATTRIBUTES_FN_A
-#define QUERY_SECURITY_PACKAGE_INFO_FN QUERY_SECURITY_PACKAGE_INFO_FN_A
-#define INIT_SECURITY_INTERFACE INIT_SECURITY_INTERFACE_A
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/stm.h b/winsup/w32api/include/stm.h
deleted file mode 100644
index 2b8e10f..0000000
--- a/winsup/w32api/include/stm.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef _STM_H
-#define _STM_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if (_WIN32_WINNT >= 0x0500)
-typedef struct _IPX_SERVER_ENTRY {
- USHORT Type;
- UCHAR Name[48];
- UCHAR Network[4];
- UCHAR Node[6];
- UCHAR Socket[2];
- USHORT HopCount;
-} IPX_SERVER_ENTRY,*PIPX_SERVER_ENTRY;
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/strmif.h b/winsup/w32api/include/strmif.h
deleted file mode 100644
index 38cbc96..0000000
--- a/winsup/w32api/include/strmif.h
+++ /dev/null
@@ -1,1159 +0,0 @@
-#ifndef _STRMIF_H
-#define _STRMIF_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- DirectShow Reference - DirectShow Enumerated Types - TVAudioMode Enumeration */
-#define TVAUDIO_MODE_MASK 0x000000FF
-#define TVAUDIO_PRESET_MASK 0x0000FF00
-/*--- DirectShow Reference - DirectShow Data Types */
-typedef LONGLONG REFERENCE_TIME;
-typedef double REFTIME;
-/*--- DirectShow Reference - Constants and GUIDs */
-enum {
- MERIT_PREFERRED = 0x800000,
- MERIT_NORMAL = 0x600000,
- MERIT_UNLIKELY = 0x400000,
- MERIT_DO_NOT_USE = 0x200000,
- MERIT_SW_COMPRESSOR = 0x100000,
- MERIT_HW_COMPRESSOR = 0x100050
-};
-/*--- DirectShow Reference - DirectShow Enumerated Types */
-typedef enum _AM_AUDIO_RENDERER_STAT_PARAM {
- AM_AUDREND_STAT_PARAM_BREAK_COUNT = 1,
- AM_AUDREND_STAT_PARAM_SLAVE_MODE,
- AM_AUDREND_STAT_PARAM_SILENCE_DUR,
- AM_AUDREND_STAT_PARAM_LAST_BUFFER_DUR,
- AM_AUDREND_STAT_PARAM_DISCONTINUITIES,
- AM_AUDREND_STAT_PARAM_SLAVE_RATE,
- AM_AUDREND_STAT_PARAM_SLAVE_DROPWRITE_DUR,
- AM_AUDREND_STAT_PARAM_SLAVE_HIGHLOWERROR,
- AM_AUDREND_STAT_PARAM_SLAVE_LASTHIGHLOWERROR,
- AM_AUDREND_STAT_PARAM_SLAVE_ACCUMERROR,
- AM_AUDREND_STAT_PARAM_BUFFERFULLNESS,
- AM_AUDREND_STAT_PARAM_JITTER
-} AM_AUDIO_RENDERER_STAT_PARAM;
-typedef enum _AM_DVD_GRAPH_FLAGS {
- AM_DVD_HWDEC_PREFER = 0x01,
- AM_DVD_HWDEC_ONLY = 0x02,
- AM_DVD_SWDEC_PREFER = 0x04,
- AM_DVD_SWDEC_ONLY = 0x08,
- AM_DVD_NOVPE = 0x100,
- AM_DVD_VMR9_ONLY = 0x800,
- AM_DVD_EVR_ONLY = 0x1000
-} AM_DVD_GRAPH_FLAGS;
-typedef enum _AM_DVD_STREAM_FLAGS {
- AM_DVD_STREAM_VIDEO = 0x01,
- AM_DVD_STREAM_AUDIO = 0x02,
- AM_DVD_STREAM_SUBPIC = 0x04
-} AM_DVD_STREAM_FLAGS;
-typedef enum _AM_FILTER_MISC_FLAGS {
- AM_FILTER_MISC_FLAGS_IS_RENDERER = 0x00000001,
- AM_FILTER_MISC_FLAGS_IS_SOURCE = 0x00000002
-} AM_FILTER_MISC_FLAGS;
-typedef enum _AM_GRAPH_CONFIG_RECONNECT_FLAGS {
- AM_GRAPH_CONFIG_RECONNECT_DIRECTCONNECT = 0x00000001,
- AM_GRAPH_CONFIG_RECONNECT_CACHE_REMOVED_FILTERS = 0x00000002,
- AM_GRAPH_CONFIG_RECONNECT_USE_ONLY_CACHED_FILTERS = 0x00000004
-} AM_GRAPH_CONFIG_RECONNECT_FLAGS;
-typedef enum _AM_INTF_SEARCH_FLAGS {
- AM_INTF_SEARCH_INPUT_PIN = 0x00000001,
- AM_INTF_SEARCH_OUTPUT_PIN = 0x00000002,
- AM_INTF_SEARCH_FILTER = 0x00000004
-} AM_INTF_SEARCH_FLAGS;
-typedef enum _AM_OVERLAY_NOTIFY_FLAGS {
- AM_OVERLAY_NOTIFY_VISIBLE_CHANGE = 0x00000001,
- AM_OVERLAY_NOTIFY_SOURCE_CHANGE = 0x00000002,
- AM_OVERLAY_NOTIFY_DEST_CHANGE = 0x00000004
-} AM_OVERLAY_NOTIFY_FLAGS;
-typedef enum _AM_PIN_CONNECTION_BLOCK_FLAGS {
- AM_PIN_FLOW_CONTROL_BLOCK = 0x00000001,
- AM_PIN_PUSH_THROUGH_DATA = 0x00000002
-} AM_PIN_CONNECTION_BLOCK_FLAGS;
-typedef enum _AM_PUSHSOURCE_FLAGS {
- AM_PUSHSOURCECAPS_INTERNAL_RM = 0x00000001,
- AM_PUSHSOURCECAPS_NOT_LIVE = 0x00000002,
- AM_PUSHSOURCECAPS_PRIVATE_CLOCK = 0x00000004,
- AM_PUSHSOURCEREQS_USE_STREAM_CLOCK = 0x00010000
-} AM_PUSHSOURCE_FLAGS;
-typedef enum tagAM_SAMPLE_PROPERTY_FLAGS {
- AM_SAMPLE_SPLICEPOINT = 0x01,
- AM_SAMPLE_PREROLL = 0x02,
- AM_SAMPLE_DATADISCONTINUITY = 0x04,
- AM_SAMPLE_TYPECHANGED = 0x08,
- AM_SAMPLE_TIMEVALID = 0x10,
- AM_SAMPLE_TIMEDISCONTINUITY = 0x40,
- AM_SAMPLE_FLUSH_ON_PAUSE = 0x80,
- AM_SAMPLE_STOPVALID = 0x100,
- AM_SAMPLE_ENDOFSTREAM = 0x200,
- AM_STREAM_MEDIA = 0,
- AM_STREAM_CONTROL = 1
-} AM_SAMPLE_PROPERTY_FLAGS;
-typedef enum AM_SEEKING_SeekingCapabilities {
- AM_SEEKING_CanSeekAbsolute = 0x1,
- AM_SEEKING_CanSeekForwards = 0x2,
- AM_SEEKING_CanSeekBackwards = 0x4,
- AM_SEEKING_CanGetCurrentPos = 0x8,
- AM_SEEKING_CanGetStopPos = 0x10,
- AM_SEEKING_CanGetDuration = 0x20,
- AM_SEEKING_CanPlayBackwards = 0x40,
- AM_SEEKING_CanDoSegments = 0x80,
- AM_SEEKING_Source = 0x100
-} AM_SEEKING_SEEKING_CAPABILITIES;
-typedef enum {
- AM_STREAM_INFO_START_DEFINED = 0x00000001,
- AM_STREAM_INFO_STOP_DEFINED = 0x00000002,
- AM_STREAM_INFO_DISCARDING = 0x00000004,
- AM_STREAM_INFO_STOP_SEND_EXTRA = 0x00000010
-} AM_STREAM_INFO_FLAGS;
-enum AMOVERLAYFX {
- AMOVERFX_NOFX = 0x00000000,
- AMOVERFX_MIRRORLEFTRIGHT = 0x00000002,
- AMOVERFX_MIRRORUPDOWN = 0x00000004,
- AMOVERFX_DEINTERLACE = 0x00000008
-};
-typedef enum _AMRESCTL_RESERVEFLAGS {
- AMRESCTL_RESERVEFLAGS_RESERVE = 0x00,
- AMRESCTL_RESERVEFLAGS_UNRESERVE = 0x01
-} AMRESCTL_RESERVEFLAGS;
-typedef enum tagAMTunerModeType {
- AMTUNER_MODE_DEFAULT = 0x0000,
- AMTUNER_MODE_TV = 0x0001,
- AMTUNER_MODE_FM_RADIO = 0x0002,
- AMTUNER_MODE_AM_RADIO = 0x0004,
- AMTUNER_MODE_DSS = 0x0008
-} AMTunerModeType;
-typedef enum tagAnalogVideoStandard {
- AnalogVideo_None = 0x00000000,
- AnalogVideo_NTSC_M = 0x00000001,
- AnalogVideo_NTSC_M_J = 0x00000002,
- AnalogVideo_NTSC_433 = 0x00000004,
- AnalogVideo_PAL_B = 0x00000010,
- AnalogVideo_PAL_D = 0x00000020,
- AnalogVideo_PAL_H = 0x00000080,
- AnalogVideo_PAL_I = 0x00000100,
- AnalogVideo_PAL_M = 0x00000200,
- AnalogVideo_PAL_N = 0x00000400,
- AnalogVideo_PAL_60 = 0x00000800,
- AnalogVideo_SECAM_B = 0x00001000,
- AnalogVideo_SECAM_D = 0x00002000,
- AnalogVideo_SECAM_G = 0x00004000,
- AnalogVideo_SECAM_H = 0x00008000,
- AnalogVideo_SECAM_K = 0x00010000,
- AnalogVideo_SECAM_K1 = 0x00020000,
- AnalogVideo_SECAM_L = 0x00040000,
- AnalogVideo_SECAM_L1 = 0x00080000,
- AnalogVideo_PAL_N_COMBO = 0x00100000
-} AnalogVideoStandard;
-typedef enum {
- CameraControl_Flags_Auto = 0x0001,
- CameraControl_Flags_Manual = 0x0002
-} CameraControlFlags;
-typedef enum {
- CameraControl_Pan = 1,
- CameraControl_Tilt,
- CameraControl_Roll,
- CameraControl_Zoom,
- CameraControl_Exposure,
- CameraControl_Iris,
- CameraControl_Focus
-} CameraControlProperty;
-typedef enum {
- CompressionCaps_CanQuality = 0x01,
- CompressionCaps_CanCrunch = 0x02,
- CompressionCaps_CanKeyFrame = 0x04,
- CompressionCaps_CanBFrame = 0x08,
- CompressionCaps_CanWindow = 0x10
-} CompressionCaps;
-typedef enum {
- DECIMATION_LEGACY,
- DECIMATION_USE_DECODER_ONLY,
- DECIMATION_USE_VIDEOPORT_ONLY,
- DECIMATION_USE_OVERLAY_ONLY,
- DECIMATION_DEFAULT
-} DECIMATION_USAGE;
-typedef enum tagDVD_AUDIO_APPMODE {
- DVD_AudioMode_None = 0,
- DVD_AudioMode_Karaoke = 1,
- DVD_AudioMode_Surround = 2,
- DVD_AudioMode_Other = 3
-} DVD_AUDIO_APPMODE;
-typedef enum tagDVD_AUDIO_FORMAT {
- DVD_AudioFormat_AC3 = 0,
- DVD_AudioFormat_MPEG1 = 1,
- DVD_AudioFormat_MPEG1_DRC = 2,
- DVD_AudioFormat_MPEG2 = 3,
- DVD_AudioFormat_MPEG2_DRC = 4,
- DVD_AudioFormat_LPCM = 5,
- DVD_AudioFormat_DTS = 6,
- DVD_AudioFormat_SDDS = 7,
- DVD_AudioFormat_Other = 8
-} DVD_AUDIO_FORMAT;
-typedef enum tagDVD_AUDIO_LANG_EXT {
- DVD_AUD_EXT_NotSpecified = 0,
- DVD_AUD_EXT_Captions = 1,
- DVD_AUD_EXT_VisuallyImpaired = 2,
- DVD_AUD_EXT_DirectorComments1 = 3,
- DVD_AUD_EXT_DirectorComments2 = 4
-} DVD_AUDIO_LANG_EXT;
-typedef enum {
- DVD_CMD_FLAG_None = 0x00000000,
- DVD_CMD_FLAG_Flush = 0x00000001,
- DVD_CMD_FLAG_SendEvents = 0x00000002,
- DVD_CMD_FLAG_Block = 0x00000004,
- DVD_CMD_FLAG_StartWhenRendered = 0x00000008,
- DVD_CMD_FLAG_EndAfterRendered = 0x00000010
-} DVD_CMD_FLAGS;
-typedef enum tagDVD_DISC_SIDE {
- DVD_SIDE_A,
- DVD_SIDE_B
-} DVD_DISC_SIDE;
-typedef enum tagDVD_DOMAIN {
- DVD_DOMAIN_FirstPlay,
- DVD_DOMAIN_VideoManagerMenu,
- DVD_DOMAIN_VideoTitleSetMenu,
- DVD_DOMAIN_Title,
- DVD_DOMAIN_Stop
-} DVD_DOMAIN;
-typedef enum tagDVD_FRAMERATE {
- DVD_FPS_25 = 1,
- DVD_FPS_30NonDrop = 3
-} DVD_FRAMERATE;
-typedef enum tagDVD_KARAOKE_ASSIGNMENT {
- DVD_Assignment_reserved0 = 0,
- DVD_Assignment_reserved1 = 1,
- DVD_Assignment_LR = 2,
- DVD_Assignment_LRM = 3,
- DVD_Assignment_LR1 = 4,
- DVD_Assignment_LRM1 = 5,
- DVD_Assignment_LR12 = 6,
- DVD_Assignment_LRM12 = 7
-} DVD_KARAOKE_ASSIGNMENT;
-typedef enum tagDVD_KARAOKE_CONTENTS {
- DVD_Karaoke_GuideVocal1 = 0x0001,
- DVD_Karaoke_GuideVocal2 = 0x0002,
- DVD_Karaoke_GuideMelody1 = 0x0004,
- DVD_Karaoke_GuideMelody2 = 0x0008,
- DVD_Karaoke_GuideMelodyA = 0x0010,
- DVD_Karaoke_GuideMelodyB = 0x0020,
- DVD_Karaoke_SoundEffectA = 0x0040,
- DVD_Karaoke_SoundEffectB = 0x0080
-} DVD_KARAOKE_CONTENTS;
-typedef enum tagDVD_KARAOKE_DOWNMIX {
- DVD_Mix_0to0 = 0x0001,
- DVD_Mix_1to0 = 0x0002,
- DVD_Mix_2to0 = 0x0004,
- DVD_Mix_3to0 = 0x0008,
- DVD_Mix_4to0 = 0x0010,
- DVD_Mix_Lto0 = 0x0020,
- DVD_Mix_Rto0 = 0x0040,
- DVD_Mix_0to1 = 0x0100,
- DVD_Mix_1to1 = 0x0200,
- DVD_Mix_2to1 = 0x0400,
- DVD_Mix_3to1 = 0x0800,
- DVD_Mix_4to1 = 0x1000,
- DVD_Mix_Lto1 = 0x2000,
- DVD_Mix_Rto1 = 0x4000
-} DVD_KARAOKE_DOWNMIX;
-typedef enum tagDVD_MENU_ID {
- DVD_MENU_Title = 2,
- DVD_MENU_Root = 3,
- DVD_MENU_Subpicture = 4,
- DVD_MENU_Audio = 5,
- DVD_MENU_Angle = 6,
- DVD_MENU_Chapter = 7
-} DVD_MENU_ID;
-typedef enum {
- DVD_ResetOnStop = 1,
- DVD_NotifyParentalLevelChange = 2,
- DVD_HMSF_TimeCodeEvents = 3,
- DVD_AudioDuringFFwdRew = 4,
- DVD_EnableNonblockingAPIs = 5,
- DVD_CacheSizeInMB = 6,
- DVD_EnablePortableBookmarks = 7
-} DVD_OPTION_FLAG;
-typedef enum tagDVD_PARENTAL_LEVEL {
- DVD_PARENTAL_LEVEL_8 = 0x8000,
- DVD_PARENTAL_LEVEL_7 = 0x4000,
- DVD_PARENTAL_LEVEL_6 = 0x2000,
- DVD_PARENTAL_LEVEL_5 = 0x1000,
- DVD_PARENTAL_LEVEL_4 = 0x0800,
- DVD_PARENTAL_LEVEL_3 = 0x0400,
- DVD_PARENTAL_LEVEL_2 = 0x0200,
- DVD_PARENTAL_LEVEL_1 = 0x0100
-} DVD_PARENTAL_LEVEL;
-typedef enum tagDVD_PREFERRED_DISPLAY_MODE {
- DISPLAY_CONTENT_DEFAULT = 0,
- DISPLAY_16x9 = 1,
- DISPLAY_4x3_PANSCAN_PREFERRED = 2,
- DISPLAY_4x3_LETTERBOX_PREFERRED = 3
-} DVD_PREFERRED_DISPLAY_MODE;
-typedef enum tagDVD_RELATIVE_BUTTON {
- DVD_Relative_Upper = 1,
- DVD_Relative_Lower = 2,
- DVD_Relative_Left = 3,
- DVD_Relative_Right = 4
-} DVD_RELATIVE_BUTTON;
-typedef enum tagDVD_SUBPICTURE_LANG_EXT {
- DVD_SP_EXT_NotSpecified = 0,
- DVD_SP_EXT_Caption_Normal = 1,
- DVD_SP_EXT_Caption_Big = 2,
- DVD_SP_EXT_Caption_Children = 3,
- DVD_SP_EXT_CC_Normal = 5,
- DVD_SP_EXT_CC_Big = 6,
- DVD_SP_EXT_CC_Children = 7,
- DVD_SP_EXT_Forced = 9,
- DVD_SP_EXT_DirectorComments_Normal = 13,
- DVD_SP_EXT_DirectorComments_Big = 14,
- DVD_SP_EXT_DirectorComments_Children = 15
-} DVD_SUBPICTURE_LANG_EXT;
-typedef enum tagDVD_SUBPICTURE_TYPE {
- DVD_SPType_NotSpecified = 0,
- DVD_SPType_Language = 1,
- DVD_SPType_Other = 2
-} DVD_SUBPICTURE_TYPE;
-typedef enum tagDVD_SUBPICTURE_CODING {
- DVD_SPCoding_RunLength = 0,
- DVD_SPCoding_Extended = 1,
- DVD_SPCoding_Other = 2
-} DVD_SUBPICTURE_CODING;
-enum DVD_TextCharSet {
- DVD_CharSet_Unicode = 0,
- DVD_CharSet_ISO646 = 1,
- DVD_CharSet_JIS_Roman_Kanji = 2,
- DVD_CharSet_ISO8859_1 = 3,
- DVD_CharSet_ShiftJIS_Kanji_Roman_Katakana = 4
-};
-enum DVD_TextStringType {
- DVD_Struct_Volume = 0x01,
- DVD_Struct_Title = 0x02,
- DVD_Struct_ParentalID = 0x03,
- DVD_Struct_PartOfTitle = 0x04,
- DVD_Struct_Cell = 0x05,
- DVD_Stream_Audio = 0x10,
- DVD_Stream_Subpicture = 0x11,
- DVD_Stream_Angle = 0x12,
- DVD_Channel_Audio = 0x20,
- DVD_General_Name = 0x30,
- DVD_General_Comments = 0x31,
- DVD_Title_Series = 0x38,
- DVD_Title_Movie = 0x39,
- DVD_Title_Video = 0x3a,
- DVD_Title_Album = 0x3b,
- DVD_Title_Song = 0x3c,
- DVD_Title_Other = 0x3f,
- DVD_Title_Sub_Series = 0x40,
- DVD_Title_Sub_Movie = 0x41,
- DVD_Title_Sub_Video = 0x42,
- DVD_Title_Sub_Album = 0x43,
- DVD_Title_Sub_Song = 0x44,
- DVD_Title_Sub_Other = 0x47,
- DVD_Title_Orig_Series = 0x48,
- DVD_Title_Orig_Movie = 0x49,
- DVD_Title_Orig_Video = 0x4a,
- DVD_Title_Orig_Album = 0x4b,
- DVD_Title_Orig_Song = 0x4c,
- DVD_Title_Orig_Other = 0x4f,
- DVD_Other_Scene = 0x50,
- DVD_Other_Cut = 0x51,
- DVD_Other_Take = 0x52
-};
-typedef enum tagDVD_TIMECODE_FLAGS {
- DVD_TC_FLAG_25fps = 0x00000001,
- DVD_TC_FLAG_30fps = 0x00000002,
- DVD_TC_FLAG_DropFrame = 0x00000004,
- DVD_TC_FLAG_Interpolated = 0x00000008
-} DVD_TIMECODE_FLAGS;
-typedef enum tagDVD_TITLE_APPMODE {
- DVD_AppMode_Not_Specified = 0,
- DVD_AppMode_Karaoke = 1,
- DVD_AppMode_Other = 3
-} DVD_TITLE_APPMODE;
-typedef enum tagDVD_VIDEO_COMPRESSION {
- DVD_VideoCompression_Other = 0,
- DVD_VideoCompression_MPEG1 = 1,
- DVD_VideoCompression_MPEG2 = 2
-} DVD_VIDEO_COMPRESSION;
-typedef enum _DVDECODERRESOLUTION {
- DVDECODERRESOLUTION_720x480 = 1000,
- DVDECODERRESOLUTION_360x240 = 1001,
- DVDECODERRESOLUTION_180x120 = 1002,
- DVDECODERRESOLUTION_88x60 = 1003
-} DVDECODERRESOLUTION;
-typedef enum _DVRESOLUTION {
- DVRESOLUTION_FULL = 1000,
- DVRESOLUTION_HALF = 1001,
- DVRESOLUTION_QUARTER = 1002,
- DVRESOLUTION_DC = 1003
-} DVRESOLUTION;
-typedef enum _DVENCODERFORMAT {
- DVENCODERFORMAT_DVSD = 2007,
- DVENCODERFORMAT_DVHD = 2008,
- DVENCODERFORMAT_DVSL = 2009
-} DVENCODERFORMAT;
-typedef enum _DVENCODERRESOLUTION {
- DVENCODERRESOLUTION_720x480 = 2012,
- DVENCODERRESOLUTION_360x240 = 2013,
- DVENCODERRESOLUTION_180x120 = 2014,
- DVENCODERRESOLUTION_88x60 = 2015
-} DVENCODERRESOLUTION;
-typedef enum _DVENCODERVIDEOFORMAT {
- DVENCODERVIDEOFORMAT_NTSC = 2000,
- DVENCODERVIDEOFORMAT_PAL = 2001
-} DVENCODERVIDEOFORMAT;
-typedef enum _FilterState {
- State_Stopped,
- State_Paused,
- State_Running
-} FILTER_STATE;
-typedef enum {
- INTERLEAVE_NONE,
- INTERLEAVE_CAPTURE,
- INTERLEAVE_FULL,
- INTERLEAVE_NONE_BUFFERED
-} InterleavingMode;
-typedef enum {
- PhysConn_Video_Tuner = 1,
- PhysConn_Video_Composite,
- PhysConn_Video_SVideo,
- PhysConn_Video_RGB,
- PhysConn_Video_YRYBY,
- PhysConn_Video_SerialDigital,
- PhysConn_Video_ParallelDigital,
- PhysConn_Video_SCSI,
- PhysConn_Video_AUX,
- PhysConn_Video_1394,
- PhysConn_Video_USB,
- PhysConn_Video_VideoDecoder,
- PhysConn_Video_VideoEncoder,
- PhysConn_Video_SCART,
- PhysConn_Video_Black,
- PhysConn_Audio_Tuner = 4096,
- PhysConn_Audio_Line,
- PhysConn_Audio_Mic,
- PhysConn_Audio_AESDigital,
- PhysConn_Audio_SPDIFDigital,
- PhysConn_Audio_SCSI,
- PhysConn_Audio_AUX,
- PhysConn_Audio_1394,
- PhysConn_Audio_USB,
- PhysConn_Audio_AudioDecoder
-} PhysicalConnectorType;
-typedef enum _PinDirection {
- PINDIR_INPUT,
- PINDIR_OUTPUT
-} PIN_DIRECTION;
-typedef enum {
- Famine,
- Flood
-} QualityMessageType;
-enum {
- REG_PINFLAG_B_ZERO = 0x1,
- REG_PINFLAG_B_RENDERER = 0x2,
- REG_PINFLAG_B_MANY = 0x4,
- REG_PINFLAG_B_OUTPUT = 0x8
-} REG_PINFLAG;
-typedef enum _REM_FILTER_FLAGS {
- REMFILTERF_LEAVECONNECTED = 0x00000001
-} REM_FILTER_FLAGS;
-typedef enum {
- TunerInputCable,
- TunerInputAntenna
-} TunerInputType;
-typedef enum tagTVAudioMode {
- AMTVAUDIO_MODE_MONO = 0x0001,
- AMTVAUDIO_MODE_STEREO = 0x0002,
- AMTVAUDIO_MODE_LANG_A = 0x0010,
- AMTVAUDIO_MODE_LANG_B = 0x0020,
- AMTVAUDIO_MODE_LANG_C = 0x0040,
- AMTVAUDIO_PRESET_STEREO = 0x0200,
- AMTVAUDIO_PRESET_LANG_A = 0x1000,
- AMTVAUDIO_PRESET_LANG_B = 0x2000,
- AMTVAUDIO_PRESET_LANG_C = 0x4000
-} TVAudioMode;
-typedef enum {
- UOP_FLAG_Play_Title_Or_AtTime = 0x00000001,
- UOP_FLAG_Play_Chapter = 0x00000002,
- UOP_FLAG_Play_Title = 0x00000004,
- UOP_FLAG_Stop = 0x00000008,
- UOP_FLAG_ReturnFromSubMenu = 0x00000010,
- UOP_FLAG_Play_Chapter_Or_AtTime = 0x00000020,
- UOP_FLAG_PlayPrev_Or_Replay_Chapter = 0x00000040,
- UOP_FLAG_PlayNext_Chapter = 0x00000080,
- UOP_FLAG_Play_Forwards = 0x00000100,
- UOP_FLAG_Play_Backwards = 0x00000200,
- UOP_FLAG_ShowMenu_Title = 0x00000400,
- UOP_FLAG_ShowMenu_Root = 0x00000800,
- UOP_FLAG_ShowMenu_SubPic = 0x00001000,
- UOP_FLAG_ShowMenu_Audio = 0x00002000,
- UOP_FLAG_ShowMenu_Angle = 0x00004000,
- UOP_FLAG_ShowMenu_Chapter = 0x00008000,
- UOP_FLAG_Resume = 0x00010000,
- UOP_FLAG_Select_Or_Activate_Button = 0x00020000,
- UOP_FLAG_Still_Off = 0x00040000,
- UOP_FLAG_Pause_On = 0x00080000,
- UOP_FLAG_Select_Audio_Stream = 0x00100000,
- UOP_FLAG_Select_SubPic_Stream = 0x00200000,
- UOP_FLAG_Select_Angle = 0x00400000,
- UOP_FLAG_Select_Karaoke_Audio_Presentation_Mode = 0x00800000,
- UOP_FLAG_Select_Video_Mode_Preference = 0x01000000
-} VALID_UOP_FLAG;
-typedef enum {
- VfwCaptureDialog_Source = 0x01,
- VfwCaptureDialog_Format = 0x02,
- VfwCaptureDialog_Display = 0x04
-} VfwCaptureDialogs;
-typedef enum {
- VfwCompressDialog_Config = 0x01,
- VfwCompressDialog_About = 0x02,
- VfwCompressDialog_QueryConfig = 0x04,
- VfwCompressDialog_QueryAbout = 0x08
-} VfwCompressDialogs;
-typedef enum tagVideoControlFlags {
- VideoControlFlag_FlipHorizontal = 0x0001,
- VideoControlFlag_FlipVertical = 0x0002,
- VideoControlFlag_ExternalTriggerEnable = 0x0004,
- VideoControlFlag_Trigger = 0x0008
-} VideoControlFlags;
-typedef enum {
- ConstantBitRate = 0,
- VariableBitRateAverage,
- VariableBitRatePeak
-} VIDEOENCODER_BITRATE_MODE;
-typedef enum tagVideoProcAmpFlags {
- VideoProcAmp_Flags_Auto = 0x0001,
- VideoProcAmp_Flags_Manual = 0x0002
-} VideoProcAmpFlags;
-typedef enum tagVideoProcAmpProperty {
- VideoProcAmp_Brightness,
- VideoProcAmp_Contrast,
- VideoProcAmp_Hue,
- VideoProcAmp_Saturation,
- VideoProcAmp_Sharpness,
- VideoProcAmp_Gamma,
- VideoProcAmp_ColorEnable,
- VideoProcAmp_WhiteBalance,
- VideoProcAmp_BacklightCompensation,
- VideoProcAmp_Gain
-} VideoProcAmpProperty;
-enum VMR_ASPECT_RATIO_MODE {
- VMR_ARMODE_NONE,
- VMR_ARMODE_LETTER_BOX
-};
-typedef enum {
- DeinterlacePref_NextBest = 0x01,
- DeinterlacePref_BOB = 0x02,
- DeinterlacePref_Weave = 0x04,
- DeinterlacePref_Mask = 0x07
-} VMRDeinterlacePrefs;
-typedef enum {
- DeinterlaceTech_Unknown = 0x0000,
- DeinterlaceTech_BOBLineReplicate = 0x0001,
- DeinterlaceTech_BOBVerticalStretch = 0x0002,
- DeinterlaceTech_MedianFiltering = 0x0004,
- DeinterlaceTech_EdgeFiltering = 0x0010,
- DeinterlaceTech_FieldAdaptive = 0x0020,
- DeinterlaceTech_PixelAdaptive = 0x0040,
- DeinterlaceTech_MotionVectorSteered = 0x0080
-} VMRDeinterlaceTech;
-typedef enum {
- MixerPref_NoDecimation = 0x00000001,
- MixerPref_DecimateOutput = 0x00000002,
- MixerPref_ARAdjustXorY = 0x00000004,
- MixerPref_DecimationReserved = 0x00000008,
- MixerPref_DecimateMask = 0x0000000F,
- MixerPref_BiLinearFiltering = 0x00000010,
- MixerPref_PointFiltering = 0x00000020,
- MixerPref_FilteringMask = 0x000000F0,
- MixerPref_RenderTargetRGB = 0x00000100,
- MixerPref_RenderTargetYUV = 0x00001000,
- MixerPref_RenderTargetYUV420 = 0x00000200,
- MixerPref_RenderTargetYUV422 = 0x00000400,
- MixerPref_RenderTargetYUV444 = 0x00000800,
- MixerPref_RenderTargetReserved = 0x0000E000,
- MixerPref_RenderTargetMask = 0x0000FF00,
- MixerPref_DynamicSwitchToBOB = 0x00010000,
- MixerPref_DynamicDecimateBy2 = 0x00020000,
- MixerPref_DynamicReserved = 0x000C0000,
- MixerPref_DynamicMask = 0x000F0000
-} VMRMixerPrefs;
-enum VMRMode {
- VMRMode_Windowed = 0x00000001,
- VMRMode_Windowless = 0x00000002,
- VMRMode_Renderless = 0x00000004,
- VMRMode_Mask = 0x00000007
-};
-typedef enum {
- VMRSample_SyncPoint = 0x00000001,
- VMRSample_Preroll = 0x00000002,
- VMRSample_Discontinuity = 0x00000004,
- VMRSample_TimeValid = 0x00000008
-} VMRPresentationFlags;
-typedef enum {
- RenderPrefs_ForceOffscreen = 0x00000001,
- RenderPrefs_ForceOverlays = 0x00000002,
- RenderPrefs_AllowOverlays = 0x00000000,
- RenderPrefs_AllowOffscreen = 0x00000000,
- RenderPrefs_DoNotRenderColorKeyAndBorder = 0x00000008,
- RenderPrefs_RestrictToInitialMonitor = 0x00000010,
- RenderPrefs_PreferAGPMemWhenMixing = 0x00000020,
- RenderPrefs_Mask = 0x0000003f
-} VMRRenderPrefs;
-typedef enum {
- AMAP_PIXELFORMAT_VALID = 0x01,
- AMAP_3D_TARGET = 0x02,
- AMAP_ALLOW_SYSMEM = 0x04,
- AMAP_FORCE_SYSMEM = 0x08,
- AMAP_DIRECTED_FLIP = 0x10,
- AMAP_DXVA_TARGET = 0x20
-} VMRSurfaceAllocationFlags;
-/*--- DirectShow Reference - DirectShow Structures */
-typedef struct _AllocatorProperties {
- long cBuffers;
- long cbBuffer;
- long cbAlign;
- long cbPrefix;
-} ALLOCATOR_PROPERTIES;
-typedef struct {
- HRESULT hrVPEStatus;
- BOOL bDvdVolInvalid;
- BOOL bDvdVolUnknown;
- BOOL bNoLine21In;
- BOOL bNoLine21Out;
- int iNumStreams;
- int iNumStreamsFailed;
- DWORD dwFailedStreamsFlag;
-} AM_DVD_RENDERSTATUS;
-typedef struct _AMCOPPCommand {
- GUID macKDI;
- GUID guidCommandID;
- DWORD dwSequence;
- DWORD cbSizeData;
- BYTE CommandData[4056];
-} AMCOPPCommand,*LPAMCOPPCommand;
-typedef struct _AMCOPPSignature {
- BYTE Signature[256];
-} AMCOPPSignature;
-typedef struct _AMCOPPStatusInput {
- GUID rApp;
- GUID guidStatusRequestID;
- DWORD dwSequence;
- DWORD cbSizeData;
- BYTE StatusData[4056];
-} AMCOPPStatusInput,*LPAMCOPPStatusInput;
-typedef struct _AMCOPPStatusOutput {
- GUID macKDI;
- DWORD cbSizeData;
- BYTE COPPStatus[4076];
-} AMCOPPStatusOutput,*LPAMCOPPStatusOutput;
-typedef struct _AMMediaType {
- GUID majortype;
- GUID subtype;
- BOOL bFixedSizeSamples;
- BOOL bTemporalCompression;
- ULONG lSampleSize;
- GUID formattype;
- IUnknown *pUnk;
- ULONG cbFormat;
- BYTE *pbFormat;
-} AM_MEDIA_TYPE;
-typedef struct tagAM_SAMPLE2_PROPERTIES {
- DWORD cbData;
- DWORD dwTypeSpecificFlags;
- DWORD dwSampleFlags;
- LONG lActual;
- REFERENCE_TIME tStart;
- REFERENCE_TIME tStop;
- DWORD dwStreamId;
- AM_MEDIA_TYPE *pMediaType;
- BYTE *pbBuffer;
- LONG cbBuffer;
-} AM_SAMPLE2_PROPERTIES;
-typedef struct {
- REFERENCE_TIME tStart;
- REFERENCE_TIME tStop;
- DWORD dwStartCookie;
- DWORD dwStopCookie;
- DWORD dwFlags;
-} AM_STREAM_INFO;
-typedef struct {
- const CLSID *clsMajorType;
- const CLSID *clsMinorType;
-} REGPINTYPES;
-typedef REGPINTYPES AMOVIESETUP_MEDIATYPE,*PAMOVIESETUP_MEDIATYPE,*LPAMOVIESETUP_MEDIATYPE;
-typedef struct {
- LPWSTR strName;
- BOOL bRendered;
- BOOL bOutput;
- BOOL bZero;
- BOOL bMany;
- const CLSID *clsConnectsToFilter;
- const WCHAR *strConnectsToPin;
- UINT nMediaTypes;
- const REGPINTYPES *lpMediaType;
-} REGFILTERPINS;
-typedef REGFILTERPINS AMOVIESETUP_PIN,*PAMOVIESETUP_PIN,*LPAMOVIESETUP_PIN;
-typedef struct _AMOVIESETUP_FILTER {
- const CLSID *clsID;
- const WCHAR *strName;
- DWORD dwMerit;
- UINT nPins;
- const AMOVIESETUP_PIN *lpPin;
-} AMOVIESETUP_FILTER,*PAMOVIESETUP_FILTER,*LPAMOVIESETUP_FILTER;
-typedef struct _AUDIO_STREAM_CONFIG_CAPS {
- GUID guid;
- ULONG MinimumChannels;
- ULONG MaximumChannels;
- ULONG ChannelsGranularity;
- ULONG MinimumBitsPerSample;
- ULONG MaximumBitsPerSample;
- ULONG BitsPerSampleGranularity;
- ULONG MinimumSampleFrequency;
- ULONG MaximumSampleFrequency;
- ULONG SampleFrequencyGranularity;
-} AUDIO_STREAM_CONFIG_CAPS;
-struct CodecAPIEventData {
- GUID guid;
- DWORD dataLength;
- DWORD reserved[3];
-};
-typedef struct tagCOLORKEY {
- DWORD KeyType;
- DWORD PaletteIndex;
- COLORREF LowColorValue;
- COLORREF HighColorValue;
-} COLORKEY;
-#define CK_NOCOLORKEY 0x00000000
-#define CK_INDEX 0x00000001
-#define CK_RGB 0x00000002
-typedef struct {
- DWORD dw1;
- DWORD dw2;
-} DDCOLORKEY;
-typedef struct tagDVD_AudioAttributes {
- DVD_AUDIO_APPMODE AppMode;
- DVD_AUDIO_FORMAT AudioFormat;
- LCID Language;
- DVD_AUDIO_LANG_EXT LanguageExtension;
- BOOL fHasMultichannelInfo;
- DWORD dwFrequency;
- BYTE bQuantization;
- BYTE bNumberOfChannels;
- DWORD dwReserved[2];
-} DVD_AudioAttributes;
-typedef struct tagDVD_DECODER_CAPS {
- DWORD dwSize;
- DWORD dwAudioCaps;
- double dFwdMaxRateVideo;
- double dFwdMaxRateAudio;
- double dFwdMaxRateSP;
- double dBwdMaxRateVideo;
- double dBwdMaxRateAudio;
- double dBwdMaxRateSP;
- DWORD dwRes1;
- DWORD dwRes2;
- DWORD dwRes3;
- DWORD dwRes4;
-} DVD_DECODER_CAPS;
-#define DVD_AUDIO_CAPS_AC3 0x00000001
-#define DVD_AUDIO_CAPS_MPEG2 0x00000002
-#define DVD_AUDIO_CAPS_LPCM 0x00000004
-#define DVD_AUDIO_CAPS_DTS 0x00000008
-#define DVD_AUDIO_CAPS_SDDS 0x00000010
-typedef struct tagDVD_HMSF_TIMECODE {
- BYTE bHours;
- BYTE bMinutes;
- BYTE bSeconds;
- BYTE bFrames;
-} DVD_HMSF_TIMECODE;
-typedef struct tagDVD_KaraokeAttributes {
- BYTE bVersion;
- BOOL fMasterOfCeremoniesInGuideVocal1;
- BOOL fDuet;
- DVD_KARAOKE_ASSIGNMENT ChannelAssignment;
- WORD wChannelContents[8];
-} DVD_KaraokeAttributes;
-typedef struct tagDVD_MUA_Coeff {
- double log2_alpha;
- double log2_beta;
-} DVD_MUA_Coeff;
-typedef struct tagDVD_MUA_MixingInfo {
- BOOL fMixTo0;
- BOOL fMixTo1;
- BOOL fMix0InPhase;
- BOOL fMix1InPhase;
- DWORD dwSpeakerPosition;
-} DVD_MUA_MixingInfo;
-#define KSAUDIO_SPEAKER_LEFT 0x00000001
-#define KSAUDIO_SPEAKER_RIGHT 0x00000002
-#define KSAUDIO_SPEAKER_CENTER 0x00000004
-#define KSAUDIO_SPEAKER_SURROUND_LEFT 0x00000008
-#define KSAUDIO_SPEAKER_SURROUND_RIGHT 0x00000010
-#define KSAUDIO_SPEAKER_SUBWOOFER 0x00000020
-#define KSAUDIO_SPEAKER_LEFT_OF_CENTER 0x00000040
-#define KSAUDIO_SPEAKER_RIGHT_OF_CENTER 0x00000080
-#define KSAUDIO_SPEAKER_SURROUND_MONO 0x00000100
-#define KSAUDIO_SPEAKER_SIDE_LEFT 0x00000200
-#define KSAUDIO_SPEAKER_SIDE_RIGHT 0x00000400
-#define KSAUDIO_SPEAKER_TOP 0x00000800
-typedef struct tagDVD_MultichannelAudioAttributes {
- DVD_MUA_MixingInfo Info[8];
- DVD_MUA_Coeff Coeff[8];
-} DVD_MultichannelAudioAttributes;
-typedef struct tagDVD_PLAYBACK_LOCATION {
- ULONG TitleNum;
- ULONG ChapterNum;
- ULONG TimeCode;
-} DVD_PLAYBACK_LOCATION;
-typedef struct tagDVD_PLAYBACK_LOCATION2 {
- ULONG TitleNum;
- ULONG ChapterNum;
- DVD_HMSF_TIMECODE TimeCode;
- ULONG TimeCodeFlags;
-} DVD_PLAYBACK_LOCATION2;
-typedef struct tagDVD_SubpictureAttributes {
- DVD_SUBPICTURE_TYPE Type;
- DVD_SUBPICTURE_CODING CodingMode;
- LCID Language;
- DVD_SUBPICTURE_LANG_EXT LanguageExtension;
-} DVD_SubpictureAttributes;
-typedef struct tagDVD_TIMECODE {
- ULONG Hours1:4;
- ULONG Hours10:4;
- ULONG Minutes1:4;
- ULONG Minutes10:4;
- ULONG Seconds1:4;
- ULONG Seconds10:4;
- ULONG Frames1:4;
- ULONG Frames10:2;
- ULONG FrameRateCode:2;
-} DVD_TIMECODE;
-typedef struct tagDVD_VideoAttributes {
- BOOL fPanscanPermitted;
- BOOL fLetterboxPermitted;
- ULONG ulAspectX;
- ULONG ulAspectY;
- ULONG ulFrameRate;
- ULONG ulFrameHeight;
- DVD_VIDEO_COMPRESSION Compression;
- BOOL fLine21Field1InGOP;
- BOOL fLine21Field2InGOP;
- ULONG ulSourceResolutionX;
- ULONG ulSourceResolutionY;
- BOOL fIsSourceLetterboxed;
- BOOL fIsFilmMode;
-} DVD_VideoAttributes;
-struct tagDVD_MenuAttributes {
- BOOL fCompatibleRegion[8];
- DVD_VideoAttributes VideoAttributes;
- BOOL fAudioPresent;
- DVD_AudioAttributes AudioAttributes;
- BOOL fSubpicturePresent;
- DVD_SubpictureAttributes SubpictureAttributes;
-} DVD_MenuAttributes;
-typedef struct tagDVD_TitleMainAttributes {
- DVD_TITLE_APPMODE AppMode;
- DVD_VideoAttributes VideoAttributes;
- ULONG ulNumberOfAudioStreams;
- DVD_AudioAttributes AudioAttributes[8];
- DVD_MultichannelAudioAttributes MultichannelAudioAttributes[8];
- ULONG ulNumberOfSubpictureStreams;
- DVD_SubpictureAttributes SubpictureAttributes[32];
-} DVD_TitleAttributes;
-typedef struct tag_DVINFO {
- DWORD dwDVAAuxSrc;
- DWORD dwDVAAuxCtl;
- DWORD dwDVAAuxSrc1;
- DWORD dwDVAAuxCtl1;
- DWORD dwDVVAuxSrc;
- DWORD dwDVVAuxCtl;
- DWORD dwDVReserved[2];
-} DVINFO,*PDVINFO;
-/***************
-#define MAX_FILTER_NAME 128
-typedef struct _FilterInfo {
- WCHAR achName[MAX_FILTER_NAME];
- IFilterGraph *pGraph;
-} FILTER_INFO;
-***************/
-typedef struct _NORMALIZEDRECT {
- float left;
- float top;
- float right;
- float bottom;
-} NORMALIZEDRECT,*PNORMALIZEDRECT;
-#define MAX_PIN_NAME 128
-typedef struct _PinInfo {
- IBaseFilter *pFilter;
- PIN_DIRECTION dir;
- WCHAR achName[MAX_PIN_NAME];
-} PIN_INFO;
-typedef struct{
- QualityMessageType Type;
- long Proportion;
- REFERENCE_TIME Late;
- REFERENCE_TIME TimeStamp;
-} Quality;
-typedef struct {
- CLSID clsMedium;
- DWORD dw1;
- DWORD dw2;
-} REGPINMEDIUM;
-typedef struct {
- DWORD dwFlags;
- UINT cInstances;
- UINT nMediaTypes;
- const REGPINTYPES *lpMediaType;
- UINT nMediums;
- const REGPINMEDIUM *lpMedium;
- const CLSID *clsPinCategory;
-} REGFILTERPINS2;
-typedef struct {
- DWORD dwVersion;
- DWORD dwMerit;
- union {
- struct {
- ULONG cPins;
- const REGFILTERPINS *rgPins;
- };
- struct {
- ULONG cPins2;
- const REGFILTERPINS2 *rgPins2;
- };
- };
-} REGFILTER2;
-typedef struct {
- ULONG stream_id;
- DWORD dwMediaSampleContent;
- ULONG ulSubstreamFilterValue;
- int iDataOffset;
-} STREAM_ID_MAP;
-#define MPEG2_PROGRAM_STREAM_MAP 0x00000000
-#define MPEG2_PROGRAM_ELEMENTARY_STREAM 0x00000001
-#define MPEG2_PROGRAM_DIRECTORY_PES_PACKET 0x00000002
-#define MPEG2_PROGRAM_PACK_HEADER 0x00000003
-#define MPEG2_PROGRAM_PES_STREAM 0x00000004
-#define MPEG2_PROGRAM_SYSTEM_HEADER 0x00000005
-#define SUBSTREAM_FILTER_VAL_NONE 0x10000000
-typedef struct tagTIMECODE {
- WORD wFrameRate;
- WORD wFrameFract;
- DWORD dwFrames;
-} TIMECODE;
-#define ED_FORMAT_SMPTE_30 0x00001196
-#define ED_FORMAT_SMPTE_30DROP 0x00001197
-#define ED_FORMAT_SMPTE_25 0x00001198
-#define ED_FORMAT_SMPTE_24 0x00001199
-typedef struct tagTIMECODE_SAMPLE {
- LONGLONG qwTick;
- TIMECODE timecode;
- DWORD dwUser;
- DWORD dwFlags;
-} TIMECODE_SAMPLE;
-/*#define AM_TIMECODE_FLAG_FCM */
-/*#define AM_TIMECODE_FLAG_CF */
-/*#define AM_TIMECODE_FLAG_FIELD */
-/*#define AM_TIMECODE_FLAG_DF */
-/*#define AM_TIMECODE_COLORFRAME */
-/*#define AM_TIMECODE_COLORSEQUENCE */
-/*#define AM_TIMECODE_FILMSEQUENCE_TYPE */
-typedef struct _VIDEO_STREAM_CONFIG_CAPS {
- GUID guid;
- ULONG VideoStandard;
- SIZE InputSize;
- SIZE MinCroppingSize;
- SIZE MaxCroppingSize;
- int CropGranularityX;
- int CropGranularityY;
- int CropAlignX;
- int CropAlignY;
- SIZE MinOutputSize;
- SIZE MaxOutputSize;
- int OutputGranularityX;
- int OutputGranularityY;
- int StretchTapsX;
- int StretchTapsY;
- int ShrinkTapsX;
- int ShrinkTapsY;
- LONGLONG MinFrameInterval;
- LONGLONG MaxFrameInterval;
- LONG MinBitsPerSecond;
- LONG MaxBitsPerSecond;
-} VIDEO_STREAM_CONFIG_CAPS;
-typedef struct tagVMRALLOCATIONINFO {
- DWORD dwFlags;
- LPBITMAPINFOHEADER lpHdr;
- LPDDPIXELFORMAT lpPixFmt;
- SIZE szAspectRatio;
- DWORD dwMinBuffers;
- DWORD dwMaxBuffers;
- DWORD dwInterlaceFlags;
- SIZE szNativeSize;
-} VMRALLOCATIONINFO;
-/**********
-typedef struct _VMRALPHABITMAP {
- DWORD dwFlags;
- HDC hdc;
- LPDIRECTDRAWSURFACE7 pDDS;
- RECT rSrc;
- NORMALIZEDRECT rDest;
- FLOAT fAlpha;
- COLORREF clrSrcKey;
-} VMRALPHABITMAP,*PVMRALPHABITMAP;
-**********/
-#define VMRBITMAP_DISABLE 0x00000001
-#define VMRBITMAP_HDC 0x00000002
-#define VMRBITMAP_ENTIREDDS 0x00000004
-#define VMRBITMAP_SRCCOLORKEY 0x00000008
-#define VMRBITMAP_SRCRECT 0x00000010
-typedef struct _VMRDeinterlaceCaps {
- DWORD dwSize;
- DWORD dwNumPreviousOutputFrames;
- DWORD dwNumForwardRefSamples;
- DWORD dwNumBackwardRefSamples;
- VMRDeinterlaceTech DeinterlaceTechnology;
-} VMRDeinterlaceCaps;
-typedef struct _VMRFrequency {
- DWORD dwNumerator;
- DWORD dwDenominator;
-} VMRFrequency;
-typedef struct tagVMRGUID {
- GUID *pGUID;
- GUID GUID;
-} VMRGUID;
-typedef struct tagVMRMONITORINFO {
- VMRGUID guid;
- RECT rcMonitor;
- HMONITOR hMon;
- DWORD dwFlags;
- wchar_t szDevice[32];
- wchar_t szDescription[256];
-} VMRMONITORINFO;
-/**********
-typedef struct tagVMRPRESENTATIONINFO {
- DWORD dwFlags;
- LPDIRECTDRAWSURFACE7 lpSurf;
- REFERENCE_TIME rtStart;
- REFERENCE_TIME rtEnd;
- SIZE szAspectRatio;
- RECT rcSrc;
- RECT rcDst;
- DWORD dwTypeSpecificFlags;
- DWORD dwInterlaceFlags;
-} VMRPRESENTATIONINFO;
-**********/
-typedef struct _VMRVideoDesc {
- DWORD dwSize;
- DWORD dwSampleWidth;
- DWORD dwSampleHeight;
- BOOL SingleFieldPerSample;
- DWORD dwFourCC;
- VMRFrequency InputSampleFreq;
- VMRFrequency OutputFrameFreq;
-} VMRVideoDesc;
-/**********
-typedef struct _VMRVIDEOSTREAMINFO {
- LPDIRECTDRAWSURFACE7 pddsVideoSurface;
- DWORD dwWidth;
- DWORD dwHeight;
- DWORD dwStrmID;
- FLOAT fAlpha;
- DDCOLORKEY ddClrKey;
- NORMALIZEDRECT rNormal;
-} VMRVIDEOSTREAMINFO;
-**********/
-/*--- DirectShow Reference - Interfaces */
-#define INTERFACE IAMAnalogVideoDecoder
-DECLARE_INTERFACE_(IAMAnalogVideoDecoder, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD_(HRESULT,get_AvailableTVFormats)(THIS_ long*) PURE;
- STDMETHOD_(HRESULT,get_HorizontalLocked)(THIS_ long*) PURE;
- STDMETHOD_(HRESULT,get_NumberOfLines)(THIS_ long*) PURE;
- STDMETHOD_(HRESULT,get_OutputEnable)(THIS_ long*) PURE;
- STDMETHOD_(HRESULT,get_TVFormat)(THIS_ long*) PURE;
- STDMETHOD_(HRESULT,get_VCRHorizontalLocking)(THIS_ long*) PURE;
- STDMETHOD_(HRESULT,put_OutputEnable)(THIS_ long) PURE;
- STDMETHOD_(HRESULT,put_TVFormat)(THIS_ long) PURE;
- STDMETHOD_(HRESULT,put_VCRHorizontalLocking)(THIS_ long) PURE;
-};
-#undef INTERFACE
-#define INTERFACE IAMAudioInputMixer
-DECLARE_INTERFACE_(IAMAudioInputMixer, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD_(HRESULT,get_Bass)(THIS_ double*) PURE;
- STDMETHOD_(HRESULT,get_BassRange)(THIS_ double*) PURE;
- STDMETHOD_(HRESULT,get_Enable)(THIS_ BOOL*) PURE;
- STDMETHOD_(HRESULT,get_Loudness)(THIS_ BOOL*) PURE;
- STDMETHOD_(HRESULT,get_MixLevel)(THIS_ double*) PURE;
- STDMETHOD_(HRESULT,get_Mono)(THIS_ BOOL*) PURE;
- STDMETHOD_(HRESULT,get_Pan)(THIS_ double*) PURE;
- STDMETHOD_(HRESULT,get_Treble)(THIS_ double*) PURE;
- STDMETHOD_(HRESULT,get_TrebleRange)(THIS_ double*) PURE;
- STDMETHOD_(HRESULT,put_Bass)(THIS_ double) PURE;
- STDMETHOD_(HRESULT,put_Enable)(THIS_ BOOL) PURE;
- STDMETHOD_(HRESULT,put_Loudness)(THIS_ BOOL) PURE;
- STDMETHOD_(HRESULT,put_MixLevel)(THIS_ double) PURE;
- STDMETHOD_(HRESULT,put_Mono)(THIS_ BOOL) PURE;
- STDMETHOD_(HRESULT,put_Pan)(THIS_ double) PURE;
- STDMETHOD_(HRESULT,put_Treble)(THIS_ double) PURE;
-};
-#undef INTERFACE
-#define INTERFACE IAMAudioRendererStats
-DECLARE_INTERFACE_(IAMAudioRendererStats, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD_(HRESULT,GetStatParam)(THIS_ DWORD,DWORD*,DWORD*) PURE;
-};
-#undef INTERFACE
-#define INTERFACE IAMBufferNegotiation
-DECLARE_INTERFACE_(IAMBufferNegotiation, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD_(HRESULT,GetAllocatorProperties)(THIS_ ALLOCATOR_PROPERTIES*) PURE;
- STDMETHOD_(HRESULT,SuggestAllocatorProperties)(THIS_ const ALLOCATOR_PROPERTIES*) PURE;
-};
-#undef INTERFACE
-#define INTERFACE IAMCameraControl
-DECLARE_INTERFACE_(IAMCameraControl, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD_(HRESULT,Get)(THIS_ long,long*,long*) PURE;
- STDMETHOD_(HRESULT,GetRange)(THIS_ long,long*,long*,long*,long*,long*) PURE;
- STDMETHOD_(HRESULT,Set)(THIS_ long,long,long) PURE;
-};
-#undef INTERFACE
-
-#define INTERFACE IAMCertifiedOutputProtection
-DECLARE_INTERFACE_(IAMCertifiedOutputProtection, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD_(HRESULT,KeyExchange)(THIS_ GUID*,BYTE**,DWORD*) PURE;
- STDMETHOD_(HRESULT,ProtectionCommand)(THIS_ const AMCOPPCommand*) PURE;
- STDMETHOD_(HRESULT,ProtectionStatus)(THIS_ const AMCOPPStatusInput*,AMCOPPStatusOutput*) PURE;
- STDMETHOD_(HRESULT,SessionSequenceStart)(THIS_ const AMCOPPSignature*) PURE;
-};
-#undef INTERFACE
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/subauth.h b/winsup/w32api/include/subauth.h
deleted file mode 100644
index 2c87f28..0000000
--- a/winsup/w32api/include/subauth.h
+++ /dev/null
@@ -1,209 +0,0 @@
-#ifndef _SUBAUTH_H
-#define _SUBAUTH_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifndef NT_SUCCESS
-#define NT_SUCCESS(x) ((x)>=0)
-#define STATUS_SUCCESS 0
-#endif
-#define CYPHER_BLOCK_LENGTH 8
-#define USER_SESSION_KEY_LENGTH (CYPHER_BLOCK_LENGTH*2)
-#define CLEAR_BLOCK_LENGTH 8
-#define MSV1_0_PASSTHRU 1
-#define MSV1_0_GUEST_LOGON 2
-#define MSV1_0_VALIDATION_LOGOFF_TIME 1
-#define MSV1_0_VALIDATION_KICKOFF_TIME 2
-#define MSV1_0_VALIDATION_LOGON_SERVER 4
-#define MSV1_0_VALIDATION_LOGON_DOMAIN 8
-#define MSV1_0_VALIDATION_SESSION_KEY 16
-#define MSV1_0_VALIDATION_USER_FLAGS 32
-#define MSV1_0_VALIDATION_USER_ID 64
-#define MSV1_0_SUBAUTH_ACCOUNT_DISABLED 1
-#define MSV1_0_SUBAUTH_PASSWORD 2
-#define MSV1_0_SUBAUTH_WORKSTATIONS 4
-#define MSV1_0_SUBAUTH_LOGON_HOURS 8
-#define MSV1_0_SUBAUTH_ACCOUNT_EXPIRY 16
-#define MSV1_0_SUBAUTH_PASSWORD_EXPIRY 32
-#define MSV1_0_SUBAUTH_ACCOUNT_TYPE 64
-#define MSV1_0_SUBAUTH_LOCKOUT 128
-#define NEXT_FREE_ACCOUNT_CONTROL_BIT 131072
-#define SAM_DAYS_PER_WEEK 7
-#define SAM_HOURS_PER_WEEK 168
-#define SAM_MINUTES_PER_WEEK 10080
-#define STATUS_INVALID_INFO_CLASS 0xC0000003L
-#define STATUS_NO_SUCH_USER 0xC0000064L
-#define STATUS_WRONG_PASSWORD 0xC000006AL
-#define STATUS_PASSWORD_RESTRICTION 0xC000006CL
-#define STATUS_LOGON_FAILURE 0xC000006DL
-#define STATUS_ACCOUNT_RESTRICTION 0xC000006EL
-#define STATUS_INVALID_LOGON_HOURS 0xC000006FL
-#define STATUS_INVALID_WORKSTATION 0xC0000070L
-#define STATUS_PASSWORD_EXPIRED 0xC0000071L
-#define STATUS_ACCOUNT_DISABLED 0xC0000072L
-#define STATUS_INSUFFICIENT_RESOURCES 0xC000009AL
-#define STATUS_ACCOUNT_EXPIRED 0xC0000193L
-#define STATUS_PASSWORD_MUST_CHANGE 0xC0000224L
-#define STATUS_ACCOUNT_LOCKED_OUT 0xC0000234L
-#define USER_ACCOUNT_DISABLED 1
-#define USER_HOME_DIRECTORY_REQUIRED 2
-#define USER_PASSWORD_NOT_REQUIRED 4
-#define USER_TEMP_DUPLICATE_ACCOUNT 8
-#define USER_NORMAL_ACCOUNT 16
-#define USER_MNS_LOGON_ACCOUNT 32
-#define USER_INTERDOMAIN_TRUST_ACCOUNT 64
-#define USER_WORKSTATION_TRUST_ACCOUNT 128
-#define USER_SERVER_TRUST_ACCOUNT 256
-#define USER_DONT_EXPIRE_PASSWORD 512
-#define USER_ACCOUNT_AUTO_LOCKED 1024
-#define USER_ENCRYPTED_TEXT_PASSWORD_ALLOWED 2048
-#define USER_SMARTCARD_REQUIRED 4096
-#define USER_TRUSTED_FOR_DELEGATION 8192
-#define USER_NOT_DELEGATED 16384
-#define USER_USE_DES_KEY_ONLY 32768
-#define USER_DONT_REQUIRE_PREAUTH 65536
-#define USER_MACHINE_ACCOUNT_MASK 448
-#define USER_ACCOUNT_TYPE_MASK 472
-#define USER_ALL_PARAMETERS 2097152
-#if !defined(_NTDEF_H) && !defined(_NTSECAPI_H)
-typedef LONG NTSTATUS, *PNTSTATUS;
-typedef struct _UNICODE_STRING {
- USHORT Length;
- USHORT MaximumLength;
- PWSTR Buffer;
-} UNICODE_STRING, *PUNICODE_STRING;
-typedef struct _STRING {
- USHORT Length;
- USHORT MaximumLength;
- PCHAR Buffer;
-} STRING, *PSTRING;
-#endif
-typedef PVOID SAM_HANDLE, *PSAM_HANDLE;
-typedef struct _OLD_LARGE_INTEGER {
- ULONG LowPart;
- LONG HighPart;
-} OLD_LARGE_INTEGER, *POLD_LARGE_INTEGER;
-typedef enum _NETLOGON_LOGON_INFO_CLASS {
- NetlogonInteractiveInformation = 1,NetlogonNetworkInformation,
- NetlogonServiceInformation,NetlogonGenericInformation,
- NetlogonInteractiveTransitiveInformation,NetlogonNetworkTransitiveInformation,
- NetlogonServiceTransitiveInformation
-} NETLOGON_LOGON_INFO_CLASS;
-typedef struct _CYPHER_BLOCK {
- CHAR data[CYPHER_BLOCK_LENGTH];
-} CYPHER_BLOCK, *PCYPHER_BLOCK;
-typedef struct _CLEAR_BLOCK {
- CHAR data[CLEAR_BLOCK_LENGTH];
-} CLEAR_BLOCK, *PCLEAR_BLOCK;
-typedef struct _LM_OWF_PASSWORD {
- CYPHER_BLOCK data[2];
-} LM_OWF_PASSWORD, *PLM_OWF_PASSWORD;
-typedef struct _USER_SESSION_KEY {
- CYPHER_BLOCK data[2];
-} USER_SESSION_KEY, *PUSER_SESSION_KEY;
-typedef CLEAR_BLOCK LM_CHALLENGE, *PLM_CHALLENGE;
-typedef LM_OWF_PASSWORD NT_OWF_PASSWORD, *PNT_OWF_PASSWORD;
-typedef LM_CHALLENGE NT_CHALLENGE, *PNT_CHALLENGE;
-typedef struct _LOGON_HOURS {
- USHORT UnitsPerWeek;
- PUCHAR LogonHours;
-} LOGON_HOURS, *PLOGON_HOURS;
-typedef struct _SR_SECURITY_DESCRIPTOR {
- ULONG Length;
- PUCHAR SecurityDescriptor;
-} SR_SECURITY_DESCRIPTOR, *PSR_SECURITY_DESCRIPTOR;
-#pragma pack(push,4)
-typedef struct _USER_ALL_INFORMATION {
- LARGE_INTEGER LastLogon;
- LARGE_INTEGER LastLogoff;
- LARGE_INTEGER PasswordLastSet;
- LARGE_INTEGER AccountExpires;
- LARGE_INTEGER PasswordCanChange;
- LARGE_INTEGER PasswordMustChange;
- UNICODE_STRING UserName;
- UNICODE_STRING FullName;
- UNICODE_STRING HomeDirectory;
- UNICODE_STRING HomeDirectoryDrive;
- UNICODE_STRING ScriptPath;
- UNICODE_STRING ProfilePath;
- UNICODE_STRING AdminComment;
- UNICODE_STRING WorkStations;
- UNICODE_STRING UserComment;
- UNICODE_STRING Parameters;
- UNICODE_STRING LmPassword;
- UNICODE_STRING NtPassword;
- UNICODE_STRING PrivateData;
- SR_SECURITY_DESCRIPTOR SecurityDescriptor;
- ULONG UserId;
- ULONG PrimaryGroupId;
- ULONG UserAccountControl;
- ULONG WhichFields;
- LOGON_HOURS LogonHours;
- USHORT BadPasswordCount;
- USHORT LogonCount;
- USHORT CountryCode;
- USHORT CodePage;
- BOOLEAN LmPasswordPresent;
- BOOLEAN NtPasswordPresent;
- BOOLEAN PasswordExpired;
- BOOLEAN PrivateDataSensitive;
-} USER_ALL_INFORMATION, *PUSER_ALL_INFORMATION;
-#pragma pack(pop)
-typedef struct _MSV1_0_VALIDATION_INFO {
- LARGE_INTEGER LogoffTime;
- LARGE_INTEGER KickoffTime;
- UNICODE_STRING LogonServer;
- UNICODE_STRING LogonDomainName;
- USER_SESSION_KEY SessionKey;
- BOOLEAN Authoritative;
- ULONG UserFlags;
- ULONG WhichFields;
- ULONG UserId;
-} MSV1_0_VALIDATION_INFO, *PMSV1_0_VALIDATION_INFO;
-typedef struct _NETLOGON_LOGON_IDENTITY_INFO {
- UNICODE_STRING LogonDomainName;
- ULONG ParameterControl;
- OLD_LARGE_INTEGER LogonId;
- UNICODE_STRING UserName;
- UNICODE_STRING Workstation;
-} NETLOGON_LOGON_IDENTITY_INFO, *PNETLOGON_LOGON_IDENTITY_INFO;
-typedef struct _NETLOGON_INTERACTIVE_INFO {
- NETLOGON_LOGON_IDENTITY_INFO Identity;
- LM_OWF_PASSWORD LmOwfPassword;
- NT_OWF_PASSWORD NtOwfPassword;
-} NETLOGON_INTERACTIVE_INFO, *PNETLOGON_INTERACTIVE_INFO;
-typedef struct _NETLOGON_GENERIC_INFO {
- NETLOGON_LOGON_IDENTITY_INFO Identity;
- UNICODE_STRING PackageName;
- ULONG DataLength;
- PUCHAR LogonData;
-} NETLOGON_GENERIC_INFO, *PNETLOGON_GENERIC_INFO;
-typedef struct _NETLOGON_NETWORK_INFO {
- NETLOGON_LOGON_IDENTITY_INFO Identity;
- LM_CHALLENGE LmChallenge;
- STRING NtChallengeResponse;
- STRING LmChallengeResponse;
-} NETLOGON_NETWORK_INFO, *PNETLOGON_NETWORK_INFO;
-typedef struct _NETLOGON_SERVICE_INFO {
- NETLOGON_LOGON_IDENTITY_INFO Identity;
- LM_OWF_PASSWORD LmOwfPassword;
- NT_OWF_PASSWORD NtOwfPassword;
-} NETLOGON_SERVICE_INFO, *PNETLOGON_SERVICE_INFO;
-NTSTATUS NTAPI Msv1_0SubAuthenticationRoutine(NETLOGON_LOGON_INFO_CLASS,PVOID,
- ULONG,PUSER_ALL_INFORMATION,PULONG,PULONG,
- PBOOLEAN,PLARGE_INTEGER,PLARGE_INTEGER);
-NTSTATUS NTAPI Msv1_0SubAuthenticationFilter(NETLOGON_LOGON_INFO_CLASS,PVOID,
- ULONG,PUSER_ALL_INFORMATION,PULONG,PULONG,
- PBOOLEAN,PLARGE_INTEGER,PLARGE_INTEGER);
-NTSTATUS NTAPI Msv1_0SubAuthenticationRoutineGeneric(PVOID,ULONG,PULONG,PVOID*);
-NTSTATUS NTAPI Msv1_0SubAuthenticationRoutineEx(NETLOGON_LOGON_INFO_CLASS,PVOID,
- ULONG,PUSER_ALL_INFORMATION,SAM_HANDLE,
- PMSV1_0_VALIDATION_INFO,PULONG);
-#ifdef __cplusplus
-}
-#endif
-#endif /* _SUBAUTH_H */
diff --git a/winsup/w32api/include/svcguid.h b/winsup/w32api/include/svcguid.h
deleted file mode 100644
index 6507280..0000000
--- a/winsup/w32api/include/svcguid.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef _SVCGUID_H
-#define _SVCGUID_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define SVCID_NETWARE(_SapId) \
- { (0x000B << 16) | (_SapId), 0, 0, { 0xC0,0,0,0,0,0,0,0x46 } }
-
-#define SAPID_FROM_SVCID_NETWARE(_g) \
- ((WORD)(_g->Data1 & 0xFFFF))
-
-#define SET_NETWARE_SVCID(_g,_SapId) { \
- (_g)->Data1 = (0x000B << 16 ) | (_SapId); \
- (_g)->Data2 = 0; \
- (_g)->Data3 = 0; \
- (_g)->Data4[0] = 0xC0; \
- (_g)->Data4[1] = 0x0; \
- (_g)->Data4[2] = 0x0; \
- (_g)->Data4[3] = 0x0; \
- (_g)->Data4[4] = 0x0; \
- (_g)->Data4[5] = 0x0; \
- (_g)->Data4[6] = 0x0; \
- (_g)->Data4[7] = 0x46; }
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/tlhelp32.h b/winsup/w32api/include/tlhelp32.h
deleted file mode 100644
index e928380..0000000
--- a/winsup/w32api/include/tlhelp32.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- tlhelp32.h - Include file for Tool help functions.
-
- Written by Mumit Khan <khan@nanotech.wisc.edu>
-
- This file is part of a free library for the Win32 API.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-#ifndef _TLHELP32_H
-#define _TLHELP32_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define HF32_DEFAULT 1
-#define HF32_SHARED 2
-#define LF32_FIXED 0x1
-#define LF32_FREE 0x2
-#define LF32_MOVEABLE 0x4
-#define MAX_MODULE_NAME32 255
-#define TH32CS_SNAPHEAPLIST 0x1
-#define TH32CS_SNAPPROCESS 0x2
-#define TH32CS_SNAPTHREAD 0x4
-#define TH32CS_SNAPMODULE 0x8
-#define TH32CS_SNAPALL (TH32CS_SNAPHEAPLIST|TH32CS_SNAPPROCESS|TH32CS_SNAPTHREAD|TH32CS_SNAPMODULE)
-#define TH32CS_INHERIT 0x80000000
-typedef struct tagHEAPLIST32 {
- DWORD dwSize;
- DWORD th32ProcessID;
- DWORD th32HeapID;
- DWORD dwFlags;
-} HEAPLIST32,*PHEAPLIST32,*LPHEAPLIST32;
-typedef struct tagHEAPENTRY32 {
- DWORD dwSize;
- HANDLE hHandle;
- DWORD dwAddress;
- DWORD dwBlockSize;
- DWORD dwFlags;
- DWORD dwLockCount;
- DWORD dwResvd;
- DWORD th32ProcessID;
- DWORD th32HeapID;
-} HEAPENTRY32,*PHEAPENTRY32,*LPHEAPENTRY32;
-typedef struct tagPROCESSENTRY32W {
- DWORD dwSize;
- DWORD cntUsage;
- DWORD th32ProcessID;
- DWORD th32DefaultHeapID;
- DWORD th32ModuleID;
- DWORD cntThreads;
- DWORD th32ParentProcessID;
- LONG pcPriClassBase;
- DWORD dwFlags;
- WCHAR szExeFile[MAX_PATH];
-} PROCESSENTRY32W,*PPROCESSENTRY32W,*LPPROCESSENTRY32W;
-typedef struct tagPROCESSENTRY32 {
- DWORD dwSize;
- DWORD cntUsage;
- DWORD th32ProcessID;
- DWORD th32DefaultHeapID;
- DWORD th32ModuleID;
- DWORD cntThreads;
- DWORD th32ParentProcessID;
- LONG pcPriClassBase;
- DWORD dwFlags;
- CHAR szExeFile[MAX_PATH];
-} PROCESSENTRY32,*PPROCESSENTRY32,*LPPROCESSENTRY32;
-typedef struct tagTHREADENTRY32 {
- DWORD dwSize;
- DWORD cntUsage;
- DWORD th32ThreadID;
- DWORD th32OwnerProcessID;
- LONG tpBasePri;
- LONG tpDeltaPri;
- DWORD dwFlags;
-} THREADENTRY32,*PTHREADENTRY32,*LPTHREADENTRY32;
-typedef struct tagMODULEENTRY32W {
- DWORD dwSize;
- DWORD th32ModuleID;
- DWORD th32ProcessID;
- DWORD GlblcntUsage;
- DWORD ProccntUsage;
- BYTE *modBaseAddr;
- DWORD modBaseSize;
- HMODULE hModule;
- WCHAR szModule[MAX_MODULE_NAME32 + 1];
- WCHAR szExePath[MAX_PATH];
-} MODULEENTRY32W,*PMODULEENTRY32W,*LPMODULEENTRY32W;
-typedef struct tagMODULEENTRY32 {
- DWORD dwSize;
- DWORD th32ModuleID;
- DWORD th32ProcessID;
- DWORD GlblcntUsage;
- DWORD ProccntUsage;
- BYTE *modBaseAddr;
- DWORD modBaseSize;
- HMODULE hModule;
- char szModule[MAX_MODULE_NAME32 + 1];
- char szExePath[MAX_PATH];
-} MODULEENTRY32,*PMODULEENTRY32,*LPMODULEENTRY32;
-BOOL WINAPI Heap32First(LPHEAPENTRY32,DWORD,DWORD);
-BOOL WINAPI Heap32ListFirst(HANDLE,LPHEAPLIST32);
-BOOL WINAPI Heap32ListNext(HANDLE,LPHEAPLIST32);
-BOOL WINAPI Heap32Next(LPHEAPENTRY32);
-BOOL WINAPI Module32First(HANDLE,LPMODULEENTRY32);
-BOOL WINAPI Module32FirstW(HANDLE,LPMODULEENTRY32W);
-BOOL WINAPI Module32Next(HANDLE,LPMODULEENTRY32);
-BOOL WINAPI Module32NextW(HANDLE,LPMODULEENTRY32W);
-BOOL WINAPI Process32First(HANDLE,LPPROCESSENTRY32);
-BOOL WINAPI Process32FirstW(HANDLE,LPPROCESSENTRY32W);
-BOOL WINAPI Process32Next(HANDLE,LPPROCESSENTRY32);
-BOOL WINAPI Process32NextW(HANDLE,LPPROCESSENTRY32W);
-BOOL WINAPI Thread32First(HANDLE,LPTHREADENTRY32);
-BOOL WINAPI Thread32Next(HANDLE,LPTHREADENTRY32);
-BOOL WINAPI Toolhelp32ReadProcessMemory(DWORD,LPCVOID,LPVOID,DWORD,LPDWORD);
-HANDLE WINAPI CreateToolhelp32Snapshot(DWORD,DWORD);
-#ifdef UNICODE
-#define LPMODULEENTRY32 LPMODULEENTRY32W
-#define LPPROCESSENTRY32 LPPROCESSENTRY32W
-#define MODULEENTRY32 MODULEENTRY32W
-#define Module32First Module32FirstW
-#define Module32Next Module32NextW
-#define PMODULEENTRY32 PMODULEENTRY32W
-#define PPROCESSENTRY32 PPROCESSENTRY32W
-#define PROCESSENTRY32 PROCESSENTRY32W
-#define Process32First Process32FirstW
-#define Process32Next Process32NextW
-#endif /* UNICODE */
-#ifdef __cplusplus
-}
-#endif
-#endif /* _TLHELP32_H */
-
diff --git a/winsup/w32api/include/tmschema.h b/winsup/w32api/include/tmschema.h
deleted file mode 100644
index 6ab03b4..0000000
--- a/winsup/w32api/include/tmschema.h
+++ /dev/null
@@ -1,664 +0,0 @@
-#ifndef _TMSCHEMA_H
-#define _TMSCHEMA_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-/* BUTTON parts */
-enum {
- BP_PUSHBUTTON = 1,
- BP_RADIOBUTTON = 2,
- BP_CHECKBOX = 3,
- BP_GROUPBOX = 4,
- BP_USERBUTTON = 5
-};
-enum {
- CBS_UNCHECKEDNORMAL = 1,
- CBS_UNCHECKEDHOT = 2,
- CBS_UNCHECKEDPRESSED = 3,
- CBS_UNCHECKEDDISABLED = 4,
- CBS_CHECKEDNORMAL = 5,
- CBS_CHECKEDHOT = 6,
- CBS_CHECKEDPRESSED = 7,
- CBS_CHECKEDDISABLED = 8,
- CBS_MIXEDNORMAL = 9,
- CBS_MIXEDHOT = 10,
- CBS_MIXEDPRESSED = 11,
- CBS_MIXEDDISABLED = 12
-};
-enum {
- GBS_NORMAL = 1,
- GBS_DISABLED = 2
-};
-enum {
- PBS_NORMAL = 1,
- PBS_HOT = 2,
- PBS_PRESSED = 3,
- PBS_DISABLED = 4,
- PBS_DEFAULTED = 5
-};
-enum {
- RBS_UNCHECKEDNORMAL = 1,
- RBS_UNCHECKEDHOT = 2,
- RBS_UNCHECKEDPRESSED = 3,
- RBS_UNCHECKEDDISABLED = 4,
- RBS_CHECKEDNORMAL = 5,
- RBS_CHECKEDHOT = 6,
- RBS_CHECKEDPRESSED = 7,
- RBS_CHECKEDDISABLED = 8
-};
-/* CLOCK parts */
-enum {
- CLP_TIME = 1
-};
-enum {
- CLS_NORMAL = 1
-};
-/* COMBOBOX parts */
-enum {
- CP_DROPDOWNBUTTON = 1
-};
-enum {
- CBXS_NORMAL = 1,
- CBXS_HOT = 2,
- CBXS_PRESSED = 3,
- CBXS_DISABLED = 4
-};
-/* EDIT parts */
-enum {
- EP_EDITTEXT = 1,
- EP_CARET = 2
-};
-enum {
- ETS_NORMAL = 1,
- ETS_HOT = 2,
- ETS_SELECTED = 3,
- ETS_DISABLED = 4,
- ETS_FOCUSED = 5,
- ETS_READONLY = 6,
- ETS_ASSIST = 7
-};
-/* EXPLORERBAR parts */
-enum {
- EBP_HEADERBACKGROUND = 1,
- EBP_HEADERCLOSE = 2,
- EBP_HEADERPIN = 3,
- EBP_IEBARMENU = 4,
- EBP_NORMALGROUPBACKGROUND = 5,
- EBP_NORMALGROUPCOLLAPSE = 6,
- EBP_NORMALGROUPEXPAND = 7,
- EBP_NORMALGROUPHEAD = 8,
- EBP_SPECIALGROUPBACKGROUND = 9,
- EBP_SPECIALGROUPCOLLAPSE = 10,
- EBP_SPECIALGROUPEXPAND = 11,
- EBP_SPECIALGROUPHEAD = 12
-};
-enum {
- EBHC_NORMAL = 1,
- EBHC_HOT = 2,
- EBHC_PRESSED = 3
-};
-enum {
- EBHP_NORMAL = 1,
- EBHP_HOT = 2,
- EBHP_PRESSED = 3,
- EBHP_SELECTEDNORMAL = 4,
- EBHP_SELECTEDHOT = 5,
- EBHP_SELECTEDPRESSED = 6
-};
-enum {
- EBM_NORMAL = 1,
- EBM_HOT = 2,
- EBM_PRESSED = 3
-};
-enum {
- EBNGC_NORMAL = 1,
- EBNGC_HOT = 2,
- EBNGC_PRESSED = 3
-};
-enum {
- EBNGE_NORMAL = 1,
- EBNGE_HOT = 2,
- EBNGE_PRESSED = 3
-};
-enum {
- EBSGC_NORMAL = 1,
- EBSGC_HOT = 2,
- EBSGC_PRESSED = 3
-};
-enum {
- EBSGE_NORMAL = 1,
- EBSGE_HOT = 2,
- EBSGE_PRESSED = 3
-};
-/* HEADER parts */
-enum {
- HP_HEADERITEM = 1,
- HP_HEADERITEMLEFT = 2,
- HP_HEADERITEMRIGHT = 3,
- HP_HEADERSORTARROW = 4
-};
-enum {
- HIS_NORMAL = 1,
- HIS_HOT = 2,
- HIS_PRESSED = 3
-};
-enum {
- HILS_NORMAL = 1,
- HILS_HOT = 2,
- HILS_PRESSED = 3
-};
-enum {
- HIRS_NORMAL = 1,
- HIRS_HOT = 2,
- HIRS_PRESSED = 3
-};
-enum {
- HSAS_SORTEDUP = 1,
- HSAS_SORTEDDOWN = 2
-};
-/* LISTVIEW parts */
-enum {
- LVP_LISTITEM = 1,
- LVP_LISTGROUP = 2,
- LVP_LISTDETAIL = 3,
- LVP_LISTSORTEDDETAIL = 4,
- LVP_EMPTYTEXT = 5
-};
-enum {
- LIS_NORMAL = 1,
- LIS_HOT = 2,
- LIS_SELECTED = 3,
- LIS_DISABLED = 4,
- LIS_SELECTEDNOTFOCUS = 5
-};
-/* MENU parts */
-enum {
- MP_MENUITEM = 1,
- MP_MENUDROPDOWN = 2,
- MP_MENUBARITEM = 3,
- MP_MENUBARDROPDOWN = 4,
- MP_CHEVRON = 5,
- MP_SEPARATOR = 6
-};
-enum {
- MS_NORMAL = 1,
- MS_SELECTED = 2,
- MS_DEMOTED = 3
-};
-/* MENUBAND parts */
-enum {
- MDP_NEWAPPBUTTON = 1,
- MDP_SEPERATOR = 2
-};
-enum {
- MDS_NORMAL = 1,
- MDS_HOT = 2,
- MDS_PRESSED = 3,
- MDS_DISABLED = 4,
- MDS_CHECKED = 5,
- MDS_HOTCHECKED = 6
-};
-/* PAGE parts */
-enum {
- PGRP_UP = 1,
- PGRP_DOWN = 2,
- PGRP_UPHORZ = 3,
- PGRP_DOWNHORZ = 4
-};
-enum {
- DNS_NORMAL = 1,
- DNS_HOT = 2,
- DNS_PRESSED = 3,
- DNS_DISABLED = 4
-};
-enum {
- DNHZS_NORMAL = 1,
- DNHZS_HOT = 2,
- DNHZS_PRESSED = 3,
- DNHZS_DISABLED = 4
-};
-enum {
- UPS_NORMAL = 1,
- UPS_HOT = 2,
- UPS_PRESSED = 3,
- UPS_DISABLED = 4
-};
-enum {
- UPHZS_NORMAL = 1,
- UPHZS_HOT = 2,
- UPHZS_PRESSED = 3,
- UPHZS_DISABLED = 4
-};
-/* PROGRESS parts */
-enum {
- PP_BAR = 1,
- PP_BARVERT = 2,
- PP_CHUNK = 3,
- PP_CHUNKVERT = 4
-};
-/* REBAR parts */
-enum {
- RP_GRIPPER = 1,
- RP_GRIPPERVERT = 2,
- RP_BAND = 3,
- RP_CHEVRON = 4,
- RP_CHEVRONVERT = 5
-};
-enum {
- CHEVS_NORMAL = 1,
- CHEVS_HOT = 2,
- CHEVS_PRESSED = 3
-};
-/* SCROLLBAR parts */
-enum {
- SBP_ARROWBTN = 1,
- SBP_THUMBBTNHORZ = 2,
- SBP_THUMBBTNVERT = 3,
- SBP_LOWERTRACKHORZ = 4,
- SBP_UPPERTRACKHORZ = 5,
- SBP_LOWERTRACKVERT = 6,
- SBP_UPPERTRACKVERT = 7,
- SBP_GRIPPERHORZ = 8,
- SBP_GRIPPERVERT = 9,
- SBP_SIZEBOX = 10
-};
-enum {
- ABS_UPNORMAL = 1,
- ABS_UPHOT = 2,
- ABS_UPPRESSED = 3,
- ABS_UPDISABLED = 4,
- ABS_DOWNNORMAL = 5,
- ABS_DOWNHOT = 6,
- ABS_DOWNPRESSED = 7,
- ABS_DOWNDISABLED = 8,
- ABS_LEFTNORMAL = 9,
- ABS_LEFTHOT = 10,
- ABS_LEFTPRESSED = 11,
- ABS_LEFTDISABLED = 12,
- ABS_RIGHTNORMAL = 13,
- ABS_RIGHTHOT = 14,
- ABS_RIGHTPRESSED = 15,
- ABS_RIGHTDISABLED = 16
-};
-enum {
- SCRBS_NORMAL = 1,
- SCRBS_HOT = 2,
- SCRBS_PRESSED = 3,
- SCRBS_DISABLED = 4
-};
-enum {
- SZB_RIGHTALIGN = 1,
- SZB_LEFTALIGN = 2
-};
-/* SPIN parts */
-enum {
- SPNP_UP = 1,
- SPNP_DOWN = 2,
- SPNP_UPHORZ = 3,
- SPNP_DOWNHORZ = 4
-};
-/* STARTPANEL parts */
-enum {
- SPP_USERPANE = 1,
- SPP_MOREPROGRAMS = 2,
- SPP_MOREPROGRAMSARROW = 3,
- SPP_PROGLIST = 4,
- SPP_PROGLISTSEPARATOR = 5,
- SPP_PLACESLIST = 6,
- SPP_PLACESLISTSEPARATOR = 7,
- SPP_LOGOFF = 8,
- SPP_LOGOFFBUTTONS = 9,
- SPP_USERPICTURE = 10,
- SPP_PREVIEW = 11
-};
-enum {
- SPLS_NORMAL = 1,
- SPLS_HOT = 2,
- SPLS_PRESSED = 3
-};
-enum {
- SPS_NORMAL = 1,
- SPS_HOT = 2,
- SPS_PRESSED = 3
-};
-/* STATUS parts */
-enum {
- SP_PANE = 1,
- SP_GRIPPERPANE = 2,
- SP_GRIPPER = 3
-};
-/* TAB parts */
-enum {
- TABP_TABITEM = 1,
- TABP_TABITEMLEFTEDGE = 2,
- TABP_TABITEMRIGHTEDGE = 3,
- TABP_TABITEMBOTHEDGE = 4,
- TABP_TOPTABITEM = 5,
- TABP_TOPTABITEMLEFTEDGE = 6,
- TABP_TOPTABITEMRIGHTEDGE = 7,
- TABP_TOPTABITEMBOTHEDGE = 8,
- TABP_PANE = 9,
- TABP_BODY = 10
-};
-enum {
- TIS_NORMAL = 1,
- TIS_HOT = 2,
- TIS_SELECTED = 3,
- TIS_DISABLED = 4,
- TIS_FOCUSED = 5
-};
-enum {
- TIBES_NORMAL = 1,
- TIBES_HOT = 2,
- TIBES_SELECTED = 3,
- TIBES_DISABLED = 4,
- TIBES_FOCUSED = 5
-};
-enum {
- TILES_NORMAL = 1,
- TILES_HOT = 2,
- TILES_SELECTED = 3,
- TILES_DISABLED = 4,
- TILES_FOCUSED = 5
-};
-enum {
- TIRES_NORMAL = 1,
- TIRES_HOT = 2,
- TIRES_SELECTED = 3,
- TIRES_DISABLED = 4,
- TIRES_FOCUSED = 5
-};
-enum {
- TTIS_NORMAL = 1,
- TTIS_HOT = 2,
- TTIS_SELECTED = 3,
- TTIS_DISABLED = 4,
- TTIS_FOCUSED = 5
-};
-enum {
- TTIBES_NORMAL = 1,
- TTIBES_HOT = 2,
- TTIBES_SELECTED = 3,
- TTIBES_DISABLED = 4,
- TTIBES_FOCUSED = 5
-};
-enum {
- TTILES_NORMAL = 1,
- TTILES_HOT = 2,
- TTILES_SELECTED = 3,
- TTILES_DISABLED = 4,
- TTILES_FOCUSED = 5
-};
-enum {
- TTIRES_NORMAL = 1,
- TTIRES_HOT = 2,
- TTIRES_SELECTED = 3,
- TTIRES_DISABLED = 4,
- TTIRES_FOCUSED = 5
-};
-/* TASKBAND parts */
-enum {
- TDP_GROUPCOUNT = 1,
- TDP_FLASHBUTTON = 2,
- TDP_FLASHBUTTONGROUPMENU = 3
-};
-/* TASKBAR parts */
-enum {
- TBP_BACKGROUNDBOTTOM = 1,
- TBP_BACKGROUNDRIGHT = 2,
- TBP_BACKGROUNDTOP = 3,
- TBP_BACKGROUNDLEFT = 4,
- TBP_SIZINGBARBOTTOM = 5,
- TBP_SIZINGBARRIGHT = 6,
- TBP_SIZINGBARTOP = 7,
- TBP_SIZINGBARLEFT = 8
-};
-/* TOOLBAR parts */
-enum {
- TP_BUTTON = 1,
- TP_DROPDOWNBUTTON = 2,
- TP_SPLITBUTTON = 3,
- TP_SPLITBUTTONDROPDOWN = 4,
- TP_SEPARATOR = 5,
- TP_SEPARATORVERT = 6
-};
-enum {
- TS_NORMAL = 1,
- TS_HOT = 2,
- TS_PRESSED = 3,
- TS_DISABLED = 4,
- TS_CHECKED = 5,
- TS_HOTCHECKED = 6
-};
-/* TOOLTIP parts */
-enum {
- TTP_STANDARD = 1,
- TTP_STANDARDTITLE = 2,
- TTP_BALLOON = 3,
- TTP_BALLOONTITLE = 4,
- TTP_CLOSE = 5
-};
-enum {
- TTBS_NORMAL = 1,
- TTBS_LINK = 2
-};
-enum {
- TTCS_NORMAL = 1,
- TTCS_HOT = 2,
- TTCS_PRESSED = 3
-};
-enum {
- TTSS_NORMAL = 1,
- TTSS_LINK = 2
-};
-/* TRACKBAR parts */
-enum {
- TKP_TRACK = 1,
- TKP_TRACKVERT = 2,
- TKP_THUMB = 3,
- TKP_THUMBBOTTOM = 4,
- TKP_THUMBTOP = 5,
- TKP_THUMBVERT = 6,
- TKP_THUMBLEFT = 7,
- TKP_THUMBRIGHT = 8,
- TKP_TICS = 9,
- TKP_TICSVERT = 10
-};
-enum {
- TUS_NORMAL = 1,
- TUS_HOT = 2,
- TUS_PRESSED = 3,
- TUS_FOCUSED = 4,
- TUS_DISABLED = 5
-};
-enum {
- TUBS_NORMAL = 1,
- TUBS_HOT = 2,
- TUBS_PRESSED = 3,
- TUBS_FOCUSED = 4,
- TUBS_DISABLED = 5
-};
-enum {
- TUVLS_NORMAL = 1,
- TUVLS_HOT = 2,
- TUVLS_PRESSED = 3,
- TUVLS_FOCUSED = 4,
- TUVLS_DISABLED = 5
-};
-enum {
- TUVRS_NORMAL = 1,
- TUVRS_HOT = 2,
- TUVRS_PRESSED = 3,
- TUVRS_FOCUSED = 4,
- TUVRS_DISABLED = 5
-};
-enum {
- TUTS_NORMAL = 1,
- TUTS_HOT = 2,
- TUTS_PRESSED = 3,
- TUTS_FOCUSED = 4,
- TUTS_DISABLED = 5
-};
-enum {
- TUVS_NORMAL = 1,
- TUVS_HOT = 2,
- TUVS_PRESSED = 3,
- TUVS_FOCUSED = 4,
- TUVS_DISABLED = 5
-};
-enum {
- TSS_NORMAL = 1
-};
-enum {
- TSVS_NORMAL = 1
-};
-enum {
- TRS_NORMAL = 1
-};
-enum {
- TRVS_NORMAL = 1
-};
-/* TRAYNOTIFY parts */
-enum {
- TNP_BACKGROUND = 1,
- TNP_ANIMBACKGROUND = 2
-};
-/* TREEVIEW parts */
-enum {
- TVP_TREEITEM = 1,
- TVP_GLYPH = 2,
- TVP_BRANCH = 3
-};
-enum {
- GLPS_CLOSED = 1,
- GLPS_OPENED = 2
-};
-enum {
- TREIS_NORMAL = 1,
- TREIS_HOT = 2,
- TREIS_SELECTED = 3,
- TREIS_DISABLED = 4,
- TREIS_SELECTEDNOTFOCUS = 5
-};
-/* WINDOW parts */
-enum {
- WP_CAPTION = 1,
- WP_SMALLCAPTION = 2,
- WP_MINCAPTION = 3,
- WP_SMALLMINCAPTION = 4,
- WP_MAXCAPTION = 5,
- WP_SMALLMAXCAPTION = 6,
- WP_FRAMELEFT = 7,
- WP_FRAMERIGHT = 8,
- WP_FRAMEBOTTOM = 9,
- WP_SMALLFRAMELEFT = 10,
- WP_SMALLFRAMERIGHT = 11,
- WP_SMALLFRAMEBOTTOM = 12,
- WP_SYSBUTTON = 13,
- WP_MDISYSBUTTON = 14,
- WP_MINBUTTON = 15,
- WP_MDIMINBUTTON = 16,
- WP_MAXBUTTON = 17,
- WP_CLOSEBUTTON = 18,
- WP_SMALLCLOSEBUTTON = 19,
- WP_MDICLOSEBUTTON = 20,
- WP_RESTOREBUTTON = 21,
- WP_MDIRESTOREBUTTON = 22,
- WP_HELPBUTTON = 23,
- WP_MDIHELPBUTTON = 24,
- WP_HORZSCROLL = 25,
- WP_HORZTHUMB = 26,
- WP_VERTSCROLL = 27,
- WP_VERTTHUMB = 28,
- WP_DIALOG = 29,
- WP_CAPTIONSIZINGTEMPLATE = 30,
- WP_SMALLCAPTIONSIZINGTEMPLATE = 31,
- WP_FRAMELEFTSIZINGTEMPLATE = 32,
- WP_SMALLFRAMELEFTSIZINGTEMPLATE = 33,
- WP_FRAMERIGHTSIZINGTEMPLATE = 34,
- WP_SMALLFRAMERIGHTSIZINGTEMPLATE = 35,
- WP_FRAMEBOTTOMSIZINGTEMPLATE = 36,
- WP_SMALLFRAMEBOTTOMSIZINGTEMPLATE = 37
-};
-enum {
- CS_ACTIVE = 1,
- CS_INACTIVE = 2,
- CS_DISABLED = 3
-};
-enum {
- CBS_NORMAL = 1,
- CBS_HOT = 2,
- CBS_PUSHED = 3,
- CBS_DISABLED = 4
-};
-enum {
- FS_ACTIVE = 1,
- FS_INACTIVE = 2
-};
-enum {
- HBS_NORMAL = 1,
- HBS_HOT = 2,
- HBS_PUSHED = 3,
- HBS_DISABLED = 4
-};
-enum {
- HSS_NORMAL = 1,
- HSS_HOT = 2,
- HSS_PUSHED = 3,
- HSS_DISABLED = 4
-};
-enum {
- HTS_NORMAL = 1,
- HTS_HOT = 2,
- HTS_PUSHED = 3,
- HTS_DISABLED = 4
-};
-enum {
- MAXBS_NORMAL = 1,
- MAXBS_HOT = 2,
- MAXBS_PUSHED = 3,
- MAXBS_DISABLED = 4
-};
-enum {
- MXCS_ACTIVE = 1,
- MXCS_INACTIVE = 2,
- MXCS_DISABLED = 3
-};
-enum {
- MINBS_NORMAL = 1,
- MINBS_HOT = 2,
- MINBS_PUSHED = 3,
- MINBS_DISABLED = 4
-};
-enum {
- RBS_NORMAL = 1,
- RBS_HOT = 2,
- RBS_PUSHED = 3,
- RBS_DISABLED = 4
-};
-enum {
- SBS_NORMAL = 1,
- SBS_HOT = 2,
- SBS_PUSHED = 3,
- SBS_DISABLED = 4
-};
-enum {
- MNCS_ACTIVE = 1,
- MNCS_INACTIVE = 2,
- MNCS_DISABLED = 3
-};
-enum {
- VSS_NORMAL = 1,
- VSS_HOT = 2,
- VSS_PUSHED = 3,
- VSS_DISABLED = 4
-};
-enum {
- VTS_NORMAL = 1,
- VTS_HOT = 2,
- VTS_PUSHED = 3,
- VTS_DISABLED = 4
-};
-
-#endif
diff --git a/winsup/w32api/include/unknwn.h b/winsup/w32api/include/unknwn.h
deleted file mode 100644
index 4a8c3fc..0000000
--- a/winsup/w32api/include/unknwn.h
+++ /dev/null
@@ -1,76 +0,0 @@
-#ifndef COM_NO_WINDOWS_H
-#include <windows.h>
-#endif
-
-#ifndef _UNKNWN_H
-#define _UNKNWN_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C"{
-#endif
-#include <objfwd.h>
-#include <wtypes.h>
-
-void * __RPC_USER MIDL_user_allocate(size_t);
-void __RPC_USER MIDL_user_free(void*);
-EXTERN_C const IID IID_IUnknown;
-EXTERN_C const IID IID_IClassFactory;
-#ifndef __IUnknown_INTERFACE_DEFINED__
-#define __IUnknown_INTERFACE_DEFINED__
-#define INTERFACE IUnknown
-DECLARE_INTERFACE(IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
-};
-#undef INTERFACE
-typedef IUnknown *LPUNKNOWN;
-#endif
-#ifndef __IClassFactory_INTERFACE_DEFINED__
-#define __IClassFactory_INTERFACE_DEFINED__
-#define INTERFACE IClassFactory
-DECLARE_INTERFACE_(IClassFactory,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(CreateInstance)(THIS_ LPUNKNOWN,REFIID,PVOID*) PURE;
- STDMETHOD(LockServer)(THIS_ BOOL) PURE;
-};
-#undef INTERFACE
-typedef IClassFactory *LPCLASSFACTORY;
-#endif
-HRESULT STDMETHODCALLTYPE IUnknown_QueryInterface_Proxy(IUnknown*,REFIID,void**);
-void __RPC_STUB IUnknown_QueryInterface_Stub(LPRPCSTUBBUFFER,LPRPCCHANNELBUFFER,PRPC_MESSAGE,PDWORD);
-ULONG STDMETHODCALLTYPE IUnknown_AddRef_Proxy(IUnknown*);
-void __RPC_STUB IUnknown_AddRef_Stub(LPRPCSTUBBUFFER,LPRPCCHANNELBUFFER,PRPC_MESSAGE,PDWORD);
-ULONG STDMETHODCALLTYPE IUnknown_Release_Proxy(IUnknown*);
-void __RPC_STUB IUnknown_Release_Stub(LPRPCSTUBBUFFER,LPRPCCHANNELBUFFER,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IClassFactory_RemoteCreateInstance_Proxy(IClassFactory*,REFIID,IUnknown**);
-void __RPC_STUB IClassFactory_RemoteCreateInstance_Stub(LPRPCSTUBBUFFER,LPRPCCHANNELBUFFER,PRPC_MESSAGE,PDWORD);
-HRESULT __stdcall IClassFactory_RemoteLockServer_Proxy(IClassFactory*,BOOL);
-void __RPC_STUB IClassFactory_RemoteLockServer_Stub(LPRPCSTUBBUFFER,LPRPCCHANNELBUFFER,PRPC_MESSAGE,PDWORD);
-HRESULT STDMETHODCALLTYPE IClassFactory_CreateInstance_Proxy(IClassFactory*,IUnknown*,REFIID,void**);
-HRESULT STDMETHODCALLTYPE IClassFactory_CreateInstance_Stub(IClassFactory*,REFIID,IUnknown**);
-HRESULT STDMETHODCALLTYPE IClassFactory_LockServer_Proxy(IClassFactory*,BOOL);
-HRESULT STDMETHODCALLTYPE IClassFactory_LockServer_Stub(IClassFactory*,BOOL);
-
-#if (!defined (__cplusplus) || defined (CINTERFACE)) \
- && defined (COBJMACROS)
-#define IUnknown_QueryInterface(T,r,O) (T)->lpVtbl->QueryInterface(T,r,O)
-#define IUnknown_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IUnknown_Release(T) (T)->lpVtbl->Release(T)
-#define IClassFactory_QueryInterface(T,r,O) (T)->lpVtbl->QueryInterface(T,r,O)
-#define IClassFactory_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IClassFactory_Release(T) (T)->lpVtbl->Release(T)
-#define IClassFactory_CreateInstance(T,p,r,O) (T)->lpVtbl->CreateInstance(T,p,r,O)
-#define IClassFactory_LockServer(T,f) (T)->lpVtbl->LockServer(T,f)
-#endif /* COBJMACROS */
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/userenv.h b/winsup/w32api/include/userenv.h
deleted file mode 100644
index fad9f81..0000000
--- a/winsup/w32api/include/userenv.h
+++ /dev/null
@@ -1,57 +0,0 @@
-#ifndef _USERENV_H
-#define _USERENV_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define PI_NOUI (1)
-#define PI_APPLYPOLICY (2)
-typedef struct _PROFILEINFOA {
- DWORD dwSize;
- DWORD dwFlags;
- LPSTR lpUserName;
- LPSTR lpProfilePath;
- LPSTR lpDefaultPath;
- LPSTR lpServerName;
- LPSTR lpPolicyPath;
- HANDLE hProfile;
-} PROFILEINFOA, *LPPROFILEINFOA;
-typedef struct _PROFILEINFOW {
- DWORD dwSize;
- DWORD dwFlags;
- LPWSTR lpUserName;
- LPWSTR lpProfilePath;
- LPWSTR lpDefaultPath;
- LPWSTR lpServerName;
- LPWSTR lpPolicyPath;
- HANDLE hProfile;
-} PROFILEINFOW, *LPPROFILEINFOW;
-BOOL WINAPI LoadUserProfileA(HANDLE,LPPROFILEINFOA);
-BOOL WINAPI LoadUserProfileW(HANDLE,LPPROFILEINFOW);
-BOOL WINAPI UnloadUserProfile(HANDLE,HANDLE);
-BOOL WINAPI GetProfilesDirectoryA(LPSTR,LPDWORD);
-BOOL WINAPI GetProfilesDirectoryW(LPWSTR,LPDWORD);
-BOOL WINAPI GetUserProfileDirectoryA(HANDLE,LPSTR,LPDWORD);
-BOOL WINAPI GetUserProfileDirectoryW(HANDLE,LPWSTR,LPDWORD);
-BOOL WINAPI CreateEnvironmentBlock(LPVOID*,HANDLE,BOOL);
-BOOL WINAPI DestroyEnvironmentBlock(LPVOID);
-#ifdef UNICODE
-typedef PROFILEINFOW PROFILEINFO;
-typedef LPPROFILEINFOW LPPROFILEINFO;
-#define LoadUserProfile LoadUserProfileW
-#define GetProfilesDirectory GetProfilesDirectoryW
-#define GetUserProfileDirectory GetUserProfileDirectoryW
-#else
-typedef PROFILEINFOA PROFILEINFO;
-typedef LPPROFILEINFOA LPPROFILEINFO;
-#define LoadUserProfile LoadUserProfileA
-#define GetProfilesDirectory GetProfilesDirectoryA
-#define GetUserProfileDirectory GetUserProfileDirectoryA
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif /* _USERENV_H */
diff --git a/winsup/w32api/include/usp10.h b/winsup/w32api/include/usp10.h
deleted file mode 100755
index 8f194f3..0000000
--- a/winsup/w32api/include/usp10.h
+++ /dev/null
@@ -1,229 +0,0 @@
-#ifndef _USP10_H
-#define _USP10_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#include <windows.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#pragma pack(push,1)
-
-#define SCRIPT_UNDEFINED 0
-#define USP_E_SCRIPT_NOT_IN_FONT MAKE_HRESULT(SEVERITY_ERROR,FACILITY_ITF,0x200)
-#define SGCM_RTL 0x00000001
-#define SSA_PASSWORD 0x00000001
-#define SSA_TAB 0x00000002
-#define SSA_CLIP 0x00000004
-#define SSA_FIT 0x00000008
-#define SSA_DZWG 0x00000010
-#define SSA_FALLBACK 0x00000020
-#define SSA_BREAK 0x00000040
-#define SSA_GLYPHS 0x00000080
-#define SSA_RTL 0x00000100
-#define SSA_GCP 0x00000200
-#define SSA_HOTKEY 0x00000400
-#define SSA_METAFILE 0x00000800
-#define SSA_LINK 0x00001000
-#define SSA_HIDEHOTKEY 0x00002000
-#define SSA_HOTKEYONLY 0x00002400
-#define SSA_FULLMEASURE 0x04000000
-#define SSA_LPKANSIFALLBACK 0x08000000
-#define SSA_PIDX 0x10000000
-#define SSA_LAYOUTRTL 0x20000000
-#define SSA_DONTGLYPH 0x40000000
-#define SSA_NOKASHIDA 0x80000000
-#define SIC_COMPLEX 1
-#define SIC_ASCIIDIGIT 2
-#define SIC_NEUTRAL 4
-#define SCRIPT_DIGITSUBSTITUTE_CONTEXT 0
-#define SCRIPT_DIGITSUBSTITUTE_NONE 1
-#define SCRIPT_DIGITSUBSTITUTE_NATIONAL 2
-#define SCRIPT_DIGITSUBSTITUTE_TRADITIONAL 3
-
-typedef enum tag_SCRIPT_JUSTIFY {
- SCRIPT_JUSTIFY_NONE = 0,
- SCRIPT_JUSTIFY_ARABIC_BLANK = 1,
- SCRIPT_JUSTIFY_CHARACTER = 2,
- SCRIPT_JUSTIFY_RESERVED1 = 3,
- SCRIPT_JUSTIFY_BLANK = 4,
- SCRIPT_JUSTIFY_RESERVED2 = 5,
- SCRIPT_JUSTIFY_RESERVED3 = 6,
- SCRIPT_JUSTIFY_ARABIC_NORMAL = 7,
- SCRIPT_JUSTIFY_ARABIC_KASHIDA = 8,
- SCRIPT_JUSTIFY_ARABIC_ALEF = 9,
- SCRIPT_JUSTIFY_ARABIC_HA = 10,
- SCRIPT_JUSTIFY_ARABIC_RA = 11,
- SCRIPT_JUSTIFY_ARABIC_BA = 12,
- SCRIPT_JUSTIFY_ARABIC_BARA = 13,
- SCRIPT_JUSTIFY_ARABIC_SEEN = 14,
- SCRIPT_JUSTIFY_ARABIC_SEEN_M = 15
-} SCRIPT_JUSTIFY;
-
-typedef struct tagGOFFSET {
- LONG du;
- LONG dv;
-} GOFFSET;
-typedef ULONG OPENTYPE_TAG;
-typedef struct opentype_feature_record{
- OPENTYPE_TAG tagFeature;
- LONG lParameter;
-} OPENTYPE_FEATURE_RECORD;
-typedef struct tag_SCRIPT_STATE {
- WORD uBidiLevel :5;
- WORD fOverrideDirection :1;
- WORD fInhibitSymSwap :1;
- WORD fCharShape :1;
- WORD fDigitSubstitute :1;
- WORD fInhibitLigate :1;
- WORD fDisplayZWG :1;
- WORD fArabicNumContext :1;
- WORD fGcpClusters :1;
- WORD fReserved :1;
- WORD fEngineReserved :2;
-} SCRIPT_STATE;
-typedef struct tag_SCRIPT_ANALYSIS {
- WORD eScript :10;
- WORD fRTL :1;
- WORD fLayoutRTL :1;
- WORD fLinkBefore :1;
- WORD fLinkAfter :1;
- WORD fLogicalOrder :1;
- WORD fNoGlyphIndex :1;
- SCRIPT_STATE s ;
-} SCRIPT_ANALYSIS;
-typedef void *SCRIPT_CACHE;
-typedef struct script_charprop {
- WORD fCanGlyphAlone : 1;
- WORD reserved : 15;
-} SCRIPT_CHARPROP;
-typedef struct tag_SCRIPT_CONTROL {
- DWORD uDefaultLanguage :16;
- DWORD fContextDigits :1;
- DWORD fInvertPreBoundDir :1;
- DWORD fInvertPostBoundDir :1;
- DWORD fLinkStringBefore :1;
- DWORD fLinkStringAfter :1;
- DWORD fNeutralOverride :1;
- DWORD fNumericOverride :1;
- DWORD fLegacyBidiClass :1;
- DWORD fReserved :8;
-} SCRIPT_CONTROL;
-typedef struct tag_SCRIPT_DIGITSUBSTITUTE {
- DWORD NationalDigitLanguage : 16;
- DWORD TraditionalDigitLanguage : 16;
- DWORD DigitSubstitute :8;
- DWORD dwReserved;
-} SCRIPT_DIGITSUBSTITUTE;
-typedef struct {
- int cBytes;
- WORD wgBlank;
- WORD wgDefault;
- WORD wgInvalid;
- WORD wgKashida;
- int iKashidaWidth;
-} SCRIPT_FONTPROPERTIES;
-typedef struct tag_SCRIPT_VISATTR {
- WORD uJustification :4;
- WORD fClusterStart :1;
- WORD fDiacritic :1;
- WORD fZeroWidth :1;
- WORD fReserved :1;
- WORD fShapeReserved :8;
-} SCRIPT_VISATTR;
-typedef struct script_glyphprop {
- SCRIPT_VISATTR sva;
- WORD reserved;
-} SCRIPT_GLYPHPROP;
-typedef struct tag_SCRIPT_ITEM {
- int iCharPos;
- SCRIPT_ANALYSIS a;
-} SCRIPT_ITEM;
-typedef struct tag_SCRIPT_LOGATTR {
- BYTE fSoftBreak :1;
- BYTE fWhiteSpace :1;
- BYTE fCharStop :1;
- BYTE fWordStop :1;
- BYTE fInvalid :1;
- BYTE fReserved :3;
-} SCRIPT_LOGATTR;
-typedef struct {
- DWORD langid :16;
- DWORD fNumeric :1;
- DWORD fComplex :1;
- DWORD fNeedsWordBreaking :1;
- DWORD fNeedsCaretInfo :1;
- DWORD bCharSet :8;
- DWORD fControl :1;
- DWORD fPrivateUseArea :1;
- DWORD fNeedsCharacterJustify :1;
- DWORD fInvalidGlyph :1;
- DWORD fInvalidLogAttr :1;
- DWORD fCDM :1;
- DWORD fAmbiguousCharSet :1;
- DWORD fClusterSizeVaries :1;
- DWORD fRejectInvalid :1;
-} SCRIPT_PROPERTIES;
-typedef void *SCRIPT_STRING_ANALYSIS;
-typedef struct tag_SCRIPT_TABDEF {
- int cTabStops;
- int iScale;
- int *pTabStops;
- int iTabOrigin;
-} SCRIPT_TABDEF;
-typedef struct textrange_properties{
- OPENTYPE_FEATURE_RECORD* potfRecords;
- int cotfRecords;
-} TEXTRANGE_PROPERTIES;
-
-
-HRESULT WINAPI ScriptApplyDigitSubstitution(const SCRIPT_DIGITSUBSTITUTE*,SCRIPT_CONTROL*,SCRIPT_STATE*);
-HRESULT WINAPI ScriptApplyLogicalWidth(const int *,int,int,const WORD *,const SCRIPT_VISATTR *,const int *,const SCRIPT_ANALYSIS *,ABC *,int *);
-HRESULT WINAPI ScriptBreak(const WCHAR *,int,const SCRIPT_ANALYSIS *,SCRIPT_LOGATTR *);
-HRESULT WINAPI ScriptCacheGetHeight(HDC,SCRIPT_CACHE *,long *);
-HRESULT WINAPI ScriptCPtoX(int,BOOL,int,int,const WORD *,const SCRIPT_VISATTR *,const int *,const SCRIPT_ANALYSIS *,int *);
-HRESULT WINAPI ScriptFreeCache(SCRIPT_CACHE *);
-HRESULT WINAPI ScriptGetCMap(HDC,SCRIPT_CACHE *,const WCHAR*,int,DWORD,WORD *);
-HRESULT WINAPI ScriptGetFontAlternateGlyphs(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,OPENTYPE_TAG,OPENTYPE_TAG,OPENTYPE_TAG,WORD,int,WORD*,int*);
-HRESULT WINAPI ScriptGetFontFeatureTags(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,OPENTYPE_TAG,OPENTYPE_TAG,int,OPENTYPE_TAG*,int*);
-HRESULT WINAPI ScriptGetFontLanguageTags(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,OPENTYPE_TAG,int,OPENTYPE_TAG*,int*);
-HRESULT WINAPI ScriptGetFontProperties(HDC,SCRIPT_CACHE *,SCRIPT_FONTPROPERTIES *);
-HRESULT WINAPI ScriptGetFontScriptTags(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,int,OPENTYPE_TAG*,int*);
-HRESULT WINAPI ScriptGetGlyphABCWidth(HDC,SCRIPT_CACHE *,WORD,ABC *);
-HRESULT WINAPI ScriptGetLogicalWidths(const SCRIPT_ANALYSIS *,int,int,const int *,const WORD *,const SCRIPT_VISATTR *,int *);
-HRESULT WINAPI ScriptGetProperties(const SCRIPT_PROPERTIES ***,int *);
-HRESULT WINAPI ScriptIsComplex(const WCHAR *,int,DWORD);
-HRESULT WINAPI ScriptItemize(const WCHAR *,int,int,const SCRIPT_CONTROL *,const SCRIPT_STATE *,SCRIPT_ITEM *,int *);
-HRESULT WINAPI ScriptItemizeOpenType(const WCHAR*,int,int,const SCRIPT_CONTROL*,const SCRIPT_STATE*,SCRIPT_ITEM*,OPENTYPE_TAG*,int*);
-HRESULT WINAPI ScriptJustify(const SCRIPT_VISATTR *,const int *,int,int,int,int *);
-HRESULT WINAPI ScriptLayout(int,const BYTE *,int *,int *);
-HRESULT WINAPI ScriptPlace(HDC,SCRIPT_CACHE *,const WORD *,int,const SCRIPT_VISATTR *,SCRIPT_ANALYSIS *,int *,GOFFSET *,ABC *);
-HRESULT WINAPI ScriptPlaceOpenType(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,OPENTYPE_TAG,OPENTYPE_TAG,int*,TEXTRANGE_PROPERTIES**,int,const WCHAR*,const WORD*,const SCRIPT_CHARPROP*,int,const WORD*,const SCRIPT_GLYPHPROP*,int,int*,GOFFSET*,ABC*);
-HRESULT WINAPI ScriptPositionSingleGlyph(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,OPENTYPE_TAG,OPENTYPE_TAG,OPENTYPE_TAG,LONG,WORD,int,GOFFSET,int*,GOFFSET*);
-HRESULT WINAPI ScriptRecordDigitSubstitution(LCID,SCRIPT_DIGITSUBSTITUTE *);
-HRESULT WINAPI ScriptShape(HDC,SCRIPT_CACHE *,const WCHAR *,int,int,SCRIPT_ANALYSIS *,WORD *,WORD *,SCRIPT_VISATTR *,int *);
-HRESULT WINAPI ScriptShapeOpenType(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,OPENTYPE_TAG,OPENTYPE_TAG,int*,TEXTRANGE_PROPERTIES**,int,const WCHAR*,int,int,WORD*,SCRIPT_CHARPROP*,WORD*,SCRIPT_GLYPHPROP*,int*);
-HRESULT WINAPI ScriptStringAnalyse(HDC,const void *,int,int,int,DWORD,int,SCRIPT_CONTROL *,SCRIPT_STATE *,const int *,SCRIPT_TABDEF *,const BYTE *,SCRIPT_STRING_ANALYSIS *);
-HRESULT WINAPI ScriptStringCPtoX(SCRIPT_STRING_ANALYSIS,int,BOOL,int *);
-HRESULT WINAPI ScriptStringFree(SCRIPT_STRING_ANALYSIS *);
-HRESULT WINAPI ScriptStringGetLogicalWidths(SCRIPT_STRING_ANALYSIS,int *);
-HRESULT WINAPI ScriptStringGetOrder(SCRIPT_STRING_ANALYSIS,UINT *);
-HRESULT WINAPI ScriptStringOut(SCRIPT_STRING_ANALYSIS,int,int,UINT,const RECT *,int,int,BOOL);
-const int*WINAPI ScriptString_pcOutChars(SCRIPT_STRING_ANALYSIS);
-const SCRIPT_LOGATTR* WINAPI ScriptString_pLogAttr(SCRIPT_STRING_ANALYSIS);
-const SIZE* WINAPI ScriptString_pSize(SCRIPT_STRING_ANALYSIS);
-HRESULT WINAPI ScriptStringValidate(SCRIPT_STRING_ANALYSIS);
-HRESULT WINAPI ScriptStringXtoCP(SCRIPT_STRING_ANALYSIS,int,int *,int *);
-HRESULT WINAPI ScriptSubstituteSingleGlyph(HDC,SCRIPT_CACHE*,SCRIPT_ANALYSIS*,OPENTYPE_TAG,OPENTYPE_TAG,OPENTYPE_TAG,LONG,WORD,WORD*);
-HRESULT WINAPI ScriptTextOut(const HDC,SCRIPT_CACHE *,int,int,UINT,const RECT *,const SCRIPT_ANALYSIS *,const WCHAR *,int,const WORD *,int,const int *,const int *,const GOFFSET *);
-HRESULT WINAPI ScriptXtoCP(int,int,int,const WORD *,const SCRIPT_VISATTR *,const int *,const SCRIPT_ANALYSIS *,int *,int *);
-
-
-#pragma pack(pop)
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ndef _USP10_H_ */
diff --git a/winsup/w32api/include/uxtheme.h b/winsup/w32api/include/uxtheme.h
deleted file mode 100644
index 5d06bc8..0000000
--- a/winsup/w32api/include/uxtheme.h
+++ /dev/null
@@ -1,273 +0,0 @@
-#ifndef _UXTHEME_H
-#define _UXTHEME_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#include <commctrl.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if (_WIN32_WINNT >= 0x0501)
-#define DTBG_CLIPRECT 0x00000001
-#define DTBG_DRAWSOLID 0x00000002
-#define DTBG_OMITBORDER 0x00000004
-#define DTBG_OMITCONTENT 0x00000008
-#define DTBG_COMPUTINGREGION 0x00000010
-#define DTBG_MIRRORDC 0x00000020
-#define DTT_GRAYED 0x00000001
-#define ETDT_DISABLE 0x00000001
-#define ETDT_ENABLE 0x00000002
-#define ETDT_USETABTEXTURE 0x00000004
-#define ETDT_ENABLETAB (ETDT_ENABLE|ETDT_USETABTEXTURE)
-#define STAP_ALLOW_NONCLIENT 0x00000001
-#define STAP_ALLOW_CONTROLS 0x00000002
-#define STAP_ALLOW_WEBCONTENT 0x00000004
-#define HTTB_BACKGROUNDSEG 0x0000
-#define HTTB_FIXEDBORDER 0x0002
-#define HTTB_CAPTION 0x0004
-#define HTTB_RESIZINGBORDER_LEFT 0x0010
-#define HTTB_RESIZINGBORDER_TOP 0x0020
-#define HTTB_RESIZINGBORDER_RIGHT 0x0040
-#define HTTB_RESIZINGBORDER_BOTTOM 0x0080
-#define HTTB_RESIZINGBORDER (HTTB_RESIZINGBORDER_LEFT|HTTB_RESIZINGBORDER_TOP|HTTB_RESIZINGBORDER_RIGHT|HTTB_RESIZINGBORDER_BOTTOM)
-#define HTTB_SIZINGTEMPLATE 0x0100
-#define HTTB_SYSTEMSIZINGMARGINS 0x0200
-#define TMT_DISPLAYNAME 0x0259
-#define TMT_TOOLTIP 0x025A
-#define TMT_COMPANY 0x025B
-#define TMT_AUTHOR 0x025C
-#define TMT_COPYRIGHT 0x025D
-#define TMT_URL 0x025E
-#define TMT_VERSION 0x025F
-#define TMT_DESCRIPTION 0x0260
-#define TMT_CAPTIONFONT 0x0321
-#define TMT_SMALLCAPTIONFONT 0x0322
-#define TMT_MENUFONT 0x0323
-#define TMT_STATUSFONT 0x0324
-#define TMT_MSGBOXFONT 0x0325
-#define TMT_ICONTITLEFONT 0x0326
-#define TMT_FLATMENUS 0x03E9
-#define TMT_MINCOLORDEPTH 0x0515
-#define TMT_CSSNAME 0x0579
-#define TMT_XMLNAME 0x057A
-#define TMT_SCROLLBAR 0x0641
-#define TMT_BACKGROUND 0x0642
-#define TMT_ACTIVECAPTION 0x0643
-#define TMT_INACTIVECAPTION 0x0644
-#define TMT_WINDOW 0x0646
-#define TMT_WINDOWFRAME 0x0647
-#define TMT_MENUTEXT 0x0648
-#define TMT_WINDOWTEXT 0x0649
-#define TMT_CAPTIONTEXT 0x064A
-#define TMT_ACTIVEBORDER 0x064B
-#define TMT_INACTIVEBORDER 0x064C
-#define TMT_APPWORKSPACE 0x064D
-#define TMT_HIGHLIGHT 0x064E
-#define TMT_HIGHLIGHTTEXT 0x064F
-#define TMT_BTNFACE 0x0650
-#define TMT_BTNSHADOW 0x0651
-#define TMT_GRAYTEXT 0x0652
-#define TMT_BTNTEXT 0x0653
-#define TMT_INACTIVECAPTIONTEXT 0x0654
-#define TMT_BTNHIGHLIGHT 0x0655
-#define TMT_DKSHADOW3D 0x0656
-#define TMT_LIGHT3D 0x0657
-#define TMT_INFOTEXT 0x0658
-#define TMT_INFOBK 0x0659
-#define TMT_BUTTONALTERNATEFACE 0x065A
-#define TMT_HOTTRACKING 0x065B
-#define TMT_GRADIENTACTIVECAPTION 0x065C
-#define TMT_GRADIENTINACTIVECAPTION 0x065D
-#define TMT_MENUHILIGHT 0x065E
-#define TMT_MENUBAR 0x065F
-#define TMT_TRANSPARENT 0x0899
-#define TMT_AUTOSIZE 0x089A
-#define TMT_BORDERONLY 0x089B
-#define TMT_COMPOSITED 0x089C
-#define TMT_BGFILL 0x089D
-#define TMT_GLYPHTRANSPARENT 0x089E
-#define TMT_GLYPHONLY 0x089F
-#define TMT_ALWAYSSHOWSIZINGBAR 0x08A0
-#define TMT_MIRRORIMAGE 0x08A1
-#define TMT_UNIFORMSIZING 0x08A2
-#define TMT_INTEGRALSIZING 0x08A3
-#define TMT_SOURCEGROW 0x08A4
-#define TMT_SOURCESHRINK 0x08A5
-#define TMT_IMAGECOUNT 0x0961
-#define TMT_ALPHALEVEL 0x0962
-#define TMT_BORDERSIZE 0x0963
-#define TMT_ROUNDCORNERWIDTH 0x0964
-#define TMT_ROUNDCORNERHEIGHT 0x0965
-#define TMT_GRADIENTRATIO1 0x0966
-#define TMT_GRADIENTRATIO2 0x0967
-#define TMT_GRADIENTRATIO3 0x0968
-#define TMT_GRADIENTRATIO4 0x0969
-#define TMT_GRADIENTRATIO5 0x096A
-#define TMT_PROGRESSCHUNKSIZE 0x096B
-#define TMT_PROGRESSSPACESIZE 0x096C
-#define TMT_SATURATION 0x096D
-#define TMT_TEXTBORDERSIZE 0x096E
-#define TMT_ALPHATHRESHOLD 0x096F
-#define TMT_WIDTH 0x0970
-#define TMT_HEIGHT 0x0971
-#define TMT_GLYPHINDEX 0x0972
-#define TMT_TRUESIZESTRETCHMARK 0x0973
-#define TMT_MINDPI1 0x0974
-#define TMT_MINDPI2 0x0975
-#define TMT_MINDPI3 0x0976
-#define TMT_MINDPI4 0x0977
-#define TMT_MINDPI5 0x0978
-#define TMT_GLYPHFONT 0x0A29
-#define TMT_IMAGEFILE 0x0BB9
-#define TMT_IMAGEFILE1 0x0BBA
-#define TMT_IMAGEFILE2 0x0BBB
-#define TMT_IMAGEFILE3 0x0BBC
-#define TMT_IMAGEFILE4 0x0BBD
-#define TMT_IMAGEFILE5 0x0BBE
-#define TMT_STOCKIMAGEFILE 0x0BBF
-#define TMT_GLYPHIMAGEFILE 0x0BC0
-#define TMT_TEXT 0x0C81
-#define TMT_OFFSET 0x0D49
-#define TMT_TEXTSHADOWOFFSET 0x0D4A
-#define TMT_MINSIZE 0x0D4B
-#define TMT_MINSIZE1 0x0D4C
-#define TMT_MINSIZE2 0x0D4D
-#define TMT_MINSIZE3 0x0D4E
-#define TMT_MINSIZE4 0x0D4F
-#define TMT_MINSIZE5 0x0D50
-#define TMT_NORMALSIZE 0x0D51
-#define TMT_SIZINGMARGINS 0x0E11
-#define TMT_CONTENTMARGINS 0x0E12
-#define TMT_CAPTIONMARGINS 0x0E13
-#define TMT_BORDERCOLOR 0x0ED9
-#define TMT_FILLCOLOR 0x0EDA
-#define TMT_TEXTCOLOR 0x0EDB
-#define TMT_EDGELIGHTCOLOR 0x0EDC
-#define TMT_EDGEHIGHLIGHTCOLOR 0x0EDD
-#define TMT_EDGESHADOWCOLOR 0x0EDE
-#define TMT_EDGEDKSHADOWCOLOR 0x0EDF
-#define TMT_EDGEFILLCOLOR 0x0EE0
-#define TMT_TRANSPARENTCOLOR 0x0EE1
-#define TMT_GRADIENTCOLOR1 0x0EE2
-#define TMT_GRADIENTCOLOR2 0x0EE3
-#define TMT_GRADIENTCOLOR3 0x0EE4
-#define TMT_GRADIENTCOLOR4 0x0EE5
-#define TMT_GRADIENTCOLOR5 0x0EE6
-#define TMT_SHADOWCOLOR 0x0EE7
-#define TMT_GLOWCOLOR 0x0EE8
-#define TMT_TEXTBORDERCOLOR 0x0EE9
-#define TMT_TEXTSHADOWCOLOR 0x0EEA
-#define TMT_GLYPHTEXTCOLOR 0x0EEB
-#define TMT_GLYPHTRANSPARENTCOLOR 0x0EEC
-#define TMT_FILLCOLORHINT 0x0EED
-#define TMT_BORDERCOLORHINT 0x0EEE
-#define TMT_ACCENTCOLORHINT 0x0EEF
-#define TMT_BGTYPE 0x0FA1
-#define TMT_BORDERTYPE 0x0FA2
-#define TMT_FILLTYPE 0x0FA3
-#define TMT_SIZINGTYPE 0x0FA4
-#define TMT_HALIGN 0x0FA5
-#define TMT_CONTENTALIGNMENT 0x0FA6
-#define TMT_VALIGN 0x0FA7
-#define TMT_OFFSETTYPE 0x0FA8
-#define TMT_ICONEFFECT 0x0FA9
-#define TMT_TEXTSHADOWTYPE 0x0FAA
-#define TMT_IMAGELAYOUT 0x0FAB
-#define TMT_GLYPHTYPE 0x0FAC
-#define TMT_IMAGESELECTTYPE 0x0FAD
-#define TMT_GLYPHFONTSIZINGTYPE 0x0FAE
-#define TMT_TRUESIZESCALINGTYPE 0x0FAF
-#define TMT_USERPICTURE 0x1389
-#define TMT_DEFAULTPANESIZE 0x138A
-#define TMT_BLENDCOLOR 0x138B
-#define BT_IMAGEFILE 0x0000
-#define BT_BORDERFILL 0x0001
-#define BT_NONE 0x0002
-
-typedef enum PROPERTYORIGIN {
- PO_STATE = 0,
- PO_PART = 1,
- PO_CLASS = 2,
- PO_GLOBAL = 3,
- PO_NOTFOUND = 4
-} PROPERTYORIGIN;
-typedef enum THEMESIZE {
- TS_MIN,
- TS_TRUE,
- TS_DRAW
-} THEME_SIZE;
-typedef struct _DTBGOPTS {
- DWORD dwSize;
- DWORD dwFlags;
- RECT rcClip;
-} DTBGOPTS, *PDTBGOPTS;
-#define MAX_INTLIST_COUNT 10
-typedef struct _INTLIST {
- int iValueCount;
- int iValues[MAX_INTLIST_COUNT];
-} INTLIST, *PINTLIST;
-typedef struct _MARGINS {
- int cxLeftWidth;
- int cxRightWidth;
- int cyTopHeight;
- int cyBottomHeight;
-} MARGINS, *PMARGINS;
-typedef HANDLE HTHEME;
-
-HRESULT WINAPI CloseThemeData(HTHEME);
-HRESULT WINAPI DrawThemeBackground(HTHEME,HDC,int,int,const RECT*,const RECT*);
-HRESULT WINAPI DrawThemeBackgroundEx(HTHEME,HDC,int,int,const RECT*,const DTBGOPTS*);
-HRESULT WINAPI DrawThemeEdge(HTHEME,HDC,int,int,const RECT*,UINT,UINT,RECT*);
-HRESULT WINAPI DrawThemeIcon(HTHEME,HDC,int,int,const RECT*,HIMAGELIST,int);
-HRESULT WINAPI DrawThemeParentBackground(HWND,HDC,RECT*);
-HRESULT WINAPI DrawThemeText(HTHEME,HDC,int,int,LPCWSTR,int,DWORD,DWORD,const RECT*);
-HRESULT WINAPI EnableThemeDialogTexture(HWND,DWORD);
-HRESULT WINAPI EnableTheming(BOOL);
-HRESULT WINAPI GetCurrentThemeName(LPWSTR,int,LPWSTR,int,LPWSTR,int);
-DWORD WINAPI GetThemeAppProperties();
-HRESULT WINAPI GetThemeBackgroundContentRect(HTHEME,HDC,int,int,const RECT*,RECT*);
-HRESULT WINAPI GetThemeBackgroundExtent(HTHEME,HDC,int,int,const RECT*,RECT*);
-HRESULT WINAPI GetThemeBackgroundRegion(HTHEME,HDC,int,int,const RECT*,HRGN*);
-HRESULT WINAPI GetThemeBool(HTHEME,int,int,int,BOOL*);
-HRESULT WINAPI GetThemeColor(HTHEME,int,int,int,COLORREF*);
-HRESULT WINAPI GetThemeDocumentationProperty(LPCWSTR,LPCWSTR,LPWSTR,int);
-HRESULT WINAPI GetThemeEnumValue(HTHEME,int,int,int,int*);
-HRESULT WINAPI GetThemeFilename(HTHEME,int,int,int,LPWSTR,int);
-HRESULT WINAPI GetThemeFont(HTHEME,HDC,int,int,int,LOGFONT*);
-HRESULT WINAPI GetThemeInt(HTHEME,int,int,int,int*);
-HRESULT WINAPI GetThemeIntList(HTHEME,int,int,int,INTLIST*);
-HRESULT WINAPI GetThemeMargins(HTHEME,HDC,int,int,int,RECT*,MARGINS*);
-HRESULT WINAPI GetThemeMetric(HTHEME,HDC,int,int,int,int*);
-HRESULT WINAPI GetThemePartSize(HTHEME,HDC,int,int,RECT*,THEME_SIZE,SIZE*);
-HRESULT WINAPI GetThemePosition(HTHEME,int,int,int,POINT*);
-HRESULT WINAPI GetThemePropertyOrigin(HTHEME,int,int,int,PROPERTYORIGIN*);
-HRESULT WINAPI GetThemeRect(HTHEME,int,int,int,RECT*);
-HRESULT WINAPI GetThemeString(HTHEME,int,int,int,LPWSTR,int);
-BOOL WINAPI GetThemeSysBool(HTHEME,int);
-COLORREF WINAPI GetThemeSysColor(HTHEME,int);
-HBRUSH WINAPI GetThemeSysColorBrush(HTHEME,int);
-HRESULT WINAPI GetThemeSysFont(HTHEME,int,LOGFONT*);
-HRESULT WINAPI GetThemeSysInt(HTHEME,int,int*);
-int WINAPI GetThemeSysSize(HTHEME,int);
-HRESULT WINAPI GetThemeSysString(HTHEME,int,LPWSTR,int);
-HRESULT WINAPI GetThemeTextExtent(HTHEME,HDC,int,int,LPCWSTR,int,DWORD,const RECT*,RECT*);
-HRESULT WINAPI GetThemeTextMetrics(HTHEME,HDC,int,int,TEXTMETRIC*);
-HTHEME WINAPI GetWindowTheme(HWND);
-HRESULT WINAPI HitTestThemeBackground(HTHEME,HDC,int,int,DWORD,const RECT*,HRGN,POINT,WORD*);
-BOOL WINAPI IsAppThemed();
-BOOL WINAPI IsThemeActive();
-BOOL WINAPI IsThemeBackgroundPartiallyTransparent(HTHEME,int,int);
-BOOL WINAPI IsThemeDialogTextureEnabled(HWND);
-BOOL WINAPI IsThemePartDefined(HTHEME,int,int);
-HTHEME WINAPI OpenThemeData(HWND,LPCWSTR);
-void WINAPI SetThemeAppProperties(DWORD);
-HRESULT WINAPI SetWindowTheme(HWND,LPCWSTR,LPCWSTR);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/vfw.h b/winsup/w32api/include/vfw.h
deleted file mode 100644
index 950340b..0000000
--- a/winsup/w32api/include/vfw.h
+++ /dev/null
@@ -1,1370 +0,0 @@
-#ifndef _VFW_H
-#define _VFW_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifndef _WINDOWS_H
-#include <windows.h>
-#endif
-#ifndef _MMSYSTEM_H
-#include <mmsystem.h>
-#endif
-#if !defined (_OLE2_H) && !defined (_OBJC_NO_COM)
-#include <ole2.h>
-#endif
-
-#define VFWAPI WINAPI
-#define VFWAPIV WINAPIV
-
-#include <pshpack8.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define ICERR_OK 0
-#define ICERR_DONTDRAW 1
-#define ICERR_NEWPALETTE 2
-#define ICERR_GOTOKEYFRAME 3
-#define ICERR_STOPDRAWING 4
-#define ICERR_UNSUPPORTED -1
-#define ICERR_BADFORMAT -2
-#define ICERR_MEMORY -3
-#define ICERR_INTERNAL -4
-#define ICERR_BADFLAGS -5
-#define ICERR_BADPARAM -6
-#define ICERR_BADSIZE -7
-#define ICERR_BADHANDLE -8
-#define ICERR_CANTUPDATE -9
-#define ICERR_ABORT -10
-#define ICERR_ERROR -100
-#define ICERR_BADBITDEPTH -200
-#define ICERR_BADIMAGESIZE -201
-#define ICERR_CUSTOM -400
-#define ICCOMPRESSFRAMES_PADDING 0x01
-#define ICM_USER (DRV_USER+0x0000)
-#define ICM_RESERVED_LOW (DRV_USER+0x1000)
-#define ICM_RESERVED_HIGH (DRV_USER+0x2000)
-#define ICM_RESERVED ICM_RESERVED_LOW
-#define ICM_GETSTATE (ICM_RESERVED+0)
-#define ICM_SETSTATE (ICM_RESERVED+1)
-#define ICM_GETINFO (ICM_RESERVED+2)
-#define ICM_CONFIGURE (ICM_RESERVED+10)
-#define ICM_ABOUT (ICM_RESERVED+11)
-#define ICM_GETDEFAULTQUALITY (ICM_RESERVED+30)
-#define ICM_GETQUALITY (ICM_RESERVED+31)
-#define ICM_SETQUALITY (ICM_RESERVED+32)
-#define ICM_SET (ICM_RESERVED+40)
-#define ICM_GET (ICM_RESERVED+41)
-#define ICM_FRAMERATE mmioFOURCC('F','r','m','R')
-#define ICM_KEYFRAMERATE mmioFOURCC('K','e','y','R')
-#define ICM_COMPRESS_GET_FORMAT (ICM_USER+4)
-#define ICM_COMPRESS_GET_SIZE (ICM_USER+5)
-#define ICM_COMPRESS_QUERY (ICM_USER+6)
-#define ICM_COMPRESS_BEGIN (ICM_USER+7)
-#define ICM_COMPRESS (ICM_USER+8)
-#define ICM_COMPRESS_END (ICM_USER+9)
-#define ICM_DECOMPRESS_GET_FORMAT (ICM_USER+10)
-#define ICM_DECOMPRESS_QUERY (ICM_USER+11)
-#define ICM_DECOMPRESS_BEGIN (ICM_USER+12)
-#define ICM_DECOMPRESS (ICM_USER+13)
-#define ICM_DECOMPRESS_END (ICM_USER+14)
-#define ICM_DECOMPRESS_SET_PALETTE (ICM_USER+29)
-#define ICM_DECOMPRESS_GET_PALETTE (ICM_USER+30)
-#define ICM_DRAW_QUERY (ICM_USER+31)
-#define ICM_DRAW_BEGIN (ICM_USER+15)
-#define ICM_DRAW_GET_PALETTE (ICM_USER+16)
-#define ICM_DRAW_START (ICM_USER+18)
-#define ICM_DRAW_STOP (ICM_USER+19)
-#define ICM_DRAW_END (ICM_USER+21)
-#define ICM_DRAW_GETTIME (ICM_USER+32)
-#define ICM_DRAW (ICM_USER+33)
-#define ICM_DRAW_WINDOW (ICM_USER+34)
-#define ICM_DRAW_SETTIME (ICM_USER+35)
-#define ICM_DRAW_REALIZE (ICM_USER+36)
-#define ICM_DRAW_FLUSH (ICM_USER+37)
-#define ICM_DRAW_RENDERBUFFER (ICM_USER+38)
-#define ICM_DRAW_START_PLAY (ICM_USER+39)
-#define ICM_DRAW_STOP_PLAY (ICM_USER+40)
-#define ICM_DRAW_SUGGESTFORMAT (ICM_USER+50)
-#define ICM_DRAW_CHANGEPALETTE (ICM_USER+51)
-#define ICM_GETBUFFERSWANTED (ICM_USER+41)
-#define ICM_GETDEFAULTKEYFRAMERATE (ICM_USER+42)
-#define ICM_DECOMPRESSEX_BEGIN (ICM_USER+60)
-#define ICM_DECOMPRESSEX_QUERY (ICM_USER+61)
-#define ICM_DECOMPRESSEX (ICM_USER+62)
-#define ICM_DECOMPRESSEX_END (ICM_USER+63)
-#define ICM_COMPRESS_FRAMES_INFO (ICM_USER+70)
-#define ICM_SET_STATUS_PROC (ICM_USER+72)
-#define ICMF_CONFIGURE_QUERY 0x01
-#define ICCOMPRESS_KEYFRAME 0x01
-#define ICSTATUS_START 0
-#define ICSTATUS_STATUS 1
-#define ICSTATUS_END 2
-#define ICSTATUS_ERROR 3
-#define ICSTATUS_YIELD 4
-#define ICMODE_COMPRESS 1
-#define ICMODE_DECOMPRESS 2
-#define ICMODE_FASTDECOMPRESS 3
-#define ICMODE_QUERY 4
-#define ICMODE_FASTCOMPRESS 5
-#define ICMODE_DRAW 8
-#define ICQUALITY_LOW 0
-#define ICQUALITY_HIGH 10000
-#define ICQUALITY_DEFAULT -1
-#define VIDCF_QUALITY 0x01
-#define VIDCF_CRUNCH 0x02
-#define VIDCF_TEMPORAL 0x04
-#define VIDCF_COMPRESSFRAMES 0x08
-#define VIDCF_DRAW 0x10
-#define VIDCF_FASTTEMPORALC 0x20
-#define VIDCF_FASTTEMPORALD 0x80
-#define VIDCF_QUALITYTIME 0x40
-#define VIDCF_FASTTEMPORAL (VIDCF_FASTTEMPORALC|VIDCF_FASTTEMPORALD)
-#define ICMF_ABOUT_QUERY 0x01
-#define ICDECOMPRESS_HURRYUP 0x80000000
-#define ICDECOMPRESS_UPDATE 0x40000000
-#define ICDECOMPRESS_PREROLL 0x20000000
-#define ICDECOMPRESS_NULLFRAME 0x10000000
-#define ICDECOMPRESS_NOTKEYFRAME 0x8000000
-#define ICDRAW_QUERY 0x01L
-#define ICDRAW_FULLSCREEN 0x02L
-#define ICDRAW_HDC 0x04L
-#define ICDRAW_ANIMATE 0x08L
-#define ICDRAW_CONTINUE 0x10L
-#define ICDRAW_MEMORYDC 0x20L
-#define ICDRAW_UPDATING 0x40L
-#define ICDRAW_RENDER 0x80L
-#define ICDRAW_BUFFER 0x100L
-#define ICINSTALL_UNICODE 0x8000
-#define ICINSTALL_FUNCTION 0x01
-#define ICINSTALL_DRIVER 0x02
-#define ICINSTALL_HDRV 0x04
-#define ICINSTALL_DRIVERW 0x8002
-#define ICDRAW_HURRYUP 0x80000000L
-#define ICDRAW_UPDATE 0x40000000L
-#define ICDRAW_PREROLL 0x20000000L
-#define ICDRAW_NULLFRAME 0x10000000L
-#define ICDRAW_NOTKEYFRAME 0x8000000L
-#define ICMF_COMPVARS_VALID 0x01
-#define ICMF_CHOOSE_KEYFRAME 0x01
-#define ICMF_CHOOSE_DATARATE 0x02
-#define ICMF_CHOOSE_PREVIEW 0x04
-#define ICMF_CHOOSE_ALLCOMPRESSORS 0x08
-#define ICTYPE_VIDEO mmioFOURCC('v','i','d','c')
-#define ICTYPE_AUDIO mmioFOURCC('a','u','d','c')
-#define formtypeAVI mmioFOURCC('A','V','I',' ')
-#define listtypeAVIHEADER mmioFOURCC('h','d','r','l')
-#define ckidAVIMAINHDR mmioFOURCC('a','v','i','h')
-#define listtypeSTREAMHEADER mmioFOURCC('s','t','r','l')
-#define ckidSTREAMHEADER mmioFOURCC('s','t','r','h')
-#define ckidSTREAMFORMAT mmioFOURCC('s','t','r','f')
-#define ckidSTREAMHANDLERDATA mmioFOURCC('s','t','r','d')
-#define ckidSTREAMNAME mmioFOURCC('s','t','r','n')
-#define listtypeAVIMOVIE mmioFOURCC('m','o','v','i')
-#define listtypeAVIRECORD mmioFOURCC('r','e','c',' ')
-#define ckidAVINEWINDEX mmioFOURCC('i', 'd', 'x', '1')
-#define streamtypeANY 0UL
-#define streamtypeVIDEO mmioFOURCC('v','i','d','s')
-#define streamtypeAUDIO mmioFOURCC('a','u','d','s')
-#define streamtypeMIDI mmioFOURCC('m','i','d','s')
-#define streamtypeTEXT mmioFOURCC('t','x','t','s')
-#define cktypeDIBbits aviTWOCC('d','b')
-#define cktypeDIBcompressed aviTWOCC('d','c')
-#define cktypePALchange aviTWOCC('p','c')
-#define cktypeWAVEbytes aviTWOCC('w','b')
-#define ckidAVIPADDING mmioFOURCC('J','U','N','K')
-#define FromHex(n) (((n)>='A')?((n)+10-'A'):((n)-'0'))
-#define StreamFromFOURCC(fcc) ((WORD)((FromHex(LOBYTE(LOWORD(fcc)))<<4)+(FromHex(HIBYTE(LOWORD(fcc))))))
-#define TWOCCFromFOURCC(fcc) HIWORD(fcc)
-#define ToHex(n) ((BYTE)(((n)>9)?((n)-10+'A'):((n)+'0')))
-#define MAKEAVICKID(tcc, stream) MAKELONG((ToHex((stream)&0x0f)<<8)|(ToHex(((stream)&0xf0)>>4)),tcc)
-#define AVIF_HASINDEX 0x10
-#define AVIF_MUSTUSEINDEX 0x20
-#define AVIF_ISINTERLEAVED 0x100
-#define AVIF_TRUSTCKTYPE 0x800
-#define AVIF_WASCAPTUREFILE 0x10000
-#define AVIF_COPYRIGHTED 0x20000
-#define AVI_HEADERSIZE 2048
-#define AVISF_DISABLED 0x01
-#define AVISF_VIDEO_PALCHANGES 0x10000
-#define AVIIF_LIST 0x01
-#define AVIIF_TWOCC 0x02
-#define AVIIF_KEYFRAME 0x10
-#define AVIIF_NOTIME 0x100
-#define AVIIF_COMPUSE 0xfff0000
-#define AVIIF_KEYFRAME 0x10
-#define AVIGETFRAMEF_BESTDISPLAYFMT 1
-#define AVISTREAMINFO_DISABLED 0x01
-#define AVISTREAMINFO_FORMATCHANGES 0x10000
-#define AVIFILEINFO_HASINDEX 0x10
-#define AVIFILEINFO_MUSTUSEINDEX 0x20
-#define AVIFILEINFO_ISINTERLEAVED 0x100
-#define AVIFILEINFO_TRUSTCKTYPE 0x800
-#define AVIFILEINFO_WASCAPTUREFILE 0x10000
-#define AVIFILEINFO_COPYRIGHTED 0x20000
-#define AVIFILECAPS_CANREAD 0x01
-#define AVIFILECAPS_CANWRITE 0x02
-#define AVIFILECAPS_ALLKEYFRAMES 0x10
-#define AVIFILECAPS_NOCOMPRESSION 0x20
-#define AVICOMPRESSF_INTERLEAVE 0x01
-#define AVICOMPRESSF_DATARATE 0x02
-#define AVICOMPRESSF_KEYFRAMES 0x04
-#define AVICOMPRESSF_VALID 0x08
-#define FIND_DIR 0x0000000fL
-#define FIND_NEXT 0x00000001L
-#define FIND_PREV 0x00000004L
-#define FIND_FROM_START 0x00000008L
-#define FIND_TYPE 0x000000f0L
-#define FIND_KEY 0x00000010L
-#define FIND_ANY 0x00000020L
-#define FIND_FORMAT 0x00000040L
-#define FIND_RET 0x0000f000L
-#define FIND_POS 0x00000000L
-#define FIND_LENGTH 0x00001000L
-#define FIND_OFFSET 0x00002000L
-#define FIND_SIZE 0x00003000L
-#define FIND_INDEX 0x00004000L
-#define AVIERR_OK 0
-#define MAKE_AVIERR(e) MAKE_SCODE(SEVERITY_ERROR,FACILITY_ITF,0x4000+e)
-#define AVIERR_UNSUPPORTED MAKE_AVIERR(101)
-#define AVIERR_BADFORMAT MAKE_AVIERR(102)
-#define AVIERR_MEMORY MAKE_AVIERR(103)
-#define AVIERR_INTERNAL MAKE_AVIERR(104)
-#define AVIERR_BADFLAGS MAKE_AVIERR(105)
-#define AVIERR_BADPARAM MAKE_AVIERR(106)
-#define AVIERR_BADSIZE MAKE_AVIERR(107)
-#define AVIERR_BADHANDLE MAKE_AVIERR(108)
-#define AVIERR_FILEREAD MAKE_AVIERR(109)
-#define AVIERR_FILEWRITE MAKE_AVIERR(110)
-#define AVIERR_FILEOPEN MAKE_AVIERR(111)
-#define AVIERR_COMPRESSOR MAKE_AVIERR(112)
-#define AVIERR_NOCOMPRESSOR MAKE_AVIERR(113)
-#define AVIERR_READONLY MAKE_AVIERR(114)
-#define AVIERR_NODATA MAKE_AVIERR(115)
-#define AVIERR_BUFFERTOOSMALL MAKE_AVIERR(116)
-#define AVIERR_CANTCOMPRESS MAKE_AVIERR(117)
-#define AVIERR_USERABORT MAKE_AVIERR(198)
-#define AVIERR_ERROR MAKE_AVIERR(199)
-#define MCIWNDOPENF_NEW 0x0001
-#define MCIWNDF_NOAUTOSIZEWINDOW 0x0001
-#define MCIWNDF_NOPLAYBAR 0x0002
-#define MCIWNDF_NOAUTOSIZEMOVIE 0x0004
-#define MCIWNDF_NOMENU 0x0008
-#define MCIWNDF_SHOWNAME 0x0010
-#define MCIWNDF_SHOWPOS 0x0020
-#define MCIWNDF_SHOWMODE 0x0040
-#define MCIWNDF_SHOWALL 0x0070
-#define MCIWNDF_NOTIFYMODE 0x0100
-#define MCIWNDF_NOTIFYPOS 0x0200
-#define MCIWNDF_NOTIFYSIZE 0x0400
-#define MCIWNDF_NOTIFYERROR 0x1000
-#define MCIWNDF_NOTIFYALL 0x1F00
-#define MCIWNDF_NOTIFYANSI 0x0080
-#define MCIWNDF_NOTIFYMEDIAA 0x0880
-#define MCIWNDF_NOTIFYMEDIAW 0x0800
-#define MCIWNDF_RECORD 0x2000
-#define MCIWNDF_NOERRORDLG 0x4000
-#define MCIWNDF_NOOPEN 0x8000
-#define MCIWNDM_GETDEVICEID (WM_USER + 100)
-#define MCIWNDM_GETSTART (WM_USER + 103)
-#define MCIWNDM_GETLENGTH (WM_USER + 104)
-#define MCIWNDM_GETEND (WM_USER + 105)
-#define MCIWNDM_EJECT (WM_USER + 107)
-#define MCIWNDM_SETZOOM (WM_USER + 108)
-#define MCIWNDM_GETZOOM (WM_USER + 109)
-#define MCIWNDM_SETVOLUME (WM_USER + 110)
-#define MCIWNDM_GETVOLUME (WM_USER + 111)
-#define MCIWNDM_SETSPEED (WM_USER + 112)
-#define MCIWNDM_GETSPEED (WM_USER + 113)
-#define MCIWNDM_SETREPEAT (WM_USER + 114)
-#define MCIWNDM_GETREPEAT (WM_USER + 115)
-#define MCIWNDM_REALIZE (WM_USER + 118)
-#define MCIWNDM_VALIDATEMEDIA (WM_USER + 121)
-#define MCIWNDM_PLAYFROM (WM_USER + 122)
-#define MCIWNDM_PLAYTO (WM_USER + 123)
-#define MCIWNDM_GETPALETTE (WM_USER + 126)
-#define MCIWNDM_SETPALETTE (WM_USER + 127)
-#define MCIWNDM_SETTIMERS (WM_USER + 129)
-#define MCIWNDM_SETACTIVETIMER (WM_USER + 130)
-#define MCIWNDM_SETINACTIVETIMER (WM_USER + 131)
-#define MCIWNDM_GETACTIVETIMER (WM_USER + 132)
-#define MCIWNDM_GETINACTIVETIMER (WM_USER + 133)
-#define MCIWNDM_CHANGESTYLES (WM_USER + 135)
-#define MCIWNDM_GETSTYLES (WM_USER + 136)
-#define MCIWNDM_GETALIAS (WM_USER + 137)
-#define MCIWNDM_PLAYREVERSE (WM_USER + 139)
-#define MCIWNDM_GET_SOURCE (WM_USER + 140)
-#define MCIWNDM_PUT_SOURCE (WM_USER + 141)
-#define MCIWNDM_GET_DEST (WM_USER + 142)
-#define MCIWNDM_PUT_DEST (WM_USER + 143)
-#define MCIWNDM_CAN_PLAY (WM_USER + 144)
-#define MCIWNDM_CAN_WINDOW (WM_USER + 145)
-#define MCIWNDM_CAN_RECORD (WM_USER + 146)
-#define MCIWNDM_CAN_SAVE (WM_USER + 147)
-#define MCIWNDM_CAN_EJECT (WM_USER + 148)
-#define MCIWNDM_CAN_CONFIG (WM_USER + 149)
-#define MCIWNDM_PALETTEKICK (WM_USER + 150)
-#define MCIWNDM_OPENINTERFACE (WM_USER + 151)
-#define MCIWNDM_SETOWNER (WM_USER + 152)
-#define MCIWNDM_SENDSTRINGA (WM_USER + 101)
-#define MCIWNDM_GETPOSITIONA (WM_USER + 102)
-#define MCIWNDM_GETMODEA (WM_USER + 106)
-#define MCIWNDM_SETTIMEFORMATA (WM_USER + 119)
-#define MCIWNDM_GETTIMEFORMATA (WM_USER + 120)
-#define MCIWNDM_GETFILENAMEA (WM_USER + 124)
-#define MCIWNDM_GETDEVICEA (WM_USER + 125)
-#define MCIWNDM_GETERRORA (WM_USER + 128)
-#define MCIWNDM_NEWA (WM_USER + 134)
-#define MCIWNDM_RETURNSTRINGA (WM_USER + 138)
-#define MCIWNDM_OPENA (WM_USER + 153)
-#define MCIWNDM_SENDSTRINGW (WM_USER + 201)
-#define MCIWNDM_GETPOSITIONW (WM_USER + 202)
-#define MCIWNDM_GETMODEW (WM_USER + 206)
-#define MCIWNDM_SETTIMEFORMATW (WM_USER + 219)
-#define MCIWNDM_GETTIMEFORMATW (WM_USER + 220)
-#define MCIWNDM_GETFILENAMEW (WM_USER + 224)
-#define MCIWNDM_GETDEVICEW (WM_USER + 225)
-#define MCIWNDM_GETERRORW (WM_USER + 228)
-#define MCIWNDM_NEWW (WM_USER + 234)
-#define MCIWNDM_RETURNSTRINGW (WM_USER + 238)
-#define MCIWNDM_OPENW (WM_USER + 252)
-#define MCIWNDM_NOTIFYMODE (WM_USER + 200)
-#define MCIWNDM_NOTIFYPOS (WM_USER + 201)
-#define MCIWNDM_NOTIFYSIZE (WM_USER + 202)
-#define MCIWNDM_NOTIFYMEDIA (WM_USER + 203)
-#define MCIWNDM_NOTIFYERROR (WM_USER + 205)
-#define MCIWND_START -1
-#define MCIWND_END -2
-#define DDF_UPDATE 0x02
-#define DDF_SAME_HDC 0x04
-#define DDF_SAME_DRAW 0x08
-#define DDF_DONTDRAW 0x10
-#define DDF_ANIMATE 0x20
-#define DDF_BUFFER 0x40
-#define DDF_JUSTDRAWIT 0x80
-#define DDF_FULLSCREEN 0x100
-#define DDF_BACKGROUNDPAL 0x200
-#define DDF_NOTKEYFRAME 0x400
-#define DDF_HURRYUP 0x800
-#define DDF_HALFTONE 0x1000
-#define DDF_PREROLL DDF_DONTDRAW
-#define DDF_SAME_DIB DDF_SAME_DRAW
-#define DDF_SAME_SIZE DDF_SAME_DRAW
-#define PD_CAN_DRAW_DIB 0x01
-#define PD_CAN_STRETCHDIB 0x02
-#define PD_STRETCHDIB_1_1_OK 0x04
-#define PD_STRETCHDIB_1_2_OK 0x08
-#define PD_STRETCHDIB_1_N_OK 0x10
-#ifndef mmioFOURCC
-#define mmioFOURCC(c0,c1,c2,c3) ((DWORD)(BYTE)(c0)|((DWORD)(BYTE)(c1)<<8)|((DWORD)(BYTE)(c2)<<16)|((DWORD)(BYTE)(c3)<<24))
-#endif
-#ifndef aviTWOCC
-#define aviTWOCC(ch0,ch1) ((WORD)(BYTE)(ch0)|((WORD)(BYTE)(ch1)<<8))
-#endif
-
-#ifndef RC_INVOKED
-DECLARE_HANDLE(HIC);
-DECLARE_HANDLE(HDRAWDIB);
-typedef WORD TWOCC;
-typedef BOOL (CALLBACK *AVISAVECALLBACK)(INT);
-typedef struct {
- DWORD dwSize;
- DWORD fccType;
- DWORD fccHandler;
- DWORD dwVersion;
- DWORD dwFlags;
- LRESULT dwError;
- LPVOID pV1Reserved;
- LPVOID pV2Reserved;
- DWORD dnDevNode;
-} ICOPEN,*LPICOPEN;
-typedef struct {
- DWORD dwFlags;
- LPBITMAPINFOHEADER lpbiOutput;
- LPVOID lpOutput;
- LPBITMAPINFOHEADER lpbiInput;
- LPVOID lpInput;
- LPDWORD lpckid;
- LPDWORD lpdwFlags;
- LONG lFrameNum;
- DWORD dwFrameSize;
- DWORD dwQuality;
- LPBITMAPINFOHEADER lpbiPrev;
- LPVOID lpPrev;
-} ICCOMPRESS;
-typedef struct {
- DWORD dwFlags;
- LPBITMAPINFOHEADER lpbiOutput;
- LPARAM lOutput;
- LPBITMAPINFOHEADER lpbiInput;
- LPARAM lInput;
- LONG lStartFrame;
- LONG lFrameCount;
- LONG lQuality;
- LONG lDataRate;
- LONG lKeyRate;
- DWORD dwRate;
- DWORD dwScale;
- DWORD dwOverheadPerFrame;
- DWORD dwReserved2;
- LONG (CALLBACK *GetData)(LPARAM,LONG,LPVOID,LONG);
- LONG (CALLBACK *PutData)(LPARAM,LONG,LPVOID,LONG);
-} ICCOMPRESSFRAMES;
-typedef struct {
- DWORD dwFlags;
- LPARAM lParam;
- LONG (CALLBACK *Status)(LPARAM,UINT,LONG);
-} ICSETSTATUSPROC;
-typedef struct {
- DWORD dwSize;
- DWORD fccType;
- DWORD fccHandler;
- DWORD dwFlags;
- DWORD dwVersion;
- DWORD dwVersionICM;
- WCHAR szName[16];
- WCHAR szDescription[128];
- WCHAR szDriver[128];
-} ICINFO;
-typedef struct {
- DWORD dwFlags;
- LPBITMAPINFOHEADER lpbiInput;
- LPVOID lpInput;
- LPBITMAPINFOHEADER lpbiOutput;
- LPVOID lpOutput;
- DWORD ckid;
-} ICDECOMPRESS;
-typedef struct {
- DWORD dwFlags;
- LPBITMAPINFOHEADER lpbiSrc;
- LPVOID lpSrc;
- LPBITMAPINFOHEADER lpbiDst;
- LPVOID lpDst;
- INT xDst;
- INT yDst;
- INT dxDst;
- INT dyDst;
- INT xSrc;
- INT ySrc;
- INT dxSrc;
- INT dySrc;
-} ICDECOMPRESSEX;
-typedef struct {
- DWORD dwFlags;
- LPBITMAPINFOHEADER lpbiIn;
- LPBITMAPINFOHEADER lpbiSuggest;
- INT dxSrc;
- INT dySrc;
- INT dxDst;
- INT dyDst;
- HIC hicDecompressor;
-} ICDRAWSUGGEST;
-typedef struct {
- DWORD dwFlags;
- INT iStart;
- INT iLen;
- LPPALETTEENTRY lppe;
-} ICPALETTE;
-typedef struct {
- DWORD dwFlags;
- HPALETTE hpal;
- HWND hwnd;
- HDC hdc;
- INT xDst;
- INT yDst;
- INT dxDst;
- INT dyDst;
- LPBITMAPINFOHEADER lpbi;
- INT xSrc;
- INT ySrc;
- INT dxSrc;
- INT dySrc;
- DWORD dwRate;
- DWORD dwScale;
-} ICDRAWBEGIN;
-typedef struct {
- DWORD dwFlags;
- LPVOID lpFormat;
- LPVOID lpData;
- DWORD cbData;
- LONG lTime;
-} ICDRAW;
-typedef struct {
- LONG cbSize;
- DWORD dwFlags;
- HIC hic;
- DWORD fccType;
- DWORD fccHandler;
- LPBITMAPINFO lpbiIn;
- LPBITMAPINFO lpbiOut;
- LPVOID lpBitsOut;
- LPVOID lpBitsPrev;
- LONG lFrame;
- LONG lKey;
- LONG lDataRate;
- LONG lQ;
- LONG lKeyCount;
- LPVOID lpState;
- LONG cbState;
-} COMPVARS, *PCOMPVARS;
-typedef struct _MainAVIHeader
-{
- DWORD dwMicroSecPerFrame;
- DWORD dwMaxBytesPerSec;
- DWORD dwPaddingGranularity;
- DWORD dwFlags;
- DWORD dwTotalFrames;
- DWORD dwInitialFrames;
- DWORD dwStreams;
- DWORD dwSuggestedBufferSize;
- DWORD dwWidth;
- DWORD dwHeight;
- DWORD dwReserved[4];
-} MainAVIHeader;
-typedef struct {
- FOURCC fccType;
- FOURCC fccHandler;
- DWORD dwFlags;
- WORD wPriority;
- WORD wLanguage;
- DWORD dwInitialFrames;
- DWORD dwScale;
- DWORD dwRate;
- DWORD dwStart;
- DWORD dwLength;
- DWORD dwSuggestedBufferSize;
- DWORD dwQuality;
- DWORD dwSampleSize;
- RECT rcFrame;
-} AVIStreamHeader;
-typedef struct _AVIINDEXENTRY {
- DWORD ckid;
- DWORD dwFlags;
- DWORD dwChunkOffset;
- DWORD dwChunkLength;
-} AVIINDEXENTRY;
-typedef struct _AVIPALCHANGE {
- BYTE bFirstEntry;
- BYTE bNumEntries;
- WORD wFlags;
- PALETTEENTRY peNew[1];
-} AVIPALCHANGE;
-typedef struct _AVISTREAMINFOA {
- DWORD fccType;
- DWORD fccHandler;
- DWORD dwFlags;
- DWORD dwCaps;
- WORD wPriority;
- WORD wLanguage;
- DWORD dwScale;
- DWORD dwRate;
- DWORD dwStart;
- DWORD dwLength;
- DWORD dwInitialFrames;
- DWORD dwSuggestedBufferSize;
- DWORD dwQuality;
- DWORD dwSampleSize;
- RECT rcFrame;
- DWORD dwEditCount;
- DWORD dwFormatChangeCount;
- CHAR szName[64];
-} AVISTREAMINFOA, * LPAVISTREAMINFOA, *PAVISTREAMINFOA;
-typedef struct _AVISTREAMINFOW {
- DWORD fccType;
- DWORD fccHandler;
- DWORD dwFlags;
- DWORD dwCaps;
- WORD wPriority;
- WORD wLanguage;
- DWORD dwScale;
- DWORD dwRate;
- DWORD dwStart;
- DWORD dwLength;
- DWORD dwInitialFrames;
- DWORD dwSuggestedBufferSize;
- DWORD dwQuality;
- DWORD dwSampleSize;
- RECT rcFrame;
- DWORD dwEditCount;
- DWORD dwFormatChangeCount;
- WCHAR szName[64];
-} AVISTREAMINFOW, * LPAVISTREAMINFOW, *PAVISTREAMINFOW;
-typedef struct _AVIFILEINFOW {
- DWORD dwMaxBytesPerSec;
- DWORD dwFlags;
- DWORD dwCaps;
- DWORD dwStreams;
- DWORD dwSuggestedBufferSize;
- DWORD dwWidth;
- DWORD dwHeight;
- DWORD dwScale;
- DWORD dwRate;
- DWORD dwLength;
- DWORD dwEditCount;
- WCHAR szFileType[64];
-} AVIFILEINFOW, *LPAVIFILEINFOW, *PAVIFILEINFOW;
-typedef struct _AVIFILEINFOA {
- DWORD dwMaxBytesPerSec;
- DWORD dwFlags;
- DWORD dwCaps;
- DWORD dwStreams;
- DWORD dwSuggestedBufferSize;
- DWORD dwWidth;
- DWORD dwHeight;
- DWORD dwScale;
- DWORD dwRate;
- DWORD dwLength;
- DWORD dwEditCount;
- CHAR szFileType[64];
-} AVIFILEINFOA, *LPAVIFILEINFOA, *PAVIFILEINFOA;
-typedef struct _AVICOMPRESSOPTIONS {
- DWORD fccType;
- DWORD fccHandler;
- DWORD dwKeyFrameEvery;
- DWORD dwQuality;
- DWORD dwBytesPerSecond;
- DWORD dwFlags;
- LPVOID lpFormat;
- DWORD cbFormat;
- LPVOID lpParms;
- DWORD cbParms;
- DWORD dwInterleaveEvery;
-} AVICOMPRESSOPTIONS, *LPAVICOMPRESSOPTIONS,*PAVICOMPRESSOPTIONS;
-typedef struct _CAPDRIVERCAPS {
- UINT wDeviceIndex;
- BOOL fHasOverlay;
- BOOL fHasDlgVideoSource;
- BOOL fHasDlgVideoFormat;
- BOOL fHasDlgVideoDisplay;
- BOOL fCaptureInitialized;
- BOOL fDriverSuppliesPalettes;
- HANDLE hVideoIn;
- HANDLE hVideoOut;
- HANDLE hVideoExtIn;
- HANDLE hVideoExtOut;
-} CAPDRIVERCAPS, *LPCAPDRIVERCAPS;
-typedef struct _CAPINFOCHUNK {
- FOURCC fccInfoID;
- LPVOID lpData;
- LONG cbData;
-} CAPINFOCHUNK, *LPCAPINFOCHUNK;
-typedef struct _CAPSTATUS {
- UINT uiImageWidth;
- UINT uiImageHeight;
- BOOL fLiveWindow;
- BOOL fOverlayWindow;
- BOOL fScale;
- POINT ptScroll;
- BOOL fUsingDefaultPalette;
- BOOL fAudioHardware;
- BOOL fCapFileExists;
- DWORD dwCurrentVideoFrame;
- DWORD dwCurrentVideoFramesDropped;
- DWORD dwCurrentWaveSamples;
- DWORD dwCurrentTimeElapsedMS;
- HPALETTE hPalCurrent;
- BOOL fCapturingNow;
- DWORD dwReturn;
- UINT wNumVideoAllocated;
- UINT wNumAudioAllocated;
-} CAPSTATUS, *LPCAPSTATUS;
-typedef struct _CAPTUREPARMS {
- DWORD dwRequestMicroSecPerFrame;
- BOOL fMakeUserHitOKToCapture;
- UINT wPercentDropForError;
- BOOL fYield;
- DWORD dwIndexSize;
- UINT wChunkGranularity;
- BOOL fUsingDOSMemory;
- UINT wNumVideoRequested;
- BOOL fCaptureAudio;
- UINT wNumAudioRequested;
- UINT vKeyAbort;
- BOOL fAbortLeftMouse;
- BOOL fAbortRightMouse;
- BOOL fLimitEnabled;
- UINT wTimeLimit;
- BOOL fMCIControl;
- BOOL fStepMCIDevice;
- DWORD dwMCIStartTime;
- DWORD dwMCIStopTime;
- BOOL fStepCaptureAt2x;
- UINT wStepCaptureAverageFrames;
- DWORD dwAudioBufferSize;
- BOOL fDisableWriteCache;
- UINT AVStreamMaster;
-} CAPTUREPARMS, *LPCAPTUREPARMS;
-
-typedef struct videohdr_tag {
- LPBYTE lpData;
- DWORD dwBufferLength;
- DWORD dwBytesUsed;
- DWORD dwTimeCaptured;
- DWORD dwUser;
- DWORD dwFlags;
- DWORD_PTR dwReserved[4];
-} VIDEOHDR, *LPVIDEOHDR;
-
-#if !defined (_OBJC_NO_COM)
-#define DEFINE_AVIGUID(name,l,w1,w2) DEFINE_GUID(name,l,w1,w2,0xC0,0,0,0,0,0,0,0x46)
-DEFINE_AVIGUID(IID_IAVIFile,0x00020020,0,0);
-DEFINE_AVIGUID(IID_IAVIStream,0x00020021,0,0);
-DEFINE_AVIGUID(IID_IAVIStreaming,0x00020022,0,0);
-DEFINE_AVIGUID(IID_IGetFrame,0x00020023,0,0);
-DEFINE_AVIGUID(IID_IAVIEditStream,0x00020024,0,0);
-DEFINE_AVIGUID(CLSID_AVIFile,0x00020000,0,0);
-
-#define INTERFACE IAVIStream
-DECLARE_INTERFACE_(IAVIStream, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Create)(THIS_ LPARAM,LPARAM) PURE;
- STDMETHOD(Info)(THIS_ AVISTREAMINFOW*,LONG) PURE;
- STDMETHOD_(LONG,FindSample)(THIS_ LONG,LONG) PURE;
- STDMETHOD(ReadFormat)(THIS_ LONG,LPVOID,LONG*) PURE;
- STDMETHOD(SetFormat)(THIS_ LONG,LPVOID,LONG) PURE;
- STDMETHOD(Read)(THIS_ LONG,LONG,LPVOID,LONG,LONG*,LONG*) PURE;
- STDMETHOD(Write)(THIS_ LONG,LONG,LPVOID,LONG,DWORD,LONG*,LONG*) PURE;
- STDMETHOD(Delete)(THIS_ LONG,LONG) PURE;
- STDMETHOD(ReadData)(THIS_ DWORD,LPVOID,LONG*) PURE;
- STDMETHOD(WriteData)(THIS_ DWORD,LPVOID,LONG) PURE;
- STDMETHOD(SetInfo)(THIS_ AVISTREAMINFOW*,LONG) PURE;
-};
-#undef INTERFACE
-typedef IAVIStream *PAVISTREAM;
-
-#define INTERFACE IAVIStreaming
-DECLARE_INTERFACE_(IAVIStreaming, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Begin)(THIS_ LONG,LONG,LONG) PURE;
- STDMETHOD(End)(THIS) PURE;
-};
-#undef INTERFACE
-typedef IAVIStreaming *PAVISTREAMING;
-
-#define INTERFACE IAVIEditStream
-DECLARE_INTERFACE_(IAVIEditStream, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Cut)(THIS_ LONG*,LONG*,PAVISTREAM*) PURE;
- STDMETHOD(Copy)(THIS_ LONG*,LONG*,PAVISTREAM*) PURE;
- STDMETHOD(Paste)(THIS_ LONG*,LONG*,PAVISTREAM,LONG,LONG) PURE;
- STDMETHOD(Clone)(THIS_ PAVISTREAM*) PURE;
- STDMETHOD(SetInfo)(THIS_ LPAVISTREAMINFOW,LONG) PURE;
-};
-#undef INTERFACE
-typedef IAVIEditStream *PAVIEDITSTREAM;
-
-#define INTERFACE IAVIFile
-DECLARE_INTERFACE_(IAVIFile, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Info)(THIS_ AVIFILEINFOW*,LONG) PURE;
- STDMETHOD(GetStream)(THIS_ PAVISTREAM*,DWORD,LONG) PURE;
- STDMETHOD(CreateStream)(THIS_ PAVISTREAM*,AVISTREAMINFOW*) PURE;
- STDMETHOD(WriteData)(THIS_ DWORD,LPVOID,LONG) PURE;
- STDMETHOD(ReadData)(THIS_ DWORD,LPVOID,LONG*) PURE;
- STDMETHOD(EndRecord)(THIS) PURE;
- STDMETHOD(DeleteStream)(THIS_ DWORD,LONG) PURE;
-};
-#undef INTERFACE
-typedef IAVIFile *PAVIFILE;
-
-#define INTERFACE IGetFrame
-DECLARE_INTERFACE_(IGetFrame, IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD_(LPVOID,GetFrame)(THIS_ LONG) PURE;
- STDMETHOD(Begin)(THIS_ LONG,LONG,LONG) PURE;
- STDMETHOD(End)(THIS) PURE;
- STDMETHOD(SetFormat)(THIS_ LPBITMAPINFOHEADER,LPVOID,INT,INT,INT,INT) PURE;
-};
-#undef INTERFACE
-typedef IGetFrame *PGETFRAME;
-#endif /* !defined (_OBJC_NO_COM) */
-
-DWORD VFWAPI VideoForWindowsVersion(VOID);
-LONG VFWAPI InitVFW(VOID);
-LONG VFWAPI TermVFW(VOID);
-DWORD VFWAPIV ICCompress(HIC,DWORD,LPBITMAPINFOHEADER,LPVOID,LPBITMAPINFOHEADER,LPVOID,LPDWORD,LPDWORD,LONG,DWORD,DWORD,LPBITMAPINFOHEADER,LPVOID);
-DWORD VFWAPIV ICDecompress(HIC,DWORD,LPBITMAPINFOHEADER,LPVOID,LPBITMAPINFOHEADER,LPVOID);
-LRESULT VFWAPI ICSendMessage(HIC,UINT,DWORD,DWORD);
-HANDLE VFWAPI ICImageCompress(HIC,UINT,LPBITMAPINFO,LPVOID,LPBITMAPINFO,LONG,LONG*);
-HANDLE VFWAPI ICImageDecompress(HIC,UINT,LPBITMAPINFO,LPVOID,LPBITMAPINFO);
-BOOL VFWAPI ICInfo(DWORD,DWORD,ICINFO*);
-BOOL VFWAPI ICInstall(DWORD,DWORD,LPARAM,LPSTR,UINT);
-BOOL VFWAPI ICRemove(DWORD,DWORD,UINT);
-LRESULT VFWAPI ICGetInfo(HIC,ICINFO*,DWORD);
-HIC VFWAPI ICOpen(DWORD,DWORD,UINT);
-HIC VFWAPI ICOpenFunction(DWORD,DWORD,UINT,FARPROC);
-LRESULT VFWAPI ICClose(HIC hic);
-HIC VFWAPI ICLocate(DWORD,DWORD,LPBITMAPINFOHEADER,LPBITMAPINFOHEADER,WORD);
-HIC VFWAPI ICGetDisplayFormat(HIC,LPBITMAPINFOHEADER,LPBITMAPINFOHEADER,INT,INT,INT);
-DWORD VFWAPIV ICDrawBegin(HIC,DWORD,HPALETTE,HWND,HDC,INT,INT,INT,INT,LPBITMAPINFOHEADER,INT,INT,INT,INT,DWORD,DWORD);
-DWORD VFWAPIV ICDraw(HIC,DWORD,LPVOID,LPVOID,DWORD,LONG);
-BOOL VFWAPI ICCompressorChoose(HWND,UINT,LPVOID,LPVOID,PCOMPVARS,LPSTR);
-BOOL VFWAPI ICSeqCompressFrameStart(PCOMPVARS,LPBITMAPINFO);
-void VFWAPI ICSeqCompressFrameEnd(PCOMPVARS);
-LPVOID VFWAPI ICSeqCompressFrame(PCOMPVARS,UINT,LPVOID,BOOL*,LONG*);
-void VFWAPI ICCompressorFree(PCOMPVARS);
-#if !defined (_OBJC_NO_COM)
-ULONG WINAPI AVIStreamAddRef(PAVISTREAM);
-ULONG WINAPI AVIStreamRelease(PAVISTREAM);
-HRESULT WINAPI AVIStreamCreate(PAVISTREAM*,LONG,LONG,CLSID*);
-HRESULT WINAPI AVIStreamInfoA(PAVISTREAM,AVISTREAMINFOA*,LONG);
-HRESULT WINAPI AVIStreamInfoW(PAVISTREAM,AVISTREAMINFOW*,LONG);
-HRESULT WINAPI AVIStreamFindSample(PAVISTREAM,LONG,DWORD);
-HRESULT WINAPI AVIStreamReadFormat(PAVISTREAM,LONG,LPVOID,LONG*);
-HRESULT WINAPI AVIStreamSetFormat(PAVISTREAM,LONG,LPVOID,LONG);
-HRESULT WINAPI AVIStreamRead(PAVISTREAM,LONG,LONG,LPVOID,LONG,LONG*,LONG*);
-HRESULT WINAPI AVIStreamWrite(PAVISTREAM,LONG,LONG,LPVOID,LONG,DWORD,LONG*,LONG*);
-HRESULT WINAPI AVIStreamReadData(PAVISTREAM,DWORD,LPVOID,LONG*);
-HRESULT WINAPI AVIStreamWriteData(PAVISTREAM,DWORD,LPVOID,LONG);
-PGETFRAME WINAPI AVIStreamGetFrameOpen(PAVISTREAM,LPBITMAPINFOHEADER);
-LPVOID WINAPI AVIStreamGetFrame(PGETFRAME,LONG);
-HRESULT WINAPI AVIStreamGetFrameClose(PGETFRAME);
-HRESULT WINAPI AVIMakeCompressedStream(PAVISTREAM*,PAVISTREAM,AVICOMPRESSOPTIONS*,CLSID*);
-HRESULT WINAPI AVIMakeFileFromStreams(PAVIFILE*,INT,PAVISTREAM*);
-HRESULT WINAPI AVIStreamOpenFromFileA(PAVISTREAM*,LPCSTR,DWORD,LONG,UINT,CLSID*);
-HRESULT WINAPI AVIStreamOpenFromFileW(PAVISTREAM*,LPCWSTR,DWORD,LONG,UINT,CLSID*);
-HRESULT WINAPI AVIBuildFilterA(LPSTR,LONG,BOOL);
-HRESULT WINAPI AVIBuildFilterW(LPWSTR,LONG,BOOL);
-BOOL WINAPI AVISaveOptions(HWND,UINT,INT,PAVISTREAM*,LPAVICOMPRESSOPTIONS*);
-HRESULT WINAPI AVISaveOptionsFree(INT,LPAVICOMPRESSOPTIONS*);
-HRESULT WINAPI AVISaveVA(LPCSTR,CLSID*,AVISAVECALLBACK,INT,PAVISTREAM*,LPAVICOMPRESSOPTIONS*);
-HRESULT WINAPI AVISaveVW(LPCWSTR,CLSID*,AVISAVECALLBACK,INT,PAVISTREAM*,LPAVICOMPRESSOPTIONS*);
-LONG WINAPI AVIStreamStart(PAVISTREAM);
-LONG WINAPI AVIStreamLength(PAVISTREAM);
-LONG WINAPI AVIStreamSampleToTime(PAVISTREAM,LONG);
-LONG WINAPI AVIStreamTimeToSample(PAVISTREAM,LONG);
-HRESULT WINAPI CreateEditableStream(PAVISTREAM*,PAVISTREAM);
-HRESULT WINAPI EditStreamClone(PAVISTREAM,PAVISTREAM*);
-HRESULT WINAPI EditStreamCopy(PAVISTREAM,LONG*,LONG*,PAVISTREAM*);
-HRESULT WINAPI EditStreamCut(PAVISTREAM,LONG*,LONG*,PAVISTREAM*);
-HRESULT WINAPI EditStreamPaste(PAVISTREAM,LONG*,LONG*,PAVISTREAM,LONG,LONG);
-HRESULT WINAPI EditStreamSetInfoA(PAVISTREAM,LPAVISTREAMINFOA,LONG);
-HRESULT WINAPI EditStreamSetInfoW(PAVISTREAM,LPAVISTREAMINFOW,LONG);
-HRESULT WINAPI EditStreamSetNameA(PAVISTREAM,LPCSTR);
-HRESULT WINAPI EditStreamSetNameW(PAVISTREAM,LPCWSTR);
-HRESULT WINAPI CreateEditableStream(PAVISTREAM*,PAVISTREAM);
-HRESULT WINAPI EditStreamClone(PAVISTREAM,PAVISTREAM*);
-HRESULT WINAPI EditStreamCopy(PAVISTREAM,LONG*,LONG*,PAVISTREAM*);
-HRESULT WINAPI EditStreamCut(PAVISTREAM,LONG*,LONG*,PAVISTREAM*);
-HRESULT WINAPI EditStreamPaste(PAVISTREAM,LONG*,LONG*,PAVISTREAM,LONG,LONG);
-HRESULT WINAPI EditStreamSetInfoA(PAVISTREAM,LPAVISTREAMINFOA,LONG);
-HRESULT WINAPI EditStreamSetInfoW(PAVISTREAM,LPAVISTREAMINFOW,LONG);
-HRESULT WINAPI EditStreamSetNameA(PAVISTREAM,LPCSTR);
-HRESULT WINAPI EditStreamSetNameW(PAVISTREAM,LPCWSTR);
-VOID WINAPI AVIFileInit(void);
-VOID WINAPI AVIFileExit(void);
-HRESULT WINAPI AVIFileOpenA(PAVIFILE*,LPCSTR,UINT,LPCLSID);
-HRESULT WINAPI AVIFileOpenW(PAVIFILE*,LPCWSTR,UINT,LPCLSID);
-ULONG WINAPI AVIFileAddRef(PAVIFILE);
-ULONG WINAPI AVIFileRelease(PAVIFILE);
-HRESULT WINAPI AVIFileInfoA(PAVIFILE,PAVIFILEINFOA,LONG);
-HRESULT WINAPI AVIFileInfoW(PAVIFILE,PAVIFILEINFOW,LONG);
-HRESULT WINAPI AVIFileGetStream(PAVIFILE,PAVISTREAM*,DWORD,LONG);
-HRESULT WINAPI AVIFileCreateStreamA(PAVIFILE,PAVISTREAM*,AVISTREAMINFOA*);
-HRESULT WINAPI AVIFileCreateStreamW(PAVIFILE,PAVISTREAM*,AVISTREAMINFOW*);
-HRESULT WINAPI AVIFileWriteData(PAVIFILE,DWORD,LPVOID,LONG);
-HRESULT WINAPI AVIFileReadData(PAVIFILE,DWORD,LPVOID,LPLONG);
-HRESULT WINAPI AVIFileEndRecord(PAVIFILE);
-HRESULT WINAPI AVIClearClipboard(VOID);
-HRESULT WINAPI AVIGetFromClipboard(PAVIFILE*);
-HRESULT WINAPI AVIPutFileOnClipboard(PAVIFILE);
-#endif /* _OBJC_NO_COM */
-#ifdef OFN_READONLY
-BOOL WINAPI GetOpenFileNamePreviewA(LPOPENFILENAMEA);
-BOOL WINAPI GetOpenFileNamePreviewW(LPOPENFILENAMEW);
-BOOL WINAPI GetSaveFileNamePreviewA(LPOPENFILENAMEA);
-BOOL WINAPI GetSaveFileNamePreviewW(LPOPENFILENAMEW);
-#endif
-HWND VFWAPIV MCIWndCreateA(HWND,HINSTANCE,DWORD,LPCSTR);
-HWND VFWAPIV MCIWndCreateW(HWND,HINSTANCE,DWORD,LPCWSTR);
-HDRAWDIB VFWAPI DrawDibOpen(VOID);
-UINT VFWAPI DrawDibRealize(HDRAWDIB,HDC,BOOL);
-BOOL VFWAPI DrawDibBegin(HDRAWDIB,HDC,INT,INT,LPBITMAPINFOHEADER,INT,INT,UINT);
-BOOL VFWAPI DrawDibDraw(HDRAWDIB,HDC,INT,INT,INT,INT,LPBITMAPINFOHEADER,LPVOID,INT,INT,INT,INT,UINT);
-BOOL VFWAPI DrawDibSetPalette(HDRAWDIB,HPALETTE);
-HPALETTE VFWAPI DrawDibGetPalette(HDRAWDIB);
-BOOL VFWAPI DrawDibChangePalette(HDRAWDIB,int,int,LPPALETTEENTRY);
-LPVOID VFWAPI DrawDibGetBuffer(HDRAWDIB,LPBITMAPINFOHEADER,DWORD,DWORD);
-BOOL VFWAPI DrawDibStart(HDRAWDIB,DWORD);
-BOOL VFWAPI DrawDibStop(HDRAWDIB);
-BOOL VFWAPI DrawDibEnd(HDRAWDIB);
-BOOL VFWAPI DrawDibClose(HDRAWDIB);
-DWORD VFWAPI DrawDibProfileDisplay(LPBITMAPINFOHEADER);
-
-#define ICCompressGetFormat(hic,lpbiInput,lpbiOutput) ICSendMessage(hic,ICM_COMPRESS_GET_FORMAT,(DWORD)(lpbiInput),(DWORD)(lpbiOutput))
-#define ICCompressGetFormatSize(hic,lpbi) ICCompressGetFormat(hic,lpbi,NULL)
-#define ICCompressBegin(hic,lpbiInput,lpbiOutput) ICSendMessage(hic,ICM_COMPRESS_BEGIN,(DWORD)(lpbiInput),(DWORD)(lpbiOutput))
-#define ICCompressGetSize(hic,lpbiInput,lpbiOutput) ICSendMessage(hic,ICM_COMPRESS_GET_SIZE,(DWORD)(lpbiInput),(DWORD)(lpbiOutput))
-#define ICCompressQuery(hic,lpbiInput,lpbiOutput) ICSendMessage(hic,ICM_COMPRESS_QUERY,(DWORD)(lpbiInput),(DWORD)(lpbiOutput))
-#define ICCompressEnd(hic) ICSendMessage(hic,ICM_COMPRESS_END,0,0)
-#define ICQueryAbout(hic) (ICSendMessage(hic,ICM_ABOUT,(DWORD)-1,ICMF_ABOUT_QUERY)==ICERR_OK)
-#define ICAbout(hic,hwnd) ICSendMessage(hic,ICM_ABOUT,(DWORD)(hwnd),0)
-#define ICQueryConfigure(hic) (ICSendMessage(hic,ICM_CONFIGURE,(DWORD)-1,ICMF_CONFIGURE_QUERY)==ICERR_OK)
-#define ICConfigure(hic,hwnd) ICSendMessage(hic,ICM_CONFIGURE,(DWORD)(hwnd),0)
-#define ICDecompressBegin(hic,lpbiInput,lpbiOutput) ICSendMessage(hic,ICM_DECOMPRESS_BEGIN,(DWORD)(lpbiInput),(DWORD)(lpbiOutput))
-#define ICDecompressQuery(hic,lpbiInput,lpbiOutput) ICSendMessage(hic,ICM_DECOMPRESS_QUERY,(DWORD)(lpbiInput),(DWORD)(lpbiOutput))
-#define ICDecompressGetFormat(hic,lpbiInput,lpbiOutput) (LONG)ICSendMessage(hic,ICM_DECOMPRESS_GET_FORMAT,(DWORD)(lpbiInput),(DWORD)(lpbiOutput))
-#define ICDecompressGetFormatSize(hic,lpbi) ICDecompressGetFormat(hic, lpbi, NULL)
-#define ICDecompressGetPalette(hic,lpbiInput,lpbiOutput) ICSendMessage(hic,ICM_DECOMPRESS_GET_PALETTE,(DWORD)(lpbiInput),(DWORD)(lpbiOutput))
-#define ICDecompressSetPalette(hic,lpbiPalette) ICSendMessage(hic,ICM_DECOMPRESS_SET_PALETTE,(DWORD)(lpbiPalette),0)
-#define ICDecompressEnd(hic) ICSendMessage(hic,ICM_DECOMPRESS_END,0,0)
-#define ICDecompressExEnd(hic) ICSendMessage(hic,ICM_DECOMPRESSEX_END,0,0)
-#define ICDecompressOpen(fccType,fccHandler,lpbiIn,lpbiOut) ICLocate(fccType,fccHandler,lpbiIn,lpbiOut,ICMODE_DECOMPRESS)
-#define ICDrawOpen(fccType,fccHandler,lpbiIn) ICLocate(fccType,fccHandler,lpbiIn,NULL,ICMODE_DRAW)
-#define ICGetState(hic,pv,cb) ICSendMessage(hic,ICM_GETSTATE,(DWORD)(pv),(DWORD)(cb))
-#define ICSetState(hic,pv,cb) ICSendMessage(hic,ICM_SETSTATE,(DWORD)(pv),(DWORD)(cb))
-#define ICGetStateSize(hic) ICGetState(hic,NULL,0)
-#define ICDrawWindow(hic,prc) ICSendMessage(hic,ICM_DRAW_WINDOW,(DWORD)(prc),sizeof(RECT))
-#define ICDrawQuery(hic,lpbiInput) ICSendMessage(hic,ICM_DRAW_QUERY,(DWORD)(lpbiInput),0)
-#define ICDrawChangePalette(hic,lpbiInput) ICSendMessage(hic,ICM_DRAW_CHANGEPALETTE,(DWORD)(lpbiInput),0)
-#define ICGetBuffersWanted(hic,lpdwBuffers) ICSendMessage(hic,ICM_GETBUFFERSWANTED,(DWORD)(lpdwBuffers),0)
-#define ICDrawEnd(hic) ICSendMessage(hic,ICM_DRAW_END,0,0)
-#define ICDrawStart(hic) ICSendMessage(hic,ICM_DRAW_START,0,0)
-#define ICDrawStartPlay(hic,lFrom,lTo) ICSendMessage(hic,ICM_DRAW_START_PLAY,(DWORD)(lFrom),(DWORD)(lTo))
-#define ICDrawStop(hic) ICSendMessage(hic,ICM_DRAW_STOP,0,0)
-#define ICDrawStopPlay(hic) ICSendMessage(hic,ICM_DRAW_STOP_PLAY,0,0)
-#define ICDrawGetTime(hic,lplTime) ICSendMessage(hic,ICM_DRAW_GETTIME,(DWORD)(lplTime),0)
-#define ICDrawSetTime(hic,lTime) ICSendMessage(hic,ICM_DRAW_SETTIME,(DWORD)lTime,0)
-#define ICDrawRealize(hic,hdc,fBackground) ICSendMessage(hic,ICM_DRAW_REALIZE,(DWORD)(hdc),(DWORD)(fBackground))
-#define ICDrawFlush(hic) ICSendMessage(hic,ICM_DRAW_FLUSH,0,0)
-#define ICDrawRenderBuffer(hic) ICSendMessage(hic,ICM_DRAW_RENDERBUFFER,0,0)
-#define AVIFileClose(pavi) AVIFileRelease(pavi)
-#define AVIStreamClose(pavi) AVIStreamRelease(pavi);
-#define AVIStreamEnd(pavi) (AVIStreamStart(pavi)+AVIStreamLength(pavi))
-#define AVIStreamEndTime(pavi) AVIStreamSampleToTime(pavi,AVIStreamEnd(pavi))
-#define AVIStreamFormatSize(pavi,lPos,plSize) AVIStreamReadFormat(pavi,lPos,NULL,plSize)
-#define AVIStreamLengthTime(pavi) AVIStreamSampleToTime(pavi,AVIStreamLength(pavi))
-#define AVIStreamSampleSize(pavi,pos,psize) AVIStreamRead(pavi,pos,1,NULL,0,psize,NULL)
-#define AVIStreamSampleToSample(pavi1,pavi2,samp2) AVIStreamTimeToSample(pavi1,AVIStreamSampleToTime(pavi2,samp2))
-#define AVIStreamStartTime(pavi) AVIStreamSampleToTime(pavi,AVIStreamStart(pavi))
-#define AVIStreamNextSample(pavi,pos) AVIStreamFindSample(pavi,pos+1,FIND_NEXT|FIND_ANY)
-#define AVIStreamPrevSample(pavi,pos) AVIStreamFindSample(pavi,pos-1,FIND_PREV|FIND_ANY)
-#define AVIStreamNearestSample(pavi, pos) AVIStreamFindSample(pavi,pos,FIND_PREV|FIND_ANY)
-#define AVStreamNextKeyFrame(pavi,pos) AVIStreamFindSample(pavi,pos+1,FIND_NEXT|FIND_KEY)
-#define AVStreamPrevKeyFrame(pavi,pos) AVIStreamFindSample(pavi,pos-1,FIND_NEXT|FIND_KEY)
-#define AVIStreamNearestKeyFrame(pavi,pos) AVIStreamFindSample(pavi,pos,FIND_PREV|FIND_KEY)
-#define AVIStreamIsKeyFrame(pavi, pos) (AVIStreamNearestKeyFrame(pavi,pos) == pos)
-#ifdef __cplusplus
-#define MCIWndSM ::SendMessage
-#else
-#define MCIWndSM SendMessage
-#endif
-#define MCIWndCanPlay(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_PLAY,0,0)
-#define MCIWndCanRecord(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_RECORD,0,0)
-#define MCIWndCanSave(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_SAVE,0,0)
-#define MCIWndCanWindow(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_WINDOW,0,0)
-#define MCIWndCanEject(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_EJECT,0,0)
-#define MCIWndCanConfig(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_CAN_CONFIG,0,0)
-#define MCIWndPaletteKick(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_PALETTEKICK,0,0)
-#define MCIWndSave(hWnd,szFile) (LONG)MCIWndSM(hWnd,MCI_SAVE,0,(LPARAM)(LPVOID)(szFile))
-#define MCIWndSaveDialog(hWnd) MCIWndSave(hWnd,-1)
-#define MCIWndNew(hWnd,lp) (LONG)MCIWndSM(hWnd,MCIWNDM_NEW,0,(LPARAM)(LPVOID)(lp))
-#define MCIWndRecord(hWnd) (LONG)MCIWndSM(hWnd,MCI_RECORD,0,0)
-#define MCIWndOpen(hWnd,sz,f) (LONG)MCIWndSM(hWnd,MCIWNDM_OPEN,(WPARAM)(UINT)(f),(LPARAM)(LPVOID)(sz))
-#define MCIWndOpenDialog(hWnd) MCIWndOpen(hWnd,-1,0)
-#define MCIWndClose(hWnd) (LONG)MCIWndSM(hWnd,MCI_CLOSE,0,0)
-#define MCIWndPlay(hWnd) (LONG)MCIWndSM(hWnd,MCI_PLAY,0,0)
-#define MCIWndStop(hWnd) (LONG)MCIWndSM(hWnd,MCI_STOP,0,0)
-#define MCIWndPause(hWnd) (LONG)MCIWndSM(hWnd,MCI_PAUSE,0,0)
-#define MCIWndResume(hWnd) (LONG)MCIWndSM(hWnd,MCI_RESUME,0,0)
-#define MCIWndSeek(hWnd,lPos) (LONG)MCIWndSM(hWnd,MCI_SEEK,0,(LPARAM)(LONG)(lPos))
-#define MCIWndEject(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_EJECT,0,0)
-#define MCIWndHome(hWnd) MCIWndSeek(hWnd,MCIWND_START)
-#define MCIWndEnd(hWnd) MCIWndSeek(hWnd,MCIWND_END)
-#define MCIWndGetSource(hWnd,prc) (LONG)MCIWndSM(hWnd,MCIWNDM_GET_SOURCE,0,(LPARAM)(LPRECT)(prc))
-#define MCIWndPutSource(hWnd,prc) (LONG)MCIWndSM(hWnd,MCIWNDM_PUT_SOURCE,0,(LPARAM)(LPRECT)(prc))
-#define MCIWndGetDest(hWnd,prc) (LONG)MCIWndSM(hWnd,MCIWNDM_GET_DEST,0,(LPARAM)(LPRECT)(prc))
-#define MCIWndPutDest(hWnd,prc) (LONG)MCIWndSM(hWnd,MCIWNDM_PUT_DEST,0,(LPARAM)(LPRECT)(prc))
-#define MCIWndPlayReverse(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_PLAYREVERSE,0,0)
-#define MCIWndPlayFrom(hWnd,lPos) (LONG)MCIWndSM(hWnd,MCIWNDM_PLAYFROM,0,(LPARAM)(LONG)(lPos))
-#define MCIWndPlayTo(hWnd,lPos) (LONG)MCIWndSM(hWnd,MCIWNDM_PLAYTO, 0,(LPARAM)(LONG)(lPos))
-#define MCIWndPlayFromTo(hWnd,lStart,lEnd) (MCIWndSeek(hWnd,lStart),MCIWndPlayTo(hWnd,lEnd))
-#define MCIWndGetDeviceID(hWnd) (UINT)MCIWndSM(hWnd,MCIWNDM_GETDEVICEID,0,0)
-#define MCIWndGetAlias(hWnd) (UINT)MCIWndSM(hWnd,MCIWNDM_GETALIAS,0,0)
-#define MCIWndGetMode(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETMODE,(WPARAM)(UINT)(len),(LPARAM)(LPTSTR)(lp))
-#define MCIWndGetPosition(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETPOSITION,0,0)
-#define MCIWndGetPositionString(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETPOSITION,(WPARAM)(UINT)(len),(LPARAM)(LPTSTR)(lp))
-#define MCIWndGetStart(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETSTART,0,0)
-#define MCIWndGetLength(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETLENGTH,0,0)
-#define MCIWndGetEnd(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETEND,0,0)
-#define MCIWndStep(hWnd,n) (LONG)MCIWndSM(hWnd,MCI_STEP,0,(LPARAM)(long)(n))
-#define MCIWndDestroy(hWnd) (VOID)MCIWndSM(hWnd,WM_CLOSE,0,0)
-#define MCIWndSetZoom(hWnd,iZoom) (VOID)MCIWndSM(hWnd,MCIWNDM_SETZOOM,0,(LPARAM)(UINT)(iZoom))
-#define MCIWndGetZoom(hWnd) (UINT)MCIWndSM(hWnd,MCIWNDM_GETZOOM,0,0)
-#define MCIWndSetVolume(hWnd,iVol) (LONG)MCIWndSM(hWnd,MCIWNDM_SETVOLUME,0,(LPARAM)(UINT)(iVol))
-#define MCIWndGetVolume(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETVOLUME,0,0)
-#define MCIWndSetSpeed(hWnd,iSpeed) (LONG)MCIWndSM(hWnd,MCIWNDM_SETSPEED,0,(LPARAM)(UINT)(iSpeed))
-#define MCIWndGetSpeed(hWnd) (LONG)MCIWndSM(hWnd,MCIWNDM_GETSPEED,0,0)
-#define MCIWndSetTimeFormat(hWnd,lp) (LONG)MCIWndSM(hWnd,MCIWNDM_SETTIMEFORMAT,0,(LPARAM)(LPTSTR)(lp))
-#define MCIWndGetTimeFormat(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETTIMEFORMAT,(WPARAM)(UINT)(len),(LPARAM)(LPTSTR)(lp))
-#define MCIWndValidateMedia(hWnd) (VOID)MCIWndSM(hWnd,MCIWNDM_VALIDATEMEDIA,0,0)
-#define MCIWndSetRepeat(hWnd,f) (void)MCIWndSM(hWnd,MCIWNDM_SETREPEAT,0,(LPARAM)(BOOL)(f))
-#define MCIWndGetRepeat(hWnd) (BOOL)MCIWndSM(hWnd,MCIWNDM_GETREPEAT,0,0)
-#define MCIWndUseFrames(hWnd) MCIWndSetTimeFormat(hWnd,TEXT("frames"))
-#define MCIWndUseTime(hWnd) MCIWndSetTimeFormat(hWnd,TEXT("ms"))
-#define MCIWndSetActiveTimer(hWnd,active) (VOID)MCIWndSM(hWnd,MCIWNDM_SETACTIVETIMER,(WPARAM)(UINT)(active),0L)
-#define MCIWndSetInactiveTimer(hWnd,inactive) (VOID)MCIWndSM(hWnd,MCIWNDM_SETINACTIVETIMER,(WPARAM)(UINT)(inactive),0L)
-#define MCIWndSetTimers(hWnd,active,inactive) (VOID)MCIWndSM(hWnd,MCIWNDM_SETTIMERS,(WPARAM)(UINT)(active),(LPARAM)(UINT)(inactive))
-#define MCIWndGetActiveTimer(hWnd) (UINT)MCIWndSM(hWnd,MCIWNDM_GETACTIVETIMER,0,0L);
-#define MCIWndGetInactiveTimer(hWnd) (UINT)MCIWndSM(hWnd,MCIWNDM_GETINACTIVETIMER,0,0L);
-#define MCIWndRealize(hWnd,fBkgnd) (LONG)MCIWndSM(hWnd,MCIWNDM_REALIZE,(WPARAM)(BOOL)(fBkgnd),0)
-#define MCIWndSendString(hWnd,sz) (LONG)MCIWndSM(hWnd,MCIWNDM_SENDSTRING,0,(LPARAM)(LPTSTR)(sz))
-#define MCIWndReturnString(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_RETURNSTRING,(WPARAM)(UINT)(len),(LPARAM)(LPVOID)(lp))
-#define MCIWndGetError(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETERROR,(WPARAM)(UINT)(len),(LPARAM)(LPVOID)(lp))
-#define MCIWndGetPalette(hWnd) (HPALETTE)MCIWndSM(hWnd,MCIWNDM_GETPALETTE,0,0)
-#define MCIWndSetPalette(hWnd,hpal) (LONG)MCIWndSM(hWnd,MCIWNDM_SETPALETTE,(WPARAM)(HPALETTE)(hpal),0)
-#define MCIWndGetFileName(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETFILENAME,(WPARAM)(UINT)(len),(LPARAM)(LPVOID)(lp))
-#define MCIWndGetDevice(hWnd,lp,len) (LONG)MCIWndSM(hWnd,MCIWNDM_GETDEVICE,(WPARAM)(UINT)(len),(LPARAM)(LPVOID)(lp))
-#define MCIWndGetStyles(hWnd) (UINT)MCIWndSM(hWnd,MCIWNDM_GETSTYLES,0,0L)
-#define MCIWndChangeStyles(hWnd,mask,value) (LONG)MCIWndSM(hWnd,MCIWNDM_CHANGESTYLES,(WPARAM)(UINT)(mask),(LPARAM)(LONG)(value))
-#define MCIWndOpenInterface(hWnd,pUnk) (LONG)MCIWndSM(hWnd,MCIWNDM_OPENINTERFACE,0,(LPARAM)(LPUNKNOWN)(pUnk))
-#define MCIWndSetOwner(hWnd,hWndP) (LONG)MCIWndSM(hWnd,MCIWNDM_SETOWNER,(WPARAM)(hWndP),0)
-#define DrawDibUpdate(hdd,hdc,x,y) DrawDibDraw(hdd,hdc,x,y,0,0,NULL,NULL,0,0,0,0,DDF_UPDATE)
-static __inline DWORD
-ICGetDefaultQuality(HIC hic)
-{
- DWORD dwICValue;
- ICSendMessage(hic, ICM_GETDEFAULTQUALITY, (DWORD)(LPVOID)&dwICValue, sizeof(DWORD));
- return dwICValue;
-}
-static __inline DWORD
-ICGetDefaultKeyFrameRate(HIC hic)
-{
- DWORD dwICValue;
- ICSendMessage(hic, ICM_GETDEFAULTKEYFRAMERATE, (DWORD)(LPVOID)&dwICValue, sizeof(DWORD));
- return dwICValue;
-}
-static __inline LRESULT
-ICDrawSuggestFormat(HIC hic,LPBITMAPINFOHEADER lpbiIn,LPBITMAPINFOHEADER lpbiOut,INT dxSrc,INT dySrc,INT dxDst,INT dyDst,HIC hicDecomp)
-{
- ICDRAWSUGGEST ic;
- ic.lpbiIn = lpbiIn;
- ic.lpbiSuggest = lpbiOut;
- ic.dxSrc = dxSrc;
- ic.dySrc = dySrc;
- ic.dxDst = dxDst;
- ic.dyDst = dyDst;
- ic.hicDecompressor = hicDecomp;
- return ICSendMessage(hic,ICM_DRAW_SUGGESTFORMAT,(DWORD)&ic,sizeof(ic));
-}
-static __inline LRESULT
-ICSetStatusProc(HIC hic,DWORD dwFlags,LRESULT lParam,LONG (CALLBACK *fpfnStatus)(LPARAM,UINT,LONG))
-{
- ICSETSTATUSPROC ic;
- ic.dwFlags = dwFlags;
- ic.lParam = lParam;
- ic.Status = fpfnStatus;
- return ICSendMessage(hic,ICM_SET_STATUS_PROC,(DWORD)&ic,sizeof(ic));
-}
-static __inline LRESULT
-ICDecompressEx(HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiSrc,LPVOID lpSrc,INT xSrc,INT ySrc,INT dxSrc,INT dySrc,LPBITMAPINFOHEADER lpbiDst,LPVOID lpDst,INT xDst,INT yDst,INT dxDst,INT dyDst)
-{
- ICDECOMPRESSEX ic;
- ic.dwFlags = dwFlags;
- ic.lpbiSrc = lpbiSrc;
- ic.lpSrc = lpSrc;
- ic.xSrc = xSrc;
- ic.ySrc = ySrc;
- ic.dxSrc = dxSrc;
- ic.dySrc = dySrc;
- ic.lpbiDst = lpbiDst;
- ic.lpDst = lpDst;
- ic.xDst = xDst;
- ic.yDst = yDst;
- ic.dxDst = dxDst;
- ic.dyDst = dyDst;
- return ICSendMessage(hic,ICM_DECOMPRESSEX,(DWORD)&ic,sizeof(ic));
-}
-static __inline LRESULT
-ICDecompressExBegin(HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiSrc,LPVOID lpSrc,INT xSrc,INT ySrc,INT dxSrc,INT dySrc,LPBITMAPINFOHEADER lpbiDst,LPVOID lpDst,INT xDst,INT yDst,INT dxDst,INT dyDst)
-{
- ICDECOMPRESSEX ic;
- ic.dwFlags = dwFlags;
- ic.lpbiSrc = lpbiSrc;
- ic.lpSrc = lpSrc;
- ic.xSrc = xSrc;
- ic.ySrc = ySrc;
- ic.dxSrc = dxSrc;
- ic.dySrc = dySrc;
- ic.lpbiDst = lpbiDst;
- ic.lpDst = lpDst;
- ic.xDst = xDst;
- ic.yDst = yDst;
- ic.dxDst = dxDst;
- ic.dyDst = dyDst;
- return ICSendMessage(hic,ICM_DECOMPRESSEX_BEGIN,(DWORD)&ic,sizeof(ic));
-}
-static __inline LRESULT
-ICDecompressExQuery(HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiSrc,LPVOID lpSrc,INT xSrc,INT ySrc,INT dxSrc,INT dySrc,LPBITMAPINFOHEADER lpbiDst,LPVOID lpDst,INT xDst,INT yDst,INT dxDst,INT dyDst)
-{
- ICDECOMPRESSEX ic;
- ic.dwFlags = dwFlags;
- ic.lpbiSrc = lpbiSrc;
- ic.lpSrc = lpSrc;
- ic.xSrc = xSrc;
- ic.ySrc = ySrc;
- ic.dxSrc = dxSrc;
- ic.dySrc = dySrc;
- ic.lpbiDst = lpbiDst;
- ic.lpDst = lpDst;
- ic.xDst = xDst;
- ic.yDst = yDst;
- ic.dxDst = dxDst;
- ic.dyDst = dyDst;
- return ICSendMessage(hic,ICM_DECOMPRESSEX_QUERY,(DWORD)&ic,sizeof(ic));
-}
-
-#define WM_CAP_SET_CALLBACK_ERRORA (WM_USER + 2)
-#define WM_CAP_SET_CALLBACK_ERRORW (WM_CAP_SET_CALLBACK_ERRORA + 100)
-#define WM_CAP_SET_CALLBACK_STATUS (WM_USER + 3)
-#define WM_CAP_SET_CALLBACK_YIELD (WM_USER + 4)
-#define WM_CAP_SET_CALLBACK_FRAMEA (WM_USER + 5)
-#define WM_CAP_SET_CALLBACK_FRAMEW (WM_CAP_SET_CALLBACK_FRAMEA + 100)
-#define WM_CAP_SET_CALLBACK_VIDEOSTREAM (WM_USER + 6)
-#define WM_CAP_SET_CALLBACK_WAVESTREAM (WM_USER + 7)
-#define WM_CAP_GET_USER_DATA (WM_USER + 8)
-#define WM_CAP_SET_USER_DATA (WM_USER + 9)
-#define WM_CAP_DRIVER_CONNECT (WM_USER + 10)
-#define WM_CAP_DRIVER_DISCONNECT (WM_USER + 11)
-#define WM_CAP_DRIVER_GET_NAMEA (WM_USER + 12)
-#define WM_CAP_DRIVER_GET_NAMEW (WM_CAP_DRIVER_GET_NAMEA + 100)
-#define WM_CAP_DRIVER_GET_VERSIONA (WM_USER + 13)
-#define WM_CAP_DRIVER_GET_VERSIONW (WM_CAP_DRIVER_GET_VERSIONA + 100)
-#define WM_CAP_DRIVER_GET_CAPS (WM_USER + 14)
-#define WM_CAP_FILE_SET_CAPTURE_FILEA (WM_USER + 20)
-#define WM_CAP_FILE_SET_CAPTURE_FILEW (WM_CAP_FILE_SET_CAPTURE_FILEA + 100)
-#define WM_CAP_FILE_GET_CAPTURE_FILEA (WM_USER + 21)
-#define WM_CAP_FILE_GET_CAPTURE_FILEW (WM_CAP_FILE_GET_CAPTURE_FILEA + 100)
-#define WM_CAP_FILE_ALLOCATE (WM_USER + 22)
-#define WM_CAP_FILE_SAVEASA (WM_USER + 23)
-#define WM_CAP_FILE_SAVEASW (WM_CAP_FILE_SAVEASA + 100)
-#define WM_CAP_FILE_SET_INFOCHUNK (WM_USER + 24)
-#define WM_CAP_FILE_SAVEDIBA (WM_USER + 25)
-#define WM_CAP_FILE_SAVEDIBW (WM_CAP_FILE_SAVEDIBA + 100)
-#define WM_CAP_EDIT_COPY (WM_USER + 30)
-#define WM_CAP_SET_AUDIOFORMAT (WM_USER + 35)
-#define WM_CAP_GET_AUDIOFORMAT (WM_USER + 36)
-#define WM_CAP_DLG_VIDEOFORMAT (WM_USER + 41)
-#define WM_CAP_DLG_VIDEOSOURCE (WM_USER + 42)
-#define WM_CAP_DLG_VIDEODISPLAY (WM_USER + 43)
-#define WM_CAP_GET_VIDEOFORMAT (WM_USER + 44)
-#define WM_CAP_SET_VIDEOFORMAT (WM_USER + 45)
-#define WM_CAP_DLG_VIDEOCOMPRESSION (WM_USER + 46)
-#define WM_CAP_SET_PREVIEW (WM_USER + 50)
-#define WM_CAP_SET_OVERLAY (WM_USER + 51)
-#define WM_CAP_SET_PREVIEWRATE (WM_USER + 52)
-#define WM_CAP_SET_SCALE (WM_USER + 53)
-#define WM_CAP_GET_STATUS (WM_USER + 54)
-#define WM_CAP_SET_SCROLL (WM_USER + 55)
-#define WM_CAP_GRAB_FRAME (WM_USER + 60)
-#define WM_CAP_GRAB_FRAME_NOSTOP (WM_USER + 61)
-#define WM_CAP_SEQUENCE (WM_USER + 62)
-#define WM_CAP_SEQUENCE_NOFILE (WM_USER + 63)
-#define WM_CAP_SET_SEQUENCE_SETUP (WM_USER + 64)
-#define WM_CAP_GET_SEQUENCE_SETUP (WM_USER + 65)
-#define WM_CAP_SET_MCI_DEVICEA (WM_USER + 66)
-#define WM_CAP_SET_MCI_DEVICEW (WM_CAP_SET_MCI_DEVICEA + 100)
-#define WM_CAP_GET_MCI_DEVICEA (WM_USER + 67)
-#define WM_CAP_GET_MCI_DEVICEW (WM_CAP_GET_MCI_DEVICEA + 100)
-#define WM_CAP_STOP (WM_USER + 68)
-#define WM_CAP_ABORT (WM_USER + 69)
-#define WM_CAP_SINGLE_FRAME_OPEN (WM_USER + 70)
-#define WM_CAP_SINGLE_FRAME_CLOSE (WM_USER + 71)
-#define WM_CAP_SINGLE_FRAME (WM_USER + 72)
-#define WM_CAP_PAL_OPENA (WM_USER + 80)
-#define WM_CAP_PAL_OPENW (WM_CAP_PAL_OPENA + 100)
-#define WM_CAP_PAL_SAVEA (WM_USER + 81)
-#define WM_CAP_PAL_SAVEW (WM_CAP_PAL_SAVEA + 100)
-#define WM_CAP_PAL_PASTE (WM_USER + 82)
-#define WM_CAP_PAL_AUTOCREATE (WM_USER + 83)
-#define WM_CAP_PAL_MANUALCREATE (WM_USER + 84)
-#define WM_CAP_SET_CALLBACK_CAPCONTROL (WM_USER + 85)
-
-#ifdef UNICODE
-#define WM_CAP_SET_CALLBACK_ERROR WM_CAP_SET_CALLBACK_ERRORW
-#define WM_CAP_SET_CALLBACK_FRAME WM_CAP_SET_CALLBACK_FRAMEW
-#define WM_CAP_DRIVER_GET_NAME WM_CAP_DRIVER_GET_NAMEW
-#define WM_CAP_DRIVER_GET_VERSION WM_CAP_DRIVER_GET_VERSIONW
-#define WM_CAP_FILE_SET_CAPTURE_FILE WM_CAP_FILE_SET_CAPTURE_FILEW
-#define WM_CAP_FILE_GET_CAPTURE_FILE WM_CAP_FILE_GET_CAPTURE_FILEW
-#define WM_CAP_FILE_SAVEAS WM_CAP_FILE_SAVEASW
-#define WM_CAP_FILE_SAVEDIB WM_CAP_FILE_SAVEDIBW
-#define WM_CAP_SET_MCI_DEVICE WM_CAP_SET_MCI_DEVICEW
-#define WM_CAP_GET_MCI_DEVICE WM_CAP_GET_MCI_DEVICEW
-#define WM_CAP_PAL_OPEN WM_CAP_PAL_OPENW
-#define WM_CAP_PAL_SAVE WM_CAP_PAL_SAVEW
-#else
-#define WM_CAP_SET_CALLBACK_ERROR WM_CAP_SET_CALLBACK_ERRORA
-#define WM_CAP_SET_CALLBACK_FRAME WM_CAP_SET_CALLBACK_FRAMEA
-#define WM_CAP_DRIVER_GET_NAME WM_CAP_DRIVER_GET_NAMEA
-#define WM_CAP_DRIVER_GET_VERSION WM_CAP_DRIVER_GET_VERSIONA
-#define WM_CAP_FILE_SET_CAPTURE_FILE WM_CAP_FILE_SET_CAPTURE_FILEA
-#define WM_CAP_FILE_GET_CAPTURE_FILE WM_CAP_FILE_GET_CAPTURE_FILEA
-#define WM_CAP_FILE_SAVEAS WM_CAP_FILE_SAVEASA
-#define WM_CAP_FILE_SAVEDIB WM_CAP_FILE_SAVEDIBA
-#define WM_CAP_SET_MCI_DEVICE WM_CAP_SET_MCI_DEVICEA
-#define WM_CAP_GET_MCI_DEVICE WM_CAP_GET_MCI_DEVICEA
-#define WM_CAP_PAL_OPEN WM_CAP_PAL_OPENA
-#define WM_CAP_PAL_SAVE WM_CAP_PAL_SAVEA
-#endif
-
-#define __capSendMessage(hwnd,m,w,l) (IsWindow(hwnd)?SendMessage(hwnd,m,w,l):0)
-
-#define capSetCallbackOnError(hwnd,fpProc) ((BOOL) __capSendMessage(hwnd,WM_CAP_SET_CALLBACK_ERROR,0,(LPARAM)(LPVOID)(fpProc)))
-#define capSetCallbackOnStatus(hwnd,fpProc) ((BOOL) __capSendMessage(hwnd,WM_CAP_SET_CALLBACK_STATUS,0,(LPARAM)(LPVOID)(fpProc)))
-#define capSetCallbackOnYield(hwnd,fpProc) ((BOOL) __capSendMessage(hwnd,WM_CAP_SET_CALLBACK_YIELD,0,(LPARAM)(LPVOID)(fpProc)))
-#define capSetCallbackOnFrame(hwnd,fpProc) ((BOOL) __capSendMessage(hwnd,WM_CAP_SET_CALLBACK_FRAME,0,(LPARAM)(LPVOID)(fpProc)))
-#define capSetCallbackOnVideoStream(hwnd,fpProc) ((BOOL) __capSendMessage(hwnd,WM_CAP_SET_CALLBACK_VIDEOSTREAM,0,(LPARAM)(LPVOID)(fpProc)))
-#define capSetCallbackOnWaveStream(hwnd,fpProc) ((BOOL) __capSendMessage(hwnd,WM_CAP_SET_CALLBACK_WAVESTREAM,0,(LPARAM)(LPVOID)(fpProc)))
-#define capGetUserData(hwnd) ((LONG) __capSendMessage(hwnd,WM_CAP_GET_USER_DATA,0,0))
-#define capSetUserData(hwnd,lUser) ((BOOL) __capSendMessage(hwnd,WM_CAP_SET_USER_DATA,0,(LPARAM)lUser))
-#define capDriverConnect(hwnd,i) ((BOOL) __capSendMessage(hwnd,WM_CAP_DRIVER_CONNECT,(WPARAM)(i),0))
-#define capDriverDisconnect(hwnd) ((BOOL) __capSendMessage(hwnd,WM_CAP_DRIVER_DISCONNECT,0,0))
-#define capDriverGetName(hwnd,szName,wSize) ((BOOL) __capSendMessage(hwnd,WM_CAP_DRIVER_GET_NAME,(WPARAM)(wSize),(LPARAM)(LPVOID)(LPTSTR)(szName)))
-#define capDriverGetVersion(hwnd,szVer,wSize) ((BOOL) __capSendMessage(hwnd,WM_CAP_DRIVER_GET_VERSION,(WPARAM)(wSize),(LPARAM)(LPVOID)(LPTSTR)(szVer)))
-#define capDriverGetCaps(hwnd,psCaps,wSize) ((BOOL) __capSendMessage(hwnd,WM_CAP_DRIVER_GET_CAPS,(WPARAM)(wSize),(LPARAM)(LPVOID)(LPCAPDRIVERCAPS)(psCaps)))
-#define capFileSetCaptureFile(hwnd,szName) ((BOOL) __capSendMessage(hwnd,WM_CAP_FILE_SET_CAPTURE_FILE,0,(LPARAM)(LPVOID)(LPTSTR)(szName)))
-#define capFileGetCaptureFile(hwnd,szName,wSize) ((BOOL) __capSendMessage(hwnd,WM_CAP_FILE_GET_CAPTURE_FILE,(WPARAM)(wSize), (LPARAM)(LPVOID)(LPTSTR)(szName)))
-#define capFileAlloc(hwnd,dwSize) ((BOOL) __capSendMessage(hwnd,WM_CAP_FILE_ALLOCATE,0,(LPARAM)(DWORD)(dwSize)))
-#define capFileSaveAs(hwnd,szName) ((BOOL) __capSendMessage(hwnd,WM_CAP_FILE_SAVEAS,0,(LPARAM)(LPVOID)(LPTSTR)(szName)))
-#define capFileSetInfoChunk(hwnd,lpInfoChunk) ((BOOL) __capSendMessage(hwnd,WM_CAP_FILE_SET_INFOCHUNK,0,(LPARAM)(LPCAPINFOCHUNK)(lpInfoChunk)))
-#define capFileSaveDIB(hwnd, szName) ((BOOL) __capSendMessage(hwnd,WM_CAP_FILE_SAVEDIB,0,(LPARAM)(LPVOID)(LPTSTR)(szName)))
-#define capEditCopy(hwnd) ((BOOL) __capSendMessage(hwnd,WM_CAP_EDIT_COPY,0,0))
-#define capSetAudioFormat(hwnd,psAudioFormat,wSize) ((BOOL) __capSendMessage(hwnd,WM_CAP_SET_AUDIOFORMAT,(WPARAM)(wSize),(LPARAM)(LPVOID)(LPWAVEFORMATEX)(psAudioFormat)))
-#define capGetAudioFormat(hwnd,psAudioFormat,wSize) ((DWORD)__capSendMessage(hwnd,WM_CAP_GET_AUDIOFORMAT,(WPARAM)(wSize),(LPARAM)(LPVOID)(LPWAVEFORMATEX)(psAudioFormat)))
-#define capGetAudioFormatSize(hwnd) ((DWORD)__capSendMessage(hwnd,WM_CAP_GET_AUDIOFORMAT,0,0))
-#define capDlgVideoFormat(hwnd) ((BOOL) __capSendMessage(hwnd,WM_CAP_DLG_VIDEOFORMAT,0,0))
-#define capDlgVideoSource(hwnd) ((BOOL) __capSendMessage(hwnd,WM_CAP_DLG_VIDEOSOURCE,0,0))
-#define capDlgVideoDisplay(hwnd) ((BOOL) __capSendMessage(hwnd,WM_CAP_DLG_VIDEODISPLAY,0,0))
-#define capGetVideoFormat(hwnd,psVideoFormat,wSize) ((DWORD)__capSendMessage(hwnd,WM_CAP_GET_VIDEOFORMAT,(WPARAM)(wSize),(LPARAM)(LPVOID)(psVideoFormat)))
-#define capGetVideoFormatSize(hwnd) ((DWORD)__capSendMessage(hwnd,WM_CAP_GET_VIDEOFORMAT,0,0))
-#define capSetVideoFormat(hwnd,psVideoFormat,wSize) ((BOOL) __capSendMessage(hwnd,WM_CAP_SET_VIDEOFORMAT,(WPARAM)(wSize),(LPARAM)(LPVOID)(psVideoFormat)))
-#define capDlgVideoCompression(hwnd) ((BOOL) __capSendMessage(hwnd,WM_CAP_DLG_VIDEOCOMPRESSION,0,0))
-#define capPreview(hwnd,f) ((BOOL) __capSendMessage(hwnd,WM_CAP_SET_PREVIEW,(WPARAM)(BOOL)(f),0))
-#define capOverlay(hwnd,f) ((BOOL) __capSendMessage(hwnd,WM_CAP_SET_OVERLAY,(WPARAM)(BOOL)(f),0))
-#define capPreviewRate(hwnd,wMS) ((BOOL) __capSendMessage(hwnd,WM_CAP_SET_PREVIEWRATE,(WPARAM)(wMS),0))
-#define capPreviewScale(hwnd,f) ((BOOL) __capSendMessage(hwnd,WM_CAP_SET_SCALE,(WPARAM)(BOOL)f,0))
-#define capGetStatus(hwnd,s,wSize) ((BOOL) __capSendMessage(hwnd,WM_CAP_GET_STATUS,(WPARAM)(wSize),(LPARAM)(LPVOID)(LPCAPSTATUS)(s)))
-#define capSetScrollPos(hwnd,lpP) ((BOOL) __capSendMessage(hwnd,WM_CAP_SET_SCROLL,0,(LPARAM)(LPPOINT)(lpP)))
-#define capGrabFrame(hwnd) ((BOOL) __capSendMessage(hwnd,WM_CAP_GRAB_FRAME,0,0))
-#define capGrabFrameNoStop(hwnd) ((BOOL) __capSendMessage(hwnd,WM_CAP_GRAB_FRAME_NOSTOP,0,0))
-#define capCaptureSequence(hwnd) ((BOOL) __capSendMessage(hwnd,WM_CAP_SEQUENCE,0,0))
-#define capCaptureSequenceNoFile(hwnd) ((BOOL) __capSendMessage(hwnd,WM_CAP_SEQUENCE_NOFILE,0,0))
-#define capCaptureSetSetup(hwnd,s,wSize) ((BOOL) __capSendMessage(hwnd,WM_CAP_SET_SEQUENCE_SETUP,(WPARAM)(wSize),(LPARAM)(LPVOID)(LPCAPTUREPARMS)(s)))
-#define capCaptureGetSetup(hwnd,s,wSize) ((BOOL) __capSendMessage(hwnd,WM_CAP_GET_SEQUENCE_SETUP,(WPARAM)(wSize),(LPARAM)(LPVOID)(LPCAPTUREPARMS)(s)))
-#define capSetMCIDeviceName(hwnd,szName) ((BOOL) __capSendMessage(hwnd,WM_CAP_SET_MCI_DEVICE,0,(LPARAM)(LPVOID)(LPTSTR)(szName)))
-#define capGetMCIDeviceName(hwnd,szName,wSize) ((BOOL) __capSendMessage(hwnd,WM_CAP_GET_MCI_DEVICE,(WPARAM)(wSize),(LPARAM)(LPVOID)(LPTSTR)(szName)))
-#define capCaptureStop(hwnd) ((BOOL) __capSendMessage(hwnd,WM_CAP_STOP,0,0))
-#define capCaptureAbort(hwnd) ((BOOL) __capSendMessage(hwnd,WM_CAP_ABORT,0,0))
-#define capCaptureSingleFrameOpen(hwnd) ((BOOL) __capSendMessage(hwnd,WM_CAP_SINGLE_FRAME_OPEN,0,0))
-#define capCaptureSingleFrameClose(hwnd) ((BOOL) __capSendMessage(hwnd,WM_CAP_SINGLE_FRAME_CLOSE,0,0))
-#define capCaptureSingleFrame(hwnd) ((BOOL) __capSendMessage(hwnd,WM_CAP_SINGLE_FRAME,0,0))
-#define capPaletteOpen(hwnd,szName) ((BOOL) __capSendMessage(hwnd,WM_CAP_PAL_OPEN,0,(LPARAM)(LPVOID)(LPTSTR)(szName)))
-#define capPaletteSave(hwnd,szName) ((BOOL) __capSendMessage(hwnd,WM_CAP_PAL_SAVE,0,(LPARAM)(LPVOID)(LPTSTR)(szName)))
-#define capPalettePaste(hwnd) ((BOOL) __capSendMessage(hwnd,WM_CAP_PAL_PASTE,0,0))
-#define capPaletteAuto(hwnd,iFrames,iColors) ((BOOL) __capSendMessage(hwnd,WM_CAP_PAL_AUTOCREATE,(WPARAM)(iFrames),(LPARAM)(DWORD)(iColors)))
-#define capPaletteManual(hwnd,fGrab,iColors) ((BOOL) __capSendMessage(hwnd,WM_CAP_PAL_MANUALCREATE,(WPARAM)(fGrab),(LPARAM)(DWORD)(iColors)))
-#define capSetCallbackOnCapControl(hwnd,fpProc) ((BOOL) __capSendMessage(hwnd,WM_CAP_SET_CALLBACK_CAPCONTROL,0,(LPARAM)(LPVOID)(fpProc)))
-
-/* AVICAP32 exports */
-HWND VFWAPI capCreateCaptureWindowA (LPCSTR,DWORD,int,int,int,int,HWND,int);
-HWND VFWAPI capCreateCaptureWindowW (LPCWSTR,DWORD,int,int,int,int,HWND,int);
-BOOL VFWAPI capGetDriverDescriptionA (UINT,LPSTR,int,LPSTR,int);
-BOOL VFWAPI capGetDriverDescriptionW (UINT,LPWSTR,int,LPWSTR,int);
-
-#ifdef UNICODE
-#define AVISTREAMINFO AVISTREAMINFOW
-#define LPAVISTREAMINFO LPAVISTREAMINFOW
-#define PAVISTREAMINFO PAVISTREAMINFOW
-#define AVIFILEINFO AVIFILEINFOW
-#define PAVIFILEINFO PAVIFILEINFOW
-#define LPAVIFILEINFO LPAVIFILEINFOW
-#define AVIStreamInfo AVIStreamInfoW
-#define AVIStreamOpenFromFile AVIStreamOpenFromFileW
-#define AVIBuildFilter AVIBuildFilterW
-#define AVISaveV AVISaveVW
-#define EditStreamSetInfo EditStreamSetInfoW
-#define EditStreamSetName EditStreamSetNameW
-#define AVIFileOpen AVIFileOpenW
-#define AVIFileInfo AVIFileInfoW
-#define AVIFileCreateStream AVIFileCreateStreamW
-#define GetOpenFileNamePreview GetOpenFileNamePreviewW
-#define GetSaveFileNamePreview GetSaveFileNamePreviewW
-#define MCIWndCreate MCIWndCreateW
-#define MCIWNDF_NOTIFYMEDIA MCIWNDF_NOTIFYMEDIAW
-#define MCIWNDM_SENDSTRING MCIWNDM_SENDSTRINGW
-#define MCIWNDM_GETPOSITION MCIWNDM_GETPOSITIONW
-#define MCIWNDM_GETMODE MCIWNDM_GETMODEW
-#define MCIWNDM_SETTIMEFORMAT MCIWNDM_SETTIMEFORMATW
-#define MCIWNDM_GETTIMEFORMAT MCIWNDM_GETTIMEFORMATW
-#define MCIWNDM_GETFILENAME MCIWNDM_GETFILENAMEW
-#define MCIWNDM_GETDEVICE MCIWNDM_GETDEVICEW
-#define MCIWNDM_GETERROR MCIWNDM_GETERRORW
-#define MCIWNDM_NEW MCIWNDM_NEWW
-#define MCIWNDM_RETURNSTRING MCIWNDM_RETURNSTRINGW
-#define MCIWNDM_OPEN MCIWNDM_OPENW
-
-#define capCreateCaptureWindow capCreateCaptureWindowW
-#define capGetDriverDescription capGetDriverDescriptionW
-
-#else
-#define AVISTREAMINFO AVISTREAMINFOA
-#define LPAVISTREAMINFO LPAVISTREAMINFOA
-#define PAVISTREAMINFO PAVISTREAMINFOA
-#define AVIFILEINFO AVIFILEINFOA
-#define PAVIFILEINFO PAVIFILEINFOA
-#define LPAVIFILEINFO LPAVIFILEINFOA
-#define AVIStreamInfo AVIStreamInfoA
-#define AVIStreamOpenFromFile AVIStreamOpenFromFileA
-#define AVIBuildFilter AVIBuildFilterA
-#define AVISaveV AVISaveVA
-#define EditStreamSetInfo EditStreamSetInfoA
-#define EditStreamSetName EditStreamSetNameA
-#define AVIFileOpen AVIFileOpenA
-#define AVIFileInfo AVIFileInfoA
-#define AVIFileCreateStream AVIFileCreateStreamA
-#define GetOpenFileNamePreview GetOpenFileNamePreviewA
-#define GetSaveFileNamePreview GetSaveFileNamePreviewA
-#define MCIWndCreate MCIWndCreateA
-#define MCIWNDF_NOTIFYMEDIA MCIWNDF_NOTIFYMEDIAA
-#define MCIWNDM_SENDSTRING MCIWNDM_SENDSTRINGA
-#define MCIWNDM_GETPOSITION MCIWNDM_GETPOSITIONA
-#define MCIWNDM_GETMODE MCIWNDM_GETMODEA
-#define MCIWNDM_SETTIMEFORMAT MCIWNDM_SETTIMEFORMATA
-#define MCIWNDM_GETTIMEFORMAT MCIWNDM_GETTIMEFORMATA
-#define MCIWNDM_GETFILENAME MCIWNDM_GETFILENAMEA
-#define MCIWNDM_GETDEVICE MCIWNDM_GETDEVICEA
-#define MCIWNDM_GETERROR MCIWNDM_GETERRORA
-#define MCIWNDM_NEW MCIWNDM_NEWA
-#define MCIWNDM_RETURNSTRING MCIWNDM_RETURNSTRINGA
-#define MCIWNDM_OPEN MCIWNDM_OPENA
-
-#define capCreateCaptureWindow capCreateCaptureWindowA
-#define capGetDriverDescription capGetDriverDescriptionA
-
-#endif
-
-#endif /* RC_INVOKED */
-
-#ifdef __cplusplus
-}
-#endif
-#include <poppack.h>
-#endif /* _VFW_H */
diff --git a/winsup/w32api/include/vidcap.h b/winsup/w32api/include/vidcap.h
deleted file mode 100644
index be9260f..0000000
--- a/winsup/w32api/include/vidcap.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef _VIDCAP_H
-#define _VIDCAP_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- DirectShow Reference - DirectShow Structures */
-typedef struct {
- ULONG FromNode;
- ULONG FromNodePin;
- ULONG ToNode;
- ULONG ToNodePin;
-} KSTOPOLOGY_CONNECTION;
-#define KSFILTER_NODE 0xFFFFFFFF
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/vmr9.h b/winsup/w32api/include/vmr9.h
deleted file mode 100644
index 9c5cd8d..0000000
--- a/winsup/w32api/include/vmr9.h
+++ /dev/null
@@ -1,211 +0,0 @@
-#ifndef _VMR9_H
-#define _VMR9_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- DirectShow Reference - DirectShow Enumerated Types */
-typedef enum _VMR9_SampleFormat {
- VMR9_SampleReserved = 1,
- VMR9_SampleProgressiveFrame = 2,
- VMR9_SampleFieldInterleavedEvenFirst = 3,
- VMR9_SampleFieldInterleavedOddFirst = 4,
- VMR9_SampleFieldSingleEven = 5,
- VMR9_SampleFieldSingleOdd = 6
-} VMR9_SampleFormat;
-typedef enum {
- VMR9AlphaBitmap_Disable = 0x00000001,
- VMR9AlphaBitmap_hDC = 0x00000002,
- VMR9AlphaBitmap_EntireDDS = 0x00000004,
- VMR9AlphaBitmap_SrcColorKey = 0x00000008,
- VMR9AlphaBitmap_SrcRect = 0x00000010,
- VMR9AlphaBitmap_FilterMode = 0x00000020
-} VMR9AlphaBitmapFlags;
-typedef enum {
- VMR9ARMode_None,
- VMR9ARMode_LetterBox
-} VMR9AspectRatioMode;
-typedef enum {
- DeinterlacePref9_NextBest = 0x01,
- DeinterlacePref9_BOB = 0x02,
- DeinterlacePref9_Weave = 0x04,
- DeinterlacePref9_Mask = 0x07
-} VMR9DeinterlacePrefs;
-typedef enum {
- DeinterlaceTech9_Unknown = 0x0000,
- DeinterlaceTech9_BOBLineReplicate = 0x0001,
- DeinterlaceTech9_BOBVerticalStretch = 0x0002,
- DeinterlaceTech9_MedianFiltering = 0x0004,
- DeinterlaceTech9_EdgeFiltering = 0x0010,
- DeinterlaceTech9_FieldAdaptive = 0x0020,
- DeinterlaceTech9_PixelAdaptive = 0x0040,
- DeinterlaceTech9_MotionVectorSteered = 0x0080
-} VMR9DeinterlaceTech;
-typedef enum {
- MixerPref9_NoDecimation = 0x00000001,
- MixerPref9_DecimateOutput = 0x00000002,
- MixerPref9_ARAdjustXorY = 0x00000004,
- MixerPref9_NonSquareMixing = 0x00000008,
- MixerPref9_DecimateMask = 0x0000000F,
- MixerPref9_BiLinearFiltering = 0x00000010,
- MixerPref9_PointFiltering = 0x00000020,
- MixerPref9_AnisotropicFiltering = 0x00000040,
- MixerPref9_PyramidalQuadFiltering = 0x00000080,
- MixerPref9_GaussianQuadFiltering = 0x00000100,
- MixerPref9_FilteringReserved = 0x00000E00,
- MixerPref9_FilteringMask = 0x00000FF0,
- MixerPref9_RenderTargetRGB = 0x00001000,
- MixerPref9_RenderTargetYUV = 0x00002000,
- MixerPref9_RenderTargetReserved = 0x000FC000,
- MixerPref9_RenderTargetMask = 0x000FF000
- MixerPref9_DynamicSwitchToBOB = 0x00100000,
- MixerPref9_DynamicDecimateBy2 = 0x00200000,
- MixerPref9_DynamicReserved = 0x00C00000,
- MixerPref9_DynamicMask = 0x00F00000
-} VMR9MixerPrefs;
-typedef enum VMR9Mode {
- VMR9Mode_Windowed = 0x00000001,
- VMR9Mode_Windowless = 0x00000002,
- VMR9Mode_Renderless = 0x00000004,
- VMR9Mode_Mask = 0x00000007
-};
-typedef enum {
- VMR9Sample_SyncPoint = 0x00000001,
- VMR9Sample_Preroll = 0x00000002,
- VMR9Sample_Discontinuity = 0x00000004,
- VMR9Sample_TimeValid = 0x00000008
-} VMR9PresentationFlags;
-typedef enum {
- ProcAmpControl9_Brightness = 0x00000001,
- ProcAmpControl9_Contrast = 0x00000002,
- ProcAmpControl9_Hue = 0x00000004,
- ProcAmpControl9_Saturation = 0x00000008,
- ProcAmpControl9_Mask = 0x0000000F
-} VMR9ProcAmpControlFlags;
-typedef enum VMR9RenderPrefs {
- RenderPrefs9_DoNotRenderBorder = 0x00000001,
- RenderPrefs9_Mask = 0x00000001
-};
-typedef enum {
- VMR9AllocFlag_3DRenderTarget = 0x0001,
- VMR9AllocFlag_DXVATarget = 0x0002,
- VMR9AllocFlag_TextureSurface = 0x0004,
- VMR9AllocFlag_OffscreenSurface = 0x0008,
- VMR9AllocFlag_UsageReserved = 0x00F0,
- VMR9AllocFlag_UsageMask = 0x00FF
-} VMR9SurfaceAllocationFlags;
-/*--- DirectShow Reference - DirectShow Structures */
-/**********
-typedef struct VMR9AllocationInfo{
- DWORD dwFlags;
- DWORD dwWidth;
- DWORD dwHeight;
- D3DFORMAT Format;
- D3DPOOL Pool;
- DWORD MinBuffers;
- SIZE szAspectRatio;
- SIZE szNativeSize;
-};
-**********/
-typedef struct _VMR9DeinterlaceCaps {
- DWORD dwSize;
- DWORD dwNumPreviousOutputFrames;
- DWORD dwNumForwardRefSamples;
- DWORD dwNumBackwardRefSamples;
- VMRDeinterlaceTech DeinterlaceTechnology;
-} VMR9DeinterlaceCaps;
-typedef struct _VMR9Frequency {
- DWORD dwNumerator;
- DWORD dwDenominator;
-} VMR9Frequency;
-typedef struct {
- UINT uDevID;
- RECT rcMonitor;
- HMONITOR hMon;
- DWORD dwFlags;
- wchar_t szDevice[32];
- wchar_t szDescription[512]
- LARGE_INTEGER liDriverVersion;
- DWORD dwVendorId;
- DWORD dwDeviceId;
- DWORD dwSubSysId;
- DWORD dwRevision;
-} VMR9MonitorInfo;
-typedef struct VMR9NormalizedRect{
- float left;
- float top;
- float right;
- float bottom;
-};
-/**********
-typedef struct {
- DWORD dwFlags;
- IDirect3DSurface9 *lpSurf;
- REFERENCE_TIME rtStart;
- REFERENCE_TIME rtEnd;
- SIZE szAspectRatio;
- RECT rcSrc;
- RECT rcDst;
- DWORD dwReserved1;
- DWORD dwReserved2;
-} VMR9PresentationInfo;
-**********/
-typedef struct _VMR9ProcAmpControl
-{
- DWORD dwSize;
- DWORD dwFlags;
- float Contrast;
- float Brightness;
- float Hue;
- float Saturation;
-} VMR9ProcAmpControl;
-typedef struct _VMR9ProcAmpControlRange
-{
- DWORD dwSize;
- VMR9ProcAmpControlFlags dwProperty;
- float MinValue;
- float MaxValue;
- float DefaultValue;
- float StepSize;
-} VMR9ProcAmpControlRange;
-typedef struct _VMR9VideoDesc {
- DWORD dwSize;
- DWORD dwSampleWidth;
- DWORD dwSampleHeight;
- VMR9_SampleFormat SampleFormat;
- DWORD dwFourCC;
- VMR9Frequency InputSampleFreq;
- VMR9Frequency OutputFrameFreq;
-} VMR9VideoDesc;
-/**********
-typedef struct VMR9VideoStreamInfo{
- IDirect3DSurface9 *pddsVideoSurface;
- DWORD dwWidth;
- DWORD dwHeight;
- DWORD dwStrmID;
- FLOAT fAlpha;
- VMR9NormalizedRect rNormal;
- REFERENCE_TIME rtStart;
- REFERENCE_TIME rtEnd;
- VMR9_SampleFormat SampleFormat;
-};
-typedef struct VMR9AlphaBitmap{
- DWORD dwFlags;
- HDC hdc;
- IDirect3DSurface9 *pDDS;
- RECT rSrc;
- VMR9NormalizedRect rDest;
- FLOAT fAlpha;
- COLORREF clrSrcKey;
- DWORD dwFilterMode;
-};
-**********/
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/vptype.h b/winsup/w32api/include/vptype.h
deleted file mode 100644
index d90d614..0000000
--- a/winsup/w32api/include/vptype.h
+++ /dev/null
@@ -1,55 +0,0 @@
-#ifndef _VPTYPE_H
-#define _VPTYPE_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*--- DirectShow Reference - DirectShow Enumerated Types */
-typedef enum _AMVP_MODE {
- AMVP_MODE_WEAVE,
- AMVP_MODE_BOBINTERLEAVED,
- AMVP_MODE_BOBNONINTERLEAVED,
- AMVP_MODE_SKIPEVEN,
- AMVP_MODE_SKIPODD
-} AMVP_MODE;
-typedef enum _AMVP_SELECT_FORMAT_BY {
- AMVP_DO_NOT_CARE,
- AMVP_BEST_BANDWIDTH,
- AMVP_INPUT_SAME_AS_OUTPUT
-} AMVP_SELECT_FORMAT_BY;
-/*--- DirectShow Reference - DirectShow Structures */
-typedef struct _AMVPDIMINFO{
- DWORD dwFieldWidth;
- DWORD dwFieldHeight;
- DWORD dwVBIWidth;
- DWORD dwVBIHeight;
- RECT rcValidRegion;
-} AMVPDIMINFO,*LPAMVPDIMINFO;
-typedef struct _AMVPDATAINFO{
- DWORD dwSize;
- DWORD dwMicrosecondsPerField;
- AMVPDIMINFO amvpDimInfo;
- DWORD dwPictAspectRatioX;
- DWORD dwPictAspectRatioY;
- BOOL bEnableDoubleClock;
- BOOL bEnableVACT;
- BOOL bDataIsInterlaced;
- LONG lHalfLinesOdd;
- BOOL bFieldPolarityInverted;
- DWORD dwNumLinesInVREF;
- LONG lHalfLinesEven;
- DWORD dwReserved1;
-} AMVPDATAINFO,*LPAMVPDATAINFO;
-typedef struct _AMVPSIZE{
- DWORD dwWidth;
- DWORD dwHeight;
-} AMVPSIZE,*LPAMVPSIZE;
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/w32api.h b/winsup/w32api/include/w32api.h
deleted file mode 100644
index 5991066..0000000
--- a/winsup/w32api/include/w32api.h
+++ /dev/null
@@ -1,52 +0,0 @@
-#ifndef _W32API_H
-#define _W32API_H
-#define _W32API_H_
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#define __W32API_VERSION 3.13
-#define __W32API_MAJOR_VERSION 3
-#define __W32API_MINOR_VERSION 13
-
-/* The following defines are for documentation purposes. The following defines
- * identify the versions of Windows and Internet Explorer. They are not to be
- * used in the w32api library but may be used by a user to set the _WIN32_WINNT
- * or _WIN32_WINDOWS and the WINVER values to their minimum level of support.
- *
- * Similarly the user can use the Internet Explorer values to set the _WIN32_IE
- * value to their minimum level of support.
- */
-
-/* Use these values to set _WIN32_WINDOWS and WINVER to your minimum support
- * level */
-#define Windows95 0x0400
-#define Windows98 0x0410
-#define WindowsME 0x0500
-
-/* Use these values to set _WIN32_WINNT and WINVER to your mimimum support
- * level. */
-#define WindowsNT4 0x0400
-#define Windows2000 0x0500
-#define WindowsXP 0x0501
-#define Windows2003 0x0502
-#define WindowsVista 0x0600
-
-/* Use these values to set _WIN32_IE to your minimum support level */
-#define IE3 0x0300
-#define IE301 0x0300
-#define IE302 0x0300
-#define IE4 0x0400
-#define IE401 0x0401
-#define IE5 0x0500
-#define IE5a 0x0500
-#define IE5b 0x0500
-#define IE501 0x0501
-#define IE55 0x0501
-#define IE56 0x0560
-#define IE6 0x0600
-#define IE601 0x0601
-#define IE602 0x0603
-#define IE7 0x0700
-
-#endif /* ndef _W32API_H */
diff --git a/winsup/w32api/include/winable.h b/winsup/w32api/include/winable.h
deleted file mode 100644
index 0228293..0000000
--- a/winsup/w32api/include/winable.h
+++ /dev/null
@@ -1,99 +0,0 @@
-#ifndef _WINABLE_H
-#define _WINABLE_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if (_WIN32_WINNT < 0x0403)
-#define INPUT_MOUSE 0x00000000
-#define INPUT_KEYBOARD 0x00000001
-#define INPUT_HARDWARE 0x00000002
-#endif /* (_WIN32_WINNT < 0x04030) */
-#if (WINVER < 0x0500)
-#define CHILDID_SELF 0
-#define OBJID_WINDOW 0x00000000
-#define OBJID_SYSMENU 0xFFFFFFFF
-#define OBJID_TITLEBAR 0xFFFFFFFE
-#define OBJID_MENU 0xFFFFFFFD
-#define OBJID_CLIENT 0xFFFFFFFC
-#define OBJID_VSCROLL 0xFFFFFFFB
-#define OBJID_HSCROLL 0xFFFFFFFA
-#define OBJID_SIZEGRIP 0xFFFFFFF9
-#define OBJID_CARET 0xFFFFFFF8
-#define OBJID_CURSOR 0xFFFFFFF7
-#define OBJID_ALERT 0xFFFFFFF6
-#define OBJID_SOUND 0xFFFFFFF5
-#define GUI_CARETBLINKING 0x00000001
-#define GUI_INMOVESIZE 0x00000002
-#define GUI_INMENUMODE 0x00000004
-#define GUI_SYSTEMMENUMODE 0x00000008
-#define GUI_POPUPMENUMODE 0x00000010
-#define WINEVENT_OUTOFCONTEXT 0x0000
-#define WINEVENT_SKIPOWNTHREAD 0x0001
-#define WINEVENT_SKIPOWNPROCESS 0x0002
-#define WINEVENT_INCONTEXT 0x0004
-#endif /* (WINVER < 0x0500) */
-#if (_WIN32_WINNT < 0x0403)
-typedef struct tagMOUSEINPUT {
- LONG dx;
- LONG dy;
- DWORD mouseData;
- DWORD dwFlags;
- DWORD time;
- ULONG_PTR dwExtraInfo;
-} MOUSEINPUT,*PMOUSEINPUT;
-typedef struct tagKEYBDINPUT {
- WORD wVk;
- WORD wScan;
- DWORD dwFlags;
- DWORD time;
- ULONG_PTR dwExtraInfo;
-} KEYBDINPUT,*PKEYBDINPUT;
-typedef struct tagHARDWAREINPUT {
- DWORD uMsg;
- WORD wParamL;
- WORD wParamH;
-} HARDWAREINPUT,*PHARDWAREINPUT;
-typedef struct tagINPUT {
- DWORD type;
- _ANONYMOUS_UNION union {
- MOUSEINPUT mi;
- KEYBDINPUT ki;
- HARDWAREINPUT hi;
- } DUMMYUNIONNAME;
-} INPUT,*PINPUT,*LPINPUT;
-#endif /* (_WIN32_WINNT < 0x0403) */
-#if (WINVER < 0x0500)
-typedef VOID (*WINEVENTPROC)(HWINEVENTHOOK,DWORD,HWND,LONG,LONG,DWORD,DWORD);
-typedef struct tagGUITHREADINFO {
- DWORD cbSize;
- DWORD flags;
- HWND hwndActive;
- HWND hwndFocus;
- HWND hwndCapture;
- HWND hwndMenuOwner;
- HWND hwndMoveSize;
- HWND hwndCaret;
- RECT rcCaret;
-} GUITHREADINFO,*PGUITHREADINFO,*LPGUITHREADINFO;
-#endif /* (WINVER < 0x0500) */
-
-BOOL WINAPI BlockInput(BOOL);
-#if (_WIN32_WINNT < 0x0403)
-UINT WINAPI SendInput(UINT,LPINPUT,int);
-#endif
-#if (WINVER < 0x0500)
-BOOL WINAPI GetGUIThreadInfo(DWORD,LPGUITHREADINFO);
-void WINAPI NotifyWinEvent(DWORD,HWND,LONG,LONG);
-HWINEVENTHOOK WINAPI SetWinEventHook(UINT,UINT,HMODULE,WINEVENTPROC,DWORD,DWORD,UINT);
-BOOL WINAPI UnhookWinEvent(HWINEVENTHOOK);
-#endif /* (WINVER < 0x0500) */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/winbase.h b/winsup/w32api/include/winbase.h
deleted file mode 100644
index b27bd93..0000000
--- a/winsup/w32api/include/winbase.h
+++ /dev/null
@@ -1,2456 +0,0 @@
-#ifndef _WINBASE_H
-#define _WINBASE_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifndef WINBASEAPI
-#ifdef __W32API_USE_DLLIMPORT__
-#define WINBASEAPI DECLSPEC_IMPORT
-#else
-#define WINBASEAPI
-#endif
-#endif
-
-#ifndef WINADVAPI
-#ifdef __W32API_USE_DLLIMPORT__
-#define WINADVAPI DECLSPEC_IMPORT
-#else
-#define WINADVAPI
-#endif
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define SP_SERIALCOMM 1
-#define PST_UNSPECIFIED 0
-#define PST_RS232 1
-#define PST_PARALLELPORT 2
-#define PST_RS422 3
-#define PST_RS423 4
-#define PST_RS449 5
-#define PST_MODEM 6
-#define PST_FAX 0x21
-#define PST_SCANNER 0x22
-#define PST_NETWORK_BRIDGE 0x100
-#define PST_LAT 0x101
-#define PST_TCPIP_TELNET 0x102
-#define PST_X25 0x103
-#define BAUD_075 1
-#define BAUD_110 2
-#define BAUD_134_5 4
-#define BAUD_150 8
-#define BAUD_300 16
-#define BAUD_600 32
-#define BAUD_1200 64
-#define BAUD_1800 128
-#define BAUD_2400 256
-#define BAUD_4800 512
-#define BAUD_7200 1024
-#define BAUD_9600 2048
-#define BAUD_14400 4096
-#define BAUD_19200 8192
-#define BAUD_38400 16384
-#define BAUD_56K 32768
-#define BAUD_128K 65536
-#define BAUD_115200 131072
-#define BAUD_57600 262144
-#define BAUD_USER 0x10000000
-#define PCF_DTRDSR 1
-#define PCF_RTSCTS 2
-#define PCF_RLSD 4
-#define PCF_PARITY_CHECK 8
-#define PCF_XONXOFF 16
-#define PCF_SETXCHAR 32
-#define PCF_TOTALTIMEOUTS 64
-#define PCF_INTTIMEOUTS 128
-#define PCF_SPECIALCHARS 256
-#define PCF_16BITMODE 512
-#define SP_PARITY 1
-#define SP_BAUD 2
-#define SP_DATABITS 4
-#define SP_STOPBITS 8
-#define SP_HANDSHAKING 16
-#define SP_PARITY_CHECK 32
-#define SP_RLSD 64
-#define DATABITS_5 1
-#define DATABITS_6 2
-#define DATABITS_7 4
-#define DATABITS_8 8
-#define DATABITS_16 16
-#define DATABITS_16X 32
-#define STOPBITS_10 1
-#define STOPBITS_15 2
-#define STOPBITS_20 4
-#define PARITY_NONE 256
-#define PARITY_ODD 512
-#define PARITY_EVEN 1024
-#define PARITY_MARK 2048
-#define PARITY_SPACE 4096
-#define EXCEPTION_DEBUG_EVENT 1
-#define CREATE_THREAD_DEBUG_EVENT 2
-#define CREATE_PROCESS_DEBUG_EVENT 3
-#define EXIT_THREAD_DEBUG_EVENT 4
-#define EXIT_PROCESS_DEBUG_EVENT 5
-#define LOAD_DLL_DEBUG_EVENT 6
-#define UNLOAD_DLL_DEBUG_EVENT 7
-#define OUTPUT_DEBUG_STRING_EVENT 8
-#define RIP_EVENT 9
-#define HFILE_ERROR ((HFILE)-1)
-#define FILE_BEGIN 0
-#define FILE_CURRENT 1
-#define FILE_END 2
-#define INVALID_SET_FILE_POINTER ((DWORD)-1)
-#define OF_READ 0
-#define OF_READWRITE 2
-#define OF_WRITE 1
-#define OF_SHARE_COMPAT 0
-#define OF_SHARE_DENY_NONE 64
-#define OF_SHARE_DENY_READ 48
-#define OF_SHARE_DENY_WRITE 32
-#define OF_SHARE_EXCLUSIVE 16
-#define OF_CANCEL 2048
-#define OF_CREATE 4096
-#define OF_DELETE 512
-#define OF_EXIST 16384
-#define OF_PARSE 256
-#define OF_PROMPT 8192
-#define OF_REOPEN 32768
-#define OF_VERIFY 1024
-#define NMPWAIT_NOWAIT 1
-#define NMPWAIT_WAIT_FOREVER ((DWORD)-1)
-#define NMPWAIT_USE_DEFAULT_WAIT 0
-#define CE_BREAK 16
-#define CE_DNS 2048
-#define CE_FRAME 8
-#define CE_IOE 1024
-#define CE_MODE 32768
-#define CE_OOP 4096
-#define CE_OVERRUN 2
-#define CE_PTO 512
-#define CE_RXOVER 1
-#define CE_RXPARITY 4
-#define CE_TXFULL 256
-#define PROGRESS_CONTINUE 0
-#define PROGRESS_CANCEL 1
-#define PROGRESS_STOP 2
-#define PROGRESS_QUIET 3
-#define CALLBACK_CHUNK_FINISHED 0
-#define CALLBACK_STREAM_SWITCH 1
-#define COPY_FILE_FAIL_IF_EXISTS 1
-#define COPY_FILE_RESTARTABLE 2
-#define OFS_MAXPATHNAME 128
-#define FILE_MAP_ALL_ACCESS 0xf001f
-#define FILE_MAP_READ 4
-#define FILE_MAP_WRITE 2
-#define FILE_MAP_COPY 1
-#define MUTEX_ALL_ACCESS 0x1f0001
-#define MUTEX_MODIFY_STATE 1
-#define SEMAPHORE_ALL_ACCESS 0x1f0003
-#define SEMAPHORE_MODIFY_STATE 2
-#define EVENT_ALL_ACCESS 0x1f0003
-#define EVENT_MODIFY_STATE 2
-#define PIPE_ACCESS_DUPLEX 3
-#define PIPE_ACCESS_INBOUND 1
-#define PIPE_ACCESS_OUTBOUND 2
-#define PIPE_TYPE_BYTE 0
-#define PIPE_TYPE_MESSAGE 4
-#define PIPE_READMODE_BYTE 0
-#define PIPE_READMODE_MESSAGE 2
-#define PIPE_WAIT 0
-#define PIPE_NOWAIT 1
-#define PIPE_CLIENT_END 0
-#define PIPE_SERVER_END 1
-#define PIPE_UNLIMITED_INSTANCES 255
-#define DEBUG_PROCESS 0x00000001
-#define DEBUG_ONLY_THIS_PROCESS 0x00000002
-#define CREATE_SUSPENDED 0x00000004
-#define DETACHED_PROCESS 0x00000008
-#define CREATE_NEW_CONSOLE 0x00000010
-#define NORMAL_PRIORITY_CLASS 0x00000020
-#define IDLE_PRIORITY_CLASS 0x00000040
-#define HIGH_PRIORITY_CLASS 0x00000080
-#define REALTIME_PRIORITY_CLASS 0x00000100
-#define CREATE_NEW_PROCESS_GROUP 0x00000200
-#define CREATE_UNICODE_ENVIRONMENT 0x00000400
-#define CREATE_SEPARATE_WOW_VDM 0x00000800
-#define CREATE_SHARED_WOW_VDM 0x00001000
-#define CREATE_FORCEDOS 0x00002000
-#define BELOW_NORMAL_PRIORITY_CLASS 0x00004000
-#define ABOVE_NORMAL_PRIORITY_CLASS 0x00008000
-#define CREATE_BREAKAWAY_FROM_JOB 0x01000000
-#define CREATE_WITH_USERPROFILE 0x02000000
-#define CREATE_DEFAULT_ERROR_MODE 0x04000000
-#define CREATE_NO_WINDOW 0x08000000
-#define PROFILE_USER 0x10000000
-#define PROFILE_KERNEL 0x20000000
-#define PROFILE_SERVER 0x40000000
-#define CONSOLE_TEXTMODE_BUFFER 1
-#define CREATE_NEW 1
-#define CREATE_ALWAYS 2
-#define OPEN_EXISTING 3
-#define OPEN_ALWAYS 4
-#define TRUNCATE_EXISTING 5
-#define FILE_FLAG_WRITE_THROUGH 0x80000000
-#define FILE_FLAG_OVERLAPPED 1073741824
-#define FILE_FLAG_NO_BUFFERING 536870912
-#define FILE_FLAG_RANDOM_ACCESS 268435456
-#define FILE_FLAG_SEQUENTIAL_SCAN 134217728
-#define FILE_FLAG_DELETE_ON_CLOSE 67108864
-#define FILE_FLAG_BACKUP_SEMANTICS 33554432
-#define FILE_FLAG_POSIX_SEMANTICS 16777216
-#define FILE_FLAG_OPEN_REPARSE_POINT 2097152
-#define FILE_FLAG_OPEN_NO_RECALL 1048576
-#if (_WIN32_WINNT >= 0x0500)
-#define FILE_FLAG_FIRST_PIPE_INSTANCE 524288
-#endif
-#define CLRDTR 6
-#define CLRRTS 4
-#define SETDTR 5
-#define SETRTS 3
-#define SETXOFF 1
-#define SETXON 2
-#define SETBREAK 8
-#define CLRBREAK 9
-#define STILL_ACTIVE 0x103
-#define FIND_FIRST_EX_CASE_SENSITIVE 1
-#define SCS_32BIT_BINARY 0
-#define SCS_DOS_BINARY 1
-#define SCS_OS216_BINARY 5
-#define SCS_PIF_BINARY 3
-#define SCS_POSIX_BINARY 4
-#define SCS_WOW_BINARY 2
-#define MAX_COMPUTERNAME_LENGTH 15
-#define HW_PROFILE_GUIDLEN 39
-#define MAX_PROFILE_LEN 80
-#define DOCKINFO_UNDOCKED 1
-#define DOCKINFO_DOCKED 2
-#define DOCKINFO_USER_SUPPLIED 4
-#define DOCKINFO_USER_UNDOCKED (DOCKINFO_USER_SUPPLIED|DOCKINFO_UNDOCKED)
-#define DOCKINFO_USER_DOCKED (DOCKINFO_USER_SUPPLIED|DOCKINFO_DOCKED)
-#define DRIVE_REMOVABLE 2
-#define DRIVE_FIXED 3
-#define DRIVE_REMOTE 4
-#define DRIVE_CDROM 5
-#define DRIVE_RAMDISK 6
-#define DRIVE_UNKNOWN 0
-#define DRIVE_NO_ROOT_DIR 1
-#define FILE_TYPE_UNKNOWN 0
-#define FILE_TYPE_DISK 1
-#define FILE_TYPE_CHAR 2
-#define FILE_TYPE_PIPE 3
-#define FILE_TYPE_REMOTE 0x8000
-/* also in ddk/ntapi.h */
-#define HANDLE_FLAG_INHERIT 0x01
-#define HANDLE_FLAG_PROTECT_FROM_CLOSE 0x02
-/* end ntapi.h */
-#define STD_INPUT_HANDLE (DWORD)(0xfffffff6)
-#define STD_OUTPUT_HANDLE (DWORD)(0xfffffff5)
-#define STD_ERROR_HANDLE (DWORD)(0xfffffff4)
-#define INVALID_HANDLE_VALUE (HANDLE)(-1)
-#define GET_TAPE_MEDIA_INFORMATION 0
-#define GET_TAPE_DRIVE_INFORMATION 1
-#define SET_TAPE_MEDIA_INFORMATION 0
-#define SET_TAPE_DRIVE_INFORMATION 1
-#define THREAD_PRIORITY_ABOVE_NORMAL 1
-#define THREAD_PRIORITY_BELOW_NORMAL (-1)
-#define THREAD_PRIORITY_HIGHEST 2
-#define THREAD_PRIORITY_IDLE (-15)
-#define THREAD_PRIORITY_LOWEST (-2)
-#define THREAD_PRIORITY_NORMAL 0
-#define THREAD_PRIORITY_TIME_CRITICAL 15
-#define THREAD_PRIORITY_ERROR_RETURN 2147483647
-#define TIME_ZONE_ID_UNKNOWN 0
-#define TIME_ZONE_ID_STANDARD 1
-#define TIME_ZONE_ID_DAYLIGHT 2
-#define TIME_ZONE_ID_INVALID 0xFFFFFFFF
-#define FS_CASE_IS_PRESERVED 2
-#define FS_CASE_SENSITIVE 1
-#define FS_UNICODE_STORED_ON_DISK 4
-#define FS_PERSISTENT_ACLS 8
-#define FS_FILE_COMPRESSION 16
-#define FS_VOL_IS_COMPRESSED 32768
-#define GMEM_FIXED 0
-#define GMEM_MOVEABLE 2
-#define GMEM_MODIFY 128
-#define GPTR 64
-#define GHND 66
-#define GMEM_DDESHARE 8192
-#define GMEM_DISCARDABLE 256
-#define GMEM_LOWER 4096
-#define GMEM_NOCOMPACT 16
-#define GMEM_NODISCARD 32
-#define GMEM_NOT_BANKED 4096
-#define GMEM_NOTIFY 16384
-#define GMEM_SHARE 8192
-#define GMEM_ZEROINIT 64
-#define GMEM_DISCARDED 16384
-#define GMEM_INVALID_HANDLE 32768
-#define GMEM_LOCKCOUNT 255
-#define GMEM_VALID_FLAGS 32626
-#define STATUS_WAIT_0 0
-#define STATUS_ABANDONED_WAIT_0 0x80
-#define STATUS_USER_APC 0xC0
-#define STATUS_TIMEOUT 0x102
-#define STATUS_PENDING 0x103
-#define STATUS_SEGMENT_NOTIFICATION 0x40000005
-#define STATUS_GUARD_PAGE_VIOLATION 0x80000001
-#define STATUS_DATATYPE_MISALIGNMENT 0x80000002
-#define STATUS_BREAKPOINT 0x80000003
-#define STATUS_SINGLE_STEP 0x80000004
-#define STATUS_ACCESS_VIOLATION 0xC0000005
-#define STATUS_IN_PAGE_ERROR 0xC0000006
-#define STATUS_INVALID_HANDLE 0xC0000008L
-#define STATUS_NO_MEMORY 0xC0000017
-#define STATUS_ILLEGAL_INSTRUCTION 0xC000001D
-#define STATUS_NONCONTINUABLE_EXCEPTION 0xC0000025
-#define STATUS_INVALID_DISPOSITION 0xC0000026
-#define STATUS_ARRAY_BOUNDS_EXCEEDED 0xC000008C
-#define STATUS_FLOAT_DENORMAL_OPERAND 0xC000008D
-#define STATUS_FLOAT_DIVIDE_BY_ZERO 0xC000008E
-#define STATUS_FLOAT_INEXACT_RESULT 0xC000008F
-#define STATUS_FLOAT_INVALID_OPERATION 0xC0000090
-#define STATUS_FLOAT_OVERFLOW 0xC0000091
-#define STATUS_FLOAT_STACK_CHECK 0xC0000092
-#define STATUS_FLOAT_UNDERFLOW 0xC0000093
-#define STATUS_INTEGER_DIVIDE_BY_ZERO 0xC0000094
-#define STATUS_INTEGER_OVERFLOW 0xC0000095
-#define STATUS_PRIVILEGED_INSTRUCTION 0xC0000096
-#define STATUS_STACK_OVERFLOW 0xC00000FD
-#define STATUS_CONTROL_C_EXIT 0xC000013A
-#define STATUS_DLL_INIT_FAILED 0xC0000142
-#define STATUS_DLL_INIT_FAILED_LOGOFF 0xC000026B
-#define EXCEPTION_ACCESS_VIOLATION STATUS_ACCESS_VIOLATION
-#define EXCEPTION_DATATYPE_MISALIGNMENT STATUS_DATATYPE_MISALIGNMENT
-#define EXCEPTION_BREAKPOINT STATUS_BREAKPOINT
-#define EXCEPTION_SINGLE_STEP STATUS_SINGLE_STEP
-#define EXCEPTION_ARRAY_BOUNDS_EXCEEDED STATUS_ARRAY_BOUNDS_EXCEEDED
-#define EXCEPTION_FLT_DENORMAL_OPERAND STATUS_FLOAT_DENORMAL_OPERAND
-#define EXCEPTION_FLT_DIVIDE_BY_ZERO STATUS_FLOAT_DIVIDE_BY_ZERO
-#define EXCEPTION_FLT_INEXACT_RESULT STATUS_FLOAT_INEXACT_RESULT
-#define EXCEPTION_FLT_INVALID_OPERATION STATUS_FLOAT_INVALID_OPERATION
-#define EXCEPTION_FLT_OVERFLOW STATUS_FLOAT_OVERFLOW
-#define EXCEPTION_FLT_STACK_CHECK STATUS_FLOAT_STACK_CHECK
-#define EXCEPTION_FLT_UNDERFLOW STATUS_FLOAT_UNDERFLOW
-#define EXCEPTION_INT_DIVIDE_BY_ZERO STATUS_INTEGER_DIVIDE_BY_ZERO
-#define EXCEPTION_INT_OVERFLOW STATUS_INTEGER_OVERFLOW
-#define EXCEPTION_PRIV_INSTRUCTION STATUS_PRIVILEGED_INSTRUCTION
-#define EXCEPTION_IN_PAGE_ERROR STATUS_IN_PAGE_ERROR
-#define EXCEPTION_ILLEGAL_INSTRUCTION STATUS_ILLEGAL_INSTRUCTION
-#define EXCEPTION_NONCONTINUABLE_EXCEPTION STATUS_NONCONTINUABLE_EXCEPTION
-#define EXCEPTION_STACK_OVERFLOW STATUS_STACK_OVERFLOW
-#define EXCEPTION_INVALID_DISPOSITION STATUS_INVALID_DISPOSITION
-#define EXCEPTION_GUARD_PAGE STATUS_GUARD_PAGE_VIOLATION
-#define EXCEPTION_INVALID_HANDLE STATUS_INVALID_HANDLE
-#define CONTROL_C_EXIT STATUS_CONTROL_C_EXIT
-#define PROCESS_HEAP_REGION 1
-#define PROCESS_HEAP_UNCOMMITTED_RANGE 2
-#define PROCESS_HEAP_ENTRY_BUSY 4
-#define PROCESS_HEAP_ENTRY_MOVEABLE 16
-#define PROCESS_HEAP_ENTRY_DDESHARE 32
-#define DONT_RESOLVE_DLL_REFERENCES 1
-#define LOAD_LIBRARY_AS_DATAFILE 2
-#define LOAD_WITH_ALTERED_SEARCH_PATH 8
-#define LMEM_FIXED 0
-#define LMEM_MOVEABLE 2
-#define LMEM_NONZEROLHND 2
-#define LMEM_NONZEROLPTR 0
-#define LMEM_DISCARDABLE 3840
-#define LMEM_NOCOMPACT 16
-#define LMEM_NODISCARD 32
-#define LMEM_ZEROINIT 64
-#define LMEM_DISCARDED 16384
-#define LMEM_MODIFY 128
-#define LMEM_INVALID_HANDLE 32768
-#define LMEM_LOCKCOUNT 255
-#define LPTR 64
-#define LHND 66
-#define NONZEROLHND 2
-#define NONZEROLPTR 0
-#define LOCKFILE_FAIL_IMMEDIATELY 1
-#define LOCKFILE_EXCLUSIVE_LOCK 2
-#define LOGON32_PROVIDER_DEFAULT 0
-#define LOGON32_PROVIDER_WINNT35 1
-#if (_WIN32_WINNT >= 0x0400)
-#define LOGON32_PROVIDER_WINNT40 2
-#endif
-#if (_WIN32_WINNT >= 0x0500)
-#define LOGON32_PROVIDER_WINNT50 3
-#endif
-#define LOGON32_LOGON_INTERACTIVE 2
-#define LOGON32_LOGON_NETWORK 3
-#define LOGON32_LOGON_BATCH 4
-#define LOGON32_LOGON_SERVICE 5
-#define LOGON32_LOGON_UNLOCK 7
-#if (_WIN32_WINNT >= 0x0500)
-#define LOGON32_LOGON_NETWORK_CLEARTEXT 8
-#define LOGON32_LOGON_NEW_CREDENTIALS 9
-#endif
-#define MOVEFILE_REPLACE_EXISTING 1
-#define MOVEFILE_COPY_ALLOWED 2
-#define MOVEFILE_DELAY_UNTIL_REBOOT 4
-#define MOVEFILE_WRITE_THROUGH 8
-#define MAXIMUM_WAIT_OBJECTS 64
-#define MAXIMUM_SUSPEND_COUNT 0x7F
-#define WAIT_OBJECT_0 0
-#define WAIT_ABANDONED_0 128
-#ifndef WAIT_TIMEOUT /* also in winerror.h */
-#define WAIT_TIMEOUT 258
-#endif
-#define WAIT_IO_COMPLETION 0xC0
-#define WAIT_ABANDONED 128
-#define WAIT_FAILED ((DWORD)0xFFFFFFFF)
-#define PURGE_TXABORT 1
-#define PURGE_RXABORT 2
-#define PURGE_TXCLEAR 4
-#define PURGE_RXCLEAR 8
-#define EVENTLOG_SUCCESS 0
-#define EVENTLOG_FORWARDS_READ 4
-#define EVENTLOG_BACKWARDS_READ 8
-#define EVENTLOG_SEEK_READ 2
-#define EVENTLOG_SEQUENTIAL_READ 1
-#define EVENTLOG_ERROR_TYPE 1
-#define EVENTLOG_WARNING_TYPE 2
-#define EVENTLOG_INFORMATION_TYPE 4
-#define EVENTLOG_AUDIT_SUCCESS 8
-#define EVENTLOG_AUDIT_FAILURE 16
-#define FORMAT_MESSAGE_ALLOCATE_BUFFER 256
-#define FORMAT_MESSAGE_IGNORE_INSERTS 512
-#define FORMAT_MESSAGE_FROM_STRING 1024
-#define FORMAT_MESSAGE_FROM_HMODULE 2048
-#define FORMAT_MESSAGE_FROM_SYSTEM 4096
-#define FORMAT_MESSAGE_ARGUMENT_ARRAY 8192
-#define FORMAT_MESSAGE_MAX_WIDTH_MASK 255
-#define EV_BREAK 64
-#define EV_CTS 8
-#define EV_DSR 16
-#define EV_ERR 128
-#define EV_EVENT1 2048
-#define EV_EVENT2 4096
-#define EV_PERR 512
-#define EV_RING 256
-#define EV_RLSD 32
-#define EV_RX80FULL 1024
-#define EV_RXCHAR 1
-#define EV_RXFLAG 2
-#define EV_TXEMPTY 4
-/* also in ddk/ntapi.h */
-/* To restore default error mode, call SetErrorMode (0). */
-#define SEM_FAILCRITICALERRORS 0x0001
-#define SEM_NOGPFAULTERRORBOX 0x0002
-#define SEM_NOALIGNMENTFAULTEXCEPT 0x0004
-#define SEM_NOOPENFILEERRORBOX 0x8000
-/* end ntapi.h */
-#define SLE_ERROR 1
-#define SLE_MINORERROR 2
-#define SLE_WARNING 3
-#define SHUTDOWN_NORETRY 1
-#define EXCEPTION_EXECUTE_HANDLER 1
-#define EXCEPTION_CONTINUE_EXECUTION (-1)
-#define EXCEPTION_CONTINUE_SEARCH 0
-#define MAXINTATOM 0xC000
-#define INVALID_ATOM ((ATOM)0)
-#define IGNORE 0
-#define INFINITE 0xFFFFFFFF
-#define NOPARITY 0
-#define ODDPARITY 1
-#define EVENPARITY 2
-#define MARKPARITY 3
-#define SPACEPARITY 4
-#define ONESTOPBIT 0
-#define ONE5STOPBITS 1
-#define TWOSTOPBITS 2
-#define CBR_110 110
-#define CBR_300 300
-#define CBR_600 600
-#define CBR_1200 1200
-#define CBR_2400 2400
-#define CBR_4800 4800
-#define CBR_9600 9600
-#define CBR_14400 14400
-#define CBR_19200 19200
-#define CBR_38400 38400
-#define CBR_56000 56000
-#define CBR_57600 57600
-#define CBR_115200 115200
-#define CBR_128000 128000
-#define CBR_256000 256000
-#define BACKUP_INVALID 0
-#define BACKUP_DATA 1
-#define BACKUP_EA_DATA 2
-#define BACKUP_SECURITY_DATA 3
-#define BACKUP_ALTERNATE_DATA 4
-#define BACKUP_LINK 5
-#define BACKUP_PROPERTY_DATA 6
-#define BACKUP_OBJECT_ID 7
-#define BACKUP_REPARSE_DATA 8
-#define BACKUP_SPARSE_BLOCK 9
-#define STREAM_NORMAL_ATTRIBUTE 0
-#define STREAM_MODIFIED_WHEN_READ 1
-#define STREAM_CONTAINS_SECURITY 2
-#define STREAM_CONTAINS_PROPERTIES 4
-#define STARTF_USESHOWWINDOW 1
-#define STARTF_USESIZE 2
-#define STARTF_USEPOSITION 4
-#define STARTF_USECOUNTCHARS 8
-#define STARTF_USEFILLATTRIBUTE 16
-#define STARTF_RUNFULLSCREEN 32
-#define STARTF_FORCEONFEEDBACK 64
-#define STARTF_FORCEOFFFEEDBACK 128
-#define STARTF_USESTDHANDLES 256
-#define STARTF_USEHOTKEY 512
-#define TC_NORMAL 0
-#define TC_HARDERR 1
-#define TC_GP_TRAP 2
-#define TC_SIGNAL 3
-#define AC_LINE_OFFLINE 0
-#define AC_LINE_ONLINE 1
-#define AC_LINE_BACKUP_POWER 2
-#define AC_LINE_UNKNOWN 255
-#define BATTERY_FLAG_HIGH 1
-#define BATTERY_FLAG_LOW 2
-#define BATTERY_FLAG_CRITICAL 4
-#define BATTERY_FLAG_CHARGING 8
-#define BATTERY_FLAG_NO_BATTERY 128
-#define BATTERY_FLAG_UNKNOWN 255
-#define BATTERY_PERCENTAGE_UNKNOWN 255
-#define BATTERY_LIFE_UNKNOWN 0xFFFFFFFF
-#define DDD_RAW_TARGET_PATH 1
-#define DDD_REMOVE_DEFINITION 2
-#define DDD_EXACT_MATCH_ON_REMOVE 4
-#define HINSTANCE_ERROR 32
-#define MS_CTS_ON 16
-#define MS_DSR_ON 32
-#define MS_RING_ON 64
-#define MS_RLSD_ON 128
-#define DTR_CONTROL_DISABLE 0
-#define DTR_CONTROL_ENABLE 1
-#define DTR_CONTROL_HANDSHAKE 2
-#define RTS_CONTROL_DISABLE 0
-#define RTS_CONTROL_ENABLE 1
-#define RTS_CONTROL_HANDSHAKE 2
-#define RTS_CONTROL_TOGGLE 3
-#define SECURITY_ANONYMOUS (SecurityAnonymous<<16)
-#define SECURITY_IDENTIFICATION (SecurityIdentification<<16)
-#define SECURITY_IMPERSONATION (SecurityImpersonation<<16)
-#define SECURITY_DELEGATION (SecurityDelegation<<16)
-#define SECURITY_CONTEXT_TRACKING 0x40000
-#define SECURITY_EFFECTIVE_ONLY 0x80000
-#define SECURITY_SQOS_PRESENT 0x100000
-#define SECURITY_VALID_SQOS_FLAGS 0x1F0000
-#define INVALID_FILE_SIZE 0xFFFFFFFF
-#define TLS_OUT_OF_INDEXES (DWORD)0xFFFFFFFF
-#define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 0x00000004
-#define GET_MODULE_HANDLE_EX_FLAG_PIN 0x00000001
-#define GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT 0x00000002
-#if (_WIN32_WINNT >= 0x0501)
-#define ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID 0x00000001
-#define ACTCTX_FLAG_LANGID_VALID 0x00000002
-#define ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID 0x00000004
-#define ACTCTX_FLAG_RESOURCE_NAME_VALID 0x00000008
-#define ACTCTX_FLAG_SET_PROCESS_DEFAULT 0x00000010
-#define ACTCTX_FLAG_APPLICATION_NAME_VALID 0x00000020
-#define ACTCTX_FLAG_HMODULE_VALID 0x00000080
-#define DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION 0x00000001
-#define FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX 0x00000001
-#define QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX 0x00000004
-#define QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE 0x00000008
-#define QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS 0x00000010
-#endif /* (_WIN32_WINNT >= 0x0501) */
-#if (_WIN32_WINNT >= 0x0500)
-#define REPLACEFILE_WRITE_THROUGH 0x00000001
-#define REPLACEFILE_IGNORE_MERGE_ERRORS 0x00000002
-#endif /* (_WIN32_WINNT >= 0x0500) */
-#define WRITE_WATCH_FLAG_RESET 1
-#if (_WIN32_WINNT >= 0x0601)
-#define PROCESS_DEP_ENABLE 1
-#define PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION 2
-#endif
-
-#ifndef RC_INVOKED
-typedef struct _FILETIME {
- DWORD dwLowDateTime;
- DWORD dwHighDateTime;
-} FILETIME,*PFILETIME,*LPFILETIME;
-typedef struct _BY_HANDLE_FILE_INFORMATION {
- DWORD dwFileAttributes;
- FILETIME ftCreationTime;
- FILETIME ftLastAccessTime;
- FILETIME ftLastWriteTime;
- DWORD dwVolumeSerialNumber;
- DWORD nFileSizeHigh;
- DWORD nFileSizeLow;
- DWORD nNumberOfLinks;
- DWORD nFileIndexHigh;
- DWORD nFileIndexLow;
-} BY_HANDLE_FILE_INFORMATION,*LPBY_HANDLE_FILE_INFORMATION;
-typedef struct _DCB {
- DWORD DCBlength;
- DWORD BaudRate;
- DWORD fBinary:1;
- DWORD fParity:1;
- DWORD fOutxCtsFlow:1;
- DWORD fOutxDsrFlow:1;
- DWORD fDtrControl:2;
- DWORD fDsrSensitivity:1;
- DWORD fTXContinueOnXoff:1;
- DWORD fOutX:1;
- DWORD fInX:1;
- DWORD fErrorChar:1;
- DWORD fNull:1;
- DWORD fRtsControl:2;
- DWORD fAbortOnError:1;
- DWORD fDummy2:17;
- WORD wReserved;
- WORD XonLim;
- WORD XoffLim;
- BYTE ByteSize;
- BYTE Parity;
- BYTE StopBits;
- char XonChar;
- char XoffChar;
- char ErrorChar;
- char EofChar;
- char EvtChar;
- WORD wReserved1;
-} DCB,*LPDCB;
-typedef struct _COMM_CONFIG {
- DWORD dwSize;
- WORD wVersion;
- WORD wReserved;
- DCB dcb;
- DWORD dwProviderSubType;
- DWORD dwProviderOffset;
- DWORD dwProviderSize;
- WCHAR wcProviderData[1];
-} COMMCONFIG,*LPCOMMCONFIG;
-typedef struct _COMMPROP {
- WORD wPacketLength;
- WORD wPacketVersion;
- DWORD dwServiceMask;
- DWORD dwReserved1;
- DWORD dwMaxTxQueue;
- DWORD dwMaxRxQueue;
- DWORD dwMaxBaud;
- DWORD dwProvSubType;
- DWORD dwProvCapabilities;
- DWORD dwSettableParams;
- DWORD dwSettableBaud;
- WORD wSettableData;
- WORD wSettableStopParity;
- DWORD dwCurrentTxQueue;
- DWORD dwCurrentRxQueue;
- DWORD dwProvSpec1;
- DWORD dwProvSpec2;
- WCHAR wcProvChar[1];
-} COMMPROP,*LPCOMMPROP;
-typedef struct _COMMTIMEOUTS {
- DWORD ReadIntervalTimeout;
- DWORD ReadTotalTimeoutMultiplier;
- DWORD ReadTotalTimeoutConstant;
- DWORD WriteTotalTimeoutMultiplier;
- DWORD WriteTotalTimeoutConstant;
-} COMMTIMEOUTS,*LPCOMMTIMEOUTS;
-typedef struct _COMSTAT {
- DWORD fCtsHold:1;
- DWORD fDsrHold:1;
- DWORD fRlsdHold:1;
- DWORD fXoffHold:1;
- DWORD fXoffSent:1;
- DWORD fEof:1;
- DWORD fTxim:1;
- DWORD fReserved:25;
- DWORD cbInQue;
- DWORD cbOutQue;
-} COMSTAT,*LPCOMSTAT;
-typedef DWORD (WINAPI *LPTHREAD_START_ROUTINE)(LPVOID);
-typedef struct _CREATE_PROCESS_DEBUG_INFO {
- HANDLE hFile;
- HANDLE hProcess;
- HANDLE hThread;
- LPVOID lpBaseOfImage;
- DWORD dwDebugInfoFileOffset;
- DWORD nDebugInfoSize;
- LPVOID lpThreadLocalBase;
- LPTHREAD_START_ROUTINE lpStartAddress;
- LPVOID lpImageName;
- WORD fUnicode;
-} CREATE_PROCESS_DEBUG_INFO,*LPCREATE_PROCESS_DEBUG_INFO;
-typedef struct _CREATE_THREAD_DEBUG_INFO {
- HANDLE hThread;
- LPVOID lpThreadLocalBase;
- LPTHREAD_START_ROUTINE lpStartAddress;
-} CREATE_THREAD_DEBUG_INFO,*LPCREATE_THREAD_DEBUG_INFO;
-typedef struct _EXCEPTION_DEBUG_INFO {
- EXCEPTION_RECORD ExceptionRecord;
- DWORD dwFirstChance;
-} EXCEPTION_DEBUG_INFO,*LPEXCEPTION_DEBUG_INFO;
-typedef struct _EXIT_THREAD_DEBUG_INFO {
- DWORD dwExitCode;
-} EXIT_THREAD_DEBUG_INFO,*LPEXIT_THREAD_DEBUG_INFO;
-typedef struct _EXIT_PROCESS_DEBUG_INFO {
- DWORD dwExitCode;
-} EXIT_PROCESS_DEBUG_INFO,*LPEXIT_PROCESS_DEBUG_INFO;
-typedef struct _LOAD_DLL_DEBUG_INFO {
- HANDLE hFile;
- LPVOID lpBaseOfDll;
- DWORD dwDebugInfoFileOffset;
- DWORD nDebugInfoSize;
- LPVOID lpImageName;
- WORD fUnicode;
-} LOAD_DLL_DEBUG_INFO,*LPLOAD_DLL_DEBUG_INFO;
-typedef struct _UNLOAD_DLL_DEBUG_INFO {
- LPVOID lpBaseOfDll;
-} UNLOAD_DLL_DEBUG_INFO,*LPUNLOAD_DLL_DEBUG_INFO;
-typedef struct _OUTPUT_DEBUG_STRING_INFO {
- LPSTR lpDebugStringData;
- WORD fUnicode;
- WORD nDebugStringLength;
-} OUTPUT_DEBUG_STRING_INFO,*LPOUTPUT_DEBUG_STRING_INFO;
-typedef struct _RIP_INFO {
- DWORD dwError;
- DWORD dwType;
-} RIP_INFO,*LPRIP_INFO;
-typedef struct _DEBUG_EVENT {
- DWORD dwDebugEventCode;
- DWORD dwProcessId;
- DWORD dwThreadId;
- union {
- EXCEPTION_DEBUG_INFO Exception;
- CREATE_THREAD_DEBUG_INFO CreateThread;
- CREATE_PROCESS_DEBUG_INFO CreateProcessInfo;
- EXIT_THREAD_DEBUG_INFO ExitThread;
- EXIT_PROCESS_DEBUG_INFO ExitProcess;
- LOAD_DLL_DEBUG_INFO LoadDll;
- UNLOAD_DLL_DEBUG_INFO UnloadDll;
- OUTPUT_DEBUG_STRING_INFO DebugString;
- RIP_INFO RipInfo;
- } u;
-} DEBUG_EVENT,*LPDEBUG_EVENT;
-typedef struct _OVERLAPPED {
- ULONG_PTR Internal;
- ULONG_PTR InternalHigh;
- DWORD Offset;
- DWORD OffsetHigh;
- HANDLE hEvent;
-} OVERLAPPED,*POVERLAPPED,*LPOVERLAPPED;
-typedef struct _STARTUPINFOA {
- DWORD cb;
- LPSTR lpReserved;
- LPSTR lpDesktop;
- LPSTR lpTitle;
- DWORD dwX;
- DWORD dwY;
- DWORD dwXSize;
- DWORD dwYSize;
- DWORD dwXCountChars;
- DWORD dwYCountChars;
- DWORD dwFillAttribute;
- DWORD dwFlags;
- WORD wShowWindow;
- WORD cbReserved2;
- PBYTE lpReserved2;
- HANDLE hStdInput;
- HANDLE hStdOutput;
- HANDLE hStdError;
-} STARTUPINFOA,*LPSTARTUPINFOA;
-typedef struct _STARTUPINFOW {
- DWORD cb;
- LPWSTR lpReserved;
- LPWSTR lpDesktop;
- LPWSTR lpTitle;
- DWORD dwX;
- DWORD dwY;
- DWORD dwXSize;
- DWORD dwYSize;
- DWORD dwXCountChars;
- DWORD dwYCountChars;
- DWORD dwFillAttribute;
- DWORD dwFlags;
- WORD wShowWindow;
- WORD cbReserved2;
- PBYTE lpReserved2;
- HANDLE hStdInput;
- HANDLE hStdOutput;
- HANDLE hStdError;
-} STARTUPINFOW,*LPSTARTUPINFOW;
-typedef struct _PROCESS_INFORMATION {
- HANDLE hProcess;
- HANDLE hThread;
- DWORD dwProcessId;
- DWORD dwThreadId;
-} PROCESS_INFORMATION,*PPROCESS_INFORMATION,*LPPROCESS_INFORMATION;
-typedef struct _CRITICAL_SECTION_DEBUG {
- WORD Type;
- WORD CreatorBackTraceIndex;
- struct _CRITICAL_SECTION *CriticalSection;
- LIST_ENTRY ProcessLocksList;
- DWORD EntryCount;
- DWORD ContentionCount;
- DWORD Spare [2];
-} CRITICAL_SECTION_DEBUG,*PCRITICAL_SECTION_DEBUG;
-typedef struct _CRITICAL_SECTION {
- PCRITICAL_SECTION_DEBUG DebugInfo;
- LONG LockCount;
- LONG RecursionCount;
- HANDLE OwningThread;
- HANDLE LockSemaphore;
- DWORD SpinCount;
-} CRITICAL_SECTION,*PCRITICAL_SECTION,*LPCRITICAL_SECTION;
-typedef struct _SYSTEMTIME {
- WORD wYear;
- WORD wMonth;
- WORD wDayOfWeek;
- WORD wDay;
- WORD wHour;
- WORD wMinute;
- WORD wSecond;
- WORD wMilliseconds;
-} SYSTEMTIME,*LPSYSTEMTIME;
-typedef struct _WIN32_FILE_ATTRIBUTE_DATA {
- DWORD dwFileAttributes;
- FILETIME ftCreationTime;
- FILETIME ftLastAccessTime;
- FILETIME ftLastWriteTime;
- DWORD nFileSizeHigh;
- DWORD nFileSizeLow;
-} WIN32_FILE_ATTRIBUTE_DATA,*LPWIN32_FILE_ATTRIBUTE_DATA;
-typedef struct _WIN32_FIND_DATAA {
- DWORD dwFileAttributes;
- FILETIME ftCreationTime;
- FILETIME ftLastAccessTime;
- FILETIME ftLastWriteTime;
- DWORD nFileSizeHigh;
- DWORD nFileSizeLow;
-#ifdef _WIN32_WCE
- DWORD dwOID;
-#else
- DWORD dwReserved0;
- DWORD dwReserved1;
-#endif
- CHAR cFileName[MAX_PATH];
-#ifndef _WIN32_WCE
- CHAR cAlternateFileName[14];
-#endif
-} WIN32_FIND_DATAA,*PWIN32_FIND_DATAA,*LPWIN32_FIND_DATAA;
-typedef struct _WIN32_FIND_DATAW {
- DWORD dwFileAttributes;
- FILETIME ftCreationTime;
- FILETIME ftLastAccessTime;
- FILETIME ftLastWriteTime;
- DWORD nFileSizeHigh;
- DWORD nFileSizeLow;
-#ifdef _WIN32_WCE
- DWORD dwOID;
-#else
- DWORD dwReserved0;
- DWORD dwReserved1;
-#endif
- WCHAR cFileName[MAX_PATH];
-#ifndef _WIN32_WCE
- WCHAR cAlternateFileName[14];
-#endif
-} WIN32_FIND_DATAW,*PWIN32_FIND_DATAW,*LPWIN32_FIND_DATAW;
-typedef struct _WIN32_STREAM_ID {
- DWORD dwStreamId;
- DWORD dwStreamAttributes;
- LARGE_INTEGER Size;
- DWORD dwStreamNameSize;
- WCHAR cStreamName[ANYSIZE_ARRAY];
-} WIN32_STREAM_ID, *LPWIN32_STREAM_ID;
-typedef enum _FINDEX_INFO_LEVELS {
- FindExInfoStandard,
- FindExInfoMaxInfoLevel
-} FINDEX_INFO_LEVELS;
-typedef enum _FINDEX_SEARCH_OPS {
- FindExSearchNameMatch,
- FindExSearchLimitToDirectories,
- FindExSearchLimitToDevices,
- FindExSearchMaxSearchOp
-} FINDEX_SEARCH_OPS;
-typedef enum _ACL_INFORMATION_CLASS {
- AclRevisionInformation=1,
- AclSizeInformation
-} ACL_INFORMATION_CLASS;
-typedef struct tagHW_PROFILE_INFOA {
- DWORD dwDockInfo;
- CHAR szHwProfileGuid[HW_PROFILE_GUIDLEN];
- CHAR szHwProfileName[MAX_PROFILE_LEN];
-} HW_PROFILE_INFOA,*LPHW_PROFILE_INFOA;
-typedef struct tagHW_PROFILE_INFOW {
- DWORD dwDockInfo;
- WCHAR szHwProfileGuid[HW_PROFILE_GUIDLEN];
- WCHAR szHwProfileName[MAX_PROFILE_LEN];
-} HW_PROFILE_INFOW,*LPHW_PROFILE_INFOW;
-typedef enum _GET_FILEEX_INFO_LEVELS {
- GetFileExInfoStandard,
- GetFileExMaxInfoLevel
-} GET_FILEEX_INFO_LEVELS;
-typedef struct _SYSTEM_INFO {
- _ANONYMOUS_UNION union {
- DWORD dwOemId;
- _ANONYMOUS_STRUCT struct {
- WORD wProcessorArchitecture;
- WORD wReserved;
- } DUMMYSTRUCTNAME;
- } DUMMYUNIONNAME;
- DWORD dwPageSize;
- PVOID lpMinimumApplicationAddress;
- PVOID lpMaximumApplicationAddress;
- DWORD dwActiveProcessorMask;
- DWORD dwNumberOfProcessors;
- DWORD dwProcessorType;
- DWORD dwAllocationGranularity;
- WORD wProcessorLevel;
- WORD wProcessorRevision;
-} SYSTEM_INFO,*LPSYSTEM_INFO;
-typedef struct _SYSTEM_POWER_STATUS {
- BYTE ACLineStatus;
- BYTE BatteryFlag;
- BYTE BatteryLifePercent;
- BYTE Reserved1;
- DWORD BatteryLifeTime;
- DWORD BatteryFullLifeTime;
-} SYSTEM_POWER_STATUS,*LPSYSTEM_POWER_STATUS;
-typedef struct _TIME_ZONE_INFORMATION {
- LONG Bias;
- WCHAR StandardName[32];
- SYSTEMTIME StandardDate;
- LONG StandardBias;
- WCHAR DaylightName[32];
- SYSTEMTIME DaylightDate;
- LONG DaylightBias;
-} TIME_ZONE_INFORMATION,*LPTIME_ZONE_INFORMATION;
-typedef struct _MEMORYSTATUS {
- DWORD dwLength;
- DWORD dwMemoryLoad;
- DWORD dwTotalPhys;
- DWORD dwAvailPhys;
- DWORD dwTotalPageFile;
- DWORD dwAvailPageFile;
- DWORD dwTotalVirtual;
- DWORD dwAvailVirtual;
-} MEMORYSTATUS,*LPMEMORYSTATUS;
-#if (_WIN32_WINNT >= 0x0500)
-typedef struct _MEMORYSTATUSEX {
- DWORD dwLength;
- DWORD dwMemoryLoad;
- DWORDLONG ullTotalPhys;
- DWORDLONG ullAvailPhys;
- DWORDLONG ullTotalPageFile;
- DWORDLONG ullAvailPageFile;
- DWORDLONG ullTotalVirtual;
- DWORDLONG ullAvailVirtual;
- DWORDLONG ullAvailExtendedVirtual;
-} MEMORYSTATUSEX,*LPMEMORYSTATUSEX;
-#endif
-typedef struct _LDT_ENTRY {
- WORD LimitLow;
- WORD BaseLow;
- union {
- struct {
- BYTE BaseMid;
- BYTE Flags1;
- BYTE Flags2;
- BYTE BaseHi;
- } Bytes;
- struct {
- DWORD BaseMid:8;
- DWORD Type:5;
- DWORD Dpl:2;
- DWORD Pres:1;
- DWORD LimitHi:4;
- DWORD Sys:1;
- DWORD Reserved_0:1;
- DWORD Default_Big:1;
- DWORD Granularity:1;
- DWORD BaseHi:8;
- } Bits;
- } HighWord;
-} LDT_ENTRY,*PLDT_ENTRY,*LPLDT_ENTRY;
-typedef struct _PROCESS_HEAP_ENTRY {
- PVOID lpData;
- DWORD cbData;
- BYTE cbOverhead;
- BYTE iRegionIndex;
- WORD wFlags;
- _ANONYMOUS_UNION union {
- struct {
- HANDLE hMem;
- DWORD dwReserved[3];
- } Block;
- struct {
- DWORD dwCommittedSize;
- DWORD dwUnCommittedSize;
- LPVOID lpFirstBlock;
- LPVOID lpLastBlock;
- } Region;
- } DUMMYUNIONNAME;
-} PROCESS_HEAP_ENTRY,*LPPROCESS_HEAP_ENTRY;
-typedef struct _OFSTRUCT {
- BYTE cBytes;
- BYTE fFixedDisk;
- WORD nErrCode;
- WORD Reserved1;
- WORD Reserved2;
- CHAR szPathName[OFS_MAXPATHNAME];
-} OFSTRUCT,*LPOFSTRUCT,*POFSTRUCT;
-typedef struct _WIN_CERTIFICATE {
- DWORD dwLength;
- WORD wRevision;
- WORD wCertificateType;
- BYTE bCertificate[1];
-} WIN_CERTIFICATE, *LPWIN_CERTIFICATE;
-#if (_WIN32_WINNT >= 0x0501)
-typedef struct tagACTCTXA {
- ULONG cbSize;
- DWORD dwFlags;
- LPCSTR lpSource;
- USHORT wProcessorArchitecture;
- LANGID wLangId;
- LPCSTR lpAssemblyDirectory;
- LPCSTR lpResourceName;
- LPCSTR lpApplicationName;
- HMODULE hModule;
-} ACTCTXA,*PACTCTXA;
-typedef const ACTCTXA *PCACTCTXA;
-typedef struct tagACTCTXW {
- ULONG cbSize;
- DWORD dwFlags;
- LPCWSTR lpSource;
- USHORT wProcessorArchitecture;
- LANGID wLangId;
- LPCWSTR lpAssemblyDirectory;
- LPCWSTR lpResourceName;
- LPCWSTR lpApplicationName;
- HMODULE hModule;
-} ACTCTXW,*PACTCTXW;
-typedef const ACTCTXW *PCACTCTXW;
-typedef struct tagACTCTX_SECTION_KEYED_DATA {
- ULONG cbSize;
- ULONG ulDataFormatVersion;
- PVOID lpData;
- ULONG ulLength;
- PVOID lpSectionGlobalData;
- ULONG ulSectionGlobalDataLength;
- PVOID lpSectionBase;
- ULONG ulSectionTotalLength;
- HANDLE hActCtx;
- HANDLE ulAssemblyRosterIndex;
-} ACTCTX_SECTION_KEYED_DATA,*PACTCTX_SECTION_KEYED_DATA;
-typedef const ACTCTX_SECTION_KEYED_DATA *PCACTCTX_SECTION_KEYED_DATA;
-typedef enum {
- LowMemoryResourceNotification ,
- HighMemoryResourceNotification
-} MEMORY_RESOURCE_NOTIFICATION_TYPE;
-#endif
-#if (_WIN32_WINNT >= 0x0500)
-typedef enum _COMPUTER_NAME_FORMAT {
- ComputerNameNetBIOS,
- ComputerNameDnsHostname,
- ComputerNameDnsDomain,
- ComputerNameDnsFullyQualified,
- ComputerNamePhysicalNetBIOS,
- ComputerNamePhysicalDnsHostname,
- ComputerNamePhysicalDnsDomain,
- ComputerNamePhysicalDnsFullyQualified,
- ComputerNameMax
-} COMPUTER_NAME_FORMAT;
-#endif
-#if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410)
-typedef DWORD EXECUTION_STATE;
-#endif
-#if (_WIN32_WINNT >= 0x0601)
-typedef enum _DEP_SYSTEM_POLICY_TYPE {
- AlwaysOn,
- AlwaysOff,
- OptIn,
- OptOut
-} DEP_SYSTEM_POLICY_TYPE;
-#endif
-
-typedef DWORD(WINAPI *LPPROGRESS_ROUTINE)(LARGE_INTEGER,LARGE_INTEGER,LARGE_INTEGER,LARGE_INTEGER,DWORD,DWORD,HANDLE,HANDLE,LPVOID);
-typedef void(WINAPI *LPFIBER_START_ROUTINE)(PVOID);
-typedef BOOL(CALLBACK *ENUMRESLANGPROCA)(HMODULE,LPCSTR,LPCSTR,WORD,LONG);
-typedef BOOL(CALLBACK *ENUMRESLANGPROCW)(HMODULE,LPCWSTR,LPCWSTR,WORD,LONG);
-#ifdef UNICODE
-#define ENUMRESLANGPROC ENUMRESLANGPROCW
-#else
-#define ENUMRESLANGPROC ENUMRESLANGPROCA
-#endif
-typedef BOOL(CALLBACK *ENUMRESNAMEPROCA)(HMODULE,LPCSTR,LPSTR,LONG);
-typedef BOOL(CALLBACK *ENUMRESNAMEPROCW)(HMODULE,LPCWSTR,LPWSTR,LONG);
-#ifdef UNICODE
-#define ENUMRESNAMEPROC ENUMRESNAMEPROCW
-#else
-#define ENUMRESNAMEPROC ENUMRESNAMEPROCA
-#endif
-typedef BOOL(CALLBACK *ENUMRESTYPEPROCA)(HMODULE,LPSTR,LONG);
-typedef BOOL(CALLBACK *ENUMRESTYPEPROCW)(HMODULE,LPWSTR,LONG);
-#ifdef UNICODE
-#define ENUMRESTYPEPROC ENUMRESTYPEPROCW
-#else
-#define ENUMRESTYPEPROC ENUMRESTYPEPROCA
-#endif
-typedef void(CALLBACK *LPOVERLAPPED_COMPLETION_ROUTINE)(DWORD,DWORD,LPOVERLAPPED);
-typedef LONG(CALLBACK *PTOP_LEVEL_EXCEPTION_FILTER)(LPEXCEPTION_POINTERS);
-typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER;
-typedef void(APIENTRY *PAPCFUNC)(ULONG_PTR);
-typedef void(CALLBACK *PTIMERAPCROUTINE)(PVOID,DWORD,DWORD);
-#if (_WIN32_WINNT >= 0x0500)
-typedef void(CALLBACK *WAITORTIMERCALLBACK)(PVOID,BOOLEAN);
-#endif
-#define MAKEINTATOM(i) (LPTSTR)((DWORD)((WORD)(i)))
-/* Functions */
-#ifndef UNDER_CE
-int APIENTRY WinMain(HINSTANCE,HINSTANCE,LPSTR,int);
-#else
-int APIENTRY WinMain(HINSTANCE,HINSTANCE,LPWSTR,int);
-#endif
-int APIENTRY wWinMain(HINSTANCE,HINSTANCE,LPWSTR,int);
-WINBASEAPI long WINAPI _hread(HFILE,LPVOID,long);
-WINBASEAPI long WINAPI _hwrite(HFILE,LPCSTR,long);
-WINBASEAPI HFILE WINAPI _lclose(HFILE);
-WINBASEAPI HFILE WINAPI _lcreat(LPCSTR,int);
-WINBASEAPI LONG WINAPI _llseek(HFILE,LONG,int);
-WINBASEAPI HFILE WINAPI _lopen(LPCSTR,int);
-WINBASEAPI UINT WINAPI _lread(HFILE,LPVOID,UINT);
-WINBASEAPI UINT WINAPI _lwrite(HFILE,LPCSTR,UINT);
-#define AbnormalTermination() FALSE
-WINBASEAPI BOOL WINAPI AccessCheck(PSECURITY_DESCRIPTOR,HANDLE,DWORD,PGENERIC_MAPPING,PPRIVILEGE_SET,PDWORD,PDWORD,PBOOL);
-WINBASEAPI BOOL WINAPI AccessCheckAndAuditAlarmA(LPCSTR,LPVOID,LPSTR,LPSTR,PSECURITY_DESCRIPTOR,DWORD,PGENERIC_MAPPING,BOOL,PDWORD,PBOOL,PBOOL);
-WINBASEAPI BOOL WINAPI AccessCheckAndAuditAlarmW(LPCWSTR,LPVOID,LPWSTR,LPWSTR,PSECURITY_DESCRIPTOR,DWORD,PGENERIC_MAPPING,BOOL,PDWORD,PBOOL,PBOOL);
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI BOOL WINAPI ActivateActCtx(HANDLE,ULONG_PTR*);
-#endif
-WINBASEAPI BOOL WINAPI AddAccessAllowedAce(PACL,DWORD,DWORD,PSID);
-WINBASEAPI BOOL WINAPI AddAccessDeniedAce(PACL,DWORD,DWORD,PSID);
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI BOOL WINAPI AddAccessAllowedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
-WINBASEAPI BOOL WINAPI AddAccessDeniedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
-#endif
-WINBASEAPI BOOL WINAPI AddAce(PACL,DWORD,DWORD,PVOID,DWORD);
-WINBASEAPI ATOM WINAPI AddAtomA(LPCSTR);
-WINBASEAPI ATOM WINAPI AddAtomW(LPCWSTR);
-WINBASEAPI BOOL WINAPI AddAuditAccessAce(PACL,DWORD,DWORD,PSID,BOOL,BOOL);
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI void WINAPI AddRefActCtx(HANDLE);
-#endif
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI PVOID WINAPI AddVectoredExceptionHandler(ULONG,PVECTORED_EXCEPTION_HANDLER);
-#endif
-WINBASEAPI BOOL WINAPI AdjustTokenGroups(HANDLE,BOOL,PTOKEN_GROUPS,DWORD,PTOKEN_GROUPS,PDWORD);
-WINBASEAPI BOOL WINAPI AdjustTokenPrivileges(HANDLE,BOOL,PTOKEN_PRIVILEGES,DWORD,PTOKEN_PRIVILEGES,PDWORD);
-WINBASEAPI BOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY,BYTE,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,PSID*);
-WINBASEAPI BOOL WINAPI AllocateLocallyUniqueId(PLUID);
-WINBASEAPI BOOL WINAPI AreAllAccessesGranted(DWORD,DWORD);
-WINBASEAPI BOOL WINAPI AreAnyAccessesGranted(DWORD,DWORD);
-WINBASEAPI BOOL WINAPI AreFileApisANSI(void);
-WINBASEAPI BOOL WINAPI BackupEventLogA(HANDLE,LPCSTR);
-WINBASEAPI BOOL WINAPI BackupEventLogW(HANDLE,LPCWSTR);
-WINBASEAPI BOOL WINAPI BackupRead(HANDLE,LPBYTE,DWORD,LPDWORD,BOOL,BOOL,LPVOID*);
-WINBASEAPI BOOL WINAPI BackupSeek(HANDLE,DWORD,DWORD,LPDWORD,LPDWORD,LPVOID*);
-WINBASEAPI BOOL WINAPI BackupWrite(HANDLE,LPBYTE,DWORD,LPDWORD,BOOL,BOOL,LPVOID*);
-WINBASEAPI BOOL WINAPI Beep(DWORD,DWORD);
-WINBASEAPI HANDLE WINAPI BeginUpdateResourceA(LPCSTR,BOOL);
-WINBASEAPI HANDLE WINAPI BeginUpdateResourceW(LPCWSTR,BOOL);
-WINBASEAPI BOOL WINAPI BuildCommDCBA(LPCSTR,LPDCB);
-WINBASEAPI BOOL WINAPI BuildCommDCBW(LPCWSTR,LPDCB);
-WINBASEAPI BOOL WINAPI BuildCommDCBAndTimeoutsA(LPCSTR,LPDCB,LPCOMMTIMEOUTS);
-WINBASEAPI BOOL WINAPI BuildCommDCBAndTimeoutsW(LPCWSTR,LPDCB,LPCOMMTIMEOUTS);
-WINBASEAPI BOOL WINAPI CallNamedPipeA(LPCSTR,PVOID,DWORD,PVOID,DWORD,PDWORD,DWORD);
-WINBASEAPI BOOL WINAPI CallNamedPipeW(LPCWSTR,PVOID,DWORD,PVOID,DWORD,PDWORD,DWORD);
-WINBASEAPI BOOL WINAPI CancelDeviceWakeupRequest(HANDLE);
-WINBASEAPI BOOL WINAPI CancelIo(HANDLE);
-WINBASEAPI BOOL WINAPI CancelWaitableTimer(HANDLE);
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI BOOL WINAPI ChangeTimerQueueTimer(HANDLE,HANDLE,ULONG,ULONG);
-#endif
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI BOOL WINAPI CheckNameLegalDOS8Dot3A(LPCSTR,LPSTR,DWORD,PBOOL,PBOOL);
-WINBASEAPI BOOL WINAPI CheckNameLegalDOS8Dot3W(LPCWSTR,LPSTR,DWORD,PBOOL,PBOOL);
-WINBASEAPI BOOL WINAPI CheckRemoteDebuggerPresent(HANDLE,PBOOL);
-#endif
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI BOOL WINAPI CheckTokenMembership(HANDLE,PSID,PBOOL);
-#endif
-WINBASEAPI BOOL WINAPI ClearCommBreak(HANDLE);
-WINBASEAPI BOOL WINAPI ClearCommError(HANDLE,PDWORD,LPCOMSTAT);
-WINBASEAPI BOOL WINAPI ClearEventLogA(HANDLE,LPCSTR);
-WINBASEAPI BOOL WINAPI ClearEventLogW(HANDLE,LPCWSTR);
-WINBASEAPI BOOL WINAPI CloseEventLog(HANDLE);
-WINBASEAPI BOOL WINAPI CloseHandle(HANDLE);
-WINBASEAPI BOOL WINAPI CommConfigDialogA(LPCSTR,HWND,LPCOMMCONFIG);
-WINBASEAPI BOOL WINAPI CommConfigDialogW(LPCWSTR,HWND,LPCOMMCONFIG);
-WINBASEAPI LONG WINAPI CompareFileTime(CONST FILETIME*,CONST FILETIME*);
-WINBASEAPI BOOL WINAPI ConnectNamedPipe(HANDLE,LPOVERLAPPED);
-WINBASEAPI BOOL WINAPI ContinueDebugEvent(DWORD,DWORD,DWORD);
-#if (_WIN32_WINNT >= 0x0400)
-WINBASEAPI BOOL WINAPI ConvertFiberToThread(void);
-#endif
-WINBASEAPI PVOID WINAPI ConvertThreadToFiber(PVOID);
-WINBASEAPI BOOL WINAPI CopyFileA(LPCSTR,LPCSTR,BOOL);
-WINBASEAPI BOOL WINAPI CopyFileW(LPCWSTR,LPCWSTR,BOOL);
-WINBASEAPI BOOL WINAPI CopyFileExA(LPCSTR,LPCSTR,LPPROGRESS_ROUTINE,LPVOID,LPBOOL,DWORD);
-WINBASEAPI BOOL WINAPI CopyFileExW(LPCWSTR,LPCWSTR,LPPROGRESS_ROUTINE,LPVOID,LPBOOL,DWORD);
-#define RtlMoveMemory memmove
-#define RtlCopyMemory memcpy
-#define RtlFillMemory(d,l,f) memset((d), (f), (l))
-#define RtlZeroMemory(d,l) RtlFillMemory((d),(l),0)
-#define MoveMemory RtlMoveMemory
-#define CopyMemory RtlCopyMemory
-#define FillMemory RtlFillMemory
-#define ZeroMemory RtlZeroMemory
-WINBASEAPI BOOL WINAPI CopySid(DWORD,PSID,PSID);
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI HANDLE WINAPI CreateActCtxA(PCACTCTXA);
-WINBASEAPI HANDLE WINAPI CreateActCtxW(PCACTCTXW);
-#endif
-WINBASEAPI BOOL WINAPI CreateDirectoryA(LPCSTR,LPSECURITY_ATTRIBUTES);
-WINBASEAPI BOOL WINAPI CreateDirectoryW(LPCWSTR,LPSECURITY_ATTRIBUTES);
-WINBASEAPI BOOL WINAPI CreateDirectoryExA(LPCSTR,LPCSTR,LPSECURITY_ATTRIBUTES);
-WINBASEAPI BOOL WINAPI CreateDirectoryExW(LPCWSTR,LPCWSTR,LPSECURITY_ATTRIBUTES);
-WINBASEAPI HANDLE WINAPI CreateEventA(LPSECURITY_ATTRIBUTES,BOOL,BOOL,LPCSTR);
-WINBASEAPI HANDLE WINAPI CreateEventW(LPSECURITY_ATTRIBUTES,BOOL,BOOL,LPCWSTR);
-WINBASEAPI LPVOID WINAPI CreateFiber(SIZE_T,LPFIBER_START_ROUTINE,LPVOID);
-#if (_WIN32_WINNT >= 0x0400)
-WINBASEAPI LPVOID WINAPI CreateFiberEx(SIZE_T,SIZE_T,DWORD,LPFIBER_START_ROUTINE,LPVOID);
-#endif
-WINBASEAPI HANDLE WINAPI CreateFileA(LPCSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES,DWORD,DWORD,HANDLE);
-WINBASEAPI HANDLE WINAPI CreateFileW(LPCWSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES,DWORD,DWORD,HANDLE);
-WINBASEAPI HANDLE WINAPI CreateFileMappingA(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,DWORD,DWORD,LPCSTR);
-WINBASEAPI HANDLE WINAPI CreateFileMappingW(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,DWORD,DWORD,LPCWSTR);
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI BOOL WINAPI CreateHardLinkA(LPCSTR,LPCSTR,LPSECURITY_ATTRIBUTES);
-WINBASEAPI BOOL WINAPI CreateHardLinkW(LPCWSTR,LPCWSTR,LPSECURITY_ATTRIBUTES);
-#endif
-WINBASEAPI HANDLE WINAPI CreateIoCompletionPort(HANDLE,HANDLE,ULONG_PTR,DWORD);
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI HANDLE WINAPI CreateJobObjectA(LPSECURITY_ATTRIBUTES,LPCSTR);
-WINBASEAPI HANDLE WINAPI CreateJobObjectW(LPSECURITY_ATTRIBUTES,LPCWSTR);
-WINBASEAPI BOOL WINAPI TerminateJobObject(HANDLE,UINT);
-WINBASEAPI BOOL WINAPI AssignProcessToJobObject(HANDLE,HANDLE);
-WINBASEAPI BOOL WINAPI SetInformationJobObject(HANDLE, JOBOBJECTINFOCLASS, LPVOID, DWORD);
-WINBASEAPI BOOL WINAPI QueryInformationJobObject(HANDLE, JOBOBJECTINFOCLASS, LPVOID, DWORD, LPDWORD);
-#endif
-WINBASEAPI HANDLE WINAPI CreateMailslotA(LPCSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
-WINBASEAPI HANDLE WINAPI CreateMailslotW(LPCWSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI HANDLE WINAPI CreateMemoryResourceNotification(MEMORY_RESOURCE_NOTIFICATION_TYPE);
-#endif
-WINBASEAPI HANDLE WINAPI CreateMutexA(LPSECURITY_ATTRIBUTES,BOOL,LPCSTR);
-WINBASEAPI HANDLE WINAPI CreateMutexW(LPSECURITY_ATTRIBUTES,BOOL,LPCWSTR);
-WINBASEAPI HANDLE WINAPI CreateNamedPipeA(LPCSTR,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
-WINBASEAPI HANDLE WINAPI CreateNamedPipeW(LPCWSTR,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
-WINBASEAPI BOOL WINAPI CreatePipe(PHANDLE,PHANDLE,LPSECURITY_ATTRIBUTES,DWORD);
-WINBASEAPI BOOL WINAPI CreatePrivateObjectSecurity(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR*,BOOL,HANDLE,PGENERIC_MAPPING);
-WINBASEAPI BOOL WINAPI CreateProcessA(LPCSTR,LPSTR,LPSECURITY_ATTRIBUTES,LPSECURITY_ATTRIBUTES,BOOL,DWORD,PVOID,LPCSTR,LPSTARTUPINFOA,LPPROCESS_INFORMATION);
-WINBASEAPI BOOL WINAPI CreateProcessW(LPCWSTR,LPWSTR,LPSECURITY_ATTRIBUTES,LPSECURITY_ATTRIBUTES,BOOL,DWORD,PVOID,LPCWSTR,LPSTARTUPINFOW,LPPROCESS_INFORMATION);
-WINBASEAPI BOOL WINAPI CreateProcessAsUserA(HANDLE,LPCSTR,LPSTR,LPSECURITY_ATTRIBUTES,LPSECURITY_ATTRIBUTES,BOOL,DWORD,PVOID,LPCSTR,LPSTARTUPINFOA,LPPROCESS_INFORMATION);
-WINBASEAPI BOOL WINAPI CreateProcessAsUserW(HANDLE,LPCWSTR,LPWSTR,LPSECURITY_ATTRIBUTES,LPSECURITY_ATTRIBUTES,BOOL,DWORD,PVOID,LPCWSTR,LPSTARTUPINFOW,LPPROCESS_INFORMATION);
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI BOOL WINAPI CreateProcessWithLogonW (LPCWSTR,LPCWSTR,LPCWSTR,DWORD,
- LPCWSTR,LPWSTR,DWORD,LPVOID,
- LPCWSTR,LPSTARTUPINFOW,
- LPPROCESS_INFORMATION);
-#define LOGON_WITH_PROFILE 0x00000001
-#define LOGON_NETCREDENTIALS_ONLY 0x00000002
-#endif
-WINBASEAPI HANDLE WINAPI CreateRemoteThread(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD);
-WINBASEAPI HANDLE WINAPI CreateSemaphoreA(LPSECURITY_ATTRIBUTES,LONG,LONG,LPCSTR);
-WINBASEAPI HANDLE WINAPI CreateSemaphoreW(LPSECURITY_ATTRIBUTES,LONG,LONG,LPCWSTR);
-WINBASEAPI DWORD WINAPI CreateTapePartition(HANDLE,DWORD,DWORD,DWORD);
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI HANDLE WINAPI CreateTimerQueue(void);
-WINBASEAPI BOOL WINAPI CreateTimerQueueTimer(PHANDLE,HANDLE,WAITORTIMERCALLBACK,PVOID,DWORD,DWORD,ULONG);
-#endif
-WINBASEAPI HANDLE WINAPI CreateThread(LPSECURITY_ATTRIBUTES,DWORD,LPTHREAD_START_ROUTINE,PVOID,DWORD,PDWORD);
-WINBASEAPI HANDLE WINAPI CreateWaitableTimerA(LPSECURITY_ATTRIBUTES,BOOL,LPCSTR);
-WINBASEAPI HANDLE WINAPI CreateWaitableTimerW(LPSECURITY_ATTRIBUTES,BOOL,LPCWSTR);
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI BOOL WINAPI DeactivateActCtx(DWORD,ULONG_PTR);
-#endif
-WINBASEAPI BOOL WINAPI DebugActiveProcess(DWORD);
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI BOOL WINAPI DebugActiveProcessStop(DWORD);
-#endif
-WINBASEAPI void WINAPI DebugBreak(void);
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI BOOL WINAPI DebugBreakProcess(HANDLE);
-WINBASEAPI BOOL WINAPI DebugSetProcessKillOnExit(BOOL);
-#endif
-WINBASEAPI BOOL WINAPI DefineDosDeviceA(DWORD,LPCSTR,LPCSTR);
-WINBASEAPI BOOL WINAPI DefineDosDeviceW(DWORD,LPCWSTR,LPCWSTR);
-#define DefineHandleTable(w) ((w),TRUE)
-WINBASEAPI BOOL WINAPI DeleteAce(PACL,DWORD);
-WINBASEAPI ATOM WINAPI DeleteAtom(ATOM);
-WINBASEAPI void WINAPI DeleteCriticalSection(PCRITICAL_SECTION);
-WINBASEAPI void WINAPI DeleteFiber(PVOID);
-WINBASEAPI BOOL WINAPI DeleteFileA(LPCSTR);
-WINBASEAPI BOOL WINAPI DeleteFileW(LPCWSTR);
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI BOOL WINAPI DeleteTimerQueue(HANDLE);
-WINBASEAPI BOOL WINAPI DeleteTimerQueueEx(HANDLE,HANDLE);
-WINBASEAPI BOOL WINAPI DeleteTimerQueueTimer(HANDLE,HANDLE,HANDLE);
-WINBASEAPI BOOL WINAPI DeleteVolumeMountPointA(LPCSTR);
-WINBASEAPI BOOL WINAPI DeleteVolumeMountPointW(LPCWSTR);
-#endif
-WINBASEAPI BOOL WINAPI DeregisterEventSource(HANDLE);
-WINBASEAPI BOOL WINAPI DestroyPrivateObjectSecurity(PSECURITY_DESCRIPTOR*);
-WINBASEAPI BOOL WINAPI DeviceIoControl(HANDLE,DWORD,PVOID,DWORD,PVOID,DWORD,PDWORD,POVERLAPPED);
-WINBASEAPI BOOL WINAPI DisableThreadLibraryCalls(HMODULE);
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI BOOL WINAPI DnsHostnameToComputerNameA(LPCSTR,LPSTR,LPDWORD);
-WINBASEAPI BOOL WINAPI DnsHostnameToComputerNameW(LPCWSTR,LPWSTR,LPDWORD);
-#endif
-WINBASEAPI BOOL WINAPI DisconnectNamedPipe(HANDLE);
-WINBASEAPI BOOL WINAPI DosDateTimeToFileTime(WORD,WORD,LPFILETIME);
-WINBASEAPI BOOL WINAPI DuplicateHandle(HANDLE,HANDLE,HANDLE,PHANDLE,DWORD,BOOL,DWORD);
-WINBASEAPI BOOL WINAPI DuplicateToken(HANDLE,SECURITY_IMPERSONATION_LEVEL,PHANDLE);
-WINBASEAPI BOOL WINAPI DuplicateTokenEx(HANDLE,DWORD,LPSECURITY_ATTRIBUTES,SECURITY_IMPERSONATION_LEVEL,TOKEN_TYPE,PHANDLE);
-WINBASEAPI BOOL WINAPI EncryptFileA(LPCSTR);
-WINBASEAPI BOOL WINAPI EncryptFileW(LPCWSTR);
-WINBASEAPI BOOL WINAPI EndUpdateResourceA(HANDLE,BOOL);
-WINBASEAPI BOOL WINAPI EndUpdateResourceW(HANDLE,BOOL);
-WINBASEAPI void WINAPI EnterCriticalSection(LPCRITICAL_SECTION);
-WINBASEAPI BOOL WINAPI EnumResourceLanguagesA(HMODULE,LPCSTR,LPCSTR,ENUMRESLANGPROC,LONG_PTR);
-WINBASEAPI BOOL WINAPI EnumResourceLanguagesW(HMODULE,LPCWSTR,LPCWSTR,ENUMRESLANGPROC,LONG_PTR);
-WINBASEAPI BOOL WINAPI EnumResourceNamesA(HMODULE,LPCSTR,ENUMRESNAMEPROC,LONG_PTR);
-WINBASEAPI BOOL WINAPI EnumResourceNamesW(HMODULE,LPCWSTR,ENUMRESNAMEPROC,LONG_PTR);
-WINBASEAPI BOOL WINAPI EnumResourceTypesA(HMODULE,ENUMRESTYPEPROC,LONG_PTR);
-WINBASEAPI BOOL WINAPI EnumResourceTypesW(HMODULE,ENUMRESTYPEPROC,LONG_PTR);
-WINBASEAPI BOOL WINAPI EqualPrefixSid(PSID,PSID);
-WINBASEAPI BOOL WINAPI EqualSid(PSID,PSID);
-WINBASEAPI DWORD WINAPI EraseTape(HANDLE,DWORD,BOOL);
-WINBASEAPI BOOL WINAPI EscapeCommFunction(HANDLE,DWORD);
-DECLSPEC_NORETURN WINBASEAPI void WINAPI ExitProcess(UINT);
-DECLSPEC_NORETURN WINBASEAPI void WINAPI ExitThread(DWORD);
-WINBASEAPI DWORD WINAPI ExpandEnvironmentStringsA(LPCSTR,LPSTR,DWORD);
-WINBASEAPI DWORD WINAPI ExpandEnvironmentStringsW(LPCWSTR,LPWSTR,DWORD);
-WINBASEAPI void WINAPI FatalAppExitA(UINT,LPCSTR);
-WINBASEAPI void WINAPI FatalAppExitW(UINT,LPCWSTR);
-WINBASEAPI void WINAPI FatalExit(int);
-WINBASEAPI BOOL WINAPI FileEncryptionStatusA(LPCSTR,LPDWORD);
-WINBASEAPI BOOL WINAPI FileEncryptionStatusW(LPCWSTR,LPDWORD);
-WINBASEAPI BOOL WINAPI FileTimeToDosDateTime(CONST FILETIME *,LPWORD,LPWORD);
-WINBASEAPI BOOL WINAPI FileTimeToLocalFileTime(CONST FILETIME *,LPFILETIME);
-WINBASEAPI BOOL WINAPI FileTimeToSystemTime(CONST FILETIME *,LPSYSTEMTIME);
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI BOOL WINAPI FindActCtxSectionGuid(DWORD,const GUID*,ULONG,const GUID*,PACTCTX_SECTION_KEYED_DATA);
-WINBASEAPI BOOL WINAPI FindActCtxSectionStringA(DWORD,const GUID*,ULONG,LPCSTR,PACTCTX_SECTION_KEYED_DATA);
-WINBASEAPI BOOL WINAPI FindActCtxSectionStringW(DWORD,const GUID*,ULONG,LPCWSTR,PACTCTX_SECTION_KEYED_DATA);
-#endif
-WINBASEAPI ATOM WINAPI FindAtomA(LPCSTR);
-WINBASEAPI ATOM WINAPI FindAtomW(LPCWSTR);
-WINBASEAPI BOOL WINAPI FindClose(HANDLE);
-WINBASEAPI BOOL WINAPI FindCloseChangeNotification(HANDLE);
-WINBASEAPI HANDLE WINAPI FindFirstChangeNotificationA(LPCSTR,BOOL,DWORD);
-WINBASEAPI HANDLE WINAPI FindFirstChangeNotificationW(LPCWSTR,BOOL,DWORD);
-WINBASEAPI HANDLE WINAPI FindFirstFileA(LPCSTR,LPWIN32_FIND_DATAA);
-WINBASEAPI HANDLE WINAPI FindFirstFileW(LPCWSTR,LPWIN32_FIND_DATAW);
-WINBASEAPI HANDLE WINAPI FindFirstFileExA(LPCSTR,FINDEX_INFO_LEVELS,PVOID,FINDEX_SEARCH_OPS,PVOID,DWORD);
-WINBASEAPI HANDLE WINAPI FindFirstFileExW(LPCWSTR,FINDEX_INFO_LEVELS,PVOID,FINDEX_SEARCH_OPS,PVOID,DWORD);
-WINBASEAPI BOOL WINAPI FindFirstFreeAce(PACL,PVOID*);
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI HANDLE WINAPI FindFirstVolumeA(LPCSTR,DWORD);
-WINBASEAPI HANDLE WINAPI FindFirstVolumeW(LPCWSTR,DWORD);
-WINBASEAPI HANDLE WINAPI FindFirstVolumeMountPointA(LPSTR,LPSTR,DWORD);
-WINBASEAPI HANDLE WINAPI FindFirstVolumeMountPointW(LPWSTR,LPWSTR,DWORD);
-#endif
-WINBASEAPI BOOL WINAPI FindNextChangeNotification(HANDLE);
-WINBASEAPI BOOL WINAPI FindNextFileA(HANDLE,LPWIN32_FIND_DATAA);
-WINBASEAPI BOOL WINAPI FindNextFileW(HANDLE,LPWIN32_FIND_DATAW);
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI BOOL WINAPI FindNextVolumeA(HANDLE,LPCSTR,DWORD);
-WINBASEAPI BOOL WINAPI FindNextVolumeW(HANDLE,LPWSTR,DWORD);
-WINBASEAPI BOOL WINAPI FindNextVolumeMountPointA(HANDLE,LPSTR,DWORD);
-WINBASEAPI BOOL WINAPI FindNextVolumeMountPointW(HANDLE,LPWSTR,DWORD);
-WINBASEAPI BOOL WINAPI FindVolumeClose(HANDLE);
-WINBASEAPI BOOL WINAPI FindVolumeMountPointClose(HANDLE);
-#endif
-WINBASEAPI HRSRC WINAPI FindResourceA(HMODULE,LPCSTR,LPCSTR);
-WINBASEAPI HRSRC WINAPI FindResourceW(HINSTANCE,LPCWSTR,LPCWSTR);
-WINBASEAPI HRSRC WINAPI FindResourceExA(HINSTANCE,LPCSTR,LPCSTR,WORD);
-WINBASEAPI HRSRC WINAPI FindResourceExW(HINSTANCE,LPCWSTR,LPCWSTR,WORD);
-#if (_WIN32_WINNT >= 0x0502)
-WINBASEAPI DWORD WINAPI GetFirmwareEnvironmentVariableA(LPCSTR,LPCSTR,PVOID,DWORD);
-WINBASEAPI DWORD WINAPI GetFirmwareEnvironmentVariableW(LPCWSTR,LPCWSTR,PVOID,DWORD);
-#endif
-WINBASEAPI BOOL WINAPI FlushFileBuffers(HANDLE);
-WINBASEAPI BOOL WINAPI FlushInstructionCache(HANDLE,PCVOID,DWORD);
-WINBASEAPI BOOL WINAPI FlushViewOfFile(PCVOID,DWORD);
-WINBASEAPI DWORD WINAPI FormatMessageA(DWORD,PCVOID,DWORD,DWORD,LPSTR,DWORD,va_list*);
-WINBASEAPI DWORD WINAPI FormatMessageW(DWORD,PCVOID,DWORD,DWORD,LPWSTR,DWORD,va_list*);
-WINBASEAPI BOOL WINAPI FreeEnvironmentStringsA(LPSTR);
-WINBASEAPI BOOL WINAPI FreeEnvironmentStringsW(LPWSTR);
-WINBASEAPI BOOL WINAPI FreeLibrary(HMODULE);
-DECLSPEC_NORETURN WINBASEAPI void WINAPI FreeLibraryAndExitThread(HMODULE,DWORD);
-#define FreeModule(m) FreeLibrary(m)
-#define FreeProcInstance(p) (void)(p)
-#ifndef XFree86Server
-WINBASEAPI BOOL WINAPI FreeResource(HGLOBAL);
-#endif /* ndef XFree86Server */
-WINBASEAPI PVOID WINAPI FreeSid(PSID);
-WINBASEAPI BOOL WINAPI GetAce(PACL,DWORD,LPVOID*);
-WINBASEAPI BOOL WINAPI GetAclInformation(PACL,PVOID,DWORD,ACL_INFORMATION_CLASS);
-WINBASEAPI UINT WINAPI GetAtomNameA(ATOM,LPSTR,int);
-WINBASEAPI UINT WINAPI GetAtomNameW(ATOM,LPWSTR,int);
-WINBASEAPI BOOL WINAPI GetBinaryTypeA(LPCSTR,PDWORD);
-WINBASEAPI BOOL WINAPI GetBinaryTypeW(LPCWSTR,PDWORD);
-WINBASEAPI LPSTR WINAPI GetCommandLineA(VOID);
-WINBASEAPI LPWSTR WINAPI GetCommandLineW(VOID);
-WINBASEAPI BOOL WINAPI GetCommConfig(HANDLE,LPCOMMCONFIG,PDWORD);
-WINBASEAPI BOOL WINAPI GetCommMask(HANDLE,PDWORD);
-WINBASEAPI BOOL WINAPI GetCommModemStatus(HANDLE,PDWORD);
-WINBASEAPI BOOL WINAPI GetCommProperties(HANDLE,LPCOMMPROP);
-WINBASEAPI BOOL WINAPI GetCommState(HANDLE,LPDCB);
-WINBASEAPI BOOL WINAPI GetCommTimeouts(HANDLE,LPCOMMTIMEOUTS);
-WINBASEAPI DWORD WINAPI GetCompressedFileSizeA(LPCSTR,PDWORD);
-WINBASEAPI DWORD WINAPI GetCompressedFileSizeW(LPCWSTR,PDWORD);
-WINBASEAPI BOOL WINAPI GetComputerNameA(LPSTR,PDWORD);
-WINBASEAPI BOOL WINAPI GetComputerNameW(LPWSTR,PDWORD);
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI BOOL WINAPI GetComputerNameExA(COMPUTER_NAME_FORMAT,LPSTR,LPDWORD);
-WINBASEAPI BOOL WINAPI GetComputerNameExW(COMPUTER_NAME_FORMAT,LPWSTR,LPDWORD);
-#endif
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI BOOL WINAPI GetCurrentActCtx(HANDLE*);
-#endif
-WINBASEAPI DWORD WINAPI GetCurrentDirectoryA(DWORD,LPSTR);
-WINBASEAPI DWORD WINAPI GetCurrentDirectoryW(DWORD,LPWSTR);
-WINBASEAPI BOOL WINAPI GetCurrentHwProfileA(LPHW_PROFILE_INFOA);
-WINBASEAPI BOOL WINAPI GetCurrentHwProfileW(LPHW_PROFILE_INFOW);
-WINBASEAPI HANDLE WINAPI GetCurrentProcess(void);
-WINBASEAPI DWORD WINAPI GetCurrentProcessId(void);
-WINBASEAPI HANDLE WINAPI GetCurrentThread(void);
-#ifdef _WIN32_WCE
-extern DWORD GetCurrentThreadId(void);
-#else
-WINBASEAPI DWORD WINAPI GetCurrentThreadId(void);
-#endif
-#define GetCurrentTime GetTickCount
-WINBASEAPI BOOL WINAPI GetDefaultCommConfigA(LPCSTR,LPCOMMCONFIG,PDWORD);
-WINBASEAPI BOOL WINAPI GetDefaultCommConfigW(LPCWSTR,LPCOMMCONFIG,PDWORD);
-WINBASEAPI BOOL WINAPI GetDevicePowerState(HANDLE, BOOL*);
-WINBASEAPI BOOL WINAPI GetDiskFreeSpaceA(LPCSTR,PDWORD,PDWORD,PDWORD,PDWORD);
-WINBASEAPI BOOL WINAPI GetDiskFreeSpaceW(LPCWSTR,PDWORD,PDWORD,PDWORD,PDWORD);
-WINBASEAPI BOOL WINAPI GetDiskFreeSpaceExA(LPCSTR,PULARGE_INTEGER,PULARGE_INTEGER,PULARGE_INTEGER);
-WINBASEAPI BOOL WINAPI GetDiskFreeSpaceExW(LPCWSTR,PULARGE_INTEGER,PULARGE_INTEGER,PULARGE_INTEGER);
-#if (_WIN32_WINNT >= 0x0502)
-WINBASEAPI DWORD WINAPI GetDllDirectoryA(DWORD,LPSTR);
-WINBASEAPI DWORD WINAPI GetDllDirectoryW(DWORD,LPWSTR);
-#endif
-WINBASEAPI UINT WINAPI GetDriveTypeA(LPCSTR);
-WINBASEAPI UINT WINAPI GetDriveTypeW(LPCWSTR);
-WINBASEAPI LPSTR WINAPI GetEnvironmentStrings(void);
-WINBASEAPI LPSTR WINAPI GetEnvironmentStringsA(void);
-WINBASEAPI LPWSTR WINAPI GetEnvironmentStringsW(void);
-WINBASEAPI DWORD WINAPI GetEnvironmentVariableA(LPCSTR,LPSTR,DWORD);
-WINBASEAPI DWORD WINAPI GetEnvironmentVariableW(LPCWSTR,LPWSTR,DWORD);
-WINBASEAPI BOOL WINAPI GetExitCodeProcess(HANDLE,PDWORD);
-WINBASEAPI BOOL WINAPI GetExitCodeThread(HANDLE,PDWORD);
-WINBASEAPI DWORD WINAPI GetFileAttributesA(LPCSTR);
-WINBASEAPI DWORD WINAPI GetFileAttributesW(LPCWSTR);
-WINBASEAPI BOOL WINAPI GetFileAttributesExA(LPCSTR,GET_FILEEX_INFO_LEVELS,PVOID);
-WINBASEAPI BOOL WINAPI GetFileAttributesExW(LPCWSTR,GET_FILEEX_INFO_LEVELS,PVOID);
-WINBASEAPI BOOL WINAPI GetFileInformationByHandle(HANDLE,LPBY_HANDLE_FILE_INFORMATION);
-WINBASEAPI BOOL WINAPI GetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,PDWORD);
-WINBASEAPI BOOL WINAPI GetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,PDWORD);
-WINBASEAPI DWORD WINAPI GetFileSize(HANDLE,PDWORD);
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI BOOL WINAPI GetFileSizeEx(HANDLE,PLARGE_INTEGER);
-#endif
-WINBASEAPI BOOL WINAPI GetFileTime(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME);
-WINBASEAPI DWORD WINAPI GetFileType(HANDLE);
-#define GetFreeSpace(w) (0x100000L)
-WINBASEAPI DWORD WINAPI GetFullPathNameA(LPCSTR,DWORD,LPSTR,LPSTR*);
-WINBASEAPI DWORD WINAPI GetFullPathNameW(LPCWSTR,DWORD,LPWSTR,LPWSTR*);
-WINBASEAPI BOOL WINAPI GetHandleInformation(HANDLE,PDWORD);
-WINBASEAPI BOOL WINAPI GetKernelObjectSecurity(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,PDWORD);
-WINBASEAPI DWORD WINAPI GetLastError(void);
-WINBASEAPI DWORD WINAPI GetLengthSid(PSID);
-WINBASEAPI void WINAPI GetLocalTime(LPSYSTEMTIME);
-WINBASEAPI DWORD WINAPI GetLogicalDrives(void);
-WINBASEAPI DWORD WINAPI GetLogicalDriveStringsA(DWORD,LPSTR);
-WINBASEAPI DWORD WINAPI GetLogicalDriveStringsW(DWORD,LPWSTR);
-#if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410)
-WINBASEAPI DWORD WINAPI GetLongPathNameA(LPCSTR,LPSTR,DWORD);
-WINBASEAPI DWORD WINAPI GetLongPathNameW(LPCWSTR,LPWSTR,DWORD);
-#endif
-WINBASEAPI BOOL WINAPI GetMailslotInfo(HANDLE,PDWORD,PDWORD,PDWORD,PDWORD);
-WINBASEAPI DWORD WINAPI GetModuleFileNameA(HINSTANCE,LPSTR,DWORD);
-WINBASEAPI DWORD WINAPI GetModuleFileNameW(HINSTANCE,LPWSTR,DWORD);
-WINBASEAPI HMODULE WINAPI GetModuleHandleA(LPCSTR);
-WINBASEAPI HMODULE WINAPI GetModuleHandleW(LPCWSTR);
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI BOOL WINAPI GetModuleHandleExA(DWORD,LPCSTR,HMODULE*);
-WINBASEAPI BOOL WINAPI GetModuleHandleExW(DWORD,LPCWSTR,HMODULE*);
-#endif
-WINBASEAPI BOOL WINAPI GetNamedPipeHandleStateA(HANDLE,PDWORD,PDWORD,PDWORD,PDWORD,LPSTR,DWORD);
-WINBASEAPI BOOL WINAPI GetNamedPipeHandleStateW(HANDLE,PDWORD,PDWORD,PDWORD,PDWORD,LPWSTR,DWORD);
-WINBASEAPI BOOL WINAPI GetNamedPipeInfo(HANDLE,PDWORD,PDWORD,PDWORD,PDWORD);
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI VOID WINAPI GetNativeSystemInfo(LPSYSTEM_INFO);
-#endif
-WINBASEAPI BOOL WINAPI GetNumberOfEventLogRecords(HANDLE,PDWORD);
-WINBASEAPI BOOL WINAPI GetOldestEventLogRecord(HANDLE,PDWORD);
-WINBASEAPI BOOL WINAPI GetOverlappedResult(HANDLE,LPOVERLAPPED,PDWORD,BOOL);
-WINBASEAPI DWORD WINAPI GetPriorityClass(HANDLE);
-WINBASEAPI BOOL WINAPI GetPrivateObjectSecurity(PSECURITY_DESCRIPTOR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,PDWORD);
-WINBASEAPI UINT WINAPI GetPrivateProfileIntA(LPCSTR,LPCSTR,INT,LPCSTR);
-WINBASEAPI UINT WINAPI GetPrivateProfileIntW(LPCWSTR,LPCWSTR,INT,LPCWSTR);
-WINBASEAPI DWORD WINAPI GetPrivateProfileSectionA(LPCSTR,LPSTR,DWORD,LPCSTR);
-WINBASEAPI DWORD WINAPI GetPrivateProfileSectionW(LPCWSTR,LPWSTR,DWORD,LPCWSTR);
-WINBASEAPI DWORD WINAPI GetPrivateProfileSectionNamesA(LPSTR,DWORD,LPCSTR);
-WINBASEAPI DWORD WINAPI GetPrivateProfileSectionNamesW(LPWSTR,DWORD,LPCWSTR);
-WINBASEAPI DWORD WINAPI GetPrivateProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPSTR,DWORD,LPCSTR);
-WINBASEAPI DWORD WINAPI GetPrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,DWORD,LPCWSTR);
-WINBASEAPI BOOL WINAPI GetPrivateProfileStructA(LPCSTR,LPCSTR,LPVOID,UINT,LPCSTR);
-WINBASEAPI BOOL WINAPI GetPrivateProfileStructW(LPCWSTR,LPCWSTR,LPVOID,UINT,LPCWSTR);
-WINBASEAPI FARPROC WINAPI GetProcAddress(HINSTANCE,LPCSTR);
-WINBASEAPI BOOL WINAPI GetProcessAffinityMask(HANDLE,PDWORD,PDWORD);
-#if (_WIN32_WINNT >= 0x0601)
-WINBASEAPI BOOL WINAPI GetProcessDEPPolicy (HANDLE, LPDWORD, PBOOL);
-#endif
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI BOOL WINAPI GetProcessHandleCount(HANDLE,PDWORD);
-#endif
-WINBASEAPI HANDLE WINAPI GetProcessHeap(VOID);
-WINBASEAPI DWORD WINAPI GetProcessHeaps(DWORD,PHANDLE);
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI DWORD WINAPI GetProcessId(HANDLE);
-#endif
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI BOOL WINAPI GetProcessIoCounters(HANDLE,PIO_COUNTERS);
-#endif
-WINBASEAPI BOOL WINAPI GetProcessPriorityBoost(HANDLE,PBOOL);
-WINBASEAPI BOOL WINAPI GetProcessShutdownParameters(PDWORD,PDWORD);
-WINBASEAPI BOOL WINAPI GetProcessTimes(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME,LPFILETIME);
-WINBASEAPI DWORD WINAPI GetProcessVersion(DWORD);
-WINBASEAPI HWINSTA WINAPI GetProcessWindowStation(void);
-WINBASEAPI BOOL WINAPI GetProcessWorkingSetSize(HANDLE,PSIZE_T,PSIZE_T);
-WINBASEAPI UINT WINAPI GetProfileIntA(LPCSTR,LPCSTR,INT);
-WINBASEAPI UINT WINAPI GetProfileIntW(LPCWSTR,LPCWSTR,INT);
-WINBASEAPI DWORD WINAPI GetProfileSectionA(LPCSTR,LPSTR,DWORD);
-WINBASEAPI DWORD WINAPI GetProfileSectionW(LPCWSTR,LPWSTR,DWORD);
-WINBASEAPI DWORD WINAPI GetProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPSTR,DWORD);
-WINBASEAPI DWORD WINAPI GetProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPWSTR,DWORD);
-WINBASEAPI BOOL WINAPI GetQueuedCompletionStatus(HANDLE,PDWORD,PULONG_PTR,LPOVERLAPPED*,DWORD);
-WINBASEAPI BOOL WINAPI GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR_CONTROL,PDWORD);
-WINBASEAPI BOOL WINAPI GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR,LPBOOL,PACL*,LPBOOL);
-WINBASEAPI BOOL WINAPI GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR,PSID*,LPBOOL);
-WINBASEAPI DWORD WINAPI GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR);
-WINBASEAPI BOOL WINAPI GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR,PSID*,LPBOOL);
-WINBASEAPI BOOL WINAPI GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR,LPBOOL,PACL*,LPBOOL);
-WINBASEAPI DWORD WINAPI GetShortPathNameA(LPCSTR,LPSTR,DWORD);
-WINBASEAPI DWORD WINAPI GetShortPathNameW(LPCWSTR,LPWSTR,DWORD);
-WINBASEAPI PSID_IDENTIFIER_AUTHORITY WINAPI GetSidIdentifierAuthority(PSID);
-WINBASEAPI DWORD WINAPI GetSidLengthRequired(UCHAR);
-WINBASEAPI PDWORD WINAPI GetSidSubAuthority(PSID,DWORD);
-WINBASEAPI PUCHAR WINAPI GetSidSubAuthorityCount(PSID);
-WINBASEAPI VOID WINAPI GetStartupInfoA(LPSTARTUPINFOA);
-WINBASEAPI VOID WINAPI GetStartupInfoW(LPSTARTUPINFOW);
-WINBASEAPI HANDLE WINAPI GetStdHandle(DWORD);
-#if (_WIN32_WINNT >= 0x0601)
-WINBASEAPI DEP_SYSTEM_POLICY_TYPE WINAPI GetSystemDEPPolicy (void);
-#endif
-WINBASEAPI UINT WINAPI GetSystemDirectoryA(LPSTR,UINT);
-WINBASEAPI UINT WINAPI GetSystemDirectoryW(LPWSTR,UINT);
-WINBASEAPI VOID WINAPI GetSystemInfo(LPSYSTEM_INFO);
-WINBASEAPI BOOL WINAPI GetSystemPowerStatus(LPSYSTEM_POWER_STATUS);
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI BOOL WINAPI GetSystemRegistryQuota(PDWORD,PDWORD);
-#endif
-WINBASEAPI VOID WINAPI GetSystemTime(LPSYSTEMTIME);
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI BOOL WINAPI GetSystemTimes(LPFILETIME,LPFILETIME,LPFILETIME);
-#endif
-WINBASEAPI BOOL WINAPI GetSystemTimeAdjustment(PDWORD,PDWORD,PBOOL);
-WINBASEAPI void WINAPI GetSystemTimeAsFileTime(LPFILETIME);
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI UINT WINAPI GetSystemWindowsDirectoryA(LPSTR,UINT);
-WINBASEAPI UINT WINAPI GetSystemWindowsDirectoryW(LPWSTR,UINT);
-#endif
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI UINT WINAPI GetSystemWow64DirectoryA(LPSTR,UINT);
-WINBASEAPI UINT WINAPI GetSystemWow64DirectoryW(LPWSTR,UINT);
-#endif
-WINBASEAPI DWORD WINAPI GetTapeParameters(HANDLE,DWORD,PDWORD,PVOID);
-WINBASEAPI DWORD WINAPI GetTapePosition(HANDLE,DWORD,PDWORD,PDWORD,PDWORD);
-WINBASEAPI DWORD WINAPI GetTapeStatus(HANDLE);
-WINBASEAPI UINT WINAPI GetTempFileNameA(LPCSTR,LPCSTR,UINT,LPSTR);
-WINBASEAPI UINT WINAPI GetTempFileNameW(LPCWSTR,LPCWSTR,UINT,LPWSTR);
-WINBASEAPI DWORD WINAPI GetTempPathA(DWORD,LPSTR);
-WINBASEAPI DWORD WINAPI GetTempPathW(DWORD,LPWSTR);
-WINBASEAPI BOOL WINAPI GetThreadContext(HANDLE,LPCONTEXT);
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI BOOL WINAPI GetThreadIOPendingFlag(HANDLE,PBOOL);
-#endif
-WINBASEAPI int WINAPI GetThreadPriority(HANDLE);
-WINBASEAPI BOOL WINAPI GetThreadPriorityBoost(HANDLE,PBOOL);
-WINBASEAPI BOOL WINAPI GetThreadSelectorEntry(HANDLE,DWORD,LPLDT_ENTRY);
-WINBASEAPI BOOL WINAPI GetThreadTimes(HANDLE,LPFILETIME,LPFILETIME,LPFILETIME,LPFILETIME);
-WINBASEAPI DWORD WINAPI GetTickCount(VOID);
-WINBASEAPI DWORD WINAPI GetTimeZoneInformation(LPTIME_ZONE_INFORMATION);
-WINBASEAPI BOOL WINAPI GetTokenInformation(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,DWORD,PDWORD);
-WINBASEAPI BOOL WINAPI GetUserNameA (LPSTR,PDWORD);
-WINBASEAPI BOOL WINAPI GetUserNameW(LPWSTR,PDWORD);
-WINBASEAPI DWORD WINAPI GetVersion(void);
-WINBASEAPI BOOL WINAPI GetVersionExA(LPOSVERSIONINFOA);
-WINBASEAPI BOOL WINAPI GetVersionExW(LPOSVERSIONINFOW);
-WINBASEAPI BOOL WINAPI GetVolumeInformationA(LPCSTR,LPSTR,DWORD,PDWORD,PDWORD,PDWORD,LPSTR,DWORD);
-WINBASEAPI BOOL WINAPI GetVolumeInformationW(LPCWSTR,LPWSTR,DWORD,PDWORD,PDWORD,PDWORD,LPWSTR,DWORD);
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI BOOL WINAPI GetVolumeNameForVolumeMountPointA(LPCSTR,LPSTR,DWORD);
-WINBASEAPI BOOL WINAPI GetVolumeNameForVolumeMountPointW(LPCWSTR,LPWSTR,DWORD);
-WINBASEAPI BOOL WINAPI GetVolumePathNameA(LPCSTR,LPSTR,DWORD);
-WINBASEAPI BOOL WINAPI GetVolumePathNameW(LPCWSTR,LPWSTR,DWORD);
-#endif
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI BOOL WINAPI GetVolumePathNamesForVolumeNameA(LPCSTR,LPSTR,DWORD,PDWORD);
-WINBASEAPI BOOL WINAPI GetVolumePathNamesForVolumeNameW(LPCWSTR,LPWSTR,DWORD,PDWORD);
-#endif
-WINBASEAPI UINT WINAPI GetWindowsDirectoryA(LPSTR,UINT);
-WINBASEAPI UINT WINAPI GetWindowsDirectoryW(LPWSTR,UINT);
-WINBASEAPI DWORD WINAPI GetWindowThreadProcessId(HWND,PDWORD);
-WINBASEAPI UINT WINAPI GetWriteWatch(DWORD,PVOID,SIZE_T,PVOID*,PULONG_PTR,PULONG);
-WINBASEAPI ATOM WINAPI GlobalAddAtomA(LPCSTR);
-WINBASEAPI ATOM WINAPI GlobalAddAtomW( LPCWSTR);
-WINBASEAPI HGLOBAL WINAPI GlobalAlloc(UINT,DWORD);
-WINBASEAPI SIZE_T WINAPI GlobalCompact(DWORD); /* Obsolete: Has no effect. */
-WINBASEAPI ATOM WINAPI GlobalDeleteAtom(ATOM);
-#define GlobalDiscard(hMem) GlobalReAlloc((hMem), 0, GMEM_MOVEABLE)
-WINBASEAPI ATOM WINAPI GlobalFindAtomA(LPCSTR);
-WINBASEAPI ATOM WINAPI GlobalFindAtomW(LPCWSTR);
-WINBASEAPI VOID WINAPI GlobalFix(HGLOBAL); /* Obsolete: Has no effect. */
-WINBASEAPI UINT WINAPI GlobalFlags(HGLOBAL); /* Obsolete: Has no effect. */
-WINBASEAPI HGLOBAL WINAPI GlobalFree(HGLOBAL);
-WINBASEAPI UINT WINAPI GlobalGetAtomNameA(ATOM,LPSTR,int);
-WINBASEAPI UINT WINAPI GlobalGetAtomNameW(ATOM,LPWSTR,int);
-WINBASEAPI HGLOBAL WINAPI GlobalHandle(PCVOID);
-WINBASEAPI LPVOID WINAPI GlobalLock(HGLOBAL);
-WINBASEAPI VOID WINAPI GlobalMemoryStatus(LPMEMORYSTATUS);
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI BOOL WINAPI GlobalMemoryStatusEx(LPMEMORYSTATUSEX);
-#endif
-WINBASEAPI HGLOBAL WINAPI GlobalReAlloc(HGLOBAL,DWORD,UINT);
-WINBASEAPI DWORD WINAPI GlobalSize(HGLOBAL);
-WINBASEAPI VOID WINAPI GlobalUnfix(HGLOBAL); /* Obsolete: Has no effect. */
-WINBASEAPI BOOL WINAPI GlobalUnlock(HGLOBAL);
-WINBASEAPI BOOL WINAPI GlobalUnWire(HGLOBAL); /* Obsolete: Has no effect. */
-WINBASEAPI PVOID WINAPI GlobalWire(HGLOBAL); /* Obsolete: Has no effect. */
-#define HasOverlappedIoCompleted(lpOverlapped) ((lpOverlapped)->Internal != STATUS_PENDING)
-WINBASEAPI PVOID WINAPI HeapAlloc(HANDLE,DWORD,DWORD);
-SIZE_T WINAPI HeapCompact(HANDLE,DWORD);
-WINBASEAPI HANDLE WINAPI HeapCreate(DWORD,DWORD,DWORD);
-WINBASEAPI BOOL WINAPI HeapDestroy(HANDLE);
-WINBASEAPI BOOL WINAPI HeapFree(HANDLE,DWORD,PVOID);
-WINBASEAPI BOOL WINAPI HeapLock(HANDLE);
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI BOOL WINAPI HeapQueryInformation(HANDLE,HEAP_INFORMATION_CLASS,PVOID,SIZE_T,PSIZE_T);
-#endif
-WINBASEAPI PVOID WINAPI HeapReAlloc(HANDLE,DWORD,PVOID,DWORD);
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI BOOL WINAPI HeapSetInformation(HANDLE,HEAP_INFORMATION_CLASS,PVOID,SIZE_T);
-#endif
-WINBASEAPI DWORD WINAPI HeapSize(HANDLE,DWORD,PCVOID);
-WINBASEAPI BOOL WINAPI HeapUnlock(HANDLE);
-WINBASEAPI BOOL WINAPI HeapValidate(HANDLE,DWORD,PCVOID);
-WINBASEAPI BOOL WINAPI HeapWalk(HANDLE,LPPROCESS_HEAP_ENTRY);
-WINBASEAPI BOOL WINAPI ImpersonateLoggedOnUser(HANDLE);
-WINBASEAPI BOOL WINAPI ImpersonateNamedPipeClient(HANDLE);
-WINBASEAPI BOOL WINAPI ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL);
-WINBASEAPI BOOL WINAPI InitAtomTable(DWORD);
-WINBASEAPI BOOL WINAPI InitializeAcl(PACL,DWORD,DWORD);
-WINBASEAPI VOID WINAPI InitializeCriticalSection(LPCRITICAL_SECTION);
-WINBASEAPI BOOL WINAPI InitializeCriticalSectionAndSpinCount(LPCRITICAL_SECTION,DWORD);
-WINBASEAPI DWORD WINAPI SetCriticalSectionSpinCount(LPCRITICAL_SECTION,DWORD);
-WINBASEAPI BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR,DWORD);
-WINBASEAPI BOOL WINAPI InitializeSid (PSID,PSID_IDENTIFIER_AUTHORITY,BYTE);
-
-#if !(__USE_NTOSKRNL__)
-/* CAREFUL: These are exported from ntoskrnl.exe and declared in winddk.h
- as __fastcall functions, but are exported from kernel32.dll as __stdcall */
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI VOID WINAPI InitializeSListHead(PSLIST_HEADER);
-#endif
-#ifndef __INTERLOCKED_DECLARED
-#define __INTERLOCKED_DECLARED
-LONG WINAPI InterlockedCompareExchange(LONG volatile *,LONG,LONG);
-/* PVOID WINAPI InterlockedCompareExchangePointer(PVOID*,PVOID,PVOID); */
-#define InterlockedCompareExchangePointer(d,e,c) \
- (PVOID)InterlockedCompareExchange((LONG volatile *)(d),(LONG)(e),(LONG)(c))
-LONG WINAPI InterlockedDecrement(LONG volatile *);
-LONG WINAPI InterlockedExchange(LONG volatile *,LONG);
-/* PVOID WINAPI InterlockedExchangePointer(PVOID*,PVOID); */
-#define InterlockedExchangePointer(t,v) \
- (PVOID)InterlockedExchange((LONG volatile *)(t),(LONG)(v))
-LONG WINAPI InterlockedExchangeAdd(LONG volatile *,LONG);
-#if (_WIN32_WINNT >= 0x0501)
-PSLIST_ENTRY WINAPI InterlockedFlushSList(PSLIST_HEADER);
-#endif
-LONG WINAPI InterlockedIncrement(LONG volatile *);
-#if (_WIN32_WINNT >= 0x0501)
-PSLIST_ENTRY WINAPI InterlockedPopEntrySList(PSLIST_HEADER);
-PSLIST_ENTRY WINAPI InterlockedPushEntrySList(PSLIST_HEADER,PSLIST_ENTRY);
-#endif
-#endif /* __INTERLOCKED_DECLARED */
-#endif /* __USE_NTOSKRNL__ */
-
-WINBASEAPI BOOL WINAPI IsBadCodePtr(FARPROC);
-WINBASEAPI BOOL WINAPI IsBadHugeReadPtr(PCVOID,UINT);
-WINBASEAPI BOOL WINAPI IsBadHugeWritePtr(PVOID,UINT);
-WINBASEAPI BOOL WINAPI IsBadReadPtr(PCVOID,UINT);
-WINBASEAPI BOOL WINAPI IsBadStringPtrA(LPCSTR,UINT);
-WINBASEAPI BOOL WINAPI IsBadStringPtrW(LPCWSTR,UINT);
-WINBASEAPI BOOL WINAPI IsBadWritePtr(PVOID,UINT);
-WINBASEAPI BOOL WINAPI IsDebuggerPresent(void);
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI BOOL IsProcessInJob(HANDLE,HANDLE,PBOOL);
-#endif
-WINBASEAPI BOOL WINAPI IsProcessorFeaturePresent(DWORD);
-WINBASEAPI BOOL WINAPI IsSystemResumeAutomatic(void);
-WINBASEAPI BOOL WINAPI IsTextUnicode(PCVOID,int,LPINT);
-WINBASEAPI BOOL WINAPI IsValidAcl(PACL);
-WINBASEAPI BOOL WINAPI IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR);
-WINBASEAPI BOOL WINAPI IsValidSid(PSID);
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI BOOL WINAPI IsWow64Process(HANDLE,PBOOL);
-#endif
-WINBASEAPI void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION);
-#define LimitEmsPages(n)
-WINBASEAPI HINSTANCE WINAPI LoadLibraryA(LPCSTR);
-WINBASEAPI HINSTANCE WINAPI LoadLibraryExA(LPCSTR,HANDLE,DWORD);
-WINBASEAPI HINSTANCE WINAPI LoadLibraryExW(LPCWSTR,HANDLE,DWORD);
-WINBASEAPI HINSTANCE WINAPI LoadLibraryW(LPCWSTR);
-WINBASEAPI DWORD WINAPI LoadModule(LPCSTR,PVOID);
-WINBASEAPI HGLOBAL WINAPI LoadResource(HINSTANCE,HRSRC);
-WINBASEAPI HLOCAL WINAPI LocalAlloc(UINT,SIZE_T);
-WINBASEAPI SIZE_T WINAPI LocalCompact(UINT); /* Obsolete: Has no effect. */
-WINBASEAPI HLOCAL LocalDiscard(HLOCAL);
-WINBASEAPI BOOL WINAPI LocalFileTimeToFileTime(CONST FILETIME *,LPFILETIME);
-WINBASEAPI UINT WINAPI LocalFlags(HLOCAL); /* Obsolete: Has no effect. */
-WINBASEAPI HLOCAL WINAPI LocalFree(HLOCAL);
-WINBASEAPI HLOCAL WINAPI LocalHandle(LPCVOID);
-WINBASEAPI PVOID WINAPI LocalLock(HLOCAL);
-WINBASEAPI HLOCAL WINAPI LocalReAlloc(HLOCAL,SIZE_T,UINT);
-WINBASEAPI SIZE_T WINAPI LocalShrink(HLOCAL,UINT); /* Obsolete: Has no effect. */
-WINBASEAPI UINT WINAPI LocalSize(HLOCAL);
-WINBASEAPI BOOL WINAPI LocalUnlock(HLOCAL);
-WINBASEAPI BOOL WINAPI LockFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
-WINBASEAPI BOOL WINAPI LockFileEx(HANDLE,DWORD,DWORD,DWORD,DWORD,LPOVERLAPPED);
-WINBASEAPI PVOID WINAPI LockResource(HGLOBAL);
-#define LockSegment(w) GlobalFix((HANDLE)(w)) /* Obsolete: Has no effect. */
-WINBASEAPI BOOL WINAPI LogonUserA(LPSTR,LPSTR,LPSTR,DWORD,DWORD,PHANDLE);
-WINBASEAPI BOOL WINAPI LogonUserW(LPWSTR,LPWSTR,LPWSTR,DWORD,DWORD,PHANDLE);
-WINBASEAPI BOOL WINAPI LookupAccountNameA(LPCSTR,LPCSTR,PSID,PDWORD,LPSTR,PDWORD,PSID_NAME_USE);
-WINBASEAPI BOOL WINAPI LookupAccountNameW(LPCWSTR,LPCWSTR,PSID,PDWORD,LPWSTR,PDWORD,PSID_NAME_USE);
-WINBASEAPI BOOL WINAPI LookupAccountSidA(LPCSTR,PSID,LPSTR,PDWORD,LPSTR,PDWORD,PSID_NAME_USE);
-WINBASEAPI BOOL WINAPI LookupAccountSidW(LPCWSTR,PSID,LPWSTR,PDWORD,LPWSTR,PDWORD,PSID_NAME_USE);
-WINBASEAPI BOOL WINAPI LookupPrivilegeDisplayNameA(LPCSTR,LPCSTR,LPSTR,PDWORD,PDWORD);
-WINBASEAPI BOOL WINAPI LookupPrivilegeDisplayNameW(LPCWSTR,LPCWSTR,LPWSTR,PDWORD,PDWORD);
-WINBASEAPI BOOL WINAPI LookupPrivilegeNameA(LPCSTR,PLUID,LPSTR,PDWORD);
-WINBASEAPI BOOL WINAPI LookupPrivilegeNameW(LPCWSTR,PLUID,LPWSTR,PDWORD);
-WINBASEAPI BOOL WINAPI LookupPrivilegeValueA(LPCSTR,LPCSTR,PLUID);
-WINBASEAPI BOOL WINAPI LookupPrivilegeValueW(LPCWSTR,LPCWSTR,PLUID);
-WINBASEAPI LPSTR WINAPI lstrcatA(LPSTR,LPCSTR);
-WINBASEAPI LPWSTR WINAPI lstrcatW(LPWSTR,LPCWSTR);
-WINBASEAPI int WINAPI lstrcmpA(LPCSTR,LPCSTR);
-WINBASEAPI int WINAPI lstrcmpiA(LPCSTR,LPCSTR);
-WINBASEAPI int WINAPI lstrcmpiW( LPCWSTR,LPCWSTR);
-WINBASEAPI int WINAPI lstrcmpW(LPCWSTR,LPCWSTR);
-WINBASEAPI LPSTR WINAPI lstrcpyA(LPSTR,LPCSTR);
-WINBASEAPI LPSTR WINAPI lstrcpynA(LPSTR,LPCSTR,int);
-WINBASEAPI LPWSTR WINAPI lstrcpynW(LPWSTR,LPCWSTR,int);
-WINBASEAPI LPWSTR WINAPI lstrcpyW(LPWSTR,LPCWSTR);
-WINBASEAPI int WINAPI lstrlenA(LPCSTR);
-WINBASEAPI int WINAPI lstrlenW(LPCWSTR);
-WINBASEAPI BOOL WINAPI MakeAbsoluteSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PDWORD,PACL,PDWORD,PACL,PDWORD,PSID,PDWORD,PSID,PDWORD);
-#define MakeProcInstance(p,i) (p)
-WINBASEAPI BOOL WINAPI MakeSelfRelativeSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,PDWORD);
-WINBASEAPI VOID WINAPI MapGenericMask(PDWORD,PGENERIC_MAPPING);
-WINBASEAPI PVOID WINAPI MapViewOfFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
-WINBASEAPI PVOID WINAPI MapViewOfFileEx(HANDLE,DWORD,DWORD,DWORD,DWORD,PVOID);
-WINBASEAPI BOOL WINAPI MoveFileA(LPCSTR,LPCSTR);
-WINBASEAPI BOOL WINAPI MoveFileExA(LPCSTR,LPCSTR,DWORD);
-WINBASEAPI BOOL WINAPI MoveFileExW(LPCWSTR,LPCWSTR,DWORD);
-WINBASEAPI BOOL WINAPI MoveFileW(LPCWSTR,LPCWSTR);
-WINBASEAPI int WINAPI MulDiv(int,int,int);
-WINBASEAPI BOOL WINAPI NotifyChangeEventLog(HANDLE,HANDLE);
-WINBASEAPI BOOL WINAPI ObjectCloseAuditAlarmA(LPCSTR,PVOID,BOOL);
-WINBASEAPI BOOL WINAPI ObjectCloseAuditAlarmW(LPCWSTR,PVOID,BOOL);
-WINBASEAPI BOOL WINAPI ObjectDeleteAuditAlarmA(LPCSTR,PVOID,BOOL);
-WINBASEAPI BOOL WINAPI ObjectDeleteAuditAlarmW(LPCWSTR,PVOID,BOOL);
-WINBASEAPI BOOL WINAPI ObjectOpenAuditAlarmA(LPCSTR,PVOID,LPSTR,LPSTR,PSECURITY_DESCRIPTOR,HANDLE,DWORD,DWORD,PPRIVILEGE_SET,BOOL,BOOL,PBOOL);
-WINBASEAPI BOOL WINAPI ObjectOpenAuditAlarmW(LPCWSTR,PVOID,LPWSTR,LPWSTR,PSECURITY_DESCRIPTOR,HANDLE,DWORD,DWORD,PPRIVILEGE_SET,BOOL,BOOL,PBOOL);
-WINBASEAPI BOOL WINAPI ObjectPrivilegeAuditAlarmA(LPCSTR,PVOID,HANDLE,DWORD,PPRIVILEGE_SET,BOOL);
-WINBASEAPI BOOL WINAPI ObjectPrivilegeAuditAlarmW(LPCWSTR,PVOID,HANDLE,DWORD,PPRIVILEGE_SET,BOOL);
-WINBASEAPI HANDLE WINAPI OpenBackupEventLogA(LPCSTR,LPCSTR);
-WINBASEAPI HANDLE WINAPI OpenBackupEventLogW(LPCWSTR,LPCWSTR);
-WINBASEAPI HANDLE WINAPI OpenEventA(DWORD,BOOL,LPCSTR);
-WINBASEAPI HANDLE WINAPI OpenEventLogA (LPCSTR,LPCSTR);
-WINBASEAPI HANDLE WINAPI OpenEventLogW(LPCWSTR,LPCWSTR);
-WINBASEAPI HANDLE WINAPI OpenEventW(DWORD,BOOL,LPCWSTR);
-WINBASEAPI HFILE WINAPI OpenFile(LPCSTR,LPOFSTRUCT,UINT);
-WINBASEAPI HANDLE WINAPI OpenFileMappingA(DWORD,BOOL,LPCSTR);
-WINBASEAPI HANDLE WINAPI OpenFileMappingW(DWORD,BOOL,LPCWSTR);
-WINBASEAPI HANDLE WINAPI OpenMutexA(DWORD,BOOL,LPCSTR);
-WINBASEAPI HANDLE WINAPI OpenMutexW(DWORD,BOOL,LPCWSTR);
-WINBASEAPI HANDLE WINAPI OpenProcess(DWORD,BOOL,DWORD);
-WINBASEAPI BOOL WINAPI OpenProcessToken(HANDLE,DWORD,PHANDLE);
-WINBASEAPI HANDLE WINAPI OpenSemaphoreA(DWORD,BOOL,LPCSTR);
-WINBASEAPI HANDLE WINAPI OpenSemaphoreW(DWORD,BOOL,LPCWSTR);
-#if (_WIN32_WINNT >= 0x0500) || (_WIN32_WINDOWS >= 0x0490)
-WINBASEAPI HANDLE WINAPI OpenThread(DWORD,BOOL,DWORD);
-#endif
-WINBASEAPI BOOL WINAPI OpenThreadToken(HANDLE,DWORD,BOOL,PHANDLE);
-WINBASEAPI HANDLE WINAPI OpenWaitableTimerA(DWORD,BOOL,LPCSTR);
-WINBASEAPI HANDLE WINAPI OpenWaitableTimerW(DWORD,BOOL,LPCWSTR);
-WINBASEAPI void WINAPI OutputDebugStringA(LPCSTR);
-WINBASEAPI void WINAPI OutputDebugStringW(LPCWSTR);
-WINBASEAPI BOOL WINAPI PeekNamedPipe(HANDLE,PVOID,DWORD,PDWORD,PDWORD,PDWORD);
-WINBASEAPI BOOL WINAPI PostQueuedCompletionStatus(HANDLE,DWORD,ULONG_PTR,LPOVERLAPPED);
-WINBASEAPI DWORD WINAPI PrepareTape(HANDLE,DWORD,BOOL);
-WINBASEAPI BOOL WINAPI PrivilegeCheck (HANDLE,PPRIVILEGE_SET,PBOOL);
-WINBASEAPI BOOL WINAPI PrivilegedServiceAuditAlarmA(LPCSTR,LPCSTR,HANDLE,PPRIVILEGE_SET,BOOL);
-WINBASEAPI BOOL WINAPI PrivilegedServiceAuditAlarmW(LPCWSTR,LPCWSTR,HANDLE,PPRIVILEGE_SET,BOOL);
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI BOOL WINAPI ProcessIdToSessionId(DWORD,DWORD*);
-#endif
-WINBASEAPI BOOL WINAPI PulseEvent(HANDLE);
-WINBASEAPI BOOL WINAPI PurgeComm(HANDLE,DWORD);
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI BOOL WINAPI QueryActCtxW(DWORD,HANDLE,PVOID,ULONG,PVOID,SIZE_T,SIZE_T*);
-#endif
-WINBASEAPI DWORD WINAPI QueryDosDeviceA(LPCSTR,LPSTR,DWORD);
-WINBASEAPI DWORD WINAPI QueryDosDeviceW(LPCWSTR,LPWSTR,DWORD);
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI BOOL WINAPI QueryMemoryResourceNotification(HANDLE,PBOOL);
-#endif
-WINBASEAPI BOOL WINAPI QueryPerformanceCounter(PLARGE_INTEGER);
-WINBASEAPI BOOL WINAPI QueryPerformanceFrequency(PLARGE_INTEGER);
-WINBASEAPI DWORD WINAPI QueueUserAPC(PAPCFUNC,HANDLE,ULONG_PTR);
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI BOOL WINAPI QueueUserWorkItem(LPTHREAD_START_ROUTINE,PVOID,ULONG);
-#endif
-WINBASEAPI void WINAPI RaiseException(DWORD,DWORD,DWORD,const DWORD*);
-WINBASEAPI BOOL WINAPI ReadDirectoryChangesW(HANDLE,PVOID,DWORD,BOOL,DWORD,PDWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE);
-WINBASEAPI BOOL WINAPI ReadEventLogA(HANDLE,DWORD,DWORD,PVOID,DWORD,DWORD *,DWORD *);
-WINBASEAPI BOOL WINAPI ReadEventLogW(HANDLE,DWORD,DWORD,PVOID,DWORD,DWORD *,DWORD *);
-WINBASEAPI BOOL WINAPI ReadFile(HANDLE,PVOID,DWORD,PDWORD,LPOVERLAPPED);
-WINBASEAPI BOOL WINAPI ReadFileEx(HANDLE,PVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE);
-WINBASEAPI BOOL WINAPI ReadFileScatter(HANDLE,FILE_SEGMENT_ELEMENT*,DWORD,LPDWORD,LPOVERLAPPED);
-WINBASEAPI BOOL WINAPI ReadProcessMemory(HANDLE,PCVOID,PVOID,DWORD,PDWORD);
-WINBASEAPI HANDLE WINAPI RegisterEventSourceA (LPCSTR,LPCSTR);
-WINBASEAPI HANDLE WINAPI RegisterEventSourceW(LPCWSTR,LPCWSTR);
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI BOOL WINAPI RegisterWaitForSingleObject(PHANDLE,HANDLE,WAITORTIMERCALLBACK,PVOID,ULONG,ULONG);
-WINBASEAPI HANDLE WINAPI RegisterWaitForSingleObjectEx(HANDLE,WAITORTIMERCALLBACK,PVOID,ULONG,ULONG);
-#endif
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI void WINAPI ReleaseActCtx(HANDLE);
-#endif
-WINBASEAPI BOOL WINAPI ReleaseMutex(HANDLE);
-WINBASEAPI BOOL WINAPI ReleaseSemaphore(HANDLE,LONG,LPLONG);
-WINBASEAPI BOOL WINAPI RemoveDirectoryA(LPCSTR);
-WINBASEAPI BOOL WINAPI RemoveDirectoryW(LPCWSTR);
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI ULONG WINAPI RemoveVectoredExceptionHandler(PVOID);
-#endif
-#if (_WIN32_WINNT >= 0x0502)
-WINBASEAPI HANDLE WINAPI ReOpenFile(HANDLE,DWORD,DWORD,DWORD);
-#endif
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI BOOL WINAPI ReplaceFileA(LPCSTR,LPCSTR,LPCSTR,DWORD,LPVOID,LPVOID);
-WINBASEAPI BOOL WINAPI ReplaceFileW(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,LPVOID,LPVOID);
-#endif
-WINBASEAPI BOOL WINAPI ReportEventA(HANDLE,WORD,WORD,DWORD,PSID,WORD,DWORD,LPCSTR*,PVOID);
-WINBASEAPI BOOL WINAPI ReportEventW(HANDLE,WORD,WORD,DWORD,PSID,WORD,DWORD,LPCWSTR*,PVOID);
-#ifdef _WIN32_WCE
-extern BOOL ResetEvent(HANDLE);
-#else
-WINBASEAPI BOOL WINAPI ResetEvent(HANDLE);
-#endif
-WINBASEAPI UINT WINAPI ResetWriteWatch(LPVOID,SIZE_T);
-#if (_WIN32_WINNT >= 0x0510)
-WINBASEAPI VOID WINAPI RestoreLastError(DWORD);
-#endif
-WINBASEAPI DWORD WINAPI ResumeThread(HANDLE);
-WINBASEAPI BOOL WINAPI RevertToSelf(void);
-WINBASEAPI DWORD WINAPI SearchPathA(LPCSTR,LPCSTR,LPCSTR,DWORD,LPSTR,LPSTR*);
-WINBASEAPI DWORD WINAPI SearchPathW(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,LPWSTR,LPWSTR*);
-WINBASEAPI BOOL WINAPI SetAclInformation(PACL,PVOID,DWORD,ACL_INFORMATION_CLASS);
-WINBASEAPI BOOL WINAPI SetCommBreak(HANDLE);
-WINBASEAPI BOOL WINAPI SetCommConfig(HANDLE,LPCOMMCONFIG,DWORD);
-WINBASEAPI BOOL WINAPI SetCommMask(HANDLE,DWORD);
-WINBASEAPI BOOL WINAPI SetCommState(HANDLE,LPDCB);
-WINBASEAPI BOOL WINAPI SetCommTimeouts(HANDLE,LPCOMMTIMEOUTS);
-WINBASEAPI BOOL WINAPI SetComputerNameA(LPCSTR);
-WINBASEAPI BOOL WINAPI SetComputerNameW(LPCWSTR);
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI BOOL WINAPI SetComputerNameExA(COMPUTER_NAME_FORMAT,LPCSTR);
-WINBASEAPI BOOL WINAPI SetComputerNameExW(COMPUTER_NAME_FORMAT,LPCWSTR);
-#endif
-WINBASEAPI BOOL WINAPI SetCurrentDirectoryA(LPCSTR);
-WINBASEAPI BOOL WINAPI SetCurrentDirectoryW(LPCWSTR);
-WINBASEAPI BOOL WINAPI SetDefaultCommConfigA(LPCSTR,LPCOMMCONFIG,DWORD);
-WINBASEAPI BOOL WINAPI SetDefaultCommConfigW(LPCWSTR,LPCOMMCONFIG,DWORD);
-#if (_WIN32_WINNT >= 0x0502)
-WINBASEAPI BOOL WINAPI SetDllDirectoryA(LPCSTR);
-WINBASEAPI BOOL WINAPI SetDllDirectoryW(LPCWSTR);
-#endif
-WINBASEAPI BOOL WINAPI SetEndOfFile(HANDLE);
-WINBASEAPI BOOL WINAPI SetEnvironmentVariableA(LPCSTR,LPCSTR);
-WINBASEAPI BOOL WINAPI SetEnvironmentVariableW(LPCWSTR,LPCWSTR);
-WINBASEAPI UINT WINAPI SetErrorMode(UINT);
-#ifdef _WIN32_WCE
-extern BOOL SetEvent(HANDLE);
-#else
-WINBASEAPI BOOL WINAPI SetEvent(HANDLE);
-#endif
-WINBASEAPI VOID WINAPI SetFileApisToANSI(void);
-WINBASEAPI VOID WINAPI SetFileApisToOEM(void);
-WINBASEAPI BOOL WINAPI SetFileAttributesA(LPCSTR,DWORD);
-WINBASEAPI BOOL WINAPI SetFileAttributesW(LPCWSTR,DWORD);
-WINBASEAPI DWORD WINAPI SetFilePointer(HANDLE,LONG,PLONG,DWORD);
-WINBASEAPI BOOL WINAPI SetFilePointerEx(HANDLE,LARGE_INTEGER,PLARGE_INTEGER,DWORD);
-WINBASEAPI BOOL WINAPI SetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
-WINBASEAPI BOOL WINAPI SetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI BOOL WINAPI SetFileShortNameA(HANDLE,LPCSTR);
-WINBASEAPI BOOL WINAPI SetFileShortNameW(HANDLE,LPCWSTR);
-#endif
-WINBASEAPI BOOL WINAPI SetFileTime(HANDLE,const FILETIME*,const FILETIME*,const FILETIME*);
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI BOOL WINAPI SetFileValidData(HANDLE,LONGLONG);
-#endif
-#if (_WIN32_WINNT >= 0x0502)
-WINBASEAPI BOOL WINAPI SetFirmwareEnvironmentVariableA(LPCSTR,LPCSTR,PVOID,DWORD);
-WINBASEAPI BOOL WINAPI SetFirmwareEnvironmentVariableW(LPCWSTR,LPCWSTR,PVOID,DWORD);
-#endif
-WINBASEAPI UINT WINAPI SetHandleCount(UINT);
-WINBASEAPI BOOL WINAPI SetHandleInformation(HANDLE,DWORD,DWORD);
-WINBASEAPI BOOL WINAPI SetKernelObjectSecurity(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
-WINBASEAPI void WINAPI SetLastError(DWORD);
-WINBASEAPI void WINAPI SetLastErrorEx(DWORD,DWORD);
-WINBASEAPI BOOL WINAPI SetLocalTime(const SYSTEMTIME*);
-WINBASEAPI BOOL WINAPI SetMailslotInfo(HANDLE,DWORD);
-WINBASEAPI BOOL WINAPI SetNamedPipeHandleState(HANDLE,PDWORD,PDWORD,PDWORD);
-WINBASEAPI BOOL WINAPI SetPriorityClass(HANDLE,DWORD);
-WINBASEAPI BOOL WINAPI SetPrivateObjectSecurity(SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR *,PGENERIC_MAPPING,HANDLE);
-WINBASEAPI BOOL WINAPI SetProcessAffinityMask(HANDLE,DWORD);
-#if (_WIN32_WINNT >= 0x0601)
-WINBASEAPI BOOL WINAPI SetProcessDEPPolicy (DWORD);
-#endif
-WINBASEAPI BOOL WINAPI SetProcessPriorityBoost(HANDLE,BOOL);
-WINBASEAPI BOOL WINAPI SetProcessShutdownParameters(DWORD,DWORD);
-WINBASEAPI BOOL WINAPI SetProcessWorkingSetSize(HANDLE,SIZE_T,SIZE_T);
-WINBASEAPI BOOL WINAPI SetSecurityDescriptorControl(PSECURITY_DESCRIPTOR,SECURITY_DESCRIPTOR_CONTROL,SECURITY_DESCRIPTOR_CONTROL);
-WINBASEAPI BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR,BOOL,PACL,BOOL);
-WINBASEAPI BOOL WINAPI SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR,PSID,BOOL);
-WINBASEAPI BOOL WINAPI SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR,PSID,BOOL);
-WINBASEAPI BOOL WINAPI SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR,BOOL,PACL,BOOL);
-WINBASEAPI BOOL WINAPI SetStdHandle(DWORD,HANDLE);
-#define SetSwapAreaSize(w) (w)
-WINBASEAPI BOOL WINAPI SetSystemPowerState(BOOL,BOOL);
-WINBASEAPI BOOL WINAPI SetSystemTime(const SYSTEMTIME*);
-WINBASEAPI BOOL WINAPI SetSystemTimeAdjustment(DWORD,BOOL);
-WINBASEAPI DWORD WINAPI SetTapeParameters(HANDLE,DWORD,PVOID);
-WINBASEAPI DWORD WINAPI SetTapePosition(HANDLE,DWORD,DWORD,DWORD,DWORD,BOOL);
-WINBASEAPI DWORD WINAPI SetThreadAffinityMask(HANDLE,DWORD);
-WINBASEAPI BOOL WINAPI SetThreadContext(HANDLE,const CONTEXT*);
-#if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410)
-WINBASEAPI EXECUTION_STATE WINAPI SetThreadExecutionState(EXECUTION_STATE);
-#endif
-WINBASEAPI DWORD WINAPI SetThreadIdealProcessor(HANDLE,DWORD);
-WINBASEAPI BOOL WINAPI SetThreadPriority(HANDLE,int);
-WINBASEAPI BOOL WINAPI SetThreadPriorityBoost(HANDLE,BOOL);
-WINBASEAPI BOOL WINAPI SetThreadToken (PHANDLE,HANDLE);
-WINBASEAPI BOOL WINAPI SetTimeZoneInformation(const TIME_ZONE_INFORMATION *);
-WINBASEAPI BOOL WINAPI SetTokenInformation(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,DWORD);
-WINBASEAPI LPTOP_LEVEL_EXCEPTION_FILTER WINAPI SetUnhandledExceptionFilter(LPTOP_LEVEL_EXCEPTION_FILTER);
-WINBASEAPI BOOL WINAPI SetupComm(HANDLE,DWORD,DWORD);
-WINBASEAPI BOOL WINAPI SetVolumeLabelA(LPCSTR,LPCSTR);
-WINBASEAPI BOOL WINAPI SetVolumeLabelW(LPCWSTR,LPCWSTR);
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI BOOL WINAPI SetVolumeMountPointA(LPCSTR,LPCSTR);
-WINBASEAPI BOOL WINAPI SetVolumeMountPointW(LPCWSTR,LPCWSTR);
-#endif
-WINBASEAPI BOOL WINAPI SetWaitableTimer(HANDLE,const LARGE_INTEGER*,LONG,PTIMERAPCROUTINE,PVOID,BOOL);
-WINBASEAPI DWORD WINAPI SignalObjectAndWait(HANDLE,HANDLE,DWORD,BOOL);
-WINBASEAPI DWORD WINAPI SizeofResource(HINSTANCE,HRSRC);
-WINBASEAPI void WINAPI Sleep(DWORD);
-WINBASEAPI DWORD WINAPI SleepEx(DWORD,BOOL);
-WINBASEAPI DWORD WINAPI SuspendThread(HANDLE);
-WINBASEAPI void WINAPI SwitchToFiber(PVOID);
-WINBASEAPI BOOL WINAPI SwitchToThread(void);
-WINBASEAPI BOOL WINAPI SystemTimeToFileTime(const SYSTEMTIME*,LPFILETIME);
-WINBASEAPI BOOL WINAPI SystemTimeToTzSpecificLocalTime(LPTIME_ZONE_INFORMATION,LPSYSTEMTIME,LPSYSTEMTIME);
-WINBASEAPI BOOL WINAPI TerminateProcess(HANDLE,UINT);
-WINBASEAPI BOOL WINAPI TerminateThread(HANDLE,DWORD);
-WINBASEAPI DWORD WINAPI TlsAlloc(VOID);
-WINBASEAPI BOOL WINAPI TlsFree(DWORD);
-WINBASEAPI PVOID WINAPI TlsGetValue(DWORD);
-WINBASEAPI BOOL WINAPI TlsSetValue(DWORD,PVOID);
-WINBASEAPI BOOL WINAPI TransactNamedPipe(HANDLE,PVOID,DWORD,PVOID,DWORD,PDWORD,LPOVERLAPPED);
-WINBASEAPI BOOL WINAPI TransmitCommChar(HANDLE,char);
-WINBASEAPI BOOL WINAPI TryEnterCriticalSection(LPCRITICAL_SECTION);
-WINBASEAPI LONG WINAPI UnhandledExceptionFilter(LPEXCEPTION_POINTERS);
-WINBASEAPI BOOL WINAPI UnlockFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
-WINBASEAPI BOOL WINAPI UnlockFileEx(HANDLE,DWORD,DWORD,DWORD,LPOVERLAPPED);
-#define UnlockResource(h) (h)
-#define UnlockSegment(w) GlobalUnfix((HANDLE)(w)) /* Obsolete: Has no effect. */
-WINBASEAPI BOOL WINAPI UnmapViewOfFile(PVOID);
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI BOOL WINAPI UnregisterWait(HANDLE);
-WINBASEAPI BOOL WINAPI UnregisterWaitEx(HANDLE,HANDLE);
-#endif
-WINBASEAPI BOOL WINAPI UpdateResourceA(HANDLE,LPCSTR,LPCSTR,WORD,PVOID,DWORD);
-WINBASEAPI BOOL WINAPI UpdateResourceW(HANDLE,LPCWSTR,LPCWSTR,WORD,PVOID,DWORD);
-WINBASEAPI BOOL WINAPI VerifyVersionInfoA(LPOSVERSIONINFOEXA,DWORD,DWORDLONG);
-WINBASEAPI BOOL WINAPI VerifyVersionInfoW(LPOSVERSIONINFOEXW,DWORD,DWORDLONG);
-WINBASEAPI PVOID WINAPI VirtualAlloc(PVOID,DWORD,DWORD,DWORD);
-WINBASEAPI PVOID WINAPI VirtualAllocEx(HANDLE,PVOID,DWORD,DWORD,DWORD);
-WINBASEAPI BOOL WINAPI VirtualFree(PVOID,DWORD,DWORD);
-WINBASEAPI BOOL WINAPI VirtualFreeEx(HANDLE,PVOID,DWORD,DWORD);
-WINBASEAPI BOOL WINAPI VirtualLock(PVOID,DWORD);
-WINBASEAPI BOOL WINAPI VirtualProtect(PVOID,DWORD,DWORD,PDWORD);
-WINBASEAPI BOOL WINAPI VirtualProtectEx(HANDLE,PVOID,DWORD,DWORD,PDWORD);
-WINBASEAPI DWORD WINAPI VirtualQuery(LPCVOID,PMEMORY_BASIC_INFORMATION,DWORD);
-WINBASEAPI DWORD WINAPI VirtualQueryEx(HANDLE,LPCVOID,PMEMORY_BASIC_INFORMATION,DWORD);
-WINBASEAPI BOOL WINAPI VirtualUnlock(PVOID,DWORD);
-WINBASEAPI BOOL WINAPI WaitCommEvent(HANDLE,PDWORD,LPOVERLAPPED);
-WINBASEAPI BOOL WINAPI WaitForDebugEvent(LPDEBUG_EVENT,DWORD);
-WINBASEAPI DWORD WINAPI WaitForMultipleObjects(DWORD,const HANDLE*,BOOL,DWORD);
-WINBASEAPI DWORD WINAPI WaitForMultipleObjectsEx(DWORD,const HANDLE*,BOOL,DWORD,BOOL);
-WINBASEAPI DWORD WINAPI WaitForSingleObject(HANDLE,DWORD);
-WINBASEAPI DWORD WINAPI WaitForSingleObjectEx(HANDLE,DWORD,BOOL);
-WINBASEAPI BOOL WINAPI WaitNamedPipeA(LPCSTR,DWORD);
-WINBASEAPI BOOL WINAPI WaitNamedPipeW(LPCWSTR,DWORD);
-WINBASEAPI BOOL WINAPI WinLoadTrustProvider(GUID*);
-WINBASEAPI BOOL WINAPI WriteFile(HANDLE,PCVOID,DWORD,PDWORD,LPOVERLAPPED);
-WINBASEAPI BOOL WINAPI WriteFileEx(HANDLE,PCVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE);
-WINBASEAPI BOOL WINAPI WriteFileGather(HANDLE,FILE_SEGMENT_ELEMENT*,DWORD,LPDWORD,LPOVERLAPPED);
-WINBASEAPI BOOL WINAPI WritePrivateProfileSectionA(LPCSTR,LPCSTR,LPCSTR);
-WINBASEAPI BOOL WINAPI WritePrivateProfileSectionW(LPCWSTR,LPCWSTR,LPCWSTR);
-WINBASEAPI BOOL WINAPI WritePrivateProfileStringA(LPCSTR,LPCSTR,LPCSTR,LPCSTR);
-WINBASEAPI BOOL WINAPI WritePrivateProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
-WINBASEAPI BOOL WINAPI WritePrivateProfileStructA(LPCSTR,LPCSTR,LPVOID,UINT,LPCSTR);
-WINBASEAPI BOOL WINAPI WritePrivateProfileStructW(LPCWSTR,LPCWSTR,LPVOID,UINT,LPCWSTR);
-WINBASEAPI BOOL WINAPI WriteProcessMemory(HANDLE,LPVOID,LPCVOID,SIZE_T,SIZE_T*);
-WINBASEAPI BOOL WINAPI WriteProfileSectionA(LPCSTR,LPCSTR);
-WINBASEAPI BOOL WINAPI WriteProfileSectionW(LPCWSTR,LPCWSTR);
-WINBASEAPI BOOL WINAPI WriteProfileStringA(LPCSTR,LPCSTR,LPCSTR);
-WINBASEAPI BOOL WINAPI WriteProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR);
-WINBASEAPI DWORD WINAPI WriteTapemark(HANDLE,DWORD,DWORD,BOOL);
-#define Yield()
-#if (_WIN32_WINNT >= 0x0501)
-WINBASEAPI BOOL WINAPI ZombifyActCtx(HANDLE);
-#endif
-#if (_WIN32_WINNT >= 0x0500)
-WINBASEAPI BOOL WINAPI AllocateUserPhysicalPages(HANDLE,PULONG_PTR,PULONG_PTR);
-WINBASEAPI BOOL WINAPI FreeUserPhysicalPages(HANDLE,PULONG_PTR,PULONG_PTR);
-WINBASEAPI BOOL WINAPI MapUserPhysicalPages(PVOID,ULONG_PTR,PULONG_PTR);
-WINBASEAPI BOOL WINAPI MapUserPhysicalPagesScatter(PVOID*,ULONG_PTR,PULONG_PTR);
-#endif
-
-#ifdef UNICODE
-typedef STARTUPINFOW STARTUPINFO,*LPSTARTUPINFO;
-typedef WIN32_FIND_DATAW WIN32_FIND_DATA,*PWIN32_FIND_DATA,*LPWIN32_FIND_DATA;
-typedef HW_PROFILE_INFOW HW_PROFILE_INFO,*LPHW_PROFILE_INFO;
-#if (_WIN32_WINNT >= 0x0501)
-typedef ACTCTXW ACTCTX,*PACTCTX;
-typedef PCACTCTXW PCACTCTX;
-#endif
-#define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmW
-#define AddAtom AddAtomW
-#define BackupEventLog BackupEventLogW
-#define BeginUpdateResource BeginUpdateResourceW
-#define BuildCommDCB BuildCommDCBW
-#define BuildCommDCBAndTimeouts BuildCommDCBAndTimeoutsW
-#define CallNamedPipe CallNamedPipeW
-#if (_WIN32_WINNT >= 0x0501)
-#define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3W
-#endif
-#define ClearEventLog ClearEventLogW
-#define CommConfigDialog CommConfigDialogW
-#define CopyFile CopyFileW
-#define CopyFileEx CopyFileExW
-#if (_WIN32_WINNT >= 0x0501)
-#define CreateActCtx CreateActCtxW
-#endif
-#define CreateDirectory CreateDirectoryW
-#define CreateDirectoryEx CreateDirectoryExW
-#define CreateEvent CreateEventW
-#define CreateFile CreateFileW
-#define CreateFileMapping CreateFileMappingW
-#if (_WIN32_WINNT >= 0x0500)
-#define CreateHardLink CreateHardLinkW
-#define CreateJobObject CreateJobObjectW
-#endif
-#define CreateMailslot CreateMailslotW
-#define CreateMutex CreateMutexW
-#define CreateNamedPipe CreateNamedPipeW
-#define CreateProcess CreateProcessW
-#define CreateProcessAsUser CreateProcessAsUserW
-#define CreateSemaphore CreateSemaphoreW
-#define CreateWaitableTimer CreateWaitableTimerW
-#define DefineDosDevice DefineDosDeviceW
-#define DeleteFile DeleteFileW
-#if (_WIN32_WINNT >= 0x0500)
-#define DeleteVolumeMountPoint DeleteVolumeMountPointW
-#define DnsHostnameToComputerName DnsHostnameToComputerNameW
-#endif
-#define EncryptFile EncryptFileW
-#define EndUpdateResource EndUpdateResourceW
-#define EnumResourceLanguages EnumResourceLanguagesW
-#define EnumResourceNames EnumResourceNamesW
-#define EnumResourceTypes EnumResourceTypesW
-#define ExpandEnvironmentStrings ExpandEnvironmentStringsW
-#define FatalAppExit FatalAppExitW
-#define FileEncryptionStatus FileEncryptionStatusW
-#if (_WIN32_WINNT >= 0x0501)
-#define FindActCtxSectionString FindActCtxSectionStringW
-#endif
-#define FindAtom FindAtomW
-#define FindFirstChangeNotification FindFirstChangeNotificationW
-#define FindFirstFile FindFirstFileW
-#define FindFirstFileEx FindFirstFileExW
-#if (_WIN32_WINNT >= 0x0500)
-#define FindFirstVolume FindFirstVolumeW
-#define FindFirstVolumeMountPoint FindFirstVolumeMountPointW
-#endif
-#define FindNextFile FindNextFileW
-#if (_WIN32_WINNT >= 0x0500)
-#define FindNextVolume FindNextVolumeW
-#define FindNextVolumeMountPoint FindNextVolumeMountPointW
-#endif
-#define FindResource FindResourceW
-#define FindResourceEx FindResourceExW
-#define FormatMessage FormatMessageW
-#define FreeEnvironmentStrings FreeEnvironmentStringsW
-#define GetAtomName GetAtomNameW
-#define GetBinaryType GetBinaryTypeW
-#define GetCommandLine GetCommandLineW
-#define GetCompressedFileSize GetCompressedFileSizeW
-#define GetComputerName GetComputerNameW
-#define GetCurrentDirectory GetCurrentDirectoryW
-#define GetDefaultCommConfig GetDefaultCommConfigW
-#define GetDiskFreeSpace GetDiskFreeSpaceW
-#define GetDiskFreeSpaceEx GetDiskFreeSpaceExW
-#if (_WIN32_WINNT >= 0x0502)
-#define GetDllDirectory GetDllDirectoryW
-#endif
-#define GetDriveType GetDriveTypeW
-#define GetEnvironmentStrings GetEnvironmentStringsW
-#define GetEnvironmentVariable GetEnvironmentVariableW
-#define GetFileAttributes GetFileAttributesW
-#define GetFileSecurity GetFileSecurityW
-#define GetFileAttributesEx GetFileAttributesExW
-#define GetFullPathName GetFullPathNameW
-#define GetLogicalDriveStrings GetLogicalDriveStringsW
-#if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410)
-#define GetLongPathName GetLongPathNameW
-#endif
-#define GetModuleFileName GetModuleFileNameW
-#define GetModuleHandle GetModuleHandleW
-#if (_WIN32_WINNT >= 0x0500)
-#define GetModuleHandleEx GetModuleHandleExW
-#endif
-#define GetNamedPipeHandleState GetNamedPipeHandleStateW
-#define GetPrivateProfileInt GetPrivateProfileIntW
-#define GetPrivateProfileSection GetPrivateProfileSectionW
-#define GetPrivateProfileSectionNames GetPrivateProfileSectionNamesW
-#define GetPrivateProfileString GetPrivateProfileStringW
-#define GetPrivateProfileStruct GetPrivateProfileStructW
-#define GetProfileInt GetProfileIntW
-#define GetProfileSection GetProfileSectionW
-#define GetProfileString GetProfileStringW
-#define GetShortPathName GetShortPathNameW
-#define GetStartupInfo GetStartupInfoW
-#define GetSystemDirectory GetSystemDirectoryW
-#if (_WIN32_WINNT >= 0x0500)
-#define GetSystemWindowsDirectory GetSystemWindowsDirectoryW
-#endif
-#if (_WIN32_WINNT >= 0x0501)
-#define GetSystemWow64Directory GetSystemWow64DirectoryW
-#endif
-#define GetTempFileName GetTempFileNameW
-#define GetTempPath GetTempPathW
-#define GetUserName GetUserNameW
-#define GetVersionEx GetVersionExW
-#define GetVolumeInformation GetVolumeInformationW
-#define GetVolumeNameForVolumeMountPoint GetVolumeNameForVolumeMountPointW
-#define GetVolumePathName GetVolumePathNameW
-#define GetVolumePathNamesForVolumeName GetVolumePathNamesForVolumeNameW
-#define GetWindowsDirectory GetWindowsDirectoryW
-#define GlobalAddAtom GlobalAddAtomW
-#define GlobalFindAtom GlobalFindAtomW
-#define GlobalGetAtomName GlobalGetAtomNameW
-#define IsBadStringPtr IsBadStringPtrW
-#define LoadLibrary LoadLibraryW
-#define LoadLibraryEx LoadLibraryExW
-#define LogonUser LogonUserW
-#define LookupAccountName LookupAccountNameW
-#define LookupAccountSid LookupAccountSidW
-#define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameW
-#define LookupPrivilegeName LookupPrivilegeNameW
-#define LookupPrivilegeValue LookupPrivilegeValueW
-#define lstrcat lstrcatW
-#define lstrcmp lstrcmpW
-#define lstrcmpi lstrcmpiW
-#define lstrcpy lstrcpyW
-#define lstrcpyn lstrcpynW
-#define lstrlen lstrlenW
-#define MoveFile MoveFileW
-#define MoveFileEx MoveFileExW
-#define ObjectCloseAuditAlarm ObjectCloseAuditAlarmW
-#define ObjectDeleteAuditAlarm ObjectDeleteAuditAlarmW
-#define ObjectOpenAuditAlarm ObjectOpenAuditAlarmW
-#define ObjectPrivilegeAuditAlarm ObjectPrivilegeAuditAlarmW
-#define OpenBackupEventLog OpenBackupEventLogW
-#define OpenEvent OpenEventW
-#define OpenEventLog OpenEventLogW
-#define OpenFileMapping OpenFileMappingW
-#define OpenMutex OpenMutexW
-#define OpenSemaphore OpenSemaphoreW
-#define OutputDebugString OutputDebugStringW
-#define PrivilegedServiceAuditAlarm PrivilegedServiceAuditAlarmW
-#define QueryDosDevice QueryDosDeviceW
-#define ReadEventLog ReadEventLogW
-#define RegisterEventSource RegisterEventSourceW
-#define RemoveDirectory RemoveDirectoryW
-#if (_WIN32_WINNT >= 0x0500)
-#define ReplaceFile ReplaceFileW
-#endif
-#define ReportEvent ReportEventW
-#define SearchPath SearchPathW
-#define SetComputerName SetComputerNameW
-#define SetCurrentDirectory SetCurrentDirectoryW
-#define SetDefaultCommConfig SetDefaultCommConfigW
-#if (_WIN32_WINNT >= 0x0502)
-#define SetDllDirectory SetDllDirectoryW
-#endif
-#define SetEnvironmentVariable SetEnvironmentVariableW
-#define SetFileAttributes SetFileAttributesW
-#define SetFileSecurity SetFileSecurityW
-#if (_WIN32_WINNT >= 0x0501)
-#define SetFileShortName SetFileShortNameW
-#endif
-#if (_WIN32_WINNT >= 0x0502)
-#define SetFirmwareEnvironmentVariable SetFirmwareEnvironmentVariableW
-#endif
-#define SetVolumeLabel SetVolumeLabelW
-#define SetVolumeMountPoint SetVolumeMountPointW
-#define UpdateResource UpdateResourceW
-#define VerifyVersionInfo VerifyVersionInfoW
-#define WaitNamedPipe WaitNamedPipeW
-#define WritePrivateProfileSection WritePrivateProfileSectionW
-#define WritePrivateProfileString WritePrivateProfileStringW
-#define WritePrivateProfileStruct WritePrivateProfileStructW
-#define WriteProfileSection WriteProfileSectionW
-#define WriteProfileString WriteProfileStringW
-#else
-typedef STARTUPINFOA STARTUPINFO,*LPSTARTUPINFO;
-typedef WIN32_FIND_DATAA WIN32_FIND_DATA,*PWIN32_FIND_DATA,*LPWIN32_FIND_DATA;
-typedef HW_PROFILE_INFOA HW_PROFILE_INFO,*LPHW_PROFILE_INFO;
-#if (_WIN32_WINNT >= 0x0501)
-typedef ACTCTXA ACTCTX,*PACTCTX;
-typedef PCACTCTXA PCACTCTX;
-#endif
-#define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmA
-#define AddAtom AddAtomA
-#define BackupEventLog BackupEventLogA
-#define BeginUpdateResource BeginUpdateResourceA
-#define BuildCommDCB BuildCommDCBA
-#define BuildCommDCBAndTimeouts BuildCommDCBAndTimeoutsA
-#define CallNamedPipe CallNamedPipeA
-#if (_WIN32_WINNT >= 0x0501)
-#define CheckNameLegalDOS8Dot3 CheckNameLegalDOS8Dot3A
-#endif
-#define ClearEventLog ClearEventLogA
-#define CommConfigDialog CommConfigDialogA
-#define CopyFile CopyFileA
-#define CopyFileEx CopyFileExA
-#if (_WIN32_WINNT >= 0x0501)
-#define CreateActCtx CreateActCtxA
-#endif
-#define CreateDirectory CreateDirectoryA
-#define CreateDirectoryEx CreateDirectoryExA
-#define CreateEvent CreateEventA
-#define CreateFile CreateFileA
-#define CreateFileMapping CreateFileMappingA
-#if (_WIN32_WINNT >= 0x0500)
-#define CreateHardLink CreateHardLinkA
-#define CreateJobObject CreateJobObjectA
-#endif
-#define CreateMailslot CreateMailslotA
-#define CreateMutex CreateMutexA
-#define CreateNamedPipe CreateNamedPipeA
-#define CreateProcess CreateProcessA
-#define CreateProcessAsUser CreateProcessAsUserA
-#define CreateSemaphore CreateSemaphoreA
-#define CreateWaitableTimer CreateWaitableTimerA
-#define DefineDosDevice DefineDosDeviceA
-#define DeleteFile DeleteFileA
-#if (_WIN32_WINNT >= 0x0500)
-#define DeleteVolumeMountPoint DeleteVolumeMountPointA
-#define DnsHostnameToComputerName DnsHostnameToComputerNameA
-#endif
-#define EncryptFile EncryptFileA
-#define EndUpdateResource EndUpdateResourceA
-#define EnumResourceLanguages EnumResourceLanguagesA
-#define EnumResourceNames EnumResourceNamesA
-#define EnumResourceTypes EnumResourceTypesA
-#define ExpandEnvironmentStrings ExpandEnvironmentStringsA
-#define FatalAppExit FatalAppExitA
-#define FileEncryptionStatus FileEncryptionStatusA
-#if (_WIN32_WINNT >= 0x0501)
-#define FindActCtxSectionString FindActCtxSectionStringA
-#endif
-#define FindAtom FindAtomA
-#define FindFirstChangeNotification FindFirstChangeNotificationA
-#define FindFirstFile FindFirstFileA
-#define FindFirstFileEx FindFirstFileExA
-#if (_WIN32_WINNT >= 0x0500)
-#define FindFirstVolume FindFirstVolumeA
-#define FindFirstVolumeMountPoint FindFirstVolumeMountPointA
-#endif
-#define FindNextFile FindNextFileA
-#if (_WIN32_WINNT >= 0x0500)
-#define FindNextVolume FindNextVolumeA
-#define FindNextVolumeMountPoint FindNextVolumeMountPointA
-#endif
-#define FindResource FindResourceA
-#define FindResourceEx FindResourceExA
-#define FormatMessage FormatMessageA
-#define FreeEnvironmentStrings FreeEnvironmentStringsA
-#define GetAtomName GetAtomNameA
-#define GetBinaryType GetBinaryTypeA
-#define GetCommandLine GetCommandLineA
-#define GetComputerName GetComputerNameA
-#define GetCompressedFileSize GetCompressedFileSizeA
-#define GetCurrentDirectory GetCurrentDirectoryA
-#define GetDefaultCommConfig GetDefaultCommConfigA
-#define GetDiskFreeSpace GetDiskFreeSpaceA
-#define GetDiskFreeSpaceEx GetDiskFreeSpaceExA
-#if (_WIN32_WINNT >= 0x0502)
-#define GetDllDirectory GetDllDirectoryA
-#endif
-#define GetDriveType GetDriveTypeA
-#define GetEnvironmentVariable GetEnvironmentVariableA
-#define GetFileAttributes GetFileAttributesA
-#define GetFileSecurity GetFileSecurityA
-#define GetFileAttributesEx GetFileAttributesExA
-#define GetFullPathName GetFullPathNameA
-#define GetLogicalDriveStrings GetLogicalDriveStringsA
-#if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410)
-#define GetLongPathName GetLongPathNameA
-#endif
-#define GetNamedPipeHandleState GetNamedPipeHandleStateA
-#define GetModuleHandle GetModuleHandleA
-#if (_WIN32_WINNT >= 0x0500)
-#define GetModuleHandleEx GetModuleHandleExA
-#endif
-#define GetModuleFileName GetModuleFileNameA
-#define GetPrivateProfileInt GetPrivateProfileIntA
-#define GetPrivateProfileSection GetPrivateProfileSectionA
-#define GetPrivateProfileSectionNames GetPrivateProfileSectionNamesA
-#define GetPrivateProfileString GetPrivateProfileStringA
-#define GetPrivateProfileStruct GetPrivateProfileStructA
-#define GetProfileInt GetProfileIntA
-#define GetProfileSection GetProfileSectionA
-#define GetProfileString GetProfileStringA
-#define GetShortPathName GetShortPathNameA
-#define GetStartupInfo GetStartupInfoA
-#define GetSystemDirectory GetSystemDirectoryA
-#if (_WIN32_WINNT >= 0x0500)
-#define GetSystemWindowsDirectory GetSystemWindowsDirectoryA
-#endif
-#if (_WIN32_WINNT >= 0x0501)
-#define GetSystemWow64Directory GetSystemWow64DirectoryA
-#endif
-#define GetTempFileName GetTempFileNameA
-#define GetTempPath GetTempPathA
-#define GetUserName GetUserNameA
-#define GetVersionEx GetVersionExA
-#define GetVolumeInformation GetVolumeInformationA
-#define GetVolumeNameForVolumeMountPoint GetVolumeNameForVolumeMountPointA
-#define GetVolumePathName GetVolumePathNameA
-#define GetVolumePathNamesForVolumeName GetVolumePathNamesForVolumeNameA
-#define GetWindowsDirectory GetWindowsDirectoryA
-#define GlobalAddAtom GlobalAddAtomA
-#define GlobalFindAtom GlobalFindAtomA
-#define GlobalGetAtomName GlobalGetAtomNameA
-#define IsBadStringPtr IsBadStringPtrA
-#define LoadLibrary LoadLibraryA
-#define LoadLibraryEx LoadLibraryExA
-#define LogonUser LogonUserA
-#define LookupAccountName LookupAccountNameA
-#define LookupAccountSid LookupAccountSidA
-#define LookupPrivilegeDisplayName LookupPrivilegeDisplayNameA
-#define LookupPrivilegeName LookupPrivilegeNameA
-#define LookupPrivilegeValue LookupPrivilegeValueA
-#define lstrcat lstrcatA
-#define lstrcmp lstrcmpA
-#define lstrcmpi lstrcmpiA
-#define lstrcpy lstrcpyA
-#define lstrcpyn lstrcpynA
-#define lstrlen lstrlenA
-#define MoveFile MoveFileA
-#define MoveFileEx MoveFileExA
-#define ObjectCloseAuditAlarm ObjectCloseAuditAlarmA
-#define ObjectDeleteAuditAlarm ObjectDeleteAuditAlarmA
-#define ObjectOpenAuditAlarm ObjectOpenAuditAlarmA
-#define ObjectPrivilegeAuditAlarm ObjectPrivilegeAuditAlarmA
-#define OpenBackupEventLog OpenBackupEventLogA
-#define OpenEvent OpenEventA
-#define OpenEventLog OpenEventLogA
-#define OpenFileMapping OpenFileMappingA
-#define OpenMutex OpenMutexA
-#define OpenSemaphore OpenSemaphoreA
-#define OutputDebugString OutputDebugStringA
-#define PrivilegedServiceAuditAlarm PrivilegedServiceAuditAlarmA
-#define QueryDosDevice QueryDosDeviceA
-#define ReadEventLog ReadEventLogA
-#define RegisterEventSource RegisterEventSourceA
-#define RemoveDirectory RemoveDirectoryA
-#if (_WIN32_WINNT >= 0x0500)
-#define ReplaceFile ReplaceFileA
-#endif
-#define ReportEvent ReportEventA
-#define SearchPath SearchPathA
-#define SetComputerName SetComputerNameA
-#define SetCurrentDirectory SetCurrentDirectoryA
-#define SetDefaultCommConfig SetDefaultCommConfigA
-#if (_WIN32_WINNT >= 0x0502)
-#define SetDllDirectory SetDllDirectoryA
-#endif
-#define SetEnvironmentVariable SetEnvironmentVariableA
-#define SetFileAttributes SetFileAttributesA
-#define SetFileSecurity SetFileSecurityA
-#if (_WIN32_WINNT >= 0x0501)
-#define SetFileShortName SetFileShortNameA
-#endif
-#if (_WIN32_WINNT >= 0x0502)
-#define SetFirmwareEnvironmentVariable SetFirmwareEnvironmentVariableA
-#endif
-#define SetVolumeLabel SetVolumeLabelA
-#define SetVolumeMountPoint SetVolumeMountPointA
-#define UpdateResource UpdateResourceA
-#define VerifyVersionInfo VerifyVersionInfoA
-#define WaitNamedPipe WaitNamedPipeA
-#define WritePrivateProfileSection WritePrivateProfileSectionA
-#define WritePrivateProfileString WritePrivateProfileStringA
-#define WritePrivateProfileStruct WritePrivateProfileStructA
-#define WriteProfileSection WriteProfileSectionA
-#define WriteProfileString WriteProfileStringA
-#endif
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _WINBASE_H */
diff --git a/winsup/w32api/include/winber.h b/winsup/w32api/include/winber.h
deleted file mode 100644
index 462a66d..0000000
--- a/winsup/w32api/include/winber.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- winber.h - Header file for the Windows LDAP Basic Encoding Rules API
-
- Written by Filip Navara <xnavara@volny.cz>
-
- References:
- The C LDAP Application Program Interface
- http://www.watersprings.org/pub/id/draft-ietf-ldapext-ldap-c-api-05.txt
-
- Lightweight Directory Access Protocol Reference
- http://msdn.microsoft.com/library/en-us/netdir/ldap/ldap_reference.asp
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-*/
-
-#ifndef _WINBER_H
-#define _WINBER_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef WINBERAPI
-#define WINBERAPI DECLSPEC_IMPORT
-#endif
-
-typedef struct berelement BerElement;
-typedef ULONG ber_len_t;
-#include <pshpack4.h>
-typedef struct berval {
- ber_len_t bv_len;
- char *bv_val;
-} BerValue, LDAP_BERVAL, *PLDAP_BERVAL, BERVAL, *PBERVAL;
-#include <poppack.h>
-
-typedef ULONG ber_tag_t;
-typedef INT ber_int_t;
-typedef UINT ber_uint_t;
-typedef INT ber_slen_t;
-
-#define LBER_ERROR ((ber_tag_t)-1)
-#define LBER_DEFAULT ((ber_tag_t)-1)
-#define LBER_USE_DER 0x01
-
-WINBERAPI BerElement *ber_init(const BerValue*);
-WINBERAPI int ber_printf(BerElement*,const char*,...);
-WINBERAPI int ber_flatten(BerElement*,BerValue**);
-WINBERAPI ber_tag_t ber_scanf(BerElement*,const char*,...);
-WINBERAPI ber_tag_t ber_peek_tag(BerElement*,ber_len_t*);
-WINBERAPI ber_tag_t ber_skip_tag(BerElement*,ber_len_t*);
-WINBERAPI ber_tag_t ber_first_element(BerElement*,ber_len_t*,char**);
-WINBERAPI ber_tag_t ber_next_element(BerElement*,ber_len_t*,char*);
-WINBERAPI void ber_bvfree(BerValue*);
-WINBERAPI void ber_bvecfree(BerValue**);
-WINBERAPI void ber_free(BerElement*,int);
-WINBERAPI BerValue *ber_bvdup(BerValue*);
-WINBERAPI BerElement *ber_alloc_t(int);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _WINBER_H */
diff --git a/winsup/w32api/include/wincon.h b/winsup/w32api/include/wincon.h
deleted file mode 100644
index e326d09..0000000
--- a/winsup/w32api/include/wincon.h
+++ /dev/null
@@ -1,232 +0,0 @@
-#ifndef _WINCON_H
-#define _WINCON_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define FOREGROUND_BLUE 1
-#define FOREGROUND_GREEN 2
-#define FOREGROUND_RED 4
-#define FOREGROUND_INTENSITY 8
-#define BACKGROUND_BLUE 16
-#define BACKGROUND_GREEN 32
-#define BACKGROUND_RED 64
-#define BACKGROUND_INTENSITY 128
-#if (_WIN32_WINNT >= 0x0501)
-#define CONSOLE_FULLSCREEN_MODE 1
-#define CONSOLE_WINDOWED_MODE 2
-#endif
-#define CTRL_C_EVENT 0
-#define CTRL_BREAK_EVENT 1
-#define CTRL_CLOSE_EVENT 2
-#define CTRL_LOGOFF_EVENT 5
-#define CTRL_SHUTDOWN_EVENT 6
-#define ENABLE_LINE_INPUT 2
-#define ENABLE_ECHO_INPUT 4
-#define ENABLE_PROCESSED_INPUT 1
-#define ENABLE_WINDOW_INPUT 8
-#define ENABLE_MOUSE_INPUT 16
-#define ENABLE_INSERT_MODE 32
-#define ENABLE_QUICK_EDIT_MODE 64
-#define ENABLE_EXTENDED_FLAGS 128
-#define ENABLE_AUTO_POSITION 256
-#define ENABLE_PROCESSED_OUTPUT 1
-#define ENABLE_WRAP_AT_EOL_OUTPUT 2
-#define KEY_EVENT 1
-#define MOUSE_EVENT 2
-#define WINDOW_BUFFER_SIZE_EVENT 4
-#define MENU_EVENT 8
-#define FOCUS_EVENT 16
-#define CAPSLOCK_ON 128
-#define ENHANCED_KEY 256
-#define RIGHT_ALT_PRESSED 1
-#define LEFT_ALT_PRESSED 2
-#define RIGHT_CTRL_PRESSED 4
-#define LEFT_CTRL_PRESSED 8
-#define SHIFT_PRESSED 16
-#define NUMLOCK_ON 32
-#define SCROLLLOCK_ON 64
-#define FROM_LEFT_1ST_BUTTON_PRESSED 1
-#define RIGHTMOST_BUTTON_PRESSED 2
-#define FROM_LEFT_2ND_BUTTON_PRESSED 4
-#define FROM_LEFT_3RD_BUTTON_PRESSED 8
-#define FROM_LEFT_4TH_BUTTON_PRESSED 16
-#define MOUSE_MOVED 1
-#define DOUBLE_CLICK 2
-#define MOUSE_WHEELED 4
-
-typedef struct _CHAR_INFO {
- union {
- WCHAR UnicodeChar;
- CHAR AsciiChar;
- } Char;
- WORD Attributes;
-} CHAR_INFO, *PCHAR_INFO;
-typedef struct _SMALL_RECT {
- SHORT Left;
- SHORT Top;
- SHORT Right;
- SHORT Bottom;
-} SMALL_RECT, *PSMALL_RECT;
-typedef struct _CONSOLE_CURSOR_INFO {
- DWORD dwSize;
- BOOL bVisible;
-} CONSOLE_CURSOR_INFO,*PCONSOLE_CURSOR_INFO;
-typedef struct _COORD {
- SHORT X;
- SHORT Y;
-} COORD, *PCOORD;
-typedef struct _CONSOLE_FONT_INFO {
- DWORD nFont;
- COORD dwFontSize;
-} CONSOLE_FONT_INFO, *PCONSOLE_FONT_INFO;
-typedef struct _CONSOLE_SCREEN_BUFFER_INFO {
- COORD dwSize;
- COORD dwCursorPosition;
- WORD wAttributes;
- SMALL_RECT srWindow;
- COORD dwMaximumWindowSize;
-} CONSOLE_SCREEN_BUFFER_INFO,*PCONSOLE_SCREEN_BUFFER_INFO;
-typedef BOOL(CALLBACK *PHANDLER_ROUTINE)(DWORD);
-typedef struct _KEY_EVENT_RECORD {
- BOOL bKeyDown;
- WORD wRepeatCount;
- WORD wVirtualKeyCode;
- WORD wVirtualScanCode;
- union {
- WCHAR UnicodeChar;
- CHAR AsciiChar;
- } uChar;
- DWORD dwControlKeyState;
-}
-#ifdef __GNUC__
-/* gcc's alignment is not what win32 expects */
- PACKED
-#endif
-KEY_EVENT_RECORD;
-
-typedef struct _MOUSE_EVENT_RECORD {
- COORD dwMousePosition;
- DWORD dwButtonState;
- DWORD dwControlKeyState;
- DWORD dwEventFlags;
-} MOUSE_EVENT_RECORD;
-typedef struct _WINDOW_BUFFER_SIZE_RECORD { COORD dwSize; } WINDOW_BUFFER_SIZE_RECORD;
-typedef struct _MENU_EVENT_RECORD { UINT dwCommandId; } MENU_EVENT_RECORD,*PMENU_EVENT_RECORD;
-typedef struct _FOCUS_EVENT_RECORD { BOOL bSetFocus; } FOCUS_EVENT_RECORD;
-typedef struct _INPUT_RECORD {
- WORD EventType;
- union {
- KEY_EVENT_RECORD KeyEvent;
- MOUSE_EVENT_RECORD MouseEvent;
- WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
- MENU_EVENT_RECORD MenuEvent;
- FOCUS_EVENT_RECORD FocusEvent;
- } Event;
-} INPUT_RECORD,*PINPUT_RECORD;
-
-BOOL WINAPI AllocConsole(void);
-#if (_WIN32_WINNT >= 0x0500)
-#define ATTACH_PARENT_PROCESS ((DWORD)-1)
-BOOL WINAPI AttachConsole(DWORD);
-#endif
-HANDLE WINAPI CreateConsoleScreenBuffer(DWORD,DWORD,CONST SECURITY_ATTRIBUTES*,DWORD,LPVOID);
-BOOL WINAPI FillConsoleOutputAttribute(HANDLE,WORD,DWORD,COORD,PDWORD);
-BOOL WINAPI FillConsoleOutputCharacterA(HANDLE,CHAR,DWORD,COORD,PDWORD);
-BOOL WINAPI FillConsoleOutputCharacterW(HANDLE,WCHAR,DWORD,COORD,PDWORD);
-BOOL WINAPI FlushConsoleInputBuffer(HANDLE);
-BOOL WINAPI FreeConsole(void);
-BOOL WINAPI GenerateConsoleCtrlEvent(DWORD,DWORD);
-UINT WINAPI GetConsoleCP(void);
-BOOL WINAPI GetConsoleCursorInfo(HANDLE,PCONSOLE_CURSOR_INFO);
-BOOL WINAPI GetConsoleMode(HANDLE,PDWORD);
-UINT WINAPI GetConsoleOutputCP(void);
-BOOL WINAPI GetConsoleScreenBufferInfo(HANDLE,PCONSOLE_SCREEN_BUFFER_INFO);
-DWORD WINAPI GetConsoleTitleA(LPSTR,DWORD);
-DWORD WINAPI GetConsoleTitleW(LPWSTR,DWORD);
-#if (_WIN32_WINNT >= 0x0500)
-BOOL WINAPI GetConsoleDisplayMode(LPDWORD);
-HWND WINAPI GetConsoleWindow(void);
-#endif
-#if (_WIN32_WINNT >= 0x0501)
-DWORD WINAPI GetConsoleProcessList(LPDWORD, DWORD);
-#endif
-COORD WINAPI GetLargestConsoleWindowSize(HANDLE);
-BOOL WINAPI GetNumberOfConsoleInputEvents(HANDLE,PDWORD);
-BOOL WINAPI GetNumberOfConsoleMouseButtons(PDWORD);
-BOOL WINAPI PeekConsoleInputA(HANDLE,PINPUT_RECORD,DWORD,PDWORD);
-BOOL WINAPI PeekConsoleInputW(HANDLE,PINPUT_RECORD,DWORD,PDWORD);
-BOOL WINAPI ReadConsoleA(HANDLE,PVOID,DWORD,PDWORD,PVOID);
-BOOL WINAPI ReadConsoleW(HANDLE,PVOID,DWORD,PDWORD,PVOID);
-BOOL WINAPI ReadConsoleInputA(HANDLE,PINPUT_RECORD,DWORD,PDWORD);
-BOOL WINAPI ReadConsoleInputW(HANDLE,PINPUT_RECORD,DWORD,PDWORD);
-BOOL WINAPI ReadConsoleOutputAttribute(HANDLE,LPWORD,DWORD,COORD,LPDWORD);
-BOOL WINAPI ReadConsoleOutputCharacterA(HANDLE,LPSTR,DWORD,COORD,PDWORD);
-BOOL WINAPI ReadConsoleOutputCharacterW(HANDLE,LPWSTR,DWORD,COORD,PDWORD);
-BOOL WINAPI ReadConsoleOutputA(HANDLE,PCHAR_INFO,COORD,COORD,PSMALL_RECT);
-BOOL WINAPI ReadConsoleOutputW(HANDLE,PCHAR_INFO,COORD,COORD,PSMALL_RECT);
-BOOL WINAPI ScrollConsoleScreenBufferA(HANDLE,const SMALL_RECT*,const SMALL_RECT*,COORD,const CHAR_INFO*);
-BOOL WINAPI ScrollConsoleScreenBufferW(HANDLE,const SMALL_RECT*,const SMALL_RECT*,COORD,const CHAR_INFO*);
-BOOL WINAPI SetConsoleActiveScreenBuffer(HANDLE);
-BOOL WINAPI SetConsoleCP(UINT);
-BOOL WINAPI SetConsoleCtrlHandler(PHANDLER_ROUTINE,BOOL);
-BOOL WINAPI SetConsoleCursorInfo(HANDLE,const CONSOLE_CURSOR_INFO*);
-BOOL WINAPI SetConsoleCursorPosition(HANDLE,COORD);
-#if (_WIN32_WINNT >= 0x0501)
-BOOL WINAPI SetConsoleDisplayMode(HANDLE,DWORD,PCOORD);
-#endif
-BOOL WINAPI SetConsoleMode(HANDLE,DWORD);
-BOOL WINAPI SetConsoleOutputCP(UINT);
-BOOL WINAPI SetConsoleScreenBufferSize(HANDLE,COORD);
-BOOL WINAPI SetConsoleTextAttribute(HANDLE,WORD);
-BOOL WINAPI SetConsoleTitleA(LPCSTR);
-BOOL WINAPI SetConsoleTitleW(LPCWSTR);
-BOOL WINAPI SetConsoleWindowInfo(HANDLE,BOOL,const SMALL_RECT*);
-BOOL WINAPI WriteConsoleA(HANDLE,PCVOID,DWORD,PDWORD,PVOID);
-BOOL WINAPI WriteConsoleW(HANDLE,PCVOID,DWORD,PDWORD,PVOID);
-BOOL WINAPI WriteConsoleInputA(HANDLE,const INPUT_RECORD*,DWORD,PDWORD);
-BOOL WINAPI WriteConsoleInputW(HANDLE,const INPUT_RECORD*,DWORD,PDWORD);
-BOOL WINAPI WriteConsoleOutputA(HANDLE,const CHAR_INFO*,COORD,COORD,PSMALL_RECT);
-BOOL WINAPI WriteConsoleOutputW(HANDLE,const CHAR_INFO*,COORD,COORD,PSMALL_RECT);
-BOOL WINAPI WriteConsoleOutputAttribute(HANDLE,const WORD*,DWORD,COORD,PDWORD);
-BOOL WINAPI WriteConsoleOutputCharacterA(HANDLE,LPCSTR,DWORD,COORD,PDWORD);
-BOOL WINAPI WriteConsoleOutputCharacterW(HANDLE,LPCWSTR,DWORD,COORD,PDWORD);
-
-#ifdef UNICODE
-#define FillConsoleOutputCharacter FillConsoleOutputCharacterW
-#define GetConsoleTitle GetConsoleTitleW
-#define PeekConsoleInput PeekConsoleInputW
-#define ReadConsole ReadConsoleW
-#define ReadConsoleInput ReadConsoleInputW
-#define ReadConsoleOutput ReadConsoleOutputW
-#define ReadConsoleOutputCharacter ReadConsoleOutputCharacterW
-#define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferW
-#define SetConsoleTitle SetConsoleTitleW
-#define WriteConsole WriteConsoleW
-#define WriteConsoleInput WriteConsoleInputW
-#define WriteConsoleOutput WriteConsoleOutputW
-#define WriteConsoleOutputCharacter WriteConsoleOutputCharacterW
-#else
-#define FillConsoleOutputCharacter FillConsoleOutputCharacterA
-#define GetConsoleTitle GetConsoleTitleA
-#define PeekConsoleInput PeekConsoleInputA
-#define ReadConsole ReadConsoleA
-#define ReadConsoleInput ReadConsoleInputA
-#define ReadConsoleOutput ReadConsoleOutputA
-#define ReadConsoleOutputCharacter ReadConsoleOutputCharacterA
-#define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferA
-#define SetConsoleTitle SetConsoleTitleA
-#define WriteConsole WriteConsoleA
-#define WriteConsoleInput WriteConsoleInputA
-#define WriteConsoleOutput WriteConsoleOutputA
-#define WriteConsoleOutputCharacter WriteConsoleOutputCharacterA
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/wincrypt.h b/winsup/w32api/include/wincrypt.h
deleted file mode 100644
index a89706b..0000000
--- a/winsup/w32api/include/wincrypt.h
+++ /dev/null
@@ -1,1318 +0,0 @@
-#ifndef _WINCRYPT_H
-#define _WINCRYPT_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifndef WINADVAPI
-#define WINADVAPI
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define MS_DEF_PROV_A "Microsoft Base Cryptographic Provider v1.0"
-#define MS_DEF_PROV_W L"Microsoft Base Cryptographic Provider v1.0"
-#define MS_ENHANCED_PROV_A "Microsoft Enhanced Cryptographic Provider v1.0"
-#define MS_ENHANCED_PROV_W L"Microsoft Enhanced Cryptographic Provider v1.0"
-#define MS_STRONG_PROV_A "Microsoft Strong Cryptographic Provider"
-#define MS_STRONG_PROV_W L"Microsoft Strong Cryptographic Provider"
-#define MS_DEF_RSA_SIG_PROV_A "Microsoft RSA Signature Cryptographic Provider"
-#define MS_DEF_RSA_SIG_PROV_W L"Microsoft RSA Signature Cryptographic Provider"
-#define MS_DEF_RSA_SCHANNEL_PROV_A "Microsoft RSA SChannel Cryptographic Provider"
-#define MS_DEF_RSA_SCHANNEL_PROV_W L"Microsoft RSA SChannel Cryptographic Provider"
-#define MS_DEF_DSS_PROV_A "Microsoft Base DSS Cryptographic Provider"
-#define MS_DEF_DSS_PROV_W L"Microsoft Base DSS Cryptographic Provider"
-#define MS_DEF_DSS_DH_PROV_A "Microsoft Base DSS and Diffie-Hellman Cryptographic Provider"
-#define MS_DEF_DSS_DH_PROV_W L"Microsoft Base DSS and Diffie-Hellman Cryptographic Provider"
-#define MS_ENH_DSS_DH_PROV_A "Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider"
-#define MS_ENH_DSS_DH_PROV_W L"Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider"
-#define MS_DEF_DH_SCHANNEL_PROV_A "Microsoft DH SChannel Cryptographic Provider"
-#define MS_DEF_DH_SCHANNEL_PROV_W L"Microsoft DH SChannel Cryptographic Provider"
-#define MS_SCARD_PROV_A "Microsoft Base Smart Card Crypto Provider"
-#define MS_SCARD_PROV_W L"Microsoft Base Smart Card Crypto Provider"
-#if (_WIN32_WINNT == 0x0501)
-#define MS_ENH_RSA_AES_PROV_A "Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)"
-#define MS_ENH_RSA_AES_PROV_W L"Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)"
-#elif (_WIN32_WINNT > 0x0501)
-#define MS_ENH_RSA_AES_PROV_A "Microsoft Enhanced RSA and AES Cryptographic Provider"
-#define MS_ENH_RSA_AES_PROV_W L"Microsoft Enhanced RSA and AES Cryptographic Provider"
-#endif
-
-#define GET_ALG_CLASS(x) (x&57344)
-#define GET_ALG_TYPE(x) (x&7680)
-#define GET_ALG_SID(x) (x&511)
-#define ALG_CLASS_ANY 0
-#define ALG_CLASS_SIGNATURE 8192
-#define ALG_CLASS_MSG_ENCRYPT 16384
-#define ALG_CLASS_DATA_ENCRYPT 24576
-#define ALG_CLASS_HASH 32768
-#define ALG_CLASS_KEY_EXCHANGE 40960
-#define ALG_CLASS_ALL 57344 /* (7 << 13) */
-#define ALG_TYPE_ANY 0
-#define ALG_TYPE_DSS 512
-#define ALG_TYPE_RSA 1024
-#define ALG_TYPE_BLOCK 1536
-#define ALG_TYPE_STREAM 2048
-#define ALG_TYPE_DH 2560 /* (5 << 9) */
-#define ALG_TYPE_SECURECHANNEL 3072 /* (6 << 9) */
-#define ALG_SID_ANY 0
-#define ALG_SID_RSA_ANY 0
-#define ALG_SID_RSA_PKCS 1
-#define ALG_SID_RSA_MSATWORK 2
-#define ALG_SID_RSA_ENTRUST 3
-#define ALG_SID_RSA_PGP 4
-#define ALG_SID_DSS_ANY 0
-#define ALG_SID_DSS_PKCS 1
-#define ALG_SID_DSS_DMS 2
-#define ALG_SID_DES 1
-#define ALG_SID_3DES 3
-#define ALG_SID_DESX 4
-#define ALG_SID_IDEA 5
-#define ALG_SID_CAST 6
-#define ALG_SID_SAFERSK64 7
-#define ALG_SID_SAFERSK128 8
-#define ALG_SID_3DES_112 9
-#define ALG_SID_SKIPJACK 10
-#define ALG_SID_TEK 11
-#define ALG_SID_CYLINK_MEK 12
-#define ALG_SID_RC5 13
-#define ALG_SID_RC2 2
-#define ALG_SID_RC4 1
-#define ALG_SID_SEAL 2
-#define ALG_SID_MD2 1
-#define ALG_SID_MD4 2
-#define ALG_SID_MD5 3
-#define ALG_SID_SHA 4
-#define ALG_SID_MAC 5
-#define ALG_SID_RIPEMD 6
-#define ALG_SID_RIPEMD160 7
-#define ALG_SID_SSL3SHAMD5 8
-#define ALG_SID_HMAC 9
-#define ALG_SID_TLS1PRF 10
-#define ALG_SID_AES_128 14
-#define ALG_SID_AES_192 15
-#define ALG_SID_AES_256 16
-#define ALG_SID_AES 17
-#define ALG_SID_EXAMPLE 80
-
-#define CALG_MD2 (ALG_CLASS_HASH|ALG_TYPE_ANY|ALG_SID_MD2)
-#define CALG_MD4 (ALG_CLASS_HASH|ALG_TYPE_ANY|ALG_SID_MD4)
-#define CALG_MD5 (ALG_CLASS_HASH|ALG_TYPE_ANY|ALG_SID_MD5)
-#define CALG_SHA (ALG_CLASS_HASH|ALG_TYPE_ANY|ALG_SID_SHA)
-#define CALG_SHA1 CALG_SHA
-#define CALG_MAC (ALG_CLASS_HASH|ALG_TYPE_ANY|ALG_SID_MAC)
-#define CALG_3DES (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|3)
-#define CALG_CYLINK_MEK (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|12)
-#define CALG_SKIPJACK (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|10)
-#define CALG_KEA_KEYX (ALG_CLASS_KEY_EXCHANGE|ALG_TYPE_STREAM|ALG_TYPE_DSS|4)
-#define CALG_RSA_SIGN (ALG_CLASS_SIGNATURE|ALG_TYPE_RSA|ALG_SID_RSA_ANY)
-#define CALG_DSS_SIGN (ALG_CLASS_SIGNATURE|ALG_TYPE_DSS|ALG_SID_DSS_ANY)
-#define CALG_RSA_KEYX (ALG_CLASS_KEY_EXCHANGE|ALG_TYPE_RSA|ALG_SID_RSA_ANY)
-#define CALG_DES (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_DES)
-#define CALG_RC2 (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_RC2)
-#define CALG_RC4 (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_STREAM|ALG_SID_RC4)
-#define CALG_SEAL (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_STREAM|ALG_SID_SEAL)
-#define CALG_DH_EPHEM (ALG_CLASS_KEY_EXCHANGE|ALG_TYPE_STREAM|ALG_TYPE_DSS|ALG_SID_DSS_DMS)
-#define CALG_DESX (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_DESX)
-#define CALG_TLS1PRF (ALG_CLASS_DHASH|ALG_TYPE_ANY|ALG_SID_TLS1PRF)
-#define CALG_AES_128 (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_AES_128)
-#define CALG_AES_192 (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_AES_192)
-#define CALG_AES_256 (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_AES_256)
-#define CALG_AES (ALG_CLASS_DATA_ENCRYPT|ALG_TYPE_BLOCK|ALG_SID_AES)
-
-#define CRYPT_VERIFYCONTEXT 0xF0000000
-#define CRYPT_NEWKEYSET 8
-#define CRYPT_DELETEKEYSET 16
-#define CRYPT_MACHINE_KEYSET 32
-#define CRYPT_SILENT 64
-#define CRYPT_EXPORTABLE 1
-#define CRYPT_USER_PROTECTED 2
-#define CRYPT_CREATE_SALT 4
-#define CRYPT_UPDATE_KEY 8
-#define SIMPLEBLOB 1
-#define PUBLICKEYBLOB 6
-#define PRIVATEKEYBLOB 7
-#define PLAINTEXTKEYBLOB 8
-#define OPAQUEKEYBLOB 9
-#define PUBLICKEYBLOBEX 10
-#define SYMMETRICWRAPKEYBLOB 11
-#define AT_KEYEXCHANGE 1
-#define AT_SIGNATURE 2
-#define CRYPT_USERDATA 1
-#define PKCS5_PADDING 1
-#define CRYPT_MODE_CBC 1
-#define CRYPT_MODE_ECB 2
-#define CRYPT_MODE_OFB 3
-#define CRYPT_MODE_CFB 4
-#define CRYPT_MODE_CTS 5
-#define CRYPT_MODE_CBCI 6
-#define CRYPT_MODE_CFBP 7
-#define CRYPT_MODE_OFBP 8
-#define CRYPT_MODE_CBCOFM 9
-#define CRYPT_MODE_CBCOFMI 10
-#define CRYPT_ENCRYPT 1
-#define CRYPT_DECRYPT 2
-#define CRYPT_EXPORT 4
-#define CRYPT_READ 8
-#define CRYPT_WRITE 16
-#define CRYPT_MAC 32
-#define HP_ALGID 1
-#define HP_HASHVAL 2
-#define HP_HASHSIZE 4
-#define HP_HMAC_INFO 5
-#define CRYPT_FAILED FALSE
-#define CRYPT_SUCCEED TRUE
-#define RCRYPT_SUCCEEDED(r) ((r)==CRYPT_SUCCEED)
-#define RCRYPT_FAILED(r) ((r)==CRYPT_FAILED)
-#define PP_ENUMALGS 1
-#define PP_ENUMCONTAINERS 2
-#define PP_IMPTYPE 3
-#define PP_NAME 4
-#define PP_VERSION 5
-#define PP_CONTAINER 6
-#define PP_CHANGE_PASSWORD 7
-#define PP_KEYSET_SEC_DESCR 8
-#define PP_CERTCHAIN 9
-#define PP_KEY_TYPE_SUBTYPE 10
-#define PP_PROVTYPE 16
-#define PP_KEYSTORAGE 17
-#define PP_APPLI_CERT 18
-#define PP_SYM_KEYSIZE 19
-#define PP_SESSION_KEYSIZE 20
-#define PP_UI_PROMPT 21
-#define PP_ENUMALGS_EX 22
-#define PP_ENUMMANDROOTS 25
-#define PP_ENUMELECTROOTS 26
-#define PP_KEYSET_TYPE 27
-#define PP_ADMIN_PIN 31
-#define PP_KEYEXCHANGE_PIN 32
-#define PP_SIGNATURE_PIN 33
-#define PP_SIG_KEYSIZE_INC 34
-#define PP_KEYX_KEYSIZE_INC 35
-#define PP_UNIQUE_CONTAINER 36
-#define PP_SGC_INFO 37
-#define PP_USE_HARDWARE_RNG 38
-#define PP_KEYSPEC 39
-#define PP_ENUMEX_SIGNING_PROT 40
-#define CRYPT_FIRST 1
-#define CRYPT_NEXT 2
-#define CRYPT_IMPL_HARDWARE 1
-#define CRYPT_IMPL_SOFTWARE 2
-#define CRYPT_IMPL_MIXED 3
-#define CRYPT_IMPL_UNKNOWN 4
-#define PROV_RSA_FULL 1
-#define PROV_RSA_SIG 2
-#define PROV_DSS 3
-#define PROV_FORTEZZA 4
-#define PROV_MS_EXCHANGE 5
-#define PROV_MS_MAIL 5
-#define PROV_SSL 6
-#define PROV_STT_MER 7
-#define PROV_STT_ACQ 8
-#define PROV_STT_BRND 9
-#define PROV_STT_ROOT 10
-#define PROV_STT_ISS 11
-#define PROV_RSA_SCHANNEL 12
-#define PROV_DSS_DH 13
-#define PROV_EC_ECDSA_SIG 14
-#define PROV_EC_ECNRA_SIG 15
-#define PROV_EC_ECDSA_FULL 16
-#define PROV_EC_ECNRA_FULL 17
-#define PROV_DH_SCHANNEL 18
-#define PROV_SPYRUS_LYNKS 20
-#define PROV_RNG 21
-#define PROV_INTEL_SEC 22
-#define PROV_RSA_AES 24
-#define MAXUIDLEN 64
-#define CUR_BLOB_VERSION 2
-#define X509_ASN_ENCODING 1
-#define PKCS_7_ASN_ENCODING 65536
-#define CERT_V1 0
-#define CERT_V2 1
-#define CERT_V3 2
-#define CERT_E_CHAINING (-2146762486)
-#define CERT_E_CN_NO_MATCH (-2146762481)
-#define CERT_E_EXPIRED (-2146762495)
-#define CERT_E_PURPOSE (-2146762490)
-#define CERT_E_REVOCATION_FAILURE (-2146762482)
-#define CERT_E_REVOKED (-2146762484)
-#define CERT_E_ROLE (-2146762493)
-#define CERT_E_UNTRUSTEDROOT (-2146762487)
-#define CERT_E_UNTRUSTEDTESTROOT (-2146762483)
-#define CERT_E_VALIDITYPERIODNESTING (-2146762494)
-#define CERT_E_WRONG_USAGE (-2146762480)
-#define CERT_E_PATHLENCONST (-2146762492)
-#define CERT_E_CRITICAL (-2146762491)
-#define CERT_E_ISSUERCHAINING (-2146762489)
-#define CERT_E_MALFORMED (-2146762488)
-#define CRYPT_E_REVOCATION_OFFLINE (-2146885613)
-#define CRYPT_E_REVOKED (-2146885616)
-#define TRUST_E_BASIC_CONSTRAINTS (-2146869223)
-#define TRUST_E_CERT_SIGNATURE (-2146869244)
-#define TRUST_E_FAIL (-2146762485)
-#define CERT_TRUST_NO_ERROR 0
-#define CERT_TRUST_IS_NOT_TIME_VALID 1
-#define CERT_TRUST_IS_NOT_TIME_NESTED 2
-#define CERT_TRUST_IS_REVOKED 4
-#define CERT_TRUST_IS_NOT_SIGNATURE_VALID 8
-#define CERT_TRUST_IS_NOT_VALID_FOR_USAGE 16
-#define CERT_TRUST_IS_UNTRUSTED_ROOT 32
-#define CERT_TRUST_REVOCATION_STATUS_UNKNOWN 64
-#define CERT_TRUST_IS_CYCLIC 128
-#define CERT_TRUST_IS_PARTIAL_CHAIN 65536
-#define CERT_TRUST_CTL_IS_NOT_TIME_VALID 131072
-#define CERT_TRUST_CTL_IS_NOT_SIGNATURE_VALID 262144
-#define CERT_TRUST_CTL_IS_NOT_VALID_FOR_USAGE 524288
-#define CERT_TRUST_HAS_EXACT_MATCH_ISSUER 1
-#define CERT_TRUST_HAS_KEY_MATCH_ISSUER 2
-#define CERT_TRUST_HAS_NAME_MATCH_ISSUER 4
-#define CERT_TRUST_IS_SELF_SIGNED 8
-#define CERT_TRUST_IS_COMPLEX_CHAIN 65536
-#define CERT_CHAIN_POLICY_BASE ((LPCSTR) 1)
-#define CERT_CHAIN_POLICY_AUTHENTICODE ((LPCSTR) 2)
-#define CERT_CHAIN_POLICY_AUTHENTICODE_TS ((LPCSTR) 3)
-#define CERT_CHAIN_POLICY_SSL ((LPCSTR) 4)
-#define CERT_CHAIN_POLICY_BASIC_CONSTRAINTS ((LPCSTR) 5)
-#define CERT_CHAIN_POLICY_NT_AUTH ((LPCSTR) 6)
-#define USAGE_MATCH_TYPE_AND 0
-#define USAGE_MATCH_TYPE_OR 1
-#define CERT_SIMPLE_NAME_STR 1
-#define CERT_OID_NAME_STR 2
-#define CERT_X500_NAME_STR 3
-#define CERT_NAME_STR_COMMA_FLAG 0x04000000
-#define CERT_NAME_STR_SEMICOLON_FLAG 1073741824
-#define CERT_NAME_STR_CRLF_FLAG 134217728
-#define CERT_NAME_STR_NO_PLUS_FLAG 536870912
-#define CERT_NAME_STR_NO_QUOTING_FLAG 268435456
-#define CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG 0x00010000
-#define CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG 0x00040000
-#define CERT_NAME_STR_REVERSE_FLAG 33554432
-#define CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG 131072
-#define CERT_FIND_ANY 0
-#define CERT_FIND_CERT_ID 1048576
-#define CERT_FIND_CTL_USAGE 655360
-#define CERT_FIND_ENHKEY_USAGE 655360
-#define CERT_FIND_EXISTING 851968
-#define CERT_FIND_HASH 65536
-#define CERT_FIND_ISSUER_ATTR 196612
-#define CERT_FIND_ISSUER_NAME 131076
-#define CERT_FIND_ISSUER_OF 786432
-#define CERT_FIND_KEY_IDENTIFIER 983040
-#define CERT_FIND_KEY_SPEC 589824
-#define CERT_FIND_MD5_HASH 262144
-#define CERT_FIND_PROPERTY 327680
-#define CERT_FIND_PUBLIC_KEY 393216
-#define CERT_FIND_SHA1_HASH 65536
-#define CERT_FIND_SIGNATURE_HASH 917504
-#define CERT_FIND_SUBJECT_ATTR 196615
-#define CERT_FIND_SUBJECT_CERT 720896
-#define CERT_FIND_SUBJECT_NAME 131079
-#define CERT_FIND_SUBJECT_STR_A 458759
-#define CERT_FIND_SUBJECT_STR_W 524295
-#define CERT_FIND_ISSUER_STR_A 458756
-#define CERT_FIND_ISSUER_STR_W 524292
-#define CERT_FIND_OR_ENHKEY_USAGE_FLAG 16
-#define CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG 1
-#define CERT_FIND_NO_ENHKEY_USAGE_FLAG 8
-#define CERT_FIND_VALID_ENHKEY_USAGE_FLAG 32
-#define CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG 2
-#define CERT_CASE_INSENSITIVE_IS_RDN_ATTRS_FLAG 2
-#define CERT_UNICODE_IS_RDN_ATTRS_FLAG 1
-#define CERT_CHAIN_FIND_BY_ISSUER 1
-#define CERT_CHAIN_FIND_BY_ISSUER_COMPARE_KEY_FLAG 1
-#define CERT_CHAIN_FIND_BY_ISSUER_COMPLEX_CHAIN_FLAG 2
-#define CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_FLAG 32768
-#define CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_URL_FLAG 4
-#define CERT_CHAIN_FIND_BY_ISSUER_LOCAL_MACHINE_FLAG 8
-#define CERT_CHAIN_FIND_BY_ISSUER_NO_KEY_FLAG 16384
-#define CERT_STORE_PROV_SYSTEM 10
-#define CERT_SYSTEM_STORE_LOCAL_MACHINE 131072
-#define szOID_PKIX_KP_SERVER_AUTH "4235600"
-#define szOID_SERVER_GATED_CRYPTO "4235658"
-#define szOID_SGC_NETSCAPE "2.16.840.1.113730.4.1"
-#define szOID_PKIX_KP_CLIENT_AUTH "1.3.6.1.5.5.7.3.2"
-#define CRYPT_NOHASHOID 0x00000001
-#define CRYPT_NO_SALT 0x10
-#define CRYPT_PREGEN 0x40
-#define CRYPT_RECIPIENT 0x10
-#define CRYPT_INITIATOR 0x40
-#define CRYPT_ONLINE 0x80
-#define CRYPT_SF 0x100
-#define CRYPT_CREATE_IV 0x200
-#define CRYPT_KEK 0x400
-#define CRYPT_DATA_KEY 0x800
-#define CRYPT_VOLATILE 0x1000
-#define CRYPT_SGCKEY 0x2000
-#define KP_IV 0x00000001
-#define KP_SALT 0x00000002
-#define KP_PADDING 0x00000003
-#define KP_MODE 0x00000004
-#define KP_MODE_BITS 0x00000005
-#define KP_PERMISSIONS 0x00000006
-#define KP_ALGID 0x00000007
-#define KP_BLOCKLEN 0x00000008
-#define KP_KEYLEN 0x00000009
-#define KP_SALT_EX 0x0000000a
-#define KP_P 0x0000000b
-#define KP_G 0x0000000c
-#define KP_Q 0x0000000d
-#define KP_X 0x0000000e
-#define KP_Y 0x0000000f
-#define KP_RA 0x00000010
-#define KP_RB 0x00000011
-#define KP_INFO 0x00000012
-#define KP_EFFECTIVE_KEYLEN 0x00000013
-#define KP_SCHANNEL_ALG 0x00000014
-#define KP_PUB_PARAMS 0x00000027
-#define CRYPT_FLAG_PCT1 0x0001
-#define CRYPT_FLAG_SSL2 0x0002
-#define CRYPT_FLAG_SSL3 0x0004
-#define CRYPT_FLAG_TLS1 0x0008
-#define CRYPT_FLAG_IPSEC 0x0010
-#define CRYPT_FLAG_SIGNING 0x0020
-#define SCHANNEL_MAC_KEY 0x00000000
-#define SCHANNEL_ENC_KEY 0x00000001
-#define INTERNATIONAL_USAGE 0x00000001
-#if (WINVER >= 0x0501) /* Windows Server 2003, Windows XP */
-#define CMC_ADD_ATTRIBUTES (LPCSTR) 63
-#define CMC_ADD_EXTENSIONS (LPCSTR) 62
-#define X509_CERT_PAIR (LPCSTR) 53
-#define X509_CERTIFICATE_TEMPLATE (LPCSTR) 64
-#define X509_CROSS_CERT_DIST_POINTS (LPCSTR) 58
-#define CMC_DATA (LPCSTR) 59
-#define X509_NAME_CONSTRAINTS (LPCSTR) 55
-#define X509_POLICY_CONSTRAINTS (LPCSTR) 57
-#define X509_POLICY_MAPPINGS (LPCSTR) 56
-#define CMC_RESPONSE (LPCSTR) 60
-#define CMC_STATUS (LPCSTR) 61
-#endif /* (WINVER >= 0x0501) */ /* Windows Server 2003, Windows XP */
-#define X509_ALGORITHM_IDENTIFIER (LPCSTR) 74
-#define X509_ALTERNATE_NAME (LPCSTR) 12
-/* need X509_ANY_STRING */
-#define PKCS_ATTRIBUTE (LPCSTR) 22
-#define X509_AUTHORITY_INFO_ACCESS (LPCSTR) 32
-#define X509_AUTHORITY_KEY_ID (LPCSTR) 9
-#define X509_AUTHORITY_KEY_ID2 (LPCSTR) 31
-#define szOID_BASIC_CONSTRAINTS "2.5.29.10"
-#define X509_BASIC_CONSTRAINTS2 (LPCSTR) 15
-#define X509_BIOMETRIC_EXT (LPCSTR) 71
-#define X509_BITS (LPCSTR) 26
-#define X509_CERT (LPCSTR) 1
-#define X509_CERT_CRL_TO_BE_SIGNED (LPCSTR) 3
-#define X509_CERT_POLICIES (LPCSTR) 16
-#define X509_CERT_REQUEST_TO_BE_SIGNED (LPCSTR) 4
-#define X509_CERT_TO_BE_SIGNED (LPCSTR) 2
-#define X509_CHOICE_OF_TIME (LPCSTR) 30
-#define PKCS_CONTENT_INFO (LPCSTR) 33
-#define PKCS_CONTENT_INFO_SEQUENCE_OF_ANY (LPCSTR) 23
-#define X509_CRL_DIST_POINTS (LPCSTR) 35
-/* need X509_CRL_REASON_CODE */
-#define RSA_CSP_PUBLICKEYBLOB (LPCSTR) 19
-#define PKCS_CTL (LPCSTR) 37
-#define X509_DSS_PARAMETERS (LPCSTR) 39
-/* need X509_DSS_PUBLICKEY */
-#define X509_DSS_SIGNATURE (LPCSTR) 40
-#define X509_ECC_SIGNATURE (LPCSTR) 47
-#define X509_ENHANCED_KEY_USAGE (LPCSTR) 36
-#define X509_ENUMERATED (LPCSTR) 29
-#define X509_EXTENSIONS (LPCSTR) 5
-#define X509_INTEGER (LPCSTR) 27
-#define X509_ISSUING_DIST_POINT (LPCSTR) 54
-#define X509_KEY_ATTRIBUTES (LPCSTR) 10
-#define X509_KEY_USAGE (LPCSTR) 14
-#define X509_KEY_USAGE_RESTRICTION (LPCSTR) 11
-#define X509_KEYGEN_REQUEST_TO_BE_SIGNED (LPCSTR) 21
-#define X509_LOGOTYPE_EXT (LPCSTR) 70
-#define X509_MULTI_BYTE_INTEGER (LPCSTR) 28
-#define X509_MULTI_BYTE_UINT (LPCSTR) 38
-#define X509_NAME (LPCSTR) 7
-#define X509_NAME_VALUE (LPCSTR) 6
-#define X509_OBJECT_IDENTIFIER (LPCSTR) 73
-#define X509_OCTET_STRING (LPCSTR) 25
-#define X509_PUBLIC_KEY_INFO (LPCSTR) 8
-#define PKCS_RC2_CBC_PARAMETERS (LPCSTR) 41
-#define CNG_RSA_PUBLIC_KEY_BLOB (LPCSTR) 72
-#define PKCS_RSA_SSA_PSS_PARAMETERS (LPCSTR) 75
-#define PKCS_RSAES_OAEP_PARAMETERS (LPCSTR) 76
-#define ECC_CMS_SHARED_INFO (LPCSTR) 77
-#define X509_SEQUENCE_OF_ANY (LPCSTR) 34
-#define PKCS7_SIGNER_INFO (LPCSTR) 500
-#define CMS_SIGNER_INFO (LPCSTR) 501
-#define PKCS_SMIME_CAPABILITIES (LPCSTR) 42
-#define PKCS_TIME_REQUEST (LPCSTR) 18
-/* need X509_UNICODE_ANY_STRING */
-#define X509_UNICODE_NAME (LPCSTR) 20
-#define X509_UNICODE_NAME_VALUE (LPCSTR) 24
-#define PKCS_UTC_TIME (LPCSTR) 17
-#define OCSP_SIGNED_REQUEST (LPCSTR) 65
-#define OCSP_REQUEST (LPCSTR) 66
-#define OCSP_RESPONSE (LPCSTR) 67
-#define OCSP_BASIC_SIGNED_RESPONSE (LPCSTR) 68
-#define OCSP_BASIC_RESPONSE (LPCSTR) 69
-enum { CRL_REASON_UNSPECIFIED=0,
- CRL_REASON_KEY_COMPROMISE=1,
- CRL_REASON_CA_COMPROMISE=2,
- CRL_REASON_AFFILIATION_CHANGED=3,
- CRL_REASON_SUPERSEDED=4,
- CRL_REASON_CESSATION_OF_OPERATION=5,
- CRL_REASON_CERTIFICATE_HOLD=6,
- CRL_REASON_REMOVE_FROM_CRL=7
- };
-/* need CRYPT_DECODE_NOCOPY_FLAG */
-#define CRYPT_ENCODE_ALLOC_FLAG 0x8000
-#define CRYPT_UNICODE_NAME_ENCODE_DISABLE_CHECK_TYPE_FLAG 0x40000000
-#define CRYPT_UNICODE_NAME_ENCODE_ENABLE_T61_UNICODE_FLAG 0x80000000
-#define CRYPT_UNICODE_NAME_ENCODE_ENABLE_UTF8_UNICODE_FLAG 0x20000000
-#define CRYPT_UNICODE_NAME_ENCODE_FORCE_UTF8_UNICODE_FLAG 0x10000000
-
-
-#define szOID_RSA "1.2.840.113549"
-#define szOID_PKCS "1.2.840.113549.1"
-#define szOID_RSA_HASH "1.2.840.113549.2"
-#define szOID_RSA_ENCRYPT "1.2.840.113549.3"
-#define szOID_PKCS_1 "1.2.840.113549.1.1"
-#define szOID_PKCS_2 "1.2.840.113549.1.2"
-#define szOID_PKCS_3 "1.2.840.113549.1.3"
-#define szOID_PKCS_4 "1.2.840.113549.1.4"
-#define szOID_PKCS_5 "1.2.840.113549.1.5"
-#define szOID_PKCS_6 "1.2.840.113549.1.6"
-#define szOID_PKCS_7 "1.2.840.113549.1.7"
-#define szOID_PKCS_8 "1.2.840.113549.1.8"
-#define szOID_PKCS_9 "1.2.840.113549.1.9"
-#define szOID_PKCS_10 "1.2.840.113549.1.10"
-#define szOID_PKCS_12 "1.2.840.113549.1.12"
-#define szOID_RSA_MD2 "1.2.840.113549.1.1.2"
-#define szOID_RSA_MD4 "1.2.840.113549.1.1.3"
-#define szOID_RSA_MD5 "1.2.840.113549.2.5"
-#define szOID_RSA_RSA "1.2.840.113549.1.1.1"
-#define szOID_RSA_MD2RSA "1.2.840.113549.1.1.2"
-#define szOID_RSA_MD4RSA "1.2.840.113549.1.1.3"
-#define szOID_RSA_MD5RSA "1.2.840.113549.1.1.4"
-#define szOID_RSA_SHA1RSA "1.2.840.113549.1.1.5"
-#define szOID_RSA_SETOAEP_RSA "1.2.840.113549.1.1.5"
-#define szOID_RSA_DH "1.2.840.113549.1.3.1"
-#define szOID_RSA_data "1.2.840.113549.1.7.1"
-#define szOID_RSA_signedData "1.2.840.113549.1.7.2"
-#define szOID_RSA_envelopedData "1.2.840.113549.1.7.3"
-#define szOID_RSA_signEnvData "1.2.840.113549.1.7.4"
-#define szOID_RSA_digestedData "1.2.840.113549.1.7.5"
-#define szOID_RSA_hashedData "1.2.840.113549.1.7.5"
-#define szOID_RSA_encryptedData "1.2.840.113549.1.7.6"
-#define szOID_RSA_emailAddr "1.2.840.113549.1.9.1"
-#define szOID_RSA_unstructName "1.2.840.113549.1.9.2"
-#define szOID_RSA_contentType "1.2.840.113549.1.9.3"
-#define szOID_RSA_messageDigest "1.2.840.113549.1.9.4"
-#define szOID_RSA_signingTime "1.2.840.113549.1.9.5"
-#define szOID_RSA_counterSign "1.2.840.113549.1.9.6"
-#define szOID_RSA_challengePwd "1.2.840.113549.1.9.7"
-#define szOID_RSA_unstructAddr "1.2.840.113549.1.9.8"
-#define szOID_RSA_extCertAttrs "1.2.840.113549.1.9.9"
-#define szOID_RSA_SMIMECapabilities "1.2.840.113549.1.9.15"
-#define szOID_RSA_preferSignedData "1.2.840.113549.1.9.15.1"
-#define szOID_RSA_RC2CBC "1.2.840.113549.3.2"
-#define szOID_RSA_RC4 "1.2.840.113549.3.4"
-#define szOID_RSA_DES_EDE3_CBC "1.2.840.113549.3.7"
-#define szOID_RSA_RC5_CBCPad "1.2.840.113549.3.9"
-#define szOID_ANSI_x942 "1.2.840.10046"
-#define szOID_ANSI_x942_DH "1.2.840.10046.2.1"
-#define szOID_X957 "1.2.840.10040"
-#define szOID_X957_DSA "1.2.840.10040.4.1"
-#define szOID_DATA STRUCTURE "1.2.840.10040.4.3"
-#define szOID_DS "2.5"
-#define szOID_DSALG "2.5.8"
-#define szOID_DSALG_CRPT "2.5.8.1"
-#define szOID_DSALG_HASH "2.5.8.2"
-#define szOID_DSALG_SIGN "2.5.8.3"
-#define szOID_DSALG_RSA "2.5.8.1.1"
-#define szOID_OIW "1.3.14"
-#define szOID_OIWSEC "1.3.14.3.2"
-#define szOID_OIWSEC_md4RSA "1.3.14.3.2.2"
-#define szOID_OIWSEC_md5RSA "1.3.14.3.2.3"
-#define szOID_OIWSEC_md4RSA2 "1.3.14.3.2.4"
-#define szOID_OIWSEC_desECB "1.3.14.3.2.6"
-#define szOID_OIWSEC_desCBC "1.3.14.3.2.7"
-#define szOID_OIWSEC_desOFB "1.3.14.3.2.8"
-#define szOID_OIWSEC_desCFB "1.3.14.3.2.9"
-#define szOID_OIWSEC_desMAC "1.3.14.3.2.10"
-#define szOID_OIWSEC_rsaSign "1.3.14.3.2.11"
-#define szOID_OIWSEC_dsa "1.3.14.3.2.12"
-#define szOID_OIWSEC_shaDSA "1.3.14.3.2.13"
-#define szOID_OIWSEC_mdc2RSA "1.3.14.3.2.14"
-#define szOID_OIWSEC_shaRSA "1.3.14.3.2.15"
-#define szOID_OIWSEC_dhCommMod "1.3.14.3.2.16"
-#define szOID_OIWSEC_desEDE "1.3.14.3.2.17"
-#define szOID_OIWSEC_sha "1.3.14.3.2.18"
-#define szOID_OIWSEC_mdc2 "1.3.14.3.2.19"
-#define szOID_OIWSEC_dsaComm "1.3.14.3.2.20"
-#define szOID_OIWSEC_dsaCommSHA "1.3.14.3.2.21"
-#define szOID_OIWSEC_rsaXchg "1.3.14.3.2.22"
-#define szOID_OIWSEC_keyHashSeal "1.3.14.3.2.23"
-#define szOID_OIWSEC_md2RSASign "1.3.14.3.2.24"
-#define szOID_OIWSEC_md5RSASign "1.3.14.3.2.25"
-#define szOID_OIWSEC_sha1 "1.3.14.3.2.26"
-#define szOID_OIWSEC_dsaSHA1 "1.3.14.3.2.27"
-#define szOID_OIWSEC_dsaCommSHA1 "1.3.14.3.2.28"
-#define szOID_OIWSEC_sha1RSASign "1.3.14.3.2.29"
-#define szOID_OIWDIR "1.3.14.7.2"
-#define szOID_OIWDIR_CRPT "1.3.14.7.2.1"
-#define szOID_OIWDIR_HASH "1.3.14.7.2.2"
-#define szOID_OIWDIR_SIGN "1.3.14.7.2.3"
-#define szOID_OIWDIR_md2 "1.3.14.7.2.2.1"
-#define szOID_OIWDIR_md2RSA "1.3.14.7.2.3.1"
-#define szOID_INFOSEC "2.16.840.1.101.2.1"
-#define szOID_INFOSEC_sdnsSignature "2.16.840.1.101.2.1.1.1"
-#define szOID_INFOSEC_mosaicSignature "2.16.840.1.101.2.1.1.2"
-#define szOID_INFOSEC_sdnsConfidentiality "2.16.840.1.101.2.1.1.3"
-#define szOID_INFOSEC_mosaicConfidentiality "2.16.840.1.101.2.1.1.4"
-#define szOID_INFOSEC_sdnsIntegrity "2.16.840.1.101.2.1.1.5"
-#define szOID_INFOSEC_mosaicIntegrity "2.16.840.1.101.2.1.1.6"
-#define szOID_INFOSEC_sdnsTokenProtection "2.16.840.1.101.2.1.1.7"
-#define szOID_INFOSEC_mosaicTokenProtection "2.16.840.1.101.2.1.1.8"
-#define szOID_INFOSEC_sdnsKeyManagement "2.16.840.1.101.2.1.1.9"
-#define szOID_INFOSEC_mosaicKeyManagement "2.16.840.1.101.2.1.1.10"
-#define szOID_INFOSEC_sdnsKMandSig "2.16.840.1.101.2.1.1.11"
-#define szOID_INFOSEC_mosaicKMandSig "2.16.840.1.101.2.1.1.12"
-#define szOID_INFOSEC_SuiteASignature "2.16.840.1.101.2.1.1.13"
-#define szOID_INFOSEC_SuiteAConfidentiality "2.16.840.1.101.2.1.1.14"
-#define szOID_INFOSEC_SuiteAIntegrity "2.16.840.1.101.2.1.1.15"
-#define szOID_INFOSEC_SuiteATokenProtection "2.16.840.1.101.2.1.1.16"
-#define szOID_INFOSEC_SuiteAKeyManagement "2.16.840.1.101.2.1.1.17"
-#define szOID_INFOSEC_SuiteAKMandSig "2.16.840.1.101.2.1.1.18"
-#define szOID_INFOSEC_mosaicUpdatedSig "2.16.840.1.101.2.1.1.19"
-#define szOID_INFOSEC_mosaicKMandUpdSig "2.16.840.1.101.2.1.1.20"
-#define szOID_INFOSEC_mosaicUpdatedInteg "2.16.840.1.101.2.1.1.21"
-#define szOID_PKIX_NO_SIGNATURE "1.3.6.1.5.5.7.6.2"
-
-#define szOID_COMMON_NAME "2.5.4.3"
-#define szOID_COUNTRY_NAME "2.5.4.6"
-#define szOID_DEVICE_SERIAL_NUMBER "2.5.4.5"
-#define szOID_DOMAIN_COMPONENT "0.9.2342.19200300.100.1.25"
-#define szOID_RSA_emailAddr "1.2.840.113549.1.9.1"
-#define szOID_GIVEN_NAME "2.5.4.42"
-#define szOID_INITIALS "2.5.4.43"
-#define szOID_LOCALITY_NAME "2.5.4.7"
-#define szOID_ORGANIZATION_NAME "2.5.4.10"
-#define szOID_ORGANIZATIONAL_UNIT_NAME "2.5.4.11"
-#define szOID_STATE_OR_PROVINCE_NAME "2.5.4.8"
-#define szOID_STREET_ADDRESS "2.5.4.9"
-#define szOID_SUR_NAME "2.5.4.4"
-#define szOID_TITLE "2.5.4.12"
-#define szOID_RSA_unstructAddr "1.2.840.113549.1.9.8"
-#define szOID_RSA_unstructName "1.2.840.113549.1.9.2"
-#define szOID_BASIC_CONSTRAINTS2 "2.5.29.19"
-#define szOID_APPLICATION_CERT_POLICIES "1.3.6.1.4.1.311.21.10"
-#define szOID_APPLICATION_POLICY_CONSTRAINTS "1.3.6.1.4.1.311.21.12"
-#define szOID_APPLICATION_POLICY_MAPPINGS "1.3.6.1.4.1.311.21.11"
-#define szOID_AUTHORITY_INFO_ACCESS "1.3.6.1.5.5.7.1.1"
-#define szOID_AUTHORITY_KEY_IDENTIFIER "2.5.29.1"
-#define szOID_AUTHORITY_KEY_IDENTIFIER2 "2.5.29.35"
-#define X509_BASIC_CONSTRAINTS (LPCSTR) 13
-#define szOID_BIOMETRIC_EXT "1.3.6.1.5.5.7.1.2"
-#define szOID_CERT_EXTENSIONS "1.3.6.1.4.1.311.2.1.14"
-#define szOID_CERT_POLICIES "2.5.29.32"
-#if (WINVER >= 0x0501) /* Windows Server 2003, Windows XP */
-#define szOID_CERTIFICATE_TEMPLATE "1.3.6.1.4.1.311.21.7"
-#define szOID_CRL_NUMBER "2.5.29.20"
-#define szOID_CROSS_CERT_DIST_POINTS "1.3.6.1.4.1.311.10.9.1"
-#define szOID_DELTA_CRL_INDICATOR "2.5.29.27"
-#define szOID_ENROLLMENT_NAME_VALUE_PAIR "1.3.6.1.4.1.311.13.2.1"
-#define szOID_FRESHEST_CRL "2.5.29.46"
-#define szOID_ISSUING_DIST_POINT "2.5.29.28"
-#define szOID_NAME_CONSTRAINTS "2.5.29.30"
-#endif /* (WINVER >= 0x0501) */ /* Windows Server 2003, Windows XP */
-#define szOID_CRL_DIST_POINTS 2.5.29.31
-#define szOID_CRL_REASON_CODE "2.5.29.21"
-#define szOID_CRL_VIRTUAL_BASE "1.3.6.1.4.1.311.21.3"
-#define szOID_ECC_PUBLIC_KEY "1.2.840.10045.2.1"
-#define szOID_ECDSA_SPECIFIED "1.2.840.10045.4.3"
-#define szOID_ENHANCED_KEY_USAGE "2.5.29.37"
-#define szOID_ISSUER_ALT_NAME "2.5.29.8"
-#define szOID_ISSUER_ALT_NAME2 "2.5.29.18"
-#define szOID_KEY_ATTRIBUTES "2.5.29.2"
-#define szOID_KEY_USAGE "2.5.29.4"
-#define szOID_KEY_USAGE_RESTRICTION "2.5.29.4"
-#define szOID_LOGOTYPE_EXT "1.3.6.1.5.5.7.1.12"
-/* need szOID_NEXT_UPDATE_LOCATION */
-#define szOID_POLICY_CONSTRAINTS "2.5.29.36"
-#define szOID_POLICY_MAPPINGS "2.5.29.33"
-#define szOID_RSA_SSA_PSS "1.2.840.113549.1.1.10"
-#define szOID_RSAES_OAEP "1.2.840.113549.1.1.7"
-#define szOID_SUBJECT_ALT_NAME "2.5.29.7"
-#define szOID_SUBJECT_ALT_NAME2 "2.5.29.17"
-#define szOID_SUBJECT_KEY_IDENTIFIER "2.5.29.14"
-
-typedef struct _CERT_BASIC_CONSTRAINTS2_INFO {
- BOOL fCA;
- BOOL fPathLenConstraint;
- DWORD dwPathLenConstraint;
-} CERT_BASIC_CONSTRAINTS2_INFO,
- *PCERT_BASIC_CONSTRAINTS2_INFO;
-
-typedef VOID (WINAPI *PFN_CRYPT_FREE)(LPVOID pv);
-typedef LPVOID (WINAPI *PFN_CRYPT_ALLOC)(size_t cbsize);
-typedef struct _CRYPT_ENCODE_PARA {
- DWORD cbSize;
- PFN_CRYPT_ALLOC pfnAlloc;
- PFN_CRYPT_FREE pfnFree;
-} CRYPT_ENCODE_PARA,
- *PCRYPT_ENCODE_PARA;
-
-/* Definition missing. */
-typedef struct _CRYPT_DECODE_PARA *PCRYPT_DECODE_PARA;
-
-typedef UINT ALG_ID;
-typedef struct _VTableProvStruc {FARPROC FuncVerifyImage;} VTableProvStruc,*PVTableProvStruc;
-typedef ULONG HCRYPTPROV;
-typedef ULONG HCRYPTKEY;
-typedef ULONG HCRYPTHASH;
-typedef PVOID HCERTSTORE;
-typedef PVOID HCRYPTMSG;
-typedef PVOID HCERTCHAINENGINE;
-typedef struct _CRYPTOAPI_BLOB {
- DWORD cbData;
- BYTE* pbData;
-} CRYPT_INTEGER_BLOB, *PCRYPT_INTEGER_BLOB,
- CRYPT_UINT_BLOB, *PCRYPT_UINT_BLOB,
- CRYPT_OBJID_BLOB, *PCRYPT_OBJID_BLOB,
- CERT_NAME_BLOB, *PCERT_NAME_BLOB,
- CERT_RDN_VALUE_BLOB,*PCERT_RDN_VALUE_BLOB,
- CERT_BLOB, *PCERT_BLOB,
- CRL_BLOB, *PCRL_BLOB,
- DATA_BLOB, *PDATA_BLOB,
- CRYPT_DATA_BLOB, *PCRYPT_DATA_BLOB,
- CRYPT_HASH_BLOB, *PCRYPT_HASH_BLOB,
- CRYPT_DIGEST_BLOB, *PCRYPT_DIGEST_BLOB,
- CRYPT_DER_BLOB, *PCRYPT_DER_BLOB,
- CRYPT_ATTR_BLOB, *PCRYPT_ATTR_BLOB;
-/* not described in SDK; has the same layout as HTTPSPolicyCallbackData */
-typedef struct _SSL_EXTRA_CERT_CHAIN_POLICY_PARA {
- DWORD cbStruct;
- DWORD dwAuthType;
- DWORD fdwChecks;
- LPWSTR pwszServerName;
-} SSL_EXTRA_CERT_CHAIN_POLICY_PARA, *PSSL_EXTRA_CERT_CHAIN_POLICY_PARA,
- HTTPSPolicyCallbackData, *PHTTPSPolicyCallbackData;
-/* #if (_WIN32_WINNT>=0x500) */
-typedef struct _CERT_CHAIN_POLICY_PARA {
- DWORD cbSize;
- DWORD dwFlags;
- void* pvExtraPolicyPara;
-} CERT_CHAIN_POLICY_PARA, *PCERT_CHAIN_POLICY_PARA;
-typedef struct _CERT_CHAIN_POLICY_STATUS {
- DWORD cbSize;
- DWORD dwError;
- LONG lChainIndex;
- LONG lElementIndex;
- void* pvExtraPolicyStatus;
-} CERT_CHAIN_POLICY_STATUS, *PCERT_CHAIN_POLICY_STATUS;
-/* #endif */
-typedef struct _CRYPT_ALGORITHM_IDENTIFIER {
- LPSTR pszObjId;
- CRYPT_OBJID_BLOB Parameters;
-} CRYPT_ALGORITHM_IDENTIFIER, *PCRYPT_ALGORITHM_IDENTIFIER;
-typedef struct _CRYPT_BIT_BLOB {
- DWORD cbData;
- BYTE* pbData;
- DWORD cUnusedBits;
-} CRYPT_BIT_BLOB, *PCRYPT_BIT_BLOB;
-typedef struct _CERT_PUBLIC_KEY_INFO {
- CRYPT_ALGORITHM_IDENTIFIER Algorithm;
- CRYPT_BIT_BLOB PublicKey;
-} CERT_PUBLIC_KEY_INFO, *PCERT_PUBLIC_KEY_INFO;
-typedef struct _CERT_EXTENSION {
- LPSTR pszObjId;
- BOOL fCritical;
- CRYPT_OBJID_BLOB Value;
-} CERT_EXTENSION, *PCERT_EXTENSION;
-typedef struct _CERT_INFO {
- DWORD dwVersion;
- CRYPT_INTEGER_BLOB SerialNumber;
- CRYPT_ALGORITHM_IDENTIFIER SignatureAlgorithm;
- CERT_NAME_BLOB Issuer;
- FILETIME NotBefore;
- FILETIME NotAfter;
- CERT_NAME_BLOB Subject;
- CERT_PUBLIC_KEY_INFO SubjectPublicKeyInfo;
- CRYPT_BIT_BLOB IssuerUniqueId;
- CRYPT_BIT_BLOB SubjectUniqueId;
- DWORD cExtension;
- PCERT_EXTENSION rgExtension;
-} CERT_INFO, *PCERT_INFO;
-typedef struct _CERT_CONTEXT {
- DWORD dwCertEncodingType;
- BYTE* pbCertEncoded;
- DWORD cbCertEncoded;
- PCERT_INFO pCertInfo;
- HCERTSTORE hCertStore;
-} CERT_CONTEXT, *PCERT_CONTEXT;
-typedef const CERT_CONTEXT *PCCERT_CONTEXT;
-typedef struct _CTL_USAGE {
- DWORD cUsageIdentifier;
- LPSTR *rgpszUsageIdentifier;
-} CTL_USAGE, *PCTRL_USAGE,
- CERT_ENHKEY_USAGE, *PCERT_ENHKEY_USAGE;
-typedef struct _CERT_USAGE_MATCH {
- DWORD dwType;
- CERT_ENHKEY_USAGE Usage;
-} CERT_USAGE_MATCH, *PCERT_USAGE_MATCH;
-/* #if (_WIN32_WINNT>=0x500) */
-typedef struct _CERT_CHAIN_PARA {
- DWORD cbSize;
- CERT_USAGE_MATCH RequestedUsage;
-#if CERT_CHAIN_PARA_HAS_EXTRA_FIELDS
- CERT_USAGE_MATCH RequestedIssuancePolicy;
- DWORD dwUrlRetrievalTimeout;
- BOOL fCheckRevocationFreshnessTime;
- DWORD dwRevocationFreshnessTime;
-#endif
-} CERT_CHAIN_PARA, *PCERT_CHAIN_PARA;
-typedef BOOL (WINAPI *PFN_CERT_CHAIN_FIND_BY_ISSUER_CALLBACK)(PCCERT_CONTEXT,void*);
-typedef struct _CERT_CHAIN_FIND_BY_ISSUER_PARA {
- DWORD cbSize;
- LPCSTR pszUsageIdentifier;
- DWORD dwKeySpec;
- DWORD dwAcquirePrivateKeyFlags;
- DWORD cIssuer;
- CERT_NAME_BLOB* rgIssuer;
- PFN_CERT_CHAIN_FIND_BY_ISSUER_CALLBACK pfnFIndCallback;
- void* pvFindArg;
- DWORD* pdwIssuerChainIndex;
- DWORD* pdwIssuerElementIndex;
-} CERT_CHAIN_FIND_BY_ISSUER_PARA, *PCERT_CHAIN_FIND_BY_ISSUER_PARA;
-/* #endif */
-typedef struct _CERT_TRUST_STATUS {
- DWORD dwErrorStatus;
- DWORD dwInfoStatus;
-} CERT_TRUST_STATUS, *PCERT_TRUST_STATUS;
-typedef struct _CRL_ENTRY {
- CRYPT_INTEGER_BLOB SerialNumber;
- FILETIME RevocationDate;
- DWORD cExtension;
- PCERT_EXTENSION rgExtension;
-} CRL_ENTRY, *PCRL_ENTRY;
-typedef struct _CRL_INFO {
- DWORD dwVersion;
- CRYPT_ALGORITHM_IDENTIFIER SignatureAlgorithm;
- CERT_NAME_BLOB Issuer;
- FILETIME ThisUpdate;
- FILETIME NextUpdate;
- DWORD cCRLEntry;
- PCRL_ENTRY rgCRLEntry;
- DWORD cExtension;
- PCERT_EXTENSION rgExtension;
-} CRL_INFO, *PCRL_INFO;
-typedef struct _CRL_CONTEXT {
- DWORD dwCertEncodingType;
- BYTE* pbCrlEncoded;
- DWORD cbCrlEncoded;
- PCRL_INFO pCrlInfo;
- HCERTSTORE hCertStore;
-} CRL_CONTEXT, *PCRL_CONTEXT;
-typedef const CRL_CONTEXT *PCCRL_CONTEXT;
-typedef struct _CERT_REVOCATION_CRL_INFO {
- DWORD cbSize;
- PCCRL_CONTEXT pBaseCRLContext;
- PCCRL_CONTEXT pDeltaCRLContext;
- PCRL_ENTRY pCrlEntry;
- BOOL fDeltaCrlEntry;
-} CERT_REVOCATION_CRL_INFO, *PCERT_REVOCATION_CRL_INFO;
-typedef struct _CERT_REVOCATION_INFO {
- DWORD cbSize;
- DWORD dwRevocationResult;
- LPCSTR pszRevocationOid;
- LPVOID pvOidSpecificInfo;
- BOOL fHasFreshnessTime;
- DWORD dwFreshnessTime;
- PCERT_REVOCATION_CRL_INFO pCrlInfo;
-} CERT_REVOCATION_INFO, *PCERT_REVOCATION_INFO;
-/* #if (_WIN32_WINNT>=0x500) */
-typedef struct _CERT_CHAIN_ELEMENT {
- DWORD cbSize;
- PCCERT_CONTEXT pCertContext;
- CERT_TRUST_STATUS TrustStatus;
- PCERT_REVOCATION_INFO pRevocationInfo;
- PCERT_ENHKEY_USAGE pIssuanceUsage;
- PCERT_ENHKEY_USAGE pApplicationUsage;
-} CERT_CHAIN_ELEMENT, *PCERT_CHAIN_ELEMENT;
-/* #endif */
-typedef struct _CRYPT_ATTRIBUTE {
- LPSTR pszObjId;
- DWORD cValue;
- PCRYPT_ATTR_BLOB rgValue;
-} CRYPT_ATTRIBUTE, *PCRYPT_ATTRIBUTE;
-typedef struct _CTL_ENTRY {
- CRYPT_DATA_BLOB SubjectIdentifier;
- DWORD cAttribute;
- PCRYPT_ATTRIBUTE rgAttribute;
-} CTL_ENTRY, *PCTL_ENTRY;
-typedef struct _CTL_INFO {
- DWORD dwVersion;
- CTL_USAGE SubjectUsage;
- CRYPT_DATA_BLOB ListIdentifier;
- CRYPT_INTEGER_BLOB SequenceNumber;
- FILETIME ThisUpdate;
- FILETIME NextUpdate;
- CRYPT_ALGORITHM_IDENTIFIER SubjectAlgorithm;
- DWORD cCTLEntry;
- PCTL_ENTRY rgCTLEntry;
- DWORD cExtension;
- PCERT_EXTENSION rgExtension;
-} CTL_INFO, *PCTL_INFO;
-typedef struct _CTL_CONTEXT {
- DWORD dwMsgAndCertEncodingType;
- BYTE* pbCtlEncoded;
- DWORD cbCtlEncoded;
- PCTL_INFO pCtlInfo;
- HCERTSTORE hCertStore;
- HCRYPTMSG hCryptMsg;
- BYTE* pbCtlContent;
- DWORD cbCtlContent;
-} CTL_CONTEXT, *PCTL_CONTEXT;
-typedef const CTL_CONTEXT *PCCTL_CONTEXT;
-typedef struct _CERT_TRUST_LIST_INFO {
- DWORD cbSize;
- PCTL_ENTRY pCtlEntry;
- PCCTL_CONTEXT pCtlContext;
-} CERT_TRUST_LIST_INFO, *PCERT_TRUST_LIST_INFO;
-typedef struct _CERT_SIMPLE_CHAIN {
- DWORD cbSize;
- CERT_TRUST_STATUS TrustStatus;
- DWORD cElement;
- PCERT_CHAIN_ELEMENT* rgpElement;
- PCERT_TRUST_LIST_INFO pTrustListInfo;
- BOOL fHasRevocationFreshnessTime;
- DWORD dwRevocationFreshnessTime;
-} CERT_SIMPLE_CHAIN, *PCERT_SIMPLE_CHAIN;
-/* #if (_WIN32_WINNT>=0x500) */
-typedef const struct _CERT_CHAIN_CONTEXT* PCCERT_CHAIN_CONTEXT;
-typedef struct _CERT_CHAIN_CONTEXT {
- DWORD cbSize;
- CERT_TRUST_STATUS TrustStatus;
- DWORD cChain;
- PCERT_SIMPLE_CHAIN* rgpChain;
- DWORD cLowerQualityChainContext;
- PCCERT_CHAIN_CONTEXT* rgpLowerQualityChainContext;
- BOOL fHasRevocationFreshnessTime;
- DWORD dwRevocationFreshnessTime;
-} CERT_CHAIN_CONTEXT, *PCERT_CHAIN_CONTEXT;
-/* #endif */
-typedef struct _PROV_ENUMALGS {
- ALG_ID aiAlgid;
- DWORD dwBitLen;
- DWORD dwNameLen;
- CHAR szName[20];
-} PROV_ENUMALGS;
-typedef struct _PUBLICKEYSTRUC {
- BYTE bType;
- BYTE bVersion;
- WORD reserved;
- ALG_ID aiKeyAlg;
-} BLOBHEADER, PUBLICKEYSTRUC;
-typedef struct _RSAPUBKEY {
- DWORD magic;
- DWORD bitlen;
- DWORD pubexp;
-} RSAPUBKEY;
-typedef struct _HMAC_Info
-{
- ALG_ID HashAlgid;
- BYTE* pbInnerString;
- DWORD cbInnerString;
- BYTE* pbOuterString;
- DWORD cbOuterString;
-} HMAC_INFO, *PHMAC_INFO;
-#if (WINVER >= 0x0501) /* Windows Server 2003, Windows XP */
-typedef struct _CMC_ADD_ATTRIBUTES_INFO {
- DWORD dwCmcDataReference;
- DWORD cCertReference;
- DWORD* rgdwCertReference;
- DWORD cAttribute;
- PCRYPT_ATTRIBUTE rgAttribute;
-} CMC_ADD_ATTRIBUTES_INFO,
- *PCMC_ADD_ATTRIBUTES_INFO;
-typedef struct _CMC_ADD_EXTENSIONS_INFO {
- DWORD dwCmcDataReference;
- DWORD cCertReference;
- DWORD* rgdwCertReference;
- DWORD cExtension;
- PCERT_EXTENSION rgExtension;
-} CMC_ADD_EXTENSIONS_INFO,
- *PCMC_ADD_EXTENSIONS_INFO;
-#endif /* (WINVER >= 0x0501) */ /* Windows Server 2003, Windows XP */
-#if (WINVER >= 0x0410) /* Windows 98 */
-/* need PCERT_OTHER_NAME & CERT_DATA_BLOB!
-typedef struct _CERT_ALT_NAME_ENTRY {
- DWORD dwAltNameChoice;
- union {
- PCERT_OTHER_NAME pOtherName;
- LPWSTR pwszRfc822Name;
- LPWSTR pwszDNSName;
- CERT_DATA_BLOB x400Address;
- CERT_NAME_BLOB DirectoryName;
- LPWSTR pEdiPartyName;
- LPWSTR pwszURL;
- CRYPT_DATA_BLOB IPAddress;
- LPSTR pszRegisteredID;
- };
-} CERT_ALT_NAME_ENTRY,
- *PCERT_ALT_NAME_ENTRY;
-*/
-/* needs CERT_ALT_NAME_ENTRY above, which lacks prereqs
-typedef struct _CERT_ALT_NAME_INFO {
- DWORD cAltEntry;
- PCERT_ALT_NAME_ENTRY rgAltEntry;
-} CERT_ALT_NAME_INFO,
- *PCERT_ALT_NAME_INFO;
- */
-typedef struct _CERT_NAME_VALUE {
- DWORD dwValueType;
- CERT_RDN_VALUE_BLOB Value;
-} CERT_NAME_VALUE,
- *PCERT_NAME_VALUE;
-typedef struct _CERT_POLICY_QUALIFIER_INFO {
- LPSTR pszPolicyQualifierId;
- CRYPT_OBJID_BLOB Qualifier;
-} CERT_POLICY_QUALIFIER_INFO,
- *PCERT_POLICY_QUALIFIER_INFO;
-typedef struct _CERT_POLICY_CONSTRAINTS_INFO {
- BOOL fRequireExplicitPolicy;
- DWORD dwRequireExplicitPolicySkipCerts;
- BOOL fInhibitPolicyMapping;
- DWORD dwInhibitPolicyMappingSkipCerts;
-} CERT_POLICY_CONSTRAINTS_INFO,
- *PCERT_POLICY_CONSTRAINTS_INFO;
-#endif /* (WINVER >= 0x0410) */ /* Windows 98 */
-#if (WINVER >= 0x0501) /* Windows Server 2003, Windows XP */
-typedef struct _CERT_POLICY_MAPPING {
- LPSTR pszIssuerDomainPolicy;
- LPSTR pszSubjectDomainPolicy;
-} CERT_POLICY_MAPPING,
- *PCERT_POLICY_MAPPING;
-typedef struct _CERT_POLICY_MAPPINGS_INFO {
- DWORD cPolicyMapping;
- PCERT_POLICY_MAPPING rgPolicyMapping;
-} CERT_POLICY_MAPPINGS_INFO,
- *PCERT_POLICY_MAPPINGS_INFO;
-
-#endif /* (WINVER >= 0x0501) */ /* Windows Server 2003, Windows XP */
-
-//http://msdn.microsoft.com/en-us/library/aa922935.aspx
-//Some Crypto Key Provider Information structures.
-typedef struct _CRYPT_KEY_PROV_PARAM {
- DWORD dwParam;
- BYTE *pbData;
- DWORD cbData;
- DWORD dwFlags;
-} CRYPT_KEY_PROV_PARAM, *PCRYPT_KEY_PROV_PARAM;
-
-//http://msdn.microsoft.com/en-us/library/aa381420(VS.85).aspx
-typedef struct _CRYPT_KEY_PROV_INFO {
- LPWSTR pwszContainerName;
- LPWSTR pwszProvName;
- DWORD dwProvType;
- DWORD dwFlags;
- DWORD cProvParam;
- PCRYPT_KEY_PROV_PARAM rgProvParam;
- DWORD dwKeySpec;
-} CRYPT_KEY_PROV_INFO, *PCRYPT_KEY_PROV_INFO;
-
-#define CERT_SET_KEY_PROV_HANDLE_PROP_ID 0x00000001
-#define CERT_SET_KEY_CONTEXT_PROP_ID 0x00000001
-
-#define CRYPT_KEYID_DELETE_FLAG 0x00000010
-#define CRYPT_KEYID_SET_NEW_FLAG 0x00002000
-
-//certificate crl ctl IDs
-#define CERT_KEY_PROV_HANDLE_PROP_ID 1
-#define CERT_KEY_PROV_INFO_PROP_ID 2
-#define CERT_SHA1_HASH_PROP_ID 3
-#define CERT_MD5_HASH_PROP_ID 4
-#define CERT_HASH_PROP_ID CERT_SHA1_HASH_PROP_ID
-#define CERT_KEY_CONTEXT_PROP_ID 5
-#define CERT_KEY_SPEC_PROP_ID 6
-#define CERT_IE30_RESERVED_PROP_ID 7
-#define CERT_PUBKEY_HASH_RESERVED_PROP_ID 8
-#define CERT_ENHKEY_USAGE_PROP_ID 9
-#define CERT_CTL_USAGE_PROP_ID CERT_ENHKEY_USAGE_PROP_ID
-#define CERT_NEXT_UPDATE_LOCATION_PROP_ID 10
-#define CERT_FRIENDLY_NAME_PROP_ID 11
-#define CERT_PVK_FILE_PROP_ID 12
-#define CERT_DESCRIPTION_PROP_ID 13
-#define CERT_ACCESS_STATE_PROP_ID 14
-#define CERT_SIGNATURE_HASH_PROP_ID 15
-#define CERT_SMART_CARD_DATA_PROP_ID 16
-#define CERT_EFS_PROP_ID 17
-#define CERT_FORTEZZA_DATA_PROP_ID 18
-#define CERT_ARCHIVED_PROP_ID 19
-#define CERT_KEY_IDENTIFIER_PROP_ID 20
-#define CERT_AUTO_ENROLL_PROP_ID 21
-#define CERT_PUBKEY_ALG_PARA_PROP_ID 22
-#define CERT_CROSS_CERT_DIST_POINTS_PROP_ID 23
-#define CERT_ISSUER_PUBLIC_KEY_MD5_HASH_PROP_ID 24
-#define CERT_SUBJECT_PUBLIC_KEY_MD5_HASH_PROP_ID 25
-#define CERT_ENROLLMENT_PROP_ID 26
-#define CERT_DATE_STAMP_PROP_ID 27
-#define CERT_ISSUER_SERIAL_NUMBER_MD5_HASH_PROP_ID 28
-#define CERT_SUBJECT_NAME_MD5_HASH_PROP_ID 29
-#define CERT_EXTENDED_ERROR_INFO_PROP_ID 30
-
-//Certificate name type
-#define CERT_NAME_EMAIL_TYPE 1
-#define CERT_NAME_RDN_TYPE 2
-#define CERT_NAME_ATTR_TYPE 3
-#define CERT_NAME_SIMPLE_DISPLAY_TYPE 4
-#define CERT_NAME_FRIENDLY_DISPLAY_TYPE 5
-#define CERT_NAME_DNS_TYPE 6
-#define CERT_NAME_URL_TYPE 7
-#define CERT_NAME_UPN_TYPE 8
-
-//certificate/CRL, encoded, context or element disposition values.
-#define CERT_STORE_ADD_NEW 1
-#define CERT_STORE_ADD_USE_EXISTING 2
-#define CERT_STORE_ADD_REPLACE_EXISTING 3
-#define CERT_STORE_ADD_ALWAYS 4
-#define CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES 5
-#define CERT_STORE_ADD_NEWER 6
-#define CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES 7
-
-#define CRYPT_ACQUIRE_CACHE_FLAG 0x00000001
-#define CRYPT_ACQUIRE_USE_PROV_INFO_FLAG 0x00000002
-#define CRYPT_ACQUIRE_COMPARE_KEY_FLAG 0x00000004
-#define CRYPT_ACQUIRE_SILENT_FLAG 0x00000040
-
-// dwFlags definitions for CryptAcquireContext
-#define CRYPT_VERIFYCONTEXT 0xF0000000
-#define CRYPT_NEWKEYSET 0x00000008
-#define CRYPT_DELETEKEYSET 0x00000010
-#define CRYPT_MACHINE_KEYSET 0x00000020
-#define CRYPT_SILENT 0x00000040
-
-// dwFlag definitions for CryptGenKey
-#define CRYPT_EXPORTABLE 0x00000001
-#define CRYPT_USER_PROTECTED 0x00000002
-#define CRYPT_CREATE_SALT 0x00000004
-#define CRYPT_UPDATE_KEY 0x00000008
-#define CRYPT_NO_SALT 0x00000010
-#define CRYPT_PREGEN 0x00000040
-#define CRYPT_RECIPIENT 0x00000010
-#define CRYPT_INITIATOR 0x00000040
-#define CRYPT_ONLINE 0x00000080
-#define CRYPT_SF 0x00000100
-#define CRYPT_CREATE_IV 0x00000200
-#define CRYPT_KEK 0x00000400
-#define CRYPT_DATA_KEY 0x00000800
-#define CRYPT_VOLATILE 0x00001000
-#define CRYPT_SGCKEY 0x00002000
-#define CRYPT_ARCHIVABLE 0x00004000
-
-#define RSA1024BIT_KEY 0x04000000
-
-// dwFlags definitions for CryptDeriveKey
-#define CRYPT_SERVER 0x00000400
-
-#define KEY_LENGTH_MASK 0xFFFF0000
-
-// dwFlag definitions for CryptExportKey
-#define CRYPT_Y_ONLY 0x00000001
-#define CRYPT_SSL2_FALLBACK 0x00000002
-#define CRYPT_DESTROYKEY 0x00000004
-#define CRYPT_OAEP 0x00000040 // used with RSA encryptions/decryptions
- // CryptExportKey, CryptImportKey,
- // CryptEncrypt and CryptDecrypt
-
-#define CRYPT_BLOB_VER3 0x00000080 // export version 3 of a blob type
-#define CRYPT_IPSEC_HMAC_KEY 0x00000100 // CryptImportKey only
-
-// dwFlags definitions for CryptDecrypt
-// See also CRYPT_OAEP, above.
-// Note, the following flag is not supported for CryptEncrypt
-#define CRYPT_DECRYPT_RSA_NO_PADDING_CHECK 0x00000020
-
-// dwFlags definitions for CryptCreateHash
-#define CRYPT_SECRETDIGEST 0x00000001
-
-// dwFlags definitions for CryptHashData
-#define CRYPT_OWF_REPL_LM_HASH 0x00000001 // this is only for the OWF replacement CSP
-
-// dwFlags definitions for CryptHashSessionKey
-#define CRYPT_LITTLE_ENDIAN 0x00000001
-
-// dwFlags definitions for CryptSignHash and CryptVerifySignature
-#define CRYPT_NOHASHOID 0x00000001
-#define CRYPT_TYPE2_FORMAT 0x00000002
-#define CRYPT_X931_FORMAT 0x00000004
-
-// dwFlag definitions for CryptSetProviderEx and CryptGetDefaultProvider
-#define CRYPT_MACHINE_DEFAULT 0x00000001
-#define CRYPT_USER_DEFAULT 0x00000002
-#define CRYPT_DELETE_DEFAULT 0x00000004
-
-//algorithm
-#define CALG_SSL3_SHAMD5 (ALG_CLASS_HASH | ALG_TYPE_ANY | ALG_SID_SSL3SHAMD5)
-
-//End of crypto key provider information structures
-
-BOOL WINAPI CertCloseStore(HCERTSTORE,DWORD);
-BOOL WINAPI CertGetCertificateChain(HCERTCHAINENGINE,PCCERT_CONTEXT,LPFILETIME,HCERTSTORE,PCERT_CHAIN_PARA,DWORD,LPVOID,PCCERT_CHAIN_CONTEXT*);
-BOOL WINAPI CertVerifyCertificateChainPolicy(LPCSTR,PCCERT_CHAIN_CONTEXT,PCERT_CHAIN_POLICY_PARA,PCERT_CHAIN_POLICY_STATUS);
-void WINAPI CertFreeCertificateChain(PCCERT_CHAIN_CONTEXT);
-DWORD WINAPI CertNameToStrA(DWORD,PCERT_NAME_BLOB,DWORD,LPSTR,DWORD);
-DWORD WINAPI CertNameToStrW(DWORD,PCERT_NAME_BLOB,DWORD,LPWSTR,DWORD);
-HCERTSTORE WINAPI CertOpenSystemStoreA(HCRYPTPROV,LPCSTR);
-HCERTSTORE WINAPI CertOpenSystemStoreW(HCRYPTPROV,LPCWSTR);
-HCERTSTORE WINAPI CertOpenStore(LPCSTR,DWORD,HCRYPTPROV,DWORD,const void*);
-PCCERT_CONTEXT WINAPI CertFindCertificateInStore(HCERTSTORE,DWORD,DWORD,DWORD,const void*,PCCERT_CONTEXT);
-BOOL WINAPI CertFreeCertificateContext(PCCERT_CONTEXT);
-PCCERT_CONTEXT WINAPI CertGetIssuerCertificateFromStore(HCERTSTORE,PCCERT_CONTEXT,PCCERT_CONTEXT,DWORD*);
-PCCERT_CHAIN_CONTEXT WINAPI CertFindChainInStore(HCERTSTORE,DWORD,DWORD,DWORD,const void*,PCCERT_CHAIN_CONTEXT);
-
-HCERTSTORE WINAPI CertDuplicateStore(HCERTSTORE);
-PCCERT_CONTEXT WINAPI CertEnumCertificatesInStore(HCERTSTORE,PCCERT_CONTEXT);
-PCCERT_CONTEXT WINAPI CertDuplicateCertificateContext(PCCERT_CONTEXT);
-DWORD WINAPI CertGetNameStringA(PCCERT_CONTEXT,DWORD,DWORD,void*,LPSTR,DWORD);
-DWORD WINAPI CertGetNameStringW(PCCERT_CONTEXT,DWORD,DWORD,void*,LPWSTR,DWORD);
-BOOL WINAPI PFXIsPFXBlob(CRYPT_DATA_BLOB*);
-PCERT_EXTENSION WINAPI CertFindExtension(LPCSTR,DWORD,CERT_EXTENSION*);
-BOOL WINAPI CryptDecodeObject(DWORD,LPCSTR,const BYTE*,DWORD,DWORD,void*,DWORD*);
-BOOL WINAPI CryptDecodeObjectEx(DWORD,LPCSTR,const BYTE*,DWORD,DWORD,PCRYPT_DECODE_PARA,void*,DWORD*);
-BOOL WINAPI CryptEncodeObject(DWORD dwCertEncodingType,LPCSTR,const void*,BYTE*,DWORD*);
-BOOL WINAPI CryptEncodeObjectEx(DWORD,LPCSTR,const void*,DWORD,PCRYPT_ENCODE_PARA,void*,DWORD*);
-BOOL WINAPI CertAddCertificateContextToStore(HCERTSTORE,PCCERT_CONTEXT,DWORD,PCCERT_CONTEXT*);
-BOOL WINAPI CertCompareCertificate(DWORD,PCERT_INFO,PCERT_INFO);
-BOOL WINAPI PFXVerifyPassword(CRYPT_DATA_BLOB*,LPCWSTR,DWORD);
-HCERTSTORE WINAPI PFXImportCertStore(CRYPT_DATA_BLOB*,LPCWSTR,DWORD);
-BOOL WINAPI CertDeleteCertificateFromStore(PCCERT_CONTEXT);
-
-WINADVAPI BOOL WINAPI CryptAcquireContextA(HCRYPTPROV*,LPCSTR,LPCSTR,DWORD,DWORD);
-WINADVAPI BOOL WINAPI CryptAcquireContextW(HCRYPTPROV*,LPCWSTR,LPCWSTR,DWORD,DWORD);
-WINADVAPI BOOL WINAPI CryptContextAddRef(HCRYPTPROV,DWORD*,DWORD);
-WINADVAPI BOOL WINAPI CryptReleaseContext(HCRYPTPROV,DWORD);
-WINADVAPI BOOL WINAPI CryptGenKey(HCRYPTPROV,ALG_ID,DWORD,HCRYPTKEY*);
-WINADVAPI BOOL WINAPI CryptDeriveKey(HCRYPTPROV,ALG_ID,HCRYPTHASH,DWORD,HCRYPTKEY*);
-WINADVAPI BOOL WINAPI CryptDestroyKey(HCRYPTKEY);
-#if (WINVER >= 0x0500)
-WINADVAPI BOOL WINAPI CryptDuplicateHash(HCRYPTHASH,DWORD*,DWORD,HCRYPTHASH*);
-WINADVAPI BOOL WINAPI CryptDuplicateKey(HCRYPTKEY,DWORD*,DWORD,HCRYPTKEY*);
-#endif
-WINADVAPI BOOL WINAPI CryptSetKeyParam(HCRYPTKEY,DWORD,PBYTE,DWORD);
-WINADVAPI BOOL WINAPI CryptGetKeyParam(HCRYPTKEY,DWORD,PBYTE,PDWORD,DWORD);
-WINADVAPI BOOL WINAPI CryptSetHashParam(HCRYPTHASH,DWORD,PBYTE,DWORD);
-WINADVAPI BOOL WINAPI CryptGetHashParam(HCRYPTHASH,DWORD,PBYTE,PDWORD,DWORD);
-WINADVAPI BOOL WINAPI CryptSetProvParam(HCRYPTPROV,DWORD,PBYTE,DWORD);
-WINADVAPI BOOL WINAPI CryptGetProvParam(HCRYPTPROV,DWORD,PBYTE,PDWORD,DWORD);
-WINADVAPI BOOL WINAPI CryptGenRandom(HCRYPTPROV,DWORD,PBYTE);
-WINADVAPI BOOL WINAPI CryptGetUserKey(HCRYPTPROV,DWORD,HCRYPTKEY*);
-WINADVAPI BOOL WINAPI CryptExportKey(HCRYPTKEY,HCRYPTKEY,DWORD,DWORD,PBYTE,PDWORD);
-WINADVAPI BOOL WINAPI CryptImportKey(HCRYPTPROV,PBYTE,DWORD,HCRYPTKEY,DWORD,HCRYPTKEY*);
-WINADVAPI BOOL WINAPI CryptEncrypt(HCRYPTKEY,HCRYPTHASH,BOOL,DWORD,PBYTE,PDWORD,DWORD);
-WINADVAPI BOOL WINAPI CryptDecrypt(HCRYPTKEY,HCRYPTHASH,BOOL,DWORD,PBYTE,PDWORD);
-WINADVAPI BOOL WINAPI CryptCreateHash(HCRYPTPROV,ALG_ID,HCRYPTKEY,DWORD,HCRYPTHASH*);
-WINADVAPI BOOL WINAPI CryptHashData(HCRYPTHASH,PBYTE,DWORD,DWORD);
-WINADVAPI BOOL WINAPI CryptHashSessionKey(HCRYPTHASH,HCRYPTKEY,DWORD);
-WINADVAPI BOOL WINAPI CryptGetHashValue(HCRYPTHASH,DWORD,PBYTE,PDWORD);
-WINADVAPI BOOL WINAPI CryptDestroyHash(HCRYPTHASH);
-WINADVAPI BOOL WINAPI CryptSignHashA(HCRYPTHASH,DWORD,LPCSTR,DWORD,PBYTE,PDWORD);
-WINADVAPI BOOL WINAPI CryptSignHashW(HCRYPTHASH,DWORD,LPCWSTR,DWORD,PBYTE,PDWORD);
-WINADVAPI BOOL WINAPI CryptVerifySignatureA(HCRYPTHASH,PBYTE,DWORD,HCRYPTKEY,LPCSTR,DWORD);
-WINADVAPI BOOL WINAPI CryptVerifySignatureW(HCRYPTHASH,PBYTE,DWORD,HCRYPTKEY,LPCWSTR,DWORD);
-WINADVAPI BOOL WINAPI CryptSetProviderA(LPCSTR,DWORD);
-WINADVAPI BOOL WINAPI CryptSetProviderW(LPCWSTR,DWORD);
-
-#ifdef UNICODE
-#define CertGetNameString CertGetNameStringW
-#else
-#define CertGetNameString CertGetNameStringA
-#endif
-
-#ifdef UNICODE
-#define CertNameToStr CertNameToStrW
-#define CryptAcquireContext CryptAcquireContextW
-#define CryptSignHash CryptSignHashW
-#define CryptVerifySignature CryptVerifySignatureW
-#define CryptSetProvider CryptSetProviderW
-#define CertOpenSystemStore CertOpenSystemStoreW
-#define CERT_FIND_SUBJECT_STR CERT_FIND_SUBJECT_STR_W
-#define CERT_FIND_ISSUER_STR CERT_FIND_ISSUER_STR_W
-#define MS_DEF_PROV MS_DEF_PROV_W
-#define MS_ENHANCED_PROV MS_ENHANCED_PROV_W
-#define MS_STRONG_PROV MS_STRONG_PROV_W
-#define MS_DEF_RSA_SIG_PROV MS_DEF_RSA_SIG_PROV_W
-#define MS_DEF_RSA_SCHANNEL_PROV MS_DEF_RSA_SCHANNEL_PROV_W
-#define MS_DEF_DSS_PROV MS_DEF_DSS_PROV_W
-#define MS_DEF_DSS_DH_PROV MS_DEF_DSS_DH_PROV_W
-#define MS_ENH_DSS_DH_PROV MS_ENH_DSS_DH_PROV_W
-#define MS_DEF_DH_SCHANNEL_PROV MS_DEF_DH_SCHANNEL_PROV_W
-#define MS_SCARD_PROV MS_SCARD_PROV_W
-#if (_WIN32_WINNT >= 0x0501)
-#define MS_ENH_RSA_AES_PROV MS_ENH_RSA_AES_PROV_W
-#endif
-#else
-#define CertNameToStr CertNameToStrA
-#define CryptAcquireContext CryptAcquireContextA
-#define CryptSignHash CryptSignHashA
-#define CryptVerifySignature CryptVerifySignatureA
-#define CryptSetProvider CryptSetProviderA
-#define CertOpenSystemStore CertOpenSystemStoreA
-#define CERT_FIND_SUBJECT_STR CERT_FIND_SUBJECT_STR_A
-#define CERT_FIND_ISSUER_STR CERT_FIND_ISSUER_STR_A
-#define MS_DEF_PROV MS_DEF_PROV_A
-#define MS_ENHANCED_PROV MS_ENHANCED_PROV_A
-#define MS_STRONG_PROV MS_STRONG_PROV_A
-#define MS_DEF_RSA_SIG_PROV MS_DEF_RSA_SIG_PROV_A
-#define MS_DEF_RSA_SCHANNEL_PROV MS_DEF_RSA_SCHANNEL_PROV_A
-#define MS_DEF_DSS_PROV MS_DEF_DSS_PROV_A
-#define MS_DEF_DSS_DH_PROV MS_DEF_DSS_DH_PROV_A
-#define MS_ENH_DSS_DH_PROV MS_ENH_DSS_DH_PROV_A
-#define MS_DEF_DH_SCHANNEL_PROV MS_DEF_DH_SCHANNEL_PROV_A
-#define MS_SCARD_PROV MS_SCARD_PROV_A
-#if (_WIN32_WINNT >= 0x0501)
-#define MS_ENH_RSA_AES_PROV MS_ENH_RSA_AES_PROV_A
-#endif
-#endif
-/* from http://msdn2.microsoft.com/en-us/library/Aa380263.aspx: */
-typedef struct _CRYPTPROTECT_PROMPTSTRUCT {
- DWORD cbSize;
- DWORD dwPromptFlags;
- HWND hwndApp;
- LPCWSTR szPrompt;
-} CRYPTPROTECT_PROMPTSTRUCT,
-*PCRYPTPROTECT_PROMPTSTRUCT;
-
-
-/* from http://msdn2.microsoft.com/en-us/library/aa380261.aspx */
-BOOL WINAPI CryptProtectData (DATA_BLOB*, LPCWSTR, DATA_BLOB*, PVOID, CRYPTPROTECT_PROMPTSTRUCT*, DWORD, DATA_BLOB*);
-
-/* http://msdn2.microsoft.com/en-us/library/aa380882.aspx */
-BOOL WINAPI CryptUnprotectData (DATA_BLOB*, LPWSTR*, DATA_BLOB*, PVOID, CRYPTPROTECT_PROMPTSTRUCT*, DWORD, DATA_BLOB*);
-
-/* from http://msdn2.microsoft.com/en-us/library/aa302402.aspx: */
-#define CRYPTPROTECT_UI_FORBIDDEN 0x1
-#define CRYPTPROTECT_LOCAL_MACHINE 0x4
-
-//For Mozilla trunk
-typedef BOOL (WINAPI *PFN_CRYPT_ENUM_KEYID_PROP)(const CRYPT_HASH_BLOB *, DWORD, void *, void *, DWORD,DWORD,void **,DWORD);
-
-BOOL WINAPI CertGetCertificateContextProperty (PCCERT_CONTEXT, DWORD, void *, DWORD *);
-BOOL WINAPI CryptEnumKeyIdentifierProperties (const CRYPT_HASH_BLOB *, DWORD, DWORD, LPCWSTR, void *, void *, PFN_CRYPT_ENUM_KEYID_PROP);
-BOOL WINAPI CryptAcquireCertificatePrivateKey(PCCERT_CONTEXT, DWORD, void *, HCRYPTPROV *, DWORD *, BOOL *);
-PCCERT_CONTEXT WINAPI CertCreateCertificateContext (DWORD, const BYTE *, DWORD);
-BOOL WINAPI CryptGetKeyIdentifierProperty( const CRYPT_HASH_BLOB *, DWORD, DWORD, LPCWSTR, void *, void *, DWORD *);
-BOOL WINAPI CertSetCertificateContextProperty( PCCERT_CONTEXT, DWORD, DWORD, void *);
-BOOL WINAPI CertCompareCertificateName( DWORD, PCERT_NAME_BLOB, PCERT_NAME_BLOB);
-BOOL WINAPI CryptSetKeyIdentifierProperty (const CRYPT_HASH_BLOB *, DWORD, DWORD, LPCWSTR, void *, void *);
-DWORD WINAPI CertOIDToAlgId( LPCSTR );
-BOOL WINAPI CryptGetDefaultProviderA(DWORD,DWORD,DWORD,LPSTR,DWORD);
-BOOL WINAPI CryptGetDefaultProviderW(DWORD,DWORD,DWORD,LPSTR,DWORD);
-
-#ifdef UNICODE
-#define CryptGetDefaultProvider CryptGetDefaultProviderW
-#else
-#define CryptGetDefaultProvider CryptGetDefaultProviderA
-#endif // !UNICODE
-
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _WINCRYPT_H */
diff --git a/winsup/w32api/include/windef.h b/winsup/w32api/include/windef.h
deleted file mode 100644
index 793591c..0000000
--- a/winsup/w32api/include/windef.h
+++ /dev/null
@@ -1,337 +0,0 @@
-#ifndef _WINDEF_H
-#define _WINDEF_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef WINVER
-#define WINVER 0x0400
-/*
- * If you need Win32 API features newer the Win95 and WinNT then you must
- * define WINVER before including windows.h or any other method of including
- * the windef.h header.
- */
-#endif
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT WINVER
-/*
- * There may be the need to define _WIN32_WINNT to a value different from
- * the value of WINVER. I don't have any example of why you would do that.
- * However, if you must then define _WIN32_WINNT to the value required before
- * including windows.h or any other method of including the windef.h header.
- */
-#endif
-#ifndef WIN32
-#define WIN32
-#endif
-#ifndef _WIN32
-#define _WIN32
-#endif
-#define FAR
-#define far
-#define NEAR
-#define near
-#ifndef CONST
-#define CONST const
-#endif
-#undef MAX_PATH
-#define MAX_PATH 260
-
-#ifndef NULL
-#ifdef __cplusplus
-#define NULL 0
-#else
-#define NULL ((void*)0)
-#endif
-#endif
-#ifndef FALSE
-#define FALSE 0
-#endif
-#ifndef TRUE
-#define TRUE 1
-#endif
-
-/* Pseudo modifiers for parameters
- We don't use these unnecessary defines in the w32api headers. Define
- them by default since that is what people expect, but allow users
- to avoid the pollution. */
-#ifndef _NO_W32_PSEUDO_MODIFIERS
-#define IN
-#define OUT
-#ifndef OPTIONAL
-#define OPTIONAL
-#endif
-#endif
-
-#ifdef __GNUC__
-#define PACKED __attribute__((packed))
-#ifndef _fastcall
-#define _fastcall __attribute__((fastcall))
-#endif
-#ifndef __fastcall
-#define __fastcall __attribute__((fastcall))
-#endif
-#ifndef _stdcall
-#define _stdcall __attribute__((stdcall))
-#endif
-#ifndef __stdcall
-#define __stdcall __attribute__((stdcall))
-#endif
-#ifndef _cdecl
-#define _cdecl __attribute__((cdecl))
-#endif
-#ifndef __cdecl
-#define __cdecl __attribute__((cdecl))
-#endif
-#ifndef __declspec
-#define __declspec(e) __attribute__((e))
-#endif
-#ifndef _declspec
-#define _declspec(e) __attribute__((e))
-#endif
-#elif defined(__WATCOMC__)
-#define PACKED
-#else
-#define PACKED
-#define _cdecl
-#define __cdecl
-#endif
-
-#undef pascal
-#undef _pascal
-#undef __pascal
-#define pascal __stdcall
-#define _pascal __stdcall
-#define __pascal __stdcall
-#define PASCAL _pascal
-#define CDECL _cdecl
-#define STDCALL __stdcall
-#define FASTCALL __fastcall
-#define WINAPI __stdcall
-#define WINAPIV __cdecl
-#define APIENTRY __stdcall
-#define CALLBACK __stdcall
-#define APIPRIVATE __stdcall
-
-#define DECLSPEC_IMPORT __declspec(dllimport)
-#define DECLSPEC_EXPORT __declspec(dllexport)
-#ifdef __GNUC__
-#define DECLSPEC_NORETURN __declspec(noreturn)
-#define DECLARE_STDCALL_P( type ) __stdcall type
-#elif defined(__WATCOMC__)
-#define DECLSPEC_NORETURN
-#define DECLARE_STDCALL_P( type ) type __stdcall
-#endif /* __GNUC__/__WATCOMC__ */
-#define MAKEWORD(a,b) ((WORD)(((BYTE)(a))|(((WORD)((BYTE)(b)))<<8)))
-#define MAKELONG(a,b) ((LONG)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16)))
-#define LOWORD(l) ((WORD)((DWORD)(l)))
-#define HIWORD(l) ((WORD)(((DWORD)(l)>>16)&0xFFFF))
-#define LOBYTE(w) ((BYTE)(w))
-#define HIBYTE(w) ((BYTE)(((WORD)(w)>>8)&0xFF))
-
-#ifndef __WATCOMC__
-#ifndef _export
-#define _export
-#endif
-#ifndef __export
-#define __export
-#endif
-#endif
-
-#ifndef NOMINMAX
-#ifndef max
-#define max(a,b) ((a)>(b)?(a):(b))
-#endif
-#ifndef min
-#define min(a,b) ((a)<(b)?(a):(b))
-#endif
-#endif
-
-#define UNREFERENCED_PARAMETER(P) {(P)=(P);}
-#define UNREFERENCED_LOCAL_VARIABLE(L) {(L)=(L);}
-#define DBG_UNREFERENCED_PARAMETER(P)
-#define DBG_UNREFERENCED_LOCAL_VARIABLE(L)
-
-#ifndef NONAMELESSUNION
-#ifdef __GNUC__
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
-#define _ANONYMOUS_UNION __extension__
-#define _ANONYMOUS_STRUCT __extension__
-#else
-#if defined(__cplusplus)
-#define _ANONYMOUS_UNION __extension__
-#endif /* __cplusplus */
-#endif /* __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) */
-#elif defined(__WATCOMC__)
-#define _ANONYMOUS_UNION
-#define _ANONYMOUS_STRUCT
-#endif /* __GNUC__/__WATCOMC__ */
-#endif /* NONAMELESSUNION */
-
-#ifndef _ANONYMOUS_UNION
-#define _ANONYMOUS_UNION
-#define _UNION_NAME(x) x
-#define DUMMYUNIONNAME u
-#define DUMMYUNIONNAME2 u2
-#define DUMMYUNIONNAME3 u3
-#define DUMMYUNIONNAME4 u4
-#define DUMMYUNIONNAME5 u5
-#define DUMMYUNIONNAME6 u6
-#define DUMMYUNIONNAME7 u7
-#define DUMMYUNIONNAME8 u8
-#else
-#define _UNION_NAME(x)
-#define DUMMYUNIONNAME
-#define DUMMYUNIONNAME2
-#define DUMMYUNIONNAME3
-#define DUMMYUNIONNAME4
-#define DUMMYUNIONNAME5
-#define DUMMYUNIONNAME6
-#define DUMMYUNIONNAME7
-#define DUMMYUNIONNAME8
-#endif
-#ifndef _ANONYMOUS_STRUCT
-#define _ANONYMOUS_STRUCT
-#define _STRUCT_NAME(x) x
-#define DUMMYSTRUCTNAME s
-#define DUMMYSTRUCTNAME2 s2
-#define DUMMYSTRUCTNAME3 s3
-#else
-#define _STRUCT_NAME(x)
-#define DUMMYSTRUCTNAME
-#define DUMMYSTRUCTNAME2
-#define DUMMYSTRUCTNAME3
-#endif
-
-#ifndef NO_STRICT
-#ifndef STRICT
-#define STRICT 1
-#endif
-#endif
-
-/* FIXME: This will make some code compile. The programs will most
- likely crash when an exception is raised, but at least they will
- compile. */
-#if defined (__GNUC__) && defined (__SEH_NOOP)
-#define __try
-#define __except(x) if (0) /* don't execute handler */
-#define __finally
-
-#define _try __try
-#define _except __except
-#define _finally __finally
-#endif
-
-typedef unsigned long DWORD;
-typedef int WINBOOL,*PWINBOOL,*LPWINBOOL;
-/* FIXME: Is there a good solution to this? */
-#ifndef XFree86Server
-#ifndef __OBJC__
-typedef WINBOOL BOOL;
-#else
-#define BOOL WINBOOL
-#endif
-typedef unsigned char BYTE;
-#endif /* ndef XFree86Server */
-typedef BOOL *PBOOL,*LPBOOL;
-typedef unsigned short WORD;
-typedef float FLOAT;
-typedef FLOAT *PFLOAT;
-typedef BYTE *PBYTE,*LPBYTE;
-typedef int *PINT,*LPINT;
-typedef WORD *PWORD,*LPWORD;
-typedef long *LPLONG;
-typedef DWORD *PDWORD,*LPDWORD;
-typedef CONST void *PCVOID,*LPCVOID;
-typedef int INT;
-typedef unsigned int UINT,*PUINT,*LPUINT;
-
-#include <winnt.h>
-
-typedef UINT_PTR WPARAM;
-typedef LONG_PTR LPARAM;
-typedef LONG_PTR LRESULT;
-#ifndef _HRESULT_DEFINED
-typedef LONG HRESULT;
-#define _HRESULT_DEFINED
-#endif
-#ifndef XFree86Server
-typedef WORD ATOM;
-#endif /* XFree86Server */
-typedef HANDLE HGLOBAL;
-typedef HANDLE HLOCAL;
-typedef HANDLE GLOBALHANDLE;
-typedef HANDLE LOCALHANDLE;
-typedef void *HGDIOBJ;
-DECLARE_HANDLE(HACCEL);
-DECLARE_HANDLE(HBITMAP);
-DECLARE_HANDLE(HBRUSH);
-DECLARE_HANDLE(HCOLORSPACE);
-DECLARE_HANDLE(HDC);
-DECLARE_HANDLE(HGLRC);
-DECLARE_HANDLE(HDESK);
-DECLARE_HANDLE(HENHMETAFILE);
-DECLARE_HANDLE(HFONT);
-DECLARE_HANDLE(HICON);
-DECLARE_HANDLE(HKEY);
-/* FIXME: How to handle these. SM_CMONITORS etc in winuser.h also. */
-DECLARE_HANDLE(HMONITOR);
-#define HMONITOR_DECLARED 1
-DECLARE_HANDLE(HTERMINAL);
-DECLARE_HANDLE(HWINEVENTHOOK);
-
-typedef HKEY *PHKEY;
-DECLARE_HANDLE(HMENU);
-DECLARE_HANDLE(HMETAFILE);
-DECLARE_HANDLE(HINSTANCE);
-typedef HINSTANCE HMODULE;
-DECLARE_HANDLE(HPALETTE);
-DECLARE_HANDLE(HPEN);
-DECLARE_HANDLE(HRGN);
-DECLARE_HANDLE(HRSRC);
-DECLARE_HANDLE(HSTR);
-DECLARE_HANDLE(HTASK);
-DECLARE_HANDLE(HWND);
-DECLARE_HANDLE(HWINSTA);
-DECLARE_HANDLE(HKL);
-typedef int HFILE;
-typedef HICON HCURSOR;
-typedef DWORD COLORREF;
-typedef int (WINAPI *FARPROC)();
-typedef int (WINAPI *NEARPROC)();
-typedef int (WINAPI *PROC)();
-typedef struct tagRECT {
- LONG left;
- LONG top;
- LONG right;
- LONG bottom;
-} RECT,*PRECT,*LPRECT;
-typedef const RECT *LPCRECT;
-typedef struct tagRECTL {
- LONG left;
- LONG top;
- LONG right;
- LONG bottom;
-} RECTL,*PRECTL,*LPRECTL;
-typedef const RECTL *LPCRECTL;
-typedef struct tagPOINT {
- LONG x;
- LONG y;
-} POINT,POINTL,*PPOINT,*LPPOINT,*PPOINTL,*LPPOINTL;
-typedef struct tagSIZE {
- LONG cx;
- LONG cy;
-} SIZE,SIZEL,*PSIZE,*LPSIZE,*PSIZEL,*LPSIZEL;
-typedef struct tagPOINTS {
- SHORT x;
- SHORT y;
-} POINTS,*PPOINTS,*LPPOINTS;
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/windns.h b/winsup/w32api/include/windns.h
deleted file mode 100644
index 0a7760d..0000000
--- a/winsup/w32api/include/windns.h
+++ /dev/null
@@ -1,405 +0,0 @@
-#ifndef _WINDNS_H
-#define _WINDNS_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define DNS_QUERY_STANDARD 0x0
-#define DNS_QUERY_ACCEPT_TRUNCATED_RESPONSE 0x1
-#define DNS_QUERY_USE_TCP_ONLY 0x2
-#define DNS_QUERY_NO_RECURSION 0x4
-#define DNS_QUERY_BYPASS_CACHE 0x8
-#define DNS_QUERY_NO_WIRE_QUERY 0x10
-#define DNS_QUERY_NO_LOCAL_NAME 0x20
-#define DNS_QUERY_NO_HOSTS_FILE 0x40
-#define DNS_QUERY_NO_NETBT 0x80
-#define DNS_QUERY_TREAT_AS_FQDN 0x1000
-#define DNS_QUERY_WIRE_ONLY 0x100
-#define DNS_QUERY_RETURN_MESSAGE 0x200
-#define DNS_QUERY_DONT_RESET_TTL_VALUES 0x100000
-#define DNS_QUERY_RESERVED 0xff000000
-
-#define DNS_UPDATE_SECURITY_USE_DEFAULT 0x0
-#define DNS_UPDATE_SECURITY_OFF 0x10
-#define DNS_UPDATE_SECURITY_ON 0x20
-#define DNS_UPDATE_SECURITY_ONLY 0x100
-#define DNS_UPDATE_CACHE_SECURITY_CONTEXT 0x200
-#define DNS_UPDATE_TEST_USE_LOCAL_SYS_ACCT 0x400
-#define DNS_UPDATE_FORCE_SECURITY_NEGO 0x800
-#define DNS_UPDATE_RESERVED 0xffff0000
-
-#ifndef RC_INVOKE
-typedef DWORD IP4_ADDRESS;
-typedef DWORD DNS_STATUS;
-enum {
- DNS_TYPE_A=1,
- DNS_TYPE_NS,
- DNS_TYPE_MD,
- DNS_TYPE_MF,
- DNS_TYPE_CNAME,
- DNS_TYPE_SOA,
- DNS_TYPE_MB,
- DNS_TYPE_MG,
- DNS_TYPE_MR,
- DNS_TYPE_NULL,
- DNS_TYPE_WKS,
- DNS_TYPE_PTR,
- DNS_TYPE_HINFO,
- DNS_TYPE_MINFO,
- DNS_TYPE_MX,
- DNS_TYPE_TEXT,
- DNS_TYPE_RP,
- DNS_TYPE_AFSDB,
- DNS_TYPE_X25,
- DNS_TYPE_ISDN,
- DNS_TYPE_RT,
- DNS_TYPE_NSAP,
- DNS_TYPE_NSAPPTR,
- DNS_TYPE_SIG,
- DNS_TYPE_KEY,
- DNS_TYPE_PX,
- DNS_TYPE_GPOS,
- DNS_TYPE_AAAA,
- DNS_TYPE_LOC,
- DNS_TYPE_NXT,
- DNS_TYPE_EID,
- DNS_TYPE_NIMLOC,
- DNS_TYPE_SRV,
- DNS_TYPE_ATMA,
- DNS_TYPE_NAPTR,
- DNS_TYPE_KX,
- DNS_TYPE_CERT,
- DNS_TYPE_A6,
- DNS_TYPE_DNAME,
- DNS_TYPE_SINK,
- DNS_TYPE_OPT,
- DNS_TYPE_UINFO=100,
- DNS_TYPE_UID,
- DNS_TYPE_GID,
- DNS_TYPE_UNSPEC,
- DNS_TYPE_ADDRS=248,
- DNS_TYPE_TKEY,
- DNS_TYPE_TSIG,
- DNS_TYPE_IXFR,
- DNS_TYPE_AXFR,
- DNS_TYPE_MAILB,
- DNS_TYPE_MAILA,
- DNS_TYPE_ALL,
- DNS_TYPE_ANY=DNS_TYPE_ALL
-};
-typedef enum _DNS_CHARSET
-{
- DnsCharSetUnknown,
- DnsCharSetUnicode,
- DnsCharSetUtf8,
- DnsCharSetAnsi
-} DNS_CHARSET;
-typedef enum
-{
- DnsConfigPrimaryDomainName_W,
- DnsConfigPrimaryDomainName_A,
- DnsConfigPrimaryDomainName_UTF8,
- DnsConfigAdapterDomainName_W,
- DnsConfigAdapterDomainName_A,
- DnsConfigAdapterDomainName_UTF8,
- DnsConfigDnsServerList,
- DnsConfigSearchList,
- DnsConfigAdapterInfo,
- DnsConfigPrimaryHostNameRegistrationEnabled,
- DnsConfigAdapterHostNameRegistrationEnabled,
- DnsConfigAddressRegistrationMaxCount,
- DnsConfigHostName_W,
- DnsConfigHostName_A,
- DnsConfigHostName_UTF8,
- DnsConfigFullHostName_W,
- DnsConfigFullHostName_A,
- DnsConfigFullHostName_UTF8
-} DNS_CONFIG_TYPE;
-typedef enum
-{
- DnsFreeFlat = 0,
- DnsFreeRecordList,
- DnsFreeParsedMessageFields
-} DNS_FREE_TYPE;
-typedef enum _DNS_NAME_FORMAT
-{
- DnsNameDomain,
- DnsNameDomainLabel,
- DnsNameHostnameFull,
- DnsNameHostnameLabel,
- DnsNameWildcard,
- DnsNameSrvRecord
-} DNS_NAME_FORMAT;
-typedef enum
-{
- DnsSectionQuestion,
- DnsSectionAnswer,
- DnsSectionAuthority,
- DnsSectionAdditional
-} DNS_SECTION;
-typedef struct _IP4_ARRAY {
- DWORD AddrCount;
- IP4_ADDRESS AddrArray[1];
-} IP4_ARRAY, *PIP4_ARRAY;
-typedef struct {
- DWORD IP6Dword[4];
-} IP6_ADDRESS, *PIP6_ADDRESS, DNS_IP6_ADDRESS, *PDNS_IP6_ADDRESS;
-typedef struct _DNS_HEADER {
- WORD Xid;
- BYTE RecursionDesired;
- BYTE Truncation;
- BYTE Authoritative;
- BYTE Opcode;
- BYTE IsResponse;
- BYTE ResponseCode;
- BYTE Reserved;
- BYTE RecursionAvailable;
- WORD QuestionCount;
- WORD AnswerCount;
- WORD NameServerCount;
- WORD AdditionalCount;
-} DNS_HEADER, *PDNS_HEADER;
-typedef struct _DNS_MESSAGE_BUFFER {
- DNS_HEADER MessageHead;
- CHAR MessageBody[1];
-} DNS_MESSAGE_BUFFER, *PDNS_MESSAGE_BUFFER;
-typedef struct _DnsRecordFlags {
- DWORD Section :2;
- DWORD Delete :1;
- DWORD CharSet :2;
- DWORD Unused :3;
- DWORD Reserved :24;
-} DNS_RECORD_FLAGS;
-#define DNSREC_QUESTION 0
-#define DNSREC_ANSWER 1
-#define DNSREC_AUTHORITY 2
-#define DNSREC_ADDITIONAL 3
-typedef struct {
- IP4_ADDRESS IpAddress;
-} DNS_A_DATA, *PDNS_A_DATA;
-typedef struct {
- DNS_IP6_ADDRESS Ip6Address;
-} DNS_AAAA_DATA, *PDNS_AAAA_DATA;
-#define DNS_ATMA_MAX_ADDR_LENGTH 20
-typedef struct {
- BYTE AddressType;
- BYTE Address[DNS_ATMA_MAX_ADDR_LENGTH];
-} DNS_ATMA_DATA, *PDNS_ATMA_DATA;
-typedef struct {
- WORD wFlags;
- BYTE chProtocol;
- BYTE chAlgorithm;
- BYTE Key[1];
-} DNS_KEY_DATA, *PDNS_KEY_DATA;
-typedef struct {
- WORD wVersion;
- WORD wSize;
- WORD wHorPrec;
- WORD wVerPrec;
- DWORD dwLatitude;
- DWORD dwLongitude;
- DWORD dwAltitude;
-} DNS_LOC_DATA, *PDNS_LOC_DATA;
-typedef struct {
- LPTSTR pNameMailbox;
- LPTSTR pNameErrorsMailbox;
-} DNS_MINFO_DATA, *PDNS_MINFO_DATA;
-typedef struct {
- LPTSTR pNameExchange;
- WORD wPreference;
- WORD Pad;
-} DNS_MX_DATA, *PDNS_MX_DATA;
-typedef struct {
- DWORD dwByteCount;
- BYTE Data[1];
-} DNS_NULL_DATA, *PDNS_NULL_DATA;
-typedef struct {
- LPTSTR pNameNext;
- WORD wNumTypes;
- WORD wTypes[1];
-} DNS_NXT_DATA, *PDNS_NXT_DATA;
-typedef struct {
- LPTSTR pNameHost;
-} DNS_PTR_DATA, *PDNS_PTR_DATA;
-typedef struct {
- LPTSTR pNameSigner;
- WORD wTypeCovered;
- BYTE chAlgorithm;
- BYTE chLabelCount;
- DWORD dwOriginalTtl;
- DWORD dwExpiration;
- DWORD dwTimeSigned;
- WORD wKeyTag;
- WORD Pad;
- BYTE Signature[1];
-} DNS_SIG_DATA, *PDNS_SIG_DATA;
-typedef struct {
- LPTSTR pNamePrimaryServer;
- LPTSTR pNameAdministrator;
- DWORD dwSerialNo;
- DWORD dwRefresh;
- DWORD dwRetry;
- DWORD dwExpire;
- DWORD dwDefaultTtl;
-} DNS_SOA_DATA, *PDNS_SOA_DATA;
-typedef struct {
- LPTSTR pNameTarget;
- WORD wPriority;
- WORD wWeight;
- WORD wPort;
- WORD Pad;
-} DNS_SRV_DATA, *PDNS_SRV_DATA;
-typedef struct {
- DWORD dwStringCount;
- LPTSTR pStringArray[1];
-} DNS_TXT_DATA, *PDNS_TXT_DATA;
-typedef struct {
- LPTSTR pNameAlgorithm;
- PBYTE pAlgorithmPacket;
- PBYTE pKey;
- PBYTE pOtherData;
- DWORD dwCreateTime;
- DWORD dwExpireTime;
- WORD wMode;
- WORD wError;
- WORD wKeyLength;
- WORD wOtherLength;
- UCHAR cAlgNameLength;
- BOOL bPacketPointers;
-} DNS_TKEY_DATA, *PDNS_TKEY_DATA;
-typedef struct {
- LPTSTR pNameAlgorithm;
- PBYTE pAlgorithmPacket;
- PBYTE pSignature;
- PBYTE pOtherData;
- LONGLONG i64CreateTime;
- WORD wFudgeTime;
- WORD wOriginalXid;
- WORD wError;
- WORD wSigLength;
- WORD wOtherLength;
- UCHAR cAlgNameLength;
- BOOL bPacketPointers;
-} DNS_TSIG_DATA, *PDNS_TSIG_DATA;
-typedef struct {
- DWORD dwMappingFlag;
- DWORD dwLookupTimeout;
- DWORD dwCacheTimeout;
- DWORD cWinsServerCount;
- IP4_ADDRESS WinsServers[1];
-} DNS_WINS_DATA, *PDNS_WINS_DATA;
-typedef struct {
- DWORD dwMappingFlag;
- DWORD dwLookupTimeout;
- DWORD dwCacheTimeout;
- LPTSTR pNameResultDomain;
-} DNS_WINSR_DATA, *PDNS_WINSR_DATA;
-typedef struct _DNS_WIRE_QUESTION {
- WORD QuestionType;
- WORD QuestionClass;
-} DNS_WIRE_QUESTION, *PDNS_WIRE_QUESTION;
-typedef struct _DNS_WIRE_RECORD {
- WORD RecordType;
- WORD RecordClass;
- DWORD TimeToLive;
- WORD DataLength;
-} DNS_WIRE_RECORD, *PDNS_WIRE_RECORD;
-typedef struct {
- IP4_ADDRESS IpAddress;
- UCHAR chProtocol;
- BYTE BitMask[1];
-} DNS_WKS_DATA, *PDNS_WKS_DATA;
-typedef struct _DnsRecord {
- struct _DnsRecord* pNext;
- LPTSTR pName;
- WORD wType;
- WORD wDataLength;
- union {
- DWORD DW;
- DNS_RECORD_FLAGS S;
- } Flags;
- DWORD dwTtl;
- DWORD dwReserved;
- union {
- DNS_A_DATA A;
- DNS_SOA_DATA SOA, Soa;
- DNS_PTR_DATA PTR, Ptr, NS, Ns, CNAME, Cname, MB, Mb,
- MD, Md, MF, Mf, MG, Mg, MR, Mr;
- DNS_MINFO_DATA MINFO, Minfo, RP, Rp;
- DNS_MX_DATA MX, Mx, AFSDB, Afsdb, RT, Rt;
- DNS_TXT_DATA HINFO, Hinfo, ISDN, Isdn, TXT, Txt, X25;
- DNS_NULL_DATA Null;
- DNS_WKS_DATA WKS, Wks;
- DNS_AAAA_DATA AAAA;
- DNS_KEY_DATA KEY, Key;
- DNS_SIG_DATA SIG, Sig;
- DNS_ATMA_DATA ATMA, Atma;
- DNS_NXT_DATA NXT, Nxt;
- DNS_SRV_DATA SRV, Srv;
- DNS_TKEY_DATA TKEY, Tkey;
- DNS_TSIG_DATA TSIG, Tsig;
- DNS_WINS_DATA WINS, Wins;
- DNS_WINSR_DATA WINSR, WinsR, NBSTAT, Nbstat;
- } Data;
-} DNS_RECORD, *PDNS_RECORD;
-typedef struct _DnsRRSet {
- PDNS_RECORD pFirstRR;
- PDNS_RECORD pLastRR;
-} DNS_RRSET, *PDNS_RRSET;
-
-DNS_STATUS WINAPI DnsAcquireContextHandle_A(DWORD,PVOID,HANDLE*);
-DNS_STATUS WINAPI DnsAcquireContextHandle_W(DWORD,PVOID,HANDLE*);
-DNS_STATUS WINAPI DnsExtractRecordsFromMessage_W(PDNS_MESSAGE_BUFFER,WORD,PDNS_RECORD*);
-DNS_STATUS WINAPI DnsExtractRecordsFromMessage_UTF8(PDNS_MESSAGE_BUFFER,WORD,PDNS_RECORD*);
-DNS_STATUS WINAPI DnsModifyRecordsInSet_A(PDNS_RECORD,PDNS_RECORD,DWORD,HANDLE,PIP4_ARRAY,PVOID);
-DNS_STATUS WINAPI DnsModifyRecordsInSet_W(PDNS_RECORD,PDNS_RECORD,DWORD,HANDLE,PIP4_ARRAY,PVOID);
-DNS_STATUS WINAPI DnsModifyRecordsInSet_UTF8(PDNS_RECORD,PDNS_RECORD,DWORD,HANDLE,PIP4_ARRAY,PVOID);
-BOOL WINAPI DnsNameCompare_A(LPSTR,LPSTR);
-BOOL WINAPI DnsNameCompare_W(LPWSTR,LPWSTR);
-DNS_STATUS WINAPI DnsQuery_A(PCSTR,WORD,DWORD,PIP4_ARRAY,PDNS_RECORD*,PVOID*);
-DNS_STATUS WINAPI DnsQuery_W(PCWSTR,WORD,DWORD,PIP4_ARRAY,PDNS_RECORD*,PVOID*);
-DNS_STATUS WINAPI DnsQuery_UTF8(PCSTR,WORD,DWORD,PIP4_ARRAY,PDNS_RECORD*,PVOID*);
-DNS_STATUS WINAPI DnsQueryConfig(DNS_CONFIG_TYPE,DWORD,PWSTR,PVOID,PVOID,PDWORD);
-BOOL WINAPI DnsRecordCompare(PDNS_RECORD,PDNS_RECORD);
-PDNS_RECORD WINAPI DnsRecordCopyEx(PDNS_RECORD,DNS_CHARSET,DNS_CHARSET);
-void WINAPI DnsRecordListFree(PDNS_RECORD,DNS_FREE_TYPE);
-BOOL WINAPI DnsRecordSetCompare(PDNS_RECORD,PDNS_RECORD,PDNS_RECORD*,PDNS_RECORD*);
-PDNS_RECORD WINAPI DnsRecordSetCopyEx(PDNS_RECORD,DNS_CHARSET,DNS_CHARSET);
-PDNS_RECORD WINAPI DnsRecordSetDetach(PDNS_RECORD);
-void WINAPI DnsReleaseContextHandle(HANDLE);
-DNS_STATUS WINAPI DnsReplaceRecordSetA(PDNS_RECORD,DWORD,HANDLE,PIP4_ARRAY,PVOID);
-DNS_STATUS WINAPI DnsReplaceRecordSetW(PDNS_RECORD,DWORD,HANDLE,PIP4_ARRAY,PVOID);
-DNS_STATUS WINAPI DnsReplaceRecordSetUTF8(PDNS_RECORD,DWORD,HANDLE,PIP4_ARRAY,PVOID);
-DNS_STATUS WINAPI DnsValidateName_A(LPCSTR,DNS_NAME_FORMAT);
-DNS_STATUS WINAPI DnsValidateName_W(LPCWSTR, DNS_NAME_FORMAT);
-DNS_STATUS WINAPI DnsValidateName_UTF8(LPCSTR,DNS_NAME_FORMAT);
-BOOL WINAPI DnsWriteQuestionToBuffer_W(PDNS_MESSAGE_BUFFER,LPDWORD,LPWSTR,WORD,WORD,BOOL);
-BOOL WINAPI DnsWriteQuestionToBuffer_UTF8(PDNS_MESSAGE_BUFFER,LPDWORD,LPSTR,WORD,WORD,BOOL);
-
-#ifdef UNICODE
-#define DnsAcquireContextHandle DnsAcquireContextHandle_W
-#define DnsModifyRecordsInSet DnsModifyRecordsInSet_W
-#define DnsNameCompare DnsNameCompare_W
-#define DnsQuery DnsQuery_W
-#define DnsReplaceRecordSet DnsReplaceRecordSetW
-#define DnsValidateName DnsValidateName_W
-#else
-#define DnsAcquireContextHandle DnsAcquireContextHandle_A
-#define DnsModifyRecordsInSet DnsModifyRecordsInSet_A
-#define DnsNameCompare DnsNameCompare_A
-#define DnsQuery DnsQuery_A
-#define DnsReplaceRecordSet DnsReplaceRecordSetA
-#define DnsValidateName DnsValidateName_A
-#endif
-
-#endif /* RC_INVOKED */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _WINDNS_H */
diff --git a/winsup/w32api/include/windows.h b/winsup/w32api/include/windows.h
deleted file mode 100644
index 97e037e..0000000
--- a/winsup/w32api/include/windows.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- windows.h - main header file for the Win32 API
-
- Written by Anders Norlander <anorland@hem2.passagen.se>
-
- This file is part of a free library for the Win32 API.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-#ifndef _WINDOWS_H
-#define _WINDOWS_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-/* translate GCC target defines to MS equivalents. Keep this synchronized
- with winnt.h. */
-#if defined(__i686__) && !defined(_M_IX86)
-#define _M_IX86 600
-#elif defined(__i586__) && !defined(_M_IX86)
-#define _M_IX86 500
-#elif defined(__i486__) && !defined(_M_IX86)
-#define _M_IX86 400
-#elif defined(__i386__) && !defined(_M_IX86)
-#define _M_IX86 300
-#endif
-#if defined(_M_IX86) && !defined(_X86_)
-#define _X86_
-#elif defined(_M_ALPHA) && !defined(_ALPHA_)
-#define _ALPHA_
-#elif defined(_M_PPC) && !defined(_PPC_)
-#define _PPC_
-#elif defined(_M_MRX000) && !defined(_MIPS_)
-#define _MIPS_
-#elif defined(_M_M68K) && !defined(_68K_)
-#define _68K_
-#endif
-
-#ifdef RC_INVOKED
-/* winresrc.h includes the necessary headers */
-#include <winresrc.h>
-#else
-
-#include <stdarg.h>
-#include <windef.h>
-#include <wincon.h>
-#include <winbase.h>
-#if !(defined NOGDI || defined _WINGDI_H)
-#include <wingdi.h>
-#endif
-#ifndef _WINUSER_H
-#include <winuser.h>
-#endif
-#ifndef _WINNLS_H
-#include <winnls.h>
-#endif
-#ifndef _WINVER_H
-#include <winver.h>
-#endif
-#ifndef _WINNETWK_H
-#include <winnetwk.h>
-#endif
-#ifndef _WINREG_H
-#include <winreg.h>
-#endif
-#ifndef _WINSVC_H
-#include <winsvc.h>
-#endif
-
-#ifndef WIN32_LEAN_AND_MEAN
-#include <cderr.h>
-#include <dde.h>
-#include <ddeml.h>
-#include <dlgs.h>
-#include <imm.h>
-#include <lzexpand.h>
-#include <mmsystem.h>
-#include <nb30.h>
-#include <rpc.h>
-#include <shellapi.h>
-#include <winperf.h>
-#ifndef NOGDI
-#include <commdlg.h>
-#include <winspool.h>
-#endif
-#if defined(Win32_Winsock)
-#warning "The Win32_Winsock macro name is deprecated.\
- Please use __USE_W32_SOCKETS instead"
-#ifndef __USE_W32_SOCKETS
-#define __USE_W32_SOCKETS
-#endif
-#endif
-#if defined(__USE_W32_SOCKETS) || !(defined(__CYGWIN__) || defined(__MSYS__) || defined(_UWIN))
-#if (_WIN32_WINNT >= 0x0400)
-#include <winsock2.h>
-/*
- * MS likes to include mswsock.h here as well,
- * but that can cause undefined symbols if
- * winsock2.h is included before windows.h
- */
-#else
-#include <winsock.h>
-#endif /* (_WIN32_WINNT >= 0x0400) */
-#endif
-#ifndef NOGDI
-/* In older versions we disallowed COM declarations in __OBJC__
- because of conflicts with @interface directive. Define _OBJC_NO_COM
- to keep this behaviour. */
-#if !defined (_OBJC_NO_COM)
-#if (__GNUC__ >= 3) || defined (__WATCOMC__)
-#include <ole2.h>
-#endif
-#endif /* _OBJC_NO_COM */
-#endif
-
-#endif /* WIN32_LEAN_AND_MEAN */
-
-#endif /* RC_INVOKED */
-
-#ifdef __OBJC__
-/* FIXME: Not undefining BOOL here causes all BOOLs to be WINBOOL (int),
- but undefining it causes trouble as well if a file is included after
- windows.h
-*/
-#undef BOOL
-#endif
-
-#endif
diff --git a/winsup/w32api/include/windowsx.h b/winsup/w32api/include/windowsx.h
deleted file mode 100644
index 460718e..0000000
--- a/winsup/w32api/include/windowsx.h
+++ /dev/null
@@ -1,544 +0,0 @@
-#ifndef _WINDOWSX_H
-#define _WINDOWSX_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#define WM_CTLCOLOR 25
-#define Button_Enable(hwndCtl,fEnable) EnableWindow((hwndCtl),(fEnable))
-#define Button_GetCheck(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl),BM_GETCHECK,0,0))
-#define Button_GetState(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl),BM_GETSTATE,0,0))
-#define Button_GetText(hwndCtl,lpch,cchMax) GetWindowText((hwndCtl),(lpch),(cchMax))
-#define Button_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl)
-#define Button_SetCheck(hwndCtl,check) ((void)SendMessage((hwndCtl),BM_SETCHECK,(WPARAM)(int)(check),0))
-#define Button_SetState(hwndCtl,state) ((UINT)(DWORD)SendMessage((hwndCtl),BM_SETSTATE,(WPARAM)(int)(state),0))
-#define Button_SetStyle(hwndCtl,style,fRedraw) ((void)SendMessage((hwndCtl),BM_SETSTYLE,(WPARAM)LOWORD(style),MAKELPARAM(((fRedraw) ? TRUE : FALSE),0)))
-#define Button_SetText(hwndCtl,lpsz) SetWindowText((hwndCtl),(lpsz))
-#define CheckDefDlgRecursion(pfRecursion) if (*(pfRecursion)) {*(pfRecursion) = FALSE; return FALSE; }
-#define ComboBox_AddItemData(hwndCtl,data) ((int)(DWORD)SendMessage((hwndCtl),CB_ADDSTRING,0,(LPARAM)(data)))
-#define ComboBox_AddString(hwndCtl,lpsz) ((int)(DWORD)SendMessage((hwndCtl),CB_ADDSTRING,0,(LPARAM)(LPCTSTR)(lpsz)))
-#define ComboBox_DeleteString(hwndCtl,index) ((int)(DWORD)SendMessage((hwndCtl),CB_DELETESTRING,(WPARAM)(int)(index),0))
-#define ComboBox_Dir(hwndCtl,attrs,lpszFileSpec) ((int)(DWORD)SendMessage((hwndCtl),CB_DIR,(WPARAM)(UINT)(attrs),(LPARAM)(LPCTSTR)(lpszFileSpec)))
-#define ComboBox_Enable(hwndCtl,fEnable) EnableWindow((hwndCtl),(fEnable))
-#define ComboBox_FindItemData(hwndCtl,indexStart,data) ((int)(DWORD)SendMessage((hwndCtl),CB_FINDSTRING,(WPARAM)(int)(indexStart),(LPARAM)(data)))
-#define ComboBox_FindString(hwndCtl,indexStart,lpszFind) ((int)(DWORD)SendMessage((hwndCtl),CB_FINDSTRING,(WPARAM)(int)(indexStart),(LPARAM)(LPCTSTR)(lpszFind)))
-#define ComboBox_FindStringExact(hwndCtl,indexStart,lpszFind) ((int)(DWORD)SendMessage((hwndCtl),CB_FINDSTRINGEXACT,(WPARAM)(int)(indexStart),(LPARAM)(LPCTSTR)(lpszFind)))
-#define ComboBox_GetCount(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl),CB_GETCOUNT,0,0))
-#define ComboBox_GetCurSel(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl),CB_GETCURSEL,0,0))
-#define ComboBox_GetDroppedControlRect(hwndCtl,lprc) ((void)SendMessage((hwndCtl),CB_GETDROPPEDCONTROLRECT,0,(LPARAM)(RECT*)(lprc)))
-#define ComboBox_GetDroppedState(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl),CB_GETDROPPEDSTATE,0,0))
-#define ComboBox_GetEditSel(hwndCtl) ((DWORD)SendMessage((hwndCtl),CB_GETEDITSEL,0,0))
-#define ComboBox_GetExtendedUI(hwndCtl) ((UINT)(DWORD)SendMessage((hwndCtl),CB_GETEXTENDEDUI,0,0))
-#define ComboBox_GetItemData(hwndCtl,index) ((LRESULT)(DWORD)SendMessage((hwndCtl),CB_GETITEMDATA,(WPARAM)(int)(index),0))
-#define ComboBox_GetItemHeight(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl),CB_GETITEMHEIGHT,0,0))
-#define ComboBox_GetLBText(hwndCtl,index,lpszBuffer) ((int)(DWORD)SendMessage((hwndCtl),CB_GETLBTEXT,(WPARAM)(int)(index),(LPARAM)(LPCTSTR)(lpszBuffer)))
-#define ComboBox_GetLBTextLen(hwndCtl,index) ((int)(DWORD)SendMessage((hwndCtl),CB_GETLBTEXTLEN,(WPARAM)(int)(index),0))
-#define ComboBox_GetText(hwndCtl,lpch,cchMax) GetWindowText((hwndCtl),(lpch),(cchMax))
-#define ComboBox_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl)
-#define ComboBox_InsertItemData(hwndCtl,index,data) ((int)(DWORD)SendMessage((hwndCtl),CB_INSERTSTRING,(WPARAM)(int)(index),(LPARAM)(data)))
-#define ComboBox_InsertString(hwndCtl,index,lpsz) ((int)(DWORD)SendMessage((hwndCtl),CB_INSERTSTRING,(WPARAM)(int)(index),(LPARAM)(LPCTSTR)(lpsz)))
-#define ComboBox_LimitText(hwndCtl,cchLimit) ((int)(DWORD)SendMessage((hwndCtl),CB_LIMITTEXT,(WPARAM)(int)(cchLimit),0))
-#define ComboBox_ResetContent(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl),CB_RESETCONTENT,0,0))
-#define ComboBox_SelectItemData(hwndCtl,indexStart,data) ((int)(DWORD)SendMessage((hwndCtl),CB_SELECTSTRING,(WPARAM)(int)(indexStart),(LPARAM)(data)))
-#define ComboBox_SelectString(hwndCtl,indexStart,lpszSelect) ((int)(DWORD)SendMessage((hwndCtl),CB_SELECTSTRING,(WPARAM)(int)(indexStart),(LPARAM)(LPCTSTR)(lpszSelect)))
-#define ComboBox_SetCurSel(hwndCtl,index) ((int)(DWORD)SendMessage((hwndCtl),CB_SETCURSEL,(WPARAM)(int)(index),0))
-#define ComboBox_SetEditSel(hwndCtl,ichStart,ichEnd) ((int)(DWORD)SendMessage((hwndCtl),CB_SETEDITSEL,0,MAKELPARAM((ichStart),(ichEnd))))
-#define ComboBox_SetExtendedUI(hwndCtl,flags) ((int)(DWORD)SendMessage((hwndCtl),CB_SETEXTENDEDUI,(WPARAM)(UINT)(flags),0))
-#define ComboBox_SetItemData(hwndCtl,index,data) ((int)(DWORD)SendMessage((hwndCtl),CB_SETITEMDATA,(WPARAM)(int)(index),(LPARAM)(data)))
-#define ComboBox_SetItemHeight(hwndCtl,index,cyItem) ((int)(DWORD)SendMessage((hwndCtl),CB_SETITEMHEIGHT,(WPARAM)(int)(index),(LPARAM)(int)cyItem))
-#define ComboBox_SetText(hwndCtl,lpsz) SetWindowText((hwndCtl),(lpsz))
-#define ComboBox_ShowDropdown(hwndCtl,fShow) ((BOOL)(DWORD)SendMessage((hwndCtl),CB_SHOWDROPDOWN,(WPARAM)(BOOL)(fShow),0))
-#define CopyRgn(hrgnDst,hrgnSrc) CombineRgn(hrgnDst,hrgnSrc,0,RGN_COPY)
-#define DECLARE_HANDLE32 DECLARE_HANDLE
-#define DefDlgProcEx(hwnd,msg,wParam,lParam,pfRecursion) (*(pfRecursion) = TRUE,DefDlgProc(hwnd,msg,wParam,lParam))
-#define DeleteBitmap(hbm) DeleteObject((HGDIOBJ)(HBITMAP)(hbm))
-#define DeleteBrush(hbr) DeleteObject((HGDIOBJ)(HBRUSH)(hbr))
-#define DeleteFont(hfont) DeleteObject((HGDIOBJ)(HFONT)(hfont))
-#define DeletePalette(hpal) DeleteObject((HGDIOBJ)(HPALETTE)(hpal))
-#define DeletePen(hpen) DeleteObject((HGDIOBJ)(HPEN)(hpen))
-#define DeleteRgn(hrgn) DeleteObject((HGDIOBJ)(HRGN)(hrgn))
-#define Edit_CanUndo(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl),EM_CANUNDO,0,0))
-#define Edit_EmptyUndoBuffer(hwndCtl) ((void)SendMessage((hwndCtl),EM_EMPTYUNDOBUFFER,0,0))
-#define Edit_Enable(hwndCtl,fEnable) EnableWindow((hwndCtl),(fEnable))
-#define Edit_FmtLines(hwndCtl,fAddEOL) ((BOOL)(DWORD)SendMessage((hwndCtl),EM_FMTLINES,(WPARAM)(BOOL)(fAddEOL),0))
-#define Edit_GetFirstVisibleLine(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl),EM_GETFIRSTVISIBLELINE,0,0))
-#define Edit_GetHandle(hwndCtl) ((HLOCAL)(UINT)(DWORD)SendMessage((hwndCtl),EM_GETHANDLE,0,0))
-#define Edit_GetLine(hwndCtl,line,lpch,cchMax) ((*((int*)(lpch)) = (cchMax)),((int)(DWORD)SendMessage((hwndCtl),EM_GETLINE,(WPARAM)(int)(line),(LPARAM)(LPTSTR)(lpch))))
-#define Edit_GetLineCount(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl),EM_GETLINECOUNT,0,0))
-#define Edit_GetModify(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl),EM_GETMODIFY,0,0))
-#define Edit_GetPasswordChar(hwndCtl) ((TCHAR)(DWORD)SendMessage((hwndCtl),EM_GETPASSWORDCHAR,0,0))
-#define Edit_GetRect(hwndCtl,lprc) ((void)SendMessage((hwndCtl),EM_GETRECT,0,(LPARAM)(RECT*)(lprc)))
-#define Edit_GetSel(hwndCtl) ((DWORD)SendMessage((hwndCtl),EM_GETSEL,0,0))
-#define Edit_GetText(hwndCtl,lpch,cchMax) GetWindowText((hwndCtl),(lpch),(cchMax))
-#define Edit_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl)
-#define Edit_GetWordBreakProc(hwndCtl) ((EDITWORDBREAKPROC)SendMessage((hwndCtl),EM_GETWORDBREAKPROC,0,0))
-#define Edit_LimitText(hwndCtl,cchMax) ((void)SendMessage((hwndCtl),EM_LIMITTEXT,(WPARAM)(cchMax),0))
-#define Edit_LineFromChar(hwndCtl,ich) ((int)(DWORD)SendMessage((hwndCtl),EM_LINEFROMCHAR,(WPARAM)(int)(ich),0))
-#define Edit_LineIndex(hwndCtl,line) ((int)(DWORD)SendMessage((hwndCtl),EM_LINEINDEX,(WPARAM)(int)(line),0))
-#define Edit_LineLength(hwndCtl,line) ((int)(DWORD)SendMessage((hwndCtl),EM_LINELENGTH,(WPARAM)(int)(line),0))
-#define Edit_ReplaceSel(hwndCtl,lpszReplace) ((void)SendMessage((hwndCtl),EM_REPLACESEL,0,(LPARAM)(LPCTSTR)(lpszReplace)))
-#define Edit_Scroll(hwndCtl,dv,dh) ((void)SendMessage((hwndCtl),EM_LINESCROLL,(WPARAM)(dh),(LPARAM)(dv)))
-#define Edit_ScrollCaret(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl),EM_SCROLLCARET,0,0))
-#define Edit_SetHandle(hwndCtl,h) ((void)SendMessage((hwndCtl),EM_SETHANDLE,(WPARAM)(UINT)(HLOCAL)(h),0))
-#define Edit_SetModify(hwndCtl,fModified) ((void)SendMessage((hwndCtl),EM_SETMODIFY,(WPARAM)(UINT)(fModified),0))
-#define Edit_SetPasswordChar(hwndCtl,ch) ((void)SendMessage((hwndCtl),EM_SETPASSWORDCHAR,(WPARAM)(UINT)(ch),0))
-#define Edit_SetReadOnly(hwndCtl,fReadOnly) ((BOOL)(DWORD)SendMessage((hwndCtl),EM_SETREADONLY,(WPARAM)(BOOL)(fReadOnly),0))
-#define Edit_SetRect(hwndCtl,lprc) ((void)SendMessage((hwndCtl),EM_SETRECT,0,(LPARAM)(const RECT*)(lprc)))
-#define Edit_SetRectNoPaint(hwndCtl,lprc) ((void)SendMessage((hwndCtl),EM_SETRECTNP,0,(LPARAM)(const RECT*)(lprc)))
-#define Edit_SetSel(hwndCtl,ichStart,ichEnd) ((void)SendMessage((hwndCtl),EM_SETSEL,(ichStart),(ichEnd)))
-#define Edit_SetTabStops(hwndCtl,cTabs,lpTabs) ((void)SendMessage((hwndCtl),EM_SETTABSTOPS,(WPARAM)(int)(cTabs),(LPARAM)(const int*)(lpTabs)))
-#define Edit_SetText(hwndCtl,lpsz) SetWindowText((hwndCtl),(lpsz))
-#define Edit_SetWordBreakProc(hwndCtl,lpfnWordBreak) ((void)SendMessage((hwndCtl),EM_SETWORDBREAKPROC,0,(LPARAM)(EDITWORDBREAKPROC)(lpfnWordBreak)))
-#define Edit_Undo(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl),EM_UNDO,0,0))
-#define FORWARD_WM_ACTIVATE(hwnd,state,hwndActDeact,fMinimized,fn) (void)(fn)((hwnd),WM_ACTIVATE,MAKEWPARAM((state),(fMinimized)),(LPARAM)(HWND)(hwndActDeact))
-#define FORWARD_WM_ACTIVATEAPP(hwnd,fActivate,dwThreadId,fn) (void)(fn)((hwnd),WM_ACTIVATEAPP,(WPARAM)(BOOL)(fActivate),(LPARAM)(dwThreadId))
-#define FORWARD_WM_ASKCBFORMATNAME(hwnd,cchMax,rgchName,fn) (void)(fn)((hwnd),WM_ASKCBFORMATNAME,(WPARAM)(int)(cchMax),(LPARAM)(rgchName))
-#define FORWARD_WM_CANCELMODE(hwnd,fn) (void)(fn)((hwnd),WM_CANCELMODE,0,0)
-#define FORWARD_WM_CHANGECBCHAIN(hwnd,hwndRemove,hwndNext,fn) (void)(fn)((hwnd),WM_CHANGECBCHAIN,(WPARAM)(HWND)(hwndRemove),(LPARAM)(HWND)(hwndNext))
-#define FORWARD_WM_CHAR(hwnd,ch,cRepeat,fn) (void)(fn)((hwnd),WM_CHAR,(WPARAM)(TCHAR)(ch),MAKELPARAM((cRepeat),0))
-#define FORWARD_WM_CHARTOITEM(hwnd,ch,hwndListBox,iCaret,fn) (int)(DWORD)(fn)((hwnd),WM_CHARTOITEM,MAKEWPARAM((UINT)(iCaret),(UINT)(ch)),(LPARAM)(hwndListBox))
-#define FORWARD_WM_CHILDACTIVATE(hwnd,fn) (void)(fn)((hwnd),WM_CHILDACTIVATE,0,0)
-#define FORWARD_WM_CLEAR(hwnd,fn) (void)(fn)((hwnd),WM_CLEAR,0,0)
-#define FORWARD_WM_CLOSE(hwnd,fn) (void)(fn)((hwnd),WM_CLOSE,0,0)
-#define FORWARD_WM_COMMAND(hwnd,id,hwndCtl,codeNotify,fn) (void)(fn)((hwnd),WM_COMMAND,MAKEWPARAM((UINT)(id),(UINT)(codeNotify)),(LPARAM)(HWND)(hwndCtl))
-#define FORWARD_WM_COMMNOTIFY(hwnd,cid,flags,fn) (void)(fn)((hwnd),WM_COMMNOTIFY,(WPARAM)(cid),MAKELPARAM((flags),0))
-#define FORWARD_WM_COMPACTING(hwnd,compactRatio,fn) (void)(fn)((hwnd),WM_COMPACTING,(WPARAM)(UINT)(compactRatio),0)
-#define FORWARD_WM_COMPAREITEM(hwnd,lpCompareItem,fn) (int)(DWORD)(fn)((hwnd),WM_COMPAREITEM,(WPARAM)(((const COMPAREITEMSTRUCT*)(lpCompareItem))->CtlID),(LPARAM)(const COMPAREITEMSTRUCT*)(lpCompareItem))
-#define FORWARD_WM_COPY(hwnd,fn) (void)(fn)((hwnd),WM_COPY,0,0)
-#define FORWARD_WM_CREATE(hwnd,lpCreateStruct,fn) (BOOL)(DWORD)(fn)((hwnd),WM_CREATE,0,(LPARAM)(LPCREATESTRUCT)(lpCreateStruct))
-#define FORWARD_WM_CTLCOLORBTN(hwnd,hdc,hwndChild,fn) (HBRUSH)(UINT)(DWORD)(fn)((hwnd),WM_CTLCOLORBTN,(WPARAM)(HDC)(hdc),(LPARAM)(HWND)(hwndChild))
-#define FORWARD_WM_CTLCOLORDLG(hwnd,hdc,hwndChild,fn) (HBRUSH)(UINT)(DWORD)(fn)((hwnd),WM_CTLCOLORDLG,(WPARAM)(HDC)(hdc),(LPARAM)(HWND)(hwndChild))
-#define FORWARD_WM_CTLCOLOREDIT(hwnd,hdc,hwndChild,fn) (HBRUSH)(UINT)(DWORD)(fn)((hwnd),WM_CTLCOLOREDIT,(WPARAM)(HDC)(hdc),(LPARAM)(HWND)(hwndChild))
-#define FORWARD_WM_CTLCOLORLISTBOX(hwnd,hdc,hwndChild,fn) (HBRUSH)(UINT)(DWORD)(fn)((hwnd),WM_CTLCOLORLISTBOX,(WPARAM)(HDC)(hdc),(LPARAM)(HWND)(hwndChild))
-#define FORWARD_WM_CTLCOLORMSGBOX(hwnd,hdc,hwndChild,fn) (HBRUSH)(UINT)(DWORD)(fn)((hwnd),WM_CTLCOLORMSGBOX,(WPARAM)(HDC)(hdc),(LPARAM)(HWND)(hwndChild))
-#define FORWARD_WM_CTLCOLORSCROLLBAR(hwnd,hdc,hwndChild,fn) (HBRUSH)(UINT)(DWORD)(fn)((hwnd),WM_CTLCOLORSCROLLBAR,(WPARAM)(HDC)(hdc),(LPARAM)(HWND)(hwndChild))
-#define FORWARD_WM_CTLCOLORSTATIC(hwnd,hdc,hwndChild,fn) (HBRUSH)(UINT)(DWORD)(fn)((hwnd),WM_CTLCOLORSTATIC,(WPARAM)(HDC)(hdc),(LPARAM)(HWND)(hwndChild))
-#define FORWARD_WM_CUT(hwnd,fn) (void)(fn)((hwnd),WM_CUT,0,0)
-#define FORWARD_WM_DEADCHAR(hwnd,ch,cRepeat,fn) (void)(fn)((hwnd),WM_DEADCHAR,(WPARAM)(TCHAR)(ch),MAKELPARAM((cRepeat),0))
-#define FORWARD_WM_DELETEITEM(hwnd,lpDeleteItem,fn) (void)(fn)((hwnd),WM_DELETEITEM,(WPARAM)(((const DELETEITEMSTRUCT*)(lpDeleteItem))->CtlID),(LPARAM)(const DELETEITEMSTRUCT*)(lpDeleteItem))
-#define FORWARD_WM_DESTROY(hwnd,fn) (void)(fn)((hwnd),WM_DESTROY,0,0)
-#define FORWARD_WM_DESTROYCLIPBOARD(hwnd,fn) (void)(fn)((hwnd),WM_DESTROYCLIPBOARD,0,0)
-#define FORWARD_WM_DEVMODECHANGE(hwnd,lpszDeviceName,fn) (void)(fn)((hwnd),WM_DEVMODECHANGE,0,(LPARAM)(LPCTSTR)(lpszDeviceName))
-#define FORWARD_WM_DRAWCLIPBOARD(hwnd,fn) (void)(fn)((hwnd),WM_DRAWCLIPBOARD,0,0)
-#define FORWARD_WM_DRAWITEM(hwnd,lpDrawItem,fn) (void)(fn)((hwnd),WM_DRAWITEM,(WPARAM)(((const DRAWITEMSTRUCT*)lpDrawItem)->CtlID),(LPARAM)(const DRAWITEMSTRUCT*)(lpDrawItem))
-#define FORWARD_WM_DROPFILES(hwnd,hdrop,fn) (void)(fn)((hwnd),WM_DROPFILES,(WPARAM)(HDROP)(hdrop),0)
-#define FORWARD_WM_ENABLE(hwnd,fEnable,fn) (void)(fn)((hwnd),WM_ENABLE,(WPARAM)(BOOL)(fEnable),0)
-#define FORWARD_WM_ENDSESSION(hwnd,fEnding,fn) (void)(fn)((hwnd),WM_ENDSESSION,(WPARAM)(BOOL)(fEnding),0)
-#define FORWARD_WM_ENTERIDLE(hwnd,source,hwndSource,fn) (void)(fn)((hwnd),WM_ENTERIDLE,(WPARAM)(UINT)(source),(LPARAM)(HWND)(hwndSource))
-#define FORWARD_WM_ERASEBKGND(hwnd,hdc,fn) (BOOL)(DWORD)(fn)((hwnd),WM_ERASEBKGND,(WPARAM)(HDC)(hdc),0)
-#define FORWARD_WM_FONTCHANGE(hwnd,fn) (void)(fn)((hwnd),WM_FONTCHANGE,0,0)
-#define FORWARD_WM_GETDLGCODE(hwnd,lpmsg,fn) (UINT)(DWORD)(fn)((hwnd),WM_GETDLGCODE,(lpmsg ? lpmsg->wParam : 0),(LPARAM)(LPMSG)(lpmsg))
-#define FORWARD_WM_GETFONT(hwnd,fn) (HFONT)(UINT)(DWORD)(fn)((hwnd),WM_GETFONT,0,0)
-#define FORWARD_WM_GETMINMAXINFO(hwnd,lpMinMaxInfo,fn) (void)(fn)((hwnd),WM_GETMINMAXINFO,0,(LPARAM)(LPMINMAXINFO)(lpMinMaxInfo))
-#define FORWARD_WM_GETTEXT(hwnd,cchTextMax,lpszText,fn) (int)(DWORD)(fn)((hwnd),WM_GETTEXT,(WPARAM)(int)(cchTextMax),(LPARAM)(LPTSTR)(lpszText))
-#define FORWARD_WM_GETTEXTLENGTH(hwnd,fn) (int)(DWORD)(fn)((hwnd),WM_GETTEXTLENGTH,0,0)
-#define FORWARD_WM_HSCROLL(hwnd,hwndCtl,code,pos,fn) (void)(fn)((hwnd),WM_HSCROLL,MAKEWPARAM((UINT)(int)(code),(UINT)(int)(pos)),(LPARAM)(UINT)(hwndCtl))
-#define FORWARD_WM_HSCROLLCLIPBOARD(hwnd,hwndCBViewer,code,pos,fn) (void)(fn)((hwnd),WM_HSCROLLCLIPBOARD,(WPARAM)(HWND)(hwndCBViewer),MAKELPARAM((code),(pos)))
-#define FORWARD_WM_ICONERASEBKGND(hwnd,hdc,fn) (BOOL)(DWORD)(fn)((hwnd),WM_ICONERASEBKGND,(WPARAM)(HDC)(hdc),0)
-#define FORWARD_WM_INITDIALOG(hwnd,hwndFocus,lParam,fn) (BOOL)(DWORD)(fn)((hwnd),WM_INITDIALOG,(WPARAM)(HWND)(hwndFocus),(lParam))
-#define FORWARD_WM_INITMENU(hwnd,hMenu,fn) (void)(fn)((hwnd),WM_INITMENU,(WPARAM)(HMENU)(hMenu),0)
-#define FORWARD_WM_INITMENUPOPUP(hwnd,hMenu,item,fSystemMenu,fn) (void)(fn)((hwnd),WM_INITMENUPOPUP,(WPARAM)(HMENU)(hMenu),MAKELPARAM((item),(fSystemMenu)))
-#define FORWARD_WM_KEYDOWN(hwnd,vk,cRepeat,flags,fn) (void)(fn)((hwnd),WM_KEYDOWN,(WPARAM)(UINT)(vk),MAKELPARAM((cRepeat),(flags)))
-#define FORWARD_WM_KEYUP(hwnd,vk,cRepeat,flags,fn) (void)(fn)((hwnd),WM_KEYUP,(WPARAM)(UINT)(vk),MAKELPARAM((cRepeat),(flags)))
-#define FORWARD_WM_KILLFOCUS(hwnd,hwndNewFocus,fn) (void)(fn)((hwnd),WM_KILLFOCUS,(WPARAM)(HWND)(hwndNewFocus),0)
-#define FORWARD_WM_LBUTTONDOWN(hwnd,fDoubleClick,x,y,keyFlags,fn) (void)(fn)((hwnd),(fDoubleClick) ? WM_LBUTTONDBLCLK : WM_LBUTTONDOWN,(WPARAM)(UINT)(keyFlags),MAKELPARAM((x),(y)))
-#define FORWARD_WM_LBUTTONUP(hwnd,x,y,keyFlags,fn) (void)(fn)((hwnd),WM_LBUTTONUP,(WPARAM)(UINT)(keyFlags),MAKELPARAM((x),(y)))
-#define FORWARD_WM_MBUTTONDOWN(hwnd,fDoubleClick,x,y,keyFlags,fn) (void)(fn)((hwnd),(fDoubleClick) ? WM_MBUTTONDBLCLK : WM_MBUTTONDOWN,(WPARAM)(UINT)(keyFlags),MAKELPARAM((x),(y)))
-#define FORWARD_WM_MBUTTONUP(hwnd,x,y,keyFlags,fn) (void)(fn)((hwnd),WM_MBUTTONUP,(WPARAM)(UINT)(keyFlags),MAKELPARAM((x),(y)))
-#define FORWARD_WM_MDIACTIVATE(hwnd,fActive,hwndActivate,hwndDeactivate,fn) (void)(fn)(hwnd,WM_MDIACTIVATE,(WPARAM)(hwndDeactivate),(LPARAM)(hwndActivate))
-#define FORWARD_WM_MDICASCADE(hwnd,cmd,fn) (BOOL)(DWORD)(fn)((hwnd),WM_MDICASCADE,(WPARAM)(cmd),0)
-#define FORWARD_WM_MDICREATE(hwnd,lpmcs,fn) (HWND)(UINT)(DWORD)(fn)((hwnd),WM_MDICREATE,0,(LPARAM)(LPMDICREATESTRUCT)(lpmcs))
-#define FORWARD_WM_MDIDESTROY(hwnd,hwndDestroy,fn) (void)(fn)((hwnd),WM_MDIDESTROY,(WPARAM)(hwndDestroy),0)
-#define FORWARD_WM_MDIGETACTIVE(hwnd,fn) (HWND)(UINT)(DWORD)(fn)((hwnd),WM_MDIGETACTIVE,0,0)
-#define FORWARD_WM_MDIICONARRANGE(hwnd,fn) (void)(fn)((hwnd),WM_MDIICONARRANGE,0,0)
-#define FORWARD_WM_MDIMAXIMIZE(hwnd,hwndMaximize,fn) (void)(fn)((hwnd),WM_MDIMAXIMIZE,(WPARAM)(hwndMaximize),0)
-#define FORWARD_WM_MDINEXT(hwnd,hwndCur,fPrev,fn) (HWND)(UINT)(DWORD)(fn)((hwnd),WM_MDINEXT,(WPARAM)(hwndCur),(LPARAM)(fPrev))
-#define FORWARD_WM_MDIRESTORE(hwnd,hwndRestore,fn) (void)(fn)((hwnd),WM_MDIRESTORE,(WPARAM)(hwndRestore),0)
-#define FORWARD_WM_MDISETMENU(hwnd,fRefresh,hmenuFrame,hmenuWindow,fn) (HMENU)(UINT)(DWORD)(fn)((hwnd),WM_MDISETMENU,(WPARAM)((fRefresh) ? (hmenuFrame) : 0),(LPARAM)(hmenuWindow))
-#define FORWARD_WM_MDITILE(hwnd,cmd,fn) (BOOL)(DWORD)(fn)((hwnd),WM_MDITILE,(WPARAM)(cmd),0)
-#define FORWARD_WM_MEASUREITEM(hwnd,lpMeasureItem,fn) (void)(fn)((hwnd),WM_MEASUREITEM,(WPARAM)(((MEASUREITEMSTRUCT*)lpMeasureItem)->CtlID),(LPARAM)(MEASUREITEMSTRUCT*)(lpMeasureItem))
-#define FORWARD_WM_MENUCHAR(hwnd,ch,flags,hmenu,fn) (DWORD)(fn)((hwnd),WM_MENUCHAR,MAKEWPARAM(flags,(WORD)(ch)),(LPARAM)(HMENU)(hmenu))
-#define FORWARD_WM_MENUSELECT(hwnd,hmenu,item,hmenuPopup,flags,fn) (void)(fn)((hwnd),WM_MENUSELECT,MAKEWPARAM((item),(flags)),(LPARAM)(HMENU)((hmenu) ? (hmenu) : (hmenuPopup)))
-#define FORWARD_WM_MOUSEACTIVATE(hwnd,hwndTopLevel,codeHitTest,msg,fn) (int)(DWORD)(fn)((hwnd),WM_MOUSEACTIVATE,(WPARAM)(HWND)(hwndTopLevel),MAKELPARAM((codeHitTest),(msg)))
-#define FORWARD_WM_MOUSEMOVE(hwnd,x,y,keyFlags,fn) (void)(fn)((hwnd),WM_MOUSEMOVE,(WPARAM)(UINT)(keyFlags),MAKELPARAM((x),(y)))
-#define FORWARD_WM_MOVE(hwnd,x,y,fn) (void)(fn)((hwnd),WM_MOVE,0,MAKELPARAM((x),(y)))
-#define FORWARD_WM_NCACTIVATE(hwnd,fActive,hwndActDeact,fMinimized,fn) (BOOL)(DWORD)(fn)((hwnd),WM_NCACTIVATE,(WPARAM)(BOOL)(fActive),0)
-#define FORWARD_WM_NCCALCSIZE(hwnd,fCalcValidRects,lpcsp,fn) (UINT)(DWORD)(fn)((hwnd),WM_NCCALCSIZE,0,(LPARAM)(NCCALCSIZE_PARAMS*)(lpcsp))
-#define FORWARD_WM_NCCREATE(hwnd,lpCreateStruct,fn) (BOOL)(DWORD)(fn)((hwnd),WM_NCCREATE,0,(LPARAM)(LPCREATESTRUCT)(lpCreateStruct))
-#define FORWARD_WM_NCDESTROY(hwnd,fn) (void)(fn)((hwnd),WM_NCDESTROY,0,0)
-#define FORWARD_WM_NCHITTEST(hwnd,x,y,fn) (UINT)(DWORD)(fn)((hwnd),WM_NCHITTEST,0,MAKELPARAM((x),(y)))
-#define FORWARD_WM_NCLBUTTONDOWN(hwnd,fDoubleClick,x,y,codeHitTest,fn) (void)(fn)((hwnd),(fDoubleClick) ? WM_NCLBUTTONDBLCLK : WM_NCLBUTTONDOWN,(WPARAM)(UINT)(codeHitTest),MAKELPARAM((x),(y)))
-#define FORWARD_WM_NCLBUTTONUP(hwnd,x,y,codeHitTest,fn) (void)(fn)((hwnd),WM_NCLBUTTONUP,(WPARAM)(UINT)(codeHitTest),MAKELPARAM((x),(y)))
-#define FORWARD_WM_NCMBUTTONDOWN(hwnd,fDoubleClick,x,y,codeHitTest,fn) (void)(fn)((hwnd),(fDoubleClick) ? WM_NCMBUTTONDBLCLK : WM_NCMBUTTONDOWN,(WPARAM)(UINT)(codeHitTest),MAKELPARAM((x),(y)) )
-#define FORWARD_WM_NCMBUTTONUP(hwnd,x,y,codeHitTest,fn) (void)(fn)((hwnd),WM_NCMBUTTONUP,(WPARAM)(UINT)(codeHitTest),MAKELPARAM((x),(y)) )
-#define FORWARD_WM_NCMOUSEMOVE(hwnd,x,y,codeHitTest,fn) (void)(fn)((hwnd),WM_NCMOUSEMOVE,(WPARAM)(UINT)(codeHitTest),MAKELPARAM((x),(y)))
-#define FORWARD_WM_NCPAINT(hwnd,hrgn,fn) (void)(fn)((hwnd),WM_NCPAINT,(WPARAM)(HRGN)(hrgn),0)
-#define FORWARD_WM_NCRBUTTONDOWN(hwnd,fDoubleClick,x,y,codeHitTest,fn) (void)(fn)((hwnd),(fDoubleClick) ? WM_NCRBUTTONDBLCLK : WM_NCRBUTTONDOWN,(WPARAM)(UINT)(codeHitTest),MAKELPARAM((x),(y)) )
-#define FORWARD_WM_NCRBUTTONUP(hwnd,x,y,codeHitTest,fn) (void)(fn)((hwnd),WM_NCRBUTTONUP,(WPARAM)(UINT)(codeHitTest),MAKELPARAM((x),(y)) )
-#define FORWARD_WM_NEXTDLGCTL(hwnd,hwndSetFocus,fNext,fn) (HWND)(UINT)(DWORD)(fn)((hwnd),WM_NEXTDLGCTL,(WPARAM)(HWND)(hwndSetFocus),(LPARAM)(fNext))
-#define FORWARD_WM_PAINT(hwnd,fn) (void)(fn)((hwnd),WM_PAINT,0,0)
-#define FORWARD_WM_PAINTCLIPBOARD(hwnd,hwndCBViewer,lpPaintStruct,fn) (void)(fn)((hwnd),WM_PAINTCLIPBOARD,(WPARAM)(HWND)(hwndCBViewer),(LPARAM)(LPPAINTSTRUCT)(lpPaintStruct))
-#define FORWARD_WM_PALETTECHANGED(hwnd,hwndPaletteChange,fn) (void)(fn)((hwnd),WM_PALETTECHANGED,(WPARAM)(HWND)(hwndPaletteChange),0)
-#define FORWARD_WM_PALETTEISCHANGING(hwnd,hwndPaletteChange,fn) (void)(fn)((hwnd),WM_PALETTEISCHANGING,(WPARAM)(HWND)(hwndPaletteChange),0)
-#define FORWARD_WM_PARENTNOTIFY(hwnd,msg,hwndChild,idChild,fn) (void)(fn)((hwnd),WM_PARENTNOTIFY,MAKEWPARAM(msg,idChild),(LPARAM)(hwndChild))
-#define FORWARD_WM_PASTE(hwnd,fn) (void)(fn)((hwnd),WM_PASTE,0,0)
-#define FORWARD_WM_POWER(hwnd,code,fn) (void)(fn)((hwnd),WM_POWER,(WPARAM)(int)(code),0)
-#define FORWARD_WM_QUERYDRAGICON(hwnd,fn) (HICON)(UINT)(DWORD)(fn)((hwnd),WM_QUERYDRAGICON,0,0)
-#define FORWARD_WM_QUERYENDSESSION(hwnd,fn) (BOOL)(DWORD)(fn)((hwnd),WM_QUERYENDSESSION,0,0)
-#define FORWARD_WM_QUERYNEWPALETTE(hwnd,fn) (BOOL)(DWORD)(fn)((hwnd),WM_QUERYNEWPALETTE,0,0)
-#define FORWARD_WM_QUERYOPEN(hwnd,fn) (BOOL)(DWORD)(fn)((hwnd),WM_QUERYOPEN,0,0)
-#define FORWARD_WM_QUEUESYNC(hwnd,fn) (void)(fn)((hwnd),WM_QUEUESYNC,0,0)
-#define FORWARD_WM_QUIT(hwnd,exitCode,fn) (void)(fn)((hwnd),WM_QUIT,(WPARAM)(exitCode),0)
-#define FORWARD_WM_RBUTTONDOWN(hwnd,fDoubleClick,x,y,keyFlags,fn) (void)(fn)((hwnd),(fDoubleClick) ? WM_RBUTTONDBLCLK : WM_RBUTTONDOWN,(WPARAM)(UINT)(keyFlags),MAKELPARAM((x),(y)))
-#define FORWARD_WM_RBUTTONUP(hwnd,x,y,keyFlags,fn) (void)(fn)((hwnd),WM_RBUTTONUP,(WPARAM)(UINT)(keyFlags),MAKELPARAM((x),(y)))
-#define FORWARD_WM_RENDERALLFORMATS(hwnd,fn) (void)(fn)((hwnd),WM_RENDERALLFORMATS,0,0)
-#define FORWARD_WM_RENDERFORMAT(hwnd,fmt,fn) (HANDLE)(UINT)(DWORD)(fn)((hwnd),WM_RENDERFORMAT,(WPARAM)(UINT)(fmt),0)
-#define FORWARD_WM_SETCURSOR(hwnd,hwndCursor,codeHitTest,msg,fn) (BOOL)(DWORD)(fn)((hwnd),WM_SETCURSOR,(WPARAM)(HWND)(hwndCursor),MAKELPARAM((codeHitTest),(msg)))
-#define FORWARD_WM_SETFOCUS(hwnd,hwndOldFocus,fn) (void)(fn)((hwnd),WM_SETFOCUS,(WPARAM)(HWND)(hwndOldFocus),0)
-#define FORWARD_WM_SETFONT(hwnd,hfont,fRedraw,fn) (void)(fn)((hwnd),WM_SETFONT,(WPARAM)(HFONT)(hfont),(LPARAM)(BOOL)(fRedraw))
-#define FORWARD_WM_SETREDRAW(hwnd,fRedraw,fn) (void)(fn)((hwnd),WM_SETREDRAW,(WPARAM)(BOOL)(fRedraw),0)
-#define FORWARD_WM_SETTEXT(hwnd,lpszText,fn) (void)(fn)((hwnd),WM_SETTEXT,0,(LPARAM)(LPCTSTR)(lpszText))
-#define FORWARD_WM_SHOWWINDOW(hwnd,fShow,status,fn) (void)(fn)((hwnd),WM_SHOWWINDOW,(WPARAM)(BOOL)(fShow),(LPARAM)(UINT)(status))
-#define FORWARD_WM_SIZE(hwnd,state,cx,cy,fn) (void)(fn)((hwnd),WM_SIZE,(WPARAM)(UINT)(state),MAKELPARAM((cx),(cy)))
-#define FORWARD_WM_SIZECLIPBOARD(hwnd,hwndCBViewer,lprc,fn) (void)(fn)((hwnd),WM_SIZECLIPBOARD,(WPARAM)(HWND)(hwndCBViewer),(LPARAM)(LPRECT)(lprc))
-#define FORWARD_WM_SPOOLERSTATUS(hwnd,status,cJobInQueue,fn) (void)(fn)((hwnd),WM_SPOOLERSTATUS,(WPARAM)(status),MAKELPARAM((cJobInQueue),0))
-#define FORWARD_WM_SYSCHAR(hwnd,ch,cRepeat,fn) (void)(fn)((hwnd),WM_SYSCHAR,(WPARAM)(TCHAR)(ch),MAKELPARAM((cRepeat),0))
-#define FORWARD_WM_SYSCOLORCHANGE(hwnd,fn) (void)(fn)((hwnd),WM_SYSCOLORCHANGE,0,0)
-#define FORWARD_WM_SYSCOMMAND(hwnd,cmd,x,y,fn) (void)(fn)((hwnd),WM_SYSCOMMAND,(WPARAM)(UINT)(cmd),MAKELPARAM((x),(y)))
-#define FORWARD_WM_SYSDEADCHAR(hwnd,ch,cRepeat,fn) (void)(fn)((hwnd),WM_SYSDEADCHAR,(WPARAM)(TCHAR)(ch),MAKELPARAM((cRepeat),0))
-#define FORWARD_WM_SYSKEYDOWN(hwnd,vk,cRepeat,flags,fn) (void)(fn)((hwnd),WM_SYSKEYDOWN,(WPARAM)(UINT)(vk),MAKELPARAM((cRepeat),(flags)))
-#define FORWARD_WM_SYSKEYUP(hwnd,vk,cRepeat,flags,fn) (void)(fn)((hwnd),WM_SYSKEYUP,(WPARAM)(UINT)(vk),MAKELPARAM((cRepeat),(flags)))
-#define FORWARD_WM_SYSTEMERROR(hwnd,errCode,fn) 0
-#define FORWARD_WM_TIMECHANGE(hwnd,fn) (void)(fn)((hwnd),WM_TIMECHANGE,0,0)
-#define FORWARD_WM_TIMER(hwnd,id,fn) (void)(fn)((hwnd),WM_TIMER,(WPARAM)(UINT)(id),0)
-#define FORWARD_WM_UNDO(hwnd,fn) (void)(fn)((hwnd),WM_UNDO,0,0)
-#define FORWARD_WM_VKEYTOITEM(hwnd,vk,hwndListBox,iCaret,fn) (int)(DWORD)(fn)((hwnd),WM_VKEYTOITEM,MAKEWPARAM((vk),(iCaret)),(LPARAM)(hwndListBox))
-#define FORWARD_WM_VSCROLL(hwnd,hwndCtl,code,pos,fn) (void)(fn)((hwnd),WM_VSCROLL,MAKEWPARAM((UINT)(int)(code),(UINT)(int)(pos)),(LPARAM)(HWND)(hwndCtl))
-#define FORWARD_WM_VSCROLLCLIPBOARD(hwnd,hwndCBViewer,code,pos,fn) (void)(fn)((hwnd),WM_VSCROLLCLIPBOARD,(WPARAM)(HWND)(hwndCBViewer),MAKELPARAM((code),(pos)))
-#define FORWARD_WM_WINDOWPOSCHANGED(hwnd,lpwpos,fn) (void)(fn)((hwnd),WM_WINDOWPOSCHANGED,0,(LPARAM)(const LPWINDOWPOS)(lpwpos))
-#define FORWARD_WM_WINDOWPOSCHANGING(hwnd,lpwpos,fn) (BOOL)(DWORD)(fn)((hwnd),WM_WINDOWPOSCHANGING,0,(LPARAM)(LPWINDOWPOS)(lpwpos))
-#define FORWARD_WM_WININICHANGE(hwnd,lpszSectionName,fn) (void)(fn)((hwnd),WM_WININICHANGE,0,(LPARAM)(LPCTSTR)(lpszSectionName))
-#define GET_EM_LINESCROLL_MPS(vert,horz) (WPARAM)horz,(LONG)vert
-#define GET_EM_SETSEL_END(wp,lp) (lp)
-#define GET_EM_SETSEL_MPS(iStart,iEnd) (WPARAM)(iStart),(LONG)(iEnd)
-#define GET_EM_SETSEL_START(wp,lp) (INT)(wp)
-#define GET_LPARAM(wp,lp) (lp)
-#define GET_WM_ACTIVATE_FMINIMIZED(wp,lp) (BOOL)HIWORD(wp)
-#define GET_WM_ACTIVATE_HWND(wp,lp) (HWND)(lp)
-#define GET_WM_ACTIVATE_MPS(s,fmin,hwnd) (WPARAM)MAKELONG((s),(fmin)),(LONG)(hwnd)
-#define GET_WM_ACTIVATE_STATE(wp,lp) LOWORD(wp)
-#define GET_WM_CHANGECBCHAIN_HWNDNEXT(wp,lp) (HWND)(lp)
-#define GET_WM_CHARTOITEM_CHAR(wp,lp) (TCHAR)LOWORD(wp)
-#define GET_WM_CHARTOITEM_HWND(wp,lp) (HWND)(lp)
-#define GET_WM_CHARTOITEM_MPS(ch,pos,hwnd) (WPARAM)MAKELONG((pos),(ch)),(LONG)(hwnd)
-#define GET_WM_CHARTOITEM_POS(wp,lp) HIWORD(wp)
-#define GET_WM_COMMAND_CMD(wp,lp) HIWORD(wp)
-#define GET_WM_COMMAND_HWND(wp,lp) (HWND)(lp)
-#define GET_WM_COMMAND_ID(wp,lp) LOWORD(wp)
-#define GET_WM_COMMAND_MPS(id,hwnd,cmd) (WPARAM)MAKELONG(id,cmd),(LONG)(hwnd)
-#define GET_WM_CTLCOLOR_HDC(wp,lp,msg) (HDC)(wp)
-#define GET_WM_CTLCOLOR_HWND(wp,lp,msg) (HWND)(lp)
-#define GET_WM_CTLCOLOR_MPS(hdc,hwnd,type) (WPARAM)(hdc),(LONG)(hwnd)
-#define GET_WM_CTLCOLOR_MSG(type) (WORD)(WM_CTLCOLORMSGBOX+(type))
-#define GET_WM_CTLCOLOR_TYPE(wp,lp,msg) (WORD)(msg - WM_CTLCOLORMSGBOX)
-#define GET_WM_HSCROLL_CODE(wp,lp) LOWORD(wp)
-#define GET_WM_HSCROLL_HWND(wp,lp) (HWND)(lp)
-#define GET_WM_HSCROLL_MPS(code,pos,hwnd) (WPARAM)MAKELONG(code,pos),(LONG)(hwnd)
-#define GET_WM_HSCROLL_POS(wp,lp) HIWORD(wp)
-#define GET_WM_MDIACTIVATE_FACTIVATE(hwnd,wp,lp) (lp == (LONG)hwnd)
-#define GET_WM_MDIACTIVATE_HWNDACTIVATE(wp,lp) (HWND)(lp)
-#define GET_WM_MDIACTIVATE_HWNDDEACT(wp,lp) (HWND)(wp)
-#define GET_WM_MDIACTIVATE_MPS(f,hwndD,hwndA) (WPARAM)(hwndA),0
-#define GET_WM_MDISETMENU_MPS(hmenuF,hmenuW) (WPARAM)hmenuF,(LONG)hmenuW
-#define GET_WM_MENUCHAR_CHAR(wp,lp) (TCHAR)LOWORD(wp)
-#define GET_WM_MENUCHAR_FMENU(wp,lp) (BOOL)HIWORD(wp)
-#define GET_WM_MENUCHAR_HMENU(wp,lp) (HMENU)(lp)
-#define GET_WM_MENUCHAR_MPS(ch,hmenu,f) (WPARAM)MAKELONG(ch,f),(LONG)(hmenu)
-#define GET_WM_MENUSELECT_CMD(wp,lp) LOWORD(wp)
-#define GET_WM_MENUSELECT_FLAGS(wp,lp) (UINT)(int)(short)HIWORD(wp)
-#define GET_WM_MENUSELECT_HMENU(wp,lp) (HMENU)(lp)
-#define GET_WM_MENUSELECT_MPS(cmd,f,hmenu) (WPARAM)MAKELONG(cmd,f),(LONG)(hmenu)
-#define GET_WM_PARENTNOTIFY2_MPS(msg,x,y) (WPARAM)MAKELONG(0,msg),MAKELONG(x,y)
-#define GET_WM_PARENTNOTIFY_HWNDCHILD(wp,lp) (HWND)(lp)
-#define GET_WM_PARENTNOTIFY_ID(wp,lp) HIWORD(wp)
-#define GET_WM_PARENTNOTIFY_MPS(msg,id,hwnd) (WPARAM)MAKELONG(id,msg),(LONG)(hwnd)
-#define GET_WM_PARENTNOTIFY_MSG(wp,lp) LOWORD(wp)
-#define GET_WM_PARENTNOTIFY_X(wp,lp) (int)(short)LOWORD(lp)
-#define GET_WM_PARENTNOTIFY_Y(wp,lp) (int)(short)HIWORD(lp)
-#define GET_WM_VKEYTOITEM_CODE(wp,lp) (int)(short)LOWORD(wp)
-#define GET_WM_VKEYTOITEM_HWND(wp,lp) (HWND)(lp)
-#define GET_WM_VKEYTOITEM_ITEM(wp,lp) HIWORD(wp)
-#define GET_WM_VKEYTOITEM_MPS(code,item,hwnd) (WPARAM)MAKELONG(item,code),(LONG)(hwnd)
-#define GET_WM_VSCROLL_CODE(wp,lp) LOWORD(wp)
-#define GET_WM_VSCROLL_HWND(wp,lp) (HWND)(lp)
-#define GET_WM_VSCROLL_MPS(code,pos,hwnd) (WPARAM)MAKELONG(code,pos),(LONG)(hwnd)
-#define GET_WM_VSCROLL_POS(wp,lp) HIWORD(wp)
-#define GET_WPARAM(wp,lp) (wp)
-#define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp))
-#define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp))
-#define GetFirstChild(hwnd) GetTopWindow(hwnd)
-#define GetFirstSibling(hwnd) GetWindow(hwnd,GW_HWNDFIRST)
-#define GetInstanceModule(hInstance) (HMODULE)(hInstance)
-#define GetLastSibling(hwnd) GetWindow(hwnd,GW_HWNDLAST)
-#define GetNextSibling(hwnd) GetWindow(hwnd,GW_HWNDNEXT)
-#define GetPrevSibling(hwnd) GetWindow(hwnd,GW_HWNDPREV)
-#define GetStockBrush(i) ((HBRUSH)GetStockObject(i))
-#define GetStockFont(i) ((HFONT)GetStockObject(i))
-#define GetStockPen(i) ((HPEN)GetStockObject(i))
-#define GetWindowExStyle(hwnd) ((DWORD)GetWindowLong(hwnd,GWL_EXSTYLE))
-#define GetWindowFont(hwnd) FORWARD_WM_GETFONT((hwnd),SendMessage)
-#define GetWindowID(hwnd) GetDlgCtrlID(hwnd)
-#define GetWindowInstance(hwnd) ((HMODULE)GetWindowLong(hwnd,GWL_HINSTANCE))
-#define GetWindowOwner(hwnd) GetWindow(hwnd,GW_OWNER)
-#define GetWindowStyle(hwnd) ((DWORD)GetWindowLong(hwnd,GWL_STYLE))
-#define GlobalAllocPtr(flags,cb) (GlobalLock(GlobalAlloc((flags),(cb))))
-#define GlobalFreePtr(lp) (GlobalUnlockPtr(lp),(BOOL)GlobalFree(GlobalPtrHandle(lp)))
-#define GlobalLockPtr(lp) ((BOOL)GlobalLock(GlobalPtrHandle(lp)))
-#define GlobalPtrHandle(lp) ((HGLOBAL)GlobalHandle(lp))
-#define GlobalReAllocPtr(lp,cbNew,flags) (GlobalUnlockPtr(lp),GlobalLock(GlobalReAlloc(GlobalPtrHandle(lp) ,(cbNew),(flags))))
-#define GlobalUnlockPtr(lp) GlobalUnlock(GlobalPtrHandle(lp))
-#define HANDLE_MSG(hwnd,message,fn) case (message): return HANDLE_##message((hwnd),(wParam),(lParam),(fn))
-#define HANDLE_WM_ACTIVATE(hwnd,wParam,lParam,fn) ((fn)((hwnd),(UINT)LOWORD(wParam),(HWND)(lParam),(BOOL)HIWORD(wParam)),0)
-#define HANDLE_WM_ACTIVATEAPP(hwnd,wParam,lParam,fn) ((fn)((hwnd),(BOOL)(wParam),(DWORD)(lParam)),0)
-#define HANDLE_WM_ASKCBFORMATNAME(hwnd,wParam,lParam,fn) ((fn)((hwnd),(int)(wParam),(LPTSTR)(lParam)),0)
-#define HANDLE_WM_CANCELMODE(hwnd,wParam,lParam,fn) ((fn)(hwnd),0)
-#define HANDLE_WM_CHANGECBCHAIN(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HWND)(wParam),(HWND)(lParam)),0)
-#define HANDLE_WM_CHAR(hwnd,wParam,lParam,fn) ((fn)((hwnd),(TCHAR)(wParam),(int)(short)LOWORD(lParam)),0)
-#define HANDLE_WM_CHARTOITEM(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(int)(fn)((hwnd),(UINT)LOWORD(wParam),(HWND)(lParam),(int)(short)HIWORD(wParam))
-#define HANDLE_WM_CHILDACTIVATE(hwnd,wParam,lParam,fn) ((fn)(hwnd),0)
-#define HANDLE_WM_CLEAR(hwnd,wParam,lParam,fn) ((fn)(hwnd),0)
-#define HANDLE_WM_CLOSE(hwnd,wParam,lParam,fn) ((fn)(hwnd),0)
-#define HANDLE_WM_COMMAND(hwnd,wParam,lParam,fn) ((fn)((hwnd),(int)(LOWORD(wParam)),(HWND)(lParam),(UINT)HIWORD(wParam)),0)
-#define HANDLE_WM_COMMNOTIFY(hwnd,wParam,lParam,fn) ((fn)((hwnd),(int)(wParam),(UINT)LOWORD(lParam)),0)
-#define HANDLE_WM_COMPACTING(hwnd,wParam,lParam,fn) ((fn)((hwnd),(UINT)(wParam)),0)
-#define HANDLE_WM_COMPAREITEM(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(int)(fn)((hwnd),(const COMPAREITEMSTRUCT*)(lParam))
-#define HANDLE_WM_COPY(hwnd,wParam,lParam,fn) ((fn)(hwnd),0)
-#define HANDLE_WM_CREATE(hwnd,wParam,lParam,fn) ((fn)((hwnd),(LPCREATESTRUCT)(lParam)) ? 0 : (LRESULT)-1L)
-#define HANDLE_WM_CTLCOLORBTN(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(UINT)(HBRUSH)(fn)((hwnd),(HDC)(wParam),(HWND)(lParam),CTLCOLOR_BTN)
-#define HANDLE_WM_CTLCOLORDLG(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(UINT)(HBRUSH)(fn)((hwnd),(HDC)(wParam),(HWND)(lParam),CTLCOLOR_DLG)
-#define HANDLE_WM_CTLCOLOREDIT(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(UINT)(HBRUSH)(fn)((hwnd),(HDC)(wParam),(HWND)(lParam),CTLCOLOR_EDIT)
-#define HANDLE_WM_CTLCOLORLISTBOX(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(UINT)(HBRUSH)(fn)((hwnd),(HDC)(wParam),(HWND)(lParam),CTLCOLOR_LISTBOX)
-#define HANDLE_WM_CTLCOLORMSGBOX(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(UINT)(HBRUSH)(fn)((hwnd),(HDC)(wParam),(HWND)(lParam),CTLCOLOR_MSGBOX)
-#define HANDLE_WM_CTLCOLORSCROLLBAR(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(UINT)(HBRUSH)(fn)((hwnd),(HDC)(wParam),(HWND)(lParam),CTLCOLOR_SCROLLBAR)
-#define HANDLE_WM_CTLCOLORSTATIC(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(UINT)(HBRUSH)(fn)((hwnd),(HDC)(wParam),(HWND)(lParam),CTLCOLOR_STATIC)
-#define HANDLE_WM_CUT(hwnd,wParam,lParam,fn) ((fn)(hwnd),0)
-#define HANDLE_WM_DEADCHAR(hwnd,wParam,lParam,fn) ((fn)((hwnd),(TCHAR)(wParam),(int)(short)LOWORD(lParam)),0)
-#define HANDLE_WM_DELETEITEM(hwnd,wParam,lParam,fn) ((fn)((hwnd),(const DELETEITEMSTRUCT*)(lParam)),0)
-#define HANDLE_WM_DESTROY(hwnd,wParam,lParam,fn) ((fn)(hwnd),0)
-#define HANDLE_WM_DESTROYCLIPBOARD(hwnd,wParam,lParam,fn) ((fn)(hwnd),0)
-#define HANDLE_WM_DEVMODECHANGE(hwnd,wParam,lParam,fn) ((fn)((hwnd),(LPCTSTR)(lParam)),0)
-#define HANDLE_WM_DRAWCLIPBOARD(hwnd,wParam,lParam,fn) ((fn)(hwnd),0)
-#define HANDLE_WM_DRAWITEM(hwnd,wParam,lParam,fn) ((fn)((hwnd),(const DRAWITEMSTRUCT*)(lParam)),0)
-#define HANDLE_WM_DROPFILES(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HDROP)(wParam)),0)
-#define HANDLE_WM_ENABLE(hwnd,wParam,lParam,fn) ((fn)((hwnd),(BOOL)(wParam)),0)
-#define HANDLE_WM_ENDSESSION(hwnd,wParam,lParam,fn) ((fn)((hwnd),(BOOL)(wParam)),0)
-#define HANDLE_WM_ENTERIDLE(hwnd,wParam,lParam,fn) ((fn)((hwnd),(UINT)(wParam),(HWND)(lParam)),0)
-#define HANDLE_WM_ERASEBKGND(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(BOOL)(fn)((hwnd),(HDC)(wParam))
-#define HANDLE_WM_FONTCHANGE(hwnd,wParam,lParam,fn) ((fn)(hwnd),0)
-#define HANDLE_WM_GETDLGCODE(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(UINT)(fn)(hwnd,(LPMSG)(lParam))
-#define HANDLE_WM_GETFONT(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(UINT)(HFONT)(fn)(hwnd)
-#define HANDLE_WM_GETMINMAXINFO(hwnd,wParam,lParam,fn) ((fn)((hwnd),(LPMINMAXINFO)(lParam)),0)
-#define HANDLE_WM_GETTEXT(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(int)(fn)((hwnd),(int)(wParam),(LPTSTR)(lParam))
-#define HANDLE_WM_GETTEXTLENGTH(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(int)(fn)(hwnd)
-#define HANDLE_WM_HSCROLL(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HWND)(lParam),(UINT)(LOWORD(wParam)),(int)(short)HIWORD(wParam)),0)
-#define HANDLE_WM_HSCROLLCLIPBOARD(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HWND)(wParam),(UINT)LOWORD(lParam),(int)(short)HIWORD(lParam)),0)
-#define HANDLE_WM_ICONERASEBKGND(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(BOOL)(fn)((hwnd),(HDC)(wParam))
-#define HANDLE_WM_INITDIALOG(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(UINT)(BOOL)(fn)((hwnd),(HWND)(wParam),lParam)
-#define HANDLE_WM_INITMENU(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HMENU)(wParam)),0)
-#define HANDLE_WM_INITMENUPOPUP(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HMENU)(wParam),(UINT)LOWORD(lParam),(BOOL)HIWORD(lParam)),0)
-#define HANDLE_WM_KEYDOWN(hwnd,wParam,lParam,fn) ((fn)((hwnd),(UINT)(wParam),TRUE,(int)(short)LOWORD(lParam),(UINT)HIWORD(lParam)),0)
-#define HANDLE_WM_KEYUP(hwnd,wParam,lParam,fn) ((fn)((hwnd),(UINT)(wParam),FALSE,(int)(short)LOWORD(lParam),(UINT)HIWORD(lParam)),0)
-#define HANDLE_WM_KILLFOCUS(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HWND)(wParam)),0)
-#define HANDLE_WM_LBUTTONDBLCLK(hwnd,wParam,lParam,fn) ((fn)((hwnd),TRUE,(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam),(UINT)(wParam)),0)
-#define HANDLE_WM_LBUTTONDOWN(hwnd,wParam,lParam,fn) ((fn)((hwnd),FALSE,(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam),(UINT)(wParam)),0)
-#define HANDLE_WM_LBUTTONUP(hwnd,wParam,lParam,fn) ((fn)((hwnd),(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam),(UINT)(wParam)),0)
-#define HANDLE_WM_MBUTTONDBLCLK(hwnd,wParam,lParam,fn) ((fn)((hwnd),TRUE,(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam),(UINT)(wParam)),0)
-#define HANDLE_WM_MBUTTONDOWN(hwnd,wParam,lParam,fn) ((fn)((hwnd),FALSE,(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam),(UINT)(wParam)),0)
-#define HANDLE_WM_MBUTTONUP(hwnd,wParam,lParam,fn) ((fn)((hwnd),(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam),(UINT)(wParam)),0)
-#define HANDLE_WM_MDIACTIVATE(hwnd,wParam,lParam,fn) ((fn)((hwnd),(BOOL)(lParam == (LPARAM)hwnd),(HWND)(lParam),(HWND)(wParam)),0)
-#define HANDLE_WM_MDICASCADE(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(fn)((hwnd),(UINT)(wParam))
-#define HANDLE_WM_MDICREATE(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(UINT)(fn)((hwnd),(LPMDICREATESTRUCT)(lParam))
-#define HANDLE_WM_MDIDESTROY(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HWND)(wParam)),0)
-#define HANDLE_WM_MDIGETACTIVE(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(UINT)(fn)(hwnd)
-#define HANDLE_WM_MDIICONARRANGE(hwnd,wParam,lParam,fn) ((fn)(hwnd),0)
-#define HANDLE_WM_MDIMAXIMIZE(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HWND)(wParam)),0)
-#define HANDLE_WM_MDINEXT(hwnd,wParam,lParam,fn) (LRESULT)(HWND)(fn)((hwnd),(HWND)(wParam),(BOOL)lParam)
-#define HANDLE_WM_MDIRESTORE(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HWND)(wParam)),0)
-#define HANDLE_WM_MDISETMENU(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(UINT)(fn)((hwnd),(BOOL)(wParam),(HMENU)(wParam),(HMENU)(lParam))
-#define HANDLE_WM_MDITILE(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(fn)((hwnd),(UINT)(wParam))
-#define HANDLE_WM_MEASUREITEM(hwnd,wParam,lParam,fn) ((fn)((hwnd),(MEASUREITEMSTRUCT*)(lParam)),0)
-#define HANDLE_WM_MENUCHAR(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(fn)((hwnd),(UINT)(LOWORD(wParam)),(UINT)HIWORD(wParam),(HMENU)(lParam))
-#define HANDLE_WM_MENUSELECT(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HMENU)(lParam),(int)(LOWORD(wParam)),(HIWORD(wParam) & MF_POPUP) ? GetSubMenu((HMENU)lParam,LOWORD(wParam)) : 0,(UINT)(((short)HIWORD(wParam) == -1) ? 0xFFFFFFFF : HIWORD(wParam))),0)
-#define HANDLE_WM_MOUSEACTIVATE(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(int)(fn)((hwnd),(HWND)(wParam),(UINT)LOWORD(lParam),(UINT)HIWORD(lParam))
-#define HANDLE_WM_MOUSEMOVE(hwnd,wParam,lParam,fn) ((fn)((hwnd),(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam),(UINT)(wParam)),0)
-#define HANDLE_WM_MOVE(hwnd,wParam,lParam,fn) ((fn)((hwnd),(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam)),0)
-#define HANDLE_WM_NCACTIVATE(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(BOOL)(fn)((hwnd),(BOOL)(wParam),0,0)
-#define HANDLE_WM_NCCALCSIZE(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(UINT)(fn)((hwnd),(BOOL)(0),(NCCALCSIZE_PARAMS*)(lParam))
-#define HANDLE_WM_NCCREATE(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(BOOL)(fn)((hwnd),(LPCREATESTRUCT)(lParam))
-#define HANDLE_WM_NCDESTROY(hwnd,wParam,lParam,fn) ((fn)(hwnd),0)
-#define HANDLE_WM_NCHITTEST(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(UINT)(fn)((hwnd),(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam))
-#define HANDLE_WM_NCLBUTTONDBLCLK(hwnd,wParam,lParam,fn) ((fn)((hwnd),TRUE,(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam),(UINT)(wParam)),0)
-#define HANDLE_WM_NCLBUTTONDOWN(hwnd,wParam,lParam,fn) ((fn)((hwnd),FALSE,(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam),(UINT)(wParam)),0)
-#define HANDLE_WM_NCLBUTTONUP(hwnd,wParam,lParam,fn) ((fn)((hwnd),(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam),(UINT)(wParam)),0)
-#define HANDLE_WM_NCMBUTTONDBLCLK(hwnd,wParam,lParam,fn) ((fn)((hwnd),TRUE,(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam),(UINT)(wParam)),0)
-#define HANDLE_WM_NCMBUTTONDOWN(hwnd,wParam,lParam,fn) ((fn)((hwnd),FALSE,(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam),(UINT)(wParam)),0)
-#define HANDLE_WM_NCMBUTTONUP(hwnd,wParam,lParam,fn) ((fn)((hwnd),(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam),(UINT)(wParam)),0)
-#define HANDLE_WM_NCMOUSEMOVE(hwnd,wParam,lParam,fn) ((fn)((hwnd),(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam),(UINT)(wParam)),0)
-#define HANDLE_WM_NCPAINT(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HRGN)(wParam)),0)
-#define HANDLE_WM_NCRBUTTONDBLCLK(hwnd,wParam,lParam,fn) ((fn)((hwnd),TRUE,(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam),(UINT)(wParam)),0)
-#define HANDLE_WM_NCRBUTTONDOWN(hwnd,wParam,lParam,fn) ((fn)((hwnd),FALSE,(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam),(UINT)(wParam)),0)
-#define HANDLE_WM_NCRBUTTONUP(hwnd,wParam,lParam,fn) ((fn)((hwnd),(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam),(UINT)(wParam)),0)
-#define HANDLE_WM_NEXTDLGCTL(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(UINT)(HWND)(fn)((hwnd),(HWND)(wParam),(BOOL)(lParam))
-#define HANDLE_WM_PAINT(hwnd,wParam,lParam,fn) ((fn)(hwnd),0)
-#define HANDLE_WM_PAINTCLIPBOARD(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HWND)(wParam),(const LPPAINTSTRUCT)GlobalLock((HGLOBAL)(lParam))),GlobalUnlock((HGLOBAL)(lParam)),0)
-#define HANDLE_WM_PALETTECHANGED(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HWND)(wParam)),0)
-#define HANDLE_WM_PALETTEISCHANGING(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HWND)(wParam)),0)
-#define HANDLE_WM_PARENTNOTIFY(hwnd,wParam,lParam,fn) ((fn)((hwnd),(UINT)LOWORD(wParam),(HWND)(lParam),(UINT)HIWORD(wParam)),0)
-#define HANDLE_WM_PASTE(hwnd,wParam,lParam,fn) ((fn)(hwnd),0)
-#define HANDLE_WM_POWER(hwnd,wParam,lParam,fn) ((fn)((hwnd),(int)(wParam)),0)
-#define HANDLE_WM_QUERYDRAGICON(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(UINT)(fn)(hwnd)
-#define HANDLE_WM_QUERYENDSESSION(hwnd,wParam,lParam,fn) MAKELRESULT((BOOL)(fn)(hwnd),0)
-#define HANDLE_WM_QUERYNEWPALETTE(hwnd,wParam,lParam,fn) MAKELRESULT((BOOL)(fn)(hwnd),0)
-#define HANDLE_WM_QUERYOPEN(hwnd,wParam,lParam,fn) MAKELRESULT((BOOL)(fn)(hwnd),0)
-#define HANDLE_WM_QUEUESYNC(hwnd,wParam,lParam,fn) ((fn)(hwnd),0)
-#define HANDLE_WM_QUIT(hwnd,wParam,lParam,fn) ((fn)((hwnd),(int)(wParam)),0)
-#define HANDLE_WM_RBUTTONDBLCLK(hwnd,wParam,lParam,fn) ((fn)((hwnd),TRUE,(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam),(UINT)(wParam)),0)
-#define HANDLE_WM_RBUTTONDOWN(hwnd,wParam,lParam,fn) ((fn)((hwnd),FALSE,(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam),(UINT)(wParam)),0)
-#define HANDLE_WM_RBUTTONUP(hwnd,wParam,lParam,fn) ((fn)((hwnd),(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam),(UINT)(wParam)),0)
-#define HANDLE_WM_RENDERALLFORMATS(hwnd,wParam,lParam,fn) ((fn)(hwnd),0)
-#define HANDLE_WM_RENDERFORMAT(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(UINT)(HANDLE)(fn)((hwnd),(UINT)(wParam))
-#define HANDLE_WM_SETCURSOR(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(BOOL)(fn)((hwnd),(HWND)(wParam),(UINT)LOWORD(lParam),(UINT)HIWORD(lParam))
-#define HANDLE_WM_SETFOCUS(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HWND)(wParam)),0)
-#define HANDLE_WM_SETFONT(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HFONT)(wParam),(BOOL)(lParam)),0)
-#define HANDLE_WM_SETREDRAW(hwnd,wParam,lParam,fn) ((fn)((hwnd),(BOOL)(wParam)),0)
-#define HANDLE_WM_SETTEXT(hwnd,wParam,lParam,fn) ((fn)((hwnd),(LPCTSTR)(lParam)),0)
-#define HANDLE_WM_SHOWWINDOW(hwnd,wParam,lParam,fn) ((fn)((hwnd),(BOOL)(wParam),(UINT)(lParam)),0)
-#define HANDLE_WM_SIZE(hwnd,wParam,lParam,fn) ((fn)((hwnd),(UINT)(wParam),(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam)),0)
-#define HANDLE_WM_SIZECLIPBOARD(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HWND)(wParam),(const LPRECT)GlobalLock((HGLOBAL)(lParam))),GlobalUnlock((HGLOBAL)(lParam)),0)
-#define HANDLE_WM_SPOOLERSTATUS(hwnd,wParam,lParam,fn) ((fn)((hwnd),(UINT)(wParam),(int)(short)LOWORD(lParam)),0)
-#define HANDLE_WM_SYSCHAR(hwnd,wParam,lParam,fn) ((fn)((hwnd),(TCHAR)(wParam),(int)(short)LOWORD(lParam)),0)
-#define HANDLE_WM_SYSCOLORCHANGE(hwnd,wParam,lParam,fn) ((fn)(hwnd),0)
-#define HANDLE_WM_SYSCOMMAND(hwnd,wParam,lParam,fn) ((fn)((hwnd),(UINT)(wParam),(int)(short)LOWORD(lParam),(int)(short)HIWORD(lParam)),0)
-#define HANDLE_WM_SYSDEADCHAR(hwnd,wParam,lParam,fn) ((fn)((hwnd),(TCHAR)(wParam),(int)(short)LOWORD(lParam)),0)
-#define HANDLE_WM_SYSKEYDOWN(hwnd,wParam,lParam,fn) ((fn)((hwnd),(UINT)(wParam),TRUE,(int)(short)LOWORD(lParam),(UINT)HIWORD(lParam)),0)
-#define HANDLE_WM_SYSKEYUP(hwnd,wParam,lParam,fn) ((fn)((hwnd),(UINT)(wParam),FALSE,(int)(short)LOWORD(lParam),(UINT)HIWORD(lParam)),0)
-#define HANDLE_WM_SYSTEMERROR(hwnd,wParam,lParam,fn) 0
-#define HANDLE_WM_TIMECHANGE(hwnd,wParam,lParam,fn) ((fn)(hwnd),0)
-#define HANDLE_WM_TIMER(hwnd,wParam,lParam,fn) ((fn)((hwnd),(UINT)(wParam)),0)
-#define HANDLE_WM_UNDO(hwnd,wParam,lParam,fn) ((fn)(hwnd),0)
-#define HANDLE_WM_VKEYTOITEM(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(int)(fn)((hwnd),(UINT)LOWORD(wParam),(HWND)(lParam),(int)(short)HIWORD(wParam))
-#define HANDLE_WM_VSCROLL(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HWND)(lParam),(UINT)(LOWORD(wParam)),(int)(short)HIWORD(wParam)),0)
-#define HANDLE_WM_VSCROLLCLIPBOARD(hwnd,wParam,lParam,fn) ((fn)((hwnd),(HWND)(wParam),(UINT)LOWORD(lParam),(int)(short)HIWORD(lParam)),0)
-#define HANDLE_WM_WINDOWPOSCHANGED(hwnd,wParam,lParam,fn) ((fn)((hwnd),(const LPWINDOWPOS)(lParam)),0)
-#define HANDLE_WM_WINDOWPOSCHANGING(hwnd,wParam,lParam,fn) (LRESULT)(DWORD)(BOOL)(fn)((hwnd),(LPWINDOWPOS)(lParam))
-#define HANDLE_WM_WININICHANGE(hwnd,wParam,lParam,fn) ((fn)((hwnd),(LPCTSTR)(lParam)),0)
-#define InsetRect(lprc,dx,dy) InflateRect((lprc),-(dx),-(dy))
-#define IntersectRgn(hrgnResult,hrgnA,hrgnB) CombineRgn(hrgnResult,hrgnA,hrgnB,RGN_AND)
-#define IsLButtonDown() (GetKeyState(VK_LBUTTON) < 0)
-#define IsMButtonDown() (GetKeyState(VK_MBUTTON) < 0)
-#define IsMaximized(hwnd) IsZoomed(hwnd)
-#define IsMinimized(hwnd) IsIconic(hwnd)
-#define IsRButtonDown() (GetKeyState(VK_RBUTTON) < 0)
-#define IsRestored(hwnd) ((GetWindowStyle(hwnd) & (WS_MINIMIZE | WS_MAXIMIZE)) == 0)
-#define ListBox_AddItemData(hwndCtl,data) ((int)(DWORD)SendMessage((hwndCtl),LB_ADDSTRING,0,(LPARAM)(data)))
-#define ListBox_AddString(hwndCtl,lpsz) ((int)(DWORD)SendMessage((hwndCtl),LB_ADDSTRING,0,(LPARAM)(LPCTSTR)(lpsz)))
-#define ListBox_DeleteString(hwndCtl,index) ((int)(DWORD)SendMessage((hwndCtl),LB_DELETESTRING,(WPARAM)(int)(index),0))
-#define ListBox_Dir(hwndCtl,attrs,lpszFileSpec) ((int)(DWORD)SendMessage((hwndCtl),LB_DIR,(WPARAM)(UINT)(attrs),(LPARAM)(LPCTSTR)(lpszFileSpec)))
-#define ListBox_Enable(hwndCtl,fEnable) EnableWindow((hwndCtl),(fEnable))
-#define ListBox_FindItemData(hwndCtl,indexStart,data) ((int)(DWORD)SendMessage((hwndCtl),LB_FINDSTRING,(WPARAM)(int)(indexStart),(LPARAM)(data)))
-#define ListBox_FindString(hwndCtl,indexStart,lpszFind) ((int)(DWORD)SendMessage((hwndCtl),LB_FINDSTRING,(WPARAM)(int)(indexStart),(LPARAM)(LPCTSTR)(lpszFind)))
-#define ListBox_FindStringExact(hwndCtl,indexStart,lpszFind) ((int)(DWORD)SendMessage((hwndCtl),LB_FINDSTRINGEXACT,(WPARAM)(int)(indexStart),(LPARAM)(LPCTSTR)(lpszFind)))
-#define ListBox_GetCaretIndex(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl),LB_GETCARETINDEX,0,0))
-#define ListBox_GetCount(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl),LB_GETCOUNT,0,0))
-#define ListBox_GetCurSel(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl),LB_GETCURSEL,0,0))
-#define ListBox_GetHorizontalExtent(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl),LB_GETHORIZONTALEXTENT,0,0))
-#define ListBox_GetItemData(hwndCtl,index) ((LRESULT)(DWORD)SendMessage((hwndCtl),LB_GETITEMDATA,(WPARAM)(int)(index),0))
-#define ListBox_GetItemHeight(hwndCtl,index) ((int)(DWORD)SendMessage((hwndCtl),LB_GETITEMHEIGHT,(WPARAM)(int)(index),0))
-#define ListBox_GetItemRect(hwndCtl,index,lprc) ((int)(DWORD)SendMessage((hwndCtl),LB_GETITEMRECT,(WPARAM)(int)(index),(LPARAM)(RECT*)(lprc)))
-#define ListBox_GetSel(hwndCtl,index) ((int)(DWORD)SendMessage((hwndCtl),LB_GETSEL,(WPARAM)(int)(index),0))
-#define ListBox_GetSelCount(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl),LB_GETSELCOUNT,0,0))
-#define ListBox_GetSelItems(hwndCtl,cItems,lpItems) ((int)(DWORD)SendMessage((hwndCtl),LB_GETSELITEMS,(WPARAM)(int)(cItems),(LPARAM)(int*)(lpItems)))
-#define ListBox_GetText(hwndCtl,index,lpszBuffer) ((int)(DWORD)SendMessage((hwndCtl),LB_GETTEXT,(WPARAM)(int)(index),(LPARAM)(LPCTSTR)(lpszBuffer)))
-#define ListBox_GetTextLen(hwndCtl,index) ((int)(DWORD)SendMessage((hwndCtl),LB_GETTEXTLEN,(WPARAM)(int)(index),0))
-#define ListBox_GetTopIndex(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl),LB_GETTOPINDEX,0,0))
-#define ListBox_InsertItemData(hwndCtl,index,data) ((int)(DWORD)SendMessage((hwndCtl),LB_INSERTSTRING,(WPARAM)(int)(index),(LPARAM)(data)))
-#define ListBox_InsertString(hwndCtl,index,lpsz) ((int)(DWORD)SendMessage((hwndCtl),LB_INSERTSTRING,(WPARAM)(int)(index),(LPARAM)(LPCTSTR)(lpsz)))
-#define ListBox_ResetContent(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl),LB_RESETCONTENT,0,0))
-#define ListBox_SelItemRange(hwndCtl,fSelect,first,last) ((int)(DWORD)SendMessage((hwndCtl),LB_SELITEMRANGE,(WPARAM)(BOOL)(fSelect),MAKELPARAM((first),(last))))
-#define ListBox_SelectItemData(hwndCtl,indexStart,data) ((int)(DWORD)SendMessage((hwndCtl),LB_SELECTSTRING,(WPARAM)(int)(indexStart),(LPARAM)(data)))
-#define ListBox_SelectString(hwndCtl,indexStart,lpszFind) ((int)(DWORD)SendMessage((hwndCtl),LB_SELECTSTRING,(WPARAM)(int)(indexStart),(LPARAM)(LPCTSTR)(lpszFind)))
-#define ListBox_SetCaretIndex(hwndCtl,index) ((int)(DWORD)SendMessage((hwndCtl),LB_SETCARETINDEX,(WPARAM)(int)(index),0))
-#define ListBox_SetColumnWidth(hwndCtl,cxColumn) ((void)SendMessage((hwndCtl),LB_SETCOLUMNWIDTH,(WPARAM)(int)(cxColumn),0))
-#define ListBox_SetCurSel(hwndCtl,index) ((int)(DWORD)SendMessage((hwndCtl),LB_SETCURSEL,(WPARAM)(int)(index),0))
-#define ListBox_SetHorizontalExtent(hwndCtl,cxExtent) ((void)SendMessage((hwndCtl),LB_SETHORIZONTALEXTENT,(WPARAM)(int)(cxExtent),0))
-#define ListBox_SetItemData(hwndCtl,index,data) ((int)(DWORD)SendMessage((hwndCtl),LB_SETITEMDATA,(WPARAM)(int)(index),(LPARAM)(data)))
-#define ListBox_SetItemHeight(hwndCtl,index,cy) ((int)(DWORD)SendMessage((hwndCtl),LB_SETITEMHEIGHT,(WPARAM)(int)(index),MAKELPARAM((cy),0)))
-#define ListBox_SetSel(hwndCtl,fSelect,index) ((int)(DWORD)SendMessage((hwndCtl),LB_SETSEL,(WPARAM)(BOOL)(fSelect),(LPARAM)(index)))
-#define ListBox_SetTabStops(hwndCtl,cTabs,lpTabs) ((BOOL)(DWORD)SendMessage((hwndCtl),LB_SETTABSTOPS,(WPARAM)(int)(cTabs),(LPARAM)(int*)(lpTabs)))
-#define ListBox_SetTopIndex(hwndCtl,indexTop) ((int)(DWORD)SendMessage((hwndCtl),LB_SETTOPINDEX,(WPARAM)(int)(indexTop),0))
-#define MapWindowRect(hwndFrom,hwndTo,lprc) MapWindowPoints((hwndFrom),(hwndTo),(POINT*)(lprc),2)
-#define ScrollBar_Enable(hwndCtl,flags) EnableScrollBar((hwndCtl),SB_CTL,(flags))
-#define ScrollBar_GetPos(hwndCtl) GetScrollPos((hwndCtl),SB_CTL)
-#define ScrollBar_GetRange(hwndCtl,lpposMin,lpposMax) GetScrollRange((hwndCtl),SB_CTL,(lpposMin),(lpposMax))
-#define ScrollBar_SetPos(hwndCtl,pos,fRedraw) SetScrollPos((hwndCtl),SB_CTL,(pos),(fRedraw))
-#define ScrollBar_SetRange(hwndCtl,posMin,posMax,fRedraw) SetScrollRange((hwndCtl),SB_CTL,(posMin),(posMax),(fRedraw))
-#define ScrollBar_Show(hwndCtl,fShow) ShowWindow((hwndCtl),(fShow) ? SW_SHOWNORMAL : SW_HIDE)
-#define SelectBitmap(hdc,hbm) ((HBITMAP)SelectObject((hdc),(HGDIOBJ)(HBITMAP)(hbm)))
-#define SelectBrush(hdc,hbr) ((HBRUSH)SelectObject((hdc),(HGDIOBJ)(HBRUSH)(hbr)))
-#define SelectFont(hdc,hfont) ((HFONT)SelectObject((hdc),(HGDIOBJ)(HFONT)(hfont)))
-#define SelectPen(hdc,hpen) ((HPEN)SelectObject((hdc),(HGDIOBJ)(HPEN)(hpen)))
-#define SetDlgMsgResult(hwnd,msg,result) (( (msg) == WM_CTLCOLORMSGBOX || (msg) == WM_CTLCOLOREDIT || (msg) == WM_CTLCOLORLISTBOX || (msg) == WM_CTLCOLORBTN || (msg) == WM_CTLCOLORDLG || (msg) == WM_CTLCOLORSCROLLBAR || (msg) == WM_CTLCOLORSTATIC || (msg) == WM_COMPAREITEM || (msg) == WM_VKEYTOITEM || (msg) == WM_CHARTOITEM || (msg) == WM_QUERYDRAGICON || (msg) == WM_INITDIALOG ) ? (BOOL)(result) : (SetWindowLong((hwnd),DWL_MSGRESULT,(LPARAM)(LRESULT)(result)),TRUE))
-#define SetWindowFont(hwnd,hfont,fRedraw) FORWARD_WM_SETFONT((hwnd),(hfont),(fRedraw),SendMessage)
-#define SetWindowRedraw(hwnd,fRedraw) ((void)SendMessage(hwnd,WM_SETREDRAW,(WPARAM)(BOOL)(fRedraw),0))
-#define Static_Enable(hwndCtl,fEnable) EnableWindow((hwndCtl),(fEnable))
-#define Static_GetIcon(hwndCtl,hIcon) ((HICON)(UINT)(DWORD)SendMessage((hwndCtl),STM_GETICON,0,0))
-#define Static_GetText(hwndCtl,lpch,cchMax) GetWindowText((hwndCtl),(lpch),(cchMax))
-#define Static_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl)
-#define Static_SetIcon(hwndCtl,hIcon) ((HICON)(UINT)(DWORD)SendMessage((hwndCtl),STM_SETICON,(WPARAM)(HICON)(hIcon),0))
-#define Static_SetText(hwndCtl,lpsz) SetWindowText((hwndCtl),(lpsz))
-#define SubclassDialog(hwndDlg,lpfn) ((DLGPROC)SetWindowLong(hwndDlg,DWL_DLGPROC,(LPARAM)(DLGPROC)(lpfn)))
-#define SubclassWindow(hwnd,lpfn) ((WNDPROC)SetWindowLong((hwnd),GWL_WNDPROC,(LPARAM)(WNDPROC)(lpfn)))
-#define SubtractRgn(hrgnResult,hrgnA,hrgnB) CombineRgn(hrgnResult,hrgnA,hrgnB,RGN_DIFF)
-#define UnionRgn(hrgnResult,hrgnA,hrgnB) CombineRgn(hrgnResult,hrgnA,hrgnB,RGN_OR)
-#define XorRgn(hrgnResult,hrgnA,hrgnB) CombineRgn(hrgnResult,hrgnA,hrgnB,RGN_XOR)
-
-/* FAR versions of mem and string functions for porting from old code*/
-#define _ffree free
-#define _fmalloc malloc
-#define _frealloc realloc
-#define _fmsize _msize
-
-#define _fmemcpy memcpy
-#define _fmemmove memmove
-#define _fmemset memset
-#define _fmemcmp memcmp
-#define _fmemchr memchr
-#define _fmemccpy _memccpy
-#define _fmemicmp _memicmp
-
-#define _fstrcat strcat
-#define _fstrchr strchr
-#define _fstrcmp strcmp
-#define _fstrcpy strcpy
-#define _fstrcspn strcspn
-#define _fstrdup _strdup
-#define _fstricmp _stricmp
-#define _fstrlen strlen
-#define _fstrlwr _strlwr
-#define _fstrncat strncat
-#define _fstrncmp strncmp
-#define _fstrncpy strncpy
-#define _fstrnicmp _strnicmp
-#define _fstrnset _strnset
-#define _fstrpbrk strpbrk
-#define _fstrrchr strrchr
-#define _fstrrev _strrev
-#define _fstrset _strset
-#define _fstrspn strspn
-#define _fstrstr strstr
-#define _fstrtok strtok
-#define _fstrupr _strupr
-
-#define hmemcpy MoveMemory
-
-#endif
diff --git a/winsup/w32api/include/winerror.h b/winsup/w32api/include/winerror.h
deleted file mode 100644
index 612e975..0000000
--- a/winsup/w32api/include/winerror.h
+++ /dev/null
@@ -1,2283 +0,0 @@
-#ifndef _WINERROR_H
-#define _WINERROR_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#define _HRESULT_TYPEDEF_(_sc) ((HRESULT)_sc)
-
-#define ERROR_SUCCESS 0L
-#define NO_ERROR 0L
-#define ERROR_INVALID_FUNCTION 1L
-#define ERROR_FILE_NOT_FOUND 2L
-#define ERROR_PATH_NOT_FOUND 3L
-#define ERROR_TOO_MANY_OPEN_FILES 4L
-#define ERROR_ACCESS_DENIED 5L
-#define ERROR_INVALID_HANDLE 6L
-#define ERROR_ARENA_TRASHED 7L
-#define ERROR_NOT_ENOUGH_MEMORY 8L
-#define ERROR_INVALID_BLOCK 9L
-#define ERROR_BAD_ENVIRONMENT 10L
-#define ERROR_BAD_FORMAT 11L
-#define ERROR_INVALID_ACCESS 12L
-#define ERROR_INVALID_DATA 13L
-#define ERROR_OUTOFMEMORY 14L
-#define ERROR_INVALID_DRIVE 15L
-#define ERROR_CURRENT_DIRECTORY 16L
-#define ERROR_NOT_SAME_DEVICE 17L
-#define ERROR_NO_MORE_FILES 18L
-#define ERROR_WRITE_PROTECT 19L
-#define ERROR_BAD_UNIT 20L
-#define ERROR_NOT_READY 21L
-#define ERROR_BAD_COMMAND 22L
-#define ERROR_CRC 23L
-#define ERROR_BAD_LENGTH 24L
-#define ERROR_SEEK 25L
-#define ERROR_NOT_DOS_DISK 26L
-#define ERROR_SECTOR_NOT_FOUND 27L
-#define ERROR_OUT_OF_PAPER 28L
-#define ERROR_WRITE_FAULT 29L
-#define ERROR_READ_FAULT 30L
-#define ERROR_GEN_FAILURE 31L
-#define ERROR_SHARING_VIOLATION 32L
-#define ERROR_LOCK_VIOLATION 33L
-#define ERROR_WRONG_DISK 34L
-#define ERROR_SHARING_BUFFER_EXCEEDED 36L
-#define ERROR_HANDLE_EOF 38L
-#define ERROR_HANDLE_DISK_FULL 39L
-#define ERROR_NOT_SUPPORTED 50L
-#define ERROR_REM_NOT_LIST 51L
-#define ERROR_DUP_NAME 52L
-#define ERROR_BAD_NETPATH 53L
-#define ERROR_NETWORK_BUSY 54L
-#define ERROR_DEV_NOT_EXIST 55L
-#define ERROR_TOO_MANY_CMDS 56L
-#define ERROR_ADAP_HDW_ERR 57L
-#define ERROR_BAD_NET_RESP 58L
-#define ERROR_UNEXP_NET_ERR 59L
-#define ERROR_BAD_REM_ADAP 60L
-#define ERROR_PRINTQ_FULL 61L
-#define ERROR_NO_SPOOL_SPACE 62L
-#define ERROR_PRINT_CANCELLED 63L
-#define ERROR_NETNAME_DELETED 64L
-#define ERROR_NETWORK_ACCESS_DENIED 65L
-#define ERROR_BAD_DEV_TYPE 66L
-#define ERROR_BAD_NET_NAME 67L
-#define ERROR_TOO_MANY_NAMES 68L
-#define ERROR_TOO_MANY_SESS 69L
-#define ERROR_SHARING_PAUSED 70L
-#define ERROR_REQ_NOT_ACCEP 71L
-#define ERROR_REDIR_PAUSED 72L
-#define ERROR_FILE_EXISTS 80L
-#define ERROR_CANNOT_MAKE 82L
-#define ERROR_FAIL_I24 83L
-#define ERROR_OUT_OF_STRUCTURES 84L
-#define ERROR_ALREADY_ASSIGNED 85L
-#define ERROR_INVALID_PASSWORD 86L
-#define ERROR_INVALID_PARAMETER 87L
-#define ERROR_NET_WRITE_FAULT 88L
-#define ERROR_NO_PROC_SLOTS 89L
-#define ERROR_TOO_MANY_SEMAPHORES 100L
-#define ERROR_EXCL_SEM_ALREADY_OWNED 101L
-#define ERROR_SEM_IS_SET 102L
-#define ERROR_TOO_MANY_SEM_REQUESTS 103L
-#define ERROR_INVALID_AT_INTERRUPT_TIME 104L
-#define ERROR_SEM_OWNER_DIED 105L
-#define ERROR_SEM_USER_LIMIT 106L
-#define ERROR_DISK_CHANGE 107L
-#define ERROR_DRIVE_LOCKED 108L
-#define ERROR_BROKEN_PIPE 109L
-#define ERROR_OPEN_FAILED 110L
-#define ERROR_BUFFER_OVERFLOW 111L
-#define ERROR_DISK_FULL 112L
-#define ERROR_NO_MORE_SEARCH_HANDLES 113L
-#define ERROR_INVALID_TARGET_HANDLE 114L
-#define ERROR_INVALID_CATEGORY 117L
-#define ERROR_INVALID_VERIFY_SWITCH 118L
-#define ERROR_BAD_DRIVER_LEVEL 119L
-#define ERROR_CALL_NOT_IMPLEMENTED 120L
-#define ERROR_SEM_TIMEOUT 121L
-#define ERROR_INSUFFICIENT_BUFFER 122L
-#define ERROR_INVALID_NAME 123L
-#define ERROR_INVALID_LEVEL 124L
-#define ERROR_NO_VOLUME_LABEL 125L
-#define ERROR_MOD_NOT_FOUND 126L
-#define ERROR_PROC_NOT_FOUND 127L
-#define ERROR_WAIT_NO_CHILDREN 128L
-#define ERROR_CHILD_NOT_COMPLETE 129L
-#define ERROR_DIRECT_ACCESS_HANDLE 130L
-#define ERROR_NEGATIVE_SEEK 131L
-#define ERROR_SEEK_ON_DEVICE 132L
-#define ERROR_IS_JOIN_TARGET 133L
-#define ERROR_IS_JOINED 134L
-#define ERROR_IS_SUBSTED 135L
-#define ERROR_NOT_JOINED 136L
-#define ERROR_NOT_SUBSTED 137L
-#define ERROR_JOIN_TO_JOIN 138L
-#define ERROR_SUBST_TO_SUBST 139L
-#define ERROR_JOIN_TO_SUBST 140L
-#define ERROR_SUBST_TO_JOIN 141L
-#define ERROR_BUSY_DRIVE 142L
-#define ERROR_SAME_DRIVE 143L
-#define ERROR_DIR_NOT_ROOT 144L
-#define ERROR_DIR_NOT_EMPTY 145L
-#define ERROR_IS_SUBST_PATH 146L
-#define ERROR_IS_JOIN_PATH 147L
-#define ERROR_PATH_BUSY 148L
-#define ERROR_IS_SUBST_TARGET 149L
-#define ERROR_SYSTEM_TRACE 150L
-#define ERROR_INVALID_EVENT_COUNT 151L
-#define ERROR_TOO_MANY_MUXWAITERS 152L
-#define ERROR_INVALID_LIST_FORMAT 153L
-#define ERROR_LABEL_TOO_LONG 154L
-#define ERROR_TOO_MANY_TCBS 155L
-#define ERROR_SIGNAL_REFUSED 156L
-#define ERROR_DISCARDED 157L
-#define ERROR_NOT_LOCKED 158L
-#define ERROR_BAD_THREADID_ADDR 159L
-#define ERROR_BAD_ARGUMENTS 160L
-#define ERROR_BAD_PATHNAME 161L
-#define ERROR_SIGNAL_PENDING 162L
-#define ERROR_MAX_THRDS_REACHED 164L
-#define ERROR_LOCK_FAILED 167L
-#define ERROR_BUSY 170L
-#define ERROR_CANCEL_VIOLATION 173L
-#define ERROR_ATOMIC_LOCKS_NOT_SUPPORTED 174L
-#define ERROR_INVALID_SEGMENT_NUMBER 180L
-#define ERROR_INVALID_ORDINAL 182L
-#define ERROR_ALREADY_EXISTS 183L
-#define ERROR_INVALID_FLAG_NUMBER 186L
-#define ERROR_SEM_NOT_FOUND 187L
-#define ERROR_INVALID_STARTING_CODESEG 188L
-#define ERROR_INVALID_STACKSEG 189L
-#define ERROR_INVALID_MODULETYPE 190L
-#define ERROR_INVALID_EXE_SIGNATURE 191L
-#define ERROR_EXE_MARKED_INVALID 192L
-#define ERROR_BAD_EXE_FORMAT 193L
-#define ERROR_ITERATED_DATA_EXCEEDS_64k 194L
-#define ERROR_INVALID_MINALLOCSIZE 195L
-#define ERROR_DYNLINK_FROM_INVALID_RING 196L
-#define ERROR_IOPL_NOT_ENABLED 197L
-#define ERROR_INVALID_SEGDPL 198L
-#define ERROR_AUTODATASEG_EXCEEDS_64k 199L
-#define ERROR_RING2SEG_MUST_BE_MOVABLE 200L
-#define ERROR_RELOC_CHAIN_XEEDS_SEGLIM 201L
-#define ERROR_INFLOOP_IN_RELOC_CHAIN 202L
-#define ERROR_ENVVAR_NOT_FOUND 203L
-#define ERROR_NO_SIGNAL_SENT 205L
-#define ERROR_FILENAME_EXCED_RANGE 206L
-#define ERROR_RING2_STACK_IN_USE 207L
-#define ERROR_META_EXPANSION_TOO_LONG 208L
-#define ERROR_INVALID_SIGNAL_NUMBER 209L
-#define ERROR_THREAD_1_INACTIVE 210L
-#define ERROR_LOCKED 212L
-#define ERROR_TOO_MANY_MODULES 214L
-#define ERROR_NESTING_NOT_ALLOWED 215L
-#define ERROR_EXE_MACHINE_TYPE_MISMATCH 216L
-#define ERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY 217L
-#define ERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY 218L
-#define ERROR_BAD_PIPE 230L
-#define ERROR_PIPE_BUSY 231L
-#define ERROR_NO_DATA 232L
-#define ERROR_PIPE_NOT_CONNECTED 233L
-#define ERROR_MORE_DATA 234L
-#define ERROR_VC_DISCONNECTED 240L
-#define ERROR_INVALID_EA_NAME 254L
-#define ERROR_EA_LIST_INCONSISTENT 255L
-#ifndef WAIT_TIMEOUT /* also in winbase.h */
-#define WAIT_TIMEOUT 258L
-#endif
-#define ERROR_NO_MORE_ITEMS 259L
-#define ERROR_CANNOT_COPY 266L
-#define ERROR_DIRECTORY 267L
-#define ERROR_EAS_DIDNT_FIT 275L
-#define ERROR_EA_FILE_CORRUPT 276L
-#define ERROR_EA_TABLE_FULL 277L
-#define ERROR_INVALID_EA_HANDLE 278L
-#define ERROR_EAS_NOT_SUPPORTED 282L
-#define ERROR_NOT_OWNER 288L
-#define ERROR_TOO_MANY_POSTS 298L
-#define ERROR_PARTIAL_COPY 299L
-#define ERROR_OPLOCK_NOT_GRANTED 300L
-#define ERROR_INVALID_OPLOCK_PROTOCOL 301L
-#define ERROR_DISK_TOO_FRAGMENTED 302L
-#define ERROR_DELETE_PENDING 303L
-#define ERROR_MR_MID_NOT_FOUND 317L
-#define ERROR_SCOPE_NOT_FOUND 318L
-#define ERROR_INVALID_ADDRESS 487L
-#define ERROR_ARITHMETIC_OVERFLOW 534L
-#define ERROR_PIPE_CONNECTED 535L
-#define ERROR_PIPE_LISTENING 536L
-#define ERROR_EA_ACCESS_DENIED 994L
-#define ERROR_OPERATION_ABORTED 995L
-#define ERROR_IO_INCOMPLETE 996L
-#define ERROR_IO_PENDING 997L
-#define ERROR_NOACCESS 998L
-#define ERROR_SWAPERROR 999L
-#define ERROR_STACK_OVERFLOW 1001L
-#define ERROR_INVALID_MESSAGE 1002L
-#define ERROR_CAN_NOT_COMPLETE 1003L
-#define ERROR_INVALID_FLAGS 1004L
-#define ERROR_UNRECOGNIZED_VOLUME 1005L
-#define ERROR_FILE_INVALID 1006L
-#define ERROR_FULLSCREEN_MODE 1007L
-#define ERROR_NO_TOKEN 1008L
-#define ERROR_BADDB 1009L
-#define ERROR_BADKEY 1010L
-#define ERROR_CANTOPEN 1011L
-#define ERROR_CANTREAD 1012L
-#define ERROR_CANTWRITE 1013L
-#define ERROR_REGISTRY_RECOVERED 1014L
-#define ERROR_REGISTRY_CORRUPT 1015L
-#define ERROR_REGISTRY_IO_FAILED 1016L
-#define ERROR_NOT_REGISTRY_FILE 1017L
-#define ERROR_KEY_DELETED 1018L
-#define ERROR_NO_LOG_SPACE 1019L
-#define ERROR_KEY_HAS_CHILDREN 1020L
-#define ERROR_CHILD_MUST_BE_VOLATILE 1021L
-#define ERROR_NOTIFY_ENUM_DIR 1022L
-#define ERROR_DEPENDENT_SERVICES_RUNNING 1051L
-#define ERROR_INVALID_SERVICE_CONTROL 1052L
-#define ERROR_SERVICE_REQUEST_TIMEOUT 1053L
-#define ERROR_SERVICE_NO_THREAD 1054L
-#define ERROR_SERVICE_DATABASE_LOCKED 1055L
-#define ERROR_SERVICE_ALREADY_RUNNING 1056L
-#define ERROR_INVALID_SERVICE_ACCOUNT 1057L
-#define ERROR_SERVICE_DISABLED 1058L
-#define ERROR_CIRCULAR_DEPENDENCY 1059L
-#define ERROR_SERVICE_DOES_NOT_EXIST 1060L
-#define ERROR_SERVICE_CANNOT_ACCEPT_CTRL 1061L
-#define ERROR_SERVICE_NOT_ACTIVE 1062L
-#define ERROR_FAILED_SERVICE_CONTROLLER_CONNECT 1063L
-#define ERROR_EXCEPTION_IN_SERVICE 1064L
-#define ERROR_DATABASE_DOES_NOT_EXIST 1065L
-#define ERROR_SERVICE_SPECIFIC_ERROR 1066L
-#define ERROR_PROCESS_ABORTED 1067L
-#define ERROR_SERVICE_DEPENDENCY_FAIL 1068L
-#define ERROR_SERVICE_LOGON_FAILED 1069L
-#define ERROR_SERVICE_START_HANG 1070L
-#define ERROR_INVALID_SERVICE_LOCK 1071L
-#define ERROR_SERVICE_MARKED_FOR_DELETE 1072L
-#define ERROR_SERVICE_EXISTS 1073L
-#define ERROR_ALREADY_RUNNING_LKG 1074L
-#define ERROR_SERVICE_DEPENDENCY_DELETED 1075L
-#define ERROR_BOOT_ALREADY_ACCEPTED 1076L
-#define ERROR_SERVICE_NEVER_STARTED 1077L
-#define ERROR_DUPLICATE_SERVICE_NAME 1078L
-#define ERROR_DIFFERENT_SERVICE_ACCOUNT 1079L
-#define ERROR_CANNOT_DETECT_DRIVER_FAILURE 1080L
-#define ERROR_CANNOT_DETECT_PROCESS_ABORT 1081L
-#define ERROR_NO_RECOVERY_PROGRAM 1082L
-#define ERROR_SERVICE_NOT_IN_EXE 1083L
-#define ERROR_NOT_SAFEBOOT_SERVICE 1084L
-#define ERROR_END_OF_MEDIA 1100L
-#define ERROR_FILEMARK_DETECTED 1101L
-#define ERROR_BEGINNING_OF_MEDIA 1102L
-#define ERROR_SETMARK_DETECTED 1103L
-#define ERROR_NO_DATA_DETECTED 1104L
-#define ERROR_PARTITION_FAILURE 1105L
-#define ERROR_INVALID_BLOCK_LENGTH 1106L
-#define ERROR_DEVICE_NOT_PARTITIONED 1107L
-#define ERROR_UNABLE_TO_LOCK_MEDIA 1108L
-#define ERROR_UNABLE_TO_UNLOAD_MEDIA 1109L
-#define ERROR_MEDIA_CHANGED 1110L
-#define ERROR_BUS_RESET 1111L
-#define ERROR_NO_MEDIA_IN_DRIVE 1112L
-#define ERROR_NO_UNICODE_TRANSLATION 1113L
-#define ERROR_DLL_INIT_FAILED 1114L
-#define ERROR_SHUTDOWN_IN_PROGRESS 1115L
-#define ERROR_NO_SHUTDOWN_IN_PROGRESS 1116L
-#define ERROR_IO_DEVICE 1117L
-#define ERROR_SERIAL_NO_DEVICE 1118L
-#define ERROR_IRQ_BUSY 1119L
-#define ERROR_MORE_WRITES 1120L
-#define ERROR_COUNTER_TIMEOUT 1121L
-#define ERROR_FLOPPY_ID_MARK_NOT_FOUND 1122L
-#define ERROR_FLOPPY_WRONG_CYLINDER 1123L
-#define ERROR_FLOPPY_UNKNOWN_ERROR 1124L
-#define ERROR_FLOPPY_BAD_REGISTERS 1125L
-#define ERROR_DISK_RECALIBRATE_FAILED 1126L
-#define ERROR_DISK_OPERATION_FAILED 1127L
-#define ERROR_DISK_RESET_FAILED 1128L
-#define ERROR_EOM_OVERFLOW 1129L
-#define ERROR_NOT_ENOUGH_SERVER_MEMORY 1130L
-#define ERROR_POSSIBLE_DEADLOCK 1131L
-#define ERROR_MAPPED_ALIGNMENT 1132L
-#define ERROR_SET_POWER_STATE_VETOED 1140L
-#define ERROR_SET_POWER_STATE_FAILED 1141L
-#define ERROR_TOO_MANY_LINKS 1142L
-#define ERROR_OLD_WIN_VERSION 1150L
-#define ERROR_APP_WRONG_OS 1151L
-#define ERROR_SINGLE_INSTANCE_APP 1152L
-#define ERROR_RMODE_APP 1153L
-#define ERROR_INVALID_DLL 1154L
-#define ERROR_NO_ASSOCIATION 1155L
-#define ERROR_DDE_FAIL 1156L
-#define ERROR_DLL_NOT_FOUND 1157L
-#define ERROR_NO_MORE_USER_HANDLES 1158L
-#define ERROR_MESSAGE_SYNC_ONLY 1159L
-#define ERROR_SOURCE_ELEMENT_EMPTY 1160L
-#define ERROR_DESTINATION_ELEMENT_FULL 1161L
-#define ERROR_ILLEGAL_ELEMENT_ADDRESS 1162L
-#define ERROR_MAGAZINE_NOT_PRESENT 1163L
-#define ERROR_DEVICE_REINITIALIZATION_NEEDED 1164L
-#define ERROR_DEVICE_REQUIRES_CLEANING 1165L
-#define ERROR_DEVICE_DOOR_OPEN 1166L
-#define ERROR_DEVICE_NOT_CONNECTED 1167L
-#define ERROR_NOT_FOUND 1168L
-#define ERROR_NO_MATCH 1169L
-#define ERROR_SET_NOT_FOUND 1170L
-#define ERROR_POINT_NOT_FOUND 1171L
-#define ERROR_NO_TRACKING_SERVICE 1172L
-#define ERROR_NO_VOLUME_ID 1173L
-#define ERROR_UNABLE_TO_REMOVE_REPLACED 1175L
-#define ERROR_UNABLE_TO_MOVE_REPLACEMENT 1176L
-#define ERROR_UNABLE_TO_MOVE_REPLACEMENT_2 1177L
-#define ERROR_JOURNAL_DELETE_IN_PROGRESS 1178L
-#define ERROR_JOURNAL_NOT_ACTIVE 1179L
-#define ERROR_POTENTIAL_FILE_FOUND 1180L
-#define ERROR_JOURNAL_ENTRY_DELETED 1181L
-#define ERROR_BAD_DEVICE 1200L
-#define ERROR_CONNECTION_UNAVAIL 1201L
-#define ERROR_DEVICE_ALREADY_REMEMBERED 1202L
-#define ERROR_NO_NET_OR_BAD_PATH 1203L
-#define ERROR_BAD_PROVIDER 1204L
-#define ERROR_CANNOT_OPEN_PROFILE 1205L
-#define ERROR_BAD_PROFILE 1206L
-#define ERROR_NOT_CONTAINER 1207L
-#define ERROR_EXTENDED_ERROR 1208L
-#define ERROR_INVALID_GROUPNAME 1209L
-#define ERROR_INVALID_COMPUTERNAME 1210L
-#define ERROR_INVALID_EVENTNAME 1211L
-#define ERROR_INVALID_DOMAINNAME 1212L
-#define ERROR_INVALID_SERVICENAME 1213L
-#define ERROR_INVALID_NETNAME 1214L
-#define ERROR_INVALID_SHARENAME 1215L
-#define ERROR_INVALID_PASSWORDNAME 1216L
-#define ERROR_INVALID_MESSAGENAME 1217L
-#define ERROR_INVALID_MESSAGEDEST 1218L
-#define ERROR_SESSION_CREDENTIAL_CONFLICT 1219L
-#define ERROR_REMOTE_SESSION_LIMIT_EXCEEDED 1220L
-#define ERROR_DUP_DOMAINNAME 1221L
-#define ERROR_NO_NETWORK 1222L
-#define ERROR_CANCELLED 1223L
-#define ERROR_USER_MAPPED_FILE 1224L
-#define ERROR_CONNECTION_REFUSED 1225L
-#define ERROR_GRACEFUL_DISCONNECT 1226L
-#define ERROR_ADDRESS_ALREADY_ASSOCIATED 1227L
-#define ERROR_ADDRESS_NOT_ASSOCIATED 1228L
-#define ERROR_CONNECTION_INVALID 1229L
-#define ERROR_CONNECTION_ACTIVE 1230L
-#define ERROR_NETWORK_UNREACHABLE 1231L
-#define ERROR_HOST_UNREACHABLE 1232L
-#define ERROR_PROTOCOL_UNREACHABLE 1233L
-#define ERROR_PORT_UNREACHABLE 1234L
-#define ERROR_REQUEST_ABORTED 1235L
-#define ERROR_CONNECTION_ABORTED 1236L
-#define ERROR_RETRY 1237L
-#define ERROR_CONNECTION_COUNT_LIMIT 1238L
-#define ERROR_LOGIN_TIME_RESTRICTION 1239L
-#define ERROR_LOGIN_WKSTA_RESTRICTION 1240L
-#define ERROR_INCORRECT_ADDRESS 1241L
-#define ERROR_ALREADY_REGISTERED 1242L
-#define ERROR_SERVICE_NOT_FOUND 1243L
-#define ERROR_NOT_AUTHENTICATED 1244L
-#define ERROR_NOT_LOGGED_ON 1245L
-#define ERROR_CONTINUE 1246L
-#define ERROR_ALREADY_INITIALIZED 1247L
-#define ERROR_NO_MORE_DEVICES 1248L
-#define ERROR_NO_SUCH_SITE 1249L
-#define ERROR_DOMAIN_CONTROLLER_EXISTS 1250L
-#define ERROR_ONLY_IF_CONNECTED 1251L
-#define ERROR_OVERRIDE_NOCHANGES 1252L
-#define ERROR_BAD_USER_PROFILE 1253L
-#define ERROR_NOT_SUPPORTED_ON_SBS 1254L
-#define ERROR_SERVER_SHUTDOWN_IN_PROGRESS 1255L
-#define ERROR_HOST_DOWN 1256L
-#define ERROR_NON_ACCOUNT_SID 1257L
-#define ERROR_NON_DOMAIN_SID 1258L
-#define ERROR_APPHELP_BLOCK 1259L
-#define ERROR_ACCESS_DISABLED_BY_POLICY 1260L
-#define ERROR_REG_NAT_CONSUMPTION 1261L
-#define ERROR_CSCSHARE_OFFLINE 1262L
-#define ERROR_PKINIT_FAILURE 1263L
-#define ERROR_SMARTCARD_SUBSYSTEM_FAILURE 1264L
-#define ERROR_DOWNGRADE_DETECTED 1265L
-#define SEC_E_SMARTCARD_CERT_REVOKED 1266L
-#define SEC_E_ISSUING_CA_UNTRUSTED 1267L
-#define SEC_E_REVOCATION_OFFLINE_C 1268L
-#define SEC_E_PKINIT_CLIENT_FAILUR 1269L
-#define SEC_E_SMARTCARD_CERT_EXPIRED 1270L
-#define ERROR_MACHINE_LOCKED 1271L
-#define ERROR_CALLBACK_SUPPLIED_INVALID_DATA 1273L
-#define ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED 1274L
-#define ERROR_DRIVER_BLOCKED 1275L
-#define ERROR_INVALID_IMPORT_OF_NON_DLL 1276L
-#define ERROR_ACCESS_DISABLED_WEBBLADE 1277L
-#define ERROR_ACCESS_DISABLED_WEBBLADE_TAMPER 1278L
-#define ERROR_RECOVERY_FAILURE 1279L
-#define ERROR_ALREADY_FIBER 1280L
-#define ERROR_ALREADY_THREAD 1281L
-#define ERROR_STACK_BUFFER_OVERRUN 1282L
-#define ERROR_PARAMETER_QUOTA_EXCEEDED 1283L
-#define ERROR_DEBUGGER_INACTIVE 1284L
-#define ERROR_NOT_ALL_ASSIGNED 1300L
-#define ERROR_SOME_NOT_MAPPED 1301L
-#define ERROR_NO_QUOTAS_FOR_ACCOUNT 1302L
-#define ERROR_LOCAL_USER_SESSION_KEY 1303L
-#define ERROR_NULL_LM_PASSWORD 1304L
-#define ERROR_UNKNOWN_REVISION 1305L
-#define ERROR_REVISION_MISMATCH 1306L
-#define ERROR_INVALID_OWNER 1307L
-#define ERROR_INVALID_PRIMARY_GROUP 1308L
-#define ERROR_NO_IMPERSONATION_TOKEN 1309L
-#define ERROR_CANT_DISABLE_MANDATORY 1310L
-#define ERROR_NO_LOGON_SERVERS 1311L
-#define ERROR_NO_SUCH_LOGON_SESSION 1312L
-#define ERROR_NO_SUCH_PRIVILEGE 1313L
-#define ERROR_PRIVILEGE_NOT_HELD 1314L
-#define ERROR_INVALID_ACCOUNT_NAME 1315L
-#define ERROR_USER_EXISTS 1316L
-#define ERROR_NO_SUCH_USER 1317L
-#define ERROR_GROUP_EXISTS 1318L
-#define ERROR_NO_SUCH_GROUP 1319L
-#define ERROR_MEMBER_IN_GROUP 1320L
-#define ERROR_MEMBER_NOT_IN_GROUP 1321L
-#define ERROR_LAST_ADMIN 1322L
-#define ERROR_WRONG_PASSWORD 1323L
-#define ERROR_ILL_FORMED_PASSWORD 1324L
-#define ERROR_PASSWORD_RESTRICTION 1325L
-#define ERROR_LOGON_FAILURE 1326L
-#define ERROR_ACCOUNT_RESTRICTION 1327L
-#define ERROR_INVALID_LOGON_HOURS 1328L
-#define ERROR_INVALID_WORKSTATION 1329L
-#define ERROR_PASSWORD_EXPIRED 1330L
-#define ERROR_ACCOUNT_DISABLED 1331L
-#define ERROR_NONE_MAPPED 1332L
-#define ERROR_TOO_MANY_LUIDS_REQUESTED 1333L
-#define ERROR_LUIDS_EXHAUSTED 1334L
-#define ERROR_INVALID_SUB_AUTHORITY 1335L
-#define ERROR_INVALID_ACL 1336L
-#define ERROR_INVALID_SID 1337L
-#define ERROR_INVALID_SECURITY_DESCR 1338L
-#define ERROR_BAD_INHERITANCE_ACL 1340L
-#define ERROR_SERVER_DISABLED 1341L
-#define ERROR_SERVER_NOT_DISABLED 1342L
-#define ERROR_INVALID_ID_AUTHORITY 1343L
-#define ERROR_ALLOTTED_SPACE_EXCEEDED 1344L
-#define ERROR_INVALID_GROUP_ATTRIBUTES 1345L
-#define ERROR_BAD_IMPERSONATION_LEVEL 1346L
-#define ERROR_CANT_OPEN_ANONYMOUS 1347L
-#define ERROR_BAD_VALIDATION_CLASS 1348L
-#define ERROR_BAD_TOKEN_TYPE 1349L
-#define ERROR_NO_SECURITY_ON_OBJECT 1350L
-#define ERROR_CANT_ACCESS_DOMAIN_INFO 1351L
-#define ERROR_INVALID_SERVER_STATE 1352L
-#define ERROR_INVALID_DOMAIN_STATE 1353L
-#define ERROR_INVALID_DOMAIN_ROLE 1354L
-#define ERROR_NO_SUCH_DOMAIN 1355L
-#define ERROR_DOMAIN_EXISTS 1356L
-#define ERROR_DOMAIN_LIMIT_EXCEEDED 1357L
-#define ERROR_INTERNAL_DB_CORRUPTION 1358L
-#define ERROR_INTERNAL_ERROR 1359L
-#define ERROR_GENERIC_NOT_MAPPED 1360L
-#define ERROR_BAD_DESCRIPTOR_FORMAT 1361L
-#define ERROR_NOT_LOGON_PROCESS 1362L
-#define ERROR_LOGON_SESSION_EXISTS 1363L
-#define ERROR_NO_SUCH_PACKAGE 1364L
-#define ERROR_BAD_LOGON_SESSION_STATE 1365L
-#define ERROR_LOGON_SESSION_COLLISION 1366L
-#define ERROR_INVALID_LOGON_TYPE 1367L
-#define ERROR_CANNOT_IMPERSONATE 1368L
-#define ERROR_RXACT_INVALID_STATE 1369L
-#define ERROR_RXACT_COMMIT_FAILURE 1370L
-#define ERROR_SPECIAL_ACCOUNT 1371L
-#define ERROR_SPECIAL_GROUP 1372L
-#define ERROR_SPECIAL_USER 1373L
-#define ERROR_MEMBERS_PRIMARY_GROUP 1374L
-#define ERROR_TOKEN_ALREADY_IN_USE 1375L
-#define ERROR_NO_SUCH_ALIAS 1376L
-#define ERROR_MEMBER_NOT_IN_ALIAS 1377L
-#define ERROR_MEMBER_IN_ALIAS 1378L
-#define ERROR_ALIAS_EXISTS 1379L
-#define ERROR_LOGON_NOT_GRANTED 1380L
-#define ERROR_TOO_MANY_SECRETS 1381L
-#define ERROR_SECRET_TOO_LONG 1382L
-#define ERROR_INTERNAL_DB_ERROR 1383L
-#define ERROR_TOO_MANY_CONTEXT_IDS 1384L
-#define ERROR_LOGON_TYPE_NOT_GRANTED 1385L
-#define ERROR_NT_CROSS_ENCRYPTION_REQUIRED 1386L
-#define ERROR_NO_SUCH_MEMBER 1387L
-#define ERROR_INVALID_MEMBER 1388L
-#define ERROR_TOO_MANY_SIDS 1389L
-#define ERROR_LM_CROSS_ENCRYPTION_REQUIRED 1390L
-#define ERROR_NO_INHERITANCE 1391L
-#define ERROR_FILE_CORRUPT 1392L
-#define ERROR_DISK_CORRUPT 1393L
-#define ERROR_NO_USER_SESSION_KEY 1394L
-#define ERROR_LICENSE_QUOTA_EXCEEDED 1395L
-#define ERROR_WRONG_TARGET_NAME 1396L
-#define ERROR_MUTUAL_AUTH_FAILED 1397L
-#define ERROR_TIME_SKEW 1398L
-#define ERROR_CURRENT_DOMAIN_NOT_ALLOWED 1399L
-#define ERROR_INVALID_WINDOW_HANDLE 1400L
-#define ERROR_INVALID_MENU_HANDLE 1401L
-#define ERROR_INVALID_CURSOR_HANDLE 1402L
-#define ERROR_INVALID_ACCEL_HANDLE 1403L
-#define ERROR_INVALID_HOOK_HANDLE 1404L
-#define ERROR_INVALID_DWP_HANDLE 1405L
-#define ERROR_TLW_WITH_WSCHILD 1406L
-#define ERROR_CANNOT_FIND_WND_CLASS 1407L
-#define ERROR_WINDOW_OF_OTHER_THREAD 1408L
-#define ERROR_HOTKEY_ALREADY_REGISTERED 1409L
-#define ERROR_CLASS_ALREADY_EXISTS 1410L
-#define ERROR_CLASS_DOES_NOT_EXIST 1411L
-#define ERROR_CLASS_HAS_WINDOWS 1412L
-#define ERROR_INVALID_INDEX 1413L
-#define ERROR_INVALID_ICON_HANDLE 1414L
-#define ERROR_PRIVATE_DIALOG_INDEX 1415L
-#define ERROR_LISTBOX_ID_NOT_FOUND 1416L
-#define ERROR_NO_WILDCARD_CHARACTERS 1417L
-#define ERROR_CLIPBOARD_NOT_OPEN 1418L
-#define ERROR_HOTKEY_NOT_REGISTERED 1419L
-#define ERROR_WINDOW_NOT_DIALOG 1420L
-#define ERROR_CONTROL_ID_NOT_FOUND 1421L
-#define ERROR_INVALID_COMBOBOX_MESSAGE 1422L
-#define ERROR_WINDOW_NOT_COMBOBOX 1423L
-#define ERROR_INVALID_EDIT_HEIGHT 1424L
-#define ERROR_DC_NOT_FOUND 1425L
-#define ERROR_INVALID_HOOK_FILTER 1426L
-#define ERROR_INVALID_FILTER_PROC 1427L
-#define ERROR_HOOK_NEEDS_HMOD 1428L
-#define ERROR_GLOBAL_ONLY_HOOK 1429L
-#define ERROR_JOURNAL_HOOK_SET 1430L
-#define ERROR_HOOK_NOT_INSTALLED 1431L
-#define ERROR_INVALID_LB_MESSAGE 1432L
-#define ERROR_SETCOUNT_ON_BAD_LB 1433L
-#define ERROR_LB_WITHOUT_TABSTOPS 1434L
-#define ERROR_DESTROY_OBJECT_OF_OTHER_THREAD 1435L
-#define ERROR_CHILD_WINDOW_MENU 1436L
-#define ERROR_NO_SYSTEM_MENU 1437L
-#define ERROR_INVALID_MSGBOX_STYLE 1438L
-#define ERROR_INVALID_SPI_VALUE 1439L
-#define ERROR_SCREEN_ALREADY_LOCKED 1440L
-#define ERROR_HWNDS_HAVE_DIFF_PARENT 1441L
-#define ERROR_NOT_CHILD_WINDOW 1442L
-#define ERROR_INVALID_GW_COMMAND 1443L
-#define ERROR_INVALID_THREAD_ID 1444L
-#define ERROR_NON_MDICHILD_WINDOW 1445L
-#define ERROR_POPUP_ALREADY_ACTIVE 1446L
-#define ERROR_NO_SCROLLBARS 1447L
-#define ERROR_INVALID_SCROLLBAR_RANGE 1448L
-#define ERROR_INVALID_SHOWWIN_COMMAND 1449L
-#define ERROR_NO_SYSTEM_RESOURCES 1450L
-#define ERROR_NONPAGED_SYSTEM_RESOURCES 1451L
-#define ERROR_PAGED_SYSTEM_RESOURCES 1452L
-#define ERROR_WORKING_SET_QUOTA 1453L
-#define ERROR_PAGEFILE_QUOTA 1454L
-#define ERROR_COMMITMENT_LIMIT 1455L
-#define ERROR_MENU_ITEM_NOT_FOUND 1456L
-#define ERROR_INVALID_KEYBOARD_HANDLE 1457L
-#define ERROR_HOOK_TYPE_NOT_ALLOWED 1458L
-#define ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION 1459L
-#define ERROR_TIMEOUT 1460L
-#define ERROR_INVALID_MONITOR_HANDLE 1461L
-#define ERROR_EVENTLOG_FILE_CORRUPT 1500L
-#define ERROR_EVENTLOG_CANT_START 1501L
-#define ERROR_LOG_FILE_FULL 1502L
-#define ERROR_EVENTLOG_FILE_CHANGED 1503L
-#define ERROR_INSTALL_SERVICE_FAILURE 1601L
-#define ERROR_INSTALL_USEREXIT 1602L
-#define ERROR_INSTALL_FAILURE 1603L
-#define ERROR_INSTALL_SUSPEND 1604L
-#define ERROR_UNKNOWN_PRODUCT 1605L
-#define ERROR_UNKNOWN_FEATURE 1606L
-#define ERROR_UNKNOWN_COMPONENT 1607L
-#define ERROR_UNKNOWN_PROPERTY 1608L
-#define ERROR_INVALID_HANDLE_STATE 1609L
-#define ERROR_BAD_CONFIGURATION 1610L
-#define ERROR_INDEX_ABSENT 1611L
-#define ERROR_INSTALL_SOURCE_ABSENT 1612L
-#define ERROR_INSTALL_PACKAGE_VERSION 1613L
-#define ERROR_PRODUCT_UNINSTALLED 1614L
-#define ERROR_BAD_QUERY_SYNTAX 1615L
-#define ERROR_INVALID_FIELD 1616L
-#define ERROR_DEVICE_REMOVED 1617L
-#define ERROR_INSTALL_ALREADY_RUNNING 1618L
-#define ERROR_INSTALL_PACKAGE_OPEN_FAILED 1619L
-#define ERROR_INSTALL_PACKAGE_INVALID 1620L
-#define ERROR_INSTALL_UI_FAILURE 1621L
-#define ERROR_INSTALL_LOG_FAILURE 1622L
-#define ERROR_INSTALL_LANGUAGE_UNSUPPORTED 1623L
-#define ERROR_INSTALL_TRANSFORM_FAILURE 1624L
-#define ERROR_INSTALL_PACKAGE_REJECTED 1625L
-#define ERROR_FUNCTION_NOT_CALLED 1626L
-#define ERROR_FUNCTION_FAILED 1627L
-#define ERROR_INVALID_TABLE 1628L
-#define ERROR_DATATYPE_MISMATCH 1629L
-#define ERROR_UNSUPPORTED_TYPE 1630L
-#define ERROR_CREATE_FAILED 1631L
-#define ERROR_INSTALL_TEMP_UNWRITABLE 1632L
-#define ERROR_INSTALL_PLATFORM_UNSUPPORTED 1633L
-#define ERROR_INSTALL_NOTUSED 1634L
-#define ERROR_PATCH_PACKAGE_OPEN_FAILED 1635L
-#define ERROR_PATCH_PACKAGE_INVALID 1636L
-#define ERROR_PATCH_PACKAGE_UNSUPPORTED 1637L
-#define ERROR_PRODUCT_VERSION 1638L
-#define ERROR_INVALID_COMMAND_LINE 1639L
-#define ERROR_INSTALL_REMOTE_DISALLOWED 1640L
-#define ERROR_SUCCESS_REBOOT_INITIATED 1641L
-#define ERROR_PATCH_TARGET_NOT_FOUND 1642L
-#define ERROR_PATCH_PACKAGE_REJECTED 1643L
-#define ERROR_INSTALL_TRANSFORM_REJECTED 1644L
-#define ERROR_INSTALL_REMOTE_PROHIBITED 1645L
-#define RPC_S_INVALID_STRING_BINDING 1700L
-#define RPC_S_WRONG_KIND_OF_BINDING 1701L
-#define RPC_S_INVALID_BINDING 1702L
-#define RPC_S_PROTSEQ_NOT_SUPPORTED 1703L
-#define RPC_S_INVALID_RPC_PROTSEQ 1704L
-#define RPC_S_INVALID_STRING_UUID 1705L
-#define RPC_S_INVALID_ENDPOINT_FORMAT 1706L
-#define RPC_S_INVALID_NET_ADDR 1707L
-#define RPC_S_NO_ENDPOINT_FOUND 1708L
-#define RPC_S_INVALID_TIMEOUT 1709L
-#define RPC_S_OBJECT_NOT_FOUND 1710L
-#define RPC_S_ALREADY_REGISTERED 1711L
-#define RPC_S_TYPE_ALREADY_REGISTERED 1712L
-#define RPC_S_ALREADY_LISTENING 1713L
-#define RPC_S_NO_PROTSEQS_REGISTERED 1714L
-#define RPC_S_NOT_LISTENING 1715L
-#define RPC_S_UNKNOWN_MGR_TYPE 1716L
-#define RPC_S_UNKNOWN_IF 1717L
-#define RPC_S_NO_BINDINGS 1718L
-#define RPC_S_NO_PROTSEQS 1719L
-#define RPC_S_CANT_CREATE_ENDPOINT 1720L
-#define RPC_S_OUT_OF_RESOURCES 1721L
-#define RPC_S_SERVER_UNAVAILABLE 1722L
-#define RPC_S_SERVER_TOO_BUSY 1723L
-#define RPC_S_INVALID_NETWORK_OPTIONS 1724L
-#define RPC_S_NO_CALL_ACTIVE 1725L
-#define RPC_S_CALL_FAILED 1726L
-#define RPC_S_CALL_FAILED_DNE 1727L
-#define RPC_S_PROTOCOL_ERROR 1728L
-#define RPC_S_UNSUPPORTED_TRANS_SYN 1730L
-#define RPC_S_UNSUPPORTED_TYPE 1732L
-#define RPC_S_INVALID_TAG 1733L
-#define RPC_S_INVALID_BOUND 1734L
-#define RPC_S_NO_ENTRY_NAME 1735L
-#define RPC_S_INVALID_NAME_SYNTAX 1736L
-#define RPC_S_UNSUPPORTED_NAME_SYNTAX 1737L
-#define RPC_S_UUID_NO_ADDRESS 1739L
-#define RPC_S_DUPLICATE_ENDPOINT 1740L
-#define RPC_S_UNKNOWN_AUTHN_TYPE 1741L
-#define RPC_S_MAX_CALLS_TOO_SMALL 1742L
-#define RPC_S_STRING_TOO_LONG 1743L
-#define RPC_S_PROTSEQ_NOT_FOUND 1744L
-#define RPC_S_PROCNUM_OUT_OF_RANGE 1745L
-#define RPC_S_BINDING_HAS_NO_AUTH 1746L
-#define RPC_S_UNKNOWN_AUTHN_SERVICE 1747L
-#define RPC_S_UNKNOWN_AUTHN_LEVEL 1748L
-#define RPC_S_INVALID_AUTH_IDENTITY 1749L
-#define RPC_S_UNKNOWN_AUTHZ_SERVICE 1750L
-#define EPT_S_INVALID_ENTRY 1751L
-#define EPT_S_CANT_PERFORM_OP 1752L
-#define EPT_S_NOT_REGISTERED 1753L
-#define RPC_S_NOTHING_TO_EXPORT 1754L
-#define RPC_S_INCOMPLETE_NAME 1755L
-#define RPC_S_INVALID_VERS_OPTION 1756L
-#define RPC_S_NO_MORE_MEMBERS 1757L
-#define RPC_S_NOT_ALL_OBJS_UNEXPORTED 1758L
-#define RPC_S_INTERFACE_NOT_FOUND 1759L
-#define RPC_S_ENTRY_ALREADY_EXISTS 1760L
-#define RPC_S_ENTRY_NOT_FOUND 1761L
-#define RPC_S_NAME_SERVICE_UNAVAILABLE 1762L
-#define RPC_S_INVALID_NAF_ID 1763L
-#define RPC_S_CANNOT_SUPPORT 1764L
-#define RPC_S_NO_CONTEXT_AVAILABLE 1765L
-#define RPC_S_INTERNAL_ERROR 1766L
-#define RPC_S_ZERO_DIVIDE 1767L
-#define RPC_S_ADDRESS_ERROR 1768L
-#define RPC_S_FP_DIV_ZERO 1769L
-#define RPC_S_FP_UNDERFLOW 1770L
-#define RPC_S_FP_OVERFLOW 1771L
-#define RPC_X_NO_MORE_ENTRIES 1772L
-#define RPC_X_SS_CHAR_TRANS_OPEN_FAIL 1773L
-#define RPC_X_SS_CHAR_TRANS_SHORT_FILE 1774L
-#define RPC_X_SS_IN_NULL_CONTEXT 1775L
-#define RPC_X_SS_CONTEXT_DAMAGED 1777L
-#define RPC_X_SS_HANDLES_MISMATCH 1778L
-#define RPC_X_SS_CANNOT_GET_CALL_HANDLE 1779L
-#define RPC_X_NULL_REF_POINTER 1780L
-#define RPC_X_ENUM_VALUE_OUT_OF_RANGE 1781L
-#define RPC_X_BYTE_COUNT_TOO_SMALL 1782L
-#define RPC_X_BAD_STUB_DATA 1783L
-#define ERROR_INVALID_USER_BUFFER 1784L
-#define ERROR_UNRECOGNIZED_MEDIA 1785L
-#define ERROR_NO_TRUST_LSA_SECRET 1786L
-#define ERROR_NO_TRUST_SAM_ACCOUNT 1787L
-#define ERROR_TRUSTED_DOMAIN_FAILURE 1788L
-#define ERROR_TRUSTED_RELATIONSHIP_FAILURE 1789L
-#define ERROR_TRUST_FAILURE 1790L
-#define RPC_S_CALL_IN_PROGRESS 1791L
-#define ERROR_NETLOGON_NOT_STARTED 1792L
-#define ERROR_ACCOUNT_EXPIRED 1793L
-#define ERROR_REDIRECTOR_HAS_OPEN_HANDLES 1794L
-#define ERROR_PRINTER_DRIVER_ALREADY_INSTALLED 1795L
-#define ERROR_UNKNOWN_PORT 1796L
-#define ERROR_UNKNOWN_PRINTER_DRIVER 1797L
-#define ERROR_UNKNOWN_PRINTPROCESSOR 1798L
-#define ERROR_INVALID_SEPARATOR_FILE 1799L
-#define ERROR_INVALID_PRIORITY 1800L
-#define ERROR_INVALID_PRINTER_NAME 1801L
-#define ERROR_PRINTER_ALREADY_EXISTS 1802L
-#define ERROR_INVALID_PRINTER_COMMAND 1803L
-#define ERROR_INVALID_DATATYPE 1804L
-#define ERROR_INVALID_ENVIRONMENT 1805L
-#define RPC_S_NO_MORE_BINDINGS 1806L
-#define ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT 1807L
-#define ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT 1808L
-#define ERROR_NOLOGON_SERVER_TRUST_ACCOUNT 1809L
-#define ERROR_DOMAIN_TRUST_INCONSISTENT 1810L
-#define ERROR_SERVER_HAS_OPEN_HANDLES 1811L
-#define ERROR_RESOURCE_DATA_NOT_FOUND 1812L
-#define ERROR_RESOURCE_TYPE_NOT_FOUND 1813L
-#define ERROR_RESOURCE_NAME_NOT_FOUND 1814L
-#define ERROR_RESOURCE_LANG_NOT_FOUND 1815L
-#define ERROR_NOT_ENOUGH_QUOTA 1816L
-#define RPC_S_NO_INTERFACES 1817L
-#define RPC_S_CALL_CANCELLED 1818L
-#define RPC_S_BINDING_INCOMPLETE 1819L
-#define RPC_S_COMM_FAILURE 1820L
-#define RPC_S_UNSUPPORTED_AUTHN_LEVEL 1821L
-#define RPC_S_NO_PRINC_NAME 1822L
-#define RPC_S_NOT_RPC_ERROR 1823L
-#define RPC_S_UUID_LOCAL_ONLY 1824L
-#define RPC_S_SEC_PKG_ERROR 1825L
-#define RPC_S_NOT_CANCELLED 1826L
-#define RPC_X_INVALID_ES_ACTION 1827L
-#define RPC_X_WRONG_ES_VERSION 1828L
-#define RPC_X_WRONG_STUB_VERSION 1829L
-#define RPC_X_INVALID_PIPE_OBJECT 1830L
-#define RPC_X_WRONG_PIPE_ORDER 1831L
-#define RPC_X_WRONG_PIPE_VERSION 1832L
-#define RPC_S_GROUP_MEMBER_NOT_FOUND 1898L
-#define EPT_S_CANT_CREATE 1899L
-#define RPC_S_INVALID_OBJECT 1900L
-#define ERROR_INVALID_TIME 1901L
-#define ERROR_INVALID_FORM_NAME 1902L
-#define ERROR_INVALID_FORM_SIZE 1903L
-#define ERROR_ALREADY_WAITING 1904L
-#define ERROR_PRINTER_DELETED 1905L
-#define ERROR_INVALID_PRINTER_STATE 1906L
-#define ERROR_PASSWORD_MUST_CHANGE 1907L
-#define ERROR_DOMAIN_CONTROLLER_NOT_FOUND 1908L
-#define ERROR_ACCOUNT_LOCKED_OUT 1909L
-#define OR_INVALID_OXID 1910L
-#define OR_INVALID_OID 1911L
-#define OR_INVALID_SET 1912L
-#define RPC_S_SEND_INCOMPLETE 1913L
-#define RPC_S_INVALID_ASYNC_HANDLE 1914L
-#define RPC_S_INVALID_ASYNC_CALL 1915L
-#define RPC_X_PIPE_CLOSED 1916L
-#define RPC_X_PIPE_DISCIPLINE_ERROR 1917L
-#define RPC_X_PIPE_EMPTY 1918L
-#define ERROR_NO_SITENAME 1919L
-#define ERROR_CANT_ACCESS_FILE 1920L
-#define ERROR_CANT_RESOLVE_FILENAME 1921L
-#define RPC_S_ENTRY_TYPE_MISMATCH 1922L
-#define RPC_S_NOT_ALL_OBJS_EXPORTED 1923L
-#define RPC_S_INTERFACE_NOT_EXPORTED 1924L
-#define RPC_S_PROFILE_NOT_ADDED 1925L
-#define RPC_S_PRF_ELT_NOT_ADDED 1926L
-#define RPC_S_PRF_ELT_NOT_REMOVED 1927L
-#define RPC_S_GRP_ELT_NOT_ADDED 1928L
-#define RPC_S_GRP_ELT_NOT_REMOVED 1929L
-#define ERROR_KM_DRIVER_BLOCKED 1930L
-#define ERROR_CONTEXT_EXPIRED 1931L
-#define ERROR_PER_USER_TRUST_QUOTA_EXCEEDED 1932L
-#define ERROR_ALL_USER_TRUST_QUOTA_EXCEEDED 1933L
-#define ERROR_USER_DELETE_TRUST_QUOTA_EXCEEDED 1934L
-#define ERROR_INVALID_PIXEL_FORMAT 2000L
-#define ERROR_BAD_DRIVER 2001L
-#define ERROR_INVALID_WINDOW_STYLE 2002L
-#define ERROR_METAFILE_NOT_SUPPORTED 2003L
-#define ERROR_TRANSFORM_NOT_SUPPORTED 2004L
-#define ERROR_CLIPPING_NOT_SUPPORTED 2005L
-#define ERROR_INVALID_CMM 2010L
-#define ERROR_INVALID_PROFILE 2011L
-#define ERROR_TAG_NOT_FOUND 2012L
-#define ERROR_TAG_NOT_PRESENT 2013L
-#define ERROR_DUPLICATE_TAG 2014L
-#define ERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE 2015L
-#define ERROR_PROFILE_NOT_FOUND 2016L
-#define ERROR_INVALID_COLORSPACE 2017L
-#define ERROR_ICM_NOT_ENABLED 2018L
-#define ERROR_DELETING_ICM_XFORM 2019L
-#define ERROR_INVALID_TRANSFORM 2020L
-#define ERROR_COLORSPACE_MISMATCH 2021L
-#define ERROR_INVALID_COLORINDEX 2022L
-#define ERROR_CONNECTED_OTHER_PASSWORD 2108L
-#define ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT 2109L
-#define ERROR_BAD_USERNAME 2202L
-#define ERROR_NOT_CONNECTED 2250L
-#define ERROR_OPEN_FILES 2401L
-#define ERROR_ACTIVE_CONNECTIONS 2402L
-#define ERROR_DEVICE_IN_USE 2404L
-#define ERROR_UNKNOWN_PRINT_MONITOR 3000L
-#define ERROR_PRINTER_DRIVER_IN_USE 3001L
-#define ERROR_SPOOL_FILE_NOT_FOUND 3002L
-#define ERROR_SPL_NO_STARTDOC 3003L
-#define ERROR_SPL_NO_ADDJOB 3004L
-#define ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED 3005L
-#define ERROR_PRINT_MONITOR_ALREADY_INSTALLED 3006L
-#define ERROR_INVALID_PRINT_MONITOR 3007L
-#define ERROR_PRINT_MONITOR_IN_USE 3008L
-#define ERROR_PRINTER_HAS_JOBS_QUEUED 3009L
-#define ERROR_SUCCESS_REBOOT_REQUIRED 3010L
-#define ERROR_SUCCESS_RESTART_REQUIRED 3011L
-#define ERROR_PRINTER_NOT_FOUND 3012L
-#define ERROR_PRINTER_DRIVER_WARNED 3013L
-#define ERROR_PRINTER_DRIVER_BLOCKED 3014L
-#define ERROR_WINS_INTERNAL 4000L
-#define ERROR_CAN_NOT_DEL_LOCAL_WINS 4001L
-#define ERROR_STATIC_INIT 4002L
-#define ERROR_INC_BACKUP 4003L
-#define ERROR_FULL_BACKUP 4004L
-#define ERROR_REC_NON_EXISTENT 4005L
-#define ERROR_RPL_NOT_ALLOWED 4006L
-#define ERROR_DHCP_ADDRESS_CONFLICT 4100L
-#define ERROR_WMI_GUID_NOT_FOUND 4200L
-#define ERROR_WMI_INSTANCE_NOT_FOUND 4201L
-#define ERROR_WMI_ITEMID_NOT_FOUND 4202L
-#define ERROR_WMI_TRY_AGAIN 4203L
-#define ERROR_WMI_DP_NOT_FOUND 4204L
-#define ERROR_WMI_UNRESOLVED_INSTANCE_REF 4205L
-#define ERROR_WMI_ALREADY_ENABLED 4206L
-#define ERROR_WMI_GUID_DISCONNECTED 4207L
-#define ERROR_WMI_SERVER_UNAVAILABLE 4208L
-#define ERROR_WMI_DP_FAILED 4209L
-#define ERROR_WMI_INVALID_MOF 4210L
-#define ERROR_WMI_INVALID_REGINFO 4211L
-#define ERROR_WMI_ALREADY_DISABLED 4212L
-#define ERROR_WMI_READ_ONLY 4213L
-#define ERROR_WMI_SET_FAILURE 4214L
-#define ERROR_INVALID_MEDIA 4300L
-#define ERROR_INVALID_LIBRARY 4301L
-#define ERROR_INVALID_MEDIA_POOL 4302L
-#define ERROR_DRIVE_MEDIA_MISMATCH 4303L
-#define ERROR_MEDIA_OFFLINE 4304L
-#define ERROR_LIBRARY_OFFLINE 4305L
-#define ERROR_EMPTY 4306L
-#define ERROR_NOT_EMPTY 4307L
-#define ERROR_MEDIA_UNAVAILABLE 4308L
-#define ERROR_RESOURCE_DISABLED 4309L
-#define ERROR_INVALID_CLEANER 4310L
-#define ERROR_UNABLE_TO_CLEAN 4311L
-#define ERROR_OBJECT_NOT_FOUND 4312L
-#define ERROR_DATABASE_FAILURE 4313L
-#define ERROR_DATABASE_FULL 4314L
-#define ERROR_MEDIA_INCOMPATIBLE 4315L
-#define ERROR_RESOURCE_NOT_PRESENT 4316L
-#define ERROR_INVALID_OPERATION 4317L
-#define ERROR_MEDIA_NOT_AVAILABLE 4318L
-#define ERROR_DEVICE_NOT_AVAILABLE 4319L
-#define ERROR_REQUEST_REFUSED 4320L
-#define ERROR_INVALID_DRIVE_OBJECT 4321L
-#define ERROR_LIBRARY_FULL 4322L
-#define ERROR_MEDIUM_NOT_ACCESSIBLE 4323L
-#define ERROR_UNABLE_TO_LOAD_MEDIUM 4324L
-#define ERROR_UNABLE_TO_INVENTORY_DRIVE 4325L
-#define ERROR_UNABLE_TO_INVENTORY_SLOT 4326L
-#define ERROR_UNABLE_TO_INVENTORY_TRANSPORT 4327L
-#define ERROR_TRANSPORT_FULL 4328L
-#define ERROR_CONTROLLING_IEPORT 4329L
-#define ERROR_UNABLE_TO_EJECT_MOUNTED_MEDIA 4330L
-#define ERROR_CLEANER_SLOT_SET 4331L
-#define ERROR_CLEANER_SLOT_NOT_SET 4332L
-#define ERROR_CLEANER_CARTRIDGE_SPENT 4333L
-#define ERROR_UNEXPECTED_OMID 4334L
-#define ERROR_CANT_DELETE_LAST_ITEM 4335L
-#define ERROR_MESSAGE_EXCEEDS_MAX_SIZE 4336L
-#define ERROR_VOLUME_CONTAINS_SYS_FILES 4337L
-#define ERROR_INDIGENOUS_TYPE 4338L
-#define ERROR_NO_SUPPORTING_DRIVES 4339L
-#define ERROR_CLEANER_CARTRIDGE_INSTALLED 4340L
-#define ERROR_FILE_OFFLINE 4350L
-#define ERROR_REMOTE_STORAGE_NOT_ACTIVE 4351L
-#define ERROR_REMOTE_STORAGE_MEDIA_ERROR 4352L
-#define ERROR_NOT_A_REPARSE_POINT 4390L
-#define ERROR_REPARSE_ATTRIBUTE_CONFLICT 4391L
-#define ERROR_INVALID_REPARSE_DATA 4392L
-#define ERROR_REPARSE_TAG_INVALID 4393L
-#define ERROR_REPARSE_TAG_MISMATCH 4394L
-#define ERROR_VOLUME_NOT_SIS_ENABLED 4500L
-#define ERROR_DEPENDENT_RESOURCE_EXISTS 5001L
-#define ERROR_DEPENDENCY_NOT_FOUND 5002L
-#define ERROR_DEPENDENCY_ALREADY_EXISTS 5003L
-#define ERROR_RESOURCE_NOT_ONLINE 5004L
-#define ERROR_HOST_NODE_NOT_AVAILABLE 5005L
-#define ERROR_RESOURCE_NOT_AVAILABLE 5006L
-#define ERROR_RESOURCE_NOT_FOUND 5007L
-#define ERROR_SHUTDOWN_CLUSTER 5008L
-#define ERROR_CANT_EVICT_ACTIVE_NODE 5009L
-#define ERROR_OBJECT_ALREADY_EXISTS 5010L
-#define ERROR_OBJECT_IN_LIST 5011L
-#define ERROR_GROUP_NOT_AVAILABLE 5012L
-#define ERROR_GROUP_NOT_FOUND 5013L
-#define ERROR_GROUP_NOT_ONLINE 5014L
-#define ERROR_HOST_NODE_NOT_RESOURCE_OWNER 5015L
-#define ERROR_HOST_NODE_NOT_GROUP_OWNER 5016L
-#define ERROR_RESMON_CREATE_FAILED 5017L
-#define ERROR_RESMON_ONLINE_FAILED 5018L
-#define ERROR_RESOURCE_ONLINE 5019L
-#define ERROR_QUORUM_RESOURCE 5020L
-#define ERROR_NOT_QUORUM_CAPABLE 5021L
-#define ERROR_CLUSTER_SHUTTING_DOWN 5022L
-#define ERROR_INVALID_STATE 5023L
-#define ERROR_RESOURCE_PROPERTIES_STORED 5024L
-#define ERROR_NOT_QUORUM_CLASS 5025L
-#define ERROR_CORE_RESOURCE 5026L
-#define ERROR_QUORUM_RESOURCE_ONLINE_FAILED 5027L
-#define ERROR_QUORUMLOG_OPEN_FAILED 5028L
-#define ERROR_CLUSTERLOG_CORRUPT 5029L
-#define ERROR_CLUSTERLOG_RECORD_EXCEEDS_MAXSIZE 5030L
-#define ERROR_CLUSTERLOG_EXCEEDS_MAXSIZE 5031L
-#define ERROR_CLUSTERLOG_CHKPOINT_NOT_FOUND 5032L
-#define ERROR_CLUSTERLOG_NOT_ENOUGH_SPACE 5033L
-#define ERROR_QUORUM_OWNER_ALIVE 5034L
-#define ERROR_NETWORK_NOT_AVAILABLE 5035L
-#define ERROR_NODE_NOT_AVAILABLE 5036L
-#define ERROR_ALL_NODES_NOT_AVAILABLE 5037L
-#define ERROR_RESOURCE_FAILED 5038L
-#define ERROR_CLUSTER_INVALID_NODE 5039L
-#define ERROR_CLUSTER_NODE_EXISTS 5040L
-#define ERROR_CLUSTER_JOIN_IN_PROGRESS 5041L
-#define ERROR_CLUSTER_NODE_NOT_FOUND 5042L
-#define ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND 5043L
-#define ERROR_CLUSTER_NETWORK_EXISTS 5044L
-#define ERROR_CLUSTER_NETWORK_NOT_FOUND 5045L
-#define ERROR_CLUSTER_NETINTERFACE_EXISTS 5046L
-#define ERROR_CLUSTER_NETINTERFACE_NOT_FOUND 5047L
-#define ERROR_CLUSTER_INVALID_REQUEST 5048L
-#define ERROR_CLUSTER_INVALID_NETWORK_PROVIDER 5049L
-#define ERROR_CLUSTER_NODE_DOWN 5050L
-#define ERROR_CLUSTER_NODE_UNREACHABLE 5051L
-#define ERROR_CLUSTER_NODE_NOT_MEMBER 5052L
-#define ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS 5053L
-#define ERROR_CLUSTER_INVALID_NETWORK 5054L
-#define ERROR_CLUSTER_NODE_UP 5056L
-#define ERROR_CLUSTER_IPADDR_IN_USE 5057L
-#define ERROR_CLUSTER_NODE_NOT_PAUSED 5058L
-#define ERROR_CLUSTER_NO_SECURITY_CONTEXT 5059L
-#define ERROR_CLUSTER_NETWORK_NOT_INTERNAL 5060L
-#define ERROR_CLUSTER_NODE_ALREADY_UP 5061L
-#define ERROR_CLUSTER_NODE_ALREADY_DOWN 5062L
-#define ERROR_CLUSTER_NETWORK_ALREADY_ONLINE 5063L
-#define ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE 5064L
-#define ERROR_CLUSTER_NODE_ALREADY_MEMBER 5065L
-#define ERROR_CLUSTER_LAST_INTERNAL_NETWORK 5066L
-#define ERROR_CLUSTER_NETWORK_HAS_DEPENDENTS 5067L
-#define ERROR_INVALID_OPERATION_ON_QUORUM 5068L
-#define ERROR_DEPENDENCY_NOT_ALLOWED 5069L
-#define ERROR_CLUSTER_NODE_PAUSED 5070L
-#define ERROR_NODE_CANT_HOST_RESOURCE 5071L
-#define ERROR_CLUSTER_NODE_NOT_READY 5072L
-#define ERROR_CLUSTER_NODE_SHUTTING_DOWN 5073L
-#define ERROR_CLUSTER_JOIN_ABORTED 5074L
-#define ERROR_CLUSTER_INCOMPATIBLE_VERSIONS 5075L
-#define ERROR_CLUSTER_MAXNUM_OF_RESOURCES_EXCEEDED 5076L
-#define ERROR_CLUSTER_SYSTEM_CONFIG_CHANGED 5077L
-#define ERROR_CLUSTER_RESOURCE_TYPE_NOT_FOUND 5078L
-#define ERROR_CLUSTER_RESTYPE_NOT_SUPPORTED 5079L
-#define ERROR_CLUSTER_RESNAME_NOT_FOUND 5080L
-#define ERROR_CLUSTER_NO_RPC_PACKAGES_REGISTERED 5081L
-#define ERROR_CLUSTER_OWNER_NOT_IN_PREFLIST 5082L
-#define ERROR_CLUSTER_DATABASE_SEQMISMATCH 5083L
-#define ERROR_RESMON_INVALID_STATE 5084L
-#define ERROR_CLUSTER_GUM_NOT_LOCKER 5085L
-#define ERROR_QUORUM_DISK_NOT_FOUND 5086L
-#define ERROR_DATABASE_BACKUP_CORRUPT 5087L
-#define ERROR_CLUSTER_NODE_ALREADY_HAS_DFS_ROOT 5088L
-#define ERROR_RESOURCE_PROPERTY_UNCHANGEABLE 5089L
-#define ERROR_CLUSTER_MEMBERSHIP_INVALID_STATE 5890L
-#define ERROR_CLUSTER_QUORUMLOG_NOT_FOUND 5891L
-#define ERROR_CLUSTER_MEMBERSHIP_HALT 5892L
-#define ERROR_CLUSTER_INSTANCE_ID_MISMATCH 5893L
-#define ERROR_CLUSTER_NETWORK_NOT_FOUND_FOR_IP 5894L
-#define ERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH 5895L
-#define ERROR_CLUSTER_EVICT_WITHOUT_CLEANUP 5896L
-#define ERROR_CLUSTER_PARAMETER_MISMATCH 5897L
-#define ERROR_NODE_CANNOT_BE_CLUSTERED 5898L
-#define ERROR_CLUSTER_WRONG_OS_VERSION 5899L
-#define ERROR_CLUSTER_CANT_CREATE_DUP_CLUSTER_NAME 5900L
-#define ERROR_CLUSCFG_ALREADY_COMMITTED 5901L
-#define ERROR_CLUSCFG_ROLLBACK_FAILED 5902L
-#define ERROR_CLUSCFG_SYSTEM_DISK_DRIVE_LETTER_CONFLICT 5903L
-#define ERROR_CLUSTER_OLD_VERSION 5904L
-#define ERROR_CLUSTER_MISMATCHED_COMPUTER_ACCT_NAME 5905L
-#define ERROR_ENCRYPTION_FAILED 6000L
-#define ERROR_DECRYPTION_FAILED 6001L
-#define ERROR_FILE_ENCRYPTED 6002L
-#define ERROR_NO_RECOVERY_POLICY 6003L
-#define ERROR_NO_EFS 6004L
-#define ERROR_WRONG_EFS 6005L
-#define ERROR_NO_USER_KEYS 6006L
-#define ERROR_FILE_NOT_ENCRYPTED 6007L
-#define ERROR_NOT_EXPORT_FORMAT 6008L
-#define ERROR_FILE_READ_ONLY 6009L
-#define ERROR_DIR_EFS_DISALLOWED 6010L
-#define ERROR_EFS_SERVER_NOT_TRUSTED 6011L
-#define ERROR_BAD_RECOVERY_POLICY 6012L
-#define ERROR_EFS_ALG_BLOB_TOO_BIG 6013L
-#define ERROR_VOLUME_NOT_SUPPORT_EFS 6014L
-#define ERROR_EFS_DISABLED 6015L
-#define ERROR_EFS_VERSION_NOT_SUPPORT 6016L
-#define ERROR_NO_BROWSER_SERVERS_FOUND 6118L
-#define SCHED_E_SERVICE_NOT_LOCALSYSTEM 6200L
-
-#define ERROR_CTX_WINSTATION_NAME_INVALID 7001L
-#define ERROR_CTX_INVALID_PD 7002L
-#define ERROR_CTX_PD_NOT_FOUND 7003L
-#define ERROR_CTX_WD_NOT_FOUND 7004L
-#define ERROR_CTX_CANNOT_MAKE_EVENTLOG_ENTRY 7005L
-#define ERROR_CTX_SERVICE_NAME_COLLISION 7006L
-#define ERROR_CTX_CLOSE_PENDING 7007L
-#define ERROR_CTX_NO_OUTBUF 7008L
-#define ERROR_CTX_MODEM_INF_NOT_FOUND 7009L
-#define ERROR_CTX_INVALID_MODEMNAME 7010L
-#define ERROR_CTX_MODEM_RESPONSE_ERROR 7011L
-#define ERROR_CTX_MODEM_RESPONSE_TIMEOUT 7012L
-#define ERROR_CTX_MODEM_RESPONSE_NO_CARRIER 7013L
-#define ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE 7014L
-#define ERROR_CTX_MODEM_RESPONSE_BUSY 7015L
-#define ERROR_CTX_MODEM_RESPONSE_VOICE 7016L
-#define ERROR_CTX_TD_ERROR 7017L
-#define ERROR_CTX_WINSTATION_NOT_FOUND 7022L
-#define ERROR_CTX_WINSTATION_ALREADY_EXISTS 7023L
-#define ERROR_CTX_WINSTATION_BUSY 7024L
-#define ERROR_CTX_BAD_VIDEO_MODE 7025L
-#define ERROR_CTX_GRAPHICS_INVALID 7035L
-#define ERROR_CTX_LOGON_DISABLED 7037L
-#define ERROR_CTX_NOT_CONSOLE 7038L
-#define ERROR_CTX_CLIENT_QUERY_TIMEOUT 7040L
-#define ERROR_CTX_CONSOLE_DISCONNECT 7041L
-#define ERROR_CTX_CONSOLE_CONNECT 7042L
-#define ERROR_CTX_SHADOW_DENIED 7044L
-#define ERROR_CTX_WINSTATION_ACCESS_DENIED 7045L
-#define ERROR_CTX_INVALID_WD 7049L
-#define ERROR_CTX_SHADOW_INVALID 7050L
-#define ERROR_CTX_SHADOW_DISABLED 7051L
-#define ERROR_CTX_CLIENT_LICENSE_IN_USE 7052L
-#define ERROR_CTX_CLIENT_LICENSE_NOT_SET 7053L
-#define ERROR_CTX_LICENSE_NOT_AVAILABLE 7054L
-#define ERROR_CTX_LICENSE_CLIENT_INVALID 7055L
-#define ERROR_CTX_LICENSE_EXPIRED 7056L
-#define ERROR_CTX_SHADOW_NOT_RUNNING 7057L
-#define ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE 7058L
-#define ERROR_ACTIVATION_COUNT_EXCEEDED 7059L
-
-#define FRS_ERR_INVALID_API_SEQUENCE 8001L
-#define FRS_ERR_STARTING_SERVICE 8002L
-#define FRS_ERR_STOPPING_SERVICE 8003L
-#define FRS_ERR_INTERNAL_API 8004L
-#define FRS_ERR_INTERNAL 8005L
-#define FRS_ERR_SERVICE_COMM 8006L
-#define FRS_ERR_INSUFFICIENT_PRIV 8007L
-#define FRS_ERR_AUTHENTICATION 8008L
-#define FRS_ERR_PARENT_INSUFFICIENT_PRIV 8009L
-#define FRS_ERR_PARENT_AUTHENTICATION 8010L
-#define FRS_ERR_CHILD_TO_PARENT_COMM 8011L
-#define FRS_ERR_PARENT_TO_CHILD_COMM 8012L
-#define FRS_ERR_SYSVOL_POPULATE 8013L
-#define FRS_ERR_SYSVOL_POPULATE_TIMEOUT 8014L
-#define FRS_ERR_SYSVOL_IS_BUSY 8015L
-#define FRS_ERR_SYSVOL_DEMOTE 8016L
-#define FRS_ERR_INVALID_SERVICE_PARAMETER 8017L
-#define ERROR_DS_NOT_INSTALLED 8200L
-#define ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY 8201L
-#define ERROR_DS_NO_ATTRIBUTE_OR_VALUE 8202L
-#define ERROR_DS_INVALID_ATTRIBUTE_SYNTAX 8203L
-#define ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED 8204L
-#define ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS 8205L
-#define ERROR_DS_BUSY 8206L
-#define ERROR_DS_UNAVAILABLE 8207L
-#define ERROR_DS_NO_RIDS_ALLOCATED 8208L
-#define ERROR_DS_NO_MORE_RIDS 8209L
-#define ERROR_DS_INCORRECT_ROLE_OWNER 8210L
-#define ERROR_DS_RIDMGR_INIT_ERROR 8211L
-#define ERROR_DS_OBJ_CLASS_VIOLATION 8212L
-#define ERROR_DS_CANT_ON_NON_LEAF 8213L
-#define ERROR_DS_CANT_ON_RDN 8214L
-#define ERROR_DS_CANT_MOD_OBJ_CLASS 8215L
-#define ERROR_DS_CROSS_DOM_MOVE_ERROR 8216L
-#define ERROR_DS_GC_NOT_AVAILABLE 8217L
-#define ERROR_SHARED_POLICY 8218L
-#define ERROR_POLICY_OBJECT_NOT_FOUND 8219L
-#define ERROR_POLICY_ONLY_IN_DS 8220L
-#define ERROR_PROMOTION_ACTIVE 8221L
-#define ERROR_NO_PROMOTION_ACTIVE 8222L
-#define ERROR_DS_OPERATIONS_ERROR 8224L
-#define ERROR_DS_PROTOCOL_ERROR 8225L
-#define ERROR_DS_TIMELIMIT_EXCEEDED 8226L
-#define ERROR_DS_SIZELIMIT_EXCEEDED 8227L
-#define ERROR_DS_ADMIN_LIMIT_EXCEEDED 8228L
-#define ERROR_DS_COMPARE_FALSE 8229L
-#define ERROR_DS_COMPARE_TRUE 8230L
-#define ERROR_DS_AUTH_METHOD_NOT_SUPPORTED 8231L
-#define ERROR_DS_STRONG_AUTH_REQUIRED 8232L
-#define ERROR_DS_INAPPROPRIATE_AUTH 8233L
-#define ERROR_DS_AUTH_UNKNOWN 8234L
-#define ERROR_DS_REFERRAL 8235L
-#define ERROR_DS_UNAVAILABLE_CRIT_EXTENSION 8236L
-#define ERROR_DS_CONFIDENTIALITY_REQUIRED 8237L
-#define ERROR_DS_INAPPROPRIATE_MATCHING 8238L
-#define ERROR_DS_CONSTRAINT_VIOLATION 8239L
-#define ERROR_DS_NO_SUCH_OBJECT 8240L
-#define ERROR_DS_ALIAS_PROBLEM 8241L
-#define ERROR_DS_INVALID_DN_SYNTAX 8242L
-#define ERROR_DS_IS_LEAF 8243L
-#define ERROR_DS_ALIAS_DEREF_PROBLEM 8244L
-#define ERROR_DS_UNWILLING_TO_PERFORM 8245L
-#define ERROR_DS_LOOP_DETECT 8246L
-#define ERROR_DS_NAMING_VIOLATION 8247L
-#define ERROR_DS_OBJECT_RESULTS_TOO_LARGE 8248L
-#define ERROR_DS_AFFECTS_MULTIPLE_DSAS 8249L
-#define ERROR_DS_SERVER_DOWN 8250L
-#define ERROR_DS_LOCAL_ERROR 8251L
-#define ERROR_DS_ENCODING_ERROR 8252L
-#define ERROR_DS_DECODING_ERROR 8253L
-#define ERROR_DS_FILTER_UNKNOWN 8254L
-#define ERROR_DS_PARAM_ERROR 8255L
-#define ERROR_DS_NOT_SUPPORTED 8256L
-#define ERROR_DS_NO_RESULTS_RETURNED 8257L
-#define ERROR_DS_CONTROL_NOT_FOUND 8258L
-#define ERROR_DS_CLIENT_LOOP 8259L
-#define ERROR_DS_REFERRAL_LIMIT_EXCEEDED 8260L
-#define ERROR_DS_SORT_CONTROL_MISSING 8261L
-#define ERROR_DS_OFFSET_RANGE_ERROR 8262L
-#define ERROR_DS_ROOT_MUST_BE_NC 8301L
-#define ERROR_DS_ADD_REPLICA_INHIBITED 8302L
-#define ERROR_DS_ATT_NOT_DEF_IN_SCHEMA 8303L
-#define ERROR_DS_MAX_OBJ_SIZE_EXCEEDED 8304L
-#define ERROR_DS_OBJ_STRING_NAME_EXISTS 8305L
-#define ERROR_DS_NO_RDN_DEFINED_IN_SCHEMA 8306L
-#define ERROR_DS_RDN_DOESNT_MATCH_SCHEMA 8307L
-#define ERROR_DS_NO_REQUESTED_ATTS_FOUND 8308L
-#define ERROR_DS_USER_BUFFER_TO_SMALL 8309L
-#define ERROR_DS_ATT_IS_NOT_ON_OBJ 8310L
-#define ERROR_DS_ILLEGAL_MOD_OPERATION 8311L
-#define ERROR_DS_OBJ_TOO_LARGE 8312L
-#define ERROR_DS_BAD_INSTANCE_TYPE 8313L
-#define ERROR_DS_MASTERDSA_REQUIRED 8314L
-#define ERROR_DS_OBJECT_CLASS_REQUIRED 8315L
-#define ERROR_DS_MISSING_REQUIRED_ATT 8316L
-#define ERROR_DS_ATT_NOT_DEF_FOR_CLASS 8317L
-#define ERROR_DS_ATT_ALREADY_EXISTS 8318L
-#define ERROR_DS_CANT_ADD_ATT_VALUES 8320L
-#define ERROR_DS_SINGLE_VALUE_CONSTRAINT 8321L
-#define ERROR_DS_RANGE_CONSTRAINT 8322L
-#define ERROR_DS_ATT_VAL_ALREADY_EXISTS 8323L
-#define ERROR_DS_CANT_REM_MISSING_ATT 8324L
-#define ERROR_DS_CANT_REM_MISSING_ATT_VAL 8325L
-#define ERROR_DS_ROOT_CANT_BE_SUBREF 8326L
-#define ERROR_DS_NO_CHAINING 8327L
-#define ERROR_DS_NO_CHAINED_EVAL 8328L
-#define ERROR_DS_NO_PARENT_OBJECT 8329L
-#define ERROR_DS_PARENT_IS_AN_ALIAS 8330L
-#define ERROR_DS_CANT_MIX_MASTER_AND_REPS 8331L
-#define ERROR_DS_CHILDREN_EXIST 8332L
-#define ERROR_DS_OBJ_NOT_FOUND 8333L
-#define ERROR_DS_ALIASED_OBJ_MISSING 8334L
-#define ERROR_DS_BAD_NAME_SYNTAX 8335L
-#define ERROR_DS_ALIAS_POINTS_TO_ALIAS 8336L
-#define ERROR_DS_CANT_DEREF_ALIAS 8337L
-#define ERROR_DS_OUT_OF_SCOPE 8338L
-#define ERROR_DS_OBJECT_BEING_REMOVED 8339L
-#define ERROR_DS_CANT_DELETE_DSA_OBJ 8340L
-#define ERROR_DS_GENERIC_ERROR 8341L
-#define ERROR_DS_DSA_MUST_BE_INT_MASTER 8342L
-#define ERROR_DS_CLASS_NOT_DSA 8343L
-#define ERROR_DS_INSUFF_ACCESS_RIGHTS 8344L
-#define ERROR_DS_ILLEGAL_SUPERIOR 8345L
-#define ERROR_DS_ATTRIBUTE_OWNED_BY_SAM 8346L
-#define ERROR_DS_NAME_TOO_MANY_PARTS 8347L
-#define ERROR_DS_NAME_TOO_LONG 8348L
-#define ERROR_DS_NAME_VALUE_TOO_LONG 8349L
-#define ERROR_DS_NAME_UNPARSEABLE 8350L
-#define ERROR_DS_NAME_TYPE_UNKNOWN 8351L
-#define ERROR_DS_NOT_AN_OBJECT 8352L
-#define ERROR_DS_SEC_DESC_TOO_SHORT 8353L
-#define ERROR_DS_SEC_DESC_INVALID 8354L
-#define ERROR_DS_NO_DELETED_NAME 8355L
-#define ERROR_DS_SUBREF_MUST_HAVE_PARENT 8356L
-#define ERROR_DS_NCNAME_MUST_BE_NC 8357L
-#define ERROR_DS_CANT_ADD_SYSTEM_ONLY 8358L
-#define ERROR_DS_CLASS_MUST_BE_CONCRETE 8359L
-#define ERROR_DS_INVALID_DMD 8360L
-#define ERROR_DS_OBJ_GUID_EXISTS 8361L
-#define ERROR_DS_NOT_ON_BACKLINK 8362L
-#define ERROR_DS_NO_CROSSREF_FOR_NC 8363L
-#define ERROR_DS_SHUTTING_DOWN 8364L
-#define ERROR_DS_UNKNOWN_OPERATION 8365L
-#define ERROR_DS_INVALID_ROLE_OWNER 8366L
-#define ERROR_DS_COULDNT_CONTACT_FSMO 8367L
-#define ERROR_DS_CROSS_NC_DN_RENAME 8368L
-#define ERROR_DS_CANT_MOD_SYSTEM_ONLY 8369L
-#define ERROR_DS_REPLICATOR_ONLY 8370L
-#define ERROR_DS_OBJ_CLASS_NOT_DEFINED 8371L
-#define ERROR_DS_OBJ_CLASS_NOT_SUBCLASS 8372L
-#define ERROR_DS_NAME_REFERENCE_INVALID 8373L
-#define ERROR_DS_CROSS_REF_EXISTS 8374L
-#define ERROR_DS_CANT_DEL_MASTER_CROSSREF 8375L
-#define ERROR_DS_SUBTREE_NOTIFY_NOT_NC_HEAD 8376L
-#define ERROR_DS_NOTIFY_FILTER_TOO_COMPLEX 8377L
-#define ERROR_DS_DUP_RDN 8378L
-#define ERROR_DS_DUP_OID 8379L
-#define ERROR_DS_DUP_MAPI_ID 8380L
-#define ERROR_DS_DUP_SCHEMA_ID_GUID 8381L
-#define ERROR_DS_DUP_LDAP_DISPLAY_NAME 8382L
-#define ERROR_DS_SEMANTIC_ATT_TEST 8383L
-#define ERROR_DS_SYNTAX_MISMATCH 8384L
-#define ERROR_DS_EXISTS_IN_MUST_HAVE 8385L
-#define ERROR_DS_EXISTS_IN_MAY_HAVE 8386L
-#define ERROR_DS_NONEXISTENT_MAY_HAVE 8387L
-#define ERROR_DS_NONEXISTENT_MUST_HAVE 8388L
-#define ERROR_DS_AUX_CLS_TEST_FAIL 8389L
-#define ERROR_DS_NONEXISTENT_POSS_SUP 8390L
-#define ERROR_DS_SUB_CLS_TEST_FAIL 8391L
-#define ERROR_DS_BAD_RDN_ATT_ID_SYNTAX 8392L
-#define ERROR_DS_EXISTS_IN_AUX_CLS 8393L
-#define ERROR_DS_EXISTS_IN_SUB_CLS 8394L
-#define ERROR_DS_EXISTS_IN_POSS_SUP 8395L
-#define ERROR_DS_RECALCSCHEMA_FAILED 8396L
-#define ERROR_DS_TREE_DELETE_NOT_FINISHED 8397L
-#define ERROR_DS_CANT_DELETE 8398L
-#define ERROR_DS_ATT_SCHEMA_REQ_ID 8399L
-#define ERROR_DS_BAD_ATT_SCHEMA_SYNTAX 8400L
-#define ERROR_DS_CANT_CACHE_ATT 8401L
-#define ERROR_DS_CANT_CACHE_CLASS 8402L
-#define ERROR_DS_CANT_REMOVE_ATT_CACHE 8403L
-#define ERROR_DS_CANT_REMOVE_CLASS_CACHE 8404L
-#define ERROR_DS_CANT_RETRIEVE_DN 8405L
-#define ERROR_DS_MISSING_SUPREF 8406L
-#define ERROR_DS_CANT_RETRIEVE_INSTANCE 8407L
-#define ERROR_DS_CODE_INCONSISTENCY 8408L
-#define ERROR_DS_DATABASE_ERROR 8409L
-#define ERROR_DS_GOVERNSID_MISSING 8410L
-#define ERROR_DS_MISSING_EXPECTED_ATT 8411L
-#define ERROR_DS_NCNAME_MISSING_CR_REF 8412L
-#define ERROR_DS_SECURITY_CHECKING_ERROR 8413L
-#define ERROR_DS_SCHEMA_NOT_LOADED 8414L
-#define ERROR_DS_SCHEMA_ALLOC_FAILED 8415L
-#define ERROR_DS_ATT_SCHEMA_REQ_SYNTAX 8416L
-#define ERROR_DS_GCVERIFY_ERROR 8417L
-#define ERROR_DS_DRA_SCHEMA_MISMATCH 8418L
-#define ERROR_DS_CANT_FIND_DSA_OBJ 8419L
-#define ERROR_DS_CANT_FIND_EXPECTED_NC 8420L
-#define ERROR_DS_CANT_FIND_NC_IN_CACHE 8421L
-#define ERROR_DS_CANT_RETRIEVE_CHILD 8422L
-#define ERROR_DS_SECURITY_ILLEGAL_MODIFY 8423L
-#define ERROR_DS_CANT_REPLACE_HIDDEN_REC 8424L
-#define ERROR_DS_BAD_HIERARCHY_FILE 8425L
-#define ERROR_DS_BUILD_HIERARCHY_TABLE_FAILED 8426L
-#define ERROR_DS_CONFIG_PARAM_MISSING 8427L
-#define ERROR_DS_COUNTING_AB_INDICES_FAILED 8428L
-#define ERROR_DS_HIERARCHY_TABLE_MALLOC_FAILED 8429L
-#define ERROR_DS_INTERNAL_FAILURE 8430L
-#define ERROR_DS_UNKNOWN_ERROR 8431L
-#define ERROR_DS_ROOT_REQUIRES_CLASS_TOP 8432L
-#define ERROR_DS_REFUSING_FSMO_ROLES 8433L
-#define ERROR_DS_MISSING_FSMO_SETTINGS 8434L
-#define ERROR_DS_UNABLE_TO_SURRENDER_ROLES 8435L
-#define ERROR_DS_DRA_GENERIC 8436L
-#define ERROR_DS_DRA_INVALID_PARAMETER 8437L
-#define ERROR_DS_DRA_BUSY 8438L
-#define ERROR_DS_DRA_BAD_DN 8439L
-#define ERROR_DS_DRA_BAD_NC 8440L
-#define ERROR_DS_DRA_DN_EXISTS 8441L
-#define ERROR_DS_DRA_INTERNAL_ERROR 8442L
-#define ERROR_DS_DRA_INCONSISTENT_DIT 8443L
-#define ERROR_DS_DRA_CONNECTION_FAILED 8444L
-#define ERROR_DS_DRA_BAD_INSTANCE_TYPE 8445L
-#define ERROR_DS_DRA_OUT_OF_MEM 8446L
-#define ERROR_DS_DRA_MAIL_PROBLEM 8447L
-#define ERROR_DS_DRA_REF_ALREADY_EXISTS 8448L
-#define ERROR_DS_DRA_REF_NOT_FOUND 8449L
-#define ERROR_DS_DRA_OBJ_IS_REP_SOURCE 8450L
-#define ERROR_DS_DRA_DB_ERROR 8451L
-#define ERROR_DS_DRA_NO_REPLICA 8452L
-#define ERROR_DS_DRA_ACCESS_DENIED 8453L
-#define ERROR_DS_DRA_NOT_SUPPORTED 8454L
-#define ERROR_DS_DRA_RPC_CANCELLED 8455L
-#define ERROR_DS_DRA_SOURCE_DISABLED 8456L
-#define ERROR_DS_DRA_SINK_DISABLED 8457L
-#define ERROR_DS_DRA_NAME_COLLISION 8458L
-#define ERROR_DS_DRA_SOURCE_REINSTALLED 8459L
-#define ERROR_DS_DRA_MISSING_PARENT 8460L
-#define ERROR_DS_DRA_PREEMPTED 8461L
-#define ERROR_DS_DRA_ABANDON_SYNC 8462L
-#define ERROR_DS_DRA_SHUTDOWN 8463L
-#define ERROR_DS_DRA_INCOMPATIBLE_PARTIAL_SET 8464L
-#define ERROR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA 8465L
-#define ERROR_DS_DRA_EXTN_CONNECTION_FAILED 8466L
-#define ERROR_DS_INSTALL_SCHEMA_MISMATCH 8467L
-#define ERROR_DS_DUP_LINK_ID 8468L
-#define ERROR_DS_NAME_ERROR_RESOLVING 8469L
-#define ERROR_DS_NAME_ERROR_NOT_FOUND 8470L
-#define ERROR_DS_NAME_ERROR_NOT_UNIQUE 8471L
-#define ERROR_DS_NAME_ERROR_NO_MAPPING 8472L
-#define ERROR_DS_NAME_ERROR_DOMAIN_ONLY 8473L
-#define ERROR_DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING 8474L
-#define ERROR_DS_CONSTRUCTED_ATT_MOD 8475L
-#define ERROR_DS_WRONG_OM_OBJ_CLASS 8476L
-#define ERROR_DS_DRA_REPL_PENDING 8477L
-#define ERROR_DS_DS_REQUIRED 8478L
-#define ERROR_DS_INVALID_LDAP_DISPLAY_NAME 8479L
-#define ERROR_DS_NON_BASE_SEARCH 8480L
-#define ERROR_DS_CANT_RETRIEVE_ATTS 8481L
-#define ERROR_DS_BACKLINK_WITHOUT_LINK 8482L
-#define ERROR_DS_EPOCH_MISMATCH 8483L
-#define ERROR_DS_SRC_NAME_MISMATCH 8484L
-#define ERROR_DS_SRC_AND_DST_NC_IDENTICAL 8485L
-#define ERROR_DS_DST_NC_MISMATCH 8486L
-#define ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC 8487L
-#define ERROR_DS_SRC_GUID_MISMATCH 8488L
-#define ERROR_DS_CANT_MOVE_DELETED_OBJECT 8489L
-#define ERROR_DS_PDC_OPERATION_IN_PROGRESS 8490L
-#define ERROR_DS_CROSS_DOMAIN_CLEANUP_REQD 8491L
-#define ERROR_DS_ILLEGAL_XDOM_MOVE_OPERATION 8492L
-#define ERROR_DS_CANT_WITH_ACCT_GROUP_MEMBERSHPS 8493L
-#define ERROR_DS_NC_MUST_HAVE_NC_PARENT 8494L
-#define ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE 8495L
-#define ERROR_DS_DST_DOMAIN_NOT_NATIVE 8496L
-#define ERROR_DS_MISSING_INFRASTRUCTURE_CONTAINER 8497L
-#define ERROR_DS_CANT_MOVE_ACCOUNT_GROUP 8498L
-#define ERROR_DS_CANT_MOVE_RESOURCE_GROUP 8499L
-#define ERROR_DS_INVALID_SEARCH_FLAG 8500L
-#define ERROR_DS_NO_TREE_DELETE_ABOVE_NC 8501L
-#define ERROR_DS_COULDNT_LOCK_TREE_FOR_DELETE 8502L
-#define ERROR_DS_COULDNT_IDENTIFY_OBJECTS_FOR_TREE_DELETE 8503L
-#define ERROR_DS_SAM_INIT_FAILURE 8504L
-#define ERROR_DS_SENSITIVE_GROUP_VIOLATION 8505L
-#define ERROR_DS_CANT_MOD_PRIMARYGROUPID 8506L
-#define ERROR_DS_ILLEGAL_BASE_SCHEMA_MOD 8507L
-#define ERROR_DS_NONSAFE_SCHEMA_CHANGE 8508L
-#define ERROR_DS_SCHEMA_UPDATE_DISALLOWED 8509L
-#define ERROR_DS_CANT_CREATE_UNDER_SCHEMA 8510L
-#define ERROR_DS_INSTALL_NO_SRC_SCH_VERSION 8511L
-#define ERROR_DS_INSTALL_NO_SCH_VERSION_IN_INIFILE 8512L
-#define ERROR_DS_INVALID_GROUP_TYPE 8513L
-#define ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN 8514L
-#define ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN 8515L
-#define ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER 8516L
-#define ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER 8517L
-#define ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER 8518L
-#define ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER 8519L
-#define ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER 8520L
-#define ERROR_DS_HAVE_PRIMARY_MEMBERS 8521L
-#define ERROR_DS_STRING_SD_CONVERSION_FAILED 8522L
-#define ERROR_DS_NAMING_MASTER_GC 8523L
-#define ERROR_DS_LOOKUP_FAILURE 8524L
-#define ERROR_DS_COULDNT_UPDATE_SPNS 8525L
-#define ERROR_DS_CANT_RETRIEVE_SD 8526L
-#define ERROR_DS_KEY_NOT_UNIQUE 8527L
-#define ERROR_DS_WRONG_LINKED_ATT_SYNTAX 8528L
-#define ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD 8529L
-#define ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY 8530L
-#define ERROR_DS_CANT_START 8531L
-#define ERROR_DS_INIT_FAILURE 8532L
-#define ERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION 8533L
-#define ERROR_DS_SOURCE_DOMAIN_IN_FOREST 8534L
-#define ERROR_DS_DESTINATION_DOMAIN_NOT_IN_FOREST 8535L
-#define ERROR_DS_DESTINATION_AUDITING_NOT_ENABLED 8536L
-#define ERROR_DS_CANT_FIND_DC_FOR_SRC_DOMAIN 8537L
-#define ERROR_DS_SRC_OBJ_NOT_GROUP_OR_USER 8538L
-#define ERROR_DS_SRC_SID_EXISTS_IN_FOREST 8539L
-#define ERROR_DS_SRC_AND_DST_OBJECT_CLASS_MISMATCH 8540L
-#define ERROR_SAM_INIT_FAILURE 8541L
-#define ERROR_DS_DRA_SCHEMA_INFO_SHIP 8542L
-#define ERROR_DS_DRA_SCHEMA_CONFLICT 8543L
-#define ERROR_DS_DRA_EARLIER_SCHEMA_CONLICT 8544L
-#define ERROR_DS_DRA_OBJ_NC_MISMATCH 8545L
-#define ERROR_DS_NC_STILL_HAS_DSAS 8546L
-#define ERROR_DS_GC_REQUIRED 8547L
-#define ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY 8548L
-#define ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS 8549L
-#define ERROR_DS_CANT_ADD_TO_GC 8550L
-#define ERROR_DS_NO_CHECKPOINT_WITH_PDC 8551L
-#define ERROR_DS_SOURCE_AUDITING_NOT_ENABLED 8552L
-#define ERROR_DS_CANT_CREATE_IN_NONDOMAIN_NC 8553L
-#define ERROR_DS_INVALID_NAME_FOR_SPN 8554L
-#define ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS 8555L
-#define ERROR_DS_UNICODEPWD_NOT_IN_QUOTES 8556L
-#define ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED 8557L
-#define ERROR_DS_MUST_BE_RUN_ON_DST_DC 8558L
-#define ERROR_DS_SRC_DC_MUST_BE_SP4_OR_GREATER 8559L
-#define ERROR_DS_CANT_TREE_DELETE_CRITICAL_OBJ 8560L
-#define ERROR_DS_INIT_FAILURE_CONSOLE 8561L
-#define ERROR_DS_SAM_INIT_FAILURE_CONSOLE 8562L
-#define ERROR_DS_FOREST_VERSION_TOO_HIGH 8563L
-#define ERROR_DS_DOMAIN_VERSION_TOO_HIGH 8564L
-#define ERROR_DS_FOREST_VERSION_TOO_LOW 8565L
-#define ERROR_DS_DOMAIN_VERSION_TOO_LOW 8566L
-#define ERROR_DS_INCOMPATIBLE_VERSION 8567L
-#define ERROR_DS_LOW_DSA_VERSION 8568L
-#define ERROR_DS_NO_BEHAVIOR_VERSION_IN_MIXEDDOMAIN 8569L
-#define ERROR_DS_NOT_SUPPORTED_SORT_ORDER 8570L
-#define ERROR_DS_NAME_NOT_UNIQUE 8571L
-#define ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4 8572L
-#define ERROR_DS_OUT_OF_VERSION_STORE 8573L
-#define ERROR_DS_INCOMPATIBLE_CONTROLS_USED 8574L
-#define ERROR_DS_NO_REF_DOMAIN 8575L
-#define ERROR_DS_RESERVED_LINK_ID 8576L
-#define ERROR_DS_LINK_ID_NOT_AVAILABLE 8577L
-#define ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER 8578L
-#define ERROR_DS_MODIFYDN_DISALLOWED_BY_INSTANCE_TYPE 8579L
-#define ERROR_DS_NO_OBJECT_MOVE_IN_SCHEMA_NC 8580L
-#define ERROR_DS_MODIFYDN_DISALLOWED_BY_FLAG 8581L
-#define ERROR_DS_MODIFYDN_WRONG_GRANDPARENT 8582L
-#define ERROR_DS_NAME_ERROR_TRUST_REFERRAL 8583L
-#define ERROR_NOT_SUPPORTED_ON_STANDARD_SERVER 8584L
-#define ERROR_DS_CANT_ACCESS_REMOTE_PART_OF_AD 8585L
-#define ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE_V2 8586L
-#define ERROR_DS_THREAD_LIMIT_EXCEEDED 8587L
-#define ERROR_DS_NOT_CLOSEST 8588L
-#define ERROR_DS_CANT_DERIVE_SPN_WITHOUT_SERVER_REF 8589L
-#define ERROR_DS_SINGLE_USER_MODE_FAILED 8590L
-#define ERROR_DS_NTDSCRIPT_SYNTAX_ERROR 8591L
-#define ERROR_DS_NTDSCRIPT_PROCESS_ERROR 8592L
-#define ERROR_DS_DIFFERENT_REPL_EPOCHS 8593L
-#define ERROR_DS_DRS_EXTENSIONS_CHANGED 8594L
-#define ERROR_DS_REPLICA_SET_CHANGE_NOT_ALLOWED_ON_DISABLED_CR 8595L
-#define ERROR_DS_NO_MSDS_INTID 8596L
-#define ERROR_DS_DUP_MSDS_INTID 8597L
-#define ERROR_DS_EXISTS_IN_RDNATTID 8598L
-#define ERROR_DS_AUTHORIZATION_FAILED 8599L
-#define ERROR_DS_INVALID_SCRIPT 8600L
-#define ERROR_DS_REMOTE_CROSSREF_OP_FAILED 8601L
-#define ERROR_DS_CROSS_REF_BUSY 8602L
-#define ERROR_DS_CANT_DERIVE_SPN_FOR_DELETED_DOMAIN 8603L
-#define ERROR_DS_CANT_DEMOTE_WITH_WRITEABLE_NC 8604L
-#define ERROR_DS_DUPLICATE_ID_FOUND 8605L
-#define ERROR_DS_INSUFFICIENT_ATTR_TO_CREATE_OBJECT 8606L
-#define ERROR_DS_GROUP_CONVERSION_ERROR 8607L
-#define ERROR_DS_CANT_MOVE_APP_BASIC_GROUP 8608L
-#define ERROR_DS_CANT_MOVE_APP_QUERY_GROUP 8609L
-#define ERROR_DS_ROLE_NOT_VERIFIED 8610L
-#define ERROR_DS_WKO_CONTAINER_CANNOT_BE_SPECIAL 8611L
-#define ERROR_DS_DOMAIN_RENAME_IN_PROGRESS 8612L
-#define ERROR_DS_EXISTING_AD_CHILD_NC 8613L
-#define DNS_ERROR_RCODE_FORMAT_ERROR 9001L
-#define DNS_ERROR_RCODE_SERVER_FAILURE 9002L
-#define DNS_ERROR_RCODE_NAME_ERROR 9003L
-#define DNS_ERROR_RCODE_NOT_IMPLEMENTED 9004L
-#define DNS_ERROR_RCODE_REFUSED 9005L
-#define DNS_ERROR_RCODE_YXDOMAIN 9006L
-#define DNS_ERROR_RCODE_YXRRSET 9007L
-#define DNS_ERROR_RCODE_NXRRSET 9008L
-#define DNS_ERROR_RCODE_NOTAUTH 9009L
-#define DNS_ERROR_RCODE_NOTZONE 9010L
-#define DNS_ERROR_RCODE_BADSIG 9016L
-#define DNS_ERROR_RCODE_BADKEY 9017L
-#define DNS_ERROR_RCODE_BADTIME 9018L
-#define DNS_INFO_NO_RECORDS 9501L
-#define DNS_ERROR_BAD_PACKET 9502L
-#define DNS_ERROR_NO_PACKET 9503L
-#define DNS_ERROR_RCODE 9504L
-#define DNS_ERROR_UNSECURE_PACKET 9505L
-#define DNS_ERROR_INVALID_TYPE 9551L
-#define DNS_ERROR_INVALID_IP_ADDRESS 9552L
-#define DNS_ERROR_INVALID_PROPERTY 9553L
-#define DNS_ERROR_TRY_AGAIN_LATER 9554L
-#define DNS_ERROR_NOT_UNIQUE 9555L
-#define DNS_ERROR_NON_RFC_NAME 9556L
-#define DNS_STATUS_FQDN 9557L
-#define DNS_STATUS_DOTTED_NAME 9558L
-#define DNS_STATUS_SINGLE_PART_NAME 9559L
-#define DNS_ERROR_INVALID_NAME_CHAR 9560L
-#define DNS_ERROR_NUMERIC_NAME 9561L
-#define DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER 9562L
-#define DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION 9563L
-#define DNS_ERROR_CANNOT_FIND_ROOT_HINTS 9564L
-#define DNS_ERROR_INCONSISTENT_ROOT_HINTS 9565L
-#define DNS_ERROR_ZONE_DOES_NOT_EXIST 9601L
-#define DNS_ERROR_NO_ZONE_INFO 9602L
-#define DNS_ERROR_INVALID_ZONE_OPERATION 9603L
-#define DNS_ERROR_ZONE_CONFIGURATION_ERROR 9604L
-#define DNS_ERROR_ZONE_HAS_NO_SOA_RECORD 9605L
-#define DNS_ERROR_ZONE_HAS_NO_NS_RECORDS 9606L
-#define DNS_ERROR_ZONE_LOCKED 9607L
-#define DNS_ERROR_ZONE_CREATION_FAILED 9608L
-#define DNS_ERROR_ZONE_ALREADY_EXISTS 9609L
-#define DNS_ERROR_AUTOZONE_ALREADY_EXISTS 9610L
-#define DNS_ERROR_INVALID_ZONE_TYPE 9611L
-#define DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP 9612L
-#define DNS_ERROR_ZONE_NOT_SECONDARY 9613L
-#define DNS_ERROR_NEED_SECONDARY_ADDRESSES 9614L
-#define DNS_ERROR_WINS_INIT_FAILED 9615L
-#define DNS_ERROR_NEED_WINS_SERVERS 9616L
-#define DNS_ERROR_NBSTAT_INIT_FAILED 9617L
-#define DNS_ERROR_SOA_DELETE_INVALID 9618L
-#define DNS_ERROR_FORWARDER_ALREADY_EXISTS 9619L
-#define DNS_ERROR_ZONE_REQUIRES_MASTER_IP 9620L
-#define DNS_ERROR_ZONE_IS_SHUTDOWN 9621L
-#define DNS_ERROR_PRIMARY_REQUIRES_DATAFILE 9651L
-#define DNS_ERROR_INVALID_DATAFILE_NAME 9652L
-#define DNS_ERROR_DATAFILE_OPEN_FAILURE 9653L
-#define DNS_ERROR_FILE_WRITEBACK_FAILED 9654L
-#define DNS_ERROR_DATAFILE_PARSING 9655L
-#define DNS_ERROR_RECORD_DOES_NOT_EXIST 9701L
-#define DNS_ERROR_RECORD_FORMAT 9702L
-#define DNS_ERROR_NODE_CREATION_FAILED 9703L
-#define DNS_ERROR_UNKNOWN_RECORD_TYPE 9704L
-#define DNS_ERROR_RECORD_TIMED_OUT 9705L
-#define DNS_ERROR_NAME_NOT_IN_ZONE 9706L
-#define DNS_ERROR_CNAME_LOOP 9707L
-#define DNS_ERROR_NODE_IS_CNAME 9708L
-#define DNS_ERROR_CNAME_COLLISION 9709L
-#define DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT 9710L
-#define DNS_ERROR_RECORD_ALREADY_EXISTS 9711L
-#define DNS_ERROR_SECONDARY_DATA 9712L
-#define DNS_ERROR_NO_CREATE_CACHE_DATA 9713L
-#define DNS_ERROR_NAME_DOES_NOT_EXIST 9714L
-#define DNS_WARNING_PTR_CREATE_FAILED 9715L
-#define DNS_WARNING_DOMAIN_UNDELETED 9716L
-#define DNS_ERROR_DS_UNAVAILABLE 9717L
-#define DNS_ERROR_DS_ZONE_ALREADY_EXISTS 9718L
-#define DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE 9719L
-#define DNS_INFO_AXFR_COMPLETE 9751L
-#define DNS_ERROR_AXFR 9752L
-#define DNS_INFO_ADDED_LOCAL_WINS 9753L
-#define DNS_STATUS_CONTINUE_NEEDED 9801L
-#define DNS_ERROR_NO_TCPIP 9851L
-#define DNS_ERROR_NO_DNS_SERVERS 9852L
-#define DNS_ERROR_DP_DOES_NOT_EXIST 9901L
-#define DNS_ERROR_DP_ALREADY_EXISTS 9902L
-#define DNS_ERROR_DP_NOT_ENLISTED 9903L
-#define DNS_ERROR_DP_ALREADY_ENLISTED 9904L
-#define DNS_ERROR_DP_NOT_AVAILABLE 9905L
-
-#ifndef WSABASEERR
-#define WSABASEERR 10000
-#define WSAEINTR 10004L
-#define WSAEBADF 10009L
-#define WSAEACCES 10013L
-#define WSAEFAULT 10014L
-#define WSAEINVAL 10022L
-#define WSAEMFILE 10024L
-#define WSAEWOULDBLOCK 10035L
-#define WSAEINPROGRESS 10036L
-#define WSAEALREADY 10037L
-#define WSAENOTSOCK 10038L
-#define WSAEDESTADDRREQ 10039L
-#define WSAEMSGSIZE 10040L
-#define WSAEPROTOTYPE 10041L
-#define WSAENOPROTOOPT 10042L
-#define WSAEPROTONOSUPPORT 10043L
-#define WSAESOCKTNOSUPPORT 10044L
-#define WSAEOPNOTSUPP 10045L
-#define WSAEPFNOSUPPORT 10046L
-#define WSAEAFNOSUPPORT 10047L
-#define WSAEADDRINUSE 10048L
-#define WSAEADDRNOTAVAIL 10049L
-#define WSAENETDOWN 10050L
-#define WSAENETUNREACH 10051L
-#define WSAENETRESET 10052L
-#define WSAECONNABORTED 10053L
-#define WSAECONNRESET 10054L
-#define WSAENOBUFS 10055L
-#define WSAEISCONN 10056L
-#define WSAENOTCONN 10057L
-#define WSAESHUTDOWN 10058L
-#define WSAETOOMANYREFS 10059L
-#define WSAETIMEDOUT 10060L
-#define WSAECONNREFUSED 10061L
-#define WSAELOOP 10062L
-#define WSAENAMETOOLONG 10063L
-#define WSAEHOSTDOWN 10064L
-#define WSAEHOSTUNREACH 10065L
-#define WSAENOTEMPTY 10066L
-#define WSAEPROCLIM 10067L
-#define WSAEUSERS 10068L
-#define WSAEDQUOT 10069L
-#define WSAESTALE 10070L
-#define WSAEREMOTE 10071L
-#define WSASYSNOTREADY 10091L
-#define WSAVERNOTSUPPORTED 10092L
-#define WSANOTINITIALISED 10093L
-#define WSAEDISCON 10101L
-#define WSAENOMORE 10102L
-#define WSAECANCELLED 10103L
-#define WSAEINVALIDPROCTABLE 10104L
-#define WSAEINVALIDPROVIDER 10105L
-#define WSAEPROVIDERFAILEDINIT 10106L
-#define WSASYSCALLFAILURE 10107L
-#define WSASERVICE_NOT_FOUND 10108L
-#define WSATYPE_NOT_FOUND 10109L
-#define WSA_E_NO_MORE 10110L
-#define WSA_E_CANCELLED 10111L
-#define WSAEREFUSED 10112L
-#define WSAHOST_NOT_FOUND 11001L
-#define WSATRY_AGAIN 11002L
-#define WSANO_RECOVERY 11003L
-#define WSANO_DATA 11004L
-#define WSA_QOS_RECEIVERS 11005L
-#define WSA_QOS_SENDERS 11006L
-#define WSA_QOS_NO_SENDERS 11007L
-#define WSA_QOS_NO_RECEIVERS 11008L
-#define WSA_QOS_REQUEST_CONFIRMED 11009L
-#define WSA_QOS_ADMISSION_FAILURE 11010L
-#define WSA_QOS_POLICY_FAILURE 11011L
-#define WSA_QOS_BAD_STYLE 11012L
-#define WSA_QOS_BAD_OBJECT 11013L
-#define WSA_QOS_TRAFFIC_CTRL_ERROR 11014L
-#define WSA_QOS_GENERIC_ERROR 11015L
-#define WSA_QOS_ESERVICETYPE 11016L
-#define WSA_QOS_EFLOWSPEC 11017L
-#define WSA_QOS_EPROVSPECBUF 11018L
-#define WSA_QOS_EFILTERSTYLE 11019L
-#define WSA_QOS_EFILTERTYPE 11020L
-#define WSA_QOS_EFILTERCOUNT 11021L
-#define WSA_QOS_EOBJLENGTH 11022L
-#define WSA_QOS_EFLOWCOUNT 11023L
-#define WSA_QOS_EUNKNOWNPSOBJ 11024L
-#define WSA_QOS_EPOLICYOBJ 11025L
-#define WSA_QOS_EFLOWDESC 11026L
-#define WSA_QOS_EPSFLOWSPEC 11027L
-#define WSA_QOS_EPSFILTERSPEC 11028L
-#define WSA_QOS_ESDMODEOBJ 11029L
-#define WSA_QOS_ESHAPERATEOBJ 11030L
-#define WSA_QOS_RESERVED_PETYPE 11031L
-#endif /* !WSABASEERR */
-
-#define ERROR_IPSEC_QM_POLICY_EXISTS 13000L
-#define ERROR_IPSEC_QM_POLICY_NOT_FOUND 13001L
-#define ERROR_IPSEC_QM_POLICY_IN_USE 13002L
-#define ERROR_IPSEC_MM_POLICY_EXISTS 13003L
-#define ERROR_IPSEC_MM_POLICY_NOT_FOUND 13004L
-#define ERROR_IPSEC_MM_POLICY_IN_USE 13005L
-#define ERROR_IPSEC_MM_FILTER_EXISTS 13006L
-#define ERROR_IPSEC_MM_FILTER_NOT_FOUND 13007L
-#define ERROR_IPSEC_TRANSPORT_FILTER_EXISTS 13008L
-#define ERROR_IPSEC_TRANSPORT_FILTER_NOT_FOUND 13009L
-#define ERROR_IPSEC_MM_AUTH_EXISTS 13010L
-#define ERROR_IPSEC_MM_AUTH_NOT_FOUND 13011L
-#define ERROR_IPSEC_MM_AUTH_IN_USE 13012L
-#define ERROR_IPSEC_DEFAULT_MM_POLICY_NOT_FOUND 13013L
-#define ERROR_IPSEC_DEFAULT_MM_AUTH_NOT_FOUND 13014L
-#define ERROR_IPSEC_DEFAULT_QM_POLICY_NOT_FOUND 13015L
-#define ERROR_IPSEC_TUNNEL_FILTER_EXISTS 13016L
-#define ERROR_IPSEC_TUNNEL_FILTER_NOT_FOUND 13017L
-#define ERROR_IPSEC_MM_FILTER_PENDING_DELETION 13018L
-#define ERROR_IPSEC_TRANSPORT_FILTER_PENDING_DELETION 13019L
-#define ERROR_IPSEC_TUNNEL_FILTER_PENDING_DELETION 13020L
-#define ERROR_IPSEC_MM_POLICY_PENDING_DELETION 13021L
-#define ERROR_IPSEC_MM_AUTH_PENDING_DELETION 13022L
-#define ERROR_IPSEC_QM_POLICY_PENDING_DELETION 13023L
-#define WARNING_IPSEC_MM_POLICY_PRUNED 13024L
-#define WARNING_IPSEC_QM_POLICY_PRUNED 13025L
-#define ERROR_IPSEC_IKE_AUTH_FAIL 13801L
-#define ERROR_IPSEC_IKE_ATTRIB_FAIL 13802L
-#define ERROR_IPSEC_IKE_NEGOTIATION_PENDING 13803L
-#define ERROR_IPSEC_IKE_GENERAL_PROCESSING_ERROR 13804L
-#define ERROR_IPSEC_IKE_TIMED_OUT 13805L
-#define ERROR_IPSEC_IKE_NO_CERT 13806L
-#define ERROR_IPSEC_IKE_SA_DELETED 13807L
-#define ERROR_IPSEC_IKE_SA_REAPED 13808L
-#define ERROR_IPSEC_IKE_MM_ACQUIRE_DROP 13809L
-#define ERROR_IPSEC_IKE_QM_ACQUIRE_DROP 13810L
-#define ERROR_IPSEC_IKE_QUEUE_DROP_MM 13811L
-#define ERROR_IPSEC_IKE_QUEUE_DROP_NO_MM 13812L
-#define ERROR_IPSEC_IKE_DROP_NO_RESPONSE 13813L
-#define ERROR_IPSEC_IKE_MM_DELAY_DROP 13814L
-#define ERROR_IPSEC_IKE_QM_DELAY_DROP 13815L
-#define ERROR_IPSEC_IKE_ERROR 13816L
-#define ERROR_IPSEC_IKE_CRL_FAILED 13817L
-#define ERROR_IPSEC_IKE_INVALID_KEY_USAGE 13818L
-#define ERROR_IPSEC_IKE_INVALID_CERT_TYPE 13819L
-#define ERROR_IPSEC_IKE_NO_PRIVATE_KEY 13820L
-#define ERROR_IPSEC_IKE_DH_FAIL 13822L
-#define ERROR_IPSEC_IKE_INVALID_HEADER 13824L
-#define ERROR_IPSEC_IKE_NO_POLICY 13825L
-#define ERROR_IPSEC_IKE_INVALID_SIGNATURE 13826L
-#define ERROR_IPSEC_IKE_KERBEROS_ERROR 13827L
-#define ERROR_IPSEC_IKE_NO_PUBLIC_KEY 13828L
-#define ERROR_IPSEC_IKE_PROCESS_ERR 13829L
-#define ERROR_IPSEC_IKE_PROCESS_ERR_SA 13830L
-#define ERROR_IPSEC_IKE_PROCESS_ERR_PROP 13831L
-#define ERROR_IPSEC_IKE_PROCESS_ERR_TRANS 13832L
-#define ERROR_IPSEC_IKE_PROCESS_ERR_KE 13833L
-#define ERROR_IPSEC_IKE_PROCESS_ERR_ID 13834L
-#define ERROR_IPSEC_IKE_PROCESS_ERR_CERT 13835L
-#define ERROR_IPSEC_IKE_PROCESS_ERR_CERT_REQ 13836L
-#define ERROR_IPSEC_IKE_PROCESS_ERR_HASH 13837L
-#define ERROR_IPSEC_IKE_PROCESS_ERR_SIG 13838L
-#define ERROR_IPSEC_IKE_PROCESS_ERR_NONCE 13839L
-#define ERROR_IPSEC_IKE_PROCESS_ERR_NOTIFY 13840L
-#define ERROR_IPSEC_IKE_PROCESS_ERR_DELETE 13841L
-#define ERROR_IPSEC_IKE_PROCESS_ERR_VENDOR 13842L
-#define ERROR_IPSEC_IKE_INVALID_PAYLOAD 13843L
-#define ERROR_IPSEC_IKE_LOAD_SOFT_SA 13844L
-#define ERROR_IPSEC_IKE_SOFT_SA_TORN_DOWN 13845L
-#define ERROR_IPSEC_IKE_INVALID_COOKIE 13846L
-#define ERROR_IPSEC_IKE_NO_PEER_CERT 13847L
-#define ERROR_IPSEC_IKE_PEER_CRL_FAILED 13848L
-#define ERROR_IPSEC_IKE_POLICY_CHANGE 13849L
-#define ERROR_IPSEC_IKE_NO_MM_POLICY 13850L
-#define ERROR_IPSEC_IKE_NOTCBPRIV 13851L
-#define ERROR_IPSEC_IKE_SECLOADFAIL 13852L
-#define ERROR_IPSEC_IKE_FAILSSPINIT 13853L
-#define ERROR_IPSEC_IKE_FAILQUERYSSP 13854L
-#define ERROR_IPSEC_IKE_SRVACQFAIL 13855L
-#define ERROR_IPSEC_IKE_SRVQUERYCRED 13856L
-#define ERROR_IPSEC_IKE_GETSPIFAIL 13857L
-#define ERROR_IPSEC_IKE_INVALID_FILTER 13858L
-#define ERROR_IPSEC_IKE_OUT_OF_MEMORY 13859L
-#define ERROR_IPSEC_IKE_ADD_UPDATE_KEY_FAILED 13860L
-#define ERROR_IPSEC_IKE_INVALID_POLICY 13861L
-#define ERROR_IPSEC_IKE_UNKNOWN_DOI 13862L
-#define ERROR_IPSEC_IKE_INVALID_SITUATION 13863L
-#define ERROR_IPSEC_IKE_DH_FAILURE 13864L
-#define ERROR_IPSEC_IKE_INVALID_GROUP 13865L
-#define ERROR_IPSEC_IKE_ENCRYPT 13866L
-#define ERROR_IPSEC_IKE_DECRYPT 13867L
-#define ERROR_IPSEC_IKE_POLICY_MATCH 13868L
-#define ERROR_IPSEC_IKE_UNSUPPORTED_ID 13869L
-#define ERROR_IPSEC_IKE_INVALID_HASH 13870L
-#define ERROR_IPSEC_IKE_INVALID_HASH_ALG 13871L
-#define ERROR_IPSEC_IKE_INVALID_HASH_SIZE 13872L
-#define ERROR_IPSEC_IKE_INVALID_ENCRYPT_ALG 13873L
-#define ERROR_IPSEC_IKE_INVALID_AUTH_ALG 13874L
-#define ERROR_IPSEC_IKE_INVALID_SIG 13875L
-#define ERROR_IPSEC_IKE_LOAD_FAILED 13876L
-#define ERROR_IPSEC_IKE_RPC_DELETE 13877L
-#define ERROR_IPSEC_IKE_BENIGN_REINIT 13878L
-#define ERROR_IPSEC_IKE_INVALID_RESPONDER_LIFETIME_NOTIFY 13879L
-#define ERROR_IPSEC_IKE_INVALID_CERT_KEYLEN 13881L
-#define ERROR_IPSEC_IKE_MM_LIMIT 13882L
-#define ERROR_IPSEC_IKE_NEGOTIATION_DISABLED 13883L
-#define ERROR_IPSEC_IKE_NEG_STATUS_END 13884L
-
-#define ERROR_SXS_SECTION_NOT_FOUND 14000L
-#define ERROR_SXS_CANT_GEN_ACTCTX 14001L
-#define ERROR_SXS_INVALID_ACTCTXDATA_FORMAT 14002L
-#define ERROR_SXS_ASSEMBLY_NOT_FOUND 14003L
-#define ERROR_SXS_MANIFEST_FORMAT_ERROR 14004L
-#define ERROR_SXS_MANIFEST_PARSE_ERROR 14005L
-#define ERROR_SXS_ACTIVATION_CONTEXT_DISABLED 14006L
-#define ERROR_SXS_KEY_NOT_FOUND 14007L
-#define ERROR_SXS_VERSION_CONFLICT 14008L
-#define ERROR_SXS_WRONG_SECTION_TYPE 14009L
-#define ERROR_SXS_THREAD_QUERIES_DISABLED 14010L
-#define ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET 14011L
-#define ERROR_SXS_UNKNOWN_ENCODING_GROUP 14012L
-#define ERROR_SXS_UNKNOWN_ENCODING 14013L
-#define ERROR_SXS_INVALID_XML_NAMESPACE_URI 14014L
-#define ERROR_SXS_ROOT_MANIFEST_DEPENDENCY_NOT_INSTALLED 14015L
-#define ERROR_SXS_LEAF_MANIFEST_DEPENDENCY_NOT_INSTALLED 14016L
-#define ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE 14017L
-#define ERROR_SXS_MANIFEST_MISSING_REQUIRED_DEFAULT_NAMESPACE 14018L
-#define ERROR_SXS_MANIFEST_INVALID_REQUIRED_DEFAULT_NAMESPACE 14019L
-#define ERROR_SXS_PRIVATE_MANIFEST_CROSS_PATH_WITH_REPARSE_POINT 14020L
-#define ERROR_SXS_DUPLICATE_DLL_NAME 14021L
-#define ERROR_SXS_DUPLICATE_WINDOWCLASS_NAME 14022L
-#define ERROR_SXS_DUPLICATE_CLSID 14023L
-#define ERROR_SXS_DUPLICATE_IID 14024L
-#define ERROR_SXS_DUPLICATE_TLBID 14025L
-#define ERROR_SXS_DUPLICATE_PROGID 14026L
-#define ERROR_SXS_DUPLICATE_ASSEMBLY_NAME 14027L
-#define ERROR_SXS_FILE_HASH_MISMATCH 14028L
-#define ERROR_SXS_POLICY_PARSE_ERROR 14029L
-#define ERROR_SXS_XML_E_MISSINGQUOTE 14030L
-#define ERROR_SXS_XML_E_COMMENTSYNTAX 14031L
-#define ERROR_SXS_XML_E_BADSTARTNAMECHAR 14032L
-#define ERROR_SXS_XML_E_BADNAMECHAR 14033L
-#define ERROR_SXS_XML_E_BADCHARINSTRING 14034L
-#define ERROR_SXS_XML_E_XMLDECLSYNTAX 14035L
-#define ERROR_SXS_XML_E_BADCHARDATA 14036L
-#define ERROR_SXS_XML_E_MISSINGWHITESPACE 14037L
-#define ERROR_SXS_XML_E_EXPECTINGTAGEND 14038L
-#define ERROR_SXS_XML_E_MISSINGSEMICOLON 14039L
-#define ERROR_SXS_XML_E_UNBALANCEDPAREN 14040L
-#define ERROR_SXS_XML_E_INTERNALERROR 14041L
-#define ERROR_SXS_XML_E_UNEXPECTED_WHITESPACE 14042L
-#define ERROR_SXS_XML_E_INCOMPLETE_ENCODING 14043L
-#define ERROR_SXS_XML_E_MISSING_PAREN 14044L
-#define ERROR_SXS_XML_E_EXPECTINGCLOSEQUOTE 14045L
-#define ERROR_SXS_XML_E_MULTIPLE_COLONS 14046L
-#define ERROR_SXS_XML_E_INVALID_DECIMAL 14047L
-#define ERROR_SXS_XML_E_INVALID_HEXIDECIMAL 14048L
-#define ERROR_SXS_XML_E_INVALID_UNICODE 14049L
-#define ERROR_SXS_XML_E_WHITESPACEORQUESTIONMARK 14050L
-#define ERROR_SXS_XML_E_UNEXPECTEDENDTAG 14051L
-#define ERROR_SXS_XML_E_UNCLOSEDTAG 14052L
-#define ERROR_SXS_XML_E_DUPLICATEATTRIBUTE 14053L
-#define ERROR_SXS_XML_E_MULTIPLEROOTS 14054L
-#define ERROR_SXS_XML_E_INVALIDATROOTLEVEL 14055L
-#define ERROR_SXS_XML_E_BADXMLDECL 14056L
-#define ERROR_SXS_XML_E_MISSINGROOT 14057L
-#define ERROR_SXS_XML_E_UNEXPECTEDEOF 14058L
-#define ERROR_SXS_XML_E_BADPEREFINSUBSET 14059L
-#define ERROR_SXS_XML_E_UNCLOSEDSTARTTAG 14060L
-#define ERROR_SXS_XML_E_UNCLOSEDENDTAG 14061L
-#define ERROR_SXS_XML_E_UNCLOSEDSTRING 14062L
-#define ERROR_SXS_XML_E_UNCLOSEDCOMMENT 14063L
-#define ERROR_SXS_XML_E_UNCLOSEDDECL 14064L
-#define ERROR_SXS_XML_E_UNCLOSEDCDATA 14065L
-#define ERROR_SXS_XML_E_RESERVEDNAMESPACE 14066L
-#define ERROR_SXS_XML_E_INVALIDENCODING 14067L
-#define ERROR_SXS_XML_E_INVALIDSWITCH 14068L
-#define ERROR_SXS_XML_E_BADXMLCASE 14069L
-#define ERROR_SXS_XML_E_INVALID_STANDALONE 14070L
-#define ERROR_SXS_XML_E_UNEXPECTED_STANDALONE 14071L
-#define ERROR_SXS_XML_E_INVALID_VERSION 14072L
-#define ERROR_SXS_XML_E_MISSINGEQUALS 14073L
-#define ERROR_SXS_PROTECTION_RECOVERY_FAILED 14074L
-#define ERROR_SXS_PROTECTION_PUBLIC_KEY_TOO_SHORT 14075L
-#define ERROR_SXS_PROTECTION_CATALOG_NOT_VALID 14076L
-#define ERROR_SXS_UNTRANSLATABLE_HRESULT 14077L
-#define ERROR_SXS_PROTECTION_CATALOG_FILE_MISSING 14078L
-#define ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE 14079L
-#define ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME 14080L
-
-//Crypto realted errors
-#define CRYPT_E_NOT_FOUND _HRESULT_TYPEDEF_(0x80092004L)
-#define CRYPT_E_EXISTS _HRESULT_TYPEDEF_(0x80092005L)
-#define CRYPT_E_NO_PROVIDER _HRESULT_TYPEDEF_(0x80092006L)
-#define CRYPT_E_SELF_SIGNED _HRESULT_TYPEDEF_(0x80092007L)
-#define CRYPT_E_DELETED_PREV _HRESULT_TYPEDEF_(0x80092008L)
-#define CRYPT_E_NO_MATCH _HRESULT_TYPEDEF_(0x80092009L)
-#define CRYPT_E_UNEXPECTED_MSG_TYPE _HRESULT_TYPEDEF_(0x8009200AL)
-#define CRYPT_E_NO_KEY_PROPERTY _HRESULT_TYPEDEF_(0x8009200BL)
-#define CRYPT_E_NO_DECRYPT_CERT _HRESULT_TYPEDEF_(0x8009200CL)
-#define CRYPT_E_BAD_MSG _HRESULT_TYPEDEF_(0x8009200DL)
-#define CRYPT_E_NO_SIGNER _HRESULT_TYPEDEF_(0x8009200EL)
-#define CRYPT_E_PENDING_CLOSE _HRESULT_TYPEDEF_(0x8009200FL)
-#define CRYPT_E_REVOKED _HRESULT_TYPEDEF_(0x80092010L)
-#define CRYPT_E_NO_REVOCATION_DLL _HRESULT_TYPEDEF_(0x80092011L)
-#define CRYPT_E_NO_REVOCATION_CHECK _HRESULT_TYPEDEF_(0x80092012L)
-
-#define SEVERITY_SUCCESS 0
-#define SEVERITY_ERROR 1
-#define FACILITY_WINDOWS 8
-#define FACILITY_STORAGE 3
-#define FACILITY_RPC 1
-#define FACILITY_WIN32 7
-#define FACILITY_CONTROL 10
-#define FACILITY_NULL 0
-#define FACILITY_ITF 4
-#define FACILITY_DISPATCH 2
-#define SUCCEEDED(Status) ((HRESULT)(Status) >= 0)
-#define FAILED(Status) ((HRESULT)(Status)<0)
-#define IS_ERROR(Status) ((unsigned long)(Status) >> 31 == SEVERITY_ERROR)
-#define HRESULT_CODE(r) ((r)&0xFFFF)
-#define SCODE_CODE(c) ((c)&0xFFFF)
-#define HRESULT_FACILITY(r) (((r)>>16)&0x1fff)
-#define SCODE_FACILITY(c) (((c)>>16)&0x1fff)
-#define HRESULT_SEVERITY(r) (((r)>>31)&0x1)
-#define SCODE_SEVERITY(c) (((c)>>31)&0x1)
-#define MAKE_HRESULT(s,f,c) ((HRESULT)(((unsigned long)(s)<<31)|((unsigned long)(f)<<16)|((unsigned long)(c))))
-#define MAKE_SCODE(s,f,c) ((SCODE)(((unsigned long)(s)<<31)|((unsigned long)(f)<<16)|((unsigned long)(c))) )
-#define FACILITY_NT_BIT 0x10000000
-#define HRESULT_FROM_WIN32(x) (x?((HRESULT)(((x)&0x0000FFFF)|(FACILITY_WIN32<<16)|0x80000000)):0)
-#define HRESULT_FROM_NT(x) ((HRESULT)((x)|FACILITY_NT_BIT))
-#define GetScode(hr) ((SCODE) (hr))
-#define ResultFromScode(sc) ((HRESULT) (sc))
-#define PropagateResult(hrPrevious, scBase) ((HRESULT) scBase)
-
-#define NOERROR S_OK
-#define E_UNEXPECTED ((HRESULT)0x8000FFFFL)
-#define E_NOTIMPL ((HRESULT)0x80004001L)
-#define E_OUTOFMEMORY ((HRESULT)0x8007000EL)
-#define E_INVALIDARG ((HRESULT)0x80070057L)
-#define E_NOINTERFACE ((HRESULT)0x80004002L)
-#define E_POINTER ((HRESULT)0x80004003L)
-#define E_HANDLE ((HRESULT)0x80070006L)
-#define E_ABORT ((HRESULT)0x80004004L)
-#define E_FAIL ((HRESULT)0x80004005L)
-#define E_ACCESSDENIED ((HRESULT)0x80070005L)
-#define E_PENDING ((HRESULT)0x8000000AL)
-#define CO_E_INIT_TLS ((HRESULT)0x80004006L)
-#define CO_E_INIT_SHARED_ALLOCATOR ((HRESULT)0x80004007L)
-#define CO_E_INIT_MEMORY_ALLOCATOR ((HRESULT)0x80004008L)
-#define CO_E_INIT_CLASS_CACHE ((HRESULT)0x80004009L)
-#define CO_E_INIT_RPC_CHANNEL ((HRESULT)0x8000400AL)
-#define CO_E_INIT_TLS_SET_CHANNEL_CONTROL ((HRESULT)0x8000400BL)
-#define CO_E_INIT_TLS_CHANNEL_CONTROL ((HRESULT)0x8000400CL)
-#define CO_E_INIT_UNACCEPTED_USER_ALLOCATOR ((HRESULT)0x8000400DL)
-#define CO_E_INIT_SCM_MUTEX_EXISTS ((HRESULT)0x8000400EL)
-#define CO_E_INIT_SCM_FILE_MAPPING_EXISTS ((HRESULT)0x8000400FL)
-#define CO_E_INIT_SCM_MAP_VIEW_OF_FILE ((HRESULT)0x80004010L)
-#define CO_E_INIT_SCM_EXEC_FAILURE ((HRESULT)0x80004011L)
-#define CO_E_INIT_ONLY_SINGLE_THREADED ((HRESULT)0x80004012L)
-#define S_OK ((HRESULT)0x00000000L)
-#define S_FALSE ((HRESULT)0x00000001L)
-#define OLE_E_FIRST ((HRESULT)0x80040000L)
-#define OLE_E_LAST ((HRESULT)0x800400FFL)
-#define OLE_S_FIRST ((HRESULT)0x00040000L)
-#define OLE_S_LAST ((HRESULT)0x000400FFL)
-#define OLE_E_OLEVERB ((HRESULT)0x80040000L)
-#define OLE_E_ADVF ((HRESULT)0x80040001L)
-#define OLE_E_ENUM_NOMORE ((HRESULT)0x80040002L)
-#define OLE_E_ADVISENOTSUPPORTED ((HRESULT)0x80040003L)
-#define OLE_E_NOCONNECTION ((HRESULT)0x80040004L)
-#define OLE_E_NOTRUNNING ((HRESULT)0x80040005L)
-#define OLE_E_NOCACHE ((HRESULT)0x80040006L)
-#define OLE_E_BLANK ((HRESULT)0x80040007L)
-#define OLE_E_CLASSDIFF ((HRESULT)0x80040008L)
-#define OLE_E_CANT_GETMONIKER ((HRESULT)0x80040009L)
-#define OLE_E_CANT_BINDTOSOURCE ((HRESULT)0x8004000AL)
-#define OLE_E_STATIC ((HRESULT)0x8004000BL)
-#define OLE_E_PROMPTSAVECANCELLED ((HRESULT)0x8004000CL)
-#define OLE_E_INVALIDRECT ((HRESULT)0x8004000DL)
-#define OLE_E_WRONGCOMPOBJ ((HRESULT)0x8004000EL)
-#define OLE_E_INVALIDHWND ((HRESULT)0x8004000FL)
-#define OLE_E_NOT_INPLACEACTIVE ((HRESULT)0x80040010L)
-#define OLE_E_CANTCONVERT ((HRESULT)0x80040011L)
-#define OLE_E_NOSTORAGE ((HRESULT)0x80040012L)
-#define DV_E_FORMATETC ((HRESULT)0x80040064L)
-#define DV_E_DVTARGETDEVICE ((HRESULT)0x80040065L)
-#define DV_E_STGMEDIUM ((HRESULT)0x80040066L)
-#define DV_E_STATDATA ((HRESULT)0x80040067L)
-#define DV_E_LINDEX ((HRESULT)0x80040068L)
-#define DV_E_TYMED ((HRESULT)0x80040069L)
-#define DV_E_CLIPFORMAT ((HRESULT)0x8004006AL)
-#define DV_E_DVASPECT ((HRESULT)0x8004006BL)
-#define DV_E_DVTARGETDEVICE_SIZE ((HRESULT)0x8004006CL)
-#define DV_E_NOIVIEWOBJECT ((HRESULT)0x8004006DL)
-#define DRAGDROP_E_FIRST ((HRESULT)0x80040100L)
-#define DRAGDROP_E_LAST ((HRESULT)0x8004010FL)
-#define DRAGDROP_S_FIRST ((HRESULT)0x00040100L)
-#define DRAGDROP_S_LAST ((HRESULT)0x0004010FL)
-#define DRAGDROP_E_NOTREGISTERED ((HRESULT)0x80040100L)
-#define DRAGDROP_E_ALREADYREGISTERED ((HRESULT)0x80040101L)
-#define DRAGDROP_E_INVALIDHWND ((HRESULT)0x80040102L)
-#define CLASSFACTORY_E_FIRST ((HRESULT)0x80040110L)
-#define CLASSFACTORY_E_LAST ((HRESULT)0x8004011FL)
-#define CLASSFACTORY_S_FIRST ((HRESULT)0x00040110L)
-#define CLASSFACTORY_S_LAST ((HRESULT)0x0004011FL)
-#define CLASS_E_NOAGGREGATION ((HRESULT)0x80040110L)
-#define CLASS_E_CLASSNOTAVAILABLE ((HRESULT)0x80040111L)
-#define MARSHAL_E_FIRST ((HRESULT)0x80040120L)
-#define MARSHAL_E_LAST ((HRESULT)0x8004012FL)
-#define MARSHAL_S_FIRST ((HRESULT)0x00040120L)
-#define MARSHAL_S_LAST ((HRESULT)0x0004012FL)
-#define DATA_E_FIRST ((HRESULT)0x80040130L)
-#define DATA_E_LAST ((HRESULT)0x8004013FL)
-#define DATA_S_FIRST ((HRESULT)0x00040130L)
-#define DATA_S_LAST ((HRESULT)0x0004013FL)
-#define VIEW_E_FIRST ((HRESULT)0x80040140L)
-#define VIEW_E_LAST ((HRESULT)0x8004014FL)
-#define VIEW_S_FIRST ((HRESULT)0x00040140L)
-#define VIEW_S_LAST ((HRESULT)0x0004014FL)
-#define VIEW_E_DRAW ((HRESULT)0x80040140L)
-#define REGDB_E_FIRST ((HRESULT)0x80040150L)
-#define REGDB_E_LAST ((HRESULT)0x8004015FL)
-#define REGDB_S_FIRST ((HRESULT)0x00040150L)
-#define REGDB_S_LAST ((HRESULT)0x0004015FL)
-#define REGDB_E_READREGDB ((HRESULT)0x80040150L)
-#define REGDB_E_WRITEREGDB ((HRESULT)0x80040151L)
-#define REGDB_E_KEYMISSING ((HRESULT)0x80040152L)
-#define REGDB_E_INVALIDVALUE ((HRESULT)0x80040153L)
-#define REGDB_E_CLASSNOTREG ((HRESULT)0x80040154L)
-#define REGDB_E_IIDNOTREG ((HRESULT)0x80040155L)
-#define CACHE_E_FIRST ((HRESULT)0x80040170L)
-#define CACHE_E_LAST ((HRESULT)0x8004017FL)
-#define CACHE_S_FIRST ((HRESULT)0x00040170L)
-#define CACHE_S_LAST ((HRESULT)0x0004017FL)
-#define CACHE_E_NOCACHE_UPDATED ((HRESULT)0x80040170L)
-#define OLEOBJ_E_FIRST ((HRESULT)0x80040180L)
-#define OLEOBJ_E_LAST ((HRESULT)0x8004018FL)
-#define OLEOBJ_S_FIRST ((HRESULT)0x00040180L)
-#define OLEOBJ_S_LAST ((HRESULT)0x0004018FL)
-#define OLEOBJ_E_NOVERBS ((HRESULT)0x80040180L)
-#define OLEOBJ_E_INVALIDVERB ((HRESULT)0x80040181L)
-#define CLIENTSITE_E_FIRST ((HRESULT)0x80040190L)
-#define CLIENTSITE_E_LAST ((HRESULT)0x8004019FL)
-#define CLIENTSITE_S_FIRST ((HRESULT)0x00040190L)
-#define CLIENTSITE_S_LAST ((HRESULT)0x0004019FL)
-#define INPLACE_E_NOTUNDOABLE ((HRESULT)0x800401A0L)
-#define INPLACE_E_NOTOOLSPACE ((HRESULT)0x800401A1L)
-#define INPLACE_E_FIRST ((HRESULT)0x800401A0L)
-#define INPLACE_E_LAST ((HRESULT)0x800401AFL)
-#define INPLACE_S_FIRST ((HRESULT)0x000401A0L)
-#define INPLACE_S_LAST ((HRESULT)0x000401AFL)
-#define ENUM_E_FIRST ((HRESULT)0x800401B0L)
-#define ENUM_E_LAST ((HRESULT)0x800401BFL)
-#define ENUM_S_FIRST ((HRESULT)0x000401B0L)
-#define ENUM_S_LAST ((HRESULT)0x000401BFL)
-#define CONVERT10_E_FIRST ((HRESULT)0x800401C0L)
-#define CONVERT10_E_LAST ((HRESULT)0x800401CFL)
-#define CONVERT10_S_FIRST ((HRESULT)0x000401C0L)
-#define CONVERT10_S_LAST ((HRESULT)0x000401CFL)
-#define CONVERT10_E_OLESTREAM_GET ((HRESULT)0x800401C0L)
-#define CONVERT10_E_OLESTREAM_PUT ((HRESULT)0x800401C1L)
-#define CONVERT10_E_OLESTREAM_FMT ((HRESULT)0x800401C2L)
-#define CONVERT10_E_OLESTREAM_BITMAP_TO_DIB ((HRESULT)0x800401C3L)
-#define CONVERT10_E_STG_FMT ((HRESULT)0x800401C4L)
-#define CONVERT10_E_STG_NO_STD_STREAM ((HRESULT)0x800401C5L)
-#define CONVERT10_E_STG_DIB_TO_BITMAP ((HRESULT)0x800401C6L)
-#define CLIPBRD_E_FIRST ((HRESULT)0x800401D0L)
-#define CLIPBRD_E_LAST ((HRESULT)0x800401DFL)
-#define CLIPBRD_S_FIRST ((HRESULT)0x000401D0L)
-#define CLIPBRD_S_LAST ((HRESULT)0x000401DFL)
-#define CLIPBRD_E_CANT_OPEN ((HRESULT)0x800401D0L)
-#define CLIPBRD_E_CANT_EMPTY ((HRESULT)0x800401D1L)
-#define CLIPBRD_E_CANT_SET ((HRESULT)0x800401D2L)
-#define CLIPBRD_E_BAD_DATA ((HRESULT)0x800401D3L)
-#define CLIPBRD_E_CANT_CLOSE ((HRESULT)0x800401D4L)
-#define MK_E_FIRST ((HRESULT)0x800401E0L)
-#define MK_E_LAST ((HRESULT)0x800401EFL)
-#define MK_S_FIRST ((HRESULT)0x000401E0L)
-#define MK_S_LAST ((HRESULT)0x000401EFL)
-#define MK_E_CONNECTMANUALLY ((HRESULT)0x800401E0L)
-#define MK_E_EXCEEDEDDEADLINE ((HRESULT)0x800401E1L)
-#define MK_E_NEEDGENERIC ((HRESULT)0x800401E2L)
-#define MK_E_UNAVAILABLE ((HRESULT)0x800401E3L)
-#define MK_E_SYNTAX ((HRESULT)0x800401E4L)
-#define MK_E_NOOBJECT ((HRESULT)0x800401E5L)
-#define MK_E_INVALIDEXTENSION ((HRESULT)0x800401E6L)
-#define MK_E_INTERMEDIATEINTERFACENOTSUPPORTED ((HRESULT)0x800401E7L)
-#define MK_E_NOTBINDABLE ((HRESULT)0x800401E8L)
-#define MK_E_NOTBOUND ((HRESULT)0x800401E9L)
-#define MK_E_CANTOPENFILE ((HRESULT)0x800401EAL)
-#define MK_E_MUSTBOTHERUSER ((HRESULT)0x800401EBL)
-#define MK_E_NOINVERSE ((HRESULT)0x800401ECL)
-#define MK_E_NOSTORAGE ((HRESULT)0x800401EDL)
-#define MK_E_NOPREFIX ((HRESULT)0x800401EEL)
-#define MK_E_ENUMERATION_FAILED ((HRESULT)0x800401EFL)
-#define CO_E_FIRST ((HRESULT)0x800401F0L)
-#define CO_E_LAST ((HRESULT)0x800401FFL)
-#define CO_S_FIRST ((HRESULT)0x000401F0L)
-#define CO_S_LAST ((HRESULT)0x000401FFL)
-#define CO_E_NOTINITIALIZED ((HRESULT)0x800401F0L)
-#define CO_E_ALREADYINITIALIZED ((HRESULT)0x800401F1L)
-#define CO_E_CANTDETERMINECLASS ((HRESULT)0x800401F2L)
-#define CO_E_CLASSSTRING ((HRESULT)0x800401F3L)
-#define CO_E_IIDSTRING ((HRESULT)0x800401F4L)
-#define CO_E_APPNOTFOUND ((HRESULT)0x800401F5L)
-#define CO_E_APPSINGLEUSE ((HRESULT)0x800401F6L)
-#define CO_E_ERRORINAPP ((HRESULT)0x800401F7L)
-#define CO_E_DLLNOTFOUND ((HRESULT)0x800401F8L)
-#define CO_E_ERRORINDLL ((HRESULT)0x800401F9L)
-#define CO_E_WRONGOSFORAPP ((HRESULT)0x800401FAL)
-#define CO_E_OBJNOTREG ((HRESULT)0x800401FBL)
-#define CO_E_OBJISREG ((HRESULT)0x800401FCL)
-#define CO_E_OBJNOTCONNECTED ((HRESULT)0x800401FDL)
-#define CO_E_APPDIDNTREG ((HRESULT)0x800401FEL)
-#define CO_E_RELEASED ((HRESULT)0x800401FFL)
-#define OLE_S_USEREG ((HRESULT)0x00040000L)
-#define OLE_S_STATIC ((HRESULT)0x00040001L)
-#define OLE_S_MAC_CLIPFORMAT ((HRESULT)0x00040002L)
-#define DRAGDROP_S_DROP ((HRESULT)0x00040100L)
-#define DRAGDROP_S_CANCEL ((HRESULT)0x00040101L)
-#define DRAGDROP_S_USEDEFAULTCURSORS ((HRESULT)0x00040102L)
-#define DATA_S_SAMEFORMATETC ((HRESULT)0x00040130L)
-#define VIEW_S_ALREADY_FROZEN ((HRESULT)0x00040140L)
-#define CACHE_S_FORMATETC_NOTSUPPORTED ((HRESULT)0x00040170L)
-#define CACHE_S_SAMECACHE ((HRESULT)0x00040171L)
-#define CACHE_S_SOMECACHES_NOTUPDATED ((HRESULT)0x00040172L)
-#define OLEOBJ_S_INVALIDVERB ((HRESULT)0x00040180L)
-#define OLEOBJ_S_CANNOT_DOVERB_NOW ((HRESULT)0x00040181L)
-#define OLEOBJ_S_INVALIDHWND ((HRESULT)0x00040182L)
-#define INPLACE_S_TRUNCATED ((HRESULT)0x000401A0L)
-#define CONVERT10_S_NO_PRESENTATION ((HRESULT)0x000401C0L)
-#define MK_S_REDUCED_TO_SELF ((HRESULT)0x000401E2L)
-#define MK_S_ME ((HRESULT)0x000401E4L)
-#define MK_S_HIM ((HRESULT)0x000401E5L)
-#define MK_S_US ((HRESULT)0x000401E6L)
-#define MK_S_MONIKERALREADYREGISTERED ((HRESULT)0x000401E7L)
-#define CO_E_CLASS_CREATE_FAILED ((HRESULT)0x80080001L)
-#define CO_E_SCM_ERROR ((HRESULT)0x80080002L)
-#define CO_E_SCM_RPC_FAILURE ((HRESULT)0x80080003L)
-#define CO_E_BAD_PATH ((HRESULT)0x80080004L)
-#define CO_E_SERVER_EXEC_FAILURE ((HRESULT)0x80080005L)
-#define CO_E_OBJSRV_RPC_FAILURE ((HRESULT)0x80080006L)
-#define MK_E_NO_NORMALIZED ((HRESULT)0x80080007L)
-#define CO_E_SERVER_STOPPING ((HRESULT)0x80080008L)
-#define MEM_E_INVALID_ROOT ((HRESULT)0x80080009L)
-#define MEM_E_INVALID_LINK ((HRESULT)0x80080010L)
-#define MEM_E_INVALID_SIZE ((HRESULT)0x80080011L)
-#define CO_S_NOTALLINTERFACES ((HRESULT)0x00080012L)
-#define CO_S_MACHINENAMENOTFOUND ((HRESULT)0x00080013L)
-#define DISP_E_UNKNOWNINTERFACE ((HRESULT)0x80020001L)
-#define DISP_E_MEMBERNOTFOUND ((HRESULT)0x80020003L)
-#define DISP_E_PARAMNOTFOUND ((HRESULT)0x80020004L)
-#define DISP_E_TYPEMISMATCH ((HRESULT)0x80020005L)
-#define DISP_E_UNKNOWNNAME ((HRESULT)0x80020006L)
-#define DISP_E_NONAMEDARGS ((HRESULT)0x80020007L)
-#define DISP_E_BADVARTYPE ((HRESULT)0x80020008L)
-#define DISP_E_EXCEPTION ((HRESULT)0x80020009L)
-#define DISP_E_OVERFLOW ((HRESULT)0x8002000AL)
-#define DISP_E_BADINDEX ((HRESULT)0x8002000BL)
-#define DISP_E_UNKNOWNLCID ((HRESULT)0x8002000CL)
-#define DISP_E_ARRAYISLOCKED ((HRESULT)0x8002000DL)
-#define DISP_E_BADPARAMCOUNT ((HRESULT)0x8002000EL)
-#define DISP_E_PARAMNOTOPTIONAL ((HRESULT)0x8002000FL)
-#define DISP_E_BADCALLEE ((HRESULT)0x80020010L)
-#define DISP_E_NOTACOLLECTION ((HRESULT)0x80020011L)
-#define DISP_E_DIVBYZERO ((HRESULT)0x80020012L)
-#define TYPE_E_BUFFERTOOSMALL ((HRESULT)0x80028016L)
-#define TYPE_E_INVDATAREAD ((HRESULT)0x80028018L)
-#define TYPE_E_UNSUPFORMAT ((HRESULT)0x80028019L)
-#define TYPE_E_REGISTRYACCESS ((HRESULT)0x8002801CL)
-#define TYPE_E_LIBNOTREGISTERED ((HRESULT)0x8002801DL)
-#define TYPE_E_UNDEFINEDTYPE ((HRESULT)0x80028027L)
-#define TYPE_E_QUALIFIEDNAMEDISALLOWED ((HRESULT)0x80028028L)
-#define TYPE_E_INVALIDSTATE ((HRESULT)0x80028029L)
-#define TYPE_E_WRONGTYPEKIND ((HRESULT)0x8002802AL)
-#define TYPE_E_ELEMENTNOTFOUND ((HRESULT)0x8002802BL)
-#define TYPE_E_AMBIGUOUSNAME ((HRESULT)0x8002802CL)
-#define TYPE_E_NAMECONFLICT ((HRESULT)0x8002802DL)
-#define TYPE_E_UNKNOWNLCID ((HRESULT)0x8002802EL)
-#define TYPE_E_DLLFUNCTIONNOTFOUND ((HRESULT)0x8002802FL)
-#define TYPE_E_BADMODULEKIND ((HRESULT)0x800288BDL)
-#define TYPE_E_SIZETOOBIG ((HRESULT)0x800288C5L)
-#define TYPE_E_DUPLICATEID ((HRESULT)0x800288C6L)
-#define TYPE_E_INVALIDID ((HRESULT)0x800288CFL)
-#define TYPE_E_TYPEMISMATCH ((HRESULT)0x80028CA0L)
-#define TYPE_E_OUTOFBOUNDS ((HRESULT)0x80028CA1L)
-#define TYPE_E_IOERROR ((HRESULT)0x80028CA2L)
-#define TYPE_E_CANTCREATETMPFILE ((HRESULT)0x80028CA3L)
-#define TYPE_E_CANTLOADLIBRARY ((HRESULT)0x80029C4AL)
-#define TYPE_E_INCONSISTENTPROPFUNCS ((HRESULT)0x80029C83L)
-#define TYPE_E_CIRCULARTYPE ((HRESULT)0x80029C84L)
-#define STG_E_INVALIDFUNCTION ((HRESULT)0x80030001L)
-#define STG_E_FILENOTFOUND ((HRESULT)0x80030002L)
-#define STG_E_PATHNOTFOUND ((HRESULT)0x80030003L)
-#define STG_E_TOOMANYOPENFILES ((HRESULT)0x80030004L)
-#define STG_E_ACCESSDENIED ((HRESULT)0x80030005L)
-#define STG_E_INVALIDHANDLE ((HRESULT)0x80030006L)
-#define STG_E_INSUFFICIENTMEMORY ((HRESULT)0x80030008L)
-#define STG_E_INVALIDPOINTER ((HRESULT)0x80030009L)
-#define STG_E_NOMOREFILES ((HRESULT)0x80030012L)
-#define STG_E_DISKISWRITEPROTECTED ((HRESULT)0x80030013L)
-#define STG_E_SEEKERROR ((HRESULT)0x80030019L)
-#define STG_E_WRITEFAULT ((HRESULT)0x8003001DL)
-#define STG_E_READFAULT ((HRESULT)0x8003001EL)
-#define STG_E_SHAREVIOLATION ((HRESULT)0x80030020L)
-#define STG_E_LOCKVIOLATION ((HRESULT)0x80030021L)
-#define STG_E_FILEALREADYEXISTS ((HRESULT)0x80030050L)
-#define STG_E_INVALIDPARAMETER ((HRESULT)0x80030057L)
-#define STG_E_MEDIUMFULL ((HRESULT)0x80030070L)
-#define STG_E_PROPSETMISMATCHED ((HRESULT)0x800300F0L)
-#define STG_E_ABNORMALAPIEXIT ((HRESULT)0x800300FAL)
-#define STG_E_INVALIDHEADER ((HRESULT)0x800300FBL)
-#define STG_E_INVALIDNAME ((HRESULT)0x800300FCL)
-#define STG_E_UNKNOWN ((HRESULT)0x800300FDL)
-#define STG_E_UNIMPLEMENTEDFUNCTION ((HRESULT)0x800300FEL)
-#define STG_E_INVALIDFLAG ((HRESULT)0x800300FFL)
-#define STG_E_INUSE ((HRESULT)0x80030100L)
-#define STG_E_NOTCURRENT ((HRESULT)0x80030101L)
-#define STG_E_REVERTED ((HRESULT)0x80030102L)
-#define STG_E_CANTSAVE ((HRESULT)0x80030103L)
-#define STG_E_OLDFORMAT ((HRESULT)0x80030104L)
-#define STG_E_OLDDLL ((HRESULT)0x80030105L)
-#define STG_E_SHAREREQUIRED ((HRESULT)0x80030106L)
-#define STG_E_NOTFILEBASEDSTORAGE ((HRESULT)0x80030107L)
-#define STG_E_EXTANTMARSHALLINGS ((HRESULT)0x80030108L)
-#define STG_E_DOCFILECORRUPT ((HRESULT)0x80030109L)
-#define STG_E_BADBASEADDRESS ((HRESULT)0x80030110L)
-#define STG_E_DOCFILETOOLARGE ((HRESULT)0x80030111L)
-#define STG_E_NOTSIMPLEFORMAT ((HRESULT)0x80030112L)
-#define STG_E_INCOMPLETE ((HRESULT)0x80030201L)
-#define STG_E_TERMINATED ((HRESULT)0x80030202L)
-#define STG_S_CONVERTED ((HRESULT)0x00030200L)
-#define STG_S_BLOCK ((HRESULT)0x00030201L)
-#define STG_S_RETRYNOW ((HRESULT)0x00030202L)
-#define STG_S_MONITORING ((HRESULT)0x00030203L)
-#define STG_S_MULTIPLEOPENS ((HRESULT)0x00030204L)
-#define STG_S_CONSOLIDATIONFAILED ((HRESULT)0x00030205L)
-#define STG_S_CANNOTCONSOLIDATE ((HRESULT)0x00030206L)
-#define RPC_E_CALL_REJECTED ((HRESULT)0x80010001L)
-#define RPC_E_CALL_CANCELED ((HRESULT)0x80010002L)
-#define RPC_E_CANTPOST_INSENDCALL ((HRESULT)0x80010003L)
-#define RPC_E_CANTCALLOUT_INASYNCCALL ((HRESULT)0x80010004L)
-#define RPC_E_CANTCALLOUT_INEXTERNALCALL ((HRESULT)0x80010005L)
-#define RPC_E_CONNECTION_TERMINATED ((HRESULT)0x80010006L)
-#define RPC_E_SERVER_DIED ((HRESULT)0x80010007L)
-#define RPC_E_CLIENT_DIED ((HRESULT)0x80010008L)
-#define RPC_E_INVALID_DATAPACKET ((HRESULT)0x80010009L)
-#define RPC_E_CANTTRANSMIT_CALL ((HRESULT)0x8001000AL)
-#define RPC_E_CLIENT_CANTMARSHAL_DATA ((HRESULT)0x8001000BL)
-#define RPC_E_CLIENT_CANTUNMARSHAL_DATA ((HRESULT)0x8001000CL)
-#define RPC_E_SERVER_CANTMARSHAL_DATA ((HRESULT)0x8001000DL)
-#define RPC_E_SERVER_CANTUNMARSHAL_DATA ((HRESULT)0x8001000EL)
-#define RPC_E_INVALID_DATA ((HRESULT)0x8001000FL)
-#define RPC_E_INVALID_PARAMETER ((HRESULT)0x80010010L)
-#define RPC_E_CANTCALLOUT_AGAIN ((HRESULT)0x80010011L)
-#define RPC_E_SERVER_DIED_DNE ((HRESULT)0x80010012L)
-#define RPC_E_SYS_CALL_FAILED ((HRESULT)0x80010100L)
-#define RPC_E_OUT_OF_RESOURCES ((HRESULT)0x80010101L)
-#define RPC_E_ATTEMPTED_MULTITHREAD ((HRESULT)0x80010102L)
-#define RPC_E_NOT_REGISTERED ((HRESULT)0x80010103L)
-#define RPC_E_FAULT ((HRESULT)0x80010104L)
-#define RPC_E_SERVERFAULT ((HRESULT)0x80010105L)
-#define RPC_E_CHANGED_MODE ((HRESULT)0x80010106L)
-#define RPC_E_INVALIDMETHOD ((HRESULT)0x80010107L)
-#define RPC_E_DISCONNECTED ((HRESULT)0x80010108L)
-#define RPC_E_RETRY ((HRESULT)0x80010109L)
-#define RPC_E_SERVERCALL_RETRYLATER ((HRESULT)0x8001010AL)
-#define RPC_E_SERVERCALL_REJECTED ((HRESULT)0x8001010BL)
-#define RPC_E_INVALID_CALLDATA ((HRESULT)0x8001010CL)
-#define RPC_E_CANTCALLOUT_ININPUTSYNCCALL ((HRESULT)0x8001010DL)
-#define RPC_E_WRONG_THREAD ((HRESULT)0x8001010EL)
-#define RPC_E_THREAD_NOT_INIT ((HRESULT)0x8001010FL)
-#define RPC_E_VERSION_MISMATCH ((HRESULT)0x80010110L)
-#define RPC_E_INVALID_HEADER ((HRESULT)0x80010111L)
-#define RPC_E_INVALID_EXTENSION ((HRESULT)0x80010112L)
-#define RPC_E_INVALID_IPID ((HRESULT)0x80010113L)
-#define RPC_E_INVALID_OBJECT ((HRESULT)0x80010114L)
-#define RPC_E_CALL_COMPLETE ((HRESULT)0x80010117L)
-#define RPC_E_UNSECURE_CALL ((HRESULT)0x80010118L)
-#define RPC_E_TOO_LATE ((HRESULT)0x80010119L)
-#define RPC_E_NO_GOOD_SECURITY_PACKAGES ((HRESULT)0x8001011AL)
-#define RPC_E_ACCESS_DENIED ((HRESULT)0x8001011BL)
-#define RPC_E_REMOTE_DISABLED ((HRESULT)0x8001011CL)
-#define RPC_E_INVALID_OBJREF ((HRESULT)0x8001011DL)
-#define RPC_E_NO_CONTEXT ((HRESULT)0x8001011EL)
-#define RPC_E_TIMEOUT ((HRESULT)0x8001011FL)
-#define RPC_E_NO_SYNC ((HRESULT)0x80010120L)
-#define RPC_E_FULLSIC_REQUIRED ((HRESULT)0x80010121L)
-#define RPC_E_INVALID_STD_NAME ((HRESULT)0x80010122L)
-#define RPC_E_UNEXPECTED ((HRESULT)0x8001FFFFL)
-
-#define NTE_BAD_UID ((HRESULT)0x80090001L)
-#define NTE_BAD_HASH ((HRESULT)0x80090002L)
-#define NTE_BAD_KEY ((HRESULT)0x80090003L)
-#define NTE_BAD_LEN ((HRESULT)0x80090004L)
-#define NTE_BAD_DATA ((HRESULT)0x80090005L)
-#define NTE_BAD_SIGNATURE ((HRESULT)0x80090006L)
-#define NTE_BAD_VER ((HRESULT)0x80090007L)
-#define NTE_BAD_ALGID ((HRESULT)0x80090008L)
-#define NTE_BAD_FLAGS ((HRESULT)0x80090009L)
-#define NTE_BAD_TYPE ((HRESULT)0x8009000AL)
-#define NTE_BAD_KEY_STATE ((HRESULT)0x8009000BL)
-#define NTE_BAD_HASH_STATE ((HRESULT)0x8009000CL)
-#define NTE_NO_KEY ((HRESULT)0x8009000DL)
-#define NTE_NO_MEMORY ((HRESULT)0x8009000EL)
-#define NTE_EXISTS ((HRESULT)0x8009000FL)
-#define NTE_PERM ((HRESULT)0x80090010L)
-#define NTE_NOT_FOUND ((HRESULT)0x80090011L)
-#define NTE_DOUBLE_ENCRYPT ((HRESULT)0x80090012L)
-#define NTE_BAD_PROVIDER ((HRESULT)0x80090013L)
-#define NTE_BAD_PROV_TYPE ((HRESULT)0x80090014L)
-#define NTE_BAD_PUBLIC_KEY ((HRESULT)0x80090015L)
-#define NTE_BAD_KEYSET ((HRESULT)0x80090016L)
-#define NTE_PROV_TYPE_NOT_DEF ((HRESULT)0x80090017L)
-#define NTE_PROV_TYPE_ENTRY_BAD ((HRESULT)0x80090018L)
-#define NTE_KEYSET_NOT_DEF ((HRESULT)0x80090019L)
-#define NTE_KEYSET_ENTRY_BAD ((HRESULT)0x8009001AL)
-#define NTE_PROV_TYPE_NO_MATCH ((HRESULT)0x8009001BL)
-#define NTE_SIGNATURE_FILE_BAD ((HRESULT)0x8009001CL)
-#define NTE_PROVIDER_DLL_FAIL ((HRESULT)0x8009001DL)
-#define NTE_PROV_DLL_NOT_FOUND ((HRESULT)0x8009001EL)
-#define NTE_BAD_KEYSET_PARAM ((HRESULT)0x8009001FL)
-#define NTE_FAIL ((HRESULT)0x80090020L)
-#define NTE_SYS_ERR ((HRESULT)0x80090021L)
-#define NTE_SILENT_CONTEXT ((HRESULT)0x80090022L)
-#define NTE_TOKEN_KEYSET_STORAGE_FULL ((HRESULT)0x80090023L)
-#define NTE_TEMPORARY_PROFILE ((HRESULT)0x80090024L)
-#define NTE_FIXEDPARAMETER ((HRESULT)0x80090025L)
-
-#endif
diff --git a/winsup/w32api/include/wingdi.h b/winsup/w32api/include/wingdi.h
deleted file mode 100644
index 8038dec..0000000
--- a/winsup/w32api/include/wingdi.h
+++ /dev/null
@@ -1,3228 +0,0 @@
-#ifndef _WINGDI_H
-#define _WINGDI_H
-#define _WINGDI_
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef WINGDIAPI
-#ifdef __W32API_USE_DLLIMPORT__
-#define WINGDIAPI DECLSPEC_IMPORT
-#else
-#define WINGDIAPI
-#endif
-#endif
-
-#define BI_RGB 0
-#define BI_RLE8 1
-#define BI_RLE4 2
-#define BI_BITFIELDS 3
-#define BI_JPEG 4
-#define BI_PNG 5
-#define LF_FACESIZE 32
-#define LF_FULLFACESIZE 64
-#define CA_NEGATIVE 1
-#define CA_LOG_FILTER 2
-#define ILLUMINANT_DEVICE_DEFAULT 0
-#define ILLUMINANT_A 1
-#define ILLUMINANT_B 2
-#define ILLUMINANT_C 3
-#define ILLUMINANT_D50 4
-#define ILLUMINANT_D55 5
-#define ILLUMINANT_D65 6
-#define ILLUMINANT_D75 7
-#define ILLUMINANT_F2 8
-#define ILLUMINANT_MAX_INDEX ILLUMINANT_F2
-#define ILLUMINANT_TUNGSTEN ILLUMINANT_A
-#define ILLUMINANT_DAYLIGHT ILLUMINANT_C
-#define ILLUMINANT_FLUORESCENT ILLUMINANT_F2
-#define ILLUMINANT_NTSC ILLUMINANT_C
-#define RGB_GAMMA_MIN 2500
-#define RGB_GAMMA_MAX 65000
-#define REFERENCE_WHITE_MIN 6000
-#define REFERENCE_WHITE_MAX 10000
-#define REFERENCE_BLACK_MIN 0
-#define REFERENCE_BLACK_MAX 4000
-#define COLOR_ADJ_MIN (-100)
-#define COLOR_ADJ_MAX 100
-#define CCHDEVICENAME 32
-#define CCHFORMNAME 32
-#define DI_COMPAT 4
-#define DI_DEFAULTSIZE 8
-#define DI_IMAGE 2
-#define DI_MASK 1
-#define DI_NORMAL 3
-#define DI_APPBANDING 1
-#define EMR_HEADER 1
-#define EMR_POLYBEZIER 2
-#define EMR_POLYGON 3
-#define EMR_POLYLINE 4
-#define EMR_POLYBEZIERTO 5
-#define EMR_POLYLINETO 6
-#define EMR_POLYPOLYLINE 7
-#define EMR_POLYPOLYGON 8
-#define EMR_SETWINDOWEXTEX 9
-#define EMR_SETWINDOWORGEX 10
-#define EMR_SETVIEWPORTEXTEX 11
-#define EMR_SETVIEWPORTORGEX 12
-#define EMR_SETBRUSHORGEX 13
-#define EMR_EOF 14
-#define EMR_SETPIXELV 15
-#define EMR_SETMAPPERFLAGS 16
-#define EMR_SETMAPMODE 17
-#define EMR_SETBKMODE 18
-#define EMR_SETPOLYFILLMODE 19
-#define EMR_SETROP2 20
-#define EMR_SETSTRETCHBLTMODE 21
-#define EMR_SETTEXTALIGN 22
-#define EMR_SETCOLORADJUSTMENT 23
-#define EMR_SETTEXTCOLOR 24
-#define EMR_SETBKCOLOR 25
-#define EMR_OFFSETCLIPRGN 26
-#define EMR_MOVETOEX 27
-#define EMR_SETMETARGN 28
-#define EMR_EXCLUDECLIPRECT 29
-#define EMR_INTERSECTCLIPRECT 30
-#define EMR_SCALEVIEWPORTEXTEX 31
-#define EMR_SCALEWINDOWEXTEX 32
-#define EMR_SAVEDC 33
-#define EMR_RESTOREDC 34
-#define EMR_SETWORLDTRANSFORM 35
-#define EMR_MODIFYWORLDTRANSFORM 36
-#define EMR_SELECTOBJECT 37
-#define EMR_CREATEPEN 38
-#define EMR_CREATEBRUSHINDIRECT 39
-#define EMR_DELETEOBJECT 40
-#define EMR_ANGLEARC 41
-#define EMR_ELLIPSE 42
-#define EMR_RECTANGLE 43
-#define EMR_ROUNDRECT 44
-#define EMR_ARC 45
-#define EMR_CHORD 46
-#define EMR_PIE 47
-#define EMR_SELECTPALETTE 48
-#define EMR_CREATEPALETTE 49
-#define EMR_SETPALETTEENTRIES 50
-#define EMR_RESIZEPALETTE 51
-#define EMR_REALIZEPALETTE 52
-#define EMR_EXTFLOODFILL 53
-#define EMR_LINETO 54
-#define EMR_ARCTO 55
-#define EMR_POLYDRAW 56
-#define EMR_SETARCDIRECTION 57
-#define EMR_SETMITERLIMIT 58
-#define EMR_BEGINPATH 59
-#define EMR_ENDPATH 60
-#define EMR_CLOSEFIGURE 61
-#define EMR_FILLPATH 62
-#define EMR_STROKEANDFILLPATH 63
-#define EMR_STROKEPATH 64
-#define EMR_FLATTENPATH 65
-#define EMR_WIDENPATH 66
-#define EMR_SELECTCLIPPATH 67
-#define EMR_ABORTPATH 68
-#define EMR_GDICOMMENT 70
-#define EMR_FILLRGN 71
-#define EMR_FRAMERGN 72
-#define EMR_INVERTRGN 73
-#define EMR_PAINTRGN 74
-#define EMR_EXTSELECTCLIPRGN 75
-#define EMR_BITBLT 76
-#define EMR_STRETCHBLT 77
-#define EMR_MASKBLT 78
-#define EMR_PLGBLT 79
-#define EMR_SETDIBITSTODEVICE 80
-#define EMR_STRETCHDIBITS 81
-#define EMR_EXTCREATEFONTINDIRECTW 82
-#define EMR_EXTTEXTOUTA 83
-#define EMR_EXTTEXTOUTW 84
-#define EMR_POLYBEZIER16 85
-#define EMR_POLYGON16 86
-#define EMR_POLYLINE16 87
-#define EMR_POLYBEZIERTO16 88
-#define EMR_POLYLINETO16 89
-#define EMR_POLYPOLYLINE16 90
-#define EMR_POLYPOLYGON16 91
-#define EMR_POLYDRAW16 92
-#define EMR_CREATEMONOBRUSH 93
-#define EMR_CREATEDIBPATTERNBRUSHPT 94
-#define EMR_EXTCREATEPEN 95
-#define EMR_POLYTEXTOUTA 96
-#define EMR_POLYTEXTOUTW 97
-#define EMR_SETICMMODE 98
-#define EMR_CREATECOLORSPACE 99
-#define EMR_SETCOLORSPACE 100
-#define EMR_DELETECOLORSPACE 101
-#define EMR_GLSRECORD 102
-#define EMR_GLSBOUNDEDRECORD 103
-#define EMR_PIXELFORMAT 104
-#define ENHMETA_SIGNATURE 1179469088
-#define EPS_SIGNATURE 0x46535045
-#if (_WIN32_WINNT >= 0x0500)
-#define FR_PRIVATE 0x10
-#define FR_NOT_ENUM 0x20
-#endif
-#define META_SETBKCOLOR 0x201
-#define META_SETBKMODE 0x102
-#define META_SETMAPMODE 0x103
-#define META_SETROP2 0x104
-#define META_SETRELABS 0x105
-#define META_SETPOLYFILLMODE 0x106
-#define META_SETSTRETCHBLTMODE 0x107
-#define META_SETTEXTCHAREXTRA 0x108
-#define META_SETTEXTCOLOR 0x209
-#define META_SETTEXTJUSTIFICATION 0x20A
-#define META_SETWINDOWORG 0x20B
-#define META_SETWINDOWEXT 0x20C
-#define META_SETVIEWPORTORG 0x20D
-#define META_SETVIEWPORTEXT 0x20E
-#define META_OFFSETWINDOWORG 0x20F
-#define META_SCALEWINDOWEXT 0x410
-#define META_OFFSETVIEWPORTORG 0x211
-#define META_SCALEVIEWPORTEXT 0x412
-#define META_LINETO 0x213
-#define META_MOVETO 0x214
-#define META_EXCLUDECLIPRECT 0x415
-#define META_INTERSECTCLIPRECT 0x416
-#define META_ARC 0x817
-#define META_ELLIPSE 0x418
-#define META_FLOODFILL 0x419
-#define META_PIE 0x81A
-#define META_RECTANGLE 0x41B
-#define META_ROUNDRECT 0x61C
-#define META_PATBLT 0x61D
-#define META_SAVEDC 0x1E
-#define META_SETPIXEL 0x41F
-#define META_OFFSETCLIPRGN 0x220
-#define META_TEXTOUT 0x521
-#define META_BITBLT 0x922
-#define META_STRETCHBLT 0xB23
-#define META_POLYGON 0x324
-#define META_POLYLINE 0x325
-#define META_ESCAPE 0x626
-#define META_RESTOREDC 0x127
-#define META_FILLREGION 0x228
-#define META_FRAMEREGION 0x429
-#define META_INVERTREGION 0x12A
-#define META_PAINTREGION 0x12B
-#define META_SELECTCLIPREGION 0x12C
-#define META_SELECTOBJECT 0x12D
-#define META_SETTEXTALIGN 0x12E
-#define META_CHORD 0x830
-#define META_SETMAPPERFLAGS 0x231
-#define META_EXTTEXTOUT 0xa32
-#define META_SETDIBTODEV 0xd33
-#define META_SELECTPALETTE 0x234
-#define META_REALIZEPALETTE 0x35
-#define META_ANIMATEPALETTE 0x436
-#define META_SETPALENTRIES 0x37
-#define META_POLYPOLYGON 0x538
-#define META_RESIZEPALETTE 0x139
-#define META_DIBBITBLT 0x940
-#define META_DIBSTRETCHBLT 0xb41
-#define META_DIBCREATEPATTERNBRUSH 0x142
-#define META_STRETCHDIB 0xf43
-#define META_EXTFLOODFILL 0x548
-#define META_DELETEOBJECT 0x1f0
-#define META_CREATEPALETTE 0xf7
-#define META_CREATEPATTERNBRUSH 0x1F9
-#define META_CREATEPENINDIRECT 0x2FA
-#define META_CREATEFONTINDIRECT 0x2FB
-#define META_CREATEBRUSHINDIRECT 0x2FC
-#define META_CREATEREGION 0x6FF
-#define PT_MOVETO 6
-#define PT_LINETO 2
-#define PT_BEZIERTO 4
-#define PT_CLOSEFIGURE 1
-#define ELF_VENDOR_SIZE 4
-#define ELF_VERSION 0
-#define ELF_CULTURE_LATIN 0
-#define PFD_TYPE_RGBA 0
-#define PFD_TYPE_COLORINDEX 1
-#define PFD_MAIN_PLANE 0
-#define PFD_OVERLAY_PLANE 1
-#define PFD_UNDERLAY_PLANE (-1)
-#define PFD_DOUBLEBUFFER 1
-#define PFD_STEREO 2
-#define PFD_DRAW_TO_WINDOW 4
-#define PFD_DRAW_TO_BITMAP 8
-#define PFD_SUPPORT_GDI 16
-#define PFD_SUPPORT_OPENGL 32
-#define PFD_GENERIC_FORMAT 64
-#define PFD_NEED_PALETTE 128
-#define PFD_NEED_SYSTEM_PALETTE 0x00000100
-#define PFD_SWAP_EXCHANGE 0x00000200
-#define PFD_SWAP_COPY 0x00000400
-#define PFD_SWAP_LAYER_BUFFERS 0x00000800
-#define PFD_GENERIC_ACCELERATED 0x00001000
-#define PFD_DEPTH_DONTCARE 0x20000000
-#define PFD_DOUBLEBUFFER_DONTCARE 0x40000000
-#define PFD_STEREO_DONTCARE 0x80000000
-#define SP_ERROR (-1)
-#define SP_OUTOFDISK (-4)
-#define SP_OUTOFMEMORY (-5)
-#define SP_USERABORT (-3)
-#define SP_APPABORT (-2)
-#define BLACKNESS 0x00000042
-#define NOTSRCERASE 0x001100A6
-#define NOTSRCCOPY 0x00330008
-#define SRCERASE 0x00440328
-#define DSTINVERT 0x00550009
-#define PATINVERT 0x005A0049
-#define SRCINVERT 0x00660046
-#define SRCAND 0x008800C6
-#define MERGEPAINT 0x00BB0226
-#define MERGECOPY 0x00C000CA
-#define SRCCOPY 0x00CC0020
-#define SRCPAINT 0x00EE0086
-#define PATCOPY 0x00F00021
-#define PATPAINT 0x00FB0A09
-#define WHITENESS 0x00FF0062
-#define CAPTUREBLT 0x40000000
-#define NOMIRRORBITMAP 0x80000000
-#define R2_BLACK 1
-#define R2_COPYPEN 13
-#define R2_MASKNOTPEN 3
-#define R2_MASKPEN 9
-#define R2_MASKPENNOT 5
-#define R2_MERGENOTPEN 12
-#define R2_MERGEPEN 15
-#define R2_MERGEPENNOT 14
-#define R2_NOP 11
-#define R2_NOT 6
-#define R2_NOTCOPYPEN 4
-#define R2_NOTMASKPEN 8
-#define R2_NOTMERGEPEN 2
-#define R2_NOTXORPEN 10
-#define R2_WHITE 16
-#define R2_XORPEN 7
-#define CM_OUT_OF_GAMUT 255
-#define CM_IN_GAMUT 0
-#define RGN_AND 1
-#define RGN_COPY 5
-#define RGN_DIFF 4
-#define RGN_OR 2
-#define RGN_XOR 3
-#define NULLREGION 1
-#define SIMPLEREGION 2
-#define COMPLEXREGION 3
-#define ERROR 0
-#define CBM_INIT 4
-#define DIB_PAL_COLORS 1
-#define DIB_RGB_COLORS 0
-#define FW_DONTCARE 0
-#define FW_THIN 100
-#define FW_EXTRALIGHT 200
-#define FW_ULTRALIGHT FW_EXTRALIGHT
-#define FW_LIGHT 300
-#define FW_NORMAL 400
-#define FW_REGULAR 400
-#define FW_MEDIUM 500
-#define FW_SEMIBOLD 600
-#define FW_DEMIBOLD FW_SEMIBOLD
-#define FW_BOLD 700
-#define FW_EXTRABOLD 800
-#define FW_ULTRABOLD FW_EXTRABOLD
-#define FW_HEAVY 900
-#define FW_BLACK FW_HEAVY
-#define ANSI_CHARSET 0
-#define DEFAULT_CHARSET 1
-#define SYMBOL_CHARSET 2
-#define SHIFTJIS_CHARSET 128
-#define HANGEUL_CHARSET 129
-#define HANGUL_CHARSET 129
-#define GB2312_CHARSET 134
-#define CHINESEBIG5_CHARSET 136
-#define GREEK_CHARSET 161
-#define TURKISH_CHARSET 162
-#define HEBREW_CHARSET 177
-#define ARABIC_CHARSET 178
-#define BALTIC_CHARSET 186
-#define RUSSIAN_CHARSET 204
-#define THAI_CHARSET 222
-#define EASTEUROPE_CHARSET 238
-#define OEM_CHARSET 255
-#define JOHAB_CHARSET 130
-#define VIETNAMESE_CHARSET 163
-#define MAC_CHARSET 77
-#define OUT_DEFAULT_PRECIS 0
-#define OUT_STRING_PRECIS 1
-#define OUT_CHARACTER_PRECIS 2
-#define OUT_STROKE_PRECIS 3
-#define OUT_TT_PRECIS 4
-#define OUT_DEVICE_PRECIS 5
-#define OUT_RASTER_PRECIS 6
-#define OUT_TT_ONLY_PRECIS 7
-#define OUT_OUTLINE_PRECIS 8
-//http://www.pinvoke.net/default.aspx/Structures/LOGFONT.html
-#define OUT_PS_ONLY_PRECIS 10
-#define CLIP_DEFAULT_PRECIS 0
-#define CLIP_CHARACTER_PRECIS 1
-#define CLIP_STROKE_PRECIS 2
-#define CLIP_MASK 15
-#define CLIP_LH_ANGLES 16
-#define CLIP_TT_ALWAYS 32
-#define CLIP_EMBEDDED 128
-#define DEFAULT_QUALITY 0
-#define DRAFT_QUALITY 1
-#define PROOF_QUALITY 2
-#define NONANTIALIASED_QUALITY 3
-#define ANTIALIASED_QUALITY 4
-#define DEFAULT_PITCH 0
-#define FIXED_PITCH 1
-#define VARIABLE_PITCH 2
-#define MONO_FONT 8
-#define FF_DECORATIVE 80
-#define FF_DONTCARE 0
-#define FF_MODERN 48
-#define FF_ROMAN 16
-#define FF_SCRIPT 64
-#define FF_SWISS 32
-#define PANOSE_COUNT 10
-#define PAN_FAMILYTYPE_INDEX 0
-#define PAN_SERIFSTYLE_INDEX 1
-#define PAN_WEIGHT_INDEX 2
-#define PAN_PROPORTION_INDEX 3
-#define PAN_CONTRAST_INDEX 4
-#define PAN_STROKEVARIATION_INDEX 5
-#define PAN_ARMSTYLE_INDEX 6
-#define PAN_LETTERFORM_INDEX 7
-#define PAN_MIDLINE_INDEX 8
-#define PAN_XHEIGHT_INDEX 9
-#define PAN_CULTURE_LATIN 0
-#define PAN_ANY 0
-#define PAN_NO_FIT 1
-#define PAN_FAMILY_TEXT_DISPLAY 2
-#define PAN_FAMILY_SCRIPT 3
-#define PAN_FAMILY_DECORATIVE 4
-#define PAN_FAMILY_PICTORIAL 5
-#define PAN_SERIF_COVE 2
-#define PAN_SERIF_OBTUSE_COVE 3
-#define PAN_SERIF_SQUARE_COVE 4
-#define PAN_SERIF_OBTUSE_SQUARE_COVE 5
-#define PAN_SERIF_SQUARE 6
-#define PAN_SERIF_THIN 7
-#define PAN_SERIF_BONE 8
-#define PAN_SERIF_EXAGGERATED 9
-#define PAN_SERIF_TRIANGLE 10
-#define PAN_SERIF_NORMAL_SANS 11
-#define PAN_SERIF_OBTUSE_SANS 12
-#define PAN_SERIF_PERP_SANS 13
-#define PAN_SERIF_FLARED 14
-#define PAN_SERIF_ROUNDED 15
-#define PAN_WEIGHT_VERY_LIGHT 2
-#define PAN_WEIGHT_LIGHT 3
-#define PAN_WEIGHT_THIN 4
-#define PAN_WEIGHT_BOOK 5
-#define PAN_WEIGHT_MEDIUM 6
-#define PAN_WEIGHT_DEMI 7
-#define PAN_WEIGHT_BOLD 8
-#define PAN_WEIGHT_HEAVY 9
-#define PAN_WEIGHT_BLACK 10
-#define PAN_WEIGHT_NORD 11
-#define PAN_PROP_OLD_STYLE 2
-#define PAN_PROP_MODERN 3
-#define PAN_PROP_EVEN_WIDTH 4
-#define PAN_PROP_EXPANDED 5
-#define PAN_PROP_CONDENSED 6
-#define PAN_PROP_VERY_EXPANDED 7
-#define PAN_PROP_VERY_CONDENSED 8
-#define PAN_PROP_MONOSPACED 9
-#define PAN_CONTRAST_NONE 2
-#define PAN_CONTRAST_VERY_LOW 3
-#define PAN_CONTRAST_LOW 4
-#define PAN_CONTRAST_MEDIUM_LOW 5
-#define PAN_CONTRAST_MEDIUM 6
-#define PAN_CONTRAST_MEDIUM_HIGH 7
-#define PAN_CONTRAST_HIGH 8
-#define PAN_CONTRAST_VERY_HIGH 9
-#define PAN_STROKE_GRADUAL_DIAG 2
-#define PAN_STROKE_GRADUAL_TRAN 3
-#define PAN_STROKE_GRADUAL_VERT 4
-#define PAN_STROKE_GRADUAL_HORZ 5
-#define PAN_STROKE_RAPID_VERT 6
-#define PAN_STROKE_RAPID_HORZ 7
-#define PAN_STROKE_INSTANT_VERT 8
-#define PAN_STRAIGHT_ARMS_HORZ 2
-#define PAN_STRAIGHT_ARMS_WEDGE 3
-#define PAN_STRAIGHT_ARMS_VERT 4
-#define PAN_STRAIGHT_ARMS_SINGLE_SERIF 5
-#define PAN_STRAIGHT_ARMS_DOUBLE_SERIF 6
-#define PAN_BENT_ARMS_HORZ 7
-#define PAN_BENT_ARMS_WEDGE 8
-#define PAN_BENT_ARMS_VERT 9
-#define PAN_BENT_ARMS_SINGLE_SERIF 10
-#define PAN_BENT_ARMS_DOUBLE_SERIF 11
-#define PAN_LETT_NORMAL_CONTACT 2
-#define PAN_LETT_NORMAL_WEIGHTED 3
-#define PAN_LETT_NORMAL_BOXED 4
-#define PAN_LETT_NORMAL_FLATTENED 5
-#define PAN_LETT_NORMAL_ROUNDED 6
-#define PAN_LETT_NORMAL_OFF_CENTER 7
-#define PAN_LETT_NORMAL_SQUARE 8
-#define PAN_LETT_OBLIQUE_CONTACT 9
-#define PAN_LETT_OBLIQUE_WEIGHTED 10
-#define PAN_LETT_OBLIQUE_BOXED 11
-#define PAN_LETT_OBLIQUE_FLATTENED 12
-#define PAN_LETT_OBLIQUE_ROUNDED 13
-#define PAN_LETT_OBLIQUE_OFF_CENTER 14
-#define PAN_LETT_OBLIQUE_SQUARE 15
-#define PAN_MIDLINE_STANDARD_TRIMMED 2
-#define PAN_MIDLINE_STANDARD_POINTED 3
-#define PAN_MIDLINE_STANDARD_SERIFED 4
-#define PAN_MIDLINE_HIGH_TRIMMED 5
-#define PAN_MIDLINE_HIGH_POINTED 6
-#define PAN_MIDLINE_HIGH_SERIFED 7
-#define PAN_MIDLINE_CONSTANT_TRIMMED 8
-#define PAN_MIDLINE_CONSTANT_POINTED 9
-#define PAN_MIDLINE_CONSTANT_SERIFED 10
-#define PAN_MIDLINE_LOW_TRIMMED 11
-#define PAN_MIDLINE_LOW_POINTED 12
-#define PAN_MIDLINE_LOW_SERIFED 13
-#define PAN_XHEIGHT_CONSTANT_SMALL 2
-#define PAN_XHEIGHT_CONSTANT_STD 3
-#define PAN_XHEIGHT_CONSTANT_LARGE 4
-#define PAN_XHEIGHT_DUCKING_SMALL 5
-#define PAN_XHEIGHT_DUCKING_STD 6
-#define PAN_XHEIGHT_DUCKING_LARGE 7
-#define FS_LATIN1 1
-#define FS_LATIN2 2
-#define FS_CYRILLIC 4
-#define FS_GREEK 8
-#define FS_TURKISH 16
-#define FS_HEBREW 32
-#define FS_ARABIC 64
-#define FS_BALTIC 128
-#define FS_THAI 0x10000
-#define FS_JISJAPAN 0x20000
-#define FS_CHINESESIMP 0x40000
-#define FS_WANSUNG 0x80000
-#define FS_CHINESETRAD 0x100000
-#define FS_JOHAB 0x200000
-#define FS_SYMBOL 0x80000000
-#define HS_BDIAGONAL 3
-#define HS_CROSS 4
-#define HS_DIAGCROSS 5
-#define HS_FDIAGONAL 2
-#define HS_HORIZONTAL 0
-#define HS_VERTICAL 1
-#define PS_GEOMETRIC 65536
-#define PS_COSMETIC 0
-#define PS_ALTERNATE 8
-#define PS_SOLID 0
-#define PS_DASH 1
-#define PS_DOT 2
-#define PS_DASHDOT 3
-#define PS_DASHDOTDOT 4
-#define PS_NULL 5
-#define PS_USERSTYLE 7
-#define PS_INSIDEFRAME 6
-#define PS_ENDCAP_ROUND 0
-#define PS_ENDCAP_SQUARE 256
-#define PS_ENDCAP_FLAT 512
-#define PS_JOIN_BEVEL 4096
-#define PS_JOIN_MITER 8192
-#define PS_JOIN_ROUND 0
-#define PS_STYLE_MASK 15
-#define PS_ENDCAP_MASK 3840
-#define PS_TYPE_MASK 983040
-#define ALTERNATE 1
-#define WINDING 2
-#define DC_BINNAMES 12
-#define DC_BINS 6
-#define DC_COPIES 18
-#define DC_DRIVER 11
-#define DC_DATATYPE_PRODUCED 21
-#define DC_DUPLEX 7
-#define DC_EMF_COMPLIANT 20
-#define DC_ENUMRESOLUTIONS 13
-#define DC_EXTRA 9
-#define DC_FIELDS 1
-#define DC_FILEDEPENDENCIES 14
-#define DC_MAXEXTENT 5
-#define DC_MINEXTENT 4
-#define DC_ORIENTATION 17
-#define DC_PAPERNAMES 16
-#define DC_PAPERS 2
-#define DC_PAPERSIZE 3
-#define DC_SIZE 8
-#define DC_TRUETYPE 15
-#define DCTT_BITMAP 1
-#define DCTT_DOWNLOAD 2
-#define DCTT_SUBDEV 4
-#define DCTT_DOWNLOAD_OUTLINE 8
-#define DC_VERSION 10
-#define DC_BINADJUST 19
-#define DC_EMF_COMPLIANT 20
-#define DC_DATATYPE_PRODUCED 21
-#define DC_MANUFACTURER 23
-#define DC_MODEL 24
-#if (WINVER >= 0x0500)
-#define DC_PERSONALITY 25
-#define DC_PRINTRATE 26
-#define DC_PRINTRATEUNIT 27
-#define DC_PRINTERMEM 28
-#define DC_MEDIAREADY 29
-#define DC_STAPLE 30
-#define DC_PRINTRATEPPM 31
-#define DC_COLORDEVICE 32
-#define DC_NUP 33
-#endif
-#if (WINVER >= 0x0501)
-#define DC_MEDIATYPENAMES 34
-#define DC_MEDIATYPES 35
-#endif
-#define DCBA_FACEUPNONE 0
-#define DCBA_FACEUPCENTER 1
-#define DCBA_FACEUPLEFT 2
-#define DCBA_FACEUPRIGHT 3
-#define DCBA_FACEDOWNNONE 256
-#define DCBA_FACEDOWNCENTER 257
-#define DCBA_FACEDOWNLEFT 258
-#define DCBA_FACEDOWNRIGHT 259
-#define FLOODFILLBORDER 0
-#define FLOODFILLSURFACE 1
-#define ETO_CLIPPED 0x0004
-#define ETO_GLYPH_INDEX 0x0010
-#define ETO_OPAQUE 0x0002
-#define ETO_NUMERICSLATIN 0x0800
-#define ETO_NUMERICSLOCAL 0x0400
-#define ETO_RTLREADING 0x0080
-#if (_WIN32_WINNT >= 0x0400)
-#define ETO_IGNORELANGUAGE 0x1000
-#endif
-#if (_WIN32_WINNT >= 0x0500)
-#define ETO_PDY 0x2000
-#endif
-#define GDICOMMENT_WINDOWS_METAFILE (-2147483647)
-#define GDICOMMENT_BEGINGROUP 2
-#define GDICOMMENT_ENDGROUP 3
-#define GDICOMMENT_MULTIFORMATS 1073741828
-#define GDICOMMENT_IDENTIFIER 1128875079
-#define AD_COUNTERCLOCKWISE 1
-#define AD_CLOCKWISE 2
-#define RDH_RECTANGLES 1
-#define GCPCLASS_LATIN 1
-#define GCPCLASS_HEBREW 2
-#define GCPCLASS_ARABIC 2
-#define GCPCLASS_NEUTRAL 3
-#define GCPCLASS_LOCALNUMBER 4
-#define GCPCLASS_LATINNUMBER 5
-#define GCPCLASS_LATINNUMERICTERMINATOR 6
-#define GCPCLASS_LATINNUMERICSEPARATOR 7
-#define GCPCLASS_NUMERICSEPARATOR 8
-#define GCPCLASS_PREBOUNDLTR 128
-#define GCPCLASS_PREBOUNDRTL 64
-#define GCPCLASS_POSTBOUNDLTR 32
-#define GCPCLASS_POSTBOUNDRTL 16
-#define GCPGLYPH_LINKBEFORE 0x8000
-#define GCPGLYPH_LINKAFTER 0x4000
-#define DCB_DISABLE 8
-#define DCB_ENABLE 4
-#define DCB_RESET 1
-#define DCB_SET 3
-#define DCB_ACCUMULATE 2
-#define DCB_DIRTY 2
-#define OBJ_BRUSH 2
-#define OBJ_PEN 1
-#define OBJ_PAL 5
-#define OBJ_FONT 6
-#define OBJ_BITMAP 7
-#define OBJ_EXTPEN 11
-#define OBJ_REGION 8
-#define OBJ_DC 3
-#define OBJ_MEMDC 10
-#define OBJ_METAFILE 9
-#define OBJ_METADC 4
-#define OBJ_ENHMETAFILE 13
-#define OBJ_ENHMETADC 12
-#define DRIVERVERSION 0
-#define TECHNOLOGY 2
-#define DT_PLOTTER 0
-#define DT_RASDISPLAY 1
-#define DT_RASPRINTER 2
-#define DT_RASCAMERA 3
-#define DT_CHARSTREAM 4
-#define DT_METAFILE 5
-#define DT_DISPFILE 6
-#define HORZSIZE 4
-#define VERTSIZE 6
-#define HORZRES 8
-#define VERTRES 10
-#define LOGPIXELSX 88
-#define LOGPIXELSY 90
-#define BITSPIXEL 12
-#define PLANES 14
-#define NUMBRUSHES 16
-#define NUMPENS 18
-#define NUMFONTS 22
-#define NUMCOLORS 24
-#define NUMMARKERS 20
-#define ASPECTX 40
-#define ASPECTY 42
-#define ASPECTXY 44
-#define PDEVICESIZE 26
-#define CLIPCAPS 36
-#define SIZEPALETTE 104
-#define NUMRESERVED 106
-#define COLORRES 108
-#define PHYSICALWIDTH 110
-#define PHYSICALHEIGHT 111
-#define PHYSICALOFFSETX 112
-#define PHYSICALOFFSETY 113
-#define SCALINGFACTORX 114
-#define SCALINGFACTORY 115
-#define VREFRESH 116
-#define DESKTOPHORZRES 118
-#define DESKTOPVERTRES 117
-#define BLTALIGNMENT 119
-#if(WINVER >= 0x0500)
-#define SHADEBLENDCAPS 120
-#define SB_NONE 0x00
-#define SB_CONST_ALPHA 0x01
-#define SB_PIXEL_ALPHA 0x02
-#define SB_PREMULT_ALPHA 0x04
-#define SB_GRAD_RECT 0x10
-#define SB_GRAD_TRI 0x20
-#define COLORMGMTCAPS 121
-#define CM_NONE 0x00
-#define CM_DEVICE_ICM 0x01
-#define CM_GAMMA_RAMP 0x02
-#define CM_CMYK_COLOR 0x04
-#endif
-#define RASTERCAPS 38
-#define RC_BANDING 2
-#define RC_BITBLT 1
-#define RC_BITMAP64 8
-#define RC_DI_BITMAP 128
-#define RC_DIBTODEV 512
-#define RC_FLOODFILL 4096
-#define RC_GDI20_OUTPUT 16
-#define RC_PALETTE 256
-#define RC_SCALING 4
-#define RC_STRETCHBLT 2048
-#define RC_STRETCHDIB 8192
-#define RC_DEVBITS 0x8000
-#define RC_OP_DX_OUTPUT 0x4000
-#define CURVECAPS 28
-#define CC_NONE 0
-#define CC_CIRCLES 1
-#define CC_PIE 2
-#define CC_CHORD 4
-#define CC_ELLIPSES 8
-#define CC_WIDE 16
-#define CC_STYLED 32
-#define CC_WIDESTYLED 64
-#define CC_INTERIORS 128
-#define CC_ROUNDRECT 256
-#define LINECAPS 30
-#define LC_NONE 0
-#define LC_POLYLINE 2
-#define LC_MARKER 4
-#define LC_POLYMARKER 8
-#define LC_WIDE 16
-#define LC_STYLED 32
-#define LC_WIDESTYLED 64
-#define LC_INTERIORS 128
-#define POLYGONALCAPS 32
-#define RC_BANDING 2
-#define RC_BIGFONT 1024
-#define RC_BITBLT 1
-#define RC_BITMAP64 8
-#define RC_DEVBITS 0x8000
-#define RC_DI_BITMAP 128
-#define RC_GDI20_OUTPUT 16
-#define RC_GDI20_STATE 32
-#define RC_NONE 0
-#define RC_OP_DX_OUTPUT 0x4000
-#define RC_PALETTE 256
-#define RC_SAVEBITMAP 64
-#define RC_SCALING 4
-#define PC_NONE 0
-#define PC_POLYGON 1
-#define PC_POLYPOLYGON 256
-#define PC_PATHS 512
-#define PC_RECTANGLE 2
-#define PC_WINDPOLYGON 4
-#define PC_SCANLINE 8
-#define PC_TRAPEZOID 4
-#define PC_WIDE 16
-#define PC_STYLED 32
-#define PC_WIDESTYLED 64
-#define PC_INTERIORS 128
-#define PC_PATHS 512
-#define TEXTCAPS 34
-#define TC_OP_CHARACTER 1
-#define TC_OP_STROKE 2
-#define TC_CP_STROKE 4
-#define TC_CR_90 8
-#define TC_CR_ANY 16
-#define TC_SF_X_YINDEP 32
-#define TC_SA_DOUBLE 64
-#define TC_SA_INTEGER 128
-#define TC_SA_CONTIN 256
-#define TC_EA_DOUBLE 512
-#define TC_IA_ABLE 1024
-#define TC_UA_ABLE 2048
-#define TC_SO_ABLE 4096
-#define TC_RA_ABLE 8192
-#define TC_VA_ABLE 16384
-#define TC_RESERVED 32768
-#define TC_SCROLLBLT 65536
-#define GCP_DBCS 1
-#define GCP_ERROR 0x8000
-#define GCP_CLASSIN 0x80000
-#define GCP_DIACRITIC 256
-#define GCP_DISPLAYZWG 0x400000
-#define GCP_GLYPHSHAPE 16
-#define GCP_JUSTIFY 0x10000
-#define GCP_JUSTIFYIN 0x200000
-#define GCP_KASHIDA 1024
-#define GCP_LIGATE 32
-#define GCP_MAXEXTENT 0x100000
-#define GCP_NEUTRALOVERRIDE 0x2000000
-#define GCP_NUMERICOVERRIDE 0x1000000
-#define GCP_NUMERICSLATIN 0x4000000
-#define GCP_NUMERICSLOCAL 0x8000000
-#define GCP_REORDER 2
-#define GCP_SYMSWAPOFF 0x800000
-#define GCP_USEKERNING 8
-#define FLI_GLYPHS 0x40000
-#define FLI_MASK 0x103b
-#define GGO_METRICS 0
-#define GGO_BITMAP 1
-#define GGO_NATIVE 2
-#define GGO_BEZIER 3
-#define GGO_GRAY2_BITMAP 4
-#define GGO_GRAY4_BITMAP 5
-#define GGO_GRAY8_BITMAP 6
-#define GGO_GLYPH_INDEX 128
-#if (WINVER >= 0x0500)
-#define GGO_UNHINTED 256
-#endif
-#define GM_COMPATIBLE 1
-#define GM_ADVANCED 2
-#define MM_ANISOTROPIC 8
-#define MM_HIENGLISH 5
-#define MM_HIMETRIC 3
-#define MM_ISOTROPIC 7
-#define MM_LOENGLISH 4
-#define MM_LOMETRIC 2
-#define MM_TEXT 1
-#define MM_TWIPS 6
-#define MM_MAX_FIXEDSCALE MM_TWIPS
-#define ABSOLUTE 1
-#define RELATIVE 2
-#define PC_EXPLICIT 2
-#define PC_NOCOLLAPSE 4
-#define PC_RESERVED 1
-#define CLR_NONE 0xffffffff
-#define CLR_INVALID CLR_NONE
-#define CLR_DEFAULT 0xff000000
-#define PT_MOVETO 6
-#define PT_LINETO 2
-#define PT_BEZIERTO 4
-#define PT_CLOSEFIGURE 1
-#define TT_AVAILABLE 1
-#define TT_ENABLED 2
-#define BLACK_BRUSH 4
-#define DKGRAY_BRUSH 3
-#define GRAY_BRUSH 2
-#define HOLLOW_BRUSH 5
-#define LTGRAY_BRUSH 1
-#define NULL_BRUSH 5
-#define WHITE_BRUSH 0
-#define BLACK_PEN 7
-#define NULL_PEN 8
-#define WHITE_PEN 6
-#define ANSI_FIXED_FONT 11
-#define ANSI_VAR_FONT 12
-#define DEVICE_DEFAULT_FONT 14
-#define DEFAULT_GUI_FONT 17
-#define OEM_FIXED_FONT 10
-#define SYSTEM_FONT 13
-#define SYSTEM_FIXED_FONT 16
-#define DEFAULT_PALETTE 15
-#if (_WIN32_WINNT >= 0x0500)
-#define DC_BRUSH 18
-#define DC_PEN 19
-#endif
-#define SYSPAL_ERROR 0
-#define SYSPAL_STATIC 1
-#define SYSPAL_NOSTATIC 2
-#define SYSPAL_NOSTATIC256 3
-#define TA_BASELINE 24
-#define TA_BOTTOM 8
-#define TA_TOP 0
-#define TA_CENTER 6
-#define TA_LEFT 0
-#define TA_RIGHT 2
-#define TA_RTLREADING 256
-#define TA_NOUPDATECP 0
-#define TA_UPDATECP 1
-#define TA_MASK (TA_BASELINE+TA_CENTER+TA_UPDATECP+TA_RTLREADING)
-#define VTA_BASELINE 24
-#define VTA_CENTER 6
-#define VTA_LEFT TA_BOTTOM
-#define VTA_RIGHT TA_TOP
-#define VTA_BOTTOM TA_RIGHT
-#define VTA_TOP TA_LEFT
-#define MWT_IDENTITY 1
-#define MWT_LEFTMULTIPLY 2
-#define MWT_RIGHTMULTIPLY 3
-#define OPAQUE 2
-#define TRANSPARENT 1
-#define BLACKONWHITE 1
-#define WHITEONBLACK 2
-#define COLORONCOLOR 3
-#define HALFTONE 4
-#define MAXSTRETCHBLTMODE 4
-#define STRETCH_ANDSCANS 1
-#define STRETCH_DELETESCANS 3
-#define STRETCH_HALFTONE 4
-#define STRETCH_ORSCANS 2
-#define TCI_SRCCHARSET 1
-#define TCI_SRCCODEPAGE 2
-#define TCI_SRCFONTSIG 3
-#define ICM_ON 2
-#define ICM_OFF 1
-#define ICM_QUERY 3
-#define NEWFRAME 1
-#define ABORTDOC 2
-#define NEXTBAND 3
-#define SETCOLORTABLE 4
-#define GETCOLORTABLE 5
-#define FLUSHOUTPUT 6
-#define DRAFTMODE 7
-#define QUERYESCSUPPORT 8
-#define SETABORTPROC 9
-#define STARTDOC 10
-#define ENDDOC 11
-#define GETPHYSPAGESIZE 12
-#define GETPRINTINGOFFSET 13
-#define GETSCALINGFACTOR 14
-#define MFCOMMENT 15
-#define GETPENWIDTH 16
-#define SETCOPYCOUNT 17
-#define SELECTPAPERSOURCE 18
-#define DEVICEDATA 19
-#define PASSTHROUGH 19
-#define GETTECHNOLGY 20
-#define GETTECHNOLOGY 20
-#define SETLINECAP 21
-#define SETLINEJOIN 22
-#define SETMITERLIMIT 23
-#define BANDINFO 24
-#define DRAWPATTERNRECT 25
-#define GETVECTORPENSIZE 26
-#define GETVECTORBRUSHSIZE 27
-#define ENABLEDUPLEX 28
-#define GETSETPAPERBINS 29
-#define GETSETPRINTORIENT 30
-#define ENUMPAPERBINS 31
-#define SETDIBSCALING 32
-#define EPSPRINTING 33
-#define ENUMPAPERMETRICS 34
-#define GETSETPAPERMETRICS 35
-#define POSTSCRIPT_DATA 37
-#define POSTSCRIPT_IGNORE 38
-#define MOUSETRAILS 39
-#define GETDEVICEUNITS 42
-#define GETEXTENDEDTEXTMETRICS 256
-#define GETEXTENTTABLE 257
-#define GETPAIRKERNTABLE 258
-#define GETTRACKKERNTABLE 259
-#define EXTTEXTOUT 512
-#define GETFACENAME 513
-#define DOWNLOADFACE 514
-#define ENABLERELATIVEWIDTHS 768
-#define ENABLEPAIRKERNING 769
-#define SETKERNTRACK 770
-#define SETALLJUSTVALUES 771
-#define SETCHARSET 772
-#define STRETCHBLT 2048
-#define GETSETSCREENPARAMS 3072
-#define QUERYDIBSUPPORT 3073
-#define BEGIN_PATH 4096
-#define CLIP_TO_PATH 4097
-#define END_PATH 4098
-#define EXT_DEVICE_CAPS 4099
-#define RESTORE_CTM 4100
-#define SAVE_CTM 4101
-#define SET_ARC_DIRECTION 4102
-#define SET_BACKGROUND_COLOR 4103
-#define SET_POLY_MODE 4104
-#define SET_SCREEN_ANGLE 4105
-#define SET_SPREAD 4106
-#define TRANSFORM_CTM 4107
-#define SET_CLIP_BOX 4108
-#define SET_BOUNDS 4109
-#define SET_MIRROR_MODE 4110
-#define OPENCHANNEL 4110
-#define DOWNLOADHEADER 4111
-#define CLOSECHANNEL 4112
-#define POSTSCRIPT_PASSTHROUGH 4115
-#define ENCAPSULATED_POSTSCRIPT 4116
-#define QDI_SETDIBITS 1
-#define QDI_GETDIBITS 2
-#define QDI_DIBTOSCREEN 4
-#define QDI_STRETCHDIB 8
-#define SP_NOTREPORTED 0x4000
-#define PR_JOBSTATUS 0
-#define ASPECT_FILTERING 1
-#define BS_SOLID 0
-#define BS_NULL 1
-#define BS_HOLLOW 1
-#define BS_HATCHED 2
-#define BS_PATTERN 3
-#define BS_INDEXED 4
-#define BS_DIBPATTERN 5
-#define BS_DIBPATTERNPT 6
-#define BS_PATTERN8X8 7
-#define BS_DIBPATTERN8X8 8
-#define LCS_CALIBRATED_RGB 0
-#define LCS_DEVICE_RGB 1
-#define LCS_DEVICE_CMYK 2
-#define LCS_GM_BUSINESS 1
-#define LCS_GM_GRAPHICS 2
-#define LCS_GM_IMAGES 4
-#define RASTER_FONTTYPE 1
-#define DEVICE_FONTTYPE 2
-#define TRUETYPE_FONTTYPE 4
-#define DMORIENT_PORTRAIT 1
-#define DMORIENT_LANDSCAPE 2
-#define DMPAPER_FIRST 1
-#define DMPAPER_LETTER 1
-#define DMPAPER_LETTERSMALL 2
-#define DMPAPER_TABLOID 3
-#define DMPAPER_LEDGER 4
-#define DMPAPER_LEGAL 5
-#define DMPAPER_STATEMENT 6
-#define DMPAPER_EXECUTIVE 7
-#define DMPAPER_A3 8
-#define DMPAPER_A4 9
-#define DMPAPER_A4SMALL 10
-#define DMPAPER_A5 11
-#define DMPAPER_B4 12
-#define DMPAPER_B5 13
-#define DMPAPER_FOLIO 14
-#define DMPAPER_QUARTO 15
-#define DMPAPER_10X14 16
-#define DMPAPER_11X17 17
-#define DMPAPER_NOTE 18
-#define DMPAPER_ENV_9 19
-#define DMPAPER_ENV_10 20
-#define DMPAPER_ENV_11 21
-#define DMPAPER_ENV_12 22
-#define DMPAPER_ENV_14 23
-#define DMPAPER_CSHEET 24
-#define DMPAPER_DSHEET 25
-#define DMPAPER_ESHEET 26
-#define DMPAPER_ENV_DL 27
-#define DMPAPER_ENV_C5 28
-#define DMPAPER_ENV_C3 29
-#define DMPAPER_ENV_C4 30
-#define DMPAPER_ENV_C6 31
-#define DMPAPER_ENV_C65 32
-#define DMPAPER_ENV_B4 33
-#define DMPAPER_ENV_B5 34
-#define DMPAPER_ENV_B6 35
-#define DMPAPER_ENV_ITALY 36
-#define DMPAPER_ENV_MONARCH 37
-#define DMPAPER_ENV_PERSONAL 38
-#define DMPAPER_FANFOLD_US 39
-#define DMPAPER_FANFOLD_STD_GERMAN 40
-#define DMPAPER_FANFOLD_LGL_GERMAN 41
-#define DMPAPER_ISO_B4 42
-#define DMPAPER_JAPANESE_POSTCARD 43
-#define DMPAPER_9X11 44
-#define DMPAPER_10X11 45
-#define DMPAPER_15X11 46
-#define DMPAPER_ENV_INVITE 47
-#define DMPAPER_RESERVED_48 48
-#define DMPAPER_RESERVED_49 49
-#define DMPAPER_LETTER_EXTRA 50
-#define DMPAPER_LEGAL_EXTRA 51
-#define DMPAPER_TABLOID_EXTRA 52
-#define DMPAPER_A4_EXTRA 53
-#define DMPAPER_LETTER_TRANSVERSE 54
-#define DMPAPER_A4_TRANSVERSE 55
-#define DMPAPER_LETTER_EXTRA_TRANSVERSE 56
-#define DMPAPER_A_PLUS 57
-#define DMPAPER_B_PLUS 58
-#define DMPAPER_LETTER_PLUS 59
-#define DMPAPER_A4_PLUS 60
-#define DMPAPER_A5_TRANSVERSE 61
-#define DMPAPER_B5_TRANSVERSE 62
-#define DMPAPER_A3_EXTRA 63
-#define DMPAPER_A5_EXTRA 64
-#define DMPAPER_B5_EXTRA 65
-#define DMPAPER_A2 66
-#define DMPAPER_A3_TRANSVERSE 67
-#define DMPAPER_A3_EXTRA_TRANSVERSE 68
-#if (WINVER >= 0x0500)
-#define DMPAPER_DBL_JAPANESE_POSTCARD 69
-#define DMPAPER_A6 70
-#define DMPAPER_JENV_KAKU2 71
-#define DMPAPER_JENV_KAKU3 72
-#define DMPAPER_JENV_CHOU3 73
-#define DMPAPER_JENV_CHOU4 74
-#define DMPAPER_LETTER_ROTATED 75
-#define DMPAPER_A3_ROTATED 76
-#define DMPAPER_A4_ROTATED 77
-#define DMPAPER_A5_ROTATED 78
-#define DMPAPER_B4_JIS_ROTATED 79
-#define DMPAPER_B5_JIS_ROTATED 80
-#define DMPAPER_JAPANESE_POSTCARD_ROTATED 81
-#define DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED 82
-#define DMPAPER_A6_ROTATED 83
-#define DMPAPER_JENV_KAKU2_ROTATED 84
-#define DMPAPER_JENV_KAKU3_ROTATED 85
-#define DMPAPER_JENV_CHOU3_ROTATED 86
-#define DMPAPER_JENV_CHOU4_ROTATED 87
-#define DMPAPER_B6_JIS 88
-#define DMPAPER_B6_JIS_ROTATED 89
-#define DMPAPER_12X11 90
-#define DMPAPER_JENV_YOU4 91
-#define DMPAPER_JENV_YOU4_ROTATED 92
-#define DMPAPER_P16K 93
-#define DMPAPER_P32K 94
-#define DMPAPER_P32KBIG 95
-#define DMPAPER_PENV_1 96
-#define DMPAPER_PENV_2 97
-#define DMPAPER_PENV_3 98
-#define DMPAPER_PENV_4 99
-#define DMPAPER_PENV_5 100
-#define DMPAPER_PENV_6 101
-#define DMPAPER_PENV_7 102
-#define DMPAPER_PENV_8 103
-#define DMPAPER_PENV_9 104
-#define DMPAPER_PENV_10 105
-#define DMPAPER_P16K_ROTATED 106
-#define DMPAPER_P32K_ROTATED 107
-#define DMPAPER_P32KBIG_ROTATED 108
-#define DMPAPER_PENV_1_ROTATED 109
-#define DMPAPER_PENV_2_ROTATED 110
-#define DMPAPER_PENV_3_ROTATED 111
-#define DMPAPER_PENV_4_ROTATED 112
-#define DMPAPER_PENV_5_ROTATED 113
-#define DMPAPER_PENV_6_ROTATED 114
-#define DMPAPER_PENV_7_ROTATED 115
-#define DMPAPER_PENV_8_ROTATED 116
-#define DMPAPER_PENV_9_ROTATED 117
-#define DMPAPER_PENV_10_ROTATED 118
-#define DMPAPER_LAST 118
-#else
-#define DMPAPER_LAST 68
-#endif
-#define DMPAPER_USER 256
-#define DMBIN_FIRST 1
-#define DMBIN_UPPER 1
-#define DMBIN_ONLYONE 1
-#define DMBIN_LOWER 2
-#define DMBIN_MIDDLE 3
-#define DMBIN_MANUAL 4
-#define DMBIN_ENVELOPE 5
-#define DMBIN_ENVMANUAL 6
-#define DMBIN_AUTO 7
-#define DMBIN_TRACTOR 8
-#define DMBIN_SMALLFMT 9
-#define DMBIN_LARGEFMT 10
-#define DMBIN_LARGECAPACITY 11
-#define DMBIN_CASSETTE 14
-#define DMBIN_FORMSOURCE 15
-#define DMBIN_LAST 15
-#define DMBIN_USER 256
-#define DMRES_DRAFT (-1)
-#define DMRES_LOW (-2)
-#define DMRES_MEDIUM (-3)
-#define DMRES_HIGH (-4)
-#define DMCOLOR_MONOCHROME 1
-#define DMCOLOR_COLOR 2
-#define DMDUP_SIMPLEX 1
-#define DMDUP_VERTICAL 2
-#define DMDUP_HORIZONTAL 3
-#define DMTT_BITMAP 1
-#define DMTT_DOWNLOAD 2
-#define DMTT_SUBDEV 3
-#define DMTT_DOWNLOAD_OUTLINE 4
-#define DMCOLLATE_FALSE 0
-#define DMCOLLATE_TRUE 1
-#define DM_SPECVERSION 800
-#define DM_GRAYSCALE 1
-#define DM_INTERLACED 2
-#define DM_UPDATE 1
-#define DM_COPY 2
-#define DM_PROMPT 4
-#define DM_MODIFY 8
-#define DM_IN_BUFFER DM_MODIFY
-#define DM_IN_PROMPT DM_PROMPT
-#define DM_OUT_BUFFER DM_COPY
-#define DM_OUT_DEFAULT DM_UPDATE
-#define DM_ORIENTATION 0x00000001
-#define DM_PAPERSIZE 0x00000002
-#define DM_PAPERLENGTH 0x00000004
-#define DM_PAPERWIDTH 0x00000008
-#define DM_SCALE 0x00000010
-#define DM_POSITION 0x00000020
-#define DM_COPIES 0x00000100
-#define DM_DEFAULTSOURCE 0x00000200
-#define DM_PRINTQUALITY 0x00000400
-#define DM_COLOR 0x00000800
-#define DM_DUPLEX 0x00001000
-#define DM_YRESOLUTION 0x00002000
-#define DM_TTOPTION 0x00004000
-#define DM_COLLATE 0x00008000
-#define DM_FORMNAME 0x00010000
-#define DM_LOGPIXELS 0x00020000
-#define DM_BITSPERPEL 0x00040000
-#define DM_PELSWIDTH 0x00080000
-#define DM_PELSHEIGHT 0x00100000
-#define DM_DISPLAYFLAGS 0x00200000
-#define DM_DISPLAYFREQUENCY 0x00400000
-#define DM_ICMMETHOD 0x00800000
-#define DM_ICMINTENT 0x01000000
-#define DM_MEDIATYPE 0x02000000
-#define DM_DITHERTYPE 0x04000000
-#if(WINVER >= 0x0500)
-#define DM_PANNINGWIDTH 0x08000000
-#define DM_PANNINGHEIGHT 0x10000000
-#endif
-#if(WINVER >= 0x0501)
-#define DM_DISPLAYFIXEDOUTPUT 0x20000000
-#define DM_DISPLAYORIENTATION 0x00000080
-#define DMDO_DEFAULT 0x00000000
-#define DMDO_90 0x00000001
-#define DMDO_180 0x00000002
-#define DMDO_270 0x00000003
-#define DMDFO_DEFAULT 0x00000000
-#define DMDFO_STRETCH 0x00000001
-#define DMDFO_CENTER 0x00000002
-#endif
-#define DMICMMETHOD_NONE 1
-#define DMICMMETHOD_SYSTEM 2
-#define DMICMMETHOD_DRIVER 3
-#define DMICMMETHOD_DEVICE 4
-#define DMICMMETHOD_USER 256
-#define DMICM_SATURATE 1
-#define DMICM_CONTRAST 2
-#define DMICM_COLORMETRIC 3
-#define DMICM_USER 256
-#define DMMEDIA_STANDARD 1
-#define DMMEDIA_TRANSPARENCY 2
-#define DMMEDIA_GLOSSY 3
-#define DMMEDIA_USER 256
-#define DMDITHER_NONE 1
-#define DMDITHER_COARSE 2
-#define DMDITHER_FINE 3
-#define DMDITHER_LINEART 4
-#define DMDITHER_ERRORDIFFUSION 5
-#define DMDITHER_RESERVED6 6
-#define DMDITHER_RESERVED7 7
-#define DMDITHER_RESERVED8 8
-#define DMDITHER_RESERVED9 9
-#define DMDITHER_GRAYSCALE 10
-#define DMDITHER_USER 256
-#define GDI_ERROR 0xFFFFFFFF
-#define HGDI_ERROR ((HANDLE)GDI_ERROR)
-#define TMPF_FIXED_PITCH 1
-#define TMPF_VECTOR 2
-#define TMPF_TRUETYPE 4
-#define TMPF_DEVICE 8
-#define NTM_ITALIC 1
-#define NTM_BOLD 32
-#define NTM_REGULAR 64
-#define TT_POLYGON_TYPE 24
-#define TT_PRIM_LINE 1
-#define TT_PRIM_QSPLINE 2
-#define TT_PRIM_CSPLINE 3
-#define FONTMAPPER_MAX 10
-#define ENHMETA_STOCK_OBJECT 0x80000000
-#define WGL_FONT_LINES 0
-#define WGL_FONT_POLYGONS 1
-#define LPD_DOUBLEBUFFER 1
-#define LPD_STEREO 2
-#define LPD_SUPPORT_GDI 16
-#define LPD_SUPPORT_OPENGL 32
-#define LPD_SHARE_DEPTH 64
-#define LPD_SHARE_STENCIL 128
-#define LPD_SHARE_ACCUM 256
-#define LPD_SWAP_EXCHANGE 512
-#define LPD_SWAP_COPY 1024
-#define LPD_TRANSPARENT 4096
-#define LPD_TYPE_RGBA 0
-#define LPD_TYPE_COLORINDEX 1
-#define WGL_SWAP_MAIN_PLANE 1
-#define WGL_SWAP_OVERLAY1 2
-#define WGL_SWAP_OVERLAY2 4
-#define WGL_SWAP_OVERLAY3 8
-#define WGL_SWAP_OVERLAY4 16
-#define WGL_SWAP_OVERLAY5 32
-#define WGL_SWAP_OVERLAY6 64
-#define WGL_SWAP_OVERLAY7 128
-#define WGL_SWAP_OVERLAY8 256
-#define WGL_SWAP_OVERLAY9 512
-#define WGL_SWAP_OVERLAY10 1024
-#define WGL_SWAP_OVERLAY11 2048
-#define WGL_SWAP_OVERLAY12 4096
-#define WGL_SWAP_OVERLAY13 8192
-#define WGL_SWAP_OVERLAY14 16384
-#define WGL_SWAP_OVERLAY15 32768
-#define WGL_SWAP_UNDERLAY1 65536
-#define WGL_SWAP_UNDERLAY2 0x20000
-#define WGL_SWAP_UNDERLAY3 0x40000
-#define WGL_SWAP_UNDERLAY4 0x80000
-#define WGL_SWAP_UNDERLAY5 0x100000
-#define WGL_SWAP_UNDERLAY6 0x200000
-#define WGL_SWAP_UNDERLAY7 0x400000
-#define WGL_SWAP_UNDERLAY8 0x800000
-#define WGL_SWAP_UNDERLAY9 0x1000000
-#define WGL_SWAP_UNDERLAY10 0x2000000
-#define WGL_SWAP_UNDERLAY11 0x4000000
-#define WGL_SWAP_UNDERLAY12 0x8000000
-#define WGL_SWAP_UNDERLAY13 0x10000000
-#define WGL_SWAP_UNDERLAY14 0x20000000
-#define WGL_SWAP_UNDERLAY15 0x40000000
-#define AC_SRC_OVER 0x00
-#define AC_SRC_ALPHA 0x01
-#define AC_SRC_NO_PREMULT_ALPHA 0x01
-#define AC_SRC_NO_ALPHA 0x02
-#define AC_DST_NO_PREMULT_ALPHA 0x10
-#define AC_DST_NO_ALPHA 0x20
-#define LAYOUT_RTL 1
-#define LAYOUT_BITMAPORIENTATIONPRESERVED 8
-#if (WINVER >= 0x0400)
-#define CS_ENABLE 0x00000001
-#define CS_DISABLE 0x00000002
-#define CS_DELETE_TRANSFORM 0x00000003
-#endif
-#if (WINVER >= 0x0500)
-#define GRADIENT_FILL_RECT_H 0x00
-#define GRADIENT_FILL_RECT_V 0x01
-#define GRADIENT_FILL_TRIANGLE 0x02
-#define GRADIENT_FILL_OP_FLAG 0xff
-#define COLORMATCHTOTARGET_EMBEDED 0x00000001
-#define CREATECOLORSPACE_EMBEDED 0x00000001
-#define SETICMPROFILE_EMBEDED 0x00000001
-#endif
-
-#define DISPLAY_DEVICE_ATTACHED_TO_DESKTOP 0x00000001
-#define DISPLAY_DEVICE_MULTI_DRIVER 0x00000002
-#define DISPLAY_DEVICE_PRIMARY_DEVICE 0x00000004
-#define DISPLAY_DEVICE_MIRRORING_DRIVER 0x00000008
-#define DISPLAY_DEVICE_VGA_COMPATIBLE 0x00000010
-#define DISPLAY_DEVICE_REMOVABLE 0x00000020
-#define DISPLAY_DEVICE_MODESPRUNED 0x08000000
-
-#if (_WIN32_WINNT >= 0x0500)
-#define NTM_NONNEGATIVE_AC 0x00010000
-#define NTM_PS_OPENTYPE 0x00020000
-#define NTM_TT_OPENTYPE 0x00040000
-#define NTM_MULTIPLEMASTER 0x00080000
-#define NTM_TYPE1 0x00100000
-#define NTM_DSIG 0x00200000
-#endif
-
-#if (_WIN32_WINNT >= 0x0500)
-#define GGI_MARK_NONEXISTING_GLYPHS 1
-#endif
-
-#ifndef RC_INVOKED
-typedef struct _ABC {
- int abcA;
- UINT abcB;
- int abcC;
-} ABC,*LPABC;
-typedef struct _ABCFLOAT {
- FLOAT abcfA;
- FLOAT abcfB;
- FLOAT abcfC;
-} ABCFLOAT,*LPABCFLOAT;
-typedef struct tagBITMAP {
- LONG bmType;
- LONG bmWidth;
- LONG bmHeight;
- LONG bmWidthBytes;
- WORD bmPlanes;
- WORD bmBitsPixel;
- LPVOID bmBits;
-} BITMAP,*PBITMAP,*LPBITMAP;
-typedef struct tagBITMAPCOREHEADER {
- DWORD bcSize;
- WORD bcWidth;
- WORD bcHeight;
- WORD bcPlanes;
- WORD bcBitCount;
-} BITMAPCOREHEADER,*LPBITMAPCOREHEADER,*PBITMAPCOREHEADER;
-#pragma pack(push,1)
-typedef struct tagRGBTRIPLE {
- BYTE rgbtBlue;
- BYTE rgbtGreen;
- BYTE rgbtRed;
-} RGBTRIPLE,*LPRGBTRIPLE;
-#pragma pack(pop)
-#pragma pack(push,2)
-typedef struct tagBITMAPFILEHEADER {
- WORD bfType;
- DWORD bfSize;
- WORD bfReserved1;
- WORD bfReserved2;
- DWORD bfOffBits;
-} BITMAPFILEHEADER,*LPBITMAPFILEHEADER,*PBITMAPFILEHEADER;
-#pragma pack(pop)
-typedef struct _BITMAPCOREINFO {
- BITMAPCOREHEADER bmciHeader;
- RGBTRIPLE bmciColors[1];
-} BITMAPCOREINFO,*LPBITMAPCOREINFO,*PBITMAPCOREINFO;
-typedef struct tagBITMAPINFOHEADER{
- DWORD biSize;
- LONG biWidth;
- LONG biHeight;
- WORD biPlanes;
- WORD biBitCount;
- DWORD biCompression;
- DWORD biSizeImage;
- LONG biXPelsPerMeter;
- LONG biYPelsPerMeter;
- DWORD biClrUsed;
- DWORD biClrImportant;
-} BITMAPINFOHEADER,*LPBITMAPINFOHEADER,*PBITMAPINFOHEADER;
-typedef struct tagRGBQUAD {
- BYTE rgbBlue;
- BYTE rgbGreen;
- BYTE rgbRed;
- BYTE rgbReserved;
-} RGBQUAD,*LPRGBQUAD;
-typedef struct tagBITMAPINFO {
- BITMAPINFOHEADER bmiHeader;
- RGBQUAD bmiColors[1];
-} BITMAPINFO,*LPBITMAPINFO,*PBITMAPINFO;
-typedef long FXPT16DOT16,*LPFXPT16DOT16;
-typedef long FXPT2DOT30,*LPFXPT2DOT30;
-typedef struct tagCIEXYZ {
- FXPT2DOT30 ciexyzX;
- FXPT2DOT30 ciexyzY;
- FXPT2DOT30 ciexyzZ;
-} CIEXYZ,*LPCIEXYZ;
-typedef struct tagCIEXYZTRIPLE {
- CIEXYZ ciexyzRed;
- CIEXYZ ciexyzGreen;
- CIEXYZ ciexyzBlue;
-} CIEXYZTRIPLE,*LPCIEXYZTRIPLE;
-typedef struct {
- DWORD bV4Size;
- LONG bV4Width;
- LONG bV4Height;
- WORD bV4Planes;
- WORD bV4BitCount;
- DWORD bV4V4Compression;
- DWORD bV4SizeImage;
- LONG bV4XPelsPerMeter;
- LONG bV4YPelsPerMeter;
- DWORD bV4ClrUsed;
- DWORD bV4ClrImportant;
- DWORD bV4RedMask;
- DWORD bV4GreenMask;
- DWORD bV4BlueMask;
- DWORD bV4AlphaMask;
- DWORD bV4CSType;
- CIEXYZTRIPLE bV4Endpoints;
- DWORD bV4GammaRed;
- DWORD bV4GammaGreen;
- DWORD bV4GammaBlue;
-} BITMAPV4HEADER,*LPBITMAPV4HEADER,*PBITMAPV4HEADER;
-typedef struct {
- DWORD bV5Size;
- LONG bV5Width;
- LONG bV5Height;
- WORD bV5Planes;
- WORD bV5BitCount;
- DWORD bV5Compression;
- DWORD bV5SizeImage;
- LONG bV5XPelsPerMeter;
- LONG bV5YPelsPerMeter;
- DWORD bV5ClrUsed;
- DWORD bV5ClrImportant;
- DWORD bV5RedMask;
- DWORD bV5GreenMask;
- DWORD bV5BlueMask;
- DWORD bV5AlphaMask;
- DWORD bV5CSType;
- CIEXYZTRIPLE bV5Endpoints;
- DWORD bV5GammaRed;
- DWORD bV5GammaGreen;
- DWORD bV5GammaBlue;
- DWORD bV5Intent;
- DWORD bV5ProfileData;
- DWORD bV5ProfileSize;
- DWORD bV5Reserved;
-} BITMAPV5HEADER,*LPBITMAPV5HEADER,*PBITMAPV5HEADER;
-typedef struct tagFONTSIGNATURE {
- DWORD fsUsb[4];
- DWORD fsCsb[2];
-} FONTSIGNATURE,*LPFONTSIGNATURE;
-typedef struct {
- UINT ciCharset;
- UINT ciACP;
- FONTSIGNATURE fs;
-} CHARSETINFO,*LPCHARSETINFO;
-typedef struct tagCOLORADJUSTMENT {
- WORD caSize;
- WORD caFlags;
- WORD caIlluminantIndex;
- WORD caRedGamma;
- WORD caGreenGamma;
- WORD caBlueGamma;
- WORD caReferenceBlack;
- WORD caReferenceWhite;
- SHORT caContrast;
- SHORT caBrightness;
- SHORT caColorfulness;
- SHORT caRedGreenTint;
-} COLORADJUSTMENT,*LPCOLORADJUSTMENT;
-typedef struct _devicemodeA {
- BYTE dmDeviceName[CCHDEVICENAME];
- WORD dmSpecVersion;
- WORD dmDriverVersion;
- WORD dmSize;
- WORD dmDriverExtra;
- DWORD dmFields;
- _ANONYMOUS_UNION union {
- _ANONYMOUS_STRUCT struct {
- short dmOrientation;
- short dmPaperSize;
- short dmPaperLength;
- short dmPaperWidth;
- short dmScale;
- short dmCopies;
- short dmDefaultSource;
- short dmPrintQuality;
- } DUMMYSTRUCTNAME;
- POINTL dmPosition;
- DWORD dmDisplayOrientation;
- DWORD dmDisplayFixedOutput;
- } DUMMYUNIONNAME;
-
- short dmColor;
- short dmDuplex;
- short dmYResolution;
- short dmTTOption;
- short dmCollate;
- BYTE dmFormName[CCHFORMNAME];
- WORD dmLogPixels;
- DWORD dmBitsPerPel;
- DWORD dmPelsWidth;
- DWORD dmPelsHeight;
- _ANONYMOUS_UNION union {
- DWORD dmDisplayFlags;
- DWORD dmNup;
- } DUMMYUNIONNAME2;
- DWORD dmDisplayFrequency;
-#if(WINVER >= 0x0400)
- DWORD dmICMMethod;
- DWORD dmICMIntent;
- DWORD dmMediaType;
- DWORD dmDitherType;
- DWORD dmReserved1;
- DWORD dmReserved2;
-#if (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400)
- DWORD dmPanningWidth;
- DWORD dmPanningHeight;
-#endif
-#endif /* WINVER >= 0x0400 */
-} DEVMODEA,*LPDEVMODEA,*PDEVMODEA;
-typedef struct _devicemodeW {
- WCHAR dmDeviceName[CCHDEVICENAME];
- WORD dmSpecVersion;
- WORD dmDriverVersion;
- WORD dmSize;
- WORD dmDriverExtra;
- DWORD dmFields;
- _ANONYMOUS_UNION union {
- _ANONYMOUS_STRUCT struct {
- short dmOrientation;
- short dmPaperSize;
- short dmPaperLength;
- short dmPaperWidth;
- short dmScale;
- short dmCopies;
- short dmDefaultSource;
- short dmPrintQuality;
- } DUMMYSTRUCTNAME;
- POINTL dmPosition;
- DWORD dmDisplayOrientation;
- DWORD dmDisplayFixedOutput;
- } DUMMYUNIONNAME;
-
- short dmColor;
- short dmDuplex;
- short dmYResolution;
- short dmTTOption;
- short dmCollate;
- WCHAR dmFormName[CCHFORMNAME];
- WORD dmLogPixels;
- DWORD dmBitsPerPel;
- DWORD dmPelsWidth;
- DWORD dmPelsHeight;
- _ANONYMOUS_UNION union {
- DWORD dmDisplayFlags;
- DWORD dmNup;
- } DUMMYUNIONNAME2;
- DWORD dmDisplayFrequency;
-#if(WINVER >= 0x0400)
- DWORD dmICMMethod;
- DWORD dmICMIntent;
- DWORD dmMediaType;
- DWORD dmDitherType;
- DWORD dmReserved1;
- DWORD dmReserved2;
-#if (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400)
- DWORD dmPanningWidth;
- DWORD dmPanningHeight;
-#endif
-#endif /* WINVER >= 0x0400 */
-} DEVMODEW,*LPDEVMODEW,*PDEVMODEW;
-typedef struct tagDIBSECTION {
- BITMAP dsBm;
- BITMAPINFOHEADER dsBmih;
- DWORD dsBitfields[3];
- HANDLE dshSection;
- DWORD dsOffset;
-} DIBSECTION;
-typedef struct _DOCINFOA {
- int cbSize;
- LPCSTR lpszDocName;
- LPCSTR lpszOutput;
- LPCSTR lpszDatatype;
- DWORD fwType;
-} DOCINFOA,*LPDOCINFOA;
-typedef struct _DOCINFOW {
- int cbSize;
- LPCWSTR lpszDocName;
- LPCWSTR lpszOutput;
- LPCWSTR lpszDatatype;
- DWORD fwType;
-} DOCINFOW,*LPDOCINFOW;
-typedef struct tagEMR {
- DWORD iType;
- DWORD nSize;
-} EMR,*PEMR;
-typedef struct tagEMRANGLEARC {
- EMR emr;
- POINTL ptlCenter;
- DWORD nRadius;
- FLOAT eStartAngle;
- FLOAT eSweepAngle;
-} EMRANGLEARC,*PEMRANGLEARC;
-typedef struct tagEMRARC {
- EMR emr;
- RECTL rclBox;
- POINTL ptlStart;
- POINTL ptlEnd;
-} EMRARC,*PEMRARC,EMRARCTO,*PEMRARCTO,EMRCHORD,*PEMRCHORD,EMRPIE,*PEMRPIE;
-typedef struct _XFORM {
- FLOAT eM11;
- FLOAT eM12;
- FLOAT eM21;
- FLOAT eM22;
- FLOAT eDx;
- FLOAT eDy;
-} XFORM,*PXFORM,*LPXFORM;
-typedef struct tagEMRBITBLT {
- EMR emr;
- RECTL rclBounds;
- LONG xDest;
- LONG yDest;
- LONG cxDest;
- LONG cyDest;
- DWORD dwRop;
- LONG xSrc;
- LONG ySrc;
- XFORM xformSrc;
- COLORREF crBkColorSrc;
- DWORD iUsageSrc;
- DWORD offBmiSrc;
- DWORD offBitsSrc;
- DWORD cbBitsSrc;
-} EMRBITBLT,*PEMRBITBLT;
-typedef struct tagLOGBRUSH {
- UINT lbStyle;
- COLORREF lbColor;
- LONG lbHatch;
-} LOGBRUSH,*PLOGBRUSH,*LPLOGBRUSH;
-typedef LOGBRUSH PATTERN,*PPATTERN,*LPPATTERN;
-typedef struct tagEMRCREATEBRUSHINDIRECT {
- EMR emr;
- DWORD ihBrush;
- LOGBRUSH lb;
-} EMRCREATEBRUSHINDIRECT,*PEMRCREATEBRUSHINDIRECT;
-typedef LONG LCSCSTYPE;
-typedef LONG LCSGAMUTMATCH;
-typedef struct tagLOGCOLORSPACEA {
- DWORD lcsSignature;
- DWORD lcsVersion;
- DWORD lcsSize;
- LCSCSTYPE lcsCSType;
- LCSGAMUTMATCH lcsIntent;
- CIEXYZTRIPLE lcsEndpoints;
- DWORD lcsGammaRed;
- DWORD lcsGammaGreen;
- DWORD lcsGammaBlue;
- CHAR lcsFilename[MAX_PATH];
-} LOGCOLORSPACEA,*LPLOGCOLORSPACEA;
-typedef struct tagLOGCOLORSPACEW {
- DWORD lcsSignature;
- DWORD lcsVersion;
- DWORD lcsSize;
- LCSCSTYPE lcsCSType;
- LCSGAMUTMATCH lcsIntent;
- CIEXYZTRIPLE lcsEndpoints;
- DWORD lcsGammaRed;
- DWORD lcsGammaGreen;
- DWORD lcsGammaBlue;
- WCHAR lcsFilename[MAX_PATH];
-} LOGCOLORSPACEW,*LPLOGCOLORSPACEW;
-typedef struct tagEMRCREATECOLORSPACE {
- EMR emr;
- DWORD ihCS;
- LOGCOLORSPACEW lcs;
-} EMRCREATECOLORSPACE,*PEMRCREATECOLORSPACE;
-typedef struct tagEMRCREATEDIBPATTERNBRUSHPT {
- EMR emr;
- DWORD ihBrush;
- DWORD iUsage;
- DWORD offBmi;
- DWORD cbBmi;
- DWORD offBits;
- DWORD cbBits;
-} EMRCREATEDIBPATTERNBRUSHPT,*PEMRCREATEDIBPATTERNBRUSHPT;
-typedef struct tagEMRCREATEMONOBRUSH {
- EMR emr;
- DWORD ihBrush;
- DWORD iUsage;
- DWORD offBmi;
- DWORD cbBmi;
- DWORD offBits;
- DWORD cbBits;
-} EMRCREATEMONOBRUSH,*PEMRCREATEMONOBRUSH;
-typedef struct tagPALETTEENTRY {
- BYTE peRed;
- BYTE peGreen;
- BYTE peBlue;
- BYTE peFlags;
-} PALETTEENTRY,*LPPALETTEENTRY,*PPALETTEENTRY;
-typedef struct tagLOGPALETTE {
- WORD palVersion;
- WORD palNumEntries;
- PALETTEENTRY palPalEntry[1];
-} LOGPALETTE,*NPLOGPALETTE,*PLOGPALETTE,*LPLOGPALETTE;
-typedef struct tagEMRCREATEPALETTE {
- EMR emr;
- DWORD ihPal;
- LOGPALETTE lgpl;
-} EMRCREATEPALETTE,*PEMRCREATEPALETTE;
-typedef struct tagLOGPEN {
- UINT lopnStyle;
- POINT lopnWidth;
- COLORREF lopnColor;
-} LOGPEN,*PLOGPEN,*LPLOGPEN;
-typedef struct tagEMRCREATEPEN {
- EMR emr;
- DWORD ihPen;
- LOGPEN lopn;
-} EMRCREATEPEN,*PEMRCREATEPEN;
-typedef struct tagEMRELLIPSE {
- EMR emr;
- RECTL rclBox;
-} EMRELLIPSE,*PEMRELLIPSE,EMRRECTANGLE,*PEMRRECTANGLE;
-typedef struct tagEMREOF {
- EMR emr;
- DWORD nPalEntries;
- DWORD offPalEntries;
- DWORD nSizeLast;
-} EMREOF,*PEMREOF;
-typedef struct tagEMREXCLUDECLIPRECT {
- EMR emr;
- RECTL rclClip;
-} EMREXCLUDECLIPRECT,*PEMREXCLUDECLIPRECT,EMRINTERSECTCLIPRECT,*PEMRINTERSECTCLIPRECT;
-typedef struct tagPANOSE {
- BYTE bFamilyType;
- BYTE bSerifStyle;
- BYTE bWeight;
- BYTE bProportion;
- BYTE bContrast;
- BYTE bStrokeVariation;
- BYTE bArmStyle;
- BYTE bLetterform;
- BYTE bMidline;
- BYTE bXHeight;
-} PANOSE;
-typedef struct tagLOGFONTA {
- LONG lfHeight;
- LONG lfWidth;
- LONG lfEscapement;
- LONG lfOrientation;
- LONG lfWeight;
- BYTE lfItalic;
- BYTE lfUnderline;
- BYTE lfStrikeOut;
- BYTE lfCharSet;
- BYTE lfOutPrecision;
- BYTE lfClipPrecision;
- BYTE lfQuality;
- BYTE lfPitchAndFamily;
- CHAR lfFaceName[LF_FACESIZE];
-} LOGFONTA,*PLOGFONTA,*LPLOGFONTA;
-typedef struct tagLOGFONTW {
- LONG lfHeight;
- LONG lfWidth;
- LONG lfEscapement;
- LONG lfOrientation;
- LONG lfWeight;
- BYTE lfItalic;
- BYTE lfUnderline;
- BYTE lfStrikeOut;
- BYTE lfCharSet;
- BYTE lfOutPrecision;
- BYTE lfClipPrecision;
- BYTE lfQuality;
- BYTE lfPitchAndFamily;
- WCHAR lfFaceName[LF_FACESIZE];
-} LOGFONTW,*PLOGFONTW,*LPLOGFONTW;
-typedef struct tagEXTLOGFONTA {
- LOGFONTA elfLogFont;
- BYTE elfFullName[LF_FULLFACESIZE];
- BYTE elfStyle[LF_FACESIZE];
- DWORD elfVersion;
- DWORD elfStyleSize;
- DWORD elfMatch;
- DWORD elfReserved;
- BYTE elfVendorId[ELF_VENDOR_SIZE];
- DWORD elfCulture;
- PANOSE elfPanose;
-} EXTLOGFONTA,*PEXTLOGFONTA,*LPEXTLOGFONTA;
-typedef struct tagEXTLOGFONTW {
- LOGFONTW elfLogFont;
- WCHAR elfFullName[LF_FULLFACESIZE];
- WCHAR elfStyle[LF_FACESIZE];
- DWORD elfVersion;
- DWORD elfStyleSize;
- DWORD elfMatch;
- DWORD elfReserved;
- BYTE elfVendorId[ELF_VENDOR_SIZE];
- DWORD elfCulture;
- PANOSE elfPanose;
-} EXTLOGFONTW,*PEXTLOGFONTW,*LPEXTLOGFONTW;
-typedef struct tagEMREXTCREATEFONTINDIRECTW {
- EMR emr;
- DWORD ihFont;
- EXTLOGFONTW elfw;
-} EMREXTCREATEFONTINDIRECTW,*PEMREXTCREATEFONTINDIRECTW;
-typedef struct tagEXTLOGPEN {
- UINT elpPenStyle;
- UINT elpWidth;
- UINT elpBrushStyle;
- COLORREF elpColor;
- LONG elpHatch;
- DWORD elpNumEntries;
- DWORD elpStyleEntry[1];
-} EXTLOGPEN,*PEXTLOGPEN,*LPEXTLOGPEN;
-typedef struct tagEMREXTCREATEPEN {
- EMR emr;
- DWORD ihPen;
- DWORD offBmi;
- DWORD cbBmi;
- DWORD offBits;
- DWORD cbBits;
- EXTLOGPEN elp;
-} EMREXTCREATEPEN,*PEMREXTCREATEPEN;
-typedef struct tagEMREXTFLOODFILL {
- EMR emr;
- POINTL ptlStart;
- COLORREF crColor;
- DWORD iMode;
-} EMREXTFLOODFILL,*PEMREXTFLOODFILL;
-typedef struct tagEMREXTSELECTCLIPRGN {
- EMR emr;
- DWORD cbRgnData;
- DWORD iMode;
- BYTE RgnData[1];
-} EMREXTSELECTCLIPRGN,*PEMREXTSELECTCLIPRGN;
-typedef struct tagEMRTEXT {
- POINTL ptlReference;
- DWORD nChars;
- DWORD offString;
- DWORD fOptions;
- RECTL rcl;
- DWORD offDx;
-} EMRTEXT,*PEMRTEXT;
-typedef struct tagEMREXTTEXTOUTA {
- EMR emr;
- RECTL rclBounds;
- DWORD iGraphicsMode;
- FLOAT exScale;
- FLOAT eyScale;
- EMRTEXT emrtext;
-} EMREXTTEXTOUTA,*PEMREXTTEXTOUTA,EMREXTTEXTOUTW,*PEMREXTTEXTOUTW;
-typedef struct tagEMRFILLPATH {
- EMR emr;
- RECTL rclBounds;
-} EMRFILLPATH,*PEMRFILLPATH,EMRSTROKEANDFILLPATH,*PEMRSTROKEANDFILLPATH,EMRSTROKEPATH,*PEMRSTROKEPATH;
-typedef struct tagEMRFILLRGN {
- EMR emr;
- RECTL rclBounds;
- DWORD cbRgnData;
- DWORD ihBrush;
- BYTE RgnData[1];
-} EMRFILLRGN,*PEMRFILLRGN;
-typedef struct tagEMRFORMAT {
- DWORD dSignature;
- DWORD nVersion;
- DWORD cbData;
- DWORD offData;
-} EMRFORMAT;
-typedef struct tagEMRFRAMERGN {
- EMR emr;
- RECTL rclBounds;
- DWORD cbRgnData;
- DWORD ihBrush;
- SIZEL szlStroke;
- BYTE RgnData[1];
-} EMRFRAMERGN,*PEMRFRAMERGN;
-typedef struct tagEMRGDICOMMENT {
- EMR emr;
- DWORD cbData;
- BYTE Data[1];
-} EMRGDICOMMENT,*PEMRGDICOMMENT;
-typedef struct tagEMRINVERTRGN {
- EMR emr;
- RECTL rclBounds;
- DWORD cbRgnData;
- BYTE RgnData[1];
-} EMRINVERTRGN,*PEMRINVERTRGN,EMRPAINTRGN,*PEMRPAINTRGN;
-typedef struct tagEMRLINETO {
- EMR emr;
- POINTL ptl;
-} EMRLINETO,*PEMRLINETO,EMRMOVETOEX,*PEMRMOVETOEX;
-typedef struct tagEMRMASKBLT {
- EMR emr;
- RECTL rclBounds;
- LONG xDest;
- LONG yDest;
- LONG cxDest;
- LONG cyDest;
- DWORD dwRop;
- LONG xSrc;
- LONG ySrc;
- XFORM xformSrc;
- COLORREF crBkColorSrc;
- DWORD iUsageSrc;
- DWORD offBmiSrc;
- DWORD cbBmiSrc;
- DWORD offBitsSrc;
- DWORD cbBitsSrc;
- LONG xMask;
- LONG yMask;
- DWORD iUsageMask;
- DWORD offBmiMask;
- DWORD cbBmiMask;
- DWORD offBitsMask;
- DWORD cbBitsMask;
-} EMRMASKBLT,*PEMRMASKBLT;
-typedef struct tagEMRMODIFYWORLDTRANSFORM {
- EMR emr;
- XFORM xform;
- DWORD iMode;
-} EMRMODIFYWORLDTRANSFORM,*PEMRMODIFYWORLDTRANSFORM;
-typedef struct tagEMROFFSETCLIPRGN {
- EMR emr;
- POINTL ptlOffset;
-} EMROFFSETCLIPRGN,*PEMROFFSETCLIPRGN;
-typedef struct tagEMRPLGBLT {
- EMR emr;
- RECTL rclBounds;
- POINTL aptlDest[3];
- LONG xSrc;
- LONG ySrc;
- LONG cxSrc;
- LONG cySrc;
- XFORM xformSrc;
- COLORREF crBkColorSrc;
- DWORD iUsageSrc;
- DWORD offBmiSrc;
- DWORD cbBmiSrc;
- DWORD offBitsSrc;
- DWORD cbBitsSrc;
- LONG xMask;
- LONG yMask;
- DWORD iUsageMask;
- DWORD offBmiMask;
- DWORD cbBmiMask;
- DWORD offBitsMask;
- DWORD cbBitsMask;
-} EMRPLGBLT,*PEMRPLGBLT;
-typedef struct tagEMRPOLYDRAW {
- EMR emr;
- RECTL rclBounds;
- DWORD cptl;
- POINTL aptl[1];
- BYTE abTypes[1];
-} EMRPOLYDRAW,*PEMRPOLYDRAW;
-typedef struct tagEMRPOLYDRAW16 {
- EMR emr;
- RECTL rclBounds;
- DWORD cpts;
- POINTS apts[1];
- BYTE abTypes[1];
-} EMRPOLYDRAW16,*PEMRPOLYDRAW16;
-typedef struct tagEMRPOLYLINE {
- EMR emr;
- RECTL rclBounds;
- DWORD cptl;
- POINTL aptl[1];
-} EMRPOLYLINE,*PEMRPOLYLINE,EMRPOLYBEZIER,*PEMRPOLYBEZIER,EMRPOLYGON,*PEMRPOLYGON,EMRPOLYBEZIERTO,*PEMRPOLYBEZIERTO,EMRPOLYLINETO,*PEMRPOLYLINETO;
-typedef struct tagEMRPOLYLINE16 {
- EMR emr;
- RECTL rclBounds;
- DWORD cpts;
- POINTL apts[1];
-} EMRPOLYLINE16,*PEMRPOLYLINE16,EMRPOLYBEZIER16,*PEMRPOLYBEZIER16,EMRPOLYGON16,*PEMRPOLYGON16,EMRPOLYBEZIERTO16,*PEMRPOLYBEZIERTO16,EMRPOLYLINETO16,*PEMRPOLYLINETO16;
-typedef struct tagEMRPOLYPOLYLINE {
- EMR emr;
- RECTL rclBounds;
- DWORD nPolys;
- DWORD cptl;
- DWORD aPolyCounts[1];
- POINTL aptl[1];
-} EMRPOLYPOLYLINE,*PEMRPOLYPOLYLINE,EMRPOLYPOLYGON,*PEMRPOLYPOLYGON;
-typedef struct tagEMRPOLYPOLYLINE16 {
- EMR emr;
- RECTL rclBounds;
- DWORD nPolys;
- DWORD cpts;
- DWORD aPolyCounts[1];
- POINTS apts[1];
-} EMRPOLYPOLYLINE16,*PEMRPOLYPOLYLINE16,EMRPOLYPOLYGON16,*PEMRPOLYPOLYGON16;
-typedef struct tagEMRPOLYTEXTOUTA {
- EMR emr;
- RECTL rclBounds;
- DWORD iGraphicsMode;
- FLOAT exScale;
- FLOAT eyScale;
- LONG cStrings;
- EMRTEXT aemrtext[1];
-} EMRPOLYTEXTOUTA,*PEMRPOLYTEXTOUTA,EMRPOLYTEXTOUTW,*PEMRPOLYTEXTOUTW;
-typedef struct tagEMRRESIZEPALETTE {
- EMR emr;
- DWORD ihPal;
- DWORD cEntries;
-} EMRRESIZEPALETTE,*PEMRRESIZEPALETTE;
-typedef struct tagEMRRESTOREDC {
- EMR emr;
- LONG iRelative;
-} EMRRESTOREDC,*PEMRRESTOREDC;
-typedef struct tagEMRROUNDRECT {
- EMR emr;
- RECTL rclBox;
- SIZEL szlCorner;
-} EMRROUNDRECT,*PEMRROUNDRECT;
-typedef struct tagEMRSCALEVIEWPORTEXTEX {
- EMR emr;
- LONG xNum;
- LONG xDenom;
- LONG yNum;
- LONG yDenom;
-} EMRSCALEVIEWPORTEXTEX,*PEMRSCALEVIEWPORTEXTEX,EMRSCALEWINDOWEXTEX,*PEMRSCALEWINDOWEXTEX;
-typedef struct tagEMRSELECTCOLORSPACE {
- EMR emr;
- DWORD ihCS;
-} EMRSELECTCOLORSPACE,*PEMRSELECTCOLORSPACE,EMRDELETECOLORSPACE,*PEMRDELETECOLORSPACE;
-typedef struct tagEMRSELECTOBJECT {
- EMR emr;
- DWORD ihObject;
-} EMRSELECTOBJECT,*PEMRSELECTOBJECT,EMRDELETEOBJECT,*PEMRDELETEOBJECT;
-typedef struct tagEMRSELECTPALETTE {
- EMR emr;
- DWORD ihPal;
-} EMRSELECTPALETTE,*PEMRSELECTPALETTE;
-typedef struct tagEMRSETARCDIRECTION {
- EMR emr;
- DWORD iArcDirection;
-} EMRSETARCDIRECTION,*PEMRSETARCDIRECTION;
-typedef struct tagEMRSETTEXTCOLOR {
- EMR emr;
- COLORREF crColor;
-} EMRSETBKCOLOR,*PEMRSETBKCOLOR,EMRSETTEXTCOLOR,*PEMRSETTEXTCOLOR;
-typedef struct tagEMRSETCOLORADJUSTMENT {
- EMR emr;
- COLORADJUSTMENT ColorAdjustment;
-} EMRSETCOLORADJUSTMENT,*PEMRSETCOLORADJUSTMENT;
-typedef struct tagEMRSETDIBITSTODEVICE {
- EMR emr;
- RECTL rclBounds;
- LONG xDest;
- LONG yDest;
- LONG xSrc;
- LONG ySrc;
- LONG cxSrc;
- LONG cySrc;
- DWORD offBmiSrc;
- DWORD cbBmiSrc;
- DWORD offBitsSrc;
- DWORD cbBitsSrc;
- DWORD iUsageSrc;
- DWORD iStartScan;
- DWORD cScans;
-} EMRSETDIBITSTODEVICE,*PEMRSETDIBITSTODEVICE;
-typedef struct tagEMRSETMAPPERFLAGS {
- EMR emr;
- DWORD dwFlags;
-} EMRSETMAPPERFLAGS,*PEMRSETMAPPERFLAGS;
-typedef struct tagEMRSETMITERLIMIT {
- EMR emr;
- FLOAT eMiterLimit;
-} EMRSETMITERLIMIT,*PEMRSETMITERLIMIT;
-typedef struct tagEMRSETPALETTEENTRIES {
- EMR emr;
- DWORD ihPal;
- DWORD iStart;
- DWORD cEntries;
- PALETTEENTRY aPalEntries[1];
-} EMRSETPALETTEENTRIES,*PEMRSETPALETTEENTRIES;
-typedef struct tagEMRSETPIXELV {
- EMR emr;
- POINTL ptlPixel;
- COLORREF crColor;
-} EMRSETPIXELV,*PEMRSETPIXELV;
-typedef struct tagEMRSETVIEWPORTEXTEX {
- EMR emr;
- SIZEL szlExtent;
-} EMRSETVIEWPORTEXTEX,*PEMRSETVIEWPORTEXTEX,EMRSETWINDOWEXTEX,*PEMRSETWINDOWEXTEX;
-typedef struct tagEMRSETVIEWPORTORGEX {
- EMR emr;
- POINTL ptlOrigin;
-} EMRSETVIEWPORTORGEX,*PEMRSETVIEWPORTORGEX,EMRSETWINDOWORGEX,*PEMRSETWINDOWORGEX,EMRSETBRUSHORGEX,*PEMRSETBRUSHORGEX;
-typedef struct tagEMRSETWORLDTRANSFORM {
- EMR emr;
- XFORM xform;
-} EMRSETWORLDTRANSFORM,*PEMRSETWORLDTRANSFORM;
-typedef struct tagEMRSTRETCHBLT {
- EMR emr;
- RECTL rclBounds;
- LONG xDest;
- LONG yDest;
- LONG cxDest;
- LONG cyDest;
- DWORD dwRop;
- LONG xSrc;
- LONG ySrc;
- XFORM xformSrc;
- COLORREF crBkColorSrc;
- DWORD iUsageSrc;
- DWORD offBmiSrc;
- DWORD cbBmiSrc;
- DWORD offBitsSrc;
- DWORD cbBitsSrc;
- LONG cxSrc;
- LONG cySrc;
-} EMRSTRETCHBLT,*PEMRSTRETCHBLT;
-typedef struct tagEMRSTRETCHDIBITS {
- EMR emr;
- RECTL rclBounds;
- LONG xDest;
- LONG yDest;
- LONG xSrc;
- LONG ySrc;
- LONG cxSrc;
- LONG cySrc;
- DWORD offBmiSrc;
- DWORD cbBmiSrc;
- DWORD offBitsSrc;
- DWORD cbBitsSrc;
- DWORD iUsageSrc;
- DWORD dwRop;
- LONG cxDest;
- LONG cyDest;
-} EMRSTRETCHDIBITS,*PEMRSTRETCHDIBITS;
-typedef struct tagABORTPATH {
- EMR emr;
-} EMRABORTPATH,*PEMRABORTPATH,EMRBEGINPATH,*PEMRBEGINPATH,EMRENDPATH,*PEMRENDPATH,EMRCLOSEFIGURE,*PEMRCLOSEFIGURE,EMRFLATTENPATH,*PEMRFLATTENPATH,EMRWIDENPATH,*PEMRWIDENPATH,EMRSETMETARGN,*PEMRSETMETARGN,EMRSAVEDC,*PEMRSAVEDC,EMRREALIZEPALETTE,*PEMRREALIZEPALETTE;
-typedef struct tagEMRSELECTCLIPPATH {
- EMR emr;
- DWORD iMode;
-} EMRSELECTCLIPPATH,*PEMRSELECTCLIPPATH,EMRSETBKMODE,*PEMRSETBKMODE,EMRSETMAPMODE,*PEMRSETMAPMODE,EMRSETPOLYFILLMODE,*PEMRSETPOLYFILLMODE,EMRSETROP2,*PEMRSETROP2,EMRSETSTRETCHBLTMODE,*PEMRSETSTRETCHBLTMODE,EMRSETTEXTALIGN,*PEMRSETTEXTALIGN,EMRENABLEICM,*PEMRENABLEICM;
-#pragma pack(push,2)
-typedef struct tagMETAHEADER {
- WORD mtType;
- WORD mtHeaderSize;
- WORD mtVersion;
- DWORD mtSize;
- WORD mtNoObjects;
- DWORD mtMaxRecord;
- WORD mtNoParameters;
-} METAHEADER,*PMETAHEADER,*LPMETAHEADER;
-#pragma pack(pop)
-typedef struct tagENHMETAHEADER {
- DWORD iType;
- DWORD nSize;
- RECTL rclBounds;
- RECTL rclFrame;
- DWORD dSignature;
- DWORD nVersion;
- DWORD nBytes;
- DWORD nRecords;
- WORD nHandles;
- WORD sReserved;
- DWORD nDescription;
- DWORD offDescription;
- DWORD nPalEntries;
- SIZEL szlDevice;
- SIZEL szlMillimeters;
-#if (WINVER >= 0x0400)
- DWORD cbPixelFormat;
- DWORD offPixelFormat;
- DWORD bOpenGL;
-#endif
-#if (WINVER >= 0x0500)
- SIZEL szlMicrometers;
-#endif
-} ENHMETAHEADER,*LPENHMETAHEADER;
-typedef struct tagMETARECORD {
- DWORD rdSize;
- WORD rdFunction;
- WORD rdParm[1];
-} METARECORD,*PMETARECORD,*LPMETARECORD;
-typedef struct tagENHMETARECORD {
- DWORD iType;
- DWORD nSize;
- DWORD dParm[1];
-} ENHMETARECORD,*LPENHMETARECORD;
-typedef struct tagHANDLETABLE {
- HGDIOBJ objectHandle[1];
-} HANDLETABLE,*LPHANDLETABLE;
-typedef struct tagTEXTMETRICA {
- LONG tmHeight;
- LONG tmAscent;
- LONG tmDescent;
- LONG tmInternalLeading;
- LONG tmExternalLeading;
- LONG tmAveCharWidth;
- LONG tmMaxCharWidth;
- LONG tmWeight;
- LONG tmOverhang;
- LONG tmDigitizedAspectX;
- LONG tmDigitizedAspectY;
- BYTE tmFirstChar;
- BYTE tmLastChar;
- BYTE tmDefaultChar;
- BYTE tmBreakChar;
- BYTE tmItalic;
- BYTE tmUnderlined;
- BYTE tmStruckOut;
- BYTE tmPitchAndFamily;
- BYTE tmCharSet;
-} TEXTMETRICA,*PTEXTMETRICA,*LPTEXTMETRICA;
-typedef struct tagTEXTMETRICW {
- LONG tmHeight;
- LONG tmAscent;
- LONG tmDescent;
- LONG tmInternalLeading;
- LONG tmExternalLeading;
- LONG tmAveCharWidth;
- LONG tmMaxCharWidth;
- LONG tmWeight;
- LONG tmOverhang;
- LONG tmDigitizedAspectX;
- LONG tmDigitizedAspectY;
- WCHAR tmFirstChar;
- WCHAR tmLastChar;
- WCHAR tmDefaultChar;
- WCHAR tmBreakChar;
- BYTE tmItalic;
- BYTE tmUnderlined;
- BYTE tmStruckOut;
- BYTE tmPitchAndFamily;
- BYTE tmCharSet;
-} TEXTMETRICW,*PTEXTMETRICW,*LPTEXTMETRICW;
-typedef struct _RGNDATAHEADER {
- DWORD dwSize;
- DWORD iType;
- DWORD nCount;
- DWORD nRgnSize;
- RECT rcBound;
-} RGNDATAHEADER;
-typedef struct _RGNDATA {
- RGNDATAHEADER rdh;
- char Buffer[1];
-} RGNDATA,*PRGNDATA, *LPRGNDATA;
-/* for GetRandomRgn */
-#define SYSRGN 4
-typedef struct tagGCP_RESULTSA {
- DWORD lStructSize;
- LPSTR lpOutString;
- UINT *lpOrder;
- INT *lpDx;
- INT *lpCaretPos;
- LPSTR lpClass;
- LPWSTR lpGlyphs;
- UINT nGlyphs;
- UINT nMaxFit;
-} GCP_RESULTSA,*LPGCP_RESULTSA;
-typedef struct tagGCP_RESULTSW {
- DWORD lStructSize;
- LPWSTR lpOutString;
- UINT *lpOrder;
- INT *lpDx;
- INT *lpCaretPos;
- LPWSTR lpClass;
- LPWSTR lpGlyphs;
- UINT nGlyphs;
- UINT nMaxFit;
-} GCP_RESULTSW,*LPGCP_RESULTSW;
-typedef struct _GLYPHMETRICS {
- UINT gmBlackBoxX;
- UINT gmBlackBoxY;
- POINT gmptGlyphOrigin;
- short gmCellIncX;
- short gmCellIncY;
-} GLYPHMETRICS,*LPGLYPHMETRICS;
-#if (_WIN32_WINNT >= 0x0500)
-typedef struct tagWCRANGE
-{
- WCHAR wcLow;
- USHORT cGlyphs;
-} WCRANGE, *PWCRANGE, *LPWCRANGE;
-typedef struct tagGLYPHSET
-{
- DWORD cbThis;
- DWORD flAccel;
- DWORD cGlyphsSupported;
- DWORD cRanges;
- WCRANGE ranges[1];
-} GLYPHSET, *PGLYPHSET, *LPGLYPHSET;
-#endif
-typedef struct tagKERNINGPAIR {
- WORD wFirst;
- WORD wSecond;
- int iKernAmount;
-} KERNINGPAIR,*LPKERNINGPAIR;
-typedef struct _FIXED {
- WORD fract;
- short value;
-} FIXED;
-typedef struct _MAT2 {
- FIXED eM11;
- FIXED eM12;
- FIXED eM21;
- FIXED eM22;
-} MAT2,*LPMAT2;
-typedef struct _OUTLINETEXTMETRICA {
- UINT otmSize;
- TEXTMETRICA otmTextMetrics;
- BYTE otmFiller;
- PANOSE otmPanoseNumber;
- UINT otmfsSelection;
- UINT otmfsType;
- int otmsCharSlopeRise;
- int otmsCharSlopeRun;
- int otmItalicAngle;
- UINT otmEMSquare;
- int otmAscent;
- int otmDescent;
- UINT otmLineGap;
- UINT otmsCapEmHeight;
- UINT otmsXHeight;
- RECT otmrcFontBox;
- int otmMacAscent;
- int otmMacDescent;
- UINT otmMacLineGap;
- UINT otmusMinimumPPEM;
- POINT otmptSubscriptSize;
- POINT otmptSubscriptOffset;
- POINT otmptSuperscriptSize;
- POINT otmptSuperscriptOffset;
- UINT otmsStrikeoutSize;
- int otmsStrikeoutPosition;
- int otmsUnderscoreSize;
- int otmsUnderscorePosition;
- PSTR otmpFamilyName;
- PSTR otmpFaceName;
- PSTR otmpStyleName;
- PSTR otmpFullName;
-} OUTLINETEXTMETRICA,*POUTLINETEXTMETRICA,*LPOUTLINETEXTMETRICA;
-typedef struct _OUTLINETEXTMETRICW {
- UINT otmSize;
- TEXTMETRICW otmTextMetrics;
- BYTE otmFiller;
- PANOSE otmPanoseNumber;
- UINT otmfsSelection;
- UINT otmfsType;
- int otmsCharSlopeRise;
- int otmsCharSlopeRun;
- int otmItalicAngle;
- UINT otmEMSquare;
- int otmAscent;
- int otmDescent;
- UINT otmLineGap;
- UINT otmsCapEmHeight;
- UINT otmsXHeight;
- RECT otmrcFontBox;
- int otmMacAscent;
- int otmMacDescent;
- UINT otmMacLineGap;
- UINT otmusMinimumPPEM;
- POINT otmptSubscriptSize;
- POINT otmptSubscriptOffset;
- POINT otmptSuperscriptSize;
- POINT otmptSuperscriptOffset;
- UINT otmsStrikeoutSize;
- int otmsStrikeoutPosition;
- int otmsUnderscoreSize;
- int otmsUnderscorePosition;
- PSTR otmpFamilyName;
- PSTR otmpFaceName;
- PSTR otmpStyleName;
- PSTR otmpFullName;
-} OUTLINETEXTMETRICW,*POUTLINETEXTMETRICW,*LPOUTLINETEXTMETRICW;
-typedef struct _RASTERIZER_STATUS {
- short nSize;
- short wFlags;
- short nLanguageID;
-} RASTERIZER_STATUS,*LPRASTERIZER_STATUS;
-typedef struct _POLYTEXTA {
- int x;
- int y;
- UINT n;
- LPCSTR lpstr;
- UINT uiFlags;
- RECT rcl;
- int *pdx;
-} POLYTEXTA, *PPOLYTEXTA, *LPPOLYTEXTA;
-typedef struct _POLYTEXTW {
- int x;
- int y;
- UINT n;
- LPCWSTR lpstr;
- UINT uiFlags;
- RECT rcl;
- int *pdx;
-} POLYTEXTW, *PPOLYTEXTW, *LPPOLYTEXTW;
-typedef struct tagPIXELFORMATDESCRIPTOR {
- WORD nSize;
- WORD nVersion;
- DWORD dwFlags;
- BYTE iPixelType;
- BYTE cColorBits;
- BYTE cRedBits;
- BYTE cRedShift;
- BYTE cGreenBits;
- BYTE cGreenShift;
- BYTE cBlueBits;
- BYTE cBlueShift;
- BYTE cAlphaBits;
- BYTE cAlphaShift;
- BYTE cAccumBits;
- BYTE cAccumRedBits;
- BYTE cAccumGreenBits;
- BYTE cAccumBlueBits;
- BYTE cAccumAlphaBits;
- BYTE cDepthBits;
- BYTE cStencilBits;
- BYTE cAuxBuffers;
- BYTE iLayerType;
- BYTE bReserved;
- DWORD dwLayerMask;
- DWORD dwVisibleMask;
- DWORD dwDamageMask;
-} PIXELFORMATDESCRIPTOR,*PPIXELFORMATDESCRIPTOR,*LPPIXELFORMATDESCRIPTOR;
-typedef struct tagMETAFILEPICT {
- LONG mm;
- LONG xExt;
- LONG yExt;
- HMETAFILE hMF;
-} METAFILEPICT,*LPMETAFILEPICT;
-typedef struct tagLOCALESIGNATURE {
- DWORD lsUsb[4];
- DWORD lsCsbDefault[2];
- DWORD lsCsbSupported[2];
-} LOCALESIGNATURE,*PLOCALESIGNATURE,*LPLOCALESIGNATURE;
-typedef LONG LCSTYPE;
-#pragma pack(push,4)
-typedef struct tagNEWTEXTMETRICA {
- LONG tmHeight;
- LONG tmAscent;
- LONG tmDescent;
- LONG tmInternalLeading;
- LONG tmExternalLeading;
- LONG tmAveCharWidth;
- LONG tmMaxCharWidth;
- LONG tmWeight;
- LONG tmOverhang;
- LONG tmDigitizedAspectX;
- LONG tmDigitizedAspectY;
- BYTE tmFirstChar;
- BYTE tmLastChar;
- BYTE tmDefaultChar;
- BYTE tmBreakChar;
- BYTE tmItalic;
- BYTE tmUnderlined;
- BYTE tmStruckOut;
- BYTE tmPitchAndFamily;
- BYTE tmCharSet;
- DWORD ntmFlags;
- UINT ntmSizeEM;
- UINT ntmCellHeight;
- UINT ntmAvgWidth;
-} NEWTEXTMETRICA,*PNEWTEXTMETRICA,*LPNEWTEXTMETRICA;
-typedef struct tagNEWTEXTMETRICW {
- LONG tmHeight;
- LONG tmAscent;
- LONG tmDescent;
- LONG tmInternalLeading;
- LONG tmExternalLeading;
- LONG tmAveCharWidth;
- LONG tmMaxCharWidth;
- LONG tmWeight;
- LONG tmOverhang;
- LONG tmDigitizedAspectX;
- LONG tmDigitizedAspectY;
- WCHAR tmFirstChar;
- WCHAR tmLastChar;
- WCHAR tmDefaultChar;
- WCHAR tmBreakChar;
- BYTE tmItalic;
- BYTE tmUnderlined;
- BYTE tmStruckOut;
- BYTE tmPitchAndFamily;
- BYTE tmCharSet;
- DWORD ntmFlags;
- UINT ntmSizeEM;
- UINT ntmCellHeight;
- UINT ntmAvgWidth;
-} NEWTEXTMETRICW,*PNEWTEXTMETRICW,*LPNEWTEXTMETRICW;
-#pragma pack(pop)
-typedef struct tagNEWTEXTMETRICEXA {
- NEWTEXTMETRICA ntmTm;
- FONTSIGNATURE ntmFontSig;
-} NEWTEXTMETRICEXA;
-typedef struct tagNEWTEXTMETRICEXW {
- NEWTEXTMETRICW ntmTm;
- FONTSIGNATURE ntmFontSig;
-} NEWTEXTMETRICEXW;
-typedef struct tagPELARRAY {
- LONG paXCount;
- LONG paYCount;
- LONG paXExt;
- LONG paYExt;
- BYTE paRGBs;
-} PELARRAY,*PPELARRAY,*LPPELARRAY;
-typedef struct tagENUMLOGFONTA {
- LOGFONTA elfLogFont;
- BYTE elfFullName[LF_FULLFACESIZE];
- BYTE elfStyle[LF_FACESIZE];
-} ENUMLOGFONTA,*LPENUMLOGFONTA;
-typedef struct tagENUMLOGFONTW {
- LOGFONTW elfLogFont;
- WCHAR elfFullName[LF_FULLFACESIZE];
- WCHAR elfStyle[LF_FACESIZE];
-} ENUMLOGFONTW,*LPENUMLOGFONTW;
-typedef struct tagENUMLOGFONTEXA {
- LOGFONTA elfLogFont;
- BYTE elfFullName[LF_FULLFACESIZE];
- BYTE elfStyle[LF_FACESIZE];
- BYTE elfScript[LF_FACESIZE];
-} ENUMLOGFONTEXA,*LPENUMLOGFONTEXA;
-typedef struct tagENUMLOGFONTEXW {
- LOGFONTW elfLogFont;
- WCHAR elfFullName[LF_FULLFACESIZE];
- WCHAR elfStyle[LF_FACESIZE];
- WCHAR elfScript[LF_FACESIZE];
-} ENUMLOGFONTEXW,*LPENUMLOGFONTEXW;
-typedef struct tagPOINTFX {
- FIXED x;
- FIXED y;
-} POINTFX,*LPPOINTFX;
-typedef struct tagTTPOLYCURVE {
- WORD wType;
- WORD cpfx;
- POINTFX apfx[1];
-} TTPOLYCURVE,*LPTTPOLYCURVE;
-typedef struct tagTTPOLYGONHEADER {
- DWORD cb;
- DWORD dwType;
- POINTFX pfxStart;
-} TTPOLYGONHEADER,*LPTTPOLYGONHEADER;
-typedef struct _POINTFLOAT {
- FLOAT x;
- FLOAT y;
-} POINTFLOAT,*PPOINTFLOAT;
-typedef struct _GLYPHMETRICSFLOAT {
- FLOAT gmfBlackBoxX;
- FLOAT gmfBlackBoxY;
- POINTFLOAT gmfptGlyphOrigin;
- FLOAT gmfCellIncX;
- FLOAT gmfCellIncY;
-} GLYPHMETRICSFLOAT,*PGLYPHMETRICSFLOAT,*LPGLYPHMETRICSFLOAT;
-typedef struct tagLAYERPLANEDESCRIPTOR {
- WORD nSize;
- WORD nVersion;
- DWORD dwFlags;
- BYTE iPixelType;
- BYTE cColorBits;
- BYTE cRedBits;
- BYTE cRedShift;
- BYTE cGreenBits;
- BYTE cGreenShift;
- BYTE cBlueBits;
- BYTE cBlueShift;
- BYTE cAlphaBits;
- BYTE cAlphaShift;
- BYTE cAccumBits;
- BYTE cAccumRedBits;
- BYTE cAccumGreenBits;
- BYTE cAccumBlueBits;
- BYTE cAccumAlphaBits;
- BYTE cDepthBits;
- BYTE cStencilBits;
- BYTE cAuxBuffers;
- BYTE iLayerPlane;
- BYTE bReserved;
- COLORREF crTransparent;
-} LAYERPLANEDESCRIPTOR,*PLAYERPLANEDESCRIPTOR,*LPLAYERPLANEDESCRIPTOR;
-typedef struct _BLENDFUNCTION {
- BYTE BlendOp;
- BYTE BlendFlags;
- BYTE SourceConstantAlpha;
- BYTE AlphaFormat;
-} BLENDFUNCTION,*PBLENDFUNCTION,*LPBLENDFUNCTION;
-#define MM_MAX_NUMAXES 16
-typedef struct _DESIGNVECTOR {
- DWORD dvReserved;
- DWORD dvNumAxes;
- LONG dvValues[MM_MAX_NUMAXES];
-} DESIGNVECTOR, *PDESIGNVECTOR, FAR *LPDESIGNVECTOR;
-#if _WIN32_WINNT >= 0x0500
-typedef struct tagENUMLOGFONTEXDVA
-{
- ENUMLOGFONTEXA elfEnumLogfontEx;
- DESIGNVECTOR elfDesignVector;
-} ENUMLOGFONTEXDVA, *PENUMLOGFONTEXDVA, *LPENUMLOGFONTEXDVA;
-typedef struct tagENUMLOGFONTEXDVW
-{
- ENUMLOGFONTEXW elfEnumLogfontEx;
- DESIGNVECTOR elfDesignVector;
-} ENUMLOGFONTEXDVW, *PENUMLOGFONTEXDVW, *LPENUMLOGFONTEXDVW;
-#endif /* _WIN32_WINNT >= 0x0500 */
-typedef USHORT COLOR16;
-typedef struct _TRIVERTEX {
- LONG x;
- LONG y;
- COLOR16 Red;
- COLOR16 Green;
- COLOR16 Blue;
- COLOR16 Alpha;
-} TRIVERTEX, *PTRIVERTEX, *LPTRIVERTEX;
-typedef struct _GRADIENT_TRIANGLE {
- ULONG Vertex1;
- ULONG Vertex2;
- ULONG Vertex3;
-} GRADIENT_TRIANGLE,*PGRADIENT_TRIANGLE,*LPGRADIENT_TRIANGLE;
-typedef struct _GRADIENT_RECT {
- ULONG UpperLeft;
- ULONG LowerRight;
-}GRADIENT_RECT,*PGRADIENT_RECT,*LPGRADIENT_RECT;
-typedef struct _DISPLAY_DEVICEA {
- DWORD cb;
- CHAR DeviceName[32];
- CHAR DeviceString[128];
- DWORD StateFlags;
- CHAR DeviceID[128];
- CHAR DeviceKey[128];
-} DISPLAY_DEVICEA, *PDISPLAY_DEVICEA, *LPDISPLAY_DEVICEA;
-typedef struct _DISPLAY_DEVICEW {
- DWORD cb;
- WCHAR DeviceName[32];
- WCHAR DeviceString[128];
- DWORD StateFlags;
- WCHAR DeviceID[128];
- WCHAR DeviceKey[128];
-} DISPLAY_DEVICEW, *PDISPLAY_DEVICEW, *LPDISPLAY_DEVICEW;
-
-typedef BOOL (CALLBACK *ABORTPROC)(HDC,int);
-typedef int (CALLBACK *MFENUMPROC)(HDC,HANDLETABLE*,METARECORD*,int,LPARAM);
-typedef int (CALLBACK *ENHMFENUMPROC)(HDC,HANDLETABLE*,ENHMETARECORD*,int,LPARAM);
-typedef int (CALLBACK *OLDFONTENUMPROCA)(const LOGFONTA*,const TEXTMETRICA*,DWORD,LPARAM);
-typedef int (CALLBACK *OLDFONTENUMPROCW)(const LOGFONTW*,const TEXTMETRICW*,DWORD,LPARAM);
-typedef OLDFONTENUMPROCA FONTENUMPROCA;
-typedef OLDFONTENUMPROCW FONTENUMPROCW;
-typedef int (CALLBACK *ICMENUMPROCA)(LPSTR,LPARAM);
-typedef int (CALLBACK *ICMENUMPROCW)(LPWSTR,LPARAM);
-typedef void (CALLBACK *GOBJENUMPROC)(LPVOID,LPARAM);
-typedef void (CALLBACK *LINEDDAPROC)(int,int,LPARAM);
-typedef UINT (CALLBACK *LPFNDEVMODE)(HWND,HMODULE,LPDEVMODEA,LPSTR,LPSTR,LPDEVMODEA,LPSTR,UINT);
-typedef DWORD (CALLBACK *LPFNDEVCAPS)(LPSTR,LPSTR,UINT,LPSTR,LPDEVMODEA);
-
-#define MAKEPOINTS(l) (*((POINTS*)&(l)))
-#define MAKEROP4(f,b) (DWORD)((((b)<<8)&0xFF000000)|(f))
-
-#define GetCValue(cmyk) ((BYTE)(cmyk))
-#define GetMValue(cmyk) ((BYTE)((cmyk)>> 8))
-#define GetYValue(cmyk) ((BYTE)((cmyk)>>16))
-#define GetKValue(cmyk) ((BYTE)((cmyk)>>24))
-#define CMYK(c,m,y,k) ((COLORREF)((BYTE)(k)|((BYTE)(y)<<8)|((BYTE)(m)<<16)|((BYTE)(c)<<24)))
-
-#define GetRValue(c) ((BYTE)(c))
-#define GetGValue(c) ((BYTE)(((WORD)(c))>>8))
-#define GetBValue(c) ((BYTE)((c)>>16))
-#define RGB(r,g,b) ((COLORREF)((BYTE)(r)|((BYTE)(g) << 8)|((BYTE)(b) << 16)))
-
-#define PALETTEINDEX(i) ((0x01000000|(COLORREF)(WORD)(i)))
-#define PALETTERGB(r,g,b) (0x02000000|RGB(r,g,b))
-
-WINGDIAPI int WINAPI AbortDoc(HDC);
-WINGDIAPI BOOL WINAPI AbortPath(HDC);
-WINGDIAPI int WINAPI AddFontResourceA(LPCSTR);
-WINGDIAPI int WINAPI AddFontResourceW(LPCWSTR);
-#if (_WIN32_WINNT >= 0x0500)
-WINGDIAPI HANDLE WINAPI AddFontMemResourceEx(PVOID,DWORD,PVOID,DWORD *);
-WINGDIAPI int WINAPI AddFontResourceExA(LPCSTR,DWORD,PVOID);
-WINGDIAPI int WINAPI AddFontResourceExW(LPCWSTR,DWORD,PVOID);
-#endif
-WINGDIAPI BOOL WINAPI AngleArc(HDC,int,int,DWORD,FLOAT,FLOAT);
-WINGDIAPI BOOL WINAPI AnimatePalette(HPALETTE,UINT,UINT,const PALETTEENTRY*);
-WINGDIAPI BOOL WINAPI Arc(HDC,int,int,int,int,int,int,int,int);
-WINGDIAPI BOOL WINAPI ArcTo(HDC,int,int,int,int,int,int,int,int);
-WINGDIAPI BOOL WINAPI BeginPath(HDC);
-WINGDIAPI BOOL WINAPI BitBlt(HDC,int,int,int,int,HDC,int,int,DWORD);
-WINGDIAPI BOOL WINAPI CancelDC(HDC);
-WINGDIAPI BOOL WINAPI CheckColorsInGamut(HDC,PVOID,PVOID,DWORD);
-WINGDIAPI BOOL WINAPI Chord(HDC,int,int,int,int,int,int,int,int);
-WINGDIAPI int WINAPI ChoosePixelFormat(HDC,CONST PIXELFORMATDESCRIPTOR*);
-WINGDIAPI HENHMETAFILE WINAPI CloseEnhMetaFile(HDC);
-WINGDIAPI BOOL WINAPI CloseFigure(HDC);
-WINGDIAPI HMETAFILE WINAPI CloseMetaFile(HDC);
-#if (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= 0x0500)
-WINGDIAPI BOOL WINAPI ColorCorrectPalette(HDC,HPALETTE,DWORD,DWORD);
-WINGDIAPI BOOL WINAPI ColorMatchToTarget(HDC,HDC,DWORD);
-#endif
-WINGDIAPI int WINAPI CombineRgn(HRGN,HRGN,HRGN,int);
-WINGDIAPI BOOL WINAPI CombineTransform(LPXFORM,const XFORM*,const XFORM*);
-WINGDIAPI HENHMETAFILE WINAPI CopyEnhMetaFileA(HENHMETAFILE,LPCSTR);
-WINGDIAPI HENHMETAFILE WINAPI CopyEnhMetaFileW(HENHMETAFILE,LPCWSTR);
-WINGDIAPI HMETAFILE WINAPI CopyMetaFileA(HMETAFILE,LPCSTR);
-WINGDIAPI HMETAFILE WINAPI CopyMetaFileW(HMETAFILE,LPCWSTR);
-WINGDIAPI HBITMAP WINAPI CreateBitmap(int,int,UINT,UINT,PCVOID);
-WINGDIAPI HBITMAP WINAPI CreateBitmapIndirect(const BITMAP*);
-WINGDIAPI HBRUSH WINAPI CreateBrushIndirect(const LOGBRUSH*);
-WINGDIAPI HCOLORSPACE WINAPI CreateColorSpaceA(LPLOGCOLORSPACEA);
-WINGDIAPI HCOLORSPACE WINAPI CreateColorSpaceW(LPLOGCOLORSPACEW);
-WINGDIAPI HBITMAP WINAPI CreateCompatibleBitmap(HDC,int,int);
-WINGDIAPI HDC WINAPI CreateCompatibleDC(HDC);
-WINGDIAPI HDC WINAPI CreateDCA(LPCSTR,LPCSTR,LPCSTR,const DEVMODEA*);
-WINGDIAPI HDC WINAPI CreateDCW(LPCWSTR,LPCWSTR,LPCWSTR,const DEVMODEW*);
-WINGDIAPI HBITMAP WINAPI CreateDIBitmap(HDC,const BITMAPINFOHEADER*,DWORD,PCVOID,const BITMAPINFO*,UINT);
-WINGDIAPI HBRUSH WINAPI CreateDIBPatternBrush(HGLOBAL,UINT);
-WINGDIAPI HBRUSH WINAPI CreateDIBPatternBrushPt(PCVOID,UINT);
-WINGDIAPI HBITMAP WINAPI CreateDIBSection(HDC,const BITMAPINFO*,UINT,void**,HANDLE,DWORD);
-WINGDIAPI HBITMAP WINAPI CreateDiscardableBitmap(HDC,int,int);
-WINGDIAPI HRGN WINAPI CreateEllipticRgn(int,int,int,int);
-WINGDIAPI HRGN WINAPI CreateEllipticRgnIndirect(LPCRECT);
-WINGDIAPI HDC WINAPI CreateEnhMetaFileA(HDC,LPCSTR,LPCRECT,LPCSTR);
-WINGDIAPI HDC WINAPI CreateEnhMetaFileW(HDC,LPCWSTR,LPCRECT,LPCWSTR);
-WINGDIAPI HFONT WINAPI CreateFontA(int,int,int,int,int,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,LPCSTR);
-WINGDIAPI HFONT WINAPI CreateFontW(int,int,int,int,int,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,LPCWSTR);
-WINGDIAPI HFONT WINAPI CreateFontIndirectA(const LOGFONTA*);
-WINGDIAPI HFONT WINAPI CreateFontIndirectW(const LOGFONTW*);
-WINGDIAPI HPALETTE WINAPI CreateHalftonePalette(HDC);
-WINGDIAPI HBRUSH WINAPI CreateHatchBrush(int,COLORREF);
-WINGDIAPI HDC WINAPI CreateICA(LPCSTR,LPCSTR,LPCSTR,const DEVMODEA*);
-WINGDIAPI HDC WINAPI CreateICW(LPCWSTR,LPCWSTR,LPCWSTR,const DEVMODEW*);
-WINGDIAPI HDC WINAPI CreateMetaFileA(LPCSTR);
-WINGDIAPI HDC WINAPI CreateMetaFileW(LPCWSTR);
-WINGDIAPI HPALETTE WINAPI CreatePalette(const LOGPALETTE*);
-WINGDIAPI HBRUSH WINAPI CreatePatternBrush(HBITMAP);
-WINGDIAPI HPEN WINAPI CreatePen(int,int,COLORREF);
-WINGDIAPI HPEN WINAPI CreatePenIndirect(const LOGPEN*);
-WINGDIAPI HRGN WINAPI CreatePolygonRgn(const POINT*,int,int);
-WINGDIAPI HRGN WINAPI CreatePolyPolygonRgn(const POINT*,const INT*,int,int);
-WINGDIAPI HRGN WINAPI CreateRectRgn(int,int,int,int);
-WINGDIAPI HRGN WINAPI CreateRectRgnIndirect(LPCRECT);
-WINGDIAPI HRGN WINAPI CreateRoundRectRgn(int,int,int,int,int,int);
-WINGDIAPI BOOL WINAPI CreateScalableFontResourceA(DWORD,LPCSTR,LPCSTR,LPCSTR);
-WINGDIAPI BOOL WINAPI CreateScalableFontResourceW(DWORD,LPCWSTR,LPCWSTR,LPCWSTR);
-WINGDIAPI HBRUSH WINAPI CreateSolidBrush(COLORREF);
-WINGDIAPI BOOL WINAPI DeleteColorSpace(HCOLORSPACE);
-WINGDIAPI BOOL WINAPI DeleteDC(HDC);
-WINGDIAPI BOOL WINAPI DeleteEnhMetaFile(HENHMETAFILE);
-WINGDIAPI BOOL WINAPI DeleteMetaFile(HMETAFILE);
-WINGDIAPI BOOL WINAPI DeleteObject(HGDIOBJ);
-WINGDIAPI int WINAPI DescribePixelFormat(HDC,int,UINT,LPPIXELFORMATDESCRIPTOR);
-WINGDIAPI DWORD WINAPI DeviceCapabilitiesA(LPCSTR,LPCSTR,WORD,LPSTR,const DEVMODEA*);
-WINGDIAPI DWORD WINAPI DeviceCapabilitiesW(LPCWSTR,LPCWSTR,WORD,LPWSTR,const DEVMODEW*);
-WINGDIAPI BOOL WINAPI DPtoLP(HDC,LPPOINT,int);
-WINGDIAPI int WINAPI DrawEscape(HDC,int,int,LPCSTR);
-WINGDIAPI BOOL WINAPI Ellipse(HDC,int,int,int,int);
-WINGDIAPI int WINAPI EndDoc(HDC);
-WINGDIAPI int WINAPI EndPage(HDC);
-WINGDIAPI BOOL WINAPI EndPath(HDC);
-WINGDIAPI BOOL WINAPI EnumEnhMetaFile(HDC,HENHMETAFILE,ENHMFENUMPROC,PVOID,LPCRECT);
-WINGDIAPI int WINAPI EnumFontFamiliesA(HDC,LPCSTR,FONTENUMPROCA,LPARAM);
-WINGDIAPI int WINAPI EnumFontFamiliesW(HDC,LPCWSTR,FONTENUMPROCW,LPARAM);
-WINGDIAPI int WINAPI EnumFontFamiliesExA(HDC,PLOGFONTA,FONTENUMPROCA,LPARAM,DWORD);
-WINGDIAPI int WINAPI EnumFontFamiliesExW(HDC,PLOGFONTW,FONTENUMPROCW,LPARAM,DWORD);
-WINGDIAPI int WINAPI EnumFontsA(HDC,LPCSTR,FONTENUMPROCA,LPARAM);
-WINGDIAPI int WINAPI EnumFontsW(HDC,LPCWSTR,FONTENUMPROCW,LPARAM);
-WINGDIAPI int WINAPI EnumICMProfilesA(HDC,ICMENUMPROCA,LPARAM);
-WINGDIAPI int WINAPI EnumICMProfilesW(HDC,ICMENUMPROCW,LPARAM);
-WINGDIAPI BOOL WINAPI EnumMetaFile(HDC,HMETAFILE,MFENUMPROC,LPARAM);
-WINGDIAPI int WINAPI EnumObjects(HDC,int,GOBJENUMPROC,LPARAM);
-WINGDIAPI BOOL WINAPI EqualRgn(HRGN,HRGN);
-WINGDIAPI int WINAPI Escape(HDC,int,int,LPCSTR,PVOID);
-WINGDIAPI int WINAPI ExcludeClipRect(HDC,int,int,int,int);
-WINGDIAPI int WINAPI ExcludeUpdateRgn(HDC,HWND);
-WINGDIAPI HPEN WINAPI ExtCreatePen(DWORD,DWORD,const LOGBRUSH*,DWORD,const DWORD*);
-WINGDIAPI HRGN WINAPI ExtCreateRegion(const XFORM*,DWORD,const RGNDATA*);
-WINGDIAPI int WINAPI ExtEscape(HDC,int,int,LPCSTR,int,LPSTR);
-WINGDIAPI BOOL WINAPI ExtFloodFill(HDC,int,int,COLORREF,UINT);
-WINGDIAPI int WINAPI ExtSelectClipRgn(HDC,HRGN,int);
-WINGDIAPI BOOL WINAPI ExtTextOutA(HDC,int,int,UINT,LPCRECT,LPCSTR,UINT,const INT*);
-WINGDIAPI BOOL WINAPI ExtTextOutW(HDC,int,int,UINT,LPCRECT,LPCWSTR,UINT,const INT*);
-WINGDIAPI BOOL WINAPI FillPath(HDC);
-WINGDIAPI int WINAPI FillRect(HDC,LPCRECT,HBRUSH);
-WINGDIAPI int WINAPI FillRgn(HDC,HRGN,HBRUSH);
-WINGDIAPI BOOL WINAPI FixBrushOrgEx(HDC,int,int,LPPOINT);
-WINGDIAPI BOOL WINAPI FlattenPath(HDC);
-WINGDIAPI BOOL WINAPI FloodFill(HDC,int,int,COLORREF);
-WINGDIAPI BOOL WINAPI GdiComment(HDC,UINT,const BYTE*);
-WINGDIAPI BOOL WINAPI GdiFlush(void);
-WINGDIAPI DWORD WINAPI GdiGetBatchLimit(void);
-WINGDIAPI DWORD WINAPI GdiSetBatchLimit(DWORD);
-WINGDIAPI int WINAPI GetArcDirection(HDC);
-WINGDIAPI BOOL WINAPI GetAspectRatioFilterEx(HDC,LPSIZE);
-WINGDIAPI LONG WINAPI GetBitmapBits(HBITMAP,LONG,PVOID);
-WINGDIAPI BOOL WINAPI GetBitmapDimensionEx(HBITMAP,LPSIZE);
-WINGDIAPI COLORREF WINAPI GetBkColor(HDC);
-WINGDIAPI int WINAPI GetBkMode(HDC);
-WINGDIAPI UINT WINAPI GetBoundsRect(HDC,LPRECT,UINT);
-WINGDIAPI BOOL WINAPI GetBrushOrgEx(HDC,LPPOINT);
-WINGDIAPI BOOL WINAPI GetCharABCWidthsA(HDC,UINT,UINT,LPABC);
-WINGDIAPI BOOL WINAPI GetCharABCWidthsW(HDC,UINT,UINT,LPABC);
-WINGDIAPI BOOL WINAPI GetCharABCWidthsFloatA(HDC,UINT,UINT,LPABCFLOAT);
-WINGDIAPI BOOL WINAPI GetCharABCWidthsFloatW(HDC,UINT,UINT,LPABCFLOAT);
-WINGDIAPI DWORD WINAPI GetCharacterPlacementA(HDC,LPCSTR,int,int,LPGCP_RESULTSA,DWORD);
-WINGDIAPI DWORD WINAPI GetCharacterPlacementW(HDC,LPCWSTR,int,int,LPGCP_RESULTSW,DWORD);
-WINGDIAPI BOOL WINAPI GetCharWidth32A(HDC,UINT,UINT,LPINT);
-WINGDIAPI BOOL WINAPI GetCharWidth32W(HDC,UINT,UINT,LPINT);
-WINGDIAPI BOOL WINAPI GetCharWidthA(HDC,UINT,UINT,LPINT);
-WINGDIAPI BOOL WINAPI GetCharWidthW(HDC,UINT,UINT,LPINT);
-WINGDIAPI BOOL WINAPI GetCharWidthFloatA(HDC,UINT,UINT,PFLOAT);
-WINGDIAPI BOOL WINAPI GetCharWidthFloatW(HDC,UINT,UINT,PFLOAT);
-WINGDIAPI int WINAPI GetClipBox(HDC,LPRECT);
-WINGDIAPI int WINAPI GetClipRgn(HDC,HRGN);
-WINGDIAPI BOOL WINAPI GetColorAdjustment(HDC,LPCOLORADJUSTMENT);
-WINGDIAPI HANDLE WINAPI GetColorSpace(HDC);
-WINGDIAPI HGDIOBJ WINAPI GetCurrentObject(HDC,UINT);
-WINGDIAPI BOOL WINAPI GetCurrentPositionEx(HDC,LPPOINT);
-WINGDIAPI HCURSOR WINAPI GetCursor(void);
-#if (WINVER >= 0x0500)
-WINGDIAPI COLORREF WINAPI GetDCBrushColor(HDC);
-WINGDIAPI COLORREF WINAPI GetDCPenColor(HDC);
-#endif
-WINGDIAPI BOOL WINAPI GetDCOrgEx(HDC,LPPOINT);
-WINGDIAPI int WINAPI GetDeviceCaps(HDC,int);
-WINGDIAPI BOOL WINAPI GetDeviceGammaRamp(HDC,PVOID);
-WINGDIAPI UINT WINAPI GetDIBColorTable(HDC,UINT,UINT,RGBQUAD*);
-WINGDIAPI int WINAPI GetDIBits(HDC,HBITMAP,UINT,UINT,PVOID,LPBITMAPINFO,UINT);
-WINGDIAPI HENHMETAFILE WINAPI GetEnhMetaFileA(LPCSTR);
-WINGDIAPI HENHMETAFILE WINAPI GetEnhMetaFileW(LPCWSTR);
-WINGDIAPI UINT WINAPI GetEnhMetaFileBits(HENHMETAFILE,UINT,LPBYTE);
-WINGDIAPI UINT WINAPI GetEnhMetaFileDescriptionA(HENHMETAFILE,UINT,LPSTR);
-WINGDIAPI UINT WINAPI GetEnhMetaFileDescriptionW(HENHMETAFILE,UINT,LPWSTR);
-WINGDIAPI UINT WINAPI GetEnhMetaFileHeader(HENHMETAFILE,UINT,LPENHMETAHEADER);
-WINGDIAPI UINT WINAPI GetEnhMetaFilePaletteEntries(HENHMETAFILE,UINT,LPPALETTEENTRY);
-WINGDIAPI UINT WINAPI GetEnhMetaFilePixelFormat(HENHMETAFILE,DWORD,CONST PIXELFORMATDESCRIPTOR*);
-WINGDIAPI DWORD WINAPI GetFontData(HDC,DWORD,DWORD,PVOID,DWORD);
-WINGDIAPI DWORD WINAPI GetFontLanguageInfo(HDC);
-WINGDIAPI DWORD WINAPI GetGlyphOutlineA(HDC,UINT,UINT,LPGLYPHMETRICS,DWORD,PVOID,const MAT2*);
-WINGDIAPI DWORD WINAPI GetGlyphOutlineW(HDC,UINT,UINT,LPGLYPHMETRICS,DWORD,PVOID,const MAT2*);
-WINGDIAPI int WINAPI GetGraphicsMode(HDC);
-WINGDIAPI BOOL WINAPI GetICMProfileA(HDC,LPDWORD,LPSTR);
-WINGDIAPI BOOL WINAPI GetICMProfileW(HDC,LPDWORD,LPWSTR);
-WINGDIAPI DWORD WINAPI GetKerningPairsA(HDC,DWORD,LPKERNINGPAIR);
-WINGDIAPI DWORD WINAPI GetKerningPairsW(HDC,DWORD,LPKERNINGPAIR);
-WINGDIAPI BOOL WINAPI GetLogColorSpaceA(HCOLORSPACE,LPLOGCOLORSPACEA,DWORD);
-WINGDIAPI BOOL WINAPI GetLogColorSpaceW(HCOLORSPACE,LPLOGCOLORSPACEW,DWORD);
-WINGDIAPI int WINAPI GetMapMode(HDC);
-WINGDIAPI HMETAFILE WINAPI GetMetaFileA(LPCSTR);
-WINGDIAPI HMETAFILE WINAPI GetMetaFileW(LPCWSTR);
-WINGDIAPI UINT WINAPI GetMetaFileBitsEx(HMETAFILE,UINT,PVOID);
-WINGDIAPI int WINAPI GetMetaRgn(HDC,HRGN);
-WINGDIAPI BOOL WINAPI GetMiterLimit(HDC,PFLOAT);
-WINGDIAPI COLORREF WINAPI GetNearestColor(HDC,COLORREF);
-WINGDIAPI UINT WINAPI GetNearestPaletteIndex(HPALETTE,COLORREF);
-WINGDIAPI int WINAPI GetObjectA(HGDIOBJ,int,PVOID);
-WINGDIAPI int WINAPI GetObjectW(HGDIOBJ,int,PVOID);
-WINGDIAPI DWORD WINAPI GetObjectType(HGDIOBJ);
-WINGDIAPI UINT WINAPI GetOutlineTextMetricsA(HDC,UINT,LPOUTLINETEXTMETRICA);
-WINGDIAPI UINT WINAPI GetOutlineTextMetricsW(HDC,UINT,LPOUTLINETEXTMETRICW);
-WINGDIAPI UINT WINAPI GetPaletteEntries(HPALETTE,UINT,UINT,LPPALETTEENTRY);
-WINGDIAPI int WINAPI GetPath(HDC,LPPOINT,PBYTE,int);
-WINGDIAPI COLORREF WINAPI GetPixel(HDC,int,int);
-WINGDIAPI int WINAPI GetPixelFormat(HDC);
-WINGDIAPI int WINAPI GetPolyFillMode(HDC);
-WINGDIAPI BOOL WINAPI GetRasterizerCaps(LPRASTERIZER_STATUS,UINT);
-WINGDIAPI int WINAPI GetRandomRgn (HDC,HRGN,INT);
-WINGDIAPI DWORD WINAPI GetRegionData(HRGN,DWORD,LPRGNDATA);
-WINGDIAPI int WINAPI GetRgnBox(HRGN,LPRECT);
-WINGDIAPI int WINAPI GetROP2(HDC);
-WINGDIAPI HGDIOBJ WINAPI GetStockObject(int);
-WINGDIAPI int WINAPI GetStretchBltMode(HDC);
-WINGDIAPI UINT WINAPI GetSystemPaletteEntries(HDC,UINT,UINT,LPPALETTEENTRY);
-WINGDIAPI UINT WINAPI GetSystemPaletteUse(HDC);
-WINGDIAPI UINT WINAPI GetTextAlign(HDC);
-WINGDIAPI int WINAPI GetTextCharacterExtra(HDC);
-WINGDIAPI int WINAPI GetTextCharset(HDC);
-WINGDIAPI int WINAPI GetTextCharsetInfo(HDC,LPFONTSIGNATURE,DWORD);
-WINGDIAPI COLORREF WINAPI GetTextColor(HDC);
-WINGDIAPI BOOL WINAPI GetTextExtentExPointA(HDC,LPCSTR,int,int,LPINT,LPINT,LPSIZE);
-WINGDIAPI BOOL WINAPI GetTextExtentExPointW( HDC,LPCWSTR,int,int,LPINT,LPINT,LPSIZE );
-WINGDIAPI BOOL WINAPI GetTextExtentPointA(HDC,LPCSTR,int,LPSIZE);
-WINGDIAPI BOOL WINAPI GetTextExtentPointW(HDC,LPCWSTR,int,LPSIZE);
-#if (_WIN32_WINNT >= 0x0500)
-WINGDIAPI BOOL WINAPI GetTextExtentExPointI(HDC, LPWORD, int, int, LPINT, LPINT, LPSIZE);
-#endif
-#ifdef _WIN32_WCE
-extern BOOL GetTextExtentPoint32A(HDC,LPCSTR,int,LPSIZE);
-extern BOOL GetTextExtentPoint32W( HDC,LPCWSTR,int,LPSIZE);
-#else
-WINGDIAPI BOOL WINAPI GetTextExtentPoint32A(HDC,LPCSTR,int,LPSIZE);
-WINGDIAPI BOOL WINAPI GetTextExtentPoint32W( HDC,LPCWSTR,int,LPSIZE);
-#endif
-WINGDIAPI int WINAPI GetTextFaceA(HDC,int,LPSTR);
-WINGDIAPI int WINAPI GetTextFaceW(HDC,int,LPWSTR);
-WINGDIAPI BOOL WINAPI GetTextMetricsA(HDC,LPTEXTMETRICA);
-WINGDIAPI BOOL WINAPI GetTextMetricsW(HDC,LPTEXTMETRICW);
-WINGDIAPI BOOL WINAPI GetViewportExtEx(HDC,LPSIZE);
-WINGDIAPI BOOL WINAPI GetViewportOrgEx(HDC,LPPOINT);
-WINGDIAPI BOOL WINAPI GetWindowExtEx(HDC,LPSIZE);
-WINGDIAPI BOOL WINAPI GetWindowOrgEx(HDC,LPPOINT);
-WINGDIAPI UINT WINAPI GetWinMetaFileBits(HENHMETAFILE,UINT,LPBYTE,INT,HDC);
-WINGDIAPI BOOL WINAPI GetWorldTransform(HDC,LPXFORM);
-WINGDIAPI int WINAPI IntersectClipRect(HDC,int,int,int,int);
-WINGDIAPI BOOL WINAPI InvertRgn(HDC,HRGN);
-WINGDIAPI BOOL WINAPI LineDDA(int,int,int,int,LINEDDAPROC,LPARAM);
-WINGDIAPI BOOL WINAPI LineTo(HDC,int,int);
-WINGDIAPI BOOL WINAPI LPtoDP(HDC,LPPOINT,int);
-WINGDIAPI BOOL WINAPI MaskBlt(HDC,int,int,int,int,HDC,int,int,HBITMAP,int,int,DWORD);
-WINGDIAPI BOOL WINAPI ModifyWorldTransform(HDC,const XFORM*,DWORD);
-WINGDIAPI BOOL WINAPI MoveToEx(HDC,int,int,LPPOINT);
-WINGDIAPI int WINAPI OffsetClipRgn(HDC,int,int);
-WINGDIAPI int WINAPI OffsetRgn(HRGN,int,int);
-WINGDIAPI BOOL WINAPI OffsetViewportOrgEx(HDC,int,int,LPPOINT);
-WINGDIAPI BOOL WINAPI OffsetWindowOrgEx(HDC,int,int,LPPOINT);
-WINGDIAPI BOOL WINAPI PaintRgn(HDC,HRGN);
-WINGDIAPI BOOL WINAPI PatBlt(HDC,int,int,int,int,DWORD);
-WINGDIAPI HRGN WINAPI PathToRegion(HDC);
-WINGDIAPI BOOL WINAPI Pie(HDC,int,int,int,int,int,int,int,int);
-WINGDIAPI BOOL WINAPI PlayEnhMetaFile(HDC,HENHMETAFILE,LPCRECT);
-WINGDIAPI BOOL WINAPI PlayEnhMetaFileRecord(HDC,LPHANDLETABLE,const ENHMETARECORD*,UINT);
-WINGDIAPI BOOL WINAPI PlayMetaFile(HDC,HMETAFILE);
-WINGDIAPI BOOL WINAPI PlayMetaFileRecord(HDC,LPHANDLETABLE,LPMETARECORD,UINT);
-WINGDIAPI BOOL WINAPI PlgBlt(HDC,const POINT*,HDC,int,int,int,int,HBITMAP,int,int);
-WINGDIAPI BOOL WINAPI PolyBezier(HDC,const POINT*,DWORD);
-WINGDIAPI BOOL WINAPI PolyBezierTo(HDC,const POINT*,DWORD);
-WINGDIAPI BOOL WINAPI PolyDraw(HDC,const POINT*,const BYTE*,int);
-WINGDIAPI BOOL WINAPI Polygon(HDC,const POINT*,int);
-WINGDIAPI BOOL WINAPI Polyline(HDC,const POINT*,int);
-WINGDIAPI BOOL WINAPI PolylineTo(HDC,const POINT*,DWORD);
-WINGDIAPI BOOL WINAPI PolyPolygon(HDC,const POINT*,const INT*,int);
-WINGDIAPI BOOL WINAPI PolyPolyline(HDC,const POINT*,const DWORD*,DWORD);
-WINGDIAPI BOOL WINAPI PolyTextOutA(HDC,const POLYTEXTA*,int);
-WINGDIAPI BOOL WINAPI PolyTextOutW(HDC,const POLYTEXTW*,int);
-WINGDIAPI BOOL WINAPI PtInRegion(HRGN,int,int);
-WINGDIAPI BOOL WINAPI PtVisible(HDC,int,int);
-WINGDIAPI UINT WINAPI RealizePalette(HDC);
-WINGDIAPI BOOL WINAPI Rectangle(HDC,int,int,int,int);
-WINGDIAPI BOOL WINAPI RectInRegion(HRGN,LPCRECT);
-WINGDIAPI BOOL WINAPI RectVisible(HDC,LPCRECT);
-WINGDIAPI BOOL WINAPI RemoveFontResourceA(LPCSTR);
-WINGDIAPI BOOL WINAPI RemoveFontResourceW(LPCWSTR);
-#if (_WIN32_WINNT >= 0x0500)
-WINGDIAPI BOOL WINAPI RemoveFontMemResourceEx(HANDLE);
-WINGDIAPI BOOL WINAPI RemoveFontResourceExA(LPCSTR,DWORD,PVOID);
-WINGDIAPI BOOL WINAPI RemoveFontResourceExW(LPCWSTR,DWORD,PVOID);
-#endif
-WINGDIAPI HDC WINAPI ResetDCA(HDC,const DEVMODEA*);
-WINGDIAPI HDC WINAPI ResetDCW(HDC,const DEVMODEW*);
-WINGDIAPI BOOL WINAPI ResizePalette(HPALETTE,UINT);
-WINGDIAPI BOOL WINAPI RestoreDC(HDC,int);
-WINGDIAPI BOOL WINAPI RoundRect(HDC,int,int,int,int,int,int);
-WINGDIAPI int WINAPI SaveDC(HDC);
-WINGDIAPI BOOL WINAPI ScaleViewportExtEx(HDC,int,int,int,int,LPSIZE);
-WINGDIAPI BOOL WINAPI ScaleWindowExtEx(HDC,int,int,int,int,LPSIZE);
-WINGDIAPI BOOL WINAPI SelectClipPath(HDC,int);
-WINGDIAPI int WINAPI SelectClipRgn(HDC,HRGN);
-WINGDIAPI HGDIOBJ WINAPI SelectObject(HDC,HGDIOBJ);
-WINGDIAPI HPALETTE WINAPI SelectPalette(HDC,HPALETTE,BOOL);
-WINGDIAPI int WINAPI SetAbortProc(HDC,ABORTPROC);
-WINGDIAPI int WINAPI SetArcDirection(HDC,int);
-WINGDIAPI LONG WINAPI SetBitmapBits(HBITMAP,DWORD,PCVOID);
-WINGDIAPI BOOL WINAPI SetBitmapDimensionEx(HBITMAP,int,int,LPSIZE);
-WINGDIAPI COLORREF WINAPI SetBkColor(HDC,COLORREF);
-WINGDIAPI int WINAPI SetBkMode(HDC,int);
-WINGDIAPI UINT WINAPI SetBoundsRect(HDC,LPCRECT,UINT);
-WINGDIAPI BOOL WINAPI SetBrushOrgEx(HDC,int,int,LPPOINT);
-WINGDIAPI BOOL WINAPI SetColorAdjustment(HDC,const COLORADJUSTMENT*);
-WINGDIAPI BOOL WINAPI SetColorSpace(HDC,HCOLORSPACE);
-#if (_WIN32_WINNT >= 0x0500)
-WINGDIAPI COLORREF WINAPI SetDCBrushColor(HDC,COLORREF);
-WINGDIAPI COLORREF WINAPI SetDCPenColor(HDC,COLORREF);
-#endif
-WINGDIAPI BOOL WINAPI SetDeviceGammaRamp(HDC,PVOID);
-WINGDIAPI UINT WINAPI SetDIBColorTable(HDC,UINT,UINT,const RGBQUAD*);
-WINGDIAPI int WINAPI SetDIBits(HDC,HBITMAP,UINT,UINT,PCVOID,const BITMAPINFO*,UINT);
-WINGDIAPI int WINAPI SetDIBitsToDevice(HDC,int,int,DWORD,DWORD,int,int,UINT,UINT,PCVOID,const BITMAPINFO*,UINT);
-WINGDIAPI HENHMETAFILE WINAPI SetEnhMetaFileBits(UINT,const BYTE*);
-WINGDIAPI int WINAPI SetGraphicsMode(HDC,int);
-WINGDIAPI int WINAPI SetICMMode(HDC,int);
-WINGDIAPI BOOL WINAPI SetICMProfileA(HDC,LPSTR);
-WINGDIAPI BOOL WINAPI SetICMProfileW(HDC,LPWSTR);
-WINGDIAPI int WINAPI SetMapMode(HDC,int);
-WINGDIAPI DWORD WINAPI SetMapperFlags(HDC,DWORD);
-WINGDIAPI HMETAFILE WINAPI SetMetaFileBitsEx(UINT,const BYTE *);
-WINGDIAPI int WINAPI SetMetaRgn(HDC);
-WINGDIAPI BOOL WINAPI SetMiterLimit(HDC,FLOAT,PFLOAT);
-WINGDIAPI UINT WINAPI SetPaletteEntries(HPALETTE,UINT,UINT,const PALETTEENTRY*);
-WINGDIAPI COLORREF WINAPI SetPixel(HDC,int,int,COLORREF);
-WINGDIAPI BOOL WINAPI SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR*);
-WINGDIAPI BOOL WINAPI SetPixelV(HDC,int,int,COLORREF);
-WINGDIAPI int WINAPI SetPolyFillMode(HDC,int);
-WINGDIAPI BOOL WINAPI SetRectRgn(HRGN,int,int,int,int);
-WINGDIAPI int WINAPI SetROP2(HDC,int);
-WINGDIAPI int WINAPI SetStretchBltMode(HDC,int);
-WINGDIAPI UINT WINAPI SetSystemPaletteUse(HDC,UINT);
-WINGDIAPI UINT WINAPI SetTextAlign(HDC,UINT);
-WINGDIAPI int WINAPI SetTextCharacterExtra(HDC,int);
-WINGDIAPI COLORREF WINAPI SetTextColor(HDC,COLORREF);
-WINGDIAPI BOOL WINAPI SetTextJustification(HDC,int,int);
-WINGDIAPI BOOL WINAPI SetViewportExtEx(HDC,int,int,LPSIZE);
-WINGDIAPI BOOL WINAPI SetViewportOrgEx(HDC,int,int,LPPOINT);
-WINGDIAPI BOOL WINAPI SetWindowExtEx(HDC,int,int,LPSIZE);
-WINGDIAPI BOOL WINAPI SetWindowOrgEx(HDC,int,int,LPPOINT);
-WINGDIAPI HENHMETAFILE WINAPI SetWinMetaFileBits(UINT,const BYTE*,HDC,const METAFILEPICT*);
-WINGDIAPI BOOL WINAPI SetWorldTransform(HDC,const XFORM *);
-WINGDIAPI int WINAPI StartDocA(HDC,const DOCINFOA*);
-WINGDIAPI int WINAPI StartDocW(HDC,const DOCINFOW*);
-WINGDIAPI int WINAPI StartPage(HDC);
-WINGDIAPI BOOL WINAPI StretchBlt(HDC,int,int,int,int,HDC,int,int,int,int,DWORD);
-WINGDIAPI int WINAPI StretchDIBits(HDC,int,int,int,int,int,int,int,int,const VOID *,const BITMAPINFO *,UINT,DWORD);
-WINGDIAPI BOOL WINAPI StrokeAndFillPath(HDC);
-WINGDIAPI BOOL WINAPI StrokePath(HDC);
-WINGDIAPI BOOL WINAPI SwapBuffers(HDC);
-WINGDIAPI BOOL WINAPI TextOutA(HDC,int,int,LPCSTR,int);
-WINGDIAPI BOOL WINAPI TextOutW(HDC,int,int,LPCWSTR,int);
-WINGDIAPI BOOL WINAPI TranslateCharsetInfo(PDWORD,LPCHARSETINFO,DWORD);
-WINGDIAPI BOOL WINAPI UnrealizeObject(HGDIOBJ);
-WINGDIAPI BOOL WINAPI UpdateColors(HDC);
-WINGDIAPI BOOL WINAPI UpdateICMRegKeyA(DWORD,DWORD,LPSTR,UINT);
-WINGDIAPI BOOL WINAPI UpdateICMRegKeyW(DWORD,DWORD,LPWSTR,UINT);
-WINGDIAPI BOOL WINAPI WidenPath(HDC);
-WINGDIAPI BOOL WINAPI wglCopyContext(HGLRC,HGLRC,UINT);
-WINGDIAPI HGLRC WINAPI wglCreateContext(HDC);
-WINGDIAPI HGLRC WINAPI wglCreateLayerContext(HDC,int);
-WINGDIAPI BOOL WINAPI wglDeleteContext(HGLRC);
-WINGDIAPI BOOL WINAPI wglDescribeLayerPlane(HDC,int,int,UINT,LPLAYERPLANEDESCRIPTOR);
-WINGDIAPI HGLRC WINAPI wglGetCurrentContext(void);
-WINGDIAPI HDC WINAPI wglGetCurrentDC(void);
-WINGDIAPI int WINAPI wglGetLayerPaletteEntries(HDC,int,int,int,COLORREF*);
-WINGDIAPI PROC WINAPI wglGetProcAddress(LPCSTR);
-WINGDIAPI BOOL WINAPI wglMakeCurrent(HDC,HGLRC);
-WINGDIAPI BOOL WINAPI wglRealizeLayerPalette(HDC,int,BOOL);
-WINGDIAPI int WINAPI wglSetLayerPaletteEntries(HDC,int,int,int,const COLORREF*);
-WINGDIAPI BOOL WINAPI wglShareLists(HGLRC,HGLRC);
-WINGDIAPI BOOL WINAPI wglSwapLayerBuffers(HDC,UINT);
-WINGDIAPI BOOL WINAPI wglUseFontBitmapsA(HDC,DWORD,DWORD,DWORD);
-WINGDIAPI BOOL WINAPI wglUseFontBitmapsW(HDC,DWORD,DWORD,DWORD);
-WINGDIAPI BOOL WINAPI wglUseFontOutlinesA(HDC,DWORD,DWORD,DWORD,FLOAT,FLOAT,int,LPGLYPHMETRICSFLOAT);
-WINGDIAPI BOOL WINAPI wglUseFontOutlinesW(HDC,DWORD,DWORD,DWORD,FLOAT,FLOAT,int,LPGLYPHMETRICSFLOAT);
-#if (WINVER >= 0x0410)
-WINGDIAPI BOOL WINAPI AlphaBlend(HDC,int,int,int,int,HDC,int,int,int,int,BLENDFUNCTION);
-WINGDIAPI BOOL WINAPI GradientFill(HDC,PTRIVERTEX,ULONG,PVOID,ULONG,ULONG);
-WINGDIAPI BOOL WINAPI TransparentBlt(HDC,int,int,int,int,HDC,int,int,int,int,UINT);
-#endif
-#if (_WIN32_WINNT >= 0x0500)
-WINGDIAPI DWORD WINAPI GetFontUnicodeRanges(HDC,LPGLYPHSET);
-WINGDIAPI DWORD WINAPI GetGlyphIndicesA(HDC,LPCSTR,int,LPWORD,DWORD);
-WINGDIAPI DWORD WINAPI GetGlyphIndicesW(HDC,LPCWSTR,int,LPWORD,DWORD);
-#endif
-#if (WINVER >= 0x0500)
-WINGDIAPI DWORD WINAPI GetLayout(HDC);
-WINGDIAPI DWORD WINAPI SetLayout(HDC, DWORD);
-#endif
-
-#ifdef UNICODE
-typedef WCHAR BCHAR;
-typedef DOCINFOW DOCINFO, *LPDOCINFO;
-typedef LOGFONTW LOGFONT,*PLOGFONT,*LPLOGFONT;
-typedef TEXTMETRICW TEXTMETRIC,*PTEXTMETRIC,*LPTEXTMETRIC;
-#define ICMENUMPROC ICMENUMPROCW
-#define FONTENUMPROC FONTENUMPROCW
-typedef DEVMODEW DEVMODE,*PDEVMODE,*LPDEVMODE;
-#if _WIN32_WINNT >= 0x0500
-typedef ENUMLOGFONTEXDVW ENUMLOGFONTEXDV;
-typedef PENUMLOGFONTEXDVW PENUMLOGFONTEXDV;
-typedef LPENUMLOGFONTEXDVW LPENUMLOGFONTEXDV;
-#endif
-typedef EXTLOGFONTW EXTLOGFONT,*PEXTLOGFONT,*LPEXTLOGFONT;
-typedef GCP_RESULTSW GCP_RESULTS,*LPGCP_RESULTS;
-typedef OUTLINETEXTMETRICW OUTLINETEXTMETRIC,*POUTLINETEXTMETRIC,*LPOUTLINETEXTMETRIC;
-typedef POLYTEXTW POLYTEXT,*PPOLYTEXT,*LPPOLYTEXT;
-typedef LOGCOLORSPACEW LOGCOLORSPACE,*LPLOGCOLORSPACE;
-typedef NEWTEXTMETRICW NEWTEXTMETRIC,*PNEWTEXTMETRIC,*LPNEWTEXTMETRIC;
-typedef NEWTEXTMETRICEXW NEWTEXTMETRICEX;
-typedef ENUMLOGFONTW ENUMLOGFONT,*LPENUMLOGFONT;
-typedef ENUMLOGFONTEXW ENUMLOGFONTEX,*LPENUMLOGFONTEX;
-typedef DISPLAY_DEVICEW DISPLAY_DEVICE, *PDISPLAY_DEVICE, *LPDISPLAY_DEVICE;
-#define AddFontResource AddFontResourceW
-#if (_WIN32_WINNT >= 0x0500)
-#define AddFontResourceEx AddFontResourceExW
-#endif
-#define CopyEnhMetaFile CopyEnhMetaFileW
-#define CopyMetaFile CopyMetaFileW
-#define CreateColorSpace CreateColorSpaceW
-#define CreateDC CreateDCW
-#define CreateEnhMetaFile CreateEnhMetaFileW
-#define CreateFont CreateFontW
-#define CreateFontIndirect CreateFontIndirectW
-#define CreateIC CreateICW
-#define CreateMetaFile CreateMetaFileW
-#define CreateScalableFontResource CreateScalableFontResourceW
-#define DeviceCapabilities DeviceCapabilitiesW
-#define EnumFontFamilies EnumFontFamiliesW
-#define EnumFontFamiliesEx EnumFontFamiliesExW
-#define EnumFonts EnumFontsW
-#define EnumICMProfiles EnumICMProfilesW
-#define ExtTextOut ExtTextOutW
-#define GetCharABCWidthsFloat GetCharABCWidthsFloatW
-#define GetCharABCWidths GetCharABCWidthsW
-#define GetCharacterPlacement GetCharacterPlacementW
-#define GetCharWidth32 GetCharWidth32W
-#define GetCharWidthFloat GetCharWidthFloatW
-#define GetCharWidth GetCharWidthW
-#define GetEnhMetaFile GetEnhMetaFileW
-#define GetEnhMetaFileDescription GetEnhMetaFileDescriptionW
-#define GetGlyphOutline GetGlyphOutlineW
-#define GetICMProfile GetICMProfileW
-#define GetKerningPairs GetKerningPairsW
-#define GetLogColorSpace GetLogColorSpaceW
-#define GetMetaFile GetMetaFileW
-#define GetObject GetObjectW
-#define GetOutlineTextMetrics GetOutlineTextMetricsW
-#define GetTextExtentPoint GetTextExtentPointW
-#define GetTextExtentExPoint GetTextExtentExPointW
-#define GetTextExtentPoint32 GetTextExtentPoint32W
-#define GetTextFace GetTextFaceW
-#define GetTextMetrics GetTextMetricsW
-#define PolyTextOut PolyTextOutW
-#define RemoveFontResource RemoveFontResourceW
-#if (_WIN32_WINNT >= 0x0500)
-#define RemoveFontResourceEx RemoveFontResourceExW
-#endif
-#define ResetDC ResetDCW
-#define SetICMProfile SetICMProfileW
-#define StartDoc StartDocW
-#define TextOut TextOutW
-#define UpdateICMRegKey UpdateICMRegKeyW
-#define wglUseFontBitmaps wglUseFontBitmapsW
-#define wglUseFontOutlines wglUseFontOutlinesW
-#if (_WIN32_WINNT >= 0x0500)
-#define GetGlyphIndices GetGlyphIndicesW
-#endif
-#else /* UNICODE */
-typedef BYTE BCHAR;
-typedef DOCINFOA DOCINFO, *LPDOCINFO;
-typedef LOGFONTA LOGFONT,*PLOGFONT,*LPLOGFONT;
-typedef TEXTMETRICA TEXTMETRIC,*PTEXTMETRIC,*LPTEXTMETRIC;
-#define ICMENUMPROC ICMENUMPROCA
-#define FONTENUMPROC FONTENUMPROCA
-typedef DEVMODEA DEVMODE,*PDEVMODE,*LPDEVMODE;
-#if _WIN32_WINNT >= 0x0500
-typedef ENUMLOGFONTEXDVA ENUMLOGFONTEXDV;
-typedef PENUMLOGFONTEXDVA PENUMLOGFONTEXDV;
-typedef LPENUMLOGFONTEXDVA LPENUMLOGFONTEXDV;
-#endif
-typedef EXTLOGFONTA EXTLOGFONT,*PEXTLOGFONT,*LPEXTLOGFONT;
-typedef GCP_RESULTSA GCP_RESULTS,*LPGCP_RESULTS;
-typedef OUTLINETEXTMETRICA OUTLINETEXTMETRIC,*POUTLINETEXTMETRIC,*LPOUTLINETEXTMETRIC;
-typedef POLYTEXTA POLYTEXT,*PPOLYTEXT,*LPPOLYTEXT;
-typedef LOGCOLORSPACEA LOGCOLORSPACE,*LPLOGCOLORSPACE;
-typedef NEWTEXTMETRICA NEWTEXTMETRIC,*PNEWTEXTMETRIC,*LPNEWTEXTMETRIC;
-typedef NEWTEXTMETRICEXA NEWTEXTMETRICEX;
-typedef ENUMLOGFONTA ENUMLOGFONT,*LPENUMLOGFONT;
-typedef ENUMLOGFONTEXA ENUMLOGFONTEX,*LPENUMLOGFONTEX;
-typedef DISPLAY_DEVICEA DISPLAY_DEVICE, *PDISPLAY_DEVICE, *LPDISPLAY_DEVICE;
-#define AddFontResource AddFontResourceA
-#if (_WIN32_WINNT >= 0x0500)
-#define AddFontResourceEx AddFontResourceExA
-#endif
-#define CopyEnhMetaFile CopyEnhMetaFileA
-#define CopyMetaFile CopyMetaFileA
-#define CreateColorSpace CreateColorSpaceA
-#define CreateDC CreateDCA
-#define CreateEnhMetaFile CreateEnhMetaFileA
-#define CreateFont CreateFontA
-#define CreateFontIndirect CreateFontIndirectA
-#define CreateIC CreateICA
-#define CreateMetaFile CreateMetaFileA
-#define CreateScalableFontResource CreateScalableFontResourceA
-#define DeviceCapabilities DeviceCapabilitiesA
-#define EnumFontFamilies EnumFontFamiliesA
-#define EnumFontFamiliesEx EnumFontFamiliesExA
-#define EnumFonts EnumFontsA
-#define EnumICMProfiles EnumICMProfilesA
-#define ExtTextOut ExtTextOutA
-#define GetCharWidthFloat GetCharWidthFloatA
-#define GetCharWidth GetCharWidthA
-#define GetCharacterPlacement GetCharacterPlacementA
-#define GetCharABCWidths GetCharABCWidthsA
-#define GetCharABCWidthsFloat GetCharABCWidthsFloatA
-#define GetCharWidth32 GetCharWidth32A
-#define GetEnhMetaFile GetEnhMetaFileA
-#define GetEnhMetaFileDescription GetEnhMetaFileDescriptionA
-#define GetGlyphOutline GetGlyphOutlineA
-#define GetICMProfile GetICMProfileA
-#define GetKerningPairs GetKerningPairsA
-#define GetLogColorSpace GetLogColorSpaceA
-#define GetMetaFile GetMetaFileA
-#define GetObject GetObjectA
-#define GetOutlineTextMetrics GetOutlineTextMetricsA
-#define GetTextExtentPoint GetTextExtentPointA
-#define GetTextExtentExPoint GetTextExtentExPointA
-#define GetTextExtentPoint32 GetTextExtentPoint32A
-#define GetTextFace GetTextFaceA
-#define GetTextMetrics GetTextMetricsA
-#define PolyTextOut PolyTextOutA
-#define RemoveFontResource RemoveFontResourceA
-#if (_WIN32_WINNT >= 0x0500)
-#define RemoveFontResourceEx RemoveFontResourceExA
-#endif
-#define ResetDC ResetDCA
-#define SetICMProfile SetICMProfileA
-#define StartDoc StartDocA
-#define TextOut TextOutA
-#define UpdateICMRegKey UpdateICMRegKeyA
-#define wglUseFontBitmaps wglUseFontBitmapsA
-#define wglUseFontOutlines wglUseFontOutlinesA
-#if (_WIN32_WINNT >= 0x0500)
-#define GetGlyphIndices GetGlyphIndicesA
-#endif
-#endif /* UNICODE */
-#endif /* RC_INVOKED */
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/wininet.h b/winsup/w32api/include/wininet.h
deleted file mode 100644
index 5d7fba3..0000000
--- a/winsup/w32api/include/wininet.h
+++ /dev/null
@@ -1,986 +0,0 @@
-#ifndef _WININET_H
-#define _WININET_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#include <windows.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define INTERNET_INVALID_PORT_NUMBER 0
-#define INTERNET_DEFAULT_FTP_PORT 21
-#define INTERNET_DEFAULT_GOPHER_PORT 70
-#define INTERNET_DEFAULT_HTTP_PORT 80
-#define INTERNET_DEFAULT_HTTPS_PORT 443
-#define INTERNET_DEFAULT_SOCKS_PORT 1080
-#define MAX_CACHE_ENTRY_INFO_SIZE 4096
-#define INTERNET_MAX_HOST_NAME_LENGTH 256
-#define INTERNET_MAX_USER_NAME_LENGTH 128
-#define INTERNET_MAX_PASSWORD_LENGTH 128
-#define INTERNET_MAX_PORT_NUMBER_LENGTH 5
-#define INTERNET_MAX_PORT_NUMBER_VALUE 65535
-#define INTERNET_MAX_PATH_LENGTH 2048
-#define INTERNET_MAX_SCHEME_LENGTH 32
-#define INTERNET_MAX_URL_LENGTH (INTERNET_MAX_SCHEME_LENGTH+sizeof("://")+INTERNET_MAX_PATH_LENGTH)
-#define INTERNET_KEEP_ALIVE_UNKNOWN ((DWORD)-1)
-#define INTERNET_KEEP_ALIVE_ENABLED 1
-#define INTERNET_KEEP_ALIVE_DISABLED 0
-#define INTERNET_REQFLAG_FROM_CACHE 1
-#define INTERNET_REQFLAG_ASYNC 2
-#define INTERNET_FLAG_RELOAD 0x80000000
-#define INTERNET_FLAG_RAW_DATA 0x40000000
-#define INTERNET_FLAG_EXISTING_CONNECT 0x20000000
-#define INTERNET_FLAG_ASYNC 0x10000000
-#define INTERNET_FLAG_PASSIVE 0x08000000
-#define INTERNET_FLAG_NO_CACHE_WRITE 0x04000000
-#define INTERNET_FLAG_DONT_CACHE INTERNET_FLAG_NO_CACHE_WRITE
-#define INTERNET_FLAG_MAKE_PERSISTENT 0x02000000
-#define INTERNET_FLAG_OFFLINE 0x1000000
-#define INTERNET_FLAG_SECURE 0x800000
-#define INTERNET_FLAG_KEEP_CONNECTION 0x400000
-#define INTERNET_FLAG_NO_AUTO_REDIRECT 0x200000
-#define INTERNET_FLAG_READ_PREFETCH 0x100000
-#define INTERNET_FLAG_NO_COOKIES 0x80000
-#define INTERNET_FLAG_NO_AUTH 0x40000
-#define INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP 0x8000
-#define INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS 0x4000
-#define INTERNET_FLAG_IGNORE_CERT_DATE_INVALID 0x2000
-#define INTERNET_FLAG_IGNORE_CERT_CN_INVALID 0x1000
-#define INTERNET_FLAG_MUST_CACHE_REQUEST 16
-#define INTERNET_FLAG_RESYNCHRONIZE 0x800
-#define INTERNET_FLAG_HYPERLINK 0x400
-#define INTERNET_FLAG_NO_UI 0x200
-#define INTERNET_FLAG_PRAGMA_NOCACHE 0x100
-#define INTERNET_FLAG_TRANSFER_ASCII FTP_TRANSFER_TYPE_ASCII
-#define INTERNET_FLAG_TRANSFER_BINARY FTP_TRANSFER_TYPE_BINARY
-#define SECURITY_INTERNET_MASK (INTERNET_FLAG_IGNORE_CERT_CN_INVALID|INTERNET_FLAG_IGNORE_CERT_DATE_INVALID|INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS|INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP)
-#define SECURITY_SET_MASK SECURITY_INTERNET_MASK
-#define INTERNET_FLAGS_MASK (INTERNET_FLAG_RELOAD|INTERNET_FLAG_RAW_DATA|INTERNET_FLAG_EXISTING_CONNECT|\
-INTERNET_FLAG_ASYNC|INTERNET_FLAG_PASSIVE|INTERNET_FLAG_NO_CACHE_WRITE|INTERNET_FLAG_MAKE_PERSISTENT|INTERNET_FLAG_OFFLINE|\
-INTERNET_FLAG_SECURE|INTERNET_FLAG_KEEP_CONNECTION|INTERNET_FLAG_NO_AUTO_REDIRECT|INTERNET_FLAG_READ_PREFETCH |\
-INTERNET_FLAG_NO_COOKIES|INTERNET_FLAG_NO_AUTH|SECURITY_INTERNET_MASK|INTERNET_FLAG_TRANSFER_ASCII|INTERNET_FLAG_TRANSFER_BINARY\
-|INTERNET_FLAG_RESYNCHRONIZE|INTERNET_FLAG_MUST_CACHE_REQUEST|INTERNET_FLAG_HYPERLINK|INTERNET_FLAG_NO_UI)
-#define INTERNET_OPTIONS_MASK (~INTERNET_FLAGS_MASK)
-#define INTERNET_NO_CALLBACK 0
-#define INTERNET_RFC1123_FORMAT 0
-#define INTERNET_RFC1123_BUFSIZE 30
-#define ICU_ESCAPE 0x80000000
-#define ICU_USERNAME 0x40000000
-#define ICU_NO_ENCODE 0x20000000
-#define ICU_DECODE 0x10000000
-#define ICU_NO_META 0x08000000
-#define ICU_ENCODE_SPACES_ONLY 0x04000000
-#define ICU_BROWSER_MODE 0x02000000
-#define INTERNET_OPEN_TYPE_PRECONFIG 0
-#define INTERNET_OPEN_TYPE_DIRECT 1
-#define INTERNET_OPEN_TYPE_PROXY 3
-#define PRE_CONFIG_INTERNET_ACCESS INTERNET_OPEN_TYPE_PRECONFIG
-#define LOCAL_INTERNET_ACCESS INTERNET_OPEN_TYPE_DIRECT
-#define GATEWAY_INTERNET_ACCESS 2
-#define CERN_PROXY_INTERNET_ACCESS INTERNET_OPEN_TYPE_PROXY
-#define ISO_GLOBAL 1
-#define ISO_REGISTRY 2
-#define ISO_VALID_FLAGS (ISO_GLOBAL | ISO_REGISTRY)
-#define INTERNET_OPTION_CALLBACK 1
-#define INTERNET_OPTION_CONNECT_TIMEOUT 2
-#define INTERNET_OPTION_CONNECT_RETRIES 3
-#define INTERNET_OPTION_CONNECT_BACKOFF 4
-#define INTERNET_OPTION_SEND_TIMEOUT 5
-#define INTERNET_OPTION_CONTROL_SEND_TIMEOUT INTERNET_OPTION_SEND_TIMEOUT
-#define INTERNET_OPTION_RECEIVE_TIMEOUT 6
-#define INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUT INTERNET_OPTION_RECEIVE_TIMEOUT
-#define INTERNET_OPTION_DATA_SEND_TIMEOUT 7
-#define INTERNET_OPTION_DATA_RECEIVE_TIMEOUT 8
-#define INTERNET_OPTION_HANDLE_TYPE 9
-#define INTERNET_OPTION_CONTEXT_VALUE 10
-#define INTERNET_OPTION_LISTEN_TIMEOUT 11
-#define INTERNET_OPTION_READ_BUFFER_SIZE 12
-#define INTERNET_OPTION_WRITE_BUFFER_SIZE 13
-#define INTERNET_OPTION_ASYNC_ID 15
-#define INTERNET_OPTION_ASYNC_PRIORITY 16
-#define INTERNET_OPTION_PARENT_HANDLE 21
-#define INTERNET_OPTION_KEEP_CONNECTION 22
-#define INTERNET_OPTION_REQUEST_FLAGS 23
-#define INTERNET_OPTION_EXTENDED_ERROR 24
-#define INTERNET_OPTION_OFFLINE_MODE 26
-#define INTERNET_OPTION_CACHE_STREAM_HANDLE 27
-#define INTERNET_OPTION_USERNAME 28
-#define INTERNET_OPTION_PASSWORD 29
-#define INTERNET_OPTION_ASYNC 30
-#define INTERNET_OPTION_SECURITY_FLAGS 31
-#define INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT 32
-#define INTERNET_OPTION_DATAFILE_NAME 33
-#define INTERNET_OPTION_URL 34
-#define INTERNET_OPTION_SECURITY_CERTIFICATE 35
-#define INTERNET_OPTION_SECURITY_KEY_BITNESS 36
-#define INTERNET_OPTION_REFRESH 37
-#define INTERNET_OPTION_PROXY 38
-#define INTERNET_OPTION_SETTINGS_CHANGED 39
-#define INTERNET_OPTION_VERSION 40
-#define INTERNET_OPTION_USER_AGENT 41
-#define INTERNET_OPTION_END_BROWSER_SESSION 42
-#define INTERNET_OPTION_PROXY_USERNAME 43
-#define INTERNET_OPTION_PROXY_PASSWORD 44
-#define INTERNET_OPTION_CONNECTED_STATE 50
-#define INTERNET_FIRST_OPTION INTERNET_OPTION_CALLBACK
-/* FIXME: missing INTERNET_OPTION_*? */
-#define INTERNET_LAST_OPTION INTERNET_OPTION_CONNECTED_STATE
-#define INTERNET_PRIORITY_FOREGROUND 1000
-#define INTERNET_HANDLE_TYPE_INTERNET 1
-#define INTERNET_HANDLE_TYPE_CONNECT_FTP 2
-#define INTERNET_HANDLE_TYPE_CONNECT_GOPHER 3
-#define INTERNET_HANDLE_TYPE_CONNECT_HTTP 4
-#define INTERNET_HANDLE_TYPE_FTP_FIND 5
-#define INTERNET_HANDLE_TYPE_FTP_FIND_HTML 6
-#define INTERNET_HANDLE_TYPE_FTP_FILE 7
-#define INTERNET_HANDLE_TYPE_FTP_FILE_HTML 8
-#define INTERNET_HANDLE_TYPE_GOPHER_FIND 9
-#define INTERNET_HANDLE_TYPE_GOPHER_FIND_HTML 10
-#define INTERNET_HANDLE_TYPE_GOPHER_FILE 11
-#define INTERNET_HANDLE_TYPE_GOPHER_FILE_HTML 12
-#define INTERNET_HANDLE_TYPE_HTTP_REQUEST 13
-#define SECURITY_FLAG_SECURE 1
-#define SECURITY_FLAG_SSL 2
-#define SECURITY_FLAG_SSL3 4
-#define SECURITY_FLAG_PCT 8
-#define SECURITY_FLAG_PCT4 16
-#define SECURITY_FLAG_IETFSSL4 0x20
-#define SECURITY_FLAG_IGNORE_REVOCATION 0x00000080
-#define SECURITY_FLAG_IGNORE_UNKNOWN_CA 0x00000100
-#define SECURITY_FLAG_IGNORE_WRONG_USAGE 0x00000200
-#define SECURITY_FLAG_40BIT 0x10000000
-#define SECURITY_FLAG_128BIT 0x20000000
-#define SECURITY_FLAG_56BIT 0x40000000
-#define SECURITY_FLAG_UNKNOWNBIT 0x80000000
-#define SECURITY_FLAG_NORMALBITNESS SECURITY_FLAG_40BIT
-#define SECURITY_FLAG_IGNORE_CERT_CN_INVALID INTERNET_FLAG_IGNORE_CERT_CN_INVALID
-#define SECURITY_FLAG_IGNORE_CERT_DATE_INVALID INTERNET_FLAG_IGNORE_CERT_DATE_INVALID
-#define SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTPS INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS
-#define SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTP INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP
-#define INTERNET_SERVICE_FTP 1
-#define INTERNET_SERVICE_GOPHER 2
-#define INTERNET_SERVICE_HTTP 3
-#define INTERNET_STATUS_RESOLVING_NAME 10
-#define INTERNET_STATUS_NAME_RESOLVED 11
-#define INTERNET_STATUS_CONNECTING_TO_SERVER 20
-#define INTERNET_STATUS_CONNECTED_TO_SERVER 21
-#define INTERNET_STATUS_SENDING_REQUEST 30
-#define INTERNET_STATUS_REQUEST_SENT 31
-#define INTERNET_STATUS_RECEIVING_RESPONSE 40
-#define INTERNET_STATUS_RESPONSE_RECEIVED 41
-#define INTERNET_STATUS_CTL_RESPONSE_RECEIVED 42
-#define INTERNET_STATUS_PREFETCH 43
-#define INTERNET_STATUS_CLOSING_CONNECTION 50
-#define INTERNET_STATUS_CONNECTION_CLOSED 51
-#define INTERNET_STATUS_HANDLE_CREATED 60
-#define INTERNET_STATUS_HANDLE_CLOSING 70
-#define INTERNET_STATUS_REQUEST_COMPLETE 100
-#define INTERNET_STATUS_REDIRECT 110
-#define INTERNET_INVALID_STATUS_CALLBACK ((INTERNET_STATUS_CALLBACK)(-1L))
-#define FTP_TRANSFER_TYPE_UNKNOWN 0
-#define FTP_TRANSFER_TYPE_ASCII 1
-#define FTP_TRANSFER_TYPE_BINARY 2
-#define FTP_TRANSFER_TYPE_MASK (FTP_TRANSFER_TYPE_ASCII | FTP_TRANSFER_TYPE_BINARY)
-#define MAX_GOPHER_DISPLAY_TEXT 128
-#define MAX_GOPHER_SELECTOR_TEXT 256
-#define MAX_GOPHER_HOST_NAME INTERNET_MAX_HOST_NAME_LENGTH
-#define MAX_GOPHER_LOCATOR_LENGTH (1+MAX_GOPHER_DISPLAY_TEXT+1+MAX_GOPHER_SELECTOR_TEXT+1+MAX_GOPHER_HOST_NAME+1+INTERNET_MAX_PORT_NUMBER_LENGTH+1+1+2)
-#define GOPHER_TYPE_TEXT_FILE 1
-#define GOPHER_TYPE_DIRECTORY 2
-#define GOPHER_TYPE_CSO 4
-#define GOPHER_TYPE_ERROR 8
-#define GOPHER_TYPE_MAC_BINHEX 16
-#define GOPHER_TYPE_DOS_ARCHIVE 32
-#define GOPHER_TYPE_UNIX_UUENCODED 64
-#define GOPHER_TYPE_INDEX_SERVER 128
-#define GOPHER_TYPE_TELNET 256
-#define GOPHER_TYPE_BINARY 512
-#define GOPHER_TYPE_REDUNDANT 1024
-#define GOPHER_TYPE_TN3270 0x800
-#define GOPHER_TYPE_GIF 0x1000
-#define GOPHER_TYPE_IMAGE 0x2000
-#define GOPHER_TYPE_BITMAP 0x4000
-#define GOPHER_TYPE_MOVIE 0x8000
-#define GOPHER_TYPE_SOUND 0x10000
-#define GOPHER_TYPE_HTML 0x20000
-#define GOPHER_TYPE_PDF 0x40000
-#define GOPHER_TYPE_CALENDAR 0x80000
-#define GOPHER_TYPE_INLINE 0x100000
-#define GOPHER_TYPE_UNKNOWN 0x20000000
-#define GOPHER_TYPE_ASK 0x40000000
-#define GOPHER_TYPE_GOPHER_PLUS 0x80000000
-#define IS_GOPHER_FILE(t) (BOOL)(((t)&GOPHER_TYPE_FILE_MASK)?TRUE:FALSE)
-#define IS_GOPHER_DIRECTORY(t) (BOOL)(((t)&GOPHER_TYPE_DIRECTORY)?TRUE:FALSE)
-#define IS_GOPHER_PHONE_SERVER(t) (BOOL)(((t)&GOPHER_TYPE_CSO)?TRUE:FALSE)
-#define IS_GOPHER_ERROR(t) (BOOL)(((t)&GOPHER_TYPE_ERROR)?TRUE:FALSE)
-#define IS_GOPHER_INDEX_SERVER(t) (BOOL)(((t)&GOPHER_TYPE_INDEX_SERVER)?TRUE:FALSE)
-#define IS_GOPHER_TELNET_SESSION(t) (BOOL)(((t)&GOPHER_TYPE_TELNET)?TRUE:FALSE)
-#define IS_GOPHER_BACKUP_SERVER(t) (BOOL)(((t)&GOPHER_TYPE_REDUNDANT)?TRUE:FALSE)
-#define IS_GOPHER_TN3270_SESSION(t) (BOOL)(((t)&GOPHER_TYPE_TN3270)?TRUE:FALSE)
-#define IS_GOPHER_ASK(t) (BOOL)(((t)&GOPHER_TYPE_ASK)?TRUE:FALSE)
-#define IS_GOPHER_PLUS(t) (BOOL)(((t)&GOPHER_TYPE_GOPHER_PLUS)?TRUE:FALSE)
-#define IS_GOPHER_TYPE_KNOWN(t) (BOOL)(((t)&GOPHER_TYPE_UNKNOWN)?FALSE:TRUE)
-#define GOPHER_TYPE_FILE_MASK (GOPHER_TYPE_TEXT_FILE|GOPHER_TYPE_MAC_BINHEX|GOPHER_TYPE_DOS_ARCHIVE|\
-GOPHER_TYPE_UNIX_UUENCODED|GOPHER_TYPE_BINARY|GOPHER_TYPE_GIF|GOPHER_TYPE_IMAGE|GOPHER_TYPE_BITMAP\
-|GOPHER_TYPE_MOVIE|GOPHER_TYPE_SOUND|GOPHER_TYPE_HTML|GOPHER_TYPE_PDF|GOPHER_TYPE_CALENDAR|GOPHER_TYPE_INLINE)
-#define MAX_GOPHER_CATEGORY_NAME 128
-#define MAX_GOPHER_ATTRIBUTE_NAME 128
-#define MIN_GOPHER_ATTRIBUTE_LENGTH 256
-#define GOPHER_INFO_CATEGORY TEXT("+INFO")
-#define GOPHER_ADMIN_CATEGORY TEXT("+ADMIN")
-#define GOPHER_VIEWS_CATEGORY TEXT("+VIEWS")
-#define GOPHER_ABSTRACT_CATEGORY TEXT("+ABSTRACT")
-#define GOPHER_VERONICA_CATEGORY TEXT("+VERONICA")
-#define GOPHER_ADMIN_ATTRIBUTE TEXT("Admin")
-#define GOPHER_MOD_DATE_ATTRIBUTE TEXT("Mod-Date")
-#define GOPHER_TTL_ATTRIBUTE TEXT("TTL")
-#define GOPHER_SCORE_ATTRIBUTE TEXT("Score")
-#define GOPHER_RANGE_ATTRIBUTE TEXT("Score-range")
-#define GOPHER_SITE_ATTRIBUTE TEXT("Site")
-#define GOPHER_ORG_ATTRIBUTE TEXT("Org")
-#define GOPHER_LOCATION_ATTRIBUTE TEXT("Loc")
-#define GOPHER_GEOG_ATTRIBUTE TEXT("Geog")
-#define GOPHER_TIMEZONE_ATTRIBUTE TEXT("TZ")
-#define GOPHER_PROVIDER_ATTRIBUTE TEXT("Provider")
-#define GOPHER_VERSION_ATTRIBUTE TEXT("Version")
-#define GOPHER_ABSTRACT_ATTRIBUTE TEXT("Abstract")
-#define GOPHER_VIEW_ATTRIBUTE TEXT("View")
-#define GOPHER_TREEWALK_ATTRIBUTE TEXT("treewalk")
-#define GOPHER_ATTRIBUTE_ID_BASE 0xabcccc00
-#define GOPHER_CATEGORY_ID_ALL (GOPHER_ATTRIBUTE_ID_BASE+1)
-#define GOPHER_CATEGORY_ID_INFO (GOPHER_ATTRIBUTE_ID_BASE+2)
-#define GOPHER_CATEGORY_ID_ADMIN (GOPHER_ATTRIBUTE_ID_BASE+3)
-#define GOPHER_CATEGORY_ID_VIEWS (GOPHER_ATTRIBUTE_ID_BASE+4)
-#define GOPHER_CATEGORY_ID_ABSTRACT (GOPHER_ATTRIBUTE_ID_BASE+5)
-#define GOPHER_CATEGORY_ID_VERONICA (GOPHER_ATTRIBUTE_ID_BASE+6)
-#define GOPHER_CATEGORY_ID_ASK (GOPHER_ATTRIBUTE_ID_BASE+7)
-#define GOPHER_CATEGORY_ID_UNKNOWN (GOPHER_ATTRIBUTE_ID_BASE+8)
-#define GOPHER_ATTRIBUTE_ID_ALL (GOPHER_ATTRIBUTE_ID_BASE+9)
-#define GOPHER_ATTRIBUTE_ID_ADMIN (GOPHER_ATTRIBUTE_ID_BASE+10)
-#define GOPHER_ATTRIBUTE_ID_MOD_DATE (GOPHER_ATTRIBUTE_ID_BASE+11)
-#define GOPHER_ATTRIBUTE_ID_TTL (GOPHER_ATTRIBUTE_ID_BASE+12)
-#define GOPHER_ATTRIBUTE_ID_SCORE (GOPHER_ATTRIBUTE_ID_BASE+13)
-#define GOPHER_ATTRIBUTE_ID_RANGE (GOPHER_ATTRIBUTE_ID_BASE+14)
-#define GOPHER_ATTRIBUTE_ID_SITE (GOPHER_ATTRIBUTE_ID_BASE+15)
-#define GOPHER_ATTRIBUTE_ID_ORG (GOPHER_ATTRIBUTE_ID_BASE+16)
-#define GOPHER_ATTRIBUTE_ID_LOCATION (GOPHER_ATTRIBUTE_ID_BASE+17)
-#define GOPHER_ATTRIBUTE_ID_GEOG (GOPHER_ATTRIBUTE_ID_BASE+18)
-#define GOPHER_ATTRIBUTE_ID_TIMEZONE (GOPHER_ATTRIBUTE_ID_BASE+19)
-#define GOPHER_ATTRIBUTE_ID_PROVIDER (GOPHER_ATTRIBUTE_ID_BASE+20)
-#define GOPHER_ATTRIBUTE_ID_VERSION (GOPHER_ATTRIBUTE_ID_BASE+21)
-#define GOPHER_ATTRIBUTE_ID_ABSTRACT (GOPHER_ATTRIBUTE_ID_BASE+22)
-#define GOPHER_ATTRIBUTE_ID_VIEW (GOPHER_ATTRIBUTE_ID_BASE+23)
-#define GOPHER_ATTRIBUTE_ID_TREEWALK (GOPHER_ATTRIBUTE_ID_BASE+24)
-#define GOPHER_ATTRIBUTE_ID_UNKNOWN (GOPHER_ATTRIBUTE_ID_BASE+25)
-#define HTTP_MAJOR_VERSION 1
-#define HTTP_MINOR_VERSION 0
-#define HTTP_VERSION TEXT("HTTP/1.0")
-#define HTTP_QUERY_MIME_VERSION 0
-#define HTTP_QUERY_CONTENT_TYPE 1
-#define HTTP_QUERY_CONTENT_TRANSFER_ENCODING 2
-#define HTTP_QUERY_CONTENT_ID 3
-#define HTTP_QUERY_CONTENT_DESCRIPTION 4
-#define HTTP_QUERY_CONTENT_LENGTH 5
-#define HTTP_QUERY_CONTENT_LANGUAGE 6
-#define HTTP_QUERY_ALLOW 7
-#define HTTP_QUERY_PUBLIC 8
-#define HTTP_QUERY_DATE 9
-#define HTTP_QUERY_EXPIRES 10
-#define HTTP_QUERY_LAST_MODIFIED 11
-#define HTTP_QUERY_MESSAGE_ID 12
-#define HTTP_QUERY_URI 13
-#define HTTP_QUERY_DERIVED_FROM 14
-#define HTTP_QUERY_COST 15
-#define HTTP_QUERY_LINK 16
-#define HTTP_QUERY_PRAGMA 17
-#define HTTP_QUERY_VERSION 18
-#define HTTP_QUERY_STATUS_CODE 19
-#define HTTP_QUERY_STATUS_TEXT 20
-#define HTTP_QUERY_RAW_HEADERS 21
-#define HTTP_QUERY_RAW_HEADERS_CRLF 22
-#define HTTP_QUERY_CONNECTION 23
-#define HTTP_QUERY_ACCEPT 24
-#define HTTP_QUERY_ACCEPT_CHARSET 25
-#define HTTP_QUERY_ACCEPT_ENCODING 26
-#define HTTP_QUERY_ACCEPT_LANGUAGE 27
-#define HTTP_QUERY_AUTHORIZATION 28
-#define HTTP_QUERY_CONTENT_ENCODING 29
-#define HTTP_QUERY_FORWARDED 30
-#define HTTP_QUERY_FROM 31
-#define HTTP_QUERY_IF_MODIFIED_SINCE 32
-#define HTTP_QUERY_LOCATION 33
-#define HTTP_QUERY_ORIG_URI 34
-#define HTTP_QUERY_REFERER 35
-#define HTTP_QUERY_RETRY_AFTER 36
-#define HTTP_QUERY_SERVER 37
-#define HTTP_QUERY_TITLE 38
-#define HTTP_QUERY_USER_AGENT 39
-#define HTTP_QUERY_WWW_AUTHENTICATE 40
-#define HTTP_QUERY_PROXY_AUTHENTICATE 41
-#define HTTP_QUERY_ACCEPT_RANGES 42
-#define HTTP_QUERY_SET_COOKIE 43
-#define HTTP_QUERY_COOKIE 44
-#define HTTP_QUERY_REQUEST_METHOD 45
-#define HTTP_QUERY_MAX 45
-#define HTTP_QUERY_CUSTOM 65535
-#define HTTP_QUERY_FLAG_REQUEST_HEADERS 0x80000000
-#define HTTP_QUERY_FLAG_SYSTEMTIME 0x40000000
-#define HTTP_QUERY_FLAG_NUMBER 0x20000000
-#define HTTP_QUERY_FLAG_COALESCE 0x10000000
-#define HTTP_QUERY_MODIFIER_FLAGS_MASK (HTTP_QUERY_FLAG_REQUEST_HEADERS|HTTP_QUERY_FLAG_SYSTEMTIME|HTTP_QUERY_FLAG_NUMBER|HTTP_QUERY_FLAG_COALESCE)
-#define HTTP_QUERY_HEADER_MASK (~HTTP_QUERY_MODIFIER_FLAGS_MASK)
-#define HTTP_STATUS_OK 200
-#define HTTP_STATUS_CREATED 201
-#define HTTP_STATUS_ACCEPTED 202
-#define HTTP_STATUS_PARTIAL 203
-#define HTTP_STATUS_NO_CONTENT 204
-#define HTTP_STATUS_AMBIGUOUS 300
-#define HTTP_STATUS_MOVED 301
-#define HTTP_STATUS_REDIRECT 302
-#define HTTP_STATUS_REDIRECT_METHOD 303
-#define HTTP_STATUS_NOT_MODIFIED 304
-#define HTTP_STATUS_BAD_REQUEST 400
-#define HTTP_STATUS_DENIED 401
-#define HTTP_STATUS_PAYMENT_REQ 402
-#define HTTP_STATUS_FORBIDDEN 403
-#define HTTP_STATUS_NOT_FOUND 404
-#define HTTP_STATUS_BAD_METHOD 405
-#define HTTP_STATUS_NONE_ACCEPTABLE 406
-#define HTTP_STATUS_PROXY_AUTH_REQ 407
-#define HTTP_STATUS_REQUEST_TIMEOUT 408
-#define HTTP_STATUS_CONFLICT 409
-#define HTTP_STATUS_GONE 410
-#define HTTP_STATUS_AUTH_REFUSED 411
-#define HTTP_STATUS_SERVER_ERROR 500
-#define HTTP_STATUS_NOT_SUPPORTED 501
-#define HTTP_STATUS_BAD_GATEWAY 502
-#define HTTP_STATUS_SERVICE_UNAVAIL 503
-#define HTTP_STATUS_GATEWAY_TIMEOUT 504
-#define INTERNET_PREFETCH_PROGRESS 0
-#define INTERNET_PREFETCH_COMPLETE 1
-#define INTERNET_PREFETCH_ABORTED 2
-#define FLAGS_ERROR_UI_FILTER_FOR_ERRORS 0x01
-#define FLAGS_ERROR_UI_FLAGS_CHANGE_OPTIONS 0x02
-#define FLAGS_ERROR_UI_FLAGS_GENERATE_DATA 0x04
-#define FLAGS_ERROR_UI_FLAGS_NO_UI 0x08
-#define HTTP_ADDREQ_INDEX_MASK 0x0000FFFF
-#define HTTP_ADDREQ_FLAGS_MASK 0xFFFF0000
-#define HTTP_ADDREQ_FLAG_ADD_IF_NEW 0x10000000
-#define HTTP_ADDREQ_FLAG_ADD 0x20000000
-#define HTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA 0x40000000
-#define HTTP_ADDREQ_FLAG_COALESCE_WITH_SEMICOLON 0x01000000
-#define HTTP_ADDREQ_FLAG_COALESCE HTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA
-#define HTTP_ADDREQ_FLAG_REPLACE 0x80000000
-#define INTERNET_ERROR_BASE 12000
-#define ERROR_INTERNET_OUT_OF_HANDLES (INTERNET_ERROR_BASE+1)
-#define ERROR_INTERNET_TIMEOUT (INTERNET_ERROR_BASE+2)
-#define ERROR_INTERNET_EXTENDED_ERROR (INTERNET_ERROR_BASE+3)
-#define ERROR_INTERNET_INTERNAL_ERROR (INTERNET_ERROR_BASE+4)
-#define ERROR_INTERNET_INVALID_URL (INTERNET_ERROR_BASE+5)
-#define ERROR_INTERNET_UNRECOGNIZED_SCHEME (INTERNET_ERROR_BASE+6)
-#define ERROR_INTERNET_NAME_NOT_RESOLVED (INTERNET_ERROR_BASE+7)
-#define ERROR_INTERNET_PROTOCOL_NOT_FOUND (INTERNET_ERROR_BASE+8)
-#define ERROR_INTERNET_INVALID_OPTION (INTERNET_ERROR_BASE+9)
-#define ERROR_INTERNET_BAD_OPTION_LENGTH (INTERNET_ERROR_BASE+10)
-#define ERROR_INTERNET_OPTION_NOT_SETTABLE (INTERNET_ERROR_BASE+11)
-#define ERROR_INTERNET_SHUTDOWN (INTERNET_ERROR_BASE+12)
-#define ERROR_INTERNET_INCORRECT_USER_NAME (INTERNET_ERROR_BASE+13)
-#define ERROR_INTERNET_INCORRECT_PASSWORD (INTERNET_ERROR_BASE+14)
-#define ERROR_INTERNET_LOGIN_FAILURE (INTERNET_ERROR_BASE+15)
-#define ERROR_INTERNET_INVALID_OPERATION (INTERNET_ERROR_BASE+16)
-#define ERROR_INTERNET_OPERATION_CANCELLED (INTERNET_ERROR_BASE+17)
-#define ERROR_INTERNET_INCORRECT_HANDLE_TYPE (INTERNET_ERROR_BASE+18)
-#define ERROR_INTERNET_INCORRECT_HANDLE_STATE (INTERNET_ERROR_BASE+19)
-#define ERROR_INTERNET_NOT_PROXY_REQUEST (INTERNET_ERROR_BASE+20)
-#define ERROR_INTERNET_REGISTRY_VALUE_NOT_FOUND (INTERNET_ERROR_BASE+21)
-#define ERROR_INTERNET_BAD_REGISTRY_PARAMETER (INTERNET_ERROR_BASE+22)
-#define ERROR_INTERNET_NO_DIRECT_ACCESS (INTERNET_ERROR_BASE+23)
-#define ERROR_INTERNET_NO_CONTEXT (INTERNET_ERROR_BASE+24)
-#define ERROR_INTERNET_NO_CALLBACK (INTERNET_ERROR_BASE+25)
-#define ERROR_INTERNET_REQUEST_PENDING (INTERNET_ERROR_BASE+26)
-#define ERROR_INTERNET_INCORRECT_FORMAT (INTERNET_ERROR_BASE+27)
-#define ERROR_INTERNET_ITEM_NOT_FOUND (INTERNET_ERROR_BASE+28)
-#define ERROR_INTERNET_CANNOT_CONNECT (INTERNET_ERROR_BASE+29)
-#define ERROR_INTERNET_CONNECTION_ABORTED (INTERNET_ERROR_BASE+30)
-#define ERROR_INTERNET_CONNECTION_RESET (INTERNET_ERROR_BASE+31)
-#define ERROR_INTERNET_FORCE_RETRY (INTERNET_ERROR_BASE+32)
-#define ERROR_INTERNET_INVALID_PROXY_REQUEST (INTERNET_ERROR_BASE+33)
-#define ERROR_INTERNET_NEED_UI (INTERNET_ERROR_BASE+34)
-#define ERROR_INTERNET_HANDLE_EXISTS (INTERNET_ERROR_BASE+36)
-#define ERROR_INTERNET_SEC_CERT_DATE_INVALID (INTERNET_ERROR_BASE+37)
-#define ERROR_INTERNET_SEC_CERT_CN_INVALID (INTERNET_ERROR_BASE+38)
-#define ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR (INTERNET_ERROR_BASE+39)
-#define ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR (INTERNET_ERROR_BASE+40)
-#define ERROR_INTERNET_MIXED_SECURITY (INTERNET_ERROR_BASE+41)
-#define ERROR_INTERNET_CHG_POST_IS_NON_SECURE (INTERNET_ERROR_BASE+42)
-#define ERROR_INTERNET_POST_IS_NON_SECURE (INTERNET_ERROR_BASE+43)
-#define ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED (INTERNET_ERROR_BASE+44)
-#define ERROR_INTERNET_INVALID_CA (INTERNET_ERROR_BASE+45)
-#define ERROR_INTERNET_CLIENT_AUTH_NOT_SETUP (INTERNET_ERROR_BASE+46)
-#define ERROR_INTERNET_ASYNC_THREAD_FAILED (INTERNET_ERROR_BASE+47)
-#define ERROR_INTERNET_REDIRECT_SCHEME_CHANGE (INTERNET_ERROR_BASE+48)
-#define ERROR_FTP_TRANSFER_IN_PROGRESS (INTERNET_ERROR_BASE+110)
-#define ERROR_FTP_DROPPED (INTERNET_ERROR_BASE+111)
-#define ERROR_GOPHER_PROTOCOL_ERROR (INTERNET_ERROR_BASE+130)
-#define ERROR_GOPHER_NOT_FILE (INTERNET_ERROR_BASE+131)
-#define ERROR_GOPHER_DATA_ERROR (INTERNET_ERROR_BASE+132)
-#define ERROR_GOPHER_END_OF_DATA (INTERNET_ERROR_BASE+133)
-#define ERROR_GOPHER_INVALID_LOCATOR (INTERNET_ERROR_BASE+134)
-#define ERROR_GOPHER_INCORRECT_LOCATOR_TYPE (INTERNET_ERROR_BASE+135)
-#define ERROR_GOPHER_NOT_GOPHER_PLUS (INTERNET_ERROR_BASE+136)
-#define ERROR_GOPHER_ATTRIBUTE_NOT_FOUND (INTERNET_ERROR_BASE+137)
-#define ERROR_GOPHER_UNKNOWN_LOCATOR (INTERNET_ERROR_BASE+138)
-#define ERROR_HTTP_HEADER_NOT_FOUND (INTERNET_ERROR_BASE+150)
-#define ERROR_HTTP_DOWNLEVEL_SERVER (INTERNET_ERROR_BASE+151)
-#define ERROR_HTTP_INVALID_SERVER_RESPONSE (INTERNET_ERROR_BASE+152)
-#define ERROR_HTTP_INVALID_HEADER (INTERNET_ERROR_BASE+153)
-#define ERROR_HTTP_INVALID_QUERY_REQUEST (INTERNET_ERROR_BASE+154)
-#define ERROR_HTTP_HEADER_ALREADY_EXISTS (INTERNET_ERROR_BASE+155)
-#define ERROR_HTTP_REDIRECT_FAILED (INTERNET_ERROR_BASE+156)
-#define ERROR_HTTP_NOT_REDIRECTED (INTERNET_ERROR_BASE+160)
-#define ERROR_INTERNET_SECURITY_CHANNEL_ERROR (INTERNET_ERROR_BASE+157)
-#define ERROR_INTERNET_UNABLE_TO_CACHE_FILE (INTERNET_ERROR_BASE+158)
-#define ERROR_INTERNET_TCPIP_NOT_INSTALLED (INTERNET_ERROR_BASE+159)
-#define INTERNET_ERROR_LAST ERROR_INTERNET_TCPIP_NOT_INSTALLED
-#define URLCACHEAPI DECLSPEC_IMPORT
-#define NORMAL_CACHE_ENTRY 1
-#define STABLE_CACHE_ENTRY 2
-#define STICKY_CACHE_ENTRY 4
-#define SPARSE_CACHE_ENTRY 0x10000
-#define OCX_CACHE_ENTRY 0x20000
-#define COOKIE_CACHE_ENTRY 0x100000
-#define URLHISTORY_CACHE_ENTRY 0x200000
-#define CACHE_ENTRY_ATTRIBUTE_FC 4
-#define CACHE_ENTRY_HITRATE_FC 0x10
-#define CACHE_ENTRY_MODTIME_FC 0x40
-#define CACHE_ENTRY_EXPTIME_FC 0x80
-#define CACHE_ENTRY_ACCTIME_FC 0x100
-#define CACHE_ENTRY_SYNCTIME_FC 0x200
-#define CACHE_ENTRY_HEADERINFO_FC 0x400
-#define IRF_ASYNC WININET_API_FLAG_ASYNC
-#define IRF_SYNC WININET_API_FLAG_SYNC
-#define IRF_USE_CONTEXT WININET_API_FLAG_USE_CONTEXT
-#define IRF_NO_WAIT 8
-#define HSR_ASYNC WININET_API_FLAG_ASYNC
-#define HSR_SYNC WININET_API_FLAG_SYNC
-#define HSR_USE_CONTEXT WININET_API_FLAG_USE_CONTEXT
-#define HSR_INITIATE 8
-#define HSR_DOWNLOAD 16
-#define HSR_CHUNKED 32
-#define INTERNET_DIAL_UNATTENDED 0x8000
-#define INTERNET_DIALSTATE_DISCONNECTED 1
-#define INTERENT_GOONLINE_REFRESH 1
-#define INTERENT_GOONLINE_MASK 1
-#define INTERNET_AUTODIAL_FORCE_ONLINE 1
-#define INTERNET_AUTODIAL_FORCE_UNATTENDED 2
-#define INTERNET_AUTODIAL_FAILIFSECURITYCHECK 4
-#define INTERNET_CONNECTION_MODEM 0x01
-#define INTERNET_CONNECTION_LAN 0x02
-#define INTERNET_CONNECTION_PROXY 0x04
-#define INTERNET_CONNECTION_MODEM_BUSY 0x08
-#define INTERNET_RAS_INSTALLED 0x10
-#define INTERNET_CONNECTION_OFFLINE 0x20
-#define INTERNET_CONNECTION_CONFIGURED 0x40
-#define CACHEGROUP_SEARCH_ALL 0
-#define CACHEGROUP_SEARCH_BYURL 1
-#define INTERNET_CACHE_GROUP_ADD 0
-#define INTERNET_CACHE_GROUP_REMOVE 1
-#define WININET_API_FLAG_ASYNC 0x00000001 /* Force asynchronous operations. */
-#define WININET_API_FLAG_SYNC 0x00000004 /* Force synchronous operations. */
-#define WININET_API_FLAG_USE_CONTEXT 0x00000008 /* Force the API to use the context value, even if it is set to zero. */
-
-#define INTERNET_STATE_CONNECTED 0x0001
-#define INTERNET_STATE_DISCONNECTED 0x0002
-#define INTERNET_STATE_DISCONNECTED_BY_USER 0x0010
-#define INTERNET_STATE_IDLE 0x0100
-#define INTERNET_STATE_BUSY 0x0200
-
-#ifndef RC_INVOKED
-typedef PVOID HINTERNET;
-typedef HINTERNET *LPHINTERNET;
-typedef LONGLONG GROUPID;
-typedef WORD INTERNET_PORT,*LPINTERNET_PORT;
-typedef enum {
- INTERNET_SCHEME_PARTIAL = -2, INTERNET_SCHEME_UNKNOWN = -1,
- INTERNET_SCHEME_DEFAULT = 0, INTERNET_SCHEME_FTP, INTERNET_SCHEME_GOPHER,
- INTERNET_SCHEME_HTTP, INTERNET_SCHEME_HTTPS, INTERNET_SCHEME_FILE,
- INTERNET_SCHEME_NEWS, INTERNET_SCHEME_MAILTO, INTERNET_SCHEME_SOCKS,
- INTERNET_SCHEME_FIRST = INTERNET_SCHEME_FTP, INTERNET_SCHEME_LAST = INTERNET_SCHEME_SOCKS
-} INTERNET_SCHEME,*LPINTERNET_SCHEME;
-typedef struct { DWORD dwResult; DWORD dwError; } INTERNET_ASYNC_RESULT,*LPINTERNET_ASYNC_RESULT;
-typedef struct { DWORD dwStatus; DWORD dwSize; } INTERNET_PREFETCH_STATUS,*LPINTERNET_PREFETCH_STATUS;
-typedef struct {
- DWORD dwAccessType;
- LPCTSTR lpszProxy;
- LPCTSTR lpszProxyBypass;
-} INTERNET_PROXY_INFO,*LPINTERNET_PROXY_INFO;
-typedef struct {
- DWORD dwMajorVersion;
- DWORD dwMinorVersion;
-} INTERNET_VERSION_INFO,*LPINTERNET_VERSION_INFO;
-typedef struct {
- DWORD dwStructSize;
- LPSTR lpszScheme;
- DWORD dwSchemeLength;
- INTERNET_SCHEME nScheme;
- LPSTR lpszHostName;
- DWORD dwHostNameLength;
- INTERNET_PORT nPort;
- LPSTR lpszUserName;
- DWORD dwUserNameLength;
- LPSTR lpszPassword;
- DWORD dwPasswordLength;
- LPSTR lpszUrlPath;
- DWORD dwUrlPathLength;
- LPSTR lpszExtraInfo;
- DWORD dwExtraInfoLength;
-} URL_COMPONENTSA,*LPURL_COMPONENTSA;
-typedef struct {
- DWORD dwStructSize;
- LPWSTR lpszScheme;
- DWORD dwSchemeLength;
- INTERNET_SCHEME nScheme;
- LPWSTR lpszHostName;
- DWORD dwHostNameLength;
- INTERNET_PORT nPort;
- LPWSTR lpszUserName;
- DWORD dwUserNameLength;
- LPWSTR lpszPassword;
- DWORD dwPasswordLength;
- LPWSTR lpszUrlPath;
- DWORD dwUrlPathLength;
- LPWSTR lpszExtraInfo;
- DWORD dwExtraInfoLength;
-} URL_COMPONENTSW,*LPURL_COMPONENTSW;
-typedef struct {
- FILETIME ftExpiry;
- FILETIME ftStart;
- LPTSTR lpszSubjectInfo;
- LPTSTR lpszIssuerInfo;
- LPTSTR lpszProtocolName;
- LPTSTR lpszSignatureAlgName;
- LPTSTR lpszEncryptionAlgName;
- DWORD dwKeySize;
-} INTERNET_CERTIFICATE_INFO,*LPINTERNET_CERTIFICATE_INFO;
-typedef VOID (CALLBACK * INTERNET_STATUS_CALLBACK)(HINTERNET,DWORD,DWORD,PVOID,DWORD);
-typedef INTERNET_STATUS_CALLBACK * LPINTERNET_STATUS_CALLBACK;
-typedef struct {
- CHAR DisplayString[MAX_GOPHER_DISPLAY_TEXT+1];
- DWORD GopherType;
- DWORD SizeLow;
- DWORD SizeHigh;
- FILETIME LastModificationTime;
- CHAR Locator[MAX_GOPHER_LOCATOR_LENGTH+1];
-} GOPHER_FIND_DATAA,*LPGOPHER_FIND_DATAA;
-typedef struct {
- WCHAR DisplayString[MAX_GOPHER_DISPLAY_TEXT+1];
- DWORD GopherType;
- DWORD SizeLow;
- DWORD SizeHigh;
- FILETIME LastModificationTime;
- WCHAR Locator[MAX_GOPHER_LOCATOR_LENGTH+1];
-} GOPHER_FIND_DATAW,*LPGOPHER_FIND_DATAW;
-typedef struct {
- LPCTSTR Comment;
- LPCTSTR EmailAddress;
-} GOPHER_ADMIN_ATTRIBUTE_TYPE,*LPGOPHER_ADMIN_ATTRIBUTE_TYPE;
-typedef struct {FILETIME DateAndTime;} GOPHER_MOD_DATE_ATTRIBUTE_TYPE,*LPGOPHER_MOD_DATE_ATTRIBUTE_TYPE;
-typedef struct {DWORD Ttl;} GOPHER_TTL_ATTRIBUTE_TYPE,*LPGOPHER_TTL_ATTRIBUTE_TYPE;
-typedef struct {INT Score;} GOPHER_SCORE_ATTRIBUTE_TYPE,*LPGOPHER_SCORE_ATTRIBUTE_TYPE;
-typedef struct {
- INT LowerBound;
- INT UpperBound;
-} GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE,*LPGOPHER_SCORE_RANGE_ATTRIBUTE_TYPE;
-typedef struct {LPCTSTR Site;} GOPHER_SITE_ATTRIBUTE_TYPE,*LPGOPHER_SITE_ATTRIBUTE_TYPE;
-typedef struct {LPCTSTR Organization;} GOPHER_ORGANIZATION_ATTRIBUTE_TYPE,*LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPE;
-typedef struct {LPCTSTR Location;} GOPHER_LOCATION_ATTRIBUTE_TYPE,*LPGOPHER_LOCATION_ATTRIBUTE_TYPE;
-typedef struct {
- INT DegreesNorth;
- INT MinutesNorth;
- INT SecondsNorth;
- INT DegreesEast;
- INT MinutesEast;
- INT SecondsEast;
-} GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE,*LPGOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE;
-typedef struct {INT Zone;} GOPHER_TIMEZONE_ATTRIBUTE_TYPE,*LPGOPHER_TIMEZONE_ATTRIBUTE_TYPE;
-typedef struct {LPCTSTR Provider;} GOPHER_PROVIDER_ATTRIBUTE_TYPE,*LPGOPHER_PROVIDER_ATTRIBUTE_TYPE;
-typedef struct {LPCTSTR Version;} GOPHER_VERSION_ATTRIBUTE_TYPE,*LPGOPHER_VERSION_ATTRIBUTE_TYPE;
-typedef struct {
- LPCTSTR ShortAbstract;
- LPCTSTR AbstractFile;
-} GOPHER_ABSTRACT_ATTRIBUTE_TYPE,*LPGOPHER_ABSTRACT_ATTRIBUTE_TYPE;
-typedef struct {
- LPCTSTR ContentType;
- LPCTSTR Language;
- DWORD Size;
-} GOPHER_VIEW_ATTRIBUTE_TYPE,*LPGOPHER_VIEW_ATTRIBUTE_TYPE;
-typedef struct {BOOL TreeWalk;} GOPHER_VERONICA_ATTRIBUTE_TYPE,*LPGOPHER_VERONICA_ATTRIBUTE_TYPE;
-typedef struct {
- LPCTSTR QuestionType;
- LPCTSTR QuestionText;
-} GOPHER_ASK_ATTRIBUTE_TYPE,*LPGOPHER_ASK_ATTRIBUTE_TYPE;
-typedef struct {LPCTSTR Text;} GOPHER_UNKNOWN_ATTRIBUTE_TYPE,*LPGOPHER_UNKNOWN_ATTRIBUTE_TYPE;
-typedef struct {
- DWORD CategoryId;
- DWORD AttributeId;
- union {
- GOPHER_ADMIN_ATTRIBUTE_TYPE Admin;
- GOPHER_MOD_DATE_ATTRIBUTE_TYPE ModDate;
- GOPHER_TTL_ATTRIBUTE_TYPE Ttl;
- GOPHER_SCORE_ATTRIBUTE_TYPE Score;
- GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE ScoreRange;
- GOPHER_SITE_ATTRIBUTE_TYPE Site;
- GOPHER_ORGANIZATION_ATTRIBUTE_TYPE Organization;
- GOPHER_LOCATION_ATTRIBUTE_TYPE Location;
- GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE GeographicalLocation;
- GOPHER_TIMEZONE_ATTRIBUTE_TYPE TimeZone;
- GOPHER_PROVIDER_ATTRIBUTE_TYPE Provider;
- GOPHER_VERSION_ATTRIBUTE_TYPE Version;
- GOPHER_ABSTRACT_ATTRIBUTE_TYPE Abstract;
- GOPHER_VIEW_ATTRIBUTE_TYPE View;
- GOPHER_VERONICA_ATTRIBUTE_TYPE Veronica;
- GOPHER_ASK_ATTRIBUTE_TYPE Ask;
- GOPHER_UNKNOWN_ATTRIBUTE_TYPE Unknown;
- } AttributeType;
-} GOPHER_ATTRIBUTE_TYPE,*LPGOPHER_ATTRIBUTE_TYPE;
-typedef BOOL(CALLBACK *GOPHER_ATTRIBUTE_ENUMERATOR)(LPGOPHER_ATTRIBUTE_TYPE,DWORD);
-typedef struct _INTERNET_CACHE_ENTRY_INFOA {
- DWORD dwStructSize;
- LPSTR lpszSourceUrlName;
- LPSTR lpszLocalFileName;
- DWORD CacheEntryType;
- DWORD dwUseCount;
- DWORD dwHitRate;
- DWORD dwSizeLow;
- DWORD dwSizeHigh;
- FILETIME LastModifiedTime;
- FILETIME ExpireTime;
- FILETIME LastAccessTime;
- FILETIME LastSyncTime;
- PBYTE lpHeaderInfo;
- DWORD dwHeaderInfoSize;
- LPSTR lpszFileExtension;
- DWORD dwReserved;
-} INTERNET_CACHE_ENTRY_INFOA,*LPINTERNET_CACHE_ENTRY_INFOA;
-typedef struct _INTERNET_CACHE_ENTRY_INFOW {
- DWORD dwStructSize;
- LPSTR lpszSourceUrlName;
- LPWSTR lpszLocalFileName;
- DWORD CacheEntryType;
- DWORD dwUseCount;
- DWORD dwHitRate;
- DWORD dwSizeLow;
- DWORD dwSizeHigh;
- FILETIME LastModifiedTime;
- FILETIME ExpireTime;
- FILETIME LastAccessTime;
- FILETIME LastSyncTime;
- PBYTE lpHeaderInfo;
- DWORD dwHeaderInfoSize;
- LPWSTR lpszFileExtension;
- DWORD dwReserved;
-} INTERNET_CACHE_ENTRY_INFOW,*LPINTERNET_CACHE_ENTRY_INFOW;
-typedef struct _INTERNET_BUFFERSA {
- DWORD dwStructSize;
- struct _INTERNET_BUFFERSA *Next;
- LPCSTR lpcszHeader;
- DWORD dwHeadersLength;
- DWORD dwHeadersTotal;
- LPVOID lpvBuffer;
- DWORD dwBufferLength;
- DWORD dwBufferTotal;
- DWORD dwOffsetLow;
- DWORD dwOffsetHigh;
-} INTERNET_BUFFERSA,*LPINTERNET_BUFFERSA;
-typedef struct _INTERNET_BUFFERSW {
- DWORD dwStructSize;
- struct _INTERNET_BUFFERS *Next;
- LPCWSTR lpcszHeader;
- DWORD dwHeadersLength;
- DWORD dwHeadersTotal;
- LPVOID lpvBuffer;
- DWORD dwBufferLength;
- DWORD dwBufferTotal;
- DWORD dwOffsetLow;
- DWORD dwOffsetHigh;
-} INTERNET_BUFFERSW,*LPINTERNET_BUFFERSW;
-
-#define GROUP_OWNER_STORAGE_SIZE 4
-#define GROUPNAME_MAX_LENGTH 120
-typedef struct _INTERNET_CACHE_GROUP_INFOA {
- DWORD dwGroupSize;
- DWORD dwGroupFlags;
- DWORD dwGroupType;
- DWORD dwDiskUsage;
- DWORD dwDiskQuota;
- DWORD dwOwnerStorage[GROUP_OWNER_STORAGE_SIZE];
- CHAR szGroupName[GROUPNAME_MAX_LENGTH];
-} INTERNET_CACHE_GROUP_INFOA, * LPINTERNET_CACHE_GROUP_INFOA;
-typedef struct _INTERNET_CACHE_GROUP_INFOW {
- DWORD dwGroupSize;
- DWORD dwGroupFlags;
- DWORD dwGroupType;
- DWORD dwDiskUsage;
- DWORD dwDiskQuota;
- DWORD dwOwnerStorage[GROUP_OWNER_STORAGE_SIZE];
- WCHAR szGroupName[GROUPNAME_MAX_LENGTH];
-} INTERNET_CACHE_GROUP_INFOW, * LPINTERNET_CACHE_GROUP_INFOW;
-typedef struct {
- DWORD dwConnectedState;
- DWORD dwFlags;
-} INTERNET_CONNECTED_INFO, * LPINTERNET_CONNECTED_INFO;
-
-#ifdef UNICODE
-typedef URL_COMPONENTSW URL_COMPONENTS;
-typedef LPURL_COMPONENTSW LPURL_COMPONENTS;
-typedef GOPHER_FIND_DATAW GOPHER_FIND_DATA;
-typedef LPGOPHER_FIND_DATAW LPGOPHER_FIND_DATA;
-typedef INTERNET_CACHE_ENTRY_INFOW INTERNET_CACHE_ENTRY_INFO;
-typedef LPINTERNET_CACHE_ENTRY_INFOW LPINTERNET_CACHE_ENTRY_INFO;
-typedef INTERNET_BUFFERSW INTERNET_BUFFERS,*LPINTERNET_BUFFERS;
-typedef INTERNET_CACHE_GROUP_INFOW INTERNET_CACHE_GROUP_INFO;
-typedef LPINTERNET_CACHE_GROUP_INFOW LPINTERNET_CACHE_GROUP_INFO;
-#else
-typedef URL_COMPONENTSA URL_COMPONENTS;
-typedef LPURL_COMPONENTSA LPURL_COMPONENTS;
-typedef GOPHER_FIND_DATAA GOPHER_FIND_DATA;
-typedef LPGOPHER_FIND_DATAA LPGOPHER_FIND_DATA;
-typedef INTERNET_CACHE_ENTRY_INFOA INTERNET_CACHE_ENTRY_INFO;
-typedef LPINTERNET_CACHE_ENTRY_INFOA LPINTERNET_CACHE_ENTRY_INFO;
-typedef INTERNET_BUFFERSA INTERNET_BUFFERS,*LPINTERNET_BUFFERS;
-typedef INTERNET_CACHE_GROUP_INFOA INTERNET_CACHE_GROUP_INFO;
-typedef LPINTERNET_CACHE_GROUP_INFOA LPINTERNET_CACHE_GROUP_INFO;
-#endif
-BOOL WINAPI InternetTimeFromSystemTime(SYSTEMTIME*,DWORD,LPSTR,DWORD);
-BOOL WINAPI InternetTimeToSystemTime(LPCSTR,SYSTEMTIME*,DWORD);
-BOOL WINAPI InternetDebugGetLocalTime(SYSTEMTIME*,PDWORD);
-BOOL WINAPI InternetCrackUrlA(LPCSTR,DWORD,DWORD,LPURL_COMPONENTSA);
-BOOL WINAPI InternetCrackUrlW(LPCWSTR,DWORD,DWORD,LPURL_COMPONENTSW);
-BOOL WINAPI InternetCreateUrlA(LPURL_COMPONENTSA,DWORD,LPSTR,PDWORD);
-BOOL WINAPI InternetCreateUrlW(LPURL_COMPONENTSW,DWORD,LPWSTR,PDWORD);
-BOOL WINAPI InternetCanonicalizeUrlA(LPCSTR,LPSTR,PDWORD,DWORD);
-BOOL WINAPI InternetCanonicalizeUrlW(LPCWSTR,LPWSTR,PDWORD,DWORD);
-BOOL WINAPI InternetCheckConnectionA(LPCSTR,DWORD,DWORD);
-BOOL WINAPI InternetCheckConnectionW(LPCWSTR,DWORD,DWORD);
-BOOL WINAPI InternetCombineUrlA(LPCSTR,LPCSTR,LPSTR,PDWORD,DWORD);
-BOOL WINAPI InternetCombineUrlW(LPCWSTR,LPCWSTR,LPWSTR,PDWORD,DWORD);
-HINTERNET WINAPI InternetOpenA(LPCSTR,DWORD,LPCSTR,LPCSTR,DWORD);
-HINTERNET WINAPI InternetOpenW(LPCWSTR,DWORD,LPCWSTR,LPCWSTR,DWORD);
-BOOL WINAPI InternetCloseHandle(HINTERNET);
-HINTERNET WINAPI InternetConnectA(HINTERNET,LPCSTR,INTERNET_PORT,LPCSTR,LPCSTR,DWORD,DWORD,DWORD);
-HINTERNET WINAPI InternetConnectW(HINTERNET,LPCWSTR,INTERNET_PORT,LPCWSTR,LPCWSTR,DWORD,DWORD,DWORD);
-HINTERNET WINAPI InternetOpenUrlA(HINTERNET,LPCSTR,LPCSTR,DWORD,DWORD,DWORD);
-HINTERNET WINAPI InternetOpenUrlW(HINTERNET,LPCWSTR,LPCWSTR,DWORD,DWORD,DWORD);
-BOOL WINAPI InternetReadFile(HINTERNET,PVOID,DWORD,PDWORD);
-DWORD WINAPI InternetSetFilePointer( HINTERNET,LONG,PVOID,DWORD,DWORD);
-BOOL WINAPI InternetWriteFile(HINTERNET,LPCVOID,DWORD,PDWORD);
-BOOL WINAPI InternetQueryDataAvailable( HINTERNET,PDWORD,DWORD,DWORD);
-BOOL WINAPI InternetFindNextFileA(HINTERNET,PVOID);
-BOOL WINAPI InternetFindNextFileW(HINTERNET,PVOID);
-BOOL WINAPI InternetQueryOptionA(HINTERNET,DWORD,PVOID,PDWORD);
-BOOL WINAPI InternetQueryOptionW(HINTERNET,DWORD,PVOID,PDWORD);
-BOOL WINAPI InternetSetOptionA(HINTERNET,DWORD,PVOID,DWORD);
-BOOL WINAPI InternetSetOptionW(HINTERNET,DWORD,PVOID,DWORD);
-BOOL WINAPI InternetSetOptionExA(HINTERNET,DWORD,PVOID,DWORD,DWORD);
-BOOL WINAPI InternetSetOptionExW(HINTERNET,DWORD,PVOID,DWORD,DWORD);
-BOOL WINAPI InternetGetLastResponseInfoA(PDWORD,LPSTR,PDWORD);
-BOOL WINAPI InternetGetLastResponseInfoW(PDWORD,LPWSTR,PDWORD);
-INTERNET_STATUS_CALLBACK WINAPI InternetSetStatusCallback(HINTERNET,INTERNET_STATUS_CALLBACK);
-DWORD WINAPI FtpGetFileSize(HINTERNET,LPDWORD);
-HINTERNET WINAPI FtpFindFirstFileA(HINTERNET,LPCSTR,LPWIN32_FIND_DATA,DWORD,DWORD);
-HINTERNET WINAPI FtpFindFirstFileW(HINTERNET,LPCWSTR,LPWIN32_FIND_DATA,DWORD,DWORD);
-BOOL WINAPI FtpGetFileA(HINTERNET,LPCSTR,LPCSTR,BOOL,DWORD,DWORD,DWORD);
-BOOL WINAPI FtpGetFileW( HINTERNET,LPCWSTR,LPCWSTR,BOOL,DWORD,DWORD,DWORD);
-BOOL WINAPI FtpPutFileA(HINTERNET,LPCSTR,LPCSTR,DWORD,DWORD);
-BOOL WINAPI FtpPutFileW(HINTERNET,LPCWSTR,LPCWSTR,DWORD,DWORD);
-BOOL WINAPI FtpDeleteFileA(HINTERNET,LPCSTR);
-BOOL WINAPI FtpDeleteFileW(HINTERNET,LPCWSTR);
-BOOL WINAPI FtpRenameFileA(HINTERNET, LPCSTR,LPCSTR);
-BOOL WINAPI FtpRenameFileW(HINTERNET,LPCWSTR,LPCWSTR);
-HINTERNET WINAPI FtpOpenFileA(HINTERNET,LPCSTR,DWORD,DWORD,DWORD);
-HINTERNET WINAPI FtpOpenFileW(HINTERNET,LPCWSTR,DWORD,DWORD,DWORD);
-BOOL WINAPI FtpCreateDirectoryA(HINTERNET,LPCSTR);
-BOOL WINAPI FtpCreateDirectoryW(HINTERNET,LPCWSTR);
-BOOL WINAPI FtpRemoveDirectoryA(HINTERNET,LPCSTR);
-BOOL WINAPI FtpRemoveDirectoryW(HINTERNET,LPCWSTR);
-BOOL WINAPI FtpSetCurrentDirectoryA(HINTERNET,LPCSTR);
-BOOL WINAPI FtpSetCurrentDirectoryW(HINTERNET,LPCWSTR);
-BOOL WINAPI FtpGetCurrentDirectoryA(HINTERNET,LPSTR,PDWORD);
-BOOL WINAPI FtpGetCurrentDirectoryW(HINTERNET,LPWSTR,PDWORD);
-BOOL WINAPI FtpCommandA(HINTERNET,BOOL,DWORD,LPCSTR,DWORD_PTR,HINTERNET*);
-BOOL WINAPI FtpCommandW(HINTERNET,BOOL,DWORD,LPCWSTR,DWORD_PTR,HINTERNET*);
-BOOL WINAPI GopherCreateLocatorA(LPCSTR,INTERNET_PORT,LPCSTR,LPCSTR,DWORD,LPSTR,PDWORD);
-BOOL WINAPI GopherCreateLocatorW(LPCWSTR,INTERNET_PORT,LPCWSTR,LPCWSTR,DWORD,LPWSTR,PDWORD);
-BOOL WINAPI GopherGetLocatorTypeA(LPCSTR,PDWORD);
-BOOL WINAPI GopherGetLocatorTypeW(LPCWSTR,PDWORD);
-HINTERNET WINAPI GopherFindFirstFileA(HINTERNET,LPCSTR,LPCSTR,LPGOPHER_FIND_DATAA,DWORD,DWORD);
-HINTERNET WINAPI GopherFindFirstFileW(HINTERNET,LPCWSTR,LPCWSTR,LPGOPHER_FIND_DATAW,DWORD,DWORD);
-HINTERNET WINAPI GopherOpenFileA(HINTERNET,LPCSTR,LPCSTR,DWORD,DWORD);
-HINTERNET WINAPI GopherOpenFileW(HINTERNET,LPCWSTR,LPCWSTR,DWORD,DWORD);
-BOOL WINAPI GopherGetAttributeA(HINTERNET,LPCSTR,LPCSTR,LPBYTE,DWORD,PDWORD,GOPHER_ATTRIBUTE_ENUMERATOR,DWORD);
-BOOL WINAPI GopherGetAttributeW(HINTERNET,LPCWSTR,
-LPCWSTR, LPBYTE, DWORD, PDWORD, GOPHER_ATTRIBUTE_ENUMERATOR, DWORD);
-HINTERNET WINAPI HttpOpenRequestA(HINTERNET,LPCSTR,LPCSTR,LPCSTR,LPCSTR,LPCSTR *,DWORD,DWORD);
-HINTERNET WINAPI HttpOpenRequestW(HINTERNET,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR FAR * lplpszAcceptTypes , DWORD dwFlags, DWORD dwContext);
-BOOL WINAPI HttpAddRequestHeadersA(HINTERNET,LPCSTR,DWORD,DWORD);
-BOOL WINAPI HttpAddRequestHeadersW(HINTERNET,LPCWSTR,DWORD,DWORD);
-BOOL WINAPI HttpSendRequestA(HINTERNET,LPCSTR,DWORD,PVOID,DWORD);
-BOOL WINAPI HttpSendRequestW(HINTERNET,LPCWSTR,DWORD,PVOID,DWORD);
-BOOL WINAPI HttpQueryInfoA(HINTERNET,DWORD,PVOID,PDWORD,PDWORD);
-BOOL WINAPI HttpQueryInfoW(HINTERNET,DWORD,PVOID,PDWORD,PDWORD);
-BOOL WINAPI InternetSetCookieA(LPCSTR,LPCSTR,LPCSTR);
-BOOL WINAPI InternetSetCookieW(LPCSTR,LPCWSTR,LPCWSTR);
-BOOL WINAPI InternetGetCookieA(LPCSTR,LPCSTR,LPSTR,PDWORD);
-BOOL WINAPI InternetGetCookieW(LPCSTR,LPCWSTR,LPWSTR,PDWORD);
-DWORD WINAPI InternetAttemptConnect(DWORD);
-DWORD WINAPI InternetErrorDlg(HWND,HINTERNET,DWORD,DWORD,PVOID *);
-DWORD WINAPI InternetConfirmZoneCrossing(HWND,LPSTR,LPSTR,BOOL);
-BOOL WINAPI CreateUrlCacheEntryA(LPCSTR,DWORD,LPCSTR,LPSTR,DWORD);
-BOOL WINAPI CreateUrlCacheEntryW(LPCSTR,DWORD,LPCSTR,LPWSTR,DWORD);
-BOOL WINAPI CommitUrlCacheEntryA(LPCSTR,LPCSTR,FILETIME,FILETIME,DWORD,LPBYTE,DWORD,LPCSTR,DWORD);
-BOOL WINAPI CommitUrlCacheEntryW(LPCSTR,LPCWSTR,FILETIME,FILETIME,DWORD,LPBYTE,DWORD,LPCWSTR,DWORD);
-BOOL WINAPI RetrieveUrlCacheEntryFileA(LPCSTR,LPINTERNET_CACHE_ENTRY_INFOA,PDWORD,DWORD);
-BOOL WINAPI RetrieveUrlCacheEntryFileW(LPCSTR,LPINTERNET_CACHE_ENTRY_INFOW,PDWORD,DWORD);
-BOOL WINAPI UnlockUrlCacheEntryFile(LPCSTR,DWORD);
-HANDLE WINAPI RetrieveUrlCacheEntryStreamA(LPCSTR,LPINTERNET_CACHE_ENTRY_INFOA,PDWORD,BOOL,DWORD);
-HANDLE WINAPI RetrieveUrlCacheEntryStreamW( LPCSTR,LPINTERNET_CACHE_ENTRY_INFOW,PDWORD,BOOL,DWORD);
-BOOL WINAPI ReadUrlCacheEntryStream(HANDLE,DWORD,PVOID,PDWORD,DWORD);
-BOOL WINAPI UnlockUrlCacheEntryStream( HANDLE,DWORD);
-BOOL WINAPI GetUrlCacheEntryInfoA(LPCSTR,LPINTERNET_CACHE_ENTRY_INFOA,PDWORD);
-BOOL WINAPI GetUrlCacheEntryInfoW(LPCSTR,LPINTERNET_CACHE_ENTRY_INFOW,PDWORD);
-BOOL WINAPI SetUrlCacheEntryInfoA(LPCSTR,LPINTERNET_CACHE_ENTRY_INFOA,DWORD);
-BOOL WINAPI SetUrlCacheEntryInfoW(LPCSTR,LPINTERNET_CACHE_ENTRY_INFOW,DWORD);
-HANDLE WINAPI FindFirstUrlCacheEntryA(LPCSTR,LPINTERNET_CACHE_ENTRY_INFOA,PDWORD);
-HANDLE WINAPI FindFirstUrlCacheEntryW(LPCSTR,LPINTERNET_CACHE_ENTRY_INFOW,PDWORD);
-BOOL WINAPI FindNextUrlCacheEntryA(HANDLE,LPINTERNET_CACHE_ENTRY_INFOA,PDWORD);
-BOOL WINAPI FindNextUrlCacheEntryW(HANDLE,LPINTERNET_CACHE_ENTRY_INFOW,PDWORD);
-BOOL WINAPI FindCloseUrlCache(HANDLE);
-BOOL WINAPI DeleteUrlCacheEntry(LPCSTR);
-DWORD AuthenticateUser(PVOID*,LPSTR,LPSTR,DWORD,LPSTR,DWORD,LPSTR,LPSTR);
-BOOL WINAPI HttpSendRequestExA(HINTERNET,LPINTERNET_BUFFERSA,LPINTERNET_BUFFERSA,DWORD,DWORD);
-BOOL WINAPI HttpSendRequestExW(HINTERNET,LPINTERNET_BUFFERSW,LPINTERNET_BUFFERSW,DWORD,DWORD);
-BOOL WINAPI HttpEndRequestA(HINTERNET,LPINTERNET_BUFFERSA,DWORD,DWORD);
-BOOL WINAPI HttpEndRequestW(HINTERNET,LPINTERNET_BUFFERSW,DWORD,DWORD);
-DWORD WINAPI InternetDial(HWND,LPTSTR,DWORD,LPDWORD,DWORD);
-DWORD WINAPI InternetHangUp(DWORD,DWORD);
-BOOL WINAPI InternetGoOnline(LPTSTR,HWND,DWORD);
-BOOL WINAPI InternetAutodial(DWORD,DWORD);
-BOOL WINAPI InternetAutodialHangup(DWORD);
-BOOL WINAPI InternetGetConnectedState(LPDWORD,DWORD);
-BOOL WINAPI InternetSetDialState(LPCTSTR,DWORD,DWORD);
-BOOL WINAPI InternetReadFileExA(HINTERNET,LPINTERNET_BUFFERSA,DWORD,DWORD_PTR);
-BOOL WINAPI InternetReadFileExW(HINTERNET,LPINTERNET_BUFFERSW,DWORD,DWORD_PTR);
-GROUPID WINAPI CreateUrlCacheGroup(DWORD,LPVOID);
-BOOL WINAPI DeleteUrlCacheGroup(GROUPID,DWORD,LPVOID);
-HANDLE WINAPI FindFirstUrlCacheGroup(DWORD,DWORD,LPVOID,DWORD,GROUPID*,LPVOID);
-BOOL WINAPI FindNextUrlCacheGroup(HANDLE,GROUPID*,LPVOID);
-BOOL WINAPI GetUrlCacheGroupAttributeA(GROUPID,DWORD,DWORD,LPINTERNET_CACHE_GROUP_INFOA,LPDWORD,LPVOID);
-BOOL WINAPI GetUrlCacheGroupAttributeW(GROUPID,DWORD,DWORD,LPINTERNET_CACHE_GROUP_INFOW,LPDWORD,LPVOID);
-BOOL WINAPI SetUrlCacheGroupAttributeA(GROUPID,DWORD,DWORD,LPINTERNET_CACHE_GROUP_INFOA,LPVOID);
-BOOL WINAPI SetUrlCacheGroupAttributeW(GROUPID,DWORD,DWORD,LPINTERNET_CACHE_GROUP_INFOW,LPVOID);
-
-#ifdef UNICODE
-#define InternetCrackUrl InternetCrackUrlW
-#define InternetCreateUrl InternetCreateUrlW
-#define InternetCanonicalizeUrl InternetCanonicalizeUrlW
-#define InternetCheckConnection InternetCheckConnectionW
-#define InternetCombineUrl InternetCombineUrlW
-#define InternetOpen InternetOpenW
-#define InternetConnect InternetConnectW
-#define InternetOpenUrl InternetOpenUrlW
-#define InternetFindNextFile InternetFindNextFileW
-#define InternetQueryOption InternetQueryOptionW
-#define InternetSetOption InternetSetOptionW
-#define InternetSetOptionEx InternetSetOptionExW
-#define InternetGetLastResponseInfo InternetGetLastResponseInfoW
-#define InternetReadFileEx InternetReadFileExW
-#define FtpFindFirstFile FtpFindFirstFileW
-#define FtpGetFile FtpGetFileW
-#define FtpPutFile FtpPutFileW
-#define FtpDeleteFile FtpDeleteFileW
-#define FtpRenameFile FtpRenameFileW
-#define FtpOpenFile FtpOpenFileW
-#define FtpCreateDirectory FtpCreateDirectoryW
-#define FtpRemoveDirectory FtpRemoveDirectoryW
-#define FtpSetCurrentDirectory FtpSetCurrentDirectoryW
-#define FtpGetCurrentDirectory FtpGetCurrentDirectoryW
-#define FtpCommand FtpCommandW
-#define GopherGetLocatorType GopherGetLocatorTypeW
-#define GopherCreateLocator GopherCreateLocatorW
-#define GopherFindFirstFile GopherFindFirstFileW
-#define GopherOpenFile GopherOpenFileW
-#define GopherGetAttribute GopherGetAttributeW
-#define HttpSendRequest HttpSendRequestW
-#define HttpOpenRequest HttpOpenRequestW
-#define HttpAddRequestHeaders HttpAddRequestHeadersW
-#define HttpQueryInfo HttpQueryInfoW
-#define InternetSetCookie InternetSetCookieW
-#define InternetGetCookie InternetGetCookieW
-#define CreateUrlCacheEntry CreateUrlCacheEntryW
-#define RetrieveUrlCacheEntryStream RetrieveUrlCacheEntryStreamW
-#define FindNextUrlCacheEntry FindNextUrlCacheEntryW
-#define CommitUrlCacheEntry CommitUrlCacheEntryW
-#define GetUrlCacheEntryInfo GetUrlCacheEntryInfoW
-#define SetUrlCacheEntryInfo SetUrlCacheEntryInfoW
-#define FindFirstUrlCacheEntry FindFirstUrlCacheEntryW
-#define RetrieveUrlCacheEntryFile RetrieveUrlCacheEntryFileW
-#define HttpSendRequestEx HttpSendRequestExW
-#define HttpEndRequest HttpEndRequestW
-#define GetUrlCacheGroupAttribute GetUrlCacheGroupAttributeW
-#define SetUrlCacheGroupAttribute SetUrlCacheGroupAttributeW
-#else
-#define GopherGetAttribute GopherGetAttributeA
-#define InternetCrackUrl InternetCrackUrlA
-#define InternetCreateUrl InternetCreateUrlA
-#define InternetCanonicalizeUrl InternetCanonicalizeUrlA
-#define InternetCheckConnection InternetCheckConnectionA
-#define InternetCombineUrl InternetCombineUrlA
-#define InternetOpen InternetOpenA
-#define InternetConnect InternetConnectA
-#define InternetOpenUrl InternetOpenUrlA
-#define InternetFindNextFile InternetFindNextFileA
-#define InternetQueryOption InternetQueryOptionA
-#define InternetSetOption InternetSetOptionA
-#define InternetSetOptionEx InternetSetOptionExA
-#define InternetGetLastResponseInfo InternetGetLastResponseInfoA
-#define InternetReadFileEx InternetReadFileExA
-#define FtpFindFirstFile FtpFindFirstFileA
-#define FtpGetFile FtpGetFileA
-#define FtpPutFile FtpPutFileA
-#define FtpDeleteFile FtpDeleteFileA
-#define FtpRenameFile FtpRenameFileA
-#define FtpOpenFile FtpOpenFileA
-#define FtpCreateDirectory FtpCreateDirectoryA
-#define FtpRemoveDirectory FtpRemoveDirectoryA
-#define FtpSetCurrentDirectory FtpSetCurrentDirectoryA
-#define FtpGetCurrentDirectory FtpGetCurrentDirectoryA
-#define FtpCommand FtpCommandA
-#define GopherGetLocatorType GopherGetLocatorTypeA
-#define GopherCreateLocator GopherCreateLocatorA
-#define GopherFindFirstFile GopherFindFirstFileA
-#define GopherOpenFile GopherOpenFileA
-#define HttpSendRequest HttpSendRequestA
-#define HttpOpenRequest HttpOpenRequestA
-#define HttpAddRequestHeaders HttpAddRequestHeadersA
-#define HttpQueryInfo HttpQueryInfoA
-#define InternetSetCookie InternetSetCookieA
-#define InternetGetCookie InternetGetCookieA
-#define CreateUrlCacheEntry CreateUrlCacheEntryA
-#define RetrieveUrlCacheEntryStream RetrieveUrlCacheEntryStreamA
-#define FindNextUrlCacheEntry FindNextUrlCacheEntryA
-#define CommitUrlCacheEntry CommitUrlCacheEntryA
-#define GetUrlCacheEntryInfo GetUrlCacheEntryInfoA
-#define SetUrlCacheEntryInfo SetUrlCacheEntryInfoA
-#define FindFirstUrlCacheEntry FindFirstUrlCacheEntryA
-#define RetrieveUrlCacheEntryFile RetrieveUrlCacheEntryFileA
-#define HttpSendRequestEx HttpSendRequestExA
-#define HttpEndRequest HttpEndRequestA
-#define GetUrlCacheGroupAttribute GetUrlCacheGroupAttributeA
-#define SetUrlCacheGroupAttribute SetUrlCacheGroupAttributeA
-#endif /* UNICODE */
-#endif /* RC_INVOKED */
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/winioctl.h b/winsup/w32api/include/winioctl.h
deleted file mode 100644
index 87f121f..0000000
--- a/winsup/w32api/include/winioctl.h
+++ /dev/null
@@ -1,554 +0,0 @@
-#ifndef _WINIOCTL_H
-#define _WINIOCTL_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define HIST_NO_OF_BUCKETS 24
-#define HISTOGRAM_BUCKET_SIZE sizeof(HISTOGRAM_BUCKET)
-#define DISK_HISTOGRAM_SIZE sizeof(DISK_HISTOGRAM)
-#define CTL_CODE(t,f,m,a) (((t)<<16)|((a)<<14)|((f)<<2)|(m))
-#define DEVICE_TYPE_FROM_CTL_CODE(c) (((DWORD)((c)&0xffff0000))>>16)
-#define IOCTL_STORAGE_BASE FILE_DEVICE_MASS_STORAGE
-#define IOCTL_STORAGE_CHECK_VERIFY CTL_CODE(IOCTL_STORAGE_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_STORAGE_CHECK_VERIFY2 CTL_CODE(IOCTL_STORAGE_BASE, 0x0200, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_STORAGE_MEDIA_REMOVAL CTL_CODE(IOCTL_STORAGE_BASE, 0x0201, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_STORAGE_EJECT_MEDIA CTL_CODE(IOCTL_STORAGE_BASE, 0x0202, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_STORAGE_LOAD_MEDIA CTL_CODE(IOCTL_STORAGE_BASE, 0x0203, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_STORAGE_LOAD_MEDIA2 CTL_CODE(IOCTL_STORAGE_BASE, 0x0203, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_STORAGE_RESERVE CTL_CODE(IOCTL_STORAGE_BASE, 0x0204, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_STORAGE_RELEASE CTL_CODE(IOCTL_STORAGE_BASE, 0x0205, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_STORAGE_FIND_NEW_DEVICES CTL_CODE(IOCTL_STORAGE_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_STORAGE_EJECTION_CONTROL CTL_CODE(IOCTL_STORAGE_BASE, 0x0250, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_STORAGE_MCN_CONTROL CTL_CODE(IOCTL_STORAGE_BASE, 0x0251, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_STORAGE_GET_MEDIA_TYPES CTL_CODE(IOCTL_STORAGE_BASE, 0x0300, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_STORAGE_GET_MEDIA_TYPES_EX CTL_CODE(IOCTL_STORAGE_BASE, 0x0301, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_STORAGE_RESET_BUS CTL_CODE(IOCTL_STORAGE_BASE, 0x0400, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_STORAGE_RESET_DEVICE CTL_CODE(IOCTL_STORAGE_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS)
-#define IOCTL_STORAGE_GET_DEVICE_NUMBER CTL_CODE(IOCTL_STORAGE_BASE, 0x0420, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_STORAGE_PREDICT_FAILURE CTL_CODE(IOCTL_STORAGE_BASE, 0x0440, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_DISK_BASE FILE_DEVICE_DISK
-#define IOCTL_DISK_GET_DRIVE_GEOMETRY CTL_CODE(IOCTL_DISK_BASE,0,METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_DISK_GET_PARTITION_INFO CTL_CODE(IOCTL_DISK_BASE,1,METHOD_BUFFERED,FILE_READ_ACCESS)
-#define IOCTL_DISK_SET_PARTITION_INFO CTL_CODE(IOCTL_DISK_BASE,2,METHOD_BUFFERED,FILE_READ_ACCESS|FILE_WRITE_ACCESS)
-#define IOCTL_DISK_GET_DRIVE_LAYOUT CTL_CODE(IOCTL_DISK_BASE,3,METHOD_BUFFERED,FILE_READ_ACCESS)
-#define IOCTL_DISK_SET_DRIVE_LAYOUT CTL_CODE(IOCTL_DISK_BASE,4,METHOD_BUFFERED,FILE_READ_ACCESS|FILE_WRITE_ACCESS)
-#define IOCTL_DISK_VERIFY CTL_CODE(IOCTL_DISK_BASE,5,METHOD_BUFFERED,FILE_ANY_ACCESS)
-#define IOCTL_DISK_FORMAT_TRACKS CTL_CODE(IOCTL_DISK_BASE,6,METHOD_BUFFERED,FILE_READ_ACCESS|FILE_WRITE_ACCESS)
-#define IOCTL_DISK_REASSIGN_BLOCKS CTL_CODE(IOCTL_DISK_BASE,7,METHOD_BUFFERED,FILE_READ_ACCESS|FILE_WRITE_ACCESS)
-#define IOCTL_DISK_PERFORMANCE CTL_CODE(IOCTL_DISK_BASE,8,METHOD_BUFFERED,FILE_ANY_ACCESS)
-#define IOCTL_DISK_IS_WRITABLE CTL_CODE(IOCTL_DISK_BASE,9,METHOD_BUFFERED,FILE_ANY_ACCESS)
-#define IOCTL_DISK_LOGGING CTL_CODE(IOCTL_DISK_BASE,10,METHOD_BUFFERED,FILE_ANY_ACCESS)
-#define IOCTL_DISK_FORMAT_TRACKS_EX CTL_CODE(IOCTL_DISK_BASE,11,METHOD_BUFFERED,FILE_READ_ACCESS|FILE_WRITE_ACCESS)
-#define IOCTL_DISK_HISTOGRAM_STRUCTURE CTL_CODE(IOCTL_DISK_BASE,12,METHOD_BUFFERED,FILE_ANY_ACCESS)
-#define IOCTL_DISK_HISTOGRAM_DATA CTL_CODE(IOCTL_DISK_BASE,13,METHOD_BUFFERED,FILE_ANY_ACCESS)
-#define IOCTL_DISK_HISTOGRAM_RESET CTL_CODE(IOCTL_DISK_BASE,14,METHOD_BUFFERED,FILE_ANY_ACCESS)
-#define IOCTL_DISK_REQUEST_STRUCTURE CTL_CODE(IOCTL_DISK_BASE,15,METHOD_BUFFERED,FILE_ANY_ACCESS)
-#define IOCTL_DISK_REQUEST_DATA CTL_CODE(IOCTL_DISK_BASE,16,METHOD_BUFFERED,FILE_ANY_ACCESS)
-#define IOCTL_DISK_GET_PARTITION_INFO_EX CTL_CODE(IOCTL_DISK_BASE,0x12,METHOD_BUFFERED,FILE_ANY_ACCESS)
-#define IOCTL_DISK_SET_PARTITION_INFO_EX CTL_CODE(IOCTL_DISK_BASE,0x13,METHOD_BUFFERED,FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-#define IOCTL_DISK_GET_DRIVE_LAYOUT_EX CTL_CODE(IOCTL_DISK_BASE,0x14,METHOD_BUFFERED,FILE_ANY_ACCESS)
-#define IOCTL_DISK_SET_DRIVE_LAYOUT_EX CTL_CODE(IOCTL_DISK_BASE,0x15,METHOD_BUFFERED,FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-#define IOCTL_DISK_CREATE_DISK CTL_CODE(IOCTL_DISK_BASE,0x16,METHOD_BUFFERED,FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-#define IOCTL_DISK_GET_LENGTH_INFO CTL_CODE(IOCTL_DISK_BASE,0x17,METHOD_BUFFERED,FILE_READ_ACCESS)
-#define IOCTL_DISK_PERFORMANCE_OFF CTL_CODE(IOCTL_DISK_BASE,0x18,METHOD_BUFFERED,FILE_ANY_ACCESS)
-#define IOCTL_DISK_GET_DRIVE_GEOMETRY_EX CTL_CODE(IOCTL_DISK_BASE,0x28,METHOD_BUFFERED,FILE_ANY_ACCESS)
-#define IOCTL_DISK_GROW_PARTITION CTL_CODE(IOCTL_DISK_BASE,0x34,METHOD_BUFFERED,FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-#define IOCTL_DISK_GET_CACHE_INFORMATION CTL_CODE(IOCTL_DISK_BASE,0x35,METHOD_BUFFERED,FILE_READ_ACCESS)
-#define IOCTL_DISK_SET_CACHE_INFORMATION CTL_CODE(IOCTL_DISK_BASE,0x36,METHOD_BUFFERED,FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-#define IOCTL_DISK_DELETE_DRIVE_LAYOUT CTL_CODE(IOCTL_DISK_BASE,0x40,METHOD_BUFFERED,FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-#define IOCTL_DISK_UPDATE_PROPERTIES CTL_CODE(IOCTL_DISK_BASE,0x50,METHOD_BUFFERED,FILE_ANY_ACCESS)
-#define IOCTL_DISK_CHECK_VERIFY CTL_CODE(IOCTL_DISK_BASE,0x200,METHOD_BUFFERED,FILE_READ_ACCESS)
-#define IOCTL_DISK_MEDIA_REMOVAL CTL_CODE(IOCTL_DISK_BASE,0x201,METHOD_BUFFERED,FILE_READ_ACCESS)
-#define IOCTL_DISK_EJECT_MEDIA CTL_CODE(IOCTL_DISK_BASE,0x202,METHOD_BUFFERED,FILE_READ_ACCESS)
-#define IOCTL_DISK_LOAD_MEDIA CTL_CODE(IOCTL_DISK_BASE,0x203,METHOD_BUFFERED,FILE_READ_ACCESS)
-#define IOCTL_DISK_RESERVE CTL_CODE(IOCTL_DISK_BASE,0x204,METHOD_BUFFERED,FILE_READ_ACCESS)
-#define IOCTL_DISK_RELEASE CTL_CODE(IOCTL_DISK_BASE,0x205,METHOD_BUFFERED,FILE_READ_ACCESS)
-#define IOCTL_DISK_FIND_NEW_DEVICES CTL_CODE(IOCTL_DISK_BASE,0x206,METHOD_BUFFERED,FILE_READ_ACCESS)
-#define IOCTL_DISK_REMOVE_DEVICE CTL_CODE(IOCTL_DISK_BASE,0x207,METHOD_BUFFERED,FILE_READ_ACCESS)
-#define IOCTL_DISK_GET_MEDIA_TYPES CTL_CODE(IOCTL_DISK_BASE,0x300,METHOD_BUFFERED,FILE_ANY_ACCESS)
-#define IOCTL_DISK_UPDATE_DRIVE_SIZE CTL_CODE(IOCTL_DISK_BASE, 0x0032, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-#define IOCTL_SERIAL_LSRMST_INSERT CTL_CODE(FILE_DEVICE_SERIAL_PORT,31,METHOD_BUFFERED,FILE_ANY_ACCESS)
-
-/* Also in ddk/ntddvol.h */
-#define IOCTL_VOLUME_BASE ((ULONG) 'V')
-#define IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS \
- CTL_CODE(IOCTL_VOLUME_BASE, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define IOCTL_VOLUME_IS_CLUSTERED \
- CTL_CODE(IOCTL_VOLUME_BASE, 12, METHOD_BUFFERED, FILE_ANY_ACCESS)
-
-#define FSCTL_LOCK_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM,6,METHOD_BUFFERED,FILE_ANY_ACCESS)
-#define FSCTL_UNLOCK_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM,7,METHOD_BUFFERED,FILE_ANY_ACCESS)
-#define FSCTL_DISMOUNT_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM,8,METHOD_BUFFERED,FILE_ANY_ACCESS)
-#define FSCTL_MOUNT_DBLS_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM,13,METHOD_BUFFERED,FILE_ANY_ACCESS)
-#define FSCTL_GET_COMPRESSION CTL_CODE(FILE_DEVICE_FILE_SYSTEM,15,METHOD_BUFFERED,FILE_ANY_ACCESS)
-#define FSCTL_SET_COMPRESSION CTL_CODE(FILE_DEVICE_FILE_SYSTEM,16,METHOD_BUFFERED,FILE_READ_DATA|FILE_WRITE_DATA)
-#define FSCTL_READ_COMPRESSION CTL_CODE(FILE_DEVICE_FILE_SYSTEM,17,METHOD_NEITHER,FILE_READ_DATA)
-#define FSCTL_WRITE_COMPRESSION CTL_CODE(FILE_DEVICE_FILE_SYSTEM,18,METHOD_NEITHER,FILE_WRITE_DATA)
-#define FSCTL_GET_NTFS_VOLUME_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM,25,METHOD_BUFFERED,FILE_ANY_ACCESS)
-#define FSCTL_GET_VOLUME_BITMAP CTL_CODE(FILE_DEVICE_FILE_SYSTEM,27,METHOD_NEITHER,FILE_ANY_ACCESS)
-#define FSCTL_GET_RETRIEVAL_POINTERS CTL_CODE(FILE_DEVICE_FILE_SYSTEM,28,METHOD_NEITHER,FILE_ANY_ACCESS)
-#define FSCTL_MOVE_FILE CTL_CODE(FILE_DEVICE_FILE_SYSTEM,29,METHOD_BUFFERED,FILE_ANY_ACCESS)
-#define FSCTL_GET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 42, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_SET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 41, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_DELETE_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 43, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#define FSCTL_SET_SPARSE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 49, METHOD_BUFFERED, FILE_SPECIAL_ACCESS)
-#define DEVICE_TYPE DWORD
-#define FILE_DEVICE_BEEP 1
-#define FILE_DEVICE_CD_ROM 2
-#define FILE_DEVICE_CD_ROM_FILE_SYSTEM 3
-#define FILE_DEVICE_CONTROLLER 4
-#define FILE_DEVICE_DATALINK 5
-#define FILE_DEVICE_DFS 6
-#define FILE_DEVICE_DISK 7
-#define FILE_DEVICE_DISK_FILE_SYSTEM 8
-#define FILE_DEVICE_FILE_SYSTEM 9
-#define FILE_DEVICE_INPORT_PORT 10
-#define FILE_DEVICE_KEYBOARD 11
-#define FILE_DEVICE_MAILSLOT 12
-#define FILE_DEVICE_MIDI_IN 13
-#define FILE_DEVICE_MIDI_OUT 14
-#define FILE_DEVICE_MOUSE 15
-#define FILE_DEVICE_MULTI_UNC_PROVIDER 16
-#define FILE_DEVICE_NAMED_PIPE 17
-#define FILE_DEVICE_NETWORK 18
-#define FILE_DEVICE_NETWORK_BROWSER 19
-#define FILE_DEVICE_NETWORK_FILE_SYSTEM 20
-#define FILE_DEVICE_NULL 21
-#define FILE_DEVICE_PARALLEL_PORT 22
-#define FILE_DEVICE_PHYSICAL_NETCARD 23
-#define FILE_DEVICE_PRINTER 24
-#define FILE_DEVICE_SCANNER 25
-#define FILE_DEVICE_SERIAL_MOUSE_PORT 26
-#define FILE_DEVICE_SERIAL_PORT 27
-#define FILE_DEVICE_SCREEN 28
-#define FILE_DEVICE_SOUND 29
-#define FILE_DEVICE_STREAMS 30
-#define FILE_DEVICE_TAPE 31
-#define FILE_DEVICE_TAPE_FILE_SYSTEM 32
-#define FILE_DEVICE_TRANSPORT 33
-#define FILE_DEVICE_UNKNOWN 34
-#define FILE_DEVICE_VIDEO 35
-#define FILE_DEVICE_VIRTUAL_DISK 36
-#define FILE_DEVICE_WAVE_IN 37
-#define FILE_DEVICE_WAVE_OUT 38
-#define FILE_DEVICE_8042_PORT 39
-#define FILE_DEVICE_NETWORK_REDIRECTOR 40
-#define FILE_DEVICE_BATTERY 41
-#define FILE_DEVICE_BUS_EXTENDER 42
-#define FILE_DEVICE_MODEM 43
-#define FILE_DEVICE_VDM 44
-#define FILE_DEVICE_MASS_STORAGE 45
-#define FILE_DEVICE_SMB 46
-#define FILE_DEVICE_KS 47
-#define FILE_DEVICE_CHANGER 48
-#define FILE_DEVICE_SMARTCARD 49
-#define FILE_DEVICE_ACPI 50
-#define FILE_DEVICE_DVD 51
-#define FILE_DEVICE_FULLSCREEN_VIDEO 52
-#define FILE_DEVICE_DFS_FILE_SYSTEM 53
-#define FILE_DEVICE_DFS_VOLUME 54
-#define FILE_DEVICE_SERENUM 55
-#define FILE_DEVICE_TERMSRV 56
-#define FILE_DEVICE_KSEC 57
-#define PARTITION_ENTRY_UNUSED 0
-#define PARTITION_FAT_12 1
-#define PARTITION_XENIX_1 2
-#define PARTITION_XENIX_2 3
-#define PARTITION_FAT_16 4
-#define PARTITION_EXTENDED 5
-#define PARTITION_HUGE 6
-#define PARTITION_IFS 7
-#define PARTITION_FAT32 0x0B
-#define PARTITION_FAT32_XINT13 0x0C
-#define PARTITION_XINT13 0x0E
-#define PARTITION_XINT13_EXTENDED 0x0F
-#define PARTITION_PREP 0x41
-#define PARTITION_LDM 0x42
-#define PARTITION_UNIX 0x63
-#define PARTITION_NTFT 128
-#define VALID_NTFT 0xC0
-#define METHOD_BUFFERED 0
-#define METHOD_IN_DIRECT 1
-#define METHOD_OUT_DIRECT 2
-#define METHOD_NEITHER 3
-#define SERIAL_LSRMST_ESCAPE 0
-#define SERIAL_LSRMST_LSR_DATA 1
-#define SERIAL_LSRMST_LSR_NODATA 2
-#define SERIAL_LSRMST_MST 3
-
-/* Also in ddk/winddk.h */
-#define FILE_ANY_ACCESS 0x00000000
-#define FILE_SPECIAL_ACCESS FILE_ANY_ACCESS
-#define FILE_READ_ACCESS 0x00000001
-#define FILE_WRITE_ACCESS 0x00000002
-
-#define DISK_LOGGING_START 0
-#define DISK_LOGGING_STOP 1
-#define DISK_LOGGING_DUMP 2
-#define DISK_BINNING 3
-typedef WORD BAD_TRACK_NUMBER,*PBAD_TRACK_NUMBER;
-typedef enum _BIN_TYPES {RequestSize,RequestLocation} BIN_TYPES;
-typedef struct _BIN_RANGE {
- LARGE_INTEGER StartValue;
- LARGE_INTEGER Length;
-} BIN_RANGE,*PBIN_RANGE;
-typedef struct _BIN_COUNT {
- BIN_RANGE BinRange;
- DWORD BinCount;
-} BIN_COUNT,*PBIN_COUNT;
-typedef struct _BIN_RESULTS {
- DWORD NumberOfBins;
- BIN_COUNT BinCounts[1];
-} BIN_RESULTS,*PBIN_RESULTS;
-typedef enum _PARTITION_STYLE {
- PARTITION_STYLE_MBR,
- PARTITION_STYLE_GPT,
- PARTITION_STYLE_RAW
-} PARTITION_STYLE;
-typedef struct {
- GUID DiskId;
- DWORD MaxPartitionCount;
-} CREATE_DISK_GPT,*PCREATE_DISK_GPT;
-typedef struct {
- DWORD Signature;
-} CREATE_DISK_MBR,*PCREATE_DISK_MBR;
-typedef struct {
- PARTITION_STYLE PartitionStyle;
- _ANONYMOUS_UNION union {
- CREATE_DISK_MBR Mbr;
- CREATE_DISK_GPT Gpt;
- };
-} CREATE_DISK,*PCREATE_DISK;
-typedef enum {
- EqualPriority,
- KeepPrefetchedData,
- KeepReadData
-} DISK_CACHE_RETENTION_PRIORITY;
-typedef struct _DISK_CACHE_INFORMATION {
- BOOLEAN ParametersSavable;
- BOOLEAN ReadCacheEnabled;
- BOOLEAN WriteCacheEnabled;
- DISK_CACHE_RETENTION_PRIORITY ReadRetentionPriority;
- DISK_CACHE_RETENTION_PRIORITY WriteRetentionPriority;
- WORD DisablePrefetchTransferLength;
- BOOLEAN PrefetchScalar;
- _ANONYMOUS_UNION union {
- struct {
- WORD Minimum;
- WORD Maximum;
- WORD MaximumBlocks;
- } ScalarPrefetch;
- struct {
- WORD Minimum;
- WORD Maximum;
- } BlockPrefetch;
- };
-} DISK_CACHE_INFORMATION,*PDISK_CACHE_INFORMATION;
-typedef enum _DETECTION_TYPE {
- DetectNone,
- DetectInt13,
- DetectExInt13
-} DETECTION_TYPE;
-typedef struct _DISK_INT13_INFO {
- WORD DriveSelect;
- DWORD MaxCylinders;
- WORD SectorsPerTrack;
- WORD MaxHeads;
- WORD NumberDrives;
-} DISK_INT13_INFO,*PDISK_INT13_INFO;
-typedef struct _DISK_EX_INT13_INFO {
- WORD ExBufferSize;
- WORD ExFlags;
- DWORD ExCylinders;
- DWORD ExHeads;
- DWORD ExSectorsPerTrack;
- DWORD64 ExSectorsPerDrive;
- WORD ExSectorSize;
- WORD ExReserved;
-} DISK_EX_INT13_INFO,*PDISK_EX_INT13_INFO;
-typedef struct _DISK_DETECTION_INFO {
- DWORD SizeOfDetectInfo;
- DETECTION_TYPE DetectionType;
- _ANONYMOUS_UNION union {
- _ANONYMOUS_STRUCT struct {
- DISK_INT13_INFO Int13;
- DISK_EX_INT13_INFO ExInt13;
- };
- };
-} DISK_DETECTION_INFO,*PDISK_DETECTION_INFO;
-typedef enum _MEDIA_TYPE {
- Unknown,
- F5_1Pt2_512,
- F3_1Pt44_512,
- F3_2Pt88_512,
- F3_20Pt8_512,
- F3_720_512,
- F5_360_512,
- F5_320_512,
- F5_320_1024,
- F5_180_512,
- F5_160_512,
- RemovableMedia,
- FixedMedia,
- F3_120M_512,
- F3_640_512,
- F5_640_512,
- F5_720_512,
- F3_1Pt2_512,
- F3_1Pt23_1024,
- F5_1Pt23_1024,
- F3_128Mb_512,
- F3_230Mb_512,
- F8_256_128,
- F3_200Mb_512,
- F3_240M_512,
- F3_32M_512
-} MEDIA_TYPE,*PMEDIA_TYPE;
-typedef struct _DISK_GEOMETRY {
- LARGE_INTEGER Cylinders;
- MEDIA_TYPE MediaType;
- DWORD TracksPerCylinder;
- DWORD SectorsPerTrack;
- DWORD BytesPerSector;
-} DISK_GEOMETRY,*PDISK_GEOMETRY;
-typedef struct _DISK_GEOMETRY_EX {
- DISK_GEOMETRY Geometry;
- LARGE_INTEGER DiskSize;
- BYTE Data[1];
-} DISK_GEOMETRY_EX,*PDISK_GEOMETRY_EX;
-typedef struct _DISK_GROW_PARTITION {
- DWORD PartitionNumber;
- LARGE_INTEGER BytesToGrow;
-} DISK_GROW_PARTITION, *PDISK_GROW_PARTITION;
-typedef struct _DISK_PARTITION_INFO {
- DWORD SizeOfPartitionInfo;
- PARTITION_STYLE PartitionStyle;
- _ANONYMOUS_UNION union {
- struct {
- DWORD Signature;
- } Mbr;
- struct {
- GUID DiskId;
- } Gpt;
- };
-} DISK_PARTITION_INFO,*PDISK_PARTITION_INFO;
-typedef struct _DISK_PERFORMANCE {
- LARGE_INTEGER BytesRead;
- LARGE_INTEGER BytesWritten;
- LARGE_INTEGER ReadTime;
- LARGE_INTEGER WriteTime;
- DWORD ReadCount;
- DWORD WriteCount;
- DWORD QueueDepth;
-} DISK_PERFORMANCE, *PDISK_PERFORMANCE;
-typedef struct _DISK_RECORD {
- LARGE_INTEGER ByteOffset;
- LARGE_INTEGER StartTime;
- LARGE_INTEGER EndTime;
- PVOID VirtualAddress;
- DWORD NumberOfBytes;
- BYTE DeviceNumber;
- BOOLEAN ReadRequest;
-} DISK_RECORD,*PDISK_RECORD;
-typedef struct _DISK_LOGGING {
- BYTE Function;
- PVOID BufferAddress;
- DWORD BufferSize;
-} DISK_LOGGING,*PDISK_LOGGING;
-typedef struct DiskQuotaUserInformation {
- LONGLONG QuotaUsed;
- LONGLONG QuotaThreshold;
- LONGLONG QuotaLimit;
-} DISKQUOTA_USER_INFORMATION,*PDISKQUOTA_USER_INFORMATION;
-typedef struct _FORMAT_PARAMETERS {
- MEDIA_TYPE MediaType;
- DWORD StartCylinderNumber;
- DWORD EndCylinderNumber;
- DWORD StartHeadNumber;
- DWORD EndHeadNumber;
-} FORMAT_PARAMETERS,*PFORMAT_PARAMETERS;
-typedef struct _FORMAT_EX_PARAMETERS {
- MEDIA_TYPE MediaType;
- DWORD StartCylinderNumber;
- DWORD EndCylinderNumber;
- DWORD StartHeadNumber;
- DWORD EndHeadNumber;
- WORD FormatGapLength;
- WORD SectorsPerTrack;
- WORD SectorNumber[1];
-} FORMAT_EX_PARAMETERS,*PFORMAT_EX_PARAMETERS;
-typedef struct {
- LARGE_INTEGER Length;
-} GET_LENGTH_INFORMATION;
-typedef struct _HISTOGRAM_BUCKET {
- DWORD Reads;
- DWORD Writes;
-} HISTOGRAM_BUCKET,*PHISTOGRAM_BUCKET;
-typedef struct _DISK_HISTOGRAM {
- LARGE_INTEGER DiskSize;
- LARGE_INTEGER Start;
- LARGE_INTEGER End;
- LARGE_INTEGER Average;
- LARGE_INTEGER AverageRead;
- LARGE_INTEGER AverageWrite;
- DWORD Granularity;
- DWORD Size;
- DWORD ReadCount;
- DWORD WriteCount;
- PHISTOGRAM_BUCKET Histogram;
-} DISK_HISTOGRAM,*PDISK_HISTOGRAM;
-typedef struct _DISK_EXTENT {
- DWORD DiskNumber;
- LARGE_INTEGER StartingOffset;
- LARGE_INTEGER ExtentLength;
-} DISK_EXTENT,*PDISK_EXTENT;
-typedef struct _VOLUME_DISK_EXTENTS {
- DWORD NumberOfDiskExtents;
- DISK_EXTENT Extents[1];
-} VOLUME_DISK_EXTENTS,*PVOLUME_DISK_EXTENTS;
-typedef struct _PARTITION_INFORMATION {
- LARGE_INTEGER StartingOffset;
- LARGE_INTEGER PartitionLength;
- DWORD HiddenSectors;
- DWORD PartitionNumber;
- BYTE PartitionType;
- BOOLEAN BootIndicator;
- BOOLEAN RecognizedPartition;
- BOOLEAN RewritePartition;
-} PARTITION_INFORMATION,*PPARTITION_INFORMATION;
-typedef struct _DRIVE_LAYOUT_INFORMATION {
- DWORD PartitionCount;
- DWORD Signature;
- PARTITION_INFORMATION PartitionEntry[1];
-} DRIVE_LAYOUT_INFORMATION, *PDRIVE_LAYOUT_INFORMATION;
-typedef struct _DRIVE_LAYOUT_INFORMATION_GPT {
- GUID DiskId;
- LARGE_INTEGER StartingUsableOffset;
- LARGE_INTEGER UsableLength;
- ULONG MaxPartitionCount;
-} DRIVE_LAYOUT_INFORMATION_GPT,*PDRIVE_LAYOUT_INFORMATION_GPT;
-typedef struct _DRIVE_LAYOUT_INFORMATION_MBR {
- ULONG Signature;
-} DRIVE_LAYOUT_INFORMATION_MBR, *PDRIVE_LAYOUT_INFORMATION_MBR;
-typedef struct _PARTITION_INFORMATION_MBR {
- BYTE PartitionType;
- BOOLEAN BootIndicator;
- BOOLEAN RecognizedPartition;
- DWORD HiddenSectors;
-} PARTITION_INFORMATION_MBR;
-typedef struct _PARTITION_INFORMATION_GPT {
- GUID PartitionType;
- GUID PartitionId;
- DWORD64 Attributes;
- WCHAR Name[36];
-} PARTITION_INFORMATION_GPT;
-typedef struct _PARTITION_INFORMATION_EX {
- PARTITION_STYLE PartitionStyle;
- LARGE_INTEGER StartingOffset;
- LARGE_INTEGER PartitionLength;
- DWORD PartitionNumber;
- BOOLEAN RewritePartition;
- _ANONYMOUS_UNION union {
- PARTITION_INFORMATION_MBR Mbr;
- PARTITION_INFORMATION_GPT Gpt;
- };
-} PARTITION_INFORMATION_EX;
-typedef struct _DRIVE_LAYOUT_INFORMATION_EX {
- DWORD PartitionStyle;
- DWORD PartitionCount;
- _ANONYMOUS_UNION union {
- DRIVE_LAYOUT_INFORMATION_MBR Mbr;
- DRIVE_LAYOUT_INFORMATION_GPT Gpt;
- };
- PARTITION_INFORMATION_EX PartitionEntry[1];
-} DRIVE_LAYOUT_INFORMATION_EX,*PDRIVE_LAYOUT_INFORMATION_EX;
-typedef struct {
- HANDLE FileHandle;
- LARGE_INTEGER StartingVcn;
- LARGE_INTEGER StartingLcn;
- DWORD ClusterCount;
-} MOVE_FILE_DATA,*PMOVE_FILE_DATA;
-typedef struct _PERF_BIN {
- DWORD NumberOfBins;
- DWORD TypeOfBin;
- BIN_RANGE BinsRanges[1];
-} PERF_BIN,*PPERF_BIN;
-typedef struct _PREVENT_MEDIA_REMOVAL {
- BOOLEAN PreventMediaRemoval;
-} PREVENT_MEDIA_REMOVAL,*PPREVENT_MEDIA_REMOVAL;
-typedef struct RETRIEVAL_POINTERS_BUFFER {
- DWORD ExtentCount;
- LARGE_INTEGER StartingVcn;
- struct {
- LARGE_INTEGER NextVcn;
- LARGE_INTEGER Lcn;
- } Extents[1];
-} RETRIEVAL_POINTERS_BUFFER,*PRETRIEVAL_POINTERS_BUFFER;
-typedef struct _REASSIGN_BLOCKS {
- WORD Reserved;
- WORD Count;
- DWORD BlockNumber[1];
-} REASSIGN_BLOCKS,*PREASSIGN_BLOCKS;
-typedef struct _SET_PARTITION_INFORMATION {
- BYTE PartitionType;
-} SET_PARTITION_INFORMATION,*PSET_PARTITION_INFORMATION;
-typedef struct {
- LARGE_INTEGER StartingLcn;
-} STARTING_LCN_INPUT_BUFFER,*PSTARTING_LCN_INPUT_BUFFER;
-typedef struct {
- LARGE_INTEGER StartingVcn;
-} STARTING_VCN_INPUT_BUFFER,*PSTARTING_VCN_INPUT_BUFFER;
-typedef struct _VERIFY_INFORMATION {
- LARGE_INTEGER StartingOffset;
- DWORD Length;
-} VERIFY_INFORMATION,*PVERIFY_INFORMATION;
-typedef struct {
- LARGE_INTEGER StartingLcn;
- LARGE_INTEGER BitmapSize;
- BYTE Buffer[1];
-} VOLUME_BITMAP_BUFFER,*PVOLUME_BITMAP_BUFFER;
-typedef struct {
- LARGE_INTEGER VolumeSerialNumber;
- LARGE_INTEGER NumberSectors;
- LARGE_INTEGER TotalClusters;
- LARGE_INTEGER FreeClusters;
- LARGE_INTEGER TotalReserved;
- DWORD BytesPerSector;
- DWORD BytesPerCluster;
- DWORD BytesPerFileRecordSegment;
- DWORD ClustersPerFileRecordSegment;
- LARGE_INTEGER MftValidDataLength;
- LARGE_INTEGER MftStartLcn;
- LARGE_INTEGER Mft2StartLcn;
- LARGE_INTEGER MftZoneStart;
- LARGE_INTEGER MftZoneEnd;
-} NTFS_VOLUME_DATA_BUFFER, *PNTFS_VOLUME_DATA_BUFFER;
-
-#define IsRecognizedPartition(t)\
- (((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_FAT_12))||\
- ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_FAT_16))||\
- ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_IFS))||\
- ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_HUGE))||\
- ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_FAT32))||\
- ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_FAT32_XINT13))||\
- ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_XINT13))||\
- ((t&~PARTITION_NTFT)==PARTITION_FAT_12)||\
- ((t&~PARTITION_NTFT)==PARTITION_FAT_16)||\
- ((t&~PARTITION_NTFT)==PARTITION_IFS)||\
- ((t&~PARTITION_NTFT)==PARTITION_HUGE)||\
- ((t&~PARTITION_NTFT)==PARTITION_FAT32)||\
- ((t&~PARTITION_NTFT)==PARTITION_FAT32_XINT13)||\
- ((t&~PARTITION_NTFT)==PARTITION_XINT13))
-#define IsContainerPartition(t)\
- (((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_EXTENDED))||\
- ((t&PARTITION_NTFT)&&((t&~VALID_NTFT)==PARTITION_XINT13_EXTENDED))||\
- ((t&~PARTITION_NTFT)==PARTITION_EXTENDED)||\
- ((t&~PARTITION_NTFT)==PARTITION_XINT13_EXTENDED))
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/winldap.h b/winsup/w32api/include/winldap.h
deleted file mode 100644
index cf7083b..0000000
--- a/winsup/w32api/include/winldap.h
+++ /dev/null
@@ -1,713 +0,0 @@
-/*
- winldap.h - Header file for the Windows LDAP API
-
- Written by Filip Navara <xnavara@volny.cz>
-
- References:
- The C LDAP Application Program Interface
- http://www.watersprings.org/pub/id/draft-ietf-ldapext-ldap-c-api-05.txt
-
- Lightweight Directory Access Protocol Reference
- http://msdn.microsoft.com/library/en-us/netdir/ldap/ldap_reference.asp
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-*/
-
-#ifndef _WINLDAP_H
-#define _WINLDAP_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifndef _SCHANNEL_H
-#include <schannel.h>
-#endif
-
-#ifndef _WINBER_H
-#include <winber.h>
-#endif
-
-#ifndef WINLDAPAPI
-#define WINLDAPAPI DECLSPEC_IMPORT
-#endif
-
-#ifndef _WINLDAP_DEPRECATED
-#if (( __GNUC__ == 3 && __GNUC_MINOR__ > 0 ) || __GNUC__ > 3)
-#define _WINLDAP_DEPRECATED __attribute__((__deprecated__))
-#else
-#define _WINLDAP_DEPRECATED
-#endif
-#endif
-
-#include <pshpack4.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define LDAP_VERSION1 1
-#define LDAP_VERSION2 2
-#define LDAP_VERSION3 3
-#define LDAP_VERSION LDAP_VERSION2
-#define LDAP_API_VERSION 2004
-#define LDAP_VERSION_MIN LDAP_VERSION2
-#define LDAP_VERSION_MAX LDAP_VERSION3
-#define LDAP_VENDOR_NAME "Microsoft Corporation."
-#define LDAP_VENDOR_NAME_W L"Microsoft Corporation."
-#define LDAP_VENDOR_VERSION 510
-#define LDAP_API_INFO_VERSION 1
-#define LDAP_FEATURE_INFO_VERSION 1
-#define LDAP_SUCCESS 0x00
-#define LDAP_OPERATIONS_ERROR 0x01
-#define LDAP_PROTOCOL_ERROR 0x02
-#define LDAP_TIMELIMIT_EXCEEDED 0x03
-#define LDAP_SIZELIMIT_EXCEEDED 0x04
-#define LDAP_COMPARE_FALSE 0x05
-#define LDAP_COMPARE_TRUE 0x06
-#define LDAP_STRONG_AUTH_NOT_SUPPORTED 0x07
-#define LDAP_STRONG_AUTH_REQUIRED 0x08
-#define LDAP_REFERRAL_V2 0x09
-#define LDAP_REFERRAL 0x0a
-#define LDAP_ADMIN_LIMIT_EXCEEDED 0x0b
-#define LDAP_UNAVAILABLE_CRIT_EXTENSION 0x0c
-#define LDAP_CONFIDENTIALITY_REQUIRED 0x0d
-#define LDAP_SASL_BIND_IN_PROGRESS 0x0e
-#define LDAP_NO_SUCH_ATTRIBUTE 0x10
-#define LDAP_UNDEFINED_TYPE 0x11
-#define LDAP_INAPPROPRIATE_MATCHING 0x12
-#define LDAP_CONSTRAINT_VIOLATION 0x13
-#define LDAP_TYPE_OR_VALUE_EXISTS 0x14
-#define LDAP_INVALID_SYNTAX 0x15
-#define LDAP_NO_SUCH_OBJECT 0x20
-#define LDAP_ALIAS_PROBLEM 0x21
-#define LDAP_INVALID_DN_SYNTAX 0x22
-#define LDAP_IS_LEAF 0x23
-#define LDAP_ALIAS_DEREF_PROBLEM 0x24
-#define LDAP_INAPPROPRIATE_AUTH 0x30
-#define LDAP_INVALID_CREDENTIALS 0x31
-#define LDAP_INSUFFICIENT_ACCESS 0x32
-#define LDAP_BUSY 0x33
-#define LDAP_UNAVAILABLE 0x34
-#define LDAP_UNWILLING_TO_PERFORM 0x35
-#define LDAP_LOOP_DETECT 0x36
-#define LDAP_NAMING_VIOLATION 0x40
-#define LDAP_OBJECT_CLASS_VIOLATION 0x41
-#define LDAP_NOT_ALLOWED_ON_NONLEAF 0x42
-#define LDAP_NOT_ALLOWED_ON_RDN 0x43
-#define LDAP_ALREADY_EXISTS 0x44
-#define LDAP_NO_OBJECT_CLASS_MODS 0x45
-#define LDAP_RESULTS_TOO_LARGE 0x46
-#define LDAP_AFFECTS_MULTIPLE_DSAS 0x47
-#define LDAP_OTHER 0x50
-#define LDAP_SERVER_DOWN 0x51
-#define LDAP_LOCAL_ERROR 0x52
-#define LDAP_ENCODING_ERROR 0x53
-#define LDAP_DECODING_ERROR 0x54
-#define LDAP_TIMEOUT 0x55
-#define LDAP_AUTH_UNKNOWN 0x56
-#define LDAP_FILTER_ERROR 0x57
-#define LDAP_USER_CANCELLED 0x58
-#define LDAP_PARAM_ERROR 0x59
-#define LDAP_NO_MEMORY 0x5a
-#define LDAP_CONNECT_ERROR 0x5b
-#define LDAP_NOT_SUPPORTED 0x5c
-#define LDAP_CONTROL_NOT_FOUND 0x5d
-#define LDAP_NO_RESULTS_RETURNED 0x5e
-#define LDAP_MORE_RESULTS_TO_RETURN 0x5f
-#define LDAP_CLIENT_LOOP 0x60
-#define LDAP_REFERRAL_LIMIT_EXCEEDED 0x61
-#define LDAP_OPT_SUCCESS LDAP_SUCCESS
-#define LDAP_AUTH_METHOD_NOT_SUPPORTED LDAP_STRONG_AUTH_NOT_SUPPORTED
-#define LDAP_ATTRIBUTE_OR_VALUE_EXISTS LDAP_TYPE_OR_VALUE_EXISTS
-#define LDAP_INSUFFICIENT_RIGHTS LDAP_INSUFFICIENT_ACCESS
-#define LDAP_PARTIAL_RESULTS LDAP_REFERRAL_V2
-#define LDAP_PORT 389
-#define LDAP_SSL_PORT 636
-#define LDAP_GC_PORT 3268
-#define LDAP_SSL_GC_PORT 3269
-#define LDAP_OPT_ON ((void*)1)
-#define LDAP_OPT_OFF ((void*)0)
-#define LDAP_OPT_API_INFO 0x00
-#define LDAP_OPT_DESC 0x01
-#define LDAP_OPT_DEREF 0x02
-#define LDAP_OPT_SIZELIMIT 0x03
-#define LDAP_OPT_TIMELIMIT 0x04
-#define LDAP_OPT_THREAD_FN_PTRS 0x05
-#define LDAP_OPT_REBIND_FN 0x06
-#define LDAP_OPT_REBIND_ARG 0x07
-#define LDAP_OPT_REFERRALS 0x08
-#define LDAP_OPT_RESTART 0x09
-#define LDAP_OPT_SSL 0x0a
-#define LDAP_OPT_IO_FN_PTRS 0x0b
-#define LDAP_OPT_CACHE_FN_PTRS 0x0d
-#define LDAP_OPT_CACHE_STRATEGY 0x0e
-#define LDAP_OPT_CACHE_ENABLE 0x0f
-#define LDAP_OPT_REFERRAL_HOP_LIMIT 0x10
-#define LDAP_OPT_PROTOCOL_VERSION 0x11
-#define LDAP_OPT_SERVER_CONTROLS 0x12
-#define LDAP_OPT_CLIENT_CONTROLS 0x13
-#define LDAP_OPT_API_FEATURE_INFO 0x15
-#define LDAP_OPT_HOST_NAME 0x30
-#define LDAP_OPT_ERROR_NUMBER 0x31
-#define LDAP_OPT_ERROR_STRING 0x32
-#define LDAP_OPT_SERVER_ERROR 0x33
-#define LDAP_OPT_SERVER_EXT_ERROR 0x34
-#define LDAP_OPT_PING_KEEP_ALIVE 0x36
-#define LDAP_OPT_PING_WAIT_TIME 0x37
-#define LDAP_OPT_PING_LIMIT 0x38
-#define LDAP_OPT_DNSDOMAIN_NAME 0x3b
-#define LDAP_OPT_GETDSNAME_FLAGS 0x3d
-#define LDAP_OPT_HOST_REACHABLE 0x3e
-#define LDAP_OPT_PROMPT_CREDENTIALS 0x3f
-#define LDAP_OPT_TCP_KEEPALIVE 0x40
-#define LDAP_OPT_REFERRAL_CALLBACK 0x70
-#define LDAP_OPT_CLIENT_CERTIFICATE 0x80
-#define LDAP_OPT_SERVER_CERTIFICATE 0x81
-#define LDAP_OPT_AUTO_RECONNECT 0x91
-#define LDAP_OPT_SSPI_FLAGS 0x92
-#define LDAP_OPT_SSL_INFO 0x93
-#define LDAP_OPT_REF_DEREF_CONN_PER_MSG 0x94
-#define LDAP_OPT_SIGN 0x95
-#define LDAP_OPT_ENCRYPT 0x96
-#define LDAP_OPT_SASL_METHOD 0x97
-#define LDAP_OPT_AREC_EXCLUSIVE 0x98
-#define LDAP_OPT_SECURITY_CONTEXT 0x99
-#define LDAP_OPT_ROOTDSE_CACHE 0x9a
-#define LDAP_OPT_VERSION LDAP_OPT_PROTOCOL_VERSION
-#define LDAP_OPT_TLS LDAP_OPT_SSL
-#define LDAP_OPT_TLS_INFO LDAP_OPT_SSL_INFO
-#define LDAP_DEREF_NEVER 0x00
-#define LDAP_DEREF_SEARCHING 0x01
-#define LDAP_DEREF_FINDING 0x02
-#define LDAP_DEREF_ALWAYS 0x03
-#define LDAP_NO_LIMIT 0
-#define LDAP_CONTROL_REFERRALS "1.2.840.113556.1.4.616"
-#define LDAP_CONTROL_REFERRALS_W L"1.2.840.113556.1.4.616"
-#define LDAP_CHASE_SUBORDINATE_REFERRALS 0x20U
-#define LDAP_CHASE_EXTERNAL_REFERRALS 0x40U
-#define LDAP_SCOPE_DEFAULT -1
-#define LDAP_SCOPE_BASE 0x0000
-#define LDAP_SCOPE_ONELEVEL 0x0001
-#define LDAP_SCOPE_SUBTREE 0x0002
-#define LDAP_MOD_ADD 0x00
-#define LDAP_MOD_DELETE 0x01
-#define LDAP_MOD_REPLACE 0x02
-#define LDAP_MOD_BVALUES 0x80
-#define LDAP_RES_BIND 0x61
-#define LDAP_RES_SEARCH_ENTRY 0x64
-#define LDAP_RES_SEARCH_RESULT 0x65
-#define LDAP_RES_MODIFY 0x67
-#define LDAP_RES_ADD 0x69
-#define LDAP_RES_DELETE 0x6b
-#define LDAP_RES_MODRDN 0x6d
-#define LDAP_RES_COMPARE 0x6f
-#define LDAP_RES_SEARCH_REFERENCE 0x73
-#define LDAP_RES_EXTENDED 0x78
-#define LDAP_RES_ANY (-1L)
-#define LDAP_MSG_ONE 0x00
-#define LDAP_MSG_ALL 0x01
-#define LDAP_MSG_RECEIVED 0x02
-#define LDAP_SERVER_SORT_OID "1.2.840.113556.1.4.473"
-#define LDAP_SERVER_SORT_OID_W L"1.2.840.113556.1.4.473"
-#define LDAP_SERVER_RESP_SORT_OID "1.2.840.113556.1.4.474"
-#define LDAP_SERVER_RESP_SORT_OID_W L"1.2.840.113556.1.4.474"
-#define LDAP_PAGED_RESULT_OID_STRING "1.2.840.113556.1.4.319"
-#define LDAP_PAGED_RESULT_OID_STRING_W L"1.2.840.113556.1.4.319"
-#define LDAP_CONTROL_VLVREQUEST "2.16.840.1.113730.3.4.9"
-#define LDAP_CONTROL_VLVREQUEST_W L"2.16.840.1.113730.3.4.9"
-#define LDAP_CONTROL_VLVRESPONSE "2.16.840.1.113730.3.4.10"
-#define LDAP_CONTROL_VLVRESPONSE_W L"2.16.840.1.113730.3.4.10"
-#define LDAP_START_TLS_OID "1.3.6.1.4.1.1466.20037"
-#define LDAP_START_TLS_OID_W L"1.3.6.1.4.1.1466.20037"
-#define LDAP_TTL_EXTENDED_OP_OID "1.3.6.1.4.1.1466.101.119.1"
-#define LDAP_TTL_EXTENDED_OP_OID_W L"1.3.6.1.4.1.1466.101.119.1"
-#define LDAP_AUTH_NONE 0x00U
-#define LDAP_AUTH_SIMPLE 0x80U
-#define LDAP_AUTH_SASL 0x83U
-#define LDAP_AUTH_OTHERKIND 0x86U
-#define LDAP_AUTH_EXTERNAL (LDAP_AUTH_OTHERKIND | 0x20U)
-#define LDAP_AUTH_SICILY (LDAP_AUTH_OTHERKIND | 0x200U)
-#define LDAP_AUTH_NEGOTIATE (LDAP_AUTH_OTHERKIND | 0x400U)
-#define LDAP_AUTH_MSN (LDAP_AUTH_OTHERKIND | 0x800U)
-#define LDAP_AUTH_NTLM (LDAP_AUTH_OTHERKIND | 0x1000U)
-#define LDAP_AUTH_DIGEST (LDAP_AUTH_OTHERKIND | 0x4000U)
-#define LDAP_AUTH_DPA (LDAP_AUTH_OTHERKIND | 0x2000U)
-#define LDAP_AUTH_SSPI LDAP_AUTH_NEGOTIATE
-#define LDAP_FILTER_AND 0xa0
-#define LDAP_FILTER_OR 0xa1
-#define LDAP_FILTER_NOT 0xa2
-#define LDAP_FILTER_EQUALITY 0xa3
-#define LDAP_FILTER_SUBSTRINGS 0xa4
-#define LDAP_FILTER_GE 0xa5
-#define LDAP_FILTER_LE 0xa6
-#define LDAP_FILTER_APPROX 0xa8
-#define LDAP_FILTER_EXTENSIBLE 0xa9
-#define LDAP_FILTER_PRESENT 0x87
-#define LDAP_SUBSTRING_INITIAL 0x80
-#define LDAP_SUBSTRING_ANY 0x81
-#define LDAP_SUBSTRING_FINAL 0x82
-
-typedef struct ldap {
- char Reserved[76];
- PCHAR ld_host;
- ULONG ld_version;
- UCHAR ld_lberoptions;
- int ld_deref;
- int ld_timelimit;
- int ld_sizelimit;
- int ld_errno;
- PCHAR ld_matched;
- PCHAR ld_error;
-} LDAP, *PLDAP;
-typedef struct ldapmsg {
- ULONG lm_msgid;
- ULONG lm_msgtype;
- BerElement *lm_ber;
- struct ldapmsg *lm_chain;
- struct ldapmsg *lm_next;
- ULONG lm_time;
-} LDAPMessage, *PLDAPMessage;
-typedef struct l_timeval {
- LONG tv_sec;
- LONG tv_usec;
-} LDAP_TIMEVAL, *PLDAP_TIMEVAL;
-typedef struct ldapapiinfoA {
- int ldapai_info_version;
- int ldapai_api_version;
- int ldapai_protocol_version;
- char **ldapai_extensions;
- char *ldapai_vendor_name;
- int ldapai_vendor_version;
-} LDAPAPIInfoA, *PLDAPAPIInfoA;
-typedef struct ldapapiinfoW {
- int ldapai_info_version;
- int ldapai_api_version;
- int ldapai_protocol_version;
- PWCHAR *ldapai_extensions;
- PWCHAR ldapai_vendor_name;
- int ldapai_vendor_version;
-} LDAPAPIInfoW, *PLDAPAPIInfoW;
-typedef struct ldap_apifeature_infoA {
- int ldapaif_info_version;
- char *ldapaif_name;
- int ldapaif_version;
-} LDAPAPIFeatureInfoA, *PLDAPAPIFeatureInfoA;
-typedef struct ldap_apifeature_infoW {
- int ldapaif_info_version;
- PWCHAR ldapaif_name;
- int ldapaif_version;
-} LDAPAPIFeatureInfoW, *PLDAPAPIFeatureInfoW;
-typedef struct ldapcontrolA {
- PCHAR ldctl_oid;
- BerValue ldctl_value;
- BOOLEAN ldctl_iscritical;
-} LDAPControlA, *PLDAPControlA;
-typedef struct ldapcontrolW {
- PWCHAR ldctl_oid;
- BerValue ldctl_value;
- BOOLEAN ldctl_iscritical;
-} LDAPControlW, *PLDAPControlW;
-typedef union mod_vals_uA {
- PCHAR *modv_strvals;
- BerValue **modv_bvals;
-} mod_vals_u_tA;
-typedef union mod_vals_uW {
- PWCHAR *modv_strvals;
- BerValue **modv_bvals;
-} mod_vals_u_tW;
-typedef struct ldapmodA {
- ULONG mod_op;
- PCHAR mod_type;
- mod_vals_u_tA mod_vals;
-} LDAPModA, *PLDAPModA;
-typedef struct ldapmodW {
- ULONG mod_op;
- PWCHAR mod_type;
- mod_vals_u_tW mod_vals;
-} LDAPModW, *PLDAPModW;
-
-#define mod_values mod_vals.modv_strvals
-#define mod_bvalues mod_vals.modv_bvals
-
-typedef struct ldapsearch LDAPSearch, *PLDAPSearch;
-typedef struct ldapsortkeyA {
- PCHAR sk_attrtype;
- PCHAR sk_matchruleoid;
- BOOLEAN sk_reverseorder;
-} LDAPSortKeyA, *PLDAPSortKeyA;
-typedef struct ldapsortkeyW {
- PWCHAR sk_attrtype;
- PWCHAR sk_matchruleoid;
- BOOLEAN sk_reverseorder;
-} LDAPSortKeyW, *PLDAPSortKeyW;
-typedef ULONG (__cdecl QUERYFORCONNECTION)(PLDAP,PLDAP,PWCHAR,PCHAR,ULONG,PVOID,PVOID,PLDAP*);
-typedef BOOLEAN (__cdecl NOTIFYOFNEWCONNECTION)(PLDAP,PLDAP,PWCHAR,PCHAR,PLDAP,ULONG,PVOID,PVOID,ULONG);
-typedef ULONG (__cdecl DEREFERENCECONNECTION)(PLDAP,PLDAP);
-typedef BOOLEAN (__cdecl QUERYCLIENTCERT)(PLDAP,PSecPkgContext_IssuerListInfoEx,PCCERT_CONTEXT*);
-typedef struct LdapReferralCallback {
- ULONG SizeOfCallbacks;
- QUERYFORCONNECTION *QueryForConnection;
- NOTIFYOFNEWCONNECTION *NotifyRoutine;
- DEREFERENCECONNECTION *DereferenceRoutine;
-} LDAP_REFERRAL_CALLBACK, *PLDAP_REFERRAL_CALLBACK;
-typedef struct ldapvlvinfo {
- int ldvlv_version;
- unsigned long ldvlv_before_count;
- unsigned long ldvlv_after_count;
- unsigned long ldvlv_offset;
- unsigned long ldvlv_count;
- BerValue *ldvlv_attrvalue;
- BerValue *ldvlv_context;
- void *ldvlv_extradata;
-} LDAPVLVInfo;
-
-/*
- * Under Microsoft WinLDAP the function ldap_error is only stub.
- * This macro uses LDAP structure to get error string and pass it to the user.
- */
-#define ldap_perror(handle,message) printf("%s: %s\n", message, handle->ld_error);
-
-WINLDAPAPI PLDAP ldap_initA(PCHAR,ULONG);
-WINLDAPAPI PLDAP ldap_initW(PWCHAR,ULONG);
-WINLDAPAPI PLDAP ldap_openA(const PCHAR,ULONG);
-WINLDAPAPI PLDAP ldap_openW(const PWCHAR,ULONG);
-WINLDAPAPI PLDAP cldap_openA(const PCHAR,ULONG);
-WINLDAPAPI PLDAP cldap_openW(const PWCHAR,ULONG);
-WINLDAPAPI ULONG ldap_connect(LDAP*,struct l_timeval*);
-WINLDAPAPI PLDAP ldap_sslinitA(PCHAR,ULONG,int);
-WINLDAPAPI PLDAP ldap_sslinitW(PWCHAR,ULONG,int);
-WINLDAPAPI ULONG ldap_start_tls_sA(LDAP*,PLDAPControlA*,PLDAPControlA*);
-WINLDAPAPI ULONG ldap_start_tls_sW(LDAP*,PLDAPControlW*,PLDAPControlW*);
-WINLDAPAPI BOOLEAN ldap_stop_tls_s(LDAP*);
-WINLDAPAPI ULONG ldap_get_optionA(LDAP*,int,void*);
-WINLDAPAPI ULONG ldap_get_optionW(LDAP*,int,void*);
-WINLDAPAPI ULONG ldap_set_optionA(LDAP*,int,const void*);
-WINLDAPAPI ULONG ldap_set_optionW(LDAP*,int,const void*);
-WINLDAPAPI ULONG ldap_control_freeA(LDAPControlA*);
-WINLDAPAPI ULONG ldap_control_freeW(LDAPControlW*);
-WINLDAPAPI ULONG ldap_controls_freeA(LDAPControlA**);
-WINLDAPAPI ULONG ldap_controls_freeW(LDAPControlW**);
-WINLDAPAPI ULONG ldap_free_controlsA(LDAPControlA**);
-WINLDAPAPI ULONG ldap_free_controlsW(LDAPControlW**);
-WINLDAPAPI ULONG ldap_sasl_bindA(LDAP*,const PCHAR, const PCHAR,const BERVAL*,PLDAPControlA*,PLDAPControlA*,int*);
-WINLDAPAPI ULONG ldap_sasl_bindW(LDAP*,const PWCHAR, const PWCHAR,const BERVAL*,PLDAPControlW*,PLDAPControlW*,int*);
-WINLDAPAPI ULONG ldap_sasl_bind_sA(LDAP*,const PCHAR,const PCHAR,const BERVAL*,PLDAPControlA*,PLDAPControlA*,PBERVAL*);
-WINLDAPAPI ULONG ldap_sasl_bind_sW(LDAP*,const PWCHAR,const PWCHAR,const BERVAL*,PLDAPControlW*,PLDAPControlW*,PBERVAL*);
-WINLDAPAPI ULONG ldap_simple_bindA(LDAP*,const PCHAR,const PCHAR);
-WINLDAPAPI ULONG ldap_simple_bindW(LDAP*,const PWCHAR,const PWCHAR);
-WINLDAPAPI ULONG ldap_simple_bind_sA(LDAP*,const PCHAR,const PCHAR);
-WINLDAPAPI ULONG ldap_simple_bind_sW(LDAP*,const PWCHAR,const PWCHAR);
-WINLDAPAPI ULONG ldap_bindA(LDAP*,const PCHAR,const PCHAR,ULONG) _WINLDAP_DEPRECATED;
-WINLDAPAPI ULONG ldap_bindW(LDAP*,const PWCHAR,const PWCHAR,ULONG) _WINLDAP_DEPRECATED;
-WINLDAPAPI ULONG ldap_bind_sA(LDAP*,const PCHAR,const PCHAR,ULONG) _WINLDAP_DEPRECATED;
-WINLDAPAPI ULONG ldap_bind_sW(LDAP*,const PWCHAR,const PWCHAR,ULONG) _WINLDAP_DEPRECATED;
-WINLDAPAPI ULONG ldap_unbind(LDAP*);
-WINLDAPAPI ULONG ldap_unbind_s(LDAP*);
-WINLDAPAPI ULONG ldap_search_extA(LDAP*,const PCHAR,ULONG,const PCHAR,PCHAR[],ULONG,PLDAPControlW*,PLDAPControlW*,ULONG,ULONG,ULONG*);
-WINLDAPAPI ULONG ldap_search_extW(LDAP*,const PWCHAR,ULONG,const PWCHAR,PWCHAR[],ULONG,PLDAPControlW*,PLDAPControlW*,ULONG,ULONG,ULONG*);
-WINLDAPAPI ULONG ldap_search_ext_sA(LDAP*,const PCHAR,ULONG,const PCHAR,PCHAR[],ULONG,PLDAPControlA*,PLDAPControlA*,struct l_timeval*,ULONG,LDAPMessage**);
-WINLDAPAPI ULONG ldap_search_ext_sW(LDAP*,const PWCHAR,ULONG,const PWCHAR,PWCHAR[],ULONG,PLDAPControlW*,PLDAPControlW*,struct l_timeval*,ULONG,LDAPMessage**);
-WINLDAPAPI ULONG ldap_searchA(LDAP*,const PCHAR,ULONG,const PCHAR,PCHAR[],ULONG);
-WINLDAPAPI ULONG ldap_searchW(LDAP*,const PWCHAR,ULONG,const PWCHAR,PWCHAR[],ULONG);
-WINLDAPAPI ULONG ldap_search_sA(LDAP*,const PCHAR,ULONG,const PCHAR,PCHAR[],ULONG,LDAPMessage**);
-WINLDAPAPI ULONG ldap_search_sW(LDAP*,const PWCHAR,ULONG,const PWCHAR,PWCHAR[],ULONG,LDAPMessage**);
-WINLDAPAPI ULONG ldap_search_stA(LDAP*,const PCHAR,ULONG,const PCHAR,PCHAR[],ULONG,struct l_timeval*,LDAPMessage**);
-WINLDAPAPI ULONG ldap_search_stW(LDAP*,const PWCHAR,ULONG,const PWCHAR,PWCHAR[],ULONG,struct l_timeval*,LDAPMessage**);
-WINLDAPAPI ULONG ldap_compare_extA(LDAP*,const PCHAR,const PCHAR,PCHAR,struct berval*,PLDAPControlA*,PLDAPControlA*,ULONG*);
-WINLDAPAPI ULONG ldap_compare_extW(LDAP*,const PWCHAR,const PWCHAR,PWCHAR,struct berval*,PLDAPControlW*,PLDAPControlW*,ULONG*);
-WINLDAPAPI ULONG ldap_compare_ext_sA(LDAP*,const PCHAR,const PCHAR,const PCHAR,struct berval*,PLDAPControlA*,PLDAPControlA*);
-WINLDAPAPI ULONG ldap_compare_ext_sW(LDAP*,const PWCHAR,const PWCHAR,const PWCHAR,struct berval*,PLDAPControlW*,PLDAPControlW*);
-WINLDAPAPI ULONG ldap_compareA(LDAP*,const PCHAR,const PCHAR,PCHAR);
-WINLDAPAPI ULONG ldap_compareW(LDAP*,const PWCHAR,const PWCHAR,PWCHAR);
-WINLDAPAPI ULONG ldap_compare_sA(LDAP*,const PCHAR,const PCHAR,PCHAR);
-WINLDAPAPI ULONG ldap_compare_sW(LDAP*,const PWCHAR,const PWCHAR,PWCHAR);
-WINLDAPAPI ULONG ldap_modify_extA(LDAP*,const PCHAR,LDAPModA*[],PLDAPControlA*,PLDAPControlA*,ULONG*);
-WINLDAPAPI ULONG ldap_modify_extW(LDAP*,const PWCHAR,LDAPModW*[],PLDAPControlW*,PLDAPControlW*,ULONG*);
-WINLDAPAPI ULONG ldap_modify_ext_sA(LDAP*,const PCHAR,LDAPModA*[],PLDAPControlA*,PLDAPControlA*);
-WINLDAPAPI ULONG ldap_modify_ext_sW(LDAP*,const PWCHAR,LDAPModW*[],PLDAPControlW*,PLDAPControlW*);
-WINLDAPAPI ULONG ldap_modifyA(LDAP*,const PCHAR,LDAPModA*[]);
-WINLDAPAPI ULONG ldap_modifyW(LDAP*,const PWCHAR,LDAPModW*[]);
-WINLDAPAPI ULONG ldap_modify_sA(LDAP*,const PCHAR,LDAPModA*[]);
-WINLDAPAPI ULONG ldap_modify_sW(LDAP*,const PWCHAR,LDAPModW*[]);
-WINLDAPAPI ULONG ldap_rename_extA(LDAP*,const PCHAR,const PCHAR,const PCHAR,INT,PLDAPControlA*,PLDAPControlA*,ULONG*);
-WINLDAPAPI ULONG ldap_rename_extW(LDAP*,const PWCHAR,const PWCHAR,const PWCHAR,INT,PLDAPControlW*,PLDAPControlW*,ULONG*);
-WINLDAPAPI ULONG ldap_rename_ext_sA(LDAP*,const PCHAR,const PCHAR,const PCHAR,INT,PLDAPControlA*,PLDAPControlA*);
-WINLDAPAPI ULONG ldap_rename_ext_sW(LDAP*,const PWCHAR,const PWCHAR,const PWCHAR,INT,PLDAPControlW*,PLDAPControlW*);
-WINLDAPAPI ULONG ldap_modrdnA(LDAP*,PCHAR,PCHAR) _WINLDAP_DEPRECATED;
-WINLDAPAPI ULONG ldap_modrdnW(LDAP*,PWCHAR,PWCHAR) _WINLDAP_DEPRECATED;
-WINLDAPAPI ULONG ldap_modrdn_sA(LDAP*,PCHAR,PCHAR) _WINLDAP_DEPRECATED;
-WINLDAPAPI ULONG ldap_modrdn_sW(LDAP*,PWCHAR,PWCHAR) _WINLDAP_DEPRECATED;
-WINLDAPAPI ULONG ldap_modrdn2A(LDAP*,PCHAR,PCHAR,INT) _WINLDAP_DEPRECATED;
-WINLDAPAPI ULONG ldap_modrdn2W(LDAP*,PWCHAR,PWCHAR,INT) _WINLDAP_DEPRECATED;
-WINLDAPAPI ULONG ldap_modrdn2_sA(LDAP*,PCHAR,PCHAR,INT) _WINLDAP_DEPRECATED;
-WINLDAPAPI ULONG ldap_modrdn2_sW(LDAP*,PWCHAR,PWCHAR,INT) _WINLDAP_DEPRECATED;
-WINLDAPAPI ULONG ldap_add_extA(LDAP*,const PCHAR,LDAPModA*[],PLDAPControlA*,PLDAPControlA*,ULONG*);
-WINLDAPAPI ULONG ldap_add_extW(LDAP*,const PWCHAR,LDAPModW*[],PLDAPControlW*,PLDAPControlW*,ULONG*);
-WINLDAPAPI ULONG ldap_add_ext_sA(LDAP*,const PCHAR,LDAPModA*[],PLDAPControlA*,PLDAPControlA*);
-WINLDAPAPI ULONG ldap_add_ext_sW(LDAP*,const PWCHAR,LDAPModW*[],PLDAPControlW*,PLDAPControlW*);
-WINLDAPAPI ULONG ldap_addA(LDAP*,const PCHAR,LDAPModA*[]);
-WINLDAPAPI ULONG ldap_addW(LDAP*,const PWCHAR,LDAPModW*[]);
-WINLDAPAPI ULONG ldap_add_sA(LDAP*,const PCHAR,LDAPModA*[]);
-WINLDAPAPI ULONG ldap_add_sW(LDAP*,const PWCHAR,LDAPModW*[]);
-WINLDAPAPI ULONG ldap_delete_extA(LDAP*,const PCHAR,PLDAPControlA*,PLDAPControlA*,ULONG*);
-WINLDAPAPI ULONG ldap_delete_extW(LDAP*,const PWCHAR,PLDAPControlW*,PLDAPControlW*,ULONG*);
-WINLDAPAPI ULONG ldap_delete_ext_sA(LDAP*,const PCHAR,PLDAPControlA*,PLDAPControlA*);
-WINLDAPAPI ULONG ldap_delete_ext_sW(LDAP*,const PWCHAR,PLDAPControlW*,PLDAPControlW*);
-WINLDAPAPI ULONG ldap_deleteA(LDAP*,const PCHAR);
-WINLDAPAPI ULONG ldap_deleteW(LDAP*,const PWCHAR);
-WINLDAPAPI ULONG ldap_delete_sA(LDAP*,const PCHAR);
-WINLDAPAPI ULONG ldap_delete_sW(LDAP*,const PWCHAR);
-WINLDAPAPI ULONG ldap_extended_operationA(LDAP*,const PCHAR,const struct berval*,PLDAPControlA*,PLDAPControlA*,ULONG*);
-WINLDAPAPI ULONG ldap_extended_operationW(LDAP*,const PWCHAR,const struct berval*,PLDAPControlW*,PLDAPControlW*,ULONG*);
-WINLDAPAPI ULONG ldap_extended_operation_sA(LDAP*,const PCHAR,const struct berval*,PLDAPControlA*,PLDAPControlA*,PCHAR*,struct berval**);
-WINLDAPAPI ULONG ldap_extended_operation_sW(LDAP*,const PWCHAR,const struct berval*,PLDAPControlW*,PLDAPControlW*,PWCHAR*,struct berval**);
-WINLDAPAPI ULONG ldap_close_extended_op(LDAP*,ULONG);
-WINLDAPAPI ULONG ldap_abandon(LDAP*,ULONG);
-WINLDAPAPI ULONG ldap_result(LDAP*,ULONG,ULONG,struct l_timeval*,LDAPMessage**);
-WINLDAPAPI ULONG ldap_msgfree(LDAPMessage*);
-WINLDAPAPI ULONG ldap_parse_resultA(LDAP*,LDAPMessage*,ULONG*,PCHAR*,PCHAR*,PCHAR**,PLDAPControlA**,BOOLEAN);
-WINLDAPAPI ULONG ldap_parse_resultW(LDAP*,LDAPMessage*,ULONG*,PWCHAR*,PWCHAR*,PWCHAR**,PLDAPControlW**,BOOLEAN);
-WINLDAPAPI ULONG ldap_parse_extended_resultA(LDAP,LDAPMessage*,PCHAR*,struct berval**,BOOLEAN);
-WINLDAPAPI ULONG ldap_parse_extended_resultW(LDAP,LDAPMessage*,PWCHAR*,struct berval**,BOOLEAN);
-WINLDAPAPI PCHAR ldap_err2stringA(ULONG);
-WINLDAPAPI PWCHAR ldap_err2stringW(ULONG);
-WINLDAPAPI ULONG LdapGetLastError(void);
-WINLDAPAPI ULONG LdapMapErrorToWin32(ULONG);
-WINLDAPAPI ULONG ldap_result2error(LDAP*,LDAPMessage*,ULONG);
-WINLDAPAPI PLDAPMessage ldap_first_entry(LDAP*,LDAPMessage*);
-WINLDAPAPI PLDAPMessage ldap_next_entry(LDAP*,LDAPMessage*);
-WINLDAPAPI PLDAPMessage ldap_first_reference(LDAP*,LDAPMessage*);
-WINLDAPAPI PLDAPMessage ldap_next_reference(LDAP*,LDAPMessage*);
-WINLDAPAPI ULONG ldap_count_entries(LDAP*,LDAPMessage*);
-WINLDAPAPI ULONG ldap_count_references(LDAP*,LDAPMessage*);
-WINLDAPAPI PCHAR ldap_first_attributeA(LDAP*,LDAPMessage*,BerElement**);
-WINLDAPAPI PWCHAR ldap_first_attributeW(LDAP*,LDAPMessage*,BerElement**);
-WINLDAPAPI PCHAR ldap_next_attributeA(LDAP*,LDAPMessage*,BerElement*);
-WINLDAPAPI PWCHAR ldap_next_attributeW(LDAP*,LDAPMessage*,BerElement*);
-WINLDAPAPI VOID ldap_memfreeA(PCHAR);
-WINLDAPAPI VOID ldap_memfreeW(PWCHAR);
-WINLDAPAPI PCHAR* ldap_get_valuesA(LDAP*,LDAPMessage*,const PCHAR);
-WINLDAPAPI PWCHAR* ldap_get_valuesW(LDAP*,LDAPMessage*,const PWCHAR);
-WINLDAPAPI BerValue** ldap_get_values_lenA(LDAP*,LDAPMessage*,const PCHAR);
-WINLDAPAPI BerValue** ldap_get_values_lenW(LDAP*,LDAPMessage*,const PWCHAR);
-WINLDAPAPI ULONG ldap_count_valuesA(PCHAR*);
-WINLDAPAPI ULONG ldap_count_valuesW(PWCHAR*);
-WINLDAPAPI ULONG ldap_count_values_len(struct berval**);
-WINLDAPAPI ULONG ldap_value_freeA(PCHAR*);
-WINLDAPAPI ULONG ldap_value_freeW(PWCHAR*);
-WINLDAPAPI ULONG ldap_value_free_len(struct berval**);
-WINLDAPAPI PCHAR ldap_get_dnA(LDAP*,LDAPMessage*);
-WINLDAPAPI PWCHAR ldap_get_dnW(LDAP*,LDAPMessage*);
-WINLDAPAPI PCHAR ldap_explode_dnA(PCHAR,ULONG);
-WINLDAPAPI PWCHAR ldap_explode_dnW(PWCHAR,ULONG);
-WINLDAPAPI PCHAR ldap_dn2ufnA(PCHAR);
-WINLDAPAPI PWCHAR ldap_dn2ufnW(PWCHAR);
-WINLDAPAPI ULONG ldap_ufn2dnA(const PCHAR,PCHAR*);
-WINLDAPAPI ULONG ldap_ufn2dnW(const PWCHAR,PWCHAR*);
-WINLDAPAPI ULONG ldap_parse_referenceA(LDAP*,LDAPMessage*,PCHAR**);
-WINLDAPAPI ULONG ldap_parse_referenceW(LDAP*,LDAPMessage*,PWCHAR**);
-WINLDAPAPI ULONG ldap_check_filterA(LDAP*,PCHAR);
-WINLDAPAPI ULONG ldap_check_filterW(LDAP*,PWCHAR);
-WINLDAPAPI ULONG ldap_create_page_controlA(PLDAP,ULONG,struct berval*,UCHAR,PLDAPControlA*);
-WINLDAPAPI ULONG ldap_create_page_controlW(PLDAP,ULONG,struct berval*,UCHAR,PLDAPControlW*);
-WINLDAPAPI ULONG ldap_create_sort_controlA(PLDAP,PLDAPSortKeyA*,UCHAR,PLDAPControlA*);
-WINLDAPAPI ULONG ldap_create_sort_controlW(PLDAP,PLDAPSortKeyW*,UCHAR,PLDAPControlW*);
-WINLDAPAPI INT ldap_create_vlv_controlA(LDAP*,LDAPVLVInfo*,UCHAR,LDAPControlA**);
-WINLDAPAPI INT ldap_create_vlv_controlW(LDAP*,LDAPVLVInfo*,UCHAR,LDAPControlW**);
-WINLDAPAPI ULONG ldap_encode_sort_controlA(PLDAP,PLDAPSortKeyA*,PLDAPControlA,BOOLEAN);
-WINLDAPAPI ULONG ldap_encode_sort_controlW(PLDAP,PLDAPSortKeyW*,PLDAPControlW,BOOLEAN);
-WINLDAPAPI ULONG ldap_escape_filter_elementA(PCHAR,ULONG,PCHAR,ULONG);
-WINLDAPAPI ULONG ldap_escape_filter_elementW(PWCHAR,ULONG,PWCHAR,ULONG);
-WINLDAPAPI ULONG ldap_get_next_page(PLDAP,PLDAPSearch,ULONG,ULONG*);
-WINLDAPAPI ULONG ldap_get_next_page_s(PLDAP,PLDAPSearch,struct l_timeval*,ULONG,ULONG*,LDAPMessage**);
-WINLDAPAPI ULONG ldap_get_paged_count(PLDAP,PLDAPSearch,ULONG*,PLDAPMessage);
-WINLDAPAPI ULONG ldap_parse_page_controlA(PLDAP,PLDAPControlA*,ULONG*,struct berval**);
-WINLDAPAPI ULONG ldap_parse_page_controlW(PLDAP,PLDAPControlW*,ULONG*,struct berval**);
-WINLDAPAPI ULONG ldap_parse_sort_controlA(PLDAP,PLDAPControlA*,ULONG*,PCHAR*);
-WINLDAPAPI ULONG ldap_parse_sort_controlW(PLDAP,PLDAPControlW*,ULONG*,PWCHAR*);
-WINLDAPAPI INT ldap_parse_vlv_controlA(LDAP*,LDAPControlA**,unsigned long*,unsigned long*,struct berval**,int*);
-WINLDAPAPI INT ldap_parse_vlv_controlW(LDAP*,LDAPControlW**,unsigned long*,unsigned long*,struct berval**,int*);
-WINLDAPAPI PLDAPSearch ldap_search_init_pageA(PLDAP,const PCHAR,ULONG,const PCHAR,PCHAR[],ULONG,PLDAPControlA*,PLDAPControlA*,ULONG,ULONG,PLDAPSortKeyA*);
-WINLDAPAPI PLDAPSearch ldap_search_init_pageW(PLDAP,const PWCHAR,ULONG,const PWCHAR,PWCHAR[],ULONG,PLDAPControlW*,PLDAPControlW*,ULONG,ULONG,PLDAPSortKeyW*);
-WINLDAPAPI ULONG ldap_search_abandon_page(PLDAP,PLDAPSearch);
-WINLDAPAPI LDAP ldap_conn_from_msg(LDAP*,LDAPMessage*);
-WINLDAPAPI INT LdapUnicodeToUTF8(LPCWSTR,int,LPSTR,int);
-WINLDAPAPI INT LdapUTF8ToUnicode(LPCSTR,int,LPWSTR,int);
-
-#ifdef UNICODE
-#define LDAPControl LDAPControlW
-#define PLDAPControl PLDAPControlW
-#define LDAPMod LDAPModW
-#define PLDAPMod LDAPModW
-#define LDAPSortKey LDAPSortKeyW
-#define PLDAPSortKey PLDAPSortKeyW
-#define LDAPAPIInfo LDAPAPIInfoW
-#define PLDAPAPIInfo PLDAPAPIInfoW
-#define LDAPAPIFeatureInfo LDAPAPIFeatureInfoW
-#define PLDAPAPIFeatureInfo PLDAPAPIFeatureInfoW
-#define cldap_open cldap_openW
-#define ldap_open ldap_openW
-#define ldap_bind ldap_bindW
-#define ldap_bind_s ldap_bind_sW
-#define ldap_simple_bind ldap_simple_bindW
-#define ldap_simple_bind_s ldap_simple_bind_sW
-#define ldap_sasl_bind ldap_sasl_bindW
-#define ldap_sasl_bind_s ldap_sasl_bind_sW
-#define ldap_init ldap_initW
-#define ldap_sslinit ldap_sslinitW
-#define ldap_get_option ldap_get_optionW
-#define ldap_set_option ldap_set_optionW
-#define ldap_start_tls_s ldap_start_tls_sW
-#define ldap_add ldap_addW
-#define ldap_add_ext ldap_add_extW
-#define ldap_add_s ldap_add_sW
-#define ldap_add_ext_s ldap_add_ext_sW
-#define ldap_compare ldap_compareW
-#define ldap_compare_ext ldap_compare_extW
-#define ldap_compare_s ldap_compare_sW
-#define ldap_compare_ext_s ldap_compare_ext_sW
-#define ldap_delete ldap_deleteW
-#define ldap_delete_ext ldap_delete_extW
-#define ldap_delete_s ldap_delete_sW
-#define ldap_delete_ext_s ldap_delete_ext_sW
-#define ldap_extended_operation_s ldap_extended_operation_sW
-#define ldap_extended_operation ldap_extended_operationW
-#define ldap_modify ldap_modifyW
-#define ldap_modify_ext ldap_modify_extW
-#define ldap_modify_s ldap_modify_sW
-#define ldap_modify_ext_s ldap_modify_ext_sW
-#define ldap_check_filter ldap_check_filterW
-#define ldap_count_values ldap_count_valuesW
-#define ldap_create_page_control ldap_create_page_controlW
-#define ldap_create_sort_control ldap_create_sort_controlW
-#define ldap_create_vlv_control ldap_create_vlv_controlW
-#define ldap_encode_sort_control ldap_encode_sort_controlW
-#define ldap_escape_filter_element ldap_escape_filter_elementW
-#define ldap_first_attribute ldap_first_attributeW
-#define ldap_next_attribute ldap_next_attributeW
-#define ldap_get_values ldap_get_valuesW
-#define ldap_get_values_len ldap_get_values_lenW
-#define ldap_parse_extended_result ldap_parse_extended_resultW
-#define ldap_parse_page_control ldap_parse_page_controlW
-#define ldap_parse_reference ldap_parse_referenceW
-#define ldap_parse_result ldap_parse_resultW
-#define ldap_parse_sort_control ldap_parse_sort_controlW
-#define ldap_parse_vlv_control ldap_parse_vlv_controlW
-#define ldap_search ldap_searchW
-#define ldap_search_s ldap_search_sW
-#define ldap_search_st ldap_search_stW
-#define ldap_search_ext ldap_search_extW
-#define ldap_search_ext_s ldap_search_ext_sW
-#define ldap_search_init_page ldap_search_init_pageW
-#define ldap_err2string ldap_err2stringW
-#define ldap_control_free ldap_control_freeW
-#define ldap_controls_free ldap_controls_freeW
-#define ldap_free_controls ldap_free_controlsW
-#define ldap_memfree ldap_memfreeW
-#define ldap_value_free ldap_value_freeW
-#define ldap_dn2ufn ldap_dn2ufnW
-#define ldap_ufn2dn ldap_ufn2dnW
-#define ldap_explode_dn ldap_explode_dnW
-#define ldap_get_dn ldap_get_dnW
-#define ldap_modrdn ldap_modrdnW
-#define ldap_modrdn_s ldap_modrdn_sW
-#define ldap_modrdn2 ldap_modrdn2W
-#define ldap_modrdn2_s ldap_modrdn2_sW
-#define ldap_rename ldap_rename_extW
-#define ldap_rename_s ldap_rename_ext_sW
-#define ldap_rename_ext ldap_rename_extW
-#define ldap_rename_ext_s ldap_rename_ext_sW
-#else
-#define LDAPControl LDAPControlA
-#define PLDAPControl PLDAPControlA
-#define LDAPMod LDAPModA
-#define PLDAPMod LDAPModA
-#define LDAPSortKey LDAPSortKeyA
-#define PLDAPSortKey PLDAPSortKeyA
-#define LDAPAPIInfo LDAPAPIInfoA
-#define PLDAPAPIInfo PLDAPAPIInfoA
-#define LDAPAPIFeatureInfo LDAPAPIFeatureInfoA
-#define PLDAPAPIFeatureInfo PLDAPAPIFeatureInfoA
-#define cldap_open cldap_openA
-#define ldap_open ldap_openA
-#define ldap_bind ldap_bindA
-#define ldap_bind_s ldap_bind_sA
-#define ldap_simple_bind ldap_simple_bindA
-#define ldap_simple_bind_s ldap_simple_bind_sA
-#define ldap_sasl_bind ldap_sasl_bindA
-#define ldap_sasl_bind_s ldap_sasl_bind_sA
-#define ldap_init ldap_initA
-#define ldap_sslinit ldap_sslinitA
-#define ldap_get_option ldap_get_optionA
-#define ldap_set_option ldap_set_optionA
-#define ldap_start_tls_s ldap_start_tls_sA
-#define ldap_add ldap_addA
-#define ldap_add_ext ldap_add_extA
-#define ldap_add_s ldap_add_sA
-#define ldap_add_ext_s ldap_add_ext_sA
-#define ldap_compare ldap_compareA
-#define ldap_compare_ext ldap_compare_extA
-#define ldap_compare_s ldap_compare_sA
-#define ldap_compare_ext_s ldap_compare_ext_sA
-#define ldap_delete ldap_deleteA
-#define ldap_delete_ext ldap_delete_extA
-#define ldap_delete_s ldap_delete_sA
-#define ldap_delete_ext_s ldap_delete_ext_sA
-#define ldap_extended_operation_s ldap_extended_operation_sA
-#define ldap_extended_operation ldap_extended_operationA
-#define ldap_modify ldap_modifyA
-#define ldap_modify_ext ldap_modify_extA
-#define ldap_modify_s ldap_modify_sA
-#define ldap_modify_ext_s ldap_modify_ext_sA
-#define ldap_check_filter ldap_check_filterA
-#define ldap_count_values ldap_count_valuesA
-#define ldap_create_page_control ldap_create_page_controlA
-#define ldap_create_sort_control ldap_create_sort_controlA
-#define ldap_create_vlv_control ldap_create_vlv_controlA
-#define ldap_encode_sort_control ldap_encode_sort_controlA
-#define ldap_escape_filter_element ldap_escape_filter_elementA
-#define ldap_first_attribute ldap_first_attributeA
-#define ldap_next_attribute ldap_next_attributeA
-#define ldap_get_values ldap_get_valuesA
-#define ldap_get_values_len ldap_get_values_lenA
-#define ldap_parse_extended_result ldap_parse_extended_resultA
-#define ldap_parse_page_control ldap_parse_page_controlA
-#define ldap_parse_reference ldap_parse_referenceA
-#define ldap_parse_result ldap_parse_resultA
-#define ldap_parse_sort_control ldap_parse_sort_controlA
-#define ldap_parse_vlv_control ldap_parse_vlv_controlA
-#define ldap_search ldap_searchA
-#define ldap_search_s ldap_search_sA
-#define ldap_search_st ldap_search_stA
-#define ldap_search_ext ldap_search_extA
-#define ldap_search_ext_s ldap_search_ext_sA
-#define ldap_search_init_page ldap_search_init_pageA
-#define ldap_err2string ldap_err2stringA
-#define ldap_control_free ldap_control_freeA
-#define ldap_controls_free ldap_controls_freeA
-#define ldap_free_controls ldap_free_controlsA
-#define ldap_memfree ldap_memfreeA
-#define ldap_value_free ldap_value_freeA
-#define ldap_dn2ufn ldap_dn2ufnA
-#define ldap_ufn2dn ldap_ufn2dnA
-#define ldap_explode_dn ldap_explode_dnA
-#define ldap_get_dn ldap_get_dnA
-#define ldap_modrdn ldap_modrdnA
-#define ldap_modrdn_s ldap_modrdn_sA
-#define ldap_modrdn2 ldap_modrdn2A
-#define ldap_modrdn2_s ldap_modrdn2_sA
-#define ldap_rename ldap_rename_extA
-#define ldap_rename_s ldap_rename_ext_sA
-#define ldap_rename_ext ldap_rename_extA
-#define ldap_rename_ext_s ldap_rename_ext_sA
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#include <poppack.h>
-
-#endif /* _WINLDAP_H */
diff --git a/winsup/w32api/include/winnetwk.h b/winsup/w32api/include/winnetwk.h
deleted file mode 100644
index 022bf8b..0000000
--- a/winsup/w32api/include/winnetwk.h
+++ /dev/null
@@ -1,350 +0,0 @@
-#ifndef _WINNETWK_H
-#define _WINNETWK_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define WNNC_NET_MSNET 0x00010000
-#define WNNC_NET_LANMAN 0x00020000
-#define WNNC_NET_NETWARE 0x00030000
-#define WNNC_NET_VINES 0x00040000
-#define WNNC_NET_10NET 0x00050000
-#define WNNC_NET_LOCUS 0x00060000
-#define WNNC_NET_SUN_PC_NFS 0x00070000
-#define WNNC_NET_LANSTEP 0x00080000
-#define WNNC_NET_9TILES 0x00090000
-#define WNNC_NET_LANTASTIC 0x000A0000
-#define WNNC_NET_AS400 0x000B0000
-#define WNNC_NET_FTP_NFS 0x000C0000
-#define WNNC_NET_PATHWORKS 0x000D0000
-#define WNNC_NET_LIFENET 0x000E0000
-#define WNNC_NET_POWERLAN 0x000F0000
-#define WNNC_NET_BWNFS 0x00100000
-#define WNNC_NET_COGENT 0x00110000
-#define WNNC_NET_FARALLON 0x00120000
-#define WNNC_NET_APPLETALK 0x00130000
-#define WNNC_NET_INTERGRAPH 0x00140000
-#define WNNC_NET_SYMFONET 0x00150000
-#define WNNC_NET_CLEARCASE 0x00160000
-#define WNNC_NET_FRONTIER 0x00170000
-#define WNNC_NET_BMC 0x00180000
-#define WNNC_NET_DCE 0x00190000
-#define WNNC_NET_AVID 0x001A0000
-#define WNNC_NET_DOCUSPACE 0x001B0000
-#define WNNC_NET_MANGOSOFT 0x001C0000
-#define WNNC_NET_SERNET 0x001D0000
-#define WNNC_NET_DECORB 0x00200000
-#define WNNC_NET_PROTSTOR 0x00210000
-#define WNNC_NET_FJ_REDIR 0x00220000
-#define WNNC_NET_DISTINCT 0x00230000
-#define WNNC_NET_TWINS 0x00240000
-#define WNNC_NET_RDR2SAMPLE 0x00250000
-#define WNNC_NET_CSC 0x00260000
-#define WNNC_NET_3IN1 0x00270000
-#define WNNC_NET_EXTENDNET 0x00290000
-#define WNNC_NET_OBJECT_DIRE 0x00300000
-#define WNNC_NET_MASFAX 0x00310000
-#define WNNC_NET_HOB_NFS 0x00320000
-#define WNNC_NET_SHIVA 0x00330000
-#define WNNC_NET_IBMAL 0x00340000
-#define WNNC_CRED_MANAGER 0xFFFF0000
-
-#define RESOURCE_CONNECTED 1
-#define RESOURCE_GLOBALNET 2
-#define RESOURCE_REMEMBERED 3
-#define RESOURCE_RECENT 4
-#define RESOURCE_CONTEXT 5
-#define RESOURCETYPE_ANY 0
-#define RESOURCETYPE_DISK 1
-#define RESOURCETYPE_PRINT 2
-#define RESOURCETYPE_RESERVED 8
-#define RESOURCETYPE_UNKNOWN 0xFFFFFFFF
-#define RESOURCEUSAGE_CONNECTABLE 0x00000001
-#define RESOURCEUSAGE_CONTAINER 0x00000002
-#define RESOURCEUSAGE_NOLOCALDEVICE 0x00000004
-#define RESOURCEUSAGE_SIBLING 0x00000008
-#define RESOURCEUSAGE_ATTACHED 0x00000010
-#define RESOURCEUSAGE_ALL (RESOURCEUSAGE_CONNECTABLE | RESOURCEUSAGE_CONTAINER | RESOURCEUSAGE_ATTACHED)
-#define RESOURCEUSAGE_RESERVED 0x80000000
-#define RESOURCEDISPLAYTYPE_GENERIC 0
-#define RESOURCEDISPLAYTYPE_DOMAIN 1
-#define RESOURCEDISPLAYTYPE_SERVER 2
-#define RESOURCEDISPLAYTYPE_SHARE 3
-#define RESOURCEDISPLAYTYPE_FILE 4
-#define RESOURCEDISPLAYTYPE_GROUP 5
-#define RESOURCEDISPLAYTYPE_NETWORK 6
-#define RESOURCEDISPLAYTYPE_ROOT 7
-#define RESOURCEDISPLAYTYPE_SHAREADMIN 8
-#define RESOURCEDISPLAYTYPE_DIRECTORY 9
-#define RESOURCEDISPLAYTYPE_TREE 10
-#define NETPROPERTY_PERSISTENT 1
-#define CONNECT_UPDATE_PROFILE 1
-#define CONNECT_UPDATE_RECENT 2
-#define CONNECT_TEMPORARY 4
-#define CONNECT_INTERACTIVE 8
-#define CONNECT_PROMPT 16
-#define CONNECT_NEED_DRIVE 32
-#define CONNECT_REFCOUNT 64
-#define CONNECT_REDIRECT 128
-#define CONNECT_LOCALDRIVE 256
-#define CONNECT_CURRENT_MEDIA 512
-#define CONNDLG_RO_PATH 1
-#define CONNDLG_CONN_POINT 2
-#define CONNDLG_USE_MRU 4
-#define CONNDLG_HIDE_BOX 8
-#define CONNDLG_PERSIST 16
-#define CONNDLG_NOT_PERSIST 32
-#define DISC_UPDATE_PROFILE 1
-#define DISC_NO_FORCE 64
-#define WNFMT_MULTILINE 1
-#define WNFMT_ABBREVIATED 2
-#define WNFMT_INENUM 16
-#define WNFMT_CONNECTION 32
-#define WN_SUCCESS NO_ERROR
-#define WN_NO_ERROR NO_ERROR
-#define WN_NOT_SUPPORTED ERROR_NOT_SUPPORTED
-#define WN_CANCEL ERROR_CANCELLED
-#define WN_RETRY ERROR_RETRY
-#define WN_NET_ERROR ERROR_UNEXP_NET_ERR
-#define WN_MORE_DATA ERROR_MORE_DATA
-#define WN_BAD_POINTER ERROR_INVALID_ADDRESS
-#define WN_BAD_VALUE ERROR_INVALID_PARAMETER
-#define WN_BAD_USER ERROR_BAD_USERNAME
-#define WN_BAD_PASSWORD ERROR_INVALID_PASSWORD
-#define WN_ACCESS_DENIED ERROR_ACCESS_DENIED
-#define WN_FUNCTION_BUSY ERROR_BUSY
-#define WN_WINDOWS_ERROR ERROR_UNEXP_NET_ERR
-#define WN_OUT_OF_MEMORY ERROR_NOT_ENOUGH_MEMORY
-#define WN_NO_NETWORK ERROR_NO_NETWORK
-#define WN_EXTENDED_ERROR ERROR_EXTENDED_ERROR
-#define WN_BAD_LEVEL ERROR_INVALID_LEVEL
-#define WN_BAD_HANDLE ERROR_INVALID_HANDLE
-#define WN_NOT_INITIALIZING ERROR_ALREADY_INITIALIZED
-#define WN_NO_MORE_DEVICES ERROR_NO_MORE_DEVICES
-#define WN_NOT_CONNECTED ERROR_NOT_CONNECTED
-#define WN_OPEN_FILES ERROR_OPEN_FILES
-#define WN_DEVICE_IN_USE ERROR_DEVICE_IN_USE
-#define WN_BAD_NETNAME ERROR_BAD_NET_NAME
-#define WN_BAD_LOCALNAME ERROR_BAD_DEVICE
-#define WN_ALREADY_CONNECTED ERROR_ALREADY_ASSIGNED
-#define WN_DEVICE_ERROR ERROR_GEN_FAILURE
-#define WN_CONNECTION_CLOSED ERROR_CONNECTION_UNAVAIL
-#define WN_NO_NET_OR_BAD_PATH ERROR_NO_NET_OR_BAD_PATH
-#define WN_BAD_PROVIDER ERROR_BAD_PROVIDER
-#define WN_CANNOT_OPEN_PROFILE ERROR_CANNOT_OPEN_PROFILE
-#define WN_BAD_PROFILE ERROR_BAD_PROFILE
-#define WN_BAD_DEV_TYPE ERROR_BAD_DEV_TYPE
-#define WN_DEVICE_ALREADY_REMEMBERED ERROR_DEVICE_ALREADY_REMEMBERED
-#define WN_NO_MORE_ENTRIES ERROR_NO_MORE_ITEMS
-#define WN_NOT_CONTAINER ERROR_NOT_CONTAINER
-#define WN_NOT_AUTHENTICATED ERROR_NOT_AUTHENTICATED
-#define WN_NOT_LOGGED_ON ERROR_NOT_LOGGED_ON
-#define WN_NOT_VALIDATED ERROR_NO_LOGON_SERVERS
-#define UNIVERSAL_NAME_INFO_LEVEL 1
-#define REMOTE_NAME_INFO_LEVEL 2
-#define NETINFO_DLL16 1
-#define NETINFO_DISKRED 4
-#define NETINFO_PRINTERRED 8
-#define RP_LOGON 1
-#define RP_INIFILE 2
-#define PP_DISPLAYERRORS 1
-#define WNCON_FORNETCARD 1
-#define WNCON_NOTROUTED 2
-#define WNCON_SLOWLINK 4
-#define WNCON_DYNAMIC 8
-
-#ifndef RC_INVOKED
-typedef struct _NETRESOURCEA {
- DWORD dwScope;
- DWORD dwType;
- DWORD dwDisplayType;
- DWORD dwUsage;
- LPSTR lpLocalName;
- LPSTR lpRemoteName;
- LPSTR lpComment ;
- LPSTR lpProvider;
-}NETRESOURCEA,*LPNETRESOURCEA;
-typedef struct _NETRESOURCEW {
- DWORD dwScope;
- DWORD dwType;
- DWORD dwDisplayType;
- DWORD dwUsage;
- LPWSTR lpLocalName;
- LPWSTR lpRemoteName;
- LPWSTR lpComment ;
- LPWSTR lpProvider;
-}NETRESOURCEW,*LPNETRESOURCEW;
-typedef struct _CONNECTDLGSTRUCTA{
- DWORD cbStructure;
- HWND hwndOwner;
- LPNETRESOURCEA lpConnRes;
- DWORD dwFlags;
- DWORD dwDevNum;
-} CONNECTDLGSTRUCTA,*LPCONNECTDLGSTRUCTA;
-typedef struct _CONNECTDLGSTRUCTW{
- DWORD cbStructure;
- HWND hwndOwner;
- LPNETRESOURCEW lpConnRes;
- DWORD dwFlags;
- DWORD dwDevNum;
-} CONNECTDLGSTRUCTW,*LPCONNECTDLGSTRUCTW;
-typedef struct _DISCDLGSTRUCTA{
- DWORD cbStructure;
- HWND hwndOwner;
- LPSTR lpLocalName;
- LPSTR lpRemoteName;
- DWORD dwFlags;
-} DISCDLGSTRUCTA,*LPDISCDLGSTRUCTA;
-typedef struct _DISCDLGSTRUCTW{
- DWORD cbStructure;
- HWND hwndOwner;
- LPWSTR lpLocalName;
- LPWSTR lpRemoteName;
- DWORD dwFlags;
-} DISCDLGSTRUCTW,*LPDISCDLGSTRUCTW;
-typedef struct _UNIVERSAL_NAME_INFOA { LPSTR lpUniversalName; }UNIVERSAL_NAME_INFOA,*LPUNIVERSAL_NAME_INFOA;
-typedef struct _UNIVERSAL_NAME_INFOW { LPWSTR lpUniversalName; }UNIVERSAL_NAME_INFOW,*LPUNIVERSAL_NAME_INFOW;
-typedef struct _REMOTE_NAME_INFOA {
- LPSTR lpUniversalName;
- LPSTR lpConnectionName;
- LPSTR lpRemainingPath;
-}REMOTE_NAME_INFOA,*LPREMOTE_NAME_INFOA;
-typedef struct _REMOTE_NAME_INFOW {
- LPWSTR lpUniversalName;
- LPWSTR lpConnectionName;
- LPWSTR lpRemainingPath;
-}REMOTE_NAME_INFOW,*LPREMOTE_NAME_INFOW;
-typedef struct _NETINFOSTRUCT{
- DWORD cbStructure;
- DWORD dwProviderVersion;
- DWORD dwStatus;
- DWORD dwCharacteristics;
- DWORD dwHandle;
- WORD wNetType;
- DWORD dwPrinters;
- DWORD dwDrives;
-} NETINFOSTRUCT,*LPNETINFOSTRUCT;
-typedef UINT(PASCAL *PFNGETPROFILEPATHA)(LPCSTR,LPSTR,UINT);
-typedef UINT(PASCAL *PFNGETPROFILEPATHW)(LPCWSTR,LPWSTR,UINT);
-typedef UINT(PASCAL *PFNRECONCILEPROFILEA)(LPCSTR,LPCSTR,DWORD);
-typedef UINT(PASCAL *PFNRECONCILEPROFILEW)(LPCWSTR,LPCWSTR,DWORD);
-typedef BOOL(PASCAL *PFNPROCESSPOLICIESA)(HWND,LPCSTR,LPCSTR,LPCSTR,DWORD);
-typedef BOOL(PASCAL *PFNPROCESSPOLICIESW)(HWND,LPCWSTR,LPCWSTR,LPCWSTR,DWORD);
-typedef struct _NETCONNECTINFOSTRUCT{
- DWORD cbStructure;
- DWORD dwFlags;
- DWORD dwSpeed;
- DWORD dwDelay;
- DWORD dwOptDataSize;
-} NETCONNECTINFOSTRUCT,*LPNETCONNECTINFOSTRUCT;
-
-DWORD APIENTRY WNetAddConnectionA(LPCSTR,LPCSTR,LPCSTR);
-DWORD APIENTRY WNetAddConnectionW(LPCWSTR,LPCWSTR,LPCWSTR);
-DWORD APIENTRY WNetAddConnection2A(LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD);
-DWORD APIENTRY WNetAddConnection2W(LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD);
-DWORD APIENTRY WNetAddConnection3A(HWND,LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD);
-DWORD APIENTRY WNetAddConnection3W(HWND,LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD);
-DWORD APIENTRY WNetCancelConnectionA(LPCSTR,BOOL);
-DWORD APIENTRY WNetCancelConnectionW(LPCWSTR,BOOL);
-DWORD APIENTRY WNetCancelConnection2A(LPCSTR,DWORD,BOOL);
-DWORD APIENTRY WNetCancelConnection2W(LPCWSTR,DWORD,BOOL);
-DWORD APIENTRY WNetGetConnectionA(LPCSTR,LPSTR,PDWORD);
-DWORD APIENTRY WNetGetConnectionW(LPCWSTR,LPWSTR,PDWORD);
-DWORD APIENTRY WNetUseConnectionA(HWND,LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD,LPSTR,PDWORD,PDWORD);
-DWORD APIENTRY WNetUseConnectionW(HWND,LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD,LPWSTR,PDWORD,PDWORD);
-DWORD APIENTRY WNetSetConnectionA(LPCSTR,DWORD,PVOID);
-DWORD APIENTRY WNetSetConnectionW(LPCWSTR,DWORD,PVOID);
-DWORD APIENTRY WNetConnectionDialog(HWND,DWORD);
-DWORD APIENTRY WNetDisconnectDialog(HWND,DWORD);
-DWORD APIENTRY WNetConnectionDialog1A(LPCONNECTDLGSTRUCTA);
-DWORD APIENTRY WNetConnectionDialog1W(LPCONNECTDLGSTRUCTW);
-DWORD APIENTRY WNetDisconnectDialog1A(LPDISCDLGSTRUCTA);
-DWORD APIENTRY WNetDisconnectDialog1W(LPDISCDLGSTRUCTW);
-DWORD APIENTRY WNetOpenEnumA(DWORD,DWORD,DWORD,LPNETRESOURCEA,LPHANDLE);
-DWORD APIENTRY WNetOpenEnumW(DWORD,DWORD,DWORD,LPNETRESOURCEW,LPHANDLE);
-DWORD APIENTRY WNetEnumResourceA(HANDLE,PDWORD,PVOID,PDWORD);
-DWORD APIENTRY WNetEnumResourceW(HANDLE,PDWORD,PVOID,PDWORD);
-DWORD APIENTRY WNetCloseEnum(HANDLE);
-DWORD APIENTRY WNetGetUniversalNameA(LPCSTR,DWORD,PVOID,PDWORD);
-DWORD APIENTRY WNetGetUniversalNameW(LPCWSTR,DWORD,PVOID,PDWORD);
-DWORD APIENTRY WNetGetUserA(LPCSTR,LPSTR,PDWORD);
-DWORD APIENTRY WNetGetUserW(LPCWSTR,LPWSTR,PDWORD);
-DWORD APIENTRY WNetGetProviderNameA(DWORD,LPSTR,PDWORD);
-DWORD APIENTRY WNetGetProviderNameW(DWORD,LPWSTR,PDWORD);
-DWORD APIENTRY WNetGetNetworkInformationA(LPCSTR,LPNETINFOSTRUCT);
-DWORD APIENTRY WNetGetNetworkInformationW(LPCWSTR,LPNETINFOSTRUCT);
-DWORD APIENTRY WNetGetResourceInformationA(LPNETRESOURCEA,LPVOID,LPDWORD,LPSTR*);
-DWORD APIENTRY WNetGetResourceInformationW(LPNETRESOURCEW,LPVOID,LPDWORD,LPWSTR*);
-DWORD APIENTRY WNetGetResourceParentA(LPNETRESOURCEA,LPVOID,LPDWORD);
-DWORD APIENTRY WNetGetResourceParentW(LPNETRESOURCEW,LPVOID,LPDWORD);
-DWORD APIENTRY WNetGetLastErrorA(PDWORD,LPSTR,DWORD,LPSTR,DWORD);
-DWORD APIENTRY WNetGetLastErrorW(PDWORD,LPWSTR,DWORD,LPWSTR,DWORD);
-DWORD APIENTRY MultinetGetConnectionPerformanceA(LPNETRESOURCEA,LPNETCONNECTINFOSTRUCT);
-DWORD APIENTRY MultinetGetConnectionPerformanceW(LPNETRESOURCEW,LPNETCONNECTINFOSTRUCT);
-#ifdef UNICODE
-#define PFNPROCESSPOLICIES PFNPROCESSPOLICIESW
-#define PFNRECONCILEPROFILE PFNRECONCILEPROFILEW
-#define PFNGETPROFILEPATH PFNGETPROFILEPATHW
-typedef NETRESOURCEW NETRESOURCE,*LPNETRESOURCE;
-typedef CONNECTDLGSTRUCTW CONNECTDLGSTRUCT,*LPCONNECTDLGSTRUCT;
-typedef DISCDLGSTRUCTW DISCDLGSTRUCT,*LPDISCDLGSTRUCT;
-typedef REMOTE_NAME_INFOW REMOTE_NAME_INFO,*LPREMOTE_NAME_INFO;
-typedef UNIVERSAL_NAME_INFOW UNIVERSAL_NAME_INFO,*LPUNIVERSAL_NAME_INFO;
-#define WNetEnumResource WNetEnumResourceW
-#define WNetOpenEnum WNetOpenEnumW
-#define WNetGetResourceInformation WNetGetResourceInformationW
-#define WNetGetResourceParent WNetGetResourceParentW
-#define WNetGetUniversalName WNetGetUniversalNameW
-#define WNetSetConnection WNetSetConnectionW
-#define WNetUseConnection WNetUseConnectionW
-#define WNetGetConnection WNetGetConnectionW
-#define WNetCancelConnection2 WNetCancelConnection2W
-#define WNetCancelConnection WNetCancelConnectionW
-#define WNetAddConnection3 WNetAddConnection3W
-#define WNetAddConnection2 WNetAddConnection2W
-#define WNetAddConnection WNetAddConnectionW
-#define WNetConnectionDialog1 WNetConnectionDialog1W
-#define WNetDisconnectDialog1 WNetDisconnectDialog1W
-#define WNetGetNetworkInformation WNetGetNetworkInformationW
-#define WNetGetProviderName WNetGetProviderNameW
-#define WNetGetUser WNetGetUserW
-#define MultinetGetConnectionPerformance MultinetGetConnectionPerformanceW
-#define WNetGetLastError WNetGetLastErrorW
-#else
-#define PFNGETPROFILEPATH PFNGETPROFILEPATHA
-#define PFNRECONCILEPROFILE PFNRECONCILEPROFILEA
-#define PFNPROCESSPOLICIES PFNPROCESSPOLICIESA
-typedef NETRESOURCEA NETRESOURCE,*LPNETRESOURCE;
-typedef CONNECTDLGSTRUCTA CONNECTDLGSTRUCT,*LPCONNECTDLGSTRUCT;
-typedef DISCDLGSTRUCTA DISCDLGSTRUCT,*LPDISCDLGSTRUCT;
-typedef UNIVERSAL_NAME_INFOA UNIVERSAL_NAME_INFO,*LPUNIVERSAL_NAME_INFO;
-typedef REMOTE_NAME_INFOA REMOTE_NAME_INFO,*LPREMOTE_NAME_INFO;
-#define WNetOpenEnum WNetOpenEnumA
-#define WNetEnumResource WNetEnumResourceA
-#define WNetGetResourceInformation WNetGetResourceInformationA
-#define WNetGetResourceParent WNetGetResourceParentA
-#define WNetGetUniversalName WNetGetUniversalNameA
-#define WNetConnectionDialog1 WNetConnectionDialog1A
-#define WNetDisconnectDialog1 WNetDisconnectDialog1A
-#define WNetAddConnection2 WNetAddConnection2A
-#define WNetAddConnection3 WNetAddConnection3A
-#define WNetCancelConnection WNetCancelConnectionA
-#define WNetCancelConnection2 WNetCancelConnection2A
-#define WNetGetConnection WNetGetConnectionA
-#define WNetUseConnection WNetUseConnectionA
-#define WNetSetConnection WNetSetConnectionA
-#define WNetAddConnection WNetAddConnectionA
-#define WNetGetUser WNetGetUserA
-#define WNetGetProviderName WNetGetProviderNameA
-#define WNetGetNetworkInformation WNetGetNetworkInformationA
-#define WNetGetLastError WNetGetLastErrorA
-#define MultinetGetConnectionPerformance MultinetGetConnectionPerformanceA
-#endif
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/winnls.h b/winsup/w32api/include/winnls.h
deleted file mode 100644
index 140f9e9..0000000
--- a/winsup/w32api/include/winnls.h
+++ /dev/null
@@ -1,734 +0,0 @@
-#ifndef _WINNLS_H
-#define _WINNLS_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifndef WINBASEAPI
-#ifdef __W32API_USE_DLLIMPORT__
-#define WINBASEAPI DECLSPEC_IMPORT
-#else
-#define WINBASEAPI
-#endif
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define MAX_LEADBYTES 12
-#define MAX_DEFAULTCHAR 2
-#define LOCALE_NOUSEROVERRIDE 0x80000000
-#define LOCALE_USE_CP_ACP 0x40000000
-#if (WINVER >= 0x0400)
-#define LOCALE_RETURN_NUMBER 0x20000000
-#endif
-#define LOCALE_ILANGUAGE 1
-#define LOCALE_SLANGUAGE 2
-#define LOCALE_SENGLANGUAGE 0x1001
-#define LOCALE_SABBREVLANGNAME 3
-#define LOCALE_SNATIVELANGNAME 4
-#define LOCALE_ICOUNTRY 5
-#define LOCALE_SCOUNTRY 6
-#define LOCALE_SENGCOUNTRY 0x1002
-#define LOCALE_SABBREVCTRYNAME 7
-#define LOCALE_SNATIVECTRYNAME 8
-#define LOCALE_IDEFAULTLANGUAGE 9
-#define LOCALE_IDEFAULTCOUNTRY 10
-#define LOCALE_IDEFAULTCODEPAGE 11
-#define LOCALE_IDEFAULTANSICODEPAGE 0x1004
-#define LOCALE_SLIST 12
-#define LOCALE_IMEASURE 13
-#define LOCALE_SDECIMAL 14
-#define LOCALE_STHOUSAND 15
-#define LOCALE_SGROUPING 16
-#define LOCALE_IDIGITS 17
-#define LOCALE_ILZERO 18
-#define LOCALE_INEGNUMBER 0x1010
-#define LOCALE_SNATIVEDIGITS 19
-#define LOCALE_SCURRENCY 20
-#define LOCALE_SINTLSYMBOL 21
-#define LOCALE_SMONDECIMALSEP 22
-#define LOCALE_SMONTHOUSANDSEP 23
-#define LOCALE_SMONGROUPING 24
-#define LOCALE_ICURRDIGITS 25
-#define LOCALE_IINTLCURRDIGITS 26
-#define LOCALE_ICURRENCY 27
-#define LOCALE_INEGCURR 28
-#define LOCALE_SDATE 29
-#define LOCALE_STIME 30
-#define LOCALE_SSHORTDATE 31
-#define LOCALE_SLONGDATE 32
-#define LOCALE_STIMEFORMAT 0x1003
-#define LOCALE_IDATE 33
-#define LOCALE_ILDATE 34
-#define LOCALE_ITIME 35
-#define LOCALE_ITIMEMARKPOSN 0x1005
-#define LOCALE_ICENTURY 36
-#define LOCALE_ITLZERO 37
-#define LOCALE_IDAYLZERO 38
-#define LOCALE_IMONLZERO 39
-#define LOCALE_S1159 40
-#define LOCALE_S2359 41
-#define LOCALE_ICALENDARTYPE 0x1009
-#define LOCALE_IOPTIONALCALENDAR 0x100B
-#define LOCALE_IFIRSTDAYOFWEEK 0x100C
-#define LOCALE_IFIRSTWEEKOFYEAR 0x100D
-#define LOCALE_SDAYNAME1 42
-#define LOCALE_SDAYNAME2 43
-#define LOCALE_SDAYNAME3 44
-#define LOCALE_SDAYNAME4 45
-#define LOCALE_SDAYNAME5 46
-#define LOCALE_SDAYNAME6 47
-#define LOCALE_SDAYNAME7 48
-#define LOCALE_SABBREVDAYNAME1 49
-#define LOCALE_SABBREVDAYNAME2 50
-#define LOCALE_SABBREVDAYNAME3 51
-#define LOCALE_SABBREVDAYNAME4 52
-#define LOCALE_SABBREVDAYNAME5 53
-#define LOCALE_SABBREVDAYNAME6 54
-#define LOCALE_SABBREVDAYNAME7 55
-#define LOCALE_SMONTHNAME1 56
-#define LOCALE_SMONTHNAME2 57
-#define LOCALE_SMONTHNAME3 58
-#define LOCALE_SMONTHNAME4 59
-#define LOCALE_SMONTHNAME5 60
-#define LOCALE_SMONTHNAME6 61
-#define LOCALE_SMONTHNAME7 62
-#define LOCALE_SMONTHNAME8 63
-#define LOCALE_SMONTHNAME9 64
-#define LOCALE_SMONTHNAME10 65
-#define LOCALE_SMONTHNAME11 66
-#define LOCALE_SMONTHNAME12 67
-#define LOCALE_SMONTHNAME13 0x100E
-#define LOCALE_SABBREVMONTHNAME1 68
-#define LOCALE_SABBREVMONTHNAME2 69
-#define LOCALE_SABBREVMONTHNAME3 70
-#define LOCALE_SABBREVMONTHNAME4 71
-#define LOCALE_SABBREVMONTHNAME5 72
-#define LOCALE_SABBREVMONTHNAME6 73
-#define LOCALE_SABBREVMONTHNAME7 74
-#define LOCALE_SABBREVMONTHNAME8 75
-#define LOCALE_SABBREVMONTHNAME9 76
-#define LOCALE_SABBREVMONTHNAME10 77
-#define LOCALE_SABBREVMONTHNAME11 78
-#define LOCALE_SABBREVMONTHNAME12 79
-#define LOCALE_SABBREVMONTHNAME13 0x100F
-#define LOCALE_SPOSITIVESIGN 80
-#define LOCALE_SNEGATIVESIGN 81
-#define LOCALE_IPOSSIGNPOSN 82
-#define LOCALE_INEGSIGNPOSN 83
-#define LOCALE_IPOSSYMPRECEDES 84
-#define LOCALE_IPOSSEPBYSPACE 85
-#define LOCALE_INEGSYMPRECEDES 86
-#define LOCALE_INEGSEPBYSPACE 87
-#define LOCALE_FONTSIGNATURE 88
-#define LOCALE_SISO639LANGNAME 89
-#define LOCALE_SISO3166CTRYNAME 90
-#define LOCALE_SYSTEM_DEFAULT 0x800
-#define LOCALE_USER_DEFAULT 0x400
-#define NORM_IGNORECASE 1
-#define NORM_IGNOREKANATYPE 65536
-#define NORM_IGNORENONSPACE 2
-#define NORM_IGNORESYMBOLS 4
-#define NORM_IGNOREWIDTH 131072
-#define SORT_STRINGSORT 4096
-#define LCMAP_LOWERCASE 0x00000100
-#define LCMAP_UPPERCASE 0x00000200
-#define LCMAP_SORTKEY 0x00000400
-#define LCMAP_BYTEREV 0x00000800
-#define LCMAP_HIRAGANA 0x00100000
-#define LCMAP_KATAKANA 0x00200000
-#define LCMAP_HALFWIDTH 0x00400000
-#define LCMAP_FULLWIDTH 0x00800000
-#define LCMAP_LINGUISTIC_CASING 0x01000000
-#define LCMAP_SIMPLIFIED_CHINESE 0x02000000
-#define LCMAP_TRADITIONAL_CHINESE 0x04000000
-#define ENUM_ALL_CALENDARS (-1)
-#define DATE_SHORTDATE 1
-#define DATE_LONGDATE 2
-#define DATE_USE_ALT_CALENDAR 4
-#define CP_INSTALLED 1
-#define CP_SUPPORTED 2
-#define LCID_INSTALLED 1
-#define LCID_SUPPORTED 2
-#define LCID_ALTERNATE_SORTS 4
-#define MAP_FOLDCZONE 16
-#define MAP_FOLDDIGITS 128
-#define MAP_PRECOMPOSED 32
-#define MAP_COMPOSITE 64
-#define CP_ACP 0
-#define CP_OEMCP 1
-#define CP_MACCP 2
-#define CP_THREAD_ACP 3
-#define CP_SYMBOL 42
-#define CP_UTF7 65000
-#define CP_UTF8 65001
-#define CT_CTYPE1 1
-#define CT_CTYPE2 2
-#define CT_CTYPE3 4
-#define C1_UPPER 1
-#define C1_LOWER 2
-#define C1_DIGIT 4
-#define C1_SPACE 8
-#define C1_PUNCT 16
-#define C1_CNTRL 32
-#define C1_BLANK 64
-#define C1_XDIGIT 128
-#define C1_ALPHA 256
-#define C2_LEFTTORIGHT 1
-#define C2_RIGHTTOLEFT 2
-#define C2_EUROPENUMBER 3
-#define C2_EUROPESEPARATOR 4
-#define C2_EUROPETERMINATOR 5
-#define C2_ARABICNUMBER 6
-#define C2_COMMONSEPARATOR 7
-#define C2_BLOCKSEPARATOR 8
-#define C2_SEGMENTSEPARATOR 9
-#define C2_WHITESPACE 10
-#define C2_OTHERNEUTRAL 11
-#define C2_NOTAPPLICABLE 0
-#define C3_NONSPACING 1
-#define C3_DIACRITIC 2
-#define C3_VOWELMARK 4
-#define C3_SYMBOL 8
-#define C3_KATAKANA 16
-#define C3_HIRAGANA 32
-#define C3_HALFWIDTH 64
-#define C3_FULLWIDTH 128
-#define C3_IDEOGRAPH 256
-#define C3_KASHIDA 512
-#define C3_LEXICAL 1024
-#define C3_ALPHA 32768
-#define C3_NOTAPPLICABLE 0
-#define TIME_NOMINUTESORSECONDS 1
-#define TIME_NOSECONDS 2
-#define TIME_NOTIMEMARKER 4
-#define TIME_FORCE24HOURFORMAT 8
-#define MB_PRECOMPOSED 1
-#define MB_COMPOSITE 2
-#define MB_ERR_INVALID_CHARS 8
-#define MB_USEGLYPHCHARS 4
-#define WC_COMPOSITECHECK 512
-#define WC_DISCARDNS 16
-#define WC_SEPCHARS 32
-#define WC_DEFAULTCHAR 64
-#define CTRY_DEFAULT 0
-#define CTRY_ALBANIA 355
-#define CTRY_ALGERIA 213
-#define CTRY_ARGENTINA 54
-#define CTRY_ARMENIA 374
-#define CTRY_AUSTRALIA 61
-#define CTRY_AUSTRIA 43
-#define CTRY_AZERBAIJAN 994
-#define CTRY_BAHRAIN 973
-#define CTRY_BELARUS 375
-#define CTRY_BELGIUM 32
-#define CTRY_BELIZE 501
-#define CTRY_BOLIVIA 591
-#define CTRY_BRAZIL 55
-#define CTRY_BRUNEI_DARUSSALAM 673
-#define CTRY_BULGARIA 359
-#define CTRY_CANADA 2
-#define CTRY_CARIBBEAN 1
-#define CTRY_CHILE 56
-#define CTRY_COLOMBIA 57
-#define CTRY_COSTA_RICA 506
-#define CTRY_CROATIA 385
-#define CTRY_CZECH 420
-#define CTRY_DENMARK 45
-#define CTRY_DOMINICAN_REPUBLIC 1
-#define CTRY_ECUADOR 593
-#define CTRY_EGYPT 20
-#define CTRY_EL_SALVADOR 503
-#define CTRY_ESTONIA 372
-#define CTRY_FAEROE_ISLANDS 298
-#define CTRY_FINLAND 358
-#define CTRY_FRANCE 33
-#define CTRY_GEORGIA 995
-#define CTRY_GERMANY 49
-#define CTRY_GREECE 30
-#define CTRY_GUATEMALA 502
-#define CTRY_HONDURAS 504
-#define CTRY_HONG_KONG 852
-#define CTRY_HUNGARY 36
-#define CTRY_ICELAND 354
-#define CTRY_INDIA 91
-#define CTRY_INDONESIA 62
-#define CTRY_IRAN 981
-#define CTRY_IRAQ 964
-#define CTRY_IRELAND 353
-#define CTRY_ISRAEL 972
-#define CTRY_ITALY 39
-#define CTRY_JAMAICA 1
-#define CTRY_JAPAN 81
-#define CTRY_JORDAN 962
-#define CTRY_KAZAKSTAN 7
-#define CTRY_KENYA 254
-#define CTRY_KUWAIT 965
-#define CTRY_KYRGYZSTAN 996
-#define CTRY_LATVIA 371
-#define CTRY_LEBANON 961
-#define CTRY_LIBYA 218
-#define CTRY_LIECHTENSTEIN 41
-#define CTRY_LITHUANIA 370
-#define CTRY_LUXEMBOURG 352
-#define CTRY_MACAU 853
-#define CTRY_MACEDONIA 389
-#define CTRY_MALAYSIA 60
-#define CTRY_MALDIVES 960
-#define CTRY_MEXICO 52
-#define CTRY_MONACO 33
-#define CTRY_MONGOLIA 976
-#define CTRY_MOROCCO 212
-#define CTRY_NETHERLANDS 31
-#define CTRY_NEW_ZEALAND 64
-#define CTRY_NICARAGUA 505
-#define CTRY_NORWAY 47
-#define CTRY_OMAN 968
-#define CTRY_PAKISTAN 92
-#define CTRY_PANAMA 507
-#define CTRY_PARAGUAY 595
-#define CTRY_PERU 51
-#define CTRY_PHILIPPINES 63
-#define CTRY_POLAND 48
-#define CTRY_PORTUGAL 351
-#define CTRY_PRCHINA 86
-#define CTRY_PUERTO_RICO 1
-#define CTRY_QATAR 974
-#define CTRY_ROMANIA 40
-#define CTRY_RUSSIA 7
-#define CTRY_SAUDI_ARABIA 966
-#define CTRY_SERBIA 381
-#define CTRY_SINGAPORE 65
-#define CTRY_SLOVAK 421
-#define CTRY_SLOVENIA 386
-#define CTRY_SOUTH_AFRICA 27
-#define CTRY_SOUTH_KOREA 82
-#define CTRY_SPAIN 34
-#define CTRY_SWEDEN 46
-#define CTRY_SWITZERLAND 41
-#define CTRY_SYRIA 963
-#define CTRY_TAIWAN 886
-#define CTRY_TATARSTAN 7
-#define CTRY_THAILAND 66
-#define CTRY_TRINIDAD_Y_TOBAGO 1
-#define CTRY_TUNISIA 216
-#define CTRY_TURKEY 90
-#define CTRY_UAE 971
-#define CTRY_UKRAINE 380
-#define CTRY_UNITED_KINGDOM 44
-#define CTRY_UNITED_STATES 1
-#define CTRY_URUGUAY 598
-#define CTRY_UZBEKISTAN 7
-#define CTRY_VENEZUELA 58
-#define CTRY_VIET_NAM 84
-#define CTRY_YEMEN 967
-#define CTRY_ZIMBABWE 263
-#define CAL_ICALINTVALUE 1
-#define CAL_SCALNAME 2
-#define CAL_IYEAROFFSETRANGE 3
-#define CAL_SERASTRING 4
-#define CAL_SSHORTDATE 5
-#define CAL_SLONGDATE 6
-#define CAL_SDAYNAME1 7
-#define CAL_SDAYNAME2 8
-#define CAL_SDAYNAME3 9
-#define CAL_SDAYNAME4 10
-#define CAL_SDAYNAME5 11
-#define CAL_SDAYNAME6 12
-#define CAL_SDAYNAME7 13
-#define CAL_SABBREVDAYNAME1 14
-#define CAL_SABBREVDAYNAME2 15
-#define CAL_SABBREVDAYNAME3 16
-#define CAL_SABBREVDAYNAME4 17
-#define CAL_SABBREVDAYNAME5 18
-#define CAL_SABBREVDAYNAME6 19
-#define CAL_SABBREVDAYNAME7 20
-#define CAL_SMONTHNAME1 21
-#define CAL_SMONTHNAME2 22
-#define CAL_SMONTHNAME3 23
-#define CAL_SMONTHNAME4 24
-#define CAL_SMONTHNAME5 25
-#define CAL_SMONTHNAME6 26
-#define CAL_SMONTHNAME7 27
-#define CAL_SMONTHNAME8 28
-#define CAL_SMONTHNAME9 29
-#define CAL_SMONTHNAME10 30
-#define CAL_SMONTHNAME11 31
-#define CAL_SMONTHNAME12 32
-#define CAL_SMONTHNAME13 33
-#define CAL_SABBREVMONTHNAME1 34
-#define CAL_SABBREVMONTHNAME2 35
-#define CAL_SABBREVMONTHNAME3 36
-#define CAL_SABBREVMONTHNAME4 37
-#define CAL_SABBREVMONTHNAME5 38
-#define CAL_SABBREVMONTHNAME6 39
-#define CAL_SABBREVMONTHNAME7 40
-#define CAL_SABBREVMONTHNAME8 41
-#define CAL_SABBREVMONTHNAME9 42
-#define CAL_SABBREVMONTHNAME10 43
-#define CAL_SABBREVMONTHNAME11 44
-#define CAL_SABBREVMONTHNAME12 45
-#define CAL_SABBREVMONTHNAME13 46
-#define CAL_GREGORIAN 1
-#define CAL_GREGORIAN_US 2
-#define CAL_JAPAN 3
-#define CAL_TAIWAN 4
-#define CAL_KOREA 5
-#define CAL_HIJRI 6
-#define CAL_THAI 7
-#define CAL_HEBREW 8
-#define CAL_GREGORIAN_ME_FRENCH 9
-#define CAL_GREGORIAN_ARABIC 10
-#define CAL_GREGORIAN_XLIT_ENGLISH 11
-#define CAL_GREGORIAN_XLIT_FRENCH 12
-#define CSTR_LESS_THAN 1
-#define CSTR_EQUAL 2
-#define CSTR_GREATER_THAN 3
-#define LGRPID_INSTALLED 1
-#define LGRPID_SUPPORTED 2
-#define LGRPID_WESTERN_EUROPE 1
-#define LGRPID_CENTRAL_EUROPE 2
-#define LGRPID_BALTIC 3
-#define LGRPID_GREEK 4
-#define LGRPID_CYRILLIC 5
-#define LGRPID_TURKISH 6
-#define LGRPID_JAPANESE 7
-#define LGRPID_KOREAN 8
-#define LGRPID_TRADITIONAL_CHINESE 9
-#define LGRPID_SIMPLIFIED_CHINESE 10
-#define LGRPID_THAI 11
-#define LGRPID_HEBREW 12
-#define LGRPID_ARABIC 13
-#define LGRPID_VIETNAMESE 14
-#define LGRPID_INDIC 15
-#define LGRPID_GEORGIAN 16
-#define LGRPID_ARMENIAN 17
-#if (WINVER >= 0x0410)
-#define CAL_SYEARMONTH 47
-#define CAL_ITWODIGITYEARMAX 48
-#define CAL_NOUSEROVERRIDE LOCALE_NOUSEROVERRIDE
-#define CAL_RETURN_NUMBER LOCALE_RETURN_NUMBER
-#define CAL_USE_CP_ACP LOCALE_USE_CP_ACP
-#define LOCALE_SYEARMONTH 0x1006
-#define LOCALE_SENGCURRNAME 0x1007
-#define LOCALE_SNATIVECURRNAME 0x1008
-#define LOCALE_SSORTNAME 0x1013
-#endif /* (WINVER >= 0x0410) */
-#if (WINVER >= 0x0500)
-#define LOCALE_IDEFAULTEBCDICCODEPAGE 0x1012
-#define LOCALE_IDIGITSUBSTITUTION 0x1014
-#define LOCALE_IPAPERSIZE 0x100A
-#define DATE_YEARMONTH 8
-#define DATE_LTRREADING 16
-#define DATE_RTLREADING 32
-#define MAP_EXPAND_LIGATURES 0x2000
-#define WC_NO_BEST_FIT_CHARS 1024
-#endif /* (WINVER >= 0x0500) */
-#if (WINVER >= 0x0600)
-/*#define CAL_SSHORTESTDAYNAME1 */
-/*#define CAL_SSHORTESTDAYNAME2 */
-/*#define CAL_SSHORTESTDAYNAME3 */
-/*#define CAL_SSHORTESTDAYNAME4 */
-/*#define CAL_SSHORTESTDAYNAME5 */
-/*#define CAL_SSHORTESTDAYNAME6 */
-/*#define CAL_SSHORTESTDAYNAME7 */
-#define CAL_UMALQURA 23
-/*#define LOCALE_SDURATION */
-/*#define LOCALE_SIETFLANGUAGE */
-/*#define LOCALE_SISO3166CTRYNAME2 */
-/*#define LOCALE_SISO639LANGNAME2 */
-/*#define LOCALE_SKEYBOARDSTOINSTALL */
-/*#define LOCALE_SNAME */
-/*#define LOCALE_SNAN */
-/*#define LOCALE_SNEGINFINITY */
-/*#define LOCALE_SPOSINFINITY */
-/*#define LOCALE_SSCRIPTS */
-#endif /* (WINVER >= 0x0600) */
-#ifndef _BASETSD_H
-typedef long LONG_PTR;
-#endif
-
-#ifndef RC_INVOKED
-typedef DWORD LCTYPE;
-typedef DWORD CALTYPE;
-typedef DWORD CALID;
-typedef DWORD LGRPID;
-typedef DWORD GEOID;
-typedef DWORD GEOTYPE;
-typedef DWORD GEOCLASS;
-typedef BOOL (CALLBACK *CALINFO_ENUMPROCA)(LPSTR);
-typedef BOOL (CALLBACK *CALINFO_ENUMPROCW)(LPWSTR);
-typedef BOOL (CALLBACK *CALINFO_ENUMPROCEXA)(LPSTR, CALID);
-typedef BOOL (CALLBACK *CALINFO_ENUMPROCEXW)(LPWSTR, CALID);
-typedef BOOL (CALLBACK *LANGUAGEGROUP_ENUMPROCA)(LGRPID, LPSTR, LPSTR, DWORD, LONG_PTR);
-typedef BOOL (CALLBACK *LANGUAGEGROUP_ENUMPROCW)(LGRPID, LPWSTR, LPWSTR, DWORD, LONG_PTR);
-typedef BOOL (CALLBACK *LANGGROUPLOCALE_ENUMPROCA)(LGRPID, LCID, LPSTR, LONG_PTR);
-typedef BOOL (CALLBACK *LANGGROUPLOCALE_ENUMPROCW)(LGRPID, LCID, LPWSTR, LONG_PTR);
-typedef BOOL (CALLBACK *UILANGUAGE_ENUMPROCW)(LPWSTR, LONG_PTR);
-typedef BOOL (CALLBACK *UILANGUAGE_ENUMPROCA)(LPSTR, LONG_PTR);
-typedef BOOL (CALLBACK *LOCALE_ENUMPROCA)(LPSTR);
-typedef BOOL (CALLBACK *LOCALE_ENUMPROCW)(LPWSTR);
-typedef BOOL (CALLBACK *CODEPAGE_ENUMPROCA)(LPSTR);
-typedef BOOL (CALLBACK *CODEPAGE_ENUMPROCW)(LPWSTR);
-typedef BOOL (CALLBACK *DATEFMT_ENUMPROCA)(LPSTR);
-typedef BOOL (CALLBACK *DATEFMT_ENUMPROCW)(LPWSTR);
-typedef BOOL (CALLBACK *DATEFMT_ENUMPROCEXA)(LPSTR, CALID);
-typedef BOOL (CALLBACK *DATEFMT_ENUMPROCEXW)(LPWSTR, CALID);
-typedef BOOL (CALLBACK *TIMEFMT_ENUMPROCA)(LPSTR);
-typedef BOOL (CALLBACK *TIMEFMT_ENUMPROCW)(LPWSTR);
-typedef BOOL (CALLBACK *GEO_ENUMPROC)(GEOID);
-
-enum NLS_FUNCTION {
- COMPARE_STRING = 0x0001
-};
-typedef enum NLS_FUNCTION NLS_FUNCTION;
-enum SYSGEOCLASS {
- GEOCLASS_NATION = 16,
- GEOCLASS_REGION = 14
-};
-enum SYSGEOTYPE {
- GEO_NATION = 0x0001,
- GEO_LATITUDE = 0x0002,
- GEO_LONGITUDE = 0x0003,
- GEO_ISO2 = 0x0004,
- GEO_ISO3 = 0x0005,
- GEO_RFC1766 = 0x0006,
- GEO_LCID = 0x0007,
- GEO_FRIENDLYNAME = 0x0008,
- GEO_OFFICIALNAME = 0x0009,
- GEO_TIMEZONES = 0x000a,
- GEO_OFFICIALLANGUAGES = 0x000a
-};
-
-typedef struct _cpinfo {
- UINT MaxCharSize;
- BYTE DefaultChar[MAX_DEFAULTCHAR];
- BYTE LeadByte[MAX_LEADBYTES];
-} CPINFO,*LPCPINFO;
-typedef struct _cpinfoexA {
- UINT MaxCharSize;
- BYTE DefaultChar[MAX_DEFAULTCHAR];
- BYTE LeadByte[MAX_LEADBYTES];
- WCHAR UnicodeDefaultChar;
- UINT CodePage;
- CHAR CodePageName[MAX_PATH];
-} CPINFOEXA,*LPCPINFOEXA;
-typedef struct _cpinfoexW {
- UINT MaxCharSize;
- BYTE DefaultChar[MAX_DEFAULTCHAR];
- BYTE LeadByte[MAX_LEADBYTES];
- WCHAR UnicodeDefaultChar;
- UINT CodePage;
- WCHAR CodePageName[MAX_PATH];
-} CPINFOEXW,*LPCPINFOEXW;
-typedef struct _currencyfmtA {
- UINT NumDigits;
- UINT LeadingZero;
- UINT Grouping;
- LPSTR lpDecimalSep;
- LPSTR lpThousandSep;
- UINT NegativeOrder;
- UINT PositiveOrder;
- LPSTR lpCurrencySymbol;
-} CURRENCYFMTA,*LPCURRENCYFMTA;
-typedef struct _currencyfmtW {
- UINT NumDigits;
- UINT LeadingZero;
- UINT Grouping;
- LPWSTR lpDecimalSep;
- LPWSTR lpThousandSep;
- UINT NegativeOrder;
- UINT PositiveOrder;
- LPWSTR lpCurrencySymbol;
-} CURRENCYFMTW,*LPCURRENCYFMTW;
-typedef struct nlsversioninfo {
- DWORD dwNLSVersionInfoSize;
- DWORD dwNLSVersion;
- DWORD dwDefinedVersion;
-} NLSVERSIONINFO,*LPNLSVERSIONINFO;
-typedef struct _numberfmtA {
- UINT NumDigits;
- UINT LeadingZero;
- UINT Grouping;
- LPSTR lpDecimalSep;
- LPSTR lpThousandSep;
- UINT NegativeOrder;
-} NUMBERFMTA,*LPNUMBERFMTA;
-typedef struct _numberfmtW {
- UINT NumDigits;
- UINT LeadingZero;
- UINT Grouping;
- LPWSTR lpDecimalSep;
- LPWSTR lpThousandSep;
- UINT NegativeOrder;
-} NUMBERFMTW,*LPNUMBERFMTW;
-
-WINBASEAPI int WINAPI CompareStringA(LCID,DWORD,LPCSTR,int,LPCSTR,int);
-WINBASEAPI int WINAPI CompareStringW(LCID,DWORD,LPCWSTR,int,LPCWSTR,int);
-WINBASEAPI LCID WINAPI ConvertDefaultLocale(LCID);
-WINBASEAPI BOOL WINAPI EnumCalendarInfoA(CALINFO_ENUMPROCA,LCID,CALID,CALTYPE);
-WINBASEAPI BOOL WINAPI EnumCalendarInfoW(CALINFO_ENUMPROCW,LCID,CALID,CALTYPE);
-WINBASEAPI BOOL WINAPI EnumDateFormatsA(DATEFMT_ENUMPROCA,LCID,DWORD);
-WINBASEAPI BOOL WINAPI EnumDateFormatsW(DATEFMT_ENUMPROCW,LCID,DWORD);
-WINBASEAPI BOOL WINAPI EnumSystemCodePagesA(CODEPAGE_ENUMPROCA,DWORD);
-WINBASEAPI BOOL WINAPI EnumSystemCodePagesW(CODEPAGE_ENUMPROCW,DWORD);
-WINBASEAPI BOOL WINAPI EnumSystemGeoID(GEOCLASS,GEOID,GEO_ENUMPROC);
-WINBASEAPI BOOL WINAPI EnumSystemLocalesA(LOCALE_ENUMPROCA,DWORD);
-WINBASEAPI BOOL WINAPI EnumSystemLocalesW(LOCALE_ENUMPROCW,DWORD);
-WINBASEAPI BOOL WINAPI EnumTimeFormatsA(TIMEFMT_ENUMPROCA,LCID,DWORD);
-WINBASEAPI BOOL WINAPI EnumTimeFormatsW(TIMEFMT_ENUMPROCW,LCID,DWORD);
-WINBASEAPI int WINAPI FoldStringA(DWORD,LPCSTR,int,LPSTR,int);
-WINBASEAPI int WINAPI FoldStringW(DWORD,LPCWSTR,int,LPWSTR,int);
-WINBASEAPI UINT WINAPI GetACP(void);
-WINBASEAPI int WINAPI GetCalendarInfoA(LCID,CALID,CALTYPE,LPSTR,int,LPDWORD);
-WINBASEAPI int WINAPI GetCalendarInfoW(LCID,CALID,CALTYPE,LPWSTR,int,LPDWORD);
-WINBASEAPI BOOL WINAPI GetCPInfo(UINT,LPCPINFO);
-WINBASEAPI BOOL WINAPI GetCPInfoExA(UINT,DWORD,LPCPINFOEXA);
-WINBASEAPI BOOL WINAPI GetCPInfoExW(UINT,DWORD,LPCPINFOEXW);
-WINBASEAPI int WINAPI GetCurrencyFormatA(LCID,DWORD,LPCSTR,const CURRENCYFMTA*,LPSTR,int);
-WINBASEAPI int WINAPI GetCurrencyFormatW(LCID,DWORD,LPCWSTR,const CURRENCYFMTW*,LPWSTR,int);
-WINBASEAPI int WINAPI GetDateFormatA(LCID,DWORD,const SYSTEMTIME*,LPCSTR,LPSTR,int);
-WINBASEAPI int WINAPI GetDateFormatW(LCID,DWORD,const SYSTEMTIME*,LPCWSTR,LPWSTR,int);
-WINBASEAPI int WINAPI GetGeoInfoA(GEOID,GEOTYPE,LPSTR,int,LANGID);
-WINBASEAPI int WINAPI GetGeoInfoW(GEOID,GEOTYPE,LPWSTR,int,LANGID);
-WINBASEAPI int WINAPI GetLocaleInfoA(LCID,LCTYPE,LPSTR,int);
-WINBASEAPI int WINAPI GetLocaleInfoW(LCID,LCTYPE,LPWSTR,int);
-WINBASEAPI BOOL WINAPI GetNLSVersion(NLS_FUNCTION,LCID,LPNLSVERSIONINFO);
-WINBASEAPI int WINAPI GetNumberFormatA(LCID,DWORD,LPCSTR,const NUMBERFMTA*,LPSTR,int);
-WINBASEAPI int WINAPI GetNumberFormatW(LCID,DWORD,LPCWSTR,const NUMBERFMTW*,LPWSTR,int);
-WINBASEAPI UINT WINAPI GetOEMCP(void);
-WINBASEAPI BOOL WINAPI GetStringTypeA(LCID,DWORD,LPCSTR,int,LPWORD);
-WINBASEAPI BOOL WINAPI GetStringTypeW(DWORD,LPCWSTR,int,LPWORD);
-WINBASEAPI BOOL WINAPI GetStringTypeExA(LCID,DWORD,LPCSTR,int,LPWORD);
-WINBASEAPI BOOL WINAPI GetStringTypeExW(LCID,DWORD,LPCWSTR,int,LPWORD);
-WINBASEAPI LANGID WINAPI GetSystemDefaultLangID(void);
-WINBASEAPI LCID WINAPI GetSystemDefaultLCID(void);
-WINBASEAPI LCID WINAPI GetThreadLocale(void);
-WINBASEAPI int WINAPI GetTimeFormatA(LCID,DWORD,const SYSTEMTIME*,LPCSTR,LPSTR,int);
-WINBASEAPI int WINAPI GetTimeFormatW(LCID,DWORD,const SYSTEMTIME*,LPCWSTR,LPWSTR,int);
-WINBASEAPI LANGID WINAPI GetUserDefaultLangID(void);
-WINBASEAPI LCID WINAPI GetUserDefaultLCID(void);
-WINBASEAPI GEOID WINAPI GetUserGeoID(GEOCLASS);
-WINBASEAPI BOOL WINAPI IsDBCSLeadByte(BYTE);
-WINBASEAPI BOOL WINAPI IsDBCSLeadByteEx(UINT,BYTE);
-WINBASEAPI BOOL WINAPI IsNLSDefinedString(NLS_FUNCTION,DWORD,LPNLSVERSIONINFO,LPCWSTR,int);
-WINBASEAPI BOOL WINAPI IsValidCodePage(UINT);
-WINBASEAPI BOOL WINAPI IsValidLocale(LCID,DWORD);
-WINBASEAPI int WINAPI LCMapStringA(LCID,DWORD,LPCSTR,int,LPSTR,int);
-WINBASEAPI int WINAPI LCMapStringW(LCID,DWORD,LPCWSTR,int,LPWSTR,int);
-WINBASEAPI int WINAPI MultiByteToWideChar(UINT,DWORD,LPCSTR,int,LPWSTR,int);
-WINBASEAPI int WINAPI SetCalendarInfoA(LCID,CALID,CALTYPE,LPCSTR);
-WINBASEAPI int WINAPI SetCalendarInfoW(LCID,CALID,CALTYPE,LPCWSTR);
-WINBASEAPI BOOL WINAPI SetLocaleInfoA(LCID,LCTYPE,LPCSTR);
-WINBASEAPI BOOL WINAPI SetLocaleInfoW(LCID,LCTYPE,LPCWSTR);
-WINBASEAPI BOOL WINAPI SetThreadLocale(LCID);
-WINBASEAPI BOOL WINAPI SetUserGeoID(GEOID);
-WINBASEAPI int WINAPI WideCharToMultiByte(UINT,DWORD,LPCWSTR,int,LPSTR,int,LPCSTR,LPBOOL);
-#if (WINVER >= 0x0500)
-WINBASEAPI BOOL WINAPI EnumCalendarInfoExA(CALINFO_ENUMPROCEXA,LCID,CALID,CALTYPE);
-WINBASEAPI BOOL WINAPI EnumCalendarInfoExW(CALINFO_ENUMPROCEXW,LCID,CALID,CALTYPE);
-WINBASEAPI BOOL WINAPI EnumDateFormatsExA(DATEFMT_ENUMPROCEXA,LCID,DWORD);
-WINBASEAPI BOOL WINAPI EnumDateFormatsExW(DATEFMT_ENUMPROCEXW,LCID,DWORD);
-WINBASEAPI BOOL WINAPI EnumSystemLanguageGroupsA(LANGUAGEGROUP_ENUMPROCA,DWORD,LONG_PTR);
-WINBASEAPI BOOL WINAPI EnumSystemLanguageGroupsW(LANGUAGEGROUP_ENUMPROCW,DWORD,LONG_PTR);
-WINBASEAPI BOOL WINAPI EnumLanguageGroupLocalesA(LANGGROUPLOCALE_ENUMPROCA,LGRPID,DWORD,LONG_PTR);
-WINBASEAPI BOOL WINAPI EnumLanguageGroupLocalesW(LANGGROUPLOCALE_ENUMPROCW,LGRPID,DWORD,LONG_PTR);
-WINBASEAPI BOOL WINAPI EnumUILanguagesA(UILANGUAGE_ENUMPROCA,DWORD,LONG_PTR);
-WINBASEAPI BOOL WINAPI EnumUILanguagesW(UILANGUAGE_ENUMPROCW,DWORD,LONG_PTR);
-WINBASEAPI LANGID WINAPI GetSystemDefaultUILanguage(void);
-WINBASEAPI LANGID WINAPI GetUserDefaultUILanguage(void);
-WINBASEAPI BOOL WINAPI IsValidLanguageGroup(LGRPID,DWORD);
-#endif /* (WINVER >= 0x0500) */
-
-#ifdef UNICODE
-#define CALINFO_ENUMPROC CALINFO_ENUMPROCW
-#define CALINFO_ENUMPROCEX CALINFO_ENUMPROCEXW
-#define LOCALE_ENUMPROC LOCALE_ENUMPROCW
-#define CODEPAGE_ENUMPROC CODEPAGE_ENUMPROCW
-#define DATEFMT_ENUMPROC DATEFMT_ENUMPROCW
-#define DATEFMT_ENUMPROCEX DATEFMT_ENUMPROCEXW
-#define TIMEFMT_ENUMPROC TIMEFMT_ENUMPROCW
-#define LANGUAGEGROUP_ENUMPROC LANGUAGEGROUP_ENUMPROCW
-#define LANGGROUPLOCALE_ENUMPROC LANGGROUPLOCALE_ENUMPROCW
-#define UILANGUAGE_ENUMPROC UILANGUAGE_ENUMPROCW
-typedef CPINFOEXW CPINFOEX;
-typedef LPCPINFOEXW LPCPINFOEX;
-typedef CURRENCYFMTW CURRENCYFMT;
-typedef LPCURRENCYFMTW LPCURRENCYFMT;
-typedef NUMBERFMTW NUMBERFMT;
-typedef LPNUMBERFMTW LPNUMBERFMT;
-#define CompareString CompareStringW
-#define EnumCalendarInfo EnumCalendarInfoW
-#define EnumSystemCodePages EnumSystemCodePagesW
-#define EnumSystemLocales EnumSystemLocalesW
-#define EnumTimeFormats EnumTimeFormatsW
-#define FoldString FoldStringW
-#define GetCalendarInfo GetCalendarInfoW
-#define GetCPInfoEx GetCPInfoExW
-#define GetCurrencyFormat GetCurrencyFormatW
-#define GetDateFormat GetDateFormatW
-#define GetGeoInfo GetGeoInfoW
-#define GetLocaleInfo GetLocaleInfoW
-#define GetNumberFormat GetNumberFormatW
-#define GetStringTypeEx GetStringTypeExW
-#define GetTimeFormat GetTimeFormatW
-#define LCMapString LCMapStringW
-#define SetCalendarInfo SetCalendarInfoW
-#define SetLocaleInfo SetLocaleInfoW
-#if (WINVER >= 0x0500)
-#define EnumCalendarInfoEx EnumCalendarInfoExW
-#define EnumDateFormatsEx EnumDateFormatsExW
-#define EnumSystemLanguageGroups EnumSystemLanguageGroupsW
-#define EnumLanguageGroupLocales EnumLanguageGroupLocalesW
-#define EnumUILanguages EnumUILanguagesW
-#endif /* (WINVER >= 0x0500) */
-#else
-#define CALINFO_ENUMPROC CALINFO_ENUMPROCA
-#define CALINFO_ENUMPROCEX CALINFO_ENUMPROCEXA
-#define LOCALE_ENUMPROC LOCALE_ENUMPROCA
-#define CODEPAGE_ENUMPROC CODEPAGE_ENUMPROCA
-#define DATEFMT_ENUMPROC DATEFMT_ENUMPROCA
-#define DATEFMT_ENUMPROCEX DATEFMT_ENUMPROCEXA
-#define TIMEFMT_ENUMPROC TIMEFMT_ENUMPROCA
-#define LANGUAGEGROUP_ENUMPROC LANGUAGEGROUP_ENUMPROCA
-#define LANGGROUPLOCALE_ENUMPROC LANGGROUPLOCALE_ENUMPROCA
-#define UILANGUAGE_ENUMPROC UILANGUAGE_ENUMPROCA
-typedef CPINFOEXA CPINFOEX;
-typedef LPCPINFOEXA LPCPINFOEX;
-typedef CURRENCYFMTA CURRENCYFMT;
-typedef LPCURRENCYFMTA LPCURRENCYFMT;
-typedef NUMBERFMTA NUMBERFMT;
-typedef LPNUMBERFMTA LPNUMBERFMT;
-#define CompareString CompareStringA
-#define EnumCalendarInfo EnumCalendarInfoA
-#define EnumSystemCodePages EnumSystemCodePagesA
-#define EnumSystemLocales EnumSystemLocalesA
-#define EnumTimeFormats EnumTimeFormatsA
-#define FoldString FoldStringA
-#define GetCalendarInfo GetCalendarInfoA
-#define GetCPInfoEx GetCPInfoExA
-#define GetCurrencyFormat GetCurrencyFormatA
-#define GetDateFormat GetDateFormatA
-#define GetGeoInfo GetGeoInfoA
-#define GetLocaleInfo GetLocaleInfoA
-#define GetNumberFormat GetNumberFormatA
-#define GetStringTypeEx GetStringTypeExA
-#define GetTimeFormat GetTimeFormatA
-#define LCMapString LCMapStringA
-#define SetCalendarInfo SetCalendarInfoA
-#define SetLocaleInfo SetLocaleInfoA
-#if (WINVER >= 0x0500)
-#define EnumCalendarInfoEx EnumCalendarInfoExA
-#define EnumDateFormatsEx EnumDateFormatsExA
-#define EnumSystemLanguageGroups EnumSystemLanguageGroupsA
-#define EnumLanguageGroupLocales EnumLanguageGroupLocalesA
-#define EnumUILanguages EnumUILanguagesA
-#endif /* (WINVER >= 0x0500) */
-#endif /* UNICODE */
-#endif /* RC_INVOKED */
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/winnt.h b/winsup/w32api/include/winnt.h
deleted file mode 100644
index 1744650..0000000
--- a/winsup/w32api/include/winnt.h
+++ /dev/null
@@ -1,3963 +0,0 @@
-#ifndef _WINNT_H
-#define _WINNT_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-/* translate GCC target defines to MS equivalents. Keep this synchronized
- with windows.h. */
-#if defined(__i686__) && !defined(_M_IX86)
-#define _M_IX86 600
-#elif defined(__i586__) && !defined(_M_IX86)
-#define _M_IX86 500
-#elif defined(__i486__) && !defined(_M_IX86)
-#define _M_IX86 400
-#elif defined(__i386__) && !defined(_M_IX86)
-#define _M_IX86 300
-#endif
-#if defined(_M_IX86) && !defined(_X86_)
-#define _X86_
-#elif defined(_M_ALPHA) && !defined(_ALPHA_)
-#define _ALPHA_
-#elif defined(_M_PPC) && !defined(_PPC_)
-#define _PPC_
-#elif defined(_M_MRX000) && !defined(_MIPS_)
-#define _MIPS_
-#elif defined(_M_M68K) && !defined(_68K_)
-#define _68K_
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <winerror.h>
-
-#ifndef RC_INVOKED
-#include <string.h>
-
-/* FIXME: add more architectures. Is there a way to specify this in GCC? */
-#ifdef _X86_
-#define UNALIGNED
-#else
-#define UNALIGNED
-#endif
-
-#ifndef DECLSPEC_ALIGN
-#ifdef __GNUC__
-#define DECLSPEC_ALIGN(x) __attribute__((aligned(x)))
-#else
-#define DECLSPEC_ALIGN(x)
-#endif
-#endif
-
-#ifndef DECLSPEC_SELECTANY
-#if (__GNUC__ >= 4)
-#define DECLSPEC_SELECTANY __attribute__((selectany))
-#else
-#define DECLSPEC_SELECTANY
-#endif
-#endif
-
-#ifndef FORCEINLINE
-#if (__GNUC__ >= 3)
-#define FORCEINLINE __inline __attribute__((always_inline))
-#else
-#define FORCEINLINE __inline
-#endif
-#endif
-
-#ifndef C_ASSERT
-#define C_ASSERT(expr) typedef char __C_ASSERT__[(expr)?1:-1]
-#endif
-
-#ifndef VOID
-#define VOID void
-#endif
-typedef char CHAR;
-typedef short SHORT;
-typedef long LONG;
-typedef char CCHAR, *PCCHAR;
-typedef unsigned char UCHAR,*PUCHAR;
-typedef unsigned short USHORT,*PUSHORT;
-typedef unsigned long ULONG,*PULONG;
-typedef char *PSZ;
-
-typedef void *PVOID,*LPVOID;
-
-/* FIXME for __WIN64 */
-#ifndef __ptr64
-#define __ptr64
-#endif
-typedef void* __ptr64 PVOID64;
-
-#ifndef _WCHAR_T_DEFINED
-#define _WCHAR_T_DEFINED
-#ifndef _WCHAR_T_
-#define _WCHAR_T_
-#undef __need_wchar_t
-#ifndef __cplusplus
-typedef unsigned short wchar_t;
-#endif
-#endif
-#endif
-
-typedef wchar_t WCHAR;
-typedef WCHAR *PWCHAR,*LPWCH,*PWCH,*NWPSTR,*LPWSTR,*PWSTR;
-typedef CONST WCHAR *LPCWCH,*PCWCH,*LPCWSTR,*PCWSTR;
-typedef CHAR *PCHAR,*LPCH,*PCH,*NPSTR,*LPSTR,*PSTR;
-typedef CONST CHAR *LPCCH,*PCSTR,*LPCSTR;
-#ifndef _TCHAR_DEFINED
-#define _TCHAR_DEFINED
-#ifdef UNICODE
-/*
- * NOTE: This tests UNICODE, which is different from the _UNICODE define
- * used to differentiate standard C runtime calls.
- */
-typedef WCHAR TCHAR;
-typedef WCHAR _TCHAR;
-#else
-typedef CHAR TCHAR;
-typedef CHAR _TCHAR;
-#endif
-#endif
-typedef TCHAR TBYTE,*PTCH,*PTBYTE;
-typedef TCHAR *LPTCH,*PTSTR,*LPTSTR,*LP,*PTCHAR;
-typedef const TCHAR *LPCTSTR;
-#ifdef UNICODE
-/*
- * __TEXT is a private macro whose specific use is to force the expansion of a
- * macro passed as an argument to the macro TEXT. DO NOT use this
- * macro within your programs. It's name and function could change without
- * notice.
- */
-#define __TEXT(q) L##q
-#else
-#define __TEXT(q) q
-#endif
-/*
- * UNICODE a constant string when UNICODE is defined, else returns the string
- * unmodified.
- * The corresponding macros _TEXT() and _T() for mapping _UNICODE strings
- * passed to C runtime functions are defined in mingw/tchar.h
- */
-#define TEXT(q) __TEXT(q)
-typedef SHORT *PSHORT;
-typedef LONG *PLONG;
-#ifdef STRICT
-typedef void *HANDLE;
-#define DECLARE_HANDLE(n) typedef struct n##__{int i;}*n
-#else
-typedef PVOID HANDLE;
-#define DECLARE_HANDLE(n) typedef HANDLE n
-#endif
-typedef HANDLE *PHANDLE,*LPHANDLE;
-typedef DWORD LCID;
-typedef PDWORD PLCID;
-typedef WORD LANGID;
-#ifdef __GNUC__
-#define _HAVE_INT64
-#define _INTEGRAL_MAX_BITS 64
-#undef __int64
-#define __int64 long long
-#elif defined(__WATCOMC__) && (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64 )
-#define _HAVE_INT64
-#endif /* __GNUC__/__WATCOMC */
-#if defined(_HAVE_INT64) || (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64)
-typedef __int64 LONGLONG;
-typedef unsigned __int64 DWORDLONG;
-#else
-typedef double LONGLONG,DWORDLONG;
-#endif
-typedef LONGLONG *PLONGLONG;
-typedef DWORDLONG *PDWORDLONG;
-typedef DWORDLONG ULONGLONG,*PULONGLONG;
-typedef LONGLONG USN;
-#ifdef _HAVE_INT64
-#define Int32x32To64(a,b) ((LONGLONG)(a)*(LONGLONG)(b))
-#define UInt32x32To64(a,b) ((DWORDLONG)(a)*(DWORDLONG)(b))
-#define Int64ShllMod32(a,b) ((DWORDLONG)(a)<<(b))
-#define Int64ShraMod32(a,b) ((LONGLONG)(a)>>(b))
-#define Int64ShrlMod32(a,b) ((DWORDLONG)(a)>>(b))
-#endif
-#define ANSI_NULL '\0'
-#define UNICODE_NULL L'\0'
-typedef BYTE BOOLEAN,*PBOOLEAN;
-#endif
-typedef BYTE FCHAR;
-typedef WORD FSHORT;
-typedef DWORD FLONG;
-
-#define NTAPI __stdcall
-#include <basetsd.h>
-#define ACE_OBJECT_TYPE_PRESENT 0x00000001
-#define ACE_INHERITED_OBJECT_TYPE_PRESENT 0x00000002
-#define APPLICATION_ERROR_MASK 0x20000000
-#define ERROR_SEVERITY_SUCCESS 0x00000000
-#define ERROR_SEVERITY_INFORMATIONAL 0x40000000
-#define ERROR_SEVERITY_WARNING 0x80000000
-#define ERROR_SEVERITY_ERROR 0xC0000000
-/* also in ddk/ntifs.h */
-#define COMPRESSION_FORMAT_NONE (0x0000)
-#define COMPRESSION_FORMAT_DEFAULT (0x0001)
-#define COMPRESSION_FORMAT_LZNT1 (0x0002)
-#define COMPRESSION_ENGINE_STANDARD (0x0000)
-#define COMPRESSION_ENGINE_MAXIMUM (0x0100)
-#define COMPRESSION_ENGINE_HIBER (0x0200)
-#define ACCESS_ALLOWED_ACE_TYPE (0x0)
-#define ACCESS_DENIED_ACE_TYPE (0x1)
-#define SYSTEM_AUDIT_ACE_TYPE (0x2)
-#define SYSTEM_ALARM_ACE_TYPE (0x3)
-/*end ntifs.h */
-#define ANYSIZE_ARRAY 1
-#define OBJECT_INHERIT_ACE 1
-#define CONTAINER_INHERIT_ACE 2
-#define NO_PROPAGATE_INHERIT_ACE 4
-#define INHERIT_ONLY_ACE 8
-#define INHERITED_ACE 16
-#define VALID_INHERIT_FLAGS \
- | OBJECT_INHERIT_ACE \
- | CONTAINER_INHERIT_ACE \
- | NO_PROPAGATE_INHERIT_ACE \
- | INHERIT_ONLY_ACE \
- | INHERITED_ACE
-#define SUCCESSFUL_ACCESS_ACE_FLAG 64
-#define FAILED_ACCESS_ACE_FLAG 128
-#define DELETE 0x00010000L
-#define READ_CONTROL 0x20000L
-#define WRITE_DAC 0x40000L
-#define WRITE_OWNER 0x80000L
-#define SYNCHRONIZE 0x100000L
-#define STANDARD_RIGHTS_REQUIRED 0xF0000
-#define STANDARD_RIGHTS_READ 0x20000
-#define STANDARD_RIGHTS_WRITE 0x20000
-#define STANDARD_RIGHTS_EXECUTE 0x20000
-#define STANDARD_RIGHTS_ALL 0x1F0000
-#define SPECIFIC_RIGHTS_ALL 0xFFFF
-#define ACCESS_SYSTEM_SECURITY 0x1000000
-
-#define MAXIMUM_ALLOWED 0x2000000
-#define GENERIC_READ 0x80000000
-#define GENERIC_WRITE 0x40000000
-#define GENERIC_EXECUTE 0x20000000
-#define GENERIC_ALL 0x10000000
-
-#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
-
-/* Also in ddk/winddk.h */
-#define FILE_LIST_DIRECTORY 0x00000001
-#define FILE_READ_DATA 0x00000001
-#define FILE_ADD_FILE 0x00000002
-#define FILE_WRITE_DATA 0x00000002
-#define FILE_ADD_SUBDIRECTORY 0x00000004
-#define FILE_APPEND_DATA 0x00000004
-#define FILE_CREATE_PIPE_INSTANCE 0x00000004
-#define FILE_READ_EA 0x00000008
-#define FILE_READ_PROPERTIES 0x00000008
-#define FILE_WRITE_EA 0x00000010
-#define FILE_WRITE_PROPERTIES 0x00000010
-#define FILE_EXECUTE 0x00000020
-#define FILE_TRAVERSE 0x00000020
-#define FILE_DELETE_CHILD 0x00000040
-#define FILE_READ_ATTRIBUTES 0x00000080
-#define FILE_WRITE_ATTRIBUTES 0x00000100
-
-#define FILE_SHARE_READ 0x00000001
-#define FILE_SHARE_WRITE 0x00000002
-#define FILE_SHARE_DELETE 0x00000004
-#define FILE_SHARE_VALID_FLAGS 0x00000007
-
-#define FILE_ATTRIBUTE_READONLY 0x00000001
-#define FILE_ATTRIBUTE_HIDDEN 0x00000002
-#define FILE_ATTRIBUTE_SYSTEM 0x00000004
-#define FILE_ATTRIBUTE_DIRECTORY 0x00000010
-#define FILE_ATTRIBUTE_ARCHIVE 0x00000020
-#define FILE_ATTRIBUTE_DEVICE 0x00000040
-#define FILE_ATTRIBUTE_NORMAL 0x00000080
-#define FILE_ATTRIBUTE_TEMPORARY 0x00000100
-#define FILE_ATTRIBUTE_SPARSE_FILE 0x00000200
-#define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400
-#define FILE_ATTRIBUTE_COMPRESSED 0x00000800
-#define FILE_ATTRIBUTE_OFFLINE 0x00001000
-#define FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x00002000
-#define FILE_ATTRIBUTE_ENCRYPTED 0x00004000
-#define FILE_ATTRIBUTE_VALID_FLAGS 0x00007fb7
-#define FILE_ATTRIBUTE_VALID_SET_FLAGS 0x000031a7
-
-#define FILE_COPY_STRUCTURED_STORAGE 0x00000041
-#define FILE_STRUCTURED_STORAGE 0x00000441
-
-#define FILE_VALID_OPTION_FLAGS 0x00ffffff
-#define FILE_VALID_PIPE_OPTION_FLAGS 0x00000032
-#define FILE_VALID_MAILSLOT_OPTION_FLAGS 0x00000032
-#define FILE_VALID_SET_FLAGS 0x00000036
-
-#define FILE_SUPERSEDE 0x00000000
-#define FILE_OPEN 0x00000001
-#define FILE_CREATE 0x00000002
-#define FILE_OPEN_IF 0x00000003
-#define FILE_OVERWRITE 0x00000004
-#define FILE_OVERWRITE_IF 0x00000005
-#define FILE_MAXIMUM_DISPOSITION 0x00000005
-
-#define FILE_DIRECTORY_FILE 0x00000001
-#define FILE_WRITE_THROUGH 0x00000002
-#define FILE_SEQUENTIAL_ONLY 0x00000004
-#define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008
-#define FILE_SYNCHRONOUS_IO_ALERT 0x00000010
-#define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
-#define FILE_NON_DIRECTORY_FILE 0x00000040
-#define FILE_CREATE_TREE_CONNECTION 0x00000080
-#define FILE_COMPLETE_IF_OPLOCKED 0x00000100
-#define FILE_NO_EA_KNOWLEDGE 0x00000200
-#define FILE_OPEN_FOR_RECOVERY 0x00000400
-#define FILE_RANDOM_ACCESS 0x00000800
-#define FILE_DELETE_ON_CLOSE 0x00001000
-#define FILE_OPEN_BY_FILE_ID 0x00002000
-#define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000
-#define FILE_NO_COMPRESSION 0x00008000
-#define FILE_RESERVE_OPFILTER 0x00100000
-#define FILE_OPEN_REPARSE_POINT 0x00200000
-#define FILE_OPEN_NO_RECALL 0x00400000
-#define FILE_OPEN_FOR_FREE_SPACE_QUERY 0x00800000
-
-#define FILE_ALL_ACCESS \
- (STANDARD_RIGHTS_REQUIRED | \
- SYNCHRONIZE | \
- 0x1FF)
-
-#define FILE_GENERIC_EXECUTE \
- (STANDARD_RIGHTS_EXECUTE | \
- FILE_READ_ATTRIBUTES | \
- FILE_EXECUTE | \
- SYNCHRONIZE)
-
-#define FILE_GENERIC_READ \
- (STANDARD_RIGHTS_READ | \
- FILE_READ_DATA | \
- FILE_READ_ATTRIBUTES | \
- FILE_READ_EA | \
- SYNCHRONIZE)
-
-#define FILE_GENERIC_WRITE \
- (STANDARD_RIGHTS_WRITE | \
- FILE_WRITE_DATA | \
- FILE_WRITE_ATTRIBUTES | \
- FILE_WRITE_EA | \
- FILE_APPEND_DATA | \
- SYNCHRONIZE)
-/* end winddk.h */
-/* also in ddk/ntifs.h */
-#define FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001
-#define FILE_NOTIFY_CHANGE_DIR_NAME 0x00000002
-#define FILE_NOTIFY_CHANGE_NAME 0x00000003
-#define FILE_NOTIFY_CHANGE_ATTRIBUTES 0x00000004
-#define FILE_NOTIFY_CHANGE_SIZE 0x00000008
-#define FILE_NOTIFY_CHANGE_LAST_WRITE 0x00000010
-#define FILE_NOTIFY_CHANGE_LAST_ACCESS 0x00000020
-#define FILE_NOTIFY_CHANGE_CREATION 0x00000040
-#define FILE_NOTIFY_CHANGE_EA 0x00000080
-#define FILE_NOTIFY_CHANGE_SECURITY 0x00000100
-#define FILE_NOTIFY_CHANGE_STREAM_NAME 0x00000200
-#define FILE_NOTIFY_CHANGE_STREAM_SIZE 0x00000400
-#define FILE_NOTIFY_CHANGE_STREAM_WRITE 0x00000800
-#define FILE_NOTIFY_VALID_MASK 0x00000fff
-
-#define FILE_CASE_SENSITIVE_SEARCH 0x00000001
-#define FILE_CASE_PRESERVED_NAMES 0x00000002
-#define FILE_UNICODE_ON_DISK 0x00000004
-#define FILE_PERSISTENT_ACLS 0x00000008
-#define FILE_FILE_COMPRESSION 0x00000010
-#define FILE_VOLUME_QUOTAS 0x00000020
-#define FILE_SUPPORTS_SPARSE_FILES 0x00000040
-#define FILE_SUPPORTS_REPARSE_POINTS 0x00000080
-#define FILE_SUPPORTS_REMOTE_STORAGE 0x00000100
-#define FS_LFN_APIS 0x00004000
-#define FILE_VOLUME_IS_COMPRESSED 0x00008000
-#define FILE_SUPPORTS_OBJECT_IDS 0x00010000
-#define FILE_SUPPORTS_ENCRYPTION 0x00020000
-#define FILE_NAMED_STREAMS 0x00040000
-#define FILE_READ_ONLY_VOLUME 0x00080000
-#define FILE_SEQUENTIAL_WRITE_ONCE 0x00100000
-#define FILE_SUPPORTS_TRANSACTIONS 0x00200000
-
-
-#define IO_COMPLETION_QUERY_STATE 0x0001
-#define IO_COMPLETION_MODIFY_STATE 0x0002
-#define IO_COMPLETION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
-/* end ntifs.h */
-
-/* also in ddk/winddk.h */
-#define DUPLICATE_CLOSE_SOURCE 0x00000001
-#define DUPLICATE_SAME_ACCESS 0x00000002
-#define DUPLICATE_SAME_ATTRIBUTES 0x00000004
-/* end winddk.k */
-
-#define MAILSLOT_NO_MESSAGE ((DWORD)-1)
-#define MAILSLOT_WAIT_FOREVER ((DWORD)-1)
-#define PROCESS_TERMINATE 1
-#define PROCESS_CREATE_THREAD 2
-#define PROCESS_SET_SESSIONID 4
-#define PROCESS_VM_OPERATION 8
-#define PROCESS_VM_READ 16
-#define PROCESS_VM_WRITE 32
-#define PROCESS_DUP_HANDLE 64
-#define PROCESS_CREATE_PROCESS 128
-#define PROCESS_SET_QUOTA 256
-#define PROCESS_SET_INFORMATION 512
-#define PROCESS_QUERY_INFORMATION 1024
-#define PROCESS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0xFFF)
-#define THREAD_TERMINATE 1
-#define THREAD_SUSPEND_RESUME 2
-#define THREAD_GET_CONTEXT 8
-#define THREAD_SET_CONTEXT 16
-#define THREAD_SET_INFORMATION 32
-#define THREAD_QUERY_INFORMATION 64
-#define THREAD_SET_THREAD_TOKEN 128
-#define THREAD_IMPERSONATE 256
-#define THREAD_DIRECT_IMPERSONATION 0x200
-#define THREAD_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3FF)
-#define THREAD_BASE_PRIORITY_LOWRT 15
-#define THREAD_BASE_PRIORITY_MAX 2
-#define THREAD_BASE_PRIORITY_MIN (-2)
-#define THREAD_BASE_PRIORITY_IDLE (-15)
-#define EXCEPTION_NONCONTINUABLE 1
-#define EXCEPTION_MAXIMUM_PARAMETERS 15
-#define MUTANT_QUERY_STATE 0x0001
-#define MUTANT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|MUTANT_QUERY_STATE)
-#define TIMER_QUERY_STATE 0x0001
-#define TIMER_MODIFY_STATE 0x0002
-#define TIMER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|TIMER_QUERY_STATE|TIMER_MODIFY_STATE)
-/*
- * To prevent gcc compiler warnings, bracket these defines when initialising
- * a SID_IDENTIFIER_AUTHORITY, eg.
- * SID_IDENTIFIER_AUTHORITY aNullSidAuthority = {SECURITY_NULL_SID_AUTHORITY};
- */
-#define SECURITY_NULL_SID_AUTHORITY {0,0,0,0,0,0}
-#define SECURITY_WORLD_SID_AUTHORITY {0,0,0,0,0,1}
-#define SECURITY_LOCAL_SID_AUTHORITY {0,0,0,0,0,2}
-#define SECURITY_CREATOR_SID_AUTHORITY {0,0,0,0,0,3}
-#define SECURITY_NON_UNIQUE_AUTHORITY {0,0,0,0,0,4}
-#define SECURITY_NT_AUTHORITY {0,0,0,0,0,5}
-#define SECURITY_MANDATORY_LABEL_AUTHORITY {0,0,0,0,0,16}
-#define SECURITY_NULL_RID 0
-#define SECURITY_WORLD_RID (0x00000000L)
-#define SECURITY_LOCAL_RID 0
-#define SECURITY_CREATOR_OWNER_RID 0
-#define SECURITY_CREATOR_GROUP_RID 1
-#define SECURITY_DIALUP_RID 1
-#define SECURITY_NETWORK_RID 2
-#define SECURITY_BATCH_RID 3
-#define SECURITY_INTERACTIVE_RID 4
-#define SECURITY_LOGON_IDS_RID 5
-#define SECURITY_SERVICE_RID 6
-#define SECURITY_LOCAL_SYSTEM_RID 18
-#define SECURITY_BUILTIN_DOMAIN_RID 32
-#define SECURITY_PRINCIPAL_SELF_RID 10
-#define SECURITY_CREATOR_OWNER_SERVER_RID 0x2
-#define SECURITY_CREATOR_GROUP_SERVER_RID 0x3
-#define SECURITY_LOGON_IDS_RID_COUNT 0x3
-#define SECURITY_ANONYMOUS_LOGON_RID 0x7
-#define SECURITY_PROXY_RID 0x8
-#define SECURITY_ENTERPRISE_CONTROLLERS_RID 0x9
-#define SECURITY_SERVER_LOGON_RID SECURITY_ENTERPRISE_CONTROLLERS_RID
-#define SECURITY_AUTHENTICATED_USER_RID 0xB
-#define SECURITY_RESTRICTED_CODE_RID 0xC
-#define SECURITY_NT_NON_UNIQUE_RID 0x15
-#define SID_REVISION 1
-#define DOMAIN_USER_RID_ADMIN 0x1F4L
-#define DOMAIN_USER_RID_GUEST 0x1F5L
-#define DOMAIN_GROUP_RID_ADMINS 0x200L
-#define DOMAIN_GROUP_RID_USERS 0x201L
-#define DOMAIN_ALIAS_RID_ADMINS 0x220L
-#define DOMAIN_ALIAS_RID_USERS 0x221L
-#define DOMAIN_ALIAS_RID_GUESTS 0x222L
-#define DOMAIN_ALIAS_RID_POWER_USERS 0x223L
-#define DOMAIN_ALIAS_RID_ACCOUNT_OPS 0x224L
-#define DOMAIN_ALIAS_RID_SYSTEM_OPS 0x225L
-#define DOMAIN_ALIAS_RID_PRINT_OPS 0x226L
-#define DOMAIN_ALIAS_RID_BACKUP_OPS 0x227L
-#define DOMAIN_ALIAS_RID_REPLICATOR 0x228L
-#define SECURITY_MANDATORY_UNTRUSTED_RID 0
-#define SECURITY_MANDATORY_LOW_RID 0x1000
-#define SECURITY_MANDATORY_MEDIUM_RID 0x2000
-#define SECURITY_MANDATORY_HIGH_RID 0x3000
-#define SECURITY_MANDATORY_SYSTEM_RID 0x4000
-#define SECURITY_MANDATORY_PROTECTED_PROCESS_RID 0x5000
-#define SECURITY_MANDATORY_MAXIMUM_USER_RID SECURITY_MANDATORY_SYSTEM_RID
-#define SE_CREATE_TOKEN_NAME TEXT("SeCreateTokenPrivilege")
-#define SE_ASSIGNPRIMARYTOKEN_NAME TEXT("SeAssignPrimaryTokenPrivilege")
-#define SE_LOCK_MEMORY_NAME TEXT("SeLockMemoryPrivilege")
-#define SE_INCREASE_QUOTA_NAME TEXT("SeIncreaseQuotaPrivilege")
-#define SE_UNSOLICITED_INPUT_NAME TEXT("SeUnsolicitedInputPrivilege")
-#define SE_MACHINE_ACCOUNT_NAME TEXT("SeMachineAccountPrivilege")
-#define SE_TCB_NAME TEXT("SeTcbPrivilege")
-#define SE_SECURITY_NAME TEXT("SeSecurityPrivilege")
-#define SE_TAKE_OWNERSHIP_NAME TEXT("SeTakeOwnershipPrivilege")
-#define SE_LOAD_DRIVER_NAME TEXT("SeLoadDriverPrivilege")
-#define SE_SYSTEM_PROFILE_NAME TEXT("SeSystemProfilePrivilege")
-#define SE_SYSTEMTIME_NAME TEXT("SeSystemtimePrivilege")
-#define SE_PROF_SINGLE_PROCESS_NAME TEXT("SeProfileSingleProcessPrivilege")
-#define SE_INC_BASE_PRIORITY_NAME TEXT("SeIncreaseBasePriorityPrivilege")
-#define SE_CREATE_PAGEFILE_NAME TEXT("SeCreatePagefilePrivilege")
-#define SE_CREATE_PERMANENT_NAME TEXT("SeCreatePermanentPrivilege")
-#define SE_BACKUP_NAME TEXT("SeBackupPrivilege")
-#define SE_RESTORE_NAME TEXT("SeRestorePrivilege")
-#define SE_SHUTDOWN_NAME TEXT("SeShutdownPrivilege")
-#define SE_DEBUG_NAME TEXT("SeDebugPrivilege")
-#define SE_AUDIT_NAME TEXT("SeAuditPrivilege")
-#define SE_SYSTEM_ENVIRONMENT_NAME TEXT("SeSystemEnvironmentPrivilege")
-#define SE_CHANGE_NOTIFY_NAME TEXT("SeChangeNotifyPrivilege")
-#define SE_REMOTE_SHUTDOWN_NAME TEXT("SeRemoteShutdownPrivilege")
-#define SE_CREATE_GLOBAL_NAME TEXT("SeCreateGlobalPrivilege")
-#define SE_UNDOCK_NAME TEXT("SeUndockPrivilege")
-#define SE_MANAGE_VOLUME_NAME TEXT("SeManageVolumePrivilege")
-#define SE_IMPERSONATE_NAME TEXT("SeImpersonatePrivilege")
-#define SE_ENABLE_DELEGATION_NAME TEXT("SeEnableDelegationPrivilege")
-#define SE_SYNC_AGENT_NAME TEXT("SeSyncAgentPrivilege")
-#define SE_TRUSTED_CREDMAN_ACCESS_NAME TEXT("SeTrustedCredManAccessPrivilege")
-#define SE_RELABEL_NAME TEXT("SeRelabelPrivilege")
-#define SE_INCREASE_WORKING_SET_NAME TEXT("SeIncreaseWorkingSetPrivilege")
-#define SE_TIME_ZONE_NAME TEXT("SeTimeZonePrivilege")
-#define SE_CREATE_SYMBOLIC_LINK_NAME TEXT("SeCreateSymbolicLinkPrivilege")
-#define SE_GROUP_MANDATORY 1
-#define SE_GROUP_ENABLED_BY_DEFAULT 2
-#define SE_GROUP_ENABLED 4
-#define SE_GROUP_OWNER 8
-#define SE_GROUP_USE_FOR_DENY_ONLY 16
-#define SE_GROUP_INTEGRITY 32
-#define SE_GROUP_INTEGRITY_ENABLED 64
-#define SE_GROUP_LOGON_ID 3221225472U
-#define SE_GROUP_RESOURCE 536870912
-#define LANG_NEUTRAL 0x00
-#define LANG_ARABIC 0x01
-#define LANG_BULGARIAN 0x02
-#define LANG_CATALAN 0x03
-#define LANG_CHINESE 0x04
-#define LANG_CZECH 0x05
-#define LANG_DANISH 0x06
-#define LANG_GERMAN 0x07
-#define LANG_GREEK 0x08
-#define LANG_ENGLISH 0x09
-#define LANG_SPANISH 0x0a
-#define LANG_FINNISH 0x0b
-#define LANG_FRENCH 0x0c
-#define LANG_HEBREW 0x0d
-#define LANG_HUNGARIAN 0x0e
-#define LANG_ICELANDIC 0x0f
-#define LANG_ITALIAN 0x10
-#define LANG_JAPANESE 0x11
-#define LANG_KOREAN 0x12
-#define LANG_DUTCH 0x13
-#define LANG_NORWEGIAN 0x14
-#define LANG_POLISH 0x15
-#define LANG_PORTUGUESE 0x16
-#define LANG_ROMANIAN 0x18
-#define LANG_RUSSIAN 0x19
-#define LANG_CROATIAN 0x1a
-#define LANG_SERBIAN 0x1a
-#define LANG_SERBIAN_NEUTRAL 0x7c1a
-#define LANG_BOSNIAN 0x1a
-#define LANG_BOSNIAN_NEUTRAL 0x781a
-#define LANG_SLOVAK 0x1b
-#define LANG_ALBANIAN 0x1c
-#define LANG_SWEDISH 0x1d
-#define LANG_THAI 0x1e
-#define LANG_TURKISH 0x1f
-#define LANG_URDU 0x20
-#define LANG_INDONESIAN 0x21
-#define LANG_UKRAINIAN 0x22
-#define LANG_BELARUSIAN 0x23
-#define LANG_SLOVENIAN 0x24
-#define LANG_ESTONIAN 0x25
-#define LANG_LATVIAN 0x26
-#define LANG_LITHUANIAN 0x27
-#define LANG_PERSIAN 0x29
-#define LANG_FARSI LANG_PERSIAN
-#define LANG_VIETNAMESE 0x2a
-#define LANG_ARMENIAN 0x2b
-#define LANG_AZERI 0x2c
-#define LANG_BASQUE 0x2d
-#define LANG_LOWER_SORBIAN 0x2e
-#define LANG_UPPER_SORBIAN 0x2e
-#define LANG_MACEDONIAN 0x2f
-#define LANG_TSWANA 0x32
-#define LANG_XHOSA 0x34
-#define LANG_ZULU 0x35
-#define LANG_AFRIKAANS 0x36
-#define LANG_GEORGIAN 0x37
-#define LANG_FAEROESE 0x38
-#define LANG_HINDI 0x39
-#define LANG_MALTESE 0x3a
-#define LANG_SAMI 0x3b
-#define LANG_IRISH 0x3c
-#define LANG_MALAY 0x3e
-#define LANG_KAZAK 0x3f
-#define LANG_KYRGYZ 0x40
-#define LANG_SWAHILI 0x41
-#define LANG_UZBEK 0x43
-#define LANG_TATAR 0x44
-#define LANG_BENGALI 0x45
-#define LANG_PUNJABI 0x46
-#define LANG_GUJARATI 0x47
-#define LANG_ORIYA 0x48
-#define LANG_TAMIL 0x49
-#define LANG_TELUGU 0x4a
-#define LANG_KANNADA 0x4b
-#define LANG_MALAYALAM 0x4c
-#define LANG_ASSAMESE 0x4d
-#define LANG_MARATHI 0x4e
-#define LANG_SANSKRIT 0x4f
-#define LANG_MONGOLIAN 0x50
-#define LANG_TIBETAN 0x51
-#define LANG_WELSH 0x52
-#define LANG_KHMER 0x53
-#define LANG_LAO 0x54
-#define LANG_GALICIAN 0x56
-#define LANG_KONKANI 0x57
-#define LANG_MANIPURI 0x58
-#define LANG_SINDHI 0x59
-#define LANG_SYRIAC 0x5a
-#define LANG_SINHALESE 0x5b
-#define LANG_INUKTITUT 0x5d
-#define LANG_AMHARIC 0x5e
-#define LANG_TAMAZIGHT 0x5f
-#define LANG_KASHMIRI 0x60
-#define LANG_NEPALI 0x61
-#define LANG_FRISIAN 0x62
-#define LANG_PASHTO 0x63
-#define LANG_FILIPINO 0x64
-#define LANG_DIVEHI 0x65
-#define LANG_HAUSA 0x68
-#define LANG_YORUBA 0x6a
-#define LANG_QUECHUA 0x6b
-#define LANG_SOTHO 0x6c
-#define LANG_BASHKIR 0x6d
-#define LANG_LUXEMBOURGISH 0x6e
-#define LANG_GREENLANDIC 0x6f
-#define LANG_IGBO 0x70
-#define LANG_TIGRIGNA 0x73
-#define LANG_YI 0x78
-#define LANG_MAPUDUNGUN 0x7a
-#define LANG_MOHAWK 0x7c
-#define LANG_BRETON 0x7e
-#define LANG_INVARIANT 0x7f
-#define LANG_UIGHUR 0x80
-#define LANG_MAORI 0x81
-#define LANG_OCCITAN 0x82
-#define LANG_CORSICAN 0x83
-#define LANG_ALSATIAN 0x84
-#define LANG_YAKUT 0x85
-#define LANG_KICHE 0x86
-#define LANG_KINYARWANDA 0x87
-#define LANG_WOLOF 0x88
-#define LANG_DARI 0x8c
-#define LANG_MALAGASY 0x8d
-#define SUBLANG_NEUTRAL 0x00
-#define SUBLANG_DEFAULT 0x01
-#define SUBLANG_SYS_DEFAULT 0x02
-#define SUBLANG_CUSTOM_DEFAULT 0x03
-#define SUBLANG_CUSTOM_UNSPECIFIED 0x04
-#define SUBLANG_UI_CUSTOM_DEFAULT 0x03
-#define SUBLANG_AFRIKAANS_SOUTH_AFRICA 0x01
-#define SUBLANG_ALBANIAN_ALBANIA 0x01
-#define SUBLANG_ALSATIAN_FRANCE 0x01
-#define SUBLANG_AMHARIC_ETHIOPIA 0x01
-#define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
-#define SUBLANG_ARABIC_IRAQ 0x02
-#define SUBLANG_ARABIC_EGYPT 0x03
-#define SUBLANG_ARABIC_LIBYA 0x04
-#define SUBLANG_ARABIC_ALGERIA 0x05
-#define SUBLANG_ARABIC_MOROCCO 0x06
-#define SUBLANG_ARABIC_TUNISIA 0x07
-#define SUBLANG_ARABIC_OMAN 0x08
-#define SUBLANG_ARABIC_YEMEN 0x09
-#define SUBLANG_ARABIC_SYRIA 0x0a
-#define SUBLANG_ARABIC_JORDAN 0x0b
-#define SUBLANG_ARABIC_LEBANON 0x0c
-#define SUBLANG_ARABIC_KUWAIT 0x0d
-#define SUBLANG_ARABIC_UAE 0x0e
-#define SUBLANG_ARABIC_BAHRAIN 0x0f
-#define SUBLANG_ARABIC_QATAR 0x10
-#define SUBLANG_ARMENIAN_ARMENIA 0x01
-#define SUBLANG_ASSAMESE_INDIA 0x01
-#define SUBLANG_AZERI_LATIN 0x01
-#define SUBLANG_AZERI_CYRILLIC 0x02
-#define SUBLANG_BASHKIR_RUSSIA 0x01
-#define SUBLANG_BASQUE_BASQUE 0x01
-#define SUBLANG_BELARUSIAN_BELARUS 0x01
-#define SUBLANG_BENGALI_INDIA 0x00
-#define SUBLANG_BENGALI_BANGLADESH 0x01
-#define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN 0x05
-#define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x08
-#define SUBLANG_BRETON_FRANCE 0x01
-#define SUBLANG_BULGARIAN_BULGARIA 0x01
-#define SUBLANG_CATALAN_CATALAN 0x01
-#define SUBLANG_CHINESE_TRADITIONAL 0x01
-#define SUBLANG_CHINESE_SIMPLIFIED 0x02
-#define SUBLANG_CHINESE_HONGKONG 0x03
-#define SUBLANG_CHINESE_SINGAPORE 0x04
-#define SUBLANG_CHINESE_MACAU 0x05
-#define SUBLANG_CORSICAN_FRANCE 0x01
-#define SUBLANG_CZECH_CZECH_REPUBLIC 0x01
-#define SUBLANG_CROATIAN_CROATIA 0x01
-#define SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN 0x04
-#define SUBLANG_DANISH_DENMARK 0x01
-#define SUBLANG_DIVEHI_MALDIVES 0x01
-#define SUBLANG_DUTCH 0x01
-#define SUBLANG_DUTCH_BELGIAN 0x02
-#define SUBLANG_ENGLISH_US 0x01
-#define SUBLANG_ENGLISH_UK 0x02
-#define SUBLANG_ENGLISH_AUS 0x03
-#define SUBLANG_ENGLISH_CAN 0x04
-#define SUBLANG_ENGLISH_NZ 0x05
-#if (WINVER >= 0x0600)
-#define SUBLANG_ENGLISH_IRELAND 0x06
-#endif
-#define SUBLANG_ENGLISH_EIRE 0x06
-#define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
-#define SUBLANG_ENGLISH_JAMAICA 0x08
-#define SUBLANG_ENGLISH_CARIBBEAN 0x09
-#define SUBLANG_ENGLISH_BELIZE 0x0a
-#define SUBLANG_ENGLISH_TRINIDAD 0x0b
-#define SUBLANG_ENGLISH_ZIMBABWE 0x0c
-#define SUBLANG_ENGLISH_PHILIPPINES 0x0d
-#define SUBLANG_ENGLISH_INDIA 0x10
-#define SUBLANG_ENGLISH_MALAYSIA 0x11
-#define SUBLANG_ENGLISH_SINGAPORE 0x12
-#define SUBLANG_ESTONIAN_ESTONIA 0x01
-#define SUBLANG_FAEROESE_FAROE_ISLANDS 0x01
-#define SUBLANG_FILIPINO_PHILIPPINES 0x01
-#define SUBLANG_FINNISH_FINLAND 0x01
-#define SUBLANG_FRENCH 0x01
-#define SUBLANG_FRENCH_BELGIAN 0x02
-#define SUBLANG_FRENCH_CANADIAN 0x03
-#define SUBLANG_FRENCH_SWISS 0x04
-#define SUBLANG_FRENCH_LUXEMBOURG 0x05
-#define SUBLANG_FRENCH_MONACO 0x06
-#define SUBLANG_FRISIAN_NETHERLANDS 0x01
-#define SUBLANG_GALICIAN_GALICIAN 0x01
-#define SUBLANG_GEORGIAN_GEORGIA 0x01
-#define SUBLANG_GERMAN 0x01
-#define SUBLANG_GERMAN_SWISS 0x02
-#define SUBLANG_GERMAN_AUSTRIAN 0x03
-#define SUBLANG_GERMAN_LUXEMBOURG 0x04
-#define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
-#define SUBLANG_GREEK_GREECE 0x01
-#define SUBLANG_GREENLANDIC_GREENLAND 0x01
-#define SUBLANG_GUJARATI_INDIA 0x01
-#define SUBLANG_HAUSA_NIGERIA 0x01
-#define SUBLANG_HEBREW_ISRAEL 0x01
-#define SUBLANG_HINDI_INDIA 0x01
-#define SUBLANG_HUNGARIAN_HUNGARY 0x01
-#define SUBLANG_ICELANDIC_ICELAND 0x01
-#define SUBLANG_IGBO_NIGERIA 0x01
-#define SUBLANG_INDONESIAN_INDONESIA 0x01
-#define SUBLANG_INUKTITUT_CANADA 0x01
-#define SUBLANG_INUKTITUT_CANADA_LATIN 0x01
-#define SUBLANG_IRISH_IRELAND 0x01
-#define SUBLANG_ITALIAN 0x01
-#define SUBLANG_ITALIAN_SWISS 0x02
-#define SUBLANG_JAPANESE_JAPAN 0x01
-#define SUBLANG_KASHMIRI_INDIA 0x02
-#define SUBLANG_KASHMIRI_SASIA 0x02
-#define SUBLANG_KAZAK_KAZAKHSTAN 0x01
-#define SUBLANG_KHMER_CAMBODIA 0x01
-#define SUBLANG_KICHE_GUATEMALA 0x01
-#define SUBLANG_KINYARWANDA_RWANDA 0x01
-#define SUBLANG_KONKANI_INDIA 0x01
-#define SUBLANG_KOREAN 0x01
-#define SUBLANG_KYRGYZ_KYRGYZSTAN 0x01
-#define SUBLANG_LAO_LAO_PDR 0x01
-#define SUBLANG_LATVIAN_LATVIA 0x01
-#if (WINVER >= 0x0600)
-#define SUBLANG_LITHUANIAN_LITHUANIA 0x01
-#endif
-#define SUBLANG_LITHUANIAN 0x01
-#define SUBLANG_LOWER_SORBIAN_GERMANY 0x01
-#define SUBLANG_LUXEMBOURGISH_LUXEMBOURG 0x01
-#define SUBLANG_MACEDONIAN_MACEDONIA 0x01
-#define SUBLANG_MALAY_MALAYSIA 0x01
-#define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
-#define SUBLANG_MALAYALAM_INDIA 0x01
-#define SUBLANG_MALTESE_MALTA 0x01
-#define SUBLANG_MAORI_NEW_ZEALAND 0x01
-#define SUBLANG_MAPUDUNGUN_CHILE 0x01
-#define SUBLANG_MARATHI_INDIA 0x01
-#define SUBLANG_MOHAWK_MOHAWK 0x01
-#define SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA 0x01
-#define SUBLANG_MONGOLIAN_PRC 0x02
-#define SUBLANG_NEPALI_NEPAL 0x01
-#define SUBLANG_NEPALI_INDIA 0x02
-#define SUBLANG_NORWEGIAN_BOKMAL 0x01
-#define SUBLANG_NORWEGIAN_NYNORSK 0x02
-#define SUBLANG_OCCITAN_FRANCE 0x01
-#define SUBLANG_ORIYA_INDIA 0x01
-#define SUBLANG_PASHTO_AFGHANISTAN 0x01
-#define SUBLANG_PERSIAN_IRAN 0x01
-#define SUBLANG_POLISH_POLAND 0x01
-#define SUBLANG_PORTUGUESE_BRAZILIAN 0x01
-#if (WINVER >= 0x0600)
-#define SUBLANG_PORTUGUESE_PORTUGAL 0x02
-#endif
-#define SUBLANG_PORTUGUESE 0x02
-#define SUBLANG_PUNJABI_INDIA 0x00
-#define SUBLANG_PUNJABI_PAKISTAN 0x01
-#define SUBLANG_QUECHUA_BOLIVIA 0x01
-#define SUBLANG_QUECHUA_ECUADOR 0x02
-#define SUBLANG_QUECHUA_PERU 0x03
-#define SUBLANG_ROMANIAN_ROMANIA 0x00
-#define SUBLANG_ROMANIAN_MOLDOVA 0x01
-#define SUBLANG_ROMANSH_SWITZERLAND 0x01
-#define SUBLANG_RUSSIAN_RUSSIA 0x01
-#define SUBLANG_SAMI_NORTHERN_NORWAY 0x01
-#define SUBLANG_SAMI_NORTHERN_SWEDEN 0x02
-#define SUBLANG_SAMI_NORTHERN_FINLAND 0x03
-#define SUBLANG_SAMI_LULE_NORWAY 0x04
-#define SUBLANG_SAMI_LULE_SWEDEN 0x05
-#define SUBLANG_SAMI_SOUTHERN_NORWAY 0x06
-#define SUBLANG_SAMI_SOUTHERN_SWEDEN 0x07
-#define SUBLANG_SAMI_SKOLT_FINLAND 0x03
-#define SUBLANG_SAMI_INARI_FINLAND 0x03
-#define SUBLANG_SANSKRIT_INDIA 0x01
-#define SUBLANG_SERBIAN_LATIN 0x02
-#define SUBLANG_SERBIAN_CYRILLIC 0x03
-#define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN 0x06
-#define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x07
-#define SUBLANG_SINDHI_AFGHANISTAN 0x02
-#define SUBLANG_SINHALESE_SRI_LANKA 0x01
-#define SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA 0x01
-#define SUBLANG_SLOVAK_SLOVAKIA 0x01
-#define SUBLANG_SLOVENIAN_SLOVENIA 0x01
-#define SUBLANG_SPANISH 0x01
-#define SUBLANG_SPANISH_MEXICAN 0x02
-#define SUBLANG_SPANISH_MODERN 0x03
-#define SUBLANG_SPANISH_GUATEMALA 0x04
-#define SUBLANG_SPANISH_COSTA_RICA 0x05
-#define SUBLANG_SPANISH_PANAMA 0x06
-#define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
-#define SUBLANG_SPANISH_VENEZUELA 0x08
-#define SUBLANG_SPANISH_COLOMBIA 0x09
-#define SUBLANG_SPANISH_PERU 0x0a
-#define SUBLANG_SPANISH_ARGENTINA 0x0b
-#define SUBLANG_SPANISH_ECUADOR 0x0c
-#define SUBLANG_SPANISH_CHILE 0x0d
-#define SUBLANG_SPANISH_URUGUAY 0x0e
-#define SUBLANG_SPANISH_PARAGUAY 0x0f
-#define SUBLANG_SPANISH_BOLIVIA 0x10
-#define SUBLANG_SPANISH_EL_SALVADOR 0x11
-#define SUBLANG_SPANISH_HONDURAS 0x12
-#define SUBLANG_SPANISH_NICARAGUA 0x13
-#define SUBLANG_SPANISH_PUERTO_RICO 0x14
-#define SUBLANG_SPANISH_US 0x15
-#if (WINVER >= 0x0600)
-#define SUBLANG_SWEDISH_SWEDEN 0x01
-#endif
-#define SUBLANG_SWEDISH 0x01
-#define SUBLANG_SWEDISH_FINLAND 0x02
-#define SUBLANG_SYRIAC 0x01
-#define SUBLANG_TAJIK_TAJIKISTAN 0x01
-#define SUBLANG_TAMAZIGHT_ALGERIA_LATIN 0x02
-#define SUBLANG_TAMIL_INDIA 0x01
-#define SUBLANG_TATAR_RUSSIA 0x01
-#define SUBLANG_TELUGU_INDIA 0x01
-#define SUBLANG_THAI_THAILAND 0x01
-#define SUBLANG_TIBETAN_PRC 0x01
-#define SUBLANG_TIBETAN_BHUTAN 0x02
-#define SUBLANG_TIGRIGNA_ERITREA 0x01
-#define SUBLANG_TSWANA_SOUTH_AFRICA 0x01
-#define SUBLANG_TURKISH_TURKEY 0x01
-#define SUBLANG_TURKMEN_TURKMENISTAN 0x01
-#define SUBLANG_UIGHUR_PRC 0x01
-#define SUBLANG_UKRAINIAN_UKRAINE 0x01
-#define SUBLANG_UPPER_SORBIAN_GERMANY 0x01
-#define SUBLANG_URDU_PAKISTAN 0x01
-#define SUBLANG_URDU_INDIA 0x02
-#define SUBLANG_UZBEK_LATIN 0x01
-#define SUBLANG_UZBEK_CYRILLIC 0x02
-#define SUBLANG_VIETNAMESE_VIETNAM 0x01
-#define SUBLANG_WELSH_UNITED_KINGDOM 0x01
-#define SUBLANG_WOLOF_SENEGAL 0x01
-#define SUBLANG_YORUBA_NIGERIA 0x01
-#define SUBLANG_XHOSA_SOUTH_AFRICA 0x01
-#define SUBLANG_YAKUT_RUSSIA 0x01
-#define SUBLANG_YI_PRC 0x01
-#define SUBLANG_ZULU_SOUTH_AFRICA 0x01
-#define NLS_VALID_LOCALE_MASK 1048575
-#define SORT_DEFAULT 0
-#define SORT_JAPANESE_XJIS 0
-#define SORT_JAPANESE_UNICODE 1
-#define SORT_CHINESE_BIG5 0
-#define SORT_CHINESE_PRCP 0
-#define SORT_CHINESE_UNICODE 1
-#define SORT_CHINESE_PRC 2
-#define SORT_CHINESE_BOPOMOFO 3
-#define SORT_KOREAN_KSC 0
-#define SORT_KOREAN_UNICODE 1
-#define SORT_GERMAN_PHONE_BOOK 1
-#define SORT_HUNGARIAN_DEFAULT 0
-#define SORT_HUNGARIAN_TECHNICAL 1
-#define SORT_GEORGIAN_TRADITIONAL 0
-#define SORT_GEORGIAN_MODERN 1
-#define MAKELANGID(p,s) ((((WORD)(s))<<10)|(WORD)(p))
-#define MAKELCID(l,s) ((DWORD)((((DWORD)((WORD)(s)))<<16)|((DWORD)((WORD)(l)))))
-#define PRIMARYLANGID(l) ((WORD)(l)&0x3ff)
-#define SORTIDFROMLCID(l) ((WORD)((((DWORD)(l))&NLS_VALID_LOCALE_MASK)>>16))
-#define SORTVERSIONFROMLCID(l) ((WORD)((((DWORD)(l))>>20)&0xf))
-#define SUBLANGID(l) ((WORD)(l)>>10)
-#define LANGIDFROMLCID(l) ((WORD)(l))
-#define LANG_SYSTEM_DEFAULT MAKELANGID(LANG_NEUTRAL,SUBLANG_SYS_DEFAULT)
-#define LANG_USER_DEFAULT MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT)
-#define LOCALE_NEUTRAL MAKELCID(MAKELANGID(LANG_NEUTRAL,SUBLANG_NEUTRAL),SORT_DEFAULT)
-#define ACL_REVISION 2
-#define ACL_REVISION_DS 4
-#define ACL_REVISION1 1
-#define ACL_REVISION2 2
-#define ACL_REVISION3 3
-#define ACL_REVISION4 4
-#define MIN_ACL_REVISION 2
-#define MAX_ACL_REVISION 4
-#define MINCHAR 0x80
-#define MAXCHAR 0x7f
-#define MINSHORT 0x8000
-#define MAXSHORT 0x7fff
-#define MINLONG 0x80000000
-#define MAXLONG 0x7fffffff
-#define MAXBYTE 0xff
-#define MAXWORD 0xffff
-#define MAXDWORD 0xffffffff
-#define PROCESSOR_INTEL_386 386
-#define PROCESSOR_INTEL_486 486
-#define PROCESSOR_INTEL_PENTIUM 586
-#define PROCESSOR_MIPS_R4000 4000
-#define PROCESSOR_ALPHA_21064 21064
-#define PROCESSOR_INTEL_IA64 2200
-#define PROCESSOR_ARCHITECTURE_INTEL 0
-#define PROCESSOR_ARCHITECTURE_MIPS 1
-#define PROCESSOR_ARCHITECTURE_ALPHA 2
-#define PROCESSOR_ARCHITECTURE_PPC 3
-#define PROCESSOR_ARCHITECTURE_SHX 4
-#define PROCESSOR_ARCHITECTURE_ARM 5
-#define PROCESSOR_ARCHITECTURE_IA64 6
-#define PROCESSOR_ARCHITECTURE_ALPHA64 7
-#define PROCESSOR_ARCHITECTURE_MSIL 8
-#define PROCESSOR_ARCHITECTURE_AMD64 9
-#define PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 10
-#define PROCESSOR_ARCHITECTURE_UNKNOWN 0xFFFF
-#define PF_FLOATING_POINT_PRECISION_ERRATA 0
-#define PF_FLOATING_POINT_EMULATED 1
-#define PF_COMPARE_EXCHANGE_DOUBLE 2
-#define PF_MMX_INSTRUCTIONS_AVAILABLE 3
-#define PF_PPC_MOVEMEM_64BIT_OK 4
-#define PF_ALPHA_BYTE_INSTRUCTIONS 5
-#define PF_XMMI_INSTRUCTIONS_AVAILABLE 6
-#define PF_3DNOW_INSTRUCTIONS_AVAILABLE 7
-#define PF_RDTSC_INSTRUCTION_AVAILABLE 8
-#define PF_PAE_ENABLED 9
-#define PF_XMMI64_INSTRUCTIONS_AVAILABLE 10
-/* also in ddk/ntifs.h */
-#define FILE_ACTION_ADDED 0x00000001
-#define FILE_ACTION_REMOVED 0x00000002
-#define FILE_ACTION_MODIFIED 0x00000003
-#define FILE_ACTION_RENAMED_OLD_NAME 0x00000004
-#define FILE_ACTION_RENAMED_NEW_NAME 0x00000005
-#define FILE_ACTION_ADDED_STREAM 0x00000006
-#define FILE_ACTION_REMOVED_STREAM 0x00000007
-#define FILE_ACTION_MODIFIED_STREAM 0x00000008
-#define FILE_ACTION_REMOVED_BY_DELETE 0x00000009
-#define FILE_ACTION_ID_NOT_TUNNELLED 0x0000000A
-#define FILE_ACTION_TUNNELLED_ID_COLLISION 0x0000000B
-/* end ntifs.h */
-#define HEAP_NO_SERIALIZE 1
-#define HEAP_GROWABLE 2
-#define HEAP_GENERATE_EXCEPTIONS 4
-#define HEAP_ZERO_MEMORY 8
-#define HEAP_REALLOC_IN_PLACE_ONLY 16
-#define HEAP_TAIL_CHECKING_ENABLED 32
-#define HEAP_FREE_CHECKING_ENABLED 64
-#define HEAP_DISABLE_COALESCE_ON_FREE 128
-#define HEAP_CREATE_ALIGN_16 0x0000
-#define HEAP_CREATE_ENABLE_TRACING 0x20000
-#define HEAP_MAXIMUM_TAG 0xFFF
-#define HEAP_PSEUDO_TAG_FLAG 0x8000
-#define HEAP_TAG_SHIFT 16
-#define HEAP_MAKE_TAG_FLAGS(b,o) ((DWORD)((b)+(o)<<16)))
-#define KEY_QUERY_VALUE 1
-#define KEY_SET_VALUE 2
-#define KEY_CREATE_SUB_KEY 4
-#define KEY_ENUMERATE_SUB_KEYS 8
-#define KEY_NOTIFY 16
-#define KEY_CREATE_LINK 32
-#define KEY_WRITE 0x20006
-#define KEY_EXECUTE 0x20019
-#define KEY_READ 0x20019
-#if (_WIN32_WINNT >= 0x0502)
-#define KEY_WOW64_64KEY 0x0100
-#define KEY_WOW64_32KEY 0x0200
-#endif
-#define KEY_ALL_ACCESS 0xf003f
-#define REG_WHOLE_HIVE_VOLATILE 1
-#define REG_REFRESH_HIVE 2
-#define REG_NO_LAZY_FLUSH 4
-#define REG_OPTION_RESERVED 0
-#define REG_OPTION_NON_VOLATILE 0
-#define REG_OPTION_VOLATILE 1
-#define REG_OPTION_CREATE_LINK 2
-#define REG_OPTION_BACKUP_RESTORE 4
-#define REG_OPTION_OPEN_LINK 8
-#define REG_LEGAL_OPTION 15
-#define OWNER_SECURITY_INFORMATION 0x00000001
-#define GROUP_SECURITY_INFORMATION 0x00000002
-#define DACL_SECURITY_INFORMATION 0x00000004
-#define SACL_SECURITY_INFORMATION 0x00000008
-#define LABEL_SECURITY_INFORMATION 0x00000010
-#define UNPROTECTED_SACL_SECURITY_INFORMATION 0x10000000
-#define UNPROTECTED_DACL_SECURITY_INFORMATION 0x20000000
-#define PROTECTED_SACL_SECURITY_INFORMATION 0x40000000
-#define PROTECTED_DACL_SECURITY_INFORMATION 0x80000000
-#define MAXIMUM_PROCESSORS 32
-#define PAGE_NOACCESS 0x0001
-#define PAGE_READONLY 0x0002
-#define PAGE_READWRITE 0x0004
-#define PAGE_WRITECOPY 0x0008
-#define PAGE_EXECUTE 0x0010
-#define PAGE_EXECUTE_READ 0x0020
-#define PAGE_EXECUTE_READWRITE 0x0040
-#define PAGE_EXECUTE_WRITECOPY 0x0080
-#define PAGE_GUARD 0x0100
-#define PAGE_NOCACHE 0x0200
-#define MEM_COMMIT 0x1000
-#define MEM_RESERVE 0x2000
-#define MEM_DECOMMIT 0x4000
-#define MEM_RELEASE 0x8000
-#define MEM_FREE 0x10000
-#define MEM_PRIVATE 0x20000
-#define MEM_MAPPED 0x40000
-#define MEM_RESET 0x80000
-#define MEM_TOP_DOWN 0x100000
-#define MEM_WRITE_WATCH 0x200000 /* 98/Me */
-#define MEM_PHYSICAL 0x400000
-#define MEM_4MB_PAGES 0x80000000
-/* also in ddk/ntifs.h */
-#define MEM_IMAGE SEC_IMAGE
-#define SEC_BASED 0x00200000
-#define SEC_NO_CHANGE 0x00400000
-#define SEC_FILE 0x00800000
-#define SEC_IMAGE 0x01000000
-#define SEC_VLM 0x02000000
-#define SEC_RESERVE 0x04000000
-#define SEC_COMMIT 0x08000000
-#define SEC_NOCACHE 0x10000000
-/* end ntifs.h */
-#define SECTION_EXTEND_SIZE 16
-#define SECTION_MAP_READ 4
-#define SECTION_MAP_WRITE 2
-#define SECTION_QUERY 1
-#define SECTION_MAP_EXECUTE 8
-#define SECTION_ALL_ACCESS 0xf001f
-#define MESSAGE_RESOURCE_UNICODE 1
-#define RTL_CRITSECT_TYPE 0
-#define RTL_RESOURCE_TYPE 1
-/* Also in winddk.h */
-#define FIELD_OFFSET(t,f) ((LONG)&(((t*)0)->f))
-#ifndef CONTAINING_RECORD
-#define CONTAINING_RECORD(address, type, field) \
- ((type*)((PCHAR)(address) - (PCHAR)(&((type *)0)->field)))
-#endif
-/* end winddk.h */
-#define IMAGE_SIZEOF_FILE_HEADER 20
-#define IMAGE_FILE_RELOCS_STRIPPED 1
-#define IMAGE_FILE_EXECUTABLE_IMAGE 2
-#define IMAGE_FILE_LINE_NUMS_STRIPPED 4
-#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 8
-#define IMAGE_FILE_AGGRESIVE_WS_TRIM 16
-#define IMAGE_FILE_LARGE_ADDRESS_AWARE 32
-#define IMAGE_FILE_BYTES_REVERSED_LO 128
-#define IMAGE_FILE_32BIT_MACHINE 256
-#define IMAGE_FILE_DEBUG_STRIPPED 512
-#define IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP 1024
-#define IMAGE_FILE_NET_RUN_FROM_SWAP 2048
-#define IMAGE_FILE_SYSTEM 4096
-#define IMAGE_FILE_DLL 8192
-#define IMAGE_FILE_UP_SYSTEM_ONLY 16384
-#define IMAGE_FILE_BYTES_REVERSED_HI 32768
-
-#define IMAGE_FILE_MACHINE_UNKNOWN 0x0000
-#define IMAGE_FILE_MACHINE_AM33 0x01d3 /* Matsushita AM33 */
-#define IMAGE_FILE_MACHINE_AMD64 0x8664 /* x64 */
-#define IMAGE_FILE_MACHINE_ARM 0x01c0 /* ARM little endian */
-#define IMAGE_FILE_MACHINE_EBC 0x0ebc /* EFI byte code */
-#define IMAGE_FILE_MACHINE_I386 0x014c /* Intel 386 or later processors
- and compatible processors */
-#define IMAGE_FILE_MACHINE_IA64 0x0200 /* Intel Itanium processor family */
-#define IMAGE_FILE_MACHINE_M32R 0x9041 /* Mitsubishi M32R little endian */
-#define IMAGE_FILE_MACHINE_MIPS16 0x0266 /* MIPS16 */
-#define IMAGE_FILE_MACHINE_MIPSFPU 0x0366 /* MIPS with FPU */
-#define IMAGE_FILE_MACHINE_MIPSFPU16 0x0466 /* MIPS16 with FPU */
-#define IMAGE_FILE_MACHINE_POWERPC 0x01f0 /* Power PC little endian */
-#define IMAGE_FILE_MACHINE_POWERPCFP 0x01f1 /* Power PC with floating point support */
-#define IMAGE_FILE_MACHINE_R4000 0x0166 /* MIPS little endian */
-#define IMAGE_FILE_MACHINE_SH3 0x01a2 /* Hitachi SH3 */
-#define IMAGE_FILE_MACHINE_SH3DSP 0x01a3 /* Hitachi SH3 DSP */
-#define IMAGE_FILE_MACHINE_SH4 0x01a6 /* Hitachi SH4 */
-#define IMAGE_FILE_MACHINE_SH5 0x01a8 /* Hitachi SH5 */
-#define IMAGE_FILE_MACHINE_THUMB 0x01c2 /* Thumb */
-#define IMAGE_FILE_MACHINE_WCEMIPSV2 0x0169 /* MIPS little-endian WCE v2 */
-
-#define IMAGE_DOS_SIGNATURE 0x5A4D
-#define IMAGE_OS2_SIGNATURE 0x454E
-#define IMAGE_OS2_SIGNATURE_LE 0x454C
-#define IMAGE_VXD_SIGNATURE 0x454C
-#define IMAGE_NT_SIGNATURE 0x00004550
-#define IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x10b
-#define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b
-#ifdef _WIN64
-#define IMAGE_NT_OPTIONAL_HDR_MAGIC IMAGE_NT_OPTIONAL_HDR64_MAGIC
-#else
-#define IMAGE_NT_OPTIONAL_HDR_MAGIC IMAGE_NT_OPTIONAL_HDR32_MAGIC
-#endif
-#define IMAGE_ROM_OPTIONAL_HDR_MAGIC 0x107
-#define IMAGE_SEPARATE_DEBUG_SIGNATURE 0x4944
-#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
-#define IMAGE_SIZEOF_ROM_OPTIONAL_HEADER 56
-#define IMAGE_SIZEOF_STD_OPTIONAL_HEADER 28
-#define IMAGE_SIZEOF_NT_OPTIONAL_HEADER 224
-#define IMAGE_SIZEOF_SHORT_NAME 8
-#define IMAGE_SIZEOF_SECTION_HEADER 40
-#define IMAGE_SIZEOF_SYMBOL 18
-#define IMAGE_SIZEOF_AUX_SYMBOL 18
-#define IMAGE_SIZEOF_RELOCATION 10
-#define IMAGE_SIZEOF_BASE_RELOCATION 8
-#define IMAGE_SIZEOF_LINENUMBER 6
-#define IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR 60
-#define SIZEOF_RFPO_DATA 16
-
-#define IMAGE_SUBSYSTEM_UNKNOWN 0
-#define IMAGE_SUBSYSTEM_NATIVE 1
-#define IMAGE_SUBSYSTEM_WINDOWS_GUI 2
-#define IMAGE_SUBSYSTEM_WINDOWS_CUI 3
-#define IMAGE_SUBSYSTEM_OS2_CUI 5 /* Not in PECOFF v8 spec */
-#define IMAGE_SUBSYSTEM_POSIX_CUI 7
-#define IMAGE_SUBSYSTEM_NATIVE_WINDOWS 8 /* Not in PECOFF v8 spec */
-#define IMAGE_SUBSYSTEM_WINDOWS_CE_GUI 9
-#define IMAGE_SUBSYSTEM_EFI_APPLICATION 10
-#define IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11
-#define IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12
-#define IMAGE_SUBSYSTEM_EFI_ROM 13
-#define IMAGE_SUBSYSTEM_XBOX 14
-
-#define IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE 0x0040
-#define IMAGE_DLL_CHARACTERISTICS_FORCE_INTEGRITY 0x0080
-#define IMAGE_DLL_CHARACTERISTICS_NX_COMPAT 0x0100
-#define IMAGE_DLLCHARACTERISTICS_NO_ISOLATION 0x0200
-#define IMAGE_DLLCHARACTERISTICS_NO_SEH 0x0400
-#define IMAGE_DLLCHARACTERISTICS_NO_BIND 0x0800
-#define IMAGE_DLLCHARACTERISTICS_WDM_DRIVER 0x2000
-#define IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE 0x8000
-
-#define IMAGE_FIRST_SECTION(h) ((PIMAGE_SECTION_HEADER) ((DWORD)h+FIELD_OFFSET(IMAGE_NT_HEADERS,OptionalHeader)+((PIMAGE_NT_HEADERS)(h))->FileHeader.SizeOfOptionalHeader))
-#define IMAGE_DIRECTORY_ENTRY_EXPORT 0
-#define IMAGE_DIRECTORY_ENTRY_IMPORT 1
-#define IMAGE_DIRECTORY_ENTRY_RESOURCE 2
-#define IMAGE_DIRECTORY_ENTRY_EXCEPTION 3
-#define IMAGE_DIRECTORY_ENTRY_SECURITY 4
-#define IMAGE_DIRECTORY_ENTRY_BASERELOC 5
-#define IMAGE_DIRECTORY_ENTRY_DEBUG 6
-#define IMAGE_DIRECTORY_ENTRY_COPYRIGHT 7
-#define IMAGE_DIRECTORY_ENTRY_ARCHITECTURE 7
-#define IMAGE_DIRECTORY_ENTRY_GLOBALPTR 8
-#define IMAGE_DIRECTORY_ENTRY_TLS 9
-#define IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG 10
-#define IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT 11
-#define IMAGE_DIRECTORY_ENTRY_IAT 12
-#define IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT 13
-#define IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR 14
-#define IMAGE_SCN_TYPE_REG 0
-#define IMAGE_SCN_TYPE_DSECT 1
-#define IMAGE_SCN_TYPE_NOLOAD 2
-#define IMAGE_SCN_TYPE_GROUP 4
-#define IMAGE_SCN_TYPE_NO_PAD 8
-#define IMAGE_SCN_TYPE_COPY 16
-#define IMAGE_SCN_CNT_CODE 32
-#define IMAGE_SCN_CNT_INITIALIZED_DATA 64
-#define IMAGE_SCN_CNT_UNINITIALIZED_DATA 128
-#define IMAGE_SCN_LNK_OTHER 256
-#define IMAGE_SCN_LNK_INFO 512
-#define IMAGE_SCN_TYPE_OVER 1024
-#define IMAGE_SCN_LNK_REMOVE 2048
-#define IMAGE_SCN_LNK_COMDAT 4096
-#define IMAGE_SCN_GPREL 0x8000 /* Valid only for IA64 */
-#define IMAGE_SCN_MEM_FARDATA 0x8000 /* Not in PECOFF v8 spec */
-#define IMAGE_SCN_MEM_PURGEABLE 0x20000
-#define IMAGE_SCN_MEM_16BIT 0x20000
-#define IMAGE_SCN_MEM_LOCKED 0x40000
-#define IMAGE_SCN_MEM_PRELOAD 0x80000
-#define IMAGE_SCN_ALIGN_1BYTES 0x100000
-#define IMAGE_SCN_ALIGN_2BYTES 0x200000
-#define IMAGE_SCN_ALIGN_4BYTES 0x300000
-#define IMAGE_SCN_ALIGN_8BYTES 0x400000
-#define IMAGE_SCN_ALIGN_16BYTES 0x500000
-#define IMAGE_SCN_ALIGN_32BYTES 0x600000
-#define IMAGE_SCN_ALIGN_64BYTES 0x700000
-#define IMAGE_SCN_ALIGN_128BYTES 0x800000
-#define IMAGE_SCN_ALIGN_256BYTES 0x900000
-#define IMAGE_SCN_ALIGN_512BYTES 0xa00000
-#define IMAGE_SCN_ALIGN_1024BYTES 0xb00000
-#define IMAGE_SCN_ALIGN_2048BYTES 0xc00000
-#define IMAGE_SCN_ALIGN_4096BYTES 0xd00000
-#define IMAGE_SCN_ALIGN_8192BYTES 0xe00000
-#define IMAGE_SCN_LNK_NRELOC_OVFL 0x1000000
-#define IMAGE_SCN_MEM_DISCARDABLE 0x2000000
-#define IMAGE_SCN_MEM_NOT_CACHED 0x4000000
-#define IMAGE_SCN_MEM_NOT_PAGED 0x8000000
-#define IMAGE_SCN_MEM_SHARED 0x10000000
-#define IMAGE_SCN_MEM_EXECUTE 0x20000000
-#define IMAGE_SCN_MEM_READ 0x40000000
-#define IMAGE_SCN_MEM_WRITE 0x80000000
-#define IMAGE_SYM_UNDEFINED 0
-#define IMAGE_SYM_ABSOLUTE (-1)
-#define IMAGE_SYM_DEBUG (-2)
-#define IMAGE_SYM_TYPE_NULL 0
-#define IMAGE_SYM_TYPE_VOID 1
-#define IMAGE_SYM_TYPE_CHAR 2
-#define IMAGE_SYM_TYPE_SHORT 3
-#define IMAGE_SYM_TYPE_INT 4
-#define IMAGE_SYM_TYPE_LONG 5
-#define IMAGE_SYM_TYPE_FLOAT 6
-#define IMAGE_SYM_TYPE_DOUBLE 7
-#define IMAGE_SYM_TYPE_STRUCT 8
-#define IMAGE_SYM_TYPE_UNION 9
-#define IMAGE_SYM_TYPE_ENUM 10
-#define IMAGE_SYM_TYPE_MOE 11
-#define IMAGE_SYM_TYPE_BYTE 12
-#define IMAGE_SYM_TYPE_WORD 13
-#define IMAGE_SYM_TYPE_UINT 14
-#define IMAGE_SYM_TYPE_DWORD 15
-#define IMAGE_SYM_TYPE_PCODE 32768
-#define IMAGE_SYM_DTYPE_NULL 0
-#define IMAGE_SYM_DTYPE_POINTER 1
-#define IMAGE_SYM_DTYPE_FUNCTION 2
-#define IMAGE_SYM_DTYPE_ARRAY 3
-#define IMAGE_SYM_CLASS_END_OF_FUNCTION (-1)
-#define IMAGE_SYM_CLASS_NULL 0
-#define IMAGE_SYM_CLASS_AUTOMATIC 1
-#define IMAGE_SYM_CLASS_EXTERNAL 2
-#define IMAGE_SYM_CLASS_STATIC 3
-#define IMAGE_SYM_CLASS_REGISTER 4
-#define IMAGE_SYM_CLASS_EXTERNAL_DEF 5
-#define IMAGE_SYM_CLASS_LABEL 6
-#define IMAGE_SYM_CLASS_UNDEFINED_LABEL 7
-#define IMAGE_SYM_CLASS_MEMBER_OF_STRUCT 8
-#define IMAGE_SYM_CLASS_ARGUMENT 9
-#define IMAGE_SYM_CLASS_STRUCT_TAG 10
-#define IMAGE_SYM_CLASS_MEMBER_OF_UNION 11
-#define IMAGE_SYM_CLASS_UNION_TAG 12
-#define IMAGE_SYM_CLASS_TYPE_DEFINITION 13
-#define IMAGE_SYM_CLASS_UNDEFINED_STATIC 14
-#define IMAGE_SYM_CLASS_ENUM_TAG 15
-#define IMAGE_SYM_CLASS_MEMBER_OF_ENUM 16
-#define IMAGE_SYM_CLASS_REGISTER_PARAM 17
-#define IMAGE_SYM_CLASS_BIT_FIELD 18
-#define IMAGE_SYM_CLASS_FAR_EXTERNAL 68 /* Not in PECOFF v8 spec */
-#define IMAGE_SYM_CLASS_BLOCK 100
-#define IMAGE_SYM_CLASS_FUNCTION 101
-#define IMAGE_SYM_CLASS_END_OF_STRUCT 102
-#define IMAGE_SYM_CLASS_FILE 103
-#define IMAGE_SYM_CLASS_SECTION 104
-#define IMAGE_SYM_CLASS_WEAK_EXTERNAL 105
-#define IMAGE_SYM_CLASS_CLR_TOKEN 107
-
-#define IMAGE_COMDAT_SELECT_NODUPLICATES 1
-#define IMAGE_COMDAT_SELECT_ANY 2
-#define IMAGE_COMDAT_SELECT_SAME_SIZE 3
-#define IMAGE_COMDAT_SELECT_EXACT_MATCH 4
-#define IMAGE_COMDAT_SELECT_ASSOCIATIVE 5
-#define IMAGE_COMDAT_SELECT_LARGEST 6
-#define IMAGE_COMDAT_SELECT_NEWEST 7 /* Not in PECOFF v8 spec */
-
-#define IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY 1
-#define IMAGE_WEAK_EXTERN_SEARCH_LIBRARY 2
-#define IMAGE_WEAK_EXTERN_SEARCH_ALIAS 3
-
-#define IMAGE_REL_I386_ABSOLUTE 0x0000
-#define IMAGE_REL_I386_DIR16 0x0001
-#define IMAGE_REL_I386_REL16 0x0002
-#define IMAGE_REL_I386_DIR32 0x0006
-#define IMAGE_REL_I386_DIR32NB 0x0007
-#define IMAGE_REL_I386_SEG12 0x0009
-#define IMAGE_REL_I386_SECTION 0x000A
-#define IMAGE_REL_I386_SECREL 0x000B
-#define IMAGE_REL_I386_TOKEN 0x000C
-#define IMAGE_REL_I386_SECREL7 0x000D
-#define IMAGE_REL_I386_REL32 0x0014
-
-#define IMAGE_REL_AMD64_ABSOLUTE 0x0000
-#define IMAGE_REL_AMD64_ADDR64 0x0001
-#define IMAGE_REL_AMD64_ADDR32 0x0002
-#define IMAGE_REL_AMD64_ADDR32NB 0x0003
-#define IMAGE_REL_AMD64_REL32 0x0004
-#define IMAGE_REL_AMD64_REL32_1 0x0005
-#define IMAGE_REL_AMD64_REL32_2 0x0006
-#define IMAGE_REL_AMD64_REL32_3 0x0007
-#define IMAGE_REL_AMD64_REL32_4 0x0008
-#define IMAGE_REL_AMD64_REL32_5 0x0009
-#define IMAGE_REL_AMD64_SECTION 0x000A
-#define IMAGE_REL_AMD64_SECREL 0x000B
-#define IMAGE_REL_AMD64_SECREL7 0x000C
-#define IMAGE_REL_AMD64_TOKEN 0x000D
-#define IMAGE_REL_AMD64_SREL32 0x000E
-#define IMAGE_REL_AMD64_PAIR 0x000F
-#define IMAGE_REL_AMD64_SSPAN32 0x0010
-
-#define IMAGE_REL_IA64_ABSOLUTE 0x0000
-#define IMAGE_REL_IA64_IMM14 0x0001
-#define IMAGE_REL_IA64_IMM22 0x0002
-#define IMAGE_REL_IA64_IMM64 0x0003
-#define IMAGE_REL_IA64_DIR32 0x0004
-#define IMAGE_REL_IA64_DIR64 0x0005
-#define IMAGE_REL_IA64_PCREL21B 0x0006
-#define IMAGE_REL_IA64_PCREL21M 0x0007
-#define IMAGE_REL_IA64_PCREL21F 0x0008
-#define IMAGE_REL_IA64_GPREL22 0x0009
-#define IMAGE_REL_IA64_LTOFF22 0x000A
-#define IMAGE_REL_IA64_SECTION 0x000B
-#define IMAGE_REL_IA64_SECREL22 0x000C
-#define IMAGE_REL_IA64_SECREL64I 0x000D
-#define IMAGE_REL_IA64_SECREL32 0x000E
-#define IMAGE_REL_IA64_DIR32NB 0x0010
-#define IMAGE_REL_IA64_SREL14 0x0011
-#define IMAGE_REL_IA64_SREL22 0x0012
-#define IMAGE_REL_IA64_SREL32 0x0013
-#define IMAGE_REL_IA64_UREL32 0x0014
-#define IMAGE_REL_IA64_PCREL60X 0x0015
-#define IMAGE_REL_IA64_PCREL60B 0x0016
-#define IMAGE_REL_IA64_PCREL60F 0x0017
-#define IMAGE_REL_IA64_PCREL60I 0x0018
-#define IMAGE_REL_IA64_PCREL60M 0x0019
-#define IMAGE_REL_IA64_IMMGPREL64 0x001a
-#define IMAGE_REL_IA64_TOKEN 0x001b
-#define IMAGE_REL_IA64_GPREL32 0x001c
-#define IMAGE_REL_IA64_ADDEND 0x001F
-
-#define IMAGE_REL_SH3_ABSOLUTE 0x0000
-#define IMAGE_REL_SH3_DIRECT16 0x0001
-#define IMAGE_REL_SH3_DIRECT32 0x0002
-#define IMAGE_REL_SH3_DIRECT8 0x0003
-#define IMAGE_REL_SH3_DIRECT8_WORD 0x0004
-#define IMAGE_REL_SH3_DIRECT8_LONG 0x0005
-#define IMAGE_REL_SH3_DIRECT4 0x0006
-#define IMAGE_REL_SH3_DIRECT4_WORD 0x0007
-#define IMAGE_REL_SH3_DIRECT4_LONG 0x0008
-#define IMAGE_REL_SH3_PCREL8_WORD 0x0009
-#define IMAGE_REL_SH3_PCREL8_LONG 0x000A
-#define IMAGE_REL_SH3_PCREL12_WORD 0x000B
-#define IMAGE_REL_SH3_STARTOF_SECTION 0x000C
-#define IMAGE_REL_SH3_SIZEOF_SECTION 0x000D
-#define IMAGE_REL_SH3_SECTION 0x000E
-#define IMAGE_REL_SH3_SECREL 0x000F
-#define IMAGE_REL_SH3_DIRECT32_NB 0x0010
-#define IMAGE_REL_SH3_GPREL4_LONG 0x0011
-#define IMAGE_REL_SH3_TOKEN 0x0012
-#define IMAGE_REL_SHM_PCRELPT 0x0013
-#define IMAGE_REL_SHM_REFLO 0x0014
-#define IMAGE_REL_SHM_REFHALF 0x0015
-#define IMAGE_REL_SHM_RELLO 0x0016
-#define IMAGE_REL_SHM_RELHALF 0x0017
-#define IMAGE_REL_SHM_PAIR 0x0018
-#define IMAGE_REL_SHM_NOMODE 0x8000
-
-#define IMAGE_REL_M32R_ABSOLUTE 0x0000
-#define IMAGE_REL_M32R_ADDR32 0x0001
-#define IMAGE_REL_M32R_ADDR32NB 0x0002
-#define IMAGE_REL_M32R_ADDR24 0x0003
-#define IMAGE_REL_M32R_GPREL16 0x0004
-#define IMAGE_REL_M32R_PCREL24 0x0005
-#define IMAGE_REL_M32R_PCREL16 0x0006
-#define IMAGE_REL_M32R_PCREL8 0x0007
-#define IMAGE_REL_M32R_REFHALF 0x0008
-#define IMAGE_REL_M32R_REFHI 0x0009
-#define IMAGE_REL_M32R_REFLO 0x000A
-#define IMAGE_REL_M32R_PAIR 0x000B
-#define IMAGE_REL_M32R_SECTION 0x000C
-#define IMAGE_REL_M32R_SECREL 0x000D
-#define IMAGE_REL_M32R_TOKEN 0x000E
-
-#define IMAGE_REL_MIPS_ABSOLUTE 0x0000
-#define IMAGE_REL_MIPS_REFHALF 0x0001
-#define IMAGE_REL_MIPS_REFWORD 0x0002
-#define IMAGE_REL_MIPS_JMPADDR 0x0003
-#define IMAGE_REL_MIPS_REFHI 0x0004
-#define IMAGE_REL_MIPS_REFLO 0x0005
-#define IMAGE_REL_MIPS_GPREL 0x0006
-#define IMAGE_REL_MIPS_LITERAL 0x0007
-#define IMAGE_REL_MIPS_SECTION 0x000A
-#define IMAGE_REL_MIPS_SECREL 0x000B
-#define IMAGE_REL_MIPS_SECRELLO 0x000C
-#define IMAGE_REL_MIPS_SECRELHI 0x000D
-#define IMAGE_REL_MIPS_JMPADDR16 0x0010
-#define IMAGE_REL_MIPS_REFWORDNB 0x0022
-#define IMAGE_REL_MIPS_PAIR 0x0025
-
-#define IMAGE_REL_ALPHA_ABSOLUTE 0
-#define IMAGE_REL_ALPHA_REFLONG 1
-#define IMAGE_REL_ALPHA_REFQUAD 2
-#define IMAGE_REL_ALPHA_GPREL32 3
-#define IMAGE_REL_ALPHA_LITERAL 4
-#define IMAGE_REL_ALPHA_LITUSE 5
-#define IMAGE_REL_ALPHA_GPDISP 6
-#define IMAGE_REL_ALPHA_BRADDR 7
-#define IMAGE_REL_ALPHA_HINT 8
-#define IMAGE_REL_ALPHA_INLINE_REFLONG 9
-#define IMAGE_REL_ALPHA_REFHI 10
-#define IMAGE_REL_ALPHA_REFLO 11
-#define IMAGE_REL_ALPHA_PAIR 12
-#define IMAGE_REL_ALPHA_MATCH 13
-#define IMAGE_REL_ALPHA_SECTION 14
-#define IMAGE_REL_ALPHA_SECREL 15
-#define IMAGE_REL_ALPHA_REFLONGNB 16
-#define IMAGE_REL_ALPHA_SECRELLO 17
-#define IMAGE_REL_ALPHA_SECRELHI 18
-#define IMAGE_REL_PPC_ABSOLUTE 0
-#define IMAGE_REL_PPC_ADDR64 1
-#define IMAGE_REL_PPC_ADDR32 2
-#define IMAGE_REL_PPC_ADDR24 3
-#define IMAGE_REL_PPC_ADDR16 4
-#define IMAGE_REL_PPC_ADDR14 5
-#define IMAGE_REL_PPC_REL24 6
-#define IMAGE_REL_PPC_REL14 7
-#define IMAGE_REL_PPC_TOCREL16 8
-#define IMAGE_REL_PPC_TOCREL14 9
-#define IMAGE_REL_PPC_ADDR32NB 10
-#define IMAGE_REL_PPC_SECREL 11
-#define IMAGE_REL_PPC_SECTION 12
-#define IMAGE_REL_PPC_IFGLUE 13
-#define IMAGE_REL_PPC_IMGLUE 14
-#define IMAGE_REL_PPC_SECREL16 15
-#define IMAGE_REL_PPC_REFHI 16
-#define IMAGE_REL_PPC_REFLO 17
-#define IMAGE_REL_PPC_PAIR 18
-#define IMAGE_REL_PPC_TYPEMASK 255
-#define IMAGE_REL_PPC_NEG 256
-#define IMAGE_REL_PPC_BRTAKEN 512
-#define IMAGE_REL_PPC_BRNTAKEN 1024
-#define IMAGE_REL_PPC_TOCDEFN 2048
-#define IMAGE_REL_BASED_ABSOLUTE 0
-#define IMAGE_REL_BASED_HIGH 1
-#define IMAGE_REL_BASED_LOW 2
-#define IMAGE_REL_BASED_HIGHLOW 3
-#define IMAGE_REL_BASED_HIGHADJ 4
-#define IMAGE_REL_BASED_MIPS_JMPADDR 5
-#define IMAGE_ARCHIVE_START_SIZE 8
-#define IMAGE_ARCHIVE_START "!<arch>\n"
-#define IMAGE_ARCHIVE_END "`\n"
-#define IMAGE_ARCHIVE_PAD "\n"
-#define IMAGE_ARCHIVE_LINKER_MEMBER "/ "
-#define IMAGE_ARCHIVE_LONGNAMES_MEMBER "// "
-#define IMAGE_ORDINAL_FLAG32 0x80000000
-#define IMAGE_SNAP_BY_ORDINAL32(o) ((o&IMAGE_ORDINAL_FLAG32)!=0)
-#define IMAGE_ORDINAL32(o) (o&0xffff)
-#define IMAGE_ORDINAL_FLAG64 0x8000000000000000ULL
-#define IMAGE_SNAP_BY_ORDINAL64(o) ((o&IMAGE_ORDINAL_FLAG64)!=0)
-#define IMAGE_ORDINAL64(o) (o&0xffff)
-#ifdef _WIN64
-#define IMAGE_ORDINAL_FLAG IMAGE_ORDINAL_FLAG64
-#define IMAGE_SNAP_BY_ORDINAL(o) IMAGE_SNAP_BY_ORDINAL64(o)
-#define IMAGE_ORDINAL(o) IMAGE_ORDINAL64(o)
-#else
-#define IMAGE_ORDINAL_FLAG IMAGE_ORDINAL_FLAG32
-#define IMAGE_SNAP_BY_ORDINAL(o) IMAGE_SNAP_BY_ORDINAL32(o)
-#define IMAGE_ORDINAL(o) IMAGE_ORDINAL32(o)
-#endif
-#define IMAGE_RESOURCE_NAME_IS_STRING 0x80000000
-#define IMAGE_RESOURCE_DATA_IS_DIRECTORY 0x80000000
-#define IMAGE_DEBUG_TYPE_UNKNOWN 0
-#define IMAGE_DEBUG_TYPE_COFF 1
-#define IMAGE_DEBUG_TYPE_CODEVIEW 2
-#define IMAGE_DEBUG_TYPE_FPO 3
-#define IMAGE_DEBUG_TYPE_MISC 4
-#define IMAGE_DEBUG_TYPE_EXCEPTION 5
-#define IMAGE_DEBUG_TYPE_FIXUP 6
-#define IMAGE_DEBUG_TYPE_OMAP_TO_SRC 7
-#define IMAGE_DEBUG_TYPE_OMAP_FROM_SRC 8
-#define IMAGE_DEBUG_TYPE_BORLAND 9
-#define FRAME_FPO 0
-#define FRAME_TRAP 1
-#define FRAME_TSS 2
-#define FRAME_NONFPO 3
-#define IMAGE_DEBUG_MISC_EXENAME 1
-#define N_BTMASK 0x000F
-#define N_TMASK 0x0030
-#define N_TMASK1 0x00C0
-#define N_TMASK2 0x00F0
-#define N_BTSHFT 4
-#define N_TSHIFT 2
-#define IS_TEXT_UNICODE_ASCII16 1
-#define IS_TEXT_UNICODE_REVERSE_ASCII16 16
-#define IS_TEXT_UNICODE_STATISTICS 2
-#define IS_TEXT_UNICODE_REVERSE_STATISTICS 32
-#define IS_TEXT_UNICODE_CONTROLS 4
-#define IS_TEXT_UNICODE_REVERSE_CONTROLS 64
-#define IS_TEXT_UNICODE_SIGNATURE 8
-#define IS_TEXT_UNICODE_REVERSE_SIGNATURE 128
-#define IS_TEXT_UNICODE_ILLEGAL_CHARS 256
-#define IS_TEXT_UNICODE_ODD_LENGTH 512
-#define IS_TEXT_UNICODE_NULL_BYTES 4096
-#define IS_TEXT_UNICODE_UNICODE_MASK 15
-#define IS_TEXT_UNICODE_REVERSE_MASK 240
-#define IS_TEXT_UNICODE_NOT_UNICODE_MASK 3840
-#define IS_TEXT_UNICODE_NOT_ASCII_MASK 61440
-#define SERVICE_KERNEL_DRIVER 1
-#define SERVICE_FILE_SYSTEM_DRIVER 2
-#define SERVICE_ADAPTER 4
-#define SERVICE_RECOGNIZER_DRIVER 8
-#define SERVICE_DRIVER (SERVICE_KERNEL_DRIVER|SERVICE_FILE_SYSTEM_DRIVER|SERVICE_RECOGNIZER_DRIVER)
-#define SERVICE_WIN32_OWN_PROCESS 16
-#define SERVICE_WIN32_SHARE_PROCESS 32
-#define SERVICE_WIN32 (SERVICE_WIN32_OWN_PROCESS|SERVICE_WIN32_SHARE_PROCESS)
-#define SERVICE_INTERACTIVE_PROCESS 256
-#define SERVICE_TYPE_ALL (SERVICE_WIN32|SERVICE_ADAPTER|SERVICE_DRIVER|SERVICE_INTERACTIVE_PROCESS)
-#define SERVICE_BOOT_START 0
-#define SERVICE_SYSTEM_START 1
-#define SERVICE_AUTO_START 2
-#define SERVICE_DEMAND_START 3
-#define SERVICE_DISABLED 4
-#define SERVICE_ERROR_IGNORE 0
-#define SERVICE_ERROR_NORMAL 1
-#define SERVICE_ERROR_SEVERE 2
-#define SERVICE_ERROR_CRITICAL 3
-#define SE_OWNER_DEFAULTED 1
-#define SE_GROUP_DEFAULTED 2
-#define SE_DACL_PRESENT 4
-#define SE_DACL_DEFAULTED 8
-#define SE_SACL_PRESENT 16
-#define SE_SACL_DEFAULTED 32
-#define SE_DACL_AUTO_INHERIT_REQ 256
-#define SE_SACL_AUTO_INHERIT_REQ 512
-#define SE_DACL_AUTO_INHERITED 1024
-#define SE_SACL_AUTO_INHERITED 2048
-#define SE_DACL_PROTECTED 4096
-#define SE_SACL_PROTECTED 8192
-#define SE_SELF_RELATIVE 0x8000
-#define SECURITY_DESCRIPTOR_MIN_LENGTH 20
-#define SECURITY_DESCRIPTOR_REVISION 1
-#define SECURITY_DESCRIPTOR_REVISION1 1
-#define SE_PRIVILEGE_ENABLED_BY_DEFAULT 1
-#define SE_PRIVILEGE_ENABLED 2
-#define SE_PRIVILEGE_USED_FOR_ACCESS 0x80000000
-#define PRIVILEGE_SET_ALL_NECESSARY 1
-#define SECURITY_MAX_IMPERSONATION_LEVEL SecurityDelegation
-#define DEFAULT_IMPERSONATION_LEVEL SecurityImpersonation
-#define SECURITY_DYNAMIC_TRACKING TRUE
-#define SECURITY_STATIC_TRACKING FALSE
-/* also in ddk/ntifs.h */
-#define TOKEN_ASSIGN_PRIMARY (0x0001)
-#define TOKEN_DUPLICATE (0x0002)
-#define TOKEN_IMPERSONATE (0x0004)
-#define TOKEN_QUERY (0x0008)
-#define TOKEN_QUERY_SOURCE (0x0010)
-#define TOKEN_ADJUST_PRIVILEGES (0x0020)
-#define TOKEN_ADJUST_GROUPS (0x0040)
-#define TOKEN_ADJUST_DEFAULT (0x0080)
-#define TOKEN_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED |\
- TOKEN_ASSIGN_PRIMARY |\
- TOKEN_DUPLICATE |\
- TOKEN_IMPERSONATE |\
- TOKEN_QUERY |\
- TOKEN_QUERY_SOURCE |\
- TOKEN_ADJUST_PRIVILEGES |\
- TOKEN_ADJUST_GROUPS |\
- TOKEN_ADJUST_DEFAULT)
-#define TOKEN_READ (STANDARD_RIGHTS_READ |\
- TOKEN_QUERY)
-#define TOKEN_WRITE (STANDARD_RIGHTS_WRITE |\
- TOKEN_ADJUST_PRIVILEGES |\
- TOKEN_ADJUST_GROUPS |\
- TOKEN_ADJUST_DEFAULT)
-
-#define TOKEN_EXECUTE (STANDARD_RIGHTS_EXECUTE)
-#define TOKEN_SOURCE_LENGTH 8
-/* end ddk/ntifs.h */
-#define DLL_PROCESS_DETACH 0
-#define DLL_PROCESS_ATTACH 1
-#define DLL_THREAD_ATTACH 2
-#define DLL_THREAD_DETACH 3
-#define DBG_CONTINUE 0x10002
-#define DBG_TERMINATE_THREAD 0x40010003
-#define DBG_TERMINATE_PROCESS 0x40010004
-#define DBG_CONTROL_C 0x40010005
-#define DBG_CONTROL_BREAK 0x40010008
-#define DBG_EXCEPTION_NOT_HANDLED 0x80010001
-#define TAPE_ABSOLUTE_POSITION 0
-#define TAPE_LOGICAL_POSITION 1
-#define TAPE_PSEUDO_LOGICAL_POSITION 2
-#define TAPE_REWIND 0
-#define TAPE_ABSOLUTE_BLOCK 1
-#define TAPE_LOGICAL_BLOCK 2
-#define TAPE_PSEUDO_LOGICAL_BLOCK 3
-#define TAPE_SPACE_END_OF_DATA 4
-#define TAPE_SPACE_RELATIVE_BLOCKS 5
-#define TAPE_SPACE_FILEMARKS 6
-#define TAPE_SPACE_SEQUENTIAL_FMKS 7
-#define TAPE_SPACE_SETMARKS 8
-#define TAPE_SPACE_SEQUENTIAL_SMKS 9
-#define TAPE_DRIVE_FIXED 1
-#define TAPE_DRIVE_SELECT 2
-#define TAPE_DRIVE_INITIATOR 4
-#define TAPE_DRIVE_ERASE_SHORT 16
-#define TAPE_DRIVE_ERASE_LONG 32
-#define TAPE_DRIVE_ERASE_BOP_ONLY 64
-#define TAPE_DRIVE_ERASE_IMMEDIATE 128
-#define TAPE_DRIVE_TAPE_CAPACITY 256
-#define TAPE_DRIVE_TAPE_REMAINING 512
-#define TAPE_DRIVE_FIXED_BLOCK 1024
-#define TAPE_DRIVE_VARIABLE_BLOCK 2048
-#define TAPE_DRIVE_WRITE_PROTECT 4096
-#define TAPE_DRIVE_EOT_WZ_SIZE 8192
-#define TAPE_DRIVE_ECC 0x10000
-#define TAPE_DRIVE_COMPRESSION 0x20000
-#define TAPE_DRIVE_PADDING 0x40000
-#define TAPE_DRIVE_REPORT_SMKS 0x80000
-#define TAPE_DRIVE_GET_ABSOLUTE_BLK 0x100000
-#define TAPE_DRIVE_GET_LOGICAL_BLK 0x200000
-#define TAPE_DRIVE_SET_EOT_WZ_SIZE 0x400000
-#define TAPE_DRIVE_EJECT_MEDIA 0x1000000
-#define TAPE_DRIVE_CLEAN_REQUESTS 0x2000000
-#define TAPE_DRIVE_SET_CMP_BOP_ONLY 0x4000000
-#define TAPE_DRIVE_RESERVED_BIT 0x80000000
-#define TAPE_DRIVE_LOAD_UNLOAD 0x80000001
-#define TAPE_DRIVE_TENSION 0x80000002
-#define TAPE_DRIVE_LOCK_UNLOCK 0x80000004
-#define TAPE_DRIVE_REWIND_IMMEDIATE 0x80000008
-#define TAPE_DRIVE_SET_BLOCK_SIZE 0x80000010
-#define TAPE_DRIVE_LOAD_UNLD_IMMED 0x80000020
-#define TAPE_DRIVE_TENSION_IMMED 0x80000040
-#define TAPE_DRIVE_LOCK_UNLK_IMMED 0x80000080
-#define TAPE_DRIVE_SET_ECC 0x80000100
-#define TAPE_DRIVE_SET_COMPRESSION 0x80000200
-#define TAPE_DRIVE_SET_PADDING 0x80000400
-#define TAPE_DRIVE_SET_REPORT_SMKS 0x80000800
-#define TAPE_DRIVE_ABSOLUTE_BLK 0x80001000
-#define TAPE_DRIVE_ABS_BLK_IMMED 0x80002000
-#define TAPE_DRIVE_LOGICAL_BLK 0x80004000
-#define TAPE_DRIVE_LOG_BLK_IMMED 0x80008000
-#define TAPE_DRIVE_END_OF_DATA 0x80010000
-#define TAPE_DRIVE_RELATIVE_BLKS 0x80020000
-#define TAPE_DRIVE_FILEMARKS 0x80040000
-#define TAPE_DRIVE_SEQUENTIAL_FMKS 0x80080000
-#define TAPE_DRIVE_SETMARKS 0x80100000
-#define TAPE_DRIVE_SEQUENTIAL_SMKS 0x80200000
-#define TAPE_DRIVE_REVERSE_POSITION 0x80400000
-#define TAPE_DRIVE_SPACE_IMMEDIATE 0x80800000
-#define TAPE_DRIVE_WRITE_SETMARKS 0x81000000
-#define TAPE_DRIVE_WRITE_FILEMARKS 0x82000000
-#define TAPE_DRIVE_WRITE_SHORT_FMKS 0x84000000
-#define TAPE_DRIVE_WRITE_LONG_FMKS 0x88000000
-#define TAPE_DRIVE_WRITE_MARK_IMMED 0x90000000
-#define TAPE_DRIVE_FORMAT 0xA0000000
-#define TAPE_DRIVE_FORMAT_IMMEDIATE 0xC0000000
-#define TAPE_DRIVE_HIGH_FEATURES 0x80000000
-#define TAPE_FIXED_PARTITIONS 0
-#define TAPE_INITIATOR_PARTITIONS 2
-#define TAPE_SELECT_PARTITIONS 1
-#define TAPE_FILEMARKS 1
-#define TAPE_LONG_FILEMARKS 3
-#define TAPE_SETMARKS 0
-#define TAPE_SHORT_FILEMARKS 2
-#define TAPE_ERASE_LONG 1
-#define TAPE_ERASE_SHORT 0
-#define TAPE_LOAD 0
-#define TAPE_UNLOAD 1
-#define TAPE_TENSION 2
-#define TAPE_LOCK 3
-#define TAPE_UNLOCK 4
-#define TAPE_FORMAT 5
-#if (_WIN32_WINNT >= 0x0500)
-#define VER_MINORVERSION 0x0000001
-#define VER_MAJORVERSION 0x0000002
-#define VER_BUILDNUMBER 0x0000004
-#define VER_PLATFORMID 0x0000008
-#define VER_SERVICEPACKMINOR 0x0000010
-#define VER_SERVICEPACKMAJOR 0x0000020
-#define VER_SUITENAME 0x0000040
-#define VER_PRODUCT_TYPE 0x0000080
-#define VER_EQUAL 1
-#define VER_GREATER 2
-#define VER_GREATER_EQUAL 3
-#define VER_LESS 4
-#define VER_LESS_EQUAL 5
-#define VER_AND 6
-#define VER_OR 7
-#endif
-#define VER_PLATFORM_WIN32s 0
-#define VER_PLATFORM_WIN32_WINDOWS 1
-#define VER_PLATFORM_WIN32_NT 2
-#define VER_NT_WORKSTATION 1
-#define VER_NT_DOMAIN_CONTROLLER 2
-#define VER_NT_SERVER 3
-#define VER_SUITE_SMALLBUSINESS 1
-#define VER_SUITE_ENTERPRISE 2
-#define VER_SUITE_BACKOFFICE 4
-#define VER_SUITE_TERMINAL 16
-#define VER_SUITE_SMALLBUSINESS_RESTRICTED 32
-#define VER_SUITE_EMBEDDEDNT 64
-#define VER_SUITE_DATACENTER 128
-#define VER_SUITE_SINGLEUSERTS 256
-#define VER_SUITE_PERSONAL 512
-#define VER_SUITE_BLADE 1024
-#define VER_SUITE_STORAGE_SERVER 8192
-#define VER_SUITE_COMPUTE_SERVER 16384
-#define WT_EXECUTEDEFAULT 0x00000000
-#define WT_EXECUTEINIOTHREAD 0x00000001
-#define WT_EXECUTEINWAITTHREAD 0x00000004
-#define WT_EXECUTEONLYONCE 0x00000008
-#define WT_EXECUTELONGFUNCTION 0x00000010
-#define WT_EXECUTEINTIMERTHREAD 0x00000020
-#define WT_EXECUTEINPERSISTENTTHREAD 0x00000080
-#define WT_TRANSFER_IMPERSONATION 0x00000100
-#if (_WIN32_WINNT >= 0x0501)
-#define ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION 1
-#define ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION 2
-#define ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION 3
-#define ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION 4
-#define ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION 5
-#define ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION 6
-#define ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION 7
-#define ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES 9
-#endif /* (_WIN32_WINNT >= 0x0501) */
-#define BTYPE(x) ((x)&N_BTMASK)
-#define ISPTR(x) (((x)&N_TMASK)==(IMAGE_SYM_DTYPE_POINTER<<N_BTSHFT))
-#define ISFCN(x) (((x)&N_TMASK)==(IMAGE_SYM_DTYPE_FUNCTION<<N_BTSHFT))
-#define ISARY(x) (((x)&N_TMASK)==(IMAGE_SYM_DTYPE_ARRAY<<N_BTSHFT))
-#define ISTAG(x) ((x)==IMAGE_SYM_CLASS_STRUCT_TAG||(x)==IMAGE_SYM_CLASS_UNION_TAG||(x)==IMAGE_SYM_CLASS_ENUM_TAG)
-#define INCREF(x) ((((x)&~N_BTMASK)<<N_TSHIFT)|(IMAGE_SYM_DTYPE_POINTER<<N_BTSHFT)|((x)&N_BTMASK))
-#define DECREF(x) ((((x)>>N_TSHIFT)&~N_BTMASK)|((x)&N_BTMASK))
-#define TLS_MINIMUM_AVAILABLE 64
-#define REPARSE_DATA_BUFFER_HEADER_SIZE FIELD_OFFSET(REPARSE_DATA_BUFFER, GenericReparseBuffer)
-#define REPARSE_GUID_DATA_BUFFER_HEADER_SIZE FIELD_OFFSET(REPARSE_GUID_DATA_BUFFER, GenericReparseBuffer)
-#define MAXIMUM_REPARSE_DATA_BUFFER_SIZE 16384
-#define IO_REPARSE_TAG_RESERVED_ZERO 0
-#define IO_REPARSE_TAG_RESERVED_ONE 1
-#define IO_REPARSE_TAG_RESERVED_RANGE IO_REPARSE_TAG_RESERVED_ONE
-#define IsReparseTagMicrosoft(x) ((x)&0x80000000)
-#define IsReparseTagHighLatency(x) ((x)&0x40000000)
-#define IsReparseTagNameSurrogate(x) ((x)&0x20000000)
-#define IO_REPARSE_TAG_VALID_VALUES 0xE000FFFF
-#define IsReparseTagValid(x) (!((x)&~IO_REPARSE_TAG_VALID_VALUES)&&((x)>IO_REPARSE_TAG_RESERVED_RANGE))
-#define IO_REPARSE_TAG_SYMBOLIC_LINK IO_REPARSE_TAG_RESERVED_ZERO
-#define IO_REPARSE_TAG_MOUNT_POINT 0xA0000003
-#define IO_REPARSE_TAG_SYMLINK 0xA000000C
-#define WT_SET_MAX_THREADPOOL_THREADS(Flags,Limit) ((Flags)|=(Limit)<<16)
-#ifndef RC_INVOKED
-typedef DWORD ACCESS_MASK, *PACCESS_MASK;
-
-#ifdef _GUID_DEFINED
-# warning _GUID_DEFINED is deprecated, use GUID_DEFINED instead
-#endif
-
-#if ! (defined _GUID_DEFINED || defined GUID_DEFINED) /* also defined in basetyps.h */
-#define GUID_DEFINED
-typedef struct _GUID {
- unsigned long Data1;
- unsigned short Data2;
- unsigned short Data3;
- unsigned char Data4[8];
-} GUID, *REFGUID, *LPGUID;
-#define SYSTEM_LUID { 0x3e7, 0x0 }
-#endif /* GUID_DEFINED */
-typedef struct _GENERIC_MAPPING {
- ACCESS_MASK GenericRead;
- ACCESS_MASK GenericWrite;
- ACCESS_MASK GenericExecute;
- ACCESS_MASK GenericAll;
-} GENERIC_MAPPING, *PGENERIC_MAPPING;
-typedef struct _ACE_HEADER {
- BYTE AceType;
- BYTE AceFlags;
- WORD AceSize;
-} ACE_HEADER, *PACE_HEADER;
-typedef struct _ACCESS_ALLOWED_ACE {
- ACE_HEADER Header;
- ACCESS_MASK Mask;
- DWORD SidStart;
-} ACCESS_ALLOWED_ACE, *PACCESS_ALLOWED_ACE;
-typedef struct _ACCESS_DENIED_ACE {
- ACE_HEADER Header;
- ACCESS_MASK Mask;
- DWORD SidStart;
-} ACCESS_DENIED_ACE, *PACCESS_DENIED_ACE;
-typedef struct _SYSTEM_AUDIT_ACE {
- ACE_HEADER Header;
- ACCESS_MASK Mask;
- DWORD SidStart;
-} SYSTEM_AUDIT_ACE;
-typedef SYSTEM_AUDIT_ACE *PSYSTEM_AUDIT_ACE;
-typedef struct _SYSTEM_ALARM_ACE {
- ACE_HEADER Header;
- ACCESS_MASK Mask;
- DWORD SidStart;
-} SYSTEM_ALARM_ACE,*PSYSTEM_ALARM_ACE;
-typedef struct _ACCESS_ALLOWED_OBJECT_ACE {
- ACE_HEADER Header;
- ACCESS_MASK Mask;
- DWORD Flags;
- GUID ObjectType;
- GUID InheritedObjectType;
- DWORD SidStart;
-} ACCESS_ALLOWED_OBJECT_ACE,*PACCESS_ALLOWED_OBJECT_ACE;
-typedef struct _ACCESS_DENIED_OBJECT_ACE {
- ACE_HEADER Header;
- ACCESS_MASK Mask;
- DWORD Flags;
- GUID ObjectType;
- GUID InheritedObjectType;
- DWORD SidStart;
-} ACCESS_DENIED_OBJECT_ACE,*PACCESS_DENIED_OBJECT_ACE;
-typedef struct _SYSTEM_AUDIT_OBJECT_ACE {
- ACE_HEADER Header;
- ACCESS_MASK Mask;
- DWORD Flags;
- GUID ObjectType;
- GUID InheritedObjectType;
- DWORD SidStart;
-} SYSTEM_AUDIT_OBJECT_ACE,*PSYSTEM_AUDIT_OBJECT_ACE;
-typedef struct _SYSTEM_ALARM_OBJECT_ACE {
- ACE_HEADER Header;
- ACCESS_MASK Mask;
- DWORD Flags;
- GUID ObjectType;
- GUID InheritedObjectType;
- DWORD SidStart;
-} SYSTEM_ALARM_OBJECT_ACE,*PSYSTEM_ALARM_OBJECT_ACE;
-typedef struct _ACL {
- BYTE AclRevision;
- BYTE Sbz1;
- WORD AclSize;
- WORD AceCount;
- WORD Sbz2;
-} ACL,*PACL;
-typedef struct _ACL_REVISION_INFORMATION {
- DWORD AclRevision;
-} ACL_REVISION_INFORMATION;
-typedef struct _ACL_SIZE_INFORMATION {
- DWORD AceCount;
- DWORD AclBytesInUse;
- DWORD AclBytesFree;
-} ACL_SIZE_INFORMATION;
-
-/* FIXME: add more machines */
-#ifdef _X86_
-#define SIZE_OF_80387_REGISTERS 80
-#define CONTEXT_i386 0x10000
-#define CONTEXT_i486 0x10000
-#define CONTEXT_CONTROL (CONTEXT_i386|0x00000001L)
-#define CONTEXT_INTEGER (CONTEXT_i386|0x00000002L)
-#define CONTEXT_SEGMENTS (CONTEXT_i386|0x00000004L)
-#define CONTEXT_FLOATING_POINT (CONTEXT_i386|0x00000008L)
-#define CONTEXT_DEBUG_REGISTERS (CONTEXT_i386|0x00000010L)
-#define CONTEXT_EXTENDED_REGISTERS (CONTEXT_i386|0x00000020L)
-#define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_INTEGER|CONTEXT_SEGMENTS)
-#define MAXIMUM_SUPPORTED_EXTENSION 512
-typedef struct _FLOATING_SAVE_AREA {
- DWORD ControlWord;
- DWORD StatusWord;
- DWORD TagWord;
- DWORD ErrorOffset;
- DWORD ErrorSelector;
- DWORD DataOffset;
- DWORD DataSelector;
- BYTE RegisterArea[80];
- DWORD Cr0NpxState;
-} FLOATING_SAVE_AREA;
-typedef struct _CONTEXT {
- DWORD ContextFlags;
- DWORD Dr0;
- DWORD Dr1;
- DWORD Dr2;
- DWORD Dr3;
- DWORD Dr6;
- DWORD Dr7;
- FLOATING_SAVE_AREA FloatSave;
- DWORD SegGs;
- DWORD SegFs;
- DWORD SegEs;
- DWORD SegDs;
- DWORD Edi;
- DWORD Esi;
- DWORD Ebx;
- DWORD Edx;
- DWORD Ecx;
- DWORD Eax;
- DWORD Ebp;
- DWORD Eip;
- DWORD SegCs;
- DWORD EFlags;
- DWORD Esp;
- DWORD SegSs;
- BYTE ExtendedRegisters[MAXIMUM_SUPPORTED_EXTENSION];
-} CONTEXT;
-#elif defined(_PPC_)
-#define CONTEXT_CONTROL 1L
-#define CONTEXT_FLOATING_POINT 2L
-#define CONTEXT_INTEGER 4L
-#define CONTEXT_DEBUG_REGISTERS 8L
-#define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_FLOATING_POINT|CONTEXT_INTEGER)
-typedef struct {
- double Fpr0;
- double Fpr1;
- double Fpr2;
- double Fpr3;
- double Fpr4;
- double Fpr5;
- double Fpr6;
- double Fpr7;
- double Fpr8;
- double Fpr9;
- double Fpr10;
- double Fpr11;
- double Fpr12;
- double Fpr13;
- double Fpr14;
- double Fpr15;
- double Fpr16;
- double Fpr17;
- double Fpr18;
- double Fpr19;
- double Fpr20;
- double Fpr21;
- double Fpr22;
- double Fpr23;
- double Fpr24;
- double Fpr25;
- double Fpr26;
- double Fpr27;
- double Fpr28;
- double Fpr29;
- double Fpr30;
- double Fpr31;
- double Fpscr;
- DWORD Gpr0;
- DWORD Gpr1;
- DWORD Gpr2;
- DWORD Gpr3;
- DWORD Gpr4;
- DWORD Gpr5;
- DWORD Gpr6;
- DWORD Gpr7;
- DWORD Gpr8;
- DWORD Gpr9;
- DWORD Gpr10;
- DWORD Gpr11;
- DWORD Gpr12;
- DWORD Gpr13;
- DWORD Gpr14;
- DWORD Gpr15;
- DWORD Gpr16;
- DWORD Gpr17;
- DWORD Gpr18;
- DWORD Gpr19;
- DWORD Gpr20;
- DWORD Gpr21;
- DWORD Gpr22;
- DWORD Gpr23;
- DWORD Gpr24;
- DWORD Gpr25;
- DWORD Gpr26;
- DWORD Gpr27;
- DWORD Gpr28;
- DWORD Gpr29;
- DWORD Gpr30;
- DWORD Gpr31;
- DWORD Cr;
- DWORD Xer;
- DWORD Msr;
- DWORD Iar;
- DWORD Lr;
- DWORD Ctr;
- DWORD ContextFlags;
- DWORD Fill[3];
- DWORD Dr0;
- DWORD Dr1;
- DWORD Dr2;
- DWORD Dr3;
- DWORD Dr4;
- DWORD Dr5;
- DWORD Dr6;
- DWORD Dr7;
-} CONTEXT;
-#elif defined(_ALPHA_)
-#define CONTEXT_ALPHA 0x20000
-#define CONTEXT_CONTROL (CONTEXT_ALPHA|1L)
-#define CONTEXT_FLOATING_POINT (CONTEXT_ALPHA|2L)
-#define CONTEXT_INTEGER (CONTEXT_ALPHA|4L)
-#define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_FLOATING_POINT|CONTEXT_INTEGER)
-typedef struct _CONTEXT {
- ULONGLONG FltF0;
- ULONGLONG FltF1;
- ULONGLONG FltF2;
- ULONGLONG FltF3;
- ULONGLONG FltF4;
- ULONGLONG FltF5;
- ULONGLONG FltF6;
- ULONGLONG FltF7;
- ULONGLONG FltF8;
- ULONGLONG FltF9;
- ULONGLONG FltF10;
- ULONGLONG FltF11;
- ULONGLONG FltF12;
- ULONGLONG FltF13;
- ULONGLONG FltF14;
- ULONGLONG FltF15;
- ULONGLONG FltF16;
- ULONGLONG FltF17;
- ULONGLONG FltF18;
- ULONGLONG FltF19;
- ULONGLONG FltF20;
- ULONGLONG FltF21;
- ULONGLONG FltF22;
- ULONGLONG FltF23;
- ULONGLONG FltF24;
- ULONGLONG FltF25;
- ULONGLONG FltF26;
- ULONGLONG FltF27;
- ULONGLONG FltF28;
- ULONGLONG FltF29;
- ULONGLONG FltF30;
- ULONGLONG FltF31;
- ULONGLONG IntV0;
- ULONGLONG IntT0;
- ULONGLONG IntT1;
- ULONGLONG IntT2;
- ULONGLONG IntT3;
- ULONGLONG IntT4;
- ULONGLONG IntT5;
- ULONGLONG IntT6;
- ULONGLONG IntT7;
- ULONGLONG IntS0;
- ULONGLONG IntS1;
- ULONGLONG IntS2;
- ULONGLONG IntS3;
- ULONGLONG IntS4;
- ULONGLONG IntS5;
- ULONGLONG IntFp;
- ULONGLONG IntA0;
- ULONGLONG IntA1;
- ULONGLONG IntA2;
- ULONGLONG IntA3;
- ULONGLONG IntA4;
- ULONGLONG IntA5;
- ULONGLONG IntT8;
- ULONGLONG IntT9;
- ULONGLONG IntT10;
- ULONGLONG IntT11;
- ULONGLONG IntRa;
- ULONGLONG IntT12;
- ULONGLONG IntAt;
- ULONGLONG IntGp;
- ULONGLONG IntSp;
- ULONGLONG IntZero;
- ULONGLONG Fpcr;
- ULONGLONG SoftFpcr;
- ULONGLONG Fir;
- DWORD Psr;
- DWORD ContextFlags;
- DWORD Fill[4];
-} CONTEXT;
-#elif defined(SHx)
-
-/* These are the debug or break registers on the SH3 */
-typedef struct _DEBUG_REGISTERS {
- ULONG BarA;
- UCHAR BasrA;
- UCHAR BamrA;
- USHORT BbrA;
- ULONG BarB;
- UCHAR BasrB;
- UCHAR BamrB;
- USHORT BbrB;
- ULONG BdrB;
- ULONG BdmrB;
- USHORT Brcr;
- USHORT Align;
-} DEBUG_REGISTERS, *PDEBUG_REGISTERS;
-
-/* The following flags control the contents of the CONTEXT structure. */
-
-#define CONTEXT_SH3 0x00000040
-#define CONTEXT_SH4 0x000000c0 /* CONTEXT_SH3 | 0x80 - must contain the SH3 bits */
-
-#ifdef SH3
-#define CONTEXT_CONTROL (CONTEXT_SH3 | 0x00000001L)
-#define CONTEXT_INTEGER (CONTEXT_SH3 | 0x00000002L)
-#define CONTEXT_DEBUG_REGISTERS (CONTEXT_SH3 | 0x00000008L)
-#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_DEBUG_REGISTERS)
-#else /* SH4 */
-#define CONTEXT_CONTROL (CONTEXT_SH4 | 0x00000001L)
-#define CONTEXT_INTEGER (CONTEXT_SH4 | 0x00000002L)
-#define CONTEXT_DEBUG_REGISTERS (CONTEXT_SH4 | 0x00000008L)
-#define CONTEXT_FLOATING_POINT (CONTEXT_SH4 | 0x00000004L)
-#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_DEBUG_REGISTERS | CONTEXT_FLOATING_POINT)
-#endif
-
-/* Context Frame */
-
-/* This frame is used to store a limited processor context into the */
-/* Thread structure for CPUs which have no floating point support. */
-
-typedef struct _CONTEXT {
- /* The flags values within this flag control the contents of */
- /* a CONTEXT record. */
-
- /* If the context record is used as an input parameter, then */
- /* for each portion of the context record controlled by a flag */
- /* whose value is set, it is assumed that that portion of the */
- /* context record contains valid context. If the context record */
- /* is being used to modify a thread's context, then only that */
- /* portion of the threads context will be modified. */
-
- /* If the context record is used as an IN OUT parameter to capture */
- /* the context of a thread, then only those portions of the thread's */
- /* context corresponding to set flags will be returned. */
-
- /* The context record is never used as an OUT only parameter. */
-
-
- ULONG ContextFlags;
-
- /* This section is specified/returned if the ContextFlags word contains */
- /* the flag CONTEXT_INTEGER. */
-
- /* N.B. The registers RA and R15 are defined in this section, but are */
- /* considered part of the control context rather than part of the integer */
- /* context. */
-
- ULONG PR;
- ULONG MACH;
- ULONG MACL;
- ULONG GBR;
- ULONG R0;
- ULONG R1;
- ULONG R2;
- ULONG R3;
- ULONG R4;
- ULONG R5;
- ULONG R6;
- ULONG R7;
- ULONG R8;
- ULONG R9;
- ULONG R10;
- ULONG R11;
- ULONG R12;
- ULONG R13;
- ULONG R14;
- ULONG R15;
-
- /* This section is specified/returned if the ContextFlags word contains */
- /* the flag CONTEXT_CONTROL. */
-
- /* N.B. The registers r15 and ra are defined in the integer section, */
- /* but are considered part of the control context rather than part of */
- /* the integer context. */
-
- ULONG Fir;
- ULONG Psr;
-
-#if !defined(SH3e) && !defined(SH4)
- ULONG OldStuff[2];
- DEBUG_REGISTERS DebugRegisters;
-#else
- ULONG Fpscr;
- ULONG Fpul;
- ULONG FRegs[16];
-#if defined(SH4)
- ULONG xFRegs[16];
-#endif
-#endif
-} CONTEXT;
-
-#elif defined(MIPS)
-
-/* The following flags control the contents of the CONTEXT structure. */
-
-#define CONTEXT_R4000 0x00010000 /* r4000 context */
-
-#define CONTEXT_CONTROL (CONTEXT_R4000 | 0x00000001L)
-#define CONTEXT_FLOATING_POINT (CONTEXT_R4000 | 0x00000002L)
-#define CONTEXT_INTEGER (CONTEXT_R4000 | 0x00000004L)
-
-#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
-
-/* Context Frame */
-
-/* N.B. This frame must be exactly a multiple of 16 bytes in length. */
-
-/* This frame has a several purposes: 1) it is used as an argument to */
-/* NtContinue, 2) it is used to constuct a call frame for APC delivery, */
-/* 3) it is used to construct a call frame for exception dispatching */
-/* in user mode, and 4) it is used in the user level thread creation */
-/* routines. */
-
-/* The layout of the record conforms to a standard call frame. */
-
-
-typedef struct _CONTEXT {
-
- /* This section is always present and is used as an argument build */
- /* area. */
-
- DWORD Argument[4];
-
- /* This section is specified/returned if the ContextFlags word contains */
- /* the flag CONTEXT_FLOATING_POINT. */
-
- DWORD FltF0;
- DWORD FltF1;
- DWORD FltF2;
- DWORD FltF3;
- DWORD FltF4;
- DWORD FltF5;
- DWORD FltF6;
- DWORD FltF7;
- DWORD FltF8;
- DWORD FltF9;
- DWORD FltF10;
- DWORD FltF11;
- DWORD FltF12;
- DWORD FltF13;
- DWORD FltF14;
- DWORD FltF15;
- DWORD FltF16;
- DWORD FltF17;
- DWORD FltF18;
- DWORD FltF19;
- DWORD FltF20;
- DWORD FltF21;
- DWORD FltF22;
- DWORD FltF23;
- DWORD FltF24;
- DWORD FltF25;
- DWORD FltF26;
- DWORD FltF27;
- DWORD FltF28;
- DWORD FltF29;
- DWORD FltF30;
- DWORD FltF31;
-
- /* This section is specified/returned if the ContextFlags word contains */
- /* the flag CONTEXT_INTEGER. */
-
- /* N.B. The registers gp, sp, and ra are defined in this section, but are */
- /* considered part of the control context rather than part of the integer */
- /* context. */
-
- /* N.B. Register zero is not stored in the frame. */
-
- DWORD IntZero;
- DWORD IntAt;
- DWORD IntV0;
- DWORD IntV1;
- DWORD IntA0;
- DWORD IntA1;
- DWORD IntA2;
- DWORD IntA3;
- DWORD IntT0;
- DWORD IntT1;
- DWORD IntT2;
- DWORD IntT3;
- DWORD IntT4;
- DWORD IntT5;
- DWORD IntT6;
- DWORD IntT7;
- DWORD IntS0;
- DWORD IntS1;
- DWORD IntS2;
- DWORD IntS3;
- DWORD IntS4;
- DWORD IntS5;
- DWORD IntS6;
- DWORD IntS7;
- DWORD IntT8;
- DWORD IntT9;
- DWORD IntK0;
- DWORD IntK1;
- DWORD IntGp;
- DWORD IntSp;
- DWORD IntS8;
- DWORD IntRa;
- DWORD IntLo;
- DWORD IntHi;
-
- /* This section is specified/returned if the ContextFlags word contains */
- /* the flag CONTEXT_FLOATING_POINT. */
-
- DWORD Fsr;
-
- /* This section is specified/returned if the ContextFlags word contains */
- /* the flag CONTEXT_CONTROL. */
-
- /* N.B. The registers gp, sp, and ra are defined in the integer section, */
- /* but are considered part of the control context rather than part of */
- /* the integer context. */
-
- DWORD Fir;
- DWORD Psr;
-
- /* The flags values within this flag control the contents of */
- /* a CONTEXT record. */
-
- /* If the context record is used as an input parameter, then */
- /* for each portion of the context record controlled by a flag */
- /* whose value is set, it is assumed that that portion of the */
- /* context record contains valid context. If the context record */
- /* is being used to modify a thread's context, then only that */
- /* portion of the threads context will be modified. */
-
- /* If the context record is used as an IN OUT parameter to capture */
- /* the context of a thread, then only those portions of the thread's */
- /* context corresponding to set flags will be returned. */
-
- /* The context record is never used as an OUT only parameter. */
-
- DWORD ContextFlags;
-
- DWORD Fill[2];
-
-} CONTEXT;
-#elif defined(ARM)
-
-/* The following flags control the contents of the CONTEXT structure. */
-
-#define CONTEXT_ARM 0x0000040
-#define CONTEXT_CONTROL (CONTEXT_ARM | 0x00000001L)
-#define CONTEXT_INTEGER (CONTEXT_ARM | 0x00000002L)
-
-#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER)
-
-typedef struct _CONTEXT {
- /* The flags values within this flag control the contents of
- a CONTEXT record.
-
- If the context record is used as an input parameter, then
- for each portion of the context record controlled by a flag
- whose value is set, it is assumed that that portion of the
- context record contains valid context. If the context record
- is being used to modify a thread's context, then only that
- portion of the threads context will be modified.
-
- If the context record is used as an IN OUT parameter to capture
- the context of a thread, then only those portions of the thread's
- context corresponding to set flags will be returned.
-
- The context record is never used as an OUT only parameter. */
-
- ULONG ContextFlags;
-
- /* This section is specified/returned if the ContextFlags word contains
- the flag CONTEXT_INTEGER. */
- ULONG R0;
- ULONG R1;
- ULONG R2;
- ULONG R3;
- ULONG R4;
- ULONG R5;
- ULONG R6;
- ULONG R7;
- ULONG R8;
- ULONG R9;
- ULONG R10;
- ULONG R11;
- ULONG R12;
-
- ULONG Sp;
- ULONG Lr;
- ULONG Pc;
- ULONG Psr;
-} CONTEXT;
-
-#else
-#error "undefined processor type"
-#endif
-typedef CONTEXT *PCONTEXT,*LPCONTEXT;
-typedef struct _EXCEPTION_RECORD {
- DWORD ExceptionCode;
- DWORD ExceptionFlags;
- struct _EXCEPTION_RECORD *ExceptionRecord;
- PVOID ExceptionAddress;
- DWORD NumberParameters;
- DWORD ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
-} EXCEPTION_RECORD,*PEXCEPTION_RECORD,*LPEXCEPTION_RECORD;
-typedef struct _EXCEPTION_POINTERS {
- PEXCEPTION_RECORD ExceptionRecord;
- PCONTEXT ContextRecord;
-} EXCEPTION_POINTERS,*PEXCEPTION_POINTERS,*LPEXCEPTION_POINTERS;
-typedef union _LARGE_INTEGER {
- struct {
- DWORD LowPart;
- LONG HighPart;
- } u;
-#if ! defined(NONAMELESSUNION) || defined(__cplusplus)
- _ANONYMOUS_STRUCT struct {
- DWORD LowPart;
- LONG HighPart;
- };
-#endif /* NONAMELESSUNION */
- LONGLONG QuadPart;
-} LARGE_INTEGER, *PLARGE_INTEGER;
-typedef union _ULARGE_INTEGER {
- struct {
- DWORD LowPart;
- DWORD HighPart;
- } u;
-#if ! defined(NONAMELESSUNION) || defined(__cplusplus)
- _ANONYMOUS_STRUCT struct {
- DWORD LowPart;
- DWORD HighPart;
- };
-#endif /* NONAMELESSUNION */
- ULONGLONG QuadPart;
-} ULARGE_INTEGER, *PULARGE_INTEGER;
-typedef struct _LUID {
- DWORD LowPart;
- LONG HighPart;
-} LUID, *PLUID;
-#pragma pack(push,4)
-typedef struct _LUID_AND_ATTRIBUTES {
- LUID Luid;
- DWORD Attributes;
-} LUID_AND_ATTRIBUTES, *PLUID_AND_ATTRIBUTES;
-#pragma pack(pop)
-typedef LUID_AND_ATTRIBUTES LUID_AND_ATTRIBUTES_ARRAY[ANYSIZE_ARRAY];
-typedef LUID_AND_ATTRIBUTES_ARRAY *PLUID_AND_ATTRIBUTES_ARRAY;
-typedef struct _PRIVILEGE_SET {
- DWORD PrivilegeCount;
- DWORD Control;
- LUID_AND_ATTRIBUTES Privilege[ANYSIZE_ARRAY];
-} PRIVILEGE_SET,*PPRIVILEGE_SET;
-typedef struct _SECURITY_ATTRIBUTES {
- DWORD nLength;
- LPVOID lpSecurityDescriptor;
- BOOL bInheritHandle;
-} SECURITY_ATTRIBUTES,*PSECURITY_ATTRIBUTES,*LPSECURITY_ATTRIBUTES;
-typedef enum _SECURITY_IMPERSONATION_LEVEL {
- SecurityAnonymous,
- SecurityIdentification,
- SecurityImpersonation,
- SecurityDelegation
-} SECURITY_IMPERSONATION_LEVEL,*PSECURITY_IMPERSONATION_LEVEL;
-typedef BOOLEAN SECURITY_CONTEXT_TRACKING_MODE,*PSECURITY_CONTEXT_TRACKING_MODE;
-typedef struct _SECURITY_QUALITY_OF_SERVICE {
- DWORD Length;
- SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
- SECURITY_CONTEXT_TRACKING_MODE ContextTrackingMode;
- BOOLEAN EffectiveOnly;
-} SECURITY_QUALITY_OF_SERVICE,*PSECURITY_QUALITY_OF_SERVICE;
-typedef PVOID PACCESS_TOKEN;
-typedef struct _SE_IMPERSONATION_STATE {
- PACCESS_TOKEN Token;
- BOOLEAN CopyOnOpen;
- BOOLEAN EffectiveOnly;
- SECURITY_IMPERSONATION_LEVEL Level;
-} SE_IMPERSONATION_STATE,*PSE_IMPERSONATION_STATE;
-typedef struct _SID_IDENTIFIER_AUTHORITY {
- BYTE Value[6];
-} SID_IDENTIFIER_AUTHORITY,*PSID_IDENTIFIER_AUTHORITY,*LPSID_IDENTIFIER_AUTHORITY;
-typedef PVOID PSID;
-typedef struct _SID {
- BYTE Revision;
- BYTE SubAuthorityCount;
- SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
- DWORD SubAuthority[ANYSIZE_ARRAY];
-} SID, *PISID;
-typedef struct _SID_AND_ATTRIBUTES {
- PSID Sid;
- DWORD Attributes;
-} SID_AND_ATTRIBUTES, *PSID_AND_ATTRIBUTES;
-typedef SID_AND_ATTRIBUTES SID_AND_ATTRIBUTES_ARRAY[ANYSIZE_ARRAY];
-typedef SID_AND_ATTRIBUTES_ARRAY *PSID_AND_ATTRIBUTES_ARRAY;
-typedef struct _TOKEN_SOURCE {
- CHAR SourceName[TOKEN_SOURCE_LENGTH];
- LUID SourceIdentifier;
-} TOKEN_SOURCE,*PTOKEN_SOURCE;
-typedef struct _TOKEN_CONTROL {
- LUID TokenId;
- LUID AuthenticationId;
- LUID ModifiedId;
- TOKEN_SOURCE TokenSource;
-} TOKEN_CONTROL,*PTOKEN_CONTROL;
-typedef struct _TOKEN_DEFAULT_DACL {
- PACL DefaultDacl;
-} TOKEN_DEFAULT_DACL,*PTOKEN_DEFAULT_DACL;
-typedef struct _TOKEN_GROUPS {
- DWORD GroupCount;
- SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY];
-} TOKEN_GROUPS,*PTOKEN_GROUPS,*LPTOKEN_GROUPS;
-typedef struct _TOKEN_OWNER {
- PSID Owner;
-} TOKEN_OWNER,*PTOKEN_OWNER;
-typedef struct _TOKEN_PRIMARY_GROUP {
- PSID PrimaryGroup;
-} TOKEN_PRIMARY_GROUP,*PTOKEN_PRIMARY_GROUP;
-typedef struct _TOKEN_PRIVILEGES {
- DWORD PrivilegeCount;
- LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY];
-} TOKEN_PRIVILEGES,*PTOKEN_PRIVILEGES,*LPTOKEN_PRIVILEGES;
-typedef enum tagTOKEN_TYPE {
- TokenPrimary = 1,
- TokenImpersonation
-} TOKEN_TYPE,*PTOKEN_TYPE;
-typedef struct _TOKEN_STATISTICS {
- LUID TokenId;
- LUID AuthenticationId;
- LARGE_INTEGER ExpirationTime;
- TOKEN_TYPE TokenType;
- SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
- DWORD DynamicCharged;
- DWORD DynamicAvailable;
- DWORD GroupCount;
- DWORD PrivilegeCount;
- LUID ModifiedId;
-} TOKEN_STATISTICS, *PTOKEN_STATISTICS;
-typedef struct _TOKEN_USER {
- SID_AND_ATTRIBUTES User;
-} TOKEN_USER, *PTOKEN_USER;
-typedef DWORD SECURITY_INFORMATION,*PSECURITY_INFORMATION;
-typedef WORD SECURITY_DESCRIPTOR_CONTROL,*PSECURITY_DESCRIPTOR_CONTROL;
-typedef struct _SECURITY_DESCRIPTOR {
- BYTE Revision;
- BYTE Sbz1;
- SECURITY_DESCRIPTOR_CONTROL Control;
- PSID Owner;
- PSID Group;
- PACL Sacl;
- PACL Dacl;
-} SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR, *PISECURITY_DESCRIPTOR;
-typedef enum _TOKEN_INFORMATION_CLASS {
- TokenUser=1,
- TokenGroups,
- TokenPrivileges,
- TokenOwner,
- TokenPrimaryGroup,
- TokenDefaultDacl,
- TokenSource,
- TokenType,
- TokenImpersonationLevel,
- TokenStatistics,
- TokenRestrictedSids,
- TokenSessionId,
- TokenGroupsAndPrivileges,
- TokenSessionReference,
- TokenSandBoxInert,
- TokenAuditPolicy,
- TokenOrigin
-} TOKEN_INFORMATION_CLASS;
-typedef enum _SID_NAME_USE {
- SidTypeUser=1,
- SidTypeGroup,
- SidTypeDomain,
- SidTypeAlias,
- SidTypeWellKnownGroup,
- SidTypeDeletedAccount,
- SidTypeInvalid,
- SidTypeUnknown,
- SidTypeComputer
-} SID_NAME_USE,*PSID_NAME_USE;
-typedef struct _QUOTA_LIMITS {
- SIZE_T PagedPoolLimit;
- SIZE_T NonPagedPoolLimit;
- SIZE_T MinimumWorkingSetSize;
- SIZE_T MaximumWorkingSetSize;
- SIZE_T PagefileLimit;
- LARGE_INTEGER TimeLimit;
-} QUOTA_LIMITS,*PQUOTA_LIMITS;
-typedef struct _IO_COUNTERS {
- ULONGLONG ReadOperationCount;
- ULONGLONG WriteOperationCount;
- ULONGLONG OtherOperationCount;
- ULONGLONG ReadTransferCount;
- ULONGLONG WriteTransferCount;
- ULONGLONG OtherTransferCount;
-} IO_COUNTERS, *PIO_COUNTERS;
-typedef struct _FILE_NOTIFY_INFORMATION {
- DWORD NextEntryOffset;
- DWORD Action;
- DWORD FileNameLength;
- WCHAR FileName[1];
-} FILE_NOTIFY_INFORMATION,*PFILE_NOTIFY_INFORMATION;
-typedef struct _TAPE_ERASE {
- DWORD Type;
- BOOLEAN Immediate;
-} TAPE_ERASE,*PTAPE_ERASE;
-typedef struct _TAPE_GET_DRIVE_PARAMETERS {
- BOOLEAN ECC;
- BOOLEAN Compression;
- BOOLEAN DataPadding;
- BOOLEAN ReportSetmarks;
- DWORD DefaultBlockSize;
- DWORD MaximumBlockSize;
- DWORD MinimumBlockSize;
- DWORD MaximumPartitionCount;
- DWORD FeaturesLow;
- DWORD FeaturesHigh;
- DWORD EOTWarningZoneSize;
-} TAPE_GET_DRIVE_PARAMETERS,*PTAPE_GET_DRIVE_PARAMETERS;
-typedef struct _TAPE_GET_MEDIA_PARAMETERS {
- LARGE_INTEGER Capacity;
- LARGE_INTEGER Remaining;
- DWORD BlockSize;
- DWORD PartitionCount;
- BOOLEAN WriteProtected;
-} TAPE_GET_MEDIA_PARAMETERS,*PTAPE_GET_MEDIA_PARAMETERS;
-typedef struct _TAPE_GET_POSITION {
- ULONG Type;
- ULONG Partition;
- ULONG OffsetLow;
- ULONG OffsetHigh;
-} TAPE_GET_POSITION,*PTAPE_GET_POSITION;
-typedef struct _TAPE_PREPARE {
- DWORD Operation;
- BOOLEAN Immediate;
-} TAPE_PREPARE,*PTAPE_PREPARE;
-typedef struct _TAPE_SET_DRIVE_PARAMETERS {
- BOOLEAN ECC;
- BOOLEAN Compression;
- BOOLEAN DataPadding;
- BOOLEAN ReportSetmarks;
- ULONG EOTWarningZoneSize;
-} TAPE_SET_DRIVE_PARAMETERS,*PTAPE_SET_DRIVE_PARAMETERS;
-typedef struct _TAPE_SET_MEDIA_PARAMETERS {
- ULONG BlockSize;
-} TAPE_SET_MEDIA_PARAMETERS,*PTAPE_SET_MEDIA_PARAMETERS;
-typedef struct _TAPE_SET_POSITION {
- DWORD Method;
- DWORD Partition;
- LARGE_INTEGER Offset;
- BOOLEAN Immediate;
-} TAPE_SET_POSITION,*PTAPE_SET_POSITION;
-typedef struct _TAPE_WRITE_MARKS {
- DWORD Type;
- DWORD Count;
- BOOLEAN Immediate;
-} TAPE_WRITE_MARKS,*PTAPE_WRITE_MARKS;
-typedef struct _TAPE_CREATE_PARTITION {
- DWORD Method;
- DWORD Count;
- DWORD Size;
-} TAPE_CREATE_PARTITION,*PTAPE_CREATE_PARTITION;
-typedef struct _MEMORY_BASIC_INFORMATION {
- PVOID BaseAddress;
- PVOID AllocationBase;
- DWORD AllocationProtect;
- DWORD RegionSize;
- DWORD State;
- DWORD Protect;
- DWORD Type;
-} MEMORY_BASIC_INFORMATION,*PMEMORY_BASIC_INFORMATION;
-typedef struct _MESSAGE_RESOURCE_ENTRY {
- WORD Length;
- WORD Flags;
- BYTE Text[1];
-} MESSAGE_RESOURCE_ENTRY,*PMESSAGE_RESOURCE_ENTRY;
-typedef struct _MESSAGE_RESOURCE_BLOCK {
- DWORD LowId;
- DWORD HighId;
- DWORD OffsetToEntries;
-} MESSAGE_RESOURCE_BLOCK,*PMESSAGE_RESOURCE_BLOCK;
-typedef struct _MESSAGE_RESOURCE_DATA {
- DWORD NumberOfBlocks;
- MESSAGE_RESOURCE_BLOCK Blocks[1];
-} MESSAGE_RESOURCE_DATA,*PMESSAGE_RESOURCE_DATA;
-typedef struct _LIST_ENTRY {
- struct _LIST_ENTRY *Flink;
- struct _LIST_ENTRY *Blink;
-} LIST_ENTRY,*PLIST_ENTRY;
-typedef struct _SINGLE_LIST_ENTRY {
- struct _SINGLE_LIST_ENTRY *Next;
-} SINGLE_LIST_ENTRY,*PSINGLE_LIST_ENTRY;
-
-#ifndef _SLIST_HEADER_
-#define _SLIST_HEADER_
-#define SLIST_ENTRY SINGLE_LIST_ENTRY
-#define _SLIST_ENTRY _SINGLE_LIST_ENTRY
-#define PSLIST_ENTRY PSINGLE_LIST_ENTRY
-typedef union _SLIST_HEADER {
- ULONGLONG Alignment;
- _ANONYMOUS_STRUCT struct {
- SLIST_ENTRY Next;
- WORD Depth;
- WORD Sequence;
- } DUMMYSTRUCTNAME;
-} SLIST_HEADER,*PSLIST_HEADER;
-#endif /* !_SLIST_HEADER_ */
-
-typedef struct _RTL_CRITICAL_SECTION_DEBUG {
- WORD Type;
- WORD CreatorBackTraceIndex;
- struct _RTL_CRITICAL_SECTION *CriticalSection;
- LIST_ENTRY ProcessLocksList;
- DWORD EntryCount;
- DWORD ContentionCount;
- DWORD Spare[2];
-} RTL_CRITICAL_SECTION_DEBUG,*PRTL_CRITICAL_SECTION_DEBUG;
-typedef struct _RTL_CRITICAL_SECTION {
- PRTL_CRITICAL_SECTION_DEBUG DebugInfo;
- LONG LockCount;
- LONG RecursionCount;
- HANDLE OwningThread;
- HANDLE LockSemaphore;
- DWORD Reserved;
-} RTL_CRITICAL_SECTION,*PRTL_CRITICAL_SECTION;
-typedef struct _EVENTLOGRECORD {
- DWORD Length;
- DWORD Reserved;
- DWORD RecordNumber;
- DWORD TimeGenerated;
- DWORD TimeWritten;
- DWORD EventID;
- WORD EventType;
- WORD NumStrings;
- WORD EventCategory;
- WORD ReservedFlags;
- DWORD ClosingRecordNumber;
- DWORD StringOffset;
- DWORD UserSidLength;
- DWORD UserSidOffset;
- DWORD DataLength;
- DWORD DataOffset;
-} EVENTLOGRECORD,*PEVENTLOGRECORD;
-typedef struct _OSVERSIONINFOA {
- DWORD dwOSVersionInfoSize;
- DWORD dwMajorVersion;
- DWORD dwMinorVersion;
- DWORD dwBuildNumber;
- DWORD dwPlatformId;
- CHAR szCSDVersion[128];
-} OSVERSIONINFOA,*POSVERSIONINFOA,*LPOSVERSIONINFOA;
-typedef struct _OSVERSIONINFOW {
- DWORD dwOSVersionInfoSize;
- DWORD dwMajorVersion;
- DWORD dwMinorVersion;
- DWORD dwBuildNumber;
- DWORD dwPlatformId;
- WCHAR szCSDVersion[128];
-} OSVERSIONINFOW,*POSVERSIONINFOW,*LPOSVERSIONINFOW;
-typedef struct _OSVERSIONINFOEXA {
- DWORD dwOSVersionInfoSize;
- DWORD dwMajorVersion;
- DWORD dwMinorVersion;
- DWORD dwBuildNumber;
- DWORD dwPlatformId;
- CHAR szCSDVersion[128];
- WORD wServicePackMajor;
- WORD wServicePackMinor;
- WORD wSuiteMask;
- BYTE wProductType;
- BYTE wReserved;
-} OSVERSIONINFOEXA, *POSVERSIONINFOEXA, *LPOSVERSIONINFOEXA;
-typedef struct _OSVERSIONINFOEXW {
- DWORD dwOSVersionInfoSize;
- DWORD dwMajorVersion;
- DWORD dwMinorVersion;
- DWORD dwBuildNumber;
- DWORD dwPlatformId;
- WCHAR szCSDVersion[128];
- WORD wServicePackMajor;
- WORD wServicePackMinor;
- WORD wSuiteMask;
- BYTE wProductType;
- BYTE wReserved;
-} OSVERSIONINFOEXW, *POSVERSIONINFOEXW, *LPOSVERSIONINFOEXW;
-#pragma pack(push,2)
-typedef struct _IMAGE_VXD_HEADER {
- WORD e32_magic;
- BYTE e32_border;
- BYTE e32_worder;
- DWORD e32_level;
- WORD e32_cpu;
- WORD e32_os;
- DWORD e32_ver;
- DWORD e32_mflags;
- DWORD e32_mpages;
- DWORD e32_startobj;
- DWORD e32_eip;
- DWORD e32_stackobj;
- DWORD e32_esp;
- DWORD e32_pagesize;
- DWORD e32_lastpagesize;
- DWORD e32_fixupsize;
- DWORD e32_fixupsum;
- DWORD e32_ldrsize;
- DWORD e32_ldrsum;
- DWORD e32_objtab;
- DWORD e32_objcnt;
- DWORD e32_objmap;
- DWORD e32_itermap;
- DWORD e32_rsrctab;
- DWORD e32_rsrccnt;
- DWORD e32_restab;
- DWORD e32_enttab;
- DWORD e32_dirtab;
- DWORD e32_dircnt;
- DWORD e32_fpagetab;
- DWORD e32_frectab;
- DWORD e32_impmod;
- DWORD e32_impmodcnt;
- DWORD e32_impproc;
- DWORD e32_pagesum;
- DWORD e32_datapage;
- DWORD e32_preload;
- DWORD e32_nrestab;
- DWORD e32_cbnrestab;
- DWORD e32_nressum;
- DWORD e32_autodata;
- DWORD e32_debuginfo;
- DWORD e32_debuglen;
- DWORD e32_instpreload;
- DWORD e32_instdemand;
- DWORD e32_heapsize;
- BYTE e32_res3[12];
- DWORD e32_winresoff;
- DWORD e32_winreslen;
- WORD e32_devid;
- WORD e32_ddkver;
-} IMAGE_VXD_HEADER,*PIMAGE_VXD_HEADER;
-#pragma pack(pop)
-#pragma pack(push,4)
-typedef struct _IMAGE_FILE_HEADER {
- WORD Machine;
- WORD NumberOfSections;
- DWORD TimeDateStamp;
- DWORD PointerToSymbolTable;
- DWORD NumberOfSymbols;
- WORD SizeOfOptionalHeader;
- WORD Characteristics;
-} IMAGE_FILE_HEADER, *PIMAGE_FILE_HEADER;
-typedef struct _IMAGE_DATA_DIRECTORY {
- DWORD VirtualAddress;
- DWORD Size;
-} IMAGE_DATA_DIRECTORY,*PIMAGE_DATA_DIRECTORY;
-typedef struct _IMAGE_OPTIONAL_HEADER {
- WORD Magic;
- BYTE MajorLinkerVersion;
- BYTE MinorLinkerVersion;
- DWORD SizeOfCode;
- DWORD SizeOfInitializedData;
- DWORD SizeOfUninitializedData;
- DWORD AddressOfEntryPoint;
- DWORD BaseOfCode;
- DWORD BaseOfData;
- DWORD ImageBase;
- DWORD SectionAlignment;
- DWORD FileAlignment;
- WORD MajorOperatingSystemVersion;
- WORD MinorOperatingSystemVersion;
- WORD MajorImageVersion;
- WORD MinorImageVersion;
- WORD MajorSubsystemVersion;
- WORD MinorSubsystemVersion;
- DWORD Win32VersionValue;
- DWORD SizeOfImage;
- DWORD SizeOfHeaders;
- DWORD CheckSum;
- WORD Subsystem;
- WORD DllCharacteristics;
- DWORD SizeOfStackReserve;
- DWORD SizeOfStackCommit;
- DWORD SizeOfHeapReserve;
- DWORD SizeOfHeapCommit;
- DWORD LoaderFlags;
- DWORD NumberOfRvaAndSizes;
- IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
-} IMAGE_OPTIONAL_HEADER32,*PIMAGE_OPTIONAL_HEADER32;
-typedef struct _IMAGE_OPTIONAL_HEADER64 {
- WORD Magic;
- BYTE MajorLinkerVersion;
- BYTE MinorLinkerVersion;
- DWORD SizeOfCode;
- DWORD SizeOfInitializedData;
- DWORD SizeOfUninitializedData;
- DWORD AddressOfEntryPoint;
- DWORD BaseOfCode;
- ULONGLONG ImageBase;
- DWORD SectionAlignment;
- DWORD FileAlignment;
- WORD MajorOperatingSystemVersion;
- WORD MinorOperatingSystemVersion;
- WORD MajorImageVersion;
- WORD MinorImageVersion;
- WORD MajorSubsystemVersion;
- WORD MinorSubsystemVersion;
- DWORD Win32VersionValue;
- DWORD SizeOfImage;
- DWORD SizeOfHeaders;
- DWORD CheckSum;
- WORD Subsystem;
- WORD DllCharacteristics;
- ULONGLONG SizeOfStackReserve;
- ULONGLONG SizeOfStackCommit;
- ULONGLONG SizeOfHeapReserve;
- ULONGLONG SizeOfHeapCommit;
- DWORD LoaderFlags;
- DWORD NumberOfRvaAndSizes;
- IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
-} IMAGE_OPTIONAL_HEADER64,*PIMAGE_OPTIONAL_HEADER64;
-#ifdef _WIN64
-typedef IMAGE_OPTIONAL_HEADER64 IMAGE_OPTIONAL_HEADER;
-typedef PIMAGE_OPTIONAL_HEADER64 PIMAGE_OPTIONAL_HEADER;
-#else
-typedef IMAGE_OPTIONAL_HEADER32 IMAGE_OPTIONAL_HEADER;
-typedef PIMAGE_OPTIONAL_HEADER32 PIMAGE_OPTIONAL_HEADER;
-#endif
-typedef struct _IMAGE_ROM_OPTIONAL_HEADER {
- WORD Magic;
- BYTE MajorLinkerVersion;
- BYTE MinorLinkerVersion;
- DWORD SizeOfCode;
- DWORD SizeOfInitializedData;
- DWORD SizeOfUninitializedData;
- DWORD AddressOfEntryPoint;
- DWORD BaseOfCode;
- DWORD BaseOfData;
- DWORD BaseOfBss;
- DWORD GprMask;
- DWORD CprMask[4];
- DWORD GpValue;
-} IMAGE_ROM_OPTIONAL_HEADER,*PIMAGE_ROM_OPTIONAL_HEADER;
-#pragma pack(pop)
-#pragma pack(push,2)
-typedef struct _IMAGE_DOS_HEADER {
- WORD e_magic;
- WORD e_cblp;
- WORD e_cp;
- WORD e_crlc;
- WORD e_cparhdr;
- WORD e_minalloc;
- WORD e_maxalloc;
- WORD e_ss;
- WORD e_sp;
- WORD e_csum;
- WORD e_ip;
- WORD e_cs;
- WORD e_lfarlc;
- WORD e_ovno;
- WORD e_res[4];
- WORD e_oemid;
- WORD e_oeminfo;
- WORD e_res2[10];
- LONG e_lfanew;
-} IMAGE_DOS_HEADER,*PIMAGE_DOS_HEADER;
-typedef struct _IMAGE_OS2_HEADER {
- WORD ne_magic;
- CHAR ne_ver;
- CHAR ne_rev;
- WORD ne_enttab;
- WORD ne_cbenttab;
- LONG ne_crc;
- WORD ne_flags;
- WORD ne_autodata;
- WORD ne_heap;
- WORD ne_stack;
- LONG ne_csip;
- LONG ne_sssp;
- WORD ne_cseg;
- WORD ne_cmod;
- WORD ne_cbnrestab;
- WORD ne_segtab;
- WORD ne_rsrctab;
- WORD ne_restab;
- WORD ne_modtab;
- WORD ne_imptab;
- LONG ne_nrestab;
- WORD ne_cmovent;
- WORD ne_align;
- WORD ne_cres;
- BYTE ne_exetyp;
- BYTE ne_flagsothers;
- WORD ne_pretthunks;
- WORD ne_psegrefbytes;
- WORD ne_swaparea;
- WORD ne_expver;
-} IMAGE_OS2_HEADER,*PIMAGE_OS2_HEADER;
-#pragma pack(pop)
-#pragma pack(push,4)
-typedef struct _IMAGE_NT_HEADERS {
- DWORD Signature;
- IMAGE_FILE_HEADER FileHeader;
- IMAGE_OPTIONAL_HEADER OptionalHeader;
-} IMAGE_NT_HEADERS32,*PIMAGE_NT_HEADERS32;
-typedef struct _IMAGE_NT_HEADERS64 {
- DWORD Signature;
- IMAGE_FILE_HEADER FileHeader;
- IMAGE_OPTIONAL_HEADER OptionalHeader;
-} IMAGE_NT_HEADERS64,*PIMAGE_NT_HEADERS64;
-#ifdef _WIN64
-typedef IMAGE_NT_HEADERS64 IMAGE_NT_HEADERS;
-typedef PIMAGE_NT_HEADERS64 PIMAGE_NT_HEADERS;
-#else
-typedef IMAGE_NT_HEADERS32 IMAGE_NT_HEADERS;
-typedef PIMAGE_NT_HEADERS32 PIMAGE_NT_HEADERS;
-#endif
-typedef struct _IMAGE_ROM_HEADERS {
- IMAGE_FILE_HEADER FileHeader;
- IMAGE_ROM_OPTIONAL_HEADER OptionalHeader;
-} IMAGE_ROM_HEADERS,*PIMAGE_ROM_HEADERS;
-typedef struct _IMAGE_SECTION_HEADER {
- BYTE Name[IMAGE_SIZEOF_SHORT_NAME];
- union {
- DWORD PhysicalAddress;
- DWORD VirtualSize;
- } Misc;
- DWORD VirtualAddress;
- DWORD SizeOfRawData;
- DWORD PointerToRawData;
- DWORD PointerToRelocations;
- DWORD PointerToLinenumbers;
- WORD NumberOfRelocations;
- WORD NumberOfLinenumbers;
- DWORD Characteristics;
-} IMAGE_SECTION_HEADER,*PIMAGE_SECTION_HEADER;
-#pragma pack(pop)
-#pragma pack(push,2)
-typedef struct _IMAGE_SYMBOL {
- union {
- BYTE ShortName[8];
- struct {
- DWORD Short;
- DWORD Long;
- } Name;
- PBYTE LongName[2];
- } N;
- DWORD Value;
- SHORT SectionNumber;
- WORD Type;
- BYTE StorageClass;
- BYTE NumberOfAuxSymbols;
-} IMAGE_SYMBOL,*PIMAGE_SYMBOL;
-typedef union _IMAGE_AUX_SYMBOL {
- struct {
- DWORD TagIndex;
- union {
- struct {
- WORD Linenumber;
- WORD Size;
- } LnSz;
- DWORD TotalSize;
- } Misc;
- union {
- struct {
- DWORD PointerToLinenumber;
- DWORD PointerToNextFunction;
- } Function;
- struct {
- WORD Dimension[4];
- } Array;
- } FcnAry;
- WORD TvIndex;
- } Sym;
- struct {
- BYTE Name[IMAGE_SIZEOF_SYMBOL];
- } File;
- struct {
- DWORD Length;
- WORD NumberOfRelocations;
- WORD NumberOfLinenumbers;
- DWORD CheckSum;
- SHORT Number;
- BYTE Selection;
- } Section;
-} IMAGE_AUX_SYMBOL,*PIMAGE_AUX_SYMBOL;
-typedef struct _IMAGE_COFF_SYMBOLS_HEADER {
- DWORD NumberOfSymbols;
- DWORD LvaToFirstSymbol;
- DWORD NumberOfLinenumbers;
- DWORD LvaToFirstLinenumber;
- DWORD RvaToFirstByteOfCode;
- DWORD RvaToLastByteOfCode;
- DWORD RvaToFirstByteOfData;
- DWORD RvaToLastByteOfData;
-} IMAGE_COFF_SYMBOLS_HEADER,*PIMAGE_COFF_SYMBOLS_HEADER;
-typedef struct _IMAGE_RELOCATION {
- _ANONYMOUS_UNION union {
- DWORD VirtualAddress;
- DWORD RelocCount;
- } DUMMYUNIONNAME;
- DWORD SymbolTableIndex;
- WORD Type;
-} IMAGE_RELOCATION,*PIMAGE_RELOCATION;
-#pragma pack(pop)
-#pragma pack(push,4)
-typedef struct _IMAGE_BASE_RELOCATION {
- DWORD VirtualAddress;
- DWORD SizeOfBlock;
-} IMAGE_BASE_RELOCATION,*PIMAGE_BASE_RELOCATION;
-#pragma pack(pop)
-#pragma pack(push,2)
-typedef struct _IMAGE_LINENUMBER {
- union {
- DWORD SymbolTableIndex;
- DWORD VirtualAddress;
- } Type;
- WORD Linenumber;
-} IMAGE_LINENUMBER,*PIMAGE_LINENUMBER;
-#pragma pack(pop)
-#pragma pack(push,4)
-typedef struct _IMAGE_ARCHIVE_MEMBER_HEADER {
- BYTE Name[16];
- BYTE Date[12];
- BYTE UserID[6];
- BYTE GroupID[6];
- BYTE Mode[8];
- BYTE Size[10];
- BYTE EndHeader[2];
-} IMAGE_ARCHIVE_MEMBER_HEADER,*PIMAGE_ARCHIVE_MEMBER_HEADER;
-typedef struct _IMAGE_EXPORT_DIRECTORY {
- DWORD Characteristics;
- DWORD TimeDateStamp;
- WORD MajorVersion;
- WORD MinorVersion;
- DWORD Name;
- DWORD Base;
- DWORD NumberOfFunctions;
- DWORD NumberOfNames;
- DWORD AddressOfFunctions;
- DWORD AddressOfNames;
- DWORD AddressOfNameOrdinals;
-} IMAGE_EXPORT_DIRECTORY,*PIMAGE_EXPORT_DIRECTORY;
-typedef struct _IMAGE_IMPORT_BY_NAME {
- WORD Hint;
- BYTE Name[1];
-} IMAGE_IMPORT_BY_NAME,*PIMAGE_IMPORT_BY_NAME;
-typedef struct _IMAGE_THUNK_DATA32 {
- union {
- DWORD ForwarderString;
- DWORD Function;
- DWORD Ordinal;
- DWORD AddressOfData;
- } u1;
-} IMAGE_THUNK_DATA32,*PIMAGE_THUNK_DATA32;
-typedef struct _IMAGE_THUNK_DATA64 {
- union {
- ULONGLONG ForwarderString;
- ULONGLONG Function;
- ULONGLONG Ordinal;
- ULONGLONG AddressOfData;
- } u1;
-} IMAGE_THUNK_DATA64, *PIMAGE_THUNK_DATA64;
-#ifdef __WIN64
-typedef IMAGE_THUNK_DATA64 IMAGE_THUNK_DATA;
-typedef PIMAGE_THUNK_DATA64 PIMAGE_THUNK_DATA;
-#else
-typedef IMAGE_THUNK_DATA32 IMAGE_THUNK_DATA;
-typedef PIMAGE_THUNK_DATA32 PIMAGE_THUNK_DATA;
-#endif
-typedef struct _IMAGE_IMPORT_DESCRIPTOR {
- _ANONYMOUS_UNION union {
- DWORD Characteristics;
- DWORD OriginalFirstThunk;
- } DUMMYUNIONNAME;
- DWORD TimeDateStamp;
- DWORD ForwarderChain;
- DWORD Name;
- DWORD FirstThunk;
-} IMAGE_IMPORT_DESCRIPTOR,*PIMAGE_IMPORT_DESCRIPTOR;
-typedef struct _IMAGE_BOUND_IMPORT_DESCRIPTOR {
- DWORD TimeDateStamp;
- WORD OffsetModuleName;
- WORD NumberOfModuleForwarderRefs;
-} IMAGE_BOUND_IMPORT_DESCRIPTOR,*PIMAGE_BOUND_IMPORT_DESCRIPTOR;
-typedef struct _IMAGE_BOUND_FORWARDER_REF {
- DWORD TimeDateStamp;
- WORD OffsetModuleName;
- WORD Reserved;
-} IMAGE_BOUND_FORWARDER_REF,*PIMAGE_BOUND_FORWARDER_REF;
-typedef void(NTAPI *PIMAGE_TLS_CALLBACK)(PVOID,DWORD,PVOID);
-typedef struct _IMAGE_TLS_DIRECTORY32 {
- DWORD StartAddressOfRawData;
- DWORD EndAddressOfRawData;
- DWORD AddressOfIndex;
- DWORD AddressOfCallBacks;
- DWORD SizeOfZeroFill;
- DWORD Characteristics;
-} IMAGE_TLS_DIRECTORY32,*PIMAGE_TLS_DIRECTORY32;
-typedef struct _IMAGE_TLS_DIRECTORY64 {
- ULONGLONG StartAddressOfRawData;
- ULONGLONG EndAddressOfRawData;
- ULONGLONG AddressOfIndex;
- ULONGLONG AddressOfCallBacks;
- DWORD SizeOfZeroFill;
- DWORD Characteristics;
-} IMAGE_TLS_DIRECTORY64, *PIMAGE_TLS_DIRECTORY64;
-#ifdef __WIN64
-typedef IMAGE_TLS_DIRECTORY64 IMAGE_TLS_DIRECTORY;
-typedef PIMAGE_TLS_DIRECTORY64 PIMAGE_TLS_DIRECTORY;
-#else
-typedef IMAGE_TLS_DIRECTORY32 IMAGE_TLS_DIRECTORY;
-typedef PIMAGE_TLS_DIRECTORY32 PIMAGE_TLS_DIRECTORY;
-#endif
-typedef struct _IMAGE_RESOURCE_DIRECTORY {
- DWORD Characteristics;
- DWORD TimeDateStamp;
- WORD MajorVersion;
- WORD MinorVersion;
- WORD NumberOfNamedEntries;
- WORD NumberOfIdEntries;
-} IMAGE_RESOURCE_DIRECTORY,*PIMAGE_RESOURCE_DIRECTORY;
-_ANONYMOUS_STRUCT typedef struct _IMAGE_RESOURCE_DIRECTORY_ENTRY {
- _ANONYMOUS_UNION union {
- _ANONYMOUS_STRUCT struct {
- DWORD NameOffset:31;
- DWORD NameIsString:1;
- }DUMMYSTRUCTNAME;
- DWORD Name;
- WORD Id;
- } DUMMYUNIONNAME;
- _ANONYMOUS_UNION union {
- DWORD OffsetToData;
- _ANONYMOUS_STRUCT struct {
- DWORD OffsetToDirectory:31;
- DWORD DataIsDirectory:1;
- } DUMMYSTRUCTNAME2;
- } DUMMYUNIONNAME2;
-} IMAGE_RESOURCE_DIRECTORY_ENTRY,*PIMAGE_RESOURCE_DIRECTORY_ENTRY;
-typedef struct _IMAGE_RESOURCE_DIRECTORY_STRING {
- WORD Length;
- CHAR NameString[1];
-} IMAGE_RESOURCE_DIRECTORY_STRING,*PIMAGE_RESOURCE_DIRECTORY_STRING;
-typedef struct _IMAGE_RESOURCE_DIR_STRING_U {
- WORD Length;
- WCHAR NameString[1];
-} IMAGE_RESOURCE_DIR_STRING_U,*PIMAGE_RESOURCE_DIR_STRING_U;
-typedef struct _IMAGE_RESOURCE_DATA_ENTRY {
- DWORD OffsetToData;
- DWORD Size;
- DWORD CodePage;
- DWORD Reserved;
-} IMAGE_RESOURCE_DATA_ENTRY,*PIMAGE_RESOURCE_DATA_ENTRY;
-typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY {
- DWORD Characteristics;
- DWORD TimeDateStamp;
- WORD MajorVersion;
- WORD MinorVersion;
- DWORD GlobalFlagsClear;
- DWORD GlobalFlagsSet;
- DWORD CriticalSectionDefaultTimeout;
- DWORD DeCommitFreeBlockThreshold;
- DWORD DeCommitTotalFreeThreshold;
- PVOID LockPrefixTable;
- DWORD MaximumAllocationSize;
- DWORD VirtualMemoryThreshold;
- DWORD ProcessHeapFlags;
- DWORD Reserved[4];
-} IMAGE_LOAD_CONFIG_DIRECTORY,*PIMAGE_LOAD_CONFIG_DIRECTORY;
-typedef struct {
- DWORD Characteristics;
- DWORD TimeDateStamp;
- WORD MajorVersion;
- WORD MinorVersion;
- DWORD GlobalFlagsClear;
- DWORD GlobalFlagsSet;
- DWORD CriticalSectionDefaultTimeout;
- ULONGLONG DeCommitFreeBlockThreshold;
- ULONGLONG DeCommitTotalFreeThreshold;
- ULONGLONG LockPrefixTable;
- ULONGLONG MaximumAllocationSize;
- ULONGLONG VirtualMemoryThreshold;
- ULONGLONG ProcessAffinityMask;
- DWORD ProcessHeapFlags;
- WORD CSDFlags;
- WORD Reserved1;
- ULONGLONG EditList;
- DWORD Reserved[2];
-} IMAGE_LOAD_CONFIG_DIRECTORY64,*PIMAGE_LOAD_CONFIG_DIRECTORY64;
-typedef struct _IMAGE_RUNTIME_FUNCTION_ENTRY {
- DWORD BeginAddress;
- DWORD EndAddress;
- PVOID ExceptionHandler;
- PVOID HandlerData;
- DWORD PrologEndAddress;
-} IMAGE_RUNTIME_FUNCTION_ENTRY,*PIMAGE_RUNTIME_FUNCTION_ENTRY;
-typedef struct _IMAGE_CE_RUNTIME_FUNCTION_ENTRY {
- unsigned int FuncStart:32;
- unsigned int PrologLen:8;
- unsigned int FuncLen:22;
- unsigned int ThirtyTwoBit:1;
- unsigned int ExceptionFlag:1;
-} IMAGE_CE_RUNTIME_FUNCTION_ENTRY,*PIMAGE_CE_RUNTIME_FUNCTION_ENTRY;
-typedef struct _IMAGE_DEBUG_DIRECTORY {
- DWORD Characteristics;
- DWORD TimeDateStamp;
- WORD MajorVersion;
- WORD MinorVersion;
- DWORD Type;
- DWORD SizeOfData;
- DWORD AddressOfRawData;
- DWORD PointerToRawData;
-} IMAGE_DEBUG_DIRECTORY,*PIMAGE_DEBUG_DIRECTORY;
-typedef struct _FPO_DATA {
- DWORD ulOffStart;
- DWORD cbProcSize;
- DWORD cdwLocals;
- WORD cdwParams;
- WORD cbProlog:8;
- WORD cbRegs:3;
- WORD fHasSEH:1;
- WORD fUseBP:1;
- WORD reserved:1;
- WORD cbFrame:2;
-} FPO_DATA,*PFPO_DATA;
-typedef struct _IMAGE_DEBUG_MISC {
- DWORD DataType;
- DWORD Length;
- BOOLEAN Unicode;
- BYTE Reserved[3];
- BYTE Data[1];
-} IMAGE_DEBUG_MISC,*PIMAGE_DEBUG_MISC;
-typedef struct _IMAGE_FUNCTION_ENTRY {
- DWORD StartingAddress;
- DWORD EndingAddress;
- DWORD EndOfPrologue;
-} IMAGE_FUNCTION_ENTRY,*PIMAGE_FUNCTION_ENTRY;
-typedef struct _IMAGE_FUNCTION_ENTRY64 {
- ULONGLONG StartingAddress;
- ULONGLONG EndingAddress;
- _ANONYMOUS_UNION union {
- ULONGLONG EndOfPrologue;
- ULONGLONG UnwindInfoAddress;
- } DUMMYUNIONNAME;
-} IMAGE_FUNCTION_ENTRY64,*PIMAGE_FUNCTION_ENTRY64;
-typedef struct _IMAGE_SEPARATE_DEBUG_HEADER {
- WORD Signature;
- WORD Flags;
- WORD Machine;
- WORD Characteristics;
- DWORD TimeDateStamp;
- DWORD CheckSum;
- DWORD ImageBase;
- DWORD SizeOfImage;
- DWORD NumberOfSections;
- DWORD ExportedNamesSize;
- DWORD DebugDirectorySize;
- DWORD SectionAlignment;
- DWORD Reserved[2];
-} IMAGE_SEPARATE_DEBUG_HEADER,*PIMAGE_SEPARATE_DEBUG_HEADER;
-#pragma pack(pop)
-typedef enum _CM_SERVICE_NODE_TYPE {
- DriverType=SERVICE_KERNEL_DRIVER,
- FileSystemType=SERVICE_FILE_SYSTEM_DRIVER,
- Win32ServiceOwnProcess=SERVICE_WIN32_OWN_PROCESS,
- Win32ServiceShareProcess=SERVICE_WIN32_SHARE_PROCESS,
- AdapterType=SERVICE_ADAPTER,
- RecognizerType=SERVICE_RECOGNIZER_DRIVER
-} SERVICE_NODE_TYPE;
-typedef enum _CM_SERVICE_LOAD_TYPE {
- BootLoad=SERVICE_BOOT_START,
- SystemLoad=SERVICE_SYSTEM_START,
- AutoLoad=SERVICE_AUTO_START,
- DemandLoad=SERVICE_DEMAND_START,
- DisableLoad=SERVICE_DISABLED
-} SERVICE_LOAD_TYPE;
-typedef enum _CM_ERROR_CONTROL_TYPE {
- IgnoreError=SERVICE_ERROR_IGNORE,
- NormalError=SERVICE_ERROR_NORMAL,
- SevereError=SERVICE_ERROR_SEVERE,
- CriticalError=SERVICE_ERROR_CRITICAL
-} SERVICE_ERROR_TYPE;
-typedef struct _NT_TIB {
- struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList;
- PVOID StackBase;
- PVOID StackLimit;
- PVOID SubSystemTib;
- _ANONYMOUS_UNION union {
- PVOID FiberData;
- DWORD Version;
- } DUMMYUNIONNAME;
- PVOID ArbitraryUserPointer;
- struct _NT_TIB *Self;
-} NT_TIB,*PNT_TIB;
-typedef struct _REPARSE_DATA_BUFFER {
- DWORD ReparseTag;
- WORD ReparseDataLength;
- WORD Reserved;
- _ANONYMOUS_UNION union {
- struct {
- WORD SubstituteNameOffset;
- WORD SubstituteNameLength;
- WORD PrintNameOffset;
- WORD PrintNameLength;
- ULONG Flags;
- WCHAR PathBuffer[1];
- } SymbolicLinkReparseBuffer;
- struct {
- WORD SubstituteNameOffset;
- WORD SubstituteNameLength;
- WORD PrintNameOffset;
- WORD PrintNameLength;
- WCHAR PathBuffer[1];
- } MountPointReparseBuffer;
- struct {
- BYTE DataBuffer[1];
- } GenericReparseBuffer;
- } DUMMYUNIONNAME;
-} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
-typedef struct _REPARSE_GUID_DATA_BUFFER {
- DWORD ReparseTag;
- WORD ReparseDataLength;
- WORD Reserved;
- GUID ReparseGuid;
- struct {
- BYTE DataBuffer[1];
- } GenericReparseBuffer;
-} REPARSE_GUID_DATA_BUFFER, *PREPARSE_GUID_DATA_BUFFER;
-typedef struct _REPARSE_POINT_INFORMATION {
- WORD ReparseDataLength;
- WORD UnparsedNameLength;
-} REPARSE_POINT_INFORMATION, *PREPARSE_POINT_INFORMATION;
-
-typedef union _FILE_SEGMENT_ELEMENT {
- PVOID64 Buffer;
- ULONGLONG Alignment;
-}FILE_SEGMENT_ELEMENT, *PFILE_SEGMENT_ELEMENT;
-
-/* JOBOBJECT_BASIC_LIMIT_INFORMATION.LimitFlags constants */
-#define JOB_OBJECT_LIMIT_WORKINGSET 0x0001
-#define JOB_OBJECT_LIMIT_PROCESS_TIME 0x0002
-#define JOB_OBJECT_LIMIT_JOB_TIME 0x0004
-#define JOB_OBJECT_LIMIT_ACTIVE_PROCESS 0x0008
-#define JOB_OBJECT_LIMIT_AFFINITY 0x0010
-#define JOB_OBJECT_LIMIT_PRIORITY_CLASS 0x0020
-#define JOB_OBJECT_LIMIT_PRESERVE_JOB_TIME 0x0040
-#define JOB_OBJECT_LIMIT_SCHEDULING_CLASS 0x0080
-#define JOB_OBJECT_LIMIT_PROCESS_MEMORY 0x0100
-#define JOB_OBJECT_LIMIT_JOB_MEMORY 0x0200
-#define JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION 0x0400
-#define JOB_OBJECT_BREAKAWAY_OK 0x0800
-#define JOB_OBJECT_SILENT_BREAKAWAY 0x1000
-
-/* JOBOBJECT_BASIC_UI_RESTRICTIONS.UIRestrictionsClass constants */
-#define JOB_OBJECT_UILIMIT_HANDLES 0x0001
-#define JOB_OBJECT_UILIMIT_READCLIPBOARD 0x0002
-#define JOB_OBJECT_UILIMIT_WRITECLIPBOARD 0x0004
-#define JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS 0x0008
-#define JOB_OBJECT_UILIMIT_DISPLAYSETTINGS 0x0010
-#define JOB_OBJECT_UILIMIT_GLOBALATOMS 0x0020
-#define JOB_OBJECT_UILIMIT_DESKTOP 0x0040
-#define JOB_OBJECT_UILIMIT_EXITWINDOWS 0x0080
-
-/* JOBOBJECT_SECURITY_LIMIT_INFORMATION.SecurityLimitFlags constants */
-#define JOB_OBJECT_SECURITY_NO_ADMIN 0x0001
-#define JOB_OBJECT_SECURITY_RESTRICTED_TOKEN 0x0002
-#define JOB_OBJECT_SECURITY_ONLY_TOKEN 0x0004
-#define JOB_OBJECT_SECURITY_FILTER_TOKENS 0x0008
-
-/* JOBOBJECT_END_OF_JOB_TIME_INFORMATION.EndOfJobTimeAction constants */
-#define JOB_OBJECT_TERMINATE_AT_END_OF_JOB 0
-#define JOB_OBJECT_POST_AT_END_OF_JOB 1
-
-#define JOB_OBJECT_MSG_END_OF_JOB_TIME 1
-#define JOB_OBJECT_MSG_END_OF_PROCESS_TIME 2
-#define JOB_OBJECT_MSG_ACTIVE_PROCESS_LIMIT 3
-#define JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO 4
-#define JOB_OBJECT_MSG_NEW_PROCESS 6
-#define JOB_OBJECT_MSG_EXIT_PROCESS 7
-#define JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS 8
-#define JOB_OBJECT_MSG_PROCESS_MEMORY_LIMIT 9
-#define JOB_OBJECT_MSG_JOB_MEMORY_LIMIT 10
-
-typedef enum _JOBOBJECTINFOCLASS {
- JobObjectBasicAccountingInformation = 1,
- JobObjectBasicLimitInformation,
- JobObjectBasicProcessIdList,
- JobObjectBasicUIRestrictions,
- JobObjectSecurityLimitInformation,
- JobObjectEndOfJobTimeInformation,
- JobObjectAssociateCompletionPortInformation,
- JobObjectBasicAndIoAccountingInformation,
- JobObjectExtendedLimitInformation,
- JobObjectJobSetInformation,
- MaxJobObjectInfoClass
-} JOBOBJECTINFOCLASS;
-typedef struct _JOBOBJECT_BASIC_ACCOUNTING_INFORMATION {
- LARGE_INTEGER TotalUserTime;
- LARGE_INTEGER TotalKernelTime;
- LARGE_INTEGER ThisPeriodTotalUserTime;
- LARGE_INTEGER ThisPeriodTotalKernelTime;
- DWORD TotalPageFaultCount;
- DWORD TotalProcesses;
- DWORD ActiveProcesses;
- DWORD TotalTerminatedProcesses;
-} JOBOBJECT_BASIC_ACCOUNTING_INFORMATION,*PJOBOBJECT_BASIC_ACCOUNTING_INFORMATION;
-typedef struct _JOBOBJECT_BASIC_LIMIT_INFORMATION {
- LARGE_INTEGER PerProcessUserTimeLimit;
- LARGE_INTEGER PerJobUserTimeLimit;
- DWORD LimitFlags;
- SIZE_T MinimumWorkingSetSize;
- SIZE_T MaximumWorkingSetSize;
- DWORD ActiveProcessLimit;
- ULONG_PTR Affinity;
- DWORD PriorityClass;
- DWORD SchedulingClass;
-} JOBOBJECT_BASIC_LIMIT_INFORMATION,*PJOBOBJECT_BASIC_LIMIT_INFORMATION;
-typedef struct _JOBOBJECT_BASIC_PROCESS_ID_LIST {
- DWORD NumberOfAssignedProcesses;
- DWORD NumberOfProcessIdsInList;
- ULONG_PTR ProcessIdList[1];
-} JOBOBJECT_BASIC_PROCESS_ID_LIST, *PJOBOBJECT_BASIC_PROCESS_ID_LIST;
-typedef struct _JOBOBJECT_BASIC_UI_RESTRICTIONS {
- DWORD UIRestrictionsClass;
-} JOBOBJECT_BASIC_UI_RESTRICTIONS,*PJOBOBJECT_BASIC_UI_RESTRICTIONS;
-typedef struct _JOBOBJECT_SECURITY_LIMIT_INFORMATION {
- DWORD SecurityLimitFlags;
- HANDLE JobToken;
- PTOKEN_GROUPS SidsToDisable;
- PTOKEN_PRIVILEGES PrivilegesToDelete;
- PTOKEN_GROUPS RestrictedSids;
-} JOBOBJECT_SECURITY_LIMIT_INFORMATION,*PJOBOBJECT_SECURITY_LIMIT_INFORMATION;
-typedef struct _JOBOBJECT_END_OF_JOB_TIME_INFORMATION {
- DWORD EndOfJobTimeAction;
-} JOBOBJECT_END_OF_JOB_TIME_INFORMATION,*PJOBOBJECT_END_OF_JOB_TIME_INFORMATION;
-typedef struct _JOBOBJECT_ASSOCIATE_COMPLETION_PORT {
- PVOID CompletionKey;
- HANDLE CompletionPort;
-} JOBOBJECT_ASSOCIATE_COMPLETION_PORT,*PJOBOBJECT_ASSOCIATE_COMPLETION_PORT;
-typedef struct _JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION {
- JOBOBJECT_BASIC_ACCOUNTING_INFORMATION BasicInfo;
- IO_COUNTERS IoInfo;
-} JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION,*PJOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION;
-typedef struct _JOBOBJECT_EXTENDED_LIMIT_INFORMATION {
- JOBOBJECT_BASIC_LIMIT_INFORMATION BasicLimitInformation;
- IO_COUNTERS IoInfo;
- SIZE_T ProcessMemoryLimit;
- SIZE_T JobMemoryLimit;
- SIZE_T PeakProcessMemoryUsed;
- SIZE_T PeakJobMemoryUsed;
-} JOBOBJECT_EXTENDED_LIMIT_INFORMATION,*PJOBOBJECT_EXTENDED_LIMIT_INFORMATION;
-typedef struct _JOBOBJECT_JOBSET_INFORMATION {
- DWORD MemberLevel;
-} JOBOBJECT_JOBSET_INFORMATION,*PJOBOBJECT_JOBSET_INFORMATION;
-
-/* Fixme: Making these defines conditional on WINVER will break ddk includes */
-#if 1 /* (WINVER >= 0x0500) */
-#include <pshpack4.h>
-
-#define ES_SYSTEM_REQUIRED 0x00000001
-#define ES_DISPLAY_REQUIRED 0x00000002
-#define ES_USER_PRESENT 0x00000004
-#define ES_CONTINUOUS 0x80000000
-
-typedef enum _LATENCY_TIME {
- LT_DONT_CARE,
- LT_LOWEST_LATENCY
-} LATENCY_TIME, *PLATENCY_TIME;
-
-typedef enum _SYSTEM_POWER_STATE {
- PowerSystemUnspecified,
- PowerSystemWorking,
- PowerSystemSleeping1,
- PowerSystemSleeping2,
- PowerSystemSleeping3,
- PowerSystemHibernate,
- PowerSystemShutdown,
- PowerSystemMaximum
-} SYSTEM_POWER_STATE, *PSYSTEM_POWER_STATE;
-#define POWER_SYSTEM_MAXIMUM PowerSystemMaximum
-
-typedef enum {
- PowerActionNone,
- PowerActionReserved,
- PowerActionSleep,
- PowerActionHibernate,
- PowerActionShutdown,
- PowerActionShutdownReset,
- PowerActionShutdownOff,
- PowerActionWarmEject
-} POWER_ACTION, *PPOWER_ACTION;
-
-#if (_WIN32_WINNT >= 0x0600)
-typedef enum {
- PoAc = 0,
- PoDc = 1,
- PoHot = 2,
- PoConditionMaximum = 3
-} SYSTEM_POWER_CONDITION, *PSYSTEM_POWER_CONDITION;
-#endif
-
-typedef enum _DEVICE_POWER_STATE {
- PowerDeviceUnspecified,
- PowerDeviceD0,
- PowerDeviceD1,
- PowerDeviceD2,
- PowerDeviceD3,
- PowerDeviceMaximum
-} DEVICE_POWER_STATE, *PDEVICE_POWER_STATE;
-
-typedef struct {
- DWORD Granularity;
- DWORD Capacity;
-} BATTERY_REPORTING_SCALE, *PBATTERY_REPORTING_SCALE;
-
-typedef struct _POWER_ACTION_POLICY {
- POWER_ACTION Action;
- ULONG Flags;
- ULONG EventCode;
-} POWER_ACTION_POLICY, *PPOWER_ACTION_POLICY;
-
-/* POWER_ACTION_POLICY.Flags constants */
-#define POWER_ACTION_QUERY_ALLOWED 0x00000001
-#define POWER_ACTION_UI_ALLOWED 0x00000002
-#define POWER_ACTION_OVERRIDE_APPS 0x00000004
-#define POWER_ACTION_LIGHTEST_FIRST 0x10000000
-#define POWER_ACTION_LOCK_CONSOLE 0x20000000
-#define POWER_ACTION_DISABLE_WAKES 0x40000000
-#define POWER_ACTION_CRITICAL 0x80000000
-
-/* POWER_ACTION_POLICY.EventCode constants */
-#define POWER_LEVEL_USER_NOTIFY_TEXT 0x00000001
-#define POWER_LEVEL_USER_NOTIFY_SOUND 0x00000002
-#define POWER_LEVEL_USER_NOTIFY_EXEC 0x00000004
-#define POWER_USER_NOTIFY_BUTTON 0x00000008
-#define POWER_USER_NOTIFY_SHUTDOWN 0x00000010
-#define POWER_FORCE_TRIGGER_RESET 0x80000000
-
-#define DISCHARGE_POLICY_CRITICAL 0
-#define DISCHARGE_POLICY_LOW 1
-#define NUM_DISCHARGE_POLICIES 4
-
-#define PO_THROTTLE_NONE 0
-#define PO_THROTTLE_CONSTANT 1
-#define PO_THROTTLE_DEGRADE 2
-#define PO_THROTTLE_ADAPTIVE 3
-#define PO_THROTTLE_MAXIMUM 4
-
-typedef struct _SYSTEM_POWER_LEVEL {
- BOOLEAN Enable;
- UCHAR Spare[3];
- ULONG BatteryLevel;
- POWER_ACTION_POLICY PowerPolicy;
- SYSTEM_POWER_STATE MinSystemState;
-} SYSTEM_POWER_LEVEL, *PSYSTEM_POWER_LEVEL;
-
-typedef struct _SYSTEM_POWER_POLICY {
- ULONG Revision;
- POWER_ACTION_POLICY PowerButton;
- POWER_ACTION_POLICY SleepButton;
- POWER_ACTION_POLICY LidClose;
- SYSTEM_POWER_STATE LidOpenWake;
- ULONG Reserved;
- POWER_ACTION_POLICY Idle;
- ULONG IdleTimeout;
- UCHAR IdleSensitivity;
- UCHAR DynamicThrottle;
- UCHAR Spare2[2];
- SYSTEM_POWER_STATE MinSleep;
- SYSTEM_POWER_STATE MaxSleep;
- SYSTEM_POWER_STATE ReducedLatencySleep;
- ULONG WinLogonFlags;
- ULONG Spare3;
- ULONG DozeS4Timeout;
- ULONG BroadcastCapacityResolution;
- SYSTEM_POWER_LEVEL DischargePolicy[NUM_DISCHARGE_POLICIES];
- ULONG VideoTimeout;
- BOOLEAN VideoDimDisplay;
- ULONG VideoReserved[3];
- ULONG SpindownTimeout;
- BOOLEAN OptimizeForPower;
- UCHAR FanThrottleTolerance;
- UCHAR ForcedThrottle;
- UCHAR MinThrottle;
- POWER_ACTION_POLICY OverThrottled;
-} SYSTEM_POWER_POLICY, *PSYSTEM_POWER_POLICY;
-
-typedef struct _SYSTEM_POWER_CAPABILITIES {
- BOOLEAN PowerButtonPresent;
- BOOLEAN SleepButtonPresent;
- BOOLEAN LidPresent;
- BOOLEAN SystemS1;
- BOOLEAN SystemS2;
- BOOLEAN SystemS3;
- BOOLEAN SystemS4;
- BOOLEAN SystemS5;
- BOOLEAN HiberFilePresent;
- BOOLEAN FullWake;
- BOOLEAN VideoDimPresent;
- BOOLEAN ApmPresent;
- BOOLEAN UpsPresent;
- BOOLEAN ThermalControl;
- BOOLEAN ProcessorThrottle;
- UCHAR ProcessorMinThrottle;
- UCHAR ProcessorMaxThrottle;
- UCHAR spare2[4];
- BOOLEAN DiskSpinDown;
- UCHAR spare3[8];
- BOOLEAN SystemBatteriesPresent;
- BOOLEAN BatteriesAreShortTerm;
- BATTERY_REPORTING_SCALE BatteryScale[3];
- SYSTEM_POWER_STATE AcOnLineWake;
- SYSTEM_POWER_STATE SoftLidWake;
- SYSTEM_POWER_STATE RtcWake;
- SYSTEM_POWER_STATE MinDeviceWakeState;
- SYSTEM_POWER_STATE DefaultLowLatencyWake;
-} SYSTEM_POWER_CAPABILITIES, *PSYSTEM_POWER_CAPABILITIES;
-
-typedef struct _SYSTEM_BATTERY_STATE {
- BOOLEAN AcOnLine;
- BOOLEAN BatteryPresent;
- BOOLEAN Charging;
- BOOLEAN Discharging;
- BOOLEAN Spare1[4];
- ULONG MaxCapacity;
- ULONG RemainingCapacity;
- ULONG Rate;
- ULONG EstimatedTime;
- ULONG DefaultAlert1;
- ULONG DefaultAlert2;
-} SYSTEM_BATTERY_STATE, *PSYSTEM_BATTERY_STATE;
-
-typedef enum _POWER_INFORMATION_LEVEL {
- SystemPowerPolicyAc,
- SystemPowerPolicyDc,
- VerifySystemPolicyAc,
- VerifySystemPolicyDc,
- SystemPowerCapabilities,
- SystemBatteryState,
- SystemPowerStateHandler,
- ProcessorStateHandler,
- SystemPowerPolicyCurrent,
- AdministratorPowerPolicy,
- SystemReserveHiberFile,
- ProcessorInformation,
- SystemPowerInformation,
- ProcessorStateHandler2,
- LastWakeTime,
- LastSleepTime,
- SystemExecutionState,
- SystemPowerStateNotifyHandler,
- ProcessorPowerPolicyAc,
- ProcessorPowerPolicyDc,
- VerifyProcessorPowerPolicyAc,
- VerifyProcessorPowerPolicyDc,
- ProcessorPowerPolicyCurrent
-} POWER_INFORMATION_LEVEL;
-
-#if (_WIN32_WINNT >= 0x0500)
-typedef LONG (WINAPI *PVECTORED_EXCEPTION_HANDLER)(PEXCEPTION_POINTERS);
-#endif
-#if 1 /* (WIN32_WINNT >= 0x0500) */
-typedef struct _SYSTEM_POWER_INFORMATION {
- ULONG MaxIdlenessAllowed;
- ULONG Idleness;
- ULONG TimeRemaining;
- UCHAR CoolingMode;
-} SYSTEM_POWER_INFORMATION,*PSYSTEM_POWER_INFORMATION;
-#endif
-
-#if (_WIN32_WINNT >= 0x0501)
-typedef enum _HEAP_INFORMATION_CLASS {
- HeapCompatibilityInformation
-} HEAP_INFORMATION_CLASS;
-typedef enum _ACTIVATION_CONTEXT_INFO_CLASS {
- ActivationContextBasicInformation = 1,
- ActivationContextDetailedInformation,
- AssemblyDetailedInformationInActivationContext,
- FileInformationInAssemblyOfAssemblyInActivationContext
-} ACTIVATION_CONTEXT_INFO_CLASS;
-typedef struct _ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION {
- DWORD ulFlags;
- DWORD ulEncodedAssemblyIdentityLength;
- DWORD ulManifestPathType;
- DWORD ulManifestPathLength;
- LARGE_INTEGER liManifestLastWriteTime;
- DWORD ulPolicyPathType;
- DWORD ulPolicyPathLength;
- LARGE_INTEGER liPolicyLastWriteTime;
- DWORD ulMetadataSatelliteRosterIndex;
- DWORD ulManifestVersionMajor;
- DWORD ulManifestVersionMinor;
- DWORD ulPolicyVersionMajor;
- DWORD ulPolicyVersionMinor;
- DWORD ulAssemblyDirectoryNameLength;
- PCWSTR lpAssemblyEncodedAssemblyIdentity;
- PCWSTR lpAssemblyManifestPath;
- PCWSTR lpAssemblyPolicyPath;
- PCWSTR lpAssemblyDirectoryName;
-} ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION,*PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION;
-typedef const ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION *PCACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION;
-typedef struct _ACTIVATION_CONTEXT_DETAILED_INFORMATION {
- DWORD dwFlags;
- DWORD ulFormatVersion;
- DWORD ulAssemblyCount;
- DWORD ulRootManifestPathType;
- DWORD ulRootManifestPathChars;
- DWORD ulRootConfigurationPathType;
- DWORD ulRootConfigurationPathChars;
- DWORD ulAppDirPathType;
- DWORD ulAppDirPathChars;
- PCWSTR lpRootManifestPath;
- PCWSTR lpRootConfigurationPath;
- PCWSTR lpAppDirPath;
-} ACTIVATION_CONTEXT_DETAILED_INFORMATION,*PACTIVATION_CONTEXT_DETAILED_INFORMATION;
-typedef const ACTIVATION_CONTEXT_DETAILED_INFORMATION *PCACTIVATION_CONTEXT_DETAILED_INFORMATION;
-typedef struct _ACTIVATION_CONTEXT_QUERY_INDEX {
- ULONG ulAssemblyIndex;
- ULONG ulFileIndexInAssembly;
-} ACTIVATION_CONTEXT_QUERY_INDEX,*PACTIVATION_CONTEXT_QUERY_INDEX;
-typedef const ACTIVATION_CONTEXT_QUERY_INDEX *PCACTIVATION_CONTEXT_QUERY_INDEX;
-typedef struct _ASSEMBLY_FILE_DETAILED_INFORMATION {
- DWORD ulFlags;
- DWORD ulFilenameLength;
- DWORD ulPathLength;
- PCWSTR lpFileName;
- PCWSTR lpFilePath;
-} ASSEMBLY_FILE_DETAILED_INFORMATION,*PASSEMBLY_FILE_DETAILED_INFORMATION;
-typedef const ASSEMBLY_FILE_DETAILED_INFORMATION *PCASSEMBLY_FILE_DETAILED_INFORMATION;
-#endif /* (WIN32_WINNT >= 0x0501) */
-
-typedef struct _PROCESSOR_POWER_POLICY_INFO {
- ULONG TimeCheck;
- ULONG DemoteLimit;
- ULONG PromoteLimit;
- UCHAR DemotePercent;
- UCHAR PromotePercent;
- UCHAR Spare[2];
- ULONG AllowDemotion : 1;
- ULONG AllowPromotion : 1;
- ULONG Reserved : 30;
-} PROCESSOR_POWER_POLICY_INFO, *PPROCESSOR_POWER_POLICY_INFO;
-typedef struct _PROCESSOR_POWER_POLICY {
- ULONG Revision;
- UCHAR DynamicThrottle;
- UCHAR Spare[3];
- ULONG Reserved;
- ULONG PolicyCount;
- PROCESSOR_POWER_POLICY_INFO Policy[3];
-} PROCESSOR_POWER_POLICY, *PPROCESSOR_POWER_POLICY;
-typedef struct _ADMINISTRATOR_POWER_POLICY {
- SYSTEM_POWER_STATE MinSleep;
- SYSTEM_POWER_STATE MaxSleep;
- ULONG MinVideoTimeout;
- ULONG MaxVideoTimeout;
- ULONG MinSpindownTimeout;
- ULONG MaxSpindownTimeout;
-} ADMINISTRATOR_POWER_POLICY, *PADMINISTRATOR_POWER_POLICY;
-#include <poppack.h>
-#endif /* WINVER >= 0x0500 */
-
-#if (_WIN32_WINNT >= 0x0500)
-typedef VOID (NTAPI *WAITORTIMERCALLBACKFUNC)(PVOID,BOOLEAN);
-#endif
-
-#ifdef UNICODE
-typedef OSVERSIONINFOW OSVERSIONINFO,*POSVERSIONINFO,*LPOSVERSIONINFO;
-typedef OSVERSIONINFOEXW OSVERSIONINFOEX,*POSVERSIONINFOEX,*LPOSVERSIONINFOEX;
-#else
-typedef OSVERSIONINFOA OSVERSIONINFO,*POSVERSIONINFO,*LPOSVERSIONINFO;
-typedef OSVERSIONINFOEXA OSVERSIONINFOEX,*POSVERSIONINFOEX,*LPOSVERSIONINFOEX;
-#endif
-
-#if (_WIN32_WINNT >= 0x0500)
-ULONGLONG WINAPI VerSetConditionMask(ULONGLONG,DWORD,BYTE);
-#define VER_SET_CONDITION(ConditionMask, TypeBitMask, ComparisonType) \
- ((ConditionMask) = VerSetConditionMask((ConditionMask), \
- (TypeBitMask), (ComparisonType)))
-#endif
-
-#ifdef _X86_
-#if defined(__GNUC__)
-#if (__GNUC__ >= 3)
-/* Support -masm=intel. */
-static __inline__ PVOID GetCurrentFiber(void)
-{
- void* ret;
- __asm__ __volatile__ (
- "mov{l} {%%fs:0x10,%0|%0,%%fs:0x10}"
- : "=r" (ret) /* allow use of reg eax,ebx,ecx,edx,esi,edi */
- );
- return ret;
-}
-
-static __inline__ PVOID GetFiberData(void)
-{
- void* ret;
- __asm__ __volatile__ (
- "mov{l} {%%fs:0x10,%0|%0,%%fs:0x10}\n\t"
- "mov{l} {(%0),%0|%0,[%0]}"
- : "=r" (ret) /* allow use of reg eax,ebx,ecx,edx,esi,edi */
- );
- return ret;
-}
-
-static __inline__ struct _TEB * NtCurrentTeb(void)
-{
- struct _TEB *ret;
-
- __asm__ __volatile__ (
- "mov{l} {%%fs:0x18,%0|%0,%%fs:0x18}\n"
- : "=r" (ret)
- : /* no inputs */
- );
-
- return ret;
-}
-
-#else /* __GNUC__ >= 3 */
-static __inline__ PVOID GetCurrentFiber(void)
-{
- void* ret;
- __asm__ __volatile__ (
- "movl %%fs:0x10,%0"
- : "=r" (ret) /* allow use of reg eax,ebx,ecx,edx,esi,edi */
- );
- return ret;
-}
-
-static __inline__ PVOID GetFiberData(void)
-{
- void* ret;
- __asm__ __volatile__ (
- "movl %%fs:0x10,%0\n\t"
- "movl (%0),%0"
- : "=r" (ret) /* allow use of reg eax,ebx,ecx,edx,esi,edi */
- );
- return ret;
-}
-
-static __inline__ struct _TEB * NtCurrentTeb(void)
-{
- struct _TEB *ret;
-
- __asm__ __volatile__ (
- "movl %%fs:0x18, %0\n"
- : "=r" (ret)
- : /* no inputs */
- );
- return ret;
-}
-#endif /* __GNUC__ >= 3 */
-
-#else
-
-PVOID GetCurrentFiber(void);
-#pragma aux GetCurrentFiber = \
- "mov eax, dword ptr fs:0x10" \
- value [eax] \
- modify [eax];
-
-PVOID GetFiberData(void);
-#pragma aux GetFiberData = \
- "mov eax, dword ptr fs:0x10" \
- "mov eax, [eax]" \
- value [eax] \
- modify [eax];
-
-struct _TEB * NtCurrentTeb(void);
-#pragma aux NtCurrentTeb = \
- "mov eax, dword ptr fs:0x18" \
- value [eax] \
- modify [eax];
-
-#endif /* __GNUC__ */
-#endif /* _X86_ */
-
-#endif /* RC_INVOKED */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/winperf.h b/winsup/w32api/include/winperf.h
deleted file mode 100644
index 75e29a8..0000000
--- a/winsup/w32api/include/winperf.h
+++ /dev/null
@@ -1,139 +0,0 @@
-#ifndef _WINPERF_H
-#define _WINPERF_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define PERF_DATA_VERSION 1
-#define PERF_DATA_REVISION 1
-#define PERF_NO_INSTANCES -1
-#define PERF_SIZE_DWORD 0
-#define PERF_SIZE_LARGE 256
-#define PERF_SIZE_ZERO 512
-#define PERF_SIZE_VARIABLE_LEN 768
-#define PERF_TYPE_NUMBER 0
-#define PERF_TYPE_COUNTER 1024
-#define PERF_TYPE_TEXT 2048
-#define PERF_TYPE_ZERO 0xC00
-#define PERF_NUMBER_HEX 0
-#define PERF_NUMBER_DECIMAL 0x10000
-#define PERF_NUMBER_DEC_1000 0x20000
-#define PERF_COUNTER_VALUE 0
-#define PERF_COUNTER_RATE 0x10000
-#define PERF_COUNTER_FRACTION 0x20000
-#define PERF_COUNTER_BASE 0x30000
-#define PERF_COUNTER_ELAPSED 0x40000
-#define PERF_COUNTER_QUEUELEN 0x50000
-#define PERF_COUNTER_HISTOGRAM 0x60000
-#define PERF_TEXT_UNICODE 0
-#define PERF_TEXT_ASCII 0x10000
-#define PERF_TIMER_TICK 0
-#define PERF_TIMER_100NS 0x100000
-#define PERF_OBJECT_TIMER 0x200000
-#define PERF_DELTA_COUNTER 0x400000
-#define PERF_DELTA_BASE 0x800000
-#define PERF_INVERSE_COUNTER 0x1000000
-#define PERF_MULTI_COUNTER 0x2000000
-#define PERF_DISPLAY_NO_SUFFIX 0
-#define PERF_DISPLAY_PER_SEC 0x10000000
-#define PERF_DISPLAY_PERCENT 0x20000000
-#define PERF_DISPLAY_SECONDS 0x30000000
-#define PERF_DISPLAY_NOSHOW 0x40000000
-#define PERF_COUNTER_HISTOGRAM_TYPE 0x80000000
-#define PERF_NO_UNIQUE_ID (-1)
-#define PERF_DETAIL_NOVICE 100
-#define PERF_DETAIL_ADVANCED 200
-#define PERF_DETAIL_EXPERT 300
-#define PERF_DETAIL_WIZARD 400
-#define PERF_COUNTER_COUNTER (PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_TICK|PERF_DELTA_COUNTER|PERF_DISPLAY_PER_SEC)
-#define PERF_COUNTER_TIMER (PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_TICK|PERF_DELTA_COUNTER|PERF_DISPLAY_PERCENT)
-#define PERF_COUNTER_QUEUELEN_TYPE (PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_QUEUELEN|PERF_TIMER_TICK|PERF_DELTA_COUNTER|PERF_DISPLAY_NO_SUFFIX)
-#define PERF_COUNTER_BULK_COUNT (PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_TICK|PERF_DELTA_COUNTER|PERF_DISPLAY_PER_SEC)
-#define PERF_COUNTER_TEXT (PERF_SIZE_VARIABLE_LEN|PERF_TYPE_TEXT|PERF_TEXT_UNICODE|PERF_DISPLAY_NO_SUFFIX)
-#define PERF_COUNTER_RAWCOUNT (PERF_SIZE_DWORD|PERF_TYPE_NUMBER|PERF_NUMBER_DECIMAL|PERF_DISPLAY_NO_SUFFIX)
-#define PERF_COUNTER_LARGE_RAWCOUNT (PERF_SIZE_LARGE|PERF_TYPE_NUMBER|PERF_NUMBER_DECIMAL|PERF_DISPLAY_NO_SUFFIX)
-#define PERF_COUNTER_RAWCOUNT_HEX (PERF_SIZE_DWORD|PERF_TYPE_NUMBER|PERF_NUMBER_HEX|PERF_DISPLAY_NO_SUFFIX)
-#define PERF_COUNTER_LARGE_RAWCOUNT_HEX (PERF_SIZE_LARGE|PERF_TYPE_NUMBER|PERF_NUMBER_HEX|PERF_DISPLAY_NO_SUFFIX)
-#define PERF_SAMPLE_FRACTION (PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_FRACTION|PERF_DELTA_COUNTER|PERF_DELTA_BASE|PERF_DISPLAY_PERCENT)
-#define PERF_SAMPLE_COUNTER (PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_TICK|PERF_DELTA_COUNTER|PERF_DISPLAY_NO_SUFFIX)
-#define PERF_COUNTER_NODATA (PERF_SIZE_ZERO|PERF_DISPLAY_NOSHOW)
-#define PERF_COUNTER_TIMER_INV (PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_TICK|PERF_DELTA_COUNTER|PERF_INVERSE_COUNTER|PERF_DISPLAY_PERCENT)
-#define PERF_SAMPLE_BASE (PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_BASE|PERF_DISPLAY_NOSHOW|1)
-#define PERF_AVERAGE_TIMER (PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_FRACTION|PERF_DISPLAY_SECONDS)
-#define PERF_AVERAGE_BASE (PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_BASE|PERF_DISPLAY_NOSHOW|2)
-#define PERF_AVERAGE_BULK (PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_FRACTION|PERF_DISPLAY_NOSHOW)
-#define PERF_100NSEC_TIMER (PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_100NS|PERF_DELTA_COUNTER|PERF_DISPLAY_PERCENT)
-#define PERF_100NSEC_TIMER_INV (PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_100NS|PERF_DELTA_COUNTER|PERF_INVERSE_COUNTER|PERF_DISPLAY_PERCENT)
-#define PERF_COUNTER_MULTI_TIMER (PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_DELTA_COUNTER|PERF_TIMER_TICK|PERF_MULTI_COUNTER|PERF_DISPLAY_PERCENT)
-#define PERF_COUNTER_MULTI_TIMER_INV (PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_RATE|PERF_DELTA_COUNTER|PERF_MULTI_COUNTER|PERF_TIMER_TICK|PERF_INVERSE_COUNTER|PERF_DISPLAY_PERCENT)
-#define PERF_COUNTER_MULTI_BASE (PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_BASE|PERF_MULTI_COUNTER|PERF_DISPLAY_NOSHOW)
-#define PERF_100NSEC_MULTI_TIMER (PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_DELTA_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_100NS|PERF_MULTI_COUNTER|PERF_DISPLAY_PERCENT)
-#define PERF_100NSEC_MULTI_TIMER_INV (PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_DELTA_COUNTER|PERF_COUNTER_RATE|PERF_TIMER_100NS|PERF_MULTI_COUNTER|PERF_INVERSE_COUNTER|PERF_DISPLAY_PERCENT)
-#define PERF_RAW_FRACTION (PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_FRACTION|PERF_DISPLAY_PERCENT)
-#define PERF_RAW_BASE (PERF_SIZE_DWORD|PERF_TYPE_COUNTER|PERF_COUNTER_BASE|PERF_DISPLAY_NOSHOW|3)
-#define PERF_ELAPSED_TIME (PERF_SIZE_LARGE|PERF_TYPE_COUNTER|PERF_COUNTER_ELAPSED|PERF_OBJECT_TIMER|PERF_DISPLAY_SECONDS)
-typedef struct _PERF_DATA_BLOCK {
- WCHAR Signature[4];
- DWORD LittleEndian;
- DWORD Version;
- DWORD Revision;
- DWORD TotalByteLength;
- DWORD HeaderLength;
- DWORD NumObjectTypes;
- LONG DefaultObject;
- SYSTEMTIME SystemTime;
- LARGE_INTEGER PerfTime;
- LARGE_INTEGER PerfFreq;
- LARGE_INTEGER PerfTime100nSec;
- DWORD SystemNameLength;
- DWORD SystemNameOffset;
-} PERF_DATA_BLOCK, *PPERF_DATA_BLOCK;
-typedef struct _PERF_OBJECT_TYPE {
- DWORD TotalByteLength;
- DWORD DefinitionLength;
- DWORD HeaderLength;
- DWORD ObjectNameTitleIndex;
- LPWSTR ObjectNameTitle;
- DWORD ObjectHelpTitleIndex;
- LPWSTR ObjectHelpTitle;
- DWORD DetailLevel;
- DWORD NumCounters;
- LONG DefaultCounter;
- LONG NumInstances;
- DWORD CodePage;
- LARGE_INTEGER PerfTime;
- LARGE_INTEGER PerfFreq;
-} PERF_OBJECT_TYPE, *PPERF_OBJECT_TYPE;
-typedef struct _PERF_COUNTER_DEFINITION {
- DWORD ByteLength;
- DWORD CounterNameTitleIndex;
- LPWSTR CounterNameTitle;
- DWORD CounterHelpTitleIndex;
- LPWSTR CounterHelpTitle;
- LONG DefaultScale;
- DWORD DetailLevel;
- DWORD CounterType;
- DWORD CounterSize;
- DWORD CounterOffset;
-} PERF_COUNTER_DEFINITION,*PPERF_COUNTER_DEFINITION;
-typedef struct _PERF_INSTANCE_DEFINITION {
- DWORD ByteLength;
- DWORD ParentObjectTitleIndex;
- DWORD ParentObjectInstance;
- LONG UniqueID;
- DWORD NameOffset;
- DWORD NameLength;
-} PERF_INSTANCE_DEFINITION,*PPERF_INSTANCE_DEFINITION;
-typedef struct _PERF_COUNTER_BLOCK {
- DWORD ByteLength;
-} PERF_COUNTER_BLOCK, *PPERF_COUNTER_BLOCK;
-typedef DWORD(CALLBACK PM_OPEN_PROC)(LPWSTR);
-typedef DWORD(CALLBACK PM_COLLECT_PROC)(LPWSTR,PVOID*,PDWORD,PDWORD);
-typedef DWORD(CALLBACK PM_CLOSE_PROC)(void);
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/winreg.h b/winsup/w32api/include/winreg.h
deleted file mode 100644
index 81aebba..0000000
--- a/winsup/w32api/include/winreg.h
+++ /dev/null
@@ -1,175 +0,0 @@
-#ifndef _WINREG_H
-#define _WINREG_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifndef WINADVAPI
-#define WINADVAPI
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define HKEY_CLASSES_ROOT ((HKEY)0x80000000)
-#define HKEY_CURRENT_USER ((HKEY)0x80000001)
-#define HKEY_LOCAL_MACHINE ((HKEY)0x80000002)
-#define HKEY_USERS ((HKEY)0x80000003)
-#define HKEY_PERFORMANCE_DATA ((HKEY)0x80000004)
-#define HKEY_CURRENT_CONFIG ((HKEY)0x80000005)
-#define HKEY_DYN_DATA ((HKEY)0x80000006)
-#define REG_OPTION_VOLATILE 1
-#define REG_OPTION_NON_VOLATILE 0
-#define REG_CREATED_NEW_KEY 1
-#define REG_OPENED_EXISTING_KEY 2
-#define REG_NONE 0
-#define REG_SZ 1
-#define REG_EXPAND_SZ 2
-#define REG_BINARY 3
-#define REG_DWORD_LITTLE_ENDIAN 4
-#define REG_DWORD 4
-#define REG_DWORD_BIG_ENDIAN 5
-#define REG_LINK 6
-#define REG_MULTI_SZ 7
-#define REG_RESOURCE_LIST 8
-#define REG_FULL_RESOURCE_DESCRIPTOR 9
-#define REG_RESOURCE_REQUIREMENTS_LIST 10
-#define REG_QWORD_LITTLE_ENDIAN 11
-#define REG_QWORD 11
-#define REG_NOTIFY_CHANGE_NAME 1
-#define REG_NOTIFY_CHANGE_ATTRIBUTES 2
-#define REG_NOTIFY_CHANGE_LAST_SET 4
-#define REG_NOTIFY_CHANGE_SECURITY 8
-
-#ifndef RC_INVOKED
-typedef ACCESS_MASK REGSAM;
-typedef struct value_entA {
- LPSTR ve_valuename;
- DWORD ve_valuelen;
- DWORD ve_valueptr;
- DWORD ve_type;
-} VALENTA,*PVALENTA;
-typedef struct value_entW {
- LPWSTR ve_valuename;
- DWORD ve_valuelen;
- DWORD ve_valueptr;
- DWORD ve_type;
-} VALENTW,*PVALENTW;
-WINADVAPI BOOL WINAPI AbortSystemShutdownA(LPCSTR);
-WINADVAPI BOOL WINAPI AbortSystemShutdownW(LPCWSTR);
-WINADVAPI BOOL WINAPI InitiateSystemShutdownA(LPSTR,LPSTR,DWORD,BOOL,BOOL);
-WINADVAPI BOOL WINAPI InitiateSystemShutdownW(LPWSTR,LPWSTR,DWORD,BOOL,BOOL);
-WINADVAPI LONG WINAPI RegCloseKey(HKEY);
-WINADVAPI LONG WINAPI RegConnectRegistryA(LPCSTR,HKEY,PHKEY);
-WINADVAPI LONG WINAPI RegConnectRegistryW(LPCWSTR,HKEY,PHKEY);
-WINADVAPI LONG WINAPI RegCreateKeyA(HKEY,LPCSTR,PHKEY);
-WINADVAPI LONG WINAPI RegCreateKeyExA(HKEY,LPCSTR,DWORD,LPSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,PDWORD);
-WINADVAPI LONG WINAPI RegCreateKeyExW(HKEY,LPCWSTR,DWORD,LPWSTR,DWORD,REGSAM,LPSECURITY_ATTRIBUTES,PHKEY,PDWORD);
-WINADVAPI LONG WINAPI RegCreateKeyW(HKEY,LPCWSTR,PHKEY);
-WINADVAPI LONG WINAPI RegDeleteKeyA(HKEY,LPCSTR);
-WINADVAPI LONG WINAPI RegDeleteKeyW(HKEY,LPCWSTR);
-#if (WINVER >= 0x0502)
-WINADVAPI LONG WINAPI RegDeleteKeyExA(HKEY,LPCSTR,REGSAM,DWORD);
-WINADVAPI LONG WINAPI RegDeleteKeyExW(HKEY,LPCWSTR,REGSAM,DWORD);
-#endif
-WINADVAPI LONG WINAPI RegDeleteValueA(HKEY,LPCSTR);
-WINADVAPI LONG WINAPI RegDeleteValueW(HKEY,LPCWSTR);
-WINADVAPI LONG WINAPI RegEnumKeyA(HKEY,DWORD,LPSTR,DWORD);
-WINADVAPI LONG WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD);
-WINADVAPI LONG WINAPI RegEnumKeyExA(HKEY,DWORD,LPSTR,PDWORD,PDWORD,LPSTR,PDWORD,PFILETIME);
-WINADVAPI LONG WINAPI RegEnumKeyExW(HKEY,DWORD,LPWSTR,PDWORD,PDWORD,LPWSTR,PDWORD,PFILETIME);
-WINADVAPI LONG WINAPI RegEnumValueA(HKEY,DWORD,LPSTR,PDWORD,PDWORD,PDWORD,LPBYTE,PDWORD);
-WINADVAPI LONG WINAPI RegEnumValueW(HKEY,DWORD,LPWSTR,PDWORD,PDWORD,PDWORD,LPBYTE,PDWORD);
-WINADVAPI LONG WINAPI RegFlushKey(HKEY);
-WINADVAPI LONG WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,PDWORD);
-WINADVAPI LONG WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
-WINADVAPI LONG WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
-WINADVAPI LONG WINAPI RegNotifyChangeKeyValue(HKEY,BOOL,DWORD,HANDLE,BOOL);
-WINADVAPI LONG WINAPI RegOpenKeyA(HKEY,LPCSTR,PHKEY);
-WINADVAPI LONG WINAPI RegOpenKeyExA(HKEY,LPCSTR,DWORD,REGSAM,PHKEY);
-WINADVAPI LONG WINAPI RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY);
-WINADVAPI LONG WINAPI RegOpenKeyW(HKEY,LPCWSTR,PHKEY);
-WINADVAPI LONG WINAPI RegQueryInfoKeyA(HKEY,LPSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME);
-WINADVAPI LONG WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PFILETIME);
-WINADVAPI LONG WINAPI RegQueryMultipleValuesA(HKEY,PVALENTA,DWORD,LPSTR,LPDWORD);
-WINADVAPI LONG WINAPI RegQueryMultipleValuesW(HKEY,PVALENTW,DWORD,LPWSTR,LPDWORD);
-WINADVAPI LONG WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,PLONG);
-WINADVAPI LONG WINAPI RegQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
-WINADVAPI LONG WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
-WINADVAPI LONG WINAPI RegQueryValueW(HKEY,LPCWSTR,LPWSTR,PLONG);
-WINADVAPI LONG WINAPI RegReplaceKeyA(HKEY,LPCSTR,LPCSTR,LPCSTR);
-WINADVAPI LONG WINAPI RegReplaceKeyW(HKEY,LPCWSTR,LPCWSTR,LPCWSTR);
-WINADVAPI LONG WINAPI RegRestoreKeyA(HKEY,LPCSTR,DWORD);
-WINADVAPI LONG WINAPI RegRestoreKeyW(HKEY,LPCWSTR,DWORD);
-WINADVAPI LONG WINAPI RegSaveKeyA(HKEY,LPCSTR,LPSECURITY_ATTRIBUTES);
-WINADVAPI LONG WINAPI RegSaveKeyW(HKEY,LPCWSTR,LPSECURITY_ATTRIBUTES);
-WINADVAPI LONG WINAPI RegSetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
-WINADVAPI LONG WINAPI RegSetValueA(HKEY,LPCSTR,DWORD,LPCSTR,DWORD);
-WINADVAPI LONG WINAPI RegSetValueExA(HKEY,LPCSTR,DWORD,DWORD,const BYTE*,DWORD);
-WINADVAPI LONG WINAPI RegSetValueExW(HKEY,LPCWSTR,DWORD,DWORD,const BYTE*,DWORD);
-WINADVAPI LONG WINAPI RegSetValueW(HKEY,LPCWSTR,DWORD,LPCWSTR,DWORD);
-WINADVAPI LONG WINAPI RegUnLoadKeyA(HKEY,LPCSTR);
-WINADVAPI LONG WINAPI RegUnLoadKeyW(HKEY,LPCWSTR);
-
-#ifdef UNICODE
-typedef VALENTW VALENT,*PVALENT;
-#define AbortSystemShutdown AbortSystemShutdownW
-#define InitiateSystemShutdown InitiateSystemShutdownW
-#define RegConnectRegistry RegConnectRegistryW
-#define RegCreateKey RegCreateKeyW
-#define RegCreateKeyEx RegCreateKeyExW
-#define RegDeleteKey RegDeleteKeyW
-#if (WINVER >= 0x0502)
-#define RegDeleteKeyEx RegDeleteKeyExW
-#endif
-#define RegDeleteValue RegDeleteValueW
-#define RegEnumKey RegEnumKeyW
-#define RegEnumKeyEx RegEnumKeyExW
-#define RegEnumValue RegEnumValueW
-#define RegLoadKey RegLoadKeyW
-#define RegOpenKey RegOpenKeyW
-#define RegOpenKeyEx RegOpenKeyExW
-#define RegQueryInfoKey RegQueryInfoKeyW
-#define RegQueryMultipleValues RegQueryMultipleValuesW
-#define RegQueryValue RegQueryValueW
-#define RegQueryValueEx RegQueryValueExW
-#define RegReplaceKey RegReplaceKeyW
-#define RegRestoreKey RegRestoreKeyW
-#define RegSaveKey RegSaveKeyW
-#define RegSetValue RegSetValueW
-#define RegSetValueEx RegSetValueExW
-#define RegUnLoadKey RegUnLoadKeyW
-#else
-typedef VALENTA VALENT,*PVALENT;
-#define AbortSystemShutdown AbortSystemShutdownA
-#define InitiateSystemShutdown InitiateSystemShutdownA
-#define RegConnectRegistry RegConnectRegistryA
-#define RegCreateKey RegCreateKeyA
-#define RegCreateKeyEx RegCreateKeyExA
-#define RegDeleteKey RegDeleteKeyA
-#if (WINVER >= 0x0502)
-#define RegDeleteKeyEx RegDeleteKeyExA
-#endif
-#define RegDeleteValue RegDeleteValueA
-#define RegEnumKey RegEnumKeyA
-#define RegEnumKeyEx RegEnumKeyExA
-#define RegEnumValue RegEnumValueA
-#define RegLoadKey RegLoadKeyA
-#define RegOpenKey RegOpenKeyA
-#define RegOpenKeyEx RegOpenKeyExA
-#define RegQueryInfoKey RegQueryInfoKeyA
-#define RegQueryMultipleValues RegQueryMultipleValuesA
-#define RegQueryValue RegQueryValueA
-#define RegQueryValueEx RegQueryValueExA
-#define RegReplaceKey RegReplaceKeyA
-#define RegRestoreKey RegRestoreKeyA
-#define RegSaveKey RegSaveKeyA
-#define RegSetValue RegSetValueA
-#define RegSetValueEx RegSetValueExA
-#define RegUnLoadKey RegUnLoadKeyA
-#endif
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/winresrc.h b/winsup/w32api/include/winresrc.h
deleted file mode 100644
index 79a5d8e..0000000
--- a/winsup/w32api/include/winresrc.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef _WINRESRC_H
-#define _WINRESRC_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#define WIN32_LEAN_AND_MEAN
-#include <winuser.h>
-#include <winnt.h>
-#include <winver.h>
-#include <dde.h>
-#include <dlgs.h>
-#include <commctrl.h>
-#endif
diff --git a/winsup/w32api/include/winsnmp.h b/winsup/w32api/include/winsnmp.h
deleted file mode 100644
index bfed386..0000000
--- a/winsup/w32api/include/winsnmp.h
+++ /dev/null
@@ -1,329 +0,0 @@
-/*
- winsnmp.h - Header file for the Windows SNMP API
-
- Written by Filip Navara <xnavara@volny.cz>
-
- References (2003-08-25):
- Windows SNMP
- http://www.winsnmp.com/docs/winsnmp.doc
-
- WinSNMP v2.0 Addendum
- http://www.winsnmp.com/docs/winsnmp2.txt
-
- WinSNMP v3.0 API Addendum
- http://www.winsnmp.com/docs/winsnmp3.htm
-
- WinSNMP Reference
- http://msdn.microsoft.com/library/en-us/snmp/snmp/winsnmp_api_reference.asp
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-*/
-
-#ifndef _WINSNMP_H
-#define _WINSNMP_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifndef _WINDOWS_H
-#include <windows.h>
-#endif
-
-#include <pshpack4.h>
-
-#ifndef WINSNMPAPI
-#define WINSNMPAPI WINAPI
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define MAXOBJIDSIZE 128
-#define MAXOBJIDSTRSIZE 1408
-#define MAXVENDORINFO 32
-#ifndef _SNMP_ASN_DEFINED
-#define _SNMP_ASN_DEFINED
-#define ASN_UNIVERSAL 0x00
-#define ASN_PRIMITIVE 0x00
-#define ASN_CONSTRUCTOR 0x20
-#define ASN_APPLICATION 0x40
-#define ASN_CONTEXT 0x80
-#define ASN_PRIVATE 0xC0
-#define SNMP_PDU_GET (ASN_CONTEXT | ASN_CONSTRUCTOR | 0)
-#define SNMP_PDU_GETNEXT (ASN_CONTEXT | ASN_CONSTRUCTOR | 1)
-#define SNMP_PDU_RESPONSE (ASN_CONTEXT | ASN_CONSTRUCTOR | 2)
-#define SNMP_PDU_SET (ASN_CONTEXT | ASN_CONSTRUCTOR | 3)
-#define SNMP_PDU_GETBULK (ASN_CONTEXT | ASN_CONSTRUCTOR | 4)
-#define SNMP_PDU_V1TRAP (ASN_CONTEXT | ASN_CONSTRUCTOR | 4)
-#define SNMP_PDU_INFORM (ASN_CONTEXT | ASN_CONSTRUCTOR | 6)
-#define SNMP_PDU_TRAP (ASN_CONTEXT | ASN_CONSTRUCTOR | 7)
-#define SNMP_PDU_REPORT (ASN_CONTEXT | ASN_CONSTRUCTOR | 8)
-#endif /* _SNMP_ASN_DEFINED */
-#define SNMP_SYNTAX_SEQUENCE (ASN_UNIVERSAL | ASN_CONSTRUCTOR | 0x10)
-#define SNMP_SYNTAX_INT (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x02)
-#define SNMP_SYNTAX_BITS (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x03)
-#define SNMP_SYNTAX_OCTETS (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x04)
-#define SNMP_SYNTAX_NULL (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x05)
-#define SNMP_SYNTAX_OID (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x06)
-#define SNMP_SYNTAX_IPADDR (ASN_APPLICATION | ASN_PRIMITIVE | 0x00)
-#define SNMP_SYNTAX_CNTR32 (ASN_APPLICATION | ASN_PRIMITIVE | 0x01)
-#define SNMP_SYNTAX_GAUGE32 (ASN_APPLICATION | ASN_PRIMITIVE | 0x02)
-#define SNMP_SYNTAX_TIMETICKS (ASN_APPLICATION | ASN_PRIMITIVE | 0x03)
-#define SNMP_SYNTAX_OPAQUE (ASN_APPLICATION | ASN_PRIMITIVE | 0x04)
-#define SNMP_SYNTAX_NSAPADDR (ASN_APPLICATION | ASN_PRIMITIVE | 0x05)
-#define SNMP_SYNTAX_CNTR64 (ASN_APPLICATION | ASN_PRIMITIVE | 0x06)
-#define SNMP_SYNTAX_UINT32 (ASN_APPLICATION | ASN_PRIMITIVE | 0x07)
-#define SNMP_SYNTAX_NOSUCHOBJECT (ASN_CONTEXT | ASN_PRIMITIVE | 0x00)
-#define SNMP_SYNTAX_NOSUCHINSTANCE (ASN_CONTEXT | ASN_PRIMITIVE | 0x01)
-#define SNMP_SYNTAX_ENDOFMIBVIEW (ASN_CONTEXT | ASN_PRIMITIVE | 0x02)
-#define SNMP_SYNTAX_INT32 SNMP_SYNTAX_INT
-#define SNMP_TRAP_COLDSTART 0
-#define SNMP_TRAP_WARMSTART 1
-#define SNMP_TRAP_LINKDOWN 2
-#define SNMP_TRAP_LINKUP 3
-#define SNMP_TRAP_AUTHFAIL 4
-#define SNMP_TRAP_EGPNEIGHBORLOSS 5
-#define SNMP_TRAP_ENTERPRISESPECIFIC 6
-#define SNMP_ERROR_NOERROR 0
-#define SNMP_ERROR_TOOBIG 1
-#define SNMP_ERROR_NOSUCHNAME 2
-#define SNMP_ERROR_BADVALUE 3
-#define SNMP_ERROR_READONLY 4
-#define SNMP_ERROR_GENERR 5
-#define SNMP_ERROR_NOACCESS 6
-#define SNMP_ERROR_WRONGTYPE 7
-#define SNMP_ERROR_WRONGLENGTH 8
-#define SNMP_ERROR_WRONGENCODING 9
-#define SNMP_ERROR_WRONGVALUE 10
-#define SNMP_ERROR_NOCREATION 11
-#define SNMP_ERROR_INCONSISTENTVALUE 12
-#define SNMP_ERROR_RESOURCEUNAVAILABLE 13
-#define SNMP_ERROR_COMMITFAILED 14
-#define SNMP_ERROR_UNDOFAILED 15
-#define SNMP_ERROR_AUTHORIZATIONERROR 16
-#define SNMP_ERROR_NOTWRITABLE 17
-#define SNMP_ERROR_INCONSISTENTNAME 18
-#define SNMP_SEC_MODEL_V1 1
-#define SNMP_SEC_MODEL_V2 2
-#define SNMP_SEC_MODEL_USM 3
-#define SNMP_NOAUTH_NOPRIV 0
-#define SNMP_AUTH_NOPRIV 1
-#define SNMP_AUTH_PRIV 3
-#define SNMP_USM_NO_AUTH_PROTOCOL 1
-#define SNMP_USM_HMACMD5_AUTH_PROTOCOL 2
-#define SNMP_USM_HMACSHA_AUTH_PROTOCOL 3
-#define SNMP_USM_NO_PRIV_PROTOCOL 1
-#define SNMP_USM_DES_PRIV_PROTOCOL 2
-#define SNMPAPI_TRANSLATED 0
-#define SNMPAPI_UNTRANSLATED_V1 1
-#define SNMPAPI_UNTRANSLATED_V2 2
-#define SNMPAPI_UNTRANSLATED_V3 3
-#define SNMPAPI_OFF 0
-#define SNMPAPI_ON 1
-#define SNMPAPI_FAILURE 0
-#define SNMPAPI_SUCCESS 1
-#define SNMPAPI_NO_SUPPORT 0
-#define SNMPAPI_V1_SUPPORT 1
-#define SNMPAPI_V2_SUPPORT 2
-#define SNMPAPI_M2M_SUPPORT 3
-#define SNMPAPI_V3_SUPPORT 3
-#define SNMPAPI_ALLOC_ERROR 2
-#define SNMPAPI_CONTEXT_INVALID 3
-#define SNMPAPI_CONTEXT_UNKNOWN 4
-#define SNMPAPI_ENTITY_INVALID 5
-#define SNMPAPI_ENTITY_UNKNOWN 6
-#define SNMPAPI_INDEX_INVALID 7
-#define SNMPAPI_NOOP 8
-#define SNMPAPI_OID_INVALID 9
-#define SNMPAPI_OPERATION_INVALID 10
-#define SNMPAPI_OUTPUT_TRUNCATED 11
-#define SNMPAPI_PDU_INVALID 12
-#define SNMPAPI_SESSION_INVALID 13
-#define SNMPAPI_SYNTAX_INVALID 14
-#define SNMPAPI_VBL_INVALID 15
-#define SNMPAPI_MODE_INVALID 16
-#define SNMPAPI_SIZE_INVALID 17
-#define SNMPAPI_NOT_INITIALIZED 18
-#define SNMPAPI_MESSAGE_INVALID 19
-#define SNMPAPI_HWND_INVALID 20
-#define SNMPAPI_ENGINE_INVALID 30
-#define SNMPAPI_ENGINE_DISCOVERY_FAILED 31
-#define SNMPAPI_OTHER_ERROR 99
-#define SNMPAPI_TL_NOT_INITIALIZED 100
-#define SNMPAPI_TL_NOT_SUPPORTED 101
-#define SNMPAPI_TL_NOT_AVAILABLE 102
-#define SNMPAPI_TL_RESOURCE_ERROR 103
-#define SNMPAPI_TL_UNDELIVERABLE 104
-#define SNMPAPI_TL_SRC_INVALID 105
-#define SNMPAPI_TL_INVALID_PARAM 106
-#define SNMPAPI_TL_IN_USE 107
-#define SNMPAPI_TL_TIMEOUT 108
-#define SNMPAPI_TL_PDU_TOO_BIG 109
-#define SNMPAPI_TL_OTHER 199
-#define SNMPAPI_RPT_INVALIDMSG 200
-#define SNMPAPI_RPT_INASNPARSEERR 201
-#define SNMPAPI_RPT_UNKNOWNSECMODEL 202
-#define SNMPAPI_RPT_UNKNOWNENGINEID 203
-#define SNMPAPI_RPT_UNSUPPSECLEVEL 204
-#define SNMPAPI_RPT_UNKNOWNUSERNAME 205
-#define SNMPAPI_RPT_WRONGDIGEST 206
-#define SNMPAPI_RPT_NOTINTIMEWINDOW 207
-#define SNMPAPI_RPT_DECRYPTIONERROR 208
-#define SNMPAPI_RPT_OTHER 299
-
-#ifndef RC_INVOKED
-
-typedef HANDLE HSNMP_SESSION, *LPHSNMP_SESSION;
-typedef HANDLE HSNMP_CONTEXT, *LPHSNMP_CONTEXT;
-typedef HANDLE HSNMP_VBL, *LPHSNMP_VBL;
-typedef HANDLE HSNMP_PDU, *LPHSNMP_PDU;
-typedef HANDLE HSNMP_ENTITY, *LPHSNMP_ENTITY;
-typedef unsigned char smiBYTE, *smiLPBYTE;
-typedef signed int smiINT, *smiLPINT;
-typedef signed int smiINT32, *smiLPINT32;
-typedef unsigned int smiUINT32, *smiLPUINT32;
-typedef smiUINT32 smiCNTR32, *smiLPCNTR32;
-typedef smiUINT32 smiGAUGE32, *smiLPGAUGE32;
-typedef smiUINT32 smiTIMETICKS, *smiLPTIMETICKS;
-typedef smiUINT32 SNMPAPI_STATUS;
-typedef struct {
- smiUINT32 len;
- smiLPBYTE ptr;
-} smiOCTETS, *smiLPOCTETS, smiOPAQUE, *smiLPOPAQUE, smiBITS, *smiLPBITS, smiIPADDR, *smiLPIPADDR, smiNSAPADDR, *smiLPNSAPADDR;
-typedef const smiLPOCTETS smiLPCOCTETS;
-typedef struct {
- smiUINT32 len;
- smiLPUINT32 ptr;
-} smiOID, *smiLPOID;
-typedef const smiLPOID smiLPCOID;
-typedef struct {
- smiUINT32 hipart;
- smiUINT32 lopart;
-} smiCNTR64, *smiLPCNTR64;
-typedef struct {
- smiUINT32 syntax;
- union {
- smiINT sNumber;
- smiUINT32 uNumber;
- smiCNTR64 hNumber;
- smiOCTETS string;
- smiOID oid;
- smiBYTE empty;
- } value;
-} smiVALUE, *smiLPVALUE;
-typedef const smiLPVALUE smiLPCVALUE;
-typedef struct {
- CHAR vendorName[MAXVENDORINFO*2];
- CHAR vendorContact[MAXVENDORINFO*2];
- CHAR vendorVersionId[MAXVENDORINFO];
- CHAR vendorVersionDate[MAXVENDORINFO];
- smiUINT32 vendorEnterprise;
-} smiVENDORINFO, FAR *smiLPVENDORINFO;
-typedef SNMPAPI_STATUS (CALLBACK *SNMPAPI_CALLBACK)(HSNMP_SESSION,HWND,UINT,WPARAM,LPARAM,LPVOID);
-typedef struct
-{
- HSNMP_ENTITY hEntity;
- HSNMP_SESSION hSession;
- smiUINT32 nTranslateMode;
- smiUINT32 nSnmpVersion;
- smiOCTETS dFriendlyName;
- smiUINT32 nAddressFamily;
- smiOCTETS dAddressString;
- smiUINT32 nRequestPort;
- smiUINT32 nNotificationPort;
- smiUINT32 nMaxMsgSize;
- smiOCTETS dEngineID;
- smiUINT32 nEngineBoots;
- smiUINT32 nEngineTime;
- smiUINT32 nEngineSeconds;
- smiUINT32 nRetransmitMode;
- smiTIMETICKS nPolicyTimeout;
- smiUINT32 nPolicyRetry;
- smiTIMETICKS nActualTimeout;
- smiUINT32 nActualRetry;
-} smiENTITYINFO, *smiLPENTITYINFO;
-typedef struct
-{
- HSNMP_CONTEXT hContext;
- HSNMP_SESSION hSession;
- smiUINT32 nTranslateMode;
- smiUINT32 nSnmpVersion;
- smiOCTETS dFriendlyName;
- smiOCTETS dContextEngineID;
- smiOCTETS dContextName;
- smiOCTETS dSecurityName;
- smiUINT32 nSecurityModel;
- smiUINT32 nSecurityLevel;
- smiUINT32 nSecurityAuthProtocol;
- smiOCTETS dSecurityAuthKey;
- smiUINT32 nSecurityPrivProtocol;
- smiOCTETS dSecurityPrivKey;
-} smiCONTEXTINFO, *smiLPCONTEXTINFO;
-
-SNMPAPI_STATUS WINSNMPAPI SnmpCancelMsg(HSNMP_SESSION,smiINT32);
-SNMPAPI_STATUS WINSNMPAPI SnmpCleanup(VOID);
-SNMPAPI_STATUS WINSNMPAPI SnmpClose(HSNMP_SESSION);
-SNMPAPI_STATUS WINSNMPAPI SnmpContextToStr(HSNMP_CONTEXT,smiLPOCTETS);
-SNMPAPI_STATUS WINSNMPAPI SnmpCountVbl(HSNMP_VBL);
-HSNMP_PDU WINSNMPAPI SnmpCreatePdu(HSNMP_SESSION,smiINT,smiINT32,smiINT,smiINT,HSNMP_VBL);
-HSNMP_SESSION WINSNMPAPI SnmpCreateSession(HWND,UINT,SNMPAPI_CALLBACK,LPVOID);
-HSNMP_VBL WINSNMPAPI SnmpCreateVbl(HSNMP_SESSION,smiLPCOID,smiLPCVALUE);
-SNMPAPI_STATUS WINSNMPAPI SnmpDecodeMsg(HSNMP_SESSION,LPHSNMP_ENTITY,LPHSNMP_ENTITY,LPHSNMP_CONTEXT,LPHSNMP_PDU,smiLPCOCTETS);
-SNMPAPI_STATUS WINSNMPAPI SnmpDeleteVb(HSNMP_VBL,smiUINT32);
-HSNMP_PDU WINSNMPAPI SnmpDuplicatePdu(HSNMP_SESSION,HSNMP_PDU);
-HSNMP_VBL WINSNMPAPI SnmpDuplicateVbl(HSNMP_SESSION,HSNMP_VBL);
-SNMPAPI_STATUS WINSNMPAPI SnmpEncodeMsg(HSNMP_SESSION,HSNMP_ENTITY,HSNMP_ENTITY,HSNMP_CONTEXT,HSNMP_PDU,smiLPOCTETS);
-SNMPAPI_STATUS WINSNMPAPI SnmpEntityToStr(HSNMP_ENTITY,smiUINT32,LPSTR);
-SNMPAPI_STATUS WINSNMPAPI SnmpFreeContext(HSNMP_CONTEXT);
-SNMPAPI_STATUS WINSNMPAPI SnmpFreeDescriptor(smiUINT32,smiLPOPAQUE);
-SNMPAPI_STATUS WINSNMPAPI SnmpFreeEntity(HSNMP_ENTITY);
-SNMPAPI_STATUS WINSNMPAPI SnmpFreePdu(HSNMP_PDU);
-SNMPAPI_STATUS WINSNMPAPI SnmpFreeVbl(HSNMP_VBL);
-SNMPAPI_STATUS WINSNMPAPI SnmpGetLastError(HSNMP_SESSION);
-SNMPAPI_STATUS WINSNMPAPI SnmpGetPduData(HSNMP_PDU,smiLPINT,smiLPINT32,smiLPINT,smiLPINT,LPHSNMP_VBL);
-SNMPAPI_STATUS WINSNMPAPI SnmpGetRetransmitMode(smiLPUINT32);
-SNMPAPI_STATUS WINSNMPAPI SnmpGetRetry(HSNMP_ENTITY,smiLPUINT32,smiLPUINT32);
-SNMPAPI_STATUS WINSNMPAPI SnmpGetTimeout(HSNMP_ENTITY,smiLPTIMETICKS,smiLPTIMETICKS);
-SNMPAPI_STATUS WINSNMPAPI SnmpGetTranslateMode(smiLPUINT32);
-SNMPAPI_STATUS WINSNMPAPI SnmpGetVb(HSNMP_VBL,smiUINT32,smiLPOID,smiLPVALUE);
-SNMPAPI_STATUS WINSNMPAPI SnmpGetVendorInfo(smiLPVENDORINFO);
-SNMPAPI_STATUS WINSNMPAPI SnmpListen(HSNMP_ENTITY,SNMPAPI_STATUS);
-SNMPAPI_STATUS WINSNMPAPI SnmpOidCompare(smiLPCOID,smiLPCOID,smiUINT32,smiLPINT);
-SNMPAPI_STATUS WINSNMPAPI SnmpOidCopy(smiLPCOID,smiLPOID);
-SNMPAPI_STATUS WINSNMPAPI SnmpOidToStr(smiLPCOID,smiUINT32,LPSTR);
-HSNMP_SESSION WINSNMPAPI SnmpOpen(HWND,UINT);
-SNMPAPI_STATUS WINSNMPAPI SnmpRecvMsg(HSNMP_SESSION,LPHSNMP_ENTITY,LPHSNMP_ENTITY,LPHSNMP_CONTEXT,LPHSNMP_PDU);
-SNMPAPI_STATUS WINSNMPAPI SnmpRegister(HSNMP_SESSION,HSNMP_ENTITY,HSNMP_ENTITY,HSNMP_CONTEXT,smiLPCOID,smiUINT32);
-SNMPAPI_STATUS WINSNMPAPI SnmpSendMsg(HSNMP_SESSION,HSNMP_ENTITY,HSNMP_ENTITY,HSNMP_CONTEXT,HSNMP_PDU);
-SNMPAPI_STATUS WINSNMPAPI SnmpSetPduData(HSNMP_PDU,const smiINT *,const smiINT32 *,const smiINT *,const smiINT *,const HSNMP_VBL *);
-SNMPAPI_STATUS WINSNMPAPI SnmpSetPort(HSNMP_ENTITY,UINT);
-SNMPAPI_STATUS WINSNMPAPI SnmpSetRetransmitMode(smiUINT32);
-SNMPAPI_STATUS WINSNMPAPI SnmpSetRetry(HSNMP_ENTITY,smiUINT32);
-SNMPAPI_STATUS WINSNMPAPI SnmpSetTimeout(HSNMP_ENTITY,smiTIMETICKS);
-SNMPAPI_STATUS WINSNMPAPI SnmpSetTranslateMode(smiUINT32);
-SNMPAPI_STATUS WINSNMPAPI SnmpSetVb(HSNMP_VBL,smiUINT32,smiLPCOID,smiLPCVALUE);
-SNMPAPI_STATUS WINSNMPAPI SnmpStartup(smiLPUINT32,smiLPUINT32,smiLPUINT32,smiLPUINT32,smiLPUINT32);
-HSNMP_CONTEXT WINSNMPAPI SnmpStrToContext(HSNMP_SESSION,smiLPCOCTETS);
-HSNMP_ENTITY WINSNMPAPI SnmpStrToEntity(HSNMP_SESSION,LPCSTR);
-SNMPAPI_STATUS WINSNMPAPI SnmpStrToOid(LPCSTR,smiLPOID);
-/* Added in WinSNMP v3.0, not present in some (all?) versions of MS wsnmp32.dll */
-HSNMP_ENTITY WINSNMPAPI SnmpCreateEntity(HSNMP_SESSION,smiLPENTITYINFO);
-SNMPAPI_STATUS WINSNMPAPI SnmpGetEntityInfo(HSNMP_ENTITY,smiLPENTITYINFO);
-SNMPAPI_STATUS WINSNMPAPI SnmpSetEntityInfo(HSNMP_ENTITY,smiLPENTITYINFO);
-SNMPAPI_STATUS WINSNMPAPI SnmpFreeEntityInfo(smiLPENTITYINFO);
-HSNMP_CONTEXT WINSNMPAPI SnmpCreateContext(HSNMP_SESSION,smiLPCONTEXTINFO);
-SNMPAPI_STATUS WINSNMPAPI SnmpGetContextInfo(HSNMP_CONTEXT,smiLPCONTEXTINFO);
-SNMPAPI_STATUS WINSNMPAPI SnmpSetContextInfo(HSNMP_CONTEXT,smiLPCONTEXTINFO);
-SNMPAPI_STATUS WINSNMPAPI SnmpFreeContextInfo(smiLPCONTEXTINFO);
-SNMPAPI_STATUS WINSNMPAPI SnmpPasswordToKey(smiLPOCTETS,smiINT32,smiLPOCTETS);
-
-#endif /* RC_INVOKED */
-
-#ifdef __cplusplus
-}
-#endif
-#include <poppack.h>
-#endif
diff --git a/winsup/w32api/include/winsock.h b/winsup/w32api/include/winsock.h
deleted file mode 100644
index b595b59..0000000
--- a/winsup/w32api/include/winsock.h
+++ /dev/null
@@ -1,536 +0,0 @@
-/*
-
- Definitions for winsock 1.1
-
- Portions Copyright (c) 1980, 1983, 1988, 1993
- The Regents of the University of California. All rights reserved.
-
- Portions Copyright (c) 1993 by Digital Equipment Corporation.
- */
-
-#ifndef _WINSOCK_H
-#define _WINSOCK_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#define _GNU_H_WINDOWS32_SOCKETS
-
-#include <windows.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined ( _BSDTYPES_DEFINED )
-/* also defined in gmon.h and in cygwin's sys/types */
-typedef unsigned char u_char;
-typedef unsigned short u_short;
-typedef unsigned int u_int;
-typedef unsigned long u_long;
-#define _BSDTYPES_DEFINED
-#endif /* !defined _BSDTYPES_DEFINED */
-typedef u_int SOCKET;
-#ifndef FD_SETSIZE
-#define FD_SETSIZE 64
-#endif
-
-/* shutdown() how types */
-#define SD_RECEIVE 0x00
-#define SD_SEND 0x01
-#define SD_BOTH 0x02
-
-#ifndef _SYS_TYPES_FD_SET
-/* fd_set may have be defined by the newlib <sys/types.h>
- * if __USE_W32_SOCKETS not defined.
- */
-#ifdef fd_set
-#undef fd_set
-#endif
-typedef struct fd_set {
- u_int fd_count;
- SOCKET fd_array[FD_SETSIZE];
-} fd_set;
-int PASCAL __WSAFDIsSet(SOCKET,fd_set*);
-#ifndef FD_CLR
-#define FD_CLR(fd,set) do { u_int __i;\
-for (__i = 0; __i < ((fd_set *)(set))->fd_count ; __i++) {\
- if (((fd_set *)(set))->fd_array[__i] == (fd)) {\
- while (__i < ((fd_set *)(set))->fd_count-1) {\
- ((fd_set*)(set))->fd_array[__i] = ((fd_set*)(set))->fd_array[__i+1];\
- __i++;\
- }\
- ((fd_set*)(set))->fd_count--;\
- break;\
- }\
-}\
-} while (0)
-#endif
-#ifndef FD_SET
-#define FD_SET(fd, set) do { \
- if (((fd_set *)(set))->fd_count < FD_SETSIZE) \
- ((fd_set *)(set))->fd_array[((fd_set *)(set))->fd_count++]=(fd);\
-}while (0)
-#endif
-#ifndef FD_ZERO
-#define FD_ZERO(set) (((fd_set *)(set))->fd_count=0)
-#endif
-#ifndef FD_ISSET
-#define FD_ISSET(fd, set) __WSAFDIsSet((SOCKET)(fd), (fd_set *)(set))
-#endif
-#elif !defined(USE_SYS_TYPES_FD_SET)
-#warning "fd_set and associated macros have been defined in sys/types. \
- This can cause runtime problems with W32 sockets"
-#endif /* ndef _SYS_TYPES_FD_SET */
-
-#if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
-#ifndef _TIMEVAL_DEFINED /* also in sys/time.h */
-#define _TIMEVAL_DEFINED
-struct timeval {
- long tv_sec;
- long tv_usec;
-};
-#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
-#define timercmp(tvp, uvp, cmp) \
- (((tvp)->tv_sec != (uvp)->tv_sec) ? \
- ((tvp)->tv_sec cmp (uvp)->tv_sec) : \
- ((tvp)->tv_usec cmp (uvp)->tv_usec))
-#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
-#endif /* _TIMEVAL_DEFINED */
-struct hostent {
- char *h_name;
- char **h_aliases;
- short h_addrtype;
- short h_length;
- char **h_addr_list;
-#define h_addr h_addr_list[0]
-};
-struct linger {
- u_short l_onoff;
- u_short l_linger;
-};
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
-#define IOCPARM_MASK 0x7f
-#define IOC_VOID 0x20000000
-#define IOC_OUT 0x40000000
-#define IOC_IN 0x80000000
-#define IOC_INOUT (IOC_IN|IOC_OUT)
-
-#if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
-#define _IO(x,y) (IOC_VOID|((x)<<8)|(y))
-#define _IOR(x,y,t) (IOC_OUT|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
-#define _IOW(x,y,t) (IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
-#define FIONBIO _IOW('f', 126, u_long)
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
-
-#define FIONREAD _IOR('f', 127, u_long)
-#define FIOASYNC _IOW('f', 125, u_long)
-#define SIOCSHIWAT _IOW('s', 0, u_long)
-#define SIOCGHIWAT _IOR('s', 1, u_long)
-#define SIOCSLOWAT _IOW('s', 2, u_long)
-#define SIOCGLOWAT _IOR('s', 3, u_long)
-#define SIOCATMARK _IOR('s', 7, u_long)
-
-#if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
-struct netent {
- char * n_name;
- char **n_aliases;
- short n_addrtype;
- u_long n_net;
-};
-struct servent {
- char *s_name;
- char **s_aliases;
- short s_port;
- char *s_proto;
-};
-struct protoent {
- char *p_name;
- char **p_aliases;
- short p_proto;
-};
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
-
-#define IPPROTO_IP 0
-#define IPPROTO_ICMP 1
-#define IPPROTO_IGMP 2
-#define IPPROTO_GGP 3
-#define IPPROTO_TCP 6
-#define IPPROTO_PUP 12
-#define IPPROTO_UDP 17
-#define IPPROTO_IDP 22
-#define IPPROTO_ND 77
-#define IPPROTO_RAW 255
-#define IPPROTO_MAX 256
-#define IPPORT_ECHO 7
-#define IPPORT_DISCARD 9
-#define IPPORT_SYSTAT 11
-#define IPPORT_DAYTIME 13
-#define IPPORT_NETSTAT 15
-#define IPPORT_FTP 21
-#define IPPORT_TELNET 23
-#define IPPORT_SMTP 25
-#define IPPORT_TIMESERVER 37
-#define IPPORT_NAMESERVER 42
-#define IPPORT_WHOIS 43
-#define IPPORT_MTP 57
-#define IPPORT_TFTP 69
-#define IPPORT_RJE 77
-#define IPPORT_FINGER 79
-#define IPPORT_TTYLINK 87
-#define IPPORT_SUPDUP 95
-#define IPPORT_EXECSERVER 512
-#define IPPORT_LOGINSERVER 513
-#define IPPORT_CMDSERVER 514
-#define IPPORT_EFSSERVER 520
-#define IPPORT_BIFFUDP 512
-#define IPPORT_WHOSERVER 513
-#define IPPORT_ROUTESERVER 520
-#define IPPORT_RESERVED 1024
-#define IMPLINK_IP 155
-#define IMPLINK_LOWEXPER 156
-#define IMPLINK_HIGHEXPER 158
-struct in_addr {
- union {
- struct { u_char s_b1,s_b2,s_b3,s_b4; } S_un_b;
- struct { u_short s_w1,s_w2; } S_un_w;
- u_long S_addr;
- } S_un;
-#define s_addr S_un.S_addr
-#define s_host S_un.S_un_b.s_b2
-#define s_net S_un.S_un_b.s_b1
-#define s_imp S_un.S_un_w.s_w2
-#define s_impno S_un.S_un_b.s_b4
-#define s_lh S_un.S_un_b.s_b3
-};
-#define IN_CLASSA(i) (((long)(i)&0x80000000) == 0)
-#define IN_CLASSA_NET 0xff000000
-#define IN_CLASSA_NSHIFT 24
-#define IN_CLASSA_HOST 0x00ffffff
-#define IN_CLASSA_MAX 128
-#define IN_CLASSB(i) (((long)(i)&0xc0000000)==0x80000000)
-#define IN_CLASSB_NET 0xffff0000
-#define IN_CLASSB_NSHIFT 16
-#define IN_CLASSB_HOST 0x0000ffff
-#define IN_CLASSB_MAX 65536
-#define IN_CLASSC(i) (((long)(i)&0xe0000000)==0xc0000000)
-#define IN_CLASSC_NET 0xffffff00
-#define IN_CLASSC_NSHIFT 8
-#define IN_CLASSC_HOST 0xff
-#define INADDR_ANY (u_long)0
-#define INADDR_LOOPBACK 0x7f000001
-#define INADDR_BROADCAST (u_long)0xffffffff
-#define INADDR_NONE 0xffffffff
-struct sockaddr_in {
- short sin_family;
- u_short sin_port;
- struct in_addr sin_addr;
- char sin_zero[8];
-};
-#define WSADESCRIPTION_LEN 256
-#define WSASYS_STATUS_LEN 128
-typedef struct WSAData {
- WORD wVersion;
- WORD wHighVersion;
- char szDescription[WSADESCRIPTION_LEN+1];
- char szSystemStatus[WSASYS_STATUS_LEN+1];
- unsigned short iMaxSockets;
- unsigned short iMaxUdpDg;
- char * lpVendorInfo;
-} WSADATA;
-typedef WSADATA *LPWSADATA;
-
-#if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
-#define IP_OPTIONS 1
-#define SO_DEBUG 1
-#define SO_ACCEPTCONN 2
-#define SO_REUSEADDR 4
-#define SO_KEEPALIVE 8
-#define SO_DONTROUTE 16
-#define SO_BROADCAST 32
-#define SO_USELOOPBACK 64
-#define SO_LINGER 128
-#define SO_OOBINLINE 256
-#define SO_DONTLINGER (u_int)(~SO_LINGER)
-#define SO_SNDBUF 0x1001
-#define SO_RCVBUF 0x1002
-#define SO_SNDLOWAT 0x1003
-#define SO_RCVLOWAT 0x1004
-#define SO_SNDTIMEO 0x1005
-#define SO_RCVTIMEO 0x1006
-#define SO_ERROR 0x1007
-#define SO_TYPE 0x1008
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
-/*
- * Note that the next 5 IP defines are specific to WinSock 1.1 (wsock32.dll).
- * They will cause errors or unexpected results if used with the
- * (gs)etsockopts exported from the WinSock 2 lib, ws2_32.dll. Refer ws2tcpip.h.
- */
-#define IP_MULTICAST_IF 2
-#define IP_MULTICAST_TTL 3
-#define IP_MULTICAST_LOOP 4
-#define IP_ADD_MEMBERSHIP 5
-#define IP_DROP_MEMBERSHIP 6
-
-#define IP_DEFAULT_MULTICAST_TTL 1
-#define IP_DEFAULT_MULTICAST_LOOP 1
-#define IP_MAX_MEMBERSHIPS 20
-struct ip_mreq {
- struct in_addr imr_multiaddr;
- struct in_addr imr_interface;
-};
-#define INVALID_SOCKET (SOCKET)(~0)
-#define SOCKET_ERROR (-1)
-#define SOCK_STREAM 1
-#define SOCK_DGRAM 2
-#define SOCK_RAW 3
-#define SOCK_RDM 4
-#define SOCK_SEQPACKET 5
-#define TCP_NODELAY 0x0001
-#define AF_UNSPEC 0
-#define AF_UNIX 1
-#define AF_INET 2
-#define AF_IMPLINK 3
-#define AF_PUP 4
-#define AF_CHAOS 5
-#define AF_IPX 6
-#define AF_NS 6
-#define AF_ISO 7
-#define AF_OSI AF_ISO
-#define AF_ECMA 8
-#define AF_DATAKIT 9
-#define AF_CCITT 10
-#define AF_SNA 11
-#define AF_DECnet 12
-#define AF_DLI 13
-#define AF_LAT 14
-#define AF_HYLINK 15
-#define AF_APPLETALK 16
-#define AF_NETBIOS 17
-#define AF_VOICEVIEW 18
-#define AF_FIREFOX 19
-#define AF_UNKNOWN1 20
-#define AF_BAN 21
-#define AF_ATM 22
-#define AF_INET6 23
-#if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
-#define AF_MAX 24
-struct sockaddr {
- u_short sa_family;
- char sa_data[14];
-};
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
-
-struct sockproto {
- u_short sp_family;
- u_short sp_protocol;
-};
-#define PF_UNSPEC AF_UNSPEC
-#define PF_UNIX AF_UNIX
-#define PF_INET AF_INET
-#define PF_IMPLINK AF_IMPLINK
-#define PF_PUP AF_PUP
-#define PF_CHAOS AF_CHAOS
-#define PF_NS AF_NS
-#define PF_IPX AF_IPX
-#define PF_ISO AF_ISO
-#define PF_OSI AF_OSI
-#define PF_ECMA AF_ECMA
-#define PF_DATAKIT AF_DATAKIT
-#define PF_CCITT AF_CCITT
-#define PF_SNA AF_SNA
-#define PF_DECnet AF_DECnet
-#define PF_DLI AF_DLI
-#define PF_LAT AF_LAT
-#define PF_HYLINK AF_HYLINK
-#define PF_APPLETALK AF_APPLETALK
-#define PF_VOICEVIEW AF_VOICEVIEW
-#define PF_FIREFOX AF_FIREFOX
-#define PF_UNKNOWN1 AF_UNKNOWN1
-#define PF_BAN AF_BAN
-#define PF_ATM AF_ATM
-#define PF_INET6 AF_INET6
-#define PF_MAX AF_MAX
-#define SOL_SOCKET 0xffff
-#define SOMAXCONN 5
-#if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
-#define MSG_OOB 1
-#define MSG_PEEK 2
-#define MSG_DONTROUTE 4
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
-#define MSG_MAXIOVLEN 16
-#define MSG_PARTIAL 0x8000
-#define MAXGETHOSTSTRUCT 1024
-#define FD_READ 1
-#define FD_WRITE 2
-#define FD_OOB 4
-#define FD_ACCEPT 8
-#define FD_CONNECT 16
-#define FD_CLOSE 32
-#ifndef WSABASEERR
-#define WSABASEERR 10000
-#define WSAEINTR (WSABASEERR+4)
-#define WSAEBADF (WSABASEERR+9)
-#define WSAEACCES (WSABASEERR+13)
-#define WSAEFAULT (WSABASEERR+14)
-#define WSAEINVAL (WSABASEERR+22)
-#define WSAEMFILE (WSABASEERR+24)
-#define WSAEWOULDBLOCK (WSABASEERR+35)
-#define WSAEINPROGRESS (WSABASEERR+36)
-#define WSAEALREADY (WSABASEERR+37)
-#define WSAENOTSOCK (WSABASEERR+38)
-#define WSAEDESTADDRREQ (WSABASEERR+39)
-#define WSAEMSGSIZE (WSABASEERR+40)
-#define WSAEPROTOTYPE (WSABASEERR+41)
-#define WSAENOPROTOOPT (WSABASEERR+42)
-#define WSAEPROTONOSUPPORT (WSABASEERR+43)
-#define WSAESOCKTNOSUPPORT (WSABASEERR+44)
-#define WSAEOPNOTSUPP (WSABASEERR+45)
-#define WSAEPFNOSUPPORT (WSABASEERR+46)
-#define WSAEAFNOSUPPORT (WSABASEERR+47)
-#define WSAEADDRINUSE (WSABASEERR+48)
-#define WSAEADDRNOTAVAIL (WSABASEERR+49)
-#define WSAENETDOWN (WSABASEERR+50)
-#define WSAENETUNREACH (WSABASEERR+51)
-#define WSAENETRESET (WSABASEERR+52)
-#define WSAECONNABORTED (WSABASEERR+53)
-#define WSAECONNRESET (WSABASEERR+54)
-#define WSAENOBUFS (WSABASEERR+55)
-#define WSAEISCONN (WSABASEERR+56)
-#define WSAENOTCONN (WSABASEERR+57)
-#define WSAESHUTDOWN (WSABASEERR+58)
-#define WSAETOOMANYREFS (WSABASEERR+59)
-#define WSAETIMEDOUT (WSABASEERR+60)
-#define WSAECONNREFUSED (WSABASEERR+61)
-#define WSAELOOP (WSABASEERR+62)
-#define WSAENAMETOOLONG (WSABASEERR+63)
-#define WSAEHOSTDOWN (WSABASEERR+64)
-#define WSAEHOSTUNREACH (WSABASEERR+65)
-#define WSAENOTEMPTY (WSABASEERR+66)
-#define WSAEPROCLIM (WSABASEERR+67)
-#define WSAEUSERS (WSABASEERR+68)
-#define WSAEDQUOT (WSABASEERR+69)
-#define WSAESTALE (WSABASEERR+70)
-#define WSAEREMOTE (WSABASEERR+71)
-#define WSAEDISCON (WSABASEERR+101)
-#define WSASYSNOTREADY (WSABASEERR+91)
-#define WSAVERNOTSUPPORTED (WSABASEERR+92)
-#define WSANOTINITIALISED (WSABASEERR+93)
-#define WSAHOST_NOT_FOUND (WSABASEERR+1001)
-#define WSATRY_AGAIN (WSABASEERR+1002)
-#define WSANO_RECOVERY (WSABASEERR+1003)
-#define WSANO_DATA (WSABASEERR+1004)
-#endif /* !WSABASEERR */
-
-#define WSANO_ADDRESS WSANO_DATA
-#if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
-#define h_errno WSAGetLastError()
-#define HOST_NOT_FOUND WSAHOST_NOT_FOUND
-#define TRY_AGAIN WSATRY_AGAIN
-#define NO_RECOVERY WSANO_RECOVERY
-#define NO_DATA WSANO_DATA
-#define NO_ADDRESS WSANO_ADDRESS
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
-SOCKET PASCAL accept(SOCKET,struct sockaddr*,int*);
-int PASCAL bind(SOCKET,const struct sockaddr*,int);
-int PASCAL closesocket(SOCKET);
-int PASCAL connect(SOCKET,const struct sockaddr*,int);
-int PASCAL ioctlsocket(SOCKET,long,u_long *);
-int PASCAL getpeername(SOCKET,struct sockaddr*,int*);
-int PASCAL getsockname(SOCKET,struct sockaddr*,int*);
-int PASCAL getsockopt(SOCKET,int,int,char*,int*);
-unsigned long PASCAL inet_addr(const char*);
-DECLARE_STDCALL_P(char *) inet_ntoa(struct in_addr);
-int PASCAL listen(SOCKET,int);
-int PASCAL recv(SOCKET,char*,int,int);
-int PASCAL recvfrom(SOCKET,char*,int,int,struct sockaddr*,int*);
-int PASCAL send(SOCKET,const char*,int,int);
-int PASCAL sendto(SOCKET,const char*,int,int,const struct sockaddr*,int);
-int PASCAL setsockopt(SOCKET,int,int,const char*,int);
-int PASCAL shutdown(SOCKET,int);
-SOCKET PASCAL socket(int,int,int);
-DECLARE_STDCALL_P(struct hostent *) gethostbyaddr(const char*,int,int);
-DECLARE_STDCALL_P(struct hostent *) gethostbyname(const char*);
-DECLARE_STDCALL_P(struct servent *) getservbyport(int,const char*);
-DECLARE_STDCALL_P(struct servent *) getservbyname(const char*,const char*);
-DECLARE_STDCALL_P(struct protoent *) getprotobynumber(int);
-DECLARE_STDCALL_P(struct protoent *) getprotobyname(const char*);
-int PASCAL WSAStartup(WORD,LPWSADATA);
-int PASCAL WSACleanup(void);
-void PASCAL WSASetLastError(int);
-int PASCAL WSAGetLastError(void);
-BOOL PASCAL WSAIsBlocking(void);
-int PASCAL WSAUnhookBlockingHook(void);
-FARPROC PASCAL WSASetBlockingHook(FARPROC);
-int PASCAL WSACancelBlockingCall(void);
-HANDLE PASCAL WSAAsyncGetServByName(HWND,u_int,const char*,const char*,char*,int);
-HANDLE PASCAL WSAAsyncGetServByPort(HWND,u_int,int,const char*,char*,int);
-HANDLE PASCAL WSAAsyncGetProtoByName(HWND,u_int,const char*,char*,int);
-HANDLE PASCAL WSAAsyncGetProtoByNumber(HWND,u_int,int,char*,int);
-HANDLE PASCAL WSAAsyncGetHostByName(HWND,u_int,const char*,char*,int);
-HANDLE PASCAL WSAAsyncGetHostByAddr(HWND,u_int,const char*,int,int,char*,int);
-int PASCAL WSACancelAsyncRequest(HANDLE);
-int PASCAL WSAAsyncSelect(SOCKET,HWND,u_int,long);
-#if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
-u_long PASCAL htonl(u_long);
-u_long PASCAL ntohl(u_long);
-u_short PASCAL htons(u_short);
-u_short PASCAL ntohs(u_short);
-int PASCAL select(int nfds,fd_set*,fd_set*,fd_set*,const struct timeval*);
-int PASCAL gethostname(char*,int);
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
-
-#define WSAMAKEASYNCREPLY(b,e) MAKELONG(b,e)
-#define WSAMAKESELECTREPLY(e,error) MAKELONG(e,error)
-#define WSAGETASYNCBUFLEN(l) LOWORD(l)
-#define WSAGETASYNCERROR(l) HIWORD(l)
-#define WSAGETSELECTEVENT(l) LOWORD(l)
-#define WSAGETSELECTERROR(l) HIWORD(l)
-
-typedef struct sockaddr SOCKADDR;
-typedef struct sockaddr *PSOCKADDR;
-typedef struct sockaddr *LPSOCKADDR;
-typedef struct sockaddr_in SOCKADDR_IN;
-typedef struct sockaddr_in *PSOCKADDR_IN;
-typedef struct sockaddr_in *LPSOCKADDR_IN;
-typedef struct linger LINGER;
-typedef struct linger *PLINGER;
-typedef struct linger *LPLINGER;
-typedef struct in_addr IN_ADDR;
-typedef struct in_addr *PIN_ADDR;
-typedef struct in_addr *LPIN_ADDR;
-typedef struct fd_set FD_SET;
-typedef struct fd_set *PFD_SET;
-typedef struct fd_set *LPFD_SET;
-typedef struct hostent HOSTENT;
-typedef struct hostent *PHOSTENT;
-typedef struct hostent *LPHOSTENT;
-typedef struct servent SERVENT;
-typedef struct servent *PSERVENT;
-typedef struct servent *LPSERVENT;
-typedef struct protoent PROTOENT;
-typedef struct protoent *PPROTOENT;
-typedef struct protoent *LPPROTOENT;
-typedef struct timeval TIMEVAL;
-typedef struct timeval *PTIMEVAL;
-typedef struct timeval *LPTIMEVAL;
-
-#ifdef __cplusplus
-}
-#endif
-/*
- * Recent MSDN docs indicate that the MS-specific extensions exported from
- * mswsock.dll (AcceptEx, TransmitFile. WSARecEx and GetAcceptExSockaddrs) are
- * declared in mswsock.h. These extensions are not supported on W9x or WinCE.
- * However, code using WinSock 1.1 API may expect the declarations and
- * associated defines to be in this header. Thus we include mswsock.h here.
- *
- * When linking against the WinSock 1.1 lib, wsock32.dll, the mswsock functions
- * are automatically routed to mswsock.dll (on platforms with support).
- * The WinSock 2 lib, ws2_32.dll, does not contain any references to
- * the mswsock extensions.
- */
-
-#include <mswsock.h>
-
-#endif
diff --git a/winsup/w32api/include/winsock2.h b/winsup/w32api/include/winsock2.h
deleted file mode 100644
index d318eb6..0000000
--- a/winsup/w32api/include/winsock2.h
+++ /dev/null
@@ -1,1303 +0,0 @@
-/*
-
- Definitions for winsock 2
-
- Contributed by the WINE project.
-
- Portions Copyright (c) 1980, 1983, 1988, 1993
- The Regents of the University of California. All rights reserved.
-
- Portions Copyright (c) 1993 by Digital Equipment Corporation.
- */
-
-#if !(defined _WINSOCK2_H || defined _WINSOCK_H)
-#define _WINSOCK2_H
-#define _WINSOCK_H /* to prevent later inclusion of winsock.h */
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#define _GNU_H_WINDOWS32_SOCKETS
-
-#include <windows.h>
-
-#ifndef WINSOCK_API_LINKAGE
-#ifdef __W32API_USE_DLLIMPORT__
-#define WINSOCK_API_LINKAGE DECLSPEC_IMPORT
-#else
-#define WINSOCK_API_LINKAGE
-#endif
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-/* Names common to Winsock1.1 and Winsock2 */
-#if !defined ( _BSDTYPES_DEFINED )
-/* also defined in gmon.h and in cygwin's sys/types */
-typedef unsigned char u_char;
-typedef unsigned short u_short;
-typedef unsigned int u_int;
-typedef unsigned long u_long;
-#define _BSDTYPES_DEFINED
-#endif /* ! def _BSDTYPES_DEFINED */
-typedef u_int SOCKET;
-#ifndef FD_SETSIZE
-#define FD_SETSIZE 64
-#endif
-
-/* shutdown() how types */
-#define SD_RECEIVE 0x00
-#define SD_SEND 0x01
-#define SD_BOTH 0x02
-
-#ifndef _SYS_TYPES_FD_SET
-/* fd_set may be defined by the newlib <sys/types.h>
- * if __USE_W32_SOCKETS not defined.
- */
-#ifdef fd_set
-#undef fd_set
-#endif
-typedef struct fd_set {
- u_int fd_count;
- SOCKET fd_array[FD_SETSIZE];
-} fd_set;
-int PASCAL __WSAFDIsSet(SOCKET,fd_set*);
-#ifndef FD_CLR
-#define FD_CLR(fd,set) do { u_int __i;\
-for (__i = 0; __i < ((fd_set *)(set))->fd_count ; __i++) {\
- if (((fd_set *)(set))->fd_array[__i] == (fd)) {\
- while (__i < ((fd_set *)(set))->fd_count-1) {\
- ((fd_set*)(set))->fd_array[__i] = ((fd_set*)(set))->fd_array[__i+1];\
- __i++;\
- }\
- ((fd_set*)(set))->fd_count--;\
- break;\
- }\
-}\
-} while (0)
-#endif
-#ifndef FD_SET
-/* this differs from the define in winsock.h and in cygwin sys/types.h */
-#define FD_SET(fd, set) do { u_int __i;\
-for (__i = 0; __i < ((fd_set *)(set))->fd_count ; __i++) {\
- if (((fd_set *)(set))->fd_array[__i] == (fd)) {\
- break;\
- }\
-}\
-if (__i == ((fd_set *)(set))->fd_count) {\
- if (((fd_set *)(set))->fd_count < FD_SETSIZE) {\
- ((fd_set *)(set))->fd_array[__i] = (fd);\
- ((fd_set *)(set))->fd_count++;\
- }\
-}\
-} while(0)
-#endif
-#ifndef FD_ZERO
-#define FD_ZERO(set) (((fd_set *)(set))->fd_count=0)
-#endif
-#ifndef FD_ISSET
-#define FD_ISSET(fd, set) __WSAFDIsSet((SOCKET)(fd), (fd_set *)(set))
-#endif
-#elif !defined (USE_SYS_TYPES_FD_SET)
-#warning "fd_set and associated macros have been defined in sys/types. \
- This may cause runtime problems with W32 sockets"
-#endif /* ndef _SYS_TYPES_FD_SET */
-#if !(defined (__INSIDE_CYGWIN__) || (__INSIDE_MSYS__))
-#ifndef _TIMEVAL_DEFINED /* also in sys/time.h */
-#define _TIMEVAL_DEFINED
-struct timeval {
- long tv_sec;
- long tv_usec;
-};
-#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
-#define timercmp(tvp, uvp, cmp) \
- (((tvp)->tv_sec != (uvp)->tv_sec) ? \
- ((tvp)->tv_sec cmp (uvp)->tv_sec) : \
- ((tvp)->tv_usec cmp (uvp)->tv_usec))
-#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
-#endif /* _TIMEVAL_DEFINED */
-struct hostent {
- char *h_name;
- char **h_aliases;
- short h_addrtype;
- short h_length;
- char **h_addr_list;
-#define h_addr h_addr_list[0]
-};
-struct linger {
- u_short l_onoff;
- u_short l_linger;
-};
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
-#define IOCPARM_MASK 0x7f
-#define IOC_VOID 0x20000000
-#define IOC_OUT 0x40000000
-#define IOC_IN 0x80000000
-#define IOC_INOUT (IOC_IN|IOC_OUT)
-
-#if ! (defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
-#define _IO(x,y) (IOC_VOID|((x)<<8)|(y))
-#define _IOR(x,y,t) (IOC_OUT|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
-#define _IOW(x,y,t) (IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
-#define FIONBIO _IOW('f', 126, u_long)
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
-
-#define FIONREAD _IOR('f', 127, u_long)
-#define FIOASYNC _IOW('f', 125, u_long)
-#define SIOCSHIWAT _IOW('s', 0, u_long)
-#define SIOCGHIWAT _IOR('s', 1, u_long)
-#define SIOCSLOWAT _IOW('s', 2, u_long)
-#define SIOCGLOWAT _IOR('s', 3, u_long)
-#define SIOCATMARK _IOR('s', 7, u_long)
-
-#if ! (defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
-struct netent {
- char * n_name;
- char **n_aliases;
- short n_addrtype;
- u_long n_net;
-};
-struct servent {
- char *s_name;
- char **s_aliases;
- short s_port;
- char *s_proto;
-};
-struct protoent {
- char *p_name;
- char **p_aliases;
- short p_proto;
-};
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
-
-#define IPPROTO_IP 0
-#define IPPROTO_ICMP 1
-#define IPPROTO_IGMP 2
-#define IPPROTO_GGP 3
-#define IPPROTO_TCP 6
-#define IPPROTO_PUP 12
-#define IPPROTO_UDP 17
-#define IPPROTO_IDP 22
-#define IPPROTO_ND 77
-#define IPPROTO_RAW 255
-#define IPPROTO_MAX 256
-/* IPv6 options */
-#define IPPROTO_HOPOPTS 0 /* IPv6 Hop-by-Hop options */
-#define IPPROTO_IPV6 41 /* IPv6 header */
-#define IPPROTO_ROUTING 43 /* IPv6 Routing header */
-#define IPPROTO_FRAGMENT 44 /* IPv6 fragmentation header */
-#define IPPROTO_ESP 50 /* encapsulating security payload */
-#define IPPROTO_AH 51 /* authentication header */
-#define IPPROTO_ICMPV6 58 /* ICMPv6 */
-#define IPPROTO_NONE 59 /* IPv6 no next header */
-#define IPPROTO_DSTOPTS 60 /* IPv6 Destination options */
-#define IPPORT_ECHO 7
-#define IPPORT_DISCARD 9
-#define IPPORT_SYSTAT 11
-#define IPPORT_DAYTIME 13
-#define IPPORT_NETSTAT 15
-#define IPPORT_FTP 21
-#define IPPORT_TELNET 23
-#define IPPORT_SMTP 25
-#define IPPORT_TIMESERVER 37
-#define IPPORT_NAMESERVER 42
-#define IPPORT_WHOIS 43
-#define IPPORT_MTP 57
-#define IPPORT_TFTP 69
-#define IPPORT_RJE 77
-#define IPPORT_FINGER 79
-#define IPPORT_TTYLINK 87
-#define IPPORT_SUPDUP 95
-#define IPPORT_EXECSERVER 512
-#define IPPORT_LOGINSERVER 513
-#define IPPORT_CMDSERVER 514
-#define IPPORT_EFSSERVER 520
-#define IPPORT_BIFFUDP 512
-#define IPPORT_WHOSERVER 513
-#define IPPORT_ROUTESERVER 520
-#define IPPORT_RESERVED 1024
-#define IMPLINK_IP 155
-#define IMPLINK_LOWEXPER 156
-#define IMPLINK_HIGHEXPER 158
-struct in_addr {
- union {
- struct { u_char s_b1,s_b2,s_b3,s_b4; } S_un_b;
- struct { u_short s_w1,s_w2; } S_un_w;
- u_long S_addr;
- } S_un;
-#define s_addr S_un.S_addr
-#define s_host S_un.S_un_b.s_b2
-#define s_net S_un.S_un_b.s_b1
-#define s_imp S_un.S_un_w.s_w2
-#define s_impno S_un.S_un_b.s_b4
-#define s_lh S_un.S_un_b.s_b3
-};
-#define IN_CLASSA(i) (((long)(i)&0x80000000) == 0)
-#define IN_CLASSA_NET 0xff000000
-#define IN_CLASSA_NSHIFT 24
-#define IN_CLASSA_HOST 0x00ffffff
-#define IN_CLASSA_MAX 128
-#define IN_CLASSB(i) (((long)(i)&0xc0000000)==0x80000000)
-#define IN_CLASSB_NET 0xffff0000
-#define IN_CLASSB_NSHIFT 16
-#define IN_CLASSB_HOST 0x0000ffff
-#define IN_CLASSB_MAX 65536
-#define IN_CLASSC(i) (((long)(i)&0xe0000000)==0xc0000000)
-#define IN_CLASSC_NET 0xffffff00
-#define IN_CLASSC_NSHIFT 8
-#define IN_CLASSC_HOST 0xff
-#define INADDR_ANY (u_long)0
-#define INADDR_LOOPBACK 0x7f000001
-#define INADDR_BROADCAST (u_long)0xffffffff
-#define INADDR_NONE 0xffffffff
-struct sockaddr_in {
- short sin_family;
- u_short sin_port;
- struct in_addr sin_addr;
- char sin_zero[8];
-};
-#define WSADESCRIPTION_LEN 256
-#define WSASYS_STATUS_LEN 128
-typedef struct WSAData {
- WORD wVersion;
- WORD wHighVersion;
- char szDescription[WSADESCRIPTION_LEN+1];
- char szSystemStatus[WSASYS_STATUS_LEN+1];
- unsigned short iMaxSockets;
- unsigned short iMaxUdpDg;
- char * lpVendorInfo;
-} WSADATA;
-typedef WSADATA *LPWSADATA;
-
-#if ! (defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
-#define IP_OPTIONS 1
-#define SO_DEBUG 1
-#define SO_ACCEPTCONN 2
-#define SO_REUSEADDR 4
-#define SO_KEEPALIVE 8
-#define SO_DONTROUTE 16
-#define SO_BROADCAST 32
-#define SO_USELOOPBACK 64
-#define SO_LINGER 128
-#define SO_OOBINLINE 256
-#define SO_DONTLINGER (u_int)(~SO_LINGER)
-#define SO_EXCLUSIVEADDRUSE ((u_int)(~SO_REUSEADDR))
-#define SO_SNDBUF 0x1001
-#define SO_RCVBUF 0x1002
-#define SO_SNDLOWAT 0x1003
-#define SO_RCVLOWAT 0x1004
-#define SO_SNDTIMEO 0x1005
-#define SO_RCVTIMEO 0x1006
-#define SO_ERROR 0x1007
-#define SO_TYPE 0x1008
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
-
-#define INVALID_SOCKET (SOCKET)(~0)
-#define SOCKET_ERROR (-1)
-#define SOCK_STREAM 1
-#define SOCK_DGRAM 2
-#define SOCK_RAW 3
-#define SOCK_RDM 4
-#define SOCK_SEQPACKET 5
-#define TCP_NODELAY 0x0001
-#define AF_UNSPEC 0
-#define AF_UNIX 1
-#define AF_INET 2
-#define AF_IMPLINK 3
-#define AF_PUP 4
-#define AF_CHAOS 5
-#define AF_IPX 6
-#define AF_NS 6
-#define AF_ISO 7
-#define AF_OSI AF_ISO
-#define AF_ECMA 8
-#define AF_DATAKIT 9
-#define AF_CCITT 10
-#define AF_SNA 11
-#define AF_DECnet 12
-#define AF_DLI 13
-#define AF_LAT 14
-#define AF_HYLINK 15
-#define AF_APPLETALK 16
-#define AF_NETBIOS 17
-#define AF_VOICEVIEW 18
-#define AF_FIREFOX 19
-#define AF_UNKNOWN1 20
-#define AF_BAN 21
-#define AF_ATM 22
-#define AF_INET6 23
-#define AF_CLUSTER 24
-#define AF_12844 25
-#define AF_IRDA 26
-#define AF_NETDES 28
-#if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
-#define AF_MAX 29
-struct sockaddr {
- u_short sa_family;
- char sa_data[14];
-};
-
-/* Portable IPv6/IPv4 version of sockaddr. Based on RFC 2553.
- Pad to force 8 byte alignment and maximum size of 128 bytes. */
-
-/*
- * Desired design of maximum size and alignment
- */
-#define _SS_MAXSIZE 128
-#define _SS_ALIGNSIZE (sizeof (__int64))
-/*
- * Definitions used for sockaddr_storage structure paddings design.
- */
-#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof (short))
-#define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof (short) \
- + _SS_PAD1SIZE \
- + _SS_ALIGNSIZE))
-struct sockaddr_storage {
- short ss_family;
- char __ss_pad1[_SS_PAD1SIZE]; /* pad to 8 */
- __int64 __ss_align; /* force alignment */
- char __ss_pad2[_SS_PAD2SIZE]; /* pad to 128 */
-};
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
-
-struct sockproto {
- u_short sp_family;
- u_short sp_protocol;
-};
-#define PF_UNSPEC AF_UNSPEC
-#define PF_UNIX AF_UNIX
-#define PF_INET AF_INET
-#define PF_IMPLINK AF_IMPLINK
-#define PF_PUP AF_PUP
-#define PF_CHAOS AF_CHAOS
-#define PF_NS AF_NS
-#define PF_IPX AF_IPX
-#define PF_ISO AF_ISO
-#define PF_OSI AF_OSI
-#define PF_ECMA AF_ECMA
-#define PF_DATAKIT AF_DATAKIT
-#define PF_CCITT AF_CCITT
-#define PF_SNA AF_SNA
-#define PF_DECnet AF_DECnet
-#define PF_DLI AF_DLI
-#define PF_LAT AF_LAT
-#define PF_HYLINK AF_HYLINK
-#define PF_APPLETALK AF_APPLETALK
-#define PF_VOICEVIEW AF_VOICEVIEW
-#define PF_FIREFOX AF_FIREFOX
-#define PF_UNKNOWN1 AF_UNKNOWN1
-#define PF_BAN AF_BAN
-#define PF_ATM AF_ATM
-#define PF_INET6 AF_INET6
-#define PF_MAX AF_MAX
-#define SOL_SOCKET 0xffff
-#if ! (defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
-#define SOMAXCONN 0x7fffffff /* (5) in WinSock1.1 */
-#define MSG_OOB 1
-#define MSG_PEEK 2
-#define MSG_DONTROUTE 4
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
-#define MSG_MAXIOVLEN 16
-#define MSG_PARTIAL 0x8000
-#define MAXGETHOSTSTRUCT 1024
-
-#define FD_READ_BIT 0
-#define FD_READ (1 << FD_READ_BIT)
-#define FD_WRITE_BIT 1
-#define FD_WRITE (1 << FD_WRITE_BIT)
-#define FD_OOB_BIT 2
-#define FD_OOB (1 << FD_OOB_BIT)
-#define FD_ACCEPT_BIT 3
-#define FD_ACCEPT (1 << FD_ACCEPT_BIT)
-#define FD_CONNECT_BIT 4
-#define FD_CONNECT (1 << FD_CONNECT_BIT)
-#define FD_CLOSE_BIT 5
-#define FD_CLOSE (1 << FD_CLOSE_BIT)
-/* winsock1.1 defines stop at FD_CLOSE (32) */
-#define FD_QOS_BIT 6
-#define FD_QOS (1 << FD_QOS_BIT)
-#define FD_GROUP_QOS_BIT 7
-#define FD_GROUP_QOS (1 << FD_GROUP_QOS_BIT)
-#define FD_ROUTING_INTERFACE_CHANGE_BIT 8
-#define FD_ROUTING_INTERFACE_CHANGE (1 << FD_ROUTING_INTERFACE_CHANGE_BIT)
-#define FD_ADDRESS_LIST_CHANGE_BIT 9
-#define FD_ADDRESS_LIST_CHANGE (1 << FD_ADDRESS_LIST_CHANGE_BIT)
-#define FD_MAX_EVENTS 10
-#define FD_ALL_EVENTS ((1 << FD_MAX_EVENTS) - 1)
-
-#ifndef WSABASEERR
-#define WSABASEERR 10000
-#define WSAEINTR (WSABASEERR+4)
-#define WSAEBADF (WSABASEERR+9)
-#define WSAEACCES (WSABASEERR+13)
-#define WSAEFAULT (WSABASEERR+14)
-#define WSAEINVAL (WSABASEERR+22)
-#define WSAEMFILE (WSABASEERR+24)
-#define WSAEWOULDBLOCK (WSABASEERR+35)
-#define WSAEINPROGRESS (WSABASEERR+36) /* deprecated on WinSock2 */
-#define WSAEALREADY (WSABASEERR+37)
-#define WSAENOTSOCK (WSABASEERR+38)
-#define WSAEDESTADDRREQ (WSABASEERR+39)
-#define WSAEMSGSIZE (WSABASEERR+40)
-#define WSAEPROTOTYPE (WSABASEERR+41)
-#define WSAENOPROTOOPT (WSABASEERR+42)
-#define WSAEPROTONOSUPPORT (WSABASEERR+43)
-#define WSAESOCKTNOSUPPORT (WSABASEERR+44)
-#define WSAEOPNOTSUPP (WSABASEERR+45)
-#define WSAEPFNOSUPPORT (WSABASEERR+46)
-#define WSAEAFNOSUPPORT (WSABASEERR+47)
-#define WSAEADDRINUSE (WSABASEERR+48)
-#define WSAEADDRNOTAVAIL (WSABASEERR+49)
-#define WSAENETDOWN (WSABASEERR+50)
-#define WSAENETUNREACH (WSABASEERR+51)
-#define WSAENETRESET (WSABASEERR+52)
-#define WSAECONNABORTED (WSABASEERR+53)
-#define WSAECONNRESET (WSABASEERR+54)
-#define WSAENOBUFS (WSABASEERR+55)
-#define WSAEISCONN (WSABASEERR+56)
-#define WSAENOTCONN (WSABASEERR+57)
-#define WSAESHUTDOWN (WSABASEERR+58)
-#define WSAETOOMANYREFS (WSABASEERR+59)
-#define WSAETIMEDOUT (WSABASEERR+60)
-#define WSAECONNREFUSED (WSABASEERR+61)
-#define WSAELOOP (WSABASEERR+62)
-#define WSAENAMETOOLONG (WSABASEERR+63)
-#define WSAEHOSTDOWN (WSABASEERR+64)
-#define WSAEHOSTUNREACH (WSABASEERR+65)
-#define WSAENOTEMPTY (WSABASEERR+66)
-#define WSAEPROCLIM (WSABASEERR+67)
-#define WSAEUSERS (WSABASEERR+68)
-#define WSAEDQUOT (WSABASEERR+69)
-#define WSAESTALE (WSABASEERR+70)
-#define WSAEREMOTE (WSABASEERR+71)
-#define WSAEDISCON (WSABASEERR+101)
-#define WSASYSNOTREADY (WSABASEERR+91)
-#define WSAVERNOTSUPPORTED (WSABASEERR+92)
-#define WSANOTINITIALISED (WSABASEERR+93)
-#define WSAHOST_NOT_FOUND (WSABASEERR+1001)
-#define WSATRY_AGAIN (WSABASEERR+1002)
-#define WSANO_RECOVERY (WSABASEERR+1003)
-#define WSANO_DATA (WSABASEERR+1004)
-
-/* WinSock2 specific error codes */
-#define WSAENOMORE (WSABASEERR+102)
-#define WSAECANCELLED (WSABASEERR+103)
-#define WSAEINVALIDPROCTABLE (WSABASEERR+104)
-#define WSAEINVALIDPROVIDER (WSABASEERR+105)
-#define WSAEPROVIDERFAILEDINIT (WSABASEERR+106)
-#define WSASYSCALLFAILURE (WSABASEERR+107)
-#define WSASERVICE_NOT_FOUND (WSABASEERR+108)
-#define WSATYPE_NOT_FOUND (WSABASEERR+109)
-#define WSA_E_NO_MORE (WSABASEERR+110)
-#define WSA_E_CANCELLED (WSABASEERR+111)
-#define WSAEREFUSED (WSABASEERR+112)
-
-/* WS QualityofService errors */
-#define WSA_QOS_RECEIVERS (WSABASEERR + 1005)
-#define WSA_QOS_SENDERS (WSABASEERR + 1006)
-#define WSA_QOS_NO_SENDERS (WSABASEERR + 1007)
-#define WSA_QOS_NO_RECEIVERS (WSABASEERR + 1008)
-#define WSA_QOS_REQUEST_CONFIRMED (WSABASEERR + 1009)
-#define WSA_QOS_ADMISSION_FAILURE (WSABASEERR + 1010)
-#define WSA_QOS_POLICY_FAILURE (WSABASEERR + 1011)
-#define WSA_QOS_BAD_STYLE (WSABASEERR + 1012)
-#define WSA_QOS_BAD_OBJECT (WSABASEERR + 1013)
-#define WSA_QOS_TRAFFIC_CTRL_ERROR (WSABASEERR + 1014)
-#define WSA_QOS_GENERIC_ERROR (WSABASEERR + 1015)
-#define WSA_QOS_ESERVICETYPE (WSABASEERR + 1016)
-#define WSA_QOS_EFLOWSPEC (WSABASEERR + 1017)
-#define WSA_QOS_EPROVSPECBUF (WSABASEERR + 1018)
-#define WSA_QOS_EFILTERSTYLE (WSABASEERR + 1019)
-#define WSA_QOS_EFILTERTYPE (WSABASEERR + 1020)
-#define WSA_QOS_EFILTERCOUNT (WSABASEERR + 1021)
-#define WSA_QOS_EOBJLENGTH (WSABASEERR + 1022)
-#define WSA_QOS_EFLOWCOUNT (WSABASEERR + 1023)
-#define WSA_QOS_EUNKOWNPSOBJ (WSABASEERR + 1024)
-#define WSA_QOS_EPOLICYOBJ (WSABASEERR + 1025)
-#define WSA_QOS_EFLOWDESC (WSABASEERR + 1026)
-#define WSA_QOS_EPSFLOWSPEC (WSABASEERR + 1027)
-#define WSA_QOS_EPSFILTERSPEC (WSABASEERR + 1028)
-#define WSA_QOS_ESDMODEOBJ (WSABASEERR + 1029)
-#define WSA_QOS_ESHAPERATEOBJ (WSABASEERR + 1030)
-#define WSA_QOS_RESERVED_PETYPE (WSABASEERR + 1031)
-
-#endif /* !WSABASEERR */
-
-#define WSANO_ADDRESS WSANO_DATA
-#if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
-#define h_errno WSAGetLastError()
-#define HOST_NOT_FOUND WSAHOST_NOT_FOUND
-#define TRY_AGAIN WSATRY_AGAIN
-#define NO_RECOVERY WSANO_RECOVERY
-#define NO_DATA WSANO_DATA
-#define NO_ADDRESS WSANO_ADDRESS
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
-WINSOCK_API_LINKAGE SOCKET PASCAL accept(SOCKET,struct sockaddr*,int*);
-WINSOCK_API_LINKAGE int PASCAL bind(SOCKET,const struct sockaddr*,int);
-WINSOCK_API_LINKAGE int PASCAL closesocket(SOCKET);
-WINSOCK_API_LINKAGE int PASCAL connect(SOCKET,const struct sockaddr*,int);
-WINSOCK_API_LINKAGE int PASCAL ioctlsocket(SOCKET,long,u_long *);
-WINSOCK_API_LINKAGE int PASCAL getpeername(SOCKET,struct sockaddr*,int*);
-WINSOCK_API_LINKAGE int PASCAL getsockname(SOCKET,struct sockaddr*,int*);
-WINSOCK_API_LINKAGE int PASCAL getsockopt(SOCKET,int,int,char*,int*);
-WINSOCK_API_LINKAGE unsigned long PASCAL inet_addr(const char*);
-WINSOCK_API_LINKAGE DECLARE_STDCALL_P(char *) inet_ntoa(struct in_addr);
-WINSOCK_API_LINKAGE int PASCAL listen(SOCKET,int);
-WINSOCK_API_LINKAGE int PASCAL recv(SOCKET,char*,int,int);
-WINSOCK_API_LINKAGE int PASCAL recvfrom(SOCKET,char*,int,int,struct sockaddr*,int*);
-WINSOCK_API_LINKAGE int PASCAL send(SOCKET,const char*,int,int);
-WINSOCK_API_LINKAGE int PASCAL sendto(SOCKET,const char*,int,int,const struct sockaddr*,int);
-WINSOCK_API_LINKAGE int PASCAL setsockopt(SOCKET,int,int,const char*,int);
-WINSOCK_API_LINKAGE int PASCAL shutdown(SOCKET,int);
-WINSOCK_API_LINKAGE SOCKET PASCAL socket(int,int,int);
-WINSOCK_API_LINKAGE DECLARE_STDCALL_P(struct hostent *) gethostbyaddr(const char*,int,int);
-WINSOCK_API_LINKAGE DECLARE_STDCALL_P(struct hostent *) gethostbyname(const char*);
-WINSOCK_API_LINKAGE DECLARE_STDCALL_P(struct servent *) getservbyport(int,const char*);
-WINSOCK_API_LINKAGE DECLARE_STDCALL_P(struct servent *) getservbyname(const char*,const char*);
-WINSOCK_API_LINKAGE DECLARE_STDCALL_P(struct protoent *) getprotobynumber(int);
-WINSOCK_API_LINKAGE DECLARE_STDCALL_P(struct protoent *) getprotobyname(const char*);
-typedef SOCKET (PASCAL * LPFN_ACCEPT)(SOCKET, struct sockaddr*,int *);
-typedef int (PASCAL * LPFN_BIND)(SOCKET, const struct sockaddr*,int);
-typedef int (PASCAL * LPFN_CLOSESOCKET)(SOCKET);
-typedef int (PASCAL * LPFN_CONNECT)(SOCKET, const struct sockaddr*,int);
-typedef int (PASCAL * LPFN_IOCTLSOCKET)(SOCKET, long, u_long*);
-typedef int (PASCAL * LPFN_GETPEERNAME)(SOCKET, struct sockaddr*, int*);
-typedef int(PASCAL * LPFN_GETSOCKNAME)(SOCKET, struct sockaddr*, int*);
-typedef int(PASCAL * LPFN_GETSOCKOPT)(SOCKET, int, int, char*, int*);
-typedef u_long(PASCAL * LPFN_HTONL)(u_long);
-typedef u_short(PASCAL * LPFN_HTONS)(u_short);
-typedef unsigned long(PASCAL * LPFN_INET_ADDR)(const char*);
-typedef char*(PASCAL * LPFN_INET_NTOA)(struct in_addr);
-typedef int(PASCAL * LPFN_LISTEN)(SOCKET, int);
-typedef u_long(PASCAL * LPFN_NTOHL)(u_long);
-typedef u_short(PASCAL * LPFN_NTOHS)(u_short);
-typedef int(PASCAL * LPFN_RECV)(SOCKET, char*, int, int);
-typedef int(PASCAL * LPFN_RECVFROM)(SOCKET, char*, int, int, struct sockaddr*, int*);
-typedef int(PASCAL * LPFN_SELECT)(int, fd_set*, fd_set*, fd_set*, const struct timeval*);
-typedef int(PASCAL * LPFN_SEND)(SOCKET, const char*, int, int);
-typedef int(PASCAL * LPFN_SENDTO)(SOCKET, const char*, int, int, const struct sockaddr*, int);
-typedef int(PASCAL * LPFN_SETSOCKOPT)(SOCKET, int, int, const char*, int);
-typedef int(PASCAL * LPFN_SHUTDOWN)(SOCKET, int);
-typedef SOCKET(PASCAL * LPFN_SOCKET)(int, int, int);
-typedef struct hostent*(PASCAL * LPFN_GETHOSTBYADDR)( const char*, int, int);
-typedef struct hostent*(PASCAL * LPFN_GETHOSTBYNAME)( const char*);
-typedef int(PASCAL * LPFN_GETHOSTNAME)(char*, int);
-typedef struct servent*(PASCAL * LPFN_GETSERVBYPORT)(int, const char*);
-typedef struct servent*(PASCAL * LPFN_GETSERVBYNAME)(const char*, const char*);
-typedef struct protoent*(PASCAL * LPFN_GETPROTOBYNUMBER)(int);
-typedef struct protoent*(PASCAL * LPFN_GETPROTOBYNAME)(const char*);
-
-WINSOCK_API_LINKAGE int PASCAL WSAStartup(WORD,LPWSADATA);
-WINSOCK_API_LINKAGE int PASCAL WSACleanup(void);
-WINSOCK_API_LINKAGE void PASCAL WSASetLastError(int);
-WINSOCK_API_LINKAGE int PASCAL WSAGetLastError(void);
-WINSOCK_API_LINKAGE typedef int(PASCAL * LPFN_WSASTARTUP)(WORD, LPWSADATA);
-typedef int(PASCAL * LPFN_WSACLEANUP)(void);
-typedef void(PASCAL * LPFN_WSASETLASTERROR)(int);
-typedef int(PASCAL * LPFN_WSAGETLASTERROR)(void);
-/*
- * Pseudo-blocking functions are deprecated in WinSock2
- * spec. Use threads instead.
- */
-WINSOCK_API_LINKAGE BOOL PASCAL WSAIsBlocking(void);
-WINSOCK_API_LINKAGE int PASCAL WSAUnhookBlockingHook(void);
-WINSOCK_API_LINKAGE FARPROC PASCAL WSASetBlockingHook(FARPROC);
-WINSOCK_API_LINKAGE int PASCAL WSACancelBlockingCall(void);
-typedef BOOL(PASCAL * LPFN_WSAISBLOCKING)(void);
-typedef int(PASCAL * LPFN_WSAUNHOOKBLOCKINGHOOK)(void);
-typedef FARPROC (PASCAL * LPFN_WSASETBLOCKINGHOOK)(FARPROC);
-typedef int(PASCAL * LPFN_WSACANCELBLOCKINGCALL)(void);
-
-WINSOCK_API_LINKAGE HANDLE PASCAL WSAAsyncGetServByName(HWND,u_int,const char*,const char*,char*,int);
-WINSOCK_API_LINKAGE HANDLE PASCAL WSAAsyncGetServByPort(HWND,u_int,int,const char*,char*,int);
-WINSOCK_API_LINKAGE HANDLE PASCAL WSAAsyncGetProtoByName(HWND,u_int,const char*,char*,int);
-WINSOCK_API_LINKAGE HANDLE PASCAL WSAAsyncGetProtoByNumber(HWND,u_int,int,char*,int);
-WINSOCK_API_LINKAGE HANDLE PASCAL WSAAsyncGetHostByName(HWND,u_int,const char*,char*,int);
-WINSOCK_API_LINKAGE HANDLE PASCAL WSAAsyncGetHostByAddr(HWND,u_int,const char*,int,int,char*,int);
-WINSOCK_API_LINKAGE int PASCAL WSACancelAsyncRequest(HANDLE);
-WINSOCK_API_LINKAGE int PASCAL WSAAsyncSelect(SOCKET,HWND,u_int,long);
-typedef HANDLE(PASCAL * LPFN_WSAASYNCGETSERVBYNAME)(HWND, u_int, const char *, const char *, char *, int);
-typedef HANDLE(PASCAL * LPFN_WSAASYNCGETSERVBYPORT)(HWND, u_int, int, const char *, char *, int);
-typedef HANDLE(PASCAL * LPFN_WSAASYNCGETPROTOBYNAME)(HWND, u_int, const char*, char*, int);
-typedef HANDLE(PASCAL * LPFN_WSAASYNCGETPROTOBYNUMBER)(HWND, u_int, int, char*, int);
-typedef HANDLE(PASCAL * LPFN_WSAASYNCGETHOSTBYADDR)(HWND, u_int, const char*, int, int, char*, int);
-typedef int(PASCAL * LPFN_WSACANCELASYNCREQUEST)(HANDLE);
-typedef int(PASCAL * LPFN_WSAASYNCSELECT)(SOCKET, HWND, u_int, long);
-#if ! (defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
-WINSOCK_API_LINKAGE u_long PASCAL htonl(u_long);
-WINSOCK_API_LINKAGE u_long PASCAL ntohl(u_long);
-WINSOCK_API_LINKAGE u_short PASCAL htons(u_short);
-WINSOCK_API_LINKAGE u_short PASCAL ntohs(u_short);
-WINSOCK_API_LINKAGE int PASCAL select(int nfds,fd_set*,fd_set*,fd_set*,const struct timeval*);
-#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */
-
-int PASCAL gethostname(char*,int);
-
-#define WSAMAKEASYNCREPLY(b,e) MAKELONG(b,e)
-#define WSAMAKESELECTREPLY(e,error) MAKELONG(e,error)
-#define WSAGETASYNCBUFLEN(l) LOWORD(l)
-#define WSAGETASYNCERROR(l) HIWORD(l)
-#define WSAGETSELECTEVENT(l) LOWORD(l)
-#define WSAGETSELECTERROR(l) HIWORD(l)
-
-typedef struct sockaddr SOCKADDR;
-typedef struct sockaddr *PSOCKADDR;
-typedef struct sockaddr *LPSOCKADDR;
-typedef struct sockaddr_storage SOCKADDR_STORAGE, *PSOCKADDR_STORAGE;
-typedef struct sockaddr_in SOCKADDR_IN;
-typedef struct sockaddr_in *PSOCKADDR_IN;
-typedef struct sockaddr_in *LPSOCKADDR_IN;
-typedef struct linger LINGER;
-typedef struct linger *PLINGER;
-typedef struct linger *LPLINGER;
-typedef struct in_addr IN_ADDR;
-typedef struct in_addr *PIN_ADDR;
-typedef struct in_addr *LPIN_ADDR;
-typedef struct fd_set FD_SET;
-typedef struct fd_set *PFD_SET;
-typedef struct fd_set *LPFD_SET;
-typedef struct hostent HOSTENT;
-typedef struct hostent *PHOSTENT;
-typedef struct hostent *LPHOSTENT;
-typedef struct servent SERVENT;
-typedef struct servent *PSERVENT;
-typedef struct servent *LPSERVENT;
-typedef struct protoent PROTOENT;
-typedef struct protoent *PPROTOENT;
-typedef struct protoent *LPPROTOENT;
-typedef struct timeval TIMEVAL;
-typedef struct timeval *PTIMEVAL;
-typedef struct timeval *LPTIMEVAL;
-
-/* winsock2 additions */
-#define ADDR_ANY INADDR_ANY
-
-#define IN_CLASSD(i) (((long)(i) & 0xf0000000) == 0xe0000000)
-#define IN_CLASSD_NET 0xf0000000
-#define IN_CLASSD_NSHIFT 28
-#define IN_CLASSD_HOST 0x0fffffff
-#define IN_MULTICAST(i) IN_CLASSD(i)
-
-#define FROM_PROTOCOL_INFO (-1)
-
-#define SO_DONTLINGER (u_int)(~SO_LINGER)
-#define SO_GROUP_ID 0x2001
-#define SO_GROUP_PRIORITY 0x2002
-#define SO_MAX_MSG_SIZE 0x2003
-#define SO_PROTOCOL_INFOA 0x2004
-#define SO_PROTOCOL_INFOW 0x2005
-#ifdef UNICODE
-#define SO_PROTOCOL_INFO SO_PROTOCOL_INFOW
-#else
-#define SO_PROTOCOL_INFO SO_PROTOCOL_INFOA
-#endif
-#define PVD_CONFIG 0x3001
-
-#define MSG_INTERRUPT 0x10
-#define MSG_MAXIOVLEN 16
-
-#define WSAAPI WINAPI
-#define WSAEVENT HANDLE
-#define LPWSAEVENT LPHANDLE
-#define WSAOVERLAPPED OVERLAPPED
-typedef struct _OVERLAPPED *LPWSAOVERLAPPED;
-
-#define WSA_IO_PENDING (ERROR_IO_PENDING)
-#define WSA_IO_INCOMPLETE (ERROR_IO_INCOMPLETE)
-#define WSA_INVALID_HANDLE (ERROR_INVALID_HANDLE)
-#define WSA_INVALID_PARAMETER (ERROR_INVALID_PARAMETER)
-#define WSA_NOT_ENOUGH_MEMORY (ERROR_NOT_ENOUGH_MEMORY)
-#define WSA_OPERATION_ABORTED (ERROR_OPERATION_ABORTED)
-
-#define WSA_INVALID_EVENT ((WSAEVENT)NULL)
-#define WSA_MAXIMUM_WAIT_EVENTS (MAXIMUM_WAIT_OBJECTS)
-#define WSA_WAIT_FAILED ((DWORD)-1L)
-#define WSA_WAIT_EVENT_0 (WAIT_OBJECT_0)
-#define WSA_WAIT_IO_COMPLETION (WAIT_IO_COMPLETION)
-#define WSA_WAIT_TIMEOUT (WAIT_TIMEOUT)
-#define WSA_INFINITE (INFINITE)
-
-typedef struct _WSABUF {
- unsigned long len;
- char *buf;
-} WSABUF, *LPWSABUF;
-
-typedef enum
-{
- BestEffortService,
- ControlledLoadService,
- PredictiveService,
- GuaranteedDelayService,
- GuaranteedService
-} GUARANTEE;
-
-/* TODO: FLOWSPEC and related definitions belong in qos.h */
-
-/*
- Windows Sockets 2 Application Programming Interface,
- revision 2.2.2 (1997) uses the type uint32 for SERVICETYPE
- and the elements of _flowspec, but the type uint32 is not defined
- or used anywhere else in the w32api. For now, just use
- unsigned int, which is 32 bits on _WIN32 and _WIN64.
-*/
-
-typedef unsigned int SERVICETYPE;
-typedef struct _flowspec
-{
- unsigned int TokenRate;
- unsigned int TokenBucketSize;
- unsigned int PeakBandwidth;
- unsigned int Latency;
- unsigned int DelayVariation;
- SERVICETYPE ServiceType;
- unsigned int MaxSduSize;
- unsigned int MinimumPolicedSize;
- } FLOWSPEC, *PFLOWSPEC, *LPFLOWSPEC;
-
-typedef struct _QualityOfService
-{
- FLOWSPEC SendingFlowspec;
- FLOWSPEC ReceivingFlowspec;
- WSABUF ProviderSpecific;
-} QOS, *LPQOS;
-
-#define CF_ACCEPT 0x0000
-#define CF_REJECT 0x0001
-#define CF_DEFER 0x0002
-#define SD_RECEIVE 0x00
-#define SD_SEND 0x01
-#define SD_BOTH 0x02
-typedef unsigned int GROUP;
-
-#define SG_UNCONSTRAINED_GROUP 0x01
-#define SG_CONSTRAINED_GROUP 0x02
-typedef struct _WSANETWORKEVENTS {
- long lNetworkEvents;
- int iErrorCode[FD_MAX_EVENTS];
-} WSANETWORKEVENTS, *LPWSANETWORKEVENTS;
-
-#define MAX_PROTOCOL_CHAIN 7
-
-#define BASE_PROTOCOL 1
-#define LAYERED_PROTOCOL 0
-
-typedef enum _WSAESETSERVICEOP
-{
- RNRSERVICE_REGISTER=0,
- RNRSERVICE_DEREGISTER,
- RNRSERVICE_DELETE
-} WSAESETSERVICEOP, *PWSAESETSERVICEOP, *LPWSAESETSERVICEOP;
-
-typedef struct _AFPROTOCOLS {
- INT iAddressFamily;
- INT iProtocol;
-} AFPROTOCOLS, *PAFPROTOCOLS, *LPAFPROTOCOLS;
-
-typedef enum _WSAEcomparator
-{
- COMP_EQUAL = 0,
- COMP_NOTLESS
-} WSAECOMPARATOR, *PWSAECOMPARATOR, *LPWSAECOMPARATOR;
-
-typedef struct _WSAVersion
-{
- DWORD dwVersion;
- WSAECOMPARATOR ecHow;
-} WSAVERSION, *PWSAVERSION, *LPWSAVERSION;
-
-#ifndef __CSADDR_T_DEFINED /* also in nspapi.h */
-#define __CSADDR_T_DEFINED
-typedef struct _SOCKET_ADDRESS {
- LPSOCKADDR lpSockaddr;
- INT iSockaddrLength;
-} SOCKET_ADDRESS,*PSOCKET_ADDRESS,*LPSOCKET_ADDRESS;
-typedef struct _CSADDR_INFO {
- SOCKET_ADDRESS LocalAddr;
- SOCKET_ADDRESS RemoteAddr;
- INT iSocketType;
- INT iProtocol;
-} CSADDR_INFO,*PCSADDR_INFO,*LPCSADDR_INFO;
-#endif
-
-typedef struct _SOCKET_ADDRESS_LIST {
- INT iAddressCount;
- SOCKET_ADDRESS Address[1];
-} SOCKET_ADDRESS_LIST, * LPSOCKET_ADDRESS_LIST;
-
-#ifndef __BLOB_T_DEFINED /* also in wtypes.h and nspapi.h */
-#define __BLOB_T_DEFINED
-typedef struct _BLOB {
- ULONG cbSize;
- BYTE *pBlobData;
-} BLOB,*PBLOB,*LPBLOB;
-#endif
-
-typedef struct _WSAQuerySetA
-{
- DWORD dwSize;
- LPSTR lpszServiceInstanceName;
- LPGUID lpServiceClassId;
- LPWSAVERSION lpVersion;
- LPSTR lpszComment;
- DWORD dwNameSpace;
- LPGUID lpNSProviderId;
- LPSTR lpszContext;
- DWORD dwNumberOfProtocols;
- LPAFPROTOCOLS lpafpProtocols;
- LPSTR lpszQueryString;
- DWORD dwNumberOfCsAddrs;
- LPCSADDR_INFO lpcsaBuffer;
- DWORD dwOutputFlags;
- LPBLOB lpBlob;
-} WSAQUERYSETA, *PWSAQUERYSETA, *LPWSAQUERYSETA;
-
-typedef struct _WSAQuerySetW
-{
- DWORD dwSize;
- LPWSTR lpszServiceInstanceName;
- LPGUID lpServiceClassId;
- LPWSAVERSION lpVersion;
- LPWSTR lpszComment;
- DWORD dwNameSpace;
- LPGUID lpNSProviderId;
- LPWSTR lpszContext;
- DWORD dwNumberOfProtocols;
- LPAFPROTOCOLS lpafpProtocols;
- LPWSTR lpszQueryString;
- DWORD dwNumberOfCsAddrs;
- LPCSADDR_INFO lpcsaBuffer;
- DWORD dwOutputFlags;
- LPBLOB lpBlob;
-} WSAQUERYSETW, *PWSAQUERYSETW, *LPWSAQUERYSETW;
-
-#ifdef UNICODE
-typedef WSAQUERYSETW WSAQUERYSET;
-typedef PWSAQUERYSETW PWSAQUERYSET;
-typedef LPWSAQUERYSETW LPWSAQUERYSET;
-#else
-typedef WSAQUERYSETA WSAQUERYSET;
-typedef PWSAQUERYSETA PWSAQUERYSET;
-typedef LPWSAQUERYSETA LPWSAQUERYSET;
-#endif
-
-#define LUP_DEEP 0x0001
-#define LUP_CONTAINERS 0x0002
-#define LUP_NOCONTAINERS 0x0004
-#define LUP_NEAREST 0x0008
-#define LUP_RETURN_NAME 0x0010
-#define LUP_RETURN_TYPE 0x0020
-#define LUP_RETURN_VERSION 0x0040
-#define LUP_RETURN_COMMENT 0x0080
-#define LUP_RETURN_ADDR 0x0100
-#define LUP_RETURN_BLOB 0x0200
-#define LUP_RETURN_ALIASES 0x0400
-#define LUP_RETURN_QUERY_STRING 0x0800
-#define LUP_RETURN_ALL 0x0FF0
-#define LUP_RES_SERVICE 0x8000
-#define LUP_FLUSHCACHE 0x1000
-#define LUP_FLUSHPREVIOUS 0x2000
-
-typedef struct _WSANSClassInfoA
-{
- LPSTR lpszName;
- DWORD dwNameSpace;
- DWORD dwValueType;
- DWORD dwValueSize;
- LPVOID lpValue;
-} WSANSCLASSINFOA, *PWSANSCLASSINFOA, *LPWSANSCLASSINFOA;
-
-typedef struct _WSANSClassInfoW
-{
- LPWSTR lpszName;
- DWORD dwNameSpace;
- DWORD dwValueType;
- DWORD dwValueSize;
- LPVOID lpValue;
-} WSANSCLASSINFOW, *PWSANSCLASSINFOW, *LPWSANSCLASSINFOW;
-
-#ifdef UNICODE
-typedef WSANSCLASSINFOW WSANSCLASSINFO;
-typedef PWSANSCLASSINFOW PWSANSCLASSINFO;
-typedef LPWSANSCLASSINFOW LPWSANSCLASSINFO;
-#else
-typedef WSANSCLASSINFOA WSANSCLASSINFO;
-typedef PWSANSCLASSINFOA PWSANSCLASSINFO;
-typedef LPWSANSCLASSINFOA LPWSANSCLASSINFO;
-#endif
-
-typedef struct _WSAServiceClassInfoA
-{
- LPGUID lpServiceClassId;
- LPSTR lpszServiceClassName;
- DWORD dwCount;
- LPWSANSCLASSINFOA lpClassInfos;
-} WSASERVICECLASSINFOA, *PWSASERVICECLASSINFOA, *LPWSASERVICECLASSINFOA;
-
-typedef struct _WSAServiceClassInfoW
-{
- LPGUID lpServiceClassId;
- LPWSTR lpszServiceClassName;
- DWORD dwCount;
- LPWSANSCLASSINFOW lpClassInfos;
-} WSASERVICECLASSINFOW, *PWSASERVICECLASSINFOW, *LPWSASERVICECLASSINFOW;
-
-#ifdef UNICODE
-typedef WSASERVICECLASSINFOW WSASERVICECLASSINFO;
-typedef PWSASERVICECLASSINFOW PWSASERVICECLASSINFO;
-typedef LPWSASERVICECLASSINFOW LPWSASERVICECLASSINFO;
-#else
-typedef WSASERVICECLASSINFOA WSASERVICECLASSINFO;
-typedef PWSASERVICECLASSINFOA PWSASERVICECLASSINFO;
-typedef LPWSASERVICECLASSINFOA LPWSASERVICECLASSINFO;
-#endif
-
-typedef struct _WSANAMESPACE_INFOA {
- GUID NSProviderId;
- DWORD dwNameSpace;
- BOOL fActive;
- DWORD dwVersion;
- LPSTR lpszIdentifier;
-} WSANAMESPACE_INFOA, *PWSANAMESPACE_INFOA, *LPWSANAMESPACE_INFOA;
-
-typedef struct _WSANAMESPACE_INFOW {
- GUID NSProviderId;
- DWORD dwNameSpace;
- BOOL fActive;
- DWORD dwVersion;
- LPWSTR lpszIdentifier;
-} WSANAMESPACE_INFOW, *PWSANAMESPACE_INFOW, *LPWSANAMESPACE_INFOW;
-
-#ifdef UNICODE
-typedef WSANAMESPACE_INFOW WSANAMESPACE_INFO;
-typedef PWSANAMESPACE_INFOW PWSANAMESPACE_INFO;
-typedef LPWSANAMESPACE_INFOW LPWSANAMESPACE_INFO;
-#else
-typedef WSANAMESPACE_INFOA WSANAMESPACE_INFO;
-typedef PWSANAMESPACE_INFOA PWSANAMESPACE_INFO;
-typedef LPWSANAMESPACE_INFOA LPWSANAMESPACE_INFO;
-#endif
-
-typedef struct _WSAPROTOCOLCHAIN {
- int ChainLen;
- DWORD ChainEntries[MAX_PROTOCOL_CHAIN];
-} WSAPROTOCOLCHAIN, *LPWSAPROTOCOLCHAIN;
-
-#define WSAPROTOCOL_LEN 255
-
-typedef struct _WSAPROTOCOL_INFOA {
- DWORD dwServiceFlags1;
- DWORD dwServiceFlags2;
- DWORD dwServiceFlags3;
- DWORD dwServiceFlags4;
- DWORD dwProviderFlags;
- GUID ProviderId;
- DWORD dwCatalogEntryId;
- WSAPROTOCOLCHAIN ProtocolChain;
- int iVersion;
- int iAddressFamily;
- int iMaxSockAddr;
- int iMinSockAddr;
- int iSocketType;
- int iProtocol;
- int iProtocolMaxOffset;
- int iNetworkByteOrder;
- int iSecurityScheme;
- DWORD dwMessageSize;
- DWORD dwProviderReserved;
- CHAR szProtocol[WSAPROTOCOL_LEN+1];
-} WSAPROTOCOL_INFOA, *LPWSAPROTOCOL_INFOA;
-
-typedef struct _WSAPROTOCOL_INFOW {
- DWORD dwServiceFlags1;
- DWORD dwServiceFlags2;
- DWORD dwServiceFlags3;
- DWORD dwServiceFlags4;
- DWORD dwProviderFlags;
- GUID ProviderId;
- DWORD dwCatalogEntryId;
- WSAPROTOCOLCHAIN ProtocolChain;
- int iVersion;
- int iAddressFamily;
- int iMaxSockAddr;
- int iMinSockAddr;
- int iSocketType;
- int iProtocol;
- int iProtocolMaxOffset;
- int iNetworkByteOrder;
- int iSecurityScheme;
- DWORD dwMessageSize;
- DWORD dwProviderReserved;
- WCHAR szProtocol[WSAPROTOCOL_LEN+1];
-} WSAPROTOCOL_INFOW, * LPWSAPROTOCOL_INFOW;
-
-typedef int (CALLBACK *LPCONDITIONPROC)(LPWSABUF, LPWSABUF, LPQOS, LPQOS, LPWSABUF, LPWSABUF, GROUP *, DWORD);
-typedef void (WINAPI *LPWSAOVERLAPPED_COMPLETION_ROUTINE)(DWORD, DWORD, LPWSAOVERLAPPED, DWORD);
-
-
-#ifdef UNICODE
-typedef WSAPROTOCOL_INFOW WSAPROTOCOL_INFO;
-typedef LPWSAPROTOCOL_INFOW LPWSAPROTOCOL_INFO;
-#else
-typedef WSAPROTOCOL_INFOA WSAPROTOCOL_INFO;
-typedef LPWSAPROTOCOL_INFOA LPWSAPROTOCOL_INFO;
-#endif
-
-/* Needed for XP & .NET Server function WSANSPIoctl. */
-typedef enum _WSACOMPLETIONTYPE {
- NSP_NOTIFY_IMMEDIATELY = 0,
- NSP_NOTIFY_HWND,
- NSP_NOTIFY_EVENT,
- NSP_NOTIFY_PORT,
- NSP_NOTIFY_APC
-} WSACOMPLETIONTYPE, * PWSACOMPLETIONTYPE, * LPWSACOMPLETIONTYPE;
-typedef struct _WSACOMPLETION {
- WSACOMPLETIONTYPE Type;
- union {
- struct {
- HWND hWnd;
- UINT uMsg;
- WPARAM context;
- } WindowMessage;
- struct {
- LPWSAOVERLAPPED lpOverlapped;
- } Event;
- struct {
- LPWSAOVERLAPPED lpOverlapped;
- LPWSAOVERLAPPED_COMPLETION_ROUTINE lpfnCompletionProc;
- } Apc;
- struct {
- LPWSAOVERLAPPED lpOverlapped;
- HANDLE hPort;
- ULONG_PTR Key;
- } Port;
- } Parameters;
-} WSACOMPLETION, *PWSACOMPLETION, *LPWSACOMPLETION;
-
-#define PFL_MULTIPLE_PROTO_ENTRIES 0x00000001
-#define PFL_RECOMMENDED_PROTO_ENTRY 0x00000002
-#define PFL_HIDDEN 0x00000004
-#define PFL_MATCHES_PROTOCOL_ZERO 0x00000008
-#define XP1_CONNECTIONLESS 0x00000001
-#define XP1_GUARANTEED_DELIVERY 0x00000002
-#define XP1_GUARANTEED_ORDER 0x00000004
-#define XP1_MESSAGE_ORIENTED 0x00000008
-#define XP1_PSEUDO_STREAM 0x00000010
-#define XP1_GRACEFUL_CLOSE 0x00000020
-#define XP1_EXPEDITED_DATA 0x00000040
-#define XP1_CONNECT_DATA 0x00000080
-#define XP1_DISCONNECT_DATA 0x00000100
-#define XP1_SUPPORT_BROADCAST 0x00000200
-#define XP1_SUPPORT_MULTIPOINT 0x00000400
-#define XP1_MULTIPOINT_CONTROL_PLANE 0x00000800
-#define XP1_MULTIPOINT_DATA_PLANE 0x00001000
-#define XP1_QOS_SUPPORTED 0x00002000
-#define XP1_INTERRUPT 0x00004000
-#define XP1_UNI_SEND 0x00008000
-#define XP1_UNI_RECV 0x00010000
-#define XP1_IFS_HANDLES 0x00020000
-#define XP1_PARTIAL_MESSAGE 0x00040000
-
-#define BIGENDIAN 0x0000
-#define LITTLEENDIAN 0x0001
-
-#define SECURITY_PROTOCOL_NONE 0x0000
-#define JL_SENDER_ONLY 0x01
-#define JL_RECEIVER_ONLY 0x02
-#define JL_BOTH 0x04
-#define WSA_FLAG_OVERLAPPED 0x01
-#define WSA_FLAG_MULTIPOINT_C_ROOT 0x02
-#define WSA_FLAG_MULTIPOINT_C_LEAF 0x04
-#define WSA_FLAG_MULTIPOINT_D_ROOT 0x08
-#define WSA_FLAG_MULTIPOINT_D_LEAF 0x10
-#define IOC_UNIX 0x00000000
-#define IOC_WS2 0x08000000
-#define IOC_PROTOCOL 0x10000000
-#define IOC_VENDOR 0x18000000
-
-#define _WSAIO(x,y) (IOC_VOID|(x)|(y))
-#define _WSAIOR(x,y) (IOC_OUT|(x)|(y))
-#define _WSAIOW(x,y) (IOC_IN|(x)|(y))
-#define _WSAIORW(x,y) (IOC_INOUT|(x)|(y))
-
-#define SIO_ASSOCIATE_HANDLE _WSAIOW(IOC_WS2,1)
-#define SIO_ENABLE_CIRCULAR_QUEUEING _WSAIO(IOC_WS2,2)
-#define SIO_FIND_ROUTE _WSAIOR(IOC_WS2,3)
-#define SIO_FLUSH _WSAIO(IOC_WS2,4)
-#define SIO_GET_BROADCAST_ADDRESS _WSAIOR(IOC_WS2,5)
-#define SIO_GET_EXTENSION_FUNCTION_POINTER _WSAIORW(IOC_WS2,6)
-#define SIO_GET_QOS _WSAIORW(IOC_WS2,7)
-#define SIO_GET_GROUP_QOS _WSAIORW(IOC_WS2,8)
-#define SIO_MULTIPOINT_LOOPBACK _WSAIOW(IOC_WS2,9)
-#define SIO_MULTICAST_SCOPE _WSAIOW(IOC_WS2,10)
-#define SIO_SET_QOS _WSAIOW(IOC_WS2,11)
-#define SIO_SET_GROUP_QOS _WSAIOW(IOC_WS2,12)
-#define SIO_TRANSLATE_HANDLE _WSAIORW(IOC_WS2,13)
-#define SIO_ROUTING_INTERFACE_QUERY _WSAIORW(IOC_WS2,20)
-#define SIO_ROUTING_INTERFACE_CHANGE _WSAIOW(IOC_WS2,21)
-#define SIO_ADDRESS_LIST_QUERY _WSAIOR(IOC_WS2,22)
-#define SIO_ADDRESS_LIST_CHANGE _WSAIO(IOC_WS2,23)
-#define SIO_QUERY_TARGET_PNP_HANDLE _WSAIOR(IOC_WS2,24)
-#define SIO_NSP_NOTIFY_CHANGE _WSAIOW(IOC_WS2,25)
-
-#define TH_NETDEV 0x00000001
-#define TH_TAPI 0x00000002
-
-WINSOCK_API_LINKAGE SOCKET WINAPI WSAAccept(SOCKET, struct sockaddr *, LPINT, LPCONDITIONPROC, DWORD);
-WINSOCK_API_LINKAGE INT WINAPI WSAAddressToStringA(LPSOCKADDR, DWORD, LPWSAPROTOCOL_INFOA, LPSTR, LPDWORD);
-WINSOCK_API_LINKAGE INT WINAPI WSAAddressToStringW(LPSOCKADDR, DWORD, LPWSAPROTOCOL_INFOW, LPWSTR, LPDWORD);
-WINSOCK_API_LINKAGE BOOL WINAPI WSACloseEvent(WSAEVENT);
-WINSOCK_API_LINKAGE int WINAPI WSAConnect(SOCKET, const struct sockaddr *, int, LPWSABUF, LPWSABUF, LPQOS, LPQOS);
-WINSOCK_API_LINKAGE WSAEVENT WINAPI WSACreateEvent(void);
-WINSOCK_API_LINKAGE int WINAPI WSADuplicateSocketA(SOCKET, DWORD, LPWSAPROTOCOL_INFOA);
-WINSOCK_API_LINKAGE int WINAPI WSADuplicateSocketW(SOCKET, DWORD, LPWSAPROTOCOL_INFOW);
-WINSOCK_API_LINKAGE INT WINAPI WSAEnumNameSpaceProvidersA(LPDWORD, LPWSANAMESPACE_INFOA);
-WINSOCK_API_LINKAGE INT WINAPI WSAEnumNameSpaceProvidersW(LPDWORD, LPWSANAMESPACE_INFOW);
-WINSOCK_API_LINKAGE int WINAPI WSAEnumNetworkEvents(SOCKET, WSAEVENT, LPWSANETWORKEVENTS);
-WINSOCK_API_LINKAGE int WINAPI WSAEnumProtocolsA(LPINT, LPWSAPROTOCOL_INFOA, LPDWORD);
-WINSOCK_API_LINKAGE int WINAPI WSAEnumProtocolsW(LPINT, LPWSAPROTOCOL_INFOW, LPDWORD);
-WINSOCK_API_LINKAGE int WINAPI WSAEventSelect(SOCKET, WSAEVENT, long);
-WINSOCK_API_LINKAGE BOOL WINAPI WSAGetOverlappedResult(SOCKET, LPWSAOVERLAPPED, LPDWORD, BOOL, LPDWORD);
-WINSOCK_API_LINKAGE BOOL WINAPI WSAGetQOSByName(SOCKET, LPWSABUF, LPQOS);
-WINSOCK_API_LINKAGE INT WINAPI WSAGetServiceClassInfoA(LPGUID, LPGUID, LPDWORD, LPWSASERVICECLASSINFOA);
-WINSOCK_API_LINKAGE INT WINAPI WSAGetServiceClassInfoW(LPGUID, LPGUID, LPDWORD, LPWSASERVICECLASSINFOW);
-WINSOCK_API_LINKAGE INT WINAPI WSAGetServiceClassNameByClassIdA(LPGUID, LPSTR, LPDWORD);
-WINSOCK_API_LINKAGE INT WINAPI WSAGetServiceClassNameByClassIdW(LPGUID, LPWSTR, LPDWORD);
-WINSOCK_API_LINKAGE int WINAPI WSAHtonl(SOCKET, unsigned long, unsigned long *);
-WINSOCK_API_LINKAGE int WINAPI WSAHtons(SOCKET, unsigned short, unsigned short *);
-WINSOCK_API_LINKAGE INT WINAPI WSAInstallServiceClassA(LPWSASERVICECLASSINFOA);
-WINSOCK_API_LINKAGE INT WINAPI WSAInstallServiceClassW(LPWSASERVICECLASSINFOW);
-WINSOCK_API_LINKAGE int WINAPI WSAIoctl(SOCKET, DWORD, LPVOID, DWORD, LPVOID, DWORD, LPDWORD, LPWSAOVERLAPPED, LPWSAOVERLAPPED_COMPLETION_ROUTINE);
-WINSOCK_API_LINKAGE SOCKET WINAPI WSAJoinLeaf(SOCKET, const struct sockaddr *, int, LPWSABUF, LPWSABUF, LPQOS, LPQOS, DWORD);
-WINSOCK_API_LINKAGE INT WINAPI WSALookupServiceBeginA(LPWSAQUERYSETA, DWORD, LPHANDLE);
-WINSOCK_API_LINKAGE INT WINAPI WSALookupServiceBeginW(LPWSAQUERYSETW lpqsRestrictions, DWORD, LPHANDLE);
-WINSOCK_API_LINKAGE INT WINAPI WSALookupServiceNextA(HANDLE, DWORD, LPDWORD, LPWSAQUERYSETA);
-WINSOCK_API_LINKAGE INT WINAPI WSALookupServiceNextW(HANDLE, DWORD, LPDWORD, LPWSAQUERYSETW);
-WINSOCK_API_LINKAGE INT WINAPI WSALookupServiceEnd(HANDLE);
-WINSOCK_API_LINKAGE int WINAPI WSANSPIoctl(HANDLE,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSACOMPLETION); /* XP or .NET Server */
-WINSOCK_API_LINKAGE int WINAPI WSANtohl(SOCKET, unsigned long, unsigned long *);
-WINSOCK_API_LINKAGE int WINAPI WSANtohs(SOCKET, unsigned short, unsigned short *);
-WINSOCK_API_LINKAGE int WINAPI WSARecv(SOCKET, LPWSABUF, DWORD, LPDWORD, LPDWORD, LPWSAOVERLAPPED, LPWSAOVERLAPPED_COMPLETION_ROUTINE);
-WINSOCK_API_LINKAGE int WINAPI WSARecvDisconnect(SOCKET, LPWSABUF);
-WINSOCK_API_LINKAGE int WINAPI WSARecvFrom(SOCKET, LPWSABUF, DWORD, LPDWORD, LPDWORD, struct sockaddr *, LPINT, LPWSAOVERLAPPED, LPWSAOVERLAPPED_COMPLETION_ROUTINE);
-WINSOCK_API_LINKAGE INT WINAPI WSARemoveServiceClass(LPGUID);
-WINSOCK_API_LINKAGE BOOL WINAPI WSAResetEvent(WSAEVENT);
-WINSOCK_API_LINKAGE int WINAPI WSASend(SOCKET, LPWSABUF, DWORD, LPDWORD, DWORD, LPWSAOVERLAPPED, LPWSAOVERLAPPED_COMPLETION_ROUTINE);
-WINSOCK_API_LINKAGE int WINAPI WSASendDisconnect(SOCKET, LPWSABUF);
-WINSOCK_API_LINKAGE int WINAPI WSASendTo(SOCKET, LPWSABUF, DWORD, LPDWORD, DWORD, const struct sockaddr *, int, LPWSAOVERLAPPED, LPWSAOVERLAPPED_COMPLETION_ROUTINE);
-WINSOCK_API_LINKAGE BOOL WINAPI WSASetEvent(WSAEVENT);
-WINSOCK_API_LINKAGE INT WSAAPI WSASetServiceA(LPWSAQUERYSETA, WSAESETSERVICEOP, DWORD);
-WINSOCK_API_LINKAGE INT WINAPI WSASetServiceW(LPWSAQUERYSETW, WSAESETSERVICEOP, DWORD);
-WINSOCK_API_LINKAGE SOCKET WINAPI WSASocketA(int, int, int, LPWSAPROTOCOL_INFOA, GROUP, DWORD);
-WINSOCK_API_LINKAGE SOCKET WINAPI WSASocketW(int, int, int, LPWSAPROTOCOL_INFOW, GROUP, DWORD);
-WINSOCK_API_LINKAGE INT WINAPI WSAStringToAddressA(LPSTR, INT, LPWSAPROTOCOL_INFOA, LPSOCKADDR, LPINT);
-WINSOCK_API_LINKAGE INT WINAPI WSAStringToAddressW(LPWSTR, INT, LPWSAPROTOCOL_INFOW, LPSOCKADDR, LPINT);
-WINSOCK_API_LINKAGE DWORD WINAPI WSAWaitForMultipleEvents(DWORD, const WSAEVENT *, BOOL, DWORD, BOOL);
-
-typedef SOCKET (WINAPI *LPFN_WSAACCEPT)(SOCKET, struct sockaddr *, LPINT, LPCONDITIONPROC, DWORD);
-typedef INT (WINAPI *LPFN_WSAADDRESSTOSTRINGA)(LPSOCKADDR, DWORD, LPWSAPROTOCOL_INFOA, LPSTR, LPDWORD);
-typedef INT (WINAPI *LPFN_WSAADDRESSTOSTRINGW)(LPSOCKADDR, DWORD, LPWSAPROTOCOL_INFOW, LPWSTR, LPDWORD);
-typedef BOOL (WINAPI *LPFN_WSACLOSEEVENT)(WSAEVENT);
-typedef int (WINAPI *LPFN_WSACONNECT)(SOCKET, const struct sockaddr *, int, LPWSABUF, LPWSABUF, LPQOS, LPQOS);
-typedef WSAEVENT (WINAPI *LPFN_WSACREATEEVENT)(void);
-typedef int (WINAPI *LPFN_WSADUPLICATESOCKETA)(SOCKET, DWORD, LPWSAPROTOCOL_INFOA);
-typedef int (WINAPI *LPFN_WSADUPLICATESOCKETW)(SOCKET, DWORD, LPWSAPROTOCOL_INFOW);
-typedef INT (WINAPI *LPFN_WSAENUMNAMESPACEPROVIDERSA)(LPDWORD, LPWSANAMESPACE_INFOA);
-typedef INT (WINAPI *LPFN_WSAENUMNAMESPACEPROVIDERSW)(LPDWORD, LPWSANAMESPACE_INFOW);
-typedef int (WINAPI *LPFN_WSAENUMNETWORKEVENTS)(SOCKET, WSAEVENT, LPWSANETWORKEVENTS);
-typedef int (WINAPI *LPFN_WSAENUMPROTOCOLSA)(LPINT, LPWSAPROTOCOL_INFOA, LPDWORD);
-typedef int (WINAPI *LPFN_WSAENUMPROTOCOLSW)(LPINT, LPWSAPROTOCOL_INFOW, LPDWORD);
-typedef int (WINAPI *LPFN_WSAEVENTSELECT)(SOCKET, WSAEVENT, long);
-typedef BOOL (WINAPI *LPFN_WSAGETOVERLAPPEDRESULT)(SOCKET, LPWSAOVERLAPPED, LPDWORD, BOOL, LPDWORD);
-typedef BOOL (WINAPI *LPFN_WSAGETQOSBYNAME)(SOCKET, LPWSABUF, LPQOS);
-typedef INT (WINAPI *LPFN_WSAGETSERVICECLASSINFOA)(LPGUID, LPGUID, LPDWORD, LPWSASERVICECLASSINFOA);
-typedef INT (WINAPI *LPFN_WSAGETSERVICECLASSINFOW)(LPGUID, LPGUID, LPDWORD, LPWSASERVICECLASSINFOW);
-typedef INT (WINAPI *LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDA)(LPGUID, LPSTR, LPDWORD);
-typedef INT (WINAPI *LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDW)(LPGUID, LPWSTR, LPDWORD);
-typedef int (WINAPI *LPFN_WSAHTONL)(SOCKET, unsigned long, unsigned long *);
-typedef int (WINAPI *LPFN_WSAHTONS)(SOCKET, unsigned short, unsigned short *);
-typedef INT (WINAPI *LPFN_WSAINSTALLSERVICECLASSA)(LPWSASERVICECLASSINFOA);
-typedef INT (WINAPI *LPFN_WSAINSTALLSERVICECLASSW)(LPWSASERVICECLASSINFOW);
-typedef int (WINAPI *LPFN_WSAIOCTL)(SOCKET, DWORD, LPVOID, DWORD, LPVOID, DWORD, LPDWORD, LPWSAOVERLAPPED, LPWSAOVERLAPPED_COMPLETION_ROUTINE);
-typedef SOCKET (WINAPI *LPFN_WSAJOINLEAF)(SOCKET, const struct sockaddr *, int, LPWSABUF, LPWSABUF, LPQOS, LPQOS, DWORD);
-typedef INT (WINAPI *LPFN_WSALOOKUPSERVICEBEGINA)(LPWSAQUERYSETA, DWORD, LPHANDLE);
-typedef INT (WINAPI *LPFN_WSALOOKUPSERVICEBEGINW)(LPWSAQUERYSETW, DWORD, LPHANDLE);
-typedef INT (WINAPI *LPFN_WSALOOKUPSERVICENEXTA)(HANDLE, DWORD, LPDWORD, LPWSAQUERYSETA);
-typedef INT (WINAPI *LPFN_WSALOOKUPSERVICENEXTW)(HANDLE, DWORD, LPDWORD, LPWSAQUERYSETW);
-typedef INT (WINAPI *LPFN_WSALOOKUPSERVICEEND)(HANDLE);
-typedef int (WINAPI *LPFN_WSANSPIoctl)(HANDLE, DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSACOMPLETION);
-typedef int (WINAPI *LPFN_WSANTOHL)(SOCKET, unsigned long, unsigned long *);
-typedef int (WINAPI *LPFN_WSANTOHS)(SOCKET, unsigned short, unsigned short *);
-typedef int (WINAPI *LPFN_WSARECV)(SOCKET, LPWSABUF, DWORD, LPDWORD, LPDWORD, LPWSAOVERLAPPED, LPWSAOVERLAPPED_COMPLETION_ROUTINE);
-typedef int (WINAPI *LPFN_WSARECVDISCONNECT)(SOCKET, LPWSABUF);
-typedef int (WINAPI *LPFN_WSARECVFROM)(SOCKET, LPWSABUF, DWORD, LPDWORD, LPDWORD, struct sockaddr *, LPINT, LPWSAOVERLAPPED, LPWSAOVERLAPPED_COMPLETION_ROUTINE);
-typedef INT (WINAPI *LPFN_WSAREMOVESERVICECLASS)(LPGUID);
-typedef BOOL (WINAPI *LPFN_WSARESETEVENT)(WSAEVENT);
-typedef int (WINAPI *LPFN_WSASEND)(SOCKET, LPWSABUF, DWORD, LPDWORD, DWORD, LPWSAOVERLAPPED, LPWSAOVERLAPPED_COMPLETION_ROUTINE);
-typedef int (WINAPI *LPFN_WSASENDDISCONNECT)(SOCKET, LPWSABUF);
-typedef int (WINAPI *LPFN_WSASENDTO)(SOCKET, LPWSABUF, DWORD, LPDWORD, DWORD, const struct sockaddr *, int, LPWSAOVERLAPPED, LPWSAOVERLAPPED_COMPLETION_ROUTINE);
-typedef BOOL (WINAPI *LPFN_WSASETEVENT)(WSAEVENT);
-typedef INT (WINAPI *LPFN_WSASETSERVICEA)(LPWSAQUERYSETA, WSAESETSERVICEOP, DWORD);
-typedef INT (WINAPI *LPFN_WSASETSERVICEW)(LPWSAQUERYSETW, WSAESETSERVICEOP, DWORD);
-typedef SOCKET (WINAPI *LPFN_WSASOCKETA)(int, int, int, LPWSAPROTOCOL_INFOA, GROUP, DWORD);
-typedef SOCKET (WINAPI *LPFN_WSASOCKETW)(int, int, int, LPWSAPROTOCOL_INFOW, GROUP, DWORD);
-typedef INT (WINAPI *LPFN_WSASTRINGTOADDRESSA)(LPSTR, INT, LPWSAPROTOCOL_INFOA, LPSOCKADDR, LPINT);
-typedef INT (WINAPI *LPFN_WSASTRINGTOADDRESSW)(LPWSTR, INT, LPWSAPROTOCOL_INFOW, LPSOCKADDR, LPINT);
-typedef DWORD (WINAPI *LPFN_WSAWAITFORMULTIPLEEVENTS)(DWORD, const WSAEVENT *, BOOL, DWORD, BOOL);
-
-#ifdef UNICODE
-#define LPFN_WSAADDRESSTOSTRING LPFN_WSAADDRESSTOSTRINGW
-#define LPFN_WSADUPLICATESOCKET LPFN_WSADUPLICATESOCKETW
-#define LPFN_WSAENUMNAMESPACEPROVIDERS LPFN_WSAENUMNAMESPACEPROVIDERSW
-#define LPFN_WSAENUMPROTOCOLS LPFN_WSAENUMPROTOCOLSW
-#define LPFN_WSAGETSERVICECLASSINFO LPFN_WSAGETSERVICECLASSINFOW
-#define LPFN_WSAGETSERVICECLASSNAMEBYCLASSID LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDW
-#define LPFN_WSAINSTALLSERVICECLASS LPFN_WSAINSTALLSERVICECLASSW
-#define LPFN_WSALOOKUPSERVICEBEGIN LPFN_WSALOOKUPSERVICEBEGINW
-#define LPFN_WSALOOKUPSERVICENEXT LPFN_WSALOOKUPSERVICENEXTW
-#define LPFN_WSASETSERVICE LPFN_WSASETSERVICEW
-#define LPFN_WSASOCKET LPFN_WSASOCKETW
-#define LPFN_WSASTRINGTOADDRESS LPFN_WSASTRINGTOADDRESSW
-#define WSAAddressToString WSAAddressToStringW
-#define WSADuplicateSocket WSADuplicateSocketW
-#define WSAEnumNameSpaceProviders WSAEnumNameSpaceProvidersW
-#define WSAEnumProtocols WSAEnumProtocolsW
-#define WSAGetServiceClassInfo WSAGetServiceClassInfoW
-#define WSAGetServiceClassNameByClassId WSAGetServiceClassNameByClassIdW
-#define WSASetService WSASetServiceW
-#define WSASocket WSASocketW
-#define WSAStringToAddress WSAStringToAddressW
-#define WSALookupServiceBegin WSALookupServiceBeginW
-#define WSALookupServiceNext WSALookupServiceNextW
-#define WSAInstallServiceClass WSAInstallServiceClassW
-#else
-#define LPFN_WSAADDRESSTOSTRING LPFN_WSAADDRESSTOSTRINGA
-#define LPFN_WSADUPLICATESOCKET LPFN_WSADUPLICATESOCKETW
-#define LPFN_WSAENUMNAMESPACEPROVIDERS LPFN_WSAENUMNAMESPACEPROVIDERSA
-#define LPFN_WSAENUMPROTOCOLS LPFN_WSAENUMPROTOCOLSA
-#define LPFN_WSAGETSERVICECLASSINFO LPFN_WSAGETSERVICECLASSINFOA
-#define LPFN_WSAGETSERVICECLASSNAMEBYCLASSID LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDA
-#define LPFN_WSAINSTALLSERVICECLASS LPFN_WSAINSTALLSERVICECLASSA
-#define LPFN_WSALOOKUPSERVICEBEGIN LPFN_WSALOOKUPSERVICEBEGINA
-#define LPFN_WSALOOKUPSERVICENEXT LPFN_WSALOOKUPSERVICENEXTA
-#define LPFN_WSASETSERVICE LPFN_WSASETSERVICEA
-#define LPFN_WSASOCKET LPFN_WSASOCKETA
-#define LPFN_WSASTRINGTOADDRESS LPFN_WSASTRINGTOADDRESSA
-#define WSAAddressToString WSAAddressToStringA
-#define WSADuplicateSocket WSADuplicateSocketA
-#define WSAEnumNameSpaceProviders WSAEnumNameSpaceProvidersA
-#define WSAEnumProtocols WSAEnumProtocolsA
-#define WSAGetServiceClassInfo WSAGetServiceClassInfoA
-#define WSAGetServiceClassNameByClassId WSAGetServiceClassNameByClassIdA
-#define WSAInstallServiceClass WSAInstallServiceClassA
-#define WSALookupServiceBegin WSALookupServiceBeginA
-#define WSALookupServiceNext WSALookupServiceNextA
-#define WSASocket WSASocketA
-#define WSAStringToAddress WSAStringToAddressA
-#define WSASetService WSASetServiceA
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/winspool.h b/winsup/w32api/include/winspool.h
deleted file mode 100644
index a7d4892..0000000
--- a/winsup/w32api/include/winspool.h
+++ /dev/null
@@ -1,982 +0,0 @@
-#ifndef _WINSPOOL_H
-#define _WINSPOOL_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define DI_CHANNEL 1
-#define DI_CHANNEL_WRITE 2
-#define DI_READ_SPOOL_JOB 3
-#define DI_MEMORYMAP_WRITE 0x1
-#define FORM_USER 0x0
-#define FORM_BUILTIN 0x1
-#define FORM_PRINTER 0x2
-#if (_WIN32_WINNT >= 0x0500)
-#define DRIVER_KERNELMODE 0x00000001
-#define DRIVER_USERMODE 0x00000002
-#define DSPRINT_PUBLISH 0x00000001
-#define DSPRINT_UPDATE 0x00000002
-#define DSPRINT_UNPUBLISH 0x00000004
-#define DSPRINT_REPUBLISH 0x00000008
-#define DSPRINT_PENDING 0x80000000
-#endif
-#define JOB_CONTROL_PAUSE 1
-#define JOB_CONTROL_RESUME 2
-#define JOB_CONTROL_CANCEL 3
-#define JOB_CONTROL_RESTART 4
-#define JOB_CONTROL_DELETE 5
-#define JOB_CONTROL_SENT_TO_PRINTER 6
-#define JOB_CONTROL_LAST_PAGE_EJECTED 7
-#define JOB_STATUS_PAUSED 0x1
-#define JOB_STATUS_ERROR 0x2
-#define JOB_STATUS_DELETING 0x4
-#define JOB_STATUS_SPOOLING 0x8
-#define JOB_STATUS_PRINTING 0x10
-#define JOB_STATUS_OFFLINE 0x20
-#define JOB_STATUS_PAPEROUT 0x40
-#define JOB_STATUS_PRINTED 0x80
-#define JOB_STATUS_DELETED 0x100
-#define JOB_STATUS_BLOCKED_DEVQ 0x200
-#define JOB_STATUS_USER_INTERVENTION 0x400
-#define JOB_STATUS_RESTART 0x800
-#define JOB_STATUS_COMPLETE 0x1000
-#define JOB_POSITION_UNSPECIFIED 0
-#define JOB_NOTIFY_TYPE 1
-#define JOB_NOTIFY_FIELD_PRINTER_NAME 0
-#define JOB_NOTIFY_FIELD_MACHINE_NAME 1
-#define JOB_NOTIFY_FIELD_PORT_NAME 2
-#define JOB_NOTIFY_FIELD_USER_NAME 3
-#define JOB_NOTIFY_FIELD_NOTIFY_NAME 4
-#define JOB_NOTIFY_FIELD_DATATYPE 5
-#define JOB_NOTIFY_FIELD_PRINT_PROCESSOR 6
-#define JOB_NOTIFY_FIELD_PARAMETERS 7
-#define JOB_NOTIFY_FIELD_DRIVER_NAME 8
-#define JOB_NOTIFY_FIELD_DEVMODE 9
-#define JOB_NOTIFY_FIELD_STATUS 10
-#define JOB_NOTIFY_FIELD_STATUS_STRING 11
-#define JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR 12
-#define JOB_NOTIFY_FIELD_DOCUMENT 13
-#define JOB_NOTIFY_FIELD_PRIORITY 14
-#define JOB_NOTIFY_FIELD_POSITION 15
-#define JOB_NOTIFY_FIELD_SUBMITTED 16
-#define JOB_NOTIFY_FIELD_START_TIME 17
-#define JOB_NOTIFY_FIELD_UNTIL_TIME 18
-#define JOB_NOTIFY_FIELD_TIME 19
-#define JOB_NOTIFY_FIELD_TOTAL_PAGES 20
-#define JOB_NOTIFY_FIELD_PAGES_PRINTED 21
-#define JOB_NOTIFY_FIELD_TOTAL_BYTES 22
-#define JOB_NOTIFY_FIELD_BYTES_PRINTED 23
-#define JOB_ACCESS_ADMINISTER 16
-#define JOB_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|JOB_ACCESS_ADMINISTER)
-#define JOB_READ (STANDARD_RIGHTS_READ| JOB_ACCESS_ADMINISTER)
-#define JOB_WRITE (STANDARD_RIGHTS_WRITE|JOB_ACCESS_ADMINISTER)
-#define JOB_EXECUTE (STANDARD_RIGHTS_EXECUTE|JOB_ACCESS_ADMINISTER)
-#define PRINTER_NOTIFY_OPTIONS_REFRESH 1
-#define PRINTER_ACCESS_ADMINISTER 4
-#define PRINTER_ACCESS_USE 8
-#define PRINTER_ERROR_INFORMATION 0x80000000
-#define PRINTER_ERROR_WARNING 0x40000000
-#define PRINTER_ERROR_SEVERE 0x20000000
-#define PRINTER_ERROR_OUTOFPAPER 1
-#define PRINTER_ERROR_JAM 2
-#define PRINTER_ERROR_OUTOFTONER 4
-#define PRINTER_CONTROL_PAUSE 1
-#define PRINTER_CONTROL_RESUME 2
-#define PRINTER_CONTROL_PURGE 3
-#define PRINTER_CONTROL_SET_STATUS 4
-#define PRINTER_STATUS_PAUSED 1
-#define PRINTER_STATUS_ERROR 2
-#define PRINTER_STATUS_PENDING_DELETION 4
-#define PRINTER_STATUS_PAPER_JAM 8
-#define PRINTER_STATUS_PAPER_OUT 0x10
-#define PRINTER_STATUS_MANUAL_FEED 0x20
-#define PRINTER_STATUS_PAPER_PROBLEM 0x40
-#define PRINTER_STATUS_OFFLINE 0x80
-#define PRINTER_STATUS_IO_ACTIVE 0x100
-#define PRINTER_STATUS_BUSY 0x200
-#define PRINTER_STATUS_PRINTING 0x400
-#define PRINTER_STATUS_OUTPUT_BIN_FULL 0x800
-#define PRINTER_STATUS_NOT_AVAILABLE 0x1000
-#define PRINTER_STATUS_WAITING 0x2000
-#define PRINTER_STATUS_PROCESSING 0x4000
-#define PRINTER_STATUS_INITIALIZING 0x8000
-#define PRINTER_STATUS_WARMING_UP 0x10000
-#define PRINTER_STATUS_TONER_LOW 0x20000
-#define PRINTER_STATUS_NO_TONER 0x40000
-#define PRINTER_STATUS_PAGE_PUNT 0x80000
-#define PRINTER_STATUS_USER_INTERVENTION 0x100000
-#define PRINTER_STATUS_OUT_OF_MEMORY 0x200000
-#define PRINTER_STATUS_DOOR_OPEN 0x400000
-#define PRINTER_STATUS_SERVER_UNKNOWN 0x800000
-#define PRINTER_STATUS_POWER_SAVE 0x1000000
-#define PRINTER_ATTRIBUTE_QUEUED 1
-#define PRINTER_ATTRIBUTE_DIRECT 2
-#define PRINTER_ATTRIBUTE_DEFAULT 4
-#define PRINTER_ATTRIBUTE_SHARED 8
-#define PRINTER_ATTRIBUTE_NETWORK 0x10
-#define PRINTER_ATTRIBUTE_HIDDEN 0x20
-#define PRINTER_ATTRIBUTE_LOCAL 0x40
-#define PRINTER_ATTRIBUTE_ENABLE_DEVQ 0x80
-#define PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS 0x100
-#define PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST 0x200
-#define PRINTER_ATTRIBUTE_WORK_OFFLINE 0x400
-#define PRINTER_ATTRIBUTE_ENABLE_BIDI 0x800
-#define PRINTER_ATTRIBUTE_RAW_ONLY 0x1000
-#define PRINTER_ATTRIBUTE_PUBLISHED 0x2000
-#define PRINTER_ENUM_DEFAULT 1
-#define PRINTER_ENUM_LOCAL 2
-#define PRINTER_ENUM_CONNECTIONS 4
-#define PRINTER_ENUM_FAVORITE 4
-#define PRINTER_ENUM_NAME 8
-#define PRINTER_ENUM_REMOTE 16
-#define PRINTER_ENUM_SHARED 32
-#define PRINTER_ENUM_NETWORK 0x40
-#define PRINTER_ENUM_EXPAND 0x4000
-#define PRINTER_ENUM_CONTAINER 0x8000
-#define PRINTER_ENUM_ICONMASK 0xff0000
-#define PRINTER_ENUM_ICON1 0x10000
-#define PRINTER_ENUM_ICON2 0x20000
-#define PRINTER_ENUM_ICON3 0x40000
-#define PRINTER_ENUM_ICON4 0x80000
-#define PRINTER_ENUM_ICON5 0x100000
-#define PRINTER_ENUM_ICON6 0x200000
-#define PRINTER_ENUM_ICON7 0x400000
-#define PRINTER_ENUM_ICON8 0x800000
-#define PRINTER_NOTIFY_TYPE 0
-#define PRINTER_NOTIFY_FIELD_SERVER_NAME 0
-#define PRINTER_NOTIFY_FIELD_PRINTER_NAME 1
-#define PRINTER_NOTIFY_FIELD_SHARE_NAME 2
-#define PRINTER_NOTIFY_FIELD_PORT_NAME 3
-#define PRINTER_NOTIFY_FIELD_DRIVER_NAME 4
-#define PRINTER_NOTIFY_FIELD_COMMENT 5
-#define PRINTER_NOTIFY_FIELD_LOCATION 6
-#define PRINTER_NOTIFY_FIELD_DEVMODE 7
-#define PRINTER_NOTIFY_FIELD_SEPFILE 8
-#define PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR 9
-#define PRINTER_NOTIFY_FIELD_PARAMETERS 10
-#define PRINTER_NOTIFY_FIELD_DATATYPE 11
-#define PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR 12
-#define PRINTER_NOTIFY_FIELD_ATTRIBUTES 13
-#define PRINTER_NOTIFY_FIELD_PRIORITY 14
-#define PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY 15
-#define PRINTER_NOTIFY_FIELD_START_TIME 16
-#define PRINTER_NOTIFY_FIELD_UNTIL_TIME 17
-#define PRINTER_NOTIFY_FIELD_STATUS 18
-#define PRINTER_NOTIFY_FIELD_STATUS_STRING 19
-#define PRINTER_NOTIFY_FIELD_CJOBS 20
-#define PRINTER_NOTIFY_FIELD_AVERAGE_PPM 21
-#define PRINTER_NOTIFY_FIELD_TOTAL_PAGES 22
-#define PRINTER_NOTIFY_FIELD_PAGES_PRINTED 23
-#define PRINTER_NOTIFY_FIELD_TOTAL_BYTES 24
-#define PRINTER_NOTIFY_FIELD_BYTES_PRINTED 25
-#define PRINTER_CHANGE_ADD_PRINTER 1
-#define PRINTER_CHANGE_SET_PRINTER 2
-#define PRINTER_CHANGE_DELETE_PRINTER 4
-#define PRINTER_CHANGE_FAILED_CONNECTION_PRINTER 8
-#define PRINTER_CHANGE_PRINTER 0xFF
-#define PRINTER_CHANGE_ADD_JOB 0x100
-#define PRINTER_CHANGE_SET_JOB 0x200
-#define PRINTER_CHANGE_DELETE_JOB 0x400
-#define PRINTER_CHANGE_WRITE_JOB 0x800
-#define PRINTER_CHANGE_JOB 0xFF00
-#define PRINTER_CHANGE_ADD_FORM 0x10000
-#define PRINTER_CHANGE_SET_FORM 0x20000
-#define PRINTER_CHANGE_DELETE_FORM 0x40000
-#define PRINTER_CHANGE_FORM 0x70000
-#define PRINTER_CHANGE_ADD_PORT 0x100000
-#define PRINTER_CHANGE_CONFIGURE_PORT 0x200000
-#define PRINTER_CHANGE_DELETE_PORT 0x400000
-#define PRINTER_CHANGE_PORT 0x700000
-#define PRINTER_CHANGE_ADD_PRINT_PROCESSOR 0x1000000
-#define PRINTER_CHANGE_DELETE_PRINT_PROCESSOR 0x4000000
-#define PRINTER_CHANGE_PRINT_PROCESSOR 0x7000000
-#define PRINTER_CHANGE_ADD_PRINTER_DRIVER 0x10000000
-#define PRINTER_CHANGE_SET_PRINTER_DRIVER 0x20000000
-#define PRINTER_CHANGE_DELETE_PRINTER_DRIVER 0x40000000
-#define PRINTER_CHANGE_PRINTER_DRIVER 0x70000000
-#define PRINTER_CHANGE_TIMEOUT 0x80000000
-#define PRINTER_CHANGE_ALL 0x7777FFFF
-#define PRINTER_NOTIFY_INFO_DISCARDED 1
-#define PRINTER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|PRINTER_ACCESS_ADMINISTER|PRINTER_ACCESS_USE)
-#define PRINTER_READ (STANDARD_RIGHTS_READ|PRINTER_ACCESS_USE)
-#define PRINTER_WRITE (STANDARD_RIGHTS_WRITE|PRINTER_ACCESS_USE)
-#define PRINTER_EXECUTE (STANDARD_RIGHTS_EXECUTE|PRINTER_ACCESS_USE)
-#define NO_PRIORITY 0
-#define MAX_PRIORITY 99
-#define MIN_PRIORITY 1
-#define DEF_PRIORITY 1
-#define PORT_TYPE_WRITE 1
-#define PORT_TYPE_READ 2
-#define PORT_TYPE_REDIRECTED 4
-#define PORT_TYPE_NET_ATTACHED 8
-#define SERVER_ACCESS_ADMINISTER 1
-#define SERVER_ACCESS_ENUMERATE 2
-#define SERVER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE)
-#define SERVER_READ (STANDARD_RIGHTS_READ|SERVER_ACCESS_ENUMERATE)
-#define SERVER_WRITE (STANDARD_RIGHTS_WRITE|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE)
-#define SERVER_EXECUTE (STANDARD_RIGHTS_EXECUTE|SERVER_ACCESS_ENUMERATE)
-#define PORT_STATUS_TYPE_ERROR 1
-#define PORT_STATUS_TYPE_WARNING 2
-#define PORT_STATUS_TYPE_INFO 3
-#define PORT_STATUS_OFFLINE 1
-#define PORT_STATUS_PAPER_JAM 2
-#define PORT_STATUS_PAPER_OUT 3
-#define PORT_STATUS_OUTPUT_BIN_FULL 4
-#define PORT_STATUS_PAPER_PROBLEM 5
-#define PORT_STATUS_NO_TONER 6
-#define PORT_STATUS_DOOR_OPEN 7
-#define PORT_STATUS_USER_INTERVENTION 8
-#define PORT_STATUS_OUT_OF_MEMORY 9
-#define PORT_STATUS_TONER_LOW 10
-#define PORT_STATUS_WARMING_UP 11
-#define PORT_STATUS_POWER_SAVE 12
-#ifndef RC_INVOKED
-typedef struct _ADDJOB_INFO_1A {
- LPSTR Path;
- DWORD JobId;
-} ADDJOB_INFO_1A,*PADDJOB_INFO_1A,*LPADDJOB_INFO_1A;
-typedef struct _ADDJOB_INFO_1W {
- LPWSTR Path;
- DWORD JobId;
-} ADDJOB_INFO_1W,*PADDJOB_INFO_1W,*LPADDJOB_INFO_1W;
-typedef struct _DATATYPES_INFO_1A{LPSTR pName;} DATATYPES_INFO_1A,*PDATATYPES_INFO_1A,*LPDATATYPES_INFO_1A;
-typedef struct _DATATYPES_INFO_1W{LPWSTR pName;} DATATYPES_INFO_1W,*PDATATYPES_INFO_1W,*LPDATATYPES_INFO_1W;
-typedef struct _JOB_INFO_1A {
- DWORD JobId;
- LPSTR pPrinterName;
- LPSTR pMachineName;
- LPSTR pUserName;
- LPSTR pDocument;
- LPSTR pDatatype;
- LPSTR pStatus;
- DWORD Status;
- DWORD Priority;
- DWORD Position;
- DWORD TotalPages;
- DWORD PagesPrinted;
- SYSTEMTIME Submitted;
-} JOB_INFO_1A,*PJOB_INFO_1A,*LPJOB_INFO_1A;
-typedef struct _JOB_INFO_1W {
- DWORD JobId;
- LPWSTR pPrinterName;
- LPWSTR pMachineName;
- LPWSTR pUserName;
- LPWSTR pDocument;
- LPWSTR pDatatype;
- LPWSTR pStatus;
- DWORD Status;
- DWORD Priority;
- DWORD Position;
- DWORD TotalPages;
- DWORD PagesPrinted;
- SYSTEMTIME Submitted;
-} JOB_INFO_1W,*PJOB_INFO_1W,*LPJOB_INFO_1W;
-typedef struct _JOB_INFO_2A {
- DWORD JobId;
- LPSTR pPrinterName;
- LPSTR pMachineName;
- LPSTR pUserName;
- LPSTR pDocument;
- LPSTR pNotifyName;
- LPSTR pDatatype;
- LPSTR pPrintProcessor;
- LPSTR pParameters;
- LPSTR pDriverName;
- LPDEVMODEA pDevMode;
- LPSTR pStatus;
- PSECURITY_DESCRIPTOR pSecurityDescriptor;
- DWORD Status;
- DWORD Priority;
- DWORD Position;
- DWORD StartTime;
- DWORD UntilTime;
- DWORD TotalPages;
- DWORD Size;
- SYSTEMTIME Submitted;
- DWORD Time;
- DWORD PagesPrinted;
-} JOB_INFO_2A,*PJOB_INFO_2A,*LPJOB_INFO_2A;
-typedef struct _JOB_INFO_2W {
- DWORD JobId;
- LPWSTR pPrinterName;
- LPWSTR pMachineName;
- LPWSTR pUserName;
- LPWSTR pDocument;
- LPWSTR pNotifyName;
- LPWSTR pDatatype;
- LPWSTR pPrintProcessor;
- LPWSTR pParameters;
- LPWSTR pDriverName;
- LPDEVMODEW pDevMode;
- LPWSTR pStatus;
- PSECURITY_DESCRIPTOR pSecurityDescriptor;
- DWORD Status;
- DWORD Priority;
- DWORD Position;
- DWORD StartTime;
- DWORD UntilTime;
- DWORD TotalPages;
- DWORD Size;
- SYSTEMTIME Submitted;
- DWORD Time;
- DWORD PagesPrinted;
-} JOB_INFO_2W,*PJOB_INFO_2W,*LPJOB_INFO_2W;
-typedef struct _JOB_INFO_3 {
- DWORD JobId;
- DWORD NextJobId;
- DWORD Reserved;
-} JOB_INFO_3,*PJOB_INFO_3,*LPJOB_INFO_3;
-typedef struct _DOC_INFO_1A {
- LPSTR pDocName;
- LPSTR pOutputFile;
- LPSTR pDatatype;
-} DOC_INFO_1A,*PDOC_INFO_1A,*LPDOC_INFO_1A;
-typedef struct _DOC_INFO_1W {
- LPWSTR pDocName;
- LPWSTR pOutputFile;
- LPWSTR pDatatype;
-} DOC_INFO_1W,*PDOC_INFO_1W,*LPDOC_INFO_1W;
-typedef struct _DOC_INFO_2A {
- LPSTR pDocName;
- LPSTR pOutputFile;
- LPSTR pDatatype;
- DWORD dwMode;
- DWORD JobId;
-} DOC_INFO_2A,*PDOC_INFO_2A,*LPDOC_INFO_2A;
-typedef struct _DOC_INFO_2W {
- LPWSTR pDocName;
- LPWSTR pOutputFile;
- LPWSTR pDatatype;
- DWORD dwMode;
- DWORD JobId;
-} DOC_INFO_2W,*PDOC_INFO_2W,*LPDOC_INFO_2W;
-typedef struct _DRIVER_INFO_1A {LPSTR pName;} DRIVER_INFO_1A,*PDRIVER_INFO_1A,*LPDRIVER_INFO_1A;
-typedef struct _DRIVER_INFO_1W {LPWSTR pName;} DRIVER_INFO_1W,*PDRIVER_INFO_1W,*LPDRIVER_INFO_1W;
-typedef struct _DRIVER_INFO_2A {
- DWORD cVersion;
- LPSTR pName;
- LPSTR pEnvironment;
- LPSTR pDriverPath;
- LPSTR pDataFile;
- LPSTR pConfigFile;
-} DRIVER_INFO_2A,*PDRIVER_INFO_2A,*LPDRIVER_INFO_2A;
-typedef struct _DRIVER_INFO_2W {
- DWORD cVersion;
- LPWSTR pName;
- LPWSTR pEnvironment;
- LPWSTR pDriverPath;
- LPWSTR pDataFile;
- LPWSTR pConfigFile;
-} DRIVER_INFO_2W,*PDRIVER_INFO_2W,*LPDRIVER_INFO_2W;
-typedef struct _DRIVER_INFO_3A {
- DWORD cVersion;
- LPSTR pName;
- LPSTR pEnvironment;
- LPSTR pDriverPath;
- LPSTR pDataFile;
- LPSTR pConfigFile;
- LPSTR pHelpFile;
- LPSTR pDependentFiles;
- LPSTR pMonitorName;
- LPSTR pDefaultDataType;
-} DRIVER_INFO_3A,*PDRIVER_INFO_3A,*LPDRIVER_INFO_3A;
-typedef struct _DRIVER_INFO_3W {
- DWORD cVersion;
- LPWSTR pName;
- LPWSTR pEnvironment;
- LPWSTR pDriverPath;
- LPWSTR pDataFile;
- LPWSTR pConfigFile;
- LPWSTR pHelpFile;
- LPWSTR pDependentFiles;
- LPWSTR pMonitorName;
- LPWSTR pDefaultDataType;
-} DRIVER_INFO_3W,*PDRIVER_INFO_3W,*LPDRIVER_INFO_3W;
-#if (_WIN32_WINNT >= 0x0500)
-typedef struct _DRIVER_INFO_4A {
- DWORD cVersion;
- LPSTR pName;
- LPSTR pEnvironment;
- LPSTR pDriverPath;
- LPSTR pDataFile;
- LPSTR pConfigFile;
- LPSTR pHelpFile;
- LPSTR pDependentFiles;
- LPSTR pMonitorName;
- LPSTR pDefaultDataType;
- LPSTR pszzPreviousNames;
-} DRIVER_INFO_4A,*PDRIVER_INFO_4A,*LPDRIVER_INFO_4A;
-typedef struct _DRIVER_INFO_4W {
- DWORD cVersion;
- LPWSTR pName;
- LPWSTR pEnvironment;
- LPWSTR pDriverPath;
- LPWSTR pDataFile;
- LPWSTR pConfigFile;
- LPWSTR pHelpFile;
- LPWSTR pDependentFiles;
- LPWSTR pMonitorName;
- LPWSTR pDefaultDataType;
- LPWSTR pszzPreviousNames;
-} DRIVER_INFO_4W,*PDRIVER_INFO_4W,*LPDRIVER_INFO_4W;
-typedef struct _DRIVER_INFO_5A {
- DWORD cVersion;
- LPSTR pName;
- LPSTR pEnvironment;
- LPSTR pDriverPath;
- LPSTR pDataFile;
- LPSTR pConfigFile;
- DWORD dwDriverAttributes;
- DWORD dwConfigVersion;
- DWORD dwDriverVersion;
-} DRIVER_INFO_5A,*PDRIVER_INFO_5A,*LPDRIVER_INFO_5A;
-typedef struct _DRIVER_INFO_5W {
- DWORD cVersion;
- LPWSTR pName;
- LPWSTR pEnvironment;
- LPWSTR pDriverPath;
- LPWSTR pDataFile;
- LPWSTR pConfigFile;
- DWORD dwDriverAttributes;
- DWORD dwConfigVersion;
- DWORD dwDriverVersion;
-} DRIVER_INFO_5W,*PDRIVER_INFO_5W,*LPDRIVER_INFO_5W;
-typedef struct _DRIVER_INFO_6A {
- DWORD cVersion;
- LPSTR pName;
- LPSTR pEnvironment;
- LPSTR pDriverPath;
- LPSTR pDataFile;
- LPSTR pConfigFile;
- LPSTR pHelpFile;
- LPSTR pDependentFiles;
- LPSTR pMonitorName;
- LPSTR pDefaultDataType;
- LPSTR pszzPreviousNames;
- FILETIME ftDriverDate;
- DWORDLONG dwlDriverVersion;
- LPSTR pszMfgName;
- LPSTR pszOEMUrl;
- LPSTR pszHardwareID;
- LPSTR pszProvider;
-} DRIVER_INFO_6A,*PDRIVER_INFO_6A,*LPDRIVER_INFO_6A;
-typedef struct _DRIVER_INFO_6W {
- DWORD cVersion;
- LPWSTR pName;
- LPWSTR pEnvironment;
- LPWSTR pDriverPath;
- LPWSTR pDataFile;
- LPWSTR pConfigFile;
- LPWSTR pHelpFile;
- LPWSTR pDependentFiles;
- LPWSTR pMonitorName;
- LPWSTR pDefaultDataType;
- LPWSTR pszzPreviousNames;
- FILETIME ftDriverDate;
- DWORDLONG dwlDriverVersion;
- LPWSTR pszMfgName;
- LPWSTR pszOEMUrl;
- LPWSTR pszHardwareID;
- LPWSTR pszProvider;
-} DRIVER_INFO_6W,*PDRIVER_INFO_6W,*LPDRIVER_INFO_6W;
-#endif
-typedef struct _MONITOR_INFO_1A{LPSTR pName;} MONITOR_INFO_1A,*PMONITOR_INFO_1A,*LPMONITOR_INFO_1A;
-typedef struct _MONITOR_INFO_1W{LPWSTR pName;} MONITOR_INFO_1W,*PMONITOR_INFO_1W,*LPMONITOR_INFO_1W;
-typedef struct _PORT_INFO_1A {LPSTR pName;} PORT_INFO_1A,*PPORT_INFO_1A,*LPPORT_INFO_1A;
-typedef struct _PORT_INFO_1W {LPWSTR pName;} PORT_INFO_1W,*PPORT_INFO_1W,*LPPORT_INFO_1W;
-typedef struct _MONITOR_INFO_2A{
- LPSTR pName;
- LPSTR pEnvironment;
- LPSTR pDLLName;
-} MONITOR_INFO_2A,*PMONITOR_INFO_2A,*LPMONITOR_INFO_2A;
-typedef struct _MONITOR_INFO_2W{
- LPWSTR pName;
- LPWSTR pEnvironment;
- LPWSTR pDLLName;
-} MONITOR_INFO_2W,*PMONITOR_INFO_2W,*LPMONITOR_INFO_2W;
-typedef struct _PORT_INFO_2A {
- LPSTR pPortName;
- LPSTR pMonitorName;
- LPSTR pDescription;
- DWORD fPortType;
- DWORD Reserved;
-} PORT_INFO_2A,*PPORT_INFO_2A,*LPPORT_INFO_2A;
-typedef struct _PORT_INFO_2W {
- LPWSTR pPortName;
- LPWSTR pMonitorName;
- LPWSTR pDescription;
- DWORD fPortType;
- DWORD Reserved;
-} PORT_INFO_2W,*PPORT_INFO_2W,*LPPORT_INFO_2W;
-typedef struct _PORT_INFO_3A {
- DWORD dwStatus;
- LPSTR pszStatus;
- DWORD dwSeverity;
-} PORT_INFO_3A,*PPORT_INFO_3A,*LPPORT_INFO_3A;
-typedef struct _PORT_INFO_3W {
- DWORD dwStatus;
- LPWSTR pszStatus;
- DWORD dwSeverity;
-} PORT_INFO_3W,*PPORT_INFO_3W,*LPPORT_INFO_3W;
-#if (_WIN32_WINNT >= 0x0500)
-typedef struct _PRINTER_ENUM_VALUESA {
- LPSTR pValueName;
- DWORD cbValueName;
- DWORD dwType;
- LPBYTE pData;
- DWORD cbData;
-} PRINTER_ENUM_VALUESA,*PPRINTER_ENUM_VALUESA,*LPRINTER_ENUM_VALUESA;
-typedef struct _PRINTER_ENUM_VALUESW {
- LPWSTR pValueName;
- DWORD cbValueName;
- DWORD dwType;
- LPBYTE pData;
- DWORD cbData;
-} PRINTER_ENUM_VALUESW,*PPRINTER_ENUM_VALUESW,*LPRINTER_ENUM_VALUESW;
-#endif
-typedef struct _PRINTER_INFO_1A {
- DWORD Flags;
- LPSTR pDescription;
- LPSTR pName;
- LPSTR pComment;
-} PRINTER_INFO_1A,*PPRINTER_INFO_1A,*LPPRINTER_INFO_1A;
-typedef struct _PRINTER_INFO_1W {
- DWORD Flags;
- LPWSTR pDescription;
- LPWSTR pName;
- LPWSTR pComment;
-} PRINTER_INFO_1W,*PPRINTER_INFO_1W,*LPPRINTER_INFO_1W;
-typedef struct _PRINTER_INFO_2A {
- LPSTR pServerName;
- LPSTR pPrinterName;
- LPSTR pShareName;
- LPSTR pPortName;
- LPSTR pDriverName;
- LPSTR pComment;
- LPSTR pLocation;
- LPDEVMODEA pDevMode;
- LPSTR pSepFile;
- LPSTR pPrintProcessor;
- LPSTR pDatatype;
- LPSTR pParameters;
- PSECURITY_DESCRIPTOR pSecurityDescriptor;
- DWORD Attributes;
- DWORD Priority;
- DWORD DefaultPriority;
- DWORD StartTime;
- DWORD UntilTime;
- DWORD Status;
- DWORD cJobs;
- DWORD AveragePPM;
-} PRINTER_INFO_2A,*PPRINTER_INFO_2A,*LPPRINTER_INFO_2A;
-typedef struct _PRINTER_INFO_2W {
- LPWSTR pServerName;
- LPWSTR pPrinterName;
- LPWSTR pShareName;
- LPWSTR pPortName;
- LPWSTR pDriverName;
- LPWSTR pComment;
- LPWSTR pLocation;
- LPDEVMODEW pDevMode;
- LPWSTR pSepFile;
- LPWSTR pPrintProcessor;
- LPWSTR pDatatype;
- LPWSTR pParameters;
- PSECURITY_DESCRIPTOR pSecurityDescriptor;
- DWORD Attributes;
- DWORD Priority;
- DWORD DefaultPriority;
- DWORD StartTime;
- DWORD UntilTime;
- DWORD Status;
- DWORD cJobs;
- DWORD AveragePPM;
-} PRINTER_INFO_2W,*PPRINTER_INFO_2W,*LPPRINTER_INFO_2W;
-typedef struct _PRINTER_INFO_3 {
- PSECURITY_DESCRIPTOR pSecurityDescriptor;
-} PRINTER_INFO_3,*PPRINTER_INFO_3,*LPPRINTER_INFO_3;
-typedef struct _PRINTER_INFO_4A {
- LPSTR pPrinterName;
- LPSTR pServerName;
- DWORD Attributes;
-} PRINTER_INFO_4A,*PPRINTER_INFO_4A,*LPPRINTER_INFO_4A;
-typedef struct _PRINTER_INFO_4W {
- LPWSTR pPrinterName;
- LPWSTR pServerName;
- DWORD Attributes;
-} PRINTER_INFO_4W,*PPRINTER_INFO_4W,*LPPRINTER_INFO_4W;
-typedef struct _PRINTER_INFO_5A {
- LPSTR pPrinterName;
- LPSTR pPortName;
- DWORD Attributes;
- DWORD DeviceNotSelectedTimeout;
- DWORD TransmissionRetryTimeout;
-} PRINTER_INFO_5A,*PPRINTER_INFO_5A,*LPPRINTER_INFO_5A;
-typedef struct _PRINTER_INFO_5W {
- LPWSTR pPrinterName;
- LPWSTR pPortName;
- DWORD Attributes;
- DWORD DeviceNotSelectedTimeout;
- DWORD TransmissionRetryTimeout;
-} PRINTER_INFO_5W,*PPRINTER_INFO_5W,*LPPRINTER_INFO_5W;
-typedef struct _PRINTER_INFO_6 {
- DWORD dwStatus;
-} PRINTER_INFO_6,*PPRINTER_INFO_6,*LPPRINTER_INFO_6;
-#if (_WIN32_WINNT >= 0x0500)
-typedef struct _PRINTER_INFO_7A {
- LPWSTR pszObjectGUID;
- DWORD dwAction;
-} PRINTER_INFO_7A,*PPRINTER_INFO_7A,*LPPRINTER_INFO_7A;
-typedef struct _PRINTER_INFO_7W {
- LPWSTR pszObjectGUID;
- DWORD dwAction;
-} PRINTER_INFO_7W,*PPRINTER_INFO_7W,*LPPRINTER_INFO_7W;
-typedef struct _PRINTER_INFO_8 {
- LPDEVMODE pDevMode;
-} PRINTER_INFO_8,*PPRINTER_INFO_8,*LPPRINTER_INFO_8;
-typedef struct _PRINTER_INFO_9 {
- LPDEVMODE pDevMode;
-} PRINTER_INFO_9,*PPRINTER_INFO_9,*LPPRINTER_INFO_9;
-#endif
-typedef struct _PRINTPROCESSOR_INFO_1A {LPSTR pName;} PRINTPROCESSOR_INFO_1A,*PPRINTPROCESSOR_INFO_1A,*LPPRINTPROCESSOR_INFO_1A;
-typedef struct _PRINTPROCESSOR_INFO_1W {LPWSTR pName;} PRINTPROCESSOR_INFO_1W,*PPRINTPROCESSOR_INFO_1W,*LPPRINTPROCESSOR_INFO_1W;
-typedef struct _PRINTER_NOTIFY_INFO_DATA {
- WORD Type;
- WORD Field;
- DWORD Reserved;
- DWORD Id;
- union {
- DWORD adwData[2];
- struct {
- DWORD cbBuf;
- PVOID pBuf;
- } Data;
- } NotifyData;
-} PRINTER_NOTIFY_INFO_DATA,*PPRINTER_NOTIFY_INFO_DATA,*LPPRINTER_NOTIFY_INFO_DATA;
-typedef struct _PRINTER_NOTIFY_INFO {
- DWORD Version;
- DWORD Flags;
- DWORD Count;
- PRINTER_NOTIFY_INFO_DATA aData[1];
-} PRINTER_NOTIFY_INFO,*PPRINTER_NOTIFY_INFO,*LPPRINTER_NOTIFY_INFO;
-typedef struct _FORM_INFO_1A {
- DWORD Flags;
- LPSTR pName;
- SIZEL Size;
- RECTL ImageableArea;
-} FORM_INFO_1A,*PFORM_INFO_1A,*LPFORM_INFO_1A;
-typedef struct _FORM_INFO_1W {
- DWORD Flags;
- LPWSTR pName;
- SIZEL Size;
- RECTL ImageableArea;
-} FORM_INFO_1W,*PFORM_INFO_1W,*LPFORM_INFO_1W;
-typedef struct _PRINTER_DEFAULTSA {
- LPSTR pDatatype;
- LPDEVMODE pDevMode;
- ACCESS_MASK DesiredAccess;
-} PRINTER_DEFAULTSA,*PPRINTER_DEFAULTSA,*LPPRINTER_DEFAULTSA;
-typedef struct _PRINTER_DEFAULTSW {
- LPWSTR pDatatype;
- LPDEVMODE pDevMode;
- ACCESS_MASK DesiredAccess;
-} PRINTER_DEFAULTSW,*PPRINTER_DEFAULTSW,*LPPRINTER_DEFAULTSW;
-#if (_WIN32_WINNT >= 0x0500)
-typedef struct _PRINTPROCESSOR_CAPS_1 {
- DWORD dwLevel;
- DWORD dwNupOptions;
- DWORD dwPageOrderFlags;
- DWORD dwNumberOfCopies;
-} PRINTPROCESSOR_CAPS_1,*PPRINTPROCESSOR_CAPS_1,*LPPRINTPROCESSOR_CAPS_1;
-#endif
-typedef struct _PROVIDOR_INFO_1A {
- LPSTR pName;
- LPSTR pEnvironment;
- LPSTR pDLLName;
-} PROVIDOR_INFO_1A,*PPROVIDOR_INFO_1A,*LPPROVIDOR_INFO_1A;
-typedef struct _PROVIDOR_INFO_1W {
- LPWSTR pName;
- LPWSTR pEnvironment;
- LPWSTR pDLLName;
-} PROVIDOR_INFO_1W,*PPROVIDOR_INFO_1W,*LPPROVIDOR_INFO_1W;
-typedef struct _PROVIDOR_INFO_2A {
- LPSTR pOrder;
-} PROVIDOR_INFO_2A,*PPROVIDOR_INFO_2A,*LPROVIDOR_INFO_2A;
-typedef struct _PROVIDOR_INFO_2W {
- LPWSTR pOrder;
-} PROVIDOR_INFO_2W,*PPROVIDOR_INFO_2W,*LPROVIDOR_INFO_2W;
-
-BOOL WINAPI AbortPrinter(HANDLE);
-BOOL WINAPI AddFormA(HANDLE,DWORD,PBYTE);
-BOOL WINAPI AddFormW(HANDLE,DWORD,PBYTE);
-BOOL WINAPI AddJobA(HANDLE,DWORD,PBYTE,DWORD,PDWORD);
-BOOL WINAPI AddJobW(HANDLE,DWORD,PBYTE,DWORD,PDWORD);
-BOOL WINAPI AddMonitorA(LPSTR,DWORD,PBYTE);
-BOOL WINAPI AddMonitorW(LPWSTR,DWORD,PBYTE);
-BOOL WINAPI AddPortA(LPSTR,HWND,LPSTR);
-BOOL WINAPI AddPortW(LPWSTR,HWND,LPWSTR);
-HANDLE WINAPI AddPrinterA(LPSTR,DWORD,PBYTE);
-HANDLE WINAPI AddPrinterW(LPWSTR,DWORD,PBYTE);
-BOOL WINAPI AddPrinterConnectionA(LPSTR);
-BOOL WINAPI AddPrinterConnectionW(LPWSTR);
-BOOL WINAPI AddPrinterDriverA(LPSTR,DWORD,PBYTE);
-BOOL WINAPI AddPrinterDriverW(LPWSTR,DWORD,PBYTE);
-BOOL WINAPI AddPrintProcessorA(LPSTR,LPSTR,LPSTR,LPSTR);
-BOOL WINAPI AddPrintProcessorW(LPWSTR,LPWSTR,LPWSTR,LPWSTR);
-BOOL WINAPI AddPrintProvidorA(LPSTR,DWORD,PBYTE);
-BOOL WINAPI AddPrintProvidorW(LPWSTR,DWORD,PBYTE);
-LONG WINAPI AdvancedDocumentPropertiesA(HWND,HANDLE,LPSTR,PDEVMODE,PDEVMODEA);
-LONG WINAPI AdvancedDocumentPropertiesW(HWND,HANDLE,LPWSTR,PDEVMODE,PDEVMODEW);
-BOOL WINAPI ClosePrinter(HANDLE);
-BOOL WINAPI ConfigurePortA(LPSTR,HWND,LPSTR);
-BOOL WINAPI ConfigurePortW(LPWSTR,HWND,LPWSTR);
-HANDLE WINAPI ConnectToPrinterDlg(HWND,DWORD);
-BOOL WINAPI DeleteFormA(HANDLE,LPSTR);
-BOOL WINAPI DeleteFormW(HANDLE,LPWSTR);
-BOOL WINAPI DeleteMonitorA(LPSTR,LPSTR,LPSTR);
-BOOL WINAPI DeleteMonitorW(LPWSTR,LPWSTR,LPWSTR);
-BOOL WINAPI DeletePortA(LPSTR,HWND,LPSTR);
-BOOL WINAPI DeletePortW(LPWSTR,HWND,LPWSTR);
-BOOL WINAPI DeletePrinter(HANDLE);
-BOOL WINAPI DeletePrinterConnectionA(LPSTR);
-BOOL WINAPI DeletePrinterConnectionW(LPWSTR);
-DWORD WINAPI DeletePrinterDataA(HANDLE,LPSTR);
-DWORD WINAPI DeletePrinterDataW(HANDLE,LPWSTR);
-BOOL WINAPI DeletePrinterDriverA(LPSTR,LPSTR,LPSTR);
-BOOL WINAPI DeletePrinterDriverW(LPWSTR,LPWSTR,LPWSTR);
-BOOL WINAPI DeletePrintProcessorA(LPSTR,LPSTR,LPSTR);
-BOOL WINAPI DeletePrintProcessorW(LPWSTR,LPWSTR,LPWSTR);
-BOOL WINAPI DeletePrintProvidorA(LPSTR,LPSTR,LPSTR);
-BOOL WINAPI DeletePrintProvidorW(LPWSTR,LPWSTR,LPWSTR);
-LONG WINAPI DocumentPropertiesA(HWND,HANDLE,LPSTR,PDEVMODEA,PDEVMODEA,DWORD);
-LONG WINAPI DocumentPropertiesW(HWND,HANDLE,LPWSTR,PDEVMODEW,PDEVMODEW,DWORD);
-BOOL WINAPI EndDocPrinter(HANDLE);
-BOOL WINAPI EndPagePrinter(HANDLE);
-BOOL WINAPI EnumFormsA(HANDLE,DWORD,PBYTE,DWORD,PDWORD,PDWORD);
-BOOL WINAPI EnumFormsW(HANDLE,DWORD,PBYTE,DWORD,PDWORD,PDWORD);
-BOOL WINAPI EnumJobsA(HANDLE,DWORD,DWORD,DWORD,PBYTE,DWORD,PDWORD,PDWORD);
-BOOL WINAPI EnumJobsW(HANDLE,DWORD,DWORD,DWORD,PBYTE,DWORD,PDWORD,PDWORD);
-BOOL WINAPI EnumMonitorsA(LPSTR,DWORD,PBYTE,DWORD,PDWORD,PDWORD);
-BOOL WINAPI EnumMonitorsW(LPWSTR,DWORD,PBYTE,DWORD,PDWORD,PDWORD);
-BOOL WINAPI EnumPortsA(LPSTR,DWORD,PBYTE,DWORD,PDWORD,PDWORD);
-BOOL WINAPI EnumPortsW(LPWSTR,DWORD,PBYTE,DWORD,PDWORD,PDWORD);
-DWORD WINAPI EnumPrinterDataA(HANDLE,DWORD,LPSTR,DWORD,PDWORD,PDWORD,PBYTE,DWORD,PDWORD);
-DWORD WINAPI EnumPrinterDataW(HANDLE,DWORD,LPWSTR,DWORD,PDWORD,PDWORD,PBYTE,DWORD,PDWORD);
-BOOL WINAPI EnumPrinterDriversA(LPSTR,LPSTR,DWORD,PBYTE,DWORD,PDWORD,PDWORD);
-BOOL WINAPI EnumPrinterDriversW(LPWSTR,LPWSTR,DWORD,PBYTE,DWORD,PDWORD,PDWORD);
-BOOL WINAPI EnumPrintersA(DWORD,LPSTR,DWORD,PBYTE,DWORD,PDWORD,PDWORD);
-BOOL WINAPI EnumPrintersW(DWORD,LPWSTR,DWORD,PBYTE,DWORD,PDWORD,PDWORD);
-BOOL WINAPI EnumPrintProcessorDatatypesA(LPSTR,LPSTR,DWORD,PBYTE,DWORD,PDWORD,PDWORD);
-BOOL WINAPI EnumPrintProcessorDatatypesW(LPWSTR,LPWSTR,DWORD,PBYTE,DWORD,PDWORD,PDWORD);
-BOOL WINAPI EnumPrintProcessorsA(LPSTR,LPSTR,DWORD,PBYTE,DWORD,PDWORD,PDWORD);
-BOOL WINAPI EnumPrintProcessorsW(LPWSTR,LPWSTR,DWORD,PBYTE,DWORD,PDWORD,PDWORD);
-BOOL WINAPI FindClosePrinterChangeNotification(HANDLE);
-HANDLE WINAPI FindFirstPrinterChangeNotification(HANDLE,DWORD,DWORD,PVOID);
-HANDLE WINAPI FindNextPrinterChangeNotification(HANDLE,PDWORD,PVOID,PVOID*);
-BOOL WINAPI FreePrinterNotifyInfo(PPRINTER_NOTIFY_INFO);
-#if _WIN32_WINNT >= 0x0500
-BOOL WINAPI GetDefaultPrinterA(LPSTR,LPDWORD);
-BOOL WINAPI GetDefaultPrinterW(LPWSTR,LPDWORD);
-#endif
-BOOL WINAPI GetFormA(HANDLE,LPSTR,DWORD,PBYTE,DWORD,PDWORD);
-BOOL WINAPI GetFormW(HANDLE,LPWSTR,DWORD,PBYTE,DWORD,PDWORD);
-BOOL WINAPI GetJobA(HANDLE,DWORD,DWORD,PBYTE,DWORD,PDWORD);
-BOOL WINAPI GetJobW(HANDLE,DWORD,DWORD,PBYTE,DWORD,PDWORD);
-BOOL WINAPI GetPrinterA(HANDLE,DWORD,PBYTE,DWORD,PDWORD);
-BOOL WINAPI GetPrinterW(HANDLE,DWORD,PBYTE,DWORD,PDWORD);
-DWORD WINAPI GetPrinterDataA(HANDLE,LPSTR,PDWORD,PBYTE,DWORD,PDWORD);
-DWORD WINAPI GetPrinterDataW(HANDLE,LPWSTR,PDWORD,PBYTE,DWORD,PDWORD);
-DWORD WINAPI GetPrinterDriverA(HANDLE,LPSTR,DWORD,PBYTE,DWORD,PDWORD);
-DWORD WINAPI GetPrinterDriverW(HANDLE,LPWSTR,DWORD,PBYTE,DWORD,PDWORD);
-DWORD WINAPI GetPrinterDriverDirectoryA(LPSTR,LPSTR,DWORD,PBYTE,DWORD,PDWORD);
-DWORD WINAPI GetPrinterDriverDirectoryW(LPWSTR,LPWSTR,DWORD,PBYTE,DWORD,PDWORD);
-DWORD WINAPI GetPrintProcessorDirectoryA(LPSTR,LPSTR,DWORD,PBYTE,DWORD,PDWORD);
-DWORD WINAPI GetPrintProcessorDirectoryW(LPWSTR,LPWSTR,DWORD,PBYTE,DWORD,PDWORD);
-BOOL WINAPI OpenPrinterA(LPSTR,PHANDLE,LPPRINTER_DEFAULTSA);
-BOOL WINAPI OpenPrinterW(LPWSTR,PHANDLE,LPPRINTER_DEFAULTSW);
-DWORD WINAPI PrinterMessageBoxA(HANDLE,DWORD,HWND,LPSTR,LPSTR,DWORD);
-DWORD WINAPI PrinterMessageBoxW(HANDLE,DWORD,HWND,LPWSTR,LPWSTR,DWORD);
-BOOL WINAPI PrinterProperties(HWND,HANDLE);
-BOOL WINAPI ReadPrinter(HANDLE,PVOID,DWORD,PDWORD);
-BOOL WINAPI ResetPrinterA(HANDLE,LPPRINTER_DEFAULTSA);
-BOOL WINAPI ResetPrinterW(HANDLE,LPPRINTER_DEFAULTSW);
-BOOL WINAPI ScheduleJob(HANDLE,DWORD);
-BOOL WINAPI SetFormA(HANDLE,LPSTR,DWORD,PBYTE);
-BOOL WINAPI SetFormW(HANDLE,LPWSTR,DWORD,PBYTE);
-BOOL WINAPI SetJobA(HANDLE,DWORD,DWORD,PBYTE,DWORD);
-BOOL WINAPI SetJobW(HANDLE,DWORD,DWORD,PBYTE,DWORD);
-BOOL WINAPI SetPrinterA(HANDLE,DWORD,PBYTE,DWORD);
-BOOL WINAPI SetPrinterW(HANDLE,DWORD,PBYTE,DWORD);
-BOOL WINAPI SetPrinterDataA(HANDLE,LPSTR,DWORD,PBYTE,DWORD);
-BOOL WINAPI SetPrinterDataW(HANDLE,LPWSTR,DWORD,PBYTE,DWORD);
-DWORD WINAPI StartDocPrinterA(HANDLE,DWORD,PBYTE);
-DWORD WINAPI StartDocPrinterW(HANDLE,DWORD,PBYTE);
-BOOL WINAPI StartPagePrinter(HANDLE);
-DWORD WINAPI WaitForPrinterChange(HANDLE,DWORD);
-BOOL WINAPI WritePrinter(HANDLE,PVOID,DWORD,PDWORD);
-
-#ifdef UNICODE
-typedef JOB_INFO_1W JOB_INFO_1,*PJOB_INFO_1,*LPJOB_INFO_1;
-typedef JOB_INFO_2W JOB_INFO_2,*PJOB_INFO_2,*LPJOB_INFO_2;
-typedef ADDJOB_INFO_1W ADDJOB_INFO_1,*PADDJOB_INFO_1,*LPADDJOB_INFO_1;
-typedef DATATYPES_INFO_1W DATATYPES_INFO_1,*PDATATYPES_INFO_1,*LPDATATYPES_INFO_1;
-typedef MONITOR_INFO_1W MONITOR_INFO_1,*PMONITOR_INFO_1,*LPMONITOR_INFO_1;
-typedef MONITOR_INFO_2W MONITOR_INFO_2,*PMONITOR_INFO_2,*LPMONITOR_INFO_2;
-typedef DOC_INFO_1W DOC_INFO_1,*PDOC_INFO_1,*LPDOC_INFO_1;
-typedef DOC_INFO_2W DOC_INFO_2,*PDOC_INFO_2,*LPDOC_INFO_2;
-typedef PORT_INFO_1W PORT_INFO_1,*PPORT_INFO_1,*LPPORT_INFO_1;
-typedef PORT_INFO_2W PORT_INFO_2,*PPORT_INFO_2,*LPPORT_INFO_2;
-typedef PORT_INFO_3W PORT_INFO_3,*PPORT_INFO_3,*LPPORT_INFO_3;
-typedef DRIVER_INFO_1W DRIVER_INFO_1,*PDRIVER_INFO_1,*LPDRIVER_INFO_1;
-typedef DRIVER_INFO_2W DRIVER_INFO_2,*PDRIVER_INFO_2,*LPDRIVER_INFO_2;
-typedef DRIVER_INFO_3W DRIVER_INFO_3,*PDRIVER_INFO_3,*LPDRIVER_INFO_3;
-#if (_WIN32_WINNT >= 0x0500)
-typedef DRIVER_INFO_4W DRIVER_INFO_4,*PDRIVER_INFO_4,*LPDRIVER_INFO_4;
-typedef DRIVER_INFO_5W DRIVER_INFO_5,*PDRIVER_INFO_5,*LPDRIVER_INFO_5;
-typedef DRIVER_INFO_6W DRIVER_INFO_6,*PDRIVER_INFO_6,*LPDRIVER_INFO_6;
-typedef PRINTER_ENUM_VALUESW PRINTER_ENUM_VALUES,*PPRINTER_ENUM_VALUES,*LPRINTER_ENUM_VALUES;
-#endif
-typedef PRINTER_INFO_1W PRINTER_INFO_1,*PPRINTER_INFO_1,*LPPRINTER_INFO_1;
-typedef PRINTER_INFO_2W PRINTER_INFO_2,*PPRINTER_INFO_2,*LPPRINTER_INFO_2;
-typedef PRINTER_INFO_4W PRINTER_INFO_4,*PPRINTER_INFO_4,*LPPRINTER_INFO_4;
-typedef PRINTER_INFO_5W PRINTER_INFO_5,*PPRINTER_INFO_5,*LPPRINTER_INFO_5;
-#if (_WIN32_WINNT >= 0x0500)
-typedef PRINTER_INFO_7W PRINTER_INFO_7,*PPRINTER_INFO_7,*LPPRINTER_INFO_7;
-#endif
-typedef PRINTPROCESSOR_INFO_1W PRINTPROCESSOR_INFO_1,*PPRINTPROCESSOR_INFO_1,*LPPRINTPROCESSOR_INFO_1;
-typedef FORM_INFO_1W FORM_INFO_1,*PFORM_INFO_1,*LPFORM_INFO_1;
-typedef PRINTER_DEFAULTSW PRINTER_DEFAULTS,*PPRINTER_DEFAULTS,*LPPRINTER_DEFAULTS;
-typedef PROVIDOR_INFO_1W PROVIDOR_INFO_1,*PPROVIDOR_INFO_1,*LPROVIDOR_INFO_1;
-typedef PROVIDOR_INFO_2W PROVIDOR_INFO_2,*PPROVIDOR_INFO_2,*LPROVIDOR_INFO_2;
-#define AddForm AddFormW
-#define AddJob AddJobW
-#define AddMonitor AddMonitorW
-#define AddPort AddPortW
-#define AddPrinter AddPrinterW
-#define AddPrinterConnection AddPrinterConnectionW
-#define AddPrinterDriver AddPrinterDriverW
-#define AddPrintProcessor AddPrintProcessorW
-#define AddPrintProvidor AddPrintProvidorW
-#define AdvancedDocumentProperties AdvancedDocumentPropertiesW
-#define ConfigurePort ConfigurePortW
-#define DeleteForm DeleteFormW
-#define DeleteMonitor DeleteMonitorW
-#define DeletePort DeletePortW
-#define DeletePrinterConnection DeletePrinterConnectionW
-#define DeletePrinterData DeletePrinterDataW
-#define DeletePrinterDriver DeletePrinterDriverW
-#define DeletePrintProcessor DeletePrinterProcessorW
-#define DeletePrintProvidor DeletePrinterProvidorW
-#define DocumentProperties DocumentPropertiesW
-#define EnumForms EnumFormsW
-#define EnumJobs EnumJobsW
-#define EnumMonitors EnumMonitorsW
-#define EnumPorts EnumPortsW
-#define EnumPrinterData EnumPrinterDataW
-#define EnumPrinterDrivers EnumPrinterDriversW
-#define EnumPrinters EnumPrintersW
-#define EnumPrintProcessorDatatypes EnumPrintProcessorDatatypesW
-#define EnumPrintProcessors EnumPrintProcessorsW
-#define GetDefaultPrinter GetDefaultPrinterW
-#define GetForm GetFormW
-#define GetJob GetJobW
-#define GetPrinter GetPrinterW
-#define GetPrinterData GetPrinterDataW
-#define GetPrinterDriver GetPrinterDriverW
-#define GetPrinterDriverDirectory GetPrinterDriverDirectoryW
-#define GetPrintProcessorDirectory GetPrintProcessorDirectoryW
-#define OpenPrinter OpenPrinterW
-#define PrinterMessageBox PrinterMessageBoxW
-#define ResetPrinter ResetPrinterW
-#define SetForm SetFormW
-#define SetJob SetJobW
-#define SetPrinter SetPrinterW
-#define SetPrinterData SetPrinterDataW
-#define StartDocPrinter StartDocPrinterW
-#else
-typedef JOB_INFO_1A JOB_INFO_1,*PJOB_INFO_1,*LPJOB_INFO_1;
-typedef JOB_INFO_2A JOB_INFO_2,*PJOB_INFO_2,*LPJOB_INFO_2;
-typedef ADDJOB_INFO_1A ADDJOB_INFO_1,*PADDJOB_INFO_1,*LPADDJOB_INFO_1;
-typedef DATATYPES_INFO_1A DATATYPES_INFO_1,*PDATATYPES_INFO_1,*LPDATATYPES_INFO_1;
-typedef MONITOR_INFO_1A MONITOR_INFO_1,*PMONITOR_INFO_1,*LPMONITOR_INFO_1;
-typedef MONITOR_INFO_2A MONITOR_INFO_2,*PMONITOR_INFO_2,*LPMONITOR_INFO_2;
-typedef DOC_INFO_1A DOC_INFO_1,*PDOC_INFO_1,*LPDOC_INFO_1;
-typedef DOC_INFO_2A DOC_INFO_2,*PDOC_INFO_2,*LPDOC_INFO_2;
-typedef PORT_INFO_1A PORT_INFO_1,*PPORT_INFO_1,*LPPORT_INFO_1;
-typedef PORT_INFO_2A PORT_INFO_2,*PPORT_INFO_2,*LPPORT_INFO_2;
-typedef PORT_INFO_3A PORT_INFO_3,*PPORT_INFO_3,*LPPORT_INFO_3;
-typedef DRIVER_INFO_1A DRIVER_INFO_1,*PDRIVER_INFO_1,*LPDRIVER_INFO_1;
-typedef DRIVER_INFO_2A DRIVER_INFO_2,*PDRIVER_INFO_2,*LPDRIVER_INFO_2;
-typedef DRIVER_INFO_3A DRIVER_INFO_3,*PDRIVER_INFO_3,*LPDRIVER_INFO_3;
-#if (_WIN32_WINNT >= 0x0500)
-typedef DRIVER_INFO_4A DRIVER_INFO_4,*PDRIVER_INFO_4,*LPDRIVER_INFO_4;
-typedef DRIVER_INFO_5A DRIVER_INFO_5,*PDRIVER_INFO_5,*LPDRIVER_INFO_5;
-typedef DRIVER_INFO_6A DRIVER_INFO_6,*PDRIVER_INFO_6,*LPDRIVER_INFO_6;
-typedef PRINTER_ENUM_VALUESA PRINTER_ENUM_VALUES,*PPRINTER_ENUM_VALUES,*LPRINTER_ENUM_VALUES;
-#endif
-typedef PRINTER_INFO_1A PRINTER_INFO_1,*PPRINTER_INFO_1,*LPPRINTER_INFO_1;
-typedef PRINTER_INFO_2A PRINTER_INFO_2,*PPRINTER_INFO_2,*LPPRINTER_INFO_2;
-typedef PRINTER_INFO_4A PRINTER_INFO_4,*PPRINTER_INFO_4,*LPPRINTER_INFO_4;
-typedef PRINTER_INFO_5A PRINTER_INFO_5,*PPRINTER_INFO_5,*LPPRINTER_INFO_5;
-#if (_WIN32_WINNT >= 0x0500)
-typedef PRINTER_INFO_7A PRINTER_INFO_7,*PPRINTER_INFO_7,*LPPRINTER_INFO_7;
-#endif
-typedef PRINTPROCESSOR_INFO_1A PRINTPROCESSOR_INFO_1,*PPRINTPROCESSOR_INFO_1,*LPPRINTPROCESSOR_INFO_1;
-typedef FORM_INFO_1A FORM_INFO_1,*PFORM_INFO_1,*LPFORM_INFO_1;
-typedef PRINTER_DEFAULTSA PRINTER_DEFAULTS,*PPRINTER_DEFAULTS,*LPPRINTER_DEFAULTS;
-typedef PROVIDOR_INFO_1A PROVIDOR_INFO_1,*PPROVIDOR_INFO_1,*LPROVIDOR_INFO_1;
-typedef PROVIDOR_INFO_2A PROVIDOR_INFO_2,*PPROVIDOR_INFO_2,*LPROVIDOR_INFO_2;
-#define AddForm AddFormA
-#define AddJob AddJobA
-#define AddMonitor AddMonitorA
-#define AddPort AddPortA
-#define AddPrinter AddPrinterA
-#define AddPrinterConnection AddPrinterConnectionA
-#define AddPrinterDriver AddPrinterDriverA
-#define AddPrintProcessor AddPrintProcessorA
-#define AddPrintProvidor AddPrintProvidorA
-#define AdvancedDocumentProperties AdvancedDocumentPropertiesA
-#define ConfigurePort ConfigurePortA
-#define DeleteForm DeleteFormA
-#define DeleteMonitor DeleteMonitorA
-#define DeletePort DeletePortA
-#define DeletePrinterConnection DeletePrinterConnectionA
-#define DeletePrinterData DeletePrinterDataA
-#define DeletePrinterDriver DeletePrinterDriverA
-#define DeletePrintProcessor DeletePrinterProcessorA
-#define DeletePrintProvidor DeletePrinterProvidorA
-#define DocumentProperties DocumentPropertiesA
-#define EnumForms EnumFormsA
-#define EnumJobs EnumJobsA
-#define EnumMonitors EnumMonitorsA
-#define EnumPorts EnumPortsA
-#define EnumPrinterData EnumPrinterDataA
-#define EnumPrinterDrivers EnumPrinterDriversA
-#define EnumPrinters EnumPrintersA
-#define EnumPrintProcessorDatatypes EnumPrintProcessorDatatypesA
-#define EnumPrintProcessors EnumPrintProcessorsA
-#define GetDefaultPrinter GetDefaultPrinterA
-#define GetForm GetFormA
-#define GetJob GetJobA
-#define GetPrinter GetPrinterA
-#define GetPrinterData GetPrinterDataA
-#define GetPrinterDriver GetPrinterDriverA
-#define GetPrinterDriverDirectory GetPrinterDriverDirectoryA
-#define GetPrintProcessorDirectory GetPrintProcessorDirectoryA
-#define OpenPrinter OpenPrinterA
-#define PrinterMessageBox PrinterMessageBoxA
-#define ResetPrinter ResetPrinterA
-#define SetForm SetFormA
-#define SetJob SetJobA
-#define SetPrinter SetPrinterA
-#define SetPrinterData SetPrinterDataA
-#define StartDocPrinter StartDocPrinterA
-#endif
-#endif /* RC_INVOKED */
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/winsvc.h b/winsup/w32api/include/winsvc.h
deleted file mode 100644
index a51440f..0000000
--- a/winsup/w32api/include/winsvc.h
+++ /dev/null
@@ -1,313 +0,0 @@
-#ifndef _WINSVC_H
-#define _WINSVC_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifndef WINADVAPI
-#define WINADVAPI
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define SERVICES_ACTIVE_DATABASEA "ServicesActive"
-#define SERVICES_ACTIVE_DATABASEW L"ServicesActive"
-#define SERVICES_FAILED_DATABASEA "ServicesFailed"
-#define SERVICES_FAILED_DATABASEW L"ServicesFailed"
-#define SC_GROUP_IDENTIFIERA '+'
-#define SC_GROUP_IDENTIFIERW L'+'
-#define SC_MANAGER_ALL_ACCESS 0xf003f
-#define SC_MANAGER_CONNECT 1
-#define SC_MANAGER_CREATE_SERVICE 2
-#define SC_MANAGER_ENUMERATE_SERVICE 4
-#define SC_MANAGER_LOCK 8
-#define SC_MANAGER_QUERY_LOCK_STATUS 16
-#define SC_MANAGER_MODIFY_BOOT_CONFIG 32
-#define SERVICE_NO_CHANGE 0xffffffff
-#define SERVICE_STOPPED 1
-#define SERVICE_START_PENDING 2
-#define SERVICE_STOP_PENDING 3
-#define SERVICE_RUNNING 4
-#define SERVICE_CONTINUE_PENDING 5
-#define SERVICE_PAUSE_PENDING 6
-#define SERVICE_PAUSED 7
-#define SERVICE_ACCEPT_STOP 1
-#define SERVICE_ACCEPT_PAUSE_CONTINUE 2
-#define SERVICE_ACCEPT_SHUTDOWN 4
-#define SERVICE_ACCEPT_PARAMCHANGE 8
-#define SERVICE_ACCEPT_NETBINDCHANGE 16
-#define SERVICE_ACCEPT_HARDWAREPROFILECHANGE 32
-#define SERVICE_ACCEPT_POWEREVENT 64
-#define SERVICE_ACCEPT_SESSIONCHANGE 128
-#define SERVICE_CONTROL_STOP 1
-#define SERVICE_CONTROL_PAUSE 2
-#define SERVICE_CONTROL_CONTINUE 3
-#define SERVICE_CONTROL_INTERROGATE 4
-#define SERVICE_CONTROL_SHUTDOWN 5
-#define SERVICE_CONTROL_PARAMCHANGE 6
-#define SERVICE_CONTROL_NETBINDADD 7
-#define SERVICE_CONTROL_NETBINDREMOVE 8
-#define SERVICE_CONTROL_NETBINDENABLE 9
-#define SERVICE_CONTROL_NETBINDDISABLE 10
-#define SERVICE_CONTROL_DEVICEEVENT 11
-#define SERVICE_CONTROL_HARDWAREPROFILECHANGE 12
-#define SERVICE_CONTROL_POWEREVENT 13
-#define SERVICE_CONTROL_SESSIONCHANGE 14
-#define SERVICE_ACTIVE 1
-#define SERVICE_INACTIVE 2
-#define SERVICE_STATE_ALL 3
-#define SERVICE_QUERY_CONFIG 1
-#define SERVICE_CHANGE_CONFIG 2
-#define SERVICE_QUERY_STATUS 4
-#define SERVICE_ENUMERATE_DEPENDENTS 8
-#define SERVICE_START 16
-#define SERVICE_STOP 32
-#define SERVICE_PAUSE_CONTINUE 64
-#define SERVICE_INTERROGATE 128
-#define SERVICE_USER_DEFINED_CONTROL 256
-#define SERVICE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SERVICE_QUERY_CONFIG|SERVICE_CHANGE_CONFIG|SERVICE_QUERY_STATUS|SERVICE_ENUMERATE_DEPENDENTS|SERVICE_START|SERVICE_STOP|SERVICE_PAUSE_CONTINUE|SERVICE_INTERROGATE|SERVICE_USER_DEFINED_CONTROL)
-#define SERVICE_RUNS_IN_SYSTEM_PROCESS 1
-#define SERVICE_CONFIG_DESCRIPTION 1
-#define SERVICE_CONFIG_FAILURE_ACTIONS 2
-
-typedef struct _SERVICE_STATUS {
- DWORD dwServiceType;
- DWORD dwCurrentState;
- DWORD dwControlsAccepted;
- DWORD dwWin32ExitCode;
- DWORD dwServiceSpecificExitCode;
- DWORD dwCheckPoint;
- DWORD dwWaitHint;
-} SERVICE_STATUS,*LPSERVICE_STATUS;
-typedef struct _SERVICE_STATUS_PROCESS {
- DWORD dwServiceType;
- DWORD dwCurrentState;
- DWORD dwControlsAccepted;
- DWORD dwWin32ExitCode;
- DWORD dwServiceSpecificExitCode;
- DWORD dwCheckPoint;
- DWORD dwWaitHint;
- DWORD dwProcessId;
- DWORD dwServiceFlags;
-} SERVICE_STATUS_PROCESS, *LPSERVICE_STATUS_PROCESS;
-typedef enum _SC_STATUS_TYPE {
- SC_STATUS_PROCESS_INFO = 0
-} SC_STATUS_TYPE;
-typedef enum _SC_ENUM_TYPE {
- SC_ENUM_PROCESS_INFO = 0
-} SC_ENUM_TYPE;
-typedef struct _ENUM_SERVICE_STATUSA {
- LPSTR lpServiceName;
- LPSTR lpDisplayName;
- SERVICE_STATUS ServiceStatus;
-} ENUM_SERVICE_STATUSA,*LPENUM_SERVICE_STATUSA;
-typedef struct _ENUM_SERVICE_STATUSW {
- LPWSTR lpServiceName;
- LPWSTR lpDisplayName;
- SERVICE_STATUS ServiceStatus;
-} ENUM_SERVICE_STATUSW,*LPENUM_SERVICE_STATUSW;
-typedef struct _ENUM_SERVICE_STATUS_PROCESSA {
- LPSTR lpServiceName;
- LPSTR lpDisplayName;
- SERVICE_STATUS_PROCESS ServiceStatusProcess;
-} ENUM_SERVICE_STATUS_PROCESSA,*LPENUM_SERVICE_STATUS_PROCESSA;
-typedef struct _ENUM_SERVICE_STATUS_PROCESSW {
- LPWSTR lpServiceName;
- LPWSTR lpDisplayName;
- SERVICE_STATUS_PROCESS ServiceStatusProcess;
-} ENUM_SERVICE_STATUS_PROCESSW,*LPENUM_SERVICE_STATUS_PROCESSW;
-typedef struct _QUERY_SERVICE_CONFIGA {
- DWORD dwServiceType;
- DWORD dwStartType;
- DWORD dwErrorControl;
- LPSTR lpBinaryPathName;
- LPSTR lpLoadOrderGroup;
- DWORD dwTagId;
- LPSTR lpDependencies;
- LPSTR lpServiceStartName;
- LPSTR lpDisplayName;
-} QUERY_SERVICE_CONFIGA,*LPQUERY_SERVICE_CONFIGA;
-typedef struct _QUERY_SERVICE_CONFIGW {
- DWORD dwServiceType;
- DWORD dwStartType;
- DWORD dwErrorControl;
- LPWSTR lpBinaryPathName;
- LPWSTR lpLoadOrderGroup;
- DWORD dwTagId;
- LPWSTR lpDependencies;
- LPWSTR lpServiceStartName;
- LPWSTR lpDisplayName;
-} QUERY_SERVICE_CONFIGW,*LPQUERY_SERVICE_CONFIGW;
-typedef struct _QUERY_SERVICE_LOCK_STATUSA {
- DWORD fIsLocked;
- LPSTR lpLockOwner;
- DWORD dwLockDuration;
-} QUERY_SERVICE_LOCK_STATUSA,*LPQUERY_SERVICE_LOCK_STATUSA;
-typedef struct _QUERY_SERVICE_LOCK_STATUSW {
- DWORD fIsLocked;
- LPWSTR lpLockOwner;
- DWORD dwLockDuration;
-} QUERY_SERVICE_LOCK_STATUSW,*LPQUERY_SERVICE_LOCK_STATUSW;
-typedef void (WINAPI *LPSERVICE_MAIN_FUNCTIONA)(DWORD,LPSTR*);
-typedef void (WINAPI *LPSERVICE_MAIN_FUNCTIONW)(DWORD,LPWSTR*);
-typedef struct _SERVICE_TABLE_ENTRYA {
- LPSTR lpServiceName;
- LPSERVICE_MAIN_FUNCTIONA lpServiceProc;
-} SERVICE_TABLE_ENTRYA,*LPSERVICE_TABLE_ENTRYA;
-typedef struct _SERVICE_TABLE_ENTRYW {
- LPWSTR lpServiceName;
- LPSERVICE_MAIN_FUNCTIONW lpServiceProc;
-} SERVICE_TABLE_ENTRYW,*LPSERVICE_TABLE_ENTRYW;
-DECLARE_HANDLE(SC_HANDLE);
-typedef SC_HANDLE *LPSC_HANDLE;
-typedef PVOID SC_LOCK;
-typedef DWORD SERVICE_STATUS_HANDLE;
-typedef VOID(WINAPI *LPHANDLER_FUNCTION)(DWORD);
-typedef DWORD (WINAPI *LPHANDLER_FUNCTION_EX)(DWORD,DWORD,LPVOID,LPVOID);
-typedef struct _SERVICE_DESCRIPTIONA {
- LPSTR lpDescription;
-} SERVICE_DESCRIPTIONA,*LPSERVICE_DESCRIPTIONA;
-typedef struct _SERVICE_DESCRIPTIONW {
- LPWSTR lpDescription;
-} SERVICE_DESCRIPTIONW,*LPSERVICE_DESCRIPTIONW;
-typedef enum _SC_ACTION_TYPE {
- SC_ACTION_NONE = 0,
- SC_ACTION_RESTART = 1,
- SC_ACTION_REBOOT = 2,
- SC_ACTION_RUN_COMMAND = 3
-} SC_ACTION_TYPE;
-typedef struct _SC_ACTION {
- SC_ACTION_TYPE Type;
- DWORD Delay;
-} SC_ACTION,*LPSC_ACTION;
-typedef struct _SERVICE_FAILURE_ACTIONSA {
- DWORD dwResetPeriod;
- LPSTR lpRebootMsg;
- LPSTR lpCommand;
- DWORD cActions;
- SC_ACTION * lpsaActions;
-} SERVICE_FAILURE_ACTIONSA,*LPSERVICE_FAILURE_ACTIONSA;
-typedef struct _SERVICE_FAILURE_ACTIONSW {
- DWORD dwResetPeriod;
- LPWSTR lpRebootMsg;
- LPWSTR lpCommand;
- DWORD cActions;
- SC_ACTION * lpsaActions;
-} SERVICE_FAILURE_ACTIONSW,*LPSERVICE_FAILURE_ACTIONSW;
-
-WINADVAPI BOOL WINAPI ChangeServiceConfigA(SC_HANDLE,DWORD,DWORD,DWORD,LPCSTR,LPCSTR,LPDWORD,LPCSTR,LPCSTR,LPCSTR,LPCSTR);
-WINADVAPI BOOL WINAPI ChangeServiceConfigW(SC_HANDLE,DWORD,DWORD,DWORD,LPCWSTR,LPCWSTR,LPDWORD,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR);
-WINADVAPI BOOL WINAPI ChangeServiceConfig2A(SC_HANDLE,DWORD,LPVOID);
-WINADVAPI BOOL WINAPI ChangeServiceConfig2W(SC_HANDLE,DWORD,LPVOID);
-WINADVAPI BOOL WINAPI CloseServiceHandle(SC_HANDLE);
-WINADVAPI BOOL WINAPI ControlService(SC_HANDLE,DWORD,LPSERVICE_STATUS);
-WINADVAPI SC_HANDLE WINAPI CreateServiceA(SC_HANDLE,LPCSTR,LPCSTR,DWORD,DWORD,DWORD,DWORD,LPCSTR,LPCSTR,PDWORD,LPCSTR,LPCSTR,LPCSTR);
-WINADVAPI SC_HANDLE WINAPI CreateServiceW(SC_HANDLE,LPCWSTR,LPCWSTR,DWORD,DWORD,DWORD,DWORD,LPCWSTR,LPCWSTR,PDWORD,LPCWSTR,LPCWSTR,LPCWSTR);
-WINADVAPI BOOL WINAPI DeleteService(SC_HANDLE);
-WINADVAPI BOOL WINAPI EnumDependentServicesA(SC_HANDLE,DWORD,LPENUM_SERVICE_STATUSA,DWORD,PDWORD,PDWORD);
-WINADVAPI BOOL WINAPI EnumDependentServicesW(SC_HANDLE,DWORD,LPENUM_SERVICE_STATUSW,DWORD,PDWORD,PDWORD);
-WINADVAPI BOOL WINAPI EnumServicesStatusA(SC_HANDLE,DWORD,DWORD,LPENUM_SERVICE_STATUSA,DWORD,PDWORD,PDWORD,PDWORD);
-WINADVAPI BOOL WINAPI EnumServicesStatusW(SC_HANDLE,DWORD,DWORD,LPENUM_SERVICE_STATUSW,DWORD,PDWORD,PDWORD,PDWORD);
-WINADVAPI BOOL WINAPI EnumServicesStatusExA(SC_HANDLE,SC_ENUM_TYPE,DWORD,DWORD,LPBYTE,DWORD,LPDWORD,LPDWORD,LPDWORD,LPCSTR);
-WINADVAPI BOOL WINAPI EnumServicesStatusExW(SC_HANDLE,SC_ENUM_TYPE,DWORD,DWORD,LPBYTE,DWORD,LPDWORD,LPDWORD,LPDWORD,LPCWSTR);
-WINADVAPI BOOL WINAPI GetServiceDisplayNameA(SC_HANDLE,LPCSTR,LPSTR,PDWORD);
-WINADVAPI BOOL WINAPI GetServiceDisplayNameW(SC_HANDLE,LPCWSTR,LPWSTR,PDWORD);
-WINADVAPI BOOL WINAPI GetServiceKeyNameA(SC_HANDLE,LPCSTR,LPSTR,PDWORD);
-WINADVAPI BOOL WINAPI GetServiceKeyNameW(SC_HANDLE,LPCWSTR,LPWSTR,PDWORD);
-WINADVAPI SC_LOCK WINAPI LockServiceDatabase(SC_HANDLE);
-WINADVAPI BOOL WINAPI NotifyBootConfigStatus(BOOL);
-WINADVAPI SC_HANDLE WINAPI OpenSCManagerA(LPCSTR,LPCSTR,DWORD);
-WINADVAPI SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR,LPCWSTR,DWORD);
-WINADVAPI SC_HANDLE WINAPI OpenServiceA(SC_HANDLE,LPCSTR,DWORD);
-WINADVAPI SC_HANDLE WINAPI OpenServiceW(SC_HANDLE,LPCWSTR,DWORD);
-WINADVAPI BOOL WINAPI QueryServiceConfigA(SC_HANDLE,LPQUERY_SERVICE_CONFIGA,DWORD,PDWORD);
-WINADVAPI BOOL WINAPI QueryServiceConfigW(SC_HANDLE,LPQUERY_SERVICE_CONFIGW,DWORD,PDWORD);
-WINADVAPI BOOL WINAPI QueryServiceConfig2A(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD);
-WINADVAPI BOOL WINAPI QueryServiceConfig2W(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD);
-WINADVAPI BOOL WINAPI QueryServiceLockStatusA(SC_HANDLE,LPQUERY_SERVICE_LOCK_STATUSA,DWORD,PDWORD);
-WINADVAPI BOOL WINAPI QueryServiceLockStatusW(SC_HANDLE,LPQUERY_SERVICE_LOCK_STATUSW,DWORD,PDWORD);
-WINADVAPI BOOL WINAPI QueryServiceObjectSecurity(SC_HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,LPDWORD);
-WINADVAPI BOOL WINAPI QueryServiceStatus(SC_HANDLE,LPSERVICE_STATUS);
-WINADVAPI BOOL WINAPI QueryServiceStatusEx(SC_HANDLE,SC_STATUS_TYPE,LPBYTE,DWORD,LPDWORD);
-WINADVAPI SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerA(LPCSTR,LPHANDLER_FUNCTION);
-WINADVAPI SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerW(LPCWSTR,LPHANDLER_FUNCTION);
-WINADVAPI SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerExA(LPCSTR,LPHANDLER_FUNCTION_EX,LPVOID);
-WINADVAPI SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerExW(LPCWSTR,LPHANDLER_FUNCTION_EX,LPVOID);
-WINADVAPI BOOL WINAPI SetServiceObjectSecurity(SC_HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
-WINADVAPI BOOL WINAPI SetServiceStatus(SERVICE_STATUS_HANDLE,LPSERVICE_STATUS);
-WINADVAPI BOOL WINAPI StartServiceA(SC_HANDLE,DWORD,LPCSTR*);
-WINADVAPI BOOL WINAPI StartServiceCtrlDispatcherA(LPSERVICE_TABLE_ENTRYA);
-WINADVAPI BOOL WINAPI StartServiceCtrlDispatcherW(LPSERVICE_TABLE_ENTRYW);
-WINADVAPI BOOL WINAPI StartServiceW(SC_HANDLE,DWORD,LPCWSTR*);
-WINADVAPI BOOL WINAPI UnlockServiceDatabase(SC_LOCK);
-
-#ifdef UNICODE
-typedef ENUM_SERVICE_STATUSW ENUM_SERVICE_STATUS,*LPENUM_SERVICE_STATUS;
-typedef ENUM_SERVICE_STATUS_PROCESSW ENUM_SERVICE_STATUS_PROCESS;
-typedef LPENUM_SERVICE_STATUS_PROCESSW LPENUM_SERVICE_STATUS_PROCESS;
-typedef QUERY_SERVICE_CONFIGW QUERY_SERVICE_CONFIG,*LPQUERY_SERVICE_CONFIG;
-typedef QUERY_SERVICE_LOCK_STATUSW QUERY_SERVICE_LOCK_STATUS,*LPQUERY_SERVICE_LOCK_STATUS;
-typedef SERVICE_TABLE_ENTRYW SERVICE_TABLE_ENTRY,*LPSERVICE_TABLE_ENTRY;
-typedef LPSERVICE_MAIN_FUNCTIONW LPSERVICE_MAIN_FUNCTION;
-typedef SERVICE_DESCRIPTIONW SERVICE_DESCRIPTION;
-typedef LPSERVICE_DESCRIPTIONW LPSERVICE_DESCRIPTION;
-typedef SERVICE_FAILURE_ACTIONSW SERVICE_FAILURE_ACTIONS;
-typedef LPSERVICE_FAILURE_ACTIONSW LPSERVICE_FAILURE_ACTIONS;
-#define SERVICES_ACTIVE_DATABASE SERVICES_ACTIVE_DATABASEW
-#define SERVICES_FAILED_DATABASE SERVICES_FAILED_DATABASEW
-#define SC_GROUP_IDENTIFIER SC_GROUP_IDENTIFIERW
-#define ChangeServiceConfig ChangeServiceConfigW
-#define ChangeServiceConfig2 ChangeServiceConfig2W
-#define CreateService CreateServiceW
-#define EnumDependentServices EnumDependentServicesW
-#define EnumServicesStatus EnumServicesStatusW
-#define EnumServicesStatusEx EnumServicesStatusExW
-#define GetServiceDisplayName GetServiceDisplayNameW
-#define GetServiceKeyName GetServiceKeyNameW
-#define OpenSCManager OpenSCManagerW
-#define OpenService OpenServiceW
-#define QueryServiceConfig QueryServiceConfigW
-#define QueryServiceConfig2 QueryServiceConfig2W
-#define QueryServiceLockStatus QueryServiceLockStatusW
-#define RegisterServiceCtrlHandler RegisterServiceCtrlHandlerW
-#define RegisterServiceCtrlHandlerEx RegisterServiceCtrlHandlerExW
-#define StartService StartServiceW
-#define StartServiceCtrlDispatcher StartServiceCtrlDispatcherW
-#else
-typedef ENUM_SERVICE_STATUSA ENUM_SERVICE_STATUS,*LPENUM_SERVICE_STATUS;
-typedef ENUM_SERVICE_STATUS_PROCESSA ENUM_SERVICE_STATUS_PROCESS;
-typedef LPENUM_SERVICE_STATUS_PROCESSA LPENUM_SERVICE_STATUS_PROCESS;
-typedef QUERY_SERVICE_CONFIGA QUERY_SERVICE_CONFIG,*LPQUERY_SERVICE_CONFIG;
-typedef QUERY_SERVICE_LOCK_STATUSA QUERY_SERVICE_LOCK_STATUS,*LPQUERY_SERVICE_LOCK_STATUS;
-typedef SERVICE_TABLE_ENTRYA SERVICE_TABLE_ENTRY,*LPSERVICE_TABLE_ENTRY;
-typedef LPSERVICE_MAIN_FUNCTIONA LPSERVICE_MAIN_FUNCTION;
-typedef SERVICE_DESCRIPTIONA SERVICE_DESCRIPTION;
-typedef LPSERVICE_DESCRIPTIONA LPSERVICE_DESCRIPTION;
-typedef SERVICE_FAILURE_ACTIONSA SERVICE_FAILURE_ACTIONS;
-typedef LPSERVICE_FAILURE_ACTIONSA LPSERVICE_FAILURE_ACTIONS;
-#define SERVICES_ACTIVE_DATABASE SERVICES_ACTIVE_DATABASEA
-#define SERVICES_FAILED_DATABASE SERVICES_FAILED_DATABASEA
-#define SC_GROUP_IDENTIFIER SC_GROUP_IDENTIFIERA
-#define ChangeServiceConfig ChangeServiceConfigA
-#define ChangeServiceConfig2 ChangeServiceConfig2A
-#define CreateService CreateServiceA
-#define EnumDependentServices EnumDependentServicesA
-#define EnumServicesStatus EnumServicesStatusA
-#define EnumServicesStatusEx EnumServicesStatusExA
-#define GetServiceDisplayName GetServiceDisplayNameA
-#define GetServiceKeyName GetServiceKeyNameA
-#define OpenSCManager OpenSCManagerA
-#define OpenService OpenServiceA
-#define QueryServiceConfig QueryServiceConfigA
-#define QueryServiceConfig2 QueryServiceConfig2A
-#define QueryServiceLockStatus QueryServiceLockStatusA
-#define RegisterServiceCtrlHandler RegisterServiceCtrlHandlerA
-#define RegisterServiceCtrlHandlerEx RegisterServiceCtrlHandlerExA
-#define StartService StartServiceA
-#define StartServiceCtrlDispatcher StartServiceCtrlDispatcherA
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif /* _WINSVC_H */
diff --git a/winsup/w32api/include/winuser.h b/winsup/w32api/include/winuser.h
deleted file mode 100644
index bd935aa..0000000
--- a/winsup/w32api/include/winuser.h
+++ /dev/null
@@ -1,4456 +0,0 @@
-#ifndef _WINUSER_H
-#define _WINUSER_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef WINUSERAPI
-#ifdef __W32API_USE_DLLIMPORT__
-#define WINUSERAPI DECLSPEC_IMPORT
-#else
-#define WINUSERAPI
-#endif
-#endif
-
-#define MNGO_NOINTERFACE 0x00
-#define MNGO_NOERROR 0x01
-#define MNGOF_TOPGAP 0x01
-#define MNGOF_BOTTOMGAP 0x02
-
-#define WC_DIALOG MAKEINTATOM(0x8002)
-#define FALT 16
-#define FCONTROL 8
-#define FNOINVERT 2
-#define FSHIFT 4
-#define FVIRTKEY 1
-#define ATF_TIMEOUTON 1
-#define ATF_ONOFFFEEDBACK 2
-#define ATF_AVAILABLE 4 /* May be obsolete. Not in recent MS docs. */
-#define WH_MIN (-1)
-#define WH_MSGFILTER (-1)
-#define WH_JOURNALRECORD 0
-#define WH_JOURNALPLAYBACK 1
-#define WH_KEYBOARD 2
-#define WH_GETMESSAGE 3
-#define WH_CALLWNDPROC 4
-#define WH_CBT 5
-#define WH_SYSMSGFILTER 6
-#define WH_MOUSE 7
-#define WH_HARDWARE 8
-#define WH_DEBUG 9
-#define WH_SHELL 10
-#define WH_FOREGROUNDIDLE 11
-#define WH_CALLWNDPROCRET 12
-#define WH_KEYBOARD_LL 13
-#define WH_MOUSE_LL 14
-#define WH_MAX 14
-#define WH_MINHOOK WH_MIN
-#define WH_MAXHOOK WH_MAX
-#define HC_ACTION 0
-#define HC_GETNEXT 1
-#define HC_SKIP 2
-#define HC_NOREMOVE 3
-#define HC_NOREM 3
-#define HC_SYSMODALON 4
-#define HC_SYSMODALOFF 5
-#define HCBT_MOVESIZE 0
-#define HCBT_MINMAX 1
-#define HCBT_QS 2
-#define HCBT_CREATEWND 3
-#define HCBT_DESTROYWND 4
-#define HCBT_ACTIVATE 5
-#define HCBT_CLICKSKIPPED 6
-#define HCBT_KEYSKIPPED 7
-#define HCBT_SYSCOMMAND 8
-#define HCBT_SETFOCUS 9
-#define CF_TEXT 1
-#define CF_BITMAP 2
-#define CF_METAFILEPICT 3
-#define CF_SYLK 4
-#define CF_DIF 5
-#define CF_TIFF 6
-#define CF_OEMTEXT 7
-#define CF_DIB 8
-#define CF_PALETTE 9
-#define CF_PENDATA 10
-#define CF_RIFF 11
-#define CF_WAVE 12
-#define CF_UNICODETEXT 13
-#define CF_ENHMETAFILE 14
-#define CF_HDROP 15
-#define CF_LOCALE 16
-#define CF_MAX 17
-#define CF_OWNERDISPLAY 128
-#define CF_DSPTEXT 129
-#define CF_DSPBITMAP 130
-#define CF_DSPMETAFILEPICT 131
-#define CF_DSPENHMETAFILE 142
-#define CF_PRIVATEFIRST 512
-#define CF_PRIVATELAST 767
-#define CF_GDIOBJFIRST 768
-#define CF_GDIOBJLAST 1023
-#define HKL_NEXT 1
-#define HKL_PREV 0
-#define KLF_ACTIVATE 1
-#define KLF_SUBSTITUTE_OK 2
-#define KLF_UNLOADPREVIOUS 4
-#define KLF_REORDER 8
-#define KLF_REPLACELANG 16
-#define KLF_NOTELLSHELL 128
-#define KLF_SETFORPROCESS 256
-#define KL_NAMELENGTH 9
-#define MF_ENABLED 0
-#define MF_GRAYED 1
-#define MF_DISABLED 2
-#define MF_BITMAP 4
-#define MF_CHECKED 8
-#define MF_MENUBARBREAK 32
-#define MF_MENUBREAK 64
-#define MF_OWNERDRAW 256
-#define MF_POPUP 16
-#define MF_SEPARATOR 0x800
-#define MF_STRING 0
-#define MF_UNCHECKED 0
-#define MF_DEFAULT 4096
-#define MF_SYSMENU 0x2000
-#define MF_HELP 0x4000
-#define MF_END 128
-#define MF_RIGHTJUSTIFY 0x4000
-#define MF_MOUSESELECT 0x8000
-#define MF_INSERT 0
-#define MF_CHANGE 128
-#define MF_APPEND 256
-#define MF_DELETE 512
-#define MF_REMOVE 4096
-#define MF_USECHECKBITMAPS 512
-#define MF_UNHILITE 0
-#define MF_HILITE 128
-
-/* Also defined in dbt.h */
-#define BSM_ALLCOMPONENTS 0
-#define BSM_APPLICATIONS 8
-#define BSM_ALLDESKTOPS 16
-#define BSM_INSTALLABLEDRIVERS 4
-#define BSM_NETDRIVER 2
-#define BSM_VXDS 1
-#define BSF_FLUSHDISK 0x00000004
-#define BSF_FORCEIFHUNG 0x00000020
-#define BSF_IGNORECURRENTTASK 0x00000002
-#define BSF_NOHANG 0x00000008
-#define BSF_NOTIMEOUTIFNOTHUNG 0x00000040
-#define BSF_POSTMESSAGE 0x00000010
-#define BSF_QUERY 0x00000001
-#if (_WIN32_WINNT >= 0x0500)
-#define BSF_ALLOWSFW 0x00000080
-#define BSF_SENDNOTIFYMESSAGE 0x00000100
-#endif /* (_WIN32_WINNT >= 0x0500) */
-#if (_WIN32_WINNT >= 0x0501)
-#define BSF_LUID 0x00000400
-#define BSF_RETURNHDESK 0x00000200
-#endif /* (_WIN32_WINNT >= 0x0501) */
-
-#define BROADCAST_QUERY_DENY 1112363332
-#define ENUM_CURRENT_SETTINGS ((DWORD)-1)
-#define ENUM_REGISTRY_SETTINGS ((DWORD)-2)
-#define CDS_UPDATEREGISTRY 1
-#define CDS_TEST 2
-#define CDS_FULLSCREEN 4
-#define CDS_GLOBAL 8
-#define CDS_SET_PRIMARY 16
-#define CDS_RESET 0x40000000
-#define CDS_SETRECT 0x20000000
-#define CDS_NORESET 0x10000000
-#define DISP_CHANGE_SUCCESSFUL 0
-#define DISP_CHANGE_RESTART 1
-#define DISP_CHANGE_FAILED (-1)
-#define DISP_CHANGE_BADMODE (-2)
-#define DISP_CHANGE_NOTUPDATED (-3)
-#define DISP_CHANGE_BADFLAGS (-4)
-#define DISP_CHANGE_BADPARAM (-5)
-#define DISP_CHANGE_BADDUALVIEW (-6)
-#define BST_CHECKED 1
-#define BST_INDETERMINATE 2
-#define BST_UNCHECKED 0
-#define BST_FOCUS 8
-#define BST_PUSHED 4
-#define MF_BYCOMMAND 0
-#define MF_BYPOSITION 1024
-#define MF_UNCHECKED 0
-#define MF_HILITE 128
-#define MF_UNHILITE 0
-#define CWP_ALL 0
-#define CWP_SKIPINVISIBLE 1
-#define CWP_SKIPDISABLED 2
-#define CWP_SKIPTRANSPARENT 4
-#define IMAGE_BITMAP 0
-#define IMAGE_ICON 1
-#define IMAGE_CURSOR 2
-#define IMAGE_ENHMETAFILE 3
-#define DF_ALLOWOTHERACCOUNTHOOK 1
-#define DESKTOP_CREATEMENU 4
-#define DESKTOP_CREATEWINDOW 2
-#define DESKTOP_ENUMERATE 64
-#define DESKTOP_HOOKCONTROL 8
-#define DESKTOP_JOURNALPLAYBACK 32
-#define DESKTOP_JOURNALRECORD 16
-#define DESKTOP_READOBJECTS 1
-#define DESKTOP_SWITCHDESKTOP 256
-#define DESKTOP_WRITEOBJECTS 128
-#define CW_USEDEFAULT 0x80000000
-#define WS_BORDER 0x800000
-#define WS_CAPTION 0xc00000
-#define WS_CHILD 0x40000000
-#define WS_CHILDWINDOW 0x40000000
-#define WS_CLIPCHILDREN 0x2000000
-#define WS_CLIPSIBLINGS 0x4000000
-#define WS_DISABLED 0x8000000
-#define WS_DLGFRAME 0x400000
-#define WS_GROUP 0x20000
-#define WS_HSCROLL 0x100000
-#define WS_ICONIC 0x20000000
-#define WS_MAXIMIZE 0x1000000
-#define WS_MAXIMIZEBOX 0x10000
-#define WS_MINIMIZE 0x20000000
-#define WS_MINIMIZEBOX 0x20000
-#define WS_OVERLAPPED 0
-#define WS_OVERLAPPEDWINDOW 0xcf0000
-#define WS_POPUP 0x80000000
-#define WS_POPUPWINDOW 0x80880000
-#define WS_SIZEBOX 0x40000
-#define WS_SYSMENU 0x80000
-#define WS_TABSTOP 0x10000
-#define WS_THICKFRAME 0x40000
-#define WS_TILED 0
-#define WS_TILEDWINDOW 0xcf0000
-#define WS_VISIBLE 0x10000000
-#define WS_VSCROLL 0x200000
-#define MDIS_ALLCHILDSTYLES 1
-#define BS_3STATE 5
-#define BS_AUTO3STATE 6
-#define BS_AUTOCHECKBOX 3
-#define BS_AUTORADIOBUTTON 9
-#define BS_BITMAP 128
-#define BS_BOTTOM 0x800
-#define BS_CENTER 0x300
-#define BS_CHECKBOX 2
-#define BS_DEFPUSHBUTTON 1
-#define BS_GROUPBOX 7
-#define BS_ICON 64
-#define BS_LEFT 256
-#define BS_LEFTTEXT 32
-#define BS_MULTILINE 0x2000
-#define BS_NOTIFY 0x4000
-#define BS_OWNERDRAW 0xb
-#define BS_PUSHBUTTON 0
-#define BS_PUSHLIKE 4096
-#define BS_RADIOBUTTON 4
-#define BS_RIGHT 512
-#define BS_RIGHTBUTTON 32
-#define BS_TEXT 0
-#define BS_TOP 0x400
-#define BS_USERBUTTON 8
-#define BS_VCENTER 0xc00
-#define BS_FLAT 0x8000
-#define CBS_AUTOHSCROLL 64
-#define CBS_DISABLENOSCROLL 0x800
-#define CBS_DROPDOWN 2
-#define CBS_DROPDOWNLIST 3
-#define CBS_HASSTRINGS 512
-#define CBS_LOWERCASE 0x4000
-#define CBS_NOINTEGRALHEIGHT 0x400
-#define CBS_OEMCONVERT 128
-#define CBS_OWNERDRAWFIXED 16
-#define CBS_OWNERDRAWVARIABLE 32
-#define CBS_SIMPLE 1
-#define CBS_SORT 256
-#define CBS_UPPERCASE 0x2000
-#define ES_AUTOHSCROLL 128
-#define ES_AUTOVSCROLL 64
-#define ES_CENTER 1
-#define ES_LEFT 0
-#define ES_LOWERCASE 16
-#define ES_MULTILINE 4
-#define ES_NOHIDESEL 256
-#define ES_NUMBER 0x2000
-#define ES_OEMCONVERT 0x400
-#define ES_PASSWORD 32
-#define ES_READONLY 0x800
-#define ES_RIGHT 2
-#define ES_UPPERCASE 8
-#define ES_WANTRETURN 4096
-#define LBS_DISABLENOSCROLL 4096
-#define LBS_EXTENDEDSEL 0x800
-#define LBS_HASSTRINGS 64
-#define LBS_MULTICOLUMN 512
-#define LBS_MULTIPLESEL 8
-#define LBS_NODATA 0x2000
-#define LBS_NOINTEGRALHEIGHT 256
-#define LBS_NOREDRAW 4
-#define LBS_NOSEL 0x4000
-#define LBS_NOTIFY 1
-#define LBS_OWNERDRAWFIXED 16
-#define LBS_OWNERDRAWVARIABLE 32
-#define LBS_SORT 2
-#define LBS_STANDARD 0xa00003
-#define LBS_USETABSTOPS 128
-#define LBS_WANTKEYBOARDINPUT 0x400
-#define SBS_BOTTOMALIGN 4
-#define SBS_HORZ 0
-#define SBS_LEFTALIGN 2
-#define SBS_RIGHTALIGN 4
-#define SBS_SIZEBOX 8
-#define SBS_SIZEBOXBOTTOMRIGHTALIGN 4
-#define SBS_SIZEBOXTOPLEFTALIGN 2
-#define SBS_SIZEGRIP 16
-#define SBS_TOPALIGN 2
-#define SBS_VERT 1
-#define SS_BITMAP 14
-#define SS_BLACKFRAME 7
-#define SS_BLACKRECT 4
-#define SS_CENTER 1
-#define SS_CENTERIMAGE 512
-#define SS_ENHMETAFILE 15
-#define SS_ETCHEDFRAME 18
-#define SS_ETCHEDHORZ 16
-#define SS_ETCHEDVERT 17
-#define SS_GRAYFRAME 8
-#define SS_GRAYRECT 5
-#define SS_ICON 3
-#define SS_LEFT 0
-#define SS_LEFTNOWORDWRAP 0xc
-#define SS_NOPREFIX 128
-#define SS_NOTIFY 256
-#define SS_OWNERDRAW 0xd
-#define SS_REALSIZEIMAGE 0x800
-#define SS_RIGHT 2
-#define SS_RIGHTJUST 0x400
-#define SS_SIMPLE 11
-#define SS_SUNKEN 4096
-#define SS_WHITEFRAME 9
-#define SS_WHITERECT 6
-#define SS_USERITEM 10
-#define SS_TYPEMASK 0x0000001FL
-#define SS_ENDELLIPSIS 0x00004000L
-#define SS_PATHELLIPSIS 0x00008000L
-#define SS_WORDELLIPSIS 0x0000C000L
-#define SS_ELLIPSISMASK 0x0000C000L
-#define DS_3DLOOK 4
-#define DS_ABSALIGN 1
-#define DS_CENTER 0x800
-#define DS_CENTERMOUSE 4096
-#define DS_CONTEXTHELP 0x2000
-#define DS_CONTROL 0x400
-#define DS_FIXEDSYS 8
-#define DS_LOCALEDIT 32
-#define DS_MODALFRAME 128
-#define DS_NOFAILCREATE 16
-#define DS_NOIDLEMSG 256
-#define DS_SETFONT 64
-#define DS_SETFOREGROUND 512
-#define DS_SYSMODAL 2
-#define DS_SHELLFONT (DS_SETFONT | DS_FIXEDSYS)
-#define WS_EX_ACCEPTFILES 16
-#define WS_EX_APPWINDOW 0x40000
-#define WS_EX_CLIENTEDGE 512
-#define WS_EX_COMPOSITED 0x2000000 /* XP */
-#define WS_EX_CONTEXTHELP 0x400
-#define WS_EX_CONTROLPARENT 0x10000
-#define WS_EX_DLGMODALFRAME 1
-#define WS_EX_LAYERED 0x80000 /* w2k */
-#define WS_EX_LAYOUTRTL 0x400000 /* w98, w2k */
-#define WS_EX_LEFT 0
-#define WS_EX_LEFTSCROLLBAR 0x4000
-#define WS_EX_LTRREADING 0
-#define WS_EX_MDICHILD 64
-#define WS_EX_NOACTIVATE 0x8000000 /* w2k */
-#define WS_EX_NOINHERITLAYOUT 0x100000 /* w2k */
-#define WS_EX_NOPARENTNOTIFY 4
-#define WS_EX_OVERLAPPEDWINDOW 0x300
-#define WS_EX_PALETTEWINDOW 0x188
-#define WS_EX_RIGHT 0x1000
-#define WS_EX_RIGHTSCROLLBAR 0
-#define WS_EX_RTLREADING 0x2000
-#define WS_EX_STATICEDGE 0x20000
-#define WS_EX_TOOLWINDOW 128
-#define WS_EX_TOPMOST 8
-#define WS_EX_TRANSPARENT 32
-#define WS_EX_WINDOWEDGE 256
-#define WINSTA_ALL_ACCESS 895
-#define WINSTA_ACCESSCLIPBOARD 4
-#define WINSTA_ACCESSGLOBALATOMS 32
-#define WINSTA_CREATEDESKTOP 8
-#define WINSTA_ENUMDESKTOPS 1
-#define WINSTA_ENUMERATE 256
-#define WINSTA_EXITWINDOWS 64
-#define WINSTA_READATTRIBUTES 2
-#define WINSTA_READSCREEN 512
-#define WINSTA_WRITEATTRIBUTES 16
-#define DDL_READWRITE 0
-#define DDL_READONLY 1
-#define DDL_HIDDEN 2
-#define DDL_SYSTEM 4
-#define DDL_DIRECTORY 16
-#define DDL_ARCHIVE 32
-#define DDL_POSTMSGS 8192
-#define DDL_DRIVES 16384
-#define DDL_EXCLUSIVE 32768
-#define DC_ACTIVE 0x00000001
-#define DC_SMALLCAP 0x00000002
-#define DC_ICON 0x00000004
-#define DC_TEXT 0x00000008
-#define DC_INBUTTON 0x00000010
-#if (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= 0x0500)
-#define DC_GRADIENT 0x00000020
-#endif
-#if (_WIN32_WINNT >= 0x0501)
-#define DC_BUTTONS 0x00001000
-#endif
-/* Where are these documented? */
-#define DC_CAPTION (DC_ICON|DC_TEXT|DC_BUTTONS)
-#define DC_NC (DC_CAPTION|DC_FRAME)
-
-#define BDR_RAISEDOUTER 1
-#define BDR_SUNKENOUTER 2
-#define BDR_RAISEDINNER 4
-#define BDR_SUNKENINNER 8
-#define BDR_OUTER 3
-#define BDR_INNER 0xc
-#define BDR_RAISED 5
-#define BDR_SUNKEN 10
-#define EDGE_RAISED (BDR_RAISEDOUTER|BDR_RAISEDINNER)
-#define EDGE_SUNKEN (BDR_SUNKENOUTER|BDR_SUNKENINNER)
-#define EDGE_ETCHED (BDR_SUNKENOUTER|BDR_RAISEDINNER)
-#define EDGE_BUMP (BDR_RAISEDOUTER|BDR_SUNKENINNER)
-#define BF_LEFT 1
-#define BF_TOP 2
-#define BF_RIGHT 4
-#define BF_BOTTOM 8
-#define BF_TOPLEFT (BF_TOP|BF_LEFT)
-#define BF_TOPRIGHT (BF_TOP|BF_RIGHT)
-#define BF_BOTTOMLEFT (BF_BOTTOM|BF_LEFT)
-#define BF_BOTTOMRIGHT (BF_BOTTOM|BF_RIGHT)
-#define BF_RECT (BF_LEFT|BF_TOP|BF_RIGHT|BF_BOTTOM)
-#define BF_DIAGONAL 16
-#define BF_DIAGONAL_ENDTOPRIGHT (BF_DIAGONAL|BF_TOP|BF_RIGHT)
-#define BF_DIAGONAL_ENDTOPLEFT (BF_DIAGONAL|BF_TOP|BF_LEFT)
-#define BF_DIAGONAL_ENDBOTTOMLEFT (BF_DIAGONAL|BF_BOTTOM|BF_LEFT)
-#define BF_DIAGONAL_ENDBOTTOMRIGHT (BF_DIAGONAL|BF_BOTTOM|BF_RIGHT)
-#define BF_MIDDLE 0x800
-#define BF_SOFT 0x1000
-#define BF_ADJUST 0x2000
-#define BF_FLAT 0x4000
-#define BF_MONO 0x8000
-#define DFC_CAPTION 1
-#define DFC_MENU 2
-#define DFC_SCROLL 3
-#define DFC_BUTTON 4
-#if (WINVER >= 0x0500)
-#define DFC_POPUPMENU 5
-#endif /* WINVER >= 0x0500 */
-#define DFCS_CAPTIONCLOSE 0
-#define DFCS_CAPTIONMIN 1
-#define DFCS_CAPTIONMAX 2
-#define DFCS_CAPTIONRESTORE 3
-#define DFCS_CAPTIONHELP 4
-#define DFCS_MENUARROW 0
-#define DFCS_MENUCHECK 1
-#define DFCS_MENUBULLET 2
-#define DFCS_MENUARROWRIGHT 4
-#define DFCS_SCROLLUP 0
-#define DFCS_SCROLLDOWN 1
-#define DFCS_SCROLLLEFT 2
-#define DFCS_SCROLLRIGHT 3
-#define DFCS_SCROLLCOMBOBOX 5
-#define DFCS_SCROLLSIZEGRIP 8
-#define DFCS_SCROLLSIZEGRIPRIGHT 16
-#define DFCS_BUTTONCHECK 0
-#define DFCS_BUTTONRADIOIMAGE 1
-#define DFCS_BUTTONRADIOMASK 2
-#define DFCS_BUTTONRADIO 4
-#define DFCS_BUTTON3STATE 8
-#define DFCS_BUTTONPUSH 16
-#define DFCS_INACTIVE 256
-#define DFCS_PUSHED 512
-#define DFCS_CHECKED 1024
-#if (WINVER >= 0x0500)
-#define DFCS_TRANSPARENT 0x800
-#define DFCS_HOT 0x1000
-#endif
-#define DFCS_ADJUSTRECT 0x2000
-#define DFCS_FLAT 0x4000
-#define DFCS_MONO 0x8000
-#define DST_COMPLEX 0
-#define DST_TEXT 1
-#define DST_PREFIXTEXT 2
-#define DST_ICON 3
-#define DST_BITMAP 4
-#define DSS_NORMAL 0
-#define DSS_UNION 16
-#define DSS_DISABLED 32
-#define DSS_MONO 128
-#define DSS_RIGHT 0x8000
-#define DT_BOTTOM 8
-#define DT_CALCRECT 1024
-#define DT_CENTER 1
-#define DT_EDITCONTROL 8192
-#define DT_END_ELLIPSIS 32768
-#define DT_PATH_ELLIPSIS 16384
-#define DT_WORD_ELLIPSIS 0x40000
-#define DT_EXPANDTABS 64
-#define DT_EXTERNALLEADING 512
-#define DT_LEFT 0
-#define DT_MODIFYSTRING 65536
-#define DT_NOCLIP 256
-#define DT_NOPREFIX 2048
-#define DT_RIGHT 2
-#define DT_RTLREADING 131072
-#define DT_SINGLELINE 32
-#define DT_TABSTOP 128
-#define DT_TOP 0
-#define DT_VCENTER 4
-#define DT_WORDBREAK 16
-#define DT_INTERNAL 4096
-#define WB_ISDELIMITER 2
-#define WB_LEFT 0
-#define WB_RIGHT 1
-#define SB_HORZ 0
-#define SB_VERT 1
-#define SB_CTL 2
-#define SB_BOTH 3
-#define ESB_DISABLE_BOTH 3
-#define ESB_DISABLE_DOWN 2
-#define ESB_DISABLE_LEFT 1
-#define ESB_DISABLE_LTUP 1
-#define ESB_DISABLE_RIGHT 2
-#define ESB_DISABLE_RTDN 2
-#define ESB_DISABLE_UP 1
-#define ESB_ENABLE_BOTH 0
-#define SB_LINEUP 0
-#define SB_LINEDOWN 1
-#define SB_LINELEFT 0
-#define SB_LINERIGHT 1
-#define SB_PAGEUP 2
-#define SB_PAGEDOWN 3
-#define SB_PAGELEFT 2
-#define SB_PAGERIGHT 3
-#define SB_THUMBPOSITION 4
-#define SB_THUMBTRACK 5
-#define SB_ENDSCROLL 8
-#define SB_LEFT 6
-#define SB_RIGHT 7
-#define SB_BOTTOM 7
-#define SB_TOP 6
-#define IS_INTRESOURCE(i) (((ULONG_PTR)(i) >> 16) == 0)
-#define MAKEINTRESOURCEA(i) (LPSTR)((DWORD)((WORD)(i)))
-#define MAKEINTRESOURCEW(i) (LPWSTR)((DWORD)((WORD)(i)))
-#ifndef XFree86Server
-# define RT_CURSOR MAKEINTRESOURCE(1)
-# define RT_FONT MAKEINTRESOURCE(8)
-#endif /* ndef XFree86Server */
-#define RT_BITMAP MAKEINTRESOURCE(2)
-#define RT_ICON MAKEINTRESOURCE(3)
-#define RT_MENU MAKEINTRESOURCE(4)
-#define RT_DIALOG MAKEINTRESOURCE(5)
-#define RT_STRING MAKEINTRESOURCE(6)
-#define RT_FONTDIR MAKEINTRESOURCE(7)
-#define RT_ACCELERATOR MAKEINTRESOURCE(9)
-#define RT_RCDATA MAKEINTRESOURCE(10)
-#define RT_MESSAGETABLE MAKEINTRESOURCE(11)
-#define DIFFERENCE 11
-#define RT_GROUP_CURSOR MAKEINTRESOURCE((DWORD)RT_CURSOR+DIFFERENCE)
-#define RT_GROUP_ICON MAKEINTRESOURCE((DWORD)RT_ICON+DIFFERENCE)
-#define RT_VERSION MAKEINTRESOURCE(16)
-#define RT_DLGINCLUDE MAKEINTRESOURCE(17)
-#define RT_PLUGPLAY MAKEINTRESOURCE(19)
-#define RT_VXD MAKEINTRESOURCE(20)
-#define RT_ANICURSOR MAKEINTRESOURCE(21)
-#define RT_ANIICON MAKEINTRESOURCE(22)
-#define RT_HTML MAKEINTRESOURCE(23)
-#ifndef RC_INVOKED
-#define RT_MANIFEST MAKEINTRESOURCE(24)
-#define CREATEPROCESS_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(1)
-#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(2)
-#define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(3)
-#else
-#define RT_MANIFEST 24
-#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
-#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID 2
-#define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID 3
-#endif
-#define EWX_FORCE 4
-#define EWX_LOGOFF 0
-#define EWX_POWEROFF 8
-#define EWX_REBOOT 2
-#define EWX_SHUTDOWN 1
-#if (_WIN32_WINNT >= 0x0500)
-#define EWX_FORCEIFHUNG 16
-#endif
-#define CS_BYTEALIGNCLIENT 4096
-#define CS_BYTEALIGNWINDOW 8192
-#define CS_KEYCVTWINDOW 4
-#define CS_NOKEYCVT 256
-#define CS_CLASSDC 64
-#define CS_DBLCLKS 8
-#define CS_GLOBALCLASS 16384
-#define CS_HREDRAW 2
-#define CS_NOCLOSE 512
-#define CS_OWNDC 32
-#define CS_PARENTDC 128
-#define CS_SAVEBITS 2048
-#define CS_VREDRAW 1
-#define CS_IME 0x10000
-#if (_WIN32_WINNT >= 0x0501)
-#define CS_DROPSHADOW 0x20000
-#endif
-#define GCW_ATOM (-32)
-#define GCL_CBCLSEXTRA (-20)
-#define GCL_CBWNDEXTRA (-18)
-#define GCL_HBRBACKGROUND (-10)
-#define GCL_HCURSOR (-12)
-#define GCL_HICON (-14)
-#define GCL_HICONSM (-34)
-#define GCL_HMODULE (-16)
-#define GCL_MENUNAME (-8)
-#define GCL_STYLE (-26)
-#define GCL_WNDPROC (-24)
-#define GCLP_MENUNAME (-8)
-#define GCLP_HBRBACKGROUND (-10)
-#define GCLP_HCURSOR (-12)
-#define GCLP_HICON (-14)
-#define GCLP_HMODULE (-16)
-#define GCLP_WNDPROC (-24)
-#define GCLP_HICONSM (-34)
-#if 0
- /* This is supposed to be defined by the program using it not defined
- in the w32api headers. I've left it here for documentation purposes.
- */
-#ifndef IDC_STATIC /* May be predefined by resource compiler. */
-#define IDC_STATIC (-1)
-#endif
-#endif
-#define IDC_ARROW MAKEINTRESOURCE(32512)
-#define IDC_IBEAM MAKEINTRESOURCE(32513)
-#define IDC_WAIT MAKEINTRESOURCE(32514)
-#define IDC_CROSS MAKEINTRESOURCE(32515)
-#define IDC_UPARROW MAKEINTRESOURCE(32516)
-#define IDC_SIZENWSE MAKEINTRESOURCE(32642)
-#define IDC_SIZENESW MAKEINTRESOURCE(32643)
-#define IDC_SIZEWE MAKEINTRESOURCE(32644)
-#define IDC_SIZENS MAKEINTRESOURCE(32645)
-#define IDC_SIZEALL MAKEINTRESOURCE(32646)
-#define IDC_NO MAKEINTRESOURCE(32648)
-#define IDC_HAND MAKEINTRESOURCE(32649)
-#define IDC_APPSTARTING MAKEINTRESOURCE(32650)
-#define IDC_HELP MAKEINTRESOURCE(32651)
-#define IDC_ICON MAKEINTRESOURCE(32641)
-#define IDC_SIZE MAKEINTRESOURCE(32640)
-#ifndef RC_INVOKED
-#define IDI_APPLICATION MAKEINTRESOURCE(32512)
-#define IDI_HAND MAKEINTRESOURCE(32513)
-#define IDI_QUESTION MAKEINTRESOURCE(32514)
-#define IDI_EXCLAMATION MAKEINTRESOURCE(32515)
-#define IDI_ASTERISK MAKEINTRESOURCE(32516)
-#define IDI_WINLOGO MAKEINTRESOURCE(32517)
-#else
-#define IDI_APPLICATION 32512
-#define IDI_HAND 32513
-#define IDI_QUESTION 32514
-#define IDI_EXCLAMATION 32515
-#define IDI_ASTERISK 32516
-#define IDI_WINLOGO 32517
-#endif
-#define IDI_WARNING IDI_EXCLAMATION
-#define IDI_ERROR IDI_HAND
-#define IDI_INFORMATION IDI_ASTERISK
-#define MIIM_STATE 1
-#define MIIM_ID 2
-#define MIIM_SUBMENU 4
-#define MIIM_CHECKMARKS 8
-#define MIIM_TYPE 16
-#define MIIM_DATA 32
-#define MIIM_STRING 64
-#define MIIM_BITMAP 128
-#define MIIM_FTYPE 256
-#if (WINVER >= 0x0500)
-#define MIM_MAXHEIGHT 1
-#define MIM_BACKGROUND 2
-#define MIM_HELPID 4
-#define MIM_MENUDATA 8
-#define MIM_STYLE 16
-#define MIM_APPLYTOSUBMENUS 0x80000000L
-#define MNS_NOCHECK 0x80000000
-#define MNS_MODELESS 0x40000000
-#define MNS_DRAGDROP 0x20000000
-#define MNS_AUTODISMISS 0x10000000
-#define MNS_NOTIFYBYPOS 0x08000000
-#define MNS_CHECKORBMP 0x04000000
-#endif
-#define MFT_BITMAP 4
-#define MFT_MENUBARBREAK 32
-#define MFT_MENUBREAK 64
-#define MFT_OWNERDRAW 256
-#define MFT_RADIOCHECK 512
-#define MFT_RIGHTJUSTIFY 0x4000
-#define MFT_SEPARATOR 0x800
-#define MFT_RIGHTORDER 0x2000L
-#define MFT_STRING 0
-#define MFS_CHECKED 8
-#define MFS_DEFAULT 4096
-#define MFS_DISABLED 3
-#define MFS_ENABLED 0
-#define MFS_GRAYED 3
-#define MFS_HILITE 128
-#define MFS_UNCHECKED 0
-#define MFS_UNHILITE 0
-#define GW_HWNDNEXT 2
-#define GW_HWNDPREV 3
-#define GW_CHILD 5
-#define GW_HWNDFIRST 0
-#define GW_HWNDLAST 1
-#define GW_OWNER 4
-#define SW_HIDE 0
-#define SW_NORMAL 1
-#define SW_SHOWNORMAL 1
-#define SW_SHOWMINIMIZED 2
-#define SW_MAXIMIZE 3
-#define SW_SHOWMAXIMIZED 3
-#define SW_SHOWNOACTIVATE 4
-#define SW_SHOW 5
-#define SW_MINIMIZE 6
-#define SW_SHOWMINNOACTIVE 7
-#define SW_SHOWNA 8
-#define SW_RESTORE 9
-#define SW_SHOWDEFAULT 10
-#define SW_FORCEMINIMIZE 11
-#define SW_MAX 11
-#define MB_USERICON 128
-#define MB_ICONASTERISK 64
-#define MB_ICONEXCLAMATION 0x30
-#define MB_ICONWARNING 0x30
-#define MB_ICONERROR 16
-#define MB_ICONHAND 16
-#define MB_ICONQUESTION 32
-#define MB_OK 0
-#define MB_ABORTRETRYIGNORE 2
-#define MB_APPLMODAL 0
-#define MB_DEFAULT_DESKTOP_ONLY 0x20000
-#define MB_HELP 0x4000
-#define MB_RIGHT 0x80000
-#define MB_RTLREADING 0x100000
-#define MB_TOPMOST 0x40000
-#define MB_DEFBUTTON1 0
-#define MB_DEFBUTTON2 256
-#define MB_DEFBUTTON3 512
-#define MB_DEFBUTTON4 0x300
-#define MB_ICONINFORMATION 64
-#define MB_ICONSTOP 16
-#define MB_OKCANCEL 1
-#define MB_RETRYCANCEL 5
-#ifdef _WIN32_WINNT
-#if (_WIN32_WINNT >= 0x0400)
-#define MB_SERVICE_NOTIFICATION 0x00200000
-#else
-#define MB_SERVICE_NOTIFICATION 0x00040000
-#endif
-#define MB_SERVICE_NOTIFICATION_NT3X 0x00040000
-#endif
-#define MB_SETFOREGROUND 0x10000
-#define MB_SYSTEMMODAL 4096
-#define MB_TASKMODAL 0x2000
-#define MB_YESNO 4
-#define MB_YESNOCANCEL 3
-#define MB_ICONMASK 240
-#define MB_DEFMASK 3840
-#define MB_MODEMASK 0x00003000
-#define MB_MISCMASK 0x0000C000
-#define MB_NOFOCUS 0x00008000
-#define MB_TYPEMASK 15
-#define MB_TOPMOST 0x40000
-#if (WINVER >= 0x0500)
-#define MB_CANCELTRYCONTINUE 6
-#endif
-
-#define IDOK 1
-#define IDCANCEL 2
-#define IDABORT 3
-#define IDRETRY 4
-#define IDIGNORE 5
-#define IDYES 6
-#define IDNO 7
-#if (WINVER >= 0x0400)
-#define IDCLOSE 8
-#define IDHELP 9
-#endif
-#if (WINVER >= 0x0500)
-#define IDTRYAGAIN 10
-#define IDCONTINUE 11
-#endif
-
-#define GWL_EXSTYLE (-20)
-#define GWL_STYLE (-16)
-#define GWL_WNDPROC (-4)
-#define GWLP_WNDPROC (-4)
-#define GWL_HINSTANCE (-6)
-#define GWLP_HINSTANCE (-6)
-#define GWL_HWNDPARENT (-8)
-#define GWLP_HWNDPARENT (-8)
-#define GWL_ID (-12)
-#define GWLP_ID (-12)
-#define GWL_USERDATA (-21)
-#define GWLP_USERDATA (-21)
-#define DWL_DLGPROC 4
-#define DWLP_DLGPROC 4
-#define DWL_MSGRESULT 0
-#define DWLP_MSGRESULT 0
-#define DWL_USER 8
-#define DWLP_USER 8
-#if (_WIN32_WINNT >= 0x0501)
-#define QS_ALLEVENTS 1215
-#define QS_ALLINPUT 1279
-#else
-#define QS_ALLEVENTS 191
-#define QS_ALLINPUT 255
-#endif
-#define QS_ALLPOSTMESSAGE 256
-#define QS_HOTKEY 128
-#if (_WIN32_WINNT >= 0x0501)
-#define QS_INPUT 1031
-#else
-#define QS_INPUT 7
-#endif
-#define QS_KEY 1
-#define QS_MOUSE 6
-#define QS_MOUSEBUTTON 4
-#define QS_MOUSEMOVE 2
-#define QS_PAINT 32
-#define QS_POSTMESSAGE 8
-#if (_WIN32_WINNT >= 0x0501)
-#define QS_RAWINPUT 1024
-#endif
-#define QS_SENDMESSAGE 64
-#define QS_TIMER 16
-#define MWMO_WAITALL 1
-#define MWMO_ALERTABLE 2
-#define MWMO_INPUTAVAILABLE 4
-#define COLOR_3DDKSHADOW 21
-#define COLOR_3DFACE 15
-#define COLOR_3DHILIGHT 20
-#define COLOR_3DHIGHLIGHT 20
-#define COLOR_3DLIGHT 22
-#define COLOR_BTNHILIGHT 20
-#define COLOR_3DSHADOW 16
-#define COLOR_ACTIVEBORDER 10
-#define COLOR_ACTIVECAPTION 2
-#define COLOR_APPWORKSPACE 12
-#define COLOR_BACKGROUND 1
-#define COLOR_DESKTOP 1
-#define COLOR_BTNFACE 15
-#define COLOR_BTNHIGHLIGHT 20
-#define COLOR_BTNSHADOW 16
-#define COLOR_BTNTEXT 18
-#define COLOR_CAPTIONTEXT 9
-#define COLOR_GRAYTEXT 17
-#define COLOR_HIGHLIGHT 13
-#define COLOR_HIGHLIGHTTEXT 14
-#define COLOR_INACTIVEBORDER 11
-#define COLOR_INACTIVECAPTION 3
-#define COLOR_INACTIVECAPTIONTEXT 19
-#define COLOR_INFOBK 24
-#define COLOR_INFOTEXT 23
-#define COLOR_MENU 4
-#define COLOR_MENUTEXT 7
-#define COLOR_SCROLLBAR 0
-#define COLOR_WINDOW 5
-#define COLOR_WINDOWFRAME 6
-#define COLOR_WINDOWTEXT 8
-#define COLOR_HOTLIGHT 26
-#define COLOR_GRADIENTACTIVECAPTION 27
-#define COLOR_GRADIENTINACTIVECAPTION 28
-#define CTLCOLOR_MSGBOX 0
-#define CTLCOLOR_EDIT 1
-#define CTLCOLOR_LISTBOX 2
-#define CTLCOLOR_BTN 3
-#define CTLCOLOR_DLG 4
-#define CTLCOLOR_SCROLLBAR 5
-#define CTLCOLOR_STATIC 6
-#define CTLCOLOR_MAX 7
-#define SM_CXSCREEN 0
-#define SM_CYSCREEN 1
-#define SM_CXVSCROLL 2
-#define SM_CYHSCROLL 3
-#define SM_CYCAPTION 4
-#define SM_CXBORDER 5
-#define SM_CYBORDER 6
-#define SM_CXDLGFRAME 7
-#define SM_CXFIXEDFRAME 7
-#define SM_CYDLGFRAME 8
-#define SM_CYFIXEDFRAME 8
-#define SM_CYVTHUMB 9
-#define SM_CXHTHUMB 10
-#define SM_CXICON 11
-#define SM_CYICON 12
-#define SM_CXCURSOR 13
-#define SM_CYCURSOR 14
-#define SM_CYMENU 15
-#define SM_CXFULLSCREEN 16
-#define SM_CYFULLSCREEN 17
-#define SM_CYKANJIWINDOW 18
-#define SM_MOUSEPRESENT 19
-#define SM_CYVSCROLL 20
-#define SM_CXHSCROLL 21
-#define SM_DEBUG 22
-#define SM_SWAPBUTTON 23
-#define SM_RESERVED1 24
-#define SM_RESERVED2 25
-#define SM_RESERVED3 26
-#define SM_RESERVED4 27
-#define SM_CXMIN 28
-#define SM_CYMIN 29
-#define SM_CXSIZE 30
-#define SM_CYSIZE 31
-#define SM_CXSIZEFRAME 32
-#define SM_CXFRAME 32
-#define SM_CYSIZEFRAME 33
-#define SM_CYFRAME 33
-#define SM_CXMINTRACK 34
-#define SM_CYMINTRACK 35
-#define SM_CXDOUBLECLK 36
-#define SM_CYDOUBLECLK 37
-#define SM_CXICONSPACING 38
-#define SM_CYICONSPACING 39
-#define SM_MENUDROPALIGNMENT 40
-#define SM_PENWINDOWS 41
-#define SM_DBCSENABLED 42
-#define SM_CMOUSEBUTTONS 43
-#define SM_SECURE 44
-#define SM_CXEDGE 45
-#define SM_CYEDGE 46
-#define SM_CXMINSPACING 47
-#define SM_CYMINSPACING 48
-#define SM_CXSMICON 49
-#define SM_CYSMICON 50
-#define SM_CYSMCAPTION 51
-#define SM_CXSMSIZE 52
-#define SM_CYSMSIZE 53
-#define SM_CXMENUSIZE 54
-#define SM_CYMENUSIZE 55
-#define SM_ARRANGE 56
-#define SM_CXMINIMIZED 57
-#define SM_CYMINIMIZED 58
-#define SM_CXMAXTRACK 59
-#define SM_CYMAXTRACK 60
-#define SM_CXMAXIMIZED 61
-#define SM_CYMAXIMIZED 62
-#define SM_NETWORK 63
-#define SM_CLEANBOOT 67
-#define SM_CXDRAG 68
-#define SM_CYDRAG 69
-#define SM_SHOWSOUNDS 70
-#define SM_CXMENUCHECK 71
-#define SM_CYMENUCHECK 72
-#define SM_SLOWMACHINE 73
-#define SM_MIDEASTENABLED 74
-#define SM_MOUSEWHEELPRESENT 75
-#define SM_XVIRTUALSCREEN 76
-#define SM_YVIRTUALSCREEN 77
-#define SM_CXVIRTUALSCREEN 78
-#define SM_CYVIRTUALSCREEN 79
-#define SM_CMONITORS 80
-#define SM_SAMEDISPLAYFORMAT 81
-#define SM_IMMENABLED 82
-#define SM_CXFOCUSBORDER 83
-#define SM_CYFOCUSBORDER 84
-#define SM_TABLETPC 86
-#define SM_MEDIACENTER 87
-#define SM_STARTER 88
-#define SM_SERVERR2 89
-#if (_WIN32_WINNT < 0x0400)
-#define SM_CMETRICS 76
-#else
-#define SM_CMETRICS 88
-#endif
-#define SM_REMOTESESSION 0X1000
-#define ARW_BOTTOMLEFT 0
-#define ARW_BOTTOMRIGHT 1
-#define ARW_HIDE 8
-#define ARW_TOPLEFT 2
-#define ARW_TOPRIGHT 3
-#define ARW_DOWN 4
-#define ARW_LEFT 0
-#define ARW_RIGHT 0
-#define ARW_UP 4
-#define UOI_FLAGS 1
-#define UOI_NAME 2
-#define UOI_TYPE 3
-#define UOI_USER_SID 4
-#define LR_DEFAULTCOLOR 0
-#define LR_MONOCHROME 1
-#define LR_COLOR 2
-#define LR_COPYRETURNORG 4
-#define LR_COPYDELETEORG 8
-#define LR_LOADFROMFILE 16
-#define LR_LOADTRANSPARENT 32
-#define LR_LOADREALSIZE 128
-#define LR_DEFAULTSIZE 0x0040
-#define LR_VGACOLOR 0x0080
-#define LR_LOADMAP3DCOLORS 4096
-#define LR_CREATEDIBSECTION 8192
-#define LR_COPYFROMRESOURCE 0x4000
-#define LR_SHARED 32768
-#define KEYEVENTF_EXTENDEDKEY 0x00000001
-#define KEYEVENTF_KEYUP 00000002
-#if (_WIN32_WINNT >= 0x0500)
-#define KEYEVENTF_UNICODE 0x00000004
-#define KEYEVENTF_SCANCODE 0x00000008
-#endif
-#define OBM_BTNCORNERS 32758
-#define OBM_BTSIZE 32761
-#define OBM_CHECK 32760
-#define OBM_CHECKBOXES 32759
-#define OBM_CLOSE 32754
-#define OBM_COMBO 32738
-#define OBM_DNARROW 32752
-#define OBM_DNARROWD 32742
-#define OBM_DNARROWI 32736
-#define OBM_LFARROW 32750
-#define OBM_LFARROWI 32734
-#define OBM_LFARROWD 32740
-#define OBM_MNARROW 32739
-#define OBM_OLD_CLOSE 32767
-#define OBM_OLD_DNARROW 32764
-#define OBM_OLD_LFARROW 32762
-#define OBM_OLD_REDUCE 32757
-#define OBM_OLD_RESTORE 32755
-#define OBM_OLD_RGARROW 32763
-#define OBM_OLD_UPARROW 32765
-#define OBM_OLD_ZOOM 32756
-#define OBM_REDUCE 32749
-#define OBM_REDUCED 32746
-#define OBM_RESTORE 32747
-#define OBM_RESTORED 32744
-#define OBM_RGARROW 32751
-#define OBM_RGARROWD 32741
-#define OBM_RGARROWI 32735
-#define OBM_SIZE 32766
-#define OBM_UPARROW 32753
-#define OBM_UPARROWD 32743
-#define OBM_UPARROWI 32737
-#define OBM_ZOOM 32748
-#define OBM_ZOOMD 32745
-#define OCR_NORMAL 32512
-#define OCR_IBEAM 32513
-#define OCR_WAIT 32514
-#define OCR_CROSS 32515
-#define OCR_UP 32516
-#define OCR_SIZE 32640
-#define OCR_ICON 32641
-#define OCR_SIZENWSE 32642
-#define OCR_SIZENESW 32643
-#define OCR_SIZEWE 32644
-#define OCR_SIZENS 32645
-#define OCR_SIZEALL 32646
-#define OCR_NO 32648
-#define OCR_APPSTARTING 32650
-#define OIC_SAMPLE 32512
-#define OIC_HAND 32513
-#define OIC_QUES 32514
-#define OIC_BANG 32515
-#define OIC_NOTE 32516
-#define OIC_WINLOGO 32517
-#define OIC_WARNING OIC_BANG
-#define OIC_ERROR OIC_HAND
-#define OIC_INFORMATION OIC_NOTE
-#define HELPINFO_MENUITEM 2
-#define HELPINFO_WINDOW 1
-#define MSGF_DIALOGBOX 0
-#define MSGF_MESSAGEBOX 1
-#define MSGF_MENU 2
-#define MSGF_MOVE 3
-#define MSGF_SIZE 4
-#define MSGF_SCROLLBAR 5
-#define MSGF_NEXTWINDOW 6
-#define MSGF_MAINLOOP 8
-#define MSGF_USER 4096
-#define MOUSEEVENTF_MOVE 0x00000001
-#define MOUSEEVENTF_LEFTDOWN 0x00000002
-#define MOUSEEVENTF_LEFTUP 0x00000004
-#define MOUSEEVENTF_RIGHTDOWN 0x00000008
-#define MOUSEEVENTF_RIGHTUP 0x00000010
-#define MOUSEEVENTF_MIDDLEDOWN 0x00000020
-#define MOUSEEVENTF_MIDDLEUP 0x00000040
-#define MOUSEEVENTF_ABSOLUTE 0x00008000
-#if (_WIN32_WINNT >= 0x0400)
-#define MOUSEEVENTF_WHEEL 0x00000800
-#endif
-#if (_WIN32_WINNT >= 0x0500)
-#define MOUSEEVENTF_XDOWN 0x00000080
-#define MOUSEEVENTF_XUP 0x00000100
-#endif
-/* Also in pbt.h */
-#if (_WIN32_WINNT >= 0x0400)
-#define PBT_APMQUERYSUSPEND 0
-#define PBT_APMQUERYSTANDBY 1
-#define PBT_APMQUERYSUSPENDFAILED 2
-#define PBT_APMQUERYSTANDBYFAILED 3
-#define PBT_APMSUSPEND 4
-#define PBT_APMSTANDBY 5
-#define PBT_APMRESUMECRITICAL 6
-#define PBT_APMRESUMESUSPEND 7
-#define PBT_APMRESUMESTANDBY 8
-#define PBT_APMBATTERYLOW 9
-#define PBT_APMPOWERSTATUSCHANGE 10
-#define PBT_APMOEMEVENT 11
-#define PBT_APMRESUMEAUTOMATIC 18
-#define PBTF_APMRESUMEFROMFAILURE 1
-#endif
-#if (_WIN32_WINNT >= 0x0600)
-#define PBT_POWERSETTINGCHANGE 32787
-#endif
-/* end pbt.h */
-
-#define PM_NOREMOVE 0
-#define PM_REMOVE 1
-#define PM_NOYIELD 2
-#if (_WIN32_WINNT >= 0x0500)
-# define PM_QS_INPUT (QS_INPUT << 16)
-# define PM_QS_POSTMESSAGE ((QS_POSTMESSAGE|QS_HOTKEY|QS_TIMER) << 16)
-# define PM_QS_PAINT (QS_PAINT << 16)
-# define PM_QS_SENDMESSAGE (QS_SENDMESSAGE << 16)
-#endif
-#define HWND_BROADCAST ((HWND)0xFFFF)
-#define HWND_BOTTOM ((HWND)1)
-#define HWND_NOTOPMOST ((HWND)(-2))
-#define HWND_TOP ((HWND)0)
-#define HWND_TOPMOST ((HWND)(-1))
-#define HWND_DESKTOP (HWND)0
-#if (_WIN32_WINNT >= 0x0500)
-#define HWND_MESSAGE ((HWND)(-3))
-#endif
-#define RDW_ERASE 4
-#define RDW_FRAME 1024
-#define RDW_INTERNALPAINT 2
-#define RDW_INVALIDATE 1
-#define RDW_NOERASE 32
-#define RDW_NOFRAME 2048
-#define RDW_NOINTERNALPAINT 16
-#define RDW_VALIDATE 8
-#define RDW_ERASENOW 512
-#define RDW_UPDATENOW 256
-#define RDW_ALLCHILDREN 128
-#define RDW_NOCHILDREN 64
-#define SMTO_ABORTIFHUNG 0x0002
-#define SMTO_BLOCK 0x0001
-#define SMTO_NORMAL 0x0000
-#if (_WIN32_WINNT >= 0x0500)
-#define SMTO_NOTIMEOUTIFNOTHUNG 0x0008
-#endif
-#define SIF_DISABLENOSCROLL 0x0008
-#define SIF_PAGE 0x0002
-#define SIF_POS 0x0004
-#define SIF_RANGE 0x0001
-#define SIF_TRACKPOS 0x0010
-#define SIF_ALL (SIF_PAGE|SIF_POS|SIF_RANGE|SIF_TRACKPOS)
-#define SWP_DRAWFRAME 0x0020
-#define SWP_FRAMECHANGED 0x0020
-#define SWP_HIDEWINDOW 0x0080
-#define SWP_NOACTIVATE 0x0010
-#define SWP_NOCOPYBITS 0x0100
-#define SWP_NOMOVE 0x0002
-#define SWP_NOSIZE 0x0001
-#define SWP_NOREDRAW 0x0008
-#define SWP_NOZORDER 0x0004
-#define SWP_SHOWWINDOW 0x0040
-#define SWP_NOOWNERZORDER 0x0200
-#define SWP_NOREPOSITION SWP_NOOWNERZORDER
-#define SWP_NOSENDCHANGING 0x0400
-#define SWP_DEFERERASE 0x2000
-#define SWP_ASYNCWINDOWPOS 0x4000
-#define HSHELL_ACTIVATESHELLWINDOW 3
-#define HSHELL_ENDTASK 10
-#define HSHELL_GETMINRECT 5
-#define HSHELL_LANGUAGE 8
-#define HSHELL_REDRAW 6
-#define HSHELL_TASKMAN 7
-#define HSHELL_WINDOWACTIVATED 4
-#define HSHELL_WINDOWCREATED 1
-#define HSHELL_WINDOWDESTROYED 2
-#if (_WIN32_WINNT >= 0x0500)
-#define HSHELL_ACCESSIBILITYSTATE 11
-#define HSHELL_APPCOMMAND 12
-#define HSHELL_RUDEAPPACTIVATED 32772
-#define HSHELL_FLASH 32774
-#endif
-#if (_WIN32_WINNT >= 0x0501)
-#define HSHELL_WINDOWREPLACED 13
-#define HSHELL_WINDOWREPLACING 14
-#endif
-#define SPI_GETACCESSTIMEOUT 0x003C
-#define SPI_GETACTIVEWINDOWTRACKING 0x1000
-#define SPI_GETACTIVEWNDTRKTIMEOUT 8194
-#define SPI_GETACTIVEWNDTRKZORDER 0x100C
-#define SPI_GETANIMATION 0x0048
-#define SPI_GETBEEP 0x0001
-#define SPI_GETBLOCKSENDINPUTRESETS 0x1026
-#define SPI_GETBORDER 0x0005
-#define SPI_GETCARETWIDTH 0x2006
-#define SPI_GETCOMBOBOXANIMATION 0x1004
-#define SPI_GETCURSORSHADOW 0x101A
-#define SPI_GETDEFAULTINPUTLANG 0x0059
-#define SPI_GETDESKWALLPAPER 0x0073
-#define SPI_GETDRAGFULLWINDOWS 0x0026
-#define SPI_GETFASTTASKSWITCH 0x0023
-#define SPI_GETFILTERKEYS 0x0032
-#define SPI_GETFONTSMOOTHING 0x004A
-#define SPI_GETFOREGROUNDFLASHCOUNT 0x2004
-#define SPI_GETFOREGROUNDLOCKTIMEOUT 0x2000
-#define SPI_GETGRADIENTCAPTIONS 0x1008
-#define SPI_GETGRIDGRANULARITY 0x0012
-#define SPI_GETHIGHCONTRAST 0x0042
-#define SPI_GETHOTTRACKING 0x100E
-#define SPI_GETICONMETRICS 0x002D
-#define SPI_GETICONTITLELOGFONT 0x001F
-#define SPI_GETICONTITLEWRAP 0x0019
-#define SPI_GETKEYBOARDCUES 0x100A
-#define SPI_GETKEYBOARDDELAY 0x0016
-#define SPI_GETKEYBOARDPREF 0x0044
-#define SPI_GETKEYBOARDSPEED 0x000A
-#define SPI_GETLISTBOXSMOOTHSCROLLING 0x1006
-#define SPI_GETLOWPOWERACTIVE 0x0053
-#define SPI_GETLOWPOWERTIMEOUT 0x004F
-#define SPI_GETMENUANIMATION 0x1002
-#define SPI_GETMENUDROPALIGNMENT 0x001B
-#define SPI_GETMENUFADE 0x1012
-#define SPI_GETMENUSHOWDELAY 0x006A
-#define SPI_GETMENUUNDERLINES SPI_GETKEYBOARDCUES
-#define SPI_GETMINIMIZEDMETRICS 0x002B
-#define SPI_GETMOUSE 0x0003
-#define SPI_GETMOUSEHOVERHEIGHT 0x0064
-#define SPI_GETMOUSEHOVERTIME 0x0066
-#define SPI_GETMOUSEHOVERWIDTH 0x0062
-#define SPI_GETMOUSEKEYS 0x0036
-#define SPI_GETMOUSESPEED 0x0070
-#define SPI_GETMOUSETRAILS 0x005E
-#define SPI_GETNONCLIENTMETRICS 0x0029
-#define SPI_GETPOWEROFFACTIVE 0x0054
-#define SPI_GETPOWEROFFTIMEOUT 0x0050
-#define SPI_GETSCREENREADER 0x0046
-#define SPI_GETSCREENSAVEACTIVE 0x0010
-#define SPI_GETSCREENSAVERRUNNING 0x0072
-#define SPI_GETSCREENSAVETIMEOUT 0x000E
-#define SPI_GETSELECTIONFADE 0x1014
-#define SPI_GETSERIALKEYS 0x003E
-#define SPI_GETSHOWIMEUI 0x006E
-#define SPI_GETSHOWSOUNDS 0x0038
-#define SPI_GETSNAPTODEFBUTTON 0x005F
-#define SPI_GETSOUNDSENTRY 0x0040
-#define SPI_GETSTICKYKEYS 0x003A
-#define SPI_GETTOGGLEKEYS 0x0034
-#define SPI_GETTOOLTIPANIMATION 0x1016
-#define SPI_GETTOOLTIPFADE 0x1018
-#define SPI_GETUIEFFECTS 0x103E
-#define SPI_GETWHEELSCROLLLINES 0x0068
-#define SPI_GETWINDOWSEXTENSION 0x005C
-#define SPI_GETWORKAREA 0x0030
-#define SPI_ICONHORIZONTALSPACING 0x000D
-#define SPI_ICONVERTICALSPACING 0x0018
-#define SPI_LANGDRIVER 0x000C
-#define SPI_SETACCESSTIMEOUT 0x003D
-#define SPI_SETACTIVEWINDOWTRACKING 0x1001
-#define SPI_SETACTIVEWNDTRKTIMEOUT 8195
-#define SPI_SETACTIVEWNDTRKZORDER 0x100D
-#define SPI_SETANIMATION 0x0049
-#define SPI_SETBEEP 0x0002
-#define SPI_SETBLOCKSENDINPUTRESETS 0x1027
-#define SPI_SETBORDER 0x0006
-#define SPI_SETCARETWIDTH 0x2007
-#define SPI_SETCOMBOBOXANIMATION 0x1005
-#define SPI_SETCURSORS 0x0057
-#define SPI_SETCURSORSHADOW 0x101B
-#define SPI_SETDEFAULTINPUTLANG 0x005A
-#define SPI_SETDESKPATTERN 0x0015
-#define SPI_SETDESKWALLPAPER 0x0014
-#define SPI_SETDOUBLECLICKTIME 0x0020
-#define SPI_SETDOUBLECLKHEIGHT 0x001E
-#define SPI_SETDOUBLECLKWIDTH 0x001D
-#define SPI_SETDRAGFULLWINDOWS 0x0025
-#define SPI_SETDRAGHEIGHT 0x004D
-#define SPI_SETDRAGWIDTH 0x004C
-#define SPI_SETFASTTASKSWITCH 0x0024
-#define SPI_SETFILTERKEYS 0x0033
-#define SPI_SETFONTSMOOTHING 0x004B
-#define SPI_SETFOREGROUNDFLASHCOUNT 0x2005
-#define SPI_SETFOREGROUNDLOCKTIMEOUT 0x2001
-#define SPI_SETGRADIENTCAPTIONS 0x1009
-#define SPI_SETGRIDGRANULARITY 0x0013
-#define SPI_SETHANDHELD 0x004E
-#define SPI_SETHIGHCONTRAST 0x0043
-#define SPI_SETHOTTRACKING 0x100F
-#define SPI_SETICONMETRICS 0x002E
-#define SPI_SETICONS 0x0058
-#define SPI_SETICONTITLELOGFONT 0x0022
-#define SPI_SETICONTITLEWRAP 0x001A
-#define SPI_SETKEYBOARDCUES 0x100B
-#define SPI_SETKEYBOARDDELAY 0x0017
-#define SPI_SETKEYBOARDPREF 0x0045
-#define SPI_SETKEYBOARDSPEED 0x000B
-#define SPI_SETLANGTOGGLE 0x005B
-#define SPI_SETLISTBOXSMOOTHSCROLLING 0x1007
-#define SPI_SETLOWPOWERACTIVE 0x0055
-#define SPI_SETLOWPOWERTIMEOUT 0x0051
-#define SPI_SETMENUANIMATION 0x1003
-#define SPI_SETMENUDROPALIGNMENT 0x001C
-#define SPI_SETMENUFADE 0x1013
-#define SPI_SETMENUSHOWDELAY 0x006B
-#define SPI_SETMENUUNDERLINES SPI_SETKEYBOARDCUES
-#define SPI_SETMINIMIZEDMETRICS 0x002C
-#define SPI_SETMOUSE 0x0004
-#define SPI_SETMOUSEBUTTONSWAP 0x0021
-#define SPI_SETMOUSEHOVERHEIGHT 0x0065
-#define SPI_SETMOUSEHOVERTIME 0x0067
-#define SPI_SETMOUSEHOVERWIDTH 0x0063
-#define SPI_SETMOUSEKEYS 0x0037
-#define SPI_SETMOUSESPEED 0x0071
-#define SPI_SETMOUSETRAILS 0x005D
-#define SPI_SETNONCLIENTMETRICS 0x002A
-#define SPI_SETPENWINDOWS 0x0031
-#define SPI_SETPOWEROFFACTIVE 0x0056
-#define SPI_SETPOWEROFFTIMEOUT 0x0052
-#define SPI_SETSCREENREADER 0x0047
-#define SPI_SETSCREENSAVEACTIVE 0x0011
-#define SPI_SETSCREENSAVERRUNNING 0x0061
-#define SPI_SETSCREENSAVETIMEOUT 0x000F
-#define SPI_SETSELECTIONFADE 0x1015
-#define SPI_SETSERIALKEYS 0x003F
-#define SPI_SETSHOWIMEUI 0x006F
-#define SPI_SETSHOWSOUNDS 0x0039
-#define SPI_SETSNAPTODEFBUTTON 0x0060
-#define SPI_SETSOUNDSENTRY 0x0041
-#define SPI_SETSTICKYKEYS 0x003B
-#define SPI_SETTOGGLEKEYS 0x0035
-#define SPI_SETTOOLTIPANIMATION 0x1017
-#define SPI_SETTOOLTIPFADE 0x1019
-#define SPI_SETUIEFFECTS 0x103F
-#define SPI_SETWHEELSCROLLLINES 0x0069
-#define SPI_SETWORKAREA 0x002F
-#if (_WIN32_WINNT >= 0x0501)
-#define SPI_GETDROPSHADOW 0x1024
-#define SPI_GETFLATMENU 0x1022
-#define SPI_GETFOCUSBORDERHEIGHT 0x2010
-#define SPI_GETFOCUSBORDERWIDTH 0x200E
-#define SPI_GETFONTSMOOTHINGCONTRAST 0x200C
-#define SPI_GETFONTSMOOTHINGTYPE 0x200A
-#define SPI_GETMOUSECLICKLOCK 0x101E
-#define SPI_GETMOUSECLICKLOCKTIME 0x2008
-#define SPI_GETMOUSESONAR 0x101C
-#define SPI_GETMOUSEVANISH 0x1020
-#define SPI_SETDROPSHADOW 0x1025
-#define SPI_SETFLATMENU 0x1023
-#define SPI_SETFOCUSBORDERHEIGHT 0x2011
-#define SPI_SETFOCUSBORDERWIDTH 0x200F
-#define SPI_SETFONTSMOOTHINGCONTRAST 0x200D
-#define SPI_SETFONTSMOOTHINGTYPE 0x200B
-#define SPI_SETMOUSECLICKLOCK 0x101F
-#define SPI_SETMOUSECLICKLOCKTIME 0x2009
-#define SPI_SETMOUSESONAR 0x101D
-#define SPI_SETMOUSEVANISH 0x1021
-#endif
-#define SPIF_UPDATEINIFILE 0x0001
-#define SPIF_SENDCHANGE 0x0002
-#define SPIF_SENDWININICHANGE SPIF_SENDCHANGE
-#define ATF_ONOFFFEEDBACK 2
-#define ATF_TIMEOUTON 1
-#define WM_APP 32768
-#define WM_ACTIVATE 6
-#define WM_ACTIVATEAPP 28
-/* FIXME/CHECK: Are WM_AFX{FIRST,LAST} valid for WINVER < 0x400? */
-#define WM_AFXFIRST 864
-#define WM_AFXLAST 895
-#define WM_ASKCBFORMATNAME 780
-#define WM_CANCELJOURNAL 75
-#define WM_CANCELMODE 31
-#define WM_CAPTURECHANGED 533
-#define WM_CHANGECBCHAIN 781
-#define WM_CHAR 258
-#define WM_CHARTOITEM 47
-#define WM_CHILDACTIVATE 34
-#define WM_CLEAR 771
-#define WM_CLOSE 16
-#define WM_COMMAND 273
-#define WM_COMMNOTIFY 68 /* obsolete */
-#define WM_COMPACTING 65
-#define WM_COMPAREITEM 57
-#define WM_CONTEXTMENU 123
-#define WM_COPY 769
-#define WM_COPYDATA 74
-#define WM_CREATE 1
-#define WM_CTLCOLORBTN 309
-#define WM_CTLCOLORDLG 310
-#define WM_CTLCOLOREDIT 307
-#define WM_CTLCOLORLISTBOX 308
-#define WM_CTLCOLORMSGBOX 306
-#define WM_CTLCOLORSCROLLBAR 311
-#define WM_CTLCOLORSTATIC 312
-#define WM_CUT 768
-#define WM_DEADCHAR 259
-#define WM_DELETEITEM 45
-#define WM_DESTROY 2
-#define WM_DESTROYCLIPBOARD 775
-#define WM_DEVICECHANGE 537
-#define WM_DEVMODECHANGE 27
-#define WM_DISPLAYCHANGE 126
-#define WM_DRAWCLIPBOARD 776
-#define WM_DRAWITEM 43
-#define WM_DROPFILES 563
-#define WM_ENABLE 10
-#define WM_ENDSESSION 22
-#define WM_ENTERIDLE 289
-#define WM_ENTERMENULOOP 529
-#define WM_ENTERSIZEMOVE 561
-#define WM_ERASEBKGND 20
-#define WM_EXITMENULOOP 530
-#define WM_EXITSIZEMOVE 562
-#define WM_FONTCHANGE 29
-#define WM_GETDLGCODE 135
-#define WM_GETFONT 49
-#define WM_GETHOTKEY 51
-#define WM_GETICON 127
-#define WM_GETMINMAXINFO 36
-#define WM_GETTEXT 13
-#define WM_GETTEXTLENGTH 14
-/* FIXME/CHECK: Are WM_HANDHEL{FIRST,LAST} valid for WINVER < 0x400? */
-#define WM_HANDHELDFIRST 856
-#define WM_HANDHELDLAST 863
-#define WM_HELP 83
-#define WM_HOTKEY 786
-#define WM_HSCROLL 276
-#define WM_HSCROLLCLIPBOARD 782
-#define WM_ICONERASEBKGND 39
-#define WM_INITDIALOG 272
-#define WM_INITMENU 278
-#define WM_INITMENUPOPUP 279
-#if (_WIN32_WINNT >= 0x0501)
-#define WM_INPUT 0x00FF
-#endif
-#define WM_INPUTLANGCHANGE 81
-#define WM_INPUTLANGCHANGEREQUEST 80
-#define WM_KEYDOWN 256
-#define WM_KEYUP 257
-#define WM_KILLFOCUS 8
-#define WM_MDIACTIVATE 546
-#define WM_MDICASCADE 551
-#define WM_MDICREATE 544
-#define WM_MDIDESTROY 545
-#define WM_MDIGETACTIVE 553
-#define WM_MDIICONARRANGE 552
-#define WM_MDIMAXIMIZE 549
-#define WM_MDINEXT 548
-#define WM_MDIREFRESHMENU 564
-#define WM_MDIRESTORE 547
-#define WM_MDISETMENU 560
-#define WM_MDITILE 550
-#define WM_MEASUREITEM 44
-#if (WINVER >= 0x0500)
-#define WM_GETOBJECT 0x003D
-#define WM_CHANGEUISTATE 0x0127
-#define WM_UPDATEUISTATE 0x0128
-#define WM_QUERYUISTATE 0x0129
-#define WM_UNINITMENUPOPUP 0x0125
-#define WM_MENURBUTTONUP 290
-#define WM_MENUCOMMAND 0x0126
-#define WM_MENUGETOBJECT 0x0124
-#define WM_MENUDRAG 0x0123
-#define WM_APPCOMMAND 0x0319
-#endif
-#define WM_MENUCHAR 288
-#define WM_MENUSELECT 287
-#define WM_NEXTMENU 531
-#define WM_MOVE 3
-#define WM_MOVING 534
-#define WM_NCACTIVATE 134
-#define WM_NCCALCSIZE 131
-#define WM_NCCREATE 129
-#define WM_NCDESTROY 130
-#define WM_NCHITTEST 132
-#define WM_NCLBUTTONDBLCLK 163
-#define WM_NCLBUTTONDOWN 161
-#define WM_NCLBUTTONUP 162
-#define WM_NCMBUTTONDBLCLK 169
-#define WM_NCMBUTTONDOWN 167
-#define WM_NCMBUTTONUP 168
-#if (_WIN32_WINNT >= 0x0500)
-#define WM_NCXBUTTONDOWN 171
-#define WM_NCXBUTTONUP 172
-#define WM_NCXBUTTONDBLCLK 173
-#define WM_NCMOUSEHOVER 0x02A0
-#define WM_NCMOUSELEAVE 0x02A2
-#endif
-#define WM_NCMOUSEMOVE 160
-#define WM_NCPAINT 133
-#define WM_NCRBUTTONDBLCLK 166
-#define WM_NCRBUTTONDOWN 164
-#define WM_NCRBUTTONUP 165
-#define WM_NEXTDLGCTL 40
-#define WM_NEXTMENU 531
-#define WM_NOTIFY 78
-#define WM_NOTIFYFORMAT 85
-#define WM_NULL 0
-#define WM_PAINT 15
-#define WM_PAINTCLIPBOARD 777
-#define WM_PAINTICON 38
-#define WM_PALETTECHANGED 785
-#define WM_PALETTEISCHANGING 784
-#define WM_PARENTNOTIFY 528
-#define WM_PASTE 770
-#define WM_PENWINFIRST 896
-#define WM_PENWINLAST 911
-#define WM_POWER 72
-#define WM_POWERBROADCAST 536
-#define WM_PRINT 791
-#define WM_PRINTCLIENT 792
-#define WM_QUERYDRAGICON 55
-#define WM_QUERYENDSESSION 17
-#define WM_QUERYNEWPALETTE 783
-#define WM_QUERYOPEN 19
-#define WM_QUEUESYNC 35
-#define WM_QUIT 18
-#define WM_RENDERALLFORMATS 774
-#define WM_RENDERFORMAT 773
-#define WM_SETCURSOR 32
-#define WM_SETFOCUS 7
-#define WM_SETFONT 48
-#define WM_SETHOTKEY 50
-#define WM_SETICON 128
-#define WM_SETREDRAW 11
-#define WM_SETTEXT 12
-#define WM_SETTINGCHANGE 26
-#define WM_SHOWWINDOW 24
-#define WM_SIZE 5
-#define WM_SIZECLIPBOARD 779
-#define WM_SIZING 532
-#define WM_SPOOLERSTATUS 42
-#define WM_STYLECHANGED 125
-#define WM_STYLECHANGING 124
-#define WM_SYSCHAR 262
-#define WM_SYSCOLORCHANGE 21
-#define WM_SYSCOMMAND 274
-#define WM_SYSDEADCHAR 263
-#define WM_SYSKEYDOWN 260
-#define WM_SYSKEYUP 261
-#define WM_TCARD 82
-#define WM_THEMECHANGED 794
-#define WM_TIMECHANGE 30
-#define WM_TIMER 275
-#define WM_UNDO 772
-#define WM_USER 1024
-#define WM_USERCHANGED 84
-#define WM_VKEYTOITEM 46
-#define WM_VSCROLL 277
-#define WM_VSCROLLCLIPBOARD 778
-#define WM_WINDOWPOSCHANGED 71
-#define WM_WINDOWPOSCHANGING 70
-#define WM_WININICHANGE 26
-#define WM_KEYFIRST 256
-#define WM_KEYLAST 264
-#define WM_SYNCPAINT 136
-#define WM_MOUSEACTIVATE 33
-#define WM_MOUSEMOVE 512
-#define WM_LBUTTONDOWN 513
-#define WM_LBUTTONUP 514
-#define WM_LBUTTONDBLCLK 515
-#define WM_RBUTTONDOWN 516
-#define WM_RBUTTONUP 517
-#define WM_RBUTTONDBLCLK 518
-#define WM_MBUTTONDOWN 519
-#define WM_MBUTTONUP 520
-#define WM_MBUTTONDBLCLK 521
-#define WM_MOUSEWHEEL 522
-#define WM_MOUSEFIRST 512
-#if (_WIN32_WINNT >= 0x0500)
-#define WM_XBUTTONDOWN 523
-#define WM_XBUTTONUP 524
-#define WM_XBUTTONDBLCLK 525
-#define WM_MOUSELAST 525
-#else
-#define WM_MOUSELAST 522
-#endif
-#define WM_MOUSEHOVER 0x2A1
-#define WM_MOUSELEAVE 0x2A3
-#if (_WIN32_WINNT >= 0x0400)
-#define WHEEL_DELTA 120
-#define GET_WHEEL_DELTA_WPARAM(wparam) ((short)HIWORD (wparam))
-#define WHEEL_PAGESCROLL UINT_MAX
-#endif
-#define BM_CLICK 245
-#define BM_GETCHECK 240
-#define BM_GETIMAGE 246
-#define BM_GETSTATE 242
-#define BM_SETCHECK 241
-#define BM_SETIMAGE 247
-#define BM_SETSTATE 243
-#define BM_SETSTYLE 244
-#define BN_CLICKED 0
-#define BN_DBLCLK 5
-#define BN_DISABLE 4
-#define BN_DOUBLECLICKED 5
-#define BN_HILITE 2
-#define BN_KILLFOCUS 7
-#define BN_PAINT 1
-#define BN_PUSHED 2
-#define BN_SETFOCUS 6
-#define BN_UNHILITE 3
-#define BN_UNPUSHED 3
-#define CB_ADDSTRING 323
-#define CB_DELETESTRING 324
-#define CB_DIR 325
-#define CB_FINDSTRING 332
-#define CB_FINDSTRINGEXACT 344
-#define CB_GETCOUNT 326
-#define CB_GETCURSEL 327
-#define CB_GETDROPPEDCONTROLRECT 338
-#define CB_GETDROPPEDSTATE 343
-#define CB_GETDROPPEDWIDTH 351
-#define CB_GETEDITSEL 320
-#define CB_GETEXTENDEDUI 342
-#define CB_GETHORIZONTALEXTENT 349
-#define CB_GETITEMDATA 336
-#define CB_GETITEMHEIGHT 340
-#define CB_GETLBTEXT 328
-#define CB_GETLBTEXTLEN 329
-#define CB_GETLOCALE 346
-#define CB_GETTOPINDEX 347
-#define CB_INITSTORAGE 353
-#define CB_INSERTSTRING 330
-#define CB_LIMITTEXT 321
-#define CB_RESETCONTENT 331
-#define CB_SELECTSTRING 333
-#define CB_SETCURSEL 334
-#define CB_SETDROPPEDWIDTH 352
-#define CB_SETEDITSEL 322
-#define CB_SETEXTENDEDUI 341
-#define CB_SETHORIZONTALEXTENT 350
-#define CB_SETITEMDATA 337
-#define CB_SETITEMHEIGHT 339
-#define CB_SETLOCALE 345
-#define CB_SETTOPINDEX 348
-#define CB_SHOWDROPDOWN 335
-#if (_WIN32_WINNT >= 0x0501)
-#define CB_SETMINVISIBLE 0x1701
-#define CB_GETMINVISIBLE 0x1702
-#endif
-#define CBN_CLOSEUP 8
-#define CBN_DBLCLK 2
-#define CBN_DROPDOWN 7
-#define CBN_EDITCHANGE 5
-#define CBN_EDITUPDATE 6
-#define CBN_ERRSPACE (-1)
-#define CBN_KILLFOCUS 4
-#define CBN_SELCHANGE 1
-#define CBN_SELENDCANCEL 10
-#define CBN_SELENDOK 9
-#define CBN_SETFOCUS 3
-#define EM_CANUNDO 198
-#define EM_CHARFROMPOS 215
-#define EM_EMPTYUNDOBUFFER 205
-#define EM_FMTLINES 200
-#define EM_GETFIRSTVISIBLELINE 206
-#define EM_GETHANDLE 189
-#define EM_GETLIMITTEXT 213
-#define EM_GETLINE 196
-#define EM_GETLINECOUNT 186
-#define EM_GETMARGINS 212
-#define EM_GETMODIFY 184
-#define EM_GETPASSWORDCHAR 210
-#define EM_GETRECT 178
-#define EM_GETSEL 176
-#define EM_GETTHUMB 190
-#define EM_GETWORDBREAKPROC 209
-#define EM_LIMITTEXT 197
-#define EM_LINEFROMCHAR 201
-#define EM_LINEINDEX 187
-#define EM_LINELENGTH 193
-#define EM_LINESCROLL 182
-#define EM_POSFROMCHAR 214
-#define EM_REPLACESEL 194
-#define EM_SCROLL 181
-#define EM_SCROLLCARET 183
-#define EM_SETHANDLE 188
-#define EM_SETLIMITTEXT 197
-#define EM_SETMARGINS 211
-#define EM_SETMODIFY 185
-#define EM_SETPASSWORDCHAR 204
-#define EM_SETREADONLY 207
-#define EM_SETRECT 179
-#define EM_SETRECTNP 180
-#define EM_SETSEL 177
-#define EM_SETTABSTOPS 203
-#define EM_SETWORDBREAKPROC 208
-#define EM_UNDO 199
-#if (WINVER >= 0x0500)
-#define EM_GETIMESTATUS 217
-#define EM_SETIMESTATUS 216
-#endif
-#define EN_CHANGE 768
-#define EN_ERRSPACE 1280
-#define EN_HSCROLL 1537
-#define EN_KILLFOCUS 512
-#define EN_MAXTEXT 1281
-#define EN_SETFOCUS 256
-#define EN_UPDATE 1024
-#define EN_VSCROLL 1538
-#define LB_ADDFILE 406
-#define LB_ADDSTRING 384
-#define LB_DELETESTRING 386
-#define LB_DIR 397
-#define LB_FINDSTRING 399
-#define LB_FINDSTRINGEXACT 418
-#define LB_GETANCHORINDEX 413
-#define LB_GETCARETINDEX 415
-#define LB_GETCOUNT 395
-#define LB_GETCURSEL 392
-#define LB_GETHORIZONTALEXTENT 403
-#define LB_GETITEMDATA 409
-#define LB_GETITEMHEIGHT 417
-#define LB_GETITEMRECT 408
-#define LB_GETLOCALE 422
-#define LB_GETSEL 391
-#define LB_GETSELCOUNT 400
-#define LB_GETSELITEMS 401
-#define LB_GETTEXT 393
-#define LB_GETTEXTLEN 394
-#define LB_GETTOPINDEX 398
-#define LB_INITSTORAGE 424
-#define LB_INSERTSTRING 385
-#define LB_ITEMFROMPOINT 425
-#define LB_RESETCONTENT 388
-#define LB_SELECTSTRING 396
-#define LB_SELITEMRANGE 411
-#define LB_SELITEMRANGEEX 387
-#define LB_SETANCHORINDEX 412
-#define LB_SETCARETINDEX 414
-#define LB_SETCOLUMNWIDTH 405
-#define LB_SETCOUNT 423
-#define LB_SETCURSEL 390
-#define LB_SETHORIZONTALEXTENT 404
-#define LB_SETITEMDATA 410
-#define LB_SETITEMHEIGHT 416
-#define LB_SETLOCALE 421
-#define LB_SETSEL 389
-#define LB_SETTABSTOPS 402
-#define LB_SETTOPINDEX 407
-#define LBN_DBLCLK 2
-#define LBN_ERRSPACE (-2)
-#define LBN_KILLFOCUS 5
-#define LBN_SELCANCEL 3
-#define LBN_SELCHANGE 1
-#define LBN_SETFOCUS 4
-#define SBM_ENABLE_ARROWS 228
-#define SBM_GETPOS 225
-#define SBM_GETRANGE 227
-#define SBM_GETSCROLLINFO 234
-#define SBM_SETPOS 224
-#define SBM_SETRANGE 226
-#define SBM_SETRANGEREDRAW 230
-#define SBM_SETSCROLLINFO 233
-#define STM_GETICON 369
-#define STM_GETIMAGE 371
-#define STM_SETICON 368
-#define STM_SETIMAGE 370
-#define STN_CLICKED 0
-#define STN_DBLCLK 1
-#define STN_DISABLE 3
-#define STN_ENABLE 2
-#define DM_GETDEFID WM_USER
-#define DM_SETDEFID (WM_USER+1)
-#define DM_REPOSITION (WM_USER+2)
-#define PSM_PAGEINFO (WM_USER+100)
-#define PSM_SHEETINFO (WM_USER+101)
-#define PSI_SETACTIVE 1
-#define PSI_KILLACTIVE 2
-#define PSI_APPLY 3
-#define PSI_RESET 4
-#define PSI_HASHELP 5
-#define PSI_HELP 6
-#define PSI_CHANGED 1
-#define PSI_GUISTART 2
-#define PSI_REBOOT 3
-#define PSI_GETSIBLINGS 4
-#define DCX_WINDOW 1
-#define DCX_CACHE 2
-#define DCX_PARENTCLIP 32
-#define DCX_CLIPSIBLINGS 16
-#define DCX_CLIPCHILDREN 8
-#define DCX_NORESETATTRS 4
-#define DCX_INTERSECTUPDATE 0x200
-#define DCX_LOCKWINDOWUPDATE 0x400
-#define DCX_EXCLUDERGN 64
-#define DCX_INTERSECTRGN 128
-#define DCX_VALIDATE 0x200000
-#define GMDI_GOINTOPOPUPS 2
-#define GMDI_USEDISABLED 1
-#define FKF_AVAILABLE 2
-#define FKF_CLICKON 64
-#define FKF_FILTERKEYSON 1
-#define FKF_HOTKEYACTIVE 4
-#define FKF_HOTKEYSOUND 16
-#define FKF_CONFIRMHOTKEY 8
-#define FKF_INDICATOR 32
-#define HCF_HIGHCONTRASTON 1
-#define HCF_AVAILABLE 2
-#define HCF_HOTKEYACTIVE 4
-#define HCF_CONFIRMHOTKEY 8
-#define HCF_HOTKEYSOUND 16
-#define HCF_INDICATOR 32
-#define HCF_HOTKEYAVAILABLE 64
-#define MKF_AVAILABLE 2
-#define MKF_CONFIRMHOTKEY 8
-#define MKF_HOTKEYACTIVE 4
-#define MKF_HOTKEYSOUND 16
-#define MKF_INDICATOR 32
-#define MKF_MOUSEKEYSON 1
-#define MKF_MODIFIERS 64
-#define MKF_REPLACENUMBERS 128
-#define SERKF_ACTIVE 8 /* May be obsolete. Not in recent MS docs. */
-#define SERKF_AVAILABLE 2
-#define SERKF_INDICATOR 4
-#define SERKF_SERIALKEYSON 1
-#define SSF_AVAILABLE 2
-#define SSF_SOUNDSENTRYON 1
-#define SSTF_BORDER 2
-#define SSTF_CHARS 1
-#define SSTF_DISPLAY 3
-#define SSTF_NONE 0
-#define SSGF_DISPLAY 3
-#define SSGF_NONE 0
-#define SSWF_CUSTOM 4
-#define SSWF_DISPLAY 3
-#define SSWF_NONE 0
-#define SSWF_TITLE 1
-#define SSWF_WINDOW 2
-#define SKF_AUDIBLEFEEDBACK 64
-#define SKF_AVAILABLE 2
-#define SKF_CONFIRMHOTKEY 8
-#define SKF_HOTKEYACTIVE 4
-#define SKF_HOTKEYSOUND 16
-#define SKF_INDICATOR 32
-#define SKF_STICKYKEYSON 1
-#define SKF_TRISTATE 128
-#define SKF_TWOKEYSOFF 256
-#define TKF_AVAILABLE 2
-#define TKF_CONFIRMHOTKEY 8
-#define TKF_HOTKEYACTIVE 4
-#define TKF_HOTKEYSOUND 16
-#define TKF_TOGGLEKEYSON 1
-#define MDITILE_SKIPDISABLED 2
-#define MDITILE_HORIZONTAL 1
-#define MDITILE_VERTICAL 0
-#define VK_LBUTTON 1
-#define VK_RBUTTON 2
-#define VK_CANCEL 3
-#define VK_MBUTTON 4
-#if (_WIN32_WINNT >= 0x0500)
-#define VK_XBUTTON1 5
-#define VK_XBUTTON2 6
-#endif
-#define VK_BACK 8
-#define VK_TAB 9
-#define VK_CLEAR 12
-#define VK_RETURN 13
-#define VK_SHIFT 16
-#define VK_CONTROL 17
-#define VK_MENU 18
-#define VK_PAUSE 19
-#define VK_CAPITAL 20
-#define VK_KANA 0x15
-#define VK_HANGEUL 0x15
-#define VK_HANGUL 0x15
-#define VK_JUNJA 0x17
-#define VK_FINAL 0x18
-#define VK_HANJA 0x19
-#define VK_KANJI 0x19
-#define VK_ESCAPE 0x1B
-#define VK_CONVERT 0x1C
-#define VK_NONCONVERT 0x1D
-#define VK_ACCEPT 0x1E
-#define VK_MODECHANGE 0x1F
-#define VK_SPACE 32
-#define VK_PRIOR 33
-#define VK_NEXT 34
-#define VK_END 35
-#define VK_HOME 36
-#define VK_LEFT 37
-#define VK_UP 38
-#define VK_RIGHT 39
-#define VK_DOWN 40
-#define VK_SELECT 41
-#define VK_PRINT 42
-#define VK_EXECUTE 43
-#define VK_SNAPSHOT 44
-#define VK_INSERT 45
-#define VK_DELETE 46
-#define VK_HELP 47
-#define VK_LWIN 0x5B
-#define VK_RWIN 0x5C
-#define VK_APPS 0x5D
-#define VK_SLEEP 0x5F
-#define VK_NUMPAD0 0x60
-#define VK_NUMPAD1 0x61
-#define VK_NUMPAD2 0x62
-#define VK_NUMPAD3 0x63
-#define VK_NUMPAD4 0x64
-#define VK_NUMPAD5 0x65
-#define VK_NUMPAD6 0x66
-#define VK_NUMPAD7 0x67
-#define VK_NUMPAD8 0x68
-#define VK_NUMPAD9 0x69
-#define VK_MULTIPLY 0x6A
-#define VK_ADD 0x6B
-#define VK_SEPARATOR 0x6C
-#define VK_SUBTRACT 0x6D
-#define VK_DECIMAL 0x6E
-#define VK_DIVIDE 0x6F
-#define VK_F1 0x70
-#define VK_F2 0x71
-#define VK_F3 0x72
-#define VK_F4 0x73
-#define VK_F5 0x74
-#define VK_F6 0x75
-#define VK_F7 0x76
-#define VK_F8 0x77
-#define VK_F9 0x78
-#define VK_F10 0x79
-#define VK_F11 0x7A
-#define VK_F12 0x7B
-#define VK_F13 0x7C
-#define VK_F14 0x7D
-#define VK_F15 0x7E
-#define VK_F16 0x7F
-#define VK_F17 0x80
-#define VK_F18 0x81
-#define VK_F19 0x82
-#define VK_F20 0x83
-#define VK_F21 0x84
-#define VK_F22 0x85
-#define VK_F23 0x86
-#define VK_F24 0x87
-#define VK_NUMLOCK 0x90
-#define VK_SCROLL 0x91
-#define VK_LSHIFT 0xA0
-#define VK_RSHIFT 0xA1
-#define VK_LCONTROL 0xA2
-#define VK_RCONTROL 0xA3
-#define VK_LMENU 0xA4
-#define VK_RMENU 0xA5
-#if (_WIN32_WINNT >= 0x0500)
-#define VK_BROWSER_BACK 0xA6
-#define VK_BROWSER_FORWARD 0xA7
-#define VK_BROWSER_REFRESH 0xA8
-#define VK_BROWSER_STOP 0xA9
-#define VK_BROWSER_SEARCH 0xAA
-#define VK_BROWSER_FAVORITES 0xAB
-#define VK_BROWSER_HOME 0xAC
-#define VK_VOLUME_MUTE 0xAD
-#define VK_VOLUME_DOWN 0xAE
-#define VK_VOLUME_UP 0xAF
-#define VK_MEDIA_NEXT_TRACK 0xB0
-#define VK_MEDIA_PREV_TRACK 0xB1
-#define VK_MEDIA_STOP 0xB2
-#define VK_MEDIA_PLAY_PAUSE 0xB3
-#define VK_LAUNCH_MAIL 0xB4
-#define VK_LAUNCH_MEDIA_SELECT 0xB5
-#define VK_LAUNCH_APP1 0xB6
-#define VK_LAUNCH_APP2 0xB7
-#endif
-#define VK_OEM_1 0xBA
-#if (_WIN32_WINNT >= 0x0500)
-#define VK_OEM_PLUS 0xBB
-#define VK_OEM_COMMA 0xBC
-#define VK_OEM_MINUS 0xBD
-#define VK_OEM_PERIOD 0xBE
-#endif
-#define VK_OEM_2 0xBF
-#define VK_OEM_3 0xC0
-#define VK_OEM_4 0xDB
-#define VK_OEM_5 0xDC
-#define VK_OEM_6 0xDD
-#define VK_OEM_7 0xDE
-#define VK_OEM_8 0xDF
-#if (_WIN32_WINNT >= 0x0500)
-#define VK_OEM_102 0xE2
-#endif
-#define VK_PROCESSKEY 0xE5
-#if (_WIN32_WINNT >= 0x0500)
-#define VK_PACKET 0xE7
-#endif
-#define VK_ATTN 0xF6
-#define VK_CRSEL 0xF7
-#define VK_EXSEL 0xF8
-#define VK_EREOF 0xF9
-#define VK_PLAY 0xFA
-#define VK_ZOOM 0xFB
-#define VK_NONAME 0xFC
-#define VK_PA1 0xFD
-#define VK_OEM_CLEAR 0xFE
-#define TME_HOVER 1
-#define TME_LEAVE 2
-#define TME_QUERY 0x40000000
-#define TME_CANCEL 0x80000000
-#define HOVER_DEFAULT 0xFFFFFFFF
-#define MK_LBUTTON 1
-#define MK_RBUTTON 2
-#define MK_SHIFT 4
-#define MK_CONTROL 8
-#define MK_MBUTTON 16
-#if(_WIN32_WINNT >= 0x0500)
-#define MK_XBUTTON1 32
-#define MK_XBUTTON2 64
-#endif
-#define TPM_CENTERALIGN 4
-#define TPM_LEFTALIGN 0
-#define TPM_RIGHTALIGN 8
-#define TPM_LEFTBUTTON 0
-#define TPM_RIGHTBUTTON 2
-#define TPM_HORIZONTAL 0
-#define TPM_VERTICAL 64
-#define TPM_TOPALIGN 0
-#define TPM_VCENTERALIGN 16
-#define TPM_BOTTOMALIGN 32
-#define TPM_NONOTIFY 128
-#define TPM_RETURNCMD 256
-#if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410)
-#define TPM_RECURSE 1
-#endif
-#define HELP_COMMAND 0x102
-#define HELP_CONTENTS 3
-#define HELP_CONTEXT 1
-#define HELP_CONTEXTPOPUP 8
-#define HELP_FORCEFILE 9
-#define HELP_HELPONHELP 4
-#define HELP_INDEX 3
-#define HELP_KEY 0x101
-#define HELP_MULTIKEY 0x201
-#define HELP_PARTIALKEY 0x105
-#define HELP_QUIT 2
-#define HELP_SETCONTENTS 5
-#define HELP_SETINDEX 5
-#define HELP_SETWINPOS 0x203
-#define HELP_CONTEXTMENU 0xa
-#define HELP_FINDER 0xb
-#define HELP_WM_HELP 0xc
-#define HELP_TCARD 0x8000
-#define HELP_TCARD_DATA 16
-#define HELP_TCARD_OTHER_CALLER 0x11
-#define IDH_NO_HELP 28440
-#define IDH_MISSING_CONTEXT 28441
-#define IDH_GENERIC_HELP_BUTTON 28442
-#define IDH_OK 28443
-#define IDH_CANCEL 28444
-#define IDH_HELP 28445
-#define LB_CTLCODE 0
-#define LB_OKAY 0
-#define LB_ERR (-1)
-#define LB_ERRSPACE (-2)
-#define CB_OKAY 0
-#define CB_ERR (-1)
-#define CB_ERRSPACE (-2)
-#define HIDE_WINDOW 0
-#define SHOW_OPENWINDOW 1
-#define SHOW_ICONWINDOW 2
-#define SHOW_FULLSCREEN 3
-#define SHOW_OPENNOACTIVATE 4
-#define SW_PARENTCLOSING 1
-#define SW_OTHERZOOM 2
-#define SW_PARENTOPENING 3
-#define SW_OTHERUNZOOM 4
-#define KF_EXTENDED 256
-#define KF_DLGMODE 2048
-#define KF_MENUMODE 4096
-#define KF_ALTDOWN 8192
-#define KF_REPEAT 16384
-#define KF_UP 32768
-#define WSF_VISIBLE 1
-#define PWR_OK 1
-#define PWR_FAIL (-1)
-#define PWR_SUSPENDREQUEST 1
-#define PWR_SUSPENDRESUME 2
-#define PWR_CRITICALRESUME 3
-#define NFR_ANSI 1
-#define NFR_UNICODE 2
-#define NF_QUERY 3
-#define NF_REQUERY 4
-#define MENULOOP_WINDOW 0
-#define MENULOOP_POPUP 1
-#define WMSZ_LEFT 1
-#define WMSZ_RIGHT 2
-#define WMSZ_TOP 3
-#define WMSZ_TOPLEFT 4
-#define WMSZ_TOPRIGHT 5
-#define WMSZ_BOTTOM 6
-#define WMSZ_BOTTOMLEFT 7
-#define WMSZ_BOTTOMRIGHT 8
-#define HTERROR (-2)
-#define HTTRANSPARENT (-1)
-#define HTNOWHERE 0
-#define HTCLIENT 1
-#define HTCAPTION 2
-#define HTSYSMENU 3
-#define HTGROWBOX 4
-#define HTSIZE 4
-#define HTMENU 5
-#define HTHSCROLL 6
-#define HTVSCROLL 7
-#define HTMINBUTTON 8
-#define HTMAXBUTTON 9
-#define HTREDUCE 8
-#define HTZOOM 9
-#define HTLEFT 10
-#define HTSIZEFIRST 10
-#define HTRIGHT 11
-#define HTTOP 12
-#define HTTOPLEFT 13
-#define HTTOPRIGHT 14
-#define HTBOTTOM 15
-#define HTBOTTOMLEFT 16
-#define HTBOTTOMRIGHT 17
-#define HTSIZELAST 17
-#define HTBORDER 18
-#define HTOBJECT 19
-#define HTCLOSE 20
-#define HTHELP 21
-#define MA_ACTIVATE 1
-#define MA_ACTIVATEANDEAT 2
-#define MA_NOACTIVATE 3
-#define MA_NOACTIVATEANDEAT 4
-#define SIZE_RESTORED 0
-#define SIZE_MINIMIZED 1
-#define SIZE_MAXIMIZED 2
-#define SIZE_MAXSHOW 3
-#define SIZE_MAXHIDE 4
-#define SIZENORMAL 0
-#define SIZEICONIC 1
-#define SIZEFULLSCREEN 2
-#define SIZEZOOMSHOW 3
-#define SIZEZOOMHIDE 4
-#define WVR_ALIGNTOP 16
-#define WVR_ALIGNLEFT 32
-#define WVR_ALIGNBOTTOM 64
-#define WVR_ALIGNRIGHT 128
-#define WVR_HREDRAW 256
-#define WVR_VREDRAW 512
-#define WVR_REDRAW (WVR_HREDRAW|WVR_VREDRAW)
-#define WVR_VALIDRECTS 1024
-#define PRF_CHECKVISIBLE 1
-#define PRF_NONCLIENT 2
-#define PRF_CLIENT 4
-#define PRF_ERASEBKGND 8
-#define PRF_CHILDREN 16
-#define PRF_OWNED 32
-#define IDANI_OPEN 1
-#define IDANI_CLOSE 2
-#define IDANI_CAPTION 3
-#define WPF_RESTORETOMAXIMIZED 2
-#define WPF_SETMINPOSITION 1
-#define ODT_MENU 1
-#define ODT_LISTBOX 2
-#define ODT_COMBOBOX 3
-#define ODT_BUTTON 4
-#define ODT_STATIC 5
-#define ODA_DRAWENTIRE 1
-#define ODA_SELECT 2
-#define ODA_FOCUS 4
-#define ODS_SELECTED 1
-#define ODS_GRAYED 2
-#define ODS_DISABLED 4
-#define ODS_CHECKED 8
-#define ODS_FOCUS 16
-#define ODS_DEFAULT 32
-#define ODS_COMBOBOXEDIT 4096
-#define IDHOT_SNAPWINDOW (-1)
-#define IDHOT_SNAPDESKTOP (-2)
-#define DBWF_LPARAMPOINTER 0x8000
-#define DLGWINDOWEXTRA 30
-#define MNC_IGNORE 0
-#define MNC_CLOSE 1
-#define MNC_EXECUTE 2
-#define MNC_SELECT 3
-#define DOF_EXECUTABLE 0x8001
-#define DOF_DOCUMENT 0x8002
-#define DOF_DIRECTORY 0x8003
-#define DOF_MULTIPLE 0x8004
-#define DOF_PROGMAN 1
-#define DOF_SHELLDATA 2
-#define DO_DROPFILE 0x454C4946
-#define DO_PRINTFILE 0x544E5250
-#define SW_SCROLLCHILDREN 1
-#define SW_INVALIDATE 2
-#define SW_ERASE 4
-#if (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= 0x0500)
-#define SW_SMOOTHSCROLL 0x0010
-#endif /* (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= 0x0500) */
-#define SC_SIZE 0xF000
-#define SC_MOVE 0xF010
-#define SC_MINIMIZE 0xF020
-#define SC_ICON 0xf020
-#define SC_MAXIMIZE 0xF030
-#define SC_ZOOM 0xF030
-#define SC_NEXTWINDOW 0xF040
-#define SC_PREVWINDOW 0xF050
-#define SC_CLOSE 0xF060
-#define SC_VSCROLL 0xF070
-#define SC_HSCROLL 0xF080
-#define SC_MOUSEMENU 0xF090
-#define SC_KEYMENU 0xF100
-#define SC_ARRANGE 0xF110
-#define SC_RESTORE 0xF120
-#define SC_TASKLIST 0xF130
-#define SC_SCREENSAVE 0xF140
-#define SC_HOTKEY 0xF150
-#define SC_DEFAULT 0xF160
-#define SC_MONITORPOWER 0xF170
-#define SC_CONTEXTHELP 0xF180
-#define SC_SEPARATOR 0xF00F
-#define EC_LEFTMARGIN 1
-#define EC_RIGHTMARGIN 2
-#define EC_USEFONTINFO 0xffff
-#define DC_HASDEFID 0x534B
-#define DLGC_WANTARROWS 1
-#define DLGC_WANTTAB 2
-#define DLGC_WANTALLKEYS 4
-#define DLGC_WANTMESSAGE 4
-#define DLGC_HASSETSEL 8
-#define DLGC_DEFPUSHBUTTON 16
-#define DLGC_UNDEFPUSHBUTTON 32
-#define DLGC_RADIOBUTTON 64
-#define DLGC_WANTCHARS 128
-#define DLGC_STATIC 256
-#define DLGC_BUTTON 0x2000
-#define LB_CTLCODE 0
-#define WA_INACTIVE 0
-#define WA_ACTIVE 1
-#define WA_CLICKACTIVE 2
-#define ICON_SMALL 0
-#define ICON_BIG 1
-#if (_WIN32_WINNT >= 0x0501)
-#define ICON_SMALL2 2
-#endif
-#define HBMMENU_CALLBACK ((HBITMAP) -1)
-#define HBMMENU_SYSTEM ((HBITMAP)1)
-#define HBMMENU_MBAR_RESTORE ((HBITMAP)2)
-#define HBMMENU_MBAR_MINIMIZE ((HBITMAP)3)
-#define HBMMENU_MBAR_CLOSE ((HBITMAP)5)
-#define HBMMENU_MBAR_CLOSE_D ((HBITMAP)6)
-#define HBMMENU_MBAR_MINIMIZE_D ((HBITMAP)7)
-#define HBMMENU_POPUP_CLOSE ((HBITMAP)8)
-#define HBMMENU_POPUP_RESTORE ((HBITMAP)9)
-#define HBMMENU_POPUP_MAXIMIZE ((HBITMAP)10)
-#define HBMMENU_POPUP_MINIMIZE ((HBITMAP)11)
-#define MOD_ALT 1
-#define MOD_CONTROL 2
-#define MOD_SHIFT 4
-#define MOD_WIN 8
-#define MOD_IGNORE_ALL_MODIFIER 1024
-#define MOD_ON_KEYUP 2048
-#define MOD_RIGHT 16384
-#define MOD_LEFT 32768
-#define LLKHF_EXTENDED (KF_EXTENDED >> 8)
-#define LLKHF_INJECTED 0x00000010
-#define LLKHF_ALTDOWN (KF_ALTDOWN >> 8)
-#define LLKHF_UP (KF_UP >> 8)
-#if (WINVER >= 0x0500)
-#define FLASHW_STOP 0
-#define FLASHW_CAPTION 1
-#define FLASHW_TRAY 2
-#define FLASHW_ALL (FLASHW_CAPTION|FLASHW_TRAY)
-#define FLASHW_TIMER 4
-#define FLASHW_TIMERNOFG 12
-#endif /* (WINVER >= 0x0500) */
-#define CURSOR_SHOWING 0x00000001
-#define WS_ACTIVECAPTION 0x00000001
-#if (_WIN32_WINNT >= 0x0403)
-#define INPUT_MOUSE 0x00000000
-#define INPUT_KEYBOARD 0x00000001
-#define INPUT_HARDWARE 0x00000002
-#endif /* (_WIN32_WINNT >= 0x0403) */
-#if (WINVER >= 0x0400)
-#define ENDSESSION_LOGOFF 0x80000000
-#endif
-#if (WINVER >= 0x0500)
-#define CHILDID_SELF 0
-#define OBJID_WINDOW 0x00000000
-#define OBJID_SYSMENU 0xFFFFFFFF
-#define OBJID_TITLEBAR 0xFFFFFFFE
-#define OBJID_MENU 0xFFFFFFFD
-#define OBJID_CLIENT 0xFFFFFFFC
-#define OBJID_VSCROLL 0xFFFFFFFB
-#define OBJID_HSCROLL 0xFFFFFFFA
-#define OBJID_SIZEGRIP 0xFFFFFFF9
-#define OBJID_CARET 0xFFFFFFF8
-#define OBJID_CURSOR 0xFFFFFFF7
-#define OBJID_ALERT 0xFFFFFFF6
-#define OBJID_SOUND 0xFFFFFFF5
-#define GUI_CARETBLINKING 0x00000001
-#define GUI_INMOVESIZE 0x00000002
-#define GUI_INMENUMODE 0x00000004
-#define GUI_SYSTEMMENUMODE 0x00000008
-#define GUI_POPUPMENUMODE 0x00000010
-#if (_WIN32_WINNT >= 0x0501)
-#define GUI_16BITTASK 0x00000020
-#endif
-#define WINEVENT_OUTOFCONTEXT 0x0000
-#define WINEVENT_SKIPOWNTHREAD 0x0001
-#define WINEVENT_SKIPOWNPROCESS 0x0002
-#define WINEVENT_INCONTEXT 0x0004
-#define AW_HOR_POSITIVE 0x00000001
-#define AW_HOR_NEGATIVE 0x00000002
-#define AW_VER_POSITIVE 0x00000004
-#define AW_VER_NEGATIVE 0x00000008
-#define AW_CENTER 0x00000010
-#define AW_HIDE 0x00010000
-#define AW_ACTIVATE 0x00020000
-#define AW_SLIDE 0x00040000
-#define AW_BLEND 0x00080000
-#define DEVICE_NOTIFY_WINDOW_HANDLE 0x00000000
-#define DEVICE_NOTIFY_SERVICE_HANDLE 0x00000001
-#if (_WIN32_WINNT >= 0x0501)
-#define DEVICE_NOTIFY_ALL_INTERFACE_CLASSES 0x00000004
-#endif
-#define EVENT_MIN 0x00000001
-#define EVENT_SYSTEM_SOUND 0x00000001
-#define EVENT_SYSTEM_ALERT 0x00000002
-#define EVENT_SYSTEM_FOREGROUND 0x00000003
-#define EVENT_SYSTEM_MENUSTART 0x00000004
-#define EVENT_SYSTEM_MENUEND 0x00000005
-#define EVENT_SYSTEM_MENUPOPUPSTART 0x00000006
-#define EVENT_SYSTEM_MENUPOPUPEND 0x00000007
-#define EVENT_SYSTEM_CAPTURESTART 0x00000008
-#define EVENT_SYSTEM_CAPTUREEND 0x00000009
-#define EVENT_SYSTEM_MOVESIZESTART 0x0000000a
-#define EVENT_SYSTEM_MOVESIZEEND 0x0000000b
-#define EVENT_SYSTEM_CONTEXTHELPSTART 0x0000000c
-#define EVENT_SYSTEM_CONTEXTHELPEND 0x0000000d
-#define EVENT_SYSTEM_DRAGDROPSTART 0x0000000e
-#define EVENT_SYSTEM_DRAGDROPEND 0x0000000f
-#define EVENT_SYSTEM_DIALOGSTART 0x00000010
-#define EVENT_SYSTEM_DIALOGEND 0x00000011
-#define EVENT_SYSTEM_SCROLLINGSTART 0x00000012
-#define EVENT_SYSTEM_SCROLLINGEND 0x00000013
-#define EVENT_SYSTEM_SWITCHSTART 0x00000014
-#define EVENT_SYSTEM_SWITCHEND 0x00000015
-#define EVENT_SYSTEM_MINIMIZESTART 0x00000016
-#define EVENT_SYSTEM_MINIMIZEEND 0x00000017
-#define EVENT_OBJECT_CREATE 0x00008000
-#define EVENT_OBJECT_DESTROY 0x00008001
-#define EVENT_OBJECT_SHOW 0x00008002
-#define EVENT_OBJECT_HIDE 0x00008003
-#define EVENT_OBJECT_REORDER 0x00008004
-#define EVENT_OBJECT_FOCUS 0x00008005
-#define EVENT_OBJECT_SELECTION 0x00008006
-#define EVENT_OBJECT_SELECTIONADD 0x00008007
-#define EVENT_OBJECT_SELECTIONREMOVE 0x00008008
-#define EVENT_OBJECT_SELECTIONWITHIN 0x00008009
-#define EVENT_OBJECT_STATECHANGE 0x0000800a
-#define EVENT_OBJECT_LOCATIONCHANGE 0x0000800b
-#define EVENT_OBJECT_NAMECHANGE 0x0000800c
-#define EVENT_OBJECT_DESCRIPTIONCHANGE 0x0000800d
-#define EVENT_OBJECT_VALUECHANGE 0x0000800e
-#define EVENT_OBJECT_PARENTCHANGE 0x0000800f
-#define EVENT_OBJECT_HELPCHANGE 0x00008010
-#define EVENT_OBJECT_DEFACTIONCHANGE 0x00008011
-#define EVENT_OBJECT_ACCELERATORCHANGE 0x00008012
-#if (_WIN32_WINNT >= 0x0501)
-#define EVENT_CONSOLE_CARET 0x00004001
-#define CONSOLE_CARET_SELECTION 0x00000001
-#define CONSOLE_CARET_VISIBLE 0x00000002
-#define EVENT_CONSOLE_UPDATE_REGION 0x00004002
-#define EVENT_CONSOLE_UPDATE_SIMPLE 0x00004003
-#define EVENT_CONSOLE_UPDATE_SCROLL 0x00004004
-#define EVENT_CONSOLE_LAYOUT 0x00004005
-#define EVENT_CONSOLE_START_APPLICATION 0x00004006
-#define CONSOLE_APPLICATION_16BIT 0x00000001
-#define EVENT_CONSOLE_END_APPLICATION 0x00004007
-#endif /* (_WIN32_WINNT >= 0x0501) */
-#define EVENT_MAX 0x7fffffff
-#endif /* (WINVER >= 0x0500) */
-#if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0490)
-#define ASFW_ANY ((DWORD)-1)
-#define LSFW_LOCK 1
-#define LSFW_UNLOCK 2
-#endif
-#if (_WIN32_WINNT >= 0x0500)
-#define LWA_COLORKEY 0x01
-#define LWA_ALPHA 0x02
-#define ULW_COLORKEY 0x01
-#define ULW_ALPHA 0x02
-#define ULW_OPAQUE 0x04
-#endif
-#define GA_PARENT 1
-#define GA_ROOT 2
-#define GA_ROOTOWNER 3
-#if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410)
-#define MONITOR_DEFAULTTONULL 0
-#define MONITOR_DEFAULTTOPRIMARY 1
-#define MONITOR_DEFAULTTONEAREST 2
-#define MONITORINFOF_PRIMARY 1
-#define EDS_RAWMODE 0x00000002
-#define ISMEX_NOSEND 0x00000000
-#define ISMEX_CALLBACK 0x00000004
-#define ISMEX_NOTIFY 0x00000002
-#define ISMEX_REPLIED 0x00000008
-#define ISMEX_SEND 0x00000001
-#endif
-#if (_WIN32_WINNT >= 0x0500)
-#define GR_GDIOBJECTS 0
-#define GR_USEROBJECTS 1
-#endif
-#if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0490)
-#define GMMP_USE_DISPLAY_POINTS 1
-#define GMMP_USE_HIGH_RESOLUTION_POINTS 2
-#endif
-#if (_WIN32_WINNT >= 0x0500)
-#define XBUTTON1 0x0001
-#define XBUTTON2 0x0002
-#endif
-#if (_WIN32_WINNT >= 0x0501)
-#define FE_FONTSMOOTHINGSTANDARD 0x0001
-#define FE_FONTSMOOTHINGCLEARTYPE 0x0002
-#define PW_CLIENTONLY 0x00000001
-#define RIM_INPUT 0x00000000
-#define RIM_INPUTSINK 0x00000001
-#define RIM_TYPEMOUSE 0x00000000
-#define RIM_TYPEKEYBOARD 0x00000001
-#define RIM_TYPEHID 0x00000002
-#define MOUSE_MOVE_RELATIVE 0x00000000
-#define MOUSE_MOVE_ABSOLUTE 0x00000001
-#define MOUSE_VIRTUAL_DESKTOP 0x00000002
-#define MOUSE_ATTRIBUTES_CHANGED 0x00000004
-#define RI_MOUSE_LEFT_BUTTON_DOWN 0x0001
-#define RI_MOUSE_LEFT_BUTTON_UP 0x0002
-#define RI_MOUSE_RIGHT_BUTTON_DOWN 0x0004
-#define RI_MOUSE_RIGHT_BUTTON_UP 0x0008
-#define RI_MOUSE_MIDDLE_BUTTON_DOWN 0x0010
-#define RI_MOUSE_MIDDLE_BUTTON_UP 0x0020
-#define RI_MOUSE_BUTTON_1_DOWN RI_MOUSE_LEFT_BUTTON_DOWN
-#define RI_MOUSE_BUTTON_1_UP RI_MOUSE_LEFT_BUTTON_UP
-#define RI_MOUSE_BUTTON_2_DOWN RI_MOUSE_RIGHT_BUTTON_DOWN
-#define RI_MOUSE_BUTTON_2_UP RI_MOUSE_RIGHT_BUTTON_UP
-#define RI_MOUSE_BUTTON_3_DOWN RI_MOUSE_MIDDLE_BUTTON_DOWN
-#define RI_MOUSE_BUTTON_3_UP RI_MOUSE_MIDDLE_BUTTON_UP
-#define RI_MOUSE_BUTTON_4_DOWN 0x0040
-#define RI_MOUSE_BUTTON_4_UP 0x0080
-#define RI_MOUSE_BUTTON_5_DOWN 0x0100
-#define RI_MOUSE_BUTTON_5_UP 0x0200
-#define RI_MOUSE_WHEEL 0x0400
-#define KEYBOARD_OVERRUN_MAKE_CODE 0x00ff
-#define RI_KEY_MAKE 0x0000
-#define RI_KEY_BREAK 0x0001
-#define RI_KEY_E0 0x0002
-#define RI_KEY_E1 0x0004
-#define RI_KEY_TERMSRV_SET_LED 0x0008
-#define RI_KEY_TERMSRV_SHADOW 0x0010
-#define RID_INPUT 0x10000003
-#define RID_HEADER 0x10000005
-#define RIDI_PREPARSEDDATA 0x20000005
-#define RIDI_DEVICENAME 0x20000007
-#define RIDI_DEVICEINFO 0x2000000b
-#define RIDEV_REMOVE 0x00000001
-#define RIDEV_EXCLUDE 0x00000010
-#define RIDEV_PAGEONLY 0x00000020
-#define RIDEV_NOLEGACY 0x00000030
-#define RIDEV_INPUTSINK 0x00000100
-#define RIDEV_CAPTUREMOUSE 0x00000200
-#define RIDEV_NOHOTKEYS 0x00000200
-#define RIDEV_APPKEYS 0x00000400
-#endif
-
-#ifndef RC_INVOKED
-typedef BOOL(CALLBACK *DLGPROC)(HWND,UINT,WPARAM,LPARAM);
-typedef VOID(CALLBACK *TIMERPROC)(HWND,UINT,UINT,DWORD);
-typedef BOOL(CALLBACK *GRAYSTRINGPROC)(HDC,LPARAM,int);
-typedef LRESULT(CALLBACK *HOOKPROC)(int,WPARAM,LPARAM);
-typedef BOOL(CALLBACK *PROPENUMPROCA)(HWND,LPCSTR,HANDLE);
-typedef BOOL(CALLBACK *PROPENUMPROCW)(HWND,LPCWSTR,HANDLE);
-typedef BOOL(CALLBACK *PROPENUMPROCEXA)(HWND,LPSTR,HANDLE,DWORD);
-typedef BOOL(CALLBACK *PROPENUMPROCEXW)(HWND,LPWSTR,HANDLE,DWORD);
-typedef int(CALLBACK *EDITWORDBREAKPROCA)(LPSTR,int,int,int);
-typedef int(CALLBACK *EDITWORDBREAKPROCW)(LPWSTR,int,int,int);
-typedef LRESULT(CALLBACK *WNDPROC)(HWND,UINT,WPARAM,LPARAM);
-typedef BOOL(CALLBACK *DRAWSTATEPROC)(HDC,LPARAM,WPARAM,int,int);
-typedef BOOL(CALLBACK *WNDENUMPROC)(HWND,LPARAM);
-typedef BOOL(CALLBACK *ENUMWINDOWSPROC)(HWND,LPARAM);
-typedef BOOL(CALLBACK* MONITORENUMPROC)(HMONITOR,HDC,LPRECT,LPARAM);
-typedef BOOL(CALLBACK *NAMEENUMPROCA)(LPSTR,LPARAM);
-typedef BOOL(CALLBACK *NAMEENUMPROCW)(LPWSTR,LPARAM);
-typedef NAMEENUMPROCA DESKTOPENUMPROCA;
-typedef NAMEENUMPROCW DESKTOPENUMPROCW;
-typedef NAMEENUMPROCA WINSTAENUMPROCA;
-typedef NAMEENUMPROCW WINSTAENUMPROCW;
-typedef void(CALLBACK *SENDASYNCPROC)(HWND,UINT,DWORD,LRESULT);
-DECLARE_HANDLE(HHOOK);
-DECLARE_HANDLE(HDWP);
-DECLARE_HANDLE(HDEVNOTIFY);
-typedef struct tagMENUGETOBJECTINFO {
- DWORD dwFlags;
- UINT uPos;
- HMENU hmenu;
- PVOID riid;
- PVOID pvObj;
-} MENUGETOBJECTINFO, *PMENUGETOBJECTINFO;
-typedef struct tagACCEL {
- BYTE fVirt;
- WORD key;
- WORD cmd;
-} ACCEL,*LPACCEL;
-typedef struct tagACCESSTIMEOUT {
- UINT cbSize;
- DWORD dwFlags;
- DWORD iTimeOutMSec;
-} ACCESSTIMEOUT, *LPACCESSTIMEOUT;
-typedef struct tagANIMATIONINFO {
- UINT cbSize;
- int iMinAnimate;
-} ANIMATIONINFO,*LPANIMATIONINFO;
-typedef struct tagCREATESTRUCTA {
- LPVOID lpCreateParams;
- HINSTANCE hInstance;
- HMENU hMenu;
- HWND hwndParent;
- int cy;
- int cx;
- int y;
- int x;
- LONG style;
- LPCSTR lpszName;
- LPCSTR lpszClass;
- DWORD dwExStyle;
-} CREATESTRUCTA,*LPCREATESTRUCTA;
-typedef struct tagCREATESTRUCTW {
- LPVOID lpCreateParams;
- HINSTANCE hInstance;
- HMENU hMenu;
- HWND hwndParent;
- int cy;
- int cx;
- int y;
- int x;
- LONG style;
- LPCWSTR lpszName;
- LPCWSTR lpszClass;
- DWORD dwExStyle;
-} CREATESTRUCTW,*LPCREATESTRUCTW;
-typedef struct tagCBT_CREATEWNDA {
- LPCREATESTRUCTA lpcs;
- HWND hwndInsertAfter;
-} CBT_CREATEWNDA, *LPCBT_CREATEWNDA;
-typedef struct tagCBT_CREATEWNDW {
- LPCREATESTRUCTW lpcs;
- HWND hwndInsertAfter;
-} CBT_CREATEWNDW, *LPCBT_CREATEWNDW;
-typedef struct tagCBTACTIVATESTRUCT {
- BOOL fMouse;
- HWND hWndActive;
-} CBTACTIVATESTRUCT,*LPCBTACTIVATESTRUCT;
-typedef struct tagCLIENTCREATESTRUCT {
- HANDLE hWindowMenu;
- UINT idFirstChild;
-} CLIENTCREATESTRUCT,*LPCLIENTCREATESTRUCT;
-typedef struct tagCOMPAREITEMSTRUCT {
- UINT CtlType;
- UINT CtlID;
- HWND hwndItem;
- UINT itemID1;
- DWORD itemData1;
- UINT itemID2;
- DWORD itemData2;
- DWORD dwLocaleId;
-} COMPAREITEMSTRUCT,*LPCOMPAREITEMSTRUCT;
-typedef struct tagCOPYDATASTRUCT {
- DWORD dwData;
- DWORD cbData;
- PVOID lpData;
-} COPYDATASTRUCT,*PCOPYDATASTRUCT;
-typedef struct tagCURSORSHAPE {
- int xHotSpot;
- int yHotSpot;
- int cx;
- int cy;
- int cbWidth;
- BYTE Planes;
- BYTE BitsPixel;
-} CURSORSHAPE,*LPCURSORSHAPE;
-typedef struct tagCWPRETSTRUCT {
- LRESULT lResult;
- LPARAM lParam;
- WPARAM wParam;
- DWORD message;
- HWND hwnd;
-} CWPRETSTRUCT;
-typedef struct tagCWPSTRUCT {
- LPARAM lParam;
- WPARAM wParam;
- UINT message;
- HWND hwnd;
-} CWPSTRUCT,*PCWPSTRUCT;
-typedef struct tagDEBUGHOOKINFO {
- DWORD idThread;
- DWORD idThreadInstaller;
- LPARAM lParam;
- WPARAM wParam;
- int code;
-} DEBUGHOOKINFO,*PDEBUGHOOKINFO,*LPDEBUGHOOKINFO;
-typedef struct tagDELETEITEMSTRUCT {
- UINT CtlType;
- UINT CtlID;
- UINT itemID;
- HWND hwndItem;
- UINT itemData;
-} DELETEITEMSTRUCT,*PDELETEITEMSTRUCT,*LPDELETEITEMSTRUCT;
-#pragma pack(push,2)
-typedef struct {
- DWORD style;
- DWORD dwExtendedStyle;
- short x;
- short y;
- short cx;
- short cy;
- WORD id;
-} DLGITEMTEMPLATE,*LPDLGITEMTEMPLATE;
-typedef struct {
- DWORD style;
- DWORD dwExtendedStyle;
- WORD cdit;
- short x;
- short y;
- short cx;
- short cy;
-} DLGTEMPLATE,*LPDLGTEMPLATE,*LPDLGTEMPLATEA,*LPDLGTEMPLATEW;
-typedef const DLGTEMPLATE *LPCDLGTEMPLATE;
-#pragma pack(pop)
-typedef struct tagDRAWITEMSTRUCT {
- UINT CtlType;
- UINT CtlID;
- UINT itemID;
- UINT itemAction;
- UINT itemState;
- HWND hwndItem;
- HDC hDC;
- RECT rcItem;
- DWORD itemData;
-} DRAWITEMSTRUCT,*LPDRAWITEMSTRUCT,*PDRAWITEMSTRUCT;
-typedef struct {
- UINT cbSize;
- int iTabLength;
- int iLeftMargin;
- int iRightMargin;
- UINT uiLengthDrawn;
-} DRAWTEXTPARAMS,*LPDRAWTEXTPARAMS;
-typedef struct tagPAINTSTRUCT {
- HDC hdc;
- BOOL fErase;
- RECT rcPaint;
- BOOL fRestore;
- BOOL fIncUpdate;
- BYTE rgbReserved[32];
-} PAINTSTRUCT,*LPPAINTSTRUCT;
-typedef struct tagMSG {
- HWND hwnd;
- UINT message;
- WPARAM wParam;
- LPARAM lParam;
- DWORD time;
- POINT pt;
-} MSG,*LPMSG,*PMSG;
-typedef struct _ICONINFO {
- BOOL fIcon;
- DWORD xHotspot;
- DWORD yHotspot;
- HBITMAP hbmMask;
- HBITMAP hbmColor;
-} ICONINFO,*PICONINFO;
-typedef struct tagNMHDR {
- HWND hwndFrom;
- UINT idFrom;
- UINT code;
-} NMHDR,*LPNMHDR;
-typedef struct _WNDCLASSA {
- UINT style;
- WNDPROC lpfnWndProc;
- int cbClsExtra;
- int cbWndExtra;
- HINSTANCE hInstance;
- HICON hIcon;
- HCURSOR hCursor;
- HBRUSH hbrBackground;
- LPCSTR lpszMenuName;
- LPCSTR lpszClassName;
-} WNDCLASSA,*LPWNDCLASSA,*PWNDCLASSA;
-typedef struct _WNDCLASSW {
- UINT style;
- WNDPROC lpfnWndProc;
- int cbClsExtra;
- int cbWndExtra;
- HINSTANCE hInstance;
- HICON hIcon;
- HCURSOR hCursor;
- HBRUSH hbrBackground;
- LPCWSTR lpszMenuName;
- LPCWSTR lpszClassName;
-} WNDCLASSW,*LPWNDCLASSW,*PWNDCLASSW;
-typedef struct _WNDCLASSEXA {
- UINT cbSize;
- UINT style;
- WNDPROC lpfnWndProc;
- int cbClsExtra;
- int cbWndExtra;
- HINSTANCE hInstance;
- HICON hIcon;
- HCURSOR hCursor;
- HBRUSH hbrBackground;
- LPCSTR lpszMenuName;
- LPCSTR lpszClassName;
- HICON hIconSm;
-} WNDCLASSEXA,*LPWNDCLASSEXA,*PWNDCLASSEXA;
-typedef struct _WNDCLASSEXW {
- UINT cbSize;
- UINT style;
- WNDPROC lpfnWndProc;
- int cbClsExtra;
- int cbWndExtra;
- HINSTANCE hInstance;
- HICON hIcon;
- HCURSOR hCursor;
- HBRUSH hbrBackground;
- LPCWSTR lpszMenuName;
- LPCWSTR lpszClassName;
- HICON hIconSm;
-} WNDCLASSEXW,*LPWNDCLASSEXW,*PWNDCLASSEXW;
-typedef struct tagMENUITEMINFOA {
- UINT cbSize;
- UINT fMask;
- UINT fType;
- UINT fState;
- UINT wID;
- HMENU hSubMenu;
- HBITMAP hbmpChecked;
- HBITMAP hbmpUnchecked;
- DWORD dwItemData;
- LPSTR dwTypeData;
- UINT cch;
-#if (_WIN32_WINNT >= 0x0500)
- HBITMAP hbmpItem;
-#endif
-} MENUITEMINFOA,*LPMENUITEMINFOA;
-typedef const MENUITEMINFOA *LPCMENUITEMINFOA;
-typedef struct tagMENUITEMINFOW {
- UINT cbSize;
- UINT fMask;
- UINT fType;
- UINT fState;
- UINT wID;
- HMENU hSubMenu;
- HBITMAP hbmpChecked;
- HBITMAP hbmpUnchecked;
- DWORD dwItemData;
- LPWSTR dwTypeData;
- UINT cch;
-#if (_WIN32_WINNT >= 0x0500)
- HBITMAP hbmpItem;
-#endif
-} MENUITEMINFOW,*LPMENUITEMINFOW;
-typedef const MENUITEMINFOW *LPCMENUITEMINFOW;
-typedef struct tagSCROLLINFO {
- UINT cbSize;
- UINT fMask;
- int nMin;
- int nMax;
- UINT nPage;
- int nPos;
- int nTrackPos;
-} SCROLLINFO,*LPSCROLLINFO;
-typedef const SCROLLINFO *LPCSCROLLINFO;
-typedef struct _WINDOWPLACEMENT {
- UINT length;
- UINT flags;
- UINT showCmd;
- POINT ptMinPosition;
- POINT ptMaxPosition;
- RECT rcNormalPosition;
-} WINDOWPLACEMENT,*LPWINDOWPLACEMENT,*PWINDOWPLACEMENT;
-typedef struct {
- WORD versionNumber;
- WORD offset;
-} MENUITEMTEMPLATEHEADER;
-typedef struct {
- WORD mtOption;
- WORD mtID;
- WCHAR mtString[1];
-} MENUITEMTEMPLATE;
-typedef void MENUTEMPLATE,MENUTEMPLATEA,MENUTEMPLATEW,*LPMENUTEMPLATEA,*LPMENUTEMPLATEW,*LPMENUTEMPLATE;
-typedef struct tagHELPINFO {
- UINT cbSize;
- int iContextType;
- int iCtrlId;
- HANDLE hItemHandle;
- DWORD dwContextId;
- POINT MousePos;
-} HELPINFO,*LPHELPINFO;
-typedef void(CALLBACK *MSGBOXCALLBACK)(LPHELPINFO);
-typedef struct {
- UINT cbSize;
- HWND hwndOwner;
- HINSTANCE hInstance;
- LPCSTR lpszText;
- LPCSTR lpszCaption;
- DWORD dwStyle;
- LPCSTR lpszIcon;
- DWORD dwContextHelpId;
- MSGBOXCALLBACK lpfnMsgBoxCallback;
- DWORD dwLanguageId;
-} MSGBOXPARAMSA,*PMSGBOXPARAMSA,*LPMSGBOXPARAMSA;
-typedef struct {
- UINT cbSize;
- HWND hwndOwner;
- HINSTANCE hInstance;
- LPCWSTR lpszText;
- LPCWSTR lpszCaption;
- DWORD dwStyle;
- LPCWSTR lpszIcon;
- DWORD dwContextHelpId;
- MSGBOXCALLBACK lpfnMsgBoxCallback;
- DWORD dwLanguageId;
-} MSGBOXPARAMSW,*PMSGBOXPARAMSW,*LPMSGBOXPARAMSW;
-typedef struct tagUSEROBJECTFLAGS {
- BOOL fInherit;
- BOOL fReserved;
- DWORD dwFlags;
-} USEROBJECTFLAGS;
-typedef struct tagFILTERKEYS {
- UINT cbSize;
- DWORD dwFlags;
- DWORD iWaitMSec;
- DWORD iDelayMSec;
- DWORD iRepeatMSec;
- DWORD iBounceMSec;
-} FILTERKEYS;
-typedef struct tagHIGHCONTRASTA {
- UINT cbSize;
- DWORD dwFlags;
- LPSTR lpszDefaultScheme;
-} HIGHCONTRASTA,*LPHIGHCONTRASTA;
-typedef struct tagHIGHCONTRASTW {
- UINT cbSize;
- DWORD dwFlags;
- LPWSTR lpszDefaultScheme;
-} HIGHCONTRASTW,*LPHIGHCONTRASTW;
-#ifndef NOGDI
-typedef struct tagICONMETRICSA {
- UINT cbSize;
- int iHorzSpacing;
- int iVertSpacing;
- int iTitleWrap;
- LOGFONTA lfFont;
-} ICONMETRICSA,*LPICONMETRICSA;
-typedef struct tagICONMETRICSW {
- UINT cbSize;
- int iHorzSpacing;
- int iVertSpacing;
- int iTitleWrap;
- LOGFONTW lfFont;
-} ICONMETRICSW,*LPICONMETRICSW;
-#endif /* NOGDI */
-typedef struct tagMINIMIZEDMETRICS {
- UINT cbSize;
- int iWidth;
- int iHorzGap;
- int iVertGap;
- int iArrange;
-} MINIMIZEDMETRICS,*LPMINIMIZEDMETRICS;
-typedef struct tagMOUSEKEYS{
- UINT cbSize;
- DWORD dwFlags;
- DWORD iMaxSpeed;
- DWORD iTimeToMaxSpeed;
- DWORD iCtrlSpeed;
- DWORD dwReserved1;
- DWORD dwReserved2;
-} MOUSEKEYS,*LPMOUSEKEYS;
-#ifndef NOGDI
-typedef struct tagNONCLIENTMETRICSA {
- UINT cbSize;
- int iBorderWidth;
- int iScrollWidth;
- int iScrollHeight;
- int iCaptionWidth;
- int iCaptionHeight;
- LOGFONTA lfCaptionFont;
- int iSmCaptionWidth;
- int iSmCaptionHeight;
- LOGFONTA lfSmCaptionFont;
- int iMenuWidth;
- int iMenuHeight;
- LOGFONTA lfMenuFont;
- LOGFONTA lfStatusFont;
- LOGFONTA lfMessageFont;
-} NONCLIENTMETRICSA,*LPNONCLIENTMETRICSA;
-typedef struct tagNONCLIENTMETRICSW {
- UINT cbSize;
- int iBorderWidth;
- int iScrollWidth;
- int iScrollHeight;
- int iCaptionWidth;
- int iCaptionHeight;
- LOGFONTW lfCaptionFont;
- int iSmCaptionWidth;
- int iSmCaptionHeight;
- LOGFONTW lfSmCaptionFont;
- int iMenuWidth;
- int iMenuHeight;
- LOGFONTW lfMenuFont;
- LOGFONTW lfStatusFont;
- LOGFONTW lfMessageFont;
-} NONCLIENTMETRICSW,*LPNONCLIENTMETRICSW;
-#endif
-typedef struct tagSERIALKEYSA {
- UINT cbSize;
- DWORD dwFlags;
- LPSTR lpszActivePort;
- LPSTR lpszPort;
- UINT iBaudRate;
- UINT iPortState;
- UINT iActive;
-} SERIALKEYSA,*LPSERIALKEYSA;
-typedef struct tagSERIALKEYSW {
- UINT cbSize;
- DWORD dwFlags;
- LPWSTR lpszActivePort;
- LPWSTR lpszPort;
- UINT iBaudRate;
- UINT iPortState;
- UINT iActive;
-} SERIALKEYSW,*LPSERIALKEYSW;
-typedef struct tagSOUNDSENTRYA {
- UINT cbSize;
- DWORD dwFlags;
- DWORD iFSTextEffect;
- DWORD iFSTextEffectMSec;
- DWORD iFSTextEffectColorBits;
- DWORD iFSGrafEffect;
- DWORD iFSGrafEffectMSec;
- DWORD iFSGrafEffectColor;
- DWORD iWindowsEffect;
- DWORD iWindowsEffectMSec;
- LPSTR lpszWindowsEffectDLL;
- DWORD iWindowsEffectOrdinal;
-} SOUNDSENTRYA,*LPSOUNDSENTRYA;
-typedef struct tagSOUNDSENTRYW {
- UINT cbSize;
- DWORD dwFlags;
- DWORD iFSTextEffect;
- DWORD iFSTextEffectMSec;
- DWORD iFSTextEffectColorBits;
- DWORD iFSGrafEffect;
- DWORD iFSGrafEffectMSec;
- DWORD iFSGrafEffectColor;
- DWORD iWindowsEffect;
- DWORD iWindowsEffectMSec;
- LPWSTR lpszWindowsEffectDLL;
- DWORD iWindowsEffectOrdinal;
-} SOUNDSENTRYW,*LPSOUNDSENTRYW;
-typedef struct tagSTICKYKEYS {
- DWORD cbSize;
- DWORD dwFlags;
-} STICKYKEYS,*LPSTICKYKEYS;
-typedef struct tagTOGGLEKEYS {
- DWORD cbSize;
- DWORD dwFlags;
-} TOGGLEKEYS;
-typedef struct tagMOUSEHOOKSTRUCT {
- POINT pt;
- HWND hwnd;
- UINT wHitTestCode;
- DWORD dwExtraInfo;
-} MOUSEHOOKSTRUCT,*LPMOUSEHOOKSTRUCT,*PMOUSEHOOKSTRUCT;
-typedef struct tagTRACKMOUSEEVENT {
- DWORD cbSize;
- DWORD dwFlags;
- HWND hwndTrack;
- DWORD dwHoverTime;
-} TRACKMOUSEEVENT,*LPTRACKMOUSEEVENT;
-typedef struct tagTPMPARAMS {
- UINT cbSize;
- RECT rcExclude;
-} TPMPARAMS,*LPTPMPARAMS;
-typedef struct tagEVENTMSG {
- UINT message;
- UINT paramL;
- UINT paramH;
- DWORD time;
- HWND hwnd;
-} EVENTMSG,*PEVENTMSGMSG,*LPEVENTMSGMSG,*PEVENTMSG,*LPEVENTMSG;
-typedef struct _WINDOWPOS {
- HWND hwnd;
- HWND hwndInsertAfter;
- int x;
- int y;
- int cx;
- int cy;
- UINT flags;
-} WINDOWPOS,*PWINDOWPOS,*LPWINDOWPOS;
-typedef struct tagNCCALCSIZE_PARAMS {
- RECT rgrc[3];
- PWINDOWPOS lppos;
-} NCCALCSIZE_PARAMS, *LPNCCALCSIZE_PARAMS;
-typedef struct tagMDICREATESTRUCTA {
- LPCSTR szClass;
- LPCSTR szTitle;
- HANDLE hOwner;
- int x;
- int y;
- int cx;
- int cy;
- DWORD style;
- LPARAM lParam;
-} MDICREATESTRUCTA,*LPMDICREATESTRUCTA;
-typedef struct tagMDICREATESTRUCTW {
- LPCWSTR szClass;
- LPCWSTR szTitle;
- HANDLE hOwner;
- int x;
- int y;
- int cx;
- int cy;
- DWORD style;
- LPARAM lParam;
-} MDICREATESTRUCTW,*LPMDICREATESTRUCTW;
-typedef struct tagMINMAXINFO {
- POINT ptReserved;
- POINT ptMaxSize;
- POINT ptMaxPosition;
- POINT ptMinTrackSize;
- POINT ptMaxTrackSize;
-} MINMAXINFO,*PMINMAXINFO,*LPMINMAXINFO;
-typedef struct tagMDINEXTMENU {
- HMENU hmenuIn;
- HMENU hmenuNext;
- HWND hwndNext;
-} MDINEXTMENU,*PMDINEXTMENU,*LPMDINEXTMENU;
-typedef struct tagMEASUREITEMSTRUCT {
- UINT CtlType;
- UINT CtlID;
- UINT itemID;
- UINT itemWidth;
- UINT itemHeight;
- DWORD itemData;
-} MEASUREITEMSTRUCT,*PMEASUREITEMSTRUCT,*LPMEASUREITEMSTRUCT;
-typedef struct tagDROPSTRUCT {
- HWND hwndSource;
- HWND hwndSink;
- DWORD wFmt;
- DWORD dwData;
- POINT ptDrop;
- DWORD dwControlData;
-} DROPSTRUCT,*PDROPSTRUCT,*LPDROPSTRUCT;
-typedef DWORD HELPPOLY;
-typedef struct tagMULTIKEYHELPA {
- DWORD mkSize;
- CHAR mkKeylist;
- CHAR szKeyphrase[1];
-} MULTIKEYHELPA,*PMULTIKEYHELPA,*LPMULTIKEYHELPA;
-typedef struct tagMULTIKEYHELPW {
- DWORD mkSize;
- WCHAR mkKeylist;
- WCHAR szKeyphrase[1];
-} MULTIKEYHELPW,*PMULTIKEYHELPW,*LPMULTIKEYHELPW;
-typedef struct tagHELPWININFOA {
- int wStructSize;
- int x;
- int y;
- int dx;
- int dy;
- int wMax;
- CHAR rgchMember[2];
-} HELPWININFOA,*PHELPWININFOA,*LPHELPWININFOA;
-typedef struct tagHELPWININFOW {
- int wStructSize;
- int x;
- int y;
- int dx;
- int dy;
- int wMax;
- WCHAR rgchMember[2];
-} HELPWININFOW,*PHELPWININFOW,*LPHELPWININFOW;
-typedef struct tagSTYLESTRUCT {
- DWORD styleOld;
- DWORD styleNew;
-} STYLESTRUCT,*LPSTYLESTRUCT;
-typedef struct tagALTTABINFO {
- DWORD cbSize;
- int cItems;
- int cColumns;
- int cRows;
- int iColFocus;
- int iRowFocus;
- int cxItem;
- int cyItem;
- POINT ptStart;
-} ALTTABINFO,*PALTTABINFO,*LPALTTABINFO;
-typedef struct tagCOMBOBOXINFO {
- DWORD cbSize;
- RECT rcItem;
- RECT rcButton;
- DWORD stateButton;
- HWND hwndCombo;
- HWND hwndItem;
- HWND hwndList;
-} COMBOBOXINFO,*PCOMBOBOXINFO,*LPCOMBOBOXINFO;
-typedef struct tagCURSORINFO {
- DWORD cbSize;
- DWORD flags;
- HCURSOR hCursor;
- POINT ptScreenPos;
-} CURSORINFO,*PCURSORINFO,*LPCURSORINFO;
-typedef struct tagMENUBARINFO {
- DWORD cbSize;
- RECT rcBar;
- HMENU hMenu;
- HWND hwndMenu;
- BOOL fBarFocused:1;
- BOOL fFocused:1;
-} MENUBARINFO,*PMENUBARINFO;
-typedef struct tagMENUINFO {
- DWORD cbSize;
- DWORD fMask;
- DWORD dwStyle;
- UINT cyMax;
- HBRUSH hbrBack;
- DWORD dwContextHelpID;
- ULONG_PTR dwMenuData;
-} MENUINFO,*LPMENUINFO;
-typedef MENUINFO CONST *LPCMENUINFO;
-#define CCHILDREN_SCROLLBAR 5
-typedef struct tagSCROLLBARINFO {
- DWORD cbSize;
- RECT rcScrollBar;
- int dxyLineButton;
- int xyThumbTop;
- int xyThumbBottom;
- int reserved;
- DWORD rgstate[CCHILDREN_SCROLLBAR+1];
-} SCROLLBARINFO,*PSCROLLBARINFO,*LPSCROLLBARINFO;
-#if (_WIN32_WINDOWS >= 0x0410)
-#define CCHILDREN_TITLEBAR 5
-typedef struct tagTITLEBARINFO {
- DWORD cbSize;
- RECT rcTitleBar;
- DWORD rgstate[CCHILDREN_TITLEBAR+1];
-} TITLEBARINFO,*PTITLEBARINFO,*LPTITLEBARINFO;
-#endif
-typedef struct tagWINDOWINFO {
- DWORD cbSize;
- RECT rcWindow;
- RECT rcClient;
- DWORD dwStyle;
- DWORD dwExStyle;
- DWORD dwWindowStatus;
- UINT cxWindowBorders;
- UINT cyWindowBorders;
- ATOM atomWindowType;
- WORD wCreatorVersion;
-} WINDOWINFO,*PWINDOWINFO,*LPWINDOWINFO;
-typedef struct tagLASTINPUTINFO {
- UINT cbSize;
- DWORD dwTime;
-} LASTINPUTINFO,*PLASTINPUTINFO;
-typedef struct tagMONITORINFO {
- DWORD cbSize;
- RECT rcMonitor;
- RECT rcWork;
- DWORD dwFlags;
-} MONITORINFO,*LPMONITORINFO;
-#define CCHDEVICENAME 32
-#ifdef __cplusplus
-typedef struct tagMONITORINFOEXA : public tagMONITORINFO
-{
- CHAR szDevice[CCHDEVICENAME];
-} MONITORINFOEXA, *LPMONITORINFOEXA;
-typedef struct tagMONITORINFOEXW : public tagMONITORINFO
-{
- WCHAR szDevice[CCHDEVICENAME];
-} MONITORINFOEXW, *LPMONITORINFOEXW;
-#else
-typedef struct tagMONITORINFOEXA {
- DWORD cbSize;
- RECT rcMonitor;
- RECT rcWork;
- DWORD dwFlags;
- CHAR szDevice[CCHDEVICENAME];
-} MONITORINFOEXA,*LPMONITORINFOEXA;
-typedef struct tagMONITORINFOEXW {
- DWORD cbSize;
- RECT rcMonitor;
- RECT rcWork;
- DWORD dwFlags;
- WCHAR szDevice[CCHDEVICENAME];
-} MONITORINFOEXW,*LPMONITORINFOEXW;
-#endif /* __cplusplus */
-typedef struct tagKBDLLHOOKSTRUCT {
- DWORD vkCode;
- DWORD scanCode;
- DWORD flags;
- DWORD time;
- DWORD dwExtraInfo;
-} KBDLLHOOKSTRUCT,*LPKBDLLHOOKSTRUCT,*PKBDLLHOOKSTRUCT;
-#if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410)
-typedef struct {
- UINT cbSize;
- HWND hwnd;
- DWORD dwFlags;
- UINT uCount;
- DWORD dwTimeout;
-} FLASHWINFO,*PFLASHWINFO;
-#endif /* (WINVER >= 0x0500 || _WIN32_WINDOWS >= 0x0410) */
-#if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0490)
-typedef struct tagMOUSEMOVEPOINT {
- int x;
- int y;
- DWORD time;
- ULONG_PTR dwExtraInfo;
-} MOUSEMOVEPOINT,*PMOUSEMOVEPOINT,*LPMOUSEMOVEPOINT;
-#endif
-#if (_WIN32_WINNT >= 0x0403)
-typedef struct tagMOUSEINPUT {
- LONG dx;
- LONG dy;
- DWORD mouseData;
- DWORD dwFlags;
- DWORD time;
- ULONG_PTR dwExtraInfo;
-} MOUSEINPUT,*PMOUSEINPUT;
-typedef struct tagKEYBDINPUT {
- WORD wVk;
- WORD wScan;
- DWORD dwFlags;
- DWORD time;
- ULONG_PTR dwExtraInfo;
-} KEYBDINPUT,*PKEYBDINPUT;
-typedef struct tagHARDWAREINPUT {
- DWORD uMsg;
- WORD wParamL;
- WORD wParamH;
-} HARDWAREINPUT,*PHARDWAREINPUT;
-typedef struct tagINPUT {
- DWORD type;
- _ANONYMOUS_UNION union {
- MOUSEINPUT mi;
- KEYBDINPUT ki;
- HARDWAREINPUT hi;
- } DUMMYUNIONNAME;
-} INPUT,*PINPUT,*LPINPUT;
-#endif /* (_WIN32_WINNT >= 0x0403) */
-#if (WINVER >= 0x0500)
-typedef struct tagGUITHREADINFO {
- DWORD cbSize;
- DWORD flags;
- HWND hwndActive;
- HWND hwndFocus;
- HWND hwndCapture;
- HWND hwndMenuOwner;
- HWND hwndMoveSize;
- HWND hwndCaret;
- RECT rcCaret;
-} GUITHREADINFO,*PGUITHREADINFO,*LPGUITHREADINFO;
-typedef VOID (*WINEVENTPROC)(HWINEVENTHOOK,DWORD,HWND,LONG,LONG,DWORD,DWORD);
-#endif /* (WINVER >= 0x0500) */
-#if (_WIN32_WINNT >= 0x0501)
-typedef struct {
- UINT cbSize;
- HDESK hdesk;
- HWND hwnd;
- LUID luid;
-} BSMINFO,*PBSMINFO;
-DECLARE_HANDLE(HRAWINPUT);
-typedef struct tagRAWINPUTHEADER {
- DWORD dwType;
- DWORD dwSize;
- HANDLE hDevice;
- WPARAM wParam;
-} RAWINPUTHEADER,*PRAWINPUTHEADER;
-typedef struct tagRAWMOUSE {
- USHORT usFlags;
- _ANONYMOUS_UNION union {
- ULONG ulButtons;
- _ANONYMOUS_STRUCT struct {
- USHORT usButtonFlags;
- USHORT usButtonData;
- };
- };
- ULONG ulRawButtons;
- LONG lLastX;
- LONG lLastY;
- ULONG ulExtraInformation;
-} RAWMOUSE,*PRAWMOUSE,*LPRAWMOUSE;
-typedef struct tagRAWKEYBOARD {
- USHORT MakeCode;
- USHORT Flags;
- USHORT Reserved;
- USHORT VKey;
- UINT Message;
- ULONG ExtraInformation;
-} RAWKEYBOARD,*PRAWKEYBOARD,*LPRAWKEYBOARD;
-typedef struct tagRAWHID {
- DWORD dwSizeHid;
- DWORD dwCount;
- BYTE bRawData;
-} RAWHID,*PRAWHID,*LPRAWHID;
-typedef struct tagRAWINPUT {
- RAWINPUTHEADER header;
- union {
- RAWMOUSE mouse;
- RAWKEYBOARD keyboard;
- RAWHID hid;
- } data;
-} RAWINPUT,*PRAWINPUT,*LPRAWINPUT;
-typedef struct tagRAWINPUTDEVICE {
- USHORT usUsagePage;
- USHORT usUsage;
- DWORD dwFlags;
- HWND hwndTarget;
-} RAWINPUTDEVICE,*PRAWINPUTDEVICE,*LPRAWINPUTDEVICE;
-typedef const RAWINPUTDEVICE *PCRAWINPUTDEVICE;
-typedef struct tagRAWINPUTDEVICELIST {
- HANDLE hDevice;
- DWORD dwType;
-} RAWINPUTDEVICELIST,*PRAWINPUTDEVICELIST;
-typedef struct tagRID_DEVICE_INFO_MOUSE {
- DWORD dwId;
- DWORD dwNumberOfButtons;
- DWORD dwSampleRate;
- BOOL fHasHorizontalWheel;
-} RID_DEVICE_INFO_MOUSE, *PRID_DEVICE_INFO_MOUSE;
-typedef struct tagRID_DEVICE_INFO_KEYBOARD {
- DWORD dwType;
- DWORD dwSubType;
- DWORD dwKeyboardMode;
- DWORD dwNumberOfFunctionKeys;
- DWORD dwNumberOfIndicators;
- DWORD dwNumberOfKeysTotal;
-} RID_DEVICE_INFO_KEYBOARD, *PRID_DEVICE_INFO_KEYBOARD;
-typedef struct tagRID_DEVICE_INFO_HID {
- DWORD dwVendorId;
- DWORD dwProductId;
- DWORD dwVersionNumber;
- USHORT usUsagePage;
- USHORT usUsage;
-} RID_DEVICE_INFO_HID, *PRID_DEVICE_INFO_HID;
-typedef struct tagRID_DEVICE_INFO {
- DWORD cbSize;
- DWORD dwType;
- _ANONYMOUS_UNION union {
- RID_DEVICE_INFO_MOUSE mouse;
- RID_DEVICE_INFO_KEYBOARD keyboard;
- RID_DEVICE_INFO_HID hid;
- } DUMMYUNIONNAME;
-} RID_DEVICE_INFO, *PRID_DEVICE_INFO, *LPRID_DEVICE_INFO;
-#endif /* (_WIN32_WINNT >= 0x0501) */
-
-typedef struct {
- POINT pt;
- DWORD mouseData;
- DWORD flags;
- DWORD time;
- ULONG_PTR dwExtraInfo;
-} MSLLHOOKSTRUCT, *PMSLLHOOKSTRUCT;
-
-#define AnsiToOem CharToOemA
-#define OemToAnsi OemToCharA
-#define AnsiToOemBuff CharToOemBuffA
-#define OemToAnsiBuff OemToCharBuffA
-#define AnsiUpper CharUpperA
-#define AnsiUpperBuff CharUpperBuffA
-#define AnsiLower CharLowerA
-#define AnsiLowerBuff CharLowerBuffA
-#define AnsiNext CharNextA
-#define AnsiPrev CharPrevA
-#define MAKELPARAM(l,h) ((LPARAM)MAKELONG(l,h))
-#define MAKEWPARAM(l,h) ((WPARAM)MAKELONG(l,h))
-#define MAKELRESULT(l,h) ((LRESULT)MAKELONG(l,h))
-#define POINTSTOPOINT(p,ps) { \
- (p).x=LOWORD(*(DWORD *)&ps); \
- (p).y=HIWORD(*(DWORD *)&ps); \
-}
-#define POINTTOPOINTS(p) ((POINTS)MAKELONG((p).x,(p).y))
-
-#ifndef _LPCGUID_DEFINED
-#define _LPCGUID_DEFINED
-typedef const GUID *LPCGUID;
-#endif
-
-#if (_WIN32_WINNT >= 0x0600)
-typedef HANDLE HPOWERNOTIFY;
-
-typedef struct {
- GUID PowerSetting;
- DWORD DataLength;
- UCHAR Data[1];
-} POWERBROADCAST_SETTING, *PPOWERBROADCAST_SETTING;
-
-extern const GUID GUID_POWERSCHEME_PERSONALITY;
-extern const GUID GUID_MIN_POWER_SAVINGS;
-extern const GUID GUID_MAX_POWER_SAVINGS;
-extern const GUID GUID_TYPICAL_POWER_SAVINGS;
-extern const GUID GUID_ACDC_POWER_SOURCE;
-extern const GUID GUID_BATTERY_PERCENTAGE_REMAINING;
-extern const GUID GUID_IDLE_BACKGROUND_TASK;
-extern const GUID GUID_SYSTEM_AWAYMODE;
-extern const GUID GUID_MONITOR_POWER_ON;
-#endif
-
-WINUSERAPI HKL WINAPI ActivateKeyboardLayout(HKL,UINT);
-WINUSERAPI BOOL WINAPI AdjustWindowRect(LPRECT,DWORD,BOOL);
-WINUSERAPI BOOL WINAPI AdjustWindowRectEx(LPRECT,DWORD,BOOL,DWORD);
-#if (_WIN32_WINNT >= 0x0500)
-WINUSERAPI BOOL WINAPI AnimateWindow(HWND,DWORD,DWORD);
-#endif /* (_WIN32_WINNT >= 0x0500) */
-WINUSERAPI BOOL WINAPI AnyPopup(void);
-WINUSERAPI BOOL WINAPI AppendMenuA(HMENU,UINT,UINT_PTR,LPCSTR);
-WINUSERAPI BOOL WINAPI AppendMenuW(HMENU,UINT,UINT_PTR,LPCWSTR);
-WINUSERAPI UINT WINAPI ArrangeIconicWindows(HWND);
-WINUSERAPI BOOL WINAPI AttachThreadInput(DWORD,DWORD,BOOL);
-WINUSERAPI HDWP WINAPI BeginDeferWindowPos(int);
-WINUSERAPI HDC WINAPI BeginPaint(HWND,LPPAINTSTRUCT);
-WINUSERAPI BOOL WINAPI BringWindowToTop(HWND);
-WINUSERAPI long WINAPI BroadcastSystemMessage(DWORD,LPDWORD,UINT,WPARAM,LPARAM);
-#if (_WIN32_WINNT >= 0x0400)
-WINUSERAPI long WINAPI BroadcastSystemMessageA(DWORD,LPDWORD,UINT,WPARAM,LPARAM);
-WINUSERAPI long WINAPI BroadcastSystemMessageW(DWORD,LPDWORD,UINT,WPARAM,LPARAM);
-#endif /* (_WIN32_WINNT >= 0x0400) */
-#if (_WIN32_WINNT >= 0x0501)
-WINUSERAPI long WINAPI BroadcastSystemMessageExA(DWORD,LPDWORD,UINT,WPARAM,LPARAM,PBSMINFO);
-WINUSERAPI long WINAPI BroadcastSystemMessageExW(DWORD,LPDWORD,UINT,WPARAM,LPARAM,PBSMINFO);
-#endif /* (_WIN32_WINNT >= 0x0501) */
-WINUSERAPI BOOL WINAPI CallMsgFilterA(LPMSG,INT);
-WINUSERAPI BOOL WINAPI CallMsgFilterW(LPMSG,INT);
-WINUSERAPI LRESULT WINAPI CallNextHookEx(HHOOK,int,WPARAM,LPARAM);
-WINUSERAPI LRESULT WINAPI CallWindowProcA(WNDPROC,HWND,UINT,WPARAM,LPARAM);
-WINUSERAPI LRESULT WINAPI CallWindowProcW(WNDPROC,HWND,UINT,WPARAM,LPARAM);
-WINUSERAPI WORD WINAPI CascadeWindows(HWND,UINT,LPCRECT,UINT,const HWND*);
-WINUSERAPI BOOL WINAPI ChangeClipboardChain(HWND,HWND);
-#ifndef NOGDI
-WINUSERAPI LONG WINAPI ChangeDisplaySettingsA(PDEVMODEA,DWORD);
-WINUSERAPI LONG WINAPI ChangeDisplaySettingsW(PDEVMODEW,DWORD);
-WINUSERAPI LONG WINAPI ChangeDisplaySettingsExA(LPCSTR,LPDEVMODEA,HWND,DWORD,LPVOID);
-WINUSERAPI LONG WINAPI ChangeDisplaySettingsExW(LPCWSTR,LPDEVMODEW,HWND,DWORD,LPVOID);
-#endif
-WINUSERAPI BOOL WINAPI ChangeMenuA(HMENU,UINT,LPCSTR,UINT,UINT);
-WINUSERAPI BOOL WINAPI ChangeMenuW(HMENU,UINT,LPCWSTR,UINT,UINT);
-WINUSERAPI LPSTR WINAPI CharLowerA(LPSTR);
-WINUSERAPI LPWSTR WINAPI CharLowerW(LPWSTR);
-WINUSERAPI DWORD WINAPI CharLowerBuffA(LPSTR,DWORD);
-WINUSERAPI DWORD WINAPI CharLowerBuffW(LPWSTR,DWORD);
-WINUSERAPI LPSTR WINAPI CharNextA(LPCSTR);
-WINUSERAPI LPWSTR WINAPI CharNextW(LPCWSTR);
-WINUSERAPI LPSTR WINAPI CharNextExA(WORD,LPCSTR,DWORD);
-WINUSERAPI LPSTR WINAPI CharPrevA(LPCSTR,LPCSTR);
-WINUSERAPI LPWSTR WINAPI CharPrevW(LPCWSTR,LPCWSTR);
-WINUSERAPI LPSTR WINAPI CharPrevExA(WORD,LPCSTR,LPCSTR,DWORD);
-WINUSERAPI BOOL WINAPI CharToOemA(LPCSTR,LPSTR);
-WINUSERAPI BOOL WINAPI CharToOemW(LPCWSTR,LPSTR);
-WINUSERAPI BOOL WINAPI CharToOemBuffA(LPCSTR,LPSTR,DWORD);
-WINUSERAPI BOOL WINAPI CharToOemBuffW(LPCWSTR,LPSTR,DWORD);
-WINUSERAPI LPSTR WINAPI CharUpperA(LPSTR);
-WINUSERAPI LPWSTR WINAPI CharUpperW(LPWSTR);
-WINUSERAPI DWORD WINAPI CharUpperBuffA(LPSTR,DWORD);
-WINUSERAPI DWORD WINAPI CharUpperBuffW(LPWSTR,DWORD);
-WINUSERAPI BOOL WINAPI CheckDlgButton(HWND,int,UINT);
-WINUSERAPI DWORD WINAPI CheckMenuItem(HMENU,UINT,UINT);
-WINUSERAPI BOOL WINAPI CheckMenuRadioItem(HMENU,UINT,UINT,UINT,UINT);
-WINUSERAPI BOOL WINAPI CheckRadioButton(HWND,int,int,int);
-WINUSERAPI HWND WINAPI ChildWindowFromPoint(HWND,POINT);
-WINUSERAPI HWND WINAPI ChildWindowFromPointEx(HWND,POINT,UINT);
-WINUSERAPI BOOL WINAPI ClientToScreen(HWND,LPPOINT);
-WINUSERAPI BOOL WINAPI ClipCursor(LPCRECT);
-WINUSERAPI BOOL WINAPI CloseClipboard(void);
-WINUSERAPI BOOL WINAPI CloseDesktop(HDESK);
-WINUSERAPI BOOL WINAPI CloseWindow(HWND);
-WINUSERAPI BOOL WINAPI CloseWindowStation(HWINSTA);
-WINUSERAPI int WINAPI CopyAcceleratorTableA(HACCEL,LPACCEL,int);
-WINUSERAPI int WINAPI CopyAcceleratorTableW(HACCEL,LPACCEL,int);
-#define CopyCursor(c) ((HCURSOR)CopyIcon((HICON)(c)))
-WINUSERAPI HICON WINAPI CopyIcon(HICON);
-WINUSERAPI HANDLE WINAPI CopyImage(HANDLE,UINT,int,int,UINT);
-WINUSERAPI BOOL WINAPI CopyRect(LPRECT,LPCRECT);
-WINUSERAPI int WINAPI CountClipboardFormats(void);
-WINUSERAPI HACCEL WINAPI CreateAcceleratorTableA(LPACCEL,int);
-WINUSERAPI HACCEL WINAPI CreateAcceleratorTableW(LPACCEL,int);
-WINUSERAPI BOOL WINAPI CreateCaret(HWND,HBITMAP,int,int);
-WINUSERAPI HCURSOR WINAPI CreateCursor(HINSTANCE,int,int,int,int,PCVOID,PCVOID);
-#ifndef NOGDI
-WINUSERAPI HDESK WINAPI CreateDesktopA(LPCSTR,LPCSTR,LPDEVMODEA,DWORD,ACCESS_MASK,LPSECURITY_ATTRIBUTES);
-WINUSERAPI HDESK WINAPI CreateDesktopW(LPCWSTR,LPCWSTR,LPDEVMODEW,DWORD,ACCESS_MASK,LPSECURITY_ATTRIBUTES);
-#endif
-#define CreateDialogA(h,n,w,f) CreateDialogParamA(h,n,w,f,0)
-#define CreateDialogW(h,n,w,f) CreateDialogParamW(h,n,w,f,0)
-#define CreateDialogIndirectA(h,t,w,f) CreateDialogIndirectParamA(h,t,w,f,0)
-#define CreateDialogIndirectW(h,t,w,f) CreateDialogIndirectParamW(h,t,w,f,0)
-WINUSERAPI HWND WINAPI CreateDialogIndirectParamA(HINSTANCE,LPCDLGTEMPLATE,HWND,DLGPROC,LPARAM);
-WINUSERAPI HWND WINAPI CreateDialogIndirectParamW(HINSTANCE,LPCDLGTEMPLATE,HWND,DLGPROC,LPARAM);
-WINUSERAPI HWND WINAPI CreateDialogParamA(HINSTANCE,LPCSTR,HWND,DLGPROC,LPARAM);
-WINUSERAPI HWND WINAPI CreateDialogParamW(HINSTANCE,LPCWSTR,HWND,DLGPROC,LPARAM);
-WINUSERAPI HICON WINAPI CreateIcon(HINSTANCE,int,int,BYTE,BYTE,const BYTE*,const BYTE*);
-WINUSERAPI HICON WINAPI CreateIconFromResource(PBYTE,DWORD,BOOL,DWORD);
-WINUSERAPI HICON WINAPI CreateIconFromResourceEx(PBYTE,DWORD,BOOL,DWORD,int,int,UINT);
-WINUSERAPI HICON WINAPI CreateIconIndirect(PICONINFO);
-WINUSERAPI HWND WINAPI CreateMDIWindowA(LPCSTR,LPCSTR,DWORD,int,int,int,int,HWND,HINSTANCE,LPARAM);
-WINUSERAPI HWND WINAPI CreateMDIWindowW(LPCWSTR,LPCWSTR,DWORD,int,int,int,int,HWND,HINSTANCE,LPARAM);
-WINUSERAPI HMENU WINAPI CreateMenu(void);
-WINUSERAPI HMENU WINAPI CreatePopupMenu(void);
-#define CreateWindowA(a,b,c,d,e,f,g,h,i,j,k) CreateWindowExA(0,a,b,c,d,e,f,g,h,i,j,k)
-#define CreateWindowW(a,b,c,d,e,f,g,h,i,j,k) CreateWindowExW(0,a,b,c,d,e,f,g,h,i,j,k)
-WINUSERAPI HWND WINAPI CreateWindowExA(DWORD,LPCSTR,LPCSTR,DWORD,int,int,int,int,HWND,HMENU,HINSTANCE,LPVOID);
-WINUSERAPI HWND WINAPI CreateWindowExW(DWORD,LPCWSTR,LPCWSTR,DWORD,int,int,int,int,HWND,HMENU,HINSTANCE,LPVOID);
-WINUSERAPI HWINSTA WINAPI CreateWindowStationA(LPCSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
-WINUSERAPI HWINSTA WINAPI CreateWindowStationW(LPCWSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
-WINUSERAPI LRESULT WINAPI DefDlgProcA(HWND,UINT,WPARAM,LPARAM);
-WINUSERAPI LRESULT WINAPI DefDlgProcW(HWND,UINT,WPARAM,LPARAM);
-WINUSERAPI HDWP WINAPI DeferWindowPos(HDWP,HWND,HWND,int,int,int,int,UINT);
-WINUSERAPI LRESULT WINAPI DefFrameProcA(HWND,HWND,UINT,WPARAM,LPARAM);
-WINUSERAPI LRESULT WINAPI DefFrameProcW(HWND,HWND,UINT,WPARAM,LPARAM);
-#define DefHookProc(c,p,lp,h) CallNextHookEx((HHOOK)*h,c,p,lp)
-WINUSERAPI LRESULT WINAPI DefMDIChildProcA(HWND,UINT,WPARAM,LPARAM);
-WINUSERAPI LRESULT WINAPI DefMDIChildProcW(HWND,UINT,WPARAM,LPARAM);
-#if (_WIN32_WINNT >= 0x0501)
-WINUSERAPI LRESULT WINAPI DefRawInputProc(PRAWINPUT*,INT,UINT);
-#endif
-WINUSERAPI LRESULT WINAPI DefWindowProcA(HWND,UINT,WPARAM,LPARAM);
-WINUSERAPI LRESULT WINAPI DefWindowProcW(HWND,UINT,WPARAM,LPARAM);
-WINUSERAPI BOOL WINAPI DeleteMenu(HMENU,UINT,UINT);
-WINUSERAPI BOOL WINAPI DeregisterShellHookWindow(HWND);
-WINUSERAPI BOOL WINAPI DestroyAcceleratorTable(HACCEL);
-WINUSERAPI BOOL WINAPI DestroyCaret(void);
-WINUSERAPI BOOL WINAPI DestroyCursor(HCURSOR);
-WINUSERAPI BOOL WINAPI DestroyIcon(HICON);
-WINUSERAPI BOOL WINAPI DestroyMenu(HMENU);
-WINUSERAPI BOOL WINAPI DestroyWindow(HWND);
-#define DialogBoxA(i,t,p,f) DialogBoxParamA(i,t,p,f,0)
-#define DialogBoxW(i,t,p,f) DialogBoxParamW(i,t,p,f,0)
-#define DialogBoxIndirectA(i,t,p,f) DialogBoxIndirectParamA(i,t,p,f,0)
-#define DialogBoxIndirectW(i,t,p,f) DialogBoxIndirectParamW(i,t,p,f,0)
-WINUSERAPI int WINAPI DialogBoxIndirectParamA(HINSTANCE,LPCDLGTEMPLATE,HWND,DLGPROC,LPARAM);
-WINUSERAPI int WINAPI DialogBoxIndirectParamW(HINSTANCE,LPCDLGTEMPLATE,HWND,DLGPROC,LPARAM);
-#ifdef _WIN32_WCE
-extern int DialogBoxParamA(HINSTANCE,LPCSTR,HWND,DLGPROC,LPARAM);
-extern int DialogBoxParamW(HINSTANCE,LPCWSTR,HWND,DLGPROC,LPARAM);
-#else
-WINUSERAPI int WINAPI DialogBoxParamA(HINSTANCE,LPCSTR,HWND,DLGPROC,LPARAM);
-WINUSERAPI int WINAPI DialogBoxParamW(HINSTANCE,LPCWSTR,HWND,DLGPROC,LPARAM);
-#endif
-WINUSERAPI LONG WINAPI DispatchMessageA(const MSG*);
-WINUSERAPI LONG WINAPI DispatchMessageW(const MSG*);
-WINUSERAPI int WINAPI DlgDirListA(HWND,LPSTR,int,int,UINT);
-WINUSERAPI int WINAPI DlgDirListW(HWND,LPWSTR,int,int,UINT);
-WINUSERAPI int WINAPI DlgDirListComboBoxA(HWND,LPSTR,int,int,UINT);
-WINUSERAPI int WINAPI DlgDirListComboBoxW(HWND,LPWSTR,int,int,UINT);
-WINUSERAPI BOOL WINAPI DlgDirSelectComboBoxExA(HWND,LPSTR,int,int);
-WINUSERAPI BOOL WINAPI DlgDirSelectComboBoxExW(HWND,LPWSTR,int,int);
-WINUSERAPI BOOL WINAPI DlgDirSelectExA(HWND,LPSTR,int,int);
-WINUSERAPI BOOL WINAPI DlgDirSelectExW(HWND,LPWSTR,int,int);
-WINUSERAPI BOOL WINAPI DragDetect(HWND,POINT);
-WINUSERAPI DWORD WINAPI DragObject(HWND,HWND,UINT,DWORD,HCURSOR);
-WINUSERAPI BOOL WINAPI DrawAnimatedRects(HWND,int,LPCRECT,LPCRECT);
-WINUSERAPI BOOL WINAPI DrawCaption(HWND,HDC,LPCRECT,UINT);
-WINUSERAPI BOOL WINAPI DrawEdge(HDC,LPRECT,UINT,UINT);
-WINUSERAPI BOOL WINAPI DrawFocusRect(HDC,LPCRECT);
-WINUSERAPI BOOL WINAPI DrawFrameControl(HDC,LPRECT,UINT,UINT);
-WINUSERAPI BOOL WINAPI DrawIcon(HDC,int,int,HICON);
-WINUSERAPI BOOL WINAPI DrawIconEx(HDC,int,int,HICON,int,int,UINT,HBRUSH,UINT);
-WINUSERAPI BOOL WINAPI DrawMenuBar(HWND);
-WINUSERAPI BOOL WINAPI DrawStateA(HDC,HBRUSH,DRAWSTATEPROC,LPARAM,WPARAM,int,int,int,int,UINT);
-WINUSERAPI BOOL WINAPI DrawStateW(HDC,HBRUSH,DRAWSTATEPROC,LPARAM,WPARAM,int,int,int,int,UINT);
-WINUSERAPI int WINAPI DrawTextA(HDC,LPCSTR,int,LPRECT,UINT);
-WINUSERAPI int WINAPI DrawTextW(HDC,LPCWSTR,int,LPRECT,UINT);
-WINUSERAPI int WINAPI DrawTextExA(HDC,LPSTR,int,LPRECT,UINT,LPDRAWTEXTPARAMS);
-WINUSERAPI int WINAPI DrawTextExW(HDC,LPWSTR,int,LPRECT,UINT,LPDRAWTEXTPARAMS);
-WINUSERAPI BOOL WINAPI EmptyClipboard(void);
-WINUSERAPI BOOL WINAPI EnableMenuItem(HMENU,UINT,UINT);
-WINUSERAPI BOOL WINAPI EnableScrollBar(HWND,UINT,UINT);
-WINUSERAPI BOOL WINAPI EnableWindow(HWND,BOOL);
-WINUSERAPI BOOL WINAPI EndDeferWindowPos(HDWP);
-WINUSERAPI BOOL WINAPI EndDialog(HWND,int);
-WINUSERAPI BOOL WINAPI EndMenu(void);
-WINUSERAPI BOOL WINAPI EndPaint(HWND,const PAINTSTRUCT*);
-#if (_WIN32_WINNT >= 0x0500)
-WINUSERAPI BOOL WINAPI EndTask(HWND,BOOL,BOOL);
-#endif
-WINUSERAPI BOOL WINAPI EnumChildWindows(HWND,ENUMWINDOWSPROC,LPARAM);
-WINUSERAPI UINT WINAPI EnumClipboardFormats(UINT);
-WINUSERAPI BOOL WINAPI EnumDesktopsA(HWINSTA,DESKTOPENUMPROCA,LPARAM);
-WINUSERAPI BOOL WINAPI EnumDesktopsW(HWINSTA,DESKTOPENUMPROCW,LPARAM);
-WINUSERAPI BOOL WINAPI EnumDesktopWindows(HDESK,ENUMWINDOWSPROC,LPARAM);
-WINUSERAPI BOOL WINAPI EnumDisplayMonitors(HDC,LPCRECT,MONITORENUMPROC,LPARAM);
-#ifndef NOGDI
-WINUSERAPI BOOL WINAPI EnumDisplaySettingsA(LPCSTR,DWORD,PDEVMODEA);
-WINUSERAPI BOOL WINAPI EnumDisplaySettingsW(LPCWSTR,DWORD,PDEVMODEW);
-#if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410)
-WINUSERAPI BOOL WINAPI EnumDisplaySettingsExA(LPCSTR,DWORD,LPDEVMODEA,DWORD);
-WINUSERAPI BOOL WINAPI EnumDisplaySettingsExW(LPCWSTR,DWORD,LPDEVMODEW,DWORD);
-#endif
-WINUSERAPI BOOL WINAPI EnumDisplayDevicesA(LPCSTR,DWORD,PDISPLAY_DEVICEA,DWORD);
-WINUSERAPI BOOL WINAPI EnumDisplayDevicesW(LPCWSTR,DWORD,PDISPLAY_DEVICEW,DWORD);
-#endif
-WINUSERAPI int WINAPI EnumPropsA(HWND,PROPENUMPROCA);
-WINUSERAPI int WINAPI EnumPropsW(HWND,PROPENUMPROCW);
-WINUSERAPI int WINAPI EnumPropsExA(HWND,PROPENUMPROCEXA,LPARAM);
-WINUSERAPI int WINAPI EnumPropsExW(HWND,PROPENUMPROCEXW,LPARAM);
-#define EnumTaskWindows(h,f,p) EnumThreadWindows((DWORD)h,f,p)
-WINUSERAPI BOOL WINAPI EnumThreadWindows(DWORD,WNDENUMPROC,LPARAM);
-WINUSERAPI BOOL WINAPI EnumWindows(WNDENUMPROC,LPARAM);
-WINUSERAPI BOOL WINAPI EnumWindowStationsA(WINSTAENUMPROCA,LPARAM);
-WINUSERAPI BOOL WINAPI EnumWindowStationsW(WINSTAENUMPROCW,LPARAM);
-WINUSERAPI BOOL WINAPI EqualRect(LPCRECT,LPCRECT);
-#define ExitWindows(r,c) ExitWindowsEx(EWX_LOGOFF,0)
-WINUSERAPI BOOL WINAPI ExitWindowsEx(UINT,DWORD);
-WINUSERAPI HWND WINAPI FindWindowA(LPCSTR,LPCSTR);
-WINUSERAPI HWND WINAPI FindWindowExA(HWND,HWND,LPCSTR,LPCSTR);
-WINUSERAPI HWND WINAPI FindWindowExW(HWND,HWND,LPCWSTR,LPCWSTR);
-WINUSERAPI HWND WINAPI FindWindowW(LPCWSTR,LPCWSTR);
-WINUSERAPI BOOL WINAPI FlashWindow(HWND,BOOL);
-#if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410)
-WINUSERAPI BOOL WINAPI FlashWindowEx(PFLASHWINFO);
-#endif
-int WINAPI FrameRect(HDC,LPCRECT,HBRUSH);
-WINUSERAPI BOOL WINAPI FrameRgn(HDC,HRGN,HBRUSH,int,int);
-WINUSERAPI HWND WINAPI GetActiveWindow(void);
-WINUSERAPI HWND WINAPI GetAncestor(HWND,UINT);
-WINUSERAPI SHORT WINAPI GetAsyncKeyState(int);
-WINUSERAPI HWND WINAPI GetCapture(void);
-WINUSERAPI UINT WINAPI GetCaretBlinkTime(void);
-WINUSERAPI BOOL WINAPI GetCaretPos(LPPOINT);
-WINUSERAPI BOOL WINAPI GetClassInfoA(HINSTANCE,LPCSTR,LPWNDCLASSA);
-WINUSERAPI BOOL WINAPI GetClassInfoExA(HINSTANCE,LPCSTR,LPWNDCLASSEXA);
-WINUSERAPI BOOL WINAPI GetClassInfoW(HINSTANCE,LPCWSTR,LPWNDCLASSW);
-WINUSERAPI BOOL WINAPI GetClassInfoExW(HINSTANCE,LPCWSTR,LPWNDCLASSEXW);
-WINUSERAPI DWORD WINAPI GetClassLongA(HWND,int);
-WINUSERAPI DWORD WINAPI GetClassLongW(HWND,int);
-#ifdef _WIN64
-WINUSERAPI ULONG_PTR WINAPI GetClassLongPtrA(HWND,int);
-WINUSERAPI ULONG_PTR WINAPI GetClassLongPtrW(HWND,int);
-#else
-#define GetClassLongPtrA GetClassLongA
-#define GetClassLongPtrW GetClassLongW
-#endif
-WINUSERAPI int WINAPI GetClassNameA(HWND,LPSTR,int);
-WINUSERAPI int WINAPI GetClassNameW(HWND,LPWSTR,int);
-WINUSERAPI WORD WINAPI GetClassWord(HWND,int);
-WINUSERAPI BOOL WINAPI GetClientRect(HWND,LPRECT);
-WINUSERAPI HANDLE WINAPI GetClipboardData(UINT);
-WINUSERAPI int WINAPI GetClipboardFormatNameA(UINT,LPSTR,int);
-WINUSERAPI int WINAPI GetClipboardFormatNameW(UINT,LPWSTR,int);
-WINUSERAPI HWND WINAPI GetClipboardOwner(void);
-#if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410)
-WINUSERAPI DWORD WINAPI GetClipboardSequenceNumber(void);
-#endif
-HWND WINAPI GetClipboardViewer(void);
-WINUSERAPI BOOL WINAPI GetClipCursor(LPRECT);
-WINUSERAPI BOOL WINAPI GetCursorPos(LPPOINT);
-WINUSERAPI HDC WINAPI GetDC(HWND);
-WINUSERAPI HDC WINAPI GetDCEx(HWND,HRGN,DWORD);
-WINUSERAPI HWND WINAPI GetDesktopWindow(void);
-WINUSERAPI long WINAPI GetDialogBaseUnits(void);
-WINUSERAPI int WINAPI GetDlgCtrlID(HWND);
-WINUSERAPI HWND WINAPI GetDlgItem(HWND,int);
-WINUSERAPI UINT WINAPI GetDlgItemInt(HWND,int,PBOOL,BOOL);
-WINUSERAPI UINT WINAPI GetDlgItemTextA(HWND,int,LPSTR,int);
-WINUSERAPI UINT WINAPI GetDlgItemTextW(HWND,int,LPWSTR,int);
-WINUSERAPI UINT WINAPI GetDoubleClickTime(void);
-WINUSERAPI HWND WINAPI GetFocus(void);
-WINUSERAPI HWND WINAPI GetForegroundWindow(void);
-#if (_WIN32_WINNT >= 0x0500)
-WINUSERAPI DWORD WINAPI GetGuiResources(HANDLE,DWORD);
-#endif
-WINUSERAPI BOOL WINAPI GetIconInfo(HICON,PICONINFO);
-WINUSERAPI BOOL WINAPI GetInputState(void);
-WINUSERAPI UINT WINAPI GetKBCodePage(void);
-WINUSERAPI HKL WINAPI GetKeyboardLayout(DWORD);
-WINUSERAPI UINT WINAPI GetKeyboardLayoutList(int,HKL*);
-WINUSERAPI BOOL WINAPI GetKeyboardLayoutNameA(LPSTR);
-WINUSERAPI BOOL WINAPI GetKeyboardLayoutNameW(LPWSTR);
-WINUSERAPI BOOL WINAPI GetKeyboardState(PBYTE);
-WINUSERAPI int WINAPI GetKeyboardType(int);
-WINUSERAPI int WINAPI GetKeyNameTextA(LONG,LPSTR,int);
-WINUSERAPI int WINAPI GetKeyNameTextW(LONG,LPWSTR,int);
-WINUSERAPI SHORT WINAPI GetKeyState(int);
-WINUSERAPI HWND WINAPI GetLastActivePopup(HWND);
-WINUSERAPI HMENU WINAPI GetMenu(HWND);
-WINUSERAPI LONG WINAPI GetMenuCheckMarkDimensions(void);
-WINUSERAPI DWORD WINAPI GetMenuContextHelpId(HMENU);
-WINUSERAPI UINT WINAPI GetMenuDefaultItem(HMENU,UINT,UINT);
-WINUSERAPI int WINAPI GetMenuItemCount(HMENU);
-WINUSERAPI UINT WINAPI GetMenuItemID(HMENU,int);
-WINUSERAPI BOOL WINAPI GetMenuItemInfoA(HMENU,UINT,BOOL,LPMENUITEMINFOA);
-WINUSERAPI BOOL WINAPI GetMenuItemInfoW(HMENU,UINT,BOOL,LPMENUITEMINFOW);
-WINUSERAPI BOOL WINAPI GetMenuItemRect(HWND,HMENU,UINT,LPRECT);
-WINUSERAPI UINT WINAPI GetMenuState(HMENU,UINT,UINT);
-WINUSERAPI int WINAPI GetMenuStringA(HMENU,UINT,LPSTR,int,UINT);
-WINUSERAPI int WINAPI GetMenuStringW(HMENU,UINT,LPWSTR,int,UINT);
-WINUSERAPI BOOL WINAPI GetMessageA(LPMSG,HWND,UINT,UINT);
-WINUSERAPI BOOL WINAPI GetMessageW(LPMSG,HWND,UINT,UINT);
-WINUSERAPI LONG WINAPI GetMessageExtraInfo(void);
-WINUSERAPI DWORD WINAPI GetMessagePos(void);
-WINUSERAPI LONG WINAPI GetMessageTime(void);
-#if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0490)
-WINUSERAPI int WINAPI GetMouseMovePointsEx(UINT,LPMOUSEMOVEPOINT,LPMOUSEMOVEPOINT,int,DWORD);
-#endif
-WINUSERAPI HWND WINAPI GetNextDlgGroupItem(HWND,HWND,BOOL);
-WINUSERAPI HWND WINAPI GetNextDlgTabItem(HWND,HWND,BOOL);
-#define GetNextWindow(h,c) GetWindow(h,c)
-WINUSERAPI HWND WINAPI GetOpenClipboardWindow(void);
-WINUSERAPI HWND WINAPI GetParent(HWND);
-WINUSERAPI int WINAPI GetPriorityClipboardFormat(UINT*,int);
-WINUSERAPI HANDLE WINAPI GetPropA(HWND,LPCSTR);
-WINUSERAPI HANDLE WINAPI GetPropW(HWND,LPCWSTR);
-#if (_WIN32_WINNT >= 0x0501)
-WINUSERAPI UINT WINAPI GetRawInputBuffer(PRAWINPUT,PUINT,UINT);
-WINUSERAPI UINT WINAPI GetRawInputData(HRAWINPUT,UINT,LPVOID,PUINT,UINT);
-WINUSERAPI UINT WINAPI GetRawInputDeviceInfoA(HANDLE,UINT,LPVOID,PUINT);
-WINUSERAPI UINT WINAPI GetRawInputDeviceInfoW(HANDLE,UINT,LPVOID,PUINT);
-WINUSERAPI UINT WINAPI GetRawInputDeviceList(PRAWINPUTDEVICELIST,PUINT,UINT);
-WINUSERAPI UINT WINAPI GetRegisteredRawInputDevices(PRAWINPUTDEVICE,PUINT,UINT);
-#endif
-WINUSERAPI DWORD WINAPI GetQueueStatus(UINT);
-WINUSERAPI BOOL WINAPI GetScrollInfo(HWND,int,LPSCROLLINFO);
-WINUSERAPI int WINAPI GetScrollPos(HWND,int);
-WINUSERAPI BOOL WINAPI GetScrollRange(HWND,int,LPINT,LPINT);
-#if (_WIN32_WINNT >= 0x0500)
-WINUSERAPI HWND WINAPI GetShellWindow(void);
-#endif
-WINUSERAPI HMENU WINAPI GetSubMenu(HMENU,int);
-WINUSERAPI DWORD WINAPI GetSysColor(int);
-WINUSERAPI HBRUSH WINAPI GetSysColorBrush(int);
-#define GetSysModalWindow() (NULL)
-WINUSERAPI HMENU WINAPI GetSystemMenu(HWND,BOOL);
-WINUSERAPI int WINAPI GetSystemMetrics(int);
-WINUSERAPI DWORD WINAPI GetTabbedTextExtentA(HDC,LPCSTR,int,int,LPINT);
-WINUSERAPI DWORD WINAPI GetTabbedTextExtentW(HDC,LPCWSTR,int,int,LPINT);
-WINUSERAPI LONG WINAPI GetWindowLongA(HWND,int);
-WINUSERAPI LONG WINAPI GetWindowLongW(HWND,int);
-#ifdef _WIN64
-WINUSERAPI LONG_PTR WINAPI GetWindowLongPtrA(HWND,int);
-WINUSERAPI LONG_PTR WINAPI GetWindowLongPtrW(HWND,int);
-#else
-#define GetWindowLongPtrA GetWindowLongA
-#define GetWindowLongPtrW GetWindowLongW
-#endif
-WINUSERAPI HDESK WINAPI GetThreadDesktop(DWORD);
-WINUSERAPI HWND WINAPI GetTopWindow(HWND);
-WINUSERAPI BOOL WINAPI GetUpdateRect(HWND,LPRECT,BOOL);
-WINUSERAPI int WINAPI GetUpdateRgn(HWND,HRGN,BOOL);
-WINUSERAPI BOOL WINAPI GetUserObjectInformationA(HANDLE,int,PVOID,DWORD,PDWORD);
-WINUSERAPI BOOL WINAPI GetUserObjectInformationW(HANDLE,int,PVOID,DWORD,PDWORD);
-WINUSERAPI BOOL WINAPI GetUserObjectSecurity(HANDLE,PSECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD,PDWORD);
-WINUSERAPI HWND WINAPI GetWindow(HWND,UINT);
-WINUSERAPI DWORD WINAPI GetWindowContextHelpId(HWND);
-WINUSERAPI HDC WINAPI GetWindowDC(HWND);
-WINUSERAPI BOOL WINAPI GetWindowPlacement(HWND,WINDOWPLACEMENT*);
-WINUSERAPI BOOL WINAPI GetWindowRect(HWND,LPRECT);
-WINUSERAPI int WINAPI GetWindowRgn(HWND,HRGN);
-#define GetWindowTask(hWnd) ((HANDLE)GetWindowThreadProcessId(hWnd, NULL))
-WINUSERAPI int WINAPI GetWindowTextA(HWND,LPSTR,int);
-WINUSERAPI int WINAPI GetWindowTextLengthA(HWND);
-WINUSERAPI int WINAPI GetWindowTextLengthW(HWND);
-WINUSERAPI int WINAPI GetWindowTextW(HWND,LPWSTR,int);
-WINUSERAPI WORD WINAPI GetWindowWord(HWND,int);
-WINUSERAPI BOOL WINAPI GetAltTabInfoA(HWND,int,PALTTABINFO,LPSTR,UINT);
-WINUSERAPI BOOL WINAPI GetAltTabInfoW(HWND,int,PALTTABINFO,LPWSTR,UINT);
-WINUSERAPI BOOL WINAPI GetComboBoxInfo(HWND,PCOMBOBOXINFO);
-WINUSERAPI BOOL WINAPI GetCursorInfo(PCURSORINFO);
-#if (WINVER >= 0x0500)
-WINUSERAPI BOOL WINAPI GetGUIThreadInfo(DWORD,LPGUITHREADINFO);
-#endif
-WINUSERAPI BOOL WINAPI GetLastInputInfo(PLASTINPUTINFO);
-WINUSERAPI DWORD WINAPI GetListBoxInfo(HWND);
-WINUSERAPI BOOL WINAPI GetMenuBarInfo(HWND,LONG,LONG,PMENUBARINFO);
-WINUSERAPI BOOL WINAPI GetMenuInfo(HMENU,LPMENUINFO);
-#if (_WIN32_WINNT >= 0x0500)
-WINUSERAPI BOOL WINAPI GetProcessDefaultLayout(DWORD*);
-#endif
-WINUSERAPI BOOL WINAPI GetScrollBarInfo(HWND,LONG,PSCROLLBARINFO);
-#if (_WIN32_WINDOWS >= 0x0410)
-WINUSERAPI BOOL WINAPI GetTitleBarInfo(HWND,PTITLEBARINFO);
-#endif
-WINUSERAPI BOOL WINAPI GetWindowInfo(HWND,PWINDOWINFO);
-WINUSERAPI BOOL WINAPI GetMonitorInfoA(HMONITOR,LPMONITORINFO);
-WINUSERAPI BOOL WINAPI GetMonitorInfoW(HMONITOR,LPMONITORINFO);
-WINUSERAPI UINT WINAPI GetWindowModuleFileNameA(HWND,LPSTR,UINT);
-WINUSERAPI UINT WINAPI GetWindowModuleFileNameW(HWND,LPWSTR,UINT);
-WINUSERAPI BOOL WINAPI GrayStringA(HDC,HBRUSH,GRAYSTRINGPROC,LPARAM,int,int,int,int,int);
-WINUSERAPI BOOL WINAPI GrayStringW(HDC,HBRUSH,GRAYSTRINGPROC,LPARAM,int,int,int,int,int);
-WINUSERAPI BOOL WINAPI HideCaret(HWND);
-WINUSERAPI BOOL WINAPI HiliteMenuItem(HWND,HMENU,UINT,UINT);
-WINUSERAPI BOOL WINAPI InflateRect(LPRECT,int,int);
-WINUSERAPI BOOL WINAPI InSendMessage(void);
-#if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410)
-WINUSERAPI DWORD WINAPI InSendMessageEx(LPVOID);
-#endif
-WINUSERAPI BOOL WINAPI InsertMenuA(HMENU,UINT,UINT,UINT,LPCSTR);
-WINUSERAPI BOOL WINAPI InsertMenuW(HMENU,UINT,UINT,UINT,LPCWSTR);
-WINUSERAPI BOOL WINAPI InsertMenuItemA(HMENU,UINT,BOOL,LPCMENUITEMINFOA);
-WINUSERAPI BOOL WINAPI InsertMenuItemW(HMENU,UINT,BOOL,LPCMENUITEMINFOW);
-WINUSERAPI INT WINAPI InternalGetWindowText(HWND,LPWSTR,INT);
-WINUSERAPI BOOL WINAPI IntersectRect(LPRECT,LPCRECT,LPCRECT);
-WINUSERAPI BOOL WINAPI InvalidateRect(HWND,LPCRECT,BOOL);
-WINUSERAPI BOOL WINAPI InvalidateRgn(HWND,HRGN,BOOL);
-WINUSERAPI BOOL WINAPI InvertRect(HDC,LPCRECT);
-WINUSERAPI BOOL WINAPI IsCharAlphaA(CHAR ch);
-WINUSERAPI BOOL WINAPI IsCharAlphaNumericA(CHAR);
-WINUSERAPI BOOL WINAPI IsCharAlphaNumericW(WCHAR);
-WINUSERAPI BOOL WINAPI IsCharAlphaW(WCHAR);
-WINUSERAPI BOOL WINAPI IsCharLowerA(CHAR);
-WINUSERAPI BOOL WINAPI IsCharLowerW(WCHAR);
-WINUSERAPI BOOL WINAPI IsCharUpperA(CHAR);
-WINUSERAPI BOOL WINAPI IsCharUpperW(WCHAR);
-WINUSERAPI BOOL WINAPI IsChild(HWND,HWND);
-WINUSERAPI BOOL WINAPI IsClipboardFormatAvailable(UINT);
-WINUSERAPI BOOL WINAPI IsDialogMessageA(HWND,LPMSG);
-WINUSERAPI BOOL WINAPI IsDialogMessageW(HWND,LPMSG);
-WINUSERAPI UINT WINAPI IsDlgButtonChecked(HWND,int);
-#if(_WIN32_WINNT >= 0x0501)
-WINUSERAPI BOOL WINAPI IsGUIThread(BOOL);
-#endif
-#if(_WIN32_WINNT >= 0x0500)
-WINUSERAPI BOOL WINAPI IsHungAppWindow(HWND);
-#endif
-WINUSERAPI BOOL WINAPI IsIconic(HWND);
-WINUSERAPI BOOL WINAPI IsMenu(HMENU);
-WINUSERAPI BOOL WINAPI IsRectEmpty(LPCRECT);
-WINUSERAPI BOOL WINAPI IsWindow(HWND);
-WINUSERAPI BOOL WINAPI IsWindowEnabled(HWND);
-WINUSERAPI BOOL WINAPI IsWindowUnicode(HWND);
-WINUSERAPI BOOL WINAPI IsWindowVisible(HWND);
-#if (_WIN32_WINNT >= 0x0501)
-WINUSERAPI BOOL WINAPI IsWinEventHookInstalled(DWORD);
-#endif
-WINUSERAPI BOOL WINAPI IsZoomed(HWND);
-WINUSERAPI VOID WINAPI keybd_event(BYTE,BYTE,DWORD,DWORD);
-WINUSERAPI BOOL WINAPI KillTimer(HWND,UINT);
-WINUSERAPI HACCEL WINAPI LoadAcceleratorsA(HINSTANCE,LPCSTR);
-WINUSERAPI HACCEL WINAPI LoadAcceleratorsW(HINSTANCE,LPCWSTR);
-WINUSERAPI HBITMAP WINAPI LoadBitmapA(HINSTANCE,LPCSTR);
-WINUSERAPI HBITMAP WINAPI LoadBitmapW(HINSTANCE,LPCWSTR);
-WINUSERAPI HCURSOR WINAPI LoadCursorA(HINSTANCE,LPCSTR);
-WINUSERAPI HCURSOR WINAPI LoadCursorFromFileA(LPCSTR);
-WINUSERAPI HCURSOR WINAPI LoadCursorFromFileW(LPCWSTR);
-WINUSERAPI HCURSOR WINAPI LoadCursorW(HINSTANCE,LPCWSTR);
-WINUSERAPI HICON WINAPI LoadIconA(HINSTANCE,LPCSTR);
-WINUSERAPI HICON WINAPI LoadIconW(HINSTANCE,LPCWSTR);
-WINUSERAPI HANDLE WINAPI LoadImageA(HINSTANCE,LPCSTR,UINT,int,int,UINT);
-WINUSERAPI HANDLE WINAPI LoadImageW(HINSTANCE,LPCWSTR,UINT,int,int,UINT);
-WINUSERAPI HKL WINAPI LoadKeyboardLayoutA(LPCSTR,UINT);
-WINUSERAPI HKL WINAPI LoadKeyboardLayoutW(LPCWSTR,UINT);
-WINUSERAPI HMENU WINAPI LoadMenuA(HINSTANCE,LPCSTR);
-WINUSERAPI HMENU WINAPI LoadMenuIndirectA(const MENUTEMPLATE*);
-WINUSERAPI HMENU WINAPI LoadMenuIndirectW(const MENUTEMPLATE*);
-WINUSERAPI HMENU WINAPI LoadMenuW(HINSTANCE,LPCWSTR);
-WINUSERAPI int WINAPI LoadStringA(HINSTANCE,UINT,LPSTR,int);
-WINUSERAPI int WINAPI LoadStringW(HINSTANCE,UINT,LPWSTR,int);
-WINUSERAPI BOOL WINAPI LockWindowUpdate(HWND);
-#if (_WIN32_WINNT >= 0x0500)
-WINUSERAPI BOOL WINAPI LockWorkStation(void);
-#endif
-WINUSERAPI int WINAPI LookupIconIdFromDirectory(PBYTE,BOOL);
-WINUSERAPI int WINAPI LookupIconIdFromDirectoryEx(PBYTE,BOOL,int,int,UINT);
-WINUSERAPI BOOL WINAPI MapDialogRect(HWND,LPRECT);
-WINUSERAPI UINT WINAPI MapVirtualKeyA(UINT,UINT);
-WINUSERAPI UINT WINAPI MapVirtualKeyExA(UINT,UINT,HKL);
-WINUSERAPI UINT WINAPI MapVirtualKeyExW(UINT,UINT,HKL);
-WINUSERAPI UINT WINAPI MapVirtualKeyW(UINT,UINT);
-WINUSERAPI int WINAPI MapWindowPoints(HWND,HWND,LPPOINT,UINT);
-WINUSERAPI int WINAPI MenuItemFromPoint(HWND,HMENU,POINT);
-WINUSERAPI BOOL WINAPI MessageBeep(UINT);
-WINUSERAPI int WINAPI MessageBoxA(HWND,LPCSTR,LPCSTR,UINT);
-WINUSERAPI int WINAPI MessageBoxW(HWND,LPCWSTR,LPCWSTR,UINT);
-WINUSERAPI int WINAPI MessageBoxExA(HWND,LPCSTR,LPCSTR,UINT,WORD);
-WINUSERAPI int WINAPI MessageBoxExW(HWND,LPCWSTR,LPCWSTR,UINT,WORD);
-WINUSERAPI int WINAPI MessageBoxIndirectA(CONST MSGBOXPARAMSA*);
-WINUSERAPI int WINAPI MessageBoxIndirectW(CONST MSGBOXPARAMSW*);
-WINUSERAPI BOOL WINAPI ModifyMenuA(HMENU,UINT,UINT,UINT,LPCSTR);
-WINUSERAPI BOOL WINAPI ModifyMenuW(HMENU,UINT,UINT,UINT,LPCWSTR);
-#if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410)
-WINUSERAPI HMONITOR WINAPI MonitorFromPoint(POINT,DWORD);
-WINUSERAPI HMONITOR WINAPI MonitorFromRect(LPCRECT,DWORD);
-WINUSERAPI HMONITOR WINAPI MonitorFromWindow(HWND,DWORD);
-#endif
-WINUSERAPI void WINAPI mouse_event(DWORD,DWORD,DWORD,DWORD,ULONG_PTR);
-WINUSERAPI BOOL WINAPI MoveWindow(HWND,int,int,int,int,BOOL);
-WINUSERAPI DWORD WINAPI MsgWaitForMultipleObjects(DWORD,CONST HANDLE*,BOOL,DWORD,DWORD);
-WINUSERAPI DWORD WINAPI MsgWaitForMultipleObjectsEx(DWORD,CONST HANDLE*,DWORD,DWORD,DWORD);
-#if (WINVER >= 0x0500)
-WINUSERAPI void WINAPI NotifyWinEvent(DWORD,HWND,LONG,LONG);
-#endif
-WINUSERAPI DWORD WINAPI OemKeyScan(WORD);
-WINUSERAPI BOOL WINAPI OemToCharA(LPCSTR,LPSTR);
-WINUSERAPI BOOL WINAPI OemToCharBuffA(LPCSTR,LPSTR,DWORD);
-WINUSERAPI BOOL WINAPI OemToCharBuffW(LPCSTR,LPWSTR,DWORD);
-WINUSERAPI BOOL WINAPI OemToCharW(LPCSTR,LPWSTR);
-WINUSERAPI BOOL WINAPI OffsetRect(LPRECT,int,int);
-WINUSERAPI BOOL WINAPI OpenClipboard(HWND);
-WINUSERAPI HDESK WINAPI OpenDesktopA(LPSTR,DWORD,BOOL,DWORD);
-WINUSERAPI HDESK WINAPI OpenDesktopW(LPWSTR,DWORD,BOOL,DWORD);
-WINUSERAPI BOOL WINAPI OpenIcon(HWND);
-WINUSERAPI HDESK WINAPI OpenInputDesktop(DWORD,BOOL,DWORD);
-WINUSERAPI HWINSTA WINAPI OpenWindowStationA(LPSTR,BOOL,DWORD);
-WINUSERAPI HWINSTA WINAPI OpenWindowStationW(LPWSTR,BOOL,DWORD);
-WINUSERAPI BOOL WINAPI PaintDesktop(HDC);
-WINUSERAPI BOOL WINAPI PeekMessageA(LPMSG,HWND,UINT,UINT,UINT);
-WINUSERAPI BOOL WINAPI PeekMessageW(LPMSG,HWND,UINT,UINT,UINT);
-#define PostAppMessageA(t,m,w,l) PostThreadMessageA((DWORD)t,m,w,l)
-#define PostAppMessageW(t,m,w,l) PostThreadMessageW((DWORD)t,m,w,l)
-WINUSERAPI BOOL WINAPI PostMessageA(HWND,UINT,WPARAM,LPARAM);
-WINUSERAPI BOOL WINAPI PostMessageW(HWND,UINT,WPARAM,LPARAM);
-WINUSERAPI void WINAPI PostQuitMessage(int);
-WINUSERAPI BOOL WINAPI PostThreadMessageA(DWORD,UINT,WPARAM,LPARAM);
-WINUSERAPI BOOL WINAPI PostThreadMessageW(DWORD,UINT,WPARAM,LPARAM);
-#if (_WIN32_WINNT >= 0x0501)
-WINUSERAPI BOOL WINAPI PrintWindow(HWND,HDC,UINT);
-#endif
-WINUSERAPI BOOL WINAPI PtInRect(LPCRECT,POINT);
-WINUSERAPI HWND WINAPI RealChildWindowFromPoint(HWND,POINT);
-WINUSERAPI UINT WINAPI RealGetWindowClassA(HWND,LPSTR,UINT);
-WINUSERAPI UINT WINAPI RealGetWindowClassW(HWND,LPWSTR,UINT);
-WINUSERAPI BOOL WINAPI RedrawWindow(HWND,LPCRECT,HRGN,UINT);
-WINUSERAPI ATOM WINAPI RegisterClassA(CONST WNDCLASSA*);
-WINUSERAPI ATOM WINAPI RegisterClassW(CONST WNDCLASSW*);
-WINUSERAPI ATOM WINAPI RegisterClassExA(CONST WNDCLASSEXA*);
-WINUSERAPI ATOM WINAPI RegisterClassExW(CONST WNDCLASSEXW*);
-WINUSERAPI UINT WINAPI RegisterClipboardFormatA(LPCSTR);
-WINUSERAPI UINT WINAPI RegisterClipboardFormatW(LPCWSTR);
-#if (WINVER >= 0x0500)
-WINUSERAPI HDEVNOTIFY WINAPI RegisterDeviceNotificationA(HANDLE,LPVOID,DWORD);
-WINUSERAPI HDEVNOTIFY WINAPI RegisterDeviceNotificationW(HANDLE,LPVOID,DWORD);
-#endif
-#if (_WIN32_WINNT >= 0x0600)
-WINUSERAPI HPOWERNOTIFY WINAPI RegisterPowerSettingNotification(HANDLE,LPCGUID,DWORD);
-#endif
-WINUSERAPI BOOL WINAPI RegisterHotKey(HWND,int,UINT,UINT);
-#if (_WIN32_WINNT >= 0x0501)
-WINUSERAPI BOOL WINAPI RegisterRawInputDevices(PCRAWINPUTDEVICE,UINT,UINT);
-#endif
-WINUSERAPI UINT WINAPI RegisterWindowMessageA(LPCSTR);
-WINUSERAPI UINT WINAPI RegisterWindowMessageW(LPCWSTR);
-WINUSERAPI BOOL WINAPI ReleaseCapture(void);
-WINUSERAPI int WINAPI ReleaseDC(HWND,HDC);
-WINUSERAPI BOOL WINAPI RemoveMenu(HMENU,UINT,UINT);
-WINUSERAPI HANDLE WINAPI RemovePropA(HWND,LPCSTR);
-WINUSERAPI HANDLE WINAPI RemovePropW(HWND,LPCWSTR);
-WINUSERAPI BOOL WINAPI ReplyMessage(LRESULT);
-WINUSERAPI BOOL WINAPI ScreenToClient(HWND,LPPOINT);
-WINUSERAPI BOOL WINAPI ScrollDC(HDC,int,int,LPCRECT,LPCRECT,HRGN,LPRECT);
-WINUSERAPI BOOL WINAPI ScrollWindow(HWND,int,int,LPCRECT,LPCRECT);
-WINUSERAPI int WINAPI ScrollWindowEx(HWND,int,int,LPCRECT,LPCRECT,HRGN,LPRECT,UINT);
-WINUSERAPI LONG WINAPI SendDlgItemMessageA(HWND,int,UINT,WPARAM,LPARAM);
-WINUSERAPI LONG WINAPI SendDlgItemMessageW(HWND,int,UINT,WPARAM,LPARAM);
-#if (_WIN32_WINNT >= 0x0403)
-WINUSERAPI UINT WINAPI SendInput(UINT,LPINPUT,int);
-#endif
-WINUSERAPI LRESULT WINAPI SendMessageA(HWND,UINT,WPARAM,LPARAM);
-WINUSERAPI BOOL WINAPI SendMessageCallbackA(HWND,UINT,WPARAM,LPARAM,SENDASYNCPROC,DWORD);
-WINUSERAPI BOOL WINAPI SendMessageCallbackW(HWND,UINT,WPARAM,LPARAM,SENDASYNCPROC,DWORD);
-WINUSERAPI LRESULT WINAPI SendMessageTimeoutA(HWND,UINT,WPARAM,LPARAM,UINT,UINT,PDWORD);
-WINUSERAPI LRESULT WINAPI SendMessageTimeoutW(HWND,UINT,WPARAM,LPARAM,UINT,UINT,PDWORD);
-WINUSERAPI LRESULT WINAPI SendMessageW(HWND,UINT,WPARAM,LPARAM);
-WINUSERAPI BOOL WINAPI SendNotifyMessageA(HWND,UINT,WPARAM,LPARAM);
-WINUSERAPI BOOL WINAPI SendNotifyMessageW(HWND,UINT,WPARAM,LPARAM);
-WINUSERAPI HWND WINAPI SetActiveWindow(HWND);
-WINUSERAPI HWND WINAPI SetCapture(HWND hWnd);
-WINUSERAPI BOOL WINAPI SetCaretBlinkTime(UINT);
-WINUSERAPI BOOL WINAPI SetCaretPos(int,int);
-WINUSERAPI DWORD WINAPI SetClassLongA(HWND,int,LONG);
-WINUSERAPI DWORD WINAPI SetClassLongW(HWND,int,LONG);
-#ifdef _WIN64
-WINUSERAPI ULONG_PTR WINAPI SetClassLongPtrA(HWND,int,LONG_PTR);
-WINUSERAPI ULONG_PTR WINAPI SetClassLongPtrW(HWND,int,LONG_PTR);
-#else
-#define SetClassLongPtrA SetClassLongA
-#define SetClassLongPtrW SetClassLongW
-#endif
-WINUSERAPI WORD WINAPI SetClassWord(HWND,int,WORD);
-WINUSERAPI HANDLE WINAPI SetClipboardData(UINT,HANDLE);
-WINUSERAPI HWND WINAPI SetClipboardViewer(HWND);
-WINUSERAPI HCURSOR WINAPI SetCursor(HCURSOR);
-WINUSERAPI BOOL WINAPI SetCursorPos(int,int);
-WINUSERAPI VOID WINAPI SetDebugErrorLevel(DWORD);
-WINUSERAPI BOOL WINAPI SetDlgItemInt(HWND,int,UINT,BOOL);
-WINUSERAPI BOOL WINAPI SetDlgItemTextA(HWND,int,LPCSTR);
-WINUSERAPI BOOL WINAPI SetDlgItemTextW(HWND,int,LPCWSTR);
-WINUSERAPI BOOL WINAPI SetDoubleClickTime(UINT);
-WINUSERAPI HWND WINAPI SetFocus(HWND);
-WINUSERAPI BOOL WINAPI SetForegroundWindow(HWND);
-WINUSERAPI BOOL WINAPI SetKeyboardState(PBYTE);
-WINUSERAPI BOOL WINAPI SetMenu(HWND,HMENU);
-WINUSERAPI BOOL WINAPI SetMenuContextHelpId(HMENU,DWORD);
-WINUSERAPI BOOL WINAPI SetMenuDefaultItem(HMENU,UINT,UINT);
-WINUSERAPI BOOL WINAPI SetMenuInfo(HMENU,LPCMENUINFO);
-WINUSERAPI BOOL WINAPI SetMenuItemBitmaps(HMENU,UINT,UINT,HBITMAP,HBITMAP);
-WINUSERAPI BOOL WINAPI SetMenuItemInfoA(HMENU,UINT,BOOL,LPCMENUITEMINFOA);
-WINUSERAPI BOOL WINAPI SetMenuItemInfoW( HMENU,UINT,BOOL,LPCMENUITEMINFOW);
-WINUSERAPI LPARAM WINAPI SetMessageExtraInfo(LPARAM);
-WINUSERAPI BOOL WINAPI SetMessageQueue(int);
-WINUSERAPI HWND WINAPI SetParent(HWND,HWND);
-#if (_WIN32_WINNT >= 0x0500)
-WINUSERAPI BOOL WINAPI SetProcessDefaultLayout(DWORD);
-#endif /* (_WIN32_WINNT >= 0x0500) */
-WINUSERAPI BOOL WINAPI SetProcessWindowStation(HWINSTA);
-WINUSERAPI BOOL WINAPI SetPropA(HWND,LPCSTR,HANDLE);
-WINUSERAPI BOOL WINAPI SetPropW(HWND,LPCWSTR,HANDLE);
-WINUSERAPI BOOL WINAPI SetRect(LPRECT,int,int,int,int);
-WINUSERAPI BOOL WINAPI SetRectEmpty(LPRECT);
-WINUSERAPI int WINAPI SetScrollInfo(HWND,int,LPCSCROLLINFO,BOOL);
-WINUSERAPI int WINAPI SetScrollPos(HWND,int,int,BOOL);
-WINUSERAPI BOOL WINAPI SetScrollRange(HWND,int,int,int,BOOL);
-WINUSERAPI BOOL WINAPI SetSysColors(int,const INT *,const COLORREF *);
-#define SetSysModalWindow(h) (NULL)
-WINUSERAPI BOOL WINAPI SetSystemCursor(HCURSOR,DWORD);
-WINUSERAPI BOOL WINAPI SetThreadDesktop(HDESK);
-WINUSERAPI UINT WINAPI SetTimer(HWND,UINT,UINT,TIMERPROC);
-WINUSERAPI BOOL WINAPI SetUserObjectInformationA(HANDLE,int,PVOID,DWORD);
-WINUSERAPI BOOL WINAPI SetUserObjectInformationW(HANDLE,int,PVOID,DWORD);
-WINUSERAPI BOOL WINAPI SetUserObjectSecurity(HANDLE,PSECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
-#if (WINVER >= 0x0500)
-WINUSERAPI HWINEVENTHOOK WINAPI SetWinEventHook(UINT,UINT,HMODULE,WINEVENTPROC,DWORD,DWORD,UINT);
-#endif
-WINUSERAPI BOOL WINAPI SetWindowContextHelpId(HWND,DWORD);
-WINUSERAPI LONG WINAPI SetWindowLongA(HWND,int,LONG);
-WINUSERAPI LONG WINAPI SetWindowLongW(HWND,int,LONG);
-#ifdef _WIN64
-WINUSERAPI LONG_PTR WINAPI SetWindowLongPtrA(HWND,int,LONG_PTR);
-WINUSERAPI LONG_PTR WINAPI SetWindowLongPtrW(HWND,int,LONG_PTR);
-#else
-#define SetWindowLongPtrA SetWindowLongA
-#define SetWindowLongPtrW SetWindowLongW
-#endif
-WINUSERAPI BOOL WINAPI SetWindowPlacement(HWND hWnd,const WINDOWPLACEMENT*);
-WINUSERAPI BOOL WINAPI SetWindowPos(HWND,HWND,int,int,int,int,UINT);
-WINUSERAPI int WINAPI SetWindowRgn(HWND,HRGN,BOOL);
-WINUSERAPI HHOOK WINAPI SetWindowsHookA(int,HOOKPROC);
-WINUSERAPI HHOOK WINAPI SetWindowsHookW(int,HOOKPROC);
-WINUSERAPI HHOOK WINAPI SetWindowsHookExA(int,HOOKPROC,HINSTANCE,DWORD);
-WINUSERAPI HHOOK WINAPI SetWindowsHookExW(int,HOOKPROC,HINSTANCE,DWORD);
-WINUSERAPI BOOL WINAPI SetWindowTextA(HWND,LPCSTR);
-WINUSERAPI BOOL WINAPI SetWindowTextW(HWND,LPCWSTR);
-WINUSERAPI WORD WINAPI SetWindowWord(HWND,int,WORD);
-WINUSERAPI BOOL WINAPI ShowCaret(HWND);
-WINUSERAPI int WINAPI ShowCursor(BOOL);
-WINUSERAPI BOOL WINAPI ShowOwnedPopups(HWND,BOOL);
-WINUSERAPI BOOL WINAPI ShowScrollBar(HWND,int,BOOL);
-WINUSERAPI BOOL WINAPI ShowWindow(HWND,int);
-WINUSERAPI BOOL WINAPI ShowWindowAsync(HWND,int);
-WINUSERAPI BOOL WINAPI SubtractRect(LPRECT,LPCRECT,LPCRECT);
-WINUSERAPI BOOL WINAPI SwapMouseButton(BOOL);
-WINUSERAPI BOOL WINAPI SwitchDesktop(HDESK);
-#if(_WIN32_WINNT >= 0x0500)
-WINUSERAPI VOID WINAPI SwitchToThisWindow(HWND,BOOL);
-#endif /* (_WIN32_WINNT >= 0x0500) */
-WINUSERAPI BOOL WINAPI SystemParametersInfoA(UINT,UINT,PVOID,UINT);
-WINUSERAPI BOOL WINAPI SystemParametersInfoW(UINT,UINT,PVOID,UINT);
-WINUSERAPI LONG WINAPI TabbedTextOutA(HDC,int,int,LPCSTR,int,int,LPINT,int);
-WINUSERAPI LONG WINAPI TabbedTextOutW(HDC,int,int,LPCWSTR,int,int,LPINT,int);
-WINUSERAPI WORD WINAPI TileWindows(HWND,UINT,LPCRECT,UINT,const HWND *);
-WINUSERAPI int WINAPI ToAscii(UINT,UINT,PBYTE,LPWORD,UINT);
-WINUSERAPI int WINAPI ToAsciiEx(UINT,UINT,PBYTE,LPWORD,UINT,HKL);
-WINUSERAPI int WINAPI ToUnicode(UINT,UINT,PBYTE,LPWSTR,int,UINT);
-WINUSERAPI int WINAPI ToUnicodeEx(UINT,UINT,PBYTE,LPWSTR,int,UINT,HKL);
-WINUSERAPI BOOL WINAPI TrackMouseEvent(LPTRACKMOUSEEVENT);
-WINUSERAPI BOOL WINAPI TrackPopupMenu(HMENU,UINT,int,int,int,HWND,LPCRECT);
-WINUSERAPI BOOL WINAPI TrackPopupMenuEx(HMENU,UINT,int,int,HWND,LPTPMPARAMS);
-WINUSERAPI int WINAPI TranslateAcceleratorA(HWND,HACCEL,LPMSG);
-WINUSERAPI int WINAPI TranslateAcceleratorW(HWND,HACCEL,LPMSG);
-WINUSERAPI BOOL WINAPI TranslateMDISysAccel(HWND,LPMSG);
-WINUSERAPI BOOL WINAPI TranslateMessage(const MSG*);
-WINUSERAPI BOOL WINAPI UnhookWindowsHook(int,HOOKPROC);
-WINUSERAPI BOOL WINAPI UnhookWindowsHookEx(HHOOK);
-#if (WINVER >= 0x0500)
-WINUSERAPI BOOL WINAPI UnhookWinEvent(HWINEVENTHOOK);
-#endif
-WINUSERAPI BOOL WINAPI UnionRect(LPRECT,LPCRECT,LPCRECT);
-WINUSERAPI BOOL WINAPI UnloadKeyboardLayout(HKL);
-WINUSERAPI BOOL WINAPI UnregisterClassA(LPCSTR,HINSTANCE);
-WINUSERAPI BOOL WINAPI UnregisterClassW(LPCWSTR,HINSTANCE);
-#if (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= 0x0500)
-WINUSERAPI BOOL WINAPI UnregisterDeviceNotification(HANDLE);
-#endif
-#if (_WIN32_WINNT >= 0x0600)
-WINUSERAPI BOOL WINAPI UnregisterPowerSettingNotification(HPOWERNOTIFY);
-#endif
-WINUSERAPI BOOL WINAPI UnregisterHotKey(HWND,int);
-WINUSERAPI BOOL WINAPI UpdateWindow(HWND);
-#if (_WIN32_WINNT >= 0x0500)
-WINUSERAPI BOOL WINAPI UserHandleGrantAccess(HANDLE,HANDLE,BOOL);
-#endif
-WINUSERAPI BOOL WINAPI ValidateRect(HWND,LPCRECT);
-WINUSERAPI BOOL WINAPI ValidateRgn(HWND,HRGN);
-WINUSERAPI SHORT WINAPI VkKeyScanA(CHAR);
-WINUSERAPI SHORT WINAPI VkKeyScanExA(CHAR,HKL);
-WINUSERAPI SHORT WINAPI VkKeyScanExW(WCHAR,HKL);
-WINUSERAPI SHORT WINAPI VkKeyScanW(WCHAR);
-WINUSERAPI DWORD WINAPI WaitForInputIdle(HANDLE,DWORD);
-WINUSERAPI BOOL WINAPI WaitMessage(void);
-WINUSERAPI HWND WINAPI WindowFromDC(HDC hDC);
-WINUSERAPI HWND WINAPI WindowFromPoint(POINT);
-WINUSERAPI UINT WINAPI WinExec(LPCSTR,UINT);
-WINUSERAPI BOOL WINAPI WinHelpA(HWND,LPCSTR,UINT,DWORD);
-WINUSERAPI BOOL WINAPI WinHelpW(HWND,LPCWSTR,UINT,DWORD);
-WINUSERAPI int WINAPIV wsprintfA(LPSTR,LPCSTR,...);
-WINUSERAPI int WINAPIV wsprintfW(LPWSTR,LPCWSTR,...);
-WINUSERAPI int WINAPI wvsprintfA(LPSTR,LPCSTR,va_list arglist);
-WINUSERAPI int WINAPI wvsprintfW(LPWSTR,LPCWSTR,va_list arglist);
-#if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0490)
-WINUSERAPI BOOL WINAPI AllowSetForegroundWindow(DWORD);
-WINUSERAPI BOOL WINAPI LockSetForegroundWindow(UINT);
-#endif
-#if (_WIN32_WINNT >= 0x0500)
-WINUSERAPI BOOL WINAPI SetLayeredWindowAttributes(HWND,COLORREF,BYTE,DWORD);
-#ifndef NOGDI
-WINUSERAPI BOOL WINAPI UpdateLayeredWindow(HWND,HDC,POINT*,SIZE*,HDC,POINT*,COLORREF,BLENDFUNCTION*,DWORD);
-#endif
-#endif
-#if (_WIN32_WINNT >= 0x0501)
-WINUSERAPI BOOL WINAPI GetLayeredWindowAttributes(HWND,COLORREF*,BYTE*,DWORD*);
-#endif
-#ifdef UNICODE
-#define EDITWORDBREAKPROC EDITWORDBREAKPROCW
-#define PROPENUMPROC PROPENUMPROCW
-#define PROPENUMPROCEX PROPENUMPROCEXW
-#define DEKSTOPENUMPROC DEKSTOPENUMPROCW
-#define WINSTAENUMPROC WINSTAENUMPROCW
-#define PROPENUMPROC PROPENUMPROCW
-#define PROPENUMPROCEX PROPENUMPROCEXW
-#define MAKEINTRESOURCE MAKEINTRESOURCEW
-typedef WNDCLASSW WNDCLASS,*LPWNDCLASS,*PWNDCLASS;
-typedef WNDCLASSEXW WNDCLASSEX,*LPWNDCLASSEX,*PWNDCLASSEX;
-typedef MENUITEMINFOW MENUITEMINFO,*LPMENUITEMINFO;
-typedef LPCMENUITEMINFOW LPCMENUITEMINFO;
-typedef MSGBOXPARAMSW MSGBOXPARAMS,*PMSGBOXPARAMS,*LPMSGBOXPARAMS;
-typedef HIGHCONTRASTW HIGHCONTRAST,*LPHIGHCONTRAST;
-typedef SERIALKEYSW SERIALKEYS,*LPSERIALKEYS;
-typedef SOUNDSENTRYW SOUNDSENTRY,*LPSOUNDSENTRY;
-typedef CREATESTRUCTW CREATESTRUCT, *LPCREATESTRUCT;
-typedef CBT_CREATEWNDW CBT_CREATEWND, *LPCBT_CREATEWND;
-typedef MDICREATESTRUCTW MDICREATESTRUCT,*LPMDICREATESTRUCT;
-typedef MULTIKEYHELPW MULTIKEYHELP,*PMULTIKEYHELP,*LPMULTIKEYHELP;
-typedef MONITORINFOEXW MONITORINFOEX, *LPMONITORINFOEX;
-#define AppendMenu AppendMenuW
-#define BroadcastSystemMessage BroadcastSystemMessageW
-#define BroadcastSystemMessageEx BroadcastSystemMessageExW
-#define CallMsgFilter CallMsgFilterW
-#define CallWindowProc CallWindowProcW
-#define ChangeMenu ChangeMenuW
-#define CharLower CharLowerW
-#define CharLowerBuff CharLowerBuffW
-#define CharNext CharNextW
-#define CharPrev CharPrevW
-#define CharToOem CharToOemW
-#define CharToOemBuff CharToOemBuffW
-#define CharUpper CharUpperW
-#define CharUpperBuff CharUpperBuffW
-#define CopyAcceleratorTable CopyAcceleratorTableW
-#define CreateAcceleratorTable CreateAcceleratorTableW
-#define CreateDialog CreateDialogW
-#define CreateDialogIndirect CreateDialogIndirectW
-#define CreateDialogIndirectParam CreateDialogIndirectParamW
-#define CreateDialogParam CreateDialogParamW
-#define CreateMDIWindow CreateMDIWindowW
-#define CreateWindow CreateWindowW
-#define CreateWindowEx CreateWindowExW
-#define CreateWindowStation CreateWindowStationW
-#define DefDlgProc DefDlgProcW
-#define DefFrameProc DefFrameProcW
-#define DefMDIChildProc DefMDIChildProcW
-#define DefWindowProc DefWindowProcW
-#define DialogBox DialogBoxW
-#define DialogBoxIndirect DialogBoxIndirectW
-#define DialogBoxIndirectParam DialogBoxIndirectParamW
-#define DialogBoxParam DialogBoxParamW
-#define DispatchMessage DispatchMessageW
-#define DlgDirList DlgDirListW
-#define DlgDirListComboBox DlgDirListComboBoxW
-#define DlgDirSelectComboBoxEx DlgDirSelectComboBoxExW
-#define DlgDirSelectEx DlgDirSelectExW
-#define DrawState DrawStateW
-#define DrawText DrawTextW
-#define DrawTextEx DrawTextExW
-#define EnumDesktops EnumDesktopsW
-#define EnumProps EnumPropsW
-#define EnumPropsEx EnumPropsExW
-#define EnumWindowStations EnumWindowStationsW
-#define FindWindow FindWindowW
-#define FindWindowEx FindWindowExW
-#define GetClassInfo GetClassInfoW
-#define GetClassInfoEx GetClassInfoExW
-#define GetClassLong GetClassLongW
-#define GetClassLongPtr GetClassLongPtrW
-#define GetClassName GetClassNameW
-#define GetClipboardFormatName GetClipboardFormatNameW
-#define GetDlgItemText GetDlgItemTextW
-#define GetKeyboardLayoutName GetKeyboardLayoutNameW
-#define GetKeyNameText GetKeyNameTextW
-#define GetMenuItemInfo GetMenuItemInfoW
-#define GetMenuString GetMenuStringW
-#define GetMessage GetMessageW
-#define GetMonitorInfo GetMonitorInfoW
-#define GetProp GetPropW
-#define GetRawInputDeviceInfo GetRawInputDeviceInfoW
-#define GetTabbedTextExtent GetTabbedTextExtentW
-#define GetUserObjectInformation GetUserObjectInformationW
-#define GetWindowLong GetWindowLongW
-#define GetWindowLongPtr GetWindowLongPtrW
-#define GetWindowText GetWindowTextW
-#define GetWindowTextLength GetWindowTextLengthW
-#define GetAltTabInfo GetAltTabInfoW
-#define GetWindowModuleFileName GetWindowModuleFileNameW
-#define GrayString GrayStringW
-#define InsertMenu InsertMenuW
-#define InsertMenuItem InsertMenuItemW
-#define IsCharAlpha IsCharAlphaW
-#define IsCharAlphaNumeric IsCharAlphaNumericW
-#define IsCharLower IsCharLowerW
-#define IsCharUpper IsCharUpperW
-#define IsDialogMessage IsDialogMessageW
-#define LoadAccelerators LoadAcceleratorsW
-#define LoadBitmap LoadBitmapW
-#define LoadCursor LoadCursorW
-#define LoadCursorFromFile LoadCursorFromFileW
-#define LoadIcon LoadIconW
-#define LoadImage LoadImageW
-#define LoadKeyboardLayout LoadKeyboardLayoutW
-#define LoadMenu LoadMenuW
-#define LoadMenuIndirect LoadMenuIndirectW
-#define LoadString LoadStringW
-#define MapVirtualKey MapVirtualKeyW
-#define MapVirtualKeyEx MapVirtualKeyExW
-#define MessageBox MessageBoxW
-#define MessageBoxEx MessageBoxExW
-#define MessageBoxIndirect MessageBoxIndirectW
-#define ModifyMenu ModifyMenuW
-#define OemToChar OemToCharW
-#define OemToCharBuff OemToCharBuffW
-#define OpenDesktop OpenDesktopW
-#define OpenWindowStation OpenWindowStationW
-#define PeekMessage PeekMessageW
-#define PostAppMessage PostAppMessageW
-#define PostMessage PostMessageW
-#define PostThreadMessage PostThreadMessageW
-#define RealGetWindowClass RealGetWindowClassW
-#define RegisterClass RegisterClassW
-#define RegisterClassEx RegisterClassExW
-#define RegisterClipboardFormat RegisterClipboardFormatW
-#define RegisterDeviceNotification RegisterDeviceNotificationW
-#define RegisterWindowMessage RegisterWindowMessageW
-#define RemoveProp RemovePropW
-#define SendDlgItemMessage SendDlgItemMessageW
-#define SendMessage SendMessageW
-#define SendMessageCallback SendMessageCallbackW
-#define SendMessageTimeout SendMessageTimeoutW
-#define SendNotifyMessage SendNotifyMessageW
-#define SetClassLong SetClassLongW
-#define SetClassLongPtr SetClassLongPtrW
-#define SetDlgItemText SetDlgItemTextW
-#define SetMenuItemInfo SetMenuItemInfoW
-#define SetProp SetPropW
-#define SetUserObjectInformation SetUserObjectInformationW
-#define SetWindowLong SetWindowLongW
-#define SetWindowLongPtr SetWindowLongPtrW
-#define SetWindowsHook SetWindowsHookW
-#define SetWindowsHookEx SetWindowsHookExW
-#define SetWindowText SetWindowTextW
-#define SystemParametersInfo SystemParametersInfoW
-#define TabbedTextOut TabbedTextOutW
-#define TranslateAccelerator TranslateAcceleratorW
-#define UnregisterClass UnregisterClassW
-#define VkKeyScan VkKeyScanW
-#define VkKeyScanEx VkKeyScanExW
-#define WinHelp WinHelpW
-#define wsprintf wsprintfW
-#define wvsprintf wvsprintfW
-#ifndef NOGDI
-typedef ICONMETRICSW ICONMETRICS,*LPICONMETRICS;
-typedef NONCLIENTMETRICSW NONCLIENTMETRICS,*LPNONCLIENTMETRICS;
-#define ChangeDisplaySettings ChangeDisplaySettingsW
-#define ChangeDisplaySettingsEx ChangeDisplaySettingsExW
-#define CreateDesktop CreateDesktopW
-#define EnumDisplaySettings EnumDisplaySettingsW
-#define EnumDisplaySettingsEx EnumDisplaySettingsExW
-#define EnumDisplayDevices EnumDisplayDevicesW
-#endif /* NOGDI */
-#else /* UNICODE */
-#define EDITWORDBREAKPROC EDITWORDBREAKPROCA
-#define PROPENUMPROC PROPENUMPROCA
-#define PROPENUMPROCEX PROPENUMPROCEXA
-#define DEKSTOPENUMPROC DEKSTOPENUMPROCA
-#define WINSTAENUMPROC WINSTAENUMPROCA
-#define PROPENUMPROC PROPENUMPROCA
-#define PROPENUMPROCEX PROPENUMPROCEXA
-#define MAKEINTRESOURCE MAKEINTRESOURCEA
-typedef WNDCLASSA WNDCLASS,*LPWNDCLASS,*PWNDCLASS;
-typedef WNDCLASSEXA WNDCLASSEX,*LPWNDCLASSEX,*PWNDCLASSEX;
-typedef MENUITEMINFOA MENUITEMINFO,*LPMENUITEMINFO;
-typedef LPCMENUITEMINFOA LPCMENUITEMINFO;
-typedef MSGBOXPARAMSA MSGBOXPARAMS,*PMSGBOXPARAMS,*LPMSGBOXPARAMS;
-typedef HIGHCONTRASTA HIGHCONTRAST,*LPHIGHCONTRAST;
-typedef SERIALKEYSA SERIALKEYS,*LPSERIALKEYS;
-typedef SOUNDSENTRYA SOUNDSENTRY,*LPSOUNDSENTRY;
-typedef CREATESTRUCTA CREATESTRUCT, *LPCREATESTRUCT;
-typedef CBT_CREATEWNDA CBT_CREATEWND, *LPCBT_CREATEWND;
-typedef MDICREATESTRUCTA MDICREATESTRUCT,*LPMDICREATESTRUCT;
-typedef MULTIKEYHELPA MULTIKEYHELP,*PMULTIKEYHELP,*LPMULTIKEYHELP;
-typedef MONITORINFOEXA MONITORINFOEX, *LPMONITORINFOEX;
-#define AppendMenu AppendMenuA
-#define BroadcastSystemMessage BroadcastSystemMessageA
-#define BroadcastSystemMessageEx BroadcastSystemMessageExA
-#define CallMsgFilter CallMsgFilterA
-#define CallWindowProc CallWindowProcA
-#define ChangeMenu ChangeMenuA
-#define CharLower CharLowerA
-#define CharLowerBuff CharLowerBuffA
-#define CharNext CharNextA
-#define CharPrev CharPrevA
-#define CharToOem CharToOemA
-#define CharToOemBuff CharToOemBuffA
-#define CharUpper CharUpperA
-#define CharUpperBuff CharUpperBuffA
-#define CopyAcceleratorTable CopyAcceleratorTableA
-#define CreateAcceleratorTable CreateAcceleratorTableA
-#define CreateDialog CreateDialogA
-#define CreateDialogIndirect CreateDialogIndirectA
-#define CreateDialogIndirectParam CreateDialogIndirectParamA
-#define CreateDialogParam CreateDialogParamA
-#define CreateMDIWindow CreateMDIWindowA
-#define CreateWindow CreateWindowA
-#define CreateWindowEx CreateWindowExA
-#define CreateWindowStation CreateWindowStationA
-#define DefDlgProc DefDlgProcA
-#define DefFrameProc DefFrameProcA
-#define DefMDIChildProc DefMDIChildProcA
-#define DefWindowProc DefWindowProcA
-#define DialogBox DialogBoxA
-#define DialogBoxIndirect DialogBoxIndirectA
-#define DialogBoxIndirectParam DialogBoxIndirectParamA
-#define DialogBoxParam DialogBoxParamA
-#define DispatchMessage DispatchMessageA
-#define DlgDirList DlgDirListA
-#define DlgDirListComboBox DlgDirListComboBoxA
-#define DlgDirSelectComboBoxEx DlgDirSelectComboBoxExA
-#define DlgDirSelectEx DlgDirSelectExA
-#define DrawState DrawStateA
-#define DrawText DrawTextA
-#define DrawTextEx DrawTextExA
-#define EnumDesktops EnumDesktopsA
-#define EnumProps EnumPropsA
-#define EnumPropsEx EnumPropsExA
-#define EnumWindowStations EnumWindowStationsA
-#define FindWindow FindWindowA
-#define FindWindowEx FindWindowExA
-#define GetClassInfo GetClassInfoA
-#define GetClassInfoEx GetClassInfoExA
-#define GetClassLong GetClassLongA
-#define GetClassLongPtr GetClassLongPtrA
-#define GetClassName GetClassNameA
-#define GetClipboardFormatName GetClipboardFormatNameA
-#define GetDlgItemText GetDlgItemTextA
-#define GetKeyboardLayoutName GetKeyboardLayoutNameA
-#define GetKeyNameText GetKeyNameTextA
-#define GetMenuItemInfo GetMenuItemInfoA
-#define GetMenuString GetMenuStringA
-#define GetMessage GetMessageA
-#define GetMonitorInfo GetMonitorInfoA
-#define GetProp GetPropA
-#define GetRawInputDeviceInfo GetRawInputDeviceInfoA
-#define GetTabbedTextExtent GetTabbedTextExtentA
-#define GetUserObjectInformation GetUserObjectInformationA
-#define GetWindowLong GetWindowLongA
-#define GetWindowLongPtr GetWindowLongPtrA
-#define GetWindowText GetWindowTextA
-#define GetWindowTextLength GetWindowTextLengthA
-#define GetAltTabInfo GetAltTabInfoA
-#define GetWindowModuleFileName GetWindowModuleFileNameA
-#define GrayString GrayStringA
-#define InsertMenu InsertMenuA
-#define InsertMenuItem InsertMenuItemA
-#define IsCharAlpha IsCharAlphaA
-#define IsCharAlphaNumeric IsCharAlphaNumericA
-#define IsCharLower IsCharLowerA
-#define IsCharUpper IsCharUpperA
-#define IsDialogMessage IsDialogMessageA
-#define LoadAccelerators LoadAcceleratorsA
-#define LoadBitmap LoadBitmapA
-#define LoadCursor LoadCursorA
-#define LoadIcon LoadIconA
-#define LoadCursorFromFile LoadCursorFromFileA
-#define LoadImage LoadImageA
-#define LoadKeyboardLayout LoadKeyboardLayoutA
-#define LoadMenu LoadMenuA
-#define LoadMenuIndirect LoadMenuIndirectA
-#define LoadString LoadStringA
-#define MapVirtualKey MapVirtualKeyA
-#define MapVirtualKeyEx MapVirtualKeyExA
-#define MessageBox MessageBoxA
-#define MessageBoxEx MessageBoxExA
-#define MessageBoxIndirect MessageBoxIndirectA
-#define ModifyMenu ModifyMenuA
-#define OemToChar OemToCharA
-#define OemToCharBuff OemToCharBuffA
-#define OpenDesktop OpenDesktopA
-#define OpenWindowStation OpenWindowStationA
-#define PeekMessage PeekMessageA
-#define PostAppMessage PostAppMessageA
-#define PostMessage PostMessageA
-#define PostThreadMessage PostThreadMessageA
-#define RealGetWindowClass RealGetWindowClassA
-#define RegisterClass RegisterClassA
-#define RegisterClassEx RegisterClassExA
-#define RegisterClipboardFormat RegisterClipboardFormatA
-#define RegisterDeviceNotification RegisterDeviceNotificationA
-#define RegisterWindowMessage RegisterWindowMessageA
-#define RemoveProp RemovePropA
-#define SendDlgItemMessage SendDlgItemMessageA
-#define SendMessage SendMessageA
-#define SendMessageCallback SendMessageCallbackA
-#define SendMessageTimeout SendMessageTimeoutA
-#define SendNotifyMessage SendNotifyMessageA
-#define SetClassLong SetClassLongA
-#define SetClassLongPtr SetClassLongPtrA
-#define SetDlgItemText SetDlgItemTextA
-#define SetMenuItemInfo SetMenuItemInfoA
-#define SetProp SetPropA
-#define SetUserObjectInformation SetUserObjectInformationA
-#define SetWindowLong SetWindowLongA
-#define SetWindowLongPtr SetWindowLongPtrA
-#define SetWindowsHook SetWindowsHookA
-#define SetWindowsHookEx SetWindowsHookExA
-#define SetWindowText SetWindowTextA
-#define SystemParametersInfo SystemParametersInfoA
-#define TabbedTextOut TabbedTextOutA
-#define TranslateAccelerator TranslateAcceleratorA
-#define UnregisterClass UnregisterClassA
-#define VkKeyScan VkKeyScanA
-#define VkKeyScanEx VkKeyScanExA
-#define WinHelp WinHelpA
-#define wsprintf wsprintfA
-#define wvsprintf wvsprintfA
-#ifndef NOGDI
-typedef ICONMETRICSA ICONMETRICS,*LPICONMETRICS;
-typedef NONCLIENTMETRICSA NONCLIENTMETRICS,*LPNONCLIENTMETRICS;
-#define ChangeDisplaySettings ChangeDisplaySettingsA
-#define ChangeDisplaySettingsEx ChangeDisplaySettingsExA
-#define CreateDesktop CreateDesktopA
-#define EnumDisplaySettings EnumDisplaySettingsA
-#define EnumDisplaySettingsEx EnumDisplaySettingsExA
-#define EnumDisplayDevices EnumDisplayDevicesA
-#endif /* NOGDI */
-#endif /* UNICODE */
-#endif /* RC_INVOKED */
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/winver.h b/winsup/w32api/include/winver.h
deleted file mode 100644
index a5c2d6e..0000000
--- a/winsup/w32api/include/winver.h
+++ /dev/null
@@ -1,133 +0,0 @@
-#ifndef _WINVER_H
-#define _WINVER_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define VS_FILE_INFO RT_VERSION
-#define VS_VERSION_INFO 1
-#define VS_USER_DEFINED 100
-#define VS_FFI_SIGNATURE 0xFEEF04BD
-#define VS_FFI_STRUCVERSION 0x10000
-#define VS_FFI_FILEFLAGSMASK 0x3F
-#define VS_FF_DEBUG 1
-#define VS_FF_PRERELEASE 2
-#define VS_FF_PATCHED 4
-#define VS_FF_PRIVATEBUILD 8
-#define VS_FF_INFOINFERRED 16
-#define VS_FF_SPECIALBUILD 32
-#define VOS_UNKNOWN 0
-#define VOS_DOS 0x10000
-#define VOS_OS216 0x20000
-#define VOS_OS232 0x30000
-#define VOS_NT 0x40000
-#define VOS__BASE 0
-#define VOS__WINDOWS16 1
-#define VOS__PM16 2
-#define VOS__PM32 3
-#define VOS__WINDOWS32 4
-#define VOS_DOS_WINDOWS16 0x10001
-#define VOS_DOS_WINDOWS32 0x10004
-#define VOS_OS216_PM16 0x20002
-#define VOS_OS232_PM32 0x30003
-#define VOS_NT_WINDOWS32 0x40004
-#define VFT_UNKNOWN 0
-#define VFT_APP 1
-#define VFT_DLL 2
-#define VFT_DRV 3
-#define VFT_FONT 4
-#define VFT_VXD 5
-#define VFT_STATIC_LIB 7
-#define VFT2_UNKNOWN 0
-#define VFT2_DRV_PRINTER 1
-#define VFT2_DRV_KEYBOARD 2
-#define VFT2_DRV_LANGUAGE 3
-#define VFT2_DRV_DISPLAY 4
-#define VFT2_DRV_MOUSE 5
-#define VFT2_DRV_NETWORK 6
-#define VFT2_DRV_SYSTEM 7
-#define VFT2_DRV_INSTALLABLE 8
-#define VFT2_DRV_SOUND 9
-#define VFT2_DRV_COMM 10
-#define VFT2_DRV_INPUTMETHOD 11
-#define VFT2_FONT_RASTER 1
-#define VFT2_FONT_VECTOR 2
-#define VFT2_FONT_TRUETYPE 3
-#define VFFF_ISSHAREDFILE 1
-#define VFF_CURNEDEST 1
-#define VFF_FILEINUSE 2
-#define VFF_BUFFTOOSMALL 4
-#define VIFF_FORCEINSTALL 1
-#define VIFF_DONTDELETEOLD 2
-#define VIF_TEMPFILE 1
-#define VIF_MISMATCH 2
-#define VIF_SRCOLD 4
-#define VIF_DIFFLANG 8
-#define VIF_DIFFCODEPG 16
-#define VIF_DIFFTYPE 32
-#define VIF_WRITEPROT 64
-#define VIF_FILEINUSE 128
-#define VIF_OUTOFSPACE 256
-#define VIF_ACCESSVIOLATION 512
-#define VIF_SHARINGVIOLATION 1024
-#define VIF_CANNOTCREATE 2048
-#define VIF_CANNOTDELETE 4096
-#define VIF_CANNOTRENAME 8192
-#define VIF_CANNOTDELETECUR 16384
-#define VIF_OUTOFMEMORY 32768
-#define VIF_CANNOTREADSRC 65536
-#define VIF_CANNOTREADDST 0x20000
-#define VIF_BUFFTOOSMALL 0x40000
-#ifndef RC_INVOKED
-typedef struct tagVS_FIXEDFILEINFO {
- DWORD dwSignature;
- DWORD dwStrucVersion;
- DWORD dwFileVersionMS;
- DWORD dwFileVersionLS;
- DWORD dwProductVersionMS;
- DWORD dwProductVersionLS;
- DWORD dwFileFlagsMask;
- DWORD dwFileFlags;
- DWORD dwFileOS;
- DWORD dwFileType;
- DWORD dwFileSubtype;
- DWORD dwFileDateMS;
- DWORD dwFileDateLS;
-} VS_FIXEDFILEINFO;
-DWORD WINAPI VerFindFileA(DWORD,LPSTR,LPSTR,LPSTR,LPSTR,PUINT,LPSTR,PUINT);
-DWORD WINAPI VerFindFileW(DWORD,LPWSTR,LPWSTR,LPWSTR,LPWSTR,PUINT,LPWSTR,PUINT);
-DWORD WINAPI VerInstallFileA(DWORD,LPSTR,LPSTR,LPSTR,LPSTR,LPSTR,LPSTR,PUINT);
-DWORD WINAPI VerInstallFileW(DWORD,LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR,PUINT);
-DWORD WINAPI GetFileVersionInfoSizeA(LPCSTR,PDWORD);
-DWORD WINAPI GetFileVersionInfoSizeW(LPCWSTR,PDWORD);
-BOOL WINAPI GetFileVersionInfoA(LPCSTR,DWORD,DWORD,PVOID);
-BOOL WINAPI GetFileVersionInfoW(LPCWSTR,DWORD,DWORD,PVOID);
-DWORD WINAPI VerLanguageNameA(DWORD,LPSTR,DWORD);
-DWORD WINAPI VerLanguageNameW(DWORD,LPWSTR,DWORD);
-BOOL WINAPI VerQueryValueA(const LPVOID,LPSTR,LPVOID*,PUINT);
-BOOL WINAPI VerQueryValueW(const LPVOID,LPWSTR,LPVOID*,PUINT);
-#ifdef UNICODE
-#define VerFindFile VerFindFileW
-#define VerQueryValue VerQueryValueW
-#define VerInstallFile VerInstallFileW
-#define GetFileVersionInfoSize GetFileVersionInfoSizeW
-#define GetFileVersionInfo GetFileVersionInfoW
-#define VerLanguageName VerLanguageNameW
-#define VerQueryValue VerQueryValueW
-#else
-#define VerQueryValue VerQueryValueA
-#define VerFindFile VerFindFileA
-#define VerInstallFile VerInstallFileA
-#define GetFileVersionInfoSize GetFileVersionInfoSizeA
-#define GetFileVersionInfo GetFileVersionInfoA
-#define VerLanguageName VerLanguageNameA
-#define VerQueryValue VerQueryValueA
-#endif
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/ws2spi.h b/winsup/w32api/include/ws2spi.h
deleted file mode 100644
index 7961710..0000000
--- a/winsup/w32api/include/ws2spi.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * ws2spi.h
- *
- * Winsock 2 Service Provider Interface.
- *
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-#ifndef _WS2SPI_H
-#define _WS2SPI_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#include <winsock2.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define WSPAPI WSAAPI
-#define WSPDESCRIPTION_LEN 255
-
-#ifndef RC_INVOKED
-
-typedef struct WSPData {
- WORD wVersion;
- WORD wHighVersion;
- WCHAR szDescription[WSPDESCRIPTION_LEN+1];
-} WSPDATA, FAR *LPWSPDATA;
-typedef struct _WSATHREADID {
- HANDLE ThreadHandle;
- DWORD Reserved;
-} WSATHREADID, FAR *LPWSATHREADID;
-
-typedef BOOL (CALLBACK FAR *LPBLOCKINGCALLBACK)(DWORD);
-typedef VOID (CALLBACK FAR *LPWSAUSERAPC)(DWORD);
-
-/* Prototypes for service provider procedure table */
-typedef SOCKET (WSPAPI *LPWSPACCEPT)(SOCKET,LPSOCKADDR,LPINT,LPCONDITIONPROC,DWORD,LPINT);
-typedef INT (WSPAPI *LPWSPADDRESSTOSTRING)(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOW,LPWSTR,LPDWORD,LPINT);
-typedef INT (WSPAPI *LPWSPASYNCSELECT)(SOCKET,HWND,UINT,LONG,LPINT);
-typedef INT (WSPAPI *LPWSPBIND)(SOCKET,const struct sockaddr*,INT,LPINT);
-typedef INT (WSPAPI *LPWSPCANCELBLOCKINGCALL)(LPINT);
-typedef INT (WSPAPI *LPWSPCLEANUP)(LPINT);
-typedef INT (WSPAPI *LPWSPCLOSESOCKET)(SOCKET,LPINT);
-typedef INT (WSPAPI *LPWSPCONNECT)(SOCKET,const struct sockaddr*,INT,LPWSABUF,LPWSABUF,LPQOS,LPQOS,LPINT);
-typedef INT (WSPAPI *LPWSPDUPLICATESOCKET)(SOCKET,DWORD,LPWSAPROTOCOL_INFOW,LPINT);
-typedef INT (WSPAPI *LPWSPENUMNETWORKEVENTS)(SOCKET,WSAEVENT,LPWSANETWORKEVENTS,LPINT);
-typedef INT (WSPAPI *LPWSPEVENTSELECT)(SOCKET,WSAEVENT,LONG,LPINT);
-typedef BOOL (WSPAPI *LPWSPGETOVERLAPPEDRESULT)(SOCKET,LPWSAOVERLAPPED,LPDWORD,BOOL,LPDWORD,LPINT);
-typedef INT (WSPAPI *LPWSPGETPEERNAME)(SOCKET,LPSOCKADDR,LPINT,LPINT);
-typedef BOOL (WSPAPI *LPWSPGETQOSBYNAME)(SOCKET,LPWSABUF,LPQOS,LPINT);
-typedef INT (WSPAPI *LPWSPGETSOCKNAME)(SOCKET,LPSOCKADDR,LPINT,LPINT);
-typedef INT (WSPAPI *LPWSPGETSOCKOPT)(SOCKET,INT,INT,CHAR FAR*,LPINT,LPINT);
-typedef INT (WSPAPI *LPWSPIOCTL)(SOCKET,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,
- LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE,LPWSATHREADID,LPINT);
-typedef SOCKET (WSPAPI *LPWSPJOINLEAF)(SOCKET,const struct sockaddr*,INT,LPWSABUF,LPWSABUF,LPQOS,LPQOS,DWORD,LPINT);
-typedef INT (WSPAPI *LPWSPLISTEN)(SOCKET,INT,LPINT);
-typedef INT (WSPAPI *LPWSPRECV)(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,
-LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE,LPWSATHREADID,LPINT);
-typedef INT (WSPAPI *LPWSPRECVDISCONNECT)(SOCKET,LPWSABUF,LPINT);
-typedef INT (WSPAPI *LPWSPRECVFROM)(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,LPSOCKADDR,
-LPINT,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE,LPWSATHREADID,LPINT);
-typedef INT (WSPAPI *LPWSPSELECT)(INT,LPFD_SET,LPFD_SET,LPFD_SET,CONST TIMEVAL*,LPINT);
-typedef INT (WSPAPI *LPWSPSEND)(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,
-LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE,LPWSATHREADID,LPINT);
-typedef INT (WSPAPI *LPWSPSENDDISCONNECT)(SOCKET,LPWSABUF,LPINT);
-typedef INT (WSPAPI *LPWSPSENDTO)(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,const struct sockaddr*,
- INT,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE,LPWSATHREADID,LPINT);
-typedef INT (WSPAPI *LPWSPSETSOCKOPT)(SOCKET,INT,INT,CONST CHAR FAR*,INT,LPINT);
-typedef INT (WSPAPI *LPWSPSHUTDOWN)(SOCKET,INT,LPINT);
-typedef SOCKET (WSPAPI *LPWSPSOCKET)(INT,INT,INT,LPWSAPROTOCOL_INFOW,GROUP,DWORD,LPINT);
-typedef INT (WSPAPI *LPWSPSTRINGTOADDRESS)(LPWSTR,INT,LPWSAPROTOCOL_INFOW,LPSOCKADDR,LPINT,LPINT);
-
-/* Service provider procedure table */
-typedef struct _WSPPROC_TABLE {
- LPWSPACCEPT lpWSPAccept;
- LPWSPADDRESSTOSTRING lpWSPAddressToString;
- LPWSPASYNCSELECT lpWSPAsyncSelect;
- LPWSPBIND lpWSPBind;
- LPWSPCANCELBLOCKINGCALL lpWSPCancelBlockingCall;
- LPWSPCLEANUP lpWSPCleanup;
- LPWSPCLOSESOCKET lpWSPCloseSocket;
- LPWSPCONNECT lpWSPConnect;
- LPWSPDUPLICATESOCKET lpWSPDuplicateSocket;
- LPWSPENUMNETWORKEVENTS lpWSPEnumNetworkEvents;
- LPWSPEVENTSELECT lpWSPEventSelect;
- LPWSPGETOVERLAPPEDRESULT lpWSPGetOverlappedResult;
- LPWSPGETPEERNAME lpWSPGetPeerName;
- LPWSPGETSOCKNAME lpWSPGetSockName;
- LPWSPGETSOCKOPT lpWSPGetSockOpt;
- LPWSPGETQOSBYNAME lpWSPGetQOSByName;
- LPWSPIOCTL lpWSPIoctl;
- LPWSPJOINLEAF lpWSPJoinLeaf;
- LPWSPLISTEN lpWSPListen;
- LPWSPRECV lpWSPRecv;
- LPWSPRECVDISCONNECT lpWSPRecvDisconnect;
- LPWSPRECVFROM lpWSPRecvFrom;
- LPWSPSELECT lpWSPSelect;
- LPWSPSEND lpWSPSend;
- LPWSPSENDDISCONNECT lpWSPSendDisconnect;
- LPWSPSENDTO lpWSPSendTo;
- LPWSPSETSOCKOPT lpWSPSetSockOpt;
- LPWSPSHUTDOWN lpWSPShutdown;
- LPWSPSOCKET lpWSPSocket;
- LPWSPSTRINGTOADDRESS lpWSPStringToAddress;
-} WSPPROC_TABLE, FAR* LPWSPPROC_TABLE;
-
-/* Prototypes for service provider upcall procedure table */
-typedef BOOL (WSPAPI *LPWPUCLOSEEVENT)(WSAEVENT,LPINT);
-typedef INT (WSPAPI *LPWPUCLOSESOCKETHANDLE)(SOCKET,LPINT);
-typedef INT (WSPAPI *LPWPUCLOSETHREAD)(LPWSATHREADID,LPINT);
-typedef WSAEVENT (WSPAPI *LPWPUCREATEEVENT)(LPINT);
-typedef SOCKET (WSPAPI *LPWPUCREATESOCKETHANDLE)(DWORD,DWORD,LPINT);
-typedef SOCKET (WSPAPI *LPWPUFDISSET)(SOCKET,LPFD_SET);
-typedef INT (WSPAPI *LPWPUGETPROVIDERPATH)(LPGUID,LPWSTR,LPINT,LPINT);
-typedef SOCKET (WSPAPI *LPWPUMODIFYIFSHANDLE)(DWORD,SOCKET,LPINT);
-typedef INT (WSPAPI *LPWPUOPENCURRENTTHREAD)(LPWSATHREADID,LPINT);
-typedef BOOL (WSPAPI *LPWPUPOSTMESSAGE)(HWND,UINT,WPARAM,LPARAM);
-typedef INT (WSPAPI *LPWPUQUERYBLOCKINGCALLBACK)(DWORD,LPBLOCKINGCALLBACK FAR*,LPDWORD,LPINT);
-typedef INT (WSPAPI *LPWPUQUERYSOCKETHANDLECONTEXT)(SOCKET,LPDWORD,LPINT);
-typedef INT (WSPAPI *LPWPUQUEUEAPC)(LPWSATHREADID,LPWSAUSERAPC,DWORD,LPINT);
-typedef BOOL (WSPAPI *LPWPURESETEVENT)(WSAEVENT,LPINT);
-typedef BOOL (WSPAPI *LPWPUSETEVENT)(WSAEVENT,LPINT);
-/* Available only directly from the DLL */
-typedef INT (WSPAPI *LPWPUCOMPLETEOVERLAPPEDREQUEST)(SOCKET,LPWSAOVERLAPPED,DWORD,DWORD,LPINT);
-
-/* Service Provider upcall table */
-typedef struct _WSPUPCALLTABLE {
- LPWPUCLOSEEVENT lpWPUCloseEvent;
- LPWPUCLOSESOCKETHANDLE lpWPUCloseSocketHandle;
- LPWPUCREATEEVENT lpWPUCreateEvent;
- LPWPUCREATESOCKETHANDLE lpWPUCreateSocketHandle;
- LPWPUFDISSET lpWPUFDIsSet;
- LPWPUGETPROVIDERPATH lpWPUGetProviderPath;
- LPWPUMODIFYIFSHANDLE lpWPUModifyIFSHandle;
- LPWPUPOSTMESSAGE lpWPUPostMessage;
- LPWPUQUERYBLOCKINGCALLBACK lpWPUQueryBlockingCallback;
- LPWPUQUERYSOCKETHANDLECONTEXT lpWPUQuerySocketHandleContext;
- LPWPUQUEUEAPC lpWPUQueueApc;
- LPWPURESETEVENT lpWPUResetEvent;
- LPWPUSETEVENT lpWPUSetEvent;
- LPWPUOPENCURRENTTHREAD lpWPUOpenCurrentThread;
- LPWPUCLOSETHREAD lpWPUCloseThread;
-} WSPUPCALLTABLE, FAR* LPWSPUPCALLTABLE;
-
-typedef INT (WSPAPI *LPWSPSTARTUP)(WORD,LPWSPDATA,LPWSAPROTOCOL_INFOW,WSPUPCALLTABLE,LPWSPPROC_TABLE);
-
-/* Prototypes for service provider namespace procedure table */
-typedef INT (WSPAPI *LPNSPCLEANUP)(LPGUID);
-typedef INT (WSPAPI *LPNSPGETSERVICECLASSINFO)(LPGUID,LPDWORD,LPWSASERVICECLASSINFOW);
-typedef INT (WSPAPI *LPNSPINSTALLSERVICECLASS)(LPGUID,LPWSASERVICECLASSINFOW);
-typedef INT (WSPAPI *LPNSPLOOKUPSERVICEBEGIN)(LPGUID,LPWSAQUERYSETW,LPWSASERVICECLASSINFOW,DWORD,LPHANDLE);
-typedef INT (WSPAPI *LPNSPLOOKUPSERVICEEND)(HANDLE);
-typedef INT (WSPAPI *LPNSPLOOKUPSERVICENEXT)(HANDLE,DWORD,LPDWORD,LPWSAQUERYSET);
-typedef INT (WSPAPI *LPNSPREMOVESERVICECLASS)(LPGUID,LPGUID);
-typedef INT (WSPAPI *LPNSPSETSERVICE)(LPGUID,LPWSASERVICECLASSINFOW,LPWSAQUERYSETW,WSAESETSERVICEOP,DWORD);
-
-typedef struct _NSP_ROUTINE {
- DWORD cbSize;
- DWORD dwMajorVersion;
- DWORD dwMinorVersion;
- LPNSPCLEANUP NSPCleanup;
- LPNSPLOOKUPSERVICEBEGIN NSPLookupServiceBegin;
- LPNSPLOOKUPSERVICENEXT NSPLookupServiceNext;
- LPNSPLOOKUPSERVICEEND NSPLookupServiceEnd;
- LPNSPSETSERVICE NSPSetService;
- LPNSPINSTALLSERVICECLASS NSPInstallServiceClass;
- LPNSPREMOVESERVICECLASS NSPRemoveServiceClass;
- LPNSPGETSERVICECLASSINFO NSPGetServiceClassInfo;
-} NSP_ROUTINE, *PNSP_ROUTINE, *LPNSP_ROUTINE;
-
-INT WSPAPI NSPStartup(LPGUID,LPNSP_ROUTINE);
-
-/* WinSock 2 DLL function prototypes */
-INT WSPAPI WPUCompleteOverlappedRequest(SOCKET,LPWSAOVERLAPPED,DWORD,DWORD,LPINT);
-INT WSPAPI WSPStartup(WORD,LPWSPDATA,LPWSAPROTOCOL_INFOW,WSPUPCALLTABLE,LPWSPPROC_TABLE);
-INT WSPAPI WSCDeinstallProvider(LPGUID,LPINT);
-INT WSPAPI WSCEnumProtocols(LPINT,LPWSAPROTOCOL_INFOW,LPDWORD,LPINT);
-INT WSPAPI WSCGetProviderPath(LPGUID,LPWSTR,LPINT,LPINT);
-INT WSPAPI WSCInstallProvider(CONST LPGUID,CONST LPWSTR,CONST LPWSAPROTOCOL_INFOW,DWORD,LPINT);
-INT WSPAPI WSCEnableNSProvider(LPGUID,BOOL);
-INT WSPAPI WSCInstallNameSpace(LPWSTR,LPWSTR,DWORD,DWORD,LPGUID);
-INT WSPAPI WSCUnInstallNameSpace(LPGUID);
-INT WSPAPI WSCWriteProviderOrder(LPDWORD,DWORD);
-
-#endif /* RC_INVOKED */
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif
diff --git a/winsup/w32api/include/ws2tcpip.h b/winsup/w32api/include/ws2tcpip.h
deleted file mode 100644
index 2eac66a..0000000
--- a/winsup/w32api/include/ws2tcpip.h
+++ /dev/null
@@ -1,379 +0,0 @@
-/*
- * ws2tcpip.h : TCP/IP specific extensions in Windows Sockets 2
- *
- * Portions Copyright (c) 1980, 1983, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- */
-
-#ifndef _WS2TCPIP_H
-#define _WS2TCPIP_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#if (defined _WINSOCK_H && !defined _WINSOCK2_H)
-#error "ws2tcpip.h is not compatible with winsock.h. Include winsock2.h instead."
-#endif
-
-#include <winsock2.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * The IP_* macros are also defined in winsock.h, but some values are different there.
- * The values defined in winsock.h for 1.1 and used in wsock32.dll are consistent
- * with the original values Steve Deering defined in his document "IP Multicast Extensions
- * for 4.3BSD UNIX related systems (MULTICAST 1.2 Release)." However, these conflicted with
- * the definitions for some IPPROTO_IP level socket options already assigned by BSD,
- * so Berkeley changed all the values by adding 7. WinSock2 (ws2_32.dll) uses
- * the BSD 4.4 compatible values defined here.
- *
- * See also: msdn kb article Q257460
- * http://support.microsoft.com/support/kb/articles/Q257/4/60.asp
- */
-
-/* This is also defined in winsock.h; value hasn't changed */
-#define IP_OPTIONS 1
-
-#define IP_HDRINCL 2
-/*
- * These are also be defined in winsock.h,
- * but values have changed for WinSock2 interface
- */
-#define IP_TOS 3 /* old (winsock 1.1) value 8 */
-#define IP_TTL 4 /* old value 7 */
-#define IP_MULTICAST_IF 9 /* old value 2 */
-#define IP_MULTICAST_TTL 10 /* old value 3 */
-#define IP_MULTICAST_LOOP 11 /* old value 4 */
-#define IP_ADD_MEMBERSHIP 12 /* old value 5 */
-#define IP_DROP_MEMBERSHIP 13 /* old value 6 */
-#define IP_DONTFRAGMENT 14 /* old value 9 */
-#define IP_ADD_SOURCE_MEMBERSHIP 15
-#define IP_DROP_SOURCE_MEMBERSHIP 16
-#define IP_BLOCK_SOURCE 17
-#define IP_UNBLOCK_SOURCE 18
-#define IP_PKTINFO 19
-
-/*
- * As with BSD implementation, IPPROTO_IPV6 level socket options have
- * same values as IPv4 counterparts.
- */
-#define IPV6_UNICAST_HOPS 4
-#define IPV6_MULTICAST_IF 9
-#define IPV6_MULTICAST_HOPS 10
-#define IPV6_MULTICAST_LOOP 11
-#define IPV6_ADD_MEMBERSHIP 12
-#define IPV6_DROP_MEMBERSHIP 13
-#define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP
-#define IPV6_LEAVE_GROUP IPV6_DROP_MEMBERSHIP
-#define IPV6_PKTINFO 19
-
-#define IP_DEFAULT_MULTICAST_TTL 1
-#define IP_DEFAULT_MULTICAST_LOOP 1
-#define IP_MAX_MEMBERSHIPS 20
-
-#define TCP_EXPEDITED_1122 2
-
-#define UDP_NOCHECKSUM 1
-
-/* INTERFACE_INFO iiFlags */
-#define IFF_UP 1
-#define IFF_BROADCAST 2
-#define IFF_LOOPBACK 4
-#define IFF_POINTTOPOINT 8
-#define IFF_MULTICAST 16
-
-#define SIO_GET_INTERFACE_LIST _IOR('t', 127, u_long)
-
-#define INET_ADDRSTRLEN 16
-#define INET6_ADDRSTRLEN 46
-
-/* getnameinfo constants */
-#define NI_MAXHOST 1025
-#define NI_MAXSERV 32
-
-#define NI_NOFQDN 0x01
-#define NI_NUMERICHOST 0x02
-#define NI_NAMEREQD 0x04
-#define NI_NUMERICSERV 0x08
-#define NI_DGRAM 0x10
-
-/* getaddrinfo constants */
-#define AI_PASSIVE 1
-#define AI_CANONNAME 2
-#define AI_NUMERICHOST 4
-
-/* getaddrinfo error codes */
-#define EAI_AGAIN WSATRY_AGAIN
-#define EAI_BADFLAGS WSAEINVAL
-#define EAI_FAIL WSANO_RECOVERY
-#define EAI_FAMILY WSAEAFNOSUPPORT
-#define EAI_MEMORY WSA_NOT_ENOUGH_MEMORY
-#define EAI_NODATA WSANO_DATA
-#define EAI_NONAME WSAHOST_NOT_FOUND
-#define EAI_SERVICE WSATYPE_NOT_FOUND
-#define EAI_SOCKTYPE WSAESOCKTNOSUPPORT
-
-/*
- * ip_mreq also in winsock.h for WinSock1.1,
- * but online msdn docs say it is defined here for WinSock2.
- */
-
-struct ip_mreq {
- struct in_addr imr_multiaddr;
- struct in_addr imr_interface;
-};
-
-struct ip_mreq_source {
- struct in_addr imr_multiaddr;
- struct in_addr imr_sourceaddr;
- struct in_addr imr_interface;
-};
-
-struct ip_msfilter {
- struct in_addr imsf_multiaddr;
- struct in_addr imsf_interface;
- u_long imsf_fmode;
- u_long imsf_numsrc;
- struct in_addr imsf_slist[1];
-};
-
-#define IP_MSFILTER_SIZE(numsrc) \
- (sizeof(struct ip_msfilter) - sizeof(struct in_addr) \
- + (numsrc) * sizeof(struct in_addr))
-
-struct in_pktinfo {
- IN_ADDR ipi_addr;
- UINT ipi_ifindex;
-};
-typedef struct in_pktinfo IN_PKTINFO;
-
-
-/* ipv6 */
-/* These require XP or .NET Server or use of add-on IPv6 stacks on NT 4
- or higher */
-
-/* This is based on the example given in RFC 2553 with stdint types
- changed to BSD types. For now, use these field names until there
- is some consistency in MS docs. In this file, we only use the
- in6_addr structure start address, with casts to get the right offsets
- when testing addresses */
-
-struct in6_addr {
- union {
- u_char _S6_u8[16];
- u_short _S6_u16[8];
- u_long _S6_u32[4];
- } _S6_un;
-};
-/* s6_addr is the standard name */
-#define s6_addr _S6_un._S6_u8
-
-/* These are GLIBC names */
-#define s6_addr16 _S6_un._S6_u16
-#define s6_addr32 _S6_un._S6_u32
-
-/* These are used in some MS code */
-#define in_addr6 in6_addr
-#define _s6_bytes _S6_un._S6_u8
-#define _s6_words _S6_un._S6_u16
-
-typedef struct in6_addr IN6_ADDR, *PIN6_ADDR, *LPIN6_ADDR;
-
-struct sockaddr_in6 {
- short sin6_family; /* AF_INET6 */
- u_short sin6_port; /* transport layer port # */
- u_long sin6_flowinfo; /* IPv6 traffic class & flow info */
- struct in6_addr sin6_addr; /* IPv6 address */
- u_long sin6_scope_id; /* set of interfaces for a scope */
-};
-typedef struct sockaddr_in6 SOCKADDR_IN6, *PSOCKADDR_IN6, *LPSOCKADDR_IN6;
-
-extern const struct in6_addr in6addr_any;
-extern const struct in6_addr in6addr_loopback;
-/* the above can get initialised using: */
-#define IN6ADDR_ANY_INIT { 0 }
-#define IN6ADDR_LOOPBACK_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }
-
-/* Described in RFC 2292, but not in 2553 */
-/* int IN6_ARE_ADDR_EQUAL(const struct in6_addr * a, const struct in6_addr * b) */
-#define IN6_ARE_ADDR_EQUAL(a, b) \
- (memcmp ((void*)(a), (void*)(b), sizeof (struct in6_addr)) == 0)
-
-
-/* Address Testing Macros
-
- These macro functions all take const struct in6_addr* as arg.
- Static inlines would allow type checking, but RFC 2553 says they
- macros.
- NB: These are written specifically for little endian host */
-
-#define IN6_IS_ADDR_UNSPECIFIED(_addr) \
- ( (((const u_long *)(_addr))[0] == 0) \
- && (((const u_long *)(_addr))[1] == 0) \
- && (((const u_long *)(_addr))[2] == 0) \
- && (((const u_long *)(_addr))[3] == 0))
-
-#define IN6_IS_ADDR_LOOPBACK(_addr) \
- ( (((const u_long *)(_addr))[0] == 0) \
- && (((const u_long *)(_addr))[1] == 0) \
- && (((const u_long *)(_addr))[2] == 0) \
- && (((const u_long *)(_addr))[3] == 0x01000000)) /* Note byte order reversed */
-/* (((const u_long *)(_addr))[3] == ntohl(1)) */
-
-#define IN6_IS_ADDR_MULTICAST(_addr) (((const u_char *) (_addr))[0] == 0xff)
-
-#define IN6_IS_ADDR_LINKLOCAL(_addr) \
- ( (((const u_char *)(_addr))[0] == 0xfe) \
- && ((((const u_char *)(_addr))[1] & 0xc0) == 0x80))
-
-#define IN6_IS_ADDR_SITELOCAL(_addr) \
- ( (((const u_char *)(_addr))[0] == 0xfe) \
- && ((((const u_char *)(_addr))[1] & 0xc0) == 0xc0))
-
-#define IN6_IS_ADDR_V4MAPPED(_addr) \
- ( (((const u_long *)(_addr))[0] == 0) \
- && (((const u_long *)(_addr))[1] == 0) \
- && (((const u_long *)(_addr))[2] == 0xffff0000)) /* Note byte order reversed */
-/* (((const u_long *)(_addr))[2] == ntohl(0x0000ffff))) */
-
-#define IN6_IS_ADDR_V4COMPAT(_addr) \
- ( (((const u_long *)(_addr))[0] == 0) \
- && (((const u_long *)(_addr))[1] == 0) \
- && (((const u_long *)(_addr))[2] == 0) \
- && (((const u_long *)(_addr))[3] != 0) \
- && (((const u_long *)(_addr))[3] != 0x01000000)) /* Note byte order reversed */
-/* (ntohl (((const u_long *)(_addr))[3]) > 1 ) */
-
-
-#define IN6_IS_ADDR_MC_NODELOCAL(_addr) \
- ( IN6_IS_ADDR_MULTICAST(_addr) \
- && ((((const u_char *)(_addr))[1] & 0xf) == 0x1))
-
-#define IN6_IS_ADDR_MC_LINKLOCAL(_addr) \
- ( IN6_IS_ADDR_MULTICAST (_addr) \
- && ((((const u_char *)(_addr))[1] & 0xf) == 0x2))
-
-#define IN6_IS_ADDR_MC_SITELOCAL(_addr) \
- ( IN6_IS_ADDR_MULTICAST(_addr) \
- && ((((const u_char *)(_addr))[1] & 0xf) == 0x5))
-
-#define IN6_IS_ADDR_MC_ORGLOCAL(_addr) \
- ( IN6_IS_ADDR_MULTICAST(_addr) \
- && ((((const u_char *)(_addr))[1] & 0xf) == 0x8))
-
-#define IN6_IS_ADDR_MC_GLOBAL(_addr) \
- ( IN6_IS_ADDR_MULTICAST(_addr) \
- && ((((const u_char *)(_addr))[1] & 0xf) == 0xe))
-
-
-typedef int socklen_t;
-
-struct ipv6_mreq {
- struct in6_addr ipv6mr_multiaddr;
- unsigned int ipv6mr_interface;
-};
-typedef struct ipv6_mreq IPV6_MREQ;
-
-struct in6_pktinfo {
- IN6_ADDR ipi6_addr;
- UINT ipi6_ifindex;
-};
-typedef struct in6_pktinfo IN6_PKTINFO;
-
-struct addrinfo {
- int ai_flags;
- int ai_family;
- int ai_socktype;
- int ai_protocol;
- size_t ai_addrlen;
- char *ai_canonname;
- struct sockaddr *ai_addr;
- struct addrinfo *ai_next;
-};
-
-#if (_WIN32_WINNT >= 0x0501)
-void WSAAPI freeaddrinfo (struct addrinfo*);
-int WSAAPI getaddrinfo (const char*,const char*,const struct addrinfo*,
- struct addrinfo**);
-int WSAAPI getnameinfo(const struct sockaddr*,socklen_t,char*,DWORD,
- char*,DWORD,int);
-#else
-/* FIXME: Need WS protocol-independent API helpers. */
-#endif
-
-static __inline char*
-gai_strerrorA(int ecode)
-{
- static char message[1024+1];
- DWORD dwFlags = FORMAT_MESSAGE_FROM_SYSTEM
- | FORMAT_MESSAGE_IGNORE_INSERTS
- | FORMAT_MESSAGE_MAX_WIDTH_MASK;
- DWORD dwLanguageId = MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT);
- FormatMessageA(dwFlags, NULL, ecode, dwLanguageId, (LPSTR)message, 1024, NULL);
- return message;
-}
-static __inline WCHAR*
-gai_strerrorW(int ecode)
-{
- static WCHAR message[1024+1];
- DWORD dwFlags = FORMAT_MESSAGE_FROM_SYSTEM
- | FORMAT_MESSAGE_IGNORE_INSERTS
- | FORMAT_MESSAGE_MAX_WIDTH_MASK;
- DWORD dwLanguageId = MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT);
- FormatMessageW(dwFlags, NULL, ecode, dwLanguageId, (LPWSTR)message, 1024, NULL);
- return message;
-}
-#ifdef UNICODE
-#define gai_strerror gai_strerrorW
-#else
-#define gai_strerror gai_strerrorA
-#endif
-
-/* Some older IPv4/IPv6 compatibility stuff */
-
-/* This struct lacks sin6_scope_id; retained for use in sockaddr_gen */
-struct sockaddr_in6_old {
- short sin6_family;
- u_short sin6_port;
- u_long sin6_flowinfo;
- struct in6_addr sin6_addr;
-};
-
-typedef union sockaddr_gen{
- struct sockaddr Address;
- struct sockaddr_in AddressIn;
- struct sockaddr_in6_old AddressIn6;
-} sockaddr_gen;
-
-
-typedef struct _INTERFACE_INFO {
- u_long iiFlags;
- sockaddr_gen iiAddress;
- sockaddr_gen iiBroadcastAddress;
- sockaddr_gen iiNetmask;
-} INTERFACE_INFO, *LPINTERFACE_INFO;
-
-/*
- The definition above can cause problems on NT4,prior to sp4.
- To workaround, include the following struct and typedef and
- #define INTERFACE_INFO OLD_INTERFACE_INFO
- See: FIX: WSAIoctl SIO_GET_INTERFACE_LIST Option Problem
- (Q181520) in MSDN KB.
-
- The old definition causes problems on newer NT and on XP.
-
-typedef struct _OLD_INTERFACE_INFO {
- u_long iiFlags;
- struct sockaddr iiAddress;
- struct sockaddr iiBroadcastAddress;
- struct sockaddr iiNetmask;
-} OLD_INTERFACE_INFO;
-*/
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/wsahelp.h b/winsup/w32api/include/wsahelp.h
deleted file mode 100644
index 8ff876e..0000000
--- a/winsup/w32api/include/wsahelp.h
+++ /dev/null
@@ -1,98 +0,0 @@
-#ifndef _WSAHELP_H
-#define _WSAHELP_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#include <winsock2.h>
-#include <ntsecapi.h>
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define WSH_NOTIFY_BIND 0x00000001
-#define WSH_NOTIFY_LISTEN 0x00000002
-#define WSH_NOTIFY_CONNECT 0x00000004
-#define WSH_NOTIFY_ACCEPT 0x00000008
-#define WSH_NOTIFY_SHUTDOWN_RECEIVE 0x00000010
-#define WSH_NOTIFY_SHUTDOWN_SEND 0x00000020
-#define WSH_NOTIFY_SHUTDOWN_ALL 0x00000040
-#define WSH_NOTIFY_CLOSE 0x00000080
-#define WSH_NOTIFY_CONNECT_ERROR 0x00000100
-#define SOL_INTERNAL 0xFFFE
-#define SO_CONTEXT 1
-
-#ifndef RC_INVOKED
-typedef enum _SOCKADDR_ADDRESS_INFO {
- SockaddrAddressInfoNormal,
- SockaddrAddressInfoWildcard,
- SockaddrAddressInfoBroadcast,
- SockaddrAddressInfoLoopback
-} SOCKADDR_ADDRESS_INFO, *PSOCKADDR_ADDRESS_INFO;
-typedef enum _SOCKADDR_ENDPOINT_INFO {
- SockaddrEndpointInfoNormal,
- SockaddrEndpointInfoWildcard,
- SockaddrEndpointInfoReserved
-} SOCKADDR_ENDPOINT_INFO, *PSOCKADDR_ENDPOINT_INFO;
-typedef struct _SOCKADDR_INFO {
- SOCKADDR_ADDRESS_INFO AddressInfo;
- SOCKADDR_ENDPOINT_INFO EndpointInfo;
-} SOCKADDR_INFO, *PSOCKADDR_INFO;
-
-INT WINAPI WSHAddressToString(LPSOCKADDR,INT,LPWSAPROTOCOL_INFOW,LPWSTR,LPDWORD);
-INT WINAPI WSHEnumProtocols(LPINT,LPWSTR,LPVOID,LPDWORD);
-INT WINAPI WSHGetBroadcastSockaddr(PVOID,PSOCKADDR,PINT);
-INT WINAPI WSHGetProviderGuid(LPWSTR,LPGUID);
-INT WINAPI WSHGetSockaddrType(PSOCKADDR,DWORD,PSOCKADDR_INFO);
-INT WINAPI WSHGetSocketInformation(PVOID,SOCKET,HANDLE,HANDLE,INT,INT,PCHAR,INT);
-INT WINAPI WSHGetWildcardSockaddr(PVOID,PSOCKADDR,PINT);
-INT WINAPI WSHGetWSAProtocolInfo(LPWSTR,LPWSAPROTOCOL_INFOW*,LPDWORD);
-INT WINAPI WSHIoctl(PVOID,SOCKET,HANDLE,HANDLE,DWORD,LPVOID,DWORD,LPVOID,DWORD,
-LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE,LPBOOL);
-INT WINAPI WSHJoinLeaf(PVOID,SOCKET,HANDLE,HANDLE,PVOID,SOCKET,PSOCKADDR,
-DWORD,LPWSABUF,LPWSABUF,LPQOS,LPQOS,DWORD);
-INT WINAPI WSHNotify(PVOID,SOCKET,HANDLE,HANDLE,DWORD);
-INT WINAPI WSHOpenSocket(PINT,PINT,PINT,PUNICODE_STRING,PVOID,PDWORD);
-INT WINAPI WSHOpenSocket2(PINT,PINT,PINT,GROUP,DWORD,PUNICODE_STRING,PVOID*,PDWORD);
-INT WINAPI WSHSetSocketInformation(PVOID,SOCKET,HANDLE,HANDLE,INT,INT,PCHAR,INT);
-INT WINAPI WSHStringToAddress(LPWSTR,DWORD,LPWSAPROTOCOL_INFOW,LPSOCKADDR,LPDWORD);
-
-typedef INT (WINAPI *PWSH_ADDRESS_TO_STRING)(LPSOCKADDR,INT,LPWSAPROTOCOL_INFOW,LPWSTR,LPDWORD);
-typedef INT (WINAPI *PWSH_ENUM_PROTOCOLS)(LPINT,LPWSTR,LPVOID,LPDWORD);
-typedef INT (WINAPI *PWSH_GET_BROADCAST_SOCKADDR)(PVOID,PSOCKADDR,PINT);
-typedef INT (WINAPI *PWSH_GET_PROVIDER_GUID)(LPWSTR,LPGUID);
-typedef INT (WINAPI *PWSH_GET_SOCKADDR_TYPE)(PSOCKADDR,DWORD,PSOCKADDR_INFO);
-typedef INT (WINAPI *PWSH_GET_SOCKET_INFORMATION)(PVOID,SOCKET,HANDLE,HANDLE,INT,INT,PCHAR,INT);
-typedef INT (WINAPI *PWSH_GET_WILDCARD_SOCKEADDR)(PVOID,PSOCKADDR,PINT);
-typedef INT (WINAPI *PWSH_GET_WSAPROTOCOL_INFO)(LPWSTR,LPWSAPROTOCOL_INFOW*,LPDWORD);
-typedef INT (WINAPI *PWSH_IOCTL)(PVOID,SOCKET,HANDLE,HANDLE,DWORD,LPVOID,DWORD,
- LPVOID,DWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE,LPBOOL);
-typedef INT (WINAPI *PWSH_JOIN_LEAF)(PVOID,SOCKET,HANDLE,HANDLE,PVOID,SOCKET,
- PSOCKADDR,DWORD,LPWSABUF,LPWSABUF,LPQOS,LPQOS,DWORD);
-typedef INT (WINAPI *PWSH_NOTIFY)(PVOID,SOCKET,HANDLE,HANDLE,DWORD);
-typedef INT (WINAPI *PWSH_OPEN_SOCKET)(PINT,PINT,PINT,PUNICODE_STRING,PVOID,PDWORD);
-typedef INT (WINAPI *PWSH_OPEN_SOCKET2)(PINT,PINT,PINT,GROUP,DWORD,PUNICODE_STRING,PVOID*,PDWORD);
-typedef INT (WINAPI *PWSH_SET_SOCKET_INFORMATION)(PVOID,SOCKET,HANDLE,HANDLE,INT,INT,PCHAR,INT);
-typedef INT (WINAPI *PWSH_STRING_TO_ADDRESS)(LPWSTR,DWORD,LPWSAPROTOCOL_INFOW,LPSOCKADDR,LPDWORD);
-
-#ifndef __OBJC__
-/* "Protocol" is a builtin class name in ObjC. */
-typedef struct _WINSOCK_MAPPING {
- DWORD Rows;
- DWORD Columns;
- struct {
- DWORD AddressFamily;
- DWORD SocketType;
- DWORD Protocol;
- } Mapping[1];
-} WINSOCK_MAPPING, *PWINSOCK_MAPPING;
-DWORD WINAPI WSHGetWinsockMapping(PWINSOCK_MAPPING,DWORD);
-typedef DWORD (WINAPI *PWSH_GET_WINSOCK_MAPPING)(PWINSOCK_MAPPING,DWORD);
-#endif
-
-#endif /* RC_INVOKED */
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif
diff --git a/winsup/w32api/include/wsipx.h b/winsup/w32api/include/wsipx.h
deleted file mode 100644
index ff831a1..0000000
--- a/winsup/w32api/include/wsipx.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* WSIPX.H - contributed by the WINE project
- */
-
-#ifndef _WSIPX_H
-#define _WSIPX_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define NSPROTO_IPX 1000
-#define NSPROTO_SPX 1256
-#define NSPROTO_SPXII 1257
-
-typedef struct sockaddr_ipx {
- short sa_family;
- char sa_netnum[4];
- char sa_nodenum[6];
- unsigned short sa_socket;
-} SOCKADDR_IPX, *PSOCKADDR_IPX, *LPSOCKADDR_IPX;
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/wsnetbs.h b/winsup/w32api/include/wsnetbs.h
deleted file mode 100644
index e435b5d..0000000
--- a/winsup/w32api/include/wsnetbs.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#ifndef _WSNETBS_H
-#define _WSNETBS_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#define NETBIOS_NAME_LENGTH 16
-#define NETBIOS_UNIQUE_NAME 0
-#define NETBIOS_GROUP_NAME 1
-#define NETBIOS_TYPE_QUICK_UNIQUE 2
-#define NETBIOS_TYPE_QUICK_GROUP 3
-
-#ifndef RC_INVOKED
-typedef struct sockaddr_nb {
- short snb_family;
- u_short snb_type;
- char snb_name[NETBIOS_NAME_LENGTH];
-} SOCKADDR_NB, *PSOCKADDR_NB, *LPSOCKADDR_NB;
-#define SET_NETBIOS_SOCKADDR(_snb,_type,_name,_port) \
-{ \
- register int _i; \
- register char *_n = (_name); \
- register PSOCKADDR_NB _s = (_snb); \
- _s->snb_family = AF_NETBIOS; \
- _s->snb_type = (_type); \
- for (_i=0; _n[_i] != '\0' && _i<NETBIOS_NAME_LENGTH-1; _i++) { \
- _s->snb_name[_i] = _n[_i]; \
- } \
- for (; _i<NETBIOS_NAME_LENGTH-1; _i++) { \
- _s->snb_name[_i] = ' '; \
- } \
- _s->snb_name[NETBIOS_NAME_LENGTH-1] = (_port); \
-}
-#endif /* RC_INVOKED */
-#endif
diff --git a/winsup/w32api/include/wtsapi32.h b/winsup/w32api/include/wtsapi32.h
deleted file mode 100644
index db2d24b..0000000
--- a/winsup/w32api/include/wtsapi32.h
+++ /dev/null
@@ -1,115 +0,0 @@
-#ifndef _WTSAPI32_H
-#define _WTSAPI32_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if (_WIN32_WINNT >= 0x0501)
- // session notification message
-#define WM_WTSSESSION_CHANGE 0x02B1
-
-typedef enum _WTS_INFO_CLASS {
- WTSInitialProgram = 0,
- WTSApplicationName = 1,
- WTSWorkingDirectory = 2,
- WTSOEMId = 3,
- WTSSessionId = 4,
- WTSUserName = 5,
- WTSWinStationName = 6,
- WTSDomainName = 7,
- WTSConnectState = 8,
- WTSClientBuildNumber = 9,
- WTSClientName = 10,
- WTSClientDirectory = 11,
- WTSClientProductId = 12,
- WTSClientHardwareId = 13,
- WTSClientAddress = 14,
- WTSClientDisplay = 15,
- WTSClientProtocolType = 16,
- WTSIdleTime = 17,
- WTSLogonTime = 18,
- WTSIncomingBytes = 19,
- WTSOutgoingBytes = 20,
- WTSIncomingFrames = 21,
- WTSOutgoingFrames = 22,
- WTSClientInfo = 23,
- WTSSessionInfo = 24
-} WTS_INFO_CLASS;
-
-typedef enum _WTS_CONNECTSTATE_CLASS {
- WTSActive,
- WTSConnected,
- WTSConnectQuery,
- WTSShadow,
- WTSDisconnected,
- WTSIdle,
- WTSListen,
- WTSReset,
- WTSDown,
- WTSInit
-} WTS_CONNECTSTATE_CLASS;
-
- // session notification message flags
-#define WTS_CONSOLE_CONNECT 0x1
-#define WTS_CONSOLE_DISCONNECT 0x2
-#define WTS_REMOTE_CONNECT 0x3
-#define WTS_REMOTE_DISCONNECT 0x4
-#define WTS_SESSION_LOGON 0x5
-#define WTS_SESSION_LOGOFF 0x6
-#define WTS_SESSION_LOCK 0x7
-#define WTS_SESSION_UNLOCK 0x8
-#define WTS_SESSION_REMOTE_CONTROL 0x9
-
- // WTSRegisterSessionNotifiction flags
-#define NOTIFY_FOR_THIS_SESSION 0
-#define NOTIFY_FOR_ALL_SESSIONS 1
-
-BOOL WINAPI WTSRegisterSessionNotification(HWND hWnd, DWORD dwFlags);
-BOOL WINAPI WTSUnRegisterSessionNotification(HWND hWnd);
-BOOL WINAPI WTSQuerySessionInformationA(HANDLE hServer, DWORD SessionId, WTS_INFO_CLASS WTSInfoClass,
- LPSTR *ppBuffer, DWORD *pBytesReturned);
-BOOL WINAPI WTSQuerySessionInformationW(HANDLE hServer, DWORD SessionId, WTS_INFO_CLASS WTSInfoClass,
- LPTSTR *ppBuffer, DWORD *pBytesReturned);
-void WINAPI WTSFreeMemory(PVOID pMemory);
-
-#ifdef UNICODE
-#define WTSQuerySessionInformation WTSQuerySessionInformationW
-#else
-#define WTSQuerySessionInformation WTSQuerySessionInformationA
-#endif
-
-#endif /* _WIN32_WINNT >= 0x0501 */
-
-#if (_WIN32_WINNT >= 0x0500)
-
- // WTSWaitSystemEvent local server handle
-#define WTS_CURRENT_SERVER_HANDLE 0
-#define WTS_CURRENT_SESSION 0
-
- // WTSWaitSystemEvent flags
-#define WTS_EVENT_NONE 0x00000000
-#define WTS_EVENT_CREATE 0x00000001
-#define WTS_EVENT_DELETE 0x00000002
-#define WTS_EVENT_RENAME 0x00000004
-#define WTS_EVENT_CONNECT 0x00000008
-#define WTS_EVENT_DISCONNECT 0x00000010
-#define WTS_EVENT_LOGON 0x00000020
-#define WTS_EVENT_LOGOFF 0x00000040
-#define WTS_EVENT_STATECHANGE 0x00000080
-#define WTS_EVENT_LICENSE 0x00000100
-#define WTS_EVENT_ALL 0x7FFFFFFF
-#define WTS_EVENT_FLUSH 0x80000000
-
-BOOL WINAPI WTSWaitSystemEvent(HANDLE hServer, DWORD EventMask, DWORD* pEventFlags);
-BOOL WINAPI WTSDisconnectSession(HANDLE hServer, DWORD SessionId, BOOL bWait);
-#endif /* _WIN32_WINNT >= 0x0500 */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _WTSAPI32_H */
diff --git a/winsup/w32api/include/wtypes.h b/winsup/w32api/include/wtypes.h
deleted file mode 100644
index 37f2af2..0000000
--- a/winsup/w32api/include/wtypes.h
+++ /dev/null
@@ -1,171 +0,0 @@
-#include <rpc.h>
-#include <rpcndr.h>
-
-#ifndef _WTYPES_H
-#define _WTYPES_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define IID_NULL GUID_NULL
-#define CLSID_NULL GUID_NULL
-#define CBPCLIPDATA(d) ((d).cbSize-sizeof((d).ulClipFmt))
-#define ROTFLAGS_REGISTRATIONKEEPSALIVE 0x01
-#define ROTFLAGS_ALLOWANYCLIENT 0x02
-
-#ifndef __BLOB_T_DEFINED /* also in winsock2.h */
-#define __BLOB_T_DEFINED
-typedef struct _BLOB {
- ULONG cbSize;
- BYTE *pBlobData;
-} BLOB,*PBLOB,*LPBLOB;
-#endif
-typedef enum tagDVASPECT {
- DVASPECT_CONTENT=1,
- DVASPECT_THUMBNAIL=2,
- DVASPECT_ICON=4,
- DVASPECT_DOCPRINT=8
-} DVASPECT;
-typedef enum tagDVASPECT2 {
- DVASPECT_OPAQUE=16,
- DVASPECT_TRANSPARENT=32
-} DVASPECT2;
-typedef enum tagSTATFLAG {
- STATFLAG_DEFAULT=0,
- STATFLAG_NONAME=1
-} STATFLAG;
-typedef enum tagMEMCTX {
- MEMCTX_LOCAL=0,
- MEMCTX_TASK,
- MEMCTX_SHARED,
- MEMCTX_MACSYSTEM,
- MEMCTX_UNKNOWN=-1,
- MEMCTX_SAME=-2
-} MEMCTX;
-typedef enum tagMSHCTX {
- MSHCTX_LOCAL=0,
- MSHCTX_NOSHAREDMEM,
- MSHCTX_DIFFERENTMACHINE,
- MSHCTX_INPROC,
- MSHCTX_CROSSCTX
-} MSHCTX;
-typedef enum tagCLSCTX {
- CLSCTX_INPROC_SERVER=1,CLSCTX_INPROC_HANDLER=2,CLSCTX_LOCAL_SERVER=4,
- CLSCTX_INPROC_SERVER16=8,CLSCTX_REMOTE_SERVER=16
-} CLSCTX;
-typedef enum tagMSHLFLAGS {
- MSHLFLAGS_NORMAL,MSHLFLAGS_TABLESTRONG,MSHLFLAGS_TABLEWEAK
-} MSHLFLAGS;
-typedef struct _FLAGGED_WORD_BLOB {
- unsigned long fFlags;
- unsigned long clSize;
- unsigned short asData[1];
-}FLAGGED_WORD_BLOB;
-
-#ifndef OLE2ANSI
-typedef WCHAR OLECHAR;
-typedef LPWSTR LPOLESTR;
-typedef LPCWSTR LPCOLESTR;
-#define OLESTR(s) L##s
-#else
-typedef char OLECHAR;
-typedef LPSTR LPOLESTR;
-typedef LPCSTR LPCOLESTR;
-#define OLESTR(s) s
-#endif
-typedef unsigned short VARTYPE;
-typedef short VARIANT_BOOL;
-typedef VARIANT_BOOL _VARIANT_BOOL;
-#define VARIANT_TRUE ((VARIANT_BOOL)0xffff)
-#define VARIANT_FALSE ((VARIANT_BOOL)0)
-typedef OLECHAR *BSTR;
-typedef FLAGGED_WORD_BLOB *wireBSTR;
-typedef BSTR *LPBSTR;
-typedef LONG SCODE;
-typedef void *HCONTEXT;
-typedef union tagCY {
- _ANONYMOUS_STRUCT struct {
- unsigned long Lo;
- long Hi;
- }_STRUCT_NAME(s);
- LONGLONG int64;
-} CY;
-typedef double DATE;
-typedef struct tagBSTRBLOB {
- ULONG cbSize;
- PBYTE pData;
-}BSTRBLOB;
-typedef struct tagBSTRBLOB *LPBSTRBLOB;
-typedef struct tagCLIPDATA {
- ULONG cbSize;
- long ulClipFmt;
- PBYTE pClipData;
-}CLIPDATA;
-typedef enum tagSTGC {
- STGC_DEFAULT,STGC_OVERWRITE,STGC_ONLYIFCURRENT,
- STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE
-}STGC;
-typedef enum tagSTGMOVE {
- STGMOVE_MOVE,STGMOVE_COPY,STGMOVE_SHALLOWCOPY
-}STGMOVE;
-enum VARENUM {
- VT_EMPTY,VT_NULL,VT_I2,VT_I4,VT_R4,VT_R8,VT_CY,VT_DATE,VT_BSTR,VT_DISPATCH,
- VT_ERROR,VT_BOOL,VT_VARIANT,VT_UNKNOWN,VT_DECIMAL,VT_I1=16,VT_UI1,VT_UI2,VT_UI4,VT_I8,
- VT_UI8,VT_INT,VT_UINT,VT_VOID,VT_HRESULT,VT_PTR,VT_SAFEARRAY,VT_CARRAY,VT_USERDEFINED,
- VT_LPSTR,VT_LPWSTR,VT_RECORD=36,VT_INT_PTR=37,VT_UINT_PTR=38,VT_FILETIME=64,VT_BLOB,VT_STREAM,VT_STORAGE,VT_STREAMED_OBJECT,
- VT_STORED_OBJECT,VT_BLOB_OBJECT,VT_CF,VT_CLSID,VT_BSTR_BLOB=0xfff,VT_VECTOR=0x1000,
- VT_ARRAY=0x2000,VT_BYREF=0x4000,VT_RESERVED=0x8000,VT_ILLEGAL= 0xffff,VT_ILLEGALMASKED=0xfff,
- VT_TYPEMASK=0xfff
-};
-
-typedef struct _BYTE_SIZEDARR {
- unsigned long clSize;
- byte *pData;
-}BYTE_SIZEDARR;
-typedef struct _SHORT_SIZEDARR {
- unsigned long clSize;
- unsigned short *pData;
-}WORD_SIZEDARR;
-typedef struct _LONG_SIZEDARR {
- unsigned long clSize;
- unsigned long *pData;
-}DWORD_SIZEDARR;
-typedef struct _HYPER_SIZEDARR {
- unsigned long clSize;
- hyper *pData;
-}HYPER_SIZEDARR;
-typedef double DOUBLE;
-typedef struct tagDEC {
- USHORT wReserved;
- _ANONYMOUS_UNION union {
- _ANONYMOUS_STRUCT struct {
- BYTE scale;
- BYTE sign;
- }_STRUCT_NAME(s);
- USHORT signscale;
- } DUMMYUNIONNAME;
- ULONG Hi32;
- _ANONYMOUS_UNION union {
- _ANONYMOUS_STRUCT struct {
- ULONG Lo32;
- ULONG Mid32;
- }_STRUCT_NAME(s2);
- ULONGLONG Lo64;
- } DUMMYUNIONNAME2;
-} DECIMAL;
-typedef DECIMAL *LPDECIMAL;
-#define DECIMAL_NEG ((BYTE)0x80)
-#ifdef NONAMELESSUNION
-#define DECIMAL_SETZERO(d) {(d).DUMMYUNIONNAME2.Lo64=(d).Hi32=(d).DUMMYUNIONNAME.signscale=0;}
-#else
-#define DECIMAL_SETZERO(d) {(d).Lo64=(d).Hi32=(d).signscale=0;}
-#endif
-typedef void *HMETAFILEPICT;
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/winsup/w32api/include/xprtdefs.h b/winsup/w32api/include/xprtdefs.h
deleted file mode 100644
index e61e8ac..0000000
--- a/winsup/w32api/include/xprtdefs.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef _XPTRDEFS_H
-#define _XPTRDEFS_H
-#if __GNUC__ >= 3
-#pragma GCC system_header
-#endif
-
-/*--- DirectShow Reference - DirectShow Structures - TIMECODE_SAMPLE Structure */
-#define ED_DEVCAP_ATN_READ 0x13B7
-#define ED_DEVCAP_RTC_READ 0x13BA
-
-#endif
diff --git a/winsup/w32api/include/zmouse.h b/winsup/w32api/include/zmouse.h
deleted file mode 100644
index 764d43d..0000000
--- a/winsup/w32api/include/zmouse.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- zmouse.h - Header for IntelliMouse.
-
- This file is part of a free library for the Win32 API.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- FIXME: This file is obviously horribly incomplete!
-
-*/
-
-#ifndef _ZMOUSE_H
-#define _ZMOUSE_H
-#if __GNUC__ >=3
-#pragma GCC system_header
-#endif
-
-#ifndef WM_MOUSEWHEEL
-# define WM_MOUSEWHEEL (WM_MOUSELAST + 1)
-#endif
-
-#ifndef WHEEL_DELTA
-# define WHEEL_DELTA 120
-#endif
-
-#ifndef WHEEL_PAGESCROLL
-# define WHEEL_PAGESCROLL UINT_MAX
-#endif
-
-#ifndef SPI_SETWHEELSCROLLLINES
-# define SPI_SETWHEELSCROLLLINES 105
-#endif
-
-#endif /* _ZMOUSE_H */
diff --git a/winsup/w32api/install-sh b/winsup/w32api/install-sh
deleted file mode 100755
index e9de238..0000000
--- a/winsup/w32api/install-sh
+++ /dev/null
@@ -1,251 +0,0 @@
-#!/bin/sh
-#
-# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
-#
-# Copyright 1991 by the Massachusetts Institute of Technology
-#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission. M.I.T. makes no representations about the
-# suitability of this software for any purpose. It is provided "as is"
-# without express or implied warranty.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch. It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
- case $1 in
- -c) instcmd="$cpprog"
- shift
- continue;;
-
- -d) dir_arg=true
- shift
- continue;;
-
- -m) chmodcmd="$chmodprog $2"
- shift
- shift
- continue;;
-
- -o) chowncmd="$chownprog $2"
- shift
- shift
- continue;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift
- shift
- continue;;
-
- -s) stripcmd="$stripprog"
- shift
- continue;;
-
- -t=*) transformarg=`echo $1 | sed 's/-t=//'`
- shift
- continue;;
-
- -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
- shift
- continue;;
-
- *) if [ x"$src" = x ]
- then
- src=$1
- else
- # this colon is to work around a 386BSD /bin/sh bug
- :
- dst=$1
- fi
- shift
- continue;;
- esac
-done
-
-if [ x"$src" = x ]
-then
- echo "install: no input file specified"
- exit 1
-else
- true
-fi
-
-if [ x"$dir_arg" != x ]; then
- dst=$src
- src=""
-
- if [ -d $dst ]; then
- instcmd=:
- chmodcmd=""
- else
- instcmd=mkdir
- fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
-# if $src (and thus $dsttmp) contains '*'.
-
- if [ -f $src -o -d $src ]
- then
- true
- else
- echo "install: $src does not exist"
- exit 1
- fi
-
- if [ x"$dst" = x ]
- then
- echo "install: no destination specified"
- exit 1
- else
- true
- fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
- if [ -d $dst ]
- then
- dst="$dst"/`basename $src`
- else
- true
- fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-# this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
- pathcomp="${pathcomp}${1}"
- shift
-
- if [ ! -d "${pathcomp}" ] ;
- then
- $mkdirprog "${pathcomp}"
- else
- true
- fi
-
- pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
- $doit $instcmd $dst &&
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
- if [ x"$transformarg" = x ]
- then
- dstfile=`basename $dst`
- else
- dstfile=`basename $dst $transformbasename |
- sed $transformarg`$transformbasename
- fi
-
-# don't allow the sed command to completely eliminate the filename
-
- if [ x"$dstfile" = x ]
- then
- dstfile=`basename $dst`
- else
- true
- fi
-
-# Make a temp file name in the proper directory.
-
- dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
- $doit $instcmd $src $dsttmp &&
-
- trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing. If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
- $doit $rmcmd -f $dstdir/$dstfile &&
- $doit $mvcmd $dsttmp $dstdir/$dstfile
-
-fi &&
-
-
-exit 0
diff --git a/winsup/w32api/lib/Makefile.in b/winsup/w32api/lib/Makefile.in
deleted file mode 100644
index d1bcebf..0000000
--- a/winsup/w32api/lib/Makefile.in
+++ /dev/null
@@ -1,292 +0,0 @@
-#
-# Makefile.in
-#
-# This file is part of a free library for the Win32 API.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-
-# start config section
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-SUBDIRS := ddk directx
-subdirs := ddk directx
-
-host_alias = @host@
-build_alias = @build@
-target_alias = @target@
-with_cross_host = @with_cross_host@
-prefix = @prefix@
-includedir:=@includedir@
-
-program_transform_name = @program_transform_name@
-exec_prefix = @exec_prefix@
-libdir:=@libdir@
-bindir = @bindir@
-ifeq ($(target_alias),$(host_alias))
-ifeq ($(build_alias),$(host_alias))
-tooldir:=$(exec_prefix)
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-datadir = @datadir@
-infodir = @infodir@
-ifneq (,$(findstring cygwin,$(target_alias)))
-inst_includedir:=$(tooldir)/include/w32api
-inst_libdir:=$(tooldir)/lib/w32api
-else
-ifneq (,$(with_cross_host))
-inst_includedir:=$(tooldir)/include/w32api
-inst_libdir:=$(tooldir)/lib
-else
-inst_includedir:=$(includedir)
-inst_libdir:=$(libdir)
-endif
-endif
-
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-mkinstalldirs = mkdir -p
-
-CC = @CC@
-CC_FOR_TARGET = $(CC)
-
-DLLTOOL = @DLLTOOL@
-DLLTOOL_FLAGS = --as=$(AS) -k
-AS = @AS@
-AS_FOR_TARGET = $(AS_FOR_TARGET)
-WINDRES = @WINDRES@
-
-# Depending on if we build as part of winsup or mingw we need to
-# add additional include paths in order to get the correct headers
-# from the C library.
-BUILDENV = @BUILDENV@
-
-ifeq ($(BUILDENV), cygwin)
-# winsup/include
-# winsup/../newlib/libc/include
-# winsup/../newlib/libc/sys/cygwin
-EXTRA_INCLUDES = -I$(srcdir)/../../include -I$(srcdir)/../../../newlib/libc/include -I$(srcdir)/../../../newlib/libc/sys/cygwin
-endif
-ifeq ($(BUILDENV), mingw)
-EXTRA_INCLUDES = -I$(srcdir)/../../mingw/include
-endif
-
-INCLUDES = -I$(srcdir)/../include $(EXTRA_INCLUDES)
-
-CFLAGS = @CFLAGS@
-ALL_CFLAGS = $(CFLAGS) $(INCLUDES)
-
-RANLIB = @RANLIB@
-AR = @AR@
-LD = @LD@
-
-FLAGS_TO_PASS = \
- AS="$(AS)" \
- CC="$(CC)" \
- CPPFLAGS="$(CPPFLAGS)" \
- CFLAGS="$(CFLAGS)" \
- CXXFLAGS="$(CXXFLAGS)" \
- AR="$(AR)" \
- RANLIB="$(RANLIB)" \
- LD="$(LD)" \
- DLLTOOL="$(DLLTOOL)" \
- TAR="$(TAR)" \
- TARFLAGS="$(TARFLAGS)" \
- TARFILEEXT="$(TARFILEEXT)" \
- WINDRES="$(WINDRES)"
-
-# end config section
-
-# headers
-
-HEADERS = $(notdir $(wildcard $(srcdir)/../include/*.h))
-GL_HEADERS = $(notdir $(wildcard $(srcdir)/../include/GL/*.h))
-
-# libraries
-
-DEF_FILES = $(notdir $(wildcard $(srcdir)/*.def))
-MRI_FILES = $(notdir $(wildcard $(srcdir)/*.mri))
-IMPLIBS = $(addprefix lib,$(subst .def,.a,$(DEF_FILES)))
-MIMPLIBS = $(addprefix lib,$(subst .mri,.a,$(MRI_FILES)))
-EXTRA_LIBS=libuuid.a libscrnsave.a libscrnsavw.a liblargeint.a
-LIBS = $(IMPLIBS) $(MIMPLIBS) $(EXTRA_LIBS)
-UUID_OBJS = mshtml-uuid.o msxml-uuid.o unknwn-uuid.o \
- servprov-uuid.o oleidl-uuid.o oleacc-uuid.o ocidl-uuid.o \
- objsafe-uuid.o oaidl-uuid.o docobj-uuid.o comcat-uuid.o \
- exdisp-uuid.o mlang-uuid.o objidl-uuid.o cguid-uuid.o \
- olectlid-uuid.o ativscp-uuid.o urlmon-uuid.o hlink-uuid.o \
- hlguids-uuid.o extras-uuid.o devguid.o power-uuid.o
-EXTRA_OBJS = shell32.o scrnsave.o scrnsavw.o largeint.o \
- $(UUID_OBJS) ws2_32.o
-UUID_SOURCES = mshtml-uuid.c msxml-uuid.c unknwn-uuid.c \
- servprov-uuid.c oleidl-uuid.c oleacc-uuid.c ocidl-uuid.c \
- objsafe-uuid.c oaidl-uuid.c docobj-uuid.c comcat-uuid.c \
- exdisp-uuid.c mlang-uuid.c objidl-uuid.c cguid-uuid.c \
- olectlid-uuid.c ativscp-uuid.c urlmon-uuid.c hlink-uuid.c \
- hlguids-uuid.c extras-uuid.c devguid.c power-uuid.c
-SOURCES = scrnsave.c shell32.c largeint.c $(UUID_SOURCES)\
-res.rc test.c ws2_32.c
-
-DISTFILES = Makefile.in $(DEF_FILES) $(MRI_FILES) $(SOURCES)
-
-.NOTPARALLEL:
-
-# targets
-all: $(EXTRA_OBJS) $(LIBS) ddk directx
-
-%-subdirs:
- for i in $(SUBDIRS); do \
- $(MAKE) $(FLAGS_TO_PASS) -C $$i $*; \
- done
-
-ddk:
- $(MAKE) $(FLAGS_TO_PASS) -C $@
-
-directx:
- $(MAKE) $(FLAGS_TO_PASS) -C $@
-
-TEST_OPTIONS = $(ALL_CFLAGS) -DWINVER=0x0666 \
- -Wall -pedantic -Wsystem-headers -c $(srcdir)/test.c -o test.o
-.PHONY: test ddk directx
-test:
- @echo "Testing w32api..."
- @for lang in c c++ objective-c ; do \
- echo "$$lang..."; \
- $(CC) -x$$lang $(TEST_OPTIONS) ; \
- echo "$$lang UNICODE..."; \
- $(CC) -x$$lang -DUNICODE $(TEST_OPTIONS) ; \
- done
- @echo "windres..."
- @$(WINDRES) --include-dir $(INCDIR) -i $(srcdir)/res.rc -o test.o
- @echo "windres UNICODE..."
- @$(WINDRES) --define UNICODE --include-dir $(INCDIR) -i $(srcdir)/res.rc -o test.o
- @rm -f test.o
-
-scrnsavw.o: scrnsave.c
- $(CC) -c $(ALL_CFLAGS) -DUNICODE -o $@ $<
-
-# make rules
-
-.SUFFIXES: .c .o .def .a
-
-.c.o:
- $(CC) -c $(ALL_CFLAGS) -o $@ $<
-
-libuuid.a : $(UUID_OBJS)
- $(AR) rc $@ $(UUID_OBJS)
- $(RANLIB) $@
-
-# libvfw32.a contains import stubs for 3 dll's. Using an MRI script
-# seems to be the simplest way to combine them into one archive.
-# NB: With older dlltool, the object file members will not have unique
-# names.
-libvfw32.a : vfw32.mri libmsvfw32.a libavifil32.a libavicap32.a
- rm -f $@
- $(AR) -M < ${word 1,$^}
- $(RANLIB) $@
-
-lib%.a : %.def %.o
- $(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $(srcdir)/$*.def
- $(AR) r $@ $*.o
- $(RANLIB) $@
-
-lib%.a: %.def
- $(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $<
-
-lib%.a: %.o
- $(AR) rc $@ $*.o
- $(RANLIB) $@
-
-.PHONY: install install-libraries install-headers install-ddk
-# install headers and libraries in a target specified directory.
-install: install-libraries install-headers install-ddk install-directx
-
-install-libraries: all
- $(mkinstalldirs) $(inst_libdir)
- for i in $(LIBS); do \
- $(INSTALL_DATA) $$i $(inst_libdir)/$$i ; \
- done
-
-install-headers:
- $(mkinstalldirs) $(inst_includedir)
- for i in $(HEADERS); do \
- $(INSTALL_DATA) $(srcdir)/../include/$$i $(inst_includedir)/$$i ; \
- done
- $(mkinstalldirs) $(inst_includedir)/GL
- for i in $(GL_HEADERS); do \
- $(INSTALL_DATA) $(srcdir)/../include/GL/$$i $(inst_includedir)/GL/$$i ; \
- done
-
-install-ddk: install-libraries install-headers
- cd ddk && $(MAKE) install $(FLAGS_TO_PASS)
-
-install-directx: install-libraries install-headers
- cd directx && $(MAKE) install $(FLAGS_TO_PASS)
-
-# uninstall headers and libraries from a target specified directory
-uninstall: uninstall-ddk uninstall-directx uninstall-libraries uninstall-headers
-
-uninstall-libraries:
- @for i in $(LIBS); do \
- rm -f $(inst_libdir)/$$i ; \
- done
- rmdir $(inst_libdir)
-
-uninstall-headers:
- @for i in $(HEADERS); do \
- rm -r $(inst_includedir)/$$i ; \
- done
- rmdir $(inst_includedir)
-
-uninstall-ddk:
- cd ddk && $(MAKE) -C uninstall $(FLAGS_TO_PASS)
-
-uninstall-directx:
- cd directx && $(MAKE) -C uninstall $(FLAGS_TO_PASS)
-
-dist:
- mkdir $(distdir)/include
- chmod 755 $(distdir)/include
- @for i in $(HEADERS); do \
- cp -p $(srcdir)/../include/$$i $(distdir)/include/$$i ; \
- done
- mkdir $(distdir)/include/GL
- @for i in $(GL_HEADERS); do \
- cp -p $(srcdir)/../include/GL/$$i $(distdir)/include/GL/$$i ; \
- done
- mkdir $(distdir)/lib
- chmod 755 $(distdir)/lib
- @for i in $(DISTFILES); do \
- cp -p $(srcdir)/$$i $(distdir)/lib/$$i ; \
- done
- for i in $(SUBDIRS); do \
- (cd $$i; $(MAKE) distdir=../$(distdir) dist); \
- done
-
-Makefile: Makefile.in ../config.status ../configure
- cd ..; $(SHELL) config.status
-
-# clean
-
-mostlyclean:
- rm -f *~ *.o *.s
-
-clean:
- rm -f *.o *.a *.s *~
-
-distclean: clean
- rm -f config.cache config.status config.log Makefile
-
-maintainer-clean: distclean
-
diff --git a/winsup/w32api/lib/aclui.def b/winsup/w32api/lib/aclui.def
deleted file mode 100644
index 834d5fd..0000000
--- a/winsup/w32api/lib/aclui.def
+++ /dev/null
@@ -1,7 +0,0 @@
-LIBRARY ACLUI.dll
-
-EXPORTS
-CreateSecurityPage@4
-EditSecurity@8
-IID_ISecurityInformation DATA
-
diff --git a/winsup/w32api/lib/advapi32.def b/winsup/w32api/lib/advapi32.def
deleted file mode 100644
index dd358d4..0000000
--- a/winsup/w32api/lib/advapi32.def
+++ /dev/null
@@ -1,535 +0,0 @@
-LIBRARY ADVAPI32.DLL
-EXPORTS
-AbortSystemShutdownA@4
-AbortSystemShutdownW@4
-AccessCheck@32
-AccessCheckAndAuditAlarmA@44
-AccessCheckAndAuditAlarmW@44
-AccessCheckByType@44
-AccessCheckByTypeAndAuditAlarmA@64
-AccessCheckByTypeAndAuditAlarmW@64
-AccessCheckByTypeResultList@44
-AccessCheckByTypeResultListAndAuditAlarmA@64
-AccessCheckByTypeResultListAndAuditAlarmByHandleA@68
-AccessCheckByTypeResultListAndAuditAlarmByHandleW@68
-AccessCheckByTypeResultListAndAuditAlarmW@64
-AddAccessAllowedAce@16
-AddAccessAllowedAceEx@20
-AddAccessAllowedObjectAce@28
-AddAccessDeniedAce@16
-AddAccessDeniedAceEx@20
-AddAccessDeniedObjectAce@28
-AddAce@20
-AddAuditAccessAce@24
-AddAuditAccessAceEx@28
-AddAuditAccessObjectAce@36
-AddUsersToEncryptedFile@8
-AdjustTokenGroups@24
-AdjustTokenPrivileges@24
-AllocateAndInitializeSid@44
-AllocateLocallyUniqueId@4
-AreAllAccessesGranted@8
-AreAnyAccessesGranted@8
-BackupEventLogA@8
-BackupEventLogW@8
-BuildExplicitAccessWithNameA@20
-BuildExplicitAccessWithNameW@20
-BuildImpersonateExplicitAccessWithNameA@24
-BuildImpersonateExplicitAccessWithNameW@24
-BuildImpersonateTrusteeA@8
-BuildImpersonateTrusteeW@8
-BuildSecurityDescriptorA@36
-BuildSecurityDescriptorW@36
-BuildTrusteeWithNameA@8
-BuildTrusteeWithNameW@8
-BuildTrusteeWithObjectsAndNameA@24
-BuildTrusteeWithObjectsAndNameW@24
-BuildTrusteeWithObjectsAndSidA@20
-BuildTrusteeWithObjectsAndSidW@20
-BuildTrusteeWithSidA@8
-BuildTrusteeWithSidW@8
-CancelOverlappedAccess@4
-ChangeServiceConfig2A@12
-ChangeServiceConfig2W@12
-ChangeServiceConfigA@44
-ChangeServiceConfigW@44
-CheckTokenMembership@12
-ClearEventLogA@8
-ClearEventLogW@8
-CloseEncryptedFileRaw@4
-CloseEventLog@4
-CloseServiceHandle@4
-CloseTrace@8
-CommandLineFromMsiDescriptor@12
-ControlService@12
-ControlTraceA@20
-ControlTraceW@20
-ConvertAccessToSecurityDescriptorA@20
-ConvertAccessToSecurityDescriptorW@20
-ConvertSDToStringSDRootDomainA@24
-ConvertSDToStringSDRootDomainW@24
-ConvertSecurityDescriptorToAccessA@28
-ConvertSecurityDescriptorToAccessNamedA@28
-ConvertSecurityDescriptorToAccessNamedW@28
-ConvertSecurityDescriptorToAccessW@28
-ConvertSecurityDescriptorToStringSecurityDescriptorA@20
-ConvertSecurityDescriptorToStringSecurityDescriptorW@20
-ConvertSidToStringSidA@8
-ConvertSidToStringSidW@8
-ConvertStringSDToSDRootDomainA@20
-ConvertStringSDToSDRootDomainW@20
-ConvertStringSecurityDescriptorToSecurityDescriptorA@16
-ConvertStringSecurityDescriptorToSecurityDescriptorW@16
-ConvertStringSidToSidA@8
-ConvertStringSidToSidW@8
-ConvertToAutoInheritPrivateObjectSecurity@24
-CopySid@12
-CreatePrivateObjectSecurity@24
-CreatePrivateObjectSecurityEx@32
-CreateProcessAsUserA@44
-CreateProcessAsUserW@44
-CreateProcessWithLogonW@44
-CreateRestrictedToken@36
-CreateServiceA@52
-CreateServiceW@52
-CreateTraceInstanceId@8
-CryptAcquireContextA@20
-CryptAcquireContextW@20
-CryptContextAddRef@12
-CryptCreateHash@20
-CryptDecrypt@24
-CryptDeriveKey@20
-CryptDestroyHash@4
-CryptDestroyKey@4
-CryptDuplicateHash@16
-CryptDuplicateKey@16
-CryptEncrypt@28
-CryptEnumProviderTypesA@24
-CryptEnumProviderTypesW@24
-CryptEnumProvidersA@24
-CryptEnumProvidersW@24
-CryptExportKey@24
-CryptGenKey@16
-CryptGenRandom@12
-CryptGetDefaultProviderA@20
-CryptGetDefaultProviderW@20
-CryptGetHashParam@20
-CryptGetKeyParam@20
-CryptGetProvParam@20
-CryptGetUserKey@12
-CryptHashData@16
-CryptHashSessionKey@12
-CryptImportKey@24
-CryptReleaseContext@8
-CryptSetHashParam@16
-CryptSetKeyParam@16
-CryptSetProvParam@16
-CryptSetProviderA@8
-CryptSetProviderExA@16
-CryptSetProviderExW@16
-CryptSetProviderW@8
-CryptSignHashA@24
-CryptSignHashW@24
-CryptVerifySignatureA@24
-CryptVerifySignatureW@24
-DecryptFileA@8
-DecryptFileW@8
-DeleteAce@8
-DeleteService@4
-DeregisterEventSource@4
-DestroyPrivateObjectSecurity@4
-DuplicateEncryptionInfoFile@8
-DuplicateToken@12
-DuplicateTokenEx@24
-ElfBackupEventLogFileA@8
-ElfBackupEventLogFileW@8
-ElfChangeNotify@8
-ElfClearEventLogFileA@8
-ElfClearEventLogFileW@8
-ElfCloseEventLog@4
-ElfDeregisterEventSource@4
-ElfNumberOfRecords@8
-ElfOldestRecord@8
-ElfOpenBackupEventLogA@12
-ElfOpenBackupEventLogW@12
-ElfOpenEventLogA@12
-ElfOpenEventLogW@12
-ElfReadEventLogA@28
-ElfReadEventLogW@28
-ElfRegisterEventSourceA@12
-ElfRegisterEventSourceW@12
-ElfReportEventA@48
-ElfReportEventW@48
-EnableTrace@24
-EncryptFileA@4
-EncryptFileW@4
-EncryptionDisable@8
-EnumDependentServicesA@24
-EnumDependentServicesW@24
-EnumServiceGroupW@36
-EnumServicesStatusA@32
-EnumServicesStatusExA@40
-EnumServicesStatusExW@40
-EnumServicesStatusW@32
-EqualPrefixSid@8
-EqualSid@8
-FileEncryptionStatusA@8
-FileEncryptionStatusW@8
-FindFirstFreeAce@8
-FreeEncryptionCertificateHashList@4
-FreeSid@4
-GetAccessPermissionsForObjectA@36
-GetAccessPermissionsForObjectW@36
-GetAce@12
-GetAclInformation@16
-GetAuditedPermissionsFromAclA@16
-GetAuditedPermissionsFromAclW@16
-GetCurrentHwProfileA@4
-GetCurrentHwProfileW@4
-GetEffectiveRightsFromAclA@12
-GetEffectiveRightsFromAclW@12
-GetEventLogInformation@20
-GetExplicitEntriesFromAclA@12
-GetExplicitEntriesFromAclW@12
-GetFileSecurityA@20
-GetFileSecurityW@20
-GetInheritanceSourceA@40
-GetInheritanceSourceW@40
-GetKernelObjectSecurity@20
-GetLengthSid@4
-GetLocalManagedApplications@12
-GetManagedApplications@20
-GetMangledSiteSid@12
-GetMultipleTrusteeA@4
-GetMultipleTrusteeOperationA@4
-GetMultipleTrusteeOperationW@4
-GetMultipleTrusteeW@4
-GetNamedSecurityInfoA@32
-GetNamedSecurityInfoExA@36
-GetNamedSecurityInfoExW@36
-GetNamedSecurityInfoW@32
-GetNumberOfEventLogRecords@8
-GetOldestEventLogRecord@8
-GetOverlappedAccessResults@16
-GetPrivateObjectSecurity@20
-GetSecurityDescriptorControl@12
-GetSecurityDescriptorDacl@16
-GetSecurityDescriptorGroup@12
-GetSecurityDescriptorLength@4
-GetSecurityDescriptorOwner@12
-GetSecurityDescriptorRMControl@8
-GetSecurityDescriptorSacl@16
-GetSecurityInfo@32
-GetSecurityInfoExA@36
-GetSecurityInfoExW@36
-GetServiceDisplayNameA@16
-GetServiceDisplayNameW@16
-GetServiceKeyNameA@16
-GetServiceKeyNameW@16
-GetSidIdentifierAuthority@4
-GetSidLengthRequired@4
-GetSidSubAuthority@8
-GetSidSubAuthorityCount@4
-GetSiteDirectoryA@12
-GetSiteDirectoryW@12
-GetSiteNameFromSid@8
-GetSiteSidFromToken@4
-GetSiteSidFromUrl@4
-GetTokenInformation@20
-GetTraceEnableFlags@8
-GetTraceEnableLevel@8
-GetTraceLoggerHandle@4
-GetTrusteeFormA@4
-GetTrusteeFormW@4
-GetTrusteeNameA@4
-GetTrusteeNameW@4
-GetTrusteeTypeA@4
-GetTrusteeTypeW@4
-GetUserNameA@8
-GetUserNameW@8
-I_ScSetServiceBitsA@20
-I_ScSetServiceBitsW@20
-ImpersonateAnonymousToken@4
-ImpersonateLoggedOnUser@4
-ImpersonateNamedPipeClient@4
-ImpersonateSelf@4
-InitializeAcl@12
-InitializeSecurityDescriptor@8
-InitializeSid@12
-InitiateSystemShutdownA@20
-InitiateSystemShutdownExA@24
-InitiateSystemShutdownExW@24
-InitiateSystemShutdownW@20
-InstallApplication@4
-IsProcessRestricted@0
-IsTextUnicode@12
-IsTokenRestricted@4
-IsValidAcl@4
-IsValidSecurityDescriptor@4
-IsValidSid@4
-LockServiceDatabase@4
-LogonUserA@24
-LogonUserW@24
-LookupAccountNameA@28
-LookupAccountNameW@28
-LookupAccountSidA@28
-LookupAccountSidW@28
-LookupPrivilegeDisplayNameA@20
-LookupPrivilegeDisplayNameW@20
-LookupPrivilegeNameA@16
-LookupPrivilegeNameW@16
-LookupPrivilegeValueA@12
-LookupPrivilegeValueW@12
-LookupSecurityDescriptorPartsA@28
-LookupSecurityDescriptorPartsW@28
-LsaAddAccountRights@16
-LsaAddPrivilegesToAccount@8
-LsaClearAuditLog@4
-LsaClose@4
-LsaCreateAccount@16
-LsaCreateSecret@16
-LsaCreateTrustedDomain@16
-LsaCreateTrustedDomainEx@20
-LsaDelete@4
-LsaDeleteTrustedDomain@8
-LsaEnumerateAccountRights@16
-LsaEnumerateAccounts@20
-LsaEnumerateAccountsWithUserRight@16
-LsaEnumeratePrivileges@20
-LsaEnumeratePrivilegesOfAccount@8
-LsaEnumerateTrustedDomains@20
-LsaEnumerateTrustedDomainsEx@20
-LsaFreeMemory@4
-LsaGetQuotasForAccount@8
-LsaGetRemoteUserName@12
-LsaGetSystemAccessAccount@8
-LsaGetUserName@8
-LsaICLookupNames@32
-LsaICLookupSids@32
-LsaLookupNames@20
-LsaLookupPrivilegeDisplayName@16
-LsaLookupPrivilegeName@12
-LsaLookupPrivilegeValue@12
-LsaLookupSids@20
-LsaNtStatusToWinError@4
-LsaOpenAccount@16
-LsaOpenPolicy@16
-LsaOpenSecret@16
-LsaOpenTrustedDomain@16
-LsaOpenTrustedDomainByName@16
-LsaQueryDomainInformationPolicy@12
-LsaQueryInfoTrustedDomain@12
-LsaQueryInformationPolicy@12
-LsaQuerySecret@20
-LsaQuerySecurityObject@12
-LsaQueryTrustedDomainInfo@16
-LsaQueryTrustedDomainInfoByName@16
-LsaRemoveAccountRights@20
-LsaRemovePrivilegesFromAccount@12
-LsaRetrievePrivateData@12
-LsaSetDomainInformationPolicy@12
-LsaSetInformationPolicy@12
-LsaSetInformationTrustedDomain@12
-LsaSetQuotasForAccount@8
-LsaSetSecret@12
-LsaSetSecurityObject@12
-LsaSetSystemAccessAccount@8
-LsaSetTrustedDomainInfoByName@16
-LsaSetTrustedDomainInformation@16
-LsaStorePrivateData@12
-MakeAbsoluteSD2@8
-MakeAbsoluteSD@44
-MakeSelfRelativeSD@12
-MapGenericMask@8
-NotifyBootConfigStatus@4
-NotifyChangeEventLog@8
-ObjectCloseAuditAlarmA@12
-ObjectCloseAuditAlarmW@12
-ObjectDeleteAuditAlarmA@12
-ObjectDeleteAuditAlarmW@12
-ObjectOpenAuditAlarmA@48
-ObjectOpenAuditAlarmW@48
-ObjectPrivilegeAuditAlarmA@24
-ObjectPrivilegeAuditAlarmW@24
-OpenBackupEventLogA@8
-OpenBackupEventLogW@8
-OpenEncryptedFileRawA@12
-OpenEncryptedFileRawW@12
-OpenEventLogA@8
-OpenEventLogW@8
-OpenProcessToken@12
-OpenSCManagerA@12
-OpenSCManagerW@12
-OpenServiceA@12
-OpenServiceW@12
-OpenThreadToken@16
-OpenTraceA@4
-OpenTraceW@4
-PrivilegeCheck@12
-PrivilegedServiceAuditAlarmA@20
-PrivilegedServiceAuditAlarmW@20
-ProcessTrace@16
-QueryAllTracesA@12
-QueryAllTracesW@12
-QueryRecoveryAgentsOnEncryptedFile@8
-QueryServiceConfig2A@20
-QueryServiceConfig2W@20
-QueryServiceConfigA@16
-QueryServiceConfigW@16
-QueryServiceLockStatusA@16
-QueryServiceLockStatusW@16
-QueryServiceObjectSecurity@20
-QueryServiceStatus@8
-QueryServiceStatusEx@20
-QueryUsersOnEncryptedFile@8
-QueryWindows31FilesMigration@4
-ReadEncryptedFileRaw@12
-ReadEventLogA@28
-ReadEventLogW@28
-RegCloseKey@4
-RegConnectRegistryA@12
-RegConnectRegistryW@12
-RegCreateKeyA@12
-RegCreateKeyExA@36
-RegCreateKeyExW@36
-RegCreateKeyW@12
-RegDeleteKeyA@8
-RegDeleteKeyW@8
-RegDeleteKeyExA@16
-RegDeleteKeyExW@16
-RegDeleteValueA@8
-RegDeleteValueW@8
-RegDisablePredefinedCache@0
-RegEnumKeyA@16
-RegEnumKeyExA@32
-RegEnumKeyExW@32
-RegEnumKeyW@16
-RegEnumValueA@32
-RegEnumValueW@32
-RegFlushKey@4
-RegGetKeySecurity@16
-RegLoadKeyA@12
-RegLoadKeyW@12
-RegNotifyChangeKeyValue@20
-RegOpenCurrentUser@8
-RegOpenKeyA@12
-RegOpenKeyExA@20
-RegOpenKeyExW@20
-RegOpenKeyW@12
-RegOpenUserClassesRoot@16
-RegOverridePredefKey@8
-RegQueryInfoKeyA@48
-RegQueryInfoKeyW@48
-RegQueryMultipleValuesA@20
-RegQueryMultipleValuesW@20
-RegQueryValueA@16
-RegQueryValueExA@24
-RegQueryValueExW@24
-RegQueryValueW@16
-RegReplaceKeyA@16
-RegReplaceKeyW@16
-RegRestoreKeyA@12
-RegRestoreKeyW@12
-RegSaveKeyA@12
-RegSaveKeyW@12
-RegSetKeySecurity@12
-RegSetValueA@20
-RegSetValueExA@24
-RegSetValueExW@24
-RegSetValueW@20
-RegUnLoadKeyA@8
-RegUnLoadKeyW@8
-RegisterEventSourceA@8
-RegisterEventSourceW@8
-RegisterServiceCtrlHandlerA@8
-RegisterServiceCtrlHandlerExA@12
-RegisterServiceCtrlHandlerExW@12
-RegisterServiceCtrlHandlerW@8
-RegisterTraceGuidsA@32
-RegisterTraceGuidsW@32
-RemoveTraceCallback@4
-RemoveUsersFromEncryptedFile@8
-ReportEventA@36
-ReportEventW@36
-RevertToSelf@0
-SetAclInformation@16
-SetEntriesInAccessListA@24
-SetEntriesInAccessListW@24
-SetEntriesInAclA@16
-SetEntriesInAclW@16
-SetEntriesInAuditListA@24
-SetEntriesInAuditListW@24
-SetFileSecurityA@12
-SetFileSecurityW@12
-SetKernelObjectSecurity@12
-SetNamedSecurityInfoA@28
-SetNamedSecurityInfoExA@36
-SetNamedSecurityInfoExW@36
-SetNamedSecurityInfoW@28
-SetPrivateObjectSecurity@20
-SetPrivateObjectSecurityEx@24
-SetSecurityDescriptorControl@12
-SetSecurityDescriptorDacl@16
-SetSecurityDescriptorGroup@12
-SetSecurityDescriptorOwner@12
-SetSecurityDescriptorRMControl@8
-SetSecurityDescriptorSacl@16
-SetSecurityInfo@28
-SetSecurityInfoExA@36
-SetSecurityInfoExW@36
-SetServiceBits@16
-SetServiceObjectSecurity@12
-SetServiceStatus@8
-SetThreadToken@8
-SetTokenInformation@16
-SetTraceCallback@8
-SetUserFileEncryptionKey@4
-StartServiceA@12
-StartServiceCtrlDispatcherA@4
-StartServiceCtrlDispatcherW@4
-StartServiceW@12
-StartTraceA@12
-StartTraceW@12
-SynchronizeWindows31FilesAndWindowsNTRegistry@16
-SystemFunction001@12
-SystemFunction002@12
-SystemFunction003@8
-SystemFunction004@12
-SystemFunction005@12
-SystemFunction006@8
-SystemFunction007@8
-SystemFunction008@12
-SystemFunction009@12
-SystemFunction010@12
-SystemFunction011@12
-SystemFunction012@12
-SystemFunction013@12
-SystemFunction014@12
-SystemFunction015@12
-SystemFunction016@12
-SystemFunction017@12
-SystemFunction018@12
-SystemFunction019@12
-SystemFunction020@12
-SystemFunction021@12
-SystemFunction022@12
-SystemFunction023@12
-SystemFunction024@12
-SystemFunction025@12
-SystemFunction026@12
-SystemFunction027@12
-SystemFunction028@8
-SystemFunction029@8
-SystemFunction030@8
-SystemFunction031@8
-SystemFunction032@8
-SystemFunction033@8
-SystemFunction034@12
-TraceEvent@12
-TraceEventInstance@20
-TrusteeAccessToObjectA@24
-TrusteeAccessToObjectW@24
-UninstallApplication@4
-UnlockServiceDatabase@4
-UnregisterTraceGuids@8
-WriteEncryptedFileRaw@12
diff --git a/winsup/w32api/lib/ativscp-uuid.c b/winsup/w32api/lib/ativscp-uuid.c
deleted file mode 100644
index 4cfdc3e..0000000
--- a/winsup/w32api/lib/ativscp-uuid.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/* ativscp-uuid.c */
-/* Generate GUIDs for ActiveScript interfaces */
-
-/* All IIDs defined in this file were extracted from
- * HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\ */
-
-/* All CLSIDs defined in this file were extracted from
- * HKEY_CLASSES_ROOT\CLSID\ */
-
-#define INITGUID
-#include <basetyps.h>
-DEFINE_GUID(IID_IActiveScript,0xbb1a2ae1,0xa4f9,0x11cf,0x8f,0x20,0,0x80,0x5f,0x2c,0xd0,0x64);
-DEFINE_GUID(IID_IActiveScriptError,0xeae1ba61,0xa4ed,0x11cf,0x8f,0x20,0,0x80,0x5f,0x2c,0xd0,0x64);
-DEFINE_GUID(IID_IActiveScriptParse,0xbb1a2ae2,0xa4f9,0x11cf,0x8f,0x20,0,0x80,0x5f,0x2c,0xd0,0x64);
-DEFINE_GUID(IID_IActiveScriptSite,0xdb01a1e3,0xa42b,0x11cf,0x8f,0x20,0,0x80,0x5f,0x2c,0xd0,0x64);
-DEFINE_GUID(IID_IActiveScriptSiteWindow,0xd10f6761,0x83e9,0x11cf,0x8f,0x20,0,0x80,0x5f,0x2c,0xd0,0x64);
diff --git a/winsup/w32api/lib/avicap32.def b/winsup/w32api/lib/avicap32.def
deleted file mode 100644
index cde12a4..0000000
--- a/winsup/w32api/lib/avicap32.def
+++ /dev/null
@@ -1,8 +0,0 @@
-LIBRARY AVICAP32.DLL
-EXPORTS
-videoThunk32@20
-capGetDriverDescriptionW@20
-capGetDriverDescriptionA@20
-capCreateCaptureWindowW@32
-capCreateCaptureWindowA@32
-AppCleanup@4
diff --git a/winsup/w32api/lib/avifil32.def b/winsup/w32api/lib/avifil32.def
deleted file mode 100644
index 32f8cb6..0000000
--- a/winsup/w32api/lib/avifil32.def
+++ /dev/null
@@ -1,77 +0,0 @@
-LIBRARY AVIFIL32.DLL
-EXPORTS
-IID_IGetFrame
-IID_IAVIStream
-IID_IAVIFile
-IID_IAVIEditStream
-EditStreamSetNameW@8
-EditStreamSetNameA@8
-EditStreamSetName@8
-EditStreamSetInfoW@12
-EditStreamSetInfoA@12
-EditStreamSetInfo@12
-EditStreamPaste@24
-EditStreamCut@16
-EditStreamCopy@16
-EditStreamClone@8
-CreateEditableStream@8
-AVIStreamWriteData@16
-AVIStreamWrite@32
-AVIStreamTimeToSample@8
-AVIStreamStart@4
-AVIStreamSetFormat@16
-AVIStreamSampleToTime@8
-AVIStreamRelease@4
-AVIStreamReadFormat@16
-AVIStreamReadData@16
-AVIStreamRead@28
-AVIStreamOpenFromFileW@24
-AVIStreamOpenFromFileA@24
-AVIStreamOpenFromFile@24
-AVIStreamLength@4
-AVIStreamInfoW@12
-AVIStreamInfoA@12
-AVIStreamInfo@12
-AVIStreamGetFrameOpen@8
-AVIStreamGetFrameClose@4
-AVIStreamGetFrame@8
-AVIStreamFindSample@12
-AVIStreamEndStreaming@4
-AVIStreamCreate@16
-AVIStreamBeginStreaming@16
-AVIStreamAddRef@4
-AVISaveW
-AVISaveVW@24
-AVISaveVA@24
-AVISaveV@24
-AVISaveOptionsFree@8
-AVISaveOptions@20
-AVISaveA
-AVISave
-AVIPutFileOnClipboard@4
-AVIMakeStreamFromClipboard@12
-AVIMakeFileFromStreams@12
-AVIMakeCompressedStream@16
-AVIGetFromClipboard@4
-AVIFileWriteData@16
-AVIFileRelease@4
-AVIFileReadData@16
-AVIFileOpenW@16
-AVIFileOpenA@16
-AVIFileOpen@16
-AVIFileInit@0
-AVIFileInfoW@12
-AVIFileInfoA@12
-AVIFileInfo@12
-AVIFileGetStream@16
-AVIFileExit@0
-AVIFileEndRecord@4
-AVIFileCreateStreamW@12
-AVIFileCreateStreamA@12
-AVIFileCreateStream@12
-AVIFileAddRef@4
-AVIClearClipboard@0
-AVIBuildFilterW@12
-AVIBuildFilterA@12
-AVIBuildFilter@12
-
diff --git a/winsup/w32api/lib/bthprops.def b/winsup/w32api/lib/bthprops.def
deleted file mode 100644
index 0da0774..0000000
--- a/winsup/w32api/lib/bthprops.def
+++ /dev/null
@@ -1,8 +0,0 @@
-LIBRARY BTHPROPS.CPL
-EXPORTS
-BluetoothFindFirstRadio@8
-BluetoothFindFirstDevice@8
-BluetoothFindNextDevice@8
-BluetoothFindDeviceClose@4
-BluetoothFindNextRadio@8
-BluetoothFindRadioClose@4
diff --git a/winsup/w32api/lib/cap.def b/winsup/w32api/lib/cap.def
deleted file mode 100644
index 8732ca0..0000000
--- a/winsup/w32api/lib/cap.def
+++ /dev/null
@@ -1,6 +0,0 @@
-LIBRARY CAP.DLL
-EXPORTS
-DumpCAP@0
-StartCAP@0
-StopCAP@0
-_penter
diff --git a/winsup/w32api/lib/cguid-uuid.c b/winsup/w32api/lib/cguid-uuid.c
deleted file mode 100644
index 737a542..0000000
--- a/winsup/w32api/lib/cguid-uuid.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* cguid-uuid.c */
-/* Generate GUIDs for CGUID interfaces */
-
-/* All IIDs defined in this file were extracted from
- * HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\ */
-
-/* All CLSIDs defined in this file were extracted from
- * HKEY_CLASSES_ROOT\CLSID\ */
-
-#define INITGUID
-#include <basetyps.h>
-DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
-DEFINE_OLEGUID(IID_IRpcChannel,0x4,0,0);
-DEFINE_OLEGUID(IID_IRpcStub,0x5,0,0);
-DEFINE_OLEGUID(IID_IRpcProxy,0x7,0,0);
-DEFINE_OLEGUID(IID_IPSFactory,0x9,0,0);
-// Picture (Device Independant Bitmap) CLSID
-DEFINE_OLEGUID(CLSID_StaticDib,0x316,0,0);
-// Picture (Metafile) CLSID
-DEFINE_OLEGUID(CLSID_StaticMetafile,0x315,0,0);
diff --git a/winsup/w32api/lib/comcat-uuid.c b/winsup/w32api/lib/comcat-uuid.c
deleted file mode 100644
index 1b7586d..0000000
--- a/winsup/w32api/lib/comcat-uuid.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* comcat-uuid.c */
-/* Generate GUIDs for COMCAT interfaces */
-
-/* All IIDs defined in this file were extracted from
- * HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\ */
-
-/* All CLSIDs defined in this file were extracted from
- * HKEY_CLASSES_ROOT\CLSID\ */
-
-#define INITGUID
-#include <basetyps.h>
-DEFINE_OLEGUID(IID_IEnumGUID,0x2e000,0,0);
-DEFINE_OLEGUID(IID_ICatInformation,0x2e013,0,0);
-DEFINE_OLEGUID(IID_ICatRegister,0x2e012,0,0);
-DEFINE_OLEGUID(IID_IEnumCATEGORYINFO,0x2e011,0,0);
-// Component Catagories Manager CLSID
-DEFINE_OLEGUID(CLSID_StdComponentCategoriesMgr,0x2e005,0,0);
-// Implemented Categories under Outlook Express MsgTable Object CLSID
-DEFINE_GUID(CATID_Insertable,0x40fc6ed3,0x2438,0x11cf,0xa3,0xdb,0x8,0,0x36,0xf1,0x25,0x2);
-DEFINE_GUID(CATID_Control,0x40fc6ed4,0x2438,0x11cf,0xa3,0xdb,0x8,0,0x36,0xf1,0x25,0x2);
-// Implemented Categories under Microsoft PowerPoint Slide CLSID
-DEFINE_GUID(CATID_DocObject,0x40fc6ed8,0x2438,0x11cf,0xa3,0xdb,0x8,0,0x36,0xf1,0x25,0x2);
-// Implemented Categories under Microsoft Toolbar Control CLSID
-DEFINE_GUID(CATID_Programmable,0x40fc6ed5,0x2438,0x11cf,0xa3,0xdb,0x8,0,0x36,0xf1,0x25,0x2);
-// Implemented Categories under SSCommand Control CLSID
-DEFINE_GUID(CATID_Printable,0x40fc6ed9,0x2438,0x11cf,0xa3,0xdb,0x8,0,0x36,0xf1,0x25,0x2);
-DEFINE_GUID(CATID_PersistsToStorage,0xde86a52,0x2baa,0x11cf,0xa2,0x29,0,0xaa,0,0x3d,0x73,0x52);
-DEFINE_GUID(CATID_PersistsToPropertyBag,0xde86a57,0x2baa,0x11cf,0xa2,0x29,0,0xaa,0,0x3d,0x73,0x52);
-DEFINE_GUID(CATID_PersistsToStream,0xde86a54,0x2baa,0x11cf,0xa2,0x29,0,0xaa,0,0x3d,0x73,0x52);
-DEFINE_GUID(CATID_PersistsToStreamInit,0xde86a53,0x2baa,0x11cf,0xa2,0x29,0,0xaa,0,0x3d,0x73,0x52);
diff --git a/winsup/w32api/lib/comctl32.def b/winsup/w32api/lib/comctl32.def
deleted file mode 100644
index 57c2db5..0000000
--- a/winsup/w32api/lib/comctl32.def
+++ /dev/null
@@ -1,133 +0,0 @@
-LIBRARY COMCTL32.DLL
-EXPORTS
-_TrackMouseEvent@4
-AddMRUData@12
-AddMRUStringA@8
-AddMRUStringW@8
-Alloc@4
-CreateMRUListA@4
-CreateMRUListW@4
-CreateMappedBitmap@20
-CreatePage@8
-CreatePropertySheetPage@4
-CreatePropertySheetPageA@4
-CreatePropertySheetPageW@4
-CreateProxyPage@8
-CreateStatusWindow@16
-CreateStatusWindowA@16
-CreateStatusWindowW@16
-CreateToolbar@32
-CreateToolbarEx@52
-CreateUpDownControl@48
-DPA_Clone@8
-DPA_Create@4
-DPA_CreateEx@8
-DPA_DeleteAllPtrs@4
-DPA_DeletePtr@8
-DPA_Destroy@4
-DPA_GetPtr@8
-DPA_GetPtrIndex@8
-DPA_Grow@8
-DPA_InsertPtr@12
-DPA_Search@24
-DPA_SetPtr@12
-DPA_Sort@12
-DSA_Create@8
-DSA_DeleteAllItems@4
-DSA_DeleteItem@8
-DSA_Destroy@4
-DSA_GetItem@12
-DSA_GetItemPtr@8
-DSA_InsertItem@12
-DSA_SetItem@12
-DelMRUString@8
-DestroyPropertySheetPage@4
-DrawInsert@12
-DrawStatusText@16
-DrawStatusTextA@16
-DrawStatusTextW@16
-EnumMRUListA@16
-EnumMRUListW@16
-FindMRUData@16
-FindMRUStringA@12
-FindMRUStringW@12
-Free@4
-FreeMRUList@4
-GetEffectiveClientRect@12
-GetSize@4
-ImageList_Add@12
-ImageList_AddIcon@8
-ImageList_AddMasked@12
-ImageList_BeginDrag@16
-ImageList_Copy@20
-ImageList_Create@20
-ImageList_Destroy@4
-ImageList_DragEnter@12
-ImageList_DragLeave@4
-ImageList_DragMove@8
-ImageList_DragShowNolock@4
-ImageList_Draw@24
-ImageList_DrawEx@40
-ImageList_DrawIndirect@4
-ImageList_Duplicate@4
-ImageList_EndDrag@0
-ImageList_GetBkColor@4
-ImageList_GetDragImage@8
-ImageList_GetIcon@12
-ImageList_GetIconSize@12
-ImageList_GetImageCount@4
-ImageList_GetImageInfo@12
-ImageList_GetImageRect@12
-ImageList_LoadImage@28
-ImageList_LoadImageA@28
-ImageList_LoadImageW@28
-ImageList_Merge@24
-ImageList_Read@4
-ImageList_Remove@8
-ImageList_Replace@16
-ImageList_ReplaceIcon@12
-ImageList_SetBkColor@8
-ImageList_SetDragCursorImage@16
-ImageList_SetIconSize@12
-ImageList_SetImageCount@8
-ImageList_SetOverlayImage@12
-ImageList_Write@8
-InitCommonControls@0
-InitCommonControlsEx@4
-LBItemFromPt@16
-MakeDragList@4
-MenuHelp@28
-PropertySheet@4
-PropertySheetA@4
-PropertySheetW@4
-ReAlloc@8
-SendNotify@16
-SendNotifyEx@20
-SetWindowSubclass@16
-ShowHideMenuCtl@12
-StrCSpnA@8
-StrCSpnIA@8
-StrCSpnW@8
-StrChrA@8
-StrChrIA@8
-StrChrIW@8
-StrChrW@8
-StrCmpNA@12
-StrCmpNIA@12
-StrCmpNIW@12
-StrCmpNW@12
-StrRChrA@12
-StrRChrIA@12
-StrRChrW@12
-StrRStrIA@12
-StrRStrIW@12
-StrStrA@8
-StrStrIA@8
-StrStrIW@8
-StrStrW@8
-StrToIntA@4
-StrToIntW@4
-Str_GetPtrA@12
-Str_GetPtrW@12
-Str_SetPtrA@8
-Str_SetPtrW@8
diff --git a/winsup/w32api/lib/comdlg32.def b/winsup/w32api/lib/comdlg32.def
deleted file mode 100644
index 82806aa..0000000
--- a/winsup/w32api/lib/comdlg32.def
+++ /dev/null
@@ -1,27 +0,0 @@
-LIBRARY COMDLG32.DLL
-EXPORTS
-ChooseColorA@4
-ChooseColorW@4
-ChooseFontA@4
-ChooseFontW@4
-CommDlgExtendedError@0
-FindTextA@4
-FindTextW@4
-GetFileTitleA@12
-GetFileTitleW@12
-GetOpenFileNameA@4
-GetOpenFileNameW@4
-GetSaveFileNameA@4
-GetSaveFileNameW@4
-LoadAlterBitmap@12
-PageSetupDlgA@4
-PageSetupDlgW@4
-PrintDlgA@4
-PrintDlgExA@4
-PrintDlgExW@4
-PrintDlgW@4
-ReplaceTextA@4
-ReplaceTextW@4
-WantArrows@16
-dwLBSubclass@16
-dwOKSubclass@16
diff --git a/winsup/w32api/lib/crypt32.def b/winsup/w32api/lib/crypt32.def
deleted file mode 100644
index 7ad03c2..0000000
--- a/winsup/w32api/lib/crypt32.def
+++ /dev/null
@@ -1,47 +0,0 @@
-LIBRARY CRYPT32.DLL
-EXPORTS
-CertFreeCertificateChain@4
-CertGetCertificateChain@32
-CertNameToStrA@20
-CertNameToStrW@20
-CertVerifyCertificateChainPolicy@16
-CertCloseStore@8
-CertOpenSystemStoreA@8
-CertOpenSystemStoreW@8
-CertFindCertificateInStore@24
-CertFreeCertificateContext@4
-CertGetIssuerCertificateFromStore@16
-CertFindChainInStore@24
-CertOpenStore@20
-CertOIDToAlgId@4
-CertAlgIDToOID@4
-CryptProtectData@28
-CryptUnprotectData@28
-CryptDecodeObject@28
-CryptDecodeObjectEx@32
-CryptEncodeObjectEx@28
-CryptRegisterOIDFunction@20
-CryptUnregisterOIDFunction@12
-CertEnumCertificatesInStore@8
-CertDuplicateStore@4
-CertDuplicateCertificateContext@4
-CertGetNameStringA@24
-CertGetNameStringW@24
-CertFindExtension@12
-CertAddCertificateContextToStore@16
-CertCompareCertificate@12
-CertDeleteCertificateFromStore@4
-PFXIsPFXBlob@4
-PFXVerifyPassword@12
-PFXImportCertStore@12
-CertGetCertificateContextProperty@16
-CryptEnumKeyIdentifierProperties@28
-CryptAcquireCertificatePrivateKey@24
-CertCreateCertificateContext@12
-CryptGetKeyIdentifierProperty@28
-CertSetCertificateContextProperty@16
-CertCompareCertificateName@12
-CryptSetKeyIdentifierProperty@24
-CryptEncodeObject@20
-CryptGetDefaultProviderA@20
-CryptGetDefaultProviderW@20
diff --git a/winsup/w32api/lib/ctl3d32.def b/winsup/w32api/lib/ctl3d32.def
deleted file mode 100644
index 130c0a5..0000000
--- a/winsup/w32api/lib/ctl3d32.def
+++ /dev/null
@@ -1,27 +0,0 @@
-LIBRARY CTL3D32.DLL
-EXPORTS
-BtnWndProc3d@16
-ComboWndProc3d@16
-Ctl3dAutoSubclass@4
-Ctl3dAutoSubclassEx@8
-Ctl3dColorChange@0
-Ctl3dCtlColor@8
-Ctl3dCtlColorEx@12
-Ctl3dDlgFramePaint@16
-Ctl3dDlgProc@16
-Ctl3dEnabled@0
-Ctl3dGetVer@0
-Ctl3dIsAutoSubclass@0
-Ctl3dRegister@4
-Ctl3dSetStyle@12
-Ctl3dSubclassCtl@4
-Ctl3dSubclassCtlEx@8
-Ctl3dSubclassDlg@8
-Ctl3dSubclassDlgEx@8
-Ctl3dUnAutoSubclass@0
-Ctl3dUnregister@4
-Ctl3dUnsubclassCtl@4
-Ctl3dWinIniChange@0
-EditWndProc3d@16
-ListWndProc3d@16
-StaticWndProc3d@16
diff --git a/winsup/w32api/lib/ddk/Makefile.in b/winsup/w32api/lib/ddk/Makefile.in
deleted file mode 100644
index 80b148c..0000000
--- a/winsup/w32api/lib/ddk/Makefile.in
+++ /dev/null
@@ -1,201 +0,0 @@
-# Makefile.in
-#
-# This file is part of a free library building Windows NT drivers.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-
-# start config section
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-host_alias = @host@
-build_alias = @build@
-target_alias = @target@
-with_cross_host = @with_cross_host@
-prefix = @prefix@
-includedir:=@includedir@
-
-program_transform_name = @program_transform_name@
-exec_prefix = @exec_prefix@
-libdir:=@libdir@
-bindir = @bindir@
-ifeq ($(target_alias),$(host_alias))
-ifeq ($(build_alias),$(host_alias))
-tooldir:=$(exec_prefix)
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-datadir = @datadir@
-infodir = @infodir@
-ifneq (,$(findstring cygwin,$(target_alias)))
-inst_includedir:=$(tooldir)/include/w32api/ddk
-inst_libdir:=$(tooldir)/lib/w32api
-else
-ifneq (,$(with_cross_host))
-inst_includedir:=$(tooldir)/include/w32api/ddk
-inst_libdir:=$(tooldir)/lib
-else
-inst_includedir:=$(includedir)/ddk
-inst_libdir:=$(libdir)
-endif
-endif
-
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-mkinstalldirs = mkdir -p
-
-CC = @CC@
-CC_FOR_TARGET = $(CC)
-
-DLLTOOL = @DLLTOOL@
-DLLTOOL_FLAGS = --as=$(AS) -k
-AS = @AS@
-AS_FOR_TARGET = $(AS_FOR_TARGET)
-WINDRES = @WINDRES@
-
-# Depending on if we build as part of winsup or mingw we need to
-# add additional include paths in order to get the correct headers
-# from the C library.
-BUILDENV = @BUILDENV@
-
-ifeq ($(BUILDENV), cygwin)
-# winsup/include
-# winsup/../newlib/libc/include
-# winsup/../newlib/libc/sys/cygwin
-EXTRA_INCLUDES = -I$(srcdir)/../../include -I$(srcdir)/../../../newlib/libc/include -I$(srcdir)/../../../newlib/libc/sys/cygwin
-endif
-ifeq ($(BUILDENV), mingw)
-EXTRA_INCLUDES = -I$(srcdir)/../../mingw/include
-endif
-
-INCLUDES = -I$(srcdir)/../include $(EXTRA_INCLUDES)
-
-CFLAGS = @CFLAGS@
-ALL_CFLAGS = $(CFLAGS) $(INCLUDES)
-
-RANLIB = @RANLIB@
-AR = @AR@
-LD = @LD@
-
-# end config section
-
-# headers
-
-HEADERS = $(notdir $(wildcard $(srcdir)/../../include/ddk/*.h))
-
-# libraries
-
-DEF_FILES = $(notdir $(wildcard $(srcdir)/*.def))
-IMPLIBS = $(addprefix lib,$(subst .def,.a,$(DEF_FILES)))
-LIBS = $(IMPLIBS)
-
-DISTFILES = Makefile.in $(DEF_FILES)
-
-.NOTPARALLEL:
-
-# targets
-all: $(LIBS)
-
-TEST_OPTIONS = $(ALL_CFLAGS) -Wall -pedantic -Wsystem-headers -c $(srcdir)/test.c -o test.o
-.PHONY: test
-test:
- @echo "Testing ddk..."
- @for lang in c c++ objective-c ; do \
- echo "$$lang..."; \
- $(CC) -x$$lang $(TEST_OPTIONS) ; \
- echo "$$lang UNICODE..."; \
- $(CC) -x$$lang -DUNICODE $(TEST_OPTIONS) ; \
- done
- @echo "windres..."
- @$(WINDRES) --include-dir $(INCDIR) -i $(srcdir)/res.rc -o test.o
- @echo "windres UNICODE..."
- @$(WINDRES) --define UNICODE --include-dir $(INCDIR) -i $(srcdir)/res.rc -o test.o
- @rm -f test.o
-
-# make rules
-
-.SUFFIXES: .c .o .def .a
-
-.c.o:
- $(CC) -c $(ALL_CFLAGS) -o $@ $<
-
-lib%.a : %.def %.o
- $(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $(srcdir)/$*.def
- $(AR) r $@ $*.o
- $(RANLIB) $@
-
-lib%.a: %.def
- $(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $<
-
-lib%.a: %.o
- $(AR) rc $@ $*.o
- $(RANLIB) $@
-
-# install headers and libraries in a target specified directory.
-install: install-libraries install-headers
-
-install-libraries: all
- $(mkinstalldirs) $(inst_libdir)
- for i in $(LIBS); do \
- $(INSTALL_DATA) $$i $(inst_libdir)/$$i ; \
- done
-
-install-headers:
- $(mkinstalldirs) $(inst_includedir)
- for i in $(HEADERS); do \
- $(INSTALL_DATA) $(srcdir)/../../include/ddk/$$i $(inst_includedir)/$$i ; \
- done
-
-# uninstall headers and libraries from a target specified directory
-uninstall: uninstall-libraries uninstall-headers
-
-uninstall-libraries:
- @for i in $(LIBS); do \
- rm -f $(inst_libdir)/$$i ; \
- done
- rmdir $(inst_libdir)
-
-uninstall-headers:
- @for i in $(HEADERS); do \
- rm -r $(inst_includedir)/$$i ; \
- done
- rmdir $(inst_includedir)
-
-
-dist:
- mkdir $(distdir)/include/ddk
- chmod 755 $(distdir)/include/ddk
- @for i in $(HEADERS); do \
- cp -p $(srcdir)/../../include/ddk/$$i $(distdir)/include/ddk/$$i ; \
- done
- mkdir $(distdir)/lib/ddk
- chmod 755 $(distdir)/lib/ddk
- @for i in $(DISTFILES); do \
- cp -p $(srcdir)/$$i $(distdir)/lib/ddk/$$i ; \
- done
-
-Makefile: Makefile.in ../../config.status ../../configure
- cd ../..; $(SHELL) config.status
-
-# clean
-
-mostlyclean:
- rm -f *~ *.o *.s
-
-clean:
- rm -f *.o *.a *.s *~
-
-distclean: clean
- rm -f config.cache config.status config.log Makefile
-
-maintainer-clean: distclean
diff --git a/winsup/w32api/lib/ddk/apcups.def b/winsup/w32api/lib/ddk/apcups.def
deleted file mode 100644
index b82d099..0000000
--- a/winsup/w32api/lib/ddk/apcups.def
+++ /dev/null
@@ -1,8 +0,0 @@
-LIBRARY apcups.dll
-EXPORTS
-UPSCancelWait@0
-UPSGetState@0
-UPSInit@0
-UPSStop@0
-UPSTurnOff@4
-UPSWaitForStateChange@8
diff --git a/winsup/w32api/lib/ddk/cfgmgr32.def b/winsup/w32api/lib/ddk/cfgmgr32.def
deleted file mode 100644
index d849e1a..0000000
--- a/winsup/w32api/lib/ddk/cfgmgr32.def
+++ /dev/null
@@ -1,198 +0,0 @@
-LIBRARY cfgmgr32.dll
-EXPORTS
-;CMP_Init_Detection
-;CMP_RegisterNotification
-;CMP_Report_LogOn
-;CMP_UnregisterNotification
-CMP_WaitNoPendingInstallEvents@4
-;CMP_WaitServicesAvailable
-CM_Add_Empty_Log_Conf@16
-CM_Add_Empty_Log_Conf_Ex@20
-CM_Add_IDA@16
-CM_Add_IDW@16
-CM_Add_ID_ExA@16
-CM_Add_ID_ExW@16
-;CM_Add_Range
-CM_Add_Res_Des@24
-CM_Add_Res_Des_Ex@28
-CM_Connect_MachineA@8
-CM_Connect_MachineW@8
-;CM_Create_DevNodeA
-;CM_Create_DevNodeW
-;CM_Create_DevNode_ExA
-;CM_Create_DevNode_ExW
-;CM_Create_Range_List
-;CM_Delete_Class_Key
-;CM_Delete_Class_Key_Ex
-;CM_Delete_DevNode_Key
-;CM_Delete_DevNode_Key_Ex
-;CM_Delete_Range
-;CM_Detect_Resource_Conflict
-;CM_Detect_Resource_Conflict_Ex
-;CM_Disable_DevNode
-;CM_Disable_DevNode_Ex
-CM_Disconnect_Machine@4
-;CM_Dup_Range_List
-;CM_Enable_DevNode
-;CM_Enable_DevNode_Ex
-CM_Enumerate_Classes@12
-CM_Enumerate_Classes_Ex@16
-CM_Enumerate_EnumeratorsA@16
-CM_Enumerate_EnumeratorsW@16
-CM_Enumerate_Enumerators_ExA@20
-CM_Enumerate_Enumerators_ExW@20
-;CM_Find_Range
-;CM_First_Range
-CM_Free_Log_Conf@8
-CM_Free_Log_Conf_Ex@12
-CM_Free_Log_Conf_Handle@4
-;CM_Free_Range_List
-CM_Free_Res_Des@12
-CM_Free_Res_Des_Ex@16
-CM_Free_Res_Des_Handle@4
-CM_Free_Resource_Conflict_Handle@4
-CM_Get_Child@12
-CM_Get_Child_Ex@16
-;CM_Get_Class_Key_NameA
-;CM_Get_Class_Key_NameW
-;CM_Get_Class_Key_Name_ExA
-;CM_Get_Class_Key_Name_ExW
-;CM_Get_Class_NameA
-;CM_Get_Class_NameW
-;CM_Get_Class_Name_ExA
-;CM_Get_Class_Name_ExW
-;CM_Get_Class_Registry_PropertyA
-;CM_Get_Class_Registry_PropertyW
-CM_Get_Depth@12
-CM_Get_Depth_Ex@16
-;CM_Get_DevNode_Registry_PropertyA
-;CM_Get_DevNode_Registry_PropertyW
-;CM_Get_DevNode_Registry_Property_ExA
-;CM_Get_DevNode_Registry_Property_ExW
-CM_Get_DevNode_Status@16
-CM_Get_DevNode_Status_Ex@20
-CM_Get_Device_IDA@16
-CM_Get_Device_IDW@16
-CM_Get_Device_ID_ExA@20
-CM_Get_Device_ID_ExW@20
-CM_Get_Device_ID_ListA@16
-CM_Get_Device_ID_ListW@16
-CM_Get_Device_ID_List_ExA@20
-CM_Get_Device_ID_List_ExW@20
-CM_Get_Device_ID_List_SizeA@12
-CM_Get_Device_ID_List_SizeW@12
-CM_Get_Device_ID_List_Size_ExA@16
-CM_Get_Device_ID_List_Size_ExW@16
-CM_Get_Device_ID_Size@12
-CM_Get_Device_ID_Size_Ex@16
-;CM_Get_Device_Interface_AliasA
-;CM_Get_Device_Interface_AliasW
-;CM_Get_Device_Interface_Alias_ExA
-;CM_Get_Device_Interface_Alias_ExW
-;CM_Get_Device_Interface_ListA
-;CM_Get_Device_Interface_ListW
-;CM_Get_Device_Interface_List_ExA
-;CM_Get_Device_Interface_List_ExW
-;CM_Get_Device_Interface_List_SizeA
-;CM_Get_Device_Interface_List_SizeW
-;CM_Get_Device_Interface_List_Size_ExA
-;CM_Get_Device_Interface_List_Size_ExW
-CM_Get_First_Log_Conf@12
-CM_Get_First_Log_Conf_Ex@16
-;CM_Get_Global_State
-;CM_Get_Global_State_Ex
-;CM_Get_HW_Prof_FlagsA
-;CM_Get_HW_Prof_FlagsW
-;CM_Get_HW_Prof_Flags_ExA
-;CM_Get_HW_Prof_Flags_ExW
-;CM_Get_Hardware_Profile_InfoA
-;CM_Get_Hardware_Profile_InfoW
-;CM_Get_Hardware_Profile_Info_ExA
-;CM_Get_Hardware_Profile_Info_ExW
-CM_Get_Log_Conf_Priority@12
-CM_Get_Log_Conf_Priority_Ex@16
-CM_Get_Next_Log_Conf@12
-CM_Get_Next_Log_Conf_Ex@16
-CM_Get_Next_Res_Des@20
-CM_Get_Next_Res_Des_Ex@24
-CM_Get_Parent@12
-CM_Get_Parent_Ex@16
-CM_Get_Res_Des_Data@16
-CM_Get_Res_Des_Data_Ex@20
-CM_Get_Res_Des_Data_Size@12
-CM_Get_Res_Des_Data_Size_Ex@16
-CM_Get_Resource_Conflict_Count@8
-CM_Get_Resource_Conflict_DetailsA@12
-CM_Get_Resource_Conflict_DetailsW@12
-CM_Get_Sibling@12
-CM_Get_Sibling_Ex@16
-CM_Get_Version@0
-CM_Get_Version_Ex@4
-;CM_Intersect_Range_List
-;CM_Invert_Range_List
-;CM_Is_Dock_Station_Present
-;CM_Is_Dock_Station_Present_Ex
-CM_Locate_DevNodeA@12
-CM_Locate_DevNodeW@12
-CM_Locate_DevNode_ExA@16
-CM_Locate_DevNode_ExW@16
-;CM_Merge_Range_List
-CM_Modify_Res_Des@24
-CM_Modify_Res_Des_Ex@28
-;CM_Move_DevNode
-;CM_Move_DevNode_Ex
-;CM_Next_Range
-;CM_Open_Class_KeyA
-;CM_Open_Class_KeyW
-;CM_Open_Class_Key_ExA
-;CM_Open_Class_Key_ExW
-;CM_Open_DevNode_Key
-;CM_Open_DevNode_Key_Ex
-CM_Query_And_Remove_SubTreeA@20
-CM_Query_And_Remove_SubTreeW@20
-CM_Query_And_Remove_SubTree_ExA@0
-CM_Query_And_Remove_SubTree_ExW@0
-;CM_Query_Arbitrator_Free_Data
-;CM_Query_Arbitrator_Free_Data_Ex
-;CM_Query_Arbitrator_Free_Size
-;CM_Query_Arbitrator_Free_Size_Ex
-;CM_Query_Remove_SubTree
-;CM_Query_Remove_SubTree_Ex
-CM_Query_Resource_Conflict_List@28
-CM_Reenumerate_DevNode@8
-CM_Reenumerate_DevNode_Ex@12
-;CM_Register_Device_Driver
-;CM_Register_Device_Driver_Ex
-;CM_Register_Device_InterfaceA
-;CM_Register_Device_InterfaceW
-;CM_Register_Device_Interface_ExA
-;CM_Register_Device_Interface_ExW
-;CM_Remove_SubTree
-;CM_Remove_SubTree_Ex
-;CM_Request_Eject_PC
-;CM_Request_Eject_PC_Ex
-;CM_Run_Detection
-;CM_Run_Detection_Ex
-;CM_Set_Class_Registry_PropertyA
-;CM_Set_Class_Registry_PropertyW
-;CM_Set_DevNode_Problem
-;CM_Set_DevNode_Problem_Ex
-;CM_Set_DevNode_Registry_PropertyA
-;CM_Set_DevNode_Registry_PropertyW
-;CM_Set_DevNode_Registry_Property_ExA
-;CM_Set_DevNode_Registry_Property_ExW
-;CM_Set_HW_Prof
-;CM_Set_HW_Prof_Ex
-;CM_Set_HW_Prof_FlagsA
-;CM_Set_HW_Prof_FlagsW
-;CM_Set_HW_Prof_Flags_ExA
-;CM_Set_HW_Prof_Flags_ExW
-;CM_Setup_DevNode
-;CM_Setup_DevNode_Ex
-;CM_Test_Range_Available
-;CM_Uninstall_DevNode
-;CM_Uninstall_DevNode_Ex
-;CM_Unregister_Device_InterfaceA
-;CM_Unregister_Device_InterfaceW
-;CM_Unregister_Device_Interface_ExA
-;CM_Unregister_Device_Interface_ExW
diff --git a/winsup/w32api/lib/ddk/dxapi.def b/winsup/w32api/lib/ddk/dxapi.def
deleted file mode 100644
index bff4d1b..0000000
--- a/winsup/w32api/lib/ddk/dxapi.def
+++ /dev/null
@@ -1,9 +0,0 @@
-LIBRARY dxapi.sys
-EXPORTS
-;_DxApi@20
-;_DxApiGetVersion@0
-;_DxApiInitialize@32
-;_DxAutoflipUpdate@20
-;_DxEnableIRQ@8
-;_DxLoseObject@8
-;_DxUpdateCapture@12
diff --git a/winsup/w32api/lib/ddk/hal.def b/winsup/w32api/lib/ddk/hal.def
deleted file mode 100644
index b09c4b5..0000000
--- a/winsup/w32api/lib/ddk/hal.def
+++ /dev/null
@@ -1,94 +0,0 @@
-LIBRARY hal.dll
-EXPORTS
-@ExAcquireFastMutex@4
-@ExReleaseFastMutex@4
-@ExTryToAcquireFastMutex@4
-;HalAcquireDisplayOwnership
-;HalAdjustResourceList
-;HalAllProcessorsStarted
-;HalAllocateAdapterChannel
-HalAllocateCommonBuffer@16
-;HalAllocateCrashDumpRegisters
-HalAssignSlotResources@32
-;HalBeginSystemInterrupt
-;HalCalibratePerformanceCounter
-;HalClearSoftwareInterrupt
-;HalDisableSystemInterrupt
-;HalDisplayString
-;HalEnableSystemInterrupt
-;HalEndSystemInterrupt
-;HalFlushCommonBuffer
-HalFreeCommonBuffer@20
-HalGetAdapter@8
-HalGetBusData@20
-HalGetBusDataByOffset@24
-;HalGetEnvironmentVariable
-HalGetInterruptVector@24
-;HalHandleNMI
-;HalInitSystem
-;HalInitializeProcessor
-;HalMakeBeep
-;HalProcessorIdle
-;HalQueryDisplayParameters
-;HalQueryRealTimeClock
-HalReadDmaCounter@4
-;HalReportResourceUsage
-;HalRequestIpi
-;HalRequestSoftwareInterrupt
-;HalReturnToFirmware
-HalSetBusData@20
-HalSetBusDataByOffset@24
-;HalSetDisplayParameters
-;HalSetEnvironmentVariable
-;HalSetProfileInterval
-;HalSetRealTimeClock
-;HalSetTimeIncrement
-;HalStartNextProcessor
-;HalStartProfileInterrupt
-;HalStopProfileInterrupt
-;HalSystemVectorDispatchEntry
-HalTranslateBusAddress@24
-;IoAssignDriveLetters
-IoFlushAdapterBuffers@24
-IoFreeAdapterChannel@4
-IoFreeMapRegisters@12
-IoMapTransfer@24
-IoReadPartitionTable@16
-IoSetPartitionInformation@16
-IoWritePartitionTable@20
-;KdComPortInUse DATA
-@KeAcquireInStackQueuedSpinLock@8
-;KeAcquireInStackQueuedSpinLockRaiseToSynch
-;KeAcquireQueuedSpinLock
-;KeAcquireQueuedSpinLockRaiseToSynch
-KeAcquireSpinLock@8
-;KeAcquireSpinLockRaiseToSynch
-;KeFlushWriteBuffer
-KeGetCurrentIrql@0
-KeLowerIrql@4
-KeQueryPerformanceCounter@4
-KeRaiseIrql@8
-KeRaiseIrqlToDpcLevel@0
-;KeRaiseIrqlToSynchLevel
-@KeReleaseInStackQueuedSpinLock@4
-;KeReleaseQueuedSpinLock
-KeReleaseSpinLock@8
-KeStallExecutionProcessor@4
-;KeTryToAcquireQueuedSpinLock
-;KeTryToAcquireQueuedSpinLockRaiseToSynch
-;KfAcquireSpinLock
-;KfLowerIrql
-;KfRaiseIrql
-;KfReleaseSpinLock
-READ_PORT_BUFFER_UCHAR@12
-READ_PORT_BUFFER_ULONG@12
-READ_PORT_BUFFER_USHORT@12
-READ_PORT_UCHAR@4
-READ_PORT_ULONG@4
-READ_PORT_USHORT@4
-WRITE_PORT_BUFFER_UCHAR@12
-WRITE_PORT_BUFFER_ULONG@12
-WRITE_PORT_BUFFER_USHORT@12
-WRITE_PORT_UCHAR@8
-WRITE_PORT_ULONG@8
-WRITE_PORT_USHORT@8
diff --git a/winsup/w32api/lib/ddk/hid.def b/winsup/w32api/lib/ddk/hid.def
deleted file mode 100644
index bfbc9ea..0000000
--- a/winsup/w32api/lib/ddk/hid.def
+++ /dev/null
@@ -1,47 +0,0 @@
-LIBRARY hid.dll
-EXPORTS
-HidD_FlushQueue@4
-HidD_FreePreparsedData@4
-HidD_GetAttributes@8
-HidD_GetConfiguration@12
-HidD_GetFeature@12
-HidD_GetHidGuid@4
-HidD_GetIndexedString@16
-HidD_GetInputReport@12
-HidD_GetManufacturerString@12
-HidD_GetMsGenreDescriptor@12
-HidD_GetNumInputBuffers@8
-HidD_GetPhysicalDescriptor@12
-HidD_GetPreparsedData@8
-HidD_GetProductString@12
-HidD_GetSerialNumberString@12
-HidD_Hello@8
-HidD_SetConfiguration@12
-HidD_SetFeature@12
-HidD_SetNumInputBuffers@8
-HidD_SetOutputReport@12
-HidP_GetButtonCaps@16
-HidP_GetCaps@8
-HidP_GetData@24
-HidP_GetExtendedAttributes@20
-HidP_GetLinkCollectionNodes@12
-HidP_GetScaledUsageValue@32
-HidP_GetSpecificButtonCaps@28
-HidP_GetSpecificValueCaps@28
-HidP_GetUsageValue@32
-HidP_GetUsageValueArray@36
-HidP_GetUsages@32
-HidP_GetUsagesEx@28
-HidP_GetValueCaps@16
-HidP_InitializeReportForID@20
-HidP_MaxDataListLength@8
-HidP_MaxUsageListLength@12
-HidP_SetData@24
-HidP_SetScaledUsageValue@32
-HidP_SetUsageValue@32
-HidP_SetUsageValueArray@36
-HidP_SetUsages@32
-HidP_TranslateUsagesToI8042ScanCodes@24
-HidP_UnsetUsages@32
-HidP_UsageListDifference@20
-;HidservInstaller
diff --git a/winsup/w32api/lib/ddk/hidparse.def b/winsup/w32api/lib/ddk/hidparse.def
deleted file mode 100644
index 34da108..0000000
--- a/winsup/w32api/lib/ddk/hidparse.def
+++ /dev/null
@@ -1,32 +0,0 @@
-LIBRARY hidparse.sys
-EXPORTS
-;HidP_FreeCollectionDescription
-;HidP_GetButtonCaps
-HidP_GetCaps@8
-;HidP_GetCollectionDescription
-HidP_GetData@24
-HidP_GetExtendedAttributes@20
-HidP_GetLinkCollectionNodes@12
-HidP_GetScaledUsageValue@32
-HidP_GetSpecificButtonCaps@28
-HidP_GetSpecificValueCaps@28
-HidP_GetUsageValue@32
-HidP_GetUsageValueArray@36
-HidP_GetUsages@32
-HidP_GetUsagesEx@28
-;HidP_GetValueCaps
-HidP_InitializeReportForID@20
-HidP_MaxDataListLength@8
-HidP_MaxUsageListLength@12
-HidP_SetData@24
-HidP_SetScaledUsageValue@32
-HidP_SetUsageValue@32
-HidP_SetUsageValueArray@36
-HidP_SetUsages@32
-;HidP_SysPowerCaps
-;HidP_SysPowerEvent
-HidP_TranslateUsageAndPagesToI8042ScanCodes@24
-HidP_TranslateUsagesToI8042ScanCodes@24
-HidP_UnsetUsages@32
-HidP_UsageAndPageListDifference@20
-HidP_UsageListDifference@20
diff --git a/winsup/w32api/lib/ddk/mcd.def b/winsup/w32api/lib/ddk/mcd.def
deleted file mode 100644
index 69b6c60..0000000
--- a/winsup/w32api/lib/ddk/mcd.def
+++ /dev/null
@@ -1,7 +0,0 @@
-LIBRARY mcd.sys
-EXPORTS
-ChangerClassAllocatePool@8
-ChangerClassDebugPrint@8
-ChangerClassFreePool@4
-ChangerClassInitialize@12
-ChangerClassSendSrbSynchronous@20
diff --git a/winsup/w32api/lib/ddk/ndis.def b/winsup/w32api/lib/ddk/ndis.def
deleted file mode 100644
index 9655758..0000000
--- a/winsup/w32api/lib/ddk/ndis.def
+++ /dev/null
@@ -1,277 +0,0 @@
-LIBRARY ndis.sys
-EXPORTS
-;ArcFilterDprIndicateReceive
-;ArcFilterDprIndicateReceiveComplete
-;EthFilterDprIndicateReceive
-;EthFilterDprIndicateReceiveComplete
-;FddiFilterDprIndicateReceive
-;FddiFilterDprIndicateReceiveComplete
-NDIS_BUFFER_TO_SPAN_PAGES@4
-NdisAcquireReadWriteLock@12
-;NdisAcquireSpinLock
-NdisAdjustBufferLength@8
-NdisAllocateBuffer@20
-NdisAllocateBufferPool@12
-;NdisAllocateFromBlockPool
-NdisAllocateMemory@20
-NdisAllocateMemoryWithTag@12
-NdisAllocatePacket@12
-NdisAllocatePacketPool@16
-NdisAllocatePacketPoolEx@20
-;NdisAllocateSpinLock
-NdisAnsiStringToUnicodeString@8
-NdisBufferLength@4
-NdisBufferVirtualAddress@4
-;NdisCancelSendPackets
-;NdisCancelTimer
-NdisClAddParty@16
-NdisClCloseAddressFamily@4
-NdisClCloseCall@16
-NdisClDeregisterSap@4
-NdisClDropParty@12
-;NdisClGetProtocolVcContextFromTapiCallId
-NdisClIncomingCallComplete@12
-NdisClMakeCall@16
-NdisClModifyCallQoS@8
-NdisClOpenAddressFamily@24
-NdisClRegisterSap@16
-NdisCloseAdapter@8
-NdisCloseConfiguration@4
-;NdisCloseFile
-NdisCmActivateVc@8
-NdisCmAddPartyComplete@16
-NdisCmCloseAddressFamilyComplete@8
-NdisCmCloseCallComplete@12
-NdisCmDeactivateVc@4
-NdisCmDeregisterSapComplete@8
-NdisCmDispatchCallConnected@4
-NdisCmDispatchIncomingCall@12
-NdisCmDispatchIncomingCallQoSChange@8
-NdisCmDispatchIncomingCloseCall@16
-NdisCmDispatchIncomingDropParty@16
-NdisCmDropPartyComplete@8
-NdisCmMakeCallComplete@20
-NdisCmModifyCallQoSComplete@12
-NdisCmOpenAddressFamilyComplete@12
-NdisCmRegisterAddressFamily@16
-NdisCmRegisterSapComplete@12
-;NdisCoAssignInstanceName
-NdisCoCreateVc@16
-NdisCoDeleteVc@4
-;NdisCoGetTapiCallId
-NdisCoRequest@20
-NdisCoRequestComplete@20
-NdisCoSendPackets@12
-;NdisCompareAnsiString DATA
-;NdisCompareUnicodeString DATA
-NdisCompleteBindAdapter@12
-;NdisCompleteDmaTransfer
-NdisCompletePnPEvent@12
-NdisCompleteUnbindAdapter@8
-;NdisConvertStringToAtmAddress
-NdisCopyBuffer@24
-NdisCopyFromPacketToPacket@24
-;NdisCopyFromPacketToPacketSafe
-;NdisCreateBlockPool
-NdisDeregisterProtocol@8
-;NdisDestroyBlockPool
-;NdisDprAcquireSpinLock
-NdisDprAllocatePacket@12
-NdisDprAllocatePacketNonInterlocked@12
-NdisDprFreePacket@4
-NdisDprFreePacketNonInterlocked@4
-;NdisDprReleaseSpinLock
-;NdisEqualString DATA
-NdisFreeBuffer@4
-NdisFreeBufferPool@4
-NdisFreeMemory@12
-NdisFreePacket@4
-NdisFreePacketPool@4
-;NdisFreeSpinLock
-;NdisFreeToBlockPool
-;NdisGeneratePartialCancelId
-NdisGetBufferPhysicalArraySize@8
-NdisGetCurrentProcessorCounts@12
-NdisGetCurrentProcessorCpuUsage@4
-;NdisGetCurrentSystemTime
-NdisGetDriverHandle@8
-NdisGetFirstBufferFromPacket@20
-;NdisGetFirstBufferFromPacketSafe
-;NdisGetPacketCancelId
-;NdisGetPoolFromPacket
-NdisGetReceivedPacket@8
-;NdisGetRoutineAddress
-;NdisGetSharedDataAlignment
-NdisGetSystemUpTime@4
-;NdisGetVersion
-NdisIMAssociateMiniport@8
-NdisIMCancelInitializeDeviceInstance@8
-NdisIMCopySendCompletePerPacketInfo@8
-NdisIMCopySendPerPacketInfo@8
-NdisIMDeInitializeDeviceInstance@4
-NdisIMDeregisterLayeredMiniport@4
-NdisIMGetBindingContext@4
-;NdisIMGetCurrentPacketStack
-NdisIMGetDeviceContext@4
-;NdisIMInitializeDeviceInstance
-NdisIMInitializeDeviceInstanceEx@12
-;NdisIMNotifyPnPEvent
-;NdisIMQueueMiniportCallback
-NdisIMRegisterLayeredMiniport@16
-;NdisIMRevertBack
-;NdisIMSwitchToMiniport
-;NdisImmediateReadPciSlotInformation
-;NdisImmediateReadPortUchar
-;NdisImmediateReadPortUlong
-;NdisImmediateReadPortUshort
-NdisImmediateReadSharedMemory@16
-;NdisImmediateWritePciSlotInformation
-;NdisImmediateWritePortUchar
-;NdisImmediateWritePortUlong
-;NdisImmediateWritePortUshort
-NdisImmediateWriteSharedMemory@16
-NdisInitAnsiString@8
-NdisInitUnicodeString@8
-;NdisInitializeEvent
-NdisInitializeReadWriteLock@4
-;NdisInitializeString
-;NdisInitializeTimer
-NdisInitializeWrapper@16
-;NdisInterlockedAddLargeInterger DATA
-;NdisInterlockedAddUlong
-;NdisInterlockedDecrement
-;NdisInterlockedIncrement
-;NdisInterlockedInsertHeadList
-;NdisInterlockedInsertTailList
-;NdisInterlockedPopEntryList
-;NdisInterlockedPushEntryList
-;NdisInterlockedRemoveHeadList
-NdisMAllocateMapRegisters@20
-NdisMAllocateSharedMemory@20
-NdisMAllocateSharedMemoryAsync@16
-NdisMCancelTimer@8
-NdisMCloseLog@4
-NdisMCmActivateVc@8
-NdisMCmCreateVc@16
-NdisMCmDeactivateVc@4
-NdisMCmDeleteVc@4
-NdisMCmRegisterAddressFamily@16
-NdisMCmRequest@16
-NdisMCoActivateVcComplete@12
-NdisMCoDeactivateVcComplete@8
-NdisMCoIndicateReceivePacket@12
-NdisMCoIndicateStatus@20
-NdisMCoReceiveComplete@4
-NdisMCoRequestComplete@12
-NdisMCoSendComplete@12
-;NdisMCompleteBufferPhysicalMapping
-NdisMCreateLog@12
-NdisMDeregisterAdapterShutdownHandler@4
-NdisMDeregisterDevice@4
-;NdisMDeregisterDmaChannel
-NdisMDeregisterInterrupt@4
-NdisMDeregisterIoPortRange@16
-NdisMFlushLog@4
-NdisMFreeMapRegisters@4
-NdisMFreeSharedMemory@24
-NdisMGetDeviceProperty@24
-;NdisMGetDmaAlignment
-;NdisMIndicateStatus
-;NdisMIndicateStatusComplete
-NdisMInitializeScatterGatherDma@12
-NdisMInitializeTimer@16
-NdisMMapIoSpace@20
-;NdisMPciAssignResources
-NdisMPromoteMiniport@4
-NdisMQueryAdapterInstanceName@8
-NdisMQueryAdapterResources@16
-;NdisMQueryInformationComplete
-;NdisMReadDmaCounter
-NdisMRegisterAdapterShutdownHandler@12
-NdisMRegisterDevice@24
-;NdisMRegisterDmaChannel
-NdisMRegisterInterrupt@28
-NdisMRegisterIoPortRange@16
-NdisMRegisterMiniport@12
-NdisMRegisterUnloadHandler@8
-NdisMRemoveMiniport@4
-;NdisMResetComplete
-;NdisMSendComplete
-;NdisMSendResourcesAvailable
-;NdisMSetAttributes
-NdisMSetAttributesEx@20
-;NdisMSetInformationComplete
-NdisMSetMiniportSecondary@8
-NdisMSetPeriodicTimer@8
-;NdisMSetTimer
-NdisMSleep@4
-;NdisMStartBufferPhysicalMapping
-NdisMSynchronizeWithInterrupt@12
-;NdisMTransferDataComplete
-NdisMUnmapIoSpace@12
-NdisMWanIndicateReceive@20
-NdisMWanIndicateReceiveComplete@4
-NdisMWanSendComplete@12
-NdisMWriteLogData@12
-;NdisMapFile
-;NdisMatchPdoWithPacket
-NdisOpenAdapter@44
-NdisOpenConfiguration@12
-NdisOpenConfigurationKeyByIndex@20
-NdisOpenConfigurationKeyByName@16
-;NdisOpenFile
-NdisOpenProtocolConfiguration@12
-;NdisOverrideBusNumber
-NdisPacketPoolUsage@4
-;NdisPacketSize
-NdisQueryAdapterInstanceName@8
-;NdisQueryBindInstanceName
-NdisQueryBuffer@12
-NdisQueryBufferOffset@12
-NdisQueryBufferSafe@16
-;NdisQueryMapRegisterCount
-;NdisQueryPendingIOCount
-;NdisReEnumerateProtocolBindings
-NdisReadConfiguration@20
-NdisReadEisaSlotInformation@16
-NdisReadEisaSlotInformationEx@20
-;NdisReadMcaPosInformation
-NdisReadNetworkAddress@16
-NdisReadPciSlotInformation@20
-NdisReadPcmciaAttributeMemory@16
-NdisRegisterProtocol@16
-;NdisRegisterTdiCallBack
-NdisReleaseReadWriteLock@8
-;NdisReleaseSpinLock
-NdisRequest@12
-NdisReset@8
-;NdisResetEvent
-NdisReturnPackets@8
-;NdisScheduleWorkItem
-NdisSend@12
-NdisSendPackets@12
-;NdisSetEvent
-;NdisSetPacketCancelId
-NdisSetPacketPoolProtocolId@8
-;NdisSetPacketStatus
-;NdisSetProtocolFilter
-;NdisSetTimer
-;NdisSetTimerEx
-NdisSetupDmaTransfer@24
-;NdisSystemProcessorCount
-NdisTerminateWrapper@8
-NdisTransferData@28
-NdisUnchainBufferAtBack@8
-NdisUnchainBufferAtFront@8
-NdisUnicodeStringToAnsiString@8
-;NdisUnmapFile
-NdisUpcaseUnicodeString@8
-NdisUpdateSharedMemory@20
-;NdisWaitEvent
-NdisWriteConfiguration@16
-NdisWriteErrorLogEntry
-NdisWriteEventLogEntry@28
-NdisWritePciSlotInformation@20
-NdisWritePcmciaAttributeMemory@16
-;TrFilterDprIndicateReceive
-;TrFilterDprIndicateReceiveComplete
diff --git a/winsup/w32api/lib/ddk/newdev.def b/winsup/w32api/lib/ddk/newdev.def
deleted file mode 100644
index 96a5e3a..0000000
--- a/winsup/w32api/lib/ddk/newdev.def
+++ /dev/null
@@ -1,6 +0,0 @@
-LIBRARY newdev.dll
-EXPORTS
-UpdateDriverForPlugAndPlayDevicesA
-UpdateDriverForPlugAndPlayDevicesW
-UpdateDriverForPlugAndPlayDevicesA@20=UpdateDriverForPlugAndPlayDevicesA
-UpdateDriverForPlugAndPlayDevicesW@20=UpdateDriverForPlugAndPlayDevicesW
diff --git a/winsup/w32api/lib/ddk/ntoskrnl.def b/winsup/w32api/lib/ddk/ntoskrnl.def
deleted file mode 100644
index 9ba90b0..0000000
--- a/winsup/w32api/lib/ddk/ntoskrnl.def
+++ /dev/null
@@ -1,1460 +0,0 @@
-LIBRARY ntoskrnl.exe
-EXPORTS
-;CcCanIWrite
-;CcCopyRead
-;CcCopyWrite
-;CcDeferWrite
-;CcFastCopyRead
-;CcFastCopyWrite
-;CcFastMdlReadWait
-;CcFastReadNotPossible
-;CcFastReadWait
-;CcFlushCache
-;CcGetDirtyPages
-;CcGetFileObjectFromBcb
-;CcGetFileObjectFromSectionPtrs
-;CcGetFlushedValidData
-;CcGetLsnForFileObject
-;CcInitializeCacheMap
-;CcIsThereDirtyData
-;CcMapData
-;CcMdlRead
-;CcMdlReadComplete
-;CcMdlWriteAbort
-;CcMdlWriteComplete
-;CcPinMappedData
-;CcPinRead
-;CcPrepareMdlWrite
-;CcPreparePinWrite
-;CcPurgeCacheSection
-;CcRemapBcb
-;CcRepinBcb
-;CcScheduleReadAhead
-;CcSetAdditionalCacheAttributes
-;CcSetBcbOwnerPointer
-;CcSetDirtyPageThreshold
-;CcSetDirtyPinnedData
-;CcSetFileSizes
-;CcSetLogHandleForFile
-;CcSetReadAheadGranularity
-;CcUninitializeCacheMap
-;CcUnpinData
-;CcUnpinDataForThread
-;CcUnpinRepinnedBcb
-;CcWaitForCurrentLazyWriterActivity
-;CcZeroData
-CmRegisterCallback@12
-CmUnRegisterCallback@4
-DbgBreakPoint@0
-DbgBreakPointWithStatus@4
-;DbgLoadImageSymbols
-DbgPrint
-DbgPrintEx
-DbgPrintReturnControlC
-;DbgPrompt
-DbgQueryDebugFilterState@8
-DbgSetDebugFilterState@12
-@ExAcquireFastMutexUnsafe@4
-ExAcquireResourceExclusiveLite@8
-ExAcquireResourceSharedLite@8
-;ExAcquireRundownProtection
-ExAcquireSharedStarveExclusive@8
-ExAcquireSharedWaitForExclusive@8
-ExAllocateFromPagedLookasideList@4
-ExAllocatePool@8
-ExAllocatePoolWithQuota@8
-ExAllocatePoolWithQuotaTag@12
-ExAllocatePoolWithTag@12
-ExAllocatePoolWithTagPriority@16
-ExConvertExclusiveToSharedLite@4
-ExCreateCallback@16
-ExDeleteNPagedLookasideList@4
-ExDeletePagedLookasideList@4
-ExDeleteResourceLite@4
-ExDesktopObjectType DATA
-;ExDisableResourceBoostLite
-;ExEnumHandleTable
-ExEventObjectType DATA
-ExExtendZone@12
-@Exfi386InterlockedDecrementLong@4
-@Exfi386InterlockedExchangeUlong@8
-@Exfi386InterlockedIncrementLong@4
-@ExfInterlockedAddUlong@12
-@ExfInterlockedInsertHeadList@12
-@ExfInterlockedInsertTailList@12
-@ExfInterlockedPopEntryList@8
-@ExfInterlockedPushEntryList@12
-@ExfInterlockedRemoveHeadList@8
-ExFreePool@4
-ExFreePoolWithTag@8
-ExFreeToPagedLookasideList@8
-;ExGetCurrentProcessorCounts
-;ExGetCurrentProcessorCpuUsage
-ExGetExclusiveWaiterCount@4
-ExGetPreviousMode@0
-ExGetSharedWaiterCount@4
-Exi386InterlockedDecrementLong@4
-Exi386InterlockedExchangeUlong@8
-Exi386InterlockedIncrementLong@4
-ExInitializeNPagedLookasideList@28
-ExInitializePagedLookasideList@28
-ExInitializeResourceLite@4
-;ExInitializeRundownProtection
-ExInitializeZone@16
-ExInterlockedAddLargeInteger@12
-@ExInterlockedAddLargeStatistic@8
-ExInterlockedAddUlong@12
-@ExInterlockedCompareExchange64@16
-ExInterlockedDecrementLong@8
-ExInterlockedExchangeUlong@12
-ExInterlockedExtendZone@16
-@ExInterlockedFlushSList@4
-@ExInterlockedIncrementLong@8
-ExInterlockedInsertHeadList@12
-ExInterlockedInsertTailList@12
-ExInterlockedPopEntryList@8
-@ExInterlockedPopEntrySList@8
-ExInterlockedPushEntryList@12
-@ExInterlockedPushEntrySList@12
-ExInterlockedRemoveHeadList@8
-ExIsProcessorFeaturePresent@4
-ExIsResourceAcquiredExclusiveLite@4
-ExIsResourceAcquiredSharedLite@4
-ExLocalTimeToSystemTime@8
-ExNotifyCallback@12
-;ExQueryPoolBlockSize
-ExQueueWorkItem@8
-ExRaiseAccessViolation@0
-ExRaiseDatatypeMisalignment@0
-;ExRaiseException
-;ExRaiseHardError
-ExRaiseStatus@4
-;ExReInitializeRundownProtection
-ExRegisterCallback@12
-ExReinitializeResourceLite@4
-@ExReleaseFastMutexUnsafe@4
-ExReleaseResourceForThreadLite@8
-@ExReleaseResourceLite@4
-;ExReleaseRundownProtection
-;ExRundownCompleted
-ExSemaphoreObjectType DATA
-ExSetResourceOwnerPointer@8
-ExSetTimerResolution@8
-;ExSystemExceptionFilter
-ExSystemTimeToLocalTime@8
-ExUnregisterCallback@4
-ExUuidCreate@4
-ExVerifySuite@4
-;ExWaitForRundownProtectionRelease
-ExWindowStationObjectType DATA
-;FsRtlAcquireFileExclusive
-;FsRtlAddLargeMcbEntry
-;FsRtlAddMcbEntry
-;FsRtlAddToTunnelCache
-;FsRtlAllocateFileLock
-;FsRtlAllocatePool
-;FsRtlAllocatePoolWithQuota
-;FsRtlAllocatePoolWithQuotaTag
-;FsRtlAllocatePoolWithTag
-;FsRtlAllocateResource
-;FsRtlAreNamesEqual
-;FsRtlBalanceReads
-;FsRtlCheckLockForReadAccess
-;FsRtlCheckLockForWriteAccess
-;FsRtlCheckOplock
-;FsRtlCopyRead
-;FsRtlCopyWrite
-;FsRtlCurrentBatchOplock
-;FsRtlDeleteKeyFromTunnelCache
-;FsRtlDeleteTunnelCache
-;FsRtlDeregisterUncProvider
-;FsRtlDissectDbcs
-;FsRtlDissectName
-;FsRtlDoesDbcsContainWildCards
-;FsRtlDoesNameContainWildCards
-;FsRtlFastCheckLockForRead
-;FsRtlFastCheckLockForWrite
-;FsRtlFastUnlockAll
-;FsRtlFastUnlockAllByKey
-;FsRtlFastUnlockSingle
-;FsRtlFindInTunnelCache
-;FsRtlFreeFileLock
-;FsRtlGetFileSize
-;FsRtlGetNextFileLock
-;FsRtlGetNextLargeMcbEntry
-;FsRtlGetNextMcbEntry
-;FsRtlIncrementCcFastReadNoWait
-;FsRtlIncrementCcFastReadNotPossible
-;FsRtlIncrementCcFastReadResourceMiss
-;FsRtlIncrementCcFastReadWait
-;FsRtlInitializeFileLock
-;FsRtlInitializeLargeMcb
-;FsRtlInitializeMcb
-;FsRtlInitializeOplock
-;FsRtlInitializeTunnelCache
-;FsRtlInsertPerFileObjectContext
-;FsRtlInsertPerStreamContext
-;FsRtlIsDbcsInExpression
-;FsRtlIsFatDbcsLegal
-;FsRtlIsHpfsDbcsLegal
-;FsRtlIsNameInExpression
-;FsRtlIsNtstatusExpected
-;FsRtlIsPagingFile
-FsRtlIsTotalDeviceFailure@4
-;FsRtlLegalAnsiCharacterArray
-;FsRtlLookupLargeMcbEntry
-;FsRtlLookupLastLargeMcbEntry
-;FsRtlLookupLastLargeMcbEntryAndIndex
-;FsRtlLookupLastMcbEntry
-;FsRtlLookupMcbEntry
-;FsRtlLookupPerFileObjectContext
-;FsRtlLookupPerStreamContextInternal
-;FsRtlMdlRead
-;FsRtlMdlReadComplete
-;FsRtlMdlReadCompleteDev
-;FsRtlMdlReadDev
-;FsRtlMdlWriteComplete
-;FsRtlMdlWriteCompleteDev
-;FsRtlNormalizeNtstatus
-;FsRtlNotifyChangeDirectory
-;FsRtlNotifyCleanup
-;FsRtlNotifyFilterChangeDirectory
-;FsRtlNotifyFilterReportChange
-;FsRtlNotifyFullChangeDirectory
-;FsRtlNotifyFullReportChange
-;FsRtlNotifyInitializeSync
-;FsRtlNotifyReportChange
-;FsRtlNotifyUninitializeSync
-;FsRtlNotifyVolumeEvent
-;FsRtlNumberOfRunsInLargeMcb
-;FsRtlNumberOfRunsInMcb
-;FsRtlOplockFsctrl
-;FsRtlOplockIsFastIoPossible
-;FsRtlPostPagingFileStackOverflow
-;FsRtlPostStackOverflow
-;FsRtlPrepareMdlWrite
-;FsRtlPrepareMdlWriteDev
-;FsRtlPrivateLock
-;FsRtlProcessFileLock
-;FsRtlRegisterFileSystemFilterCallbacks
-;FsRtlRegisterUncProvider
-;FsRtlReleaseFile
-;FsRtlRemoveLargeMcbEntry
-;FsRtlRemoveMcbEntry
-;FsRtlRemovePerFileObjectContext
-;FsRtlRemovePerStreamContext
-;FsRtlResetLargeMcb
-;FsRtlSplitLargeMcb
-;FsRtlSyncVolumes
-;FsRtlTeardownPerStreamContexts
-;FsRtlTruncateLargeMcb
-;FsRtlTruncateMcb
-;FsRtlUninitializeFileLock
-;FsRtlUninitializeLargeMcb
-;FsRtlUninitializeMcb
-;FsRtlUninitializeOplock
-;HalDispatchTable DATA
-@HalExamineMBR@16
-;HalPrivateDispatchTable DATA
-;HeadlessDispatch
-;InbvAcquireDisplayOwnership
-;InbvCheckDisplayOwnership
-;InbvDisplayString
-;InbvEnableBootDriver
-;InbvEnableDisplayString
-;InbvInstallDisplayStringFilter
-;InbvIsBootDriverInstalled
-;InbvNotifyDisplayOwnershipLost
-;InbvResetDisplay
-;InbvSetScrollRegion
-;InbvSetTextColor
-;InbvSolidColorFill
-;InitSafeBootMode DATA
-@InterlockedCompareExchange@12
-@InterlockedDecrement@4
-@InterlockedExchange@8
-@InterlockedExchangeAdd@8
-@InterlockedIncrement@4
-@InterlockedPopEntrySList@4
-@InterlockedPushEntrySList@8
-IoAcquireCancelSpinLock@4
-IoAcquireRemoveLockEx@20
-;IoAcquireVpbSpinLock
-IoAdapterObjectType DATA
-IoAllocateAdapterChannel@20
-IoAllocateController@16
-IoAllocateDriverObjectExtension@16
-IoAllocateErrorLogEntry@8
-IoAllocateIrp@8
-IoAllocateMdl@20
-IoAllocateWorkItem@4
-;IoAssignDriveLetters
-IoAssignResources@24
-IoAttachDevice@12
-IoAttachDeviceByPointer@8
-IoAttachDeviceToDeviceStack@8
-;IoAttachDeviceToDeviceStackSafe
-IoBuildAsynchronousFsdRequest@24
-IoBuildDeviceIoControlRequest@36
-IoBuildPartialMdl@16
-IoBuildSynchronousFsdRequest@28
-;IoCallDriver
-IoCancelFileOpen@8
-IoCancelIrp@4
-;IoCheckDesiredAccess
-;IoCheckEaBufferValidity
-;IoCheckFunctionAccess
-;IoCheckQuerySetFileInformation
-;IoCheckQuerySetVolumeInformation
-;IoCheckQuotaBufferValidity
-IoCheckShareAccess@20
-;IoCompleteRequest
-IoConnectInterrupt@44
-IoCreateController@4
-IoCreateDevice@28
-IoCreateDisk@8
-;IoCreateDriver
-IoCreateFile@56
-;IoCreateFileSpecifyDeviceObjectHint
-IoCreateNotificationEvent@8
-;IoCreateStreamFileObject
-;IoCreateStreamFileObjectEx
-;IoCreateStreamFileObjectLite
-IoCreateSymbolicLink@8
-IoCreateSynchronizationEvent@8
-IoCreateUnprotectedSymbolicLink@8
-IoCsqInitialize@28
-IoCsqInsertIrp@12
-IoCsqRemoveIrp@8
-IoCsqRemoveNextIrp@8
-IoDeleteController@4
-IoDeleteDevice@4
-;IoDeleteDriver
-IoDeleteSymbolicLink@4
-IoDetachDevice@4
-IoDeviceHandlerObjectSize DATA
-IoDeviceHandlerObjectType DATA
-IoDeviceObjectType DATA
-IoDisconnectInterrupt@4
-IoDriverObjectType DATA
-;IoEnqueueIrp
-;IoEnumerateDeviceObjectList
-;IoFastQueryNetworkAttributes
-IoFileObjectType DATA
-;IoForwardAndCatchIrp
-IoForwardIrpSynchronously@8
-IoFreeController@4
-IoFreeErrorLogEntry@4
-IoFreeIrp@4
-IoFreeMdl@4
-IoFreeWorkItem@4
-IoGetAttachedDevice@4
-IoGetAttachedDeviceReference@4
-;IoGetBaseFileSystemDeviceObject
-IoGetBootDiskInformation@8
-IoGetConfigurationInformation@0
-IoGetCurrentProcess@0
-;IoGetDeviceAttachmentBaseRef
-IoGetDeviceInterfaceAlias@12
-IoGetDeviceInterfaces@16
-IoGetDeviceObjectPointer@16
-IoGetDeviceProperty@20
-IoGetDeviceToVerify@4
-;IoGetDiskDeviceObject
-IoGetDmaAdapter@12
-IoGetDriverObjectExtension@8
-IoGetFileObjectGenericMapping@0
-IoGetInitialStack@0
-;IoGetLowerDeviceObject
-IoGetRelatedDeviceObject@4
-;IoGetRequestorProcess
-;IoGetRequestorProcessId
-;IoGetRequestorSessionId
-IoGetStackLimits@8
-;IoGetTopLevelIrp
-IoInitializeIrp@12
-IoInitializeRemoveLockEx@20
-IoInitializeTimer@12
-IoInvalidateDeviceRelations@8
-IoInvalidateDeviceState@4
-;IoIsFileOriginRemote
-;IoIsOperationSynchronous
-;IoIsSystemThread
-;IoIsValidNameGraftingBuffer
-IoIsWdmVersionAvailable@8
-IoMakeAssociatedIrp@8
-IoOpenDeviceInterfaceRegistryKey@12
-IoOpenDeviceRegistryKey@16
-;IoPageRead
-;IoPnPDeliverServicePowerNotification
-IoQueryDeviceDescription@32
-;IoQueryFileDosDeviceName
-;IoQueryFileInformation
-;IoQueryVolumeInformation
-;IoQueueThreadIrp
-IoQueueWorkItem@16
-IoRaiseHardError@12
-IoRaiseInformationalHardError@12
-IoReadDiskSignature@12
-;IoReadOperationCount DATA
-@IoReadPartitionTable@16
-IoReadPartitionTableEx@8
-;IoReadTransferCount DATA
-IoRegisterBootDriverReinitialization@12
-IoRegisterDeviceInterface@16
-IoRegisterDriverReinitialization@12
-;IoRegisterFileSystem
-;IoRegisterFsRegistrationChange
-;IoRegisterLastChanceShutdownNotification
-IoRegisterPlugPlayNotification@28
-IoRegisterShutdownNotification@4
-IoReleaseCancelSpinLock@4
-IoReleaseRemoveLockAndWaitEx@12
-IoReleaseRemoveLockEx@12
-;IoReleaseVpbSpinLock
-IoRemoveShareAccess@8
-IoReportDetectedDevice@32
-;IoReportHalResourceUsage
-IoReportResourceForDetection@28
-IoReportResourceUsage@36
-IoReportTargetDeviceChange@8
-IoReportTargetDeviceChangeAsynchronous@16
-IoRequestDeviceEject@4
-IoReuseIrp@8
-IoSetCompletionRoutineEx@28
-IoSetDeviceInterfaceState@8
-;IoSetDeviceToVerify
-;IoSetFileOrigin
-IoSetHardErrorOrVerifyDevice@8
-;IoSetInformation
-;IoSetIoCompletion
-@IoSetPartitionInformation@16
-IoSetPartitionInformationEx@12
-IoSetShareAccess@16
-IoSetStartIoAttributes@12
-IoSetSystemPartition@4
-IoSetThreadHardErrorMode@4
-;IoSetTopLevelIrp
-IoStartNextPacket@8
-IoStartNextPacketByKey@12
-IoStartPacket@16
-IoStartTimer@4
-;IoStatisticsLock DATA
-IoStopTimer@4
-;IoSynchronousInvalidateDeviceRelations
-;IoSynchronousPageWrite
-;IoThreadToProcess
-;IoUnregisterFileSystem
-;IoUnregisterFsRegistrationChange
-IoUnregisterPlugPlayNotification@4
-IoUnregisterShutdownNotification@4
-IoUpdateShareAccess@8
-IoVerifyPartitionTable@8
-;IoVerifyVolume
-IoVolumeDeviceToDosName@8
-IoWMIAllocateInstanceIds@12
-IoWMIDeviceObjectToInstanceName@12
-IoWMIExecuteMethod@24
-IoWMIHandleToInstanceName@12
-IoWMIOpenBlock@12
-IoWMIQueryAllData@12
-IoWMIQueryAllDataMultiple@16
-IoWMIQuerySingleInstance@16
-IoWMIQuerySingleInstanceMultiple@20
-IoWMIRegistrationControl@8
-IoWMISetNotificationCallback@12
-IoWMISetSingleInstance@20
-IoWMISetSingleItem@24
-IoWMISuggestInstanceName@16
-IoWMIWriteEvent@4
-IoWriteErrorLogEntry@4
-;IoWriteOperationCount DATA
-@IoWritePartitionTable@20
-IoWritePartitionTableEx@8
-;IoWriteTransferCount DATA
-@IofCallDriver@8
-@IofCompleteRequest@8
-;KdDebuggerEnabled DATA
-;KdDebuggerNotPresent DATA
-KdDisableDebugger@0
-KdEnableDebugger@0
-;KdEnteredDebugger DATA
-;KdPollBreakIn
-;KdPowerTransition
-;Ke386CallBios
-Ke386IoSetAccessProcess@8
-Ke386QueryIoAccessMap@8
-Ke386SetIoAccessMap@8
-@KeAcquireInStackQueuedSpinLockAtDpcLevel@8
-KeAcquireInterruptSpinLock@4
-;KeAcquireSpinLockAtDpcLevel
-KeAddSystemServiceTable@20
-KeAreApcsDisabled@0
-KeAttachProcess@4
-KeBugCheck@4
-KeBugCheckEx@20
-KeCancelTimer@4
-KeClearEvent@4
-;KeConnectInterrupt
-;KeDcacheFlushCount DATA
-KeDelayExecutionThread@12
-KeDeregisterBugCheckCallback@4
-KeDetachProcess@0
-;KeDisconnectInterrupt
-KeEnterCriticalRegion@0
-;KeEnterKernelDebugger
-;KeFindConfigurationEntry
-;KeFindConfigurationNextEntry
-;KeFlushEntireTb
-KeFlushQueuedDpcs@0
-KeGetCurrentThread@0
-KeGetPreviousMode@0
-KeGetRecommendedSharedDataAlignment@0
-;KeI386AbiosCall
-;KeI386AllocateGdtSelectors
-;KeI386Call16BitCStyleFunction
-;KeI386Call16BitFunction
-;KeI386FlatToGdtSelector
-;KeI386GetLid
-;KeI386MachineType DATA
-;KeI386ReleaseGdtSelectors
-;KeI386ReleaseLid
-;KeI386SetGdtSelector
-;KeIcacheFlushCount DATA
-KeInitializeApc@32
-KeInitializeDeviceQueue@4
-KeInitializeDpc@12
-KeInitializeEvent@12
-;KeInitializeInterrupt
-;KeInitializeMutant
-KeInitializeMutex@8
-;KeInitializeQueue
-KeInitializeSemaphore@12
-KeInitializeSpinLock@4
-KeInitializeTimer@4
-KeInitializeTimerEx@8
-KeInsertByKeyDeviceQueue@12
-KeInsertDeviceQueue@8
-;KeInsertHeadQueue
-;KeInsertQueue
-;KeInsertQueueApc
-KeInsertQueueDpc@12
-;KeIsAttachedProcess
-;KeIsExecutingDpc
-KeLeaveCriticalRegion@0
-;KeLoaderBlock DATA
-KeNumberProcessors DATA
-;KeProfileInterrupt
-;KeProfileInterruptWithSource
-KePulseEvent@12
-;KeQueryActiveProcessors
-KeQueryInterruptTime@0
-KeQueryPriorityThread@4
-;KeQueryRuntimeThread
-KeQuerySystemTime@4
-KeQueryTickCount@4
-KeQueryTimeIncrement@0
-;KeRaiseUserException
-KeReadStateEvent@4
-;KeReadStateMutant
-KeReadStateMutex@4
-;KeReadStateQueue
-KeReadStateSemaphore@4
-KeReadStateTimer@4
-KeRegisterBugCheckCallback@20
-KeReleaseInStackQueuedSpinLockFromDpcLevel@4
-KeReleaseInterruptSpinLock@8
-;KeReleaseMutant
-KeReleaseMutex@8
-KeReleaseSemaphore@16
-;KeReleaseSpinLockFromDpcLevel
-KeRemoveByKeyDeviceQueue@8
-;KeRemoveByKeyDeviceQueueIfBusy
-KeRemoveDeviceQueue@4
-KeRemoveEntryDeviceQueue@8
-;KeRemoveQueue
-KeRemoveQueueDpc@4
-;KeRemoveSystemServiceTable
-KeResetEvent@4
-KeRestoreFloatingPointState@4
-;KeRevertToUserAffinityThread
-;KeRundownQueue
-KeSaveFloatingPointState@4
-;KeSaveStateForHibernate
-;KeServiceDescriptorTable DATA
-;KeSetAffinityThread
-KeSetBasePriorityThread@8
-;KeSetDmaIoCoherency
-KeSetEvent@12
-;KeSetEventBoostPriority
-;KeSetIdealProcessorThread
-KeSetImportanceDpc@8
-;KeSetKernelStackSwapEnable
-KeSetPriorityThread@8
-;KeSetProfileIrql
-;KeSetSystemAffinityThread
-KeSetTargetProcessorDpc@8
-;KeSetTimeIncrement
-@KeSetTimeUpdateNotifyRoutine@4
-KeSetTimer@16
-KeSetTimerEx@20
-;KeStackAttachProcess
-KeSynchronizeExecution@12
-;KeTerminateThread
-;KeTickCount DATA
-;KeUnstackDetachProcess
-;KeUpdateRunTime
-;KeUpdateSystemTime
-;KeUserModeCallback
-KeWaitForMultipleObjects@32
-KeWaitForMutexObject@20
-KeWaitForSingleObject@20
-@KefAcquireSpinLockAtDpcLevel@4
-@KefReleaseSpinLockFromDpcLevel@4
-;Kei386EoiHelper
-;KiAcquireSpinLock
-;KiBugCheckData DATA
-;KiCoprocessorError
-;KiDeliverApc
-;KiDispatchInterrupt
-;KiEnableTimerWatchdog DATA
-;KiIpiServiceRoutine
-;KiReleaseSpinLock
-;KiUnexpectedInterrupt
-;Kii386SpinOnSpinLock
-;LdrAccessResource
-;LdrEnumResources
-;LdrFindResourceDirectory_U
-;LdrFindResource_U
-LpcPortObjectType DATA
-;LpcRequestPort
-;LpcRequestWaitReplyPort
-;LsaCallAuthenticationPackage
-;LsaDeregisterLogonProcess
-;LsaFreeReturnBuffer
-;LsaLogonUser
-;LsaLookupAuthenticationPackage
-;LsaRegisterLogonProcess
-;Mm64BitPhysicalAddress DATA
-;MmAddPhysicalMemory
-;MmAddVerifierThunks
-;MmAdjustWorkingSetSize
-MmAdvanceMdl@8
-MmAllocateContiguousMemory@12
-MmAllocateContiguousMemorySpecifyCache@20
-MmAllocateMappingAddress@8
-MmAllocateNonCachedMemory@4
-MmAllocatePagesForMdl@28
-MmBuildMdlForNonPagedPool@4
-;MmCanFileBeTruncated
-MmCreateMdl@12
-MmCreateSection@32
-;MmDisableModifiedWriteOfSection
-MmFlushImageSection@8
-;MmForceSectionClosed
-MmFreeContiguousMemory@4
-MmFreeContiguousMemorySpecifyCache@12
-MmFreeMappingAddress@8
-MmFreeNonCachedMemory@8
-MmFreePagesFromMdl@4
-MmGetPhysicalAddress@4
-MmGetPhysicalMemoryRanges@0
-MmGetSystemRoutineAddress@4
-MmGetVirtualForPhysical@4
-;MmGrowKernelStack
-;MmHighestUserAddress DATA
-MmIsAddressValid@4
-MmIsDriverVerifying@4
-MmIsNonPagedSystemAddressValid@4
-;MmIsRecursiveIoFault
-MmIsThisAnNtAsSystem@0
-MmIsVerifierEnabled@4
-MmLockPagableDataSection@4
-MmLockPagableImageSection@4
-MmLockPagableSectionByHandle@4
-MmMapIoSpace@16
-MmMapLockedPages@8
-MmMapLockedPagesSpecifyCache@24
-MmMapLockedPagesWithReservedMapping@16
-;MmMapMemoryDumpMdl
-MmMapUserAddressesToPage@12
-MmMapVideoDisplay@12
-MmMapViewInSessionSpace@12
-MmMapViewInSystemSpace@12
-;MmMapViewOfSection
-MmMarkPhysicalMemoryAsBad@8
-MmMarkPhysicalMemoryAsGood@8
-MmPageEntireDriver@4
-;MmPrefetchPages
-MmProbeAndLockPages@12
-MmProbeAndLockProcessPages@16
-;MmProbeAndLockSelectedPages
-MmProtectMdlSystemAddress@8
-MmQuerySystemSize@0
-MmRemovePhysicalMemory@8
-MmResetDriverPaging@4
-MmSectionObjectType DATA
-MmSecureVirtualMemory@12
-;MmSetAddressRangeModified
-;MmSetBankedSection
-MmSizeOfMdl@8
-;MmSystemRangeStart DATA
-;MmTrimAllSystemPagableMemory
-MmUnlockPagableImageSection@4
-MmUnlockPages@4
-MmUnmapIoSpace@8
-MmUnmapLockedPages@8
-MmUnmapReservedMapping@12
-MmUnmapVideoDisplay@8
-MmUnmapViewInSessionSpace@4
-MmUnmapViewInSystemSpace@4
-;MmUnmapViewOfSection
-MmUnsecureVirtualMemory@4
-;MmUserProbeAddress DATA
-;NlsAnsiCodePage DATA
-;NlsLeadByteInfo
-;NlsMbCodePageTag DATA
-;NlsMbOemCodePageTag DATA
-;NlsOemCodePage DATA
-;NlsOemLeadByteInfo
-NtAddAtom@12
-NtAdjustPrivilegesToken@24
-NtAllocateLocallyUniqueId@4
-NtAllocateUuids@16
-NtAllocateVirtualMemory@24
-;NtBuildNumber DATA
-NtClose@4
-NtConnectPort@32
-NtCreateEvent@20
-;NtCreateFile
-NtCreateSection@28
-NtDeleteAtom@4
-NtDeleteFile@4
-NtDeviceIoControlFile@40
-NtDuplicateObject@28
-NtDuplicateToken@24
-NtFindAtom@12
-NtFreeVirtualMemory@16
-;NtFsControlFile
-;NtGlobalFlag DATA
-;NtLockFile
-;NtMakePermanentObject
-NtMapViewOfSection@40
-;NtNotifyChangeDirectoryFile
-NtOpenFile@24
-NtOpenProcess@16
-NtOpenProcessToken@12
-;NtOpenProcessTokenEx
-NtOpenThread@16
-NtOpenThreadToken@16
-;NtOpenThreadTokenEx
-;NtQueryDirectoryFile
-;NtQueryEaFile
-NtQueryInformationAtom@20
-;NtQueryInformationFile
-NtQueryInformationProcess@20
-NtQueryInformationThread@20
-NtQueryInformationToken@20
-;NtQueryQuotaInformationFile
-NtQuerySecurityObject@20
-NtQuerySystemInformation@16
-;NtQueryVolumeInformationFile
-NtReadFile@36
-NtRequestPort@8
-NtRequestWaitReplyPort@12
-;NtSetEaFile
-NtSetEvent@8
-;NtSetInformationFile
-NtSetInformationProcess@16
-NtSetInformationThread@16
-;NtSetQuotaInformationFile
-NtSetSecurityObject@12
-;NtSetVolumeInformationFile
-NtShutdownSystem@4
-;NtTraceEvent
-;NtUnlockFile
-NtVdmControl@8
-NtWaitForSingleObject@12
-NtWriteFile@36
-ObAssignSecurity@16
-;ObCheckCreateObjectAccess
-;ObCheckObjectAccess
-;ObCloseHandle
-ObCreateObject@36
-;ObCreateObjectType
-;ObDereferenceObject
-ObDereferenceSecurityDescriptor@8
-;ObFindHandleForObject
-ObGetObjectSecurity@12
-ObInsertObject@24
-ObLogSecurityDescriptor@12
-ObMakeTemporaryObject@4
-ObOpenObjectByName@28
-ObOpenObjectByPointer@28
-;ObQueryNameString
-ObQueryObjectAuditingByHandle@8
-ObReferenceObjectByHandle@24
-ObReferenceObjectByName@32
-ObReferenceObjectByPointer@16
-ObReferenceSecurityDescriptor@8
-ObReleaseObjectSecurity@8
-;ObSetHandleAttributes
-;ObSetSecurityDescriptorInfo
-;ObSetSecurityObjectByPointer
-@ObfDereferenceObject@4
-@ObfReferenceObject@4
-;PfxFindPrefix
-;PfxInitialize
-;PfxInsertPrefix
-;PfxRemovePrefix
-PoCallDriver@8
-;PoCancelDeviceNotify
-;PoQueueShutdownWorkItem
-PoRegisterDeviceForIdleDetection@16
-;PoRegisterDeviceNotify
-PoRegisterSystemState@8
-PoRequestPowerIrp@24
-PoRequestShutdownEvent@4
-;PoSetHiberRange
-PoSetPowerState@12
-PoSetSystemState@4
-;PoShutdownBugCheck
-PoStartNextPowerIrp@4
-PoUnregisterSystemState@4
-ProbeForRead@12
-ProbeForWrite@12
-;PsAssignImpersonationToken
-;PsChargePoolQuota
-;PsChargeProcessNonPagedPoolQuota
-;PsChargeProcessPagedPoolQuota
-;PsChargeProcessPoolQuota
-PsCreateSystemProcess@12
-PsCreateSystemThread@28
-;PsDereferenceImpersonationToken
-;PsDereferencePrimaryToken
-;PsDisableImpersonation
-;PsEstablishWin32Callouts
-;PsGetCurrentProcess
-PsGetCurrentProcessId@0
-;PsGetCurrentProcessSessionId
-;PsGetCurrentThread
-PsGetCurrentThreadId@0
-;PsGetCurrentThreadPreviousMode
-;PsGetCurrentThreadStackBase
-;PsGetCurrentThreadStackLimit
-;PsGetJobLock
-;PsGetJobSessionId
-;PsGetJobUIRestrictionsClass
-;PsGetProcessCreateTimeQuadPart
-;PsGetProcessDebugPort
-;PsGetProcessExitProcessCalled
-;PsGetProcessExitStatus
-;PsGetProcessExitTime
-;PsGetProcessId
-;PsGetProcessImageFileName
-;PsGetProcessInheritedFromUniqueProcessId
-;PsGetProcessJob
-;PsGetProcessPeb
-;PsGetProcessPriorityClass
-;PsGetProcessSectionBaseAddress
-;PsGetProcessSecurityPort
-;PsGetProcessSessionId
-;PsGetProcessWin32Process
-;PsGetProcessWin32WindowStation
-;PsGetThreadFreezeCount
-;PsGetThreadHardErrorsAreDisabled
-;PsGetThreadId
-;PsGetThreadProcess
-;PsGetThreadProcessId
-;PsGetThreadSessionId
-;PsGetThreadTeb
-;PsGetThreadWin32Thread
-PsGetVersion@16
-;PsImpersonateClient
-;PsInitialSystemProcess DATA
-;PsIsProcessBeingDebugged
-;PsIsSystemThread
-;PsIsThreadImpersonating
-;PsIsThreadTerminating
-;PsJobType DATA
-;PsLookupProcessByProcessId
-;PsLookupProcessThreadByCid
-;PsLookupThreadByThreadId
-;PsProcessType DATA
-;PsReferenceImpersonationToken
-;PsReferencePrimaryToken
-PsRemoveCreateThreadNotifyRoutine@4
-PsRemoveLoadImageNotifyRoutine@4
-;PsRestoreImpersonation
-;PsReturnPoolQuota
-;PsReturnProcessNonPagedPoolQuota
-;PsReturnProcessPagedPoolQuota
-;PsRevertThreadToSelf
-;PsRevertToSelf
-PsSetCreateProcessNotifyRoutine@8
-PsSetCreateThreadNotifyRoutine@4
-;PsSetJobUIRestrictionsClass
-;PsSetLegoNotifyRoutine
-PsSetLoadImageNotifyRoutine@4
-;PsSetProcessPriorityByClass
-;PsSetProcessPriorityClass
-;PsSetProcessSecurityPort
-;PsSetProcessWin32Process
-;PsSetProcessWindowStation
-;PsSetThreadHardErrorsAreDisabled
-;PsSetThreadWin32Thread
-PsTerminateSystemThread@4
-;PsThreadType DATA
-READ_REGISTER_BUFFER_UCHAR@12
-READ_REGISTER_BUFFER_ULONG@12
-READ_REGISTER_BUFFER_USHORT@12
-READ_REGISTER_UCHAR@4
-READ_REGISTER_ULONG@4
-READ_REGISTER_USHORT@4
-;RtlAbsoluteToSelfRelativeSD
-;RtlAddAccessAllowedAce
-;RtlAddAce
-;RtlAddAtomToAtomTable
-RtlAddRange@28
-;RtlAllocateHeap
-;RtlAnsiCharToUnicodeChar
-RtlAnsiStringToUnicodeSize@4
-RtlAnsiStringToUnicodeString@12
-;RtlAppendAsciizToString
-;RtlAppendStringToString
-RtlAppendUnicodeStringToString@8
-RtlAppendUnicodeToString@8
-;RtlAreAllAccessesGranted
-;RtlAreAnyAccessesGranted
-RtlAreBitsClear@12
-RtlAreBitsSet@12
-RtlAssert@16
-;RtlCaptureContext
-;RtlCaptureStackBackTrace
-RtlCharToInteger@12
-RtlCheckRegistryKey@8
-RtlClearAllBits@4
-RtlClearBit@8
-RtlClearBits@12
-RtlCompareMemory@12
-;RtlCompareMemoryUlong
-RtlCompareString@12
-RtlCompareUnicodeString@12
-;RtlCompressBuffer
-;RtlCompressChunks
-RtlConvertLongToLargeInteger@4
-;RtlConvertSidToUnicodeString
-RtlConvertUlongToLargeInteger@4
-;RtlCopyLuid
-RtlCopyRangeList@8
-;RtlCopySid
-RtlCopyString@8
-RtlCopyUnicodeString@8
-;RtlCreateAcl
-;RtlCreateAtomTable
-;RtlCreateHeap
-RtlCreateRegistryKey@8
-RtlCreateSecurityDescriptor@8
-;RtlCreateSystemVolumeInformationFolder
-;RtlCreateUnicodeString
-;RtlCustomCPToUnicodeN
-;RtlDecompressBuffer
-;RtlDecompressChunks
-;RtlDecompressFragment
-;RtlDelete
-;RtlDeleteAce
-;RtlDeleteAtomFromAtomTable
-;RtlDeleteElementGenericTable
-;RtlDeleteElementGenericTableAvl
-;RtlDeleteNoSplay
-RtlDeleteOwnersRanges@8
-RtlDeleteRange@16
-RtlDeleteRegistryValue@12
-;RtlDescribeChunk
-;RtlDestroyAtomTable
-;RtlDestroyHeap
-;RtlDowncaseUnicodeString
-;RtlEmptyAtomTable
-RtlEnlargedIntegerMultiply@8
-RtlEnlargedUnsignedDivide@12
-RtlEnlargedUnsignedMultiply@8
-;RtlEnumerateGenericTable
-;RtlEnumerateGenericTableAvl
-;RtlEnumerateGenericTableLikeADirectory
-;RtlEnumerateGenericTableWithoutSplaying
-;RtlEnumerateGenericTableWithoutSplayingAvl
-;RtlEqualLuid
-;RtlEqualSid
-RtlEqualString@12
-RtlEqualUnicodeString@12
-RtlExtendedIntegerMultiply@8
-RtlExtendedLargeIntegerDivide@12
-RtlExtendedMagicDivide@12
-;RtlFillMemory
-;RtlFillMemoryUlong
-RtlFindClearBits@12
-RtlFindClearBitsAndSet@12
-RtlFindClearRuns@16
-RtlFindFirstRunClear@8
-RtlFindLastBackwardRunClear@12
-RtlFindLeastSignificantBit@4
-RtlFindLongestRunClear@8
-;RtlFindMessage
-RtlFindMostSignificantBit@4
-RtlFindNextForwardRunClear@12
-RtlFindRange@40
-RtlFindSetBits@12
-RtlFindSetBitsAndClear@12
-;RtlFindUnicodePrefix
-;RtlFormatCurrentUserKeyPath
-RtlFreeAnsiString@4
-;RtlFreeHeap
-;RtlFreeOemString
-RtlFreeRangeList@4
-RtlFreeUnicodeString@4
-RtlGUIDFromString@8
-;RtlGenerate8dot3Name
-;RtlGetAce
-RtlGetCallersAddress@8
-;RtlGetCompressionWorkSpaceSize
-;RtlGetDaclSecurityDescriptor
-;RtlGetDefaultCodePage
-;RtlGetElementGenericTable
-;RtlGetElementGenericTableAvl
-RtlGetFirstRange@12
-;RtlGetGroupSecurityDescriptor
-RtlGetNextRange@12
-;RtlGetNtGlobalFlags
-;RtlGetOwnerSecurityDescriptor
-;RtlGetSaclSecurityDescriptor
-;RtlGetSetBootStatusData
-RtlGetVersion@4
-RtlHashUnicodeString@16
-;RtlImageDirectoryEntryToData
-;RtlImageNtHeader
-RtlInitAnsiString@8
-;RtlInitCodePageTable
-RtlInitString@8
-RtlInitUnicodeString@8
-RtlInitializeBitMap@12
-;RtlInitializeGenericTable
-;RtlInitializeGenericTableAvl
-RtlInitializeRangeList@4
-;RtlInitializeSid
-;RtlInitializeUnicodePrefix
-;RtlInsertElementGenericTable
-;RtlInsertElementGenericTableAvl
-;RtlInsertElementGenericTableFull
-;RtlInsertElementGenericTableFullAvl
-;RtlInsertUnicodePrefix
-RtlInt64ToUnicodeString@12
-;RtlIntegerToChar
-;RtlIntegerToUnicode
-RtlIntegerToUnicodeString@12
-RtlInvertRangeList@8
-;RtlIpv4AddressToStringA
-;RtlIpv4AddressToStringW
-;RtlIpv4StringToAddressA
-;RtlIpv4StringToAddressW
-;RtlIpv6AddressToStringA
-;RtlIpv6AddressToStringW
-;RtlIpv6StringToAddressA
-;RtlIpv6StringToAddressW
-;RtlIsGenericTableEmpty
-;RtlIsGenericTableEmptyAvl
-;RtlIsNameLegalDOS8Dot3
-RtlIsRangeAvailable@32
-;RtlIsValidOemCharacter
-RtlLargeIntegerAdd@8
-RtlLargeIntegerArithmeticShift@8
-RtlLargeIntegerDivide@12
-RtlLargeIntegerNegate@4
-RtlLargeIntegerShiftLeft@8
-RtlLargeIntegerShiftRight@8
-RtlLargeIntegerSubtract@8
-;RtlLengthRequiredSid
-RtlLengthSecurityDescriptor@4
-;RtlLengthSid
-;RtlLockBootStatusData
-;RtlLookupAtomInAtomTable
-;RtlLookupElementGenericTable
-;RtlLookupElementGenericTableAvl
-;RtlLookupElementGenericTableFull
-;RtlLookupElementGenericTableFullAvl
-RtlMapGenericMask@8
-;RtlMapSecurityErrorToNtStatus
-RtlMergeRangeLists@16
-;RtlMoveMemory
-;RtlMultiByteToUnicodeN
-;RtlMultiByteToUnicodeSize
-;RtlNextUnicodePrefix
-;RtlNtStatusToDosError
-;RtlNtStatusToDosErrorNoTeb
-;RtlNumberGenericTableElements
-;RtlNumberGenericTableElementsAvl
-RtlNumberOfClearBits@4
-RtlNumberOfSetBits@4
-;RtlOemStringToCountedUnicodeString
-;RtlOemStringToUnicodeSize
-;RtlOemStringToUnicodeString
-;RtlOemToUnicodeN
-;RtlPinAtomInAtomTable
-@RtlPrefetchMemoryNonTemporal@8
-;RtlPrefixString
-RtlPrefixUnicodeString@12
-;RtlQueryAtomInAtomTable
-RtlQueryRegistryValues@20
-;RtlQueryTimeZoneInformation
-;RtlRaiseException
-;RtlRandom
-;RtlRandomEx
-;RtlRealPredecessor
-;RtlRealSuccessor
-;RtlRemoveUnicodePrefix
-;RtlReserveChunk
-;RtlSecondsSince1970ToTime
-;RtlSecondsSince1980ToTime
-;RtlSelfRelativeToAbsoluteSD
-;RtlSelfRelativeToAbsoluteSD2
-RtlSetAllBits@4
-RtlSetBit@8
-RtlSetBits@12
-RtlSetDaclSecurityDescriptor@16
-;RtlSetGroupSecurityDescriptor
-;RtlSetOwnerSecurityDescriptor
-;RtlSetSaclSecurityDescriptor
-;RtlSetTimeZoneInformation
-;RtlSizeHeap
-;RtlSplay
-RtlStringFromGUID@8
-;RtlSubAuthorityCountSid
-;RtlSubAuthoritySid
-;RtlSubtreePredecessor
-;RtlSubtreeSuccessor
-RtlTestBit@8
-RtlTimeFieldsToTime@8
-;RtlTimeToElapsedTimeFields
-;RtlTimeToSecondsSince1970
-;RtlTimeToSecondsSince1980
-RtlTimeToTimeFields@8
-;RtlTraceDatabaseAdd
-;RtlTraceDatabaseCreate
-;RtlTraceDatabaseDestroy
-;RtlTraceDatabaseEnumerate
-;RtlTraceDatabaseFind
-;RtlTraceDatabaseLock
-;RtlTraceDatabaseUnlock
-;RtlTraceDatabaseValidate
-@RtlUlongByteSwap@4
-@RtlUlonglongByteSwap@4
-RtlUnicodeStringToAnsiSize@4
-RtlUnicodeStringToAnsiString@12
-;RtlUnicodeStringToCountedOemString
-RtlUnicodeStringToInteger@12
-;RtlUnicodeStringToOemSize
-;RtlUnicodeStringToOemString
-;RtlUnicodeToCustomCPN
-;RtlUnicodeToMultiByteN
-;RtlUnicodeToMultiByteSize
-;RtlUnicodeToOemN
-;RtlUnlockBootStatusData
-;RtlUnwind
-RtlUpcaseUnicodeChar@4
-RtlUpcaseUnicodeString@12
-;RtlUpcaseUnicodeStringToAnsiString
-;RtlUpcaseUnicodeStringToCountedOemString
-;RtlUpcaseUnicodeStringToOemString
-;RtlUpcaseUnicodeToCustomCPN
-;RtlUpcaseUnicodeToMultiByteN
-;RtlUpcaseUnicodeToOemN
-RtlUpperChar@4
-RtlUpperString@8
-RtlUshortByteSwap@4
-RtlValidRelativeSecurityDescriptor@12
-RtlValidSecurityDescriptor@4
-;RtlValidSid
-RtlVerifyVersionInfo@12
-RtlVolumeDeviceToDosName@8
-RtlWalkFrameChain@12
-RtlWriteRegistryValue@24
-;RtlZeroHeap
-;RtlZeroMemory
-;RtlxAnsiStringToUnicodeSize
-;RtlxOemStringToUnicodeSize
-RtlxUnicodeStringToAnsiSize@4
-;RtlxUnicodeStringToOemSize
-SeAccessCheck@40
-;SeAppendPrivileges
-SeAssignSecurity@28
-SeAssignSecurityEx@36
-;SeAuditHardLinkCreation
-;SeAuditingFileEvents
-;SeAuditingFileOrGlobalEvents
-;SeAuditingHardLinkEvents
-;SeCaptureSecurityDescriptor
-;SeCaptureSubjectContext
-;SeCloseObjectAuditAlarm
-;SeCreateAccessState
-;SeCreateClientSecurity
-;SeCreateClientSecurityFromSubjectContext
-SeDeassignSecurity@4
-;SeDeleteAccessState
-;SeDeleteObjectAuditAlarm
-;SeExports DATA
-;SeFilterToken
-;SeFreePrivileges
-;SeImpersonateClient
-;SeImpersonateClientEx
-;SeLockSubjectContext
-;SeMarkLogonSessionForTerminationNotification
-;SeOpenObjectAuditAlarm
-;SeOpenObjectForDeleteAuditAlarm
-;SePrivilegeCheck
-;SePrivilegeObjectAuditAlarm
-;SePublicDefaultDacl DATA
-;SeQueryAuthenticationIdToken
-;SeQueryInformationToken
-;SeQuerySecurityDescriptorInfo
-;SeQuerySessionIdToken
-;SeRegisterLogonSessionTerminatedRoutine
-;SeReleaseSecurityDescriptor
-;SeReleaseSubjectContext
-;SeSetAccessStateGenericMapping
-;SeSetSecurityDescriptorInfo
-;SeSetSecurityDescriptorInfoEx
-SeSinglePrivilegeCheck@8
-;SeSystemDefaultDacl DATA
-;SeTokenImpersonationLevel
-;SeTokenIsAdmin
-;SeTokenIsRestricted
-SeTokenObjectType DATA
-;SeTokenType
-;SeUnlockSubjectContext
-;SeUnregisterLogonSessionTerminatedRoutine
-SeValidSecurityDescriptor@8
-VerSetConditionMask@16
-;VfFailDeviceNode
-;VfFailDriver
-;VfFailSystemBIOS
-;VfIsVerificationEnabled
-WRITE_REGISTER_BUFFER_UCHAR@12
-WRITE_REGISTER_BUFFER_ULONG@12
-WRITE_REGISTER_BUFFER_USHORT@12
-WRITE_REGISTER_UCHAR@8
-WRITE_REGISTER_ULONG@8
-WRITE_REGISTER_USHORT@8
-;WmiFlushTrace
-;WmiGetClock
-;WmiQueryTrace
-WmiQueryTraceInformation@20
-;WmiStartTrace
-;WmiStopTrace
-WmiTraceMessage
-;WmiTraceMessageVa
-;WmiUpdateTrace
-;XIPDispatch
-ZwAccessCheckAndAuditAlarm@44
-;ZwAddBootEntry
-ZwAdjustPrivilegesToken@24
-ZwAlertThread@4
-ZwAllocateVirtualMemory@24
-ZwAssignProcessToJobObject@8
-ZwCancelIoFile@8
-ZwCancelTimer@8
-;ZwClearEvent
-ZwClose@4
-ZwCloseObjectAuditAlarm@12
-ZwConnectPort@32
-ZwCreateDirectoryObject@12
-ZwCreateEvent@20
-ZwCreateFile@44
-ZwCreateJobObject@12
-ZwCreateKey@28
-ZwCreateSection@28
-ZwCreateSymbolicLinkObject@16
-ZwCreateTimer@16
-;ZwDeleteBootEntry
-ZwDeleteFile@4
-ZwDeleteKey@4
-ZwDeleteValueKey@8
-ZwDeviceIoControlFile@40
-ZwDisplayString@4
-ZwDuplicateObject@28
-ZwDuplicateToken@24
-;ZwEnumerateBootEntries
-ZwEnumerateKey@24
-ZwEnumerateValueKey@24
-ZwFlushInstructionCache@12
-ZwFlushKey@4
-ZwFlushVirtualMemory@16
-ZwFreeVirtualMemory@16
-;ZwFsControlFile
-ZwInitiatePowerAction@16
-;ZwIsProcessInJob
-ZwLoadDriver@4
-ZwLoadKey@8
-ZwMakeTemporaryObject@4
-ZwMapViewOfSection@40
-ZwNotifyChangeKey@40
-ZwOpenDirectoryObject@12
-;ZwOpenEvent
-ZwOpenFile@24
-ZwOpenJobObject@12
-ZwOpenKey@12
-;ZwOpenProcess
-ZwOpenProcessToken@12
-;ZwOpenProcessTokenEx
-ZwOpenSection@12
-ZwOpenSymbolicLinkObject@12
-ZwOpenThread@16
-ZwOpenThreadToken@16
-;ZwOpenThreadTokenEx
-ZwOpenTimer@12
-ZwPowerInformation@20
-;ZwPulseEvent
-;ZwQueryBootEntryOrder
-;ZwQueryBootOptions
-ZwQueryDefaultLocale@8
-ZwQueryDefaultUILanguage@4
-ZwQueryDirectoryFile@44
-ZwQueryDirectoryObject@28
-;ZwQueryEaFile
-ZwQueryFullAttributesFile@8
-ZwQueryInformationFile@20
-ZwQueryInformationJobObject@20
-ZwQueryInformationProcess@20
-ZwQueryInformationThread@20
-ZwQueryInformationToken@20
-ZwQueryInstallUILanguage@4
-ZwQueryKey@20
-ZwQueryObject@20
-ZwQuerySection@20
-ZwQuerySecurityObject@20
-ZwQuerySymbolicLinkObject@12
-ZwQuerySystemInformation@16
-ZwQueryValueKey@24
-ZwQueryVolumeInformationFile@20
-ZwReadFile@36
-ZwReplaceKey@12
-ZwRequestWaitReplyPort@12
-;ZwResetEvent
-ZwRestoreKey@12
-ZwSaveKey@8
-;ZwSaveKeyEx
-;ZwSetBootEntryOrder
-;ZwSetBootOptions
-ZwSetDefaultLocale@8
-ZwSetDefaultUILanguage@4
-;ZwSetEaFile
-ZwSetEvent@8
-ZwSetInformationFile@20
-ZwSetInformationJobObject@16
-ZwSetInformationObject@16
-ZwSetInformationProcess@16
-ZwSetInformationThread@16
-ZwSetSecurityObject@12
-ZwSetSystemInformation@12
-ZwSetSystemTime@8
-ZwSetTimer@28
-ZwSetValueKey@24
-;ZwSetVolumeInformationFile
-ZwTerminateJobObject@8
-ZwTerminateProcess@8
-;ZwTranslateFilePath
-ZwUnloadDriver@4
-ZwUnloadKey@4
-ZwUnmapViewOfSection@8
-;ZwWaitForMultipleObjects
-ZwWaitForSingleObject@12
-ZwWriteFile@36
-ZwYieldExecution@0
-;_CIcos
-;_CIsin
-;_CIsqrt
-;_abnormal_termination
-;_alldiv
-;_alldvrm
-;_allmul
-;_alloca_probe
-;_allrem
-;_allshl
-;_allshr
-;_aulldiv
-;_aulldvrm
-;_aullrem
-;_aullshr
-;_except_handler2
-;_except_handler3
-;_global_unwind2
-;_itoa
-;_itow
-;_local_unwind2
-;_purecall
-_snprintf
-_snwprintf
-_stricmp
-_strlwr
-_strnicmp
-_strnset
-_strrev
-_strset
-_strupr
-_vsnprintf
-_vsnwprintf
-_wcsicmp@8
-_wcslwr@4
-_wcsnicmp@12
-_wcsnset@12
-_wcsrev@4
-_wcsupr@4
-;atoi
-;atol
-;isdigit
-;islower
-;isprint
-;isspace
-;isupper
-;isxdigit
-;mbstowcs
-;mbtowc
-memchr
-memcpy
-memmove
-memset
-;qsort
-;rand
-sprintf
-;srand
-strcat
-strchr
-strcmp
-strcpy
-strlen
-strncat
-strncmp
-strncpy
-strrchr
-strspn
-strstr
-swprintf
-;tolower
-;toupper
-;towlower
-;towupper
-;vDbgPrintEx
-;vDbgPrintExWithPrefix
-;vsprintf
-wcscat
-wcschr
-wcscmp
-wcscpy
-wcscspn
-wcslen
-wcsncat
-wcsncmp
-wcsncpy
-wcsrchr
-wcsspn
-wcsstr
-;wcstombs
-;wctomb
diff --git a/winsup/w32api/lib/ddk/scsiport.def b/winsup/w32api/lib/ddk/scsiport.def
deleted file mode 100644
index f7050c2..0000000
--- a/winsup/w32api/lib/ddk/scsiport.def
+++ /dev/null
@@ -1,49 +0,0 @@
-LIBRARY scsiport.sys
-EXPORTS
-DllInitialize@4
-ScsiDebugPrint
-ScsiPortCompleteRequest@20
-;ScsiPortConvertPhysicalAddressToUlong
-ScsiPortConvertUlongToPhysicalAddress@4
-ScsiPortFlushDma@4
-ScsiPortFreeDeviceBase@8
-ScsiPortGetBusData@24
-ScsiPortGetDeviceBase@28
-ScsiPortGetLogicalUnit@16
-ScsiPortGetPhysicalAddress@16
-ScsiPortGetSrb@20
-ScsiPortGetUncachedExtension@12
-ScsiPortGetVirtualAddress@8
-ScsiPortInitialize@16
-ScsiPortIoMapTransfer@16
-ScsiPortLogError@28
-ScsiPortMoveMemory@12
-ScsiPortNotification
-ScsiPortQuerySystemTime@4
-ScsiPortReadPortBufferUchar@12
-ScsiPortReadPortBufferUlong@12
-ScsiPortReadPortBufferUshort@12
-ScsiPortReadPortUchar@4
-ScsiPortReadPortUlong@4
-ScsiPortReadPortUshort@4
-ScsiPortReadRegisterBufferUchar@12
-ScsiPortReadRegisterBufferUlong@12
-ScsiPortReadRegisterBufferUshort@12
-ScsiPortReadRegisterUchar@4
-ScsiPortReadRegisterUlong@4
-ScsiPortReadRegisterUshort@4
-ScsiPortSetBusDataByOffset@28
-ScsiPortStallExecution@4
-ScsiPortValidateRange@24
-ScsiPortWritePortBufferUchar@12
-ScsiPortWritePortBufferUlong@12
-ScsiPortWritePortBufferUshort@12
-ScsiPortWritePortUchar@8
-ScsiPortWritePortUlong@8
-ScsiPortWritePortUshort@8
-ScsiPortWriteRegisterBufferUchar@12
-ScsiPortWriteRegisterBufferUlong@12
-ScsiPortWriteRegisterBufferUshort@12
-ScsiPortWriteRegisterUchar@8
-ScsiPortWriteRegisterUlong@8
-ScsiPortWriteRegisterUshort@8
diff --git a/winsup/w32api/lib/ddk/tdi.def b/winsup/w32api/lib/ddk/tdi.def
deleted file mode 100644
index ee90642..0000000
--- a/winsup/w32api/lib/ddk/tdi.def
+++ /dev/null
@@ -1,50 +0,0 @@
-LIBRARY tdi.sys
-EXPORTS
-;CTEAllocateString
-;CTEBlock
-;CTEInitEvent
-;CTEInitString
-;CTEInitTimer
-;CTEInitialize
-;CTELogEvent
-;CTEScheduleDelayedEvent
-;CTEScheduleEvent
-;CTESignal
-;CTEStartTimer
-;CTESystemUpTime
-TdiBuildNetbiosAddress@12
-TdiBuildNetbiosAddressEa@12
-TdiCopyBufferToMdl@24
-TdiCopyMdlChainToMdlChain@20
-TdiCopyMdlToBuffer@24
-TdiDefaultChainedRcvDatagramHandler@40
-TdiDefaultChainedRcvExpeditedHandler@28
-TdiDefaultChainedReceiveHandler@28
-TdiDefaultConnectHandler@36
-TdiDefaultDisconnectHandler@28
-TdiDefaultErrorHandler@8
-TdiDefaultRcvDatagramHandler@44
-TdiDefaultRcvExpeditedHandler@32
-TdiDefaultReceiveHandler@32
-TdiDefaultSendPossibleHandler@12
-TdiDeregisterAddressChangeHandler@4
-TdiDeregisterDeviceObject@4
-TdiDeregisterNetAddress@4
-;TdiDeregisterNotificationHandler
-TdiDeregisterPnPHandlers@4
-TdiDeregisterProvider@4
-TdiEnumerateAddresses@4
-TdiInitialize@0
-TdiMapUserRequest@12
-TdiMatchPdoWithChainedReceiveContext@8
-;TdiOpenNetbiosAddress
-TdiPnPPowerComplete@12
-TdiPnPPowerRequest@20
-TdiProviderReady@4
-TdiRegisterAddressChangeHandler@12
-TdiRegisterDeviceObject@8
-TdiRegisterNetAddress@16
-TdiRegisterNotificationHandler@12
-TdiRegisterPnPHandlers@12
-TdiRegisterProvider@8
-TdiReturnChainedReceives@8
diff --git a/winsup/w32api/lib/ddk/usbcamd.def b/winsup/w32api/lib/ddk/usbcamd.def
deleted file mode 100644
index 5b052e2..0000000
--- a/winsup/w32api/lib/ddk/usbcamd.def
+++ /dev/null
@@ -1,10 +0,0 @@
-LIBRARY usbcamd.sys
-EXPORTS
-DllUnload@0
-USBCAMD_AdapterReceivePacket@16
-USBCAMD_ControlVendorCommand@36
-;USBCAMD_Debug_LogEntry
-USBCAMD_DriverEntry@20
-USBCAMD_GetRegistryKeyValue@20
-USBCAMD_InitializeNewInterface@16
-USBCAMD_SelectAlternateInterface@8
diff --git a/winsup/w32api/lib/ddk/usbcamd2.def b/winsup/w32api/lib/ddk/usbcamd2.def
deleted file mode 100644
index 199d21e..0000000
--- a/winsup/w32api/lib/ddk/usbcamd2.def
+++ /dev/null
@@ -1,10 +0,0 @@
-LIBRARY usbcamd2.sys
-EXPORTS
-DllUnload@0
-USBCAMD_AdapterReceivePacket@16
-USBCAMD_ControlVendorCommand@36
-;USBCAMD_Debug_LogEntry
-USBCAMD_DriverEntry@20
-USBCAMD_GetRegistryKeyValue@20
-USBCAMD_InitializeNewInterface@16
-USBCAMD_SelectAlternateInterface@8
diff --git a/winsup/w32api/lib/ddk/videoprt.def b/winsup/w32api/lib/ddk/videoprt.def
deleted file mode 100644
index a8b9057..0000000
--- a/winsup/w32api/lib/ddk/videoprt.def
+++ /dev/null
@@ -1,115 +0,0 @@
-LIBRARY videoprt.sys
-EXPORTS
-VideoPortAcquireDeviceLock@4
-VideoPortAcquireSpinLock@12
-VideoPortAcquireSpinLockAtDpcLevel@8
-VideoPortAllocateBuffer@12
-VideoPortAllocateCommonBuffer@24
-VideoPortAllocateContiguousMemory@12
-VideoPortAllocatePool@16
-VideoPortAssociateEventsWithDmaHandle@16
-;VideoPortCheckForDeviceExistance
-VideoPortCheckForDeviceExistence@28
-VideoPortClearEvent@8
-VideoPortCompareMemory@12
-VideoPortCompleteDma@16
-VideoPortCreateEvent@16
-VideoPortCreateSecondaryDisplay@12
-VideoPortCreateSpinLock@8
-VideoPortDDCMonitorHelper@16
-VideoPortDebugPrint
-VideoPortDeleteEvent@8
-VideoPortDeleteSpinLock@8
-VideoPortDisableInterrupt@4
-VideoPortDoDma@12
-VideoPortEnableInterrupt@4
-VideoPortEnumerateChildren@8
-;VideoPortFlushRegistry
-VideoPortFreeCommonBuffer@20
-VideoPortFreeDeviceBase@8
-VideoPortFreePool@8
-VideoPortGetAccessRanges@32
-VideoPortGetAgpServices@8
-VideoPortGetAssociatedDeviceExtension@4
-VideoPortGetAssociatedDeviceID@4
-VideoPortGetBusData@24
-VideoPortGetBytesUsed@8
-VideoPortGetCommonBuffer@24
-VideoPortGetCurrentIrql@0
-VideoPortGetDeviceBase@16
-VideoPortGetDeviceData@16
-VideoPortGetDmaAdapter@8
-VideoPortGetDmaContext@8
-VideoPortGetMdl@8
-VideoPortGetRegistryParameters@20
-VideoPortGetRomImage@16
-VideoPortGetVersion@8
-VideoPortGetVgaStatus@8
-VideoPortInitialize@16
-VideoPortInt10@8
-@VideoPortInterlockedDecrement@4
-@VideoPortInterlockedExchange@8
-@VideoPortInterlockedIncrement@4
-VideoPortLockBuffer@16
-VideoPortLockPages@20
-VideoPortLogError@16
-VideoPortMapBankedMemory@40
-VideoPortMapDmaMemory@36
-VideoPortMapMemory@24
-VideoPortMoveMemory@12
-VideoPortPutDmaAdapter@8
-VideoPortQueryPerformanceCounter@8
-VideoPortQueryServices@12
-VideoPortQuerySystemTime@4
-VideoPortQueueDpc@12
-VideoPortReadPortBufferUchar@12
-VideoPortReadPortBufferUlong@12
-VideoPortReadPortBufferUshort@12
-VideoPortReadPortUchar@4
-VideoPortReadPortUlong@4
-VideoPortReadPortUshort@4
-VideoPortReadRegisterBufferUchar@12
-VideoPortReadRegisterBufferUlong@12
-VideoPortReadRegisterBufferUshort@12
-VideoPortReadRegisterUchar@4
-VideoPortReadRegisterUlong@4
-VideoPortReadRegisterUshort@4
-VideoPortReadStateEvent@8
-VideoPortReleaseBuffer@8
-VideoPortReleaseCommonBuffer@24
-VideoPortReleaseDeviceLock@4
-VideoPortReleaseSpinLock@12
-VideoPortReleaseSpinLockFromDpcLevel@8
-VideoPortScanRom@16
-VideoPortSetBusData@24
-VideoPortSetBytesUsed@12
-VideoPortSetDmaContext@12
-VideoPortSetEvent@8
-VideoPortSetRegistryParameters@16
-VideoPortSetTrappedEmulatorPorts@12
-VideoPortSignalDmaComplete@8
-VideoPortStallExecution@4
-VideoPortStartDma@32
-VideoPortStartTimer@4
-VideoPortStopTimer@4
-VideoPortSynchronizeExecution@16
-VideoPortUnlockBuffer@8
-VideoPortUnlockPages@8
-VideoPortUnmapDmaMemory@16
-VideoPortUnmapMemory@12
-VideoPortVerifyAccessRanges@12
-VideoPortWaitForSingleObject@12
-VideoPortWritePortBufferUchar@12
-VideoPortWritePortBufferUlong@12
-VideoPortWritePortBufferUshort@12
-VideoPortWritePortUchar@8
-VideoPortWritePortUlong@8
-VideoPortWritePortUshort@8
-VideoPortWriteRegisterBufferUchar@12
-VideoPortWriteRegisterBufferUlong@12
-VideoPortWriteRegisterBufferUshort@12
-VideoPortWriteRegisterUchar@8
-VideoPortWriteRegisterUlong@8
-VideoPortWriteRegisterUshort@8
-VideoPortZeroDeviceMemory@8
-VideoPortZeroMemory@8
diff --git a/winsup/w32api/lib/ddk/win32k.def b/winsup/w32api/lib/ddk/win32k.def
deleted file mode 100644
index 2c7f147..0000000
--- a/winsup/w32api/lib/ddk/win32k.def
+++ /dev/null
@@ -1,226 +0,0 @@
-LIBRARY win32k.sys
-EXPORTS
-BRUSHOBJ_hGetColorTransform@4
-BRUSHOBJ_pvAllocRbrush@8
-BRUSHOBJ_pvGetRbrush@4
-BRUSHOBJ_ulGetBrushColor@4
-CLIPOBJ_bEnum@12
-CLIPOBJ_cEnumStart@20
-CLIPOBJ_ppoGetPath@4
-EngAcquireSemaphore@4
-EngAllocMem@12
-EngAllocPrivateUserMem@12
-;EngAllocSectionMem
-EngAllocUserMem@8
-EngAlphaBlend@28
-EngAssociateSurface@12
-EngBitBlt@44
-EngCheckAbort@4
-EngClearEvent@4
-EngComputeGlyphSet@12
-EngControlSprites@8
-EngCopyBits@24
-EngCreateBitmap@20
-EngCreateClip@0
-EngCreateDeviceBitmap@12
-EngCreateDeviceSurface@12
-;EngCreateDriverObj
-EngCreateEvent@4
-EngCreatePalette@24
-EngCreatePath@0
-EngCreateSemaphore@0
-EngCreateWnd@20
-EngDebugBreak@0
-EngDebugPrint@12
-EngDeleteClip@4
-EngDeleteDriverObj@12
-EngDeleteEvent@4
-EngDeleteFile@4
-EngDeletePalette@4
-EngDeletePath@4
-EngDeleteSafeSemaphore@4
-EngDeleteSemaphore@4
-EngDeleteSurface@4
-EngDeleteWnd@4
-EngDeviceIoControl@28
-EngDitherColor@16
-;EngDxIoctl
-EngEnumForms@24
-EngEraseSurface@12
-;EngFileIoControl
-;EngFileWrite
-EngFillPath@28
-EngFindImageProcAddress@8
-EngFindResource@16
-EngFntCacheAlloc@8
-EngFntCacheFault@8
-EngFntCacheLookUp@8
-EngFreeMem@4
-EngFreeModule@4
-EngFreePrivateUserMem@8
-;EngFreeSectionMem
-EngFreeUserMem@4
-EngGetCurrentCodePage@8
-EngGetCurrentProcessId@0
-EngGetCurrentThreadId@0
-EngGetDriverName@4
-EngGetFileChangeTime@8
-EngGetFilePath@8
-EngGetForm@24
-EngGetLastError@0
-EngGetPrinter@20
-EngGetPrinterData@24
-EngGetPrinterDataFileName@4
-EngGetPrinterDriver@24
-EngGetProcessHandle@0
-;EngGetTickCount
-EngGetType1FontList@24
-EngGradientFill@40
-EngHangNotification@8
-EngInitializeSafeSemaphore@4
-EngIsSemaphoreOwned@4
-EngIsSemaphoreOwnedByCurrentThread@4
-EngLineTo@36
-EngLoadImage@4
-EngLoadModule@4
-EngLoadModuleForWrite@8
-EngLockDirectDrawSurface@4
-;EngLockDriverObj
-EngLockSurface@4
-EngLpkInstalled@0
-EngMapEvent@20
-EngMapFile@12
-EngMapFontFile@12
-EngMapFontFileFD@12
-EngMapModule@8
-;EngMapSection
-EngMarkBandingSurface@4
-EngModifySurface@32
-EngMovePointer@16
-EngMulDiv@12
-EngMultiByteToUnicodeN@20
-EngMultiByteToWideChar@20
-;EngNineGrid
-EngPaint@20
-EngPlgBlt@44
-EngProbeForRead@12
-EngProbeForReadAndWrite@12
-EngQueryDeviceAttribute@24
-EngQueryLocalTime@4
-EngQueryPalette@16
-EngQueryPerformanceCounter@4
-EngQueryPerformanceFrequency@4
-EngQuerySystemAttribute@8
-EngReadStateEvent@4
-EngReleaseSemaphore@4
-EngRestoreFloatingPointState@4
-EngSaveFloatingPointState@8
-EngSecureMem@8
-EngSetEvent@4
-EngSetLastError@4
-EngSetPointerShape@40
-EngSetPointerTag@20
-EngSetPrinterData@20
-EngSort@16
-EngStretchBlt@44
-EngStretchBltROP@52
-EngStrokeAndFillPath@40
-EngStrokePath@32
-EngTextOut@40
-EngTransparentBlt@32
-EngUnicodeToMultiByteN@20
-EngUnloadImage@4
-EngUnlockDirectDrawSurface@4
-EngUnlockDriverObj@4
-EngUnlockSurface@4
-EngUnmapEvent@4
-EngUnmapFile@4
-EngUnmapFontFile@4
-EngUnmapFontFileFD@4
-EngUnsecureMem@4
-EngWaitForSingleObject@8
-EngWideCharToMultiByte@20
-EngWritePrinter@16
-FLOATOBJ_Add@8
-FLOATOBJ_AddFloat@8
-;FLOATOBJ_AddFloatObj
-FLOATOBJ_AddLong@8
-FLOATOBJ_Div@8
-FLOATOBJ_DivFloat@8
-;FLOATOBJ_DivFloatObj
-FLOATOBJ_DivLong@8
-FLOATOBJ_Equal@8
-FLOATOBJ_EqualLong@8
-FLOATOBJ_GetFloat@4
-FLOATOBJ_GetLong@4
-FLOATOBJ_GreaterThan@8
-FLOATOBJ_GreaterThanLong@8
-FLOATOBJ_LessThan@8
-FLOATOBJ_LessThanLong@8
-FLOATOBJ_Mul@8
-FLOATOBJ_MulFloat@8
-;FLOATOBJ_MulFloatObj
-FLOATOBJ_MulLong@8
-FLOATOBJ_Neg@4
-FLOATOBJ_SetFloat@8
-FLOATOBJ_SetLong@8
-FLOATOBJ_Sub@8
-FLOATOBJ_SubFloat@8
-;FLOATOBJ_SubFloatObj
-FLOATOBJ_SubLong@8
-FONTOBJ_cGetAllGlyphHandles@8
-FONTOBJ_cGetGlyphs@20
-FONTOBJ_pQueryGlyphAttrs@8
-FONTOBJ_pfdg@4
-FONTOBJ_pifi@4
-FONTOBJ_pjOpenTypeTablePointer@12
-FONTOBJ_pvTrueTypeFontFile@8
-FONTOBJ_pwszFontFilePaths@8
-FONTOBJ_pxoGetXform@4
-FONTOBJ_vGetInfo@12
-HT_ComputeRGBGammaTable@24
-HT_Get8BPPFormatPalette@16
-HT_Get8BPPMaskPalette@24
-HeapVidMemAllocAligned@20
-PALOBJ_cGetColors@16
-PATHOBJ_bCloseFigure@4
-PATHOBJ_bEnum@8
-PATHOBJ_bEnumClipLines@12
-PATHOBJ_bMoveTo@8
-PATHOBJ_bPolyBezierTo@12
-PATHOBJ_bPolyLineTo@12
-PATHOBJ_vEnumStart@4
-PATHOBJ_vEnumStartClipLines@16
-PATHOBJ_vGetBounds@8
-;RtlAnsiCharToUnicodeChar
-;RtlMultiByteToUnicodeN
-;RtlRaiseException
-;RtlUnicodeToMultiByteN
-;RtlUnicodeToMultiByteSize
-;RtlUnwind
-RtlUpcaseUnicodeChar@4
-;RtlUpcaseUnicodeToMultiByteN
-STROBJ_bEnum@12
-STROBJ_bEnumPositionsOnly@12
-STROBJ_bGetAdvanceWidths@16
-STROBJ_dwGetCodePage@4
-STROBJ_fxBreakExtra@4
-STROBJ_fxCharacterExtra@4
-STROBJ_vEnumStart@4
-VidMemFree@8
-WNDOBJ_bEnum@12
-WNDOBJ_cEnumStart@16
-WNDOBJ_vSetConsumer@8
-XFORMOBJ_bApplyXform@20
-XFORMOBJ_iGetFloatObjXform@8
-XFORMOBJ_iGetXform@8
-XLATEOBJ_cGetPalette@16
-XLATEOBJ_hGetColorTransform@4
-XLATEOBJ_iXlate@8
-XLATEOBJ_piVector@4
-;_abnormal_termination
-;_except_handler2
-;_global_unwind2
-;_itoa
-;_itow
-;_local_unwind2
diff --git a/winsup/w32api/lib/devguid.c b/winsup/w32api/lib/devguid.c
deleted file mode 100644
index 7e4c5f1..0000000
--- a/winsup/w32api/lib/devguid.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- Generate GUIDs for device classes for PnP and SetupAPI
-
- This file was generated by extracting the UUIDs from the registry at
- \\SYSTEM\\CurrentControlSet\\Control\\Class and pairing them with
- the class name in the registry value "Class" with GUID_DEVCLASS_ prepended
- */
-
-#define INITGUID
-#include <basetyps.h>
-DEFINE_GUID(GUID_DEVCLASS_WCEUSBS, 0x25DBCE51, 0x6C8F, 0x4A72, 0x8A, 0x6D, 0xB5, 0x4C, 0x2B, 0x4F, 0xC8, 0x35);
-DEFINE_GUID(GUID_DEVCLASS_USB, 0x36FC9E60, 0xC465, 0x11CF, 0x80, 0x56, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
-DEFINE_GUID(GUID_DEVCLASS_PNPPRINTERS, 0x4658EE7E, 0xF050, 0x11D1, 0xB6, 0xBD, 0x00, 0xC0, 0x4F, 0xA3, 0x72, 0xA7);
-DEFINE_GUID(GUID_DEVCLASS_DOT4, 0x48721B56, 0x6795, 0x11D2, 0xB1, 0xA8, 0x00, 0x80, 0xC7, 0x2E, 0x74, 0xA2);
-DEFINE_GUID(GUID_DEVCLASS_DOT4PRINT, 0x49CE6AC8, 0x6F86, 0x11D2, 0xB1, 0xE5, 0x00, 0x80, 0xC7, 0x2E, 0x74, 0xA2);
-DEFINE_GUID(GUID_DEVCLASS_CDROM, 0x4D36E965, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_COMPUTER, 0x4D36E966, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_DISKDRIVE, 0x4D36E967, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_DISPLAY, 0x4D36E968, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_FDC, 0x4D36E969, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_HDC, 0x4D36E96A, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_KEYBOARD, 0x4D36E96B, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_MEDIA, 0x4D36E96C, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_MODEM, 0x4D36E96D, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_MONITOR, 0x4D36E96E, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_MOUSE, 0x4D36E96F, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_MTD, 0x4D36E970, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_MULTIFUNCTION, 0x4D36E971, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_NET, 0x4D36E972, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2b, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_NETCLIENT, 0x4D36E973, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_NETSERVICE, 0x4D36E974, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_NETTRANS, 0x4D36E975, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_PCMCIA, 0x4D36E977, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_PORTS, 0x4D36E978, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_PRINTER, 0x4D36E979, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_SCSIADAPTER, 0x4D36E97B, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_SYSTEM, 0x4D36E97D, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_UNKNOWN, 0x4D36E97E, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_FLOPPYDISK, 0x4D36E980, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_PROCESSOR, 0x50127DC3, 0x0F36, 0x415E, 0xA6, 0xCC, 0x4C, 0xB3, 0xBE, 0x91, 0x0B, 0x65);
-DEFINE_GUID(GUID_DEVCLASS_MULTIPORTSERIAL, 0x50906CB8, 0xBA12, 0x11D1, 0xBF, 0x5D, 0x00, 0x00, 0xF8, 0x05, 0xF5, 0x30);
-DEFINE_GUID(GUID_DEVCLASS_SMARTCARDREADER, 0x50DD5230, 0xBA8A, 0x11D1, 0xBF, 0x5D, 0x00, 0x00, 0xF8, 0x05, 0xF5, 0x30);
-DEFINE_GUID(GUID_DEVCLASS_VOLUMESNAPSHOT, 0x533C5B84, 0xEC70, 0x11D2, 0x95, 0x05, 0x00, 0xC0, 0x4F, 0x79, 0xDE, 0xAF);
-DEFINE_GUID(GUID_DEVCLASS_1394DEBUG, 0x66F250D6, 0x7801, 0x4A64, 0xB1, 0x39, 0xEE, 0xA8, 0x0A, 0x45, 0x0B, 0x24);
-DEFINE_GUID(GUID_DEVCLASS_1394, 0x6BDD1FC1, 0x810F, 0x11D0, 0xBE, 0xC7, 0x08, 0x00, 0x2B, 0xE2, 0x09, 0x2F);
-DEFINE_GUID(GUID_DEVCLASS_INFRARED, 0x6BDD1FC5, 0x810F, 0x11D0, 0xBE, 0xC7, 0x08, 0x00, 0x2B, 0xE2, 0x09, 0x2F);
-DEFINE_GUID(GUID_DEVCLASS_IMAGE, 0x6BDD1FC6, 0x810F, 0x11D0, 0xBE, 0xC7, 0x08, 0x00, 0x2B, 0xE2, 0x09, 0x2F);
-DEFINE_GUID(GUID_DEVCLASS_TAPEDRIVE, 0x6D807884, 0x7D21, 0x11CF, 0x80, 0x1C, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
-DEFINE_GUID(GUID_DEVCLASS_VOLUME, 0x71A27CDD, 0x812A, 0x11D0, 0xBE, 0xC7, 0x08, 0x00, 0x2B, 0xE2, 0x09, 0x2F);
-DEFINE_GUID(GUID_DEVCLASS_BATTERY, 0x72631E54, 0x78A4, 0x11D0, 0xBC, 0xF7, 0x00, 0xAA, 0x00, 0xB7, 0xB3, 0x2A);
-DEFINE_GUID(GUID_DEVCLASS_HIDCLASS, 0x745A17A0, 0x74D3, 0x11D0, 0xB6, 0xFE, 0x00, 0xA0, 0xC9, 0x0F, 0x57, 0xDA);
-DEFINE_GUID(GUID_DEVCLASS_61883, 0x7EBEFBC0, 0x3200, 0x11D2, 0xB4, 0xC2, 0x00, 0xA0, 0xC9, 0x69, 0x7D, 0x07);
-DEFINE_GUID(GUID_DEVCLASS_LEGACYDRIVER, 0x8ECC055D, 0x047F, 0x11D1, 0xA5, 0x37, 0x00, 0x00, 0xF8, 0x75, 0x3E, 0xD1);
-DEFINE_GUID(GUID_DEVCLASS_SDHOST, 0xA0A588A4, 0xC46F, 0x4B37, 0xB7, 0xEA, 0xC8, 0x2F, 0xE8, 0x98, 0x70, 0xC6);
-DEFINE_GUID(GUID_DEVCLASS_AVC, 0xC06FF265, 0xAE09, 0x48F0, 0x81, 0x2C, 0x16, 0x75, 0x3D, 0x7C, 0xBA, 0x83);
-DEFINE_GUID(GUID_DEVCLASS_ENUM1394, 0xC459DF55, 0xDB08, 0x11D1, 0xB0, 0x09, 0x00, 0xA0, 0xC9, 0x08, 0x1F, 0xF6);
-DEFINE_GUID(GUID_DEVCLASS_MEDIUMCHANGER, 0xCE5939AE, 0xEBDE, 0x11D0, 0xB1, 0x81, 0x00, 0x00, 0xF8, 0x75, 0x3E, 0xC4);
-DEFINE_GUID(GUID_DEVCLASS_NTAPM, 0xD45B1C18, 0xC8FA, 0x11D1, 0x9F, 0x77, 0x00, 0x00, 0xF8, 0x05, 0xF5, 0x30);
-DEFINE_GUID(GUID_DEVCLASS_SBP2, 0xD48179BE, 0xEC20, 0x11D1, 0xB6, 0xB8, 0x00, 0xC0, 0x4F, 0xA3, 0x72, 0xA7);
-DEFINE_GUID(GUID_DEVCLASS_BLUETOOTH, 0xE0CBF06C, 0xCD8B, 0x4647, 0xBB, 0x8A, 0x26, 0x3B, 0x43, 0xF0, 0xF9, 0x74);
-DEFINE_GUID(GUID_DEVCLASS_PROBES, 0xFD02DFAC, 0x6A7C, 0x4391, 0x97, 0xDA, 0xF8, 0x1F, 0xEF, 0x1F, 0xC9, 0xD3);
diff --git a/winsup/w32api/lib/dhcpcsvc.def b/winsup/w32api/lib/dhcpcsvc.def
deleted file mode 100644
index 84023c7..0000000
--- a/winsup/w32api/lib/dhcpcsvc.def
+++ /dev/null
@@ -1,8 +0,0 @@
-LIBRARY DHCPCSVC.DLL
-EXPORTS
-DhcpCApiCleanup@0
-DhcpCApiInitialize@4
-DhcpDeRegisterParamChange@12
-DhcpRegisterParamChange@28
-DhcpRemoveDNSRegistrations@0
-DhcpUndoRequestParams@16
diff --git a/winsup/w32api/lib/directx/Makefile.in b/winsup/w32api/lib/directx/Makefile.in
deleted file mode 100644
index a56c398..0000000
--- a/winsup/w32api/lib/directx/Makefile.in
+++ /dev/null
@@ -1,226 +0,0 @@
-# Makefile.in
-#
-# This file is part of a free library building Windows NT drivers.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-
-# start config section
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-host_alias = @host@
-build_alias = @build@
-target_alias = @target@
-with_cross_host = @with_cross_host@
-prefix = @prefix@
-includedir:=@includedir@
-
-program_transform_name = @program_transform_name@
-exec_prefix = @exec_prefix@
-libdir:=@libdir@
-bindir = @bindir@
-ifeq ($(target_alias),$(host_alias))
-ifeq ($(build_alias),$(host_alias))
-tooldir:=$(exec_prefix)
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-else
-tooldir:=$(exec_prefix)/$(target_alias)
-endif
-datadir = @datadir@
-infodir = @infodir@
-ifneq (,$(findstring cygwin,$(target_alias)))
-inst_includedir:=$(tooldir)/include/w32api
-inst_libdir:=$(tooldir)/lib/w32api
-else
-ifneq (,$(with_cross_host))
-inst_includedir:=$(tooldir)/include/w32api
-inst_libdir:=$(tooldir)/lib
-else
-inst_includedir:=$(includedir)
-inst_libdir:=$(libdir)
-endif
-endif
-
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-mkinstalldirs = mkdir -p
-
-CC = @CC@
-CC_FOR_TARGET = $(CC)
-
-DLLTOOL = @DLLTOOL@
-DLLTOOL_FLAGS = --as=$(AS) -k
-AS = @AS@
-AS_FOR_TARGET = $(AS_FOR_TARGET)
-WINDRES = @WINDRES@
-
-# Depending on if we build as part of winsup or mingw we need to
-# add additional include paths in order to get the correct headers
-# from the C library.
-BUILDENV = @BUILDENV@
-
-ifeq ($(BUILDENV), cygwin)
-# winsup/include
-# winsup/../newlib/libc/include
-# winsup/../newlib/libc/sys/cygwin
-EXTRA_INCLUDES = -I$(srcdir)/../../include -I$(srcdir)/../../../newlib/libc/include -I$(srcdir)/../../../newlib/libc/sys/cygwin
-endif
-ifeq ($(BUILDENV), mingw)
-EXTRA_INCLUDES = -I$(srcdir)/../../mingw/include
-endif
-
-INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../include/directx $(EXTRA_INCLUDES)
-
-CFLAGS = @CFLAGS@
-ALL_CFLAGS = $(CFLAGS) $(INCLUDES)
-
-RANLIB = @RANLIB@
-AR = @AR@
-LD = @LD@
-
-# end config section
-
-# headers
-
-HEADERS = $(notdir $(wildcard $(srcdir)/../../include/directx/*.h))
-
-# libraries
-
-DEF_FILES = $(notdir $(wildcard $(srcdir)/*.def))
-DIST_C_FILES = $(notdir $(wildcard $(srcdir)/*.c))
-DIST_H_FILES = $(notdir $(wildcard $(srcdir)/*.h))
-LIBS = libd3d8.a libd3d9.a libd3dim.a libd3drm.a libd3dx8d.a libd3dx9d.a \
- libd3dxof.a libddraw.a libdinput.a libdinput8.a libdmoguids.a \
- libdplayx.a libdpnaddr.a libdpnet.a libdpnlobby.a libdpvoice.a \
- libdsetup.a libdsound.a libdxerr8.a libdxerr9.a libdxguid.a \
- libksproxy.a libksuser.a libmsdmo.a libstrmiids.a
-DINPUT_OBJS = dinput_joy.o dinput_joy2.o dinput_kbd.o dinput_mouse.o \
- dinput_mouse2.o
-
-DISTFILES = Makefile.in $(DEF_FILES) $(DIST_C_FILES) $(DIST_H_FILES)
-
-.NOTPARALLEL:
-
-# targets
-all: $(LIBS)
-
-TEST_OPTIONS = $(ALL_CFLAGS) -Wall -pedantic -Wsystem-headers -c $(srcdir)/test.c -o test.o
-.PHONY: test
-test:
- @echo "Testing directx..."
- @for lang in c c++ objective-c ; do \
- echo "$$lang..."; \
- $(CC) -x$$lang $(TEST_OPTIONS) ; \
- echo "$$lang UNICODE..."; \
- $(CC) -x$$lang -DUNICODE $(TEST_OPTIONS) ; \
- done
- @echo "windres..."
- @$(WINDRES) --include-dir $(INCDIR) -i $(srcdir)/res.rc -o test.o
- @echo "windres UNICODE..."
- @$(WINDRES) --define UNICODE --include-dir $(INCDIR) -i $(srcdir)/res.rc -o test.o
- @rm -f test.o
-
-# make rules
-
-.SUFFIXES: .c .o .def .a
-
-.c.o:
- $(CC) -c $(ALL_CFLAGS) -o $@ $<
-
-libdxerr8.a: dxerr8.o dxerr8w.o
- $(AR) r $@ dxerr8.o dxerr8w.o
- $(RANLIB) $@
-
-libdxerr9.a: dxerr9.o dxerr9w.o
- $(AR) r $@ dxerr9.o dxerr9w.o
- $(RANLIB) $@
-
-libdinput.a: dinput.def $(DINPUT_OBJS)
- $(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $(srcdir)/dinput.def
- $(AR) r $@ $(DINPUT_OBJS)
- $(RANLIB) $@
-
-libdinput8.a: dinput8.def $(DINPUT_OBJS)
- $(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $(srcdir)/dinput8.def
- $(AR) r $@ $(DINPUT_OBJS)
- $(RANLIB) $@
-
-lib%.a: %.def %.o
- $(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $(srcdir)/$*.def
- $(AR) r $@ $*.o
- $(RANLIB) $@
-
-lib%.a: %.def
- $(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $<
-
-lib%.a: %.o
- $(AR) rc $@ $*.o
- $(RANLIB) $@
-
-# install headers and libraries in a target specified directory.
-install: install-libraries install-headers
-
-install-libraries: all
- $(mkinstalldirs) $(inst_libdir)
- for i in $(LIBS); do \
- $(INSTALL_DATA) $$i $(inst_libdir)/$$i ; \
- done
-
-install-headers:
- $(mkinstalldirs) $(inst_includedir)
- for i in $(HEADERS); do \
- $(INSTALL_DATA) $(srcdir)/../../include/directx/$$i $(inst_includedir)/$$i ; \
- done
-
-# uninstall headers and libraries from a target specified directory
-uninstall: uninstall-libraries uninstall-headers
-
-uninstall-libraries:
- @for i in $(LIBS); do \
- rm -f $(inst_libdir)/$$i ; \
- done
- rmdir $(inst_libdir)
-
-uninstall-headers:
- @for i in $(HEADERS); do \
- rm -r $(inst_includedir)/$$i ; \
- done
- rmdir $(inst_includedir)
-
-
-dist:
- mkdir $(distdir)/include/directx
- chmod 755 $(distdir)/include/directx
- @for i in $(HEADERS); do \
- cp -p $(srcdir)/../../include/directx/$$i $(distdir)/include/directx/$$i ; \
- done
- mkdir $(distdir)/lib/directx
- chmod 755 $(distdir)/lib/directx
- @for i in $(DISTFILES); do \
- cp -p $(srcdir)/$$i $(distdir)/lib/directx/$$i ; \
- done
-
-Makefile: Makefile.in ../../config.status ../../configure
- cd ../..; $(SHELL) config.status
-
-# clean
-
-mostlyclean:
- rm -f *~ *.o *.s
-
-clean:
- rm -f *.o *.a *.s *~
-
-distclean: clean
- rm -f config.cache config.status config.log Makefile
-
-maintainer-clean: distclean
diff --git a/winsup/w32api/lib/directx/d3d8.def b/winsup/w32api/lib/directx/d3d8.def
deleted file mode 100644
index 7a2040a..0000000
--- a/winsup/w32api/lib/directx/d3d8.def
+++ /dev/null
@@ -1,6 +0,0 @@
-LIBRARY d3d8.dll
-EXPORTS
-DebugSetMute
-Direct3DCreate8@4
-_Z19ValidatePixelShaderPKmPK9_D3DCAPS8mPPc@16=ValidatePixelShader
-_Z20ValidateVertexShaderPKmS0_PK9_D3DCAPS8mPPc@20=ValidateVertexShader
diff --git a/winsup/w32api/lib/directx/d3d9.def b/winsup/w32api/lib/directx/d3d9.def
deleted file mode 100644
index 0abe343..0000000
--- a/winsup/w32api/lib/directx/d3d9.def
+++ /dev/null
@@ -1,8 +0,0 @@
-LIBRARY d3d9.dll
-EXPORTS
-DebugSetLevel
-DebugSetMute
-Direct3DCreate9@4
-_Z30Direct3DShaderValidatorCreate9v=Direct3DShaderValidatorCreate9
-_Z9PSGPErrorP21D3DFE_PROCESSVERTICES11PSGPERRORIDj@12=PSGPError
-_Z17PSGPSampleTextureP21D3DFE_PROCESSVERTICESjPA4_fjS2_@20=PSGPSampleTexture
diff --git a/winsup/w32api/lib/directx/d3dim.def b/winsup/w32api/lib/directx/d3dim.def
deleted file mode 100644
index 62083d7..0000000
--- a/winsup/w32api/lib/directx/d3dim.def
+++ /dev/null
@@ -1,15 +0,0 @@
-LIBRARY d3dim.dll
-EXPORTS
-;D3DFree
-;D3DMalloc
-;D3DRealloc
-Direct3DCreate@12
-;Direct3DCreateDevice
-;Direct3DCreateTexture
-;Direct3DGetSWRastZPixFmts
-Direct3D_HALCleanUp@8
-FlushD3DDevices@4
-FlushD3DDevices2@4
-PaletteAssociateNotify@16
-PaletteUpdateNotify@20
-SurfaceFlipNotify@4
diff --git a/winsup/w32api/lib/directx/d3drm.def b/winsup/w32api/lib/directx/d3drm.def
deleted file mode 100644
index 47e363a..0000000
--- a/winsup/w32api/lib/directx/d3drm.def
+++ /dev/null
@@ -1,23 +0,0 @@
-LIBRARY d3drm.dll
-EXPORTS
-D3DRMColorGetAlpha@4
-D3DRMColorGetBlue@4
-D3DRMColorGetGreen@4
-D3DRMColorGetRed@4
-D3DRMCreateColorRGB@12
-D3DRMCreateColorRGBA@16
-D3DRMMatrixFromQuaternion@8
-D3DRMQuaternionFromRotation@12
-D3DRMQuaternionMultiply@12
-D3DRMQuaternionSlerp@16
-D3DRMVectorAdd@12
-D3DRMVectorCrossProduct@12
-D3DRMVectorDotProduct@8
-D3DRMVectorModulus@4
-D3DRMVectorNormalize@4
-D3DRMVectorRandom@4
-D3DRMVectorReflect@12
-D3DRMVectorRotate@16
-D3DRMVectorScale@12
-D3DRMVectorSubtract@12
-Direct3DRMCreate@4
diff --git a/winsup/w32api/lib/directx/d3dx8d.def b/winsup/w32api/lib/directx/d3dx8d.def
deleted file mode 100644
index 17660ff..0000000
--- a/winsup/w32api/lib/directx/d3dx8d.def
+++ /dev/null
@@ -1,208 +0,0 @@
-LIBRARY d3dx8d.dll
-EXPORTS
-D3DXAssembleShader@24
-D3DXAssembleShaderFromFileA@20
-D3DXAssembleShaderFromFileW@20
-D3DXAssembleShaderFromResourceA@24
-D3DXAssembleShaderFromResourceW@24
-D3DXBoxBoundProbe@16
-D3DXCheckCubeTextureRequirements@24
-D3DXCheckTextureRequirements@28
-D3DXCheckVolumeTextureRequirements@32
-D3DXCleanMesh@20
-D3DXColorAdjustContrast@12
-D3DXColorAdjustSaturation@12
-D3DXCompileEffect@16
-D3DXCompileEffectFromFileA@12
-D3DXCompileEffectFromFileW@12
-D3DXComputeBoundingBox@20
-D3DXComputeBoundingSphere@20
-D3DXComputeNormalMap@24
-D3DXComputeNormals@8
-D3DXComputeTangent@28
-D3DXConvertMeshSubsetToSingleStrip@20
-D3DXConvertMeshSubsetToStrips@28
-D3DXCpuOptimizations@4
-D3DXCreateBox@24
-D3DXCreateBuffer@8
-D3DXCreateCubeTexture@28
-D3DXCreateCubeTextureFromFileA@12
-D3DXCreateCubeTextureFromFileExA@52
-D3DXCreateCubeTextureFromFileExW@52
-D3DXCreateCubeTextureFromFileInMemory@16
-D3DXCreateCubeTextureFromFileInMemoryEx@56
-D3DXCreateCubeTextureFromFileW@12
-D3DXCreateCubeTextureFromResourceA@16
-D3DXCreateCubeTextureFromResourceExA@56
-D3DXCreateCubeTextureFromResourceExW@56
-D3DXCreateCubeTextureFromResourceW@16
-D3DXCreateCylinder@32
-D3DXCreateEffect@20
-D3DXCreateEffectFromFileA@16
-D3DXCreateEffectFromFileW@16
-D3DXCreateEffectFromResourceA@16
-D3DXCreateEffectFromResourceW@16
-D3DXCreateFont@12
-D3DXCreateFontIndirect@12
-D3DXCreateMatrixStack@8
-D3DXCreateMesh@24
-D3DXCreateMeshFVF@24
-D3DXCreatePMeshFromStream@24
-D3DXCreatePolygon@20
-D3DXCreateRenderToEnvMap@24
-D3DXCreateRenderToSurface@28
-D3DXCreateSPMesh@20
-D3DXCreateSkinMesh@28
-D3DXCreateSkinMeshFVF@28
-D3DXCreateSkinMeshFromMesh@12
-D3DXCreateSphere@24
-D3DXCreateSprite@8
-D3DXCreateTeapot@12
-D3DXCreateTextA@32
-D3DXCreateTextW@32
-D3DXCreateTexture@32
-D3DXCreateTextureFromFileA@12
-D3DXCreateTextureFromFileExA@56
-D3DXCreateTextureFromFileExW@56
-D3DXCreateTextureFromFileInMemory@16
-D3DXCreateTextureFromFileInMemoryEx@60
-D3DXCreateTextureFromFileW@12
-D3DXCreateTextureFromResourceA@16
-D3DXCreateTextureFromResourceExA@60
-D3DXCreateTextureFromResourceExW@60
-D3DXCreateTextureFromResourceW@16
-D3DXCreateTorus@28
-D3DXCreateVolumeTexture@36
-D3DXCreateVolumeTextureFromFileA@12
-D3DXCreateVolumeTextureFromFileExA@56
-D3DXCreateVolumeTextureFromFileExW@56
-D3DXCreateVolumeTextureFromFileInMemory@16
-D3DXCreateVolumeTextureFromFileInMemoryEx@60
-D3DXCreateVolumeTextureFromFileW@12
-D3DXCreateVolumeTextureFromResourceA@16
-D3DXCreateVolumeTextureFromResourceExA@60
-D3DXCreateVolumeTextureFromResourceExW@60
-D3DXCreateVolumeTextureFromResourceW@16
-D3DXDeclaratorFromFVF@8
-D3DXFVFFromDeclarator@8
-D3DXFilterCubeTexture@16
-D3DXFillCubeTexture@12
-D3DXFillTexture@12
-D3DXFillVolumeTexture@12
-D3DXFilterTexture@16
-D3DXFresnelTerm@8
-D3DXFilterVolumeTexture@16
-D3DXGeneratePMesh@28
-D3DXGetErrorStringA@12
-D3DXGetErrorStringW@12
-D3DXGetFVFVertexSize@4
-D3DXGetImageInfoFromFileA@8
-D3DXGetImageInfoFromFileInMemory@12
-D3DXGetImageInfoFromFileW@8
-D3DXGetImageInfoFromResourceA@12
-D3DXGetImageInfoFromResourceW@12
-D3DXIntersect@40
-D3DXIntersectSubset@44
-D3DXIntersectTri@32
-D3DXLoadMeshFromX@28
-D3DXLoadMeshFromXInMemory@32
-D3DXLoadMeshFromXResource@36
-D3DXLoadMeshFromXof@28
-D3DXLoadSkinMeshFromXof@36
-D3DXLoadSurfaceFromFileA@32
-D3DXLoadSurfaceFromFileInMemory@36
-D3DXLoadSurfaceFromFileW@32
-D3DXLoadSurfaceFromMemory@40
-D3DXLoadSurfaceFromResourceA@36
-D3DXLoadSurfaceFromResourceW@36
-D3DXLoadSurfaceFromSurface@32
-D3DXLoadVolumeFromFileA@32
-D3DXLoadVolumeFromFileInMemory@36
-D3DXLoadVolumeFromFileW@32
-D3DXLoadVolumeFromMemory@44
-D3DXLoadVolumeFromResourceA@36
-D3DXLoadVolumeFromResourceW@36
-D3DXLoadVolumeFromVolume@32
-D3DXMatrixAffineTransformation@20
-D3DXMatrixInverse@12
-D3DXMatrixLookAtLH@16
-D3DXMatrixLookAtRH@16
-D3DXMatrixMultiply@12
-D3DXMatrixMultiplyTranspose@12
-D3DXMatrixOrthoLH@20
-D3DXMatrixOrthoOffCenterLH@28
-D3DXMatrixOrthoOffCenterRH@28
-D3DXMatrixOrthoRH@20
-D3DXMatrixPerspectiveFovLH@20
-D3DXMatrixPerspectiveFovRH@20
-D3DXMatrixPerspectiveLH@20
-D3DXMatrixPerspectiveOffCenterLH@28
-D3DXMatrixPerspectiveOffCenterRH@28
-D3DXMatrixPerspectiveRH@20
-D3DXMatrixReflect@8
-D3DXMatrixRotationAxis@12
-D3DXMatrixRotationQuaternion@8
-D3DXMatrixRotationX@8
-D3DXMatrixRotationY@8
-D3DXMatrixRotationYawPitchRoll@16
-D3DXMatrixRotationZ@8
-D3DXMatrixScaling@16
-D3DXMatrixShadow@12
-D3DXMatrixTransformation@28
-D3DXMatrixTranslation@16
-D3DXMatrixTranspose@8
-D3DXMatrixfDeterminant@4
-D3DXPlaneFromPointNormal@12
-D3DXPlaneFromPoints@16
-D3DXPlaneIntersectLine@16
-D3DXPlaneNormalize@8
-D3DXPlaneTransform@12
-D3DXQuaternionBaryCentric@24
-D3DXQuaternionExp@8
-D3DXQuaternionInverse@8
-D3DXQuaternionLn@8
-D3DXQuaternionMultiply@12
-D3DXQuaternionNormalize@8
-D3DXQuaternionRotationAxis@12
-D3DXQuaternionRotationMatrix@8
-D3DXQuaternionRotationYawPitchRoll@16
-D3DXQuaternionSlerp@16
-D3DXQuaternionSquad@24
-D3DXQuaternionSquadSetup@28
-D3DXQuaternionToAxisAngle@12
-D3DXSaveMeshToX@24
-D3DXSaveSurfaceToFileA@20
-D3DXSaveSurfaceToFileW@20
-D3DXSaveTextureToFileA@16
-D3DXSaveTextureToFileW@16
-D3DXSaveVolumeToFileA@20
-D3DXSaveVolumeToFileW@20
-D3DXSimplifyMesh@28
-D3DXSphereBoundProbe@16
-D3DXTesselateMesh@20
-D3DXSplitMesh@36
-D3DXTessellateNPatches@24
-D3DXValidMesh@12
-D3DXVec2BaryCentric@24
-D3DXVec2CatmullRom@24
-D3DXVec2Hermite@24
-D3DXVec2Normalize@8
-D3DXVec2Transform@12
-D3DXVec2TransformCoord@12
-D3DXVec2TransformNormal@12
-D3DXVec3BaryCentric@24
-D3DXVec3CatmullRom@24
-D3DXVec3Hermite@24
-D3DXVec3Normalize@8
-D3DXVec3Project@24
-D3DXVec3Transform@12
-D3DXVec3TransformCoord@12
-D3DXVec3TransformNormal@12
-D3DXVec3Unproject@24
-D3DXVec4BaryCentric@24
-D3DXVec4CatmullRom@24
-D3DXVec4Cross@16
-D3DXVec4Hermite@24
-D3DXVec4Normalize@8
-D3DXVec4Transform@12
-D3DXWeldVertices@24
diff --git a/winsup/w32api/lib/directx/d3dx9d.def b/winsup/w32api/lib/directx/d3dx9d.def
deleted file mode 100644
index f8aeaec..0000000
--- a/winsup/w32api/lib/directx/d3dx9d.def
+++ /dev/null
@@ -1,269 +0,0 @@
-LIBRARY d3dx9d.dll
-EXPORTS
-D3DXAssembleShader@28
-D3DXAssembleShaderFromFileA@24
-D3DXAssembleShaderFromFileW@24
-D3DXAssembleShaderFromResourceA@28
-D3DXAssembleShaderFromResourceW@28
-D3DXBoxBoundProbe@16
-D3DXCheckCubeTextureRequirements@24
-D3DXCheckTextureRequirements@28
-D3DXCheckVersion@8
-D3DXCheckVolumeTextureRequirements@32
-D3DXCleanMesh@20
-D3DXColorAdjustContrast@12
-D3DXColorAdjustSaturation@12
-D3DXCompileShader@40
-D3DXCompileShaderFromFileA@36
-D3DXCompileShaderFromFileW@36
-D3DXCompileShaderFromResourceA@40
-D3DXCompileShaderFromResourceW@40
-D3DXComputeBoundingBox@20
-D3DXComputeBoundingSphere@20
-D3DXComputeNormalMap@24
-D3DXComputeNormals@8
-D3DXComputeTangent@24
-D3DXConvertMeshSubsetToSingleStrip@20
-D3DXConvertMeshSubsetToStrips@28
-D3DXCpuOptimizations@4
-D3DXCreateAnimationController@20
-D3DXCreateAnimationSet@16
-D3DXCreateBox@24
-D3DXCreateBuffer@8
-D3DXCreateCubeTexture@28
-D3DXCreateCubeTextureFromFileA@12
-D3DXCreateCubeTextureFromFileExA@52
-D3DXCreateCubeTextureFromFileExW@52
-D3DXCreateCubeTextureFromFileInMemory@16
-D3DXCreateCubeTextureFromFileInMemoryEx@56
-D3DXCreateCubeTextureFromFileW@12
-D3DXCreateCubeTextureFromResourceA@16
-D3DXCreateCubeTextureFromResourceExA@56
-D3DXCreateCubeTextureFromResourceExW@56
-D3DXCreateCubeTextureFromResourceW@16
-D3DXCreateCylinder@32
-D3DXCreateEffect@36
-D3DXCreateEffectCompiler@28
-D3DXCreateEffectCompilerFromFileA@24
-D3DXCreateEffectCompilerFromFileW@24
-D3DXCreateEffectCompilerFromResourceA@28
-D3DXCreateEffectCompilerFromResourceW@28
-D3DXCreateEffectFromFileA@32
-D3DXCreateEffectFromFileW@32
-D3DXCreateEffectFromResourceA@36
-D3DXCreateEffectFromResourceW@36
-D3DXCreateEffectPool@4
-D3DXCreateFont@12
-D3DXCreateFontIndirect@12
-D3DXCreateFragmentLinker@12
-D3DXCreateKeyFrameInterpolator@40
-D3DXCreateLine@8
-D3DXCreateMatrixStack@8
-D3DXCreateMesh@24
-D3DXCreateMeshFVF@24
-D3DXCreateNPatchMesh@8
-D3DXCreatePMeshFromStream@28
-D3DXCreatePatchMesh@28
-D3DXCreatePolygon@20
-D3DXCreateRenderToEnvMap@28
-D3DXCreateRenderToSurface@28
-D3DXCreateSPMesh@20
-D3DXCreateSkinInfo@16
-D3DXCreateSkinInfoFVF@16
-D3DXCreateSkinInfoFromBlendedMesh@16
-D3DXCreateSphere@24
-D3DXCreateSprite@8
-D3DXCreateTeapot@12
-D3DXCreateTextA@32
-D3DXCreateTextW@32
-D3DXCreateTexture@32
-D3DXCreateTextureFromFileA@12
-D3DXCreateTextureFromFileExA@56
-D3DXCreateTextureFromFileExW@56
-D3DXCreateTextureFromFileInMemory@16
-D3DXCreateTextureFromFileInMemoryEx@60
-D3DXCreateTextureFromFileW@12
-D3DXCreateTextureFromResourceA@16
-D3DXCreateTextureFromResourceExA@60
-D3DXCreateTextureFromResourceExW@60
-D3DXCreateTextureFromResourceW@16
-D3DXCreateTorus@28
-D3DXCreateVolumeTexture@36
-D3DXCreateVolumeTextureFromFileA@12
-D3DXCreateVolumeTextureFromFileExA@60
-D3DXCreateVolumeTextureFromFileExW@60
-D3DXCreateVolumeTextureFromFileInMemory@16
-D3DXCreateVolumeTextureFromFileInMemoryEx@64
-D3DXCreateVolumeTextureFromFileW@12
-D3DXCreateVolumeTextureFromResourceA@16
-D3DXCreateVolumeTextureFromResourceExA@64
-D3DXCreateVolumeTextureFromResourceExW@64
-D3DXCreateVolumeTextureFromResourceW@16
-D3DXDeclaratorFromFVF@8
-D3DXFVFFromDeclarator@8
-D3DXFillCubeTexture@12
-D3DXFillCubeTextureTX@16
-D3DXFillTexture@12
-D3DXFillTextureTX@16
-D3DXFillVolumeTexture@12
-D3DXFillVolumeTextureTX@16
-D3DXFilterTexture@16
-D3DXFindShaderComment@16
-D3DXFloat16To32Array@12
-D3DXFloat32To16Array@12
-D3DXFrameAppendChild@8
-D3DXFrameCalculateBoundingSphere@12
-D3DXFrameDestroy@8
-D3DXFrameFind@8
-D3DXFrameNumNamedMatrices@4
-D3DXFrameRegisterNamedMatrices@8
-D3DXFresnelTerm@8
-D3DXGatherFragments@28
-D3DXGatherFragmentsFromFileA@24
-D3DXGatherFragmentsFromFileW@24
-D3DXGatherFragmentsFromResourceA@28
-D3DXGatherFragmentsFromResourceW@28
-D3DXGenerateOutputDecl@8
-D3DXGeneratePMesh@28
-D3DXGetDeclLength@4
-D3DXGetDeclVertexSize@8
-D3DXGetFVFVertexSize@4
-D3DXGetImageInfoFromFileA@8
-D3DXGetImageInfoFromFileInMemory@12
-D3DXGetImageInfoFromFileW@8
-D3DXGetImageInfoFromResourceA@12
-D3DXGetImageInfoFromResourceW@12
-D3DXGetShaderConstantTable@8
-D3DXGetShaderDebugInfo@8
-D3DXGetShaderInputSemantics@12
-D3DXGetShaderOutputSemantics@12
-D3DXGetShaderSamplers@12
-D3DXGetTargetDescByName@12
-D3DXGetTargetDescByVersion@12
-D3DXIntersect@40
-D3DXIntersectSubset@44
-D3DXIntersectTri@32
-D3DXLoadMeshFromXA@32
-D3DXLoadMeshFromXInMemory@36
-D3DXLoadMeshFromXResource@40
-D3DXLoadMeshFromXW@32
-D3DXLoadMeshFromXof@32
-D3DXLoadMeshHierarchyFromXA@28
-D3DXLoadMeshHierarchyFromXInMemory@32
-D3DXLoadMeshHierarchyFromXW@28
-D3DXLoadPatchMeshFromXof@28
-D3DXLoadSkinMeshFromXof@36
-D3DXLoadSurfaceFromFileA@32
-D3DXLoadSurfaceFromFileInMemory@36
-D3DXLoadSurfaceFromFileW@32
-D3DXLoadSurfaceFromMemory@40
-D3DXLoadSurfaceFromResourceA@36
-D3DXLoadSurfaceFromResourceW@36
-D3DXLoadSurfaceFromSurface@32
-D3DXLoadVolumeFromFileA@32
-D3DXLoadVolumeFromFileInMemory@36
-D3DXLoadVolumeFromFileW@32
-D3DXLoadVolumeFromMemory@44
-D3DXLoadVolumeFromResourceA@36
-D3DXLoadVolumeFromResourceW@36
-D3DXLoadVolumeFromVolume@32
-D3DXMatrixAffineTransformation@20
-D3DXMatrixDeterminant@4
-D3DXMatrixInverse@12
-D3DXMatrixLookAtLH@16
-D3DXMatrixLookAtRH@16
-D3DXMatrixMultiply@12
-D3DXMatrixMultiplyTranspose@12
-D3DXMatrixOrthoLH@20
-D3DXMatrixOrthoOffCenterLH@28
-D3DXMatrixOrthoOffCenterRH@28
-D3DXMatrixOrthoRH@20
-D3DXMatrixPerspectiveFovLH@20
-D3DXMatrixPerspectiveFovRH@20
-D3DXMatrixPerspectiveLH@20
-D3DXMatrixPerspectiveOffCenterLH@28
-D3DXMatrixPerspectiveOffCenterRH@28
-D3DXMatrixPerspectiveRH@20
-D3DXMatrixReflect@8
-D3DXMatrixRotationAxis@12
-D3DXMatrixRotationQuaternion@8
-D3DXMatrixRotationX@8
-D3DXMatrixRotationY@8
-D3DXMatrixRotationYawPitchRoll@16
-D3DXMatrixRotationZ@8
-D3DXMatrixScaling@16
-D3DXMatrixShadow@12
-D3DXMatrixTransformation@28
-D3DXMatrixTranslation@16
-D3DXMatrixTranspose@8
-D3DXPlaneFromPointNormal@12
-D3DXPlaneFromPoints@16
-D3DXPlaneIntersectLine@16
-D3DXPlaneNormalize@8
-D3DXPlaneTransform@12
-D3DXPlaneTransformArray@24
-D3DXQuaternionBaryCentric@24
-D3DXQuaternionExp@8
-D3DXQuaternionInverse@8
-D3DXQuaternionLn@8
-D3DXQuaternionMultiply@12
-D3DXQuaternionNormalize@8
-D3DXQuaternionRotationAxis@12
-D3DXQuaternionRotationMatrix@8
-D3DXQuaternionRotationYawPitchRoll@16
-D3DXQuaternionSlerp@16
-D3DXQuaternionSquad@24
-D3DXQuaternionSquadSetup@28
-D3DXQuaternionToAxisAngle@12
-D3DXRectPatchSize@12
-D3DXSaveMeshHierarchyToFileA@20
-D3DXSaveMeshHierarchyToFileW@20
-D3DXSaveMeshToXA@28
-D3DXSaveMeshToXW@28
-D3DXSaveSurfaceToFileA@20
-D3DXSaveSurfaceToFileW@20
-D3DXSaveTextureToFileA@16
-D3DXSaveTextureToFileW@16
-D3DXSaveVolumeToFileA@20
-D3DXSaveVolumeToFileW@20
-D3DXSimplifyMesh@28
-D3DXSphereBoundProbe@16
-D3DXSplitMesh@36
-D3DXTessellateNPatches@24
-D3DXTessellateRectPatch@20
-D3DXTessellateTriPatch@20
-D3DXTriPatchSize@12
-D3DXValidMesh@12
-D3DXValidPatchMesh@16
-D3DXVec2BaryCentric@24
-D3DXVec2CatmullRom@24
-D3DXVec2Hermite@24
-D3DXVec2Normalize@8
-D3DXVec2Transform@12
-D3DXVec2TransformArray@24
-D3DXVec2TransformCoord@12
-D3DXVec2TransformCoordArray@24
-D3DXVec2TransformNormal@12
-D3DXVec2TransformNormalArray@24
-D3DXVec3BaryCentric@24
-D3DXVec3CatmullRom@24
-D3DXVec3Hermite@24
-D3DXVec3Normalize@8
-D3DXVec3Project@24
-D3DXVec3ProjectArray@36
-D3DXVec3Transform@12
-D3DXVec3TransformArray@24
-D3DXVec3TransformCoord@12
-D3DXVec3TransformCoordArray@24
-D3DXVec3TransformNormal@12
-D3DXVec3TransformNormalArray@24
-D3DXVec3Unproject@24
-D3DXVec3UnprojectArray@36
-D3DXVec4BaryCentric@24
-D3DXVec4CatmullRom@24
-D3DXVec4Cross@16
-D3DXVec4Hermite@24
-D3DXVec4Normalize@8
-D3DXVec4Transform@12
-D3DXVec4TransformArray@24
-D3DXWeldVertices@28
diff --git a/winsup/w32api/lib/directx/d3dxof.def b/winsup/w32api/lib/directx/d3dxof.def
deleted file mode 100644
index 674139d..0000000
--- a/winsup/w32api/lib/directx/d3dxof.def
+++ /dev/null
@@ -1,3 +0,0 @@
-LIBRARY d3dxof.dll
-EXPORTS
-DirectXFileCreate@4
diff --git a/winsup/w32api/lib/directx/ddraw.def b/winsup/w32api/lib/directx/ddraw.def
deleted file mode 100644
index fdf57c1..0000000
--- a/winsup/w32api/lib/directx/ddraw.def
+++ /dev/null
@@ -1,15 +0,0 @@
-LIBRARY ddraw.dll
-EXPORTS
-DDGetAttachedSurfaceLcl@12
-DDInternalLock@8
-DDInternalUnlock@4
-DSoundHelp@12
-DirectDrawCreate@12
-DirectDrawCreateClipper@12
-DirectDrawCreateEx@16
-DirectDrawEnumerateA@8
-DirectDrawEnumerateExA@12
-DirectDrawEnumerateExW@12
-DirectDrawEnumerateW@8
-GetDDSurfaceLocal@12
-GetSurfaceFromDC@12
diff --git a/winsup/w32api/lib/directx/dinput.def b/winsup/w32api/lib/directx/dinput.def
deleted file mode 100644
index 249f56b..0000000
--- a/winsup/w32api/lib/directx/dinput.def
+++ /dev/null
@@ -1,5 +0,0 @@
-LIBRARY dinput.dll
-EXPORTS
-DirectInputCreateA@16
-DirectInputCreateEx@20
-DirectInputCreateW@16
diff --git a/winsup/w32api/lib/directx/dinput8.def b/winsup/w32api/lib/directx/dinput8.def
deleted file mode 100644
index a36cc53..0000000
--- a/winsup/w32api/lib/directx/dinput8.def
+++ /dev/null
@@ -1,3 +0,0 @@
-LIBRARY dinput8.dll
-EXPORTS
-DirectInput8Create@20
diff --git a/winsup/w32api/lib/directx/dinput_joy.c b/winsup/w32api/lib/directx/dinput_joy.c
deleted file mode 100644
index e2a6f9f..0000000
--- a/winsup/w32api/lib/directx/dinput_joy.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
-
- dinput_joy.c - DirectInput Joystick DATAFORMAT
-
- Written by Filip Navara <xnavara@volny.cz>
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#include "dinput_private.h"
-
-static DIOBJECTDATAFORMAT ATTRIBUTE_TEXT_SECTION c_rgodfDIJoy[] =
-{
- {&GUID_XAxis,0x0,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTPOSITION},
- {&GUID_YAxis,0x4,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTPOSITION},
- {&GUID_ZAxis,0x8,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTPOSITION},
- {&GUID_RxAxis,0xc,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTPOSITION},
- {&GUID_RyAxis,0x10,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTPOSITION},
- {&GUID_RzAxis,0x14,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTPOSITION},
- {&GUID_Slider,0x18,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTPOSITION},
- {&GUID_Slider,0x1c,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTPOSITION},
- {&GUID_POV,0x20,DIDFT_POV|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {&GUID_POV,0x24,DIDFT_POV|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {&GUID_POV,0x28,DIDFT_POV|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {&GUID_POV,0x2c,DIDFT_POV|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x30,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x31,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x32,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x33,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x34,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x35,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x36,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x37,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x38,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x39,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x3a,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x3b,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x3c,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x3d,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x3e,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x3f,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x40,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x41,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x42,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x43,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x44,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x45,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x46,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x47,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x48,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x49,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x4a,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x4b,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x4c,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x4d,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x4e,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x4f,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}
-};
-
-const DIDATAFORMAT c_dfDIJoystick = {sizeof(DIDATAFORMAT),sizeof(DIOBJECTDATAFORMAT),DIDF_ABSAXIS,80,sizeof(c_rgodfDIJoy)/sizeof(c_rgodfDIJoy[0]),c_rgodfDIJoy};
diff --git a/winsup/w32api/lib/directx/dinput_joy2.c b/winsup/w32api/lib/directx/dinput_joy2.c
deleted file mode 100644
index 3c27abd..0000000
--- a/winsup/w32api/lib/directx/dinput_joy2.c
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
-
- dinput_joy2.c - DirectInput Joystick 2 DATAFORMAT
-
- Written by Filip Navara <xnavara@volny.cz>
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#include "dinput_private.h"
-
-static DIOBJECTDATAFORMAT ATTRIBUTE_TEXT_SECTION c_rgodfDIJoy2[] =
-{
- {&GUID_XAxis,0x0,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTPOSITION},
- {&GUID_YAxis,0x4,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTPOSITION},
- {&GUID_ZAxis,0x8,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTPOSITION},
- {&GUID_RxAxis,0xc,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTPOSITION},
- {&GUID_RyAxis,0x10,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTPOSITION},
- {&GUID_RzAxis,0x14,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTPOSITION},
- {&GUID_Slider,0x18,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTPOSITION},
- {&GUID_Slider,0x1c,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTPOSITION},
- {&GUID_POV,0x20,DIDFT_POV|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {&GUID_POV,0x24,DIDFT_POV|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {&GUID_POV,0x28,DIDFT_POV|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {&GUID_POV,0x2c,DIDFT_POV|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x30,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x31,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x32,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x33,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x34,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x35,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x36,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x37,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x38,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x39,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x3a,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x3b,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x3c,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x3d,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x3e,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x3f,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x40,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x41,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x42,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x43,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x44,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x45,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x46,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x47,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x48,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x49,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x4a,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x4b,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x4c,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x4d,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x4e,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x4f,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x50,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x51,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x52,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x53,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x54,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x55,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x56,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x57,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x58,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x59,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x5a,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x5b,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x5c,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x5d,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x5e,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x5f,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x60,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x61,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x62,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x63,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x64,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x65,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x66,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x67,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x68,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x69,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x6a,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x6b,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x6c,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x6d,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x6e,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x6f,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x70,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x71,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x72,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x73,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x74,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x75,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x76,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x77,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x78,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x79,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x7a,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x7b,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x7c,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x7d,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x7e,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x7f,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x80,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x81,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x82,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x83,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x84,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x85,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x86,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x87,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x88,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x89,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x8a,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x8b,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x8c,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x8d,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x8e,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x8f,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x90,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x91,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x92,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x93,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x94,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x95,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x96,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x97,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x98,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x99,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x9a,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x9b,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x9c,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x9d,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x9e,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x9f,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0xa0,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0xa1,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0xa2,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0xa3,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0xa4,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0xa5,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0xa6,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0xa7,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0xa8,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0xa9,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0xaa,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0xab,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0xac,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0xad,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0xae,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0xaf,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {&GUID_XAxis,0xb0,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTVELOCITY},
- {&GUID_YAxis,0xb4,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTVELOCITY},
- {&GUID_ZAxis,0xb8,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTVELOCITY},
- {&GUID_RxAxis,0xbc,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTVELOCITY},
- {&GUID_RyAxis,0xc0,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTVELOCITY},
- {&GUID_RzAxis,0xc4,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTVELOCITY},
- {&GUID_Slider,0x18,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTVELOCITY},
- {&GUID_Slider,0x1c,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTVELOCITY},
- {&GUID_XAxis,0xd0,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTACCEL},
- {&GUID_YAxis,0xd4,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTACCEL},
- {&GUID_ZAxis,0xd8,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTACCEL},
- {&GUID_RxAxis,0xdc,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTACCEL},
- {&GUID_RyAxis,0xe0,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTACCEL},
- {&GUID_RzAxis,0xe4,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTACCEL},
- {&GUID_Slider,0x18,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTACCEL},
- {&GUID_Slider,0x1c,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTACCEL},
- {&GUID_XAxis,0xf0,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTFORCE},
- {&GUID_YAxis,0xf4,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTFORCE},
- {&GUID_ZAxis,0xf8,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTFORCE},
- {&GUID_RxAxis,0xfc,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTFORCE},
- {&GUID_RyAxis,0x100,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTFORCE},
- {&GUID_RzAxis,0x104,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTFORCE},
- {&GUID_Slider,0x18,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTFORCE},
- {&GUID_Slider,0x1c,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,DIDOI_ASPECTFORCE}
-};
-
-const DIDATAFORMAT c_dfDIJoystick2 = {sizeof(DIDATAFORMAT),sizeof(DIOBJECTDATAFORMAT),DIDF_ABSAXIS,272,sizeof(c_rgodfDIJoy2)/sizeof(c_rgodfDIJoy2[0]),c_rgodfDIJoy2};
diff --git a/winsup/w32api/lib/directx/dinput_kbd.c b/winsup/w32api/lib/directx/dinput_kbd.c
deleted file mode 100644
index 88cac86..0000000
--- a/winsup/w32api/lib/directx/dinput_kbd.c
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
-
- dinput_kbd.c - DirectInput Keyboard DATAFORMAT
-
- Written by Filip Navara <xnavara@volny.cz>
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#include "dinput_private.h"
-
-static DIOBJECTDATAFORMAT ATTRIBUTE_TEXT_SECTION c_rgodfDIKeyboard[] =
-{
- {&GUID_Key,0x0,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x0)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x1,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x1)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x2,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x2)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x3,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x3)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x4,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x4)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x5,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x5)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x6,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x6)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x7,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x7)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x8,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x8)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x9,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x9)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xa,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xa)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xb,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xb)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xc,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xc)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xd,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xd)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xe,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xe)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xf,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xf)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x10,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x10)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x11,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x11)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x12,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x12)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x13,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x13)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x14,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x14)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x15,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x15)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x16,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x16)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x17,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x17)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x18,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x18)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x19,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x19)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x1a,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x1a)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x1b,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x1b)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x1c,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x1c)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x1d,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x1d)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x1e,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x1e)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x1f,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x1f)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x20,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x20)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x21,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x21)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x22,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x22)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x23,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x23)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x24,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x24)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x25,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x25)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x26,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x26)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x27,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x27)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x28,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x28)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x29,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x29)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x2a,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x2a)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x2b,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x2b)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x2c,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x2c)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x2d,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x2d)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x2e,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x2e)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x2f,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x2f)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x30,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x30)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x31,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x31)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x32,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x32)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x33,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x33)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x34,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x34)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x35,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x35)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x36,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x36)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x37,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x37)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x38,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x38)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x39,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x39)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x3a,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x3a)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x3b,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x3b)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x3c,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x3c)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x3d,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x3d)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x3e,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x3e)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x3f,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x3f)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x40,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x40)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x41,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x41)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x42,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x42)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x43,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x43)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x44,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x44)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x45,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x45)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x46,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x46)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x47,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x47)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x48,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x48)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x49,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x49)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x4a,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x4a)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x4b,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x4b)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x4c,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x4c)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x4d,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x4d)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x4e,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x4e)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x4f,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x4f)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x50,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x50)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x51,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x51)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x52,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x52)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x53,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x53)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x54,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x54)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x55,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x55)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x56,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x56)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x57,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x57)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x58,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x58)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x59,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x59)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x5a,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x5a)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x5b,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x5b)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x5c,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x5c)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x5d,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x5d)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x5e,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x5e)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x5f,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x5f)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x60,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x60)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x61,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x61)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x62,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x62)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x63,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x63)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x64,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x64)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x65,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x65)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x66,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x66)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x67,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x67)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x68,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x68)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x69,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x69)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x6a,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x6a)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x6b,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x6b)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x6c,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x6c)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x6d,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x6d)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x6e,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x6e)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x6f,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x6f)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x70,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x70)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x71,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x71)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x72,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x72)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x73,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x73)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x74,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x74)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x75,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x75)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x76,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x76)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x77,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x77)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x78,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x78)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x79,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x79)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x7a,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x7a)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x7b,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x7b)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x7c,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x7c)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x7d,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x7d)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x7e,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x7e)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x7f,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x7f)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x80,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x80)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x81,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x81)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x82,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x82)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x83,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x83)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x84,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x84)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x85,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x85)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x86,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x86)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x87,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x87)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x88,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x88)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x89,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x89)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x8a,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x8a)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x8b,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x8b)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x8c,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x8c)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x8d,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x8d)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x8e,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x8e)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x8f,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x8f)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x90,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x90)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x91,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x91)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x92,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x92)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x93,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x93)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x94,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x94)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x95,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x95)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x96,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x96)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x97,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x97)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x98,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x98)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x99,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x99)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x9a,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x9a)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x9b,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x9b)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x9c,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x9c)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x9d,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x9d)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x9e,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x9e)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0x9f,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0x9f)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xa0,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xa0)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xa1,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xa1)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xa2,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xa2)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xa3,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xa3)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xa4,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xa4)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xa5,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xa5)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xa6,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xa6)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xa7,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xa7)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xa8,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xa8)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xa9,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xa9)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xaa,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xaa)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xab,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xab)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xac,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xac)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xad,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xad)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xae,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xae)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xaf,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xaf)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xb0,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xb0)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xb1,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xb1)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xb2,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xb2)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xb3,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xb3)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xb4,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xb4)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xb5,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xb5)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xb6,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xb6)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xb7,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xb7)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xb8,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xb8)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xb9,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xb9)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xba,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xba)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xbb,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xbb)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xbc,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xbc)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xbd,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xbd)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xbe,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xbe)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xbf,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xbf)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xc0,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xc0)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xc1,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xc1)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xc2,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xc2)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xc3,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xc3)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xc4,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xc4)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xc5,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xc5)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xc6,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xc6)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xc7,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xc7)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xc8,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xc8)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xc9,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xc9)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xca,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xca)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xcb,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xcb)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xcc,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xcc)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xcd,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xcd)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xce,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xce)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xcf,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xcf)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xd0,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xd0)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xd1,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xd1)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xd2,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xd2)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xd3,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xd3)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xd4,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xd4)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xd5,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xd5)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xd6,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xd6)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xd7,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xd7)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xd8,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xd8)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xd9,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xd9)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xda,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xda)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xdb,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xdb)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xdc,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xdc)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xdd,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xdd)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xde,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xde)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xdf,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xdf)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xe0,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xe0)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xe1,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xe1)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xe2,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xe2)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xe3,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xe3)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xe4,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xe4)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xe5,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xe5)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xe6,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xe6)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xe7,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xe7)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xe8,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xe8)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xe9,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xe9)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xea,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xea)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xeb,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xeb)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xec,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xec)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xed,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xed)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xee,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xee)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xef,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xef)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xf0,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xf0)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xf1,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xf1)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xf2,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xf2)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xf3,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xf3)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xf4,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xf4)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xf5,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xf5)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xf6,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xf6)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xf7,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xf7)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xf8,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xf8)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xf9,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xf9)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xfa,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xfa)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xfb,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xfb)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xfc,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xfc)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xfd,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xfd)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xfe,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xfe)|DIDFT_OPTIONAL,0x0},
- {&GUID_Key,0xff,DIDFT_BUTTON|DIDFT_MAKEINSTANCE(0xff)|DIDFT_OPTIONAL,0x0}
-};
-
-const DIDATAFORMAT c_dfDIKeyboard = {sizeof(DIDATAFORMAT),sizeof(DIOBJECTDATAFORMAT),DIDF_RELAXIS,256,sizeof(c_rgodfDIKeyboard)/sizeof(c_rgodfDIKeyboard[0]),c_rgodfDIKeyboard};
diff --git a/winsup/w32api/lib/directx/dinput_mouse.c b/winsup/w32api/lib/directx/dinput_mouse.c
deleted file mode 100644
index 21e3e03..0000000
--- a/winsup/w32api/lib/directx/dinput_mouse.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-
- dinput_mouse.c - DirectInput Mouse DATAFORMAT
-
- Written by Filip Navara <xnavara@volny.cz>
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#include "dinput_private.h"
-
-static DIOBJECTDATAFORMAT ATTRIBUTE_TEXT_SECTION c_rgodfDIMouse[] =
-{
- {&GUID_XAxis,0x0,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE,0x0},
- {&GUID_YAxis,0x4,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE,0x0},
- {&GUID_ZAxis,0x8,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0xc,DIDFT_BUTTON|DIDFT_ANYINSTANCE,0x0},
- {NULL,0xd,DIDFT_BUTTON|DIDFT_ANYINSTANCE,0x0},
- {NULL,0xe,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0xf,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}
-};
-
-const DIDATAFORMAT c_dfDIMouse = {sizeof(DIDATAFORMAT),sizeof(DIOBJECTDATAFORMAT),DIDF_RELAXIS,16,sizeof(c_rgodfDIMouse)/sizeof(c_rgodfDIMouse[0]),c_rgodfDIMouse};
diff --git a/winsup/w32api/lib/directx/dinput_mouse2.c b/winsup/w32api/lib/directx/dinput_mouse2.c
deleted file mode 100644
index 90f46c0..0000000
--- a/winsup/w32api/lib/directx/dinput_mouse2.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-
- dinput_mouse2.c - DirectInput Mouse DATAFORMAT
-
- Written by Filip Navara <xnavara@volny.cz>
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#include "dinput_private.h"
-
-static DIOBJECTDATAFORMAT ATTRIBUTE_TEXT_SECTION c_rgodfDIMouse2[] =
-{
- {&GUID_XAxis,0x0,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE,0x0},
- {&GUID_YAxis,0x4,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE,0x0},
- {&GUID_ZAxis,0x8,DIDFT_ABSAXIS|DIDFT_RELAXIS|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0xc,DIDFT_BUTTON|DIDFT_ANYINSTANCE,0x0},
- {NULL,0xd,DIDFT_BUTTON|DIDFT_ANYINSTANCE,0x0},
- {NULL,0xe,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0xf,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x10,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x11,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x12,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0},
- {NULL,0x13,DIDFT_BUTTON|DIDFT_ANYINSTANCE|DIDFT_OPTIONAL,0x0}
-};
-
-const DIDATAFORMAT c_dfDIMouse2 = {sizeof(DIDATAFORMAT),sizeof(DIOBJECTDATAFORMAT),DIDF_RELAXIS,20,sizeof(c_rgodfDIMouse2)/sizeof(c_rgodfDIMouse2[0]),c_rgodfDIMouse2};
diff --git a/winsup/w32api/lib/directx/dinput_private.h b/winsup/w32api/lib/directx/dinput_private.h
deleted file mode 100644
index e162913..0000000
--- a/winsup/w32api/lib/directx/dinput_private.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
-
- directx/dinput_private.h - DirectInput DATAFORMATs Definitions
-
- Written by Filip Navara <xnavara@volny.cz>
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#ifndef _DINPUT_PRIVATE_H
-#define _DINPUT_PRIVATE_H
-
-#include <windows.h>
-
-#define DIDOI_FFACTUATOR 0x00000001
-#define DIDOI_FFEFFECTTRIGGER 0x00000002
-#define DIDOI_POLLED 0x00008000
-#define DIDOI_ASPECTPOSITION 0x00000100
-#define DIDOI_ASPECTVELOCITY 0x00000200
-#define DIDOI_ASPECTACCEL 0x00000300
-#define DIDOI_ASPECTFORCE 0x00000400
-#define DIDOI_ASPECTMASK 0x00000F00
-#define DIDOI_GUIDISUSAGE 0x00010000
-#define DIDF_ABSAXIS 0x00000001
-#define DIDF_RELAXIS 0x00000002
-#define DIDFT_RELAXIS 0x00000001
-#define DIDFT_ABSAXIS 0x00000002
-#define DIDFT_AXIS 0x00000003
-#define DIDFT_PSHBUTTON 0x00000004
-#define DIDFT_TGLBUTTON 0x00000008
-#define DIDFT_BUTTON 0x0000000C
-#define DIDFT_POV 0x00000010
-#define DIDFT_COLLECTION 0x00000040
-#define DIDFT_NODATA 0x00000080
-#define DIDFT_ANYINSTANCE 0x00FFFF00
-#define DIDFT_FFACTUATOR 0x01000000
-#define DIDFT_FFEFFECTTRIGGER 0x02000000
-#define DIDFT_OUTPUT 0x10000000
-#define DIDFT_VENDORDEFINED 0x04000000
-#define DIDFT_ALIAS 0x08000000
-#define DIDFT_OPTIONAL 0x80000000
-#define DIDFT_MAKEINSTANCE(n) ((WORD)(n) << 8)
-
-typedef struct _DIOBJECTDATAFORMAT {
- const GUID *pguid;
- DWORD dwOfs;
- DWORD dwType;
- DWORD dwFlags;
-} DIOBJECTDATAFORMAT, *LPDIOBJECTDATAFORMAT;
-
-typedef struct _DIDATAFORMAT {
- DWORD dwSize;
- DWORD dwObjSize;
- DWORD dwFlags;
- DWORD dwDataSize;
- DWORD dwNumObjs;
- LPDIOBJECTDATAFORMAT rgodf;
-} DIDATAFORMAT, *LPDIDATAFORMAT;
-
-extern GUID GUID_XAxis;
-extern GUID GUID_YAxis;
-extern GUID GUID_ZAxis;
-extern GUID GUID_RxAxis;
-extern GUID GUID_RyAxis;
-extern GUID GUID_RzAxis;
-extern GUID GUID_Slider;
-extern GUID GUID_Key;
-extern GUID GUID_POV;
-
-#if defined (__WATCOMC__)
-#define ATTRIBUTE_TEXT_SECTION __based( __segname( "_CODE" ) )
-#elif defined (__GNUC__)
-#define ATTRIBUTE_TEXT_SECTION __attribute__ ((section(".text")))
-#else
-#define ATTRIBUTE_TEXT_SECTION
-#endif
-
-#endif
diff --git a/winsup/w32api/lib/directx/dmoguids.c b/winsup/w32api/lib/directx/dmoguids.c
deleted file mode 100644
index c9606b8..0000000
--- a/winsup/w32api/lib/directx/dmoguids.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-
- dmoguids.c - DirectMedia Objects GUIDs
-
- Written by Filip Navara <xnavara@volny.cz>
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#if defined(__LCC__) || defined(__GNUC__)
-#define INITGUID 1
-#include <windows.h>
-#else
-#include <basetyps.h>
-#endif
-
-DEFINE_GUID(CLSID_DMOFilterCategory,0xbcd5796c,0xbd52,0x4d30,0xab,0x76,0x70,0xf9,0x75,0xb8,0x91,0x99);
-DEFINE_GUID(CLSID_DMOWrapperFilter,0x94297043,0xbd82,0x4dfd,0xb0,0xde,0x81,0x77,0x73,0x9c,0x6d,0x20);
-DEFINE_GUID(DMOCATEGORY_ACOUSTIC_ECHO_CANCEL,0xbf963d80l,0xc559,0x11d0,0x8a,0x2b,0x00,0xa0,0xc9,0x25,0x5a,0xc1);
-DEFINE_GUID(DMOCATEGORY_AGC,0xe88c9ba0l,0xc557,0x11d0,0x8a,0x2b,0x0,0xa0,0xc9,0x25,0x5a,0xc1);
-DEFINE_GUID(DMOCATEGORY_AUDIO_CAPTURE_EFFECT,0xf665aaba,0x3e09,0x4920,0xaa,0x5f,0x21,0x98,0x11,0x14,0x8f,0x09);
-DEFINE_GUID(DMOCATEGORY_AUDIO_DECODER,0x57f2db8b,0xe6bb,0x4513,0x9d,0x43,0xdc,0xd2,0xa6,0x59,0x31,0x25);
-DEFINE_GUID(DMOCATEGORY_AUDIO_EFFECT,0xf3602b3f,0x0592,0x48df,0xa4,0xcd,0x67,0x47,0x21,0xe7,0xeb,0xeb);
-DEFINE_GUID(DMOCATEGORY_AUDIO_ENCODER,0x33d9a761,0x90c8,0x11d0,0xbd,0x43,0x0,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(DMOCATEGORY_AUDIO_NOISE_SUPPRESS,0xe07f903f,0x62fd,0x4e60,0x8c,0xdd,0xde,0xa7,0x23,0x66,0x65,0xb5);
-DEFINE_GUID(DMOCATEGORY_VIDEO_DECODER,0x4a69b442,0x28be,0x4991,0x96,0x9c,0xb5,0x00,0xad,0xf5,0xd8,0xa8);
-DEFINE_GUID(DMOCATEGORY_VIDEO_EFFECT,0xd990ee14,0x776c,0x4723,0xbe,0x46,0x3d,0xa2,0xf5,0x6f,0x10,0xb9);
-DEFINE_GUID(DMOCATEGORY_VIDEO_ENCODER,0x33d9a760,0x90c8,0x11d0,0xbd,0x43,0x0,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(IID_IDMOWrapperFilter,0x52d6f586,0x9f0f,0x4824,0x8f,0xc8,0xe3,0x2c,0xa0,0x49,0x30,0xc2);
-DEFINE_GUID(IID_IMediaParamInfo,0x6d6cbb60,0xa223,0x44aa,0x84,0x2f,0xa2,0xf0,0x67,0x50,0xbe,0x6d);
-DEFINE_GUID(IID_IMediaParams,0x6d6cbb61,0xa223,0x44aa,0x84,0x2f,0xa2,0xf0,0x67,0x50,0xbe,0x6e);
-DEFINE_GUID(IID_IDMOQualityControl,0x65abea96,0xcf36,0x453f,0xaf,0x8a,0x70,0x5e,0x98,0xf1,0x62,0x60);
-DEFINE_GUID(IID_IDMOVideoOutputOptimizations,0xbe8f4f4e,0x5b16,0x4d29,0xb3,0x50,0x7f,0x6b,0x5d,0x92,0x98,0xac);
-DEFINE_GUID(IID_IEnumDMO,0x2c3cd98a,0x2bfa,0x4a53,0x9c,0x27,0x52,0x49,0xba,0x64,0xba,0x0f);
-DEFINE_GUID(IID_IMediaBuffer,0x59eff8b9,0x938c,0x4a26,0x82,0xf2,0x95,0xcb,0x84,0xcd,0xc8,0x37);
-DEFINE_GUID(IID_IMediaObject,0xd8ad0f58,0x5494,0x4102,0x97,0xc5,0xec,0x79,0x8e,0x59,0xbc,0xf4);
-DEFINE_GUID(IID_IMediaObjectInPlace,0x651b9ad0,0x0fc7,0x4aa9,0x95,0x38,0xd8,0x99,0x31,0x01,0x07,0x41);
diff --git a/winsup/w32api/lib/directx/dplayx.def b/winsup/w32api/lib/directx/dplayx.def
deleted file mode 100644
index 7916007..0000000
--- a/winsup/w32api/lib/directx/dplayx.def
+++ /dev/null
@@ -1,8 +0,0 @@
-LIBRARY dplayx.dll
-EXPORTS
-DirectPlayCreate@12
-DirectPlayEnumerate@8
-DirectPlayEnumerateA@8
-DirectPlayEnumerateW@8
-DirectPlayLobbyCreateA@20
-DirectPlayLobbyCreateW@20
diff --git a/winsup/w32api/lib/directx/dpnaddr.def b/winsup/w32api/lib/directx/dpnaddr.def
deleted file mode 100644
index c025df5..0000000
--- a/winsup/w32api/lib/directx/dpnaddr.def
+++ /dev/null
@@ -1,3 +0,0 @@
-LIBRARY dpnaddr.dll
-EXPORTS
-DirectPlay8AddressCreate@12
diff --git a/winsup/w32api/lib/directx/dpnet.def b/winsup/w32api/lib/directx/dpnet.def
deleted file mode 100644
index b8ee125..0000000
--- a/winsup/w32api/lib/directx/dpnet.def
+++ /dev/null
@@ -1,3 +0,0 @@
-LIBRARY dpnet.dll
-EXPORTS
-DirectPlay8Create@12
diff --git a/winsup/w32api/lib/directx/dpnlobby.def b/winsup/w32api/lib/directx/dpnlobby.def
deleted file mode 100644
index 18ac165..0000000
--- a/winsup/w32api/lib/directx/dpnlobby.def
+++ /dev/null
@@ -1,3 +0,0 @@
-LIBRARY dpnlobby.def
-EXPORTS
-DirectPlay8LobbyCreate@12
diff --git a/winsup/w32api/lib/directx/dpvoice.def b/winsup/w32api/lib/directx/dpvoice.def
deleted file mode 100644
index ac5d5b3..0000000
--- a/winsup/w32api/lib/directx/dpvoice.def
+++ /dev/null
@@ -1,3 +0,0 @@
-LIBRARY dpvoice.dll
-EXPORTS
-DirectPlayVoiceCreate@12
diff --git a/winsup/w32api/lib/directx/dsetup.def b/winsup/w32api/lib/directx/dsetup.def
deleted file mode 100644
index 776234a..0000000
--- a/winsup/w32api/lib/directx/dsetup.def
+++ /dev/null
@@ -1,20 +0,0 @@
-LIBRARY dsetup.dll
-EXPORTS
-DirectXDeviceDriverSetupA@16
-DirectXDeviceDriverSetupW@16
-DirectXLoadString@12
-DirectXRegisterApplicationA@8
-DirectXRegisterApplicationW@8
-DirectXSetupA@12
-DirectXSetupCallback@20
-DirectXSetupGetEULAA@12
-DirectXSetupGetEULAW@12
-DirectXSetupGetFileVersion@12
-DirectXSetupGetVersion@8
-DirectXSetupIsEng@0
-DirectXSetupIsJapan@0
-DirectXSetupIsJapanNec@0
-DirectXSetupSetCallback@4
-DirectXSetupShowEULA@4
-DirectXSetupW@12
-DirectXUnRegisterApplication@8
diff --git a/winsup/w32api/lib/directx/dsound.def b/winsup/w32api/lib/directx/dsound.def
deleted file mode 100644
index 36049c9..0000000
--- a/winsup/w32api/lib/directx/dsound.def
+++ /dev/null
@@ -1,12 +0,0 @@
-LIBRARY dsound.dll
-EXPORTS
-DirectSoundCaptureCreate@12
-DirectSoundCaptureCreate8@12
-DirectSoundCaptureEnumerateA@8
-DirectSoundCaptureEnumerateW@8
-DirectSoundCreate@12
-DirectSoundCreate8@12
-DirectSoundEnumerateA@8
-DirectSoundEnumerateW@8
-DirectSoundFullDuplexCreate@40
-GetDeviceID@8
diff --git a/winsup/w32api/lib/directx/dxerr.c b/winsup/w32api/lib/directx/dxerr.c
deleted file mode 100644
index e893c75..0000000
--- a/winsup/w32api/lib/directx/dxerr.c
+++ /dev/null
@@ -1,773 +0,0 @@
-/*
-
- dxerr.c - DirectX 8 & 9 Error Functions
-
- Written by Filip Navara <xnavara@volny.cz>
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- NOTE: Do not use this file directly!
-
-*/
-
-#include <windows.h>
-
-#ifndef DXERROR
-#define DXERROR(v,n,d) {v, TEXT(n), TEXT(d)},
-#define DXERRORLAST(v,n,d) {v, TEXT(n), TEXT(d)}
-#endif
-#ifndef DXERROR8
-#define DXERROR8(v,n,d)
-#define DXERROR8LAST(v,n,d)
-#endif
-#ifndef DXERROR9
-#define DXERROR9(v,n,d)
-#define DXERROR9LAST(v,n,d)
-#endif
-
-typedef struct {
- unsigned long Value;
- TCHAR *Name;
- TCHAR *Description;
-} Error;
-
-static Error Errors[] = {
- DXERROR(0, "S_OK", "The function completed successfully")
- DXERROR(0x1, "S_FALSE", "Call successful, but returned FALSE")
- DXERROR(0x2, "DXERROR_FILE_NOT_FOUND", "The system cannot find the file specified.")
- DXERROR(0x3, "DXERROR_PATH_NOT_FOUND", "The system cannot find the path specified.")
- DXERROR(0x4, "DXERROR_TOO_MANY_OPEN_FILES", "The system cannot open the file.")
- DXERROR(0x5, "DXERROR_ACCESS_DENIED", "Access is denied.")
- DXERROR(0x6, "DXERROR_INVALID_HANDLE", "The handle is invalid.")
- DXERROR(0x8, "DXERROR_NOT_ENOUGH_MEMORY", "Not enough storage is available to process this command.")
- DXERROR(0x9, "DXERROR_INVALID_BLOCK", "The storage control block address is invalid.")
- DXERROR(0xa, "DXERROR_BAD_ENVIRONMENT", "The environment is incorrect.")
- DXERROR(0xb, "DXERROR_BAD_FORMAT", "An attempt was made to load a program with an incorrect format.")
- DXERROR(0xe, "DXERROR_OUTOFMEMORY", "The system cannot find the drive specified.")
- DXERROR9(0x40003, "Unknown", "End of stream. Sample not updated.")
- DXERROR(0x40103, "VFW_S_NO_MORE_ITEMS", "The end of the list has been reached.")
- DXERROR(0x4022d, "VFW_S_DUPLICATE_NAME", "An attempt to add a filter with a duplicate name succeeded with a modified name.")
- DXERROR(0x40237, "VFW_S_STATE_INTERMEDIATE", "The state transition has not completed.")
- DXERROR(0x40242, "VFW_S_PARTIAL_RENDER", "Some of the streams in this movie are in an unsupported format.")
- DXERROR(0x40245, "VFW_S_SOME_DATA_IGNORED", "The file contained some property settings that were not used.")
- DXERROR(0x40246, "VFW_S_CONNECTIONS_DEFERRED", "Some connections have failed and have been deferred.")
- DXERROR(0x40250, "VFW_S_RESOURCE_NOT_NEEDED", "The resource specified is no longer needed.")
- DXERROR(0x40254, "VFW_S_MEDIA_TYPE_IGNORED", "A connection could not be made with the media type in the persistent graph, but has been made with a negotiated media type.")
- DXERROR(0x40257, "VFW_S_VIDEO_NOT_RENDERED", "Cannot play back the video stream: no suitable decompressor could be found.")
- DXERROR(0x40258, "VFW_S_AUDIO_NOT_RENDERED", "Cannot play back the audio stream: no audio hardware is available.")
- DXERROR(0x4025a, "VFW_S_RPZA", "Cannot play back the video stream: format 'RPZA' is not supported.")
- DXERROR(0x40260, "VFW_S_ESTIMATED", "The value returned had to be estimated. It's accuracy can not be guaranteed.")
- DXERROR(0x40263, "VFW_S_RESERVED", "This success code is reserved for internal purposes within ActiveMovie.")
- DXERROR(0x40267, "VFW_S_STREAM_OFF", "The stream has been turned off.")
- DXERROR(0x40268, "VFW_S_CANT_CUE", "The graph can't be cued because of lack of or corrupt data.")
- DXERROR(0x40270, "VFW_S_NO_STOP_TIME", "The stop time for the sample was not set.")
- DXERROR(0x4027e, "VFW_S_NOPREVIEWPIN", "There was no preview pin available, so the capture pin output is being split to provide both capture and preview.")
- DXERROR(0x40280, "VFW_S_DVD_NON_ONE_SEQUENTIAL", "The current title was not a sequential set of chapters (PGC) and the returned timing information might not be continuous.")
- DXERROR(0x4028c, "VFW_S_DVD_CHANNEL_CONTENTS_NOT_AVAILABLE", "The audio stream did not contain sufficient information to determine the contents of each channel.")
- DXERROR(0x4028d, "VFW_S_DVD_NOT_ACCURATE", "The seek into the movie was not frame accurate.")
- DXERROR9(0x150005, "DV_FULLDUPLEX", "Full duplex")
- DXERROR9(0x15000a, "DV_HALFDUPLEX", "Half duplex")
- DXERROR9(0x150010, "DV_PENDING", "Pending")
- DXERROR9(0x876086f, "D3DOK_NOAUTOGEN", "The call succeeded but there won't be any mipmaps generated")
- DXERROR(0x878000a, "DS_NO_VIRTUALIZATION", "The call succeeded, but we had to substitute the 3D algorithm")
- DXERROR8(0x8780014, "DS_INCOMPLETE", "The call succeeded, but not all of the optional effects were obtained.")
- DXERROR(0x8781091, "DMUS_S_PARTIALLOAD", "The object could only load partially. This can happen if some components are not registered properly, such as embedded tracks and tools. This can also happen if some content is missing. For example, if a segment uses a DLS collection that is not in the loader's current search directory.")
- DXERROR(0x8781092, "DMUS_S_PARTIALDOWNLOAD", "Return value from IDirectMusicBand::Download() which indicates that some of the instruments safely downloaded, but others failed. This usually occurs when some instruments are on PChannels not supported by the performance or port.")
- DXERROR(0x8781200, "DMUS_S_REQUEUE", "Return value from IDirectMusicTool::ProcessPMsg() which indicates to the performance that it should cue the PMsg again automatically.")
- DXERROR(0x8781201, "DMUS_S_FREE", "Return value from IDirectMusicTool::ProcessPMsg() which indicates to the performance that it should free the PMsg automatically.")
- DXERROR(0x8781202, "DMUS_S_END", "Return value from IDirectMusicTrack::Play() which indicates to the segment that the track has no more data after mtEnd.")
- DXERROR(0x8781210, "DMUS_S_STRING_TRUNCATED", "Returned string has been truncated to fit the buffer size.")
- DXERROR(0x8781211, "DMUS_S_LAST_TOOL", "Returned from IDirectMusicGraph::StampPMsg() this indicates that the PMsg is already stamped with the last tool in the graph. The returned PMsg's tool pointer is now NULL.")
- DXERROR(0x8781212, "DMUS_S_OVER_CHORD", "Returned from IDirectMusicPerformance::MusicToMIDI() this indicates that no note has been calculated because the music value has the note at a position higher than the top note of the chord. This applies only to DMUS_PLAYMODE_NORMALCHORD play mode. This success code indicates that the caller should not do anything with the note. It is not meant to be played against this chord.")
- DXERROR(0x8781213, "DMUS_S_UP_OCTAVE", "Returned from IDirectMusicPerformance::MIDIToMusic() and IDirectMusicPerformance::MusicToMIDI() this indicates that the note conversion generated a note value that is below 0, so it has been bumped up one or more octaves to be in the proper MIDI range of 0 through 127. Note that this is valid for MIDIToMusic() when using play modes DMUS_PLAYMODE_FIXEDTOCHORD and DMUS_PLAYMODE_FIXEDTOKEY, both of which store MIDI values in wMusicValue. With MusicToMIDI() it is valid for all play modes. Ofcourse, DMUS_PLAYMODE_FIXED will never return this success code.")
- DXERROR(0x8781214, "DMUS_S_DOWN_OCTAVE", "Returned from IDirectMusicPerformance::MIDIToMusic() and IDirectMusicPerformance::MusicToMIDI() this indicates that the note conversion generated a note value that is above 127, so it has been bumped down one or more octaves to be in the proper MIDI range of 0 through 127. Note that this is valid for MIDIToMusic() when using play modes DMUS_PLAYMODE_FIXEDTOCHORD and DMUS_PLAYMODE_FIXEDTOKEY, both of which store MIDI values in wMusicValue. With MusicToMIDI() it is valid for all play modes. Ofcourse, DMUS_PLAYMODE_FIXED will never return this success code.")
- DXERROR(0x8781215, "DMUS_S_NOBUFFERCONTROL", "Although the audio output from the port will be routed to the same device as the given DirectSound buffer, buffer controls such as pan and volume will not affect the output.")
- DXERROR(0x8781216, "DMUS_S_GARBAGE_COLLECTED", "The requested operation was not performed because during CollectGarbage the loader determined that the object had been released.")
- DXERROR(0x8000000a, "E_PENDING", "The data necessary to complete this operation is not yet available.")
- DXERROR(0x80004001, "E_NOTIMPL", "The function called is not supported at this time")
- DXERROR(0x80004002, "E_NOINTERFACE", "The requested COM interface is not available")
- DXERROR(0x80004003, "E_POINTER", "Invalid pointer")
- DXERROR(0x80004004, "E_ABORT", "Operation aborted")
- DXERROR(0x80004005, "E_FAIL", "An undetermined error occurred")
- DXERROR(0x8000ffff, "E_UNEXPECTED", "Catastrophic failure")
- DXERROR8(0x80040110, "CLASS_E_NOAGGREGATION", "This object does not support aggregation")
- DXERROR9(0x80040110, "CLASSFACTORY_E_FIRST", "This object does not support aggregation")
- DXERROR(0x80040154, "REGDB_E_CLASSNOTREG", "Class not registered")
- DXERROR(0x800401f0, "CO_E_NOTINITIALIZED", "CoInitialize has not been called.")
- DXERROR(0x800401f1, "CO_E_ALREADYINITIALIZED", "CoInitialize has already been called.")
- DXERROR(0x80040200, "DIERR_INSUFFICIENTPRIVS & VFW_E_INVALIDMEDIATYPE", "Unable to IDirectInputJoyConfig_Acquire because the user does not have sufficient privileges to change the joystick configuration. & An invalid media type was specified")
- DXERROR8(0x80040201, "DIERR_DEVICEFULL & VFW_E_INVALIDSUBTYPE", "The device is full. & An invalid media subtype was specified.")
- DXERROR8(0x80040202, "DIERR_MOREDATA & VFW_E_NEED_OWNER", "Not all the requested information fit into the buffer. & This object can only be created as an aggregated object.")
- DXERROR8(0x80040203, "DIERR_NOTDOWNLOADED & VFW_E_ENUM_OUT_OF_SYNC", "The effect is not downloaded. & The enumerator has become invalid.")
- DXERROR8(0x80040204, "DIERR_HASEFFECTS & VFW_E_ALREADY_CONNECTED", "The device cannot be reinitialized because there are still effects attached to it. & At least one of the pins involved in the operation is already connected.")
- DXERROR8(0x80040205, "DIERR_NOTEXCLUSIVEACQUIRED & VFW_E_FILTER_ACTIVE", "The operation cannot be performed unless the device is acquired in DISCL_EXCLUSIVE mode. & This operation cannot be performed because the filter is active.")
- DXERROR8(0x80040206, "DIERR_INCOMPLETEEFFECT & VFW_E_NO_TYPES", "The effect could not be downloaded because essential information is missing. For example, no axes have been associated with the effect, or no type-specific information has been created. & One of the specified pins supports no media types.")
- DXERROR9(0x80040201, "DIERR_DEVICEFULL & VFW_E_INVALIDSUBTYPE & DMO_E_INVALIDSTREAMINDEX", "The device is full. & An invalid media subtype was specified.")
- DXERROR9(0x80040202, "DIERR_MOREDATA & VFW_E_NEED_OWNER & DMO_E_INVALIDTYPE", "Not all the requested information fit into the buffer. & This object can only be created as an aggregated object.")
- DXERROR9(0x80040203, "DIERR_NOTDOWNLOADED & VFW_E_ENUM_OUT_OF_SYNC & DMO_E_TYPE_NOT_SET", "The effect is not downloaded. & The enumerator has become invalid.")
- DXERROR9(0x80040204, "DIERR_HASEFFECTS & VFW_E_ALREADY_CONNECTED & DMO_E_NOTACCEPTING", "The device cannot be reinitialized because there are still effects attached to it. & At least one of the pins involved in the operation is already connected.")
- DXERROR9(0x80040205, "DIERR_NOTEXCLUSIVEACQUIRED & VFW_E_FILTER_ACTIVE & DMO_E_TYPE_NOT_ACCEPTED", "The operation cannot be performed unless the device is acquired in DISCL_EXCLUSIVE mode. & This operation cannot be performed because the filter is active.")
- DXERROR9(0x80040206, "DIERR_INCOMPLETEEFFECT & VFW_E_NO_TYPES & DMO_E_NO_MORE_ITEMS", "The effect could not be downloaded because essential information is missing. For example, no axes have been associated with the effect, or no type-specific information has been created. & One of the specified pins supports no media types.")
- DXERROR(0x80040207, "DIERR_NOTBUFFERED & VFW_E_NO_ACCEPTABLE_TYPES", "Attempted to read buffered device data from a device that is not buffered. & There is no common media type between these pins.")
- DXERROR(0x80040208, "DIERR_EFFECTPLAYING & VFW_E_INVALID_DIRECTION", "An attempt was made to modify parameters of an effect while it is playing. Not all hardware devices support altering the parameters of an effect while it is playing. & Two pins of the same direction cannot be connected together.")
- DXERROR(0x80040209, "DIERR_UNPLUGGED & VFW_E_NOT_CONNECTED", "The operation could not be completed because the device is not plugged in. & The operation cannot be performed because the pins are not connected.")
- DXERROR(0x8004020a, "DIERR_REPORTFULL & VFW_E_NO_ALLOCATOR", "SendDeviceData failed because more information was requested to be sent than can be sent to the device. Some devices have restrictions on how much data can be sent to them. (For example, there might be a limit on the number of buttons that can be pressed at once.) & No sample buffer allocator is available.")
- DXERROR(0x8004020b, "DIERR_MAPFILEFAIL & VFW_E_RUNTIME_DXERROR", "A mapper file function failed because reading or writing the user or IHV settings file failed. & A run-time error occurred.")
- DXERROR(0x8004020c, "VFW_E_BUFFER_NOTSET", "No buffer space has been set")
- DXERROR(0x8004020d, "VFW_E_BUFFER_OVERFLOW", "The buffer is not big enough.")
- DXERROR(0x8004020e, "VFW_E_BADALIGN", "An invalid alignment was specified.")
- DXERROR(0x8004020f, "VFW_E_ALREADY_COMMITTED", "Cannot change allocated memory while the filter is active.")
- DXERROR(0x80040210, "VFW_E_BUFFERS_OUTSTANDING", "One or more buffers are still active.")
- DXERROR(0x80040211, "VFW_E_NOT_COMMITTED", "Cannot allocate a sample when the allocator is not active.")
- DXERROR(0x80040212, "VFW_E_SIZENOTSET", "Cannot allocate memory because no size has been set.")
- DXERROR(0x80040213, "VFW_E_NO_CLOCK", "Cannot lock for synchronization because no clock has been defined.")
- DXERROR(0x80040214, "VFW_E_NO_SINK", "Quality messages could not be sent because no quality sink has been defined.")
- DXERROR(0x80040215, "VFW_E_NO_INTERFACE", "A required interface has not been implemented.")
- DXERROR(0x80040216, "VFW_E_NOT_FOUND", "An object or name was not found.")
- DXERROR(0x80040217, "VFW_E_CANNOT_CONNECT", "No combination of intermediate filters could be found to make the connection.")
- DXERROR(0x80040218, "VFW_E_CANNOT_RENDER", "No combination of filters could be found to render the stream.")
- DXERROR(0x80040219, "VFW_E_CHANGING_FORMAT", "Could not change formats dynamically.")
- DXERROR(0x8004021a, "VFW_E_NO_COLOR_KEY_SET", "No color key has been set.")
- DXERROR(0x8004021b, "VFW_E_NOT_OVERLAY_CONNECTION", "Current pin connection is not using the IOverlay transport.")
- DXERROR(0x8004021c, "VFW_E_NOT_SAMPLE_CONNECTION", "Current pin connection is not using the IMemInputPin transport.")
- DXERROR(0x8004021d, "VFW_E_PALETTE_SET", "Setting a color key would conflict with the palette already set.")
- DXERROR(0x8004021e, "VFW_E_COLOR_KEY_SET", "Setting a palette would conflict with the color key already set.")
- DXERROR(0x8004021f, "VFW_E_NO_COLOR_KEY_FOUND", "No matching color key is available.")
- DXERROR(0x80040220, "VFW_E_NO_PALETTE_AVAILABLE", "No palette is available.")
- DXERROR(0x80040221, "VFW_E_NO_DISPLAY_PALETTE", "Display does not use a palette.")
- DXERROR(0x80040222, "VFW_E_TOO_MANY_COLORS", "Too many colors for the current display settings.")
- DXERROR(0x80040223, "VFW_E_STATE_CHANGED", "The state changed while waiting to process the sample.")
- DXERROR(0x80040224, "VFW_E_NOT_STOPPED", "The operation could not be performed because the filter is not stopped.")
- DXERROR(0x80040225, "VFW_E_NOT_PAUSED", "The operation could not be performed because the filter is not paused.")
- DXERROR(0x80040226, "VFW_E_NOT_RUNNING", "The operation could not be performed because the filter is not running.")
- DXERROR(0x80040227, "VFW_E_WRONG_STATE", "The operation could not be performed because the filter is in the wrong state.")
- DXERROR(0x80040228, "VFW_E_START_TIME_AFTER_END", "The sample start time is after the sample end time.")
- DXERROR(0x80040229, "VFW_E_INVALID_RECT", "The supplied rectangle is invalid.")
- DXERROR(0x8004022a, "VFW_E_TYPE_NOT_ACCEPTED", "This pin cannot use the supplied media type.")
- DXERROR(0x8004022b, "VFW_E_SAMPLE_REJECTED", "This sample cannot be rendered.")
- DXERROR(0x8004022c, "VFW_E_SAMPLE_REJECTED_EOS", "This sample cannot be rendered because the end of the stream has been reached.")
- DXERROR(0x8004022d, "VFW_E_DUPLICATE_NAME", "An attempt to add a filter with a duplicate name failed.")
- DXERROR(0x8004022e, "VFW_E_TIMEOUT", "A time-out has expired.")
- DXERROR(0x8004022f, "VFW_E_INVALID_FILE_FORMAT", "The file format is invalid.")
- DXERROR(0x80040230, "VFW_E_ENUM_OUT_OF_RANGE", "The list has already been exhausted.")
- DXERROR(0x80040231, "VFW_E_CIRCULAR_GRAPH", "The filter graph is circular.")
- DXERROR(0x80040232, "VFW_E_NOT_ALLOWED_TO_SAVE", "Updates are not allowed in this state.")
- DXERROR(0x80040233, "VFW_E_TIME_ALREADY_PASSED", "An attempt was made to queue a command for a time in the past.")
- DXERROR(0x80040234, "VFW_E_ALREADY_CANCELLED", "The queued command has already been canceled.")
- DXERROR(0x80040235, "VFW_E_CORRUPT_GRAPH_FILE", "Cannot render the file because it is corrupt.")
- DXERROR(0x80040236, "VFW_E_ADVISE_ALREADY_SET", "An overlay advise link already exists.")
- DXERROR(0x80040238, "VFW_E_NO_MODEX_AVAILABLE", "No full-screen modes are available.")
- DXERROR(0x80040239, "VFW_E_NO_ADVISE_SET", "This Advise cannot be canceled because it was not successfully set.")
- DXERROR(0x8004023a, "VFW_E_NO_FULLSCREEN", "A full-screen mode is not available.")
- DXERROR(0x8004023b, "VFW_E_IN_FULLSCREEN_MODE", "Cannot call IVideoWindow methods while in full-screen mode.")
- DXERROR(0x80040240, "VFW_E_UNKNOWN_FILE_TYPE", "The media type of this file is not recognized.")
- DXERROR(0x80040241, "VFW_E_CANNOT_LOAD_SOURCE_FILTER", "The source filter for this file could not be loaded.")
- DXERROR(0x80040243, "VFW_E_FILE_TOO_SHORT", "A file appeared to be incomplete.")
- DXERROR(0x80040244, "VFW_E_INVALID_FILE_VERSION", "The version number of the file is invalid.")
- DXERROR(0x80040247, "VFW_E_INVALID_CLSID", "This file is corrupt: it contains an invalid class identifier.")
- DXERROR(0x80040248, "VFW_E_INVALID_MEDIA_TYPE", "This file is corrupt: it contains an invalid media type.")
- DXERROR(0x80040249, "VFW_E_SAMPLE_TIME_NOT_SET", "No time stamp has been set for this sample.")
- DXERROR(0x80040251, "VFW_E_MEDIA_TIME_NOT_SET", "No media time stamp has been set for this sample.")
- DXERROR(0x80040252, "VFW_E_NO_TIME_FORMAT_SET", "No media time format has been selected.")
- DXERROR(0x80040253, "VFW_E_MONO_AUDIO_HW", "Cannot change balance because audio device is mono only.")
- DXERROR(0x80040255, "VFW_E_NO_DECOMPRESSOR", "Cannot play back the video stream: no suitable decompressor could be found.")
- DXERROR(0x80040256, "VFW_E_NO_AUDIO_HARDWARE", "Cannot play back the audio stream: no audio hardware is available, or the hardware is not responding.")
- DXERROR(0x80040259, "VFW_E_RPZA", "Cannot play back the video stream: format 'RPZA' is not supported.")
- DXERROR(0x8004025b, "VFW_E_PROCESSOR_NOT_SUITABLE", "ActiveMovie cannot play MPEG movies on this processor.")
- DXERROR(0x8004025c, "VFW_E_UNSUPPORTED_AUDIO", "Cannot play back the audio stream: the audio format is not supported.")
- DXERROR(0x8004025d, "VFW_E_UNSUPPORTED_VIDEO", "Cannot play back the video stream: the video format is not supported.")
- DXERROR(0x8004025e, "VFW_E_MPEG_NOT_CONSTRAINED", "ActiveMovie cannot play this video stream because it falls outside the constrained standard.")
- DXERROR(0x8004025f, "VFW_E_NOT_IN_GRAPH", "Cannot perform the requested function on an object that is not in the filter graph.")
- DXERROR(0x80040261, "VFW_E_NO_TIME_FORMAT", "Cannot get or set time related information on an object that is using a time format of TIME_FORMAT_NONE.")
- DXERROR(0x80040262, "VFW_E_READ_ONLY", "The connection cannot be made because the stream is read only and the filter alters the data.")
- DXERROR(0x80040264, "VFW_E_BUFFER_UNDERFLOW", "The buffer is not full enough.")
- DXERROR(0x80040265, "VFW_E_UNSUPPORTED_STREAM", "Cannot play back the file. The format is not supported.")
- DXERROR(0x80040266, "VFW_E_NO_TRANSPORT", "Pins cannot connect due to not supporting the same transport.")
- DXERROR(0x80040269, "VFW_E_BAD_VIDEOCD", "The Video CD can't be read correctly by the device or is the data is corrupt.")
- DXERROR(0x80040271, "VFW_E_OUT_OF_VIDEO_MEMORY", "There is not enough Video Memory at this display resolution and number of colors. Reducing resolution might help.")
- DXERROR(0x80040272, "VFW_E_VP_NEGOTIATION_FAILED", "The VideoPort connection negotiation process has failed.")
- DXERROR(0x80040273, "VFW_E_DDRAW_CAPS_NOT_SUITABLE", "Either DirectDraw has not been installed or the Video Card capabilities are not suitable. Make sure the display is not in 16 color mode.")
- DXERROR(0x80040274, "VFW_E_NO_VP_HARDWARE", "No VideoPort hardware is available, or the hardware is not responding.")
- DXERROR(0x80040275, "VFW_E_NO_CAPTURE_HARDWARE", "No Capture hardware is available, or the hardware is not responding.")
- DXERROR(0x80040276, "VFW_E_DVD_OPERATION_INHIBITED", "This User Operation is inhibited by DVD Content at this time.")
- DXERROR(0x80040277, "VFW_E_DVD_INVALIDDOMAIN", "This Operation is not permitted in the current domain.")
- DXERROR(0x80040278, "VFW_E_DVD_NO_BUTTON", "The specified button is invalid or is not present at the current time, or there is no button present at the specified location.")
- DXERROR(0x80040279, "VFW_E_DVD_GRAPHNOTREADY", "DVD-Video playback graph has not been built yet.")
- DXERROR(0x8004027a, "VFW_E_DVD_RENDERFAIL", "DVD-Video playback graph building failed.")
- DXERROR(0x8004027b, "VFW_E_DVD_DECNOTENOUGH", "DVD-Video playback graph could not be built due to insufficient decoders.")
- DXERROR(0x8004027c, "VFW_E_DDRAW_VERSION_NOT_SUITABLE", "Version number of DirectDraw not suitable. Make sure to install dx5 or higher version.")
- DXERROR(0x8004027d, "VFW_E_COPYPROT_FAILED", "Copy protection cannot be enabled. Please make sure any other copy protected content is not being shown now.")
- DXERROR(0x8004027f, "VFW_E_TIME_EXPIRED", "This object cannot be used anymore as its time has expired.")
- DXERROR(0x80040281, "VFW_E_DVD_WRONG_SPEED", "The operation cannot be performed at the current playback speed.")
- DXERROR(0x80040282, "VFW_E_DVD_MENU_DOES_NOT_EXIST", "The specified menu doesn't exist.")
- DXERROR(0x80040283, "VFW_E_DVD_CMD_CANCELLED", "The specified command was either cancelled or no longer exists.")
- DXERROR(0x80040284, "VFW_E_DVD_STATE_WRONG_VERSION", "The data did not contain a recognized version.")
- DXERROR(0x80040285, "VFW_E_DVD_STATE_CORRUPT", "The state data was corrupt.")
- DXERROR(0x80040286, "VFW_E_DVD_STATE_WRONG_DISC", "The state data is from a different disc.")
- DXERROR(0x80040287, "VFW_E_DVD_INCOMPATIBLE_REGION", "The region was not compatible with the current drive.")
- DXERROR(0x80040288, "VFW_E_DVD_NO_ATTRIBUTES", "The requested DVD stream attribute does not exist.")
- DXERROR(0x80040289, "VFW_E_DVD_NO_GOUP_PGC", "Currently there is no GoUp (Annex J user function) program chain (PGC).")
- DXERROR(0x8004028a, "VFW_E_DVD_LOW_PARENTAL_LEVEL", "The current parental level was too low.")
- DXERROR(0x8004028b, "VFW_E_DVD_NOT_IN_KARAOKE_MODE", "The current audio is not karaoke content.")
- DXERROR(0x8004028e, "VFW_E_FRAME_STEP_UNSUPPORTED", "Frame step is not supported on this configuration.")
- DXERROR(0x8004028f, "VFW_E_DVD_STREAM_DISABLED", "The specified stream is disabled and cannot be selected.")
- DXERROR(0x80040290, "VFW_E_DVD_TITLE_UNKNOWN", "The operation depends on the current title number, however the navigator has not yet entered the VTSM or the title domains, so the 'current' title index is unknown.")
- DXERROR(0x80040291, "VFW_E_DVD_INVALID_DISC", "The specified path does not point to a valid DVD disc.")
- DXERROR(0x80040292, "VFW_E_DVD_NO_RESUME_INFORMATION", "There is currently no resume information.")
- DXERROR(0x80040293, "VFW_E_PIN_ALREADY_BLOCKED_ON_THIS_THREAD", "This thread has already blocked this output pin. There is no need to call IPinFlowControl::Block() again.")
- DXERROR(0x80040294, "VFW_E_PIN_ALREADY_BLOCKED", "IPinFlowControl::Block() has been called on another thread. The current thread cannot make any assumptions about this pin's block state.")
- DXERROR(0x80040295, "VFW_E_CERTIFICATION_FAILURE", "An operation failed due to a certification failure.")
- DXERROR(0x80040300, "DIERR_DRIVERFIRST", "Device driver-specific codes. Unless the specific driver has been precisely identified, no meaning should be attributed to these values other than that the driver originated the error.")
- DXERROR(0x80040301, "DIERR_DRIVERFIRST+1", "DIERR_DRIVERFIRST+1")
- DXERROR(0x80040302, "DIERR_DRIVERFIRST+2", "DIERR_DRIVERFIRST+2")
- DXERROR(0x80040303, "DIERR_DRIVERFIRST+3", "DIERR_DRIVERFIRST+3")
- DXERROR(0x80040304, "DIERR_DRIVERFIRST+4", "DIERR_DRIVERFIRST+4")
- DXERROR(0x80040305, "DIERR_DRIVERFIRST+5", "DIERR_DRIVERFIRST+5")
- DXERROR(0x800403f2, "VFW_E_BAD_KEY", "A registry entry is corrupt.")
- DXERROR(0x800403ff, "DIERR_DRIVERLAST", "Device installer errors.")
- DXERROR(0x80040400, "DIERR_INVALIDCLASSINSTALLER", "Registry entry or DLL for class installer invalid or class installer not found.")
- DXERROR8(0x80040401, "DIERR_CANCELLED", "The user cancelled the install operation.")
- DXERROR8(0x80040402, "DIERR_BADINF", "The INF file for the selected device could not be found or is invalid or is damaged.")
- DXERROR8(0x80070002, "DIERR_NOTFOUND", "The requested object does not exist.")
- DXERROR9(0x80040401, "DIERR_CANCELLED & MS_E_SAMPLEALLOC", "The user cancelled the install operation. & The stream already has allocated samples and the surface doesn't match the sample format.")
- DXERROR9(0x80040402, "DIERR_BADINF & MS_E_PURPOSEID", "The INF file for the selected device could not be found or is invalid or is damaged. & The specified purpose ID can't be used for the call.")
- DXERROR9(0x80040403, "MS_E_NOSTREAM", "No stream can be found with the specified attributes.")
- DXERROR9(0x80040404, "MS_E_NOSEEKING", "Seeking not supported for this object.")
- DXERROR9(0x80040405, "MS_E_INCOMPATIBLE", "The stream formats are not compatible.")
- DXERROR9(0x80040406, "MS_E_BUSY", "The sample is busy.")
- DXERROR9(0x80040407, "MS_E_NOTINIT", "The object can't accept the call because its initialize function or equivalent has not been called.")
- DXERROR9(0x80040408, "MS_E_SOURCEALREADYDEFINED", "MS_E_SOURCEALREADYDEFINED")
- DXERROR9(0x80040409, "MS_E_INVALIDSTREAMTYPE", "The stream type is not valid for this operation.")
- DXERROR9(0x8004040a, "MS_E_NOTRUNNING", "The object is not in running state.")
- DXERROR9(0x80070002, "DXERROR_FILE_NOT_FOUND", "The system cannot find the file specified.")
- DXERROR9(0x80070003, "DXERROR_PATH_NOT_FOUND", "The system cannot find the path specified.")
- DXERROR9(0x80070004, "DXERROR_TOO_MANY_OPEN_FILES", "The system cannot open the file.")
- DXERROR(0x80070005, "E_ACCESSDENIED", "Access is denied")
- DXERROR(0x80070006, "E_HANDLE", "Invalid handle")
- DXERROR8(0x8007000c, "DIERR_NOTACQUIRED", "The operation cannot be performed unless the device is acquired.")
- DXERROR9(0x80070008, "DXERROR_NOT_ENOUGH_MEMORY", "Not enough storage is available to process this command.")
- DXERROR9(0x80070009, "DXERROR_INVALID_BLOCK", "The storage control block address is invalid.")
- DXERROR9(0x8007000a, "DXERROR_BAD_ENVIRONMENT", "The environment is incorrect.")
- DXERROR9(0x8007000b, "DXERROR_BAD_FORMAT", "An attempt was made to load a program with an incorrect format.")
- DXERROR9(0x8007000c, "DXERROR_INVALID_ACCESS & DIERR_NOTACQUIRED", "The operation cannot be performed unless the device is acquired.")
- DXERROR(0x8007000e, "E_OUTOFMEMORY", "Ran out of memory")
- DXERROR8(0x80070015, "DIERR_NOTINITIALIZED", "This object has not been initialized")
- DXERROR8(0x8007001e, "DIERR_INPUTLOST", "Access to the device has been lost. It must be re-acquired.")
- DXERROR9(0x80070015, "DXERROR_NOT_READY & DIERR_NOTINITIALIZED", "This object has not been initialized")
- DXERROR9(0x8007001e, "DXERROR_READ_FAULT & DIERR_INPUTLOST", "Access to the device has been lost. It must be re-acquired.")
- DXERROR(0x80070057, "E_INVALIDARG", "An invalid parameter was passed to the returning function")
- DXERROR8(0x80070077, "DIERR_BADDRIVERVER", "The object could not be created due to an incompatible driver version or mismatched or incomplete driver components.")
- DXERROR8(0x800700aa, "DIERR_ACQUIRED", "The operation cannot be performed while the device is acquired.")
- DXERROR8(0x80070103, "DIERR_NOMOREITEMS", "No more items.")
- DXERROR8(0x8007047e, "DIERR_OLDDIRECTINPUTVERSION", "The application requires a newer version of DirectInput.")
- DXERROR8(0x80070481, "DIERR_BETADIRECTINPUTVERSION", "The application was written for an unsupported prerelease version of DirectInput.")
- DXERROR8(0x80070490, "E_PROP_ID_UNSUPPORTED", "The specified property ID is not supported for the specified property set.")
- DXERROR8(0x80070492, "E_PROP_SET_UNSUPPORTED", "The Specified property set is not supported.")
- DXERROR8(0x800704df, "DIERR_ALREADYINITIALIZED", "This object is already initialized")
- DXERROR9(0x80070077, "DXERROR_BAD_DRIVER_LEVEL & DIERR_BADDRIVERVER", "The object could not be created due to an incompatible driver version or mismatched or incomplete driver components.")
- DXERROR9(0x800700aa, "DXERROR_BUSY & DIERR_ACQUIRED", "The operation cannot be performed while the device is acquired.")
- DXERROR9(0x80070103, "DXERROR_NO_MORE_ITEMS & DIERR_NOMOREITEMS", "No more items.")
- DXERROR9(0x8007047e, "DXERROR_OLD_WIN_VERSION & DIERR_OLDDIRECTINPUTVERSION", "The application requires a newer version of DirectInput.")
- DXERROR9(0x80070481, "DXERROR_RMODE_APP & DIERR_BETADIRECTINPUTVERSION", "The application was written for an unsupported prerelease version of DirectInput.")
- DXERROR9(0x80070490, "DXERROR_NOT_FOUND & E_PROP_ID_UNSUPPORTED", "The specified property ID is not supported for the specified property set.")
- DXERROR9(0x80070492, "DXERROR_SET_NOT_FOUND & E_PROP_SET_UNSUPPORTED", "The specified property set is not supported.")
- DXERROR9(0x800704df, "DXERROR_ALREADY_INITIALIZED & DIERR_ALREADYINITIALIZED", "This object is already initialized")
- DXERROR9(0x8015001e, "DVERR_BUFFERTOOSMALL", "Buffer too small")
- DXERROR9(0x8015004a, "DVERR_EXCEPTION", "Exception")
- DXERROR9(0x80150078, "DVERR_INVALIDFLAGS", "Invalid flags")
- DXERROR9(0x80150082, "DVERR_INVALIDOBJECT", "Invalid object")
- DXERROR9(0x80150087, "DVERR_INVALIDPLAYER", "Invalid player")
- DXERROR9(0x80150091, "DVERR_INVALIDGROUP", "Invalid group")
- DXERROR9(0x80150096, "DVERR_INVALIDHANDLE", "Invalid handle")
- DXERROR9(0x8015012c, "DVERR_SESSIONLOST", "Session lost")
- DXERROR9(0x8015012e, "DVERR_NOVOICESESSION", "No voice session")
- DXERROR9(0x80150168, "DVERR_CONNECTIONLOST", "Connection lost")
- DXERROR9(0x80150169, "DVERR_NOTINITIALIZED", "Not initialized")
- DXERROR9(0x8015016a, "DVERR_CONNECTED", "Connected")
- DXERROR9(0x8015016b, "DVERR_NOTCONNECTED", "Not connected")
- DXERROR9(0x8015016e, "DVERR_CONNECTABORTING", "Connect aborting")
- DXERROR9(0x8015016f, "DVERR_NOTALLOWED", "Not allowed")
- DXERROR9(0x80150170, "DVERR_INVALIDTARGET", "Invalid target")
- DXERROR9(0x80150171, "DVERR_TRANSPORTNOTHOST", "Transport not host")
- DXERROR9(0x80150172, "DVERR_COMPRESSIONNOTSUPPORTED", "Compression not supported")
- DXERROR9(0x80150173, "DVERR_ALREADYPENDING", "Already pending")
- DXERROR9(0x80150174, "DVERR_SOUNDINITFAILURE", "Sound init failure")
- DXERROR9(0x80150175, "DVERR_TIMEOUT", "Time out")
- DXERROR9(0x80150176, "DVERR_CONNECTABORTED", "Connect aborted")
- DXERROR9(0x80150177, "DVERR_NO3DSOUND", "No 3d sound")
- DXERROR9(0x80150178, "DVERR_ALREADYBUFFERED", "Already buffered")
- DXERROR9(0x80150179, "DVERR_NOTBUFFERED", "Not buffered")
- DXERROR9(0x8015017a, "DVERR_HOSTING", "Hosting")
- DXERROR9(0x8015017b, "DVERR_NOTHOSTING", "Not hosting")
- DXERROR9(0x8015017c, "DVERR_INVALIDDEVICE", "Invalid device")
- DXERROR9(0x8015017d, "DVERR_RECORDSYSTEMDXERROR", "Record system error")
- DXERROR9(0x8015017e, "DVERR_PLAYBACKSYSTEMDXERROR", "Playback system error")
- DXERROR9(0x8015017f, "DVERR_SENDDXERROR", "Send error")
- DXERROR9(0x80150180, "DVERR_USERCANCEL", "User cancel")
- DXERROR9(0x80150183, "DVERR_RUNSETUP", "Run setup")
- DXERROR9(0x80150184, "DVERR_INCOMPATIBLEVERSION", "Incompatible version")
- DXERROR9(0x80150187, "DVERR_INITIALIZED", "Initialized")
- DXERROR9(0x80150188, "DVERR_NOTRANSPORT", "No transport")
- DXERROR9(0x80150189, "DVERR_NOCALLBACK", "No callback")
- DXERROR9(0x8015018a, "DVERR_TRANSPORTNOTINIT", "Transport not init")
- DXERROR9(0x8015018b, "DVERR_TRANSPORTNOSESSION", "Transport no session")
- DXERROR9(0x8015018c, "DVERR_TRANSPORTNOPLAYER", "Transport no player")
- DXERROR9(0x8015018d, "DVERR_USERBACK", "User back")
- DXERROR9(0x8015018e, "DVERR_NORECVOLAVAILABLE", "No rec vol available")
- DXERROR9(0x8015018f, "DVERR_INVALIDBUFFER", "Invalid buffer")
- DXERROR9(0x80150190, "DVERR_LOCKEDBUFFER", "Locked buffer")
- DXERROR9(0x80158030, "DPNERR_ABORTED", "Aborted")
- DXERROR9(0x80158040, "DPNERR_ADDRESSING", "Addressing")
- DXERROR9(0x80158050, "DPNERR_ALREADYCLOSING", "Already closing")
- DXERROR9(0x80158060, "DPNERR_ALREADYCONNECTED", "Already connected")
- DXERROR9(0x80158070, "DPNERR_ALREADYDISCONNECTING", "Already disconnecting")
- DXERROR9(0x80158080, "DPNERR_ALREADYINITIALIZED", "Already initialized")
- DXERROR9(0x80158090, "DPNERR_ALREADYREGISTERED", "Already registered")
- DXERROR9(0x80158100, "DPNERR_BUFFERTOOSMALL", "Buffer too small")
- DXERROR9(0x80158110, "DPNERR_CANNOTCANCEL", "Can not cancel")
- DXERROR9(0x80158120, "DPNERR_CANTCREATEGROUP", "Cant create group")
- DXERROR9(0x80158130, "DPNERR_CANTCREATEPLAYER", "Cant create player")
- DXERROR9(0x80158140, "DPNERR_CANTLAUNCHAPPLICATION", "Cant launch application")
- DXERROR9(0x80158150, "DPNERR_CONNECTING", "Connecting")
- DXERROR9(0x80158160, "DPNERR_CONNECTIONLOST", "Connection lost")
- DXERROR9(0x80158170, "DPNERR_CONVERSION", "Conversion")
- DXERROR9(0x80158175, "DPNERR_DATATOOLARGE", "Data too large")
- DXERROR9(0x80158180, "DPNERR_DOESNOTEXIST", "Does not exist")
- DXERROR9(0x80158185, "DPNERR_DPNSVRNOTAVAILABLE", "dpnsvr not available")
- DXERROR9(0x80158190, "DPNERR_DUPLICATECOMMAND", "Duplicate command")
- DXERROR9(0x80158200, "DPNERR_ENDPOINTNOTRECEIVING", "End point not receiving")
- DXERROR9(0x80158210, "DPNERR_ENUMQUERYTOOLARGE", "Enum query too large")
- DXERROR9(0x80158220, "DPNERR_ENUMRESPONSETOOLARGE", "Enum response too large")
- DXERROR9(0x80158230, "DPNERR_EXCEPTION", "Exception")
- DXERROR9(0x80158240, "DPNERR_GROUPNOTEMPTY", "Group not empty")
- DXERROR9(0x80158250, "DPNERR_HOSTING", "Hosting")
- DXERROR9(0x80158260, "DPNERR_HOSTREJECTEDCONNECTION", "Host rejected connection")
- DXERROR9(0x80158270, "DPNERR_HOSTTERMINATEDSESSION", "Host terminated session")
- DXERROR9(0x80158280, "DPNERR_INCOMPLETEADDRESS", "Incomplete address")
- DXERROR9(0x80158290, "DPNERR_INVALIDADDRESSFORMAT", "Invalid address format")
- DXERROR9(0x80158300, "DPNERR_INVALIDAPPLICATION", "Invalid application")
- DXERROR9(0x80158310, "DPNERR_INVALIDCOMMAND", "Invalid command")
- DXERROR9(0x80158320, "DPNERR_INVALIDDEVICEADDRESS", "Invalid device address")
- DXERROR9(0x80158330, "DPNERR_INVALIDENDPOINT", "Invalid end point")
- DXERROR9(0x80158340, "DPNERR_INVALIDFLAGS", "Invalid flags")
- DXERROR9(0x80158350, "DPNERR_INVALIDGROUP", "Invalid group")
- DXERROR9(0x80158360, "DPNERR_INVALIDHANDLE", "Invalid handle")
- DXERROR9(0x80158370, "DPNERR_INVALIDHOSTADDRESS", "Invalid host address")
- DXERROR9(0x80158380, "DPNERR_INVALIDINSTANCE", "Invalid instance")
- DXERROR9(0x80158390, "DPNERR_INVALIDINTERFACE", "Invalid interface")
- DXERROR9(0x80158400, "DPNERR_INVALIDOBJECT", "Invalid object")
- DXERROR9(0x80158410, "DPNERR_INVALIDPASSWORD", "Invalid password")
- DXERROR9(0x80158420, "DPNERR_INVALIDPLAYER", "Invalid player")
- DXERROR9(0x80158430, "DPNERR_INVALIDPRIORITY", "Invalid priority")
- DXERROR9(0x80158440, "DPNERR_INVALIDSTRING", "Invalid string")
- DXERROR9(0x80158450, "DPNERR_INVALIDURL", "Invalid url")
- DXERROR9(0x80158460, "DPNERR_INVALIDVERSION", "Invalid version")
- DXERROR9(0x80158470, "DPNERR_NOCAPS", "No caps")
- DXERROR9(0x80158480, "DPNERR_NOCONNECTION", "No connection")
- DXERROR9(0x80158490, "DPNERR_NOHOSTPLAYER", "No host player")
- DXERROR9(0x80158500, "DPNERR_NOMOREADDRESSCOMPONENTS", "No more address components")
- DXERROR9(0x80158510, "DPNERR_NORESPONSE", "No response")
- DXERROR9(0x80158520, "DPNERR_NOTALLOWED", "Not allowed")
- DXERROR9(0x80158530, "DPNERR_NOTHOST", "Not host")
- DXERROR9(0x80158540, "DPNERR_NOTREADY", "Not ready")
- DXERROR9(0x80158550, "DPNERR_NOTREGISTERED", "Not registered")
- DXERROR9(0x80158560, "DPNERR_PLAYERALREADYINGROUP", "Player already in group")
- DXERROR9(0x80158570, "DPNERR_PLAYERLOST", "Player lost")
- DXERROR9(0x80158580, "DPNERR_PLAYERNOTINGROUP", "Player not in group")
- DXERROR9(0x80158590, "DPNERR_PLAYERNOTREACHABLE", "Player not reachable")
- DXERROR9(0x80158600, "DPNERR_SENDTOOLARGE", "Send too large")
- DXERROR9(0x80158610, "DPNERR_SESSIONFULL", "Session full")
- DXERROR9(0x80158620, "DPNERR_TABLEFULL", "Table full")
- DXERROR9(0x80158630, "DPNERR_TIMEDOUT", "Timed out")
- DXERROR9(0x80158640, "DPNERR_UNINITIALIZED", "Uninitialized")
- DXERROR9(0x80158650, "DPNERR_USERCANCEL", "User cancel")
- DXERROR(0x88760005, "DDERR_ALREADYINITIALIZED", "This object is already initialized")
- DXERROR(0x8876000a, "DDERR_CANNOTATTACHSURFACE", "This surface can not be attached to the requested surface.")
- DXERROR(0x88760014, "DDERR_CANNOTDETACHSURFACE", "This surface can not be detached from the requested surface.")
- DXERROR(0x88760028, "DDERR_CURRENTLYNOTAVAIL", "Support is currently not available.")
- DXERROR(0x88760037, "DDERR_EXCEPTION", "An exception was encountered while performing the requested operation")
- DXERROR(0x8876005a, "DDERR_HEIGHTALIGN", "Height of rectangle provided is not a multiple of reqd alignment")
- DXERROR(0x8876005f, "DDERR_INCOMPATIBLEPRIMARY", "Unable to match primary surface creation request with existing primary surface.")
- DXERROR(0x88760064, "DDERR_INVALIDCAPS", "One or more of the caps bits passed to the callback are incorrect.")
- DXERROR(0x8876006e, "DDERR_INVALIDCLIPLIST", "DirectDraw does not support provided Cliplist.")
- DXERROR(0x88760078, "DDERR_INVALIDMODE", "DirectDraw does not support the requested mode")
- DXERROR(0x88760082, "DDERR_INVALIDOBJECT", "DirectDraw received a pointer that was an invalid DIRECTDRAW object.")
- DXERROR(0x88760091, "DDERR_INVALIDPIXELFORMAT", "pixel format was invalid as specified")
- DXERROR(0x88760096, "DDERR_INVALIDRECT", "Rectangle provided was invalid.")
- DXERROR(0x887600a0, "DDERR_LOCKEDSURFACES", "Operation could not be carried out because one or more surfaces are locked")
- DXERROR(0x887600aa, "DDERR_NO3D", "There is no 3D present.")
- DXERROR(0x887600b4, "DDERR_NOALPHAHW", "Operation could not be carried out because there is no alpha accleration hardware present or available.")
- DXERROR(0x887600b5, "DDERR_NOSTEREOHARDWARE", "Operation could not be carried out because there is no stereo hardware present or available.")
- DXERROR(0x887600b6, "DDERR_NOSURFACELEFT", "Operation could not be carried out because there is no hardware present which supports stereo surfaces")
- DXERROR(0x887600cd, "DDERR_NOCLIPLIST", "no clip list available")
- DXERROR(0x887600d2, "DDERR_NOCOLORCONVHW", "Operation could not be carried out because there is no color conversion hardware present or available.")
- DXERROR(0x887600d4, "DDERR_NOCOOPERATIVELEVELSET", "Create function called without DirectDraw object method SetCooperativeLevel being called.")
- DXERROR(0x887600d7, "DDERR_NOCOLORKEY", "Surface doesn't currently have a color key")
- DXERROR(0x887600dc, "DDERR_NOCOLORKEYHW", "Operation could not be carried out because there is no hardware support of the dest color key.")
- DXERROR(0x887600de, "DDERR_NODIRECTDRAWSUPPORT", "No DirectDraw support possible with current display driver")
- DXERROR(0x887600e1, "DDERR_NOEXCLUSIVEMODE", "Operation requires the application to have exclusive mode but the application does not have exclusive mode.")
- DXERROR(0x887600e6, "DDERR_NOFLIPHW", "Flipping visible surfaces is not supported.")
- DXERROR(0x887600f0, "DDERR_NOGDI", "There is no GDI present.")
- DXERROR(0x887600fa, "DDERR_NOMIRRORHW", "Operation could not be carried out because there is no hardware present or available.")
- DXERROR(0x887600ff, "DDERR_NOTFOUND", "Requested item was not found")
- DXERROR(0x88760104, "DDERR_NOOVERLAYHW", "Operation could not be carried out because there is no overlay hardware present or available.")
- DXERROR(0x8876010e, "DDERR_OVERLAPPINGRECTS", "Operation could not be carried out because the source and destination rectangles are on the same surface and overlap each other.")
- DXERROR(0x88760118, "DDERR_NORASTEROPHW", "Operation could not be carried out because there is no appropriate raster op hardware present or available.")
- DXERROR(0x88760122, "DDERR_NOROTATIONHW", "Operation could not be carried out because there is no rotation hardware present or available.")
- DXERROR(0x88760136, "DDERR_NOSTRETCHHW", "Operation could not be carried out because there is no hardware support for stretching")
- DXERROR(0x8876013c, "DDERR_NOT4BITCOLOR", "DirectDrawSurface is not in 4 bit color palette and the requested operation requires 4 bit color palette.")
- DXERROR(0x8876013d, "DDERR_NOT4BITCOLORINDEX", "DirectDrawSurface is not in 4 bit color index palette and the requested operation requires 4 bit color index palette.")
- DXERROR(0x88760140, "DDERR_NOT8BITCOLOR", "DirectDraw Surface is not in 8 bit color mode and the requested operation requires 8 bit color.")
- DXERROR(0x8876014a, "DDERR_NOTEXTUREHW", "Operation could not be carried out because there is no texture mapping hardware present or available.")
- DXERROR(0x8876014f, "DDERR_NOVSYNCHW", "Operation could not be carried out because there is no hardware support for vertical blank synchronized operations.")
- DXERROR(0x88760154, "DDERR_NOZBUFFERHW", "Operation could not be carried out because there is no hardware support for zbuffer blting.")
- DXERROR(0x8876015e, "DDERR_NOZOVERLAYHW", "Overlay surfaces could not be z layered based on their BltOrder because the hardware does not support z layering of overlays.")
- DXERROR(0x88760168, "DDERR_OUTOFCAPS", "The hardware needed for the requested operation has already been allocated.")
- DXERROR9(0x8876017c, "D3DERR_OUTOFVIDEOMEMORY", "Out of video memory")
- DXERROR(0x8876017e, "DDERR_OVERLAYCANTCLIP", "hardware does not support clipped overlays")
- DXERROR(0x88760180, "DDERR_OVERLAYCOLORKEYONLYONEACTIVE", "Can only have ony color key active at one time for overlays")
- DXERROR(0x88760183, "DDERR_PALETTEBUSY", "Access to this palette is being refused because the palette is already locked by another thread.")
- DXERROR(0x88760190, "DDERR_COLORKEYNOTSET", "No src color key specified for this operation.")
- DXERROR(0x8876019a, "DDERR_SURFACEALREADYATTACHED", "This surface is already attached to the surface it is being attached to.")
- DXERROR(0x887601a4, "DDERR_SURFACEALREADYDEPENDENT", "This surface is already a dependency of the surface it is being made a dependency of.")
- DXERROR(0x887601ae, "DDERR_SURFACEBUSY", "Access to this surface is being refused because the surface is already locked by another thread.")
- DXERROR(0x887601b3, "DDERR_CANTLOCKSURFACE", "Access to this surface is being refused because no driver exists which can supply a pointer to the surface. This is most likely to happen when attempting to lock the primary surface when no DCI provider is present. Will also happen on attempts to lock an optimized surface.")
- DXERROR(0x887601b8, "DDERR_SURFACEISOBSCURED", "Access to Surface refused because Surface is obscured.")
- DXERROR(0x887601c2, "DDERR_SURFACELOST", "Access to this surface is being refused because the surface is gone. The DIRECTDRAWSURFACE object representing this surface should have Restore called on it.")
- DXERROR(0x887601cc, "DDERR_SURFACENOTATTACHED", "The requested surface is not attached.")
- DXERROR(0x887601d6, "DDERR_TOOBIGHEIGHT", "Height requested by DirectDraw is too large.")
- DXERROR(0x887601e0, "DDERR_TOOBIGSIZE", "Size requested by DirectDraw is too large -- The individual height and width are OK.")
- DXERROR(0x887601ea, "DDERR_TOOBIGWIDTH", "Width requested by DirectDraw is too large.")
- DXERROR(0x887601fe, "DDERR_UNSUPPORTEDFORMAT", "Pixel format requested is unsupported by DirectDraw")
- DXERROR(0x88760208, "DDERR_UNSUPPORTEDMASK", "Bitmask in the pixel format requested is unsupported by DirectDraw")
- DXERROR(0x88760209, "DDERR_INVALIDSTREAM", "The specified stream contains invalid data")
- DXERROR(0x88760219, "DDERR_VERTICALBLANKINPROGRESS", "vertical blank is in progress")
- DXERROR8(0x8876021c, "DDERR_WASSTILLDRAWING", "Informs DirectDraw that the previous Blt which is transfering information to or from this Surface is incomplete.")
- DXERROR9(0x8876021c, "DDERR_WASSTILLDRAWING", "Was still drawing")
- DXERROR(0x8876021e, "DDERR_DDSCAPSCOMPLEXREQUIRED", "The specified surface type requires specification of the COMPLEX flag")
- DXERROR(0x88760230, "DDERR_XALIGN", "Rectangle provided was not horizontally aligned on reqd. boundary")
- DXERROR(0x88760231, "DDERR_INVALIDDIRECTDRAWGUID", "The GUID passed to DirectDrawCreate is not a valid DirectDraw driver identifier.")
- DXERROR(0x88760232, "DDERR_DIRECTDRAWALREADYCREATED", "A DirectDraw object representing this driver has already been created for this process.")
- DXERROR(0x88760233, "DDERR_NODIRECTDRAWHW", "A hardware only DirectDraw object creation was attempted but the driver did not support any hardware.")
- DXERROR(0x88760234, "DDERR_PRIMARYSURFACEALREADYEXISTS", "this process already has created a primary surface")
- DXERROR(0x88760235, "DDERR_NOEMULATION", "software emulation not available.")
- DXERROR(0x88760236, "DDERR_REGIONTOOSMALL", "region passed to Clipper::GetClipList is too small.")
- DXERROR(0x88760237, "DDERR_CLIPPERISUSINGHWND", "an attempt was made to set a clip list for a clipper objec that is already monitoring an hwnd.")
- DXERROR(0x88760238, "DDERR_NOCLIPPERATTACHED", "No clipper object attached to surface object")
- DXERROR(0x88760239, "DDERR_NOHWND", "Clipper notification requires an HWND or no HWND has previously been set as the CooperativeLevel HWND.")
- DXERROR(0x8876023a, "DDERR_HWNDSUBCLASSED", "HWND used by DirectDraw CooperativeLevel has been subclassed, this prevents DirectDraw from restoring state.")
- DXERROR(0x8876023b, "DDERR_HWNDALREADYSET", "The CooperativeLevel HWND has already been set. It can not be reset while the process has surfaces or palettes created.")
- DXERROR(0x8876023c, "DDERR_NOPALETTEATTACHED", "No palette object attached to this surface.")
- DXERROR(0x8876023d, "DDERR_NOPALETTEHW", "No hardware support for 16 or 256 color palettes.")
- DXERROR(0x8876023e, "DDERR_BLTFASTCANTCLIP", "If a clipper object is attached to the source surface passed into a BltFast call.")
- DXERROR(0x8876023f, "DDERR_NOBLTHW", "No blter.")
- DXERROR(0x88760240, "DDERR_NODDROPSHW", "No DirectDraw ROP hardware.")
- DXERROR(0x88760241, "DDERR_OVERLAYNOTVISIBLE", "returned when GetOverlayPosition is called on a hidden overlay")
- DXERROR(0x88760242, "DDERR_NOOVERLAYDEST", "returned when GetOverlayPosition is called on a overlay that UpdateOverlay has never been called on to establish a destionation.")
- DXERROR(0x88760243, "DDERR_INVALIDPOSITION", "returned when the position of the overlay on the destionation is no longer legal for that destionation.")
- DXERROR(0x88760244, "DDERR_NOTAOVERLAYSURFACE", "returned when an overlay member is called for a non-overlay surface")
- DXERROR(0x88760245, "DDERR_EXCLUSIVEMODEALREADYSET", "An attempt was made to set the cooperative level when it was already set to exclusive.")
- DXERROR(0x88760246, "DDERR_NOTFLIPPABLE", "An attempt has been made to flip a surface that is not flippable.")
- DXERROR(0x88760247, "DDERR_CANTDUPLICATE", "Can't duplicate primary & 3D surfaces, or surfaces that are implicitly created.")
- DXERROR(0x88760248, "DDERR_NOTLOCKED", "Surface was not locked. An attempt to unlock a surface that was not locked at all, or by this process, has been attempted.")
- DXERROR(0x88760249, "DDERR_CANTCREATEDC", "Windows can not create any more DCs, or a DC was requested for a paltte-indexed surface when the surface had no palette AND the display mode was not palette-indexed (in this case DirectDraw cannot select a proper palette into the DC)")
- DXERROR(0x8876024a, "DDERR_NODC", "No DC was ever created for this surface.")
- DXERROR(0x8876024b, "DDERR_WRONGMODE", "This surface can not be restored because it was created in a different mode.")
- DXERROR(0x8876024c, "DDERR_IMPLICITLYCREATED", "This surface can not be restored because it is an implicitly created surface.")
- DXERROR(0x8876024d, "DDERR_NOTPALETTIZED", "The surface being used is not a palette-based surface")
- DXERROR(0x8876024e, "DDERR_UNSUPPORTEDMODE", "The display is currently in an unsupported mode")
- DXERROR(0x8876024f, "DDERR_NOMIPMAPHW", "Operation could not be carried out because there is no mip-map texture mapping hardware present or available.")
- DXERROR(0x88760250, "DDERR_INVALIDSURFACETYPE", "The requested action could not be performed because the surface was of the wrong type.")
- DXERROR(0x88760258, "DDERR_NOOPTIMIZEHW", "Device does not support optimized surfaces, therefore no video memory optimized surfaces")
- DXERROR(0x88760259, "DDERR_NOTLOADED", "Surface is an optimized surface, but has not yet been allocated any memory")
- DXERROR(0x8876025a, "DDERR_NOFOCUSWINDOW", "Attempt was made to create or set a device window without first setting the focus window")
- DXERROR(0x8876025b, "DDERR_NOTONMIPMAPSUBLEVEL", "Attempt was made to set a palette on a mipmap sublevel")
- DXERROR(0x8876026c, "DDERR_DCALREADYCREATED", "A DC has already been returned for this surface. Only one DC can be retrieved per surface.")
- DXERROR(0x88760276, "DDERR_NONONLOCALVIDMEM", "An attempt was made to allocate non-local video memory from a device that does not support non-local video memory.")
- DXERROR(0x88760280, "DDERR_CANTPAGELOCK", "The attempt to page lock a surface failed.")
- DXERROR(0x88760294, "DDERR_CANTPAGEUNLOCK", "The attempt to page unlock a surface failed.")
- DXERROR(0x887602a8, "DDERR_NOTPAGELOCKED", "An attempt was made to page unlock a surface with no outstanding page locks.")
- DXERROR(0x887602b2, "DDERR_MOREDATA", "There is more data available than the specified buffer size could hold")
- DXERROR(0x887602b3, "DDERR_EXPIRED", "The data has expired and is therefore no longer valid.")
- DXERROR(0x887602b4, "DDERR_TESTFINISHED", "The mode test has finished executing.")
- DXERROR(0x887602b5, "DDERR_NEWMODE", "The mode test has switched to a new mode.")
- DXERROR(0x887602b6, "DDERR_D3DNOTINITIALIZED", "D3D has not yet been initialized.")
- DXERROR(0x887602b7, "DDERR_VIDEONOTACTIVE", "The video port is not active")
- DXERROR(0x887602b8, "DDERR_NOMONITORINFORMATION", "The monitor does not have EDID data.")
- DXERROR(0x887602b9, "DDERR_NODRIVERSUPPORT", "The driver does not enumerate display mode refresh rates.")
- DXERROR(0x887602bb, "DDERR_DEVICEDOESNTOWNSURFACE", "Surfaces created by one direct draw device cannot be used directly by another direct draw device.")
- DXERROR9(0x88760352, "DXFILEERR_BADOBJECT", "Bad object")
- DXERROR9(0x88760353, "DXFILEERR_BADVALUE", "Bad value")
- DXERROR9(0x88760354, "DXFILEERR_BADTYPE", "Bad type")
- DXERROR9(0x88760355, "DXFILEERR_BADSTREAMHANDLE", "Bad stream handle")
- DXERROR9(0x88760356, "DXFILEERR_BADALLOC", "Bad alloc")
- DXERROR9(0x88760357, "DXFILEERR_NOTFOUND", "Not found")
- DXERROR9(0x88760358, "DXFILEERR_NOTDONEYET", "Not done yet")
- DXERROR9(0x88760359, "DXFILEERR_FILENOTFOUND", "File not found")
- DXERROR9(0x8876035a, "DXFILEERR_RESOURCENOTFOUND", "Resource not found")
- DXERROR9(0x8876035b, "DXFILEERR_URLNOTFOUND", "Url not found")
- DXERROR9(0x8876035c, "DXFILEERR_BADRESOURCE", "Bad resource")
- DXERROR9(0x8876035d, "DXFILEERR_BADFILETYPE", "Bad file type")
- DXERROR9(0x8876035e, "DXFILEERR_BADFILEVERSION", "Bad file version")
- DXERROR9(0x8876035f, "DXFILEERR_BADFILEFLOATSIZE", "Bad file float size")
- DXERROR9(0x88760360, "DXFILEERR_BADFILECOMPRESSIONTYPE", "Bad file compression type")
- DXERROR9(0x88760361, "DXFILEERR_BADFILE", "Bad file")
- DXERROR9(0x88760362, "DXFILEERR_PARSEDXERROR", "Parse error")
- DXERROR9(0x88760363, "DXFILEERR_NOTEMPLATE", "No template")
- DXERROR9(0x88760364, "DXFILEERR_BADARRAYSIZE", "Bad array size")
- DXERROR9(0x88760365, "DXFILEERR_BADDATAREFERENCE", "Bad data reference")
- DXERROR9(0x88760366, "DXFILEERR_INTERNALDXERROR", "Internal error")
- DXERROR9(0x88760367, "DXFILEERR_NOMOREOBJECTS", "No more objects")
- DXERROR9(0x88760368, "DXFILEERR_BADINTRINSICS", "Bad intrinsics")
- DXERROR9(0x88760369, "DXFILEERR_NOMORESTREAMHANDLES", "No more stream handles")
- DXERROR9(0x8876036a, "DXFILEERR_NOMOREDATA", "No more data")
- DXERROR9(0x8876036b, "DXFILEERR_BADCACHEFILE", "Bad cache file")
- DXERROR9(0x8876036c, "DXFILEERR_NOINTERNET", "No internet")
- DXERROR9(0x88760818, "D3DERR_WRONGTEXTUREFORMAT", "Wrong texture format")
- DXERROR9(0x88760819, "D3DERR_UNSUPPORTEDCOLOROPERATION", "Unsupported color operation")
- DXERROR9(0x8876081a, "D3DERR_UNSUPPORTEDCOLORARG", "Unsupported color arg")
- DXERROR9(0x8876081b, "D3DERR_UNSUPPORTEDALPHAOPERATION", "Unsupported alpha operation")
- DXERROR9(0x8876081c, "D3DERR_UNSUPPORTEDALPHAARG", "Unsupported alpha arg")
- DXERROR9(0x8876081d, "D3DERR_TOOMANYOPERATIONS", "Too many operations")
- DXERROR9(0x8876081e, "D3DERR_CONFLICTINGTEXTUREFILTER", "Conflicting texture filter")
- DXERROR9(0x8876081f, "D3DERR_UNSUPPORTEDFACTORVALUE", "Unsupported factor value")
- DXERROR9(0x88760821, "D3DERR_CONFLICTINGRENDERSTATE", "Conflicting render state")
- DXERROR9(0x88760822, "D3DERR_UNSUPPORTEDTEXTUREFILTER", "Unsupported texture filter")
- DXERROR9(0x88760826, "D3DERR_CONFLICTINGTEXTUREPALETTE", "Conflicting texture palette")
- DXERROR9(0x88760827, "D3DERR_DRIVERINTERNALDXERROR", "Driver internal error")
- DXERROR9(0x88760866, "D3DERR_NOTFOUND", "Not found")
- DXERROR9(0x88760867, "D3DERR_MOREDATA", "More data")
- DXERROR9(0x88760868, "D3DERR_DEVICELOST", "Device lost")
- DXERROR9(0x88760869, "D3DERR_DEVICENOTRESET", "Device not reset")
- DXERROR9(0x8876086a, "D3DERR_NOTAVAILABLE", "Not available")
- DXERROR9(0x8876086b, "D3DERR_INVALIDDEVICE", "Invalid device")
- DXERROR9(0x8876086c, "D3DERR_INVALIDCALL", "Invalid call")
- DXERROR9(0x8876086d, "D3DERR_DRIVERINVALIDCALL", "Driver invalid call")
- DXERROR9(0x88760b54, "D3DXERR_CANNOTMODIFYINDEXBUFFER", "Can not modify index buffer")
- DXERROR9(0x88760b55, "D3DXERR_INVALIDMESH", "Invalid mesh")
- DXERROR9(0x88760b56, "D3DXERR_CANNOTATTRSORT", "Cannot attr sort")
- DXERROR9(0x88760b57, "D3DXERR_SKINNINGNOTSUPPORTED", "Skinning not supported")
- DXERROR9(0x88760b58, "D3DXERR_TOOMANYINFLUENCES", "Too many influences")
- DXERROR9(0x88760b59, "D3DXERR_INVALIDDATA", "Invalid data")
- DXERROR9(0x88760b5a, "D3DXERR_LOADEDMESHASNODATA", "Loaded mesh has no data")
- DXERROR9(0x88760b5b, "D3DXERR_DUPLICATENAMEDFRAGMENT", "Duplicate named fragment")
- DXERROR(0x8878000a, "DSERR_ALLOCATED", "The call failed because resources (such as a priority level) were already being used by another caller")
- DXERROR(0x8878001e, "DSERR_CONTROLUNAVAIL", "The control (vol, pan, etc.) requested by the caller is not available")
- DXERROR(0x88780032, "DSERR_INVALIDCALL", "This call is not valid for the current state of this object")
- DXERROR(0x88780046, "DSERR_PRIOLEVELNEEDED", "The caller does not have the priority level required for the function to succeed")
- DXERROR(0x88780064, "DSERR_BADFORMAT", "The specified WAVE format is not supported")
- DXERROR(0x88780078, "DSERR_NODRIVER", "No sound driver is available for use")
- DXERROR(0x88780082, "DSERR_ALREADYINITIALIZED", "This object is already initialized")
- DXERROR(0x88780096, "DSERR_BUFFERLOST", "The buffer memory has been lost, and must be restored")
- DXERROR(0x887800a0, "DSERR_OTHERAPPHASPRIO", "Another app has a higher priority level, preventing this call from succeeding")
- DXERROR(0x887800aa, "DSERR_UNINITIALIZED", "This object has not been initialized")
- DXERROR(0x887800b4, "DSERR_BUFFERTOOSMALL", "Tried to create a DSBCAPS_CTRLFX buffer shorter than DSBSIZE_FX_MIN milliseconds")
- DXERROR(0x887800be, "DSERR_DS8_REQUIRED", "Attempt to use DirectSound 8 functionality on an older DirectSound object")
- DXERROR(0x887800c8, "DSERR_SENDLOOP", "A circular loop of send effects was detected")
- DXERROR(0x887800d2, "DSERR_BADSENDBUFFERGUID", "The GUID specified in an audiopath file does not match a valid MIXIN buffer")
- DXERROR(0x88781101, "DMUS_E_DRIVER_FAILED", "An unexpected error was returned from a device driver, indicating possible failure of the driver or hardware.")
- DXERROR(0x88781102, "DMUS_E_PORTS_OPEN", "The requested operation cannot be performed while there are instantiated ports in any process in the system.")
- DXERROR(0x88781103, "DMUS_E_DEVICE_IN_USE", "The requested device is already in use (possibly by a non-DirectMusic client) and cannot be opened again.")
- DXERROR(0x88781104, "DMUS_E_INSUFFICIENTBUFFER", "Buffer is not large enough for requested operation.")
- DXERROR(0x88781105, "DMUS_E_BUFFERNOTSET", "No buffer was prepared for the download data.")
- DXERROR(0x88781106, "DMUS_E_BUFFERNOTAVAILABLE", "Download failed due to inability to access or create download buffer.")
- DXERROR(0x88781108, "DMUS_E_NOTADLSCOL", "Error parsing DLS collection. File is corrupt.")
- DXERROR(0x88781109, "DMUS_E_INVALIDOFFSET", "Wave chunks in DLS collection file are at incorrect offsets.")
- DXERROR(0x88781111, "DMUS_E_ALREADY_LOADED", "Second attempt to load a DLS collection that is currently open. ")
- DXERROR(0x88781113, "DMUS_E_INVALIDPOS", "Error reading wave data from DLS collection. Indicates bad file.")
- DXERROR(0x88781114, "DMUS_E_INVALIDPATCH", "There is no instrument in the collection that matches patch number.")
- DXERROR(0x88781115, "DMUS_E_CANNOTSEEK", "The IStream* doesn't support Seek().")
- DXERROR(0x88781116, "DMUS_E_CANNOTWRITE", "The IStream* doesn't support Write().")
- DXERROR(0x88781117, "DMUS_E_CHUNKNOTFOUND", "The RIFF parser doesn't contain a required chunk while parsing file.")
- DXERROR(0x88781119, "DMUS_E_INVALID_DOWNLOADID", "Invalid download id was used in the process of creating a download buffer.")
- DXERROR(0x88781120, "DMUS_E_NOT_DOWNLOADED_TO_PORT", "Tried to unload an object that was not downloaded or previously unloaded.")
- DXERROR(0x88781121, "DMUS_E_ALREADY_DOWNLOADED", "Buffer was already downloaded to synth.")
- DXERROR(0x88781122, "DMUS_E_UNKNOWN_PROPERTY", "The specified property item was not recognized by the target object.")
- DXERROR(0x88781123, "DMUS_E_SET_UNSUPPORTED", "The specified property item may not be set on the target object.")
- DXERROR(0x88781124, "DMUS_E_GET_UNSUPPORTED", "* The specified property item may not be retrieved from the target object.")
- DXERROR(0x88781125, "DMUS_E_NOTMONO", "Wave chunk has more than one interleaved channel. DLS format requires MONO.")
- DXERROR(0x88781126, "DMUS_E_BADARTICULATION", "Invalid articulation chunk in DLS collection.")
- DXERROR(0x88781127, "DMUS_E_BADINSTRUMENT", "Invalid instrument chunk in DLS collection.")
- DXERROR(0x88781128, "DMUS_E_BADWAVELINK", "Wavelink chunk in DLS collection points to invalid wave.")
- DXERROR(0x88781129, "DMUS_E_NOARTICULATION", "Articulation missing from instrument in DLS collection.")
- DXERROR(0x8878112a, "DMUS_E_NOTPCM", "Downoaded DLS wave is not in PCM format. ")
- DXERROR(0x8878112b, "DMUS_E_BADWAVE", "Bad wave chunk in DLS collection")
- DXERROR(0x8878112c, "DMUS_E_BADOFFSETTABLE", "Offset Table for download buffer has errors. ")
- DXERROR(0x8878112d, "DMUS_E_UNKNOWNDOWNLOAD", "Attempted to download unknown data type.")
- DXERROR(0x8878112e, "DMUS_E_NOSYNTHSINK", "The operation could not be completed because no sink was connected to the synthesizer.")
- DXERROR(0x8878112f, "DMUS_E_ALREADYOPEN", "An attempt was made to open the software synthesizer while it was already open.")
- DXERROR(0x88781130, "DMUS_E_ALREADYCLOSED", "An attempt was made to close the software synthesizer while it was already open.")
- DXERROR(0x88781131, "DMUS_E_SYNTHNOTCONFIGURED", "The operation could not be completed because the software synth has not yet been fully configured.")
- DXERROR(0x88781132, "DMUS_E_SYNTHACTIVE", "The operation cannot be carried out while the synthesizer is active.")
- DXERROR(0x88781133, "DMUS_E_CANNOTREAD", "An error occurred while attempting to read from the IStream* object.")
- DXERROR(0x88781134, "DMUS_E_DMUSIC_RELEASED", "The operation cannot be performed because the final instance of the DirectMusic object was released. Ports cannot be used after final release of the DirectMusic object.")
- DXERROR(0x88781135, "DMUS_E_BUFFER_EMPTY", "There was no data in the referenced buffer.")
- DXERROR(0x88781136, "DMUS_E_BUFFER_FULL", "There is insufficient space to insert the given event into the buffer.")
- DXERROR(0x88781137, "DMUS_E_PORT_NOT_CAPTURE", "The given operation could not be carried out because the port is a capture port.")
- DXERROR(0x88781138, "DMUS_E_PORT_NOT_RENDER", "The given operation could not be carried out because the port is a render port.")
- DXERROR(0x88781139, "DMUS_E_DSOUND_NOT_SET", "The port could not be created because no DirectSound has been specified. Specify a DirectSound interface via the IDirectMusic::SetDirectSound method; pass NULL to have DirectMusic manage usage of DirectSound.")
- DXERROR(0x8878113a, "DMUS_E_ALREADY_ACTIVATED", "The operation cannot be carried out while the port is active.")
- DXERROR(0x8878113b, "DMUS_E_INVALIDBUFFER", "Invalid DirectSound buffer was handed to port. ")
- DXERROR(0x8878113c, "DMUS_E_WAVEFORMATNOTSUPPORTED", "Invalid buffer format was handed to the synth sink.")
- DXERROR(0x8878113d, "DMUS_E_SYNTHINACTIVE", "The operation cannot be carried out while the synthesizer is inactive.")
- DXERROR(0x8878113e, "DMUS_E_DSOUND_ALREADY_SET", "IDirectMusic::SetDirectSound has already been called. It may not be changed while in use.")
- DXERROR(0x8878113f, "DMUS_E_INVALID_EVENT", "The given event is invalid (either it is not a valid MIDI message or it makes use of running status). The event cannot be packed into the buffer.")
- DXERROR(0x88781150, "DMUS_E_UNSUPPORTED_STREAM", "The IStream* object does not contain data supported by the loading object.")
- DXERROR(0x88781151, "DMUS_E_ALREADY_INITED", "The object has already been initialized.")
- DXERROR(0x88781152, "DMUS_E_INVALID_BAND", "The file does not contain a valid band.")
- DXERROR(0x88781155, "DMUS_E_TRACK_HDR_NOT_FIRST_CK", "The IStream* object's data does not have a track header as the first chunk, and therefore can not be read by the segment object.")
- DXERROR(0x88781156, "DMUS_E_TOOL_HDR_NOT_FIRST_CK", "The IStream* object's data does not have a tool header as the first chunk, and therefore can not be read by the graph object.")
- DXERROR(0x88781157, "DMUS_E_INVALID_TRACK_HDR", "The IStream* object's data contains an invalid track header (ckid is 0 and fccType is NULL,) and therefore can not be read by the segment object.")
- DXERROR(0x88781158, "DMUS_E_INVALID_TOOL_HDR", "The IStream* object's data contains an invalid tool header (ckid is 0 and fccType is NULL,) and therefore can not be read by the graph object.")
- DXERROR(0x88781159, "DMUS_E_ALL_TOOLS_FAILED", "The graph object was unable to load all tools from the IStream* object data. This may be due to errors in the stream, or the tools being incorrectly registered on the client.")
- DXERROR(0x88781160, "DMUS_E_ALL_TRACKS_FAILED", "The segment object was unable to load all tracks from the IStream* object data. This may be due to errors in the stream, or the tracks being incorrectly registered on the client.")
- DXERROR(0x88781161, "DSERR_OBJECTNOTFOUND", "The object requested was not found (numerically equal to DMUS_E_NOT_FOUND)")
- DXERROR(0x88781162, "DMUS_E_NOT_INIT", "A required object is not initialized or failed to initialize.")
- DXERROR(0x88781163, "DMUS_E_TYPE_DISABLED", "The requested parameter type is currently disabled. Parameter types may be enabled and disabled by certain calls to SetParam().")
- DXERROR(0x88781164, "DMUS_E_TYPE_UNSUPPORTED", "The requested parameter type is not supported on the object.")
- DXERROR(0x88781165, "DMUS_E_TIME_PAST", "The time is in the past, and the operation can not succeed.")
- DXERROR(0x88781166, "DMUS_E_TRACK_NOT_FOUND", "The requested track is not contained by the segment.")
- DXERROR(0x88781167, "DMUS_E_TRACK_NO_CLOCKTIME_SUPPORT", "The track does not support clock time playback or getparam.")
- DXERROR(0x88781170, "DMUS_E_NO_MASTER_CLOCK", "There is no master clock in the performance. Be sure to call IDirectMusicPerformance::Init().")
- DXERROR(0x88781180, "DMUS_E_LOADER_NOCLASSID", "The class id field is required and missing in the DMUS_OBJECTDESC.")
- DXERROR(0x88781181, "DMUS_E_LOADER_BADPATH", "The requested file path is invalid.")
- DXERROR(0x88781182, "DMUS_E_LOADER_FAILEDOPEN", "File open failed - either file doesn't exist or is locked.")
- DXERROR(0x88781183, "DMUS_E_LOADER_FORMATNOTSUPPORTED", "Search data type is not supported.")
- DXERROR(0x88781184, "DMUS_E_LOADER_FAILEDCREATE", "Unable to find or create object.")
- DXERROR(0x88781185, "DMUS_E_LOADER_OBJECTNOTFOUND", "Object was not found.")
- DXERROR(0x88781186, "DMUS_E_LOADER_NOFILENAME", "The file name is missing from the DMUS_OBJECTDESC.")
- DXERROR(0x88781200, "DMUS_E_INVALIDFILE", "The file requested is not a valid file.")
- DXERROR(0x88781201, "DMUS_E_ALREADY_EXISTS", "The tool is already contained in the graph. Create a new instance.")
- DXERROR(0x88781202, "DMUS_E_OUT_OF_RANGE", "Value is out of range, for instance the requested length is longer than the segment.")
- DXERROR(0x88781203, "DMUS_E_SEGMENT_INIT_FAILED", "Segment initialization failed, most likely due to a critical memory situation.")
- DXERROR(0x88781204, "DMUS_E_ALREADY_SENT", "The DMUS_PMSG has already been sent to the performance object via IDirectMusicPerformance::SendPMsg().")
- DXERROR(0x88781205, "DMUS_E_CANNOT_FREE", "The DMUS_PMSG was either not allocated by the performance via IDirectMusicPerformance::AllocPMsg() or it was already freed via IDirectMusicPerformance::FreePMsg().")
- DXERROR(0x88781206, "DMUS_E_CANNOT_OPEN_PORT", "The default system port could not be opened.")
- DXERROR(0x88781207, "DMUS_E_CANNOT_CONVERT", "A call to MIDIToMusic() or MusicToMIDI() resulted in an error because the requested conversion could not happen. This usually occurs when the provided DMUS_CHORD_KEY structure has an invalid chord or scale pattern.")
- DXERROR(0x88781210, "DMUS_E_DESCEND_CHUNK_FAIL", "DMUS_E_DESCEND_CHUNK_FAIL is returned when the end of the file was reached before the desired chunk was found.")
- DXERROR(0x88781211, "DMUS_E_NOT_LOADED", "An attempt to use this object failed because it first needs to be loaded.")
- DXERROR(0x88781213, "DMUS_E_SCRIPT_LANGUAGE_INCOMPATIBLE", "The activeX scripting engine for the script's language is not compatible with DirectMusic.")
- DXERROR(0x88781214, "DMUS_E_SCRIPT_UNSUPPORTED_VARTYPE", "A varient was used that had a type that is not supported by DirectMusic.")
- DXERROR(0x88781215, "DMUS_E_SCRIPT_DXERROR_IN_SCRIPT", "An error was encountered while parsing or executing the script. The pErrorInfo parameter (if supplied) was filled with information about the error.")
- DXERROR(0x88781216, "DMUS_E_SCRIPT_CANTLOAD_OLEAUT32", "Loading of oleaut32.dll failed. VBScript and other activeX scripting languages require use of oleaut32.dll. On platforms where oleaut32.dll is not present, only the DirectMusicScript language, which doesn't require oleaut32.dll can be used.")
- DXERROR(0x88781217, "DMUS_E_SCRIPT_LOADSCRIPT_DXERROR", "An error occured while parsing a script loaded using LoadScript. The script that was loaded contains an error.")
- DXERROR(0x88781218, "DMUS_E_SCRIPT_INVALID_FILE", "The script file is invalid.")
- DXERROR(0x88781219, "DMUS_E_INVALID_SCRIPTTRACK", "The file contains an invalid script track.")
- DXERROR(0x8878121a, "DMUS_E_SCRIPT_VARIABLE_NOT_FOUND", "The script does not contain a variable with the specified name.")
- DXERROR(0x8878121b, "DMUS_E_SCRIPT_ROUTINE_NOT_FOUND", "The script does not contain a routine with the specified name.")
- DXERROR(0x8878121c, "DMUS_E_SCRIPT_CONTENT_READONLY", "Scripts variables for content referenced or embedded in a script cannot be set.")
- DXERROR(0x8878121d, "DMUS_E_SCRIPT_NOT_A_REFERENCE", "Attempt was made to set a script's variable by reference to a value that was not an object type.")
- DXERROR(0x8878121e, "DMUS_E_SCRIPT_VALUE_NOT_SUPPORTED", "Attempt was made to set a script's variable by value to an object that does not support a default value property.")
- DXERROR(0x88781220, "DMUS_E_INVALID_SEGMENTTRIGGERTRACK", "The file contains an invalid segment trigger track.")
- DXERROR(0x88781221, "DMUS_E_INVALID_LYRICSTRACK", "The file contains an invalid lyrics track.")
- DXERROR(0x88781222, "DMUS_E_INVALID_PARAMCONTROLTRACK", "The file contains an invalid parameter control track.")
- DXERROR(0x88781223, "DMUS_E_AUDIOVBSCRIPT_SYNTAXDXERROR", "A script written in AudioVBScript could not be read because it contained a statement that is not allowed by the AudioVBScript language.")
- DXERROR(0x88781224, "DMUS_E_AUDIOVBSCRIPT_RUNTIMEDXERROR", "A script routine written in AudioVBScript failed because an invalid operation occurred. For example, adding the number 3 to a segment object would produce this error. So would attempting to call a routine that doesn't exist.")
- DXERROR(0x88781225, "DMUS_E_AUDIOVBSCRIPT_OPERATIONFAILURE", "A script routine written in AudioVBScript failed because a function outside of a script failed to complete. For example, a call to PlaySegment that fails to play because of low memory would return this error.")
- DXERROR(0x88781226, "DMUS_E_AUDIOPATHS_NOT_VALID", "The Performance has set up some PChannels using the AssignPChannel command, which makes it not capable of supporting audio paths.")
- DXERROR(0x88781227, "DMUS_E_AUDIOPATHS_IN_USE", "This is the inverse of the previous error. The Performance has set up some audio paths, which makes is incompatible with the calls to allocate pchannels, etc. ")
- DXERROR(0x88781228, "DMUS_E_NO_AUDIOPATH_CONFIG", "A segment or song was asked for its embedded audio path configuration, but there isn't any. ")
- DXERROR(0x88781229, "DMUS_E_AUDIOPATH_INACTIVE", "An audiopath is inactive, perhaps because closedown was called.")
- DXERROR(0x8878122a, "DMUS_E_AUDIOPATH_NOBUFFER", "An audiopath failed to create because a requested buffer could not be created.")
- DXERROR(0x8878122b, "DMUS_E_AUDIOPATH_NOPORT", "An audiopath could not be used for playback because it lacked port assignments.")
- DXERROR(0x8878122c, "DMUS_E_NO_AUDIOPATH", "Attempt was made to play segment in audiopath mode and there was no audiopath.")
- DXERROR(0x8878122d, "DMUS_E_INVALIDCHUNK", "Invalid data was found in a RIFF file chunk.")
- DXERROR(0x8878122e, "DMUS_E_AUDIOPATH_NOGLOBALFXBUFFER", "Attempt was made to create an audiopath that sends to a global effects buffer which did not exist.")
- DXERRORLAST(0x8878122f, "DMUS_E_INVALID_CONTAINER_OBJECT", "The file does not contain a valid container object.")
-};
-
-static Error UnknownError = DXERRORLAST(0xffffffff, "Unknown", "n/a");
-
-static Error *FindError(unsigned long hr)
-{
- register Error *Base = &Errors[0];
- register int Limit;
- register Error *Ptr;
-
- for (Limit = sizeof(Errors) / sizeof(Error); Limit != 0; Limit >>= 1)
- {
- Ptr = Base + (Limit >> 1);
- if (hr == Ptr->Value)
- return Ptr;
- if (hr > Ptr->Value)
- {
- Base = Ptr + 1;
- Limit--;
- }
- }
- return &UnknownError;
-}
-
-const TCHAR * __stdcall DXGetErrorString(unsigned long hr)
-{
- return FindError(hr)->Name;
-}
-
-const TCHAR * __stdcall DXGetErrorDescription(unsigned long hr)
-{
- return FindError(hr)->Description;
-}
-
-HRESULT __stdcall DXTrace(char *strFile, DWORD dwLine, HRESULT hr,
- TCHAR *strMsg, BOOL bPopMsgBox)
-{
-// FIXME: Decide which version to use?
-// The first version uses dynamic memory allocation and is
-// safer. Second version uses static arrays and that is why
-// it can be better for debugging.
-#if 0
- const TCHAR *ErrorName = DXGetErrorString9(hr);
- TCHAR *DebugMessage;
-
- DebugMessage = (TCHAR *)malloc((strlen(strFile) + (strMsg ? _tcslen(strMsg) : 0) + _tcslen(ErrorName) + 48) * sizeof(TCHAR));
- if (DebugMessage == 0)
- return hr;
- wsprintf(DebugMessage, TEXT("%hs(%Lu): %s (hr=%s(0x%Lx))"), strFile, dwLine, (strMsg ? strMsg : TEXT("")) ErrorName, hr);
- OutputDebugString(DebugMessage);
- free(DebugMessage);
-
- if (bPopMsgBox)
- {
- int Result;
-
- DebugMessage = (TCHAR *)malloc((strlen(strFile) + (strMsg ? _tcslen(strMsg) : 0) + _tcslen(ErrorName) + 60) * sizeof(TCHAR));
- if (DebugMessage == 0)
- return DXERROR_NOT_ENOUGH_MEMORY;
- wsprintf(DebugMessage,
- TEXT("File: %hs\nLine: %Lu\nError Code: %s(0x%Lx)\nCalling: %s\n"
- "Do you want to debug the application?"), strFile, dwLine,
- ErrorName, hr, (strMsg ? strMsg : TEXT("")));
- Result = MessageBox(0, DebugMessage, TEXT("Unexpected error encountred"), MB_YESNO | MB_ICONDXERROR);
- if (Result == 0)
- return hr;
- if (Result == IDYES)
- {
- free(DebugMessage);
- DebugBreak();
- } else
- free(DebugMessage);
- }
- return hr;
-#else
- const TCHAR *ErrorName = DXGetErrorString(hr);
- TCHAR DebugMessage[4096];
-
- wsprintf(DebugMessage, TEXT("%hs(%Lu): %s (hr=%s(0x%Lx))"), strFile, dwLine, (strMsg ? strMsg : TEXT("")), ErrorName, hr);
- OutputDebugString(DebugMessage);
- if (bPopMsgBox)
- {
- int Result;
- wsprintf(DebugMessage,
- TEXT("File: %hs\nLine: %Lu\nError Code: %s(0x%Lx)\nCalling: %s\n"
- "Do you want to debug the application?"), strFile, dwLine,
- ErrorName, hr, (strMsg ? strMsg : TEXT("")));
- Result = MessageBox(0, DebugMessage, TEXT("Unexpected error encountred"), MB_YESNO | MB_ICONERROR);
- if (Result == IDYES)
- DebugBreak();
- }
- return hr;
-#endif
-}
-
diff --git a/winsup/w32api/lib/directx/dxerr8.c b/winsup/w32api/lib/directx/dxerr8.c
deleted file mode 100644
index 6794e32..0000000
--- a/winsup/w32api/lib/directx/dxerr8.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-
- dxerr8.c - DirectX 8 Error Functions
-
- Written by Filip Navara <xnavara@volny.cz>
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#define DXGetErrorString DXGetErrorString8A
-#define DXGetErrorDescription DXGetErrorDescription8A
-#define DXTrace DXTraceA
-#define DXERROR8(v,n,d) {v, n, d},
-#define DXERROR8LAST(v,n,d) {v, n, d}
-#include "dxerr.c"
diff --git a/winsup/w32api/lib/directx/dxerr8w.c b/winsup/w32api/lib/directx/dxerr8w.c
deleted file mode 100644
index 207bd88..0000000
--- a/winsup/w32api/lib/directx/dxerr8w.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-
- dxerr8w.c - DirectX 8 Wide Character Error Functions
-
- Written by Filip Navara <xnavara@volny.cz>
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#define UNICODE
-#define _UNICODE
-#define DXGetErrorString DXGetErrorString8W
-#define DXGetErrorDescription DXGetErrorDescription8W
-#define DXTrace DXTraceW
-#define DXERROR8(v,n,d) {v, L##n, L##d},
-#define DXERROR8LAST(v,n,d) {v, L##n, L##d}
-#include "dxerr.c"
-
diff --git a/winsup/w32api/lib/directx/dxerr9.c b/winsup/w32api/lib/directx/dxerr9.c
deleted file mode 100644
index af2d859..0000000
--- a/winsup/w32api/lib/directx/dxerr9.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-
- dxerr9.c - DirectX 9 Error Functions
-
- Written by Filip Navara <xnavara@volny.cz>
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#define DXGetErrorString DXGetErrorString9A
-#define DXGetErrorDescription DXGetErrorDescription9A
-#define DXTrace DXTraceA
-#define DXERROR9(v,n,d) {v, n, d},
-#define DXERROR9LAST(v,n,d) {v, n, d}
-#include "dxerr.c"
diff --git a/winsup/w32api/lib/directx/dxerr9w.c b/winsup/w32api/lib/directx/dxerr9w.c
deleted file mode 100644
index 9556598..0000000
--- a/winsup/w32api/lib/directx/dxerr9w.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-
- dxerr9w.c - DirectX 9 Wide Character Error Functions
-
- Written by Filip Navara <xnavara@volny.cz>
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#define UNICODE
-#define _UNICODE
-#define DXGetErrorString DXGetErrorString9W
-#define DXGetErrorDescription DXGetErrorDescription9W
-#define DXTrace DXTraceW
-#define DXERROR9(v,n,d) {v, L##n, L##d},
-#define DXERROR9LAST(v,n,d) {v, L##n, L##d}
-#include "dxerr.c"
-
diff --git a/winsup/w32api/lib/directx/dxguid.c b/winsup/w32api/lib/directx/dxguid.c
deleted file mode 100644
index 4d55b1a..0000000
--- a/winsup/w32api/lib/directx/dxguid.c
+++ /dev/null
@@ -1,607 +0,0 @@
-/*
-
- dxguid.c - DirectX GUIDs
-
- Written by Filip Navara <xnavara@volny.cz>
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#if defined(__LCC__) || defined(__GNUC__)
-#define INITGUID 1
-#include <windows.h>
-#else
-#include <basetyps.h>
-#endif
-
-DEFINE_GUID(CLSID_CDirect3DRM,0x4516ec41,0x8f20,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(CLSID_CDirect3DRMAnimation,0x4fa35698,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(CLSID_CDirect3DRMAnimationSet,0x4fa35699,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(CLSID_CDirect3DRMClippedVisual,0x5434e72d,0x6d66,0x11d1,0xbb,0xb,0x0,0x0,0xf8,0x75,0x86,0x5a);
-DEFINE_GUID(CLSID_CDirect3DRMDevice,0x4fa3568e,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(CLSID_CDirect3DRMFace,0x4fa35693,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(CLSID_CDirect3DRMFrame,0x4fa35690,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(CLSID_CDirect3DRMFrameInterpolator,0xde9eaa2,0x3b84,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(CLSID_CDirect3DRMLight,0x4fa35694,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(CLSID_CDirect3DRMLightInterpolator,0xde9eaa6,0x3b84,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(CLSID_CDirect3DRMMaterial,0x4fa35697,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(CLSID_CDirect3DRMMaterialInterpolator,0xde9eaa7,0x3b84,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(CLSID_CDirect3DRMMesh,0x4fa35691,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(CLSID_CDirect3DRMMeshBuilder,0x4fa35692,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(CLSID_CDirect3DRMMeshInterpolator,0xde9eaa3,0x3b84,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(CLSID_CDirect3DRMProgressiveMesh,0x4516ec40,0x8f20,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(CLSID_CDirect3DRMShadow,0x4fa3569b,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(CLSID_CDirect3DRMTexture,0x4fa35695,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(CLSID_CDirect3DRMTextureInterpolator,0xde9eaa8,0x3b84,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(CLSID_CDirect3DRMUserVisual,0x4fa3569a,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(CLSID_CDirect3DRMViewport,0x4fa3568f,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(CLSID_CDirect3DRMViewportInterpolator,0xde9eaa1,0x3b84,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(CLSID_CDirect3DRMWrap,0x4fa35696,0x623f,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(CLSID_CDirectXFile,0x4516ec43,0x8f20,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(CLSID_DirectDraw,0xd7b70ee0,0x4340,0x11cf,0xb0,0x63,0x0,0x20,0xaf,0xc2,0xcd,0x35);
-DEFINE_GUID(CLSID_DirectDraw7,0x3c305196,0x50db,0x11d3,0x9c,0xfe,0x00,0xc0,0x4f,0xd9,0x30,0xc5);
-DEFINE_GUID(CLSID_DirectDrawClipper,0x593817a0,0x7db3,0x11cf,0xa2,0xde,0x0,0xaa,0x0,0xb9,0x33,0x56);
-DEFINE_GUID(CLSID_DirectDrawFactory2,0xb9dc4790,0x4af1,0x11d1,0x8c,0x4c,0x0,0xc0,0x4f,0xd9,0x30,0xc5);
-DEFINE_GUID(CLSID_DirectInput,0x25e609e0,0xb259,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x0,0x0);
-DEFINE_GUID(CLSID_DirectInput8,0x25e609e4,0xb259,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(CLSID_DirectInputDevice,0x25e609e1,0xb259,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x0,0x0);
-DEFINE_GUID(CLSID_DirectInputDevice8,0x25e609e5,0xb259,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(CLSID_DirectMusic,0x636b9f10,0xc7d,0x11d1,0x95,0xb2,0x0,0x20,0xaf,0xdc,0x74,0x21);
-DEFINE_GUID(CLSID_DirectMusicAudioPathConfig,0xee0b9ca0,0xa81e,0x11d3,0x9b,0xd1,0x0,0x80,0xc7,0x15,0xa,0x74);
-DEFINE_GUID(CLSID_DirectMusicBand,0x79ba9e00,0xb6ee,0x11d1,0x86,0xbe,0x0,0xc0,0x4f,0xbf,0x8f,0xef);
-DEFINE_GUID(CLSID_DirectMusicBandTrack,0xd2ac2894,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(CLSID_DirectMusicCollection,0x480ff4b0,0x28b2,0x11d1,0xbe,0xf7,0x0,0xc0,0x4f,0xbf,0x8f,0xef);
-DEFINE_GUID(CLSID_DirectMusicCommandTrack,0xd2ac288c,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(CLSID_DirectMusicComposer,0xd2ac2890,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(CLSID_DirectMusicContainer,0x9301e380,0x1f22,0x11d3,0x82,0x26,0xd2,0xfa,0x76,0x25,0x5d,0x47);
-DEFINE_GUID(CLSID_DirectMusicGraph,0xd2ac2884,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(CLSID_DirectMusicChordMap,0xd2ac288f,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(CLSID_DirectMusicChordMapTrack,0xd2ac2896,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(CLSID_DirectMusicChordTrack,0xd2ac288b,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(CLSID_DirectMusicLoader,0xd2ac2892,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(CLSID_DirectMusicLyricsTrack,0x995c1cf5,0x54ff,0x11d3,0x8b,0xda,0x0,0x60,0x8,0x93,0xb1,0xb6);
-DEFINE_GUID(CLSID_DirectMusicMarkerTrack,0x55a8fd00,0x4288,0x11d3,0x9b,0xd1,0x8a,0xd,0x61,0xc8,0x88,0x35);
-DEFINE_GUID(CLSID_DirectMusicMelodyFormulationTrack,0xb0684266,0xb57f,0x11d2,0x97,0xf9,0x0,0xc0,0x4f,0xa3,0x6e,0x58);
-DEFINE_GUID(CLSID_DirectMusicMotifTrack,0xd2ac288e,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(CLSID_DirectMusicMuteTrack,0xd2ac2898,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(CLSID_DirectMusicParamControlTrack,0x4be0537b,0x5c19,0x11d3,0x8b,0xdc,0x0,0x60,0x8,0x93,0xb1,0xb6);
-DEFINE_GUID(CLSID_DirectMusicPatternTrack,0xd2ac2897,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(CLSID_DirectMusicPerformance,0xd2ac2881,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(CLSID_DirectMusicScript,0x810b5013,0xe88d,0x11d2,0x8b,0xc1,0x0,0x60,0x8,0x93,0xb1,0xb6);
-DEFINE_GUID(CLSID_DirectMusicScriptTrack,0x4108fa85,0x3586,0x11d3,0x8b,0xd7,0x0,0x60,0x8,0x93,0xb1,0xb6);
-DEFINE_GUID(CLSID_DirectMusicSegment,0xd2ac2882,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(CLSID_DirectMusicSegmentState,0xd2ac2883,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(CLSID_DirectMusicSegmentTriggerTrack,0xbae4d665,0x4ea1,0x11d3,0x8b,0xda,0x0,0x60,0x8,0x93,0xb1,0xb6);
-DEFINE_GUID(CLSID_DirectMusicSeqTrack,0xd2ac2886,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(CLSID_DirectMusicSignPostTrack,0xf17e8672,0xc3b4,0x11d1,0x87,0xb,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(CLSID_DirectMusicSong,0xaed5f0a5,0xd972,0x483d,0xa3,0x84,0x64,0x9d,0xfe,0xb9,0xc1,0x81);
-DEFINE_GUID(CLSID_DirectMusicStyle,0xd2ac288a,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(CLSID_DirectMusicStyleTrack,0xd2ac288d,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(CLSID_DirectMusicSynth,0x58c2b4d0,0x46e7,0x11d1,0x89,0xac,0x0,0xa0,0xc9,0x5,0x41,0x29);
-DEFINE_GUID(CLSID_DirectMusicSysExTrack,0xd2ac2887,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(CLSID_DirectMusicTempoTrack,0xd2ac2885,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(CLSID_DirectMusicTimeSigTrack,0xd2ac2888,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(CLSID_DirectMusicWaveTrack,0xeed36461,0x9ea5,0x11d3,0x9b,0xd1,0x0,0x80,0xc7,0x15,0xa,0x74);
-DEFINE_GUID(CLSID_DirectPlay,0xd1eb6d20,0x8923,0x11d0,0x9d,0x97,0x0,0xa0,0xc9,0xa,0x43,0xcb);
-DEFINE_GUID(CLSID_DirectPlay8Address,0x934a9523,0xa3ca,0x4bc5,0xad,0xa0,0xd6,0xd9,0x5d,0x97,0x94,0x21);
-DEFINE_GUID(CLSID_DirectPlay8Client,0x743f1dc6,0x5aba,0x429f,0x8b,0xdf,0xc5,0x4d,0x3,0x25,0x3d,0xc2);
-DEFINE_GUID(CLSID_DirectPlay8LobbiedApplication,0x667955ad,0x6b3b,0x43ca,0xb9,0x49,0xbc,0x69,0xb5,0xba,0xff,0x7f);
-DEFINE_GUID(CLSID_DirectPlay8LobbyClient,0x3b2b6775,0x70b6,0x45af,0x8d,0xea,0xa2,0x9,0xc6,0x95,0x59,0xf3);
-DEFINE_GUID(CLSID_DirectPlay8ThreadPool,0xfc47060e,0x6153,0x4b34,0xb9,0x75,0x8e,0x41,0x21,0xeb,0x7f,0x3c);
-DEFINE_GUID(CLSID_DirectPlay8NATResolver,0xe4c1d9a2,0xcbf7,0x48bd,0x9a,0x69,0x34,0xa5,0x5e,0xd,0x89,0x41);
-DEFINE_GUID(CLSID_DirectPlay8Peer,0x286f484d,0x375e,0x4458,0xa2,0x72,0xb1,0x38,0xe2,0xf8,0xa,0x6a);
-DEFINE_GUID(CLSID_DirectPlay8Server,0xda825e1b,0x6830,0x43d7,0x83,0x5d,0xb,0x5a,0xd8,0x29,0x56,0xa2);
-DEFINE_GUID(CLSID_DirectPlayLobby,0x2fe8f810,0xb2a5,0x11d0,0xa7,0x87,0x0,0x0,0xf8,0x3,0xab,0xfc);
-DEFINE_GUID(CLSID_DirectPlayVoiceClient,0xb9f3eb85,0xb781,0x4ac1,0x8d,0x90,0x93,0xa0,0x5e,0xe3,0x7d,0x7d);
-DEFINE_GUID(CLSID_DirectPlayVoiceServer,0xd3f5b8e6,0x9b78,0x4a4c,0x94,0xea,0xca,0x23,0x97,0xb6,0x63,0xd3);
-DEFINE_GUID(CLSID_DirectPlayVoiceTest,0xf0f094b,0xb01c,0x4091,0xa1,0x4d,0xdd,0xc,0xd8,0x7,0x71,0x1a);
-DEFINE_GUID(CLSID_DirectSound,0x47d4d946,0x62e8,0x11cf,0x93,0xbc,0x44,0x45,0x53,0x54,0x0,0x0);
-DEFINE_GUID(CLSID_DirectSound8,0x3901cc3f,0x84b5,0x4fa4,0xba,0x35,0xaa,0x81,0x72,0xb8,0xa0,0x9b);
-DEFINE_GUID(CLSID_DirectSoundCapture,0xb0210780,0x89cd,0x11d0,0xaf,0x8,0x0,0xa0,0xc9,0x25,0xcd,0x16);
-DEFINE_GUID(CLSID_DirectSoundCapture8,0xe4bcac13,0x7f99,0x4908,0x9a,0x8e,0x74,0xe3,0xbf,0x24,0xb6,0xe1);
-DEFINE_GUID(CLSID_DirectSoundFullDuplex,0xfea4300c,0x7959,0x4147,0xb2,0x6a,0x23,0x77,0xb9,0xe7,0xa9,0x1d);
-DEFINE_GUID(CLSID_DirectSoundWave,0x8a667154,0xf9cb,0x11d2,0xad,0x8a,0x0,0x60,0xb0,0x57,0x5a,0xbc);
-DEFINE_GUID(CLSID_DirectSoundPrivate,0x11ab3ec0,0x25ec,0x11d1,0xa4,0xd8,0x00,0xc0,0x4f,0xc2,0x8a,0xca);
-DEFINE_GUID(DSPROPSETID_DirectSoundDevice,0x84624f82,0x25ec,0x11d1,0xa4,0xd8,0x00,0xc0,0x4f,0xc2,0x8a,0xca);
-DEFINE_GUID(CLSID_DP8SP_IPX,0x53934290,0x628d,0x11d2,0xae,0xf,0x0,0x60,0x97,0xb0,0x14,0x11);
-DEFINE_GUID(CLSID_DP8SP_MODEM,0x6d4a3650,0x628d,0x11d2,0xae,0xf,0x0,0x60,0x97,0xb0,0x14,0x11);
-DEFINE_GUID(CLSID_DP8SP_SERIAL,0x743b5d60,0x628d,0x11d2,0xae,0xf,0x0,0x60,0x97,0xb0,0x14,0x11);
-DEFINE_GUID(CLSID_DP8SP_TCPIP,0xebfe7ba0,0x628d,0x11d2,0xae,0xf,0x0,0x60,0x97,0xb0,0x14,0x11);
-DEFINE_GUID(CLSID_DP8SP_BLUETOOTH,0x995513af,0x3027,0x4b9a,0x95,0x6e,0xc7,0x72,0xb3,0xf7,0x80,0x6);
-DEFINE_GUID(DDVPTYPE_BROOKTREE,0x1352a560l,0xda61,0x11cf,0x9b,0x06,0x00,0xa0,0xc9,0x03,0xa3,0xb8);
-DEFINE_GUID(DDVPTYPE_CCIR656,0xfca326a0l,0xda60,0x11cf,0x9b,0x06,0x00,0xa0,0xc9,0x03,0xa3,0xb8);
-DEFINE_GUID(DDVPTYPE_E_HREFH_VREFH,0x54f39980l,0xda60,0x11cf,0x9b,0x06,0x00,0xa0,0xc9,0x03,0xa3,0xb8);
-DEFINE_GUID(DDVPTYPE_E_HREFH_VREFL,0x92783220l,0xda60,0x11cf,0x9b,0x06,0x00,0xa0,0xc9,0x03,0xa3,0xb8);
-DEFINE_GUID(DDVPTYPE_E_HREFL_VREFH,0xa07a02e0l,0xda60,0x11cf,0x9b,0x06,0x00,0xa0,0xc9,0x03,0xa3,0xb8);
-DEFINE_GUID(DDVPTYPE_E_HREFL_VREFL,0xe09c77e0l,0xda60,0x11cf,0x9b,0x06,0x00,0xa0,0xc9,0x03,0xa3,0xb8);
-DEFINE_GUID(DDVPTYPE_PHILIPS,0x332cf160l,0xda61,0x11cf,0x9b,0x06,0x00,0xa0,0xc9,0x03,0xa3,0xb8);
-DEFINE_GUID(DPAID_ComPort,0xf2f0ce00,0xe0af,0x11cf,0x9c,0x4e,0x0,0xa0,0xc9,0x5,0x42,0x5e);
-DEFINE_GUID(DPAID_INet,0xc4a54da0,0xe0af,0x11cf,0x9c,0x4e,0x0,0xa0,0xc9,0x5,0x42,0x5e);
-DEFINE_GUID(DPAID_INetPort,0xe4524541,0x8ea5,0x11d1,0x8a,0x96,0x0,0x60,0x97,0xb0,0x14,0x11);
-DEFINE_GUID(DPAID_INetW,0xe63232a0,0x9dbf,0x11d0,0x9c,0xc1,0x0,0xa0,0xc9,0x5,0x42,0x5e);
-DEFINE_GUID(DPAID_LobbyProvider,0x59b95640,0x9667,0x11d0,0xa7,0x7d,0x0,0x0,0xf8,0x3,0xab,0xfc);
-DEFINE_GUID(DPAID_Modem,0xf6dcc200,0xa2fe,0x11d0,0x9c,0x4f,0x0,0xa0,0xc9,0x5,0x42,0x5e);
-DEFINE_GUID(DPAID_ModemW,0x1fd92e0,0xa2ff,0x11d0,0x9c,0x4f,0x0,0xa0,0xc9,0x5,0x42,0x5e);
-DEFINE_GUID(DPAID_Phone,0x78ec89a0,0xe0af,0x11cf,0x9c,0x4e,0x0,0xa0,0xc9,0x5,0x42,0x5e);
-DEFINE_GUID(DPAID_PhoneW,0xba5a7a70,0x9dbf,0x11d0,0x9c,0xc1,0x0,0xa0,0xc9,0x5,0x42,0x5e);
-DEFINE_GUID(DPAID_ServiceProvider,0x7d916c0,0xe0af,0x11cf,0x9c,0x4e,0x0,0xa0,0xc9,0x5,0x42,0x5e);
-DEFINE_GUID(DPAID_TotalSize,0x1318f560,0x912c,0x11d0,0x9d,0xaa,0x0,0xa0,0xc9,0xa,0x43,0xcb);
-DEFINE_GUID(DPLPROPERTY_LobbyGuid,0xf56920a0,0xd218,0x11d0,0xba,0x39,0x0,0xc0,0x4f,0xd7,0xed,0x67);
-DEFINE_GUID(DPLPROPERTY_MessagesSupported,0x762ccda1,0xd916,0x11d0,0xba,0x39,0x0,0xc0,0x4f,0xd7,0xed,0x67);
-DEFINE_GUID(DPLPROPERTY_PlayerGuid,0xb4319322,0xd20d,0x11d0,0xba,0x39,0x0,0xc0,0x4f,0xd7,0xed,0x67);
-DEFINE_GUID(DPLPROPERTY_PlayerScore,0x48784000,0xd219,0x11d0,0xba,0x39,0x0,0xc0,0x4f,0xd7,0xed,0x67);
-DEFINE_GUID(DPSPGUID_IPX,0x685bc400,0x9d2c,0x11cf,0xa9,0xcd,0x0,0xaa,0x0,0x68,0x86,0xe3);
-DEFINE_GUID(DPSPGUID_TCPIP,0x36e95ee0,0x8577,0x11cf,0x96,0xc,0x0,0x80,0xc7,0x53,0x4e,0x82);
-DEFINE_GUID(DPSPGUID_SERIAL,0xf1d6860,0x88d9,0x11cf,0x9c,0x4e,0x0,0xa0,0xc9,0x5,0x42,0x5e);
-DEFINE_GUID(DPSPGUID_MODEM,0x44eaa760,0xcb68,0x11cf,0x9c,0x4e,0x0,0xa0,0xc9,0x5,0x42,0x5e);
-DEFINE_GUID(DPVCTGUID_ADPCM,0x699b52c1,0xa885,0x46a8,0xa3,0x8,0x97,0x17,0x24,0x19,0xad,0xc7);
-DEFINE_GUID(DPVCTGUID_GSM,0x24768c60,0x5a0d,0x11d3,0x9b,0xe4,0x52,0x54,0x0,0xd9,0x85,0xe7);
-DEFINE_GUID(DPVCTGUID_NONE,0x8de12fd4,0x7cb3,0x48ce,0xa7,0xe8,0x9c,0x47,0xa2,0x2e,0x8a,0xc5);
-DEFINE_GUID(DPVCTGUID_SC03,0x7d82a29b,0x2242,0x4f82,0x8f,0x39,0x5d,0x11,0x53,0xdf,0x3e,0x41);
-DEFINE_GUID(DPVCTGUID_SC06,0x53def900,0x7168,0x4633,0xb4,0x7f,0xd1,0x43,0x91,0x6a,0x13,0xc7);
-DEFINE_GUID(DPVCTGUID_TRUESPEECH,0xd7954361,0x5a0b,0x11d3,0x9b,0xe4,0x52,0x54,0x0,0xd9,0x85,0xe7);
-DEFINE_GUID(DPVCTGUID_VR12,0xfe44a9fe,0x8ed4,0x48bf,0x9d,0x66,0x1b,0x1a,0xdf,0xf9,0xff,0x6d);
-DEFINE_GUID(DS3DALG_HRTF_FULL,0xc2413340,0x1c1b,0x11d2,0x94,0xf5,0x0,0xc0,0x4f,0xc2,0x8a,0xca);
-DEFINE_GUID(DS3DALG_HRTF_LIGHT,0xc2413342,0x1c1b,0x11d2,0x94,0xf5,0x0,0xc0,0x4f,0xc2,0x8a,0xca);
-DEFINE_GUID(DS3DALG_NO_VIRTUALIZATION,0xc241333f,0x1c1b,0x11d2,0x94,0xf5,0x0,0xc0,0x4f,0xc2,0x8a,0xca);
-DEFINE_GUID(DSDEVID_DefaultCapture,0xdef00001,0x9c6d,0x47ed,0xaa,0xf1,0x4d,0xda,0x8f,0x2b,0x5c,0x03);
-DEFINE_GUID(DSDEVID_DefaultPlayback,0xdef00000,0x9c6d,0x47ed,0xaa,0xf1,0x4d,0xda,0x8f,0x2b,0x5c,0x03);
-DEFINE_GUID(DSDEVID_DefaultVoiceCapture,0xdef00003,0x9c6d,0x47ed,0xaa,0xf1,0x4d,0xda,0x8f,0x2b,0x5c,0x03);
-DEFINE_GUID(DSDEVID_DefaultVoicePlayback,0xdef00002,0x9c6d,0x47ed,0xaa,0xf1,0x4d,0xda,0x8f,0x2b,0x5c,0x03);
-DEFINE_GUID(GUID_All_Objects,0xaa114de5,0xc262,0x4169,0xa1,0xc8,0x23,0xd6,0x98,0xcc,0x73,0xb5);
-DEFINE_GUID(GUID_BandParam,0x2bb1938,0xcb8b,0x11d2,0x8b,0xb9,0x0,0x60,0x8,0x93,0xb1,0xb6);
-DEFINE_GUID(GUID_Buffer_3D_Dry,0x186cc546,0xdb29,0x11d3,0x9b,0xd1,0x0,0x80,0xc7,0x15,0xa,0x74);
-DEFINE_GUID(GUID_Buffer_EnvReverb,0x186cc542,0xdb29,0x11d3,0x9b,0xd1,0x0,0x80,0xc7,0x15,0xa,0x74);
-DEFINE_GUID(GUID_Buffer_Mono,0x186cc547,0xdb29,0x11d3,0x9b,0xd1,0x0,0x80,0xc7,0x15,0xa,0x74);
-DEFINE_GUID(GUID_Buffer_Reverb,0x186cc541,0xdb29,0x11d3,0x9b,0xd1,0x0,0x80,0xc7,0x15,0xa,0x74);
-DEFINE_GUID(GUID_Buffer_Stereo,0x186cc545,0xdb29,0x11d3,0x9b,0xd1,0x0,0x80,0xc7,0x15,0xa,0x74);
-DEFINE_GUID(GUID_Button,0xa36d02f0,0xc9f3,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_Clear_All_Bands,0xd2ac28ab,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_Clear_All_MelodyFragments,0x8509fee6,0xb617,0x11d2,0x97,0xfa,0x0,0xc0,0x4f,0xa3,0x6e,0x58);
-DEFINE_GUID(GUID_ColorControlCallbacks,0xefd60cc2,0x49e7,0x11d0,0x88,0x9d,0x0,0xaa,0x0,0xbb,0xb7,0x6a);
-DEFINE_GUID(GUID_CommandParam,0xd2ac289d,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_CommandParam2,0x28f97ef7,0x9538,0x11d2,0x97,0xa9,0x0,0xc0,0x4f,0xa3,0x6e,0x58);
-DEFINE_GUID(GUID_CommandParamNext,0x472afe7a,0x281b,0x11d3,0x81,0x7d,0x0,0xc0,0x4f,0xa3,0x6e,0x58);
-DEFINE_GUID(GUID_ConnectToDLSCollection,0x1db1ae6b,0xe92e,0x11d1,0xa8,0xc5,0x0,0xc0,0x4f,0xa3,0x72,0x6e);
-DEFINE_GUID(GUID_ConstantForce,0x13541c20,0x8e33,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
-DEFINE_GUID(GUID_CustomForce,0x13541c2b,0x8e33,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
-DEFINE_GUID(GUID_D3DCallbacks2,0xba584e1,0x70b6,0x11d0,0x88,0x9d,0x0,0xaa,0x0,0xbb,0xb7,0x6a);
-DEFINE_GUID(GUID_D3DCallbacks3,0xddf41230,0xec0a,0x11d0,0xa9,0xb6,0x0,0xaa,0x0,0xc0,0x99,0x3e);
-DEFINE_GUID(GUID_D3DExtendedCaps,0x7de41f80,0x9d93,0x11d0,0x89,0xab,0x0,0xa0,0xc9,0x5,0x41,0x29);
-DEFINE_GUID(GUID_D3DParseUnknownCommandCallback,0x2e04ffa0,0x98e4,0x11d1,0x8c,0xe1,0x0,0xa0,0xc9,0x6,0x29,0xa8);
-DEFINE_GUID(GUID_Damper,0x13541c28,0x8e33,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
-DEFINE_GUID(GUID_DDMoreCaps,0x880baf30,0xb030,0x11d0,0x8e,0xa7,0x0,0x60,0x97,0x97,0xea,0x5b);
-DEFINE_GUID(GUID_DDMoreSurfaceCaps,0x3b8a0466,0xf269,0x11d1,0x88,0xb,0x0,0xc0,0x4f,0xd9,0x30,0xc5);
-DEFINE_GUID(GUID_DDStereoMode,0xf828169c,0xa8e8,0x11d2,0xa1,0xf2,0x0,0xa0,0xc9,0x83,0xea,0xf6);
-DEFINE_GUID(GUID_DefaultGMCollection,0xf17e8673,0xc3b4,0x11d1,0x87,0xb,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_DirectDrawPaletteStream,0x730c7ffc,0x5347,0x11d1,0x8c,0x4d,0x0,0xc0,0x4f,0xd9,0x30,0xc5);
-DEFINE_GUID(GUID_DirectDrawSurfaceStream,0xe043bc46,0x5317,0x11d1,0x8c,0x4d,0x0,0xc0,0x4f,0xd9,0x30,0xc5);
-DEFINE_GUID(GUID_DirectMusicAllTypes,0xd2ac2893,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_Disable_Auto_Download,0xd2ac28aa,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_DisableTempo,0x45fc707d,0x1db4,0x11d2,0xbc,0xac,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
-DEFINE_GUID(GUID_DisableTimeSig,0x45fc707b,0x1db4,0x11d2,0xbc,0xac,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
-DEFINE_GUID(GUID_DMUS_PROP_DLS1,0x178f2f27,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12);
-DEFINE_GUID(GUID_DMUS_PROP_DLS2,0xf14599e5,0x4689,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
-DEFINE_GUID(GUID_DMUS_PROP_Effects,0xcda8d611,0x684a,0x11d2,0x87,0x1e,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_DMUS_PROP_GM_Hardware,0x178f2f24,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12);
-DEFINE_GUID(GUID_DMUS_PROP_GS_Capable,0x6496aba2,0x61b0,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
-DEFINE_GUID(GUID_DMUS_PROP_GS_Hardware,0x178f2f25,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12);
-DEFINE_GUID(GUID_DMUS_PROP_INSTRUMENT2,0x865fd372,0x9f67,0x11d2,0x87,0x2a,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_DMUS_PROP_LegacyCaps,0xcfa7cdc2,0x00a1,0x11d2,0xaa,0xd5,0x00,0x00,0xf8,0x75,0xac,0x12);
-DEFINE_GUID(GUID_DMUS_PROP_MemorySize,0x178f2f28,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12);
-DEFINE_GUID(GUID_DMUS_PROP_SampleMemorySize,0x178f2f28,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12);
-DEFINE_GUID(GUID_DMUS_PROP_SamplePlaybackRate,0x2a91f713,0xa4bf,0x11d2,0xbb,0xdf,0x0,0x60,0x8,0x33,0xdb,0xd8);
-DEFINE_GUID(GUID_DMUS_PROP_SynthSink_DSOUND,0xaa97844,0xc877,0x11d1,0x87,0xc,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_DMUS_PROP_SynthSink_WAVE,0xaa97845,0xc877,0x11d1,0x87,0xc,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_DMUS_PROP_Volume,0xfedfae25l,0xe46e,0x11d1,0xaa,0xce,0x00,0x00,0xf8,0x75,0xac,0x12);
-DEFINE_GUID(GUID_DMUS_PROP_WavesReverb,0x4cb5622,0x32e5,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
-DEFINE_GUID(GUID_DMUS_PROP_WriteLatency,0x268a0fa0,0x60f2,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
-DEFINE_GUID(GUID_DMUS_PROP_WritePeriod,0x268a0fa1,0x60f2,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
-DEFINE_GUID(GUID_DMUS_PROP_XG_Capable,0x6496aba1,0x61b0,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
-DEFINE_GUID(GUID_DMUS_PROP_XG_Hardware,0x178f2f26,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12);
-DEFINE_GUID(GUID_Download,0xd2ac28a7,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_DownloadToAudioPath,0x9f2c0341,0xc5c4,0x11d3,0x9b,0xd1,0x44,0x45,0x53,0x54,0x0,0x0);
-DEFINE_GUID(GUID_DSCFX_CLASS_AEC,0xbf963d80l,0xc559,0x11d0,0x8a,0x2b,0x00,0xa0,0xc9,0x25,0x5a,0xc1);
-DEFINE_GUID(GUID_DSCFX_CLASS_NS,0xe07f903f,0x62fd,0x4e60,0x8c,0xdd,0xde,0xa7,0x23,0x66,0x65,0xb5);
-DEFINE_GUID(GUID_DSCFX_MS_AEC,0xcdebb919,0x379a,0x488a,0x87,0x65,0xf5,0x3c,0xfd,0x36,0xde,0x40);
-DEFINE_GUID(GUID_DSCFX_MS_NS,0x11c5c73b,0x66e9,0x4ba1,0xa0,0xba,0xe8,0x14,0xc6,0xee,0xd9,0x2d);
-DEFINE_GUID(GUID_DSCFX_SYSTEM_AEC,0x1c22c56d,0x9879,0x4f5b,0xa3,0x89,0x27,0x99,0x6d,0xdc,0x28,0x10);
-DEFINE_GUID(GUID_DSCFX_SYSTEM_NS,0x5ab0882e,0x7274,0x4516,0x87,0x7d,0x4e,0xee,0x99,0xba,0x4f,0xd0);
-DEFINE_GUID(GUID_DSFX_STANDARD_COMPRESSOR,0xef011f79,0x4000,0x406d,0x87,0xaf,0xbf,0xfb,0x3f,0xc3,0x9d,0x57);
-DEFINE_GUID(GUID_DSFX_STANDARD_DISTORTION,0xef114c90,0xcd1d,0x484e,0x96,0xe5,0x09,0xcf,0xaf,0x91,0x2a,0x21);
-DEFINE_GUID(GUID_DSFX_STANDARD_ECHO,0xef3e932c,0xd40b,0x4f51,0x8c,0xcf,0x3f,0x98,0xf1,0xb2,0x9d,0x5d);
-DEFINE_GUID(GUID_DSFX_STANDARD_FLANGER,0xefca3d92,0xdfd8,0x4672,0xa6,0x03,0x74,0x20,0x89,0x4b,0xad,0x98);
-DEFINE_GUID(GUID_DSFX_STANDARD_GARGLE,0xdafd8210,0x5711,0x4b91,0x9f,0xe3,0xf7,0x5b,0x7a,0xe2,0x79,0xbf);
-DEFINE_GUID(GUID_DSFX_STANDARD_CHORUS,0xefe6629c,0x81f7,0x4281,0xbd,0x91,0xc9,0xd6,0x04,0xa9,0x5a,0xf6);
-DEFINE_GUID(GUID_DSFX_STANDARD_I3DL2REVERB,0xef985e71,0xd5c7,0x42d4,0xba,0x4d,0x2d,0x07,0x3e,0x2e,0x96,0xf4);
-DEFINE_GUID(GUID_DSFX_STANDARD_PARAMEQ,0x120ced89,0x3bf4,0x4173,0xa1,0x32,0x3c,0xb4,0x06,0xcf,0x32,0x31);
-DEFINE_GUID(GUID_DSFX_WAVES_REVERB,0x87fc0268,0x9a55,0x4360,0x95,0xaa,0x00,0x4a,0x1d,0x9d,0xe2,0x6c);
-DEFINE_GUID(GUID_Enable_Auto_Download,0xd2ac28a9,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_EnableTempo,0x45fc707e,0x1db4,0x11d2,0xbc,0xac,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
-DEFINE_GUID(GUID_EnableTimeSig,0x45fc707c,0x1db4,0x11d2,0xbc,0xac,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
-DEFINE_GUID(GUID_Friction,0x13541c2a,0x8e33,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
-DEFINE_GUID(GUID_HIDClass,0x745a17a0,0x74d3,0x11d0,0xb6,0xfe,0x00,0xa0,0xc9,0x0f,0x57,0xda);
-DEFINE_GUID(GUID_ChordParam,0xd2ac289e,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_IDirectMusicBand,0xd2ac28ac,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_IDirectMusicChordMap,0xd2ac28ad,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_IDirectMusicStyle,0xd2ac28a1,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_Inertia,0x13541c29,0x8e33,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
-DEFINE_GUID(GUID_Joystick,0x6f1d2b70,0xd5a0,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_KernelCallbacks,0x80863800,0x6b06,0x11d0,0x9b,0x6,0x0,0xa0,0xc9,0x3,0xa3,0xb8);
-DEFINE_GUID(GUID_KernelCaps,0xffaa7540,0x7aa8,0x11d0,0x9b,0x6,0x0,0xa0,0xc9,0x3,0xa3,0xb8);
-DEFINE_GUID(GUID_Key,0x55728220,0xd33c,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_KeyboardClass,0x4d36e96b,0xe325,0x11ce,0xbf,0xc1,0x08,0x00,0x2b,0xe1,0x03,0x18);
-DEFINE_GUID(GUID_MediaClass,0x4d36e96c,0xe325,0x11ce,0xbf,0xc1,0x08,0x00,0x2b,0xe1,0x03,0x18);
-DEFINE_GUID(GUID_MelodyFragment,0xb291c7f2,0xb616,0x11d2,0x97,0xfa,0x0,0xc0,0x4f,0xa3,0x6e,0x58);
-DEFINE_GUID(GUID_Miscellaneous2Callbacks,0x406b2f00,0x3e5a,0x11d1,0xb6,0x40,0x0,0xaa,0x0,0xa1,0xf9,0x6a);
-DEFINE_GUID(GUID_MiscellaneousCallbacks,0xefd60cc0,0x49e7,0x11d0,0x88,0x9d,0x0,0xaa,0x0,0xbb,0xb7,0x6a);
-DEFINE_GUID(GUID_MotionCompCallbacks,0xb1122b40,0x5da5,0x11d1,0x8f,0xcf,0x0,0xc0,0x4f,0xc2,0x9b,0x4e);
-DEFINE_GUID(GUID_MouseClass,0x4d36e96f,0xe325,0x11ce,0xbf,0xc1,0x08,0x00,0x2b,0xe1,0x03,0x18);
-DEFINE_GUID(GUID_MuteParam,0xd2ac28af,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_NonLocalVidMemCaps,0x86c4fa80,0x8d84,0x11d0,0x94,0xe8,0x0,0xc0,0x4f,0xc3,0x41,0x37);
-DEFINE_GUID(GUID_NOTIFICATION_COMMAND,0xd2ac289c,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_NOTIFICATION_CHORD,0xd2ac289b,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_NOTIFICATION_MEASUREANDBEAT,0xd2ac289a,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_NOTIFICATION_PERFORMANCE,0x81f75bc5,0x4e5d,0x11d2,0xbc,0xc7,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
-DEFINE_GUID(GUID_NOTIFICATION_RECOMPOSE,0xd348372b,0x945b,0x45ae,0xa5,0x22,0x45,0xf,0x12,0x5b,0x84,0xa5);
-DEFINE_GUID(GUID_NOTIFICATION_SEGMENT,0xd2ac2899,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_NTCallbacks,0x6fe9ecde,0xdf89,0x11d1,0x9d,0xb0,0,0x60,0x8,0x27,0x71,0xba);
-DEFINE_GUID(GUID_OptSurfaceKmodeInfo,0xe05c8472,0x51d4,0x11d1,0x8c,0xce,0x0,0xa0,0xc9,0x6,0x29,0xa8);
-DEFINE_GUID(GUID_OptSurfaceUmodeInfo,0x9d792804,0x5fa8,0x11d1,0x8c,0xd0,0x0,0xa0,0xc9,0x6,0x29,0xa8);
-DEFINE_GUID(GUID_PerfAutoDownload,0xfb09565b,0x3631,0x11d2,0xbc,0xb8,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
-DEFINE_GUID(GUID_PerfMasterGrooveLevel,0xd2ac28b2,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_PerfMasterTempo,0xd2ac28b0,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_PerfMasterVolume,0xd2ac28b1,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_Play_Marker,0xd8761a41,0x801a,0x11d3,0x9b,0xd1,0xda,0xf7,0xe1,0xc3,0xd8,0x34);
-DEFINE_GUID(GUID_POV,0xa36d02f2,0xc9f3,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_RampForce,0x13541c21,0x8e33,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
-DEFINE_GUID(GUID_RhythmParam,0xd2ac289f,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_RxAxis,0xa36d02f4,0xc9f3,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_RyAxis,0xa36d02f5,0xc9f3,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_RzAxis,0xa36d02e3,0xc9f3,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_SawtoothDown,0x13541c26,0x8e33,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
-DEFINE_GUID(GUID_SawtoothUp,0x13541c25,0x8e33,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
-DEFINE_GUID(GUID_SeedVariations,0x65b76fa5,0xff37,0x11d2,0x81,0x4e,0x0,0xc0,0x4f,0xa3,0x6e,0x58);
-DEFINE_GUID(GUID_Sine,0x13541c23,0x8e33,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
-DEFINE_GUID(GUID_Slider,0xa36d02e4,0xc9f3,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_Spring,0x13541c27,0x8e33,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
-DEFINE_GUID(GUID_Square,0x13541c22,0x8e33,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
-DEFINE_GUID(GUID_StandardMIDIFile,0x6621075,0xe92e,0x11d1,0xa8,0xc5,0x0,0xc0,0x4f,0xa3,0x72,0x6e);
-DEFINE_GUID(GUID_Synth_Default,0x26bb9432,0x45fe,0x48d3,0xa3,0x75,0x24,0x72,0xc5,0xe3,0xe7,0x86);
-DEFINE_GUID(GUID_SysKeyboard,0x6f1d2b61,0xd5a0,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_SysKeyboardEm,0x6f1d2b82,0xd5a0,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_SysKeyboardEm2,0x6f1d2b83,0xd5a0,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_SysMouse,0x6f1d2b60,0xd5a0,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_SysMouseEm,0x6f1d2b80,0xd5a0,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_SysMouseEm2,0x6f1d2b81,0xd5a0,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_TempoParam,0xd2ac28a5,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_TimeSignature,0xd2ac28a4,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_Triangle,0x13541c24,0x8e33,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
-DEFINE_GUID(GUID_Unknown,0xa36d02f3,0xc9f3,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_Unload,0xd2ac28a8,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(GUID_UnloadFromAudioPath,0x9f2c0342,0xc5c4,0x11d3,0x9b,0xd1,0x44,0x45,0x53,0x54,0x0,0x0);
-DEFINE_GUID(GUID_UserModeDriverInfo,0xf0b0e8e2,0x5f97,0x11d1,0x8c,0xd0,0x0,0xa0,0xc9,0x6,0x29,0xa8);
-DEFINE_GUID(GUID_UserModeDriverPassword,0x97f861b6,0x60a1,0x11d1,0x8c,0xd0,0x0,0xa0,0xc9,0x6,0x29,0xa8);
-DEFINE_GUID(GUID_Valid_Start_Time,0x7f6b1760,0x1fdb,0x11d3,0x82,0x26,0x44,0x45,0x53,0x54,0x0,0x0);
-DEFINE_GUID(GUID_Variations,0x11f72cce,0x26e6,0x4ecd,0xaf,0x2e,0xd6,0x68,0xe6,0x67,0x7,0xd8);
-DEFINE_GUID(GUID_VideoPortCallbacks,0xefd60cc1,0x49e7,0x11d0,0x88,0x9d,0x0,0xaa,0x0,0xbb,0xb7,0x6a);
-DEFINE_GUID(GUID_VideoPortCaps,0xefd60cc3,0x49e7,0x11d0,0x88,0x9d,0x0,0xaa,0x0,0xbb,0xb7,0x6a);
-DEFINE_GUID(GUID_XAxis,0xa36d02e0,0xc9f3,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_YAxis,0xa36d02e1,0xc9f3,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_ZAxis,0xa36d02e2,0xc9f3,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(GUID_ZPixelFormats,0x93869880,0x36cf,0x11d1,0x9b,0x1b,0x0,0xaa,0x0,0xbb,0xb8,0xae);
-DEFINE_GUID(IID_ID3DXAnimationController,0x3a714d34,0xff61,0x421e,0x90,0x9f,0x63,0x9f,0x38,0x35,0x67,0x8);
-DEFINE_GUID(IID_ID3DXAnimationMixer,0x5eec992b,0x1046,0x44f6,0x92,0x4b,0xd1,0x75,0x96,0xb0,0x48,0x3e);
-DEFINE_GUID(IID_ID3DXAnimationSet,0x54b569ac,0xaef,0x473e,0x97,0x4,0x3f,0xef,0x31,0x7f,0x64,0xab);
-DEFINE_GUID(IID_ID3DXBaseMesh,0x2a835771,0xbf4d,0x43f4,0x8e,0x14,0x82,0xa8,0x9,0xf1,0x7d,0x8a);
-DEFINE_GUID(IID_ID3DXBuffer,0x932e6a7e,0xc68e,0x45dd,0xa7,0xbf,0x53,0xd1,0x9c,0x86,0xdb,0x1f);
-DEFINE_GUID(IID_ID3DXEffect,0x648b1ceb,0x8d4e,0x4d66,0xb6,0xfa,0xe4,0x49,0x69,0xe8,0x2e,0x89);
-DEFINE_GUID(IID_ID3DXEffectCompiler,0xf8ee90d3,0xfcc6,0x4f14,0x8a,0xe8,0x63,0x74,0xae,0x96,0x8e,0x33);
-DEFINE_GUID(IID_ID3DXEffectPool,0x53ca7768,0xc0d0,0x4664,0x8e,0x79,0xd1,0x56,0xe4,0xf5,0xb7,0xe0);
-DEFINE_GUID(IID_ID3DXInterpolator,0xade2c06d,0x3747,0x4b9f,0xa5,0x14,0x34,0x40,0xb8,0x28,0x49,0x80);
-DEFINE_GUID(IID_ID3DXKeyFrameInterpolator,0x6caa71f8,0x972,0x4cdb,0xa5,0x5b,0x43,0xb9,0x68,0x99,0x75,0x15);
-DEFINE_GUID(IID_ID3DXMatrixStack,0xe3357330,0xcc5e,0x11d2,0xa4,0x34,0x0,0xa0,0xc9,0x6,0x29,0xa8);
-DEFINE_GUID(IID_ID3DXMesh,0xccae5c3b,0x4dd1,0x4d0f,0x99,0x7e,0x46,0x84,0xca,0x64,0x55,0x7f);
-DEFINE_GUID(IID_ID3DXPMesh,0x19fbe386,0xc282,0x4659,0x97,0xbd,0xcb,0x86,0x9b,0x8,0x4a,0x6c);
-DEFINE_GUID(IID_ID3DXSkinMesh,0x8db06ecc,0xebfc,0x408a,0x94,0x4,0x30,0x74,0xb4,0x77,0x35,0x15);
-DEFINE_GUID(IID_ID3DXSPMesh,0x4e3ca05c,0xd4ff,0x4d11,0x8a,0x2,0x16,0x45,0x9e,0x8,0xf6,0xf4);
-DEFINE_GUID(IID_ID3DXTechnique,0xa00f378d,0xaf79,0x4917,0x90,0x7e,0x4d,0x63,0x5e,0xe6,0x38,0x44);
-DEFINE_GUID(IID_IDDVideoPortContainer,0x6c142760,0xa733,0x11ce,0xa5,0x21,0x00,0x20,0xaf,0x0b,0xe5,0x60);
-DEFINE_GUID(IID_IDirect3D,0x3bba0080,0x2421,0x11cf,0xa3,0x1a,0x00,0xaa,0x00,0xb9,0x33,0x56);
-DEFINE_GUID(IID_IDirect3D2,0x6aae1ec1,0x662a,0x11d0,0x88,0x9d,0x00,0xaa,0x00,0xbb,0xb7,0x6a);
-DEFINE_GUID(IID_IDirect3D3,0xbb223240,0xe72b,0x11d0,0xa9,0xb4,0x00,0xaa,0x00,0xc0,0x99,0x3e);
-DEFINE_GUID(IID_IDirect3D7,0xf5049e77,0x4861,0x11d2,0xa4,0x7,0x0,0xa0,0xc9,0x6,0x29,0xa8);
-DEFINE_GUID(IID_IDirect3D8,0x1dd9e8da,0x1c77,0x4d40,0xb0,0xcf,0x98,0xfe,0xfd,0xff,0x95,0x12);
-DEFINE_GUID(IID_IDirect3D9, 0x81bdcbca, 0x64d4, 0x426d, 0xae, 0x8d, 0xad, 0x1, 0x47, 0xf4, 0x27, 0x5c);
-DEFINE_GUID(IID_IDirect3DBaseTexture8,0xb4211cfa,0x51b9,0x4a9f,0xab,0x78,0xdb,0x99,0xb2,0xbb,0x67,0x8e);
-DEFINE_GUID(IID_IDirect3DBaseTexture9, 0x580ca87e, 0x1d3c, 0x4d54, 0x99, 0x1d, 0xb7, 0xd3, 0xe3, 0xc2, 0x98, 0xce);
-DEFINE_GUID(IID_IDirect3DCubeTexture8,0x3ee5b968,0x2aca,0x4c34,0x8b,0xb5,0x7e,0x0c,0x3d,0x19,0xb7,0x50);
-DEFINE_GUID(IID_IDirect3DCubeTexture9, 0xfff32f81, 0xd953, 0x473a, 0x92, 0x23, 0x93, 0xd6, 0x52, 0xab, 0xa9, 0x3f);
-DEFINE_GUID(IID_IDirect3DDevice,0x64108800,0x957d,0x11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29);
-DEFINE_GUID(IID_IDirect3DDevice2,0x93281501,0x8cf8,0x11d0,0x89,0xab,0x0,0xa0,0xc9,0x5,0x41,0x29);
-DEFINE_GUID(IID_IDirect3DDevice3,0xb0ab3b60,0x33d7,0x11d1,0xa9,0x81,0x0,0xc0,0x4f,0xd7,0xb1,0x74);
-DEFINE_GUID(IID_IDirect3DDevice7,0xf5049e79,0x4861,0x11d2,0xa4,0x7,0x0,0xa0,0xc9,0x6,0x29,0xa8);
-DEFINE_GUID(IID_IDirect3DDevice8,0x7385e5df,0x8fe8,0x41d5,0x86,0xb6,0xd7,0xb4,0x85,0x47,0xb6,0xcf);
-DEFINE_GUID(IID_IDirect3DDevice9, 0xd0223b96, 0xbf7a, 0x43fd, 0x92, 0xbd, 0xa4, 0x3b, 0xd, 0x82, 0xb9, 0xeb);
-DEFINE_GUID(IID_IDirect3DExecuteBuffer,0x4417c145,0x33ad,0x11cf,0x81,0x6f,0x00,0x00,0xc0,0x20,0x15,0x6e);
-DEFINE_GUID(IID_IDirect3DHALDevice,0x84e63de0,0x46aa,0x11cf,0x81,0x6f,0x00,0x00,0xc0,0x20,0x15,0x6e);
-DEFINE_GUID(IID_IDirect3DIndexBuffer8,0x0e689c9a,0x053d,0x44a0,0x9d,0x92,0xdb,0x0e,0x3d,0x75,0x0f,0x86);
-DEFINE_GUID(IID_IDirect3DIndexBuffer9, 0x7c9dd65e, 0xd3f7, 0x4529, 0xac, 0xee, 0x78, 0x58, 0x30, 0xac, 0xde, 0x35);
-DEFINE_GUID(IID_IDirect3DLight,0x4417c142,0x33ad,0x11cf,0x81,0x6f,0x00,0x00,0xc0,0x20,0x15,0x6e);
-DEFINE_GUID(IID_IDirect3DMaterial,0x4417c144,0x33ad,0x11cf,0x81,0x6f,0x00,0x00,0xc0,0x20,0x15,0x6e);
-DEFINE_GUID(IID_IDirect3DMaterial2,0x93281503,0x8cf8,0x11d0,0x89,0xab,0x0,0xa0,0xc9,0x5,0x41,0x29);
-DEFINE_GUID(IID_IDirect3DMaterial3,0xca9c46f4,0xd3c5,0x11d1,0xb7,0x5a,0x0,0x60,0x8,0x52,0xb3,0x12);
-DEFINE_GUID(IID_IDirect3DMMXDevice,0x881949a1,0xd6f3,0x11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29);
-DEFINE_GUID(IID_IDirect3DNullDevice,0x8767df22,0xbacc,0x11d1,0x89,0x69,0x0,0xa0,0xc9,0x6,0x29,0xa8);
-DEFINE_GUID(IID_IDirect3DPixelShader9, 0x6d3bdbdc, 0x5b02, 0x4415, 0xb8, 0x52, 0xce, 0x5e, 0x8b, 0xcc, 0xb2, 0x89);
-DEFINE_GUID(IID_IDirect3DQuery9, 0xd9771460, 0xa695, 0x4f26, 0xbb, 0xd3, 0x27, 0xb8, 0x40, 0xb5, 0x41, 0xcc);
-DEFINE_GUID(IID_IDirect3DResource9, 0x5eec05d, 0x8f7d, 0x4362, 0xb9, 0x99, 0xd1, 0xba, 0xf3, 0x57, 0xc7, 0x4);
-DEFINE_GUID(IID_IDirect3DRampDevice,0xf2086b20,0x259f,0x11cf,0xa3,0x1a,0x00,0xaa,0x00,0xb9,0x33,0x56);
-DEFINE_GUID(IID_IDirect3DRefDevice,0x50936643,0x13e9,0x11d1,0x89,0xaa,0x0,0xa0,0xc9,0x5,0x41,0x29);
-DEFINE_GUID(IID_IDirect3DResource8,0x1b36bb7b,0x9b7,0x410a,0xb4,0x45,0x7d,0x14,0x30,0xd7,0xb3,0x3f);
-DEFINE_GUID(IID_IDirect3DRGBDevice,0xa4665c60,0x2673,0x11cf,0xa3,0x1a,0x00,0xaa,0x00,0xb9,0x33,0x56);
-DEFINE_GUID(IID_IDirect3DRM,0x2bc49361,0x8327,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRM2,0x4516ecc8,0x8f20,0x11d0,0x9b,0x6d,0x00,0x00,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(IID_IDirect3DRM3,0x4516ec83,0x8f20,0x11d0,0x9b,0x6d,0x00,0x00,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(IID_IDirect3DRMAnimation,0xeb16cb0d,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMAnimation2,0xff6b7f77,0xa40e,0x11d1,0x91,0xf9,0x0,0x0,0xf8,0x75,0x8e,0x66);
-DEFINE_GUID(IID_IDirect3DRMAnimationArray,0xd5f1cae0,0x4bd7,0x11d1,0xb9,0x74,0x0,0x60,0x8,0x3e,0x45,0xf3);
-DEFINE_GUID(IID_IDirect3DRMAnimationSet,0xeb16cb0e,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMAnimationSet2,0xff6b7f79,0xa40e,0x11d1,0x91,0xf9,0x0,0x0,0xf8,0x75,0x8e,0x66);
-DEFINE_GUID(IID_IDirect3DRMClippedVisual,0x5434e733,0x6d66,0x11d1,0xbb,0xb,0x0,0x0,0xf8,0x75,0x86,0x5a);
-DEFINE_GUID(IID_IDirect3DRMDevice,0xe9e19280,0x6e05,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMDevice2,0x4516ec78,0x8f20,0x11d0,0x9b,0x6d,0x00,0x00,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(IID_IDirect3DRMDevice3,0x549f498b,0xbfeb,0x11d1,0x8e,0xd8,0x0,0xa0,0xc9,0x67,0xa4,0x82);
-DEFINE_GUID(IID_IDirect3DRMDeviceArray,0xeb16cb10,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMFace,0xeb16cb07,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMFace2,0x4516ec81,0x8f20,0x11d0,0x9b,0x6d,0x00,0x00,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(IID_IDirect3DRMFaceArray,0xeb16cb17,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMFrame,0xeb16cb03,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMFrame2,0xc3dfbd60,0x3988,0x11d0,0x9e,0xc2,0x0,0x0,0xc0,0x29,0x1a,0xc3);
-DEFINE_GUID(IID_IDirect3DRMFrame3,0xff6b7f70,0xa40e,0x11d1,0x91,0xf9,0x0,0x0,0xf8,0x75,0x8e,0x66);
-DEFINE_GUID(IID_IDirect3DRMFrameArray,0xeb16cb12,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMInterpolator,0x242f6bc1,0x3849,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(IID_IDirect3DRMLight,0xeb16cb08,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMLightArray,0xeb16cb14,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMMaterial,0xeb16cb0b,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMMaterial2,0xff6b7f75,0xa40e,0x11d1,0x91,0xf9,0x0,0x0,0xf8,0x75,0x8e,0x66);
-DEFINE_GUID(IID_IDirect3DRMMesh,0xa3a80d01,0x6e12,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMMeshBuilder,0xa3a80d02,0x6e12,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMMeshBuilder2,0x4516ec77,0x8f20,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(IID_IDirect3DRMMeshBuilder3,0x4516ec82,0x8f20,0x11d0,0x9b,0x6d,0x00,0x00,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(IID_IDirect3DRMObject,0xeb16cb00,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMObject2,0x4516ec7c,0x8f20,0x11d0,0x9b,0x6d,0x00,0x00,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(IID_IDirect3DRMObjectArray,0x242f6bc2,0x3849,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(IID_IDirect3DRMPicked2Array,0x4516ec7b,0x8f20,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(IID_IDirect3DRMPickedArray,0xeb16cb16,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMProgressiveMesh,0x4516ec79,0x8f20,0x11d0,0x9b,0x6d,0x0,0x0,0xc0,0x78,0x1b,0xc3);
-DEFINE_GUID(IID_IDirect3DRMShadow,0xaf359780,0x6ba3,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMShadow2,0x86b44e25,0x9c82,0x11d1,0xbb,0xb,0x0,0xa0,0xc9,0x81,0xa0,0xa6);
-DEFINE_GUID(IID_IDirect3DRMTexture,0xeb16cb09,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMTexture2,0x120f30c0,0x1629,0x11d0,0x94,0x1c,0x0,0x80,0xc8,0xc,0xfa,0x7b);
-DEFINE_GUID(IID_IDirect3DRMTexture3,0xff6b7f73,0xa40e,0x11d1,0x91,0xf9,0x0,0x0,0xf8,0x75,0x8e,0x66);
-DEFINE_GUID(IID_IDirect3DRMUserVisual,0x59163de0,0x6d43,0x11cf,0xac,0x4a,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMViewport,0xeb16cb02,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMViewport2,0x4a1b1be6,0xbfed,0x11d1,0x8e,0xd8,0x0,0xa0,0xc9,0x67,0xa4,0x82);
-DEFINE_GUID(IID_IDirect3DRMViewportArray,0xeb16cb11,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMVisual,0xeb16cb04,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMVisualArray,0xeb16cb13,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMWinDevice,0xc5016cc0,0xd273,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DRMWrap,0xeb16cb0a,0xd271,0x11ce,0xac,0x48,0x0,0x0,0xc0,0x38,0x25,0xa1);
-DEFINE_GUID(IID_IDirect3DStateBlock9,0xb07c4fe5,0x310d,0x4ba8,0xa2,0x3c,0x4f,0xf,0x20,0x6f,0x21,0x8b);
-DEFINE_GUID(IID_IDirect3DSurface8,0xb96eebca,0xb326,0x4ea5,0x88,0x2f,0x2f,0xf5,0xba,0xe0,0x21,0xdd);
-DEFINE_GUID(IID_IDirect3DSurface9,0xcfbaf3a,0x9ff6,0x429a,0x99,0xb3,0xa2,0x79,0x6a,0xf8,0xb8,0x9b);
-DEFINE_GUID(IID_IDirect3DSwapChain8,0x928c088b,0x76b9,0x4c6b,0xa5,0x36,0xa5,0x90,0x85,0x38,0x76,0xcd);
-DEFINE_GUID(IID_IDirect3DSwapChain9,0x794950f2,0xadfc,0x458a,0x90,0x5e,0x10,0xa1,0xb,0xb,0x50,0x3b);
-DEFINE_GUID(IID_IDirect3DTexture,0x2cdcd9e0,0x25a0,0x11cf,0xa3,0x1a,0x00,0xaa,0x00,0xb9,0x33,0x56);
-DEFINE_GUID(IID_IDirect3DTexture2,0x93281502,0x8cf8,0x11d0,0x89,0xab,0x0,0xa0,0xc9,0x5,0x41,0x29);
-DEFINE_GUID(IID_IDirect3DTexture8,0xe4cdd575,0x2866,0x4f01,0xb1,0x2e,0x7e,0xec,0xe1,0xec,0x93,0x58);
-DEFINE_GUID(IID_IDirect3DTexture9,0x85c31227,0x3de5,0x4f00,0x9b,0x3a,0xf1,0x1a,0xc3,0x8c,0x18,0xb5);
-DEFINE_GUID(IID_IDirect3DTnLHalDevice,0xf5049e78,0x4861,0x11d2,0xa4,0x7,0x0,0xa0,0xc9,0x6,0x29,0xa8);
-DEFINE_GUID(IID_IDirect3DVertexBuffer,0x7a503555,0x4a83,0x11d1,0xa5,0xdb,0x0,0xa0,0xc9,0x3,0x67,0xf8);
-DEFINE_GUID(IID_IDirect3DVertexBuffer7,0xf5049e7d,0x4861,0x11d2,0xa4,0x7,0x0,0xa0,0xc9,0x6,0x29,0xa8);
-DEFINE_GUID(IID_IDirect3DVertexBuffer8,0x8aeeeac7,0x05f9,0x44d4,0xb5,0x91,0x00,0x0b,0x0d,0xf1,0xcb,0x95);
-DEFINE_GUID(IID_IDirect3DVertexBuffer9,0xb64bb1b5,0xfd70,0x4df6,0xbf,0x91,0x19,0xd0,0xa1,0x24,0x55,0xe3);
-DEFINE_GUID(IID_IDirect3DVertexDeclaration9,0xdd13c59c,0x36fa,0x4098,0xa8,0xfb,0xc7,0xed,0x39,0xdc,0x85,0x46);
-DEFINE_GUID(IID_IDirect3DVertexShader9,0xefc5557e,0x6265,0x4613,0x8a,0x94,0x43,0x85,0x78,0x89,0xeb,0x36);
-DEFINE_GUID(IID_IDirect3DViewport,0x4417c146,0x33ad,0x11cf,0x81,0x6f,0x00,0x00,0xc0,0x20,0x15,0x6e);
-DEFINE_GUID(IID_IDirect3DViewport2,0x93281500,0x8cf8,0x11d0,0x89,0xab,0x0,0xa0,0xc9,0x5,0x41,0x29);
-DEFINE_GUID(IID_IDirect3DViewport3,0xb0ab3b61,0x33d7,0x11d1,0xa9,0x81,0x0,0xc0,0x4f,0xd7,0xb1,0x74);
-DEFINE_GUID(IID_IDirect3DVolume8,0xbd7349f5,0x14f1,0x42e4,0x9c,0x79,0x97,0x23,0x80,0xdb,0x40,0xc0);
-DEFINE_GUID(IID_IDirect3DVolume9,0x24f416e6,0x1f67,0x4aa7,0xb8,0x8e,0xd3,0x3f,0x6f,0x31,0x28,0xa1);
-DEFINE_GUID(IID_IDirect3DVolumeTexture8,0x4b8aaafa,0x140f,0x42ba,0x91,0x31,0x59,0x7e,0xaf,0xaa,0x2e,0xad);
-DEFINE_GUID(IID_IDirect3DVolumeTexture9,0x2518526c,0xe789,0x4111,0xa7,0xb9,0x47,0xef,0x32,0x8d,0x13,0xe6);
-DEFINE_GUID(IID_IDirectDraw,0x6c14db80,0xa733,0x11ce,0xa5,0x21,0x00,0x20,0xaf,0x0b,0xe5,0x60);
-DEFINE_GUID(IID_IDirectDraw2,0xb3a6f3e0,0x2b43,0x11cf,0xa2,0xde,0x00,0xaa,0x00,0xb9,0x33,0x56);
-DEFINE_GUID(IID_IDirectDraw4,0x9c59509a,0x39bd,0x11d1,0x8c,0x4a,0x00,0xc0,0x4f,0xd9,0x30,0xc5);
-DEFINE_GUID(IID_IDirectDraw7,0x15e65ec0,0x3b9c,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b);
-DEFINE_GUID(IID_IDirectDrawClipper,0x6c14db85,0xa733,0x11ce,0xa5,0x21,0x00,0x20,0xaf,0x0b,0xe5,0x60);
-DEFINE_GUID(IID_IDirectDrawColorControl,0x4b9f0ee0,0x0d7e,0x11d0,0x9b,0x06,0x00,0xa0,0xc9,0x03,0xa3,0xb8);
-DEFINE_GUID(IID_IDirectDrawFactory2,0x89b2c488,0x4af4,0x11d1,0x8c,0x4c,0x0,0xc0,0x4f,0xd9,0x30,0xc5);
-DEFINE_GUID(IID_IDirectDrawGammaControl,0x69c11c3e,0xb46b,0x11d1,0xad,0x7a,0x00,0xc0,0x4f,0xc2,0x9b,0x4e);
-DEFINE_GUID(IID_IDirectDrawOptSurface,0x51191f1e,0x4f2b,0x11d1,0x8c,0xc3,0x0,0xa0,0xc9,0x6,0x29,0xa8);
-DEFINE_GUID(IID_IDirectDrawPalette,0x6c14db84,0xa733,0x11ce,0xa5,0x21,0x00,0x20,0xaf,0x0b,0xe5,0x60);
-DEFINE_GUID(IID_IDirectDrawPalette2,0xc03c477e,0x6519,0x11d1,0x8c,0x52,0x0,0xc0,0x4f,0xd9,0x30,0xc5);
-DEFINE_GUID(IID_IDirectDrawSurface,0x6c14db81,0xa733,0x11ce,0xa5,0x21,0x00,0x20,0xaf,0x0b,0xe5,0x60);
-DEFINE_GUID(IID_IDirectDrawSurface2,0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27);
-DEFINE_GUID(IID_IDirectDrawSurface3,0xda044e00,0x69b2,0x11d0,0xa1,0xd5,0x00,0xaa,0x00,0xb8,0xdf,0xbb);
-DEFINE_GUID(IID_IDirectDrawSurface4,0x0b2b8630,0xad35,0x11d0,0x8e,0xa6,0x00,0x60,0x97,0x97,0xea,0x5b);
-DEFINE_GUID(IID_IDirectDrawSurface7,0x06675a80,0x3b9b,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b);
-//IID_IDirectDrawSurfaceNew
-DEFINE_GUID(IID_IDirectDrawVideoPort,0xb36d93e0,0x2b43,0x11cf,0xa2,0xde,0x00,0xaa,0x00,0xb9,0x33,0x56);
-DEFINE_GUID(IID_IDirectDrawVideoPortNotify,0xa655fb94,0x0589,0x4e57,0xb3,0x33,0x56,0x7a,0x89,0x46,0x8c,0x88);
-DEFINE_GUID(IID_IDirectInput2A,0x5944e662,0xaa8a,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(IID_IDirectInput2W,0x5944e663,0xaa8a,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(IID_IDirectInput7A,0x9a4cb684,0x236d,0x11d3,0x8e,0x9d,0x00,0xc0,0x4f,0x68,0x44,0xae);
-DEFINE_GUID(IID_IDirectInput7W,0x9a4cb685,0x236d,0x11d3,0x8e,0x9d,0x00,0xc0,0x4f,0x68,0x44,0xae);
-DEFINE_GUID(IID_IDirectInput8A,0xbf798030,0x483a,0x4da2,0xaa,0x99,0x5d,0x64,0xed,0x36,0x97,0x00);
-DEFINE_GUID(IID_IDirectInput8W,0xbf798031,0x483a,0x4da2,0xaa,0x99,0x5d,0x64,0xed,0x36,0x97,0x00);
-DEFINE_GUID(IID_IDirectInputA,0x89521360,0xaa8a,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(IID_IDirectInputDevice2A,0x5944e682,0xc92e,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(IID_IDirectInputDevice2W,0x5944e683,0xc92e,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(IID_IDirectInputDevice7A,0x57d7c6bc,0x2356,0x11d3,0x8e,0x9d,0x00,0xc0,0x4f,0x68,0x44,0xae);
-DEFINE_GUID(IID_IDirectInputDevice7W,0x57d7c6bd,0x2356,0x11d3,0x8e,0x9d,0x00,0xc0,0x4f,0x68,0x44,0xae);
-DEFINE_GUID(IID_IDirectInputDevice8A,0x54d41080,0xdc15,0x4833,0xa4,0x1b,0x74,0x8f,0x73,0xa3,0x81,0x79);
-DEFINE_GUID(IID_IDirectInputDevice8W,0x54d41081,0xdc15,0x4833,0xa4,0x1b,0x74,0x8f,0x73,0xa3,0x81,0x79);
-DEFINE_GUID(IID_IDirectInputDeviceA,0x5944e680,0xc92e,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(IID_IDirectInputDeviceW,0x5944e681,0xc92e,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(IID_IDirectInputEffect,0xe7e1f7c0,0x88d2,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
-DEFINE_GUID(IID_IDirectInputEffectDriver,0x02538130,0x898f,0x11d0,0x9a,0xd0,0x00,0xa0,0xc9,0xa0,0x6e,0x35);
-DEFINE_GUID(IID_IDirectInputJoyConfig,0x1de12ab1,0xc9f5,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(IID_IDirectInputJoyConfig8,0xeb0d7dfa,0x1990,0x4f27,0xb4,0xd6,0xed,0xf2,0xee,0xc4,0xa4,0x4c);
-DEFINE_GUID(IID_IDirectInputPIDDriver,0xeec6993a,0xb3fd,0x11d2,0xa9,0x16,0x00,0xc0,0x4f,0xb9,0x86,0x38);
-DEFINE_GUID(IID_IDirectInputW,0x89521361,0xaa8a,0x11cf,0xbf,0xc7,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(IID_IDirectMusic,0x6536115a,0x7b2d,0x11d2,0xba,0x18,0x00,0x00,0xf8,0x75,0xac,0x12);
-DEFINE_GUID(IID_IDirectMusic2,0x6fc2cae1, 0xbc78, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
-DEFINE_GUID(IID_IDirectMusic8,0x2d3629f7,0x813d,0x4939,0x85,0x08,0xf0,0x5c,0x6b,0x75,0xfd,0x97);
-DEFINE_GUID(IID_IDirectMusicAudioPath,0xc87631f5, 0x23be, 0x4986, 0x88, 0x36, 0x5, 0x83, 0x2f, 0xcc, 0x48, 0xf9);
-DEFINE_GUID(IID_IDirectMusicBand,0xd2ac28c0, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
-DEFINE_GUID(IID_IDirectMusicBuffer,0xd2ac2878, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
-DEFINE_GUID(IID_IDirectMusicCollection,0xd2ac287c, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd);
-DEFINE_GUID(IID_IDirectMusicComposer,0xd2ac28bf,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(IID_IDirectMusicContainer,0x9301e386,0x1f22,0x11d3,0x82,0x26,0xd2,0xfa,0x76,0x25,0x5d,0x47);
-DEFINE_GUID(IID_IDirectMusicDownload,0xd2ac287b,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(IID_IDirectMusicDownloadedInstrument,0xd2ac287e,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(IID_IDirectMusicGetLoader,0x68a04844,0xd13d,0x11d1,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
-DEFINE_GUID(IID_IDirectMusicGraph,0x2befc277,0x5497,0x11d2,0xbc,0xcb,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
-DEFINE_GUID(IID_IDirectMusicChordMap,0xd2ac28be,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(IID_IDirectMusicInstrument,0xd2ac287d,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(IID_IDirectMusicLoader,0x2ffaaca2,0x5dca,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
-DEFINE_GUID(IID_IDirectMusicLoader8,0x19e7c08c,0xa44,0x4e6a,0xa1,0x16,0x59,0x5a,0x7c,0xd5,0xde,0x8c);
-DEFINE_GUID(IID_IDirectMusicObject,0xd2ac28b5,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(IID_IDirectMusicPatternTrack,0x51c22e10,0xb49f,0x46fc,0xbe,0xc2,0xe6,0x28,0x8f,0xb9,0xed,0xe6);
-DEFINE_GUID(IID_IDirectMusicPerformance,0x7d43d03,0x6523,0x11d2,0x87,0x1d,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(IID_IDirectMusicPerformance2,0x6fc2cae0,0xbc78,0x11d2,0xaf,0xa6,0x0,0xaa,0x0,0x24,0xd8,0xb6);
-DEFINE_GUID(IID_IDirectMusicPerformance8,0x679c4137,0xc62e,0x4147,0xb2,0xb4,0x9d,0x56,0x9a,0xcb,0x25,0x4c);
-DEFINE_GUID(IID_IDirectMusicPort,0x08f2d8c9,0x37c2,0x11d2,0xb9,0xf9,0x00,0x00,0xf8,0x75,0xac,0x12);
-DEFINE_GUID(IID_IDirectMusicPortDownload,0xd2ac287a,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(IID_IDirectMusicScript,0x2252373a,0x5814,0x489b,0x82,0x9,0x31,0xfe,0xde,0xba,0xf1,0x37);/*{2252373a-5814-489b-8209-31fedebaf137}*/
-DEFINE_GUID(IID_IDirectMusicSegment,0xf96029a2,0x4282,0x11d2,0x87,0x17,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(IID_IDirectMusicSegment2,0xd38894d1,0xc052,0x11d2,0x87,0x2f,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(IID_IDirectMusicSegment8,0xc6784488,0x41a3,0x418f,0xaa,0x15,0xb3,0x50,0x93,0xba,0x42,0xd4);
-DEFINE_GUID(IID_IDirectMusicSegmentState,0xa3afdcc7,0xd3ee,0x11d1,0xbc,0x8d,0x0,0xa0,0xc9,0x22,0xe6,0xeb);
-DEFINE_GUID(IID_IDirectMusicSegmentState8,0xa50e4730,0xae4,0x48a7,0x98,0x39,0xbc,0x4,0xbf,0xe0,0x77,0x72);
-DEFINE_GUID(IID_IDirectMusicSong,0xa862b2ec,0x3676,0x4982,0x85,0xa,0x78,0x42,0x77,0x5e,0x1d,0x86);
-DEFINE_GUID(IID_IDirectMusicStyle,0xd2ac28bd,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(IID_IDirectMusicStyle8,0xfd24ad8a,0xa260,0x453d,0xbf,0x50,0x6f,0x93,0x84,0xf7,0x9,0x85);
-DEFINE_GUID(IID_IDirectMusicThru,0xced153e7,0x3606,0x11d2,0xb9,0xf9,0x00,0x00,0xf8,0x75,0xac,0x12);
-DEFINE_GUID(IID_IDirectMusicTool,0xd2ac28ba,0xb39b,0x11d1,0x87,0x4,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(IID_IDirectMusicTrack,0xf96029a1,0x4282,0x11d2,0x87,0x17,0x0,0x60,0x8,0x93,0xb1,0xbd);
-DEFINE_GUID(IID_IDirectMusicTool8,0xe674303,0x3b05,0x11d3,0x9b,0xd1,0xf9,0xe7,0xf0,0xa0,0x15,0x36);
-DEFINE_GUID(IID_IDirectMusicTrack8,0xe674304,0x3b05,0x11d3,0x9b,0xd1,0xf9,0xe7,0xf0,0xa0,0x15,0x36);
-DEFINE_GUID(IID_IDirectPlay,0x5454e9a0,0xdb65,0x11ce,0x92,0x1c,0x00,0xaa,0x00,0x6c,0x49,0x72);
-DEFINE_GUID(IID_IDirectPlay2,0x2b74f7c0,0x9154,0x11cf,0xa9,0xcd,0x0,0xaa,0x0,0x68,0x86,0xe3);
-DEFINE_GUID(IID_IDirectPlay2A,0x9d460580,0xa822,0x11cf,0x96,0xc,0x0,0x80,0xc7,0x53,0x4e,0x82);
-DEFINE_GUID(IID_IDirectPlay3,0x133efe40,0x32dc,0x11d0,0x9c,0xfb,0x0,0xa0,0xc9,0xa,0x43,0xcb);
-DEFINE_GUID(IID_IDirectPlay3A,0x133efe41,0x32dc,0x11d0,0x9c,0xfb,0x0,0xa0,0xc9,0xa,0x43,0xcb);
-DEFINE_GUID(IID_IDirectPlay4,0xab1c530,0x4745,0x11d1,0xa7,0xa1,0x0,0x0,0xf8,0x3,0xab,0xfc);
-DEFINE_GUID(IID_IDirectPlay4A,0xab1c531,0x4745,0x11d1,0xa7,0xa1,0x0,0x0,0xf8,0x3,0xab,0xfc);
-DEFINE_GUID(IID_IDirectPlay8Address,0x83783300,0x4063,0x4c8a,0x9d,0xb3,0x82,0x83,0xa,0x7f,0xeb,0x31);
-DEFINE_GUID(IID_IDirectPlay8AddressIP,0xe5a0e990,0x2bad,0x430b,0x87,0xda,0xa1,0x42,0xcf,0x75,0xde,0x58);
-DEFINE_GUID(IID_IDirectPlay8Client,0x5102dacd,0x241b,0x11d3,0xae,0xa7,0x0,0x60,0x97,0xb0,0x14,0x11);
-DEFINE_GUID(IID_IDirectPlay8LobbiedApplication,0x819074a3,0x16c,0x11d3,0xae,0x14,0x0,0x60,0x97,0xb0,0x14,0x11);
-DEFINE_GUID(IID_IDirectPlay8LobbyClient,0x819074a2,0x16c,0x11d3,0xae,0x14,0x0,0x60,0x97,0xb0,0x14,0x11);
-DEFINE_GUID(IID_IDirectPlay8NATResolver,0xa9e213f2,0x9a60,0x486f,0xbf,0x3b,0x53,0x40,0x8b,0x6d,0x1c,0xbb);
-DEFINE_GUID(IID_IDirectPlay8Peer,0x5102dacf,0x241b,0x11d3,0xae,0xa7,0x0,0x60,0x97,0xb0,0x14,0x11);
-DEFINE_GUID(IID_IDirectPlay8Server,0x5102dace,0x241b,0x11d3,0xae,0xa7,0x0,0x60,0x97,0xb0,0x14,0x11);
-DEFINE_GUID(IID_IDirectPlay8ThreadPool,0xd22ee73,0x4a46,0x4a0d,0x89,0xb2,0x4,0x5b,0x4d,0x66,0x64,0x25);
-DEFINE_GUID(IID_IDirectPlayLobby,0xaf465c71,0x9588,0x11cf,0xa0,0x20,0x0,0xaa,0x0,0x61,0x57,0xac);
-DEFINE_GUID(IID_IDirectPlayLobby2,0x194c220,0xa303,0x11d0,0x9c,0x4f,0x0,0xa0,0xc9,0x5,0x42,0x5e);
-DEFINE_GUID(IID_IDirectPlayLobby2A,0x1bb4af80,0xa303,0x11d0,0x9c,0x4f,0x0,0xa0,0xc9,0x5,0x42,0x5e);
-DEFINE_GUID(IID_IDirectPlayLobby3,0x2db72490,0x652c,0x11d1,0xa7,0xa8,0x0,0x0,0xf8,0x3,0xab,0xfc);
-DEFINE_GUID(IID_IDirectPlayLobby3A,0x2db72491,0x652c,0x11d1,0xa7,0xa8,0x0,0x0,0xf8,0x3,0xab,0xfc);
-DEFINE_GUID(IID_IDirectPlayLobbyA,0x26c66a70,0xb367,0x11cf,0xa0,0x24,0x0,0xaa,0x0,0x61,0x57,0xac);
-DEFINE_GUID(IID_IDirectPlayVoiceClient,0x1dfdc8ea,0xbcf7,0x41d6,0xb2,0x95,0xab,0x64,0xb3,0xb2,0x33,0x6);
-DEFINE_GUID(IID_IDirectPlayVoiceServer,0xfaa1c173,0x468,0x43b6,0x8a,0x2a,0xea,0x8a,0x4f,0x20,0x76,0xc9);
-DEFINE_GUID(IID_IDirectPlayVoiceTest,0xd26af734,0x208b,0x41da,0x82,0x24,0xe0,0xce,0x79,0x81,0xb,0xe1);
-DEFINE_GUID(IID_IDirectSound,0x279afa83,0x4981,0x11ce,0xa5,0x21,0x00,0x20,0xaf,0x0b,0xe5,0x60);
-DEFINE_GUID(IID_IDirectSound3DBuffer,0x279afa86,0x4981,0x11ce,0xa5,0x21,0x00,0x20,0xaf,0x0b,0xe5,0x60);
-DEFINE_GUID(IID_IDirectSound3DListener,0x279afa84,0x4981,0x11ce,0xa5,0x21,0x00,0x20,0xaf,0x0b,0xe5,0x60);
-DEFINE_GUID(IID_IDirectSound8,0xc50a7e93,0xf395,0x4834,0x9e,0xf6,0x7f,0xa9,0x9d,0xe5,0x09,0x66);
-DEFINE_GUID(IID_IDirectSoundBuffer,0x279afa85,0x4981,0x11ce,0xa5,0x21,0x00,0x20,0xaf,0x0b,0xe5,0x60);
-DEFINE_GUID(IID_IDirectSoundBuffer8,0x6825a449,0x7524,0x4d82,0x92,0x0f,0x50,0xe3,0x6a,0xb3,0xab,0x1e);
-DEFINE_GUID(IID_IDirectSoundCapture,0xb0210781,0x89cd,0x11d0,0xaf,0x8,0x0,0xa0,0xc9,0x25,0xcd,0x16);
-DEFINE_GUID(IID_IDirectSoundCaptureBuffer,0xb0210782,0x89cd,0x11d0,0xaf,0x8,0x0,0xa0,0xc9,0x25,0xcd,0x16);
-DEFINE_GUID(IID_IDirectSoundCaptureBuffer8,0x990df4,0xdbb,0x4872,0x83,0x3e,0x6d,0x30,0x3e,0x80,0xae,0xb6);
-DEFINE_GUID(IID_IDirectSoundCaptureFXAec,0xad74143d,0x903d,0x4ab7,0x80,0x66,0x28,0xd3,0x63,0x03,0x6d,0x65);
-DEFINE_GUID(IID_IDirectSoundCaptureFXNoiseSuppress,0xed311e41,0xfbae,0x4175,0x96,0x25,0xcd,0x8,0x54,0xf6,0x93,0xca);
-DEFINE_GUID(IID_IDirectSoundFullDuplex,0xedcb4c7a,0xdaab,0x4216,0xa4,0x2e,0x6c,0x50,0x59,0x6d,0xdc,0x1d);
-DEFINE_GUID(IID_IDirectSoundFXCompressor,0x4bbd1154,0x62f6,0x4e2c,0xa1,0x5c,0xd3,0xb6,0xc4,0x17,0xf7,0xa0);
-DEFINE_GUID(IID_IDirectSoundFXDistortion,0x8ecf4326,0x455f,0x4d8b,0xbd,0xa9,0x8d,0x5d,0x3e,0x9e,0x3e,0x0b);
-DEFINE_GUID(IID_IDirectSoundFXEcho,0x8bd28edf,0x50db,0x4e92,0xa2,0xbd,0x44,0x54,0x88,0xd1,0xed,0x42);
-DEFINE_GUID(IID_IDirectSoundFXFlanger,0x903e9878,0x2c92,0x4072,0x9b,0x2c,0xea,0x68,0xf5,0x39,0x67,0x83);
-DEFINE_GUID(IID_IDirectSoundFXGargle,0xd616f352,0xd622,0x11ce,0xaa,0xc5,0x00,0x20,0xaf,0x0b,0x99,0xa3);
-DEFINE_GUID(IID_IDirectSoundFXChorus,0x880842e3,0x145f,0x43e6,0xa9,0x34,0xa7,0x18,0x06,0xe5,0x05,0x47);
-DEFINE_GUID(IID_IDirectSoundFXI3DL2Reverb,0x4b166a6a,0x0d66,0x43f3,0x80,0xe3,0xee,0x62,0x80,0xde,0xe1,0xa4);
-DEFINE_GUID(IID_IDirectSoundFXParamEq,0xc03ca9fe,0xfe90,0x4204,0x80,0x78,0x82,0x33,0x4c,0xd1,0x77,0xda);
-DEFINE_GUID(IID_IDirectSoundFXWavesReverb,0x46858c3a,0x0dc6,0x45e3,0xb7,0x60,0xd4,0xee,0xf1,0x6c,0xb3,0x25);
-DEFINE_GUID(IID_IDirectSoundNotify,0xb0210783,0x89cd,0x11d0,0xaf,0x8,0x0,0xa0,0xc9,0x25,0xcd,0x16);
-DEFINE_GUID(IID_IDirectXFile,0x3d82ab40,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(IID_IDirectXFileBinary,0x3d82ab46,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(IID_IDirectXFileData,0x3d82ab44,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(IID_IDirectXFileDataReference,0x3d82ab45,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(IID_IDirectXFileEnumObject,0x3d82ab41,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(IID_IDirectXFileObject,0x3d82ab43,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(IID_IDirectXFileSaveObject,0x3d82ab42,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(IID_IKsControl,0x28f54685l,0x06fd,0x11d2,0xb2,0x7a,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(IID_IKsFastClock,0xc9902485,0xc180,0x11d2,0x84,0x73,0xd4,0x23,0x94,0x45,0x9e,0x5e);
-DEFINE_GUID(IID_IKsPropertySet,0x31efac30,0x515c,0x11d0,0xa9,0xaa,0x00,0xaa,0x00,0x61,0xbe,0x93);
-DEFINE_GUID(IID_IReferenceClock,0x56a86897,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_DIRECTMUSIC,0x1a82f8bc,0x3f8b,0x11d2,0xb7,0x74,0x00,0x60,0x08,0x33,0x16,0xc1);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_MIDI,0x1d262760l,0xe957,0x11cf,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(TID_D3DRMAnimation,0x3d82ab4f,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(TID_D3DRMAnimationKey,0x10dd46a8,0x775b,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMAnimationOptions,0xe2bf56c0,0x840f,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMAnimationSet,0x3d82ab50,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(TID_D3DRMAppData,0xe5745280,0xb24f,0x11cf,0x9d,0xd5,0x0,0xaa,0x0,0xa7,0x1a,0x2f);
-DEFINE_GUID(TID_D3DRMBoolean,0x537da6a0,0xca37,0x11d0,0x94,0x1c,0x0,0x80,0xc8,0xc,0xfa,0x7b);
-DEFINE_GUID(TID_D3DRMBoolean2d,0x4885ae63,0x78e8,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMCamera,0x3d82ab51,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(TID_D3DRMColorRGB,0xd3e16e81,0x7835,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMColorRGBA,0x35ff44e0,0x6c7c,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMCoords2d,0xf6f23f44,0x7686,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMExternalVisual,0x98116aa0,0xbdba,0x11d1,0x82,0xc0,0x00,0xa0,0xc9,0x69,0x72,0x71);
-DEFINE_GUID(TID_D3DRMFloatKeys,0x10dd46a9,0x775b,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMFrame,0x3d82ab46,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(TID_D3DRMFramePosition,0xe2bf56c1,0x840f,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMFrameRotation,0xe2bf56c3,0x840f,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMFrameTransformMatrix,0xf6f23f41,0x7686,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMFrameVelocity,0xe2bf56c2,0x840f,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMGuid,0xa42790e0,0x7810,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMIndexedColor,0x1630b820,0x7842,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMInfo,0x2b957100,0x9e9a,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(TID_D3DRMInlineData,0x3a23eea0,0x94b1,0x11d0,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(TID_D3DRMLight,0x3d82ab4a,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(TID_D3DRMLightAttenuation,0xa8a98ba0,0xc5e5,0x11cf,0xb9,0x41,0x0,0x80,0xc8,0xc,0xfa,0x7b);
-DEFINE_GUID(TID_D3DRMLightPenumbra,0xaed22741,0xb31f,0x11cf,0x9d,0xd5,0x0,0xaa,0x0,0xa7,0x1a,0x2f);
-DEFINE_GUID(TID_D3DRMLightRange,0xaed22742,0xb31f,0x11cf,0x9d,0xd5,0x0,0xaa,0x0,0xa7,0x1a,0x2f);
-DEFINE_GUID(TID_D3DRMLightUmbra,0xaed22740,0xb31f,0x11cf,0x9d,0xd5,0x0,0xaa,0x0,0xa7,0x1a,0x2f);
-DEFINE_GUID(TID_D3DRMMaterial,0x3d82ab4d,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(TID_D3DRMMaterialAmbientColor,0x01411840,0x7786,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMMaterialArray,0x35ff44e1,0x6c7c,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMMaterialDiffuseColor,0x01411841,0x7786,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMMaterialEmissiveColor,0xd3e16e80,0x7835,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMMaterialPower,0x01411843,0x7786,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMMaterialSpecularColor,0x01411842,0x7786,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMMaterialWrap,0x4885ae60,0x78e8,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMMatrix4x4,0xf6f23f45,0x7686,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMMesh,0x3d82ab44,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(TID_D3DRMMeshFace,0x3d82ab5f,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(TID_D3DRMMeshFaceWraps,0xed1ec5c0,0xc0a8,0x11d0,0x94,0x1c,0x0,0x80,0xc8,0xc,0xfa,0x7b);
-DEFINE_GUID(TID_D3DRMMeshMaterialList,0xf6f23f42,0x7686,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMMeshNormals,0xf6f23f43,0x7686,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMMeshTextureCoords,0xf6f23f40,0x7686,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMMeshVertexColors,0x1630b821,0x7842,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMProgressiveMesh,0x8a63c360,0x997d,0x11d0,0x94,0x1c,0x0,0x80,0xc8,0x0c,0xfa,0x7b);
-DEFINE_GUID(TID_D3DRMPropertyBag,0x7f0f21e1,0xbfe1,0x11d1,0x82,0xc0,0x0,0xa0,0xc9,0x69,0x72,0x71);
-DEFINE_GUID(TID_D3DRMRightHanded,0x7f5d5ea0,0xd53a,0x11d1,0x82,0xc0,0x0,0xa0,0xc9,0x69,0x72,0x71);
-DEFINE_GUID(TID_D3DRMStringProperty,0x7f0f21e0,0xbfe1,0x11d1,0x82,0xc0,0x0,0xa0,0xc9,0x69,0x72,0x71);
-DEFINE_GUID(TID_D3DRMTextureFilename,0xa42790e1,0x7810,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMTextureReference,0xa42790e2,0x7810,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMTimedFloatKeys,0xf406b180,0x7b3b,0x11cf,0x8f,0x52,0x0,0x40,0x33,0x35,0x94,0xa3);
-DEFINE_GUID(TID_D3DRMUrl,0x3a23eea1,0x94b1,0x11d0,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(TID_D3DRMVector,0x3d82ab5e,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
-DEFINE_GUID(TID_DXFILEHeader,0x3d82ab43,0x62da,0x11cf,0xab,0x39,0x0,0x20,0xaf,0x71,0xe4,0x33);
diff --git a/winsup/w32api/lib/directx/ksproxy.def b/winsup/w32api/lib/directx/ksproxy.def
deleted file mode 100644
index b6cb417..0000000
--- a/winsup/w32api/lib/directx/ksproxy.def
+++ /dev/null
@@ -1,8 +0,0 @@
-LIBRARY ksproxy.ax
-EXPORTS
-KsGetMediaType@16
-KsGetMediaTypeCount@12
-KsGetMultiplePinFactoryItems@16
-KsOpenDefaultDevice@12
-KsResolveRequiredAttributes@8
-KsSynchronousDeviceControl@28
diff --git a/winsup/w32api/lib/directx/ksuser.c b/winsup/w32api/lib/directx/ksuser.c
deleted file mode 100644
index d16294b..0000000
--- a/winsup/w32api/lib/directx/ksuser.c
+++ /dev/null
@@ -1,400 +0,0 @@
-/*
-
- ksuser.c - Kernel Streaming GUIDs
-
- Written by Filip Navara <xnavara@volny.cz>
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#if defined(__LCC__) || defined(__GNUC__)
-#define INITGUID 1
-#include <windows.h>
-#else
-#include <basetyps.h>
-#endif
-
-DEFINE_GUID(BUSID_SoftwareDeviceEnumerator,0x4747b320,0x62ce,0x11cf,0xa5,0xd6,0x28,0xdb,0x4,0xc1,0,0);
-DEFINE_GUID(CLSID_KsIBasicAudioInterfaceHandler,0xb9f8ac3e,0x0f71,0x11d2,0xb7,0x2c,0x00,0xc0,0x4f,0xb6,0xbd,0x3d);
-DEFINE_GUID(CLSID_Proxy,0x17cca71b,0xecd7,0x11d0,0xb9,0x08,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(EVENTSETID_CROSSBAR,0x6a2e0641,0x28e4,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(EVENTSETID_TUNER,0x6a2e0606,0x28e4,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(EVENTSETID_VIDEODECODER,0x6a2e0621,0x28e4,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(GUID_BUS_INTERFACE_MEDIUMS,0x4ec35c3e,0x201b,0x11d2,0x87,0x45,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(GUID_NULL,0x00000000,0x0000,0x0000,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00);
-DEFINE_GUID(IID_IKoInitializeParentDeviceObject,0x21b36996,0x8de3,0x11d1,0x8a,0xe0,0,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(IID_IKsAggregateControl,0x7f40eac0,0x3947,0x11d2,0x87,0x4e,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(IID_IKsAllocator,0x8da64899,0xc0d9,0x11d0,0x84,0x13,0x00,0x00,0xf8,0x22,0xfe,0x8a);
-DEFINE_GUID(IID_IKsAllocatorEx,0x091bb63a,0x603f,0x11d1,0xb0,0x67,0x00,0xa0,0xc9,0x06,0x28,0x02);
-DEFINE_GUID(IID_IKsClockPropertySet,0x5c5cbd84,0xe755,0x11d0,0xac,0x18,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(IID_IKsControl,0x28f54685,0x06fd,0x11d2,0xb2,0x7a,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(IID_IKsDataTypeCompletion,0x827d1a0e,0x0f73,0x11d2,0xb2,0x7a,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(IID_IKsDataTypeHandler,0x5ffbaa02,0x49a3,0x11d0,0x9f,0x36,0x00,0xaa,0x00,0xa2,0x16,0xa1);
-DEFINE_GUID(IID_IKsInterfaceHandler,0xd3abc7e0,0x9a61,0x11d0,0xa4,0x0d,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(IID_IKsObject,0x423c13a2,0x2070,0x11d0,0x9e,0xf7,0x00,0xaa,0x00,0xa2,0x16,0xa1);
-DEFINE_GUID(IID_IKsPin,0xb61178d1,0xa2d9,0x11cf,0x9e,0x53,0x00,0xaa,0x00,0xa2,0x16,0xa1);
-DEFINE_GUID(IID_IKsPinEx,0x7bb38260,0xd19c,0x11d2,0xb3,0x8a,0x00,0xa0,0xc9,0x5e,0xc2,0x2e);
-DEFINE_GUID(IID_IKsPinPipe,0xe539cd90,0xa8b4,0x11d1,0x81,0x89,0x00,0xa0,0xc9,0x06,0x28,0x02);
-DEFINE_GUID(IID_IKsPropertySet,0x31efac30,0x515c,0x11d0,0xa9,0xaa,0x00,0xaa,0x00,0x61,0xbe,0x93);
-DEFINE_GUID(IID_IKsTopology,0x28f54683,0x06fd,0x11d2,0xb2,0x7a,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(IID_IUnknown,0,0,0,0xc0,0,0,0,0,0,0,0x46);
-DEFINE_GUID(KoCreateObject,0x72cf721c,0x525a,0x11d1,0x9a,0xa1,0,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSALGORITHMINSTANCE_SYSTEM_ACOUSTIC_ECHO_CANCEL,0x1c22c56d,0x9879,0x4f5b,0xa3,0x89,0x27,0x99,0x6d,0xdc,0x28,0x10);
-DEFINE_GUID(KSALGORITHMINSTANCE_SYSTEM_AGC,0x950e55b9,0x877c,0x4c67,0xbe,0x8,0xe4,0x7b,0x56,0x11,0x13,0xa);
-DEFINE_GUID(KSALGORITHMINSTANCE_SYSTEM_MICROPHONE_ARRAY_PROCESSOR,0xb6f5a0a0,0x9e61,0x4f8c,0x91,0xe3,0x76,0xcf,0xf,0x3c,0x47,0x1f);
-DEFINE_GUID(KSALGORITHMINSTANCE_SYSTEM_NOISE_SUPPRESS,0x5ab0882e,0x7274,0x4516,0x87,0x7d,0x4e,0xee,0x99,0xba,0x4f,0xd0);
-DEFINE_GUID(KSAUDFNAME_3D_CENTER,0x9f0670b4,0x991f,0x11d2,0xac,0x4d,0,0xc0,0x4f,0x8e,0xfb,0x68);
-DEFINE_GUID(KSAUDFNAME_3D_DEPTH,0x63ff5747,0x991f,0x11d2,0xac,0x4d,0,0xc0,0x4f,0x8e,0xfb,0x68);
-DEFINE_GUID(KSAUDFNAME_3D_STEREO,0x185fede2,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_ALTERNATE_MICROPHONE,0x2bc31d6b,0x96e3,0x11d2,0xac,0x4c,0,0xc0,0x4f,0x8e,0xfb,0x68);
-DEFINE_GUID(KSAUDFNAME_AUX,0x185fedfe,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_AUX_MUTE,0x185fedfd,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_AUX_VOLUME,0x185fedfc,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_BASS,0x185fede0,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_CD_AUDIO,0x185fedfb,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_CD_IN_VOLUME,0x185fedf3,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_CD_MUTE,0x185fedea,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_CD_VOLUME,0x185fede9,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_LINE_IN,0x185fedf9,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_LINE_IN_VOLUME,0x185fedf4,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_LINE_MUTE,0x185fedec,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_LINE_VOLUME,0x185fedeb,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_MASTER_MUTE,0x185fede4,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_MASTER_VOLUME,0x185fede3,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_MIC_IN_VOLUME,0x185fedf5,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_MIC_MUTE,0x185fedee,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_MIC_VOLUME,0x185feded,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_MICROPHONE_BOOST,0x2bc31d6a,0x96e3,0x11d2,0xac,0x4c,0,0xc0,0x4f,0x8e,0xfb,0x68);
-DEFINE_GUID(KSAUDFNAME_MIDI,0x185fedf8,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_MIDI_IN_VOLUME,0x185fedf2,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_MIDI_MUTE,0x185fede8,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_MIDI_VOLUME,0x185fede7,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_MONO_MIX,0xdff078,0x96e3,0x11d2,0xac,0x4c,0,0xc0,0x4f,0x8e,0xfb,0x68);
-DEFINE_GUID(KSAUDFNAME_MONO_MIX_MUTE,0x2bc31d69,0x96e3,0x11d2,0xac,0x4c,0,0xc0,0x4f,0x8e,0xfb,0x68);
-DEFINE_GUID(KSAUDFNAME_MONO_MIX_VOLUME,0x22b0eafe,0x96e3,0x11d2,0xac,0x4c,0,0xc0,0x4f,0x8e,0xfb,0x68);
-DEFINE_GUID(KSAUDFNAME_MONO_OUT,0xf9b41dc3,0x96e2,0x11d2,0xac,0x4c,0,0xc0,0x4f,0x8e,0xfb,0x68);
-DEFINE_GUID(KSAUDFNAME_MONO_OUT_MUTE,0x1ad247ec,0x96e3,0x11d2,0xac,0x4c,0,0xc0,0x4f,0x8e,0xfb,0x68);
-DEFINE_GUID(KSAUDFNAME_MONO_OUT_VOLUME,0x1ad247eb,0x96e3,0x11d2,0xac,0x4c,0,0xc0,0x4f,0x8e,0xfb,0x68);
-DEFINE_GUID(KSAUDFNAME_PC_SPEAKER,0x185fedff,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_PC_SPEAKER_MUTE,0x185fedf1,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_PC_SPEAKER_VOLUME,0x185fedf0,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_PEAKMETER,0x57e24340,0xfc5b,0x4612,0xa5,0x62,0x72,0xb1,0x1a,0x29,0xdf,0xae);
-DEFINE_GUID(KSAUDFNAME_RECORDING_CONTROL,0x185fedfa,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_RECORDING_SOURCE,0x185fedef,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_STEREO_MIX,0xdff077,0x96e3,0x11d2,0xac,0x4c,0,0xc0,0x4f,0x8e,0xfb,0x68);
-DEFINE_GUID(KSAUDFNAME_STEREO_MIX_MUTE,0x22b0eafd,0x96e3,0x11d2,0xac,0x4c,0,0xc0,0x4f,0x8e,0xfb,0x68);
-DEFINE_GUID(KSAUDFNAME_STEREO_MIX_VOLUME,0x1ad247ed,0x96e3,0x11d2,0xac,0x4c,0,0xc0,0x4f,0x8e,0xfb,0x68);
-DEFINE_GUID(KSAUDFNAME_TREBLE,0x185fede1,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_VIDEO,0x915daec4,0xa434,0x11d2,0xac,0x52,0,0xc0,0x4f,0x8e,0xfb,0x68);
-DEFINE_GUID(KSAUDFNAME_VIDEO_MUTE,0x9b46e709,0x992a,0x11d2,0xac,0x4d,0,0xc0,0x4f,0x8e,0xfb,0x68);
-DEFINE_GUID(KSAUDFNAME_VIDEO_VOLUME,0x9b46e708,0x992a,0x11d2,0xac,0x4d,0,0xc0,0x4f,0x8e,0xfb,0x68);
-DEFINE_GUID(KSAUDFNAME_VOLUME_CONTROL,0x185fedf7,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_WAVE_IN_VOLUME,0x185fedf6,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_WAVE_MUTE,0x185fede6,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_WAVE_OUT_MIX,0x185fee00,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSAUDFNAME_WAVE_VOLUME,0x185fede5,0x9905,0x11d1,0x95,0xa9,0,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSCATEGORY_ACOUSTIC_ECHO_CANCEL,0xbf963d80,0xc559,0x11d0,0x8a,0x2b,0,0xa0,0xc9,0x25,0x5a,0xc1);
-DEFINE_GUID(KSCATEGORY_AUDIO,0x6994ad04,0x93ef,0x11d0,0xa3,0xcc,0,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSCATEGORY_AUDIO_DEVICE,0xfbf6f530,0x7b9,0x11d2,0xa7,0x1e,0,0,0xf8,0,0x47,0x88);
-DEFINE_GUID(KSCATEGORY_AUDIO_GFX,0x9baf9572,0x340c,0x11d3,0xab,0xdc,0,0xa0,0xc9,0xa,0xb1,0x6f);
-DEFINE_GUID(KSCATEGORY_AUDIO_SPLITTER,0x9ea331fa,0xb91b,0x45f8,0x92,0x85,0xbd,0x2b,0xc7,0x7a,0xfc,0xde);
-DEFINE_GUID(KSCATEGORY_BRIDGE,0x85aff00,0x62ce,0x11cf,0xa5,0xd6,0x28,0xdb,0x4,0xc1,0,0);
-DEFINE_GUID(KSCATEGORY_CAPTURE,0x65e8773d,0x8f56,0x11d0,0xa3,0xb9,0,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSCATEGORY_CLOCK,0x53172480,0x4791,0x11d0,0xa5,0xd6,0x28,0xdb,0x4,0xc1,0,0);
-DEFINE_GUID(KSCATEGORY_COMMUNICATIONSTRANSFORM,0xcf1dda2c,0x9743,0x11d0,0xa3,0xee,0,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSCATEGORY_CROSSBAR,0xa799a801,0xa46d,0x11d0,0xa1,0x8c,0,0xa0,0x24,0x1,0xdc,0xd4);
-DEFINE_GUID(KSCATEGORY_DATACOMPRESSOR,0x1e84c900,0x7e70,0x11d0,0xa5,0xd6,0x28,0xdb,0x4,0xc1,0,0);
-DEFINE_GUID(KSCATEGORY_DATADECOMPRESSOR,0x2721ae20,0x7e70,0x11d0,0xa5,0xd6,0x28,0xdb,0x4,0xc1,0,0);
-DEFINE_GUID(KSCATEGORY_DATATRANSFORM,0x2eb07ea0,0x7e70,0x11d0,0xa5,0xd6,0x28,0xdb,0x4,0xc1,0,0);
-DEFINE_GUID(KSCATEGORY_ESCALANTE_PLATFORM_DRIVER,0x74f3aea8,0x9768,0x11d1,0x8e,0x7,0,0xa0,0xc9,0x5e,0xc2,0x2e);
-DEFINE_GUID(KSCATEGORY_FILESYSTEM,0x760fed5e,0x9357,0x11d0,0xa3,0xcc,0,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSCATEGORY_INTERFACETRANSFORM,0xcf1dda2d,0x9743,0x11d0,0xa3,0xee,0,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSCATEGORY_MEDIUMTRANSFORM,0xcf1dda2e,0x9743,0x11d0,0xa3,0xee,0,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR,0x830a44f2,0xa32d,0x476b,0xbe,0x97,0x42,0x84,0x56,0x73,0xb3,0x5a);
-DEFINE_GUID(KSCATEGORY_MIXER,0xad809c00,0x7b88,0x11d0,0xa5,0xd6,0x28,0xdb,0x4,0xc1,0,0);
-DEFINE_GUID(KSCATEGORY_NETWORK,0x67c9cc3c,0x69c4,0x11d2,0x87,0x59,0,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSCATEGORY_PREFERRED_MIDIOUT_DEVICE,0xd6c50674,0x72c1,0x11d2,0x97,0x55,0,0,0xf8,0,0x47,0x88);
-DEFINE_GUID(KSCATEGORY_PREFERRED_WAVEIN_DEVICE,0xd6c50671,0x72c1,0x11d2,0x97,0x55,0,0,0xf8,0,0x47,0x88);
-DEFINE_GUID(KSCATEGORY_PREFERRED_WAVEOUT_DEVICE,0xd6c5066e,0x72c1,0x11d2,0x97,0x55,0,0,0xf8,0,0x47,0x88);
-DEFINE_GUID(KSCATEGORY_PROXY,0x97ebaaca,0x95bd,0x11d0,0xa3,0xea,0,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSCATEGORY_QUALITY,0x97ebaacb,0x95bd,0x11d0,0xa3,0xea,0,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSCATEGORY_RENDER,0x65e8773e,0x8f56,0x11d0,0xa3,0xb9,0,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSCATEGORY_SPLITTER,0xa4252a0,0x7e70,0x11d0,0xa5,0xd6,0x28,0xdb,0x4,0xc1,0,0);
-DEFINE_GUID(KSCATEGORY_SYSAUDIO,0xa7c7a5b1,0x5af3,0x11d1,0x9c,0xed,0,0xa0,0x24,0xbf,0x4,0x7);
-DEFINE_GUID(KSCATEGORY_TEXT,0x6994ad06,0x93ef,0x11d0,0xa3,0xcc,0,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSCATEGORY_TOPOLOGY,0xdda54a40,0x1e4c,0x11d1,0xa0,0x50,0x40,0x57,0x5,0xc1,0,0);
-DEFINE_GUID(KSCATEGORY_TVAUDIO,0xa799a802,0xa46d,0x11d0,0xa1,0x8c,0,0xa0,0x24,0x1,0xdc,0xd4);
-DEFINE_GUID(KSCATEGORY_TVTUNER,0xa799a800,0xa46d,0x11d0,0xa1,0x8c,0,0xa0,0x24,0x1,0xdc,0xd4);
-DEFINE_GUID(KSCATEGORY_VBICODEC,0x7dad660,0x22f1,0x11d1,0xa9,0xf4,0,0xc0,0x4f,0xbb,0xde,0x8f);
-DEFINE_GUID(KSCATEGORY_VIDEO,0x6994ad05,0x93ef,0x11d0,0xa3,0xcc,0,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSCATEGORY_VIRTUAL,0x3503eac4,0x1f26,0x11d1,0x8a,0xb0,0,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSCATEGORY_VPMUX,0xa799a803,0xa46d,0x11d0,0xa1,0x8c,0,0xa0,0x24,0x1,0xdc,0xd4);
-DEFINE_GUID(KSCATEGORY_WDMAUD,0x3e227e76,0x690d,0x11d2,0x81,0x61,0,0,0xf8,0x77,0x5b,0xf1);
-DEFINE_GUID(KSCATEGORY_WDMAUD_USE_PIN_NAME,0x47a4fa20,0xa251,0x11d1,0xa0,0x50,0,0,0xf8,0,0x47,0x88);
-DEFINE_GUID(KSCOMPONENTID_USBAUDIO,0x8f1275f0,0x26e9,0x4264,0xba,0x4d,0x39,0xff,0xf0,0x1d,0x94,0xaa);
-DEFINE_GUID(KSDATAFORMAT_SPECIFIER_AC3_AUDIO,0xe06d80e4,0xdb46,0x11cf,0xb4,0xd1,0,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(KSDATAFORMAT_SPECIFIER_ANALOGVIDEO,0x482dde0,0x7817,0x11cf,0x8a,0x3,0,0xaa,0,0x6e,0xcb,0x65);
-DEFINE_GUID(KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO,0x36523b35,0x8ee5,0x11d1,0x8c,0xa3,0,0x60,0xb0,0x57,0x66,0x4a);
-DEFINE_GUID(KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO,0x36523b32,0x8ee5,0x11d1,0x8c,0xa3,0,0x60,0xb0,0x57,0x66,0x4a);
-DEFINE_GUID(KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO,0x36523b31,0x8ee5,0x11d1,0x8c,0xa3,0,0x60,0xb0,0x57,0x66,0x4a);
-DEFINE_GUID(KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO,0x36523b34,0x8ee5,0x11d1,0x8c,0xa3,0,0x60,0xb0,0x57,0x66,0x4a);
-DEFINE_GUID(KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO,0x36523b33,0x8ee5,0x11d1,0x8c,0xa3,0,0x60,0xb0,0x57,0x66,0x4a);
-DEFINE_GUID(KSDATAFORMAT_SPECIFIER_DSOUND,0x518590a2,0xa184,0x11d0,0x85,0x22,0,0xc0,0x4f,0xd9,0xba,0xf3);
-DEFINE_GUID(KSDATAFORMAT_SPECIFIER_FILEHANDLE,0x65e8773c,0x8f56,0x11d0,0xa3,0xb9,0,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSDATAFORMAT_SPECIFIER_FILENAME,0xaa797b40,0xe974,0x11cf,0xa5,0xd6,0x28,0xdb,0x4,0xc1,0,0);
-DEFINE_GUID(KSDATAFORMAT_SPECIFIER_LPCM_AUDIO,0xe06d80e6,0xdb46,0x11cf,0xb4,0xd1,0,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(KSDATAFORMAT_SPECIFIER_MPEG1_VIDEO,0x5589f82,0xc356,0x11ce,0xbf,0x1,0,0xaa,0,0x55,0x59,0x5a);
-DEFINE_GUID(KSDATAFORMAT_SPECIFIER_MPEG2_AUDIO,0xe06d80e5,0xdb46,0x11cf,0xb4,0xd1,0,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO,0xe06d80e3,0xdb46,0x11cf,0xb4,0xd1,0,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(KSDATAFORMAT_SPECIFIER_NONE,0xf6417d6,0xc318,0x11d0,0xa4,0x3f,0,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSDATAFORMAT_SPECIFIER_VBI,0xf72a76e0,0xeb0a,0x11d0,0xac,0xe4,0,0,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(KSDATAFORMAT_SPECIFIER_VC_ID,0xad98d184,0xaac3,0x11d0,0xa4,0x1c,0,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSDATAFORMAT_SPECIFIER_VIDEOINFO,0x5589f80,0xc356,0x11ce,0xbf,0x1,0,0xaa,0,0x55,0x59,0x5a);
-DEFINE_GUID(KSDATAFORMAT_SPECIFIER_VIDEOINFO2,0xf72a76a0,0xeb0a,0x11d0,0xac,0xe4,0,0,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX,0x5589f81,0xc356,0x11ce,0xbf,0x1,0,0xaa,0,0x55,0x59,0x5a);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_AC3_AUDIO,0xe06d802c,0xdb46,0x11cf,0xb4,0xd1,0,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_ADPCM,0x2,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_ALAW,0x6,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_ANALOG,0x6dba3190,0x67bd,0x11cf,0xa0,0xf7,0,0x20,0xaf,0xd1,0x56,0xe4);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_CC,0x33214cc1,0x11f,0x11d2,0xb4,0xb1,0,0xa0,0xd1,0x2,0xcf,0xbe);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_DRM,0x9,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_DSS_AUDIO,0xa0af4f82,0xe163,0x11d0,0xba,0xd9,0,0x60,0x97,0x44,0x11,0x1a);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_DSS_VIDEO,0xa0af4f81,0xe163,0x11d0,0xba,0xd9,0,0x60,0x97,0x44,0x11,0x1a);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_DTS_AUDIO,0xe06d8033,0xdb46,0x11cf,0xb4,0xd1,0,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_IEEE_FLOAT,0x3,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_Line21_BytePair,0x6e8d4a22,0x310c,0x11d0,0xb7,0x9a,0,0xaa,0,0x37,0x67,0xa7);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_Line21_GOPPacket,0x6e8d4a23,0x310c,0x11d0,0xb7,0x9a,0,0xaa,0,0x37,0x67,0xa7);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_LPCM_AUDIO,0xe06d8032,0xdb46,0x11cf,0xb4,0xd1,0,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_MIDI,0x1d262760,0xe957,0x11cf,0xa5,0xd6,0x28,0xdb,0x4,0xc1,0,0);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_MIDI_BUS,0x2ca15fa0,0x6cfe,0x11cf,0xa5,0xd6,0x28,0xdb,0x4,0xc1,0,0);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_MPEG,0x50,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_MPEG1Packet,0xe436eb80,0x524f,0x11ce,0x9f,0x53,0,0x20,0xaf,0xb,0xa7,0x70);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_MPEG1Payload,0xe436eb81,0x524f,0x11ce,0x9f,0x53,0,0x20,0xaf,0xb,0xa7,0x70);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_MPEG1Video,0xe436eb86,0x524f,0x11ce,0x9f,0x53,0,0x20,0xaf,0xb,0xa7,0x70);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_MPEG2_AUDIO,0xe06d802b,0xdb46,0x11cf,0xb4,0xd1,0,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_MPEG2_VIDEO,0xe06d8026,0xdb46,0x11cf,0xb4,0xd1,0,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_MULAW,0x7,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_NABTS,0xf72a76e2,0xeb0a,0x11d0,0xac,0xe4,0,0,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_NABTS_FEC,0xe757bca1,0x39ac,0x11d1,0xa9,0xf5,0,0xc0,0x4f,0xbb,0xde,0x8f);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_NONE,0xe436eb8e,0x524f,0x11ce,0x9f,0x53,0,0x20,0xaf,0xb,0xa7,0x70);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_OVERLAY,0xe436eb7f,0x524f,0x11ce,0x9f,0x53,0,0x20,0xaf,0xb,0xa7,0x70);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_PCM,0x1,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_RAW8,0xca20d9a0,0x3e3e,0x11d1,0x9b,0xf9,0,0xc0,0x4f,0xbb,0xde,0xbf);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_RIFF,0x4995daee,0x9ee6,0x11d0,0xa4,0xe,0,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_RIFFMIDI,0x4995daf0,0x9ee6,0x11d0,0xa4,0xe,0,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_RIFFWAVE,0xe436eb8b,0x524f,0x11ce,0x9f,0x53,0,0x20,0xaf,0xb,0xa7,0x70);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_SDDS_AUDIO,0xe06d8034,0xdb46,0x11cf,0xb4,0xd1,0,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO,0x36523b25,0x8ee5,0x11d1,0x8c,0xa3,0,0x60,0xb0,0x57,0x66,0x4a);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO,0x36523b22,0x8ee5,0x11d1,0x8c,0xa3,0,0x60,0xb0,0x57,0x66,0x4a);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO,0x36523b21,0x8ee5,0x11d1,0x8c,0xa3,0,0x60,0xb0,0x57,0x66,0x4a);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO,0x36523b24,0x8ee5,0x11d1,0x8c,0xa3,0,0x60,0xb0,0x57,0x66,0x4a);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO,0x36523b23,0x8ee5,0x11d1,0x8c,0xa3,0,0x60,0xb0,0x57,0x66,0x4a);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_SUBPICTURE,0xe06d802d,0xdb46,0x11cf,0xb4,0xd1,0,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_TELETEXT,0xf72a76e3,0xeb0a,0x11d0,0xac,0xe4,0,0,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_VPVBI,0x5a9b6a41,0x1a22,0x11d1,0xba,0xd9,0,0x60,0x97,0x44,0x11,0x1a);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_VPVideo,0x5a9b6a40,0x1a22,0x11d1,0xba,0xd9,0,0x60,0x97,0x44,0x11,0x1a);
-DEFINE_GUID(KSDATAFORMAT_SUBTYPE_WAVEFORMATEX,0,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(KSDATAFORMAT_TYPE_ANALOGVIDEO,0x0482dde1,0x7817,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65);
-DEFINE_GUID(KSDATAFORMAT_TYPE_AUDIO,0x73647561,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(KSDATAFORMAT_TYPE_AUXLine21Data,0x670aea80,0x3a82,0x11d0,0xb7,0x9b,0x00,0xaa,0x00,0x37,0x67,0xa7);
-DEFINE_GUID(KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK,0xed0b916a,0x044d,0x11d1,0xaa,0x78,0x00,0xc0,0x4f,0xc3,0x1d,0x60);
-DEFINE_GUID(KSDATAFORMAT_TYPE_MIDI,0x7364696d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(KSDATAFORMAT_TYPE_MPEG2_PES,0xe06d8020,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(KSDATAFORMAT_TYPE_MPEG2_PROGRAM,0xe06d8022,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(KSDATAFORMAT_TYPE_MPEG2_TRANSPORT,0xe06d8023,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(KSDATAFORMAT_TYPE_MUSIC,0xe725d360,0x62cc,0x11cf,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(KSDATAFORMAT_TYPE_NABTS,0xe757bca0,0x39ac,0x11d1,0xa9,0xf5,0x00,0xc0,0x4f,0xbb,0xde,0x8f);
-DEFINE_GUID(KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM,0x36523b11,0x8ee5,0x11d1,0x8c,0xa3,0x00,0x60,0xb0,0x57,0x66,0x4a);
-DEFINE_GUID(KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER,0x36523b13,0x8ee5,0x11d1,0x8c,0xa3,0x00,0x60,0xb0,0x57,0x66,0x4a);
-DEFINE_GUID(KSDATAFORMAT_TYPE_STANDARD_PES_PACKET,0x36523b12,0x8ee5,0x11d1,0x8c,0xa3,0x00,0x60,0xb0,0x57,0x66,0x4a);
-DEFINE_GUID(KSDATAFORMAT_TYPE_STREAM,0xe436eb83,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(KSDATAFORMAT_TYPE_TEXT,0x73747874,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(KSDATAFORMAT_TYPE_VBI,0xf72a76e1,0xeb0a,0x11d0,0xac,0xe4,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(KSDATAFORMAT_TYPE_VIDEO,0x73646976,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(KSDEGRADESETID_Standard,0x9f564180,0x704c,0x11d0,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(KSEVENTSETID_AudioControlChange,0xe85e9698,0xfa2f,0x11d1,0x95,0xbd,0x00,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSEVENTSETID_Clock,0x364d8e20,0x62c7,0x11cf,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(KSEVENTSETID_Connection,0x7f4bcbe0,0x9ea5,0x11cf,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(KSEVENTSETID_Cyclic,0x142c1ac0,0x072a,0x11d0,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(KSEVENTSETID_LoopedStreaming,0x4682b940,0xc6ef,0x11d0,0x96,0xd8,0x00,0xaa,0x00,0x51,0xe5,0x1d);
-DEFINE_GUID(KSEVENTSETID_StreamAllocator,0x75d95571,0x073c,0x11d0,0xa1,0x61,0x00,0x20,0xaf,0xd1,0x56,0xe4);
-DEFINE_GUID(KSEVENTSETID_Sysaudio,0x04800320,0x4491,0x11d1,0xa0,0x50,0x40,0x57,0x05,0xc1,0x00,0x00);
-DEFINE_GUID(KSEVENTSETID_VIDCAP_TVAUDIO,0x6a2e0651,0x28e4,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(KSEVENTSETID_VIDCAPTOSTI,0xdb47de20,0xf628,0x11d1,0xba,0x41,0x00,0xa0,0xc9,0x0d,0x2b,0x05);
-DEFINE_GUID(KSEVENTSETID_VPNotify,0x20c5598e,0xd3c8,0x11d0,0x8d,0xfc,0x00,0xc0,0x4f,0xd7,0xc0,0x8b);
-DEFINE_GUID(KSEVENTSETID_VPVBINotify,0xec529b01,0x1a1f,0x11d1,0xba,0xd9,0x00,0x60,0x97,0x44,0x11,0x1a);
-DEFINE_GUID(KSINTERFACESETID_FileIo,0x8c6f932c,0xe771,0x11d0,0xb8,0xff,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSINTERFACESETID_Media,0x3a13eb40,0x30a7,0x11d0,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(KSINTERFACESETID_Standard,0x1a8766a0,0x62ce,0x11cf,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(KSMEDIUMSETID_MidiBus,0x05908040,0x3246,0x11d0,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(KSMEDIUMSETID_Standard,0x4747b320,0x62ce,0x11cf,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(KSMEDIUMSETID_VPBus,0xa18c15ec,0xce43,0x11d0,0xab,0xe7,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSMEMORY_TYPE_DEVICE_UNKNOWN,0x091bb639,0x603f,0x11d1,0xb0,0x67,0x00,0xa0,0xc9,0x06,0x28,0x02);
-DEFINE_GUID(KSMEMORY_TYPE_KERNEL_NONPAGED,0x4a6d5fc4,0x7895,0x11d1,0xb0,0x69,0x00,0xa0,0xc9,0x06,0x28,0x02);
-DEFINE_GUID(KSMEMORY_TYPE_KERNEL_PAGED,0xd833f8f8,0x7894,0x11d1,0xb0,0x69,0x00,0xa0,0xc9,0x06,0x28,0x02);
-DEFINE_GUID(KSMEMORY_TYPE_SYSTEM,0x091bb638,0x603f,0x11d1,0xb0,0x67,0x00,0xa0,0xc9,0x06,0x28,0x02);
-DEFINE_GUID(KSMEMORY_TYPE_USER,0x8cb0fc28,0x7893,0x11d1,0xb0,0x69,0x00,0xa0,0xc9,0x06,0x28,0x02);
-DEFINE_GUID(KSMETHODSETID_StreamAllocator,0xcf6e4341,0xec87,0x11cf,0xa1,0x30,0x00,0x20,0xaf,0xd1,0x56,0xe4);
-DEFINE_GUID(KSMETHODSETID_StreamIo,0x65d003ca,0x1523,0x11d2,0xb2,0x7a,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSMETHODSETID_Wave_Queued,0x7432c160,0x8827,0x11cf,0xa1,0x02,0x00,0x20,0xaf,0xd1,0x56,0xe4);
-DEFINE_GUID(KSMETHODSETID_Wavetable,0xdcef31eb,0xd907,0x11d0,0x95,0x83,0x00,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSMUSIC_TECHNOLOGY_FMSYNTH,0x252c5c80,0x62e9,0x11cf,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(KSMUSIC_TECHNOLOGY_PORT,0x86c92e60,0x62e8,0x11cf,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(KSMUSIC_TECHNOLOGY_SQSYNTH,0x0ecf4380,0x62e9,0x11cf,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(KSMUSIC_TECHNOLOGY_SWSYNTH,0x37407736,0x3620,0x11d1,0x85,0xd3,0x00,0x00,0xf8,0x75,0x43,0x80);
-DEFINE_GUID(KSMUSIC_TECHNOLOGY_WAVETABLE,0x394ec7c0,0x62e9,0x11cf,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(KSNAME_Allocator,0x642f5d00,0x4791,0x11d0,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(KSNAME_Clock,0x53172480,0x4791,0x11d0,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(KSNAME_Filter,0x9b365890,0x165f,0x11d0,0xa1,0x95,0x00,0x20,0xaf,0xd1,0x56,0xe4);
-DEFINE_GUID(KSNAME_Pin,0x146f1a80,0x4791,0x11d0,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(KSNAME_Server,0x3c0d501a,0x140b,0x11d1,0xb4,0xf,0,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNAME_TopologyNode,0x0621061a,0xee75,0x11d0,0xb9,0x15,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_1394_DA_STREAM,0xdff21fe6,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_1394_DV_STREAM_SOUNDTRACK,0xdff21fe7,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_3D_EFFECTS,0x55515860,0xc559,0x11d0,0x8a,0x2b,0x00,0xa0,0xc9,0x25,0x5a,0xc1);
-DEFINE_GUID(KSNODETYPE_ADC,0x4d837fe0,0xc555,0x11d0,0x8a,0x2b,0x00,0xa0,0xc9,0x25,0x5a,0xc1);
-DEFINE_GUID(KSNODETYPE_AGC,0xe88c9ba0,0xc557,0x11d0,0x8a,0x2b,0x00,0xa0,0xc9,0x25,0x5a,0xc1);
-DEFINE_GUID(KSNODETYPE_ANALOG_CONNECTOR,0xdff21fe1,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_ANALOG_TAPE,0xdff220e7,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_CABLE_TUNER_AUDIO,0xdff220ee,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_CD_PLAYER,0xdff220e3,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_COMMUNICATION_SPEAKER,0xdff21ce6,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_DAC,0x507ae360,0xc554,0x11d0,0x8a,0x2b,0x00,0xa0,0xc9,0x25,0x5a,0xc1);
-DEFINE_GUID(KSNODETYPE_DAT_IO_DIGITAL_AUDIO_TAPE,0xdff220e4,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_DCC_IO_DIGITAL_COMPACT_CASSETTE,0xdff220e5,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_DELAY,0x144981e0,0xc558,0x11d0,0x8a,0x2b,0x00,0xa0,0xc9,0x25,0x5a,0xc1);
-DEFINE_GUID(KSNODETYPE_DEMUX,0xc0eb67d4,0xe807,0x11d0,0x95,0x8a,0x00,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSNODETYPE_DESKTOP_MICROPHONE,0xdff21be2,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_DESKTOP_SPEAKER,0xdff21ce4,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_DEV_SPECIFIC,0x941c7ac0,0xc559,0x11d0,0x8a,0x2b,0x00,0xa0,0xc9,0x25,0x5a,0xc1);
-DEFINE_GUID(KSNODETYPE_DIGITAL_AUDIO_INTERFACE,0xdff21fe2,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_DOWN_LINE_PHONE,0xdff21ee3,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_DRM_DESCRAMBLE,0xffbb6e3f,0xccfe,0x4d84,0x90,0xd9,0x42,0x14,0x18,0xb0,0x3a,0x8e);
-DEFINE_GUID(KSNODETYPE_DSS_AUDIO,0xdff220ef,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_DVD_AUDIO,0xdff220eb,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_ECHO_CANCELING_SPEAKERPHONE,0xdff21de5,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_ECHO_SUPPRESSING_SPEAKERPHONE,0xdff21de3,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_EQUALIZATION_NOISE,0xdff220e2,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_EQUALIZER,0x9d41b4a0,0xc557,0x11d0,0x8a,0x2b,0x00,0xa0,0xc9,0x25,0x5a,0xc1);
-DEFINE_GUID(KSNODETYPE_HANDSET,0xdff21de1,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO,0xdff21ce3,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_HEADPHONES,0xdff21ce2,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_HEADSET,0xdff21de2,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_CHORUS,0x20173f20,0xc559,0x11d0,0x8a,0x2b,0x00,0xa0,0xc9,0x25,0x5a,0xc1);
-DEFINE_GUID(KSNODETYPE_LEGACY_AUDIO_CONNECTOR,0xdff21fe4,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_LEVEL_CALIBRATION_NOISE_SOURCE,0xdff220e1,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_LINE_CONNECTOR,0xdff21fe3,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_LOUDNESS,0x41887440,0xc558,0x11d0,0x8a,0x2b,0x00,0xa0,0xc9,0x25,0x5a,0xc1);
-DEFINE_GUID(KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER,0xdff21ce7,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_MICROPHONE,0xdff21be1,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_MICROPHONE_ARRAY,0xdff21be5,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_MINIDISK,0xdff220e6,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_MULTITRACK_RECORDER,0xdff220f2,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_MUTE,0x02b223c0,0xc557,0x11d0,0x8a,0x2b,0x00,0xa0,0xc9,0x25,0x5a,0xc1);
-DEFINE_GUID(KSNODETYPE_MUX,0x2ceaf780,0xc556,0x11d0,0x8a,0x2b,0x00,0xa0,0xc9,0x25,0x5a,0xc1);
-DEFINE_GUID(KSNODETYPE_NOISE_SUPPRESS,0xe07f903f,0x62fd,0x4e60,0x8c,0xdd,0xde,0xa7,0x23,0x66,0x65,0xb5);
-DEFINE_GUID(KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE,0xdff21be4,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_PEAKMETER,0xa085651e,0x5f0d,0x4b36,0xa8,0x69,0xd1,0x95,0xd6,0xab,0x4b,0x9e);
-DEFINE_GUID(KSNODETYPE_PERSONAL_MICROPHONE,0xdff21be3,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_PHONE_LINE,0xdff21ee1,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_PHONOGRAPH,0xdff220e8,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_PROCESSING_MICROPHONE_ARRAY,0xdff21be6,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_PROLOGIC_DECODER,0x831c2c80,0xc558,0x11d0,0x8a,0x2b,0x00,0xa0,0xc9,0x25,0x5a,0xc1);
-DEFINE_GUID(KSNODETYPE_RADIO_RECEIVER,0xdff220f0,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_RADIO_TRANSMITTER,0xdff220f1,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_REVERB,0xef0328e0,0xc558,0x11d0,0x8a,0x2b,0x00,0xa0,0xc9,0x25,0x5a,0xc1);
-DEFINE_GUID(KSNODETYPE_ROOM_SPEAKER,0xdff21ce5,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_SATELLITE_RECEIVER_AUDIO,0xdff220ed,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_SPDIF_INTERFACE,0xdff21fe5,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_SPEAKER,0xdff21ce1,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_SPEAKERPHONE_NO_ECHO_REDUCTION,0xdff21de3,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_SRC,0x9db7b9e0,0xc555,0x11d0,0x8a,0x2b,0x00,0xa0,0xc9,0x25,0x5a,0xc1);
-DEFINE_GUID(KSNODETYPE_STEREO_ENHANCE,0xaf6878ac,0xe83f,0x11d0,0x95,0x8a,0x00,0xc0,0x4f,0xb9,0x25,0xd3);
-DEFINE_GUID(KSNODETYPE_STEREO_WIDE,0xa9e69800,0xc558,0x11d0,0x8a,0x2b,0x00,0xa0,0xc9,0x25,0x5a,0xc1);
-DEFINE_GUID(KSNODETYPE_SUM,0xda441a60,0xc556,0x11d0,0x8a,0x2b,0x00,0xa0,0xc9,0x25,0x5a,0xc1);
-DEFINE_GUID(KSNODETYPE_SUPERMIX,0xe573adc0,0xc555,0x11d0,0x8a,0x2b,0x00,0xa0,0xc9,0x25,0x5a,0xc1);
-DEFINE_GUID(KSNODETYPE_SURROUND_ENCODER,0x8074c5b2,0x3c66,0x11d2,0xb4,0x5a,0x30,0x78,0x30,0x2c,0x20,0x30);
-DEFINE_GUID(KSNODETYPE_SWMIDI,0xcb9befa0,0xa251,0x11d1,0xa0,0x50,0x00,0x00,0xf8,0x00,0x47,0x88);
-DEFINE_GUID(KSNODETYPE_SWSYNTH,0x423274a0,0x8b81,0x11d1,0xa0,0x50,0x00,0x00,0xf8,0x00,0x47,0x88);
-DEFINE_GUID(KSNODETYPE_SYNTHESIZER,0xdff220f3,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_TELEPHONE,0xdff21ee2,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_TONE,0x7607e580,0xc557,0x11d0,0x8a,0x2b,0x00,0xa0,0xc9,0x25,0x5a,0xc1);
-DEFINE_GUID(KSNODETYPE_TV_TUNER_AUDIO,0xdff220ec,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_VCR_AUDIO,0xdff220e9,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_VIDEO_DISC_AUDIO,0xdff220ea,0xf70f,0x11d0,0xb9,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSNODETYPE_VOLUME,0x3a5acc00,0xc557,0x11d0,0x8a,0x2b,0x00,0xa0,0xc9,0x25,0x5a,0xc1);
-DEFINE_GUID(KSPROPSETID_AC3,0xbfabe720,0x6e1f,0x11d0,0xbc,0xf2,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(KSPROPSETID_Acoustic_Echo_Cancel,0xd7a4af8b,0x3dc1,0x4902,0x91,0xea,0x8a,0x15,0xc9,0xe,0x5,0xb2);
-DEFINE_GUID(KSPROPSETID_Audio,0x45ffaaa0,0x6e1b,0x11d0,0xbc,0xf2,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(KSPROPSETID_AudioDecoderOut,0x6ca6e020,0x43bd,0x11d0,0xbd,0x6a,0x00,0x35,0x05,0xc1,0x03,0xa9);
-DEFINE_GUID(KSPROPSETID_AudioGfx,0x79a9312e,0x59ae,0x43b0,0xa3,0x50,0x8b,0x5,0x28,0x4c,0xab,0x24);
-DEFINE_GUID(KSPROPSETID_Bibliographic,0x07ba150e,0xe2b1,0x11d0,0xac,0x17,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSPROPSETID_Clock,0xdf12a4c0,0xac17,0x11cf,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(KSPROPSETID_Connection,0x1d58c920,0xac9b,0x11cf,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(KSPROPSETID_CopyProt,0x0e8a0a40,0x6aef,0x11d0,0x9e,0xd0,0x00,0xa0,0x24,0xca,0x19,0xb3);
-DEFINE_GUID(KSPROPSETID_Cyclic,0x3ffeaea0,0x2bee,0x11cf,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(KSPROPSETID_DirectSound3DBuffer,0x437b3411,0xd060,0x11d0,0x85,0x83,0x00,0xc0,0x4f,0xd9,0xba,0xf3);
-DEFINE_GUID(KSPROPSETID_DirectSound3DListener,0x437b3414,0xd060,0x11d0,0x85,0x83,0x00,0xc0,0x4f,0xd9,0xba,0xf3);
-DEFINE_GUID(KSPROPSETID_DrmAudioStream,0x2f2c8ddd,0x4198,0x4fac,0xba,0x29,0x61,0xbb,0x05,0xb7,0xde,0x06);
-DEFINE_GUID(KSPROPSETID_DvdSubPic,0xac390460,0x43af,0x11d0,0xbd,0x6a,0x00,0x35,0x05,0xc1,0x03,0xa9);
-DEFINE_GUID(KSPROPSETID_General,0x1464eda5,0x6a8f,0x11d1,0x9a,0xa7,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSPROPSETID_GM,0xaf627536,0xe719,0x11d2,0x8a,0x1d,0x00,0x60,0x97,0xd2,0xdf,0x5d);
-DEFINE_GUID(KSPROPSETID_Hrtf3d,0xb66decb0,0xa083,0x11d0,0x85,0x1e,0x00,0xc0,0x4f,0xd9,0xba,0xf3);
-DEFINE_GUID(KSPROPSETID_Itd3d,0x6429f090,0x9fd9,0x11d0,0xa7,0x5b,0x00,0xa0,0xc9,0x03,0x65,0xe3);
-DEFINE_GUID(KSPROPSETID_Linear,0x5a2ffe80,0x16b9,0x11d0,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(KSPROPSETID_MediaSeeking,0xee904f0c,0xd09b,0x11d0,0xab,0xe9,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSPROPSETID_Mpeg2Vid,0xc8e11b60,0x0cc9,0x11d0,0xbd,0x69,0x00,0x35,0x05,0xc1,0x03,0xa9);
-DEFINE_GUID(KSPROPSETID_OverlayUpdate,0x490ea5cf,0x7681,0x11d1,0xa2,0x1c,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSPROPSETID_Pin,0x8c134960,0x51ad,0x11cf,0x87,0x8a,0x94,0xf8,0x01,0xc1,0x00,0x00);
-DEFINE_GUID(KSPROPSETID_Quality,0xd16ad380,0xac1a,0x11cf,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(KSPROPSETID_RtAudio,0xa855a48c,0x2f78,0x4729,0x90,0x51,0x19,0x68,0x74,0x6b,0x9e,0xef);
-DEFINE_GUID(KSPROPSETID_Service,0x3c0d501b,0x140b,0x11d1,0xb4,0xf,0,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(KSPROPSETID_Stream,0x65aaba60,0x98ae,0x11cf,0xa1,0x0d,0x00,0x20,0xaf,0xd1,0x56,0xe4);
-DEFINE_GUID(KSPROPSETID_StreamAllocator,0xcf6e4342,0xec87,0x11cf,0xa1,0x30,0x00,0x20,0xaf,0xd1,0x56,0xe4);
-DEFINE_GUID(KSPROPSETID_StreamInterface,0x1fdd8ee1,0x9cd3,0x11d0,0x82,0xaa,0x00,0x00,0xf8,0x22,0xfe,0x8a);
-DEFINE_GUID(KSPROPSETID_Sysaudio,0xcbe3faa0,0xcc75,0x11d0,0xb4,0x65,0x00,0x00,0x1a,0x18,0x18,0xe6);
-DEFINE_GUID(KSPROPSETID_Sysaudio_Pin,0xa3a53220,0xc6e4,0x11d0,0xb4,0x65,0x00,0x00,0x1a,0x18,0x18,0xe6);
-DEFINE_GUID(KSPROPSETID_Topology,0x45ffaaa1,0x6e1b,0x11d0,0xbc,0xf2,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(KSPROPSETID_TopologyNode,0x45ffaaa1,0x6e1b,0x11d0,0xbc,0xf2,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(KSPROPSETID_TSRateChange,0xa503c5c0,0x1d1d,0x11d1,0xad,0x80,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(KSPROPSETID_VBICAP_PROPERTIES,0xf162c607,0x7b35,0x496f,0xad,0x7f,0x2d,0xca,0x3b,0x46,0xb7,0x18);
-DEFINE_GUID(KSPROPSETID_VBICodecFiltering,0xcafeb0ca,0x8715,0x11d0,0xbd,0x6a,0x00,0x35,0xc0,0xed,0xba,0xbe);
-DEFINE_GUID(KSPROPSETID_VPConfig,0xbc29a660,0x30e3,0x11d0,0x9e,0x69,0x00,0xc0,0x4f,0xd7,0xc1,0x5b);
-DEFINE_GUID(KSPROPSETID_VPVBIConfig,0xec529b00,0x1a1f,0x11d1,0xba,0xd9,0x00,0x60,0x97,0x44,0x11,0x1a);
-DEFINE_GUID(KSPROPSETID_Wave,0x924e54b0,0x630f,0x11cf,0xad,0xa7,0x08,0x00,0x3e,0x30,0x49,0x4a);
-DEFINE_GUID(KSPROPSETID_Wave_Queued,0x16a15b10,0x16f0,0x11d0,0xa1,0x95,0x00,0x20,0xaf,0xd1,0x56,0xe4);
-DEFINE_GUID(KSPROPSETID_WaveTable,0x8539e660,0x62e9,0x11cf,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(KSPROPTYPESETID_General,0x97e99ba0,0xbdea,0x11cf,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(KSTIME_FORMAT_BYTE,0x7b785571,0x8c82,0x11cf,0xbc,0x0c,0x00,0xaa,0x00,0xac,0x74,0xf6);
-DEFINE_GUID(KSTIME_FORMAT_FIELD,0x7b785573,0x8c82,0x11cf,0xbc,0x0c,0x00,0xaa,0x00,0xac,0x74,0xf6);
-DEFINE_GUID(KSTIME_FORMAT_FRAME,0x7b785570,0x8c82,0x11cf,0xbc,0x0c,0x00,0xaa,0x00,0xac,0x74,0xf6);
-DEFINE_GUID(KSTIME_FORMAT_MEDIA_TIME,0x7b785574,0x8c82,0x11cf,0xbc,0x0c,0x00,0xaa,0x00,0xac,0x74,0xf6);
-DEFINE_GUID(KSTIME_FORMAT_SAMPLE,0x7b785572,0x8c82,0x11cf,0xbc,0x0c,0x00,0xaa,0x00,0xac,0x74,0xf6);
-DEFINE_GUID(PINNAME_VIDEO_ANALOGVIDEOIN,0xfb6c4283,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(PINNAME_VIDEO_CAPTURE,0xfb6c4281,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(PINNAME_VIDEO_CC,0xfb6c4289,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(PINNAME_VIDEO_CC_CAPTURE,0x1aad8061,0x012d,0x11d2,0xb4,0xb1,0x00,0xa0,0xd1,0x02,0xcf,0xbe);
-DEFINE_GUID(PINNAME_VIDEO_EDS,0xfb6c4287,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(PINNAME_VIDEO_NABTS,0xfb6c4286,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(PINNAME_VIDEO_NABTS_CAPTURE,0x29703660,0x498a,0x11d2,0xb4,0xb1,0x00,0xa0,0xd1,0x02,0xcf,0xbe);
-DEFINE_GUID(PINNAME_VIDEO_PREVIEW,0xfb6c4282,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(PINNAME_VIDEO_STILL,0xfb6c428a,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(PINNAME_VIDEO_TELETEXT,0xfb6c4288,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(PINNAME_VIDEO_TIMECODE,0xfb6c428b,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(PINNAME_VIDEO_VBI,0xfb6c4284,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(PINNAME_VIDEO_VIDEOPORT,0xfb6c4285,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(PINNAME_VIDEO_VIDEOPORT_VBI,0xfb6c428c,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(PROPSETID_ALLOCATOR_CONTROL,0x53171960,0x148e,0x11d2,0x99,0x79,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(PROPSETID_TUNER,0x6a2e0605,0x28e4,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(PROPSETID_VIDCAP_CAMERACONTROL,0xc6e13370,0x30ac,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(PROPSETID_VIDCAP_CROSSBAR,0x6a2e0640,0x28e4,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(PROPSETID_VIDCAP_DROPPEDFRAMES,0xc6e13344,0x30ac,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(PROPSETID_VIDCAP_TVAUDIO,0x6a2e0650,0x28e4,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(PROPSETID_VIDCAP_VIDEOCOMPRESSION,0xc6e13343,0x30ac,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(PROPSETID_VIDCAP_VIDEOCONTROL,0x6a2e0670,0x28e4,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(PROPSETID_VIDCAP_VIDEODECODER,0xc6e13350,0x30ac,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(PROPSETID_VIDCAP_VIDEOENCODER,0x6a2e0610,0x28e4,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(PROPSETID_VIDCAP_VIDEOPROCAMP,0xc6e13360,0x30ac,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
diff --git a/winsup/w32api/lib/directx/ksuser.def b/winsup/w32api/lib/directx/ksuser.def
deleted file mode 100644
index 63a6916..0000000
--- a/winsup/w32api/lib/directx/ksuser.def
+++ /dev/null
@@ -1,6 +0,0 @@
-LIBRARY ksuser.dll
-EXPORTS
-KsCreateAllocator@12
-KsCreateClock@12
-KsCreatePin@16
-KsCreateTopologyNode@16
diff --git a/winsup/w32api/lib/directx/msdmo.def b/winsup/w32api/lib/directx/msdmo.def
deleted file mode 100644
index 25d505d..0000000
--- a/winsup/w32api/lib/directx/msdmo.def
+++ /dev/null
@@ -1,17 +0,0 @@
-LIBRARY msdmo.dll
-EXPORTS
-DMOEnum@28
-DMOGetName@8
-DMOGetTypes@28
-DMOGuidToStrA@8
-DMOGuidToStrW@8
-DMORegister@32
-DMOStrToGuidA@8
-DMOStrToGuidW@8
-DMOUnregister@8
-MoCopyMediaType@8
-MoCreateMediaType@8
-MoDeleteMediaType@4
-MoDuplicateMediaType@8
-MoFreeMediaType@4
-MoInitMediaType@8
diff --git a/winsup/w32api/lib/directx/strmiids.c b/winsup/w32api/lib/directx/strmiids.c
deleted file mode 100644
index 91b4920..0000000
--- a/winsup/w32api/lib/directx/strmiids.c
+++ /dev/null
@@ -1,980 +0,0 @@
-/*
-
- strmiids.c - DirectShow GUIDs
-
- Written by Filip Navara <xnavara@volny.cz>
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#if defined(__LCC__) || defined(__GNUC__)
-#define INITGUID 1
-#include <windows.h>
-#else
-#include <basetyps.h>
-#endif
-
-DEFINE_GUID(CLSID_AMAudioData,0xf2468580,0xaf8a,0x11d0,0x82,0x12,0x00,0xc0,0x4f,0xc3,0x2c,0x45);
-DEFINE_GUID(CLSID_AMAudioStream,0x8496e040,0xaf4c,0x11d0,0x82,0x12,0x00,0xc0,0x4f,0xc3,0x2c,0x45);
-DEFINE_GUID(CLSID_AMDirectDrawStream,0x49c47ce4,0x9ba4,0x11d0,0x82,0x12,0x00,0xc0,0x4f,0xc3,0x2c,0x45);
-DEFINE_GUID(CLSID_AMMediaTypeStream,0xcf0f2f7c,0xf7bf,0x11d0,0x90,0xd,0x0,0xc0,0x4f,0xd9,0x18,0x9d);
-DEFINE_GUID(MSPID_PrimaryAudio,0xa35ff56b,0x9fda,0x11d0,0x8f,0xdf,0x0,0xc0,0x4f,0xd9,0x18,0x9d);
-DEFINE_GUID(MSPID_PrimaryVideo,0xa35ff56a,0x9fda,0x11d0,0x8f,0xdf,0x0,0xc0,0x4f,0xd9,0x18,0x9d);
-DEFINE_GUID(AM_INTERFACESETID_Standard,0x1a8766a0l,0x62ce,0x11cf,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(AM_KSCATEGORY_AUDIO,0x6994ad04,0x93ef,0x11d0,0xa3,0xcc,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(AM_KSCATEGORY_CAPTURE,0x65e8773d,0x8f56,0x11d0,0xa3,0xb9,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(AM_KSCATEGORY_CROSSBAR,0xa799a801,0xa46d,0x11d0,0xa1,0x8c,0x00,0xa0,0x24,0x01,0xdc,0xd4);
-DEFINE_GUID(AM_KSCATEGORY_DATACOMPRESSOR,0x1e84c900,0x7e70,0x11d0,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(AM_KSCATEGORY_RENDER,0x65e8773e,0x8f56,0x11d0,0xa3,0xb9,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(AM_KSCATEGORY_SPLITTER,0x0a4252a0,0x7e70,0x11d0,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(AM_KSCATEGORY_TVAUDIO,0xa799a802,0xa46d,0x11d0,0xa1,0x8c,0x00,0xa0,0x24,0x01,0xdc,0xd4);
-DEFINE_GUID(AM_KSCATEGORY_TVTUNER,0xa799a800,0xa46d,0x11d0,0xa1,0x8c,0x00,0xa0,0x24,0x01,0xdc,0xd4);
-DEFINE_GUID(AM_KSCATEGORY_VBICODEC,0x07dad660,0x22f1,0x11d1,0xa9,0xf4,0x00,0xc0,0x4f,0xbb,0xde,0x8f);
-DEFINE_GUID(AM_KSCATEGORY_VIDEO,0x6994ad05,0x93ef,0x11d0,0xa3,0xcc,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(AM_KSPROPSETID_AC3,0xbfabe720,0x6e1f,0x11d0,0xbc,0xf2,0x44,0x45,0x53,0x54,0x00,0x00);
-DEFINE_GUID(AM_KSPROPSETID_CopyProt,0x0e8a0a40,0x6aef,0x11d0,0x9e,0xd0,0x00,0xa0,0x24,0xca,0x19,0xb3);
-DEFINE_GUID(AM_KSPROPSETID_DVD_RateChange,0x3577eb09,0x9582,0x477f,0xb2,0x9c,0xb0,0xc4,0x52,0xa4,0xff,0x9a);
-DEFINE_GUID(AM_KSPROPSETID_DvdKaraoke,0xae4720ae,0xaa71,0x42d8,0xb8,0x2a,0xff,0xfd,0xf5,0x8b,0x76,0xfd);
-DEFINE_GUID(AM_KSPROPSETID_DvdSubPic,0xac390460,0x43af,0x11d0,0xbd,0x6a,0x00,0x35,0x05,0xc1,0x03,0xa9);
-DEFINE_GUID(AM_KSPROPSETID_FrameStep,0xc830acbd,0xab07,0x492f,0x88,0x52,0x45,0xb6,0x98,0x7c,0x29,0x79);
-DEFINE_GUID(AM_KSPROPSETID_TSRateChange,0xa503c5c0,0x1d1d,0x11d1,0xad,0x80,0x44,0x45,0x53,0x54,0x0,0x0);
-DEFINE_GUID(AMPROPSETID_Pin,0x9b00f101,0x1567,0x11d1,0xb3,0xf1,0x0,0xaa,0x0,0x37,0x61,0xc5);
-DEFINE_GUID(CLSID_ACMWrapper,0x6a08cf80,0x0e18,0x11cf,0xa2,0x4d,0x0,0x20,0xaf,0xd7,0x97,0x67);
-DEFINE_GUID(CLSID_ActiveMovieCategories,0xda4e3da0,0xd07d,0x11d0,0xbd,0x50,0x0,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(CLSID_AllocPresenter,0x99d54f63,0x1a69,0x41ae,0xaa,0x4d,0xc9,0x76,0xeb,0x3f,0x07,0x13);
-DEFINE_GUID(CLSID_AllocPresenterDDXclMode,0x4444ac9e,0x242e,0x471b,0xa3,0xc7,0x45,0xdc,0xd4,0x63,0x52,0xbc);
-DEFINE_GUID(CLSID_AMMultiMediaStream,0x49c47ce5,0x9ba4,0x11d0,0x82,0x12,0x00,0xc0,0x4f,0xc3,0x2c,0x45);
-DEFINE_GUID(CLSID_AMovie,0x5f2759c0,0x7685,0x11cf,0x8b,0x23,0x00,0x80,0x5f,0x6c,0xef,0x60);
-DEFINE_GUID(CLSID_AMTimeline,0x78530b75,0x61f9,0x11d2,0x8c,0xad,0x00,0xa0,0x24,0x58,0x09,0x02);
-DEFINE_GUID(CLSID_AMTimelineComp,0x74d2ec80,0x6233,0x11d2,0x8c,0xad,0x00,0xa0,0x24,0x58,0x09,0x02);
-DEFINE_GUID(CLSID_AMTimelineEffect,0x74d2ec82,0x6233,0x11d2,0x8c,0xad,0x00,0xa0,0x24,0x58,0x09,0x02);
-DEFINE_GUID(CLSID_AMTimelineGroup,0xf6d371e1,0xb8a6,0x11d2,0x80,0x23,0x00,0xc0,0xdf,0x10,0xd4,0x34);
-DEFINE_GUID(CLSID_AMTimelineObj,0x78530b78,0x61f9,0x11d2,0x8c,0xad,0x00,0xa0,0x24,0x58,0x09,0x02);
-DEFINE_GUID(CLSID_AMTimelineSrc,0x78530b7a,0x61f9,0x11d2,0x8c,0xad,0x00,0xa0,0x24,0x58,0x09,0x02);
-DEFINE_GUID(CLSID_AMTimelineTrack,0x8f6c3c50,0x897b,0x11d2,0x8c,0xfb,0x00,0xa0,0xc9,0x44,0x1e,0x20);
-DEFINE_GUID(CLSID_AMTimelineTrans,0x74d2ec81,0x6233,0x11d2,0x8c,0xad,0x00,0xa0,0x24,0x58,0x09,0x02);
-DEFINE_GUID(CLSID_AnalogRadioTuningSpace,0x8a674b4c,0x1f63,0x11d3,0xb6,0x4c,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(CLSID_AnalogTVTuningSpace,0x8a674b4d,0x1f63,0x11d3,0xb6,0x4c,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(CLSID_AnalogVideoDecoderPropertyPage,0x71f96466,0x78f3,0x11d0,0xa1,0x8c,0x0,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(CLSID_AsyncReader,0xe436ebb5,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(CLSID_ATSCComponentType,0xa8dcf3d5,0x0780,0x4ef4,0x8a,0x83,0x2c,0xff,0xaa,0xcb,0x8a,0xce);
-DEFINE_GUID(CLSID_ATSCChannelTuneRequest,0x0369b4e6,0x45b6,0x11d3,0xb6,0x50,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(CLSID_ATSCLocator,0x8872ff1b,0x98fa,0x4d7a,0x8d,0x93,0xc9,0xf1,0x05,0x5f,0x85,0xbb);
-DEFINE_GUID(CLSID_ATSCNetworkPropertyPage,0xe3444d16,0x5ac4,0x4386,0x88,0xdf,0x13,0xfd,0x23,0x0e,0x1d,0xda);
-DEFINE_GUID(CLSID_ATSCNetworkProvider,0x0dad2fdd,0x5fd7,0x11d3,0x8f,0x50,0x00,0xc0,0x4f,0x79,0x71,0xe2);
-DEFINE_GUID(CLSID_ATSCTuningSpace,0xa2e30750,0x6c3d,0x11d3,0xb6,0x53,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(CLSID_AudioCompressorCategory,0x33d9a761,0x90c8,0x11d0,0xbd,0x43,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(CLSID_AudioInputDeviceCategory,0x33d9a762,0x90c8,0x11d0,0xbd,0x43,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(CLSID_AudioInputMixerProperties,0x2ca8ca52,0x3c3f,0x11d2,0xb7,0x3d,0x00,0xc0,0x4f,0xb6,0xbd,0x3d);
-DEFINE_GUID(CLSID_AudioProperties,0x05589faf,0xc356,0x11ce,0xbf,0x01,0x00,0xaa,0x00,0x55,0x59,0x5a);
-DEFINE_GUID(CLSID_AudioRecord,0xe30629d2,0x27e5,0x11ce,0x87,0x5d,0x00,0x60,0x8c,0xb7,0x80,0x66);
-DEFINE_GUID(CLSID_AudioRender,0xe30629d1,0x27e5,0x11ce,0x87,0x5d,0x00,0x60,0x8c,0xb7,0x80,0x66);
-DEFINE_GUID(CLSID_AudioRendererAdvancedProperties,0x37e92a92,0xd9aa,0x11d2,0xbf,0x84,0x8e,0xf2,0xb1,0x55,0x5a,0xed);
-DEFINE_GUID(CLSID_AudioRendererCategory,0xe0f158e1,0xcb04,0x11d0,0xbd,0x4e,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(CLSID_AudMixer,0x036a9790,0xc153,0x11d2,0x9e,0xf7,0x00,0x60,0x08,0x03,0x9e,0x37);
-DEFINE_GUID(CLSID_AuxInTuningSpace,0xf9769a06,0x7aca,0x4e39,0x9c,0xfb,0x97,0xbb,0x35,0xf0,0xe7,0x7e);
-DEFINE_GUID(CLSID_AVICo,0xd76e2820,0x1563,0x11cf,0xac,0x98,0x00,0xaa,0x00,0x4c,0x0f,0xa9);
-DEFINE_GUID(CLSID_AVIDec,0xcf49d4e0,0x1115,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(CLSID_AviDest,0xe2510970,0xf137,0x11ce,0x8b,0x67,0x00,0xaa,0x00,0xa3,0xf1,0xa6);
-DEFINE_GUID(CLSID_AVIDoc,0xd3588ab0,0x0781,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(CLSID_AVIDraw,0xa888df60,0x1e90,0x11cf,0xac,0x98,0x00,0xaa,0x00,0x4c,0x0f,0xa9);
-DEFINE_GUID(CLSID_AVIMIDIRender,0x07b65360,0xc445,0x11ce,0xaf,0xde,0x00,0xaa,0x00,0x6c,0x14,0xf4);
-DEFINE_GUID(CLSID_AviMuxProptyPage,0xc647b5c0,0x157c,0x11d0,0xbd,0x23,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(CLSID_AviMuxProptyPage1,0xc647b5c0,0x157c,0x11d0,0xbd,0x23,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(CLSID_AviReader,0x1b544c21,0xfd0b,0x11ce,0x8c,0x63,0x00,0xaa,0x00,0x44,0xb5,0x1e);
-DEFINE_GUID(CLSID_AviSplitter,0x1b544c20,0xfd0b,0x11ce,0x8c,0x63,0x00,0xaa,0x00,0x44,0xb5,0x1e);
-DEFINE_GUID(CLSID_BroadcastEventService,0x0b3ffb92,0x0919,0x4934,0x9d,0x5b,0x61,0x9c,0x71,0x9d,0x02,0x02);
-DEFINE_GUID(CLSID_CAcmCoClassManager,0x33d9a761,0x90c8,0x11d0,0xbd,0x43,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(CLSID_CADefaultDlg,0x11166990,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(CLSID_CADenials,0x11166540,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(CLSID_CAManager,0x11166100,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(CLSID_CAManagerProxy,0x11166101,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(CLSID_CameraControlPropertyPage,0x71f96465,0x78f3,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(CLSID_CAOffer,0x11166550,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(CLSID_CaptureGraphBuilder,0xbf87b6e0,0x8c27,0x11d0,0xb3,0xf0,0x00,0xaa,0x00,0x37,0x61,0xc5);
-DEFINE_GUID(CLSID_CaptureGraphBuilder2,0xbf87b6e1,0x8c27,0x11d0,0xb3,0xf0,0x00,0xaa,0x00,0x37,0x61,0xc5);
-DEFINE_GUID(CLSID_CaptureProperties,0x1b544c22,0xfd0b,0x11ce,0x8c,0x63,0x00,0xaa,0x00,0x44,0xb5,0x1f);
-DEFINE_GUID(CLSID_CAResDenialTree,0x11166998,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(CLSID_CDeviceMoniker,0x4315d437,0x5b8c,0x11d0,0xbd,0x3b,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(CLSID_CIcmCoClassManager,0x33d9a760,0x90c8,0x11d0,0xbd,0x43,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(CLSID_CMidiOutClassManager,0x4efe2452,0x168a,0x11d1,0xbc,0x76,0x00,0xc0,0x4f,0xb9,0x45,0x3b);
-DEFINE_GUID(CLSID_CMpegAudioCodec,0x4a2286e0,0x7bef,0x11ce,0x9b,0xd9,0x00,0x00,0xe2,0x02,0x59,0x9c);
-DEFINE_GUID(CLSID_CMpegVideoCodec,0xfeb50740,0x7bef,0x11ce,0x9b,0xd9,0x00,0x00,0xe2,0x02,0x59,0x9c);
-DEFINE_GUID(CLSID_ColorSource,0x0cfdd070,0x581a,0x11d2,0x9e,0xe6,0x00,0x60,0x08,0x03,0x9e,0x37);
-DEFINE_GUID(CLSID_Colour,0x1643e180,0x90f5,0x11ce,0x97,0xd5,0x00,0xaa,0x00,0x55,0x59,0x5a);
-DEFINE_GUID(CLSID_Component,0x59dc47a8,0x116c,0x11d3,0x9d,0x8e,0x00,0xc0,0x4f,0x72,0xd9,0x80);
-DEFINE_GUID(CLSID_Components,0x809b6661,0x94c4,0x49e6,0xb6,0xec,0x3f,0x0f,0x86,0x22,0x15,0xaa);
-DEFINE_GUID(CLSID_ComponentType,0x823535a0,0x0318,0x11d3,0x9d,0x8e,0x00,0xc0,0x4f,0x72,0xd9,0x80);
-DEFINE_GUID(CLSID_ComponentTypes,0xa1a2b1c4,0x0e3a,0x11d3,0x9d,0x8e,0x00,0xc0,0x4f,0x72,0xd9,0x80);
-DEFINE_GUID(CLSID_CQzFilterClassManager,0x083863f1,0x70de,0x11d0,0xbd,0x40,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(CLSID_CreatePropBagOnRegKey,0x8a674b49,0x1f63,0x11d3,0xb6,0x4c,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(CLSID_CrossbarFilterPropertyPage,0x71f96461,0x78f3,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(CLSID_CVidCapClassManager,0x860bb310,0x5d01,0x11d0,0xbd,0x3b,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(CLSID_CWaveinClassManager,0x33d9a762,0x90c8,0x11d0,0xbd,0x43,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(CLSID_CWaveOutClassManager,0xe0f158e1,0xcb04,0x11d0,0xbd,0x4e,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(CLSID_DeviceControlCategory,0xcc7bfb46,0xf175,0x11d1,0xa3,0x92,0x00,0xe0,0x29,0x1f,0x39,0x59);
-DEFINE_GUID(CLSID_DirectDraw,0xd7b70ee0,0x4340,0x11cf,0xb0,0x63,0x00,0x20,0xaf,0xc2,0xcd,0x35);
-DEFINE_GUID(CLSID_DirectDrawClipper,0x593817a0,0x7db3,0x11cf,0xa2,0xde,0x00,0xaa,0x00,0xb9,0x33,0x56);
-DEFINE_GUID(CLSID_DirectDrawProperties,0x944d4c00,0xdd52,0x11ce,0xbf,0x0e,0x00,0xaa,0x00,0x55,0x59,0x5a);
-DEFINE_GUID(CLSID_Dither,0x1da08500,0x9edc,0x11cf,0xbc,0x10,0x00,0xaa,0x00,0xac,0x74,0xf6);
-DEFINE_GUID(CLSID_DShowTVEFilter,0x05500280,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_DSoundRender,0x79376820,0x07d0,0x11cf,0xa2,0x4d,0x00,0x20,0xaf,0xd7,0x97,0x67);
-DEFINE_GUID(CLSID_DTFilter,0xc4c4c4f2,0x49,0x4e2b,0x98,0xfb,0x95,0x37,0xf6,0xce,0x51,0x6d);
-DEFINE_GUID(CLSID_DVBCLocator,0xc531d9fd,0x9685,0x4028,0x8b,0x68,0x6e,0x12,0x32,0x07,0x9f,0x1e);
-DEFINE_GUID(CLSID_DVBCNetworkProvider,0xdc0c0fe7,0x485,0x4266,0xb9,0x3f,0x68,0xfb,0xf8,0xe,0xd8,0x34);
-DEFINE_GUID(CLSID_DVBSLocator,0x1df7d126,0x4050,0x47f0,0xa7,0xcf,0x4c,0x4c,0xa9,0x24,0x13,0x33);
-DEFINE_GUID(CLSID_DVBSNetworkProvider,0xfa4b375a,0x45b4,0x4d45,0x84,0x40,0x26,0x39,0x57,0xb1,0x16,0x23);
-DEFINE_GUID(CLSID_DVBSTuningSpace,0xb64016f3,0xc9a2,0x4066,0x96,0xf0,0xbd,0x95,0x63,0x31,0x47,0x26);
-DEFINE_GUID(CLSID_DVBTLocator,0x9cd64701,0xbdf3,0x4d14,0x8e,0x03,0xf1,0x29,0x83,0xd8,0x66,0x64);
-DEFINE_GUID(CLSID_DVBTNetworkProvider,0x216c62df,0x6d7f,0x4e9a,0x85,0x71,0x5,0xf1,0x4e,0xdb,0x76,0x6a);
-DEFINE_GUID(CLSID_DVBTuneRequest,0x15d6504a,0x5494,0x499c,0x88,0x6c,0x97,0x3c,0x9e,0x53,0xb9,0xf1);
-DEFINE_GUID(CLSID_DVBTuningSpace,0xc6b14b32,0x76aa,0x4a86,0xa7,0xac,0x5c,0x79,0xaa,0xf5,0x8d,0xa7);
-DEFINE_GUID(CLSID_DVDecPropertiesPage,0x101193c0,0x0bfe,0x11d0,0xaf,0x91,0x00,0xaa,0x00,0xb6,0x7a,0x42);
-DEFINE_GUID(CLSID_DvdGraphBuilder,0xfcc152b7,0xf372,0x11d0,0x8e,0x00,0x00,0xc0,0x4f,0xd7,0xc0,0x8b);
-DEFINE_GUID(CLSID_DVDHWDecodersCategory,0x2721ae20,0x7e70,0x11d0,0xa5,0xd6,0x28,0xdb,0x04,0xc1,0x00,0x00);
-DEFINE_GUID(CLSID_DVDNavigator,0x9b8c4620,0x2c1a,0x11d0,0x84,0x93,0x00,0xa0,0x24,0x38,0xad,0x48);
-DEFINE_GUID(CLSID_DVDState,0xf963c5cf,0xa659,0x4a93,0x96,0x38,0xca,0xf3,0xcd,0x27,0x7d,0x13);
-DEFINE_GUID(CLSID_DVEncPropertiesPage,0x4150f050,0xbb6f,0x11d0,0xaf,0xb9,0x00,0xaa,0x00,0xb6,0x7a,0x42);
-DEFINE_GUID(CLSID_DVMux,0x129d7e40,0xc10d,0x11d0,0xaf,0xb9,0x00,0xaa,0x00,0xb6,0x7a,0x42);
-DEFINE_GUID(CLSID_DVMuxPropertyPage,0x4db880e0,0xc10d,0x11d0,0xaf,0xb9,0x00,0xaa,0x00,0xb6,0x7a,0x42);
-DEFINE_GUID(CLSID_DVSplitter,0x4eb31670,0x9fc6,0x11cf,0xaf,0x6e,0x00,0xaa,0x00,0xb6,0x7a,0x42);
-DEFINE_GUID(CLSID_DVVideoCodec,0xb1b77c00,0xc3e4,0x11cf,0xaf,0x79,0x00,0xaa,0x00,0xb6,0x7a,0x42);
-DEFINE_GUID(CLSID_DVVideoEnc,0x13aa3650,0xbb6f,0x11d0,0xaf,0xb9,0x00,0xaa,0x00,0xb6,0x7a,0x42);
-DEFINE_GUID(CLSID_DxtAlphaSetter,0x506d89ae,0x909a,0x44f7,0x94,0x44,0xab,0xd5,0x75,0x89,0x6e,0x35);
-DEFINE_GUID(CLSID_DxtCompositor,0xbb44391d,0x6abd,0x422f,0x9e,0x2e,0x38,0x5c,0x9d,0xff,0x51,0xfc);
-DEFINE_GUID(CLSID_DxtJpeg,0xde75d012,0x7a65,0x11d2,0x8c,0xea,0x00,0xa0,0xc9,0x44,0x1e,0x20);
-DEFINE_GUID(CLSID_DxtKey,0xc5b19592,0x145e,0x11d3,0x9f,0x04,0x00,0x60,0x08,0x03,0x9e,0x37);
-DEFINE_GUID(CLSID_ETFilter,0xc4c4c4f1,0x49,0x4e2b,0x98,0xfb,0x95,0x37,0xf6,0xce,0x51,0x6d);
-DEFINE_GUID(CLSID_EvalRat,0xc5c5c5f1,0x3abc,0x11d6,0xb2,0x5b,0,0xc0,0x4f,0xa0,0xc0,0x26);
-DEFINE_GUID(CLSID_FGControl,0xe436ebb4,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(CLSID_FileSource,0x701722e0,0x8ae3,0x11ce,0xa8,0x5c,0x00,0xaa,0x00,0x2f,0xea,0xb5);
-DEFINE_GUID(CLSID_FileWriter,0x8596e5f0,0x0da5,0x11d0,0xbd,0x21,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(CLSID_FilgraphManager,0xe436ebb3,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(CLSID_FilterGraph,0xe436ebb3,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(CLSID_FilterGraphNoThread,0xe436ebb8,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(CLSID_FilterMapper,0xe436ebb2,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(CLSID_FilterMapper2,0xcda42200,0xbd88,0x11d0,0xbd,0x4e,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(CLSID_ChannelTuneRequest,0x0369b4e5,0x45b6,0x11d3,0xb6,0x50,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(CLSID_ICodecAPIProxy,0x7ff0997a,0x1999,0x4286,0xa7,0x3c,0x62,0x2b,0x88,0x14,0xe7,0xeb);
-DEFINE_GUID(CLSID_InfTee,0xf8388a40,0xd5bb,0x11d0,0xbe,0x5a,0x00,0x80,0xc7,0x06,0x56,0x8e);
-DEFINE_GUID(CLSID_IVideoEncoderCodecAPIProxy,0xb05dabd9,0x56e5,0x4fdc,0xaf,0xa4,0x8a,0x47,0xe9,0x1f,0x1c,0x9c);
-DEFINE_GUID(CLSID_IVideoEncoderProxy,0xb43c4eec,0x8c32,0x4791,0x91,0x2,0x50,0x8a,0xda,0x5e,0xe8,0xe7);
-DEFINE_GUID(CLSID_LanguageComponentType,0x1be49f30,0x0e1b,0x11d3,0x9d,0x8e,0x00,0xc0,0x4f,0x72,0xd9,0x80);
-DEFINE_GUID(CLSID_LegacyAmFilterCategory,0x083863f1,0x70de,0x11d0,0xbd,0x40,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(CLSID_Line21Decoder,0x6e8d4a20,0x310c,0x11d0,0xb7,0x9a,0x00,0xaa,0x00,0x37,0x67,0xa7);
-DEFINE_GUID(CLSID_Line21Decoder2,0xe4206432,0x01a1,0x4bee,0xb3,0xe1,0x37,0x02,0xc8,0xed,0xc5,0x74);
-DEFINE_GUID(CLSID_Locator,0x0888c883,0xac4f,0x4943,0xb5,0x16,0x2c,0x38,0xd9,0xb3,0x45,0x62);
-DEFINE_GUID(CLSID_MediaDet,0x65bd0711,0x24d2,0x4ff7,0x93,0x24,0xed,0x2e,0x5d,0x3a,0xba,0xfa);
-DEFINE_GUID(CLSID_MediaEncoderCategory,0x7d22e920,0x5ca9,0x4787,0x8c,0x2b,0xa6,0x77,0x9b,0xd1,0x17,0x81);
-DEFINE_GUID(CLSID_MediaLocator,0xcc1101f2,0x79dc,0x11d2,0x8c,0xe6,0x00,0xa0,0xc9,0x44,0x1e,0x20);
-DEFINE_GUID(CLSID_MediaMultiplexerCategory,0x236c9559,0xadce,0x4736,0xbf,0x72,0xba,0xb3,0x4e,0x39,0x21,0x96);
-DEFINE_GUID(CLSID_MediaPropertyBag,0xcdbd8d00,0xc193,0x11d0,0xbd,0x4e,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(CLSID_MemoryAllocator,0x1e651cc0,0xb199,0x11d0,0x82,0x12,0x00,0xc0,0x4f,0xc3,0x2c,0x45);
-DEFINE_GUID(CLSID_MidiRendererCategory,0x4efe2452,0x168a,0x11d1,0xbc,0x76,0x00,0xc0,0x4f,0xb9,0x45,0x3b);
-DEFINE_GUID(CLSID_MjpegDec,0x301056d0,0x6dff,0x11d2,0x9e,0xeb,0x00,0x60,0x08,0x03,0x9e,0x37);
-DEFINE_GUID(CLSID_MJPGEnc,0xb80ab0a0,0x7416,0x11d2,0x9e,0xeb,0x00,0x60,0x08,0x03,0x9e,0x37);
-DEFINE_GUID(CLSID_MMSPLITTER,0x3ae86b20,0x7be8,0x11d1,0xab,0xe6,0x00,0xa0,0xc9,0x05,0xf3,0x75);
-DEFINE_GUID(CLSID_ModexProperties,0x0618aa30,0x6bc4,0x11cf,0xbf,0x36,0x00,0xaa,0x00,0x55,0x59,0x5a);
-DEFINE_GUID(CLSID_ModexRenderer,0x07167665,0x5011,0x11cf,0xbf,0x33,0x00,0xaa,0x00,0x55,0x59,0x5a);
-DEFINE_GUID(CLSID_MOVReader,0x44584800,0xf8ee,0x11ce,0xb2,0xd4,0x00,0xdd,0x01,0x10,0x1b,0x85);
-DEFINE_GUID(CLSID_MPEG1Doc,0xe4bbd160,0x4269,0x11ce,0x83,0x8d,0x00,0xaa,0x00,0x55,0x59,0x5a);
-DEFINE_GUID(CLSID_MPEG1PacketPlayer,0x26c25940,0x4ca9,0x11ce,0xa8,0x28,0x00,0xaa,0x00,0x2f,0xea,0xb5);
-DEFINE_GUID(CLSID_MPEG1Splitter,0x336475d0,0x942a,0x11ce,0xa8,0x70,0x00,0xaa,0x00,0x2f,0xea,0xb5);
-DEFINE_GUID(CLSID_MPEG2Component,0x055cb2d7,0x2969,0x45cd,0x91,0x4b,0x76,0x89,0x07,0x22,0xf1,0x12);
-DEFINE_GUID(CLSID_MPEG2ComponentType,0x418008f3,0xcf67,0x4668,0x96,0x28,0x10,0xdc,0x52,0xbe,0x1d,0x08);
-DEFINE_GUID(CLSID_MPEG2Demultiplexer,0xafb6c280,0x2c41,0x11d3,0x8a,0x60,0x00,0x00,0xf8,0x1e,0x0e,0x4a);
-DEFINE_GUID(CLSID_MPEG2TuneRequest,0x0955ac62,0xbf2e,0x4cba,0xa2,0xb9,0xa6,0x3f,0x77,0x2d,0x46,0xcf);
-DEFINE_GUID(CLSID_MPEG2TuneRequestFactory,0x2c63e4eb,0x4cea,0x41b8,0x91,0x9c,0xe9,0x47,0xea,0x19,0xa7,0x7c);
-DEFINE_GUID(CLSID_Mpeg2VideoStreamAnalyzer,0x6cfad761,0x735d,0x4aa5,0x8a,0xfc,0xaf,0x91,0xa7,0xd6,0x1e,0xba);
-DEFINE_GUID(CLSID_MSEventBinder,0x577faa18,0x4518,0x445e,0x8f,0x70,0x14,0x73,0xf8,0xcf,0x4b,0xa4);
-DEFINE_GUID(CLSID_MSVidAnalogCaptureToDataServices,0xc5702cd6,0x9b79,0x11d3,0xb6,0x54,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(CLSID_MSVidAnalogCaptureToOverlayMixer,0xe18af75a,0x08af,0x11d3,0xb6,0x4a,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(CLSID_MSVidAnalogCaptureToStreamBufferSink,0x9f50e8b1,0x9530,0x4ddc,0x82,0x5e,0x1a,0xf8,0x1d,0x47,0xae,0xd6);
-DEFINE_GUID(CLSID_MSVidAnalogCaptureToXDS,0x3540d440,0x5b1d,0x49cb,0x82,0x1a,0xe8,0x4b,0x8c,0xf0,0x65,0xa7);
-DEFINE_GUID(CLSID_MSVidAnalogTunerDevice,0x1c15d484,0x911d,0x11d2,0xb6,0x32,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(CLSID_MSVidAnalogTVToEncoder,0x28953661,0x231,0x41db,0x89,0x86,0x21,0xff,0x43,0x88,0xee,0x9b);
-DEFINE_GUID(CLSID_MSVidAudioRenderer,0x37b03544,0xa4c8,0x11d2,0xb6,0x34,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(CLSID_MSVidAudioRendererDevices,0xc5702ccf,0x9b79,0x11d3,0xb6,0x54,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(CLSID_MSVidBDATunerDevice,0xa2e3074e,0x6c3d,0x11d3,0xb6,0x53,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(CLSID_MSVidCAGSeg,0x1600f101,0x6666,0x4f66,0xb1,0xe2,0xbf,0x3c,0x9f,0xbb,0x9b,0xa6);
-DEFINE_GUID(CLSID_MSVidClosedCaptioning,0x7f9cb14d,0x48e4,0x43b6,0x93,0x46,0x1a,0xeb,0xc3,0x9c,0x64,0xd3);
-DEFINE_GUID(CLSID_MSVidCtl,0xb0edf163,0x910a,0x11d2,0xb6,0x32,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(CLSID_MSVidDataServices,0x334125c0,0x77e5,0x11d3,0xb6,0x53,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(CLSID_MSVidDataServicesToStreamBufferSink,0x38f03426,0xe83b,0x4e68,0xb6,0x5b,0xdc,0xae,0x73,0x30,0x48,0x38);
-DEFINE_GUID(CLSID_MSVidDataServicesToXDS,0x429ec6e,0x1144,0x4bed,0xb8,0x8b,0x2f,0xb9,0x89,0x9a,0x4a,0x3d);
-DEFINE_GUID(CLSID_MSVidDevice,0x6e40476f,0x9c49,0x4c3e,0x8b,0xb9,0x85,0x87,0x95,0x8e,0xff,0x74);
-DEFINE_GUID(CLSID_MSVidDigitalCaptureToStreamBufferSink,0xabe40035,0x27c3,0x4a2f,0x81,0x53,0x66,0x24,0x47,0x16,0x8,0xaf);
-DEFINE_GUID(CLSID_MSVidEncoder,0xbb530c63,0xd9df,0x4b49,0x94,0x39,0x63,0x45,0x39,0x62,0xe5,0x98);
-DEFINE_GUID(CLSID_MSVidEncoderToStreamBufferSink,0xa0b9b497,0xafbc,0x45ad,0xa8,0xa6,0x9b,0x7,0x7c,0x40,0xd4,0xf2);
-DEFINE_GUID(CLSID_MSVidFeature,0x7748530b,0xc08a,0x47ea,0xb2,0x4c,0xbe,0x86,0x95,0xff,0x40,0x5f);
-DEFINE_GUID(CLSID_MSVidFeatures,0xc5702cd0,0x9b79,0x11d3,0xb6,0x54,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(CLSID_MSVidFilePlaybackDevice,0x37b0353c,0xa4c8,0x11d2,0xb6,0x34,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(CLSID_MSVidFilePlaybackToAudioRenderer,0xcc23f537,0x18d4,0x4ece,0x93,0xbd,0x20,0x7a,0x84,0x72,0x69,0x79);
-DEFINE_GUID(CLSID_MSVidFilePlaybackToVideoRenderer,0xb401c5eb,0x8457,0x427f,0x84,0xea,0xa4,0xd2,0x36,0x33,0x64,0xb0);
-DEFINE_GUID(CLSID_MSVidGenericComposite,0x2764bce5,0xcc39,0x11d2,0xb6,0x39,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(CLSID_MSVidInputDevice,0xac1972f2,0x138a,0x4ca3,0x90,0xda,0xae,0x51,0x11,0x2e,0xda,0x28);
-DEFINE_GUID(CLSID_MSVidInputDevices,0xc5702ccc,0x9b79,0x11d3,0xb6,0x54,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(CLSID_MSVidMPEG2DecoderToClosedCaptioning,0x6ad28ee1,0x5002,0x4e71,0xaa,0xf7,0xbd,0x07,0x79,0x07,0xb1,0xa4);
-DEFINE_GUID(CLSID_MSVidOutput,0x87eb890d,0x03ad,0x4e9d,0x98,0x66,0x37,0x6e,0x5e,0xc5,0x72,0xed);
-DEFINE_GUID(CLSID_MSVidOutputDevices,0xc5702ccd,0x9b79,0x11d3,0xb6,0x54,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(CLSID_MSVidRect,0xcb4276e6,0x7d5f,0x4cf1,0x97,0x27,0x62,0x9c,0x5e,0x6d,0xb6,0xae);
-DEFINE_GUID(CLSID_MSVidRenderFactory,0x11973c25,0x3529,0x40e4,0x9a,0xb1,0xdd,0xc1,0x64,0xcb,0xef,0x49);
-DEFINE_GUID(CLSID_MSVidSBESourceToCC,0x9193a8f9,0xcba,0x400e,0xaa,0x97,0xeb,0x47,0x9,0x16,0x45,0x76);
-DEFINE_GUID(CLSID_MSVidStreamBufferRecordingControl,0xcaafdd83,0xcefc,0x4e3d,0xba,0x3,0x17,0x5f,0x17,0xa2,0x4f,0x91);
-DEFINE_GUID(CLSID_MSVidStreamBufferSink,0x9e77aac4,0x35e5,0x42a1,0xbd,0xc2,0x8f,0x3f,0xf3,0x99,0x84,0x7c);
-DEFINE_GUID(CLSID_MSVidStreamBufferSource,0xad8e510d,0x217f,0x409b,0x80,0x76,0x29,0xc5,0xe7,0x3b,0x98,0xe8);
-DEFINE_GUID(CLSID_MSVidStreamBufferSourceToVideoRenderer,0x3c4708dc,0xb181,0x46a8,0x8d,0xa8,0x4a,0xb0,0x37,0x17,0x58,0xcd);
-DEFINE_GUID(CLSID_MSVidTVEGSeg,0x1600f001,0x6666,0x4f66,0xb1,0xe2,0xbf,0x3c,0x9f,0xbb,0x9b,0xa6);
-DEFINE_GUID(CLSID_MSVidVideoInputDevice,0x95f4820b,0xbb3a,0x4e2d,0xbc,0x64,0x5b,0x81,0x7b,0xc2,0xc3,0x0e);
-DEFINE_GUID(CLSID_MSVidVideoPlaybackDevice,0x1990d634,0x1a5e,0x4071,0xa3,0x4a,0x53,0xaa,0xff,0xce,0x9f,0x36);
-DEFINE_GUID(CLSID_MSVidVideoRenderer,0x37b03543,0xa4c8,0x11d2,0xb6,0x34,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(CLSID_MSVidVideoRendererDevices,0xc5702cce,0x9b79,0x11d3,0xb6,0x54,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(CLSID_MSVidWebDVD,0x011b3619,0xfe63,0x4814,0x8a,0x84,0x15,0xa1,0x94,0xce,0x9c,0xe3);
-DEFINE_GUID(CLSID_MSVidWebDVDAdm,0xfa7c375b,0x66a7,0x4280,0x87,0x9d,0xfd,0x45,0x9c,0x84,0xbb,0x02);
-DEFINE_GUID(CLSID_MSVidWebDVDToAudioRenderer,0x8d04238e,0x9fd1,0x41c6,0x8d,0xe3,0x9e,0x1e,0xe3,0x9,0xe9,0x35);
-DEFINE_GUID(CLSID_MSVidWebDVDToVideoRenderer,0x267db0b3,0x55e3,0x4902,0x94,0x9b,0xdf,0x8f,0x5c,0xec,0x01,0x91);
-DEFINE_GUID(CLSID_MSVidXDS,0x149eedf,0xd08f,0x4142,0x8d,0x73,0xd2,0x39,0x3,0xd2,0x1e,0x90);
-DEFINE_GUID(CLSID_NullRenderer,0xc1f400a4,0x3f08,0x11d3,0x9f,0x0b,0x00,0x60,0x08,0x03,0x9e,0x37);
-DEFINE_GUID(CLSID_OverlayMixer,0xcd8743a1,0x3736,0x11d0,0x9e,0x69,0x00,0xc0,0x4f,0xd7,0xc1,0x5b);
-DEFINE_GUID(CLSID_PerformanceProperties,0x59ce6880,0xacf8,0x11cf,0xb5,0x6e,0x00,0x80,0xc7,0xc4,0xb6,0x8a);
-DEFINE_GUID(CLSID_PersistMonikerPID,0xe436ebb7,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(CLSID_PropertySetter,0xadf95821,0xded7,0x11d2,0xac,0xbe,0x00,0x80,0xc7,0x5e,0x24,0x6e);
-DEFINE_GUID(CLSID_ProtoFilterGraph,0xe436ebb0,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(CLSID_QTDec,0xfdfe9681,0x74a3,0x11d0,0xaf,0xa7,0x00,0xaa,0x00,0xb6,0x7a,0x42);
-DEFINE_GUID(CLSID_QualityProperties,0x418afb70,0xf8b8,0x11ce,0xaa,0xc6,0x00,0x20,0xaf,0x0b,0x99,0xa3);
-DEFINE_GUID(CLSID_QuickTimeParser,0xd51bd5a0,0x7548,0x11cf,0xa5,0x20,0x00,0x80,0xc7,0x7e,0xf5,0x8a);
-DEFINE_GUID(CLSID_RenderEngine,0x64d8a8e0,0x80a2,0x11d2,0x8c,0xf3,0x00,0xa0,0xc9,0x44,0x1e,0x20);
-DEFINE_GUID(CLSID_SampleGrabber,0xc1f400a0,0x3f08,0x11d3,0x9f,0x0b,0x00,0x60,0x08,0x03,0x9e,0x37);
-DEFINE_GUID(CLSID_SeekingPassThru,0x060af76c,0x68dd,0x11d0,0x8f,0xc1,0x00,0xc0,0x4f,0xd9,0x18,0x9d);
-DEFINE_GUID(CLSID_SmartRenderEngine,0x498b0949,0xbbe9,0x4072,0x98,0xbe,0x6c,0xca,0xeb,0x79,0xdc,0x6f);
-DEFINE_GUID(CLSID_SmartTee,0xcc58e280,0x8aa1,0x11d1,0xb3,0xf1,0x00,0xaa,0x00,0x37,0x61,0xc5);
-DEFINE_GUID(CLSID_StreamBufferComposeRecording,0xd682c4ba,0xa90a,0x42fe,0xb9,0xe1,0x3,0x10,0x98,0x49,0xc4,0x23);
-DEFINE_GUID(CLSID_StreamBufferConfig,0xfa8a68b2,0xc864,0x4ba2,0xad,0x53,0xd3,0x87,0x6a,0x87,0x49,0x4b);
-DEFINE_GUID(CLSID_StreamBufferRecordingAttributes,0xccaa63ac,0x1057,0x4778,0xae,0x92,0x12,0x6,0xab,0x9a,0xce,0xe6);
-DEFINE_GUID(CLSID_StreamBufferSink,0x2db47ae5,0xcf39,0x43c2,0xb4,0xd6,0xc,0xd8,0xd9,0x9,0x46,0xf4);
-DEFINE_GUID(CLSID_StreamBufferSource,0xc9f5fe02,0xf851,0x4eb5,0x99,0xee,0xad,0x60,0x2a,0xf1,0xe6,0x19);
-DEFINE_GUID(CLSID_SystemClock,0xe436ebb1,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(CLSID_SystemDeviceEnum,0x62be5d10,0x60eb,0x11d0,0xbd,0x3b,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(CLSID_SystemTuningSpaces,0xd02aac50,0x027e,0x11d3,0x9d,0x8e,0x00,0xc0,0x4f,0x72,0xd9,0x80);
-DEFINE_GUID(CLSID_TextRender,0xe30629d3,0x27e5,0x11ce,0x87,0x5d,0x00,0x60,0x8c,0xb7,0x80,0x66);
-DEFINE_GUID(CLSID_TIFLoad,0x14eb8748,0x1753,0x4393,0x95,0xae,0x4f,0x7e,0x7a,0x87,0xaa,0xd6);
-DEFINE_GUID(CLSID_TransmitCategory,0xcc7bfb41,0xf175,0x11d1,0xa3,0x92,0x00,0xe0,0x29,0x1f,0x39,0x59);
-DEFINE_GUID(CLSID_TuneRequest,0xb46e0d38,0xab35,0x4a06,0xa1,0x37,0x70,0x57,0x6b,0x01,0xb3,0x9f);
-DEFINE_GUID(CLSID_TuningSpace,0x5ffdc5e6,0xb83a,0x4b55,0xb6,0xe8,0xc6,0x9e,0x76,0x5f,0xe9,0xdb);
-DEFINE_GUID(CLSID_TVAudioFilterPropertyPage,0x71f96463,0x78f3,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(CLSID_TVEAttrMap,0x05500021,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVEAttrTimeQ,0x05500022,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVECBAnnc,0x05500041,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVECBDummy,0x05500049,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVECBFile,0x05500043,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVECBTrig,0x05500042,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVEEnhancement,0x05500004,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVEEnhancements,0x05500014,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVEFeature,0x05500025,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVEFile,0x05500050,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVEFilter,0x05500080,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVEFilterCCProperties,0x05500282,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVEFilterStatsProperties,0x05500283,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVEFilterTuneProperties,0x05500281,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVEMCast,0x05500030,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVEMCastCallback,0x05500040,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVEMCastManager,0x05500032,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVEMCasts,0x05500031,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVENavAid,0x05500070,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVEService,0x05500005,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVEServices,0x05500015,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVESupervisor,0x05500006,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVETrack,0x05500002,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVETrigger,0x05500001,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVETriggerCtrl,0x05500090,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVEVariation,0x05500003,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(CLSID_TVTunerFilterPropertyPage,0x266eee41,0x6c63,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65);
-DEFINE_GUID(CLSID_URLReader,0xe436ebb6,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(CLSID_VBISurfaces,0x814b9800,0x1c88,0x11d1,0xba,0xd9,0x00,0x60,0x97,0x44,0x11,0x1a);
-DEFINE_GUID(CLSID_VfwCapture,0x1b544c22,0xfd0b,0x11ce,0x8c,0x63,0x00,0xaa,0x00,0x44,0xb5,0x1e);
-DEFINE_GUID(CLSID_VideoCompressorCategory,0x33d9a760,0x90c8,0x11d0,0xbd,0x43,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(CLSID_VideoInputDeviceCategory,0x860bb310,0x5d01,0x11d0,0xbd,0x3b,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(CLSID_VideoMixingRenderer,0xb87beb7b,0x8d29,0x423f,0xae,0x4d,0x65,0x82,0xc1,0x01,0x75,0xac);
-DEFINE_GUID(CLSID_VideoMixingRenderer9,0x51b4abf3,0x748f,0x4e3b,0xa2,0x76,0xc8,0x28,0x33,0xe,0x92,0x6a);
-DEFINE_GUID(CLSID_VideoPortManager,0x6f26a6cd,0x967b,0x47fd,0x87,0x4a,0x7a,0xed,0x2c,0x9d,0x25,0xa2);
-DEFINE_GUID(CLSID_VideoProcAmpPropertyPage,0x71f96464,0x78f3,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(CLSID_VideoRenderer,0x70e102b0,0x5556,0x11ce,0x97,0xc0,0x00,0xaa,0x00,0x55,0x59,0x5a);
-DEFINE_GUID(CLSID_VideoRendererDefault,0x6bc1cffa,0x8fc1,0x4261,0xac,0x22,0xcf,0xb4,0xcc,0x38,0xdb,0x50);
-DEFINE_GUID(CLSID_VideoStreamConfigPropertyPage,0x71f96467,0x78f3,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(CLSID_VPObject,0xce292861,0xfc88,0x11d0,0x9e,0x69,0x00,0xc0,0x4f,0xd7,0xc1,0x5b);
-DEFINE_GUID(CLSID_VPVBIObject,0x814b9801,0x1c88,0x11d1,0xba,0xd9,0x00,0x60,0x97,0x44,0x11,0x1a);
-DEFINE_GUID(CLSID_WMAsfReader,0x187463a0,0x5bb7,0x11d3,0xac,0xbe,0x00,0x80,0xc7,0x5e,0x24,0x6e);
-DEFINE_GUID(CLSID_WMAsfWriter,0x7c23220e,0x55bb,0x11d3,0x8b,0x16,0x00,0xc0,0x4f,0xb6,0xbd,0x3d);
-DEFINE_GUID(CLSID_WSTDecoder,0x70bc06e0,0x5666,0x11d3,0xa1,0x84,0x00,0x10,0x5a,0xef,0x9f,0x33);
-DEFINE_GUID(CLSID_WstDecoderPropertyPage,0x04e27f80,0x91e4,0x11d3,0xa1,0x84,0x00,0x10,0x5a,0xef,0x9f,0x33);
-DEFINE_GUID(CLSID_XDSCodec,0xc4c4c4f3,0x49,0x4e2b,0x98,0xfb,0x95,0x37,0xf6,0xce,0x51,0x6d);
-DEFINE_GUID(CLSID_XDSToRat,0xc5c5c5f0,0x3abc,0x11d6,0xb2,0x5b,0,0xc0,0x4f,0xa0,0xc0,0x26);
-DEFINE_GUID(CLSID_Xml2Dex,0x18c628ee,0x962a,0x11d2,0x8d,0x08,0x00,0xa0,0xc9,0x44,0x1e,0x20);
-DEFINE_GUID(CODECAPI_ALLSETTINGS,0x6a577e92,0x83e1,0x4113,0xad,0xc2,0x4f,0xce,0xc3,0x2f,0x83,0xa1);
-DEFINE_GUID(CODECAPI_AUDIO_ENCODER,0xb9d19a3e,0xf897,0x429c,0xbc,0x46,0x81,0x38,0xb7,0x27,0x2b,0x2d);
-DEFINE_GUID(CODECAPI_CURRENTCHANGELIST,0x1cb14e83,0x7d72,0x4657,0x83,0xfd,0x47,0xa2,0xc5,0xb9,0xd1,0x3d);
-DEFINE_GUID(CODECAPI_CHANGELISTS,0x62b12acf,0xf6b0,0x47d9,0x94,0x56,0x96,0xf2,0x2c,0x4e,0xb,0x9d);
-DEFINE_GUID(CODECAPI_SETALLDEFAULTS,0x6c5e6a7c,0xacf8,0x4f55,0xa9,0x99,0x1a,0x62,0x81,0x9,0x5,0x1b);
-DEFINE_GUID(CODECAPI_SUPPORTSEVENTS,0x581af97,0x7693,0x4dbd,0x9d,0xca,0x3f,0x9e,0xbd,0x65,0x85,0xa1);
-DEFINE_GUID(CODECAPI_VIDEO_ENCODER,0x7112e8e1,0x3d03,0x47ef,0x8e,0x60,0x3,0xf1,0xcf,0x53,0x73,0x1);
-DEFINE_GUID(DIID__ICAComponentsEvents,0x11166260,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(DIID__ICADefaultDlgEvents,0x11166991,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(DIID__ICADenialsEvents,0x11166240,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(DIID__ICAManagerEvents,0x11166200,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(DIID__ICAOffersEvents,0x11166250,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(DIID__ICAPoliciesEvents,0x11166220,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(DIID__ICARequestEvents,0x11166210,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(DIID__ICAResDenialTreeEvents,0x11166298,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(DIID__ICATollsEvents,0x11166230,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(DIID__IMSVidCtlEvents,0xb0edf164,0x910a,0x11d2,0xb6,0x32,0,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(DIID__ITVEEvents,0x05500000,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(DIID__ITVETriggerCtrlEvents,0x05500091,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(DIID_IDTFilterEvents,0xc4c4c4c2,0x49,0x4e2b,0x98,0xfb,0x95,0x37,0xf6,0xce,0x51,0x6d);
-DEFINE_GUID(DIID_IETFilterEvents,0xc4c4c4c1,0x49,0x4e2b,0x98,0xfb,0x95,0x37,0xf6,0xce,0x51,0x6d);
-DEFINE_GUID(DIID_IXDSCodecEvents,0xc4c4c4c3,0x49,0x4e2b,0x98,0xfb,0x95,0x37,0xf6,0xce,0x51,0x6d);
-DEFINE_GUID(ENCAPIPARAM_BITRATE,0x49cc4c43,0xca83,0x4ad4,0xa9,0xaf,0xf3,0x69,0x6a,0xf6,0x66,0xdf);
-DEFINE_GUID(ENCAPIPARAM_BITRATE_MODE,0xee5fb25c,0xc713,0x40d1,0x9d,0x58,0xc0,0xd7,0x24,0x1e,0x25,0xf);
-DEFINE_GUID(ENCAPIPARAM_PEAK_BITRATE,0x703f16a9,0x3d48,0x44a1,0xb0,0x77,0x1,0x8d,0xff,0x91,0x5d,0x19);
-DEFINE_GUID(FORMAT_AnalogVideo,0x0482dde0,0x7817,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65);
-DEFINE_GUID(FORMAT_DolbyAC3,0xe06d80e4,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(FORMAT_DVD_LPCMAudio,0xe06d80e6,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(FORMAT_DvInfo,0x05589f84,0xc356,0x11ce,0xbf,0x01,0x00,0xaa,0x00,0x55,0x59,0x5a);
-DEFINE_GUID(FORMAT_MPEG2_VIDEO,0xe06d80e3,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(FORMAT_MPEG2Audio,0xe06d80e5,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(FORMAT_MPEG2Video,0xe06d80e3,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(FORMAT_MPEGStreams,0x05589f83,0xc356,0x11ce,0xbf,0x01,0x00,0xaa,0x00,0x55,0x59,0x5a);
-DEFINE_GUID(FORMAT_MPEGVideo,0x05589f82,0xc356,0x11ce,0xbf,0x01,0x00,0xaa,0x00,0x55,0x59,0x5a);
-DEFINE_GUID(FORMAT_None,0x0f6417d6,0xc318,0x11d0,0xa4,0x3f,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(FORMAT_VideoInfo,0x05589f80,0xc356,0x11ce,0xbf,0x01,0x00,0xaa,0x00,0x55,0x59,0x5a);
-DEFINE_GUID(FORMAT_VideoInfo2,0xf72a76a0,0xeb0a,0x11d0,0xac,0xe4,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(FORMAT_VIDEOINFO2,0xf72a76a0,0xeb0a,0x11d0,0xac,0xe4,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(FORMAT_WaveFormatEx,0x05589f81,0xc356,0x11ce,0xbf,0x01,0x00,0xaa,0x00,0x55,0x59,0x5a);
-DEFINE_GUID(IID_IAMAnalogVideoDecoder,0xc6e13350,0x30ac,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(IID_IAMAnalogVideoEncoder,0xc6e133b0,0x30ac,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(IID_IAMAudioInputMixer,0x54c39221,0x8380,0x11d0,0xb3,0xf0,0x00,0xaa,0x00,0x37,0x61,0xc5);
-DEFINE_GUID(IID_IAMAudioRendererStats,0x22320cb2,0xd41a,0x11d2,0xbf,0x7c,0xd7,0xcb,0x9d,0xf0,0xbf,0x93);
-DEFINE_GUID(IID_IAMBufferNegotiation,0x56ed71a0,0xaf5f,0x11d0,0xb3,0xf0,0x00,0xaa,0x00,0x37,0x61,0xc5);
-DEFINE_GUID(IID_IAMCameraControl,0xc6e13370,0x30ac,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(IID_IAMClockAdjust,0x4d5466b0,0xa49c,0x11d1,0xab,0xe8,0x00,0xa0,0xc9,0x05,0xf3,0x75);
-DEFINE_GUID(IID_IAMClockSlave,0x9fd52741,0x176d,0x4b36,0x8f,0x51,0xca,0x8f,0x93,0x32,0x23,0xbe);
-DEFINE_GUID(IID_IAMCollection,0x56a868b9,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IAMCopyCaptureFileProgress,0x670d1d20,0xa068,0x11d0,0xb3,0xf0,0x00,0xaa,0x00,0x37,0x61,0xc5);
-DEFINE_GUID(IID_IAMCrossbar,0xc6e13380,0x30ac,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(IID_IAMDecoderCaps,0xc0dff467,0xd499,0x4986,0x97,0x2b,0xe1,0xd9,0x09,0x0f,0xa9,0x41);
-DEFINE_GUID(IID_IAMDeviceRemoval,0xf90a6130,0xb658,0x11d2,0xae,0x49,0x00,0x00,0xf8,0x75,0x4b,0x99);
-DEFINE_GUID(IID_IAMDevMemoryAllocator,0xc6545bf0,0xe76b,0x11d0,0xbd,0x52,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(IID_IAMDevMemoryControl,0xc6545bf1,0xe76b,0x11d0,0xbd,0x52,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(IID_IAMDirectSound,0x546f4260,0xd53e,0x11cf,0xb3,0xf0,0x00,0xaa,0x00,0x37,0x61,0xc5);
-DEFINE_GUID(IID_IAMDroppedFrames,0xc6e13344,0x30ac,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(IID_IAMErrorLog,0xe43e73a2,0x0efa,0x11d3,0x96,0x01,0x00,0xa0,0xc9,0x44,0x1e,0x20);
-DEFINE_GUID(IID_IAMExtDevice,0xb5730a90,0x1a2c,0x11cf,0x8c,0x23,0x00,0xaa,0x00,0x6b,0x68,0x14);
-DEFINE_GUID(IID_IAMExtTransport,0xa03cd5f0,0x3045,0x11cf,0x8c,0x44,0x00,0xaa,0x00,0x6b,0x68,0x14);
-DEFINE_GUID(IID_IAMFilterMiscFlags,0x2dd74950,0xa890,0x11d1,0xab,0xe8,0x00,0xa0,0xc9,0x05,0xf3,0x75);
-DEFINE_GUID(IID_IAMGraphBuilderCallback,0x4995f511,0x9ddb,0x4f12,0xbd,0x3b,0xf0,0x46,0x11,0x80,0x7b,0x79);
-DEFINE_GUID(IID_IAMGraphStreams,0x632105fa,0x072e,0x11d3,0x8a,0xf9,0x00,0xc0,0x4f,0xb6,0xbd,0x3d);
-DEFINE_GUID(IID_IAMLatency,0x62ea93ba,0xec62,0x11d2,0xb7,0x70,0x00,0xc0,0x4f,0xb6,0xbd,0x3d);
-DEFINE_GUID(IID_IAMLine21Decoder,0x6e8d4a21,0x310c,0x11d0,0xb7,0x9a,0x00,0xaa,0x00,0x37,0x67,0xa7);
-DEFINE_GUID(IID_IAMMediaStream,0xbebe595d,0x9a6f,0x11d0,0x8f,0xde,0x00,0xc0,0x4f,0xd9,0x18,0x9d);
-DEFINE_GUID(IID_IAMMediaTypeSample,0xab6b4afb,0xf6e4,0x11d0,0x90,0x0d,0x00,0xc0,0x4f,0xd9,0x18,0x9d);
-DEFINE_GUID(IID_IAMMediaTypeStream,0xab6b4afa,0xf6e4,0x11d0,0x90,0x0d,0x00,0xc0,0x4f,0xd9,0x18,0x9d);
-DEFINE_GUID(IID_IAMMultiMediaStream,0xbebe595c,0x9a6f,0x11d0,0x8f,0xde,0x00,0xc0,0x4f,0xd9,0x18,0x9d);
-DEFINE_GUID(IID_IAMOpenProgress,0x8e1c39a1,0xde53,0x11cf,0xaa,0x63,0x00,0x80,0xc7,0x44,0x52,0x8d);
-DEFINE_GUID(IID_IAMOverlayFX,0x62fae250,0x7e65,0x4460,0xbf,0xc9,0x63,0x98,0xb3,0x22,0x07,0x3c);
-DEFINE_GUID(IID_IAMovie,0x359ace10,0x7688,0x11cf,0x8b,0x23,0x00,0x80,0x5f,0x6c,0xef,0x60);
-DEFINE_GUID(IID_IAMovieSetup,0xa3d8cec0,0x7e5a,0x11cf,0xbb,0xc5,0x00,0x80,0x5f,0x6c,0xef,0x20);
-DEFINE_GUID(IID_IAMPhysicalPinInfo,0xf938c991,0x3029,0x11cf,0x8c,0x44,0x00,0xaa,0x00,0x6b,0x68,0x14);
-DEFINE_GUID(IID_IAMPushSource,0xf185fe76,0xe64e,0x11d2,0xb7,0x6e,0x00,0xc0,0x4f,0xb6,0xbd,0x3d);
-DEFINE_GUID(IID_IAMResourceControl,0x8389d2d0,0x77d7,0x11d1,0xab,0xe6,0x00,0xa0,0xc9,0x05,0xf3,0x75);
-DEFINE_GUID(IID_IAMSetErrorLog,0x963566da,0xbe21,0x4eaf,0x88,0xe9,0x35,0x70,0x4f,0x8f,0x52,0xa1);
-DEFINE_GUID(IID_IAMStats,0xbc9bcf80,0xdcd2,0x11d2,0xab,0xf6,0x00,0xa0,0xc9,0x05,0xf3,0x75);
-DEFINE_GUID(IID_IAMStreamConfig,0xc6e13340,0x30ac,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(IID_IAMStreamControl,0x36b73881,0xc2c8,0x11cf,0x8b,0x46,0x00,0x80,0x5f,0x6c,0xef,0x60);
-DEFINE_GUID(IID_IAMStreamSelect,0xc1960960,0x17f5,0x11d1,0xab,0xe1,0x00,0xa0,0xc9,0x05,0xf3,0x75);
-DEFINE_GUID(IID_IAMTimecodeDisplay,0x9b496ce2,0x811b,0x11cf,0x8c,0x77,0x00,0xaa,0x00,0x6b,0x68,0x14);
-DEFINE_GUID(IID_IAMTimecodeGenerator,0x9b496ce0,0x811b,0x11cf,0x8c,0x77,0x00,0xaa,0x00,0x6b,0x68,0x14);
-DEFINE_GUID(IID_IAMTimecodeReader,0x9b496ce1,0x811b,0x11cf,0x8c,0x77,0x00,0xaa,0x00,0x6b,0x68,0x14);
-DEFINE_GUID(IID_IAMTimeline,0x78530b74,0x61f9,0x11d2,0x8c,0xad,0x00,0xa0,0x24,0x58,0x09,0x02);
-DEFINE_GUID(IID_IAMTimelineComp,0xeae58536,0x622e,0x11d2,0x8c,0xad,0x00,0xa0,0x24,0x58,0x09,0x02);
-DEFINE_GUID(IID_IAMTimelineEffect,0xbce0c264,0x622d,0x11d2,0x8c,0xad,0x00,0xa0,0x24,0x58,0x09,0x02);
-DEFINE_GUID(IID_IAMTimelineEffectable,0xeae58537,0x622e,0x11d2,0x8c,0xad,0x00,0xa0,0x24,0x58,0x09,0x02);
-DEFINE_GUID(IID_IAMTimelineGroup,0x9eed4f00,0xb8a6,0x11d2,0x80,0x23,0x00,0xc0,0xdf,0x10,0xd4,0x34);
-DEFINE_GUID(IID_IAMTimelineObj,0x78530b77,0x61f9,0x11d2,0x8c,0xad,0x00,0xa0,0x24,0x58,0x09,0x02);
-DEFINE_GUID(IID_IAMTimelineSplittable,0xa0f840a0,0xd590,0x11d2,0x8d,0x55,0x00,0xa0,0xc9,0x44,0x1e,0x20);
-DEFINE_GUID(IID_IAMTimelineSrc,0x78530b79,0x61f9,0x11d2,0x8c,0xad,0x00,0xa0,0x24,0x58,0x09,0x02);
-DEFINE_GUID(IID_IAMTimelineTrack,0xeae58538,0x622e,0x11d2,0x8c,0xad,0x00,0xa0,0x24,0x58,0x09,0x02);
-DEFINE_GUID(IID_IAMTimelineTrans,0xbce0c265,0x622d,0x11d2,0x8c,0xad,0x00,0xa0,0x24,0x58,0x09,0x02);
-DEFINE_GUID(IID_IAMTimelineTransable,0x378fa386,0x622e,0x11d2,0x8c,0xad,0x00,0xa0,0x24,0x58,0x09,0x02);
-DEFINE_GUID(IID_IAMTimelineVirtualTrack,0xa8ed5f80,0xc2c7,0x11d2,0x8d,0x39,0x00,0xa0,0xc9,0x44,0x1e,0x20);
-DEFINE_GUID(IID_IAMTuner,0x211a8761,0x03ac,0x11d1,0x8d,0x13,0x00,0xaa,0x00,0xbd,0x83,0x39);
-DEFINE_GUID(IID_IAMTunerNotification,0x211a8760,0x03ac,0x11d1,0x8d,0x13,0x00,0xaa,0x00,0xbd,0x83,0x39);
-DEFINE_GUID(IID_IAMTVAudio,0x83ec1c30,0x23d1,0x11d1,0x99,0xe6,0x00,0xa0,0xc9,0x56,0x02,0x66);
-DEFINE_GUID(IID_IAMTVAudioNotification,0x83ec1c33,0x23d1,0x11d1,0x99,0xe6,0x00,0xa0,0xc9,0x56,0x02,0x66);
-DEFINE_GUID(IID_IAMTVTuner,0x211a8766,0x03ac,0x11d1,0x8d,0x13,0x00,0xaa,0x00,0xbd,0x83,0x39);
-DEFINE_GUID(IID_IAMVfwCaptureDialogs,0xd8d715a0,0x6e5e,0x11d0,0xb3,0xf0,0x00,0xaa,0x00,0x37,0x61,0xc5);
-DEFINE_GUID(IID_IAMVfwCompressDialogs,0xd8d715a3,0x6e5e,0x11d0,0xb3,0xf0,0x00,0xaa,0x00,0x37,0x61,0xc5);
-DEFINE_GUID(IID_IAMVideoAccelerator,0x256a6a22,0xfbad,0x11d1,0x82,0xbf,0x00,0xa0,0xc9,0x69,0x6c,0x8f);
-DEFINE_GUID(IID_IAMVideoAcceleratorNotify,0x256a6a21,0xfbad,0x11d1,0x82,0xbf,0x00,0xa0,0xc9,0x69,0x6c,0x8f);
-DEFINE_GUID(IID_IAMVideoCompression,0xc6e13343,0x30ac,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(IID_IAMVideoControl,0x6a2e0670,0x28e4,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(IID_IAMVideoDecimationProperties,0x60d32930,0x13da,0x11d3,0x9e,0xc6,0xc4,0xfc,0xae,0xf5,0xc7,0xbe);
-DEFINE_GUID(IID_IAMVideoProcAmp,0xc6e13360,0x30ac,0x11d0,0xa1,0x8c,0x00,0xa0,0xc9,0x11,0x89,0x56);
-DEFINE_GUID(IID_IAMWstDecoder,0xc056de21,0x75c2,0x11d3,0xa1,0x84,0x00,0x10,0x5a,0xef,0x9f,0x33);
-DEFINE_GUID(IID_IAnalogRadioTuningSpace,0x2a6e293b,0x2595,0x11d3,0xb6,0x4c,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IAnalogTVTuningSpace,0x2a6e293c,0x2595,0x11d3,0xb6,0x4c,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IAsyncReader,0x56a868aa,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IATSCComponentType,0xfc189e4d,0x7bd4,0x4125,0xb3,0xb3,0x3a,0x76,0xa3,0x32,0xcc,0x96);
-DEFINE_GUID(IID_IATSCChannelTuneRequest,0x0369b4e1,0x45b6,0x11d3,0xb6,0x50,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IATSCLocator,0xbf8d986f,0x8c2b,0x4131,0x94,0xd7,0x4d,0x3d,0x9f,0xcc,0x21,0xef);
-DEFINE_GUID(IID_IATSCTuningSpace,0x0369b4e2,0x45b6,0x11d3,0xb6,0x50,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IAudioData,0x54c719c0,0xaf60,0x11d0,0x82,0x12,0x00,0xc0,0x4f,0xc3,0x2c,0x45);
-DEFINE_GUID(IID_IAudioMediaStream,0xf7537560,0xa3be,0x11d0,0x82,0x12,0x00,0xc0,0x4f,0xc3,0x2c,0x45);
-DEFINE_GUID(IID_IAudioStreamSample,0x345fee00,0xaba5,0x11d0,0x82,0x12,0x00,0xc0,0x4f,0xc3,0x2c,0x45);
-DEFINE_GUID(IID_IAuxInTuningSpace,0xe48244b8,0x7e17,0x4f76,0xa7,0x63,0x50,0x90,0xff,0x1e,0x2f,0x30);
-DEFINE_GUID(IID_IBaseFilter,0x56a86895,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IBaseVideoMixer,0x61ded640,0xe912,0x11ce,0xa0,0x99,0x00,0xaa,0x00,0x47,0x9a,0x58);
-DEFINE_GUID(IID_IBasicAudio,0x56a868b3,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IBasicVideo,0x56a868b5,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IBasicVideo2,0x329bb360,0xf6ea,0x11d1,0x90,0x38,0x00,0xa0,0xc9,0x69,0x72,0x98);
-DEFINE_GUID(IID_IBDA_AutoDemodulate,0xddf15b12,0xbd25,0x11d2,0x9c,0xa0,0x00,0xc0,0x4f,0x79,0x71,0xe0);
-DEFINE_GUID(IID_IBDA_DeviceControl,0xfd0a5af3,0xb41d,0x11d2,0x9c,0x95,0x00,0xc0,0x4f,0x79,0x71,0xe0);
-DEFINE_GUID(IID_IBDA_DigitalDemodulator,0xef30f379,0x985b,0x4d10,0xb6,0x40,0xa7,0x9d,0x5e,0x04,0xe1,0xe0);
-DEFINE_GUID(IID_IBDA_EthernetFilter,0x71985f43,0x1ca1,0x11d3,0x9c,0xc8,0x00,0xc0,0x4f,0x79,0x71,0xe0);
-DEFINE_GUID(IID_IBDA_FrequencyFilter,0x71985f47,0x1ca1,0x11d3,0x9c,0xc8,0x00,0xc0,0x4f,0x79,0x71,0xe0);
-DEFINE_GUID(IID_IBDA_IPSinkControl,0x3f4dc8e2,0x4050,0x11d3,0x8f,0x4b,0x00,0xc0,0x4f,0x79,0x71,0xe2);
-DEFINE_GUID(IID_IBDA_IPSinkInfo,0xa750108f,0x492e,0x4d51,0x95,0xf7,0x64,0x9b,0x23,0xff,0x7a,0xd7);
-DEFINE_GUID(IID_IBDA_IPV4Filter,0x71985f44,0x1ca1,0x11d3,0x9c,0xc8,0x00,0xc0,0x4f,0x79,0x71,0xe0);
-DEFINE_GUID(IID_IBDA_IPV6Filter,0xe1785a74,0x2a23,0x4fb3,0x92,0x45,0xa8,0xf8,0x80,0x17,0xef,0x33);
-DEFINE_GUID(IID_IBDA_LNBInfo,0x992cf102,0x49f9,0x4719,0xa6,0x64,0xc4,0xf2,0x3e,0x24,0x08,0xf4);
-DEFINE_GUID(IID_IBDA_NetworkProvider,0xfd501041,0x8ebe,0x11ce,0x81,0x83,0x00,0xaa,0x00,0x57,0x7d,0xa2);
-DEFINE_GUID(IID_IBDA_NullTransform,0xddf15b0d,0xbd25,0x11d2,0x9c,0xa0,0x00,0xc0,0x4f,0x79,0x71,0xe0);
-DEFINE_GUID(IID_IBDA_PinControl,0x0ded49d5,0xa8b7,0x4d5d,0x97,0xa1,0x12,0xb0,0xc1,0x95,0x87,0x4d);
-DEFINE_GUID(IID_IBDA_SignalProperties,0xd2f1644b,0xb409,0x11d2,0xbc,0x69,0x00,0xa0,0xc9,0xee,0x9e,0x16);
-DEFINE_GUID(IID_IBDA_SignalStatistics,0x1347d106,0xcf3a,0x428a,0xa5,0xcb,0xac,0x0d,0x9a,0x2a,0x43,0x38);
-DEFINE_GUID(IID_IBDA_TIF_REGISTRATION,0xdfef4a68,0xee61,0x415f,0x9c,0xcb,0xcd,0x95,0xf2,0xf9,0x8a,0x3a);
-DEFINE_GUID(IID_IBDA_Topology,0xa14ee835,0x0a23,0x11d3,0x9c,0xc7,0x00,0xc0,0x4f,0x79,0x71,0xe0);
-DEFINE_GUID(IID_IBDA_VoidTransform,0x71985f46,0x1ca1,0x11d3,0x9c,0xc8,0x00,0xc0,0x4f,0x79,0x71,0xe0);
-DEFINE_GUID(IID_IBPCSatelliteTuner,0x211a8765,0x03ac,0x11d1,0x8d,0x13,0x00,0xaa,0x00,0xbd,0x83,0x39);
-DEFINE_GUID(IID_IBroadcastEvent,0x3b21263f,0x26e8,0x489d,0xaa,0xc4,0x92,0x4f,0x7e,0xfd,0x95,0x11);
-DEFINE_GUID(IID_ICAComponent,0x11166360,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(IID_ICAComponentInternal,0x11166361,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(IID_ICAComponents,0x11166470,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(IID_ICADefaultDlg,0x860a3fe2,0xded1,0x40e2,0x89,0x6c,0x05,0x76,0x81,0xa8,0xa1,0xa8);
-DEFINE_GUID(IID_ICADenial,0x11166340,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(IID_ICADenials,0x11166440,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(IID_ICADenialsInternal,0x11166441,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(IID_ICAManager,0x11166300,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(IID_ICAManagerInternal,0x11166301,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(IID_ICAOffer,0x11166350,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(IID_ICAOffers,0x11166450,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(IID_ICAPolicies,0x11166420,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(IID_ICAPoliciesInternal,0x11166421,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(IID_ICAPolicy,0x11166320,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(IID_ICaptureGraphBuilder,0xbf87b6e0,0x8c27,0x11d0,0xb3,0xf0,0x00,0xaa,0x00,0x37,0x61,0xc5);
-DEFINE_GUID(IID_ICaptureGraphBuilder2,0x93e5a4e0,0x2d50,0x11d2,0xab,0xfa,0x00,0xa0,0xc9,0xc6,0xe3,0x8d);
-DEFINE_GUID(IID_ICARequest,0x11166310,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(IID_ICAResDenialTree,0x11166898,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(IID_ICAToll,0x11166330,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(IID_ICATolls,0x11166430,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(IID_ICATollsInternal,0x11166431,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(IID_ICodecAPI,0x901db4c7,0x31ce,0x41a2,0x85,0xdc,0x8f,0xa0,0xbf,0x41,0xb8,0xda);
-DEFINE_GUID(IID_IComponent,0x1a5576fc,0x0e19,0x11d3,0x9d,0x8e,0x00,0xc0,0x4f,0x72,0xd9,0x80);
-DEFINE_GUID(IID_IComponents,0xfcd01846,0x0e19,0x11d3,0x9d,0x8e,0x00,0xc0,0x4f,0x72,0xd9,0x80);
-DEFINE_GUID(IID_IComponentType,0x6a340dc0,0x0311,0x11d3,0x9d,0x8e,0x00,0xc0,0x4f,0x72,0xd9,0x80);
-DEFINE_GUID(IID_IComponentTypes,0x0dc13d4a,0x0313,0x11d3,0x9d,0x8e,0x00,0xc0,0x4f,0x72,0xd9,0x80);
-DEFINE_GUID(IID_IConfigAviMux,0x5acd6aa0,0xf482,0x11ce,0x8b,0x67,0x00,0xaa,0x00,0xa3,0xf1,0xa6);
-DEFINE_GUID(IID_IConfigInterleaving,0xbee3d220,0x157b,0x11d0,0xbd,0x23,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(IID_ICreateDevEnum,0x29840822,0x5b84,0x11d0,0xbd,0x3b,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(IID_ICreatePropBagOnRegKey,0x8a674b48,0x1f63,0x11d3,0xb6,0x4c,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IDDrawExclModeVideo,0x153acc21,0xd83b,0x11d1,0x82,0xbf,0x00,0xa0,0xc9,0x69,0x6c,0x8f);
-DEFINE_GUID(IID_IDDrawExclModeVideoCallback,0x913c24a0,0x20ab,0x11d2,0x90,0x38,0x00,0xa0,0xc9,0x69,0x72,0x98);
-DEFINE_GUID(IID_IDDVideoPortContainer,0x6c142760,0xa733,0x11ce,0xa5,0x21,0x00,0x20,0xaf,0x0b,0xe5,0x60);
-DEFINE_GUID(IID_IDecimateVideoImage,0x2e5ea3e0,0xe924,0x11d2,0xb6,0xda,0x00,0xa0,0xc9,0x95,0xe8,0xdf);
-DEFINE_GUID(IID_IDeferredCommand,0x56a868b8,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IDirectDraw,0x6c14db80,0xa733,0x11ce,0xa5,0x21,0x00,0x20,0xaf,0x0b,0xe5,0x60);
-DEFINE_GUID(IID_IDirectDraw2,0xb3a6f3e0,0x2b43,0x11cf,0xa2,0xde,0x00,0xaa,0x00,0xb9,0x33,0x56);
-DEFINE_GUID(IID_IDirectDrawClipper,0x6c14db85,0xa733,0x11ce,0xa5,0x21,0x00,0x20,0xaf,0x0b,0xe5,0x60);
-DEFINE_GUID(IID_IDirectDrawColorControl,0x4b9f0ee0,0x0d7e,0x11d0,0x9b,0x06,0x00,0xa0,0xc9,0x03,0xa3,0xb8);
-DEFINE_GUID(IID_IDirectDrawKernel,0x8d56c120,0x6a08,0x11d0,0x9b,0x06,0x00,0xa0,0xc9,0x03,0xa3,0xb8);
-DEFINE_GUID(IID_IDirectDrawMediaSample,0xab6b4afe,0xf6e4,0x11d0,0x90,0x0d,0x00,0xc0,0x4f,0xd9,0x18,0x9d);
-DEFINE_GUID(IID_IDirectDrawMediaSampleAllocator,0xab6b4afc,0xf6e4,0x11d0,0x90,0x0d,0x00,0xc0,0x4f,0xd9,0x18,0x9d);
-DEFINE_GUID(IID_IDirectDrawMediaStream,0xf4104fce,0x9a70,0x11d0,0x8f,0xde,0x00,0xc0,0x4f,0xd9,0x18,0x9d);
-DEFINE_GUID(IID_IDirectDrawPalette,0x6c14db84,0xa733,0x11ce,0xa5,0x21,0x00,0x20,0xaf,0x0b,0xe5,0x60);
-DEFINE_GUID(IID_IDirectDrawStreamSample,0xf4104fcf,0x9a70,0x11d0,0x8f,0xde,0x00,0xc0,0x4f,0xd9,0x18,0x9d);
-DEFINE_GUID(IID_IDirectDrawSurface,0x6c14db81,0xa733,0x11ce,0xa5,0x21,0x00,0x20,0xaf,0x0b,0xe5,0x60);
-DEFINE_GUID(IID_IDirectDrawSurface2,0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27);
-DEFINE_GUID(IID_IDirectDrawSurface3,0xda044e00,0x69b2,0x11d0,0xa1,0xd5,0x00,0xaa,0x00,0xb8,0xdf,0xbb);
-DEFINE_GUID(IID_IDirectDrawSurface4,0x0b2b8630,0xad35,0x11d0,0x8e,0xa6,0x00,0x60,0x97,0x97,0xea,0x5b);
-DEFINE_GUID(IID_IDirectDrawSurface7,0x06675a80,0x3b9b,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b);
-DEFINE_GUID(IID_IDirectDrawSurfaceKernel,0x60755da0,0x6a40,0x11d0,0x9b,0x06,0x00,0xa0,0xc9,0x03,0xa3,0xb8);
-DEFINE_GUID(IID_IDirectDrawVideo,0x36d39eb0,0xdd75,0x11ce,0xbf,0x0e,0x00,0xaa,0x00,0x55,0x59,0x5a);
-DEFINE_GUID(IID_IDirectShowStream,0x7db01c96,0xc0c3,0x11d0,0x8f,0xf1,0x00,0xc0,0x4f,0xd9,0x18,0x9d);
-DEFINE_GUID(IID_IDistributorNotify,0x56a868af,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IDrawVideoImage,0x48efb120,0xab49,0x11d2,0xae,0xd2,0x00,0xa0,0xc9,0x95,0xe8,0xd5);
-DEFINE_GUID(IID_IDTFilter,0xc4c4c4b2,0x49,0x4e2b,0x98,0xfb,0x95,0x37,0xf6,0xce,0x51,0x6d);
-DEFINE_GUID(IID_IDTFilterConfig,0xc4c4c4d2,0x49,0x4e2b,0x98,0xfb,0x95,0x37,0xf6,0xce,0x51,0x6d);
-DEFINE_GUID(IID_IDVBCLocator,0x6e42f36e,0x1dd2,0x43c4,0x9f,0x78,0x69,0xd2,0x5a,0xe3,0x90,0x34);
-DEFINE_GUID(IID_IDVBSLocator,0x3d7c353c,0x0d04,0x45f1,0xa7,0x42,0xf9,0x7c,0xc1,0x18,0x8d,0xc8);
-DEFINE_GUID(IID_IDVBSTuningSpace,0xcdf7be60,0xd954,0x42fd,0xa9,0x72,0x78,0x97,0x19,0x58,0xe4,0x70);
-DEFINE_GUID(IID_IDVBTLocator,0x8664da16,0xdda2,0x42ac,0x92,0x6a,0xc1,0x8f,0x91,0x27,0xc3,0x02);
-DEFINE_GUID(IID_IDVBTuneRequest,0x0d6f567e,0xa636,0x42bb,0x83,0xba,0xce,0x4c,0x17,0x04,0xaf,0xa2);
-DEFINE_GUID(IID_IDVBTuningSpace,0xada0b268,0x3b19,0x4e5b,0xac,0xc4,0x49,0xf8,0x52,0xbe,0x13,0xba);
-DEFINE_GUID(IID_IDVBTuningSpace2,0x843188b4,0xce62,0x43db,0x96,0x6b,0x81,0x45,0xa0,0x94,0xe0,0x40);
-DEFINE_GUID(IID_IDvdCmd,0x5a4a97e4,0x94ee,0x4a55,0x97,0x51,0x74,0xb5,0x64,0x3a,0xa2,0x7d);
-DEFINE_GUID(IID_IDvdControl,0xa70efe61,0xe2a3,0x11d0,0xa9,0xbe,0x00,0xaa,0x00,0x61,0xbe,0x93);
-DEFINE_GUID(IID_IDvdControl2,0x33bc7430,0xeec0,0x11d2,0x82,0x01,0x00,0xa0,0xc9,0xd7,0x48,0x42);
-DEFINE_GUID(IID_IDvdGraphBuilder,0xfcc152b6,0xf372,0x11d0,0x8e,0x00,0x00,0xc0,0x4f,0xd7,0xc0,0x8b);
-DEFINE_GUID(IID_IDvdInfo,0xa70efe60,0xe2a3,0x11d0,0xa9,0xbe,0x00,0xaa,0x00,0x61,0xbe,0x93);
-DEFINE_GUID(IID_IDvdInfo2,0x34151510,0xeec0,0x11d2,0x82,0x01,0x00,0xa0,0xc9,0xd7,0x48,0x42);
-DEFINE_GUID(IID_IDvdState,0x86303d6d,0x1c4a,0x4087,0xab,0x42,0xf7,0x11,0x16,0x70,0x48,0xef);
-DEFINE_GUID(IID_IDVEnc,0xd18e17a0,0xaacb,0x11d0,0xaf,0xb0,0x00,0xaa,0x00,0xb6,0x7a,0x42);
-DEFINE_GUID(IID_IDVRGB219,0x58473a19,0x2bc8,0x4663,0x80,0x12,0x25,0xf8,0x1b,0xab,0xdd,0xd1);
-DEFINE_GUID(IID_IDVSplitter,0x92a3a302,0xda7c,0x4a1f,0xba,0x7e,0x18,0x02,0xbb,0x5d,0x2d,0x02);
-DEFINE_GUID(IID_IDxtAlphaSetter,0x4ee9ead9,0xda4d,0x43d0,0x93,0x83,0x06,0xb9,0x0c,0x08,0xb1,0x2b);
-DEFINE_GUID(IID_IDxtCompositor,0xbb44391e,0x6abd,0x422f,0x9e,0x2e,0x38,0x5c,0x9d,0xff,0x51,0xfc);
-DEFINE_GUID(IID_IDxtJpeg,0xde75d011,0x7a65,0x11d2,0x8c,0xea,0x00,0xa0,0xc9,0x44,0x1e,0x20);
-DEFINE_GUID(IID_IDxtKey,0x3255de56,0x38fb,0x4901,0xb9,0x80,0x94,0xb4,0x38,0x01,0x0d,0x7b);
-DEFINE_GUID(IID_IEncoderAPI,0x70423839,0x6acc,0x4b23,0xb0,0x79,0x21,0xdb,0xf0,0x81,0x56,0xa5);
-DEFINE_GUID(IID_IEnumComponents,0x2a6e2939,0x2595,0x11d3,0xb6,0x4c,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IEnumComponentTypes,0x8a674b4a,0x1f63,0x11d3,0xb6,0x4c,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IEnumFilters,0x56a86893,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IEnumGuideDataProperties,0xae44423b,0x4571,0x475c,0xad,0x2c,0xf4,0xa,0x77,0x1d,0x80,0xef);
-DEFINE_GUID(IID_IEnumMediaTypes,0x89c31040,0x846b,0x11ce,0x97,0xd3,0x00,0xaa,0x00,0x55,0x59,0x5a);
-DEFINE_GUID(IID_IEnumMSVidGraphSegment,0x3dd2903e,0xe0aa,0x11d2,0xb6,0x3a,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IEnumPIDMap,0xafb6c2a2,0x2c41,0x11d3,0x8a,0x60,0x00,0x00,0xf8,0x1e,0x0e,0x4a);
-DEFINE_GUID(IID_IEnumPins,0x56a86892,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IEnumRegFilters,0x56a868a4,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IEnumStreamBufferRecordingAttrib,0xc18a9162,0x1e82,0x4142,0x8c,0x73,0x56,0x90,0xfa,0x62,0xfe,0x33);
-DEFINE_GUID(IID_IEnumStreamIdMap,0x945c1566,0x6202,0x46fc,0x96,0xc7,0xd8,0x7f,0x28,0x9c,0x65,0x34);
-DEFINE_GUID(IID_IEnumTuneRequests,0x1993299c,0xced6,0x4788,0x87,0xa3,0x42,0,0x67,0xdc,0xe0,0xc7);
-DEFINE_GUID(IID_IEnumTuningSpaces,0x8b8eb248,0xfc2b,0x11d2,0x9d,0x8c,0x00,0xc0,0x4f,0x72,0xd9,0x80);
-DEFINE_GUID(IID_IETFilter,0xc4c4c4b1,0x49,0x4e2b,0x98,0xfb,0x95,0x37,0xf6,0xce,0x51,0x6d);
-DEFINE_GUID(IID_IETFilterConfig,0xc4c4c4d1,0x49,0x4e2b,0x98,0xfb,0x95,0x37,0xf6,0xce,0x51,0x6d);
-DEFINE_GUID(IID_IEvalRat,0xc5c5c5b1,0x3abc,0x11d6,0xb2,0x5b,0,0xc0,0x4f,0xa0,0xc0,0x26);
-DEFINE_GUID(IID_IFileSinkFilter,0xa2104830,0x7c70,0x11cf,0x8b,0xce,0x00,0xaa,0x00,0xa3,0xf1,0xa6);
-DEFINE_GUID(IID_IFileSinkFilter2,0x00855b90,0xce1b,0x11d0,0xbd,0x4f,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(IID_IFileSourceFilter,0x56a868a6,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IFilterGraph,0x56a8689f,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IFilterGraph2,0x36b73882,0xc2c8,0x11cf,0x8b,0x46,0x00,0x80,0x5f,0x6c,0xef,0x60);
-DEFINE_GUID(IID_IFilterChain,0xdcfbdcf6,0x0dc2,0x45f5,0x9a,0xb2,0x7c,0x33,0x0e,0xa0,0x9c,0x29);
-DEFINE_GUID(IID_IFilterInfo,0x56a868ba,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IFilterMapper,0x56a868a3,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IFilterMapper2,0xb79bb0b0,0x33c1,0x11d1,0xab,0xe1,0x00,0xa0,0xc9,0x05,0xf3,0x75);
-DEFINE_GUID(IID_IFilterMapper3,0xb79bb0b1,0x33c1,0x11d1,0xab,0xe1,0x00,0xa0,0xc9,0x05,0xf3,0x75);
-DEFINE_GUID(IID_IFindCompressorCB,0xf03fa8de,0x879a,0x4d59,0x9b,0x2c,0x26,0xbb,0x1c,0xf8,0x34,0x61);
-DEFINE_GUID(IID_IFrequencyMap,0x6fb45c1,0x693c,0x4ea7,0xb7,0x9f,0x7a,0x6a,0x54,0xd8,0xde,0xf2);
-DEFINE_GUID(IID_IFullScreenVideo,0xdd1d7110,0x7836,0x11cf,0xbf,0x47,0x00,0xaa,0x00,0x55,0x59,0x5a);
-DEFINE_GUID(IID_IFullScreenVideoEx,0x53479470,0xf1dd,0x11cf,0xbc,0x42,0x00,0xaa,0x00,0xac,0x74,0xf6);
-DEFINE_GUID(IID_IGetCapabilitiesKey,0xa8809222,0x7bb,0x48ea,0x95,0x1c,0x33,0x15,0x81,0,0x62,0x5b);
-DEFINE_GUID(IID_IGraphBuilder,0x56a868a9,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IGraphConfig,0x03a1eb8e,0x32bf,0x4245,0x85,0x02,0x11,0x4d,0x08,0xa9,0xcb,0x88);
-DEFINE_GUID(IID_IGraphConfigCallback,0xade0fd60,0xd19d,0x11d2,0xab,0xf6,0x00,0xa0,0xc9,0x05,0xf3,0x75);
-DEFINE_GUID(IID_IGraphVersion,0x56a868ab,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IGrfCache,0xae9472be,0xb0c3,0x11d2,0x8d,0x24,0x00,0xa0,0xc9,0x44,0x1e,0x20);
-DEFINE_GUID(IID_IGuideData,0x61571138,0x5b01,0x43cd,0xae,0xaf,0x60,0xb7,0x84,0xa0,0xbf,0x93);
-DEFINE_GUID(IID_IGuideDataEvent,0xefda0c80,0xf395,0x42c3,0x9b,0x3c,0x56,0xb3,0x7d,0xec,0x7b,0xb7);
-DEFINE_GUID(IID_IGuideDataLoader,0x4764ff7c,0xfa95,0x4525,0xaf,0x4d,0xd3,0x22,0x36,0xdb,0x9e,0x38);
-DEFINE_GUID(IID_IGuideDataProperty,0x88ec5e58,0xbb73,0x41d6,0x99,0xce,0x66,0xc5,0x24,0xb8,0xb5,0x91);
-DEFINE_GUID(IID_IChannelTuneRequest,0x0369b4e0,0x45b6,0x11d3,0xb6,0x50,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IIPDVDec,0xb8e8bd60,0x0bfe,0x11d0,0xaf,0x91,0x00,0xaa,0x00,0xb6,0x7a,0x42);
-DEFINE_GUID(IID_IKsControl,0x28f54685,0x06fd,0x11d2,0xb2,0x7a,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(IID_IKsDataTypeHandler,0x5ffbaa02,0x49a3,0x11d0,0x9f,0x36,0x00,0xaa,0x00,0xa2,0x16,0xa1);
-DEFINE_GUID(IID_IKsInterfaceHandler,0xd3abc7e0,0x9a61,0x11d0,0xa4,0x0d,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(IID_IKsPin,0xb61178d1,0xa2d9,0x11cf,0x9e,0x53,0x00,0xaa,0x00,0xa2,0x16,0xa1);
-DEFINE_GUID(IID_IKsPinFactory,0xcd5ebe6b,0x8b6e,0x11d1,0x8a,0xe0,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(IID_IKsPropertySet,0x31efac30,0x515c,0x11d0,0xa9,0xaa,0x0,0xaa,0x0,0x61,0xbe,0x93);
-DEFINE_GUID(IID_ILanguageComponentType,0xb874c8ba,0x0fa2,0x11d3,0x9d,0x8e,0x00,0xc0,0x4f,0x72,0xd9,0x80);
-DEFINE_GUID(IID_ILocator,0x286d7f89,0x760c,0x4f89,0x80,0xc4,0x66,0x84,0x1d,0x25,0x07,0xaa);
-DEFINE_GUID(IID_IMediaControl,0x56a868b1,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IMediaDet,0x65bd0710,0x24d2,0x4ff7,0x93,0x24,0xed,0x2e,0x5d,0x3a,0xba,0xfa);
-DEFINE_GUID(IID_IMediaEvent,0x56a868b6,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IMediaEventEx,0x56a868c0,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IMediaEventSink,0x56a868a2,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IMediaFilter,0x56a86899,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IMediaLocator,0x288581e0,0x66ce,0x11d2,0x91,0x8f,0x00,0xc0,0xdf,0x10,0xd4,0x34);
-DEFINE_GUID(IID_IMediaPosition,0x56a868b2,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IMediaPropertyBag,0x6025a880,0xc0d5,0x11d0,0xbd,0x4e,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(IID_IMediaSample,0x56a8689a,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IMediaSample2,0x36b73884,0xc2c8,0x11cf,0x8b,0x46,0x00,0x80,0x5f,0x6c,0xef,0x60);
-DEFINE_GUID(IID_IMediaSeeking,0x36b73880,0xc2c8,0x11cf,0x8b,0x46,0x00,0x80,0x5f,0x6c,0xef,0x60);
-DEFINE_GUID(IID_IMediaStream,0xb502d1bd,0x9a57,0x11d0,0x8f,0xde,0x00,0xc0,0x4f,0xd9,0x18,0x9d);
-DEFINE_GUID(IID_IMediaStreamFilter,0xbebe595e,0x9a6f,0x11d0,0x8f,0xde,0x00,0xc0,0x4f,0xd9,0x18,0x9d);
-DEFINE_GUID(IID_IMediaTypeInfo,0x56a868bc,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IMemAllocator,0x56a8689c,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IMemAllocatorCallbackTemp,0x379a0cf0,0xc1de,0x11d2,0xab,0xf5,0x00,0xa0,0xc9,0x05,0xf3,0x75);
-DEFINE_GUID(IID_IMemAllocatorNotifyCallbackTemp,0x92980b30,0xc1de,0x11d2,0xab,0xf5,0x00,0xa0,0xc9,0x05,0xf3,0x75);
-DEFINE_GUID(IID_IMemInputPin,0x56a8689d,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IMemoryData,0x327fc560,0xaf60,0x11d0,0x82,0x12,0x00,0xc0,0x4f,0xc3,0x2c,0x45);
-DEFINE_GUID(IID_IMixerOCX,0x81a3bd32,0xdee1,0x11d1,0x85,0x8,0,0xa0,0xc9,0x1f,0x9c,0xa0);
-DEFINE_GUID(IID_IMixerOCXNotify,0x81a3bd31,0xdee1,0x11d1,0x85,0x8,0,0xa0,0xc9,0x1f,0x9c,0xa0);
-DEFINE_GUID(IID_IMixerPinConfig,0x593cdde1,0x0759,0x11d1,0x9e,0x69,0x00,0xc0,0x4f,0xd7,0xc1,0x5b);
-DEFINE_GUID(IID_IMixerPinConfig2,0xebf47182,0x8764,0x11d1,0x9e,0x69,0x00,0xc0,0x4f,0xd7,0xc1,0x5b);
-DEFINE_GUID(IID_IMPEG2_TIF_CONTROL,0xf9bac2f9,0x4149,0x4916,0xb2,0xef,0xfa,0xa2,0x2,0x32,0x68,0x62);
-DEFINE_GUID(IID_IMPEG2Component,0x1493e353,0x1eb6,0x473c,0x80,0x2d,0x8e,0x6b,0x8e,0xc9,0xd2,0xa9);
-DEFINE_GUID(IID_IMPEG2ComponentType,0x2c073d84,0xb51c,0x48c9,0xaa,0x9f,0x68,0x97,0x1e,0x1f,0x6e,0x38);
-DEFINE_GUID(IID_IMpeg2Demultiplexer,0x436eee9c,0x264f,0x4242,0x90,0xe1,0x4e,0x33,0x0c,0x10,0x75,0x12);
-DEFINE_GUID(IID_IMPEG2PIDMap,0xafb6c2a1,0x2c41,0x11d3,0x8a,0x60,0x00,0x00,0xf8,0x1e,0x0e,0x4a);
-DEFINE_GUID(IID_IMPEG2StreamIdMap,0xd0e04c47,0x25b8,0x4369,0x92,0x5a,0x36,0x2a,0x01,0xd9,0x54,0x44);
-DEFINE_GUID(IID_IMPEG2TuneRequest,0xeb7d987f,0x8a01,0x42ad,0xb8,0xae,0x57,0x4d,0xee,0xe4,0x4d,0x1a);
-DEFINE_GUID(IID_IMPEG2TuneRequestFactory,0x14e11abd,0xee37,0x4893,0x9e,0xa1,0x69,0x64,0xde,0x93,0x3e,0x39);
-DEFINE_GUID(IID_IMPEG2TuneRequestSupport,0x1b9d5fc3,0x5bbc,0x4b6c,0xbb,0x18,0xb9,0xd1,0x0e,0x3e,0xee,0xbf);
-DEFINE_GUID(IID_IMpegAudioDecoder,0xb45dd570,0x3c77,0x11d1,0xab,0xe1,0x00,0xa0,0xc9,0x05,0xf3,0x75);
-DEFINE_GUID(IID_IMSEventBinder,0xc3a9f406,0x2222,0x436d,0x86,0xd5,0xba,0x32,0x29,0x27,0x9e,0xfb);
-DEFINE_GUID(IID_IMSVidAnalogTuner,0x1c15d47e,0x911d,0x11d2,0xb6,0x32,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidAnalogTunerEvent,0x1c15d486,0x911d,0x11d2,0xb6,0x32,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidAudioRenderer,0x37b0353f,0xa4c8,0x11d2,0xb6,0x34,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidAudioRendererDevices,0xc5702cd4,0x9b79,0x11d3,0xb6,0x54,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidAudioRendererEvent,0x37b03541,0xa4c8,0x11d2,0xb6,0x34,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidCAGSeg,0x1600d101,0x6666,0x4f66,0xb1,0xe2,0xbf,0x3c,0x9f,0xbb,0x9b,0xa6);
-DEFINE_GUID(IID_IMSVidClosedCaptioning,0x99652ea1,0xc1f7,0x414f,0xbb,0x7b,0x1c,0x96,0x7d,0xe7,0x59,0x83);
-DEFINE_GUID(IID_IMSVidClosedCaptioning2,0xe00cb864,0xa029,0x4310,0x99,0x87,0xa8,0x73,0xf5,0x88,0x7d,0x97);
-DEFINE_GUID(IID_IMSVidCompositionSegment,0x1c15d483,0x911d,0x11d2,0xb6,0x32,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidCtl,0xb0edf162,0x910a,0x11d2,0xb6,0x32,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidDataServices,0x334125c1,0x77e5,0x11d3,0xb6,0x53,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidDataServicesEvent,0x334125c2,0x77e5,0x11d3,0xb6,0x53,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidDevice,0x1c15d47c,0x911d,0x11d2,0xb6,0x32,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidDeviceEvent,0x1c15d480,0x911d,0x11d2,0xb6,0x32,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidEncoder,0xc0020fd4,0xbee7,0x43d9,0xa4,0x95,0x9f,0x21,0x31,0x17,0x10,0x3d);
-DEFINE_GUID(IID_IMSVidFeature,0x37b03547,0xa4c8,0x11d2,0xb6,0x34,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidFeatureEvent,0x3dd2903c,0xe0aa,0x11d2,0xb6,0x3a,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidFeatures,0xc5702cd5,0x9b79,0x11d3,0xb6,0x54,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidFilePlayback,0x37b03539,0xa4c8,0x11d2,0xb6,0x34,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidFilePlaybackEvent,0x37b0353a,0xa4c8,0x11d2,0xb6,0x34,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidGraphSegment,0x1c15d482,0x911d,0x11d2,0xb6,0x32,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidGraphSegmentContainer,0x3dd2903d,0xe0aa,0x11d2,0xb6,0x3a,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidGraphSegmentUserInput,0x301c060e,0x20d9,0x4587,0x9b,0x03,0xf8,0x2e,0xd9,0xa9,0x94,0x3c);
-DEFINE_GUID(IID_IMSVidInputDevice,0x37b0353d,0xa4c8,0x11d2,0xb6,0x34,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidInputDeviceEvent,0x37b0353e,0xa4c8,0x11d2,0xb6,0x34,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidInputDevices,0xc5702cd1,0x9b79,0x11d3,0xb6,0x54,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidOutputDevice,0x37b03546,0xa4c8,0x11d2,0xb6,0x34,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidOutputDeviceEvent,0x2e6a14e2,0x571c,0x11d3,0xb6,0x52,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidOutputDevices,0xc5702cd2,0x9b79,0x11d3,0xb6,0x54,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidPlayback,0x37b03538,0xa4c8,0x11d2,0xb6,0x34,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidPlaybackEvent,0x37b0353b,0xa4c8,0x11d2,0xb6,0x34,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidRect,0x7f5000a6,0xa440,0x47ca,0x8a,0xcc,0xc0,0xe7,0x55,0x31,0xa2,0xc2);
-DEFINE_GUID(IID_IMSVidStreamBufferRecordingControl,0x160621aa,0xbbbc,0x4326,0xa8,0x24,0xc3,0x95,0xae,0xbc,0x6e,0x74);
-DEFINE_GUID(IID_IMSVidStreamBufferSink,0x159dbb45,0xcd1b,0x4dab,0x83,0xea,0x5c,0xb1,0xf4,0xf2,0x1d,0x7);
-DEFINE_GUID(IID_IMSVidStreamBufferSinkEvent,0xf798a36b,0xb05b,0x4bbe,0x97,0x3,0xea,0xea,0x7d,0x61,0xcd,0x51);
-DEFINE_GUID(IID_IMSVidStreamBufferSource,0xeb0c8cf9,0x6950,0x4772,0x87,0xb1,0x47,0xd1,0x1c,0xf3,0xa0,0x2f);
-DEFINE_GUID(IID_IMSVidStreamBufferSourceEvent,0x50ce8a7d,0x9c28,0x4da8,0x90,0x42,0xcd,0xfa,0x71,0x16,0xf9,0x79);
-DEFINE_GUID(IID_IMSVidTuner,0x1c15d47d,0x911d,0x11d2,0xb6,0x32,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidTunerEvent,0x1c15d485,0x911d,0x11d2,0xb6,0x32,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidTVEGSeg,0x1600d001,0x6666,0x4f66,0xb1,0xe2,0xbf,0x3c,0x9f,0xbb,0x9b,0xa6);
-DEFINE_GUID(IID_IMSVidVideoInputDevice,0x1c15d47f,0x911d,0x11d2,0xb6,0x32,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidVideoRenderer,0x37b03540,0xa4c8,0x11d2,0xb6,0x34,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidVideoRenderer2,0x6bdd5c1e,0x2810,0x4159,0x94,0xbc,0x5,0x51,0x1a,0xe8,0x54,0x9b);
-DEFINE_GUID(IID_IMSVidVideoRendererDevices,0xc5702cd3,0x9b79,0x11d3,0xb6,0x54,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidVideoRendererEvent,0x37b03545,0xa4c8,0x11d2,0xb6,0x34,0x00,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(IID_IMSVidVideoRendererEvent2,0x7145ed66,0x4730,0x4fdb,0x8a,0x53,0xfd,0xe7,0x50,0x8d,0x3e,0x5e);
-DEFINE_GUID(IID_IMSVidVRGraphSegment,0xdd47de3f,0x9874,0x4f7b,0x8b,0x22,0x7c,0xb2,0x68,0x84,0x61,0xe7);
-DEFINE_GUID(IID_IMSVidWebDVD,0xcf45f88b,0xac56,0x4ee2,0xa7,0x3a,0xed,0x04,0xe2,0x88,0x5d,0x3c);
-DEFINE_GUID(IID_IMSVidWebDVDAdm,0xb8be681a,0xeb2c,0x47f0,0xb4,0x15,0x94,0xd5,0x45,0x2f,0x0e,0x05);
-DEFINE_GUID(IID_IMSVidWebDVDEvent,0xb4f7a674,0x9b83,0x49cb,0xa3,0x57,0xc6,0x3b,0x87,0x1b,0xe9,0x58);
-DEFINE_GUID(IID_IMSVidXDS,0x11ebc158,0xe712,0x4d1f,0x8b,0xb3,0x1,0xed,0x52,0x74,0xc4,0xce);
-DEFINE_GUID(IID_IMultiMediaStream,0xb502d1bc,0x9a57,0x11d0,0x8f,0xde,0x00,0xc0,0x4f,0xd9,0x18,0x9d);
-DEFINE_GUID(IID_IOverlay,0x56a868a1,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IOverlayNotify,0x56a868a0,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IOverlayNotify2,0x680efa10,0xd535,0x11d1,0x87,0xc8,0x00,0xa0,0xc9,0x22,0x31,0x96);
-DEFINE_GUID(IID_IPersistMediaPropertyBag,0x5738e040,0xb67f,0x11d0,0xbd,0x4d,0x00,0xa0,0xc9,0x11,0xce,0x86);
-DEFINE_GUID(IID_IPin,0x56a86891,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IPinConnection,0x4a9a62d3,0x27d4,0x403d,0x91,0xe9,0x89,0xf5,0x40,0xe5,0x55,0x34);
-DEFINE_GUID(IID_IPinFlowControl,0xc56e9858,0xdbf3,0x4f6b,0x81,0x19,0x38,0x4a,0xf2,0x06,0x0d,0xeb);
-DEFINE_GUID(IID_IPinInfo,0x56a868bd,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IPropertySetter,0xae9472bd,0xb0c3,0x11d2,0x8d,0x24,0x00,0xa0,0xc9,0x44,0x1e,0x20);
-DEFINE_GUID(IID_IQualityControl,0x56a868a5,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IQualProp,0x1bd0ecb0,0xf8e2,0x11ce,0xaa,0xc6,0x00,0x20,0xaf,0x0b,0x99,0xa3);
-DEFINE_GUID(IID_IQueueCommand,0x56a868b7,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IReferenceClock,0x56a86897,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IReferenceClock2,0x36b73885,0xc2c8,0x11cf,0x8b,0x46,0x00,0x80,0x5f,0x6c,0xef,0x60);
-DEFINE_GUID(IID_IRegFilterInfo,0x56a868bb,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IRegisterServiceProvider,0x7b3a2f01,0x0751,0x48dd,0xb5,0x56,0x00,0x47,0x85,0x17,0x1c,0x54);
-DEFINE_GUID(IID_IRenderEngine,0x6bee3a81,0x66c9,0x11d2,0x91,0x8f,0x00,0xc0,0xdf,0x10,0xd4,0x34);
-DEFINE_GUID(IID_IRenderEngine2,0x6bee3a82,0x66c9,0x11d2,0x91,0x8f,0,0xc0,0xdf,0x10,0xd4,0x34);
-DEFINE_GUID(IID_IResize,0x4ada63a0,0x72d5,0x11d2,0x95,0x2a,0,0x60,0x8,0x18,0x40,0xbc);
-DEFINE_GUID(IID_IResourceConsumer,0x56a868ad,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IResourceManager,0x56a868ac,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_ISampleGrabber,0x6b652fff,0x11fe,0x4fce,0x92,0xad,0x02,0x66,0xb5,0xd7,0xc7,0x8f);
-DEFINE_GUID(IID_ISampleGrabberCB,0x0579154a,0x2b53,0x4994,0xb0,0xd0,0xe7,0x73,0x14,0x8e,0xff,0x85);
-DEFINE_GUID(IID_IScanningTuner,0x1dfd0a5c,0x0284,0x11d3,0x9d,0x8e,0x00,0xc0,0x4f,0x72,0xd9,0x80);
-DEFINE_GUID(IID_ISeekingPassThru,0x36b73883,0xc2c8,0x11cf,0x8b,0x46,0x00,0x80,0x5f,0x6c,0xef,0x60);
-DEFINE_GUID(IID_ISignalEvents,0x85e2439e,0x0e23,0x11d3,0x9d,0x8e,0x00,0xc0,0x4f,0x72,0xd9,0x80);
-DEFINE_GUID(IID_ISmartRenderEngine,0xf03fa8ce,0x879a,0x4d59,0x9b,0x2c,0x26,0xbb,0x1c,0xf8,0x34,0x61);
-DEFINE_GUID(IID_IStreamBufferConfigure,0xce14dfae,0x4098,0x4af7,0xbb,0xf7,0xd6,0x51,0x1f,0x83,0x54,0x14);
-DEFINE_GUID(IID_IStreamBufferInitialize,0x9ce50f2d,0x6ba7,0x40fb,0xa0,0x34,0x50,0xb1,0xa6,0x74,0xec,0x78);
-DEFINE_GUID(IID_IStreamBufferMediaSeeking,0xf61f5c26,0x863d,0x4afa,0xb0,0xba,0x2f,0x81,0xdc,0x97,0x85,0x96);
-DEFINE_GUID(IID_IStreamBufferRecComp,0x9e259a9b,0x8815,0x42ae,0xb0,0x9f,0x22,0x19,0x70,0xb1,0x54,0xfd);
-DEFINE_GUID(IID_IStreamBufferRecordControl,0xba9b6c99,0xf3c7,0x4ff2,0x92,0xdb,0xcf,0xdd,0x48,0x51,0xbf,0x31);
-DEFINE_GUID(IID_IStreamBufferRecordingAttribute,0x16ca4e03,0xfe69,0x4705,0xbd,0x41,0x5b,0x7d,0xfc,0xc,0x95,0xf3);
-DEFINE_GUID(IID_IStreamBufferSink,0xafd1f242,0x7efd,0x45ee,0xba,0x4e,0x40,0x7a,0x25,0xc9,0xa7,0x7a);
-DEFINE_GUID(IID_IStreamBufferSource,0x1c5bd776,0x6ced,0x4f44,0x81,0x64,0x5e,0xab,0xe,0x98,0xdb,0x12);
-DEFINE_GUID(IID_IStreamBuilder,0x56a868bf,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IStreamSample,0xb502d1be,0x9a57,0x11d0,0x8f,0xde,0x00,0xc0,0x4f,0xd9,0x18,0x9d);
-DEFINE_GUID(IID_ITuner,0x28c52640,0x018a,0x11d3,0x9d,0x8e,0x00,0xc0,0x4f,0x72,0xd9,0x80);
-DEFINE_GUID(IID_ITuneRequest,0x07ddc146,0xfc3d,0x11d2,0x9d,0x8c,0x00,0xc0,0x4f,0x72,0xd9,0x80);
-DEFINE_GUID(IID_ITuneRequestInfo,0xa3b152df,0x7a90,0x4218,0xac,0x54,0x98,0x30,0xbe,0xe8,0xc0,0xb6);
-DEFINE_GUID(IID_ITunerEvents,0x68481420,0x0280,0x11d3,0x9d,0x8e,0x00,0xc0,0x4f,0x72,0xd9,0x80);
-DEFINE_GUID(IID_ITuningSpace,0x061c6e30,0xe622,0x11d2,0x94,0x93,0x00,0xc0,0x4f,0x72,0xd9,0x80);
-DEFINE_GUID(IID_ITuningSpaceContainer,0x5b692e84,0xe2f1,0x11d2,0x94,0x93,0x00,0xc0,0x4f,0x72,0xd9,0x80);
-DEFINE_GUID(IID_ITuningSpaces,0x901284e4,0x33fe,0x4b69,0x8d,0x63,0x63,0x4a,0x59,0x6f,0x37,0x56);
-DEFINE_GUID(IID_ITVEAttrMap,0x05500121,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVEAttrTimeQ,0x05500122,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVECBAnnc,0x05500141,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVECBDummy,0x05500144,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVECBFile,0x05500143,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVECBTrig,0x05500142,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVEEnhancement,0x05500104,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVEEnhancement_Helper,0x05500204,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVEEnhancements,0x05500114,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVEFeature,0x05500305,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVEFile,0x05500151,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVEFilter,0x05500180,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVEFilter_Helper,0x05500280,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVEMCast,0x05500130,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVEMCastCallback,0x05500133,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVEMCastManager,0x05500132,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVEMCastManager_Helper,0x05500232,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVEMCasts,0x05500131,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVENavAid,0x05500160,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVENavAid_Helper,0x05500260,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVENavAid_NoVidCtl,0x05500360,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVEService,0x05500105,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVEService_Helper,0x05500205,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVEServices,0x05500115,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVESupervisor,0x05500106,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVESupervisor_Helper,0x05500206,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVESupervisorGITProxy,0x05500306,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVETrack,0x05500102,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVETrack_Helper,0x05500202,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVETracks,0x05500112,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVETrigger,0x05500101,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVETrigger_Helper,0x05500201,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVETriggerCtrl,0x05500190,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVETriggerCtrl_Helper,0x05500191,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVEVariation,0x05500103,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVEVariation_Helper,0x05500203,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_ITVEVariations,0x05500113,0xfaa5,0x4df9,0x82,0x46,0xbf,0xc2,0x3a,0xc5,0xce,0xa8);
-DEFINE_GUID(IID_IVideoEncoder,0x2997c3b,0x8e1b,0x460e,0x92,0x70,0x54,0x5e,0xd,0xe9,0x56,0x3e);
-DEFINE_GUID(IID_IVideoFrameStep,0xe46a9787,0x2b71,0x444d,0xa4,0xb5,0x1f,0xab,0x7b,0x70,0x8d,0x6a);
-DEFINE_GUID(IID_IVideoWindow,0x56a868b4,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(IID_IVMRAspectRatioControl,0xede80b5c,0xbad6,0x4623,0xb5,0x37,0x65,0x58,0x6c,0x9f,0x8d,0xfd);
-DEFINE_GUID(IID_IVMRAspectRatioControl9,0xd96c29,0xbbde,0x4efc,0x99,0x1,0xbb,0x50,0x36,0x39,0x21,0x46);
-DEFINE_GUID(IID_IVMRDeinterlaceControl,0xbb057577,0xdb8,0x4e6a,0x87,0xa7,0x1a,0x8c,0x9a,0x50,0x5a,0xf);
-DEFINE_GUID(IID_IVMRDeinterlaceControl9,0xa215fb8d,0x13c2,0x4f7f,0x99,0x3c,0,0x3d,0x62,0x71,0xa4,0x59);
-DEFINE_GUID(IID_IVMRFilterConfig,0x9e5530c5,0x7034,0x48b4,0xbb,0x46,0x0b,0x8a,0x6e,0xfc,0x8e,0x36);
-DEFINE_GUID(IID_IVMRFilterConfig9,0x5a804648,0x4f66,0x4867,0x9c,0x43,0x4f,0x5c,0x82,0x2c,0xf1,0xb8);
-DEFINE_GUID(IID_IVMRImageCompositor,0x7a4fb5af,0x479f,0x4074,0xbb,0x40,0xce,0x67,0x22,0xe4,0x3c,0x82);
-DEFINE_GUID(IID_IVMRImageCompositor9,0x4a5c89eb,0xdf51,0x4654,0xac,0x2a,0xe4,0x8e,0x2,0xbb,0xab,0xf6);
-DEFINE_GUID(IID_IVMRImagePresenter,0xce704fe7,0xe71e,0x41fb,0xba,0xa2,0xc4,0x40,0x3e,0x11,0x82,0xf5);
-DEFINE_GUID(IID_IVMRImagePresenter9,0x69188c61,0x12a3,0x40f0,0x8f,0xfc,0x34,0x2e,0x7b,0x43,0x3f,0xd7);
-DEFINE_GUID(IID_IVMRImagePresenterConfig,0x9f3a1c85,0x8555,0x49ba,0x93,0x5f,0xbe,0x5b,0x5b,0x29,0xd1,0x78);
-DEFINE_GUID(IID_IVMRImagePresenterConfig9,0x45c15cab,0x6e22,0x420a,0x80,0x43,0xae,0x1f,0xa,0xc0,0x2c,0x7d);
-DEFINE_GUID(IID_IVMRImagePresenterExclModeConfig,0xe6f7ce40,0x4673,0x44f1,0x8f,0x77,0x54,0x99,0xd6,0x8c,0xb4,0xea);
-DEFINE_GUID(IID_IVMRMixerBitmap,0x1e673275,0x0257,0x40aa,0xaf,0x20,0x7c,0x60,0x8d,0x4a,0x04,0x28);
-DEFINE_GUID(IID_IVMRMixerBitmap9,0xced175e5,0x1935,0x4820,0x81,0xbd,0xff,0x6a,0xd0,0xc,0x91,0x8);
-DEFINE_GUID(IID_IVMRMixerControl,0x1c1a17b0,0xbed0,0x415d,0x97,0x4b,0xdc,0x66,0x96,0x13,0x15,0x99);
-DEFINE_GUID(IID_IVMRMixerControl9,0x1a777eaa,0x47c8,0x4930,0xb2,0xc9,0x8f,0xee,0x1c,0x1b,0xf,0x3b);
-DEFINE_GUID(IID_IVMRMonitorConfig,0x9cf0b1b6,0xfbaa,0x4b7f,0x88,0xcf,0xcf,0x1f,0x13,0x0a,0x0d,0xce);
-DEFINE_GUID(IID_IVMRMonitorConfig9,0x46c2e457,0x8ba0,0x4eef,0xb8,0xb,0x6,0x80,0xf0,0x97,0x87,0x49);
-DEFINE_GUID(IID_IVMRSurface,0xa9849bbe,0x9ec8,0x4263,0xb7,0x64,0x62,0x73,0x0f,0x0d,0x15,0xd0);
-DEFINE_GUID(IID_IVMRSurface9,0xdfc581a1,0x6e1f,0x4c3a,0x8d,0xa,0x5e,0x97,0x92,0xea,0x2a,0xfc);
-DEFINE_GUID(IID_IVMRSurfaceAllocator,0x31ce832e,0x4484,0x458b,0x8c,0xca,0xf4,0xd7,0xe3,0xdb,0x0b,0x52);
-DEFINE_GUID(IID_IVMRSurfaceAllocator9,0x8d5148ea,0x3f5d,0x46cf,0x9d,0xf1,0xd1,0xb8,0x96,0xee,0xdb,0x1f);
-DEFINE_GUID(IID_IVMRSurfaceAllocatorNotify,0xaada05a8,0x5a4e,0x4729,0xaf,0x0b,0xce,0xa2,0x7a,0xed,0x51,0xe2);
-DEFINE_GUID(IID_IVMRSurfaceAllocatorNotify9,0xdca3f5df,0xbb3a,0x4d03,0xbd,0x81,0x84,0x61,0x4b,0xfb,0xfa,0xc);
-DEFINE_GUID(IID_IVMRVideoStreamControl,0x058d1f11,0x2a54,0x4bef,0xbd,0x54,0xdf,0x70,0x66,0x26,0xb7,0x27);
-DEFINE_GUID(IID_IVMRVideoStreamControl9,0xd0cfe38b,0x93e7,0x4772,0x89,0x57,0x4,0,0xc4,0x9a,0x44,0x85);
-DEFINE_GUID(IID_IVMRWindowlessControl,0x0eb1088c,0x4dcd,0x46f0,0x87,0x8f,0x39,0xda,0xe8,0x6a,0x51,0xb7);
-DEFINE_GUID(IID_IVMRWindowlessControl9,0x8f537d09,0xf85e,0x4414,0xb2,0x3b,0x50,0x2e,0x54,0xc7,0x99,0x27);
-DEFINE_GUID(IID_IVPConfig,0xbc29a660,0x30e3,0x11d0,0x9e,0x69,0x00,0xc0,0x4f,0xd7,0xc1,0x5b);
-DEFINE_GUID(IID_IVPManager,0xaac18c18,0xe186,0x46d2,0x82,0x5d,0xa1,0xf8,0xdc,0x8e,0x39,0x5a);
-DEFINE_GUID(IID_IVPControl,0x25df12c1,0x3de0,0x11d1,0x9e,0x69,0x00,0xc0,0x4f,0xd7,0xc1,0x5b);
-DEFINE_GUID(IID_IVPNotify,0xc76794a1,0xd6c5,0x11d0,0x9e,0x69,0x00,0xc0,0x4f,0xd7,0xc1,0x5b);
-DEFINE_GUID(IID_IVPNotify2,0xebf47183,0x8764,0x11d1,0x9e,0x69,0x00,0xc0,0x4f,0xd7,0xc1,0x5b);
-DEFINE_GUID(IID_IVPObject,0xce292862,0xfc88,0x11d0,0x9e,0x69,0x00,0xc0,0x4f,0xd7,0xc1,0x5b);
-DEFINE_GUID(IID_IVPVBIConfig,0xec529b00,0x1a1f,0x11d1,0xba,0xd9,0x00,0x60,0x97,0x44,0x11,0x1a);
-DEFINE_GUID(IID_IVPVBINotify,0xec529b01,0x1a1f,0x11d1,0xba,0xd9,0x00,0x60,0x97,0x44,0x11,0x1a);
-DEFINE_GUID(IID_IVPVBIObject,0x814b9802,0x1c88,0x11d1,0xba,0xd9,0x00,0x60,0x97,0x44,0x11,0x1a);
-DEFINE_GUID(IID_IXDSCodec,0xc4c4c4b3,0x49,0x4e2b,0x98,0xfb,0x95,0x37,0xf6,0xce,0x51,0x6d);
-DEFINE_GUID(IID_IXDSCodecConfig,0xc4c4c4d3,0x49,0x4e2b,0x98,0xfb,0x95,0x37,0xf6,0xce,0x51,0x6d);
-DEFINE_GUID(IID_IXDSToRat,0xc5c5c5b0,0x3abc,0x11d6,0xb2,0x5b,0,0xc0,0x4f,0xa0,0xc0,0x26);
-DEFINE_GUID(IID_IXml2Dex,0x18c628ed,0x962a,0x11d2,0x8d,0x08,0x00,0xa0,0xc9,0x44,0x1e,0x20);
-DEFINE_GUID(LIBID_DexterLib,0x78530b68,0x61f9,0x11d2,0x8c,0xad,0,0xa0,0x24,0x58,0x9,0x2);
-DEFINE_GUID(LIBID_DirectShowStreamLib,0x4e6cde29,0xc0c4,0x11d0,0x8f,0xf1,0,0xc0,0x4f,0xd9,0x18,0x9d);
-DEFINE_GUID(LIBID_EncDec,0xc4c4c400,0x49,0x4e2b,0x98,0xfb,0x95,0x37,0xf6,0xce,0x51,0x6d);
-DEFINE_GUID(LIBID_MSTvCALib,0x11166000,0xdf8a,0x463a,0xb6,0x20,0x7b,0xec,0x23,0x54,0x20,0x10);
-DEFINE_GUID(LIBID_MSTvELib,0x1700c001,0x6666,0x4f66,0xb1,0xe2,0xbf,0x3c,0x9f,0xbb,0x9b,0xa6);
-DEFINE_GUID(LIBID_MSVidCtlLib,0xb0edf154,0x910a,0x11d2,0xb6,0x32,0,0xc0,0x4f,0x79,0x49,0x8e);
-DEFINE_GUID(LIBID_PSISLOADLib,0x8224a083,0x7f8c,0x432d,0xb8,0x3e,0x3c,0x5e,0x9b,0xde,0x35,0x28);
-DEFINE_GUID(LIBID_QuartzTypeLib,0x56a868b0,0xad4,0x11ce,0xb0,0x3a,0,0x20,0xaf,0xb,0xa7,0x70);
-DEFINE_GUID(LIBID_TunerLib,0x9b085638,0x18e,0x11d3,0x9d,0x8e,0,0xc0,0x4f,0x72,0xd9,0x80);
-DEFINE_GUID(LIBID_TVRATINGSLib,0xc5c5c500,0x3abc,0x11d6,0xb2,0x5b,0,0xc0,0x4f,0xa0,0xc0,0x26);
-DEFINE_GUID(LOOK_DOWNSTREAM_ONLY,0xac798be1,0x98e3,0x11d1,0xb3,0xf1,0x00,0xaa,0x00,0x37,0x61,0xc5);
-DEFINE_GUID(LOOK_UPSTREAM_ONLY,0xac798be0,0x98e3,0x11d1,0xb3,0xf1,0x00,0xaa,0x00,0x37,0x61,0xc5);
-DEFINE_GUID(MEDIASUBTYPE_A2B10G10R10,0x576f7893,0xbdf6,0x48c4,0x87,0x5f,0xae,0x7b,0x81,0x83,0x45,0x67);
-DEFINE_GUID(MEDIASUBTYPE_A2R10G10B10,0x2f8bb76d,0xb644,0x4550,0xac,0xf3,0xd3,0xc,0xaa,0x65,0xd5,0xc5);
-DEFINE_GUID(MEDIASUBTYPE_AI44,0x34344941,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_AIFF,0xe436eb8d,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(MEDIASUBTYPE_AnalogVideo_NTSC_M,0x0482dde2,0x7817,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65);
-DEFINE_GUID(MEDIASUBTYPE_AnalogVideo_PAL_B,0x0482dde5,0x7817,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65);
-DEFINE_GUID(MEDIASUBTYPE_AnalogVideo_PAL_D,0x0482dde6,0x7817,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65);
-DEFINE_GUID(MEDIASUBTYPE_AnalogVideo_PAL_G,0x0482dde7,0x7817,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65);
-DEFINE_GUID(MEDIASUBTYPE_AnalogVideo_PAL_H,0x0482dde8,0x7817,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65);
-DEFINE_GUID(MEDIASUBTYPE_AnalogVideo_PAL_I,0x0482dde9,0x7817,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65);
-DEFINE_GUID(MEDIASUBTYPE_AnalogVideo_PAL_M,0x0482ddea,0x7817,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65);
-DEFINE_GUID(MEDIASUBTYPE_AnalogVideo_PAL_N,0x0482ddeb,0x7817,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65);
-DEFINE_GUID(MEDIASUBTYPE_AnalogVideo_PAL_N_COMBO,0x0482ddec,0x7817,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65);
-DEFINE_GUID(MEDIASUBTYPE_AnalogVideo_SECAM_B,0x0482ddf0,0x7817,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65);
-DEFINE_GUID(MEDIASUBTYPE_AnalogVideo_SECAM_D,0x0482ddf1,0x7817,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65);
-DEFINE_GUID(MEDIASUBTYPE_AnalogVideo_SECAM_G,0x0482ddf2,0x7817,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65);
-DEFINE_GUID(MEDIASUBTYPE_AnalogVideo_SECAM_H,0x0482ddf3,0x7817,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65);
-DEFINE_GUID(MEDIASUBTYPE_AnalogVideo_SECAM_K,0x0482ddf4,0x7817,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65);
-DEFINE_GUID(MEDIASUBTYPE_AnalogVideo_SECAM_K1,0x0482ddf5,0x7817,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65);
-DEFINE_GUID(MEDIASUBTYPE_AnalogVideo_SECAM_L,0x0482ddf6,0x7817,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65);
-DEFINE_GUID(MEDIASUBTYPE_ARGB1555,0x297c55af,0xe209,0x4cb3,0xb7,0x57,0xc7,0x6d,0x6b,0x9c,0x88,0xa8);
-DEFINE_GUID(MEDIASUBTYPE_ARGB1555_D3D_DX7_RT,0x35314137,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_ARGB1555_D3D_DX9_RT,0x35314139,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_ARGB32,0x773c9ac0,0x3274,0x11d0,0xb7,0x24,0x00,0xaa,0x00,0x6c,0x1a,0x01);
-DEFINE_GUID(MEDIASUBTYPE_ARGB32_D3D_DX7_RT,0x38384137,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_ARGB32_D3D_DX9_RT,0x38384139,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_ARGB4444,0x6e6415e6,0x5c24,0x425f,0x93,0xcd,0x80,0x10,0x2b,0x3d,0x1c,0xca);
-DEFINE_GUID(MEDIASUBTYPE_ARGB4444_D3D_DX7_RT,0x34344137,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_ARGB4444_D3D_DX9_RT,0x34344139,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_Asf,0x3db80f90,0x9412,0x11d1,0xad,0xed,0x00,0x00,0xf8,0x75,0x4b,0x99);
-DEFINE_GUID(MEDIASUBTYPE_ATSC_SI,0xb3c7397c,0xd303,0x414d,0xb3,0x3c,0x4e,0xd2,0xc9,0xd2,0x97,0x33);
-DEFINE_GUID(MEDIASUBTYPE_AU,0xe436eb8c,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(MEDIASUBTYPE_Avi,0xe436eb88,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(MEDIASUBTYPE_AYUV,0x56555941,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_CFCC,0x43434643,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_CLJR,0x524a4c43,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_CLPL,0x4c504c43,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_CPLA,0x414c5043,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_DOLBY_AC3,0xe06d802c,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(MEDIASUBTYPE_DOLBY_AC3_SPDIF,0x00000092,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_DRM_Audio,0x00000009,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_DssAudio,0xa0af4f82,0xe163,0x11d0,0xba,0xd9,0x00,0x60,0x97,0x44,0x11,0x1a);
-DEFINE_GUID(MEDIASUBTYPE_DssVideo,0xa0af4f81,0xe163,0x11d0,0xba,0xd9,0x00,0x60,0x97,0x44,0x11,0x1a);
-DEFINE_GUID(MEDIASUBTYPE_DTS,0xe06d8033,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(MEDIASUBTYPE_dv25,0x35327664,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_dv50,0x30357664,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_DVB_SI,0xe9dd31a3,0x221d,0x4adb,0x85,0x32,0x9a,0xf3,0x9,0xc1,0xa4,0x8);
-DEFINE_GUID(MEDIASUBTYPE_DVCS,0x53435644,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_DVD_LPCM_AUDIO,0xe06d8032,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(MEDIASUBTYPE_DVD_NAVIGATION_DSI,0xe06d8030,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(MEDIASUBTYPE_DVD_NAVIGATION_PCI,0xe06d802f,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(MEDIASUBTYPE_DVD_NAVIGATION_PROVIDER,0xe06d8031,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(MEDIASUBTYPE_DVD_SUBPICTURE,0xe06d802d,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(MEDIASUBTYPE_dvh1,0x31687664,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_dvhd,0x64687664,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_dvsd,0x64737664,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_DVSD,0x44535644,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_dvsl,0x6c737664,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_IA44,0x34344149,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_IEEE_FLOAT,0x00000003,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_IF09,0x39304649,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_IJPG,0x47504a49,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_IYUV,0x56555949,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_IMC1,0x31434d49,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_IMC2,0x32434d49,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_IMC3,0x33434d49,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_IMC4,0x34434d49,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_Line21_BytePair,0x6e8d4a22,0x310c,0x11d0,0xb7,0x9a,0x00,0xaa,0x00,0x37,0x67,0xa7);
-DEFINE_GUID(MEDIASUBTYPE_Line21_GOPPacket,0x6e8d4a23,0x310c,0x11d0,0xb7,0x9a,0x00,0xaa,0x00,0x37,0x67,0xa7);
-DEFINE_GUID(MEDIASUBTYPE_Line21_VBIRawData,0x6e8d4a24,0x310c,0x11d0,0xb7,0x9a,0x00,0xaa,0x00,0x37,0x67,0xa7);
-DEFINE_GUID(MEDIASUBTYPE_MDVF,0x4656444d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_MJPG,0x47504a4d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_MPEG1Audio,0xe436eb87,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(MEDIASUBTYPE_MPEG1AudioPayload,0x00000050,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_MPEG1Packet,0xe436eb80,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(MEDIASUBTYPE_MPEG1Payload,0xe436eb81,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(MEDIASUBTYPE_MPEG1System,0xe436eb84,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(MEDIASUBTYPE_MPEG1Video,0xe436eb86,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(MEDIASUBTYPE_MPEG1VideoCD,0xe436eb85,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(MEDIASUBTYPE_MPEG2_AUDIO,0xe06d802b,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(MEDIASUBTYPE_MPEG2_PROGRAM,0xe06d8022,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(MEDIASUBTYPE_MPEG2_TRANSPORT,0xe06d8023,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(MEDIASUBTYPE_MPEG2_TRANSPORT_STRIDE,0x138aa9a4,0x1ee2,0x4c5b,0x98,0x8e,0x19,0xab,0xfd,0xbc,0x8a,0x11);
-DEFINE_GUID(MEDIASUBTYPE_MPEG2_VIDEO,0xe06d8026,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(MEDIASUBTYPE_MPEG2DATA,0xc892e55b,0x252d,0x42b5,0xa3,0x16,0xd9,0x97,0xe7,0xa5,0xd9,0x95);
-DEFINE_GUID(MEDIASUBTYPE_None,0xe436eb8e,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(MEDIASUBTYPE_NV12,0x3231564e,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_Overlay,0xe436eb7f,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(MEDIASUBTYPE_PCM,0x00000001,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_PCMAudio_Obsolete,0xe436eb8a,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(MEDIASUBTYPE_Plum,0x6d756c50,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_QTJpeg,0x6765706a,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_QTMovie,0xe436eb89,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(MEDIASUBTYPE_QTRle,0x20656c72,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_QTRpza,0x617a7072,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_QTSmc,0x20636d73,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_RAW_SPORT,0x00000240,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_RGB1,0xe436eb78,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(MEDIASUBTYPE_RGB16_D3D_DX7_RT,0x36315237,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_RGB16_D3D_DX9_RT,0x36315239,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_RGB24,0xe436eb7d,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(MEDIASUBTYPE_RGB32,0xe436eb7e,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(MEDIASUBTYPE_RGB32_D3D_DX7_RT,0x32335237,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_RGB32_D3D_DX9_RT,0x32335239,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_RGB4,0xe436eb79,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(MEDIASUBTYPE_RGB555,0xe436eb7c,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(MEDIASUBTYPE_RGB565,0xe436eb7b,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(MEDIASUBTYPE_RGB8,0xe436eb7a,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(MEDIASUBTYPE_S340,0x30343353,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_S342,0x32343353,0,0x10,0x80,0,0,0xaa,0,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_SDDS,0xe06d8034,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(MEDIASUBTYPE_SPDIF_TAG_241h,0x00000241,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_TELETEXT,0xf72a76e3,0xeb0a,0x11d0,0xac,0xe4,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(MEDIASUBTYPE_TVMJ,0x4a4d5654,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_UYVY,0x59565955,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_VPVBI,0x5a9b6a41,0x1a22,0x11d1,0xba,0xd9,0x00,0x60,0x97,0x44,0x11,0x1a);
-DEFINE_GUID(MEDIASUBTYPE_VPVideo,0x5a9b6a40,0x1a22,0x11d1,0xba,0xd9,0x00,0x60,0x97,0x44,0x11,0x1a);
-DEFINE_GUID(MEDIASUBTYPE_WAKE,0x454b4157,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_WAVE,0xe436eb8b,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(MEDIASUBTYPE_Y211,0x31313259,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_Y411,0x31313459,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_Y41P,0x50313459,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_YUY2,0x32595559,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_YUYV,0x56595559,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_YV12,0x32315659,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_YVU9,0x39555659,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIASUBTYPE_YVYU,0x55595659,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIATYPE_AnalogAudio,0x0482dee1,0x7817,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65);
-DEFINE_GUID(MEDIATYPE_AnalogVideo,0x0482dde1,0x7817,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65);
-DEFINE_GUID(MEDIATYPE_Audio,0x73647561,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIATYPE_AUXLine21Data,0x670aea80,0x3a82,0x11d0,0xb7,0x9b,0x00,0xaa,0x00,0x37,0x67,0xa7);
-DEFINE_GUID(MEDIATYPE_DVD_ENCRYPTED_PACK,0xed0b916a,0x044d,0x11d1,0xaa,0x78,0x00,0xc0,0x4f,0xc3,0x1d,0x60);
-DEFINE_GUID(MEDIATYPE_DVD_NAVIGATION,0xe06d802e,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(MEDIATYPE_File,0x656c6966,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIATYPE_Interleaved,0x73766169,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIATYPE_LMRT,0x74726c6d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIATYPE_Midi,0x7364696d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIATYPE_MPEG1SystemStream,0xe436eb82,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(MEDIATYPE_MPEG2_PACK,0x36523b13,0x8ee5,0x11d1,0x8c,0xa3,0x00,0x60,0xb0,0x57,0x66,0x4a);
-DEFINE_GUID(MEDIATYPE_MPEG2_PES,0xe06d8020,0xdb46,0x11cf,0xb4,0xd1,0x00,0x80,0x5f,0x6c,0xbb,0xea);
-DEFINE_GUID(MEDIATYPE_MPEG2_SECTIONS,0x455f176c,0x4b06,0x47ce,0x9a,0xef,0x8c,0xae,0xf7,0x3d,0xf7,0xb5);
-DEFINE_GUID(MEDIATYPE_ScriptCommand,0x73636d64,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIATYPE_Stream,0xe436eb83,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
-DEFINE_GUID(MEDIATYPE_Text,0x73747874,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIATYPE_Timecode,0x0482dee3,0x7817,0x11cf,0x8a,0x03,0x00,0xaa,0x00,0x6e,0xcb,0x65);
-DEFINE_GUID(MEDIATYPE_URL_STREAM,0x74726c6d,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(MEDIATYPE_VBI,0xf72a76e1,0xeb0a,0x11d0,0xac,0xe4,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(MEDIATYPE_Video,0x73646976,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
-DEFINE_GUID(PIN_CATEGORY_ANALOGVIDEOIN,0xfb6c4283,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(PIN_CATEGORY_CAPTURE,0xfb6c4281,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(PIN_CATEGORY_CC,0xfb6c4289,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(PIN_CATEGORY_EDS,0xfb6c4287,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(PIN_CATEGORY_NABTS,0xfb6c4286,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(PIN_CATEGORY_PREVIEW,0xfb6c4282,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(PIN_CATEGORY_STILL,0xfb6c428a,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(PIN_CATEGORY_TELETEXT,0xfb6c4288,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(PIN_CATEGORY_TIMECODE,0xfb6c428b,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(PIN_CATEGORY_VBI,0xfb6c4284,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(PIN_CATEGORY_VIDEOPORT,0xfb6c4285,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(PIN_CATEGORY_VIDEOPORT_VBI,0xfb6c428c,0x0353,0x11d1,0x90,0x5f,0x00,0x00,0xc0,0xcc,0x16,0xba);
-DEFINE_GUID(TIME_FORMAT_BYTE,0x7b785571,0x8c82,0x11cf,0xbc,0x0c,0x00,0xaa,0x00,0xac,0x74,0xf6);
-DEFINE_GUID(TIME_FORMAT_FIELD,0x7b785573,0x8c82,0x11cf,0xbc,0x0c,0x00,0xaa,0x00,0xac,0x74,0xf6);
-DEFINE_GUID(TIME_FORMAT_FRAME,0x7b785570,0x8c82,0x11cf,0xbc,0x0c,0x00,0xaa,0x00,0xac,0x74,0xf6);
-DEFINE_GUID(TIME_FORMAT_MEDIA_TIME,0x7b785574,0x8c82,0x11cf,0xbc,0x0c,0x00,0xaa,0x00,0xac,0x74,0xf6);
-DEFINE_GUID(TIME_FORMAT_NONE,0x00000000,0x0000,0x0000,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00);
-DEFINE_GUID(TIME_FORMAT_SAMPLE,0x7b785572,0x8c82,0x11cf,0xbc,0x0c,0x00,0xaa,0x00,0xac,0x74,0xf6);
diff --git a/winsup/w32api/lib/directx/test.c b/winsup/w32api/lib/directx/test.c
deleted file mode 100644
index 950e563..0000000
--- a/winsup/w32api/lib/directx/test.c
+++ /dev/null
@@ -1,12 +0,0 @@
-/* Perform simple test of headers to avoid typos and such */
-#include <windows.h>
-#include <d3d9.h>
-#include <d3d9caps.h>
-#include <d3d9types.h>
-#include <dxerr8.h>
-#include <dxerr9.h>
-
-int main()
-{
- return 0;
-}
diff --git a/winsup/w32api/lib/dlcapi.def b/winsup/w32api/lib/dlcapi.def
deleted file mode 100644
index 501ecd7..0000000
--- a/winsup/w32api/lib/dlcapi.def
+++ /dev/null
@@ -1,5 +0,0 @@
-LIBRARY DLCAPI.DLL
-EXPORTS
-AcsLan@8
-DlcCallDriver@24
-NtAcsLan@16
diff --git a/winsup/w32api/lib/dnsapi.def b/winsup/w32api/lib/dnsapi.def
deleted file mode 100644
index b9af10c..0000000
--- a/winsup/w32api/lib/dnsapi.def
+++ /dev/null
@@ -1,31 +0,0 @@
-LIBRARY DNSAPI.DLL
-EXPORTS
-DnsAcquireContextHandle_A@12
-DnsAcquireContextHandle_W@12
-DnsExtractRecordsFromMessage_UTF8@12
-DnsExtractRecordsFromMessage_W@12
-DnsModifyRecordsInSet_A@24
-DnsModifyRecordsInSet_UTF8@24
-DnsModifyRecordsInSet_W@24
-DnsNameCompare_A@8
-DnsNameCompare_W@8
-DnsQuery_A@24
-DnsQuery_UTF8@24
-DnsQuery_W@24
-DnsQueryConfig@24
-DnsRecordCompare@8
-DnsRecordCopyEx@12
-DnsRecordListFree@8
-DnsRecordSetCompare@16
-DnsRecordSetCopyEx@12
-DnsRecordSetDetach@4
-DnsReleaseContextHandle@4
-DnsReplaceRecordSetA@20
-DnsReplaceRecordSetUTF8@20
-DnsReplaceRecordSetW@20
-DnsValidateName_A@8
-DnsValidateName_UTF8@8
-DnsValidateName_W@8
-DnsWriteQuestionToBuffer_UTF8@24
-DnsWriteQuestionToBuffer_W@24
-
diff --git a/winsup/w32api/lib/docobj-uuid.c b/winsup/w32api/lib/docobj-uuid.c
deleted file mode 100644
index 6d93325..0000000
--- a/winsup/w32api/lib/docobj-uuid.c
+++ /dev/null
@@ -1,15 +0,0 @@
-/* docobj-uuid.c */
-/* Generate GUIDs for Document Object interfaces */
-
-/* All IIDs defined in this file were extracted from
- * HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\ */
-
-#define INITGUID
-#include <basetyps.h>
-DEFINE_GUID(IID_IContinueCallback,0xb722bcca,0x4e68,0x101b,0xa2,0xbc,0,0xaa,0,0x40,0x47,0x70);
-DEFINE_GUID(IID_IEnumOleDocumentViews,0xb722bcc8,0x4e68,0x101b,0xa2,0xbc,0,0xaa,0,0x40,0x47,0x70);
-DEFINE_GUID(IID_IPrint,0xb722bcc9,0x4e68,0x101b,0xa2,0xbc,0,0xaa,0,0x40,0x47,0x70);
-DEFINE_GUID(IID_IOleDocument,0xb722bcc5,0x4e68,0x101b,0xa2,0xbc,0,0xaa,0,0x40,0x47,0x70);
-DEFINE_GUID(IID_IOleDocumentView,0xb722bcc6,0x4e68,0x101b,0xa2,0xbc,0,0xaa,0,0x40,0x47,0x70);
-DEFINE_GUID(IID_IOleDocumentSite,0xb722bcc7,0x4e68,0x101b,0xa2,0xbc,0,0xaa,0,0x40,0x47,0x70);
-DEFINE_GUID(IID_IOleCommandTarget,0xb722bccb,0x4e68,0x101b,0xa2,0xbc,0,0xaa,0,0x40,0x47,0x70);
diff --git a/winsup/w32api/lib/exdisp-uuid.c b/winsup/w32api/lib/exdisp-uuid.c
deleted file mode 100644
index 1c0401e..0000000
--- a/winsup/w32api/lib/exdisp-uuid.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/* exdisp-uuid.c */
-/* Generate GUIDs for Object EXDISP interfaces */
-
-/* All IIDs defined in this file were extracted from
- * HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\ */
-
-/* All CLSIDs defined in this file were extracted from
- * HKEY_CLASSES_ROOT\CLSID\ */
-
-#define INITGUID
-#include <basetyps.h>
-// Microsoft Web Browser CLSID
-DEFINE_GUID(CLSID_WebBrowser,0x8856f961,0x340a,0x11d0,0xa9,0x6b,0x0,0xc0,0x4f,0xd7,0x5,0xa2);
-DEFINE_GUID(DIID_DWebBrowserEvents,0xeab22ac2,0x30c1,0x11cf,0xa7,0xeb,0x0,0x0,0xc0,0x5b,0xae,0x0b);
-DEFINE_GUID(DIID_DWebBrowserEvents2,0x34a715a0,0x6587,0x11d0,0x92,0x4a,0x0,0x20,0xaf,0xc7,0xac,0x4d);
-DEFINE_GUID(IID_IWebBrowser,0xeab22ac1,0x30c1,0x11cf,0xa7,0xeb,0x0,0x0,0xc0,0x5b,0xae,0x0b);
-DEFINE_GUID(IID_IWebBrowser2,0xd30c1661,0xcdaf,0x11d0,0x8a,0x3e,0x0,0xc0,0x4f,0xc9,0xe2,0x6e);
-DEFINE_GUID(IID_IWebBrowserApp,0x2df05,0x0,0x0,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x46);
diff --git a/winsup/w32api/lib/extras-uuid.c b/winsup/w32api/lib/extras-uuid.c
deleted file mode 100644
index f09ba33..0000000
--- a/winsup/w32api/lib/extras-uuid.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* extras-uuid.c */
-/* Generate GUIDs for interfaces not defined in any headers*/
-
-/* All IIDs defined in this file were extracted from
- * HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\ */
-
-/* All CLSIDs defined in this file were extracted from
- * HKEY_CLASSES_ROOT\CLSID\ */
-
-#define INITGUID
-#include <basetyps.h>
-// Microsoft Web Browser CLSID
-DEFINE_GUID(IID_IClientSiteHandler,0xf4f569d1,0x593b,0x101a,0xb5,0x69,0x8,0,0x2b,0x2d,0xbf,0x7a);
-DEFINE_OLEGUID(IID_IContinue,0x12a,0,0);
-DEFINE_GUID(IID_IHttpNegotiate,0x79eac9d2,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-DEFINE_GUID(IID_IPersistMoniker,0x79eac9c9,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0x0b);
-DEFINE_GUID(IID_IServerHandler,0xf4f569d0,0x593b,0x101a,0xb5,0x69,0x8,0,0x2b,0x2d,0xbf,0x7a);
-DEFINE_GUID(IID_ITargetEmbedding,0x548793c0,0x9e74,0x11cf,0x96,0x55,0,0xa0,0xc9,0x3,0x49,0x23);
-DEFINE_GUID(IID_ITargetFrame,0xd5f78c80,0x5252,0x11cf,0x90,0xfa,0,0xaa,0,0x42,0x10,0x6e);
-DEFINE_OLEGUID(IID_ITypeComp,0x20403,0,0);
-DEFINE_GUID(IID_IUrlHistoryStg,0x3c374a41,0xbae4,0x11cf,0xbf,0x7d,0,0xaa,0,0x69,0x46,0xee);
-DEFINE_GUID(IID_IWinInetHttpInfo,0x79eac9d8,0xbafa,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-DEFINE_GUID(IID_IWinInetInfo,0x79eac9d6,0xbafa,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-DEFINE_OLEGUID(IID_IEnumSTATPROPSETSTG,0x13b,0,0);
-DEFINE_OLEGUID(IID_IEnumSTATPROPSTG,0x139,0,0);
-DEFINE_GUID(IID_IEnumSTATURL,0x3c374a42,0xbae4,0x11cf,0xbf,0x7d,0,0xaa,0,0x69,0x46,0xee);
-// file:, local: Asychronous Pluggable Protocol Handler CLSID
-DEFINE_GUID(CLSID_FileProtocol,0x79eac9e7,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-// ftp: Asychronous Pluggable Protocol Handler CLSID
-DEFINE_GUID(CLSID_FtpProtocol,0x79eac9e3,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-// gopher: Asychronous Pluggable Protocol Handler CLSID
-DEFINE_GUID(CLSID_GopherProtocol,0x79eac9e4,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-// http: Asychronous Pluggable Protocol Handler CLSID
-DEFINE_GUID(CLSID_HttpProtocol,0x79eac9e2,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-// https: Asychronous Pluggable Protocol Handler CLSID
-DEFINE_GUID(CLSID_HttpSProtocol,0x79eac9e5,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-// mk: Asychronous Pluggable Protocol Handler CLSID
-DEFINE_GUID(CLSID_MkProtocol,0x79eac9e6,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-// URLMoniker ProxyStub Factory CLSID
-DEFINE_GUID(CLSID_PSUrlMonProxy,0x79eac9f1,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-// URL Moniker CLSID
-DEFINE_GUID(CLSID_StdURLMoniker,0x79eac9e0,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
diff --git a/winsup/w32api/lib/faultrep.def b/winsup/w32api/lib/faultrep.def
deleted file mode 100644
index dbc7272..0000000
--- a/winsup/w32api/lib/faultrep.def
+++ /dev/null
@@ -1,5 +0,0 @@
-LIBRARY faultrep.DLL
-EXPORTS
-AddERExcludedApplicationA@4
-AddERExcludedApplicationW@4
-ReportFault@8
diff --git a/winsup/w32api/lib/gdi32.def b/winsup/w32api/lib/gdi32.def
deleted file mode 100644
index a0b76f7..0000000
--- a/winsup/w32api/lib/gdi32.def
+++ /dev/null
@@ -1,348 +0,0 @@
-LIBRARY GDI32.dll
-EXPORTS
-AbortDoc@4
-AbortPath@4
-AddFontMemResourceEx@16
-AddFontResourceA@4
-AddFontResourceW@4
-AddFontResourceExA@12
-AddFontResourceExW@12
-AngleArc@24
-AnimatePalette@16
-Arc@36
-ArcTo@36
-BeginPath@4
-BitBlt@36
-CancelDC@4
-CheckColorsInGamut@16
-ChoosePixelFormat@8
-Chord@36
-CloseEnhMetaFile@4
-CloseFigure@4
-CloseMetaFile@4
-ColorCorrectPalette@16
-ColorMatchToTarget@12
-CombineRgn@16
-CombineTransform@12
-CopyEnhMetaFileA@8
-CopyEnhMetaFileW@8
-CopyMetaFileA@8
-CopyMetaFileW@8
-CreateBitmap@20
-CreateBitmapIndirect@4
-CreateBrushIndirect@4
-CreateColorSpaceA@4
-CreateColorSpaceW@4
-CreateCompatibleBitmap@12
-CreateCompatibleDC@4
-CreateDCA@16
-CreateDCW@16
-CreateDIBPatternBrush@8
-CreateDIBPatternBrushPt@8
-CreateDIBSection@24
-CreateDIBitmap@24
-CreateDiscardableBitmap@12
-CreateEllipticRgn@16
-CreateEllipticRgnIndirect@4
-CreateEnhMetaFileA@16
-CreateEnhMetaFileW@16
-CreateFontA@56
-CreateFontIndirectA@4
-CreateFontIndirectW@4
-CreateFontW@56
-CreateHalftonePalette@4
-CreateHatchBrush@8
-CreateICA@16
-CreateICW@16
-CreateMetaFileA@4
-CreateMetaFileW@4
-CreatePalette@4
-CreatePatternBrush@4
-CreatePen@12
-CreatePenIndirect@4
-CreatePolyPolygonRgn@16
-CreatePolygonRgn@12
-CreateRectRgn@16
-CreateRectRgnIndirect@4
-CreateRoundRectRgn@24
-CreateScalableFontResourceA@16
-CreateScalableFontResourceW@16
-CreateSolidBrush@4
-DPtoLP@12
-DeleteColorSpace@4
-DeleteDC@4
-DeleteEnhMetaFile@4
-DeleteMetaFile@4
-DeleteObject@4
-DescribePixelFormat@16
-DeviceCapabilitiesEx@24
-DeviceCapabilitiesExA@24
-DeviceCapabilitiesExW@24
-DrawEscape@16
-Ellipse@20
-EndDoc@4
-EndPage@4
-EndPath@4
-EnumEnhMetaFile@20
-EnumFontFamiliesA@16
-EnumFontFamiliesExA@20
-EnumFontFamiliesExW@20
-EnumFontFamiliesW@16
-EnumFontsA@16
-EnumFontsW@16
-EnumICMProfilesA@12
-EnumICMProfilesW@12
-EnumMetaFile@16
-EnumObjects@16
-EqualRgn@8
-Escape@20
-ExcludeClipRect@20
-ExtCreatePen@20
-ExtCreateRegion@12
-ExtEscape@24
-ExtFloodFill@20
-ExtSelectClipRgn@12
-ExtTextOutA@32
-ExtTextOutW@32
-FillPath@4
-FillRgn@12
-FixBrushOrgEx@16
-FlattenPath@4
-FloodFill@16
-FrameRgn@20
-GdiComment@12
-GdiFlush@0
-GdiGetBatchLimit@0
-GdiPlayDCScript@24
-GdiPlayJournal@20
-GdiPlayScript@28
-GdiSetBatchLimit@4
-GetArcDirection@4
-GetAspectRatioFilterEx@8
-GetBitmapBits@12
-GetBitmapDimensionEx@8
-GetBkColor@4
-GetBkMode@4
-GetBoundsRect@12
-GetBrushOrgEx@8
-GetCharABCWidthsA@16
-GetCharABCWidthsFloatA@16
-GetCharABCWidthsFloatW@16
-GetCharABCWidthsW@16
-GetCharWidth32A@16
-GetCharWidth32W@16
-GetCharWidthA@16
-GetCharWidthFloatA@16
-GetCharWidthFloatW@16
-GetCharWidthW@16
-GetCharacterPlacementA@24
-GetCharacterPlacementW@24
-GetClipBox@8
-GetClipRgn@8
-GetColorAdjustment@8
-GetColorSpace@4
-GetCurrentObject@8
-GetCurrentPositionEx@8
-GetDCOrgEx@8
-GetDIBColorTable@16
-GetDIBits@28
-GetDeviceCaps@8
-GetDeviceGammaRamp@8
-GetEnhMetaFileA@4
-GetEnhMetaFileBits@12
-GetEnhMetaFileDescriptionA@12
-GetEnhMetaFileDescriptionW@12
-GetEnhMetaFileHeader@12
-GetEnhMetaFilePaletteEntries@12
-GetEnhMetaFilePixelFormat@12
-GetEnhMetaFileW@4
-GetFontData@20
-GetFontLanguageInfo@4
-GetFontResourceInfo@16
-GetFontResourceInfoW@16
-GetFontUnicodeRanges@8
-GetGlyphIndicesA@20
-GetGlyphIndicesW@20
-GetGlyphOutline@28
-GetGlyphOutlineA@28
-GetGlyphOutlineW@28
-GetGlyphOutlineWow@28
-GetGraphicsMode@4
-GetICMProfileA@12
-GetICMProfileW@12
-GetKerningPairs@12
-GetKerningPairsA@12
-GetKerningPairsW@12
-GetLogColorSpaceA@12
-GetLogColorSpaceW@12
-GetMapMode@4
-GetMetaFileA@4
-GetMetaFileBitsEx@12
-GetMetaFileW@4
-GetMetaRgn@8
-GetMiterLimit@8
-GetNearestColor@8
-GetNearestPaletteIndex@8
-GetObjectA@12
-GetObjectType@4
-GetObjectW@12
-GetOutlineTextMetricsA@12
-GetOutlineTextMetricsW@12
-GetPaletteEntries@16
-GetPath@16
-GetPixel@12
-GetPixelFormat@4
-GetPolyFillMode@4
-GetROP2@4
-GetRandomRgn@12
-GetRasterizerCaps@8
-GetRegionData@12
-GetRelAbs@8
-GetRgnBox@8
-GetStockObject@4
-GetStretchBltMode@4
-GetSystemPaletteEntries@16
-GetSystemPaletteUse@4
-GetTextAlign@4
-GetTextCharacterExtra@4
-GetTextCharset@4
-GetTextCharsetInfo@12
-GetTextColor@4
-GetTextExtentExPointA@28
-GetTextExtentExPointW@28
-GetTextExtentExPointI@28
-GetTextExtentPoint32A@16
-GetTextExtentPoint32W@16
-GetTextExtentPointA@16
-GetTextExtentPointW@16
-GetTextFaceA@12
-GetTextFaceW@12
-GetTextMetricsA@8
-GetTextMetricsW@8
-GetViewportExtEx@8
-GetViewportOrgEx@8
-GetWinMetaFileBits@20
-GetWindowExtEx@8
-GetWindowOrgEx@8
-GetWorldTransform@8
-IntersectClipRect@20
-InvertRgn@8
-LPtoDP@12
-LineDDA@24
-LineTo@12
-MaskBlt@48
-ModifyWorldTransform@12
-MoveToEx@16
-OffsetClipRgn@12
-OffsetRgn@12
-OffsetViewportOrgEx@16
-OffsetWindowOrgEx@16
-PaintRgn@8
-PatBlt@24
-PathToRegion@4
-Pie@36
-PlayEnhMetaFile@12
-PlayEnhMetaFileRecord@16
-PlayMetaFile@8
-PlayMetaFileRecord@16
-PlgBlt@40
-PolyBezier@12
-PolyBezierTo@12
-PolyDraw@16
-PolyPolygon@16
-PolyPolyline@16
-PolyTextOutA@12
-PolyTextOutW@12
-Polygon@12
-Polyline@12
-PolylineTo@12
-PtInRegion@12
-PtVisible@12
-RealizePalette@4
-RectInRegion@8
-RectVisible@8
-Rectangle@20
-RemoveFontMemResourceEx@4
-RemoveFontResourceA@4
-RemoveFontResourceW@4
-RemoveFontResourceExA@12
-RemoveFontResourceExW@12
-ResetDCA@8
-ResetDCW@8
-ResizePalette@8
-RestoreDC@8
-RoundRect@28
-SaveDC@4
-ScaleViewportExtEx@24
-ScaleWindowExtEx@24
-SelectBrushLocal@8
-SelectClipPath@8
-SelectClipRgn@8
-SelectFontLocal@8
-SelectObject@8
-SelectPalette@12
-SetAbortProc@8
-SetArcDirection@8
-SetBitmapBits@12
-SetBitmapDimensionEx@16
-SetBkColor@8
-SetBkMode@8
-SetBoundsRect@12
-SetBrushOrgEx@16
-SetColorAdjustment@8
-SetColorSpace@8
-SetDCBrushColor@8
-SetDCPenColor@8
-SetDIBColorTable@16
-SetDIBits@28
-SetDIBitsToDevice@48
-SetDeviceGammaRamp@8
-SetEnhMetaFileBits@8
-SetFontEnumeration@4
-SetGraphicsMode@8
-SetICMMode@8
-SetICMProfileA@8
-SetICMProfileW@8
-SetMapMode@8
-SetMapperFlags@8
-SetMetaFileBitsEx@8
-SetMetaRgn@4
-SetMiterLimit@12
-SetPaletteEntries@16
-SetPixel@16
-SetPixelFormat@12
-SetPixelV@16
-SetPolyFillMode@8
-SetROP2@8
-SetRectRgn@20
-SetRelAbs@8
-SetStretchBltMode@8
-SetSystemPaletteUse@8
-SetTextAlign@8
-SetTextCharacterExtra@8
-SetTextColor@8
-SetTextJustification@12
-SetViewportExtEx@16
-SetViewportOrgEx@16
-SetWinMetaFileBits@16
-SetWindowExtEx@16
-SetWindowOrgEx@16
-SetWorldTransform@8
-StartDocA@8
-StartDocW@8
-StartPage@4
-StretchBlt@44
-StretchDIBits@52
-StrokeAndFillPath@4
-StrokePath@4
-SwapBuffers@4
-TextOutA@20
-TextOutW@20
-TranslateCharsetInfo@12
-UnrealizeObject@4
-UpdateColors@4
-UpdateICMRegKeyA@16
-UpdateICMRegKeyW@16
-WidenPath@4
-gdiPlaySpoolStream@24
-SetLayout@8
diff --git a/winsup/w32api/lib/glaux.def b/winsup/w32api/lib/glaux.def
deleted file mode 100644
index 87f7237..0000000
--- a/winsup/w32api/lib/glaux.def
+++ /dev/null
@@ -1,173 +0,0 @@
-LIBRARY GLAUX.DLL
-EXPORTS
-AllocateMemory@4
-AllocateZeroedMemory@4
-CleanUp@0
-ComponentFromIndex@12
-CreateCIPalette@4
-CreateRGBPalette@4
-DelayPaletteRealization@0
-DestroyThisWindow@4
-FillRgbPaletteEntries@12
-FindBestPixelFormat@12
-FindExactPixelFormat@12
-FindPixelFormat@8
-FlushPalette@8
-ForceRedraw@4
-FreeMemory@4
-GetRegistrySysColors@8
-GrabStaticEntries@4
-IsPixelFormatValid@12
-PixelFormatDescriptorFromDc@8
-PrintMessage
-RealizePaletteNow@12
-ReleaseStaticEntries@4
-UpdateStaticMapping@4
-tkCloseWindow@0
-tkDisplayFunc@4
-tkErrorPopups@4
-tkExec@0
-tkExposeFunc@4
-tkGetColorMapSize@0
-tkGetDisplayMode@0
-tkGetDisplayModeID@0
-tkGetDisplayModePolicy@0
-tkGetHDC@0
-tkGetHRC@0
-tkGetHWND@0
-tkGetMouseLoc@8
-tkIdleFunc@4
-tkInitDisplayMode@4
-tkInitDisplayModeID@4
-tkInitDisplayModePolicy@4
-tkInitPosition@16
-tkInitWindow@4
-tkInitWindowAW@8
-tkKeyDownFunc@4
-tkMouseDownFunc@4
-tkMouseMoveFunc@4
-tkMouseUpFunc@4
-tkQuit@0
-tkReshapeFunc@4
-tkSetFogRamp@8
-tkSetGreyRamp@0
-tkSetOneColor@16
-tkSetRGBMap@8
-tkSwapBuffers@0
-tkWndProc@16
-RawImageClose@4
-RawImageGetData@8
-RawImageGetRow@16
-RawImageOpenAW@8
-tkRGBImageLoad@4
-tkRGBImageLoadAW@8
-tkCreateBitmapFont@4
-tkCreateFilledFont@4
-tkCreateOutlineFont@4
-tkCreateStrokeFont@4
-tkDrawStr@8
-DibNumColors@4
-tkDIBImageLoad@4
-tkDIBImageLoadAW@8
-m_popmatrix@0
-m_pushmatrix@0
-m_scale@24
-m_translate@24
-m_xformpt@16
-m_xformptonly@8
-add3@12
-copy3@8
-copymat3@8
-crossprod@12
-diff3@12
-dist3@8
-dot3@8
-error@4
-identifymat3@4
-length3@4
-normalize@4
-perpnorm@16
-samepoint@8
-scalarmult@16
-seterrorfunc@4
-xformvec3@12
-auxSolidTeapot@8
-auxWireTeapot@8
-solidTeapot@12
-wireTeapot@12
-auxSolidBox@24
-auxSolidCone@16
-auxSolidCube@8
-auxSolidCylinder@16
-auxSolidDodecahedron@8
-auxSolidIcosahedron@8
-auxSolidOctahedron@8
-auxSolidSphere@8
-auxSolidTetrahedron@8
-auxSolidTorus@16
-auxWireBox@24
-auxWireCone@16
-auxWireCube@8
-auxWireCylinder@16
-auxWireDodecahedron@8
-auxWireIcosahedron@8
-auxWireOctahedron@8
-auxWireSphere@8
-auxWireTetrahedron@8
-auxWireTorus@16
-compareParams@12
-dodecahedron@16
-doughnut@28
-drawbox@52
-drawtriangle@32
-findList@12
-icosahedron@16
-initdodec@0
-makeModelPtr@12
-octahedron@16
-pentagon@24
-recorditem@32
-subdivide@36
-tetrahedron@16
-auxDIBImageLoadA@4
-auxDIBImageLoadW@4
-auxRGBImageLoadA@4
-auxRGBImageLoadW@4
-auxCreateFont@0
-auxDrawStrA@4
-auxDrawStrAW@8
-auxDrawStrW@4
-DefaultHandleExpose@8
-DefaultHandleReshape@8
-KeyDown@8
-MouseDown@12
-MouseLoc@12
-MouseUp@12
-auxCloseWindow@0
-auxExposeFunc@4
-auxGetColorMapSize@0
-auxGetDisplayMode@0
-auxGetDisplayModeID@0
-auxGetDisplayModePolicy@0
-auxGetHDC@0
-auxGetHGLRC@0
-auxGetHWND@0
-auxGetMouseLoc@8
-auxIdleFunc@4
-auxInitDisplayMode@4
-auxInitDisplayModeID@4
-auxInitDisplayModePolicy@4
-auxInitPosition@16
-auxInitWindowA@4
-auxInitWindowAW@8
-auxInitWindowW@4
-auxKeyFunc@8
-auxMainLoop@4
-auxMouseFunc@12
-auxQuit@0
-auxReshapeFunc@4
-auxSetFogRamp@8
-auxSetGreyRamp@0
-auxSetOneColor@16
-auxSetRGBMap@8
-auxSwapBuffers@0
diff --git a/winsup/w32api/lib/glu32.def b/winsup/w32api/lib/glu32.def
deleted file mode 100644
index d0f091f..0000000
--- a/winsup/w32api/lib/glu32.def
+++ /dev/null
@@ -1,54 +0,0 @@
-LIBRARY GLU32.DLL
-EXPORTS
-gluBeginCurve@4
-gluBeginPolygon@4
-gluBeginSurface@4
-gluBeginTrim@4
-gluBuild1DMipmaps@24
-gluBuild2DMipmaps@28
-gluCylinder@36
-gluDeleteNurbsRenderer@4
-gluDeleteQuadric@4
-gluDeleteTess@4
-gluDisk@28
-gluEndCurve@4
-gluEndPolygon@4
-gluEndSurface@4
-gluEndTrim@4
-gluErrorString@4
-gluErrorUnicodeStringEXT@4
-gluGetNurbsProperty@12
-gluGetString@4
-gluGetTessProperty@12
-gluLoadSamplingMatrices@16
-gluLookAt@72
-gluNewNurbsRenderer@0
-gluNewQuadric@0
-gluNewTess@0
-gluNextContour@8
-gluNurbsCallback@12
-gluNurbsCurve@28
-gluNurbsProperty@12
-gluNurbsSurface@44
-gluOrtho2D@32
-gluPartialDisk@44
-gluPerspective@32
-gluPickMatrix@36
-gluProject@48
-gluPwlCurve@20
-gluQuadricCallback@12
-gluQuadricDrawStyle@8
-gluQuadricNormals@8
-gluQuadricOrientation@8
-gluQuadricTexture@8
-gluScaleImage@36
-gluSphere@20
-gluTessBeginContour@4
-gluTessBeginPolygon@8
-gluTessCallback@12
-gluTessEndContour@4
-gluTessEndPolygon@4
-gluTessNormal@28
-gluTessProperty@16
-gluTessVertex@12
-gluUnProject@48
diff --git a/winsup/w32api/lib/hlguids-uuid.c b/winsup/w32api/lib/hlguids-uuid.c
deleted file mode 100644
index 05c90e5..0000000
--- a/winsup/w32api/lib/hlguids-uuid.c
+++ /dev/null
@@ -1,15 +0,0 @@
-/* hlguids-uuid.c */
-/* Generate GUIDs for HyperLink GUID interfaces */
-
-/* All IIDs defined in this file were extracted from
- * HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\ */
-
-/* All CLSIDs defined in this file were extracted from
- * HKEY_CLASSES_ROOT\CLSID\ */
-
-#define INITGUID
-#include <basetyps.h>
-// StdHlink CLSID
-DEFINE_GUID(CLSID_StdHlink,0x79eac9d0,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-// StdHlinkBrowseContext CLSID
-DEFINE_GUID(CLSID_StdHlinkBrowseContext,0x79eac9d1,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
diff --git a/winsup/w32api/lib/hlink-uuid.c b/winsup/w32api/lib/hlink-uuid.c
deleted file mode 100644
index 433429f..0000000
--- a/winsup/w32api/lib/hlink-uuid.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/* hlink-uuid.c */
-/* Generate GUIDs for HyperLink interfaces */
-
-/* All IIDs defined in this file were extracted from
- * HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\ */
-
-#define INITGUID
-#include <basetyps.h>
-DEFINE_GUID(IID_IHlink,0x79eac9c3,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-DEFINE_GUID(IID_IHlinkBrowseContext,0x79eac9c7,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-DEFINE_GUID(IID_IHlinkFrame,0x79eac9c5,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-DEFINE_GUID(IID_IHlinkSite,0x79eac9c2,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-DEFINE_GUID(IID_IHlinkTarget,0x79eac9c4,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
diff --git a/winsup/w32api/lib/icmui.def b/winsup/w32api/lib/icmui.def
deleted file mode 100644
index 679eeeb..0000000
--- a/winsup/w32api/lib/icmui.def
+++ /dev/null
@@ -1,4 +0,0 @@
-LIBRARY ICMUI.DLL
-EXPORTS
-SetupColorMatchingA@4
-SetupColorMatchingW@4
diff --git a/winsup/w32api/lib/igmpagnt.def b/winsup/w32api/lib/igmpagnt.def
deleted file mode 100644
index 803ee35..0000000
--- a/winsup/w32api/lib/igmpagnt.def
+++ /dev/null
@@ -1,6 +0,0 @@
-LIBRARY igmpagnt.dll
-EXPORTS
-SnmpExtensionClose@0
-SnmpExtensionInit@12
-SnmpExtensionQuery@16
-SnmpExtensionTrap@20
diff --git a/winsup/w32api/lib/imagehlp.def b/winsup/w32api/lib/imagehlp.def
deleted file mode 100644
index 411a360..0000000
--- a/winsup/w32api/lib/imagehlp.def
+++ /dev/null
@@ -1,114 +0,0 @@
-LIBRARY IMAGEHLP.DLL
-EXPORTS
-BindImage@12
-BindImageEx@20
-CheckSumMappedFile@16
-CopyPdb@12
-EnumerateLoadedModules32@12
-EnumerateLoadedModules64@12
-EnumerateLoadedModules@12
-FindDebugInfoFile@12
-FindDebugInfoFileEx@20
-FindExecutableImage@12
-GetImageConfigInformation@8
-GetImageUnusedHeaderBytes@8
-GetTimestampForLoadedLibrary@4
-ImageAddCertificate@12
-ImageDirectoryEntryToData@16
-ImageDirectoryEntryToDataEx@20
-ImageEnumerateCertificates@20
-ImageGetCertificateData@16
-ImageGetCertificateHeader@12
-ImageGetDigestStream@16
-ImageLoad@8
-ImageNtHeader@4
-ImageRemoveCertificate@8
-ImageRvaToSection@12
-ImageRvaToVa@16
-ImageUnload@4
-ImagehlpApiVersion@0
-ImagehlpApiVersionEx@4
-MakeSureDirectoryPathExists@4
-MapAndLoad@20
-MapDebugInformation32@16
-MapDebugInformation64@20
-MapDebugInformation@16
-MapFileAndCheckSumA@12
-MapFileAndCheckSumW@12
-MarkImageAsRunFromSwap@8
-ReBaseImage@44
-RemovePrivateCvSymbolic@12
-RemovePrivateCvSymbolicEx@16
-RemoveRelocations@4
-SearchTreeForFile@12
-SetImageConfigInformation@8
-SplitSymbols@16
-StackWalk32@36
-StackWalk64@36
-StackWalk@36
-SymCleanup@4
-SymEnumerateModules32@12
-SymEnumerateModules64@12
-SymEnumerateModules@12
-SymEnumerateSymbols32@16
-SymEnumerateSymbols64@20
-SymEnumerateSymbols@16
-SymFunctionTableAccess32@8
-SymFunctionTableAccess64@12
-SymFunctionTableAccess@8
-SymGetLineFromAddr32@16
-SymGetLineFromAddr64@20
-SymGetLineFromAddr@16
-SymGetLineFromName32@24
-SymGetLineFromName64@24
-SymGetLineFromName@24
-SymGetLineNext32@8
-SymGetLineNext64@8
-SymGetLineNext@8
-SymGetLinePrev32@8
-SymGetLinePrev64@8
-SymGetLinePrev@8
-SymGetModuleBase32@8
-SymGetModuleBase64@12
-SymGetModuleBase@8
-SymGetModuleInfo32@12
-SymGetModuleInfo64@16
-SymGetModuleInfo@12
-SymGetOptions@0
-SymGetSearchPath@12
-SymGetSymFromAddr32@16
-SymGetSymFromAddr64@20
-SymGetSymFromAddr@16
-SymGetSymFromName32@12
-SymGetSymFromName64@12
-SymGetSymFromName@12
-SymGetSymNext32@8
-SymGetSymNext64@8
-SymGetSymNext@8
-SymGetSymPrev32@8
-SymGetSymPrev64@8
-SymGetSymPrev@8
-SymInitialize@12
-SymLoadModule32@24
-SymLoadModule64@28
-SymLoadModule@24
-SymMatchFileName@16
-SymRegisterCallback32@12
-SymRegisterCallback64@16
-SymRegisterCallback@12
-SymSetOptions@4
-SymSetSearchPath@8
-SymUnDName32@12
-SymUnDName64@12
-SymUnDName@12
-SymUnloadModule32@8
-SymUnloadModule64@12
-SymUnloadModule@8
-TouchFileTimes@8
-UnDecorateSymbolName@16
-UnMapAndLoad@4
-UnmapDebugInformation32@4
-UnmapDebugInformation64@4
-UnmapDebugInformation@4
-UpdateDebugInfoFile@16
-UpdateDebugInfoFileEx@20
diff --git a/winsup/w32api/lib/imm32.def b/winsup/w32api/lib/imm32.def
deleted file mode 100644
index c8b9c84..0000000
--- a/winsup/w32api/lib/imm32.def
+++ /dev/null
@@ -1,78 +0,0 @@
-LIBRARY IMM32.DLL
-EXPORTS
-ImmAssociateContext@8
-ImmConfigureIMEA@16
-ImmConfigureIMEW@16
-ImmCreateContext@0
-ImmCreateIMCC@4
-ImmCreateSoftKeyboard@16
-ImmDestroyContext@4
-ImmDestroyIMCC@4
-ImmDestroySoftKeyboard@4
-ImmDisableIME@4
-ImmEnumRegisterWordA@24
-ImmEnumRegisterWordW@24
-ImmEscapeA@16
-ImmEscapeW@16
-ImmGenerateMessage@4
-ImmGetCandidateListA@16
-ImmGetCandidateListCountA@8
-ImmGetCandidateListCountW@8
-ImmGetCandidateListW@16
-ImmGetCandidateWindow@12
-ImmGetCompositionFontA@8
-ImmGetCompositionFontW@8
-ImmGetCompositionStringA@16
-ImmGetCompositionStringW@16
-ImmGetCompositionWindow@8
-ImmGetContext@4
-ImmGetConversionListA@24
-ImmGetConversionListW@24
-ImmGetConversionStatus@12
-ImmGetDefaultIMEWnd@4
-ImmGetDescriptionA@12
-ImmGetDescriptionW@12
-ImmGetGuideLineA@16
-ImmGetGuideLineW@16
-ImmGetHotKey@16
-ImmGetIMCCLockCount@4
-ImmGetIMCCSize@4
-ImmGetIMCLockCount@4
-ImmGetIMEFileNameA@12
-ImmGetIMEFileNameW@12
-ImmGetImeMenuItemsA@24
-ImmGetImeMenuItemsW@24
-ImmGetOpenStatus@4
-ImmGetProperty@8
-ImmGetRegisterWordStyleA@12
-ImmGetRegisterWordStyleW@12
-ImmGetStatusWindowPos@8
-ImmGetVirtualKey@4
-ImmInstallIMEA@8
-ImmInstallIMEW@8
-ImmIsIME@4
-ImmIsUIMessageA@16
-ImmIsUIMessageW@16
-ImmLockIMC@4
-ImmLockIMCC@4
-ImmNotifyIME@16
-ImmReSizeIMCC@8
-ImmRegisterWordA@16
-ImmRegisterWordW@16
-ImmReleaseContext@8
-ImmSetCandidateWindow@8
-ImmSetCompositionFontA@8
-ImmSetCompositionFontW@8
-ImmSetCompositionStringA@24
-ImmSetCompositionStringW@24
-ImmSetCompositionWindow@8
-ImmSetConversionStatus@12
-ImmSetHotKey@16
-ImmSetOpenStatus@8
-ImmSetStatusWindowPos@8
-ImmShowSoftKeyboard@8
-ImmSimulateHotKey@8
-ImmUnlockIMC@4
-ImmUnlockIMCC@4
-ImmUnregisterWordA@16
-ImmUnregisterWordW@16
diff --git a/winsup/w32api/lib/iphlpapi.def b/winsup/w32api/lib/iphlpapi.def
deleted file mode 100644
index e016243..0000000
--- a/winsup/w32api/lib/iphlpapi.def
+++ /dev/null
@@ -1,49 +0,0 @@
-LIBRARY IPHLPAPI.DLL
-EXPORTS
-AddIPAddress@20
-CreateIpForwardEntry@4
-CreateIpNetEntry@4
-CreateProxyArpEntry@12
-DeleteIPAddress@4
-DeleteIpForwardEntry@4
-DeleteIpNetEntry@4
-DeleteProxyArpEntry@12
-EnableRouter@8
-FlushIpNetTable@4
-GetAdaptersAddresses@20
-GetAdapterIndex@8
-GetAdaptersInfo@8
-GetBestInterface@8
-GetBestRoute@12
-GetExtendedTcpTable@24
-GetFriendlyIfIndex@4
-GetIcmpStatistics@4
-GetIfEntry@4
-GetIfTable@12
-GetInterfaceInfo@8
-GetIpAddrTable@12
-GetIpForwardTable@12
-GetIpNetTable@12
-GetIpStatistics@4
-GetNetworkParams@8
-GetNumberOfInterfaces@4
-GetPerAdapterInfo@12
-GetRTTAndHopCount@16
-GetTcpStatistics@4
-GetTcpTable@12
-GetUdpStatistics@4
-GetUdpTable@12
-GetUniDirectionalAdapterInfo@8
-IpReleaseAddress@4
-IpRenewAddress@4
-NotifyAddrChange@8
-NotifyRouteChange@8
-SendARP@16
-SetAdapterIpAddress@20
-SetIfEntry@4
-SetIpForwardEntry@4
-SetIpNetEntry@4
-SetIpStatistics@4
-SetIpTTL@4
-SetTcpEntry@4
-UnenableRouter@8
diff --git a/winsup/w32api/lib/kernel32.def b/winsup/w32api/lib/kernel32.def
deleted file mode 100644
index b832395..0000000
--- a/winsup/w32api/lib/kernel32.def
+++ /dev/null
@@ -1,874 +0,0 @@
-LIBRARY KERNEL32.dll
-EXPORTS
-ActivateActCtx@8
-AddAtomA@4
-AddAtomW@4
-AddConsoleAliasA@12
-AddConsoleAliasW@12
-AddLocalAlternateComputerNameA@8
-AddLocalAlternateComputerNameW@8
-AddRefActCtx@4
-AddVectoredExceptionHandler@8
-AllocConsole@0
-AllocateUserPhysicalPages@12
-AreFileApisANSI@0
-AssignProcessToJobObject@8
-AttachConsole@4
-BackupRead@28
-BackupSeek@24
-BackupWrite@28
-BaseAttachCompleteThunk@0
-Beep@8
-BeginUpdateResourceA@8
-BeginUpdateResourceW@8
-BuildCommDCBA@8
-BuildCommDCBAndTimeoutsA@12
-BuildCommDCBAndTimeoutsW@12
-BuildCommDCBW@8
-CallNamedPipeA@28
-CallNamedPipeW@28
-CancelDeviceWakeupRequest@4
-CancelIo@4
-CancelTimerQueueTimer@8
-CancelWaitableTimer@4
-ChangeTimerQueueTimer@16
-CheckNameLegalDOS8Dot3A@20
-CheckNameLegalDOS8Dot3W@20
-CheckRemoteDebuggerPresent@8
-ClearCommBreak@4
-ClearCommError@12
-CloseConsoleHandle@4
-CloseHandle@4
-CloseProfileUserMapping@0
-CmdBatNotification@4
-CommConfigDialogA@12
-CommConfigDialogW@12
-CompareFileTime@8
-CompareStringA@24
-CompareStringW@24
-ConnectNamedPipe@8
-ConsoleMenuControl@12
-ContinueDebugEvent@12
-ConvertDefaultLocale@4
-ConvertFiberToThread@0
-ConvertThreadToFiber@4
-ConvertToGlobalHandle@4
-CopyFileA@12
-CopyFileW@12
-CopyFileExA@24
-CopyFileExW@24
-CreateActCtxA@4
-CreateActCtxW@4
-CreateConsoleScreenBuffer@20
-CreateDirectoryA@8
-CreateDirectoryExA@12
-CreateDirectoryExW@12
-CreateDirectoryW@8
-CreateEventA@16
-CreateEventW@16
-CreateFiber@12
-CreateFiberEx@20
-CreateFileA@28
-CreateFileMappingA@24
-CreateFileMappingW@24
-CreateFileW@28
-CreateHardLinkA@12
-CreateHardLinkW@12
-CreateIoCompletionPort@16
-CreateJobObjectA@8
-CreateJobObjectW@8
-CreateMailslotA@16
-CreateMailslotW@16
-CreateMemoryResourceNotification@4
-CreateMutexA@12
-CreateMutexW@12
-CreateNamedPipeA@32
-CreateNamedPipeW@32
-CreatePipe@16
-CreateProcessA@40
-CreateProcessW@40
-CreateRemoteThread@28
-CreateSemaphoreA@16
-CreateSemaphoreW@16
-CreateTapePartition@16
-CreateThread@24
-CreateTimerQueue@0
-CreateTimerQueueTimer@28
-CreateToolhelp32Snapshot@8
-CreateVirtualBuffer@12
-CreateWaitableTimerA@12
-CreateWaitableTimerW@12
-DeactivateActCtx@8
-DebugActiveProcess@4
-DebugActiveProcessStop@4
-DebugBreak@0
-DebugBreakProcess@4
-DebugSetProcessKillOnExit@4
-DefineDosDeviceA@12
-DefineDosDeviceW@12
-DeleteAtom@4
-DeleteCriticalSection@4
-DeleteFiber@4
-DeleteFileA@4
-DeleteFileW@4
-DeleteTimerQueue@4
-DeleteTimerQueueEx@8
-DeleteTimerQueueTimer@12
-DeleteVolumeMountPointA@4
-DeleteVolumeMountPointW@4
-DeviceIoControl@32
-DisableThreadLibraryCalls@4
-DisconnectNamedPipe@4
-DnsHostnameToComputerNameA@12
-DnsHostnameToComputerNameW@12
-DosDateTimeToFileTime@12
-DuplicateConsoleHandle@16
-DuplicateHandle@28
-EndUpdateResourceA@8
-EndUpdateResourceW@8
-EnterCriticalSection@4
-EnumCalendarInfoA@16
-EnumCalendarInfoW@16
-EnumCalendarInfoExA@16
-EnumCalendarInfoExW@16
-EnumDateFormatsA@12
-EnumDateFormatsW@12
-EnumDateFormatsExA@12
-EnumDateFormatsExW@12
-EnumLanguageGroupLocalesA@16
-EnumLanguageGroupLocalesW@16
-EnumResourceLanguagesA@20
-EnumResourceLanguagesW@20
-EnumResourceNamesA@16
-EnumResourceNamesW@16
-EnumResourceTypesA@12
-EnumResourceTypesW@12
-EnumSystemCodePagesA@8
-EnumSystemCodePagesW@8
-EnumSystemGeoID@12
-EnumSystemLanguageGroupsA@12
-EnumSystemLanguageGroupsW@12
-EnumSystemLocalesA@8
-EnumSystemLocalesW@8
-EnumTimeFormatsA@12
-EnumTimeFormatsW@12
-EnumUILanguagesA@12
-EnumUILanguagesW@12
-EraseTape@12
-EscapeCommFunction@8
-ExitProcess@4
-ExitThread@4
-ExitVDM@8
-ExpandEnvironmentStringsA@12
-ExpandEnvironmentStringsW@12
-ExpungeConsoleCommandHistoryA@4
-ExpungeConsoleCommandHistoryW@4
-ExtendVirtualBuffer@8
-FatalAppExitA@8
-FatalAppExitW@8
-FatalExit@4
-FileTimeToDosDateTime@12
-FileTimeToLocalFileTime@8
-FileTimeToSystemTime@8
-FillConsoleOutputAttribute@20
-FillConsoleOutputCharacterA@20
-FillConsoleOutputCharacterW@20
-FindActCtxSectionGuid@20
-FindActCtxSectionStringA@20
-FindActCtxSectionStringW@20
-FindAtomA@4
-FindAtomW@4
-FindClose@4
-FindCloseChangeNotification@4
-FindFirstChangeNotificationA@12
-FindFirstChangeNotificationW@12
-FindFirstFileA@8
-FindFirstFileW@8
-FindFirstFileExA@24
-FindFirstFileExW@24
-FindFirstVolumeA@8
-FindFirstVolumeW@8
-FindFirstVolumeMountPointA@12
-FindFirstVolumeMountPointW@12
-FindNextChangeNotification@4
-FindNextFileA@8
-FindNextFileW@8
-FindNextVolumeA@12
-FindNextVolumeW@12
-FindNextVolumeMountPointA@12
-FindNextVolumeMountPointW@12
-FindResourceA@12
-FindResourceExA@16
-FindResourceExW@16
-FindResourceW@12
-FindVolumeClose@4
-FindVolumeMountPointClose@4
-FlushConsoleInputBuffer@4
-FlushFileBuffers@4
-FlushInstructionCache@12
-FlushViewOfFile@8
-FoldStringA@20
-FoldStringW@20
-FormatMessageA@28
-FormatMessageW@28
-FreeConsole@0
-FreeEnvironmentStringsA@4
-FreeEnvironmentStringsW@4
-FreeLibrary@4
-FreeLibraryAndExitThread@8
-FreeResource@4
-FreeUserPhysicalPages@12
-FreeVirtualBuffer@4
-GenerateConsoleCtrlEvent@8
-GetACP@0
-GetAtomNameA@12
-GetAtomNameW@12
-GetBinaryType@8
-GetBinaryTypeA@8
-GetBinaryTypeW@8
-GetCPInfo@8
-GetCPInfoExA@12
-GetCPInfoExW@12
-GetCalendarInfoA@24
-GetCalendarInfoW@24
-GetCommConfig@12
-GetCommMask@8
-GetCommModemStatus@8
-GetCommProperties@8
-GetCommState@8
-GetCommTimeouts@8
-GetCommandLineA@0
-GetCommandLineW@0
-GetCompressedFileSizeA@8
-GetCompressedFileSizeW@8
-GetComputerNameA@8
-GetComputerNameW@8
-GetComputerNameExA@12
-GetComputerNameExW@12
-GetConsoleAliasA@16
-GetConsoleAliasExesA@8
-GetConsoleAliasExesLengthA@0
-GetConsoleAliasExesLengthW@0
-GetConsoleAliasExesW@8
-GetConsoleAliasW@16
-GetConsoleAliasesA@12
-GetConsoleAliasesLengthA@4
-GetConsoleAliasesLengthW@4
-GetConsoleAliasesW@12
-GetConsoleCP@0
-GetConsoleCommandHistoryA@12
-GetConsoleCommandHistoryLengthA@4
-GetConsoleCommandHistoryLengthW@4
-GetConsoleCommandHistoryW@12
-GetConsoleCursorInfo@8
-GetConsoleDisplayMode@4
-GetConsoleFontInfo@16
-GetConsoleFontSize@8
-GetConsoleHardwareState@12
-GetConsoleInputExeNameA@8
-GetConsoleInputExeNameW@8
-GetConsoleInputWaitHandle@0
-GetConsoleKeyboardLayoutNameA@4
-GetConsoleKeyboardLayoutNameW@4
-GetConsoleMode@8
-GetConsoleOutputCP@0
-GetConsoleProcessList@8
-GetConsoleScreenBufferInfo@8
-GetConsoleTitleA@8
-GetConsoleTitleW@8
-GetConsoleWindow@0
-GetCurrencyFormatA@24
-GetCurrencyFormatW@24
-GetCurrentActCtx@4
-GetCurrentConsoleFont@12
-GetCurrentDirectoryA@8
-GetCurrentDirectoryW@8
-GetCurrentProcess@0
-GetCurrentProcessId@0
-GetCurrentThread@0
-GetCurrentThreadId@0
-GetDateFormatA@24
-GetDateFormatW@24
-GetDefaultCommConfigA@12
-GetDefaultCommConfigW@12
-GetDevicePowerState@8
-GetDiskFreeSpaceA@20
-GetDiskFreeSpaceW@20
-GetDiskFreeSpaceExA@16
-GetDiskFreeSpaceExW@16
-GetDllDirectoryA@8
-GetDllDirectoryW@8
-GetDriveTypeA@4
-GetDriveTypeW@4
-GetErrorMode@0
-GetEnvironmentStrings@0
-GetEnvironmentStringsA@0
-GetEnvironmentStringsW@0
-GetEnvironmentVariableA@12
-GetEnvironmentVariableW@12
-GetExitCodeProcess@8
-GetExitCodeThread@8
-GetFileAttributesA@4
-GetFileAttributesW@4
-GetFileAttributesExA@12
-GetFileAttributesExW@12
-GetFileInformationByHandle@8
-GetFileSize@8
-GetFileSizeEx@8
-GetFileTime@16
-GetFileType@4
-GetFirmwareEnvironmentVariableA@16
-GetFirmwareEnvironmentVariableW@16
-GetFullPathNameA@16
-GetFullPathNameW@16
-GetGeoInfoA@20
-GetGeoInfoW@20
-GetHandleInformation@8
-GetLargestConsoleWindowSize@4
-GetLastError@0
-GetLocalTime@4
-GetLocaleInfoA@16
-GetLocaleInfoW@16
-GetLogicalDriveStringsA@8
-GetLogicalDriveStringsW@8
-GetLogicalDrives@0
-GetLongPathNameA@12
-GetLongPathNameW@12
-GetMailslotInfo@20
-GetModuleFileNameA@12
-GetModuleFileNameW@12
-GetModuleHandleA@4
-GetModuleHandleW@4
-GetModuleHandleExA@12
-GetModuleHandleExW@12
-GetNamedPipeHandleStateA@28
-GetNamedPipeHandleStateW@28
-GetNamedPipeInfo@20
-GetNativeSystemInfo@4
-GetNextVDMCommand@4
-GetNumberFormatA@24
-GetNumberFormatW@24
-GetNumberOfConsoleFonts@0
-GetNumberOfConsoleInputEvents@8
-GetNumberOfConsoleMouseButtons@4
-GetOEMCP@0
-GetOverlappedResult@16
-GetPriorityClass@4
-GetPrivateProfileIntA@16
-GetPrivateProfileIntW@16
-GetPrivateProfileSectionA@16
-GetPrivateProfileSectionNamesA@12
-GetPrivateProfileSectionNamesW@12
-GetPrivateProfileSectionW@16
-GetPrivateProfileStringA@24
-GetPrivateProfileStringW@24
-GetPrivateProfileStructA@20
-GetPrivateProfileStructW@20
-GetProcAddress@8
-GetProcessAffinityMask@12
-GetProcessHandleCount@8
-GetProcessHeap@0
-GetProcessHeaps@8
-GetProcessId@4
-GetProcessIoCounters@8
-GetProcessPriorityBoost@8
-GetProcessShutdownParameters@8
-GetProcessTimes@20
-GetProcessVersion@4
-GetProcessWorkingSetSize@12
-GetProductName@8
-GetProfileIntA@12
-GetProfileIntW@12
-GetProfileSectionA@12
-GetProfileSectionW@12
-GetProfileStringA@20
-GetProfileStringW@20
-GetQueuedCompletionStatus@20
-GetShortPathNameA@12
-GetShortPathNameW@12
-GetStartupInfoA@4
-GetStartupInfoW@4
-GetStdHandle@4
-GetStringTypeA@20
-GetStringTypeExA@20
-GetStringTypeExW@20
-GetStringTypeW@16
-GetSystemDefaultLCID@0
-GetSystemDefaultLangID@0
-GetSystemDefaultUILanguage@0
-GetSystemDirectoryA@8
-GetSystemDirectoryW@8
-GetSystemInfo@4
-GetSystemPowerStatus@4
-GetSystemRegistryQuota@8
-GetSystemTime@4
-GetSystemTimes@12
-GetSystemTimeAdjustment@12
-GetSystemTimeAsFileTime@4
-GetSystemWindowsDirectoryA@8
-GetSystemWindowsDirectoryW@8
-GetSystemWow64DirectoryA@8
-GetSystemWow64DirectoryW@8
-GetTapeParameters@16
-GetTapePosition@20
-GetTapeStatus@4
-GetTempFileNameA@16
-GetTempFileNameW@16
-GetTempPathA@8
-GetTempPathW@8
-GetThreadContext@8
-GetThreadIOPendingFlag@8
-GetThreadLocale@0
-GetThreadPriority@4
-GetThreadPriorityBoost@8
-GetThreadSelectorEntry@12
-GetThreadTimes@20
-GetTickCount@0
-GetTimeFormatA@24
-GetTimeFormatW@24
-GetTimeZoneInformation@4
-GetUserDefaultLCID@0
-GetUserDefaultLangID@0
-GetUserDefaultUILanguage@0
-GetUserGeoID@4
-GetVDMCurrentDirectories@8
-GetVersion@0
-GetVersionExA@4
-GetVersionExW@4
-GetVolumeInformationA@32
-GetVolumeInformationW@32
-GetVolumeNameForVolumeMountPointA@12
-GetVolumeNameForVolumeMountPointW@12
-GetVolumePathNameA@12
-GetVolumePathNameW@12
-GetVolumePathNamesForVolumeNameA@16
-GetVolumePathNamesForVolumeNameW@16
-GetWindowsDirectoryA@8
-GetWindowsDirectoryW@8
-GetWriteWatch@24
-GlobalAddAtomA@4
-GlobalAddAtomW@4
-GlobalAlloc@8
-GlobalCompact@4
-GlobalDeleteAtom@4
-GlobalFindAtomA@4
-GlobalFindAtomW@4
-GlobalFix@4
-GlobalFlags@4
-GlobalFree@4
-GlobalGetAtomNameA@12
-GlobalGetAtomNameW@12
-GlobalHandle@4
-GlobalLock@4
-GlobalMemoryStatus@4
-GlobalMemoryStatusEx@4
-GlobalMemoryStatusVlm@4
-GlobalReAlloc@12
-GlobalSize@4
-GlobalUnWire@4
-GlobalUnfix@4
-GlobalUnlock@4
-GlobalWire@4
-Heap32First@12
-Heap32ListFirst@8
-Heap32ListNext@8
-Heap32Next@4
-HeapAlloc@12
-HeapCompact@8
-HeapCreate@12
-HeapCreateTagsW@16
-HeapDestroy@4
-HeapExtend@16
-HeapFree@12
-HeapLock@4
-HeapQueryInformation@20
-HeapQueryTagW@20
-HeapReAlloc@16
-HeapSetInformation@16
-HeapSize@12
-HeapSummary@12
-HeapUnlock@4
-HeapUsage@20
-HeapValidate@12
-HeapWalk@8
-InitAtomTable@4
-InitializeCriticalSection@4
-InitializeCriticalSectionAndSpinCount@8
-InitializeSListHead@4
-InterlockedCompareExchange@12
-InterlockedDecrement@4
-InterlockedExchange@8
-InterlockedExchangeAdd@8
-InterlockedFlushSList@4
-InterlockedIncrement@4
-InterlockedPopEntrySList@4
-InterlockedPushEntrySList@8
-InvalidateConsoleDIBits@8
-IsBadCodePtr@4
-IsBadHugeReadPtr@8
-IsBadHugeWritePtr@8
-IsBadReadPtr@8
-IsBadStringPtrA@8
-IsBadStringPtrW@8
-IsBadWritePtr@8
-IsDBCSLeadByte@4
-IsDBCSLeadByteEx@8
-IsDebuggerPresent@0
-IsProcessInJob@12
-IsProcessorFeaturePresent@4
-IsSystemResumeAutomatic@0
-IsValidCodePage@4
-IsValidLanguageGroup@8
-IsValidLocale@8
-IsWow64Process@8
-LCMapStringA@24
-LCMapStringW@24
-LeaveCriticalSection@4
-LoadLibraryA@4
-LoadLibraryExA@12
-LoadLibraryExW@12
-LoadLibraryW@4
-LoadModule@8
-LoadResource@8
-LocalAlloc@8
-LocalCompact@4
-LocalFileTimeToFileTime@8
-LocalFlags@4
-LocalFree@4
-LocalHandle@4
-LocalLock@4
-LocalReAlloc@12
-LocalShrink@8
-LocalSize@4
-LocalUnlock@4
-LockFile@20
-LockFileEx@24
-LockResource@4
-MapUserPhysicalPages@12
-MapUserPhysicalPagesScatter@12
-MapViewOfFile@20
-MapViewOfFileEx@24
-MapViewOfFileVlm@28
-Module32First@8
-Module32FirstW@8
-Module32Next@8
-Module32NextW@8
-MoveFileA@8
-MoveFileW@8
-MoveFileExA@12
-MoveFileExW@12
-MoveFileWithProgressA@20
-MoveFileWithProgressW@20
-MulDiv@12
-MultiByteToWideChar@24
-OpenConsoleW@16
-OpenEventA@12
-OpenEventW@12
-OpenFile@12
-OpenFileMappingA@12
-OpenFileMappingW@12
-OpenJobObjectA@12
-OpenJobObjectW@12
-OpenMutexA@12
-OpenMutexW@12
-OpenProcess@12
-OpenProfileUserMapping@0
-OpenSemaphoreA@12
-OpenSemaphoreW@12
-OpenThread@12
-OpenWaitableTimerA@12
-OpenWaitableTimerW@12
-OutputDebugStringA@4
-OutputDebugStringW@4
-PeekConsoleInputA@16
-PeekConsoleInputW@16
-PeekNamedPipe@24
-PostQueuedCompletionStatus@16
-PrepareTape@12
-Process32First@8
-Process32FirstW@8
-Process32Next@8
-Process32NextW@8
-ProcessIdToSessionId@8
-PulseEvent@4
-PurgeComm@8
-QueryActCtxW@28
-QueryDosDeviceA@12
-QueryDosDeviceW@12
-QueryInformationJobObject@20
-QueryMemoryResourceNotification@8
-QueryPerformanceCounter@4
-QueryPerformanceFrequency@4
-QueryWin31IniFilesMappedToRegistry@16
-QueueUserAPC@12
-QueueUserWorkItem@12
-RaiseException@16
-ReadConsoleA@20
-ReadConsoleInputA@16
-ReadConsoleInputW@16
-ReadConsoleInputExA@20
-ReadConsoleInputExW@20
-ReadConsoleOutputA@20
-ReadConsoleOutputAttribute@20
-ReadConsoleOutputCharacterA@20
-ReadConsoleOutputCharacterW@20
-ReadConsoleOutputW@20
-ReadConsoleW@20
-ReadDirectoryChangesW@32
-ReadFile@20
-ReadFileEx@20
-ReadFileScatter@20
-ReadFileVlm@20
-ReadProcessMemory@20
-ReadProcessMemoryVlm@20
-RegisterConsoleVDM@44
-RegisterWaitForInputIdle@4
-RegisterWaitForSingleObject@24
-RegisterWaitForSingleObjectEx@20
-RegisterWowBaseHandlers@4
-RegisterWowExec@4
-ReleaseActCtx@4
-ReleaseMutex@4
-ReleaseSemaphore@12
-RemoveDirectoryA@4
-RemoveDirectoryW@4
-RemoveVectoredExceptionHandler@4
-ReOpenFile@16
-ReplaceFile@24
-ReplaceFileA@24
-ReplaceFileW@24
-RequestWakeupLatency@4
-ResetEvent@4
-ResetWriteWatch@8
-RestoreLastError@4
-ResumeThread@4
-RtlFillMemory@12
-RtlMoveMemory@12
-RtlUnwind@16
-RtlZeroMemory@8
-ScrollConsoleScreenBufferA@20
-ScrollConsoleScreenBufferW@20
-SearchPathA@24
-SearchPathW@24
-SetCalendarInfoA@16
-SetCalendarInfoW@16
-SetCommBreak@4
-SetCommConfig@12
-SetCommMask@8
-SetCommState@8
-SetCommTimeouts@8
-SetComputerNameA@4
-SetComputerNameW@4
-SetComputerNameExA@8
-SetComputerNameExW@8
-SetConsoleActiveScreenBuffer@4
-SetConsoleCP@4
-SetConsoleCommandHistoryMode@4
-SetConsoleCtrlHandler@8
-SetConsoleCursor@8
-SetConsoleCursorInfo@8
-SetConsoleCursorPosition@8
-SetConsoleDisplayMode@12
-SetConsoleFont@8
-SetConsoleHardwareState@12
-SetConsoleIcon@4
-SetConsoleInputExeNameA@4
-SetConsoleInputExeNameW@4
-SetConsoleKeyShortcuts@16
-SetConsoleMaximumWindowSize@8
-SetConsoleMenuClose@4
-SetConsoleMode@8
-SetConsoleNumberOfCommandsA@8
-SetConsoleNumberOfCommandsW@8
-SetConsoleOutputCP@4
-SetConsolePalette@12
-SetConsoleScreenBufferSize@8
-SetConsoleTextAttribute@8
-SetConsoleTitleA@4
-SetConsoleTitleW@4
-SetConsoleWindowInfo@12
-SetCriticalSectionSpinCount@8
-SetCurrentDirectoryA@4
-SetCurrentDirectoryW@4
-SetDefaultCommConfigA@12
-SetDefaultCommConfigW@12
-SetDllDirectoryA@4
-SetDllDirectoryW@4
-SetEndOfFile@4
-SetEnvironmentVariableA@8
-SetEnvironmentVariableW@8
-SetErrorMode@4
-SetEvent@4
-SetFileApisToANSI@0
-SetFileApisToOEM@0
-SetFileAttributesA@8
-SetFileAttributesW@8
-SetFilePointer@16
-SetFilePointerEx@20
-SetFileShortNameA@8
-SetFileShortNameW@8
-SetFileTime@16
-SetFileValidData@12
-SetHandleCount@4
-SetHandleInformation@12
-SetInformationJobObject@16
-SetLastConsoleEventActive@0
-SetLastError@4
-SetLocalTime@4
-SetLocaleInfoA@12
-SetLocaleInfoW@12
-SetMailslotInfo@8
-SetNamedPipeHandleState@16
-SetPriorityClass@8
-SetProcessAffinityMask@8
-SetProcessPriorityBoost@8
-SetProcessShutdownParameters@8
-SetProcessWorkingSetSize@12
-SetStdHandle@8
-SetSystemPowerState@8
-SetSystemTime@4
-SetSystemTimeAdjustment@8
-SetTapeParameters@12
-SetTapePosition@24
-SetThreadAffinityMask@8
-SetThreadContext@8
-SetThreadExecutionState@4
-SetThreadIdealProcessor@8
-SetThreadLocale@4
-SetThreadPriority@8
-SetThreadPriorityBoost@8
-SetTimeZoneInformation@4
-SetTimerQueueTimer@24
-SetUnhandledExceptionFilter@4
-SetUserGeoID@4
-SetVDMCurrentDirectories@8
-SetVolumeLabelA@8
-SetVolumeLabelW@8
-SetVolumeMountPointA@8
-SetVolumeMountPointW@8
-SetWaitableTimer@24
-SetupComm@12
-ShowConsoleCursor@8
-SignalObjectAndWait@16
-SizeofResource@8
-Sleep@4
-SleepEx@8
-SuspendThread@4
-SwitchToFiber@4
-SwitchToThread@0
-SystemTimeToFileTime@8
-SystemTimeToTzSpecificLocalTime@12
-TerminateJobObject@8
-TerminateProcess@8
-TerminateThread@8
-Thread32First@8
-Thread32Next@8
-TlsAlloc@0
-TlsFree@4
-TlsGetValue@4
-TlsSetValue@8
-TransactNamedPipe@28
-TransmitCommChar@8
-TrimVirtualBuffer@4
-TryEnterCriticalSection@4
-UTRegister@28
-UTUnRegister@4
-UnhandledExceptionFilter@4
-UnlockFile@20
-UnlockFileEx@20
-UnmapViewOfFile@4
-UnmapViewOfFileVlm@4
-UnregisterWait@4
-UnregisterWaitEx@8
-UpdateResourceA@24
-UpdateResourceW@24
-VDMConsoleOperation@8
-VDMOperationStarted@4
-VerLanguageNameA@12
-VerLanguageNameW@12
-VerSetConditionMask@16
-VerifyConsoleIoHandle@4
-VerifyVersionInfoA@16
-VerifyVersionInfoW@16
-VirtualAlloc@16
-VirtualAllocEx@20
-VirtualAllocVlm@24
-VirtualBufferExceptionHandler@12
-VirtualFree@12
-VirtualFreeEx@16
-VirtualFreeVlm@20
-VirtualLock@8
-VirtualProtect@16
-VirtualProtectEx@20
-VirtualProtectVlm@24
-VirtualQuery@12
-VirtualQueryEx@16
-VirtualQueryVlm@16
-VirtualUnlock@8
-WaitCommEvent@12
-WaitForDebugEvent@8
-WaitForMultipleObjects@16
-WaitForMultipleObjectsEx@20
-WaitForSingleObject@8
-WaitForSingleObjectEx@12
-WaitNamedPipeA@8
-WaitNamedPipeW@8
-WideCharToMultiByte@32
-WinExec@8
-WriteConsoleA@20
-WriteConsoleInputA@16
-WriteConsoleInputVDMA@16
-WriteConsoleInputVDMW@16
-WriteConsoleInputW@16
-WriteConsoleOutputA@20
-WriteConsoleOutputAttribute@20
-WriteConsoleOutputCharacterA@20
-WriteConsoleOutputCharacterW@20
-WriteConsoleOutputW@20
-WriteConsoleW@20
-WriteFile@20
-WriteFileEx@20
-WriteFileGather@20
-WriteFileVlm@20
-WritePrivateProfileSectionA@12
-WritePrivateProfileSectionW@12
-WritePrivateProfileStringA@16
-WritePrivateProfileStringW@16
-WritePrivateProfileStructA@20
-WritePrivateProfileStructW@20
-WriteProcessMemory@20
-WriteProcessMemoryVlm@20
-WriteProfileSectionA@8
-WriteProfileSectionW@8
-WriteProfileStringA@12
-WriteProfileStringW@12
-WriteTapemark@16
-; yes, this is here and not in wtsapi32.dll
-WTSGetActiveConsoleSessionId@0
-ZombifyActCtx@4
-_hread@12
-_hwrite@12
-_lclose@4
-_lcreat@8
-_llseek@12
-_lopen@8
-_lread@12
-_lwrite@12
-lstrcat@8
-lstrcatA@8
-lstrcatW@8
-lstrcmp@8
-lstrcmpA@8
-lstrcmpW@8
-lstrcmpi@8
-lstrcmpiA@8
-lstrcmpiW@8
-lstrcpy@8
-lstrcpyA@8
-lstrcpyW@8
-lstrcpyn@12
-lstrcpynA@12
-lstrcpynW@12
-lstrlen@4
-lstrlenA@4
-lstrlenW@4
diff --git a/winsup/w32api/lib/largeint.c b/winsup/w32api/lib/largeint.c
deleted file mode 100644
index 531937e..0000000
--- a/winsup/w32api/lib/largeint.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- largeint.c
-
- Large (64 bits) integer arithmetics library
-
- Written by Anders Norlander <anorland@hem2.passagen.se>
-
- This file is part of a free library for the Win32 API.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-*/
-
-#define __COMPILING_LARGEINT
-
-#include <largeint.h>
-
-__int64 WINAPI
-LargeIntegerAdd (__int64 i1, __int64 i2)
-{
- return i1 + i2;
-}
-
-__int64 WINAPI
-LargeIntegerSubtract (__int64 i1, __int64 i2)
-{
- return i1 - i2;
-}
-
-__int64 WINAPI
-LargeIntegerArithmeticShift (__int64 i, int n)
-{
- return i >> n;
-}
-
-__int64 WINAPI
-LargeIntegerShiftLeft (__int64 i, int n)
-{
- return i << n;
-}
-
-__int64 WINAPI
-LargeIntegerShiftRight (__int64 i, int n)
-{
- return i >> n;
-}
-
-__int64 WINAPI
-LargeIntegerNegate (__int64 i)
-{
- return -i;
-}
-
-__int64 WINAPI
-ConvertLongToLargeInteger (LONG l)
-{
- return (__int64) l;
-}
-
-__int64 WINAPI
-ConvertUlongToLargeInteger (ULONG ul)
-{
- return _toi(_toui(ul));
-}
-
-__int64 WINAPI
-EnlargedIntegerMultiply (LONG l1, LONG l2)
-{
- return _toi(l1) * _toi(l2);
-}
-
-__int64 WINAPI
-EnlargedUnsignedMultiply (ULONG ul1, ULONG ul2)
-{
- return _toi(_toui(ul1) * _toui(ul2));
-}
-
-__int64 WINAPI
-ExtendedIntegerMultiply (__int64 i, LONG l)
-{
- return i * _toi(l);
-}
-
-__int64 WINAPI
-LargeIntegerMultiply (__int64 i1, __int64 i2)
-{
- return i1 * i2;
-}
-
-__int64 WINAPI LargeIntegerDivide (__int64 i1, __int64 i2, __int64 *remainder)
-{
- if (remainder)
- *remainder = i1 % i2;
- return i1 / i2;
-}
-
-ULONG WINAPI
-EnlargedUnsignedDivide (unsigned __int64 i1, ULONG i2, PULONG remainder)
-{
- if (remainder)
- *remainder = i1 % _toi(i2);
- return i1 / _toi(i2);
-}
-__int64 WINAPI
-ExtendedLargeIntegerDivide (__int64 i1, ULONG i2, PULONG remainder)
-{
- if (remainder)
- *remainder = i1 % _toi(i2);
- return i1 / _toi(i2);
-}
-
-/* FIXME: what is this function supposed to do? */
-__int64 WINAPI ExtendedMagicDivide (__int64 i1, __int64 i2, int n)
-{
- return 0;
-}
diff --git a/winsup/w32api/lib/lz32.def b/winsup/w32api/lib/lz32.def
deleted file mode 100644
index 7ea6213..0000000
--- a/winsup/w32api/lib/lz32.def
+++ /dev/null
@@ -1,14 +0,0 @@
-LIBRARY LZ32.DLL
-EXPORTS
-CopyLZFile@8
-GetExpandedNameA@8
-GetExpandedNameW@8
-LZClose@4
-LZCopy@8
-LZDone@0
-LZInit@4
-LZOpenFileA@12
-LZOpenFileW@12
-LZRead@12
-LZSeek@12
-LZStart@0
diff --git a/winsup/w32api/lib/mapi32.def b/winsup/w32api/lib/mapi32.def
deleted file mode 100644
index 2e4fe42..0000000
--- a/winsup/w32api/lib/mapi32.def
+++ /dev/null
@@ -1,164 +0,0 @@
-LIBRARY MAPI32.DLL
-EXPORTS
-BuildDisplayTable@40
-CbOfEncoded@4
-CchOfEncoding@4
-ChangeIdleRoutine@28
-CloseIMsgSession@4
-CreateIProp@24
-CreateTable@36
-DeinitMapiUtil@0
-DeregisterIdleRoutine@4
-EnableIdleRoutine@8
-EncodeID@12
-FBadColumnSet@4
-FBadEntryList@4
-FBadProp@4
-FBadPropTag@4
-FBadRestriction@4
-FBadRglpNameID@8
-FBadRglpszA@8
-FBadRglpszW@8
-FBadRow@4
-FBadRowSet@4
-FBadSortOrderSet@4
-FBinFromHex@8
-FDecodeID@12
-FEqualNames@8
-FPropCompareProp@12
-FPropContainsProp@12
-FPropExists@8
-FreePadrlist@4
-FreeProws@4
-FtAdcFt@20
-FtAddFt@16
-FtDivFtBogus@20
-FtMulDw@12
-FtMulDwDw@8
-FtNegFt@8
-FtSubFt@16
-FtgRegisterIdleRoutine@20
-GetAttribIMsgOnIStg@12
-GetTnefStreamCodepage
-GetTnefStreamCodepage@12
-HexFromBin@12
-HrAddColumns@16
-HrAddColumnsEx@20
-HrAllocAdviseSink@12
-HrComposeEID@28
-HrComposeMsgID@24
-HrDecomposeEID@28
-HrDecomposeMsgID@24
-HrDispatchNotifications@4
-HrEntryIDFromSz@12
-HrGetOneProp@12
-HrIStorageFromStream@16
-HrQueryAllRows@24
-HrSetOneProp@8
-HrSzFromEntryID@12
-HrThisThreadAdviseSink@8
-HrValidateIPMSubtree@20
-HrValidateParameters@8
-InstallFilterHook@4
-IsBadBoundedStringPtr@8
-LAUNCHWIZARD
-LPropCompareProp@8
-LaunchWizard@20
-LpValFindProp@12
-MAPI_NSCP_SynchronizeClient@8
-MAPIAddress@44
-MAPIAdminProfiles
-MAPIAdminProfiles@8
-MAPIAllocateBuffer
-MAPIAllocateBuffer@8
-MAPIAllocateMore
-MAPIAllocateMore@12
-MAPIDeinitIdle@0
-MAPIDeleteMail@20
-MAPIDetails@20
-MAPIFindNext@28
-MAPIFreeBuffer
-MAPIFreeBuffer@4
-MAPIGetDefaultMalloc@0
-MAPIGetNetscapeVersion@0
-MAPIInitIdle@4
-MAPIInitialize
-MAPIInitialize@4
-MAPILogoff@16
-MAPILogon@24
-MAPILogonEx
-MAPILogonEx@20
-MAPIOpenFormMgr
-MAPIOpenFormMgr@8
-MAPIOpenLocalFormContainer
-MAPIOpenLocalFormContainer@4
-MAPIReadMail@24
-MAPIResolveName@24
-MAPISaveMail@24
-MAPISendDocuments@20
-MAPISendMail
-MAPISendMail@20
-MAPIUninitialize
-MAPIUninitialize@0
-MNLS_CompareStringW@24
-MNLS_IsBadStringPtrW@8
-MNLS_MultiByteToWideChar@24
-MNLS_WideCharToMultiByte@32
-MNLS_lstrcmpW@8
-MNLS_lstrcpyW@8
-MNLS_lstrlenW@4
-MapStorageSCode@4
-OpenIMsgOnIStg@44
-OpenIMsgSession@12
-OpenStreamOnFile
-OpenStreamOnFile@24
-OpenTnefStream
-OpenTnefStream@28
-OpenTnefStreamEx
-OpenTnefStreamEx@32
-PRProviderInit
-PpropFindProp@12
-PropCopyMore@16
-RTFSync
-RTFSync@12
-ScBinFromHexBounded@12
-ScCopyNotifications@16
-ScCopyProps@16
-ScCountNotifications@12
-ScCountProps@12
-ScCreateConversationIndex@16
-ScDupPropset@16
-ScGenerateMuid@4
-ScInitMapiUtil@4
-ScLocalPathFromUNC@12
-ScMAPIXFromCMC
-ScMAPIXFromSMAPI
-ScRelocNotifications@20
-ScRelocProps@20
-ScSplEntry
-ScUNCFromLocalPath@12
-SetAttribIMsgOnIStg@16
-SwapPlong@8
-SwapPword@8
-SzFindCh@8
-SzFindLastCh@8
-SzFindSz@8
-UFromSz@4
-UNKOBJ_COFree@8
-UNKOBJ_Free@8
-UNKOBJ_FreeRows@8
-UNKOBJ_ScAllocate@12
-UNKOBJ_ScAllocateMore@16
-UNKOBJ_ScCOAllocate@12
-UNKOBJ_ScCOReallocate@12
-UNKOBJ_ScSzFromIdsAlloc@20
-UlAddRef@4
-UlFromSzHex@4
-UlPropSize@4
-UlRelease@4
-WrapCompressedRTFStream
-WrapCompressedRTFStream@12
-WrapProgress@20
-WrapStoreEntryID@24
-__CPPValidateParameters@8
-__ValidateParameters@8
diff --git a/winsup/w32api/lib/mfcuia32.def b/winsup/w32api/lib/mfcuia32.def
deleted file mode 100644
index fb954e3..0000000
--- a/winsup/w32api/lib/mfcuia32.def
+++ /dev/null
@@ -1,12 +0,0 @@
-LIBRARY MFCUIA32.DLL
-EXPORTS
-OleUIAddVerbMenu@36
-OleUIBusy@4
-OleUICanConvertOrActivateAs@12
-OleUIChangeIcon@4
-OleUIConvert@4
-OleUIEditLinks@4
-OleUIInsertObject@4
-OleUIPasteSpecial@4
-OleUIPromptUser
-OleUIUpdateLinks@16
diff --git a/winsup/w32api/lib/mgmtapi.def b/winsup/w32api/lib/mgmtapi.def
deleted file mode 100644
index 652621c..0000000
--- a/winsup/w32api/lib/mgmtapi.def
+++ /dev/null
@@ -1,14 +0,0 @@
-LIBRARY MGMTAPI.DLL
-EXPORTS
-SnmpMgrClose@4
-SnmpMgrCtl@28
-SnmpMgrGetTrap@24
-SnmpMgrGetTrapEx@32
-;SnmpMgrMIB2Disk@8
-SnmpMgrOidToStr@8
-SnmpMgrOpen@16
-SnmpMgrRequest@20
-SnmpMgrStrToOid@8
-SnmpMgrTrapListen@4
-serverTrapThread@4
-;dbginit@8
diff --git a/winsup/w32api/lib/mlang-uuid.c b/winsup/w32api/lib/mlang-uuid.c
deleted file mode 100644
index c7cab7c..0000000
--- a/winsup/w32api/lib/mlang-uuid.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/* mlang-uuid.c */
-/* Generate GUIDs for Object Multi Language interfaces */
-
-/* All IIDs defined in this file were extracted from
- * HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\ */
-
-/* All CLSIDs defined in this file were extracted from
- * HKEY_CLASSES_ROOT\CLSID\ */
-
-#define INITGUID
-#include <basetyps.h>
-// Multi Language Support CLSID
-DEFINE_GUID(CLSID_CMultiLanguage,0x275c23e2,0x3747,0x11d0,0x9f,0xea,0,0xaa,0,0x3f,0x86,0x46);
diff --git a/winsup/w32api/lib/mpr.def b/winsup/w32api/lib/mpr.def
deleted file mode 100644
index f8dde41..0000000
--- a/winsup/w32api/lib/mpr.def
+++ /dev/null
@@ -1,72 +0,0 @@
-LIBRARY MPR.DLL
-EXPORTS
-MultinetGetConnectionPerformanceA@8
-MultinetGetConnectionPerformanceW@8
-RestoreConnectionA0@8
-WNetAddConnection2A@16
-WNetAddConnection2W@16
-WNetAddConnection3A@20
-WNetAddConnection3W@20
-WNetAddConnectionA@12
-WNetAddConnectionW@12
-WNetCancelConnection2A@12
-WNetCancelConnection2W@12
-WNetCancelConnectionA@8
-WNetCancelConnectionW@8
-WNetClearConnections@4
-WNetCloseEnum@4
-WNetConnectionDialog1A@4
-WNetConnectionDialog1W@4
-WNetConnectionDialog2@16
-WNetConnectionDialog@8
-WNetDirectoryNotifyA@12
-WNetDirectoryNotifyW@12
-WNetDisconnectDialog1A@4
-WNetDisconnectDialog1W@4
-WNetDisconnectDialog2@16
-WNetDisconnectDialog@8
-WNetEnumResourceA@16
-WNetEnumResourceW@16
-WNetFMXEditPerm@12
-WNetFMXGetPermCaps@4
-WNetFMXGetPermHelp@24
-WNetFormatNetworkNameA@24
-WNetFormatNetworkNameW@24
-WNetGetConnection2A@12
-WNetGetConnection2W@12
-WNetGetConnectionA@12
-WNetGetConnectionW@12
-WNetGetDirectoryTypeA@12
-WNetGetDirectoryTypeW@12
-WNetGetFormatNameProc@4
-WNetGetLastErrorA@20
-WNetGetLastErrorW@20
-WNetGetNetworkInformationA@8
-WNetGetNetworkInformationW@8
-WNetGetPropertyTextA@24
-WNetGetPropertyTextW@24
-WNetGetProviderNameA@12
-WNetGetProviderNameW@12
-WNetGetResourceInformationA@16
-WNetGetResourceInformationW@16
-WNetGetResourceParentA@12
-WNetGetResourceParentW@12
-WNetGetSearchDialog@4
-WNetGetUniversalNameA@16
-WNetGetUniversalNameW@16
-WNetGetUserA@12
-WNetGetUserW@12
-WNetLogonNotify@36
-WNetOpenEnumA@20
-WNetOpenEnumW@20
-WNetPasswordChangeNotify@32
-WNetPropertyDialogA@20
-WNetPropertyDialogW@20
-WNetRestoreConnection@8
-WNetSetConnectionA@12
-WNetSetConnectionW@12
-WNetSetLastErrorA@12
-WNetSetLastErrorW@12
-WNetSupportGlobalEnum@4
-WNetUseConnectionA@32
-WNetUseConnectionW@32
diff --git a/winsup/w32api/lib/mprapi.def b/winsup/w32api/lib/mprapi.def
deleted file mode 100644
index 3320f8f..0000000
--- a/winsup/w32api/lib/mprapi.def
+++ /dev/null
@@ -1,123 +0,0 @@
-LIBRARY MPRAPI.DLL
-EXPORTS
-CompressPhoneNumber@8
-MprAdminBufferFree@4
-MprAdminConnectionClearStats@8
-MprAdminConnectionEnum@28
-MprAdminConnectionGetInfo@16
-MprAdminDeregisterConnectionNotification@8
-MprAdminDeviceEnum@16
-MprAdminEstablishDomainRasServer@12
-MprAdminGetErrorString@8
-MprAdminGetPDCServer@12
-MprAdminInterfaceConnect@16
-MprAdminInterfaceCreate@16
-MprAdminInterfaceDelete@8
-MprAdminInterfaceDeviceGetInfo@20
-MprAdminInterfaceDeviceSetInfo@20
-MprAdminInterfaceDisconnect@8
-MprAdminInterfaceEnum@28
-MprAdminInterfaceGetCredentials@20
-MprAdminInterfaceGetCredentialsEx@16
-MprAdminInterfaceGetHandle@16
-MprAdminInterfaceGetInfo@16
-MprAdminInterfaceQueryUpdateResult@16
-MprAdminInterfaceSetCredentials@20
-MprAdminInterfaceSetCredentialsEx@16
-MprAdminInterfaceSetInfo@16
-MprAdminInterfaceTransportAdd@20
-MprAdminInterfaceTransportGetInfo@20
-MprAdminInterfaceTransportRemove@12
-MprAdminInterfaceTransportSetInfo@20
-MprAdminInterfaceUpdatePhonebookInfo@8
-MprAdminInterfaceUpdateRoutes@16
-MprAdminIsDomainRasServer@12
-MprAdminIsServiceRunning@4
-MprAdminMIBBufferFree@4
-MprAdminMIBEntryCreate@20
-MprAdminMIBEntryDelete@20
-MprAdminMIBEntryGet@28
-MprAdminMIBEntryGetFirst@28
-MprAdminMIBEntryGetNext@28
-MprAdminMIBEntrySet@20
-MprAdminMIBServerConnect@8
-MprAdminMIBServerDisconnect@4
-MprAdminPortClearStats@8
-MprAdminPortDisconnect@8
-MprAdminPortEnum@32
-MprAdminPortGetInfo@16
-MprAdminPortReset@8
-MprAdminRegisterConnectionNotification@8
-MprAdminSendUserMessage@12
-MprAdminServerConnect@8
-MprAdminServerDisconnect@4
-MprAdminServerGetCredentials@12
-MprAdminServerGetInfo@12
-MprAdminServerSetCredentials@12
-MprAdminServerSetInfo@12
-MprAdminTransportCreate@32
-MprAdminTransportGetInfo@24
-MprAdminTransportSetInfo@24
-MprAdminUserGetInfo@16
-MprAdminUserSetInfo@16
-MprConfigBufferFree@4
-MprConfigGetFriendlyName@16
-MprConfigGetGuidName@16
-MprConfigInterfaceCreate@16
-MprConfigInterfaceDelete@8
-MprConfigInterfaceEnum@28
-MprConfigInterfaceGetHandle@12
-MprConfigInterfaceGetInfo@20
-MprConfigInterfaceSetInfo@16
-MprConfigInterfaceTransportAdd@28
-MprConfigInterfaceTransportEnum@32
-MprConfigInterfaceTransportGetHandle@16
-MprConfigInterfaceTransportGetInfo@20
-MprConfigInterfaceTransportRemove@12
-MprConfigInterfaceTransportSetInfo@20
-MprConfigServerBackup@8
-MprConfigServerConnect@8
-MprConfigServerDisconnect@4
-MprConfigServerGetInfo@12
-MprConfigServerInstall@8
-MprConfigServerRefresh@4
-MprConfigServerRestore@8
-MprConfigTransportCreate@36
-MprConfigTransportDelete@8
-MprConfigTransportEnum@28
-MprConfigTransportGetHandle@12
-MprConfigTransportGetInfo@28
-MprConfigTransportSetInfo@28
-MprDomainQueryAccess@8
-MprDomainQueryRasServer@12
-MprDomainRegisterRasServer@12
-MprDomainSetAccess@8
-MprGetUsrParams@12
-MprInfoBlockAdd@24
-MprInfoBlockFind@20
-MprInfoBlockQuerySize@4
-MprInfoBlockRemove@12
-MprInfoBlockSet@24
-MprInfoCreate@8
-MprInfoDelete@4
-MprInfoDuplicate@8
-MprInfoRemoveAll@8
-MprPortSetUsage@4
-MprSetupIpInIpInterfaceFriendlyNameCreate@8
-MprSetupIpInIpInterfaceFriendlyNameDelete@8
-MprSetupIpInIpInterfaceFriendlyNameEnum@12
-MprSetupIpInIpInterfaceFriendlyNameFree@4
-RasAdminConnectionClearStats@8
-RasAdminConnectionEnum@28
-RasAdminConnectionGetInfo@16
-MprAdminConnectionRemoveQuarantine@12
-RasAdminGetErrorString@12
-MprAdminGetPDCServer@12
-RasAdminPortClearStats@8
-RasAdminPortDisconnect@8
-RasAdminPortEnum@32
-RasAdminPortGetInfo@16
-RasAdminPortReset@8
-RasAdminUserGetInfo@12
-RasAdminUserSetInfo@12
-RasPrivilegeAndCallBackNumber@8
diff --git a/winsup/w32api/lib/mqrt.def b/winsup/w32api/lib/mqrt.def
deleted file mode 100644
index 0456e22..0000000
--- a/winsup/w32api/lib/mqrt.def
+++ /dev/null
@@ -1,40 +0,0 @@
-LIBRARY MQRT.DLL
-EXPORTS
-MQADsPathToFormatName@12
-MQBeginTransaction@4
-MQCloseCursor@4
-MQCloseQueue@4
-MQCreateCursor@8
-MQCreateInternalCert@4
-MQCreateQueue@16
-MQDeleteInternalCert@0
-MQDeleteQueue@4
-MQFreeMemory@4
-MQFreeSecurityContext@4
-MQGetInternalCert@4
-MQGetInternalCertificate@12
-MQGetMachineProperties@12
-MQGetOverlappedResult@4
-MQGetPrivateComputerInformation@8
-MQGetQueueProperties@8
-MQGetQueueSecurity@20
-MQGetSecurityContext@12
-MQGetSecurityContextEx@12
-MQGetUserCerts@12
-MQHandleToFormatName@12
-MQInstanceToFormatName@12
-MQLocateBegin@20
-MQLocateEnd@4
-MQLocateNext@12
-MQMgmtAction@12
-MQMgmtGetInfo@12
-MQOpenQueue@16
-MQPathNameToFormatName@12
-MQPurgeQueue@4
-MQReceiveMessage@32
-MQReceiveMessageByLookupId@32
-MQRegisterUserCert@4
-MQRemoveUserCert@4
-MQSendMessage@12
-MQSetQueueProperties@8
-MQSetQueueSecurity@12
diff --git a/winsup/w32api/lib/msacm32.def b/winsup/w32api/lib/msacm32.def
deleted file mode 100644
index 356b3af..0000000
--- a/winsup/w32api/lib/msacm32.def
+++ /dev/null
@@ -1,46 +0,0 @@
-LIBRARY MSACM32.DLL
-EXPORTS
-XRegThunkEntry@36
-acmDriverAddA@20
-acmDriverAddW@20
-acmDriverClose@8
-acmDriverDetailsA@12
-acmDriverDetailsW@12
-acmDriverEnum@12
-acmDriverID@12
-acmDriverMessage@16
-acmDriverOpen@12
-acmDriverPriority@12
-acmDriverRemove@8
-acmFilterChooseA@4
-acmFilterChooseW@4
-acmFilterDetailsA@12
-acmFilterDetailsW@12
-acmFilterEnumA@20
-acmFilterEnumW@20
-acmFilterTagDetailsA@12
-acmFilterTagDetailsW@12
-acmFilterTagEnumA@20
-acmFilterTagEnumW@20
-acmFormatChooseA@4
-acmFormatChooseW@4
-acmFormatDetailsA@12
-acmFormatDetailsW@12
-acmFormatEnumA@20
-acmFormatEnumW@20
-acmFormatSuggest@20
-acmFormatTagDetailsA@12
-acmFormatTagDetailsW@12
-acmFormatTagEnumA@20
-acmFormatTagEnumW@20
-acmGetVersion@0
-acmMessage32@24
-acmMetrics@12
-acmStreamClose@8
-acmStreamConvert@12
-acmStreamMessage@16
-acmStreamOpen@32
-acmStreamPrepareHeader@12
-acmStreamReset@8
-acmStreamSize@16
-acmStreamUnprepareHeader@12
diff --git a/winsup/w32api/lib/mscms.def b/winsup/w32api/lib/mscms.def
deleted file mode 100644
index a3d3ec2..0000000
--- a/winsup/w32api/lib/mscms.def
+++ /dev/null
@@ -1,55 +0,0 @@
-LIBRARY mscms.dll
-EXPORTS
-AssociateColorProfileWithDeviceA@12
-AssociateColorProfileWithDeviceW@12
-CheckBitmapBits@36
-CheckColors@20
-CloseColorProfile@4
-ConvertColorNameToIndex@16
-ConvertIndexToColorName@16
-CreateColorTransformA@16
-CreateColorTransformW@16
-CreateDeviceLinkProfile@28
-CreateMultiProfileTransform@24
-CreateProfileFromLogColorSpaceA@8
-CreateProfileFromLogColorSpaceW@8
-DeleteColorTransform@4
-DisassociateColorProfileFromDeviceA@12
-DisassociateColorProfileFromDeviceW@12
-EnumColorProfilesA@20
-EnumColorProfilesW@20
-GetCMMInfo@8
-GetColorDirectoryA@12
-GetColorDirectoryW@12
-GetColorProfileElement@24
-GetColorProfileElementTag@12
-GetColorProfileFromHandle@12
-GetColorProfileHeader@8
-GetCountColorProfileElements@8
-GetNamedProfileInfo@8
-GetPS2ColorRenderingDictionary@20
-GetPS2ColorRenderingIntent@16
-GetPS2ColorSpaceArray@24
-GetStandardColorSpaceProfileA@16
-GetStandardColorSpaceProfileW@16
-InstallColorProfileA@8
-InstallColorProfileW@8
-IsColorProfileTagPresent@12
-IsColorProfileValid@8
-OpenColorProfileA@16
-OpenColorProfileW@16
-RegisterCMMA@12
-RegisterCMMW@12
-SelectCMM@4
-SetColorProfileElement@20
-SetColorProfileElementReference@12
-SetColorProfileElementSize@12
-SetColorProfileHeader@8
-SetStandardColorSpaceProfileA@12
-SetStandardColorSpaceProfileW@12
-TranslateBitmapBits@44
-TranslateColors@24
-UninstallColorProfileA@12
-UninstallColorProfileW@12
-UnregisterCMMA@8
-UnregisterCMMW@8
diff --git a/winsup/w32api/lib/mshtml-uuid.c b/winsup/w32api/lib/mshtml-uuid.c
deleted file mode 100644
index 2a1ce57..0000000
--- a/winsup/w32api/lib/mshtml-uuid.c
+++ /dev/null
@@ -1,147 +0,0 @@
-/* mshtml-uuid.c */
-/* Generate GUIDs for MSHTML interfaces */
-
-#define INITGUID
-#include <basetyps.h>
-DEFINE_GUID(IID_IHTMLDocument,0x626fc520,0xa41e,0x11cf,0xa7,0x31,0x0,0xa0,0xc9,0x8,0x26,0x37);
-DEFINE_GUID(IID_IHTMLDocument2,0x332c4425,0x26cb,0x11d0,0xb4,0x83,0x0,0xc0,0x4f,0xd9,0x1,0x19);
-DEFINE_GUID(IID_IHTMLElement,0x3050f1ff,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0xb);
-DEFINE_GUID(IID_IHTMLSelectionObject,0x3050f25a,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0xb);
-DEFINE_GUID(IID_IHTMLTxtRange,0x3050f220,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLImgElement,0x3050f240,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLBodyElement,0x3050f1d8,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLFontElement,0x3050f1d9,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLAnchorElement,0x3050f1da,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLUListElement,0x3050f1dd,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLOListElement,0x3050f1de,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLLIElement,0x3050f1e0,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLBRElement,0x3050f1f0,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLDListElement,0x3050f1f1,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLDDElement,0x3050f1f2,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLDTElement,0x3050f1f3,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLHRElement,0x3050f1f4,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLParaElement,0x3050f1f5,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLHeaderElement,0x3050f1f6,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLFormElement,0x3050f1f7,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLDivElement,0x3050f200,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLBaseFontElement,0x3050f202,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLMetaElement,0x3050f203,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLBaseElement,0x3050f204,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLLinkElement,0x3050f205,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLIsIndexElement,0x3050f206,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLNextIdElement,0x3050f207,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLBlockElement,0x3050f208,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLUnknownElement,0x3050f209,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLPhraseElement,0x3050f20a,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLCommentElement,0x3050f20c,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLListElement,0x3050f20e,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLOptionElement,0x3050f211,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLDivPosition,0x3050f212,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLDialog,0x3050f216,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLTextElement,0x3050f218,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLTable,0x3050f21e,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLElementCollection,0x3050f21f,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLTextContainer,0x3050f230,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLTableCol,0x3050f23a,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLTableSection,0x3050f23b,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLTableRow,0x3050f23c,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLTableCell,0x3050f23d,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLSelectElement,0x3050f244,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLObjectElement,0x3050f24f,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLStyle,0x3050f25e,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLEmbedElement,0x3050f25f,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLAreaElement,0x3050f265,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLMapElement,0x3050f266,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLScriptElement,0x3050f28b,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLControlRange,0x3050f29c,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLInputHiddenElement,0x3050f2a4,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLInputTextElement,0x3050f2a6,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLTextAreaElement,0x3050f2aa,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLInputFileElement,0x3050f2ad,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLInputButtonElement,0x3050f2b2,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLMarqueeElement,0x3050f2b5,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLButtonElement,0x3050f2bb,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLOptionButtonElement,0x3050f2bc,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLInputImage,0x3050f2c2,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLStyleSheet,0x3050f2e3,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLStyleSheetRulesCollection,0x3050f2e5,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLTableCaption,0x3050f2eb,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLFrameBase,0x3050f311,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLFrameElement,0x3050f313,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLIFrameElement,0x3050f315,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLFrameSetElement,0x3050f319,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLTitleElement,0x3050f322,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLLabelElement,0x3050f32a,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLEventObj,0x3050f32d,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLStyleSheetRule,0x3050f357,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLScreen,0x3050f35c,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLBGsound,0x3050f369,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLStyleElement,0x3050f375,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLFontNamesCollection,0x3050f376,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLFontSizesCollection,0x3050f377,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLOptionsHolder,0x3050f378,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLStyleSheetsCollection,0x3050f37e,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLAreasCollection,0x3050f383,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLNoShowElement,0x3050f38a,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLOptionElementFactory,0x3050f38c,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLImageElementFactory,0x3050f38e,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLRuleStyle,0x3050f3cf,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLStyleFontFace,0x3050f3d5,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLCurrentStyle,0x3050f3db,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLSpanFlow,0x3050f3e5,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLFieldSetElement,0x3050f3e7,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLLegendElement,0x3050f3ea,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLFiltersCollection,0x3050f3ee,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLDatabinding,0x3050f3f2,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLSpanElement,0x3050f3f3,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLMimeTypesCollection,0x3050f3fc,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLPluginsCollection,0x3050f3fd,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLOpsProfile,0x3050f401,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLTextRangeMetrics,0x3050f40b,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLTableRowMetrics,0x3050f413,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLElement2,0x3050f434,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLDocument3,0x3050f485,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLEventObj2,0x3050f48b,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLUserDataOM,0x3050f48f,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLTableRow2,0x3050f4a1,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLStyle2,0x3050f4a2,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLRect,0x3050f4a3,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLRectCollection,0x3050f4a4,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLTextRangeMetrics2,0x3050f4a6,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLRuleStyle2,0x3050f4ac,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLTable2,0x3050f4ad,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLWindow3,0x3050f4ae,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLDOMAttribute,0x3050f4b0,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLDOMTextNode,0x3050f4b1,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLDataTransfer,0x3050f4b3,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLGenericElement,0x3050f4b7,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLPersistDataOM,0x3050f4c0,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLAttributeCollection,0x3050f4c3,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLPersistData,0x3050f4c5,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLObjectElement2,0x3050f4cd,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLBookmarkCollection,0x3050f4ce,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLUniqueName,0x3050f4d0,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLLinkElement2,0x3050f4e5,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLIFrameElement2,0x3050f4e6,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLControlElement,0x3050f4e9,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLFormElement2,0x3050f4f6,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLDOMChildrenCollection,0x3050f5ab,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLBodyElement2,0x3050f5c5,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLFrameSetElement2,0x3050f5c6,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLTableSection2,0x3050f5c7,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLAppBehavior2,0x3050f5c9,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLAppBehavior,0x3050f5ca,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLInputElement,0x3050f5d2,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLDOMNode,0x3050f5da,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLDialog2,0x3050f5e0,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLUrnCollection,0x3050f5e2,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLModelessInit,0x3050f5e4,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLDocumentFragment,0x3050f5e5,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLAreasCollection2,0x3050f5ec,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLSelectElement2,0x3050f5ed,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLElementCollection2,0x3050f5ee,0x98b5,0x11cf,0xbb,0x82,0x0,0xaa,0x0,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLFramesCollection2,0x332c4426,0x26cb,0x11d0,0xb4,0x83,0x0,0xc0,0x4f,0xd9,0x01,0x19);
-DEFINE_GUID(IID_IHTMLWindow2,0x332c4427,0x26cb,0x11d0,0xb4,0x83,0x0,0xc0,0x4f,0xd9,0x01,0x19);
-DEFINE_GUID(IID_IHTMLLocation,0x163bb1e0,0x6e00,0x11cf,0x83,0x7a,0x48,0xdc,0x04,0xc1,0x0,0x0);
-DEFINE_GUID(IID_IHTMLFrameBase2,0x3050f6db,0x98b5,0x11cf,0xbb,0x82,0x00,0xaa,0x00,0xbd,0xce,0x0b);
-DEFINE_GUID(IID_IHTMLFrameBase3,0x3050f82e,0x98b5,0x11cf,0xbb,0x82,0x00,0xaa,0x00,0xbd,0xce,0x0b);
diff --git a/winsup/w32api/lib/msimg32.def b/winsup/w32api/lib/msimg32.def
deleted file mode 100644
index 7dcf215..0000000
--- a/winsup/w32api/lib/msimg32.def
+++ /dev/null
@@ -1,7 +0,0 @@
-LIBRARY MSIMG32.DLL
-EXPORTS
-AlphaBlend@44
-GetDCBrushColor@4
-GetDCPenColor@4
-GradientFill@24
-TransparentBlt@44
diff --git a/winsup/w32api/lib/msvcp60.def b/winsup/w32api/lib/msvcp60.def
deleted file mode 100644
index f6a5dc9..0000000
--- a/winsup/w32api/lib/msvcp60.def
+++ /dev/null
@@ -1,71 +0,0 @@
-;Submitted by: Danny Smith <danny_r_smith_2001@yahoo.co.nz>
-;Only the C functions are listed. Most of these have been commented out since
-;I don't know what they are and can't test them. Some look like data exports
-;for C++ math functions (E.G.: _Xbig).
-LIBRARY MSVCP60.DLL
-EXPORTS
-;_Cosh
-;_Denorm
-;_Dnorm
-;_Dscale
-;_Dtest
-;_Eps
-;_Exp
-;_FCosh
-;_FDenorm
-;_FDnorm
-;_FDscale
-;_FDtest
-;_FEps
-;_FExp
-;_FInf
-;_FNan
-;_FRteps
-;_FSinh
-;_FSnan
-;_FXbig
-;_Getcoll
-;_Getctype
-;_Getcvt
-;_Hugeval
-;_Inf
-;_LCosh
-;_LDenorm
-;_LDscale
-;_LDtest
-;_LEps
-;_LExp
-;_LInf
-;_LNan
-;_LPoly
-;_LRteps
-;_LSinh
-;_LSnan
-;_LXbig
-;_Mbrtowc
-;_Nan
-;_Poly
-;_Rteps
-;_Sinh
-;_Snan
-;_Stod
-;_Stof
-;_Stold
-;_Strcoll
-;_Strxfrm
-;_Tolower
-;_Toupper
-;_Wcrtomb
-;__Wcrtomb_lk
-;_Xbig
-
-btowc
-mbrlen
-mbrtowc
-mbsrtowcs
-towctrans
-wcrtomb
-wcsrtombs
-wctob
-wctrans
-wctype \ No newline at end of file
diff --git a/winsup/w32api/lib/msvfw32.def b/winsup/w32api/lib/msvfw32.def
deleted file mode 100644
index 7428c6e..0000000
--- a/winsup/w32api/lib/msvfw32.def
+++ /dev/null
@@ -1,49 +0,0 @@
-LIBRARY MSVFW32.DLL
-EXPORTS
-VideoForWindowsVersion@0
-StretchDIB@48
-MCIWndRegisterClass
-MCIWndCreateW
-MCIWndCreateA
-MCIWndCreate
-ICSeqCompressFrameStart@8
-ICSeqCompressFrameEnd@4
-ICSeqCompressFrame@20
-ICSendMessage@16
-ICRemove@12
-ICOpenFunction@16
-ICOpen@12
-ICMThunk32@20
-ICLocate@20
-ICInstall@20
-ICInfo@12
-ICImageDecompress@20
-ICImageCompress@28
-ICGetInfo@12
-ICGetDisplayFormat@24
-ICDrawBegin
-ICDraw
-ICDecompress
-ICCompressorFree@4
-ICCompressorChoose@24
-ICCompress
-ICClose@4
-GetSaveFileNamePreviewW@4
-GetSaveFileNamePreviewA@4
-GetOpenFileNamePreviewW@4
-GetOpenFileNamePreviewA@4
-GetOpenFileNamePreview@4
-DrawDibTime@8
-DrawDibStop@4
-DrawDibStart@8
-DrawDibSetPalette@8
-DrawDibRealize@12
-DrawDibProfileDisplay@4
-DrawDibOpen@0
-DrawDibGetPalette@4
-DrawDibGetBuffer@16
-DrawDibEnd@4
-DrawDibDraw@52
-DrawDibClose@4
-DrawDibChangePalette@16
-DrawDibBegin@32
diff --git a/winsup/w32api/lib/mswsock.def b/winsup/w32api/lib/mswsock.def
deleted file mode 100644
index 3e74f87..0000000
--- a/winsup/w32api/lib/mswsock.def
+++ /dev/null
@@ -1,28 +0,0 @@
-LIBRARY MSWSOCK.DLL
-EXPORTS
-AcceptEx@32
-EnumProtocolsA@12
-EnumProtocolsW@12
-GetAcceptExSockaddrs@32
-GetAddressByNameA@40
-GetAddressByNameW@40
-GetNameByTypeA@12
-GetNameByTypeW@12
-GetServiceA@28
-GetServiceW@28
-GetTypeByNameA@8
-GetTypeByNameW@8
-MigrateWinsockConfiguration@12
-NPLoadNameSpaces@12
-SetServiceA@24
-SetServiceW@24
-TransmitFile@28
-WSARecvEx@16
-dn_expand@20
-getnetbyname@4
-inet_network@4
-rcmd@24
-rexec@24
-rresvport@4
-s_perror@8
-sethostname@8
diff --git a/winsup/w32api/lib/msxml-uuid.c b/winsup/w32api/lib/msxml-uuid.c
deleted file mode 100755
index 0f4c7a1..0000000
--- a/winsup/w32api/lib/msxml-uuid.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* msxml-uuid.c */
-/* Generate GUIDs for MSXML interfaces */
-
-#define INITGUID
-#include <basetyps.h>
-DEFINE_GUID(CLSID_DOMDocument,0x2933bf90,0x7b36,0x11d2,0xb2,0x0e,0x00,0xc0,0x4f,0x98,0x3e,0x60);
-DEFINE_GUID(CLSID_DOMFreeThreadedDocument,0x2933bf91,0x7b36,0x11d2,0xb2,0x0e,0x00,0xc0,0x4f,0x98,0x3e,0x60);
-DEFINE_GUID(CLSID_XMLHTTPRequest,0xed8c108e,0x4349,0x11d2,0x91,0xa4,0x00,0xc0,0x4f,0x79,0x69,0xe8);
-DEFINE_GUID(DIID_XMLDOMDocumentEvents,0x3efaa427,0x272f,0x11d2,0x83,0x6f,0x00,0x00,0xf8,0x7a,0x77,0x82);
-DEFINE_GUID(IID_IXMLDOMAttribute,0x2933bf85,0x7b36,0x11d2,0xb2,0x0e,0x00,0xc0,0x4f,0x98,0x3e,0x60);
-DEFINE_GUID(IID_IXMLDOMCharacterData,0x2933bf84,0x7b36,0x11d2,0xb2,0x0e,0x00,0xc0,0x4f,0x98,0x3e,0x60);
-DEFINE_GUID(IID_IXMLDOMCDATASection,0x2933bf8a,0x7b36,0x11d2,0xb2,0x0e,0x00,0xc0,0x4f,0x98,0x3e,0x60);
-DEFINE_GUID(IID_IXMLDOMComment,0x2933bf88,0x7b36,0x11d2,0xb2,0x0e,0x00,0xc0,0x4f,0x98,0x3e,0x60);
-DEFINE_GUID(IID_IXMLDOMDocument,0x2933bf81,0x7b36,0x11d2,0xb2,0x0e,0x00,0xc0,0x4f,0x98,0x3e,0x60);
-DEFINE_GUID(IID_IXMLDOMDocumentFragment,0x3efaa413,0x272f,0x11d2,0x83,0x6f,0x00,0x00,0xf8,0x7a,0x77,0x82);
-DEFINE_GUID(IID_IXMLDOMDocumentType,0x2933bf8b,0x7b36,0x11d2,0xb2,0x0e,0x00,0xc0,0x4f,0x98,0x3e,0x60);
-DEFINE_GUID(IID_IXMLDOMElement,0x2933bf86,0x7b36,0x11d2,0xb2,0x0e,0x00,0xc0,0x4f,0x98,0x3e,0x60);
-DEFINE_GUID(IID_IXMLDOMEntity,0x2933bf8d,0x7b36,0x11d2,0xb2,0x0e,0x00,0xc0,0x4f,0x98,0x3e,0x60);
-DEFINE_GUID(IID_IXMLDOMEntityReference,0x2933bf8e,0x7b36,0x11d2,0xb2,0x0e,0x00,0xc0,0x4f,0x98,0x3e,0x60);
-DEFINE_GUID(IID_IXMLDOMImplementation,0x2933bf8e,0x7b36,0x11d2,0xb2,0x0e,0x00,0xc0,0x4f,0x98,0x3e,0x60);
-DEFINE_GUID(IID_IXMLDOMNamedNodeMap,0x2933bf83,0x7b36,0x11d2,0xb2,0x0e,0x00,0xc0,0x4f,0x98,0x3e,0x60);
-DEFINE_GUID(IID_IXMLDOMNode,0x2933bf80,0x7b36,0x11d2,0xb2,0x0e,0x00,0xc0,0x4f,0x98,0x3e,0x60);
-DEFINE_GUID(IID_IXMLDOMNodeList,0x2933bf82,0x7b36,0x11d2,0xb2,0x0e,0x00,0xc0,0x4f,0x98,0x3e,0x60);
-DEFINE_GUID(IID_IXMLDOMNotation,0x2933bf8c,0x7b36,0x11d2,0xb2,0x0e,0x00,0xc0,0x4f,0x98,0x3e,0x60);
-DEFINE_GUID(IID_IXMLDOMParseError,0x3efaa426,0x272f,0x11d2,0x83,0x6f,0x00,0x00,0xf8,0x7a,0x77,0x82);
-DEFINE_GUID(IID_IXMLDOMProcessingInstruction,0x2933bf89,0x7b36,0x11d2,0xb2,0x0e,0x00,0xc0,0x4f,0x98,0x3e,0x60);
-DEFINE_GUID(IID_IXMLDOMText,0x2933bf87,0x7b36,0x11d2,0xb2,0x0e,0x00,0xc0,0x4f,0x98,0x3e,0x60);
-DEFINE_GUID(IID_IXMLHttpRequest,0xed8c108d,0x4349,0x11d2,0x91,0xa4,0x00,0xc0,0x4f,0x79,0x69,0xe8);
-DEFINE_GUID(IID_IXTLRuntime,0x3efaa425,0x272f,0x11d2,0x83,0x6f,0x00,0x00,0xf8,0x7a,0x77,0x82);
diff --git a/winsup/w32api/lib/nddeapi.def b/winsup/w32api/lib/nddeapi.def
deleted file mode 100644
index 4016baf..0000000
--- a/winsup/w32api/lib/nddeapi.def
+++ /dev/null
@@ -1,30 +0,0 @@
-LIBRARY NDDEAPI.DLL
-EXPORTS
-NDdeGetErrorStringA@12
-NDdeGetErrorStringW@12
-NDdeGetShareSecurityA@24
-NDdeGetShareSecurityW@24
-NDdeGetTrustedShareA@20
-NDdeGetTrustedShareW@20
-NDdeIsValidAppTopicListA@4
-NDdeIsValidAppTopicListW@4
-NDdeIsValidShareNameA@4
-NDdeIsValidShareNameW@4
-NDdeSetShareSecurityA@16
-NDdeSetShareSecurityW@16
-NDdeSetTrustedShareA@12
-NDdeSetTrustedShareW@12
-NDdeShareAddA@20
-NDdeShareAddW@20
-NDdeShareDelA@12
-NDdeShareDelW@12
-NDdeShareEnumA@24
-NDdeShareEnumW@24
-NDdeShareGetInfoA@28
-NDdeShareGetInfoW@28
-NDdeShareSetInfoA@24
-NDdeShareSetInfoW@24
-NDdeSpecialCommandA@24
-NDdeSpecialCommandW@24
-NDdeTrustedShareEnumA@24
-NDdeTrustedShareEnumW@24
diff --git a/winsup/w32api/lib/netapi32.def b/winsup/w32api/lib/netapi32.def
deleted file mode 100644
index 01f91a8..0000000
--- a/winsup/w32api/lib/netapi32.def
+++ /dev/null
@@ -1,249 +0,0 @@
-LIBRARY NETAPI32.DLL
-EXPORTS
-DsGetDcNameA@24
-DsGetDcNameW@24
-I_BrowserDebugCall@12
-I_BrowserDebugTrace@8
-I_BrowserQueryOtherDomains@16
-I_BrowserQueryStatistics@8
-I_BrowserResetNetlogonState@4
-I_BrowserResetStatistics@4
-I_BrowserServerEnum@44
-I_BrowserSetNetlogonState@16
-I_NetAccountDeltas@48
-I_NetAccountSync@48
-I_NetDatabaseDeltas@32
-I_NetDatabaseRedo@28
-I_NetDatabaseSync2@36
-I_NetDatabaseSync@32
-I_NetGetDCList@16
-I_NetListCanonicalize@36
-I_NetListTraverse@12
-I_NetLogonControl2@20
-I_NetLogonControl@16
-I_NetLogonSamLogoff@24
-I_NetLogonSamLogon@36
-I_NetLogonUasLogoff@12
-I_NetLogonUasLogon@12
-I_NetNameCanonicalize@24
-I_NetNameCompare@20
-I_NetNameValidate@16
-I_NetPathCanonicalize@28
-I_NetPathCompare@20
-I_NetPathType@16
-I_NetServerAuthenticate2@28
-I_NetServerAuthenticate@24
-I_NetServerPasswordSet@28
-I_NetServerReqChallenge@16
-I_NetServerSetServiceBits@16
-NetAlertRaise@12
-NetAlertRaiseEx@16
-NetApiBufferAllocate@8
-NetApiBufferFree@4
-NetApiBufferReallocate@12
-NetApiBufferSize@8
-NetAuditClear@12
-NetAuditRead@44
-NetAuditWrite@20
-NetBrowserStatisticsGet@12
-NetConfigGet@16
-NetConfigGetAll@12
-NetConfigSet@28
-NetConnectionEnum@32
-NetErrorLogClear@12
-NetErrorLogRead@44
-NetErrorLogWrite@32
-NetFileClose@8
-NetFileEnum@36
-NetFileGetInfo@16
-NetGetAnyDCName@12
-NetGetDCName@12
-NetGetDisplayInformationIndex@16
-NetGroupAdd@16
-NetGroupAddUser@12
-NetGroupDel@8
-NetGroupDelUser@12
-NetGroupEnum@28
-NetGroupGetInfo@16
-NetGroupGetUsers@32
-NetGroupSetInfo@20
-NetGroupSetUsers@20
-NetLocalGroupAdd@16
-NetLocalGroupAddMember@12
-NetLocalGroupAddMembers@20
-NetLocalGroupDel@8
-NetLocalGroupDelMember@12
-NetLocalGroupDelMembers@20
-NetLocalGroupEnum@28
-NetLocalGroupGetInfo@16
-NetLocalGroupGetMembers@32
-NetLocalGroupSetInfo@20
-NetLocalGroupSetMembers@20
-NetMessageBufferSend@20
-NetMessageNameAdd@8
-NetMessageNameDel@8
-NetMessageNameEnum@28
-NetMessageNameGetInfo@16
-NetQueryDisplayInformation@28
-NetRemoteComputerSupports@12
-NetRemoteTOD@8
-NetReplExportDirAdd@16
-NetReplExportDirDel@8
-NetReplExportDirEnum@28
-NetReplExportDirGetInfo@16
-NetReplExportDirLock@8
-NetReplExportDirSetInfo@20
-NetReplExportDirUnlock@12
-NetReplGetInfo@12
-NetReplImportDirAdd@16
-NetReplImportDirDel@8
-NetReplImportDirEnum@28
-NetReplImportDirGetInfo@16
-NetReplImportDirLock@8
-NetReplImportDirUnlock@12
-NetReplSetInfo@16
-NetRplAdapterAdd@16
-NetRplAdapterDel@8
-NetRplAdapterEnum@28
-NetRplBootAdd@16
-NetRplBootDel@12
-NetRplBootEnum@28
-NetRplClose@4
-NetRplConfigAdd@16
-NetRplConfigDel@8
-NetRplConfigEnum@32
-NetRplGetInfo@12
-NetRplOpen@8
-NetRplProfileAdd@16
-NetRplProfileClone@16
-NetRplProfileDel@8
-NetRplProfileEnum@32
-NetRplProfileGetInfo@16
-NetRplProfileSetInfo@20
-NetRplSetInfo@16
-NetRplSetSecurity@16
-NetRplVendorAdd@16
-NetRplVendorDel@8
-NetRplVendorEnum@28
-NetRplWkstaAdd@16
-NetRplWkstaClone@24
-NetRplWkstaDel@8
-NetRplWkstaEnum@32
-NetRplWkstaGetInfo@16
-NetRplWkstaSetInfo@20
-NetScheduleJobAdd@12
-NetScheduleJobDel@12
-NetScheduleJobEnum@24
-NetScheduleJobGetInfo@12
-NetServerDiskEnum@28
-NetServerEnum@36
-NetServerGetInfo@12
-NetServerSetInfo@16
-NetServerTransportAdd@12
-NetServerTransportDel@12
-NetServerTransportEnum@28
-NetServiceControl@20
-NetServiceEnum@28
-NetServiceGetInfo@16
-NetServiceInstall@20
-NetSessionDel@12
-NetSessionEnum@36
-NetSessionGetInfo@20
-NetShareAdd@16
-NetShareCheck@12
-NetShareDel@12
-NetShareDelSticky@12
-NetShareEnum@28
-NetShareEnumSticky@28
-NetShareGetInfo@16
-NetShareSetInfo@20
-NetStatisticsGet@20
-NetUseAdd@16
-NetUseDel@12
-NetUseEnum@28
-NetUseGetInfo@16
-NetUserAdd@16
-NetUserChangePassword@16
-NetUserDel@8
-NetUserEnum@32
-NetUserGetGroups@28
-NetUserGetInfo@16
-NetUserGetLocalGroups@32
-NetUserModalsGet@12
-NetUserModalsSet@16
-NetUserSetGroups@20
-NetUserSetInfo@20
-NetWkstaGetInfo@12
-NetWkstaSetInfo@16
-NetWkstaTransportAdd@16
-NetWkstaTransportDel@12
-NetWkstaTransportEnum@28
-NetWkstaUserEnum@28
-NetWkstaUserGetInfo@12
-NetWkstaUserSetInfo@16
-NetapipBufferAllocate@8
-Netbios@4
-NetpAccessCheckAndAudit@20
-NetpAllocConfigName@16
-NetpAllocStrFromWStr@4
-NetpAllocWStrFromStr@4
-NetpAllocWStrFromWStr@4
-NetpApiStatusToNtStatus@4
-NetpAssertFailed@16
-NetpCloseConfigData@4
-NetpCopyStringToBuffer@20
-NetpCreateSecurityObject@24
-NetpDbgDisplayServerInfo@8
-NetpDbgPrint
-NetpDeleteSecurityObject@4
-NetpGetComputerName@4
-NetpGetConfigBool@16
-NetpGetConfigDword@16
-NetpGetConfigTStrArray@12
-NetpGetConfigValue@12
-NetpGetDomainName@4
-NetpGetFileSecurity@16
-NetpGetPrivilege@8
-NetpHexDump@8
-NetpInitOemString@8
-NetpIsRemote@16
-NetpIsUncComputerNameValid@4
-NetpLocalTimeZoneOffset@0
-NetpLogonPutUnicodeString@12
-NetpNetBiosAddName@12
-NetpNetBiosCall@16
-NetpNetBiosDelName@8
-NetpNetBiosGetAdapterNumbers@8
-NetpNetBiosHangup@8
-NetpNetBiosReceive@24
-NetpNetBiosReset@4
-NetpNetBiosSend@16
-NetpNetBiosStatusToApiStatus@4
-NetpNtStatusToApiStatus@4
-NetpOpenConfigData@16
-NetpPackString@12
-NetpReleasePrivilege@0
-NetpSetConfigBool@12
-NetpSetConfigDword@12
-NetpSetConfigTStrArray@12
-NetpSetFileSecurity@12
-NetpSmbCheck@20
-NetpStringToNetBiosName@16
-NetpTStrArrayEntryCount@4
-NetpwNameCanonicalize@20
-NetpwNameCompare@16
-NetpwNameValidate@12
-NetpwPathCanonicalize@24
-NetpwPathCompare@16
-NetpwPathType@12
-NlBindingAddServerToCache@4
-NlBindingRemoveServerFromCache@4
-RxNetAccessAdd@16
-RxNetAccessDel@8
-RxNetAccessEnum@36
-RxNetAccessGetInfo@16
-RxNetAccessGetUserPerms@16
-RxNetAccessSetInfo@20
-RxNetServerEnum@40
-RxNetUserPasswordSet@16
-RxRemoteApi
diff --git a/winsup/w32api/lib/ntdll.def b/winsup/w32api/lib/ntdll.def
deleted file mode 100644
index d87cf39..0000000
--- a/winsup/w32api/lib/ntdll.def
+++ /dev/null
@@ -1,1017 +0,0 @@
-;note that the Zw... functions are alternate names for the
-;Nt... functions. (see www.sysinternals.com for details)
-;if you change a Nt.. function DON'T FORGET to change the
-;Zw one too.
-
-LIBRARY ntdll.dll
-EXPORTS
-CsrAllocateCaptureBuffer@8
-CsrAllocateMessagePointer@12
-CsrCaptureMessageBuffer@16
-CsrCaptureMessageString@20
-CsrCaptureTimeout@8
-CsrClientCallServer@16
-CsrClientConnectToServer@24
-CsrFreeCaptureBuffer@4
-CsrIdentifyAlertableThread@0
-CsrNewThread@0
-CsrProbeForRead@12
-CsrProbeForWrite@12
-CsrSetPriorityClass@8
-DbgBreakPoint@0
-DbgPrint
-DbgPrintReturnControlC
-DbgPrompt@12
-DbgSsHandleKmApiMsg@8
-DbgSsInitialize@16
-DbgUiConnectToDbg@0
-DbgUiContinue@8
-DbgUiWaitStateChange@8
-DbgUserBreakPoint@0
-KiRaiseUserExceptionDispatcher@0
-KiUserApcDispatcher@20
-KiUserCallbackDispatcher@12
-KiUserExceptionDispatcher@8
-LdrAccessResource@16
-LdrAlternateResourcesEnabled@0
-LdrDisableThreadCalloutsForDll@4
-LdrEnumResources@20
-LdrFindEntryForAddress@8
-LdrFindResourceDirectory_U@16
-LdrFindResource_U@16
-LdrFlushAlternateResourceModules@0
-LdrGetDllHandle@16
-LdrGetProcedureAddress@16
-LdrInitializeThunk@16
-LdrLoadAlternateResourceModule@8
-LdrLoadDll@16
-LdrProcessRelocationBlock@16
-LdrQueryImageFileExecutionOptions@24
-LdrQueryProcessModuleInformation@12
-LdrShutdownProcess@0
-LdrShutdownThread@0
-LdrUnloadAlternateResourceModule@4
-LdrUnloadDll@4
-LdrVerifyImageMatchesChecksum@16
-NlsAnsiCodePage
-NlsMbCodePageTag
-NlsMbOemCodePageTag
-NtAcceptConnectPort@24
-NtAccessCheck@32
-NtAccessCheckAndAuditAlarm@44
-NtAccessCheckByType@44
-NtAccessCheckByTypeAndAuditAlarm@64
-NtAccessCheckByTypeResultList@44
-NtAccessCheckByTypeResultListAndAuditAlarm@64
-NtAccessCheckByTypeResultListAndAuditAlarmByHandle@68
-NtAddAtom@12
-NtAdjustGroupsToken@24
-NtAdjustPrivilegesToken@24
-NtAlertResumeThread@8
-NtAlertThread@4
-NtAllocateLocallyUniqueId@4
-NtAllocateUserPhysicalPages@12
-NtAllocateUuids@16
-NtAllocateVirtualMemory@24
-NtAreMappedFilesTheSame@8
-NtAssignProcessToJobObject@8
-NtCallbackReturn@12
-NtCancelDeviceWakeupRequest@4
-NtCancelIoFile@8
-NtCancelTimer@8
-NtClearEvent@4
-NtClose@4
-NtCloseObjectAuditAlarm@12
-NtCompleteConnectPort@4
-NtConnectPort@32
-NtContinue@8
-NtCreateDirectoryObject@12
-NtCreateEvent@20
-NtCreateEventPair@12
-NtCreateFile@44
-NtCreateIoCompletion@16
-NtCreateJobObject@12
-NtCreateKey@28
-NtCreateMailslotFile@32
-NtCreateMutant@16
-NtCreateNamedPipeFile@56
-NtCreatePagingFile@16
-NtCreatePort@20
-NtCreateProcess@32
-NtCreateProfile@36
-NtCreateSection@28
-NtCreateSemaphore@20
-NtCreateSymbolicLinkObject@16
-NtCreateThread@32
-NtCreateTimer@16
-NtCreateToken@52
-NtCreateWaitablePort@20
-NtDelayExecution@8
-NtDeleteAtom@4
-NtDeleteFile@4
-NtDeleteKey@4
-NtDeleteObjectAuditAlarm@12
-NtDeleteValueKey@8
-NtDeviceIoControlFile@40
-NtDisplayString@4
-NtDuplicateObject@28
-NtDuplicateToken@24
-NtEnumerateKey@24
-NtEnumerateValueKey@24
-NtExtendSection@8
-NtFilterToken@24
-NtFindAtom@12
-NtFlushBuffersFile@8
-NtFlushInstructionCache@12
-NtFlushKey@4
-NtFlushVirtualMemory@16
-NtFlushWriteBuffer@0
-NtFreeUserPhysicalPages@12
-NtFreeVirtualMemory@16
-NtFsControlFile@40
-NtGetContextThread@8
-NtGetDevicePowerState@8
-NtGetPlugPlayEvent@16
-NtGetTickCount@0
-NtGetWriteWatch@28
-NtImpersonateAnonymousToken@8
-NtImpersonateClientOfPort@8
-NtImpersonateThread@12
-NtInitializeRegistry@4
-NtInitiatePowerAction@16
-NtIsSystemResumeAutomatic@0
-NtListenPort@8
-NtLoadDriver@4
-NtLoadKey@8
-NtLoadKey2@12
-NtLockFile@40
-NtLockVirtualMemory@16
-NtMakeTemporaryObject@4
-NtMapUserPhysicalPages@12
-NtMapUserPhysicalPagesScatter@12
-NtMapViewOfSection@40
-NtNotifyChangeDirectoryFile@36
-NtNotifyChangeKey@40
-NtNotifyChangeMultipleKeys@48
-NtOpenDirectoryObject@12
-NtOpenEvent@12
-NtOpenEventPair@12
-NtOpenFile@24
-NtOpenIoCompletion@12
-NtOpenJobObject@12
-NtOpenKey@12
-NtOpenMutant@12
-NtOpenObjectAuditAlarm@48
-NtOpenProcess@16
-NtOpenProcessToken@12
-NtOpenSection@12
-NtOpenSemaphore@12
-NtOpenSymbolicLinkObject@12
-NtOpenThread@16
-NtOpenThreadToken@16
-NtOpenTimer@12
-NtPowerInformation@20
-NtPrivilegeCheck@12
-NtPrivilegedServiceAuditAlarm@20
-NtPrivilegeObjectAuditAlarm@24
-NtProtectVirtualMemory@20
-NtPulseEvent@8
-NtQueryAttributesFile@8
-NtQueryDefaultLocale@8
-NtQueryDefaultUILanguage@4
-NtQueryDirectoryFile@44
-NtQueryDirectoryObject@28
-NtQueryEaFile@36
-NtQueryEvent@20
-NtQueryFullAttributesFile@8
-NtQueryInformationAtom@20
-NtQueryInformationFile@20
-NtQueryInformationJobObject@20
-NtQueryInformationPort@20
-NtQueryInformationProcess@20
-NtQueryInformationThread@20
-NtQueryInformationToken@20
-NtQueryIntervalProfile@8
-NtQueryIoCompletion@20
-NtQueryKey@20
-NtQueryMultipleValueKey@24
-NtQueryMutant@20
-NtQueryObject@20
-NtQueryOpenSubKeys@8
-NtQueryPerformanceCounter@8
-NtQueryQuotaInformationFile@36
-NtQuerySection@20
-NtQuerySecurityObject@20
-NtQuerySemaphore@20
-NtQuerySymbolicLinkObject@12
-NtQuerySystemEnvironmentValue@16
-NtQuerySystemInformation@16
-NtQuerySystemTime@4
-NtQueryTimer@20
-NtQueryTimerResolution@12
-NtQueryValueKey@24
-NtQueryVirtualMemory@24
-NtQueryVolumeInformationFile@20
-NtQueueApcThread@20
-NtRaiseException@12
-NtRaiseHardError@24
-NtReadFile@36
-NtReadFileScatter@36
-NtReadRequestData@24
-NtReadVirtualMemory@20
-NtRegisterThreadTerminatePort@4
-NtReleaseMutant@8
-NtReleaseSemaphore@12
-NtRemoveIoCompletion@20
-NtReplaceKey@12
-NtReplyPort@8
-NtReplyWaitReceivePort@16
-NtReplyWaitReceivePortEx@20
-NtReplyWaitReplyPort@8
-NtRequestDeviceWakeup@4
-NtRequestPort@8
-NtRequestWaitReplyPort@12
-NtRequestWakeupLatency@4
-NtResetEvent@8
-NtResetWriteWatch@12
-NtRestoreKey@12
-NtResumeThread@8
-NtSaveKey@8
-NtSaveMergedKeys@12
-NtSecureConnectPort@36
-NtSetContextThread@8
-NtSetDefaultHardErrorPort@4
-NtSetDefaultLocale@8
-NtSetDefaultUILanguage@4
-NtSetEaFile@16
-NtSetEvent@8
-NtSetHighEventPair@4
-NtSetHighWaitLowEventPair@4
-NtSetInformationFile@20
-NtSetInformationJobObject@16
-NtSetInformationKey@16
-NtSetInformationObject@16
-NtSetInformationProcess@16
-NtSetInformationThread@16
-NtSetInformationToken@16
-NtSetIntervalProfile@8
-NtSetIoCompletion@20
-NtSetLdtEntries@16
-NtSetLowEventPair@4
-NtSetLowWaitHighEventPair@4
-NtSetQuotaInformationFile@16
-NtSetSecurityObject@12
-NtSetSystemEnvironmentValue@8
-NtSetSystemInformation@12
-NtSetSystemPowerState@12
-NtSetSystemTime@8
-NtSetThreadExecutionState@8
-NtSetTimer@28
-NtSetTimerResolution@12
-NtSetUuidSeed@4
-NtSetValueKey@24
-NtSetVolumeInformationFile@20
-NtShutdownSystem@4
-NtSignalAndWaitForSingleObject@16
-NtStartProfile@4
-NtStopProfile@4
-NtSuspendThread@8
-NtSystemDebugControl@24
-NtTerminateJobObject@8
-NtTerminateProcess@8
-NtTerminateThread@8
-NtTestAlert@0
-NtUnloadDriver@4
-NtUnloadKey@4
-NtUnlockFile@20
-NtUnlockVirtualMemory@16
-NtUnmapViewOfSection@8
-NtVdmControl@8
-NtWaitForMultipleObjects@20
-NtWaitForSingleObject@12
-NtWaitHighEventPair@4
-NtWaitLowEventPair@4
-NtWriteFile@36
-NtWriteFileGather@36
-NtWriteRequestData@24
-NtWriteVirtualMemory@20
-NtYieldExecution@0
-RtlAbortRXact@4
-RtlAbsoluteToSelfRelativeSD@12
-RtlAcquirePebLock@0
-RtlAcquireResourceExclusive@8
-RtlAcquireResourceShared@8
-RtlAddAccessAllowedAce@16
-RtlAddAccessAllowedAceEx@20
-RtlAddAccessAllowedObjectAce@28
-RtlAddAccessDeniedAce@16
-RtlAddAccessDeniedAceEx@20
-RtlAddAccessDeniedObjectAce@28
-RtlAddAce@20
-RtlAddActionToRXact@24
-RtlAddAtomToAtomTable@12
-RtlAddAttributeActionToRXact@32
-RtlAddAuditAccessAce@24
-RtlAddAuditAccessAceEx@28
-RtlAddAuditAccessObjectAce@36
-RtlAddCompoundAce@24
-RtlAddRange@36
-RtlAdjustPrivilege@16
-RtlAllocateAndInitializeSid@44
-RtlAllocateHandle@8
-RtlAllocateHeap@12
-RtlAnsiCharToUnicodeChar@4
-RtlAnsiStringToUnicodeSize@4
-RtlAnsiStringToUnicodeString@12
-RtlAppendAsciizToString@8
-RtlAppendStringToString@8
-RtlAppendUnicodeStringToString@8
-RtlAppendUnicodeToString@8
-RtlApplyRXact@4
-RtlApplyRXactNoFlush@4
-RtlAreAllAccessesGranted@8
-RtlAreAnyAccessesGranted@8
-RtlAreBitsClear@12
-RtlAreBitsSet@12
-RtlAssert@16
-RtlCallbackLpcClient@12
-RtlCancelTimer@8
-RtlCaptureStackBackTrace@16
-RtlCharToInteger@12
-RtlCheckForOrphanedCriticalSections@4
-RtlCheckRegistryKey@8
-RtlClearAllBits@4
-RtlClearBits@12
-RtlCompactHeap@8
-RtlCompareMemory@12
-RtlCompareMemoryUlong@12
-RtlCompareString@12
-RtlCompareUnicodeString@12
-RtlCompressBuffer@32
-RtlConsoleMultiByteToUnicodeN@24
-RtlConvertExclusiveToShared@4
-RtlConvertSharedToExclusive@4
-RtlConvertSidToUnicodeString@12
-RtlConvertToAutoInheritSecurityObject@24
-RtlConvertUiListToApiList@12
-RtlConvertUlongToLargeInteger@4
-RtlConvertVariantToProperty@28
-RtlCopyLuid@8
-RtlCopyLuidAndAttributesArray@12
-RtlCopyRangeList@8
-RtlCopySecurityDescriptor@8
-RtlCopySid@12
-RtlCopySidAndAttributesArray@28
-RtlCopyString@8
-RtlCopyUnicodeString@8
-RtlCreateAcl@12
-RtlCreateAndSetSD@20
-RtlCreateAtomTable@8
-RtlCreateEnvironment@8
-RtlCreateHeap@24
-RtlCreateLpcServer@24
-RtlCreateProcessParameters@40
-RtlCreateQueryDebugBuffer@8
-RtlCreateRegistryKey@8
-RtlCreateSecurityDescriptor@8
-RtlCreateTagHeap@16
-RtlCreateTimer@28
-RtlCreateTimerQueue@4
-RtlCreateUnicodeString@8
-RtlCreateUnicodeStringFromAsciiz@8
-RtlCreateUserProcess@40
-RtlCreateUserThread@40
-RtlCustomCPToUnicodeN@24
-RtlCutoverTimeToSystemTime@16
-RtlDebugPrintTimes@0
-RtlDecompressBuffer@24
-RtlDecompressFragment@32
-RtlDefaultNpAcl@4
-RtlDelete@4
-RtlDeleteAce@8
-RtlDeleteAtomFromAtomTable@8
-RtlDeleteCriticalSection@4
-RtlDeleteElementGenericTable@8
-RtlDeleteNoSplay@8
-RtlDeleteOwnersRanges@8
-RtlDeleteRange@24
-RtlDeleteResource@4
-RtlDeleteSecurityObject@4
-RtlDeleteTimer@12
-RtlDeleteTimerQueue@4
-RtlDeleteTimerQueueEx@8
-RtlDeNormalizeProcessParams@4
-RtlDeregisterWait@4
-RtlDeregisterWaitEx@8
-RtlDestroyAtomTable@4
-RtlDestroyEnvironment@4
-RtlDestroyHandleTable@4
-RtlDestroyHeap@4
-RtlDestroyProcessParameters@4
-RtlDestroyQueryDebugBuffer@4
-RtlDetermineDosPathNameType_U@4
-RtlDoesFileExists_U@4
-RtlDosPathNameToNtPathName_U@16
-RtlDosSearchPath_U@24
-RtlDowncaseUnicodeString@12
-RtlEmptyAtomTable@8
-RtlEnableEarlyCriticalSectionEventCreation@0
-RtlEnlargedIntegerMultiply@8
-RtlEnlargedUnsignedDivide@16
-RtlEnlargedUnsignedMultiply@8
-RtlEnterCriticalSection@4
-RtlEnumerateGenericTable@8
-RtlEnumerateGenericTableWithoutSplaying@8
-RtlEnumProcessHeaps@8
-RtlEqualComputerName@8
-RtlEqualDomainName@8
-RtlEqualLuid@8
-RtlEqualPrefixSid@8
-RtlEqualSid@8
-RtlEqualString@12
-RtlEqualUnicodeString@12
-RtlEraseUnicodeString@4
-RtlExpandEnvironmentStrings_U@16
-RtlExtendedLargeIntegerDivide@16
-RtlExtendedMagicDivide@20
-RtlExtendHeap@16
-RtlFillMemory@12
-RtlFillMemoryUlong@12
-RtlFindClearBits@12
-RtlFindClearBitsAndSet@12
-RtlFindLeastSignificantBit@8
-RtlFindLongestRunClear@8
-RtlFindLongestRunSet@8
-RtlFindMessage@20
-RtlFindMostSignificantBit@8
-RtlFindNextForwardRunClear@12
-RtlFindRange@48
-RtlFindSetBits@12
-RtlFindSetBitsAndClear@12
-RtlFirstFreeAce@8
-RtlFormatCurrentUserKeyPath@4
-RtlFormatMessage@36
-RtlFreeAnsiString@4
-RtlFreeHandle@8
-RtlFreeHeap@12
-RtlFreeOemString@4
-RtlFreeSid@4
-RtlFreeUnicodeString@4
-RtlFreeUserThreadStack@8
-RtlGenerate8dot3Name@16
-RtlGetAce@12
-RtlGetCallersAddress@8
-RtlGetCompressionWorkSpaceSize@12
-RtlGetControlSecurityDescriptor@12
-RtlGetCurrentDirectory_U@8
-RtlGetDaclSecurityDescriptor@16
-RtlGetElementGenericTable@8
-RtlGetFirstRange@12
-RtlGetFullPathName_U@16
-RtlGetGroupSecurityDescriptor@12
-RtlGetLongestNtPathLength@0
-RtlGetNextRange@12
-RtlGetNtGlobalFlags@0
-RtlGetNtProductType@4
-RtlGetOwnerSecurityDescriptor@12
-RtlGetProcessHeaps@8
-RtlGetSaclSecurityDescriptor@16
-RtlGetSecurityDescriptorRMControl@8
-RtlGetUserInfoHeap@20
-RtlGetVersion@4
-RtlGUIDFromString@8
-RtlIdentifierAuthoritySid@4
-RtlImageDirectoryEntryToData@16
-RtlImageNtHeader@4
-RtlImageRvaToSection@12
-RtlImageRvaToVa@16
-RtlImpersonateLpcClient@8
-RtlImpersonateSelf@4
-RtlInitAnsiString@8
-RtlInitCodePageTable@8
-RtlInitNlsTables@16
-RtlInitString@8
-RtlInitUnicodeString@8
-RtlInitializeAtomPackage@4
-RtlInitializeBitMap@12
-RtlInitializeContext@20
-RtlInitializeCriticalSection@4
-RtlInitializeCriticalSectionAndSpinCount@8
-RtlInitializeGenericTable@20
-RtlInitializeHandleTable@12
-RtlInitializeRXact@12
-RtlInitializeRangeList@4
-RtlInitializeResource@4
-RtlInitializeSid@12
-RtlInsertElementGenericTable@16
-RtlIntegerToChar@16
-RtlIntegerToUnicodeString@12
-RtlInvertRangeList@8
-RtlIsDosDeviceName_U@4
-RtlIsNameLegalDOS8Dot3@12
-RtlIsRangeAvailable@40
-RtlIsTextUnicode@12
-RtlIsValidHandle@8
-RtlIsValidIndexHandle@12
-RtlLargeIntegerAdd@16
-RtlLargeIntegerArithmeticShift@12
-RtlLargeIntegerDivide@20
-RtlLargeIntegerNegate@8
-RtlLargeIntegerShiftLeft@12
-RtlLargeIntegerShiftRight@12
-RtlLargeIntegerSubtract@16
-RtlLargeIntegerToChar@16
-RtlLeaveCriticalSection@4
-RtlLengthRequiredSid@4
-RtlLengthSecurityDescriptor@4
-RtlLengthSid@4
-RtlLocalTimeToSystemTime@8
-RtlLockHeap@4
-RtlLookupAtomInAtomTable@12
-RtlLookupElementGenericTable@8
-RtlMakeSelfRelativeSD@12
-RtlMapGenericMask@8
-RtlMergeRangeLists@16
-RtlMoveMemory@12
-RtlMultiByteToUnicodeN@20
-RtlMultiByteToUnicodeSize@12
-RtlNewInstanceSecurityObject@40
-RtlNewSecurityGrantedAccess@24
-RtlNewSecurityObject@24
-RtlNewSecurityObjectEx@32
-RtlNormalizeProcessParams@4
-RtlNtStatusToDosError@4
-RtlNumberGenericTableElements@4
-RtlNumberOfClearBits@4
-RtlNumberOfSetBits@4
-RtlOemStringToUnicodeSize@4
-RtlOemStringToUnicodeString@12
-RtlOemToUnicodeN@12
-RtlOpenCurrentUser@8
-RtlPcToFileHeader@8
-RtlPinAtomInAtomTable@8
-RtlPrefixString@12
-RtlPrefixUnicodeString@12
-RtlProtectHeap@8
-RtlQueryAtomInAtomTable@24
-RtlQueryEnvironmentVariable_U@12
-RtlQueryInformationAcl@16
-RtlQueryProcessBackTraceInformation@4
-RtlQueryProcessDebugInformation@12
-RtlQueryProcessHeapInformation@4
-RtlQueryProcessLockInformation@4
-RtlQueryRegistryValues@20
-RtlQuerySecurityObject@20
-RtlQueryTagHeap@20
-RtlQueryTimeZoneInformation@4
-RtlQueueWorkItem@12
-RtlRaiseException@4
-RtlRaiseStatus@4
-RtlReAllocateHeap@16
-RtlRealPredecessor@4
-RtlRegisterWait@24
-RtlReleasePebLock@0
-RtlReleaseResource@4
-RtlRemoteCall@28
-RtlResetRtlTranslations@4
-RtlRunDecodeUnicodeString@8
-RtlRunEncodeUnicodeString@8
-RtlSecondsSince1970ToTime@8
-RtlSecondsSince1980ToTime@8
-RtlSelfRelativeToAbsoluteSD2@8
-RtlSelfRelativeToAbsoluteSD@44
-RtlSetAllBits@4
-RtlSetAttributesSecurityDescriptor@12
-RtlSetBits@12
-RtlSetControlSecurityDescriptor@12
-RtlSetCriticalSectionSpinCount@8
-RtlSetCurrentDirectory_U@4
-RtlSetCurrentEnvironment@8
-RtlSetDaclSecurityDescriptor@16
-RtlSetEnvironmentVariable@12
-RtlSetGroupSecurityDescriptor@12
-RtlSetInformationAcl@16
-RtlSetIoCompletionCallback@12
-RtlSetOwnerSecurityDescriptor@12
-RtlSetSaclSecurityDescriptor@16
-RtlSetSecurityDescriptorRMControl@8
-RtlSetSecurityObject@20
-RtlSetSecurityObjectEx@24
-RtlSetThreadPoolStartFunc@8
-RtlSetTimeZoneInformation@4
-RtlSetTimer@28
-RtlSetUnicodeCallouts@4
-RtlSetUserFlagsHeap@20
-RtlSetUserValueHeap@16
-RtlShutdownLpcServer@4
-RtlSizeHeap@12
-RtlSplay@4
-RtlStartRXact@4
-RtlStringFromGUID@8
-RtlSubAuthorityCountSid@4
-RtlSubAuthoritySid@8
-RtlSubtreePredecessor@4
-RtlSubtreeSuccessor@4
-RtlSystemTimeToLocalTime@8
-RtlTimeFieldsToTime@8
-RtlTimeToElapsedTimeFields@8
-RtlTimeToSecondsSince1970@8
-RtlTimeToSecondsSince1980@8
-RtlTimeToTimeFields@8
-RtlTraceDatabaseAdd@16
-RtlTraceDatabaseCreate@20
-RtlTraceDatabaseDestroy@4
-RtlTraceDatabaseEnumerate@12
-RtlTraceDatabaseFind@16
-RtlTraceDatabaseLock@4
-RtlTraceDatabaseUnlock@4
-RtlTraceDatabaseValidate@4
-RtlTryEnterCriticalSection@4
-RtlUlongByteSwap@4
-RtlUlonglongByteSwap@4
-RtlUnicodeStringToAnsiSize@4
-RtlUnicodeStringToAnsiString@12
-RtlUnicodeStringToCountedOemString@12
-RtlUnicodeStringToInteger@12
-RtlUnicodeStringToOemSize@4
-RtlUnicodeStringToOemString@12
-RtlUnicodeToMultiByteN@20
-RtlUnicodeToMultiByteSize@12
-RtlUnicodeToOemN@20
-RtlUniform@4
-RtlUnlockHeap@4
-RtlUnwind@16
-RtlUpcaseUnicodeChar@4
-RtlUpcaseUnicodeString@12
-RtlUpcaseUnicodeStringToAnsiString@12
-RtlUpcaseUnicodeStringToCountedOemString@12
-RtlUpcaseUnicodeStringToOemString@12
-RtlUpcaseUnicodeToCustomCPN@24
-RtlUpcaseUnicodeToMultiByteN@20
-RtlUpcaseUnicodeToOemN@20
-RtlUpdateTimer@16
-RtlUpperChar@4
-RtlUpperString@12
-RtlUsageHeap@12
-RtlUshortByteSwap@4
-RtlValidAcl@4
-RtlValidRelativeSecurityDescriptor@12
-RtlValidSecurityDescriptor@4
-RtlValidSid@4
-RtlValidateHeap@12
-RtlValidateProcessHeaps@0
-RtlVerifyVersionInfo@16
-RtlWalkFrameChain@12
-RtlWalkHeap@8
-RtlWriteRegistryValue@24
-RtlZeroHeap@8
-RtlZeroMemory@8
-RtlpNtCreateKey@24
-RtlpNtEnumerateSubKey@16
-RtlpNtMakeTemporaryKey@4
-RtlpNtOpenKey@16
-RtlpNtQueryValueKey@20
-RtlpNtSetValueKey@16
-RtlpUnWaitCriticalSection@4
-RtlpWaitForCriticalSection@4
-RtlxAnsiStringToUnicodeSize@4
-RtlxOemStringToUnicodeSize@4
-RtlxUnicodeStringToAnsiSize@4
-RtlxUnicodeStringToOemSize@4
-ZwAcceptConnectPort@24
-ZwAccessCheck@32
-ZwAccessCheckAndAuditAlarm@44
-ZwAccessCheckByType@44
-ZwAccessCheckByTypeAndAuditAlarm@64
-ZwAccessCheckByTypeResultList@44
-ZwAccessCheckByTypeResultListAndAuditAlarm@64
-ZwAccessCheckByTypeResultListAndAuditAlarmByHandle@68
-ZwAddAtom@12
-ZwAdjustGroupsToken@24
-ZwAdjustPrivilegesToken@24
-ZwAlertResumeThread@8
-ZwAlertThread@4
-ZwAllocateLocallyUniqueId@4
-ZwAllocateUserPhysicalPages@12
-ZwAllocateUuids@16
-ZwAllocateVirtualMemory@24
-ZwAreMappedFilesTheSame@8
-ZwAssignProcessToJobObject@8
-ZwCallbackReturn@12
-ZwCancelDeviceWakeupRequest@4
-ZwCancelIoFile@8
-ZwCancelTimer@8
-ZwClearEvent@4
-ZwClose@4
-ZwCloseObjectAuditAlarm@12
-ZwCompleteConnectPort@4
-ZwConnectPort@32
-ZwContinue@8
-ZwCreateDirectoryObject@12
-ZwCreateEvent@20
-ZwCreateEventPair@12
-ZwCreateFile@44
-ZwCreateIoCompletion@16
-ZwCreateJobObject@12
-ZwCreateKey@28
-ZwCreateMailslotFile@32
-ZwCreateMutant@16
-ZwCreateNamedPipeFile@56
-ZwCreatePagingFile@16
-ZwCreatePort@20
-ZwCreateProcess@32
-ZwCreateProfile@36
-ZwCreateSection@28
-ZwCreateSemaphore@20
-ZwCreateSymbolicLinkObject@16
-ZwCreateThread@32
-ZwCreateTimer@16
-ZwCreateToken@52
-ZwCreateWaitablePort@20
-ZwDelayExecution@8
-ZwDeleteAtom@4
-ZwDeleteFile@4
-ZwDeleteKey@4
-ZwDeleteObjectAuditAlarm@12
-ZwDeleteValueKey@8
-ZwDeviceIoControlFile@40
-ZwDisplayString@4
-ZwDuplicateObject@28
-ZwDuplicateToken@24
-ZwEnumerateKey@24
-ZwEnumerateValueKey@24
-ZwExtendSection@8
-ZwFilterToken@24
-ZwFindAtom@12
-ZwFlushBuffersFile@8
-ZwFlushInstructionCache@12
-ZwFlushKey@4
-ZwFlushVirtualMemory@16
-ZwFlushWriteBuffer@0
-ZwFreeUserPhysicalPages@12
-ZwFreeVirtualMemory@16
-ZwFsControlFile@40
-ZwGetContextThread@8
-ZwGetDevicePowerState@8
-ZwGetPlugPlayEvent@16
-ZwGetTickCount@0
-ZwGetWriteWatch@28
-ZwImpersonateAnonymousToken@8
-ZwImpersonateClientOfPort@8
-ZwImpersonateThread@12
-ZwInitializeRegistry@4
-ZwInitiatePowerAction@16
-ZwIsSystemResumeAutomatic@0
-ZwListenPort@8
-ZwLoadDriver@4
-ZwLoadKey@8
-ZwLoadKey2@12
-ZwLockFile@40
-ZwLockVirtualMemory@16
-ZwMakeTemporaryObject@4
-ZwMapUserPhysicalPages@12
-ZwMapUserPhysicalPagesScatter@12
-ZwMapViewOfSection@40
-ZwNotifyChangeDirectoryFile@36
-ZwNotifyChangeKey@40
-ZwNotifyChangeMultipleKeys@48
-ZwOpenDirectoryObject@12
-ZwOpenEvent@12
-ZwOpenEventPair@12
-ZwOpenFile@24
-ZwOpenIoCompletion@12
-ZwOpenJobObject@12
-ZwOpenKey@12
-ZwOpenMutant@12
-ZwOpenObjectAuditAlarm@48
-ZwOpenProcess@16
-ZwOpenProcessToken@12
-ZwOpenSection@12
-ZwOpenSemaphore@12
-ZwOpenSymbolicLinkObject@12
-ZwOpenThread@16
-ZwOpenThreadToken@16
-ZwOpenTimer@12
-ZwPowerInformation@20
-ZwPrivilegeCheck@12
-ZwPrivilegedServiceAuditAlarm@20
-ZwPrivilegeObjectAuditAlarm@24
-ZwProtectVirtualMemory@20
-ZwPulseEvent@8
-ZwQueryAttributesFile@8
-ZwQueryDefaultLocale@8
-ZwQueryDefaultUILanguage@4
-ZwQueryDirectoryFile@44
-ZwQueryDirectoryObject@28
-ZwQueryEaFile@36
-ZwQueryEvent@20
-ZwQueryFullAttributesFile@8
-ZwQueryInformationAtom@20
-ZwQueryInformationFile@20
-ZwQueryInformationJobObject@20
-ZwQueryInformationPort@20
-ZwQueryInformationProcess@20
-ZwQueryInformationThread@20
-ZwQueryInformationToken@20
-ZwQueryIntervalProfile@8
-ZwQueryIoCompletion@20
-ZwQueryKey@20
-ZwQueryMultipleValueKey@24
-ZwQueryMutant@20
-ZwQueryObject@20
-ZwQueryOpenSubKeys@8
-ZwQueryPerformanceCounter@8
-ZwQueryQuotaInformationFile@36
-ZwQuerySection@20
-ZwQuerySecurityObject@20
-ZwQuerySemaphore@20
-ZwQuerySymbolicLinkObject@12
-ZwQuerySystemEnvironmentValue@16
-ZwQuerySystemInformation@16
-ZwQuerySystemTime@4
-ZwQueryTimer@20
-ZwQueryTimerResolution@12
-ZwQueryValueKey@24
-ZwQueryVirtualMemory@24
-ZwQueryVolumeInformationFile@20
-ZwQueueApcThread@20
-ZwRaiseException@12
-ZwRaiseHardError@24
-ZwReadFile@36
-ZwReadFileScatter@36
-ZwReadRequestData@24
-ZwReadVirtualMemory@20
-ZwRegisterThreadTerminatePort@4
-ZwReleaseMutant@8
-ZwReleaseSemaphore@12
-ZwRemoveIoCompletion@20
-ZwReplaceKey@12
-ZwReplyPort@8
-ZwReplyWaitReceivePort@16
-ZwReplyWaitReceivePortEx@20
-ZwReplyWaitReplyPort@8
-ZwRequestDeviceWakeup@4
-ZwRequestPort@8
-ZwRequestWaitReplyPort@12
-ZwRequestWakeupLatency@4
-ZwResetEvent@8
-ZwResetWriteWatch@12
-ZwRestoreKey@12
-ZwResumeThread@8
-ZwSaveKey@8
-ZwSaveMergedKeys@12
-ZwSecureConnectPort@36
-ZwSetContextThread@8
-ZwSetDefaultHardErrorPort@4
-ZwSetDefaultLocale@8
-ZwSetDefaultUILanguage@4
-ZwSetEaFile@16
-ZwSetEvent@8
-ZwSetHighEventPair@4
-ZwSetHighWaitLowEventPair@4
-ZwSetInformationFile@20
-ZwSetInformationJobObject@16
-ZwSetInformationKey@16
-ZwSetInformationObject@16
-ZwSetInformationProcess@16
-ZwSetInformationThread@16
-ZwSetInformationToken@16
-ZwSetIntervalProfile@8
-ZwSetIoCompletion@20
-ZwSetLdtEntries@16
-ZwSetLowEventPair@4
-ZwSetLowWaitHighEventPair@4
-ZwSetQuotaInformationFile@16
-ZwSetSecurityObject@12
-ZwSetSystemEnvironmentValue@8
-ZwSetSystemInformation@12
-ZwSetSystemPowerState@12
-ZwSetSystemTime@8
-ZwSetThreadExecutionState@8
-ZwSetTimer@28
-ZwSetTimerResolution@12
-ZwSetUuidSeed@4
-ZwSetValueKey@24
-ZwSetVolumeInformationFile@20
-ZwShutdownSystem@4
-ZwSignalAndWaitForSingleObject@16
-ZwStartProfile@4
-ZwStopProfile@4
-ZwSuspendThread@8
-ZwSystemDebugControl@24
-ZwTerminateJobObject@8
-ZwTerminateProcess@8
-ZwTerminateThread@8
-ZwTestAlert@0
-ZwUnloadDriver@4
-ZwUnloadKey@4
-ZwUnlockFile@20
-ZwUnlockVirtualMemory@16
-ZwUnmapViewOfSection@8
-ZwVdmControl@8
-ZwWaitForMultipleObjects@20
-ZwWaitForSingleObject@12
-ZwWaitHighEventPair@4
-ZwWaitLowEventPair@4
-ZwWriteFile@36
-ZwWriteFileGather@36
-ZwWriteRequestData@24
-ZwWriteVirtualMemory@20
-ZwYieldExecution@0
-__isascii
-__iscsym
-__iscsymf
-__toascii
-_itoa
-_itow
-_ltoa
-_ltow
-_snprintf
-_snwprintf
-_strcmpi
-_stricmp
-_strlwr
-_strnicmp
-_strupr
-_tolower
-_toupper
-_ultoa
-_ultow
-_vsnprintf
-_wcsicmp
-_wcslwr
-_wcsnicmp
-_wcsupr
-_wtoi
-_wtol
-abs
-atan
-atoi
-atol
-ceil
-cos
-fabs
-floor
-isalnum
-isalpha
-iscntrl
-isdigit
-isgraph
-islower
-isprint
-ispunct
-isspace
-isupper
-iswalpha
-iswctype
-isxdigit
-labs
-log
-mbstowcs
-memchr
-memcmp
-memcpy
-memmove
-memset
-pow
-sin
-sprintf
-sqrt
-strcat
-strchr
-strcmp
-strcpy
-strcspn
-strlen
-strncat
-strncmp
-strncpy
-strpbrk
-strrchr
-strspn
-strstr
-strtol
-strtoul
-swprintf
-tan
-tolower
-toupper
-towlower
-towupper
-vsprintf
-wcscat
-wcschr
-wcscmp
-wcscpy
-wcscspn
-wcslen
-wcsncat
-wcsncmp
-wcsncpy
-wcspbrk
-wcsrchr
-wcsspn
-wcsstr
-wcstol
-wcstombs
-wcstoul
diff --git a/winsup/w32api/lib/oaidl-uuid.c b/winsup/w32api/lib/oaidl-uuid.c
deleted file mode 100644
index 20d84d4..0000000
--- a/winsup/w32api/lib/oaidl-uuid.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* oaidl-uuid.c */
-/* Generate GUIDs for OA IDL interfaces */
-
-/* All IIDs defined in this file were extracted from
- * HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\ */
-
-#define INITGUID
-#include <basetyps.h>
-DEFINE_GUID(IID_IErrorInfo,0x1cf2b120,0x547d,0x101b,0x8e,0x65,0x8,0,0x2b,0x2b,0xd1,0x19);
-DEFINE_GUID(IID_ICreateErrorInfo,0x22f03340,0x547d,0x101b,0x8e,0x65,0x8,0,0x2b,0x2b,0xd1,0x19);
-DEFINE_GUID(IID_ISupportErrorInfo,0xdf0b3d60,0x548f,0x101b,0x8e,0x65,0x8,0,0x2b,0x2b,0xd1,0x19);
-DEFINE_OLEGUID(IID_ICreateTypeInfo,0x20405,0,0);
-DEFINE_OLEGUID(IID_ICreateTypeInfo2,0x2040e,0,0);
-DEFINE_OLEGUID(IID_ICreateTypeLib,0x20406,0,0);
-DEFINE_OLEGUID(IID_ICreateTypeLib2,0x2040F,0,0);
-DEFINE_OLEGUID(IID_ITypeInfo,0x20401,0,0);
-DEFINE_OLEGUID(IID_ITypeInfo2,0x20412,0,0);
-DEFINE_OLEGUID(IID_ITypeLib,0x20402,0,0);
-DEFINE_OLEGUID(IID_ITypeLib2,0x20411,0,0);
-DEFINE_OLEGUID(IID_IEnumVARIANT,0x20404,0,0);
diff --git a/winsup/w32api/lib/objidl-uuid.c b/winsup/w32api/lib/objidl-uuid.c
deleted file mode 100644
index 5e3df93..0000000
--- a/winsup/w32api/lib/objidl-uuid.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* objidl-uuid.c */
-/* Generate GUIDs for Object IDL interfaces */
-
-/* All IIDs defined in this file were extracted from
- * HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\ */
-
-#define INITGUID
-#include <basetyps.h>
-DEFINE_OLEGUID(IID_IMarshal,0x3,0,0);
-DEFINE_OLEGUID(IID_IStream,0xc,0,0);
-DEFINE_OLEGUID(IID_IMalloc,0x2,0,0);
-DEFINE_OLEGUID(IID_IMessageFilter,0x16,0,0);
-DEFINE_OLEGUID(IID_IPersist,0x10c,0,0);
-DEFINE_OLEGUID(IID_IPersistFile,0x10b,0,0);
-DEFINE_OLEGUID(IID_IPersistStorage,0x10a,0,0);
-DEFINE_OLEGUID(IID_IPersistStream,0x109,0,0);
-DEFINE_OLEGUID(IID_IMoniker,0xf,0,0);
-DEFINE_OLEGUID(IID_IAdviseSink,0x10f,0,0);
-DEFINE_OLEGUID(IID_IAdviseSink2,0x125,0,0);
-DEFINE_OLEGUID(IID_IDataObject,0x10e,0,0);
-DEFINE_OLEGUID(IID_IDataAdviseHolder,0x110,0,0);
-DEFINE_OLEGUID(IID_IStorage,0xb,0,0);
-DEFINE_OLEGUID(IID_IRootStorage,0x12,0,0);
-DEFINE_GUID(IID_IRpcChannelBuffer,0xd5f56b60,0x593b,0x101a,0xb5,0x69,0x8,0,0x2b,0x2d,0xbf,0x7a);
-DEFINE_GUID(IID_IRpcProxyBuffer,0xd5f56a34,0x593b,0x101a,0xb5,0x69,8,0,0x2b,0x2d,0xbf,0x7a);
-DEFINE_GUID(IID_IRpcStubBuffer,0xd5f56afc,0x593b,0x101a,0xb5,0x69,0x8,0,0x2b,0x2d,0xbf,0x7a);
-DEFINE_GUID(IID_ISequentialStream,0xc733a30,0x2a1c,0x11ce,0xad,0xe5,0,0xaa,0,0x44,0x77,0x3d);
-DEFINE_OLEGUID(IID_IStdMarshalInfo,0x18,0,0);
-DEFINE_OLEGUID(IID_IRunningObjectTable,0x10,0,0);
-DEFINE_OLEGUID(IID_IBindCtx,0xe,0,0);
-DEFINE_GUID(IID_IPSFactoryBuffer,0xd5f569d0,0x593b,0x101a,0xb5,0x69,0x8,0,0x2b,0x2d,0xbf,0x7a);
-DEFINE_OLEGUID(IID_ILockBytes,0xa,0,0);
-DEFINE_OLEGUID(IID_IExternalConnection,0x19,0,0);
-DEFINE_OLEGUID(IID_IRunnableObject,0x126,0,0);
-DEFINE_GUID(IID_IROTData,0xf29f6bc0,0x5021,0x11ce,0xaa,0x15,0,0,0x69,0x1,0x29,0x3f);
-DEFINE_OLEGUID(IID_IPropertySetStorage,0x13a,0,0);
-DEFINE_OLEGUID(IID_IPropertyStorage,0x138,0,0);
-DEFINE_OLEGUID(IID_IClassActivator,0x140,0,0);
-DEFINE_GUID(IID_IFillLockBytes,0x99caf010,0x415e,0x11cf,0x88,0x14,0,0xaa,0,0xb5,0x69,0xf5);
-DEFINE_GUID(IID_IProgressNotify,0xa9d758a0,0x4617,0x11cf,0x95,0xfc,0,0xaa,0,0x68,0xd,0xb4);
-DEFINE_OLEGUID(IID_IClientSecurity,0x13D,0,0);
-DEFINE_OLEGUID(IID_IMallocSpy,0x1d,0,0);
-DEFINE_OLEGUID(IID_IServerSecurity,0x13E,0,0);
diff --git a/winsup/w32api/lib/objsafe-uuid.c b/winsup/w32api/lib/objsafe-uuid.c
deleted file mode 100644
index 6deae9a..0000000
--- a/winsup/w32api/lib/objsafe-uuid.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* objsafe-uuid.c */
-/* Generate GUIDs for Object Safe interfaces */
-
-/* All IIDs defined in this file were extracted from
- * HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\ */
-
-#define INITGUID
-#include <basetyps.h>
-DEFINE_GUID(IID_IObjectSafety,0xcb5bdc81,0x93c1,0x11cf,0x8f,0x20,0,0x80,0x5f,0x2c,0xd0,0x64);
diff --git a/winsup/w32api/lib/ocidl-uuid.c b/winsup/w32api/lib/ocidl-uuid.c
deleted file mode 100644
index ea0db2d..0000000
--- a/winsup/w32api/lib/ocidl-uuid.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* ocidl-uuid.c */
-/* Generate GUIDs for OCIDL interfaces */
-
-/* All IIDs defined in this file were extracted from
- * HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\ */
-
-#define INITGUID
-#include <basetyps.h>
-DEFINE_GUID(IID_IQuickActivate,0xcf51ed10,0x62fe,0x11cf,0xbf,0x86,0,0xa0,0xc9,0x3,0x48,0x36);
-DEFINE_GUID(IID_IOleUndoManager,0xd001f200,0xef97,0x11ce,0x9b,0xc9,0,0xaa,0,0x60,0x8e,0x1);
-DEFINE_GUID(IID_IOleParentUndoUnit,0xa1faf330,0xef97,0x11ce,0x9b,0xc9,0,0xaa,0,0x60,0x8e,0x1);
-DEFINE_GUID(IID_IOleUndoUnit,0x894ad3b0,0xef97,0x11ce,0x9b,0xc9,0,0xaa,0,0x60,0x8e,0x1);
-DEFINE_GUID(IID_IEnumOleUndoUnits,0xb3e7c340,0xef97,0x11ce,0x9b,0xc9,0,0xaa,0,0x60,0x8e,0x1);
-DEFINE_GUID(IID_IPointerInactive,0x55980ba0,0x35aa,0x11cf,0xb6,0x71,0,0xaa,0,0x4c,0xd6,0xd8);
-DEFINE_GUID(IID_IAdviseSinkEx,0x3af24290,0xc96,0x11ce,0xa0,0xcf,0,0xaa,0,0x60,0xa,0xb8);
-DEFINE_GUID(IID_IOleInPlaceSiteEx,0x9c2cad80,0x3424,0x11cf,0xb6,0x70,0,0xaa,0,0x4c,0xd6,0xd8);
-DEFINE_GUID(IID_IOleControl,0xb196b288,0xbab4,0x101a,0xb6,0x9c,0,0xaa,0,0x34,0x1d,0x7);
-DEFINE_GUID(IID_IOleControlSite,0xB196B289,0xBAB4,0x101A,0xB6,0x9C,0x00,0xAA,0x00,0x34,0x1D,0x07);
-DEFINE_GUID(IID_IPersistPropertyBag,0x37d84f60,0x42cb,0x11ce,0x81,0x35,0,0xaa,0,0x4b,0xb8,0x51);
-DEFINE_GUID(IID_IPersistPropertyBag2,0x22f55881,0x280b,0x11d0,0xa8,0xa9,0,0xa0,0xc9,0xc,0x20,4);
-DEFINE_GUID(IID_IPersistStreamInit,0x7fd52380,0x4e07,0x101b,0xae,0x2d,0x8,0,0x2b,0x2e,0xc7,0x13);
-DEFINE_GUID(IID_IPersistMemory,0xbd1ae5e0,0xa6ae,0x11ce,0xbd,0x37,0x50,0x42,0,0xc1,0,0);
-DEFINE_GUID(IID_IPropertyBag,0x55272a00,0x42cb,0x11ce,0x81,0x35,0,0xaa,0,0x4b,0xb8,0x51);
-DEFINE_GUID(IID_IPropertyBag2,0x22f55882,0x280b,0x11d0,0xa8,0xa9,0,0xa0,0xc9,0xc,0x20,0x4);
-DEFINE_GUID(IID_IPropertyNotifySink,0x9bfbbc02,0xeff1,0x101a,0x84,0xed,0,0xaa,0,0x34,0x1d,0x7);
-DEFINE_GUID(IID_IPropertyPage,0xb196b28d,0xbab4,0x101a,0xb6,0x9c,0,0xaa,0,0x34,0x1d,0x7);
-DEFINE_GUID(IID_IPropertyPage2,0x1e44665,0x24ac,0x101b,0x84,0xed,0x8,0,0x2b,0x2e,0xc7,0x13);
-DEFINE_GUID(IID_IPropertyPageSite,0xb196b28c,0xbab4,0x101a,0xb6,0x9c,0,0xaa,0,0x34,0x1d,0x7);
-DEFINE_GUID(IID_IFont,0xbef6e002,0xa874,0x101a,0x8b,0xba,0,0xaa,0,0x30,0xc,0xab);
-// Font
-DEFINE_GUID(IID_IFontDisp,0xbef6e003,0xa874,0x101a,0x8b,0xba,0,0xaa,0,0x30,0xc,0xab);
-DEFINE_GUID(IID_IPicture,0x7bf80980,0xbf32,0x101a,0x8b,0xbb,0,0xaa,0,0x30,0xc,0xab);
-// Picture
-DEFINE_GUID(IID_IPictureDisp,0x7bf80981,0xbf32,0x101a,0x8b,0xbb,0,0xaa,0,0x30,0xc,0xab);
-DEFINE_GUID(IID_IProvideClassInfo,0xb196b283,0xbab4,0x101a,0xb6,0x9c,0,0xaa,0,0x34,0x1d,0x7);
-DEFINE_GUID(IID_IProvideClassInfo2,0xa6bc3ac0,0xdbaa,0x11ce,0x9d,0xe3,0,0xaa,0,0x4b,0xb8,0x51);
-DEFINE_GUID(IID_IEnumConnectionPoints,0xb196b285,0xbab4,0x101a,0xb6,0x9c,0,0xaa,0,0x34,0x1d,0x7);
-DEFINE_GUID(IID_IEnumConnections,0xb196b287,0xbab4,0x101a,0xb6,0x9c,0,0xaa,0,0x34,0x1d,0x7);
-DEFINE_GUID(IID_IConnectionPoint,0xb196b286,0xbab4,0x101a,0xb6,0x9c,0,0xaa,0,0x34,0x1d,0x7);
-DEFINE_GUID(IID_IConnectionPointContainer,0xb196b284,0xbab4,0x101a,0xb6,0x9c,0,0xaa,0,0x34,0x1d,0x7);
-DEFINE_GUID(IID_IClassFactory2,0xb196b28f,0xbab4,0x101a,0xb6,0x9c,0,0xaa,0,0x34,0x1d,0x7);
-DEFINE_GUID(IID_IErrorLog,0x3127ca40,0x446e,0x11ce,0x81,0x35,0,0xaa,0,0x4b,0xb8,0x51);
-DEFINE_GUID(IID_IObjectWithSite,0xfc4801a3,0x2ba9,0x11cf,0xa2,0x29,0,0xaa,0,0x3d,0x73,0x52);
-DEFINE_GUID(IID_IPerPropertyBrowsing,0x376bd3aa,0x3845,0x101b,0x84,0xed,0x8,0,0x2b,0x2e,0xc7,0x13);
-DEFINE_GUID(IID_ISimpleFrameSite,0x742b0e01,0x14e6,0x101b,0x91,0x4e,0,0xaa,0,0x30,0xc,0xab);
-DEFINE_GUID(IID_ISpecifyPropertyPages,0xb196b28b,0xbab4,0x101a,0xb6,0x9c,0,0xaa,0,0x34,0x1d,0x7);
diff --git a/winsup/w32api/lib/odbc32.def b/winsup/w32api/lib/odbc32.def
deleted file mode 100644
index d920517..0000000
--- a/winsup/w32api/lib/odbc32.def
+++ /dev/null
@@ -1,185 +0,0 @@
-LIBRARY ODBC32.dll
-EXPORTS
-CloseODBCPerfData@0
-CollectODBCPerfData@16
-CursorLibLockDbc@8
-CursorLibLockDesc@8
-CursorLibLockStmt@8
-CursorLibTransact@12
-LockHandle@12
-MpHeapAlloc
-MpHeapCompact
-MpHeapCreate
-MpHeapDestroy
-MpHeapFree
-MpHeapReAlloc
-MpHeapSize
-MpHeapValidate
-ODBCGetTryWaitValue@0
-ODBCInternalConnectW@36
-ODBCQualifyFileDSNW@4
-ODBCSetTryWaitValue@4
-ODBCSharedPerfMon
-ODBCSharedTraceFlag
-ODBCSharedVSFlag
-OpenODBCPerfData@4
-PostComponentError@4
-PostODBCComponentError@4
-PostODBCError@16
-SQLAllocConnect@8
-SQLAllocEnv@4
-SQLAllocHandle@12
-SQLAllocHandleStd@12
-SQLAllocStmt@8
-SQLBindCol@24
-SQLBindParam@32
-SQLBindParameter@40
-SQLBrowseConnect@24
-SQLBrowseConnectA@24
-SQLBrowseConnectW@24
-SQLBulkOperations@8
-SQLCancel@4
-SQLCloseCursor@4
-SQLColAttribute@28
-SQLColAttributeA@28
-SQLColAttributeW@28
-SQLColAttributes@28
-SQLColAttributesA@28
-SQLColAttributesW@28
-SQLColumnPrivileges@36
-SQLColumnPrivilegesA@36
-SQLColumnPrivilegesW@36
-SQLColumns@36
-SQLColumnsA@36
-SQLColumnsW@36
-SQLConnect@28
-SQLConnectA@28
-SQLConnectW@28
-SQLCopyDesc@8
-SQLDataSources@32
-SQLDataSourcesA@32
-SQLDataSourcesW@32
-SQLDescribeCol@36
-SQLDescribeColA@36
-SQLDescribeColW@36
-SQLDescribeParam@24
-SQLDisconnect@4
-SQLDriverConnect@32
-SQLDriverConnectA@32
-SQLDriverConnectW@32
-SQLDrivers@32
-SQLDriversA@32
-SQLDriversW@32
-SQLEndTran@12
-SQLError@32
-SQLErrorA@32
-SQLErrorW@32
-SQLExecDirect@12
-SQLExecDirectA@12
-SQLExecDirectW@12
-SQLExecute@4
-SQLExtendedFetch@20
-SQLFetch@4
-SQLFetchScroll@12
-SQLForeignKeys@52
-SQLForeignKeysA@52
-SQLForeignKeysW@52
-SQLFreeConnect@4
-SQLFreeEnv@4
-SQLFreeHandle@8
-SQLFreeStmt@8
-SQLGetConnectAttr@20
-SQLGetConnectAttrA@20
-SQLGetConnectAttrW@20
-SQLGetConnectOption@12
-SQLGetConnectOptionA@12
-SQLGetConnectOptionW@12
-SQLGetCursorName@16
-SQLGetCursorNameA@16
-SQLGetCursorNameW@16
-SQLGetData@24
-SQLGetDescField@24
-SQLGetDescFieldA@24
-SQLGetDescFieldW@24
-SQLGetDescRec@44
-SQLGetDescRecA@44
-SQLGetDescRecW@44
-SQLGetDiagField@28
-SQLGetDiagFieldA@28
-SQLGetDiagFieldW@28
-SQLGetDiagRec@32
-SQLGetDiagRecA@32
-SQLGetDiagRecW@32
-SQLGetEnvAttr@20
-SQLGetFunctions@12
-SQLGetInfo@20
-SQLGetInfoA@20
-SQLGetInfoW@20
-SQLGetStmtAttr@20
-SQLGetStmtAttrA@20
-SQLGetStmtAttrW@20
-SQLGetStmtOption@12
-SQLGetTypeInfo@8
-SQLGetTypeInfoA@8
-SQLGetTypeInfoW@8
-SQLMoreResults@4
-SQLNativeSql@24
-SQLNativeSqlA@24
-SQLNativeSqlW@24
-SQLNumParams@8
-SQLNumResultCols@8
-SQLParamData@8
-SQLParamOptions@12
-SQLPrepare@12
-SQLPrepareA@12
-SQLPrepareW@12
-SQLPrimaryKeys@28
-SQLPrimaryKeysA@28
-SQLPrimaryKeysW@28
-SQLProcedureColumns@36
-SQLProcedureColumnsA@36
-SQLProcedureColumnsW@36
-SQLProcedures@28
-SQLProceduresA@28
-SQLProceduresW@28
-SQLPutData@12
-SQLRowCount@8
-SQLSetConnectAttr@16
-SQLSetConnectAttrA@16
-SQLSetConnectAttrW@16
-SQLSetConnectOption@12
-SQLSetConnectOptionA@12
-SQLSetConnectOptionW@12
-SQLSetCursorName@12
-SQLSetCursorNameA@12
-SQLSetCursorNameW@12
-SQLSetDescField@20
-SQLSetDescFieldA@20
-SQLSetDescFieldW@20
-SQLSetDescRec@40
-SQLSetEnvAttr@16
-SQLSetParam@32
-SQLSetPos@16
-SQLSetScrollOptions@16
-SQLSetStmtAttr@16
-SQLSetStmtAttrA@16
-SQLSetStmtAttrW@16
-SQLSetStmtOption@12
-SQLSpecialColumns@40
-SQLSpecialColumnsA@40
-SQLSpecialColumnsW@40
-SQLStatistics@36
-SQLStatisticsA@36
-SQLStatisticsW@36
-SQLTablePrivileges@28
-SQLTablePrivilegesA@28
-SQLTablePrivilegesW@28
-SQLTables@36
-SQLTablesA@36
-SQLTablesW@36
-SQLTransact@12
-SearchStatusCode@8
-VFreeErrors@4
-VRetrieveDriverErrorsRowCol@24
-ValidateErrorQueue@8
-g_hHeapMalloc
diff --git a/winsup/w32api/lib/odbccp32.def b/winsup/w32api/lib/odbccp32.def
deleted file mode 100644
index f8fdfd7..0000000
--- a/winsup/w32api/lib/odbccp32.def
+++ /dev/null
@@ -1,54 +0,0 @@
-LIBRARY ODBCCP32.dll
-EXPORTS
-SQLConfigDataSource@16
-SQLConfigDataSourceW@16
-SQLConfigDriver@28
-SQLConfigDriverW@28
-SQLCreateDataSource@8
-SQLCreateDataSourceW@8
-SQLGetAvailableDrivers@16
-SQLGetAvailableDriversW@16
-SQLGetConfigMode@4
-SQLGetInstalledDrivers@12
-SQLGetInstalledDriversW@12
-SQLGetPrivateProfileString@24
-SQLGetPrivateProfileStringW@24
-SQLGetTranslator@32
-SQLGetTranslatorW@32
-SQLInstallDriver@20
-SQLInstallDriverEx@28
-SQLInstallDriverExW@28
-SQLInstallDriverManager@12
-SQLInstallDriverManagerW@12
-SQLInstallDriverW@20
-SQLInstallODBC@16
-SQLInstallODBCW@16
-SQLInstallTranslator@32
-SQLInstallTranslatorEx@28
-SQLInstallTranslatorExW@28
-SQLInstallTranslatorW@32
-SQLInstallerError@20
-SQLInstallerErrorW@20
-SQLManageDataSources@4
-SQLPostInstallerError@8
-SQLPostInstallerErrorW@8
-SQLReadFileDSN@24
-SQLReadFileDSNW@24
-SQLRemoveDSNFromIni@4
-SQLRemoveDSNFromIniW@4
-SQLRemoveDefaultDataSource@0
-SQLRemoveDriver@12
-SQLRemoveDriverManager@4
-SQLRemoveDriverW@12
-SQLRemoveTranslator@8
-SQLRemoveTranslatorW@8
-SQLSetConfigMode@4
-SQLValidDSN@4
-SQLValidDSNW@4
-SQLWriteDSNToIni@8
-SQLWriteDSNToIniW@8
-SQLWriteFileDSN@16
-SQLWriteFileDSNW@16
-SQLWritePrivateProfileString@16
-SQLWritePrivateProfileStringW@16
-ODBC___GetSetupProc@4 \ No newline at end of file
diff --git a/winsup/w32api/lib/ole32.def b/winsup/w32api/lib/ole32.def
deleted file mode 100644
index d190b18..0000000
--- a/winsup/w32api/lib/ole32.def
+++ /dev/null
@@ -1,255 +0,0 @@
-LIBRARY OLE32.dll
-EXPORTS
-BindMoniker@16
-CLIPFORMAT_UserFree@8
-CLIPFORMAT_UserMarshal@12
-CLIPFORMAT_UserSize@12
-CLIPFORMAT_UserUnmarshal@12
-CLSIDFromProgID@8
-CLSIDFromString@8
-CoAddRefServerProcess@0
-CoBuildVersion@0
-CoCopyProxy@8
-CoCreateFreeThreadedMarshaler@8
-CoCreateGuid@4
-CoCreateInstance@20
-CoCreateInstanceEx@24
-CoDisconnectObject@8
-CoDosDateTimeToFileTime@12
-CoFileTimeNow@4
-CoFileTimeToDosDateTime@12
-CoFreeAllLibraries@0
-CoFreeLibrary@4
-CoFreeUnusedLibraries@0
-CoGetCallContext@8
-CoGetCallerTID@4
-CoGetClassObject@20
-CoGetCurrentLogicalThreadId@4
-CoGetCurrentProcess@0
-CoGetInstanceFromFile@32
-CoGetInstanceFromIStorage@28
-CoGetInterfaceAndReleaseStream@12
-CoGetMalloc@8
-CoGetMarshalSizeMax@24
-CoGetObject@16
-CoGetPSClsid@8
-CoGetStandardMarshal@24
-CoGetState@4
-CoGetTreatAsClass@8
-CoImpersonateClient@0
-CoInitialize@4
-CoInitializeEx@8
-CoInitializeSecurity@36
-CoInitializeWOW@8
-CoIsHandlerConnected@4
-CoIsOle1Class@4
-CoLoadLibrary@8
-CoLockObjectExternal@12
-CoMarshalHresult@8
-CoMarshalInterThreadInterfaceInStream@12
-CoMarshalInterface@24
-CoQueryAuthenticationServices@8
-CoQueryClientBlanket@28
-CoQueryProxyBlanket@32
-CoQueryReleaseObject@4
-CoRegisterChannelHook@8
-CoRegisterClassObject@20
-CoRegisterMallocSpy@4
-CoRegisterMessageFilter@8
-CoRegisterPSClsid@8
-CoRegisterSurrogate@4
-CoReleaseMarshalData@4
-CoReleaseServerProcess@0
-CoResumeClassObjects@0
-CoRevertToSelf@0
-CoRevokeClassObject@4
-CoRevokeMallocSpy@0
-CoSetProxyBlanket@32
-CoSetState@4
-CoSuspendClassObjects@0
-CoSwitchCallContext@8
-CoTaskMemAlloc@4
-CoTaskMemFree@4
-CoTaskMemRealloc@8
-CoTreatAsClass@8
-CoUninitialize@0
-CoUnloadingWOW@4
-CoUnmarshalHresult@8
-CoUnmarshalInterface@12
-CreateAntiMoniker@4
-CreateBindCtx@8
-CreateClassMoniker@8
-CreateDataAdviseHolder@4
-CreateDataCache@16
-CreateFileMoniker@8
-CreateGenericComposite@12
-CreateILockBytesOnHGlobal@12
-CreateItemMoniker@12
-CreateOleAdviseHolder@4
-CreatePointerMoniker@8
-CreateStreamOnHGlobal@12
-DllDebugObjectRPCHook@8
-DllGetClassObjectWOW@12
-DoDragDrop@16
-EnableHookObject@8
-FreePropVariantArray@8
-GetClassFile@8
-GetConvertStg@4
-GetDocumentBitStg@4
-GetHGlobalFromILockBytes@8
-GetHGlobalFromStream@8
-GetHookInterface@4
-GetRunningObjectTable@8
-HACCEL_UserFree@8
-HACCEL_UserMarshal@12
-HACCEL_UserSize@12
-HACCEL_UserUnmarshal@12
-HBITMAP_UserFree@8
-HBITMAP_UserMarshal@12
-HBITMAP_UserSize@12
-HBITMAP_UserUnmarshal@12
-HBRUSH_UserFree@8
-HBRUSH_UserMarshal@12
-HBRUSH_UserSize@12
-HBRUSH_UserUnmarshal@12
-HENHMETAFILE_UserFree@8
-HENHMETAFILE_UserMarshal@12
-HENHMETAFILE_UserSize@12
-HENHMETAFILE_UserUnmarshal@12
-HGLOBAL_UserFree@8
-HGLOBAL_UserMarshal@12
-HGLOBAL_UserSize@12
-HGLOBAL_UserUnmarshal@12
-HMENU_UserFree@8
-HMENU_UserMarshal@12
-HMENU_UserSize@12
-HMENU_UserUnmarshal@12
-HMETAFILEPICT_UserFree@8
-HMETAFILEPICT_UserMarshal@12
-HMETAFILEPICT_UserSize@12
-HMETAFILEPICT_UserUnmarshal@12
-HMETAFILE_UserFree@8
-HMETAFILE_UserMarshal@12
-HMETAFILE_UserSize@12
-HMETAFILE_UserUnmarshal@12
-HPALETTE_UserFree@8
-HPALETTE_UserMarshal@12
-HPALETTE_UserSize@12
-HPALETTE_UserUnmarshal@12
-HWND_UserFree@8
-HWND_UserMarshal@12
-HWND_UserSize@12
-HWND_UserUnmarshal@12
-IIDFromString@8
-IsAccelerator@16
-IsEqualGUID@8
-IsValidIid@4
-IsValidInterface@4
-IsValidPtrIn@8
-IsValidPtrOut@8
-MkParseDisplayName@16
-MonikerCommonPrefixWith@12
-MonikerRelativePathTo@16
-OleBuildVersion@0
-OleConvertIStorageToOLESTREAM@8
-OleConvertIStorageToOLESTREAMEx@28
-OleConvertOLESTREAMToIStorage@12
-OleConvertOLESTREAMToIStorageEx@28
-OleCreate@28
-OleCreateDefaultHandler@16
-OleCreateEmbeddingHelper@24
-OleCreateEx@48
-OleCreateFromData@28
-OleCreateFromDataEx@48
-OleCreateFromFile@32
-OleCreateFromFileEx@52
-OleCreateLink@28
-OleCreateLinkEx@48
-OleCreateLinkFromData@28
-OleCreateLinkFromDataEx@48
-OleCreateLinkToFile@28
-OleCreateLinkToFileEx@48
-OleCreateMenuDescriptor@8
-OleCreateStaticFromData@28
-OleDestroyMenuDescriptor@4
-OleDoAutoConvert@8
-OleDraw@16
-OleDuplicateData@12
-OleFlushClipboard@0
-OleGetAutoConvert@8
-OleGetClipboard@4
-OleGetIconOfClass@12
-OleGetIconOfFile@8
-OleInitialize@4
-OleInitializeWOW@8
-OleIsCurrentClipboard@4
-OleIsRunning@4
-OleLoad@16
-OleLoadFromStream@12
-OleLockRunning@12
-OleMetafilePictFromIconAndLabel@16
-OleNoteObjectVisible@8
-OleQueryCreateFromData@4
-OleQueryLinkFromData@4
-OleRegEnumFormatEtc@12
-OleRegEnumVerbs@8
-OleRegGetMiscStatus@12
-OleRegGetUserType@12
-OleRun@4
-OleSave@12
-OleSaveToStream@8
-OleSetAutoConvert@8
-OleSetClipboard@4
-OleSetContainedObject@8
-OleSetMenuDescriptor@20
-OleTranslateAccelerator@12
-OleUninitialize@0
-OpenOrCreateStream@12
-ProgIDFromCLSID@8
-PropSysAllocString@4
-PropSysFreeString@4
-PropVariantClear@4
-PropVariantCopy@8
-ReadClassStg@8
-ReadClassStm@8
-ReadFmtUserTypeStg@12
-ReadOleStg@24
-ReadStringStream@8
-RegisterDragDrop@8
-ReleaseStgMedium@4
-RevokeDragDrop@4
-SNB_UserFree@8
-SNB_UserMarshal@12
-SNB_UserSize@12
-SNB_UserUnmarshal@12
-STGMEDIUM_UserFree@8
-STGMEDIUM_UserMarshal@12
-STGMEDIUM_UserSize@12
-STGMEDIUM_UserUnmarshal@12
-SetConvertStg@8
-SetDocumentBitStg@8
-StgCreateDocfile@16
-StgCreateDocfileOnILockBytes@16
-StgGetIFillLockBytesOnFile@8
-StgGetIFillLockBytesOnILockBytes@8
-StgIsStorageFile@4
-StgIsStorageILockBytes@4
-StgOpenAsyncDocfileOnIFillLockBytes@16
-StgOpenStorage@24
-StgOpenStorageOnILockBytes@24
-StgSetTimes@16
-StgCreateStorageEx@32
-StgOpenStorageEx@32
-StringFromCLSID@8
-StringFromGUID2@12
-StringFromIID@8
-UpdateDCOMSettings@0
-UtConvertDvtd16toDvtd32@12
-UtConvertDvtd32toDvtd16@12
-UtGetDvtd16Info@8
-UtGetDvtd32Info@8
-WriteClassStg@8
-WriteClassStm@8
-WriteFmtUserTypeStg@12
-WriteOleStg@16
-WriteStringStream@8
diff --git a/winsup/w32api/lib/oleacc-uuid.c b/winsup/w32api/lib/oleacc-uuid.c
deleted file mode 100644
index 4f53eb5..0000000
--- a/winsup/w32api/lib/oleacc-uuid.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/* oleacc-uuid.c */
-/* Generate GUIDs for OLE Accessibility interfaces */
-
-/* All IIDs defined in this file were extracted from
- * HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\ */
-
-#define INITGUID
-#include <basetyps.h>
-DEFINE_GUID(IID_IAccessible,0x618736e0,0x3c3d,0x11cf,0x81,0x0c,0x00,0xaa,0x00,0x38,0x9b,0x71);
-// IAccessibleHandler TypeLib
-DEFINE_GUID(LIBID_Accessibility, 0x1ea4dbf0, 0x3c3b,0x11cf, 0x81, 0x0c, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
diff --git a/winsup/w32api/lib/oleacc.def b/winsup/w32api/lib/oleacc.def
deleted file mode 100644
index c7ea139..0000000
--- a/winsup/w32api/lib/oleacc.def
+++ /dev/null
@@ -1,17 +0,0 @@
-LIBRARY Oleacc.dll
-EXPORTS
-AccessibleChildren@20
-AccessibleObjectFromEvent@20
-AccessibleObjectFromPoint@16
-AccessibleObjectFromWindow@16
-CreateStdAccessibleObject@16
-CreateStdAccessibleProxyA@20
-CreateStdAccessibleProxyW@20
-GetOleaccVersionInfo@8
-GetRoleTextA@12
-GetRoleTextW@12
-GetStateTextA@12
-GetStateTextW@12
-LresultFromObject@12
-ObjectFromLresult@16
-WindowFromAccessibleObject@8
diff --git a/winsup/w32api/lib/oleaut32.def b/winsup/w32api/lib/oleaut32.def
deleted file mode 100644
index fed4065..0000000
--- a/winsup/w32api/lib/oleaut32.def
+++ /dev/null
@@ -1,355 +0,0 @@
-LIBRARY OLEAUT32.DLL
-EXPORTS
-BSTR_UserFree@8
-BSTR_UserMarshal@12
-BSTR_UserSize@12
-BSTR_UserUnmarshal@12
-BstrFromVector@8
-ClearCustData@4
-CreateDispTypeInfo@12
-CreateErrorInfo@4
-CreateStdDispatch@16
-CreateTypeLib@12
-CreateTypeLib2@12
-DispCallFunc@32
-DispGetIDsOfNames@16
-DispGetParam@20
-DispInvoke@32
-DosDateTimeToVariantTime@12
-GetActiveObject@12
-GetAltMonthNames@8
-GetErrorInfo@8
-GetRecordInfoFromGuids@24
-GetRecordInfoFromTypeInfo@8
-LHashValOfNameSys@12
-LHashValOfNameSysA@12
-LoadRegTypeLib@20
-LoadTypeLib@8
-LoadTypeLibEx@12
-LPSAFEARRAY_Marshal@16
-LPSAFEARRAY_Size@16
-LPSAFEARRAY_Unmarshal@16
-LPSAFEARRAY_UserFree@8
-LPSAFEARRAY_UserMarshal@12
-LPSAFEARRAY_UserSize@12
-LPSAFEARRAY_UserUnmarshal@12
-OaBuildVersion@0
-OleCreateFontIndirect@12
-OleCreatePictureIndirect@16
-OleCreatePropertyFrame@44
-OleCreatePropertyFrameIndirect@4
-OleIconToCursor@8
-OleLoadPicture@20
-OleLoadPictureEx@32
-OleLoadPictureFile@20
-OleLoadPictureFileEx@32
-OleLoadPicturePath@24
-OleSavePictureFile@8
-OleTranslateColor@12
-QueryPathOfRegTypeLib@20
-RegisterActiveObject@16
-RegisterTypeLib@12
-RevokeActiveObject@8
-SafeArrayAccessData@8
-SafeArrayAllocData@4
-SafeArrayAllocDescriptor@8
-SafeArrayAllocDescriptorEx@12
-SafeArrayCopy@8
-SafeArrayCopyData@8
-SafeArrayCreate@12
-SafeArrayCreateEx@16
-SafeArrayCreateVector@12
-SafeArrayCreateVectorEx@16
-SafeArrayDestroy@4
-SafeArrayDestroyData@4
-SafeArrayDestroyDescriptor@4
-SafeArrayGetDim@4
-SafeArrayGetElement@12
-SafeArrayGetElemsize@4
-SafeArrayGetIID@8
-SafeArrayGetLBound@12
-SafeArrayGetRecordInfo@8
-SafeArrayGetUBound@12
-SafeArrayGetVartype@8
-SafeArrayLock@4
-SafeArrayPtrOfIndex@12
-SafeArrayPutElement@12
-SafeArrayRedim@8
-SafeArraySetIID@8
-SafeArraySetRecordInfo@8
-SafeArrayUnaccessData@4
-SafeArrayUnlock@4
-SetErrorInfo@8
-SysAllocString@4
-SysAllocStringByteLen@8
-SysAllocStringLen@8
-SysFreeString@4
-SysReAllocString@8
-SysReAllocStringLen@12
-SysStringByteLen@4
-SysStringLen@4
-SystemTimeToVariantTime@8
-UnRegisterTypeLib@20
-UserBSTR_free_inst@4
-UserBSTR_free_local@4
-UserBSTR_from_local@8
-UserBSTR_to_local@8
-UserEXCEPINFO_free_inst@4
-UserEXCEPINFO_free_local@4
-UserEXCEPINFO_from_local@8
-UserEXCEPINFO_to_local@8
-UserHWND_free_inst@4
-UserHWND_free_local@4
-UserHWND_from_local@8
-UserHWND_to_local@8
-UserMSG_free_inst@4
-UserMSG_free_local@4
-UserMSG_from_local@8
-UserMSG_to_local@8
-UserVARIANT_free_inst@4
-UserVARIANT_free_local@4
-UserVARIANT_from_local@8
-UserVARIANT_to_local@8
-VarAbs@8
-VarAdd@12
-VarAnd@12
-VarBoolFromCy@12
-VarBoolFromDate@12
-VarBoolFromDec@8
-VarBoolFromDisp@12
-VarBoolFromI1@8
-VarBoolFromI2@8
-VarBoolFromI4@8
-VarBoolFromR4@8
-VarBoolFromR8@12
-VarBoolFromStr@16
-VarBoolFromUI1@8
-VarBoolFromUI2@8
-VarBoolFromUI4@8
-VarBstrCat@12
-VarBstrCmp@16
-VarBstrFromBool@16
-VarBstrFromCy@20
-VarBstrFromDate@20
-VarBstrFromDec@16
-VarBstrFromDisp@16
-VarBstrFromI1@16
-VarBstrFromI2@16
-VarBstrFromI4@16
-VarBstrFromR4@16
-VarBstrFromR8@20
-VarBstrFromUI1@16
-VarBstrFromUI2@16
-VarBstrFromUI4@16
-VarCat@12
-VarCmp@16
-VarCyAbs@12
-VarCyAdd@20
-VarCyCmp@16
-VarCyCmpR8@16
-VarCyFix@12
-VarCyFromBool@8
-VarCyFromDate@12
-VarCyFromDec@8
-VarCyFromDisp@12
-VarCyFromI1@8
-VarCyFromI2@8
-VarCyFromI4@8
-VarCyFromR4@8
-VarCyFromR8@12
-VarCyFromStr@16
-VarCyFromUI1@8
-VarCyFromUI2@8
-VarCyFromUI4@8
-VarCyInt@12
-VarCyMul@20
-VarCyMulI4@16
-VarCyNeg@12
-VarCyRound@16
-VarCySub@20
-VarDateFromBool@8
-VarDateFromCy@12
-VarDateFromDec@8
-VarDateFromDisp@12
-VarDateFromI1@8
-VarDateFromI2@8
-VarDateFromI4@8
-VarDateFromR4@8
-VarDateFromR8@12
-VarDateFromStr@16
-VarDateFromUdate@12
-VarDateFromUdateEx@16
-VarDateFromUI1@8
-VarDateFromUI2@8
-VarDateFromUI4@8
-VarDecAbs@8
-VarDecAdd@12
-VarDecCmp@8
-VarDecCmpR8@12
-VarDecDiv@12
-VarDecFix@8
-VarDecFromBool@8
-VarDecFromCy@12
-VarDecFromDate@12
-VarDecFromDisp@12
-VarDecFromI1@8
-VarDecFromI2@8
-VarDecFromI4@8
-VarDecFromR4@8
-VarDecFromR8@12
-VarDecFromStr@16
-VarDecFromUI1@8
-VarDecFromUI2@8
-VarDecFromUI4@8
-VarDecInt@8
-VarDecMul@12
-VarDecNeg@8
-VarDecRound@12
-VarDecSub@12
-VarDiv@12
-VarEqv@12
-VarFix@8
-VarFormat@24
-VarFormatCurrency@28
-VarFormatDateTime@16
-VarFormatFromTokens@24
-VarFormatNumber@28
-VarFormatPercent@28
-VarI1FromBool@8
-VarI1FromCy@12
-VarI1FromDate@12
-VarI1FromDec@8
-VarI1FromDisp@12
-VarI1FromI2@8
-VarI1FromI4@8
-VarI1FromR4@8
-VarI1FromR8@12
-VarI1FromStr@16
-VarI1FromUI1@8
-VarI1FromUI2@8
-VarI1FromUI4@8
-VarI2FromBool@8
-VarI2FromCy@12
-VarI2FromDate@12
-VarI2FromDec@8
-VarI2FromDisp@12
-VarI2FromI1@8
-VarI2FromI4@8
-VarI2FromR4@8
-VarI2FromR8@12
-VarI2FromStr@16
-VarI2FromUI1@8
-VarI2FromUI2@8
-VarI2FromUI4@8
-VarI4FromBool@8
-VarI4FromCy@12
-VarI4FromDate@12
-VarI4FromDec@8
-VarI4FromDisp@12
-VarI4FromI1@8
-VarI4FromI2@8
-VarI4FromR4@8
-VarI4FromR8@12
-VarI4FromStr@16
-VarI4FromUI1@8
-VarI4FromUI2@8
-VarI4FromUI4@8
-VARIANT_UserFree@8
-VARIANT_UserMarshal@12
-VARIANT_UserSize@12
-VARIANT_UserUnmarshal@12
-VariantChangeType@16
-VariantChangeTypeEx@20
-VariantClear@4
-VariantCopy@8
-VariantCopyInd@8
-VariantInit@4
-VariantTimeToDosDateTime@16
-VariantTimeToSystemTime@12
-VarIdiv@12
-VarImp@12
-VarInt@8
-VarMod@12
-VarMonthName@16
-VarMul@12
-VarNeg@8
-VarNot@8
-VarNumFromParseNum@16
-VarOr@12
-VarParseNumFromStr@20
-VarPow@12
-VarR4CmpR8@12
-VarR4FromBool@8
-VarR4FromCy@12
-VarR4FromDate@12
-VarR4FromDec@8
-VarR4FromDisp@12
-VarR4FromI1@8
-VarR4FromI2@8
-VarR4FromI4@8
-VarR4FromR8@12
-VarR4FromStr@16
-VarR4FromUI1@8
-VarR4FromUI2@8
-VarR4FromUI4@8
-VarR8FromBool@8
-VarR8FromCy@12
-VarR8FromDate@12
-VarR8FromDec@8
-VarR8FromDisp@12
-VarR8FromI1@8
-VarR8FromI2@8
-VarR8FromI4@8
-VarR8FromR4@8
-VarR8FromStr@16
-VarR8FromUI1@8
-VarR8FromUI2@8
-VarR8FromUI4@8
-VarR8Pow@20
-VarR8Round@16
-VarRound@12
-VarSub@12
-VarTokenizeFormatString@28
-VarUdateFromDate@16
-VarUI1FromBool@8
-VarUI1FromCy@12
-VarUI1FromDate@12
-VarUI1FromDec@8
-VarUI1FromDisp@12
-VarUI1FromI1@8
-VarUI1FromI2@8
-VarUI1FromI4@8
-VarUI1FromR4@8
-VarUI1FromR8@12
-VarUI1FromStr@16
-VarUI1FromUI2@8
-VarUI1FromUI4@8
-VarUI2FromBool@8
-VarUI2FromCy@12
-VarUI2FromDate@12
-VarUI2FromDec@8
-VarUI2FromDisp@12
-VarUI2FromI1@8
-VarUI2FromI2@8
-VarUI2FromI4@8
-VarUI2FromR4@8
-VarUI2FromR8@12
-VarUI2FromStr@16
-VarUI2FromUI1@8
-VarUI2FromUI4@8
-VarUI4FromBool@8
-VarUI4FromCy@12
-VarUI4FromDate@12
-VarUI4FromDec@8
-VarUI4FromDisp@12
-VarUI4FromI1@8
-VarUI4FromI2@8
-VarUI4FromI4@8
-VarUI4FromR4@8
-VarUI4FromR8@12
-VarUI4FromStr@16
-VarUI4FromUI1@8
-VarUI4FromUI2@8
-VarWeekdayName@20
-VarXor@12
-VectorFromBstr@8
diff --git a/winsup/w32api/lib/olecli32.def b/winsup/w32api/lib/olecli32.def
deleted file mode 100644
index f02f35e..0000000
--- a/winsup/w32api/lib/olecli32.def
+++ /dev/null
@@ -1,57 +0,0 @@
-LIBRARY OLECLI32.DLL
-EXPORTS
-OleActivate@24
-OleClone@20
-OleClose@4
-OleCopyFromLink@24
-OleCopyToClipboard@4
-OleCreate@32
-OleCreateFromClip@28
-OleCreateFromFile@36
-OleCreateFromTemplate@32
-OleCreateInvisible@36
-OleCreateLinkFromClip@28
-OleCreateLinkFromFile@40
-OleDelete@4
-OleDraw@20
-OleEnumFormats@8
-OleEnumObjects@8
-OleEqual@8
-OleExecute@12
-OleGetData@12
-OleGetLinkUpdateOptions@8
-OleIsDcMeta@4
-OleLoadFromStream@24
-OleLockServer@8
-OleObjectConvert@24
-OleQueryBounds@8
-OleQueryClientVersion@0
-OleQueryCreateFromClip@12
-OleQueryLinkFromClip@12
-OleQueryName@12
-OleQueryOpen@4
-OleQueryOutOfDate@4
-OleQueryProtocol@8
-OleQueryReleaseError@4
-OleQueryReleaseMethod@4
-OleQueryReleaseStatus@4
-OleQuerySize@8
-OleQueryType@8
-OleReconnect@4
-OleRegisterClientDoc@16
-OleRelease@4
-OleRename@8
-OleRenameClientDoc@8
-OleRequestData@8
-OleRevertClientDoc@4
-OleRevokeClientDoc@4
-OleSaveToStream@8
-OleSavedClientDoc@4
-OleSetBounds@8
-OleSetColorScheme@8
-OleSetData@12
-OleSetHostNames@12
-OleSetLinkUpdateOptions@8
-OleSetTargetDevice@8
-OleUnlockServer@4
-OleUpdate@4
diff --git a/winsup/w32api/lib/olectlid-uuid.c b/winsup/w32api/lib/olectlid-uuid.c
deleted file mode 100644
index 1fde2dc..0000000
--- a/winsup/w32api/lib/olectlid-uuid.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* olectlid-uuid.c */
-/* Generate GUIDs for OLECTLID interfaces */
-
-/* All IIDs defined in this file were extracted from
- * HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\ */
-
-/* All CLSIDs defined in this file were extracted from
- * HKEY_CLASSES_ROOT\CLSID\ */
-
-#define INITGUID
-#include <basetyps.h>
-DEFINE_OLEGUID(IID_IDispatch,0x20400,0,0);
-DEFINE_OLEGUID(IID_IEnumUnknown,0x100,0,0);
-DEFINE_OLEGUID(IID_IEnumString,0x101,0,0);
-DEFINE_OLEGUID(IID_IEnumMoniker,0x102,0,0);
-DEFINE_OLEGUID(IID_IEnumFORMATETC,0x103,0,0);
-DEFINE_OLEGUID(IID_IEnumOLEVERB,0x104,0,0);
-DEFINE_OLEGUID(IID_IEnumSTATDATA,0x105,0,0);
-DEFINE_OLEGUID(IID_IEnumSTATSTG,0xd,0,0);
-DEFINE_OLEGUID(IID_IOleLink,0x11d,0,0);
-DEFINE_OLEGUID(IID_IDebug,0x123,0,0);
-DEFINE_OLEGUID(IID_IDebugStream,0x124,0,0);
-// Font Property Page CLSID
-DEFINE_GUID(CLSID_CFontPropPage, 0x0be35200,0x8f91,0x11ce,0x9d,0xe3,0x00,0xaa,0x00,0x4b,0xb8,0x51);
-// Color Property Page CLSID
-DEFINE_GUID(CLSID_CColorPropPage,0xbe35201,0x8f91,0x11ce,0x9d,0xe3,0,0xaa,0,0x4b,0xb8,0x51);
-// Picture Property Page CLSID
-DEFINE_GUID(CLSID_CPicturePropPage,0xbe35202,0x8f91,0x11ce,0x9d,0xe3,0,0xaa,0,0x4b,0xb8,0x51);
-// Standard Font CLSID
-DEFINE_GUID(CLSID_StdFont,0xbe35203,0x8f91,0x11ce,0x9d,0xe3,0,0xaa,0,0x4b,0xb8,0x51);
-// Standard Picture CLSID
-DEFINE_GUID(CLSID_StdPicture,0xbe35204,0x8f91,0x11ce,0x9d,0xe3,0,0xaa,0,0x4b,0xb8,0x51);
-// Picture (Metafile) CLSID
-DEFINE_OLEGUID(CLSID_Picture_Metafile,0x315,0,0);
-// Picture (Device Independent Bitmap) CLSID
-DEFINE_OLEGUID(CLSID_Picture_Dib,0x316,0,0);
diff --git a/winsup/w32api/lib/oledlg.def b/winsup/w32api/lib/oledlg.def
deleted file mode 100644
index 6ae8ace..0000000
--- a/winsup/w32api/lib/oledlg.def
+++ /dev/null
@@ -1,25 +0,0 @@
-LIBRARY OLEDLG.DLL
-EXPORTS
-OleUIAddVerbMenuA@36
-OleUIAddVerbMenuW@36
-OleUIBusyA@4
-OleUIBusyW@4
-OleUICanConvertOrActivateAs@12
-OleUIChangeIconA@4
-OleUIChangeIconW@4
-OleUIChangeSourceA@4
-OleUIChangeSourceW@4
-OleUIConvertA@4
-OleUIConvertW@4
-OleUIEditLinksA@4
-OleUIEditLinksW@4
-OleUIInsertObjectA@4
-OleUIInsertObjectW@4
-OleUIObjectPropertiesA@4
-OleUIObjectPropertiesW@4
-OleUIPasteSpecialA@4
-OleUIPasteSpecialW@4
-OleUIPromptUserA
-OleUIPromptUserW
-OleUIUpdateLinksA@16
-OleUIUpdateLinksW@16
diff --git a/winsup/w32api/lib/oleidl-uuid.c b/winsup/w32api/lib/oleidl-uuid.c
deleted file mode 100644
index 929754e..0000000
--- a/winsup/w32api/lib/oleidl-uuid.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* oleidl-uuid.c */
-/* Generate GUIDs for OLE IDL interfaces */
-
-/* All IIDs defined in this file were extracted from
- * HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\ */
-
-#define INITGUID
-#include <basetyps.h>
-DEFINE_OLEGUID(IID_IOleCache,0x11e,0,0);
-DEFINE_OLEGUID(IID_IOleCache2,0x128,0,0);
-DEFINE_OLEGUID(IID_IOleCacheControl,0x129,0,0);
-DEFINE_OLEGUID(IID_IViewObject,0x10d,0,0);
-DEFINE_OLEGUID(IID_IViewObject2,0x127,0,0);
-DEFINE_OLEGUID(IID_IDropSource,0x121,0,0);
-DEFINE_OLEGUID(IID_IDropTarget,0x122,0,0);
-DEFINE_OLEGUID(IID_IOleAdviseHolder,0x111,0,0);
-DEFINE_OLEGUID(IID_IOleInPlaceUIWindow,0x115,0,0);
-DEFINE_OLEGUID(IID_IOleInPlaceObject,0x113,0,0);
-DEFINE_OLEGUID(IID_IOleInPlaceActiveObject,0x117,0,0);
-DEFINE_OLEGUID(IID_IOleInPlaceFrame,0x116,0,0);
-DEFINE_OLEGUID(IID_IOleInPlaceSite,0x119,0,0);
-DEFINE_OLEGUID(IID_IOleContainer,0x11b,0,0);
-DEFINE_OLEGUID(IID_IOleItemContainer,0x11c,0,0);
-DEFINE_OLEGUID(IID_IOleClientSite,0x118,0,0);
-DEFINE_OLEGUID(IID_IOleObject,0x112,0,0);
-DEFINE_OLEGUID(IID_IOleWindow,0x114,0,0);
-DEFINE_OLEGUID(IID_IParseDisplayName,0x11a,0,0);
diff --git a/winsup/w32api/lib/olepro32.def b/winsup/w32api/lib/olepro32.def
deleted file mode 100644
index ebfbbc5..0000000
--- a/winsup/w32api/lib/olepro32.def
+++ /dev/null
@@ -1,9 +0,0 @@
-LIBRARY OLEPRO32.DLL
-EXPORTS
-OleCreateFontIndirect@12
-OleCreatePictureIndirect@16
-OleCreatePropertyFrame@44
-OleCreatePropertyFrameIndirect@4
-OleIconToCursor@8
-OleLoadPicture@20
-OleTranslateColor@12
diff --git a/winsup/w32api/lib/olesvr32.def b/winsup/w32api/lib/olesvr32.def
deleted file mode 100644
index 04d5ba6..0000000
--- a/winsup/w32api/lib/olesvr32.def
+++ /dev/null
@@ -1,13 +0,0 @@
-LIBRARY OLESVR32.DLL
-EXPORTS
-OleBlockServer@4
-OleQueryServerVersion@0
-OleRegisterServer@20
-OleRegisterServerDoc@16
-OleRenameServerDoc@8
-OleRevertServerDoc@4
-OleRevokeObject@4
-OleRevokeServer@4
-OleRevokeServerDoc@4
-OleSavedServerDoc@4
-OleUnblockServer@8
diff --git a/winsup/w32api/lib/opengl32.def b/winsup/w32api/lib/opengl32.def
deleted file mode 100644
index e612a57..0000000
--- a/winsup/w32api/lib/opengl32.def
+++ /dev/null
@@ -1,369 +0,0 @@
-LIBRARY OPENGL32.DLL
-EXPORTS
-GlmfBeginGlsBlock@4
-GlmfCloseMetaFile@4
-GlmfEndGlsBlock@4
-GlmfEndPlayback@4
-GlmfInitPlayback@12
-GlmfPlayGlsRecord@16
-glAccum@8
-glAlphaFunc@8
-glAreTexturesResident@12
-glArrayElement@4
-glBegin@4
-glBindTexture@8
-glBitmap@28
-glBlendFunc@8
-glCallList@4
-glCallLists@12
-glClear@4
-glClearAccum@16
-glClearColor@16
-glClearDepth@8
-glClearIndex@4
-glClearStencil@4
-glClipPlane@8
-glColor3b@12
-glColor3bv@4
-glColor3d@24
-glColor3dv@4
-glColor3f@12
-glColor3fv@4
-glColor3i@12
-glColor3iv@4
-glColor3s@12
-glColor3sv@4
-glColor3ub@12
-glColor3ubv@4
-glColor3ui@12
-glColor3uiv@4
-glColor3us@12
-glColor3usv@4
-glColor4b@16
-glColor4bv@4
-glColor4d@32
-glColor4dv@4
-glColor4f@16
-glColor4fv@4
-glColor4i@16
-glColor4iv@4
-glColor4s@16
-glColor4sv@4
-glColor4ub@16
-glColor4ubv@4
-glColor4ui@16
-glColor4uiv@4
-glColor4us@16
-glColor4usv@4
-glColorMask@16
-glColorMaterial@8
-glColorPointer@16
-glCopyPixels@20
-glCopyTexImage1D@28
-glCopyTexImage2D@32
-glCopyTexSubImage1D@24
-glCopyTexSubImage2D@32
-glCullFace@4
-glDebugEntry@8
-glDeleteLists@8
-glDeleteTextures@8
-glDepthFunc@4
-glDepthMask@4
-glDepthRange@16
-glDisable@4
-glDisableClientState@4
-glDrawArrays@12
-glDrawBuffer@4
-glDrawElements@16
-glDrawPixels@20
-glEdgeFlag@4
-glEdgeFlagPointer@8
-glEdgeFlagv@4
-glEnable@4
-glEnableClientState@4
-glEnd@0
-glEndList@0
-glEvalCoord1d@8
-glEvalCoord1dv@4
-glEvalCoord1f@4
-glEvalCoord1fv@4
-glEvalCoord2d@16
-glEvalCoord2dv@4
-glEvalCoord2f@8
-glEvalCoord2fv@4
-glEvalMesh1@12
-glEvalMesh2@20
-glEvalPoint1@4
-glEvalPoint2@8
-glFeedbackBuffer@12
-glFinish@0
-glFlush@0
-glFogf@8
-glFogfv@8
-glFogi@8
-glFogiv@8
-glFrontFace@4
-glFrustum@48
-glGenLists@4
-glGenTextures@8
-glGetBooleanv@8
-glGetClipPlane@8
-glGetDoublev@8
-glGetError@0
-glGetFloatv@8
-glGetIntegerv@8
-glGetLightfv@12
-glGetLightiv@12
-glGetMapdv@12
-glGetMapfv@12
-glGetMapiv@12
-glGetMaterialfv@12
-glGetMaterialiv@12
-glGetPixelMapfv@8
-glGetPixelMapuiv@8
-glGetPixelMapusv@8
-glGetPointerv@8
-glGetPolygonStipple@4
-glGetString@4
-glGetTexEnvfv@12
-glGetTexEnviv@12
-glGetTexGendv@12
-glGetTexGenfv@12
-glGetTexGeniv@12
-glGetTexImage@20
-glGetTexLevelParameterfv@16
-glGetTexLevelParameteriv@16
-glGetTexParameterfv@12
-glGetTexParameteriv@12
-glHint@8
-glIndexMask@4
-glIndexPointer@12
-glIndexd@8
-glIndexdv@4
-glIndexf@4
-glIndexfv@4
-glIndexi@4
-glIndexiv@4
-glIndexs@4
-glIndexsv@4
-glIndexub@4
-glIndexubv@4
-glInitNames@0
-glInterleavedArrays@12
-glIsEnabled@4
-glIsList@4
-glIsTexture@4
-glLightModelf@8
-glLightModelfv@8
-glLightModeli@8
-glLightModeliv@8
-glLightf@12
-glLightfv@12
-glLighti@12
-glLightiv@12
-glLineStipple@8
-glLineWidth@4
-glListBase@4
-glLoadIdentity@0
-glLoadMatrixd@4
-glLoadMatrixf@4
-glLoadName@4
-glLogicOp@4
-glMap1d@32
-glMap1f@24
-glMap2d@56
-glMap2f@40
-glMapGrid1d@20
-glMapGrid1f@12
-glMapGrid2d@40
-glMapGrid2f@24
-glMaterialf@12
-glMaterialfv@12
-glMateriali@12
-glMaterialiv@12
-glMatrixMode@4
-glMultMatrixd@4
-glMultMatrixf@4
-glNewList@8
-glNormal3b@12
-glNormal3bv@4
-glNormal3d@24
-glNormal3dv@4
-glNormal3f@12
-glNormal3fv@4
-glNormal3i@12
-glNormal3iv@4
-glNormal3s@12
-glNormal3sv@4
-glNormalPointer@12
-glOrtho@48
-glPassThrough@4
-glPixelMapfv@12
-glPixelMapuiv@12
-glPixelMapusv@12
-glPixelStoref@8
-glPixelStorei@8
-glPixelTransferf@8
-glPixelTransferi@8
-glPixelZoom@8
-glPointSize@4
-glPolygonMode@8
-glPolygonOffset@8
-glPolygonStipple@4
-glPopAttrib@0
-glPopClientAttrib@0
-glPopMatrix@0
-glPopName@0
-glPrioritizeTextures@12
-glPushAttrib@4
-glPushClientAttrib@4
-glPushMatrix@0
-glPushName@4
-glRasterPos2d@16
-glRasterPos2dv@4
-glRasterPos2f@8
-glRasterPos2fv@4
-glRasterPos2i@8
-glRasterPos2iv@4
-glRasterPos2s@8
-glRasterPos2sv@4
-glRasterPos3d@24
-glRasterPos3dv@4
-glRasterPos3f@12
-glRasterPos3fv@4
-glRasterPos3i@12
-glRasterPos3iv@4
-glRasterPos3s@12
-glRasterPos3sv@4
-glRasterPos4d@32
-glRasterPos4dv@4
-glRasterPos4f@16
-glRasterPos4fv@4
-glRasterPos4i@16
-glRasterPos4iv@4
-glRasterPos4s@16
-glRasterPos4sv@4
-glReadBuffer@4
-glReadPixels@28
-glRectd@32
-glRectdv@8
-glRectf@16
-glRectfv@8
-glRecti@16
-glRectiv@8
-glRects@16
-glRectsv@8
-glRenderMode@4
-glRotated@32
-glRotatef@16
-glScaled@24
-glScalef@12
-glScissor@16
-glSelectBuffer@8
-glShadeModel@4
-glStencilFunc@12
-glStencilMask@4
-glStencilOp@12
-glTexCoord1d@8
-glTexCoord1dv@4
-glTexCoord1f@4
-glTexCoord1fv@4
-glTexCoord1i@4
-glTexCoord1iv@4
-glTexCoord1s@4
-glTexCoord1sv@4
-glTexCoord2d@16
-glTexCoord2dv@4
-glTexCoord2f@8
-glTexCoord2fv@4
-glTexCoord2i@8
-glTexCoord2iv@4
-glTexCoord2s@8
-glTexCoord2sv@4
-glTexCoord3d@24
-glTexCoord3dv@4
-glTexCoord3f@12
-glTexCoord3fv@4
-glTexCoord3i@12
-glTexCoord3iv@4
-glTexCoord3s@12
-glTexCoord3sv@4
-glTexCoord4d@32
-glTexCoord4dv@4
-glTexCoord4f@16
-glTexCoord4fv@4
-glTexCoord4i@16
-glTexCoord4iv@4
-glTexCoord4s@16
-glTexCoord4sv@4
-glTexCoordPointer@16
-glTexEnvf@12
-glTexEnvfv@12
-glTexEnvi@12
-glTexEnviv@12
-glTexGend@16
-glTexGendv@12
-glTexGenf@12
-glTexGenfv@12
-glTexGeni@12
-glTexGeniv@12
-glTexImage1D@32
-glTexImage2D@36
-glTexParameterf@12
-glTexParameterfv@12
-glTexParameteri@12
-glTexParameteriv@12
-glTexSubImage1D@28
-glTexSubImage2D@36
-glTranslated@24
-glTranslatef@12
-glVertex2d@16
-glVertex2dv@4
-glVertex2f@8
-glVertex2fv@4
-glVertex2i@8
-glVertex2iv@4
-glVertex2s@8
-glVertex2sv@4
-glVertex3d@24
-glVertex3dv@4
-glVertex3f@12
-glVertex3fv@4
-glVertex3i@12
-glVertex3iv@4
-glVertex3s@12
-glVertex3sv@4
-glVertex4d@32
-glVertex4dv@4
-glVertex4f@16
-glVertex4fv@4
-glVertex4i@16
-glVertex4iv@4
-glVertex4s@16
-glVertex4sv@4
-glVertexPointer@16
-glViewport@16
-wglChoosePixelFormat@8
-wglCopyContext@12
-wglCreateContext@4
-wglCreateLayerContext@8
-wglDeleteContext@4
-wglDescribeLayerPlane@20
-wglDescribePixelFormat@16
-wglGetCurrentContext@0
-wglGetCurrentDC@0
-wglGetDefaultProcAddress@4
-wglGetLayerPaletteEntries@20
-wglGetPixelFormat@4
-wglGetProcAddress@4
-wglMakeCurrent@8
-wglRealizeLayerPalette@12
-wglSetLayerPaletteEntries@20
-wglSetPixelFormat@12
-wglShareLists@8
-wglSwapBuffers@4
-wglSwapLayerBuffers@8
-wglUseFontBitmapsA@16
-wglUseFontBitmapsW@16
-wglUseFontOutlinesA@32
-wglUseFontOutlinesW@32
diff --git a/winsup/w32api/lib/penwin32.def b/winsup/w32api/lib/penwin32.def
deleted file mode 100644
index 0efc7f7..0000000
--- a/winsup/w32api/lib/penwin32.def
+++ /dev/null
@@ -1,101 +0,0 @@
-LIBRARY PENWIN32.DLL
-EXPORTS
-AddInksetInterval@8
-AddPenDataHRC@8
-AddPenInputHRC@20
-AddPointsPenData@16
-AddWordsHWL@12
-BoundingRectFromPoints@12
-CharacterToSymbol@12
-CompressPenData@12
-ConfigHREC@16
-CorrectWriting@24
-CreateCompatibleHRC@8
-CreateHWL@16
-CreateInkset@4
-CreateInksetHRCRESULT@12
-CreatePenDataEx@16
-CreatePenDataHRC@4
-CreatePenDataRegion@8
-DPtoTP@8
-DestroyHRC@4
-DestroyHRCRESULT@4
-DestroyHWL@4
-DestroyInkset@4
-DestroyPenData@4
-DoDefaultPenInput@8
-DrawPenDataEx@40
-DuplicatePenData@8
-EnableGestureSetHRC@12
-EnableSystemDictionaryHRC@8
-EndPenInputHRC@4
-ExtractPenDataPoints@28
-ExtractPenDataStrokes@20
-GetAlphabetHRC@12
-GetAlphabetPriorityHRC@12
-GetAlternateWordsHRCRESULT@20
-GetBoxMappingHRCRESULT@16
-GetBoxResultsHRC@24
-GetGuideHRC@12
-GetHRECFromHRC@4
-GetHotspotsHRCRESULT@16
-GetInksetInterval@12
-GetInksetIntervalCount@4
-GetInternationalHRC@20
-GetMaxResultsHRC@4
-GetPenAppFlags@0
-GetPenAsyncState@4
-GetPenDataAttributes@12
-GetPenDataInfo@16
-GetPenInput@24
-GetPenMiscInfo@8
-GetPointsFromPenData@20
-GetResultsHRC@16
-GetStrokeAttributes@16
-GetStrokeTableAttributes@16
-GetSymbolCountHRCRESULT@4
-GetSymbolsHRCRESULT@16
-GetVersionPenWin@0
-GetWordlistCoercionHRC@4
-GetWordlistHRC@8
-HitTestPenData@20
-InsertPenData@12
-InsertPenDataPoints@24
-InsertPenDataStroke@20
-InstallRecognizer@4
-IsPenEvent@8
-MetricScalePenData@8
-OffsetPenData@12
-PeekPenInput@20
-PenDataFromBuffer@20
-PenDataToBuffer@16
-ProcessHRC@8
-ReadHWL@8
-RedisplayPenData@24
-RemovePenDataStrokes@12
-ResizePenData@8
-SetAlphabetHRC@12
-SetAlphabetPriorityHRC@12
-SetBoxAlphabetHRC@12
-SetGuideHRC@12
-SetInternationalHRC@20
-SetMaxResultsHRC@8
-SetPenAppFlags@8
-SetPenMiscInfo@8
-SetResultsHookHREC@8
-SetStrokeAttributes@16
-SetStrokeTableAttributes@16
-SetWordlistCoercionHRC@8
-SetWordlistHRC@8
-StartInking@12
-StartPenInput@16
-StopInking@4
-StopPenInput@12
-SymbolToCharacter@16
-TPtoDP@8
-TargetPoints@20
-TrainHREC@20
-TrimPenData@12
-UnhookResultsHookHREC@8
-UninstallRecognizer@4
-WriteHWL@8
diff --git a/winsup/w32api/lib/pkpd32.def b/winsup/w32api/lib/pkpd32.def
deleted file mode 100644
index 58fbc27..0000000
--- a/winsup/w32api/lib/pkpd32.def
+++ /dev/null
@@ -1,36 +0,0 @@
-LIBRARY PKPD32.DLL
-EXPORTS
-AddInksetInterval@8
-AddPointsPenData@16
-BoundingRectFromPoints@12
-CompressPenData@12
-CreateInkset@4
-CreatePenDataEx@16
-CreatePenDataRegion@8
-DestroyInkset@4
-DestroyPenData@4
-DrawPenDataEx@40
-DuplicatePenData@8
-ExtractPenDataPoints@28
-ExtractPenDataStrokes@20
-GetInksetInterval@12
-GetInksetIntervalCount@4
-GetPenDataAttributes@12
-GetPenDataInfo@16
-GetPointsFromPenData@20
-GetStrokeAttributes@16
-GetStrokeTableAttributes@16
-HitTestPenData@20
-InsertPenData@12
-InsertPenDataPoints@24
-InsertPenDataStroke@20
-MetricScalePenData@8
-OffsetPenData@12
-PenDataFromBuffer@20
-PenDataToBuffer@16
-RedisplayPenData@24
-RemovePenDataStrokes@12
-ResizePenData@8
-SetStrokeAttributes@16
-SetStrokeTableAttributes@16
-TrimPenData@12
diff --git a/winsup/w32api/lib/power-uuid.c b/winsup/w32api/lib/power-uuid.c
deleted file mode 100644
index 1126d28..0000000
--- a/winsup/w32api/lib/power-uuid.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/* power-uuid.c */
-/* Generate GUIDs for OLE Accessibility interfaces */
-
-/* All IIDs defined in this file were found at "Registering for Power Events" on MSDN here:
- * http://msdn2.microsoft.com/en-us/library/aa373195.aspx
- */
-
-#define INITGUID
-#include <basetyps.h>
-DEFINE_GUID(GUID_POWERSCHEME_PERSONALITY, 0x245d8541, 0x3943, 0x4422, 0xb0, 0x25, 0x13, 0xA7, 0x84, 0xF6, 0x79, 0xB7);
-DEFINE_GUID(GUID_MIN_POWER_SAVINGS, 0x8c5e7fda, 0xe8bf, 0x4a96, 0x9a, 0x85, 0xa6, 0xe2, 0x3a, 0x8c, 0x63, 0x5c);
-DEFINE_GUID(GUID_MAX_POWER_SAVINGS, 0xa1841308, 0x3541, 0x4fab, 0xbc, 0x81, 0xf7, 0x15, 0x56, 0xf2, 0x0b, 0x4a);
-DEFINE_GUID(GUID_TYPICAL_POWER_SAVINGS, 0x381b4222, 0xf694, 0x41f0, 0x96, 0x85, 0xff, 0x5b, 0xb2, 0x60, 0xdf, 0x2e);
-DEFINE_GUID(GUID_ACDC_POWER_SOURCE, 0x5d3e9a59, 0xe9D5, 0x4b00, 0xa6, 0xbd, 0xff, 0x34, 0xff, 0x51, 0x65, 0x48);
-DEFINE_GUID(GUID_BATTERY_PERCENTAGE_REMAINING, 0xa7ad8041, 0xb45a, 0x4cae, 0x87, 0xa3, 0xee, 0xcb, 0xb4, 0x68, 0xa9, 0xe1);
-DEFINE_GUID(GUID_IDLE_BACKGROUND_TASK, 0x515c31d8, 0xf734, 0x163d, 0xa0, 0xfd, 0x11, 0xa0, 0x8c, 0x91, 0xe8, 0xf1);
-DEFINE_GUID(GUID_SYSTEM_AWAYMODE, 0x98a7f580, 0x01f7, 0x48aa, 0x9c, 0x0f, 0x44, 0x35, 0x2c, 0x29, 0xe5, 0xC0);
-DEFINE_GUID(GUID_MONITOR_POWER_ON, 0x02731015, 0x4510, 0x4526, 0x99, 0xe6, 0xe5, 0xa1, 0x7e, 0xbd, 0x1a, 0xea);
diff --git a/winsup/w32api/lib/powrprof.def b/winsup/w32api/lib/powrprof.def
deleted file mode 100644
index d2ad939..0000000
--- a/winsup/w32api/lib/powrprof.def
+++ /dev/null
@@ -1,25 +0,0 @@
-LIBRARY POWRPROF.dll
-EXPORTS
-CallNtPowerInformation@20
-CanUserWritePwrScheme@0
-DeletePwrScheme@4
-EnumPwrSchemes@8
-GetActivePwrScheme@4
-GetCurrentPowerPolicies@8
-GetPwrCapabilities@4
-GetPwrDiskSpindownRange@8
-IsAdminOverrideActive@4
-IsPwrHibernateAllowed@0
-IsPwrShutdownAllowed@0
-IsPwrSuspendAllowed@0
-LoadCurrentPwrScheme@16
-MergeLegacyPwrScheme@16
-ReadGlobalPwrPolicy@4
-ReadProcessorPwrScheme@8
-ReadPwrScheme@8
-SetActivePwrScheme@12
-SetSuspendState@12
-ValidatePowerPolicies@8
-WriteGlobalPwrPolicy@4
-WriteProcessorPwrScheme@8
-WritePwrScheme@16
diff --git a/winsup/w32api/lib/psapi.def b/winsup/w32api/lib/psapi.def
deleted file mode 100644
index e544f15..0000000
--- a/winsup/w32api/lib/psapi.def
+++ /dev/null
@@ -1,23 +0,0 @@
-LIBRARY PSAPI.DLL
-EXPORTS
-EmptyWorkingSet@4
-EnumDeviceDrivers@12
-EnumProcesses@12
-EnumProcessModules@16
-GetDeviceDriverBaseNameA@12
-GetDeviceDriverBaseNameW@12
-GetDeviceDriverFileNameA@12
-GetDeviceDriverFileNameW@12
-GetMappedFileNameA@16
-GetMappedFileNameW@16
-GetModuleBaseNameA@16
-GetModuleBaseNameW@16
-GetModuleFileNameExA@16
-GetModuleFileNameExW@16
-GetModuleInformation@16
-GetProcessMemoryInfo@12
-GetProcessImageFileNameA@12
-GetProcessImageFileNameW@12
-GetWsChanges@12
-InitializeProcessForWsWatch@4
-QueryWorkingSet@12
diff --git a/winsup/w32api/lib/quartz.def b/winsup/w32api/lib/quartz.def
deleted file mode 100644
index 8cfb105..0000000
--- a/winsup/w32api/lib/quartz.def
+++ /dev/null
@@ -1,7 +0,0 @@
-LIBRARY quartz.dll
-EXPORTS
-AMGetErrorTextA@12
-AMGetErrorTextW@12
-AmpFactorToDB@4
-DBToAmpFactor@4
-
diff --git a/winsup/w32api/lib/rapi.def b/winsup/w32api/lib/rapi.def
deleted file mode 100644
index 730faa2..0000000
--- a/winsup/w32api/lib/rapi.def
+++ /dev/null
@@ -1,84 +0,0 @@
-LIBRARY RAPI.DLL
-EXPORTS
-CeCheckPassword@4
-CeCloseHandle@4
-CeCopyFile@12
-CeCreateDatabase@16
-CeCreateDirectory@8
-CeCreateFile@28
-CeCreateProcess@40
-CeDeleteDatabase@4
-CeDeleteFile@4
-CeDeleteRecord@8
-CeFindAllDatabases@16
-CeFindAllFiles@16
-CeFindClose@4
-CeFindFirstDatabase@4
-CeFindFirstFile@8
-CeFindNextDatabase@4
-CeFindNextFile@8
-CeGetClassName@12
-CeGetDesktopDeviceCaps@4
-CeGetFileAttributes@4
-CeGetFileSize@8
-CeGetFileTime@16
-CeGetLastError@0
-CeGetSpecialFolderPath@12
-CeGetStoreInformation@4
-CeGetSystemInfo@4
-CeGetSystemMetrics@4
-CeGetSystemPowerStatusEx@8
-CeGetTempPath@8
-CeGetVersionEx@4
-CeGetWindow@8
-CeGetWindowLong@8
-CeGetWindowText@12
-CeGlobalMemoryStatus@4
-CeMoveFile@8
-CeOidGetInfo@8
-CeOpenDatabase@20
-CeRapiFreeBuffer@4
-CeRapiGetError@0
-CeRapiInit@0
-CeRapiInitEx@4
-CeRapiInvoke@32
-CeRapiUninit@0
-CeReadFile@20
-CeReadRecordProps@24
-CeRegCloseKey@4
-CeRegCreateKeyEx@36
-CeRegDeleteKey@8
-CeRegDeleteValue@8
-CeRegEnumKeyEx@32
-CeRegEnumValue@32
-CeRegOpenKeyEx@20
-CeRegQueryInfoKey@48
-CeRegQueryValueEx@24
-CeRegSetValueEx@24
-CeRemoveDirectory@4
-CeSHCreateShortcut@8
-CeSHGetShortcutTarget@12
-CeSeekDatabase@16
-CeSetDatabaseInfo@8
-CeSetEndOfFile@4
-CeSetFileAttributes@8
-CeSetFilePointer@16
-CeSetFileTime@16
-CeWriteFile@20
-CeWriteRecordProps@16
-GetRapiError@0
-RAPI_EXP_10@4
-RAPI_EXP_11@8
-RAPI_EXP_12@4
-RAPI_EXP_13@0
-RAPI_EXP_14@4
-RAPI_EXP_15@4
-RAPI_EXP_16@0
-RAPI_EXP_17@8
-RAPI_EXP_18@8
-RAPI_EXP_19@12
-RAPI_EXP_20@4
-RAPI_EXP_21@8
-RAPI_EXP_22@8
-RAPI_EXP_23@12
-RapiFreeBuffer@4
diff --git a/winsup/w32api/lib/rasapi32.def b/winsup/w32api/lib/rasapi32.def
deleted file mode 100644
index 492f2a5..0000000
--- a/winsup/w32api/lib/rasapi32.def
+++ /dev/null
@@ -1,146 +0,0 @@
-LIBRARY RASAPI32.DLL
-EXPORTS
-DDMGetPhonebookInfo@32
-DwCloneEntry@12
-DwDeleteSubEntry@12
-DwEnumEntriesForAllUsers@12
-DwEnumEntryDetails@16
-FreeSharedAccessApplication@4
-FreeSharedAccessServer@4
-RasAutoDialSharedConnection@0
-RasAutodialAddressToNetwork@12
-RasAutodialEntryToNetwork@12
-RasClearConnectionStatistics@4
-RasClearLinkStatistics@8
-RasConnectionNotificationA@12
-RasConnectionNotificationW@12
-RasCreatePhonebookEntryA@8
-RasCreatePhonebookEntryW@8
-RasDeleteEntryA@8
-RasDeleteEntryW@8
-RasDialA@24
-RasDialW@24
-RasDialWow@20
-RasEditPhonebookEntryA@12
-RasEditPhonebookEntryW@12
-RasEnumAutodialAddressesA@12
-RasEnumAutodialAddressesW@12
-RasEnumConnectionsA@12
-RasEnumConnectionsW@12
-RasEnumConnectionsWow@12
-RasEnumDevicesA@12
-RasEnumDevicesW@12
-RasEnumEntriesA@20
-RasEnumEntriesW@20
-RasEnumEntriesWow@20
-RasFreeEapUserIdentityA@4
-RasFreeEapUserIdentityW@4
-RasFreeLanConnTable@8
-RasFreeSharedAccessSettings@4
-RasGetAutodialAddressA@20
-RasGetAutodialAddressW@20
-RasGetAutodialEnableA@8
-RasGetAutodialEnableW@8
-RasGetAutodialParamA@12
-RasGetAutodialParamW@12
-RasGetConnectResponse@8
-RasGetConnectStatusA@8
-RasGetConnectStatusW@8
-RasGetConnectStatusWow@8
-RasGetConnectionStatistics@8
-RasGetCountryInfoA@8
-RasGetCountryInfoW@8
-RasGetCredentialsA@12
-RasGetCredentialsW@12
-RasGetCustomAuthDataA@16
-RasGetCustomAuthDataW@16
-RasGetEapUserDataA@20
-RasGetEapUserDataW@20
-RasGetEapUserIdentityA@20
-RasGetEapUserIdentityW@20
-RasGetEntryDialParamsA@12
-RasGetEntryDialParamsW@12
-RasGetEntryHrasconnA@12
-RasGetEntryHrasconnW@12
-RasGetEntryPropertiesA@24
-RasGetEntryPropertiesW@24
-RasGetErrorStringA@12
-RasGetErrorStringW@12
-RasGetErrorStringWow@12
-RasGetHport@4
-RasGetLinkStatistics@12
-RasGetProjectionInfoA@16
-RasGetProjectionInfoW@16
-RasGetSubEntryHandleA@12
-RasGetSubEntryHandleW@12
-RasGetSubEntryPropertiesA@28
-RasGetSubEntryPropertiesW@28
-RasHangUpA@4
-RasHangUpW@4
-RasHangUpWow@4
-RasInvokeEapUI@16
-RasIsRouterConnection@4
-RasIsSharedConnection@8
-RasLoadSharedAccessSettings@4
-RasNameFromSharedConnection@8
-RasQueryLanConnTable@12
-RasQueryRedialOnLinkFailure@12
-RasQuerySharedAutoDial@4
-RasQuerySharedConnection@4
-RasQuerySharedConnectionCredentials@8
-RasQuerySharedPrivateLan@4
-RasQuerySharedPrivateLanAddress@4
-RasRenameEntryA@12
-RasRenameEntryW@12
-RasSaveSharedAccessSettings@4
-RasSetAutodialAddressA@20
-RasSetAutodialAddressW@20
-RasSetAutodialEnableA@8
-RasSetAutodialEnableW@8
-RasSetAutodialParamA@12
-RasSetAutodialParamW@12
-RasSetCredentialsA@16
-RasSetCredentialsW@16
-RasSetCustomAuthDataA@16
-RasSetCustomAuthDataW@16
-RasSetEapUserDataA@20
-RasSetEapUserDataW@20
-RasSetEntryDialParamsA@12
-RasSetEntryDialParamsW@12
-RasSetEntryPropertiesA@24
-RasSetEntryPropertiesW@24
-RasSetOldPassword@8
-RasSetSharedAutoDial@4
-RasSetSharedConnectionCredentials@8
-RasSetSubEntryPropertiesA@28
-RasSetSubEntryPropertiesW@28
-RasShareConnection@8
-RasUnshareConnection@4
-RasValidateEntryNameA@8
-RasValidateEntryNameW@8
-RasfileClose@4
-RasfileDeleteLine@4
-RasfileFindFirstLine@12
-RasfileFindLastLine@12
-RasfileFindMarkedLine@8
-RasfileFindNextKeyLine@12
-RasfileFindNextLine@12
-RasfileFindPrevLine@12
-RasfileFindSectionLine@12
-RasfileGetKeyValueFields@12
-RasfileGetLine@4
-RasfileGetLineMark@4
-RasfileGetLineText@8
-RasfileGetLineType@4
-RasfileGetSectionName@8
-RasfileInsertLine@12
-RasfileLoad@16
-RasfileLoadInfo@8
-RasfilePutKeyValueFields@12
-RasfilePutLineMark@8
-RasfilePutLineText@8
-RasfilePutSectionName@8
-RasfileWrite@8
-SharedAccessResponseListToString@8
-SharedAccessResponseStringToList@12
-UnInitializeRAS@0
diff --git a/winsup/w32api/lib/rasdlg.def b/winsup/w32api/lib/rasdlg.def
deleted file mode 100644
index 099c1a7..0000000
--- a/winsup/w32api/lib/rasdlg.def
+++ /dev/null
@@ -1,8 +0,0 @@
-LIBRARY RASDLG.DLL
-EXPORTS
-RasDialDlgA@16
-RasDialDlgW@16
-RasEntryDlgA@12
-RasEntryDlgW@12
-RasPhonebookDlgA@12
-RasPhonebookDlgW@12
diff --git a/winsup/w32api/lib/res.rc b/winsup/w32api/lib/res.rc
deleted file mode 100644
index 1a3f751..0000000
--- a/winsup/w32api/lib/res.rc
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <windows.h>
-
-STRINGTABLE
-{
- 100 "Dummy string"
-}
diff --git a/winsup/w32api/lib/rpcdce4.def b/winsup/w32api/lib/rpcdce4.def
deleted file mode 100644
index 43e96a7..0000000
--- a/winsup/w32api/lib/rpcdce4.def
+++ /dev/null
@@ -1,26 +0,0 @@
-LIBRARY RPCDCE4.dll
-EXPORTS
-DceErrorInqTextA@8
-DceErrorInqTextW@8
-MIDL_user_allocate@4
-MIDL_user_free@4
-RpcBindingToStringBindingA@8
-RpcBindingToStringBindingW@8
-RpcMgmtEpEltInqBegin@24
-RpcMgmtEpEltInqDone@4
-RpcMgmtEpEltInqNextA@20
-RpcMgmtEpEltInqNextW@20
-RpcMgmtEpUnregister@16
-RpcMgmtInqIfIds@8
-RpcMgmtInqServerPrincNameA@12
-RpcMgmtInqServerPrincNameW@12
-RpcMgmtInqStats@8
-RpcMgmtIsServerListening@4
-RpcMgmtSetAuthorizationFn@4
-RpcMgmtStopServerListening@4
-RpcServerListen@12
-UuidCompare@12
-UuidCreateNil@4
-UuidEqual@12
-UuidHash@8
-UuidIsNil@8
diff --git a/winsup/w32api/lib/rpcns4.def b/winsup/w32api/lib/rpcns4.def
deleted file mode 100644
index 7d005c3..0000000
--- a/winsup/w32api/lib/rpcns4.def
+++ /dev/null
@@ -1,60 +0,0 @@
-LIBRARY RPCNS4.dll
-EXPORTS
-I_GetDefaultEntrySyntax@0
-I_RpcNsGetBuffer@4
-I_RpcNsRaiseException@8
-I_RpcNsSendReceive@8
-I_RpcReBindBuffer@4
-RpcIfIdVectorFree@4
-RpcNsBindingExportA@20
-RpcNsBindingExportW@20
-RpcNsBindingImportBeginA@20
-RpcNsBindingImportBeginW@20
-RpcNsBindingImportDone@4
-RpcNsBindingImportNext@8
-RpcNsBindingLookupBeginA@24
-RpcNsBindingLookupBeginW@24
-RpcNsBindingLookupDone@4
-RpcNsBindingLookupNext@8
-RpcNsBindingSelect@8
-RpcNsBindingUnexportA@16
-RpcNsBindingUnexportW@16
-RpcNsEntryExpandNameA@12
-RpcNsEntryExpandNameW@12
-RpcNsEntryObjectInqBeginA@12
-RpcNsEntryObjectInqBeginW@12
-RpcNsEntryObjectInqDone@4
-RpcNsEntryObjectInqNext@8
-RpcNsGroupDeleteA@8
-RpcNsGroupDeleteW@8
-RpcNsGroupMbrAddA@16
-RpcNsGroupMbrAddW@16
-RpcNsGroupMbrInqBeginA@16
-RpcNsGroupMbrInqBeginW@16
-RpcNsGroupMbrInqDone@4
-RpcNsGroupMbrInqNextA@8
-RpcNsGroupMbrInqNextW@8
-RpcNsGroupMbrRemoveA@16
-RpcNsGroupMbrRemoveW@16
-RpcNsMgmtBindingUnexportA@20
-RpcNsMgmtBindingUnexportW@20
-RpcNsMgmtEntryCreateA@8
-RpcNsMgmtEntryCreateW@8
-RpcNsMgmtEntryDeleteA@8
-RpcNsMgmtEntryDeleteW@8
-RpcNsMgmtEntryInqIfIdsA@12
-RpcNsMgmtEntryInqIfIdsW@12
-RpcNsMgmtHandleSetExpAge@8
-RpcNsMgmtInqExpAge@4
-RpcNsMgmtSetExpAge@4
-RpcNsProfileDeleteA@8
-RpcNsProfileDeleteW@8
-RpcNsProfileEltAddA@28
-RpcNsProfileEltAddW@28
-RpcNsProfileEltInqBeginA@32
-RpcNsProfileEltInqBeginW@32
-RpcNsProfileEltInqDone@4
-RpcNsProfileEltInqNextA@20
-RpcNsProfileEltInqNextW@20
-RpcNsProfileEltRemoveA@20
-RpcNsProfileEltRemoveW@20
diff --git a/winsup/w32api/lib/rpcrt4.def b/winsup/w32api/lib/rpcrt4.def
deleted file mode 100644
index 14212c0..0000000
--- a/winsup/w32api/lib/rpcrt4.def
+++ /dev/null
@@ -1,359 +0,0 @@
-LIBRARY RPCRT4.dll
-EXPORTS
-CStdStubBuffer_AddRef@4
-CStdStubBuffer_Connect@8
-CStdStubBuffer_CountRefs@4
-CStdStubBuffer_DebugServerQueryInterface@8
-CStdStubBuffer_DebugServerRelease@8
-CStdStubBuffer_Disconnect@4
-CStdStubBuffer_Invoke@12
-CStdStubBuffer_IsIIDSupported@8
-CStdStubBuffer_QueryInterface@12
-DceErrorInqTextA@8
-DceErrorInqTextW@8
-IUnknown_AddRef_Proxy@4
-IUnknown_QueryInterface_Proxy@12
-IUnknown_Release_Proxy@4
-I_RpcAllocate@4
-I_RpcBindingCopy@8
-I_RpcBindingInqDynamicEndpoint@8
-I_RpcBindingInqTransportType@8
-I_RpcBindingIsClientLocal@8
-I_RpcClearMutex@4
-I_RpcConnectionInqSockBuffSize2@4
-I_RpcConnectionInqSockBuffSize@8
-I_RpcConnectionSetSockBuffSize@8
-I_RpcDeleteMutex@4
-I_RpcFree@4
-I_RpcFreeBuffer@4
-I_RpcGetAssociationContext@4
-I_RpcGetBuffer@4
-I_RpcGetCurrentCallHandle@0
-I_RpcIOAlerted@4
-I_RpcIfInqTransferSyntaxes@16
-I_RpcMapWin32Status@4
-I_RpcMonitorAssociation@12
-I_RpcNsBindingSetEntryName@12
-I_RpcParseSecurity@8
-I_RpcPauseExecution@4
-I_RpcRequestMutex@4
-I_RpcSendReceive@4
-I_RpcServerRegisterForwardFunction@4
-I_RpcSetAssociationContext@4
-I_RpcSsDontSerializeContext@0
-I_RpcStopMonitorAssociation@4
-I_RpcTransClientMaxFrag@4
-I_RpcTransClientReallocBuffer@16
-I_RpcTransServerFindConnection@8
-I_RpcTransServerFreeBuffer@8
-I_RpcTransServerMaxFrag@4
-I_RpcTransServerNewConnection@12
-I_RpcTransServerProtectThread@0
-I_RpcTransServerReallocBuffer@16
-I_RpcTransServerReceiveDirectReady@4
-I_RpcTransServerUnprotectThread@4
-I_UuidCreate@4
-MIDL_wchar_strcpy@8
-MIDL_wchar_strlen@4
-MesBufferHandleReset@24
-MesDecodeBufferHandleCreate@12
-MesDecodeIncrementalHandleCreate@12
-MesEncodeDynBufferHandleCreate@12
-MesEncodeFixedBufferHandleCreate@16
-MesEncodeIncrementalHandleCreate@16
-MesHandleFree@4
-MesIncrementalHandleReset@24
-MesInqProcEncodingId@12
-NDRCContextBinding@4
-NDRCContextMarshall@8
-NDRCContextUnmarshall@16
-NDRSContextMarshall@12
-NDRSContextUnmarshall@8
-NDRcopy@12
-NdrAllocate@8
-NdrByteCountPointerBufferSize@12
-NdrByteCountPointerFree@12
-NdrByteCountPointerMarshall@12
-NdrByteCountPointerUnmarshall@16
-NdrCStdStubBuffer2_Release@8
-NdrCStdStubBuffer_Release@8
-NdrClearOutParameters@12
-NdrClientCall
-NdrClientCall2
-NdrClientContextMarshall@12
-NdrClientContextUnmarshall@12
-NdrClientInitialize@16
-NdrClientInitializeNew@16
-NdrComplexArrayBufferSize@12
-NdrComplexArrayFree@12
-NdrComplexArrayMarshall@12
-NdrComplexArrayMemorySize@8
-NdrComplexArrayUnmarshall@16
-NdrComplexStructBufferSize@12
-NdrComplexStructFree@12
-NdrComplexStructMarshall@12
-NdrComplexStructMemorySize@8
-NdrComplexStructUnmarshall@16
-NdrConformantArrayBufferSize@12
-NdrConformantArrayFree@12
-NdrConformantArrayMarshall@12
-NdrConformantArrayMemorySize@8
-NdrConformantArrayUnmarshall@16
-NdrConformantStringBufferSize@12
-NdrConformantStringMarshall@12
-NdrConformantStringMemorySize@8
-NdrConformantStringUnmarshall@16
-NdrConformantStructBufferSize@12
-NdrConformantStructFree@12
-NdrConformantStructMarshall@12
-NdrConformantStructMemorySize@8
-NdrConformantStructUnmarshall@16
-NdrConformantVaryingArrayBufferSize@12
-NdrConformantVaryingArrayFree@12
-NdrConformantVaryingArrayMarshall@12
-NdrConformantVaryingArrayMemorySize@8
-NdrConformantVaryingArrayUnmarshall@16
-NdrConformantVaryingStructBufferSize@12
-NdrConformantVaryingStructFree@12
-NdrConformantVaryingStructMarshall@12
-NdrConformantVaryingStructMemorySize@8
-NdrConformantVaryingStructUnmarshall@16
-NdrContextHandleSize@12
-NdrConvert@8
-NdrDllCanUnloadNow@4
-NdrDllGetClassObject@24
-NdrDllRegisterProxy@12
-NdrDllUnregisterProxy@12
-NdrEncapsulatedUnionBufferSize@12
-NdrEncapsulatedUnionFree@12
-NdrEncapsulatedUnionMarshall@12
-NdrEncapsulatedUnionMemorySize@8
-NdrEncapsulatedUnionUnmarshall@16
-NdrFixedArrayBufferSize@12
-NdrFixedArrayFree@12
-NdrFixedArrayMarshall@12
-NdrFixedArrayMemorySize@8
-NdrFixedArrayUnmarshall@16
-NdrFreeBuffer@4
-NdrFullPointerFree@8
-NdrFullPointerInsertRefId@12
-NdrFullPointerQueryPointer@16
-NdrFullPointerQueryRefId@16
-NdrFullPointerXlatFree@4
-NdrFullPointerXlatInit@8
-NdrGetBuffer@12
-NdrHardStructBufferSize@12
-NdrHardStructFree@12
-NdrHardStructMarshall@12
-NdrHardStructMemorySize@8
-NdrHardStructUnmarshall@16
-NdrInterfacePointerBufferSize@12
-NdrInterfacePointerFree@12
-NdrInterfacePointerMarshall@12
-NdrInterfacePointerMemorySize@8
-NdrInterfacePointerUnmarshall@16
-NdrMapCommAndFaultStatus@16
-NdrMesProcEncodeDecode
-NdrMesSimpleTypeAlignSize@4
-NdrMesSimpleTypeDecode@12
-NdrMesSimpleTypeEncode@16
-NdrMesTypeAlignSize@16
-NdrMesTypeDecode@16
-NdrMesTypeEncode@16
-NdrNonConformantStringBufferSize@12
-NdrNonConformantStringMarshall@12
-NdrNonConformantStringMemorySize@8
-NdrNonConformantStringUnmarshall@16
-NdrNonEncapsulatedUnionBufferSize@12
-NdrNonEncapsulatedUnionFree@12
-NdrNonEncapsulatedUnionMarshall@12
-NdrNonEncapsulatedUnionMemorySize@8
-NdrNonEncapsulatedUnionUnmarshall@16
-NdrNsGetBuffer@12
-NdrNsSendReceive@12
-NdrOleAllocate@4
-NdrOleFree@4
-NdrPointerBufferSize@12
-NdrPointerFree@12
-NdrPointerMarshall@12
-NdrPointerMemorySize@8
-NdrPointerUnmarshall@16
-NdrProxyErrorHandler@4
-NdrProxyFreeBuffer@8
-NdrProxyGetBuffer@8
-NdrProxyInitialize@20
-NdrProxySendReceive@8
-NdrRpcSmClientAllocate@4
-NdrRpcSmClientFree@4
-NdrRpcSmSetClientToOsf@4
-NdrRpcSsDefaultAllocate@4
-NdrRpcSsDefaultFree@4
-NdrRpcSsDisableAllocate@4
-NdrRpcSsEnableAllocate@4
-NdrSendReceive@8
-NdrServerCall@4
-NdrServerContextMarshall@12
-NdrServerContextUnmarshall@4
-NdrServerInitialize@12
-NdrServerInitializeMarshall@8
-NdrServerInitializeNew@12
-NdrServerInitializeUnmarshall@12
-NdrServerMarshall@16
-NdrServerUnmarshall@24
-NdrSimpleStructBufferSize@12
-NdrSimpleStructFree@12
-NdrSimpleStructMarshall@12
-NdrSimpleStructMemorySize@8
-NdrSimpleStructUnmarshall@16
-NdrSimpleTypeMarshall@12
-NdrSimpleTypeUnmarshall@12
-NdrStubCall@16
-NdrStubForwardingFunction@16
-NdrStubGetBuffer@12
-NdrStubInitialize@16
-NdrStubInitializeMarshall@12
-NdrVaryingArrayBufferSize@12
-NdrVaryingArrayFree@12
-NdrVaryingArrayMarshall@12
-NdrVaryingArrayMemorySize@8
-NdrVaryingArrayUnmarshall@16
-NdrXmitOrRepAsBufferSize@12
-NdrXmitOrRepAsFree@12
-NdrXmitOrRepAsMarshall@12
-NdrXmitOrRepAsMemorySize@8
-NdrXmitOrRepAsUnmarshall@16
-RpcBindingCopy@8
-RpcBindingFree@4
-RpcBindingFromStringBindingA@8
-RpcBindingFromStringBindingW@8
-RpcBindingInqAuthClientA@24
-RpcBindingInqAuthClientW@24
-RpcBindingInqAuthInfoA@24
-RpcBindingInqAuthInfoW@24
-RpcBindingInqObject@8
-RpcBindingReset@4
-RpcBindingServerFromClient@8
-RpcBindingSetAuthInfoA@24
-RpcBindingSetAuthInfoW@24
-RpcBindingSetObject@8
-RpcBindingToStringBindingA@8
-RpcBindingToStringBindingW@8
-RpcBindingVectorFree@4
-RpcCancelThread@4
-RpcEpRegisterA@16
-RpcEpRegisterNoReplaceA@16
-RpcEpRegisterNoReplaceW@16
-RpcEpRegisterW@16
-RpcEpResolveBinding@8
-RpcEpUnregister@12
-RpcIfIdVectorFree@4
-RpcIfInqId@8
-RpcImpersonateClient@4
-RpcMgmtEnableIdleCleanup@0
-RpcMgmtEpEltInqBegin@24
-RpcMgmtEpEltInqDone@4
-RpcMgmtEpEltInqNextA@20
-RpcMgmtEpEltInqNextW@20
-RpcMgmtEpUnregister@16
-RpcMgmtInqComTimeout@8
-RpcMgmtInqDefaultProtectLevel@8
-RpcMgmtInqIfIds@8
-RpcMgmtInqServerPrincNameA@12
-RpcMgmtInqServerPrincNameW@12
-RpcMgmtInqStats@8
-RpcMgmtIsServerListening@4
-RpcMgmtSetAuthorizationFn@4
-RpcMgmtSetCancelTimeout@4
-RpcMgmtSetComTimeout@8
-RpcMgmtSetServerStackSize@4
-RpcMgmtStatsVectorFree@4
-RpcMgmtStopServerListening@4
-RpcMgmtWaitServerListen@0
-RpcNetworkInqProtseqsA@4
-RpcNetworkInqProtseqsW@4
-RpcNetworkIsProtseqValidA@4
-RpcNetworkIsProtseqValidW@4
-RpcNsBindingInqEntryNameA@12
-RpcNsBindingInqEntryNameW@12
-RpcObjectInqType@8
-RpcObjectSetInqFn@4
-RpcObjectSetType@8
-RpcProtseqVectorFreeA@4
-RpcProtseqVectorFreeW@4
-RpcRaiseException@4
-RpcRevertToSelf@0
-RpcServerInqBindings@4
-RpcServerInqDefaultPrincNameA@8
-RpcServerInqDefaultPrincNameW@8
-RpcServerInqIf@12
-RpcServerListen@12
-RpcServerRegisterAuthInfoA@16
-RpcServerRegisterAuthInfoW@16
-RpcServerRegisterIf@12
-RpcServerUnregisterIf@12
-RpcServerUseAllProtseqs@8
-RpcServerUseAllProtseqsIf@12
-RpcServerUseProtseqA@12
-RpcServerUseProtseqEpA@16
-RpcServerUseProtseqEpW@16
-RpcServerUseProtseqIfA@16
-RpcServerUseProtseqIfW@16
-RpcServerUseProtseqW@12
-RpcSmAllocate@8
-RpcSmClientFree@4
-RpcSmDestroyClientContext@4
-RpcSmDisableAllocate@0
-RpcSmEnableAllocate@0
-RpcSmFree@4
-RpcSmGetThreadHandle@4
-RpcSmSetClientAllocFree@8
-RpcSmSetThreadHandle@4
-RpcSmSwapClientAllocFree@16
-RpcSsAllocate@4
-RpcSsDestroyClientContext@4
-RpcSsDisableAllocate@0
-RpcSsEnableAllocate@0
-RpcSsFree@4
-RpcSsGetThreadHandle@0
-RpcSsSetClientAllocFree@8
-RpcSsSetThreadHandle@4
-RpcSsSwapClientAllocFree@16
-RpcStringBindingComposeA@24
-RpcStringBindingComposeW@24
-RpcStringBindingParseA@24
-RpcStringBindingParseW@24
-RpcStringFreeA@4
-RpcStringFreeW@4
-RpcTestCancel@0
-TowerConstruct@24
-TowerExplode@24
-UuidCompare@12
-UuidCreate@4
-UuidCreateNil@4
-UuidCreateSequential@4
-UuidEqual@12
-UuidFromStringA@8
-UuidFromStringW@8
-UuidHash@8
-UuidIsNil@8
-UuidToStringA@8
-UuidToStringW@8
-char_array_from_ndr@16
-char_from_ndr@8
-data_from_ndr@16
-data_into_ndr@16
-data_size_ndr@16
-double_array_from_ndr@16
-double_from_ndr@8
-enum_from_ndr@8
-float_array_from_ndr@16
-float_from_ndr@8
-long_array_from_ndr@16
-long_from_ndr@8
-long_from_ndr_temp@12
-short_array_from_ndr@16
-short_from_ndr@8
-short_from_ndr_temp@12
-tree_into_ndr@16
-tree_peek_ndr@16
-tree_size_ndr@16
diff --git a/winsup/w32api/lib/rtm.def b/winsup/w32api/lib/rtm.def
deleted file mode 100644
index b156914..0000000
--- a/winsup/w32api/lib/rtm.def
+++ /dev/null
@@ -1,18 +0,0 @@
-LIBRARY RTM.DLL
-EXPORTS
-MgmAddGroupMembershipEntry@32
-MgmDeleteGroupMembershipEntry@32
-MgmDeRegisterMProtocol@4
-MgmGetFirstMfe@12
-MgmGetFirstMfeStats@16
-MgmGetMfe@12
-MgmGetMfeStats@16
-MgmGetNextMfe@16
-MgmGetNextMfeStats@20
-MgmGetProtocolOnInterface@16
-MgmGroupEnumerationEnd@4
-MgmGroupEnumerationGetNext@16
-MgmGroupEnumerationStart@12
-MgmRegisterMProtocol@16
-MgmReleaseInterfaceOwnership@12
-MgmTakeInterfaceOwnership@12
diff --git a/winsup/w32api/lib/rtutils.def b/winsup/w32api/lib/rtutils.def
deleted file mode 100755
index c2b12d8..0000000
--- a/winsup/w32api/lib/rtutils.def
+++ /dev/null
@@ -1,54 +0,0 @@
-LIBRARY RTUTILS.DLL
-EXPORTS
-CreateWaitEvent@40
-CreateWaitEventBinding@20
-CreateWaitTimer@16
-DeRegisterWaitEventBinding@4
-DeRegisterWaitEventBindingSelf@4
-DeRegisterWaitEventsTimers@8
-DeRegisterWaitEventsTimersSelf@8
-DebugPrintWaitWorkerThreads@4
-LogErrorA@16
-LogErrorW@16
-LogEventA@16
-LogEventW@16
-MprSetupProtocolEnum@12
-MprSetupProtocolFree@4
-QueueWorkItem@12
-RegisterWaitEventBinding@4
-RegisterWaitEventsTimers@8
-RouterAssert@16
-RouterGetErrorStringA@8
-RouterGetErrorStringW@8
-RouterLogDeregisterA@4
-RouterLogDeregisterW@4
-RouterLogEventA@24
-RouterLogEventW@24
-RouterLogEventDataA@28
-RouterLogEventDataW@28
-RouterLogEventExA@24
-RouterLogEventExW@24
-RouterLogEventStringA@28
-RouterLogEventStringW@28
-RouterLogEventValistExA@24
-RouterLogEventValistExW@24
-RouterLogRegisterA@4
-RouterLogRegisterW@4
-SetIoCompletionProc@8
-TraceDeregisterA@4
-TraceDeregisterW@4
-TraceDeregisterExA@8
-TraceDeregisterExW@8
-TraceDumpExA@28
-TraceDumpExW@28
-TraceGetConsoleA@8
-TraceGetConsoleW@8
-TracePutsExA@12
-TracePutsExW@12
-TraceRegisterExA@8
-TraceRegisterExW@8
-TraceVprintfExA@8
-TraceVprintfExW@8
-UpdateWaitTimer@8
-WTFreeEvent@4
-WTFreeTimer@4
diff --git a/winsup/w32api/lib/scrnsave.c b/winsup/w32api/lib/scrnsave.c
deleted file mode 100644
index 0dffd22..0000000
--- a/winsup/w32api/lib/scrnsave.c
+++ /dev/null
@@ -1,409 +0,0 @@
-/*
- Screen saver library by Anders Norlander <anorland@hem2.passagen.se>
-
- This library is (hopefully) compatible with Microsoft's
- screen saver library.
-
- This is public domain software.
-
- */
-#include <windows.h>
-#include <scrnsave.h>
-#include <regstr.h>
-
-/* screen saver window class */
-#define CLASS_SCRNSAVE TEXT("WindowsScreenSaverClass")
-
-/* globals */
-HWND hMainWindow = NULL;
-BOOL fChildPreview = FALSE;
-HINSTANCE hMainInstance;
-TCHAR szName[TITLEBARNAMELEN];
-TCHAR szAppName[APPNAMEBUFFERLEN];
-TCHAR szIniFile[MAXFILELEN];
-TCHAR szScreenSaver[22];
-TCHAR szHelpFile[MAXFILELEN];
-TCHAR szNoHelpMemory[BUFFLEN];
-UINT MyHelpMessage;
-
-/* local house keeping */
-static HINSTANCE hPwdLib = NULL;
-static POINT pt_orig;
-static BOOL checking_pwd = FALSE;
-static BOOL closing = FALSE;
-static BOOL w95 = FALSE;
-
-typedef BOOL (WINAPI *VERIFYPWDPROC)(HWND);
-typedef DWORD (WINAPI *CHPWDPROC)(LPCTSTR, HWND, DWORD, PVOID);
-static VERIFYPWDPROC VerifyScreenSavePwd = NULL;
-
-/* function names */
-#define szVerifyPassword "VerifyScreenSavePwd"
-
-#ifdef UNICODE
-#define szPwdChangePassword "PwdChangePasswordW"
-#else
-#define szPwdChangePassword "PwdChangePasswordA"
-#endif
-
-static void TerminateScreenSaver(HWND hWnd);
-static BOOL RegisterClasses(void);
-static LRESULT WINAPI SysScreenSaverProc(HWND,UINT,WPARAM,LPARAM);
-static int LaunchScreenSaver(HWND hParent);
-static void LaunchConfig(void);
-
-static int ISSPACE(char c)
-{
- return (c == ' ' || c == '\t');
-}
-
-#define ISNUM(c) ((c) >= '0' && c <= '9')
-static unsigned long
-_toul(const char *s)
-{
- unsigned long res;
- unsigned long n;
- const char *p;
- for (p = s; *p; p++)
- if (!ISNUM(*p)) break;
- p--;
- res = 0;
- for (n = 1; p >= s; p--, n *= 10)
- res += (*p - '0') * n;
- return res;
-}
-
-/* screen saver entry point */
-int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrevInst,
- LPSTR CmdLine, int nCmdShow)
-{
- LPSTR p;
- OSVERSIONINFO vi;
-
- /* initialize */
- hMainInstance = hInst;
-
- vi.dwOSVersionInfoSize = sizeof(vi);
- GetVersionEx(&vi);
- /* check if we are going to check for passwords */
- if (vi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
- {
- HKEY hKey;
- /* we are using windows 95 */
- w95 = TRUE;
- if (RegOpenKey(HKEY_CURRENT_USER, REGSTR_PATH_SCREENSAVE ,&hKey) ==
- ERROR_SUCCESS)
- {
- DWORD check_pwd;
- DWORD size = sizeof(DWORD);
- DWORD type;
- LONG res;
- res = RegQueryValueEx(hKey, REGSTR_VALUE_USESCRPASSWORD,
- NULL, &type, (PBYTE) &check_pwd, &size);
- if (check_pwd && res == ERROR_SUCCESS)
- {
- hPwdLib = LoadLibrary(TEXT("PASSWORD.CPL"));
- if (hPwdLib)
- VerifyScreenSavePwd = GetProcAddress(hPwdLib, szVerifyPassword);
- }
- RegCloseKey(hKey);
- }
- }
-
- /* parse arguments */
- for (p = CmdLine; *p; p++)
- {
- switch (*p)
- {
- case 'S':
- case 's':
- /* start screen saver */
- return LaunchScreenSaver(NULL);
-
- case 'P':
- case 'p':
- {
- /* start screen saver in preview window */
- HWND hParent;
- fChildPreview = TRUE;
- while (ISSPACE(*++p));
- hParent = (HWND) _toul(p);
- if (hParent && IsWindow(hParent))
- return LaunchScreenSaver(hParent);
- }
- return 0;
-
- case 'C':
- case 'c':
- /* display configure dialog */
- LaunchConfig();
- return 0;
-
- case 'A':
- case 'a':
- {
- /* change screen saver password */
- HWND hParent;
- while (ISSPACE(*++p));
- hParent = (HWND) _toul(p);
- if (!hParent || !IsWindow(hParent))
- hParent = GetForegroundWindow();
- ScreenSaverChangePassword(hParent);
- }
- return 0;
-
- case '-':
- case '/':
- case ' ':
- default:
- break;
- }
- }
- LaunchConfig();
- return 0;
-}
-
-static void LaunchConfig(void)
-{
- /* FIXME: should this be called */
- RegisterDialogClasses(hMainInstance);
- /* display configure dialog */
- DialogBox(hMainInstance, MAKEINTRESOURCE(DLG_SCRNSAVECONFIGURE),
- GetForegroundWindow(), (DLGPROC) ScreenSaverConfigureDialog);
-}
-
-
-static int LaunchScreenSaver(HWND hParent)
-{
- BOOL foo;
- UINT style;
- RECT rc;
- MSG msg;
-
- /* don't allow other tasks to get into the foreground */
- if (w95 && !fChildPreview)
- SystemParametersInfo(SPI_SETSCREENSAVERRUNNING, TRUE, &foo, 0);
-
- msg.wParam = 0;
-
- /* register classes, both user defined and classes used by screen saver
- library */
- if (!RegisterClasses())
- {
- MessageBox(NULL, TEXT("RegisterClasses() failed"), NULL, MB_ICONHAND);
- goto restore;
- }
-
- /* a slightly different approach needs to be used when displaying
- in a preview window */
- if (hParent)
- {
- style = WS_CHILD;
- GetClientRect(hParent, &rc);
- }
- else
- {
- style = WS_POPUP;
- rc.left = GetSystemMetrics(SM_XVIRTUALSCREEN);
- rc.top = GetSystemMetrics(SM_YVIRTUALSCREEN);
- rc.right = GetSystemMetrics(SM_CXVIRTUALSCREEN);
- rc.bottom = GetSystemMetrics(SM_CYVIRTUALSCREEN);
- style |= WS_VISIBLE;
- }
-
- /* create main screen saver window */
- hMainWindow = CreateWindowEx(hParent ? 0 : WS_EX_TOPMOST, CLASS_SCRNSAVE,
- TEXT("SCREENSAVER"), style,
- rc.left, rc.top, rc.right, rc.bottom, hParent, NULL,
- hMainInstance, NULL);
-
- /* display window and start pumping messages */
- if (hMainWindow)
- {
- UpdateWindow(hMainWindow);
- ShowWindow(hMainWindow, SW_SHOW);
-
- while (GetMessage(&msg, NULL, 0, 0) == TRUE)
- {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
- }
-
-restore:
- /* restore system */
- if (w95 && !fChildPreview)
- SystemParametersInfo(SPI_SETSCREENSAVERRUNNING, FALSE, &foo, 0);
- FreeLibrary(hPwdLib);
- return msg.wParam;
-}
-
-/* this function takes care of *must* do tasks, like terminating
- screen saver */
-static LRESULT WINAPI SysScreenSaverProc(HWND hWnd, UINT msg,
- WPARAM wParam, LPARAM lParam)
-{
- switch (msg)
- {
- case WM_CREATE:
- if (!fChildPreview)
- SetCursor(NULL);
- /* mouse is not supposed to move from this position */
- GetCursorPos(&pt_orig);
- break;
- case WM_DESTROY:
- PostQuitMessage(0);
- break;
- case WM_TIMER:
- if (closing)
- return 0;
- break;
- case WM_PAINT:
- if (closing)
- return DefWindowProc(hWnd, msg, wParam, lParam);
- break;
- case WM_SYSCOMMAND:
- if (!fChildPreview)
- switch (wParam)
- {
- case SC_CLOSE:
- case SC_SCREENSAVE:
- case SC_NEXTWINDOW:
- case SC_PREVWINDOW:
- return FALSE;
- }
- break;
- case WM_MOUSEMOVE:
- case WM_LBUTTONDOWN:
- case WM_RBUTTONDOWN:
- case WM_MBUTTONDOWN:
- case WM_KEYDOWN:
- case WM_SYSKEYDOWN:
- case WM_NCACTIVATE:
- case WM_ACTIVATE:
- case WM_ACTIVATEAPP:
- if (closing)
- return DefWindowProc(hWnd, msg, wParam, lParam);
- break;
- }
- return ScreenSaverProc(hWnd, msg, wParam, lParam);
-}
-
-LONG WINAPI DefScreenSaverProc(HWND hWnd, UINT msg,
- WPARAM wParam, LPARAM lParam)
-{
- /* don't do any special processing when in preview mode */
- if (fChildPreview || closing)
- return DefWindowProc(hWnd, msg, wParam, lParam);
-
- switch (msg)
- {
- case WM_CLOSE:
- TerminateScreenSaver(hWnd);
- /* do NOT pass this to DefWindowProc; it will terminate even if
- an invalid password was given.
- */
- return 0;
- case SCRM_VERIFYPW:
- /* verify password or return TRUE if password checking is turned off */
- if (VerifyScreenSavePwd)
- return VerifyScreenSavePwd(hWnd);
- else
- return TRUE;
- case WM_SETCURSOR:
- if (checking_pwd)
- break;
- SetCursor(NULL);
- return TRUE;
- case WM_NCACTIVATE:
- case WM_ACTIVATE:
- case WM_ACTIVATEAPP:
- if (wParam != FALSE)
- break;
- case WM_MOUSEMOVE:
- {
- POINT pt;
- GetCursorPos(&pt);
- if (pt.x == pt_orig.x && pt.y == pt_orig.y)
- break;
- }
- case WM_LBUTTONDOWN:
- case WM_RBUTTONDOWN:
- case WM_MBUTTONDOWN:
- case WM_KEYDOWN:
- case WM_SYSKEYDOWN:
- /* try to terminate screen saver */
- if (!checking_pwd)
- PostMessage(hWnd, WM_CLOSE, 0, 0);
- break;
- }
- return DefWindowProc(hWnd, msg, wParam, lParam);
-}
-
-static void TerminateScreenSaver(HWND hWnd)
-{
- /* don't allow recursion */
- if (checking_pwd || closing)
- return;
-
- /* verify password */
- if (VerifyScreenSavePwd)
- {
- checking_pwd = TRUE;
- closing = SendMessage(hWnd, SCRM_VERIFYPW, 0, 0);
- checking_pwd = FALSE;
- }
- else
- closing = TRUE;
-
- /* are we closing? */
- if (closing)
- {
- DestroyWindow(hWnd);
- }
- else
- GetCursorPos(&pt_orig); /* if not: get new mouse position */
-}
-
-/*
- Register screen saver window class and call user
- supplied hook.
- */
-static BOOL RegisterClasses(void)
-{
- WNDCLASS cls;
-
- cls.hCursor = NULL;
- cls.hIcon = LoadIcon(hMainInstance, MAKEINTATOM(ID_APP));
- cls.lpszMenuName = NULL;
- cls.lpszClassName = CLASS_SCRNSAVE;
- cls.hbrBackground = GetStockObject(BLACK_BRUSH);
- cls.hInstance = hMainInstance;
- cls.style = CS_VREDRAW | CS_HREDRAW | CS_SAVEBITS | CS_PARENTDC;
- cls.lpfnWndProc = (WNDPROC) SysScreenSaverProc;
- cls.cbWndExtra = 0;
- cls.cbClsExtra = 0;
-
- if (!RegisterClass(&cls))
- return FALSE;
-
- return RegisterDialogClasses(hMainInstance);
-}
-
-void WINAPI ScreenSaverChangePassword(HWND hParent)
-{
- /* load Master Password Router (MPR) */
- HINSTANCE hMpr = LoadLibrary(TEXT("MPR.DLL"));
-
- if (hMpr)
- {
- CHPWDPROC ChangePassword;
- ChangePassword = (CHPWDPROC) GetProcAddress(hMpr, szPwdChangePassword);
-
- /* change password for screen saver provider */
- if (ChangePassword)
- ChangePassword(TEXT("SCRSAVE"), hParent, 0, NULL);
-
- FreeLibrary(hMpr);
- }
-}
diff --git a/winsup/w32api/lib/secur32.def b/winsup/w32api/lib/secur32.def
deleted file mode 100644
index 83cf707..0000000
--- a/winsup/w32api/lib/secur32.def
+++ /dev/null
@@ -1,41 +0,0 @@
-LIBRARY SECUR32.dll
-EXPORTS
-AcceptSecurityContext@36
-AcquireCredentialsHandleA@36
-AcquireCredentialsHandleW@36
-ApplyControlTokenA@8
-ApplyControlTokenW@8
-CompleteAuthToken@8
-DecryptMessage@16
-DeleteSecurityContext@4
-EncryptMessage@16
-EnumerateSecurityPackagesA@8
-EnumerateSecurityPackagesW@8
-FreeContextBuffer@4
-FreeCredentialsHandle@4
-GetComputerObjectNameA@12
-GetComputerObjectNameW@12
-GetUserNameExA@12
-GetUserNameExW@12
-ImpersonateSecurityContext@4
-InitSecurityInterfaceA@0
-InitSecurityInterfaceW@0
-InitializeSecurityContextA@48
-InitializeSecurityContextW@48
-LsaCallAuthenticationPackage@28
-LsaDeregisterLogonProcess@4
-LsaFreeReturnBuffer@4
-LsaLogonUser@56
-LsaLookupAuthenticationPackage@12
-LsaRegisterLogonProcess@12
-MakeSignature@16
-QueryContextAttributesA@12
-QueryContextAttributesW@12
-QueryCredentialsAttributesA@12
-QueryCredentialsAttributesW@12
-QuerySecurityPackageInfoA@8
-QuerySecurityPackageInfoW@8
-RevertSecurityContext@4
-TranslateNameA@20
-TranslateNameW@20
-VerifySignature@16
diff --git a/winsup/w32api/lib/servprov-uuid.c b/winsup/w32api/lib/servprov-uuid.c
deleted file mode 100644
index 049de3b..0000000
--- a/winsup/w32api/lib/servprov-uuid.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* servprov-uuid.c */
-/* Generate GUIDs for ServiceProvider interfaces */
-
-/* All IIDs defined in this file were extracted from
- * HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\ */
-
-#define INITGUID
-#include <basetyps.h>
-DEFINE_GUID(IID_IServiceProvider,0x6d5140c1,0x7436,0x11ce,0x80,0x34,0,0xaa,0,0x60,0x9,0xfa);
diff --git a/winsup/w32api/lib/setupapi.def b/winsup/w32api/lib/setupapi.def
deleted file mode 100644
index a48cfc1..0000000
--- a/winsup/w32api/lib/setupapi.def
+++ /dev/null
@@ -1,460 +0,0 @@
-LIBRARY setupapi.dll
-EXPORTS
-AcquireSCMLock@8
-AddMiniIconToList@8
-AddTagToGroupOrderListEntry@12
-AppendStringToMultiSz@24
-AssertFail@12
-CM_Add_Empty_Log_Conf@16
-CM_Add_Empty_Log_Conf_Ex@20
-CM_Add_IDA@16
-CM_Add_ID_ExA@16
-CM_Add_ID_ExW@16
-CM_Add_IDW@16
-CM_Add_Res_Des@24
-CM_Add_Res_Des_Ex@28
-CM_Connect_MachineA@8
-CM_Connect_MachineW@8
-CM_Disconnect_Machine@4
-CM_Enumerate_Classes@12
-CM_Enumerate_Classes_Ex@16
-CM_Enumerate_EnumeratorsA@16
-CM_Enumerate_Enumerators_ExA@20
-CM_Enumerate_Enumerators_ExW@20
-CM_Enumerate_EnumeratorsW@16
-CM_Free_Log_Conf@8
-CM_Free_Log_Conf_Ex@12
-CM_Free_Log_Conf_Handle@4
-CM_Free_Res_Des@12
-CM_Free_Res_Des_Ex@16
-CM_Free_Res_Des_Handle@4
-CM_Free_Resource_Conflict_Handle@4
-CM_Get_Child@12
-CM_Get_Child_Ex@16
-CM_Get_Depth@12
-CM_Get_Depth_Ex@16
-CM_Get_Device_IDA@16
-CM_Get_Device_ID_ExA@20
-CM_Get_Device_ID_ExW@20
-CM_Get_Device_IDW@16
-CM_Get_Device_ID_ListA@16
-CM_Get_Device_ID_List_ExA@20
-CM_Get_Device_ID_List_ExW@20
-CM_Get_Device_ID_ListW@16
-CM_Get_Device_ID_List_SizeA@12
-CM_Get_Device_ID_List_Size_ExA@20
-CM_Get_Device_ID_List_Size_ExW@20
-CM_Get_Device_ID_List_SizeW@12
-CM_Get_Device_ID_Size@12
-CM_Get_Device_ID_Size_Ex@16
-CM_Get_DevNode_Status@16
-CM_Get_DevNode_Status_Ex@20
-CM_Get_First_Log_Conf@12
-CM_Get_First_Log_Conf_Ex@16
-CM_Get_Log_Conf_Priority@12
-CM_Get_Log_Conf_Priority_Ex@16
-CM_Get_Next_Log_Conf@12
-CM_Get_Next_Log_Conf_Ex@16
-CM_Get_Next_Res_Des@20
-CM_Get_Next_Res_Des_Ex@24
-CM_Get_Parent@12
-CM_Get_Parent_Ex@16
-CM_Get_Res_Des_Data@16
-CM_Get_Res_Des_Data_Ex@20
-CM_Get_Res_Des_Data_Size@12
-CM_Get_Res_Des_Data_Size_Ex@16
-CM_Get_Resource_Conflict_Count@8
-CM_Get_Resource_Conflict_DetailsA@12
-CM_Get_Resource_Conflict_DetailsW@12
-CM_Get_Sibling@12
-CM_Get_Sibling_Ex@16
-CM_Get_Version@0
-CM_Get_Version_Ex@4
-CM_Locate_DevNodeA@12
-CM_Locate_DevNode_ExA@16
-CM_Locate_DevNode_ExW@16
-CM_Locate_DevNodeW@12
-CM_Modify_Res_Des@24
-CM_Modify_Res_Des_Ex@28
-CM_Query_And_Remove_SubTreeA@20
-CM_Query_And_Remove_SubTreeW@20
-CM_Query_And_Remove_SubTree_ExA@24
-CM_Query_And_Remove_SubTree_ExW@24
-CM_Query_Resource_Conflict_List@28
-CM_Reenumerate_DevNode@8
-CM_Reenumerate_DevNode_Ex@12
-CM_Request_Device_EjectA@20
-CM_Request_Device_EjectW@20
-CM_Request_Device_Eject_ExA@24
-CM_Request_Device_Eject_ExW@24
-CMP_WaitNoPendingInstallEvents@4
-CaptureAndConvertAnsiArg@8
-CaptureStringArg@8
-CenterWindowRelativeToParent@4
-ConcatenatePaths@16
-DelayedMove@8
-DelimStringToMultiSz@12
-DestroyTextFileReadBuffer@4
-DoInstallActionWithParams@24
-DoesUserHavePrivilege@4
-DuplicateString@4
-EnablePrivilege@8
-ExtensionPropSheetPageProc@12
-FileExists@8
-FreeStringArray@8
-GetCurrentDriverSigningPolicy@4
-GetSetFileTimestamp@20
-GetVersionInfoFromImage@12
-HandleFailedVerification@40
-InfIsFromOemLocation@8
-InstallCatalog@12
-InstallHinfSection@16
-InstallHinfSectionA@16
-InstallHinfSectionW@16
-InstallStop@4
-InstallStopEx@12
-IsUserAdmin@0
-LookUpStringInTable@12
-MemoryInitialize@4
-MultiByteToUnicode@8
-MultiSzFromSearchControl@16
-MyFree@4
-MyGetFileTitle@4
-MyMalloc@4
-MyRealloc@8
-OpenAndMapFileForRead@20
-OutOfMemory@4
-QueryMultiSzValueToArray@24
-QueryRegistryValue@20
-ReadAsciiOrUnicodeTextFile@8
-RegistryDelnode@8
-RetreiveFileSecurity@8
-RetrieveServiceConfig@8
-SearchForInfFile@24
-SetArrayToMultiSzValue@20
-SetupAddInstallSectionToDiskSpaceListA@24
-SetupAddInstallSectionToDiskSpaceListW@24
-SetupAddSectionToDiskSpaceListA@28
-SetupAddSectionToDiskSpaceListW@28
-SetupAddToDiskSpaceListA@28
-SetupAddToDiskSpaceListW@28
-SetupAddToSourceListA@8
-SetupAddToSourceListW@8
-SetupAdjustDiskSpaceListA@24
-SetupAdjustDiskSpaceListW@24
-SetupBackupErrorA@24
-SetupBackupErrorW@24
-SetupCancelTemporarySourceList@0
-SetupCloseFileQueue@4
-SetupCloseInfFile@4
-SetupCloseLog@0
-SetupCommitFileQueue@16
-SetupCommitFileQueueA@16
-SetupCommitFileQueueW@16
-SetupCopyErrorA@44
-SetupCopyErrorW@44
-SetupCopyOEMInfA@32
-SetupCopyOEMInfW@32
-SetupConfigureWmiFromInfSectionA@12
-SetupConfigureWmiFromInfSectionW@12
-SetupCreateDiskSpaceListA@12
-SetupCreateDiskSpaceListW@12
-SetupDecompressOrCopyFileA@12
-SetupDecompressOrCopyFileW@12
-SetupDefaultQueueCallback@16
-SetupDefaultQueueCallbackA@16
-SetupDefaultQueueCallbackW@16
-SetupDeleteErrorA@20
-SetupDeleteErrorW@20
-SetupDestroyDiskSpaceList@4
-SetupDiAskForOEMDisk@8
-SetupDiBuildClassInfoList@16
-SetupDiBuildClassInfoListExA@24
-SetupDiBuildClassInfoListExW@24
-SetupDiBuildDriverInfoList@12
-SetupDiCallClassInstaller@12
-SetupDiCancelDriverInfoSearch@4
-SetupDiChangeState@8
-SetupDiClassGuidsFromNameA@16
-SetupDiClassGuidsFromNameExA@24
-SetupDiClassGuidsFromNameExW@24
-SetupDiClassGuidsFromNameW@16
-SetupDiClassNameFromGuidA@16
-SetupDiClassNameFromGuidExA@24
-SetupDiClassNameFromGuidExW@24
-SetupDiClassNameFromGuidW@16
-SetupDiCreateDevRegKeyA@28
-SetupDiCreateDevRegKeyW@28
-SetupDiCreateDeviceInfoA@28
-SetupDiCreateDeviceInfoList@8
-SetupDiCreateDeviceInfoListExA@16
-SetupDiCreateDeviceInfoListExW@16
-SetupDiCreateDeviceInfoW@28
-SetupDiCreateDeviceInterfaceA@24
-SetupDiCreateDeviceInterfaceRegKeyA@24
-SetupDiCreateDeviceInterfaceRegKeyW@24
-SetupDiCreateDeviceInterfaceW@24
-SetupDiDeleteDevRegKey@20
-SetupDiDeleteDeviceInfo@8
-SetupDiDeleteDeviceInterfaceData@8
-SetupDiDeleteDeviceInterfaceRegKey@12
-SetupDiDestroyClassImageList@4
-SetupDiDestroyDeviceInfoList@4
-SetupDiDestroyDriverInfoList@12
-SetupDiDrawMiniIcon@28
-SetupDiEnumDeviceInfo@12
-SetupDiEnumDeviceInterfaces@20
-SetupDiEnumDriverInfoA@20
-SetupDiEnumDriverInfoW@20
-SetupDiGetActualSectionToInstallA@24
-SetupDiGetActualSectionToInstallW@24
-SetupDiGetClassBitmapIndex@8
-SetupDiGetClassDescriptionA@16
-SetupDiGetClassDescriptionExA@24
-SetupDiGetClassDescriptionExW@24
-SetupDiGetClassDescriptionW@16
-SetupDiGetClassDevPropertySheetsA@24
-SetupDiGetClassDevPropertySheetsW@24
-SetupDiGetClassDevsA@16
-SetupDiGetClassDevsExA@28
-SetupDiGetClassDevsExW@28
-SetupDiGetClassDevsW@16
-SetupDiGetClassImageIndex@12
-SetupDiGetClassImageList@4
-SetupDiGetClassImageListExA@12
-SetupDiGetClassImageListExW@12
-SetupDiGetClassInstallParamsA@20
-SetupDiGetClassInstallParamsW@20
-SetupDiGetDeviceInfoListClass@8
-SetupDiGetDeviceInfoListDetailA@8
-SetupDiGetDeviceInfoListDetailW@8
-SetupDiGetDeviceInstallParamsA@12
-SetupDiGetDeviceInstallParamsW@12
-SetupDiGetDeviceInstanceIdA@20
-SetupDiGetDeviceInstanceIdW@20
-SetupDiGetDeviceInterfaceAlias@16
-SetupDiGetDeviceInterfaceDetailA@24
-SetupDiGetDeviceInterfaceDetailW@24
-SetupDiGetDeviceRegistryPropertyA@28
-SetupDiGetDeviceRegistryPropertyW@28
-SetupDiGetDriverInfoDetailA@24
-SetupDiGetDriverInfoDetailW@24
-SetupDiGetDriverInstallParamsA@16
-SetupDiGetDriverInstallParamsW@16
-SetupDiGetHwProfileFriendlyNameA@16
-SetupDiGetHwProfileFriendlyNameExA@24
-SetupDiGetHwProfileFriendlyNameExW@24
-SetupDiGetHwProfileFriendlyNameW@16
-SetupDiGetHwProfileList@16
-SetupDiGetHwProfileListExA@24
-SetupDiGetHwProfileListExW@24
-SetupDiGetINFClassA@20
-SetupDiGetINFClassW@20
-SetupDiGetSelectedDevice@8
-SetupDiGetSelectedDriverA@12
-SetupDiGetSelectedDriverW@12
-SetupDiGetWizardPage@20
-SetupDiInstallClassA@16
-SetupDiInstallClassExA@28
-SetupDiInstallClassExW@28
-SetupDiInstallClassW@16
-SetupDiInstallDevice@8
-SetupDiInstallDeviceInterfaces@8
-SetupDiInstallDriverFiles@8
-SetupDiLoadClassIcon@12
-SetupDiMoveDuplicateDevice@8
-SetupDiOpenClassRegKey@8
-SetupDiOpenClassRegKeyExA@20
-SetupDiOpenClassRegKeyExW@20
-SetupDiOpenDevRegKey@24
-SetupDiOpenDeviceInfoA@20
-SetupDiOpenDeviceInfoW@20
-SetupDiOpenDeviceInterfaceA@16
-SetupDiOpenDeviceInterfaceRegKey@16
-SetupDiOpenDeviceInterfaceW@16
-SetupDiRegisterCoDeviceInstallers@8
-SetupDiRegisterDeviceInfo@24
-SetupDiRemoveDevice@8
-SetupDiRemoveDeviceInterface@8
-SetupDiSelectBestCompatDrv@8
-SetupDiSelectDevice@8
-SetupDiSelectOEMDrv@12
-SetupDiSetClassInstallParamsA@16
-SetupDiSetClassInstallParamsW@16
-SetupDiSetDeviceInstallParamsA@12
-SetupDiSetDeviceInstallParamsW@12
-SetupDiSetDeviceRegistryPropertyA@20
-SetupDiSetDeviceRegistryPropertyW@20
-SetupDiSetDriverInstallParamsA@16
-SetupDiSetDriverInstallParamsW@16
-SetupDiSetSelectedDevice@8
-SetupDiSetSelectedDriverA@12
-SetupDiSetSelectedDriverW@12
-SetupDiUnremoveDevice@8
-SetupDuplicateDiskSpaceListA@16
-SetupDuplicateDiskSpaceListW@16
-SetupFindFirstLineA@16
-SetupFindFirstLineW@16
-SetupFindNextLine@8
-SetupFindNextMatchLineA@12
-SetupFindNextMatchLineW@12
-SetupFreeSourceListA@8
-SetupFreeSourceListW@8
-SetupGetBackupInformationA@8
-SetupGetBackupInformationW@8
-SetupGetBinaryField@20
-SetupGetFieldCount@4
-SetupGetFileCompressionInfoA@20
-SetupGetFileCompressionInfoW@20
-SetupGetInfFileListA@20
-SetupGetInfFileListW@20
-SetupGetInfInformationA@20
-SetupGetInfInformationW@20
-SetupGetInfSections@16
-SetupGetIntField@12
-SetupGetLineByIndexA@16
-SetupGetLineByIndexW@16
-SetupGetLineCountA@8
-SetupGetLineCountW@8
-SetupGetLineTextA@28
-SetupGetLineTextW@28
-SetupGetMultiSzFieldA@20
-SetupGetMultiSzFieldW@20
-SetupGetSourceFileLocationA@28
-SetupGetSourceFileLocationW@28
-SetupGetSourceFileSizeA@24
-SetupGetSourceFileSizeW@24
-SetupGetSourceInfoA@24
-SetupGetSourceInfoW@24
-SetupGetStringFieldA@20
-SetupGetStringFieldW@20
-SetupGetTargetPathA@24
-SetupGetTargetPathW@24
-SetupInitDefaultQueueCallback@4
-SetupInitDefaultQueueCallbackEx@20
-SetupInitializeFileLogA@8
-SetupInitializeFileLogW@8
-SetupInstallFileA@32
-SetupInstallFileExA@36
-SetupInstallFileExW@36
-SetupInstallFileW@32
-SetupInstallFilesFromInfSectionA@24
-SetupInstallFilesFromInfSectionW@24
-SetupInstallFromInfSectionA@44
-SetupInstallFromInfSectionW@44
-SetupInstallServicesFromInfSectionA@12
-SetupInstallServicesFromInfSectionExA@28
-SetupInstallServicesFromInfSectionExW@28
-SetupInstallServicesFromInfSectionW@12
-SetupIterateCabinetA@16
-SetupIterateCabinetW@16
-SetupLogErrorA@8
-SetupLogErrorW@8
-SetupLogFileA@36
-SetupLogFileW@36
-SetupOpenAppendInfFileA@12
-SetupOpenAppendInfFileW@12
-SetupOpenFileQueue@0
-SetupOpenInfFileA@16
-SetupOpenInfFileW@16
-SetupOpenLog@4
-SetupOpenMasterInf@0
-SetupPromptForDiskA@40
-SetupPromptForDiskW@40
-SetupPromptReboot@12
-SetupQueryDrivesInDiskSpaceListA@16
-SetupQueryDrivesInDiskSpaceListW@16
-SetupQueryFileLogA@28
-SetupQueryFileLogW@28
-SetupQueryInfFileInformationA@20
-SetupQueryInfFileInformationW@20
-SetupQueryInfOriginalFileInformationA@16
-SetupQueryInfOriginalFileInformationW@16
-SetupQueryInfVersionInformationA@24
-SetupQueryInfVersionInformationW@24
-SetupQuerySourceListA@12
-SetupQuerySourceListW@12
-SetupQuerySpaceRequiredOnDriveA@20
-SetupQuerySpaceRequiredOnDriveW@20
-SetupQueueCopyA@36
-SetupQueueCopyIndirectA@4
-SetupQueueCopyIndirectW@4
-SetupQueueCopySectionA@24
-SetupQueueCopySectionW@24
-SetupQueueCopyW@36
-SetupQueueDefaultCopyA@24
-SetupQueueDefaultCopyW@24
-SetupQueueDeleteA@12
-SetupQueueDeleteSectionA@16
-SetupQueueDeleteSectionW@16
-SetupQueueDeleteW@12
-SetupQueueRenameA@20
-SetupQueueRenameSectionA@16
-SetupQueueRenameSectionW@16
-SetupQueueRenameW@20
-SetupRemoveFileLogEntryA@12
-SetupRemoveFileLogEntryW@12
-SetupRemoveFromDiskSpaceListA@20
-SetupRemoveFromDiskSpaceListW@20
-SetupRemoveFromSourceListA@8
-SetupRemoveFromSourceListW@8
-SetupRemoveInstallSectionFromDiskSpaceListA@24
-SetupRemoveInstallSectionFromDiskSpaceListW@24
-SetupRemoveSectionFromDiskSpaceListA@28
-SetupRemoveSectionFromDiskSpaceListW@28
-SetupRenameErrorA@24
-SetupRenameErrorW@24
-SetupScanFileQueue@24
-SetupScanFileQueueA@24
-SetupScanFileQueueW@24
-SetupSetDirectoryIdA@12
-SetupSetDirectoryIdExA@24
-SetupSetDirectoryIdExW@24
-SetupSetDirectoryIdW@12
-SetupSetFileQueueAlternatePlatformA@12
-SetupSetFileQueueAlternatePlatformW@12
-SetupSetPlatformPathOverrideA@4
-SetupSetPlatformPathOverrideW@4
-SetupSetSourceListA@12
-SetupSetSourceListW@12
-SetupTermDefaultQueueCallback@4
-SetupTerminateFileLog@4
-ShouldDeviceBeExcluded@12
-StampFileSecurity@8
-StringTableAddString@12
-StringTableAddStringEx@20
-StringTableDestroy@4
-StringTableDuplicate@4
-StringTableEnum@20
-StringTableGetExtraData@16
-StringTableInitialize@0
-StringTableInitializeEx@8
-StringTableLookUpString@12
-StringTableLookUpStringEx@20
-StringTableSetExtraData@16
-StringTableStringFromId@8
-StringTableStringFromIdEx@16
-StringTableTrim@4
-TakeOwnershipOfFile@4
-UnicodeToMultiByte@8
-UnmapAndCloseFile@12
-VerifyCatalogFile@4
-VerifyFile@48
-pSetupAccessRunOnceNodeList@0
-pSetupDestroyRunOnceNodeList@0
-pSetupDiGetDeviceInfoContext@12
-pSetupDiSetDeviceInfoContext@12
-pSetupDirectoryIdToPath@20
-pSetupGetField@8
-pSetupGetGlobalFlags@0
-pSetupGetOsLoaderDriveAndPath@16
-pSetupGetQueueFlags@4
-pSetupGetVersionDatum@8
-pSetupGuidFromString@8
-pSetupIsGuidNull@4
-pSetupMakeSurePathExists@4
-pSetupSetGlobalFlags@4
-pSetupSetQueueFlags@8
-pSetupSetSystemSourcePath@8
-pSetupStringFromGuid@12
-pSetupVerifyQueuedCatalogs@4
diff --git a/winsup/w32api/lib/shell32.c b/winsup/w32api/lib/shell32.c
deleted file mode 100644
index b570e04..0000000
--- a/winsup/w32api/lib/shell32.c
+++ /dev/null
@@ -1,79 +0,0 @@
-#define INITGUID
-#include <basetyps.h>
-#include <shlguid.h>
-
-DEFINE_SHLGUID(CLSID_ShellDesktop,0x00021400L,0,0);
-DEFINE_SHLGUID(CLSID_ShellLink,0x00021401L,0,0);
-DEFINE_SHLGUID(FMTID_Intshcut,0x000214A0L,0,0);
-DEFINE_SHLGUID(FMTID_InternetSite,0x000214A1L,0,0);
-DEFINE_SHLGUID(CGID_Explorer,0x000214D0L,0,0);
-DEFINE_SHLGUID(CGID_ShellDocView,0x000214D1L,0,0);
-DEFINE_SHLGUID(CGID_ShellServiceObject,0x000214D2L,0,0);
-DEFINE_SHLGUID(IID_INewShortcutHookA,0x000214E1L,0,0);
-DEFINE_SHLGUID(IID_IShellBrowser,0x000214E2L,0,0);
-DEFINE_SHLGUID(IID_IShellView,0x000214E3L,0,0);
-DEFINE_SHLGUID(IID_IContextMenu,0x000214E4L,0,0);
-DEFINE_SHLGUID(IID_IQueryInfo,0x00021500L,0,0);
-DEFINE_SHLGUID(IID_IShellIcon,0x000214E5L,0,0);
-DEFINE_SHLGUID(IID_IShellFolder,0x000214E6L,0,0);
-DEFINE_SHLGUID(IID_IShellExtInit,0x000214E8L,0,0);
-DEFINE_SHLGUID(IID_IShellPropSheetExt,0x000214E9L,0,0);
-DEFINE_SHLGUID(IID_IPersistFolder,0x000214EAL,0,0);
-DEFINE_SHLGUID(IID_IExtractIconA,0x000214EBL,0,0);
-DEFINE_SHLGUID(IID_IShellLinkA,0x000214EEL,0,0);
-DEFINE_SHLGUID(IID_IShellCopyHookA,0x000214EFL,0,0);
-DEFINE_SHLGUID(IID_IFileViewerA,0x000214F0L,0,0);
-DEFINE_SHLGUID(IID_ICommDlgBrowser,0x000214F1L,0,0);
-DEFINE_SHLGUID(IID_IEnumIDList,0x000214F2L,0,0);
-DEFINE_SHLGUID(IID_IFileViewerSite,0x000214F3L,0,0);
-DEFINE_SHLGUID(IID_IContextMenu2,0x000214F4L,0,0);
-DEFINE_GUID(IID_IContextMenu3,0xBCFCE0A0,0xEC17,0x11D0,0x8D,0x10,0x0,0xA0,0xC9,0xF,0x27,0x19);
-DEFINE_SHLGUID(IID_IShellExecuteHookA,0x000214F5L,0,0);
-DEFINE_SHLGUID(IID_IPropSheetPage,0x000214F6L,0,0);
-DEFINE_SHLGUID(IID_INewShortcutHookW,0x000214F7L,0,0);
-DEFINE_SHLGUID(IID_IFileViewerW,0x000214F8L,0,0);
-DEFINE_SHLGUID(IID_IShellLinkW,0x000214F9L,0,0);
-DEFINE_SHLGUID(IID_IExtractIconW,0x000214FAL,0,0);
-DEFINE_SHLGUID(IID_IShellExecuteHookW,0x000214FBL,0,0);
-DEFINE_SHLGUID(IID_IShellCopyHookW,0x000214FCL,0,0);
-DEFINE_GUID(IID_IShellView2,0x88E39E80L,0x3578,0x11CF,0xAE,0x69,0x08,0x00,0x2B,0x2E,0x12,0x62);
-DEFINE_GUID(IID_IShellFolder2,0x93F2F68C,0x1D1B,0x11D3,0xA3,0x0E,0x00,0xC0,0x4F,0x79,0xAB,0xD1);
-DEFINE_GUID(IID_IPersistFolder2,0x1AC3D9F0,0x175C,0x11D1,0x95,0xBE,0x00,0x60,0x97,0x97,0xEA,0x4F);
-DEFINE_GUID(IID_IPersistFolder3,0xCEF04FDF,0xFE72,0x11D2,0x87,0xA5,0x00,0xC0,0x4F,0x68,0x37,0xCF);
-DEFINE_GUID(IID_IFileSystemBindData,0x1E18D10,0x4D8B,0x11D2,0x85,0x5D,0x00,0x60,0x08,0x05,0x93,0x67);
-DEFINE_GUID(LIBID_SHDocVw,0xEAB22AC0,0x30C1,0x11CF,0xA7,0xEB,0x00,0x00,0xC0,0x5B,0xAE,0x0B);
-DEFINE_GUID(IID_IShellExplorer,0xEAB22AC1,0x30C1,0x11CF,0xA7,0xEB,0x00,0x00,0xC0,0x5B,0xAE,0x0B);
-DEFINE_GUID(DIID_DShellExplorerEvents,0xEAB22AC2,0x30C1,0x11CF,0xA7,0xEB,0x00,0x00,0xC0,0x5B,0xAE,0x0B);
-DEFINE_GUID(CLSID_ShellExplorer,0xEAB22AC3,0x30C1,0x11CF,0xA7,0xEB,0x00,0x00,0xC0,0x5B,0xAE,0x0B);
-DEFINE_GUID(IID_ISHItemOC,0xEAB22AC4,0x30C1,0x11CF,0xA7,0xEB,0x00,0x00,0xC0,0x5B,0xAE,0x0B);
-DEFINE_GUID(DIID_DSHItemOCEvents,0xEAB22AC5,0x30C1,0x11CF,0xA7,0xEB,0x00,0x00,0xC0,0x5B,0xAE,0x0B);
-DEFINE_GUID(CLSID_SHItemOC,0xEAB22AC6,0x30C1,0x11CF,0xA7,0xEB,0x00,0x00,0xC0,0x5B,0xAE,0x0B);
-DEFINE_GUID(IID_DHyperLink,0x0002DF07,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
-DEFINE_GUID(IID_DIExplorer,0x0002DF05,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
-DEFINE_GUID(DIID_DExplorerEvents,0x0002DF06,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
-DEFINE_GUID(CLSID_InternetExplorer,0x0002DF01,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
-DEFINE_GUID(CLSID_StdHyperLink,0x0002DF09,0x0000,0x0000,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
-DEFINE_GUID(CLSID_FileTypes,0xB091E540,0x83E3,0x11CF,0xA7,0x13,0x00,0x20,0xAF,0xD7,0x97,0x62);
-DEFINE_GUID(CLSID_InternetShortcut,0xFBF23B40L,0xE3F0,0x101B,0x84,0x88,0x00,0xAA,0x00,0x3E,0x56,0xF8);
-DEFINE_GUID(IID_IUniformResourceLocator,0xFBF23B80L,0xE3F0,0x101B,0x84,0x88,0x00,0xAA,0x00,0x3E,0x56,0xF8);
-DEFINE_GUID(CLSID_DragDropHelper,0x4657278AL,0x411B,0x11D2,0x83,0x9A,0x0,0xC0,0x4F,0xD9,0x18,0xD0);
-DEFINE_GUID(IID_IDropTargetHelper,0x4657278BL,0x411B,0x11D2,0x83,0x9A,0x0,0xC0,0x4F,0xD9,0x18,0xD0);
-DEFINE_GUID(IID_IDragSourceHelper,0xDE5BF786L,0x477A,0x11D2,0x83,0x9D,0x0,0xC0,0x4F,0xD9,0x18,0xD0);
-DEFINE_GUID(IID_IColumnProvider,0xE8025004,0x1C42,0x11D2,0xBE,0x2C,0x0,0xA0,0xC9,0xA8,0x3D,0xA1);
-DEFINE_GUID(IID_IShellIconOverlayIdentifier,0x0C6C4200L,0xC589,0x11D0,0x99,0x9A,0x00,0xC0,0x4F,0xD6,0x55,0xE1);
-DEFINE_GUID(CLSID_AutoComplete,0x00bb2763,0x6a77,0x11d0,0xa5,0x35,0x00,0xc0,0x4f,0xd7,0xd0,0x62);
-DEFINE_GUID(IID_IAutoComplete,0x00bb2762,0x6a77,0x11d0,0xa5,0x35,0x00,0xc0,0x4f,0xd7,0xd0,0x62);
-DEFINE_GUID(IID_IAutoComplete2,0xeac04bc0,0x3791,0x11d2,0xbb,0x95,0x00,0x60,0x97,0x7b,0x46,0x4c);
-DEFINE_GUID(CLSID_ACLMulti,0x00bb2765,0x6a77,0x11d0,0xa5,0x35,0x00,0xc0,0x4f,0xd7,0xd0,0x62);
-DEFINE_GUID(IID_IObjMgr,0x00bb2761,0x6a77,0x11d0,0xa5,0x35,0x00,0xc0,0x4f,0xd7,0xd0,0x62);
-DEFINE_GUID(CLSID_ACListISF,0x03c036f1,0xa186,0x11D0,0x82,0x4a,0x00,0xaa,0x00,0x5b,0x43,0x83);
-DEFINE_GUID(IID_IACList,0x77a130b0,0x94fd,0x11D0,0xa5,0x44,0x00,0xc0,0x4f,0xd7,0xd0,0x62);
-DEFINE_GUID(CLSID_RecycleBin,0x645FF040,0x5081,0x101B,0x9F,0x08,0x00,0xAA,0x00,0x2F,0x95,0x4E);
-DEFINE_GUID(CLSID_ControlPanel,0x21EC2020,0x3AEA,0x1069,0xA2,0xDD,0x08,0x00,0x2B,0x30,0x30,0x9D);
-DEFINE_GUID(CLSID_MyComputer,0x20D04FE0,0x3AEA,0x1069,0xA2,0xD8,0x08,0x00,0x2B,0x30,0x30,0x9D);
-DEFINE_GUID(CLSID_Internet,0x871C5380,0x42A0,0x1069,0xA2,0xEA,0x08,0x00,0x2B,0x30,0x30,0x9D);
-DEFINE_GUID(CLSID_NetworkPlaces,0x208D2C60,0x3AEA,0x1069,0xA2,0xD7,0x08,0x00,0x2B,0x30,0x30,0x9D);
-DEFINE_GUID(CLSID_MyDocuments,0x450d8fba,0xad25,0x11d0,0x98,0xa8,0x08,0x00,0x36,0x1b,0x11,0x03);
-DEFINE_GUID(CLSID_FolderShortcut,0x0AFACED1,0xE828,0x11D1,0x91,0x87,0xB5,0x32,0xF1,0xE9,0x57,0x5D);
-DEFINE_GUID(CLSID_ShellFSFolder,0xF3364BA0,0x65B9,0x11CE,0xA9,0xBA,0x00,0xAA,0x00,0x4A,0xE8,0x37);
-DEFINE_GUID(IID_IShellLinkDataList,0x45E2B4AE,0xB1C3, 0x11D0,0xB9,0x2F,0x00,0xA0,0xC9,0x03,0x12,0xE1);
diff --git a/winsup/w32api/lib/shell32.def b/winsup/w32api/lib/shell32.def
deleted file mode 100644
index af36c62..0000000
--- a/winsup/w32api/lib/shell32.def
+++ /dev/null
@@ -1,185 +0,0 @@
-LIBRARY SHELL32.DLL
-EXPORTS
-WOWShellExecute@28
-StrStrW@8
-StrStrIW@8
-StrStrIA@8
-StrStrA@8
-StrRStrW@12
-StrRStrIW@12
-StrRStrIA@12
-StrRStrA@12
-StrRChrW@12
-StrRChrIW@12
-StrRChrIA@12
-StrRChrA@12
-StrNCpyW@12
-StrNCpyA@12
-StrNCmpW@12
-StrNCmpIW@12
-StrNCmpIA@12
-StrNCmpA@12
-StrCpyNW@12
-StrCpyNA@12
-StrCmpNW@12
-StrCmpNIW@12
-StrCmpNIA@12
-StrCmpNA@12
-StrChrW@8
-StrChrIW@8
-StrChrIA@8
-StrChrA@8
-SHUpdateRecycleBinIcon@0
-SHSetUnreadMailCountW@12
-SHSetLocalizedName@12
-SHQueryRecycleBinW@8
-SHQueryRecycleBinA@8
-SHPathPrepareForWriteW@16
-SHPathPrepareForWriteA@16
-SHParseDisplayName@20
-SHOpenFolderAndSelectItems@16
-SHLoadNonloadedIconOverlayIdentifiers@0
-SHLoadInProc@4
-SHIsFileAvailableOffline@8
-SHInvokePrinterCommandW@20
-SHInvokePrinterCommandA@20
-SHILCreateFromPath@12
-SHHelpShortcuts_RunDLL@16
-SHGetUnreadMailCountW@24
-SHGetSpecialFolderPathW@16
-SHGetSpecialFolderPathA@16
-SHGetSpecialFolderLocation@12
-SHGetSetSettings@12
-SHGetSettings@8
-SHGetPathFromIDListW@8
-SHGetPathFromIDListA@8
-SHGetPathFromIDList@8
-SHGetNewLinkInfoW@20
-SHGetNewLinkInfoA@20
-SHGetNewLinkInfo@20
-SHGetMalloc@4
-SHGetInstanceExplorer@4
-SHGetIconOverlayIndexW@8
-SHGetIconOverlayIndexA@8
-SHGetFolderPathAndSubDirW@24
-SHGetFolderPathAndSubDirA@24
-; SHGetFolder is in shell32.dll on W2K up,
-; but in redistributable shfolder.dll for earlier OS versions.
-SHGetFolderPathW@20
-SHGetFolderPathA@20
-SHGetFolderLocation@20
-SHGetFileInfoW@20
-SHGetFileInfoA@20
-SHGetFileInfo@20
-SHGetDiskFreeSpaceExW@16
-SHGetDiskFreeSpaceExA@16
-SHGetDiskFreeSpaceA@16
-SHGetDesktopFolder@4
-SHGetDataFromIDListW@20
-SHGetDataFromIDListA@20
-SHFreeNameMappings@4
-SHFormatDrive@16
-SHFileOperationW@4
-SHFileOperationA@4
-SHFileOperation@4
-SHExtractIconsW@32
-SheShortenPathW@8
-SheShortenPathA@8
-SheSetCurDrive@4
-SheRemoveQuotesW@4
-SheRemoveQuotesA@4
-SHEnumerateUnreadMailAccountsW@16
-SHEmptyRecycleBinW@12
-SHEmptyRecycleBinA@12
-ShellHookProc@12
-ShellExecuteW@24
-ShellExecuteExW@4
-ShellExecuteExA@4
-ShellExecuteEx@4
-ShellExecuteA@24
-ShellAboutW@16
-ShellAboutA@16
-Shell_NotifyIconW@8
-Shell_NotifyIconA@8
-Shell_NotifyIcon@8
-SheGetPathOffsetW@4
-SheGetDirW@8
-SheGetDirExW@12
-SheGetDirA@8
-SheGetCurDrive@0
-SheFullPathW@12
-SheFullPathA@12
-SheConvertPathW@12
-SheChangeDirW@4
-SheChangeDirExW@4
-SheChangeDirExA@4
-SheChangeDirA@4
-SHCreateShellItem@16
-SHCreateQueryCancelAutoPlayMoniker@4
-SHCreateProcessAsUserW@4
-SHCreateDirectoryExW@12
-SHCreateDirectoryExA@12
-SHCoCreateInstance@20
-SHChangeNotify@16
-SHBrowseForFolderW@4
-SHBrowseForFolderA@4
-SHBrowseForFolder@4
-SHBindToParent@16
-SHAppBarMessage@8
-SHAddToRecentDocs@8
-RegisterShellHook@8
-RegenerateUserEnvironment@8
-RealShellExecuteW@40
-RealShellExecuteExW@44
-RealShellExecuteExA@44
-RealShellExecuteA@40
-PrintersGetCommand_RunDLL@16
-OpenAs_RunDLL@16
-InternalExtractIconListW@12
-InternalExtractIconListA@12
-FreeIconList@8
-FindExeDlgProc@16
-FindExecutableW@12
-FindExecutableA@12
-ExtractVersionResource16W@8
-ExtractIconW@12
-ExtractIconResInfoW@20
-ExtractIconResInfoA@20
-ExtractIconExW@20
-ExtractIconExA@20
-ExtractIconEx@20
-ExtractIconA@12
-ExtractAssociatedIconW@12
-ExtractAssociatedIconExW@16
-ExtractAssociatedIconExA@16
-ExtractAssociatedIconA@12
-DuplicateIcon@8
-DragQueryPoint@8
-DragQueryFileW@16
-DragQueryFileAorW@24
-DragQueryFileA@16
-DragQueryFile@16
-DragFinish@4
-DragAcceptFiles@8
-DoEnvironmentSubstW@8
-DoEnvironmentSubstA@8
-Control_RunDLL@16
-Control_FillCache_RunDLL@16
-CommandLineToArgvW@8
-CheckEscapesW@8
-CheckEscapesA@8
-ILAppendID@12
-ILClone@4
-ILCloneFirst@4
-ILCombine@8
-ILFindChild@8
-ILFindLastID@4
-ILFree@4
-ILGetNext@4
-ILGetSize@4
-ILIsEqual@8
-ILIsParent@12
-ILLoadFromStream@8
-ILRemoveLastID@4
-ILSaveToStream@8
-PathResolve@12
diff --git a/winsup/w32api/lib/shfolder.def b/winsup/w32api/lib/shfolder.def
deleted file mode 100644
index edcf706..0000000
--- a/winsup/w32api/lib/shfolder.def
+++ /dev/null
@@ -1,4 +0,0 @@
-LIBRARY SHFOLDER.DLL
-EXPORTS
-SHGetFolderPathA@20
-SHGetFolderPathW@20
diff --git a/winsup/w32api/lib/shlwapi.def b/winsup/w32api/lib/shlwapi.def
deleted file mode 100644
index e29f72f..0000000
--- a/winsup/w32api/lib/shlwapi.def
+++ /dev/null
@@ -1,296 +0,0 @@
-LIBRARY SHLWAPI.DLL
-EXPORTS
-AssocCreate@24
-AssocQueryKeyA@20
-AssocQueryKeyW@20
-AssocQueryStringA@24
-AssocQueryStringByKeyA@24
-AssocQueryStringByKeyW@24
-AssocQueryStringW@24
-ChrCmpIA@8
-ChrCmpIW@8
-ColorAdjustLuma@12
-ColorHLSToRGB@12
-ColorRGBToHLS@16
-GetMenuPosFromID@8
-HashData@16
-IntlStrEqWorkerA@16
-IntlStrEqWorkerW@16
-PathAddBackslashA@4
-PathAddBackslashW@4
-PathAddExtensionA@8
-PathAddExtensionW@8
-PathAppendA@8
-PathAppendW@8
-PathBuildRootA@8
-PathBuildRootW@8
-PathCanonicalizeA@8
-PathCanonicalizeW@8
-PathCombineA@12
-PathCombineW@12
-PathCommonPrefixA@12
-PathCommonPrefixW@12
-PathCompactPathA@12
-PathCompactPathExA@16
-PathCompactPathExW@16
-PathCompactPathW@12
-PathCreateFromUrlA@16
-PathCreateFromUrlW@16
-PathFileExistsA@4
-PathFileExistsW@4
-PathFindExtensionA@4
-PathFindExtensionW@4
-PathFindFileNameA@4
-PathFindFileNameW@4
-PathFindNextComponentA@4
-PathFindNextComponentW@4
-PathFindOnPathA@8
-PathFindOnPathW@8
-PathFindSuffixArrayA@12
-PathFindSuffixArrayW@12
-PathGetArgsA@4
-PathGetArgsW@4
-PathGetCharTypeA@4
-PathGetCharTypeW@4
-PathGetDriveNumberA@4
-PathGetDriveNumberW@4
-PathIsContentTypeA@8
-PathIsContentTypeW@8
-PathIsDirectoryA@4
-PathIsDirectoryEmptyA@4
-PathIsDirectoryEmptyW@4
-PathIsDirectoryW@4
-PathIsFileSpecA@4
-PathIsFileSpecW@4
-PathIsLFNFileSpecA@4
-PathIsLFNFileSpecW@4
-PathIsNetworkPathA@4
-PathIsNetworkPathW@4
-PathIsPrefixA@8
-PathIsPrefixW@8
-PathIsRelativeA@4
-PathIsRelativeW@4
-PathIsRootA@4
-PathIsRootW@4
-PathIsSameRootA@8
-PathIsSameRootW@8
-PathIsSystemFolderA@8
-PathIsSystemFolderW@8
-PathIsUNCA@4
-PathIsUNCServerA@4
-PathIsUNCServerShareA@4
-PathIsUNCServerShareW@4
-PathIsUNCServerW@4
-PathIsUNCW@4
-PathIsURLA@4
-PathIsURLW@4
-PathMakePrettyA@4
-PathMakePrettyW@4
-PathMakeSystemFolderA@4
-PathMakeSystemFolderW@4
-PathMatchSpecA@8
-PathMatchSpecW@8
-PathParseIconLocationA@4
-PathParseIconLocationW@4
-PathQuoteSpacesA@4
-PathQuoteSpacesW@4
-PathRelativePathToA@20
-PathRelativePathToW@20
-PathRemoveArgsA@4
-PathRemoveArgsW@4
-PathRemoveBackslashA@4
-PathRemoveBackslashW@4
-PathRemoveBlanksA@4
-PathRemoveBlanksW@4
-PathRemoveExtensionA@4
-PathRemoveExtensionW@4
-PathRemoveFileSpecA@4
-PathRemoveFileSpecW@4
-PathRenameExtensionA@8
-PathRenameExtensionW@8
-PathSearchAndQualifyA@12
-PathSearchAndQualifyW@12
-PathSetDlgItemPathA@12
-PathSetDlgItemPathW@12
-PathSkipRootA@4
-PathSkipRootW@4
-PathStripPathA@4
-PathStripPathW@4
-PathStripToRootA@4
-PathStripToRootW@4
-PathUnExpandEnvStringsA@12
-PathUnExpandEnvStringsW@12
-PathUndecorateA@4
-PathUndecorateW@4
-PathUnmakeSystemFolderA@4
-PathUnmakeSystemFolderW@4
-PathUnquoteSpacesA@4
-PathUnquoteSpacesW@4
-SHAutoComplete@8
-SHCopyKeyA@16
-SHCopyKeyW@16
-SHCreateShellPalette@4
-SHCreateStreamOnFileA@12
-SHCreateStreamOnFileEx@24
-SHCreateStreamOnFileW@12
-SHCreateStreamWrapper@16
-SHCreateThread@16
-SHDeleteEmptyKeyA@8
-SHDeleteEmptyKeyW@8
-SHDeleteKeyA@8
-SHDeleteKeyW@8
-SHDeleteOrphanKeyA@8
-SHDeleteOrphanKeyW@8
-SHDeleteValueA@12
-SHDeleteValueW@12
-SHEnumKeyExA@16
-SHEnumKeyExW@16
-SHEnumValueA@28
-SHEnumValueW@28
-SHGetInverseCMAP@8
-SHGetThreadRef@4
-SHGetValueA@24
-SHGetValueW@24
-SHIsLowMemoryMachine@4
-SHLoadIndirectString@16
-SHOpenRegStream2A@16
-SHOpenRegStream2W@16
-SHOpenRegStreamA@16
-SHOpenRegStreamW@16
-SHQueryInfoKeyA@20
-SHQueryInfoKeyW@20
-SHQueryValueExA@24
-SHQueryValueExW@24
-SHRegCloseUSKey@4
-SHRegCreateUSKeyA@20
-SHRegCreateUSKeyW@20
-SHRegDeleteEmptyUSKeyA@12
-SHRegDeleteEmptyUSKeyW@12
-SHRegDeleteUSValueA@12
-SHRegDeleteUSValueW@12
-SHRegDuplicateHKey@4
-SHRegEnumUSKeyA@20
-SHRegEnumUSKeyW@20
-SHRegEnumUSValueA@32
-SHRegEnumUSValueW@32
-SHRegGetBoolUSValueA@16
-SHRegGetBoolUSValueW@16
-SHRegGetPathA@20
-SHRegGetPathW@20
-SHRegGetUSValueA@32
-SHRegGetUSValueW@32
-SHRegOpenUSKeyA@20
-SHRegOpenUSKeyW@20
-SHRegQueryInfoUSKeyA@24
-SHRegQueryInfoUSKeyW@24
-SHRegQueryUSValueA@32
-SHRegQueryUSValueW@32
-SHRegSetPathA@20
-SHRegSetPathW@20
-SHRegSetUSValueA@24
-SHRegSetUSValueW@24
-SHRegWriteUSValueA@24
-SHRegWriteUSValueW@24
-SHRegisterValidateTemplate@8
-SHReleaseThreadRef@0
-SHSetThreadRef@4
-SHSetValueA@24
-SHSetValueW@24
-SHSkipJunction@8
-SHStrDupA@8
-SHStrDupW@8
-StrCSpnA@8
-StrCSpnIA@8
-StrCSpnIW@8
-StrCSpnW@8
-StrCatBuffA@12
-StrCatBuffW@12
-StrCatChainW@16
-StrCatW@8
-StrChrA@8
-StrChrIA@8
-StrChrIW@8
-StrChrNIW@12
-StrChrNW@12
-StrChrW@8
-StrCmpIW@8
-StrCmpLogicalW@8
-StrCmpNA@12
-StrCmpNIA@12
-StrCmpNIW@12
-StrCmpNW@12
-StrCmpW@8
-StrCpyNW@12
-StrCpyW@8
-StrDupA@4
-StrDupW@4
-StrFormatByteSize64A@16
-StrFormatByteSizeA@12
-StrFormatByteSizeW@16
-StrFormatKBSizeA@16
-StrFormatKBSizeW@16
-StrFromTimeIntervalA@16
-StrFromTimeIntervalW@16
-StrIsIntlEqualA@16
-StrIsIntlEqualW@16
-StrNCatA@12
-StrNCatW@12
-StrPBrkA@8
-StrPBrkW@8
-StrRChrA@12
-StrRChrIA@12
-StrRChrIW@12
-StrRChrW@12
-StrRStrIA@12
-StrRStrIW@12
-StrRetToBSTR@12
-StrRetToBufA@16
-StrRetToBufW@16
-StrRetToStrA@12
-StrRetToStrW@12
-StrSpnA@8
-StrSpnW@8
-StrStrA@8
-StrStrIA@8
-StrStrIW@8
-StrStrNIW@12
-StrStrNW@12
-StrStrW@8
-StrToInt64ExA@12
-StrToInt64ExW@12
-StrToIntA@4
-StrToIntExA@12
-StrToIntExW@12
-StrToIntW@4
-StrTrimA@8
-StrTrimW@8
-UrlApplySchemeA@16
-UrlApplySchemeW@16
-UrlCanonicalizeA@16
-UrlCanonicalizeW@16
-UrlCombineA@20
-UrlCombineW@20
-UrlCompareA@12
-UrlCompareW@12
-UrlCreateFromPathA@16
-UrlCreateFromPathW@16
-UrlEscapeA@16
-UrlEscapeW@16
-UrlGetLocationA@4
-UrlGetLocationW@4
-UrlGetPartA@20
-UrlGetPartW@20
-UrlHashA@12
-UrlHashW@12
-UrlIsA@8
-UrlIsNoHistoryA@4
-UrlIsNoHistoryW@4
-UrlIsOpaqueA@4
-UrlIsOpaqueW@4
-UrlIsW@8
-UrlUnescapeA@16
-UrlUnescapeW@16
-wnsprintfA
-wnsprintfW
-wvnsprintfA@16
-wvnsprintfW@16
diff --git a/winsup/w32api/lib/snmpapi.def b/winsup/w32api/lib/snmpapi.def
deleted file mode 100644
index 0c16c1c..0000000
--- a/winsup/w32api/lib/snmpapi.def
+++ /dev/null
@@ -1,40 +0,0 @@
-LIBRARY snmpapi.dll
-EXPORTS
-SnmpSvcAddrIsIpx@12
-SnmpSvcAddrToSocket@8
-SnmpSvcBufRevAndCpy@12
-SnmpSvcBufRevInPlace@8
-SnmpSvcDecodeMessage@20
-SnmpSvcEncodeMessage@16
-SnmpSvcGenerateAuthFailTrap@4
-SnmpSvcGenerateColdStartTrap@4
-SnmpSvcGenerateLinkDownTrap@8
-SnmpSvcGenerateLinkUpTrap@8
-SnmpSvcGenerateTrap@20
-SnmpSvcGenerateWarmStartTrap@4
-SnmpSvcGetUptime@0
-SnmpSvcInitUptime@0
-SnmpSvcReleaseMessage@4
-SnmpSvcReportEvent@16
-SnmpSvcSetLogLevel@4
-SnmpSvcSetLogType@4
-SnmpUtilAnsiToUnicode@12
-SnmpUtilDbgPrint
-SnmpUtilIdsToA@8
-SnmpUtilMemAlloc@4
-SnmpUtilMemFree@4
-SnmpUtilMemReAlloc@8
-SnmpUtilOidAppend@8
-SnmpUtilOidCmp@8
-SnmpUtilOidCpy@8
-SnmpUtilOidFree@4
-SnmpUtilOidNCmp@12
-SnmpUtilOidToA@4
-SnmpUtilPrintAsnAny@4
-SnmpUtilPrintOid@4
-SnmpUtilStrlenW@4
-SnmpUtilUnicodeToAnsi@12
-SnmpUtilVarBindCpy@8
-SnmpUtilVarBindFree@4
-SnmpUtilVarBindListCpy@8
-SnmpUtilVarBindListFree@4
diff --git a/winsup/w32api/lib/svrapi.def b/winsup/w32api/lib/svrapi.def
deleted file mode 100644
index 4a7b0db..0000000
--- a/winsup/w32api/lib/svrapi.def
+++ /dev/null
@@ -1,22 +0,0 @@
-LIBRARY SVRAPI.DLL
-EXPORTS
-NetAccessAdd@16
-NetAccessCheck@20
-NetAccessDel@8
-NetAccessEnum@32
-NetAccessGetInfo@24
-NetAccessGetUserPerms@16
-NetAccessSetInfo@24
-NetConnectionEnum@28
-NetFileClose2@8
-NetFileEnum@28
-NetSecurityGetInfo@20
-NetServerGetInfo@20
-NetSessionDel@12
-NetSessionEnum@24
-NetSessionGetInfo@24
-NetShareAdd@16
-NetShareDel@12
-NetShareEnum@24
-NetShareGetInfo@24
-NetShareSetInfo@24
diff --git a/winsup/w32api/lib/tapi32.def b/winsup/w32api/lib/tapi32.def
deleted file mode 100644
index e4f0d9c..0000000
--- a/winsup/w32api/lib/tapi32.def
+++ /dev/null
@@ -1,116 +0,0 @@
-LIBRARY TAPI32.DLL
-EXPORTS
-lineAccept@12
-lineAddProvider@12
-lineAddToConference@8
-lineAnswer@12
-lineBlindTransfer@12
-lineClose@4
-lineCompleteCall@16
-lineCompleteTransfer@16
-lineConfigDialog@12
-lineConfigDialogEdit@24
-lineConfigProvider@8
-lineDeallocateCall@4
-lineDevSpecific@20
-lineDevSpecificFeature@16
-lineDial@12
-lineDrop@12
-lineForward@28
-lineGatherDigits@28
-lineGenerateDigits@16
-lineGenerateTone@20
-lineGetAddressCaps@24
-lineGetAddressID@20
-lineGetAddressStatus@12
-lineGetAppPriority@24
-lineGetCallInfo@8
-lineGetCallStatus@8
-lineGetConfRelatedCalls@8
-lineGetCountry@12
-lineGetDevCaps@20
-lineGetDevConfig@12
-lineGetID@24
-lineGetIcon@12
-lineGetLineDevStatus@8
-lineGetNewCalls@16
-lineGetNumRings@12
-lineGetProviderList@8
-lineGetRequest@12
-lineGetStatusMessages@12
-lineGetTranslateCaps@12
-lineHandoff@12
-lineHold@4
-lineInitialize@20
-lineMakeCall@20
-lineMonitorDigits@8
-lineMonitorMedia@8
-lineMonitorTones@12
-lineNegotiateAPIVersion@24
-lineNegotiateExtVersion@24
-lineOpen@36
-linePark@16
-linePickup@20
-linePrepareAddToConference@12
-lineRedirect@12
-lineRegisterRequestRecipient@16
-lineReleaseUserUserInfo@4
-lineRemoveFromConference@4
-lineRemoveProvider@8
-lineSecureCall@4
-lineSendUserUserInfo@12
-lineSetAppPriority@24
-lineSetAppSpecific@8
-lineSetCallParams@20
-lineSetCallPrivilege@8
-lineSetCurrentLocation@8
-lineSetDevConfig@16
-lineSetMediaControl@48
-lineSetMediaMode@8
-lineSetNumRings@12
-lineSetStatusMessages@12
-lineSetTerminal@28
-lineSetTollList@16
-lineSetupConference@24
-lineSetupTransfer@12
-lineShutdown@4
-lineSwapHold@8
-lineTranslateAddress@28
-lineTranslateDialog@20
-lineUncompleteCall@8
-lineUnhold@4
-lineUnpark@16
-phoneClose@4
-phoneConfigDialog@12
-phoneDevSpecific@12
-phoneGetButtonInfo@12
-phoneGetData@16
-phoneGetDevCaps@20
-phoneGetDisplay@8
-phoneGetGain@12
-phoneGetHookSwitch@8
-phoneGetID@12
-phoneGetIcon@12
-phoneGetLamp@12
-phoneGetRing@12
-phoneGetStatus@8
-phoneGetStatusMessages@16
-phoneGetVolume@12
-phoneInitialize@20
-phoneNegotiateAPIVersion@24
-phoneNegotiateExtVersion@24
-phoneOpen@28
-phoneSetButtonInfo@12
-phoneSetData@16
-phoneSetDisplay@20
-phoneSetGain@12
-phoneSetHookSwitch@12
-phoneSetLamp@12
-phoneSetRing@12
-phoneSetStatusMessages@16
-phoneSetVolume@12
-phoneShutdown@4
-tapiGetLocationInfo@8
-tapiRequestDrop@8
-tapiRequestMakeCall@16
-tapiRequestMediaCall@40
diff --git a/winsup/w32api/lib/test.c b/winsup/w32api/lib/test.c
deleted file mode 100644
index 2db731b..0000000
--- a/winsup/w32api/lib/test.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/* Perform simple test of headers to avoid typos and such */
-#define __USE_W32_SOCKETS
-#include <w32api.h>
-#include <windows.h>
-
-#ifdef __OBJC__
-#define BOOL WINBOOL
-#endif
-#include <windowsx.h>
-#include <commctrl.h>
-#include <largeint.h>
-#include <mmsystem.h>
-#include <mciavi.h>
-#include <mcx.h>
-#include <sql.h>
-#include <sqlext.h>
-#include <imm.h>
-#include <lm.h>
-#include <zmouse.h>
-#include <scrnsave.h>
-#include <cpl.h>
-#include <cplext.h>
-#include <wincrypt.h>
-#include <pbt.h>
-#include <wininet.h>
-#include <regstr.h>
-#include <custcntl.h>
-#include <mapi.h>
-
-#include <dbt.h>
-#include <httpext.h>
-#include <icm.h>
-#include <imagehlp.h>
-#include <ipexport.h>
-#include <iphlpapi.h>
-#include <ipifcons.h>
-#include <iprtrmib.h>
-#include <iptypes.h>
-#include <isguids.h>
-#include <lmbrowsr.h>
-#include <mswsock.h>
-#include <nddeapi.h>
-#include <ntdef.h>
-#include <ntsecapi.h>
-#include <odbcinst.h>
-#include <powrprof.h>
-#include <psapi.h>
-#include <ras.h>
-#include <rasdlg.h>
-#include <raserror.h>
-#include <rassapi.h>
-#include <richedit.h>
-#include <rpcdce2.h>
-#include <subauth.h>
-#include <tlhelp32.h>
-#include <userenv.h>
-#include <winioctl.h>
-#include <winresrc.h>
-#include <winsock.h>
-#ifdef _WINSOCK2_H
-#include <ws2tcpip.h>
-#include <ws2spi.h>
-#include <wsahelp.h>
-#endif
-#include <wsipx.h>
-#include <wsnetbs.h>
-#include <svcguid.h>
-#include <setupapi.h>
-#include <aclapi.h>
-#include <security.h>
-#include <secext.h>
-#include <schnlsp.h>
-#include <ntldap.h>
-#include <winber.h>
-#include <winldap.h>
-#include <shlwapi.h>
-#include <snmp.h>
-#include <winsnmp.h>
-#include <mgmtapi.h>
-#include <vfw.h>
-#include <uxtheme.h>
-#include <tmschema.h>
-#include <dhcpcsdk.h>
-#include <errorrep.h>
-#include <windns.h>
-#include <usp10.h>
-
-#ifndef _OBJC_NO_COM
-#include <initguid.h>
-#include <ole2.h>
-#include <comcat.h>
-#include <shlobj.h>
-#include <intshcut.h>
-#include <ocidl.h>
-#include <ole2ver.h>
-#include <oleacc.h>
-#include <winable.h>
-#include <olectl.h>
-#include <oledlg.h>
-#include <docobj.h>
-#include <idispids.h>
-#include <rapi.h>
-#include <richole.h>
-#include <rpcproxy.h>
-#include <exdisp.h>
-#include <mshtml.h>
-#include <servprov.h>
-#include <aclui.h>
-#include <mlang.h>
-#endif
-
-#ifdef __OBJC__
-#undef BOOL
-
-@interface class1 {
- int e;
-}
-@end
-
-@implementation class1
-@end
-#endif
-
-int main()
-{
- return 0;
-}
diff --git a/winsup/w32api/lib/th32.def b/winsup/w32api/lib/th32.def
deleted file mode 100644
index 4137bf6..0000000
--- a/winsup/w32api/lib/th32.def
+++ /dev/null
@@ -1,14 +0,0 @@
-LIBRARY Kernel32.dll
-EXPORTS
-CreateToolhelp32Snapshot@8
-Heap32First@12
-Heap32ListFirst@8
-Heap32ListNext@8
-Heap32Next@4
-Module32First@8
-Module32Next@8
-Process32First@8
-Process32Next@8
-Thread32First@8
-Thread32Next@8
-Toolhelp32ReadProcessMemory@20
diff --git a/winsup/w32api/lib/thunk32.def b/winsup/w32api/lib/thunk32.def
deleted file mode 100644
index abdeb46..0000000
--- a/winsup/w32api/lib/thunk32.def
+++ /dev/null
@@ -1,68 +0,0 @@
-LIBRARY KERNEL32.dll
-EXPORTS
-Callback12@12
-Callback16@16
-Callback20@20
-Callback24@24
-Callback28@28
-Callback32@32
-Callback36@36
-Callback40@40
-Callback44@44
-Callback48@48
-Callback4@4
-Callback52@52
-Callback56@56
-Callback60@60
-Callback64@64
-Callback8@8
-FT_Exit0
-FT_Exit12
-FT_Exit16
-FT_Exit20
-FT_Exit24
-FT_Exit28
-FT_Exit32
-FT_Exit36
-FT_Exit4
-FT_Exit40
-FT_Exit44
-FT_Exit48
-FT_Exit52
-FT_Exit56
-FT_Exit8
-FT_Prolog
-FT_Thunk
-K32Thk1632Epilog@0
-K32Thk1632Prolog@0
-MapHInstLS
-MapHInstLS_PN
-MapHInstSL
-MapHInstSL_PN
-MapLS@4
-MapSL@4
-MapSLFix@4
-QT_Thunk
-SMapLS
-SMapLS_IP_EBP_12
-SMapLS_IP_EBP_16
-SMapLS_IP_EBP_20
-SMapLS_IP_EBP_24
-SMapLS_IP_EBP_28
-SMapLS_IP_EBP_32
-SMapLS_IP_EBP_36
-SMapLS_IP_EBP_40
-SMapLS_IP_EBP_8
-SUnMapLS
-SUnMapLS_IP_EBP_12
-SUnMapLS_IP_EBP_16
-SUnMapLS_IP_EBP_20
-SUnMapLS_IP_EBP_24
-SUnMapLS_IP_EBP_28
-SUnMapLS_IP_EBP_32
-SUnMapLS_IP_EBP_36
-SUnMapLS_IP_EBP_40
-SUnMapLS_IP_EBP_8
-ThunkConnect32@24
-UnMapLS@4
-UnMapSLFixArray@8
diff --git a/winsup/w32api/lib/unknwn-uuid.c b/winsup/w32api/lib/unknwn-uuid.c
deleted file mode 100644
index b301ea2..0000000
--- a/winsup/w32api/lib/unknwn-uuid.c
+++ /dev/null
@@ -1,10 +0,0 @@
-/* unknwn-uuid.c */
-/* Generate GUIDs for Unknown interfaces */
-
-/* All IIDs defined in this file were extracted from
- * HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\ */
-
-#define INITGUID
-#include <basetyps.h>
-DEFINE_OLEGUID(IID_IUnknown,0,0,0);
-DEFINE_OLEGUID(IID_IClassFactory,0x1,0,0);
diff --git a/winsup/w32api/lib/url.def b/winsup/w32api/lib/url.def
deleted file mode 100644
index 2020732..0000000
--- a/winsup/w32api/lib/url.def
+++ /dev/null
@@ -1,9 +0,0 @@
-LIBRARY URL.DLL
-EXPORTS
-URLAssociationDialogW@24
-URLAssociationDialogA@24
-TranslateURLW@12
-TranslateURLA@12
-MIMEAssociationDialogW@24
-MIMEAssociationDialogA@24
-InetIsOffline@4
diff --git a/winsup/w32api/lib/urlmon-uuid.c b/winsup/w32api/lib/urlmon-uuid.c
deleted file mode 100644
index fecd552..0000000
--- a/winsup/w32api/lib/urlmon-uuid.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* urlmon-uuid.c */
-/* Generate GUIDs for URLMON interfaces */
-
-/* All IIDs defined in this file were extracted from
- * HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\ */
-
-#define INITGUID
-#include <basetyps.h>
-DEFINE_GUID(IID_IBindHost,0xfc4801a1,0x2ba9,0x11cf,0xa2,0x29,0,0xaa,0,0x3d,0x73,0x52);
-DEFINE_GUID(IID_IBindProtocol,0x79eac9cd,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-DEFINE_GUID(IID_IBindStatusCallback,0x79eac9c1,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-DEFINE_GUID(IID_IBindStatusCallbackMsg,0x79eac9cb,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-DEFINE_GUID(IID_IBinding,0x79eac9c0,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
-DEFINE_GUID(IID_IAuthenticate,0x79eac9d0,0xbaf9,0x11ce,0x8c,0x82,0,0xaa,0,0x4b,0xa9,0xb);
diff --git a/winsup/w32api/lib/user32.def b/winsup/w32api/lib/user32.def
deleted file mode 100644
index 451b4be..0000000
--- a/winsup/w32api/lib/user32.def
+++ /dev/null
@@ -1,639 +0,0 @@
-LIBRARY USER32.dll
-EXPORTS
-ActivateKeyboardLayout@8
-AdjustWindowRect@12
-AdjustWindowRectEx@16
-AllowSetForegroundWindow@4
-AnimateWindow@12
-AnyPopup@0
-AppendMenuA@16
-AppendMenuW@16
-ArrangeIconicWindows@4
-AttachThreadInput@12
-BeginDeferWindowPos@4
-BeginPaint@8
-BlockInput@4
-BringWindowToTop@4
-BroadcastSystemMessage@20
-BroadcastSystemMessageA@20
-BroadcastSystemMessageExA@24
-BroadcastSystemMessageExW@24
-BroadcastSystemMessageW@20
-CalcChildScroll@8
-CallMsgFilter@8
-CallMsgFilterA@8
-CallMsgFilterW@8
-CallNextHookEx@16
-CallWindowProcA@20
-CallWindowProcW@20
-CascadeChildWindows@8
-CascadeWindows@20
-ChangeClipboardChain@8
-ChangeDisplaySettingsA@8
-ChangeDisplaySettingsW@8
-ChangeDisplaySettingsExA@20
-ChangeDisplaySettingsExW@20
-ChangeMenuA@20
-ChangeMenuW@20
-CharLowerA@4
-CharLowerBuffA@8
-CharLowerBuffW@8
-CharLowerW@4
-CharNextA@4
-CharNextExA@12
-CharNextW@4
-CharPrevA@8
-CharPrevExA@16
-CharPrevW@8
-CharToOemA@8
-CharToOemBuffA@12
-CharToOemBuffW@12
-CharToOemW@8
-CharUpperA@4
-CharUpperBuffA@8
-CharUpperBuffW@8
-CharUpperW@4
-CheckDlgButton@12
-CheckMenuItem@12
-CheckMenuRadioItem@20
-CheckRadioButton@16
-ChildWindowFromPoint@12
-ChildWindowFromPointEx@16
-ClientToScreen@8
-ClipCursor@4
-CloseClipboard@0
-CloseDesktop@4
-CloseWindow@4
-CloseWindowStation@4
-CopyAcceleratorTableA@12
-CopyAcceleratorTableW@12
-CopyIcon@4
-CopyImage@20
-CopyRect@8
-CountClipboardFormats@0
-CreateAcceleratorTableA@8
-CreateAcceleratorTableW@8
-CreateCaret@16
-CreateCursor@28
-CreateDesktopA@24
-CreateDesktopW@24
-CreateDialogIndirectParamA@20
-CreateDialogIndirectParamW@20
-CreateDialogParamA@20
-CreateDialogParamW@20
-CreateIcon@28
-CreateIconFromResource@16
-CreateIconFromResourceEx@28
-CreateIconIndirect@4
-CreateMDIWindowA@40
-CreateMDIWindowW@40
-CreateMenu@0
-CreatePopupMenu@0
-CreateWindowExA@48
-CreateWindowExW@48
-CreateWindowStationA@16
-CreateWindowStationW@16
-DdeAbandonTransaction@12
-DdeAccessData@8
-DdeAddData@16
-DdeClientTransaction@32
-DdeCmpStringHandles@8
-DdeConnect@16
-DdeConnectList@20
-DdeCreateDataHandle@28
-DdeCreateStringHandleA@12
-DdeCreateStringHandleW@12
-DdeDisconnect@4
-DdeDisconnectList@4
-DdeEnableCallback@12
-DdeFreeDataHandle@4
-DdeFreeStringHandle@8
-DdeGetData@16
-DdeGetLastError@4
-DdeGetQualityOfService@12
-DdeImpersonateClient@4
-DdeInitializeA@16
-DdeInitializeW@16
-DdeKeepStringHandle@8
-DdeNameService@16
-DdePostAdvise@12
-DdeQueryConvInfo@12
-DdeQueryNextServer@8
-DdeQueryStringA@20
-DdeQueryStringW@20
-DdeReconnect@4
-DdeSetQualityOfService@12
-DdeSetUserHandle@12
-DdeUnaccessData@4
-DdeUninitialize@4
-DefDlgProcA@16
-DefDlgProcW@16
-DefFrameProcA@20
-DefFrameProcW@20
-DefMDIChildProcA@16
-DefMDIChildProcW@16
-DefRawInputProc@12
-DefWindowProcA@16
-DefWindowProcW@16
-DeferWindowPos@32
-DeleteMenu@12
-DeregisterShellHookWindow@4
-DestroyAcceleratorTable@4
-DestroyCaret@0
-DestroyCursor@4
-DestroyIcon@4
-DestroyMenu@4
-DestroyWindow@4
-DialogBoxIndirectParamA@20
-DialogBoxIndirectParamW@20
-DialogBoxParamA@20
-DialogBoxParamW@20
-DispatchMessageA@4
-DispatchMessageW@4
-DlgDirListA@20
-DlgDirListComboBoxA@20
-DlgDirListComboBoxW@20
-DlgDirListW@20
-DlgDirSelectComboBoxExA@16
-DlgDirSelectComboBoxExW@16
-DlgDirSelectExA@16
-DlgDirSelectExW@16
-DragDetect@12
-DragObject@20
-DrawAnimatedRects@16
-DrawCaption@16
-DrawEdge@16
-DrawFocusRect@8
-DrawFrame@16
-DrawFrameControl@16
-DrawIcon@16
-DrawIconEx@36
-DrawMenuBar@4
-DrawStateA@40
-DrawStateW@40
-DrawTextA@20
-DrawTextExA@24
-DrawTextExW@24
-DrawTextW@20
-EditWndProc@16
-EmptyClipboard@0
-EnableMenuItem@12
-EnableScrollBar@12
-EnableWindow@8
-EndDeferWindowPos@4
-EndDialog@8
-EndMenu@0
-EndPaint@8
-EndTask@12
-EnumChildWindows@12
-EnumClipboardFormats@4
-EnumDesktopWindows@12
-EnumDesktopsA@12
-EnumDesktopsW@12
-EnumDisplayDevicesA@16
-EnumDisplayDevicesW@16
-EnumDisplayMonitors@16
-EnumDisplaySettingsA@12
-EnumDisplaySettingsExA@16
-EnumDisplaySettingsExW@16
-EnumDisplaySettingsW@12
-EnumPropsA@8
-EnumPropsExA@12
-EnumPropsExW@12
-EnumPropsW@8
-EnumThreadWindows@12
-EnumWindowStationsA@8
-EnumWindowStationsW@8
-EnumWindows@8
-EqualRect@8
-ExcludeUpdateRgn@8
-ExitWindowsEx@8
-FillRect@12
-FindWindowA@8
-FindWindowExA@16
-FindWindowExW@16
-FindWindowW@8
-FlashWindow@8
-FlashWindowEx@4
-FrameRect@12
-FreeDDElParam@8
-GetActiveWindow@0
-GetAltTabInfo@20
-GetAltTabInfoA@20
-GetAltTabInfoW@20
-GetAncestor@8
-GetAsyncKeyState@4
-GetCapture@0
-GetCaretBlinkTime@0
-GetCaretPos@4
-GetClassInfoA@12
-GetClassInfoExA@12
-GetClassInfoExW@12
-GetClassInfoW@12
-GetClassLongA@8
-GetClassLongW@8
-GetClassNameA@12
-GetClassNameW@12
-GetClassWord@8
-GetClientRect@8
-GetClipCursor@4
-GetClipboardData@4
-GetClipboardFormatNameA@12
-GetClipboardFormatNameW@12
-GetClipboardOwner@0
-GetClipboardSequenceNumber@0
-GetClipboardViewer@0
-GetComboBoxInfo@8
-GetCursor@0
-GetCursorInfo@4
-GetCursorPos@4
-GetDC@4
-GetDCEx@12
-GetDesktopWindow@0
-GetDialogBaseUnits@0
-GetDlgCtrlID@4
-GetDlgItem@8
-GetDlgItemInt@16
-GetDlgItemTextA@16
-GetDlgItemTextW@16
-GetDoubleClickTime@0
-GetFocus@0
-GetForegroundWindow@0
-GetGUIThreadInfo@8
-GetGuiResources@8
-GetIconInfo@8
-GetInputDesktop@0
-GetInputState@0
-GetKBCodePage@0
-GetKeyNameTextA@12
-GetKeyNameTextW@12
-GetKeyState@4
-GetKeyboardLayout@4
-GetKeyboardLayoutList@8
-GetKeyboardLayoutNameA@4
-GetKeyboardLayoutNameW@4
-GetKeyboardState@4
-GetKeyboardType@4
-GetLastActivePopup@4
-GetLastInputInfo@4
-GetLayeredWindowAttributes@16
-GetListBoxInfo@4
-GetMenu@4
-GetMenuBarInfo@16
-GetMenuCheckMarkDimensions@0
-GetMenuContextHelpId@4
-GetMenuDefaultItem@12
-GetMenuInfo@8
-GetMenuItemCount@4
-GetMenuItemID@8
-GetMenuItemInfoA@16
-GetMenuItemInfoW@16
-GetMenuItemRect@16
-GetMenuState@12
-GetMenuStringA@20
-GetMenuStringW@20
-GetMessageA@16
-GetMessageExtraInfo@0
-GetMessagePos@0
-GetMessageTime@0
-GetMessageW@16
-GetMonitorInfoA@8
-GetMonitorInfoW@8
-GetMouseMovePointsEx@20
-GetNextDlgGroupItem@12
-GetNextDlgTabItem@12
-GetOpenClipboardWindow@0
-GetParent@4
-GetPriorityClipboardFormat@8
-GetProcessDefaultLayout@4
-GetProcessWindowStation@0
-GetPropA@8
-GetPropW@8
-GetRawInputBuffer@12
-GetRawInputData@20
-GetRawInputDeviceInfoA@16
-GetRawInputDeviceInfoW@16
-GetRawInputDeviceList@12
-GetRegisteredRawInputDevices@12
-GetQueueStatus@4
-GetScrollBarInfo@12
-GetScrollInfo@12
-GetScrollPos@8
-GetScrollRange@16
-GetShellWindow@0
-GetSubMenu@8
-GetSysColor@4
-GetSysColorBrush@4
-GetSystemMenu@8
-GetSystemMetrics@4
-GetTabbedTextExtentA@20
-GetTabbedTextExtentW@20
-GetThreadDesktop@4
-GetTitleBarInfo@8
-GetTopWindow@4
-GetUpdateRect@12
-GetUpdateRgn@12
-GetUserObjectInformationA@20
-GetUserObjectInformationW@20
-GetUserObjectSecurity@20
-GetWindow@8
-GetWindowContextHelpId@4
-GetWindowDC@4
-GetWindowInfo@8
-GetWindowLongA@8
-GetWindowLongW@8
-GetWindowModuleFileName@12
-GetWindowModuleFileNameA@12
-GetWindowModuleFileNameW@12
-GetWindowPlacement@8
-GetWindowRect@8
-GetWindowRgn@8
-GetWindowTextA@12
-GetWindowTextLengthA@4
-GetWindowTextLengthW@4
-GetWindowTextW@12
-GetWindowThreadProcessId@8
-GetWindowWord@8
-GrayStringA@36
-GrayStringW@36
-HideCaret@4
-HiliteMenuItem@16
-ImpersonateDdeClientWindow@8
-InSendMessage@0
-InSendMessageEx@4
-InflateRect@12
-InsertMenuA@20
-InsertMenuItemA@16
-InsertMenuItemW@16
-InsertMenuW@20
-InternalGetWindowText@12
-IntersectRect@12
-InvalidateRect@12
-InvalidateRgn@12
-InvertRect@8
-IsCharAlphaA@4
-IsCharAlphaNumericA@4
-IsCharAlphaNumericW@4
-IsCharAlphaW@4
-IsCharLowerA@4
-IsCharLowerW@4
-IsCharUpperA@4
-IsCharUpperW@4
-IsChild@8
-IsClipboardFormatAvailable@4
-IsDialogMessage@8
-IsDialogMessageA@8
-IsDialogMessageW@8
-IsDlgButtonChecked@8
-IsGUIThread@4
-IsHungAppWindow@4
-IsIconic@4
-IsMenu@4
-IsRectEmpty@4
-IsWinEventHookInstalled@4
-IsWindow@4
-IsWindowEnabled@4
-IsWindowUnicode@4
-IsWindowVisible@4
-IsZoomed@4
-KillSystemTimer@8
-KillTimer@8
-LoadAcceleratorsA@8
-LoadAcceleratorsW@8
-LoadBitmapA@8
-LoadBitmapW@8
-LoadCursorA@8
-LoadCursorFromFileA@4
-LoadCursorFromFileW@4
-LoadCursorW@8
-LoadIconA@8
-LoadIconW@8
-LoadImageA@24
-LoadImageW@24
-LoadKeyboardLayoutA@8
-LoadKeyboardLayoutW@8
-LoadMenuA@8
-LoadMenuIndirectA@4
-LoadMenuIndirectW@4
-LoadMenuW@8
-LoadStringA@16
-LoadStringW@16
-LockSetForegroundWindow@4
-LockWindowUpdate@4
-LockWorkStation@0
-LookupIconIdFromDirectory@8
-LookupIconIdFromDirectoryEx@20
-MapDialogRect@8
-MapVirtualKeyA@8
-MapVirtualKeyExA@12
-MapVirtualKeyExW@12
-MapVirtualKeyW@8
-MapWindowPoints@16
-MenuItemFromPoint@16
-MessageBeep@4
-MessageBoxA@16
-MessageBoxExA@20
-MessageBoxExW@20
-MessageBoxIndirectA@4
-MessageBoxIndirectW@4
-MessageBoxW@16
-ModifyMenuA@20
-ModifyMenuW@20
-MonitorFromPoint@12
-MonitorFromRect@8
-MonitorFromWindow@8
-MoveWindow@24
-MsgWaitForMultipleObjects@20
-MsgWaitForMultipleObjectsEx@20
-NotifyWinEvent@16
-OemKeyScan@4
-OemToCharA@8
-OemToCharBuffA@12
-OemToCharBuffW@12
-OemToCharW@8
-OffsetRect@12
-OpenClipboard@4
-OpenDesktopA@16
-OpenDesktopW@16
-OpenIcon@4
-OpenInputDesktop@12
-OpenWindowStationA@12
-OpenWindowStationW@12
-PackDDElParam@12
-PaintDesktop@4
-PeekMessageA@20
-PeekMessageW@20
-PostMessageA@16
-PostMessageW@16
-PostQuitMessage@4
-PostThreadMessageA@16
-PostThreadMessageW@16
-PrintWindow@12
-PrivateExtractIconsA@32
-PrivateExtractIconsW@32
-PtInRect@12
-RealChildWindowFromPoint@12
-RealGetWindowClassA@12
-RealGetWindowClassW@12
-RedrawWindow@16
-RegisterClassA@4
-RegisterClassExA@4
-RegisterClassExW@4
-RegisterClassW@4
-RegisterClipboardFormatA@4
-RegisterClipboardFormatW@4
-RegisterDeviceNotificationA@12
-RegisterDeviceNotificationW@12
-RegisterPowerSettingNotification@12
-RegisterHotKey@16
-RegisterRawInputDevices@12
-RegisterWindowMessageA@4
-RegisterWindowMessageW@4
-ReleaseCapture@0
-ReleaseDC@8
-RemoveMenu@12
-RemovePropA@8
-RemovePropW@8
-ReplyMessage@4
-ReuseDDElParam@20
-ScreenToClient@8
-ScrollChildren@12
-ScrollDC@28
-ScrollWindow@20
-ScrollWindowEx@32
-SendDlgItemMessageA@20
-SendDlgItemMessageW@20
-SendInput@12
-SendMessageA@16
-SendMessageCallbackA@24
-SendMessageCallbackW@24
-SendMessageTimeoutA@28
-SendMessageTimeoutW@28
-SendMessageW@16
-SendNotifyMessageA@16
-SendNotifyMessageW@16
-SetActiveWindow@4
-SetCapture@4
-SetCaretBlinkTime@4
-SetCaretPos@8
-SetClassLongA@12
-SetClassLongW@12
-SetClassWord@12
-SetClipboardData@8
-SetClipboardViewer@4
-SetCursor@4
-SetCursorPos@8
-SetDebugErrorLevel@4
-SetDeskWallpaper@4
-SetDlgItemInt@16
-SetDlgItemTextA@12
-SetDlgItemTextW@12
-SetDoubleClickTime@4
-SetFocus@4
-SetForegroundWindow@4
-SetKeyboardState@4
-SetLastErrorEx@8
-SetLayeredWindowAttributes@16
-SetMenu@8
-SetMenuContextHelpId@8
-SetMenuDefaultItem@12
-SetMenuInfo@8
-SetMenuItemBitmaps@20
-SetMenuItemInfoA@16
-SetMenuItemInfoW@16
-SetMessageExtraInfo@4
-SetMessageQueue@4
-SetParent@8
-SetProcessDefaultLayout@4
-SetProcessWindowStation@4
-SetPropA@12
-SetPropW@12
-SetRect@20
-SetRectEmpty@4
-SetScrollInfo@16
-SetScrollPos@16
-SetScrollRange@20
-SetShellWindow@4
-SetSysColors@12
-SetSystemCursor@8
-SetSystemMenu@8
-SetSystemTimer@16
-SetThreadDesktop@4
-SetTimer@16
-SetUserObjectInformationA@16
-SetUserObjectInformationW@16
-SetUserObjectSecurity@12
-SetWinEventHook@28
-SetWindowContextHelpId@8
-SetWindowLongA@12
-SetWindowLongW@12
-SetWindowPlacement@8
-SetWindowPos@28
-SetWindowRgn@12
-SetWindowTextA@8
-SetWindowTextW@8
-SetWindowWord@12
-SetWindowsHookA@8
-SetWindowsHookExA@16
-SetWindowsHookExW@16
-SetWindowsHookW@8
-ShowCaret@4
-ShowCursor@4
-ShowOwnedPopups@8
-ShowScrollBar@12
-ShowWindow@8
-ShowWindowAsync@8
-SubtractRect@12
-SwapMouseButton@4
-SwitchDesktop@4
-SwitchToThisWindow@8
-SystemParametersInfoA@16
-SystemParametersInfoW@16
-TabbedTextOutA@32
-TabbedTextOutW@32
-TileChildWindows@8
-TileWindows@20
-ToAscii@20
-ToAsciiEx@24
-ToUnicode@24
-ToUnicodeEx@28
-TrackMouseEvent@4
-TrackPopupMenu@28
-TrackPopupMenuEx@24
-TranslateAccelerator@12
-TranslateAcceleratorA@12
-TranslateAcceleratorW@12
-TranslateMDISysAccel@8
-TranslateMessage@4
-UnhookWinEvent@4
-UnhookWindowsHook@8
-UnhookWindowsHookEx@4
-UnionRect@12
-UnloadKeyboardLayout@4
-UnpackDDElParam@16
-UnregisterClassA@8
-UnregisterClassW@8
-UnregisterDeviceNotification@4
-UnregisterPowerSettingNotification@4
-UnregisterHotKey@8
-UpdateLayeredWindow@36
-UpdateWindow@4
-UserHandleGrantAccess@12
-ValidateRect@8
-ValidateRgn@8
-VkKeyScanA@4
-VkKeyScanExA@8
-VkKeyScanExW@8
-VkKeyScanW@4
-WaitForInputIdle@8
-WaitMessage@0
-WinHelpA@16
-WinHelpW@16
-WindowFromDC@4
-WindowFromPoint@8
-keybd_event@16
-mouse_event@20
-wsprintfA
-wsprintfW
-wvsprintfA@12
-wvsprintfW@12
diff --git a/winsup/w32api/lib/userenv.def b/winsup/w32api/lib/userenv.def
deleted file mode 100644
index b74cb92..0000000
--- a/winsup/w32api/lib/userenv.def
+++ /dev/null
@@ -1,11 +0,0 @@
-LIBRARY USERENV.dll
-EXPORTS
-LoadUserProfileA@8
-LoadUserProfileW@8
-UnloadUserProfile@8
-GetProfilesDirectoryA@8
-GetProfilesDirectoryW@8
-GetUserProfileDirectoryA@12
-GetUserProfileDirectoryW@12
-CreateEnvironmentBlock@12
-DestroyEnvironmentBlock@4
diff --git a/winsup/w32api/lib/usp10.def b/winsup/w32api/lib/usp10.def
deleted file mode 100755
index f4f0dea..0000000
--- a/winsup/w32api/lib/usp10.def
+++ /dev/null
@@ -1,42 +0,0 @@
-LIBRARY USP10.DLL
-EXPORTS
- ScriptApplyDigitSubstitution@12
- ScriptApplyLogicalWidth@36
- ScriptBreak@16
- ScriptCPtoX@36
- ScriptCacheGetHeight@12
- ScriptFreeCache@4
- ScriptGetCMap@24
- ScriptGetFontAlternateGlyphs@40
- ScriptGetFontFeatureTags@32
- ScriptGetFontLanguageTags@28
- ScriptGetFontProperties@12
- ScriptGetFontScriptTags@24
- ScriptGetGlyphABCWidth@16
- ScriptGetLogicalWidths@28
- ScriptGetProperties@8
- ScriptIsComplex@12
- ScriptItemize@28
- ScriptItemizeOpenType@32
- ScriptJustify@24
- ScriptLayout@16
- ScriptPlace@36
- ScriptPlaceOpenType@72
- ScriptPositionSingleGlyph@52
- ScriptRecordDigitSubstitution@8
- ScriptShape@40
- ScriptShapeOpenType@64
- ScriptStringAnalyse@52
- ScriptStringCPtoX@16
- ScriptStringFree@4
- ScriptStringGetLogicalWidths@8
- ScriptStringGetOrder@8
- ScriptStringOut@32
- ScriptStringValidate@4
- ScriptStringXtoCP@16
- ScriptString_pLogAttr@4
- ScriptString_pSize@4
- ScriptString_pcOutChars@4
- ScriptSubstituteSingleGlyph@36
- ScriptTextOut@56
- ScriptXtoCP@36
diff --git a/winsup/w32api/lib/uxtheme.def b/winsup/w32api/lib/uxtheme.def
deleted file mode 100644
index 86ce21c..0000000
--- a/winsup/w32api/lib/uxtheme.def
+++ /dev/null
@@ -1,50 +0,0 @@
-LIBRARY UxTheme.dll
-EXPORTS
-CloseThemeData@4
-DrawThemeBackground@24
-DrawThemeBackgroundEx@24
-DrawThemeEdge@32
-DrawThemeIcon@28
-DrawThemeParentBackground@12
-DrawThemeText@36
-EnableThemeDialogTexture@8
-EnableTheming@4
-GetCurrentThemeName@24
-GetThemeAppProperties@0
-GetThemeBackgroundContentRect@24
-GetThemeBackgroundExtent@24
-GetThemeBackgroundRegion@24
-GetThemeBool@20
-GetThemeColor@20
-GetThemeDocumentationProperty@16
-GetThemeEnumValue@20
-GetThemeFilename@24
-GetThemeFont@24
-GetThemeInt@20
-GetThemeIntList@20
-GetThemeMargins@28
-GetThemeMetric@24
-GetThemePartSize@28
-GetThemePosition@20
-GetThemePropertyOrigin@20
-GetThemeRect@20
-GetThemeString@24
-GetThemeSysBool@8
-GetThemeSysColor@8
-GetThemeSysColorBrush@8
-GetThemeSysFont@12
-GetThemeSysInt@12
-GetThemeSysSize@8
-GetThemeSysString@16
-GetThemeTextExtent@36
-GetThemeTextMetrics@20
-GetWindowTheme@4
-HitTestThemeBackground@40
-IsAppThemed@0
-IsThemeActive@0
-IsThemeBackgroundPartiallyTransparent@12
-IsThemeDialogTextureEnabled@4
-IsThemePartDefined@12
-OpenThemeData@8
-SetThemeAppProperties@4
-SetWindowTheme@12
diff --git a/winsup/w32api/lib/vdmdbg.def b/winsup/w32api/lib/vdmdbg.def
deleted file mode 100644
index fbd1b4f..0000000
--- a/winsup/w32api/lib/vdmdbg.def
+++ /dev/null
@@ -1,18 +0,0 @@
-LIBRARY VDMDBG.dll
-EXPORTS
-VDMBreakThread@8
-VDMDetectWOW@0
-VDMEnumProcessWOW@8
-VDMEnumTaskWOW@12
-VDMGetModuleSelector@20
-VDMGetPointer@20
-VDMGetSelectorModule@32
-VDMGetThreadContext@8
-VDMGetThreadSelectorEntry@16
-VDMGlobalFirst@24
-VDMGlobalNext@24
-VDMKillWOW@0
-VDMModuleFirst@20
-VDMModuleNext@20
-VDMProcessException@4
-VDMSetThreadContext@8
diff --git a/winsup/w32api/lib/version.def b/winsup/w32api/lib/version.def
deleted file mode 100644
index 35a087e..0000000
--- a/winsup/w32api/lib/version.def
+++ /dev/null
@@ -1,16 +0,0 @@
-LIBRARY "VERSION.dll"
-EXPORTS
-GetFileVersionInfoA@16
-GetFileVersionInfoSizeA@8
-GetFileVersionInfoSizeW@8
-GetFileVersionInfoW@16
-VerFindFileA@32
-VerFindFileW@32
-VerInstallFileA@32
-VerInstallFileW@32
-VerLanguageNameA@12
-VerLanguageNameW@12
-VerQueryValueA@16
-VerQueryValueIndexA@24
-VerQueryValueIndexW@24
-VerQueryValueW@16
diff --git a/winsup/w32api/lib/vfw32.mri b/winsup/w32api/lib/vfw32.mri
deleted file mode 100644
index ee01b12..0000000
--- a/winsup/w32api/lib/vfw32.mri
+++ /dev/null
@@ -1,6 +0,0 @@
-CREATE libvfw32.a
-ADDLIB libmsvfw32.a
-ADDLIB libavicap32.a
-ADDLIB libavifil32.a
-SAVE
-END
diff --git a/winsup/w32api/lib/win32spl.def b/winsup/w32api/lib/win32spl.def
deleted file mode 100644
index ea00cad..0000000
--- a/winsup/w32api/lib/win32spl.def
+++ /dev/null
@@ -1,16 +0,0 @@
-LIBRARY WIN32SPL.DLL
-EXPORTS
-AddPortExW@16
-AddPortW@12
-ClosePort@4
-ConfigurePortW@12
-DeletePortW@12
-EndDocPort@4
-EnumPortsW@24
-InitializeMonitor@4
-InitializePrintProvidor@12
-LibMain@12
-OpenPort@8
-ReadPort@16
-StartDocPort@20
-WritePort@16
diff --git a/winsup/w32api/lib/wininet.def b/winsup/w32api/lib/wininet.def
deleted file mode 100644
index 0bcf069..0000000
--- a/winsup/w32api/lib/wininet.def
+++ /dev/null
@@ -1,244 +0,0 @@
-; Which header declares the functions not in wininet?
-LIBRARY WININET.DLL
-EXPORTS
-CommitUrlCacheEntryA@44
-CommitUrlCacheEntryW@44
-CreateMD5SSOHash@16
-CreateUrlCacheContainerA@32
-CreateUrlCacheContainerW@32
-CreateUrlCacheEntryA@20
-CreateUrlCacheEntryW@20
-CreateUrlCacheGroup@8
-DeleteIE3Cache@16
-DeleteUrlCacheContainerA@8
-DeleteUrlCacheContainerW@8
-DeleteUrlCacheEntry@4
-DeleteUrlCacheEntryA@4
-DeleteUrlCacheEntryW@4
-DeleteUrlCacheGroup@16
-DetectAutoProxyUrl@12
-DoConnectoidsExist@0
-ExportCookieFileA@8
-ExportCookieFileW@8
-FindCloseUrlCache@4
-FindFirstUrlCacheContainerA@16
-FindFirstUrlCacheContainerW@16
-FindFirstUrlCacheEntryA@12
-FindFirstUrlCacheEntryExA@40
-FindFirstUrlCacheEntryExW@40
-FindFirstUrlCacheEntryW@12
-FindFirstUrlCacheGroup@24
-FindNextUrlCacheContainerA@12
-FindNextUrlCacheContainerW@12
-FindNextUrlCacheEntryA@12
-FindNextUrlCacheEntryExA@24
-FindNextUrlCacheEntryExW@24
-FindNextUrlCacheEntryW@12
-FindNextUrlCacheGroup@12
-FindP3PPolicySymbol@4
-ForceNexusLookup@0
-ForceNexusLookupExW@20
-FreeP3PObject@4
-FreeUrlCacheSpaceA@12
-FreeUrlCacheSpaceW@12
-FtpCommandA@24
-FtpCommandW@24
-FtpCreateDirectoryA@8
-FtpCreateDirectoryW@8
-FtpDeleteFileA@8
-FtpDeleteFileW@8
-FtpFindFirstFileA@20
-FtpFindFirstFileW@20
-FtpGetCurrentDirectoryA@12
-FtpGetCurrentDirectoryW@12
-FtpGetFileA@28
-FtpGetFileEx@28
-FtpGetFileSize@8
-FtpGetFileW@28
-FtpOpenFileA@20
-FtpOpenFileW@20
-FtpPutFileA@20
-FtpPutFileEx@20
-FtpPutFileW@20
-FtpRemoveDirectoryA@8
-FtpRemoveDirectoryW@8
-FtpRenameFileA@12
-FtpRenameFileW@12
-FtpSetCurrentDirectoryA@8
-FtpSetCurrentDirectoryW@8
-GetDiskInfoA@16
-GetP3PPolicy@16
-GetP3PRequestStatus@4
-GetUrlCacheConfigInfoA@12
-GetUrlCacheConfigInfoW@12
-GetUrlCacheEntryInfoA@12
-GetUrlCacheEntryInfoExA@28
-GetUrlCacheEntryInfoExW@28
-GetUrlCacheEntryInfoW@12
-GetUrlCacheGroupAttributeA@28
-GetUrlCacheGroupAttributeW@28
-GetUrlCacheHeaderData@8
-GopherCreateLocatorA@28
-GopherCreateLocatorW@28
-GopherFindFirstFileA@24
-GopherFindFirstFileW@24
-GopherGetAttributeA@32
-GopherGetAttributeW@32
-GopherGetLocatorTypeA@8
-GopherGetLocatorTypeW@8
-GopherOpenFileA@20
-GopherOpenFileW@20
-HttpAddRequestHeadersA@16
-HttpAddRequestHeadersW@16
-HttpCheckDavCompliance@20
-HttpCheckDavComplianceA@20
-HttpCheckDavComplianceW@20
-HttpEndRequestA@16
-HttpEndRequestW@16
-HttpOpenRequestA@32
-HttpOpenRequestW@32
-HttpQueryInfoA@20
-HttpQueryInfoW@20
-HttpSendRequestA@20
-HttpSendRequestExA@20
-HttpSendRequestExW@20
-HttpSendRequestW@20
-ImportCookieFileA@4
-ImportCookieFileW@4
-IncrementUrlCacheHeaderData@8
-InternetAlgIdToStringA@16
-InternetAlgIdToStringW@16
-InternetAttemptConnect@4
-InternetAutodial@8
-InternetAutodialCallback@8
-InternetAutodialHangup@4
-InternetCanonicalizeUrlA@16
-InternetCanonicalizeUrlW@16
-InternetCheckConnectionA@12
-InternetCheckConnectionW@12
-InternetClearAllPerSiteCookieDecisions@0
-InternetCloseHandle@4
-InternetCombineUrlA@20
-InternetCombineUrlW@20
-InternetConfirmZoneCrossing@16
-InternetConfirmZoneCrossingA@16
-InternetConfirmZoneCrossingW@16
-InternetConnectA@32
-InternetConnectW@32
-InternetCrackUrlA@16
-InternetCrackUrlW@16
-InternetCreateUrlA@16
-InternetCreateUrlW@16
-;InternetDebugGetLocalTime@8
-InternetDial@20
-InternetDialA@20
-InternetDialW@20
-InternetEnumPerSiteCookieDecisionA@16
-InternetEnumPerSiteCookieDecisionW@16
-InternetErrorDlg@20
-InternetFindNextFileA@8
-InternetFindNextFileW@8
-InternetFortezzaCommand@12
-InternetGetCertByURL@12
-InternetGetCertByURLA@12
-InternetGetConnectedState@8
-InternetGetConnectedStateEx@16
-InternetGetConnectedStateExA@16
-InternetGetConnectedStateExW@16
-InternetGetCookieA@16
-InternetGetCookieExA@24
-InternetGetCookieExW@24
-InternetGetCookieW@16
-InternetGetLastResponseInfoA@12
-InternetGetLastResponseInfoW@12
-InternetGetPerSiteCookieDecisionA@8
-InternetGetPerSiteCookieDecisionW@8
-InternetGoOnline@12
-InternetGoOnlineA@12
-InternetGoOnlineW@12
-InternetHangUp@8
-InternetInitializeAutoProxyDll@4
-InternetLockRequestFile@8
-InternetOpenA@20
-InternetOpenUrlA@24
-InternetOpenUrlW@24
-InternetOpenW@20
-InternetQueryDataAvailable@16
-InternetQueryFortezzaStatus@8
-InternetQueryOptionA@16
-InternetQueryOptionW@16
-InternetReadFile@16
-InternetReadFileExA@16
-InternetReadFileExW@16
-InternetSecurityProtocolToStringA@16
-InternetSecurityProtocolToStringW@16
-InternetSetCookieA@12
-InternetSetCookieExA@20
-InternetSetCookieExW@20
-InternetSetCookieW@12
-InternetSetDialState@12
-InternetSetDialStateA@12
-InternetSetDialStateW@12
-InternetSetFilePointer@20
-InternetSetOptionA@16
-InternetSetOptionExA@20
-InternetSetOptionExW@20
-InternetSetOptionW@16
-InternetSetPerSiteCookieDecisionA@8
-InternetSetPerSiteCookieDecisionW@8
-InternetSetStatusCallback@8
-InternetSetStatusCallbackA@8
-InternetSetStatusCallbackW@8
-InternetShowSecurityInfoByURL@8
-InternetShowSecurityInfoByURLA@8
-InternetShowSecurityInfoByURLW@8
-InternetTimeFromSystemTime@16
-InternetTimeFromSystemTimeA@16
-InternetTimeFromSystemTimeW@16
-InternetTimeToSystemTime@12
-InternetTimeToSystemTimeA@12
-InternetTimeToSystemTimeW@12
-InternetUnlockRequestFile@4
-InternetWriteFile@16
-InternetWriteFileExA@16
-InternetWriteFileExW@16
-IsDomainLegalCookieDomainA@8
-IsDomainLegalCookieDomainW@8
-IsHostInProxyBypassList@12
-IsProfilesEnabled@0
-IsUrlCacheEntryExpiredA@12
-IsUrlCacheEntryExpiredW@12
-LoadUrlCacheContent@0
-MapResourceToPolicy@16
-ParseX509EncodedCertificateForListBoxEntry@16
-PerformOperationOverUrlCacheA@40
-PrivacyGetZonePreferenceW@20
-PrivacySetZonePreferenceW@16
-ReadUrlCacheEntryStream@20
-RegisterUrlCacheNotification@24
-ResumeSuspendedDownload@8
-RetrieveUrlCacheEntryFileA@16
-RetrieveUrlCacheEntryFileW@16
-RetrieveUrlCacheEntryStreamA@20
-RetrieveUrlCacheEntryStreamW@20
-RunOnceUrlCache@16
-SetUrlCacheConfigInfoA@8
-SetUrlCacheConfigInfoW@8
-SetUrlCacheEntryGroup@28
-SetUrlCacheEntryGroupA@28
-SetUrlCacheEntryGroupW@28
-SetUrlCacheEntryInfoA@12
-SetUrlCacheEntryInfoW@12
-SetUrlCacheGroupAttributeA@24
-SetUrlCacheGroupAttributeW@24
-SetUrlCacheHeaderData@8
-ShowCertificate@8
-ShowClientAuthCerts@4
-ShowSecurityInfo@8
-ShowX509EncodedCertificate@12
-UnlockUrlCacheEntryFile@8
-UnlockUrlCacheEntryFileA@8
-UnlockUrlCacheEntryFileW@8
-UnlockUrlCacheEntryStream@8
-UpdateUrlCacheContentPath@4
-UrlZonesDetach@0
diff --git a/winsup/w32api/lib/winmm.def b/winsup/w32api/lib/winmm.def
deleted file mode 100644
index 4de3638..0000000
--- a/winsup/w32api/lib/winmm.def
+++ /dev/null
@@ -1,196 +0,0 @@
-LIBRARY WINMM.DLL
-EXPORTS
-CloseDriver@12
-DefDriverProc@20
-DriverCallback@28
-DrvGetModuleHandle@4
-GetDriverModuleHandle@4
-NotifyCallbackData@20
-OpenDriver@12
-PlaySound@12
-PlaySoundA@12
-PlaySoundW@12
-SendDriverMessage@16
-WOW32DriverCallback@28
-WOW32ResolveMultiMediaHandle@24
-WOWAppExit@4
-aux32Message@20
-auxGetDevCapsA@12
-auxGetDevCapsW@12
-auxGetNumDevs@0
-auxGetVolume@8
-auxOutMessage@16
-auxSetVolume@8
-joy32Message@20
-joyConfigChanged@4
-joyGetDevCapsA@12
-joyGetDevCapsW@12
-joyGetNumDevs@0
-joyGetPos@8
-joyGetPosEx@8
-joyGetThreshold@8
-joyReleaseCapture@4
-joySetCapture@16
-joySetThreshold@8
-mci32Message@20
-mciDriverNotify@12
-mciDriverYield@4
-mciExecute@4
-mciFreeCommandResource@4
-mciGetCreatorTask@4
-mciGetDeviceIDA@4
-mciGetDeviceIDFromElementIDA@8
-mciGetDeviceIDFromElementIDW@8
-mciGetDeviceIDW@4
-mciGetDriverData@4
-mciGetErrorStringA@12
-mciGetErrorStringW@12
-mciGetYieldProc@8
-mciLoadCommandResource@12
-mciSendCommandA@16
-mciSendCommandW@16
-mciSendStringA@16
-mciSendStringW@16
-mciSetDriverData@8
-mciSetYieldProc@12
-mid32Message@20
-midiConnect@12
-midiDisconnect@12
-midiInAddBuffer@12
-midiInClose@4
-midiInGetDevCapsA@12
-midiInGetDevCapsW@12
-midiInGetErrorTextA@12
-midiInGetErrorTextW@12
-midiInGetID@8
-midiInGetNumDevs@0
-midiInMessage@16
-midiInOpen@20
-midiInPrepareHeader@12
-midiInReset@4
-midiInStart@4
-midiInStop@4
-midiInUnprepareHeader@12
-midiOutCacheDrumPatches@16
-midiOutCachePatches@16
-midiOutClose@4
-midiOutGetDevCapsA@12
-midiOutGetDevCapsW@12
-midiOutGetErrorTextA@12
-midiOutGetErrorTextW@12
-midiOutGetID@8
-midiOutGetNumDevs@0
-midiOutGetVolume@8
-midiOutLongMsg@12
-midiOutMessage@16
-midiOutOpen@20
-midiOutPrepareHeader@12
-midiOutReset@4
-midiOutSetVolume@8
-midiOutShortMsg@8
-midiOutUnprepareHeader@12
-midiStreamClose@4
-midiStreamOpen@24
-midiStreamOut@12
-midiStreamPause@4
-midiStreamPosition@12
-midiStreamProperty@12
-midiStreamRestart@4
-midiStreamStop@4
-mixerClose@4
-mixerGetControlDetailsA@12
-mixerGetControlDetailsW@12
-mixerGetDevCapsA@12
-mixerGetDevCapsW@12
-mixerGetID@12
-mixerGetLineControlsA@12
-mixerGetLineControlsW@12
-mixerGetLineInfoA@12
-mixerGetLineInfoW@12
-mixerGetNumDevs@0
-mixerMessage@16
-mixerOpen@20
-mixerSetControlDetails@12
-mmDrvInstall@12
-mmGetCurrentTask@0
-mmTaskBlock@4
-mmTaskCreate@12
-mmTaskSignal@4
-mmTaskYield@0
-mmioAdvance@12
-mmioAscend@12
-mmioClose@8
-mmioCreateChunk@12
-mmioDescend@16
-mmioFlush@8
-mmioGetInfo@12
-mmioInstallIOProcA@12
-mmioInstallIOProcW@12
-mmioOpenA@12
-mmioOpenW@12
-mmioRead@12
-mmioRenameA@16
-mmioRenameW@16
-mmioSeek@12
-mmioSendMessage@16
-mmioSetBuffer@16
-mmioSetInfo@12
-mmioStringToFOURCCA@8
-mmioStringToFOURCCW@8
-mmioWrite@12
-mmsystemGetVersion@0
-mod32Message@20
-mxd32Message@20
-sndPlaySoundA@8
-sndPlaySoundW@8
-tid32Message@20
-timeBeginPeriod@4
-timeEndPeriod@4
-timeGetDevCaps@8
-timeGetSystemTime@8
-timeGetTime@0
-timeKillEvent@4
-timeSetEvent@20
-waveInAddBuffer@12
-waveInClose@4
-waveInGetDevCapsA@12
-waveInGetDevCapsW@12
-waveInGetErrorTextA@12
-waveInGetErrorTextW@12
-waveInGetID@8
-waveInGetNumDevs@0
-waveInGetPosition@12
-waveInMessage@16
-waveInOpen@24
-waveInPrepareHeader@12
-waveInReset@4
-waveInStart@4
-waveInStop@4
-waveInUnprepareHeader@12
-waveOutBreakLoop@4
-waveOutClose@4
-waveOutGetDevCapsA@12
-waveOutGetDevCapsW@12
-waveOutGetErrorTextA@12
-waveOutGetErrorTextW@12
-waveOutGetID@8
-waveOutGetNumDevs@0
-waveOutGetPitch@8
-waveOutGetPlaybackRate@8
-waveOutGetPosition@12
-waveOutGetVolume@8
-waveOutMessage@16
-waveOutOpen@24
-waveOutPause@4
-waveOutPrepareHeader@12
-waveOutReset@4
-waveOutRestart@4
-waveOutSetPitch@8
-waveOutSetPlaybackRate@8
-waveOutSetVolume@8
-waveOutUnprepareHeader@12
-waveOutWrite@12
-wid32Message@20
-winmmDbgOut
-winmmSetDebugLevel@4
-wod32Message@20
diff --git a/winsup/w32api/lib/winspool.def b/winsup/w32api/lib/winspool.def
deleted file mode 100644
index b6375b1..0000000
--- a/winsup/w32api/lib/winspool.def
+++ /dev/null
@@ -1,133 +0,0 @@
-LIBRARY WINSPOOL.DRV
-EXPORTS
-ADVANCEDSETUPDIALOG@16
-AbortPrinter@4
-AddFormA@12
-AddFormW@12
-AddJobA@20
-AddJobW@20
-AddMonitorA@12
-AddMonitorW@12
-AddPortA@12
-AddPortExA@16
-AddPortExW@16
-AddPortW@12
-AddPrintProcessorA@16
-AddPrintProcessorW@16
-AddPrintProvidorA@12
-AddPrintProvidorW@12
-AddPrinterA@12
-AddPrinterConnectionA@4
-AddPrinterConnectionW@4
-AddPrinterDriverA@12
-AddPrinterDriverW@12
-AddPrinterW@12
-AdvancedDocumentPropertiesA@20
-AdvancedDocumentPropertiesW@20
-AdvancedSetupDialog@16
-ClosePrinter@4
-ConfigurePortA@12
-ConfigurePortW@12
-ConnectToPrinterDlg@8
-CreatePrinterIC@8
-DEVICECAPABILITIES@20
-DEVICEMODE@16
-DeleteFormA@8
-DeleteFormW@8
-DeleteMonitorA@12
-DeleteMonitorW@12
-DeletePortA@12
-DeletePortW@12
-DeletePrinterDataA@8
-DeletePrinterDataW@8
-DeletePrintProcessorA@12
-DeletePrintProcessorW@12
-DeletePrintProvidorA@12
-DeletePrintProvidorW@12
-DeletePrinter@4
-DeletePrinterConnectionA@4
-DeletePrinterConnectionW@4
-DeletePrinterDriverA@12
-DeletePrinterDriverW@12
-DeletePrinterIC@4
-DevQueryPrint@12
-DeviceCapabilities@20
-DeviceCapabilitiesA@20
-DeviceCapabilitiesW@20
-DeviceMode@16
-DocumentEvent@28
-DocumentPropertiesA@24
-DocumentPropertiesW@24
-EXTDEVICEMODE@32
-EndDocPrinter@4
-EndPagePrinter@4
-EnumFormsA@24
-EnumFormsW@24
-EnumJobsA@32
-EnumJobsW@32
-EnumMonitorsA@24
-EnumMonitorsW@24
-EnumPortsA@24
-EnumPortsW@24
-EnumPrintProcessorDatatypesA@28
-EnumPrintProcessorDatatypesW@28
-EnumPrintProcessorsA@28
-EnumPrintProcessorsW@28
-EnumPrinterDriversA@28
-EnumPrinterDriversW@28
-EnumPrinterPropertySheets@16
-EnumPrintersA@28
-EnumPrintersW@28
-EnumPrinterDataA@36
-EnumPrinterDataW@36
-ExtDeviceMode@32
-FindClosePrinterChangeNotification@4
-FindFirstPrinterChangeNotification@16
-FindNextPrinterChangeNotification@16
-FreePrinterNotifyInfo@4
-GetDefaultPrinterA@8
-GetDefaultPrinterW@8
-GetFormA@24
-GetFormW@24
-GetJobA@24
-GetJobW@24
-GetPrintProcessorDirectoryA@24
-GetPrintProcessorDirectoryW@24
-GetPrinterA@20
-GetPrinterDataA@24
-GetPrinterDataW@24
-GetPrinterDriverA@24
-GetPrinterDriverDirectoryA@24
-GetPrinterDriverDirectoryW@24
-GetPrinterDriverW@24
-GetPrinterW@20
-InitializeDll@12
-OpenPrinterA@12
-OpenPrinterW@12
-PlayGdiScriptOnPrinterIC@24
-PrinterMessageBoxA@24
-PrinterMessageBoxW@24
-PrinterProperties@8
-ReadPrinter@16
-ResetPrinterA@8
-ResetPrinterW@8
-ScheduleJob@8
-SetAllocFailCount@20
-SetFormA@16
-SetFormW@16
-SetJobA@20
-SetJobW@20
-SetPort@16
-SetPrinterA@16
-SetPrinterDataA@20
-SetPrinterDataW@20
-SetPrinterW@16
-SpoolerDevQueryPrintW@20
-SpoolerInit@0
-StartDocDlgA@8
-StartDocDlgW@8
-StartDocPrinterA@12
-StartDocPrinterW@12
-StartPagePrinter@4
-WaitForPrinterChange@8
-WritePrinter@16
diff --git a/winsup/w32api/lib/winstrm.def b/winsup/w32api/lib/winstrm.def
deleted file mode 100644
index 27531a0..0000000
--- a/winsup/w32api/lib/winstrm.def
+++ /dev/null
@@ -1,9 +0,0 @@
-LIBRARY WINSTRM.DLL
-EXPORTS
-OpenStream@4
-getmsg@16
-poll@12
-putmsg@16
-s_ioctl@12
-s_open@12
-s_perror@8
diff --git a/winsup/w32api/lib/wldap32.def b/winsup/w32api/lib/wldap32.def
deleted file mode 100644
index 8f3f90d..0000000
--- a/winsup/w32api/lib/wldap32.def
+++ /dev/null
@@ -1,257 +0,0 @@
-;
-; wldap32.def - Import definition file for the Windows LDAP API
-;
-; Written by Filip Navara <xnavara@volny.cz>
-;
-; This library is distributed in the hope that it will be useful,
-; but WITHOUT ANY WARRANTY; without even the implied warranty of
-; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-;
-
-LIBRARY wldap32.dll
-EXPORTS
- ldap_abandon
- ldap_add
- ldap_get_optionW
- ldap_unbind
- ldap_set_optionW
- LdapGetLastError
- cldap_open
- LdapMapErrorToWin32
- ldap_compare
- ldap_delete
- ldap_result2error
- ldap_err2string
- ldap_modify
- ldap_modrdn
- ldap_open
- ldap_first_entry
- ldap_next_entry
- cldap_openW
- LdapUTF8ToUnicode
- ldap_get_dn
- ldap_dn2ufn
- ldap_first_attribute
- ldap_next_attribute
- ldap_get_values
- ldap_get_values_len
- ldap_count_entries
- ldap_count_values
- ldap_value_free
- ldap_explode_dn
- ldap_result
- ldap_msgfree
- ldap_addW
- ldap_search
- ldap_add_s
- ldap_bind_s
- ldap_unbind_s
- ldap_delete_s
- ldap_modify_s
- ldap_modrdn_s
- ldap_search_s
- ldap_search_st
- ldap_compare_s
- LdapUnicodeToUTF8
- ber_bvfree
- cldap_openA
- ldap_addA
- ldap_add_ext
- ldap_add_extA
- ldap_simple_bind
- ldap_simple_bind_s
- ldap_bind
- ldap_add_extW
- ldap_add_ext_s
- ldap_add_ext_sA
- ldap_add_ext_sW
- ldap_add_sA
- ldap_modrdn2
- ldap_modrdn2_s
- ldap_add_sW
- ldap_bindA
- ldap_bindW
- ldap_bind_sA
- ldap_bind_sW
- ldap_close_extended_op
- ldap_compareA
- ldap_compareW
- ldap_count_values_len
- ldap_compare_ext
- ldap_value_free_len
- ldap_compare_extA
- ldap_compare_extW
- ldap_perror
- ldap_compare_ext_s
- ldap_compare_ext_sA
- ldap_compare_ext_sW
- ldap_compare_sA
- ldap_compare_sW
- ldap_connect
- ldap_control_free
- ldap_control_freeA
- ldap_control_freeW
- ldap_controls_free
- ldap_controls_freeA
- ldap_controls_freeW
- ldap_count_references
- ldap_count_valuesA
- ldap_count_valuesW
- ldap_create_page_control
- ldap_create_page_controlA
- ldap_create_page_controlW
- ldap_create_sort_control
- ldap_create_sort_controlA
- ldap_create_sort_controlW
- ldap_deleteA
- ldap_deleteW
- ldap_delete_ext
- ldap_delete_extA
- ldap_delete_extW
- ldap_delete_ext_s
- ldap_delete_ext_sA
- ldap_delete_ext_sW
- ldap_delete_sA
- ldap_delete_sW
- ldap_dn2ufnW
- ldap_encode_sort_controlA
- ldap_encode_sort_controlW
- ldap_err2stringA
- ldap_err2stringW
- ldap_escape_filter_elementA
- ldap_escape_filter_elementW
- ldap_explode_dnA
- ldap_explode_dnW
- ldap_extended_operation
- ldap_extended_operationA
- ldap_extended_operationW
- ldap_first_attributeA
- ldap_first_attributeW
- ldap_first_reference
- ldap_free_controls
- ldap_free_controlsA
- ldap_free_controlsW
- ldap_get_dnA
- ldap_get_dnW
- ldap_get_next_page
- ldap_get_next_page_s
- ldap_get_option
- ldap_get_optionA
- ldap_get_paged_count
- ldap_get_valuesA
- ldap_get_valuesW
- ldap_get_values_lenA
- ldap_get_values_lenW
- ldap_init
- ldap_initA
- ldap_initW
- ldap_memfreeA
- ldap_memfreeW
- ldap_modifyA
- ldap_modifyW
- ldap_modify_ext
- ldap_modify_extA
- ldap_modify_extW
- ldap_modify_ext_s
- ldap_modify_ext_sA
- ldap_modify_ext_sW
- ldap_modify_sA
- ldap_modify_sW
- ldap_modrdn2A
- ldap_modrdn2W
- ldap_modrdn2_sA
- ldap_modrdn2_sW
- ldap_modrdnA
- ldap_modrdnW
- ldap_modrdn_sA
- ldap_modrdn_sW
- ldap_next_attributeA
- ldap_next_attributeW
- ldap_next_reference
- ldap_openA
- ldap_openW
- ldap_parse_page_control
- ldap_parse_page_controlA
- ldap_parse_page_controlW
- ldap_parse_reference
- ldap_parse_referenceA
- ldap_parse_referenceW
- ldap_parse_result
- ldap_parse_resultA
- ldap_parse_resultW
- ldap_parse_sort_control
- ldap_parse_sort_controlA
- ldap_parse_sort_controlW
- ldap_rename_ext
- ldap_rename_extA
- ldap_rename_extW
- ldap_rename_ext_s
- ldap_rename_ext_sA
- ldap_rename_ext_sW
- ldap_searchA
- ldap_searchW
- ldap_search_abandon_page
- ldap_search_ext
- ldap_search_extA
- ldap_search_extW
- ldap_search_ext_s
- ldap_search_ext_sA
- ldap_escape_filter_element
- ldap_set_dbg_flags
- ldap_set_dbg_routine
- ldap_memfree
- ldap_startup
- ldap_cleanup
- ldap_search_ext_sW
- ldap_search_init_page
- ldap_search_init_pageA
- ldap_search_init_pageW
- ldap_search_sA
- ldap_search_sW
- ldap_search_stA
- ldap_search_stW
- ldap_set_option
- ldap_set_optionA
- ldap_simple_bindA
- ldap_simple_bindW
- ldap_simple_bind_sA
- ldap_simple_bind_sW
- ldap_sslinit
- ldap_sslinitA
- ldap_sslinitW
- ldap_ufn2dn
- ldap_ufn2dnA
- ldap_ufn2dnW
- ldap_value_freeA
- ldap_value_freeW
- ldap_check_filterA
- ldap_check_filterW
- ldap_dn2ufnA
- ber_init
- ber_free
- ber_bvecfree
- ber_bvdup
- ber_alloc_t
- ber_skip_tag
- ber_peek_tag
- ber_first_element
- ber_next_element
- ber_flatten
- ber_printf
- ber_scanf
- ldap_conn_from_msg
- ldap_sasl_bindW
- ldap_sasl_bind_sW
- ldap_sasl_bindA
- ldap_sasl_bind_sA
- ldap_parse_extended_resultW
- ldap_parse_extended_resultA
- ldap_create_vlv_controlW
- ldap_create_vlv_controlA
- ldap_parse_vlv_controlW
- ldap_parse_vlv_controlA
- ldap_start_tls_sW
- ldap_start_tls_sA
- ldap_stop_tls_s
- ldap_extended_operation_sW
- ldap_extended_operation_sA
diff --git a/winsup/w32api/lib/wow32.def b/winsup/w32api/lib/wow32.def
deleted file mode 100644
index cd814c6..0000000
--- a/winsup/w32api/lib/wow32.def
+++ /dev/null
@@ -1,19 +0,0 @@
-LIBRARY WOW32.DLL
-EXPORTS
-WOWCallback16@8
-WOWCallback16Ex@20
-WOWDirectedYield16@4
-WOWGetDescriptor@8
-WOWGetVDMPointer@12
-WOWGetVDMPointerFix@12
-WOWGetVDMPointerUnfix@4
-WOWGlobalAlloc16@8
-WOWGlobalAllocLock16@12
-WOWGlobalFree16@4
-WOWGlobalLock16@4
-WOWGlobalLockSize16@8
-WOWGlobalUnlock16@4
-WOWGlobalUnlockFree16@4
-WOWHandle16@8
-WOWHandle32@8
-WOWYield16@0
diff --git a/winsup/w32api/lib/ws2_32.c b/winsup/w32api/lib/ws2_32.c
deleted file mode 100755
index 9584f81..0000000
--- a/winsup/w32api/lib/ws2_32.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <winsock2.h>
-#include <ws2tcpip.h>
-
-/* IPv6 constants for use in structure assignments (RFC 2553). */
-const struct in6_addr in6addr_any = {{ IN6ADDR_ANY_INIT }};
-const struct in6_addr in6addr_loopback = {{ IN6ADDR_LOOPBACK_INIT }};
diff --git a/winsup/w32api/lib/ws2_32.def b/winsup/w32api/lib/ws2_32.def
deleted file mode 100644
index 05160bd..0000000
--- a/winsup/w32api/lib/ws2_32.def
+++ /dev/null
@@ -1,112 +0,0 @@
-LIBRARY WS2_32.DLL
-EXPORTS
-WEP@0
-WPUCompleteOverlappedRequest@20
-WSAAccept@20
-WSAAddressToStringA@20
-WSAAddressToStringW@20
-WSAAsyncGetHostByAddr@28
-WSAAsyncGetHostByName@20
-WSAAsyncGetProtoByName@20
-WSAAsyncGetProtoByNumber@20
-WSAAsyncGetServByName@24
-WSAAsyncGetServByPort@24
-WSAAsyncSelect@16
-WSACancelAsyncRequest@4
-WSACancelBlockingCall@0
-WSACleanup@0
-WSACloseEvent@4
-WSAConnect@28
-WSACreateEvent@0
-WSADuplicateSocketA@12
-WSADuplicateSocketW@12
-WSAEnumNameSpaceProvidersA@8
-WSAEnumNameSpaceProvidersW@8
-WSAEnumNetworkEvents@12
-WSAEnumProtocolsA@12
-WSAEnumProtocolsW@12
-WSAEventSelect@12
-WSAGetLastError@0
-WSAGetOverlappedResult@20
-WSAGetQOSByName@12
-WSAGetServiceClassInfoA@16
-WSAGetServiceClassInfoW@16
-WSAGetServiceClassNameByClassIdA@12
-WSAGetServiceClassNameByClassIdW@12
-WSAHtonl@12
-WSAHtons@12
-WSAInstallServiceClassA@4
-WSAInstallServiceClassW@4
-WSAIoctl@36
-WSAIsBlocking@0
-WSAJoinLeaf@32
-WSALookupServiceBeginA@12
-WSALookupServiceBeginW@12
-WSALookupServiceEnd@4
-WSALookupServiceNextA@16
-WSALookupServiceNextW@16
-WSANtohl@12
-WSANtohs@12
-WSANSPIoctl@32
-WSAProviderConfigChange@12
-WSARecv@28
-WSARecvDisconnect@8
-WSARecvFrom@36
-WSARemoveServiceClass@4
-WSAResetEvent@4
-WSASend@28
-WSASendDisconnect@8
-WSASendTo@36
-WSASetBlockingHook@4
-WSASetEvent@4
-WSASetLastError@4
-WSASetServiceA@12
-WSASetServiceW@12
-WSASocketA@24
-WSASocketW@24
-WSAStartup@8
-WSAStringToAddressA@20
-WSAStringToAddressW@20
-WSAUnhookBlockingHook@0
-WSAWaitForMultipleEvents@20
-WSCDeinstallProvider@8
-WSCEnableNSProvider@8
-WSCEnumProtocols@16
-WSCGetProviderPath@16
-WSCInstallNameSpace@20
-WSCInstallProvider@20
-WSCUnInstallNameSpace@4
-__WSAFDIsSet@8
-accept@12
-bind@12
-closesocket@4
-connect@12
-freeaddrinfo@4
-getaddrinfo@16
-gethostbyaddr@12
-gethostbyname@4
-gethostname@8
-getnameinfo@28
-getpeername@12
-getprotobyname@4
-getprotobynumber@4
-getservbyname@8
-getservbyport@8
-getsockname@12
-getsockopt@20
-htonl@4
-htons@4
-inet_addr@4
-inet_ntoa@4
-ioctlsocket@12
-listen@8
-ntohl@4
-ntohs@4
-recv@16
-recvfrom@24
-select@20
-send@16
-sendto@24
-setsockopt@20
-shutdown@8
-socket@12
diff --git a/winsup/w32api/lib/wsnmp32.def b/winsup/w32api/lib/wsnmp32.def
deleted file mode 100644
index d209d89..0000000
--- a/winsup/w32api/lib/wsnmp32.def
+++ /dev/null
@@ -1,48 +0,0 @@
-LIBRARY wsnmp32.dll
-EXPORTS
-SnmpCancelMsg@8
-SnmpCleanup@0
-SnmpClose@4
-SnmpContextToStr@8
-SnmpCountVbl@4
-SnmpCreatePdu@24
-SnmpCreateSession@16
-SnmpCreateVbl@12
-SnmpDecodeMsg@24
-SnmpDeleteVb@8
-SnmpDuplicatePdu@8
-SnmpDuplicateVbl@8
-SnmpEncodeMsg@24
-SnmpEntityToStr@12
-SnmpFreeContext@4
-SnmpFreeDescriptor@8
-SnmpFreeEntity@4
-SnmpFreePdu@4
-SnmpFreeVbl@4
-SnmpGetLastError@4
-SnmpGetPduData@24
-SnmpGetRetransmitMode@4
-SnmpGetRetry@12
-SnmpGetTimeout@12
-SnmpGetTranslateMode@4
-SnmpGetVb@16
-SnmpGetVendorInfo@4
-SnmpListen@8
-SnmpOidCompare@16
-SnmpOidCopy@8
-SnmpOidToStr@12
-SnmpOpen@8
-SnmpRecvMsg@20
-SnmpRegister@24
-SnmpSendMsg@20
-SnmpSetPduData@24
-SnmpSetPort@8
-SnmpSetRetransmitMode@4
-SnmpSetRetry@8
-SnmpSetTimeout@8
-SnmpSetTranslateMode@4
-SnmpSetVb@16
-SnmpStartup@20
-SnmpStrToContext@8
-SnmpStrToEntity@8
-SnmpStrToOid@8
diff --git a/winsup/w32api/lib/wsock32.def b/winsup/w32api/lib/wsock32.def
deleted file mode 100644
index 67a8a75..0000000
--- a/winsup/w32api/lib/wsock32.def
+++ /dev/null
@@ -1,75 +0,0 @@
-LIBRARY WSOCK32.DLL
-EXPORTS
-AcceptEx@32
-EnumProtocolsA@12
-EnumProtocolsW@12
-GetAcceptExSockaddrs@32
-GetAddressByNameA@40
-GetAddressByNameW@40
-GetNameByTypeA@12
-GetNameByTypeW@12
-GetServiceA@28
-GetServiceW@28
-GetTypeByNameA@8
-GetTypeByNameW@8
-NPLoadNameSpaces@12
-SetServiceA@24
-SetServiceW@24
-TransmitFile@28
-WSAAsyncGetHostByAddr@28
-WSAAsyncGetHostByName@20
-WSAAsyncGetProtoByName@20
-WSAAsyncGetProtoByNumber@20
-WSAAsyncGetServByName@24
-WSAAsyncGetServByPort@24
-WSAAsyncSelect@16
-WSACancelAsyncRequest@4
-WSACancelBlockingCall@0
-WSACleanup@0
-WSAGetLastError@0
-WSAIsBlocking@0
-WSARecvEx@16
-WSASetBlockingHook@4
-WSASetLastError@4
-WSAStartup@8
-WSAUnhookBlockingHook@0
-WSApSetPostRoutine@4
-__WSAFDIsSet@8
-accept@12
-bind@12
-closesocket@4
-connect@12
-dn_expand@20
-gethostbyaddr@12
-gethostbyname@4
-gethostname@8
-getnetbyname@4
-getpeername@12
-getprotobyname@4
-getprotobynumber@4
-getservbyname@8
-getservbyport@8
-getsockname@12
-getsockopt@20
-htonl@4
-htons@4
-inet_addr@4
-inet_network@4
-inet_ntoa@4
-ioctlsocket@12
-listen@8
-ntohl@4
-ntohs@4
-rcmd@24
-recv@16
-recvfrom@24
-rexec@24
-rresvport@4
-s_perror@8
-select@20
-send@16
-sendto@24
-sethostname@8
-setsockopt@20
-shutdown@8
-socket@12
diff --git a/winsup/w32api/lib/wst.def b/winsup/w32api/lib/wst.def
deleted file mode 100644
index e80170a..0000000
--- a/winsup/w32api/lib/wst.def
+++ /dev/null
@@ -1,3 +0,0 @@
-LIBRARY WST.DLL
-EXPORTS
-_penter
diff --git a/winsup/w32api/lib/wtsapi32.def b/winsup/w32api/lib/wtsapi32.def
deleted file mode 100755
index e02e470..0000000
--- a/winsup/w32api/lib/wtsapi32.def
+++ /dev/null
@@ -1,35 +0,0 @@
-LIBRARY wtsapi32.dll
-EXPORTS
-WTSCloseServer@4
-WTSDisconnectSession@12
-WTSEnumerateProcessesA@20
-WTSEnumerateProcessesW@20
-WTSEnumerateServersA@20
-WTSEnumerateServersW@20
-WTSEnumerateSessionsA@20
-WTSEnumerateSessionsW@20
-WTSFreeMemory@4
-WTSLogoffSession@12
-WTSOpenServerA@4
-WTSOpenServerW@4
-WTSQuerySessionInformationA@20
-WTSQuerySessionInformationW@20
-WTSQueryUserConfigA@20
-WTSQueryUserConfigW@20
-WTSQueryUserToken@8
-WTSRegisterSessionNotification@8
-WTSSendMessageA@40
-WTSSendMessageW@40
-WTSSetUserConfigA@20
-WTSSetUserConfigW@20
-WTSShutdownSystem@8
-WTSTerminateProcess@12
-WTSUnRegisterSessionNotification@4
-WTSVirtualChannelClose@4
-WTSVirtualChannelOpen@12
-WTSVirtualChannelPurgeInput@4
-WTSVirtualChannelPurgeOutput@4
-WTSVirtualChannelQuery@16
-WTSVirtualChannelRead@20
-WTSVirtualChannelWrite@16
-WTSWaitSystemEvent@12